diff --git a/apps/backend/.env b/apps/backend/.envz similarity index 100% rename from apps/backend/.env rename to apps/backend/.envz diff --git a/apps/backend/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/3215becb47ab9107dd287921903cb3392424ca77d90da5d8bee350f1688c8f23.sqlite b/apps/backend/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/3215becb47ab9107dd287921903cb3392424ca77d90da5d8bee350f1688c8f23.sqlite new file mode 100644 index 0000000..afd6465 Binary files /dev/null and b/apps/backend/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/3215becb47ab9107dd287921903cb3392424ca77d90da5d8bee350f1688c8f23.sqlite differ diff --git a/apps/backend/.wrangler/tmp/bundle-aek2Ls/middleware-insertion-facade.js b/apps/backend/.wrangler/tmp/bundle-aek2Ls/middleware-insertion-facade.js new file mode 100644 index 0000000..3ad6dbd --- /dev/null +++ b/apps/backend/.wrangler/tmp/bundle-aek2Ls/middleware-insertion-facade.js @@ -0,0 +1,11 @@ + import worker, * as OTHER_EXPORTS from "/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/worker.ts"; + import * as __MIDDLEWARE_0__ from "/Users/mohammedshafiuddin/WebDev/freshyo/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts"; +import * as __MIDDLEWARE_1__ from "/Users/mohammedshafiuddin/WebDev/freshyo/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts"; + + export * from "/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/worker.ts"; + + export const __INTERNAL_WRANGLER_MIDDLEWARE__ = [ + + __MIDDLEWARE_0__.default,__MIDDLEWARE_1__.default + ] + export default worker; \ No newline at end of file diff --git a/apps/backend/.wrangler/tmp/bundle-aek2Ls/middleware-loader.entry.ts b/apps/backend/.wrangler/tmp/bundle-aek2Ls/middleware-loader.entry.ts new file mode 100644 index 0000000..5a97701 --- /dev/null +++ b/apps/backend/.wrangler/tmp/bundle-aek2Ls/middleware-loader.entry.ts @@ -0,0 +1,134 @@ +// This loads all middlewares exposed on the middleware object and then starts +// the invocation chain. The big idea is that we can add these to the middleware +// export dynamically through wrangler, or we can potentially let users directly +// add them as a sort of "plugin" system. + +import ENTRY, { __INTERNAL_WRANGLER_MIDDLEWARE__ } from "/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/bundle-aek2Ls/middleware-insertion-facade.js"; +import { __facade_invoke__, __facade_register__, Dispatcher } from "/Users/mohammedshafiuddin/WebDev/freshyo/node_modules/wrangler/templates/middleware/common.ts"; +import type { WorkerEntrypointConstructor } from "/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/bundle-aek2Ls/middleware-insertion-facade.js"; + +// Preserve all the exports from the worker +export * from "/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/bundle-aek2Ls/middleware-insertion-facade.js"; + +class __Facade_ScheduledController__ implements ScheduledController { + readonly #noRetry: ScheduledController["noRetry"]; + + constructor( + readonly scheduledTime: number, + readonly cron: string, + noRetry: ScheduledController["noRetry"] + ) { + this.#noRetry = noRetry; + } + + noRetry() { + if (!(this instanceof __Facade_ScheduledController__)) { + throw new TypeError("Illegal invocation"); + } + // Need to call native method immediately in case uncaught error thrown + this.#noRetry(); + } +} + +function wrapExportedHandler(worker: ExportedHandler): ExportedHandler { + // If we don't have any middleware defined, just return the handler as is + if ( + __INTERNAL_WRANGLER_MIDDLEWARE__ === undefined || + __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0 + ) { + return worker; + } + // Otherwise, register all middleware once + for (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) { + __facade_register__(middleware); + } + + const fetchDispatcher: ExportedHandlerFetchHandler = function ( + request, + env, + ctx + ) { + if (worker.fetch === undefined) { + throw new Error("Handler does not export a fetch() function."); + } + return worker.fetch(request, env, ctx); + }; + + return { + ...worker, + fetch(request, env, ctx) { + const dispatcher: Dispatcher = function (type, init) { + if (type === "scheduled" && worker.scheduled !== undefined) { + const controller = new __Facade_ScheduledController__( + Date.now(), + init.cron ?? "", + () => {} + ); + return worker.scheduled(controller, env, ctx); + } + }; + return __facade_invoke__(request, env, ctx, dispatcher, fetchDispatcher); + }, + }; +} + +function wrapWorkerEntrypoint( + klass: WorkerEntrypointConstructor +): WorkerEntrypointConstructor { + // If we don't have any middleware defined, just return the handler as is + if ( + __INTERNAL_WRANGLER_MIDDLEWARE__ === undefined || + __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0 + ) { + return klass; + } + // Otherwise, register all middleware once + for (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) { + __facade_register__(middleware); + } + + // `extend`ing `klass` here so other RPC methods remain callable + return class extends klass { + #fetchDispatcher: ExportedHandlerFetchHandler> = ( + request, + env, + ctx + ) => { + this.env = env; + this.ctx = ctx; + if (super.fetch === undefined) { + throw new Error("Entrypoint class does not define a fetch() function."); + } + return super.fetch(request); + }; + + #dispatcher: Dispatcher = (type, init) => { + if (type === "scheduled" && super.scheduled !== undefined) { + const controller = new __Facade_ScheduledController__( + Date.now(), + init.cron ?? "", + () => {} + ); + return super.scheduled(controller); + } + }; + + fetch(request: Request) { + return __facade_invoke__( + request, + this.env, + this.ctx, + this.#dispatcher, + this.#fetchDispatcher + ); + } + }; +} + +let WRAPPED_ENTRY: ExportedHandler | WorkerEntrypointConstructor | undefined; +if (typeof ENTRY === "object") { + WRAPPED_ENTRY = wrapExportedHandler(ENTRY); +} else if (typeof ENTRY === "function") { + WRAPPED_ENTRY = wrapWorkerEntrypoint(ENTRY); +} +export default WRAPPED_ENTRY; diff --git a/apps/backend/.wrangler/tmp/bundle-aek2Ls/strip-cf-connecting-ip-header.js b/apps/backend/.wrangler/tmp/bundle-aek2Ls/strip-cf-connecting-ip-header.js new file mode 100644 index 0000000..a011710 --- /dev/null +++ b/apps/backend/.wrangler/tmp/bundle-aek2Ls/strip-cf-connecting-ip-header.js @@ -0,0 +1,13 @@ +function stripCfConnectingIPHeader(input, init) { + const request = new Request(input, init); + request.headers.delete("CF-Connecting-IP"); + return request; +} + +globalThis.fetch = new Proxy(globalThis.fetch, { + apply(target, thisArg, argArray) { + return Reflect.apply(target, thisArg, [ + stripCfConnectingIPHeader.apply(null, argArray), + ]); + }, +}); diff --git a/apps/backend/.wrangler/tmp/dev-4RTD5h/worker.js b/apps/backend/.wrangler/tmp/dev-4RTD5h/worker.js new file mode 100644 index 0000000..ef18445 --- /dev/null +++ b/apps/backend/.wrangler/tmp/dev-4RTD5h/worker.js @@ -0,0 +1,95506 @@ +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 __name = (target2, value) => __defProp(target2, "name", { value, configurable: true }); +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 __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __commonJS = (cb, mod) => function __require2() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target2, all3) => { + for (var name in all3) + __defProp(target2, name, { get: all3[name], enumerable: true }); +}; +var __copyProps = (to, from, except2, desc2) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except2) + __defProp(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target2) => (target2 = 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(target2, "default", { value: mod, enumerable: true }) : target2, + mod +)); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/_internal/utils.mjs +// @__NO_SIDE_EFFECTS__ +function createNotImplementedError(name) { + return new Error(`[unenv] ${name} is not implemented yet!`); +} +// @__NO_SIDE_EFFECTS__ +function notImplemented(name) { + const fn = /* @__PURE__ */ __name(() => { + throw /* @__PURE__ */ createNotImplementedError(name); + }, "fn"); + return Object.assign(fn, { __unenv__: true }); +} +// @__NO_SIDE_EFFECTS__ +function notImplementedAsync(name) { + const fn = /* @__PURE__ */ notImplemented(name); + fn.__promisify__ = () => /* @__PURE__ */ notImplemented(name + ".__promisify__"); + fn.native = fn; + return fn; +} +// @__NO_SIDE_EFFECTS__ +function notImplementedClass(name) { + return class { + __unenv__ = true; + constructor() { + throw new Error(`[unenv] ${name} is not implemented yet!`); + } + }; +} +var init_utils = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/_internal/utils.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(createNotImplementedError, "createNotImplementedError"); + __name(notImplemented, "notImplemented"); + __name(notImplementedAsync, "notImplementedAsync"); + __name(notImplementedClass, "notImplementedClass"); + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/perf_hooks/performance.mjs +var _timeOrigin, _performanceNow, nodeTiming, PerformanceEntry, PerformanceMark, PerformanceMeasure, PerformanceResourceTiming, PerformanceObserverEntryList, Performance, PerformanceObserver, performance; +var init_performance = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/perf_hooks/performance.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils(); + _timeOrigin = globalThis.performance?.timeOrigin ?? Date.now(); + _performanceNow = globalThis.performance?.now ? globalThis.performance.now.bind(globalThis.performance) : () => Date.now() - _timeOrigin; + nodeTiming = { + name: "node", + entryType: "node", + startTime: 0, + duration: 0, + nodeStart: 0, + v8Start: 0, + bootstrapComplete: 0, + environment: 0, + loopStart: 0, + loopExit: 0, + idleTime: 0, + uvMetricsInfo: { + loopCount: 0, + events: 0, + eventsWaiting: 0 + }, + detail: void 0, + toJSON() { + return this; + } + }; + PerformanceEntry = class { + static { + __name(this, "PerformanceEntry"); + } + __unenv__ = true; + detail; + entryType = "event"; + name; + startTime; + constructor(name, options) { + this.name = name; + this.startTime = options?.startTime || _performanceNow(); + this.detail = options?.detail; + } + get duration() { + return _performanceNow() - this.startTime; + } + toJSON() { + return { + name: this.name, + entryType: this.entryType, + startTime: this.startTime, + duration: this.duration, + detail: this.detail + }; + } + }; + PerformanceMark = class PerformanceMark2 extends PerformanceEntry { + static { + __name(this, "PerformanceMark"); + } + entryType = "mark"; + constructor() { + super(...arguments); + } + get duration() { + return 0; + } + }; + PerformanceMeasure = class extends PerformanceEntry { + static { + __name(this, "PerformanceMeasure"); + } + entryType = "measure"; + }; + PerformanceResourceTiming = class extends PerformanceEntry { + static { + __name(this, "PerformanceResourceTiming"); + } + entryType = "resource"; + serverTiming = []; + connectEnd = 0; + connectStart = 0; + decodedBodySize = 0; + domainLookupEnd = 0; + domainLookupStart = 0; + encodedBodySize = 0; + fetchStart = 0; + initiatorType = ""; + name = ""; + nextHopProtocol = ""; + redirectEnd = 0; + redirectStart = 0; + requestStart = 0; + responseEnd = 0; + responseStart = 0; + secureConnectionStart = 0; + startTime = 0; + transferSize = 0; + workerStart = 0; + responseStatus = 0; + }; + PerformanceObserverEntryList = class { + static { + __name(this, "PerformanceObserverEntryList"); + } + __unenv__ = true; + getEntries() { + return []; + } + getEntriesByName(_name, _type) { + return []; + } + getEntriesByType(type) { + return []; + } + }; + Performance = class { + static { + __name(this, "Performance"); + } + __unenv__ = true; + timeOrigin = _timeOrigin; + eventCounts = /* @__PURE__ */ new Map(); + _entries = []; + _resourceTimingBufferSize = 0; + navigation = void 0; + timing = void 0; + timerify(_fn, _options) { + throw createNotImplementedError("Performance.timerify"); + } + get nodeTiming() { + return nodeTiming; + } + eventLoopUtilization() { + return {}; + } + markResourceTiming() { + return new PerformanceResourceTiming(""); + } + onresourcetimingbufferfull = null; + now() { + if (this.timeOrigin === _timeOrigin) { + return _performanceNow(); + } + return Date.now() - this.timeOrigin; + } + clearMarks(markName) { + this._entries = markName ? this._entries.filter((e) => e.name !== markName) : this._entries.filter((e) => e.entryType !== "mark"); + } + clearMeasures(measureName) { + this._entries = measureName ? this._entries.filter((e) => e.name !== measureName) : this._entries.filter((e) => e.entryType !== "measure"); + } + clearResourceTimings() { + this._entries = this._entries.filter((e) => e.entryType !== "resource" || e.entryType !== "navigation"); + } + getEntries() { + return this._entries; + } + getEntriesByName(name, type) { + return this._entries.filter((e) => e.name === name && (!type || e.entryType === type)); + } + getEntriesByType(type) { + return this._entries.filter((e) => e.entryType === type); + } + mark(name, options) { + const entry = new PerformanceMark(name, options); + this._entries.push(entry); + return entry; + } + measure(measureName, startOrMeasureOptions, endMark) { + let start; + let end; + if (typeof startOrMeasureOptions === "string") { + start = this.getEntriesByName(startOrMeasureOptions, "mark")[0]?.startTime; + end = this.getEntriesByName(endMark, "mark")[0]?.startTime; + } else { + start = Number.parseFloat(startOrMeasureOptions?.start) || this.now(); + end = Number.parseFloat(startOrMeasureOptions?.end) || this.now(); + } + const entry = new PerformanceMeasure(measureName, { + startTime: start, + detail: { + start, + end + } + }); + this._entries.push(entry); + return entry; + } + setResourceTimingBufferSize(maxSize) { + this._resourceTimingBufferSize = maxSize; + } + addEventListener(type, listener, options) { + throw createNotImplementedError("Performance.addEventListener"); + } + removeEventListener(type, listener, options) { + throw createNotImplementedError("Performance.removeEventListener"); + } + dispatchEvent(event) { + throw createNotImplementedError("Performance.dispatchEvent"); + } + toJSON() { + return this; + } + }; + PerformanceObserver = class { + static { + __name(this, "PerformanceObserver"); + } + __unenv__ = true; + static supportedEntryTypes = []; + _callback = null; + constructor(callback) { + this._callback = callback; + } + takeRecords() { + return []; + } + disconnect() { + throw createNotImplementedError("PerformanceObserver.disconnect"); + } + observe(options) { + throw createNotImplementedError("PerformanceObserver.observe"); + } + bind(fn) { + return fn; + } + runInAsyncScope(fn, thisArg, ...args) { + return fn.call(thisArg, ...args); + } + asyncId() { + return 0; + } + triggerAsyncId() { + return 0; + } + emitDestroy() { + return this; + } + }; + performance = globalThis.performance && "addEventListener" in globalThis.performance ? globalThis.performance : new Performance(); + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/perf_hooks.mjs +var init_perf_hooks = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/perf_hooks.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_performance(); + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs +var init_performance2 = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs"() { + init_perf_hooks(); + if (!("__unenv__" in performance)) { + const proto = Performance.prototype; + for (const key of Object.getOwnPropertyNames(proto)) { + if (key !== "constructor" && !(key in performance)) { + const desc2 = Object.getOwnPropertyDescriptor(proto, key); + if (desc2) { + Object.defineProperty(performance, key, desc2); + } + } + } + } + globalThis.performance = performance; + globalThis.Performance = Performance; + globalThis.PerformanceEntry = PerformanceEntry; + globalThis.PerformanceMark = PerformanceMark; + globalThis.PerformanceMeasure = PerformanceMeasure; + globalThis.PerformanceObserver = PerformanceObserver; + globalThis.PerformanceObserverEntryList = PerformanceObserverEntryList; + globalThis.PerformanceResourceTiming = PerformanceResourceTiming; + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/mock/noop.mjs +var noop_default; +var init_noop = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/mock/noop.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + noop_default = Object.assign(() => { + }, { __unenv__: true }); + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/console.mjs +import { Writable } from "node:stream"; +var _console, _ignoreErrors, _stderr, _stdout, log, info, trace, debug, table, error, warn, createTask, clear, count, countReset, dir, dirxml, group, groupEnd, groupCollapsed, profile, profileEnd, time, timeEnd, timeLog, timeStamp, Console, _times, _stdoutErrorHandler, _stderrErrorHandler; +var init_console = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/console.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_noop(); + init_utils(); + _console = globalThis.console; + _ignoreErrors = true; + _stderr = new Writable(); + _stdout = new Writable(); + log = _console?.log ?? noop_default; + info = _console?.info ?? log; + trace = _console?.trace ?? info; + debug = _console?.debug ?? log; + table = _console?.table ?? log; + error = _console?.error ?? log; + warn = _console?.warn ?? error; + createTask = _console?.createTask ?? /* @__PURE__ */ notImplemented("console.createTask"); + clear = _console?.clear ?? noop_default; + count = _console?.count ?? noop_default; + countReset = _console?.countReset ?? noop_default; + dir = _console?.dir ?? noop_default; + dirxml = _console?.dirxml ?? noop_default; + group = _console?.group ?? noop_default; + groupEnd = _console?.groupEnd ?? noop_default; + groupCollapsed = _console?.groupCollapsed ?? noop_default; + profile = _console?.profile ?? noop_default; + profileEnd = _console?.profileEnd ?? noop_default; + time = _console?.time ?? noop_default; + timeEnd = _console?.timeEnd ?? noop_default; + timeLog = _console?.timeLog ?? noop_default; + timeStamp = _console?.timeStamp ?? noop_default; + Console = _console?.Console ?? /* @__PURE__ */ notImplementedClass("console.Console"); + _times = /* @__PURE__ */ new Map(); + _stdoutErrorHandler = noop_default; + _stderrErrorHandler = noop_default; + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs +var workerdConsole, assert, clear2, context, count2, countReset2, createTask2, debug2, dir2, dirxml2, error2, group2, groupCollapsed2, groupEnd2, info2, log2, profile2, profileEnd2, table2, time2, timeEnd2, timeLog2, timeStamp2, trace2, warn2, console_default; +var init_console2 = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_console(); + workerdConsole = globalThis["console"]; + ({ + assert, + clear: clear2, + context: ( + // @ts-expect-error undocumented public API + context + ), + count: count2, + countReset: countReset2, + createTask: ( + // @ts-expect-error undocumented public API + createTask2 + ), + debug: debug2, + dir: dir2, + dirxml: dirxml2, + error: error2, + group: group2, + groupCollapsed: groupCollapsed2, + groupEnd: groupEnd2, + info: info2, + log: log2, + profile: profile2, + profileEnd: profileEnd2, + table: table2, + time: time2, + timeEnd: timeEnd2, + timeLog: timeLog2, + timeStamp: timeStamp2, + trace: trace2, + warn: warn2 + } = workerdConsole); + Object.assign(workerdConsole, { + Console, + _ignoreErrors, + _stderr, + _stderrErrorHandler, + _stdout, + _stdoutErrorHandler, + _times + }); + console_default = workerdConsole; + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-console +var init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-console"() { + init_console2(); + globalThis.console = console_default; + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/process/hrtime.mjs +var hrtime; +var init_hrtime = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/process/hrtime.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + hrtime = /* @__PURE__ */ Object.assign(/* @__PURE__ */ __name(function hrtime2(startTime) { + const now = Date.now(); + const seconds = Math.trunc(now / 1e3); + const nanos = now % 1e3 * 1e6; + if (startTime) { + let diffSeconds = seconds - startTime[0]; + let diffNanos = nanos - startTime[0]; + if (diffNanos < 0) { + diffSeconds = diffSeconds - 1; + diffNanos = 1e9 + diffNanos; + } + return [diffSeconds, diffNanos]; + } + return [seconds, nanos]; + }, "hrtime"), { bigint: /* @__PURE__ */ __name(function bigint() { + return BigInt(Date.now() * 1e6); + }, "bigint") }); + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/tty/read-stream.mjs +var ReadStream; +var init_read_stream = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/tty/read-stream.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ReadStream = class { + static { + __name(this, "ReadStream"); + } + fd; + isRaw = false; + isTTY = false; + constructor(fd) { + this.fd = fd; + } + setRawMode(mode) { + this.isRaw = mode; + return this; + } + }; + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/tty/write-stream.mjs +var WriteStream; +var init_write_stream = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/tty/write-stream.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + WriteStream = class { + static { + __name(this, "WriteStream"); + } + fd; + columns = 80; + rows = 24; + isTTY = false; + constructor(fd) { + this.fd = fd; + } + clearLine(dir3, callback) { + callback && callback(); + return false; + } + clearScreenDown(callback) { + callback && callback(); + return false; + } + cursorTo(x, y, callback) { + callback && typeof callback === "function" && callback(); + return false; + } + moveCursor(dx, dy, callback) { + callback && callback(); + return false; + } + getColorDepth(env2) { + return 1; + } + hasColors(count4, env2) { + return false; + } + getWindowSize() { + return [this.columns, this.rows]; + } + write(str, encoding, cb) { + if (str instanceof Uint8Array) { + str = new TextDecoder().decode(str); + } + try { + console.log(str); + } catch { + } + cb && typeof cb === "function" && cb(); + return false; + } + }; + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/tty.mjs +var init_tty = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/tty.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_read_stream(); + init_write_stream(); + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/process/node-version.mjs +var NODE_VERSION; +var init_node_version = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/process/node-version.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + NODE_VERSION = "22.14.0"; + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/process/process.mjs +import { EventEmitter } from "node:events"; +var Process; +var init_process = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/process/process.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tty(); + init_utils(); + init_node_version(); + Process = class _Process extends EventEmitter { + static { + __name(this, "Process"); + } + env; + hrtime; + nextTick; + constructor(impl) { + super(); + this.env = impl.env; + this.hrtime = impl.hrtime; + this.nextTick = impl.nextTick; + for (const prop of [...Object.getOwnPropertyNames(_Process.prototype), ...Object.getOwnPropertyNames(EventEmitter.prototype)]) { + const value = this[prop]; + if (typeof value === "function") { + this[prop] = value.bind(this); + } + } + } + // --- event emitter --- + emitWarning(warning, type, code) { + console.warn(`${code ? `[${code}] ` : ""}${type ? `${type}: ` : ""}${warning}`); + } + emit(...args) { + return super.emit(...args); + } + listeners(eventName) { + return super.listeners(eventName); + } + // --- stdio (lazy initializers) --- + #stdin; + #stdout; + #stderr; + get stdin() { + return this.#stdin ??= new ReadStream(0); + } + get stdout() { + return this.#stdout ??= new WriteStream(1); + } + get stderr() { + return this.#stderr ??= new WriteStream(2); + } + // --- cwd --- + #cwd = "/"; + chdir(cwd2) { + this.#cwd = cwd2; + } + cwd() { + return this.#cwd; + } + // --- dummy props and getters --- + arch = ""; + platform = ""; + argv = []; + argv0 = ""; + execArgv = []; + execPath = ""; + title = ""; + pid = 200; + ppid = 100; + get version() { + return `v${NODE_VERSION}`; + } + get versions() { + return { node: NODE_VERSION }; + } + get allowedNodeEnvironmentFlags() { + return /* @__PURE__ */ new Set(); + } + get sourceMapsEnabled() { + return false; + } + get debugPort() { + return 0; + } + get throwDeprecation() { + return false; + } + get traceDeprecation() { + return false; + } + get features() { + return {}; + } + get release() { + return {}; + } + get connected() { + return false; + } + get config() { + return {}; + } + get moduleLoadList() { + return []; + } + constrainedMemory() { + return 0; + } + availableMemory() { + return 0; + } + uptime() { + return 0; + } + resourceUsage() { + return {}; + } + // --- noop methods --- + ref() { + } + unref() { + } + // --- unimplemented methods --- + umask() { + throw createNotImplementedError("process.umask"); + } + getBuiltinModule() { + return void 0; + } + getActiveResourcesInfo() { + throw createNotImplementedError("process.getActiveResourcesInfo"); + } + exit() { + throw createNotImplementedError("process.exit"); + } + reallyExit() { + throw createNotImplementedError("process.reallyExit"); + } + kill() { + throw createNotImplementedError("process.kill"); + } + abort() { + throw createNotImplementedError("process.abort"); + } + dlopen() { + throw createNotImplementedError("process.dlopen"); + } + setSourceMapsEnabled() { + throw createNotImplementedError("process.setSourceMapsEnabled"); + } + loadEnvFile() { + throw createNotImplementedError("process.loadEnvFile"); + } + disconnect() { + throw createNotImplementedError("process.disconnect"); + } + cpuUsage() { + throw createNotImplementedError("process.cpuUsage"); + } + setUncaughtExceptionCaptureCallback() { + throw createNotImplementedError("process.setUncaughtExceptionCaptureCallback"); + } + hasUncaughtExceptionCaptureCallback() { + throw createNotImplementedError("process.hasUncaughtExceptionCaptureCallback"); + } + initgroups() { + throw createNotImplementedError("process.initgroups"); + } + openStdin() { + throw createNotImplementedError("process.openStdin"); + } + assert() { + throw createNotImplementedError("process.assert"); + } + binding() { + throw createNotImplementedError("process.binding"); + } + // --- attached interfaces --- + permission = { has: /* @__PURE__ */ notImplemented("process.permission.has") }; + report = { + directory: "", + filename: "", + signal: "SIGUSR2", + compact: false, + reportOnFatalError: false, + reportOnSignal: false, + reportOnUncaughtException: false, + getReport: /* @__PURE__ */ notImplemented("process.report.getReport"), + writeReport: /* @__PURE__ */ notImplemented("process.report.writeReport") + }; + finalization = { + register: /* @__PURE__ */ notImplemented("process.finalization.register"), + unregister: /* @__PURE__ */ notImplemented("process.finalization.unregister"), + registerBeforeExit: /* @__PURE__ */ notImplemented("process.finalization.registerBeforeExit") + }; + memoryUsage = Object.assign(() => ({ + arrayBuffers: 0, + rss: 0, + external: 0, + heapTotal: 0, + heapUsed: 0 + }), { rss: /* @__PURE__ */ __name(() => 0, "rss") }); + // --- undefined props --- + mainModule = void 0; + domain = void 0; + // optional + send = void 0; + exitCode = void 0; + channel = void 0; + getegid = void 0; + geteuid = void 0; + getgid = void 0; + getgroups = void 0; + getuid = void 0; + setegid = void 0; + seteuid = void 0; + setgid = void 0; + setgroups = void 0; + setuid = void 0; + // internals + _events = void 0; + _eventsCount = void 0; + _exiting = void 0; + _maxListeners = void 0; + _debugEnd = void 0; + _debugProcess = void 0; + _fatalException = void 0; + _getActiveHandles = void 0; + _getActiveRequests = void 0; + _kill = void 0; + _preload_modules = void 0; + _rawDebug = void 0; + _startProfilerIdleNotifier = void 0; + _stopProfilerIdleNotifier = void 0; + _tickCallback = void 0; + _disconnect = void 0; + _handleQueue = void 0; + _pendingMessage = void 0; + _channel = void 0; + _send = void 0; + _linkedBinding = void 0; + }; + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs +var globalProcess, getBuiltinModule, workerdProcess, unenvProcess, exit, features, platform, _channel, _debugEnd, _debugProcess, _disconnect, _events, _eventsCount, _exiting, _fatalException, _getActiveHandles, _getActiveRequests, _handleQueue, _kill, _linkedBinding, _maxListeners, _pendingMessage, _preload_modules, _rawDebug, _send, _startProfilerIdleNotifier, _stopProfilerIdleNotifier, _tickCallback, abort, addListener, allowedNodeEnvironmentFlags, arch, argv, argv0, assert2, availableMemory, binding, channel, chdir, config, connected, constrainedMemory, cpuUsage, cwd, debugPort, disconnect, dlopen, domain, emit, emitWarning, env, eventNames, execArgv, execPath, exitCode, finalization, getActiveResourcesInfo, getegid, geteuid, getgid, getgroups, getMaxListeners, getuid, hasUncaughtExceptionCaptureCallback, hrtime3, initgroups, kill, listenerCount, listeners, loadEnvFile, mainModule, memoryUsage, moduleLoadList, nextTick, off, on, once, openStdin, permission, pid, ppid, prependListener, prependOnceListener, rawListeners, reallyExit, ref, release, removeAllListeners, removeListener, report, resourceUsage, send, setegid, seteuid, setgid, setgroups, setMaxListeners, setSourceMapsEnabled, setuid, setUncaughtExceptionCaptureCallback, sourceMapsEnabled, stderr, stdin, stdout, throwDeprecation, title, traceDeprecation, umask, unref, uptime, version, versions, _process, process_default; +var init_process2 = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_hrtime(); + init_process(); + globalProcess = globalThis["process"]; + getBuiltinModule = globalProcess.getBuiltinModule; + workerdProcess = getBuiltinModule("node:process"); + unenvProcess = new Process({ + env: globalProcess.env, + hrtime, + // `nextTick` is available from workerd process v1 + nextTick: workerdProcess.nextTick + }); + ({ exit, features, platform } = workerdProcess); + ({ + _channel, + _debugEnd, + _debugProcess, + _disconnect, + _events, + _eventsCount, + _exiting, + _fatalException, + _getActiveHandles, + _getActiveRequests, + _handleQueue, + _kill, + _linkedBinding, + _maxListeners, + _pendingMessage, + _preload_modules, + _rawDebug, + _send, + _startProfilerIdleNotifier, + _stopProfilerIdleNotifier, + _tickCallback, + abort, + addListener, + allowedNodeEnvironmentFlags, + arch, + argv, + argv0, + assert: assert2, + availableMemory, + binding, + channel, + chdir, + config, + connected, + constrainedMemory, + cpuUsage, + cwd, + debugPort, + disconnect, + dlopen, + domain, + emit, + emitWarning, + env, + eventNames, + execArgv, + execPath, + exitCode, + finalization, + getActiveResourcesInfo, + getegid, + geteuid, + getgid, + getgroups, + getMaxListeners, + getuid, + hasUncaughtExceptionCaptureCallback, + hrtime: hrtime3, + initgroups, + kill, + listenerCount, + listeners, + loadEnvFile, + mainModule, + memoryUsage, + moduleLoadList, + nextTick, + off, + on, + once, + openStdin, + permission, + pid, + ppid, + prependListener, + prependOnceListener, + rawListeners, + reallyExit, + ref, + release, + removeAllListeners, + removeListener, + report, + resourceUsage, + send, + setegid, + seteuid, + setgid, + setgroups, + setMaxListeners, + setSourceMapsEnabled, + setuid, + setUncaughtExceptionCaptureCallback, + sourceMapsEnabled, + stderr, + stdin, + stdout, + throwDeprecation, + title, + traceDeprecation, + umask, + unref, + uptime, + version, + versions + } = unenvProcess); + _process = { + abort, + addListener, + allowedNodeEnvironmentFlags, + hasUncaughtExceptionCaptureCallback, + setUncaughtExceptionCaptureCallback, + loadEnvFile, + sourceMapsEnabled, + arch, + argv, + argv0, + chdir, + config, + connected, + constrainedMemory, + availableMemory, + cpuUsage, + cwd, + debugPort, + dlopen, + disconnect, + emit, + emitWarning, + env, + eventNames, + execArgv, + execPath, + exit, + finalization, + features, + getBuiltinModule, + getActiveResourcesInfo, + getMaxListeners, + hrtime: hrtime3, + kill, + listeners, + listenerCount, + memoryUsage, + nextTick, + on, + off, + once, + pid, + platform, + ppid, + prependListener, + prependOnceListener, + rawListeners, + release, + removeAllListeners, + removeListener, + report, + resourceUsage, + setMaxListeners, + setSourceMapsEnabled, + stderr, + stdin, + stdout, + title, + throwDeprecation, + traceDeprecation, + umask, + uptime, + version, + versions, + // @ts-expect-error old API + domain, + initgroups, + moduleLoadList, + reallyExit, + openStdin, + assert: assert2, + binding, + send, + exitCode, + channel, + getegid, + geteuid, + getgid, + getgroups, + getuid, + setegid, + seteuid, + setgid, + setgroups, + setuid, + permission, + mainModule, + _events, + _eventsCount, + _exiting, + _maxListeners, + _debugEnd, + _debugProcess, + _fatalException, + _getActiveHandles, + _getActiveRequests, + _kill, + _preload_modules, + _rawDebug, + _startProfilerIdleNotifier, + _stopProfilerIdleNotifier, + _tickCallback, + _disconnect, + _handleQueue, + _pendingMessage, + _channel, + _send, + _linkedBinding + }; + process_default = _process; + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-process +var init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-process"() { + init_process2(); + globalThis.process = process_default; + } +}); + +// wrangler-modules-watch:wrangler:modules-watch +var init_wrangler_modules_watch = __esm({ + "wrangler-modules-watch:wrangler:modules-watch"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/templates/modules-watch-stub.js +var init_modules_watch_stub = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/templates/modules-watch-stub.js"() { + init_wrangler_modules_watch(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/entity.js +function is(value, type) { + if (!value || typeof value !== "object") { + return false; + } + if (value instanceof type) { + return true; + } + if (!Object.prototype.hasOwnProperty.call(type, entityKind)) { + throw new Error( + `Class "${type.name ?? ""}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.` + ); + } + let cls = Object.getPrototypeOf(value).constructor; + if (cls) { + while (cls) { + if (entityKind in cls && cls[entityKind] === type[entityKind]) { + return true; + } + cls = Object.getPrototypeOf(cls); + } + } + return false; +} +var entityKind; +var init_entity = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/entity.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + entityKind = /* @__PURE__ */ Symbol.for("drizzle:entityKind"); + __name(is, "is"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/logger.js +var ConsoleLogWriter, DefaultLogger, NoopLogger; +var init_logger = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/logger.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + ConsoleLogWriter = class { + static { + __name(this, "ConsoleLogWriter"); + } + static [entityKind] = "ConsoleLogWriter"; + write(message2) { + console.log(message2); + } + }; + DefaultLogger = class { + static { + __name(this, "DefaultLogger"); + } + static [entityKind] = "DefaultLogger"; + writer; + constructor(config3) { + this.writer = config3?.writer ?? new ConsoleLogWriter(); + } + logQuery(query, params) { + const stringifiedParams = params.map((p) => { + try { + return JSON.stringify(p); + } catch { + return String(p); + } + }); + const paramsStr = stringifiedParams.length ? ` -- params: [${stringifiedParams.join(", ")}]` : ""; + this.writer.write(`Query: ${query}${paramsStr}`); + } + }; + NoopLogger = class { + static { + __name(this, "NoopLogger"); + } + static [entityKind] = "NoopLogger"; + logQuery() { + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/table.utils.js +var TableName; +var init_table_utils = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/table.utils.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + TableName = /* @__PURE__ */ Symbol.for("drizzle:Name"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/table.js +function getTableName(table3) { + return table3[TableName]; +} +function getTableUniqueName(table3) { + return `${table3[Schema] ?? "public"}.${table3[TableName]}`; +} +var Schema, Columns, ExtraConfigColumns, OriginalName, BaseName, IsAlias, ExtraConfigBuilder, IsDrizzleTable, Table; +var init_table = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/table.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + Schema = /* @__PURE__ */ Symbol.for("drizzle:Schema"); + Columns = /* @__PURE__ */ Symbol.for("drizzle:Columns"); + ExtraConfigColumns = /* @__PURE__ */ Symbol.for("drizzle:ExtraConfigColumns"); + OriginalName = /* @__PURE__ */ Symbol.for("drizzle:OriginalName"); + BaseName = /* @__PURE__ */ Symbol.for("drizzle:BaseName"); + IsAlias = /* @__PURE__ */ Symbol.for("drizzle:IsAlias"); + ExtraConfigBuilder = /* @__PURE__ */ Symbol.for("drizzle:ExtraConfigBuilder"); + IsDrizzleTable = /* @__PURE__ */ Symbol.for("drizzle:IsDrizzleTable"); + Table = class { + static { + __name(this, "Table"); + } + static [entityKind] = "Table"; + /** @internal */ + static Symbol = { + Name: TableName, + Schema, + OriginalName, + Columns, + ExtraConfigColumns, + BaseName, + IsAlias, + ExtraConfigBuilder + }; + /** + * @internal + * Can be changed if the table is aliased. + */ + [TableName]; + /** + * @internal + * Used to store the original name of the table, before any aliasing. + */ + [OriginalName]; + /** @internal */ + [Schema]; + /** @internal */ + [Columns]; + /** @internal */ + [ExtraConfigColumns]; + /** + * @internal + * Used to store the table name before the transformation via the `tableCreator` functions. + */ + [BaseName]; + /** @internal */ + [IsAlias] = false; + /** @internal */ + [IsDrizzleTable] = true; + /** @internal */ + [ExtraConfigBuilder] = void 0; + constructor(name, schema, baseName) { + this[TableName] = this[OriginalName] = name; + this[Schema] = schema; + this[BaseName] = baseName; + } + }; + __name(getTableName, "getTableName"); + __name(getTableUniqueName, "getTableUniqueName"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/column.js +var Column; +var init_column = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/column.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + Column = class { + static { + __name(this, "Column"); + } + constructor(table3, config3) { + this.table = table3; + this.config = config3; + this.name = config3.name; + this.keyAsName = config3.keyAsName; + this.notNull = config3.notNull; + this.default = config3.default; + this.defaultFn = config3.defaultFn; + this.onUpdateFn = config3.onUpdateFn; + this.hasDefault = config3.hasDefault; + this.primary = config3.primaryKey; + this.isUnique = config3.isUnique; + this.uniqueName = config3.uniqueName; + this.uniqueType = config3.uniqueType; + this.dataType = config3.dataType; + this.columnType = config3.columnType; + this.generated = config3.generated; + this.generatedIdentity = config3.generatedIdentity; + } + static [entityKind] = "Column"; + name; + keyAsName; + primary; + notNull; + default; + defaultFn; + onUpdateFn; + hasDefault; + isUnique; + uniqueName; + uniqueType; + dataType; + columnType; + enumValues = void 0; + generated = void 0; + generatedIdentity = void 0; + config; + mapFromDriverValue(value) { + return value; + } + mapToDriverValue(value) { + return value; + } + // ** @internal */ + shouldDisableInsert() { + return this.config.generated !== void 0 && this.config.generated.type !== "byDefault"; + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/column-builder.js +var ColumnBuilder; +var init_column_builder = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/column-builder.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + ColumnBuilder = class { + static { + __name(this, "ColumnBuilder"); + } + static [entityKind] = "ColumnBuilder"; + config; + constructor(name, dataType, columnType) { + this.config = { + name, + keyAsName: name === "", + notNull: false, + default: void 0, + hasDefault: false, + primaryKey: false, + isUnique: false, + uniqueName: void 0, + uniqueType: void 0, + dataType, + columnType, + generated: void 0 + }; + } + /** + * Changes the data type of the column. Commonly used with `json` columns. Also, useful for branded types. + * + * @example + * ```ts + * const users = pgTable('users', { + * id: integer('id').$type().primaryKey(), + * details: json('details').$type().notNull(), + * }); + * ``` + */ + $type() { + return this; + } + /** + * Adds a `not null` clause to the column definition. + * + * Affects the `select` model of the table - columns *without* `not null` will be nullable on select. + */ + notNull() { + this.config.notNull = true; + return this; + } + /** + * Adds a `default ` clause to the column definition. + * + * Affects the `insert` model of the table - columns *with* `default` are optional on insert. + * + * If you need to set a dynamic default value, use {@link $defaultFn} instead. + */ + default(value) { + this.config.default = value; + this.config.hasDefault = true; + return this; + } + /** + * Adds a dynamic default value to the column. + * The function will be called when the row is inserted, and the returned value will be used as the column value. + * + * **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`. + */ + $defaultFn(fn) { + this.config.defaultFn = fn; + this.config.hasDefault = true; + return this; + } + /** + * Alias for {@link $defaultFn}. + */ + $default = this.$defaultFn; + /** + * Adds a dynamic update value to the column. + * The function will be called when the row is updated, and the returned value will be used as the column value if none is provided. + * If no `default` (or `$defaultFn`) value is provided, the function will be called when the row is inserted as well, and the returned value will be used as the column value. + * + * **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`. + */ + $onUpdateFn(fn) { + this.config.onUpdateFn = fn; + this.config.hasDefault = true; + return this; + } + /** + * Alias for {@link $onUpdateFn}. + */ + $onUpdate = this.$onUpdateFn; + /** + * Adds a `primary key` clause to the column definition. This implicitly makes the column `not null`. + * + * In SQLite, `integer primary key` implicitly makes the column auto-incrementing. + */ + primaryKey() { + this.config.primaryKey = true; + this.config.notNull = true; + return this; + } + /** @internal Sets the name of the column to the key within the table definition if a name was not given. */ + setName(name) { + if (this.config.name !== "") return; + this.config.name = name; + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/foreign-keys.js +var ForeignKeyBuilder, ForeignKey; +var init_foreign_keys = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/foreign-keys.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + ForeignKeyBuilder = class { + static { + __name(this, "ForeignKeyBuilder"); + } + static [entityKind] = "PgForeignKeyBuilder"; + /** @internal */ + reference; + /** @internal */ + _onUpdate = "no action"; + /** @internal */ + _onDelete = "no action"; + constructor(config3, actions) { + this.reference = () => { + const { name, columns, foreignColumns } = config3(); + return { name, columns, foreignTable: foreignColumns[0].table, foreignColumns }; + }; + if (actions) { + this._onUpdate = actions.onUpdate; + this._onDelete = actions.onDelete; + } + } + onUpdate(action) { + this._onUpdate = action === void 0 ? "no action" : action; + return this; + } + onDelete(action) { + this._onDelete = action === void 0 ? "no action" : action; + return this; + } + /** @internal */ + build(table3) { + return new ForeignKey(table3, this); + } + }; + ForeignKey = class { + static { + __name(this, "ForeignKey"); + } + constructor(table3, builder) { + this.table = table3; + this.reference = builder.reference; + this.onUpdate = builder._onUpdate; + this.onDelete = builder._onDelete; + } + static [entityKind] = "PgForeignKey"; + reference; + onUpdate; + onDelete; + getName() { + const { name, columns, foreignColumns } = this.reference(); + const columnNames = columns.map((column) => column.name); + const foreignColumnNames = foreignColumns.map((column) => column.name); + const chunks = [ + this.table[TableName], + ...columnNames, + foreignColumns[0].table[TableName], + ...foreignColumnNames + ]; + return name ?? `${chunks.join("_")}_fk`; + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/tracing-utils.js +function iife(fn, ...args) { + return fn(...args); +} +var init_tracing_utils = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/tracing-utils.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(iife, "iife"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/unique-constraint.js +function uniqueKeyName(table3, columns) { + return `${table3[TableName]}_${columns.join("_")}_unique`; +} +var UniqueConstraintBuilder, UniqueOnConstraintBuilder, UniqueConstraint; +var init_unique_constraint = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/unique-constraint.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + __name(uniqueKeyName, "uniqueKeyName"); + UniqueConstraintBuilder = class { + static { + __name(this, "UniqueConstraintBuilder"); + } + constructor(columns, name) { + this.name = name; + this.columns = columns; + } + static [entityKind] = "PgUniqueConstraintBuilder"; + /** @internal */ + columns; + /** @internal */ + nullsNotDistinctConfig = false; + nullsNotDistinct() { + this.nullsNotDistinctConfig = true; + return this; + } + /** @internal */ + build(table3) { + return new UniqueConstraint(table3, this.columns, this.nullsNotDistinctConfig, this.name); + } + }; + UniqueOnConstraintBuilder = class { + static { + __name(this, "UniqueOnConstraintBuilder"); + } + static [entityKind] = "PgUniqueOnConstraintBuilder"; + /** @internal */ + name; + constructor(name) { + this.name = name; + } + on(...columns) { + return new UniqueConstraintBuilder(columns, this.name); + } + }; + UniqueConstraint = class { + static { + __name(this, "UniqueConstraint"); + } + constructor(table3, columns, nullsNotDistinct, name) { + this.table = table3; + this.columns = columns; + this.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name)); + this.nullsNotDistinct = nullsNotDistinct; + } + static [entityKind] = "PgUniqueConstraint"; + columns; + name; + nullsNotDistinct = false; + getName() { + return this.name; + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/utils/array.js +function parsePgArrayValue(arrayString, startFrom, inQuotes) { + for (let i = startFrom; i < arrayString.length; i++) { + const char = arrayString[i]; + if (char === "\\") { + i++; + continue; + } + if (char === '"') { + return [arrayString.slice(startFrom, i).replace(/\\/g, ""), i + 1]; + } + if (inQuotes) { + continue; + } + if (char === "," || char === "}") { + return [arrayString.slice(startFrom, i).replace(/\\/g, ""), i]; + } + } + return [arrayString.slice(startFrom).replace(/\\/g, ""), arrayString.length]; +} +function parsePgNestedArray(arrayString, startFrom = 0) { + const result = []; + let i = startFrom; + let lastCharIsComma = false; + while (i < arrayString.length) { + const char = arrayString[i]; + if (char === ",") { + if (lastCharIsComma || i === startFrom) { + result.push(""); + } + lastCharIsComma = true; + i++; + continue; + } + lastCharIsComma = false; + if (char === "\\") { + i += 2; + continue; + } + if (char === '"') { + const [value2, startFrom2] = parsePgArrayValue(arrayString, i + 1, true); + result.push(value2); + i = startFrom2; + continue; + } + if (char === "}") { + return [result, i + 1]; + } + if (char === "{") { + const [value2, startFrom2] = parsePgNestedArray(arrayString, i + 1); + result.push(value2); + i = startFrom2; + continue; + } + const [value, newStartFrom] = parsePgArrayValue(arrayString, i, false); + result.push(value); + i = newStartFrom; + } + return [result, i]; +} +function parsePgArray(arrayString) { + const [result] = parsePgNestedArray(arrayString, 1); + return result; +} +function makePgArray(array2) { + return `{${array2.map((item) => { + if (Array.isArray(item)) { + return makePgArray(item); + } + if (typeof item === "string") { + return `"${item.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`; + } + return `${item}`; + }).join(",")}}`; +} +var init_array = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/utils/array.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(parsePgArrayValue, "parsePgArrayValue"); + __name(parsePgNestedArray, "parsePgNestedArray"); + __name(parsePgArray, "parsePgArray"); + __name(makePgArray, "makePgArray"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/columns/common.js +var PgColumnBuilder, PgColumn, ExtraConfigColumn, IndexedColumn, PgArrayBuilder, PgArray; +var init_common = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/columns/common.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column_builder(); + init_column(); + init_entity(); + init_foreign_keys(); + init_tracing_utils(); + init_unique_constraint(); + init_array(); + PgColumnBuilder = class extends ColumnBuilder { + static { + __name(this, "PgColumnBuilder"); + } + foreignKeyConfigs = []; + static [entityKind] = "PgColumnBuilder"; + array(size) { + return new PgArrayBuilder(this.config.name, this, size); + } + references(ref2, actions = {}) { + this.foreignKeyConfigs.push({ ref: ref2, actions }); + return this; + } + unique(name, config3) { + this.config.isUnique = true; + this.config.uniqueName = name; + this.config.uniqueType = config3?.nulls; + return this; + } + generatedAlwaysAs(as) { + this.config.generated = { + as, + type: "always", + mode: "stored" + }; + return this; + } + /** @internal */ + buildForeignKeys(column, table3) { + return this.foreignKeyConfigs.map(({ ref: ref2, actions }) => { + return iife( + (ref22, actions2) => { + const builder = new ForeignKeyBuilder(() => { + const foreignColumn = ref22(); + return { columns: [column], foreignColumns: [foreignColumn] }; + }); + if (actions2.onUpdate) { + builder.onUpdate(actions2.onUpdate); + } + if (actions2.onDelete) { + builder.onDelete(actions2.onDelete); + } + return builder.build(table3); + }, + ref2, + actions + ); + }); + } + /** @internal */ + buildExtraConfigColumn(table3) { + return new ExtraConfigColumn(table3, this.config); + } + }; + PgColumn = class extends Column { + static { + __name(this, "PgColumn"); + } + constructor(table3, config3) { + if (!config3.uniqueName) { + config3.uniqueName = uniqueKeyName(table3, [config3.name]); + } + super(table3, config3); + this.table = table3; + } + static [entityKind] = "PgColumn"; + }; + ExtraConfigColumn = class extends PgColumn { + static { + __name(this, "ExtraConfigColumn"); + } + static [entityKind] = "ExtraConfigColumn"; + getSQLType() { + return this.getSQLType(); + } + indexConfig = { + order: this.config.order ?? "asc", + nulls: this.config.nulls ?? "last", + opClass: this.config.opClass + }; + defaultConfig = { + order: "asc", + nulls: "last", + opClass: void 0 + }; + asc() { + this.indexConfig.order = "asc"; + return this; + } + desc() { + this.indexConfig.order = "desc"; + return this; + } + nullsFirst() { + this.indexConfig.nulls = "first"; + return this; + } + nullsLast() { + this.indexConfig.nulls = "last"; + return this; + } + /** + * ### PostgreSQL documentation quote + * + * > An operator class with optional parameters can be specified for each column of an index. + * The operator class identifies the operators to be used by the index for that column. + * For example, a B-tree index on four-byte integers would use the int4_ops class; + * this operator class includes comparison functions for four-byte integers. + * In practice the default operator class for the column's data type is usually sufficient. + * The main point of having operator classes is that for some data types, there could be more than one meaningful ordering. + * For example, we might want to sort a complex-number data type either by absolute value or by real part. + * We could do this by defining two operator classes for the data type and then selecting the proper class when creating an index. + * More information about operator classes check: + * + * ### Useful links + * https://www.postgresql.org/docs/current/sql-createindex.html + * + * https://www.postgresql.org/docs/current/indexes-opclass.html + * + * https://www.postgresql.org/docs/current/xindex.html + * + * ### Additional types + * If you have the `pg_vector` extension installed in your database, you can use the + * `vector_l2_ops`, `vector_ip_ops`, `vector_cosine_ops`, `vector_l1_ops`, `bit_hamming_ops`, `bit_jaccard_ops`, `halfvec_l2_ops`, `sparsevec_l2_ops` options, which are predefined types. + * + * **You can always specify any string you want in the operator class, in case Drizzle doesn't have it natively in its types** + * + * @param opClass + * @returns + */ + op(opClass) { + this.indexConfig.opClass = opClass; + return this; + } + }; + IndexedColumn = class { + static { + __name(this, "IndexedColumn"); + } + static [entityKind] = "IndexedColumn"; + constructor(name, keyAsName, type, indexConfig) { + this.name = name; + this.keyAsName = keyAsName; + this.type = type; + this.indexConfig = indexConfig; + } + name; + keyAsName; + type; + indexConfig; + }; + PgArrayBuilder = class extends PgColumnBuilder { + static { + __name(this, "PgArrayBuilder"); + } + static [entityKind] = "PgArrayBuilder"; + constructor(name, baseBuilder, size) { + super(name, "array", "PgArray"); + this.config.baseBuilder = baseBuilder; + this.config.size = size; + } + /** @internal */ + build(table3) { + const baseColumn = this.config.baseBuilder.build(table3); + return new PgArray( + table3, + this.config, + baseColumn + ); + } + }; + PgArray = class _PgArray extends PgColumn { + static { + __name(this, "PgArray"); + } + constructor(table3, config3, baseColumn, range) { + super(table3, config3); + this.baseColumn = baseColumn; + this.range = range; + this.size = config3.size; + } + size; + static [entityKind] = "PgArray"; + getSQLType() { + return `${this.baseColumn.getSQLType()}[${typeof this.size === "number" ? this.size : ""}]`; + } + mapFromDriverValue(value) { + if (typeof value === "string") { + value = parsePgArray(value); + } + return value.map((v2) => this.baseColumn.mapFromDriverValue(v2)); + } + mapToDriverValue(value, isNestedArray = false) { + const a = value.map( + (v2) => v2 === null ? null : is(this.baseColumn, _PgArray) ? this.baseColumn.mapToDriverValue(v2, true) : this.baseColumn.mapToDriverValue(v2) + ); + if (isNestedArray) return a; + return makePgArray(a); + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/columns/enum.js +function isPgEnum(obj) { + return !!obj && typeof obj === "function" && isPgEnumSym in obj && obj[isPgEnumSym] === true; +} +var PgEnumObjectColumnBuilder, PgEnumObjectColumn, isPgEnumSym, PgEnumColumnBuilder, PgEnumColumn; +var init_enum = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/columns/enum.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_common(); + PgEnumObjectColumnBuilder = class extends PgColumnBuilder { + static { + __name(this, "PgEnumObjectColumnBuilder"); + } + static [entityKind] = "PgEnumObjectColumnBuilder"; + constructor(name, enumInstance) { + super(name, "string", "PgEnumObjectColumn"); + this.config.enum = enumInstance; + } + /** @internal */ + build(table3) { + return new PgEnumObjectColumn( + table3, + this.config + ); + } + }; + PgEnumObjectColumn = class extends PgColumn { + static { + __name(this, "PgEnumObjectColumn"); + } + static [entityKind] = "PgEnumObjectColumn"; + enum; + enumValues = this.config.enum.enumValues; + constructor(table3, config3) { + super(table3, config3); + this.enum = config3.enum; + } + getSQLType() { + return this.enum.enumName; + } + }; + isPgEnumSym = /* @__PURE__ */ Symbol.for("drizzle:isPgEnum"); + __name(isPgEnum, "isPgEnum"); + PgEnumColumnBuilder = class extends PgColumnBuilder { + static { + __name(this, "PgEnumColumnBuilder"); + } + static [entityKind] = "PgEnumColumnBuilder"; + constructor(name, enumInstance) { + super(name, "string", "PgEnumColumn"); + this.config.enum = enumInstance; + } + /** @internal */ + build(table3) { + return new PgEnumColumn( + table3, + this.config + ); + } + }; + PgEnumColumn = class extends PgColumn { + static { + __name(this, "PgEnumColumn"); + } + static [entityKind] = "PgEnumColumn"; + enum = this.config.enum; + enumValues = this.config.enum.enumValues; + constructor(table3, config3) { + super(table3, config3); + this.enum = config3.enum; + } + getSQLType() { + return this.enum.enumName; + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/subquery.js +var Subquery, WithSubquery; +var init_subquery = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/subquery.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + Subquery = class { + static { + __name(this, "Subquery"); + } + static [entityKind] = "Subquery"; + constructor(sql2, fields, alias, isWith = false, usedTables = []) { + this._ = { + brand: "Subquery", + sql: sql2, + selectedFields: fields, + alias, + isWith, + usedTables + }; + } + // getSQL(): SQL { + // return new SQL([this]); + // } + }; + WithSubquery = class extends Subquery { + static { + __name(this, "WithSubquery"); + } + static [entityKind] = "WithSubquery"; + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/version.js +var version2; +var init_version = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/version.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + version2 = "0.44.7"; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/tracing.js +var otel, rawTracer, tracer; +var init_tracing = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/tracing.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tracing_utils(); + init_version(); + tracer = { + startActiveSpan(name, fn) { + if (!otel) { + return fn(); + } + if (!rawTracer) { + rawTracer = otel.trace.getTracer("drizzle-orm", version2); + } + return iife( + (otel2, rawTracer2) => rawTracer2.startActiveSpan( + name, + (span) => { + try { + return fn(span); + } catch (e) { + span.setStatus({ + code: otel2.SpanStatusCode.ERROR, + message: e instanceof Error ? e.message : "Unknown error" + // eslint-disable-line no-instanceof/no-instanceof + }); + throw e; + } finally { + span.end(); + } + } + ), + otel, + rawTracer + ); + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/view-common.js +var ViewBaseConfig; +var init_view_common = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/view-common.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ViewBaseConfig = /* @__PURE__ */ Symbol.for("drizzle:ViewBaseConfig"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/sql.js +function isSQLWrapper(value) { + return value !== null && value !== void 0 && typeof value.getSQL === "function"; +} +function mergeQueries(queries) { + const result = { sql: "", params: [] }; + for (const query of queries) { + result.sql += query.sql; + result.params.push(...query.params); + if (query.typings?.length) { + if (!result.typings) { + result.typings = []; + } + result.typings.push(...query.typings); + } + } + return result; +} +function isDriverValueEncoder(value) { + return typeof value === "object" && value !== null && "mapToDriverValue" in value && typeof value.mapToDriverValue === "function"; +} +function sql(strings2, ...params) { + const queryChunks = []; + if (params.length > 0 || strings2.length > 0 && strings2[0] !== "") { + queryChunks.push(new StringChunk(strings2[0])); + } + for (const [paramIndex, param2] of params.entries()) { + queryChunks.push(param2, new StringChunk(strings2[paramIndex + 1])); + } + return new SQL(queryChunks); +} +function fillPlaceholders(params, values) { + return params.map((p) => { + if (is(p, Placeholder)) { + if (!(p.name in values)) { + throw new Error(`No value for placeholder "${p.name}" was provided`); + } + return values[p.name]; + } + if (is(p, Param) && is(p.value, Placeholder)) { + if (!(p.value.name in values)) { + throw new Error(`No value for placeholder "${p.value.name}" was provided`); + } + return p.encoder.mapToDriverValue(values[p.value.name]); + } + return p; + }); +} +var FakePrimitiveParam, StringChunk, SQL, Name, noopDecoder, noopEncoder, noopMapper, Param, Placeholder, IsDrizzleView, View; +var init_sql = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/sql.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_enum(); + init_subquery(); + init_tracing(); + init_view_common(); + init_column(); + init_table(); + FakePrimitiveParam = class { + static { + __name(this, "FakePrimitiveParam"); + } + static [entityKind] = "FakePrimitiveParam"; + }; + __name(isSQLWrapper, "isSQLWrapper"); + __name(mergeQueries, "mergeQueries"); + StringChunk = class { + static { + __name(this, "StringChunk"); + } + static [entityKind] = "StringChunk"; + value; + constructor(value) { + this.value = Array.isArray(value) ? value : [value]; + } + getSQL() { + return new SQL([this]); + } + }; + SQL = class _SQL { + static { + __name(this, "SQL"); + } + constructor(queryChunks) { + this.queryChunks = queryChunks; + for (const chunk of queryChunks) { + if (is(chunk, Table)) { + const schemaName = chunk[Table.Symbol.Schema]; + this.usedTables.push( + schemaName === void 0 ? chunk[Table.Symbol.Name] : schemaName + "." + chunk[Table.Symbol.Name] + ); + } + } + } + static [entityKind] = "SQL"; + /** @internal */ + decoder = noopDecoder; + shouldInlineParams = false; + /** @internal */ + usedTables = []; + append(query) { + this.queryChunks.push(...query.queryChunks); + return this; + } + toQuery(config3) { + return tracer.startActiveSpan("drizzle.buildSQL", (span) => { + const query = this.buildQueryFromSourceParams(this.queryChunks, config3); + span?.setAttributes({ + "drizzle.query.text": query.sql, + "drizzle.query.params": JSON.stringify(query.params) + }); + return query; + }); + } + buildQueryFromSourceParams(chunks, _config) { + const config3 = Object.assign({}, _config, { + inlineParams: _config.inlineParams || this.shouldInlineParams, + paramStartIndex: _config.paramStartIndex || { value: 0 } + }); + const { + casing, + escapeName, + escapeParam, + prepareTyping, + inlineParams, + paramStartIndex + } = config3; + return mergeQueries(chunks.map((chunk) => { + if (is(chunk, StringChunk)) { + return { sql: chunk.value.join(""), params: [] }; + } + if (is(chunk, Name)) { + return { sql: escapeName(chunk.value), params: [] }; + } + if (chunk === void 0) { + return { sql: "", params: [] }; + } + if (Array.isArray(chunk)) { + const result = [new StringChunk("(")]; + for (const [i, p] of chunk.entries()) { + result.push(p); + if (i < chunk.length - 1) { + result.push(new StringChunk(", ")); + } + } + result.push(new StringChunk(")")); + return this.buildQueryFromSourceParams(result, config3); + } + if (is(chunk, _SQL)) { + return this.buildQueryFromSourceParams(chunk.queryChunks, { + ...config3, + inlineParams: inlineParams || chunk.shouldInlineParams + }); + } + if (is(chunk, Table)) { + const schemaName = chunk[Table.Symbol.Schema]; + const tableName = chunk[Table.Symbol.Name]; + return { + sql: schemaName === void 0 || chunk[IsAlias] ? escapeName(tableName) : escapeName(schemaName) + "." + escapeName(tableName), + params: [] + }; + } + if (is(chunk, Column)) { + const columnName = casing.getColumnCasing(chunk); + if (_config.invokeSource === "indexes") { + return { sql: escapeName(columnName), params: [] }; + } + const schemaName = chunk.table[Table.Symbol.Schema]; + return { + sql: chunk.table[IsAlias] || schemaName === void 0 ? escapeName(chunk.table[Table.Symbol.Name]) + "." + escapeName(columnName) : escapeName(schemaName) + "." + escapeName(chunk.table[Table.Symbol.Name]) + "." + escapeName(columnName), + params: [] + }; + } + if (is(chunk, View)) { + const schemaName = chunk[ViewBaseConfig].schema; + const viewName = chunk[ViewBaseConfig].name; + return { + sql: schemaName === void 0 || chunk[ViewBaseConfig].isAlias ? escapeName(viewName) : escapeName(schemaName) + "." + escapeName(viewName), + params: [] + }; + } + if (is(chunk, Param)) { + if (is(chunk.value, Placeholder)) { + return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] }; + } + const mappedValue = chunk.value === null ? null : chunk.encoder.mapToDriverValue(chunk.value); + if (is(mappedValue, _SQL)) { + return this.buildQueryFromSourceParams([mappedValue], config3); + } + if (inlineParams) { + return { sql: this.mapInlineParam(mappedValue, config3), params: [] }; + } + let typings = ["none"]; + if (prepareTyping) { + typings = [prepareTyping(chunk.encoder)]; + } + return { sql: escapeParam(paramStartIndex.value++, mappedValue), params: [mappedValue], typings }; + } + if (is(chunk, Placeholder)) { + return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] }; + } + if (is(chunk, _SQL.Aliased) && chunk.fieldAlias !== void 0) { + return { sql: escapeName(chunk.fieldAlias), params: [] }; + } + if (is(chunk, Subquery)) { + if (chunk._.isWith) { + return { sql: escapeName(chunk._.alias), params: [] }; + } + return this.buildQueryFromSourceParams([ + new StringChunk("("), + chunk._.sql, + new StringChunk(") "), + new Name(chunk._.alias) + ], config3); + } + if (isPgEnum(chunk)) { + if (chunk.schema) { + return { sql: escapeName(chunk.schema) + "." + escapeName(chunk.enumName), params: [] }; + } + return { sql: escapeName(chunk.enumName), params: [] }; + } + if (isSQLWrapper(chunk)) { + if (chunk.shouldOmitSQLParens?.()) { + return this.buildQueryFromSourceParams([chunk.getSQL()], config3); + } + return this.buildQueryFromSourceParams([ + new StringChunk("("), + chunk.getSQL(), + new StringChunk(")") + ], config3); + } + if (inlineParams) { + return { sql: this.mapInlineParam(chunk, config3), params: [] }; + } + return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] }; + })); + } + mapInlineParam(chunk, { escapeString }) { + if (chunk === null) { + return "null"; + } + if (typeof chunk === "number" || typeof chunk === "boolean") { + return chunk.toString(); + } + if (typeof chunk === "string") { + return escapeString(chunk); + } + if (typeof chunk === "object") { + const mappedValueAsString = chunk.toString(); + if (mappedValueAsString === "[object Object]") { + return escapeString(JSON.stringify(chunk)); + } + return escapeString(mappedValueAsString); + } + throw new Error("Unexpected param value: " + chunk); + } + getSQL() { + return this; + } + as(alias) { + if (alias === void 0) { + return this; + } + return new _SQL.Aliased(this, alias); + } + mapWith(decoder3) { + this.decoder = typeof decoder3 === "function" ? { mapFromDriverValue: decoder3 } : decoder3; + return this; + } + inlineParams() { + this.shouldInlineParams = true; + return this; + } + /** + * This method is used to conditionally include a part of the query. + * + * @param condition - Condition to check + * @returns itself if the condition is `true`, otherwise `undefined` + */ + if(condition) { + return condition ? this : void 0; + } + }; + Name = class { + static { + __name(this, "Name"); + } + constructor(value) { + this.value = value; + } + static [entityKind] = "Name"; + brand; + getSQL() { + return new SQL([this]); + } + }; + __name(isDriverValueEncoder, "isDriverValueEncoder"); + noopDecoder = { + mapFromDriverValue: /* @__PURE__ */ __name((value) => value, "mapFromDriverValue") + }; + noopEncoder = { + mapToDriverValue: /* @__PURE__ */ __name((value) => value, "mapToDriverValue") + }; + noopMapper = { + ...noopDecoder, + ...noopEncoder + }; + Param = class { + static { + __name(this, "Param"); + } + /** + * @param value - Parameter value + * @param encoder - Encoder to convert the value to a driver parameter + */ + constructor(value, encoder2 = noopEncoder) { + this.value = value; + this.encoder = encoder2; + } + static [entityKind] = "Param"; + brand; + getSQL() { + return new SQL([this]); + } + }; + __name(sql, "sql"); + ((sql2) => { + function empty() { + return new SQL([]); + } + __name(empty, "empty"); + sql2.empty = empty; + function fromList(list) { + return new SQL(list); + } + __name(fromList, "fromList"); + sql2.fromList = fromList; + function raw2(str) { + return new SQL([new StringChunk(str)]); + } + __name(raw2, "raw"); + sql2.raw = raw2; + function join3(chunks, separator) { + const result = []; + for (const [i, chunk] of chunks.entries()) { + if (i > 0 && separator !== void 0) { + result.push(separator); + } + result.push(chunk); + } + return new SQL(result); + } + __name(join3, "join"); + sql2.join = join3; + function identifier(value) { + return new Name(value); + } + __name(identifier, "identifier"); + sql2.identifier = identifier; + function placeholder2(name2) { + return new Placeholder(name2); + } + __name(placeholder2, "placeholder2"); + sql2.placeholder = placeholder2; + function param2(value, encoder2) { + return new Param(value, encoder2); + } + __name(param2, "param2"); + sql2.param = param2; + })(sql || (sql = {})); + ((SQL22) => { + class Aliased { + static { + __name(this, "Aliased"); + } + constructor(sql2, fieldAlias) { + this.sql = sql2; + this.fieldAlias = fieldAlias; + } + static [entityKind] = "SQL.Aliased"; + /** @internal */ + isSelectionField = false; + getSQL() { + return this.sql; + } + /** @internal */ + clone() { + return new Aliased(this.sql, this.fieldAlias); + } + } + SQL22.Aliased = Aliased; + })(SQL || (SQL = {})); + Placeholder = class { + static { + __name(this, "Placeholder"); + } + constructor(name2) { + this.name = name2; + } + static [entityKind] = "Placeholder"; + getSQL() { + return new SQL([this]); + } + }; + __name(fillPlaceholders, "fillPlaceholders"); + IsDrizzleView = /* @__PURE__ */ Symbol.for("drizzle:IsDrizzleView"); + View = class { + static { + __name(this, "View"); + } + static [entityKind] = "View"; + /** @internal */ + [ViewBaseConfig]; + /** @internal */ + [IsDrizzleView] = true; + constructor({ name: name2, schema, selectedFields, query }) { + this[ViewBaseConfig] = { + name: name2, + originalName: name2, + schema, + selectedFields, + query, + isExisting: !query, + isAlias: false + }; + } + getSQL() { + return new SQL([this]); + } + }; + Column.prototype.getSQL = function() { + return new SQL([this]); + }; + Table.prototype.getSQL = function() { + return new SQL([this]); + }; + Subquery.prototype.getSQL = function() { + return new SQL([this]); + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/utils.js +function mapResultRow(columns, row, joinsNotNullableMap) { + const nullifyMap = {}; + const result = columns.reduce( + (result2, { path: path3, field }, columnIndex) => { + let decoder3; + if (is(field, Column)) { + decoder3 = field; + } else if (is(field, SQL)) { + decoder3 = field.decoder; + } else { + decoder3 = field.sql.decoder; + } + let node = result2; + for (const [pathChunkIndex, pathChunk] of path3.entries()) { + if (pathChunkIndex < path3.length - 1) { + if (!(pathChunk in node)) { + node[pathChunk] = {}; + } + node = node[pathChunk]; + } else { + const rawValue = row[columnIndex]; + const value = node[pathChunk] = rawValue === null ? null : decoder3.mapFromDriverValue(rawValue); + if (joinsNotNullableMap && is(field, Column) && path3.length === 2) { + const objectName = path3[0]; + if (!(objectName in nullifyMap)) { + nullifyMap[objectName] = value === null ? getTableName(field.table) : false; + } else if (typeof nullifyMap[objectName] === "string" && nullifyMap[objectName] !== getTableName(field.table)) { + nullifyMap[objectName] = false; + } + } + } + } + return result2; + }, + {} + ); + if (joinsNotNullableMap && Object.keys(nullifyMap).length > 0) { + for (const [objectName, tableName] of Object.entries(nullifyMap)) { + if (typeof tableName === "string" && !joinsNotNullableMap[tableName]) { + result[objectName] = null; + } + } + } + return result; +} +function orderSelectedFields(fields, pathPrefix) { + return Object.entries(fields).reduce((result, [name, field]) => { + if (typeof name !== "string") { + return result; + } + const newPath = pathPrefix ? [...pathPrefix, name] : [name]; + if (is(field, Column) || is(field, SQL) || is(field, SQL.Aliased)) { + result.push({ path: newPath, field }); + } else if (is(field, Table)) { + result.push(...orderSelectedFields(field[Table.Symbol.Columns], newPath)); + } else { + result.push(...orderSelectedFields(field, newPath)); + } + return result; + }, []); +} +function haveSameKeys(left, right) { + const leftKeys = Object.keys(left); + const rightKeys = Object.keys(right); + if (leftKeys.length !== rightKeys.length) { + return false; + } + for (const [index, key] of leftKeys.entries()) { + if (key !== rightKeys[index]) { + return false; + } + } + return true; +} +function mapUpdateSet(table3, values) { + const entries = Object.entries(values).filter(([, value]) => value !== void 0).map(([key, value]) => { + if (is(value, SQL) || is(value, Column)) { + return [key, value]; + } else { + return [key, new Param(value, table3[Table.Symbol.Columns][key])]; + } + }); + if (entries.length === 0) { + throw new Error("No values to set"); + } + return Object.fromEntries(entries); +} +function applyMixins(baseClass, extendedClasses) { + for (const extendedClass of extendedClasses) { + for (const name of Object.getOwnPropertyNames(extendedClass.prototype)) { + if (name === "constructor") continue; + Object.defineProperty( + baseClass.prototype, + name, + Object.getOwnPropertyDescriptor(extendedClass.prototype, name) || /* @__PURE__ */ Object.create(null) + ); + } + } +} +function getTableColumns(table3) { + return table3[Table.Symbol.Columns]; +} +function getTableLikeName(table3) { + return is(table3, Subquery) ? table3._.alias : is(table3, View) ? table3[ViewBaseConfig].name : is(table3, SQL) ? void 0 : table3[Table.Symbol.IsAlias] ? table3[Table.Symbol.Name] : table3[Table.Symbol.BaseName]; +} +function getColumnNameAndConfig(a, b) { + return { + name: typeof a === "string" && a.length > 0 ? a : "", + config: typeof a === "object" ? a : b + }; +} +var textDecoder; +var init_utils2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/utils.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column(); + init_entity(); + init_sql(); + init_subquery(); + init_table(); + init_view_common(); + __name(mapResultRow, "mapResultRow"); + __name(orderSelectedFields, "orderSelectedFields"); + __name(haveSameKeys, "haveSameKeys"); + __name(mapUpdateSet, "mapUpdateSet"); + __name(applyMixins, "applyMixins"); + __name(getTableColumns, "getTableColumns"); + __name(getTableLikeName, "getTableLikeName"); + __name(getColumnNameAndConfig, "getColumnNameAndConfig"); + textDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/table.js +var InlineForeignKeys, EnableRLS, PgTable; +var init_table2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/table.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table(); + InlineForeignKeys = /* @__PURE__ */ Symbol.for("drizzle:PgInlineForeignKeys"); + EnableRLS = /* @__PURE__ */ Symbol.for("drizzle:EnableRLS"); + PgTable = class extends Table { + static { + __name(this, "PgTable"); + } + static [entityKind] = "PgTable"; + /** @internal */ + static Symbol = Object.assign({}, Table.Symbol, { + InlineForeignKeys, + EnableRLS + }); + /**@internal */ + [InlineForeignKeys] = []; + /** @internal */ + [EnableRLS] = false; + /** @internal */ + [Table.Symbol.ExtraConfigBuilder] = void 0; + /** @internal */ + [Table.Symbol.ExtraConfigColumns] = {}; + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/primary-keys.js +var PrimaryKeyBuilder, PrimaryKey; +var init_primary_keys = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/primary-keys.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table2(); + PrimaryKeyBuilder = class { + static { + __name(this, "PrimaryKeyBuilder"); + } + static [entityKind] = "PgPrimaryKeyBuilder"; + /** @internal */ + columns; + /** @internal */ + name; + constructor(columns, name) { + this.columns = columns; + this.name = name; + } + /** @internal */ + build(table3) { + return new PrimaryKey(table3, this.columns, this.name); + } + }; + PrimaryKey = class { + static { + __name(this, "PrimaryKey"); + } + constructor(table3, columns, name) { + this.table = table3; + this.columns = columns; + this.name = name; + } + static [entityKind] = "PgPrimaryKey"; + columns; + name; + getName() { + return this.name ?? `${this.table[PgTable.Symbol.Name]}_${this.columns.map((column) => column.name).join("_")}_pk`; + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/conditions.js +function bindIfParam(value, column) { + if (isDriverValueEncoder(column) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column) && !is(value, Table) && !is(value, View)) { + return new Param(value, column); + } + return value; +} +function and(...unfilteredConditions) { + const conditions = unfilteredConditions.filter( + (c) => c !== void 0 + ); + if (conditions.length === 0) { + return void 0; + } + if (conditions.length === 1) { + return new SQL(conditions); + } + return new SQL([ + new StringChunk("("), + sql.join(conditions, new StringChunk(" and ")), + new StringChunk(")") + ]); +} +function or(...unfilteredConditions) { + const conditions = unfilteredConditions.filter( + (c) => c !== void 0 + ); + if (conditions.length === 0) { + return void 0; + } + if (conditions.length === 1) { + return new SQL(conditions); + } + return new SQL([ + new StringChunk("("), + sql.join(conditions, new StringChunk(" or ")), + new StringChunk(")") + ]); +} +function not(condition) { + return sql`not ${condition}`; +} +function inArray(column, values) { + if (Array.isArray(values)) { + if (values.length === 0) { + return sql`false`; + } + return sql`${column} in ${values.map((v2) => bindIfParam(v2, column))}`; + } + return sql`${column} in ${bindIfParam(values, column)}`; +} +function notInArray(column, values) { + if (Array.isArray(values)) { + if (values.length === 0) { + return sql`true`; + } + return sql`${column} not in ${values.map((v2) => bindIfParam(v2, column))}`; + } + return sql`${column} not in ${bindIfParam(values, column)}`; +} +function isNull(value) { + return sql`${value} is null`; +} +function isNotNull(value) { + return sql`${value} is not null`; +} +function exists(subquery) { + return sql`exists ${subquery}`; +} +function notExists(subquery) { + return sql`not exists ${subquery}`; +} +function between(column, min, max2) { + return sql`${column} between ${bindIfParam(min, column)} and ${bindIfParam( + max2, + column + )}`; +} +function notBetween(column, min, max2) { + return sql`${column} not between ${bindIfParam( + min, + column + )} and ${bindIfParam(max2, column)}`; +} +function like(column, value) { + return sql`${column} like ${value}`; +} +function notLike(column, value) { + return sql`${column} not like ${value}`; +} +function ilike(column, value) { + return sql`${column} ilike ${value}`; +} +function notIlike(column, value) { + return sql`${column} not ilike ${value}`; +} +var eq, ne, gt, gte, lt, lte; +var init_conditions = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/conditions.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column(); + init_entity(); + init_table(); + init_sql(); + __name(bindIfParam, "bindIfParam"); + eq = /* @__PURE__ */ __name((left, right) => { + return sql`${left} = ${bindIfParam(right, left)}`; + }, "eq"); + ne = /* @__PURE__ */ __name((left, right) => { + return sql`${left} <> ${bindIfParam(right, left)}`; + }, "ne"); + __name(and, "and"); + __name(or, "or"); + __name(not, "not"); + gt = /* @__PURE__ */ __name((left, right) => { + return sql`${left} > ${bindIfParam(right, left)}`; + }, "gt"); + gte = /* @__PURE__ */ __name((left, right) => { + return sql`${left} >= ${bindIfParam(right, left)}`; + }, "gte"); + lt = /* @__PURE__ */ __name((left, right) => { + return sql`${left} < ${bindIfParam(right, left)}`; + }, "lt"); + lte = /* @__PURE__ */ __name((left, right) => { + return sql`${left} <= ${bindIfParam(right, left)}`; + }, "lte"); + __name(inArray, "inArray"); + __name(notInArray, "notInArray"); + __name(isNull, "isNull"); + __name(isNotNull, "isNotNull"); + __name(exists, "exists"); + __name(notExists, "notExists"); + __name(between, "between"); + __name(notBetween, "notBetween"); + __name(like, "like"); + __name(notLike, "notLike"); + __name(ilike, "ilike"); + __name(notIlike, "notIlike"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/select.js +function asc(column) { + return sql`${column} asc`; +} +function desc(column) { + return sql`${column} desc`; +} +var init_select = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/select.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sql(); + __name(asc, "asc"); + __name(desc, "desc"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/index.js +var init_expressions = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/index.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_conditions(); + init_select(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/relations.js +function getOperators() { + return { + and, + between, + eq, + exists, + gt, + gte, + ilike, + inArray, + isNull, + isNotNull, + like, + lt, + lte, + ne, + not, + notBetween, + notExists, + notLike, + notIlike, + notInArray, + or, + sql + }; +} +function getOrderByOperators() { + return { + sql, + asc, + desc + }; +} +function extractTablesRelationalConfig(schema, configHelpers) { + if (Object.keys(schema).length === 1 && "default" in schema && !is(schema["default"], Table)) { + schema = schema["default"]; + } + const tableNamesMap = {}; + const relationsBuffer = {}; + const tablesConfig = {}; + for (const [key, value] of Object.entries(schema)) { + if (is(value, Table)) { + const dbName = getTableUniqueName(value); + const bufferedRelations = relationsBuffer[dbName]; + tableNamesMap[dbName] = key; + tablesConfig[key] = { + tsName: key, + dbName: value[Table.Symbol.Name], + schema: value[Table.Symbol.Schema], + columns: value[Table.Symbol.Columns], + relations: bufferedRelations?.relations ?? {}, + primaryKey: bufferedRelations?.primaryKey ?? [] + }; + for (const column of Object.values( + value[Table.Symbol.Columns] + )) { + if (column.primary) { + tablesConfig[key].primaryKey.push(column); + } + } + const extraConfig = value[Table.Symbol.ExtraConfigBuilder]?.(value[Table.Symbol.ExtraConfigColumns]); + if (extraConfig) { + for (const configEntry of Object.values(extraConfig)) { + if (is(configEntry, PrimaryKeyBuilder)) { + tablesConfig[key].primaryKey.push(...configEntry.columns); + } + } + } + } else if (is(value, Relations)) { + const dbName = getTableUniqueName(value.table); + const tableName = tableNamesMap[dbName]; + const relations2 = value.config( + configHelpers(value.table) + ); + let primaryKey2; + for (const [relationName, relation] of Object.entries(relations2)) { + if (tableName) { + const tableConfig = tablesConfig[tableName]; + tableConfig.relations[relationName] = relation; + if (primaryKey2) { + tableConfig.primaryKey.push(...primaryKey2); + } + } else { + if (!(dbName in relationsBuffer)) { + relationsBuffer[dbName] = { + relations: {}, + primaryKey: primaryKey2 + }; + } + relationsBuffer[dbName].relations[relationName] = relation; + } + } + } + } + return { tables: tablesConfig, tableNamesMap }; +} +function relations(table3, relations2) { + return new Relations( + table3, + (helpers) => Object.fromEntries( + Object.entries(relations2(helpers)).map(([key, value]) => [ + key, + value.withFieldName(key) + ]) + ) + ); +} +function createOne(sourceTable) { + return /* @__PURE__ */ __name(function one(table3, config3) { + return new One( + sourceTable, + table3, + config3, + config3?.fields.reduce((res, f) => res && f.notNull, true) ?? false + ); + }, "one"); +} +function createMany(sourceTable) { + return /* @__PURE__ */ __name(function many(referencedTable, config3) { + return new Many(sourceTable, referencedTable, config3); + }, "many"); +} +function normalizeRelation(schema, tableNamesMap, relation) { + if (is(relation, One) && relation.config) { + return { + fields: relation.config.fields, + references: relation.config.references + }; + } + const referencedTableTsName = tableNamesMap[getTableUniqueName(relation.referencedTable)]; + if (!referencedTableTsName) { + throw new Error( + `Table "${relation.referencedTable[Table.Symbol.Name]}" not found in schema` + ); + } + const referencedTableConfig = schema[referencedTableTsName]; + if (!referencedTableConfig) { + throw new Error(`Table "${referencedTableTsName}" not found in schema`); + } + const sourceTable = relation.sourceTable; + const sourceTableTsName = tableNamesMap[getTableUniqueName(sourceTable)]; + if (!sourceTableTsName) { + throw new Error( + `Table "${sourceTable[Table.Symbol.Name]}" not found in schema` + ); + } + const reverseRelations = []; + for (const referencedTableRelation of Object.values( + referencedTableConfig.relations + )) { + if (relation.relationName && relation !== referencedTableRelation && referencedTableRelation.relationName === relation.relationName || !relation.relationName && referencedTableRelation.referencedTable === relation.sourceTable) { + reverseRelations.push(referencedTableRelation); + } + } + if (reverseRelations.length > 1) { + throw relation.relationName ? new Error( + `There are multiple relations with name "${relation.relationName}" in table "${referencedTableTsName}"` + ) : new Error( + `There are multiple relations between "${referencedTableTsName}" and "${relation.sourceTable[Table.Symbol.Name]}". Please specify relation name` + ); + } + if (reverseRelations[0] && is(reverseRelations[0], One) && reverseRelations[0].config) { + return { + fields: reverseRelations[0].config.references, + references: reverseRelations[0].config.fields + }; + } + throw new Error( + `There is not enough information to infer relation "${sourceTableTsName}.${relation.fieldName}"` + ); +} +function createTableRelationsHelpers(sourceTable) { + return { + one: createOne(sourceTable), + many: createMany(sourceTable) + }; +} +function mapRelationalRow(tablesConfig, tableConfig, row, buildQueryResultSelection, mapColumnValue = (value) => value) { + const result = {}; + for (const [ + selectionItemIndex, + selectionItem + ] of buildQueryResultSelection.entries()) { + if (selectionItem.isJson) { + const relation = tableConfig.relations[selectionItem.tsKey]; + const rawSubRows = row[selectionItemIndex]; + const subRows = typeof rawSubRows === "string" ? JSON.parse(rawSubRows) : rawSubRows; + result[selectionItem.tsKey] = is(relation, One) ? subRows && mapRelationalRow( + tablesConfig, + tablesConfig[selectionItem.relationTableTsKey], + subRows, + selectionItem.selection, + mapColumnValue + ) : subRows.map( + (subRow) => mapRelationalRow( + tablesConfig, + tablesConfig[selectionItem.relationTableTsKey], + subRow, + selectionItem.selection, + mapColumnValue + ) + ); + } else { + const value = mapColumnValue(row[selectionItemIndex]); + const field = selectionItem.field; + let decoder3; + if (is(field, Column)) { + decoder3 = field; + } else if (is(field, SQL)) { + decoder3 = field.decoder; + } else { + decoder3 = field.sql.decoder; + } + result[selectionItem.tsKey] = value === null ? null : decoder3.mapFromDriverValue(value); + } + } + return result; +} +var Relation, Relations, One, Many; +var init_relations = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/relations.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_table(); + init_column(); + init_entity(); + init_primary_keys(); + init_expressions(); + init_sql(); + Relation = class { + static { + __name(this, "Relation"); + } + constructor(sourceTable, referencedTable, relationName) { + this.sourceTable = sourceTable; + this.referencedTable = referencedTable; + this.relationName = relationName; + this.referencedTableName = referencedTable[Table.Symbol.Name]; + } + static [entityKind] = "Relation"; + referencedTableName; + fieldName; + }; + Relations = class { + static { + __name(this, "Relations"); + } + constructor(table3, config3) { + this.table = table3; + this.config = config3; + } + static [entityKind] = "Relations"; + }; + One = class _One extends Relation { + static { + __name(this, "One"); + } + constructor(sourceTable, referencedTable, config3, isNullable) { + super(sourceTable, referencedTable, config3?.relationName); + this.config = config3; + this.isNullable = isNullable; + } + static [entityKind] = "One"; + withFieldName(fieldName) { + const relation = new _One( + this.sourceTable, + this.referencedTable, + this.config, + this.isNullable + ); + relation.fieldName = fieldName; + return relation; + } + }; + Many = class _Many extends Relation { + static { + __name(this, "Many"); + } + constructor(sourceTable, referencedTable, config3) { + super(sourceTable, referencedTable, config3?.relationName); + this.config = config3; + } + static [entityKind] = "Many"; + withFieldName(fieldName) { + const relation = new _Many( + this.sourceTable, + this.referencedTable, + this.config + ); + relation.fieldName = fieldName; + return relation; + } + }; + __name(getOperators, "getOperators"); + __name(getOrderByOperators, "getOrderByOperators"); + __name(extractTablesRelationalConfig, "extractTablesRelationalConfig"); + __name(relations, "relations"); + __name(createOne, "createOne"); + __name(createMany, "createMany"); + __name(normalizeRelation, "normalizeRelation"); + __name(createTableRelationsHelpers, "createTableRelationsHelpers"); + __name(mapRelationalRow, "mapRelationalRow"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/alias.js +function aliasedTable(table3, tableAlias) { + return new Proxy(table3, new TableAliasProxyHandler(tableAlias, false)); +} +function aliasedTableColumn(column, tableAlias) { + return new Proxy( + column, + new ColumnAliasProxyHandler(new Proxy(column.table, new TableAliasProxyHandler(tableAlias, false))) + ); +} +function mapColumnsInAliasedSQLToAlias(query, alias) { + return new SQL.Aliased(mapColumnsInSQLToAlias(query.sql, alias), query.fieldAlias); +} +function mapColumnsInSQLToAlias(query, alias) { + return sql.join(query.queryChunks.map((c) => { + if (is(c, Column)) { + return aliasedTableColumn(c, alias); + } + if (is(c, SQL)) { + return mapColumnsInSQLToAlias(c, alias); + } + if (is(c, SQL.Aliased)) { + return mapColumnsInAliasedSQLToAlias(c, alias); + } + return c; + })); +} +var ColumnAliasProxyHandler, TableAliasProxyHandler, RelationTableAliasProxyHandler; +var init_alias = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/alias.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column(); + init_entity(); + init_sql(); + init_table(); + init_view_common(); + ColumnAliasProxyHandler = class { + static { + __name(this, "ColumnAliasProxyHandler"); + } + constructor(table3) { + this.table = table3; + } + static [entityKind] = "ColumnAliasProxyHandler"; + get(columnObj, prop) { + if (prop === "table") { + return this.table; + } + return columnObj[prop]; + } + }; + TableAliasProxyHandler = class { + static { + __name(this, "TableAliasProxyHandler"); + } + constructor(alias, replaceOriginalName) { + this.alias = alias; + this.replaceOriginalName = replaceOriginalName; + } + static [entityKind] = "TableAliasProxyHandler"; + get(target2, prop) { + if (prop === Table.Symbol.IsAlias) { + return true; + } + if (prop === Table.Symbol.Name) { + return this.alias; + } + if (this.replaceOriginalName && prop === Table.Symbol.OriginalName) { + return this.alias; + } + if (prop === ViewBaseConfig) { + return { + ...target2[ViewBaseConfig], + name: this.alias, + isAlias: true + }; + } + if (prop === Table.Symbol.Columns) { + const columns = target2[Table.Symbol.Columns]; + if (!columns) { + return columns; + } + const proxiedColumns = {}; + Object.keys(columns).map((key) => { + proxiedColumns[key] = new Proxy( + columns[key], + new ColumnAliasProxyHandler(new Proxy(target2, this)) + ); + }); + return proxiedColumns; + } + const value = target2[prop]; + if (is(value, Column)) { + return new Proxy(value, new ColumnAliasProxyHandler(new Proxy(target2, this))); + } + return value; + } + }; + RelationTableAliasProxyHandler = class { + static { + __name(this, "RelationTableAliasProxyHandler"); + } + constructor(alias) { + this.alias = alias; + } + static [entityKind] = "RelationTableAliasProxyHandler"; + get(target2, prop) { + if (prop === "sourceTable") { + return aliasedTable(target2.sourceTable, this.alias); + } + return target2[prop]; + } + }; + __name(aliasedTable, "aliasedTable"); + __name(aliasedTableColumn, "aliasedTableColumn"); + __name(mapColumnsInAliasedSQLToAlias, "mapColumnsInAliasedSQLToAlias"); + __name(mapColumnsInSQLToAlias, "mapColumnsInSQLToAlias"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/selection-proxy.js +var SelectionProxyHandler; +var init_selection_proxy = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/selection-proxy.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_alias(); + init_column(); + init_entity(); + init_sql(); + init_subquery(); + init_view_common(); + SelectionProxyHandler = class _SelectionProxyHandler { + static { + __name(this, "SelectionProxyHandler"); + } + static [entityKind] = "SelectionProxyHandler"; + config; + constructor(config3) { + this.config = { ...config3 }; + } + get(subquery, prop) { + if (prop === "_") { + return { + ...subquery["_"], + selectedFields: new Proxy( + subquery._.selectedFields, + this + ) + }; + } + if (prop === ViewBaseConfig) { + return { + ...subquery[ViewBaseConfig], + selectedFields: new Proxy( + subquery[ViewBaseConfig].selectedFields, + this + ) + }; + } + if (typeof prop === "symbol") { + return subquery[prop]; + } + const columns = is(subquery, Subquery) ? subquery._.selectedFields : is(subquery, View) ? subquery[ViewBaseConfig].selectedFields : subquery; + const value = columns[prop]; + if (is(value, SQL.Aliased)) { + if (this.config.sqlAliasedBehavior === "sql" && !value.isSelectionField) { + return value.sql; + } + const newValue = value.clone(); + newValue.isSelectionField = true; + return newValue; + } + if (is(value, SQL)) { + if (this.config.sqlBehavior === "sql") { + return value; + } + throw new Error( + `You tried to reference "${prop}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.` + ); + } + if (is(value, Column)) { + if (this.config.alias) { + return new Proxy( + value, + new ColumnAliasProxyHandler( + new Proxy( + value.table, + new TableAliasProxyHandler(this.config.alias, this.config.replaceOriginalName ?? false) + ) + ) + ); + } + return value; + } + if (typeof value !== "object" || value === null) { + return value; + } + return new Proxy(value, new _SelectionProxyHandler(this.config)); + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/query-promise.js +var QueryPromise; +var init_query_promise = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/query-promise.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + QueryPromise = class { + static { + __name(this, "QueryPromise"); + } + static [entityKind] = "QueryPromise"; + [Symbol.toStringTag] = "QueryPromise"; + catch(onRejected) { + return this.then(void 0, onRejected); + } + finally(onFinally) { + return this.then( + (value) => { + onFinally?.(); + return value; + }, + (reason) => { + onFinally?.(); + throw reason; + } + ); + } + then(onFulfilled, onRejected) { + return this.execute().then(onFulfilled, onRejected); + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/foreign-keys.js +var ForeignKeyBuilder2, ForeignKey2; +var init_foreign_keys2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/foreign-keys.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + ForeignKeyBuilder2 = class { + static { + __name(this, "ForeignKeyBuilder"); + } + static [entityKind] = "SQLiteForeignKeyBuilder"; + /** @internal */ + reference; + /** @internal */ + _onUpdate; + /** @internal */ + _onDelete; + constructor(config3, actions) { + this.reference = () => { + const { name, columns, foreignColumns } = config3(); + return { name, columns, foreignTable: foreignColumns[0].table, foreignColumns }; + }; + if (actions) { + this._onUpdate = actions.onUpdate; + this._onDelete = actions.onDelete; + } + } + onUpdate(action) { + this._onUpdate = action; + return this; + } + onDelete(action) { + this._onDelete = action; + return this; + } + /** @internal */ + build(table3) { + return new ForeignKey2(table3, this); + } + }; + ForeignKey2 = class { + static { + __name(this, "ForeignKey"); + } + constructor(table3, builder) { + this.table = table3; + this.reference = builder.reference; + this.onUpdate = builder._onUpdate; + this.onDelete = builder._onDelete; + } + static [entityKind] = "SQLiteForeignKey"; + reference; + onUpdate; + onDelete; + getName() { + const { name, columns, foreignColumns } = this.reference(); + const columnNames = columns.map((column) => column.name); + const foreignColumnNames = foreignColumns.map((column) => column.name); + const chunks = [ + this.table[TableName], + ...columnNames, + foreignColumns[0].table[TableName], + ...foreignColumnNames + ]; + return name ?? `${chunks.join("_")}_fk`; + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/unique-constraint.js +function uniqueKeyName2(table3, columns) { + return `${table3[TableName]}_${columns.join("_")}_unique`; +} +var UniqueConstraintBuilder2, UniqueOnConstraintBuilder2, UniqueConstraint2; +var init_unique_constraint2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/unique-constraint.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + __name(uniqueKeyName2, "uniqueKeyName"); + UniqueConstraintBuilder2 = class { + static { + __name(this, "UniqueConstraintBuilder"); + } + constructor(columns, name) { + this.name = name; + this.columns = columns; + } + static [entityKind] = "SQLiteUniqueConstraintBuilder"; + /** @internal */ + columns; + /** @internal */ + build(table3) { + return new UniqueConstraint2(table3, this.columns, this.name); + } + }; + UniqueOnConstraintBuilder2 = class { + static { + __name(this, "UniqueOnConstraintBuilder"); + } + static [entityKind] = "SQLiteUniqueOnConstraintBuilder"; + /** @internal */ + name; + constructor(name) { + this.name = name; + } + on(...columns) { + return new UniqueConstraintBuilder2(columns, this.name); + } + }; + UniqueConstraint2 = class { + static { + __name(this, "UniqueConstraint"); + } + constructor(table3, columns, name) { + this.table = table3; + this.columns = columns; + this.name = name ?? uniqueKeyName2(this.table, this.columns.map((column) => column.name)); + } + static [entityKind] = "SQLiteUniqueConstraint"; + columns; + name; + getName() { + return this.name; + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/common.js +var SQLiteColumnBuilder, SQLiteColumn; +var init_common2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/common.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column_builder(); + init_column(); + init_entity(); + init_foreign_keys2(); + init_unique_constraint2(); + SQLiteColumnBuilder = class extends ColumnBuilder { + static { + __name(this, "SQLiteColumnBuilder"); + } + static [entityKind] = "SQLiteColumnBuilder"; + foreignKeyConfigs = []; + references(ref2, actions = {}) { + this.foreignKeyConfigs.push({ ref: ref2, actions }); + return this; + } + unique(name) { + this.config.isUnique = true; + this.config.uniqueName = name; + return this; + } + generatedAlwaysAs(as, config3) { + this.config.generated = { + as, + type: "always", + mode: config3?.mode ?? "virtual" + }; + return this; + } + /** @internal */ + buildForeignKeys(column, table3) { + return this.foreignKeyConfigs.map(({ ref: ref2, actions }) => { + return ((ref22, actions2) => { + const builder = new ForeignKeyBuilder2(() => { + const foreignColumn = ref22(); + return { columns: [column], foreignColumns: [foreignColumn] }; + }); + if (actions2.onUpdate) { + builder.onUpdate(actions2.onUpdate); + } + if (actions2.onDelete) { + builder.onDelete(actions2.onDelete); + } + return builder.build(table3); + })(ref2, actions); + }); + } + }; + SQLiteColumn = class extends Column { + static { + __name(this, "SQLiteColumn"); + } + constructor(table3, config3) { + if (!config3.uniqueName) { + config3.uniqueName = uniqueKeyName2(table3, [config3.name]); + } + super(table3, config3); + this.table = table3; + } + static [entityKind] = "SQLiteColumn"; + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/blob.js +function blob(a, b) { + const { name, config: config3 } = getColumnNameAndConfig(a, b); + if (config3?.mode === "json") { + return new SQLiteBlobJsonBuilder(name); + } + if (config3?.mode === "bigint") { + return new SQLiteBigIntBuilder(name); + } + return new SQLiteBlobBufferBuilder(name); +} +var SQLiteBigIntBuilder, SQLiteBigInt, SQLiteBlobJsonBuilder, SQLiteBlobJson, SQLiteBlobBufferBuilder, SQLiteBlobBuffer; +var init_blob = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/blob.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_utils2(); + init_common2(); + SQLiteBigIntBuilder = class extends SQLiteColumnBuilder { + static { + __name(this, "SQLiteBigIntBuilder"); + } + static [entityKind] = "SQLiteBigIntBuilder"; + constructor(name) { + super(name, "bigint", "SQLiteBigInt"); + } + /** @internal */ + build(table3) { + return new SQLiteBigInt(table3, this.config); + } + }; + SQLiteBigInt = class extends SQLiteColumn { + static { + __name(this, "SQLiteBigInt"); + } + static [entityKind] = "SQLiteBigInt"; + getSQLType() { + return "blob"; + } + mapFromDriverValue(value) { + if (typeof Buffer !== "undefined" && Buffer.from) { + const buf = Buffer.isBuffer(value) ? value : value instanceof ArrayBuffer ? Buffer.from(value) : value.buffer ? Buffer.from(value.buffer, value.byteOffset, value.byteLength) : Buffer.from(value); + return BigInt(buf.toString("utf8")); + } + return BigInt(textDecoder.decode(value)); + } + mapToDriverValue(value) { + return Buffer.from(value.toString()); + } + }; + SQLiteBlobJsonBuilder = class extends SQLiteColumnBuilder { + static { + __name(this, "SQLiteBlobJsonBuilder"); + } + static [entityKind] = "SQLiteBlobJsonBuilder"; + constructor(name) { + super(name, "json", "SQLiteBlobJson"); + } + /** @internal */ + build(table3) { + return new SQLiteBlobJson( + table3, + this.config + ); + } + }; + SQLiteBlobJson = class extends SQLiteColumn { + static { + __name(this, "SQLiteBlobJson"); + } + static [entityKind] = "SQLiteBlobJson"; + getSQLType() { + return "blob"; + } + mapFromDriverValue(value) { + if (typeof Buffer !== "undefined" && Buffer.from) { + const buf = Buffer.isBuffer(value) ? value : value instanceof ArrayBuffer ? Buffer.from(value) : value.buffer ? Buffer.from(value.buffer, value.byteOffset, value.byteLength) : Buffer.from(value); + return JSON.parse(buf.toString("utf8")); + } + return JSON.parse(textDecoder.decode(value)); + } + mapToDriverValue(value) { + return Buffer.from(JSON.stringify(value)); + } + }; + SQLiteBlobBufferBuilder = class extends SQLiteColumnBuilder { + static { + __name(this, "SQLiteBlobBufferBuilder"); + } + static [entityKind] = "SQLiteBlobBufferBuilder"; + constructor(name) { + super(name, "buffer", "SQLiteBlobBuffer"); + } + /** @internal */ + build(table3) { + return new SQLiteBlobBuffer(table3, this.config); + } + }; + SQLiteBlobBuffer = class extends SQLiteColumn { + static { + __name(this, "SQLiteBlobBuffer"); + } + static [entityKind] = "SQLiteBlobBuffer"; + mapFromDriverValue(value) { + if (Buffer.isBuffer(value)) { + return value; + } + return Buffer.from(value); + } + getSQLType() { + return "blob"; + } + }; + __name(blob, "blob"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/custom.js +function customType(customTypeParams) { + return (a, b) => { + const { name, config: config3 } = getColumnNameAndConfig(a, b); + return new SQLiteCustomColumnBuilder( + name, + config3, + customTypeParams + ); + }; +} +var SQLiteCustomColumnBuilder, SQLiteCustomColumn; +var init_custom = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/custom.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_utils2(); + init_common2(); + SQLiteCustomColumnBuilder = class extends SQLiteColumnBuilder { + static { + __name(this, "SQLiteCustomColumnBuilder"); + } + static [entityKind] = "SQLiteCustomColumnBuilder"; + constructor(name, fieldConfig, customTypeParams) { + super(name, "custom", "SQLiteCustomColumn"); + this.config.fieldConfig = fieldConfig; + this.config.customTypeParams = customTypeParams; + } + /** @internal */ + build(table3) { + return new SQLiteCustomColumn( + table3, + this.config + ); + } + }; + SQLiteCustomColumn = class extends SQLiteColumn { + static { + __name(this, "SQLiteCustomColumn"); + } + static [entityKind] = "SQLiteCustomColumn"; + sqlName; + mapTo; + mapFrom; + constructor(table3, config3) { + super(table3, config3); + this.sqlName = config3.customTypeParams.dataType(config3.fieldConfig); + this.mapTo = config3.customTypeParams.toDriver; + this.mapFrom = config3.customTypeParams.fromDriver; + } + getSQLType() { + return this.sqlName; + } + mapFromDriverValue(value) { + return typeof this.mapFrom === "function" ? this.mapFrom(value) : value; + } + mapToDriverValue(value) { + return typeof this.mapTo === "function" ? this.mapTo(value) : value; + } + }; + __name(customType, "customType"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/integer.js +function integer(a, b) { + const { name, config: config3 } = getColumnNameAndConfig(a, b); + if (config3?.mode === "timestamp" || config3?.mode === "timestamp_ms") { + return new SQLiteTimestampBuilder(name, config3.mode); + } + if (config3?.mode === "boolean") { + return new SQLiteBooleanBuilder(name, config3.mode); + } + return new SQLiteIntegerBuilder(name); +} +var SQLiteBaseIntegerBuilder, SQLiteBaseInteger, SQLiteIntegerBuilder, SQLiteInteger, SQLiteTimestampBuilder, SQLiteTimestamp, SQLiteBooleanBuilder, SQLiteBoolean; +var init_integer = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/integer.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_sql(); + init_utils2(); + init_common2(); + SQLiteBaseIntegerBuilder = class extends SQLiteColumnBuilder { + static { + __name(this, "SQLiteBaseIntegerBuilder"); + } + static [entityKind] = "SQLiteBaseIntegerBuilder"; + constructor(name, dataType, columnType) { + super(name, dataType, columnType); + this.config.autoIncrement = false; + } + primaryKey(config3) { + if (config3?.autoIncrement) { + this.config.autoIncrement = true; + } + this.config.hasDefault = true; + return super.primaryKey(); + } + }; + SQLiteBaseInteger = class extends SQLiteColumn { + static { + __name(this, "SQLiteBaseInteger"); + } + static [entityKind] = "SQLiteBaseInteger"; + autoIncrement = this.config.autoIncrement; + getSQLType() { + return "integer"; + } + }; + SQLiteIntegerBuilder = class extends SQLiteBaseIntegerBuilder { + static { + __name(this, "SQLiteIntegerBuilder"); + } + static [entityKind] = "SQLiteIntegerBuilder"; + constructor(name) { + super(name, "number", "SQLiteInteger"); + } + build(table3) { + return new SQLiteInteger( + table3, + this.config + ); + } + }; + SQLiteInteger = class extends SQLiteBaseInteger { + static { + __name(this, "SQLiteInteger"); + } + static [entityKind] = "SQLiteInteger"; + }; + SQLiteTimestampBuilder = class extends SQLiteBaseIntegerBuilder { + static { + __name(this, "SQLiteTimestampBuilder"); + } + static [entityKind] = "SQLiteTimestampBuilder"; + constructor(name, mode) { + super(name, "date", "SQLiteTimestamp"); + this.config.mode = mode; + } + /** + * @deprecated Use `default()` with your own expression instead. + * + * Adds `DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer))` to the column, which is the current epoch timestamp in milliseconds. + */ + defaultNow() { + return this.default(sql`(cast((julianday('now') - 2440587.5)*86400000 as integer))`); + } + build(table3) { + return new SQLiteTimestamp( + table3, + this.config + ); + } + }; + SQLiteTimestamp = class extends SQLiteBaseInteger { + static { + __name(this, "SQLiteTimestamp"); + } + static [entityKind] = "SQLiteTimestamp"; + mode = this.config.mode; + mapFromDriverValue(value) { + if (this.config.mode === "timestamp") { + return new Date(value * 1e3); + } + return new Date(value); + } + mapToDriverValue(value) { + const unix = value.getTime(); + if (this.config.mode === "timestamp") { + return Math.floor(unix / 1e3); + } + return unix; + } + }; + SQLiteBooleanBuilder = class extends SQLiteBaseIntegerBuilder { + static { + __name(this, "SQLiteBooleanBuilder"); + } + static [entityKind] = "SQLiteBooleanBuilder"; + constructor(name, mode) { + super(name, "boolean", "SQLiteBoolean"); + this.config.mode = mode; + } + build(table3) { + return new SQLiteBoolean( + table3, + this.config + ); + } + }; + SQLiteBoolean = class extends SQLiteBaseInteger { + static { + __name(this, "SQLiteBoolean"); + } + static [entityKind] = "SQLiteBoolean"; + mode = this.config.mode; + mapFromDriverValue(value) { + return Number(value) === 1; + } + mapToDriverValue(value) { + return value ? 1 : 0; + } + }; + __name(integer, "integer"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/numeric.js +function numeric(a, b) { + const { name, config: config3 } = getColumnNameAndConfig(a, b); + const mode = config3?.mode; + return mode === "number" ? new SQLiteNumericNumberBuilder(name) : mode === "bigint" ? new SQLiteNumericBigIntBuilder(name) : new SQLiteNumericBuilder(name); +} +var SQLiteNumericBuilder, SQLiteNumeric, SQLiteNumericNumberBuilder, SQLiteNumericNumber, SQLiteNumericBigIntBuilder, SQLiteNumericBigInt; +var init_numeric = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/numeric.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_utils2(); + init_common2(); + SQLiteNumericBuilder = class extends SQLiteColumnBuilder { + static { + __name(this, "SQLiteNumericBuilder"); + } + static [entityKind] = "SQLiteNumericBuilder"; + constructor(name) { + super(name, "string", "SQLiteNumeric"); + } + /** @internal */ + build(table3) { + return new SQLiteNumeric( + table3, + this.config + ); + } + }; + SQLiteNumeric = class extends SQLiteColumn { + static { + __name(this, "SQLiteNumeric"); + } + static [entityKind] = "SQLiteNumeric"; + mapFromDriverValue(value) { + if (typeof value === "string") return value; + return String(value); + } + getSQLType() { + return "numeric"; + } + }; + SQLiteNumericNumberBuilder = class extends SQLiteColumnBuilder { + static { + __name(this, "SQLiteNumericNumberBuilder"); + } + static [entityKind] = "SQLiteNumericNumberBuilder"; + constructor(name) { + super(name, "number", "SQLiteNumericNumber"); + } + /** @internal */ + build(table3) { + return new SQLiteNumericNumber( + table3, + this.config + ); + } + }; + SQLiteNumericNumber = class extends SQLiteColumn { + static { + __name(this, "SQLiteNumericNumber"); + } + static [entityKind] = "SQLiteNumericNumber"; + mapFromDriverValue(value) { + if (typeof value === "number") return value; + return Number(value); + } + mapToDriverValue = String; + getSQLType() { + return "numeric"; + } + }; + SQLiteNumericBigIntBuilder = class extends SQLiteColumnBuilder { + static { + __name(this, "SQLiteNumericBigIntBuilder"); + } + static [entityKind] = "SQLiteNumericBigIntBuilder"; + constructor(name) { + super(name, "bigint", "SQLiteNumericBigInt"); + } + /** @internal */ + build(table3) { + return new SQLiteNumericBigInt( + table3, + this.config + ); + } + }; + SQLiteNumericBigInt = class extends SQLiteColumn { + static { + __name(this, "SQLiteNumericBigInt"); + } + static [entityKind] = "SQLiteNumericBigInt"; + mapFromDriverValue = BigInt; + mapToDriverValue = String; + getSQLType() { + return "numeric"; + } + }; + __name(numeric, "numeric"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/real.js +function real(name) { + return new SQLiteRealBuilder(name ?? ""); +} +var SQLiteRealBuilder, SQLiteReal; +var init_real = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/real.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_common2(); + SQLiteRealBuilder = class extends SQLiteColumnBuilder { + static { + __name(this, "SQLiteRealBuilder"); + } + static [entityKind] = "SQLiteRealBuilder"; + constructor(name) { + super(name, "number", "SQLiteReal"); + } + /** @internal */ + build(table3) { + return new SQLiteReal(table3, this.config); + } + }; + SQLiteReal = class extends SQLiteColumn { + static { + __name(this, "SQLiteReal"); + } + static [entityKind] = "SQLiteReal"; + getSQLType() { + return "real"; + } + }; + __name(real, "real"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/text.js +function text(a, b = {}) { + const { name, config: config3 } = getColumnNameAndConfig(a, b); + if (config3.mode === "json") { + return new SQLiteTextJsonBuilder(name); + } + return new SQLiteTextBuilder(name, config3); +} +var SQLiteTextBuilder, SQLiteText, SQLiteTextJsonBuilder, SQLiteTextJson; +var init_text = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/text.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_utils2(); + init_common2(); + SQLiteTextBuilder = class extends SQLiteColumnBuilder { + static { + __name(this, "SQLiteTextBuilder"); + } + static [entityKind] = "SQLiteTextBuilder"; + constructor(name, config3) { + super(name, "string", "SQLiteText"); + this.config.enumValues = config3.enum; + this.config.length = config3.length; + } + /** @internal */ + build(table3) { + return new SQLiteText( + table3, + this.config + ); + } + }; + SQLiteText = class extends SQLiteColumn { + static { + __name(this, "SQLiteText"); + } + static [entityKind] = "SQLiteText"; + enumValues = this.config.enumValues; + length = this.config.length; + constructor(table3, config3) { + super(table3, config3); + } + getSQLType() { + return `text${this.config.length ? `(${this.config.length})` : ""}`; + } + }; + SQLiteTextJsonBuilder = class extends SQLiteColumnBuilder { + static { + __name(this, "SQLiteTextJsonBuilder"); + } + static [entityKind] = "SQLiteTextJsonBuilder"; + constructor(name) { + super(name, "json", "SQLiteTextJson"); + } + /** @internal */ + build(table3) { + return new SQLiteTextJson( + table3, + this.config + ); + } + }; + SQLiteTextJson = class extends SQLiteColumn { + static { + __name(this, "SQLiteTextJson"); + } + static [entityKind] = "SQLiteTextJson"; + getSQLType() { + return "text"; + } + mapFromDriverValue(value) { + return JSON.parse(value); + } + mapToDriverValue(value) { + return JSON.stringify(value); + } + }; + __name(text, "text"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/all.js +function getSQLiteColumnBuilders() { + return { + blob, + customType, + integer, + numeric, + real, + text + }; +} +var init_all = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/all.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_blob(); + init_custom(); + init_integer(); + init_numeric(); + init_real(); + init_text(); + __name(getSQLiteColumnBuilders, "getSQLiteColumnBuilders"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/table.js +function sqliteTableBase(name, columns, extraConfig, schema, baseName = name) { + const rawTable = new SQLiteTable(name, schema, baseName); + const parsedColumns = typeof columns === "function" ? columns(getSQLiteColumnBuilders()) : columns; + const builtColumns = Object.fromEntries( + Object.entries(parsedColumns).map(([name2, colBuilderBase]) => { + const colBuilder = colBuilderBase; + colBuilder.setName(name2); + const column = colBuilder.build(rawTable); + rawTable[InlineForeignKeys2].push(...colBuilder.buildForeignKeys(column, rawTable)); + return [name2, column]; + }) + ); + const table3 = Object.assign(rawTable, builtColumns); + table3[Table.Symbol.Columns] = builtColumns; + table3[Table.Symbol.ExtraConfigColumns] = builtColumns; + if (extraConfig) { + table3[SQLiteTable.Symbol.ExtraConfigBuilder] = extraConfig; + } + return table3; +} +var InlineForeignKeys2, SQLiteTable, sqliteTable; +var init_table3 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/table.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table(); + init_all(); + InlineForeignKeys2 = /* @__PURE__ */ Symbol.for("drizzle:SQLiteInlineForeignKeys"); + SQLiteTable = class extends Table { + static { + __name(this, "SQLiteTable"); + } + static [entityKind] = "SQLiteTable"; + /** @internal */ + static Symbol = Object.assign({}, Table.Symbol, { + InlineForeignKeys: InlineForeignKeys2 + }); + /** @internal */ + [Table.Symbol.Columns]; + /** @internal */ + [InlineForeignKeys2] = []; + /** @internal */ + [Table.Symbol.ExtraConfigBuilder] = void 0; + }; + __name(sqliteTableBase, "sqliteTableBase"); + sqliteTable = /* @__PURE__ */ __name((name, columns, extraConfig) => { + return sqliteTableBase(name, columns, extraConfig); + }, "sqliteTable"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/checks.js +function check(name, value) { + return new CheckBuilder(name, value); +} +var CheckBuilder, Check; +var init_checks = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/checks.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + CheckBuilder = class { + static { + __name(this, "CheckBuilder"); + } + constructor(name, value) { + this.name = name; + this.value = value; + } + static [entityKind] = "SQLiteCheckBuilder"; + brand; + build(table3) { + return new Check(table3, this); + } + }; + Check = class { + static { + __name(this, "Check"); + } + constructor(table3, builder) { + this.table = table3; + this.name = builder.name; + this.value = builder.value; + } + static [entityKind] = "SQLiteCheck"; + name; + value; + }; + __name(check, "check"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/indexes.js +function uniqueIndex(name) { + return new IndexBuilderOn(name, true); +} +var IndexBuilderOn, IndexBuilder, Index; +var init_indexes = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/indexes.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + IndexBuilderOn = class { + static { + __name(this, "IndexBuilderOn"); + } + constructor(name, unique) { + this.name = name; + this.unique = unique; + } + static [entityKind] = "SQLiteIndexBuilderOn"; + on(...columns) { + return new IndexBuilder(this.name, columns, this.unique); + } + }; + IndexBuilder = class { + static { + __name(this, "IndexBuilder"); + } + static [entityKind] = "SQLiteIndexBuilder"; + /** @internal */ + config; + constructor(name, columns, unique) { + this.config = { + name, + columns, + unique, + where: void 0 + }; + } + /** + * Condition for partial index. + */ + where(condition) { + this.config.where = condition; + return this; + } + /** @internal */ + build(table3) { + return new Index(this.config, table3); + } + }; + Index = class { + static { + __name(this, "Index"); + } + static [entityKind] = "SQLiteIndex"; + config; + constructor(config3, table3) { + this.config = { ...config3, table: table3 }; + } + }; + __name(uniqueIndex, "uniqueIndex"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/primary-keys.js +function primaryKey(...config3) { + if (config3[0].columns) { + return new PrimaryKeyBuilder2(config3[0].columns, config3[0].name); + } + return new PrimaryKeyBuilder2(config3); +} +var PrimaryKeyBuilder2, PrimaryKey2; +var init_primary_keys2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/primary-keys.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table3(); + __name(primaryKey, "primaryKey"); + PrimaryKeyBuilder2 = class { + static { + __name(this, "PrimaryKeyBuilder"); + } + static [entityKind] = "SQLitePrimaryKeyBuilder"; + /** @internal */ + columns; + /** @internal */ + name; + constructor(columns, name) { + this.columns = columns; + this.name = name; + } + /** @internal */ + build(table3) { + return new PrimaryKey2(table3, this.columns, this.name); + } + }; + PrimaryKey2 = class { + static { + __name(this, "PrimaryKey"); + } + constructor(table3, columns, name) { + this.table = table3; + this.columns = columns; + this.name = name; + } + static [entityKind] = "SQLitePrimaryKey"; + columns; + name; + getName() { + return this.name ?? `${this.table[SQLiteTable.Symbol.Name]}_${this.columns.map((column) => column.name).join("_")}_pk`; + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/utils.js +function extractUsedTable(table3) { + if (is(table3, SQLiteTable)) { + return [`${table3[Table.Symbol.BaseName]}`]; + } + if (is(table3, Subquery)) { + return table3._.usedTables ?? []; + } + if (is(table3, SQL)) { + return table3.usedTables ?? []; + } + return []; +} +var init_utils3 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/utils.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_sql(); + init_subquery(); + init_table(); + init_table3(); + __name(extractUsedTable, "extractUsedTable"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/delete.js +var SQLiteDeleteBase; +var init_delete = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/delete.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + init_selection_proxy(); + init_table3(); + init_table(); + init_utils2(); + init_utils3(); + SQLiteDeleteBase = class extends QueryPromise { + static { + __name(this, "SQLiteDeleteBase"); + } + constructor(table3, session, dialect, withList) { + super(); + this.table = table3; + this.session = session; + this.dialect = dialect; + this.config = { table: table3, withList }; + } + static [entityKind] = "SQLiteDelete"; + /** @internal */ + config; + /** + * Adds a `where` clause to the query. + * + * Calling this method will delete only those rows that fulfill a specified condition. + * + * See docs: {@link https://orm.drizzle.team/docs/delete} + * + * @param where the `where` clause. + * + * @example + * You can use conditional operators and `sql function` to filter the rows to be deleted. + * + * ```ts + * // Delete all cars with green color + * db.delete(cars).where(eq(cars.color, 'green')); + * // or + * db.delete(cars).where(sql`${cars.color} = 'green'`) + * ``` + * + * You can logically combine conditional operators with `and()` and `or()` operators: + * + * ```ts + * // Delete all BMW cars with a green color + * db.delete(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW'))); + * + * // Delete all cars with the green or blue color + * db.delete(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue'))); + * ``` + */ + where(where) { + this.config.where = where; + return this; + } + orderBy(...columns) { + if (typeof columns[0] === "function") { + const orderBy = columns[0]( + new Proxy( + this.config.table[Table.Symbol.Columns], + new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" }) + ) + ); + const orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy]; + this.config.orderBy = orderByArray; + } else { + const orderByArray = columns; + this.config.orderBy = orderByArray; + } + return this; + } + limit(limit) { + this.config.limit = limit; + return this; + } + returning(fields = this.table[SQLiteTable.Symbol.Columns]) { + this.config.returning = orderSelectedFields(fields); + return this; + } + /** @internal */ + getSQL() { + return this.dialect.buildDeleteQuery(this.config); + } + toSQL() { + const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL()); + return rest; + } + /** @internal */ + _prepare(isOneTimeQuery = true) { + return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + this.dialect.sqlToQuery(this.getSQL()), + this.config.returning, + this.config.returning ? "all" : "run", + true, + void 0, + { + type: "delete", + tables: extractUsedTable(this.config.table) + } + ); + } + prepare() { + return this._prepare(false); + } + run = /* @__PURE__ */ __name((placeholderValues) => { + return this._prepare().run(placeholderValues); + }, "run"); + all = /* @__PURE__ */ __name((placeholderValues) => { + return this._prepare().all(placeholderValues); + }, "all"); + get = /* @__PURE__ */ __name((placeholderValues) => { + return this._prepare().get(placeholderValues); + }, "get"); + values = /* @__PURE__ */ __name((placeholderValues) => { + return this._prepare().values(placeholderValues); + }, "values"); + async execute(placeholderValues) { + return this._prepare().execute(placeholderValues); + } + $dynamic() { + return this; + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/casing.js +function toSnakeCase(input) { + const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? []; + return words.map((word) => word.toLowerCase()).join("_"); +} +function toCamelCase(input) { + const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? []; + return words.reduce((acc, word, i) => { + const formattedWord = i === 0 ? word.toLowerCase() : `${word[0].toUpperCase()}${word.slice(1)}`; + return acc + formattedWord; + }, ""); +} +function noopCase(input) { + return input; +} +var CasingCache; +var init_casing = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/casing.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table(); + __name(toSnakeCase, "toSnakeCase"); + __name(toCamelCase, "toCamelCase"); + __name(noopCase, "noopCase"); + CasingCache = class { + static { + __name(this, "CasingCache"); + } + static [entityKind] = "CasingCache"; + /** @internal */ + cache = {}; + cachedTables = {}; + convert; + constructor(casing) { + this.convert = casing === "snake_case" ? toSnakeCase : casing === "camelCase" ? toCamelCase : noopCase; + } + getColumnCasing(column) { + if (!column.keyAsName) return column.name; + const schema = column.table[Table.Symbol.Schema] ?? "public"; + const tableName = column.table[Table.Symbol.OriginalName]; + const key = `${schema}.${tableName}.${column.name}`; + if (!this.cache[key]) { + this.cacheTable(column.table); + } + return this.cache[key]; + } + cacheTable(table3) { + const schema = table3[Table.Symbol.Schema] ?? "public"; + const tableName = table3[Table.Symbol.OriginalName]; + const tableKey = `${schema}.${tableName}`; + if (!this.cachedTables[tableKey]) { + for (const column of Object.values(table3[Table.Symbol.Columns])) { + const columnKey = `${tableKey}.${column.name}`; + this.cache[columnKey] = this.convert(column.name); + } + this.cachedTables[tableKey] = true; + } + } + clearCache() { + this.cache = {}; + this.cachedTables = {}; + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/errors.js +var DrizzleError, DrizzleQueryError, TransactionRollbackError; +var init_errors = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/errors.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + DrizzleError = class extends Error { + static { + __name(this, "DrizzleError"); + } + static [entityKind] = "DrizzleError"; + constructor({ message: message2, cause }) { + super(message2); + this.name = "DrizzleError"; + this.cause = cause; + } + }; + DrizzleQueryError = class _DrizzleQueryError extends Error { + static { + __name(this, "DrizzleQueryError"); + } + constructor(query, params, cause) { + super(`Failed query: ${query} +params: ${params}`); + this.query = query; + this.params = params; + this.cause = cause; + Error.captureStackTrace(this, _DrizzleQueryError); + if (cause) this.cause = cause; + } + }; + TransactionRollbackError = class extends DrizzleError { + static { + __name(this, "TransactionRollbackError"); + } + static [entityKind] = "TransactionRollbackError"; + constructor() { + super({ message: "Rollback" }); + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/aggregate.js +function count3(expression) { + return sql`count(${expression || sql.raw("*")})`.mapWith(Number); +} +function max(expression) { + return sql`max(${expression})`.mapWith(is(expression, Column) ? expression : String); +} +var init_aggregate = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/aggregate.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column(); + init_entity(); + init_sql(); + __name(count3, "count"); + __name(max, "max"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/vector.js +var init_vector = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/vector.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/index.js +var init_functions = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/index.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_aggregate(); + init_vector(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/index.js +var init_sql2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/index.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_expressions(); + init_functions(); + init_sql(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/index.js +var init_columns = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/index.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_blob(); + init_common2(); + init_custom(); + init_integer(); + init_numeric(); + init_real(); + init_text(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/view-base.js +var SQLiteViewBase; +var init_view_base = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/view-base.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_sql(); + SQLiteViewBase = class extends View { + static { + __name(this, "SQLiteViewBase"); + } + static [entityKind] = "SQLiteViewBase"; + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/dialect.js +var SQLiteDialect, SQLiteSyncDialect, SQLiteAsyncDialect; +var init_dialect = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/dialect.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_alias(); + init_casing(); + init_column(); + init_entity(); + init_errors(); + init_relations(); + init_sql2(); + init_sql(); + init_columns(); + init_table3(); + init_subquery(); + init_table(); + init_utils2(); + init_view_common(); + init_view_base(); + SQLiteDialect = class { + static { + __name(this, "SQLiteDialect"); + } + static [entityKind] = "SQLiteDialect"; + /** @internal */ + casing; + constructor(config3) { + this.casing = new CasingCache(config3?.casing); + } + escapeName(name) { + return `"${name}"`; + } + escapeParam(_num) { + return "?"; + } + escapeString(str) { + return `'${str.replace(/'/g, "''")}'`; + } + buildWithCTE(queries) { + if (!queries?.length) return void 0; + const withSqlChunks = [sql`with `]; + for (const [i, w] of queries.entries()) { + withSqlChunks.push(sql`${sql.identifier(w._.alias)} as (${w._.sql})`); + if (i < queries.length - 1) { + withSqlChunks.push(sql`, `); + } + } + withSqlChunks.push(sql` `); + return sql.join(withSqlChunks); + } + buildDeleteQuery({ table: table3, where, returning, withList, limit, orderBy }) { + const withSql = this.buildWithCTE(withList); + const returningSql = returning ? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}` : void 0; + const whereSql = where ? sql` where ${where}` : void 0; + const orderBySql = this.buildOrderBy(orderBy); + const limitSql = this.buildLimit(limit); + return sql`${withSql}delete from ${table3}${whereSql}${returningSql}${orderBySql}${limitSql}`; + } + buildUpdateSet(table3, set2) { + const tableColumns = table3[Table.Symbol.Columns]; + const columnNames = Object.keys(tableColumns).filter( + (colName) => set2[colName] !== void 0 || tableColumns[colName]?.onUpdateFn !== void 0 + ); + const setSize = columnNames.length; + return sql.join(columnNames.flatMap((colName, i) => { + const col = tableColumns[colName]; + const value = set2[colName] ?? sql.param(col.onUpdateFn(), col); + const res = sql`${sql.identifier(this.casing.getColumnCasing(col))} = ${value}`; + if (i < setSize - 1) { + return [res, sql.raw(", ")]; + } + return [res]; + })); + } + buildUpdateQuery({ table: table3, set: set2, where, returning, withList, joins, from, limit, orderBy }) { + const withSql = this.buildWithCTE(withList); + const setSql = this.buildUpdateSet(table3, set2); + const fromSql = from && sql.join([sql.raw(" from "), this.buildFromTable(from)]); + const joinsSql = this.buildJoins(joins); + const returningSql = returning ? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}` : void 0; + const whereSql = where ? sql` where ${where}` : void 0; + const orderBySql = this.buildOrderBy(orderBy); + const limitSql = this.buildLimit(limit); + return sql`${withSql}update ${table3} set ${setSql}${fromSql}${joinsSql}${whereSql}${returningSql}${orderBySql}${limitSql}`; + } + /** + * Builds selection SQL with provided fields/expressions + * + * Examples: + * + * `select from` + * + * `insert ... returning ` + * + * If `isSingleTable` is true, then columns won't be prefixed with table name + */ + buildSelection(fields, { isSingleTable = false } = {}) { + const columnsLen = fields.length; + const chunks = fields.flatMap(({ field }, i) => { + const chunk = []; + if (is(field, SQL.Aliased) && field.isSelectionField) { + chunk.push(sql.identifier(field.fieldAlias)); + } else if (is(field, SQL.Aliased) || is(field, SQL)) { + const query = is(field, SQL.Aliased) ? field.sql : field; + if (isSingleTable) { + chunk.push( + new SQL( + query.queryChunks.map((c) => { + if (is(c, Column)) { + return sql.identifier(this.casing.getColumnCasing(c)); + } + return c; + }) + ) + ); + } else { + chunk.push(query); + } + if (is(field, SQL.Aliased)) { + chunk.push(sql` as ${sql.identifier(field.fieldAlias)}`); + } + } else if (is(field, Column)) { + const tableName = field.table[Table.Symbol.Name]; + if (field.columnType === "SQLiteNumericBigInt") { + if (isSingleTable) { + chunk.push(sql`cast(${sql.identifier(this.casing.getColumnCasing(field))} as text)`); + } else { + chunk.push( + sql`cast(${sql.identifier(tableName)}.${sql.identifier(this.casing.getColumnCasing(field))} as text)` + ); + } + } else { + if (isSingleTable) { + chunk.push(sql.identifier(this.casing.getColumnCasing(field))); + } else { + chunk.push(sql`${sql.identifier(tableName)}.${sql.identifier(this.casing.getColumnCasing(field))}`); + } + } + } + if (i < columnsLen - 1) { + chunk.push(sql`, `); + } + return chunk; + }); + return sql.join(chunks); + } + buildJoins(joins) { + if (!joins || joins.length === 0) { + return void 0; + } + const joinsArray = []; + if (joins) { + for (const [index, joinMeta] of joins.entries()) { + if (index === 0) { + joinsArray.push(sql` `); + } + const table3 = joinMeta.table; + const onSql = joinMeta.on ? sql` on ${joinMeta.on}` : void 0; + if (is(table3, SQLiteTable)) { + const tableName = table3[SQLiteTable.Symbol.Name]; + const tableSchema = table3[SQLiteTable.Symbol.Schema]; + const origTableName = table3[SQLiteTable.Symbol.OriginalName]; + const alias = tableName === origTableName ? void 0 : joinMeta.alias; + joinsArray.push( + sql`${sql.raw(joinMeta.joinType)} join ${tableSchema ? sql`${sql.identifier(tableSchema)}.` : void 0}${sql.identifier(origTableName)}${alias && sql` ${sql.identifier(alias)}`}${onSql}` + ); + } else { + joinsArray.push( + sql`${sql.raw(joinMeta.joinType)} join ${table3}${onSql}` + ); + } + if (index < joins.length - 1) { + joinsArray.push(sql` `); + } + } + } + return sql.join(joinsArray); + } + buildLimit(limit) { + return typeof limit === "object" || typeof limit === "number" && limit >= 0 ? sql` limit ${limit}` : void 0; + } + buildOrderBy(orderBy) { + const orderByList = []; + if (orderBy) { + for (const [index, orderByValue] of orderBy.entries()) { + orderByList.push(orderByValue); + if (index < orderBy.length - 1) { + orderByList.push(sql`, `); + } + } + } + return orderByList.length > 0 ? sql` order by ${sql.join(orderByList)}` : void 0; + } + buildFromTable(table3) { + if (is(table3, Table) && table3[Table.Symbol.IsAlias]) { + return sql`${sql`${sql.identifier(table3[Table.Symbol.Schema] ?? "")}.`.if(table3[Table.Symbol.Schema])}${sql.identifier(table3[Table.Symbol.OriginalName])} ${sql.identifier(table3[Table.Symbol.Name])}`; + } + return table3; + } + buildSelectQuery({ + withList, + fields, + fieldsFlat, + where, + having, + table: table3, + joins, + orderBy, + groupBy, + limit, + offset, + distinct, + setOperators + }) { + const fieldsList = fieldsFlat ?? orderSelectedFields(fields); + for (const f of fieldsList) { + if (is(f.field, Column) && getTableName(f.field.table) !== (is(table3, Subquery) ? table3._.alias : is(table3, SQLiteViewBase) ? table3[ViewBaseConfig].name : is(table3, SQL) ? void 0 : getTableName(table3)) && !((table22) => joins?.some( + ({ alias }) => alias === (table22[Table.Symbol.IsAlias] ? getTableName(table22) : table22[Table.Symbol.BaseName]) + ))(f.field.table)) { + const tableName = getTableName(f.field.table); + throw new Error( + `Your "${f.path.join("->")}" field references a column "${tableName}"."${f.field.name}", but the table "${tableName}" is not part of the query! Did you forget to join it?` + ); + } + } + const isSingleTable = !joins || joins.length === 0; + const withSql = this.buildWithCTE(withList); + const distinctSql = distinct ? sql` distinct` : void 0; + const selection = this.buildSelection(fieldsList, { isSingleTable }); + const tableSql = this.buildFromTable(table3); + const joinsSql = this.buildJoins(joins); + const whereSql = where ? sql` where ${where}` : void 0; + const havingSql = having ? sql` having ${having}` : void 0; + const groupByList = []; + if (groupBy) { + for (const [index, groupByValue] of groupBy.entries()) { + groupByList.push(groupByValue); + if (index < groupBy.length - 1) { + groupByList.push(sql`, `); + } + } + } + const groupBySql = groupByList.length > 0 ? sql` group by ${sql.join(groupByList)}` : void 0; + const orderBySql = this.buildOrderBy(orderBy); + const limitSql = this.buildLimit(limit); + const offsetSql = offset ? sql` offset ${offset}` : void 0; + const finalQuery = sql`${withSql}select${distinctSql} ${selection} from ${tableSql}${joinsSql}${whereSql}${groupBySql}${havingSql}${orderBySql}${limitSql}${offsetSql}`; + if (setOperators.length > 0) { + return this.buildSetOperations(finalQuery, setOperators); + } + return finalQuery; + } + buildSetOperations(leftSelect, setOperators) { + const [setOperator, ...rest] = setOperators; + if (!setOperator) { + throw new Error("Cannot pass undefined values to any set operator"); + } + if (rest.length === 0) { + return this.buildSetOperationQuery({ leftSelect, setOperator }); + } + return this.buildSetOperations( + this.buildSetOperationQuery({ leftSelect, setOperator }), + rest + ); + } + buildSetOperationQuery({ + leftSelect, + setOperator: { type, isAll, rightSelect, limit, orderBy, offset } + }) { + const leftChunk = sql`${leftSelect.getSQL()} `; + const rightChunk = sql`${rightSelect.getSQL()}`; + let orderBySql; + if (orderBy && orderBy.length > 0) { + const orderByValues = []; + for (const singleOrderBy of orderBy) { + if (is(singleOrderBy, SQLiteColumn)) { + orderByValues.push(sql.identifier(singleOrderBy.name)); + } else if (is(singleOrderBy, SQL)) { + for (let i = 0; i < singleOrderBy.queryChunks.length; i++) { + const chunk = singleOrderBy.queryChunks[i]; + if (is(chunk, SQLiteColumn)) { + singleOrderBy.queryChunks[i] = sql.identifier(this.casing.getColumnCasing(chunk)); + } + } + orderByValues.push(sql`${singleOrderBy}`); + } else { + orderByValues.push(sql`${singleOrderBy}`); + } + } + orderBySql = sql` order by ${sql.join(orderByValues, sql`, `)}`; + } + const limitSql = typeof limit === "object" || typeof limit === "number" && limit >= 0 ? sql` limit ${limit}` : void 0; + const operatorChunk = sql.raw(`${type} ${isAll ? "all " : ""}`); + const offsetSql = offset ? sql` offset ${offset}` : void 0; + return sql`${leftChunk}${operatorChunk}${rightChunk}${orderBySql}${limitSql}${offsetSql}`; + } + buildInsertQuery({ table: table3, values: valuesOrSelect, onConflict, returning, withList, select }) { + const valuesSqlList = []; + const columns = table3[Table.Symbol.Columns]; + const colEntries = Object.entries(columns).filter( + ([_, col]) => !col.shouldDisableInsert() + ); + const insertOrder = colEntries.map(([, column]) => sql.identifier(this.casing.getColumnCasing(column))); + if (select) { + const select2 = valuesOrSelect; + if (is(select2, SQL)) { + valuesSqlList.push(select2); + } else { + valuesSqlList.push(select2.getSQL()); + } + } else { + const values = valuesOrSelect; + valuesSqlList.push(sql.raw("values ")); + for (const [valueIndex, value] of values.entries()) { + const valueList = []; + for (const [fieldName, col] of colEntries) { + const colValue = value[fieldName]; + if (colValue === void 0 || is(colValue, Param) && colValue.value === void 0) { + let defaultValue; + if (col.default !== null && col.default !== void 0) { + defaultValue = is(col.default, SQL) ? col.default : sql.param(col.default, col); + } else if (col.defaultFn !== void 0) { + const defaultFnResult = col.defaultFn(); + defaultValue = is(defaultFnResult, SQL) ? defaultFnResult : sql.param(defaultFnResult, col); + } else if (!col.default && col.onUpdateFn !== void 0) { + const onUpdateFnResult = col.onUpdateFn(); + defaultValue = is(onUpdateFnResult, SQL) ? onUpdateFnResult : sql.param(onUpdateFnResult, col); + } else { + defaultValue = sql`null`; + } + valueList.push(defaultValue); + } else { + valueList.push(colValue); + } + } + valuesSqlList.push(valueList); + if (valueIndex < values.length - 1) { + valuesSqlList.push(sql`, `); + } + } + } + const withSql = this.buildWithCTE(withList); + const valuesSql = sql.join(valuesSqlList); + const returningSql = returning ? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}` : void 0; + const onConflictSql = onConflict?.length ? sql.join(onConflict) : void 0; + return sql`${withSql}insert into ${table3} ${insertOrder} ${valuesSql}${onConflictSql}${returningSql}`; + } + sqlToQuery(sql2, invokeSource) { + return sql2.toQuery({ + casing: this.casing, + escapeName: this.escapeName, + escapeParam: this.escapeParam, + escapeString: this.escapeString, + invokeSource + }); + } + buildRelationalQuery({ + fullSchema, + schema, + tableNamesMap, + table: table3, + tableConfig, + queryConfig: config3, + tableAlias, + nestedQueryRelation, + joinOn + }) { + let selection = []; + let limit, offset, orderBy = [], where; + const joins = []; + if (config3 === true) { + const selectionEntries = Object.entries(tableConfig.columns); + selection = selectionEntries.map(([key, value]) => ({ + dbKey: value.name, + tsKey: key, + field: aliasedTableColumn(value, tableAlias), + relationTableTsKey: void 0, + isJson: false, + selection: [] + })); + } else { + const aliasedColumns = Object.fromEntries( + Object.entries(tableConfig.columns).map(([key, value]) => [key, aliasedTableColumn(value, tableAlias)]) + ); + if (config3.where) { + const whereSql = typeof config3.where === "function" ? config3.where(aliasedColumns, getOperators()) : config3.where; + where = whereSql && mapColumnsInSQLToAlias(whereSql, tableAlias); + } + const fieldsSelection = []; + let selectedColumns = []; + if (config3.columns) { + let isIncludeMode = false; + for (const [field, value] of Object.entries(config3.columns)) { + if (value === void 0) { + continue; + } + if (field in tableConfig.columns) { + if (!isIncludeMode && value === true) { + isIncludeMode = true; + } + selectedColumns.push(field); + } + } + if (selectedColumns.length > 0) { + selectedColumns = isIncludeMode ? selectedColumns.filter((c) => config3.columns?.[c] === true) : Object.keys(tableConfig.columns).filter((key) => !selectedColumns.includes(key)); + } + } else { + selectedColumns = Object.keys(tableConfig.columns); + } + for (const field of selectedColumns) { + const column = tableConfig.columns[field]; + fieldsSelection.push({ tsKey: field, value: column }); + } + let selectedRelations = []; + if (config3.with) { + selectedRelations = Object.entries(config3.with).filter((entry) => !!entry[1]).map(([tsKey, queryConfig]) => ({ tsKey, queryConfig, relation: tableConfig.relations[tsKey] })); + } + let extras; + if (config3.extras) { + extras = typeof config3.extras === "function" ? config3.extras(aliasedColumns, { sql }) : config3.extras; + for (const [tsKey, value] of Object.entries(extras)) { + fieldsSelection.push({ + tsKey, + value: mapColumnsInAliasedSQLToAlias(value, tableAlias) + }); + } + } + for (const { tsKey, value } of fieldsSelection) { + selection.push({ + dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name, + tsKey, + field: is(value, Column) ? aliasedTableColumn(value, tableAlias) : value, + relationTableTsKey: void 0, + isJson: false, + selection: [] + }); + } + let orderByOrig = typeof config3.orderBy === "function" ? config3.orderBy(aliasedColumns, getOrderByOperators()) : config3.orderBy ?? []; + if (!Array.isArray(orderByOrig)) { + orderByOrig = [orderByOrig]; + } + orderBy = orderByOrig.map((orderByValue) => { + if (is(orderByValue, Column)) { + return aliasedTableColumn(orderByValue, tableAlias); + } + return mapColumnsInSQLToAlias(orderByValue, tableAlias); + }); + limit = config3.limit; + offset = config3.offset; + for (const { + tsKey: selectedRelationTsKey, + queryConfig: selectedRelationConfigValue, + relation + } of selectedRelations) { + const normalizedRelation = normalizeRelation(schema, tableNamesMap, relation); + const relationTableName = getTableUniqueName(relation.referencedTable); + const relationTableTsName = tableNamesMap[relationTableName]; + const relationTableAlias = `${tableAlias}_${selectedRelationTsKey}`; + const joinOn2 = and( + ...normalizedRelation.fields.map( + (field2, i) => eq( + aliasedTableColumn(normalizedRelation.references[i], relationTableAlias), + aliasedTableColumn(field2, tableAlias) + ) + ) + ); + const builtRelation = this.buildRelationalQuery({ + fullSchema, + schema, + tableNamesMap, + table: fullSchema[relationTableTsName], + tableConfig: schema[relationTableTsName], + queryConfig: is(relation, One) ? selectedRelationConfigValue === true ? { limit: 1 } : { ...selectedRelationConfigValue, limit: 1 } : selectedRelationConfigValue, + tableAlias: relationTableAlias, + joinOn: joinOn2, + nestedQueryRelation: relation + }); + const field = sql`(${builtRelation.sql})`.as(selectedRelationTsKey); + selection.push({ + dbKey: selectedRelationTsKey, + tsKey: selectedRelationTsKey, + field, + relationTableTsKey: relationTableTsName, + isJson: true, + selection: builtRelation.selection + }); + } + } + if (selection.length === 0) { + throw new DrizzleError({ + message: `No fields selected for table "${tableConfig.tsName}" ("${tableAlias}"). You need to have at least one item in "columns", "with" or "extras". If you need to select all columns, omit the "columns" key or set it to undefined.` + }); + } + let result; + where = and(joinOn, where); + if (nestedQueryRelation) { + let field = sql`json_array(${sql.join( + selection.map( + ({ field: field2 }) => is(field2, SQLiteColumn) ? sql.identifier(this.casing.getColumnCasing(field2)) : is(field2, SQL.Aliased) ? field2.sql : field2 + ), + sql`, ` + )})`; + if (is(nestedQueryRelation, Many)) { + field = sql`coalesce(json_group_array(${field}), json_array())`; + } + const nestedSelection = [{ + dbKey: "data", + tsKey: "data", + field: field.as("data"), + isJson: true, + relationTableTsKey: tableConfig.tsName, + selection + }]; + const needsSubquery = limit !== void 0 || offset !== void 0 || orderBy.length > 0; + if (needsSubquery) { + result = this.buildSelectQuery({ + table: aliasedTable(table3, tableAlias), + fields: {}, + fieldsFlat: [ + { + path: [], + field: sql.raw("*") + } + ], + where, + limit, + offset, + orderBy, + setOperators: [] + }); + where = void 0; + limit = void 0; + offset = void 0; + orderBy = void 0; + } else { + result = aliasedTable(table3, tableAlias); + } + result = this.buildSelectQuery({ + table: is(result, SQLiteTable) ? result : new Subquery(result, {}, tableAlias), + fields: {}, + fieldsFlat: nestedSelection.map(({ field: field2 }) => ({ + path: [], + field: is(field2, Column) ? aliasedTableColumn(field2, tableAlias) : field2 + })), + joins, + where, + limit, + offset, + orderBy, + setOperators: [] + }); + } else { + result = this.buildSelectQuery({ + table: aliasedTable(table3, tableAlias), + fields: {}, + fieldsFlat: selection.map(({ field }) => ({ + path: [], + field: is(field, Column) ? aliasedTableColumn(field, tableAlias) : field + })), + joins, + where, + limit, + offset, + orderBy, + setOperators: [] + }); + } + return { + tableTsKey: tableConfig.tsName, + sql: result, + selection + }; + } + }; + SQLiteSyncDialect = class extends SQLiteDialect { + static { + __name(this, "SQLiteSyncDialect"); + } + static [entityKind] = "SQLiteSyncDialect"; + migrate(migrations, session, config3) { + const migrationsTable = config3 === void 0 ? "__drizzle_migrations" : typeof config3 === "string" ? "__drizzle_migrations" : config3.migrationsTable ?? "__drizzle_migrations"; + const migrationTableCreate = sql` + CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} ( + id SERIAL PRIMARY KEY, + hash text NOT NULL, + created_at numeric + ) + `; + session.run(migrationTableCreate); + const dbMigrations = session.values( + sql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1` + ); + const lastDbMigration = dbMigrations[0] ?? void 0; + session.run(sql`BEGIN`); + try { + for (const migration of migrations) { + if (!lastDbMigration || Number(lastDbMigration[2]) < migration.folderMillis) { + for (const stmt of migration.sql) { + session.run(sql.raw(stmt)); + } + session.run( + sql`INSERT INTO ${sql.identifier(migrationsTable)} ("hash", "created_at") VALUES(${migration.hash}, ${migration.folderMillis})` + ); + } + } + session.run(sql`COMMIT`); + } catch (e) { + session.run(sql`ROLLBACK`); + throw e; + } + } + }; + SQLiteAsyncDialect = class extends SQLiteDialect { + static { + __name(this, "SQLiteAsyncDialect"); + } + static [entityKind] = "SQLiteAsyncDialect"; + async migrate(migrations, session, config3) { + const migrationsTable = config3 === void 0 ? "__drizzle_migrations" : typeof config3 === "string" ? "__drizzle_migrations" : config3.migrationsTable ?? "__drizzle_migrations"; + const migrationTableCreate = sql` + CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} ( + id SERIAL PRIMARY KEY, + hash text NOT NULL, + created_at numeric + ) + `; + await session.run(migrationTableCreate); + const dbMigrations = await session.values( + sql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1` + ); + const lastDbMigration = dbMigrations[0] ?? void 0; + await session.transaction(async (tx) => { + for (const migration of migrations) { + if (!lastDbMigration || Number(lastDbMigration[2]) < migration.folderMillis) { + for (const stmt of migration.sql) { + await tx.run(sql.raw(stmt)); + } + await tx.run( + sql`INSERT INTO ${sql.identifier(migrationsTable)} ("hash", "created_at") VALUES(${migration.hash}, ${migration.folderMillis})` + ); + } + } + }); + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/query-builders/query-builder.js +var TypedQueryBuilder; +var init_query_builder = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/query-builders/query-builder.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + TypedQueryBuilder = class { + static { + __name(this, "TypedQueryBuilder"); + } + static [entityKind] = "TypedQueryBuilder"; + /** @internal */ + getSelectedFields() { + return this._.selectedFields; + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.js +function createSetOperator(type, isAll) { + return (leftSelect, rightSelect, ...restSelects) => { + const setOperators = [rightSelect, ...restSelects].map((select) => ({ + type, + isAll, + rightSelect: select + })); + for (const setOperator of setOperators) { + if (!haveSameKeys(leftSelect.getSelectedFields(), setOperator.rightSelect.getSelectedFields())) { + throw new Error( + "Set operator error (union / intersect / except): selected fields are not the same or are in a different order" + ); + } + } + return leftSelect.addSetOperators(setOperators); + }; +} +var SQLiteSelectBuilder, SQLiteSelectQueryBuilderBase, SQLiteSelectBase, getSQLiteSetOperators, union, unionAll, intersect, except; +var init_select2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_builder(); + init_query_promise(); + init_selection_proxy(); + init_sql(); + init_subquery(); + init_table(); + init_utils2(); + init_view_common(); + init_utils3(); + init_view_base(); + SQLiteSelectBuilder = class { + static { + __name(this, "SQLiteSelectBuilder"); + } + static [entityKind] = "SQLiteSelectBuilder"; + fields; + session; + dialect; + withList; + distinct; + constructor(config3) { + this.fields = config3.fields; + this.session = config3.session; + this.dialect = config3.dialect; + this.withList = config3.withList; + this.distinct = config3.distinct; + } + from(source) { + const isPartialSelect = !!this.fields; + let fields; + if (this.fields) { + fields = this.fields; + } else if (is(source, Subquery)) { + fields = Object.fromEntries( + Object.keys(source._.selectedFields).map((key) => [key, source[key]]) + ); + } else if (is(source, SQLiteViewBase)) { + fields = source[ViewBaseConfig].selectedFields; + } else if (is(source, SQL)) { + fields = {}; + } else { + fields = getTableColumns(source); + } + return new SQLiteSelectBase({ + table: source, + fields, + isPartialSelect, + session: this.session, + dialect: this.dialect, + withList: this.withList, + distinct: this.distinct + }); + } + }; + SQLiteSelectQueryBuilderBase = class extends TypedQueryBuilder { + static { + __name(this, "SQLiteSelectQueryBuilderBase"); + } + static [entityKind] = "SQLiteSelectQueryBuilder"; + _; + /** @internal */ + config; + joinsNotNullableMap; + tableName; + isPartialSelect; + session; + dialect; + cacheConfig = void 0; + usedTables = /* @__PURE__ */ new Set(); + constructor({ table: table3, fields, isPartialSelect, session, dialect, withList, distinct }) { + super(); + this.config = { + withList, + table: table3, + fields: { ...fields }, + distinct, + setOperators: [] + }; + this.isPartialSelect = isPartialSelect; + this.session = session; + this.dialect = dialect; + this._ = { + selectedFields: fields, + config: this.config + }; + this.tableName = getTableLikeName(table3); + this.joinsNotNullableMap = typeof this.tableName === "string" ? { [this.tableName]: true } : {}; + for (const item of extractUsedTable(table3)) this.usedTables.add(item); + } + /** @internal */ + getUsedTables() { + return [...this.usedTables]; + } + createJoin(joinType) { + return (table3, on2) => { + const baseTableName = this.tableName; + const tableName = getTableLikeName(table3); + for (const item of extractUsedTable(table3)) this.usedTables.add(item); + if (typeof tableName === "string" && this.config.joins?.some((join3) => join3.alias === tableName)) { + throw new Error(`Alias "${tableName}" is already used in this query`); + } + if (!this.isPartialSelect) { + if (Object.keys(this.joinsNotNullableMap).length === 1 && typeof baseTableName === "string") { + this.config.fields = { + [baseTableName]: this.config.fields + }; + } + if (typeof tableName === "string" && !is(table3, SQL)) { + const selection = is(table3, Subquery) ? table3._.selectedFields : is(table3, View) ? table3[ViewBaseConfig].selectedFields : table3[Table.Symbol.Columns]; + this.config.fields[tableName] = selection; + } + } + if (typeof on2 === "function") { + on2 = on2( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ) + ); + } + if (!this.config.joins) { + this.config.joins = []; + } + this.config.joins.push({ on: on2, table: table3, joinType, alias: tableName }); + if (typeof tableName === "string") { + switch (joinType) { + case "left": { + this.joinsNotNullableMap[tableName] = false; + break; + } + case "right": { + this.joinsNotNullableMap = Object.fromEntries( + Object.entries(this.joinsNotNullableMap).map(([key]) => [key, false]) + ); + this.joinsNotNullableMap[tableName] = true; + break; + } + case "cross": + case "inner": { + this.joinsNotNullableMap[tableName] = true; + break; + } + case "full": { + this.joinsNotNullableMap = Object.fromEntries( + Object.entries(this.joinsNotNullableMap).map(([key]) => [key, false]) + ); + this.joinsNotNullableMap[tableName] = false; + break; + } + } + } + return this; + }; + } + /** + * Executes a `left join` operation by adding another table to the current query. + * + * Calling this method associates each row of the table with the corresponding row from the joined table, if a match is found. If no matching row exists, it sets all columns of the joined table to null. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#left-join} + * + * @param table the table to join. + * @param on the `on` clause. + * + * @example + * + * ```ts + * // Select all users and their pets + * const usersWithPets: { user: User; pets: Pet | null; }[] = await db.select() + * .from(users) + * .leftJoin(pets, eq(users.id, pets.ownerId)) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number; petId: number | null; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .leftJoin(pets, eq(users.id, pets.ownerId)) + * ``` + */ + leftJoin = this.createJoin("left"); + /** + * Executes a `right join` operation by adding another table to the current query. + * + * Calling this method associates each row of the joined table with the corresponding row from the main table, if a match is found. If no matching row exists, it sets all columns of the main table to null. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#right-join} + * + * @param table the table to join. + * @param on the `on` clause. + * + * @example + * + * ```ts + * // Select all users and their pets + * const usersWithPets: { user: User | null; pets: Pet; }[] = await db.select() + * .from(users) + * .rightJoin(pets, eq(users.id, pets.ownerId)) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number | null; petId: number; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .rightJoin(pets, eq(users.id, pets.ownerId)) + * ``` + */ + rightJoin = this.createJoin("right"); + /** + * Executes an `inner join` operation, creating a new table by combining rows from two tables that have matching values. + * + * Calling this method retrieves rows that have corresponding entries in both joined tables. Rows without matching entries in either table are excluded, resulting in a table that includes only matching pairs. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#inner-join} + * + * @param table the table to join. + * @param on the `on` clause. + * + * @example + * + * ```ts + * // Select all users and their pets + * const usersWithPets: { user: User; pets: Pet; }[] = await db.select() + * .from(users) + * .innerJoin(pets, eq(users.id, pets.ownerId)) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number; petId: number; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .innerJoin(pets, eq(users.id, pets.ownerId)) + * ``` + */ + innerJoin = this.createJoin("inner"); + /** + * Executes a `full join` operation by combining rows from two tables into a new table. + * + * Calling this method retrieves all rows from both main and joined tables, merging rows with matching values and filling in `null` for non-matching columns. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#full-join} + * + * @param table the table to join. + * @param on the `on` clause. + * + * @example + * + * ```ts + * // Select all users and their pets + * const usersWithPets: { user: User | null; pets: Pet | null; }[] = await db.select() + * .from(users) + * .fullJoin(pets, eq(users.id, pets.ownerId)) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number | null; petId: number | null; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .fullJoin(pets, eq(users.id, pets.ownerId)) + * ``` + */ + fullJoin = this.createJoin("full"); + /** + * Executes a `cross join` operation by combining rows from two tables into a new table. + * + * Calling this method retrieves all rows from both main and joined tables, merging all rows from each table. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#cross-join} + * + * @param table the table to join. + * + * @example + * + * ```ts + * // Select all users, each user with every pet + * const usersWithPets: { user: User; pets: Pet; }[] = await db.select() + * .from(users) + * .crossJoin(pets) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number; petId: number; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .crossJoin(pets) + * ``` + */ + crossJoin = this.createJoin("cross"); + createSetOperator(type, isAll) { + return (rightSelection) => { + const rightSelect = typeof rightSelection === "function" ? rightSelection(getSQLiteSetOperators()) : rightSelection; + if (!haveSameKeys(this.getSelectedFields(), rightSelect.getSelectedFields())) { + throw new Error( + "Set operator error (union / intersect / except): selected fields are not the same or are in a different order" + ); + } + this.config.setOperators.push({ type, isAll, rightSelect }); + return this; + }; + } + /** + * Adds `union` set operator to the query. + * + * Calling this method will combine the result sets of the `select` statements and remove any duplicate rows that appear across them. + * + * See docs: {@link https://orm.drizzle.team/docs/set-operations#union} + * + * @example + * + * ```ts + * // Select all unique names from customers and users tables + * await db.select({ name: users.name }) + * .from(users) + * .union( + * db.select({ name: customers.name }).from(customers) + * ); + * // or + * import { union } from 'drizzle-orm/sqlite-core' + * + * await union( + * db.select({ name: users.name }).from(users), + * db.select({ name: customers.name }).from(customers) + * ); + * ``` + */ + union = this.createSetOperator("union", false); + /** + * Adds `union all` set operator to the query. + * + * Calling this method will combine the result-set of the `select` statements and keep all duplicate rows that appear across them. + * + * See docs: {@link https://orm.drizzle.team/docs/set-operations#union-all} + * + * @example + * + * ```ts + * // Select all transaction ids from both online and in-store sales + * await db.select({ transaction: onlineSales.transactionId }) + * .from(onlineSales) + * .unionAll( + * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales) + * ); + * // or + * import { unionAll } from 'drizzle-orm/sqlite-core' + * + * await unionAll( + * db.select({ transaction: onlineSales.transactionId }).from(onlineSales), + * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales) + * ); + * ``` + */ + unionAll = this.createSetOperator("union", true); + /** + * Adds `intersect` set operator to the query. + * + * Calling this method will retain only the rows that are present in both result sets and eliminate duplicates. + * + * See docs: {@link https://orm.drizzle.team/docs/set-operations#intersect} + * + * @example + * + * ```ts + * // Select course names that are offered in both departments A and B + * await db.select({ courseName: depA.courseName }) + * .from(depA) + * .intersect( + * db.select({ courseName: depB.courseName }).from(depB) + * ); + * // or + * import { intersect } from 'drizzle-orm/sqlite-core' + * + * await intersect( + * db.select({ courseName: depA.courseName }).from(depA), + * db.select({ courseName: depB.courseName }).from(depB) + * ); + * ``` + */ + intersect = this.createSetOperator("intersect", false); + /** + * Adds `except` set operator to the query. + * + * Calling this method will retrieve all unique rows from the left query, except for the rows that are present in the result set of the right query. + * + * See docs: {@link https://orm.drizzle.team/docs/set-operations#except} + * + * @example + * + * ```ts + * // Select all courses offered in department A but not in department B + * await db.select({ courseName: depA.courseName }) + * .from(depA) + * .except( + * db.select({ courseName: depB.courseName }).from(depB) + * ); + * // or + * import { except } from 'drizzle-orm/sqlite-core' + * + * await except( + * db.select({ courseName: depA.courseName }).from(depA), + * db.select({ courseName: depB.courseName }).from(depB) + * ); + * ``` + */ + except = this.createSetOperator("except", false); + /** @internal */ + addSetOperators(setOperators) { + this.config.setOperators.push(...setOperators); + return this; + } + /** + * Adds a `where` clause to the query. + * + * Calling this method will select only those rows that fulfill a specified condition. + * + * See docs: {@link https://orm.drizzle.team/docs/select#filtering} + * + * @param where the `where` clause. + * + * @example + * You can use conditional operators and `sql function` to filter the rows to be selected. + * + * ```ts + * // Select all cars with green color + * await db.select().from(cars).where(eq(cars.color, 'green')); + * // or + * await db.select().from(cars).where(sql`${cars.color} = 'green'`) + * ``` + * + * You can logically combine conditional operators with `and()` and `or()` operators: + * + * ```ts + * // Select all BMW cars with a green color + * await db.select().from(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW'))); + * + * // Select all cars with the green or blue color + * await db.select().from(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue'))); + * ``` + */ + where(where) { + if (typeof where === "function") { + where = where( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ) + ); + } + this.config.where = where; + return this; + } + /** + * Adds a `having` clause to the query. + * + * Calling this method will select only those rows that fulfill a specified condition. It is typically used with aggregate functions to filter the aggregated data based on a specified condition. + * + * See docs: {@link https://orm.drizzle.team/docs/select#aggregations} + * + * @param having the `having` clause. + * + * @example + * + * ```ts + * // Select all brands with more than one car + * await db.select({ + * brand: cars.brand, + * count: sql`cast(count(${cars.id}) as int)`, + * }) + * .from(cars) + * .groupBy(cars.brand) + * .having(({ count }) => gt(count, 1)); + * ``` + */ + having(having) { + if (typeof having === "function") { + having = having( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ) + ); + } + this.config.having = having; + return this; + } + groupBy(...columns) { + if (typeof columns[0] === "function") { + const groupBy = columns[0]( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" }) + ) + ); + this.config.groupBy = Array.isArray(groupBy) ? groupBy : [groupBy]; + } else { + this.config.groupBy = columns; + } + return this; + } + orderBy(...columns) { + if (typeof columns[0] === "function") { + const orderBy = columns[0]( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" }) + ) + ); + const orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy]; + if (this.config.setOperators.length > 0) { + this.config.setOperators.at(-1).orderBy = orderByArray; + } else { + this.config.orderBy = orderByArray; + } + } else { + const orderByArray = columns; + if (this.config.setOperators.length > 0) { + this.config.setOperators.at(-1).orderBy = orderByArray; + } else { + this.config.orderBy = orderByArray; + } + } + return this; + } + /** + * Adds a `limit` clause to the query. + * + * Calling this method will set the maximum number of rows that will be returned by this query. + * + * See docs: {@link https://orm.drizzle.team/docs/select#limit--offset} + * + * @param limit the `limit` clause. + * + * @example + * + * ```ts + * // Get the first 10 people from this query. + * await db.select().from(people).limit(10); + * ``` + */ + limit(limit) { + if (this.config.setOperators.length > 0) { + this.config.setOperators.at(-1).limit = limit; + } else { + this.config.limit = limit; + } + return this; + } + /** + * Adds an `offset` clause to the query. + * + * Calling this method will skip a number of rows when returning results from this query. + * + * See docs: {@link https://orm.drizzle.team/docs/select#limit--offset} + * + * @param offset the `offset` clause. + * + * @example + * + * ```ts + * // Get the 10th-20th people from this query. + * await db.select().from(people).offset(10).limit(10); + * ``` + */ + offset(offset) { + if (this.config.setOperators.length > 0) { + this.config.setOperators.at(-1).offset = offset; + } else { + this.config.offset = offset; + } + return this; + } + /** @internal */ + getSQL() { + return this.dialect.buildSelectQuery(this.config); + } + toSQL() { + const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL()); + return rest; + } + as(alias) { + const usedTables = []; + usedTables.push(...extractUsedTable(this.config.table)); + if (this.config.joins) { + for (const it of this.config.joins) usedTables.push(...extractUsedTable(it.table)); + } + return new Proxy( + new Subquery(this.getSQL(), this.config.fields, alias, false, [...new Set(usedTables)]), + new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" }) + ); + } + /** @internal */ + getSelectedFields() { + return new Proxy( + this.config.fields, + new SelectionProxyHandler({ alias: this.tableName, sqlAliasedBehavior: "alias", sqlBehavior: "error" }) + ); + } + $dynamic() { + return this; + } + }; + SQLiteSelectBase = class extends SQLiteSelectQueryBuilderBase { + static { + __name(this, "SQLiteSelectBase"); + } + static [entityKind] = "SQLiteSelect"; + /** @internal */ + _prepare(isOneTimeQuery = true) { + if (!this.session) { + throw new Error("Cannot execute a query on a query builder. Please use a database instance instead."); + } + const fieldsList = orderSelectedFields(this.config.fields); + const query = this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + this.dialect.sqlToQuery(this.getSQL()), + fieldsList, + "all", + true, + void 0, + { + type: "select", + tables: [...this.usedTables] + }, + this.cacheConfig + ); + query.joinsNotNullableMap = this.joinsNotNullableMap; + return query; + } + $withCache(config3) { + this.cacheConfig = config3 === void 0 ? { config: {}, enable: true, autoInvalidate: true } : config3 === false ? { enable: false } : { enable: true, autoInvalidate: true, ...config3 }; + return this; + } + prepare() { + return this._prepare(false); + } + run = /* @__PURE__ */ __name((placeholderValues) => { + return this._prepare().run(placeholderValues); + }, "run"); + all = /* @__PURE__ */ __name((placeholderValues) => { + return this._prepare().all(placeholderValues); + }, "all"); + get = /* @__PURE__ */ __name((placeholderValues) => { + return this._prepare().get(placeholderValues); + }, "get"); + values = /* @__PURE__ */ __name((placeholderValues) => { + return this._prepare().values(placeholderValues); + }, "values"); + async execute() { + return this.all(); + } + }; + applyMixins(SQLiteSelectBase, [QueryPromise]); + __name(createSetOperator, "createSetOperator"); + getSQLiteSetOperators = /* @__PURE__ */ __name(() => ({ + union, + unionAll, + intersect, + except + }), "getSQLiteSetOperators"); + union = createSetOperator("union", false); + unionAll = createSetOperator("union", true); + intersect = createSetOperator("intersect", false); + except = createSetOperator("except", false); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/query-builder.js +var QueryBuilder; +var init_query_builder2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/query-builder.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_selection_proxy(); + init_dialect(); + init_subquery(); + init_select2(); + QueryBuilder = class { + static { + __name(this, "QueryBuilder"); + } + static [entityKind] = "SQLiteQueryBuilder"; + dialect; + dialectConfig; + constructor(dialect) { + this.dialect = is(dialect, SQLiteDialect) ? dialect : void 0; + this.dialectConfig = is(dialect, SQLiteDialect) ? void 0 : dialect; + } + $with = /* @__PURE__ */ __name((alias, selection) => { + const queryBuilder = this; + const as = /* @__PURE__ */ __name((qb) => { + if (typeof qb === "function") { + qb = qb(queryBuilder); + } + return new Proxy( + new WithSubquery( + qb.getSQL(), + selection ?? ("getSelectedFields" in qb ? qb.getSelectedFields() ?? {} : {}), + alias, + true + ), + new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" }) + ); + }, "as"); + return { as }; + }, "$with"); + with(...queries) { + const self2 = this; + function select(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: void 0, + dialect: self2.getDialect(), + withList: queries + }); + } + __name(select, "select"); + function selectDistinct(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: void 0, + dialect: self2.getDialect(), + withList: queries, + distinct: true + }); + } + __name(selectDistinct, "selectDistinct"); + return { select, selectDistinct }; + } + select(fields) { + return new SQLiteSelectBuilder({ fields: fields ?? void 0, session: void 0, dialect: this.getDialect() }); + } + selectDistinct(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: void 0, + dialect: this.getDialect(), + distinct: true + }); + } + // Lazy load dialect to avoid circular dependency + getDialect() { + if (!this.dialect) { + this.dialect = new SQLiteSyncDialect(this.dialectConfig); + } + return this.dialect; + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js +var SQLiteInsertBuilder, SQLiteInsertBase; +var init_insert = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + init_sql(); + init_table3(); + init_table(); + init_utils2(); + init_utils3(); + init_query_builder2(); + SQLiteInsertBuilder = class { + static { + __name(this, "SQLiteInsertBuilder"); + } + constructor(table3, session, dialect, withList) { + this.table = table3; + this.session = session; + this.dialect = dialect; + this.withList = withList; + } + static [entityKind] = "SQLiteInsertBuilder"; + values(values) { + values = Array.isArray(values) ? values : [values]; + if (values.length === 0) { + throw new Error("values() must be called with at least one value"); + } + const mappedValues = values.map((entry) => { + const result = {}; + const cols = this.table[Table.Symbol.Columns]; + for (const colKey of Object.keys(entry)) { + const colValue = entry[colKey]; + result[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]); + } + return result; + }); + return new SQLiteInsertBase(this.table, mappedValues, this.session, this.dialect, this.withList); + } + select(selectQuery) { + const select = typeof selectQuery === "function" ? selectQuery(new QueryBuilder()) : selectQuery; + if (!is(select, SQL) && !haveSameKeys(this.table[Columns], select._.selectedFields)) { + throw new Error( + "Insert select error: selected fields are not the same or are in a different order compared to the table definition" + ); + } + return new SQLiteInsertBase(this.table, select, this.session, this.dialect, this.withList, true); + } + }; + SQLiteInsertBase = class extends QueryPromise { + static { + __name(this, "SQLiteInsertBase"); + } + constructor(table3, values, session, dialect, withList, select) { + super(); + this.session = session; + this.dialect = dialect; + this.config = { table: table3, values, withList, select }; + } + static [entityKind] = "SQLiteInsert"; + /** @internal */ + config; + returning(fields = this.config.table[SQLiteTable.Symbol.Columns]) { + this.config.returning = orderSelectedFields(fields); + return this; + } + /** + * Adds an `on conflict do nothing` clause to the query. + * + * Calling this method simply avoids inserting a row as its alternative action. + * + * See docs: {@link https://orm.drizzle.team/docs/insert#on-conflict-do-nothing} + * + * @param config The `target` and `where` clauses. + * + * @example + * ```ts + * // Insert one row and cancel the insert if there's a conflict + * await db.insert(cars) + * .values({ id: 1, brand: 'BMW' }) + * .onConflictDoNothing(); + * + * // Explicitly specify conflict target + * await db.insert(cars) + * .values({ id: 1, brand: 'BMW' }) + * .onConflictDoNothing({ target: cars.id }); + * ``` + */ + onConflictDoNothing(config3 = {}) { + if (!this.config.onConflict) this.config.onConflict = []; + if (config3.target === void 0) { + this.config.onConflict.push(sql` on conflict do nothing`); + } else { + const targetSql = Array.isArray(config3.target) ? sql`${config3.target}` : sql`${[config3.target]}`; + const whereSql = config3.where ? sql` where ${config3.where}` : sql``; + this.config.onConflict.push(sql` on conflict ${targetSql} do nothing${whereSql}`); + } + return this; + } + /** + * Adds an `on conflict do update` clause to the query. + * + * Calling this method will update the existing row that conflicts with the row proposed for insertion as its alternative action. + * + * See docs: {@link https://orm.drizzle.team/docs/insert#upserts-and-conflicts} + * + * @param config The `target`, `set` and `where` clauses. + * + * @example + * ```ts + * // Update the row if there's a conflict + * await db.insert(cars) + * .values({ id: 1, brand: 'BMW' }) + * .onConflictDoUpdate({ + * target: cars.id, + * set: { brand: 'Porsche' } + * }); + * + * // Upsert with 'where' clause + * await db.insert(cars) + * .values({ id: 1, brand: 'BMW' }) + * .onConflictDoUpdate({ + * target: cars.id, + * set: { brand: 'newBMW' }, + * where: sql`${cars.createdAt} > '2023-01-01'::date`, + * }); + * ``` + */ + onConflictDoUpdate(config3) { + if (config3.where && (config3.targetWhere || config3.setWhere)) { + throw new Error( + 'You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.' + ); + } + if (!this.config.onConflict) this.config.onConflict = []; + const whereSql = config3.where ? sql` where ${config3.where}` : void 0; + const targetWhereSql = config3.targetWhere ? sql` where ${config3.targetWhere}` : void 0; + const setWhereSql = config3.setWhere ? sql` where ${config3.setWhere}` : void 0; + const targetSql = Array.isArray(config3.target) ? sql`${config3.target}` : sql`${[config3.target]}`; + const setSql = this.dialect.buildUpdateSet(this.config.table, mapUpdateSet(this.config.table, config3.set)); + this.config.onConflict.push( + sql` on conflict ${targetSql}${targetWhereSql} do update set ${setSql}${whereSql}${setWhereSql}` + ); + return this; + } + /** @internal */ + getSQL() { + return this.dialect.buildInsertQuery(this.config); + } + toSQL() { + const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL()); + return rest; + } + /** @internal */ + _prepare(isOneTimeQuery = true) { + return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + this.dialect.sqlToQuery(this.getSQL()), + this.config.returning, + this.config.returning ? "all" : "run", + true, + void 0, + { + type: "insert", + tables: extractUsedTable(this.config.table) + } + ); + } + prepare() { + return this._prepare(false); + } + run = /* @__PURE__ */ __name((placeholderValues) => { + return this._prepare().run(placeholderValues); + }, "run"); + all = /* @__PURE__ */ __name((placeholderValues) => { + return this._prepare().all(placeholderValues); + }, "all"); + get = /* @__PURE__ */ __name((placeholderValues) => { + return this._prepare().get(placeholderValues); + }, "get"); + values = /* @__PURE__ */ __name((placeholderValues) => { + return this._prepare().values(placeholderValues); + }, "values"); + async execute() { + return this.config.returning ? this.all() : this.run(); + } + $dynamic() { + return this; + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.types.js +var init_select_types = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.types.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/update.js +var SQLiteUpdateBuilder, SQLiteUpdateBase; +var init_update = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/update.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + init_selection_proxy(); + init_table3(); + init_subquery(); + init_table(); + init_utils2(); + init_view_common(); + init_utils3(); + init_view_base(); + SQLiteUpdateBuilder = class { + static { + __name(this, "SQLiteUpdateBuilder"); + } + constructor(table3, session, dialect, withList) { + this.table = table3; + this.session = session; + this.dialect = dialect; + this.withList = withList; + } + static [entityKind] = "SQLiteUpdateBuilder"; + set(values) { + return new SQLiteUpdateBase( + this.table, + mapUpdateSet(this.table, values), + this.session, + this.dialect, + this.withList + ); + } + }; + SQLiteUpdateBase = class extends QueryPromise { + static { + __name(this, "SQLiteUpdateBase"); + } + constructor(table3, set2, session, dialect, withList) { + super(); + this.session = session; + this.dialect = dialect; + this.config = { set: set2, table: table3, withList, joins: [] }; + } + static [entityKind] = "SQLiteUpdate"; + /** @internal */ + config; + from(source) { + this.config.from = source; + return this; + } + createJoin(joinType) { + return (table3, on2) => { + const tableName = getTableLikeName(table3); + if (typeof tableName === "string" && this.config.joins.some((join3) => join3.alias === tableName)) { + throw new Error(`Alias "${tableName}" is already used in this query`); + } + if (typeof on2 === "function") { + const from = this.config.from ? is(table3, SQLiteTable) ? table3[Table.Symbol.Columns] : is(table3, Subquery) ? table3._.selectedFields : is(table3, SQLiteViewBase) ? table3[ViewBaseConfig].selectedFields : void 0 : void 0; + on2 = on2( + new Proxy( + this.config.table[Table.Symbol.Columns], + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ), + from && new Proxy( + from, + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ) + ); + } + this.config.joins.push({ on: on2, table: table3, joinType, alias: tableName }); + return this; + }; + } + leftJoin = this.createJoin("left"); + rightJoin = this.createJoin("right"); + innerJoin = this.createJoin("inner"); + fullJoin = this.createJoin("full"); + /** + * Adds a 'where' clause to the query. + * + * Calling this method will update only those rows that fulfill a specified condition. + * + * See docs: {@link https://orm.drizzle.team/docs/update} + * + * @param where the 'where' clause. + * + * @example + * You can use conditional operators and `sql function` to filter the rows to be updated. + * + * ```ts + * // Update all cars with green color + * db.update(cars).set({ color: 'red' }) + * .where(eq(cars.color, 'green')); + * // or + * db.update(cars).set({ color: 'red' }) + * .where(sql`${cars.color} = 'green'`) + * ``` + * + * You can logically combine conditional operators with `and()` and `or()` operators: + * + * ```ts + * // Update all BMW cars with a green color + * db.update(cars).set({ color: 'red' }) + * .where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW'))); + * + * // Update all cars with the green or blue color + * db.update(cars).set({ color: 'red' }) + * .where(or(eq(cars.color, 'green'), eq(cars.color, 'blue'))); + * ``` + */ + where(where) { + this.config.where = where; + return this; + } + orderBy(...columns) { + if (typeof columns[0] === "function") { + const orderBy = columns[0]( + new Proxy( + this.config.table[Table.Symbol.Columns], + new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" }) + ) + ); + const orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy]; + this.config.orderBy = orderByArray; + } else { + const orderByArray = columns; + this.config.orderBy = orderByArray; + } + return this; + } + limit(limit) { + this.config.limit = limit; + return this; + } + returning(fields = this.config.table[SQLiteTable.Symbol.Columns]) { + this.config.returning = orderSelectedFields(fields); + return this; + } + /** @internal */ + getSQL() { + return this.dialect.buildUpdateQuery(this.config); + } + toSQL() { + const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL()); + return rest; + } + /** @internal */ + _prepare(isOneTimeQuery = true) { + return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + this.dialect.sqlToQuery(this.getSQL()), + this.config.returning, + this.config.returning ? "all" : "run", + true, + void 0, + { + type: "insert", + tables: extractUsedTable(this.config.table) + } + ); + } + prepare() { + return this._prepare(false); + } + run = /* @__PURE__ */ __name((placeholderValues) => { + return this._prepare().run(placeholderValues); + }, "run"); + all = /* @__PURE__ */ __name((placeholderValues) => { + return this._prepare().all(placeholderValues); + }, "all"); + get = /* @__PURE__ */ __name((placeholderValues) => { + return this._prepare().get(placeholderValues); + }, "get"); + values = /* @__PURE__ */ __name((placeholderValues) => { + return this._prepare().values(placeholderValues); + }, "values"); + async execute() { + return this.config.returning ? this.all() : this.run(); + } + $dynamic() { + return this; + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/index.js +var init_query_builders = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/index.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_delete(); + init_insert(); + init_query_builder2(); + init_select2(); + init_select_types(); + init_update(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/count.js +var SQLiteCountBuilder; +var init_count = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/count.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_sql(); + SQLiteCountBuilder = class _SQLiteCountBuilder extends SQL { + static { + __name(this, "SQLiteCountBuilder"); + } + constructor(params) { + super(_SQLiteCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks); + this.params = params; + this.session = params.session; + this.sql = _SQLiteCountBuilder.buildCount( + params.source, + params.filters + ); + } + sql; + static [entityKind] = "SQLiteCountBuilderAsync"; + [Symbol.toStringTag] = "SQLiteCountBuilderAsync"; + session; + static buildEmbeddedCount(source, filters) { + return sql`(select count(*) from ${source}${sql.raw(" where ").if(filters)}${filters})`; + } + static buildCount(source, filters) { + return sql`select count(*) from ${source}${sql.raw(" where ").if(filters)}${filters}`; + } + then(onfulfilled, onrejected) { + return Promise.resolve(this.session.count(this.sql)).then( + onfulfilled, + onrejected + ); + } + catch(onRejected) { + return this.then(void 0, onRejected); + } + finally(onFinally) { + return this.then( + (value) => { + onFinally?.(); + return value; + }, + (reason) => { + onFinally?.(); + throw reason; + } + ); + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/query.js +var RelationalQueryBuilder, SQLiteRelationalQuery, SQLiteSyncRelationalQuery; +var init_query = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/query.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + init_relations(); + RelationalQueryBuilder = class { + static { + __name(this, "RelationalQueryBuilder"); + } + constructor(mode, fullSchema, schema, tableNamesMap, table3, tableConfig, dialect, session) { + this.mode = mode; + this.fullSchema = fullSchema; + this.schema = schema; + this.tableNamesMap = tableNamesMap; + this.table = table3; + this.tableConfig = tableConfig; + this.dialect = dialect; + this.session = session; + } + static [entityKind] = "SQLiteAsyncRelationalQueryBuilder"; + findMany(config3) { + return this.mode === "sync" ? new SQLiteSyncRelationalQuery( + this.fullSchema, + this.schema, + this.tableNamesMap, + this.table, + this.tableConfig, + this.dialect, + this.session, + config3 ? config3 : {}, + "many" + ) : new SQLiteRelationalQuery( + this.fullSchema, + this.schema, + this.tableNamesMap, + this.table, + this.tableConfig, + this.dialect, + this.session, + config3 ? config3 : {}, + "many" + ); + } + findFirst(config3) { + return this.mode === "sync" ? new SQLiteSyncRelationalQuery( + this.fullSchema, + this.schema, + this.tableNamesMap, + this.table, + this.tableConfig, + this.dialect, + this.session, + config3 ? { ...config3, limit: 1 } : { limit: 1 }, + "first" + ) : new SQLiteRelationalQuery( + this.fullSchema, + this.schema, + this.tableNamesMap, + this.table, + this.tableConfig, + this.dialect, + this.session, + config3 ? { ...config3, limit: 1 } : { limit: 1 }, + "first" + ); + } + }; + SQLiteRelationalQuery = class extends QueryPromise { + static { + __name(this, "SQLiteRelationalQuery"); + } + constructor(fullSchema, schema, tableNamesMap, table3, tableConfig, dialect, session, config3, mode) { + super(); + this.fullSchema = fullSchema; + this.schema = schema; + this.tableNamesMap = tableNamesMap; + this.table = table3; + this.tableConfig = tableConfig; + this.dialect = dialect; + this.session = session; + this.config = config3; + this.mode = mode; + } + static [entityKind] = "SQLiteAsyncRelationalQuery"; + /** @internal */ + mode; + /** @internal */ + getSQL() { + return this.dialect.buildRelationalQuery({ + fullSchema: this.fullSchema, + schema: this.schema, + tableNamesMap: this.tableNamesMap, + table: this.table, + tableConfig: this.tableConfig, + queryConfig: this.config, + tableAlias: this.tableConfig.tsName + }).sql; + } + /** @internal */ + _prepare(isOneTimeQuery = false) { + const { query, builtQuery } = this._toSQL(); + return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + builtQuery, + void 0, + this.mode === "first" ? "get" : "all", + true, + (rawRows, mapColumnValue) => { + const rows = rawRows.map( + (row) => mapRelationalRow(this.schema, this.tableConfig, row, query.selection, mapColumnValue) + ); + if (this.mode === "first") { + return rows[0]; + } + return rows; + } + ); + } + prepare() { + return this._prepare(false); + } + _toSQL() { + const query = this.dialect.buildRelationalQuery({ + fullSchema: this.fullSchema, + schema: this.schema, + tableNamesMap: this.tableNamesMap, + table: this.table, + tableConfig: this.tableConfig, + queryConfig: this.config, + tableAlias: this.tableConfig.tsName + }); + const builtQuery = this.dialect.sqlToQuery(query.sql); + return { query, builtQuery }; + } + toSQL() { + return this._toSQL().builtQuery; + } + /** @internal */ + executeRaw() { + if (this.mode === "first") { + return this._prepare(false).get(); + } + return this._prepare(false).all(); + } + async execute() { + return this.executeRaw(); + } + }; + SQLiteSyncRelationalQuery = class extends SQLiteRelationalQuery { + static { + __name(this, "SQLiteSyncRelationalQuery"); + } + static [entityKind] = "SQLiteSyncRelationalQuery"; + sync() { + return this.executeRaw(); + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/raw.js +var SQLiteRaw; +var init_raw = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/raw.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + SQLiteRaw = class extends QueryPromise { + static { + __name(this, "SQLiteRaw"); + } + constructor(execute, getSQL, action, dialect, mapBatchResult) { + super(); + this.execute = execute; + this.getSQL = getSQL; + this.dialect = dialect; + this.mapBatchResult = mapBatchResult; + this.config = { action }; + } + static [entityKind] = "SQLiteRaw"; + /** @internal */ + config; + getQuery() { + return { ...this.dialect.sqlToQuery(this.getSQL()), method: this.config.action }; + } + mapResult(result, isFromBatch) { + return isFromBatch ? this.mapBatchResult(result) : result; + } + _prepare() { + return this; + } + /** @internal */ + isResponseInArrayMode() { + return false; + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/db.js +var BaseSQLiteDatabase; +var init_db = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/db.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_selection_proxy(); + init_sql(); + init_query_builders(); + init_subquery(); + init_count(); + init_query(); + init_raw(); + BaseSQLiteDatabase = class { + static { + __name(this, "BaseSQLiteDatabase"); + } + constructor(resultKind, dialect, session, schema) { + this.resultKind = resultKind; + this.dialect = dialect; + this.session = session; + this._ = schema ? { + schema: schema.schema, + fullSchema: schema.fullSchema, + tableNamesMap: schema.tableNamesMap + } : { + schema: void 0, + fullSchema: {}, + tableNamesMap: {} + }; + this.query = {}; + const query = this.query; + if (this._.schema) { + for (const [tableName, columns] of Object.entries(this._.schema)) { + query[tableName] = new RelationalQueryBuilder( + resultKind, + schema.fullSchema, + this._.schema, + this._.tableNamesMap, + schema.fullSchema[tableName], + columns, + dialect, + session + ); + } + } + this.$cache = { invalidate: /* @__PURE__ */ __name(async (_params) => { + }, "invalidate") }; + } + static [entityKind] = "BaseSQLiteDatabase"; + query; + /** + * Creates a subquery that defines a temporary named result set as a CTE. + * + * It is useful for breaking down complex queries into simpler parts and for reusing the result set in subsequent parts of the query. + * + * See docs: {@link https://orm.drizzle.team/docs/select#with-clause} + * + * @param alias The alias for the subquery. + * + * Failure to provide an alias will result in a DrizzleTypeError, preventing the subquery from being referenced in other queries. + * + * @example + * + * ```ts + * // Create a subquery with alias 'sq' and use it in the select query + * const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42))); + * + * const result = await db.with(sq).select().from(sq); + * ``` + * + * To select arbitrary SQL values as fields in a CTE and reference them in other CTEs or in the main query, you need to add aliases to them: + * + * ```ts + * // Select an arbitrary SQL value as a field in a CTE and reference it in the main query + * const sq = db.$with('sq').as(db.select({ + * name: sql`upper(${users.name})`.as('name'), + * }) + * .from(users)); + * + * const result = await db.with(sq).select({ name: sq.name }).from(sq); + * ``` + */ + $with = /* @__PURE__ */ __name((alias, selection) => { + const self2 = this; + const as = /* @__PURE__ */ __name((qb) => { + if (typeof qb === "function") { + qb = qb(new QueryBuilder(self2.dialect)); + } + return new Proxy( + new WithSubquery( + qb.getSQL(), + selection ?? ("getSelectedFields" in qb ? qb.getSelectedFields() ?? {} : {}), + alias, + true + ), + new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" }) + ); + }, "as"); + return { as }; + }, "$with"); + $count(source, filters) { + return new SQLiteCountBuilder({ source, filters, session: this.session }); + } + /** + * Incorporates a previously defined CTE (using `$with`) into the main query. + * + * This method allows the main query to reference a temporary named result set. + * + * See docs: {@link https://orm.drizzle.team/docs/select#with-clause} + * + * @param queries The CTEs to incorporate into the main query. + * + * @example + * + * ```ts + * // Define a subquery 'sq' as a CTE using $with + * const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42))); + * + * // Incorporate the CTE 'sq' into the main query and select from it + * const result = await db.with(sq).select().from(sq); + * ``` + */ + with(...queries) { + const self2 = this; + function select(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: self2.session, + dialect: self2.dialect, + withList: queries + }); + } + __name(select, "select"); + function selectDistinct(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: self2.session, + dialect: self2.dialect, + withList: queries, + distinct: true + }); + } + __name(selectDistinct, "selectDistinct"); + function update(table3) { + return new SQLiteUpdateBuilder(table3, self2.session, self2.dialect, queries); + } + __name(update, "update"); + function insert(into) { + return new SQLiteInsertBuilder(into, self2.session, self2.dialect, queries); + } + __name(insert, "insert"); + function delete_(from) { + return new SQLiteDeleteBase(from, self2.session, self2.dialect, queries); + } + __name(delete_, "delete_"); + return { select, selectDistinct, update, insert, delete: delete_ }; + } + select(fields) { + return new SQLiteSelectBuilder({ fields: fields ?? void 0, session: this.session, dialect: this.dialect }); + } + selectDistinct(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: this.session, + dialect: this.dialect, + distinct: true + }); + } + /** + * Creates an update query. + * + * Calling this method without `.where()` clause will update all rows in a table. The `.where()` clause specifies which rows should be updated. + * + * Use `.set()` method to specify which values to update. + * + * See docs: {@link https://orm.drizzle.team/docs/update} + * + * @param table The table to update. + * + * @example + * + * ```ts + * // Update all rows in the 'cars' table + * await db.update(cars).set({ color: 'red' }); + * + * // Update rows with filters and conditions + * await db.update(cars).set({ color: 'red' }).where(eq(cars.brand, 'BMW')); + * + * // Update with returning clause + * const updatedCar: Car[] = await db.update(cars) + * .set({ color: 'red' }) + * .where(eq(cars.id, 1)) + * .returning(); + * ``` + */ + update(table3) { + return new SQLiteUpdateBuilder(table3, this.session, this.dialect); + } + $cache; + /** + * Creates an insert query. + * + * Calling this method will create new rows in a table. Use `.values()` method to specify which values to insert. + * + * See docs: {@link https://orm.drizzle.team/docs/insert} + * + * @param table The table to insert into. + * + * @example + * + * ```ts + * // Insert one row + * await db.insert(cars).values({ brand: 'BMW' }); + * + * // Insert multiple rows + * await db.insert(cars).values([{ brand: 'BMW' }, { brand: 'Porsche' }]); + * + * // Insert with returning clause + * const insertedCar: Car[] = await db.insert(cars) + * .values({ brand: 'BMW' }) + * .returning(); + * ``` + */ + insert(into) { + return new SQLiteInsertBuilder(into, this.session, this.dialect); + } + /** + * Creates a delete query. + * + * Calling this method without `.where()` clause will delete all rows in a table. The `.where()` clause specifies which rows should be deleted. + * + * See docs: {@link https://orm.drizzle.team/docs/delete} + * + * @param table The table to delete from. + * + * @example + * + * ```ts + * // Delete all rows in the 'cars' table + * await db.delete(cars); + * + * // Delete rows with filters and conditions + * await db.delete(cars).where(eq(cars.color, 'green')); + * + * // Delete with returning clause + * const deletedCar: Car[] = await db.delete(cars) + * .where(eq(cars.id, 1)) + * .returning(); + * ``` + */ + delete(from) { + return new SQLiteDeleteBase(from, this.session, this.dialect); + } + run(query) { + const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL(); + if (this.resultKind === "async") { + return new SQLiteRaw( + async () => this.session.run(sequel), + () => sequel, + "run", + this.dialect, + this.session.extractRawRunValueFromBatchResult.bind(this.session) + ); + } + return this.session.run(sequel); + } + all(query) { + const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL(); + if (this.resultKind === "async") { + return new SQLiteRaw( + async () => this.session.all(sequel), + () => sequel, + "all", + this.dialect, + this.session.extractRawAllValueFromBatchResult.bind(this.session) + ); + } + return this.session.all(sequel); + } + get(query) { + const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL(); + if (this.resultKind === "async") { + return new SQLiteRaw( + async () => this.session.get(sequel), + () => sequel, + "get", + this.dialect, + this.session.extractRawGetValueFromBatchResult.bind(this.session) + ); + } + return this.session.get(sequel); + } + values(query) { + const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL(); + if (this.resultKind === "async") { + return new SQLiteRaw( + async () => this.session.values(sequel), + () => sequel, + "values", + this.dialect, + this.session.extractRawValuesValueFromBatchResult.bind(this.session) + ); + } + return this.session.values(sequel); + } + transaction(transaction, config3) { + return this.session.transaction(transaction, config3); + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/cache/core/cache.js +async function hashQuery(sql2, params) { + const dataToHash = `${sql2}-${JSON.stringify(params)}`; + const encoder2 = new TextEncoder(); + const data = encoder2.encode(dataToHash); + const hashBuffer = await crypto.subtle.digest("SHA-256", data); + const hashArray = [...new Uint8Array(hashBuffer)]; + const hashHex = hashArray.map((b) => b.toString(16).padStart(2, "0")).join(""); + return hashHex; +} +var Cache, NoopCache; +var init_cache = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/cache/core/cache.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + Cache = class { + static { + __name(this, "Cache"); + } + static [entityKind] = "Cache"; + }; + NoopCache = class extends Cache { + static { + __name(this, "NoopCache"); + } + strategy() { + return "all"; + } + static [entityKind] = "NoopCache"; + async get(_key2) { + return void 0; + } + async put(_hashedQuery, _response, _tables, _config) { + } + async onMutate(_params) { + } + }; + __name(hashQuery, "hashQuery"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/alias.js +var init_alias2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/alias.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/session.js +var ExecuteResultSync, SQLitePreparedQuery, SQLiteSession, SQLiteTransaction; +var init_session = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/session.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_cache(); + init_entity(); + init_errors(); + init_query_promise(); + init_db(); + ExecuteResultSync = class extends QueryPromise { + static { + __name(this, "ExecuteResultSync"); + } + constructor(resultCb) { + super(); + this.resultCb = resultCb; + } + static [entityKind] = "ExecuteResultSync"; + async execute() { + return this.resultCb(); + } + sync() { + return this.resultCb(); + } + }; + SQLitePreparedQuery = class { + static { + __name(this, "SQLitePreparedQuery"); + } + constructor(mode, executeMethod, query, cache2, queryMetadata, cacheConfig) { + this.mode = mode; + this.executeMethod = executeMethod; + this.query = query; + this.cache = cache2; + this.queryMetadata = queryMetadata; + this.cacheConfig = cacheConfig; + if (cache2 && cache2.strategy() === "all" && cacheConfig === void 0) { + this.cacheConfig = { enable: true, autoInvalidate: true }; + } + if (!this.cacheConfig?.enable) { + this.cacheConfig = void 0; + } + } + static [entityKind] = "PreparedQuery"; + /** @internal */ + joinsNotNullableMap; + /** @internal */ + async queryWithCache(queryString, params, query) { + if (this.cache === void 0 || is(this.cache, NoopCache) || this.queryMetadata === void 0) { + try { + return await query(); + } catch (e) { + throw new DrizzleQueryError(queryString, params, e); + } + } + if (this.cacheConfig && !this.cacheConfig.enable) { + try { + return await query(); + } catch (e) { + throw new DrizzleQueryError(queryString, params, e); + } + } + if ((this.queryMetadata.type === "insert" || this.queryMetadata.type === "update" || this.queryMetadata.type === "delete") && this.queryMetadata.tables.length > 0) { + try { + const [res] = await Promise.all([ + query(), + this.cache.onMutate({ tables: this.queryMetadata.tables }) + ]); + return res; + } catch (e) { + throw new DrizzleQueryError(queryString, params, e); + } + } + if (!this.cacheConfig) { + try { + return await query(); + } catch (e) { + throw new DrizzleQueryError(queryString, params, e); + } + } + if (this.queryMetadata.type === "select") { + const fromCache = await this.cache.get( + this.cacheConfig.tag ?? await hashQuery(queryString, params), + this.queryMetadata.tables, + this.cacheConfig.tag !== void 0, + this.cacheConfig.autoInvalidate + ); + if (fromCache === void 0) { + let result; + try { + result = await query(); + } catch (e) { + throw new DrizzleQueryError(queryString, params, e); + } + await this.cache.put( + this.cacheConfig.tag ?? await hashQuery(queryString, params), + result, + // make sure we send tables that were used in a query only if user wants to invalidate it on each write + this.cacheConfig.autoInvalidate ? this.queryMetadata.tables : [], + this.cacheConfig.tag !== void 0, + this.cacheConfig.config + ); + return result; + } + return fromCache; + } + try { + return await query(); + } catch (e) { + throw new DrizzleQueryError(queryString, params, e); + } + } + getQuery() { + return this.query; + } + mapRunResult(result, _isFromBatch) { + return result; + } + mapAllResult(_result, _isFromBatch) { + throw new Error("Not implemented"); + } + mapGetResult(_result, _isFromBatch) { + throw new Error("Not implemented"); + } + execute(placeholderValues) { + if (this.mode === "async") { + return this[this.executeMethod](placeholderValues); + } + return new ExecuteResultSync(() => this[this.executeMethod](placeholderValues)); + } + mapResult(response, isFromBatch) { + switch (this.executeMethod) { + case "run": { + return this.mapRunResult(response, isFromBatch); + } + case "all": { + return this.mapAllResult(response, isFromBatch); + } + case "get": { + return this.mapGetResult(response, isFromBatch); + } + } + } + }; + SQLiteSession = class { + static { + __name(this, "SQLiteSession"); + } + constructor(dialect) { + this.dialect = dialect; + } + static [entityKind] = "SQLiteSession"; + prepareOneTimeQuery(query, fields, executeMethod, isResponseInArrayMode, customResultMapper, queryMetadata, cacheConfig) { + return this.prepareQuery( + query, + fields, + executeMethod, + isResponseInArrayMode, + customResultMapper, + queryMetadata, + cacheConfig + ); + } + run(query) { + const staticQuery = this.dialect.sqlToQuery(query); + try { + return this.prepareOneTimeQuery(staticQuery, void 0, "run", false).run(); + } catch (err) { + throw new DrizzleError({ cause: err, message: `Failed to run the query '${staticQuery.sql}'` }); + } + } + /** @internal */ + extractRawRunValueFromBatchResult(result) { + return result; + } + all(query) { + return this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), void 0, "run", false).all(); + } + /** @internal */ + extractRawAllValueFromBatchResult(_result) { + throw new Error("Not implemented"); + } + get(query) { + return this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), void 0, "run", false).get(); + } + /** @internal */ + extractRawGetValueFromBatchResult(_result) { + throw new Error("Not implemented"); + } + values(query) { + return this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), void 0, "run", false).values(); + } + async count(sql2) { + const result = await this.values(sql2); + return result[0][0]; + } + /** @internal */ + extractRawValuesValueFromBatchResult(_result) { + throw new Error("Not implemented"); + } + }; + SQLiteTransaction = class extends BaseSQLiteDatabase { + static { + __name(this, "SQLiteTransaction"); + } + constructor(resultType, dialect, session, schema, nestedIndex = 0) { + super(resultType, dialect, session, schema); + this.schema = schema; + this.nestedIndex = nestedIndex; + } + static [entityKind] = "SQLiteTransaction"; + rollback() { + throw new TransactionRollbackError(); + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/subquery.js +var init_subquery2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/subquery.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/view.js +var ViewBuilderCore, ViewBuilder, ManualViewBuilder, SQLiteView; +var init_view = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/view.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_selection_proxy(); + init_utils2(); + init_query_builder2(); + init_table3(); + init_view_base(); + ViewBuilderCore = class { + static { + __name(this, "ViewBuilderCore"); + } + constructor(name) { + this.name = name; + } + static [entityKind] = "SQLiteViewBuilderCore"; + config = {}; + }; + ViewBuilder = class extends ViewBuilderCore { + static { + __name(this, "ViewBuilder"); + } + static [entityKind] = "SQLiteViewBuilder"; + as(qb) { + if (typeof qb === "function") { + qb = qb(new QueryBuilder()); + } + const selectionProxy = new SelectionProxyHandler({ + alias: this.name, + sqlBehavior: "error", + sqlAliasedBehavior: "alias", + replaceOriginalName: true + }); + const aliasedSelectedFields = qb.getSelectedFields(); + return new Proxy( + new SQLiteView({ + // sqliteConfig: this.config, + config: { + name: this.name, + schema: void 0, + selectedFields: aliasedSelectedFields, + query: qb.getSQL().inlineParams() + } + }), + selectionProxy + ); + } + }; + ManualViewBuilder = class extends ViewBuilderCore { + static { + __name(this, "ManualViewBuilder"); + } + static [entityKind] = "SQLiteManualViewBuilder"; + columns; + constructor(name, columns) { + super(name); + this.columns = getTableColumns(sqliteTable(name, columns)); + } + existing() { + return new Proxy( + new SQLiteView({ + config: { + name: this.name, + schema: void 0, + selectedFields: this.columns, + query: void 0 + } + }), + new SelectionProxyHandler({ + alias: this.name, + sqlBehavior: "error", + sqlAliasedBehavior: "alias", + replaceOriginalName: true + }) + ); + } + as(query) { + return new Proxy( + new SQLiteView({ + config: { + name: this.name, + schema: void 0, + selectedFields: this.columns, + query: query.inlineParams() + } + }), + new SelectionProxyHandler({ + alias: this.name, + sqlBehavior: "error", + sqlAliasedBehavior: "alias", + replaceOriginalName: true + }) + ); + } + }; + SQLiteView = class extends SQLiteViewBase { + static { + __name(this, "SQLiteView"); + } + static [entityKind] = "SQLiteView"; + constructor({ config: config3 }) { + super(config3); + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/index.js +var init_sqlite_core = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/index.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_alias2(); + init_checks(); + init_columns(); + init_db(); + init_dialect(); + init_foreign_keys2(); + init_indexes(); + init_primary_keys2(); + init_query_builders(); + init_session(); + init_subquery2(); + init_table3(); + init_unique_constraint2(); + init_utils3(); + init_view(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/operations.js +var init_operations = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/operations.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/index.js +var init_drizzle_orm = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/index.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_alias(); + init_column_builder(); + init_column(); + init_entity(); + init_errors(); + init_logger(); + init_operations(); + init_query_promise(); + init_relations(); + init_sql2(); + init_subquery(); + init_table(); + init_utils2(); + init_view_common(); + } +}); + +// ../../packages/db_helper_sqlite/src/db/schema.ts +var schema_exports = {}; +__export(schema_exports, { + addressAreas: () => addressAreas, + addressAreasRelations: () => addressAreasRelations, + addressZones: () => addressZones, + addressZonesRelations: () => addressZonesRelations, + addresses: () => addresses, + addressesRelations: () => addressesRelations, + cartItems: () => cartItems, + cartItemsRelations: () => cartItemsRelations, + complaints: () => complaints, + complaintsRelations: () => complaintsRelations, + couponApplicableProducts: () => couponApplicableProducts, + couponApplicableProductsRelations: () => couponApplicableProductsRelations, + couponApplicableUsers: () => couponApplicableUsers, + couponApplicableUsersRelations: () => couponApplicableUsersRelations, + couponUsage: () => couponUsage, + couponUsageRelations: () => couponUsageRelations, + coupons: () => coupons, + couponsRelations: () => couponsRelations, + deliverySlotInfo: () => deliverySlotInfo, + deliverySlotInfoRelations: () => deliverySlotInfoRelations, + homeBanners: () => homeBanners, + homeBannersRelations: () => homeBannersRelations, + keyValStore: () => keyValStore, + notifCreds: () => notifCreds, + notifCredsRelations: () => notifCredsRelations, + notifications: () => notifications, + notificationsRelations: () => notificationsRelations, + orderItems: () => orderItems, + orderItemsRelations: () => orderItemsRelations, + orderStatus: () => orderStatus, + orderStatusRelations: () => orderStatusRelations, + orders: () => orders, + ordersRelations: () => ordersRelations, + paymentInfoRelations: () => paymentInfoRelations, + paymentInfoTable: () => paymentInfoTable, + paymentStatusEnum: () => paymentStatusEnum, + payments: () => payments, + paymentsRelations: () => paymentsRelations, + productCategories: () => productCategories, + productCategoriesRelations: () => productCategoriesRelations, + productGroupInfo: () => productGroupInfo, + productGroupInfoRelations: () => productGroupInfoRelations, + productGroupMembership: () => productGroupMembership, + productGroupMembershipRelations: () => productGroupMembershipRelations, + productInfo: () => productInfo, + productInfoRelations: () => productInfoRelations, + productReviews: () => productReviews, + productReviewsRelations: () => productReviewsRelations, + productSlots: () => productSlots, + productSlotsRelations: () => productSlotsRelations, + productTagInfo: () => productTagInfo, + productTagInfoRelations: () => productTagInfoRelations, + productTags: () => productTags, + productTagsRelations: () => productTagsRelations, + refunds: () => refunds, + refundsRelations: () => refundsRelations, + reservedCoupons: () => reservedCoupons, + reservedCouponsRelations: () => reservedCouponsRelations, + specialDeals: () => specialDeals, + specialDealsRelations: () => specialDealsRelations, + staffPermissionEnum: () => staffPermissionEnum, + staffPermissions: () => staffPermissions, + staffPermissionsRelations: () => staffPermissionsRelations, + staffRoleEnum: () => staffRoleEnum, + staffRolePermissions: () => staffRolePermissions, + staffRolePermissionsRelations: () => staffRolePermissionsRelations, + staffRoles: () => staffRoles, + staffRolesRelations: () => staffRolesRelations, + staffUsers: () => staffUsers, + staffUsersRelations: () => staffUsersRelations, + storeInfo: () => storeInfo, + storeInfoRelations: () => storeInfoRelations, + units: () => units, + unitsRelations: () => unitsRelations, + unloggedUserTokens: () => unloggedUserTokens, + uploadStatusEnum: () => uploadStatusEnum, + uploadUrlStatus: () => uploadUrlStatus, + userCreds: () => userCreds, + userCredsRelations: () => userCredsRelations, + userDetails: () => userDetails, + userDetailsRelations: () => userDetailsRelations, + userIncidents: () => userIncidents, + userIncidentsRelations: () => userIncidentsRelations, + userNotifications: () => userNotifications, + userNotificationsRelations: () => userNotificationsRelations, + users: () => users, + usersRelations: () => usersRelations, + vendorSnippets: () => vendorSnippets, + vendorSnippetsRelations: () => vendorSnippetsRelations +}); +var jsonText, numericText, staffRoleValues, staffPermissionValues, uploadStatusValues, paymentStatusValues, staffRoleEnum, staffPermissionEnum, uploadStatusEnum, paymentStatusEnum, users, userDetails, userCreds, addressZones, addressAreas, addresses, staffRoles, staffPermissions, staffRolePermissions, staffUsers, storeInfo, units, productInfo, productGroupInfo, productGroupMembership, homeBanners, productReviews, uploadUrlStatus, productTagInfo, productTags, deliverySlotInfo, vendorSnippets, productSlots, specialDeals, paymentInfoTable, orders, orderItems, orderStatus, payments, refunds, keyValStore, notifications, productCategories, cartItems, complaints, coupons, couponUsage, couponApplicableUsers, couponApplicableProducts, userIncidents, reservedCoupons, notifCreds, unloggedUserTokens, userNotifications, usersRelations, userCredsRelations, staffUsersRelations, addressesRelations, unitsRelations, productInfoRelations, productTagInfoRelations, productTagsRelations, deliverySlotInfoRelations, productSlotsRelations, specialDealsRelations, ordersRelations, orderItemsRelations, orderStatusRelations, paymentInfoRelations, paymentsRelations, refundsRelations, notificationsRelations, productCategoriesRelations, cartItemsRelations, complaintsRelations, couponsRelations, couponUsageRelations, userDetailsRelations, notifCredsRelations, userNotificationsRelations, storeInfoRelations, couponApplicableUsersRelations, couponApplicableProductsRelations, reservedCouponsRelations, productReviewsRelations, addressZonesRelations, addressAreasRelations, productGroupInfoRelations, productGroupMembershipRelations, homeBannersRelations, staffRolesRelations, staffPermissionsRelations, staffRolePermissionsRelations, userIncidentsRelations, vendorSnippetsRelations; +var init_schema = __esm({ + "../../packages/db_helper_sqlite/src/db/schema.ts"() { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sqlite_core(); + init_drizzle_orm(); + jsonText = /* @__PURE__ */ __name((name) => customType({ + dataType() { + return "text"; + }, + toDriver(value) { + if (value === void 0 || value === null) return null; + return JSON.stringify(value); + }, + fromDriver(value) { + if (value === null || value === void 0) return null; + try { + return JSON.parse(String(value)); + } catch { + return null; + } + } + })(name), "jsonText"); + numericText = /* @__PURE__ */ __name((name) => customType({ + dataType() { + return "text"; + }, + toDriver(value) { + if (value === void 0 || value === null) return null; + return String(value); + }, + fromDriver(value) { + if (value === null || value === void 0) return null; + return String(value); + } + })(name), "numericText"); + staffRoleValues = ["super_admin", "admin", "marketer", "delivery_staff"]; + staffPermissionValues = ["crud_product", "make_coupon", "crud_staff_users"]; + uploadStatusValues = ["pending", "claimed"]; + paymentStatusValues = ["pending", "success", "cod", "failed"]; + staffRoleEnum = /* @__PURE__ */ __name((name) => text(name, { enum: staffRoleValues }), "staffRoleEnum"); + staffPermissionEnum = /* @__PURE__ */ __name((name) => text(name, { enum: staffPermissionValues }), "staffPermissionEnum"); + uploadStatusEnum = /* @__PURE__ */ __name((name) => text(name, { enum: uploadStatusValues }), "uploadStatusEnum"); + paymentStatusEnum = /* @__PURE__ */ __name((name) => text(name, { enum: paymentStatusValues }), "paymentStatusEnum"); + users = sqliteTable("users", { + id: integer().primaryKey({ autoIncrement: true }), + name: text(), + email: text(), + mobile: text(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t8) => ({ + unq_email: uniqueIndex("unique_email").on(t8.email) + })); + userDetails = sqliteTable("user_details", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id).unique(), + bio: text("bio"), + dateOfBirth: integer("date_of_birth", { mode: "timestamp" }), + gender: text("gender"), + occupation: text("occupation"), + profileImage: text("profile_image"), + isSuspended: integer("is_suspended", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + updatedAt: integer("updated_at", { mode: "timestamp" }).notNull().defaultNow() + }); + userCreds = sqliteTable("user_creds", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + userPassword: text("user_password").notNull(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + addressZones = sqliteTable("address_zones", { + id: integer().primaryKey({ autoIncrement: true }), + zoneName: text("zone_name").notNull(), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow() + }); + addressAreas = sqliteTable("address_areas", { + id: integer().primaryKey({ autoIncrement: true }), + placeName: text("place_name").notNull(), + zoneId: integer("zone_id").references(() => addressZones.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + addresses = sqliteTable("addresses", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + name: text("name").notNull(), + phone: text("phone").notNull(), + addressLine1: text("address_line1").notNull(), + addressLine2: text("address_line2"), + city: text("city").notNull(), + state: text("state").notNull(), + pincode: text("pincode").notNull(), + isDefault: integer("is_default", { mode: "boolean" }).notNull().default(false), + latitude: real("latitude"), + longitude: real("longitude"), + googleMapsUrl: text("google_maps_url"), + adminLatitude: real("admin_latitude"), + adminLongitude: real("admin_longitude"), + zoneId: integer("zone_id").references(() => addressZones.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + staffRoles = sqliteTable("staff_roles", { + id: integer().primaryKey({ autoIncrement: true }), + roleName: staffRoleEnum("role_name").notNull(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t8) => ({ + unq_role_name: uniqueIndex("unique_role_name").on(t8.roleName) + })); + staffPermissions = sqliteTable("staff_permissions", { + id: integer().primaryKey({ autoIncrement: true }), + permissionName: staffPermissionEnum("permission_name").notNull(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t8) => ({ + unq_permission_name: uniqueIndex("unique_permission_name").on(t8.permissionName) + })); + staffRolePermissions = sqliteTable("staff_role_permissions", { + id: integer().primaryKey({ autoIncrement: true }), + staffRoleId: integer("staff_role_id").notNull().references(() => staffRoles.id), + staffPermissionId: integer("staff_permission_id").notNull().references(() => staffPermissions.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t8) => ({ + unq_role_permission: uniqueIndex("unique_role_permission").on(t8.staffRoleId, t8.staffPermissionId) + })); + staffUsers = sqliteTable("staff_users", { + id: integer().primaryKey({ autoIncrement: true }), + name: text().notNull(), + password: text().notNull(), + staffRoleId: integer("staff_role_id").references(() => staffRoles.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + storeInfo = sqliteTable("store_info", { + id: integer().primaryKey({ autoIncrement: true }), + name: text().notNull(), + description: text(), + imageUrl: text("image_url"), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + owner: integer("owner").notNull().references(() => staffUsers.id) + }); + units = sqliteTable("units", { + id: integer().primaryKey({ autoIncrement: true }), + shortNotation: text("short_notation").notNull(), + fullName: text("full_name").notNull() + }, (t8) => ({ + unq_short_notation: uniqueIndex("unique_short_notation").on(t8.shortNotation) + })); + productInfo = sqliteTable("product_info", { + id: integer().primaryKey({ autoIncrement: true }), + name: text().notNull(), + shortDescription: text("short_description"), + longDescription: text("long_description"), + unitId: integer("unit_id").notNull().references(() => units.id), + price: numericText("price").notNull(), + marketPrice: numericText("market_price"), + images: jsonText("images"), + isOutOfStock: integer("is_out_of_stock", { mode: "boolean" }).notNull().default(false), + isSuspended: integer("is_suspended", { mode: "boolean" }).notNull().default(false), + isFlashAvailable: integer("is_flash_available", { mode: "boolean" }).notNull().default(false), + flashPrice: numericText("flash_price"), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + incrementStep: real("increment_step").notNull().default(1), + productQuantity: real("product_quantity").notNull().default(1), + storeId: integer("store_id").references(() => storeInfo.id) + }); + productGroupInfo = sqliteTable("product_group_info", { + id: integer().primaryKey({ autoIncrement: true }), + groupName: text("group_name").notNull(), + description: text(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + productGroupMembership = sqliteTable("product_group_membership", { + productId: integer("product_id").notNull().references(() => productInfo.id), + groupId: integer("group_id").notNull().references(() => productGroupInfo.id), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t8) => ({ + pk: primaryKey({ columns: [t8.productId, t8.groupId], name: "product_group_membership_pk" }) + })); + homeBanners = sqliteTable("home_banners", { + id: integer().primaryKey({ autoIncrement: true }), + name: text("name").notNull(), + imageUrl: text("image_url").notNull(), + description: text("description"), + productIds: jsonText("product_ids"), + redirectUrl: text("redirect_url"), + serialNum: integer("serial_num"), + isActive: integer("is_active", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + lastUpdated: integer("last_updated", { mode: "timestamp" }).notNull().defaultNow() + }); + productReviews = sqliteTable("product_reviews", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + productId: integer("product_id").notNull().references(() => productInfo.id), + reviewBody: text("review_body").notNull(), + imageUrls: jsonText("image_urls").$defaultFn(() => []), + reviewTime: integer("review_time", { mode: "timestamp" }).notNull().defaultNow(), + ratings: real("ratings").notNull(), + adminResponse: text("admin_response"), + adminResponseImages: jsonText("admin_response_images").$defaultFn(() => []) + }, (t8) => ({ + ratingCheck: check("rating_check", sql`${t8.ratings} >= 1 AND ${t8.ratings} <= 5`) + })); + uploadUrlStatus = sqliteTable("upload_url_status", { + id: integer().primaryKey({ autoIncrement: true }), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + key: text("key").notNull(), + status: uploadStatusEnum("status").notNull().default("pending") + }); + productTagInfo = sqliteTable("product_tag_info", { + id: integer().primaryKey({ autoIncrement: true }), + tagName: text("tag_name").notNull().unique(), + tagDescription: text("tag_description"), + imageUrl: text("image_url"), + isDashboardTag: integer("is_dashboard_tag", { mode: "boolean" }).notNull().default(false), + relatedStores: jsonText("related_stores").$defaultFn(() => []), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + productTags = sqliteTable("product_tags", { + id: integer().primaryKey({ autoIncrement: true }), + productId: integer("product_id").notNull().references(() => productInfo.id), + tagId: integer("tag_id").notNull().references(() => productTagInfo.id), + assignedAt: integer("assigned_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t8) => ({ + unq_product_tag: uniqueIndex("unique_product_tag").on(t8.productId, t8.tagId) + })); + deliverySlotInfo = sqliteTable("delivery_slot_info", { + id: integer().primaryKey({ autoIncrement: true }), + deliveryTime: integer("delivery_time", { mode: "timestamp" }).notNull(), + freezeTime: integer("freeze_time", { mode: "timestamp" }).notNull(), + isActive: integer("is_active", { mode: "boolean" }).notNull().default(true), + isFlash: integer("is_flash", { mode: "boolean" }).notNull().default(false), + isCapacityFull: integer("is_capacity_full", { mode: "boolean" }).notNull().default(false), + deliverySequence: jsonText("delivery_sequence").$defaultFn(() => ({})), + groupIds: jsonText("group_ids").$defaultFn(() => []) + }); + vendorSnippets = sqliteTable("vendor_snippets", { + id: integer().primaryKey({ autoIncrement: true }), + snippetCode: text("snippet_code").notNull().unique(), + slotId: integer("slot_id").references(() => deliverySlotInfo.id), + isPermanent: integer("is_permanent", { mode: "boolean" }).notNull().default(false), + productIds: jsonText("product_ids").notNull(), + validTill: integer("valid_till", { mode: "timestamp" }), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + productSlots = sqliteTable("product_slots", { + productId: integer("product_id").notNull().references(() => productInfo.id), + slotId: integer("slot_id").notNull().references(() => deliverySlotInfo.id) + }, (t8) => ({ + pk: primaryKey({ columns: [t8.productId, t8.slotId], name: "product_slot_pk" }) + })); + specialDeals = sqliteTable("special_deals", { + id: integer().primaryKey({ autoIncrement: true }), + productId: integer("product_id").notNull().references(() => productInfo.id), + quantity: numericText("quantity").notNull(), + price: numericText("price").notNull(), + validTill: integer("valid_till", { mode: "timestamp" }).notNull() + }); + paymentInfoTable = sqliteTable("payment_info", { + id: integer().primaryKey({ autoIncrement: true }), + status: text().notNull(), + gateway: text().notNull(), + orderId: text("order_id"), + token: text("token"), + merchantOrderId: text("merchant_order_id").notNull().unique(), + payload: jsonText("payload") + }); + orders = sqliteTable("orders", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + addressId: integer("address_id").notNull().references(() => addresses.id), + slotId: integer("slot_id").references(() => deliverySlotInfo.id), + isCod: integer("is_cod", { mode: "boolean" }).notNull().default(false), + isOnlinePayment: integer("is_online_payment", { mode: "boolean" }).notNull().default(false), + paymentInfoId: integer("payment_info_id").references(() => paymentInfoTable.id), + totalAmount: numericText("total_amount").notNull(), + deliveryCharge: numericText("delivery_charge").notNull().default("0"), + readableId: integer("readable_id").notNull(), + adminNotes: text("admin_notes"), + userNotes: text("user_notes"), + orderGroupId: text("order_group_id"), + orderGroupProportion: numericText("order_group_proportion"), + isFlashDelivery: integer("is_flash_delivery", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + orderItems = sqliteTable("order_items", { + id: integer().primaryKey({ autoIncrement: true }), + orderId: integer("order_id").notNull().references(() => orders.id), + productId: integer("product_id").notNull().references(() => productInfo.id), + quantity: text("quantity").notNull(), + price: numericText("price").notNull(), + discountedPrice: numericText("discounted_price"), + is_packaged: integer("is_packaged", { mode: "boolean" }).notNull().default(false), + is_package_verified: integer("is_package_verified", { mode: "boolean" }).notNull().default(false) + }); + orderStatus = sqliteTable("order_status", { + id: integer().primaryKey({ autoIncrement: true }), + orderTime: integer("order_time", { mode: "timestamp" }).notNull().defaultNow(), + userId: integer("user_id").notNull().references(() => users.id), + orderId: integer("order_id").notNull().references(() => orders.id), + isPackaged: integer("is_packaged", { mode: "boolean" }).notNull().default(false), + isDelivered: integer("is_delivered", { mode: "boolean" }).notNull().default(false), + isCancelled: integer("is_cancelled", { mode: "boolean" }).notNull().default(false), + cancelReason: text("cancel_reason"), + isCancelledByAdmin: integer("is_cancelled_by_admin", { mode: "boolean" }), + paymentStatus: paymentStatusEnum("payment_state").notNull().default("pending"), + cancellationUserNotes: text("cancellation_user_notes"), + cancellationAdminNotes: text("cancellation_admin_notes"), + cancellationReviewed: integer("cancellation_reviewed", { mode: "boolean" }).notNull().default(false), + cancellationReviewedAt: integer("cancellation_reviewed_at", { mode: "timestamp" }), + refundCouponId: integer("refund_coupon_id").references(() => coupons.id) + }); + payments = sqliteTable("payments", { + id: integer().primaryKey({ autoIncrement: true }), + status: text().notNull(), + gateway: text().notNull(), + orderId: integer("order_id").notNull().references(() => orders.id), + token: text("token"), + merchantOrderId: text("merchant_order_id").notNull().unique(), + payload: jsonText("payload") + }); + refunds = sqliteTable("refunds", { + id: integer().primaryKey({ autoIncrement: true }), + orderId: integer("order_id").notNull().references(() => orders.id), + refundAmount: numericText("refund_amount"), + refundStatus: text("refund_status").default("none"), + merchantRefundId: text("merchant_refund_id"), + refundProcessedAt: integer("refund_processed_at", { mode: "timestamp" }), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + keyValStore = sqliteTable("key_val_store", { + key: text("key").primaryKey(), + value: jsonText("value") + }); + notifications = sqliteTable("notifications", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + title: text().notNull(), + body: text().notNull(), + type: text(), + isRead: integer("is_read", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + productCategories = sqliteTable("product_categories", { + id: integer().primaryKey({ autoIncrement: true }), + name: text().notNull(), + description: text() + }); + cartItems = sqliteTable("cart_items", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + productId: integer("product_id").notNull().references(() => productInfo.id), + quantity: numericText("quantity").notNull(), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t8) => ({ + unq_user_product: uniqueIndex("unique_user_product").on(t8.userId, t8.productId) + })); + complaints = sqliteTable("complaints", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + orderId: integer("order_id").references(() => orders.id), + complaintBody: text("complaint_body").notNull(), + images: jsonText("images"), + response: text("response"), + isResolved: integer("is_resolved", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + coupons = sqliteTable("coupons", { + id: integer().primaryKey({ autoIncrement: true }), + couponCode: text("coupon_code").notNull().unique(), + isUserBased: integer("is_user_based", { mode: "boolean" }).notNull().default(false), + discountPercent: numericText("discount_percent"), + flatDiscount: numericText("flat_discount"), + minOrder: numericText("min_order"), + productIds: jsonText("product_ids"), + createdBy: integer("created_by").notNull().references(() => staffUsers.id), + maxValue: numericText("max_value"), + isApplyForAll: integer("is_apply_for_all", { mode: "boolean" }).notNull().default(false), + validTill: integer("valid_till", { mode: "timestamp" }), + maxLimitForUser: integer("max_limit_for_user"), + isInvalidated: integer("is_invalidated", { mode: "boolean" }).notNull().default(false), + exclusiveApply: integer("exclusive_apply", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + couponUsage = sqliteTable("coupon_usage", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + couponId: integer("coupon_id").notNull().references(() => coupons.id), + orderId: integer("order_id").references(() => orders.id), + orderItemId: integer("order_item_id").references(() => orderItems.id), + usedAt: integer("used_at", { mode: "timestamp" }).notNull().defaultNow() + }); + couponApplicableUsers = sqliteTable("coupon_applicable_users", { + id: integer().primaryKey({ autoIncrement: true }), + couponId: integer("coupon_id").notNull().references(() => coupons.id), + userId: integer("user_id").notNull().references(() => users.id) + }, (t8) => ({ + unq_coupon_user: uniqueIndex("unique_coupon_user").on(t8.couponId, t8.userId) + })); + couponApplicableProducts = sqliteTable("coupon_applicable_products", { + id: integer().primaryKey({ autoIncrement: true }), + couponId: integer("coupon_id").notNull().references(() => coupons.id), + productId: integer("product_id").notNull().references(() => productInfo.id) + }, (t8) => ({ + unq_coupon_product: uniqueIndex("unique_coupon_product").on(t8.couponId, t8.productId) + })); + userIncidents = sqliteTable("user_incidents", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + orderId: integer("order_id").references(() => orders.id), + dateAdded: integer("date_added", { mode: "timestamp" }).notNull().defaultNow(), + adminComment: text("admin_comment"), + addedBy: integer("added_by").references(() => staffUsers.id), + negativityScore: integer("negativity_score") + }); + reservedCoupons = sqliteTable("reserved_coupons", { + id: integer().primaryKey({ autoIncrement: true }), + secretCode: text("secret_code").notNull().unique(), + couponCode: text("coupon_code").notNull(), + discountPercent: numericText("discount_percent"), + flatDiscount: numericText("flat_discount"), + minOrder: numericText("min_order"), + productIds: jsonText("product_ids"), + maxValue: numericText("max_value"), + validTill: integer("valid_till", { mode: "timestamp" }), + maxLimitForUser: integer("max_limit_for_user"), + exclusiveApply: integer("exclusive_apply", { mode: "boolean" }).notNull().default(false), + isRedeemed: integer("is_redeemed", { mode: "boolean" }).notNull().default(false), + redeemedBy: integer("redeemed_by").references(() => users.id), + redeemedAt: integer("redeemed_at", { mode: "timestamp" }), + createdBy: integer("created_by").notNull().references(() => staffUsers.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + notifCreds = sqliteTable("notif_creds", { + id: integer().primaryKey({ autoIncrement: true }), + token: text().notNull().unique(), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow(), + userId: integer("user_id").notNull().references(() => users.id), + lastVerified: integer("last_verified", { mode: "timestamp" }) + }); + unloggedUserTokens = sqliteTable("unlogged_user_tokens", { + id: integer().primaryKey({ autoIncrement: true }), + token: text().notNull().unique(), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow(), + lastVerified: integer("last_verified", { mode: "timestamp" }) + }); + userNotifications = sqliteTable("user_notifications", { + id: integer().primaryKey({ autoIncrement: true }), + title: text("title").notNull(), + imageUrl: text("image_url"), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + body: text("body").notNull(), + applicableUsers: jsonText("applicable_users") + }); + usersRelations = relations(users, ({ many, one }) => ({ + addresses: many(addresses), + orders: many(orders), + notifications: many(notifications), + cartItems: many(cartItems), + userCreds: one(userCreds), + coupons: many(coupons), + couponUsages: many(couponUsage), + applicableCoupons: many(couponApplicableUsers), + userDetails: one(userDetails), + notifCreds: many(notifCreds), + userIncidents: many(userIncidents) + })); + userCredsRelations = relations(userCreds, ({ one }) => ({ + user: one(users, { fields: [userCreds.userId], references: [users.id] }) + })); + staffUsersRelations = relations(staffUsers, ({ one, many }) => ({ + role: one(staffRoles, { fields: [staffUsers.staffRoleId], references: [staffRoles.id] }), + coupons: many(coupons), + stores: many(storeInfo) + })); + addressesRelations = relations(addresses, ({ one, many }) => ({ + user: one(users, { fields: [addresses.userId], references: [users.id] }), + orders: many(orders), + zone: one(addressZones, { fields: [addresses.zoneId], references: [addressZones.id] }) + })); + unitsRelations = relations(units, ({ many }) => ({ + products: many(productInfo) + })); + productInfoRelations = relations(productInfo, ({ one, many }) => ({ + unit: one(units, { fields: [productInfo.unitId], references: [units.id] }), + store: one(storeInfo, { fields: [productInfo.storeId], references: [storeInfo.id] }), + productSlots: many(productSlots), + specialDeals: many(specialDeals), + orderItems: many(orderItems), + cartItems: many(cartItems), + tags: many(productTags), + applicableCoupons: many(couponApplicableProducts), + reviews: many(productReviews), + groups: many(productGroupMembership) + })); + productTagInfoRelations = relations(productTagInfo, ({ many }) => ({ + products: many(productTags) + })); + productTagsRelations = relations(productTags, ({ one }) => ({ + product: one(productInfo, { fields: [productTags.productId], references: [productInfo.id] }), + tag: one(productTagInfo, { fields: [productTags.tagId], references: [productTagInfo.id] }) + })); + deliverySlotInfoRelations = relations(deliverySlotInfo, ({ many }) => ({ + productSlots: many(productSlots), + orders: many(orders), + vendorSnippets: many(vendorSnippets) + })); + productSlotsRelations = relations(productSlots, ({ one }) => ({ + product: one(productInfo, { fields: [productSlots.productId], references: [productInfo.id] }), + slot: one(deliverySlotInfo, { fields: [productSlots.slotId], references: [deliverySlotInfo.id] }) + })); + specialDealsRelations = relations(specialDeals, ({ one }) => ({ + product: one(productInfo, { fields: [specialDeals.productId], references: [productInfo.id] }) + })); + ordersRelations = relations(orders, ({ one, many }) => ({ + user: one(users, { fields: [orders.userId], references: [users.id] }), + address: one(addresses, { fields: [orders.addressId], references: [addresses.id] }), + slot: one(deliverySlotInfo, { fields: [orders.slotId], references: [deliverySlotInfo.id] }), + orderItems: many(orderItems), + payment: one(payments), + paymentInfo: one(paymentInfoTable, { fields: [orders.paymentInfoId], references: [paymentInfoTable.id] }), + orderStatus: many(orderStatus), + refunds: many(refunds), + couponUsages: many(couponUsage), + userIncidents: many(userIncidents) + })); + orderItemsRelations = relations(orderItems, ({ one }) => ({ + order: one(orders, { fields: [orderItems.orderId], references: [orders.id] }), + product: one(productInfo, { fields: [orderItems.productId], references: [productInfo.id] }) + })); + orderStatusRelations = relations(orderStatus, ({ one }) => ({ + order: one(orders, { fields: [orderStatus.orderId], references: [orders.id] }), + user: one(users, { fields: [orderStatus.userId], references: [users.id] }), + refundCoupon: one(coupons, { fields: [orderStatus.refundCouponId], references: [coupons.id] }) + })); + paymentInfoRelations = relations(paymentInfoTable, ({ one }) => ({ + order: one(orders, { fields: [paymentInfoTable.id], references: [orders.paymentInfoId] }) + })); + paymentsRelations = relations(payments, ({ one }) => ({ + order: one(orders, { fields: [payments.orderId], references: [orders.id] }) + })); + refundsRelations = relations(refunds, ({ one }) => ({ + order: one(orders, { fields: [refunds.orderId], references: [orders.id] }) + })); + notificationsRelations = relations(notifications, ({ one }) => ({ + user: one(users, { fields: [notifications.userId], references: [users.id] }) + })); + productCategoriesRelations = relations(productCategories, ({}) => ({})); + cartItemsRelations = relations(cartItems, ({ one }) => ({ + user: one(users, { fields: [cartItems.userId], references: [users.id] }), + product: one(productInfo, { fields: [cartItems.productId], references: [productInfo.id] }) + })); + complaintsRelations = relations(complaints, ({ one }) => ({ + user: one(users, { fields: [complaints.userId], references: [users.id] }), + order: one(orders, { fields: [complaints.orderId], references: [orders.id] }) + })); + couponsRelations = relations(coupons, ({ one, many }) => ({ + creator: one(staffUsers, { fields: [coupons.createdBy], references: [staffUsers.id] }), + usages: many(couponUsage), + applicableUsers: many(couponApplicableUsers), + applicableProducts: many(couponApplicableProducts) + })); + couponUsageRelations = relations(couponUsage, ({ one }) => ({ + user: one(users, { fields: [couponUsage.userId], references: [users.id] }), + coupon: one(coupons, { fields: [couponUsage.couponId], references: [coupons.id] }), + order: one(orders, { fields: [couponUsage.orderId], references: [orders.id] }), + orderItem: one(orderItems, { fields: [couponUsage.orderItemId], references: [orderItems.id] }) + })); + userDetailsRelations = relations(userDetails, ({ one }) => ({ + user: one(users, { fields: [userDetails.userId], references: [users.id] }) + })); + notifCredsRelations = relations(notifCreds, ({ one }) => ({ + user: one(users, { fields: [notifCreds.userId], references: [users.id] }) + })); + userNotificationsRelations = relations(userNotifications, ({}) => ({ + // No relations needed for now + })); + storeInfoRelations = relations(storeInfo, ({ one, many }) => ({ + owner: one(staffUsers, { fields: [storeInfo.owner], references: [staffUsers.id] }), + products: many(productInfo) + })); + couponApplicableUsersRelations = relations(couponApplicableUsers, ({ one }) => ({ + coupon: one(coupons, { fields: [couponApplicableUsers.couponId], references: [coupons.id] }), + user: one(users, { fields: [couponApplicableUsers.userId], references: [users.id] }) + })); + couponApplicableProductsRelations = relations(couponApplicableProducts, ({ one }) => ({ + coupon: one(coupons, { fields: [couponApplicableProducts.couponId], references: [coupons.id] }), + product: one(productInfo, { fields: [couponApplicableProducts.productId], references: [productInfo.id] }) + })); + reservedCouponsRelations = relations(reservedCoupons, ({ one }) => ({ + redeemedUser: one(users, { fields: [reservedCoupons.redeemedBy], references: [users.id] }), + creator: one(staffUsers, { fields: [reservedCoupons.createdBy], references: [staffUsers.id] }) + })); + productReviewsRelations = relations(productReviews, ({ one }) => ({ + user: one(users, { fields: [productReviews.userId], references: [users.id] }), + product: one(productInfo, { fields: [productReviews.productId], references: [productInfo.id] }) + })); + addressZonesRelations = relations(addressZones, ({ many }) => ({ + addresses: many(addresses), + areas: many(addressAreas) + })); + addressAreasRelations = relations(addressAreas, ({ one }) => ({ + zone: one(addressZones, { fields: [addressAreas.zoneId], references: [addressZones.id] }) + })); + productGroupInfoRelations = relations(productGroupInfo, ({ many }) => ({ + memberships: many(productGroupMembership) + })); + productGroupMembershipRelations = relations(productGroupMembership, ({ one }) => ({ + product: one(productInfo, { fields: [productGroupMembership.productId], references: [productInfo.id] }), + group: one(productGroupInfo, { fields: [productGroupMembership.groupId], references: [productGroupInfo.id] }) + })); + homeBannersRelations = relations(homeBanners, ({}) => ({ + // Relations for productIds array would be more complex, skipping for now + })); + staffRolesRelations = relations(staffRoles, ({ many }) => ({ + staffUsers: many(staffUsers), + rolePermissions: many(staffRolePermissions) + })); + staffPermissionsRelations = relations(staffPermissions, ({ many }) => ({ + rolePermissions: many(staffRolePermissions) + })); + staffRolePermissionsRelations = relations(staffRolePermissions, ({ one }) => ({ + role: one(staffRoles, { fields: [staffRolePermissions.staffRoleId], references: [staffRoles.id] }), + permission: one(staffPermissions, { fields: [staffRolePermissions.staffPermissionId], references: [staffPermissions.id] }) + })); + userIncidentsRelations = relations(userIncidents, ({ one }) => ({ + user: one(users, { fields: [userIncidents.userId], references: [users.id] }), + order: one(orders, { fields: [userIncidents.orderId], references: [orders.id] }), + addedBy: one(staffUsers, { fields: [userIncidents.addedBy], references: [staffUsers.id] }) + })); + vendorSnippetsRelations = relations(vendorSnippets, ({ one }) => ({ + slot: one(deliverySlotInfo, { fields: [vendorSnippets.slotId], references: [deliverySlotInfo.id] }) + })); + } +}); + +// ../../node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js +var fromUtf8; +var init_fromUtf8_browser = __esm({ + "../../node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fromUtf8 = /* @__PURE__ */ __name((input) => new TextEncoder().encode(input), "fromUtf8"); + } +}); + +// ../../node_modules/@smithy/util-utf8/dist-es/toUint8Array.js +var toUint8Array; +var init_toUint8Array = __esm({ + "../../node_modules/@smithy/util-utf8/dist-es/toUint8Array.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser(); + toUint8Array = /* @__PURE__ */ __name((data) => { + if (typeof data === "string") { + return fromUtf8(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); + }, "toUint8Array"); + } +}); + +// ../../node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +var init_toUtf8_browser = __esm({ + "../../node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-utf8/dist-es/index.js +var init_dist_es = __esm({ + "../../node_modules/@smithy/util-utf8/dist-es/index.js"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser(); + init_toUint8Array(); + init_toUtf8_browser(); + } +}); + +// ../../node_modules/dayjs/dayjs.min.js +var require_dayjs_min = __commonJS({ + "../../node_modules/dayjs/dayjs.min.js"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + !(function(t8, e) { + "object" == typeof exports && "undefined" != typeof module2 ? module2.exports = e() : "function" == typeof define && define.amd ? define(e) : (t8 = "undefined" != typeof globalThis ? globalThis : t8 || self).dayjs = e(); + })(exports, (function() { + "use strict"; + var t8 = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u4 = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: /* @__PURE__ */ __name(function(t9) { + var e2 = ["th", "st", "nd", "rd"], n2 = t9 % 100; + return "[" + t9 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]"; + }, "ordinal") }, m = /* @__PURE__ */ __name(function(t9, e2, n2) { + var r2 = String(t9); + return !r2 || r2.length >= e2 ? t9 : "" + Array(e2 + 1 - r2.length).join(n2) + t9; + }, "m"), v2 = { s: m, z: /* @__PURE__ */ __name(function(t9) { + var e2 = -t9.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60; + return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0"); + }, "z"), m: /* @__PURE__ */ __name(function t9(e2, n2) { + if (e2.date() < n2.date()) return -t9(n2, e2); + var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u5 = e2.clone().add(r2 + (s2 ? -1 : 1), c); + return +(-(r2 + (n2 - i2) / (s2 ? i2 - u5 : u5 - i2)) || 0); + }, "t"), a: /* @__PURE__ */ __name(function(t9) { + return t9 < 0 ? Math.ceil(t9) || 0 : Math.floor(t9); + }, "a"), p: /* @__PURE__ */ __name(function(t9) { + return { M: c, y: h, w: o, d: a, D: d, h: u4, m: s, s: i, ms: r, Q: f }[t9] || String(t9 || "").toLowerCase().replace(/s$/, ""); + }, "p"), u: /* @__PURE__ */ __name(function(t9) { + return void 0 === t9; + }, "u") }, g = "en", D2 = {}; + D2[g] = M; + var p = "$isDayjsObject", S = /* @__PURE__ */ __name(function(t9) { + return t9 instanceof _ || !(!t9 || !t9[p]); + }, "S"), w = /* @__PURE__ */ __name(function t9(e2, n2, r2) { + var i2; + if (!e2) return g; + if ("string" == typeof e2) { + var s2 = e2.toLowerCase(); + D2[s2] && (i2 = s2), n2 && (D2[s2] = n2, i2 = s2); + var u5 = e2.split("-"); + if (!i2 && u5.length > 1) return t9(u5[0]); + } else { + var a2 = e2.name; + D2[a2] = e2, i2 = a2; + } + return !r2 && i2 && (g = i2), i2 || !r2 && g; + }, "t"), O = /* @__PURE__ */ __name(function(t9, e2) { + if (S(t9)) return t9.clone(); + var n2 = "object" == typeof e2 ? e2 : {}; + return n2.date = t9, n2.args = arguments, new _(n2); + }, "O"), b = v2; + b.l = w, b.i = S, b.w = function(t9, e2) { + return O(t9, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset }); + }; + var _ = (function() { + function M2(t9) { + this.$L = w(t9.locale, null, true), this.parse(t9), this.$x = this.$x || t9.x || {}, this[p] = true; + } + __name(M2, "M"); + var m2 = M2.prototype; + return m2.parse = function(t9) { + this.$d = (function(t10) { + var e2 = t10.date, n2 = t10.utc; + if (null === e2) return /* @__PURE__ */ new Date(NaN); + if (b.u(e2)) return /* @__PURE__ */ new Date(); + if (e2 instanceof Date) return new Date(e2); + if ("string" == typeof e2 && !/Z$/i.test(e2)) { + var r2 = e2.match($); + if (r2) { + var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3); + return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2); + } + } + return new Date(e2); + })(t9), this.init(); + }, m2.init = function() { + var t9 = this.$d; + this.$y = t9.getFullYear(), this.$M = t9.getMonth(), this.$D = t9.getDate(), this.$W = t9.getDay(), this.$H = t9.getHours(), this.$m = t9.getMinutes(), this.$s = t9.getSeconds(), this.$ms = t9.getMilliseconds(); + }, m2.$utils = function() { + return b; + }, m2.isValid = function() { + return !(this.$d.toString() === l); + }, m2.isSame = function(t9, e2) { + var n2 = O(t9); + return this.startOf(e2) <= n2 && n2 <= this.endOf(e2); + }, m2.isAfter = function(t9, e2) { + return O(t9) < this.startOf(e2); + }, m2.isBefore = function(t9, e2) { + return this.endOf(e2) < O(t9); + }, m2.$g = function(t9, e2, n2) { + return b.u(t9) ? this[e2] : this.set(n2, t9); + }, m2.unix = function() { + return Math.floor(this.valueOf() / 1e3); + }, m2.valueOf = function() { + return this.$d.getTime(); + }, m2.startOf = function(t9, e2) { + var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t9), l2 = /* @__PURE__ */ __name(function(t10, e3) { + var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t10) : new Date(n2.$y, e3, t10), n2); + return r2 ? i2 : i2.endOf(a); + }, "l"), $2 = /* @__PURE__ */ __name(function(t10, e3) { + return b.w(n2.toDate()[t10].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2); + }, "$"), y2 = this.$W, M3 = this.$M, m3 = this.$D, v3 = "set" + (this.$u ? "UTC" : ""); + switch (f2) { + case h: + return r2 ? l2(1, 0) : l2(31, 11); + case c: + return r2 ? l2(1, M3) : l2(0, M3 + 1); + case o: + var g2 = this.$locale().weekStart || 0, D3 = (y2 < g2 ? y2 + 7 : y2) - g2; + return l2(r2 ? m3 - D3 : m3 + (6 - D3), M3); + case a: + case d: + return $2(v3 + "Hours", 0); + case u4: + return $2(v3 + "Minutes", 1); + case s: + return $2(v3 + "Seconds", 2); + case i: + return $2(v3 + "Milliseconds", 3); + default: + return this.clone(); + } + }, m2.endOf = function(t9) { + return this.startOf(t9, false); + }, m2.$set = function(t9, e2) { + var n2, o2 = b.p(t9), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u4] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2; + if (o2 === c || o2 === h) { + var y2 = this.clone().set(d, 1); + y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d; + } else l2 && this.$d[l2]($2); + return this.init(), this; + }, m2.set = function(t9, e2) { + return this.clone().$set(t9, e2); + }, m2.get = function(t9) { + return this[b.p(t9)](); + }, m2.add = function(r2, f2) { + var d2, l2 = this; + r2 = Number(r2); + var $2 = b.p(f2), y2 = /* @__PURE__ */ __name(function(t9) { + var e2 = O(l2); + return b.w(e2.date(e2.date() + Math.round(t9 * r2)), l2); + }, "y"); + if ($2 === c) return this.set(c, this.$M + r2); + if ($2 === h) return this.set(h, this.$y + r2); + if ($2 === a) return y2(1); + if ($2 === o) return y2(7); + var M3 = (d2 = {}, d2[s] = e, d2[u4] = n, d2[i] = t8, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3; + return b.w(m3, this); + }, m2.subtract = function(t9, e2) { + return this.add(-1 * t9, e2); + }, m2.format = function(t9) { + var e2 = this, n2 = this.$locale(); + if (!this.isValid()) return n2.invalidDate || l; + var r2 = t9 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u5 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = /* @__PURE__ */ __name(function(t10, n3, i3, s3) { + return t10 && (t10[n3] || t10(e2, r2)) || i3[n3].slice(0, s3); + }, "h"), d2 = /* @__PURE__ */ __name(function(t10) { + return b.s(s2 % 12 || 12, t10, "0"); + }, "d"), $2 = f2 || function(t10, e3, n3) { + var r3 = t10 < 12 ? "AM" : "PM"; + return n3 ? r3.toLowerCase() : r3; + }; + return r2.replace(y, (function(t10, r3) { + return r3 || (function(t11) { + switch (t11) { + case "YY": + return String(e2.$y).slice(-2); + case "YYYY": + return b.s(e2.$y, 4, "0"); + case "M": + return a2 + 1; + case "MM": + return b.s(a2 + 1, 2, "0"); + case "MMM": + return h2(n2.monthsShort, a2, c2, 3); + case "MMMM": + return h2(c2, a2); + case "D": + return e2.$D; + case "DD": + return b.s(e2.$D, 2, "0"); + case "d": + return String(e2.$W); + case "dd": + return h2(n2.weekdaysMin, e2.$W, o2, 2); + case "ddd": + return h2(n2.weekdaysShort, e2.$W, o2, 3); + case "dddd": + return o2[e2.$W]; + case "H": + return String(s2); + case "HH": + return b.s(s2, 2, "0"); + case "h": + return d2(1); + case "hh": + return d2(2); + case "a": + return $2(s2, u5, true); + case "A": + return $2(s2, u5, false); + case "m": + return String(u5); + case "mm": + return b.s(u5, 2, "0"); + case "s": + return String(e2.$s); + case "ss": + return b.s(e2.$s, 2, "0"); + case "SSS": + return b.s(e2.$ms, 3, "0"); + case "Z": + return i2; + } + return null; + })(t10) || i2.replace(":", ""); + })); + }, m2.utcOffset = function() { + return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); + }, m2.diff = function(r2, d2, l2) { + var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v3 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D3 = /* @__PURE__ */ __name(function() { + return b.m(y2, m3); + }, "D"); + switch (M3) { + case h: + $2 = D3() / 12; + break; + case c: + $2 = D3(); + break; + case f: + $2 = D3() / 3; + break; + case o: + $2 = (g2 - v3) / 6048e5; + break; + case a: + $2 = (g2 - v3) / 864e5; + break; + case u4: + $2 = g2 / n; + break; + case s: + $2 = g2 / e; + break; + case i: + $2 = g2 / t8; + break; + default: + $2 = g2; + } + return l2 ? $2 : b.a($2); + }, m2.daysInMonth = function() { + return this.endOf(c).$D; + }, m2.$locale = function() { + return D2[this.$L]; + }, m2.locale = function(t9, e2) { + if (!t9) return this.$L; + var n2 = this.clone(), r2 = w(t9, e2, true); + return r2 && (n2.$L = r2), n2; + }, m2.clone = function() { + return b.w(this.$d, this); + }, m2.toDate = function() { + return new Date(this.valueOf()); + }, m2.toJSON = function() { + return this.isValid() ? this.toISOString() : null; + }, m2.toISOString = function() { + return this.$d.toISOString(); + }, m2.toString = function() { + return this.$d.toUTCString(); + }, M2; + })(), k = _.prototype; + return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u4], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach((function(t9) { + k[t9[1]] = function(e2) { + return this.$g(e2, t9[0], t9[1]); + }; + })), O.extend = function(t9, e2) { + return t9.$i || (t9(e2, _, O), t9.$i = true), O; + }, O.locale = w, O.isDayjs = S, O.unix = function(t9) { + return O(1e3 * t9); + }, O.en = D2[g], O.Ls = D2, O.p = {}, O; + })); + } +}); + +// ../../node_modules/node-abort-controller/browser.js +var require_browser = __commonJS({ + "../../node_modules/node-abort-controller/browser.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var _global2 = typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : ( + /* otherwise */ + void 0 + ); + if (!_global2) { + throw new Error( + `Unable to find global scope. Are you sure this is running in the browser?` + ); + } + if (!_global2.AbortController) { + throw new Error( + `Could not find "AbortController" in the global scope. You need to polyfill it first` + ); + } + module2.exports.AbortController = _global2.AbortController; + } +}); + +// ../../node_modules/@ioredis/commands/built/commands.json +var require_commands = __commonJS({ + "../../node_modules/@ioredis/commands/built/commands.json"(exports, module2) { + module2.exports = { + acl: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + append: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + asking: { + arity: 1, + flags: [ + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + auth: { + arity: -2, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "no_auth", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + bgrewriteaof: { + arity: 1, + flags: [ + "admin", + "noscript", + "no_async_loading" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + bgsave: { + arity: -1, + flags: [ + "admin", + "noscript", + "no_async_loading" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + bitcount: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + bitfield: { + arity: -2, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + bitfield_ro: { + arity: -2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + bitop: { + arity: -4, + flags: [ + "write", + "denyoom" + ], + keyStart: 2, + keyStop: -1, + step: 1 + }, + bitpos: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + blmove: { + arity: 6, + flags: [ + "write", + "denyoom", + "noscript", + "blocking" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + blmpop: { + arity: -5, + flags: [ + "write", + "blocking", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + blpop: { + arity: -3, + flags: [ + "write", + "noscript", + "blocking" + ], + keyStart: 1, + keyStop: -2, + step: 1 + }, + brpop: { + arity: -3, + flags: [ + "write", + "noscript", + "blocking" + ], + keyStart: 1, + keyStop: -2, + step: 1 + }, + brpoplpush: { + arity: 4, + flags: [ + "write", + "denyoom", + "noscript", + "blocking" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + bzmpop: { + arity: -5, + flags: [ + "write", + "blocking", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + bzpopmax: { + arity: -3, + flags: [ + "write", + "noscript", + "blocking", + "fast" + ], + keyStart: 1, + keyStop: -2, + step: 1 + }, + bzpopmin: { + arity: -3, + flags: [ + "write", + "noscript", + "blocking", + "fast" + ], + keyStart: 1, + keyStop: -2, + step: 1 + }, + client: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + cluster: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + command: { + arity: -1, + flags: [ + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + config: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + copy: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + dbsize: { + arity: 1, + flags: [ + "readonly", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + debug: { + arity: -2, + flags: [ + "admin", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + decr: { + arity: 2, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + decrby: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + del: { + arity: -2, + flags: [ + "write" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + discard: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + dump: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + echo: { + arity: 2, + flags: [ + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + eval: { + arity: -3, + flags: [ + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + eval_ro: { + arity: -3, + flags: [ + "readonly", + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + evalsha: { + arity: -3, + flags: [ + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + evalsha_ro: { + arity: -3, + flags: [ + "readonly", + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + exec: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "skip_slowlog" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + exists: { + arity: -2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + expire: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + expireat: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + expiretime: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + failover: { + arity: -1, + flags: [ + "admin", + "noscript", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + fcall: { + arity: -3, + flags: [ + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + fcall_ro: { + arity: -3, + flags: [ + "readonly", + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + flushall: { + arity: -1, + flags: [ + "write" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + flushdb: { + arity: -1, + flags: [ + "write" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + function: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + geoadd: { + arity: -5, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + geodist: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + geohash: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + geopos: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + georadius: { + arity: -6, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + georadius_ro: { + arity: -6, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + georadiusbymember: { + arity: -5, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + georadiusbymember_ro: { + arity: -5, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + geosearch: { + arity: -7, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + geosearchstore: { + arity: -8, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + get: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + getbit: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + getdel: { + arity: 2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + getex: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + getrange: { + arity: 4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + getset: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hdel: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hello: { + arity: -1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "no_auth", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + hexists: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hexpire: { + arity: -6, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hpexpire: { + arity: -6, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hget: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hgetall: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hincrby: { + arity: 4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hincrbyfloat: { + arity: 4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hkeys: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hlen: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hmget: { + arity: -3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hmset: { + arity: -4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hrandfield: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hscan: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hset: { + arity: -4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hsetnx: { + arity: 4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hstrlen: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hvals: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + incr: { + arity: 2, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + incrby: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + incrbyfloat: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + info: { + arity: -1, + flags: [ + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + keys: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + lastsave: { + arity: 1, + flags: [ + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + latency: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + lcs: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + lindex: { + arity: 3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + linsert: { + arity: 5, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + llen: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lmove: { + arity: 5, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + lmpop: { + arity: -4, + flags: [ + "write", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + lolwut: { + arity: -1, + flags: [ + "readonly", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + lpop: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lpos: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lpush: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lpushx: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lrange: { + arity: 4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lrem: { + arity: 4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lset: { + arity: 4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + ltrim: { + arity: 4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + memory: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + mget: { + arity: -2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + migrate: { + arity: -6, + flags: [ + "write", + "movablekeys" + ], + keyStart: 3, + keyStop: 3, + step: 1 + }, + module: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + monitor: { + arity: 1, + flags: [ + "admin", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + move: { + arity: 3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + mset: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 2 + }, + msetnx: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 2 + }, + multi: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + object: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + persist: { + arity: 2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + pexpire: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + pexpireat: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + pexpiretime: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + pfadd: { + arity: -2, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + pfcount: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + pfdebug: { + arity: 3, + flags: [ + "write", + "denyoom", + "admin" + ], + keyStart: 2, + keyStop: 2, + step: 1 + }, + pfmerge: { + arity: -2, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + pfselftest: { + arity: 1, + flags: [ + "admin" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + ping: { + arity: -1, + flags: [ + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + psetex: { + arity: 4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + psubscribe: { + arity: -2, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + psync: { + arity: -3, + flags: [ + "admin", + "noscript", + "no_async_loading", + "no_multi" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + pttl: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + publish: { + arity: 3, + flags: [ + "pubsub", + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + pubsub: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + punsubscribe: { + arity: -1, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + quit: { + arity: -1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "no_auth", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + randomkey: { + arity: 1, + flags: [ + "readonly" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + readonly: { + arity: 1, + flags: [ + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + readwrite: { + arity: 1, + flags: [ + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + rename: { + arity: 3, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + renamenx: { + arity: 3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + replconf: { + arity: -1, + flags: [ + "admin", + "noscript", + "loading", + "stale", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + replicaof: { + arity: 3, + flags: [ + "admin", + "noscript", + "stale", + "no_async_loading" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + reset: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "no_auth", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + restore: { + arity: -4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + "restore-asking": { + arity: -4, + flags: [ + "write", + "denyoom", + "asking" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + role: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + rpop: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + rpoplpush: { + arity: 3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + rpush: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + rpushx: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + sadd: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + save: { + arity: 1, + flags: [ + "admin", + "noscript", + "no_async_loading", + "no_multi" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + scan: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + scard: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + script: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + sdiff: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + sdiffstore: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + select: { + arity: 2, + flags: [ + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + set: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + setbit: { + arity: 4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + setex: { + arity: 4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + setnx: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + setrange: { + arity: 4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + shutdown: { + arity: -1, + flags: [ + "admin", + "noscript", + "loading", + "stale", + "no_multi", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + sinter: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + sintercard: { + arity: -3, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + sinterstore: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + sismember: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + slaveof: { + arity: 3, + flags: [ + "admin", + "noscript", + "stale", + "no_async_loading" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + slowlog: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + smembers: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + smismember: { + arity: -3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + smove: { + arity: 4, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + sort: { + arity: -2, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + sort_ro: { + arity: -2, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + spop: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + spublish: { + arity: 3, + flags: [ + "pubsub", + "loading", + "stale", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + srandmember: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + srem: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + sscan: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + ssubscribe: { + arity: -2, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + strlen: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + subscribe: { + arity: -2, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + substr: { + arity: 4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + sunion: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + sunionstore: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + sunsubscribe: { + arity: -1, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + swapdb: { + arity: 3, + flags: [ + "write", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + sync: { + arity: 1, + flags: [ + "admin", + "noscript", + "no_async_loading", + "no_multi" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + time: { + arity: 1, + flags: [ + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + touch: { + arity: -2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + ttl: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + type: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + unlink: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + unsubscribe: { + arity: -1, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + unwatch: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + wait: { + arity: 3, + flags: [ + "noscript" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + watch: { + arity: -2, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "allow_busy" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + xack: { + arity: -4, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xadd: { + arity: -5, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xautoclaim: { + arity: -6, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xclaim: { + arity: -6, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xdel: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xdelex: { + arity: -5, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xgroup: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + xinfo: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + xlen: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xpending: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xrange: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xread: { + arity: -4, + flags: [ + "readonly", + "blocking", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + xreadgroup: { + arity: -7, + flags: [ + "write", + "blocking", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + xrevrange: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xsetid: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xtrim: { + arity: -4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zadd: { + arity: -4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zcard: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zcount: { + arity: 4, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zdiff: { + arity: -3, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + zdiffstore: { + arity: -4, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zincrby: { + arity: 4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zinter: { + arity: -3, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + zintercard: { + arity: -3, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + zinterstore: { + arity: -4, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zlexcount: { + arity: 4, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zmpop: { + arity: -4, + flags: [ + "write", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + zmscore: { + arity: -3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zpopmax: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zpopmin: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrandmember: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrange: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrangebylex: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrangebyscore: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrangestore: { + arity: -5, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + zrank: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrem: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zremrangebylex: { + arity: 4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zremrangebyrank: { + arity: 4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zremrangebyscore: { + arity: 4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrevrange: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrevrangebylex: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrevrangebyscore: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrevrank: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zscan: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zscore: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zunion: { + arity: -3, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + zunionstore: { + arity: -4, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + } + }; + } +}); + +// ../../node_modules/@ioredis/commands/built/index.js +var require_built = __commonJS({ + "../../node_modules/@ioredis/commands/built/index.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getKeyIndexes = exports.hasFlag = exports.exists = exports.list = void 0; + var commands_json_1 = __importDefault(require_commands()); + exports.list = Object.keys(commands_json_1.default); + var flags = {}; + exports.list.forEach((commandName) => { + flags[commandName] = commands_json_1.default[commandName].flags.reduce(function(flags2, flag) { + flags2[flag] = true; + return flags2; + }, {}); + }); + function exists3(commandName, options) { + commandName = (options === null || options === void 0 ? void 0 : options.caseInsensitive) ? String(commandName).toLowerCase() : commandName; + return Boolean(commands_json_1.default[commandName]); + } + __name(exists3, "exists"); + exports.exists = exists3; + function hasFlag(commandName, flag, options) { + commandName = (options === null || options === void 0 ? void 0 : options.nameCaseInsensitive) ? String(commandName).toLowerCase() : commandName; + if (!flags[commandName]) { + throw new Error("Unknown command " + commandName); + } + return Boolean(flags[commandName][flag]); + } + __name(hasFlag, "hasFlag"); + exports.hasFlag = hasFlag; + function getKeyIndexes(commandName, args, options) { + commandName = (options === null || options === void 0 ? void 0 : options.nameCaseInsensitive) ? String(commandName).toLowerCase() : commandName; + const command = commands_json_1.default[commandName]; + if (!command) { + throw new Error("Unknown command " + commandName); + } + if (!Array.isArray(args)) { + throw new Error("Expect args to be an array"); + } + const keys = []; + const parseExternalKey = Boolean(options && options.parseExternalKey); + const takeDynamicKeys = /* @__PURE__ */ __name((args2, startIndex) => { + const keys2 = []; + const keyStop = Number(args2[startIndex]); + for (let i = 0; i < keyStop; i++) { + keys2.push(i + startIndex + 1); + } + return keys2; + }, "takeDynamicKeys"); + const takeKeyAfterToken = /* @__PURE__ */ __name((args2, startIndex, token) => { + for (let i = startIndex; i < args2.length - 1; i += 1) { + if (String(args2[i]).toLowerCase() === token.toLowerCase()) { + return i + 1; + } + } + return null; + }, "takeKeyAfterToken"); + switch (commandName) { + case "zunionstore": + case "zinterstore": + case "zdiffstore": + keys.push(0, ...takeDynamicKeys(args, 1)); + break; + case "eval": + case "evalsha": + case "eval_ro": + case "evalsha_ro": + case "fcall": + case "fcall_ro": + case "blmpop": + case "bzmpop": + keys.push(...takeDynamicKeys(args, 1)); + break; + case "sintercard": + case "lmpop": + case "zunion": + case "zinter": + case "zmpop": + case "zintercard": + case "zdiff": { + keys.push(...takeDynamicKeys(args, 0)); + break; + } + case "georadius": { + keys.push(0); + const storeKey = takeKeyAfterToken(args, 5, "STORE"); + if (storeKey) + keys.push(storeKey); + const distKey = takeKeyAfterToken(args, 5, "STOREDIST"); + if (distKey) + keys.push(distKey); + break; + } + case "georadiusbymember": { + keys.push(0); + const storeKey = takeKeyAfterToken(args, 4, "STORE"); + if (storeKey) + keys.push(storeKey); + const distKey = takeKeyAfterToken(args, 4, "STOREDIST"); + if (distKey) + keys.push(distKey); + break; + } + case "sort": + case "sort_ro": + keys.push(0); + for (let i = 1; i < args.length - 1; i++) { + let arg = args[i]; + if (typeof arg !== "string") { + continue; + } + const directive = arg.toUpperCase(); + if (directive === "GET") { + i += 1; + arg = args[i]; + if (arg !== "#") { + if (parseExternalKey) { + keys.push([i, getExternalKeyNameLength(arg)]); + } else { + keys.push(i); + } + } + } else if (directive === "BY") { + i += 1; + if (parseExternalKey) { + keys.push([i, getExternalKeyNameLength(args[i])]); + } else { + keys.push(i); + } + } else if (directive === "STORE") { + i += 1; + keys.push(i); + } + } + break; + case "migrate": + if (args[2] === "") { + for (let i = 5; i < args.length - 1; i++) { + const arg = args[i]; + if (typeof arg === "string" && arg.toUpperCase() === "KEYS") { + for (let j = i + 1; j < args.length; j++) { + keys.push(j); + } + break; + } + } + } else { + keys.push(2); + } + break; + case "xreadgroup": + case "xread": + for (let i = commandName === "xread" ? 0 : 3; i < args.length - 1; i++) { + if (String(args[i]).toUpperCase() === "STREAMS") { + for (let j = i + 1; j <= i + (args.length - 1 - i) / 2; j++) { + keys.push(j); + } + break; + } + } + break; + default: + if (command.step > 0) { + const keyStart = command.keyStart - 1; + const keyStop = command.keyStop > 0 ? command.keyStop : args.length + command.keyStop + 1; + for (let i = keyStart; i < keyStop; i += command.step) { + keys.push(i); + } + } + break; + } + return keys; + } + __name(getKeyIndexes, "getKeyIndexes"); + exports.getKeyIndexes = getKeyIndexes; + function getExternalKeyNameLength(key) { + if (typeof key !== "string") { + key = String(key); + } + const hashPos = key.indexOf("->"); + return hashPos === -1 ? key.length : hashPos; + } + __name(getExternalKeyNameLength, "getExternalKeyNameLength"); + } +}); + +// node-built-in-modules:events +import libDefault from "events"; +var require_events = __commonJS({ + "node-built-in-modules:events"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module2.exports = libDefault; + } +}); + +// ../../node_modules/standard-as-callback/built/utils.js +var require_utils = __commonJS({ + "../../node_modules/standard-as-callback/built/utils.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.tryCatch = exports.errorObj = void 0; + exports.errorObj = { e: {} }; + var tryCatchTarget; + function tryCatcher(err, val) { + try { + const target2 = tryCatchTarget; + tryCatchTarget = null; + return target2.apply(this, arguments); + } catch (e) { + exports.errorObj.e = e; + return exports.errorObj; + } + } + __name(tryCatcher, "tryCatcher"); + function tryCatch2(fn) { + tryCatchTarget = fn; + return tryCatcher; + } + __name(tryCatch2, "tryCatch"); + exports.tryCatch = tryCatch2; + } +}); + +// ../../node_modules/standard-as-callback/built/index.js +var require_built2 = __commonJS({ + "../../node_modules/standard-as-callback/built/index.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var utils_1 = require_utils(); + function throwLater(e) { + setTimeout(function() { + throw e; + }, 0); + } + __name(throwLater, "throwLater"); + function asCallback(promise2, nodeback, options) { + if (typeof nodeback === "function") { + promise2.then((val) => { + let ret; + if (options !== void 0 && Object(options).spread && Array.isArray(val)) { + ret = utils_1.tryCatch(nodeback).apply(void 0, [null].concat(val)); + } else { + ret = val === void 0 ? utils_1.tryCatch(nodeback)(null) : utils_1.tryCatch(nodeback)(null, val); + } + if (ret === utils_1.errorObj) { + throwLater(ret.e); + } + }, (cause) => { + if (!cause) { + const newReason = new Error(cause + ""); + Object.assign(newReason, { cause }); + cause = newReason; + } + const ret = utils_1.tryCatch(nodeback)(cause); + if (ret === utils_1.errorObj) { + throwLater(ret.e); + } + }); + } + return promise2; + } + __name(asCallback, "asCallback"); + exports.default = asCallback; + } +}); + +// node-built-in-modules:assert +import libDefault2 from "assert"; +var require_assert = __commonJS({ + "node-built-in-modules:assert"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module2.exports = libDefault2; + } +}); + +// node-built-in-modules:util +import libDefault3 from "util"; +var require_util = __commonJS({ + "node-built-in-modules:util"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module2.exports = libDefault3; + } +}); + +// ../../node_modules/redis-errors/lib/old.js +var require_old = __commonJS({ + "../../node_modules/redis-errors/lib/old.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var assert4 = require_assert(); + var util = require_util(); + function RedisError(message2) { + Object.defineProperty(this, "message", { + value: message2 || "", + configurable: true, + writable: true + }); + Error.captureStackTrace(this, this.constructor); + } + __name(RedisError, "RedisError"); + util.inherits(RedisError, Error); + Object.defineProperty(RedisError.prototype, "name", { + value: "RedisError", + configurable: true, + writable: true + }); + function ParserError(message2, buffer, offset) { + assert4(buffer); + assert4.strictEqual(typeof offset, "number"); + Object.defineProperty(this, "message", { + value: message2 || "", + configurable: true, + writable: true + }); + const tmp = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + Error.captureStackTrace(this, this.constructor); + Error.stackTraceLimit = tmp; + this.offset = offset; + this.buffer = buffer; + } + __name(ParserError, "ParserError"); + util.inherits(ParserError, RedisError); + Object.defineProperty(ParserError.prototype, "name", { + value: "ParserError", + configurable: true, + writable: true + }); + function ReplyError(message2) { + Object.defineProperty(this, "message", { + value: message2 || "", + configurable: true, + writable: true + }); + const tmp = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + Error.captureStackTrace(this, this.constructor); + Error.stackTraceLimit = tmp; + } + __name(ReplyError, "ReplyError"); + util.inherits(ReplyError, RedisError); + Object.defineProperty(ReplyError.prototype, "name", { + value: "ReplyError", + configurable: true, + writable: true + }); + function AbortError2(message2) { + Object.defineProperty(this, "message", { + value: message2 || "", + configurable: true, + writable: true + }); + Error.captureStackTrace(this, this.constructor); + } + __name(AbortError2, "AbortError"); + util.inherits(AbortError2, RedisError); + Object.defineProperty(AbortError2.prototype, "name", { + value: "AbortError", + configurable: true, + writable: true + }); + function InterruptError(message2) { + Object.defineProperty(this, "message", { + value: message2 || "", + configurable: true, + writable: true + }); + Error.captureStackTrace(this, this.constructor); + } + __name(InterruptError, "InterruptError"); + util.inherits(InterruptError, AbortError2); + Object.defineProperty(InterruptError.prototype, "name", { + value: "InterruptError", + configurable: true, + writable: true + }); + module2.exports = { + RedisError, + ParserError, + ReplyError, + AbortError: AbortError2, + InterruptError + }; + } +}); + +// ../../node_modules/redis-errors/lib/modern.js +var require_modern = __commonJS({ + "../../node_modules/redis-errors/lib/modern.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var assert4 = require_assert(); + var RedisError = class extends Error { + static { + __name(this, "RedisError"); + } + get name() { + return this.constructor.name; + } + }; + var ParserError = class extends RedisError { + static { + __name(this, "ParserError"); + } + constructor(message2, buffer, offset) { + assert4(buffer); + assert4.strictEqual(typeof offset, "number"); + const tmp = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + super(message2); + Error.stackTraceLimit = tmp; + this.offset = offset; + this.buffer = buffer; + } + get name() { + return this.constructor.name; + } + }; + var ReplyError = class extends RedisError { + static { + __name(this, "ReplyError"); + } + constructor(message2) { + const tmp = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + super(message2); + Error.stackTraceLimit = tmp; + } + get name() { + return this.constructor.name; + } + }; + var AbortError2 = class extends RedisError { + static { + __name(this, "AbortError"); + } + get name() { + return this.constructor.name; + } + }; + var InterruptError = class extends AbortError2 { + static { + __name(this, "InterruptError"); + } + get name() { + return this.constructor.name; + } + }; + module2.exports = { + RedisError, + ParserError, + ReplyError, + AbortError: AbortError2, + InterruptError + }; + } +}); + +// ../../node_modules/redis-errors/index.js +var require_redis_errors = __commonJS({ + "../../node_modules/redis-errors/index.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var Errors2 = process.version.charCodeAt(1) < 55 && process.version.charCodeAt(2) === 46 ? require_old() : require_modern(); + module2.exports = Errors2; + } +}); + +// ../../node_modules/cluster-key-slot/lib/index.js +var require_lib = __commonJS({ + "../../node_modules/cluster-key-slot/lib/index.js"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var lookup = [ + 0, + 4129, + 8258, + 12387, + 16516, + 20645, + 24774, + 28903, + 33032, + 37161, + 41290, + 45419, + 49548, + 53677, + 57806, + 61935, + 4657, + 528, + 12915, + 8786, + 21173, + 17044, + 29431, + 25302, + 37689, + 33560, + 45947, + 41818, + 54205, + 50076, + 62463, + 58334, + 9314, + 13379, + 1056, + 5121, + 25830, + 29895, + 17572, + 21637, + 42346, + 46411, + 34088, + 38153, + 58862, + 62927, + 50604, + 54669, + 13907, + 9842, + 5649, + 1584, + 30423, + 26358, + 22165, + 18100, + 46939, + 42874, + 38681, + 34616, + 63455, + 59390, + 55197, + 51132, + 18628, + 22757, + 26758, + 30887, + 2112, + 6241, + 10242, + 14371, + 51660, + 55789, + 59790, + 63919, + 35144, + 39273, + 43274, + 47403, + 23285, + 19156, + 31415, + 27286, + 6769, + 2640, + 14899, + 10770, + 56317, + 52188, + 64447, + 60318, + 39801, + 35672, + 47931, + 43802, + 27814, + 31879, + 19684, + 23749, + 11298, + 15363, + 3168, + 7233, + 60846, + 64911, + 52716, + 56781, + 44330, + 48395, + 36200, + 40265, + 32407, + 28342, + 24277, + 20212, + 15891, + 11826, + 7761, + 3696, + 65439, + 61374, + 57309, + 53244, + 48923, + 44858, + 40793, + 36728, + 37256, + 33193, + 45514, + 41451, + 53516, + 49453, + 61774, + 57711, + 4224, + 161, + 12482, + 8419, + 20484, + 16421, + 28742, + 24679, + 33721, + 37784, + 41979, + 46042, + 49981, + 54044, + 58239, + 62302, + 689, + 4752, + 8947, + 13010, + 16949, + 21012, + 25207, + 29270, + 46570, + 42443, + 38312, + 34185, + 62830, + 58703, + 54572, + 50445, + 13538, + 9411, + 5280, + 1153, + 29798, + 25671, + 21540, + 17413, + 42971, + 47098, + 34713, + 38840, + 59231, + 63358, + 50973, + 55100, + 9939, + 14066, + 1681, + 5808, + 26199, + 30326, + 17941, + 22068, + 55628, + 51565, + 63758, + 59695, + 39368, + 35305, + 47498, + 43435, + 22596, + 18533, + 30726, + 26663, + 6336, + 2273, + 14466, + 10403, + 52093, + 56156, + 60223, + 64286, + 35833, + 39896, + 43963, + 48026, + 19061, + 23124, + 27191, + 31254, + 2801, + 6864, + 10931, + 14994, + 64814, + 60687, + 56684, + 52557, + 48554, + 44427, + 40424, + 36297, + 31782, + 27655, + 23652, + 19525, + 15522, + 11395, + 7392, + 3265, + 61215, + 65342, + 53085, + 57212, + 44955, + 49082, + 36825, + 40952, + 28183, + 32310, + 20053, + 24180, + 11923, + 16050, + 3793, + 7920 + ]; + var toUTF8Array = /* @__PURE__ */ __name(function toUTF8Array2(str) { + var char; + var i = 0; + var p = 0; + var utf8 = []; + var len = str.length; + for (; i < len; i++) { + char = str.charCodeAt(i); + if (char < 128) { + utf8[p++] = char; + } else if (char < 2048) { + utf8[p++] = char >> 6 | 192; + utf8[p++] = char & 63 | 128; + } else if ((char & 64512) === 55296 && i + 1 < str.length && (str.charCodeAt(i + 1) & 64512) === 56320) { + char = 65536 + ((char & 1023) << 10) + (str.charCodeAt(++i) & 1023); + utf8[p++] = char >> 18 | 240; + utf8[p++] = char >> 12 & 63 | 128; + utf8[p++] = char >> 6 & 63 | 128; + utf8[p++] = char & 63 | 128; + } else { + utf8[p++] = char >> 12 | 224; + utf8[p++] = char >> 6 & 63 | 128; + utf8[p++] = char & 63 | 128; + } + } + return utf8; + }, "toUTF8Array"); + var generate = module2.exports = /* @__PURE__ */ __name(function generate2(str) { + var char; + var i = 0; + var start = -1; + var result = 0; + var resultHash = 0; + var utf8 = typeof str === "string" ? toUTF8Array(str) : str; + var len = utf8.length; + while (i < len) { + char = utf8[i++]; + if (start === -1) { + if (char === 123) { + start = i; + } + } else if (char !== 125) { + resultHash = lookup[(char ^ resultHash >> 8) & 255] ^ resultHash << 8; + } else if (i - 1 !== start) { + return resultHash & 16383; + } + result = lookup[(char ^ result >> 8) & 255] ^ result << 8; + } + return result & 16383; + }, "generate"); + module2.exports.generateMulti = /* @__PURE__ */ __name(function generateMulti(keys) { + var i = 1; + var len = keys.length; + var base = generate(keys[0]); + while (i < len) { + if (generate(keys[i++]) !== base) return -1; + } + return base; + }, "generateMulti"); + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/fs/promises.mjs +var access, copyFile, cp, open, opendir, rename, truncate, rm, rmdir, mkdir, readdir, readlink, symlink, lstat, stat, link, unlink, chmod, lchmod, lchown, chown, utimes, lutimes, realpath, mkdtemp, writeFile, appendFile, readFile, watch, statfs, glob; +var init_promises = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/fs/promises.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils(); + access = /* @__PURE__ */ notImplemented("fs.access"); + copyFile = /* @__PURE__ */ notImplemented("fs.copyFile"); + cp = /* @__PURE__ */ notImplemented("fs.cp"); + open = /* @__PURE__ */ notImplemented("fs.open"); + opendir = /* @__PURE__ */ notImplemented("fs.opendir"); + rename = /* @__PURE__ */ notImplemented("fs.rename"); + truncate = /* @__PURE__ */ notImplemented("fs.truncate"); + rm = /* @__PURE__ */ notImplemented("fs.rm"); + rmdir = /* @__PURE__ */ notImplemented("fs.rmdir"); + mkdir = /* @__PURE__ */ notImplemented("fs.mkdir"); + readdir = /* @__PURE__ */ notImplemented("fs.readdir"); + readlink = /* @__PURE__ */ notImplemented("fs.readlink"); + symlink = /* @__PURE__ */ notImplemented("fs.symlink"); + lstat = /* @__PURE__ */ notImplemented("fs.lstat"); + stat = /* @__PURE__ */ notImplemented("fs.stat"); + link = /* @__PURE__ */ notImplemented("fs.link"); + unlink = /* @__PURE__ */ notImplemented("fs.unlink"); + chmod = /* @__PURE__ */ notImplemented("fs.chmod"); + lchmod = /* @__PURE__ */ notImplemented("fs.lchmod"); + lchown = /* @__PURE__ */ notImplemented("fs.lchown"); + chown = /* @__PURE__ */ notImplemented("fs.chown"); + utimes = /* @__PURE__ */ notImplemented("fs.utimes"); + lutimes = /* @__PURE__ */ notImplemented("fs.lutimes"); + realpath = /* @__PURE__ */ notImplemented("fs.realpath"); + mkdtemp = /* @__PURE__ */ notImplemented("fs.mkdtemp"); + writeFile = /* @__PURE__ */ notImplemented("fs.writeFile"); + appendFile = /* @__PURE__ */ notImplemented("fs.appendFile"); + readFile = /* @__PURE__ */ notImplemented("fs.readFile"); + watch = /* @__PURE__ */ notImplemented("fs.watch"); + statfs = /* @__PURE__ */ notImplemented("fs.statfs"); + glob = /* @__PURE__ */ notImplemented("fs.glob"); + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/fs/constants.mjs +var constants_exports = {}; +__export(constants_exports, { + COPYFILE_EXCL: () => COPYFILE_EXCL, + COPYFILE_FICLONE: () => COPYFILE_FICLONE, + COPYFILE_FICLONE_FORCE: () => COPYFILE_FICLONE_FORCE, + EXTENSIONLESS_FORMAT_JAVASCRIPT: () => EXTENSIONLESS_FORMAT_JAVASCRIPT, + EXTENSIONLESS_FORMAT_WASM: () => EXTENSIONLESS_FORMAT_WASM, + F_OK: () => F_OK, + O_APPEND: () => O_APPEND, + O_CREAT: () => O_CREAT, + O_DIRECT: () => O_DIRECT, + O_DIRECTORY: () => O_DIRECTORY, + O_DSYNC: () => O_DSYNC, + O_EXCL: () => O_EXCL, + O_NOATIME: () => O_NOATIME, + O_NOCTTY: () => O_NOCTTY, + O_NOFOLLOW: () => O_NOFOLLOW, + O_NONBLOCK: () => O_NONBLOCK, + O_RDONLY: () => O_RDONLY, + O_RDWR: () => O_RDWR, + O_SYNC: () => O_SYNC, + O_TRUNC: () => O_TRUNC, + O_WRONLY: () => O_WRONLY, + R_OK: () => R_OK, + S_IFBLK: () => S_IFBLK, + S_IFCHR: () => S_IFCHR, + S_IFDIR: () => S_IFDIR, + S_IFIFO: () => S_IFIFO, + S_IFLNK: () => S_IFLNK, + S_IFMT: () => S_IFMT, + S_IFREG: () => S_IFREG, + S_IFSOCK: () => S_IFSOCK, + S_IRGRP: () => S_IRGRP, + S_IROTH: () => S_IROTH, + S_IRUSR: () => S_IRUSR, + S_IRWXG: () => S_IRWXG, + S_IRWXO: () => S_IRWXO, + S_IRWXU: () => S_IRWXU, + S_IWGRP: () => S_IWGRP, + S_IWOTH: () => S_IWOTH, + S_IWUSR: () => S_IWUSR, + S_IXGRP: () => S_IXGRP, + S_IXOTH: () => S_IXOTH, + S_IXUSR: () => S_IXUSR, + UV_DIRENT_BLOCK: () => UV_DIRENT_BLOCK, + UV_DIRENT_CHAR: () => UV_DIRENT_CHAR, + UV_DIRENT_DIR: () => UV_DIRENT_DIR, + UV_DIRENT_FIFO: () => UV_DIRENT_FIFO, + UV_DIRENT_FILE: () => UV_DIRENT_FILE, + UV_DIRENT_LINK: () => UV_DIRENT_LINK, + UV_DIRENT_SOCKET: () => UV_DIRENT_SOCKET, + UV_DIRENT_UNKNOWN: () => UV_DIRENT_UNKNOWN, + UV_FS_COPYFILE_EXCL: () => UV_FS_COPYFILE_EXCL, + UV_FS_COPYFILE_FICLONE: () => UV_FS_COPYFILE_FICLONE, + UV_FS_COPYFILE_FICLONE_FORCE: () => UV_FS_COPYFILE_FICLONE_FORCE, + UV_FS_O_FILEMAP: () => UV_FS_O_FILEMAP, + UV_FS_SYMLINK_DIR: () => UV_FS_SYMLINK_DIR, + UV_FS_SYMLINK_JUNCTION: () => UV_FS_SYMLINK_JUNCTION, + W_OK: () => W_OK, + X_OK: () => X_OK +}); +var UV_FS_SYMLINK_DIR, UV_FS_SYMLINK_JUNCTION, O_RDONLY, O_WRONLY, O_RDWR, UV_DIRENT_UNKNOWN, UV_DIRENT_FILE, UV_DIRENT_DIR, UV_DIRENT_LINK, UV_DIRENT_FIFO, UV_DIRENT_SOCKET, UV_DIRENT_CHAR, UV_DIRENT_BLOCK, EXTENSIONLESS_FORMAT_JAVASCRIPT, EXTENSIONLESS_FORMAT_WASM, S_IFMT, S_IFREG, S_IFDIR, S_IFCHR, S_IFBLK, S_IFIFO, S_IFLNK, S_IFSOCK, O_CREAT, O_EXCL, UV_FS_O_FILEMAP, O_NOCTTY, O_TRUNC, O_APPEND, O_DIRECTORY, O_NOATIME, O_NOFOLLOW, O_SYNC, O_DSYNC, O_DIRECT, O_NONBLOCK, S_IRWXU, S_IRUSR, S_IWUSR, S_IXUSR, S_IRWXG, S_IRGRP, S_IWGRP, S_IXGRP, S_IRWXO, S_IROTH, S_IWOTH, S_IXOTH, F_OK, R_OK, W_OK, X_OK, UV_FS_COPYFILE_EXCL, COPYFILE_EXCL, UV_FS_COPYFILE_FICLONE, COPYFILE_FICLONE, UV_FS_COPYFILE_FICLONE_FORCE, COPYFILE_FICLONE_FORCE; +var init_constants = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/fs/constants.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + 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; + EXTENSIONLESS_FORMAT_JAVASCRIPT = 0; + EXTENSIONLESS_FORMAT_WASM = 1; + 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 = 64; + O_EXCL = 128; + UV_FS_O_FILEMAP = 0; + O_NOCTTY = 256; + O_TRUNC = 512; + O_APPEND = 1024; + O_DIRECTORY = 65536; + O_NOATIME = 262144; + O_NOFOLLOW = 131072; + O_SYNC = 1052672; + O_DSYNC = 4096; + O_DIRECT = 16384; + O_NONBLOCK = 2048; + 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; + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/fs/promises.mjs +var promises_default; +var init_promises2 = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/fs/promises.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_promises(); + init_constants(); + init_promises(); + promises_default = { + constants: constants_exports, + access, + appendFile, + chmod, + chown, + copyFile, + cp, + glob, + lchmod, + lchown, + link, + lstat, + lutimes, + mkdir, + mkdtemp, + open, + opendir, + readFile, + readdir, + readlink, + realpath, + rename, + rm, + rmdir, + stat, + statfs, + symlink, + truncate, + unlink, + utimes, + watch, + writeFile + }; + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/fs/classes.mjs +var Dir, Dirent, Stats, ReadStream2, WriteStream2, FileReadStream, FileWriteStream; +var init_classes = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/fs/classes.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils(); + Dir = /* @__PURE__ */ notImplementedClass("fs.Dir"); + Dirent = /* @__PURE__ */ notImplementedClass("fs.Dirent"); + Stats = /* @__PURE__ */ notImplementedClass("fs.Stats"); + ReadStream2 = /* @__PURE__ */ notImplementedClass("fs.ReadStream"); + WriteStream2 = /* @__PURE__ */ notImplementedClass("fs.WriteStream"); + FileReadStream = ReadStream2; + FileWriteStream = WriteStream2; + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/fs/fs.mjs +function callbackify(fn) { + const fnc = /* @__PURE__ */ __name(function(...args) { + const cb = args.pop(); + fn().catch((error50) => cb(error50)).then((val) => cb(void 0, val)); + }, "fnc"); + fnc.__promisify__ = fn; + fnc.native = fnc; + return fnc; +} +var access2, appendFile2, chown2, chmod2, copyFile2, cp2, lchown2, lchmod2, link2, lstat2, lutimes2, mkdir2, mkdtemp2, realpath2, open2, opendir2, readdir2, readFile2, readlink2, rename2, rm2, rmdir2, stat2, symlink2, truncate2, unlink2, utimes2, writeFile2, statfs2, close, createReadStream, createWriteStream, exists2, fchown, fchmod, fdatasync, fstat, fsync, ftruncate, futimes, lstatSync, read, readv, realpathSync, statSync, unwatchFile, watch2, watchFile, write, writev, _toUnixTimestamp, openAsBlob, glob2, appendFileSync, accessSync, chownSync, chmodSync, closeSync, copyFileSync, cpSync, existsSync, fchownSync, fchmodSync, fdatasyncSync, fstatSync, fsyncSync, ftruncateSync, futimesSync, lchownSync, lchmodSync, linkSync, lutimesSync, mkdirSync, mkdtempSync, openSync, opendirSync, readdirSync, readSync, readvSync, readFileSync, readlinkSync, renameSync, rmSync, rmdirSync, symlinkSync, truncateSync, unlinkSync, utimesSync, writeFileSync, writeSync, writevSync, statfsSync, globSync; +var init_fs = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/fs/fs.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils(); + init_promises(); + __name(callbackify, "callbackify"); + access2 = callbackify(access); + appendFile2 = callbackify(appendFile); + chown2 = callbackify(chown); + chmod2 = callbackify(chmod); + copyFile2 = callbackify(copyFile); + cp2 = callbackify(cp); + lchown2 = callbackify(lchown); + lchmod2 = callbackify(lchmod); + link2 = callbackify(link); + lstat2 = callbackify(lstat); + lutimes2 = callbackify(lutimes); + mkdir2 = callbackify(mkdir); + mkdtemp2 = callbackify(mkdtemp); + realpath2 = callbackify(realpath); + open2 = callbackify(open); + opendir2 = callbackify(opendir); + readdir2 = callbackify(readdir); + readFile2 = callbackify(readFile); + readlink2 = callbackify(readlink); + rename2 = callbackify(rename); + rm2 = callbackify(rm); + rmdir2 = callbackify(rmdir); + stat2 = callbackify(stat); + symlink2 = callbackify(symlink); + truncate2 = callbackify(truncate); + unlink2 = callbackify(unlink); + utimes2 = callbackify(utimes); + writeFile2 = callbackify(writeFile); + statfs2 = callbackify(statfs); + close = /* @__PURE__ */ notImplementedAsync("fs.close"); + createReadStream = /* @__PURE__ */ notImplementedAsync("fs.createReadStream"); + createWriteStream = /* @__PURE__ */ notImplementedAsync("fs.createWriteStream"); + exists2 = /* @__PURE__ */ notImplementedAsync("fs.exists"); + fchown = /* @__PURE__ */ notImplementedAsync("fs.fchown"); + fchmod = /* @__PURE__ */ notImplementedAsync("fs.fchmod"); + fdatasync = /* @__PURE__ */ notImplementedAsync("fs.fdatasync"); + fstat = /* @__PURE__ */ notImplementedAsync("fs.fstat"); + fsync = /* @__PURE__ */ notImplementedAsync("fs.fsync"); + ftruncate = /* @__PURE__ */ notImplementedAsync("fs.ftruncate"); + futimes = /* @__PURE__ */ notImplementedAsync("fs.futimes"); + lstatSync = /* @__PURE__ */ notImplementedAsync("fs.lstatSync"); + read = /* @__PURE__ */ notImplementedAsync("fs.read"); + readv = /* @__PURE__ */ notImplementedAsync("fs.readv"); + realpathSync = /* @__PURE__ */ notImplementedAsync("fs.realpathSync"); + statSync = /* @__PURE__ */ notImplementedAsync("fs.statSync"); + unwatchFile = /* @__PURE__ */ notImplementedAsync("fs.unwatchFile"); + watch2 = /* @__PURE__ */ notImplementedAsync("fs.watch"); + watchFile = /* @__PURE__ */ notImplementedAsync("fs.watchFile"); + write = /* @__PURE__ */ notImplementedAsync("fs.write"); + writev = /* @__PURE__ */ notImplementedAsync("fs.writev"); + _toUnixTimestamp = /* @__PURE__ */ notImplementedAsync("fs._toUnixTimestamp"); + openAsBlob = /* @__PURE__ */ notImplementedAsync("fs.openAsBlob"); + glob2 = /* @__PURE__ */ notImplementedAsync("fs.glob"); + appendFileSync = /* @__PURE__ */ notImplemented("fs.appendFileSync"); + accessSync = /* @__PURE__ */ notImplemented("fs.accessSync"); + chownSync = /* @__PURE__ */ notImplemented("fs.chownSync"); + chmodSync = /* @__PURE__ */ notImplemented("fs.chmodSync"); + closeSync = /* @__PURE__ */ notImplemented("fs.closeSync"); + copyFileSync = /* @__PURE__ */ notImplemented("fs.copyFileSync"); + cpSync = /* @__PURE__ */ notImplemented("fs.cpSync"); + existsSync = /* @__PURE__ */ __name(() => false, "existsSync"); + fchownSync = /* @__PURE__ */ notImplemented("fs.fchownSync"); + fchmodSync = /* @__PURE__ */ notImplemented("fs.fchmodSync"); + fdatasyncSync = /* @__PURE__ */ notImplemented("fs.fdatasyncSync"); + fstatSync = /* @__PURE__ */ notImplemented("fs.fstatSync"); + fsyncSync = /* @__PURE__ */ notImplemented("fs.fsyncSync"); + ftruncateSync = /* @__PURE__ */ notImplemented("fs.ftruncateSync"); + futimesSync = /* @__PURE__ */ notImplemented("fs.futimesSync"); + lchownSync = /* @__PURE__ */ notImplemented("fs.lchownSync"); + lchmodSync = /* @__PURE__ */ notImplemented("fs.lchmodSync"); + linkSync = /* @__PURE__ */ notImplemented("fs.linkSync"); + lutimesSync = /* @__PURE__ */ notImplemented("fs.lutimesSync"); + mkdirSync = /* @__PURE__ */ notImplemented("fs.mkdirSync"); + mkdtempSync = /* @__PURE__ */ notImplemented("fs.mkdtempSync"); + openSync = /* @__PURE__ */ notImplemented("fs.openSync"); + opendirSync = /* @__PURE__ */ notImplemented("fs.opendirSync"); + readdirSync = /* @__PURE__ */ notImplemented("fs.readdirSync"); + readSync = /* @__PURE__ */ notImplemented("fs.readSync"); + readvSync = /* @__PURE__ */ notImplemented("fs.readvSync"); + readFileSync = /* @__PURE__ */ notImplemented("fs.readFileSync"); + readlinkSync = /* @__PURE__ */ notImplemented("fs.readlinkSync"); + renameSync = /* @__PURE__ */ notImplemented("fs.renameSync"); + rmSync = /* @__PURE__ */ notImplemented("fs.rmSync"); + rmdirSync = /* @__PURE__ */ notImplemented("fs.rmdirSync"); + symlinkSync = /* @__PURE__ */ notImplemented("fs.symlinkSync"); + truncateSync = /* @__PURE__ */ notImplemented("fs.truncateSync"); + unlinkSync = /* @__PURE__ */ notImplemented("fs.unlinkSync"); + utimesSync = /* @__PURE__ */ notImplemented("fs.utimesSync"); + writeFileSync = /* @__PURE__ */ notImplemented("fs.writeFileSync"); + writeSync = /* @__PURE__ */ notImplemented("fs.writeSync"); + writevSync = /* @__PURE__ */ notImplemented("fs.writevSync"); + statfsSync = /* @__PURE__ */ notImplemented("fs.statfsSync"); + globSync = /* @__PURE__ */ notImplemented("fs.globSync"); + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/fs.mjs +var fs_default; +var init_fs2 = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/fs.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_promises2(); + init_classes(); + init_fs(); + init_constants(); + init_constants(); + init_fs(); + init_classes(); + fs_default = { + F_OK, + R_OK, + W_OK, + X_OK, + constants: constants_exports, + promises: promises_default, + Dir, + Dirent, + FileReadStream, + FileWriteStream, + ReadStream: ReadStream2, + Stats, + WriteStream: WriteStream2, + _toUnixTimestamp, + access: access2, + accessSync, + appendFile: appendFile2, + appendFileSync, + chmod: chmod2, + chmodSync, + chown: chown2, + chownSync, + close, + closeSync, + copyFile: copyFile2, + copyFileSync, + cp: cp2, + cpSync, + createReadStream, + createWriteStream, + exists: exists2, + existsSync, + fchmod, + fchmodSync, + fchown, + fchownSync, + fdatasync, + fdatasyncSync, + fstat, + fstatSync, + fsync, + fsyncSync, + ftruncate, + ftruncateSync, + futimes, + futimesSync, + glob: glob2, + lchmod: lchmod2, + globSync, + lchmodSync, + lchown: lchown2, + lchownSync, + link: link2, + linkSync, + lstat: lstat2, + lstatSync, + lutimes: lutimes2, + lutimesSync, + mkdir: mkdir2, + mkdirSync, + mkdtemp: mkdtemp2, + mkdtempSync, + open: open2, + openAsBlob, + openSync, + opendir: opendir2, + opendirSync, + read, + readFile: readFile2, + readFileSync, + readSync, + readdir: readdir2, + readdirSync, + readlink: readlink2, + readlinkSync, + readv, + readvSync, + realpath: realpath2, + realpathSync, + rename: rename2, + renameSync, + rm: rm2, + rmSync, + rmdir: rmdir2, + rmdirSync, + stat: stat2, + statSync, + statfs: statfs2, + statfsSync, + symlink: symlink2, + symlinkSync, + truncate: truncate2, + truncateSync, + unlink: unlink2, + unlinkSync, + unwatchFile, + utimes: utimes2, + utimesSync, + watch: watch2, + watchFile, + write, + writeFile: writeFile2, + writeFileSync, + writeSync, + writev, + writevSync + }; + } +}); + +// node-built-in-modules:fs +var require_fs = __commonJS({ + "node-built-in-modules:fs"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fs2(); + module2.exports = fs_default; + } +}); + +// node-built-in-modules:path +import libDefault4 from "path"; +var require_path = __commonJS({ + "node-built-in-modules:path"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module2.exports = libDefault4; + } +}); + +// node-built-in-modules:url +import libDefault5 from "url"; +var require_url = __commonJS({ + "node-built-in-modules:url"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module2.exports = libDefault5; + } +}); + +// ../../node_modules/lodash.defaults/index.js +var require_lodash = __commonJS({ + "../../node_modules/lodash.defaults/index.js"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var MAX_SAFE_INTEGER = 9007199254740991; + var argsTag = "[object Arguments]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var reIsUint = /^(?:0|[1-9]\d*)$/; + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + __name(apply, "apply"); + function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + __name(baseTimes, "baseTimes"); + var objectProto = Object.prototype; + var hasOwnProperty2 = objectProto.hasOwnProperty; + var objectToString = objectProto.toString; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var nativeMax = Math.max; + function arrayLikeKeys(value, inherited) { + var result = isArray2(value) || isArguments(value) ? baseTimes(value.length, String) : []; + var length = result.length, skipIndexes = !!length; + for (var key in value) { + if ((inherited || hasOwnProperty2.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + __name(arrayLikeKeys, "arrayLikeKeys"); + function assignInDefaults(objValue, srcValue, key, object2) { + if (objValue === void 0 || eq2(objValue, objectProto[key]) && !hasOwnProperty2.call(object2, key)) { + return srcValue; + } + return objValue; + } + __name(assignInDefaults, "assignInDefaults"); + function assignValue(object2, key, value) { + var objValue = object2[key]; + if (!(hasOwnProperty2.call(object2, key) && eq2(objValue, value)) || value === void 0 && !(key in object2)) { + object2[key] = value; + } + } + __name(assignValue, "assignValue"); + function baseKeysIn(object2) { + if (!isObject5(object2)) { + return nativeKeysIn(object2); + } + var isProto = isPrototype(object2), result = []; + for (var key in object2) { + if (!(key == "constructor" && (isProto || !hasOwnProperty2.call(object2, key)))) { + result.push(key); + } + } + return result; + } + __name(baseKeysIn, "baseKeysIn"); + function baseRest(func, start) { + start = nativeMax(start === void 0 ? func.length - 1 : start, 0); + return function() { + var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array2 = Array(length); + while (++index < length) { + array2[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array2; + return apply(func, this, otherArgs); + }; + } + __name(baseRest, "baseRest"); + function copyObject(source, props, object2, customizer) { + object2 || (object2 = {}); + var index = -1, length = props.length; + while (++index < length) { + var key = props[index]; + var newValue = customizer ? customizer(object2[key], source[key], key, object2, source) : void 0; + assignValue(object2, key, newValue === void 0 ? source[key] : newValue); + } + return object2; + } + __name(copyObject, "copyObject"); + function createAssigner(assigner) { + return baseRest(function(object2, sources) { + var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0; + customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? void 0 : customizer; + length = 1; + } + object2 = Object(object2); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object2, source, index, customizer); + } + } + return object2; + }); + } + __name(createAssigner, "createAssigner"); + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + __name(isIndex, "isIndex"); + function isIterateeCall(value, index, object2) { + if (!isObject5(object2)) { + return false; + } + var type = typeof index; + if (type == "number" ? isArrayLike(object2) && isIndex(index, object2.length) : type == "string" && index in object2) { + return eq2(object2[index], value); + } + return false; + } + __name(isIterateeCall, "isIterateeCall"); + function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; + return value === proto; + } + __name(isPrototype, "isPrototype"); + function nativeKeysIn(object2) { + var result = []; + if (object2 != null) { + for (var key in Object(object2)) { + result.push(key); + } + } + return result; + } + __name(nativeKeysIn, "nativeKeysIn"); + function eq2(value, other) { + return value === other || value !== value && other !== other; + } + __name(eq2, "eq"); + function isArguments(value) { + return isArrayLikeObject(value) && hasOwnProperty2.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag); + } + __name(isArguments, "isArguments"); + var isArray2 = Array.isArray; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction4(value); + } + __name(isArrayLike, "isArrayLike"); + function isArrayLikeObject(value) { + return isObjectLike2(value) && isArrayLike(value); + } + __name(isArrayLikeObject, "isArrayLikeObject"); + function isFunction4(value) { + var tag2 = isObject5(value) ? objectToString.call(value) : ""; + return tag2 == funcTag || tag2 == genTag; + } + __name(isFunction4, "isFunction"); + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + __name(isLength, "isLength"); + function isObject5(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + __name(isObject5, "isObject"); + function isObjectLike2(value) { + return !!value && typeof value == "object"; + } + __name(isObjectLike2, "isObjectLike"); + var assignInWith = createAssigner(function(object2, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object2, customizer); + }); + var defaults2 = baseRest(function(args) { + args.push(void 0, assignInDefaults); + return apply(assignInWith, void 0, args); + }); + function keysIn(object2) { + return isArrayLike(object2) ? arrayLikeKeys(object2, true) : baseKeysIn(object2); + } + __name(keysIn, "keysIn"); + module2.exports = defaults2; + } +}); + +// ../../node_modules/lodash.isarguments/index.js +var require_lodash2 = __commonJS({ + "../../node_modules/lodash.isarguments/index.js"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var MAX_SAFE_INTEGER = 9007199254740991; + var argsTag = "[object Arguments]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var objectProto = Object.prototype; + var hasOwnProperty2 = objectProto.hasOwnProperty; + var objectToString = objectProto.toString; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + function isArguments(value) { + return isArrayLikeObject(value) && hasOwnProperty2.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag); + } + __name(isArguments, "isArguments"); + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction4(value); + } + __name(isArrayLike, "isArrayLike"); + function isArrayLikeObject(value) { + return isObjectLike2(value) && isArrayLike(value); + } + __name(isArrayLikeObject, "isArrayLikeObject"); + function isFunction4(value) { + var tag2 = isObject5(value) ? objectToString.call(value) : ""; + return tag2 == funcTag || tag2 == genTag; + } + __name(isFunction4, "isFunction"); + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + __name(isLength, "isLength"); + function isObject5(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + __name(isObject5, "isObject"); + function isObjectLike2(value) { + return !!value && typeof value == "object"; + } + __name(isObjectLike2, "isObjectLike"); + module2.exports = isArguments; + } +}); + +// ../../node_modules/ioredis/built/utils/lodash.js +var require_lodash3 = __commonJS({ + "../../node_modules/ioredis/built/utils/lodash.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isArguments = exports.defaults = exports.noop = void 0; + var defaults2 = require_lodash(); + exports.defaults = defaults2; + var isArguments = require_lodash2(); + exports.isArguments = isArguments; + function noop3() { + } + __name(noop3, "noop"); + exports.noop = noop3; + } +}); + +// ../../node_modules/ms/index.js +var require_ms = __commonJS({ + "../../node_modules/ms/index.js"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var s = 1e3; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; + module2.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === "string" && val.length > 0) { + return parse3(val); + } else if (type === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) + ); + }; + function parse3(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match2 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match2) { + return; + } + var n = parseFloat(match2[1]); + var type = (match2[2] || "ms").toLowerCase(); + switch (type) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return n * y; + case "weeks": + case "week": + case "w": + return n * w; + case "days": + case "day": + case "d": + return n * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return n * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return n * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return n * s; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return n; + default: + return void 0; + } + } + __name(parse3, "parse"); + function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + "d"; + } + if (msAbs >= h) { + return Math.round(ms / h) + "h"; + } + if (msAbs >= m) { + return Math.round(ms / m) + "m"; + } + if (msAbs >= s) { + return Math.round(ms / s) + "s"; + } + return ms + "ms"; + } + __name(fmtShort, "fmtShort"); + function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, "day"); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, "hour"); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, "minute"); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, "second"); + } + return ms + " ms"; + } + __name(fmtLong, "fmtLong"); + function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); + } + __name(plural, "plural"); + } +}); + +// ../../node_modules/debug/src/common.js +var require_common = __commonJS({ + "../../node_modules/debug/src/common.js"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + function setup(env2) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce2; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require_ms(); + createDebug.destroy = destroy; + Object.keys(env2).forEach((key) => { + createDebug[key] = env2[key]; + }); + createDebug.names = []; + createDebug.skips = []; + createDebug.formatters = {}; + function selectColor(namespace) { + let hash3 = 0; + for (let i = 0; i < namespace.length; i++) { + hash3 = (hash3 << 5) - hash3 + namespace.charCodeAt(i); + hash3 |= 0; + } + return createDebug.colors[Math.abs(hash3) % createDebug.colors.length]; + } + __name(selectColor, "selectColor"); + createDebug.selectColor = selectColor; + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + function debug3(...args) { + if (!debug3.enabled) { + return; + } + const self2 = debug3; + const curr = Number(/* @__PURE__ */ new Date()); + const ms = curr - (prevTime || curr); + self2.diff = ms; + self2.prev = prevTime; + self2.curr = curr; + prevTime = curr; + args[0] = createDebug.coerce(args[0]); + if (typeof args[0] !== "string") { + args.unshift("%O"); + } + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match2, format) => { + if (match2 === "%%") { + return "%"; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === "function") { + const val = args[index]; + match2 = formatter.call(self2, val); + args.splice(index, 1); + index--; + } + return match2; + }); + createDebug.formatArgs.call(self2, args); + const logFn = self2.log || createDebug.log; + logFn.apply(self2, args); + } + __name(debug3, "debug"); + debug3.namespace = namespace; + debug3.useColors = createDebug.useColors(); + debug3.color = createDebug.selectColor(namespace); + debug3.extend = extend3; + debug3.destroy = createDebug.destroy; + Object.defineProperty(debug3, "enabled", { + enumerable: true, + configurable: false, + get: /* @__PURE__ */ __name(() => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + return enabledCache; + }, "get"), + set: /* @__PURE__ */ __name((v2) => { + enableOverride = v2; + }, "set") + }); + if (typeof createDebug.init === "function") { + createDebug.init(debug3); + } + return debug3; + } + __name(createDebug, "createDebug"); + function extend3(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + __name(extend3, "extend"); + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + createDebug.names = []; + createDebug.skips = []; + const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean); + for (const ns of split) { + if (ns[0] === "-") { + createDebug.skips.push(ns.slice(1)); + } else { + createDebug.names.push(ns); + } + } + } + __name(enable, "enable"); + function matchesTemplate(search, template) { + let searchIndex = 0; + let templateIndex = 0; + let starIndex = -1; + let matchIndex = 0; + while (searchIndex < search.length) { + if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) { + if (template[templateIndex] === "*") { + starIndex = templateIndex; + matchIndex = searchIndex; + templateIndex++; + } else { + searchIndex++; + templateIndex++; + } + } else if (starIndex !== -1) { + templateIndex = starIndex + 1; + matchIndex++; + searchIndex = matchIndex; + } else { + return false; + } + } + while (templateIndex < template.length && template[templateIndex] === "*") { + templateIndex++; + } + return templateIndex === template.length; + } + __name(matchesTemplate, "matchesTemplate"); + function disable() { + const namespaces = [ + ...createDebug.names, + ...createDebug.skips.map((namespace) => "-" + namespace) + ].join(","); + createDebug.enable(""); + return namespaces; + } + __name(disable, "disable"); + function enabled(name) { + for (const skip of createDebug.skips) { + if (matchesTemplate(name, skip)) { + return false; + } + } + for (const ns of createDebug.names) { + if (matchesTemplate(name, ns)) { + return true; + } + } + return false; + } + __name(enabled, "enabled"); + function coerce2(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + __name(coerce2, "coerce"); + function destroy() { + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + __name(destroy, "destroy"); + createDebug.enable(createDebug.load()); + return createDebug; + } + __name(setup, "setup"); + module2.exports = setup; + } +}); + +// ../../node_modules/debug/src/browser.js +var require_browser2 = __commonJS({ + "../../node_modules/debug/src/browser.js"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load; + exports.useColors = useColors; + exports.storage = localstorage(); + exports.destroy = /* @__PURE__ */ (() => { + let warned = false; + return () => { + if (!warned) { + warned = true; + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + }; + })(); + exports.colors = [ + "#0000CC", + "#0000FF", + "#0033CC", + "#0033FF", + "#0066CC", + "#0066FF", + "#0099CC", + "#0099FF", + "#00CC00", + "#00CC33", + "#00CC66", + "#00CC99", + "#00CCCC", + "#00CCFF", + "#3300CC", + "#3300FF", + "#3333CC", + "#3333FF", + "#3366CC", + "#3366FF", + "#3399CC", + "#3399FF", + "#33CC00", + "#33CC33", + "#33CC66", + "#33CC99", + "#33CCCC", + "#33CCFF", + "#6600CC", + "#6600FF", + "#6633CC", + "#6633FF", + "#66CC00", + "#66CC33", + "#9900CC", + "#9900FF", + "#9933CC", + "#9933FF", + "#99CC00", + "#99CC33", + "#CC0000", + "#CC0033", + "#CC0066", + "#CC0099", + "#CC00CC", + "#CC00FF", + "#CC3300", + "#CC3333", + "#CC3366", + "#CC3399", + "#CC33CC", + "#CC33FF", + "#CC6600", + "#CC6633", + "#CC9900", + "#CC9933", + "#CCCC00", + "#CCCC33", + "#FF0000", + "#FF0033", + "#FF0066", + "#FF0099", + "#FF00CC", + "#FF00FF", + "#FF3300", + "#FF3333", + "#FF3366", + "#FF3399", + "#FF33CC", + "#FF33FF", + "#FF6600", + "#FF6633", + "#FF9900", + "#FF9933", + "#FFCC00", + "#FFCC33" + ]; + function useColors() { + if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { + return true; + } + if (typeof navigator !== "undefined" && "Cloudflare-Workers" && "Cloudflare-Workers".toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + let m; + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 + typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + typeof navigator !== "undefined" && "Cloudflare-Workers" && (m = "Cloudflare-Workers".toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker + typeof navigator !== "undefined" && "Cloudflare-Workers" && "Cloudflare-Workers".toLowerCase().match(/applewebkit\/(\d+)/); + } + __name(useColors, "useColors"); + function formatArgs(args) { + args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); + if (!this.useColors) { + return; + } + const c = "color: " + this.color; + args.splice(1, 0, c, "color: inherit"); + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, (match2) => { + if (match2 === "%%") { + return; + } + index++; + if (match2 === "%c") { + lastC = index; + } + }); + args.splice(lastC, 0, c); + } + __name(formatArgs, "formatArgs"); + exports.log = console.debug || console.log || (() => { + }); + function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem("debug", namespaces); + } else { + exports.storage.removeItem("debug"); + } + } catch (error50) { + } + } + __name(save, "save"); + function load() { + let r; + try { + r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG"); + } catch (error50) { + } + if (!r && typeof process !== "undefined" && "env" in process) { + r = process.env.DEBUG; + } + return r; + } + __name(load, "load"); + function localstorage() { + try { + return localStorage; + } catch (error50) { + } + } + __name(localstorage, "localstorage"); + module2.exports = require_common()(exports); + var { formatters } = module2.exports; + formatters.j = function(v2) { + try { + return JSON.stringify(v2); + } catch (error50) { + return "[UnexpectedJSONParseError]: " + error50.message; + } + }; + } +}); + +// ../../node_modules/ioredis/built/utils/debug.js +var require_debug = __commonJS({ + "../../node_modules/ioredis/built/utils/debug.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.genRedactedString = exports.getStringValue = exports.MAX_ARGUMENT_LENGTH = void 0; + var debug_1 = require_browser2(); + var MAX_ARGUMENT_LENGTH = 200; + exports.MAX_ARGUMENT_LENGTH = MAX_ARGUMENT_LENGTH; + var NAMESPACE_PREFIX = "ioredis"; + function getStringValue(v2) { + if (v2 === null) { + return; + } + switch (typeof v2) { + case "boolean": + return; + case "number": + return; + case "object": + if (Buffer.isBuffer(v2)) { + return v2.toString("hex"); + } + if (Array.isArray(v2)) { + return v2.join(","); + } + try { + return JSON.stringify(v2); + } catch (e) { + return; + } + case "string": + return v2; + } + } + __name(getStringValue, "getStringValue"); + exports.getStringValue = getStringValue; + function genRedactedString(str, maxLen) { + const { length } = str; + return length <= maxLen ? str : str.slice(0, maxLen) + ' ... '; + } + __name(genRedactedString, "genRedactedString"); + exports.genRedactedString = genRedactedString; + function genDebugFunction(namespace) { + const fn = (0, debug_1.default)(`${NAMESPACE_PREFIX}:${namespace}`); + function wrappedDebug(...args) { + if (!fn.enabled) { + return; + } + for (let i = 1; i < args.length; i++) { + const str = getStringValue(args[i]); + if (typeof str === "string" && str.length > MAX_ARGUMENT_LENGTH) { + args[i] = genRedactedString(str, MAX_ARGUMENT_LENGTH); + } + } + return fn.apply(null, args); + } + __name(wrappedDebug, "wrappedDebug"); + Object.defineProperties(wrappedDebug, { + namespace: { + get() { + return fn.namespace; + } + }, + enabled: { + get() { + return fn.enabled; + } + }, + destroy: { + get() { + return fn.destroy; + } + }, + log: { + get() { + return fn.log; + }, + set(l) { + fn.log = l; + } + } + }); + return wrappedDebug; + } + __name(genDebugFunction, "genDebugFunction"); + exports.default = genDebugFunction; + } +}); + +// ../../node_modules/ioredis/built/constants/TLSProfiles.js +var require_TLSProfiles = __commonJS({ + "../../node_modules/ioredis/built/constants/TLSProfiles.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var RedisCloudCA = `-----BEGIN CERTIFICATE----- +MIIDTzCCAjegAwIBAgIJAKSVpiDswLcwMA0GCSqGSIb3DQEBBQUAMD4xFjAUBgNV +BAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1 +dGhvcml0eTAeFw0xMzEwMDExMjE0NTVaFw0yMzA5MjkxMjE0NTVaMD4xFjAUBgNV +BAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1 +dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALZqkh/DczWP +JnxnHLQ7QL0T4B4CDKWBKCcisriGbA6ZePWVNo4hfKQC6JrzfR+081NeD6VcWUiz +rmd+jtPhIY4c+WVQYm5PKaN6DT1imYdxQw7aqO5j2KUCEh/cznpLxeSHoTxlR34E +QwF28Wl3eg2vc5ct8LjU3eozWVk3gb7alx9mSA2SgmuX5lEQawl++rSjsBStemY2 +BDwOpAMXIrdEyP/cVn8mkvi/BDs5M5G+09j0gfh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7awlOqzJCK +6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX +mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs +Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH +WD9f +-----END CERTIFICATE-----`; + var TLSProfiles = { + RedisCloudFixed: { ca: RedisCloudCA }, + RedisCloudFlexible: { ca: RedisCloudCA } + }; + exports.default = TLSProfiles; + } +}); + +// ../../node_modules/ioredis/built/utils/index.js +var require_utils2 = __commonJS({ + "../../node_modules/ioredis/built/utils/index.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.noop = exports.defaults = exports.Debug = exports.getPackageMeta = exports.zipMap = exports.CONNECTION_CLOSED_ERROR_MSG = exports.shuffle = exports.sample = exports.resolveTLSProfile = exports.parseURL = exports.optimizeErrorStack = exports.toArg = exports.convertMapToArray = exports.convertObjectToArray = exports.timeout = exports.packObject = exports.isInt = exports.wrapMultiResult = exports.convertBufferToString = void 0; + var fs_1 = require_fs(); + var path_1 = require_path(); + var url_1 = require_url(); + var lodash_1 = require_lodash3(); + Object.defineProperty(exports, "defaults", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return lodash_1.defaults; + }, "get") }); + Object.defineProperty(exports, "noop", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return lodash_1.noop; + }, "get") }); + var debug_1 = require_debug(); + exports.Debug = debug_1.default; + var TLSProfiles_1 = require_TLSProfiles(); + function convertBufferToString(value, encoding) { + if (value instanceof Buffer) { + return value.toString(encoding); + } + if (Array.isArray(value)) { + const length = value.length; + const res = Array(length); + for (let i = 0; i < length; ++i) { + res[i] = value[i] instanceof Buffer && encoding === "utf8" ? value[i].toString() : convertBufferToString(value[i], encoding); + } + return res; + } + return value; + } + __name(convertBufferToString, "convertBufferToString"); + exports.convertBufferToString = convertBufferToString; + function wrapMultiResult(arr) { + if (!arr) { + return null; + } + const result = []; + const length = arr.length; + for (let i = 0; i < length; ++i) { + const item = arr[i]; + if (item instanceof Error) { + result.push([item]); + } else { + result.push([null, item]); + } + } + return result; + } + __name(wrapMultiResult, "wrapMultiResult"); + exports.wrapMultiResult = wrapMultiResult; + function isInt(value) { + const x = parseFloat(value); + return !isNaN(value) && (x | 0) === x; + } + __name(isInt, "isInt"); + exports.isInt = isInt; + function packObject(array2) { + const result = {}; + const length = array2.length; + for (let i = 1; i < length; i += 2) { + result[array2[i - 1]] = array2[i]; + } + return result; + } + __name(packObject, "packObject"); + exports.packObject = packObject; + function timeout(callback, timeout2) { + let timer = null; + const run2 = /* @__PURE__ */ __name(function() { + if (timer) { + clearTimeout(timer); + timer = null; + callback.apply(this, arguments); + } + }, "run"); + timer = setTimeout(run2, timeout2, new Error("timeout")); + return run2; + } + __name(timeout, "timeout"); + exports.timeout = timeout; + function convertObjectToArray(obj) { + const result = []; + const keys = Object.keys(obj); + for (let i = 0, l = keys.length; i < l; i++) { + result.push(keys[i], obj[keys[i]]); + } + return result; + } + __name(convertObjectToArray, "convertObjectToArray"); + exports.convertObjectToArray = convertObjectToArray; + function convertMapToArray(map2) { + const result = []; + let pos = 0; + map2.forEach(function(value, key) { + result[pos] = key; + result[pos + 1] = value; + pos += 2; + }); + return result; + } + __name(convertMapToArray, "convertMapToArray"); + exports.convertMapToArray = convertMapToArray; + function toArg(arg) { + if (arg === null || typeof arg === "undefined") { + return ""; + } + return String(arg); + } + __name(toArg, "toArg"); + exports.toArg = toArg; + function optimizeErrorStack(error50, friendlyStack, filterPath) { + const stacks = friendlyStack.split("\n"); + let lines = ""; + let i; + for (i = 1; i < stacks.length; ++i) { + if (stacks[i].indexOf(filterPath) === -1) { + break; + } + } + for (let j = i; j < stacks.length; ++j) { + lines += "\n" + stacks[j]; + } + if (error50.stack) { + const pos = error50.stack.indexOf("\n"); + error50.stack = error50.stack.slice(0, pos) + lines; + } + return error50; + } + __name(optimizeErrorStack, "optimizeErrorStack"); + exports.optimizeErrorStack = optimizeErrorStack; + function parseURL(url2) { + if (isInt(url2)) { + return { port: url2 }; + } + let parsed = (0, url_1.parse)(url2, true, true); + if (!parsed.slashes && url2[0] !== "/") { + url2 = "//" + url2; + parsed = (0, url_1.parse)(url2, true, true); + } + const options = parsed.query || {}; + const result = {}; + if (parsed.auth) { + const index = parsed.auth.indexOf(":"); + result.username = index === -1 ? parsed.auth : parsed.auth.slice(0, index); + result.password = index === -1 ? "" : parsed.auth.slice(index + 1); + } + if (parsed.pathname) { + if (parsed.protocol === "redis:" || parsed.protocol === "rediss:") { + if (parsed.pathname.length > 1) { + result.db = parsed.pathname.slice(1); + } + } else { + result.path = parsed.pathname; + } + } + if (parsed.host) { + result.host = parsed.hostname; + } + if (parsed.port) { + result.port = parsed.port; + } + if (typeof options.family === "string") { + const intFamily = Number.parseInt(options.family, 10); + if (!Number.isNaN(intFamily)) { + result.family = intFamily; + } + } + (0, lodash_1.defaults)(result, options); + return result; + } + __name(parseURL, "parseURL"); + exports.parseURL = parseURL; + function resolveTLSProfile(options) { + let tls = options === null || options === void 0 ? void 0 : options.tls; + if (typeof tls === "string") + tls = { profile: tls }; + const profile3 = TLSProfiles_1.default[tls === null || tls === void 0 ? void 0 : tls.profile]; + if (profile3) { + tls = Object.assign({}, profile3, tls); + delete tls.profile; + options = Object.assign({}, options, { tls }); + } + return options; + } + __name(resolveTLSProfile, "resolveTLSProfile"); + exports.resolveTLSProfile = resolveTLSProfile; + function sample(array2, from = 0) { + const length = array2.length; + if (from >= length) { + return null; + } + return array2[from + Math.floor(Math.random() * (length - from))]; + } + __name(sample, "sample"); + exports.sample = sample; + function shuffle(array2) { + let counter = array2.length; + while (counter > 0) { + const index = Math.floor(Math.random() * counter); + counter--; + [array2[counter], array2[index]] = [array2[index], array2[counter]]; + } + return array2; + } + __name(shuffle, "shuffle"); + exports.shuffle = shuffle; + exports.CONNECTION_CLOSED_ERROR_MSG = "Connection is closed."; + function zipMap(keys, values) { + const map2 = /* @__PURE__ */ new Map(); + keys.forEach((key, index) => { + map2.set(key, values[index]); + }); + return map2; + } + __name(zipMap, "zipMap"); + exports.zipMap = zipMap; + var cachedPackageMeta = null; + async function getPackageMeta() { + if (cachedPackageMeta) { + return cachedPackageMeta; + } + try { + const filePath = (0, path_1.resolve)(__dirname, "..", "..", "package.json"); + const data = await fs_1.promises.readFile(filePath, "utf8"); + const parsed = JSON.parse(data); + cachedPackageMeta = { + version: parsed.version + }; + return cachedPackageMeta; + } catch (err) { + cachedPackageMeta = { + version: "error-fetching-version" + }; + return cachedPackageMeta; + } + } + __name(getPackageMeta, "getPackageMeta"); + exports.getPackageMeta = getPackageMeta; + } +}); + +// ../../node_modules/ioredis/built/utils/argumentParsers.js +var require_argumentParsers = __commonJS({ + "../../node_modules/ioredis/built/utils/argumentParsers.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.parseBlockOption = exports.parseSecondsArgument = void 0; + var parseNumberArgument = /* @__PURE__ */ __name((arg) => { + if (typeof arg === "number") { + return arg; + } + if (Buffer.isBuffer(arg)) { + return parseNumberArgument(arg.toString()); + } + if (typeof arg === "string") { + const value = Number(arg); + return Number.isFinite(value) ? value : void 0; + } + return void 0; + }, "parseNumberArgument"); + var parseStringArgument = /* @__PURE__ */ __name((arg) => { + if (typeof arg === "string") { + return arg; + } + if (Buffer.isBuffer(arg)) { + return arg.toString(); + } + return void 0; + }, "parseStringArgument"); + var parseSecondsArgument = /* @__PURE__ */ __name((arg) => { + const value = parseNumberArgument(arg); + if (value === void 0) { + return void 0; + } + if (value <= 0) { + return 0; + } + return value * 1e3; + }, "parseSecondsArgument"); + exports.parseSecondsArgument = parseSecondsArgument; + var parseBlockOption = /* @__PURE__ */ __name((args) => { + for (let i = 0; i < args.length; i++) { + const token = parseStringArgument(args[i]); + if (token && token.toLowerCase() === "block") { + const duration3 = parseNumberArgument(args[i + 1]); + if (duration3 === void 0) { + return void 0; + } + if (duration3 <= 0) { + return 0; + } + return duration3; + } + } + return null; + }, "parseBlockOption"); + exports.parseBlockOption = parseBlockOption; + } +}); + +// ../../node_modules/ioredis/built/Command.js +var require_Command = __commonJS({ + "../../node_modules/ioredis/built/Command.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var commands_1 = require_built(); + var calculateSlot = require_lib(); + var standard_as_callback_1 = require_built2(); + var utils_1 = require_utils2(); + var argumentParsers_1 = require_argumentParsers(); + var Command2 = class _Command { + static { + __name(this, "Command"); + } + /** + * Creates an instance of Command. + * @param name Command name + * @param args An array of command arguments + * @param options + * @param callback The callback that handles the response. + * If omit, the response will be handled via Promise + */ + constructor(name, args = [], options = {}, callback) { + this.name = name; + this.inTransaction = false; + this.isResolved = false; + this.transformed = false; + this.replyEncoding = options.replyEncoding; + this.errorStack = options.errorStack; + this.args = args.flat(); + this.callback = callback; + this.initPromise(); + if (options.keyPrefix) { + const isBufferKeyPrefix = options.keyPrefix instanceof Buffer; + let keyPrefixBuffer = isBufferKeyPrefix ? options.keyPrefix : null; + this._iterateKeys((key) => { + if (key instanceof Buffer) { + if (keyPrefixBuffer === null) { + keyPrefixBuffer = Buffer.from(options.keyPrefix); + } + return Buffer.concat([keyPrefixBuffer, key]); + } else if (isBufferKeyPrefix) { + return Buffer.concat([options.keyPrefix, Buffer.from(String(key))]); + } + return options.keyPrefix + key; + }); + } + if (options.readOnly) { + this.isReadOnly = true; + } + } + /** + * Check whether the command has the flag + */ + static checkFlag(flagName, commandName) { + commandName = commandName.toLowerCase(); + return !!this.getFlagMap()[flagName][commandName]; + } + static setArgumentTransformer(name, func) { + this._transformer.argument[name] = func; + } + static setReplyTransformer(name, func) { + this._transformer.reply[name] = func; + } + static getFlagMap() { + if (!this.flagMap) { + this.flagMap = Object.keys(_Command.FLAGS).reduce((map2, flagName) => { + map2[flagName] = {}; + _Command.FLAGS[flagName].forEach((commandName) => { + map2[flagName][commandName] = true; + }); + return map2; + }, {}); + } + return this.flagMap; + } + getSlot() { + if (typeof this.slot === "undefined") { + const key = this.getKeys()[0]; + this.slot = key == null ? null : calculateSlot(key); + } + return this.slot; + } + getKeys() { + return this._iterateKeys(); + } + /** + * Convert command to writable buffer or string + */ + toWritable(_socket) { + let result; + const commandStr = "*" + (this.args.length + 1) + "\r\n$" + Buffer.byteLength(this.name) + "\r\n" + this.name + "\r\n"; + if (this.bufferMode) { + const buffers = new MixedBuffers(); + buffers.push(commandStr); + for (let i = 0; i < this.args.length; ++i) { + const arg = this.args[i]; + if (arg instanceof Buffer) { + if (arg.length === 0) { + buffers.push("$0\r\n\r\n"); + } else { + buffers.push("$" + arg.length + "\r\n"); + buffers.push(arg); + buffers.push("\r\n"); + } + } else { + buffers.push("$" + Buffer.byteLength(arg) + "\r\n" + arg + "\r\n"); + } + } + result = buffers.toBuffer(); + } else { + result = commandStr; + for (let i = 0; i < this.args.length; ++i) { + const arg = this.args[i]; + result += "$" + Buffer.byteLength(arg) + "\r\n" + arg + "\r\n"; + } + } + return result; + } + stringifyArguments() { + for (let i = 0; i < this.args.length; ++i) { + const arg = this.args[i]; + if (typeof arg === "string") { + } else if (arg instanceof Buffer) { + this.bufferMode = true; + } else { + this.args[i] = (0, utils_1.toArg)(arg); + } + } + } + /** + * Convert buffer/buffer[] to string/string[], + * and apply reply transformer. + */ + transformReply(result) { + if (this.replyEncoding) { + result = (0, utils_1.convertBufferToString)(result, this.replyEncoding); + } + const transformer = _Command._transformer.reply[this.name]; + if (transformer) { + result = transformer(result); + } + return result; + } + /** + * Set the wait time before terminating the attempt to execute a command + * and generating an error. + */ + setTimeout(ms) { + if (!this._commandTimeoutTimer) { + this._commandTimeoutTimer = setTimeout(() => { + if (!this.isResolved) { + this.reject(new Error("Command timed out")); + } + }, ms); + } + } + /** + * Set a timeout for blocking commands. + * When the timeout expires, the command resolves with null (matching Redis behavior). + * This handles the case of undetectable network failures (e.g., docker network disconnect) + * where the TCP connection becomes a zombie and no close event fires. + */ + setBlockingTimeout(ms) { + if (ms <= 0) { + return; + } + if (this._blockingTimeoutTimer) { + clearTimeout(this._blockingTimeoutTimer); + this._blockingTimeoutTimer = void 0; + } + const now = Date.now(); + if (this._blockingDeadline === void 0) { + this._blockingDeadline = now + ms; + } + const remaining = this._blockingDeadline - now; + if (remaining <= 0) { + this.resolve(null); + return; + } + this._blockingTimeoutTimer = setTimeout(() => { + if (this.isResolved) { + this._blockingTimeoutTimer = void 0; + return; + } + this._blockingTimeoutTimer = void 0; + this.resolve(null); + }, remaining); + } + /** + * Extract the blocking timeout from the command arguments. + * + * @returns The timeout in seconds, null for indefinite blocking (timeout of 0), + * or undefined if this is not a blocking command + */ + extractBlockingTimeout() { + const args = this.args; + if (!args || args.length === 0) { + return void 0; + } + const name = this.name.toLowerCase(); + if (_Command.checkFlag("LAST_ARG_TIMEOUT_COMMANDS", name)) { + return (0, argumentParsers_1.parseSecondsArgument)(args[args.length - 1]); + } + if (_Command.checkFlag("FIRST_ARG_TIMEOUT_COMMANDS", name)) { + return (0, argumentParsers_1.parseSecondsArgument)(args[0]); + } + if (_Command.checkFlag("BLOCK_OPTION_COMMANDS", name)) { + return (0, argumentParsers_1.parseBlockOption)(args); + } + return void 0; + } + /** + * Clear the command and blocking timers + */ + _clearTimers() { + const existingTimer = this._commandTimeoutTimer; + if (existingTimer) { + clearTimeout(existingTimer); + delete this._commandTimeoutTimer; + } + const blockingTimer = this._blockingTimeoutTimer; + if (blockingTimer) { + clearTimeout(blockingTimer); + delete this._blockingTimeoutTimer; + } + } + initPromise() { + const promise2 = new Promise((resolve, reject) => { + if (!this.transformed) { + this.transformed = true; + const transformer = _Command._transformer.argument[this.name]; + if (transformer) { + this.args = transformer(this.args); + } + this.stringifyArguments(); + } + this.resolve = this._convertValue(resolve); + this.reject = (err) => { + this._clearTimers(); + if (this.errorStack) { + reject((0, utils_1.optimizeErrorStack)(err, this.errorStack.stack, __dirname)); + } else { + reject(err); + } + }; + }); + this.promise = (0, standard_as_callback_1.default)(promise2, this.callback); + } + /** + * Iterate through the command arguments that are considered keys. + */ + _iterateKeys(transform2 = (key) => key) { + if (typeof this.keys === "undefined") { + this.keys = []; + if ((0, commands_1.exists)(this.name, { caseInsensitive: true })) { + const keyIndexes = (0, commands_1.getKeyIndexes)(this.name, this.args, { + nameCaseInsensitive: true + }); + for (const index of keyIndexes) { + this.args[index] = transform2(this.args[index]); + this.keys.push(this.args[index]); + } + } + } + return this.keys; + } + /** + * Convert the value from buffer to the target encoding. + */ + _convertValue(resolve) { + return (value) => { + try { + this._clearTimers(); + resolve(this.transformReply(value)); + this.isResolved = true; + } catch (err) { + this.reject(err); + } + return this.promise; + }; + } + }; + exports.default = Command2; + Command2.FLAGS = { + VALID_IN_SUBSCRIBER_MODE: [ + "subscribe", + "psubscribe", + "unsubscribe", + "punsubscribe", + "ssubscribe", + "sunsubscribe", + "ping", + "quit" + ], + VALID_IN_MONITOR_MODE: ["monitor", "auth"], + ENTER_SUBSCRIBER_MODE: ["subscribe", "psubscribe", "ssubscribe"], + EXIT_SUBSCRIBER_MODE: ["unsubscribe", "punsubscribe", "sunsubscribe"], + WILL_DISCONNECT: ["quit"], + HANDSHAKE_COMMANDS: ["auth", "select", "client", "readonly", "info"], + IGNORE_RECONNECT_ON_ERROR: ["client"], + BLOCKING_COMMANDS: [ + "blpop", + "brpop", + "brpoplpush", + "blmove", + "bzpopmin", + "bzpopmax", + "bzmpop", + "blmpop", + "xread", + "xreadgroup" + ], + LAST_ARG_TIMEOUT_COMMANDS: [ + "blpop", + "brpop", + "brpoplpush", + "blmove", + "bzpopmin", + "bzpopmax" + ], + FIRST_ARG_TIMEOUT_COMMANDS: ["bzmpop", "blmpop"], + BLOCK_OPTION_COMMANDS: ["xread", "xreadgroup"] + }; + Command2._transformer = { + argument: {}, + reply: {} + }; + var msetArgumentTransformer = /* @__PURE__ */ __name(function(args) { + if (args.length === 1) { + if (args[0] instanceof Map) { + return (0, utils_1.convertMapToArray)(args[0]); + } + if (typeof args[0] === "object" && args[0] !== null) { + return (0, utils_1.convertObjectToArray)(args[0]); + } + } + return args; + }, "msetArgumentTransformer"); + var hsetArgumentTransformer = /* @__PURE__ */ __name(function(args) { + if (args.length === 2) { + if (args[1] instanceof Map) { + return [args[0]].concat((0, utils_1.convertMapToArray)(args[1])); + } + if (typeof args[1] === "object" && args[1] !== null) { + return [args[0]].concat((0, utils_1.convertObjectToArray)(args[1])); + } + } + return args; + }, "hsetArgumentTransformer"); + Command2.setArgumentTransformer("mset", msetArgumentTransformer); + Command2.setArgumentTransformer("msetnx", msetArgumentTransformer); + Command2.setArgumentTransformer("hset", hsetArgumentTransformer); + Command2.setArgumentTransformer("hmset", hsetArgumentTransformer); + Command2.setReplyTransformer("hgetall", function(result) { + if (Array.isArray(result)) { + const obj = {}; + for (let i = 0; i < result.length; i += 2) { + const key = result[i]; + const value = result[i + 1]; + if (key in obj) { + Object.defineProperty(obj, key, { + value, + configurable: true, + enumerable: true, + writable: true + }); + } else { + obj[key] = value; + } + } + return obj; + } + return result; + }); + var MixedBuffers = class { + static { + __name(this, "MixedBuffers"); + } + constructor() { + this.length = 0; + this.items = []; + } + push(x) { + this.length += Buffer.byteLength(x); + this.items.push(x); + } + toBuffer() { + const result = Buffer.allocUnsafe(this.length); + let offset = 0; + for (const item of this.items) { + const length = Buffer.byteLength(item); + Buffer.isBuffer(item) ? item.copy(result, offset) : result.write(item, offset, length); + offset += length; + } + return result; + } + }; + } +}); + +// ../../node_modules/ioredis/built/errors/ClusterAllFailedError.js +var require_ClusterAllFailedError = __commonJS({ + "../../node_modules/ioredis/built/errors/ClusterAllFailedError.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var redis_errors_1 = require_redis_errors(); + var ClusterAllFailedError = class extends redis_errors_1.RedisError { + static { + __name(this, "ClusterAllFailedError"); + } + constructor(message2, lastNodeError) { + super(message2); + this.lastNodeError = lastNodeError; + Error.captureStackTrace(this, this.constructor); + } + get name() { + return this.constructor.name; + } + }; + exports.default = ClusterAllFailedError; + ClusterAllFailedError.defaultMessage = "Failed to refresh slots cache."; + } +}); + +// node-built-in-modules:stream +import libDefault6 from "stream"; +var require_stream = __commonJS({ + "node-built-in-modules:stream"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module2.exports = libDefault6; + } +}); + +// ../../node_modules/ioredis/built/ScanStream.js +var require_ScanStream = __commonJS({ + "../../node_modules/ioredis/built/ScanStream.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var stream_1 = require_stream(); + var ScanStream = class extends stream_1.Readable { + static { + __name(this, "ScanStream"); + } + constructor(opt) { + super(opt); + this.opt = opt; + this._redisCursor = "0"; + this._redisDrained = false; + } + _read() { + if (this._redisDrained) { + this.push(null); + return; + } + const args = [this._redisCursor]; + if (this.opt.key) { + args.unshift(this.opt.key); + } + if (this.opt.match) { + args.push("MATCH", this.opt.match); + } + if (this.opt.type) { + args.push("TYPE", this.opt.type); + } + if (this.opt.count) { + args.push("COUNT", String(this.opt.count)); + } + if (this.opt.noValues) { + args.push("NOVALUES"); + } + this.opt.redis[this.opt.command](args, (err, res) => { + if (err) { + this.emit("error", err); + return; + } + this._redisCursor = res[0] instanceof Buffer ? res[0].toString() : res[0]; + if (this._redisCursor === "0") { + this._redisDrained = true; + } + this.push(res[1]); + }); + } + close() { + this._redisDrained = true; + } + }; + exports.default = ScanStream; + } +}); + +// ../../node_modules/ioredis/built/autoPipelining.js +var require_autoPipelining = __commonJS({ + "../../node_modules/ioredis/built/autoPipelining.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.executeWithAutoPipelining = exports.getFirstValueInFlattenedArray = exports.shouldUseAutoPipelining = exports.notAllowedAutoPipelineCommands = exports.kCallbacks = exports.kExec = void 0; + var lodash_1 = require_lodash3(); + var calculateSlot = require_lib(); + var standard_as_callback_1 = require_built2(); + var commands_1 = require_built(); + exports.kExec = /* @__PURE__ */ Symbol("exec"); + exports.kCallbacks = /* @__PURE__ */ Symbol("callbacks"); + exports.notAllowedAutoPipelineCommands = [ + "auth", + "info", + "script", + "quit", + "cluster", + "pipeline", + "multi", + "subscribe", + "psubscribe", + "unsubscribe", + "unpsubscribe", + "select", + "client" + ]; + function executeAutoPipeline(client, slotKey) { + if (client._runningAutoPipelines.has(slotKey)) { + return; + } + if (!client._autoPipelines.has(slotKey)) { + return; + } + client._runningAutoPipelines.add(slotKey); + const pipeline = client._autoPipelines.get(slotKey); + client._autoPipelines.delete(slotKey); + const callbacks = pipeline[exports.kCallbacks]; + pipeline[exports.kCallbacks] = null; + pipeline.exec(function(err, results) { + client._runningAutoPipelines.delete(slotKey); + if (err) { + for (let i = 0; i < callbacks.length; i++) { + process.nextTick(callbacks[i], err); + } + } else { + for (let i = 0; i < callbacks.length; i++) { + process.nextTick(callbacks[i], ...results[i]); + } + } + if (client._autoPipelines.has(slotKey)) { + executeAutoPipeline(client, slotKey); + } + }); + } + __name(executeAutoPipeline, "executeAutoPipeline"); + function shouldUseAutoPipelining(client, functionName, commandName) { + return functionName && client.options.enableAutoPipelining && !client.isPipeline && !exports.notAllowedAutoPipelineCommands.includes(commandName) && !client.options.autoPipeliningIgnoredCommands.includes(commandName); + } + __name(shouldUseAutoPipelining, "shouldUseAutoPipelining"); + exports.shouldUseAutoPipelining = shouldUseAutoPipelining; + function getFirstValueInFlattenedArray(args) { + for (let i = 0; i < args.length; i++) { + const arg = args[i]; + if (typeof arg === "string") { + return arg; + } else if (Array.isArray(arg) || (0, lodash_1.isArguments)(arg)) { + if (arg.length === 0) { + continue; + } + return arg[0]; + } + const flattened = [arg].flat(); + if (flattened.length > 0) { + return flattened[0]; + } + } + return void 0; + } + __name(getFirstValueInFlattenedArray, "getFirstValueInFlattenedArray"); + exports.getFirstValueInFlattenedArray = getFirstValueInFlattenedArray; + function executeWithAutoPipelining(client, functionName, commandName, args, callback) { + if (client.isCluster && !client.slots.length) { + if (client.status === "wait") + client.connect().catch(lodash_1.noop); + return (0, standard_as_callback_1.default)(new Promise(function(resolve, reject) { + client.delayUntilReady((err) => { + if (err) { + reject(err); + return; + } + executeWithAutoPipelining(client, functionName, commandName, args, null).then(resolve, reject); + }); + }), callback); + } + const prefix = client.options.keyPrefix || ""; + let slotKey = client.isCluster ? client.slots[calculateSlot(`${prefix}${getFirstValueInFlattenedArray(args)}`)].join(",") : "main"; + if (client.isCluster && client.options.scaleReads !== "master") { + const isReadOnly = (0, commands_1.exists)(commandName) && (0, commands_1.hasFlag)(commandName, "readonly"); + slotKey += isReadOnly ? ":read" : ":write"; + } + if (!client._autoPipelines.has(slotKey)) { + const pipeline2 = client.pipeline(); + pipeline2[exports.kExec] = false; + pipeline2[exports.kCallbacks] = []; + client._autoPipelines.set(slotKey, pipeline2); + } + const pipeline = client._autoPipelines.get(slotKey); + if (!pipeline[exports.kExec]) { + pipeline[exports.kExec] = true; + setImmediate(executeAutoPipeline, client, slotKey); + } + const autoPipelinePromise = new Promise(function(resolve, reject) { + pipeline[exports.kCallbacks].push(function(err, value) { + if (err) { + reject(err); + return; + } + resolve(value); + }); + if (functionName === "call") { + args.unshift(commandName); + } + pipeline[functionName](...args); + }); + return (0, standard_as_callback_1.default)(autoPipelinePromise, callback); + } + __name(executeWithAutoPipelining, "executeWithAutoPipelining"); + exports.executeWithAutoPipelining = executeWithAutoPipelining; + } +}); + +// node-built-in-modules:crypto +import libDefault7 from "crypto"; +var require_crypto = __commonJS({ + "node-built-in-modules:crypto"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module2.exports = libDefault7; + } +}); + +// ../../node_modules/ioredis/built/Script.js +var require_Script = __commonJS({ + "../../node_modules/ioredis/built/Script.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var crypto_1 = require_crypto(); + var Command_1 = require_Command(); + var standard_as_callback_1 = require_built2(); + var Script = class { + static { + __name(this, "Script"); + } + constructor(lua, numberOfKeys = null, keyPrefix = "", readOnly = false) { + this.lua = lua; + this.numberOfKeys = numberOfKeys; + this.keyPrefix = keyPrefix; + this.readOnly = readOnly; + this.sha = (0, crypto_1.createHash)("sha1").update(lua).digest("hex"); + const sha = this.sha; + const socketHasScriptLoaded = /* @__PURE__ */ new WeakSet(); + this.Command = class CustomScriptCommand extends Command_1.default { + static { + __name(this, "CustomScriptCommand"); + } + toWritable(socket) { + const origReject = this.reject; + this.reject = (err) => { + if (err.message.indexOf("NOSCRIPT") !== -1) { + socketHasScriptLoaded.delete(socket); + } + origReject.call(this, err); + }; + if (!socketHasScriptLoaded.has(socket)) { + socketHasScriptLoaded.add(socket); + this.name = "eval"; + this.args[0] = lua; + } else if (this.name === "eval") { + this.name = "evalsha"; + this.args[0] = sha; + } + return super.toWritable(socket); + } + }; + } + execute(container, args, options, callback) { + if (typeof this.numberOfKeys === "number") { + args.unshift(this.numberOfKeys); + } + if (this.keyPrefix) { + options.keyPrefix = this.keyPrefix; + } + if (this.readOnly) { + options.readOnly = true; + } + const evalsha = new this.Command("evalsha", [this.sha, ...args], options); + evalsha.promise = evalsha.promise.catch((err) => { + if (err.message.indexOf("NOSCRIPT") === -1) { + throw err; + } + const resend = new this.Command("evalsha", [this.sha, ...args], options); + const client = container.isPipeline ? container.redis : container; + return client.sendCommand(resend); + }); + (0, standard_as_callback_1.default)(evalsha.promise, callback); + return container.sendCommand(evalsha); + } + }; + exports.default = Script; + } +}); + +// ../../node_modules/ioredis/built/utils/Commander.js +var require_Commander = __commonJS({ + "../../node_modules/ioredis/built/utils/Commander.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var commands_1 = require_built(); + var autoPipelining_1 = require_autoPipelining(); + var Command_1 = require_Command(); + var Script_1 = require_Script(); + var Commander = class { + static { + __name(this, "Commander"); + } + constructor() { + this.options = {}; + this.scriptsSet = {}; + this.addedBuiltinSet = /* @__PURE__ */ new Set(); + } + /** + * Return supported builtin commands + */ + getBuiltinCommands() { + return commands.slice(0); + } + /** + * Create a builtin command + */ + createBuiltinCommand(commandName) { + return { + string: generateFunction(null, commandName, "utf8"), + buffer: generateFunction(null, commandName, null) + }; + } + /** + * Create add builtin command + */ + addBuiltinCommand(commandName) { + this.addedBuiltinSet.add(commandName); + this[commandName] = generateFunction(commandName, commandName, "utf8"); + this[commandName + "Buffer"] = generateFunction(commandName + "Buffer", commandName, null); + } + /** + * Define a custom command using lua script + */ + defineCommand(name, definition) { + const script = new Script_1.default(definition.lua, definition.numberOfKeys, this.options.keyPrefix, definition.readOnly); + this.scriptsSet[name] = script; + this[name] = generateScriptingFunction(name, name, script, "utf8"); + this[name + "Buffer"] = generateScriptingFunction(name + "Buffer", name, script, null); + } + /** + * @ignore + */ + sendCommand(command, stream, node) { + throw new Error('"sendCommand" is not implemented'); + } + }; + var commands = commands_1.list.filter((command) => command !== "monitor"); + commands.push("sentinel"); + commands.forEach(function(commandName) { + Commander.prototype[commandName] = generateFunction(commandName, commandName, "utf8"); + Commander.prototype[commandName + "Buffer"] = generateFunction(commandName + "Buffer", commandName, null); + }); + Commander.prototype.call = generateFunction("call", "utf8"); + Commander.prototype.callBuffer = generateFunction("callBuffer", null); + Commander.prototype.send_command = Commander.prototype.call; + function generateFunction(functionName, _commandName, _encoding) { + if (typeof _encoding === "undefined") { + _encoding = _commandName; + _commandName = null; + } + return function(...args) { + const commandName = _commandName || args.shift(); + let callback = args[args.length - 1]; + if (typeof callback === "function") { + args.pop(); + } else { + callback = void 0; + } + const options = { + errorStack: this.options.showFriendlyErrorStack ? new Error() : void 0, + keyPrefix: this.options.keyPrefix, + replyEncoding: _encoding + }; + if (!(0, autoPipelining_1.shouldUseAutoPipelining)(this, functionName, commandName)) { + return this.sendCommand( + // @ts-expect-error + new Command_1.default(commandName, args, options, callback) + ); + } + return (0, autoPipelining_1.executeWithAutoPipelining)( + this, + functionName, + commandName, + // @ts-expect-error + args, + callback + ); + }; + } + __name(generateFunction, "generateFunction"); + function generateScriptingFunction(functionName, commandName, script, encoding) { + return function(...args) { + const callback = typeof args[args.length - 1] === "function" ? args.pop() : void 0; + const options = { + replyEncoding: encoding + }; + if (this.options.showFriendlyErrorStack) { + options.errorStack = new Error(); + } + if (!(0, autoPipelining_1.shouldUseAutoPipelining)(this, functionName, commandName)) { + return script.execute(this, args, options, callback); + } + return (0, autoPipelining_1.executeWithAutoPipelining)(this, functionName, commandName, args, callback); + }; + } + __name(generateScriptingFunction, "generateScriptingFunction"); + exports.default = Commander; + } +}); + +// ../../node_modules/ioredis/built/Pipeline.js +var require_Pipeline = __commonJS({ + "../../node_modules/ioredis/built/Pipeline.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var calculateSlot = require_lib(); + var commands_1 = require_built(); + var standard_as_callback_1 = require_built2(); + var util_1 = require_util(); + var Command_1 = require_Command(); + var utils_1 = require_utils2(); + var Commander_1 = require_Commander(); + function generateMultiWithNodes(redis, keys) { + const slot = calculateSlot(keys[0]); + const target2 = redis._groupsBySlot[slot]; + for (let i = 1; i < keys.length; i++) { + if (redis._groupsBySlot[calculateSlot(keys[i])] !== target2) { + return -1; + } + } + return slot; + } + __name(generateMultiWithNodes, "generateMultiWithNodes"); + var Pipeline = class extends Commander_1.default { + static { + __name(this, "Pipeline"); + } + constructor(redis) { + super(); + this.redis = redis; + this.isPipeline = true; + this.replyPending = 0; + this._queue = []; + this._result = []; + this._transactions = 0; + this._shaToScript = {}; + this.isCluster = this.redis.constructor.name === "Cluster" || this.redis.isCluster; + this.options = redis.options; + Object.keys(redis.scriptsSet).forEach((name) => { + const script = redis.scriptsSet[name]; + this._shaToScript[script.sha] = script; + this[name] = redis[name]; + this[name + "Buffer"] = redis[name + "Buffer"]; + }); + redis.addedBuiltinSet.forEach((name) => { + this[name] = redis[name]; + this[name + "Buffer"] = redis[name + "Buffer"]; + }); + this.promise = new Promise((resolve, reject) => { + this.resolve = resolve; + this.reject = reject; + }); + const _this = this; + Object.defineProperty(this, "length", { + get: /* @__PURE__ */ __name(function() { + return _this._queue.length; + }, "get") + }); + } + fillResult(value, position3) { + if (this._queue[position3].name === "exec" && Array.isArray(value[1])) { + const execLength = value[1].length; + for (let i = 0; i < execLength; i++) { + if (value[1][i] instanceof Error) { + continue; + } + const cmd = this._queue[position3 - (execLength - i)]; + try { + value[1][i] = cmd.transformReply(value[1][i]); + } catch (err) { + value[1][i] = err; + } + } + } + this._result[position3] = value; + if (--this.replyPending) { + return; + } + if (this.isCluster) { + let retriable = true; + let commonError; + for (let i = 0; i < this._result.length; ++i) { + const error50 = this._result[i][0]; + const command = this._queue[i]; + if (error50) { + if (command.name === "exec" && error50.message === "EXECABORT Transaction discarded because of previous errors.") { + continue; + } + if (!commonError) { + commonError = { + name: error50.name, + message: error50.message + }; + } else if (commonError.name !== error50.name || commonError.message !== error50.message) { + retriable = false; + break; + } + } else if (!command.inTransaction) { + const isReadOnly = (0, commands_1.exists)(command.name, { caseInsensitive: true }) && (0, commands_1.hasFlag)(command.name, "readonly", { nameCaseInsensitive: true }); + if (!isReadOnly) { + retriable = false; + break; + } + } + } + if (commonError && retriable) { + const _this = this; + const errv = commonError.message.split(" "); + const queue = this._queue; + let inTransaction = false; + this._queue = []; + for (let i = 0; i < queue.length; ++i) { + if (errv[0] === "ASK" && !inTransaction && queue[i].name !== "asking" && (!queue[i - 1] || queue[i - 1].name !== "asking")) { + const asking = new Command_1.default("asking"); + asking.ignore = true; + this.sendCommand(asking); + } + queue[i].initPromise(); + this.sendCommand(queue[i]); + inTransaction = queue[i].inTransaction; + } + let matched = true; + if (typeof this.leftRedirections === "undefined") { + this.leftRedirections = {}; + } + const exec = /* @__PURE__ */ __name(function() { + _this.exec(); + }, "exec"); + const cluster = this.redis; + cluster.handleError(commonError, this.leftRedirections, { + moved: /* @__PURE__ */ __name(function(_slot, key) { + _this.preferKey = key; + if (cluster.slots[errv[1]]) { + if (cluster.slots[errv[1]][0] !== key) { + cluster.slots[errv[1]] = [key]; + } + } else { + cluster.slots[errv[1]] = [key]; + } + cluster._groupsBySlot[errv[1]] = cluster._groupsIds[cluster.slots[errv[1]].join(";")]; + cluster.refreshSlotsCache(); + _this.exec(); + }, "moved"), + ask: /* @__PURE__ */ __name(function(_slot, key) { + _this.preferKey = key; + _this.exec(); + }, "ask"), + tryagain: exec, + clusterDown: exec, + connectionClosed: exec, + maxRedirections: /* @__PURE__ */ __name(() => { + matched = false; + }, "maxRedirections"), + defaults: /* @__PURE__ */ __name(() => { + matched = false; + }, "defaults") + }); + if (matched) { + return; + } + } + } + let ignoredCount = 0; + for (let i = 0; i < this._queue.length - ignoredCount; ++i) { + if (this._queue[i + ignoredCount].ignore) { + ignoredCount += 1; + } + this._result[i] = this._result[i + ignoredCount]; + } + this.resolve(this._result.slice(0, this._result.length - ignoredCount)); + } + sendCommand(command) { + if (this._transactions > 0) { + command.inTransaction = true; + } + const position3 = this._queue.length; + command.pipelineIndex = position3; + command.promise.then((result) => { + this.fillResult([null, result], position3); + }).catch((error50) => { + this.fillResult([error50], position3); + }); + this._queue.push(command); + return this; + } + addBatch(commands) { + let command, commandName, args; + for (let i = 0; i < commands.length; ++i) { + command = commands[i]; + commandName = command[0]; + args = command.slice(1); + this[commandName].apply(this, args); + } + return this; + } + }; + exports.default = Pipeline; + var multi = Pipeline.prototype.multi; + Pipeline.prototype.multi = function() { + this._transactions += 1; + return multi.apply(this, arguments); + }; + var execBuffer = Pipeline.prototype.execBuffer; + Pipeline.prototype.execBuffer = (0, util_1.deprecate)(function() { + if (this._transactions > 0) { + this._transactions -= 1; + } + return execBuffer.apply(this, arguments); + }, "Pipeline#execBuffer: Use Pipeline#exec instead"); + Pipeline.prototype.exec = function(callback) { + if (this.isCluster && !this.redis.slots.length) { + if (this.redis.status === "wait") + this.redis.connect().catch(utils_1.noop); + if (callback && !this.nodeifiedPromise) { + this.nodeifiedPromise = true; + (0, standard_as_callback_1.default)(this.promise, callback); + } + this.redis.delayUntilReady((err) => { + if (err) { + this.reject(err); + return; + } + this.exec(callback); + }); + return this.promise; + } + if (this._transactions > 0) { + this._transactions -= 1; + return execBuffer.apply(this, arguments); + } + if (!this.nodeifiedPromise) { + this.nodeifiedPromise = true; + (0, standard_as_callback_1.default)(this.promise, callback); + } + if (!this._queue.length) { + this.resolve([]); + } + let pipelineSlot; + if (this.isCluster) { + const sampleKeys = []; + for (let i = 0; i < this._queue.length; i++) { + const keys = this._queue[i].getKeys(); + if (keys.length) { + sampleKeys.push(keys[0]); + } + if (keys.length && calculateSlot.generateMulti(keys) < 0) { + this.reject(new Error("All the keys in a pipeline command should belong to the same slot")); + return this.promise; + } + } + if (sampleKeys.length) { + pipelineSlot = generateMultiWithNodes(this.redis, sampleKeys); + if (pipelineSlot < 0) { + this.reject(new Error("All keys in the pipeline should belong to the same slots allocation group")); + return this.promise; + } + } else { + pipelineSlot = Math.random() * 16384 | 0; + } + } + const _this = this; + execPipeline(); + return this.promise; + function execPipeline() { + let writePending = _this.replyPending = _this._queue.length; + let node; + if (_this.isCluster) { + node = { + slot: pipelineSlot, + redis: _this.redis.connectionPool.nodes.all[_this.preferKey] + }; + } + let data = ""; + let buffers; + const stream = { + isPipeline: true, + destination: _this.isCluster ? node : { redis: _this.redis }, + write(writable) { + if (typeof writable !== "string") { + if (!buffers) { + buffers = []; + } + if (data) { + buffers.push(Buffer.from(data, "utf8")); + data = ""; + } + buffers.push(writable); + } else { + data += writable; + } + if (!--writePending) { + if (buffers) { + if (data) { + buffers.push(Buffer.from(data, "utf8")); + } + stream.destination.redis.stream.write(Buffer.concat(buffers)); + } else { + stream.destination.redis.stream.write(data); + } + writePending = _this._queue.length; + data = ""; + buffers = void 0; + } + } + }; + for (let i = 0; i < _this._queue.length; ++i) { + _this.redis.sendCommand(_this._queue[i], stream, node); + } + return _this.promise; + } + __name(execPipeline, "execPipeline"); + }; + } +}); + +// ../../node_modules/ioredis/built/transaction.js +var require_transaction = __commonJS({ + "../../node_modules/ioredis/built/transaction.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.addTransactionSupport = void 0; + var utils_1 = require_utils2(); + var standard_as_callback_1 = require_built2(); + var Pipeline_1 = require_Pipeline(); + function addTransactionSupport(redis) { + redis.pipeline = function(commands) { + const pipeline = new Pipeline_1.default(this); + if (Array.isArray(commands)) { + pipeline.addBatch(commands); + } + return pipeline; + }; + const { multi } = redis; + redis.multi = function(commands, options) { + if (typeof options === "undefined" && !Array.isArray(commands)) { + options = commands; + commands = null; + } + if (options && options.pipeline === false) { + return multi.call(this); + } + const pipeline = new Pipeline_1.default(this); + pipeline.multi(); + if (Array.isArray(commands)) { + pipeline.addBatch(commands); + } + const exec2 = pipeline.exec; + pipeline.exec = function(callback) { + if (this.isCluster && !this.redis.slots.length) { + if (this.redis.status === "wait") + this.redis.connect().catch(utils_1.noop); + return (0, standard_as_callback_1.default)(new Promise((resolve, reject) => { + this.redis.delayUntilReady((err) => { + if (err) { + reject(err); + return; + } + this.exec(pipeline).then(resolve, reject); + }); + }), callback); + } + if (this._transactions > 0) { + exec2.call(pipeline); + } + if (this.nodeifiedPromise) { + return exec2.call(pipeline); + } + const promise2 = exec2.call(pipeline); + return (0, standard_as_callback_1.default)(promise2.then(function(result) { + const execResult = result[result.length - 1]; + if (typeof execResult === "undefined") { + throw new Error("Pipeline cannot be used to send any commands when the `exec()` has been called on it."); + } + if (execResult[0]) { + execResult[0].previousErrors = []; + for (let i = 0; i < result.length - 1; ++i) { + if (result[i][0]) { + execResult[0].previousErrors.push(result[i][0]); + } + } + throw execResult[0]; + } + return (0, utils_1.wrapMultiResult)(execResult[1]); + }), callback); + }; + const { execBuffer } = pipeline; + pipeline.execBuffer = function(callback) { + if (this._transactions > 0) { + execBuffer.call(pipeline); + } + return pipeline.exec(callback); + }; + return pipeline; + }; + const { exec } = redis; + redis.exec = function(callback) { + return (0, standard_as_callback_1.default)(exec.call(this).then(function(results) { + if (Array.isArray(results)) { + results = (0, utils_1.wrapMultiResult)(results); + } + return results; + }), callback); + }; + } + __name(addTransactionSupport, "addTransactionSupport"); + exports.addTransactionSupport = addTransactionSupport; + } +}); + +// ../../node_modules/ioredis/built/utils/applyMixin.js +var require_applyMixin = __commonJS({ + "../../node_modules/ioredis/built/utils/applyMixin.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + function applyMixin(derivedConstructor, mixinConstructor) { + Object.getOwnPropertyNames(mixinConstructor.prototype).forEach((name) => { + Object.defineProperty(derivedConstructor.prototype, name, Object.getOwnPropertyDescriptor(mixinConstructor.prototype, name)); + }); + } + __name(applyMixin, "applyMixin"); + exports.default = applyMixin; + } +}); + +// node-built-in-modules:dns +import libDefault8 from "dns"; +var require_dns = __commonJS({ + "node-built-in-modules:dns"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module2.exports = libDefault8; + } +}); + +// ../../node_modules/ioredis/built/cluster/ClusterOptions.js +var require_ClusterOptions = __commonJS({ + "../../node_modules/ioredis/built/cluster/ClusterOptions.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DEFAULT_CLUSTER_OPTIONS = void 0; + var dns_1 = require_dns(); + exports.DEFAULT_CLUSTER_OPTIONS = { + clusterRetryStrategy: /* @__PURE__ */ __name((times) => Math.min(100 + times * 2, 2e3), "clusterRetryStrategy"), + enableOfflineQueue: true, + enableReadyCheck: true, + scaleReads: "master", + maxRedirections: 16, + retryDelayOnMoved: 0, + retryDelayOnFailover: 100, + retryDelayOnClusterDown: 100, + retryDelayOnTryAgain: 100, + slotsRefreshTimeout: 1e3, + useSRVRecords: false, + resolveSrv: dns_1.resolveSrv, + dnsLookup: dns_1.lookup, + enableAutoPipelining: false, + autoPipeliningIgnoredCommands: [], + shardedSubscribers: false + }; + } +}); + +// node-built-in-modules:net +import libDefault9 from "net"; +var require_net = __commonJS({ + "node-built-in-modules:net"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module2.exports = libDefault9; + } +}); + +// ../../node_modules/ioredis/built/cluster/util.js +var require_util2 = __commonJS({ + "../../node_modules/ioredis/built/cluster/util.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getConnectionName = exports.weightSrvRecords = exports.groupSrvRecords = exports.getUniqueHostnamesFromOptions = exports.normalizeNodeOptions = exports.nodeKeyToRedisOptions = exports.getNodeKey = void 0; + var utils_1 = require_utils2(); + var net_1 = require_net(); + function getNodeKey(node) { + node.port = node.port || 6379; + node.host = node.host || "127.0.0.1"; + return node.host + ":" + node.port; + } + __name(getNodeKey, "getNodeKey"); + exports.getNodeKey = getNodeKey; + function nodeKeyToRedisOptions(nodeKey) { + const portIndex = nodeKey.lastIndexOf(":"); + if (portIndex === -1) { + throw new Error(`Invalid node key ${nodeKey}`); + } + return { + host: nodeKey.slice(0, portIndex), + port: Number(nodeKey.slice(portIndex + 1)) + }; + } + __name(nodeKeyToRedisOptions, "nodeKeyToRedisOptions"); + exports.nodeKeyToRedisOptions = nodeKeyToRedisOptions; + function normalizeNodeOptions(nodes) { + return nodes.map((node) => { + const options = {}; + if (typeof node === "object") { + Object.assign(options, node); + } else if (typeof node === "string") { + Object.assign(options, (0, utils_1.parseURL)(node)); + } else if (typeof node === "number") { + options.port = node; + } else { + throw new Error("Invalid argument " + node); + } + if (typeof options.port === "string") { + options.port = parseInt(options.port, 10); + } + delete options.db; + if (!options.port) { + options.port = 6379; + } + if (!options.host) { + options.host = "127.0.0.1"; + } + return (0, utils_1.resolveTLSProfile)(options); + }); + } + __name(normalizeNodeOptions, "normalizeNodeOptions"); + exports.normalizeNodeOptions = normalizeNodeOptions; + function getUniqueHostnamesFromOptions(nodes) { + const uniqueHostsMap = {}; + nodes.forEach((node) => { + uniqueHostsMap[node.host] = true; + }); + return Object.keys(uniqueHostsMap).filter((host) => !(0, net_1.isIP)(host)); + } + __name(getUniqueHostnamesFromOptions, "getUniqueHostnamesFromOptions"); + exports.getUniqueHostnamesFromOptions = getUniqueHostnamesFromOptions; + function groupSrvRecords(records) { + const recordsByPriority = {}; + for (const record2 of records) { + if (!recordsByPriority.hasOwnProperty(record2.priority)) { + recordsByPriority[record2.priority] = { + totalWeight: record2.weight, + records: [record2] + }; + } else { + recordsByPriority[record2.priority].totalWeight += record2.weight; + recordsByPriority[record2.priority].records.push(record2); + } + } + return recordsByPriority; + } + __name(groupSrvRecords, "groupSrvRecords"); + exports.groupSrvRecords = groupSrvRecords; + function weightSrvRecords(recordsGroup) { + if (recordsGroup.records.length === 1) { + recordsGroup.totalWeight = 0; + return recordsGroup.records.shift(); + } + const random = Math.floor(Math.random() * (recordsGroup.totalWeight + recordsGroup.records.length)); + let total = 0; + for (const [i, record2] of recordsGroup.records.entries()) { + total += 1 + record2.weight; + if (total > random) { + recordsGroup.totalWeight -= record2.weight; + recordsGroup.records.splice(i, 1); + return record2; + } + } + } + __name(weightSrvRecords, "weightSrvRecords"); + exports.weightSrvRecords = weightSrvRecords; + function getConnectionName(component, nodeConnectionName) { + const prefix = `ioredis-cluster(${component})`; + return nodeConnectionName ? `${prefix}:${nodeConnectionName}` : prefix; + } + __name(getConnectionName, "getConnectionName"); + exports.getConnectionName = getConnectionName; + } +}); + +// ../../node_modules/ioredis/built/cluster/ClusterSubscriber.js +var require_ClusterSubscriber = __commonJS({ + "../../node_modules/ioredis/built/cluster/ClusterSubscriber.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var util_1 = require_util2(); + var utils_1 = require_utils2(); + var Redis_1 = require_Redis(); + var debug3 = (0, utils_1.Debug)("cluster:subscriber"); + var ClusterSubscriber = class { + static { + __name(this, "ClusterSubscriber"); + } + constructor(connectionPool, emitter, isSharded = false) { + this.connectionPool = connectionPool; + this.emitter = emitter; + this.isSharded = isSharded; + this.started = false; + this.subscriber = null; + this.slotRange = []; + this.onSubscriberEnd = () => { + if (!this.started) { + debug3("subscriber has disconnected, but ClusterSubscriber is not started, so not reconnecting."); + return; + } + debug3("subscriber has disconnected, selecting a new one..."); + this.selectSubscriber(); + }; + this.connectionPool.on("-node", (_, key) => { + if (!this.started || !this.subscriber) { + return; + } + if ((0, util_1.getNodeKey)(this.subscriber.options) === key) { + debug3("subscriber has left, selecting a new one..."); + this.selectSubscriber(); + } + }); + this.connectionPool.on("+node", () => { + if (!this.started || this.subscriber) { + return; + } + debug3("a new node is discovered and there is no subscriber, selecting a new one..."); + this.selectSubscriber(); + }); + } + getInstance() { + return this.subscriber; + } + /** + * Associate this subscriber to a specific slot range. + * + * Returns the range or an empty array if the slot range couldn't be associated. + * + * BTW: This is more for debugging and testing purposes. + * + * @param range + */ + associateSlotRange(range) { + if (this.isSharded) { + this.slotRange = range; + } + return this.slotRange; + } + start() { + this.started = true; + this.selectSubscriber(); + debug3("started"); + } + stop() { + this.started = false; + if (this.subscriber) { + this.subscriber.disconnect(); + this.subscriber = null; + } + } + isStarted() { + return this.started; + } + selectSubscriber() { + const lastActiveSubscriber = this.lastActiveSubscriber; + if (lastActiveSubscriber) { + lastActiveSubscriber.off("end", this.onSubscriberEnd); + lastActiveSubscriber.disconnect(); + } + if (this.subscriber) { + this.subscriber.off("end", this.onSubscriberEnd); + this.subscriber.disconnect(); + } + const sampleNode = (0, utils_1.sample)(this.connectionPool.getNodes()); + if (!sampleNode) { + debug3("selecting subscriber failed since there is no node discovered in the cluster yet"); + this.subscriber = null; + return; + } + const { options } = sampleNode; + debug3("selected a subscriber %s:%s", options.host, options.port); + let connectionPrefix = "subscriber"; + if (this.isSharded) + connectionPrefix = "ssubscriber"; + this.subscriber = new Redis_1.default({ + port: options.port, + host: options.host, + username: options.username, + password: options.password, + enableReadyCheck: true, + connectionName: (0, util_1.getConnectionName)(connectionPrefix, options.connectionName), + lazyConnect: true, + tls: options.tls, + // Don't try to reconnect the subscriber connection. If the connection fails + // we will get an end event (handled below), at which point we'll pick a new + // node from the pool and try to connect to that as the subscriber connection. + retryStrategy: null + }); + this.subscriber.on("error", utils_1.noop); + this.subscriber.on("moved", () => { + this.emitter.emit("forceRefresh"); + }); + this.subscriber.once("end", this.onSubscriberEnd); + const previousChannels = { subscribe: [], psubscribe: [], ssubscribe: [] }; + if (lastActiveSubscriber) { + const condition = lastActiveSubscriber.condition || lastActiveSubscriber.prevCondition; + if (condition && condition.subscriber) { + previousChannels.subscribe = condition.subscriber.channels("subscribe"); + previousChannels.psubscribe = condition.subscriber.channels("psubscribe"); + previousChannels.ssubscribe = condition.subscriber.channels("ssubscribe"); + } + } + if (previousChannels.subscribe.length || previousChannels.psubscribe.length || previousChannels.ssubscribe.length) { + let pending = 0; + for (const type of ["subscribe", "psubscribe", "ssubscribe"]) { + const channels = previousChannels[type]; + if (channels.length == 0) { + continue; + } + debug3("%s %d channels", type, channels.length); + if (type === "ssubscribe") { + for (const channel2 of channels) { + pending += 1; + this.subscriber[type](channel2).then(() => { + if (!--pending) { + this.lastActiveSubscriber = this.subscriber; + } + }).catch(() => { + debug3("failed to ssubscribe to channel: %s", channel2); + }); + } + } else { + pending += 1; + this.subscriber[type](channels).then(() => { + if (!--pending) { + this.lastActiveSubscriber = this.subscriber; + } + }).catch(() => { + debug3("failed to %s %d channels", type, channels.length); + }); + } + } + } else { + this.lastActiveSubscriber = this.subscriber; + } + for (const event of [ + "message", + "messageBuffer" + ]) { + this.subscriber.on(event, (arg1, arg2) => { + this.emitter.emit(event, arg1, arg2); + }); + } + for (const event of ["pmessage", "pmessageBuffer"]) { + this.subscriber.on(event, (arg1, arg2, arg3) => { + this.emitter.emit(event, arg1, arg2, arg3); + }); + } + if (this.isSharded == true) { + for (const event of [ + "smessage", + "smessageBuffer" + ]) { + this.subscriber.on(event, (arg1, arg2) => { + this.emitter.emit(event, arg1, arg2); + }); + } + } + } + }; + exports.default = ClusterSubscriber; + } +}); + +// ../../node_modules/ioredis/built/cluster/ConnectionPool.js +var require_ConnectionPool = __commonJS({ + "../../node_modules/ioredis/built/cluster/ConnectionPool.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var events_1 = require_events(); + var utils_1 = require_utils2(); + var util_1 = require_util2(); + var Redis_1 = require_Redis(); + var debug3 = (0, utils_1.Debug)("cluster:connectionPool"); + var ConnectionPool = class extends events_1.EventEmitter { + static { + __name(this, "ConnectionPool"); + } + constructor(redisOptions) { + super(); + this.redisOptions = redisOptions; + this.nodes = { + all: {}, + master: {}, + slave: {} + }; + this.specifiedOptions = {}; + } + getNodes(role = "all") { + const nodes = this.nodes[role]; + return Object.keys(nodes).map((key) => nodes[key]); + } + getInstanceByKey(key) { + return this.nodes.all[key]; + } + getSampleInstance(role) { + const keys = Object.keys(this.nodes[role]); + const sampleKey = (0, utils_1.sample)(keys); + return this.nodes[role][sampleKey]; + } + /** + * Add a master node to the pool + * @param node + */ + addMasterNode(node) { + const key = (0, util_1.getNodeKey)(node.options); + const redis = this.createRedisFromOptions(node, node.options.readOnly); + if (!node.options.readOnly) { + this.nodes.all[key] = redis; + this.nodes.master[key] = redis; + return true; + } + return false; + } + /** + * Creates a Redis connection instance from the node options + * @param node + * @param readOnly + */ + createRedisFromOptions(node, readOnly) { + const redis = new Redis_1.default((0, utils_1.defaults)({ + // Never try to reconnect when a node is lose, + // instead, waiting for a `MOVED` error and + // fetch the slots again. + retryStrategy: null, + // Offline queue should be enabled so that + // we don't need to wait for the `ready` event + // before sending commands to the node. + enableOfflineQueue: true, + readOnly + }, node, this.redisOptions, { lazyConnect: true })); + return redis; + } + /** + * Find or create a connection to the node + */ + findOrCreate(node, readOnly = false) { + const key = (0, util_1.getNodeKey)(node); + readOnly = Boolean(readOnly); + if (this.specifiedOptions[key]) { + Object.assign(node, this.specifiedOptions[key]); + } else { + this.specifiedOptions[key] = node; + } + let redis; + if (this.nodes.all[key]) { + redis = this.nodes.all[key]; + if (redis.options.readOnly !== readOnly) { + redis.options.readOnly = readOnly; + debug3("Change role of %s to %s", key, readOnly ? "slave" : "master"); + redis[readOnly ? "readonly" : "readwrite"]().catch(utils_1.noop); + if (readOnly) { + delete this.nodes.master[key]; + this.nodes.slave[key] = redis; + } else { + delete this.nodes.slave[key]; + this.nodes.master[key] = redis; + } + } + } else { + debug3("Connecting to %s as %s", key, readOnly ? "slave" : "master"); + redis = this.createRedisFromOptions(node, readOnly); + this.nodes.all[key] = redis; + this.nodes[readOnly ? "slave" : "master"][key] = redis; + redis.once("end", () => { + this.removeNode(key); + this.emit("-node", redis, key); + if (!Object.keys(this.nodes.all).length) { + this.emit("drain"); + } + }); + this.emit("+node", redis, key); + redis.on("error", function(error50) { + this.emit("nodeError", error50, key); + }); + } + return redis; + } + /** + * Reset the pool with a set of nodes. + * The old node will be removed. + */ + reset(nodes) { + debug3("Reset with %O", nodes); + const newNodes = {}; + nodes.forEach((node) => { + const key = (0, util_1.getNodeKey)(node); + if (!(node.readOnly && newNodes[key])) { + newNodes[key] = node; + } + }); + Object.keys(this.nodes.all).forEach((key) => { + if (!newNodes[key]) { + debug3("Disconnect %s because the node does not hold any slot", key); + this.nodes.all[key].disconnect(); + this.removeNode(key); + } + }); + Object.keys(newNodes).forEach((key) => { + const node = newNodes[key]; + this.findOrCreate(node, node.readOnly); + }); + } + /** + * Remove a node from the pool. + */ + removeNode(key) { + const { nodes } = this; + if (nodes.all[key]) { + debug3("Remove %s from the pool", key); + delete nodes.all[key]; + } + delete nodes.master[key]; + delete nodes.slave[key]; + } + }; + exports.default = ConnectionPool; + } +}); + +// ../../node_modules/denque/index.js +var require_denque = __commonJS({ + "../../node_modules/denque/index.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + function Denque(array2, options) { + var options = options || {}; + this._capacity = options.capacity; + this._head = 0; + this._tail = 0; + if (Array.isArray(array2)) { + this._fromArray(array2); + } else { + this._capacityMask = 3; + this._list = new Array(4); + } + } + __name(Denque, "Denque"); + Denque.prototype.peekAt = /* @__PURE__ */ __name(function peekAt(index) { + var i = index; + if (i !== (i | 0)) { + return void 0; + } + var len = this.size(); + if (i >= len || i < -len) return void 0; + if (i < 0) i += len; + i = this._head + i & this._capacityMask; + return this._list[i]; + }, "peekAt"); + Denque.prototype.get = /* @__PURE__ */ __name(function get(i) { + return this.peekAt(i); + }, "get"); + Denque.prototype.peek = /* @__PURE__ */ __name(function peek() { + if (this._head === this._tail) return void 0; + return this._list[this._head]; + }, "peek"); + Denque.prototype.peekFront = /* @__PURE__ */ __name(function peekFront() { + return this.peek(); + }, "peekFront"); + Denque.prototype.peekBack = /* @__PURE__ */ __name(function peekBack() { + return this.peekAt(-1); + }, "peekBack"); + Object.defineProperty(Denque.prototype, "length", { + get: /* @__PURE__ */ __name(function length() { + return this.size(); + }, "length") + }); + Denque.prototype.size = /* @__PURE__ */ __name(function size() { + if (this._head === this._tail) return 0; + if (this._head < this._tail) return this._tail - this._head; + else return this._capacityMask + 1 - (this._head - this._tail); + }, "size"); + Denque.prototype.unshift = /* @__PURE__ */ __name(function unshift(item) { + if (arguments.length === 0) return this.size(); + var len = this._list.length; + this._head = this._head - 1 + len & this._capacityMask; + this._list[this._head] = item; + if (this._tail === this._head) this._growArray(); + if (this._capacity && this.size() > this._capacity) this.pop(); + if (this._head < this._tail) return this._tail - this._head; + else return this._capacityMask + 1 - (this._head - this._tail); + }, "unshift"); + Denque.prototype.shift = /* @__PURE__ */ __name(function shift() { + var head = this._head; + if (head === this._tail) return void 0; + var item = this._list[head]; + this._list[head] = void 0; + this._head = head + 1 & this._capacityMask; + if (head < 2 && this._tail > 1e4 && this._tail <= this._list.length >>> 2) this._shrinkArray(); + return item; + }, "shift"); + Denque.prototype.push = /* @__PURE__ */ __name(function push(item) { + if (arguments.length === 0) return this.size(); + var tail = this._tail; + this._list[tail] = item; + this._tail = tail + 1 & this._capacityMask; + if (this._tail === this._head) { + this._growArray(); + } + if (this._capacity && this.size() > this._capacity) { + this.shift(); + } + if (this._head < this._tail) return this._tail - this._head; + else return this._capacityMask + 1 - (this._head - this._tail); + }, "push"); + Denque.prototype.pop = /* @__PURE__ */ __name(function pop() { + var tail = this._tail; + if (tail === this._head) return void 0; + var len = this._list.length; + this._tail = tail - 1 + len & this._capacityMask; + var item = this._list[this._tail]; + this._list[this._tail] = void 0; + if (this._head < 2 && tail > 1e4 && tail <= len >>> 2) this._shrinkArray(); + return item; + }, "pop"); + Denque.prototype.removeOne = /* @__PURE__ */ __name(function removeOne(index) { + var i = index; + if (i !== (i | 0)) { + return void 0; + } + if (this._head === this._tail) return void 0; + var size = this.size(); + var len = this._list.length; + if (i >= size || i < -size) return void 0; + if (i < 0) i += size; + i = this._head + i & this._capacityMask; + var item = this._list[i]; + var k; + if (index < size / 2) { + for (k = index; k > 0; k--) { + this._list[i] = this._list[i = i - 1 + len & this._capacityMask]; + } + this._list[i] = void 0; + this._head = this._head + 1 + len & this._capacityMask; + } else { + for (k = size - 1 - index; k > 0; k--) { + this._list[i] = this._list[i = i + 1 + len & this._capacityMask]; + } + this._list[i] = void 0; + this._tail = this._tail - 1 + len & this._capacityMask; + } + return item; + }, "removeOne"); + Denque.prototype.remove = /* @__PURE__ */ __name(function remove(index, count4) { + var i = index; + var removed; + var del_count = count4; + if (i !== (i | 0)) { + return void 0; + } + if (this._head === this._tail) return void 0; + var size = this.size(); + var len = this._list.length; + if (i >= size || i < -size || count4 < 1) return void 0; + if (i < 0) i += size; + if (count4 === 1 || !count4) { + removed = new Array(1); + removed[0] = this.removeOne(i); + return removed; + } + if (i === 0 && i + count4 >= size) { + removed = this.toArray(); + this.clear(); + return removed; + } + if (i + count4 > size) count4 = size - i; + var k; + removed = new Array(count4); + for (k = 0; k < count4; k++) { + removed[k] = this._list[this._head + i + k & this._capacityMask]; + } + i = this._head + i & this._capacityMask; + if (index + count4 === size) { + this._tail = this._tail - count4 + len & this._capacityMask; + for (k = count4; k > 0; k--) { + this._list[i = i + 1 + len & this._capacityMask] = void 0; + } + return removed; + } + if (index === 0) { + this._head = this._head + count4 + len & this._capacityMask; + for (k = count4 - 1; k > 0; k--) { + this._list[i = i + 1 + len & this._capacityMask] = void 0; + } + return removed; + } + if (i < size / 2) { + this._head = this._head + index + count4 + len & this._capacityMask; + for (k = index; k > 0; k--) { + this.unshift(this._list[i = i - 1 + len & this._capacityMask]); + } + i = this._head - 1 + len & this._capacityMask; + while (del_count > 0) { + this._list[i = i - 1 + len & this._capacityMask] = void 0; + del_count--; + } + if (index < 0) this._tail = i; + } else { + this._tail = i; + i = i + count4 + len & this._capacityMask; + for (k = size - (count4 + index); k > 0; k--) { + this.push(this._list[i++]); + } + i = this._tail; + while (del_count > 0) { + this._list[i = i + 1 + len & this._capacityMask] = void 0; + del_count--; + } + } + if (this._head < 2 && this._tail > 1e4 && this._tail <= len >>> 2) this._shrinkArray(); + return removed; + }, "remove"); + Denque.prototype.splice = /* @__PURE__ */ __name(function splice(index, count4) { + var i = index; + if (i !== (i | 0)) { + return void 0; + } + var size = this.size(); + if (i < 0) i += size; + if (i > size) return void 0; + if (arguments.length > 2) { + var k; + var temp; + var removed; + var arg_len = arguments.length; + var len = this._list.length; + var arguments_index = 2; + if (!size || i < size / 2) { + temp = new Array(i); + for (k = 0; k < i; k++) { + temp[k] = this._list[this._head + k & this._capacityMask]; + } + if (count4 === 0) { + removed = []; + if (i > 0) { + this._head = this._head + i + len & this._capacityMask; + } + } else { + removed = this.remove(i, count4); + this._head = this._head + i + len & this._capacityMask; + } + while (arg_len > arguments_index) { + this.unshift(arguments[--arg_len]); + } + for (k = i; k > 0; k--) { + this.unshift(temp[k - 1]); + } + } else { + temp = new Array(size - (i + count4)); + var leng = temp.length; + for (k = 0; k < leng; k++) { + temp[k] = this._list[this._head + i + count4 + k & this._capacityMask]; + } + if (count4 === 0) { + removed = []; + if (i != size) { + this._tail = this._head + i + len & this._capacityMask; + } + } else { + removed = this.remove(i, count4); + this._tail = this._tail - leng + len & this._capacityMask; + } + while (arguments_index < arg_len) { + this.push(arguments[arguments_index++]); + } + for (k = 0; k < leng; k++) { + this.push(temp[k]); + } + } + return removed; + } else { + return this.remove(i, count4); + } + }, "splice"); + Denque.prototype.clear = /* @__PURE__ */ __name(function clear3() { + this._list = new Array(this._list.length); + this._head = 0; + this._tail = 0; + }, "clear"); + Denque.prototype.isEmpty = /* @__PURE__ */ __name(function isEmpty2() { + return this._head === this._tail; + }, "isEmpty"); + Denque.prototype.toArray = /* @__PURE__ */ __name(function toArray2() { + return this._copyArray(false); + }, "toArray"); + Denque.prototype._fromArray = /* @__PURE__ */ __name(function _fromArray(array2) { + var length = array2.length; + var capacity = this._nextPowerOf2(length); + this._list = new Array(capacity); + this._capacityMask = capacity - 1; + this._tail = length; + for (var i = 0; i < length; i++) this._list[i] = array2[i]; + }, "_fromArray"); + Denque.prototype._copyArray = /* @__PURE__ */ __name(function _copyArray(fullCopy, size) { + var src2 = this._list; + var capacity = src2.length; + var length = this.length; + size = size | length; + if (size == length && this._head < this._tail) { + return this._list.slice(this._head, this._tail); + } + var dest = new Array(size); + var k = 0; + var i; + if (fullCopy || this._head > this._tail) { + for (i = this._head; i < capacity; i++) dest[k++] = src2[i]; + for (i = 0; i < this._tail; i++) dest[k++] = src2[i]; + } else { + for (i = this._head; i < this._tail; i++) dest[k++] = src2[i]; + } + return dest; + }, "_copyArray"); + Denque.prototype._growArray = /* @__PURE__ */ __name(function _growArray() { + if (this._head != 0) { + var newList = this._copyArray(true, this._list.length << 1); + this._tail = this._list.length; + this._head = 0; + this._list = newList; + } else { + this._tail = this._list.length; + this._list.length <<= 1; + } + this._capacityMask = this._capacityMask << 1 | 1; + }, "_growArray"); + Denque.prototype._shrinkArray = /* @__PURE__ */ __name(function _shrinkArray() { + this._list.length >>>= 1; + this._capacityMask >>>= 1; + }, "_shrinkArray"); + Denque.prototype._nextPowerOf2 = /* @__PURE__ */ __name(function _nextPowerOf2(num) { + var log22 = Math.log(num) / Math.log(2); + var nextPow2 = 1 << log22 + 1; + return Math.max(nextPow2, 4); + }, "_nextPowerOf2"); + module2.exports = Denque; + } +}); + +// ../../node_modules/ioredis/built/cluster/DelayQueue.js +var require_DelayQueue = __commonJS({ + "../../node_modules/ioredis/built/cluster/DelayQueue.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var utils_1 = require_utils2(); + var Deque = require_denque(); + var debug3 = (0, utils_1.Debug)("delayqueue"); + var DelayQueue = class { + static { + __name(this, "DelayQueue"); + } + constructor() { + this.queues = {}; + this.timeouts = {}; + } + /** + * Add a new item to the queue + * + * @param bucket bucket name + * @param item function that will run later + * @param options + */ + push(bucket, item, options) { + const callback = options.callback || process.nextTick; + if (!this.queues[bucket]) { + this.queues[bucket] = new Deque(); + } + const queue = this.queues[bucket]; + queue.push(item); + if (!this.timeouts[bucket]) { + this.timeouts[bucket] = setTimeout(() => { + callback(() => { + this.timeouts[bucket] = null; + this.execute(bucket); + }); + }, options.timeout); + } + } + execute(bucket) { + const queue = this.queues[bucket]; + if (!queue) { + return; + } + const { length } = queue; + if (!length) { + return; + } + debug3("send %d commands in %s queue", length, bucket); + this.queues[bucket] = null; + while (queue.length > 0) { + queue.shift()(); + } + } + }; + exports.default = DelayQueue; + } +}); + +// ../../node_modules/ioredis/built/cluster/ShardedSubscriber.js +var require_ShardedSubscriber = __commonJS({ + "../../node_modules/ioredis/built/cluster/ShardedSubscriber.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var util_1 = require_util2(); + var utils_1 = require_utils2(); + var Redis_1 = require_Redis(); + var debug3 = (0, utils_1.Debug)("cluster:subscriberGroup:shardedSubscriber"); + var ShardedSubscriber = class { + static { + __name(this, "ShardedSubscriber"); + } + constructor(emitter, options) { + this.emitter = emitter; + this.started = false; + this.instance = null; + this.messageListeners = /* @__PURE__ */ new Map(); + this.onEnd = () => { + this.started = false; + this.emitter.emit("-node", this.instance, this.nodeKey); + }; + this.onError = (error50) => { + this.emitter.emit("nodeError", error50, this.nodeKey); + }; + this.onMoved = () => { + this.emitter.emit("moved"); + }; + this.instance = new Redis_1.default({ + port: options.port, + host: options.host, + username: options.username, + password: options.password, + enableReadyCheck: false, + offlineQueue: true, + connectionName: (0, util_1.getConnectionName)("ssubscriber", options.connectionName), + lazyConnect: true, + tls: options.tls, + /** + * Disable auto reconnection for subscribers. + * The ClusterSubscriberGroup will handle the reconnection. + */ + retryStrategy: null + }); + this.nodeKey = (0, util_1.getNodeKey)(options); + this.instance.once("end", this.onEnd); + this.instance.on("error", this.onError); + this.instance.on("moved", this.onMoved); + for (const event of ["smessage", "smessageBuffer"]) { + const listener = /* @__PURE__ */ __name((...args) => { + this.emitter.emit(event, ...args); + }, "listener"); + this.messageListeners.set(event, listener); + this.instance.on(event, listener); + } + } + async start() { + if (this.started) { + debug3("already started %s", this.nodeKey); + return; + } + try { + await this.instance.connect(); + debug3("started %s", this.nodeKey); + this.started = true; + } catch (err) { + debug3("failed to start %s: %s", this.nodeKey, err); + this.started = false; + throw err; + } + } + stop() { + this.started = false; + if (this.instance) { + this.instance.disconnect(); + this.instance.removeAllListeners(); + this.messageListeners.clear(); + this.instance = null; + } + debug3("stopped %s", this.nodeKey); + } + isStarted() { + return this.started; + } + getInstance() { + return this.instance; + } + getNodeKey() { + return this.nodeKey; + } + }; + exports.default = ShardedSubscriber; + } +}); + +// ../../node_modules/ioredis/built/cluster/ClusterSubscriberGroup.js +var require_ClusterSubscriberGroup = __commonJS({ + "../../node_modules/ioredis/built/cluster/ClusterSubscriberGroup.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var utils_1 = require_utils2(); + var util_1 = require_util2(); + var calculateSlot = require_lib(); + var ShardedSubscriber_1 = require_ShardedSubscriber(); + var debug3 = (0, utils_1.Debug)("cluster:subscriberGroup"); + var ClusterSubscriberGroup = class _ClusterSubscriberGroup { + static { + __name(this, "ClusterSubscriberGroup"); + } + /** + * Register callbacks + * + * @param cluster + */ + constructor(subscriberGroupEmitter) { + this.subscriberGroupEmitter = subscriberGroupEmitter; + this.shardedSubscribers = /* @__PURE__ */ new Map(); + this.clusterSlots = []; + this.subscriberToSlotsIndex = /* @__PURE__ */ new Map(); + this.channels = /* @__PURE__ */ new Map(); + this.failedAttemptsByNode = /* @__PURE__ */ new Map(); + this.isResetting = false; + this.pendingReset = null; + this.handleSubscriberConnectFailed = (error50, nodeKey) => { + const currentAttempts = this.failedAttemptsByNode.get(nodeKey) || 0; + const failedAttempts = currentAttempts + 1; + this.failedAttemptsByNode.set(nodeKey, failedAttempts); + const attempts = Math.min(failedAttempts, _ClusterSubscriberGroup.MAX_RETRY_ATTEMPTS); + const backoff = Math.min(_ClusterSubscriberGroup.BASE_BACKOFF_MS * 2 ** attempts, _ClusterSubscriberGroup.MAX_BACKOFF_MS); + const jitter = Math.floor((Math.random() - 0.5) * (backoff * 0.5)); + const delay2 = Math.max(0, backoff + jitter); + debug3("Failed to connect subscriber for %s. Refreshing slots in %dms", nodeKey, delay2); + this.subscriberGroupEmitter.emit("subscriberConnectFailed", { + delay: delay2, + error: error50 + }); + }; + this.handleSubscriberConnectSucceeded = (nodeKey) => { + this.failedAttemptsByNode.delete(nodeKey); + }; + } + /** + * Get the responsible subscriber. + * + * @param slot + */ + getResponsibleSubscriber(slot) { + const nodeKey = this.clusterSlots[slot][0]; + return this.shardedSubscribers.get(nodeKey); + } + /** + * Adds a channel for which this subscriber group is responsible + * + * @param channels + */ + addChannels(channels) { + const slot = calculateSlot(channels[0]); + for (const c of channels) { + if (calculateSlot(c) !== slot) { + return -1; + } + } + const currChannels = this.channels.get(slot); + if (!currChannels) { + this.channels.set(slot, channels); + } else { + this.channels.set(slot, currChannels.concat(channels)); + } + return Array.from(this.channels.values()).reduce((sum2, array2) => sum2 + array2.length, 0); + } + /** + * Removes channels for which the subscriber group is responsible by optionally unsubscribing + * @param channels + */ + removeChannels(channels) { + const slot = calculateSlot(channels[0]); + for (const c of channels) { + if (calculateSlot(c) !== slot) { + return -1; + } + } + const slotChannels = this.channels.get(slot); + if (slotChannels) { + const updatedChannels = slotChannels.filter((c) => !channels.includes(c)); + this.channels.set(slot, updatedChannels); + } + return Array.from(this.channels.values()).reduce((sum2, array2) => sum2 + array2.length, 0); + } + /** + * Disconnect all subscribers and clear some of the internal state. + */ + stop() { + for (const s of this.shardedSubscribers.values()) { + s.stop(); + } + this.pendingReset = null; + this.shardedSubscribers.clear(); + this.subscriberToSlotsIndex.clear(); + } + /** + * Start all not yet started subscribers + */ + start() { + const startPromises = []; + for (const s of this.shardedSubscribers.values()) { + if (!s.isStarted()) { + startPromises.push(s.start().then(() => { + this.handleSubscriberConnectSucceeded(s.getNodeKey()); + }).catch((err) => { + this.handleSubscriberConnectFailed(err, s.getNodeKey()); + })); + } + } + return Promise.all(startPromises); + } + /** + * Resets the subscriber group by disconnecting all subscribers that are no longer needed and connecting new ones. + */ + async reset(clusterSlots, clusterNodes) { + if (this.isResetting) { + this.pendingReset = { slots: clusterSlots, nodes: clusterNodes }; + return; + } + this.isResetting = true; + try { + const hasTopologyChanged = this._refreshSlots(clusterSlots); + const hasFailedSubscribers = this.hasUnhealthySubscribers(); + if (!hasTopologyChanged && !hasFailedSubscribers) { + debug3("No topology change detected or failed subscribers. Skipping reset."); + return; + } + for (const [nodeKey, shardedSubscriber] of this.shardedSubscribers) { + if ( + // If the subscriber is still responsible for a slot range and is running then keep it + this.subscriberToSlotsIndex.has(nodeKey) && shardedSubscriber.isStarted() + ) { + debug3("Skipping deleting subscriber for %s", nodeKey); + continue; + } + debug3("Removing subscriber for %s", nodeKey); + shardedSubscriber.stop(); + this.shardedSubscribers.delete(nodeKey); + this.subscriberGroupEmitter.emit("-subscriber"); + } + const startPromises = []; + for (const [nodeKey, _] of this.subscriberToSlotsIndex) { + if (this.shardedSubscribers.has(nodeKey)) { + debug3("Skipping creating new subscriber for %s", nodeKey); + continue; + } + debug3("Creating new subscriber for %s", nodeKey); + const redis = clusterNodes.find((node) => { + return (0, util_1.getNodeKey)(node.options) === nodeKey; + }); + if (!redis) { + debug3("Failed to find node for key %s", nodeKey); + continue; + } + const sub = new ShardedSubscriber_1.default(this.subscriberGroupEmitter, redis.options); + this.shardedSubscribers.set(nodeKey, sub); + startPromises.push(sub.start().then(() => { + this.handleSubscriberConnectSucceeded(nodeKey); + }).catch((error50) => { + this.handleSubscriberConnectFailed(error50, nodeKey); + })); + this.subscriberGroupEmitter.emit("+subscriber"); + } + await Promise.all(startPromises); + this._resubscribe(); + this.subscriberGroupEmitter.emit("subscribersReady"); + } finally { + this.isResetting = false; + if (this.pendingReset) { + const { slots, nodes } = this.pendingReset; + this.pendingReset = null; + await this.reset(slots, nodes); + } + } + } + /** + * Refreshes the subscriber-related slot ranges + * + * Returns false if no refresh was needed + * + * @param targetSlots + */ + _refreshSlots(targetSlots) { + if (this._slotsAreEqual(targetSlots)) { + debug3("Nothing to refresh because the new cluster map is equal to the previous one."); + return false; + } + debug3("Refreshing the slots of the subscriber group."); + this.subscriberToSlotsIndex = /* @__PURE__ */ new Map(); + for (let slot = 0; slot < targetSlots.length; slot++) { + const node = targetSlots[slot][0]; + if (!this.subscriberToSlotsIndex.has(node)) { + this.subscriberToSlotsIndex.set(node, []); + } + this.subscriberToSlotsIndex.get(node).push(Number(slot)); + } + this.clusterSlots = JSON.parse(JSON.stringify(targetSlots)); + return true; + } + /** + * Resubscribes to the previous channels + * + * @private + */ + _resubscribe() { + if (this.shardedSubscribers) { + this.shardedSubscribers.forEach((s, nodeKey) => { + const subscriberSlots = this.subscriberToSlotsIndex.get(nodeKey); + if (subscriberSlots) { + subscriberSlots.forEach((ss) => { + const redis = s.getInstance(); + const channels = this.channels.get(ss); + if (channels && channels.length > 0) { + if (redis.status === "end") { + return; + } + if (redis.status === "ready") { + redis.ssubscribe(...channels).catch((err) => { + debug3("Failed to ssubscribe on node %s: %s", nodeKey, err); + }); + } else { + redis.once("ready", () => { + redis.ssubscribe(...channels).catch((err) => { + debug3("Failed to ssubscribe on node %s: %s", nodeKey, err); + }); + }); + } + } + }); + } + }); + } + } + /** + * Deep equality of the cluster slots objects + * + * @param other + * @private + */ + _slotsAreEqual(other) { + if (this.clusterSlots === void 0) { + return false; + } else { + return JSON.stringify(this.clusterSlots) === JSON.stringify(other); + } + } + /** + * Checks if any subscribers are in an unhealthy state. + * + * A subscriber is considered unhealthy if: + * - It exists but is not started (failed/disconnected) + * - It's missing entirely for a node that should have one + * + * @returns true if any subscribers need to be recreated + */ + hasUnhealthySubscribers() { + const hasFailedSubscribers = Array.from(this.shardedSubscribers.values()).some((sub) => !sub.isStarted()); + const hasMissingSubscribers = Array.from(this.subscriberToSlotsIndex.keys()).some((nodeKey) => !this.shardedSubscribers.has(nodeKey)); + return hasFailedSubscribers || hasMissingSubscribers; + } + }; + exports.default = ClusterSubscriberGroup; + ClusterSubscriberGroup.MAX_RETRY_ATTEMPTS = 10; + ClusterSubscriberGroup.MAX_BACKOFF_MS = 2e3; + ClusterSubscriberGroup.BASE_BACKOFF_MS = 100; + } +}); + +// ../../node_modules/ioredis/built/cluster/index.js +var require_cluster = __commonJS({ + "../../node_modules/ioredis/built/cluster/index.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var commands_1 = require_built(); + var events_1 = require_events(); + var redis_errors_1 = require_redis_errors(); + var standard_as_callback_1 = require_built2(); + var Command_1 = require_Command(); + var ClusterAllFailedError_1 = require_ClusterAllFailedError(); + var Redis_1 = require_Redis(); + var ScanStream_1 = require_ScanStream(); + var transaction_1 = require_transaction(); + var utils_1 = require_utils2(); + var applyMixin_1 = require_applyMixin(); + var Commander_1 = require_Commander(); + var ClusterOptions_1 = require_ClusterOptions(); + var ClusterSubscriber_1 = require_ClusterSubscriber(); + var ConnectionPool_1 = require_ConnectionPool(); + var DelayQueue_1 = require_DelayQueue(); + var util_1 = require_util2(); + var Deque = require_denque(); + var ClusterSubscriberGroup_1 = require_ClusterSubscriberGroup(); + var debug3 = (0, utils_1.Debug)("cluster"); + var REJECT_OVERWRITTEN_COMMANDS = /* @__PURE__ */ new WeakSet(); + var Cluster2 = class _Cluster extends Commander_1.default { + static { + __name(this, "Cluster"); + } + /** + * Creates an instance of Cluster. + */ + //TODO: Add an option that enables or disables sharded PubSub + constructor(startupNodes, options = {}) { + super(); + this.slots = []; + this._groupsIds = {}; + this._groupsBySlot = Array(16384); + this.isCluster = true; + this.retryAttempts = 0; + this.delayQueue = new DelayQueue_1.default(); + this.offlineQueue = new Deque(); + this.isRefreshing = false; + this._refreshSlotsCacheCallbacks = []; + this._autoPipelines = /* @__PURE__ */ new Map(); + this._runningAutoPipelines = /* @__PURE__ */ new Set(); + this._readyDelayedCallbacks = []; + this.connectionEpoch = 0; + events_1.EventEmitter.call(this); + this.startupNodes = startupNodes; + this.options = (0, utils_1.defaults)({}, options, ClusterOptions_1.DEFAULT_CLUSTER_OPTIONS, this.options); + if (this.options.shardedSubscribers) { + this.createShardedSubscriberGroup(); + } + if (this.options.redisOptions && this.options.redisOptions.keyPrefix && !this.options.keyPrefix) { + this.options.keyPrefix = this.options.redisOptions.keyPrefix; + } + if (typeof this.options.scaleReads !== "function" && ["all", "master", "slave"].indexOf(this.options.scaleReads) === -1) { + throw new Error('Invalid option scaleReads "' + this.options.scaleReads + '". Expected "all", "master", "slave" or a custom function'); + } + this.connectionPool = new ConnectionPool_1.default(this.options.redisOptions); + this.connectionPool.on("-node", (redis, key) => { + this.emit("-node", redis); + }); + this.connectionPool.on("+node", (redis) => { + this.emit("+node", redis); + }); + this.connectionPool.on("drain", () => { + this.setStatus("close"); + }); + this.connectionPool.on("nodeError", (error50, key) => { + this.emit("node error", error50, key); + }); + this.subscriber = new ClusterSubscriber_1.default(this.connectionPool, this); + if (this.options.scripts) { + Object.entries(this.options.scripts).forEach(([name, definition]) => { + this.defineCommand(name, definition); + }); + } + if (this.options.lazyConnect) { + this.setStatus("wait"); + } else { + this.connect().catch((err) => { + debug3("connecting failed: %s", err); + }); + } + } + /** + * Connect to a cluster + */ + connect() { + return new Promise((resolve, reject) => { + if (this.status === "connecting" || this.status === "connect" || this.status === "ready") { + reject(new Error("Redis is already connecting/connected")); + return; + } + const epoch2 = ++this.connectionEpoch; + this.setStatus("connecting"); + this.resolveStartupNodeHostnames().then((nodes) => { + if (this.connectionEpoch !== epoch2) { + debug3("discard connecting after resolving startup nodes because epoch not match: %d != %d", epoch2, this.connectionEpoch); + reject(new redis_errors_1.RedisError("Connection is discarded because a new connection is made")); + return; + } + if (this.status !== "connecting") { + debug3("discard connecting after resolving startup nodes because the status changed to %s", this.status); + reject(new redis_errors_1.RedisError("Connection is aborted")); + return; + } + this.connectionPool.reset(nodes); + if (this.options.shardedSubscribers) { + this.shardedSubscribers.reset(this.slots, this.connectionPool.getNodes("all")).catch((err) => { + debug3("Error while starting subscribers: %s", err); + }); + } + const readyHandler = /* @__PURE__ */ __name(() => { + this.setStatus("ready"); + this.retryAttempts = 0; + this.executeOfflineCommands(); + this.resetNodesRefreshInterval(); + resolve(); + }, "readyHandler"); + let closeListener = void 0; + const refreshListener = /* @__PURE__ */ __name(() => { + this.invokeReadyDelayedCallbacks(void 0); + this.removeListener("close", closeListener); + this.manuallyClosing = false; + this.setStatus("connect"); + if (this.options.enableReadyCheck) { + this.readyCheck((err, fail) => { + if (err || fail) { + debug3("Ready check failed (%s). Reconnecting...", err || fail); + if (this.status === "connect") { + this.disconnect(true); + } + } else { + readyHandler(); + } + }); + } else { + readyHandler(); + } + }, "refreshListener"); + closeListener = /* @__PURE__ */ __name(() => { + const error50 = new Error("None of startup nodes is available"); + this.removeListener("refresh", refreshListener); + this.invokeReadyDelayedCallbacks(error50); + reject(error50); + }, "closeListener"); + this.once("refresh", refreshListener); + this.once("close", closeListener); + this.once("close", this.handleCloseEvent.bind(this)); + this.refreshSlotsCache((err) => { + if (err && err.message === ClusterAllFailedError_1.default.defaultMessage) { + Redis_1.default.prototype.silentEmit.call(this, "error", err); + this.connectionPool.reset([]); + } + }); + this.subscriber.start(); + if (this.options.shardedSubscribers) { + this.shardedSubscribers.start().catch((err) => { + debug3("Error while starting subscribers: %s", err); + }); + } + }).catch((err) => { + this.setStatus("close"); + this.handleCloseEvent(err); + this.invokeReadyDelayedCallbacks(err); + reject(err); + }); + }); + } + /** + * Disconnect from every node in the cluster. + */ + disconnect(reconnect = false) { + const status = this.status; + this.setStatus("disconnecting"); + if (!reconnect) { + this.manuallyClosing = true; + } + if (this.reconnectTimeout && !reconnect) { + clearTimeout(this.reconnectTimeout); + this.reconnectTimeout = null; + debug3("Canceled reconnecting attempts"); + } + this.clearNodesRefreshInterval(); + this.subscriber.stop(); + if (this.options.shardedSubscribers) { + this.shardedSubscribers.stop(); + } + if (status === "wait") { + this.setStatus("close"); + this.handleCloseEvent(); + } else { + this.connectionPool.reset([]); + } + } + /** + * Quit the cluster gracefully. + */ + quit(callback) { + const status = this.status; + this.setStatus("disconnecting"); + this.manuallyClosing = true; + if (this.reconnectTimeout) { + clearTimeout(this.reconnectTimeout); + this.reconnectTimeout = null; + } + this.clearNodesRefreshInterval(); + this.subscriber.stop(); + if (this.options.shardedSubscribers) { + this.shardedSubscribers.stop(); + } + if (status === "wait") { + const ret = (0, standard_as_callback_1.default)(Promise.resolve("OK"), callback); + setImmediate(function() { + this.setStatus("close"); + this.handleCloseEvent(); + }.bind(this)); + return ret; + } + return (0, standard_as_callback_1.default)(Promise.all(this.nodes().map((node) => node.quit().catch((err) => { + if (err.message === utils_1.CONNECTION_CLOSED_ERROR_MSG) { + return "OK"; + } + throw err; + }))).then(() => "OK"), callback); + } + /** + * Create a new instance with the same startup nodes and options as the current one. + * + * @example + * ```js + * var cluster = new Redis.Cluster([{ host: "127.0.0.1", port: "30001" }]); + * var anotherCluster = cluster.duplicate(); + * ``` + */ + duplicate(overrideStartupNodes = [], overrideOptions = {}) { + const startupNodes = overrideStartupNodes.length > 0 ? overrideStartupNodes : this.startupNodes.slice(0); + const options = Object.assign({}, this.options, overrideOptions); + return new _Cluster(startupNodes, options); + } + /** + * Get nodes with the specified role + */ + nodes(role = "all") { + if (role !== "all" && role !== "master" && role !== "slave") { + throw new Error('Invalid role "' + role + '". Expected "all", "master" or "slave"'); + } + return this.connectionPool.getNodes(role); + } + /** + * This is needed in order not to install a listener for each auto pipeline + * + * @ignore + */ + delayUntilReady(callback) { + this._readyDelayedCallbacks.push(callback); + } + /** + * Get the number of commands queued in automatic pipelines. + * + * This is not available (and returns 0) until the cluster is connected and slots information have been received. + */ + get autoPipelineQueueSize() { + let queued = 0; + for (const pipeline of this._autoPipelines.values()) { + queued += pipeline.length; + } + return queued; + } + /** + * Refresh the slot cache + * + * @ignore + */ + refreshSlotsCache(callback) { + if (callback) { + this._refreshSlotsCacheCallbacks.push(callback); + } + if (this.isRefreshing) { + return; + } + this.isRefreshing = true; + const _this = this; + const wrapper = /* @__PURE__ */ __name((error50) => { + this.isRefreshing = false; + for (const callback2 of this._refreshSlotsCacheCallbacks) { + callback2(error50); + } + this._refreshSlotsCacheCallbacks = []; + }, "wrapper"); + const nodes = (0, utils_1.shuffle)(this.connectionPool.getNodes()); + let lastNodeError = null; + function tryNode(index) { + if (index === nodes.length) { + const error50 = new ClusterAllFailedError_1.default(ClusterAllFailedError_1.default.defaultMessage, lastNodeError); + return wrapper(error50); + } + const node = nodes[index]; + const key = `${node.options.host}:${node.options.port}`; + debug3("getting slot cache from %s", key); + _this.getInfoFromNode(node, function(err) { + switch (_this.status) { + case "close": + case "end": + return wrapper(new Error("Cluster is disconnected.")); + case "disconnecting": + return wrapper(new Error("Cluster is disconnecting.")); + } + if (err) { + _this.emit("node error", err, key); + lastNodeError = err; + tryNode(index + 1); + } else { + _this.emit("refresh"); + wrapper(); + } + }); + } + __name(tryNode, "tryNode"); + tryNode(0); + } + /** + * @ignore + */ + sendCommand(command, stream, node) { + if (this.status === "wait") { + this.connect().catch(utils_1.noop); + } + if (this.status === "end") { + command.reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + return command.promise; + } + let to = this.options.scaleReads; + if (to !== "master") { + const isCommandReadOnly = command.isReadOnly || (0, commands_1.exists)(command.name) && (0, commands_1.hasFlag)(command.name, "readonly"); + if (!isCommandReadOnly) { + to = "master"; + } + } + let targetSlot = node ? node.slot : command.getSlot(); + const ttl = {}; + const _this = this; + if (!node && !REJECT_OVERWRITTEN_COMMANDS.has(command)) { + REJECT_OVERWRITTEN_COMMANDS.add(command); + const reject = command.reject; + command.reject = function(err) { + const partialTry = tryConnection.bind(null, true); + _this.handleError(err, ttl, { + moved: /* @__PURE__ */ __name(function(slot, key) { + debug3("command %s is moved to %s", command.name, key); + targetSlot = Number(slot); + if (_this.slots[slot]) { + _this.slots[slot][0] = key; + } else { + _this.slots[slot] = [key]; + } + _this._groupsBySlot[slot] = _this._groupsIds[_this.slots[slot].join(";")]; + _this.connectionPool.findOrCreate(_this.natMapper(key)); + tryConnection(); + debug3("refreshing slot caches... (triggered by MOVED error)"); + _this.refreshSlotsCache(); + }, "moved"), + ask: /* @__PURE__ */ __name(function(slot, key) { + debug3("command %s is required to ask %s:%s", command.name, key); + const mapped = _this.natMapper(key); + _this.connectionPool.findOrCreate(mapped); + tryConnection(false, `${mapped.host}:${mapped.port}`); + }, "ask"), + tryagain: partialTry, + clusterDown: partialTry, + connectionClosed: partialTry, + maxRedirections: /* @__PURE__ */ __name(function(redirectionError) { + reject.call(command, redirectionError); + }, "maxRedirections"), + defaults: /* @__PURE__ */ __name(function() { + reject.call(command, err); + }, "defaults") + }); + }; + } + tryConnection(); + function tryConnection(random, asking) { + if (_this.status === "end") { + command.reject(new redis_errors_1.AbortError("Cluster is ended.")); + return; + } + let redis; + if (_this.status === "ready" || command.name === "cluster") { + if (node && node.redis) { + redis = node.redis; + } else if (Command_1.default.checkFlag("ENTER_SUBSCRIBER_MODE", command.name) || Command_1.default.checkFlag("EXIT_SUBSCRIBER_MODE", command.name)) { + if (_this.options.shardedSubscribers && (command.name == "ssubscribe" || command.name == "sunsubscribe")) { + const sub = _this.shardedSubscribers.getResponsibleSubscriber(targetSlot); + if (!sub) { + command.reject(new redis_errors_1.AbortError(`No sharded subscriber for slot: ${targetSlot}`)); + return; + } + let status = -1; + if (command.name == "ssubscribe") { + status = _this.shardedSubscribers.addChannels(command.getKeys()); + } + if (command.name == "sunsubscribe") { + status = _this.shardedSubscribers.removeChannels(command.getKeys()); + } + if (status !== -1) { + redis = sub.getInstance(); + } else { + command.reject(new redis_errors_1.AbortError("Possible CROSSSLOT error: All channels must hash to the same slot")); + } + } else { + redis = _this.subscriber.getInstance(); + } + if (!redis) { + command.reject(new redis_errors_1.AbortError("No subscriber for the cluster")); + return; + } + } else { + if (!random) { + if (typeof targetSlot === "number" && _this.slots[targetSlot]) { + const nodeKeys = _this.slots[targetSlot]; + if (typeof to === "function") { + const nodes = nodeKeys.map(function(key) { + return _this.connectionPool.getInstanceByKey(key); + }); + redis = to(nodes, command); + if (Array.isArray(redis)) { + redis = (0, utils_1.sample)(redis); + } + if (!redis) { + redis = nodes[0]; + } + } else { + let key; + if (to === "all") { + key = (0, utils_1.sample)(nodeKeys); + } else if (to === "slave" && nodeKeys.length > 1) { + key = (0, utils_1.sample)(nodeKeys, 1); + } else { + key = nodeKeys[0]; + } + redis = _this.connectionPool.getInstanceByKey(key); + } + } + if (asking) { + redis = _this.connectionPool.getInstanceByKey(asking); + redis.asking(); + } + } + if (!redis) { + redis = (typeof to === "function" ? null : _this.connectionPool.getSampleInstance(to)) || _this.connectionPool.getSampleInstance("all"); + } + } + if (node && !node.redis) { + node.redis = redis; + } + } + if (redis) { + redis.sendCommand(command, stream); + } else if (_this.options.enableOfflineQueue) { + _this.offlineQueue.push({ + command, + stream, + node + }); + } else { + command.reject(new Error("Cluster isn't ready and enableOfflineQueue options is false")); + } + } + __name(tryConnection, "tryConnection"); + return command.promise; + } + sscanStream(key, options) { + return this.createScanStream("sscan", { key, options }); + } + sscanBufferStream(key, options) { + return this.createScanStream("sscanBuffer", { key, options }); + } + hscanStream(key, options) { + return this.createScanStream("hscan", { key, options }); + } + hscanBufferStream(key, options) { + return this.createScanStream("hscanBuffer", { key, options }); + } + zscanStream(key, options) { + return this.createScanStream("zscan", { key, options }); + } + zscanBufferStream(key, options) { + return this.createScanStream("zscanBuffer", { key, options }); + } + /** + * @ignore + */ + handleError(error50, ttl, handlers2) { + if (typeof ttl.value === "undefined") { + ttl.value = this.options.maxRedirections; + } else { + ttl.value -= 1; + } + if (ttl.value <= 0) { + handlers2.maxRedirections(new Error("Too many Cluster redirections. Last error: " + error50)); + return; + } + const errv = error50.message.split(" "); + if (errv[0] === "MOVED") { + const timeout = this.options.retryDelayOnMoved; + if (timeout && typeof timeout === "number") { + this.delayQueue.push("moved", handlers2.moved.bind(null, errv[1], errv[2]), { timeout }); + } else { + handlers2.moved(errv[1], errv[2]); + } + } else if (errv[0] === "ASK") { + handlers2.ask(errv[1], errv[2]); + } else if (errv[0] === "TRYAGAIN") { + this.delayQueue.push("tryagain", handlers2.tryagain, { + timeout: this.options.retryDelayOnTryAgain + }); + } else if (errv[0] === "CLUSTERDOWN" && this.options.retryDelayOnClusterDown > 0) { + this.delayQueue.push("clusterdown", handlers2.connectionClosed, { + timeout: this.options.retryDelayOnClusterDown, + callback: this.refreshSlotsCache.bind(this) + }); + } else if (error50.message === utils_1.CONNECTION_CLOSED_ERROR_MSG && this.options.retryDelayOnFailover > 0 && this.status === "ready") { + this.delayQueue.push("failover", handlers2.connectionClosed, { + timeout: this.options.retryDelayOnFailover, + callback: this.refreshSlotsCache.bind(this) + }); + } else { + handlers2.defaults(); + } + } + resetOfflineQueue() { + this.offlineQueue = new Deque(); + } + clearNodesRefreshInterval() { + if (this.slotsTimer) { + clearTimeout(this.slotsTimer); + this.slotsTimer = null; + } + } + resetNodesRefreshInterval() { + if (this.slotsTimer || !this.options.slotsRefreshInterval) { + return; + } + const nextRound = /* @__PURE__ */ __name(() => { + this.slotsTimer = setTimeout(() => { + debug3('refreshing slot caches... (triggered by "slotsRefreshInterval" option)'); + this.refreshSlotsCache(() => { + nextRound(); + }); + }, this.options.slotsRefreshInterval); + }, "nextRound"); + nextRound(); + } + /** + * Change cluster instance's status + */ + setStatus(status) { + debug3("status: %s -> %s", this.status || "[empty]", status); + this.status = status; + process.nextTick(() => { + this.emit(status); + }); + } + /** + * Called when closed to check whether a reconnection should be made + */ + handleCloseEvent(reason) { + var _a2; + if (reason) { + debug3("closed because %s", reason); + } + let retryDelay; + if (!this.manuallyClosing && typeof this.options.clusterRetryStrategy === "function") { + retryDelay = this.options.clusterRetryStrategy.call(this, ++this.retryAttempts, reason); + } + if (typeof retryDelay === "number") { + this.setStatus("reconnecting"); + this.reconnectTimeout = setTimeout(() => { + this.reconnectTimeout = null; + debug3("Cluster is disconnected. Retrying after %dms", retryDelay); + this.connect().catch(function(err) { + debug3("Got error %s when reconnecting. Ignoring...", err); + }); + }, retryDelay); + } else { + if (this.options.shardedSubscribers) { + (_a2 = this.subscriberGroupEmitter) === null || _a2 === void 0 ? void 0 : _a2.removeAllListeners(); + } + this.setStatus("end"); + this.flushQueue(new Error("None of startup nodes is available")); + } + } + /** + * Flush offline queue with error. + */ + flushQueue(error50) { + let item; + while (item = this.offlineQueue.shift()) { + item.command.reject(error50); + } + } + executeOfflineCommands() { + if (this.offlineQueue.length) { + debug3("send %d commands in offline queue", this.offlineQueue.length); + const offlineQueue = this.offlineQueue; + this.resetOfflineQueue(); + let item; + while (item = offlineQueue.shift()) { + this.sendCommand(item.command, item.stream, item.node); + } + } + } + natMapper(nodeKey) { + const key = typeof nodeKey === "string" ? nodeKey : `${nodeKey.host}:${nodeKey.port}`; + let mapped = null; + if (this.options.natMap && typeof this.options.natMap === "function") { + mapped = this.options.natMap(key); + } else if (this.options.natMap && typeof this.options.natMap === "object") { + mapped = this.options.natMap[key]; + } + if (mapped) { + debug3("NAT mapping %s -> %O", key, mapped); + return Object.assign({}, mapped); + } + return typeof nodeKey === "string" ? (0, util_1.nodeKeyToRedisOptions)(nodeKey) : nodeKey; + } + getInfoFromNode(redis, callback) { + if (!redis) { + return callback(new Error("Node is disconnected")); + } + const duplicatedConnection = redis.duplicate({ + enableOfflineQueue: true, + enableReadyCheck: false, + retryStrategy: null, + connectionName: (0, util_1.getConnectionName)("refresher", this.options.redisOptions && this.options.redisOptions.connectionName) + }); + duplicatedConnection.on("error", utils_1.noop); + duplicatedConnection.cluster("SLOTS", (0, utils_1.timeout)((err, result) => { + duplicatedConnection.disconnect(); + if (err) { + debug3("error encountered running CLUSTER.SLOTS: %s", err); + return callback(err); + } + if (this.status === "disconnecting" || this.status === "close" || this.status === "end") { + debug3("ignore CLUSTER.SLOTS results (count: %d) since cluster status is %s", result.length, this.status); + callback(); + return; + } + const nodes = []; + debug3("cluster slots result count: %d", result.length); + for (let i = 0; i < result.length; ++i) { + const items = result[i]; + const slotRangeStart = items[0]; + const slotRangeEnd = items[1]; + const keys = []; + for (let j2 = 2; j2 < items.length; j2++) { + if (!items[j2][0]) { + continue; + } + const node = this.natMapper({ + host: items[j2][0], + port: items[j2][1] + }); + node.readOnly = j2 !== 2; + nodes.push(node); + keys.push(node.host + ":" + node.port); + } + debug3("cluster slots result [%d]: slots %d~%d served by %s", i, slotRangeStart, slotRangeEnd, keys); + for (let slot = slotRangeStart; slot <= slotRangeEnd; slot++) { + this.slots[slot] = keys; + } + } + this._groupsIds = /* @__PURE__ */ Object.create(null); + let j = 0; + for (let i = 0; i < 16384; i++) { + const target2 = (this.slots[i] || []).join(";"); + if (!target2.length) { + this._groupsBySlot[i] = void 0; + continue; + } + if (!this._groupsIds[target2]) { + this._groupsIds[target2] = ++j; + } + this._groupsBySlot[i] = this._groupsIds[target2]; + } + this.connectionPool.reset(nodes); + if (this.options.shardedSubscribers) { + this.shardedSubscribers.reset(this.slots, this.connectionPool.getNodes("all")).catch((err2) => { + debug3("Error while starting subscribers: %s", err2); + }); + } + callback(); + }, this.options.slotsRefreshTimeout)); + } + invokeReadyDelayedCallbacks(err) { + for (const c of this._readyDelayedCallbacks) { + process.nextTick(c, err); + } + this._readyDelayedCallbacks = []; + } + /** + * Check whether Cluster is able to process commands + */ + readyCheck(callback) { + this.cluster("INFO", (err, res) => { + if (err) { + return callback(err); + } + if (typeof res !== "string") { + return callback(); + } + let state; + const lines = res.split("\r\n"); + for (let i = 0; i < lines.length; ++i) { + const parts = lines[i].split(":"); + if (parts[0] === "cluster_state") { + state = parts[1]; + break; + } + } + if (state === "fail") { + debug3("cluster state not ok (%s)", state); + callback(null, state); + } else { + callback(); + } + }); + } + resolveSrv(hostname3) { + return new Promise((resolve, reject) => { + this.options.resolveSrv(hostname3, (err, records) => { + if (err) { + return reject(err); + } + const self2 = this, groupedRecords = (0, util_1.groupSrvRecords)(records), sortedKeys = Object.keys(groupedRecords).sort((a, b) => parseInt(a) - parseInt(b)); + function tryFirstOne(err2) { + if (!sortedKeys.length) { + return reject(err2); + } + const key = sortedKeys[0], group3 = groupedRecords[key], record2 = (0, util_1.weightSrvRecords)(group3); + if (!group3.records.length) { + sortedKeys.shift(); + } + self2.dnsLookup(record2.name).then((host) => resolve({ + host, + port: record2.port + }), tryFirstOne); + } + __name(tryFirstOne, "tryFirstOne"); + tryFirstOne(); + }); + }); + } + dnsLookup(hostname3) { + return new Promise((resolve, reject) => { + this.options.dnsLookup(hostname3, (err, address) => { + if (err) { + debug3("failed to resolve hostname %s to IP: %s", hostname3, err.message); + reject(err); + } else { + debug3("resolved hostname %s to IP %s", hostname3, address); + resolve(address); + } + }); + }); + } + /** + * Normalize startup nodes, and resolving hostnames to IPs. + * + * This process happens every time when #connect() is called since + * #startupNodes and DNS records may chanage. + */ + async resolveStartupNodeHostnames() { + if (!Array.isArray(this.startupNodes) || this.startupNodes.length === 0) { + throw new Error("`startupNodes` should contain at least one node."); + } + const startupNodes = (0, util_1.normalizeNodeOptions)(this.startupNodes); + const hostnames = (0, util_1.getUniqueHostnamesFromOptions)(startupNodes); + if (hostnames.length === 0) { + return startupNodes; + } + const configs = await Promise.all(hostnames.map((this.options.useSRVRecords ? this.resolveSrv : this.dnsLookup).bind(this))); + const hostnameToConfig = (0, utils_1.zipMap)(hostnames, configs); + return startupNodes.map((node) => { + const config3 = hostnameToConfig.get(node.host); + if (!config3) { + return node; + } + if (this.options.useSRVRecords) { + return Object.assign({}, node, config3); + } + return Object.assign({}, node, { host: config3 }); + }); + } + createScanStream(command, { key, options = {} }) { + return new ScanStream_1.default({ + objectMode: true, + key, + redis: this, + command, + ...options + }); + } + createShardedSubscriberGroup() { + this.subscriberGroupEmitter = new events_1.EventEmitter(); + this.shardedSubscribers = new ClusterSubscriberGroup_1.default(this.subscriberGroupEmitter); + const refreshSlotsCacheCallback = /* @__PURE__ */ __name((err) => { + if (err instanceof ClusterAllFailedError_1.default) { + this.disconnect(true); + } + }, "refreshSlotsCacheCallback"); + this.subscriberGroupEmitter.on("-node", (redis, nodeKey) => { + this.emit("-node", redis, nodeKey); + this.refreshSlotsCache(refreshSlotsCacheCallback); + }); + this.subscriberGroupEmitter.on("subscriberConnectFailed", ({ delay: delay2, error: error50 }) => { + this.emit("error", error50); + setTimeout(() => { + this.refreshSlotsCache(refreshSlotsCacheCallback); + }, delay2); + }); + this.subscriberGroupEmitter.on("moved", () => { + this.refreshSlotsCache(refreshSlotsCacheCallback); + }); + this.subscriberGroupEmitter.on("-subscriber", () => { + this.emit("-subscriber"); + }); + this.subscriberGroupEmitter.on("+subscriber", () => { + this.emit("+subscriber"); + }); + this.subscriberGroupEmitter.on("nodeError", (error50, nodeKey) => { + this.emit("nodeError", error50, nodeKey); + }); + this.subscriberGroupEmitter.on("subscribersReady", () => { + this.emit("subscribersReady"); + }); + for (const event of ["smessage", "smessageBuffer"]) { + this.subscriberGroupEmitter.on(event, (arg1, arg2, arg3) => { + this.emit(event, arg1, arg2, arg3); + }); + } + } + }; + (0, applyMixin_1.default)(Cluster2, events_1.EventEmitter); + (0, transaction_1.addTransactionSupport)(Cluster2.prototype); + exports.default = Cluster2; + } +}); + +// node-built-in-modules:tls +import libDefault10 from "tls"; +var require_tls = __commonJS({ + "node-built-in-modules:tls"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module2.exports = libDefault10; + } +}); + +// ../../node_modules/ioredis/built/connectors/AbstractConnector.js +var require_AbstractConnector = __commonJS({ + "../../node_modules/ioredis/built/connectors/AbstractConnector.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var utils_1 = require_utils2(); + var debug3 = (0, utils_1.Debug)("AbstractConnector"); + var AbstractConnector = class { + static { + __name(this, "AbstractConnector"); + } + constructor(disconnectTimeout) { + this.connecting = false; + this.disconnectTimeout = disconnectTimeout; + } + check(info3) { + return true; + } + disconnect() { + this.connecting = false; + if (this.stream) { + const stream = this.stream; + const timeout = setTimeout(() => { + debug3("stream %s:%s still open, destroying it", stream.remoteAddress, stream.remotePort); + stream.destroy(); + }, this.disconnectTimeout); + stream.on("close", () => clearTimeout(timeout)); + stream.end(); + } + } + }; + exports.default = AbstractConnector; + } +}); + +// ../../node_modules/ioredis/built/connectors/StandaloneConnector.js +var require_StandaloneConnector = __commonJS({ + "../../node_modules/ioredis/built/connectors/StandaloneConnector.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var net_1 = require_net(); + var tls_1 = require_tls(); + var utils_1 = require_utils2(); + var AbstractConnector_1 = require_AbstractConnector(); + var StandaloneConnector = class extends AbstractConnector_1.default { + static { + __name(this, "StandaloneConnector"); + } + constructor(options) { + super(options.disconnectTimeout); + this.options = options; + } + connect(_) { + const { options } = this; + this.connecting = true; + let connectionOptions; + if ("path" in options && options.path) { + connectionOptions = { + path: options.path + }; + } else { + connectionOptions = {}; + if ("port" in options && options.port != null) { + connectionOptions.port = options.port; + } + if ("host" in options && options.host != null) { + connectionOptions.host = options.host; + } + if ("family" in options && options.family != null) { + connectionOptions.family = options.family; + } + } + if (options.tls) { + Object.assign(connectionOptions, options.tls); + } + return new Promise((resolve, reject) => { + process.nextTick(() => { + if (!this.connecting) { + reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + return; + } + try { + if (options.tls) { + this.stream = (0, tls_1.connect)(connectionOptions); + } else { + this.stream = (0, net_1.createConnection)(connectionOptions); + } + } catch (err) { + reject(err); + return; + } + this.stream.once("error", (err) => { + this.firstError = err; + }); + resolve(this.stream); + }); + }); + } + }; + exports.default = StandaloneConnector; + } +}); + +// ../../node_modules/ioredis/built/connectors/SentinelConnector/SentinelIterator.js +var require_SentinelIterator = __commonJS({ + "../../node_modules/ioredis/built/connectors/SentinelConnector/SentinelIterator.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + function isSentinelEql(a, b) { + return (a.host || "127.0.0.1") === (b.host || "127.0.0.1") && (a.port || 26379) === (b.port || 26379); + } + __name(isSentinelEql, "isSentinelEql"); + var SentinelIterator = class { + static { + __name(this, "SentinelIterator"); + } + constructor(sentinels) { + this.cursor = 0; + this.sentinels = sentinels.slice(0); + } + next() { + const done = this.cursor >= this.sentinels.length; + return { done, value: done ? void 0 : this.sentinels[this.cursor++] }; + } + reset(moveCurrentEndpointToFirst) { + if (moveCurrentEndpointToFirst && this.sentinels.length > 1 && this.cursor !== 1) { + this.sentinels.unshift(...this.sentinels.splice(this.cursor - 1)); + } + this.cursor = 0; + } + add(sentinel) { + for (let i = 0; i < this.sentinels.length; i++) { + if (isSentinelEql(sentinel, this.sentinels[i])) { + return false; + } + } + this.sentinels.push(sentinel); + return true; + } + toString() { + return `${JSON.stringify(this.sentinels)} @${this.cursor}`; + } + }; + exports.default = SentinelIterator; + } +}); + +// ../../node_modules/ioredis/built/connectors/SentinelConnector/FailoverDetector.js +var require_FailoverDetector = __commonJS({ + "../../node_modules/ioredis/built/connectors/SentinelConnector/FailoverDetector.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.FailoverDetector = void 0; + var utils_1 = require_utils2(); + var debug3 = (0, utils_1.Debug)("FailoverDetector"); + var CHANNEL_NAME = "+switch-master"; + var FailoverDetector = class { + static { + __name(this, "FailoverDetector"); + } + // sentinels can't be used for regular commands after this + constructor(connector, sentinels) { + this.isDisconnected = false; + this.connector = connector; + this.sentinels = sentinels; + } + cleanup() { + this.isDisconnected = true; + for (const sentinel of this.sentinels) { + sentinel.client.disconnect(); + } + } + async subscribe() { + debug3("Starting FailoverDetector"); + const promises = []; + for (const sentinel of this.sentinels) { + const promise2 = sentinel.client.subscribe(CHANNEL_NAME).catch((err) => { + debug3("Failed to subscribe to failover messages on sentinel %s:%s (%s)", sentinel.address.host || "127.0.0.1", sentinel.address.port || 26739, err.message); + }); + promises.push(promise2); + sentinel.client.on("message", (channel2) => { + if (!this.isDisconnected && channel2 === CHANNEL_NAME) { + this.disconnect(); + } + }); + } + await Promise.all(promises); + } + disconnect() { + this.isDisconnected = true; + debug3("Failover detected, disconnecting"); + this.connector.disconnect(); + } + }; + exports.FailoverDetector = FailoverDetector; + } +}); + +// ../../node_modules/ioredis/built/connectors/SentinelConnector/index.js +var require_SentinelConnector = __commonJS({ + "../../node_modules/ioredis/built/connectors/SentinelConnector/index.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SentinelIterator = void 0; + var net_1 = require_net(); + var utils_1 = require_utils2(); + var tls_1 = require_tls(); + var SentinelIterator_1 = require_SentinelIterator(); + exports.SentinelIterator = SentinelIterator_1.default; + var AbstractConnector_1 = require_AbstractConnector(); + var Redis_1 = require_Redis(); + var FailoverDetector_1 = require_FailoverDetector(); + var debug3 = (0, utils_1.Debug)("SentinelConnector"); + var SentinelConnector = class extends AbstractConnector_1.default { + static { + __name(this, "SentinelConnector"); + } + constructor(options) { + super(options.disconnectTimeout); + this.options = options; + this.emitter = null; + this.failoverDetector = null; + if (!this.options.sentinels.length) { + throw new Error("Requires at least one sentinel to connect to."); + } + if (!this.options.name) { + throw new Error("Requires the name of master."); + } + this.sentinelIterator = new SentinelIterator_1.default(this.options.sentinels); + } + check(info3) { + const roleMatches = !info3.role || this.options.role === info3.role; + if (!roleMatches) { + debug3("role invalid, expected %s, but got %s", this.options.role, info3.role); + this.sentinelIterator.next(); + this.sentinelIterator.next(); + this.sentinelIterator.reset(true); + } + return roleMatches; + } + disconnect() { + super.disconnect(); + if (this.failoverDetector) { + this.failoverDetector.cleanup(); + } + } + connect(eventEmitter) { + this.connecting = true; + this.retryAttempts = 0; + let lastError; + const connectToNext = /* @__PURE__ */ __name(async () => { + const endpoint = this.sentinelIterator.next(); + if (endpoint.done) { + this.sentinelIterator.reset(false); + const retryDelay = typeof this.options.sentinelRetryStrategy === "function" ? this.options.sentinelRetryStrategy(++this.retryAttempts) : null; + let errorMsg = typeof retryDelay !== "number" ? "All sentinels are unreachable and retry is disabled." : `All sentinels are unreachable. Retrying from scratch after ${retryDelay}ms.`; + if (lastError) { + errorMsg += ` Last error: ${lastError.message}`; + } + debug3(errorMsg); + const error50 = new Error(errorMsg); + if (typeof retryDelay === "number") { + eventEmitter("error", error50); + await new Promise((resolve) => setTimeout(resolve, retryDelay)); + return connectToNext(); + } else { + throw error50; + } + } + let resolved = null; + let err = null; + try { + resolved = await this.resolve(endpoint.value); + } catch (error50) { + err = error50; + } + if (!this.connecting) { + throw new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG); + } + const endpointAddress = endpoint.value.host + ":" + endpoint.value.port; + if (resolved) { + debug3("resolved: %s:%s from sentinel %s", resolved.host, resolved.port, endpointAddress); + if (this.options.enableTLSForSentinelMode && this.options.tls) { + Object.assign(resolved, this.options.tls); + this.stream = (0, tls_1.connect)(resolved); + this.stream.once("secureConnect", this.initFailoverDetector.bind(this)); + } else { + this.stream = (0, net_1.createConnection)(resolved); + this.stream.once("connect", this.initFailoverDetector.bind(this)); + } + this.stream.once("error", (err2) => { + this.firstError = err2; + }); + return this.stream; + } else { + const errorMsg = err ? "failed to connect to sentinel " + endpointAddress + " because " + err.message : "connected to sentinel " + endpointAddress + " successfully, but got an invalid reply: " + resolved; + debug3(errorMsg); + eventEmitter("sentinelError", new Error(errorMsg)); + if (err) { + lastError = err; + } + return connectToNext(); + } + }, "connectToNext"); + return connectToNext(); + } + async updateSentinels(client) { + if (!this.options.updateSentinels) { + return; + } + const result = await client.sentinel("sentinels", this.options.name); + if (!Array.isArray(result)) { + return; + } + result.map(utils_1.packObject).forEach((sentinel) => { + const flags = sentinel.flags ? sentinel.flags.split(",") : []; + if (flags.indexOf("disconnected") === -1 && sentinel.ip && sentinel.port) { + const endpoint = this.sentinelNatResolve(addressResponseToAddress(sentinel)); + if (this.sentinelIterator.add(endpoint)) { + debug3("adding sentinel %s:%s", endpoint.host, endpoint.port); + } + } + }); + debug3("Updated internal sentinels: %s", this.sentinelIterator); + } + async resolveMaster(client) { + const result = await client.sentinel("get-master-addr-by-name", this.options.name); + await this.updateSentinels(client); + return this.sentinelNatResolve(Array.isArray(result) ? { host: result[0], port: Number(result[1]) } : null); + } + async resolveSlave(client) { + const result = await client.sentinel("slaves", this.options.name); + if (!Array.isArray(result)) { + return null; + } + const availableSlaves = result.map(utils_1.packObject).filter((slave) => slave.flags && !slave.flags.match(/(disconnected|s_down|o_down)/)); + return this.sentinelNatResolve(selectPreferredSentinel(availableSlaves, this.options.preferredSlaves)); + } + sentinelNatResolve(item) { + if (!item || !this.options.natMap) + return item; + const key = `${item.host}:${item.port}`; + let result = item; + if (typeof this.options.natMap === "function") { + result = this.options.natMap(key) || item; + } else if (typeof this.options.natMap === "object") { + result = this.options.natMap[key] || item; + } + return result; + } + connectToSentinel(endpoint, options) { + const redis = new Redis_1.default({ + port: endpoint.port || 26379, + host: endpoint.host, + username: this.options.sentinelUsername || null, + password: this.options.sentinelPassword || null, + family: endpoint.family || // @ts-expect-error + ("path" in this.options && this.options.path ? void 0 : ( + // @ts-expect-error + this.options.family + )), + tls: this.options.sentinelTLS, + retryStrategy: null, + enableReadyCheck: false, + connectTimeout: this.options.connectTimeout, + commandTimeout: this.options.sentinelCommandTimeout, + ...options + }); + return redis; + } + async resolve(endpoint) { + const client = this.connectToSentinel(endpoint); + client.on("error", noop3); + try { + if (this.options.role === "slave") { + return await this.resolveSlave(client); + } else { + return await this.resolveMaster(client); + } + } finally { + client.disconnect(); + } + } + async initFailoverDetector() { + var _a2; + if (!this.options.failoverDetector) { + return; + } + this.sentinelIterator.reset(true); + const sentinels = []; + while (sentinels.length < this.options.sentinelMaxConnections) { + const { done, value } = this.sentinelIterator.next(); + if (done) { + break; + } + const client = this.connectToSentinel(value, { + lazyConnect: true, + retryStrategy: this.options.sentinelReconnectStrategy + }); + client.on("reconnecting", () => { + var _a3; + (_a3 = this.emitter) === null || _a3 === void 0 ? void 0 : _a3.emit("sentinelReconnecting"); + }); + sentinels.push({ address: value, client }); + } + this.sentinelIterator.reset(false); + if (this.failoverDetector) { + this.failoverDetector.cleanup(); + } + this.failoverDetector = new FailoverDetector_1.FailoverDetector(this, sentinels); + await this.failoverDetector.subscribe(); + (_a2 = this.emitter) === null || _a2 === void 0 ? void 0 : _a2.emit("failoverSubscribed"); + } + }; + exports.default = SentinelConnector; + function selectPreferredSentinel(availableSlaves, preferredSlaves) { + if (availableSlaves.length === 0) { + return null; + } + let selectedSlave; + if (typeof preferredSlaves === "function") { + selectedSlave = preferredSlaves(availableSlaves); + } else if (preferredSlaves !== null && typeof preferredSlaves === "object") { + const preferredSlavesArray = Array.isArray(preferredSlaves) ? preferredSlaves : [preferredSlaves]; + preferredSlavesArray.sort((a, b) => { + if (!a.prio) { + a.prio = 1; + } + if (!b.prio) { + b.prio = 1; + } + if (a.prio < b.prio) { + return -1; + } + if (a.prio > b.prio) { + return 1; + } + return 0; + }); + for (let p = 0; p < preferredSlavesArray.length; p++) { + for (let a = 0; a < availableSlaves.length; a++) { + const slave = availableSlaves[a]; + if (slave.ip === preferredSlavesArray[p].ip) { + if (slave.port === preferredSlavesArray[p].port) { + selectedSlave = slave; + break; + } + } + } + if (selectedSlave) { + break; + } + } + } + if (!selectedSlave) { + selectedSlave = (0, utils_1.sample)(availableSlaves); + } + return addressResponseToAddress(selectedSlave); + } + __name(selectPreferredSentinel, "selectPreferredSentinel"); + function addressResponseToAddress(input) { + return { host: input.ip, port: Number(input.port) }; + } + __name(addressResponseToAddress, "addressResponseToAddress"); + function noop3() { + } + __name(noop3, "noop"); + } +}); + +// ../../node_modules/ioredis/built/connectors/index.js +var require_connectors = __commonJS({ + "../../node_modules/ioredis/built/connectors/index.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SentinelConnector = exports.StandaloneConnector = void 0; + var StandaloneConnector_1 = require_StandaloneConnector(); + exports.StandaloneConnector = StandaloneConnector_1.default; + var SentinelConnector_1 = require_SentinelConnector(); + exports.SentinelConnector = SentinelConnector_1.default; + } +}); + +// ../../node_modules/ioredis/built/errors/MaxRetriesPerRequestError.js +var require_MaxRetriesPerRequestError = __commonJS({ + "../../node_modules/ioredis/built/errors/MaxRetriesPerRequestError.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var redis_errors_1 = require_redis_errors(); + var MaxRetriesPerRequestError = class extends redis_errors_1.AbortError { + static { + __name(this, "MaxRetriesPerRequestError"); + } + constructor(maxRetriesPerRequest) { + const message2 = `Reached the max retries per request limit (which is ${maxRetriesPerRequest}). Refer to "maxRetriesPerRequest" option for details.`; + super(message2); + Error.captureStackTrace(this, this.constructor); + } + get name() { + return this.constructor.name; + } + }; + exports.default = MaxRetriesPerRequestError; + } +}); + +// ../../node_modules/ioredis/built/errors/index.js +var require_errors = __commonJS({ + "../../node_modules/ioredis/built/errors/index.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.MaxRetriesPerRequestError = void 0; + var MaxRetriesPerRequestError_1 = require_MaxRetriesPerRequestError(); + exports.MaxRetriesPerRequestError = MaxRetriesPerRequestError_1.default; + } +}); + +// node-built-in-modules:buffer +import libDefault11 from "buffer"; +var require_buffer = __commonJS({ + "node-built-in-modules:buffer"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module2.exports = libDefault11; + } +}); + +// node-built-in-modules:string_decoder +import libDefault12 from "string_decoder"; +var require_string_decoder = __commonJS({ + "node-built-in-modules:string_decoder"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module2.exports = libDefault12; + } +}); + +// ../../node_modules/redis-parser/lib/parser.js +var require_parser = __commonJS({ + "../../node_modules/redis-parser/lib/parser.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var Buffer2 = require_buffer().Buffer; + var StringDecoder = require_string_decoder().StringDecoder; + var decoder3 = new StringDecoder(); + var errors2 = require_redis_errors(); + var ReplyError = errors2.ReplyError; + var ParserError = errors2.ParserError; + var bufferPool = Buffer2.allocUnsafe(32 * 1024); + var bufferOffset = 0; + var interval = null; + var counter = 0; + var notDecreased = 0; + function parseSimpleNumbers(parser) { + const length = parser.buffer.length - 1; + var offset = parser.offset; + var number4 = 0; + var sign2 = 1; + if (parser.buffer[offset] === 45) { + sign2 = -1; + offset++; + } + while (offset < length) { + const c1 = parser.buffer[offset++]; + if (c1 === 13) { + parser.offset = offset + 1; + return sign2 * number4; + } + number4 = number4 * 10 + (c1 - 48); + } + } + __name(parseSimpleNumbers, "parseSimpleNumbers"); + function parseStringNumbers(parser) { + const length = parser.buffer.length - 1; + var offset = parser.offset; + var number4 = 0; + var res = ""; + if (parser.buffer[offset] === 45) { + res += "-"; + offset++; + } + while (offset < length) { + var c1 = parser.buffer[offset++]; + if (c1 === 13) { + parser.offset = offset + 1; + if (number4 !== 0) { + res += number4; + } + return res; + } else if (number4 > 429496728) { + res += number4 * 10 + (c1 - 48); + number4 = 0; + } else if (c1 === 48 && number4 === 0) { + res += 0; + } else { + number4 = number4 * 10 + (c1 - 48); + } + } + } + __name(parseStringNumbers, "parseStringNumbers"); + function parseSimpleString(parser) { + const start = parser.offset; + const buffer = parser.buffer; + const length = buffer.length - 1; + var offset = start; + while (offset < length) { + if (buffer[offset++] === 13) { + parser.offset = offset + 1; + if (parser.optionReturnBuffers === true) { + return parser.buffer.slice(start, offset - 1); + } + return parser.buffer.toString("utf8", start, offset - 1); + } + } + } + __name(parseSimpleString, "parseSimpleString"); + function parseLength(parser) { + const length = parser.buffer.length - 1; + var offset = parser.offset; + var number4 = 0; + while (offset < length) { + const c1 = parser.buffer[offset++]; + if (c1 === 13) { + parser.offset = offset + 1; + return number4; + } + number4 = number4 * 10 + (c1 - 48); + } + } + __name(parseLength, "parseLength"); + function parseInteger(parser) { + if (parser.optionStringNumbers === true) { + return parseStringNumbers(parser); + } + return parseSimpleNumbers(parser); + } + __name(parseInteger, "parseInteger"); + function parseBulkString(parser) { + const length = parseLength(parser); + if (length === void 0) { + return; + } + if (length < 0) { + return null; + } + const offset = parser.offset + length; + if (offset + 2 > parser.buffer.length) { + parser.bigStrSize = offset + 2; + parser.totalChunkSize = parser.buffer.length; + parser.bufferCache.push(parser.buffer); + return; + } + const start = parser.offset; + parser.offset = offset + 2; + if (parser.optionReturnBuffers === true) { + return parser.buffer.slice(start, offset); + } + return parser.buffer.toString("utf8", start, offset); + } + __name(parseBulkString, "parseBulkString"); + function parseError(parser) { + var string4 = parseSimpleString(parser); + if (string4 !== void 0) { + if (parser.optionReturnBuffers === true) { + string4 = string4.toString(); + } + return new ReplyError(string4); + } + } + __name(parseError, "parseError"); + function handleError(parser, type) { + const err = new ParserError( + "Protocol error, got " + JSON.stringify(String.fromCharCode(type)) + " as reply type byte", + JSON.stringify(parser.buffer), + parser.offset + ); + parser.buffer = null; + parser.returnFatalError(err); + } + __name(handleError, "handleError"); + function parseArray(parser) { + const length = parseLength(parser); + if (length === void 0) { + return; + } + if (length < 0) { + return null; + } + const responses = new Array(length); + return parseArrayElements(parser, responses, 0); + } + __name(parseArray, "parseArray"); + function pushArrayCache(parser, array2, pos) { + parser.arrayCache.push(array2); + parser.arrayPos.push(pos); + } + __name(pushArrayCache, "pushArrayCache"); + function parseArrayChunks(parser) { + const tmp = parser.arrayCache.pop(); + var pos = parser.arrayPos.pop(); + if (parser.arrayCache.length) { + const res = parseArrayChunks(parser); + if (res === void 0) { + pushArrayCache(parser, tmp, pos); + return; + } + tmp[pos++] = res; + } + return parseArrayElements(parser, tmp, pos); + } + __name(parseArrayChunks, "parseArrayChunks"); + function parseArrayElements(parser, responses, i) { + const bufferLength = parser.buffer.length; + while (i < responses.length) { + const offset = parser.offset; + if (parser.offset >= bufferLength) { + pushArrayCache(parser, responses, i); + return; + } + const response = parseType(parser, parser.buffer[parser.offset++]); + if (response === void 0) { + if (!(parser.arrayCache.length || parser.bufferCache.length)) { + parser.offset = offset; + } + pushArrayCache(parser, responses, i); + return; + } + responses[i] = response; + i++; + } + return responses; + } + __name(parseArrayElements, "parseArrayElements"); + function parseType(parser, type) { + switch (type) { + case 36: + return parseBulkString(parser); + case 43: + return parseSimpleString(parser); + case 42: + return parseArray(parser); + case 58: + return parseInteger(parser); + case 45: + return parseError(parser); + default: + return handleError(parser, type); + } + } + __name(parseType, "parseType"); + function decreaseBufferPool() { + if (bufferPool.length > 50 * 1024) { + if (counter === 1 || notDecreased > counter * 2) { + const minSliceLen = Math.floor(bufferPool.length / 10); + const sliceLength = minSliceLen < bufferOffset ? bufferOffset : minSliceLen; + bufferOffset = 0; + bufferPool = bufferPool.slice(sliceLength, bufferPool.length); + } else { + notDecreased++; + counter--; + } + } else { + clearInterval(interval); + counter = 0; + notDecreased = 0; + interval = null; + } + } + __name(decreaseBufferPool, "decreaseBufferPool"); + function resizeBuffer(length) { + if (bufferPool.length < length + bufferOffset) { + const multiplier = length > 1024 * 1024 * 75 ? 2 : 3; + if (bufferOffset > 1024 * 1024 * 111) { + bufferOffset = 1024 * 1024 * 50; + } + bufferPool = Buffer2.allocUnsafe(length * multiplier + bufferOffset); + bufferOffset = 0; + counter++; + if (interval === null) { + interval = setInterval(decreaseBufferPool, 50); + } + } + } + __name(resizeBuffer, "resizeBuffer"); + function concatBulkString(parser) { + const list = parser.bufferCache; + const oldOffset = parser.offset; + var chunks = list.length; + var offset = parser.bigStrSize - parser.totalChunkSize; + parser.offset = offset; + if (offset <= 2) { + if (chunks === 2) { + return list[0].toString("utf8", oldOffset, list[0].length + offset - 2); + } + chunks--; + offset = list[list.length - 2].length + offset; + } + var res = decoder3.write(list[0].slice(oldOffset)); + for (var i = 1; i < chunks - 1; i++) { + res += decoder3.write(list[i]); + } + res += decoder3.end(list[i].slice(0, offset - 2)); + return res; + } + __name(concatBulkString, "concatBulkString"); + function concatBulkBuffer(parser) { + const list = parser.bufferCache; + const oldOffset = parser.offset; + const length = parser.bigStrSize - oldOffset - 2; + var chunks = list.length; + var offset = parser.bigStrSize - parser.totalChunkSize; + parser.offset = offset; + if (offset <= 2) { + if (chunks === 2) { + return list[0].slice(oldOffset, list[0].length + offset - 2); + } + chunks--; + offset = list[list.length - 2].length + offset; + } + resizeBuffer(length); + const start = bufferOffset; + list[0].copy(bufferPool, start, oldOffset, list[0].length); + bufferOffset += list[0].length - oldOffset; + for (var i = 1; i < chunks - 1; i++) { + list[i].copy(bufferPool, bufferOffset); + bufferOffset += list[i].length; + } + list[i].copy(bufferPool, bufferOffset, 0, offset - 2); + bufferOffset += offset - 2; + return bufferPool.slice(start, bufferOffset); + } + __name(concatBulkBuffer, "concatBulkBuffer"); + var JavascriptRedisParser = class { + static { + __name(this, "JavascriptRedisParser"); + } + /** + * Javascript Redis Parser constructor + * @param {{returnError: Function, returnReply: Function, returnFatalError?: Function, returnBuffers: boolean, stringNumbers: boolean }} options + * @constructor + */ + constructor(options) { + if (!options) { + throw new TypeError("Options are mandatory."); + } + if (typeof options.returnError !== "function" || typeof options.returnReply !== "function") { + throw new TypeError("The returnReply and returnError options have to be functions."); + } + this.setReturnBuffers(!!options.returnBuffers); + this.setStringNumbers(!!options.stringNumbers); + this.returnError = options.returnError; + this.returnFatalError = options.returnFatalError || options.returnError; + this.returnReply = options.returnReply; + this.reset(); + } + /** + * Reset the parser values to the initial state + * + * @returns {undefined} + */ + reset() { + this.offset = 0; + this.buffer = null; + this.bigStrSize = 0; + this.totalChunkSize = 0; + this.bufferCache = []; + this.arrayCache = []; + this.arrayPos = []; + } + /** + * Set the returnBuffers option + * + * @param {boolean} returnBuffers + * @returns {undefined} + */ + setReturnBuffers(returnBuffers) { + if (typeof returnBuffers !== "boolean") { + throw new TypeError("The returnBuffers argument has to be a boolean"); + } + this.optionReturnBuffers = returnBuffers; + } + /** + * Set the stringNumbers option + * + * @param {boolean} stringNumbers + * @returns {undefined} + */ + setStringNumbers(stringNumbers) { + if (typeof stringNumbers !== "boolean") { + throw new TypeError("The stringNumbers argument has to be a boolean"); + } + this.optionStringNumbers = stringNumbers; + } + /** + * Parse the redis buffer + * @param {Buffer} buffer + * @returns {undefined} + */ + execute(buffer) { + if (this.buffer === null) { + this.buffer = buffer; + this.offset = 0; + } else if (this.bigStrSize === 0) { + const oldLength = this.buffer.length; + const remainingLength = oldLength - this.offset; + const newBuffer = Buffer2.allocUnsafe(remainingLength + buffer.length); + this.buffer.copy(newBuffer, 0, this.offset, oldLength); + buffer.copy(newBuffer, remainingLength, 0, buffer.length); + this.buffer = newBuffer; + this.offset = 0; + if (this.arrayCache.length) { + const arr = parseArrayChunks(this); + if (arr === void 0) { + return; + } + this.returnReply(arr); + } + } else if (this.totalChunkSize + buffer.length >= this.bigStrSize) { + this.bufferCache.push(buffer); + var tmp = this.optionReturnBuffers ? concatBulkBuffer(this) : concatBulkString(this); + this.bigStrSize = 0; + this.bufferCache = []; + this.buffer = buffer; + if (this.arrayCache.length) { + this.arrayCache[0][this.arrayPos[0]++] = tmp; + tmp = parseArrayChunks(this); + if (tmp === void 0) { + return; + } + } + this.returnReply(tmp); + } else { + this.bufferCache.push(buffer); + this.totalChunkSize += buffer.length; + return; + } + while (this.offset < this.buffer.length) { + const offset = this.offset; + const type = this.buffer[this.offset++]; + const response = parseType(this, type); + if (response === void 0) { + if (!(this.arrayCache.length || this.bufferCache.length)) { + this.offset = offset; + } + return; + } + if (type === 45) { + this.returnError(response); + } else { + this.returnReply(response); + } + } + this.buffer = null; + } + }; + module2.exports = JavascriptRedisParser; + } +}); + +// ../../node_modules/redis-parser/index.js +var require_redis_parser = __commonJS({ + "../../node_modules/redis-parser/index.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module2.exports = require_parser(); + } +}); + +// ../../node_modules/ioredis/built/SubscriptionSet.js +var require_SubscriptionSet = __commonJS({ + "../../node_modules/ioredis/built/SubscriptionSet.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var SubscriptionSet = class { + static { + __name(this, "SubscriptionSet"); + } + constructor() { + this.set = { + subscribe: {}, + psubscribe: {}, + ssubscribe: {} + }; + } + add(set2, channel2) { + this.set[mapSet(set2)][channel2] = true; + } + del(set2, channel2) { + delete this.set[mapSet(set2)][channel2]; + } + channels(set2) { + return Object.keys(this.set[mapSet(set2)]); + } + isEmpty() { + return this.channels("subscribe").length === 0 && this.channels("psubscribe").length === 0 && this.channels("ssubscribe").length === 0; + } + }; + exports.default = SubscriptionSet; + function mapSet(set2) { + if (set2 === "unsubscribe") { + return "subscribe"; + } + if (set2 === "punsubscribe") { + return "psubscribe"; + } + if (set2 === "sunsubscribe") { + return "ssubscribe"; + } + return set2; + } + __name(mapSet, "mapSet"); + } +}); + +// ../../node_modules/ioredis/built/DataHandler.js +var require_DataHandler = __commonJS({ + "../../node_modules/ioredis/built/DataHandler.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var Command_1 = require_Command(); + var utils_1 = require_utils2(); + var RedisParser = require_redis_parser(); + var SubscriptionSet_1 = require_SubscriptionSet(); + var debug3 = (0, utils_1.Debug)("dataHandler"); + var DataHandler = class { + static { + __name(this, "DataHandler"); + } + constructor(redis, parserOptions) { + this.redis = redis; + const parser = new RedisParser({ + stringNumbers: parserOptions.stringNumbers, + returnBuffers: true, + returnError: /* @__PURE__ */ __name((err) => { + this.returnError(err); + }, "returnError"), + returnFatalError: /* @__PURE__ */ __name((err) => { + this.returnFatalError(err); + }, "returnFatalError"), + returnReply: /* @__PURE__ */ __name((reply) => { + this.returnReply(reply); + }, "returnReply") + }); + redis.stream.prependListener("data", (data) => { + parser.execute(data); + }); + redis.stream.resume(); + } + returnFatalError(err) { + err.message += ". Please report this."; + this.redis.recoverFromFatalError(err, err, { offlineQueue: false }); + } + returnError(err) { + const item = this.shiftCommand(err); + if (!item) { + return; + } + err.command = { + name: item.command.name, + args: item.command.args + }; + if (item.command.name == "ssubscribe" && err.message.includes("MOVED")) { + this.redis.emit("moved"); + return; + } + this.redis.handleReconnection(err, item); + } + returnReply(reply) { + if (this.handleMonitorReply(reply)) { + return; + } + if (this.handleSubscriberReply(reply)) { + return; + } + const item = this.shiftCommand(reply); + if (!item) { + return; + } + if (Command_1.default.checkFlag("ENTER_SUBSCRIBER_MODE", item.command.name)) { + this.redis.condition.subscriber = new SubscriptionSet_1.default(); + this.redis.condition.subscriber.add(item.command.name, reply[1].toString()); + if (!fillSubCommand(item.command, reply[2])) { + this.redis.commandQueue.unshift(item); + } + } else if (Command_1.default.checkFlag("EXIT_SUBSCRIBER_MODE", item.command.name)) { + if (!fillUnsubCommand(item.command, reply[2])) { + this.redis.commandQueue.unshift(item); + } + } else { + item.command.resolve(reply); + } + } + handleSubscriberReply(reply) { + if (!this.redis.condition.subscriber) { + return false; + } + const replyType = Array.isArray(reply) ? reply[0].toString() : null; + debug3('receive reply "%s" in subscriber mode', replyType); + switch (replyType) { + case "message": + if (this.redis.listeners("message").length > 0) { + this.redis.emit("message", reply[1].toString(), reply[2] ? reply[2].toString() : ""); + } + this.redis.emit("messageBuffer", reply[1], reply[2]); + break; + case "pmessage": { + const pattern = reply[1].toString(); + if (this.redis.listeners("pmessage").length > 0) { + this.redis.emit("pmessage", pattern, reply[2].toString(), reply[3].toString()); + } + this.redis.emit("pmessageBuffer", pattern, reply[2], reply[3]); + break; + } + case "smessage": { + if (this.redis.listeners("smessage").length > 0) { + this.redis.emit("smessage", reply[1].toString(), reply[2] ? reply[2].toString() : ""); + } + this.redis.emit("smessageBuffer", reply[1], reply[2]); + break; + } + case "ssubscribe": + case "subscribe": + case "psubscribe": { + const channel2 = reply[1].toString(); + this.redis.condition.subscriber.add(replyType, channel2); + const item = this.shiftCommand(reply); + if (!item) { + return; + } + if (!fillSubCommand(item.command, reply[2])) { + this.redis.commandQueue.unshift(item); + } + break; + } + case "sunsubscribe": + case "unsubscribe": + case "punsubscribe": { + const channel2 = reply[1] ? reply[1].toString() : null; + if (channel2) { + this.redis.condition.subscriber.del(replyType, channel2); + } + const count4 = reply[2]; + if (Number(count4) === 0) { + this.redis.condition.subscriber = false; + } + const item = this.shiftCommand(reply); + if (!item) { + return; + } + if (!fillUnsubCommand(item.command, count4)) { + this.redis.commandQueue.unshift(item); + } + break; + } + default: { + const item = this.shiftCommand(reply); + if (!item) { + return; + } + item.command.resolve(reply); + } + } + return true; + } + handleMonitorReply(reply) { + if (this.redis.status !== "monitoring") { + return false; + } + const replyStr = reply.toString(); + if (replyStr === "OK") { + return false; + } + const len = replyStr.indexOf(" "); + const timestamp = replyStr.slice(0, len); + const argIndex = replyStr.indexOf('"'); + const args = replyStr.slice(argIndex + 1, -1).split('" "').map((elem) => elem.replace(/\\"/g, '"')); + const dbAndSource = replyStr.slice(len + 2, argIndex - 2).split(" "); + this.redis.emit("monitor", timestamp, args, dbAndSource[1], dbAndSource[0]); + return true; + } + shiftCommand(reply) { + const item = this.redis.commandQueue.shift(); + if (!item) { + const message2 = "Command queue state error. If you can reproduce this, please report it."; + const error50 = new Error(message2 + (reply instanceof Error ? ` Last error: ${reply.message}` : ` Last reply: ${reply.toString()}`)); + this.redis.emit("error", error50); + return null; + } + return item; + } + }; + exports.default = DataHandler; + var remainingRepliesMap = /* @__PURE__ */ new WeakMap(); + function fillSubCommand(command, count4) { + let remainingReplies = remainingRepliesMap.has(command) ? remainingRepliesMap.get(command) : command.args.length; + remainingReplies -= 1; + if (remainingReplies <= 0) { + command.resolve(count4); + remainingRepliesMap.delete(command); + return true; + } + remainingRepliesMap.set(command, remainingReplies); + return false; + } + __name(fillSubCommand, "fillSubCommand"); + function fillUnsubCommand(command, count4) { + let remainingReplies = remainingRepliesMap.has(command) ? remainingRepliesMap.get(command) : command.args.length; + if (remainingReplies === 0) { + if (Number(count4) === 0) { + remainingRepliesMap.delete(command); + command.resolve(count4); + return true; + } + return false; + } + remainingReplies -= 1; + if (remainingReplies <= 0) { + command.resolve(count4); + return true; + } + remainingRepliesMap.set(command, remainingReplies); + return false; + } + __name(fillUnsubCommand, "fillUnsubCommand"); + } +}); + +// ../../node_modules/ioredis/built/redis/event_handler.js +var require_event_handler = __commonJS({ + "../../node_modules/ioredis/built/redis/event_handler.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.readyHandler = exports.errorHandler = exports.closeHandler = exports.connectHandler = void 0; + var redis_errors_1 = require_redis_errors(); + var Command_1 = require_Command(); + var errors_1 = require_errors(); + var utils_1 = require_utils2(); + var DataHandler_1 = require_DataHandler(); + var debug3 = (0, utils_1.Debug)("connection"); + function connectHandler(self2) { + return function() { + var _a2; + self2.setStatus("connect"); + self2.resetCommandQueue(); + let flushed = false; + const { connectionEpoch } = self2; + if (self2.condition.auth) { + self2.auth(self2.condition.auth, function(err) { + if (connectionEpoch !== self2.connectionEpoch) { + return; + } + if (err) { + if (err.message.indexOf("no password is set") !== -1) { + console.warn("[WARN] Redis server does not require a password, but a password was supplied."); + } else if (err.message.indexOf("without any password configured for the default user") !== -1) { + console.warn("[WARN] This Redis server's `default` user does not require a password, but a password was supplied"); + } else if (err.message.indexOf("wrong number of arguments for 'auth' command") !== -1) { + console.warn(`[ERROR] The server returned "wrong number of arguments for 'auth' command". You are probably passing both username and password to Redis version 5 or below. You should only pass the 'password' option for Redis version 5 and under.`); + } else { + flushed = true; + self2.recoverFromFatalError(err, err); + } + } + }); + } + if (self2.condition.select) { + self2.select(self2.condition.select).catch((err) => { + self2.silentEmit("error", err); + }); + } + new DataHandler_1.default(self2, { + stringNumbers: self2.options.stringNumbers + }); + const clientCommandPromises = []; + if (self2.options.connectionName) { + debug3("set the connection name [%s]", self2.options.connectionName); + clientCommandPromises.push(self2.client("setname", self2.options.connectionName).catch(utils_1.noop)); + } + if (!self2.options.disableClientInfo) { + debug3("set the client info"); + clientCommandPromises.push((0, utils_1.getPackageMeta)().then((packageMeta) => { + return self2.client("SETINFO", "LIB-VER", packageMeta.version).catch(utils_1.noop); + }).catch(utils_1.noop)); + clientCommandPromises.push(self2.client("SETINFO", "LIB-NAME", ((_a2 = self2.options) === null || _a2 === void 0 ? void 0 : _a2.clientInfoTag) ? `ioredis(${self2.options.clientInfoTag})` : "ioredis").catch(utils_1.noop)); + } + Promise.all(clientCommandPromises).catch(utils_1.noop).finally(() => { + if (!self2.options.enableReadyCheck) { + exports.readyHandler(self2)(); + } + if (self2.options.enableReadyCheck) { + self2._readyCheck(function(err, info3) { + if (connectionEpoch !== self2.connectionEpoch) { + return; + } + if (err) { + if (!flushed) { + self2.recoverFromFatalError(new Error("Ready check failed: " + err.message), err); + } + } else { + if (self2.connector.check(info3)) { + exports.readyHandler(self2)(); + } else { + self2.disconnect(true); + } + } + }); + } + }); + }; + } + __name(connectHandler, "connectHandler"); + exports.connectHandler = connectHandler; + function abortError(command) { + const err = new redis_errors_1.AbortError("Command aborted due to connection close"); + err.command = { + name: command.name, + args: command.args + }; + return err; + } + __name(abortError, "abortError"); + function abortIncompletePipelines(commandQueue) { + var _a2; + let expectedIndex = 0; + for (let i = 0; i < commandQueue.length; ) { + const command = (_a2 = commandQueue.peekAt(i)) === null || _a2 === void 0 ? void 0 : _a2.command; + const pipelineIndex = command.pipelineIndex; + if (pipelineIndex === void 0 || pipelineIndex === 0) { + expectedIndex = 0; + } + if (pipelineIndex !== void 0 && pipelineIndex !== expectedIndex++) { + commandQueue.remove(i, 1); + command.reject(abortError(command)); + continue; + } + i++; + } + } + __name(abortIncompletePipelines, "abortIncompletePipelines"); + function abortTransactionFragments(commandQueue) { + var _a2; + for (let i = 0; i < commandQueue.length; ) { + const command = (_a2 = commandQueue.peekAt(i)) === null || _a2 === void 0 ? void 0 : _a2.command; + if (command.name === "multi") { + break; + } + if (command.name === "exec") { + commandQueue.remove(i, 1); + command.reject(abortError(command)); + break; + } + if (command.inTransaction) { + commandQueue.remove(i, 1); + command.reject(abortError(command)); + } else { + i++; + } + } + } + __name(abortTransactionFragments, "abortTransactionFragments"); + function closeHandler(self2) { + return function() { + const prevStatus = self2.status; + self2.setStatus("close"); + if (self2.commandQueue.length) { + abortIncompletePipelines(self2.commandQueue); + } + if (self2.offlineQueue.length) { + abortTransactionFragments(self2.offlineQueue); + } + if (prevStatus === "ready") { + if (!self2.prevCondition) { + self2.prevCondition = self2.condition; + } + if (self2.commandQueue.length) { + self2.prevCommandQueue = self2.commandQueue; + } + } + if (self2.manuallyClosing) { + self2.manuallyClosing = false; + debug3("skip reconnecting since the connection is manually closed."); + return close2(); + } + if (typeof self2.options.retryStrategy !== "function") { + debug3("skip reconnecting because `retryStrategy` is not a function"); + return close2(); + } + const retryDelay = self2.options.retryStrategy(++self2.retryAttempts); + if (typeof retryDelay !== "number") { + debug3("skip reconnecting because `retryStrategy` doesn't return a number"); + return close2(); + } + debug3("reconnect in %sms", retryDelay); + self2.setStatus("reconnecting", retryDelay); + self2.reconnectTimeout = setTimeout(function() { + self2.reconnectTimeout = null; + self2.connect().catch(utils_1.noop); + }, retryDelay); + const { maxRetriesPerRequest } = self2.options; + if (typeof maxRetriesPerRequest === "number") { + if (maxRetriesPerRequest < 0) { + debug3("maxRetriesPerRequest is negative, ignoring..."); + } else { + const remainder = self2.retryAttempts % (maxRetriesPerRequest + 1); + if (remainder === 0) { + debug3("reach maxRetriesPerRequest limitation, flushing command queue..."); + self2.flushQueue(new errors_1.MaxRetriesPerRequestError(maxRetriesPerRequest)); + } + } + } + }; + function close2() { + self2.setStatus("end"); + self2.flushQueue(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + } + __name(close2, "close"); + } + __name(closeHandler, "closeHandler"); + exports.closeHandler = closeHandler; + function errorHandler2(self2) { + return function(error50) { + debug3("error: %s", error50); + self2.silentEmit("error", error50); + }; + } + __name(errorHandler2, "errorHandler"); + exports.errorHandler = errorHandler2; + function readyHandler(self2) { + return function() { + self2.setStatus("ready"); + self2.retryAttempts = 0; + if (self2.options.monitor) { + self2.call("monitor").then(() => self2.setStatus("monitoring"), (error50) => self2.emit("error", error50)); + const { sendCommand } = self2; + self2.sendCommand = function(command) { + if (Command_1.default.checkFlag("VALID_IN_MONITOR_MODE", command.name)) { + return sendCommand.call(self2, command); + } + command.reject(new Error("Connection is in monitoring mode, can't process commands.")); + return command.promise; + }; + self2.once("close", function() { + delete self2.sendCommand; + }); + return; + } + const finalSelect = self2.prevCondition ? self2.prevCondition.select : self2.condition.select; + if (self2.options.readOnly) { + debug3("set the connection to readonly mode"); + self2.readonly().catch(utils_1.noop); + } + if (self2.prevCondition) { + const condition = self2.prevCondition; + self2.prevCondition = null; + if (condition.subscriber && self2.options.autoResubscribe) { + if (self2.condition.select !== finalSelect) { + debug3("connect to db [%d]", finalSelect); + self2.select(finalSelect); + } + const subscribeChannels = condition.subscriber.channels("subscribe"); + if (subscribeChannels.length) { + debug3("subscribe %d channels", subscribeChannels.length); + self2.subscribe(subscribeChannels); + } + const psubscribeChannels = condition.subscriber.channels("psubscribe"); + if (psubscribeChannels.length) { + debug3("psubscribe %d channels", psubscribeChannels.length); + self2.psubscribe(psubscribeChannels); + } + const ssubscribeChannels = condition.subscriber.channels("ssubscribe"); + if (ssubscribeChannels.length) { + debug3("ssubscribe %s", ssubscribeChannels.length); + for (const channel2 of ssubscribeChannels) { + self2.ssubscribe(channel2); + } + } + } + } + if (self2.prevCommandQueue) { + if (self2.options.autoResendUnfulfilledCommands) { + debug3("resend %d unfulfilled commands", self2.prevCommandQueue.length); + while (self2.prevCommandQueue.length > 0) { + const item = self2.prevCommandQueue.shift(); + if (item.select !== self2.condition.select && item.command.name !== "select") { + self2.select(item.select); + } + self2.sendCommand(item.command, item.stream); + } + } else { + self2.prevCommandQueue = null; + } + } + if (self2.offlineQueue.length) { + debug3("send %d commands in offline queue", self2.offlineQueue.length); + const offlineQueue = self2.offlineQueue; + self2.resetOfflineQueue(); + while (offlineQueue.length > 0) { + const item = offlineQueue.shift(); + if (item.select !== self2.condition.select && item.command.name !== "select") { + self2.select(item.select); + } + self2.sendCommand(item.command, item.stream); + } + } + if (self2.condition.select !== finalSelect) { + debug3("connect to db [%d]", finalSelect); + self2.select(finalSelect); + } + }; + } + __name(readyHandler, "readyHandler"); + exports.readyHandler = readyHandler; + } +}); + +// ../../node_modules/ioredis/built/redis/RedisOptions.js +var require_RedisOptions = __commonJS({ + "../../node_modules/ioredis/built/redis/RedisOptions.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DEFAULT_REDIS_OPTIONS = void 0; + exports.DEFAULT_REDIS_OPTIONS = { + // Connection + port: 6379, + host: "localhost", + family: 0, + connectTimeout: 1e4, + disconnectTimeout: 2e3, + retryStrategy: /* @__PURE__ */ __name(function(times) { + return Math.min(times * 50, 2e3); + }, "retryStrategy"), + keepAlive: 0, + noDelay: true, + connectionName: null, + disableClientInfo: false, + clientInfoTag: void 0, + // Sentinel + sentinels: null, + name: null, + role: "master", + sentinelRetryStrategy: /* @__PURE__ */ __name(function(times) { + return Math.min(times * 10, 1e3); + }, "sentinelRetryStrategy"), + sentinelReconnectStrategy: /* @__PURE__ */ __name(function() { + return 6e4; + }, "sentinelReconnectStrategy"), + natMap: null, + enableTLSForSentinelMode: false, + updateSentinels: true, + failoverDetector: false, + // Status + username: null, + password: null, + db: 0, + // Others + enableOfflineQueue: true, + enableReadyCheck: true, + autoResubscribe: true, + autoResendUnfulfilledCommands: true, + lazyConnect: false, + keyPrefix: "", + reconnectOnError: null, + readOnly: false, + stringNumbers: false, + maxRetriesPerRequest: 20, + maxLoadingRetryTime: 1e4, + enableAutoPipelining: false, + autoPipeliningIgnoredCommands: [], + sentinelMaxConnections: 10, + blockingTimeoutGrace: 100 + }; + } +}); + +// ../../node_modules/ioredis/built/Redis.js +var require_Redis = __commonJS({ + "../../node_modules/ioredis/built/Redis.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var commands_1 = require_built(); + var events_1 = require_events(); + var standard_as_callback_1 = require_built2(); + var cluster_1 = require_cluster(); + var Command_1 = require_Command(); + var connectors_1 = require_connectors(); + var SentinelConnector_1 = require_SentinelConnector(); + var eventHandler = require_event_handler(); + var RedisOptions_1 = require_RedisOptions(); + var ScanStream_1 = require_ScanStream(); + var transaction_1 = require_transaction(); + var utils_1 = require_utils2(); + var applyMixin_1 = require_applyMixin(); + var Commander_1 = require_Commander(); + var lodash_1 = require_lodash3(); + var Deque = require_denque(); + var debug3 = (0, utils_1.Debug)("redis"); + var Redis = class _Redis extends Commander_1.default { + static { + __name(this, "Redis"); + } + constructor(arg1, arg2, arg3) { + super(); + this.status = "wait"; + this.isCluster = false; + this.reconnectTimeout = null; + this.connectionEpoch = 0; + this.retryAttempts = 0; + this.manuallyClosing = false; + this._autoPipelines = /* @__PURE__ */ new Map(); + this._runningAutoPipelines = /* @__PURE__ */ new Set(); + this.parseOptions(arg1, arg2, arg3); + events_1.EventEmitter.call(this); + this.resetCommandQueue(); + this.resetOfflineQueue(); + if (this.options.Connector) { + this.connector = new this.options.Connector(this.options); + } else if (this.options.sentinels) { + const sentinelConnector = new SentinelConnector_1.default(this.options); + sentinelConnector.emitter = this; + this.connector = sentinelConnector; + } else { + this.connector = new connectors_1.StandaloneConnector(this.options); + } + if (this.options.scripts) { + Object.entries(this.options.scripts).forEach(([name, definition]) => { + this.defineCommand(name, definition); + }); + } + if (this.options.lazyConnect) { + this.setStatus("wait"); + } else { + this.connect().catch(lodash_1.noop); + } + } + /** + * Create a Redis instance. + * This is the same as `new Redis()` but is included for compatibility with node-redis. + */ + static createClient(...args) { + return new _Redis(...args); + } + get autoPipelineQueueSize() { + let queued = 0; + for (const pipeline of this._autoPipelines.values()) { + queued += pipeline.length; + } + return queued; + } + /** + * Create a connection to Redis. + * This method will be invoked automatically when creating a new Redis instance + * unless `lazyConnect: true` is passed. + * + * When calling this method manually, a Promise is returned, which will + * be resolved when the connection status is ready. The promise can reject + * if the connection fails, times out, or if Redis is already connecting/connected. + */ + connect(callback) { + const promise2 = new Promise((resolve, reject) => { + if (this.status === "connecting" || this.status === "connect" || this.status === "ready") { + reject(new Error("Redis is already connecting/connected")); + return; + } + this.connectionEpoch += 1; + this.setStatus("connecting"); + const { options } = this; + this.condition = { + select: options.db, + auth: options.username ? [options.username, options.password] : options.password, + subscriber: false + }; + const _this = this; + (0, standard_as_callback_1.default)(this.connector.connect(function(type, err) { + _this.silentEmit(type, err); + }), function(err, stream) { + if (err) { + _this.flushQueue(err); + _this.silentEmit("error", err); + reject(err); + _this.setStatus("end"); + return; + } + let CONNECT_EVENT = options.tls ? "secureConnect" : "connect"; + if ("sentinels" in options && options.sentinels && !options.enableTLSForSentinelMode) { + CONNECT_EVENT = "connect"; + } + _this.stream = stream; + if (options.noDelay) { + stream.setNoDelay(true); + } + if (typeof options.keepAlive === "number") { + if (stream.connecting) { + stream.once(CONNECT_EVENT, () => { + stream.setKeepAlive(true, options.keepAlive); + }); + } else { + stream.setKeepAlive(true, options.keepAlive); + } + } + if (stream.connecting) { + stream.once(CONNECT_EVENT, eventHandler.connectHandler(_this)); + if (options.connectTimeout) { + let connectTimeoutCleared = false; + stream.setTimeout(options.connectTimeout, function() { + if (connectTimeoutCleared) { + return; + } + stream.setTimeout(0); + stream.destroy(); + const err2 = new Error("connect ETIMEDOUT"); + err2.errorno = "ETIMEDOUT"; + err2.code = "ETIMEDOUT"; + err2.syscall = "connect"; + eventHandler.errorHandler(_this)(err2); + }); + stream.once(CONNECT_EVENT, function() { + connectTimeoutCleared = true; + stream.setTimeout(0); + }); + } + } else if (stream.destroyed) { + const firstError = _this.connector.firstError; + if (firstError) { + process.nextTick(() => { + eventHandler.errorHandler(_this)(firstError); + }); + } + process.nextTick(eventHandler.closeHandler(_this)); + } else { + process.nextTick(eventHandler.connectHandler(_this)); + } + if (!stream.destroyed) { + stream.once("error", eventHandler.errorHandler(_this)); + stream.once("close", eventHandler.closeHandler(_this)); + } + const connectionReadyHandler = /* @__PURE__ */ __name(function() { + _this.removeListener("close", connectionCloseHandler); + resolve(); + }, "connectionReadyHandler"); + var connectionCloseHandler = /* @__PURE__ */ __name(function() { + _this.removeListener("ready", connectionReadyHandler); + reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + }, "connectionCloseHandler"); + _this.once("ready", connectionReadyHandler); + _this.once("close", connectionCloseHandler); + }); + }); + return (0, standard_as_callback_1.default)(promise2, callback); + } + /** + * Disconnect from Redis. + * + * This method closes the connection immediately, + * and may lose some pending replies that haven't written to client. + * If you want to wait for the pending replies, use Redis#quit instead. + */ + disconnect(reconnect = false) { + if (!reconnect) { + this.manuallyClosing = true; + } + if (this.reconnectTimeout && !reconnect) { + clearTimeout(this.reconnectTimeout); + this.reconnectTimeout = null; + } + if (this.status === "wait") { + eventHandler.closeHandler(this)(); + } else { + this.connector.disconnect(); + } + } + /** + * Disconnect from Redis. + * + * @deprecated + */ + end() { + this.disconnect(); + } + /** + * Create a new instance with the same options as the current one. + * + * @example + * ```js + * var redis = new Redis(6380); + * var anotherRedis = redis.duplicate(); + * ``` + */ + duplicate(override) { + return new _Redis({ ...this.options, ...override }); + } + /** + * Mode of the connection. + * + * One of `"normal"`, `"subscriber"`, or `"monitor"`. When the connection is + * not in `"normal"` mode, certain commands are not allowed. + */ + get mode() { + var _a2; + return this.options.monitor ? "monitor" : ((_a2 = this.condition) === null || _a2 === void 0 ? void 0 : _a2.subscriber) ? "subscriber" : "normal"; + } + /** + * Listen for all requests received by the server in real time. + * + * This command will create a new connection to Redis and send a + * MONITOR command via the new connection in order to avoid disturbing + * the current connection. + * + * @param callback The callback function. If omit, a promise will be returned. + * @example + * ```js + * var redis = new Redis(); + * redis.monitor(function (err, monitor) { + * // Entering monitoring mode. + * monitor.on('monitor', function (time, args, source, database) { + * console.log(time + ": " + util.inspect(args)); + * }); + * }); + * + * // supports promise as well as other commands + * redis.monitor().then(function (monitor) { + * monitor.on('monitor', function (time, args, source, database) { + * console.log(time + ": " + util.inspect(args)); + * }); + * }); + * ``` + */ + monitor(callback) { + const monitorInstance = this.duplicate({ + monitor: true, + lazyConnect: false + }); + return (0, standard_as_callback_1.default)(new Promise(function(resolve, reject) { + monitorInstance.once("error", reject); + monitorInstance.once("monitoring", function() { + resolve(monitorInstance); + }); + }), callback); + } + /** + * Send a command to Redis + * + * This method is used internally and in most cases you should not + * use it directly. If you need to send a command that is not supported + * by the library, you can use the `call` method: + * + * ```js + * const redis = new Redis(); + * + * redis.call('set', 'foo', 'bar'); + * // or + * redis.call(['set', 'foo', 'bar']); + * ``` + * + * @ignore + */ + sendCommand(command, stream) { + var _a2, _b; + if (this.status === "wait") { + this.connect().catch(lodash_1.noop); + } + if (this.status === "end") { + command.reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + return command.promise; + } + if (((_a2 = this.condition) === null || _a2 === void 0 ? void 0 : _a2.subscriber) && !Command_1.default.checkFlag("VALID_IN_SUBSCRIBER_MODE", command.name)) { + command.reject(new Error("Connection in subscriber mode, only subscriber commands may be used")); + return command.promise; + } + if (typeof this.options.commandTimeout === "number") { + command.setTimeout(this.options.commandTimeout); + } + const blockingTimeout = this.getBlockingTimeoutInMs(command); + let writable = this.status === "ready" || !stream && this.status === "connect" && (0, commands_1.exists)(command.name, { caseInsensitive: true }) && ((0, commands_1.hasFlag)(command.name, "loading", { nameCaseInsensitive: true }) || Command_1.default.checkFlag("HANDSHAKE_COMMANDS", command.name)); + if (!this.stream) { + writable = false; + } else if (!this.stream.writable) { + writable = false; + } else if (this.stream._writableState && this.stream._writableState.ended) { + writable = false; + } + if (!writable) { + if (!this.options.enableOfflineQueue) { + command.reject(new Error("Stream isn't writeable and enableOfflineQueue options is false")); + return command.promise; + } + if (command.name === "quit" && this.offlineQueue.length === 0) { + this.disconnect(); + command.resolve(Buffer.from("OK")); + return command.promise; + } + if (debug3.enabled) { + debug3("queue command[%s]: %d -> %s(%o)", this._getDescription(), this.condition.select, command.name, command.args); + } + this.offlineQueue.push({ + command, + stream, + select: this.condition.select + }); + if (Command_1.default.checkFlag("BLOCKING_COMMANDS", command.name)) { + const offlineTimeout = this.getConfiguredBlockingTimeout(); + if (offlineTimeout !== void 0) { + command.setBlockingTimeout(offlineTimeout); + } + } + } else { + if (debug3.enabled) { + debug3("write command[%s]: %d -> %s(%o)", this._getDescription(), (_b = this.condition) === null || _b === void 0 ? void 0 : _b.select, command.name, command.args); + } + if (stream) { + if ("isPipeline" in stream && stream.isPipeline) { + stream.write(command.toWritable(stream.destination.redis.stream)); + } else { + stream.write(command.toWritable(stream)); + } + } else { + this.stream.write(command.toWritable(this.stream)); + } + this.commandQueue.push({ + command, + stream, + select: this.condition.select + }); + if (blockingTimeout !== void 0) { + command.setBlockingTimeout(blockingTimeout); + } + if (Command_1.default.checkFlag("WILL_DISCONNECT", command.name)) { + this.manuallyClosing = true; + } + if (this.options.socketTimeout !== void 0 && this.socketTimeoutTimer === void 0) { + this.setSocketTimeout(); + } + } + if (command.name === "select" && (0, utils_1.isInt)(command.args[0])) { + const db3 = parseInt(command.args[0], 10); + if (this.condition.select !== db3) { + this.condition.select = db3; + this.emit("select", db3); + debug3("switch to db [%d]", this.condition.select); + } + } + return command.promise; + } + getBlockingTimeoutInMs(command) { + var _a2; + if (!Command_1.default.checkFlag("BLOCKING_COMMANDS", command.name)) { + return void 0; + } + const configuredTimeout = this.getConfiguredBlockingTimeout(); + if (configuredTimeout === void 0) { + return void 0; + } + const timeout = command.extractBlockingTimeout(); + if (typeof timeout === "number") { + if (timeout > 0) { + return timeout + ((_a2 = this.options.blockingTimeoutGrace) !== null && _a2 !== void 0 ? _a2 : RedisOptions_1.DEFAULT_REDIS_OPTIONS.blockingTimeoutGrace); + } + return configuredTimeout; + } + if (timeout === null) { + return configuredTimeout; + } + return void 0; + } + getConfiguredBlockingTimeout() { + if (typeof this.options.blockingTimeout === "number" && this.options.blockingTimeout > 0) { + return this.options.blockingTimeout; + } + return void 0; + } + setSocketTimeout() { + this.socketTimeoutTimer = setTimeout(() => { + this.stream.destroy(new Error(`Socket timeout. Expecting data, but didn't receive any in ${this.options.socketTimeout}ms.`)); + this.socketTimeoutTimer = void 0; + }, this.options.socketTimeout); + this.stream.once("data", () => { + clearTimeout(this.socketTimeoutTimer); + this.socketTimeoutTimer = void 0; + if (this.commandQueue.length === 0) + return; + this.setSocketTimeout(); + }); + } + scanStream(options) { + return this.createScanStream("scan", { options }); + } + scanBufferStream(options) { + return this.createScanStream("scanBuffer", { options }); + } + sscanStream(key, options) { + return this.createScanStream("sscan", { key, options }); + } + sscanBufferStream(key, options) { + return this.createScanStream("sscanBuffer", { key, options }); + } + hscanStream(key, options) { + return this.createScanStream("hscan", { key, options }); + } + hscanBufferStream(key, options) { + return this.createScanStream("hscanBuffer", { key, options }); + } + zscanStream(key, options) { + return this.createScanStream("zscan", { key, options }); + } + zscanBufferStream(key, options) { + return this.createScanStream("zscanBuffer", { key, options }); + } + /** + * Emit only when there's at least one listener. + * + * @ignore + */ + silentEmit(eventName, arg) { + let error50; + if (eventName === "error") { + error50 = arg; + if (this.status === "end") { + return; + } + if (this.manuallyClosing) { + if (error50 instanceof Error && (error50.message === utils_1.CONNECTION_CLOSED_ERROR_MSG || // @ts-expect-error + error50.syscall === "connect" || // @ts-expect-error + error50.syscall === "read")) { + return; + } + } + } + if (this.listeners(eventName).length > 0) { + return this.emit.apply(this, arguments); + } + if (error50 && error50 instanceof Error) { + console.error("[ioredis] Unhandled error event:", error50.stack); + } + return false; + } + /** + * @ignore + */ + recoverFromFatalError(_commandError, err, options) { + this.flushQueue(err, options); + this.silentEmit("error", err); + this.disconnect(true); + } + /** + * @ignore + */ + handleReconnection(err, item) { + var _a2; + let needReconnect = false; + if (this.options.reconnectOnError && !Command_1.default.checkFlag("IGNORE_RECONNECT_ON_ERROR", item.command.name)) { + needReconnect = this.options.reconnectOnError(err); + } + switch (needReconnect) { + case 1: + case true: + if (this.status !== "reconnecting") { + this.disconnect(true); + } + item.command.reject(err); + break; + case 2: + if (this.status !== "reconnecting") { + this.disconnect(true); + } + if (((_a2 = this.condition) === null || _a2 === void 0 ? void 0 : _a2.select) !== item.select && item.command.name !== "select") { + this.select(item.select); + } + this.sendCommand(item.command); + break; + default: + item.command.reject(err); + } + } + /** + * Get description of the connection. Used for debugging. + */ + _getDescription() { + let description; + if ("path" in this.options && this.options.path) { + description = this.options.path; + } else if (this.stream && this.stream.remoteAddress && this.stream.remotePort) { + description = this.stream.remoteAddress + ":" + this.stream.remotePort; + } else if ("host" in this.options && this.options.host) { + description = this.options.host + ":" + this.options.port; + } else { + description = ""; + } + if (this.options.connectionName) { + description += ` (${this.options.connectionName})`; + } + return description; + } + resetCommandQueue() { + this.commandQueue = new Deque(); + } + resetOfflineQueue() { + this.offlineQueue = new Deque(); + } + parseOptions(...args) { + const options = {}; + let isTls = false; + for (let i = 0; i < args.length; ++i) { + const arg = args[i]; + if (arg === null || typeof arg === "undefined") { + continue; + } + if (typeof arg === "object") { + (0, lodash_1.defaults)(options, arg); + } else if (typeof arg === "string") { + (0, lodash_1.defaults)(options, (0, utils_1.parseURL)(arg)); + if (arg.startsWith("rediss://")) { + isTls = true; + } + } else if (typeof arg === "number") { + options.port = arg; + } else { + throw new Error("Invalid argument " + arg); + } + } + if (isTls) { + (0, lodash_1.defaults)(options, { tls: true }); + } + (0, lodash_1.defaults)(options, _Redis.defaultOptions); + if (typeof options.port === "string") { + options.port = parseInt(options.port, 10); + } + if (typeof options.db === "string") { + options.db = parseInt(options.db, 10); + } + this.options = (0, utils_1.resolveTLSProfile)(options); + } + /** + * Change instance's status + */ + setStatus(status, arg) { + if (debug3.enabled) { + debug3("status[%s]: %s -> %s", this._getDescription(), this.status || "[empty]", status); + } + this.status = status; + process.nextTick(this.emit.bind(this, status, arg)); + } + createScanStream(command, { key, options = {} }) { + return new ScanStream_1.default({ + objectMode: true, + key, + redis: this, + command, + ...options + }); + } + /** + * Flush offline queue and command queue with error. + * + * @param error The error object to send to the commands + * @param options options + */ + flushQueue(error50, options) { + options = (0, lodash_1.defaults)({}, options, { + offlineQueue: true, + commandQueue: true + }); + let item; + if (options.offlineQueue) { + while (item = this.offlineQueue.shift()) { + item.command.reject(error50); + } + } + if (options.commandQueue) { + if (this.commandQueue.length > 0) { + if (this.stream) { + this.stream.removeAllListeners("data"); + } + while (item = this.commandQueue.shift()) { + item.command.reject(error50); + } + } + } + } + /** + * Check whether Redis has finished loading the persistent data and is able to + * process commands. + */ + _readyCheck(callback) { + const _this = this; + this.info(function(err, res) { + if (err) { + if (err.message && err.message.includes("NOPERM")) { + console.warn(`Skipping the ready check because INFO command fails: "${err.message}". You can disable ready check with "enableReadyCheck". More: https://github.com/luin/ioredis/wiki/Disable-ready-check.`); + return callback(null, {}); + } + return callback(err); + } + if (typeof res !== "string") { + return callback(null, res); + } + const info3 = {}; + const lines = res.split("\r\n"); + for (let i = 0; i < lines.length; ++i) { + const [fieldName, ...fieldValueParts] = lines[i].split(":"); + const fieldValue = fieldValueParts.join(":"); + if (fieldValue) { + info3[fieldName] = fieldValue; + } + } + if (!info3.loading || info3.loading === "0") { + callback(null, info3); + } else { + const loadingEtaMs = (info3.loading_eta_seconds || 1) * 1e3; + const retryTime = _this.options.maxLoadingRetryTime && _this.options.maxLoadingRetryTime < loadingEtaMs ? _this.options.maxLoadingRetryTime : loadingEtaMs; + debug3("Redis server still loading, trying again in " + retryTime + "ms"); + setTimeout(function() { + _this._readyCheck(callback); + }, retryTime); + } + }).catch(lodash_1.noop); + } + }; + Redis.Cluster = cluster_1.default; + Redis.Command = Command_1.default; + Redis.defaultOptions = RedisOptions_1.DEFAULT_REDIS_OPTIONS; + (0, applyMixin_1.default)(Redis, events_1.EventEmitter); + (0, transaction_1.addTransactionSupport)(Redis.prototype); + exports.default = Redis; + } +}); + +// ../../node_modules/ioredis/built/index.js +var require_built3 = __commonJS({ + "../../node_modules/ioredis/built/index.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.print = exports.ReplyError = exports.SentinelIterator = exports.SentinelConnector = exports.AbstractConnector = exports.Pipeline = exports.ScanStream = exports.Command = exports.Cluster = exports.Redis = exports.default = void 0; + exports = module2.exports = require_Redis().default; + var Redis_1 = require_Redis(); + Object.defineProperty(exports, "default", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return Redis_1.default; + }, "get") }); + var Redis_2 = require_Redis(); + Object.defineProperty(exports, "Redis", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return Redis_2.default; + }, "get") }); + var cluster_1 = require_cluster(); + Object.defineProperty(exports, "Cluster", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return cluster_1.default; + }, "get") }); + var Command_1 = require_Command(); + Object.defineProperty(exports, "Command", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return Command_1.default; + }, "get") }); + var ScanStream_1 = require_ScanStream(); + Object.defineProperty(exports, "ScanStream", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return ScanStream_1.default; + }, "get") }); + var Pipeline_1 = require_Pipeline(); + Object.defineProperty(exports, "Pipeline", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return Pipeline_1.default; + }, "get") }); + var AbstractConnector_1 = require_AbstractConnector(); + Object.defineProperty(exports, "AbstractConnector", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return AbstractConnector_1.default; + }, "get") }); + var SentinelConnector_1 = require_SentinelConnector(); + Object.defineProperty(exports, "SentinelConnector", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return SentinelConnector_1.default; + }, "get") }); + Object.defineProperty(exports, "SentinelIterator", { enumerable: true, get: /* @__PURE__ */ __name(function() { + return SentinelConnector_1.SentinelIterator; + }, "get") }); + exports.ReplyError = require_redis_errors().ReplyError; + Object.defineProperty(exports, "Promise", { + get() { + console.warn("ioredis v5 does not support plugging third-party Promise library anymore. Native Promise will be used."); + return Promise; + }, + set(_lib) { + console.warn("ioredis v5 does not support plugging third-party Promise library anymore. Native Promise will be used."); + } + }); + function print(err, reply) { + if (err) { + console.log("Error: " + err); + } else { + console.log("Reply: " + reply); + } + } + __name(print, "print"); + exports.print = print; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/internal/constants.js +var require_constants = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/internal/constants.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ + 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; + var RELEASE_TYPES = [ + "major", + "premajor", + "minor", + "preminor", + "patch", + "prepatch", + "prerelease" + ]; + module2.exports = { + MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_SAFE_INTEGER, + RELEASE_TYPES, + SEMVER_SPEC_VERSION, + FLAG_INCLUDE_PRERELEASE: 1, + FLAG_LOOSE: 2 + }; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/internal/debug.js +var require_debug2 = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/internal/debug.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var debug3 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { + }; + module2.exports = debug3; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/internal/re.js +var require_re = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/internal/re.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var { + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_LENGTH + } = require_constants(); + var debug3 = require_debug2(); + exports = module2.exports = {}; + var re = exports.re = []; + var safeRe = exports.safeRe = []; + var src2 = exports.src = []; + var safeSrc = exports.safeSrc = []; + var t8 = exports.t = {}; + var R = 0; + var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; + var safeRegexReplacements = [ + ["\\s", 1], + ["\\d", MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] + ]; + var makeSafeRegex = /* @__PURE__ */ __name((value) => { + for (const [token, max2] of safeRegexReplacements) { + value = value.split(`${token}*`).join(`${token}{0,${max2}}`).split(`${token}+`).join(`${token}{1,${max2}}`); + } + return value; + }, "makeSafeRegex"); + var createToken = /* @__PURE__ */ __name((name, value, isGlobal) => { + const safe = makeSafeRegex(value); + const index = R++; + debug3(name, index, value); + t8[name] = index; + src2[index] = value; + safeSrc[index] = safe; + re[index] = new RegExp(value, isGlobal ? "g" : void 0); + safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); + }, "createToken"); + createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); + createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); + createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); + createToken("MAINVERSION", `(${src2[t8.NUMERICIDENTIFIER]})\\.(${src2[t8.NUMERICIDENTIFIER]})\\.(${src2[t8.NUMERICIDENTIFIER]})`); + createToken("MAINVERSIONLOOSE", `(${src2[t8.NUMERICIDENTIFIERLOOSE]})\\.(${src2[t8.NUMERICIDENTIFIERLOOSE]})\\.(${src2[t8.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASEIDENTIFIER", `(?:${src2[t8.NONNUMERICIDENTIFIER]}|${src2[t8.NUMERICIDENTIFIER]})`); + createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src2[t8.NONNUMERICIDENTIFIER]}|${src2[t8.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASE", `(?:-(${src2[t8.PRERELEASEIDENTIFIER]}(?:\\.${src2[t8.PRERELEASEIDENTIFIER]})*))`); + createToken("PRERELEASELOOSE", `(?:-?(${src2[t8.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src2[t8.PRERELEASEIDENTIFIERLOOSE]})*))`); + createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); + createToken("BUILD", `(?:\\+(${src2[t8.BUILDIDENTIFIER]}(?:\\.${src2[t8.BUILDIDENTIFIER]})*))`); + createToken("FULLPLAIN", `v?${src2[t8.MAINVERSION]}${src2[t8.PRERELEASE]}?${src2[t8.BUILD]}?`); + createToken("FULL", `^${src2[t8.FULLPLAIN]}$`); + createToken("LOOSEPLAIN", `[v=\\s]*${src2[t8.MAINVERSIONLOOSE]}${src2[t8.PRERELEASELOOSE]}?${src2[t8.BUILD]}?`); + createToken("LOOSE", `^${src2[t8.LOOSEPLAIN]}$`); + createToken("GTLT", "((?:<|>)?=?)"); + createToken("XRANGEIDENTIFIERLOOSE", `${src2[t8.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); + createToken("XRANGEIDENTIFIER", `${src2[t8.NUMERICIDENTIFIER]}|x|X|\\*`); + createToken("XRANGEPLAIN", `[v=\\s]*(${src2[t8.XRANGEIDENTIFIER]})(?:\\.(${src2[t8.XRANGEIDENTIFIER]})(?:\\.(${src2[t8.XRANGEIDENTIFIER]})(?:${src2[t8.PRERELEASE]})?${src2[t8.BUILD]}?)?)?`); + createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src2[t8.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src2[t8.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src2[t8.XRANGEIDENTIFIERLOOSE]})(?:${src2[t8.PRERELEASELOOSE]})?${src2[t8.BUILD]}?)?)?`); + createToken("XRANGE", `^${src2[t8.GTLT]}\\s*${src2[t8.XRANGEPLAIN]}$`); + createToken("XRANGELOOSE", `^${src2[t8.GTLT]}\\s*${src2[t8.XRANGEPLAINLOOSE]}$`); + createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); + createToken("COERCE", `${src2[t8.COERCEPLAIN]}(?:$|[^\\d])`); + createToken("COERCEFULL", src2[t8.COERCEPLAIN] + `(?:${src2[t8.PRERELEASE]})?(?:${src2[t8.BUILD]})?(?:$|[^\\d])`); + createToken("COERCERTL", src2[t8.COERCE], true); + createToken("COERCERTLFULL", src2[t8.COERCEFULL], true); + createToken("LONETILDE", "(?:~>?)"); + createToken("TILDETRIM", `(\\s*)${src2[t8.LONETILDE]}\\s+`, true); + exports.tildeTrimReplace = "$1~"; + createToken("TILDE", `^${src2[t8.LONETILDE]}${src2[t8.XRANGEPLAIN]}$`); + createToken("TILDELOOSE", `^${src2[t8.LONETILDE]}${src2[t8.XRANGEPLAINLOOSE]}$`); + createToken("LONECARET", "(?:\\^)"); + createToken("CARETTRIM", `(\\s*)${src2[t8.LONECARET]}\\s+`, true); + exports.caretTrimReplace = "$1^"; + createToken("CARET", `^${src2[t8.LONECARET]}${src2[t8.XRANGEPLAIN]}$`); + createToken("CARETLOOSE", `^${src2[t8.LONECARET]}${src2[t8.XRANGEPLAINLOOSE]}$`); + createToken("COMPARATORLOOSE", `^${src2[t8.GTLT]}\\s*(${src2[t8.LOOSEPLAIN]})$|^$`); + createToken("COMPARATOR", `^${src2[t8.GTLT]}\\s*(${src2[t8.FULLPLAIN]})$|^$`); + createToken("COMPARATORTRIM", `(\\s*)${src2[t8.GTLT]}\\s*(${src2[t8.LOOSEPLAIN]}|${src2[t8.XRANGEPLAIN]})`, true); + exports.comparatorTrimReplace = "$1$2$3"; + createToken("HYPHENRANGE", `^\\s*(${src2[t8.XRANGEPLAIN]})\\s+-\\s+(${src2[t8.XRANGEPLAIN]})\\s*$`); + createToken("HYPHENRANGELOOSE", `^\\s*(${src2[t8.XRANGEPLAINLOOSE]})\\s+-\\s+(${src2[t8.XRANGEPLAINLOOSE]})\\s*$`); + createToken("STAR", "(<|>)?=?\\s*\\*"); + createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); + createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); + } +}); + +// ../../node_modules/bullmq/node_modules/semver/internal/parse-options.js +var require_parse_options = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/internal/parse-options.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var looseOption = Object.freeze({ loose: true }); + var emptyOpts = Object.freeze({}); + var parseOptions = /* @__PURE__ */ __name((options) => { + if (!options) { + return emptyOpts; + } + if (typeof options !== "object") { + return looseOption; + } + return options; + }, "parseOptions"); + module2.exports = parseOptions; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/internal/identifiers.js +var require_identifiers = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/internal/identifiers.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var numeric2 = /^[0-9]+$/; + var compareIdentifiers = /* @__PURE__ */ __name((a, b) => { + if (typeof a === "number" && typeof b === "number") { + return a === b ? 0 : a < b ? -1 : 1; + } + const anum = numeric2.test(a); + const bnum = numeric2.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + }, "compareIdentifiers"); + var rcompareIdentifiers = /* @__PURE__ */ __name((a, b) => compareIdentifiers(b, a), "rcompareIdentifiers"); + module2.exports = { + compareIdentifiers, + rcompareIdentifiers + }; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/classes/semver.js +var require_semver = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/classes/semver.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var debug3 = require_debug2(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); + var { safeRe: re, t: t8 } = require_re(); + var parseOptions = require_parse_options(); + var { compareIdentifiers } = require_identifiers(); + var SemVer = class _SemVer { + static { + __name(this, "SemVer"); + } + constructor(version5, options) { + options = parseOptions(options); + if (version5 instanceof _SemVer) { + if (version5.loose === !!options.loose && version5.includePrerelease === !!options.includePrerelease) { + return version5; + } else { + version5 = version5.version; + } + } else if (typeof version5 !== "string") { + throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version5}".`); + } + if (version5.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ); + } + debug3("SemVer", version5, options); + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + const m = version5.trim().match(options.loose ? re[t8.LOOSE] : re[t8.FULL]); + if (!m) { + throw new TypeError(`Invalid Version: ${version5}`); + } + this.raw = version5; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError("Invalid major version"); + } + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError("Invalid minor version"); + } + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError("Invalid patch version"); + } + if (!m[4]) { + this.prerelease = []; + } else { + this.prerelease = m[4].split(".").map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num; + } + } + return id; + }); + } + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + format() { + this.version = `${this.major}.${this.minor}.${this.patch}`; + if (this.prerelease.length) { + this.version += `-${this.prerelease.join(".")}`; + } + return this.version; + } + toString() { + return this.version; + } + compare(other) { + debug3("SemVer.compare", this.version, this.options, other); + if (!(other instanceof _SemVer)) { + if (typeof other === "string" && other === this.version) { + return 0; + } + other = new _SemVer(other, this.options); + } + if (other.version === this.version) { + return 0; + } + return this.compareMain(other) || this.comparePre(other); + } + compareMain(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + if (this.major < other.major) { + return -1; + } + if (this.major > other.major) { + return 1; + } + if (this.minor < other.minor) { + return -1; + } + if (this.minor > other.minor) { + return 1; + } + if (this.patch < other.patch) { + return -1; + } + if (this.patch > other.patch) { + return 1; + } + return 0; + } + comparePre(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + if (this.prerelease.length && !other.prerelease.length) { + return -1; + } else if (!this.prerelease.length && other.prerelease.length) { + return 1; + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0; + } + let i = 0; + do { + const a = this.prerelease[i]; + const b = other.prerelease[i]; + debug3("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + compareBuild(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + let i = 0; + do { + const a = this.build[i]; + const b = other.build[i]; + debug3("build compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc(release2, identifier, identifierBase) { + if (release2.startsWith("pre")) { + if (!identifier && identifierBase === false) { + throw new Error("invalid increment argument: identifier is empty"); + } + if (identifier) { + const match2 = `-${identifier}`.match(this.options.loose ? re[t8.PRERELEASELOOSE] : re[t8.PRERELEASE]); + if (!match2 || match2[1] !== identifier) { + throw new Error(`invalid identifier: ${identifier}`); + } + } + } + switch (release2) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier, identifierBase); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier, identifierBase); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier, identifierBase); + this.inc("pre", identifier, identifierBase); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case "prerelease": + if (this.prerelease.length === 0) { + this.inc("patch", identifier, identifierBase); + } + this.inc("pre", identifier, identifierBase); + break; + case "release": + if (this.prerelease.length === 0) { + throw new Error(`version ${this.raw} is not a prerelease`); + } + this.prerelease.length = 0; + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { + this.major++; + } + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++; + } + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) { + this.patch++; + } + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. + case "pre": { + const base = Number(identifierBase) ? 1 : 0; + if (this.prerelease.length === 0) { + this.prerelease = [base]; + } else { + let i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === "number") { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) { + if (identifier === this.prerelease.join(".") && identifierBase === false) { + throw new Error("invalid increment argument: identifier already exists"); + } + this.prerelease.push(base); + } + } + if (identifier) { + let prerelease = [identifier, base]; + if (identifierBase === false) { + prerelease = [identifier]; + } + if (compareIdentifiers(this.prerelease[0], identifier) === 0) { + if (isNaN(this.prerelease[1])) { + this.prerelease = prerelease; + } + } else { + this.prerelease = prerelease; + } + } + break; + } + default: + throw new Error(`invalid increment argument: ${release2}`); + } + this.raw = this.format(); + if (this.build.length) { + this.raw += `+${this.build.join(".")}`; + } + return this; + } + }; + module2.exports = SemVer; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/parse.js +var require_parse = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/parse.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var SemVer = require_semver(); + var parse3 = /* @__PURE__ */ __name((version5, options, throwErrors = false) => { + if (version5 instanceof SemVer) { + return version5; + } + try { + return new SemVer(version5, options); + } catch (er) { + if (!throwErrors) { + return null; + } + throw er; + } + }, "parse"); + module2.exports = parse3; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/valid.js +var require_valid = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/valid.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var parse3 = require_parse(); + var valid2 = /* @__PURE__ */ __name((version5, options) => { + const v2 = parse3(version5, options); + return v2 ? v2.version : null; + }, "valid"); + module2.exports = valid2; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/clean.js +var require_clean = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/clean.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var parse3 = require_parse(); + var clean = /* @__PURE__ */ __name((version5, options) => { + const s = parse3(version5.trim().replace(/^[=v]+/, ""), options); + return s ? s.version : null; + }, "clean"); + module2.exports = clean; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/inc.js +var require_inc = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/inc.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var SemVer = require_semver(); + var inc = /* @__PURE__ */ __name((version5, release2, options, identifier, identifierBase) => { + if (typeof options === "string") { + identifierBase = identifier; + identifier = options; + options = void 0; + } + try { + return new SemVer( + version5 instanceof SemVer ? version5.version : version5, + options + ).inc(release2, identifier, identifierBase).version; + } catch (er) { + return null; + } + }, "inc"); + module2.exports = inc; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/diff.js +var require_diff = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/diff.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var parse3 = require_parse(); + var diff = /* @__PURE__ */ __name((version1, version22) => { + const v1 = parse3(version1, null, true); + const v2 = parse3(version22, null, true); + const comparison = v1.compare(v2); + if (comparison === 0) { + return null; + } + const v1Higher = comparison > 0; + const highVersion = v1Higher ? v1 : v2; + const lowVersion = v1Higher ? v2 : v1; + const highHasPre = !!highVersion.prerelease.length; + const lowHasPre = !!lowVersion.prerelease.length; + if (lowHasPre && !highHasPre) { + if (!lowVersion.patch && !lowVersion.minor) { + return "major"; + } + if (lowVersion.compareMain(highVersion) === 0) { + if (lowVersion.minor && !lowVersion.patch) { + return "minor"; + } + return "patch"; + } + } + const prefix = highHasPre ? "pre" : ""; + if (v1.major !== v2.major) { + return prefix + "major"; + } + if (v1.minor !== v2.minor) { + return prefix + "minor"; + } + if (v1.patch !== v2.patch) { + return prefix + "patch"; + } + return "prerelease"; + }, "diff"); + module2.exports = diff; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/major.js +var require_major = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/major.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var SemVer = require_semver(); + var major = /* @__PURE__ */ __name((a, loose) => new SemVer(a, loose).major, "major"); + module2.exports = major; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/minor.js +var require_minor = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/minor.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var SemVer = require_semver(); + var minor = /* @__PURE__ */ __name((a, loose) => new SemVer(a, loose).minor, "minor"); + module2.exports = minor; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/patch.js +var require_patch = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/patch.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var SemVer = require_semver(); + var patch = /* @__PURE__ */ __name((a, loose) => new SemVer(a, loose).patch, "patch"); + module2.exports = patch; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/prerelease.js +var require_prerelease = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/prerelease.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var parse3 = require_parse(); + var prerelease = /* @__PURE__ */ __name((version5, options) => { + const parsed = parse3(version5, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + }, "prerelease"); + module2.exports = prerelease; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/compare.js +var require_compare = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/compare.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var SemVer = require_semver(); + var compare2 = /* @__PURE__ */ __name((a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)), "compare"); + module2.exports = compare2; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/rcompare.js +var require_rcompare = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/rcompare.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var compare2 = require_compare(); + var rcompare = /* @__PURE__ */ __name((a, b, loose) => compare2(b, a, loose), "rcompare"); + module2.exports = rcompare; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/compare-loose.js +var require_compare_loose = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/compare-loose.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var compare2 = require_compare(); + var compareLoose = /* @__PURE__ */ __name((a, b) => compare2(a, b, true), "compareLoose"); + module2.exports = compareLoose; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/compare-build.js +var require_compare_build = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/compare-build.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var SemVer = require_semver(); + var compareBuild = /* @__PURE__ */ __name((a, b, loose) => { + const versionA = new SemVer(a, loose); + const versionB = new SemVer(b, loose); + return versionA.compare(versionB) || versionA.compareBuild(versionB); + }, "compareBuild"); + module2.exports = compareBuild; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/sort.js +var require_sort = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/sort.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var compareBuild = require_compare_build(); + var sort = /* @__PURE__ */ __name((list, loose) => list.sort((a, b) => compareBuild(a, b, loose)), "sort"); + module2.exports = sort; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/rsort.js +var require_rsort = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/rsort.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var compareBuild = require_compare_build(); + var rsort = /* @__PURE__ */ __name((list, loose) => list.sort((a, b) => compareBuild(b, a, loose)), "rsort"); + module2.exports = rsort; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/gt.js +var require_gt = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/gt.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var compare2 = require_compare(); + var gt2 = /* @__PURE__ */ __name((a, b, loose) => compare2(a, b, loose) > 0, "gt"); + module2.exports = gt2; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/lt.js +var require_lt = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/lt.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var compare2 = require_compare(); + var lt3 = /* @__PURE__ */ __name((a, b, loose) => compare2(a, b, loose) < 0, "lt"); + module2.exports = lt3; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/eq.js +var require_eq = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/eq.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var compare2 = require_compare(); + var eq2 = /* @__PURE__ */ __name((a, b, loose) => compare2(a, b, loose) === 0, "eq"); + module2.exports = eq2; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/neq.js +var require_neq = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/neq.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var compare2 = require_compare(); + var neq = /* @__PURE__ */ __name((a, b, loose) => compare2(a, b, loose) !== 0, "neq"); + module2.exports = neq; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/gte.js +var require_gte = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/gte.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var compare2 = require_compare(); + var gte2 = /* @__PURE__ */ __name((a, b, loose) => compare2(a, b, loose) >= 0, "gte"); + module2.exports = gte2; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/lte.js +var require_lte = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/lte.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var compare2 = require_compare(); + var lte2 = /* @__PURE__ */ __name((a, b, loose) => compare2(a, b, loose) <= 0, "lte"); + module2.exports = lte2; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/cmp.js +var require_cmp = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/cmp.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var eq2 = require_eq(); + var neq = require_neq(); + var gt2 = require_gt(); + var gte2 = require_gte(); + var lt3 = require_lt(); + var lte2 = require_lte(); + var cmp = /* @__PURE__ */ __name((a, op, b, loose) => { + switch (op) { + case "===": + if (typeof a === "object") { + a = a.version; + } + if (typeof b === "object") { + b = b.version; + } + return a === b; + case "!==": + if (typeof a === "object") { + a = a.version; + } + if (typeof b === "object") { + b = b.version; + } + return a !== b; + case "": + case "=": + case "==": + return eq2(a, b, loose); + case "!=": + return neq(a, b, loose); + case ">": + return gt2(a, b, loose); + case ">=": + return gte2(a, b, loose); + case "<": + return lt3(a, b, loose); + case "<=": + return lte2(a, b, loose); + default: + throw new TypeError(`Invalid operator: ${op}`); + } + }, "cmp"); + module2.exports = cmp; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/coerce.js +var require_coerce = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/coerce.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var SemVer = require_semver(); + var parse3 = require_parse(); + var { safeRe: re, t: t8 } = require_re(); + var coerce2 = /* @__PURE__ */ __name((version5, options) => { + if (version5 instanceof SemVer) { + return version5; + } + if (typeof version5 === "number") { + version5 = String(version5); + } + if (typeof version5 !== "string") { + return null; + } + options = options || {}; + let match2 = null; + if (!options.rtl) { + match2 = version5.match(options.includePrerelease ? re[t8.COERCEFULL] : re[t8.COERCE]); + } else { + const coerceRtlRegex = options.includePrerelease ? re[t8.COERCERTLFULL] : re[t8.COERCERTL]; + let next; + while ((next = coerceRtlRegex.exec(version5)) && (!match2 || match2.index + match2[0].length !== version5.length)) { + if (!match2 || next.index + next[0].length !== match2.index + match2[0].length) { + match2 = next; + } + coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; + } + coerceRtlRegex.lastIndex = -1; + } + if (match2 === null) { + return null; + } + const major = match2[2]; + const minor = match2[3] || "0"; + const patch = match2[4] || "0"; + const prerelease = options.includePrerelease && match2[5] ? `-${match2[5]}` : ""; + const build = options.includePrerelease && match2[6] ? `+${match2[6]}` : ""; + return parse3(`${major}.${minor}.${patch}${prerelease}${build}`, options); + }, "coerce"); + module2.exports = coerce2; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/internal/lrucache.js +var require_lrucache = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/internal/lrucache.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var LRUCache = class { + static { + __name(this, "LRUCache"); + } + constructor() { + this.max = 1e3; + this.map = /* @__PURE__ */ new Map(); + } + get(key) { + const value = this.map.get(key); + if (value === void 0) { + return void 0; + } else { + this.map.delete(key); + this.map.set(key, value); + return value; + } + } + delete(key) { + return this.map.delete(key); + } + set(key, value) { + const deleted = this.delete(key); + if (!deleted && value !== void 0) { + if (this.map.size >= this.max) { + const firstKey = this.map.keys().next().value; + this.delete(firstKey); + } + this.map.set(key, value); + } + return this; + } + }; + module2.exports = LRUCache; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/classes/range.js +var require_range = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/classes/range.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var SPACE_CHARACTERS = /\s+/g; + var Range = class _Range { + static { + __name(this, "Range"); + } + constructor(range, options) { + options = parseOptions(options); + if (range instanceof _Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new _Range(range.raw, options); + } + } + if (range instanceof Comparator) { + this.raw = range.value; + this.set = [[range]]; + this.formatted = void 0; + return this; + } + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + this.raw = range.trim().replace(SPACE_CHARACTERS, " "); + this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${this.raw}`); + } + if (this.set.length > 1) { + const first = this.set[0]; + this.set = this.set.filter((c) => !isNullSet(c[0])); + if (this.set.length === 0) { + this.set = [first]; + } else if (this.set.length > 1) { + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c]; + break; + } + } + } + } + this.formatted = void 0; + } + get range() { + if (this.formatted === void 0) { + this.formatted = ""; + for (let i = 0; i < this.set.length; i++) { + if (i > 0) { + this.formatted += "||"; + } + const comps = this.set[i]; + for (let k = 0; k < comps.length; k++) { + if (k > 0) { + this.formatted += " "; + } + this.formatted += comps[k].toString().trim(); + } + } + } + return this.formatted; + } + format() { + return this.range; + } + toString() { + return this.range; + } + parseRange(range) { + const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); + const memoKey = memoOpts + ":" + range; + const cached2 = cache2.get(memoKey); + if (cached2) { + return cached2; + } + const loose = this.options.loose; + const hr = loose ? re[t8.HYPHENRANGELOOSE] : re[t8.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); + debug3("hyphen replace", range); + range = range.replace(re[t8.COMPARATORTRIM], comparatorTrimReplace); + debug3("comparator trim", range); + range = range.replace(re[t8.TILDETRIM], tildeTrimReplace); + debug3("tilde trim", range); + range = range.replace(re[t8.CARETTRIM], caretTrimReplace); + debug3("caret trim", range); + let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); + if (loose) { + rangeList = rangeList.filter((comp) => { + debug3("loose invalid filter", comp, this.options); + return !!comp.match(re[t8.COMPARATORLOOSE]); + }); + } + debug3("range list", rangeList); + const rangeMap = /* @__PURE__ */ new Map(); + const comparators = rangeList.map((comp) => new Comparator(comp, this.options)); + for (const comp of comparators) { + if (isNullSet(comp)) { + return [comp]; + } + rangeMap.set(comp.value, comp); + } + if (rangeMap.size > 1 && rangeMap.has("")) { + rangeMap.delete(""); + } + const result = [...rangeMap.values()]; + cache2.set(memoKey, result); + return result; + } + intersects(range, options) { + if (!(range instanceof _Range)) { + throw new TypeError("a Range is required"); + } + return this.set.some((thisComparators) => { + return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { + return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + } + // if ANY of the sets match ALL of its comparators, then pass + test(version5) { + if (!version5) { + return false; + } + if (typeof version5 === "string") { + try { + version5 = new SemVer(version5, this.options); + } catch (er) { + return false; + } + } + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version5, this.options)) { + return true; + } + } + return false; + } + }; + module2.exports = Range; + var LRU = require_lrucache(); + var cache2 = new LRU(); + var parseOptions = require_parse_options(); + var Comparator = require_comparator(); + var debug3 = require_debug2(); + var SemVer = require_semver(); + var { + safeRe: re, + t: t8, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace + } = require_re(); + var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants(); + var isNullSet = /* @__PURE__ */ __name((c) => c.value === "<0.0.0-0", "isNullSet"); + var isAny = /* @__PURE__ */ __name((c) => c.value === "", "isAny"); + var isSatisfiable = /* @__PURE__ */ __name((comparators, options) => { + let result = true; + const remainingComparators = comparators.slice(); + let testComparator = remainingComparators.pop(); + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options); + }); + testComparator = remainingComparators.pop(); + } + return result; + }, "isSatisfiable"); + var parseComparator = /* @__PURE__ */ __name((comp, options) => { + comp = comp.replace(re[t8.BUILD], ""); + debug3("comp", comp, options); + comp = replaceCarets(comp, options); + debug3("caret", comp); + comp = replaceTildes(comp, options); + debug3("tildes", comp); + comp = replaceXRanges(comp, options); + debug3("xrange", comp); + comp = replaceStars(comp, options); + debug3("stars", comp); + return comp; + }, "parseComparator"); + var isX = /* @__PURE__ */ __name((id) => !id || id.toLowerCase() === "x" || id === "*", "isX"); + var replaceTildes = /* @__PURE__ */ __name((comp, options) => { + return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "); + }, "replaceTildes"); + var replaceTilde = /* @__PURE__ */ __name((comp, options) => { + const r = options.loose ? re[t8.TILDELOOSE] : re[t8.TILDE]; + return comp.replace(r, (_, M, m, p, pr) => { + debug3("tilde", comp, _, M, m, p, pr); + let ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; + } else if (isX(p)) { + ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; + } else if (pr) { + debug3("replaceTilde pr", pr); + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } else { + ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; + } + debug3("tilde return", ret); + return ret; + }); + }, "replaceTilde"); + var replaceCarets = /* @__PURE__ */ __name((comp, options) => { + return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "); + }, "replaceCarets"); + var replaceCaret = /* @__PURE__ */ __name((comp, options) => { + debug3("caret", comp, options); + const r = options.loose ? re[t8.CARETLOOSE] : re[t8.CARET]; + const z2 = options.includePrerelease ? "-0" : ""; + return comp.replace(r, (_, M, m, p, pr) => { + debug3("caret", comp, _, M, m, p, pr); + let ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = `>=${M}.0.0${z2} <${+M + 1}.0.0-0`; + } else if (isX(p)) { + if (M === "0") { + ret = `>=${M}.${m}.0${z2} <${M}.${+m + 1}.0-0`; + } else { + ret = `>=${M}.${m}.0${z2} <${+M + 1}.0.0-0`; + } + } else if (pr) { + debug3("replaceCaret pr", pr); + if (M === "0") { + if (m === "0") { + ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; + } else { + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } + } else { + ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; + } + } else { + debug3("no pr"); + if (M === "0") { + if (m === "0") { + ret = `>=${M}.${m}.${p}${z2} <${M}.${m}.${+p + 1}-0`; + } else { + ret = `>=${M}.${m}.${p}${z2} <${M}.${+m + 1}.0-0`; + } + } else { + ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; + } + } + debug3("caret return", ret); + return ret; + }); + }, "replaceCaret"); + var replaceXRanges = /* @__PURE__ */ __name((comp, options) => { + debug3("replaceXRanges", comp, options); + return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" "); + }, "replaceXRanges"); + var replaceXRange = /* @__PURE__ */ __name((comp, options) => { + comp = comp.trim(); + const r = options.loose ? re[t8.XRANGELOOSE] : re[t8.XRANGE]; + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug3("xRange", comp, ret, gtlt, M, m, p, pr); + const xM = isX(M); + const xm = xM || isX(m); + const xp = xm || isX(p); + const anyX = xp; + if (gtlt === "=" && anyX) { + gtlt = ""; + } + pr = options.includePrerelease ? "-0" : ""; + if (xM) { + if (gtlt === ">" || gtlt === "<") { + ret = "<0.0.0-0"; + } else { + ret = "*"; + } + } else if (gtlt && anyX) { + if (xm) { + m = 0; + } + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else { + m = +m + 1; + p = 0; + } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) { + M = +M + 1; + } else { + m = +m + 1; + } + } + if (gtlt === "<") { + pr = "-0"; + } + ret = `${gtlt + M}.${m}.${p}${pr}`; + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; + } else if (xp) { + ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; + } + debug3("xRange return", ret); + return ret; + }); + }, "replaceXRange"); + var replaceStars = /* @__PURE__ */ __name((comp, options) => { + debug3("replaceStars", comp, options); + return comp.trim().replace(re[t8.STAR], ""); + }, "replaceStars"); + var replaceGTE0 = /* @__PURE__ */ __name((comp, options) => { + debug3("replaceGTE0", comp, options); + return comp.trim().replace(re[options.includePrerelease ? t8.GTE0PRE : t8.GTE0], ""); + }, "replaceGTE0"); + var hyphenReplace = /* @__PURE__ */ __name((incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => { + if (isX(fM)) { + from = ""; + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? "-0" : ""}`; + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; + } else if (fpr) { + from = `>=${from}`; + } else { + from = `>=${from}${incPr ? "-0" : ""}`; + } + if (isX(tM)) { + to = ""; + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0`; + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0`; + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}`; + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0`; + } else { + to = `<=${to}`; + } + return `${from} ${to}`.trim(); + }, "hyphenReplace"); + var testSet = /* @__PURE__ */ __name((set2, version5, options) => { + for (let i = 0; i < set2.length; i++) { + if (!set2[i].test(version5)) { + return false; + } + } + if (version5.prerelease.length && !options.includePrerelease) { + for (let i = 0; i < set2.length; i++) { + debug3(set2[i].semver); + if (set2[i].semver === Comparator.ANY) { + continue; + } + if (set2[i].semver.prerelease.length > 0) { + const allowed = set2[i].semver; + if (allowed.major === version5.major && allowed.minor === version5.minor && allowed.patch === version5.patch) { + return true; + } + } + } + return false; + } + return true; + }, "testSet"); + } +}); + +// ../../node_modules/bullmq/node_modules/semver/classes/comparator.js +var require_comparator = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/classes/comparator.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var ANY = /* @__PURE__ */ Symbol("SemVer ANY"); + var Comparator = class _Comparator { + static { + __name(this, "Comparator"); + } + static get ANY() { + return ANY; + } + constructor(comp, options) { + options = parseOptions(options); + if (comp instanceof _Comparator) { + if (comp.loose === !!options.loose) { + return comp; + } else { + comp = comp.value; + } + } + comp = comp.trim().split(/\s+/).join(" "); + debug3("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) { + this.value = ""; + } else { + this.value = this.operator + this.semver.version; + } + debug3("comp", this); + } + parse(comp) { + const r = this.options.loose ? re[t8.COMPARATORLOOSE] : re[t8.COMPARATOR]; + const m = comp.match(r); + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`); + } + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") { + this.operator = ""; + } + if (!m[2]) { + this.semver = ANY; + } else { + this.semver = new SemVer(m[2], this.options.loose); + } + } + toString() { + return this.value; + } + test(version5) { + debug3("Comparator.test", version5, this.options.loose); + if (this.semver === ANY || version5 === ANY) { + return true; + } + if (typeof version5 === "string") { + try { + version5 = new SemVer(version5, this.options); + } catch (er) { + return false; + } + } + return cmp(version5, this.operator, this.semver, this.options); + } + intersects(comp, options) { + if (!(comp instanceof _Comparator)) { + throw new TypeError("a Comparator is required"); + } + if (this.operator === "") { + if (this.value === "") { + return true; + } + return new Range(comp.value, options).test(this.value); + } else if (comp.operator === "") { + if (comp.value === "") { + return true; + } + return new Range(this.value, options).test(comp.semver); + } + options = parseOptions(options); + if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) { + return false; + } + if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) { + return false; + } + if (this.operator.startsWith(">") && comp.operator.startsWith(">")) { + return true; + } + if (this.operator.startsWith("<") && comp.operator.startsWith("<")) { + return true; + } + if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) { + return true; + } + if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) { + return true; + } + if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) { + return true; + } + return false; + } + }; + module2.exports = Comparator; + var parseOptions = require_parse_options(); + var { safeRe: re, t: t8 } = require_re(); + var cmp = require_cmp(); + var debug3 = require_debug2(); + var SemVer = require_semver(); + var Range = require_range(); + } +}); + +// ../../node_modules/bullmq/node_modules/semver/functions/satisfies.js +var require_satisfies = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/functions/satisfies.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var Range = require_range(); + var satisfies = /* @__PURE__ */ __name((version5, range, options) => { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version5); + }, "satisfies"); + module2.exports = satisfies; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/ranges/to-comparators.js +var require_to_comparators = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/ranges/to-comparators.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var Range = require_range(); + var toComparators = /* @__PURE__ */ __name((range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")), "toComparators"); + module2.exports = toComparators; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/ranges/max-satisfying.js +var require_max_satisfying = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/ranges/max-satisfying.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var SemVer = require_semver(); + var Range = require_range(); + var maxSatisfying = /* @__PURE__ */ __name((versions2, range, options) => { + let max2 = null; + let maxSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions2.forEach((v2) => { + if (rangeObj.test(v2)) { + if (!max2 || maxSV.compare(v2) === -1) { + max2 = v2; + maxSV = new SemVer(max2, options); + } + } + }); + return max2; + }, "maxSatisfying"); + module2.exports = maxSatisfying; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/ranges/min-satisfying.js +var require_min_satisfying = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/ranges/min-satisfying.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var SemVer = require_semver(); + var Range = require_range(); + var minSatisfying = /* @__PURE__ */ __name((versions2, range, options) => { + let min = null; + let minSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions2.forEach((v2) => { + if (rangeObj.test(v2)) { + if (!min || minSV.compare(v2) === 1) { + min = v2; + minSV = new SemVer(min, options); + } + } + }); + return min; + }, "minSatisfying"); + module2.exports = minSatisfying; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/ranges/min-version.js +var require_min_version = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/ranges/min-version.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var SemVer = require_semver(); + var Range = require_range(); + var gt2 = require_gt(); + var minVersion = /* @__PURE__ */ __name((range, loose) => { + range = new Range(range, loose); + let minver = new SemVer("0.0.0"); + if (range.test(minver)) { + return minver; + } + minver = new SemVer("0.0.0-0"); + if (range.test(minver)) { + return minver; + } + minver = null; + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let setMin = null; + comparators.forEach((comparator) => { + const compver = new SemVer(comparator.semver.version); + switch (comparator.operator) { + case ">": + if (compver.prerelease.length === 0) { + compver.patch++; + } else { + compver.prerelease.push(0); + } + compver.raw = compver.format(); + /* fallthrough */ + case "": + case ">=": + if (!setMin || gt2(compver, setMin)) { + setMin = compver; + } + break; + case "<": + case "<=": + break; + /* istanbul ignore next */ + default: + throw new Error(`Unexpected operation: ${comparator.operator}`); + } + }); + if (setMin && (!minver || gt2(minver, setMin))) { + minver = setMin; + } + } + if (minver && range.test(minver)) { + return minver; + } + return null; + }, "minVersion"); + module2.exports = minVersion; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/ranges/valid.js +var require_valid2 = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/ranges/valid.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var Range = require_range(); + var validRange = /* @__PURE__ */ __name((range, options) => { + try { + return new Range(range, options).range || "*"; + } catch (er) { + return null; + } + }, "validRange"); + module2.exports = validRange; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/ranges/outside.js +var require_outside = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/ranges/outside.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var SemVer = require_semver(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var Range = require_range(); + var satisfies = require_satisfies(); + var gt2 = require_gt(); + var lt3 = require_lt(); + var lte2 = require_lte(); + var gte2 = require_gte(); + var outside = /* @__PURE__ */ __name((version5, range, hilo, options) => { + version5 = new SemVer(version5, options); + range = new Range(range, options); + let gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case ">": + gtfn = gt2; + ltefn = lte2; + ltfn = lt3; + comp = ">"; + ecomp = ">="; + break; + case "<": + gtfn = lt3; + ltefn = gte2; + ltfn = gt2; + comp = "<"; + ecomp = "<="; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + if (satisfies(version5, range, options)) { + return false; + } + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let high = null; + let low = null; + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator(">=0.0.0"); + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; + } + }); + if (high.operator === comp || high.operator === ecomp) { + return false; + } + if ((!low.operator || low.operator === comp) && ltefn(version5, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version5, low.semver)) { + return false; + } + } + return true; + }, "outside"); + module2.exports = outside; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/ranges/gtr.js +var require_gtr = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/ranges/gtr.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var outside = require_outside(); + var gtr = /* @__PURE__ */ __name((version5, range, options) => outside(version5, range, ">", options), "gtr"); + module2.exports = gtr; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/ranges/ltr.js +var require_ltr = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/ranges/ltr.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var outside = require_outside(); + var ltr = /* @__PURE__ */ __name((version5, range, options) => outside(version5, range, "<", options), "ltr"); + module2.exports = ltr; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/ranges/intersects.js +var require_intersects = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/ranges/intersects.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var Range = require_range(); + var intersects = /* @__PURE__ */ __name((r1, r2, options) => { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2, options); + }, "intersects"); + module2.exports = intersects; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/ranges/simplify.js +var require_simplify = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/ranges/simplify.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var satisfies = require_satisfies(); + var compare2 = require_compare(); + module2.exports = (versions2, range, options) => { + const set2 = []; + let first = null; + let prev = null; + const v2 = versions2.sort((a, b) => compare2(a, b, options)); + for (const version5 of v2) { + const included = satisfies(version5, range, options); + if (included) { + prev = version5; + if (!first) { + first = version5; + } + } else { + if (prev) { + set2.push([first, prev]); + } + prev = null; + first = null; + } + } + if (first) { + set2.push([first, null]); + } + const ranges = []; + for (const [min, max2] of set2) { + if (min === max2) { + ranges.push(min); + } else if (!max2 && min === v2[0]) { + ranges.push("*"); + } else if (!max2) { + ranges.push(`>=${min}`); + } else if (min === v2[0]) { + ranges.push(`<=${max2}`); + } else { + ranges.push(`${min} - ${max2}`); + } + } + const simplified = ranges.join(" || "); + const original = typeof range.raw === "string" ? range.raw : String(range); + return simplified.length < original.length ? simplified : range; + }; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/ranges/subset.js +var require_subset = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/ranges/subset.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var Range = require_range(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var satisfies = require_satisfies(); + var compare2 = require_compare(); + var subset = /* @__PURE__ */ __name((sub, dom, options = {}) => { + if (sub === dom) { + return true; + } + sub = new Range(sub, options); + dom = new Range(dom, options); + let sawNonNull = false; + OUTER: for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options); + sawNonNull = sawNonNull || isSub !== null; + if (isSub) { + continue OUTER; + } + } + if (sawNonNull) { + return false; + } + } + return true; + }, "subset"); + var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")]; + var minimumVersion = [new Comparator(">=0.0.0")]; + var simpleSubset = /* @__PURE__ */ __name((sub, dom, options) => { + if (sub === dom) { + return true; + } + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) { + return true; + } else if (options.includePrerelease) { + sub = minimumVersionWithPreRelease; + } else { + sub = minimumVersion; + } + } + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) { + return true; + } else { + dom = minimumVersion; + } + } + const eqSet = /* @__PURE__ */ new Set(); + let gt2, lt3; + for (const c of sub) { + if (c.operator === ">" || c.operator === ">=") { + gt2 = higherGT(gt2, c, options); + } else if (c.operator === "<" || c.operator === "<=") { + lt3 = lowerLT(lt3, c, options); + } else { + eqSet.add(c.semver); + } + } + if (eqSet.size > 1) { + return null; + } + let gtltComp; + if (gt2 && lt3) { + gtltComp = compare2(gt2.semver, lt3.semver, options); + if (gtltComp > 0) { + return null; + } else if (gtltComp === 0 && (gt2.operator !== ">=" || lt3.operator !== "<=")) { + return null; + } + } + for (const eq2 of eqSet) { + if (gt2 && !satisfies(eq2, String(gt2), options)) { + return null; + } + if (lt3 && !satisfies(eq2, String(lt3), options)) { + return null; + } + for (const c of dom) { + if (!satisfies(eq2, String(c), options)) { + return false; + } + } + return true; + } + let higher, lower; + let hasDomLT, hasDomGT; + let needDomLTPre = lt3 && !options.includePrerelease && lt3.semver.prerelease.length ? lt3.semver : false; + let needDomGTPre = gt2 && !options.includePrerelease && gt2.semver.prerelease.length ? gt2.semver : false; + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt3.operator === "<" && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false; + } + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; + hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; + if (gt2) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false; + } + } + if (c.operator === ">" || c.operator === ">=") { + higher = higherGT(gt2, c, options); + if (higher === c && higher !== gt2) { + return false; + } + } else if (gt2.operator === ">=" && !satisfies(gt2.semver, String(c), options)) { + return false; + } + } + if (lt3) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false; + } + } + if (c.operator === "<" || c.operator === "<=") { + lower = lowerLT(lt3, c, options); + if (lower === c && lower !== lt3) { + return false; + } + } else if (lt3.operator === "<=" && !satisfies(lt3.semver, String(c), options)) { + return false; + } + } + if (!c.operator && (lt3 || gt2) && gtltComp !== 0) { + return false; + } + } + if (gt2 && hasDomLT && !lt3 && gtltComp !== 0) { + return false; + } + if (lt3 && hasDomGT && !gt2 && gtltComp !== 0) { + return false; + } + if (needDomGTPre || needDomLTPre) { + return false; + } + return true; + }, "simpleSubset"); + var higherGT = /* @__PURE__ */ __name((a, b, options) => { + if (!a) { + return b; + } + const comp = compare2(a.semver, b.semver, options); + return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; + }, "higherGT"); + var lowerLT = /* @__PURE__ */ __name((a, b, options) => { + if (!a) { + return b; + } + const comp = compare2(a.semver, b.semver, options); + return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; + }, "lowerLT"); + module2.exports = subset; + } +}); + +// ../../node_modules/bullmq/node_modules/semver/index.js +var require_semver2 = __commonJS({ + "../../node_modules/bullmq/node_modules/semver/index.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var internalRe = require_re(); + var constants = require_constants(); + var SemVer = require_semver(); + var identifiers = require_identifiers(); + var parse3 = require_parse(); + var valid2 = require_valid(); + var clean = require_clean(); + var inc = require_inc(); + var diff = require_diff(); + var major = require_major(); + var minor = require_minor(); + var patch = require_patch(); + var prerelease = require_prerelease(); + var compare2 = require_compare(); + var rcompare = require_rcompare(); + var compareLoose = require_compare_loose(); + var compareBuild = require_compare_build(); + var sort = require_sort(); + var rsort = require_rsort(); + var gt2 = require_gt(); + var lt3 = require_lt(); + var eq2 = require_eq(); + var neq = require_neq(); + var gte2 = require_gte(); + var lte2 = require_lte(); + var cmp = require_cmp(); + var coerce2 = require_coerce(); + var Comparator = require_comparator(); + var Range = require_range(); + var satisfies = require_satisfies(); + var toComparators = require_to_comparators(); + var maxSatisfying = require_max_satisfying(); + var minSatisfying = require_min_satisfying(); + var minVersion = require_min_version(); + var validRange = require_valid2(); + var outside = require_outside(); + var gtr = require_gtr(); + var ltr = require_ltr(); + var intersects = require_intersects(); + var simplifyRange = require_simplify(); + var subset = require_subset(); + module2.exports = { + parse: parse3, + valid: valid2, + clean, + inc, + diff, + major, + minor, + patch, + prerelease, + compare: compare2, + rcompare, + compareLoose, + compareBuild, + sort, + rsort, + gt: gt2, + lt: lt3, + eq: eq2, + neq, + gte: gte2, + lte: lte2, + cmp, + coerce: coerce2, + Comparator, + Range, + satisfies, + toComparators, + maxSatisfying, + minSatisfying, + minVersion, + validRange, + outside, + gtr, + ltr, + intersects, + simplifyRange, + subset, + SemVer, + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, + RELEASE_TYPES: constants.RELEASE_TYPES, + compareIdentifiers: identifiers.compareIdentifiers, + rcompareIdentifiers: identifiers.rcompareIdentifiers + }; + } +}); + +// ../../node_modules/luxon/build/node/luxon.js +var require_luxon = __commonJS({ + "../../node_modules/luxon/build/node/luxon.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + var LuxonError = class extends Error { + static { + __name(this, "LuxonError"); + } + }; + var InvalidDateTimeError = class extends LuxonError { + static { + __name(this, "InvalidDateTimeError"); + } + constructor(reason) { + super(`Invalid DateTime: ${reason.toMessage()}`); + } + }; + var InvalidIntervalError = class extends LuxonError { + static { + __name(this, "InvalidIntervalError"); + } + constructor(reason) { + super(`Invalid Interval: ${reason.toMessage()}`); + } + }; + var InvalidDurationError = class extends LuxonError { + static { + __name(this, "InvalidDurationError"); + } + constructor(reason) { + super(`Invalid Duration: ${reason.toMessage()}`); + } + }; + var ConflictingSpecificationError = class extends LuxonError { + static { + __name(this, "ConflictingSpecificationError"); + } + }; + var InvalidUnitError = class extends LuxonError { + static { + __name(this, "InvalidUnitError"); + } + constructor(unit) { + super(`Invalid unit ${unit}`); + } + }; + var InvalidArgumentError = class extends LuxonError { + static { + __name(this, "InvalidArgumentError"); + } + }; + var ZoneIsAbstractError = class extends LuxonError { + static { + __name(this, "ZoneIsAbstractError"); + } + constructor() { + super("Zone is an abstract class"); + } + }; + var n = "numeric"; + var s = "short"; + var l = "long"; + var DATE_SHORT = { + year: n, + month: n, + day: n + }; + var DATE_MED = { + year: n, + month: s, + day: n + }; + var DATE_MED_WITH_WEEKDAY = { + year: n, + month: s, + day: n, + weekday: s + }; + var DATE_FULL = { + year: n, + month: l, + day: n + }; + var DATE_HUGE = { + year: n, + month: l, + day: n, + weekday: l + }; + var TIME_SIMPLE = { + hour: n, + minute: n + }; + var TIME_WITH_SECONDS = { + hour: n, + minute: n, + second: n + }; + var TIME_WITH_SHORT_OFFSET = { + hour: n, + minute: n, + second: n, + timeZoneName: s + }; + var TIME_WITH_LONG_OFFSET = { + hour: n, + minute: n, + second: n, + timeZoneName: l + }; + var TIME_24_SIMPLE = { + hour: n, + minute: n, + hourCycle: "h23" + }; + var TIME_24_WITH_SECONDS = { + hour: n, + minute: n, + second: n, + hourCycle: "h23" + }; + var TIME_24_WITH_SHORT_OFFSET = { + hour: n, + minute: n, + second: n, + hourCycle: "h23", + timeZoneName: s + }; + var TIME_24_WITH_LONG_OFFSET = { + hour: n, + minute: n, + second: n, + hourCycle: "h23", + timeZoneName: l + }; + var DATETIME_SHORT = { + year: n, + month: n, + day: n, + hour: n, + minute: n + }; + var DATETIME_SHORT_WITH_SECONDS = { + year: n, + month: n, + day: n, + hour: n, + minute: n, + second: n + }; + var DATETIME_MED = { + year: n, + month: s, + day: n, + hour: n, + minute: n + }; + var DATETIME_MED_WITH_SECONDS = { + year: n, + month: s, + day: n, + hour: n, + minute: n, + second: n + }; + var DATETIME_MED_WITH_WEEKDAY = { + year: n, + month: s, + day: n, + weekday: s, + hour: n, + minute: n + }; + var DATETIME_FULL = { + year: n, + month: l, + day: n, + hour: n, + minute: n, + timeZoneName: s + }; + var DATETIME_FULL_WITH_SECONDS = { + year: n, + month: l, + day: n, + hour: n, + minute: n, + second: n, + timeZoneName: s + }; + var DATETIME_HUGE = { + year: n, + month: l, + day: n, + weekday: l, + hour: n, + minute: n, + timeZoneName: l + }; + var DATETIME_HUGE_WITH_SECONDS = { + year: n, + month: l, + day: n, + weekday: l, + hour: n, + minute: n, + second: n, + timeZoneName: l + }; + var Zone = class { + static { + __name(this, "Zone"); + } + /** + * The type of zone + * @abstract + * @type {string} + */ + get type() { + throw new ZoneIsAbstractError(); + } + /** + * The name of this zone. + * @abstract + * @type {string} + */ + get name() { + throw new ZoneIsAbstractError(); + } + /** + * The IANA name of this zone. + * Defaults to `name` if not overwritten by a subclass. + * @abstract + * @type {string} + */ + get ianaName() { + return this.name; + } + /** + * Returns whether the offset is known to be fixed for the whole year. + * @abstract + * @type {boolean} + */ + get isUniversal() { + throw new ZoneIsAbstractError(); + } + /** + * Returns the offset's common name (such as EST) at the specified timestamp + * @abstract + * @param {number} ts - Epoch milliseconds for which to get the name + * @param {Object} opts - Options to affect the format + * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'. + * @param {string} opts.locale - What locale to return the offset name in. + * @return {string} + */ + offsetName(ts, opts) { + throw new ZoneIsAbstractError(); + } + /** + * Returns the offset's value as a string + * @abstract + * @param {number} ts - Epoch milliseconds for which to get the offset + * @param {string} format - What style of offset to return. + * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively + * @return {string} + */ + formatOffset(ts, format) { + throw new ZoneIsAbstractError(); + } + /** + * Return the offset in minutes for this zone at the specified timestamp. + * @abstract + * @param {number} ts - Epoch milliseconds for which to compute the offset + * @return {number} + */ + offset(ts) { + throw new ZoneIsAbstractError(); + } + /** + * Return whether this Zone is equal to another zone + * @abstract + * @param {Zone} otherZone - the zone to compare + * @return {boolean} + */ + equals(otherZone) { + throw new ZoneIsAbstractError(); + } + /** + * Return whether this Zone is valid. + * @abstract + * @type {boolean} + */ + get isValid() { + throw new ZoneIsAbstractError(); + } + }; + var singleton$1 = null; + var SystemZone = class _SystemZone extends Zone { + static { + __name(this, "SystemZone"); + } + /** + * Get a singleton instance of the local zone + * @return {SystemZone} + */ + static get instance() { + if (singleton$1 === null) { + singleton$1 = new _SystemZone(); + } + return singleton$1; + } + /** @override **/ + get type() { + return "system"; + } + /** @override **/ + get name() { + return new Intl.DateTimeFormat().resolvedOptions().timeZone; + } + /** @override **/ + get isUniversal() { + return false; + } + /** @override **/ + offsetName(ts, { + format, + locale + }) { + return parseZoneInfo(ts, format, locale); + } + /** @override **/ + formatOffset(ts, format) { + return formatOffset(this.offset(ts), format); + } + /** @override **/ + offset(ts) { + return -new Date(ts).getTimezoneOffset(); + } + /** @override **/ + equals(otherZone) { + return otherZone.type === "system"; + } + /** @override **/ + get isValid() { + return true; + } + }; + var dtfCache = /* @__PURE__ */ new Map(); + function makeDTF(zoneName) { + let dtf = dtfCache.get(zoneName); + if (dtf === void 0) { + dtf = new Intl.DateTimeFormat("en-US", { + hour12: false, + timeZone: zoneName, + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + second: "2-digit", + era: "short" + }); + dtfCache.set(zoneName, dtf); + } + return dtf; + } + __name(makeDTF, "makeDTF"); + var typeToPos = { + year: 0, + month: 1, + day: 2, + era: 3, + hour: 4, + minute: 5, + second: 6 + }; + function hackyOffset(dtf, date5) { + const formatted = dtf.format(date5).replace(/\u200E/g, ""), parsed = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(formatted), [, fMonth, fDay, fYear, fadOrBc, fHour, fMinute, fSecond] = parsed; + return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond]; + } + __name(hackyOffset, "hackyOffset"); + function partsOffset(dtf, date5) { + const formatted = dtf.formatToParts(date5); + const filled = []; + for (let i = 0; i < formatted.length; i++) { + const { + type, + value + } = formatted[i]; + const pos = typeToPos[type]; + if (type === "era") { + filled[pos] = value; + } else if (!isUndefined2(pos)) { + filled[pos] = parseInt(value, 10); + } + } + return filled; + } + __name(partsOffset, "partsOffset"); + var ianaZoneCache = /* @__PURE__ */ new Map(); + var IANAZone = class _IANAZone extends Zone { + static { + __name(this, "IANAZone"); + } + /** + * @param {string} name - Zone name + * @return {IANAZone} + */ + static create(name) { + let zone = ianaZoneCache.get(name); + if (zone === void 0) { + ianaZoneCache.set(name, zone = new _IANAZone(name)); + } + return zone; + } + /** + * Reset local caches. Should only be necessary in testing scenarios. + * @return {void} + */ + static resetCache() { + ianaZoneCache.clear(); + dtfCache.clear(); + } + /** + * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that. + * @param {string} s - The string to check validity on + * @example IANAZone.isValidSpecifier("America/New_York") //=> true + * @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false + * @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead. + * @return {boolean} + */ + static isValidSpecifier(s2) { + return this.isValidZone(s2); + } + /** + * Returns whether the provided string identifies a real zone + * @param {string} zone - The string to check + * @example IANAZone.isValidZone("America/New_York") //=> true + * @example IANAZone.isValidZone("Fantasia/Castle") //=> false + * @example IANAZone.isValidZone("Sport~~blorp") //=> false + * @return {boolean} + */ + static isValidZone(zone) { + if (!zone) { + return false; + } + try { + new Intl.DateTimeFormat("en-US", { + timeZone: zone + }).format(); + return true; + } catch (e) { + return false; + } + } + constructor(name) { + super(); + this.zoneName = name; + this.valid = _IANAZone.isValidZone(name); + } + /** + * The type of zone. `iana` for all instances of `IANAZone`. + * @override + * @type {string} + */ + get type() { + return "iana"; + } + /** + * The name of this zone (i.e. the IANA zone name). + * @override + * @type {string} + */ + get name() { + return this.zoneName; + } + /** + * Returns whether the offset is known to be fixed for the whole year: + * Always returns false for all IANA zones. + * @override + * @type {boolean} + */ + get isUniversal() { + return false; + } + /** + * Returns the offset's common name (such as EST) at the specified timestamp + * @override + * @param {number} ts - Epoch milliseconds for which to get the name + * @param {Object} opts - Options to affect the format + * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'. + * @param {string} opts.locale - What locale to return the offset name in. + * @return {string} + */ + offsetName(ts, { + format, + locale + }) { + return parseZoneInfo(ts, format, locale, this.name); + } + /** + * Returns the offset's value as a string + * @override + * @param {number} ts - Epoch milliseconds for which to get the offset + * @param {string} format - What style of offset to return. + * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively + * @return {string} + */ + formatOffset(ts, format) { + return formatOffset(this.offset(ts), format); + } + /** + * Return the offset in minutes for this zone at the specified timestamp. + * @override + * @param {number} ts - Epoch milliseconds for which to compute the offset + * @return {number} + */ + offset(ts) { + if (!this.valid) return NaN; + const date5 = new Date(ts); + if (isNaN(date5)) return NaN; + const dtf = makeDTF(this.name); + let [year2, month, day2, adOrBc, hour2, minute2, second] = dtf.formatToParts ? partsOffset(dtf, date5) : hackyOffset(dtf, date5); + if (adOrBc === "BC") { + year2 = -Math.abs(year2) + 1; + } + const adjustedHour = hour2 === 24 ? 0 : hour2; + const asUTC = objToLocalTS({ + year: year2, + month, + day: day2, + hour: adjustedHour, + minute: minute2, + second, + millisecond: 0 + }); + let asTS = +date5; + const over = asTS % 1e3; + asTS -= over >= 0 ? over : 1e3 + over; + return (asUTC - asTS) / (60 * 1e3); + } + /** + * Return whether this Zone is equal to another zone + * @override + * @param {Zone} otherZone - the zone to compare + * @return {boolean} + */ + equals(otherZone) { + return otherZone.type === "iana" && otherZone.name === this.name; + } + /** + * Return whether this Zone is valid. + * @override + * @type {boolean} + */ + get isValid() { + return this.valid; + } + }; + var intlLFCache = {}; + function getCachedLF(locString, opts = {}) { + const key = JSON.stringify([locString, opts]); + let dtf = intlLFCache[key]; + if (!dtf) { + dtf = new Intl.ListFormat(locString, opts); + intlLFCache[key] = dtf; + } + return dtf; + } + __name(getCachedLF, "getCachedLF"); + var intlDTCache = /* @__PURE__ */ new Map(); + function getCachedDTF(locString, opts = {}) { + const key = JSON.stringify([locString, opts]); + let dtf = intlDTCache.get(key); + if (dtf === void 0) { + dtf = new Intl.DateTimeFormat(locString, opts); + intlDTCache.set(key, dtf); + } + return dtf; + } + __name(getCachedDTF, "getCachedDTF"); + var intlNumCache = /* @__PURE__ */ new Map(); + function getCachedINF(locString, opts = {}) { + const key = JSON.stringify([locString, opts]); + let inf = intlNumCache.get(key); + if (inf === void 0) { + inf = new Intl.NumberFormat(locString, opts); + intlNumCache.set(key, inf); + } + return inf; + } + __name(getCachedINF, "getCachedINF"); + var intlRelCache = /* @__PURE__ */ new Map(); + function getCachedRTF(locString, opts = {}) { + const { + base, + ...cacheKeyOpts + } = opts; + const key = JSON.stringify([locString, cacheKeyOpts]); + let inf = intlRelCache.get(key); + if (inf === void 0) { + inf = new Intl.RelativeTimeFormat(locString, opts); + intlRelCache.set(key, inf); + } + return inf; + } + __name(getCachedRTF, "getCachedRTF"); + var sysLocaleCache = null; + function systemLocale() { + if (sysLocaleCache) { + return sysLocaleCache; + } else { + sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale; + return sysLocaleCache; + } + } + __name(systemLocale, "systemLocale"); + var intlResolvedOptionsCache = /* @__PURE__ */ new Map(); + function getCachedIntResolvedOptions(locString) { + let opts = intlResolvedOptionsCache.get(locString); + if (opts === void 0) { + opts = new Intl.DateTimeFormat(locString).resolvedOptions(); + intlResolvedOptionsCache.set(locString, opts); + } + return opts; + } + __name(getCachedIntResolvedOptions, "getCachedIntResolvedOptions"); + var weekInfoCache = /* @__PURE__ */ new Map(); + function getCachedWeekInfo(locString) { + let data = weekInfoCache.get(locString); + if (!data) { + const locale = new Intl.Locale(locString); + data = "getWeekInfo" in locale ? locale.getWeekInfo() : locale.weekInfo; + if (!("minimalDays" in data)) { + data = { + ...fallbackWeekSettings, + ...data + }; + } + weekInfoCache.set(locString, data); + } + return data; + } + __name(getCachedWeekInfo, "getCachedWeekInfo"); + function parseLocaleString(localeStr) { + const xIndex = localeStr.indexOf("-x-"); + if (xIndex !== -1) { + localeStr = localeStr.substring(0, xIndex); + } + const uIndex = localeStr.indexOf("-u-"); + if (uIndex === -1) { + return [localeStr]; + } else { + let options; + let selectedStr; + try { + options = getCachedDTF(localeStr).resolvedOptions(); + selectedStr = localeStr; + } catch (e) { + const smaller = localeStr.substring(0, uIndex); + options = getCachedDTF(smaller).resolvedOptions(); + selectedStr = smaller; + } + const { + numberingSystem, + calendar + } = options; + return [selectedStr, numberingSystem, calendar]; + } + } + __name(parseLocaleString, "parseLocaleString"); + function intlConfigString(localeStr, numberingSystem, outputCalendar) { + if (outputCalendar || numberingSystem) { + if (!localeStr.includes("-u-")) { + localeStr += "-u"; + } + if (outputCalendar) { + localeStr += `-ca-${outputCalendar}`; + } + if (numberingSystem) { + localeStr += `-nu-${numberingSystem}`; + } + return localeStr; + } else { + return localeStr; + } + } + __name(intlConfigString, "intlConfigString"); + function mapMonths(f) { + const ms = []; + for (let i = 1; i <= 12; i++) { + const dt = DateTime.utc(2009, i, 1); + ms.push(f(dt)); + } + return ms; + } + __name(mapMonths, "mapMonths"); + function mapWeekdays(f) { + const ms = []; + for (let i = 1; i <= 7; i++) { + const dt = DateTime.utc(2016, 11, 13 + i); + ms.push(f(dt)); + } + return ms; + } + __name(mapWeekdays, "mapWeekdays"); + function listStuff(loc, length, englishFn, intlFn) { + const mode = loc.listingMode(); + if (mode === "error") { + return null; + } else if (mode === "en") { + return englishFn(length); + } else { + return intlFn(length); + } + } + __name(listStuff, "listStuff"); + function supportsFastNumbers(loc) { + if (loc.numberingSystem && loc.numberingSystem !== "latn") { + return false; + } else { + return loc.numberingSystem === "latn" || !loc.locale || loc.locale.startsWith("en") || getCachedIntResolvedOptions(loc.locale).numberingSystem === "latn"; + } + } + __name(supportsFastNumbers, "supportsFastNumbers"); + var PolyNumberFormatter = class { + static { + __name(this, "PolyNumberFormatter"); + } + constructor(intl, forceSimple, opts) { + this.padTo = opts.padTo || 0; + this.floor = opts.floor || false; + const { + padTo, + floor, + ...otherOpts + } = opts; + if (!forceSimple || Object.keys(otherOpts).length > 0) { + const intlOpts = { + useGrouping: false, + ...opts + }; + if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo; + this.inf = getCachedINF(intl, intlOpts); + } + } + format(i) { + if (this.inf) { + const fixed = this.floor ? Math.floor(i) : i; + return this.inf.format(fixed); + } else { + const fixed = this.floor ? Math.floor(i) : roundTo(i, 3); + return padStart(fixed, this.padTo); + } + } + }; + var PolyDateFormatter = class { + static { + __name(this, "PolyDateFormatter"); + } + constructor(dt, intl, opts) { + this.opts = opts; + this.originalZone = void 0; + let z2 = void 0; + if (this.opts.timeZone) { + this.dt = dt; + } else if (dt.zone.type === "fixed") { + const gmtOffset = -1 * (dt.offset / 60); + const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`; + if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) { + z2 = offsetZ; + this.dt = dt; + } else { + z2 = "UTC"; + this.dt = dt.offset === 0 ? dt : dt.setZone("UTC").plus({ + minutes: dt.offset + }); + this.originalZone = dt.zone; + } + } else if (dt.zone.type === "system") { + this.dt = dt; + } else if (dt.zone.type === "iana") { + this.dt = dt; + z2 = dt.zone.name; + } else { + z2 = "UTC"; + this.dt = dt.setZone("UTC").plus({ + minutes: dt.offset + }); + this.originalZone = dt.zone; + } + const intlOpts = { + ...this.opts + }; + intlOpts.timeZone = intlOpts.timeZone || z2; + this.dtf = getCachedDTF(intl, intlOpts); + } + format() { + if (this.originalZone) { + return this.formatToParts().map(({ + value + }) => value).join(""); + } + return this.dtf.format(this.dt.toJSDate()); + } + formatToParts() { + const parts = this.dtf.formatToParts(this.dt.toJSDate()); + if (this.originalZone) { + return parts.map((part) => { + if (part.type === "timeZoneName") { + const offsetName = this.originalZone.offsetName(this.dt.ts, { + locale: this.dt.locale, + format: this.opts.timeZoneName + }); + return { + ...part, + value: offsetName + }; + } else { + return part; + } + }); + } + return parts; + } + resolvedOptions() { + return this.dtf.resolvedOptions(); + } + }; + var PolyRelFormatter = class { + static { + __name(this, "PolyRelFormatter"); + } + constructor(intl, isEnglish, opts) { + this.opts = { + style: "long", + ...opts + }; + if (!isEnglish && hasRelative()) { + this.rtf = getCachedRTF(intl, opts); + } + } + format(count4, unit) { + if (this.rtf) { + return this.rtf.format(count4, unit); + } else { + return formatRelativeTime(unit, count4, this.opts.numeric, this.opts.style !== "long"); + } + } + formatToParts(count4, unit) { + if (this.rtf) { + return this.rtf.formatToParts(count4, unit); + } else { + return []; + } + } + }; + var fallbackWeekSettings = { + firstDay: 1, + minimalDays: 4, + weekend: [6, 7] + }; + var Locale = class _Locale { + static { + __name(this, "Locale"); + } + static fromOpts(opts) { + return _Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.weekSettings, opts.defaultToEN); + } + static create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN = false) { + const specifiedLocale = locale || Settings.defaultLocale; + const localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale()); + const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem; + const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar; + const weekSettingsR = validateWeekSettings(weekSettings) || Settings.defaultWeekSettings; + return new _Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale); + } + static resetCache() { + sysLocaleCache = null; + intlDTCache.clear(); + intlNumCache.clear(); + intlRelCache.clear(); + intlResolvedOptionsCache.clear(); + weekInfoCache.clear(); + } + static fromObject({ + locale, + numberingSystem, + outputCalendar, + weekSettings + } = {}) { + return _Locale.create(locale, numberingSystem, outputCalendar, weekSettings); + } + constructor(locale, numbering, outputCalendar, weekSettings, specifiedLocale) { + const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale); + this.locale = parsedLocale; + this.numberingSystem = numbering || parsedNumberingSystem || null; + this.outputCalendar = outputCalendar || parsedOutputCalendar || null; + this.weekSettings = weekSettings; + this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar); + this.weekdaysCache = { + format: {}, + standalone: {} + }; + this.monthsCache = { + format: {}, + standalone: {} + }; + this.meridiemCache = null; + this.eraCache = {}; + this.specifiedLocale = specifiedLocale; + this.fastNumbersCached = null; + } + get fastNumbers() { + if (this.fastNumbersCached == null) { + this.fastNumbersCached = supportsFastNumbers(this); + } + return this.fastNumbersCached; + } + listingMode() { + const isActuallyEn = this.isEnglish(); + const hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory"); + return isActuallyEn && hasNoWeirdness ? "en" : "intl"; + } + clone(alts) { + if (!alts || Object.getOwnPropertyNames(alts).length === 0) { + return this; + } else { + return _Locale.create(alts.locale || this.specifiedLocale, alts.numberingSystem || this.numberingSystem, alts.outputCalendar || this.outputCalendar, validateWeekSettings(alts.weekSettings) || this.weekSettings, alts.defaultToEN || false); + } + } + redefaultToEN(alts = {}) { + return this.clone({ + ...alts, + defaultToEN: true + }); + } + redefaultToSystem(alts = {}) { + return this.clone({ + ...alts, + defaultToEN: false + }); + } + months(length, format = false) { + return listStuff(this, length, months, () => { + const monthSpecialCase = this.intl === "ja" || this.intl.startsWith("ja-"); + format &= !monthSpecialCase; + const intl = format ? { + month: length, + day: "numeric" + } : { + month: length + }, formatStr = format ? "format" : "standalone"; + if (!this.monthsCache[formatStr][length]) { + const mapper = !monthSpecialCase ? (dt) => this.extract(dt, intl, "month") : (dt) => this.dtFormatter(dt, intl).format(); + this.monthsCache[formatStr][length] = mapMonths(mapper); + } + return this.monthsCache[formatStr][length]; + }); + } + weekdays(length, format = false) { + return listStuff(this, length, weekdays, () => { + const intl = format ? { + weekday: length, + year: "numeric", + month: "long", + day: "numeric" + } : { + weekday: length + }, formatStr = format ? "format" : "standalone"; + if (!this.weekdaysCache[formatStr][length]) { + this.weekdaysCache[formatStr][length] = mapWeekdays((dt) => this.extract(dt, intl, "weekday")); + } + return this.weekdaysCache[formatStr][length]; + }); + } + meridiems() { + return listStuff(this, void 0, () => meridiems, () => { + if (!this.meridiemCache) { + const intl = { + hour: "numeric", + hourCycle: "h12" + }; + this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map((dt) => this.extract(dt, intl, "dayperiod")); + } + return this.meridiemCache; + }); + } + eras(length) { + return listStuff(this, length, eras, () => { + const intl = { + era: length + }; + if (!this.eraCache[length]) { + this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map((dt) => this.extract(dt, intl, "era")); + } + return this.eraCache[length]; + }); + } + extract(dt, intlOpts, field) { + const df = this.dtFormatter(dt, intlOpts), results = df.formatToParts(), matching = results.find((m) => m.type.toLowerCase() === field); + return matching ? matching.value : null; + } + numberFormatter(opts = {}) { + return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts); + } + dtFormatter(dt, intlOpts = {}) { + return new PolyDateFormatter(dt, this.intl, intlOpts); + } + relFormatter(opts = {}) { + return new PolyRelFormatter(this.intl, this.isEnglish(), opts); + } + listFormatter(opts = {}) { + return getCachedLF(this.intl, opts); + } + isEnglish() { + return this.locale === "en" || this.locale.toLowerCase() === "en-us" || getCachedIntResolvedOptions(this.intl).locale.startsWith("en-us"); + } + getWeekSettings() { + if (this.weekSettings) { + return this.weekSettings; + } else if (!hasLocaleWeekInfo()) { + return fallbackWeekSettings; + } else { + return getCachedWeekInfo(this.locale); + } + } + getStartOfWeek() { + return this.getWeekSettings().firstDay; + } + getMinDaysInFirstWeek() { + return this.getWeekSettings().minimalDays; + } + getWeekendDays() { + return this.getWeekSettings().weekend; + } + equals(other) { + return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar; + } + toString() { + return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`; + } + }; + var singleton = null; + var FixedOffsetZone = class _FixedOffsetZone extends Zone { + static { + __name(this, "FixedOffsetZone"); + } + /** + * Get a singleton instance of UTC + * @return {FixedOffsetZone} + */ + static get utcInstance() { + if (singleton === null) { + singleton = new _FixedOffsetZone(0); + } + return singleton; + } + /** + * Get an instance with a specified offset + * @param {number} offset - The offset in minutes + * @return {FixedOffsetZone} + */ + static instance(offset2) { + return offset2 === 0 ? _FixedOffsetZone.utcInstance : new _FixedOffsetZone(offset2); + } + /** + * Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6" + * @param {string} s - The offset string to parse + * @example FixedOffsetZone.parseSpecifier("UTC+6") + * @example FixedOffsetZone.parseSpecifier("UTC+06") + * @example FixedOffsetZone.parseSpecifier("UTC-6:00") + * @return {FixedOffsetZone} + */ + static parseSpecifier(s2) { + if (s2) { + const r = s2.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i); + if (r) { + return new _FixedOffsetZone(signedOffset(r[1], r[2])); + } + } + return null; + } + constructor(offset2) { + super(); + this.fixed = offset2; + } + /** + * The type of zone. `fixed` for all instances of `FixedOffsetZone`. + * @override + * @type {string} + */ + get type() { + return "fixed"; + } + /** + * The name of this zone. + * All fixed zones' names always start with "UTC" (plus optional offset) + * @override + * @type {string} + */ + get name() { + return this.fixed === 0 ? "UTC" : `UTC${formatOffset(this.fixed, "narrow")}`; + } + /** + * The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn` + * + * @override + * @type {string} + */ + get ianaName() { + if (this.fixed === 0) { + return "Etc/UTC"; + } else { + return `Etc/GMT${formatOffset(-this.fixed, "narrow")}`; + } + } + /** + * Returns the offset's common name at the specified timestamp. + * + * For fixed offset zones this equals to the zone name. + * @override + */ + offsetName() { + return this.name; + } + /** + * Returns the offset's value as a string + * @override + * @param {number} ts - Epoch milliseconds for which to get the offset + * @param {string} format - What style of offset to return. + * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively + * @return {string} + */ + formatOffset(ts, format) { + return formatOffset(this.fixed, format); + } + /** + * Returns whether the offset is known to be fixed for the whole year: + * Always returns true for all fixed offset zones. + * @override + * @type {boolean} + */ + get isUniversal() { + return true; + } + /** + * Return the offset in minutes for this zone at the specified timestamp. + * + * For fixed offset zones, this is constant and does not depend on a timestamp. + * @override + * @return {number} + */ + offset() { + return this.fixed; + } + /** + * Return whether this Zone is equal to another zone (i.e. also fixed and same offset) + * @override + * @param {Zone} otherZone - the zone to compare + * @return {boolean} + */ + equals(otherZone) { + return otherZone.type === "fixed" && otherZone.fixed === this.fixed; + } + /** + * Return whether this Zone is valid: + * All fixed offset zones are valid. + * @override + * @type {boolean} + */ + get isValid() { + return true; + } + }; + var InvalidZone = class extends Zone { + static { + __name(this, "InvalidZone"); + } + constructor(zoneName) { + super(); + this.zoneName = zoneName; + } + /** @override **/ + get type() { + return "invalid"; + } + /** @override **/ + get name() { + return this.zoneName; + } + /** @override **/ + get isUniversal() { + return false; + } + /** @override **/ + offsetName() { + return null; + } + /** @override **/ + formatOffset() { + return ""; + } + /** @override **/ + offset() { + return NaN; + } + /** @override **/ + equals() { + return false; + } + /** @override **/ + get isValid() { + return false; + } + }; + function normalizeZone(input, defaultZone2) { + if (isUndefined2(input) || input === null) { + return defaultZone2; + } else if (input instanceof Zone) { + return input; + } else if (isString2(input)) { + const lowered = input.toLowerCase(); + if (lowered === "default") return defaultZone2; + else if (lowered === "local" || lowered === "system") return SystemZone.instance; + else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance; + else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input); + } else if (isNumber3(input)) { + return FixedOffsetZone.instance(input); + } else if (typeof input === "object" && "offset" in input && typeof input.offset === "function") { + return input; + } else { + return new InvalidZone(input); + } + } + __name(normalizeZone, "normalizeZone"); + var numberingSystems = { + arab: "[\u0660-\u0669]", + arabext: "[\u06F0-\u06F9]", + bali: "[\u1B50-\u1B59]", + beng: "[\u09E6-\u09EF]", + deva: "[\u0966-\u096F]", + fullwide: "[\uFF10-\uFF19]", + gujr: "[\u0AE6-\u0AEF]", + hanidec: "[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]", + khmr: "[\u17E0-\u17E9]", + knda: "[\u0CE6-\u0CEF]", + laoo: "[\u0ED0-\u0ED9]", + limb: "[\u1946-\u194F]", + mlym: "[\u0D66-\u0D6F]", + mong: "[\u1810-\u1819]", + mymr: "[\u1040-\u1049]", + orya: "[\u0B66-\u0B6F]", + tamldec: "[\u0BE6-\u0BEF]", + telu: "[\u0C66-\u0C6F]", + thai: "[\u0E50-\u0E59]", + tibt: "[\u0F20-\u0F29]", + latn: "\\d" + }; + var numberingSystemsUTF16 = { + arab: [1632, 1641], + arabext: [1776, 1785], + bali: [6992, 7001], + beng: [2534, 2543], + deva: [2406, 2415], + fullwide: [65296, 65303], + gujr: [2790, 2799], + khmr: [6112, 6121], + knda: [3302, 3311], + laoo: [3792, 3801], + limb: [6470, 6479], + mlym: [3430, 3439], + mong: [6160, 6169], + mymr: [4160, 4169], + orya: [2918, 2927], + tamldec: [3046, 3055], + telu: [3174, 3183], + thai: [3664, 3673], + tibt: [3872, 3881] + }; + var hanidecChars = numberingSystems.hanidec.replace(/[\[|\]]/g, "").split(""); + function parseDigits(str) { + let value = parseInt(str, 10); + if (isNaN(value)) { + value = ""; + for (let i = 0; i < str.length; i++) { + const code = str.charCodeAt(i); + if (str[i].search(numberingSystems.hanidec) !== -1) { + value += hanidecChars.indexOf(str[i]); + } else { + for (const key in numberingSystemsUTF16) { + const [min, max2] = numberingSystemsUTF16[key]; + if (code >= min && code <= max2) { + value += code - min; + } + } + } + } + return parseInt(value, 10); + } else { + return value; + } + } + __name(parseDigits, "parseDigits"); + var digitRegexCache = /* @__PURE__ */ new Map(); + function resetDigitRegexCache() { + digitRegexCache.clear(); + } + __name(resetDigitRegexCache, "resetDigitRegexCache"); + function digitRegex({ + numberingSystem + }, append2 = "") { + const ns = numberingSystem || "latn"; + let appendCache = digitRegexCache.get(ns); + if (appendCache === void 0) { + appendCache = /* @__PURE__ */ new Map(); + digitRegexCache.set(ns, appendCache); + } + let regex = appendCache.get(append2); + if (regex === void 0) { + regex = new RegExp(`${numberingSystems[ns]}${append2}`); + appendCache.set(append2, regex); + } + return regex; + } + __name(digitRegex, "digitRegex"); + var now = /* @__PURE__ */ __name(() => Date.now(), "now"); + var defaultZone = "system"; + var defaultLocale = null; + var defaultNumberingSystem = null; + var defaultOutputCalendar = null; + var twoDigitCutoffYear = 60; + var throwOnInvalid; + var defaultWeekSettings = null; + var Settings = class { + static { + __name(this, "Settings"); + } + /** + * Get the callback for returning the current timestamp. + * @type {function} + */ + static get now() { + return now; + } + /** + * Set the callback for returning the current timestamp. + * The function should return a number, which will be interpreted as an Epoch millisecond count + * @type {function} + * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future + * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time + */ + static set now(n2) { + now = n2; + } + /** + * Set the default time zone to create DateTimes in. Does not affect existing instances. + * Use the value "system" to reset this value to the system's time zone. + * @type {string} + */ + static set defaultZone(zone) { + defaultZone = zone; + } + /** + * Get the default time zone object currently used to create DateTimes. Does not affect existing instances. + * The default value is the system's time zone (the one set on the machine that runs this code). + * @type {Zone} + */ + static get defaultZone() { + return normalizeZone(defaultZone, SystemZone.instance); + } + /** + * Get the default locale to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static get defaultLocale() { + return defaultLocale; + } + /** + * Set the default locale to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static set defaultLocale(locale) { + defaultLocale = locale; + } + /** + * Get the default numbering system to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static get defaultNumberingSystem() { + return defaultNumberingSystem; + } + /** + * Set the default numbering system to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static set defaultNumberingSystem(numberingSystem) { + defaultNumberingSystem = numberingSystem; + } + /** + * Get the default output calendar to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static get defaultOutputCalendar() { + return defaultOutputCalendar; + } + /** + * Set the default output calendar to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static set defaultOutputCalendar(outputCalendar) { + defaultOutputCalendar = outputCalendar; + } + /** + * @typedef {Object} WeekSettings + * @property {number} firstDay + * @property {number} minimalDays + * @property {number[]} weekend + */ + /** + * @return {WeekSettings|null} + */ + static get defaultWeekSettings() { + return defaultWeekSettings; + } + /** + * Allows overriding the default locale week settings, i.e. the start of the week, the weekend and + * how many days are required in the first week of a year. + * Does not affect existing instances. + * + * @param {WeekSettings|null} weekSettings + */ + static set defaultWeekSettings(weekSettings) { + defaultWeekSettings = validateWeekSettings(weekSettings); + } + /** + * Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx. + * @type {number} + */ + static get twoDigitCutoffYear() { + return twoDigitCutoffYear; + } + /** + * Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx. + * @type {number} + * @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century + * @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century + * @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950 + * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50 + * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50 + */ + static set twoDigitCutoffYear(cutoffYear) { + twoDigitCutoffYear = cutoffYear % 100; + } + /** + * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals + * @type {boolean} + */ + static get throwOnInvalid() { + return throwOnInvalid; + } + /** + * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals + * @type {boolean} + */ + static set throwOnInvalid(t8) { + throwOnInvalid = t8; + } + /** + * Reset Luxon's global caches. Should only be necessary in testing scenarios. + * @return {void} + */ + static resetCaches() { + Locale.resetCache(); + IANAZone.resetCache(); + DateTime.resetCache(); + resetDigitRegexCache(); + } + }; + var Invalid = class { + static { + __name(this, "Invalid"); + } + constructor(reason, explanation) { + this.reason = reason; + this.explanation = explanation; + } + toMessage() { + if (this.explanation) { + return `${this.reason}: ${this.explanation}`; + } else { + return this.reason; + } + } + }; + var nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; + var leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]; + function unitOutOfRange(unit, value) { + return new Invalid("unit out of range", `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`); + } + __name(unitOutOfRange, "unitOutOfRange"); + function dayOfWeek(year2, month, day2) { + const d = new Date(Date.UTC(year2, month - 1, day2)); + if (year2 < 100 && year2 >= 0) { + d.setUTCFullYear(d.getUTCFullYear() - 1900); + } + const js = d.getUTCDay(); + return js === 0 ? 7 : js; + } + __name(dayOfWeek, "dayOfWeek"); + function computeOrdinal(year2, month, day2) { + return day2 + (isLeapYear2(year2) ? leapLadder : nonLeapLadder)[month - 1]; + } + __name(computeOrdinal, "computeOrdinal"); + function uncomputeOrdinal(year2, ordinal) { + const table3 = isLeapYear2(year2) ? leapLadder : nonLeapLadder, month0 = table3.findIndex((i) => i < ordinal), day2 = ordinal - table3[month0]; + return { + month: month0 + 1, + day: day2 + }; + } + __name(uncomputeOrdinal, "uncomputeOrdinal"); + function isoWeekdayToLocal(isoWeekday, startOfWeek) { + return (isoWeekday - startOfWeek + 7) % 7 + 1; + } + __name(isoWeekdayToLocal, "isoWeekdayToLocal"); + function gregorianToWeek(gregObj, minDaysInFirstWeek = 4, startOfWeek = 1) { + const { + year: year2, + month, + day: day2 + } = gregObj, ordinal = computeOrdinal(year2, month, day2), weekday = isoWeekdayToLocal(dayOfWeek(year2, month, day2), startOfWeek); + let weekNumber = Math.floor((ordinal - weekday + 14 - minDaysInFirstWeek) / 7), weekYear; + if (weekNumber < 1) { + weekYear = year2 - 1; + weekNumber = weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek); + } else if (weekNumber > weeksInWeekYear(year2, minDaysInFirstWeek, startOfWeek)) { + weekYear = year2 + 1; + weekNumber = 1; + } else { + weekYear = year2; + } + return { + weekYear, + weekNumber, + weekday, + ...timeObject(gregObj) + }; + } + __name(gregorianToWeek, "gregorianToWeek"); + function weekToGregorian(weekData, minDaysInFirstWeek = 4, startOfWeek = 1) { + const { + weekYear, + weekNumber, + weekday + } = weekData, weekdayOfJan4 = isoWeekdayToLocal(dayOfWeek(weekYear, 1, minDaysInFirstWeek), startOfWeek), yearInDays = daysInYear(weekYear); + let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 7 + minDaysInFirstWeek, year2; + if (ordinal < 1) { + year2 = weekYear - 1; + ordinal += daysInYear(year2); + } else if (ordinal > yearInDays) { + year2 = weekYear + 1; + ordinal -= daysInYear(weekYear); + } else { + year2 = weekYear; + } + const { + month, + day: day2 + } = uncomputeOrdinal(year2, ordinal); + return { + year: year2, + month, + day: day2, + ...timeObject(weekData) + }; + } + __name(weekToGregorian, "weekToGregorian"); + function gregorianToOrdinal(gregData) { + const { + year: year2, + month, + day: day2 + } = gregData; + const ordinal = computeOrdinal(year2, month, day2); + return { + year: year2, + ordinal, + ...timeObject(gregData) + }; + } + __name(gregorianToOrdinal, "gregorianToOrdinal"); + function ordinalToGregorian(ordinalData) { + const { + year: year2, + ordinal + } = ordinalData; + const { + month, + day: day2 + } = uncomputeOrdinal(year2, ordinal); + return { + year: year2, + month, + day: day2, + ...timeObject(ordinalData) + }; + } + __name(ordinalToGregorian, "ordinalToGregorian"); + function usesLocalWeekValues(obj, loc) { + const hasLocaleWeekData = !isUndefined2(obj.localWeekday) || !isUndefined2(obj.localWeekNumber) || !isUndefined2(obj.localWeekYear); + if (hasLocaleWeekData) { + const hasIsoWeekData = !isUndefined2(obj.weekday) || !isUndefined2(obj.weekNumber) || !isUndefined2(obj.weekYear); + if (hasIsoWeekData) { + throw new ConflictingSpecificationError("Cannot mix locale-based week fields with ISO-based week fields"); + } + if (!isUndefined2(obj.localWeekday)) obj.weekday = obj.localWeekday; + if (!isUndefined2(obj.localWeekNumber)) obj.weekNumber = obj.localWeekNumber; + if (!isUndefined2(obj.localWeekYear)) obj.weekYear = obj.localWeekYear; + delete obj.localWeekday; + delete obj.localWeekNumber; + delete obj.localWeekYear; + return { + minDaysInFirstWeek: loc.getMinDaysInFirstWeek(), + startOfWeek: loc.getStartOfWeek() + }; + } else { + return { + minDaysInFirstWeek: 4, + startOfWeek: 1 + }; + } + } + __name(usesLocalWeekValues, "usesLocalWeekValues"); + function hasInvalidWeekData(obj, minDaysInFirstWeek = 4, startOfWeek = 1) { + const validYear = isInteger(obj.weekYear), validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear, minDaysInFirstWeek, startOfWeek)), validWeekday = integerBetween(obj.weekday, 1, 7); + if (!validYear) { + return unitOutOfRange("weekYear", obj.weekYear); + } else if (!validWeek) { + return unitOutOfRange("week", obj.weekNumber); + } else if (!validWeekday) { + return unitOutOfRange("weekday", obj.weekday); + } else return false; + } + __name(hasInvalidWeekData, "hasInvalidWeekData"); + function hasInvalidOrdinalData(obj) { + const validYear = isInteger(obj.year), validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year)); + if (!validYear) { + return unitOutOfRange("year", obj.year); + } else if (!validOrdinal) { + return unitOutOfRange("ordinal", obj.ordinal); + } else return false; + } + __name(hasInvalidOrdinalData, "hasInvalidOrdinalData"); + function hasInvalidGregorianData(obj) { + const validYear = isInteger(obj.year), validMonth = integerBetween(obj.month, 1, 12), validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month)); + if (!validYear) { + return unitOutOfRange("year", obj.year); + } else if (!validMonth) { + return unitOutOfRange("month", obj.month); + } else if (!validDay) { + return unitOutOfRange("day", obj.day); + } else return false; + } + __name(hasInvalidGregorianData, "hasInvalidGregorianData"); + function hasInvalidTimeData(obj) { + const { + hour: hour2, + minute: minute2, + second, + millisecond + } = obj; + const validHour = integerBetween(hour2, 0, 23) || hour2 === 24 && minute2 === 0 && second === 0 && millisecond === 0, validMinute = integerBetween(minute2, 0, 59), validSecond = integerBetween(second, 0, 59), validMillisecond = integerBetween(millisecond, 0, 999); + if (!validHour) { + return unitOutOfRange("hour", hour2); + } else if (!validMinute) { + return unitOutOfRange("minute", minute2); + } else if (!validSecond) { + return unitOutOfRange("second", second); + } else if (!validMillisecond) { + return unitOutOfRange("millisecond", millisecond); + } else return false; + } + __name(hasInvalidTimeData, "hasInvalidTimeData"); + function isUndefined2(o) { + return typeof o === "undefined"; + } + __name(isUndefined2, "isUndefined"); + function isNumber3(o) { + return typeof o === "number"; + } + __name(isNumber3, "isNumber"); + function isInteger(o) { + return typeof o === "number" && o % 1 === 0; + } + __name(isInteger, "isInteger"); + function isString2(o) { + return typeof o === "string"; + } + __name(isString2, "isString"); + function isDate2(o) { + return Object.prototype.toString.call(o) === "[object Date]"; + } + __name(isDate2, "isDate"); + function hasRelative() { + try { + return typeof Intl !== "undefined" && !!Intl.RelativeTimeFormat; + } catch (e) { + return false; + } + } + __name(hasRelative, "hasRelative"); + function hasLocaleWeekInfo() { + try { + return typeof Intl !== "undefined" && !!Intl.Locale && ("weekInfo" in Intl.Locale.prototype || "getWeekInfo" in Intl.Locale.prototype); + } catch (e) { + return false; + } + } + __name(hasLocaleWeekInfo, "hasLocaleWeekInfo"); + function maybeArray(thing) { + return Array.isArray(thing) ? thing : [thing]; + } + __name(maybeArray, "maybeArray"); + function bestBy(arr, by, compare2) { + if (arr.length === 0) { + return void 0; + } + return arr.reduce((best, next) => { + const pair = [by(next), next]; + if (!best) { + return pair; + } else if (compare2(best[0], pair[0]) === best[0]) { + return best; + } else { + return pair; + } + }, null)[1]; + } + __name(bestBy, "bestBy"); + function pick2(obj, keys) { + return keys.reduce((a, k) => { + a[k] = obj[k]; + return a; + }, {}); + } + __name(pick2, "pick"); + function hasOwnProperty2(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); + } + __name(hasOwnProperty2, "hasOwnProperty"); + function validateWeekSettings(settings) { + if (settings == null) { + return null; + } else if (typeof settings !== "object") { + throw new InvalidArgumentError("Week settings must be an object"); + } else { + if (!integerBetween(settings.firstDay, 1, 7) || !integerBetween(settings.minimalDays, 1, 7) || !Array.isArray(settings.weekend) || settings.weekend.some((v2) => !integerBetween(v2, 1, 7))) { + throw new InvalidArgumentError("Invalid week settings"); + } + return { + firstDay: settings.firstDay, + minimalDays: settings.minimalDays, + weekend: Array.from(settings.weekend) + }; + } + } + __name(validateWeekSettings, "validateWeekSettings"); + function integerBetween(thing, bottom, top) { + return isInteger(thing) && thing >= bottom && thing <= top; + } + __name(integerBetween, "integerBetween"); + function floorMod(x, n2) { + return x - n2 * Math.floor(x / n2); + } + __name(floorMod, "floorMod"); + function padStart(input, n2 = 2) { + const isNeg = input < 0; + let padded; + if (isNeg) { + padded = "-" + ("" + -input).padStart(n2, "0"); + } else { + padded = ("" + input).padStart(n2, "0"); + } + return padded; + } + __name(padStart, "padStart"); + function parseInteger(string4) { + if (isUndefined2(string4) || string4 === null || string4 === "") { + return void 0; + } else { + return parseInt(string4, 10); + } + } + __name(parseInteger, "parseInteger"); + function parseFloating(string4) { + if (isUndefined2(string4) || string4 === null || string4 === "") { + return void 0; + } else { + return parseFloat(string4); + } + } + __name(parseFloating, "parseFloating"); + function parseMillis(fraction) { + if (isUndefined2(fraction) || fraction === null || fraction === "") { + return void 0; + } else { + const f = parseFloat("0." + fraction) * 1e3; + return Math.floor(f); + } + } + __name(parseMillis, "parseMillis"); + function roundTo(number4, digits, rounding = "round") { + const factor = 10 ** digits; + switch (rounding) { + case "expand": + return number4 > 0 ? Math.ceil(number4 * factor) / factor : Math.floor(number4 * factor) / factor; + case "trunc": + return Math.trunc(number4 * factor) / factor; + case "round": + return Math.round(number4 * factor) / factor; + case "floor": + return Math.floor(number4 * factor) / factor; + case "ceil": + return Math.ceil(number4 * factor) / factor; + default: + throw new RangeError(`Value rounding ${rounding} is out of range`); + } + } + __name(roundTo, "roundTo"); + function isLeapYear2(year2) { + return year2 % 4 === 0 && (year2 % 100 !== 0 || year2 % 400 === 0); + } + __name(isLeapYear2, "isLeapYear"); + function daysInYear(year2) { + return isLeapYear2(year2) ? 366 : 365; + } + __name(daysInYear, "daysInYear"); + function daysInMonth(year2, month) { + const modMonth = floorMod(month - 1, 12) + 1, modYear = year2 + (month - modMonth) / 12; + if (modMonth === 2) { + return isLeapYear2(modYear) ? 29 : 28; + } else { + return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1]; + } + } + __name(daysInMonth, "daysInMonth"); + function objToLocalTS(obj) { + let d = Date.UTC(obj.year, obj.month - 1, obj.day, obj.hour, obj.minute, obj.second, obj.millisecond); + if (obj.year < 100 && obj.year >= 0) { + d = new Date(d); + d.setUTCFullYear(obj.year, obj.month - 1, obj.day); + } + return +d; + } + __name(objToLocalTS, "objToLocalTS"); + function firstWeekOffset(year2, minDaysInFirstWeek, startOfWeek) { + const fwdlw = isoWeekdayToLocal(dayOfWeek(year2, 1, minDaysInFirstWeek), startOfWeek); + return -fwdlw + minDaysInFirstWeek - 1; + } + __name(firstWeekOffset, "firstWeekOffset"); + function weeksInWeekYear(weekYear, minDaysInFirstWeek = 4, startOfWeek = 1) { + const weekOffset = firstWeekOffset(weekYear, minDaysInFirstWeek, startOfWeek); + const weekOffsetNext = firstWeekOffset(weekYear + 1, minDaysInFirstWeek, startOfWeek); + return (daysInYear(weekYear) - weekOffset + weekOffsetNext) / 7; + } + __name(weeksInWeekYear, "weeksInWeekYear"); + function untruncateYear(year2) { + if (year2 > 99) { + return year2; + } else return year2 > Settings.twoDigitCutoffYear ? 1900 + year2 : 2e3 + year2; + } + __name(untruncateYear, "untruncateYear"); + function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) { + const date5 = new Date(ts), intlOpts = { + hourCycle: "h23", + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit" + }; + if (timeZone) { + intlOpts.timeZone = timeZone; + } + const modified = { + timeZoneName: offsetFormat, + ...intlOpts + }; + const parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date5).find((m) => m.type.toLowerCase() === "timezonename"); + return parsed ? parsed.value : null; + } + __name(parseZoneInfo, "parseZoneInfo"); + function signedOffset(offHourStr, offMinuteStr) { + let offHour = parseInt(offHourStr, 10); + if (Number.isNaN(offHour)) { + offHour = 0; + } + const offMin = parseInt(offMinuteStr, 10) || 0, offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin; + return offHour * 60 + offMinSigned; + } + __name(signedOffset, "signedOffset"); + function asNumber(value) { + const numericValue = Number(value); + if (typeof value === "boolean" || value === "" || !Number.isFinite(numericValue)) throw new InvalidArgumentError(`Invalid unit value ${value}`); + return numericValue; + } + __name(asNumber, "asNumber"); + function normalizeObject(obj, normalizer) { + const normalized = {}; + for (const u4 in obj) { + if (hasOwnProperty2(obj, u4)) { + const v2 = obj[u4]; + if (v2 === void 0 || v2 === null) continue; + normalized[normalizer(u4)] = asNumber(v2); + } + } + return normalized; + } + __name(normalizeObject, "normalizeObject"); + function formatOffset(offset2, format) { + const hours = Math.trunc(Math.abs(offset2 / 60)), minutes = Math.trunc(Math.abs(offset2 % 60)), sign2 = offset2 >= 0 ? "+" : "-"; + switch (format) { + case "short": + return `${sign2}${padStart(hours, 2)}:${padStart(minutes, 2)}`; + case "narrow": + return `${sign2}${hours}${minutes > 0 ? `:${minutes}` : ""}`; + case "techie": + return `${sign2}${padStart(hours, 2)}${padStart(minutes, 2)}`; + default: + throw new RangeError(`Value format ${format} is out of range for property format`); + } + } + __name(formatOffset, "formatOffset"); + function timeObject(obj) { + return pick2(obj, ["hour", "minute", "second", "millisecond"]); + } + __name(timeObject, "timeObject"); + var monthsLong = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; + var monthsShort = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + var monthsNarrow = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"]; + function months(length) { + switch (length) { + case "narrow": + return [...monthsNarrow]; + case "short": + return [...monthsShort]; + case "long": + return [...monthsLong]; + case "numeric": + return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]; + case "2-digit": + return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]; + default: + return null; + } + } + __name(months, "months"); + var weekdaysLong = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]; + var weekdaysShort = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]; + var weekdaysNarrow = ["M", "T", "W", "T", "F", "S", "S"]; + function weekdays(length) { + switch (length) { + case "narrow": + return [...weekdaysNarrow]; + case "short": + return [...weekdaysShort]; + case "long": + return [...weekdaysLong]; + case "numeric": + return ["1", "2", "3", "4", "5", "6", "7"]; + default: + return null; + } + } + __name(weekdays, "weekdays"); + var meridiems = ["AM", "PM"]; + var erasLong = ["Before Christ", "Anno Domini"]; + var erasShort = ["BC", "AD"]; + var erasNarrow = ["B", "A"]; + function eras(length) { + switch (length) { + case "narrow": + return [...erasNarrow]; + case "short": + return [...erasShort]; + case "long": + return [...erasLong]; + default: + return null; + } + } + __name(eras, "eras"); + function meridiemForDateTime(dt) { + return meridiems[dt.hour < 12 ? 0 : 1]; + } + __name(meridiemForDateTime, "meridiemForDateTime"); + function weekdayForDateTime(dt, length) { + return weekdays(length)[dt.weekday - 1]; + } + __name(weekdayForDateTime, "weekdayForDateTime"); + function monthForDateTime(dt, length) { + return months(length)[dt.month - 1]; + } + __name(monthForDateTime, "monthForDateTime"); + function eraForDateTime(dt, length) { + return eras(length)[dt.year < 0 ? 0 : 1]; + } + __name(eraForDateTime, "eraForDateTime"); + function formatRelativeTime(unit, count4, numeric2 = "always", narrow = false) { + const units2 = { + years: ["year", "yr."], + quarters: ["quarter", "qtr."], + months: ["month", "mo."], + weeks: ["week", "wk."], + days: ["day", "day", "days"], + hours: ["hour", "hr."], + minutes: ["minute", "min."], + seconds: ["second", "sec."] + }; + const lastable = ["hours", "minutes", "seconds"].indexOf(unit) === -1; + if (numeric2 === "auto" && lastable) { + const isDay = unit === "days"; + switch (count4) { + case 1: + return isDay ? "tomorrow" : `next ${units2[unit][0]}`; + case -1: + return isDay ? "yesterday" : `last ${units2[unit][0]}`; + case 0: + return isDay ? "today" : `this ${units2[unit][0]}`; + } + } + const isInPast = Object.is(count4, -0) || count4 < 0, fmtValue = Math.abs(count4), singular = fmtValue === 1, lilUnits = units2[unit], fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units2[unit][0] : unit; + return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`; + } + __name(formatRelativeTime, "formatRelativeTime"); + function stringifyTokens(splits, tokenToString) { + let s2 = ""; + for (const token of splits) { + if (token.literal) { + s2 += token.val; + } else { + s2 += tokenToString(token.val); + } + } + return s2; + } + __name(stringifyTokens, "stringifyTokens"); + var macroTokenToFormatOpts = { + D: DATE_SHORT, + DD: DATE_MED, + DDD: DATE_FULL, + DDDD: DATE_HUGE, + t: TIME_SIMPLE, + tt: TIME_WITH_SECONDS, + ttt: TIME_WITH_SHORT_OFFSET, + tttt: TIME_WITH_LONG_OFFSET, + T: TIME_24_SIMPLE, + TT: TIME_24_WITH_SECONDS, + TTT: TIME_24_WITH_SHORT_OFFSET, + TTTT: TIME_24_WITH_LONG_OFFSET, + f: DATETIME_SHORT, + ff: DATETIME_MED, + fff: DATETIME_FULL, + ffff: DATETIME_HUGE, + F: DATETIME_SHORT_WITH_SECONDS, + FF: DATETIME_MED_WITH_SECONDS, + FFF: DATETIME_FULL_WITH_SECONDS, + FFFF: DATETIME_HUGE_WITH_SECONDS + }; + var Formatter = class _Formatter { + static { + __name(this, "Formatter"); + } + static create(locale, opts = {}) { + return new _Formatter(locale, opts); + } + static parseFormat(fmt) { + let current = null, currentFull = "", bracketed = false; + const splits = []; + for (let i = 0; i < fmt.length; i++) { + const c = fmt.charAt(i); + if (c === "'") { + if (currentFull.length > 0 || bracketed) { + splits.push({ + literal: bracketed || /^\s+$/.test(currentFull), + val: currentFull === "" ? "'" : currentFull + }); + } + current = null; + currentFull = ""; + bracketed = !bracketed; + } else if (bracketed) { + currentFull += c; + } else if (c === current) { + currentFull += c; + } else { + if (currentFull.length > 0) { + splits.push({ + literal: /^\s+$/.test(currentFull), + val: currentFull + }); + } + currentFull = c; + current = c; + } + } + if (currentFull.length > 0) { + splits.push({ + literal: bracketed || /^\s+$/.test(currentFull), + val: currentFull + }); + } + return splits; + } + static macroTokenToFormatOpts(token) { + return macroTokenToFormatOpts[token]; + } + constructor(locale, formatOpts) { + this.opts = formatOpts; + this.loc = locale; + this.systemLoc = null; + } + formatWithSystemDefault(dt, opts) { + if (this.systemLoc === null) { + this.systemLoc = this.loc.redefaultToSystem(); + } + const df = this.systemLoc.dtFormatter(dt, { + ...this.opts, + ...opts + }); + return df.format(); + } + dtFormatter(dt, opts = {}) { + return this.loc.dtFormatter(dt, { + ...this.opts, + ...opts + }); + } + formatDateTime(dt, opts) { + return this.dtFormatter(dt, opts).format(); + } + formatDateTimeParts(dt, opts) { + return this.dtFormatter(dt, opts).formatToParts(); + } + formatInterval(interval, opts) { + const df = this.dtFormatter(interval.start, opts); + return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate()); + } + resolvedOptions(dt, opts) { + return this.dtFormatter(dt, opts).resolvedOptions(); + } + num(n2, p = 0, signDisplay = void 0) { + if (this.opts.forceSimple) { + return padStart(n2, p); + } + const opts = { + ...this.opts + }; + if (p > 0) { + opts.padTo = p; + } + if (signDisplay) { + opts.signDisplay = signDisplay; + } + return this.loc.numberFormatter(opts).format(n2); + } + formatDateTimeFromString(dt, fmt) { + const knownEnglish = this.loc.listingMode() === "en", useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", string4 = /* @__PURE__ */ __name((opts, extract) => this.loc.extract(dt, opts, extract), "string"), formatOffset2 = /* @__PURE__ */ __name((opts) => { + if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) { + return "Z"; + } + return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : ""; + }, "formatOffset"), meridiem = /* @__PURE__ */ __name(() => knownEnglish ? meridiemForDateTime(dt) : string4({ + hour: "numeric", + hourCycle: "h12" + }, "dayperiod"), "meridiem"), month = /* @__PURE__ */ __name((length, standalone) => knownEnglish ? monthForDateTime(dt, length) : string4(standalone ? { + month: length + } : { + month: length, + day: "numeric" + }, "month"), "month"), weekday = /* @__PURE__ */ __name((length, standalone) => knownEnglish ? weekdayForDateTime(dt, length) : string4(standalone ? { + weekday: length + } : { + weekday: length, + month: "long", + day: "numeric" + }, "weekday"), "weekday"), maybeMacro = /* @__PURE__ */ __name((token) => { + const formatOpts = _Formatter.macroTokenToFormatOpts(token); + if (formatOpts) { + return this.formatWithSystemDefault(dt, formatOpts); + } else { + return token; + } + }, "maybeMacro"), era = /* @__PURE__ */ __name((length) => knownEnglish ? eraForDateTime(dt, length) : string4({ + era: length + }, "era"), "era"), tokenToString = /* @__PURE__ */ __name((token) => { + switch (token) { + // ms + case "S": + return this.num(dt.millisecond); + case "u": + // falls through + case "SSS": + return this.num(dt.millisecond, 3); + // seconds + case "s": + return this.num(dt.second); + case "ss": + return this.num(dt.second, 2); + // fractional seconds + case "uu": + return this.num(Math.floor(dt.millisecond / 10), 2); + case "uuu": + return this.num(Math.floor(dt.millisecond / 100)); + // minutes + case "m": + return this.num(dt.minute); + case "mm": + return this.num(dt.minute, 2); + // hours + case "h": + return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12); + case "hh": + return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2); + case "H": + return this.num(dt.hour); + case "HH": + return this.num(dt.hour, 2); + // offset + case "Z": + return formatOffset2({ + format: "narrow", + allowZ: this.opts.allowZ + }); + case "ZZ": + return formatOffset2({ + format: "short", + allowZ: this.opts.allowZ + }); + case "ZZZ": + return formatOffset2({ + format: "techie", + allowZ: this.opts.allowZ + }); + case "ZZZZ": + return dt.zone.offsetName(dt.ts, { + format: "short", + locale: this.loc.locale + }); + case "ZZZZZ": + return dt.zone.offsetName(dt.ts, { + format: "long", + locale: this.loc.locale + }); + // zone + case "z": + return dt.zoneName; + // meridiems + case "a": + return meridiem(); + // dates + case "d": + return useDateTimeFormatter ? string4({ + day: "numeric" + }, "day") : this.num(dt.day); + case "dd": + return useDateTimeFormatter ? string4({ + day: "2-digit" + }, "day") : this.num(dt.day, 2); + // weekdays - standalone + case "c": + return this.num(dt.weekday); + case "ccc": + return weekday("short", true); + case "cccc": + return weekday("long", true); + case "ccccc": + return weekday("narrow", true); + // weekdays - format + case "E": + return this.num(dt.weekday); + case "EEE": + return weekday("short", false); + case "EEEE": + return weekday("long", false); + case "EEEEE": + return weekday("narrow", false); + // months - standalone + case "L": + return useDateTimeFormatter ? string4({ + month: "numeric", + day: "numeric" + }, "month") : this.num(dt.month); + case "LL": + return useDateTimeFormatter ? string4({ + month: "2-digit", + day: "numeric" + }, "month") : this.num(dt.month, 2); + case "LLL": + return month("short", true); + case "LLLL": + return month("long", true); + case "LLLLL": + return month("narrow", true); + // months - format + case "M": + return useDateTimeFormatter ? string4({ + month: "numeric" + }, "month") : this.num(dt.month); + case "MM": + return useDateTimeFormatter ? string4({ + month: "2-digit" + }, "month") : this.num(dt.month, 2); + case "MMM": + return month("short", false); + case "MMMM": + return month("long", false); + case "MMMMM": + return month("narrow", false); + // years + case "y": + return useDateTimeFormatter ? string4({ + year: "numeric" + }, "year") : this.num(dt.year); + case "yy": + return useDateTimeFormatter ? string4({ + year: "2-digit" + }, "year") : this.num(dt.year.toString().slice(-2), 2); + case "yyyy": + return useDateTimeFormatter ? string4({ + year: "numeric" + }, "year") : this.num(dt.year, 4); + case "yyyyyy": + return useDateTimeFormatter ? string4({ + year: "numeric" + }, "year") : this.num(dt.year, 6); + // eras + case "G": + return era("short"); + case "GG": + return era("long"); + case "GGGGG": + return era("narrow"); + case "kk": + return this.num(dt.weekYear.toString().slice(-2), 2); + case "kkkk": + return this.num(dt.weekYear, 4); + case "W": + return this.num(dt.weekNumber); + case "WW": + return this.num(dt.weekNumber, 2); + case "n": + return this.num(dt.localWeekNumber); + case "nn": + return this.num(dt.localWeekNumber, 2); + case "ii": + return this.num(dt.localWeekYear.toString().slice(-2), 2); + case "iiii": + return this.num(dt.localWeekYear, 4); + case "o": + return this.num(dt.ordinal); + case "ooo": + return this.num(dt.ordinal, 3); + case "q": + return this.num(dt.quarter); + case "qq": + return this.num(dt.quarter, 2); + case "X": + return this.num(Math.floor(dt.ts / 1e3)); + case "x": + return this.num(dt.ts); + default: + return maybeMacro(token); + } + }, "tokenToString"); + return stringifyTokens(_Formatter.parseFormat(fmt), tokenToString); + } + formatDurationFromString(dur, fmt) { + const invertLargest = this.opts.signMode === "negativeLargestOnly" ? -1 : 1; + const tokenToField = /* @__PURE__ */ __name((token) => { + switch (token[0]) { + case "S": + return "milliseconds"; + case "s": + return "seconds"; + case "m": + return "minutes"; + case "h": + return "hours"; + case "d": + return "days"; + case "w": + return "weeks"; + case "M": + return "months"; + case "y": + return "years"; + default: + return null; + } + }, "tokenToField"), tokenToString = /* @__PURE__ */ __name((lildur, info3) => (token) => { + const mapped = tokenToField(token); + if (mapped) { + const inversionFactor = info3.isNegativeDuration && mapped !== info3.largestUnit ? invertLargest : 1; + let signDisplay; + if (this.opts.signMode === "negativeLargestOnly" && mapped !== info3.largestUnit) { + signDisplay = "never"; + } else if (this.opts.signMode === "all") { + signDisplay = "always"; + } else { + signDisplay = "auto"; + } + return this.num(lildur.get(mapped) * inversionFactor, token.length, signDisplay); + } else { + return token; + } + }, "tokenToString"), tokens = _Formatter.parseFormat(fmt), realTokens = tokens.reduce((found, { + literal: literal2, + val + }) => literal2 ? found : found.concat(val), []), collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t8) => t8)), durationInfo = { + isNegativeDuration: collapsed < 0, + // this relies on "collapsed" being based on "shiftTo", which builds up the object + // in order + largestUnit: Object.keys(collapsed.values)[0] + }; + return stringifyTokens(tokens, tokenToString(collapsed, durationInfo)); + } + }; + var ianaRegex = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/; + function combineRegexes(...regexes) { + const full = regexes.reduce((f, r) => f + r.source, ""); + return RegExp(`^${full}$`); + } + __name(combineRegexes, "combineRegexes"); + function combineExtractors(...extractors) { + return (m) => extractors.reduce(([mergedVals, mergedZone, cursor], ex) => { + const [val, zone, next] = ex(m, cursor); + return [{ + ...mergedVals, + ...val + }, zone || mergedZone, next]; + }, [{}, null, 1]).slice(0, 2); + } + __name(combineExtractors, "combineExtractors"); + function parse3(s2, ...patterns) { + if (s2 == null) { + return [null, null]; + } + for (const [regex, extractor] of patterns) { + const m = regex.exec(s2); + if (m) { + return extractor(m); + } + } + return [null, null]; + } + __name(parse3, "parse"); + function simpleParse(...keys) { + return (match3, cursor) => { + const ret = {}; + let i; + for (i = 0; i < keys.length; i++) { + ret[keys[i]] = parseInteger(match3[cursor + i]); + } + return [ret, null, cursor + i]; + }; + } + __name(simpleParse, "simpleParse"); + var offsetRegex = /(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/; + var isoExtendedZone = `(?:${offsetRegex.source}?(?:\\[(${ianaRegex.source})\\])?)?`; + var isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/; + var isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`); + var isoTimeExtensionRegex = RegExp(`(?:[Tt]${isoTimeRegex.source})?`); + var isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/; + var isoWeekRegex = /(\d{4})-?W(\d\d)(?:-?(\d))?/; + var isoOrdinalRegex = /(\d{4})-?(\d{3})/; + var extractISOWeekData = simpleParse("weekYear", "weekNumber", "weekDay"); + var extractISOOrdinalData = simpleParse("year", "ordinal"); + var sqlYmdRegex = /(\d{4})-(\d\d)-(\d\d)/; + var sqlTimeRegex = RegExp(`${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`); + var sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`); + function int2(match3, pos, fallback) { + const m = match3[pos]; + return isUndefined2(m) ? fallback : parseInteger(m); + } + __name(int2, "int"); + function extractISOYmd(match3, cursor) { + const item = { + year: int2(match3, cursor), + month: int2(match3, cursor + 1, 1), + day: int2(match3, cursor + 2, 1) + }; + return [item, null, cursor + 3]; + } + __name(extractISOYmd, "extractISOYmd"); + function extractISOTime(match3, cursor) { + const item = { + hours: int2(match3, cursor, 0), + minutes: int2(match3, cursor + 1, 0), + seconds: int2(match3, cursor + 2, 0), + milliseconds: parseMillis(match3[cursor + 3]) + }; + return [item, null, cursor + 4]; + } + __name(extractISOTime, "extractISOTime"); + function extractISOOffset(match3, cursor) { + const local = !match3[cursor] && !match3[cursor + 1], fullOffset = signedOffset(match3[cursor + 1], match3[cursor + 2]), zone = local ? null : FixedOffsetZone.instance(fullOffset); + return [{}, zone, cursor + 3]; + } + __name(extractISOOffset, "extractISOOffset"); + function extractIANAZone(match3, cursor) { + const zone = match3[cursor] ? IANAZone.create(match3[cursor]) : null; + return [{}, zone, cursor + 1]; + } + __name(extractIANAZone, "extractIANAZone"); + var isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`); + var isoDuration = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/; + function extractISODuration(match3) { + const [s2, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] = match3; + const hasNegativePrefix = s2[0] === "-"; + const negativeSeconds = secondStr && secondStr[0] === "-"; + const maybeNegate = /* @__PURE__ */ __name((num, force = false) => num !== void 0 && (force || num && hasNegativePrefix) ? -num : num, "maybeNegate"); + return [{ + years: maybeNegate(parseFloating(yearStr)), + months: maybeNegate(parseFloating(monthStr)), + weeks: maybeNegate(parseFloating(weekStr)), + days: maybeNegate(parseFloating(dayStr)), + hours: maybeNegate(parseFloating(hourStr)), + minutes: maybeNegate(parseFloating(minuteStr)), + seconds: maybeNegate(parseFloating(secondStr), secondStr === "-0"), + milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds) + }]; + } + __name(extractISODuration, "extractISODuration"); + var obsOffsets = { + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60 + }; + function fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + const result = { + year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr), + month: monthsShort.indexOf(monthStr) + 1, + day: parseInteger(dayStr), + hour: parseInteger(hourStr), + minute: parseInteger(minuteStr) + }; + if (secondStr) result.second = parseInteger(secondStr); + if (weekdayStr) { + result.weekday = weekdayStr.length > 3 ? weekdaysLong.indexOf(weekdayStr) + 1 : weekdaysShort.indexOf(weekdayStr) + 1; + } + return result; + } + __name(fromStrings, "fromStrings"); + var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/; + function extractRFC2822(match3) { + const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr, obsOffset, milOffset, offHourStr, offMinuteStr] = match3, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); + let offset2; + if (obsOffset) { + offset2 = obsOffsets[obsOffset]; + } else if (milOffset) { + offset2 = 0; + } else { + offset2 = signedOffset(offHourStr, offMinuteStr); + } + return [result, new FixedOffsetZone(offset2)]; + } + __name(extractRFC2822, "extractRFC2822"); + function preprocessRFC2822(s2) { + return s2.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim(); + } + __name(preprocessRFC2822, "preprocessRFC2822"); + var rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/; + var rfc850 = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/; + var ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/; + function extractRFC1123Or850(match3) { + const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match3, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); + return [result, FixedOffsetZone.utcInstance]; + } + __name(extractRFC1123Or850, "extractRFC1123Or850"); + function extractASCII(match3) { + const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match3, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); + return [result, FixedOffsetZone.utcInstance]; + } + __name(extractASCII, "extractASCII"); + var isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex); + var isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex); + var isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex); + var isoTimeCombinedRegex = combineRegexes(isoTimeRegex); + var extractISOYmdTimeAndOffset = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset, extractIANAZone); + var extractISOWeekTimeAndOffset = combineExtractors(extractISOWeekData, extractISOTime, extractISOOffset, extractIANAZone); + var extractISOOrdinalDateAndTime = combineExtractors(extractISOOrdinalData, extractISOTime, extractISOOffset, extractIANAZone); + var extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone); + function parseISODate(s2) { + return parse3(s2, [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset], [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime], [isoTimeCombinedRegex, extractISOTimeAndOffset]); + } + __name(parseISODate, "parseISODate"); + function parseRFC2822Date(s2) { + return parse3(preprocessRFC2822(s2), [rfc2822, extractRFC2822]); + } + __name(parseRFC2822Date, "parseRFC2822Date"); + function parseHTTPDate(s2) { + return parse3(s2, [rfc1123, extractRFC1123Or850], [rfc850, extractRFC1123Or850], [ascii, extractASCII]); + } + __name(parseHTTPDate, "parseHTTPDate"); + function parseISODuration(s2) { + return parse3(s2, [isoDuration, extractISODuration]); + } + __name(parseISODuration, "parseISODuration"); + var extractISOTimeOnly = combineExtractors(extractISOTime); + function parseISOTimeOnly(s2) { + return parse3(s2, [isoTimeOnly, extractISOTimeOnly]); + } + __name(parseISOTimeOnly, "parseISOTimeOnly"); + var sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex); + var sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex); + var extractISOTimeOffsetAndIANAZone = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone); + function parseSQL(s2) { + return parse3(s2, [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]); + } + __name(parseSQL, "parseSQL"); + var INVALID$2 = "Invalid Duration"; + var lowOrderMatrix = { + weeks: { + days: 7, + hours: 7 * 24, + minutes: 7 * 24 * 60, + seconds: 7 * 24 * 60 * 60, + milliseconds: 7 * 24 * 60 * 60 * 1e3 + }, + days: { + hours: 24, + minutes: 24 * 60, + seconds: 24 * 60 * 60, + milliseconds: 24 * 60 * 60 * 1e3 + }, + hours: { + minutes: 60, + seconds: 60 * 60, + milliseconds: 60 * 60 * 1e3 + }, + minutes: { + seconds: 60, + milliseconds: 60 * 1e3 + }, + seconds: { + milliseconds: 1e3 + } + }; + var casualMatrix = { + years: { + quarters: 4, + months: 12, + weeks: 52, + days: 365, + hours: 365 * 24, + minutes: 365 * 24 * 60, + seconds: 365 * 24 * 60 * 60, + milliseconds: 365 * 24 * 60 * 60 * 1e3 + }, + quarters: { + months: 3, + weeks: 13, + days: 91, + hours: 91 * 24, + minutes: 91 * 24 * 60, + seconds: 91 * 24 * 60 * 60, + milliseconds: 91 * 24 * 60 * 60 * 1e3 + }, + months: { + weeks: 4, + days: 30, + hours: 30 * 24, + minutes: 30 * 24 * 60, + seconds: 30 * 24 * 60 * 60, + milliseconds: 30 * 24 * 60 * 60 * 1e3 + }, + ...lowOrderMatrix + }; + var daysInYearAccurate = 146097 / 400; + var daysInMonthAccurate = 146097 / 4800; + var accurateMatrix = { + years: { + quarters: 4, + months: 12, + weeks: daysInYearAccurate / 7, + days: daysInYearAccurate, + hours: daysInYearAccurate * 24, + minutes: daysInYearAccurate * 24 * 60, + seconds: daysInYearAccurate * 24 * 60 * 60, + milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1e3 + }, + quarters: { + months: 3, + weeks: daysInYearAccurate / 28, + days: daysInYearAccurate / 4, + hours: daysInYearAccurate * 24 / 4, + minutes: daysInYearAccurate * 24 * 60 / 4, + seconds: daysInYearAccurate * 24 * 60 * 60 / 4, + milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1e3 / 4 + }, + months: { + weeks: daysInMonthAccurate / 7, + days: daysInMonthAccurate, + hours: daysInMonthAccurate * 24, + minutes: daysInMonthAccurate * 24 * 60, + seconds: daysInMonthAccurate * 24 * 60 * 60, + milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1e3 + }, + ...lowOrderMatrix + }; + var orderedUnits$1 = ["years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds"]; + var reverseUnits = orderedUnits$1.slice(0).reverse(); + function clone$1(dur, alts, clear3 = false) { + const conf = { + values: clear3 ? alts.values : { + ...dur.values, + ...alts.values || {} + }, + loc: dur.loc.clone(alts.loc), + conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy, + matrix: alts.matrix || dur.matrix + }; + return new Duration(conf); + } + __name(clone$1, "clone$1"); + function durationToMillis(matrix, vals) { + var _vals$milliseconds; + let sum2 = (_vals$milliseconds = vals.milliseconds) != null ? _vals$milliseconds : 0; + for (const unit of reverseUnits.slice(1)) { + if (vals[unit]) { + sum2 += vals[unit] * matrix[unit]["milliseconds"]; + } + } + return sum2; + } + __name(durationToMillis, "durationToMillis"); + function normalizeValues(matrix, vals) { + const factor = durationToMillis(matrix, vals) < 0 ? -1 : 1; + orderedUnits$1.reduceRight((previous, current) => { + if (!isUndefined2(vals[current])) { + if (previous) { + const previousVal = vals[previous] * factor; + const conv = matrix[current][previous]; + const rollUp = Math.floor(previousVal / conv); + vals[current] += rollUp * factor; + vals[previous] -= rollUp * conv * factor; + } + return current; + } else { + return previous; + } + }, null); + orderedUnits$1.reduce((previous, current) => { + if (!isUndefined2(vals[current])) { + if (previous) { + const fraction = vals[previous] % 1; + vals[previous] -= fraction; + vals[current] += fraction * matrix[previous][current]; + } + return current; + } else { + return previous; + } + }, null); + } + __name(normalizeValues, "normalizeValues"); + function removeZeroes(vals) { + const newVals = {}; + for (const [key, value] of Object.entries(vals)) { + if (value !== 0) { + newVals[key] = value; + } + } + return newVals; + } + __name(removeZeroes, "removeZeroes"); + var Duration = class _Duration { + static { + __name(this, "Duration"); + } + /** + * @private + */ + constructor(config3) { + const accurate = config3.conversionAccuracy === "longterm" || false; + let matrix = accurate ? accurateMatrix : casualMatrix; + if (config3.matrix) { + matrix = config3.matrix; + } + this.values = config3.values; + this.loc = config3.loc || Locale.create(); + this.conversionAccuracy = accurate ? "longterm" : "casual"; + this.invalid = config3.invalid || null; + this.matrix = matrix; + this.isLuxonDuration = true; + } + /** + * Create Duration from a number of milliseconds. + * @param {number} count of milliseconds + * @param {Object} opts - options for parsing + * @param {string} [opts.locale='en-US'] - the locale to use + * @param {string} opts.numberingSystem - the numbering system to use + * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use + * @return {Duration} + */ + static fromMillis(count4, opts) { + return _Duration.fromObject({ + milliseconds: count4 + }, opts); + } + /** + * Create a Duration from a JavaScript object with keys like 'years' and 'hours'. + * If this object is empty then a zero milliseconds duration is returned. + * @param {Object} obj - the object to create the DateTime from + * @param {number} obj.years + * @param {number} obj.quarters + * @param {number} obj.months + * @param {number} obj.weeks + * @param {number} obj.days + * @param {number} obj.hours + * @param {number} obj.minutes + * @param {number} obj.seconds + * @param {number} obj.milliseconds + * @param {Object} [opts=[]] - options for creating this Duration + * @param {string} [opts.locale='en-US'] - the locale to use + * @param {string} opts.numberingSystem - the numbering system to use + * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use + * @param {string} [opts.matrix=Object] - the custom conversion system to use + * @return {Duration} + */ + static fromObject(obj, opts = {}) { + if (obj == null || typeof obj !== "object") { + throw new InvalidArgumentError(`Duration.fromObject: argument expected to be an object, got ${obj === null ? "null" : typeof obj}`); + } + return new _Duration({ + values: normalizeObject(obj, _Duration.normalizeUnit), + loc: Locale.fromObject(opts), + conversionAccuracy: opts.conversionAccuracy, + matrix: opts.matrix + }); + } + /** + * Create a Duration from DurationLike. + * + * @param {Object | number | Duration} durationLike + * One of: + * - object with keys like 'years' and 'hours'. + * - number representing milliseconds + * - Duration instance + * @return {Duration} + */ + static fromDurationLike(durationLike) { + if (isNumber3(durationLike)) { + return _Duration.fromMillis(durationLike); + } else if (_Duration.isDuration(durationLike)) { + return durationLike; + } else if (typeof durationLike === "object") { + return _Duration.fromObject(durationLike); + } else { + throw new InvalidArgumentError(`Unknown duration argument ${durationLike} of type ${typeof durationLike}`); + } + } + /** + * Create a Duration from an ISO 8601 duration string. + * @param {string} text - text to parse + * @param {Object} opts - options for parsing + * @param {string} [opts.locale='en-US'] - the locale to use + * @param {string} opts.numberingSystem - the numbering system to use + * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use + * @param {string} [opts.matrix=Object] - the preset conversion system to use + * @see https://en.wikipedia.org/wiki/ISO_8601#Durations + * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 } + * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 } + * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 } + * @return {Duration} + */ + static fromISO(text2, opts) { + const [parsed] = parseISODuration(text2); + if (parsed) { + return _Duration.fromObject(parsed, opts); + } else { + return _Duration.invalid("unparsable", `the input "${text2}" can't be parsed as ISO 8601`); + } + } + /** + * Create a Duration from an ISO 8601 time string. + * @param {string} text - text to parse + * @param {Object} opts - options for parsing + * @param {string} [opts.locale='en-US'] - the locale to use + * @param {string} opts.numberingSystem - the numbering system to use + * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use + * @param {string} [opts.matrix=Object] - the conversion system to use + * @see https://en.wikipedia.org/wiki/ISO_8601#Times + * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 } + * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } + * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } + * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } + * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } + * @return {Duration} + */ + static fromISOTime(text2, opts) { + const [parsed] = parseISOTimeOnly(text2); + if (parsed) { + return _Duration.fromObject(parsed, opts); + } else { + return _Duration.invalid("unparsable", `the input "${text2}" can't be parsed as ISO 8601`); + } + } + /** + * Create an invalid Duration. + * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent + * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information + * @return {Duration} + */ + static invalid(reason, explanation = null) { + if (!reason) { + throw new InvalidArgumentError("need to specify a reason the Duration is invalid"); + } + const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); + if (Settings.throwOnInvalid) { + throw new InvalidDurationError(invalid); + } else { + return new _Duration({ + invalid + }); + } + } + /** + * @private + */ + static normalizeUnit(unit) { + const normalized = { + year: "years", + years: "years", + quarter: "quarters", + quarters: "quarters", + month: "months", + months: "months", + week: "weeks", + weeks: "weeks", + day: "days", + days: "days", + hour: "hours", + hours: "hours", + minute: "minutes", + minutes: "minutes", + second: "seconds", + seconds: "seconds", + millisecond: "milliseconds", + milliseconds: "milliseconds" + }[unit ? unit.toLowerCase() : unit]; + if (!normalized) throw new InvalidUnitError(unit); + return normalized; + } + /** + * Check if an object is a Duration. Works across context boundaries + * @param {object} o + * @return {boolean} + */ + static isDuration(o) { + return o && o.isLuxonDuration || false; + } + /** + * Get the locale of a Duration, such 'en-GB' + * @type {string} + */ + get locale() { + return this.isValid ? this.loc.locale : null; + } + /** + * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration + * + * @type {string} + */ + get numberingSystem() { + return this.isValid ? this.loc.numberingSystem : null; + } + /** + * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens: + * * `S` for milliseconds + * * `s` for seconds + * * `m` for minutes + * * `h` for hours + * * `d` for days + * * `w` for weeks + * * `M` for months + * * `y` for years + * Notes: + * * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits + * * Tokens can be escaped by wrapping with single quotes. + * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting. + * @param {string} fmt - the format string + * @param {Object} opts - options + * @param {boolean} [opts.floor=true] - floor numerical values + * @param {'negative'|'all'|'negativeLargestOnly'} [opts.signMode=negative] - How to handle signs + * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2" + * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002" + * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000" + * @example Duration.fromObject({ days: 6, seconds: 2 }).toFormat("d s", { signMode: "all" }) //=> "+6 +2" + * @example Duration.fromObject({ days: -6, seconds: -2 }).toFormat("d s", { signMode: "all" }) //=> "-6 -2" + * @example Duration.fromObject({ days: -6, seconds: -2 }).toFormat("d s", { signMode: "negativeLargestOnly" }) //=> "-6 2" + * @return {string} + */ + toFormat(fmt, opts = {}) { + const fmtOpts = { + ...opts, + floor: opts.round !== false && opts.floor !== false + }; + return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID$2; + } + /** + * Returns a string representation of a Duration with all units included. + * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options + * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`. + * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor. + * @param {boolean} [opts.showZeros=true] - Show all units previously used by the duration even if they are zero + * @example + * ```js + * var dur = Duration.fromObject({ months: 1, weeks: 0, hours: 5, minutes: 6 }) + * dur.toHuman() //=> '1 month, 0 weeks, 5 hours, 6 minutes' + * dur.toHuman({ listStyle: "long" }) //=> '1 month, 0 weeks, 5 hours, and 6 minutes' + * dur.toHuman({ unitDisplay: "short" }) //=> '1 mth, 0 wks, 5 hr, 6 min' + * dur.toHuman({ showZeros: false }) //=> '1 month, 5 hours, 6 minutes' + * ``` + */ + toHuman(opts = {}) { + if (!this.isValid) return INVALID$2; + const showZeros = opts.showZeros !== false; + const l2 = orderedUnits$1.map((unit) => { + const val = this.values[unit]; + if (isUndefined2(val) || val === 0 && !showZeros) { + return null; + } + return this.loc.numberFormatter({ + style: "unit", + unitDisplay: "long", + ...opts, + unit: unit.slice(0, -1) + }).format(val); + }).filter((n2) => n2); + return this.loc.listFormatter({ + type: "conjunction", + style: opts.listStyle || "narrow", + ...opts + }).format(l2); + } + /** + * Returns a JavaScript object with this Duration's values. + * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 } + * @return {Object} + */ + toObject() { + if (!this.isValid) return {}; + return { + ...this.values + }; + } + /** + * Returns an ISO 8601-compliant string representation of this Duration. + * @see https://en.wikipedia.org/wiki/ISO_8601#Durations + * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S' + * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S' + * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M' + * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M' + * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S' + * @return {string} + */ + toISO() { + if (!this.isValid) return null; + let s2 = "P"; + if (this.years !== 0) s2 += this.years + "Y"; + if (this.months !== 0 || this.quarters !== 0) s2 += this.months + this.quarters * 3 + "M"; + if (this.weeks !== 0) s2 += this.weeks + "W"; + if (this.days !== 0) s2 += this.days + "D"; + if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) s2 += "T"; + if (this.hours !== 0) s2 += this.hours + "H"; + if (this.minutes !== 0) s2 += this.minutes + "M"; + if (this.seconds !== 0 || this.milliseconds !== 0) + s2 += roundTo(this.seconds + this.milliseconds / 1e3, 3) + "S"; + if (s2 === "P") s2 += "T0S"; + return s2; + } + /** + * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day. + * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours. + * @see https://en.wikipedia.org/wiki/ISO_8601#Times + * @param {Object} opts - options + * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 + * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 + * @param {boolean} [opts.includePrefix=false] - include the `T` prefix + * @param {string} [opts.format='extended'] - choose between the basic and extended format + * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000' + * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00' + * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00' + * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000' + * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000' + * @return {string} + */ + toISOTime(opts = {}) { + if (!this.isValid) return null; + const millis = this.toMillis(); + if (millis < 0 || millis >= 864e5) return null; + opts = { + suppressMilliseconds: false, + suppressSeconds: false, + includePrefix: false, + format: "extended", + ...opts, + includeOffset: false + }; + const dateTime = DateTime.fromMillis(millis, { + zone: "UTC" + }); + return dateTime.toISOTime(opts); + } + /** + * Returns an ISO 8601 representation of this Duration appropriate for use in JSON. + * @return {string} + */ + toJSON() { + return this.toISO(); + } + /** + * Returns an ISO 8601 representation of this Duration appropriate for use in debugging. + * @return {string} + */ + toString() { + return this.toISO(); + } + /** + * Returns a string representation of this Duration appropriate for the REPL. + * @return {string} + */ + [/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() { + if (this.isValid) { + return `Duration { values: ${JSON.stringify(this.values)} }`; + } else { + return `Duration { Invalid, reason: ${this.invalidReason} }`; + } + } + /** + * Returns an milliseconds value of this Duration. + * @return {number} + */ + toMillis() { + if (!this.isValid) return NaN; + return durationToMillis(this.matrix, this.values); + } + /** + * Returns an milliseconds value of this Duration. Alias of {@link toMillis} + * @return {number} + */ + valueOf() { + return this.toMillis(); + } + /** + * Make this Duration longer by the specified amount. Return a newly-constructed Duration. + * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() + * @return {Duration} + */ + plus(duration3) { + if (!this.isValid) return this; + const dur = _Duration.fromDurationLike(duration3), result = {}; + for (const k of orderedUnits$1) { + if (hasOwnProperty2(dur.values, k) || hasOwnProperty2(this.values, k)) { + result[k] = dur.get(k) + this.get(k); + } + } + return clone$1(this, { + values: result + }, true); + } + /** + * Make this Duration shorter by the specified amount. Return a newly-constructed Duration. + * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() + * @return {Duration} + */ + minus(duration3) { + if (!this.isValid) return this; + const dur = _Duration.fromDurationLike(duration3); + return this.plus(dur.negate()); + } + /** + * Scale this Duration by the specified amount. Return a newly-constructed Duration. + * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number. + * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 } + * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === "hours" ? x * 2 : x) //=> { hours: 2, minutes: 30 } + * @return {Duration} + */ + mapUnits(fn) { + if (!this.isValid) return this; + const result = {}; + for (const k of Object.keys(this.values)) { + result[k] = asNumber(fn(this.values[k], k)); + } + return clone$1(this, { + values: result + }, true); + } + /** + * Get the value of unit. + * @param {string} unit - a unit such as 'minute' or 'day' + * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2 + * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0 + * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3 + * @return {number} + */ + get(unit) { + return this[_Duration.normalizeUnit(unit)]; + } + /** + * "Set" the values of specified units. Return a newly-constructed Duration. + * @param {Object} values - a mapping of units to numbers + * @example dur.set({ years: 2017 }) + * @example dur.set({ hours: 8, minutes: 30 }) + * @return {Duration} + */ + set(values) { + if (!this.isValid) return this; + const mixed = { + ...this.values, + ...normalizeObject(values, _Duration.normalizeUnit) + }; + return clone$1(this, { + values: mixed + }); + } + /** + * "Set" the locale and/or numberingSystem. Returns a newly-constructed Duration. + * @example dur.reconfigure({ locale: 'en-GB' }) + * @return {Duration} + */ + reconfigure({ + locale, + numberingSystem, + conversionAccuracy, + matrix + } = {}) { + const loc = this.loc.clone({ + locale, + numberingSystem + }); + const opts = { + loc, + matrix, + conversionAccuracy + }; + return clone$1(this, opts); + } + /** + * Return the length of the duration in the specified unit. + * @param {string} unit - a unit such as 'minutes' or 'days' + * @example Duration.fromObject({years: 1}).as('days') //=> 365 + * @example Duration.fromObject({years: 1}).as('months') //=> 12 + * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5 + * @return {number} + */ + as(unit) { + return this.isValid ? this.shiftTo(unit).get(unit) : NaN; + } + /** + * Reduce this Duration to its canonical representation in its current units. + * Assuming the overall value of the Duration is positive, this means: + * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example) + * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise + * the overall value would be negative, see third example) + * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example) + * + * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`. + * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 } + * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 } + * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 } + * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 } + * @return {Duration} + */ + normalize() { + if (!this.isValid) return this; + const vals = this.toObject(); + normalizeValues(this.matrix, vals); + return clone$1(this, { + values: vals + }, true); + } + /** + * Rescale units to its largest representation + * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 } + * @return {Duration} + */ + rescale() { + if (!this.isValid) return this; + const vals = removeZeroes(this.normalize().shiftToAll().toObject()); + return clone$1(this, { + values: vals + }, true); + } + /** + * Convert this Duration into its representation in a different set of units. + * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 } + * @return {Duration} + */ + shiftTo(...units2) { + if (!this.isValid) return this; + if (units2.length === 0) { + return this; + } + units2 = units2.map((u4) => _Duration.normalizeUnit(u4)); + const built = {}, accumulated = {}, vals = this.toObject(); + let lastUnit; + for (const k of orderedUnits$1) { + if (units2.indexOf(k) >= 0) { + lastUnit = k; + let own = 0; + for (const ak in accumulated) { + own += this.matrix[ak][k] * accumulated[ak]; + accumulated[ak] = 0; + } + if (isNumber3(vals[k])) { + own += vals[k]; + } + const i = Math.trunc(own); + built[k] = i; + accumulated[k] = (own * 1e3 - i * 1e3) / 1e3; + } else if (isNumber3(vals[k])) { + accumulated[k] = vals[k]; + } + } + for (const key in accumulated) { + if (accumulated[key] !== 0) { + built[lastUnit] += key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key]; + } + } + normalizeValues(this.matrix, built); + return clone$1(this, { + values: built + }, true); + } + /** + * Shift this Duration to all available units. + * Same as shiftTo("years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds") + * @return {Duration} + */ + shiftToAll() { + if (!this.isValid) return this; + return this.shiftTo("years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds"); + } + /** + * Return the negative of this Duration. + * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 } + * @return {Duration} + */ + negate() { + if (!this.isValid) return this; + const negated = {}; + for (const k of Object.keys(this.values)) { + negated[k] = this.values[k] === 0 ? 0 : -this.values[k]; + } + return clone$1(this, { + values: negated + }, true); + } + /** + * Removes all units with values equal to 0 from this Duration. + * @example Duration.fromObject({ years: 2, days: 0, hours: 0, minutes: 0 }).removeZeros().toObject() //=> { years: 2 } + * @return {Duration} + */ + removeZeros() { + if (!this.isValid) return this; + const vals = removeZeroes(this.values); + return clone$1(this, { + values: vals + }, true); + } + /** + * Get the years. + * @type {number} + */ + get years() { + return this.isValid ? this.values.years || 0 : NaN; + } + /** + * Get the quarters. + * @type {number} + */ + get quarters() { + return this.isValid ? this.values.quarters || 0 : NaN; + } + /** + * Get the months. + * @type {number} + */ + get months() { + return this.isValid ? this.values.months || 0 : NaN; + } + /** + * Get the weeks + * @type {number} + */ + get weeks() { + return this.isValid ? this.values.weeks || 0 : NaN; + } + /** + * Get the days. + * @type {number} + */ + get days() { + return this.isValid ? this.values.days || 0 : NaN; + } + /** + * Get the hours. + * @type {number} + */ + get hours() { + return this.isValid ? this.values.hours || 0 : NaN; + } + /** + * Get the minutes. + * @type {number} + */ + get minutes() { + return this.isValid ? this.values.minutes || 0 : NaN; + } + /** + * Get the seconds. + * @return {number} + */ + get seconds() { + return this.isValid ? this.values.seconds || 0 : NaN; + } + /** + * Get the milliseconds. + * @return {number} + */ + get milliseconds() { + return this.isValid ? this.values.milliseconds || 0 : NaN; + } + /** + * Returns whether the Duration is invalid. Invalid durations are returned by diff operations + * on invalid DateTimes or Intervals. + * @return {boolean} + */ + get isValid() { + return this.invalid === null; + } + /** + * Returns an error code if this Duration became invalid, or null if the Duration is valid + * @return {string} + */ + get invalidReason() { + return this.invalid ? this.invalid.reason : null; + } + /** + * Returns an explanation of why this Duration became invalid, or null if the Duration is valid + * @type {string} + */ + get invalidExplanation() { + return this.invalid ? this.invalid.explanation : null; + } + /** + * Equality check + * Two Durations are equal iff they have the same units and the same values for each unit. + * @param {Duration} other + * @return {boolean} + */ + equals(other) { + if (!this.isValid || !other.isValid) { + return false; + } + if (!this.loc.equals(other.loc)) { + return false; + } + function eq2(v1, v2) { + if (v1 === void 0 || v1 === 0) return v2 === void 0 || v2 === 0; + return v1 === v2; + } + __name(eq2, "eq"); + for (const u4 of orderedUnits$1) { + if (!eq2(this.values[u4], other.values[u4])) { + return false; + } + } + return true; + } + }; + var INVALID$1 = "Invalid Interval"; + function validateStartEnd(start, end) { + if (!start || !start.isValid) { + return Interval.invalid("missing or invalid start"); + } else if (!end || !end.isValid) { + return Interval.invalid("missing or invalid end"); + } else if (end < start) { + return Interval.invalid("end before start", `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`); + } else { + return null; + } + } + __name(validateStartEnd, "validateStartEnd"); + var Interval = class _Interval { + static { + __name(this, "Interval"); + } + /** + * @private + */ + constructor(config3) { + this.s = config3.start; + this.e = config3.end; + this.invalid = config3.invalid || null; + this.isLuxonInterval = true; + } + /** + * Create an invalid Interval. + * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent + * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information + * @return {Interval} + */ + static invalid(reason, explanation = null) { + if (!reason) { + throw new InvalidArgumentError("need to specify a reason the Interval is invalid"); + } + const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); + if (Settings.throwOnInvalid) { + throw new InvalidIntervalError(invalid); + } else { + return new _Interval({ + invalid + }); + } + } + /** + * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end. + * @param {DateTime|Date|Object} start + * @param {DateTime|Date|Object} end + * @return {Interval} + */ + static fromDateTimes(start, end) { + const builtStart = friendlyDateTime(start), builtEnd = friendlyDateTime(end); + const validateError = validateStartEnd(builtStart, builtEnd); + if (validateError == null) { + return new _Interval({ + start: builtStart, + end: builtEnd + }); + } else { + return validateError; + } + } + /** + * Create an Interval from a start DateTime and a Duration to extend to. + * @param {DateTime|Date|Object} start + * @param {Duration|Object|number} duration - the length of the Interval. + * @return {Interval} + */ + static after(start, duration3) { + const dur = Duration.fromDurationLike(duration3), dt = friendlyDateTime(start); + return _Interval.fromDateTimes(dt, dt.plus(dur)); + } + /** + * Create an Interval from an end DateTime and a Duration to extend backwards to. + * @param {DateTime|Date|Object} end + * @param {Duration|Object|number} duration - the length of the Interval. + * @return {Interval} + */ + static before(end, duration3) { + const dur = Duration.fromDurationLike(duration3), dt = friendlyDateTime(end); + return _Interval.fromDateTimes(dt.minus(dur), dt); + } + /** + * Create an Interval from an ISO 8601 string. + * Accepts `/`, `/`, and `/` formats. + * @param {string} text - the ISO string to parse + * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO} + * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + * @return {Interval} + */ + static fromISO(text2, opts) { + const [s2, e] = (text2 || "").split("/", 2); + if (s2 && e) { + let start, startIsValid; + try { + start = DateTime.fromISO(s2, opts); + startIsValid = start.isValid; + } catch (e2) { + startIsValid = false; + } + let end, endIsValid; + try { + end = DateTime.fromISO(e, opts); + endIsValid = end.isValid; + } catch (e2) { + endIsValid = false; + } + if (startIsValid && endIsValid) { + return _Interval.fromDateTimes(start, end); + } + if (startIsValid) { + const dur = Duration.fromISO(e, opts); + if (dur.isValid) { + return _Interval.after(start, dur); + } + } else if (endIsValid) { + const dur = Duration.fromISO(s2, opts); + if (dur.isValid) { + return _Interval.before(end, dur); + } + } + } + return _Interval.invalid("unparsable", `the input "${text2}" can't be parsed as ISO 8601`); + } + /** + * Check if an object is an Interval. Works across context boundaries + * @param {object} o + * @return {boolean} + */ + static isInterval(o) { + return o && o.isLuxonInterval || false; + } + /** + * Returns the start of the Interval + * @type {DateTime} + */ + get start() { + return this.isValid ? this.s : null; + } + /** + * Returns the end of the Interval. This is the first instant which is not part of the interval + * (Interval is half-open). + * @type {DateTime} + */ + get end() { + return this.isValid ? this.e : null; + } + /** + * Returns the last DateTime included in the interval (since end is not part of the interval) + * @type {DateTime} + */ + get lastDateTime() { + return this.isValid ? this.e ? this.e.minus(1) : null : null; + } + /** + * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'. + * @type {boolean} + */ + get isValid() { + return this.invalidReason === null; + } + /** + * Returns an error code if this Interval is invalid, or null if the Interval is valid + * @type {string} + */ + get invalidReason() { + return this.invalid ? this.invalid.reason : null; + } + /** + * Returns an explanation of why this Interval became invalid, or null if the Interval is valid + * @type {string} + */ + get invalidExplanation() { + return this.invalid ? this.invalid.explanation : null; + } + /** + * Returns the length of the Interval in the specified unit. + * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in. + * @return {number} + */ + length(unit = "milliseconds") { + return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN; + } + /** + * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part. + * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day' + * asks 'what dates are included in this interval?', not 'how many days long is this interval?' + * @param {string} [unit='milliseconds'] - the unit of time to count. + * @param {Object} opts - options + * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime + * @return {number} + */ + count(unit = "milliseconds", opts) { + if (!this.isValid) return NaN; + const start = this.start.startOf(unit, opts); + let end; + if (opts != null && opts.useLocaleWeeks) { + end = this.end.reconfigure({ + locale: start.locale + }); + } else { + end = this.end; + } + end = end.startOf(unit, opts); + return Math.floor(end.diff(start, unit).get(unit)) + (end.valueOf() !== this.end.valueOf()); + } + /** + * Returns whether this Interval's start and end are both in the same unit of time + * @param {string} unit - the unit of time to check sameness on + * @return {boolean} + */ + hasSame(unit) { + return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false; + } + /** + * Return whether this Interval has the same start and end DateTimes. + * @return {boolean} + */ + isEmpty() { + return this.s.valueOf() === this.e.valueOf(); + } + /** + * Return whether this Interval's start is after the specified DateTime. + * @param {DateTime} dateTime + * @return {boolean} + */ + isAfter(dateTime) { + if (!this.isValid) return false; + return this.s > dateTime; + } + /** + * Return whether this Interval's end is before the specified DateTime. + * @param {DateTime} dateTime + * @return {boolean} + */ + isBefore(dateTime) { + if (!this.isValid) return false; + return this.e <= dateTime; + } + /** + * Return whether this Interval contains the specified DateTime. + * @param {DateTime} dateTime + * @return {boolean} + */ + contains(dateTime) { + if (!this.isValid) return false; + return this.s <= dateTime && this.e > dateTime; + } + /** + * "Sets" the start and/or end dates. Returns a newly-constructed Interval. + * @param {Object} values - the values to set + * @param {DateTime} values.start - the starting DateTime + * @param {DateTime} values.end - the ending DateTime + * @return {Interval} + */ + set({ + start, + end + } = {}) { + if (!this.isValid) return this; + return _Interval.fromDateTimes(start || this.s, end || this.e); + } + /** + * Split this Interval at each of the specified DateTimes + * @param {...DateTime} dateTimes - the unit of time to count. + * @return {Array} + */ + splitAt(...dateTimes) { + if (!this.isValid) return []; + const sorted = dateTimes.map(friendlyDateTime).filter((d) => this.contains(d)).sort((a, b) => a.toMillis() - b.toMillis()), results = []; + let { + s: s2 + } = this, i = 0; + while (s2 < this.e) { + const added = sorted[i] || this.e, next = +added > +this.e ? this.e : added; + results.push(_Interval.fromDateTimes(s2, next)); + s2 = next; + i += 1; + } + return results; + } + /** + * Split this Interval into smaller Intervals, each of the specified length. + * Left over time is grouped into a smaller interval + * @param {Duration|Object|number} duration - The length of each resulting interval. + * @return {Array} + */ + splitBy(duration3) { + const dur = Duration.fromDurationLike(duration3); + if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) { + return []; + } + let { + s: s2 + } = this, idx = 1, next; + const results = []; + while (s2 < this.e) { + const added = this.start.plus(dur.mapUnits((x) => x * idx)); + next = +added > +this.e ? this.e : added; + results.push(_Interval.fromDateTimes(s2, next)); + s2 = next; + idx += 1; + } + return results; + } + /** + * Split this Interval into the specified number of smaller intervals. + * @param {number} numberOfParts - The number of Intervals to divide the Interval into. + * @return {Array} + */ + divideEqually(numberOfParts) { + if (!this.isValid) return []; + return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts); + } + /** + * Return whether this Interval overlaps with the specified Interval + * @param {Interval} other + * @return {boolean} + */ + overlaps(other) { + return this.e > other.s && this.s < other.e; + } + /** + * Return whether this Interval's end is adjacent to the specified Interval's start. + * @param {Interval} other + * @return {boolean} + */ + abutsStart(other) { + if (!this.isValid) return false; + return +this.e === +other.s; + } + /** + * Return whether this Interval's start is adjacent to the specified Interval's end. + * @param {Interval} other + * @return {boolean} + */ + abutsEnd(other) { + if (!this.isValid) return false; + return +other.e === +this.s; + } + /** + * Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise. + * @param {Interval} other + * @return {boolean} + */ + engulfs(other) { + if (!this.isValid) return false; + return this.s <= other.s && this.e >= other.e; + } + /** + * Return whether this Interval has the same start and end as the specified Interval. + * @param {Interval} other + * @return {boolean} + */ + equals(other) { + if (!this.isValid || !other.isValid) { + return false; + } + return this.s.equals(other.s) && this.e.equals(other.e); + } + /** + * Return an Interval representing the intersection of this Interval and the specified Interval. + * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals. + * Returns null if the intersection is empty, meaning, the intervals don't intersect. + * @param {Interval} other + * @return {Interval} + */ + intersection(other) { + if (!this.isValid) return this; + const s2 = this.s > other.s ? this.s : other.s, e = this.e < other.e ? this.e : other.e; + if (s2 >= e) { + return null; + } else { + return _Interval.fromDateTimes(s2, e); + } + } + /** + * Return an Interval representing the union of this Interval and the specified Interval. + * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals. + * @param {Interval} other + * @return {Interval} + */ + union(other) { + if (!this.isValid) return this; + const s2 = this.s < other.s ? this.s : other.s, e = this.e > other.e ? this.e : other.e; + return _Interval.fromDateTimes(s2, e); + } + /** + * Merge an array of Intervals into an equivalent minimal set of Intervals. + * Combines overlapping and adjacent Intervals. + * The resulting array will contain the Intervals in ascending order, that is, starting with the earliest Interval + * and ending with the latest. + * + * @param {Array} intervals + * @return {Array} + */ + static merge(intervals) { + const [found, final] = intervals.sort((a, b) => a.s - b.s).reduce(([sofar, current], item) => { + if (!current) { + return [sofar, item]; + } else if (current.overlaps(item) || current.abutsStart(item)) { + return [sofar, current.union(item)]; + } else { + return [sofar.concat([current]), item]; + } + }, [[], null]); + if (final) { + found.push(final); + } + return found; + } + /** + * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals. + * @param {Array} intervals + * @return {Array} + */ + static xor(intervals) { + let start = null, currentCount = 0; + const results = [], ends = intervals.map((i) => [{ + time: i.s, + type: "s" + }, { + time: i.e, + type: "e" + }]), flattened = Array.prototype.concat(...ends), arr = flattened.sort((a, b) => a.time - b.time); + for (const i of arr) { + currentCount += i.type === "s" ? 1 : -1; + if (currentCount === 1) { + start = i.time; + } else { + if (start && +start !== +i.time) { + results.push(_Interval.fromDateTimes(start, i.time)); + } + start = null; + } + } + return _Interval.merge(results); + } + /** + * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals. + * @param {...Interval} intervals + * @return {Array} + */ + difference(...intervals) { + return _Interval.xor([this].concat(intervals)).map((i) => this.intersection(i)).filter((i) => i && !i.isEmpty()); + } + /** + * Returns a string representation of this Interval appropriate for debugging. + * @return {string} + */ + toString() { + if (!this.isValid) return INVALID$1; + return `[${this.s.toISO()} \u2013 ${this.e.toISO()})`; + } + /** + * Returns a string representation of this Interval appropriate for the REPL. + * @return {string} + */ + [/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() { + if (this.isValid) { + return `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`; + } else { + return `Interval { Invalid, reason: ${this.invalidReason} }`; + } + } + /** + * Returns a localized string representing this Interval. Accepts the same options as the + * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as + * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method + * is browser-specific, but in general it will return an appropriate representation of the + * Interval in the assigned locale. Defaults to the system's locale if no locale has been + * specified. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat + * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or + * Intl.DateTimeFormat constructor options. + * @param {Object} opts - Options to override the configuration of the start DateTime. + * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022 + * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022 + * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022 + * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM + * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p + * @return {string} + */ + toLocaleString(formatOpts = DATE_SHORT, opts = {}) { + return this.isValid ? Formatter.create(this.s.loc.clone(opts), formatOpts).formatInterval(this) : INVALID$1; + } + /** + * Returns an ISO 8601-compliant string representation of this Interval. + * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + * @param {Object} opts - The same options as {@link DateTime#toISO} + * @return {string} + */ + toISO(opts) { + if (!this.isValid) return INVALID$1; + return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`; + } + /** + * Returns an ISO 8601-compliant string representation of date of this Interval. + * The time components are ignored. + * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + * @return {string} + */ + toISODate() { + if (!this.isValid) return INVALID$1; + return `${this.s.toISODate()}/${this.e.toISODate()}`; + } + /** + * Returns an ISO 8601-compliant string representation of time of this Interval. + * The date components are ignored. + * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + * @param {Object} opts - The same options as {@link DateTime#toISO} + * @return {string} + */ + toISOTime(opts) { + if (!this.isValid) return INVALID$1; + return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`; + } + /** + * Returns a string representation of this Interval formatted according to the specified format + * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible + * formatting tool. + * @param {string} dateFormat - The format string. This string formats the start and end time. + * See {@link DateTime#toFormat} for details. + * @param {Object} opts - Options. + * @param {string} [opts.separator = ' – '] - A separator to place between the start and end + * representations. + * @return {string} + */ + toFormat(dateFormat, { + separator = " \u2013 " + } = {}) { + if (!this.isValid) return INVALID$1; + return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`; + } + /** + * Return a Duration representing the time spanned by this interval. + * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration. + * @param {Object} opts - options that affect the creation of the Duration + * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use + * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 } + * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 } + * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 } + * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 } + * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 } + * @return {Duration} + */ + toDuration(unit, opts) { + if (!this.isValid) { + return Duration.invalid(this.invalidReason); + } + return this.e.diff(this.s, unit, opts); + } + /** + * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes + * @param {function} mapFn + * @return {Interval} + * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC()) + * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 })) + */ + mapEndpoints(mapFn) { + return _Interval.fromDateTimes(mapFn(this.s), mapFn(this.e)); + } + }; + var Info = class { + static { + __name(this, "Info"); + } + /** + * Return whether the specified zone contains a DST. + * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone. + * @return {boolean} + */ + static hasDST(zone = Settings.defaultZone) { + const proto = DateTime.now().setZone(zone).set({ + month: 12 + }); + return !zone.isUniversal && proto.offset !== proto.set({ + month: 6 + }).offset; + } + /** + * Return whether the specified zone is a valid IANA specifier. + * @param {string} zone - Zone to check + * @return {boolean} + */ + static isValidIANAZone(zone) { + return IANAZone.isValidZone(zone); + } + /** + * Converts the input into a {@link Zone} instance. + * + * * If `input` is already a Zone instance, it is returned unchanged. + * * If `input` is a string containing a valid time zone name, a Zone instance + * with that name is returned. + * * If `input` is a string that doesn't refer to a known time zone, a Zone + * instance with {@link Zone#isValid} == false is returned. + * * If `input is a number, a Zone instance with the specified fixed offset + * in minutes is returned. + * * If `input` is `null` or `undefined`, the default zone is returned. + * @param {string|Zone|number} [input] - the value to be converted + * @return {Zone} + */ + static normalizeZone(input) { + return normalizeZone(input, Settings.defaultZone); + } + /** + * Get the weekday on which the week starts according to the given locale. + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.locObj=null] - an existing locale object to use + * @returns {number} the start of the week, 1 for Monday through 7 for Sunday + */ + static getStartOfWeek({ + locale = null, + locObj = null + } = {}) { + return (locObj || Locale.create(locale)).getStartOfWeek(); + } + /** + * Get the minimum number of days necessary in a week before it is considered part of the next year according + * to the given locale. + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.locObj=null] - an existing locale object to use + * @returns {number} + */ + static getMinimumDaysInFirstWeek({ + locale = null, + locObj = null + } = {}) { + return (locObj || Locale.create(locale)).getMinDaysInFirstWeek(); + } + /** + * Get the weekdays, which are considered the weekend according to the given locale + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.locObj=null] - an existing locale object to use + * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday + */ + static getWeekendWeekdays({ + locale = null, + locObj = null + } = {}) { + return (locObj || Locale.create(locale)).getWeekendDays().slice(); + } + /** + * Return an array of standalone month names. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat + * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.numberingSystem=null] - the numbering system + * @param {string} [opts.locObj=null] - an existing locale object to use + * @param {string} [opts.outputCalendar='gregory'] - the calendar + * @example Info.months()[0] //=> 'January' + * @example Info.months('short')[0] //=> 'Jan' + * @example Info.months('numeric')[0] //=> '1' + * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.' + * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١' + * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I' + * @return {Array} + */ + static months(length = "long", { + locale = null, + numberingSystem = null, + locObj = null, + outputCalendar = "gregory" + } = {}) { + return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length); + } + /** + * Return an array of format month names. + * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that + * changes the string. + * See {@link Info#months} + * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.numberingSystem=null] - the numbering system + * @param {string} [opts.locObj=null] - an existing locale object to use + * @param {string} [opts.outputCalendar='gregory'] - the calendar + * @return {Array} + */ + static monthsFormat(length = "long", { + locale = null, + numberingSystem = null, + locObj = null, + outputCalendar = "gregory" + } = {}) { + return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length, true); + } + /** + * Return an array of standalone week names. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat + * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long". + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.numberingSystem=null] - the numbering system + * @param {string} [opts.locObj=null] - an existing locale object to use + * @example Info.weekdays()[0] //=> 'Monday' + * @example Info.weekdays('short')[0] //=> 'Mon' + * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.' + * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين' + * @return {Array} + */ + static weekdays(length = "long", { + locale = null, + numberingSystem = null, + locObj = null + } = {}) { + return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length); + } + /** + * Return an array of format week names. + * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that + * changes the string. + * See {@link Info#weekdays} + * @param {string} [length='long'] - the length of the month representation, such as "narrow", "short", "long". + * @param {Object} opts - options + * @param {string} [opts.locale=null] - the locale code + * @param {string} [opts.numberingSystem=null] - the numbering system + * @param {string} [opts.locObj=null] - an existing locale object to use + * @return {Array} + */ + static weekdaysFormat(length = "long", { + locale = null, + numberingSystem = null, + locObj = null + } = {}) { + return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length, true); + } + /** + * Return an array of meridiems. + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @example Info.meridiems() //=> [ 'AM', 'PM' ] + * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ] + * @return {Array} + */ + static meridiems({ + locale = null + } = {}) { + return Locale.create(locale).meridiems(); + } + /** + * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian. + * @param {string} [length='short'] - the length of the era representation, such as "short" or "long". + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @example Info.eras() //=> [ 'BC', 'AD' ] + * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ] + * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ] + * @return {Array} + */ + static eras(length = "short", { + locale = null + } = {}) { + return Locale.create(locale, null, "gregory").eras(length); + } + /** + * Return the set of available features in this environment. + * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case. + * Keys: + * * `relative`: whether this environment supports relative time formatting + * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale + * @example Info.features() //=> { relative: false, localeWeek: true } + * @return {Object} + */ + static features() { + return { + relative: hasRelative(), + localeWeek: hasLocaleWeekInfo() + }; + } + }; + function dayDiff(earlier, later) { + const utcDayStart = /* @__PURE__ */ __name((dt) => dt.toUTC(0, { + keepLocalTime: true + }).startOf("day").valueOf(), "utcDayStart"), ms = utcDayStart(later) - utcDayStart(earlier); + return Math.floor(Duration.fromMillis(ms).as("days")); + } + __name(dayDiff, "dayDiff"); + function highOrderDiffs(cursor, later, units2) { + const differs = [["years", (a, b) => b.year - a.year], ["quarters", (a, b) => b.quarter - a.quarter + (b.year - a.year) * 4], ["months", (a, b) => b.month - a.month + (b.year - a.year) * 12], ["weeks", (a, b) => { + const days = dayDiff(a, b); + return (days - days % 7) / 7; + }], ["days", dayDiff]]; + const results = {}; + const earlier = cursor; + let lowestOrder, highWater; + for (const [unit, differ] of differs) { + if (units2.indexOf(unit) >= 0) { + lowestOrder = unit; + results[unit] = differ(cursor, later); + highWater = earlier.plus(results); + if (highWater > later) { + results[unit]--; + cursor = earlier.plus(results); + if (cursor > later) { + highWater = cursor; + results[unit]--; + cursor = earlier.plus(results); + } + } else { + cursor = highWater; + } + } + } + return [cursor, results, highWater, lowestOrder]; + } + __name(highOrderDiffs, "highOrderDiffs"); + function diff(earlier, later, units2, opts) { + let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units2); + const remainingMillis = later - cursor; + const lowerOrderUnits = units2.filter((u4) => ["hours", "minutes", "seconds", "milliseconds"].indexOf(u4) >= 0); + if (lowerOrderUnits.length === 0) { + if (highWater < later) { + highWater = cursor.plus({ + [lowestOrder]: 1 + }); + } + if (highWater !== cursor) { + results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor); + } + } + const duration3 = Duration.fromObject(results, opts); + if (lowerOrderUnits.length > 0) { + return Duration.fromMillis(remainingMillis, opts).shiftTo(...lowerOrderUnits).plus(duration3); + } else { + return duration3; + } + } + __name(diff, "diff"); + var MISSING_FTP = "missing Intl.DateTimeFormat.formatToParts support"; + function intUnit(regex, post = (i) => i) { + return { + regex, + deser: /* @__PURE__ */ __name(([s2]) => post(parseDigits(s2)), "deser") + }; + } + __name(intUnit, "intUnit"); + var NBSP = String.fromCharCode(160); + var spaceOrNBSP = `[ ${NBSP}]`; + var spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, "g"); + function fixListRegex(s2) { + return s2.replace(/\./g, "\\.?").replace(spaceOrNBSPRegExp, spaceOrNBSP); + } + __name(fixListRegex, "fixListRegex"); + function stripInsensitivities(s2) { + return s2.replace(/\./g, "").replace(spaceOrNBSPRegExp, " ").toLowerCase(); + } + __name(stripInsensitivities, "stripInsensitivities"); + function oneOf(strings2, startIndex) { + if (strings2 === null) { + return null; + } else { + return { + regex: RegExp(strings2.map(fixListRegex).join("|")), + deser: /* @__PURE__ */ __name(([s2]) => strings2.findIndex((i) => stripInsensitivities(s2) === stripInsensitivities(i)) + startIndex, "deser") + }; + } + } + __name(oneOf, "oneOf"); + function offset(regex, groups) { + return { + regex, + deser: /* @__PURE__ */ __name(([, h, m]) => signedOffset(h, m), "deser"), + groups + }; + } + __name(offset, "offset"); + function simple(regex) { + return { + regex, + deser: /* @__PURE__ */ __name(([s2]) => s2, "deser") + }; + } + __name(simple, "simple"); + function escapeToken(value) { + return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); + } + __name(escapeToken, "escapeToken"); + function unitForToken(token, loc) { + const one = digitRegex(loc), two = digitRegex(loc, "{2}"), three = digitRegex(loc, "{3}"), four = digitRegex(loc, "{4}"), six = digitRegex(loc, "{6}"), oneOrTwo = digitRegex(loc, "{1,2}"), oneToThree = digitRegex(loc, "{1,3}"), oneToSix = digitRegex(loc, "{1,6}"), oneToNine = digitRegex(loc, "{1,9}"), twoToFour = digitRegex(loc, "{2,4}"), fourToSix = digitRegex(loc, "{4,6}"), literal2 = /* @__PURE__ */ __name((t8) => ({ + regex: RegExp(escapeToken(t8.val)), + deser: /* @__PURE__ */ __name(([s2]) => s2, "deser"), + literal: true + }), "literal"), unitate = /* @__PURE__ */ __name((t8) => { + if (token.literal) { + return literal2(t8); + } + switch (t8.val) { + // era + case "G": + return oneOf(loc.eras("short"), 0); + case "GG": + return oneOf(loc.eras("long"), 0); + // years + case "y": + return intUnit(oneToSix); + case "yy": + return intUnit(twoToFour, untruncateYear); + case "yyyy": + return intUnit(four); + case "yyyyy": + return intUnit(fourToSix); + case "yyyyyy": + return intUnit(six); + // months + case "M": + return intUnit(oneOrTwo); + case "MM": + return intUnit(two); + case "MMM": + return oneOf(loc.months("short", true), 1); + case "MMMM": + return oneOf(loc.months("long", true), 1); + case "L": + return intUnit(oneOrTwo); + case "LL": + return intUnit(two); + case "LLL": + return oneOf(loc.months("short", false), 1); + case "LLLL": + return oneOf(loc.months("long", false), 1); + // dates + case "d": + return intUnit(oneOrTwo); + case "dd": + return intUnit(two); + // ordinals + case "o": + return intUnit(oneToThree); + case "ooo": + return intUnit(three); + // time + case "HH": + return intUnit(two); + case "H": + return intUnit(oneOrTwo); + case "hh": + return intUnit(two); + case "h": + return intUnit(oneOrTwo); + case "mm": + return intUnit(two); + case "m": + return intUnit(oneOrTwo); + case "q": + return intUnit(oneOrTwo); + case "qq": + return intUnit(two); + case "s": + return intUnit(oneOrTwo); + case "ss": + return intUnit(two); + case "S": + return intUnit(oneToThree); + case "SSS": + return intUnit(three); + case "u": + return simple(oneToNine); + case "uu": + return simple(oneOrTwo); + case "uuu": + return intUnit(one); + // meridiem + case "a": + return oneOf(loc.meridiems(), 0); + // weekYear (k) + case "kkkk": + return intUnit(four); + case "kk": + return intUnit(twoToFour, untruncateYear); + // weekNumber (W) + case "W": + return intUnit(oneOrTwo); + case "WW": + return intUnit(two); + // weekdays + case "E": + case "c": + return intUnit(one); + case "EEE": + return oneOf(loc.weekdays("short", false), 1); + case "EEEE": + return oneOf(loc.weekdays("long", false), 1); + case "ccc": + return oneOf(loc.weekdays("short", true), 1); + case "cccc": + return oneOf(loc.weekdays("long", true), 1); + // offset/zone + case "Z": + case "ZZ": + return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2); + case "ZZZ": + return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2); + // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing + // because we don't have any way to figure out what they are + case "z": + return simple(/[a-z_+-/]{1,256}?/i); + // this special-case "token" represents a place where a macro-token expanded into a white-space literal + // in this case we accept any non-newline white-space + case " ": + return simple(/[^\S\n\r]/); + default: + return literal2(t8); + } + }, "unitate"); + const unit = unitate(token) || { + invalidReason: MISSING_FTP + }; + unit.token = token; + return unit; + } + __name(unitForToken, "unitForToken"); + var partTypeStyleToTokenVal = { + year: { + "2-digit": "yy", + numeric: "yyyyy" + }, + month: { + numeric: "M", + "2-digit": "MM", + short: "MMM", + long: "MMMM" + }, + day: { + numeric: "d", + "2-digit": "dd" + }, + weekday: { + short: "EEE", + long: "EEEE" + }, + dayperiod: "a", + dayPeriod: "a", + hour12: { + numeric: "h", + "2-digit": "hh" + }, + hour24: { + numeric: "H", + "2-digit": "HH" + }, + minute: { + numeric: "m", + "2-digit": "mm" + }, + second: { + numeric: "s", + "2-digit": "ss" + }, + timeZoneName: { + long: "ZZZZZ", + short: "ZZZ" + } + }; + function tokenForPart(part, formatOpts, resolvedOpts) { + const { + type, + value + } = part; + if (type === "literal") { + const isSpace = /^\s+$/.test(value); + return { + literal: !isSpace, + val: isSpace ? " " : value + }; + } + const style = formatOpts[type]; + let actualType = type; + if (type === "hour") { + if (formatOpts.hour12 != null) { + actualType = formatOpts.hour12 ? "hour12" : "hour24"; + } else if (formatOpts.hourCycle != null) { + if (formatOpts.hourCycle === "h11" || formatOpts.hourCycle === "h12") { + actualType = "hour12"; + } else { + actualType = "hour24"; + } + } else { + actualType = resolvedOpts.hour12 ? "hour12" : "hour24"; + } + } + let val = partTypeStyleToTokenVal[actualType]; + if (typeof val === "object") { + val = val[style]; + } + if (val) { + return { + literal: false, + val + }; + } + return void 0; + } + __name(tokenForPart, "tokenForPart"); + function buildRegex(units2) { + const re = units2.map((u4) => u4.regex).reduce((f, r) => `${f}(${r.source})`, ""); + return [`^${re}$`, units2]; + } + __name(buildRegex, "buildRegex"); + function match2(input, regex, handlers2) { + const matches = input.match(regex); + if (matches) { + const all3 = {}; + let matchIndex = 1; + for (const i in handlers2) { + if (hasOwnProperty2(handlers2, i)) { + const h = handlers2[i], groups = h.groups ? h.groups + 1 : 1; + if (!h.literal && h.token) { + all3[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups)); + } + matchIndex += groups; + } + } + return [matches, all3]; + } else { + return [matches, {}]; + } + } + __name(match2, "match"); + function dateTimeFromMatches(matches) { + const toField = /* @__PURE__ */ __name((token) => { + switch (token) { + case "S": + return "millisecond"; + case "s": + return "second"; + case "m": + return "minute"; + case "h": + case "H": + return "hour"; + case "d": + return "day"; + case "o": + return "ordinal"; + case "L": + case "M": + return "month"; + case "y": + return "year"; + case "E": + case "c": + return "weekday"; + case "W": + return "weekNumber"; + case "k": + return "weekYear"; + case "q": + return "quarter"; + default: + return null; + } + }, "toField"); + let zone = null; + let specificOffset; + if (!isUndefined2(matches.z)) { + zone = IANAZone.create(matches.z); + } + if (!isUndefined2(matches.Z)) { + if (!zone) { + zone = new FixedOffsetZone(matches.Z); + } + specificOffset = matches.Z; + } + if (!isUndefined2(matches.q)) { + matches.M = (matches.q - 1) * 3 + 1; + } + if (!isUndefined2(matches.h)) { + if (matches.h < 12 && matches.a === 1) { + matches.h += 12; + } else if (matches.h === 12 && matches.a === 0) { + matches.h = 0; + } + } + if (matches.G === 0 && matches.y) { + matches.y = -matches.y; + } + if (!isUndefined2(matches.u)) { + matches.S = parseMillis(matches.u); + } + const vals = Object.keys(matches).reduce((r, k) => { + const f = toField(k); + if (f) { + r[f] = matches[k]; + } + return r; + }, {}); + return [vals, zone, specificOffset]; + } + __name(dateTimeFromMatches, "dateTimeFromMatches"); + var dummyDateTimeCache = null; + function getDummyDateTime() { + if (!dummyDateTimeCache) { + dummyDateTimeCache = DateTime.fromMillis(1555555555555); + } + return dummyDateTimeCache; + } + __name(getDummyDateTime, "getDummyDateTime"); + function maybeExpandMacroToken(token, locale) { + if (token.literal) { + return token; + } + const formatOpts = Formatter.macroTokenToFormatOpts(token.val); + const tokens = formatOptsToTokens(formatOpts, locale); + if (tokens == null || tokens.includes(void 0)) { + return token; + } + return tokens; + } + __name(maybeExpandMacroToken, "maybeExpandMacroToken"); + function expandMacroTokens(tokens, locale) { + return Array.prototype.concat(...tokens.map((t8) => maybeExpandMacroToken(t8, locale))); + } + __name(expandMacroTokens, "expandMacroTokens"); + var TokenParser = class { + static { + __name(this, "TokenParser"); + } + constructor(locale, format) { + this.locale = locale; + this.format = format; + this.tokens = expandMacroTokens(Formatter.parseFormat(format), locale); + this.units = this.tokens.map((t8) => unitForToken(t8, locale)); + this.disqualifyingUnit = this.units.find((t8) => t8.invalidReason); + if (!this.disqualifyingUnit) { + const [regexString, handlers2] = buildRegex(this.units); + this.regex = RegExp(regexString, "i"); + this.handlers = handlers2; + } + } + explainFromTokens(input) { + if (!this.isValid) { + return { + input, + tokens: this.tokens, + invalidReason: this.invalidReason + }; + } else { + const [rawMatches, matches] = match2(input, this.regex, this.handlers), [result, zone, specificOffset] = matches ? dateTimeFromMatches(matches) : [null, null, void 0]; + if (hasOwnProperty2(matches, "a") && hasOwnProperty2(matches, "H")) { + throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format"); + } + return { + input, + tokens: this.tokens, + regex: this.regex, + rawMatches, + matches, + result, + zone, + specificOffset + }; + } + } + get isValid() { + return !this.disqualifyingUnit; + } + get invalidReason() { + return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null; + } + }; + function explainFromTokens(locale, input, format) { + const parser = new TokenParser(locale, format); + return parser.explainFromTokens(input); + } + __name(explainFromTokens, "explainFromTokens"); + function parseFromTokens(locale, input, format) { + const { + result, + zone, + specificOffset, + invalidReason + } = explainFromTokens(locale, input, format); + return [result, zone, specificOffset, invalidReason]; + } + __name(parseFromTokens, "parseFromTokens"); + function formatOptsToTokens(formatOpts, locale) { + if (!formatOpts) { + return null; + } + const formatter = Formatter.create(locale, formatOpts); + const df = formatter.dtFormatter(getDummyDateTime()); + const parts = df.formatToParts(); + const resolvedOpts = df.resolvedOptions(); + return parts.map((p) => tokenForPart(p, formatOpts, resolvedOpts)); + } + __name(formatOptsToTokens, "formatOptsToTokens"); + var INVALID = "Invalid DateTime"; + var MAX_DATE = 864e13; + function unsupportedZone(zone) { + return new Invalid("unsupported zone", `the zone "${zone.name}" is not supported`); + } + __name(unsupportedZone, "unsupportedZone"); + function possiblyCachedWeekData(dt) { + if (dt.weekData === null) { + dt.weekData = gregorianToWeek(dt.c); + } + return dt.weekData; + } + __name(possiblyCachedWeekData, "possiblyCachedWeekData"); + function possiblyCachedLocalWeekData(dt) { + if (dt.localWeekData === null) { + dt.localWeekData = gregorianToWeek(dt.c, dt.loc.getMinDaysInFirstWeek(), dt.loc.getStartOfWeek()); + } + return dt.localWeekData; + } + __name(possiblyCachedLocalWeekData, "possiblyCachedLocalWeekData"); + function clone2(inst, alts) { + const current = { + ts: inst.ts, + zone: inst.zone, + c: inst.c, + o: inst.o, + loc: inst.loc, + invalid: inst.invalid + }; + return new DateTime({ + ...current, + ...alts, + old: current + }); + } + __name(clone2, "clone"); + function fixOffset(localTS, o, tz) { + let utcGuess = localTS - o * 60 * 1e3; + const o2 = tz.offset(utcGuess); + if (o === o2) { + return [utcGuess, o]; + } + utcGuess -= (o2 - o) * 60 * 1e3; + const o3 = tz.offset(utcGuess); + if (o2 === o3) { + return [utcGuess, o2]; + } + return [localTS - Math.min(o2, o3) * 60 * 1e3, Math.max(o2, o3)]; + } + __name(fixOffset, "fixOffset"); + function tsToObj(ts, offset2) { + ts += offset2 * 60 * 1e3; + const d = new Date(ts); + return { + year: d.getUTCFullYear(), + month: d.getUTCMonth() + 1, + day: d.getUTCDate(), + hour: d.getUTCHours(), + minute: d.getUTCMinutes(), + second: d.getUTCSeconds(), + millisecond: d.getUTCMilliseconds() + }; + } + __name(tsToObj, "tsToObj"); + function objToTS(obj, offset2, zone) { + return fixOffset(objToLocalTS(obj), offset2, zone); + } + __name(objToTS, "objToTS"); + function adjustTime(inst, dur) { + const oPre = inst.o, year2 = inst.c.year + Math.trunc(dur.years), month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, c = { + ...inst.c, + year: year2, + month, + day: Math.min(inst.c.day, daysInMonth(year2, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7 + }, millisToAdd = Duration.fromObject({ + years: dur.years - Math.trunc(dur.years), + quarters: dur.quarters - Math.trunc(dur.quarters), + months: dur.months - Math.trunc(dur.months), + weeks: dur.weeks - Math.trunc(dur.weeks), + days: dur.days - Math.trunc(dur.days), + hours: dur.hours, + minutes: dur.minutes, + seconds: dur.seconds, + milliseconds: dur.milliseconds + }).as("milliseconds"), localTS = objToLocalTS(c); + let [ts, o] = fixOffset(localTS, oPre, inst.zone); + if (millisToAdd !== 0) { + ts += millisToAdd; + o = inst.zone.offset(ts); + } + return { + ts, + o + }; + } + __name(adjustTime, "adjustTime"); + function parseDataToDateTime(parsed, parsedZone, opts, format, text2, specificOffset) { + const { + setZone, + zone + } = opts; + if (parsed && Object.keys(parsed).length !== 0 || parsedZone) { + const interpretationZone = parsedZone || zone, inst = DateTime.fromObject(parsed, { + ...opts, + zone: interpretationZone, + specificOffset + }); + return setZone ? inst : inst.setZone(zone); + } else { + return DateTime.invalid(new Invalid("unparsable", `the input "${text2}" can't be parsed as ${format}`)); + } + } + __name(parseDataToDateTime, "parseDataToDateTime"); + function toTechFormat(dt, format, allowZ = true) { + return dt.isValid ? Formatter.create(Locale.create("en-US"), { + allowZ, + forceSimple: true + }).formatDateTimeFromString(dt, format) : null; + } + __name(toTechFormat, "toTechFormat"); + function toISODate(o, extended, precision) { + const longFormat = o.c.year > 9999 || o.c.year < 0; + let c = ""; + if (longFormat && o.c.year >= 0) c += "+"; + c += padStart(o.c.year, longFormat ? 6 : 4); + if (precision === "year") return c; + if (extended) { + c += "-"; + c += padStart(o.c.month); + if (precision === "month") return c; + c += "-"; + } else { + c += padStart(o.c.month); + if (precision === "month") return c; + } + c += padStart(o.c.day); + return c; + } + __name(toISODate, "toISODate"); + function toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone, precision) { + let showSeconds = !suppressSeconds || o.c.millisecond !== 0 || o.c.second !== 0, c = ""; + switch (precision) { + case "day": + case "month": + case "year": + break; + default: + c += padStart(o.c.hour); + if (precision === "hour") break; + if (extended) { + c += ":"; + c += padStart(o.c.minute); + if (precision === "minute") break; + if (showSeconds) { + c += ":"; + c += padStart(o.c.second); + } + } else { + c += padStart(o.c.minute); + if (precision === "minute") break; + if (showSeconds) { + c += padStart(o.c.second); + } + } + if (precision === "second") break; + if (showSeconds && (!suppressMilliseconds || o.c.millisecond !== 0)) { + c += "."; + c += padStart(o.c.millisecond, 3); + } + } + if (includeOffset) { + if (o.isOffsetFixed && o.offset === 0 && !extendedZone) { + c += "Z"; + } else if (o.o < 0) { + c += "-"; + c += padStart(Math.trunc(-o.o / 60)); + c += ":"; + c += padStart(Math.trunc(-o.o % 60)); + } else { + c += "+"; + c += padStart(Math.trunc(o.o / 60)); + c += ":"; + c += padStart(Math.trunc(o.o % 60)); + } + } + if (extendedZone) { + c += "[" + o.zone.ianaName + "]"; + } + return c; + } + __name(toISOTime, "toISOTime"); + var defaultUnitValues = { + month: 1, + day: 1, + hour: 0, + minute: 0, + second: 0, + millisecond: 0 + }; + var defaultWeekUnitValues = { + weekNumber: 1, + weekday: 1, + hour: 0, + minute: 0, + second: 0, + millisecond: 0 + }; + var defaultOrdinalUnitValues = { + ordinal: 1, + hour: 0, + minute: 0, + second: 0, + millisecond: 0 + }; + var orderedUnits = ["year", "month", "day", "hour", "minute", "second", "millisecond"]; + var orderedWeekUnits = ["weekYear", "weekNumber", "weekday", "hour", "minute", "second", "millisecond"]; + var orderedOrdinalUnits = ["year", "ordinal", "hour", "minute", "second", "millisecond"]; + function normalizeUnit(unit) { + const normalized = { + year: "year", + years: "year", + month: "month", + months: "month", + day: "day", + days: "day", + hour: "hour", + hours: "hour", + minute: "minute", + minutes: "minute", + quarter: "quarter", + quarters: "quarter", + second: "second", + seconds: "second", + millisecond: "millisecond", + milliseconds: "millisecond", + weekday: "weekday", + weekdays: "weekday", + weeknumber: "weekNumber", + weeksnumber: "weekNumber", + weeknumbers: "weekNumber", + weekyear: "weekYear", + weekyears: "weekYear", + ordinal: "ordinal" + }[unit.toLowerCase()]; + if (!normalized) throw new InvalidUnitError(unit); + return normalized; + } + __name(normalizeUnit, "normalizeUnit"); + function normalizeUnitWithLocalWeeks(unit) { + switch (unit.toLowerCase()) { + case "localweekday": + case "localweekdays": + return "localWeekday"; + case "localweeknumber": + case "localweeknumbers": + return "localWeekNumber"; + case "localweekyear": + case "localweekyears": + return "localWeekYear"; + default: + return normalizeUnit(unit); + } + } + __name(normalizeUnitWithLocalWeeks, "normalizeUnitWithLocalWeeks"); + function guessOffsetForZone(zone) { + if (zoneOffsetTs === void 0) { + zoneOffsetTs = Settings.now(); + } + if (zone.type !== "iana") { + return zone.offset(zoneOffsetTs); + } + const zoneName = zone.name; + let offsetGuess = zoneOffsetGuessCache.get(zoneName); + if (offsetGuess === void 0) { + offsetGuess = zone.offset(zoneOffsetTs); + zoneOffsetGuessCache.set(zoneName, offsetGuess); + } + return offsetGuess; + } + __name(guessOffsetForZone, "guessOffsetForZone"); + function quickDT(obj, opts) { + const zone = normalizeZone(opts.zone, Settings.defaultZone); + if (!zone.isValid) { + return DateTime.invalid(unsupportedZone(zone)); + } + const loc = Locale.fromObject(opts); + let ts, o; + if (!isUndefined2(obj.year)) { + for (const u4 of orderedUnits) { + if (isUndefined2(obj[u4])) { + obj[u4] = defaultUnitValues[u4]; + } + } + const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj); + if (invalid) { + return DateTime.invalid(invalid); + } + const offsetProvis = guessOffsetForZone(zone); + [ts, o] = objToTS(obj, offsetProvis, zone); + } else { + ts = Settings.now(); + } + return new DateTime({ + ts, + zone, + loc, + o + }); + } + __name(quickDT, "quickDT"); + function diffRelative(start, end, opts) { + const round = isUndefined2(opts.round) ? true : opts.round, rounding = isUndefined2(opts.rounding) ? "trunc" : opts.rounding, format = /* @__PURE__ */ __name((c, unit) => { + c = roundTo(c, round || opts.calendary ? 0 : 2, opts.calendary ? "round" : rounding); + const formatter = end.loc.clone(opts).relFormatter(opts); + return formatter.format(c, unit); + }, "format"), differ = /* @__PURE__ */ __name((unit) => { + if (opts.calendary) { + if (!end.hasSame(start, unit)) { + return end.startOf(unit).diff(start.startOf(unit), unit).get(unit); + } else return 0; + } else { + return end.diff(start, unit).get(unit); + } + }, "differ"); + if (opts.unit) { + return format(differ(opts.unit), opts.unit); + } + for (const unit of opts.units) { + const count4 = differ(unit); + if (Math.abs(count4) >= 1) { + return format(count4, unit); + } + } + return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]); + } + __name(diffRelative, "diffRelative"); + function lastOpts(argList) { + let opts = {}, args; + if (argList.length > 0 && typeof argList[argList.length - 1] === "object") { + opts = argList[argList.length - 1]; + args = Array.from(argList).slice(0, argList.length - 1); + } else { + args = Array.from(argList); + } + return [opts, args]; + } + __name(lastOpts, "lastOpts"); + var zoneOffsetTs; + var zoneOffsetGuessCache = /* @__PURE__ */ new Map(); + var DateTime = class _DateTime { + static { + __name(this, "DateTime"); + } + /** + * @access private + */ + constructor(config3) { + const zone = config3.zone || Settings.defaultZone; + let invalid = config3.invalid || (Number.isNaN(config3.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null); + this.ts = isUndefined2(config3.ts) ? Settings.now() : config3.ts; + let c = null, o = null; + if (!invalid) { + const unchanged = config3.old && config3.old.ts === this.ts && config3.old.zone.equals(zone); + if (unchanged) { + [c, o] = [config3.old.c, config3.old.o]; + } else { + const ot = isNumber3(config3.o) && !config3.old ? config3.o : zone.offset(this.ts); + c = tsToObj(this.ts, ot); + invalid = Number.isNaN(c.year) ? new Invalid("invalid input") : null; + c = invalid ? null : c; + o = invalid ? null : ot; + } + } + this._zone = zone; + this.loc = config3.loc || Locale.create(); + this.invalid = invalid; + this.weekData = null; + this.localWeekData = null; + this.c = c; + this.o = o; + this.isLuxonDateTime = true; + } + // CONSTRUCT + /** + * Create a DateTime for the current instant, in the system's time zone. + * + * Use Settings to override these default values if needed. + * @example DateTime.now().toISO() //~> now in the ISO format + * @return {DateTime} + */ + static now() { + return new _DateTime({}); + } + /** + * Create a local DateTime + * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used + * @param {number} [month=1] - The month, 1-indexed + * @param {number} [day=1] - The day of the month, 1-indexed + * @param {number} [hour=0] - The hour of the day, in 24-hour time + * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 + * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 + * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 + * @example DateTime.local() //~> now + * @example DateTime.local({ zone: "America/New_York" }) //~> now, in US east coast time + * @example DateTime.local(2017) //~> 2017-01-01T00:00:00 + * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00 + * @example DateTime.local(2017, 3, 12, { locale: "fr" }) //~> 2017-03-12T00:00:00, with a French locale + * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00 + * @example DateTime.local(2017, 3, 12, 5, { zone: "utc" }) //~> 2017-03-12T05:00:00, in UTC + * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00 + * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10 + * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765 + * @return {DateTime} + */ + static local() { + const [opts, args] = lastOpts(arguments), [year2, month, day2, hour2, minute2, second, millisecond] = args; + return quickDT({ + year: year2, + month, + day: day2, + hour: hour2, + minute: minute2, + second, + millisecond + }, opts); + } + /** + * Create a DateTime in UTC + * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used + * @param {number} [month=1] - The month, 1-indexed + * @param {number} [day=1] - The day of the month + * @param {number} [hour=0] - The hour of the day, in 24-hour time + * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 + * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 + * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 + * @param {Object} options - configuration options for the DateTime + * @param {string} [options.locale] - a locale to set on the resulting DateTime instance + * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance + * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance + * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance + * @example DateTime.utc() //~> now + * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z + * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z + * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z + * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z + * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z + * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: "fr" }) //~> 2017-03-12T05:45:00Z with a French locale + * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z + * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: "fr" }) //~> 2017-03-12T05:45:10.765Z with a French locale + * @return {DateTime} + */ + static utc() { + const [opts, args] = lastOpts(arguments), [year2, month, day2, hour2, minute2, second, millisecond] = args; + opts.zone = FixedOffsetZone.utcInstance; + return quickDT({ + year: year2, + month, + day: day2, + hour: hour2, + minute: minute2, + second, + millisecond + }, opts); + } + /** + * Create a DateTime from a JavaScript Date object. Uses the default zone. + * @param {Date} date - a JavaScript Date object + * @param {Object} options - configuration options for the DateTime + * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into + * @return {DateTime} + */ + static fromJSDate(date5, options = {}) { + const ts = isDate2(date5) ? date5.valueOf() : NaN; + if (Number.isNaN(ts)) { + return _DateTime.invalid("invalid input"); + } + const zoneToUse = normalizeZone(options.zone, Settings.defaultZone); + if (!zoneToUse.isValid) { + return _DateTime.invalid(unsupportedZone(zoneToUse)); + } + return new _DateTime({ + ts, + zone: zoneToUse, + loc: Locale.fromObject(options) + }); + } + /** + * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. + * @param {number} milliseconds - a number of milliseconds since 1970 UTC + * @param {Object} options - configuration options for the DateTime + * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into + * @param {string} [options.locale] - a locale to set on the resulting DateTime instance + * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance + * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance + * @return {DateTime} + */ + static fromMillis(milliseconds, options = {}) { + if (!isNumber3(milliseconds)) { + throw new InvalidArgumentError(`fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`); + } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) { + return _DateTime.invalid("Timestamp out of range"); + } else { + return new _DateTime({ + ts: milliseconds, + zone: normalizeZone(options.zone, Settings.defaultZone), + loc: Locale.fromObject(options) + }); + } + } + /** + * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. + * @param {number} seconds - a number of seconds since 1970 UTC + * @param {Object} options - configuration options for the DateTime + * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into + * @param {string} [options.locale] - a locale to set on the resulting DateTime instance + * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance + * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance + * @return {DateTime} + */ + static fromSeconds(seconds, options = {}) { + if (!isNumber3(seconds)) { + throw new InvalidArgumentError("fromSeconds requires a numerical input"); + } else { + return new _DateTime({ + ts: seconds * 1e3, + zone: normalizeZone(options.zone, Settings.defaultZone), + loc: Locale.fromObject(options) + }); + } + } + /** + * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults. + * @param {Object} obj - the object to create the DateTime from + * @param {number} obj.year - a year, such as 1987 + * @param {number} obj.month - a month, 1-12 + * @param {number} obj.day - a day of the month, 1-31, depending on the month + * @param {number} obj.ordinal - day of the year, 1-365 or 366 + * @param {number} obj.weekYear - an ISO week year + * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year + * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday + * @param {number} obj.localWeekYear - a week year, according to the locale + * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale + * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale + * @param {number} obj.hour - hour of the day, 0-23 + * @param {number} obj.minute - minute of the hour, 0-59 + * @param {number} obj.second - second of the minute, 0-59 + * @param {number} obj.millisecond - millisecond of the second, 0-999 + * @param {Object} opts - options for creating this DateTime + * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone() + * @param {string} [opts.locale='system\'s locale'] - a locale to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance + * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance + * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25' + * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01' + * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06 + * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }), + * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' }) + * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' }) + * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13' + * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: "en-US" }).toISODate() //=> '2021-12-26' + * @return {DateTime} + */ + static fromObject(obj, opts = {}) { + obj = obj || {}; + const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone); + if (!zoneToUse.isValid) { + return _DateTime.invalid(unsupportedZone(zoneToUse)); + } + const loc = Locale.fromObject(opts); + const normalized = normalizeObject(obj, normalizeUnitWithLocalWeeks); + const { + minDaysInFirstWeek, + startOfWeek + } = usesLocalWeekValues(normalized, loc); + const tsNow = Settings.now(), offsetProvis = !isUndefined2(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), containsOrdinal = !isUndefined2(normalized.ordinal), containsGregorYear = !isUndefined2(normalized.year), containsGregorMD = !isUndefined2(normalized.month) || !isUndefined2(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber; + if ((containsGregor || containsOrdinal) && definiteWeekDef) { + throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals"); + } + if (containsGregorMD && containsOrdinal) { + throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day"); + } + const useWeekData = definiteWeekDef || normalized.weekday && !containsGregor; + let units2, defaultValues, objNow = tsToObj(tsNow, offsetProvis); + if (useWeekData) { + units2 = orderedWeekUnits; + defaultValues = defaultWeekUnitValues; + objNow = gregorianToWeek(objNow, minDaysInFirstWeek, startOfWeek); + } else if (containsOrdinal) { + units2 = orderedOrdinalUnits; + defaultValues = defaultOrdinalUnitValues; + objNow = gregorianToOrdinal(objNow); + } else { + units2 = orderedUnits; + defaultValues = defaultUnitValues; + } + let foundFirst = false; + for (const u4 of units2) { + const v2 = normalized[u4]; + if (!isUndefined2(v2)) { + foundFirst = true; + } else if (foundFirst) { + normalized[u4] = defaultValues[u4]; + } else { + normalized[u4] = objNow[u4]; + } + } + const higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized), invalid = higherOrderInvalid || hasInvalidTimeData(normalized); + if (invalid) { + return _DateTime.invalid(invalid); + } + const gregorian = useWeekData ? weekToGregorian(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? ordinalToGregorian(normalized) : normalized, [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse), inst = new _DateTime({ + ts: tsFinal, + zone: zoneToUse, + o: offsetFinal, + loc + }); + if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) { + return _DateTime.invalid("mismatched weekday", `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`); + } + if (!inst.isValid) { + return _DateTime.invalid(inst.invalid); + } + return inst; + } + /** + * Create a DateTime from an ISO 8601 string + * @param {string} text - the ISO string + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone + * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one + * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance + * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance + * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance + * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance + * @example DateTime.fromISO('2016-05-25T09:08:34.123') + * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00') + * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true}) + * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'}) + * @example DateTime.fromISO('2016-W05-4') + * @return {DateTime} + */ + static fromISO(text2, opts = {}) { + const [vals, parsedZone] = parseISODate(text2); + return parseDataToDateTime(vals, parsedZone, opts, "ISO 8601", text2); + } + /** + * Create a DateTime from an RFC 2822 string + * @param {string} text - the RFC 2822 string + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. + * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one + * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance + * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance + * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT') + * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600') + * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z') + * @return {DateTime} + */ + static fromRFC2822(text2, opts = {}) { + const [vals, parsedZone] = parseRFC2822Date(text2); + return parseDataToDateTime(vals, parsedZone, opts, "RFC 2822", text2); + } + /** + * Create a DateTime from an HTTP header date + * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 + * @param {string} text - the HTTP header date + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. + * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods. + * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance + * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance + * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT') + * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT') + * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994') + * @return {DateTime} + */ + static fromHTTP(text2, opts = {}) { + const [vals, parsedZone] = parseHTTPDate(text2); + return parseDataToDateTime(vals, parsedZone, opts, "HTTP", opts); + } + /** + * Create a DateTime from an input string and format string. + * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens). + * @param {string} text - the string to parse + * @param {string} fmt - the format the string is expected to be in (see the link below for the formats) + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone + * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one + * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale + * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system + * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @return {DateTime} + */ + static fromFormat(text2, fmt, opts = {}) { + if (isUndefined2(text2) || isUndefined2(fmt)) { + throw new InvalidArgumentError("fromFormat requires an input string and a format"); + } + const { + locale = null, + numberingSystem = null + } = opts, localeToUse = Locale.fromOpts({ + locale, + numberingSystem, + defaultToEN: true + }), [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text2, fmt); + if (invalid) { + return _DateTime.invalid(invalid); + } else { + return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text2, specificOffset); + } + } + /** + * @deprecated use fromFormat instead + */ + static fromString(text2, fmt, opts = {}) { + return _DateTime.fromFormat(text2, fmt, opts); + } + /** + * Create a DateTime from a SQL date, time, or datetime + * Defaults to en-US if no locale has been specified, regardless of the system's locale + * @param {string} text - the string to parse + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone + * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one + * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale + * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system + * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @example DateTime.fromSQL('2017-05-15') + * @example DateTime.fromSQL('2017-05-15 09:12:34') + * @example DateTime.fromSQL('2017-05-15 09:12:34.342') + * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00') + * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles') + * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true }) + * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' }) + * @example DateTime.fromSQL('09:12:34.342') + * @return {DateTime} + */ + static fromSQL(text2, opts = {}) { + const [vals, parsedZone] = parseSQL(text2); + return parseDataToDateTime(vals, parsedZone, opts, "SQL", text2); + } + /** + * Create an invalid DateTime. + * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent. + * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information + * @return {DateTime} + */ + static invalid(reason, explanation = null) { + if (!reason) { + throw new InvalidArgumentError("need to specify a reason the DateTime is invalid"); + } + const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); + if (Settings.throwOnInvalid) { + throw new InvalidDateTimeError(invalid); + } else { + return new _DateTime({ + invalid + }); + } + } + /** + * Check if an object is an instance of DateTime. Works across context boundaries + * @param {object} o + * @return {boolean} + */ + static isDateTime(o) { + return o && o.isLuxonDateTime || false; + } + /** + * Produce the format string for a set of options + * @param formatOpts + * @param localeOpts + * @returns {string} + */ + static parseFormatForOpts(formatOpts, localeOpts = {}) { + const tokenList = formatOptsToTokens(formatOpts, Locale.fromObject(localeOpts)); + return !tokenList ? null : tokenList.map((t8) => t8 ? t8.val : null).join(""); + } + /** + * Produce the the fully expanded format token for the locale + * Does NOT quote characters, so quoted tokens will not round trip correctly + * @param fmt + * @param localeOpts + * @returns {string} + */ + static expandFormat(fmt, localeOpts = {}) { + const expanded = expandMacroTokens(Formatter.parseFormat(fmt), Locale.fromObject(localeOpts)); + return expanded.map((t8) => t8.val).join(""); + } + static resetCache() { + zoneOffsetTs = void 0; + zoneOffsetGuessCache.clear(); + } + // INFO + /** + * Get the value of unit. + * @param {string} unit - a unit such as 'minute' or 'day' + * @example DateTime.local(2017, 7, 4).get('month'); //=> 7 + * @example DateTime.local(2017, 7, 4).get('day'); //=> 4 + * @return {number} + */ + get(unit) { + return this[unit]; + } + /** + * Returns whether the DateTime is valid. Invalid DateTimes occur when: + * * The DateTime was created from invalid calendar information, such as the 13th month or February 30 + * * The DateTime was created by an operation on another invalid date + * @type {boolean} + */ + get isValid() { + return this.invalid === null; + } + /** + * Returns an error code if this DateTime is invalid, or null if the DateTime is valid + * @type {string} + */ + get invalidReason() { + return this.invalid ? this.invalid.reason : null; + } + /** + * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid + * @type {string} + */ + get invalidExplanation() { + return this.invalid ? this.invalid.explanation : null; + } + /** + * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime + * + * @type {string} + */ + get locale() { + return this.isValid ? this.loc.locale : null; + } + /** + * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime + * + * @type {string} + */ + get numberingSystem() { + return this.isValid ? this.loc.numberingSystem : null; + } + /** + * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime + * + * @type {string} + */ + get outputCalendar() { + return this.isValid ? this.loc.outputCalendar : null; + } + /** + * Get the time zone associated with this DateTime. + * @type {Zone} + */ + get zone() { + return this._zone; + } + /** + * Get the name of the time zone. + * @type {string} + */ + get zoneName() { + return this.isValid ? this.zone.name : null; + } + /** + * Get the year + * @example DateTime.local(2017, 5, 25).year //=> 2017 + * @type {number} + */ + get year() { + return this.isValid ? this.c.year : NaN; + } + /** + * Get the quarter + * @example DateTime.local(2017, 5, 25).quarter //=> 2 + * @type {number} + */ + get quarter() { + return this.isValid ? Math.ceil(this.c.month / 3) : NaN; + } + /** + * Get the month (1-12). + * @example DateTime.local(2017, 5, 25).month //=> 5 + * @type {number} + */ + get month() { + return this.isValid ? this.c.month : NaN; + } + /** + * Get the day of the month (1-30ish). + * @example DateTime.local(2017, 5, 25).day //=> 25 + * @type {number} + */ + get day() { + return this.isValid ? this.c.day : NaN; + } + /** + * Get the hour of the day (0-23). + * @example DateTime.local(2017, 5, 25, 9).hour //=> 9 + * @type {number} + */ + get hour() { + return this.isValid ? this.c.hour : NaN; + } + /** + * Get the minute of the hour (0-59). + * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30 + * @type {number} + */ + get minute() { + return this.isValid ? this.c.minute : NaN; + } + /** + * Get the second of the minute (0-59). + * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52 + * @type {number} + */ + get second() { + return this.isValid ? this.c.second : NaN; + } + /** + * Get the millisecond of the second (0-999). + * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654 + * @type {number} + */ + get millisecond() { + return this.isValid ? this.c.millisecond : NaN; + } + /** + * Get the week year + * @see https://en.wikipedia.org/wiki/ISO_week_date + * @example DateTime.local(2014, 12, 31).weekYear //=> 2015 + * @type {number} + */ + get weekYear() { + return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN; + } + /** + * Get the week number of the week year (1-52ish). + * @see https://en.wikipedia.org/wiki/ISO_week_date + * @example DateTime.local(2017, 5, 25).weekNumber //=> 21 + * @type {number} + */ + get weekNumber() { + return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN; + } + /** + * Get the day of the week. + * 1 is Monday and 7 is Sunday + * @see https://en.wikipedia.org/wiki/ISO_week_date + * @example DateTime.local(2014, 11, 31).weekday //=> 4 + * @type {number} + */ + get weekday() { + return this.isValid ? possiblyCachedWeekData(this).weekday : NaN; + } + /** + * Returns true if this date is on a weekend according to the locale, false otherwise + * @returns {boolean} + */ + get isWeekend() { + return this.isValid && this.loc.getWeekendDays().includes(this.weekday); + } + /** + * Get the day of the week according to the locale. + * 1 is the first day of the week and 7 is the last day of the week. + * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1, + * @returns {number} + */ + get localWeekday() { + return this.isValid ? possiblyCachedLocalWeekData(this).weekday : NaN; + } + /** + * Get the week number of the week year according to the locale. Different locales assign week numbers differently, + * because the week can start on different days of the week (see localWeekday) and because a different number of days + * is required for a week to count as the first week of a year. + * @returns {number} + */ + get localWeekNumber() { + return this.isValid ? possiblyCachedLocalWeekData(this).weekNumber : NaN; + } + /** + * Get the week year according to the locale. Different locales assign week numbers (and therefor week years) + * differently, see localWeekNumber. + * @returns {number} + */ + get localWeekYear() { + return this.isValid ? possiblyCachedLocalWeekData(this).weekYear : NaN; + } + /** + * Get the ordinal (meaning the day of the year) + * @example DateTime.local(2017, 5, 25).ordinal //=> 145 + * @type {number|DateTime} + */ + get ordinal() { + return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN; + } + /** + * Get the human readable short month name, such as 'Oct'. + * Defaults to the system's locale if no locale has been specified + * @example DateTime.local(2017, 10, 30).monthShort //=> Oct + * @type {string} + */ + get monthShort() { + return this.isValid ? Info.months("short", { + locObj: this.loc + })[this.month - 1] : null; + } + /** + * Get the human readable long month name, such as 'October'. + * Defaults to the system's locale if no locale has been specified + * @example DateTime.local(2017, 10, 30).monthLong //=> October + * @type {string} + */ + get monthLong() { + return this.isValid ? Info.months("long", { + locObj: this.loc + })[this.month - 1] : null; + } + /** + * Get the human readable short weekday, such as 'Mon'. + * Defaults to the system's locale if no locale has been specified + * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon + * @type {string} + */ + get weekdayShort() { + return this.isValid ? Info.weekdays("short", { + locObj: this.loc + })[this.weekday - 1] : null; + } + /** + * Get the human readable long weekday, such as 'Monday'. + * Defaults to the system's locale if no locale has been specified + * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday + * @type {string} + */ + get weekdayLong() { + return this.isValid ? Info.weekdays("long", { + locObj: this.loc + })[this.weekday - 1] : null; + } + /** + * Get the UTC offset of this DateTime in minutes + * @example DateTime.now().offset //=> -240 + * @example DateTime.utc().offset //=> 0 + * @type {number} + */ + get offset() { + return this.isValid ? +this.o : NaN; + } + /** + * Get the short human name for the zone's current offset, for example "EST" or "EDT". + * Defaults to the system's locale if no locale has been specified + * @type {string} + */ + get offsetNameShort() { + if (this.isValid) { + return this.zone.offsetName(this.ts, { + format: "short", + locale: this.locale + }); + } else { + return null; + } + } + /** + * Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time". + * Defaults to the system's locale if no locale has been specified + * @type {string} + */ + get offsetNameLong() { + if (this.isValid) { + return this.zone.offsetName(this.ts, { + format: "long", + locale: this.locale + }); + } else { + return null; + } + } + /** + * Get whether this zone's offset ever changes, as in a DST. + * @type {boolean} + */ + get isOffsetFixed() { + return this.isValid ? this.zone.isUniversal : null; + } + /** + * Get whether the DateTime is in a DST. + * @type {boolean} + */ + get isInDST() { + if (this.isOffsetFixed) { + return false; + } else { + return this.offset > this.set({ + month: 1, + day: 1 + }).offset || this.offset > this.set({ + month: 5 + }).offset; + } + } + /** + * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC + * in this DateTime's zone. During DST changes local time can be ambiguous, for example + * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`. + * This method will return both possible DateTimes if this DateTime's local time is ambiguous. + * @returns {DateTime[]} + */ + getPossibleOffsets() { + if (!this.isValid || this.isOffsetFixed) { + return [this]; + } + const dayMs = 864e5; + const minuteMs = 6e4; + const localTS = objToLocalTS(this.c); + const oEarlier = this.zone.offset(localTS - dayMs); + const oLater = this.zone.offset(localTS + dayMs); + const o1 = this.zone.offset(localTS - oEarlier * minuteMs); + const o2 = this.zone.offset(localTS - oLater * minuteMs); + if (o1 === o2) { + return [this]; + } + const ts1 = localTS - o1 * minuteMs; + const ts2 = localTS - o2 * minuteMs; + const c1 = tsToObj(ts1, o1); + const c2 = tsToObj(ts2, o2); + if (c1.hour === c2.hour && c1.minute === c2.minute && c1.second === c2.second && c1.millisecond === c2.millisecond) { + return [clone2(this, { + ts: ts1 + }), clone2(this, { + ts: ts2 + })]; + } + return [this]; + } + /** + * Returns true if this DateTime is in a leap year, false otherwise + * @example DateTime.local(2016).isInLeapYear //=> true + * @example DateTime.local(2013).isInLeapYear //=> false + * @type {boolean} + */ + get isInLeapYear() { + return isLeapYear2(this.year); + } + /** + * Returns the number of days in this DateTime's month + * @example DateTime.local(2016, 2).daysInMonth //=> 29 + * @example DateTime.local(2016, 3).daysInMonth //=> 31 + * @type {number} + */ + get daysInMonth() { + return daysInMonth(this.year, this.month); + } + /** + * Returns the number of days in this DateTime's year + * @example DateTime.local(2016).daysInYear //=> 366 + * @example DateTime.local(2013).daysInYear //=> 365 + * @type {number} + */ + get daysInYear() { + return this.isValid ? daysInYear(this.year) : NaN; + } + /** + * Returns the number of weeks in this DateTime's year + * @see https://en.wikipedia.org/wiki/ISO_week_date + * @example DateTime.local(2004).weeksInWeekYear //=> 53 + * @example DateTime.local(2013).weeksInWeekYear //=> 52 + * @type {number} + */ + get weeksInWeekYear() { + return this.isValid ? weeksInWeekYear(this.weekYear) : NaN; + } + /** + * Returns the number of weeks in this DateTime's local week year + * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52 + * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53 + * @type {number} + */ + get weeksInLocalWeekYear() { + return this.isValid ? weeksInWeekYear(this.localWeekYear, this.loc.getMinDaysInFirstWeek(), this.loc.getStartOfWeek()) : NaN; + } + /** + * Returns the resolved Intl options for this DateTime. + * This is useful in understanding the behavior of formatting methods + * @param {Object} opts - the same options as toLocaleString + * @return {Object} + */ + resolvedLocaleOptions(opts = {}) { + const { + locale, + numberingSystem, + calendar + } = Formatter.create(this.loc.clone(opts), opts).resolvedOptions(this); + return { + locale, + numberingSystem, + outputCalendar: calendar + }; + } + // TRANSFORM + /** + * "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime. + * + * Equivalent to {@link DateTime#setZone}('utc') + * @param {number} [offset=0] - optionally, an offset from UTC in minutes + * @param {Object} [opts={}] - options to pass to `setZone()` + * @return {DateTime} + */ + toUTC(offset2 = 0, opts = {}) { + return this.setZone(FixedOffsetZone.instance(offset2), opts); + } + /** + * "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime. + * + * Equivalent to `setZone('local')` + * @return {DateTime} + */ + toLocal() { + return this.setZone(Settings.defaultZone); + } + /** + * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime. + * + * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones. + * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class. + * @param {Object} opts - options + * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this. + * @return {DateTime} + */ + setZone(zone, { + keepLocalTime = false, + keepCalendarTime = false + } = {}) { + zone = normalizeZone(zone, Settings.defaultZone); + if (zone.equals(this.zone)) { + return this; + } else if (!zone.isValid) { + return _DateTime.invalid(unsupportedZone(zone)); + } else { + let newTS = this.ts; + if (keepLocalTime || keepCalendarTime) { + const offsetGuess = zone.offset(this.ts); + const asObj = this.toObject(); + [newTS] = objToTS(asObj, offsetGuess, zone); + } + return clone2(this, { + ts: newTS, + zone + }); + } + } + /** + * "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime. + * @param {Object} properties - the properties to set + * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' }) + * @return {DateTime} + */ + reconfigure({ + locale, + numberingSystem, + outputCalendar + } = {}) { + const loc = this.loc.clone({ + locale, + numberingSystem, + outputCalendar + }); + return clone2(this, { + loc + }); + } + /** + * "Set" the locale. Returns a newly-constructed DateTime. + * Just a convenient alias for reconfigure({ locale }) + * @example DateTime.local(2017, 5, 25).setLocale('en-GB') + * @return {DateTime} + */ + setLocale(locale) { + return this.reconfigure({ + locale + }); + } + /** + * "Set" the values of specified units. Returns a newly-constructed DateTime. + * You can only set units with this method; for "setting" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}. + * + * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`. + * They cannot be mixed with ISO-week units like `weekday`. + * @param {Object} values - a mapping of units to numbers + * @example dt.set({ year: 2017 }) + * @example dt.set({ hour: 8, minute: 30 }) + * @example dt.set({ weekday: 5 }) + * @example dt.set({ year: 2005, ordinal: 234 }) + * @return {DateTime} + */ + set(values) { + if (!this.isValid) return this; + const normalized = normalizeObject(values, normalizeUnitWithLocalWeeks); + const { + minDaysInFirstWeek, + startOfWeek + } = usesLocalWeekValues(normalized, this.loc); + const settingWeekStuff = !isUndefined2(normalized.weekYear) || !isUndefined2(normalized.weekNumber) || !isUndefined2(normalized.weekday), containsOrdinal = !isUndefined2(normalized.ordinal), containsGregorYear = !isUndefined2(normalized.year), containsGregorMD = !isUndefined2(normalized.month) || !isUndefined2(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber; + if ((containsGregor || containsOrdinal) && definiteWeekDef) { + throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals"); + } + if (containsGregorMD && containsOrdinal) { + throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day"); + } + let mixed; + if (settingWeekStuff) { + mixed = weekToGregorian({ + ...gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), + ...normalized + }, minDaysInFirstWeek, startOfWeek); + } else if (!isUndefined2(normalized.ordinal)) { + mixed = ordinalToGregorian({ + ...gregorianToOrdinal(this.c), + ...normalized + }); + } else { + mixed = { + ...this.toObject(), + ...normalized + }; + if (isUndefined2(normalized.day)) { + mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day); + } + } + const [ts, o] = objToTS(mixed, this.o, this.zone); + return clone2(this, { + ts, + o + }); + } + /** + * Add a period of time to this DateTime and return the resulting DateTime + * + * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between. + * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() + * @example DateTime.now().plus(123) //~> in 123 milliseconds + * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes + * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow + * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday + * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min + * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min + * @return {DateTime} + */ + plus(duration3) { + if (!this.isValid) return this; + const dur = Duration.fromDurationLike(duration3); + return clone2(this, adjustTime(this, dur)); + } + /** + * Subtract a period of time to this DateTime and return the resulting DateTime + * See {@link DateTime#plus} + * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() + @return {DateTime} + */ + minus(duration3) { + if (!this.isValid) return this; + const dur = Duration.fromDurationLike(duration3).negate(); + return clone2(this, adjustTime(this, dur)); + } + /** + * "Set" this DateTime to the beginning of a unit of time. + * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. + * @param {Object} opts - options + * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week + * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01' + * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01' + * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays + * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00' + * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00' + * @return {DateTime} + */ + startOf(unit, { + useLocaleWeeks = false + } = {}) { + if (!this.isValid) return this; + const o = {}, normalizedUnit = Duration.normalizeUnit(unit); + switch (normalizedUnit) { + case "years": + o.month = 1; + // falls through + case "quarters": + case "months": + o.day = 1; + // falls through + case "weeks": + case "days": + o.hour = 0; + // falls through + case "hours": + o.minute = 0; + // falls through + case "minutes": + o.second = 0; + // falls through + case "seconds": + o.millisecond = 0; + break; + } + if (normalizedUnit === "weeks") { + if (useLocaleWeeks) { + const startOfWeek = this.loc.getStartOfWeek(); + const { + weekday + } = this; + if (weekday < startOfWeek) { + o.weekNumber = this.weekNumber - 1; + } + o.weekday = startOfWeek; + } else { + o.weekday = 1; + } + } + if (normalizedUnit === "quarters") { + const q = Math.ceil(this.month / 3); + o.month = (q - 1) * 3 + 1; + } + return this.set(o); + } + /** + * "Set" this DateTime to the end (meaning the last millisecond) of a unit of time + * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. + * @param {Object} opts - options + * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week + * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00' + * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00' + * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays + * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00' + * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00' + * @return {DateTime} + */ + endOf(unit, opts) { + return this.isValid ? this.plus({ + [unit]: 1 + }).startOf(unit, opts).minus(1) : this; + } + // OUTPUT + /** + * Returns a string representation of this DateTime formatted according to the specified format string. + * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens). + * Defaults to en-US if no locale has been specified, regardless of the system's locale. + * @param {string} fmt - the format string + * @param {Object} opts - opts to override the configuration options on this DateTime + * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22' + * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22' + * @example DateTime.now().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22' + * @example DateTime.now().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes' + * @return {string} + */ + toFormat(fmt, opts = {}) { + return this.isValid ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID; + } + /** + * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`. + * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation + * of the DateTime in the assigned locale. + * Defaults to the system's locale if no locale has been specified + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat + * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options + * @param {Object} opts - opts to override the configuration options on this DateTime + * @example DateTime.now().toLocaleString(); //=> 4/20/2017 + * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017' + * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017' + * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022' + * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM' + * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM' + * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20' + * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM' + * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32' + * @return {string} + */ + toLocaleString(formatOpts = DATE_SHORT, opts = {}) { + return this.isValid ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this) : INVALID; + } + /** + * Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output. + * Defaults to the system's locale if no locale has been specified + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts + * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`. + * @example DateTime.now().toLocaleParts(); //=> [ + * //=> { type: 'day', value: '25' }, + * //=> { type: 'literal', value: '/' }, + * //=> { type: 'month', value: '05' }, + * //=> { type: 'literal', value: '/' }, + * //=> { type: 'year', value: '1982' } + * //=> ] + */ + toLocaleParts(opts = {}) { + return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : []; + } + /** + * Returns an ISO 8601-compliant string representation of this DateTime + * @param {Object} opts - options + * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 + * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 + * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' + * @param {boolean} [opts.extendedZone=false] - add the time zone format extension + * @param {string} [opts.format='extended'] - choose between the basic and extended format + * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'years', 'months', 'days', 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0. + * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z' + * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00' + * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335' + * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400' + * @example DateTime.now().toISO({ precision: 'day' }) //=> '2017-04-22Z' + * @example DateTime.now().toISO({ precision: 'minute' }) //=> '2017-04-22T20:47Z' + * @return {string|null} + */ + toISO({ + format = "extended", + suppressSeconds = false, + suppressMilliseconds = false, + includeOffset = true, + extendedZone = false, + precision = "milliseconds" + } = {}) { + if (!this.isValid) { + return null; + } + precision = normalizeUnit(precision); + const ext = format === "extended"; + let c = toISODate(this, ext, precision); + if (orderedUnits.indexOf(precision) >= 3) c += "T"; + c += toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone, precision); + return c; + } + /** + * Returns an ISO 8601-compliant string representation of this DateTime's date component + * @param {Object} opts - options + * @param {string} [opts.format='extended'] - choose between the basic and extended format + * @param {string} [opts.precision='day'] - truncate output to desired precision: 'years', 'months', or 'days'. + * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25' + * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525' + * @example DateTime.utc(1982, 5, 25).toISODate({ precision: 'month' }) //=> '1982-05' + * @return {string|null} + */ + toISODate({ + format = "extended", + precision = "day" + } = {}) { + if (!this.isValid) { + return null; + } + return toISODate(this, format === "extended", normalizeUnit(precision)); + } + /** + * Returns an ISO 8601-compliant string representation of this DateTime's week date + * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2' + * @return {string} + */ + toISOWeekDate() { + return toTechFormat(this, "kkkk-'W'WW-c"); + } + /** + * Returns an ISO 8601-compliant string representation of this DateTime's time component + * @param {Object} opts - options + * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 + * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 + * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' + * @param {boolean} [opts.extendedZone=true] - add the time zone format extension + * @param {boolean} [opts.includePrefix=false] - include the `T` prefix + * @param {string} [opts.format='extended'] - choose between the basic and extended format + * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0. + * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z' + * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z' + * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z' + * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z' + * @example DateTime.utc().set({ hour: 7, minute: 34, second: 56 }).toISOTime({ precision: 'minute' }) //=> '07:34Z' + * @return {string} + */ + toISOTime({ + suppressMilliseconds = false, + suppressSeconds = false, + includeOffset = true, + includePrefix = false, + extendedZone = false, + format = "extended", + precision = "milliseconds" + } = {}) { + if (!this.isValid) { + return null; + } + precision = normalizeUnit(precision); + let c = includePrefix && orderedUnits.indexOf(precision) >= 3 ? "T" : ""; + return c + toISOTime(this, format === "extended", suppressSeconds, suppressMilliseconds, includeOffset, extendedZone, precision); + } + /** + * Returns an RFC 2822-compatible string representation of this DateTime + * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000' + * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400' + * @return {string} + */ + toRFC2822() { + return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false); + } + /** + * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT. + * Specifically, the string conforms to RFC 1123. + * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 + * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT' + * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT' + * @return {string} + */ + toHTTP() { + return toTechFormat(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'"); + } + /** + * Returns a string representation of this DateTime appropriate for use in SQL Date + * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13' + * @return {string|null} + */ + toSQLDate() { + if (!this.isValid) { + return null; + } + return toISODate(this, true); + } + /** + * Returns a string representation of this DateTime appropriate for use in SQL Time + * @param {Object} opts - options + * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. + * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' + * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00' + * @example DateTime.utc().toSQL() //=> '05:15:16.345' + * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00' + * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345' + * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York' + * @return {string} + */ + toSQLTime({ + includeOffset = true, + includeZone = false, + includeOffsetSpace = true + } = {}) { + let fmt = "HH:mm:ss.SSS"; + if (includeZone || includeOffset) { + if (includeOffsetSpace) { + fmt += " "; + } + if (includeZone) { + fmt += "z"; + } else if (includeOffset) { + fmt += "ZZ"; + } + } + return toTechFormat(this, fmt, true); + } + /** + * Returns a string representation of this DateTime appropriate for use in SQL DateTime + * @param {Object} opts - options + * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. + * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' + * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00' + * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z' + * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00' + * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000' + * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York' + * @return {string} + */ + toSQL(opts = {}) { + if (!this.isValid) { + return null; + } + return `${this.toSQLDate()} ${this.toSQLTime(opts)}`; + } + /** + * Returns a string representation of this DateTime appropriate for debugging + * @return {string} + */ + toString() { + return this.isValid ? this.toISO() : INVALID; + } + /** + * Returns a string representation of this DateTime appropriate for the REPL. + * @return {string} + */ + [/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() { + if (this.isValid) { + return `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`; + } else { + return `DateTime { Invalid, reason: ${this.invalidReason} }`; + } + } + /** + * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis} + * @return {number} + */ + valueOf() { + return this.toMillis(); + } + /** + * Returns the epoch milliseconds of this DateTime. + * @return {number} + */ + toMillis() { + return this.isValid ? this.ts : NaN; + } + /** + * Returns the epoch seconds (including milliseconds in the fractional part) of this DateTime. + * @return {number} + */ + toSeconds() { + return this.isValid ? this.ts / 1e3 : NaN; + } + /** + * Returns the epoch seconds (as a whole number) of this DateTime. + * @return {number} + */ + toUnixInteger() { + return this.isValid ? Math.floor(this.ts / 1e3) : NaN; + } + /** + * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON. + * @return {string} + */ + toJSON() { + return this.toISO(); + } + /** + * Returns a BSON serializable equivalent to this DateTime. + * @return {Date} + */ + toBSON() { + return this.toJSDate(); + } + /** + * Returns a JavaScript object with this DateTime's year, month, day, and so on. + * @param opts - options for generating the object + * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output + * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 } + * @return {Object} + */ + toObject(opts = {}) { + if (!this.isValid) return {}; + const base = { + ...this.c + }; + if (opts.includeConfig) { + base.outputCalendar = this.outputCalendar; + base.numberingSystem = this.loc.numberingSystem; + base.locale = this.loc.locale; + } + return base; + } + /** + * Returns a JavaScript Date equivalent to this DateTime. + * @return {Date} + */ + toJSDate() { + return new Date(this.isValid ? this.ts : NaN); + } + // COMPARE + /** + * Return the difference between two DateTimes as a Duration. + * @param {DateTime} otherDateTime - the DateTime to compare this one to + * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration. + * @param {Object} opts - options that affect the creation of the Duration + * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use + * @example + * var i1 = DateTime.fromISO('1982-05-25T09:45'), + * i2 = DateTime.fromISO('1983-10-14T10:30'); + * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 } + * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 } + * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 } + * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 } + * @return {Duration} + */ + diff(otherDateTime, unit = "milliseconds", opts = {}) { + if (!this.isValid || !otherDateTime.isValid) { + return Duration.invalid("created by diffing an invalid DateTime"); + } + const durOpts = { + locale: this.locale, + numberingSystem: this.numberingSystem, + ...opts + }; + const units2 = maybeArray(unit).map(Duration.normalizeUnit), otherIsLater = otherDateTime.valueOf() > this.valueOf(), earlier = otherIsLater ? this : otherDateTime, later = otherIsLater ? otherDateTime : this, diffed = diff(earlier, later, units2, durOpts); + return otherIsLater ? diffed.negate() : diffed; + } + /** + * Return the difference between this DateTime and right now. + * See {@link DateTime#diff} + * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration + * @param {Object} opts - options that affect the creation of the Duration + * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use + * @return {Duration} + */ + diffNow(unit = "milliseconds", opts = {}) { + return this.diff(_DateTime.now(), unit, opts); + } + /** + * Return an Interval spanning between this DateTime and another DateTime + * @param {DateTime} otherDateTime - the other end point of the Interval + * @return {Interval|DateTime} + */ + until(otherDateTime) { + return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this; + } + /** + * Return whether this DateTime is in the same unit of time as another DateTime. + * Higher-order units must also be identical for this function to return `true`. + * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed. + * @param {DateTime} otherDateTime - the other DateTime + * @param {string} unit - the unit of time to check sameness on + * @param {Object} opts - options + * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used + * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day + * @return {boolean} + */ + hasSame(otherDateTime, unit, opts) { + if (!this.isValid) return false; + const inputMs = otherDateTime.valueOf(); + const adjustedToZone = this.setZone(otherDateTime.zone, { + keepLocalTime: true + }); + return adjustedToZone.startOf(unit, opts) <= inputMs && inputMs <= adjustedToZone.endOf(unit, opts); + } + /** + * Equality check + * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid. + * To compare just the millisecond values, use `+dt1 === +dt2`. + * @param {DateTime} other - the other DateTime + * @return {boolean} + */ + equals(other) { + return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc); + } + /** + * Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your + * platform supports Intl.RelativeTimeFormat. Rounds towards zero by default. + * @param {Object} options - options that affect the output + * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now. + * @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow" + * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds" + * @param {boolean} [options.round=true] - whether to round the numbers in the output. + * @param {string} [options.rounding="trunc"] - rounding method to use when rounding the numbers in the output. Can be "trunc" (toward zero), "expand" (away from zero), "round", "floor", or "ceil". + * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding. + * @param {string} options.locale - override the locale of this DateTime + * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this + * @example DateTime.now().plus({ days: 1 }).toRelative() //=> "in 1 day" + * @example DateTime.now().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día" + * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures" + * @example DateTime.now().minus({ days: 2 }).toRelative() //=> "2 days ago" + * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago" + * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago" + */ + toRelative(options = {}) { + if (!this.isValid) return null; + const base = options.base || _DateTime.fromObject({}, { + zone: this.zone + }), padding = options.padding ? this < base ? -options.padding : options.padding : 0; + let units2 = ["years", "months", "days", "hours", "minutes", "seconds"]; + let unit = options.unit; + if (Array.isArray(options.unit)) { + units2 = options.unit; + unit = void 0; + } + return diffRelative(base, this.plus(padding), { + ...options, + numeric: "always", + units: units2, + unit + }); + } + /** + * Returns a string representation of this date relative to today, such as "yesterday" or "next month". + * Only internationalizes on platforms that supports Intl.RelativeTimeFormat. + * @param {Object} options - options that affect the output + * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now. + * @param {string} options.locale - override the locale of this DateTime + * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days" + * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this + * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow" + * @example DateTime.now().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana" + * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain" + * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago" + */ + toRelativeCalendar(options = {}) { + if (!this.isValid) return null; + return diffRelative(options.base || _DateTime.fromObject({}, { + zone: this.zone + }), this, { + ...options, + numeric: "auto", + units: ["years", "months", "days"], + calendary: true + }); + } + /** + * Return the min of several date times + * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum + * @return {DateTime} the min DateTime, or undefined if called with no argument + */ + static min(...dateTimes) { + if (!dateTimes.every(_DateTime.isDateTime)) { + throw new InvalidArgumentError("min requires all arguments be DateTimes"); + } + return bestBy(dateTimes, (i) => i.valueOf(), Math.min); + } + /** + * Return the max of several date times + * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum + * @return {DateTime} the max DateTime, or undefined if called with no argument + */ + static max(...dateTimes) { + if (!dateTimes.every(_DateTime.isDateTime)) { + throw new InvalidArgumentError("max requires all arguments be DateTimes"); + } + return bestBy(dateTimes, (i) => i.valueOf(), Math.max); + } + // MISC + /** + * Explain how a string would be parsed by fromFormat() + * @param {string} text - the string to parse + * @param {string} fmt - the format the string is expected to be in (see description) + * @param {Object} options - options taken by fromFormat() + * @return {Object} + */ + static fromFormatExplain(text2, fmt, options = {}) { + const { + locale = null, + numberingSystem = null + } = options, localeToUse = Locale.fromOpts({ + locale, + numberingSystem, + defaultToEN: true + }); + return explainFromTokens(localeToUse, text2, fmt); + } + /** + * @deprecated use fromFormatExplain instead + */ + static fromStringExplain(text2, fmt, options = {}) { + return _DateTime.fromFormatExplain(text2, fmt, options); + } + /** + * Build a parser for `fmt` using the given locale. This parser can be passed + * to {@link DateTime.fromFormatParser} to a parse a date in this format. This + * can be used to optimize cases where many dates need to be parsed in a + * specific format. + * + * @param {String} fmt - the format the string is expected to be in (see + * description) + * @param {Object} options - options used to set locale and numberingSystem + * for parser + * @returns {TokenParser} - opaque object to be used + */ + static buildFormatParser(fmt, options = {}) { + const { + locale = null, + numberingSystem = null + } = options, localeToUse = Locale.fromOpts({ + locale, + numberingSystem, + defaultToEN: true + }); + return new TokenParser(localeToUse, fmt); + } + /** + * Create a DateTime from an input string and format parser. + * + * The format parser must have been created with the same locale as this call. + * + * @param {String} text - the string to parse + * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser} + * @param {Object} opts - options taken by fromFormat() + * @returns {DateTime} + */ + static fromFormatParser(text2, formatParser, opts = {}) { + if (isUndefined2(text2) || isUndefined2(formatParser)) { + throw new InvalidArgumentError("fromFormatParser requires an input string and a format parser"); + } + const { + locale = null, + numberingSystem = null + } = opts, localeToUse = Locale.fromOpts({ + locale, + numberingSystem, + defaultToEN: true + }); + if (!localeToUse.equals(formatParser.locale)) { + throw new InvalidArgumentError(`fromFormatParser called with a locale of ${localeToUse}, but the format parser was created for ${formatParser.locale}`); + } + const { + result, + zone, + specificOffset, + invalidReason + } = formatParser.explainFromTokens(text2); + if (invalidReason) { + return _DateTime.invalid(invalidReason); + } else { + return parseDataToDateTime(result, zone, opts, `format ${formatParser.format}`, text2, specificOffset); + } + } + // FORMAT PRESETS + /** + * {@link DateTime#toLocaleString} format like 10/14/1983 + * @type {Object} + */ + static get DATE_SHORT() { + return DATE_SHORT; + } + /** + * {@link DateTime#toLocaleString} format like 'Oct 14, 1983' + * @type {Object} + */ + static get DATE_MED() { + return DATE_MED; + } + /** + * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983' + * @type {Object} + */ + static get DATE_MED_WITH_WEEKDAY() { + return DATE_MED_WITH_WEEKDAY; + } + /** + * {@link DateTime#toLocaleString} format like 'October 14, 1983' + * @type {Object} + */ + static get DATE_FULL() { + return DATE_FULL; + } + /** + * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983' + * @type {Object} + */ + static get DATE_HUGE() { + return DATE_HUGE; + } + /** + * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get TIME_SIMPLE() { + return TIME_SIMPLE; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get TIME_WITH_SECONDS() { + return TIME_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is. + * @type {Object} + */ + static get TIME_WITH_SHORT_OFFSET() { + return TIME_WITH_SHORT_OFFSET; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is. + * @type {Object} + */ + static get TIME_WITH_LONG_OFFSET() { + return TIME_WITH_LONG_OFFSET; + } + /** + * {@link DateTime#toLocaleString} format like '09:30', always 24-hour. + * @type {Object} + */ + static get TIME_24_SIMPLE() { + return TIME_24_SIMPLE; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour. + * @type {Object} + */ + static get TIME_24_WITH_SECONDS() { + return TIME_24_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour. + * @type {Object} + */ + static get TIME_24_WITH_SHORT_OFFSET() { + return TIME_24_WITH_SHORT_OFFSET; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour. + * @type {Object} + */ + static get TIME_24_WITH_LONG_OFFSET() { + return TIME_24_WITH_LONG_OFFSET; + } + /** + * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_SHORT() { + return DATETIME_SHORT; + } + /** + * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_SHORT_WITH_SECONDS() { + return DATETIME_SHORT_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_MED() { + return DATETIME_MED; + } + /** + * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_MED_WITH_SECONDS() { + return DATETIME_MED_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_MED_WITH_WEEKDAY() { + return DATETIME_MED_WITH_WEEKDAY; + } + /** + * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_FULL() { + return DATETIME_FULL; + } + /** + * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_FULL_WITH_SECONDS() { + return DATETIME_FULL_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_HUGE() { + return DATETIME_HUGE; + } + /** + * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_HUGE_WITH_SECONDS() { + return DATETIME_HUGE_WITH_SECONDS; + } + }; + function friendlyDateTime(dateTimeish) { + if (DateTime.isDateTime(dateTimeish)) { + return dateTimeish; + } else if (dateTimeish && dateTimeish.valueOf && isNumber3(dateTimeish.valueOf())) { + return DateTime.fromJSDate(dateTimeish); + } else if (dateTimeish && typeof dateTimeish === "object") { + return DateTime.fromObject(dateTimeish); + } else { + throw new InvalidArgumentError(`Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`); + } + } + __name(friendlyDateTime, "friendlyDateTime"); + var VERSION3 = "3.7.2"; + exports.DateTime = DateTime; + exports.Duration = Duration; + exports.FixedOffsetZone = FixedOffsetZone; + exports.IANAZone = IANAZone; + exports.Info = Info; + exports.Interval = Interval; + exports.InvalidZone = InvalidZone; + exports.Settings = Settings; + exports.SystemZone = SystemZone; + exports.VERSION = VERSION3; + exports.Zone = Zone; + } +}); + +// ../../node_modules/cron-parser/lib/date.js +var require_date = __commonJS({ + "../../node_modules/cron-parser/lib/date.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var luxon = require_luxon(); + CronDate.prototype.addYear = function() { + this._date = this._date.plus({ years: 1 }); + }; + CronDate.prototype.addMonth = function() { + this._date = this._date.plus({ months: 1 }).startOf("month"); + }; + CronDate.prototype.addDay = function() { + this._date = this._date.plus({ days: 1 }).startOf("day"); + }; + CronDate.prototype.addHour = function() { + var prev = this._date; + this._date = this._date.plus({ hours: 1 }).startOf("hour"); + if (this._date <= prev) { + this._date = this._date.plus({ hours: 1 }); + } + }; + CronDate.prototype.addMinute = function() { + var prev = this._date; + this._date = this._date.plus({ minutes: 1 }).startOf("minute"); + if (this._date < prev) { + this._date = this._date.plus({ hours: 1 }); + } + }; + CronDate.prototype.addSecond = function() { + var prev = this._date; + this._date = this._date.plus({ seconds: 1 }).startOf("second"); + if (this._date < prev) { + this._date = this._date.plus({ hours: 1 }); + } + }; + CronDate.prototype.subtractYear = function() { + this._date = this._date.minus({ years: 1 }); + }; + CronDate.prototype.subtractMonth = function() { + this._date = this._date.minus({ months: 1 }).endOf("month").startOf("second"); + }; + CronDate.prototype.subtractDay = function() { + this._date = this._date.minus({ days: 1 }).endOf("day").startOf("second"); + }; + CronDate.prototype.subtractHour = function() { + var prev = this._date; + this._date = this._date.minus({ hours: 1 }).endOf("hour").startOf("second"); + if (this._date >= prev) { + this._date = this._date.minus({ hours: 1 }); + } + }; + CronDate.prototype.subtractMinute = function() { + var prev = this._date; + this._date = this._date.minus({ minutes: 1 }).endOf("minute").startOf("second"); + if (this._date > prev) { + this._date = this._date.minus({ hours: 1 }); + } + }; + CronDate.prototype.subtractSecond = function() { + var prev = this._date; + this._date = this._date.minus({ seconds: 1 }).startOf("second"); + if (this._date > prev) { + this._date = this._date.minus({ hours: 1 }); + } + }; + CronDate.prototype.getDate = function() { + return this._date.day; + }; + CronDate.prototype.getFullYear = function() { + return this._date.year; + }; + CronDate.prototype.getDay = function() { + var weekday = this._date.weekday; + return weekday == 7 ? 0 : weekday; + }; + CronDate.prototype.getMonth = function() { + return this._date.month - 1; + }; + CronDate.prototype.getHours = function() { + return this._date.hour; + }; + CronDate.prototype.getMinutes = function() { + return this._date.minute; + }; + CronDate.prototype.getSeconds = function() { + return this._date.second; + }; + CronDate.prototype.getMilliseconds = function() { + return this._date.millisecond; + }; + CronDate.prototype.getTime = function() { + return this._date.valueOf(); + }; + CronDate.prototype.getUTCDate = function() { + return this._getUTC().day; + }; + CronDate.prototype.getUTCFullYear = function() { + return this._getUTC().year; + }; + CronDate.prototype.getUTCDay = function() { + var weekday = this._getUTC().weekday; + return weekday == 7 ? 0 : weekday; + }; + CronDate.prototype.getUTCMonth = function() { + return this._getUTC().month - 1; + }; + CronDate.prototype.getUTCHours = function() { + return this._getUTC().hour; + }; + CronDate.prototype.getUTCMinutes = function() { + return this._getUTC().minute; + }; + CronDate.prototype.getUTCSeconds = function() { + return this._getUTC().second; + }; + CronDate.prototype.toISOString = function() { + return this._date.toUTC().toISO(); + }; + CronDate.prototype.toJSON = function() { + return this._date.toJSON(); + }; + CronDate.prototype.setDate = function(d) { + this._date = this._date.set({ day: d }); + }; + CronDate.prototype.setFullYear = function(y) { + this._date = this._date.set({ year: y }); + }; + CronDate.prototype.setDay = function(d) { + this._date = this._date.set({ weekday: d }); + }; + CronDate.prototype.setMonth = function(m) { + this._date = this._date.set({ month: m + 1 }); + }; + CronDate.prototype.setHours = function(h) { + this._date = this._date.set({ hour: h }); + }; + CronDate.prototype.setMinutes = function(m) { + this._date = this._date.set({ minute: m }); + }; + CronDate.prototype.setSeconds = function(s) { + this._date = this._date.set({ second: s }); + }; + CronDate.prototype.setMilliseconds = function(s) { + this._date = this._date.set({ millisecond: s }); + }; + CronDate.prototype._getUTC = function() { + return this._date.toUTC(); + }; + CronDate.prototype.toString = function() { + return this.toDate().toString(); + }; + CronDate.prototype.toDate = function() { + return this._date.toJSDate(); + }; + CronDate.prototype.isLastDayOfMonth = function() { + var newDate = this._date.plus({ days: 1 }).startOf("day"); + return this._date.month !== newDate.month; + }; + CronDate.prototype.isLastWeekdayOfMonth = function() { + var newDate = this._date.plus({ days: 7 }).startOf("day"); + return this._date.month !== newDate.month; + }; + function CronDate(timestamp, tz) { + var dateOpts = { zone: tz }; + if (!timestamp) { + this._date = luxon.DateTime.local(); + } else if (timestamp instanceof CronDate) { + this._date = timestamp._date; + } else if (timestamp instanceof Date) { + this._date = luxon.DateTime.fromJSDate(timestamp, dateOpts); + } else if (typeof timestamp === "number") { + this._date = luxon.DateTime.fromMillis(timestamp, dateOpts); + } else if (typeof timestamp === "string") { + this._date = luxon.DateTime.fromISO(timestamp, dateOpts); + this._date.isValid || (this._date = luxon.DateTime.fromRFC2822(timestamp, dateOpts)); + this._date.isValid || (this._date = luxon.DateTime.fromSQL(timestamp, dateOpts)); + this._date.isValid || (this._date = luxon.DateTime.fromFormat(timestamp, "EEE, d MMM yyyy HH:mm:ss", dateOpts)); + } + if (!this._date || !this._date.isValid) { + throw new Error("CronDate: unhandled timestamp: " + JSON.stringify(timestamp)); + } + if (tz && tz !== this._date.zoneName) { + this._date = this._date.setZone(tz); + } + } + __name(CronDate, "CronDate"); + module2.exports = CronDate; + } +}); + +// ../../node_modules/cron-parser/lib/field_compactor.js +var require_field_compactor = __commonJS({ + "../../node_modules/cron-parser/lib/field_compactor.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + function buildRange(item) { + return { + start: item, + count: 1 + }; + } + __name(buildRange, "buildRange"); + function completeRangeWithItem(range, item) { + range.end = item; + range.step = item - range.start; + range.count = 2; + } + __name(completeRangeWithItem, "completeRangeWithItem"); + function finalizeCurrentRange(results, currentRange, currentItemRange) { + if (currentRange) { + if (currentRange.count === 2) { + results.push(buildRange(currentRange.start)); + results.push(buildRange(currentRange.end)); + } else { + results.push(currentRange); + } + } + if (currentItemRange) { + results.push(currentItemRange); + } + } + __name(finalizeCurrentRange, "finalizeCurrentRange"); + function compactField(arr) { + var results = []; + var currentRange = void 0; + for (var i = 0; i < arr.length; i++) { + var currentItem = arr[i]; + if (typeof currentItem !== "number") { + finalizeCurrentRange(results, currentRange, buildRange(currentItem)); + currentRange = void 0; + } else if (!currentRange) { + currentRange = buildRange(currentItem); + } else if (currentRange.count === 1) { + completeRangeWithItem(currentRange, currentItem); + } else { + if (currentRange.step === currentItem - currentRange.end) { + currentRange.count++; + currentRange.end = currentItem; + } else if (currentRange.count === 2) { + results.push(buildRange(currentRange.start)); + currentRange = buildRange(currentRange.end); + completeRangeWithItem(currentRange, currentItem); + } else { + finalizeCurrentRange(results, currentRange); + currentRange = buildRange(currentItem); + } + } + } + finalizeCurrentRange(results, currentRange); + return results; + } + __name(compactField, "compactField"); + module2.exports = compactField; + } +}); + +// ../../node_modules/cron-parser/lib/field_stringify.js +var require_field_stringify = __commonJS({ + "../../node_modules/cron-parser/lib/field_stringify.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var compactField = require_field_compactor(); + function stringifyField(arr, min, max2) { + var ranges = compactField(arr); + if (ranges.length === 1) { + var singleRange = ranges[0]; + var step = singleRange.step; + if (step === 1 && singleRange.start === min && singleRange.end === max2) { + return "*"; + } + if (step !== 1 && singleRange.start === min && singleRange.end === max2 - step + 1) { + return "*/" + step; + } + } + var result = []; + for (var i = 0, l = ranges.length; i < l; ++i) { + var range = ranges[i]; + if (range.count === 1) { + result.push(range.start); + continue; + } + var step = range.step; + if (range.step === 1) { + result.push(range.start + "-" + range.end); + continue; + } + var multiplier = range.start == 0 ? range.count - 1 : range.count; + if (range.step * multiplier > range.end) { + result = result.concat( + Array.from({ length: range.end - range.start + 1 }).map(function(_, index) { + var value = range.start + index; + if ((value - range.start) % range.step === 0) { + return value; + } + return null; + }).filter(function(value) { + return value != null; + }) + ); + } else if (range.end === max2 - range.step + 1) { + result.push(range.start + "/" + range.step); + } else { + result.push(range.start + "-" + range.end + "/" + range.step); + } + } + return result.join(","); + } + __name(stringifyField, "stringifyField"); + module2.exports = stringifyField; + } +}); + +// ../../node_modules/cron-parser/lib/expression.js +var require_expression = __commonJS({ + "../../node_modules/cron-parser/lib/expression.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var CronDate = require_date(); + var stringifyField = require_field_stringify(); + var LOOP_LIMIT = 1e4; + function CronExpression(fields, options) { + this._options = options; + this._utc = options.utc || false; + this._tz = this._utc ? "UTC" : options.tz; + this._currentDate = new CronDate(options.currentDate, this._tz); + this._startDate = options.startDate ? new CronDate(options.startDate, this._tz) : null; + this._endDate = options.endDate ? new CronDate(options.endDate, this._tz) : null; + this._isIterator = options.iterator || false; + this._hasIterated = false; + this._nthDayOfWeek = options.nthDayOfWeek || 0; + this.fields = CronExpression._freezeFields(fields); + } + __name(CronExpression, "CronExpression"); + CronExpression.map = ["second", "minute", "hour", "dayOfMonth", "month", "dayOfWeek"]; + CronExpression.predefined = { + "@yearly": "0 0 1 1 *", + "@monthly": "0 0 1 * *", + "@weekly": "0 0 * * 0", + "@daily": "0 0 * * *", + "@hourly": "0 * * * *" + }; + CronExpression.constraints = [ + { min: 0, max: 59, chars: [] }, + // Second + { min: 0, max: 59, chars: [] }, + // Minute + { min: 0, max: 23, chars: [] }, + // Hour + { min: 1, max: 31, chars: ["L"] }, + // Day of month + { min: 1, max: 12, chars: [] }, + // Month + { min: 0, max: 7, chars: ["L"] } + // Day of week + ]; + CronExpression.daysInMonth = [ + 31, + 29, + 31, + 30, + 31, + 30, + 31, + 31, + 30, + 31, + 30, + 31 + ]; + CronExpression.aliases = { + month: { + jan: 1, + feb: 2, + mar: 3, + apr: 4, + may: 5, + jun: 6, + jul: 7, + aug: 8, + sep: 9, + oct: 10, + nov: 11, + dec: 12 + }, + dayOfWeek: { + sun: 0, + mon: 1, + tue: 2, + wed: 3, + thu: 4, + fri: 5, + sat: 6 + } + }; + CronExpression.parseDefaults = ["0", "*", "*", "*", "*", "*"]; + CronExpression.standardValidCharacters = /^[,*\d/-]+$/; + CronExpression.dayOfWeekValidCharacters = /^[?,*\dL#/-]+$/; + CronExpression.dayOfMonthValidCharacters = /^[?,*\dL/-]+$/; + CronExpression.validCharacters = { + second: CronExpression.standardValidCharacters, + minute: CronExpression.standardValidCharacters, + hour: CronExpression.standardValidCharacters, + dayOfMonth: CronExpression.dayOfMonthValidCharacters, + month: CronExpression.standardValidCharacters, + dayOfWeek: CronExpression.dayOfWeekValidCharacters + }; + CronExpression._isValidConstraintChar = /* @__PURE__ */ __name(function _isValidConstraintChar(constraints, value) { + if (typeof value !== "string") { + return false; + } + return constraints.chars.some(function(char) { + return value.indexOf(char) > -1; + }); + }, "_isValidConstraintChar"); + CronExpression._parseField = /* @__PURE__ */ __name(function _parseField(field, value, constraints) { + switch (field) { + case "month": + case "dayOfWeek": + var aliases = CronExpression.aliases[field]; + value = value.replace(/[a-z]{3}/gi, function(match2) { + match2 = match2.toLowerCase(); + if (typeof aliases[match2] !== "undefined") { + return aliases[match2]; + } else { + throw new Error('Validation error, cannot resolve alias "' + match2 + '"'); + } + }); + break; + } + if (!CronExpression.validCharacters[field].test(value)) { + throw new Error("Invalid characters, got value: " + value); + } + if (value.indexOf("*") !== -1) { + value = value.replace(/\*/g, constraints.min + "-" + constraints.max); + } else if (value.indexOf("?") !== -1) { + value = value.replace(/\?/g, constraints.min + "-" + constraints.max); + } + function parseSequence(val) { + var stack = []; + function handleResult(result) { + if (result instanceof Array) { + for (var i2 = 0, c2 = result.length; i2 < c2; i2++) { + var value2 = result[i2]; + if (CronExpression._isValidConstraintChar(constraints, value2)) { + stack.push(value2); + continue; + } + if (typeof value2 !== "number" || Number.isNaN(value2) || value2 < constraints.min || value2 > constraints.max) { + throw new Error( + "Constraint error, got value " + value2 + " expected range " + constraints.min + "-" + constraints.max + ); + } + stack.push(value2); + } + } else { + if (CronExpression._isValidConstraintChar(constraints, result)) { + stack.push(result); + return; + } + var numResult = +result; + if (Number.isNaN(numResult) || numResult < constraints.min || numResult > constraints.max) { + throw new Error( + "Constraint error, got value " + result + " expected range " + constraints.min + "-" + constraints.max + ); + } + if (field === "dayOfWeek") { + numResult = numResult % 7; + } + stack.push(numResult); + } + } + __name(handleResult, "handleResult"); + var atoms = val.split(","); + if (!atoms.every(function(atom) { + return atom.length > 0; + })) { + throw new Error("Invalid list value format"); + } + if (atoms.length > 1) { + for (var i = 0, c = atoms.length; i < c; i++) { + handleResult(parseRepeat(atoms[i])); + } + } else { + handleResult(parseRepeat(val)); + } + stack.sort(CronExpression._sortCompareFn); + return stack; + } + __name(parseSequence, "parseSequence"); + function parseRepeat(val) { + var repeatInterval = 1; + var atoms = val.split("/"); + if (atoms.length > 2) { + throw new Error("Invalid repeat: " + val); + } + if (atoms.length > 1) { + if (atoms[0] == +atoms[0]) { + atoms = [atoms[0] + "-" + constraints.max, atoms[1]]; + } + return parseRange(atoms[0], atoms[atoms.length - 1]); + } + return parseRange(val, repeatInterval); + } + __name(parseRepeat, "parseRepeat"); + function parseRange(val, repeatInterval) { + var stack = []; + var atoms = val.split("-"); + if (atoms.length > 1) { + if (atoms.length < 2) { + return +val; + } + if (!atoms[0].length) { + if (!atoms[1].length) { + throw new Error("Invalid range: " + val); + } + return +val; + } + var min = +atoms[0]; + var max2 = +atoms[1]; + if (Number.isNaN(min) || Number.isNaN(max2) || min < constraints.min || max2 > constraints.max) { + throw new Error( + "Constraint error, got range " + min + "-" + max2 + " expected range " + constraints.min + "-" + constraints.max + ); + } else if (min > max2) { + throw new Error("Invalid range: " + val); + } + var repeatIndex = +repeatInterval; + if (Number.isNaN(repeatIndex) || repeatIndex <= 0) { + throw new Error("Constraint error, cannot repeat at every " + repeatIndex + " time."); + } + if (field === "dayOfWeek" && max2 % 7 === 0) { + stack.push(0); + } + for (var index = min, count4 = max2; index <= count4; index++) { + var exists3 = stack.indexOf(index) !== -1; + if (!exists3 && repeatIndex > 0 && repeatIndex % repeatInterval === 0) { + repeatIndex = 1; + stack.push(index); + } else { + repeatIndex++; + } + } + return stack; + } + return Number.isNaN(+val) ? val : +val; + } + __name(parseRange, "parseRange"); + return parseSequence(value); + }, "_parseField"); + CronExpression._sortCompareFn = function(a, b) { + var aIsNumber = typeof a === "number"; + var bIsNumber = typeof b === "number"; + if (aIsNumber && bIsNumber) { + return a - b; + } + if (!aIsNumber && bIsNumber) { + return 1; + } + if (aIsNumber && !bIsNumber) { + return -1; + } + return a.localeCompare(b); + }; + CronExpression._handleMaxDaysInMonth = function(mappedFields) { + if (mappedFields.month.length === 1) { + var daysInMonth = CronExpression.daysInMonth[mappedFields.month[0] - 1]; + if (mappedFields.dayOfMonth[0] > daysInMonth) { + throw new Error("Invalid explicit day of month definition"); + } + return mappedFields.dayOfMonth.filter(function(dayOfMonth) { + return dayOfMonth === "L" ? true : dayOfMonth <= daysInMonth; + }).sort(CronExpression._sortCompareFn); + } + }; + CronExpression._freezeFields = function(fields) { + for (var i = 0, c = CronExpression.map.length; i < c; ++i) { + var field = CronExpression.map[i]; + var value = fields[field]; + fields[field] = Object.freeze(value); + } + return Object.freeze(fields); + }; + CronExpression.prototype._applyTimezoneShift = function(currentDate, dateMathVerb, method) { + if (method === "Month" || method === "Day") { + var prevTime = currentDate.getTime(); + currentDate[dateMathVerb + method](); + var currTime = currentDate.getTime(); + if (prevTime === currTime) { + if (currentDate.getMinutes() === 0 && currentDate.getSeconds() === 0) { + currentDate.addHour(); + } else if (currentDate.getMinutes() === 59 && currentDate.getSeconds() === 59) { + currentDate.subtractHour(); + } + } + } else { + var previousHour = currentDate.getHours(); + currentDate[dateMathVerb + method](); + var currentHour = currentDate.getHours(); + var diff = currentHour - previousHour; + if (diff === 2) { + if (this.fields.hour.length !== 24) { + this._dstStart = currentHour; + } + } else if (diff === 0 && currentDate.getMinutes() === 0 && currentDate.getSeconds() === 0) { + if (this.fields.hour.length !== 24) { + this._dstEnd = currentHour; + } + } + } + }; + CronExpression.prototype._findSchedule = /* @__PURE__ */ __name(function _findSchedule(reverse) { + function matchSchedule(value, sequence) { + for (var i = 0, c = sequence.length; i < c; i++) { + if (sequence[i] >= value) { + return sequence[i] === value; + } + } + return sequence[0] === value; + } + __name(matchSchedule, "matchSchedule"); + function isNthDayMatch(date5, nthDayOfWeek) { + if (nthDayOfWeek < 6) { + if (date5.getDate() < 8 && nthDayOfWeek === 1) { + return true; + } + var offset = date5.getDate() % 7 ? 1 : 0; + var adjustedDate = date5.getDate() - date5.getDate() % 7; + var occurrence = Math.floor(adjustedDate / 7) + offset; + return occurrence === nthDayOfWeek; + } + return false; + } + __name(isNthDayMatch, "isNthDayMatch"); + function isLInExpressions(expressions) { + return expressions.length > 0 && expressions.some(function(expression) { + return typeof expression === "string" && expression.indexOf("L") >= 0; + }); + } + __name(isLInExpressions, "isLInExpressions"); + reverse = reverse || false; + var dateMathVerb = reverse ? "subtract" : "add"; + var currentDate = new CronDate(this._currentDate, this._tz); + var startDate = this._startDate; + var endDate = this._endDate; + var startTimestamp = currentDate.getTime(); + var stepCount = 0; + function isLastWeekdayOfMonthMatch(expressions) { + return expressions.some(function(expression) { + if (!isLInExpressions([expression])) { + return false; + } + var weekday = Number.parseInt(expression[0]) % 7; + if (Number.isNaN(weekday)) { + throw new Error("Invalid last weekday of the month expression: " + expression); + } + return currentDate.getDay() === weekday && currentDate.isLastWeekdayOfMonth(); + }); + } + __name(isLastWeekdayOfMonthMatch, "isLastWeekdayOfMonthMatch"); + while (stepCount < LOOP_LIMIT) { + stepCount++; + if (reverse) { + if (startDate && currentDate.getTime() - startDate.getTime() < 0) { + throw new Error("Out of the timespan range"); + } + } else { + if (endDate && endDate.getTime() - currentDate.getTime() < 0) { + throw new Error("Out of the timespan range"); + } + } + var dayOfMonthMatch = matchSchedule(currentDate.getDate(), this.fields.dayOfMonth); + if (isLInExpressions(this.fields.dayOfMonth)) { + dayOfMonthMatch = dayOfMonthMatch || currentDate.isLastDayOfMonth(); + } + var dayOfWeekMatch = matchSchedule(currentDate.getDay(), this.fields.dayOfWeek); + if (isLInExpressions(this.fields.dayOfWeek)) { + dayOfWeekMatch = dayOfWeekMatch || isLastWeekdayOfMonthMatch(this.fields.dayOfWeek); + } + var isDayOfMonthWildcardMatch = this.fields.dayOfMonth.length >= CronExpression.daysInMonth[currentDate.getMonth()]; + var isDayOfWeekWildcardMatch = this.fields.dayOfWeek.length === CronExpression.constraints[5].max - CronExpression.constraints[5].min + 1; + var currentHour = currentDate.getHours(); + if (!dayOfMonthMatch && (!dayOfWeekMatch || isDayOfWeekWildcardMatch)) { + this._applyTimezoneShift(currentDate, dateMathVerb, "Day"); + continue; + } + if (!isDayOfMonthWildcardMatch && isDayOfWeekWildcardMatch && !dayOfMonthMatch) { + this._applyTimezoneShift(currentDate, dateMathVerb, "Day"); + continue; + } + if (isDayOfMonthWildcardMatch && !isDayOfWeekWildcardMatch && !dayOfWeekMatch) { + this._applyTimezoneShift(currentDate, dateMathVerb, "Day"); + continue; + } + if (this._nthDayOfWeek > 0 && !isNthDayMatch(currentDate, this._nthDayOfWeek)) { + this._applyTimezoneShift(currentDate, dateMathVerb, "Day"); + continue; + } + if (!matchSchedule(currentDate.getMonth() + 1, this.fields.month)) { + this._applyTimezoneShift(currentDate, dateMathVerb, "Month"); + continue; + } + if (!matchSchedule(currentHour, this.fields.hour)) { + if (this._dstStart !== currentHour) { + this._dstStart = null; + this._applyTimezoneShift(currentDate, dateMathVerb, "Hour"); + continue; + } else if (!matchSchedule(currentHour - 1, this.fields.hour)) { + currentDate[dateMathVerb + "Hour"](); + continue; + } + } else if (this._dstEnd === currentHour) { + if (!reverse) { + this._dstEnd = null; + this._applyTimezoneShift(currentDate, "add", "Hour"); + continue; + } + } + if (!matchSchedule(currentDate.getMinutes(), this.fields.minute)) { + this._applyTimezoneShift(currentDate, dateMathVerb, "Minute"); + continue; + } + if (!matchSchedule(currentDate.getSeconds(), this.fields.second)) { + this._applyTimezoneShift(currentDate, dateMathVerb, "Second"); + continue; + } + if (startTimestamp === currentDate.getTime()) { + if (dateMathVerb === "add" || currentDate.getMilliseconds() === 0) { + this._applyTimezoneShift(currentDate, dateMathVerb, "Second"); + } else { + currentDate.setMilliseconds(0); + } + continue; + } + break; + } + if (stepCount >= LOOP_LIMIT) { + throw new Error("Invalid expression, loop limit exceeded"); + } + this._currentDate = new CronDate(currentDate, this._tz); + this._hasIterated = true; + return currentDate; + }, "_findSchedule"); + CronExpression.prototype.next = /* @__PURE__ */ __name(function next() { + var schedule = this._findSchedule(); + if (this._isIterator) { + return { + value: schedule, + done: !this.hasNext() + }; + } + return schedule; + }, "next"); + CronExpression.prototype.prev = /* @__PURE__ */ __name(function prev() { + var schedule = this._findSchedule(true); + if (this._isIterator) { + return { + value: schedule, + done: !this.hasPrev() + }; + } + return schedule; + }, "prev"); + CronExpression.prototype.hasNext = function() { + var current = this._currentDate; + var hasIterated = this._hasIterated; + try { + this._findSchedule(); + return true; + } catch (err) { + return false; + } finally { + this._currentDate = current; + this._hasIterated = hasIterated; + } + }; + CronExpression.prototype.hasPrev = function() { + var current = this._currentDate; + var hasIterated = this._hasIterated; + try { + this._findSchedule(true); + return true; + } catch (err) { + return false; + } finally { + this._currentDate = current; + this._hasIterated = hasIterated; + } + }; + CronExpression.prototype.iterate = /* @__PURE__ */ __name(function iterate(steps, callback) { + var dates = []; + if (steps >= 0) { + for (var i = 0, c = steps; i < c; i++) { + try { + var item = this.next(); + dates.push(item); + if (callback) { + callback(item, i); + } + } catch (err) { + break; + } + } + } else { + for (var i = 0, c = steps; i > c; i--) { + try { + var item = this.prev(); + dates.push(item); + if (callback) { + callback(item, i); + } + } catch (err) { + break; + } + } + } + return dates; + }, "iterate"); + CronExpression.prototype.reset = /* @__PURE__ */ __name(function reset(newDate) { + this._currentDate = new CronDate(newDate || this._options.currentDate); + }, "reset"); + CronExpression.prototype.stringify = /* @__PURE__ */ __name(function stringify(includeSeconds) { + var resultArr = []; + for (var i = includeSeconds ? 0 : 1, c = CronExpression.map.length; i < c; ++i) { + var field = CronExpression.map[i]; + var value = this.fields[field]; + var constraint = CronExpression.constraints[i]; + if (field === "dayOfMonth" && this.fields.month.length === 1) { + constraint = { min: 1, max: CronExpression.daysInMonth[this.fields.month[0] - 1] }; + } else if (field === "dayOfWeek") { + constraint = { min: 0, max: 6 }; + value = value[value.length - 1] === 7 ? value.slice(0, -1) : value; + } + resultArr.push(stringifyField(value, constraint.min, constraint.max)); + } + return resultArr.join(" "); + }, "stringify"); + CronExpression.parse = /* @__PURE__ */ __name(function parse3(expression, options) { + var self2 = this; + if (typeof options === "function") { + options = {}; + } + function parse4(expression2, options2) { + if (!options2) { + options2 = {}; + } + if (typeof options2.currentDate === "undefined") { + options2.currentDate = new CronDate(void 0, self2._tz); + } + if (CronExpression.predefined[expression2]) { + expression2 = CronExpression.predefined[expression2]; + } + var fields = []; + var atoms = (expression2 + "").trim().split(/\s+/); + if (atoms.length > 6) { + throw new Error("Invalid cron expression"); + } + var start = CronExpression.map.length - atoms.length; + for (var i = 0, c = CronExpression.map.length; i < c; ++i) { + var field = CronExpression.map[i]; + var value = atoms[atoms.length > c ? i : i - start]; + if (i < start || !value) { + fields.push( + CronExpression._parseField( + field, + CronExpression.parseDefaults[i], + CronExpression.constraints[i] + ) + ); + } else { + var val = field === "dayOfWeek" ? parseNthDay(value) : value; + fields.push( + CronExpression._parseField( + field, + val, + CronExpression.constraints[i] + ) + ); + } + } + var mappedFields = {}; + for (var i = 0, c = CronExpression.map.length; i < c; i++) { + var key = CronExpression.map[i]; + mappedFields[key] = fields[i]; + } + var dayOfMonth = CronExpression._handleMaxDaysInMonth(mappedFields); + mappedFields.dayOfMonth = dayOfMonth || mappedFields.dayOfMonth; + return new CronExpression(mappedFields, options2); + function parseNthDay(val2) { + var atoms2 = val2.split("#"); + if (atoms2.length > 1) { + var nthValue = +atoms2[atoms2.length - 1]; + if (/,/.test(val2)) { + throw new Error("Constraint error, invalid dayOfWeek `#` and `,` special characters are incompatible"); + } + if (/\//.test(val2)) { + throw new Error("Constraint error, invalid dayOfWeek `#` and `/` special characters are incompatible"); + } + if (/-/.test(val2)) { + throw new Error("Constraint error, invalid dayOfWeek `#` and `-` special characters are incompatible"); + } + if (atoms2.length > 2 || Number.isNaN(nthValue) || (nthValue < 1 || nthValue > 5)) { + throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)"); + } + options2.nthDayOfWeek = nthValue; + return atoms2[0]; + } + return val2; + } + __name(parseNthDay, "parseNthDay"); + } + __name(parse4, "parse"); + return parse4(expression, options); + }, "parse"); + CronExpression.fieldsToExpression = /* @__PURE__ */ __name(function fieldsToExpression(fields, options) { + function validateConstraints(field2, values2, constraints) { + if (!values2) { + throw new Error("Validation error, Field " + field2 + " is missing"); + } + if (values2.length === 0) { + throw new Error("Validation error, Field " + field2 + " contains no values"); + } + for (var i2 = 0, c2 = values2.length; i2 < c2; i2++) { + var value = values2[i2]; + if (CronExpression._isValidConstraintChar(constraints, value)) { + continue; + } + if (typeof value !== "number" || Number.isNaN(value) || value < constraints.min || value > constraints.max) { + throw new Error( + "Constraint error, got value " + value + " expected range " + constraints.min + "-" + constraints.max + ); + } + } + } + __name(validateConstraints, "validateConstraints"); + var mappedFields = {}; + for (var i = 0, c = CronExpression.map.length; i < c; ++i) { + var field = CronExpression.map[i]; + var values = fields[field]; + validateConstraints( + field, + values, + CronExpression.constraints[i] + ); + var copy = []; + var j = -1; + while (++j < values.length) { + copy[j] = values[j]; + } + values = copy.sort(CronExpression._sortCompareFn).filter(function(item, pos, ary) { + return !pos || item !== ary[pos - 1]; + }); + if (values.length !== copy.length) { + throw new Error("Validation error, Field " + field + " contains duplicate values"); + } + mappedFields[field] = values; + } + var dayOfMonth = CronExpression._handleMaxDaysInMonth(mappedFields); + mappedFields.dayOfMonth = dayOfMonth || mappedFields.dayOfMonth; + return new CronExpression(mappedFields, options || {}); + }, "fieldsToExpression"); + module2.exports = CronExpression; + } +}); + +// ../../node_modules/cron-parser/lib/parser.js +var require_parser2 = __commonJS({ + "../../node_modules/cron-parser/lib/parser.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var CronExpression = require_expression(); + function CronParser() { + } + __name(CronParser, "CronParser"); + CronParser._parseEntry = /* @__PURE__ */ __name(function _parseEntry(entry) { + var atoms = entry.split(" "); + if (atoms.length === 6) { + return { + interval: CronExpression.parse(entry) + }; + } else if (atoms.length > 6) { + return { + interval: CronExpression.parse( + atoms.slice(0, 6).join(" ") + ), + command: atoms.slice(6, atoms.length) + }; + } else { + throw new Error("Invalid entry: " + entry); + } + }, "_parseEntry"); + CronParser.parseExpression = /* @__PURE__ */ __name(function parseExpression3(expression, options) { + return CronExpression.parse(expression, options); + }, "parseExpression"); + CronParser.fieldsToExpression = /* @__PURE__ */ __name(function fieldsToExpression(fields, options) { + return CronExpression.fieldsToExpression(fields, options); + }, "fieldsToExpression"); + CronParser.parseString = /* @__PURE__ */ __name(function parseString(data) { + var blocks = data.split("\n"); + var response = { + variables: {}, + expressions: [], + errors: {} + }; + for (var i = 0, c = blocks.length; i < c; i++) { + var block = blocks[i]; + var matches = null; + var entry = block.trim(); + if (entry.length > 0) { + if (entry.match(/^#/)) { + continue; + } else if (matches = entry.match(/^(.*)=(.*)$/)) { + response.variables[matches[1]] = matches[2]; + } else { + var result = null; + try { + result = CronParser._parseEntry("0 " + entry); + response.expressions.push(result.interval); + } catch (err) { + response.errors[entry] = err; + } + } + } + } + return response; + }, "parseString"); + CronParser.parseFile = /* @__PURE__ */ __name(function parseFile(filePath, callback) { + require_fs().readFile(filePath, function(err, data) { + if (err) { + callback(err); + return; + } + return callback(null, CronParser.parseString(data.toString())); + }); + }, "parseFile"); + module2.exports = CronParser; + } +}); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/npm/node-fetch.mjs +var node_fetch_exports = {}; +__export(node_fetch_exports, { + AbortController: () => AbortController5, + AbortError: () => AbortError, + FetchError: () => FetchError, + Headers: () => Headers2, + Request: () => Request2, + Response: () => Response2, + default: () => node_fetch_default, + fetch: () => fetch2, + isRedirect: () => isRedirect +}); +var fetch2, Headers2, Request2, Response2, AbortController5, FetchError, AbortError, redirectStatus, isRedirect, node_fetch_default; +var init_node_fetch = __esm({ + "../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/npm/node-fetch.mjs"() { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fetch2 = /* @__PURE__ */ __name((...args) => globalThis.fetch(...args), "fetch"); + Headers2 = globalThis.Headers; + Request2 = globalThis.Request; + Response2 = globalThis.Response; + AbortController5 = globalThis.AbortController; + FetchError = Error; + AbortError = Error; + redirectStatus = /* @__PURE__ */ new Set([ + 301, + 302, + 303, + 307, + 308 + ]); + isRedirect = /* @__PURE__ */ __name((code) => redirectStatus.has(code), "isRedirect"); + fetch2.Promise = globalThis.Promise; + fetch2.isRedirect = isRedirect; + node_fetch_default = fetch2; + } +}); + +// required-unenv-alias:node-fetch +var require_node_fetch = __commonJS({ + "required-unenv-alias:node-fetch"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_node_fetch(); + module2.exports = Object.entries(node_fetch_exports).filter(([k]) => k !== "default").reduce( + (cjs, [k, value]) => Object.defineProperty(cjs, k, { value, enumerable: true }), + "default" in node_fetch_exports ? node_fetch_default : {} + ); + } +}); + +// node-built-in-modules:node:assert +import libDefault13 from "node:assert"; +var require_node_assert = __commonJS({ + "node-built-in-modules:node:assert"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module2.exports = libDefault13; + } +}); + +// node-built-in-modules:node:zlib +import libDefault14 from "node:zlib"; +var require_node_zlib = __commonJS({ + "node-built-in-modules:node:zlib"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module2.exports = libDefault14; + } +}); + +// ../../node_modules/promise-limit/index.js +var require_promise_limit = __commonJS({ + "../../node_modules/promise-limit/index.js"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + function limiter(count4) { + var outstanding = 0; + var jobs = []; + function remove() { + outstanding--; + if (outstanding < count4) { + dequeue(); + } + } + __name(remove, "remove"); + function dequeue() { + var job = jobs.shift(); + semaphore.queue = jobs.length; + if (job) { + run2(job.fn).then(job.resolve).catch(job.reject); + } + } + __name(dequeue, "dequeue"); + function queue(fn) { + return new Promise(function(resolve, reject) { + jobs.push({ fn, resolve, reject }); + semaphore.queue = jobs.length; + }); + } + __name(queue, "queue"); + function run2(fn) { + outstanding++; + try { + return Promise.resolve(fn()).then(function(result) { + remove(); + return result; + }, function(error50) { + remove(); + throw error50; + }); + } catch (err) { + remove(); + return Promise.reject(err); + } + } + __name(run2, "run"); + var semaphore = /* @__PURE__ */ __name(function(fn) { + if (outstanding >= count4) { + return queue(fn); + } else { + return run2(fn); + } + }, "semaphore"); + return semaphore; + } + __name(limiter, "limiter"); + function map2(items, mapper) { + var failed = false; + var limit = this; + return Promise.all(items.map(function() { + var args = arguments; + return limit(function() { + if (!failed) { + return mapper.apply(void 0, args).catch(function(e) { + failed = true; + throw e; + }); + } + }); + })); + } + __name(map2, "map"); + function addExtras(fn) { + fn.queue = 0; + fn.map = map2; + return fn; + } + __name(addExtras, "addExtras"); + module2.exports = function(count4) { + if (count4) { + return addExtras(limiter(count4)); + } else { + return addExtras(function(fn) { + return fn(); + }); + } + }; + } +}); + +// ../../node_modules/err-code/index.js +var require_err_code = __commonJS({ + "../../node_modules/err-code/index.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + function assign(obj, props) { + for (const key in props) { + Object.defineProperty(obj, key, { + value: props[key], + enumerable: true, + configurable: true + }); + } + return obj; + } + __name(assign, "assign"); + function createError(err, code, props) { + if (!err || typeof err === "string") { + throw new TypeError("Please pass an Error to err-code"); + } + if (!props) { + props = {}; + } + if (typeof code === "object") { + props = code; + code = void 0; + } + if (code != null) { + props.code = code; + } + try { + return assign(err, props); + } catch (_) { + props.message = err.message; + props.stack = err.stack; + const ErrClass = /* @__PURE__ */ __name(function() { + }, "ErrClass"); + ErrClass.prototype = Object.create(Object.getPrototypeOf(err)); + return assign(new ErrClass(), props); + } + } + __name(createError, "createError"); + module2.exports = createError; + } +}); + +// ../../node_modules/retry/lib/retry_operation.js +var require_retry_operation = __commonJS({ + "../../node_modules/retry/lib/retry_operation.js"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + function RetryOperation(timeouts, options) { + if (typeof options === "boolean") { + options = { forever: options }; + } + this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)); + this._timeouts = timeouts; + this._options = options || {}; + this._maxRetryTime = options && options.maxRetryTime || Infinity; + this._fn = null; + this._errors = []; + this._attempts = 1; + this._operationTimeout = null; + this._operationTimeoutCb = null; + this._timeout = null; + this._operationStart = null; + if (this._options.forever) { + this._cachedTimeouts = this._timeouts.slice(0); + } + } + __name(RetryOperation, "RetryOperation"); + module2.exports = RetryOperation; + RetryOperation.prototype.reset = function() { + this._attempts = 1; + this._timeouts = this._originalTimeouts; + }; + RetryOperation.prototype.stop = function() { + if (this._timeout) { + clearTimeout(this._timeout); + } + this._timeouts = []; + this._cachedTimeouts = null; + }; + RetryOperation.prototype.retry = function(err) { + if (this._timeout) { + clearTimeout(this._timeout); + } + if (!err) { + return false; + } + var currentTime = (/* @__PURE__ */ new Date()).getTime(); + if (err && currentTime - this._operationStart >= this._maxRetryTime) { + this._errors.unshift(new Error("RetryOperation timeout occurred")); + return false; + } + this._errors.push(err); + var timeout = this._timeouts.shift(); + if (timeout === void 0) { + if (this._cachedTimeouts) { + this._errors.splice(this._errors.length - 1, this._errors.length); + this._timeouts = this._cachedTimeouts.slice(0); + timeout = this._timeouts.shift(); + } else { + return false; + } + } + var self2 = this; + var timer = setTimeout(function() { + self2._attempts++; + if (self2._operationTimeoutCb) { + self2._timeout = setTimeout(function() { + self2._operationTimeoutCb(self2._attempts); + }, self2._operationTimeout); + if (self2._options.unref) { + self2._timeout.unref(); + } + } + self2._fn(self2._attempts); + }, timeout); + if (this._options.unref) { + timer.unref(); + } + return true; + }; + RetryOperation.prototype.attempt = function(fn, timeoutOps) { + this._fn = fn; + if (timeoutOps) { + if (timeoutOps.timeout) { + this._operationTimeout = timeoutOps.timeout; + } + if (timeoutOps.cb) { + this._operationTimeoutCb = timeoutOps.cb; + } + } + var self2 = this; + if (this._operationTimeoutCb) { + this._timeout = setTimeout(function() { + self2._operationTimeoutCb(); + }, self2._operationTimeout); + } + this._operationStart = (/* @__PURE__ */ new Date()).getTime(); + this._fn(this._attempts); + }; + RetryOperation.prototype.try = function(fn) { + console.log("Using RetryOperation.try() is deprecated"); + this.attempt(fn); + }; + RetryOperation.prototype.start = function(fn) { + console.log("Using RetryOperation.start() is deprecated"); + this.attempt(fn); + }; + RetryOperation.prototype.start = RetryOperation.prototype.try; + RetryOperation.prototype.errors = function() { + return this._errors; + }; + RetryOperation.prototype.attempts = function() { + return this._attempts; + }; + RetryOperation.prototype.mainError = function() { + if (this._errors.length === 0) { + return null; + } + var counts = {}; + var mainError = null; + var mainErrorCount = 0; + for (var i = 0; i < this._errors.length; i++) { + var error50 = this._errors[i]; + var message2 = error50.message; + var count4 = (counts[message2] || 0) + 1; + counts[message2] = count4; + if (count4 >= mainErrorCount) { + mainError = error50; + mainErrorCount = count4; + } + } + return mainError; + }; + } +}); + +// ../../node_modules/retry/lib/retry.js +var require_retry = __commonJS({ + "../../node_modules/retry/lib/retry.js"(exports) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var RetryOperation = require_retry_operation(); + exports.operation = function(options) { + var timeouts = exports.timeouts(options); + return new RetryOperation(timeouts, { + forever: options && options.forever, + unref: options && options.unref, + maxRetryTime: options && options.maxRetryTime + }); + }; + exports.timeouts = function(options) { + if (options instanceof Array) { + return [].concat(options); + } + var opts = { + retries: 10, + factor: 2, + minTimeout: 1 * 1e3, + maxTimeout: Infinity, + randomize: false + }; + for (var key in options) { + opts[key] = options[key]; + } + if (opts.minTimeout > opts.maxTimeout) { + throw new Error("minTimeout is greater than maxTimeout"); + } + var timeouts = []; + for (var i = 0; i < opts.retries; i++) { + timeouts.push(this.createTimeout(i, opts)); + } + if (options && options.forever && !timeouts.length) { + timeouts.push(this.createTimeout(i, opts)); + } + timeouts.sort(function(a, b) { + return a - b; + }); + return timeouts; + }; + exports.createTimeout = function(attempt, opts) { + var random = opts.randomize ? Math.random() + 1 : 1; + var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt)); + timeout = Math.min(timeout, opts.maxTimeout); + return timeout; + }; + exports.wrap = function(obj, options, methods) { + if (options instanceof Array) { + methods = options; + options = null; + } + if (!methods) { + methods = []; + for (var key in obj) { + if (typeof obj[key] === "function") { + methods.push(key); + } + } + } + for (var i = 0; i < methods.length; i++) { + var method = methods[i]; + var original = obj[method]; + obj[method] = (/* @__PURE__ */ __name(function retryWrapper(original2) { + var op = exports.operation(options); + var args = Array.prototype.slice.call(arguments, 1); + var callback = args.pop(); + args.push(function(err) { + if (op.retry(err)) { + return; + } + if (err) { + arguments[0] = op.mainError(); + } + callback.apply(this, arguments); + }); + op.attempt(function() { + original2.apply(obj, args); + }); + }, "retryWrapper")).bind(obj, original); + obj[method].options = options; + } + }; + } +}); + +// ../../node_modules/retry/index.js +var require_retry2 = __commonJS({ + "../../node_modules/retry/index.js"(exports, module2) { + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module2.exports = require_retry(); + } +}); + +// ../../node_modules/promise-retry/index.js +var require_promise_retry = __commonJS({ + "../../node_modules/promise-retry/index.js"(exports, module2) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var errcode = require_err_code(); + var retry = require_retry2(); + var hasOwn = Object.prototype.hasOwnProperty; + function isRetryError(err) { + return err && err.code === "EPROMISERETRY" && hasOwn.call(err, "retried"); + } + __name(isRetryError, "isRetryError"); + function promiseRetry(fn, options) { + var temp; + var operation; + if (typeof fn === "object" && typeof options === "function") { + temp = options; + options = fn; + fn = temp; + } + operation = retry.operation(options); + return new Promise(function(resolve, reject) { + operation.attempt(function(number4) { + Promise.resolve().then(function() { + return fn(function(err) { + if (isRetryError(err)) { + err = err.retried; + } + throw errcode(new Error("Retrying"), "EPROMISERETRY", { retried: err }); + }, number4); + }).then(resolve, function(err) { + if (isRetryError(err)) { + err = err.retried; + if (operation.retry(err || new Error())) { + return; + } + } + reject(err); + }); + }); + }); + } + __name(promiseRetry, "promiseRetry"); + module2.exports = promiseRetry; + } +}); + +// node_modules/expo-server-sdk/build/ExpoClientValues.js +var require_ExpoClientValues = __commonJS({ + "node_modules/expo-server-sdk/build/ExpoClientValues.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.requestRetryMinTimeout = exports.defaultConcurrentRequestLimit = exports.pushNotificationReceiptChunkLimit = exports.pushNotificationChunkLimit = exports.getReceiptsApiUrl = exports.sendApiUrl = void 0; + var baseUrl = process.env["EXPO_BASE_URL"] || "https://exp.host"; + exports.sendApiUrl = `${baseUrl}/--/api/v2/push/send`; + exports.getReceiptsApiUrl = `${baseUrl}/--/api/v2/push/getReceipts`; + exports.pushNotificationChunkLimit = 100; + exports.pushNotificationReceiptChunkLimit = 300; + exports.defaultConcurrentRequestLimit = 6; + exports.requestRetryMinTimeout = 1e3; + } +}); + +// node_modules/expo-server-sdk/package.json +var require_package = __commonJS({ + "node_modules/expo-server-sdk/package.json"(exports, module2) { + module2.exports = { + name: "expo-server-sdk", + version: "4.0.0", + description: "Server-side library for working with Expo using Node.js", + main: "build/ExpoClient.js", + types: "build/ExpoClient.d.ts", + files: [ + "build" + ], + engines: { + node: ">=20" + }, + scripts: { + build: "yarn prepack", + lint: "eslint", + prepack: "tsc --project tsconfig.build.json", + test: "jest", + tsc: "tsc", + watch: "tsc --watch" + }, + jest: { + coverageDirectory: "/../coverage", + coverageThreshold: { + global: { + branches: 100, + functions: 100, + lines: 100, + statements: 0 + } + }, + preset: "ts-jest", + rootDir: "src", + testEnvironment: "node" + }, + repository: { + type: "git", + url: "git+https://github.com/expo/expo-server-sdk-node.git" + }, + keywords: [ + "expo", + "push-notifications" + ], + author: "support@expo.dev", + license: "MIT", + bugs: { + url: "https://github.com/expo/expo-server-sdk-node/issues" + }, + homepage: "https://github.com/expo/expo-server-sdk-node#readme", + dependencies: { + "node-fetch": "^2.6.0", + "promise-limit": "^2.7.0", + "promise-retry": "^2.0.1" + }, + devDependencies: { + "@tsconfig/node20": "20.1.6", + "@tsconfig/strictest": "2.0.5", + "@types/node": "22.17.2", + "@types/node-fetch": "2.6.12", + "@types/promise-retry": "1.1.6", + eslint: "9.33.0", + "eslint-config-universe": "15.0.3", + jest: "29.7.0", + jiti: "2.4.2", + msw: "2.10.5", + prettier: "3.6.2", + "ts-jest": "29.4.1", + typescript: "5.9.2" + }, + packageManager: "yarn@4.9.2" + }; + } +}); + +// node_modules/expo-server-sdk/build/ExpoClient.js +var require_ExpoClient = __commonJS({ + "node_modules/expo-server-sdk/build/ExpoClient.js"(exports) { + "use strict"; + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc2 = Object.getOwnPropertyDescriptor(m, k); + if (!desc2 || ("get" in desc2 ? !m.__esModule : desc2.writable || desc2.configurable)) { + desc2 = { enumerable: true, get: /* @__PURE__ */ __name(function() { + return m[k]; + }, "get") }; + } + Object.defineProperty(o, k2, desc2); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v2) { + Object.defineProperty(o, "default", { enumerable: true, value: v2 }); + }) : function(o, v2) { + o["default"] = v2; + }); + var __importStar = exports && exports.__importStar || /* @__PURE__ */ (function() { + var ownKeys = /* @__PURE__ */ __name(function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }, "ownKeys"); + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Expo = void 0; + var node_fetch_1 = __importStar(require_node_fetch()); + var node_assert_1 = __importDefault(require_node_assert()); + var node_zlib_1 = require_node_zlib(); + var promise_limit_1 = __importDefault(require_promise_limit()); + var promise_retry_1 = __importDefault(require_promise_retry()); + var ExpoClientValues_1 = require_ExpoClientValues(); + var Expo2 = class _Expo { + static { + __name(this, "Expo"); + } + static pushNotificationChunkSizeLimit = ExpoClientValues_1.pushNotificationChunkLimit; + static pushNotificationReceiptChunkSizeLimit = ExpoClientValues_1.pushNotificationReceiptChunkLimit; + httpAgent; + limitConcurrentRequests; + accessToken; + useFcmV1; + retryMinTimeout; + constructor(options = {}) { + this.httpAgent = options.httpAgent; + this.limitConcurrentRequests = (0, promise_limit_1.default)(options.maxConcurrentRequests ?? ExpoClientValues_1.defaultConcurrentRequestLimit); + this.retryMinTimeout = options.retryMinTimeout ?? ExpoClientValues_1.requestRetryMinTimeout; + this.accessToken = options.accessToken; + this.useFcmV1 = options.useFcmV1; + } + /** + * Returns `true` if the token is an Expo push token + */ + static isExpoPushToken(token) { + return typeof token === "string" && ((token.startsWith("ExponentPushToken[") || token.startsWith("ExpoPushToken[")) && token.endsWith("]") || /^[a-z\d]{8}-[a-z\d]{4}-[a-z\d]{4}-[a-z\d]{4}-[a-z\d]{12}$/i.test(token)); + } + /** + * Sends the given messages to their recipients via push notifications and returns an array of + * push tickets. Each ticket corresponds to the message at its respective index (the nth receipt + * is for the nth message) and contains a receipt ID. Later, after Expo attempts to deliver the + * messages to the underlying push notification services, the receipts with those IDs will be + * available for a period of time (approximately a day). + * + * There is a limit on the number of push notifications you can send at once. Use + * `chunkPushNotifications` to divide an array of push notification messages into appropriately + * sized chunks. + */ + async sendPushNotificationsAsync(messages) { + const url2 = new URL(ExpoClientValues_1.sendApiUrl); + if (this.useFcmV1 === false) { + url2.searchParams.append("useFcmV1", String(this.useFcmV1)); + } + const actualMessagesCount = _Expo._getActualMessageCount(messages); + const data = await this.limitConcurrentRequests(async () => { + return await (0, promise_retry_1.default)(async (retry) => { + try { + return await this.requestAsync(url2.toString(), { + httpMethod: "post", + body: messages, + shouldCompress(body) { + return body.length > 1024; + } + }); + } catch (e) { + if (e.statusCode === 429) { + return retry(e); + } + throw e; + } + }, { + retries: 2, + factor: 2, + minTimeout: this.retryMinTimeout + }); + }); + if (!Array.isArray(data) || data.length !== actualMessagesCount) { + const apiError = new Error(`Expected Expo to respond with ${actualMessagesCount} ${actualMessagesCount === 1 ? "ticket" : "tickets"} but got ${data.length}`); + apiError["data"] = data; + throw apiError; + } + return data; + } + async getPushNotificationReceiptsAsync(receiptIds) { + const data = await this.requestAsync(ExpoClientValues_1.getReceiptsApiUrl, { + httpMethod: "post", + body: { ids: receiptIds }, + shouldCompress(body) { + return body.length > 1024; + } + }); + if (!data || typeof data !== "object" || Array.isArray(data)) { + const apiError = new Error(`Expected Expo to respond with a map from receipt IDs to receipts but received data of another type`); + apiError["data"] = data; + throw apiError; + } + return data; + } + chunkPushNotifications(messages) { + const chunks = []; + let chunk = []; + let chunkMessagesCount = 0; + for (const message2 of messages) { + if (Array.isArray(message2.to)) { + let partialTo = []; + for (const recipient of message2.to) { + partialTo.push(recipient); + chunkMessagesCount++; + if (chunkMessagesCount >= ExpoClientValues_1.pushNotificationChunkLimit) { + chunk.push({ ...message2, to: partialTo }); + chunks.push(chunk); + chunk = []; + chunkMessagesCount = 0; + partialTo = []; + } + } + if (partialTo.length) { + chunk.push({ ...message2, to: partialTo }); + } + } else { + chunk.push(message2); + chunkMessagesCount++; + } + if (chunkMessagesCount >= ExpoClientValues_1.pushNotificationChunkLimit) { + chunks.push(chunk); + chunk = []; + chunkMessagesCount = 0; + } + } + if (chunkMessagesCount) { + chunks.push(chunk); + } + return chunks; + } + chunkPushNotificationReceiptIds(receiptIds) { + return this.chunkItems(receiptIds, ExpoClientValues_1.pushNotificationReceiptChunkLimit); + } + chunkItems(items, chunkSize) { + const chunks = []; + let chunk = []; + for (const item of items) { + chunk.push(item); + if (chunk.length >= chunkSize) { + chunks.push(chunk); + chunk = []; + } + } + if (chunk.length) { + chunks.push(chunk); + } + return chunks; + } + async requestAsync(url2, options) { + let requestBody; + const sdkVersion = require_package().version; + const requestHeaders = new node_fetch_1.Headers({ + Accept: "application/json", + "Accept-Encoding": "gzip, deflate", + "User-Agent": `expo-server-sdk-node/${sdkVersion}` + }); + if (this.accessToken) { + requestHeaders.set("Authorization", `Bearer ${this.accessToken}`); + } + if (options.body != null) { + const json2 = JSON.stringify(options.body); + (0, node_assert_1.default)(json2 != null, `JSON request body must not be null`); + if (options.shouldCompress(json2)) { + requestBody = (0, node_zlib_1.gzipSync)(Buffer.from(json2)); + requestHeaders.set("Content-Encoding", "gzip"); + } else { + requestBody = json2; + } + requestHeaders.set("Content-Type", "application/json"); + } + const response = await (0, node_fetch_1.default)(url2, { + method: options.httpMethod, + body: requestBody, + headers: requestHeaders, + agent: this.httpAgent + }); + if (response.status !== 200) { + const apiError = await this.parseErrorResponseAsync(response); + throw apiError; + } + const textBody = await response.text(); + let result; + try { + result = JSON.parse(textBody); + } catch { + const apiError = await this.getTextResponseErrorAsync(response, textBody); + throw apiError; + } + if (result.errors) { + const apiError = this.getErrorFromResult(response, result); + throw apiError; + } + return result.data; + } + async parseErrorResponseAsync(response) { + const textBody = await response.text(); + let result; + try { + result = JSON.parse(textBody); + } catch { + return await this.getTextResponseErrorAsync(response, textBody); + } + if (!result.errors || !Array.isArray(result.errors) || !result.errors.length) { + const apiError = await this.getTextResponseErrorAsync(response, textBody); + apiError["errorData"] = result; + return apiError; + } + return this.getErrorFromResult(response, result); + } + async getTextResponseErrorAsync(response, text2) { + const apiError = new Error(`Expo responded with an error with status code ${response.status}: ` + text2); + apiError["statusCode"] = response.status; + apiError["errorText"] = text2; + return apiError; + } + /** + * Returns an error for the first API error in the result, with an optional `others` field that + * contains any other errors. + */ + getErrorFromResult(response, result) { + const noErrorsMessage = `Expected at least one error from Expo`; + (0, node_assert_1.default)(result.errors, noErrorsMessage); + const [errorData, ...otherErrorData] = result.errors; + node_assert_1.default.ok(errorData, noErrorsMessage); + const error50 = this.getErrorFromResultError(errorData); + if (otherErrorData.length) { + error50["others"] = otherErrorData.map((data) => this.getErrorFromResultError(data)); + } + error50["statusCode"] = response.status; + return error50; + } + /** + * Returns an error for a single API error + */ + getErrorFromResultError(errorData) { + const error50 = new Error(errorData.message); + error50["code"] = errorData.code; + if (errorData.details != null) { + error50["details"] = errorData.details; + } + if (errorData.stack != null) { + error50["serverStack"] = errorData.stack; + } + return error50; + } + static _getActualMessageCount(messages) { + return messages.reduce((total, message2) => { + if (Array.isArray(message2.to)) { + total += message2.to.length; + } else { + total++; + } + return total; + }, 0); + } + }; + exports.Expo = Expo2; + exports.default = Expo2; + } +}); + +// .wrangler/tmp/bundle-rJ86wI/middleware-loader.entry.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// .wrangler/tmp/bundle-rJ86wI/middleware-insertion-facade.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// worker.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/app.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/hono/dist/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/hono/dist/hono.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/hono/dist/hono-base.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/hono/dist/compose.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var compose = /* @__PURE__ */ __name((middleware2, onError, onNotFound) => { + return (context2, next) => { + let index = -1; + return dispatch(0); + async function dispatch(i) { + if (i <= index) { + throw new Error("next() called multiple times"); + } + index = i; + let res; + let isError = false; + let handler; + if (middleware2[i]) { + handler = middleware2[i][0][0]; + context2.req.routeIndex = i; + } else { + handler = i === middleware2.length && next || void 0; + } + if (handler) { + try { + res = await handler(context2, () => dispatch(i + 1)); + } catch (err) { + if (err instanceof Error && onError) { + context2.error = err; + res = await onError(err, context2); + isError = true; + } else { + throw err; + } + } + } else { + if (context2.finalized === false && onNotFound) { + res = await onNotFound(context2); + } + } + if (res && (context2.finalized === false || isError)) { + context2.res = res; + } + return context2; + } + __name(dispatch, "dispatch"); + }; +}, "compose"); + +// ../../node_modules/hono/dist/context.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/hono/dist/request.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/hono/dist/http-exception.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/hono/dist/request/constants.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var GET_MATCH_RESULT = /* @__PURE__ */ Symbol(); + +// ../../node_modules/hono/dist/utils/body.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var parseBody = /* @__PURE__ */ __name(async (request, options = /* @__PURE__ */ Object.create(null)) => { + const { all: all3 = false, dot = false } = options; + const headers = request instanceof HonoRequest ? request.raw.headers : request.headers; + const contentType = headers.get("Content-Type"); + if (contentType?.startsWith("multipart/form-data") || contentType?.startsWith("application/x-www-form-urlencoded")) { + return parseFormData(request, { all: all3, dot }); + } + return {}; +}, "parseBody"); +async function parseFormData(request, options) { + const formData = await request.formData(); + if (formData) { + return convertFormDataToBodyData(formData, options); + } + return {}; +} +__name(parseFormData, "parseFormData"); +function convertFormDataToBodyData(formData, options) { + const form = /* @__PURE__ */ Object.create(null); + formData.forEach((value, key) => { + const shouldParseAllValues = options.all || key.endsWith("[]"); + if (!shouldParseAllValues) { + form[key] = value; + } else { + handleParsingAllValues(form, key, value); + } + }); + if (options.dot) { + Object.entries(form).forEach(([key, value]) => { + const shouldParseDotValues = key.includes("."); + if (shouldParseDotValues) { + handleParsingNestedValues(form, key, value); + delete form[key]; + } + }); + } + return form; +} +__name(convertFormDataToBodyData, "convertFormDataToBodyData"); +var handleParsingAllValues = /* @__PURE__ */ __name((form, key, value) => { + if (form[key] !== void 0) { + if (Array.isArray(form[key])) { + ; + form[key].push(value); + } else { + form[key] = [form[key], value]; + } + } else { + if (!key.endsWith("[]")) { + form[key] = value; + } else { + form[key] = [value]; + } + } +}, "handleParsingAllValues"); +var handleParsingNestedValues = /* @__PURE__ */ __name((form, key, value) => { + if (/(?:^|\.)__proto__\./.test(key)) { + return; + } + let nestedForm = form; + const keys = key.split("."); + keys.forEach((key2, index) => { + if (index === keys.length - 1) { + nestedForm[key2] = value; + } else { + if (!nestedForm[key2] || typeof nestedForm[key2] !== "object" || Array.isArray(nestedForm[key2]) || nestedForm[key2] instanceof File) { + nestedForm[key2] = /* @__PURE__ */ Object.create(null); + } + nestedForm = nestedForm[key2]; + } + }); +}, "handleParsingNestedValues"); + +// ../../node_modules/hono/dist/utils/url.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var splitPath = /* @__PURE__ */ __name((path3) => { + const paths = path3.split("/"); + if (paths[0] === "") { + paths.shift(); + } + return paths; +}, "splitPath"); +var splitRoutingPath = /* @__PURE__ */ __name((routePath2) => { + const { groups, path: path3 } = extractGroupsFromPath(routePath2); + const paths = splitPath(path3); + return replaceGroupMarks(paths, groups); +}, "splitRoutingPath"); +var extractGroupsFromPath = /* @__PURE__ */ __name((path3) => { + const groups = []; + path3 = path3.replace(/\{[^}]+\}/g, (match2, index) => { + const mark = `@${index}`; + groups.push([mark, match2]); + return mark; + }); + return { groups, path: path3 }; +}, "extractGroupsFromPath"); +var replaceGroupMarks = /* @__PURE__ */ __name((paths, groups) => { + for (let i = groups.length - 1; i >= 0; i--) { + const [mark] = groups[i]; + for (let j = paths.length - 1; j >= 0; j--) { + if (paths[j].includes(mark)) { + paths[j] = paths[j].replace(mark, groups[i][1]); + break; + } + } + } + return paths; +}, "replaceGroupMarks"); +var patternCache = {}; +var getPattern = /* @__PURE__ */ __name((label, next) => { + if (label === "*") { + return "*"; + } + const match2 = label.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/); + if (match2) { + const cacheKey = `${label}#${next}`; + if (!patternCache[cacheKey]) { + if (match2[2]) { + patternCache[cacheKey] = next && next[0] !== ":" && next[0] !== "*" ? [cacheKey, match2[1], new RegExp(`^${match2[2]}(?=/${next})`)] : [label, match2[1], new RegExp(`^${match2[2]}$`)]; + } else { + patternCache[cacheKey] = [label, match2[1], true]; + } + } + return patternCache[cacheKey]; + } + return null; +}, "getPattern"); +var tryDecode = /* @__PURE__ */ __name((str, decoder3) => { + try { + return decoder3(str); + } catch { + return str.replace(/(?:%[0-9A-Fa-f]{2})+/g, (match2) => { + try { + return decoder3(match2); + } catch { + return match2; + } + }); + } +}, "tryDecode"); +var tryDecodeURI = /* @__PURE__ */ __name((str) => tryDecode(str, decodeURI), "tryDecodeURI"); +var getPath = /* @__PURE__ */ __name((request) => { + const url2 = request.url; + const start = url2.indexOf("/", url2.indexOf(":") + 4); + let i = start; + for (; i < url2.length; i++) { + const charCode = url2.charCodeAt(i); + if (charCode === 37) { + const queryIndex = url2.indexOf("?", i); + const hashIndex = url2.indexOf("#", i); + const end = queryIndex === -1 ? hashIndex === -1 ? void 0 : hashIndex : hashIndex === -1 ? queryIndex : Math.min(queryIndex, hashIndex); + const path3 = url2.slice(start, end); + return tryDecodeURI(path3.includes("%25") ? path3.replace(/%25/g, "%2525") : path3); + } else if (charCode === 63 || charCode === 35) { + break; + } + } + return url2.slice(start, i); +}, "getPath"); +var getPathNoStrict = /* @__PURE__ */ __name((request) => { + const result = getPath(request); + return result.length > 1 && result.at(-1) === "/" ? result.slice(0, -1) : result; +}, "getPathNoStrict"); +var mergePath = /* @__PURE__ */ __name((base, sub, ...rest) => { + if (rest.length) { + sub = mergePath(sub, ...rest); + } + return `${base?.[0] === "/" ? "" : "/"}${base}${sub === "/" ? "" : `${base?.at(-1) === "/" ? "" : "/"}${sub?.[0] === "/" ? sub.slice(1) : sub}`}`; +}, "mergePath"); +var checkOptionalParameter = /* @__PURE__ */ __name((path3) => { + if (path3.charCodeAt(path3.length - 1) !== 63 || !path3.includes(":")) { + return null; + } + const segments = path3.split("/"); + const results = []; + let basePath = ""; + segments.forEach((segment) => { + if (segment !== "" && !/\:/.test(segment)) { + basePath += "/" + segment; + } else if (/\:/.test(segment)) { + if (/\?/.test(segment)) { + if (results.length === 0 && basePath === "") { + results.push("/"); + } else { + results.push(basePath); + } + const optionalSegment = segment.replace("?", ""); + basePath += "/" + optionalSegment; + results.push(basePath); + } else { + basePath += "/" + segment; + } + } + }); + return results.filter((v2, i, a) => a.indexOf(v2) === i); +}, "checkOptionalParameter"); +var _decodeURI = /* @__PURE__ */ __name((value) => { + if (!/[%+]/.test(value)) { + return value; + } + if (value.indexOf("+") !== -1) { + value = value.replace(/\+/g, " "); + } + return value.indexOf("%") !== -1 ? tryDecode(value, decodeURIComponent_) : value; +}, "_decodeURI"); +var _getQueryParam = /* @__PURE__ */ __name((url2, key, multiple) => { + let encoded; + if (!multiple && key && !/[%+]/.test(key)) { + let keyIndex2 = url2.indexOf("?", 8); + if (keyIndex2 === -1) { + return void 0; + } + if (!url2.startsWith(key, keyIndex2 + 1)) { + keyIndex2 = url2.indexOf(`&${key}`, keyIndex2 + 1); + } + while (keyIndex2 !== -1) { + const trailingKeyCode = url2.charCodeAt(keyIndex2 + key.length + 1); + if (trailingKeyCode === 61) { + const valueIndex = keyIndex2 + key.length + 2; + const endIndex = url2.indexOf("&", valueIndex); + return _decodeURI(url2.slice(valueIndex, endIndex === -1 ? void 0 : endIndex)); + } else if (trailingKeyCode == 38 || isNaN(trailingKeyCode)) { + return ""; + } + keyIndex2 = url2.indexOf(`&${key}`, keyIndex2 + 1); + } + encoded = /[%+]/.test(url2); + if (!encoded) { + return void 0; + } + } + const results = {}; + encoded ??= /[%+]/.test(url2); + let keyIndex = url2.indexOf("?", 8); + while (keyIndex !== -1) { + const nextKeyIndex = url2.indexOf("&", keyIndex + 1); + let valueIndex = url2.indexOf("=", keyIndex); + if (valueIndex > nextKeyIndex && nextKeyIndex !== -1) { + valueIndex = -1; + } + let name = url2.slice( + keyIndex + 1, + valueIndex === -1 ? nextKeyIndex === -1 ? void 0 : nextKeyIndex : valueIndex + ); + if (encoded) { + name = _decodeURI(name); + } + keyIndex = nextKeyIndex; + if (name === "") { + continue; + } + let value; + if (valueIndex === -1) { + value = ""; + } else { + value = url2.slice(valueIndex + 1, nextKeyIndex === -1 ? void 0 : nextKeyIndex); + if (encoded) { + value = _decodeURI(value); + } + } + if (multiple) { + if (!(results[name] && Array.isArray(results[name]))) { + results[name] = []; + } + ; + results[name].push(value); + } else { + results[name] ??= value; + } + } + return key ? results[key] : results; +}, "_getQueryParam"); +var getQueryParam = _getQueryParam; +var getQueryParams = /* @__PURE__ */ __name((url2, key) => { + return _getQueryParam(url2, key, true); +}, "getQueryParams"); +var decodeURIComponent_ = decodeURIComponent; + +// ../../node_modules/hono/dist/request.js +var tryDecodeURIComponent = /* @__PURE__ */ __name((str) => tryDecode(str, decodeURIComponent_), "tryDecodeURIComponent"); +var HonoRequest = class { + static { + __name(this, "HonoRequest"); + } + /** + * `.raw` can get the raw Request object. + * + * @see {@link https://hono.dev/docs/api/request#raw} + * + * @example + * ```ts + * // For Cloudflare Workers + * app.post('/', async (c) => { + * const metadata = c.req.raw.cf?.hostMetadata? + * ... + * }) + * ``` + */ + raw; + #validatedData; + // Short name of validatedData + #matchResult; + routeIndex = 0; + /** + * `.path` can get the pathname of the request. + * + * @see {@link https://hono.dev/docs/api/request#path} + * + * @example + * ```ts + * app.get('/about/me', (c) => { + * const pathname = c.req.path // `/about/me` + * }) + * ``` + */ + path; + bodyCache = {}; + constructor(request, path3 = "/", matchResult = [[]]) { + this.raw = request; + this.path = path3; + this.#matchResult = matchResult; + this.#validatedData = {}; + } + param(key) { + return key ? this.#getDecodedParam(key) : this.#getAllDecodedParams(); + } + #getDecodedParam(key) { + const paramKey = this.#matchResult[0][this.routeIndex][1][key]; + const param = this.#getParamValue(paramKey); + return param && /\%/.test(param) ? tryDecodeURIComponent(param) : param; + } + #getAllDecodedParams() { + const decoded = {}; + const keys = Object.keys(this.#matchResult[0][this.routeIndex][1]); + for (const key of keys) { + const value = this.#getParamValue(this.#matchResult[0][this.routeIndex][1][key]); + if (value !== void 0) { + decoded[key] = /\%/.test(value) ? tryDecodeURIComponent(value) : value; + } + } + return decoded; + } + #getParamValue(paramKey) { + return this.#matchResult[1] ? this.#matchResult[1][paramKey] : paramKey; + } + query(key) { + return getQueryParam(this.url, key); + } + queries(key) { + return getQueryParams(this.url, key); + } + header(name) { + if (name) { + return this.raw.headers.get(name) ?? void 0; + } + const headerData = {}; + this.raw.headers.forEach((value, key) => { + headerData[key] = value; + }); + return headerData; + } + async parseBody(options) { + return parseBody(this, options); + } + #cachedBody = /* @__PURE__ */ __name((key) => { + const { bodyCache, raw: raw2 } = this; + const cachedBody = bodyCache[key]; + if (cachedBody) { + return cachedBody; + } + const anyCachedKey = Object.keys(bodyCache)[0]; + if (anyCachedKey) { + return bodyCache[anyCachedKey].then((body) => { + if (anyCachedKey === "json") { + body = JSON.stringify(body); + } + return new Response(body)[key](); + }); + } + return bodyCache[key] = raw2[key](); + }, "#cachedBody"); + /** + * `.json()` can parse Request body of type `application/json` + * + * @see {@link https://hono.dev/docs/api/request#json} + * + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.json() + * }) + * ``` + */ + json() { + return this.#cachedBody("text").then((text2) => JSON.parse(text2)); + } + /** + * `.text()` can parse Request body of type `text/plain` + * + * @see {@link https://hono.dev/docs/api/request#text} + * + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.text() + * }) + * ``` + */ + text() { + return this.#cachedBody("text"); + } + /** + * `.arrayBuffer()` parse Request body as an `ArrayBuffer` + * + * @see {@link https://hono.dev/docs/api/request#arraybuffer} + * + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.arrayBuffer() + * }) + * ``` + */ + arrayBuffer() { + return this.#cachedBody("arrayBuffer"); + } + /** + * Parses the request body as a `Blob`. + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.blob(); + * }); + * ``` + * @see https://hono.dev/docs/api/request#blob + */ + blob() { + return this.#cachedBody("blob"); + } + /** + * Parses the request body as `FormData`. + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.formData(); + * }); + * ``` + * @see https://hono.dev/docs/api/request#formdata + */ + formData() { + return this.#cachedBody("formData"); + } + /** + * Adds validated data to the request. + * + * @param target - The target of the validation. + * @param data - The validated data to add. + */ + addValidatedData(target2, data) { + this.#validatedData[target2] = data; + } + valid(target2) { + return this.#validatedData[target2]; + } + /** + * `.url()` can get the request url strings. + * + * @see {@link https://hono.dev/docs/api/request#url} + * + * @example + * ```ts + * app.get('/about/me', (c) => { + * const url = c.req.url // `http://localhost:8787/about/me` + * ... + * }) + * ``` + */ + get url() { + return this.raw.url; + } + /** + * `.method()` can get the method name of the request. + * + * @see {@link https://hono.dev/docs/api/request#method} + * + * @example + * ```ts + * app.get('/about/me', (c) => { + * const method = c.req.method // `GET` + * }) + * ``` + */ + get method() { + return this.raw.method; + } + get [GET_MATCH_RESULT]() { + return this.#matchResult; + } + /** + * `.matchedRoutes()` can return a matched route in the handler + * + * @deprecated + * + * Use matchedRoutes helper defined in "hono/route" instead. + * + * @see {@link https://hono.dev/docs/api/request#matchedroutes} + * + * @example + * ```ts + * app.use('*', async function logger(c, next) { + * await next() + * c.req.matchedRoutes.forEach(({ handler, method, path }, i) => { + * const name = handler.name || (handler.length < 2 ? '[handler]' : '[middleware]') + * console.log( + * method, + * ' ', + * path, + * ' '.repeat(Math.max(10 - path.length, 0)), + * name, + * i === c.req.routeIndex ? '<- respond from here' : '' + * ) + * }) + * }) + * ``` + */ + get matchedRoutes() { + return this.#matchResult[0].map(([[, route]]) => route); + } + /** + * `routePath()` can retrieve the path registered within the handler + * + * @deprecated + * + * Use routePath helper defined in "hono/route" instead. + * + * @see {@link https://hono.dev/docs/api/request#routepath} + * + * @example + * ```ts + * app.get('/posts/:id', (c) => { + * return c.json({ path: c.req.routePath }) + * }) + * ``` + */ + get routePath() { + return this.#matchResult[0].map(([[, route]]) => route)[this.routeIndex].path; + } +}; + +// ../../node_modules/hono/dist/utils/html.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var HtmlEscapedCallbackPhase = { + Stringify: 1, + BeforeStream: 2, + Stream: 3 +}; +var raw = /* @__PURE__ */ __name((value, callbacks) => { + const escapedString = new String(value); + escapedString.isEscaped = true; + escapedString.callbacks = callbacks; + return escapedString; +}, "raw"); +var resolveCallback = /* @__PURE__ */ __name(async (str, phase, preserveCallbacks, context2, buffer) => { + if (typeof str === "object" && !(str instanceof String)) { + if (!(str instanceof Promise)) { + str = str.toString(); + } + if (str instanceof Promise) { + str = await str; + } + } + const callbacks = str.callbacks; + if (!callbacks?.length) { + return Promise.resolve(str); + } + if (buffer) { + buffer[0] += str; + } else { + buffer = [str]; + } + const resStr = Promise.all(callbacks.map((c) => c({ phase, buffer, context: context2 }))).then( + (res) => Promise.all( + res.filter(Boolean).map((str2) => resolveCallback(str2, phase, false, context2, buffer)) + ).then(() => buffer[0]) + ); + if (preserveCallbacks) { + return raw(await resStr, callbacks); + } else { + return resStr; + } +}, "resolveCallback"); + +// ../../node_modules/hono/dist/context.js +var TEXT_PLAIN = "text/plain; charset=UTF-8"; +var setDefaultContentType = /* @__PURE__ */ __name((contentType, headers) => { + return { + "Content-Type": contentType, + ...headers + }; +}, "setDefaultContentType"); +var createResponseInstance = /* @__PURE__ */ __name((body, init) => new Response(body, init), "createResponseInstance"); +var Context = class { + static { + __name(this, "Context"); + } + #rawRequest; + #req; + /** + * `.env` can get bindings (environment variables, secrets, KV namespaces, D1 database, R2 bucket etc.) in Cloudflare Workers. + * + * @see {@link https://hono.dev/docs/api/context#env} + * + * @example + * ```ts + * // Environment object for Cloudflare Workers + * app.get('*', async c => { + * const counter = c.env.COUNTER + * }) + * ``` + */ + env = {}; + #var; + finalized = false; + /** + * `.error` can get the error object from the middleware if the Handler throws an error. + * + * @see {@link https://hono.dev/docs/api/context#error} + * + * @example + * ```ts + * app.use('*', async (c, next) => { + * await next() + * if (c.error) { + * // do something... + * } + * }) + * ``` + */ + error; + #status; + #executionCtx; + #res; + #layout; + #renderer; + #notFoundHandler; + #preparedHeaders; + #matchResult; + #path; + /** + * Creates an instance of the Context class. + * + * @param req - The Request object. + * @param options - Optional configuration options for the context. + */ + constructor(req, options) { + this.#rawRequest = req; + if (options) { + this.#executionCtx = options.executionCtx; + this.env = options.env; + this.#notFoundHandler = options.notFoundHandler; + this.#path = options.path; + this.#matchResult = options.matchResult; + } + } + /** + * `.req` is the instance of {@link HonoRequest}. + */ + get req() { + this.#req ??= new HonoRequest(this.#rawRequest, this.#path, this.#matchResult); + return this.#req; + } + /** + * @see {@link https://hono.dev/docs/api/context#event} + * The FetchEvent associated with the current request. + * + * @throws Will throw an error if the context does not have a FetchEvent. + */ + get event() { + if (this.#executionCtx && "respondWith" in this.#executionCtx) { + return this.#executionCtx; + } else { + throw Error("This context has no FetchEvent"); + } + } + /** + * @see {@link https://hono.dev/docs/api/context#executionctx} + * The ExecutionContext associated with the current request. + * + * @throws Will throw an error if the context does not have an ExecutionContext. + */ + get executionCtx() { + if (this.#executionCtx) { + return this.#executionCtx; + } else { + throw Error("This context has no ExecutionContext"); + } + } + /** + * @see {@link https://hono.dev/docs/api/context#res} + * The Response object for the current request. + */ + get res() { + return this.#res ||= createResponseInstance(null, { + headers: this.#preparedHeaders ??= new Headers() + }); + } + /** + * Sets the Response object for the current request. + * + * @param _res - The Response object to set. + */ + set res(_res) { + if (this.#res && _res) { + _res = createResponseInstance(_res.body, _res); + for (const [k, v2] of this.#res.headers.entries()) { + if (k === "content-type") { + continue; + } + if (k === "set-cookie") { + const cookies = this.#res.headers.getSetCookie(); + _res.headers.delete("set-cookie"); + for (const cookie of cookies) { + _res.headers.append("set-cookie", cookie); + } + } else { + _res.headers.set(k, v2); + } + } + } + this.#res = _res; + this.finalized = true; + } + /** + * `.render()` can create a response within a layout. + * + * @see {@link https://hono.dev/docs/api/context#render-setrenderer} + * + * @example + * ```ts + * app.get('/', (c) => { + * return c.render('Hello!') + * }) + * ``` + */ + render = /* @__PURE__ */ __name((...args) => { + this.#renderer ??= (content52) => this.html(content52); + return this.#renderer(...args); + }, "render"); + /** + * Sets the layout for the response. + * + * @param layout - The layout to set. + * @returns The layout function. + */ + setLayout = /* @__PURE__ */ __name((layout) => this.#layout = layout, "setLayout"); + /** + * Gets the current layout for the response. + * + * @returns The current layout function. + */ + getLayout = /* @__PURE__ */ __name(() => this.#layout, "getLayout"); + /** + * `.setRenderer()` can set the layout in the custom middleware. + * + * @see {@link https://hono.dev/docs/api/context#render-setrenderer} + * + * @example + * ```tsx + * app.use('*', async (c, next) => { + * c.setRenderer((content) => { + * return c.html( + * + * + *

{content}

+ * + * + * ) + * }) + * await next() + * }) + * ``` + */ + setRenderer = /* @__PURE__ */ __name((renderer) => { + this.#renderer = renderer; + }, "setRenderer"); + /** + * `.header()` can set headers. + * + * @see {@link https://hono.dev/docs/api/context#header} + * + * @example + * ```ts + * app.get('/welcome', (c) => { + * // Set headers + * c.header('X-Message', 'Hello!') + * c.header('Content-Type', 'text/plain') + * + * return c.body('Thank you for coming') + * }) + * ``` + */ + header = /* @__PURE__ */ __name((name, value, options) => { + if (this.finalized) { + this.#res = createResponseInstance(this.#res.body, this.#res); + } + const headers = this.#res ? this.#res.headers : this.#preparedHeaders ??= new Headers(); + if (value === void 0) { + headers.delete(name); + } else if (options?.append) { + headers.append(name, value); + } else { + headers.set(name, value); + } + }, "header"); + status = /* @__PURE__ */ __name((status) => { + this.#status = status; + }, "status"); + /** + * `.set()` can set the value specified by the key. + * + * @see {@link https://hono.dev/docs/api/context#set-get} + * + * @example + * ```ts + * app.use('*', async (c, next) => { + * c.set('message', 'Hono is hot!!') + * await next() + * }) + * ``` + */ + set = /* @__PURE__ */ __name((key, value) => { + this.#var ??= /* @__PURE__ */ new Map(); + this.#var.set(key, value); + }, "set"); + /** + * `.get()` can use the value specified by the key. + * + * @see {@link https://hono.dev/docs/api/context#set-get} + * + * @example + * ```ts + * app.get('/', (c) => { + * const message = c.get('message') + * return c.text(`The message is "${message}"`) + * }) + * ``` + */ + get = /* @__PURE__ */ __name((key) => { + return this.#var ? this.#var.get(key) : void 0; + }, "get"); + /** + * `.var` can access the value of a variable. + * + * @see {@link https://hono.dev/docs/api/context#var} + * + * @example + * ```ts + * const result = c.var.client.oneMethod() + * ``` + */ + // c.var.propName is a read-only + get var() { + if (!this.#var) { + return {}; + } + return Object.fromEntries(this.#var); + } + #newResponse(data, arg, headers) { + const responseHeaders = this.#res ? new Headers(this.#res.headers) : this.#preparedHeaders ?? new Headers(); + if (typeof arg === "object" && "headers" in arg) { + const argHeaders = arg.headers instanceof Headers ? arg.headers : new Headers(arg.headers); + for (const [key, value] of argHeaders) { + if (key.toLowerCase() === "set-cookie") { + responseHeaders.append(key, value); + } else { + responseHeaders.set(key, value); + } + } + } + if (headers) { + for (const [k, v2] of Object.entries(headers)) { + if (typeof v2 === "string") { + responseHeaders.set(k, v2); + } else { + responseHeaders.delete(k); + for (const v22 of v2) { + responseHeaders.append(k, v22); + } + } + } + } + const status = typeof arg === "number" ? arg : arg?.status ?? this.#status; + return createResponseInstance(data, { status, headers: responseHeaders }); + } + newResponse = /* @__PURE__ */ __name((...args) => this.#newResponse(...args), "newResponse"); + /** + * `.body()` can return the HTTP response. + * You can set headers with `.header()` and set HTTP status code with `.status`. + * This can also be set in `.text()`, `.json()` and so on. + * + * @see {@link https://hono.dev/docs/api/context#body} + * + * @example + * ```ts + * app.get('/welcome', (c) => { + * // Set headers + * c.header('X-Message', 'Hello!') + * c.header('Content-Type', 'text/plain') + * // Set HTTP status code + * c.status(201) + * + * // Return the response body + * return c.body('Thank you for coming') + * }) + * ``` + */ + body = /* @__PURE__ */ __name((data, arg, headers) => this.#newResponse(data, arg, headers), "body"); + /** + * `.text()` can render text as `Content-Type:text/plain`. + * + * @see {@link https://hono.dev/docs/api/context#text} + * + * @example + * ```ts + * app.get('/say', (c) => { + * return c.text('Hello!') + * }) + * ``` + */ + text = /* @__PURE__ */ __name((text2, arg, headers) => { + return !this.#preparedHeaders && !this.#status && !arg && !headers && !this.finalized ? new Response(text2) : this.#newResponse( + text2, + arg, + setDefaultContentType(TEXT_PLAIN, headers) + ); + }, "text"); + /** + * `.json()` can render JSON as `Content-Type:application/json`. + * + * @see {@link https://hono.dev/docs/api/context#json} + * + * @example + * ```ts + * app.get('/api', (c) => { + * return c.json({ message: 'Hello!' }) + * }) + * ``` + */ + json = /* @__PURE__ */ __name((object2, arg, headers) => { + return this.#newResponse( + JSON.stringify(object2), + arg, + setDefaultContentType("application/json", headers) + ); + }, "json"); + html = /* @__PURE__ */ __name((html, arg, headers) => { + const res = /* @__PURE__ */ __name((html2) => this.#newResponse(html2, arg, setDefaultContentType("text/html; charset=UTF-8", headers)), "res"); + return typeof html === "object" ? resolveCallback(html, HtmlEscapedCallbackPhase.Stringify, false, {}).then(res) : res(html); + }, "html"); + /** + * `.redirect()` can Redirect, default status code is 302. + * + * @see {@link https://hono.dev/docs/api/context#redirect} + * + * @example + * ```ts + * app.get('/redirect', (c) => { + * return c.redirect('/') + * }) + * app.get('/redirect-permanently', (c) => { + * return c.redirect('/', 301) + * }) + * ``` + */ + redirect = /* @__PURE__ */ __name((location, status) => { + const locationString = String(location); + this.header( + "Location", + // Multibyes should be encoded + // eslint-disable-next-line no-control-regex + !/[^\x00-\xFF]/.test(locationString) ? locationString : encodeURI(locationString) + ); + return this.newResponse(null, status ?? 302); + }, "redirect"); + /** + * `.notFound()` can return the Not Found Response. + * + * @see {@link https://hono.dev/docs/api/context#notfound} + * + * @example + * ```ts + * app.get('/notfound', (c) => { + * return c.notFound() + * }) + * ``` + */ + notFound = /* @__PURE__ */ __name(() => { + this.#notFoundHandler ??= () => createResponseInstance(); + return this.#notFoundHandler(this); + }, "notFound"); +}; + +// ../../node_modules/hono/dist/router.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var METHOD_NAME_ALL = "ALL"; +var METHOD_NAME_ALL_LOWERCASE = "all"; +var METHODS = ["get", "post", "put", "delete", "options", "patch"]; +var MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is already built."; +var UnsupportedPathError = class extends Error { + static { + __name(this, "UnsupportedPathError"); + } +}; + +// ../../node_modules/hono/dist/utils/constants.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var COMPOSED_HANDLER = "__COMPOSED_HANDLER"; + +// ../../node_modules/hono/dist/hono-base.js +var notFoundHandler = /* @__PURE__ */ __name((c) => { + return c.text("404 Not Found", 404); +}, "notFoundHandler"); +var errorHandler = /* @__PURE__ */ __name((err, c) => { + if ("getResponse" in err) { + const res = err.getResponse(); + return c.newResponse(res.body, res); + } + console.error(err); + return c.text("Internal Server Error", 500); +}, "errorHandler"); +var Hono = class _Hono { + static { + __name(this, "_Hono"); + } + get; + post; + put; + delete; + options; + patch; + all; + on; + use; + /* + This class is like an abstract class and does not have a router. + To use it, inherit the class and implement router in the constructor. + */ + router; + getPath; + // Cannot use `#` because it requires visibility at JavaScript runtime. + _basePath = "/"; + #path = "/"; + routes = []; + constructor(options = {}) { + const allMethods = [...METHODS, METHOD_NAME_ALL_LOWERCASE]; + allMethods.forEach((method) => { + this[method] = (args1, ...args) => { + if (typeof args1 === "string") { + this.#path = args1; + } else { + this.#addRoute(method, this.#path, args1); + } + args.forEach((handler) => { + this.#addRoute(method, this.#path, handler); + }); + return this; + }; + }); + this.on = (method, path3, ...handlers2) => { + for (const p of [path3].flat()) { + this.#path = p; + for (const m of [method].flat()) { + handlers2.map((handler) => { + this.#addRoute(m.toUpperCase(), this.#path, handler); + }); + } + } + return this; + }; + this.use = (arg1, ...handlers2) => { + if (typeof arg1 === "string") { + this.#path = arg1; + } else { + this.#path = "*"; + handlers2.unshift(arg1); + } + handlers2.forEach((handler) => { + this.#addRoute(METHOD_NAME_ALL, this.#path, handler); + }); + return this; + }; + const { strict, ...optionsWithoutStrict } = options; + Object.assign(this, optionsWithoutStrict); + this.getPath = strict ?? true ? options.getPath ?? getPath : getPathNoStrict; + } + #clone() { + const clone2 = new _Hono({ + router: this.router, + getPath: this.getPath + }); + clone2.errorHandler = this.errorHandler; + clone2.#notFoundHandler = this.#notFoundHandler; + clone2.routes = this.routes; + return clone2; + } + #notFoundHandler = notFoundHandler; + // Cannot use `#` because it requires visibility at JavaScript runtime. + errorHandler = errorHandler; + /** + * `.route()` allows grouping other Hono instance in routes. + * + * @see {@link https://hono.dev/docs/api/routing#grouping} + * + * @param {string} path - base Path + * @param {Hono} app - other Hono instance + * @returns {Hono} routed Hono instance + * + * @example + * ```ts + * const app = new Hono() + * const app2 = new Hono() + * + * app2.get("/user", (c) => c.text("user")) + * app.route("/api", app2) // GET /api/user + * ``` + */ + route(path3, app) { + const subApp = this.basePath(path3); + app.routes.map((r) => { + let handler; + if (app.errorHandler === errorHandler) { + handler = r.handler; + } else { + handler = /* @__PURE__ */ __name(async (c, next) => (await compose([], app.errorHandler)(c, () => r.handler(c, next))).res, "handler"); + handler[COMPOSED_HANDLER] = r.handler; + } + subApp.#addRoute(r.method, r.path, handler); + }); + return this; + } + /** + * `.basePath()` allows base paths to be specified. + * + * @see {@link https://hono.dev/docs/api/routing#base-path} + * + * @param {string} path - base Path + * @returns {Hono} changed Hono instance + * + * @example + * ```ts + * const api = new Hono().basePath('/api') + * ``` + */ + basePath(path3) { + const subApp = this.#clone(); + subApp._basePath = mergePath(this._basePath, path3); + return subApp; + } + /** + * `.onError()` handles an error and returns a customized Response. + * + * @see {@link https://hono.dev/docs/api/hono#error-handling} + * + * @param {ErrorHandler} handler - request Handler for error + * @returns {Hono} changed Hono instance + * + * @example + * ```ts + * app.onError((err, c) => { + * console.error(`${err}`) + * return c.text('Custom Error Message', 500) + * }) + * ``` + */ + onError = /* @__PURE__ */ __name((handler) => { + this.errorHandler = handler; + return this; + }, "onError"); + /** + * `.notFound()` allows you to customize a Not Found Response. + * + * @see {@link https://hono.dev/docs/api/hono#not-found} + * + * @param {NotFoundHandler} handler - request handler for not-found + * @returns {Hono} changed Hono instance + * + * @example + * ```ts + * app.notFound((c) => { + * return c.text('Custom 404 Message', 404) + * }) + * ``` + */ + notFound = /* @__PURE__ */ __name((handler) => { + this.#notFoundHandler = handler; + return this; + }, "notFound"); + /** + * `.mount()` allows you to mount applications built with other frameworks into your Hono application. + * + * @see {@link https://hono.dev/docs/api/hono#mount} + * + * @param {string} path - base Path + * @param {Function} applicationHandler - other Request Handler + * @param {MountOptions} [options] - options of `.mount()` + * @returns {Hono} mounted Hono instance + * + * @example + * ```ts + * import { Router as IttyRouter } from 'itty-router' + * import { Hono } from 'hono' + * // Create itty-router application + * const ittyRouter = IttyRouter() + * // GET /itty-router/hello + * ittyRouter.get('/hello', () => new Response('Hello from itty-router')) + * + * const app = new Hono() + * app.mount('/itty-router', ittyRouter.handle) + * ``` + * + * @example + * ```ts + * const app = new Hono() + * // Send the request to another application without modification. + * app.mount('/app', anotherApp, { + * replaceRequest: (req) => req, + * }) + * ``` + */ + mount(path3, applicationHandler, options) { + let replaceRequest; + let optionHandler; + if (options) { + if (typeof options === "function") { + optionHandler = options; + } else { + optionHandler = options.optionHandler; + if (options.replaceRequest === false) { + replaceRequest = /* @__PURE__ */ __name((request) => request, "replaceRequest"); + } else { + replaceRequest = options.replaceRequest; + } + } + } + const getOptions = optionHandler ? (c) => { + const options2 = optionHandler(c); + return Array.isArray(options2) ? options2 : [options2]; + } : (c) => { + let executionContext = void 0; + try { + executionContext = c.executionCtx; + } catch { + } + return [c.env, executionContext]; + }; + replaceRequest ||= (() => { + const mergedPath = mergePath(this._basePath, path3); + const pathPrefixLength = mergedPath === "/" ? 0 : mergedPath.length; + return (request) => { + const url2 = new URL(request.url); + url2.pathname = url2.pathname.slice(pathPrefixLength) || "/"; + return new Request(url2, request); + }; + })(); + const handler = /* @__PURE__ */ __name(async (c, next) => { + const res = await applicationHandler(replaceRequest(c.req.raw), ...getOptions(c)); + if (res) { + return res; + } + await next(); + }, "handler"); + this.#addRoute(METHOD_NAME_ALL, mergePath(path3, "*"), handler); + return this; + } + #addRoute(method, path3, handler) { + method = method.toUpperCase(); + path3 = mergePath(this._basePath, path3); + const r = { basePath: this._basePath, path: path3, method, handler }; + this.router.add(method, path3, [handler, r]); + this.routes.push(r); + } + #handleError(err, c) { + if (err instanceof Error) { + return this.errorHandler(err, c); + } + throw err; + } + #dispatch(request, executionCtx, env2, method) { + if (method === "HEAD") { + return (async () => new Response(null, await this.#dispatch(request, executionCtx, env2, "GET")))(); + } + const path3 = this.getPath(request, { env: env2 }); + const matchResult = this.router.match(method, path3); + const c = new Context(request, { + path: path3, + matchResult, + env: env2, + executionCtx, + notFoundHandler: this.#notFoundHandler + }); + if (matchResult[0].length === 1) { + let res; + try { + res = matchResult[0][0][0][0](c, async () => { + c.res = await this.#notFoundHandler(c); + }); + } catch (err) { + return this.#handleError(err, c); + } + return res instanceof Promise ? res.then( + (resolved) => resolved || (c.finalized ? c.res : this.#notFoundHandler(c)) + ).catch((err) => this.#handleError(err, c)) : res ?? this.#notFoundHandler(c); + } + const composed = compose(matchResult[0], this.errorHandler, this.#notFoundHandler); + return (async () => { + try { + const context2 = await composed(c); + if (!context2.finalized) { + throw new Error( + "Context is not finalized. Did you forget to return a Response object or `await next()`?" + ); + } + return context2.res; + } catch (err) { + return this.#handleError(err, c); + } + })(); + } + /** + * `.fetch()` will be entry point of your app. + * + * @see {@link https://hono.dev/docs/api/hono#fetch} + * + * @param {Request} request - request Object of request + * @param {Env} Env - env Object + * @param {ExecutionContext} - context of execution + * @returns {Response | Promise} response of request + * + */ + fetch = /* @__PURE__ */ __name((request, ...rest) => { + return this.#dispatch(request, rest[1], rest[0], request.method); + }, "fetch"); + /** + * `.request()` is a useful method for testing. + * You can pass a URL or pathname to send a GET request. + * app will return a Response object. + * ```ts + * test('GET /hello is ok', async () => { + * const res = await app.request('/hello') + * expect(res.status).toBe(200) + * }) + * ``` + * @see https://hono.dev/docs/api/hono#request + */ + request = /* @__PURE__ */ __name((input, requestInit, Env, executionCtx) => { + if (input instanceof Request) { + return this.fetch(requestInit ? new Request(input, requestInit) : input, Env, executionCtx); + } + input = input.toString(); + return this.fetch( + new Request( + /^https?:\/\//.test(input) ? input : `http://localhost${mergePath("/", input)}`, + requestInit + ), + Env, + executionCtx + ); + }, "request"); + /** + * `.fire()` automatically adds a global fetch event listener. + * This can be useful for environments that adhere to the Service Worker API, such as non-ES module Cloudflare Workers. + * @deprecated + * Use `fire` from `hono/service-worker` instead. + * ```ts + * import { Hono } from 'hono' + * import { fire } from 'hono/service-worker' + * + * const app = new Hono() + * // ... + * fire(app) + * ``` + * @see https://hono.dev/docs/api/hono#fire + * @see https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API + * @see https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/ + */ + fire = /* @__PURE__ */ __name(() => { + addEventListener("fetch", (event) => { + event.respondWith(this.#dispatch(event.request, event, void 0, event.request.method)); + }); + }, "fire"); +}; + +// ../../node_modules/hono/dist/router/reg-exp-router/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/hono/dist/router/reg-exp-router/router.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/hono/dist/router/reg-exp-router/matcher.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var emptyParam = []; +function match(method, path3) { + const matchers = this.buildAllMatchers(); + const match2 = /* @__PURE__ */ __name(((method2, path22) => { + const matcher = matchers[method2] || matchers[METHOD_NAME_ALL]; + const staticMatch = matcher[2][path22]; + if (staticMatch) { + return staticMatch; + } + const match3 = path22.match(matcher[0]); + if (!match3) { + return [[], emptyParam]; + } + const index = match3.indexOf("", 1); + return [matcher[1][index], match3]; + }), "match2"); + this.match = match2; + return match2(method, path3); +} +__name(match, "match"); + +// ../../node_modules/hono/dist/router/reg-exp-router/node.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var LABEL_REG_EXP_STR = "[^/]+"; +var ONLY_WILDCARD_REG_EXP_STR = ".*"; +var TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)"; +var PATH_ERROR = /* @__PURE__ */ Symbol(); +var regExpMetaChars = new Set(".\\+*[^]$()"); +function compareKey(a, b) { + if (a.length === 1) { + return b.length === 1 ? a < b ? -1 : 1 : -1; + } + if (b.length === 1) { + return 1; + } + if (a === ONLY_WILDCARD_REG_EXP_STR || a === TAIL_WILDCARD_REG_EXP_STR) { + return 1; + } else if (b === ONLY_WILDCARD_REG_EXP_STR || b === TAIL_WILDCARD_REG_EXP_STR) { + return -1; + } + if (a === LABEL_REG_EXP_STR) { + return 1; + } else if (b === LABEL_REG_EXP_STR) { + return -1; + } + return a.length === b.length ? a < b ? -1 : 1 : b.length - a.length; +} +__name(compareKey, "compareKey"); +var Node = class _Node { + static { + __name(this, "_Node"); + } + #index; + #varIndex; + #children = /* @__PURE__ */ Object.create(null); + insert(tokens, index, paramMap, context2, pathErrorCheckOnly) { + if (tokens.length === 0) { + if (this.#index !== void 0) { + throw PATH_ERROR; + } + if (pathErrorCheckOnly) { + return; + } + this.#index = index; + return; + } + const [token, ...restTokens] = tokens; + const pattern = token === "*" ? restTokens.length === 0 ? ["", "", ONLY_WILDCARD_REG_EXP_STR] : ["", "", LABEL_REG_EXP_STR] : token === "/*" ? ["", "", TAIL_WILDCARD_REG_EXP_STR] : token.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/); + let node; + if (pattern) { + const name = pattern[1]; + let regexpStr = pattern[2] || LABEL_REG_EXP_STR; + if (name && pattern[2]) { + if (regexpStr === ".*") { + throw PATH_ERROR; + } + regexpStr = regexpStr.replace(/^\((?!\?:)(?=[^)]+\)$)/, "(?:"); + if (/\((?!\?:)/.test(regexpStr)) { + throw PATH_ERROR; + } + } + node = this.#children[regexpStr]; + if (!node) { + if (Object.keys(this.#children).some( + (k) => k !== ONLY_WILDCARD_REG_EXP_STR && k !== TAIL_WILDCARD_REG_EXP_STR + )) { + throw PATH_ERROR; + } + if (pathErrorCheckOnly) { + return; + } + node = this.#children[regexpStr] = new _Node(); + if (name !== "") { + node.#varIndex = context2.varIndex++; + } + } + if (!pathErrorCheckOnly && name !== "") { + paramMap.push([name, node.#varIndex]); + } + } else { + node = this.#children[token]; + if (!node) { + if (Object.keys(this.#children).some( + (k) => k.length > 1 && k !== ONLY_WILDCARD_REG_EXP_STR && k !== TAIL_WILDCARD_REG_EXP_STR + )) { + throw PATH_ERROR; + } + if (pathErrorCheckOnly) { + return; + } + node = this.#children[token] = new _Node(); + } + } + node.insert(restTokens, index, paramMap, context2, pathErrorCheckOnly); + } + buildRegExpStr() { + const childKeys = Object.keys(this.#children).sort(compareKey); + const strList = childKeys.map((k) => { + const c = this.#children[k]; + return (typeof c.#varIndex === "number" ? `(${k})@${c.#varIndex}` : regExpMetaChars.has(k) ? `\\${k}` : k) + c.buildRegExpStr(); + }); + if (typeof this.#index === "number") { + strList.unshift(`#${this.#index}`); + } + if (strList.length === 0) { + return ""; + } + if (strList.length === 1) { + return strList[0]; + } + return "(?:" + strList.join("|") + ")"; + } +}; + +// ../../node_modules/hono/dist/router/reg-exp-router/trie.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var Trie = class { + static { + __name(this, "Trie"); + } + #context = { varIndex: 0 }; + #root = new Node(); + insert(path3, index, pathErrorCheckOnly) { + const paramAssoc = []; + const groups = []; + for (let i = 0; ; ) { + let replaced = false; + path3 = path3.replace(/\{[^}]+\}/g, (m) => { + const mark = `@\\${i}`; + groups[i] = [mark, m]; + i++; + replaced = true; + return mark; + }); + if (!replaced) { + break; + } + } + const tokens = path3.match(/(?::[^\/]+)|(?:\/\*$)|./g) || []; + for (let i = groups.length - 1; i >= 0; i--) { + const [mark] = groups[i]; + for (let j = tokens.length - 1; j >= 0; j--) { + if (tokens[j].indexOf(mark) !== -1) { + tokens[j] = tokens[j].replace(mark, groups[i][1]); + break; + } + } + } + this.#root.insert(tokens, index, paramAssoc, this.#context, pathErrorCheckOnly); + return paramAssoc; + } + buildRegExp() { + let regexp = this.#root.buildRegExpStr(); + if (regexp === "") { + return [/^$/, [], []]; + } + let captureIndex = 0; + const indexReplacementMap = []; + const paramReplacementMap = []; + regexp = regexp.replace(/#(\d+)|@(\d+)|\.\*\$/g, (_, handlerIndex, paramIndex) => { + if (handlerIndex !== void 0) { + indexReplacementMap[++captureIndex] = Number(handlerIndex); + return "$()"; + } + if (paramIndex !== void 0) { + paramReplacementMap[Number(paramIndex)] = ++captureIndex; + return ""; + } + return ""; + }); + return [new RegExp(`^${regexp}`), indexReplacementMap, paramReplacementMap]; + } +}; + +// ../../node_modules/hono/dist/router/reg-exp-router/router.js +var nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)]; +var wildcardRegExpCache = /* @__PURE__ */ Object.create(null); +function buildWildcardRegExp(path3) { + return wildcardRegExpCache[path3] ??= new RegExp( + path3 === "*" ? "" : `^${path3.replace( + /\/\*$|([.\\+*[^\]$()])/g, + (_, metaChar) => metaChar ? `\\${metaChar}` : "(?:|/.*)" + )}$` + ); +} +__name(buildWildcardRegExp, "buildWildcardRegExp"); +function clearWildcardRegExpCache() { + wildcardRegExpCache = /* @__PURE__ */ Object.create(null); +} +__name(clearWildcardRegExpCache, "clearWildcardRegExpCache"); +function buildMatcherFromPreprocessedRoutes(routes) { + const trie = new Trie(); + const handlerData = []; + if (routes.length === 0) { + return nullMatcher; + } + const routesWithStaticPathFlag = routes.map( + (route) => [!/\*|\/:/.test(route[0]), ...route] + ).sort( + ([isStaticA, pathA], [isStaticB, pathB]) => isStaticA ? 1 : isStaticB ? -1 : pathA.length - pathB.length + ); + const staticMap = /* @__PURE__ */ Object.create(null); + for (let i = 0, j = -1, len = routesWithStaticPathFlag.length; i < len; i++) { + const [pathErrorCheckOnly, path3, handlers2] = routesWithStaticPathFlag[i]; + if (pathErrorCheckOnly) { + staticMap[path3] = [handlers2.map(([h]) => [h, /* @__PURE__ */ Object.create(null)]), emptyParam]; + } else { + j++; + } + let paramAssoc; + try { + paramAssoc = trie.insert(path3, j, pathErrorCheckOnly); + } catch (e) { + throw e === PATH_ERROR ? new UnsupportedPathError(path3) : e; + } + if (pathErrorCheckOnly) { + continue; + } + handlerData[j] = handlers2.map(([h, paramCount]) => { + const paramIndexMap = /* @__PURE__ */ Object.create(null); + paramCount -= 1; + for (; paramCount >= 0; paramCount--) { + const [key, value] = paramAssoc[paramCount]; + paramIndexMap[key] = value; + } + return [h, paramIndexMap]; + }); + } + const [regexp, indexReplacementMap, paramReplacementMap] = trie.buildRegExp(); + for (let i = 0, len = handlerData.length; i < len; i++) { + for (let j = 0, len2 = handlerData[i].length; j < len2; j++) { + const map2 = handlerData[i][j]?.[1]; + if (!map2) { + continue; + } + const keys = Object.keys(map2); + for (let k = 0, len3 = keys.length; k < len3; k++) { + map2[keys[k]] = paramReplacementMap[map2[keys[k]]]; + } + } + } + const handlerMap = []; + for (const i in indexReplacementMap) { + handlerMap[i] = handlerData[indexReplacementMap[i]]; + } + return [regexp, handlerMap, staticMap]; +} +__name(buildMatcherFromPreprocessedRoutes, "buildMatcherFromPreprocessedRoutes"); +function findMiddleware(middleware2, path3) { + if (!middleware2) { + return void 0; + } + for (const k of Object.keys(middleware2).sort((a, b) => b.length - a.length)) { + if (buildWildcardRegExp(k).test(path3)) { + return [...middleware2[k]]; + } + } + return void 0; +} +__name(findMiddleware, "findMiddleware"); +var RegExpRouter = class { + static { + __name(this, "RegExpRouter"); + } + name = "RegExpRouter"; + #middleware; + #routes; + constructor() { + this.#middleware = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) }; + this.#routes = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) }; + } + add(method, path3, handler) { + const middleware2 = this.#middleware; + const routes = this.#routes; + if (!middleware2 || !routes) { + throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT); + } + if (!middleware2[method]) { + ; + [middleware2, routes].forEach((handlerMap) => { + handlerMap[method] = /* @__PURE__ */ Object.create(null); + Object.keys(handlerMap[METHOD_NAME_ALL]).forEach((p) => { + handlerMap[method][p] = [...handlerMap[METHOD_NAME_ALL][p]]; + }); + }); + } + if (path3 === "/*") { + path3 = "*"; + } + const paramCount = (path3.match(/\/:/g) || []).length; + if (/\*$/.test(path3)) { + const re = buildWildcardRegExp(path3); + if (method === METHOD_NAME_ALL) { + Object.keys(middleware2).forEach((m) => { + middleware2[m][path3] ||= findMiddleware(middleware2[m], path3) || findMiddleware(middleware2[METHOD_NAME_ALL], path3) || []; + }); + } else { + middleware2[method][path3] ||= findMiddleware(middleware2[method], path3) || findMiddleware(middleware2[METHOD_NAME_ALL], path3) || []; + } + Object.keys(middleware2).forEach((m) => { + if (method === METHOD_NAME_ALL || method === m) { + Object.keys(middleware2[m]).forEach((p) => { + re.test(p) && middleware2[m][p].push([handler, paramCount]); + }); + } + }); + Object.keys(routes).forEach((m) => { + if (method === METHOD_NAME_ALL || method === m) { + Object.keys(routes[m]).forEach( + (p) => re.test(p) && routes[m][p].push([handler, paramCount]) + ); + } + }); + return; + } + const paths = checkOptionalParameter(path3) || [path3]; + for (let i = 0, len = paths.length; i < len; i++) { + const path22 = paths[i]; + Object.keys(routes).forEach((m) => { + if (method === METHOD_NAME_ALL || method === m) { + routes[m][path22] ||= [ + ...findMiddleware(middleware2[m], path22) || findMiddleware(middleware2[METHOD_NAME_ALL], path22) || [] + ]; + routes[m][path22].push([handler, paramCount - len + i + 1]); + } + }); + } + } + match = match; + buildAllMatchers() { + const matchers = /* @__PURE__ */ Object.create(null); + Object.keys(this.#routes).concat(Object.keys(this.#middleware)).forEach((method) => { + matchers[method] ||= this.#buildMatcher(method); + }); + this.#middleware = this.#routes = void 0; + clearWildcardRegExpCache(); + return matchers; + } + #buildMatcher(method) { + const routes = []; + let hasOwnRoute = method === METHOD_NAME_ALL; + [this.#middleware, this.#routes].forEach((r) => { + const ownRoute = r[method] ? Object.keys(r[method]).map((path3) => [path3, r[method][path3]]) : []; + if (ownRoute.length !== 0) { + hasOwnRoute ||= true; + routes.push(...ownRoute); + } else if (method !== METHOD_NAME_ALL) { + routes.push( + ...Object.keys(r[METHOD_NAME_ALL]).map((path3) => [path3, r[METHOD_NAME_ALL][path3]]) + ); + } + }); + if (!hasOwnRoute) { + return null; + } else { + return buildMatcherFromPreprocessedRoutes(routes); + } + } +}; + +// ../../node_modules/hono/dist/router/reg-exp-router/prepared-router.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/hono/dist/router/smart-router/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/hono/dist/router/smart-router/router.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var SmartRouter = class { + static { + __name(this, "SmartRouter"); + } + name = "SmartRouter"; + #routers = []; + #routes = []; + constructor(init) { + this.#routers = init.routers; + } + add(method, path3, handler) { + if (!this.#routes) { + throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT); + } + this.#routes.push([method, path3, handler]); + } + match(method, path3) { + if (!this.#routes) { + throw new Error("Fatal error"); + } + const routers = this.#routers; + const routes = this.#routes; + const len = routers.length; + let i = 0; + let res; + for (; i < len; i++) { + const router8 = routers[i]; + try { + for (let i2 = 0, len2 = routes.length; i2 < len2; i2++) { + router8.add(...routes[i2]); + } + res = router8.match(method, path3); + } catch (e) { + if (e instanceof UnsupportedPathError) { + continue; + } + throw e; + } + this.match = router8.match.bind(router8); + this.#routers = [router8]; + this.#routes = void 0; + break; + } + if (i === len) { + throw new Error("Fatal error"); + } + this.name = `SmartRouter + ${this.activeRouter.name}`; + return res; + } + get activeRouter() { + if (this.#routes || this.#routers.length !== 1) { + throw new Error("No active router has been determined yet."); + } + return this.#routers[0]; + } +}; + +// ../../node_modules/hono/dist/router/trie-router/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/hono/dist/router/trie-router/router.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/hono/dist/router/trie-router/node.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var emptyParams = /* @__PURE__ */ Object.create(null); +var hasChildren = /* @__PURE__ */ __name((children) => { + for (const _ in children) { + return true; + } + return false; +}, "hasChildren"); +var Node2 = class _Node2 { + static { + __name(this, "_Node"); + } + #methods; + #children; + #patterns; + #order = 0; + #params = emptyParams; + constructor(method, handler, children) { + this.#children = children || /* @__PURE__ */ Object.create(null); + this.#methods = []; + if (method && handler) { + const m = /* @__PURE__ */ Object.create(null); + m[method] = { handler, possibleKeys: [], score: 0 }; + this.#methods = [m]; + } + this.#patterns = []; + } + insert(method, path3, handler) { + this.#order = ++this.#order; + let curNode = this; + const parts = splitRoutingPath(path3); + const possibleKeys = []; + for (let i = 0, len = parts.length; i < len; i++) { + const p = parts[i]; + const nextP = parts[i + 1]; + const pattern = getPattern(p, nextP); + const key = Array.isArray(pattern) ? pattern[0] : p; + if (key in curNode.#children) { + curNode = curNode.#children[key]; + if (pattern) { + possibleKeys.push(pattern[1]); + } + continue; + } + curNode.#children[key] = new _Node2(); + if (pattern) { + curNode.#patterns.push(pattern); + possibleKeys.push(pattern[1]); + } + curNode = curNode.#children[key]; + } + curNode.#methods.push({ + [method]: { + handler, + possibleKeys: possibleKeys.filter((v2, i, a) => a.indexOf(v2) === i), + score: this.#order + } + }); + return curNode; + } + #pushHandlerSets(handlerSets, node, method, nodeParams, params) { + for (let i = 0, len = node.#methods.length; i < len; i++) { + const m = node.#methods[i]; + const handlerSet = m[method] || m[METHOD_NAME_ALL]; + const processedSet = {}; + if (handlerSet !== void 0) { + handlerSet.params = /* @__PURE__ */ Object.create(null); + handlerSets.push(handlerSet); + if (nodeParams !== emptyParams || params && params !== emptyParams) { + for (let i2 = 0, len2 = handlerSet.possibleKeys.length; i2 < len2; i2++) { + const key = handlerSet.possibleKeys[i2]; + const processed = processedSet[handlerSet.score]; + handlerSet.params[key] = params?.[key] && !processed ? params[key] : nodeParams[key] ?? params?.[key]; + processedSet[handlerSet.score] = true; + } + } + } + } + } + search(method, path3) { + const handlerSets = []; + this.#params = emptyParams; + const curNode = this; + let curNodes = [curNode]; + const parts = splitPath(path3); + const curNodesQueue = []; + const len = parts.length; + let partOffsets = null; + for (let i = 0; i < len; i++) { + const part = parts[i]; + const isLast = i === len - 1; + const tempNodes = []; + for (let j = 0, len2 = curNodes.length; j < len2; j++) { + const node = curNodes[j]; + const nextNode = node.#children[part]; + if (nextNode) { + nextNode.#params = node.#params; + if (isLast) { + if (nextNode.#children["*"]) { + this.#pushHandlerSets(handlerSets, nextNode.#children["*"], method, node.#params); + } + this.#pushHandlerSets(handlerSets, nextNode, method, node.#params); + } else { + tempNodes.push(nextNode); + } + } + for (let k = 0, len3 = node.#patterns.length; k < len3; k++) { + const pattern = node.#patterns[k]; + const params = node.#params === emptyParams ? {} : { ...node.#params }; + if (pattern === "*") { + const astNode = node.#children["*"]; + if (astNode) { + this.#pushHandlerSets(handlerSets, astNode, method, node.#params); + astNode.#params = params; + tempNodes.push(astNode); + } + continue; + } + const [key, name, matcher] = pattern; + if (!part && !(matcher instanceof RegExp)) { + continue; + } + const child = node.#children[key]; + if (matcher instanceof RegExp) { + if (partOffsets === null) { + partOffsets = new Array(len); + let offset = path3[0] === "/" ? 1 : 0; + for (let p = 0; p < len; p++) { + partOffsets[p] = offset; + offset += parts[p].length + 1; + } + } + const restPathString = path3.substring(partOffsets[i]); + const m = matcher.exec(restPathString); + if (m) { + params[name] = m[0]; + this.#pushHandlerSets(handlerSets, child, method, node.#params, params); + if (hasChildren(child.#children)) { + child.#params = params; + const componentCount = m[0].match(/\//)?.length ?? 0; + const targetCurNodes = curNodesQueue[componentCount] ||= []; + targetCurNodes.push(child); + } + continue; + } + } + if (matcher === true || matcher.test(part)) { + params[name] = part; + if (isLast) { + this.#pushHandlerSets(handlerSets, child, method, params, node.#params); + if (child.#children["*"]) { + this.#pushHandlerSets( + handlerSets, + child.#children["*"], + method, + params, + node.#params + ); + } + } else { + child.#params = params; + tempNodes.push(child); + } + } + } + } + const shifted = curNodesQueue.shift(); + curNodes = shifted ? tempNodes.concat(shifted) : tempNodes; + } + if (handlerSets.length > 1) { + handlerSets.sort((a, b) => { + return a.score - b.score; + }); + } + return [handlerSets.map(({ handler, params }) => [handler, params])]; + } +}; + +// ../../node_modules/hono/dist/router/trie-router/router.js +var TrieRouter = class { + static { + __name(this, "TrieRouter"); + } + name = "TrieRouter"; + #node; + constructor() { + this.#node = new Node2(); + } + add(method, path3, handler) { + const results = checkOptionalParameter(path3); + if (results) { + for (let i = 0, len = results.length; i < len; i++) { + this.#node.insert(method, results[i], handler); + } + return; + } + this.#node.insert(method, path3, handler); + } + match(method, path3) { + return this.#node.search(method, path3); + } +}; + +// ../../node_modules/hono/dist/hono.js +var Hono2 = class extends Hono { + static { + __name(this, "Hono"); + } + /** + * Creates an instance of the Hono class. + * + * @param options - Optional configuration options for the Hono instance. + */ + constructor(options = {}) { + super(options); + this.router = options.router ?? new SmartRouter({ + routers: [new RegExpRouter(), new TrieRouter()] + }); + } +}; + +// ../../node_modules/hono/dist/middleware/cors/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var cors = /* @__PURE__ */ __name((options) => { + const defaults2 = { + origin: "*", + allowMethods: ["GET", "HEAD", "PUT", "POST", "DELETE", "PATCH"], + allowHeaders: [], + exposeHeaders: [] + }; + const opts = { + ...defaults2, + ...options + }; + const findAllowOrigin = ((optsOrigin) => { + if (typeof optsOrigin === "string") { + if (optsOrigin === "*") { + if (opts.credentials) { + return (origin2) => origin2 || null; + } + return () => optsOrigin; + } else { + return (origin2) => optsOrigin === origin2 ? origin2 : null; + } + } else if (typeof optsOrigin === "function") { + return optsOrigin; + } else { + return (origin2) => optsOrigin.includes(origin2) ? origin2 : null; + } + })(opts.origin); + const findAllowMethods = ((optsAllowMethods) => { + if (typeof optsAllowMethods === "function") { + return optsAllowMethods; + } else if (Array.isArray(optsAllowMethods)) { + return () => optsAllowMethods; + } else { + return () => []; + } + })(opts.allowMethods); + return /* @__PURE__ */ __name(async function cors2(c, next) { + function set2(key, value) { + c.res.headers.set(key, value); + } + __name(set2, "set"); + const allowOrigin = await findAllowOrigin(c.req.header("origin") || "", c); + if (allowOrigin) { + set2("Access-Control-Allow-Origin", allowOrigin); + } + if (opts.credentials) { + set2("Access-Control-Allow-Credentials", "true"); + } + if (opts.exposeHeaders?.length) { + set2("Access-Control-Expose-Headers", opts.exposeHeaders.join(",")); + } + if (c.req.method === "OPTIONS") { + if (opts.origin !== "*" || opts.credentials) { + set2("Vary", "Origin"); + } + if (opts.maxAge != null) { + set2("Access-Control-Max-Age", opts.maxAge.toString()); + } + const allowMethods = await findAllowMethods(c.req.header("origin") || "", c); + if (allowMethods.length) { + set2("Access-Control-Allow-Methods", allowMethods.join(",")); + } + let headers = opts.allowHeaders; + if (!headers?.length) { + const requestHeaders = c.req.header("Access-Control-Request-Headers"); + if (requestHeaders) { + headers = requestHeaders.split(/\s*,\s*/); + } + } + if (headers?.length) { + set2("Access-Control-Allow-Headers", headers.join(",")); + c.res.headers.append("Vary", "Access-Control-Request-Headers"); + } + c.res.headers.delete("Content-Length"); + c.res.headers.delete("Content-Type"); + return new Response(null, { + headers: c.res.headers, + status: 204, + statusText: "No Content" + }); + } + await next(); + if (opts.origin !== "*" || opts.credentials) { + c.header("Vary", "Origin", { append: true }); + } + }, "cors2"); +}, "cors"); + +// ../../node_modules/hono/dist/middleware/logger/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/hono/dist/utils/color.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function getColorEnabled() { + const { process: process3, Deno } = globalThis; + const isNoColor = typeof Deno?.noColor === "boolean" ? Deno.noColor : process3 !== void 0 ? ( + // eslint-disable-next-line no-unsafe-optional-chaining + "NO_COLOR" in process3?.env + ) : false; + return !isNoColor; +} +__name(getColorEnabled, "getColorEnabled"); +async function getColorEnabledAsync() { + const { navigator: navigator2 } = globalThis; + const cfWorkers = "cloudflare:workers"; + const isNoColor = navigator2 !== void 0 && navigator2.userAgent === "Cloudflare-Workers" ? await (async () => { + try { + return "NO_COLOR" in ((await import(cfWorkers)).env ?? {}); + } catch { + return false; + } + })() : !getColorEnabled(); + return !isNoColor; +} +__name(getColorEnabledAsync, "getColorEnabledAsync"); + +// ../../node_modules/hono/dist/middleware/logger/index.js +var humanize = /* @__PURE__ */ __name((times) => { + const [delimiter, separator] = [",", "."]; + const orderTimes = times.map((v2) => v2.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1" + delimiter)); + return orderTimes.join(separator); +}, "humanize"); +var time3 = /* @__PURE__ */ __name((start) => { + const delta = Date.now() - start; + return humanize([delta < 1e3 ? delta + "ms" : Math.round(delta / 1e3) + "s"]); +}, "time"); +var colorStatus = /* @__PURE__ */ __name(async (status) => { + const colorEnabled = await getColorEnabledAsync(); + if (colorEnabled) { + switch (status / 100 | 0) { + case 5: + return `\x1B[31m${status}\x1B[0m`; + case 4: + return `\x1B[33m${status}\x1B[0m`; + case 3: + return `\x1B[36m${status}\x1B[0m`; + case 2: + return `\x1B[32m${status}\x1B[0m`; + } + } + return `${status}`; +}, "colorStatus"); +async function log3(fn, prefix, method, path3, status = 0, elapsed) { + const out = prefix === "<--" ? `${prefix} ${method} ${path3}` : `${prefix} ${method} ${path3} ${await colorStatus(status)} ${elapsed}`; + fn(out); +} +__name(log3, "log"); +var logger = /* @__PURE__ */ __name((fn = console.log) => { + return /* @__PURE__ */ __name(async function logger22(c, next) { + const { method, url: url2 } = c.req; + const path3 = url2.slice(url2.indexOf("/", 8)); + await log3(fn, "<--", method, path3); + const start = Date.now(); + await next(); + await log3(fn, "-->", method, path3, c.res.status, time3(start)); + }, "logger2"); +}, "logger"); + +// ../../node_modules/@hono/trpc-server/dist/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@trpc/server/dist/adapters/fetch/index.mjs +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@trpc/server/dist/getErrorShape-vC8mUXJD.mjs +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@trpc/server/dist/codes-DagpWZLc.mjs +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function mergeWithoutOverrides(obj1, ...objs) { + const newObj = Object.assign(emptyObject(), obj1); + for (const overrides of objs) for (const key in overrides) { + if (key in newObj && newObj[key] !== overrides[key]) throw new Error(`Duplicate key ${key}`); + newObj[key] = overrides[key]; + } + return newObj; +} +__name(mergeWithoutOverrides, "mergeWithoutOverrides"); +function isObject(value) { + return !!value && !Array.isArray(value) && typeof value === "object"; +} +__name(isObject, "isObject"); +function isFunction(fn) { + return typeof fn === "function"; +} +__name(isFunction, "isFunction"); +function emptyObject() { + return /* @__PURE__ */ Object.create(null); +} +__name(emptyObject, "emptyObject"); +var asyncIteratorsSupported = typeof Symbol === "function" && !!Symbol.asyncIterator; +function isAsyncIterable(value) { + return asyncIteratorsSupported && isObject(value) && Symbol.asyncIterator in value; +} +__name(isAsyncIterable, "isAsyncIterable"); +var run = /* @__PURE__ */ __name((fn) => fn(), "run"); +function identity(it) { + return it; +} +__name(identity, "identity"); +function abortSignalsAnyPonyfill(signals) { + if (typeof AbortSignal.any === "function") return AbortSignal.any(signals); + const ac2 = new AbortController(); + for (const signal of signals) { + if (signal.aborted) { + trigger(); + break; + } + signal.addEventListener("abort", trigger, { once: true }); + } + return ac2.signal; + function trigger() { + ac2.abort(); + for (const signal of signals) signal.removeEventListener("abort", trigger); + } + __name(trigger, "trigger"); +} +__name(abortSignalsAnyPonyfill, "abortSignalsAnyPonyfill"); +var TRPC_ERROR_CODES_BY_KEY = { + PARSE_ERROR: -32700, + BAD_REQUEST: -32600, + INTERNAL_SERVER_ERROR: -32603, + NOT_IMPLEMENTED: -32603, + BAD_GATEWAY: -32603, + SERVICE_UNAVAILABLE: -32603, + GATEWAY_TIMEOUT: -32603, + UNAUTHORIZED: -32001, + PAYMENT_REQUIRED: -32002, + FORBIDDEN: -32003, + NOT_FOUND: -32004, + METHOD_NOT_SUPPORTED: -32005, + TIMEOUT: -32008, + CONFLICT: -32009, + PRECONDITION_FAILED: -32012, + PAYLOAD_TOO_LARGE: -32013, + UNSUPPORTED_MEDIA_TYPE: -32015, + UNPROCESSABLE_CONTENT: -32022, + PRECONDITION_REQUIRED: -32028, + TOO_MANY_REQUESTS: -32029, + CLIENT_CLOSED_REQUEST: -32099 +}; +var TRPC_ERROR_CODES_BY_NUMBER = { + [-32700]: "PARSE_ERROR", + [-32600]: "BAD_REQUEST", + [-32603]: "INTERNAL_SERVER_ERROR", + [-32001]: "UNAUTHORIZED", + [-32002]: "PAYMENT_REQUIRED", + [-32003]: "FORBIDDEN", + [-32004]: "NOT_FOUND", + [-32005]: "METHOD_NOT_SUPPORTED", + [-32008]: "TIMEOUT", + [-32009]: "CONFLICT", + [-32012]: "PRECONDITION_FAILED", + [-32013]: "PAYLOAD_TOO_LARGE", + [-32015]: "UNSUPPORTED_MEDIA_TYPE", + [-32022]: "UNPROCESSABLE_CONTENT", + [-32028]: "PRECONDITION_REQUIRED", + [-32029]: "TOO_MANY_REQUESTS", + [-32099]: "CLIENT_CLOSED_REQUEST" +}; +var retryableRpcCodes = [ + TRPC_ERROR_CODES_BY_KEY.BAD_GATEWAY, + TRPC_ERROR_CODES_BY_KEY.SERVICE_UNAVAILABLE, + TRPC_ERROR_CODES_BY_KEY.GATEWAY_TIMEOUT, + TRPC_ERROR_CODES_BY_KEY.INTERNAL_SERVER_ERROR +]; + +// ../../node_modules/@trpc/server/dist/getErrorShape-vC8mUXJD.mjs +var __create2 = Object.create; +var __defProp2 = Object.defineProperty; +var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; +var __getOwnPropNames2 = Object.getOwnPropertyNames; +var __getProtoOf2 = Object.getPrototypeOf; +var __hasOwnProp2 = Object.prototype.hasOwnProperty; +var __commonJS2 = /* @__PURE__ */ __name((cb, mod) => function() { + return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}, "__commonJS"); +var __copyProps2 = /* @__PURE__ */ __name((to, from, except2, desc2) => { + if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames2(from), i = 0, n = keys.length, key; i < n; i++) { + key = keys[i]; + if (!__hasOwnProp2.call(to, key) && key !== except2) __defProp2(to, key, { + get: ((k) => from[k]).bind(null, key), + enumerable: !(desc2 = __getOwnPropDesc2(from, key)) || desc2.enumerable + }); + } + return to; +}, "__copyProps"); +var __toESM2 = /* @__PURE__ */ __name((mod, isNodeMode, target2) => (target2 = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(isNodeMode || !mod || !mod.__esModule ? __defProp2(target2, "default", { + value: mod, + enumerable: true +}) : target2, mod)), "__toESM"); +var noop = /* @__PURE__ */ __name(() => { +}, "noop"); +var freezeIfAvailable = /* @__PURE__ */ __name((obj) => { + if (Object.freeze) Object.freeze(obj); +}, "freezeIfAvailable"); +function createInnerProxy(callback, path3, memo2) { + var _memo$cacheKey; + const cacheKey = path3.join("."); + (_memo$cacheKey = memo2[cacheKey]) !== null && _memo$cacheKey !== void 0 || (memo2[cacheKey] = new Proxy(noop, { + get(_obj, key) { + if (typeof key !== "string" || key === "then") return void 0; + return createInnerProxy(callback, [...path3, key], memo2); + }, + apply(_1, _2, args) { + const lastOfPath = path3[path3.length - 1]; + let opts = { + args, + path: path3 + }; + if (lastOfPath === "call") opts = { + args: args.length >= 2 ? [args[1]] : [], + path: path3.slice(0, -1) + }; + else if (lastOfPath === "apply") opts = { + args: args.length >= 2 ? args[1] : [], + path: path3.slice(0, -1) + }; + freezeIfAvailable(opts.args); + freezeIfAvailable(opts.path); + return callback(opts); + } + })); + return memo2[cacheKey]; +} +__name(createInnerProxy, "createInnerProxy"); +var createRecursiveProxy = /* @__PURE__ */ __name((callback) => createInnerProxy(callback, [], emptyObject()), "createRecursiveProxy"); +var JSONRPC2_TO_HTTP_CODE = { + PARSE_ERROR: 400, + BAD_REQUEST: 400, + UNAUTHORIZED: 401, + PAYMENT_REQUIRED: 402, + FORBIDDEN: 403, + NOT_FOUND: 404, + METHOD_NOT_SUPPORTED: 405, + TIMEOUT: 408, + CONFLICT: 409, + PRECONDITION_FAILED: 412, + PAYLOAD_TOO_LARGE: 413, + UNSUPPORTED_MEDIA_TYPE: 415, + UNPROCESSABLE_CONTENT: 422, + PRECONDITION_REQUIRED: 428, + TOO_MANY_REQUESTS: 429, + CLIENT_CLOSED_REQUEST: 499, + INTERNAL_SERVER_ERROR: 500, + NOT_IMPLEMENTED: 501, + BAD_GATEWAY: 502, + SERVICE_UNAVAILABLE: 503, + GATEWAY_TIMEOUT: 504 +}; +function getStatusCodeFromKey(code) { + var _JSONRPC2_TO_HTTP_COD; + return (_JSONRPC2_TO_HTTP_COD = JSONRPC2_TO_HTTP_CODE[code]) !== null && _JSONRPC2_TO_HTTP_COD !== void 0 ? _JSONRPC2_TO_HTTP_COD : 500; +} +__name(getStatusCodeFromKey, "getStatusCodeFromKey"); +function getHTTPStatusCode(json2) { + const arr = Array.isArray(json2) ? json2 : [json2]; + const httpStatuses = new Set(arr.map((res) => { + if ("error" in res && isObject(res.error.data)) { + var _res$error$data; + if (typeof ((_res$error$data = res.error.data) === null || _res$error$data === void 0 ? void 0 : _res$error$data["httpStatus"]) === "number") return res.error.data["httpStatus"]; + const code = TRPC_ERROR_CODES_BY_NUMBER[res.error.code]; + return getStatusCodeFromKey(code); + } + return 200; + })); + if (httpStatuses.size !== 1) return 207; + const httpStatus = httpStatuses.values().next().value; + return httpStatus; +} +__name(getHTTPStatusCode, "getHTTPStatusCode"); +function getHTTPStatusCodeFromError(error50) { + return getStatusCodeFromKey(error50.code); +} +__name(getHTTPStatusCodeFromError, "getHTTPStatusCodeFromError"); +var require_typeof = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(exports, module2) { + function _typeof$2(o) { + "@babel/helpers - typeof"; + return module2.exports = _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) { + return typeof o$1; + } : function(o$1) { + return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1; + }, module2.exports.__esModule = true, module2.exports["default"] = module2.exports, _typeof$2(o); + } + __name(_typeof$2, "_typeof$2"); + module2.exports = _typeof$2, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; +} }); +var require_toPrimitive = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(exports, module2) { + var _typeof$1 = require_typeof()["default"]; + function toPrimitive$1(t8, r) { + if ("object" != _typeof$1(t8) || !t8) return t8; + var e = t8[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t8, r || "default"); + if ("object" != _typeof$1(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t8); + } + __name(toPrimitive$1, "toPrimitive$1"); + module2.exports = toPrimitive$1, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; +} }); +var require_toPropertyKey = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(exports, module2) { + var _typeof = require_typeof()["default"]; + var toPrimitive = require_toPrimitive(); + function toPropertyKey$1(t8) { + var i = toPrimitive(t8, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + __name(toPropertyKey$1, "toPropertyKey$1"); + module2.exports = toPropertyKey$1, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; +} }); +var require_defineProperty = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(exports, module2) { + var toPropertyKey = require_toPropertyKey(); + function _defineProperty(e, r, t8) { + return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t8, + enumerable: true, + configurable: true, + writable: true + }) : e[r] = t8, e; + } + __name(_defineProperty, "_defineProperty"); + module2.exports = _defineProperty, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; +} }); +var require_objectSpread2 = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(exports, module2) { + var defineProperty = require_defineProperty(); + function ownKeys(e, r) { + var t8 = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r$1) { + return Object.getOwnPropertyDescriptor(e, r$1).enumerable; + })), t8.push.apply(t8, o); + } + return t8; + } + __name(ownKeys, "ownKeys"); + function _objectSpread2(e) { + for (var r = 1; r < arguments.length; r++) { + var t8 = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t8), true).forEach(function(r$1) { + defineProperty(e, r$1, t8[r$1]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t8)) : ownKeys(Object(t8)).forEach(function(r$1) { + Object.defineProperty(e, r$1, Object.getOwnPropertyDescriptor(t8, r$1)); + }); + } + return e; + } + __name(_objectSpread2, "_objectSpread2"); + module2.exports = _objectSpread2, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; +} }); +var import_objectSpread2 = __toESM2(require_objectSpread2(), 1); +function getErrorShape(opts) { + const { path: path3, error: error50, config: config3 } = opts; + const { code } = opts.error; + const shape = { + message: error50.message, + code: TRPC_ERROR_CODES_BY_KEY[code], + data: { + code, + httpStatus: getHTTPStatusCodeFromError(error50) + } + }; + if (config3.isDev && typeof opts.error.stack === "string") shape.data.stack = opts.error.stack; + if (typeof path3 === "string") shape.data.path = path3; + return config3.errorFormatter((0, import_objectSpread2.default)((0, import_objectSpread2.default)({}, opts), {}, { shape })); +} +__name(getErrorShape, "getErrorShape"); + +// ../../node_modules/@trpc/server/dist/tracked-Bjtgv3wJ.mjs +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var defaultFormatter = /* @__PURE__ */ __name(({ shape }) => { + return shape; +}, "defaultFormatter"); +var import_defineProperty = __toESM2(require_defineProperty(), 1); +var UnknownCauseError = class extends Error { + static { + __name(this, "UnknownCauseError"); + } +}; +function getCauseFromUnknown(cause) { + if (cause instanceof Error) return cause; + const type = typeof cause; + if (type === "undefined" || type === "function" || cause === null) return void 0; + if (type !== "object") return new Error(String(cause)); + if (isObject(cause)) return Object.assign(new UnknownCauseError(), cause); + return void 0; +} +__name(getCauseFromUnknown, "getCauseFromUnknown"); +function getTRPCErrorFromUnknown(cause) { + if (cause instanceof TRPCError) return cause; + if (cause instanceof Error && cause.name === "TRPCError") return cause; + const trpcError = new TRPCError({ + code: "INTERNAL_SERVER_ERROR", + cause + }); + if (cause instanceof Error && cause.stack) trpcError.stack = cause.stack; + return trpcError; +} +__name(getTRPCErrorFromUnknown, "getTRPCErrorFromUnknown"); +var TRPCError = class extends Error { + static { + __name(this, "TRPCError"); + } + constructor(opts) { + var _ref, _opts$message, _this$cause; + const cause = getCauseFromUnknown(opts.cause); + const message2 = (_ref = (_opts$message = opts.message) !== null && _opts$message !== void 0 ? _opts$message : cause === null || cause === void 0 ? void 0 : cause.message) !== null && _ref !== void 0 ? _ref : opts.code; + super(message2, { cause }); + (0, import_defineProperty.default)(this, "cause", void 0); + (0, import_defineProperty.default)(this, "code", void 0); + this.code = opts.code; + this.name = "TRPCError"; + (_this$cause = this.cause) !== null && _this$cause !== void 0 || (this.cause = cause); + } +}; +var import_objectSpread2$1 = __toESM2(require_objectSpread2(), 1); +function getDataTransformer(transformer) { + if ("input" in transformer) return transformer; + return { + input: transformer, + output: transformer + }; +} +__name(getDataTransformer, "getDataTransformer"); +var defaultTransformer = { + input: { + serialize: /* @__PURE__ */ __name((obj) => obj, "serialize"), + deserialize: /* @__PURE__ */ __name((obj) => obj, "deserialize") + }, + output: { + serialize: /* @__PURE__ */ __name((obj) => obj, "serialize"), + deserialize: /* @__PURE__ */ __name((obj) => obj, "deserialize") + } +}; +function transformTRPCResponseItem(config3, item) { + if ("error" in item) return (0, import_objectSpread2$1.default)((0, import_objectSpread2$1.default)({}, item), {}, { error: config3.transformer.output.serialize(item.error) }); + if ("data" in item.result) return (0, import_objectSpread2$1.default)((0, import_objectSpread2$1.default)({}, item), {}, { result: (0, import_objectSpread2$1.default)((0, import_objectSpread2$1.default)({}, item.result), {}, { data: config3.transformer.output.serialize(item.result.data) }) }); + return item; +} +__name(transformTRPCResponseItem, "transformTRPCResponseItem"); +function transformTRPCResponse(config3, itemOrItems) { + return Array.isArray(itemOrItems) ? itemOrItems.map((item) => transformTRPCResponseItem(config3, item)) : transformTRPCResponseItem(config3, itemOrItems); +} +__name(transformTRPCResponse, "transformTRPCResponse"); +var import_objectSpread22 = __toESM2(require_objectSpread2(), 1); +var lazyMarker = "lazyMarker"; +function once2(fn) { + const uncalled = /* @__PURE__ */ Symbol(); + let result = uncalled; + return () => { + if (result === uncalled) result = fn(); + return result; + }; +} +__name(once2, "once"); +function isLazy(input) { + return typeof input === "function" && lazyMarker in input; +} +__name(isLazy, "isLazy"); +function isRouter(value) { + return isObject(value) && isObject(value["_def"]) && "router" in value["_def"]; +} +__name(isRouter, "isRouter"); +var emptyRouter = { + _ctx: null, + _errorShape: null, + _meta: null, + queries: {}, + mutations: {}, + subscriptions: {}, + errorFormatter: defaultFormatter, + transformer: defaultTransformer +}; +var reservedWords = [ + "then", + "call", + "apply" +]; +function createRouterFactory(config3) { + function createRouterInner(input) { + const reservedWordsUsed = new Set(Object.keys(input).filter((v2) => reservedWords.includes(v2))); + if (reservedWordsUsed.size > 0) throw new Error("Reserved words used in `router({})` call: " + Array.from(reservedWordsUsed).join(", ")); + const procedures = emptyObject(); + const lazy$1 = emptyObject(); + function createLazyLoader(opts) { + return { + ref: opts.ref, + load: once2(async () => { + const router$1 = await opts.ref(); + const lazyPath = [...opts.path, opts.key]; + const lazyKey = lazyPath.join("."); + opts.aggregate[opts.key] = step(router$1._def.record, lazyPath); + delete lazy$1[lazyKey]; + for (const [nestedKey, nestedItem] of Object.entries(router$1._def.lazy)) { + const nestedRouterKey = [...lazyPath, nestedKey].join("."); + lazy$1[nestedRouterKey] = createLazyLoader({ + ref: nestedItem.ref, + path: lazyPath, + key: nestedKey, + aggregate: opts.aggregate[opts.key] + }); + } + }) + }; + } + __name(createLazyLoader, "createLazyLoader"); + function step(from, path3 = []) { + const aggregate = emptyObject(); + for (const [key, item] of Object.entries(from !== null && from !== void 0 ? from : {})) { + if (isLazy(item)) { + lazy$1[[...path3, key].join(".")] = createLazyLoader({ + path: path3, + ref: item, + key, + aggregate + }); + continue; + } + if (isRouter(item)) { + aggregate[key] = step(item._def.record, [...path3, key]); + continue; + } + if (!isProcedure(item)) { + aggregate[key] = step(item, [...path3, key]); + continue; + } + const newPath = [...path3, key].join("."); + if (procedures[newPath]) throw new Error(`Duplicate key: ${newPath}`); + procedures[newPath] = item; + aggregate[key] = item; + } + return aggregate; + } + __name(step, "step"); + const record2 = step(input); + const _def = (0, import_objectSpread22.default)((0, import_objectSpread22.default)({ + _config: config3, + router: true, + procedures, + lazy: lazy$1 + }, emptyRouter), {}, { record: record2 }); + const router8 = (0, import_objectSpread22.default)((0, import_objectSpread22.default)({}, record2), {}, { + _def, + createCaller: createCallerFactory()({ _def }) + }); + return router8; + } + __name(createRouterInner, "createRouterInner"); + return createRouterInner; +} +__name(createRouterFactory, "createRouterFactory"); +function isProcedure(procedureOrRouter) { + return typeof procedureOrRouter === "function"; +} +__name(isProcedure, "isProcedure"); +async function getProcedureAtPath(router8, path3) { + const { _def } = router8; + let procedure = _def.procedures[path3]; + while (!procedure) { + const key = Object.keys(_def.lazy).find((key$1) => path3.startsWith(key$1)); + if (!key) return null; + const lazyRouter = _def.lazy[key]; + await lazyRouter.load(); + procedure = _def.procedures[path3]; + } + return procedure; +} +__name(getProcedureAtPath, "getProcedureAtPath"); +function createCallerFactory() { + return /* @__PURE__ */ __name(function createCallerInner(router8) { + const { _def } = router8; + return /* @__PURE__ */ __name(function createCaller(ctxOrCallback, opts) { + return createRecursiveProxy(async (innerOpts) => { + const { path: path3, args } = innerOpts; + const fullPath = path3.join("."); + if (path3.length === 1 && path3[0] === "_def") return _def; + const procedure = await getProcedureAtPath(router8, fullPath); + let ctx = void 0; + try { + if (!procedure) throw new TRPCError({ + code: "NOT_FOUND", + message: `No procedure found on path "${path3}"` + }); + ctx = isFunction(ctxOrCallback) ? await Promise.resolve(ctxOrCallback()) : ctxOrCallback; + return await procedure({ + path: fullPath, + getRawInput: /* @__PURE__ */ __name(async () => args[0], "getRawInput"), + ctx, + type: procedure._def.type, + signal: opts === null || opts === void 0 ? void 0 : opts.signal, + batchIndex: 0 + }); + } catch (cause) { + var _opts$onError, _procedure$_def$type; + opts === null || opts === void 0 || (_opts$onError = opts.onError) === null || _opts$onError === void 0 || _opts$onError.call(opts, { + ctx, + error: getTRPCErrorFromUnknown(cause), + input: args[0], + path: fullPath, + type: (_procedure$_def$type = procedure === null || procedure === void 0 ? void 0 : procedure._def.type) !== null && _procedure$_def$type !== void 0 ? _procedure$_def$type : "unknown" + }); + throw cause; + } + }); + }, "createCaller"); + }, "createCallerInner"); +} +__name(createCallerFactory, "createCallerFactory"); +function mergeRouters(...routerList) { + var _routerList$, _routerList$2; + const record2 = mergeWithoutOverrides({}, ...routerList.map((r) => r._def.record)); + const errorFormatter = routerList.reduce((currentErrorFormatter, nextRouter) => { + if (nextRouter._def._config.errorFormatter && nextRouter._def._config.errorFormatter !== defaultFormatter) { + if (currentErrorFormatter !== defaultFormatter && currentErrorFormatter !== nextRouter._def._config.errorFormatter) throw new Error("You seem to have several error formatters"); + return nextRouter._def._config.errorFormatter; + } + return currentErrorFormatter; + }, defaultFormatter); + const transformer = routerList.reduce((prev, current) => { + if (current._def._config.transformer && current._def._config.transformer !== defaultTransformer) { + if (prev !== defaultTransformer && prev !== current._def._config.transformer) throw new Error("You seem to have several transformers"); + return current._def._config.transformer; + } + return prev; + }, defaultTransformer); + const router8 = createRouterFactory({ + errorFormatter, + transformer, + isDev: routerList.every((r) => r._def._config.isDev), + allowOutsideOfServer: routerList.every((r) => r._def._config.allowOutsideOfServer), + isServer: routerList.every((r) => r._def._config.isServer), + $types: (_routerList$ = routerList[0]) === null || _routerList$ === void 0 ? void 0 : _routerList$._def._config.$types, + sse: (_routerList$2 = routerList[0]) === null || _routerList$2 === void 0 ? void 0 : _routerList$2._def._config.sse + })(record2); + return router8; +} +__name(mergeRouters, "mergeRouters"); +var trackedSymbol = /* @__PURE__ */ Symbol(); +function isTrackedEnvelope(value) { + return Array.isArray(value) && value[2] === trackedSymbol; +} +__name(isTrackedEnvelope, "isTrackedEnvelope"); + +// ../../node_modules/@trpc/server/dist/resolveResponse-CHqBlAgR.mjs +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@trpc/server/dist/observable-UMO3vUa_.mjs +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function isObservable(x) { + return typeof x === "object" && x !== null && "subscribe" in x; +} +__name(isObservable, "isObservable"); +function observableToReadableStream(observable$1, signal) { + let unsub = null; + const onAbort = /* @__PURE__ */ __name(() => { + unsub === null || unsub === void 0 || unsub.unsubscribe(); + unsub = null; + signal.removeEventListener("abort", onAbort); + }, "onAbort"); + return new ReadableStream({ + start(controller) { + unsub = observable$1.subscribe({ + next(data) { + controller.enqueue({ + ok: true, + value: data + }); + }, + error(error50) { + controller.enqueue({ + ok: false, + error: error50 + }); + controller.close(); + }, + complete() { + controller.close(); + } + }); + if (signal.aborted) onAbort(); + else signal.addEventListener("abort", onAbort, { once: true }); + }, + cancel() { + onAbort(); + } + }); +} +__name(observableToReadableStream, "observableToReadableStream"); +function observableToAsyncIterable(observable$1, signal) { + const stream = observableToReadableStream(observable$1, signal); + const reader = stream.getReader(); + const iterator2 = { + async next() { + const value = await reader.read(); + if (value.done) return { + value: void 0, + done: true + }; + const { value: result } = value; + if (!result.ok) throw result.error; + return { + value: result.value, + done: false + }; + }, + async return() { + await reader.cancel(); + return { + value: void 0, + done: true + }; + } + }; + return { [Symbol.asyncIterator]() { + return iterator2; + } }; +} +__name(observableToAsyncIterable, "observableToAsyncIterable"); + +// ../../node_modules/@trpc/server/dist/resolveResponse-CHqBlAgR.mjs +function parseConnectionParamsFromUnknown(parsed) { + try { + if (parsed === null) return null; + if (!isObject(parsed)) throw new Error("Expected object"); + const nonStringValues = Object.entries(parsed).filter(([_key2, value]) => typeof value !== "string"); + if (nonStringValues.length > 0) throw new Error(`Expected connectionParams to be string values. Got ${nonStringValues.map(([key, value]) => `${key}: ${typeof value}`).join(", ")}`); + return parsed; + } catch (cause) { + throw new TRPCError({ + code: "PARSE_ERROR", + message: "Invalid connection params shape", + cause + }); + } +} +__name(parseConnectionParamsFromUnknown, "parseConnectionParamsFromUnknown"); +function parseConnectionParamsFromString(str) { + let parsed; + try { + parsed = JSON.parse(str); + } catch (cause) { + throw new TRPCError({ + code: "PARSE_ERROR", + message: "Not JSON-parsable query params", + cause + }); + } + return parseConnectionParamsFromUnknown(parsed); +} +__name(parseConnectionParamsFromString, "parseConnectionParamsFromString"); +var import_objectSpread2$12 = __toESM2(require_objectSpread2(), 1); +function getAcceptHeader(headers) { + var _ref, _headers$get; + return (_ref = headers.get("trpc-accept")) !== null && _ref !== void 0 ? _ref : ((_headers$get = headers.get("accept")) === null || _headers$get === void 0 ? void 0 : _headers$get.split(",").some((t8) => t8.trim() === "application/jsonl")) ? "application/jsonl" : null; +} +__name(getAcceptHeader, "getAcceptHeader"); +function memo(fn) { + let promise2 = null; + const sym = /* @__PURE__ */ Symbol.for("@trpc/server/http/memo"); + let value = sym; + return { + read: /* @__PURE__ */ __name(async () => { + var _promise2; + if (value !== sym) return value; + (_promise2 = promise2) !== null && _promise2 !== void 0 || (promise2 = fn().catch((cause) => { + if (cause instanceof TRPCError) throw cause; + throw new TRPCError({ + code: "BAD_REQUEST", + message: cause instanceof Error ? cause.message : "Invalid input", + cause + }); + })); + value = await promise2; + promise2 = null; + return value; + }, "read"), + result: /* @__PURE__ */ __name(() => { + return value !== sym ? value : void 0; + }, "result") + }; +} +__name(memo, "memo"); +var jsonContentTypeHandler = { + isMatch(req) { + var _req$headers$get; + return !!((_req$headers$get = req.headers.get("content-type")) === null || _req$headers$get === void 0 ? void 0 : _req$headers$get.startsWith("application/json")); + }, + async parse(opts) { + var _types$values$next$va; + const { req } = opts; + const isBatchCall = opts.searchParams.get("batch") === "1"; + const paths = isBatchCall ? opts.path.split(",") : [opts.path]; + const getInputs = memo(async () => { + let inputs = void 0; + if (req.method === "GET") { + const queryInput = opts.searchParams.get("input"); + if (queryInput) inputs = JSON.parse(queryInput); + } else inputs = await req.json(); + if (inputs === void 0) return emptyObject(); + if (!isBatchCall) { + const result = emptyObject(); + result[0] = opts.router._def._config.transformer.input.deserialize(inputs); + return result; + } + if (!isObject(inputs)) throw new TRPCError({ + code: "BAD_REQUEST", + message: '"input" needs to be an object when doing a batch call' + }); + const acc = emptyObject(); + for (const index of paths.keys()) { + const input = inputs[index]; + if (input !== void 0) acc[index] = opts.router._def._config.transformer.input.deserialize(input); + } + return acc; + }); + const calls = await Promise.all(paths.map(async (path3, index) => { + const procedure = await getProcedureAtPath(opts.router, path3); + return { + batchIndex: index, + path: path3, + procedure, + getRawInput: /* @__PURE__ */ __name(async () => { + const inputs = await getInputs.read(); + let input = inputs[index]; + if ((procedure === null || procedure === void 0 ? void 0 : procedure._def.type) === "subscription") { + var _ref2, _opts$headers$get; + const lastEventId = (_ref2 = (_opts$headers$get = opts.headers.get("last-event-id")) !== null && _opts$headers$get !== void 0 ? _opts$headers$get : opts.searchParams.get("lastEventId")) !== null && _ref2 !== void 0 ? _ref2 : opts.searchParams.get("Last-Event-Id"); + if (lastEventId) if (isObject(input)) input = (0, import_objectSpread2$12.default)((0, import_objectSpread2$12.default)({}, input), {}, { lastEventId }); + else { + var _input; + (_input = input) !== null && _input !== void 0 || (input = { lastEventId }); + } + } + return input; + }, "getRawInput"), + result: /* @__PURE__ */ __name(() => { + var _getInputs$result; + return (_getInputs$result = getInputs.result()) === null || _getInputs$result === void 0 ? void 0 : _getInputs$result[index]; + }, "result") + }; + })); + const types = new Set(calls.map((call) => { + var _call$procedure; + return (_call$procedure = call.procedure) === null || _call$procedure === void 0 ? void 0 : _call$procedure._def.type; + }).filter(Boolean)); + if (types.size > 1) throw new TRPCError({ + code: "BAD_REQUEST", + message: `Cannot mix procedure types in call: ${Array.from(types).join(", ")}` + }); + const type = (_types$values$next$va = types.values().next().value) !== null && _types$values$next$va !== void 0 ? _types$values$next$va : "unknown"; + const connectionParamsStr = opts.searchParams.get("connectionParams"); + const info3 = { + isBatchCall, + accept: getAcceptHeader(req.headers), + calls, + type, + connectionParams: connectionParamsStr === null ? null : parseConnectionParamsFromString(connectionParamsStr), + signal: req.signal, + url: opts.url + }; + return info3; + } +}; +var formDataContentTypeHandler = { + isMatch(req) { + var _req$headers$get2; + return !!((_req$headers$get2 = req.headers.get("content-type")) === null || _req$headers$get2 === void 0 ? void 0 : _req$headers$get2.startsWith("multipart/form-data")); + }, + async parse(opts) { + const { req } = opts; + if (req.method !== "POST") throw new TRPCError({ + code: "METHOD_NOT_SUPPORTED", + message: "Only POST requests are supported for multipart/form-data requests" + }); + const getInputs = memo(async () => { + const fd = await req.formData(); + return fd; + }); + const procedure = await getProcedureAtPath(opts.router, opts.path); + return { + accept: null, + calls: [{ + batchIndex: 0, + path: opts.path, + getRawInput: getInputs.read, + result: getInputs.result, + procedure + }], + isBatchCall: false, + type: "mutation", + connectionParams: null, + signal: req.signal, + url: opts.url + }; + } +}; +var octetStreamContentTypeHandler = { + isMatch(req) { + var _req$headers$get3; + return !!((_req$headers$get3 = req.headers.get("content-type")) === null || _req$headers$get3 === void 0 ? void 0 : _req$headers$get3.startsWith("application/octet-stream")); + }, + async parse(opts) { + const { req } = opts; + if (req.method !== "POST") throw new TRPCError({ + code: "METHOD_NOT_SUPPORTED", + message: "Only POST requests are supported for application/octet-stream requests" + }); + const getInputs = memo(async () => { + return req.body; + }); + return { + calls: [{ + batchIndex: 0, + path: opts.path, + getRawInput: getInputs.read, + result: getInputs.result, + procedure: await getProcedureAtPath(opts.router, opts.path) + }], + isBatchCall: false, + accept: null, + type: "mutation", + connectionParams: null, + signal: req.signal, + url: opts.url + }; + } +}; +var handlers = [ + jsonContentTypeHandler, + formDataContentTypeHandler, + octetStreamContentTypeHandler +]; +function getContentTypeHandler(req) { + const handler = handlers.find((handler$1) => handler$1.isMatch(req)); + if (handler) return handler; + if (!handler && req.method === "GET") return jsonContentTypeHandler; + throw new TRPCError({ + code: "UNSUPPORTED_MEDIA_TYPE", + message: req.headers.has("content-type") ? `Unsupported content-type "${req.headers.get("content-type")}` : "Missing content-type header" + }); +} +__name(getContentTypeHandler, "getContentTypeHandler"); +async function getRequestInfo(opts) { + const handler = getContentTypeHandler(opts.req); + return await handler.parse(opts); +} +__name(getRequestInfo, "getRequestInfo"); +function isAbortError(error50) { + return isObject(error50) && error50["name"] === "AbortError"; +} +__name(isAbortError, "isAbortError"); +function throwAbortError(message2 = "AbortError") { + throw new DOMException(message2, "AbortError"); +} +__name(throwAbortError, "throwAbortError"); +function isObject$1(o) { + return Object.prototype.toString.call(o) === "[object Object]"; +} +__name(isObject$1, "isObject$1"); +function isPlainObject(o) { + var ctor, prot; + if (isObject$1(o) === false) return false; + ctor = o.constructor; + if (ctor === void 0) return true; + prot = ctor.prototype; + if (isObject$1(prot) === false) return false; + if (prot.hasOwnProperty("isPrototypeOf") === false) return false; + return true; +} +__name(isPlainObject, "isPlainObject"); +var import_defineProperty2 = __toESM2(require_defineProperty(), 1); +var _Symbol$toStringTag; +var subscribableCache = /* @__PURE__ */ new WeakMap(); +var NOOP = /* @__PURE__ */ __name(() => { +}, "NOOP"); +_Symbol$toStringTag = Symbol.toStringTag; +var Unpromise = class Unpromise2 { + static { + __name(this, "Unpromise"); + } + constructor(arg) { + (0, import_defineProperty2.default)(this, "promise", void 0); + (0, import_defineProperty2.default)(this, "subscribers", []); + (0, import_defineProperty2.default)(this, "settlement", null); + (0, import_defineProperty2.default)(this, _Symbol$toStringTag, "Unpromise"); + if (typeof arg === "function") this.promise = new Promise(arg); + else this.promise = arg; + const thenReturn = this.promise.then((value) => { + const { subscribers } = this; + this.subscribers = null; + this.settlement = { + status: "fulfilled", + value + }; + subscribers === null || subscribers === void 0 || subscribers.forEach(({ resolve }) => { + resolve(value); + }); + }); + if ("catch" in thenReturn) thenReturn.catch((reason) => { + const { subscribers } = this; + this.subscribers = null; + this.settlement = { + status: "rejected", + reason + }; + subscribers === null || subscribers === void 0 || subscribers.forEach(({ reject }) => { + reject(reason); + }); + }); + } + /** Create a promise that mitigates uncontrolled subscription to a long-lived + * Promise via .then() and .catch() - otherwise a source of memory leaks. + * + * The returned promise has an `unsubscribe()` method which can be called when + * the Promise is no longer being tracked by application logic, and which + * ensures that there is no reference chain from the original promise to the + * new one, and therefore no memory leak. + * + * If original promise has not yet settled, this adds a new unique promise + * that listens to then/catch events, along with an `unsubscribe()` method to + * detach it. + * + * If original promise has settled, then creates a new Promise.resolve() or + * Promise.reject() and provided unsubscribe is a noop. + * + * If you call `unsubscribe()` before the returned Promise has settled, it + * will never settle. + */ + subscribe() { + let promise2; + let unsubscribe; + const { settlement } = this; + if (settlement === null) { + if (this.subscribers === null) throw new Error("Unpromise settled but still has subscribers"); + const subscriber = withResolvers(); + this.subscribers = listWithMember(this.subscribers, subscriber); + promise2 = subscriber.promise; + unsubscribe = /* @__PURE__ */ __name(() => { + if (this.subscribers !== null) this.subscribers = listWithoutMember(this.subscribers, subscriber); + }, "unsubscribe"); + } else { + const { status } = settlement; + if (status === "fulfilled") promise2 = Promise.resolve(settlement.value); + else promise2 = Promise.reject(settlement.reason); + unsubscribe = NOOP; + } + return Object.assign(promise2, { unsubscribe }); + } + /** STANDARD PROMISE METHODS (but returning a SubscribedPromise) */ + then(onfulfilled, onrejected) { + const subscribed = this.subscribe(); + const { unsubscribe } = subscribed; + return Object.assign(subscribed.then(onfulfilled, onrejected), { unsubscribe }); + } + catch(onrejected) { + const subscribed = this.subscribe(); + const { unsubscribe } = subscribed; + return Object.assign(subscribed.catch(onrejected), { unsubscribe }); + } + finally(onfinally) { + const subscribed = this.subscribe(); + const { unsubscribe } = subscribed; + return Object.assign(subscribed.finally(onfinally), { unsubscribe }); + } + /** Unpromise STATIC METHODS */ + /** Create or Retrieve the proxy Unpromise (a re-used Unpromise for the VM lifetime + * of the provided Promise reference) */ + static proxy(promise2) { + const cached2 = Unpromise2.getSubscribablePromise(promise2); + return typeof cached2 !== "undefined" ? cached2 : Unpromise2.createSubscribablePromise(promise2); + } + /** Create and store an Unpromise keyed by an original Promise. */ + static createSubscribablePromise(promise2) { + const created = new Unpromise2(promise2); + subscribableCache.set(promise2, created); + subscribableCache.set(created, created); + return created; + } + /** Retrieve a previously-created Unpromise keyed by an original Promise. */ + static getSubscribablePromise(promise2) { + return subscribableCache.get(promise2); + } + /** Promise STATIC METHODS */ + /** Lookup the Unpromise for this promise, and derive a SubscribedPromise from + * it (that can be later unsubscribed to eliminate Memory leaks) */ + static resolve(value) { + const promise2 = typeof value === "object" && value !== null && "then" in value && typeof value.then === "function" ? value : Promise.resolve(value); + return Unpromise2.proxy(promise2).subscribe(); + } + static async any(values) { + const valuesArray = Array.isArray(values) ? values : [...values]; + const subscribedPromises = valuesArray.map(Unpromise2.resolve); + try { + return await Promise.any(subscribedPromises); + } finally { + subscribedPromises.forEach(({ unsubscribe }) => { + unsubscribe(); + }); + } + } + static async race(values) { + const valuesArray = Array.isArray(values) ? values : [...values]; + const subscribedPromises = valuesArray.map(Unpromise2.resolve); + try { + return await Promise.race(subscribedPromises); + } finally { + subscribedPromises.forEach(({ unsubscribe }) => { + unsubscribe(); + }); + } + } + /** Create a race of SubscribedPromises that will fulfil to a single winning + * Promise (in a 1-Tuple). Eliminates memory leaks from long-lived promises + * accumulating .then() and .catch() subscribers. Allows simple logic to + * consume the result, like... + * ```ts + * const [ winner ] = await Unpromise.race([ promiseA, promiseB ]); + * if(winner === promiseB){ + * const result = await promiseB; + * // do the thing + * } + * ``` + * */ + static async raceReferences(promises) { + const selfPromises = promises.map(resolveSelfTuple); + try { + return await Promise.race(selfPromises); + } finally { + for (const promise2 of selfPromises) promise2.unsubscribe(); + } + } +}; +function resolveSelfTuple(promise2) { + return Unpromise.proxy(promise2).then(() => [promise2]); +} +__name(resolveSelfTuple, "resolveSelfTuple"); +function withResolvers() { + let resolve; + let reject; + const promise2 = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + return { + promise: promise2, + resolve, + reject + }; +} +__name(withResolvers, "withResolvers"); +function listWithMember(arr, member2) { + return [...arr, member2]; +} +__name(listWithMember, "listWithMember"); +function listWithoutIndex(arr, index) { + return [...arr.slice(0, index), ...arr.slice(index + 1)]; +} +__name(listWithoutIndex, "listWithoutIndex"); +function listWithoutMember(arr, member2) { + const index = arr.indexOf(member2); + if (index !== -1) return listWithoutIndex(arr, index); + return arr; +} +__name(listWithoutMember, "listWithoutMember"); +var _Symbol; +var _Symbol$dispose; +var _Symbol2; +var _Symbol2$asyncDispose; +(_Symbol$dispose = (_Symbol = Symbol).dispose) !== null && _Symbol$dispose !== void 0 || (_Symbol.dispose = /* @__PURE__ */ Symbol()); +(_Symbol2$asyncDispose = (_Symbol2 = Symbol).asyncDispose) !== null && _Symbol2$asyncDispose !== void 0 || (_Symbol2.asyncDispose = /* @__PURE__ */ Symbol()); +function makeResource(thing, dispose) { + const it = thing; + const existing = it[Symbol.dispose]; + it[Symbol.dispose] = () => { + dispose(); + existing === null || existing === void 0 || existing(); + }; + return it; +} +__name(makeResource, "makeResource"); +function makeAsyncResource(thing, dispose) { + const it = thing; + const existing = it[Symbol.asyncDispose]; + it[Symbol.asyncDispose] = async () => { + await dispose(); + await (existing === null || existing === void 0 ? void 0 : existing()); + }; + return it; +} +__name(makeAsyncResource, "makeAsyncResource"); +var disposablePromiseTimerResult = /* @__PURE__ */ Symbol(); +function timerResource(ms) { + let timer = null; + return makeResource({ start() { + if (timer) throw new Error("Timer already started"); + const promise2 = new Promise((resolve) => { + timer = setTimeout(() => resolve(disposablePromiseTimerResult), ms); + }); + return promise2; + } }, () => { + if (timer) clearTimeout(timer); + }); +} +__name(timerResource, "timerResource"); +var require_usingCtx = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module2) { + function _usingCtx() { + var r = "function" == typeof SuppressedError ? SuppressedError : function(r$1, e$1) { + var n$1 = Error(); + return n$1.name = "SuppressedError", n$1.error = r$1, n$1.suppressed = e$1, n$1; + }, e = {}, n = []; + function using(r$1, e$1) { + if (null != e$1) { + if (Object(e$1) !== e$1) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); + if (r$1) var o = e$1[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")]; + if (void 0 === o && (o = e$1[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r$1)) var t8 = o; + if ("function" != typeof o) throw new TypeError("Object is not disposable."); + t8 && (o = /* @__PURE__ */ __name(function o$1() { + try { + t8.call(e$1); + } catch (r$2) { + return Promise.reject(r$2); + } + }, "o$1")), n.push({ + v: e$1, + d: o, + a: r$1 + }); + } else r$1 && n.push({ + d: e$1, + a: r$1 + }); + return e$1; + } + __name(using, "using"); + return { + e, + u: using.bind(null, false), + a: using.bind(null, true), + d: /* @__PURE__ */ __name(function d() { + var o, t8 = this.e, s = 0; + function next() { + for (; o = n.pop(); ) try { + if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next); + if (o.d) { + var r$1 = o.d.call(o.v); + if (o.a) return s |= 2, Promise.resolve(r$1).then(next, err); + } else s |= 1; + } catch (r$2) { + return err(r$2); + } + if (1 === s) return t8 !== e ? Promise.reject(t8) : Promise.resolve(); + if (t8 !== e) throw t8; + } + __name(next, "next"); + function err(n$1) { + return t8 = t8 !== e ? new r(n$1, t8) : n$1, next(); + } + __name(err, "err"); + return next(); + }, "d") + }; + } + __name(_usingCtx, "_usingCtx"); + module2.exports = _usingCtx, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; +} }); +var require_OverloadYield = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(exports, module2) { + function _OverloadYield(e, d) { + this.v = e, this.k = d; + } + __name(_OverloadYield, "_OverloadYield"); + module2.exports = _OverloadYield, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; +} }); +var require_awaitAsyncGenerator = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(exports, module2) { + var OverloadYield$2 = require_OverloadYield(); + function _awaitAsyncGenerator$5(e) { + return new OverloadYield$2(e, 0); + } + __name(_awaitAsyncGenerator$5, "_awaitAsyncGenerator$5"); + module2.exports = _awaitAsyncGenerator$5, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; +} }); +var require_wrapAsyncGenerator = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(exports, module2) { + var OverloadYield$1 = require_OverloadYield(); + function _wrapAsyncGenerator$6(e) { + return function() { + return new AsyncGenerator(e.apply(this, arguments)); + }; + } + __name(_wrapAsyncGenerator$6, "_wrapAsyncGenerator$6"); + function AsyncGenerator(e) { + var r, t8; + function resume(r$1, t$1) { + try { + var n = e[r$1](t$1), o = n.value, u4 = o instanceof OverloadYield$1; + Promise.resolve(u4 ? o.v : o).then(function(t$2) { + if (u4) { + var i = "return" === r$1 ? "return" : "next"; + if (!o.k || t$2.done) return resume(i, t$2); + t$2 = e[i](t$2).value; + } + settle2(n.done ? "return" : "normal", t$2); + }, function(e$1) { + resume("throw", e$1); + }); + } catch (e$1) { + settle2("throw", e$1); + } + } + __name(resume, "resume"); + function settle2(e$1, n) { + switch (e$1) { + case "return": + r.resolve({ + value: n, + done: true + }); + break; + case "throw": + r.reject(n); + break; + default: + r.resolve({ + value: n, + done: false + }); + } + (r = r.next) ? resume(r.key, r.arg) : t8 = null; + } + __name(settle2, "settle"); + this._invoke = function(e$1, n) { + return new Promise(function(o, u4) { + var i = { + key: e$1, + arg: n, + resolve: o, + reject: u4, + next: null + }; + t8 ? t8 = t8.next = i : (r = t8 = i, resume(e$1, n)); + }); + }, "function" != typeof e["return"] && (this["return"] = void 0); + } + __name(AsyncGenerator, "AsyncGenerator"); + AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function() { + return this; + }, AsyncGenerator.prototype.next = function(e) { + return this._invoke("next", e); + }, AsyncGenerator.prototype["throw"] = function(e) { + return this._invoke("throw", e); + }, AsyncGenerator.prototype["return"] = function(e) { + return this._invoke("return", e); + }; + module2.exports = _wrapAsyncGenerator$6, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; +} }); +var import_usingCtx$4 = __toESM2(require_usingCtx(), 1); +var import_awaitAsyncGenerator$4 = __toESM2(require_awaitAsyncGenerator(), 1); +var import_wrapAsyncGenerator$5 = __toESM2(require_wrapAsyncGenerator(), 1); +function iteratorResource(iterable) { + const iterator2 = iterable[Symbol.asyncIterator](); + if (iterator2[Symbol.asyncDispose]) return iterator2; + return makeAsyncResource(iterator2, async () => { + var _iterator$return; + await ((_iterator$return = iterator2.return) === null || _iterator$return === void 0 ? void 0 : _iterator$return.call(iterator2)); + }); +} +__name(iteratorResource, "iteratorResource"); +function takeWithGrace(_x2, _x22) { + return _takeWithGrace.apply(this, arguments); +} +__name(takeWithGrace, "takeWithGrace"); +function _takeWithGrace() { + _takeWithGrace = (0, import_wrapAsyncGenerator$5.default)(function* (iterable, opts) { + try { + var _usingCtx$1 = (0, import_usingCtx$4.default)(); + const iterator2 = _usingCtx$1.a(iteratorResource(iterable)); + let result; + const timer = _usingCtx$1.u(timerResource(opts.gracePeriodMs)); + let count4 = opts.count; + let timerPromise = new Promise(() => { + }); + while (true) { + result = yield (0, import_awaitAsyncGenerator$4.default)(Unpromise.race([iterator2.next(), timerPromise])); + if (result === disposablePromiseTimerResult) throwAbortError(); + if (result.done) return result.value; + yield result.value; + if (--count4 === 0) timerPromise = timer.start(); + result = null; + } + } catch (_) { + _usingCtx$1.e = _; + } finally { + yield (0, import_awaitAsyncGenerator$4.default)(_usingCtx$1.d()); + } + }); + return _takeWithGrace.apply(this, arguments); +} +__name(_takeWithGrace, "_takeWithGrace"); +function createDeferred() { + let resolve; + let reject; + const promise2 = new Promise((res, rej) => { + resolve = res; + reject = rej; + }); + return { + promise: promise2, + resolve, + reject + }; +} +__name(createDeferred, "createDeferred"); +var import_usingCtx$3 = __toESM2(require_usingCtx(), 1); +var import_awaitAsyncGenerator$3 = __toESM2(require_awaitAsyncGenerator(), 1); +var import_wrapAsyncGenerator$4 = __toESM2(require_wrapAsyncGenerator(), 1); +function createManagedIterator(iterable, onResult) { + const iterator2 = iterable[Symbol.asyncIterator](); + let state = "idle"; + function cleanup() { + state = "done"; + onResult = /* @__PURE__ */ __name(() => { + }, "onResult"); + } + __name(cleanup, "cleanup"); + function pull() { + if (state !== "idle") return; + state = "pending"; + const next = iterator2.next(); + next.then((result) => { + if (result.done) { + state = "done"; + onResult({ + status: "return", + value: result.value + }); + cleanup(); + return; + } + state = "idle"; + onResult({ + status: "yield", + value: result.value + }); + }).catch((cause) => { + onResult({ + status: "error", + error: cause + }); + cleanup(); + }); + } + __name(pull, "pull"); + return { + pull, + destroy: /* @__PURE__ */ __name(async () => { + var _iterator$return; + cleanup(); + await ((_iterator$return = iterator2.return) === null || _iterator$return === void 0 ? void 0 : _iterator$return.call(iterator2)); + }, "destroy") + }; +} +__name(createManagedIterator, "createManagedIterator"); +function mergeAsyncIterables() { + let state = "idle"; + let flushSignal = createDeferred(); + const iterables = []; + const iterators = /* @__PURE__ */ new Set(); + const buffer = []; + function initIterable(iterable) { + if (state !== "pending") return; + const iterator2 = createManagedIterator(iterable, (result) => { + if (state !== "pending") return; + switch (result.status) { + case "yield": + buffer.push([iterator2, result]); + break; + case "return": + iterators.delete(iterator2); + break; + case "error": + buffer.push([iterator2, result]); + iterators.delete(iterator2); + break; + } + flushSignal.resolve(); + }); + iterators.add(iterator2); + iterator2.pull(); + } + __name(initIterable, "initIterable"); + return { + add(iterable) { + switch (state) { + case "idle": + iterables.push(iterable); + break; + case "pending": + initIterable(iterable); + break; + case "done": + break; + } + }, + [Symbol.asyncIterator]() { + return (0, import_wrapAsyncGenerator$4.default)(function* () { + try { + var _usingCtx$1 = (0, import_usingCtx$3.default)(); + if (state !== "idle") throw new Error("Cannot iterate twice"); + state = "pending"; + const _finally = _usingCtx$1.a(makeAsyncResource({}, async () => { + state = "done"; + const errors2 = []; + await Promise.all(Array.from(iterators.values()).map(async (it) => { + try { + await it.destroy(); + } catch (cause) { + errors2.push(cause); + } + })); + buffer.length = 0; + iterators.clear(); + flushSignal.resolve(); + if (errors2.length > 0) throw new AggregateError(errors2); + })); + while (iterables.length > 0) initIterable(iterables.shift()); + while (iterators.size > 0) { + yield (0, import_awaitAsyncGenerator$3.default)(flushSignal.promise); + while (buffer.length > 0) { + const [iterator2, result] = buffer.shift(); + switch (result.status) { + case "yield": + yield result.value; + iterator2.pull(); + break; + case "error": + throw result.error; + } + } + flushSignal = createDeferred(); + } + } catch (_) { + _usingCtx$1.e = _; + } finally { + yield (0, import_awaitAsyncGenerator$3.default)(_usingCtx$1.d()); + } + })(); + } + }; +} +__name(mergeAsyncIterables, "mergeAsyncIterables"); +function readableStreamFrom(iterable) { + const iterator2 = iterable[Symbol.asyncIterator](); + return new ReadableStream({ + async cancel() { + var _iterator$return; + await ((_iterator$return = iterator2.return) === null || _iterator$return === void 0 ? void 0 : _iterator$return.call(iterator2)); + }, + async pull(controller) { + const result = await iterator2.next(); + if (result.done) { + controller.close(); + return; + } + controller.enqueue(result.value); + } + }); +} +__name(readableStreamFrom, "readableStreamFrom"); +var import_usingCtx$2 = __toESM2(require_usingCtx(), 1); +var import_awaitAsyncGenerator$2 = __toESM2(require_awaitAsyncGenerator(), 1); +var import_wrapAsyncGenerator$3 = __toESM2(require_wrapAsyncGenerator(), 1); +var PING_SYM = /* @__PURE__ */ Symbol("ping"); +function withPing(_x2, _x22) { + return _withPing.apply(this, arguments); +} +__name(withPing, "withPing"); +function _withPing() { + _withPing = (0, import_wrapAsyncGenerator$3.default)(function* (iterable, pingIntervalMs) { + try { + var _usingCtx$1 = (0, import_usingCtx$2.default)(); + const iterator2 = _usingCtx$1.a(iteratorResource(iterable)); + let result; + let nextPromise = iterator2.next(); + while (true) try { + var _usingCtx3 = (0, import_usingCtx$2.default)(); + const pingPromise = _usingCtx3.u(timerResource(pingIntervalMs)); + result = yield (0, import_awaitAsyncGenerator$2.default)(Unpromise.race([nextPromise, pingPromise.start()])); + if (result === disposablePromiseTimerResult) { + yield PING_SYM; + continue; + } + if (result.done) return result.value; + nextPromise = iterator2.next(); + yield result.value; + result = null; + } catch (_) { + _usingCtx3.e = _; + } finally { + _usingCtx3.d(); + } + } catch (_) { + _usingCtx$1.e = _; + } finally { + yield (0, import_awaitAsyncGenerator$2.default)(_usingCtx$1.d()); + } + }); + return _withPing.apply(this, arguments); +} +__name(_withPing, "_withPing"); +var require_asyncIterator = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(exports, module2) { + function _asyncIterator$2(r) { + var n, t8, o, e = 2; + for ("undefined" != typeof Symbol && (t8 = Symbol.asyncIterator, o = Symbol.iterator); e--; ) { + if (t8 && null != (n = r[t8])) return n.call(r); + if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); + t8 = "@@asyncIterator", o = "@@iterator"; + } + throw new TypeError("Object is not async iterable"); + } + __name(_asyncIterator$2, "_asyncIterator$2"); + function AsyncFromSyncIterator(r) { + function AsyncFromSyncIteratorContinuation(r$1) { + if (Object(r$1) !== r$1) return Promise.reject(new TypeError(r$1 + " is not an object.")); + var n = r$1.done; + return Promise.resolve(r$1.value).then(function(r$2) { + return { + value: r$2, + done: n + }; + }); + } + __name(AsyncFromSyncIteratorContinuation, "AsyncFromSyncIteratorContinuation"); + return AsyncFromSyncIterator = /* @__PURE__ */ __name(function AsyncFromSyncIterator$1(r$1) { + this.s = r$1, this.n = r$1.next; + }, "AsyncFromSyncIterator$1"), AsyncFromSyncIterator.prototype = { + s: null, + n: null, + next: /* @__PURE__ */ __name(function next() { + return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); + }, "next"), + "return": /* @__PURE__ */ __name(function _return(r$1) { + var n = this.s["return"]; + return void 0 === n ? Promise.resolve({ + value: r$1, + done: true + }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); + }, "_return"), + "throw": /* @__PURE__ */ __name(function _throw(r$1) { + var n = this.s["return"]; + return void 0 === n ? Promise.reject(r$1) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); + }, "_throw") + }, new AsyncFromSyncIterator(r); + } + __name(AsyncFromSyncIterator, "AsyncFromSyncIterator"); + module2.exports = _asyncIterator$2, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; +} }); +var import_awaitAsyncGenerator$1 = __toESM2(require_awaitAsyncGenerator(), 1); +var import_wrapAsyncGenerator$2 = __toESM2(require_wrapAsyncGenerator(), 1); +var import_usingCtx$1 = __toESM2(require_usingCtx(), 1); +var import_asyncIterator$1 = __toESM2(require_asyncIterator(), 1); +var CHUNK_VALUE_TYPE_PROMISE = 0; +var CHUNK_VALUE_TYPE_ASYNC_ITERABLE = 1; +var PROMISE_STATUS_FULFILLED = 0; +var PROMISE_STATUS_REJECTED = 1; +var ASYNC_ITERABLE_STATUS_RETURN = 0; +var ASYNC_ITERABLE_STATUS_YIELD = 1; +var ASYNC_ITERABLE_STATUS_ERROR = 2; +function isPromise(value) { + return (isObject(value) || isFunction(value)) && typeof (value === null || value === void 0 ? void 0 : value["then"]) === "function" && typeof (value === null || value === void 0 ? void 0 : value["catch"]) === "function"; +} +__name(isPromise, "isPromise"); +var MaxDepthError = class extends Error { + static { + __name(this, "MaxDepthError"); + } + constructor(path3) { + super("Max depth reached at path: " + path3.join(".")); + this.path = path3; + } +}; +function createBatchStreamProducer(_x3) { + return _createBatchStreamProducer.apply(this, arguments); +} +__name(createBatchStreamProducer, "createBatchStreamProducer"); +function _createBatchStreamProducer() { + _createBatchStreamProducer = (0, import_wrapAsyncGenerator$2.default)(function* (opts) { + const { data } = opts; + let counter = 0; + const placeholder = 0; + const mergedIterables = mergeAsyncIterables(); + function registerAsync(callback) { + const idx = counter++; + const iterable$1 = callback(idx); + mergedIterables.add(iterable$1); + return idx; + } + __name(registerAsync, "registerAsync"); + function encodePromise(promise2, path3) { + return registerAsync(/* @__PURE__ */ (function() { + var _ref = (0, import_wrapAsyncGenerator$2.default)(function* (idx) { + const error50 = checkMaxDepth(path3); + if (error50) { + promise2.catch((cause) => { + var _opts$onError; + (_opts$onError = opts.onError) === null || _opts$onError === void 0 || _opts$onError.call(opts, { + error: cause, + path: path3 + }); + }); + promise2 = Promise.reject(error50); + } + try { + const next = yield (0, import_awaitAsyncGenerator$1.default)(promise2); + yield [ + idx, + PROMISE_STATUS_FULFILLED, + encode8(next, path3) + ]; + } catch (cause) { + var _opts$onError2, _opts$formatError; + (_opts$onError2 = opts.onError) === null || _opts$onError2 === void 0 || _opts$onError2.call(opts, { + error: cause, + path: path3 + }); + yield [ + idx, + PROMISE_STATUS_REJECTED, + (_opts$formatError = opts.formatError) === null || _opts$formatError === void 0 ? void 0 : _opts$formatError.call(opts, { + error: cause, + path: path3 + }) + ]; + } + }); + return function(_x2) { + return _ref.apply(this, arguments); + }; + })()); + } + __name(encodePromise, "encodePromise"); + function encodeAsyncIterable(iterable$1, path3) { + return registerAsync(/* @__PURE__ */ (function() { + var _ref2 = (0, import_wrapAsyncGenerator$2.default)(function* (idx) { + try { + var _usingCtx$1 = (0, import_usingCtx$1.default)(); + const error50 = checkMaxDepth(path3); + if (error50) throw error50; + const iterator2 = _usingCtx$1.a(iteratorResource(iterable$1)); + try { + while (true) { + const next = yield (0, import_awaitAsyncGenerator$1.default)(iterator2.next()); + if (next.done) { + yield [ + idx, + ASYNC_ITERABLE_STATUS_RETURN, + encode8(next.value, path3) + ]; + break; + } + yield [ + idx, + ASYNC_ITERABLE_STATUS_YIELD, + encode8(next.value, path3) + ]; + } + } catch (cause) { + var _opts$onError3, _opts$formatError2; + (_opts$onError3 = opts.onError) === null || _opts$onError3 === void 0 || _opts$onError3.call(opts, { + error: cause, + path: path3 + }); + yield [ + idx, + ASYNC_ITERABLE_STATUS_ERROR, + (_opts$formatError2 = opts.formatError) === null || _opts$formatError2 === void 0 ? void 0 : _opts$formatError2.call(opts, { + error: cause, + path: path3 + }) + ]; + } + } catch (_) { + _usingCtx$1.e = _; + } finally { + yield (0, import_awaitAsyncGenerator$1.default)(_usingCtx$1.d()); + } + }); + return function(_x2) { + return _ref2.apply(this, arguments); + }; + })()); + } + __name(encodeAsyncIterable, "encodeAsyncIterable"); + function checkMaxDepth(path3) { + if (opts.maxDepth && path3.length > opts.maxDepth) return new MaxDepthError(path3); + return null; + } + __name(checkMaxDepth, "checkMaxDepth"); + function encodeAsync3(value, path3) { + if (isPromise(value)) return [CHUNK_VALUE_TYPE_PROMISE, encodePromise(value, path3)]; + if (isAsyncIterable(value)) { + if (opts.maxDepth && path3.length >= opts.maxDepth) throw new Error("Max depth reached"); + return [CHUNK_VALUE_TYPE_ASYNC_ITERABLE, encodeAsyncIterable(value, path3)]; + } + return null; + } + __name(encodeAsync3, "encodeAsync"); + function encode8(value, path3) { + if (value === void 0) return [[]]; + const reg = encodeAsync3(value, path3); + if (reg) return [[placeholder], [null, ...reg]]; + if (!isPlainObject(value)) return [[value]]; + const newObj = emptyObject(); + const asyncValues = []; + for (const [key, item] of Object.entries(value)) { + const transformed = encodeAsync3(item, [...path3, key]); + if (!transformed) { + newObj[key] = item; + continue; + } + newObj[key] = placeholder; + asyncValues.push([key, ...transformed]); + } + return [[newObj], ...asyncValues]; + } + __name(encode8, "encode"); + const newHead = emptyObject(); + for (const [key, item] of Object.entries(data)) newHead[key] = encode8(item, [key]); + yield newHead; + let iterable = mergedIterables; + if (opts.pingMs) iterable = withPing(mergedIterables, opts.pingMs); + var _iteratorAbruptCompletion = false; + var _didIteratorError = false; + var _iteratorError; + try { + for (var _iterator = (0, import_asyncIterator$1.default)(iterable), _step; _iteratorAbruptCompletion = !(_step = yield (0, import_awaitAsyncGenerator$1.default)(_iterator.next())).done; _iteratorAbruptCompletion = false) { + const value = _step.value; + yield value; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (_iteratorAbruptCompletion && _iterator.return != null) yield (0, import_awaitAsyncGenerator$1.default)(_iterator.return()); + } finally { + if (_didIteratorError) throw _iteratorError; + } + } + }); + return _createBatchStreamProducer.apply(this, arguments); +} +__name(_createBatchStreamProducer, "_createBatchStreamProducer"); +function jsonlStreamProducer(opts) { + let stream = readableStreamFrom(createBatchStreamProducer(opts)); + const { serialize } = opts; + if (serialize) stream = stream.pipeThrough(new TransformStream({ transform(chunk, controller) { + if (chunk === PING_SYM) controller.enqueue(PING_SYM); + else controller.enqueue(serialize(chunk)); + } })); + return stream.pipeThrough(new TransformStream({ transform(chunk, controller) { + if (chunk === PING_SYM) controller.enqueue(" "); + else controller.enqueue(JSON.stringify(chunk) + "\n"); + } })).pipeThrough(new TextEncoderStream()); +} +__name(jsonlStreamProducer, "jsonlStreamProducer"); +var require_asyncGeneratorDelegate = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js"(exports, module2) { + var OverloadYield = require_OverloadYield(); + function _asyncGeneratorDelegate$1(t8) { + var e = {}, n = false; + function pump(e$1, r) { + return n = true, r = new Promise(function(n$1) { + n$1(t8[e$1](r)); + }), { + done: false, + value: new OverloadYield(r, 1) + }; + } + __name(pump, "pump"); + return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function() { + return this; + }, e.next = function(t$1) { + return n ? (n = false, t$1) : pump("next", t$1); + }, "function" == typeof t8["throw"] && (e["throw"] = function(t$1) { + if (n) throw n = false, t$1; + return pump("throw", t$1); + }), "function" == typeof t8["return"] && (e["return"] = function(t$1) { + return n ? (n = false, t$1) : pump("return", t$1); + }), e; + } + __name(_asyncGeneratorDelegate$1, "_asyncGeneratorDelegate$1"); + module2.exports = _asyncGeneratorDelegate$1, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; +} }); +var import_asyncIterator = __toESM2(require_asyncIterator(), 1); +var import_awaitAsyncGenerator = __toESM2(require_awaitAsyncGenerator(), 1); +var import_wrapAsyncGenerator$1 = __toESM2(require_wrapAsyncGenerator(), 1); +var import_asyncGeneratorDelegate = __toESM2(require_asyncGeneratorDelegate(), 1); +var import_usingCtx = __toESM2(require_usingCtx(), 1); +var PING_EVENT = "ping"; +var SERIALIZED_ERROR_EVENT = "serialized-error"; +var CONNECTED_EVENT = "connected"; +var RETURN_EVENT = "return"; +function sseStreamProducer(opts) { + var _opts$ping$enabled, _opts$ping, _opts$ping$intervalMs, _opts$ping2, _opts$client; + const { serialize = identity } = opts; + const ping = { + enabled: (_opts$ping$enabled = (_opts$ping = opts.ping) === null || _opts$ping === void 0 ? void 0 : _opts$ping.enabled) !== null && _opts$ping$enabled !== void 0 ? _opts$ping$enabled : false, + intervalMs: (_opts$ping$intervalMs = (_opts$ping2 = opts.ping) === null || _opts$ping2 === void 0 ? void 0 : _opts$ping2.intervalMs) !== null && _opts$ping$intervalMs !== void 0 ? _opts$ping$intervalMs : 1e3 + }; + const client = (_opts$client = opts.client) !== null && _opts$client !== void 0 ? _opts$client : {}; + if (ping.enabled && client.reconnectAfterInactivityMs && ping.intervalMs > client.reconnectAfterInactivityMs) throw new Error(`Ping interval must be less than client reconnect interval to prevent unnecessary reconnection - ping.intervalMs: ${ping.intervalMs} client.reconnectAfterInactivityMs: ${client.reconnectAfterInactivityMs}`); + function generator() { + return _generator.apply(this, arguments); + } + __name(generator, "generator"); + function _generator() { + _generator = (0, import_wrapAsyncGenerator$1.default)(function* () { + yield { + event: CONNECTED_EVENT, + data: JSON.stringify(client) + }; + let iterable = opts.data; + if (opts.emitAndEndImmediately) iterable = takeWithGrace(iterable, { + count: 1, + gracePeriodMs: 1 + }); + if (ping.enabled && ping.intervalMs !== Infinity && ping.intervalMs > 0) iterable = withPing(iterable, ping.intervalMs); + let value; + let chunk; + var _iteratorAbruptCompletion = false; + var _didIteratorError = false; + var _iteratorError; + try { + for (var _iterator = (0, import_asyncIterator.default)(iterable), _step; _iteratorAbruptCompletion = !(_step = yield (0, import_awaitAsyncGenerator.default)(_iterator.next())).done; _iteratorAbruptCompletion = false) { + value = _step.value; + { + if (value === PING_SYM) { + yield { + event: PING_EVENT, + data: "" + }; + continue; + } + chunk = isTrackedEnvelope(value) ? { + id: value[0], + data: value[1] + } : { data: value }; + chunk.data = JSON.stringify(serialize(chunk.data)); + yield chunk; + value = null; + chunk = null; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (_iteratorAbruptCompletion && _iterator.return != null) yield (0, import_awaitAsyncGenerator.default)(_iterator.return()); + } finally { + if (_didIteratorError) throw _iteratorError; + } + } + }); + return _generator.apply(this, arguments); + } + __name(_generator, "_generator"); + function generatorWithErrorHandling() { + return _generatorWithErrorHandling.apply(this, arguments); + } + __name(generatorWithErrorHandling, "generatorWithErrorHandling"); + function _generatorWithErrorHandling() { + _generatorWithErrorHandling = (0, import_wrapAsyncGenerator$1.default)(function* () { + try { + yield* (0, import_asyncGeneratorDelegate.default)((0, import_asyncIterator.default)(generator())); + yield { + event: RETURN_EVENT, + data: "" + }; + } catch (cause) { + var _opts$formatError, _opts$formatError2; + if (isAbortError(cause)) return; + const error50 = getTRPCErrorFromUnknown(cause); + const data = (_opts$formatError = (_opts$formatError2 = opts.formatError) === null || _opts$formatError2 === void 0 ? void 0 : _opts$formatError2.call(opts, { error: error50 })) !== null && _opts$formatError !== void 0 ? _opts$formatError : null; + yield { + event: SERIALIZED_ERROR_EVENT, + data: JSON.stringify(serialize(data)) + }; + } + }); + return _generatorWithErrorHandling.apply(this, arguments); + } + __name(_generatorWithErrorHandling, "_generatorWithErrorHandling"); + const stream = readableStreamFrom(generatorWithErrorHandling()); + return stream.pipeThrough(new TransformStream({ transform(chunk, controller) { + if ("event" in chunk) controller.enqueue(`event: ${chunk.event} +`); + if ("data" in chunk) controller.enqueue(`data: ${chunk.data} +`); + if ("id" in chunk) controller.enqueue(`id: ${chunk.id} +`); + if ("comment" in chunk) controller.enqueue(`: ${chunk.comment} +`); + controller.enqueue("\n\n"); + } })).pipeThrough(new TextEncoderStream()); +} +__name(sseStreamProducer, "sseStreamProducer"); +var sseHeaders = { + "Content-Type": "text/event-stream", + "Cache-Control": "no-cache, no-transform", + "X-Accel-Buffering": "no", + Connection: "keep-alive" +}; +var import_wrapAsyncGenerator = __toESM2(require_wrapAsyncGenerator(), 1); +var import_objectSpread23 = __toESM2(require_objectSpread2(), 1); +function errorToAsyncIterable(err) { + return run((0, import_wrapAsyncGenerator.default)(function* () { + throw err; + })); +} +__name(errorToAsyncIterable, "errorToAsyncIterable"); +function combinedAbortController(signal) { + const controller = new AbortController(); + const combinedSignal = abortSignalsAnyPonyfill([signal, controller.signal]); + return { + signal: combinedSignal, + controller + }; +} +__name(combinedAbortController, "combinedAbortController"); +var TYPE_ACCEPTED_METHOD_MAP = { + mutation: ["POST"], + query: ["GET"], + subscription: ["GET"] +}; +var TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE = { + mutation: ["POST"], + query: ["GET", "POST"], + subscription: ["GET", "POST"] +}; +function initResponse(initOpts) { + var _responseMeta, _info$calls$find$proc, _info$calls$find; + const { ctx, info: info3, responseMeta, untransformedJSON, errors: errors2 = [], headers } = initOpts; + let status = untransformedJSON ? getHTTPStatusCode(untransformedJSON) : 200; + const eagerGeneration = !untransformedJSON; + const data = eagerGeneration ? [] : Array.isArray(untransformedJSON) ? untransformedJSON : [untransformedJSON]; + const meta3 = (_responseMeta = responseMeta === null || responseMeta === void 0 ? void 0 : responseMeta({ + ctx, + info: info3, + paths: info3 === null || info3 === void 0 ? void 0 : info3.calls.map((call) => call.path), + data, + errors: errors2, + eagerGeneration, + type: (_info$calls$find$proc = info3 === null || info3 === void 0 || (_info$calls$find = info3.calls.find((call) => { + var _call$procedure; + return (_call$procedure = call.procedure) === null || _call$procedure === void 0 ? void 0 : _call$procedure._def.type; + })) === null || _info$calls$find === void 0 || (_info$calls$find = _info$calls$find.procedure) === null || _info$calls$find === void 0 ? void 0 : _info$calls$find._def.type) !== null && _info$calls$find$proc !== void 0 ? _info$calls$find$proc : "unknown" + })) !== null && _responseMeta !== void 0 ? _responseMeta : {}; + if (meta3.headers) { + if (meta3.headers instanceof Headers) for (const [key, value] of meta3.headers.entries()) headers.append(key, value); + else + for (const [key, value] of Object.entries(meta3.headers)) if (Array.isArray(value)) for (const v2 of value) headers.append(key, v2); + else if (typeof value === "string") headers.set(key, value); + } + if (meta3.status) status = meta3.status; + return { status }; +} +__name(initResponse, "initResponse"); +function caughtErrorToData(cause, errorOpts) { + const { router: router8, req, onError } = errorOpts.opts; + const error50 = getTRPCErrorFromUnknown(cause); + onError === null || onError === void 0 || onError({ + error: error50, + path: errorOpts.path, + input: errorOpts.input, + ctx: errorOpts.ctx, + type: errorOpts.type, + req + }); + const untransformedJSON = { error: getErrorShape({ + config: router8._def._config, + error: error50, + type: errorOpts.type, + path: errorOpts.path, + input: errorOpts.input, + ctx: errorOpts.ctx + }) }; + const transformedJSON = transformTRPCResponse(router8._def._config, untransformedJSON); + const body = JSON.stringify(transformedJSON); + return { + error: error50, + untransformedJSON, + body + }; +} +__name(caughtErrorToData, "caughtErrorToData"); +function isDataStream(v2) { + if (!isObject(v2)) return false; + if (isAsyncIterable(v2)) return true; + return Object.values(v2).some(isPromise) || Object.values(v2).some(isAsyncIterable); +} +__name(isDataStream, "isDataStream"); +async function resolveResponse(opts) { + var _ref, _opts$allowBatching, _opts$batching, _opts$allowMethodOver, _config$sse$enabled, _config$sse; + const { router: router8, req } = opts; + const headers = new Headers([["vary", "trpc-accept, accept"]]); + const config3 = router8._def._config; + const url2 = new URL(req.url); + if (req.method === "HEAD") return new Response(null, { status: 204 }); + const allowBatching = (_ref = (_opts$allowBatching = opts.allowBatching) !== null && _opts$allowBatching !== void 0 ? _opts$allowBatching : (_opts$batching = opts.batching) === null || _opts$batching === void 0 ? void 0 : _opts$batching.enabled) !== null && _ref !== void 0 ? _ref : true; + const allowMethodOverride = ((_opts$allowMethodOver = opts.allowMethodOverride) !== null && _opts$allowMethodOver !== void 0 ? _opts$allowMethodOver : false) && req.method === "POST"; + const infoTuple = await run(async () => { + try { + return [void 0, await getRequestInfo({ + req, + path: decodeURIComponent(opts.path), + router: router8, + searchParams: url2.searchParams, + headers: opts.req.headers, + url: url2 + })]; + } catch (cause) { + return [getTRPCErrorFromUnknown(cause), void 0]; + } + }); + const ctxManager = run(() => { + let result = void 0; + return { + valueOrUndefined: /* @__PURE__ */ __name(() => { + if (!result) return void 0; + return result[1]; + }, "valueOrUndefined"), + value: /* @__PURE__ */ __name(() => { + const [err, ctx] = result; + if (err) throw err; + return ctx; + }, "value"), + create: /* @__PURE__ */ __name(async (info3) => { + if (result) throw new Error("This should only be called once - report a bug in tRPC"); + try { + const ctx = await opts.createContext({ info: info3 }); + result = [void 0, ctx]; + } catch (cause) { + result = [getTRPCErrorFromUnknown(cause), void 0]; + } + }, "create") + }; + }); + const methodMapper = allowMethodOverride ? TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE : TYPE_ACCEPTED_METHOD_MAP; + const isStreamCall = getAcceptHeader(req.headers) === "application/jsonl"; + const experimentalSSE = (_config$sse$enabled = (_config$sse = config3.sse) === null || _config$sse === void 0 ? void 0 : _config$sse.enabled) !== null && _config$sse$enabled !== void 0 ? _config$sse$enabled : true; + try { + const [infoError, info3] = infoTuple; + if (infoError) throw infoError; + if (info3.isBatchCall && !allowBatching) throw new TRPCError({ + code: "BAD_REQUEST", + message: `Batching is not enabled on the server` + }); + if (isStreamCall && !info3.isBatchCall) throw new TRPCError({ + message: `Streaming requests must be batched (you can do a batch of 1)`, + code: "BAD_REQUEST" + }); + await ctxManager.create(info3); + const rpcCalls = info3.calls.map(async (call) => { + const proc = call.procedure; + const combinedAbort = combinedAbortController(opts.req.signal); + try { + if (opts.error) throw opts.error; + if (!proc) throw new TRPCError({ + code: "NOT_FOUND", + message: `No procedure found on path "${call.path}"` + }); + if (!methodMapper[proc._def.type].includes(req.method)) throw new TRPCError({ + code: "METHOD_NOT_SUPPORTED", + message: `Unsupported ${req.method}-request to ${proc._def.type} procedure at path "${call.path}"` + }); + if (proc._def.type === "subscription") { + var _config$sse2; + if (info3.isBatchCall) throw new TRPCError({ + code: "BAD_REQUEST", + message: `Cannot batch subscription calls` + }); + if ((_config$sse2 = config3.sse) === null || _config$sse2 === void 0 ? void 0 : _config$sse2.maxDurationMs) { + let cleanup = function() { + clearTimeout(timer); + combinedAbort.signal.removeEventListener("abort", cleanup); + combinedAbort.controller.abort(); + }; + __name(cleanup, "cleanup"); + const timer = setTimeout(cleanup, config3.sse.maxDurationMs); + combinedAbort.signal.addEventListener("abort", cleanup); + } + } + const data = await proc({ + path: call.path, + getRawInput: call.getRawInput, + ctx: ctxManager.value(), + type: proc._def.type, + signal: combinedAbort.signal, + batchIndex: call.batchIndex + }); + return [void 0, { + data, + signal: proc._def.type === "subscription" ? combinedAbort.signal : void 0 + }]; + } catch (cause) { + var _opts$onError, _call$procedure$_def$, _call$procedure2; + const error50 = getTRPCErrorFromUnknown(cause); + const input = call.result(); + (_opts$onError = opts.onError) === null || _opts$onError === void 0 || _opts$onError.call(opts, { + error: error50, + path: call.path, + input, + ctx: ctxManager.valueOrUndefined(), + type: (_call$procedure$_def$ = (_call$procedure2 = call.procedure) === null || _call$procedure2 === void 0 ? void 0 : _call$procedure2._def.type) !== null && _call$procedure$_def$ !== void 0 ? _call$procedure$_def$ : "unknown", + req: opts.req + }); + return [error50, void 0]; + } + }); + if (!info3.isBatchCall) { + const [call] = info3.calls; + const [error50, result] = await rpcCalls[0]; + switch (info3.type) { + case "unknown": + case "mutation": + case "query": { + headers.set("content-type", "application/json"); + if (isDataStream(result === null || result === void 0 ? void 0 : result.data)) throw new TRPCError({ + code: "UNSUPPORTED_MEDIA_TYPE", + message: "Cannot use stream-like response in non-streaming request - use httpBatchStreamLink" + }); + const res = error50 ? { error: getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error50, + input: call.result(), + path: call.path, + type: info3.type + }) } : { result: { data: result.data } }; + const headResponse$1 = initResponse({ + ctx: ctxManager.valueOrUndefined(), + info: info3, + responseMeta: opts.responseMeta, + errors: error50 ? [error50] : [], + headers, + untransformedJSON: [res] + }); + return new Response(JSON.stringify(transformTRPCResponse(config3, res)), { + status: headResponse$1.status, + headers + }); + } + case "subscription": { + const iterable = run(() => { + if (error50) return errorToAsyncIterable(error50); + if (!experimentalSSE) return errorToAsyncIterable(new TRPCError({ + code: "METHOD_NOT_SUPPORTED", + message: 'Missing experimental flag "sseSubscriptions"' + })); + if (!isObservable(result.data) && !isAsyncIterable(result.data)) return errorToAsyncIterable(new TRPCError({ + message: `Subscription ${call.path} did not return an observable or a AsyncGenerator`, + code: "INTERNAL_SERVER_ERROR" + })); + const dataAsIterable = isObservable(result.data) ? observableToAsyncIterable(result.data, opts.req.signal) : result.data; + return dataAsIterable; + }); + const stream = sseStreamProducer((0, import_objectSpread23.default)((0, import_objectSpread23.default)({}, config3.sse), {}, { + data: iterable, + serialize: /* @__PURE__ */ __name((v2) => config3.transformer.output.serialize(v2), "serialize"), + formatError(errorOpts) { + var _call$procedure$_def$2, _call$procedure3, _opts$onError2; + const error$1 = getTRPCErrorFromUnknown(errorOpts.error); + const input = call === null || call === void 0 ? void 0 : call.result(); + const path3 = call === null || call === void 0 ? void 0 : call.path; + const type = (_call$procedure$_def$2 = call === null || call === void 0 || (_call$procedure3 = call.procedure) === null || _call$procedure3 === void 0 ? void 0 : _call$procedure3._def.type) !== null && _call$procedure$_def$2 !== void 0 ? _call$procedure$_def$2 : "unknown"; + (_opts$onError2 = opts.onError) === null || _opts$onError2 === void 0 || _opts$onError2.call(opts, { + error: error$1, + path: path3, + input, + ctx: ctxManager.valueOrUndefined(), + req: opts.req, + type + }); + const shape = getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error$1, + input, + path: path3, + type + }); + return shape; + } + })); + for (const [key, value] of Object.entries(sseHeaders)) headers.set(key, value); + const headResponse$1 = initResponse({ + ctx: ctxManager.valueOrUndefined(), + info: info3, + responseMeta: opts.responseMeta, + errors: [], + headers, + untransformedJSON: null + }); + const abortSignal = result === null || result === void 0 ? void 0 : result.signal; + let responseBody = stream; + if (abortSignal) { + const reader = stream.getReader(); + const onAbort = /* @__PURE__ */ __name(() => void reader.cancel(), "onAbort"); + if (abortSignal.aborted) onAbort(); + else abortSignal.addEventListener("abort", onAbort, { once: true }); + responseBody = new ReadableStream({ + async pull(controller) { + const chunk = await reader.read(); + if (chunk.done) { + abortSignal.removeEventListener("abort", onAbort); + controller.close(); + } else controller.enqueue(chunk.value); + }, + cancel() { + abortSignal.removeEventListener("abort", onAbort); + return reader.cancel(); + } + }); + } + return new Response(responseBody, { + headers, + status: headResponse$1.status + }); + } + } + } + if (info3.accept === "application/jsonl") { + headers.set("content-type", "application/json"); + headers.set("transfer-encoding", "chunked"); + const headResponse$1 = initResponse({ + ctx: ctxManager.valueOrUndefined(), + info: info3, + responseMeta: opts.responseMeta, + errors: [], + headers, + untransformedJSON: null + }); + const stream = jsonlStreamProducer((0, import_objectSpread23.default)((0, import_objectSpread23.default)({}, config3.jsonl), {}, { + maxDepth: Infinity, + data: rpcCalls.map(async (res) => { + const [error50, result] = await res; + const call = info3.calls[0]; + if (error50) { + var _procedure$_def$type, _procedure; + return { error: getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error50, + input: call.result(), + path: call.path, + type: (_procedure$_def$type = (_procedure = call.procedure) === null || _procedure === void 0 ? void 0 : _procedure._def.type) !== null && _procedure$_def$type !== void 0 ? _procedure$_def$type : "unknown" + }) }; + } + const iterable = isObservable(result.data) ? observableToAsyncIterable(result.data, opts.req.signal) : Promise.resolve(result.data); + return { result: Promise.resolve({ data: iterable }) }; + }), + serialize: /* @__PURE__ */ __name((data) => config3.transformer.output.serialize(data), "serialize"), + onError: /* @__PURE__ */ __name((cause) => { + var _opts$onError3, _info$type; + (_opts$onError3 = opts.onError) === null || _opts$onError3 === void 0 || _opts$onError3.call(opts, { + error: getTRPCErrorFromUnknown(cause), + path: void 0, + input: void 0, + ctx: ctxManager.valueOrUndefined(), + req: opts.req, + type: (_info$type = info3 === null || info3 === void 0 ? void 0 : info3.type) !== null && _info$type !== void 0 ? _info$type : "unknown" + }); + }, "onError"), + formatError(errorOpts) { + var _call$procedure$_def$3, _call$procedure4; + const call = info3 === null || info3 === void 0 ? void 0 : info3.calls[errorOpts.path[0]]; + const error50 = getTRPCErrorFromUnknown(errorOpts.error); + const input = call === null || call === void 0 ? void 0 : call.result(); + const path3 = call === null || call === void 0 ? void 0 : call.path; + const type = (_call$procedure$_def$3 = call === null || call === void 0 || (_call$procedure4 = call.procedure) === null || _call$procedure4 === void 0 ? void 0 : _call$procedure4._def.type) !== null && _call$procedure$_def$3 !== void 0 ? _call$procedure$_def$3 : "unknown"; + const shape = getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error50, + input, + path: path3, + type + }); + return shape; + } + })); + return new Response(stream, { + headers, + status: headResponse$1.status + }); + } + headers.set("content-type", "application/json"); + const results = (await Promise.all(rpcCalls)).map((res) => { + const [error50, result] = res; + if (error50) return res; + if (isDataStream(result.data)) return [new TRPCError({ + code: "UNSUPPORTED_MEDIA_TYPE", + message: "Cannot use stream-like response in non-streaming request - use httpBatchStreamLink" + }), void 0]; + return res; + }); + const resultAsRPCResponse = results.map(([error50, result], index) => { + const call = info3.calls[index]; + if (error50) { + var _call$procedure$_def$4, _call$procedure5; + return { error: getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error50, + input: call.result(), + path: call.path, + type: (_call$procedure$_def$4 = (_call$procedure5 = call.procedure) === null || _call$procedure5 === void 0 ? void 0 : _call$procedure5._def.type) !== null && _call$procedure$_def$4 !== void 0 ? _call$procedure$_def$4 : "unknown" + }) }; + } + return { result: { data: result.data } }; + }); + const errors2 = results.map(([error50]) => error50).filter(Boolean); + const headResponse = initResponse({ + ctx: ctxManager.valueOrUndefined(), + info: info3, + responseMeta: opts.responseMeta, + untransformedJSON: resultAsRPCResponse, + errors: errors2, + headers + }); + return new Response(JSON.stringify(transformTRPCResponse(config3, resultAsRPCResponse)), { + status: headResponse.status, + headers + }); + } catch (cause) { + var _info$type2; + const [_infoError, info3] = infoTuple; + const ctx = ctxManager.valueOrUndefined(); + const { error: error50, untransformedJSON, body } = caughtErrorToData(cause, { + opts, + ctx: ctxManager.valueOrUndefined(), + type: (_info$type2 = info3 === null || info3 === void 0 ? void 0 : info3.type) !== null && _info$type2 !== void 0 ? _info$type2 : "unknown" + }); + const headResponse = initResponse({ + ctx, + info: info3, + responseMeta: opts.responseMeta, + untransformedJSON, + errors: [error50], + headers + }); + return new Response(body, { + status: headResponse.status, + headers + }); + } +} +__name(resolveResponse, "resolveResponse"); + +// ../../node_modules/@trpc/server/dist/adapters/fetch/index.mjs +var import_objectSpread24 = __toESM2(require_objectSpread2(), 1); +var trimSlashes = /* @__PURE__ */ __name((path3) => { + path3 = path3.startsWith("/") ? path3.slice(1) : path3; + path3 = path3.endsWith("/") ? path3.slice(0, -1) : path3; + return path3; +}, "trimSlashes"); +async function fetchRequestHandler(opts) { + const resHeaders = new Headers(); + const createContext = /* @__PURE__ */ __name(async (innerOpts) => { + var _opts$createContext; + return (_opts$createContext = opts.createContext) === null || _opts$createContext === void 0 ? void 0 : _opts$createContext.call(opts, (0, import_objectSpread24.default)({ + req: opts.req, + resHeaders + }, innerOpts)); + }, "createContext"); + const url2 = new URL(opts.req.url); + const pathname = trimSlashes(url2.pathname); + const endpoint = trimSlashes(opts.endpoint); + const path3 = trimSlashes(pathname.slice(endpoint.length)); + return await resolveResponse((0, import_objectSpread24.default)((0, import_objectSpread24.default)({}, opts), {}, { + req: opts.req, + createContext, + path: path3, + error: null, + onError(o) { + var _opts$onError; + opts === null || opts === void 0 || (_opts$onError = opts.onError) === null || _opts$onError === void 0 || _opts$onError.call(opts, (0, import_objectSpread24.default)((0, import_objectSpread24.default)({}, o), {}, { req: opts.req })); + }, + responseMeta(data) { + var _opts$responseMeta; + const meta3 = (_opts$responseMeta = opts.responseMeta) === null || _opts$responseMeta === void 0 ? void 0 : _opts$responseMeta.call(opts, data); + if (meta3 === null || meta3 === void 0 ? void 0 : meta3.headers) { + if (meta3.headers instanceof Headers) for (const [key, value] of meta3.headers.entries()) resHeaders.append(key, value); + else + for (const [key, value] of Object.entries(meta3.headers)) if (Array.isArray(value)) for (const v2 of value) resHeaders.append(key, v2); + else if (typeof value === "string") resHeaders.set(key, value); + } + return { + headers: resHeaders, + status: meta3 === null || meta3 === void 0 ? void 0 : meta3.status + }; + } + })); +} +__name(fetchRequestHandler, "fetchRequestHandler"); + +// ../../node_modules/hono/dist/helper/route/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var matchedRoutes = /* @__PURE__ */ __name((c) => ( + // @ts-expect-error c.req[GET_MATCH_RESULT] is not typed + c.req[GET_MATCH_RESULT][0].map(([[, route]]) => route) +), "matchedRoutes"); +var routePath = /* @__PURE__ */ __name((c, index) => matchedRoutes(c).at(index ?? c.req.routeIndex)?.path ?? "", "routePath"); + +// ../../node_modules/@hono/trpc-server/dist/index.js +var trpcServer = /* @__PURE__ */ __name(({ endpoint, createContext, ...rest }) => { + const bodyProps = /* @__PURE__ */ new Set([ + "arrayBuffer", + "blob", + "formData", + "json", + "text" + ]); + return async (c) => { + const canWithBody = c.req.method === "GET" || c.req.method === "HEAD"; + let resolvedEndpoint = endpoint; + if (!endpoint) { + const path3 = routePath(c); + if (path3) resolvedEndpoint = path3.replace(/\/\*+$/, "") || "/trpc"; + else resolvedEndpoint = "/trpc"; + } + return await fetchRequestHandler({ + ...rest, + createContext: /* @__PURE__ */ __name(async (opts) => ({ + ...createContext ? await createContext(opts, c) : {}, + env: c.env + }), "createContext"), + endpoint: resolvedEndpoint, + req: canWithBody ? c.req.raw : new Proxy(c.req.raw, { get(t8, p, _r) { + if (bodyProps.has(p)) return () => c.req[p](); + return Reflect.get(t8, p, t8); + } }) + }); + }; +}, "trpcServer"); + +// src/dbService.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/sqliteImporter.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../packages/db_helper_sqlite/index.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../packages/db_helper_sqlite/src/db/db_index.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/driver.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_entity(); +init_logger(); +init_relations(); +init_db(); +init_dialect(); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/session.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_entity(); +init_logger(); +init_sql(); +init_sqlite_core(); +init_session(); +init_utils2(); +var SQLiteD1Session = class extends SQLiteSession { + static { + __name(this, "SQLiteD1Session"); + } + constructor(client, dialect, schema, options = {}) { + super(dialect); + this.client = client; + this.schema = schema; + this.options = options; + this.logger = options.logger ?? new NoopLogger(); + this.cache = options.cache ?? new NoopCache(); + } + static [entityKind] = "SQLiteD1Session"; + logger; + cache; + prepareQuery(query, fields, executeMethod, isResponseInArrayMode, customResultMapper, queryMetadata, cacheConfig) { + const stmt = this.client.prepare(query.sql); + return new D1PreparedQuery( + stmt, + query, + this.logger, + this.cache, + queryMetadata, + cacheConfig, + fields, + executeMethod, + isResponseInArrayMode, + customResultMapper + ); + } + async batch(queries) { + const preparedQueries = []; + const builtQueries = []; + for (const query of queries) { + const preparedQuery = query._prepare(); + const builtQuery = preparedQuery.getQuery(); + preparedQueries.push(preparedQuery); + if (builtQuery.params.length > 0) { + builtQueries.push(preparedQuery.stmt.bind(...builtQuery.params)); + } else { + const builtQuery2 = preparedQuery.getQuery(); + builtQueries.push( + this.client.prepare(builtQuery2.sql).bind(...builtQuery2.params) + ); + } + } + const batchResults = await this.client.batch(builtQueries); + return batchResults.map((result, i) => preparedQueries[i].mapResult(result, true)); + } + extractRawAllValueFromBatchResult(result) { + return result.results; + } + extractRawGetValueFromBatchResult(result) { + return result.results[0]; + } + extractRawValuesValueFromBatchResult(result) { + return d1ToRawMapping(result.results); + } + async transaction(transaction, config3) { + const tx = new D1Transaction("async", this.dialect, this, this.schema); + await this.run(sql.raw(`begin${config3?.behavior ? " " + config3.behavior : ""}`)); + try { + const result = await transaction(tx); + await this.run(sql`commit`); + return result; + } catch (err) { + await this.run(sql`rollback`); + throw err; + } + } +}; +var D1Transaction = class _D1Transaction extends SQLiteTransaction { + static { + __name(this, "D1Transaction"); + } + static [entityKind] = "D1Transaction"; + async transaction(transaction) { + const savepointName = `sp${this.nestedIndex}`; + const tx = new _D1Transaction("async", this.dialect, this.session, this.schema, this.nestedIndex + 1); + await this.session.run(sql.raw(`savepoint ${savepointName}`)); + try { + const result = await transaction(tx); + await this.session.run(sql.raw(`release savepoint ${savepointName}`)); + return result; + } catch (err) { + await this.session.run(sql.raw(`rollback to savepoint ${savepointName}`)); + throw err; + } + } +}; +function d1ToRawMapping(results) { + const rows = []; + for (const row of results) { + const entry = Object.keys(row).map((k) => row[k]); + rows.push(entry); + } + return rows; +} +__name(d1ToRawMapping, "d1ToRawMapping"); +var D1PreparedQuery = class extends SQLitePreparedQuery { + static { + __name(this, "D1PreparedQuery"); + } + constructor(stmt, query, logger4, cache2, queryMetadata, cacheConfig, fields, executeMethod, _isResponseInArrayMode, customResultMapper) { + super("async", executeMethod, query, cache2, queryMetadata, cacheConfig); + this.logger = logger4; + this._isResponseInArrayMode = _isResponseInArrayMode; + this.customResultMapper = customResultMapper; + this.fields = fields; + this.stmt = stmt; + } + static [entityKind] = "D1PreparedQuery"; + /** @internal */ + customResultMapper; + /** @internal */ + fields; + /** @internal */ + stmt; + async run(placeholderValues) { + const params = fillPlaceholders(this.query.params, placeholderValues ?? {}); + this.logger.logQuery(this.query.sql, params); + return await this.queryWithCache(this.query.sql, params, async () => { + return this.stmt.bind(...params).run(); + }); + } + async all(placeholderValues) { + const { fields, query, logger: logger4, stmt, customResultMapper } = this; + if (!fields && !customResultMapper) { + const params = fillPlaceholders(query.params, placeholderValues ?? {}); + logger4.logQuery(query.sql, params); + return await this.queryWithCache(query.sql, params, async () => { + return stmt.bind(...params).all().then(({ results }) => this.mapAllResult(results)); + }); + } + const rows = await this.values(placeholderValues); + return this.mapAllResult(rows); + } + mapAllResult(rows, isFromBatch) { + if (isFromBatch) { + rows = d1ToRawMapping(rows.results); + } + if (!this.fields && !this.customResultMapper) { + return rows; + } + if (this.customResultMapper) { + return this.customResultMapper(rows); + } + return rows.map((row) => mapResultRow(this.fields, row, this.joinsNotNullableMap)); + } + async get(placeholderValues) { + const { fields, joinsNotNullableMap, query, logger: logger4, stmt, customResultMapper } = this; + if (!fields && !customResultMapper) { + const params = fillPlaceholders(query.params, placeholderValues ?? {}); + logger4.logQuery(query.sql, params); + return await this.queryWithCache(query.sql, params, async () => { + return stmt.bind(...params).all().then(({ results }) => results[0]); + }); + } + const rows = await this.values(placeholderValues); + if (!rows[0]) { + return void 0; + } + if (customResultMapper) { + return customResultMapper(rows); + } + return mapResultRow(fields, rows[0], joinsNotNullableMap); + } + mapGetResult(result, isFromBatch) { + if (isFromBatch) { + result = d1ToRawMapping(result.results)[0]; + } + if (!this.fields && !this.customResultMapper) { + return result; + } + if (this.customResultMapper) { + return this.customResultMapper([result]); + } + return mapResultRow(this.fields, result, this.joinsNotNullableMap); + } + async values(placeholderValues) { + const params = fillPlaceholders(this.query.params, placeholderValues ?? {}); + this.logger.logQuery(this.query.sql, params); + return await this.queryWithCache(this.query.sql, params, async () => { + return this.stmt.bind(...params).raw(); + }); + } + /** @internal */ + isResponseInArrayMode() { + return this._isResponseInArrayMode; + } +}; + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/driver.js +var DrizzleD1Database = class extends BaseSQLiteDatabase { + static { + __name(this, "DrizzleD1Database"); + } + static [entityKind] = "D1Database"; + async batch(batch) { + return this.session.batch(batch); + } +}; +function drizzle(client, config3 = {}) { + const dialect = new SQLiteAsyncDialect({ casing: config3.casing }); + let logger4; + if (config3.logger === true) { + logger4 = new DefaultLogger(); + } else if (config3.logger !== false) { + logger4 = config3.logger; + } + let schema; + if (config3.schema) { + const tablesConfig = extractTablesRelationalConfig( + config3.schema, + createTableRelationsHelpers + ); + schema = { + fullSchema: config3.schema, + schema: tablesConfig.tables, + tableNamesMap: tablesConfig.tableNamesMap + }; + } + const session = new SQLiteD1Session(client, dialect, schema, { logger: logger4, cache: config3.cache }); + const db3 = new DrizzleD1Database("async", dialect, session, schema); + db3.$client = client; + db3.$cache = config3.cache; + if (db3.$cache) { + db3.$cache["invalidate"] = config3.cache?.onMutate; + } + return db3; +} +__name(drizzle, "drizzle"); + +// ../../packages/db_helper_sqlite/src/db/db_index.ts +init_schema(); +var dbInstance = null; +function initDb(database) { + const base = drizzle(database, { schema: schema_exports }); + dbInstance = Object.assign(base, { + transaction: /* @__PURE__ */ __name(async (handler) => { + return handler(base); + }, "transaction") + }); +} +__name(initDb, "initDb"); +var db = new Proxy({}, { + get(_target, prop) { + if (!dbInstance) { + throw new Error("D1 database not initialized. Call initDb(env.DB) before using db helpers."); + } + return dbInstance[prop]; + } +}); + +// ../../packages/db_helper_sqlite/index.ts +init_schema(); +init_schema(); + +// ../../packages/db_helper_sqlite/src/admin-apis/banner.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +setTimeout(async () => { + const res = await db.select().from(staffUsers); + console.log(res); +}, 5e3); +async function getBanners() { + const banners = await db.query.homeBanners.findMany({ + orderBy: desc(homeBanners.createdAt) + }); + return banners.map((banner) => ({ + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description, + productIds: banner.productIds || [], + redirectUrl: banner.redirectUrl, + serialNum: banner.serialNum, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + })); +} +__name(getBanners, "getBanners"); +async function getBannerById(id) { + const banner = await db.query.homeBanners.findFirst({ + where: eq(homeBanners.id, id) + }); + if (!banner) return null; + return { + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description, + productIds: banner.productIds || [], + redirectUrl: banner.redirectUrl, + serialNum: banner.serialNum, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + }; +} +__name(getBannerById, "getBannerById"); +async function createBanner(input) { + const [banner] = await db.insert(homeBanners).values({ + name: input.name, + imageUrl: input.imageUrl, + description: input.description, + productIds: input.productIds || [], + redirectUrl: input.redirectUrl, + serialNum: input.serialNum, + isActive: input.isActive + }).returning(); + return { + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description, + productIds: banner.productIds || [], + redirectUrl: banner.redirectUrl, + serialNum: banner.serialNum, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + }; +} +__name(createBanner, "createBanner"); +async function updateBanner(id, input) { + const [banner] = await db.update(homeBanners).set({ + ...input, + lastUpdated: /* @__PURE__ */ new Date() + }).where(eq(homeBanners.id, id)).returning(); + return { + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description, + productIds: banner.productIds || [], + redirectUrl: banner.redirectUrl, + serialNum: banner.serialNum, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + }; +} +__name(updateBanner, "updateBanner"); +async function deleteBanner(id) { + await db.delete(homeBanners).where(eq(homeBanners.id, id)); +} +__name(deleteBanner, "deleteBanner"); + +// ../../packages/db_helper_sqlite/src/admin-apis/complaint.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +async function getComplaints(cursor, limit = 20) { + const whereCondition = cursor ? lt(complaints.id, cursor) : void 0; + const complaintsData = await db.select({ + id: complaints.id, + complaintBody: complaints.complaintBody, + userId: complaints.userId, + orderId: complaints.orderId, + isResolved: complaints.isResolved, + response: complaints.response, + createdAt: complaints.createdAt, + images: complaints.images, + userName: users.name, + userMobile: users.mobile + }).from(complaints).leftJoin(users, eq(complaints.userId, users.id)).where(whereCondition).orderBy(desc(complaints.id)).limit(limit + 1); + const hasMore = complaintsData.length > limit; + const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData; + return { + complaints: complaintsToReturn.map((c) => ({ + id: c.id, + complaintBody: c.complaintBody, + userId: c.userId, + orderId: c.orderId, + isResolved: c.isResolved, + response: c.response, + createdAt: c.createdAt, + images: c.images, + userName: c.userName, + userMobile: c.userMobile + })), + hasMore + }; +} +__name(getComplaints, "getComplaints"); +async function resolveComplaint(id, response) { + await db.update(complaints).set({ isResolved: true, response }).where(eq(complaints.id, id)); +} +__name(resolveComplaint, "resolveComplaint"); + +// ../../packages/db_helper_sqlite/src/admin-apis/const.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +async function getAllConstants() { + const constants = await db.select().from(keyValStore); + return constants.map((c) => ({ + key: c.key, + value: c.value + })); +} +__name(getAllConstants, "getAllConstants"); +async function upsertConstants(constants) { + await db.transaction(async (tx) => { + for (const { key, value } of constants) { + await tx.insert(keyValStore).values({ key, value }).onConflictDoUpdate({ + target: keyValStore.key, + set: { value } + }); + } + }); +} +__name(upsertConstants, "upsertConstants"); + +// ../../packages/db_helper_sqlite/src/admin-apis/coupon.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +async function getAllCoupons(cursor, limit = 50, search) { + let whereCondition = void 0; + const conditions = []; + if (cursor) { + conditions.push(lt(coupons.id, cursor)); + } + if (search && search.trim()) { + conditions.push(like(coupons.couponCode, `%${search}%`)); + } + if (conditions.length > 0) { + whereCondition = and(...conditions); + } + const result = await db.query.coupons.findMany({ + where: whereCondition, + with: { + creator: true, + applicableUsers: { + with: { + user: true + } + }, + applicableProducts: { + with: { + product: true + } + } + }, + orderBy: desc(coupons.createdAt), + limit: limit + 1 + }); + const hasMore = result.length > limit; + const couponsList = hasMore ? result.slice(0, limit) : result; + return { coupons: couponsList, hasMore }; +} +__name(getAllCoupons, "getAllCoupons"); +async function getCouponById(id) { + return await db.query.coupons.findFirst({ + where: eq(coupons.id, id), + with: { + creator: true, + applicableUsers: { + with: { + user: true + } + }, + applicableProducts: { + with: { + product: true + } + } + } + }); +} +__name(getCouponById, "getCouponById"); +async function createCouponWithRelations(input, applicableUsers, applicableProducts) { + return await db.transaction(async (tx) => { + const [coupon] = await tx.insert(coupons).values({ + couponCode: input.couponCode, + isUserBased: input.isUserBased, + discountPercent: input.discountPercent, + flatDiscount: input.flatDiscount, + minOrder: input.minOrder, + productIds: input.productIds, + createdBy: input.createdBy, + maxValue: input.maxValue, + isApplyForAll: input.isApplyForAll, + validTill: input.validTill, + maxLimitForUser: input.maxLimitForUser, + exclusiveApply: input.exclusiveApply + }).returning(); + if (applicableUsers && applicableUsers.length > 0) { + await tx.insert(couponApplicableUsers).values( + applicableUsers.map((userId) => ({ + couponId: coupon.id, + userId + })) + ); + } + if (applicableProducts && applicableProducts.length > 0) { + await tx.insert(couponApplicableProducts).values( + applicableProducts.map((productId) => ({ + couponId: coupon.id, + productId + })) + ); + } + return coupon; + }); +} +__name(createCouponWithRelations, "createCouponWithRelations"); +async function updateCouponWithRelations(id, input, applicableUsers, applicableProducts) { + return await db.transaction(async (tx) => { + const [coupon] = await tx.update(coupons).set({ + ...input + }).where(eq(coupons.id, id)).returning(); + if (applicableUsers !== void 0) { + await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.couponId, id)); + if (applicableUsers.length > 0) { + await tx.insert(couponApplicableUsers).values( + applicableUsers.map((userId) => ({ + couponId: id, + userId + })) + ); + } + } + if (applicableProducts !== void 0) { + await tx.delete(couponApplicableProducts).where(eq(couponApplicableProducts.couponId, id)); + if (applicableProducts.length > 0) { + await tx.insert(couponApplicableProducts).values( + applicableProducts.map((productId) => ({ + couponId: id, + productId + })) + ); + } + } + return coupon; + }); +} +__name(updateCouponWithRelations, "updateCouponWithRelations"); +async function invalidateCoupon(id) { + const result = await db.update(coupons).set({ isInvalidated: true }).where(eq(coupons.id, id)).returning(); + return result[0]; +} +__name(invalidateCoupon, "invalidateCoupon"); +async function validateCoupon(code, userId, orderAmount) { + const coupon = await db.query.coupons.findFirst({ + where: and( + eq(coupons.couponCode, code.toUpperCase()), + eq(coupons.isInvalidated, false) + ) + }); + if (!coupon) { + return { valid: false, message: "Coupon not found or invalidated" }; + } + if (coupon.validTill && new Date(coupon.validTill) < /* @__PURE__ */ new Date()) { + return { valid: false, message: "Coupon has expired" }; + } + if (!coupon.isApplyForAll && !coupon.isUserBased) { + return { valid: false, message: "Coupon is not available for use" }; + } + const minOrderValue2 = coupon.minOrder ? parseFloat(coupon.minOrder) : 0; + if (minOrderValue2 > 0 && orderAmount < minOrderValue2) { + return { valid: false, message: `Minimum order amount is ${minOrderValue2}` }; + } + let discountAmount = 0; + if (coupon.discountPercent) { + const percent = parseFloat(coupon.discountPercent); + discountAmount = orderAmount * percent / 100; + } else if (coupon.flatDiscount) { + discountAmount = parseFloat(coupon.flatDiscount); + } + const maxValueLimit = coupon.maxValue ? parseFloat(coupon.maxValue) : 0; + if (maxValueLimit > 0 && discountAmount > maxValueLimit) { + discountAmount = maxValueLimit; + } + return { + valid: true, + discountAmount, + coupon: { + id: coupon.id, + discountPercent: coupon.discountPercent, + flatDiscount: coupon.flatDiscount, + maxValue: coupon.maxValue + } + }; +} +__name(validateCoupon, "validateCoupon"); +async function getReservedCoupons(cursor, limit = 50, search) { + let whereCondition = void 0; + const conditions = []; + if (cursor) { + conditions.push(lt(reservedCoupons.id, cursor)); + } + if (search && search.trim()) { + conditions.push(or( + like(reservedCoupons.secretCode, `%${search}%`), + like(reservedCoupons.couponCode, `%${search}%`) + )); + } + if (conditions.length > 0) { + whereCondition = and(...conditions); + } + const result = await db.query.reservedCoupons.findMany({ + where: whereCondition, + with: { + redeemedUser: true, + creator: true + }, + orderBy: desc(reservedCoupons.createdAt), + limit: limit + 1 + }); + const hasMore = result.length > limit; + const couponsList = hasMore ? result.slice(0, limit) : result; + return { coupons: couponsList, hasMore }; +} +__name(getReservedCoupons, "getReservedCoupons"); +async function createReservedCouponWithProducts(input, applicableProducts) { + return await db.transaction(async (tx) => { + const [coupon] = await tx.insert(reservedCoupons).values({ + secretCode: input.secretCode, + couponCode: input.couponCode, + discountPercent: input.discountPercent, + flatDiscount: input.flatDiscount, + minOrder: input.minOrder, + productIds: input.productIds, + maxValue: input.maxValue, + validTill: input.validTill, + maxLimitForUser: input.maxLimitForUser, + exclusiveApply: input.exclusiveApply, + createdBy: input.createdBy + }).returning(); + if (applicableProducts && applicableProducts.length > 0) { + await tx.insert(couponApplicableProducts).values( + applicableProducts.map((productId) => ({ + couponId: coupon.id, + productId + })) + ); + } + return coupon; + }); +} +__name(createReservedCouponWithProducts, "createReservedCouponWithProducts"); +async function checkUsersExist(userIds) { + const existingUsers = await db.query.users.findMany({ + where: inArray(users.id, userIds), + columns: { id: true } + }); + return existingUsers.length === userIds.length; +} +__name(checkUsersExist, "checkUsersExist"); +async function checkCouponExists(couponCode) { + const existing = await db.query.coupons.findFirst({ + where: eq(coupons.couponCode, couponCode) + }); + return !!existing; +} +__name(checkCouponExists, "checkCouponExists"); +async function checkReservedCouponExists(secretCode) { + const existing = await db.query.reservedCoupons.findFirst({ + where: eq(reservedCoupons.secretCode, secretCode) + }); + return !!existing; +} +__name(checkReservedCouponExists, "checkReservedCouponExists"); +async function generateCancellationCoupon(orderId, staffUserId, userId, orderAmount, couponCode) { + return await db.transaction(async (tx) => { + const expiryDate = /* @__PURE__ */ new Date(); + expiryDate.setDate(expiryDate.getDate() + 30); + const [coupon] = await tx.insert(coupons).values({ + couponCode, + isUserBased: true, + flatDiscount: orderAmount.toString(), + minOrder: orderAmount.toString(), + maxValue: orderAmount.toString(), + validTill: expiryDate, + maxLimitForUser: 1, + createdBy: staffUserId, + isApplyForAll: false + }).returning(); + await tx.insert(couponApplicableUsers).values({ + couponId: coupon.id, + userId + }); + await tx.update(orderStatus).set({ refundCouponId: coupon.id }).where(eq(orderStatus.orderId, orderId)); + return coupon; + }); +} +__name(generateCancellationCoupon, "generateCancellationCoupon"); +async function getOrderWithUser(orderId) { + return await db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + user: true + } + }); +} +__name(getOrderWithUser, "getOrderWithUser"); +async function createCouponForUser(mobile, couponCode, staffUserId) { + return await db.transaction(async (tx) => { + let user = await tx.query.users.findFirst({ + where: eq(users.mobile, mobile) + }); + if (!user) { + const [newUser] = await tx.insert(users).values({ + name: null, + email: null, + mobile + }).returning(); + user = newUser; + } + const [coupon] = await tx.insert(coupons).values({ + couponCode, + isUserBased: true, + discountPercent: "20", + minOrder: "1000", + maxValue: "500", + maxLimitForUser: 1, + isApplyForAll: false, + exclusiveApply: false, + createdBy: staffUserId, + validTill: new Date(Date.now() + 90 * 24 * 60 * 60 * 1e3) + }).returning(); + await tx.insert(couponApplicableUsers).values({ + couponId: coupon.id, + userId: user.id + }); + return { + coupon, + user: { + id: user.id, + mobile: user.mobile, + name: user.name + } + }; + }); +} +__name(createCouponForUser, "createCouponForUser"); +async function getUsersForCoupon(search, limit = 20, offset = 0) { + let whereCondition = void 0; + if (search && search.trim()) { + whereCondition = or( + like(users.name, `%${search}%`), + like(users.mobile, `%${search}%`) + ); + } + const userList = await db.query.users.findMany({ + where: whereCondition, + columns: { + id: true, + name: true, + mobile: true + }, + limit, + offset, + orderBy: asc(users.name) + }); + return { + users: userList.map((user) => ({ + id: user.id, + name: user.name || "Unknown", + mobile: user.mobile + })) + }; +} +__name(getUsersForCoupon, "getUsersForCoupon"); + +// ../../packages/db_helper_sqlite/src/admin-apis/order.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +var isPaymentStatus = /* @__PURE__ */ __name((value) => value === "pending" || value === "success" || value === "cod" || value === "failed", "isPaymentStatus"); +var isRefundStatus = /* @__PURE__ */ __name((value) => value === "success" || value === "pending" || value === "failed" || value === "none" || value === "na" || value === "processed", "isRefundStatus"); +var mapOrderStatusRecord = /* @__PURE__ */ __name((record2) => ({ + id: record2.id, + orderTime: record2.orderTime, + userId: record2.userId, + orderId: record2.orderId, + isPackaged: record2.isPackaged, + isDelivered: record2.isDelivered, + isCancelled: record2.isCancelled, + cancelReason: record2.cancelReason ?? null, + isCancelledByAdmin: record2.isCancelledByAdmin ?? null, + paymentStatus: isPaymentStatus(record2.paymentStatus) ? record2.paymentStatus : "pending", + cancellationUserNotes: record2.cancellationUserNotes ?? null, + cancellationAdminNotes: record2.cancellationAdminNotes ?? null, + cancellationReviewed: record2.cancellationReviewed, + cancellationReviewedAt: record2.cancellationReviewedAt ?? null, + refundCouponId: record2.refundCouponId ?? null +}), "mapOrderStatusRecord"); +async function updateOrderNotes(orderId, adminNotes) { + const [result] = await db.update(orders).set({ adminNotes }).where(eq(orders.id, orderId)).returning(); + return result || null; +} +__name(updateOrderNotes, "updateOrderNotes"); +async function updateOrderPackaged(orderId, isPackaged) { + const orderIdNumber = parseInt(orderId); + await db.update(orderItems).set({ is_packaged: isPackaged }).where(eq(orderItems.orderId, orderIdNumber)); + if (!isPackaged) { + await db.update(orderStatus).set({ isPackaged, isDelivered: false }).where(eq(orderStatus.orderId, orderIdNumber)); + } else { + await db.update(orderStatus).set({ isPackaged }).where(eq(orderStatus.orderId, orderIdNumber)); + } + const order = await db.query.orders.findFirst({ + where: eq(orders.id, orderIdNumber) + }); + return { success: true, userId: order?.userId ?? null }; +} +__name(updateOrderPackaged, "updateOrderPackaged"); +async function updateOrderDelivered(orderId, isDelivered) { + const orderIdNumber = parseInt(orderId); + await db.update(orderStatus).set({ isDelivered }).where(eq(orderStatus.orderId, orderIdNumber)); + const order = await db.query.orders.findFirst({ + where: eq(orders.id, orderIdNumber) + }); + return { success: true, userId: order?.userId ?? null }; +} +__name(updateOrderDelivered, "updateOrderDelivered"); +async function getOrderDetails(orderId) { + const orderData = await db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + user: true, + address: true, + slot: true, + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + }, + payment: true, + paymentInfo: true, + orderStatus: true, + refunds: true + } + }); + if (!orderData) { + return null; + } + const couponUsageData = await db.query.couponUsage.findMany({ + where: eq(couponUsage.orderId, orderData.id), + with: { + coupon: true + } + }); + let couponData = null; + if (couponUsageData.length > 0) { + let totalDiscountAmount = 0; + const orderTotal = parseFloat((orderData.totalAmount ?? "0").toString()); + for (const usage of couponUsageData) { + let discountAmount = 0; + if (usage.coupon.discountPercent) { + discountAmount = orderTotal * parseFloat(usage.coupon.discountPercent.toString()) / 100; + } else if (usage.coupon.flatDiscount) { + discountAmount = parseFloat(usage.coupon.flatDiscount.toString()); + } + if (usage.coupon.maxValue && discountAmount > parseFloat(usage.coupon.maxValue.toString())) { + discountAmount = parseFloat(usage.coupon.maxValue.toString()); + } + totalDiscountAmount += discountAmount; + } + couponData = { + couponCode: couponUsageData.map((u4) => u4.coupon.couponCode).join(", "), + couponDescription: `${couponUsageData.length} coupons applied`, + discountAmount: totalDiscountAmount + }; + } + const statusRecord = orderData.orderStatus?.[0]; + const orderStatusRecord = statusRecord ? mapOrderStatusRecord(statusRecord) : null; + let status = "pending"; + if (orderStatusRecord?.isCancelled) { + status = "cancelled"; + } else if (orderStatusRecord?.isDelivered) { + status = "delivered"; + } + const refund = orderData.refunds?.[0]; + const refundStatus = refund?.refundStatus && isRefundStatus(refund.refundStatus) ? refund.refundStatus : null; + const refundRecord = refund ? { + id: refund.id, + orderId: refund.orderId, + refundAmount: refund.refundAmount, + refundStatus, + merchantRefundId: refund.merchantRefundId, + refundProcessedAt: refund.refundProcessedAt, + createdAt: refund.createdAt + } : null; + return { + id: orderData.id, + readableId: orderData.id, + userId: orderData.user.id, + customerName: `${orderData.user.name}`, + customerEmail: orderData.user.email, + customerMobile: orderData.user.mobile, + address: { + name: orderData.address.name, + line1: orderData.address.addressLine1, + line2: orderData.address.addressLine2, + city: orderData.address.city, + state: orderData.address.state, + pincode: orderData.address.pincode, + phone: orderData.address.phone + }, + slotInfo: orderData.slot ? { + time: orderData.slot.deliveryTime.toISOString(), + sequence: orderData.slot.deliverySequence + } : null, + isCod: orderData.isCod, + isOnlinePayment: orderData.isOnlinePayment, + totalAmount: parseFloat(orderData.totalAmount?.toString() || "0") - parseFloat(orderData.deliveryCharge?.toString() || "0"), + deliveryCharge: parseFloat(orderData.deliveryCharge?.toString() || "0"), + adminNotes: orderData.adminNotes, + userNotes: orderData.userNotes, + createdAt: orderData.createdAt, + status, + isPackaged: orderStatusRecord?.isPackaged || false, + isDelivered: orderStatusRecord?.isDelivered || false, + items: orderData.orderItems.map((item) => ({ + id: item.id, + name: item.product.name, + quantity: item.quantity, + productSize: item.product.productQuantity, + price: item.price, + unit: item.product.unit?.shortNotation, + amount: parseFloat(item.price.toString()) * parseFloat(item.quantity || "0"), + isPackaged: item.is_packaged, + isPackageVerified: item.is_package_verified + })), + payment: orderData.payment ? { + status: orderData.payment.status, + gateway: orderData.payment.gateway, + merchantOrderId: orderData.payment.merchantOrderId + } : null, + paymentInfo: orderData.paymentInfo ? { + status: orderData.paymentInfo.status, + gateway: orderData.paymentInfo.gateway, + merchantOrderId: orderData.paymentInfo.merchantOrderId + } : null, + cancelReason: orderStatusRecord?.cancelReason || null, + cancellationReviewed: orderStatusRecord?.cancellationReviewed || false, + isRefundDone: refundStatus === "processed" || false, + refundStatus, + refundAmount: refund?.refundAmount ? parseFloat(refund.refundAmount.toString()) : null, + couponData, + couponCode: couponData?.couponCode || null, + couponDescription: couponData?.couponDescription || null, + discountAmount: couponData?.discountAmount || null, + orderStatus: orderStatusRecord, + refundRecord, + isFlashDelivery: orderData.isFlashDelivery + }; +} +__name(getOrderDetails, "getOrderDetails"); +async function updateOrderItemPackaging(orderItemId, isPackaged, isPackageVerified) { + const orderItem = await db.query.orderItems.findFirst({ + where: eq(orderItems.id, orderItemId) + }); + if (!orderItem) { + return { success: false, updated: false }; + } + const updateData2 = {}; + if (isPackaged !== void 0) { + updateData2.is_packaged = isPackaged; + } + if (isPackageVerified !== void 0) { + updateData2.is_package_verified = isPackageVerified; + } + await db.update(orderItems).set(updateData2).where(eq(orderItems.id, orderItemId)); + return { success: true, updated: true }; +} +__name(updateOrderItemPackaging, "updateOrderItemPackaging"); +async function removeDeliveryCharge(orderId) { + const order = await db.query.orders.findFirst({ + where: eq(orders.id, orderId) + }); + if (!order) { + return null; + } + const currentDeliveryCharge = parseFloat(order.deliveryCharge?.toString() || "0"); + const currentTotalAmount = parseFloat(order.totalAmount?.toString() || "0"); + const newTotalAmount = currentTotalAmount - currentDeliveryCharge; + await db.update(orders).set({ + deliveryCharge: "0", + totalAmount: newTotalAmount.toString() + }).where(eq(orders.id, orderId)); + return { success: true, message: "Delivery charge removed" }; +} +__name(removeDeliveryCharge, "removeDeliveryCharge"); +async function getSlotOrders(slotId) { + const slotOrders = await db.query.orders.findMany({ + where: eq(orders.slotId, parseInt(slotId)), + with: { + user: true, + address: true, + slot: true, + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + }, + orderStatus: true + } + }); + const filteredOrders = slotOrders.filter((order) => { + const statusRecord = order.orderStatus[0]; + return order.isCod || statusRecord && statusRecord.paymentStatus === "success"; + }); + const formattedOrders = filteredOrders.map((order) => { + const statusRecord = order.orderStatus[0]; + let status = "pending"; + if (statusRecord?.isCancelled) { + status = "cancelled"; + } else if (statusRecord?.isDelivered) { + status = "delivered"; + } + const items = order.orderItems.map((item) => ({ + id: item.id, + name: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat(item.price.toString()), + amount: parseFloat(item.quantity) * parseFloat(item.price.toString()), + unit: item.product.unit?.shortNotation || "", + isPackaged: item.is_packaged, + isPackageVerified: item.is_package_verified + })); + const paymentMode = order.isCod ? "COD" : "Online"; + return { + id: order.id, + readableId: order.id, + customerName: order.user.name || order.user.mobile + "", + address: `${order.address.addressLine1}${order.address.addressLine2 ? `, ${order.address.addressLine2}` : ""}, ${order.address.city}, ${order.address.state} - ${order.address.pincode}, Phone: ${order.address.phone}`, + addressId: order.addressId, + latitude: order.address.adminLatitude ?? order.address.latitude, + longitude: order.address.adminLongitude ?? order.address.longitude, + totalAmount: parseFloat(order.totalAmount), + items, + deliveryTime: order.slot?.deliveryTime.toISOString() || null, + status, + isPackaged: order.orderItems.every((item) => item.is_packaged) || false, + isDelivered: statusRecord?.isDelivered || false, + isCod: order.isCod, + paymentMode, + paymentStatus: isPaymentStatus(statusRecord?.paymentStatus || "pending") ? statusRecord?.paymentStatus || "pending" : "pending", + slotId: order.slotId, + adminNotes: order.adminNotes, + userNotes: order.userNotes + }; + }); + return { success: true, data: formattedOrders }; +} +__name(getSlotOrders, "getSlotOrders"); +async function updateAddressCoords(addressId, latitude, longitude) { + const result = await db.update(addresses).set({ + adminLatitude: latitude, + adminLongitude: longitude + }).where(eq(addresses.id, addressId)).returning(); + return { success: result.length > 0 }; +} +__name(updateAddressCoords, "updateAddressCoords"); +async function getAllOrders(input) { + const { + cursor, + limit, + slotId, + packagedFilter, + deliveredFilter, + cancellationFilter, + flashDeliveryFilter + } = input; + let whereCondition = eq(orders.id, orders.id); + if (cursor) { + whereCondition = and(whereCondition, lt(orders.id, cursor)); + } + if (slotId) { + whereCondition = and(whereCondition, eq(orders.slotId, slotId)); + } + if (packagedFilter === "packaged") { + whereCondition = and(whereCondition, eq(orderStatus.isPackaged, true)); + } else if (packagedFilter === "not_packaged") { + whereCondition = and(whereCondition, eq(orderStatus.isPackaged, false)); + } + if (deliveredFilter === "delivered") { + whereCondition = and(whereCondition, eq(orderStatus.isDelivered, true)); + } else if (deliveredFilter === "not_delivered") { + whereCondition = and(whereCondition, eq(orderStatus.isDelivered, false)); + } + if (cancellationFilter === "cancelled") { + whereCondition = and(whereCondition, eq(orderStatus.isCancelled, true)); + } else if (cancellationFilter === "not_cancelled") { + whereCondition = and(whereCondition, eq(orderStatus.isCancelled, false)); + } + if (flashDeliveryFilter === "flash") { + whereCondition = and(whereCondition, eq(orders.isFlashDelivery, true)); + } else if (flashDeliveryFilter === "regular") { + whereCondition = and(whereCondition, eq(orders.isFlashDelivery, false)); + } + const allOrders = await db.query.orders.findMany({ + where: whereCondition, + orderBy: desc(orders.createdAt), + limit: limit + 1, + with: { + user: true, + address: true, + slot: true, + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + }, + orderStatus: true + } + }); + const hasMore = allOrders.length > limit; + const ordersToReturn = hasMore ? allOrders.slice(0, limit) : allOrders; + const filteredOrders = ordersToReturn.filter((order) => { + const statusRecord = order.orderStatus[0]; + return order.isCod || statusRecord && statusRecord.paymentStatus === "success"; + }); + const formattedOrders = filteredOrders.map((order) => { + const statusRecord = order.orderStatus[0]; + let status = "pending"; + if (statusRecord?.isCancelled) { + status = "cancelled"; + } else if (statusRecord?.isDelivered) { + status = "delivered"; + } + const items = order.orderItems.map((item) => ({ + id: item.id, + name: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat(item.price.toString()), + amount: parseFloat(item.quantity) * parseFloat(item.price.toString()), + unit: item.product.unit?.shortNotation || "", + productSize: item.product.productQuantity, + isPackaged: item.is_packaged, + isPackageVerified: item.is_package_verified + })).sort((first, second) => first.id - second.id); + return { + id: order.id, + orderId: order.id.toString(), + readableId: order.id, + customerName: order.user.name || order.user.mobile + "", + customerMobile: order.user.mobile, + address: `${order.address.addressLine1}${order.address.addressLine2 ? `, ${order.address.addressLine2}` : ""}, ${order.address.city}, ${order.address.state} - ${order.address.pincode}, Phone: ${order.address.phone}`, + addressId: order.addressId, + latitude: order.address.adminLatitude ?? order.address.latitude, + longitude: order.address.adminLongitude ?? order.address.longitude, + totalAmount: parseFloat(order.totalAmount), + deliveryCharge: parseFloat(order.deliveryCharge || "0"), + items, + createdAt: order.createdAt, + deliveryTime: order.slot?.deliveryTime.toISOString() || null, + status, + isPackaged: order.orderItems.every((item) => item.is_packaged) || false, + isDelivered: statusRecord?.isDelivered || false, + isCod: order.isCod, + isFlashDelivery: order.isFlashDelivery, + userNotes: order.userNotes, + adminNotes: order.adminNotes, + userNegativityScore: 0, + userId: order.userId + }; + }); + return { + orders: formattedOrders, + nextCursor: hasMore ? ordersToReturn[ordersToReturn.length - 1].id : void 0 + }; +} +__name(getAllOrders, "getAllOrders"); +async function rebalanceSlots(slotIds) { + const ordersList = await db.query.orders.findMany({ + where: inArray(orders.slotId, slotIds), + with: { + orderItems: { + with: { + product: true + } + }, + couponUsages: { + with: { + coupon: true + } + } + } + }); + const processedOrdersData = ordersList.map((order) => { + let newTotal = order.orderItems.reduce((acc, item) => { + const latestPrice = +item.product.price; + const amount = latestPrice * Number(item.quantity); + return acc + amount; + }, 0); + order.orderItems.forEach((item) => { + item.price = item.product.price; + item.discountedPrice = item.product.price; + }); + const coupon = order.couponUsages[0]?.coupon; + let discount = 0; + if (coupon && !coupon.isInvalidated && (!coupon.validTill || new Date(coupon.validTill) > /* @__PURE__ */ new Date())) { + const proportion = Number(order.orderGroupProportion || 1); + if (coupon.discountPercent) { + const maxDiscount = Number(coupon.maxValue || Infinity) * proportion; + discount = Math.min(newTotal * parseFloat(coupon.discountPercent) / 100, maxDiscount); + } else { + discount = Number(coupon.flatDiscount) * proportion; + } + } + newTotal -= discount; + const { couponUsages, orderItems: orderItemsRaw, ...rest } = order; + const updatedOrderItems = orderItemsRaw.map((item) => { + const { product, ...rawOrderItem } = item; + return rawOrderItem; + }); + return { order: rest, updatedOrderItems, newTotal }; + }); + const updatedOrderIds = []; + await db.transaction(async (tx) => { + for (const { order, updatedOrderItems, newTotal } of processedOrdersData) { + await tx.update(orders).set({ totalAmount: newTotal.toString() }).where(eq(orders.id, order.id)); + updatedOrderIds.push(order.id); + for (const item of updatedOrderItems) { + await tx.update(orderItems).set({ + price: item.price, + discountedPrice: item.discountedPrice + }).where(eq(orderItems.id, item.id)); + } + } + }); + return { + success: true, + updatedOrders: updatedOrderIds, + message: `Rebalanced ${updatedOrderIds.length} orders.` + }; +} +__name(rebalanceSlots, "rebalanceSlots"); +async function cancelOrder(orderId, reason) { + const order = await db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + orderStatus: true + } + }); + if (!order) { + return { success: false, message: "Order not found", error: "order_not_found" }; + } + const status = order.orderStatus[0]; + if (!status) { + return { success: false, message: "Order status not found", error: "status_not_found" }; + } + if (status.isCancelled) { + return { success: false, message: "Order is already cancelled", error: "already_cancelled" }; + } + if (status.isDelivered) { + return { success: false, message: "Cannot cancel delivered order", error: "already_delivered" }; + } + const result = await db.transaction(async (tx) => { + await tx.update(orderStatus).set({ + isCancelled: true, + isCancelledByAdmin: true, + cancelReason: reason, + cancellationAdminNotes: reason, + cancellationReviewed: true, + cancellationReviewedAt: /* @__PURE__ */ new Date() + }).where(eq(orderStatus.id, status.id)); + const refundStatus = order.isCod ? "na" : "pending"; + await tx.insert(refunds).values({ + orderId: order.id, + refundStatus + }); + return { orderId: order.id, userId: order.userId }; + }); + return { + success: true, + message: "Order cancelled successfully", + orderId: result.orderId, + userId: result.userId + }; +} +__name(cancelOrder, "cancelOrder"); + +// ../../packages/db_helper_sqlite/src/admin-apis/product.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +var getStringArray = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) return null; + return value.map((item) => String(item)); +}, "getStringArray"); +var mapUnit = /* @__PURE__ */ __name((unit) => ({ + id: unit.id, + shortNotation: unit.shortNotation, + fullName: unit.fullName +}), "mapUnit"); +var mapStore = /* @__PURE__ */ __name((store) => ({ + id: store.id, + name: store.name, + description: store.description, + imageUrl: store.imageUrl, + owner: store.owner, + createdAt: store.createdAt + // updatedAt: store.createdAt, +}), "mapStore"); +var mapProduct = /* @__PURE__ */ __name((product) => ({ + id: product.id, + name: product.name, + shortDescription: product.shortDescription ?? null, + longDescription: product.longDescription ?? null, + unitId: product.unitId, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null, + images: getStringArray(product.images), + imageKeys: getStringArray(product.images), + isOutOfStock: product.isOutOfStock, + isSuspended: product.isSuspended, + isFlashAvailable: product.isFlashAvailable, + flashPrice: product.flashPrice ? String(product.flashPrice) : null, + createdAt: product.createdAt, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + storeId: product.storeId +}), "mapProduct"); +var mapSpecialDeal = /* @__PURE__ */ __name((deal) => ({ + id: deal.id, + productId: deal.productId, + quantity: String(deal.quantity ?? "0"), + price: String(deal.price ?? "0"), + validTill: deal.validTill +}), "mapSpecialDeal"); +var mapTagInfo = /* @__PURE__ */ __name((tag2) => ({ + id: tag2.id, + tagName: tag2.tagName, + tagDescription: tag2.tagDescription ?? null, + imageUrl: tag2.imageUrl ?? null, + isDashboardTag: tag2.isDashboardTag, + relatedStores: tag2.relatedStores, + createdAt: tag2.createdAt +}), "mapTagInfo"); +async function getAllProducts() { + const products = await db.query.productInfo.findMany({ + orderBy: productInfo.name, + with: { + unit: true, + store: true + } + }); + return products.map((product) => ({ + ...mapProduct(product), + unit: mapUnit(product.unit), + store: product.store ? mapStore(product.store) : null + })); +} +__name(getAllProducts, "getAllProducts"); +async function getProductById(id) { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.id, id), + with: { + unit: true + } + }); + if (!product) { + return null; + } + const deals = await db.query.specialDeals.findMany({ + where: eq(specialDeals.productId, id), + orderBy: specialDeals.quantity + }); + const productTagsData = await db.query.productTags.findMany({ + where: eq(productTags.productId, id), + with: { + tag: true + } + }); + return { + ...mapProduct(product), + unit: mapUnit(product.unit), + deals: deals.map(mapSpecialDeal), + tags: productTagsData.map((tag2) => mapTagInfo(tag2.tag)) + }; +} +__name(getProductById, "getProductById"); +async function deleteProduct(id) { + const [deletedProduct] = await db.delete(productInfo).where(eq(productInfo.id, id)).returning(); + if (!deletedProduct) { + return null; + } + return mapProduct(deletedProduct); +} +__name(deleteProduct, "deleteProduct"); +async function createProduct(input) { + const [product] = await db.insert(productInfo).values(input).returning(); + return mapProduct(product); +} +__name(createProduct, "createProduct"); +async function updateProduct(id, updates) { + const [product] = await db.update(productInfo).set(updates).where(eq(productInfo.id, id)).returning(); + if (!product) { + return null; + } + return mapProduct(product); +} +__name(updateProduct, "updateProduct"); +async function toggleProductOutOfStock(id) { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.id, id) + }); + if (!product) { + return null; + } + const [updatedProduct] = await db.update(productInfo).set({ + isOutOfStock: !product.isOutOfStock + }).where(eq(productInfo.id, id)).returning(); + if (!updatedProduct) { + return null; + } + return mapProduct(updatedProduct); +} +__name(toggleProductOutOfStock, "toggleProductOutOfStock"); +async function updateSlotProducts(slotId, productIds) { + const currentAssociations = await db.query.productSlots.findMany({ + where: eq(productSlots.slotId, parseInt(slotId)), + columns: { + productId: true + } + }); + const currentProductIds = currentAssociations.map((assoc) => assoc.productId); + const newProductIds = productIds.map((id) => parseInt(id)); + const productsToAdd = newProductIds.filter((id) => !currentProductIds.includes(id)); + const productsToRemove = currentProductIds.filter((id) => !newProductIds.includes(id)); + if (productsToRemove.length > 0) { + await db.delete(productSlots).where( + and( + eq(productSlots.slotId, parseInt(slotId)), + inArray(productSlots.productId, productsToRemove) + ) + ); + } + if (productsToAdd.length > 0) { + const newAssociations = productsToAdd.map((productId) => ({ + productId, + slotId: parseInt(slotId) + })); + await db.insert(productSlots).values(newAssociations); + } + return { + message: "Slot products updated successfully", + added: productsToAdd.length, + removed: productsToRemove.length + }; +} +__name(updateSlotProducts, "updateSlotProducts"); +async function getSlotProductIds(slotId) { + const associations = await db.query.productSlots.findMany({ + where: eq(productSlots.slotId, parseInt(slotId)), + columns: { + productId: true + } + }); + return associations.map((assoc) => assoc.productId); +} +__name(getSlotProductIds, "getSlotProductIds"); +async function getAllProductTags() { + const tags = await db.query.productTagInfo.findMany({ + with: { + products: { + with: { + product: true + } + } + } + }); + return tags.map((tag2) => ({ + ...mapTagInfo(tag2), + products: tag2.products.map((assignment) => ({ + productId: assignment.productId, + tagId: assignment.tagId, + assignedAt: assignment.assignedAt, + product: mapProduct(assignment.product) + })) + })); +} +__name(getAllProductTags, "getAllProductTags"); +async function getAllProductTagInfos() { + const tags = await db.query.productTagInfo.findMany({ + orderBy: productTagInfo.tagName + }); + return tags.map(mapTagInfo); +} +__name(getAllProductTagInfos, "getAllProductTagInfos"); +async function getProductTagInfoById(tagId) { + const tag2 = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.id, tagId) + }); + if (!tag2) { + return null; + } + return mapTagInfo(tag2); +} +__name(getProductTagInfoById, "getProductTagInfoById"); +async function createProductTag(input) { + const [tag2] = await db.insert(productTagInfo).values({ + tagName: input.tagName, + tagDescription: input.tagDescription || null, + imageUrl: input.imageUrl || null, + isDashboardTag: input.isDashboardTag || false, + relatedStores: input.relatedStores || [] + }).returning(); + return { + ...mapTagInfo(tag2), + products: [] + }; +} +__name(createProductTag, "createProductTag"); +async function updateProductTag(tagId, input) { + const [tag2] = await db.update(productTagInfo).set({ + ...input.tagName !== void 0 && { tagName: input.tagName }, + ...input.tagDescription !== void 0 && { tagDescription: input.tagDescription }, + ...input.imageUrl !== void 0 && { imageUrl: input.imageUrl }, + ...input.isDashboardTag !== void 0 && { isDashboardTag: input.isDashboardTag }, + ...input.relatedStores !== void 0 && { relatedStores: input.relatedStores } + }).where(eq(productTagInfo.id, tagId)).returning(); + const fullTag = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.id, tagId), + with: { + products: { + with: { + product: true + } + } + } + }); + return { + ...mapTagInfo(tag2), + products: fullTag?.products.map((assignment) => ({ + productId: assignment.productId, + tagId: assignment.tagId, + assignedAt: assignment.assignedAt, + product: mapProduct(assignment.product) + })) || [] + }; +} +__name(updateProductTag, "updateProductTag"); +async function deleteProductTag(tagId) { + await db.delete(productTagInfo).where(eq(productTagInfo.id, tagId)); +} +__name(deleteProductTag, "deleteProductTag"); +async function checkProductTagExistsByName(tagName) { + const tag2 = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.tagName, tagName) + }); + return !!tag2; +} +__name(checkProductTagExistsByName, "checkProductTagExistsByName"); +async function getSlotsProductIds(slotIds) { + if (slotIds.length === 0) { + return {}; + } + const associations = await db.query.productSlots.findMany({ + where: inArray(productSlots.slotId, slotIds), + columns: { + slotId: true, + productId: true + } + }); + const result = {}; + for (const assoc of associations) { + if (!result[assoc.slotId]) { + result[assoc.slotId] = []; + } + result[assoc.slotId].push(assoc.productId); + } + slotIds.forEach((slotId) => { + if (!result[slotId]) { + result[slotId] = []; + } + }); + return result; +} +__name(getSlotsProductIds, "getSlotsProductIds"); +async function getProductReviews(productId, limit, offset) { + const reviews = await db.select({ + id: productReviews.id, + reviewBody: productReviews.reviewBody, + ratings: productReviews.ratings, + imageUrls: productReviews.imageUrls, + reviewTime: productReviews.reviewTime, + adminResponse: productReviews.adminResponse, + adminResponseImages: productReviews.adminResponseImages, + userName: users.name + }).from(productReviews).innerJoin(users, eq(productReviews.userId, users.id)).where(eq(productReviews.productId, productId)).orderBy(desc(productReviews.reviewTime)).limit(limit).offset(offset); + const totalCountResult = await db.select({ count: sql`count(*)` }).from(productReviews).where(eq(productReviews.productId, productId)); + const totalCount = Number(totalCountResult[0].count); + const mappedReviews = reviews.map((review) => ({ + id: review.id, + reviewBody: review.reviewBody, + ratings: review.ratings, + imageUrls: review.imageUrls, + reviewTime: review.reviewTime, + adminResponse: review.adminResponse ?? null, + adminResponseImages: review.adminResponseImages, + userName: review.userName ?? null + })); + return { + reviews: mappedReviews, + totalCount + }; +} +__name(getProductReviews, "getProductReviews"); +async function respondToReview(reviewId, adminResponse, adminResponseImages) { + const [updatedReview] = await db.update(productReviews).set({ + adminResponse, + adminResponseImages + }).where(eq(productReviews.id, reviewId)).returning(); + if (!updatedReview) { + return null; + } + return { + id: updatedReview.id, + reviewBody: updatedReview.reviewBody, + ratings: updatedReview.ratings, + imageUrls: updatedReview.imageUrls, + reviewTime: updatedReview.reviewTime, + adminResponse: updatedReview.adminResponse ?? null, + adminResponseImages: updatedReview.adminResponseImages, + userName: null + }; +} +__name(respondToReview, "respondToReview"); +async function getAllProductGroups() { + const groups = await db.query.productGroupInfo.findMany({ + with: { + memberships: { + with: { + product: true + } + } + }, + orderBy: desc(productGroupInfo.createdAt) + }); + return groups.map((group3) => ({ + id: group3.id, + groupName: group3.groupName, + description: group3.description ?? null, + createdAt: group3.createdAt, + products: group3.memberships.map((membership) => mapProduct(membership.product)), + productCount: group3.memberships.length, + memberships: group3.memberships + })); +} +__name(getAllProductGroups, "getAllProductGroups"); +async function createProductGroup(groupName, description, productIds) { + const [newGroup] = await db.insert(productGroupInfo).values({ + groupName, + description + }).returning(); + if (productIds.length > 0) { + const memberships = productIds.map((productId) => ({ + productId, + groupId: newGroup.id + })); + await db.insert(productGroupMembership).values(memberships); + } + return { + id: newGroup.id, + groupName: newGroup.groupName, + description: newGroup.description ?? null, + createdAt: newGroup.createdAt + }; +} +__name(createProductGroup, "createProductGroup"); +async function updateProductGroup(id, groupName, description, productIds) { + const updateData2 = {}; + if (groupName !== void 0) updateData2.groupName = groupName; + if (description !== void 0) updateData2.description = description; + const [updatedGroup] = await db.update(productGroupInfo).set(updateData2).where(eq(productGroupInfo.id, id)).returning(); + if (!updatedGroup) { + return null; + } + if (productIds !== void 0) { + await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id)); + if (productIds.length > 0) { + const memberships = productIds.map((productId) => ({ + productId, + groupId: id + })); + await db.insert(productGroupMembership).values(memberships); + } + } + return { + id: updatedGroup.id, + groupName: updatedGroup.groupName, + description: updatedGroup.description ?? null, + createdAt: updatedGroup.createdAt + }; +} +__name(updateProductGroup, "updateProductGroup"); +async function deleteProductGroup(id) { + await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id)); + const [deletedGroup] = await db.delete(productGroupInfo).where(eq(productGroupInfo.id, id)).returning(); + if (!deletedGroup) { + return null; + } + return { + id: deletedGroup.id, + groupName: deletedGroup.groupName, + description: deletedGroup.description ?? null, + createdAt: deletedGroup.createdAt + }; +} +__name(deleteProductGroup, "deleteProductGroup"); +async function updateProductPrices(updates) { + if (updates.length === 0) { + return { updatedCount: 0, invalidIds: [] }; + } + const productIds = updates.map((update) => update.productId); + const existingProducts = await db.query.productInfo.findMany({ + where: inArray(productInfo.id, productIds), + columns: { id: true } + }); + const existingIds = new Set(existingProducts.map((product) => product.id)); + const invalidIds = productIds.filter((id) => !existingIds.has(id)); + if (invalidIds.length > 0) { + return { updatedCount: 0, invalidIds }; + } + const updatePromises = updates.map((update) => { + const { productId, price, marketPrice, flashPrice, isFlashAvailable } = update; + const updateData2 = {}; + if (price !== void 0) updateData2.price = price.toString(); + if (marketPrice !== void 0) updateData2.marketPrice = marketPrice === null ? null : marketPrice.toString(); + if (flashPrice !== void 0) updateData2.flashPrice = flashPrice === null ? null : flashPrice.toString(); + if (isFlashAvailable !== void 0) updateData2.isFlashAvailable = isFlashAvailable; + return db.update(productInfo).set(updateData2).where(eq(productInfo.id, productId)); + }); + await Promise.all(updatePromises); + return { updatedCount: updates.length, invalidIds: [] }; +} +__name(updateProductPrices, "updateProductPrices"); +async function checkProductExistsByName(name) { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.name, name), + columns: { id: true } + }); + return !!product; +} +__name(checkProductExistsByName, "checkProductExistsByName"); +async function checkUnitExists(unitId) { + const unit = await db.query.units.findFirst({ + where: eq(units.id, unitId), + columns: { id: true } + }); + return !!unit; +} +__name(checkUnitExists, "checkUnitExists"); +async function getProductImagesById(productId) { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId), + columns: { images: true } + }); + if (!product) { + return null; + } + return getStringArray(product.images) || []; +} +__name(getProductImagesById, "getProductImagesById"); +async function createSpecialDealsForProduct(productId, deals) { + if (deals.length === 0) { + return []; + } + const dealInserts = deals.map((deal) => ({ + productId, + quantity: deal.quantity.toString(), + price: deal.price.toString(), + validTill: new Date(deal.validTill) + })); + const createdDeals = await db.insert(specialDeals).values(dealInserts).returning(); + return createdDeals.map(mapSpecialDeal); +} +__name(createSpecialDealsForProduct, "createSpecialDealsForProduct"); +async function updateProductDeals(productId, deals) { + if (deals.length === 0) { + await db.delete(specialDeals).where(eq(specialDeals.productId, productId)); + return; + } + const existingDeals = await db.query.specialDeals.findMany({ + where: eq(specialDeals.productId, productId) + }); + const existingDealsMap = new Map( + existingDeals.map((deal) => [`${deal.quantity}-${deal.price}`, deal]) + ); + const newDealsMap = new Map( + deals.map((deal) => [`${deal.quantity}-${deal.price}`, deal]) + ); + const dealsToAdd = deals.filter((deal) => { + const key = `${deal.quantity}-${deal.price}`; + return !existingDealsMap.has(key); + }); + const dealsToRemove = existingDeals.filter((deal) => { + const key = `${deal.quantity}-${deal.price}`; + return !newDealsMap.has(key); + }); + const dealsToUpdate = deals.filter((deal) => { + const key = `${deal.quantity}-${deal.price}`; + const existing = existingDealsMap.get(key); + const nextValidTill = deal.validTill instanceof Date ? deal.validTill.toISOString().split("T")[0] : String(deal.validTill); + return existing && existing.validTill.toISOString().split("T")[0] !== nextValidTill; + }); + if (dealsToRemove.length > 0) { + await db.delete(specialDeals).where( + inArray(specialDeals.id, dealsToRemove.map((deal) => deal.id)) + ); + } + if (dealsToAdd.length > 0) { + const dealInserts = dealsToAdd.map((deal) => ({ + productId, + quantity: deal.quantity.toString(), + price: deal.price.toString(), + validTill: new Date(deal.validTill) + })); + await db.insert(specialDeals).values(dealInserts); + } + for (const deal of dealsToUpdate) { + const key = `${deal.quantity}-${deal.price}`; + const existingDeal = existingDealsMap.get(key); + if (existingDeal) { + await db.update(specialDeals).set({ validTill: new Date(deal.validTill) }).where(eq(specialDeals.id, existingDeal.id)); + } + } +} +__name(updateProductDeals, "updateProductDeals"); +async function replaceProductTags(productId, tagIds) { + await db.delete(productTags).where(eq(productTags.productId, productId)); + if (tagIds.length === 0) { + return; + } + const tagAssociations = tagIds.map((tagId) => ({ + productId, + tagId + })); + await db.insert(productTags).values(tagAssociations); +} +__name(replaceProductTags, "replaceProductTags"); + +// ../../packages/db_helper_sqlite/src/admin-apis/slots.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +var getStringArray2 = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) return null; + return value.map((item) => String(item)); +}, "getStringArray"); +var getNumberArray = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) return []; + return value.map((item) => Number(item)); +}, "getNumberArray"); +var mapDeliverySlot = /* @__PURE__ */ __name((slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isFlash: slot.isFlash, + isCapacityFull: slot.isCapacityFull, + deliverySequence: slot.deliverySequence, + groupIds: slot.groupIds +}), "mapDeliverySlot"); +var mapSlotProductSummary = /* @__PURE__ */ __name((product) => ({ + id: product.id, + name: product.name, + images: getStringArray2(product.images) +}), "mapSlotProductSummary"); +var mapVendorSnippet = /* @__PURE__ */ __name((snippet) => ({ + id: snippet.id, + snippetCode: snippet.snippetCode, + slotId: snippet.slotId ?? null, + productIds: snippet.productIds || [], + isPermanent: snippet.isPermanent, + validTill: snippet.validTill ?? null, + createdAt: snippet.createdAt +}), "mapVendorSnippet"); +async function getActiveSlotsWithProducts() { + const slots = await db.query.deliverySlotInfo.findMany({ + where: eq(deliverySlotInfo.isActive, true), + orderBy: desc(deliverySlotInfo.deliveryTime), + with: { + productSlots: { + with: { + product: { + columns: { + id: true, + name: true, + images: true + } + } + } + } + } + }); + return slots.map((slot) => ({ + ...mapDeliverySlot(slot), + deliverySequence: getNumberArray(slot.deliverySequence), + products: slot.productSlots.map((ps) => mapSlotProductSummary(ps.product)) + })); +} +__name(getActiveSlotsWithProducts, "getActiveSlotsWithProducts"); +async function getActiveSlots() { + const slots = await db.query.deliverySlotInfo.findMany({ + where: eq(deliverySlotInfo.isActive, true) + }); + return slots.map(mapDeliverySlot); +} +__name(getActiveSlots, "getActiveSlots"); +async function getSlotsAfterDate(afterDate) { + const slots = await db.query.deliverySlotInfo.findMany({ + where: and( + eq(deliverySlotInfo.isActive, true), + gt(deliverySlotInfo.deliveryTime, afterDate) + ), + orderBy: asc(deliverySlotInfo.deliveryTime) + }); + return slots.map(mapDeliverySlot); +} +__name(getSlotsAfterDate, "getSlotsAfterDate"); +async function getSlotByIdWithRelations(id) { + const slot = await db.query.deliverySlotInfo.findFirst({ + where: eq(deliverySlotInfo.id, id), + with: { + productSlots: { + with: { + product: { + columns: { + id: true, + name: true, + images: true + } + } + } + }, + vendorSnippets: true + } + }); + if (!slot) { + return null; + } + return { + ...mapDeliverySlot(slot), + deliverySequence: getNumberArray(slot.deliverySequence), + groupIds: getNumberArray(slot.groupIds), + products: slot.productSlots.map((ps) => mapSlotProductSummary(ps.product)), + vendorSnippets: slot.vendorSnippets.map(mapVendorSnippet) + }; +} +__name(getSlotByIdWithRelations, "getSlotByIdWithRelations"); +async function createSlotWithRelations(input) { + const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input; + const result = await db.transaction(async (tx) => { + const [newSlot] = await tx.insert(deliverySlotInfo).values({ + deliveryTime: new Date(deliveryTime), + freezeTime: new Date(freezeTime), + isActive: isActive !== void 0 ? isActive : true, + groupIds: groupIds !== void 0 ? groupIds : [] + }).returning(); + if (productIds && productIds.length > 0) { + const associations = productIds.map((productId) => ({ + productId, + slotId: newSlot.id + })); + await tx.insert(productSlots).values(associations); + } + let createdSnippets = []; + if (snippets && snippets.length > 0) { + for (const snippet of snippets) { + const products = await tx.query.productInfo.findMany({ + where: inArray(productInfo.id, snippet.productIds) + }); + if (products.length !== snippet.productIds.length) { + throw new Error(`One or more invalid product IDs in snippet "${snippet.name}"`); + } + const existingSnippet = await tx.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.snippetCode, snippet.name) + }); + if (existingSnippet) { + throw new Error(`Snippet name "${snippet.name}" already exists`); + } + const [createdSnippet] = await tx.insert(vendorSnippets).values({ + snippetCode: snippet.name, + slotId: newSlot.id, + productIds: snippet.productIds, + validTill: snippet.validTill ? new Date(snippet.validTill) : void 0 + }).returning(); + createdSnippets.push(mapVendorSnippet(createdSnippet)); + } + } + return { + slot: mapDeliverySlot(newSlot), + createdSnippets, + message: "Slot created successfully" + }; + }); + return result; +} +__name(createSlotWithRelations, "createSlotWithRelations"); +async function updateSlotWithRelations(input) { + const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input; + let validGroupIds = groupIds; + if (groupIds && groupIds.length > 0) { + const existingGroups = await db.query.productGroupInfo.findMany({ + where: inArray(productGroupInfo.id, groupIds), + columns: { id: true } + }); + validGroupIds = existingGroups.map((group3) => group3.id); + } + const result = await db.transaction(async (tx) => { + const [updatedSlot] = await tx.update(deliverySlotInfo).set({ + deliveryTime: new Date(deliveryTime), + freezeTime: new Date(freezeTime), + isActive: isActive !== void 0 ? isActive : true, + groupIds: validGroupIds !== void 0 ? validGroupIds : [] + }).where(eq(deliverySlotInfo.id, id)).returning(); + if (!updatedSlot) { + return null; + } + if (productIds !== void 0) { + await tx.delete(productSlots).where(eq(productSlots.slotId, id)); + if (productIds.length > 0) { + const associations = productIds.map((productId) => ({ + productId, + slotId: id + })); + await tx.insert(productSlots).values(associations); + } + } + let createdSnippets = []; + if (snippets && snippets.length > 0) { + for (const snippet of snippets) { + const products = await tx.query.productInfo.findMany({ + where: inArray(productInfo.id, snippet.productIds) + }); + if (products.length !== snippet.productIds.length) { + throw new Error(`One or more invalid product IDs in snippet "${snippet.name}"`); + } + const existingSnippet = await tx.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.snippetCode, snippet.name) + }); + if (existingSnippet) { + throw new Error(`Snippet name "${snippet.name}" already exists`); + } + const [createdSnippet] = await tx.insert(vendorSnippets).values({ + snippetCode: snippet.name, + slotId: id, + productIds: snippet.productIds, + validTill: snippet.validTill ? new Date(snippet.validTill) : void 0 + }).returning(); + createdSnippets.push(mapVendorSnippet(createdSnippet)); + } + } + return { + slot: mapDeliverySlot(updatedSlot), + createdSnippets, + message: "Slot updated successfully" + }; + }); + return result; +} +__name(updateSlotWithRelations, "updateSlotWithRelations"); +async function deleteSlotById(id) { + const [deletedSlot] = await db.update(deliverySlotInfo).set({ isActive: false }).where(eq(deliverySlotInfo.id, id)).returning(); + if (!deletedSlot) { + return null; + } + return mapDeliverySlot(deletedSlot); +} +__name(deleteSlotById, "deleteSlotById"); +async function getSlotDeliverySequence(slotId) { + const slot = await db.query.deliverySlotInfo.findFirst({ + where: eq(deliverySlotInfo.id, slotId) + }); + if (!slot) { + return null; + } + return mapDeliverySlot(slot); +} +__name(getSlotDeliverySequence, "getSlotDeliverySequence"); +async function updateSlotDeliverySequence(slotId, sequence) { + const [updatedSlot] = await db.update(deliverySlotInfo).set({ deliverySequence: sequence }).where(eq(deliverySlotInfo.id, slotId)).returning({ + id: deliverySlotInfo.id, + deliverySequence: deliverySlotInfo.deliverySequence + }); + return updatedSlot || null; +} +__name(updateSlotDeliverySequence, "updateSlotDeliverySequence"); +async function updateSlotCapacity(slotId, isCapacityFull) { + const [updatedSlot] = await db.update(deliverySlotInfo).set({ isCapacityFull }).where(eq(deliverySlotInfo.id, slotId)).returning(); + if (!updatedSlot) { + return null; + } + return { + success: true, + slot: mapDeliverySlot(updatedSlot), + message: `Slot ${isCapacityFull ? "marked as full capacity" : "capacity reset"}` + }; +} +__name(updateSlotCapacity, "updateSlotCapacity"); + +// ../../packages/db_helper_sqlite/src/admin-apis/staff-user.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +async function getStaffUserByName(name) { + const staff = await db.query.staffUsers.findFirst({ + where: eq(staffUsers.name, name) + }); + return staff || null; +} +__name(getStaffUserByName, "getStaffUserByName"); +async function getStaffUserById(staffId) { + const staff = await db.query.staffUsers.findFirst({ + where: eq(staffUsers.id, staffId) + }); + return staff || null; +} +__name(getStaffUserById, "getStaffUserById"); +async function getAllStaff() { + const staff = await db.query.staffUsers.findMany({ + columns: { + id: true, + name: true + }, + with: { + role: { + with: { + rolePermissions: { + with: { + permission: true + } + } + } + } + } + }); + return staff; +} +__name(getAllStaff, "getAllStaff"); +async function getAllUsers(cursor, limit = 20, search) { + let whereCondition = void 0; + if (search) { + whereCondition = or( + like(users.name, `%${search}%`), + like(users.email, `%${search}%`), + like(users.mobile, `%${search}%`) + ); + } + if (cursor) { + const cursorCondition = lt(users.id, cursor); + whereCondition = whereCondition ? and(whereCondition, cursorCondition) : cursorCondition; + } + const allUsers = await db.query.users.findMany({ + where: whereCondition, + with: { + userDetails: true + }, + orderBy: desc(users.id), + limit: limit + 1 + }); + const hasMore = allUsers.length > limit; + const usersToReturn = hasMore ? allUsers.slice(0, limit) : allUsers; + return { users: usersToReturn, hasMore }; +} +__name(getAllUsers, "getAllUsers"); +async function getUserWithDetails(userId) { + const user = await db.query.users.findFirst({ + where: eq(users.id, userId), + with: { + userDetails: true, + orders: { + orderBy: desc(orders.createdAt), + limit: 1 + } + } + }); + return user || null; +} +__name(getUserWithDetails, "getUserWithDetails"); +async function checkStaffUserExists(name) { + const existingUser = await db.query.staffUsers.findFirst({ + where: eq(staffUsers.name, name) + }); + return !!existingUser; +} +__name(checkStaffUserExists, "checkStaffUserExists"); +async function checkStaffRoleExists(roleId) { + const role = await db.query.staffRoles.findFirst({ + where: eq(staffRoles.id, roleId) + }); + return !!role; +} +__name(checkStaffRoleExists, "checkStaffRoleExists"); +async function createStaffUser(name, password, roleId) { + const [newUser] = await db.insert(staffUsers).values({ + name: name.trim(), + password, + staffRoleId: roleId + }).returning(); + return { + id: newUser.id, + name: newUser.name, + password: newUser.password, + staffRoleId: newUser.staffRoleId, + createdAt: newUser.createdAt + }; +} +__name(createStaffUser, "createStaffUser"); +async function getAllRoles() { + const roles = await db.query.staffRoles.findMany({ + columns: { + id: true, + roleName: true + } + }); + return roles; +} +__name(getAllRoles, "getAllRoles"); + +// ../../packages/db_helper_sqlite/src/admin-apis/store.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +async function getAllStores() { + const stores = await db.query.storeInfo.findMany({ + with: { + owner: true + } + }); + return stores; +} +__name(getAllStores, "getAllStores"); +async function getStoreById(id) { + const store = await db.query.storeInfo.findFirst({ + where: eq(storeInfo.id, id), + with: { + owner: true + } + }); + return store || null; +} +__name(getStoreById, "getStoreById"); +async function createStore(input, products) { + const [newStore] = await db.insert(storeInfo).values({ + name: input.name, + description: input.description, + imageUrl: input.imageUrl, + owner: input.owner + }).returning(); + if (products && products.length > 0) { + await db.update(productInfo).set({ storeId: newStore.id }).where(inArray(productInfo.id, products)); + } + return { + id: newStore.id, + name: newStore.name, + description: newStore.description, + imageUrl: newStore.imageUrl, + owner: newStore.owner, + createdAt: newStore.createdAt + // updatedAt: newStore.updatedAt, + }; +} +__name(createStore, "createStore"); +async function updateStore(id, input, products) { + const [updatedStore] = await db.update(storeInfo).set({ + ...input + // updatedAt: new Date(), + }).where(eq(storeInfo.id, id)).returning(); + if (!updatedStore) { + throw new Error("Store not found"); + } + if (products !== void 0) { + await db.update(productInfo).set({ storeId: null }).where(eq(productInfo.storeId, id)); + if (products.length > 0) { + await db.update(productInfo).set({ storeId: id }).where(inArray(productInfo.id, products)); + } + } + return { + id: updatedStore.id, + name: updatedStore.name, + description: updatedStore.description, + imageUrl: updatedStore.imageUrl, + owner: updatedStore.owner, + createdAt: updatedStore.createdAt + // updatedAt: updatedStore.updatedAt, + }; +} +__name(updateStore, "updateStore"); +async function deleteStore(id) { + return await db.transaction(async (tx) => { + await tx.update(productInfo).set({ storeId: null }).where(eq(productInfo.storeId, id)); + const [deletedStore] = await tx.delete(storeInfo).where(eq(storeInfo.id, id)).returning(); + if (!deletedStore) { + throw new Error("Store not found"); + } + return { + message: "Store deleted successfully" + }; + }); +} +__name(deleteStore, "deleteStore"); + +// ../../packages/db_helper_sqlite/src/admin-apis/user.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +async function createUserByMobile(mobile) { + const [newUser] = await db.insert(users).values({ + name: null, + email: null, + mobile + }).returning(); + return newUser; +} +__name(createUserByMobile, "createUserByMobile"); +async function getUserByMobile(mobile) { + const [existingUser] = await db.select().from(users).where(eq(users.mobile, mobile)).limit(1); + return existingUser || null; +} +__name(getUserByMobile, "getUserByMobile"); +async function getUnresolvedComplaintsCount() { + const result = await db.select({ count: count3(complaints.id) }).from(complaints).where(eq(complaints.isResolved, false)); + return result[0]?.count || 0; +} +__name(getUnresolvedComplaintsCount, "getUnresolvedComplaintsCount"); +async function getAllUsersWithFilters(limit, cursor, search) { + const whereConditions = []; + if (search && search.trim()) { + whereConditions.push(sql`${users.mobile} LIKE ${`%${search.trim()}%`}`); + } + if (cursor) { + whereConditions.push(sql`${users.id} > ${cursor}`); + } + const usersList = await db.select({ + id: users.id, + name: users.name, + mobile: users.mobile, + createdAt: users.createdAt + }).from(users).where(whereConditions.length > 0 ? sql.join(whereConditions, sql` AND `) : void 0).orderBy(asc(users.id)).limit(limit + 1); + const hasMore = usersList.length > limit; + const usersToReturn = hasMore ? usersList.slice(0, limit) : usersList; + return { users: usersToReturn, hasMore }; +} +__name(getAllUsersWithFilters, "getAllUsersWithFilters"); +async function getOrderCountsByUserIds(userIds) { + if (userIds.length === 0) return []; + return await db.select({ + userId: orders.userId, + totalOrders: count3(orders.id) + }).from(orders).where(sql`${orders.userId} IN (${sql.join(userIds, sql`, `)})`).groupBy(orders.userId); +} +__name(getOrderCountsByUserIds, "getOrderCountsByUserIds"); +async function getLastOrdersByUserIds(userIds) { + if (userIds.length === 0) return []; + return await db.select({ + userId: orders.userId, + lastOrderDate: max(orders.createdAt) + }).from(orders).where(sql`${orders.userId} IN (${sql.join(userIds, sql`, `)})`).groupBy(orders.userId); +} +__name(getLastOrdersByUserIds, "getLastOrdersByUserIds"); +async function getSuspensionStatusesByUserIds(userIds) { + if (userIds.length === 0) return []; + return await db.select({ + userId: userDetails.userId, + isSuspended: userDetails.isSuspended + }).from(userDetails).where(sql`${userDetails.userId} IN (${sql.join(userIds, sql`, `)})`); +} +__name(getSuspensionStatusesByUserIds, "getSuspensionStatusesByUserIds"); +async function getUserBasicInfo(userId) { + const user = await db.select({ + id: users.id, + name: users.name, + mobile: users.mobile, + createdAt: users.createdAt + }).from(users).where(eq(users.id, userId)).limit(1); + return user[0] || null; +} +__name(getUserBasicInfo, "getUserBasicInfo"); +async function getUserSuspensionStatus(userId) { + const userDetail = await db.select({ + isSuspended: userDetails.isSuspended + }).from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + return userDetail[0]?.isSuspended ?? false; +} +__name(getUserSuspensionStatus, "getUserSuspensionStatus"); +async function getUserOrders(userId) { + return await db.select({ + id: orders.id, + readableId: orders.readableId, + totalAmount: orders.totalAmount, + createdAt: orders.createdAt, + isFlashDelivery: orders.isFlashDelivery + }).from(orders).where(eq(orders.userId, userId)).orderBy(desc(orders.createdAt)); +} +__name(getUserOrders, "getUserOrders"); +async function getOrderStatusesByOrderIds(orderIds) { + if (orderIds.length === 0) return []; + return await db.select({ + orderId: orderStatus.orderId, + isDelivered: orderStatus.isDelivered, + isCancelled: orderStatus.isCancelled + }).from(orderStatus).where(sql`${orderStatus.orderId} IN (${sql.join(orderIds, sql`, `)})`); +} +__name(getOrderStatusesByOrderIds, "getOrderStatusesByOrderIds"); +async function getItemCountsByOrderIds(orderIds) { + if (orderIds.length === 0) return []; + return await db.select({ + orderId: orderItems.orderId, + itemCount: count3(orderItems.id) + }).from(orderItems).where(sql`${orderItems.orderId} IN (${sql.join(orderIds, sql`, `)})`).groupBy(orderItems.orderId); +} +__name(getItemCountsByOrderIds, "getItemCountsByOrderIds"); +async function upsertUserSuspension(userId, isSuspended) { + const existingDetail = await db.select({ id: userDetails.id }).from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + if (existingDetail.length > 0) { + await db.update(userDetails).set({ isSuspended }).where(eq(userDetails.userId, userId)); + } else { + await db.insert(userDetails).values({ + userId, + isSuspended + }); + } +} +__name(upsertUserSuspension, "upsertUserSuspension"); +async function searchUsers(search) { + if (search && search.trim()) { + return await db.select({ + id: users.id, + name: users.name, + mobile: users.mobile + }).from(users).where(sql`${users.mobile} LIKE ${`%${search.trim()}%`} OR ${users.name} LIKE ${`%${search.trim()}%`}`); + } else { + return await db.select({ + id: users.id, + name: users.name, + mobile: users.mobile + }).from(users); + } +} +__name(searchUsers, "searchUsers"); +async function getAllNotifCreds() { + return await db.select({ userId: notifCreds.userId, token: notifCreds.token }).from(notifCreds); +} +__name(getAllNotifCreds, "getAllNotifCreds"); +async function getAllUnloggedTokens() { + return await db.select({ token: unloggedUserTokens.token }).from(unloggedUserTokens); +} +__name(getAllUnloggedTokens, "getAllUnloggedTokens"); +async function getNotifTokensByUserIds(userIds) { + return await db.select({ token: notifCreds.token }).from(notifCreds).where(inArray(notifCreds.userId, userIds)); +} +__name(getNotifTokensByUserIds, "getNotifTokensByUserIds"); +async function getUserIncidentsWithRelations(userId) { + return await db.query.userIncidents.findMany({ + where: eq(userIncidents.userId, userId), + with: { + order: { + with: { + orderStatus: true + } + }, + addedBy: true + }, + orderBy: desc(userIncidents.dateAdded) + }); +} +__name(getUserIncidentsWithRelations, "getUserIncidentsWithRelations"); +async function createUserIncident(userId, orderId, adminComment, adminUserId, negativityScore) { + const [incident] = await db.insert(userIncidents).values({ + userId, + orderId, + adminComment, + addedBy: adminUserId, + negativityScore + }).returning(); + return incident; +} +__name(createUserIncident, "createUserIncident"); + +// ../../packages/db_helper_sqlite/src/admin-apis/vendor-snippets.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +var mapVendorSnippet2 = /* @__PURE__ */ __name((snippet) => ({ + id: snippet.id, + snippetCode: snippet.snippetCode, + slotId: snippet.slotId ?? null, + productIds: snippet.productIds || [], + isPermanent: snippet.isPermanent, + validTill: snippet.validTill ?? null, + createdAt: snippet.createdAt +}), "mapVendorSnippet"); +var mapDeliverySlot2 = /* @__PURE__ */ __name((slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isFlash: slot.isFlash, + isCapacityFull: slot.isCapacityFull, + deliverySequence: slot.deliverySequence, + groupIds: slot.groupIds +}), "mapDeliverySlot"); +var mapProductSummary = /* @__PURE__ */ __name((product) => ({ + id: product.id, + name: product.name +}), "mapProductSummary"); +async function checkVendorSnippetExists(snippetCode) { + const existingSnippet = await db.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.snippetCode, snippetCode) + }); + return !!existingSnippet; +} +__name(checkVendorSnippetExists, "checkVendorSnippetExists"); +async function getVendorSnippetById(id) { + const snippet = await db.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.id, id), + with: { + slot: true + } + }); + if (!snippet) { + return null; + } + return { + ...mapVendorSnippet2(snippet), + slot: snippet.slot ? mapDeliverySlot2(snippet.slot) : null + }; +} +__name(getVendorSnippetById, "getVendorSnippetById"); +async function getVendorSnippetByCode(snippetCode) { + const snippet = await db.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.snippetCode, snippetCode) + }); + return snippet ? mapVendorSnippet2(snippet) : null; +} +__name(getVendorSnippetByCode, "getVendorSnippetByCode"); +async function getAllVendorSnippets() { + const snippets = await db.query.vendorSnippets.findMany({ + with: { + slot: true + }, + orderBy: desc(vendorSnippets.createdAt) + }); + return snippets.map((snippet) => ({ + ...mapVendorSnippet2(snippet), + slot: snippet.slot ? mapDeliverySlot2(snippet.slot) : null + })); +} +__name(getAllVendorSnippets, "getAllVendorSnippets"); +async function createVendorSnippet(input) { + const [result] = await db.insert(vendorSnippets).values({ + snippetCode: input.snippetCode, + slotId: input.slotId, + productIds: input.productIds, + isPermanent: input.isPermanent, + validTill: input.validTill + }).returning(); + return mapVendorSnippet2(result); +} +__name(createVendorSnippet, "createVendorSnippet"); +async function updateVendorSnippet(id, updates) { + const [result] = await db.update(vendorSnippets).set(updates).where(eq(vendorSnippets.id, id)).returning(); + return result ? mapVendorSnippet2(result) : null; +} +__name(updateVendorSnippet, "updateVendorSnippet"); +async function deleteVendorSnippet(id) { + const [result] = await db.delete(vendorSnippets).where(eq(vendorSnippets.id, id)).returning(); + return result ? mapVendorSnippet2(result) : null; +} +__name(deleteVendorSnippet, "deleteVendorSnippet"); +async function getProductsByIds(productIds) { + const products = await db.query.productInfo.findMany({ + where: inArray(productInfo.id, productIds), + columns: { id: true, name: true } + }); + const prods = products.map(mapProductSummary); + return prods; +} +__name(getProductsByIds, "getProductsByIds"); +async function getVendorSlotById(slotId) { + const slot = await db.query.deliverySlotInfo.findFirst({ + where: eq(deliverySlotInfo.id, slotId) + }); + return slot ? mapDeliverySlot2(slot) : null; +} +__name(getVendorSlotById, "getVendorSlotById"); +async function getVendorOrdersBySlotId(slotId) { + return await db.query.orders.findMany({ + where: eq(orders.slotId, slotId), + with: { + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + }, + orderStatus: true, + user: true, + slot: true + }, + orderBy: desc(orders.createdAt) + }); +} +__name(getVendorOrdersBySlotId, "getVendorOrdersBySlotId"); +async function getVendorOrders() { + return await db.query.orders.findMany({ + with: { + user: true, + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + } + }, + orderBy: desc(orders.createdAt) + }); +} +__name(getVendorOrders, "getVendorOrders"); +async function updateVendorOrderItemPackaging(orderItemId, isPackaged) { + const orderItem = await db.query.orderItems.findFirst({ + where: eq(orderItems.id, orderItemId), + with: { + order: { + with: { + slot: true + } + } + } + }); + if (!orderItem) { + return { success: false, message: "Order item not found" }; + } + if (!orderItem.order.slotId) { + return { success: false, message: "Order item not associated with a vendor slot" }; + } + const snippetExists = await db.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.slotId, orderItem.order.slotId) + }); + if (!snippetExists) { + return { success: false, message: "No vendor snippet found for this order's slot" }; + } + const [updatedItem] = await db.update(orderItems).set({ + is_packaged: isPackaged + }).where(eq(orderItems.id, orderItemId)).returning({ id: orderItems.id }); + if (!updatedItem) { + return { success: false, message: "Failed to update packaging status" }; + } + return { success: true, orderItemId, is_packaged: isPackaged }; +} +__name(updateVendorOrderItemPackaging, "updateVendorOrderItemPackaging"); + +// ../../packages/db_helper_sqlite/src/user-apis/address.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +var mapUserAddress = /* @__PURE__ */ __name((address) => ({ + id: address.id, + userId: address.userId, + name: address.name, + phone: address.phone, + addressLine1: address.addressLine1, + addressLine2: address.addressLine2 ?? null, + city: address.city, + state: address.state, + pincode: address.pincode, + isDefault: address.isDefault, + latitude: address.latitude ?? null, + longitude: address.longitude ?? null, + googleMapsUrl: address.googleMapsUrl ?? null, + adminLatitude: address.adminLatitude ?? null, + adminLongitude: address.adminLongitude ?? null, + zoneId: address.zoneId ?? null, + createdAt: address.createdAt +}), "mapUserAddress"); +async function getDefaultAddress(userId) { + const [defaultAddress] = await db.select().from(addresses).where(and(eq(addresses.userId, userId), eq(addresses.isDefault, true))).limit(1); + return defaultAddress ? mapUserAddress(defaultAddress) : null; +} +__name(getDefaultAddress, "getDefaultAddress"); +async function getUserAddresses(userId) { + const userAddresses = await db.select().from(addresses).where(eq(addresses.userId, userId)); + return userAddresses.map(mapUserAddress); +} +__name(getUserAddresses, "getUserAddresses"); +async function getUserAddressById(userId, addressId) { + const [address] = await db.select().from(addresses).where(and(eq(addresses.id, addressId), eq(addresses.userId, userId))).limit(1); + return address ? mapUserAddress(address) : null; +} +__name(getUserAddressById, "getUserAddressById"); +async function clearDefaultAddress(userId) { + await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId)); +} +__name(clearDefaultAddress, "clearDefaultAddress"); +async function createUserAddress(input) { + const [newAddress] = await db.insert(addresses).values({ + userId: input.userId, + name: input.name, + phone: input.phone, + addressLine1: input.addressLine1, + addressLine2: input.addressLine2, + city: input.city, + state: input.state, + pincode: input.pincode, + isDefault: input.isDefault, + latitude: input.latitude, + longitude: input.longitude, + googleMapsUrl: input.googleMapsUrl + }).returning(); + return mapUserAddress(newAddress); +} +__name(createUserAddress, "createUserAddress"); +async function updateUserAddress(input) { + const [updatedAddress] = await db.update(addresses).set({ + name: input.name, + phone: input.phone, + addressLine1: input.addressLine1, + addressLine2: input.addressLine2, + city: input.city, + state: input.state, + pincode: input.pincode, + isDefault: input.isDefault, + googleMapsUrl: input.googleMapsUrl, + latitude: input.latitude, + longitude: input.longitude + }).where(and(eq(addresses.id, input.addressId), eq(addresses.userId, input.userId))).returning(); + return updatedAddress ? mapUserAddress(updatedAddress) : null; +} +__name(updateUserAddress, "updateUserAddress"); +async function deleteUserAddress(userId, addressId) { + const [deleted] = await db.delete(addresses).where(and(eq(addresses.id, addressId), eq(addresses.userId, userId))).returning({ id: addresses.id }); + return !!deleted; +} +__name(deleteUserAddress, "deleteUserAddress"); +async function hasOngoingOrdersForAddress(addressId) { + const ongoingOrders = await db.select({ + orderId: orders.id + }).from(orders).innerJoin(orderStatus, eq(orders.id, orderStatus.orderId)).innerJoin(deliverySlotInfo, eq(orders.slotId, deliverySlotInfo.id)).where(and( + eq(orders.addressId, addressId), + eq(orderStatus.isCancelled, false), + gte(deliverySlotInfo.deliveryTime, /* @__PURE__ */ new Date()) + )).limit(1); + return ongoingOrders.length > 0; +} +__name(hasOngoingOrdersForAddress, "hasOngoingOrdersForAddress"); + +// ../../packages/db_helper_sqlite/src/user-apis/banners.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +var mapBanner = /* @__PURE__ */ __name((banner) => ({ + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description ?? null, + productIds: banner.productIds ?? null, + redirectUrl: banner.redirectUrl ?? null, + serialNum: banner.serialNum ?? null, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated +}), "mapBanner"); +async function getActiveBanners() { + const banners = await db.query.homeBanners.findMany({ + where: isNotNull(homeBanners.serialNum), + orderBy: asc(homeBanners.serialNum) + }); + return banners.map(mapBanner); +} +__name(getActiveBanners, "getActiveBanners"); + +// ../../packages/db_helper_sqlite/src/user-apis/cart.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +var getStringArray3 = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) return []; + return value.map((item) => String(item)); +}, "getStringArray"); +async function getCartItemsWithProducts(userId) { + const cartItemsWithProducts = await db.select({ + cartId: cartItems.id, + productId: productInfo.id, + productName: productInfo.name, + productPrice: productInfo.price, + productImages: productInfo.images, + productQuantity: productInfo.productQuantity, + isOutOfStock: productInfo.isOutOfStock, + unitShortNotation: units.shortNotation, + quantity: cartItems.quantity, + addedAt: cartItems.addedAt + }).from(cartItems).innerJoin(productInfo, eq(cartItems.productId, productInfo.id)).innerJoin(units, eq(productInfo.unitId, units.id)).where(eq(cartItems.userId, userId)); + return cartItemsWithProducts.map((item) => { + const priceValue = item.productPrice ?? "0"; + const quantityValue = item.quantity ?? "0"; + return { + id: item.cartId, + productId: item.productId, + quantity: parseFloat(quantityValue), + addedAt: item.addedAt, + product: { + id: item.productId, + name: item.productName, + price: priceValue.toString(), + productQuantity: item.productQuantity, + unit: item.unitShortNotation, + isOutOfStock: item.isOutOfStock, + images: getStringArray3(item.productImages) + }, + subtotal: parseFloat(priceValue.toString()) * parseFloat(quantityValue) + }; + }); +} +__name(getCartItemsWithProducts, "getCartItemsWithProducts"); +async function getProductById2(productId) { + return db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId) + }); +} +__name(getProductById2, "getProductById"); +async function getCartItemByUserProduct(userId, productId) { + return db.query.cartItems.findFirst({ + where: and(eq(cartItems.userId, userId), eq(cartItems.productId, productId)) + }); +} +__name(getCartItemByUserProduct, "getCartItemByUserProduct"); +async function incrementCartItemQuantity(itemId, quantity) { + await db.update(cartItems).set({ + quantity: sql`${cartItems.quantity} + ${quantity}` + }).where(eq(cartItems.id, itemId)); +} +__name(incrementCartItemQuantity, "incrementCartItemQuantity"); +async function insertCartItem(userId, productId, quantity) { + await db.insert(cartItems).values({ + userId, + productId, + quantity: quantity.toString() + }); +} +__name(insertCartItem, "insertCartItem"); +async function updateCartItemQuantity(userId, itemId, quantity) { + const [updatedItem] = await db.update(cartItems).set({ quantity: quantity.toString() }).where(and(eq(cartItems.id, itemId), eq(cartItems.userId, userId))).returning({ id: cartItems.id }); + return !!updatedItem; +} +__name(updateCartItemQuantity, "updateCartItemQuantity"); +async function deleteCartItem(userId, itemId) { + const [deletedItem] = await db.delete(cartItems).where(and(eq(cartItems.id, itemId), eq(cartItems.userId, userId))).returning({ id: cartItems.id }); + return !!deletedItem; +} +__name(deleteCartItem, "deleteCartItem"); +async function clearUserCart(userId) { + await db.delete(cartItems).where(eq(cartItems.userId, userId)); +} +__name(clearUserCart, "clearUserCart"); + +// ../../packages/db_helper_sqlite/src/user-apis/complaint.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +async function getUserComplaints(userId) { + const userComplaints = await db.select({ + id: complaints.id, + complaintBody: complaints.complaintBody, + response: complaints.response, + isResolved: complaints.isResolved, + createdAt: complaints.createdAt, + orderId: complaints.orderId + }).from(complaints).where(eq(complaints.userId, userId)).orderBy(asc(complaints.createdAt)); + return userComplaints.map((complaint) => ({ + id: complaint.id, + complaintBody: complaint.complaintBody, + response: complaint.response ?? null, + isResolved: complaint.isResolved, + createdAt: complaint.createdAt, + orderId: complaint.orderId ?? null + })); +} +__name(getUserComplaints, "getUserComplaints"); +async function createComplaint(userId, orderId, complaintBody, images) { + await db.insert(complaints).values({ + userId, + orderId, + complaintBody, + images: images || null + }); +} +__name(createComplaint, "createComplaint"); + +// ../../packages/db_helper_sqlite/src/user-apis/stores.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +var getStringArray4 = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) return null; + return value.map((item) => String(item)); +}, "getStringArray"); +async function getStoreSummaries() { + const storesData = await db.select({ + id: storeInfo.id, + name: storeInfo.name, + description: storeInfo.description, + imageUrl: storeInfo.imageUrl, + productCount: sql`count(${productInfo.id})`.as("productCount") + }).from(storeInfo).leftJoin( + productInfo, + and(eq(productInfo.storeId, storeInfo.id), eq(productInfo.isSuspended, false)) + ).groupBy(storeInfo.id); + const storesWithDetails = await Promise.all( + storesData.map(async (store) => { + const sampleProducts = await db.select({ + id: productInfo.id, + name: productInfo.name, + images: productInfo.images + }).from(productInfo).where(and(eq(productInfo.storeId, store.id), eq(productInfo.isSuspended, false))).limit(3); + return { + id: store.id, + name: store.name, + description: store.description ?? null, + imageUrl: store.imageUrl ?? null, + productCount: store.productCount || 0, + sampleProducts: sampleProducts.map((product) => ({ + id: product.id, + name: product.name, + images: getStringArray4(product.images) + })) + }; + }) + ); + return storesWithDetails; +} +__name(getStoreSummaries, "getStoreSummaries"); +async function getStoreDetail(storeId) { + const storeData = await db.query.storeInfo.findFirst({ + where: eq(storeInfo.id, storeId), + columns: { + id: true, + name: true, + description: true, + imageUrl: true + } + }); + if (!storeData) { + return null; + } + const productsData = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + price: productInfo.price, + marketPrice: productInfo.marketPrice, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + incrementStep: productInfo.incrementStep, + unitShortNotation: units.shortNotation, + productQuantity: productInfo.productQuantity + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)).where(and(eq(productInfo.storeId, storeId), eq(productInfo.isSuspended, false))); + const products = productsData.map((product) => ({ + id: product.id, + name: product.name, + shortDescription: product.shortDescription ?? null, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null, + incrementStep: product.incrementStep, + unit: product.unitShortNotation, + unitNotation: product.unitShortNotation, + images: getStringArray4(product.images), + isOutOfStock: product.isOutOfStock, + productQuantity: product.productQuantity + })); + return { + store: { + id: storeData.id, + name: storeData.name, + description: storeData.description ?? null, + imageUrl: storeData.imageUrl ?? null + }, + products + }; +} +__name(getStoreDetail, "getStoreDetail"); +async function getStoresSummary() { + return db.query.storeInfo.findMany({ + columns: { + id: true, + name: true, + description: true + } + }); +} +__name(getStoresSummary, "getStoresSummary"); + +// ../../packages/db_helper_sqlite/src/user-apis/product.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +var getStringArray5 = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) return null; + return value.map((item) => String(item)); +}, "getStringArray"); +async function getProductDetailById(productId) { + const productData = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + longDescription: productInfo.longDescription, + price: productInfo.price, + marketPrice: productInfo.marketPrice, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + storeId: productInfo.storeId, + unitShortNotation: units.shortNotation, + incrementStep: productInfo.incrementStep, + productQuantity: productInfo.productQuantity, + isFlashAvailable: productInfo.isFlashAvailable, + flashPrice: productInfo.flashPrice + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)).where(eq(productInfo.id, productId)).limit(1); + if (productData.length === 0) { + return null; + } + const product = productData[0]; + const storeData = product.storeId ? await db.query.storeInfo.findFirst({ + where: eq(storeInfo.id, product.storeId), + columns: { id: true, name: true, description: true } + }) : null; + const deliverySlotsData = await db.select({ + id: deliverySlotInfo.id, + deliveryTime: deliverySlotInfo.deliveryTime, + freezeTime: deliverySlotInfo.freezeTime + }).from(productSlots).innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id)).where( + and( + eq(productSlots.productId, productId), + eq(deliverySlotInfo.isActive, true), + eq(deliverySlotInfo.isCapacityFull, false), + gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`), + gt(deliverySlotInfo.freezeTime, sql`CURRENT_TIMESTAMP`) + ) + ).orderBy(deliverySlotInfo.deliveryTime); + const specialDealsData = await db.select({ + quantity: specialDeals.quantity, + price: specialDeals.price, + validTill: specialDeals.validTill + }).from(specialDeals).where( + and( + eq(specialDeals.productId, productId), + gt(specialDeals.validTill, sql`CURRENT_TIMESTAMP`) + ) + ).orderBy(specialDeals.quantity); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription ?? null, + longDescription: product.longDescription ?? null, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null, + unitNotation: product.unitShortNotation, + images: getStringArray5(product.images), + isOutOfStock: product.isOutOfStock, + store: storeData ? { + id: storeData.id, + name: storeData.name, + description: storeData.description ?? null + } : null, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + isFlashAvailable: product.isFlashAvailable, + flashPrice: product.flashPrice?.toString() || null, + deliverySlots: deliverySlotsData, + specialDeals: specialDealsData.map((deal) => ({ + quantity: String(deal.quantity ?? "0"), + price: String(deal.price ?? "0"), + validTill: deal.validTill + })) + }; +} +__name(getProductDetailById, "getProductDetailById"); +async function getProductReviews2(productId, limit, offset) { + const reviews = await db.select({ + id: productReviews.id, + reviewBody: productReviews.reviewBody, + ratings: productReviews.ratings, + imageUrls: productReviews.imageUrls, + reviewTime: productReviews.reviewTime, + userName: users.name + }).from(productReviews).innerJoin(users, eq(productReviews.userId, users.id)).where(eq(productReviews.productId, productId)).orderBy(desc(productReviews.reviewTime)).limit(limit).offset(offset); + const totalCountResult = await db.select({ count: sql`count(*)` }).from(productReviews).where(eq(productReviews.productId, productId)); + const totalCount = Number(totalCountResult[0].count); + const mappedReviews = reviews.map((review) => ({ + id: review.id, + reviewBody: review.reviewBody, + ratings: review.ratings, + imageUrls: getStringArray5(review.imageUrls), + reviewTime: review.reviewTime, + userName: review.userName ?? null + })); + return { + reviews: mappedReviews, + totalCount + }; +} +__name(getProductReviews2, "getProductReviews"); +async function getProductById3(productId) { + return db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId) + }); +} +__name(getProductById3, "getProductById"); +async function createProductReview(userId, productId, reviewBody, ratings, imageUrls) { + const [newReview] = await db.insert(productReviews).values({ + userId, + productId, + reviewBody, + ratings, + imageUrls + }).returning({ + id: productReviews.id, + reviewBody: productReviews.reviewBody, + ratings: productReviews.ratings, + imageUrls: productReviews.imageUrls, + reviewTime: productReviews.reviewTime + }); + return { + id: newReview.id, + reviewBody: newReview.reviewBody, + ratings: newReview.ratings, + imageUrls: getStringArray5(newReview.imageUrls), + reviewTime: newReview.reviewTime, + userName: null + }; +} +__name(createProductReview, "createProductReview"); +async function getAllProductsWithUnits(tagId) { + let productIds = null; + if (tagId) { + const taggedProducts = await db.select({ productId: productTags.productId }).from(productTags).where(eq(productTags.tagId, tagId)); + productIds = taggedProducts.map((tp) => tp.productId); + } + let whereCondition = void 0; + if (productIds && productIds.length > 0) { + whereCondition = inArray(productInfo.id, productIds); + } + const results = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + price: productInfo.price, + marketPrice: productInfo.marketPrice, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + unitShortNotation: units.shortNotation, + productQuantity: productInfo.productQuantity + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)).where(whereCondition); + return results.map((product) => ({ + ...product, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null + })); +} +__name(getAllProductsWithUnits, "getAllProductsWithUnits"); +async function getSuspendedProductIds() { + const suspendedProducts = await db.select({ id: productInfo.id }).from(productInfo).where(eq(productInfo.isSuspended, true)); + return suspendedProducts.map((sp) => sp.id); +} +__name(getSuspendedProductIds, "getSuspendedProductIds"); +async function getNextDeliveryDateWithCapacity(productId) { + const result = await db.select({ deliveryTime: deliverySlotInfo.deliveryTime }).from(productSlots).innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id)).where( + and( + eq(productSlots.productId, productId), + eq(deliverySlotInfo.isActive, true), + eq(deliverySlotInfo.isCapacityFull, false), + gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`) + ) + ).orderBy(deliverySlotInfo.deliveryTime).limit(1); + return result[0]?.deliveryTime || null; +} +__name(getNextDeliveryDateWithCapacity, "getNextDeliveryDateWithCapacity"); + +// ../../packages/db_helper_sqlite/src/user-apis/slots.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +var mapSlot = /* @__PURE__ */ __name((slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isFlash: slot.isFlash, + isCapacityFull: slot.isCapacityFull, + deliverySequence: slot.deliverySequence, + groupIds: slot.groupIds +}), "mapSlot"); +async function getActiveSlotsList() { + const slots = await db.query.deliverySlotInfo.findMany({ + where: eq(deliverySlotInfo.isActive, true), + orderBy: asc(deliverySlotInfo.deliveryTime) + }); + return slots.map(mapSlot); +} +__name(getActiveSlotsList, "getActiveSlotsList"); +async function getProductAvailability() { + const products = await db.select({ + id: productInfo.id, + name: productInfo.name, + isOutOfStock: productInfo.isOutOfStock, + isFlashAvailable: productInfo.isFlashAvailable + }).from(productInfo).where(eq(productInfo.isSuspended, false)); + return products.map((product) => ({ + id: product.id, + name: product.name, + isOutOfStock: product.isOutOfStock, + isFlashAvailable: product.isFlashAvailable + })); +} +__name(getProductAvailability, "getProductAvailability"); + +// ../../packages/db_helper_sqlite/src/user-apis/payments.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +async function getOrderById(orderId) { + return db.query.orders.findFirst({ + where: eq(orders.id, orderId) + }); +} +__name(getOrderById, "getOrderById"); +async function getPaymentByOrderId(orderId) { + return db.query.payments.findFirst({ + where: eq(payments.orderId, orderId) + }); +} +__name(getPaymentByOrderId, "getPaymentByOrderId"); +async function getPaymentByMerchantOrderId(merchantOrderId) { + return db.query.payments.findFirst({ + where: eq(payments.merchantOrderId, merchantOrderId) + }); +} +__name(getPaymentByMerchantOrderId, "getPaymentByMerchantOrderId"); +async function updatePaymentSuccess(merchantOrderId, payload) { + const [updatedPayment] = await db.update(payments).set({ + status: "success", + payload + }).where(eq(payments.merchantOrderId, merchantOrderId)).returning({ + id: payments.id, + orderId: payments.orderId + }); + return updatedPayment || null; +} +__name(updatePaymentSuccess, "updatePaymentSuccess"); +async function updateOrderPaymentStatus(orderId, status) { + await db.update(orderStatus).set({ paymentStatus: status }).where(eq(orderStatus.orderId, orderId)); +} +__name(updateOrderPaymentStatus, "updateOrderPaymentStatus"); +async function markPaymentFailed(paymentId) { + await db.update(payments).set({ status: "failed" }).where(eq(payments.id, paymentId)); +} +__name(markPaymentFailed, "markPaymentFailed"); + +// ../../packages/db_helper_sqlite/src/user-apis/auth.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +async function getUserByEmail(email3) { + const [user] = await db.select().from(users).where(eq(users.email, email3)).limit(1); + return user || null; +} +__name(getUserByEmail, "getUserByEmail"); +async function getUserByMobile2(mobile) { + const [user] = await db.select().from(users).where(eq(users.mobile, mobile)).limit(1); + return user || null; +} +__name(getUserByMobile2, "getUserByMobile"); +async function getUserById(userId) { + const [user] = await db.select().from(users).where(eq(users.id, userId)).limit(1); + return user || null; +} +__name(getUserById, "getUserById"); +async function getUserCreds(userId) { + const [creds] = await db.select().from(userCreds).where(eq(userCreds.userId, userId)).limit(1); + return creds || null; +} +__name(getUserCreds, "getUserCreds"); +async function getUserDetails(userId) { + const [details] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + return details || null; +} +__name(getUserDetails, "getUserDetails"); +async function isUserSuspended(userId) { + const details = await getUserDetails(userId); + return details?.isSuspended ?? false; +} +__name(isUserSuspended, "isUserSuspended"); +async function createUserWithProfile(input) { + return db.transaction(async (tx) => { + const [user] = await tx.insert(users).values({ + name: input.name, + email: input.email, + mobile: input.mobile + }).returning(); + await tx.insert(userCreds).values({ + userId: user.id, + userPassword: input.hashedPassword + }); + await tx.insert(userDetails).values({ + userId: user.id, + profileImage: input.profileImage || null + }); + return user; + }); +} +__name(createUserWithProfile, "createUserWithProfile"); +async function getUserDetailsByUserId(userId) { + const [details] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + return details || null; +} +__name(getUserDetailsByUserId, "getUserDetailsByUserId"); +async function updateUserProfile(userId, data) { + return db.transaction(async (tx) => { + const userUpdate = {}; + if (data.name !== void 0) userUpdate.name = data.name; + if (data.email !== void 0) userUpdate.email = data.email; + if (data.mobile !== void 0) userUpdate.mobile = data.mobile; + if (Object.keys(userUpdate).length > 0) { + await tx.update(users).set(userUpdate).where(eq(users.id, userId)); + } + if (data.hashedPassword) { + await tx.update(userCreds).set({ + userPassword: data.hashedPassword + }).where(eq(userCreds.userId, userId)); + } + const detailsUpdate = {}; + if (data.bio !== void 0) detailsUpdate.bio = data.bio; + if (data.dateOfBirth !== void 0) detailsUpdate.dateOfBirth = data.dateOfBirth; + if (data.gender !== void 0) detailsUpdate.gender = data.gender; + if (data.occupation !== void 0) detailsUpdate.occupation = data.occupation; + if (data.profileImage !== void 0) detailsUpdate.profileImage = data.profileImage; + detailsUpdate.updatedAt = /* @__PURE__ */ new Date(); + const [existingDetails] = await tx.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + if (existingDetails) { + await tx.update(userDetails).set(detailsUpdate).where(eq(userDetails.userId, userId)); + } else { + await tx.insert(userDetails).values({ + userId, + ...detailsUpdate, + createdAt: /* @__PURE__ */ new Date() + }); + } + const [user] = await tx.select().from(users).where(eq(users.id, userId)).limit(1); + return user; + }); +} +__name(updateUserProfile, "updateUserProfile"); +async function createUserWithMobile(mobile) { + const [user] = await db.insert(users).values({ + name: null, + email: null, + mobile + }).returning(); + return user; +} +__name(createUserWithMobile, "createUserWithMobile"); +async function upsertUserPassword(userId, hashedPassword) { + try { + await db.insert(userCreds).values({ + userId, + userPassword: hashedPassword + }); + return; + } catch (error50) { + if (error50.code === "23505") { + await db.update(userCreds).set({ + userPassword: hashedPassword + }).where(eq(userCreds.userId, userId)); + return; + } + throw error50; + } +} +__name(upsertUserPassword, "upsertUserPassword"); +async function deleteUserAccount(userId) { + await db.transaction(async (tx) => { + await tx.delete(notifCreds).where(eq(notifCreds.userId, userId)); + await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.userId, userId)); + await tx.delete(couponUsage).where(eq(couponUsage.userId, userId)); + await tx.delete(complaints).where(eq(complaints.userId, userId)); + await tx.delete(cartItems).where(eq(cartItems.userId, userId)); + await tx.delete(notifications).where(eq(notifications.userId, userId)); + await tx.delete(productReviews).where(eq(productReviews.userId, userId)); + await tx.update(reservedCoupons).set({ redeemedBy: null }).where(eq(reservedCoupons.redeemedBy, userId)); + const userOrders = await tx.select({ id: orders.id }).from(orders).where(eq(orders.userId, userId)); + for (const order of userOrders) { + await tx.delete(orderItems).where(eq(orderItems.orderId, order.id)); + await tx.delete(orderStatus).where(eq(orderStatus.orderId, order.id)); + await tx.delete(payments).where(eq(payments.orderId, order.id)); + await tx.delete(refunds).where(eq(refunds.orderId, order.id)); + await tx.delete(couponUsage).where(eq(couponUsage.orderId, order.id)); + await tx.delete(complaints).where(eq(complaints.orderId, order.id)); + } + await tx.delete(orders).where(eq(orders.userId, userId)); + await tx.delete(addresses).where(eq(addresses.userId, userId)); + await tx.delete(userDetails).where(eq(userDetails.userId, userId)); + await tx.delete(userCreds).where(eq(userCreds.userId, userId)); + await tx.delete(users).where(eq(users.id, userId)); + }); +} +__name(deleteUserAccount, "deleteUserAccount"); + +// ../../packages/db_helper_sqlite/src/user-apis/coupon.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +var mapCoupon = /* @__PURE__ */ __name((coupon) => ({ + id: coupon.id, + couponCode: coupon.couponCode, + isUserBased: coupon.isUserBased, + discountPercent: coupon.discountPercent ? coupon.discountPercent.toString() : null, + flatDiscount: coupon.flatDiscount ? coupon.flatDiscount.toString() : null, + minOrder: coupon.minOrder ? coupon.minOrder.toString() : null, + productIds: coupon.productIds, + maxValue: coupon.maxValue ? coupon.maxValue.toString() : null, + isApplyForAll: coupon.isApplyForAll, + validTill: coupon.validTill ?? null, + maxLimitForUser: coupon.maxLimitForUser ?? null, + isInvalidated: coupon.isInvalidated, + exclusiveApply: coupon.exclusiveApply, + createdAt: coupon.createdAt +}), "mapCoupon"); +var mapUsage = /* @__PURE__ */ __name((usage) => ({ + id: usage.id, + userId: usage.userId, + couponId: usage.couponId, + orderId: usage.orderId ?? null, + orderItemId: usage.orderItemId ?? null, + usedAt: usage.usedAt +}), "mapUsage"); +var mapApplicableUser = /* @__PURE__ */ __name((applicable) => ({ + id: applicable.id, + couponId: applicable.couponId, + userId: applicable.userId +}), "mapApplicableUser"); +var mapApplicableProduct = /* @__PURE__ */ __name((applicable) => ({ + id: applicable.id, + couponId: applicable.couponId, + productId: applicable.productId +}), "mapApplicableProduct"); +var mapCouponWithRelations = /* @__PURE__ */ __name((coupon) => ({ + ...mapCoupon(coupon), + usages: coupon.usages.map(mapUsage), + applicableUsers: coupon.applicableUsers.map(mapApplicableUser), + applicableProducts: coupon.applicableProducts.map(mapApplicableProduct) +}), "mapCouponWithRelations"); +async function getActiveCouponsWithRelations(userId) { + const allCoupons = await db.query.coupons.findMany({ + where: and( + eq(coupons.isInvalidated, false), + or( + isNull(coupons.validTill), + gt(coupons.validTill, /* @__PURE__ */ new Date()) + ) + ), + with: { + usages: { + where: eq(couponUsage.userId, userId) + }, + applicableUsers: true, + applicableProducts: true + } + }); + return allCoupons.map(mapCouponWithRelations); +} +__name(getActiveCouponsWithRelations, "getActiveCouponsWithRelations"); +async function getAllCouponsWithRelations(userId) { + const allCoupons = await db.query.coupons.findMany({ + with: { + usages: { + where: eq(couponUsage.userId, userId) + }, + applicableUsers: true, + applicableProducts: true + } + }); + return allCoupons.map(mapCouponWithRelations); +} +__name(getAllCouponsWithRelations, "getAllCouponsWithRelations"); +async function getReservedCouponByCode(secretCode) { + const reserved = await db.query.reservedCoupons.findFirst({ + where: and( + eq(reservedCoupons.secretCode, secretCode.toUpperCase()), + eq(reservedCoupons.isRedeemed, false) + ) + }); + return reserved || null; +} +__name(getReservedCouponByCode, "getReservedCouponByCode"); +async function redeemReservedCoupon(userId, reservedCoupon) { + const couponResult = await db.transaction(async (tx) => { + const [coupon] = await tx.insert(coupons).values({ + couponCode: reservedCoupon.couponCode, + isUserBased: true, + discountPercent: reservedCoupon.discountPercent, + flatDiscount: reservedCoupon.flatDiscount, + minOrder: reservedCoupon.minOrder, + productIds: reservedCoupon.productIds, + maxValue: reservedCoupon.maxValue, + isApplyForAll: false, + validTill: reservedCoupon.validTill, + maxLimitForUser: reservedCoupon.maxLimitForUser, + exclusiveApply: reservedCoupon.exclusiveApply, + createdBy: reservedCoupon.createdBy + }).returning(); + await tx.insert(couponApplicableUsers).values({ + couponId: coupon.id, + userId + }); + await tx.update(reservedCoupons).set({ + isRedeemed: true, + redeemedBy: userId, + redeemedAt: /* @__PURE__ */ new Date() + }).where(eq(reservedCoupons.id, reservedCoupon.id)); + return coupon; + }); + return mapCoupon(couponResult); +} +__name(redeemReservedCoupon, "redeemReservedCoupon"); + +// ../../packages/db_helper_sqlite/src/user-apis/user.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +async function getUserById2(userId) { + const [user] = await db.select().from(users).where(eq(users.id, userId)).limit(1); + return user || null; +} +__name(getUserById2, "getUserById"); +async function getUserDetailByUserId(userId) { + const [detail] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + return detail || null; +} +__name(getUserDetailByUserId, "getUserDetailByUserId"); +async function getUserWithCreds(userId) { + const result = await db.select().from(users).leftJoin(userCreds, eq(users.id, userCreds.userId)).where(eq(users.id, userId)).limit(1); + if (result.length === 0) return null; + return { + user: result[0].users, + creds: result[0].user_creds + }; +} +__name(getUserWithCreds, "getUserWithCreds"); +async function getNotifCred(userId, token) { + return db.query.notifCreds.findFirst({ + where: and(eq(notifCreds.userId, userId), eq(notifCreds.token, token)) + }); +} +__name(getNotifCred, "getNotifCred"); +async function upsertNotifCred(userId, token) { + const existing = await getNotifCred(userId, token); + if (existing) { + await db.update(notifCreds).set({ lastVerified: /* @__PURE__ */ new Date() }).where(eq(notifCreds.id, existing.id)); + return; + } + await db.insert(notifCreds).values({ + userId, + token, + lastVerified: /* @__PURE__ */ new Date() + }); +} +__name(upsertNotifCred, "upsertNotifCred"); +async function deleteUnloggedToken(token) { + await db.delete(unloggedUserTokens).where(eq(unloggedUserTokens.token, token)); +} +__name(deleteUnloggedToken, "deleteUnloggedToken"); +async function getUnloggedToken(token) { + return db.query.unloggedUserTokens.findFirst({ + where: eq(unloggedUserTokens.token, token) + }); +} +__name(getUnloggedToken, "getUnloggedToken"); +async function upsertUnloggedToken(token) { + const existing = await getUnloggedToken(token); + if (existing) { + await db.update(unloggedUserTokens).set({ lastVerified: /* @__PURE__ */ new Date() }).where(eq(unloggedUserTokens.id, existing.id)); + return; + } + await db.insert(unloggedUserTokens).values({ + token, + lastVerified: /* @__PURE__ */ new Date() + }); +} +__name(upsertUnloggedToken, "upsertUnloggedToken"); + +// ../../packages/db_helper_sqlite/src/user-apis/order.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +async function validateAndGetCoupon(couponId, userId, totalAmount) { + if (!couponId) return null; + const coupon = await db.query.coupons.findFirst({ + where: eq(coupons.id, couponId), + with: { + usages: { where: eq(couponUsage.userId, userId) } + } + }); + if (!coupon) throw new Error("Invalid coupon"); + if (coupon.isInvalidated) throw new Error("Coupon is no longer valid"); + if (coupon.validTill && new Date(coupon.validTill) < /* @__PURE__ */ new Date()) + throw new Error("Coupon has expired"); + if (coupon.maxLimitForUser && coupon.usages.length >= coupon.maxLimitForUser) + throw new Error("Coupon usage limit exceeded"); + if (coupon.minOrder && parseFloat(coupon.minOrder.toString()) > totalAmount) + throw new Error("Order amount does not meet coupon minimum requirement"); + return coupon; +} +__name(validateAndGetCoupon, "validateAndGetCoupon"); +function applyDiscountToOrder(orderTotal, appliedCoupon, proportion) { + let finalOrderTotal = orderTotal; + if (appliedCoupon) { + if (appliedCoupon.discountPercent) { + const discount = Math.min( + orderTotal * parseFloat(appliedCoupon.discountPercent.toString()) / 100, + appliedCoupon.maxValue ? parseFloat(appliedCoupon.maxValue.toString()) * proportion : Infinity + ); + finalOrderTotal -= discount; + } else if (appliedCoupon.flatDiscount) { + const discount = Math.min( + parseFloat(appliedCoupon.flatDiscount.toString()) * proportion, + appliedCoupon.maxValue ? parseFloat(appliedCoupon.maxValue.toString()) * proportion : finalOrderTotal + ); + finalOrderTotal -= discount; + } + } + return { finalOrderTotal, orderGroupProportion: proportion }; +} +__name(applyDiscountToOrder, "applyDiscountToOrder"); +async function getAddressByIdAndUser(addressId, userId) { + return db.query.addresses.findFirst({ + where: and(eq(addresses.userId, userId), eq(addresses.id, addressId)) + }); +} +__name(getAddressByIdAndUser, "getAddressByIdAndUser"); +async function getProductById4(productId) { + return db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId) + }); +} +__name(getProductById4, "getProductById"); +async function checkUserSuspended(userId) { + const userDetail = await db.query.userDetails.findFirst({ + where: eq(userDetails.userId, userId) + }); + return userDetail?.isSuspended ?? false; +} +__name(checkUserSuspended, "checkUserSuspended"); +async function getSlotCapacityStatus(slotId) { + const slot = await db.query.deliverySlotInfo.findFirst({ + where: eq(deliverySlotInfo.id, slotId), + columns: { + isCapacityFull: true + } + }); + return slot?.isCapacityFull ?? false; +} +__name(getSlotCapacityStatus, "getSlotCapacityStatus"); +async function placeOrderTransaction(params) { + const { userId, ordersData, paymentMethod } = params; + return db.transaction(async (tx) => { + let sharedPaymentInfoId = null; + if (paymentMethod === "online") { + const [paymentInfo] = await tx.insert(paymentInfoTable).values({ + status: "pending", + gateway: "razorpay", + merchantOrderId: `multi_order_${Date.now()}` + }).returning(); + sharedPaymentInfoId = paymentInfo.id; + } + const ordersToInsert = ordersData.map((od) => ({ + ...od.order, + paymentInfoId: sharedPaymentInfoId + })); + const insertedOrders = await tx.insert(orders).values(ordersToInsert).returning(); + const allOrderItems = []; + const allOrderStatuses = []; + insertedOrders.forEach((order, index) => { + const od = ordersData[index]; + od.orderItems.forEach((item) => { + allOrderItems.push({ ...item, orderId: order.id }); + }); + allOrderStatuses.push({ + ...od.orderStatus, + orderId: order.id + }); + }); + await tx.insert(orderItems).values(allOrderItems); + await tx.insert(orderStatus).values(allOrderStatuses); + return insertedOrders; + }); +} +__name(placeOrderTransaction, "placeOrderTransaction"); +async function deleteCartItemsForOrder(userId, productIds) { + await db.delete(cartItems).where( + and( + eq(cartItems.userId, userId), + inArray(cartItems.productId, productIds) + ) + ); +} +__name(deleteCartItemsForOrder, "deleteCartItemsForOrder"); +async function recordCouponUsage(userId, couponId, orderId) { + await db.insert(couponUsage).values({ + userId, + couponId, + orderId, + orderItemId: null, + usedAt: /* @__PURE__ */ new Date() + }); +} +__name(recordCouponUsage, "recordCouponUsage"); +async function getOrdersWithRelations(userId, offset, pageSize) { + return db.query.orders.findMany({ + where: eq(orders.userId, userId), + with: { + orderItems: { + with: { + product: { + columns: { + id: true, + name: true, + images: true + } + } + } + }, + slot: { + columns: { + deliveryTime: true + } + }, + paymentInfo: { + columns: { + id: true, + status: true + } + }, + orderStatus: { + columns: { + id: true, + isCancelled: true, + isDelivered: true, + paymentStatus: true, + cancelReason: true + } + }, + refunds: { + columns: { + refundStatus: true, + refundAmount: true + } + } + }, + orderBy: [desc(orders.createdAt)], + limit: pageSize, + offset + }); +} +__name(getOrdersWithRelations, "getOrdersWithRelations"); +async function getOrderCount(userId) { + const result = await db.select({ count: sql`count(*)` }).from(orders).where(eq(orders.userId, userId)); + return Number(result[0]?.count ?? 0); +} +__name(getOrderCount, "getOrderCount"); +async function getOrderByIdWithRelations(orderId, userId) { + const order = await db.query.orders.findFirst({ + where: and(eq(orders.id, orderId), eq(orders.userId, userId)), + with: { + orderItems: { + with: { + product: { + columns: { + id: true, + name: true, + images: true + } + } + } + }, + slot: { + columns: { + deliveryTime: true + } + }, + paymentInfo: { + columns: { + id: true, + status: true + } + }, + orderStatus: { + columns: { + id: true, + isCancelled: true, + isDelivered: true, + paymentStatus: true, + cancelReason: true + }, + with: { + refundCoupon: { + columns: { + id: true, + couponCode: true + } + } + } + }, + refunds: { + columns: { + refundStatus: true, + refundAmount: true + } + } + } + }); + return order; +} +__name(getOrderByIdWithRelations, "getOrderByIdWithRelations"); +async function getCouponUsageForOrder(orderId) { + return db.query.couponUsage.findMany({ + where: eq(couponUsage.orderId, orderId), + with: { + coupon: { + columns: { + id: true, + couponCode: true, + discountPercent: true, + flatDiscount: true, + maxValue: true + } + } + } + }); +} +__name(getCouponUsageForOrder, "getCouponUsageForOrder"); +async function getOrderBasic(orderId) { + return db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + orderStatus: { + columns: { + id: true, + isCancelled: true, + isDelivered: true + } + } + } + }); +} +__name(getOrderBasic, "getOrderBasic"); +async function cancelOrderTransaction(orderId, statusId, reason, isCod) { + await db.transaction(async (tx) => { + await tx.update(orderStatus).set({ + isCancelled: true, + cancelReason: reason, + cancellationUserNotes: reason, + cancellationReviewed: false + }).where(eq(orderStatus.id, statusId)); + const refundStatus = isCod ? "na" : "pending"; + await tx.insert(refunds).values({ + orderId, + refundStatus + }); + }); +} +__name(cancelOrderTransaction, "cancelOrderTransaction"); +async function updateOrderNotes2(orderId, userNotes) { + await db.update(orders).set({ + userNotes: userNotes || null + }).where(eq(orders.id, orderId)); +} +__name(updateOrderNotes2, "updateOrderNotes"); +async function getRecentlyDeliveredOrderIds(userId, limit, since) { + const recentOrders = await db.select({ id: orders.id }).from(orders).innerJoin(orderStatus, eq(orders.id, orderStatus.orderId)).where( + and( + eq(orders.userId, userId), + eq(orderStatus.isDelivered, true), + gte(orders.createdAt, since) + ) + ).orderBy(desc(orders.createdAt)).limit(limit); + return recentOrders.map((order) => order.id); +} +__name(getRecentlyDeliveredOrderIds, "getRecentlyDeliveredOrderIds"); +async function getProductIdsFromOrders(orderIds) { + const orderItemsResult = await db.select({ productId: orderItems.productId }).from(orderItems).where(inArray(orderItems.orderId, orderIds)); + return [...new Set(orderItemsResult.map((item) => item.productId))]; +} +__name(getProductIdsFromOrders, "getProductIdsFromOrders"); +async function getProductsForRecentOrders(productIds, limit) { + const results = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + price: productInfo.price, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + unitShortNotation: units.shortNotation, + incrementStep: productInfo.incrementStep + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)).where( + and( + inArray(productInfo.id, productIds), + eq(productInfo.isSuspended, false) + ) + ).orderBy(desc(productInfo.createdAt)).limit(limit); + return results.map((product) => ({ + ...product, + price: String(product.price ?? "0") + })); +} +__name(getProductsForRecentOrders, "getProductsForRecentOrders"); + +// ../../packages/db_helper_sqlite/src/stores/store-helpers.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +init_drizzle_orm(); +async function getAllBannersForCache() { + return db.query.homeBanners.findMany({ + where: isNotNull(homeBanners.serialNum), + orderBy: asc(homeBanners.serialNum) + }); +} +__name(getAllBannersForCache, "getAllBannersForCache"); +async function getAllProductsForCache() { + const results = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + longDescription: productInfo.longDescription, + price: productInfo.price, + marketPrice: productInfo.marketPrice, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + storeId: productInfo.storeId, + unitShortNotation: units.shortNotation, + incrementStep: productInfo.incrementStep, + productQuantity: productInfo.productQuantity, + isFlashAvailable: productInfo.isFlashAvailable, + flashPrice: productInfo.flashPrice + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)); + return results.map((product) => ({ + ...product, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null, + flashPrice: product.flashPrice ? String(product.flashPrice) : null + })); +} +__name(getAllProductsForCache, "getAllProductsForCache"); +async function getAllStoresForCache() { + return db.query.storeInfo.findMany({ + columns: { id: true, name: true, description: true } + }); +} +__name(getAllStoresForCache, "getAllStoresForCache"); +async function getAllDeliverySlotsForCache() { + return db.select({ + productId: productSlots.productId, + id: deliverySlotInfo.id, + deliveryTime: deliverySlotInfo.deliveryTime, + freezeTime: deliverySlotInfo.freezeTime, + isCapacityFull: deliverySlotInfo.isCapacityFull + }).from(productSlots).innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id)).where( + and( + eq(deliverySlotInfo.isActive, true), + eq(deliverySlotInfo.isCapacityFull, false), + gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`) + ) + ); +} +__name(getAllDeliverySlotsForCache, "getAllDeliverySlotsForCache"); +async function getAllSpecialDealsForCache() { + const results = await db.select({ + productId: specialDeals.productId, + quantity: specialDeals.quantity, + price: specialDeals.price, + validTill: specialDeals.validTill + }).from(specialDeals).where(gt(specialDeals.validTill, sql`CURRENT_TIMESTAMP`)); + return results.map((deal) => ({ + ...deal, + quantity: String(deal.quantity ?? "0"), + price: String(deal.price ?? "0") + })); +} +__name(getAllSpecialDealsForCache, "getAllSpecialDealsForCache"); +async function getAllProductTagsForCache() { + return db.select({ + productId: productTags.productId, + tagName: productTagInfo.tagName + }).from(productTags).innerJoin(productTagInfo, eq(productTags.tagId, productTagInfo.id)); +} +__name(getAllProductTagsForCache, "getAllProductTagsForCache"); +async function getAllTagsForCache() { + return db.select({ + id: productTagInfo.id, + tagName: productTagInfo.tagName, + tagDescription: productTagInfo.tagDescription, + imageUrl: productTagInfo.imageUrl, + isDashboardTag: productTagInfo.isDashboardTag, + relatedStores: productTagInfo.relatedStores + }).from(productTagInfo); +} +__name(getAllTagsForCache, "getAllTagsForCache"); +async function getAllTagProductMappings() { + return db.select({ + tagId: productTags.tagId, + productId: productTags.productId + }).from(productTags); +} +__name(getAllTagProductMappings, "getAllTagProductMappings"); +async function getAllSlotsWithProductsForCache() { + const now = /* @__PURE__ */ new Date(); + return db.query.deliverySlotInfo.findMany({ + where: and( + eq(deliverySlotInfo.isActive, true), + gt(deliverySlotInfo.deliveryTime, now) + ), + with: { + productSlots: { + with: { + product: { + with: { + unit: true, + store: true + } + } + } + } + }, + orderBy: asc(deliverySlotInfo.deliveryTime) + }); +} +__name(getAllSlotsWithProductsForCache, "getAllSlotsWithProductsForCache"); +async function getUserNegativityScore(userId) { + const [result] = await db.select({ + totalNegativityScore: sql`sum(${userIncidents.negativityScore})` + }).from(userIncidents).where(eq(userIncidents.userId, userId)).limit(1); + return Number(result?.totalNegativityScore ?? 0); +} +__name(getUserNegativityScore, "getUserNegativityScore"); + +// ../../packages/db_helper_sqlite/src/lib/automated-jobs.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +async function getAllKeyValStore() { + return db.select().from(keyValStore); +} +__name(getAllKeyValStore, "getAllKeyValStore"); + +// ../../packages/db_helper_sqlite/src/lib/health-check.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); +async function healthCheck() { + try { + await db.select({ key: keyValStore.key }).from(keyValStore).limit(1); + return { status: "ok" }; + } catch { + await db.select({ name: productInfo.name }).from(productInfo).limit(1); + return { status: "ok" }; + } +} +__name(healthCheck, "healthCheck"); + +// ../../packages/db_helper_sqlite/src/lib/delete-orders.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_schema(); + +// ../../packages/db_helper_sqlite/src/helper_methods/upload-url.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_drizzle_orm(); +init_schema(); +async function createUploadUrlStatus(key) { + await db.insert(uploadUrlStatus).values({ + key, + status: "pending" + }); +} +__name(createUploadUrlStatus, "createUploadUrlStatus"); +async function claimUploadUrlStatus(key) { + const result = await db.update(uploadUrlStatus).set({ status: "claimed" }).where(and(eq(uploadUrlStatus.key, key), eq(uploadUrlStatus.status, "pending"))).returning(); + return result.length > 0; +} +__name(claimUploadUrlStatus, "claimUploadUrlStatus"); + +// ../../packages/db_helper_sqlite/src/lib/seed.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/main-router.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/v1-router.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/apis/admin-apis/apis/av-router.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/middleware/staff-auth.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/jose/dist/webapi/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/jose/dist/webapi/util/base64url.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/jose/dist/webapi/lib/buffer_utils.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var encoder = new TextEncoder(); +var decoder = new TextDecoder(); +var MAX_INT32 = 2 ** 32; +function concat(...buffers) { + const size = buffers.reduce((acc, { length }) => acc + length, 0); + const buf = new Uint8Array(size); + let i = 0; + for (const buffer of buffers) { + buf.set(buffer, i); + i += buffer.length; + } + return buf; +} +__name(concat, "concat"); +function encode(string4) { + const bytes = new Uint8Array(string4.length); + for (let i = 0; i < string4.length; i++) { + const code = string4.charCodeAt(i); + if (code > 127) { + throw new TypeError("non-ASCII string encountered in encode()"); + } + bytes[i] = code; + } + return bytes; +} +__name(encode, "encode"); + +// ../../node_modules/jose/dist/webapi/lib/base64.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function encodeBase64(input) { + if (Uint8Array.prototype.toBase64) { + return input.toBase64(); + } + const CHUNK_SIZE = 32768; + const arr = []; + for (let i = 0; i < input.length; i += CHUNK_SIZE) { + arr.push(String.fromCharCode.apply(null, input.subarray(i, i + CHUNK_SIZE))); + } + return btoa(arr.join("")); +} +__name(encodeBase64, "encodeBase64"); +function decodeBase64(encoded) { + if (Uint8Array.fromBase64) { + return Uint8Array.fromBase64(encoded); + } + const binary = atob(encoded); + const bytes = new Uint8Array(binary.length); + for (let i = 0; i < binary.length; i++) { + bytes[i] = binary.charCodeAt(i); + } + return bytes; +} +__name(decodeBase64, "decodeBase64"); + +// ../../node_modules/jose/dist/webapi/util/base64url.js +function decode(input) { + if (Uint8Array.fromBase64) { + return Uint8Array.fromBase64(typeof input === "string" ? input : decoder.decode(input), { + alphabet: "base64url" + }); + } + let encoded = input; + if (encoded instanceof Uint8Array) { + encoded = decoder.decode(encoded); + } + encoded = encoded.replace(/-/g, "+").replace(/_/g, "/"); + try { + return decodeBase64(encoded); + } catch { + throw new TypeError("The input to be decoded is not correctly encoded."); + } +} +__name(decode, "decode"); +function encode2(input) { + let unencoded = input; + if (typeof unencoded === "string") { + unencoded = encoder.encode(unencoded); + } + if (Uint8Array.prototype.toBase64) { + return unencoded.toBase64({ alphabet: "base64url", omitPadding: true }); + } + return encodeBase64(unencoded).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); +} +__name(encode2, "encode"); + +// ../../node_modules/jose/dist/webapi/lib/crypto_key.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var unusable = /* @__PURE__ */ __name((name, prop = "algorithm.name") => new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`), "unusable"); +var isAlgorithm = /* @__PURE__ */ __name((algorithm, name) => algorithm.name === name, "isAlgorithm"); +function getHashLength(hash3) { + return parseInt(hash3.name.slice(4), 10); +} +__name(getHashLength, "getHashLength"); +function checkHashLength(algorithm, expected) { + const actual = getHashLength(algorithm.hash); + if (actual !== expected) + throw unusable(`SHA-${expected}`, "algorithm.hash"); +} +__name(checkHashLength, "checkHashLength"); +function getNamedCurve(alg) { + switch (alg) { + case "ES256": + return "P-256"; + case "ES384": + return "P-384"; + case "ES512": + return "P-521"; + default: + throw new Error("unreachable"); + } +} +__name(getNamedCurve, "getNamedCurve"); +function checkUsage(key, usage) { + if (usage && !key.usages.includes(usage)) { + throw new TypeError(`CryptoKey does not support this operation, its usages must include ${usage}.`); + } +} +__name(checkUsage, "checkUsage"); +function checkSigCryptoKey(key, alg, usage) { + switch (alg) { + case "HS256": + case "HS384": + case "HS512": { + if (!isAlgorithm(key.algorithm, "HMAC")) + throw unusable("HMAC"); + checkHashLength(key.algorithm, parseInt(alg.slice(2), 10)); + break; + } + case "RS256": + case "RS384": + case "RS512": { + if (!isAlgorithm(key.algorithm, "RSASSA-PKCS1-v1_5")) + throw unusable("RSASSA-PKCS1-v1_5"); + checkHashLength(key.algorithm, parseInt(alg.slice(2), 10)); + break; + } + case "PS256": + case "PS384": + case "PS512": { + if (!isAlgorithm(key.algorithm, "RSA-PSS")) + throw unusable("RSA-PSS"); + checkHashLength(key.algorithm, parseInt(alg.slice(2), 10)); + break; + } + case "Ed25519": + case "EdDSA": { + if (!isAlgorithm(key.algorithm, "Ed25519")) + throw unusable("Ed25519"); + break; + } + case "ML-DSA-44": + case "ML-DSA-65": + case "ML-DSA-87": { + if (!isAlgorithm(key.algorithm, alg)) + throw unusable(alg); + break; + } + case "ES256": + case "ES384": + case "ES512": { + if (!isAlgorithm(key.algorithm, "ECDSA")) + throw unusable("ECDSA"); + const expected = getNamedCurve(alg); + const actual = key.algorithm.namedCurve; + if (actual !== expected) + throw unusable(expected, "algorithm.namedCurve"); + break; + } + default: + throw new TypeError("CryptoKey does not support this operation"); + } + checkUsage(key, usage); +} +__name(checkSigCryptoKey, "checkSigCryptoKey"); + +// ../../node_modules/jose/dist/webapi/lib/invalid_key_input.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function message(msg, actual, ...types) { + types = types.filter(Boolean); + 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 (actual == null) { + msg += ` Received ${actual}`; + } else if (typeof actual === "function" && actual.name) { + msg += ` Received function ${actual.name}`; + } else if (typeof actual === "object" && actual != null) { + if (actual.constructor?.name) { + msg += ` Received an instance of ${actual.constructor.name}`; + } + } + return msg; +} +__name(message, "message"); +var invalidKeyInput = /* @__PURE__ */ __name((actual, ...types) => message("Key must be ", actual, ...types), "invalidKeyInput"); +var withAlg = /* @__PURE__ */ __name((alg, actual, ...types) => message(`Key for the ${alg} algorithm must be `, actual, ...types), "withAlg"); + +// ../../node_modules/jose/dist/webapi/util/errors.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var JOSEError = class extends Error { + static { + __name(this, "JOSEError"); + } + static code = "ERR_JOSE_GENERIC"; + code = "ERR_JOSE_GENERIC"; + constructor(message2, options) { + super(message2, options); + this.name = this.constructor.name; + Error.captureStackTrace?.(this, this.constructor); + } +}; +var JWTClaimValidationFailed = class extends JOSEError { + static { + __name(this, "JWTClaimValidationFailed"); + } + static code = "ERR_JWT_CLAIM_VALIDATION_FAILED"; + code = "ERR_JWT_CLAIM_VALIDATION_FAILED"; + claim; + reason; + payload; + constructor(message2, payload, claim = "unspecified", reason = "unspecified") { + super(message2, { cause: { claim, reason, payload } }); + this.claim = claim; + this.reason = reason; + this.payload = payload; + } +}; +var JWTExpired = class extends JOSEError { + static { + __name(this, "JWTExpired"); + } + static code = "ERR_JWT_EXPIRED"; + code = "ERR_JWT_EXPIRED"; + claim; + reason; + payload; + constructor(message2, payload, claim = "unspecified", reason = "unspecified") { + super(message2, { cause: { claim, reason, payload } }); + this.claim = claim; + this.reason = reason; + this.payload = payload; + } +}; +var JOSEAlgNotAllowed = class extends JOSEError { + static { + __name(this, "JOSEAlgNotAllowed"); + } + static code = "ERR_JOSE_ALG_NOT_ALLOWED"; + code = "ERR_JOSE_ALG_NOT_ALLOWED"; +}; +var JOSENotSupported = class extends JOSEError { + static { + __name(this, "JOSENotSupported"); + } + static code = "ERR_JOSE_NOT_SUPPORTED"; + code = "ERR_JOSE_NOT_SUPPORTED"; +}; +var JWSInvalid = class extends JOSEError { + static { + __name(this, "JWSInvalid"); + } + static code = "ERR_JWS_INVALID"; + code = "ERR_JWS_INVALID"; +}; +var JWTInvalid = class extends JOSEError { + static { + __name(this, "JWTInvalid"); + } + static code = "ERR_JWT_INVALID"; + code = "ERR_JWT_INVALID"; +}; +var JWSSignatureVerificationFailed = class extends JOSEError { + static { + __name(this, "JWSSignatureVerificationFailed"); + } + static code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED"; + code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED"; + constructor(message2 = "signature verification failed", options) { + super(message2, options); + } +}; + +// ../../node_modules/jose/dist/webapi/lib/is_key_like.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var isCryptoKey = /* @__PURE__ */ __name((key) => { + if (key?.[Symbol.toStringTag] === "CryptoKey") + return true; + try { + return key instanceof CryptoKey; + } catch { + return false; + } +}, "isCryptoKey"); +var isKeyObject = /* @__PURE__ */ __name((key) => key?.[Symbol.toStringTag] === "KeyObject", "isKeyObject"); +var isKeyLike = /* @__PURE__ */ __name((key) => isCryptoKey(key) || isKeyObject(key), "isKeyLike"); + +// ../../node_modules/jose/dist/webapi/lib/helpers.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function assertNotSet(value, name) { + if (value) { + throw new TypeError(`${name} can only be called once`); + } +} +__name(assertNotSet, "assertNotSet"); +function decodeBase64url(value, label, ErrorClass) { + try { + return decode(value); + } catch { + throw new ErrorClass(`Failed to base64url decode the ${label}`); + } +} +__name(decodeBase64url, "decodeBase64url"); + +// ../../node_modules/jose/dist/webapi/lib/type_checks.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var isObjectLike = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null, "isObjectLike"); +function isObject2(input) { + if (!isObjectLike(input) || Object.prototype.toString.call(input) !== "[object Object]") { + return false; + } + if (Object.getPrototypeOf(input) === null) { + return true; + } + let proto = input; + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto); + } + return Object.getPrototypeOf(input) === proto; +} +__name(isObject2, "isObject"); +function isDisjoint(...headers) { + const sources = headers.filter(Boolean); + if (sources.length === 0 || sources.length === 1) { + return true; + } + let acc; + for (const header of sources) { + const parameters = Object.keys(header); + if (!acc || acc.size === 0) { + acc = new Set(parameters); + continue; + } + for (const parameter of parameters) { + if (acc.has(parameter)) { + return false; + } + acc.add(parameter); + } + } + return true; +} +__name(isDisjoint, "isDisjoint"); +var isJWK = /* @__PURE__ */ __name((key) => isObject2(key) && typeof key.kty === "string", "isJWK"); +var isPrivateJWK = /* @__PURE__ */ __name((key) => key.kty !== "oct" && (key.kty === "AKP" && typeof key.priv === "string" || typeof key.d === "string"), "isPrivateJWK"); +var isPublicJWK = /* @__PURE__ */ __name((key) => key.kty !== "oct" && key.d === void 0 && key.priv === void 0, "isPublicJWK"); +var isSecretJWK = /* @__PURE__ */ __name((key) => key.kty === "oct" && typeof key.k === "string", "isSecretJWK"); + +// ../../node_modules/jose/dist/webapi/lib/signing.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function checkKeyLength(alg, key) { + if (alg.startsWith("RS") || alg.startsWith("PS")) { + const { modulusLength } = key.algorithm; + if (typeof modulusLength !== "number" || modulusLength < 2048) { + throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`); + } + } +} +__name(checkKeyLength, "checkKeyLength"); +function subtleAlgorithm(alg, algorithm) { + const hash3 = `SHA-${alg.slice(-3)}`; + switch (alg) { + case "HS256": + case "HS384": + case "HS512": + return { hash: hash3, name: "HMAC" }; + case "PS256": + case "PS384": + case "PS512": + return { hash: hash3, name: "RSA-PSS", saltLength: parseInt(alg.slice(-3), 10) >> 3 }; + case "RS256": + case "RS384": + case "RS512": + return { hash: hash3, name: "RSASSA-PKCS1-v1_5" }; + case "ES256": + case "ES384": + case "ES512": + return { hash: hash3, name: "ECDSA", namedCurve: algorithm.namedCurve }; + case "Ed25519": + case "EdDSA": + return { name: "Ed25519" }; + case "ML-DSA-44": + case "ML-DSA-65": + case "ML-DSA-87": + return { name: alg }; + default: + throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); + } +} +__name(subtleAlgorithm, "subtleAlgorithm"); +async function getSigKey(alg, key, usage) { + if (key instanceof Uint8Array) { + if (!alg.startsWith("HS")) { + throw new TypeError(invalidKeyInput(key, "CryptoKey", "KeyObject", "JSON Web Key")); + } + return crypto.subtle.importKey("raw", key, { hash: `SHA-${alg.slice(-3)}`, name: "HMAC" }, false, [usage]); + } + checkSigCryptoKey(key, alg, usage); + return key; +} +__name(getSigKey, "getSigKey"); +async function sign(alg, key, data) { + const cryptoKey = await getSigKey(alg, key, "sign"); + checkKeyLength(alg, cryptoKey); + const signature = await crypto.subtle.sign(subtleAlgorithm(alg, cryptoKey.algorithm), cryptoKey, data); + return new Uint8Array(signature); +} +__name(sign, "sign"); +async function verify(alg, key, signature, data) { + const cryptoKey = await getSigKey(alg, key, "verify"); + checkKeyLength(alg, cryptoKey); + const algorithm = subtleAlgorithm(alg, cryptoKey.algorithm); + try { + return await crypto.subtle.verify(algorithm, cryptoKey, signature, data); + } catch { + return false; + } +} +__name(verify, "verify"); + +// ../../node_modules/jose/dist/webapi/lib/normalize_key.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/jose/dist/webapi/lib/jwk_to_key.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var unsupportedAlg = 'Invalid or unsupported JWK "alg" (Algorithm) Parameter value'; +function subtleMapping(jwk) { + let algorithm; + let keyUsages; + switch (jwk.kty) { + case "AKP": { + switch (jwk.alg) { + case "ML-DSA-44": + case "ML-DSA-65": + case "ML-DSA-87": + algorithm = { name: jwk.alg }; + keyUsages = jwk.priv ? ["sign"] : ["verify"]; + break; + default: + throw new JOSENotSupported(unsupportedAlg); + } + break; + } + case "RSA": { + switch (jwk.alg) { + case "PS256": + case "PS384": + case "PS512": + algorithm = { name: "RSA-PSS", hash: `SHA-${jwk.alg.slice(-3)}` }; + keyUsages = jwk.d ? ["sign"] : ["verify"]; + break; + case "RS256": + case "RS384": + case "RS512": + algorithm = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${jwk.alg.slice(-3)}` }; + keyUsages = jwk.d ? ["sign"] : ["verify"]; + break; + case "RSA-OAEP": + case "RSA-OAEP-256": + case "RSA-OAEP-384": + case "RSA-OAEP-512": + algorithm = { + name: "RSA-OAEP", + hash: `SHA-${parseInt(jwk.alg.slice(-3), 10) || 1}` + }; + keyUsages = jwk.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"]; + break; + default: + throw new JOSENotSupported(unsupportedAlg); + } + break; + } + case "EC": { + switch (jwk.alg) { + case "ES256": + case "ES384": + case "ES512": + algorithm = { + name: "ECDSA", + namedCurve: { ES256: "P-256", ES384: "P-384", ES512: "P-521" }[jwk.alg] + }; + keyUsages = jwk.d ? ["sign"] : ["verify"]; + break; + case "ECDH-ES": + case "ECDH-ES+A128KW": + case "ECDH-ES+A192KW": + case "ECDH-ES+A256KW": + algorithm = { name: "ECDH", namedCurve: jwk.crv }; + keyUsages = jwk.d ? ["deriveBits"] : []; + break; + default: + throw new JOSENotSupported(unsupportedAlg); + } + break; + } + case "OKP": { + switch (jwk.alg) { + case "Ed25519": + case "EdDSA": + algorithm = { name: "Ed25519" }; + keyUsages = jwk.d ? ["sign"] : ["verify"]; + break; + case "ECDH-ES": + case "ECDH-ES+A128KW": + case "ECDH-ES+A192KW": + case "ECDH-ES+A256KW": + algorithm = { name: jwk.crv }; + keyUsages = jwk.d ? ["deriveBits"] : []; + break; + default: + throw new JOSENotSupported(unsupportedAlg); + } + break; + } + default: + throw new JOSENotSupported('Invalid or unsupported JWK "kty" (Key Type) Parameter value'); + } + return { algorithm, keyUsages }; +} +__name(subtleMapping, "subtleMapping"); +async function jwkToKey(jwk) { + if (!jwk.alg) { + throw new TypeError('"alg" argument is required when "jwk.alg" is not present'); + } + const { algorithm, keyUsages } = subtleMapping(jwk); + const keyData = { ...jwk }; + if (keyData.kty !== "AKP") { + delete keyData.alg; + } + delete keyData.use; + return crypto.subtle.importKey("jwk", keyData, algorithm, jwk.ext ?? (jwk.d || jwk.priv ? false : true), jwk.key_ops ?? keyUsages); +} +__name(jwkToKey, "jwkToKey"); + +// ../../node_modules/jose/dist/webapi/lib/normalize_key.js +var unusableForAlg = "given KeyObject instance cannot be used for this algorithm"; +var cache; +var handleJWK = /* @__PURE__ */ __name(async (key, jwk, alg, freeze = false) => { + cache ||= /* @__PURE__ */ new WeakMap(); + let cached2 = cache.get(key); + if (cached2?.[alg]) { + return cached2[alg]; + } + const cryptoKey = await jwkToKey({ ...jwk, alg }); + if (freeze) + Object.freeze(key); + if (!cached2) { + cache.set(key, { [alg]: cryptoKey }); + } else { + cached2[alg] = cryptoKey; + } + return cryptoKey; +}, "handleJWK"); +var handleKeyObject = /* @__PURE__ */ __name((keyObject, alg) => { + cache ||= /* @__PURE__ */ new WeakMap(); + let cached2 = cache.get(keyObject); + if (cached2?.[alg]) { + return cached2[alg]; + } + const isPublic = keyObject.type === "public"; + const extractable = isPublic ? true : false; + let cryptoKey; + if (keyObject.asymmetricKeyType === "x25519") { + switch (alg) { + case "ECDH-ES": + case "ECDH-ES+A128KW": + case "ECDH-ES+A192KW": + case "ECDH-ES+A256KW": + break; + default: + throw new TypeError(unusableForAlg); + } + cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, isPublic ? [] : ["deriveBits"]); + } + if (keyObject.asymmetricKeyType === "ed25519") { + if (alg !== "EdDSA" && alg !== "Ed25519") { + throw new TypeError(unusableForAlg); + } + cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [ + isPublic ? "verify" : "sign" + ]); + } + switch (keyObject.asymmetricKeyType) { + case "ml-dsa-44": + case "ml-dsa-65": + case "ml-dsa-87": { + if (alg !== keyObject.asymmetricKeyType.toUpperCase()) { + throw new TypeError(unusableForAlg); + } + cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [ + isPublic ? "verify" : "sign" + ]); + } + } + if (keyObject.asymmetricKeyType === "rsa") { + let hash3; + switch (alg) { + case "RSA-OAEP": + hash3 = "SHA-1"; + break; + case "RS256": + case "PS256": + case "RSA-OAEP-256": + hash3 = "SHA-256"; + break; + case "RS384": + case "PS384": + case "RSA-OAEP-384": + hash3 = "SHA-384"; + break; + case "RS512": + case "PS512": + case "RSA-OAEP-512": + hash3 = "SHA-512"; + break; + default: + throw new TypeError(unusableForAlg); + } + if (alg.startsWith("RSA-OAEP")) { + return keyObject.toCryptoKey({ + name: "RSA-OAEP", + hash: hash3 + }, extractable, isPublic ? ["encrypt"] : ["decrypt"]); + } + cryptoKey = keyObject.toCryptoKey({ + name: alg.startsWith("PS") ? "RSA-PSS" : "RSASSA-PKCS1-v1_5", + hash: hash3 + }, extractable, [isPublic ? "verify" : "sign"]); + } + if (keyObject.asymmetricKeyType === "ec") { + const nist = /* @__PURE__ */ new Map([ + ["prime256v1", "P-256"], + ["secp384r1", "P-384"], + ["secp521r1", "P-521"] + ]); + const namedCurve = nist.get(keyObject.asymmetricKeyDetails?.namedCurve); + if (!namedCurve) { + throw new TypeError(unusableForAlg); + } + const expectedCurve = { ES256: "P-256", ES384: "P-384", ES512: "P-521" }; + if (expectedCurve[alg] && namedCurve === expectedCurve[alg]) { + cryptoKey = keyObject.toCryptoKey({ + name: "ECDSA", + namedCurve + }, extractable, [isPublic ? "verify" : "sign"]); + } + if (alg.startsWith("ECDH-ES")) { + cryptoKey = keyObject.toCryptoKey({ + name: "ECDH", + namedCurve + }, extractable, isPublic ? [] : ["deriveBits"]); + } + } + if (!cryptoKey) { + throw new TypeError(unusableForAlg); + } + if (!cached2) { + cache.set(keyObject, { [alg]: cryptoKey }); + } else { + cached2[alg] = cryptoKey; + } + return cryptoKey; +}, "handleKeyObject"); +async function normalizeKey(key, alg) { + if (key instanceof Uint8Array) { + return key; + } + if (isCryptoKey(key)) { + return key; + } + if (isKeyObject(key)) { + if (key.type === "secret") { + return key.export(); + } + if ("toCryptoKey" in key && typeof key.toCryptoKey === "function") { + try { + return handleKeyObject(key, alg); + } catch (err) { + if (err instanceof TypeError) { + throw err; + } + } + } + let jwk = key.export({ format: "jwk" }); + return handleJWK(key, jwk, alg); + } + if (isJWK(key)) { + if (key.k) { + return decode(key.k); + } + return handleJWK(key, key, alg, true); + } + throw new Error("unreachable"); +} +__name(normalizeKey, "normalizeKey"); + +// ../../node_modules/jose/dist/webapi/lib/validate_crit.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) { + if (joseHeader.crit !== void 0 && protectedHeader?.crit === void 0) { + throw new Err('"crit" (Critical) Header Parameter MUST be integrity protected'); + } + if (!protectedHeader || protectedHeader.crit === void 0) { + return /* @__PURE__ */ new Set(); + } + if (!Array.isArray(protectedHeader.crit) || protectedHeader.crit.length === 0 || protectedHeader.crit.some((input) => typeof input !== "string" || input.length === 0)) { + throw new Err('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present'); + } + let recognized; + if (recognizedOption !== void 0) { + recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]); + } else { + recognized = recognizedDefault; + } + for (const parameter of protectedHeader.crit) { + if (!recognized.has(parameter)) { + throw new JOSENotSupported(`Extension Header Parameter "${parameter}" is not recognized`); + } + if (joseHeader[parameter] === void 0) { + throw new Err(`Extension Header Parameter "${parameter}" is missing`); + } + if (recognized.get(parameter) && protectedHeader[parameter] === void 0) { + throw new Err(`Extension Header Parameter "${parameter}" MUST be integrity protected`); + } + } + return new Set(protectedHeader.crit); +} +__name(validateCrit, "validateCrit"); + +// ../../node_modules/jose/dist/webapi/lib/validate_algorithms.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function validateAlgorithms(option, algorithms) { + if (algorithms !== void 0 && (!Array.isArray(algorithms) || algorithms.some((s) => typeof s !== "string"))) { + throw new TypeError(`"${option}" option must be an array of strings`); + } + if (!algorithms) { + return void 0; + } + return new Set(algorithms); +} +__name(validateAlgorithms, "validateAlgorithms"); + +// ../../node_modules/jose/dist/webapi/lib/check_key_type.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var tag = /* @__PURE__ */ __name((key) => key?.[Symbol.toStringTag], "tag"); +var jwkMatchesOp = /* @__PURE__ */ __name((alg, key, usage) => { + if (key.use !== void 0) { + let expected; + switch (usage) { + case "sign": + case "verify": + expected = "sig"; + break; + case "encrypt": + case "decrypt": + expected = "enc"; + break; + } + if (key.use !== expected) { + throw new TypeError(`Invalid key for this operation, its "use" must be "${expected}" when present`); + } + } + if (key.alg !== void 0 && key.alg !== alg) { + throw new TypeError(`Invalid key for this operation, its "alg" must be "${alg}" when present`); + } + if (Array.isArray(key.key_ops)) { + let expectedKeyOp; + switch (true) { + case (usage === "sign" || usage === "verify"): + case alg === "dir": + case alg.includes("CBC-HS"): + expectedKeyOp = usage; + break; + case alg.startsWith("PBES2"): + expectedKeyOp = "deriveBits"; + break; + case /^A\d{3}(?:GCM)?(?:KW)?$/.test(alg): + if (!alg.includes("GCM") && alg.endsWith("KW")) { + expectedKeyOp = usage === "encrypt" ? "wrapKey" : "unwrapKey"; + } else { + expectedKeyOp = usage; + } + break; + case (usage === "encrypt" && alg.startsWith("RSA")): + expectedKeyOp = "wrapKey"; + break; + case usage === "decrypt": + expectedKeyOp = alg.startsWith("RSA") ? "unwrapKey" : "deriveBits"; + break; + } + if (expectedKeyOp && key.key_ops?.includes?.(expectedKeyOp) === false) { + throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${expectedKeyOp}" when present`); + } + } + return true; +}, "jwkMatchesOp"); +var symmetricTypeCheck = /* @__PURE__ */ __name((alg, key, usage) => { + if (key instanceof Uint8Array) + return; + if (isJWK(key)) { + if (isSecretJWK(key) && jwkMatchesOp(alg, key, usage)) + return; + throw new TypeError(`JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present`); + } + if (!isKeyLike(key)) { + throw new TypeError(withAlg(alg, key, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array")); + } + if (key.type !== "secret") { + throw new TypeError(`${tag(key)} instances for symmetric algorithms must be of type "secret"`); + } +}, "symmetricTypeCheck"); +var asymmetricTypeCheck = /* @__PURE__ */ __name((alg, key, usage) => { + if (isJWK(key)) { + switch (usage) { + case "decrypt": + case "sign": + if (isPrivateJWK(key) && jwkMatchesOp(alg, key, usage)) + return; + throw new TypeError(`JSON Web Key for this operation must be a private JWK`); + case "encrypt": + case "verify": + if (isPublicJWK(key) && jwkMatchesOp(alg, key, usage)) + return; + throw new TypeError(`JSON Web Key for this operation must be a public JWK`); + } + } + if (!isKeyLike(key)) { + throw new TypeError(withAlg(alg, key, "CryptoKey", "KeyObject", "JSON Web Key")); + } + if (key.type === "secret") { + throw new TypeError(`${tag(key)} instances for asymmetric algorithms must not be of type "secret"`); + } + if (key.type === "public") { + switch (usage) { + case "sign": + throw new TypeError(`${tag(key)} instances for asymmetric algorithm signing must be of type "private"`); + case "decrypt": + throw new TypeError(`${tag(key)} instances for asymmetric algorithm decryption must be of type "private"`); + } + } + if (key.type === "private") { + switch (usage) { + case "verify": + throw new TypeError(`${tag(key)} instances for asymmetric algorithm verifying must be of type "public"`); + case "encrypt": + throw new TypeError(`${tag(key)} instances for asymmetric algorithm encryption must be of type "public"`); + } + } +}, "asymmetricTypeCheck"); +function checkKeyType(alg, key, usage) { + switch (alg.substring(0, 2)) { + case "A1": + case "A2": + case "di": + case "HS": + case "PB": + symmetricTypeCheck(alg, key, usage); + break; + default: + asymmetricTypeCheck(alg, key, usage); + } +} +__name(checkKeyType, "checkKeyType"); + +// ../../node_modules/jose/dist/webapi/jws/compact/verify.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/jose/dist/webapi/jws/flattened/verify.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +async function flattenedVerify(jws, key, options) { + if (!isObject2(jws)) { + throw new JWSInvalid("Flattened JWS must be an object"); + } + if (jws.protected === void 0 && jws.header === void 0) { + throw new JWSInvalid('Flattened JWS must have either of the "protected" or "header" members'); + } + if (jws.protected !== void 0 && typeof jws.protected !== "string") { + throw new JWSInvalid("JWS Protected Header incorrect type"); + } + if (jws.payload === void 0) { + throw new JWSInvalid("JWS Payload missing"); + } + if (typeof jws.signature !== "string") { + throw new JWSInvalid("JWS Signature missing or incorrect type"); + } + if (jws.header !== void 0 && !isObject2(jws.header)) { + throw new JWSInvalid("JWS Unprotected Header incorrect type"); + } + let parsedProt = {}; + if (jws.protected) { + try { + const protectedHeader = decode(jws.protected); + parsedProt = JSON.parse(decoder.decode(protectedHeader)); + } catch { + throw new JWSInvalid("JWS Protected Header is invalid"); + } + } + if (!isDisjoint(parsedProt, jws.header)) { + throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint"); + } + const joseHeader = { + ...parsedProt, + ...jws.header + }; + const extensions2 = validateCrit(JWSInvalid, /* @__PURE__ */ new Map([["b64", true]]), options?.crit, parsedProt, joseHeader); + let b64 = true; + if (extensions2.has("b64")) { + b64 = parsedProt.b64; + if (typeof b64 !== "boolean") { + throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean'); + } + } + const { alg } = joseHeader; + if (typeof alg !== "string" || !alg) { + throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid'); + } + const algorithms = options && validateAlgorithms("algorithms", options.algorithms); + if (algorithms && !algorithms.has(alg)) { + throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter value not allowed'); + } + if (b64) { + if (typeof jws.payload !== "string") { + throw new JWSInvalid("JWS Payload must be a string"); + } + } else if (typeof jws.payload !== "string" && !(jws.payload instanceof Uint8Array)) { + throw new JWSInvalid("JWS Payload must be a string or an Uint8Array instance"); + } + let resolvedKey = false; + if (typeof key === "function") { + key = await key(parsedProt, jws); + resolvedKey = true; + } + checkKeyType(alg, key, "verify"); + const data = concat(jws.protected !== void 0 ? encode(jws.protected) : new Uint8Array(), encode("."), typeof jws.payload === "string" ? b64 ? encode(jws.payload) : encoder.encode(jws.payload) : jws.payload); + const signature = decodeBase64url(jws.signature, "signature", JWSInvalid); + const k = await normalizeKey(key, alg); + const verified = await verify(alg, k, signature, data); + if (!verified) { + throw new JWSSignatureVerificationFailed(); + } + let payload; + if (b64) { + payload = decodeBase64url(jws.payload, "payload", JWSInvalid); + } else if (typeof jws.payload === "string") { + payload = encoder.encode(jws.payload); + } else { + payload = jws.payload; + } + const result = { payload }; + if (jws.protected !== void 0) { + result.protectedHeader = parsedProt; + } + if (jws.header !== void 0) { + result.unprotectedHeader = jws.header; + } + if (resolvedKey) { + return { ...result, key: k }; + } + return result; +} +__name(flattenedVerify, "flattenedVerify"); + +// ../../node_modules/jose/dist/webapi/jws/compact/verify.js +async function compactVerify(jws, key, options) { + if (jws instanceof Uint8Array) { + jws = decoder.decode(jws); + } + if (typeof jws !== "string") { + throw new JWSInvalid("Compact JWS must be a string or Uint8Array"); + } + const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split("."); + if (length !== 3) { + throw new JWSInvalid("Invalid Compact JWS"); + } + const verified = await flattenedVerify({ payload, protected: protectedHeader, signature }, key, options); + const result = { payload: verified.payload, protectedHeader: verified.protectedHeader }; + if (typeof key === "function") { + return { ...result, key: verified.key }; + } + return result; +} +__name(compactVerify, "compactVerify"); + +// ../../node_modules/jose/dist/webapi/jwt/verify.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/jose/dist/webapi/lib/jwt_claims_set.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var epoch = /* @__PURE__ */ __name((date5) => Math.floor(date5.getTime() / 1e3), "epoch"); +var minute = 60; +var hour = minute * 60; +var day = hour * 24; +var week = day * 7; +var year = day * 365.25; +var REGEX = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i; +function secs(str) { + const matched = REGEX.exec(str); + if (!matched || matched[4] && matched[1]) { + throw new TypeError("Invalid time period format"); + } + const value = parseFloat(matched[2]); + const unit = matched[3].toLowerCase(); + let numericDate; + switch (unit) { + case "sec": + case "secs": + case "second": + case "seconds": + case "s": + numericDate = Math.round(value); + break; + case "minute": + case "minutes": + case "min": + case "mins": + case "m": + numericDate = Math.round(value * minute); + break; + case "hour": + case "hours": + case "hr": + case "hrs": + case "h": + numericDate = Math.round(value * hour); + break; + case "day": + case "days": + case "d": + numericDate = Math.round(value * day); + break; + case "week": + case "weeks": + case "w": + numericDate = Math.round(value * week); + break; + default: + numericDate = Math.round(value * year); + break; + } + if (matched[1] === "-" || matched[4] === "ago") { + return -numericDate; + } + return numericDate; +} +__name(secs, "secs"); +function validateInput(label, input) { + if (!Number.isFinite(input)) { + throw new TypeError(`Invalid ${label} input`); + } + return input; +} +__name(validateInput, "validateInput"); +var normalizeTyp = /* @__PURE__ */ __name((value) => { + if (value.includes("/")) { + return value.toLowerCase(); + } + return `application/${value.toLowerCase()}`; +}, "normalizeTyp"); +var checkAudiencePresence = /* @__PURE__ */ __name((audPayload, audOption) => { + if (typeof audPayload === "string") { + return audOption.includes(audPayload); + } + if (Array.isArray(audPayload)) { + return audOption.some(Set.prototype.has.bind(new Set(audPayload))); + } + return false; +}, "checkAudiencePresence"); +function validateClaimsSet(protectedHeader, encodedPayload, options = {}) { + let payload; + try { + payload = JSON.parse(decoder.decode(encodedPayload)); + } catch { + } + if (!isObject2(payload)) { + throw new JWTInvalid("JWT Claims Set must be a top-level JSON object"); + } + const { typ } = options; + if (typ && (typeof protectedHeader.typ !== "string" || normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) { + throw new JWTClaimValidationFailed('unexpected "typ" JWT header value', payload, "typ", "check_failed"); + } + const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options; + const presenceCheck = [...requiredClaims]; + if (maxTokenAge !== void 0) + presenceCheck.push("iat"); + if (audience !== void 0) + presenceCheck.push("aud"); + if (subject !== void 0) + presenceCheck.push("sub"); + if (issuer !== void 0) + presenceCheck.push("iss"); + for (const claim of new Set(presenceCheck.reverse())) { + if (!(claim in payload)) { + throw new JWTClaimValidationFailed(`missing required "${claim}" claim`, payload, claim, "missing"); + } + } + if (issuer && !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) { + throw new JWTClaimValidationFailed('unexpected "iss" claim value', payload, "iss", "check_failed"); + } + if (subject && payload.sub !== subject) { + throw new JWTClaimValidationFailed('unexpected "sub" claim value', payload, "sub", "check_failed"); + } + if (audience && !checkAudiencePresence(payload.aud, typeof audience === "string" ? [audience] : audience)) { + throw new JWTClaimValidationFailed('unexpected "aud" claim value', payload, "aud", "check_failed"); + } + let tolerance; + switch (typeof options.clockTolerance) { + case "string": + tolerance = secs(options.clockTolerance); + break; + case "number": + tolerance = options.clockTolerance; + break; + case "undefined": + tolerance = 0; + break; + default: + throw new TypeError("Invalid clockTolerance option type"); + } + const { currentDate } = options; + const now = epoch(currentDate || /* @__PURE__ */ new Date()); + if ((payload.iat !== void 0 || maxTokenAge) && typeof payload.iat !== "number") { + throw new JWTClaimValidationFailed('"iat" claim must be a number', payload, "iat", "invalid"); + } + if (payload.nbf !== void 0) { + if (typeof payload.nbf !== "number") { + throw new JWTClaimValidationFailed('"nbf" claim must be a number', payload, "nbf", "invalid"); + } + if (payload.nbf > now + tolerance) { + throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed', payload, "nbf", "check_failed"); + } + } + if (payload.exp !== void 0) { + if (typeof payload.exp !== "number") { + throw new JWTClaimValidationFailed('"exp" claim must be a number', payload, "exp", "invalid"); + } + if (payload.exp <= now - tolerance) { + throw new JWTExpired('"exp" claim timestamp check failed', payload, "exp", "check_failed"); + } + } + if (maxTokenAge) { + const age = now - payload.iat; + const max2 = typeof maxTokenAge === "number" ? maxTokenAge : secs(maxTokenAge); + if (age - tolerance > max2) { + throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)', payload, "iat", "check_failed"); + } + if (age < 0 - tolerance) { + throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)', payload, "iat", "check_failed"); + } + } + return payload; +} +__name(validateClaimsSet, "validateClaimsSet"); +var JWTClaimsBuilder = class { + static { + __name(this, "JWTClaimsBuilder"); + } + #payload; + constructor(payload) { + if (!isObject2(payload)) { + throw new TypeError("JWT Claims Set MUST be an object"); + } + this.#payload = structuredClone(payload); + } + data() { + return encoder.encode(JSON.stringify(this.#payload)); + } + get iss() { + return this.#payload.iss; + } + set iss(value) { + this.#payload.iss = value; + } + get sub() { + return this.#payload.sub; + } + set sub(value) { + this.#payload.sub = value; + } + get aud() { + return this.#payload.aud; + } + set aud(value) { + this.#payload.aud = value; + } + set jti(value) { + this.#payload.jti = value; + } + set nbf(value) { + if (typeof value === "number") { + this.#payload.nbf = validateInput("setNotBefore", value); + } else if (value instanceof Date) { + this.#payload.nbf = validateInput("setNotBefore", epoch(value)); + } else { + this.#payload.nbf = epoch(/* @__PURE__ */ new Date()) + secs(value); + } + } + set exp(value) { + if (typeof value === "number") { + this.#payload.exp = validateInput("setExpirationTime", value); + } else if (value instanceof Date) { + this.#payload.exp = validateInput("setExpirationTime", epoch(value)); + } else { + this.#payload.exp = epoch(/* @__PURE__ */ new Date()) + secs(value); + } + } + set iat(value) { + if (value === void 0) { + this.#payload.iat = epoch(/* @__PURE__ */ new Date()); + } else if (value instanceof Date) { + this.#payload.iat = validateInput("setIssuedAt", epoch(value)); + } else if (typeof value === "string") { + this.#payload.iat = validateInput("setIssuedAt", epoch(/* @__PURE__ */ new Date()) + secs(value)); + } else { + this.#payload.iat = validateInput("setIssuedAt", value); + } + } +}; + +// ../../node_modules/jose/dist/webapi/jwt/verify.js +async function jwtVerify(jwt2, key, options) { + const verified = await compactVerify(jwt2, key, options); + if (verified.protectedHeader.crit?.includes("b64") && verified.protectedHeader.b64 === false) { + throw new JWTInvalid("JWTs MUST NOT use unencoded payload"); + } + const payload = validateClaimsSet(verified.protectedHeader, verified.payload, options); + const result = { payload, protectedHeader: verified.protectedHeader }; + if (typeof key === "function") { + return { ...result, key: verified.key }; + } + return result; +} +__name(jwtVerify, "jwtVerify"); + +// ../../node_modules/jose/dist/webapi/jws/compact/sign.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/jose/dist/webapi/jws/flattened/sign.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var FlattenedSign = class { + static { + __name(this, "FlattenedSign"); + } + #payload; + #protectedHeader; + #unprotectedHeader; + constructor(payload) { + if (!(payload instanceof Uint8Array)) { + throw new TypeError("payload must be an instance of Uint8Array"); + } + this.#payload = payload; + } + setProtectedHeader(protectedHeader) { + assertNotSet(this.#protectedHeader, "setProtectedHeader"); + this.#protectedHeader = protectedHeader; + return this; + } + setUnprotectedHeader(unprotectedHeader) { + assertNotSet(this.#unprotectedHeader, "setUnprotectedHeader"); + this.#unprotectedHeader = unprotectedHeader; + return this; + } + async sign(key, options) { + if (!this.#protectedHeader && !this.#unprotectedHeader) { + throw new JWSInvalid("either setProtectedHeader or setUnprotectedHeader must be called before #sign()"); + } + if (!isDisjoint(this.#protectedHeader, this.#unprotectedHeader)) { + throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint"); + } + const joseHeader = { + ...this.#protectedHeader, + ...this.#unprotectedHeader + }; + const extensions2 = validateCrit(JWSInvalid, /* @__PURE__ */ new Map([["b64", true]]), options?.crit, this.#protectedHeader, joseHeader); + let b64 = true; + if (extensions2.has("b64")) { + b64 = this.#protectedHeader.b64; + if (typeof b64 !== "boolean") { + throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean'); + } + } + const { alg } = joseHeader; + if (typeof alg !== "string" || !alg) { + throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid'); + } + checkKeyType(alg, key, "sign"); + let payloadS; + let payloadB; + if (b64) { + payloadS = encode2(this.#payload); + payloadB = encode(payloadS); + } else { + payloadB = this.#payload; + payloadS = ""; + } + let protectedHeaderString; + let protectedHeaderBytes; + if (this.#protectedHeader) { + protectedHeaderString = encode2(JSON.stringify(this.#protectedHeader)); + protectedHeaderBytes = encode(protectedHeaderString); + } else { + protectedHeaderString = ""; + protectedHeaderBytes = new Uint8Array(); + } + const data = concat(protectedHeaderBytes, encode("."), payloadB); + const k = await normalizeKey(key, alg); + const signature = await sign(alg, k, data); + const jws = { + signature: encode2(signature), + payload: payloadS + }; + if (this.#unprotectedHeader) { + jws.header = this.#unprotectedHeader; + } + if (this.#protectedHeader) { + jws.protected = protectedHeaderString; + } + return jws; + } +}; + +// ../../node_modules/jose/dist/webapi/jws/compact/sign.js +var CompactSign = class { + static { + __name(this, "CompactSign"); + } + #flattened; + constructor(payload) { + this.#flattened = new FlattenedSign(payload); + } + setProtectedHeader(protectedHeader) { + this.#flattened.setProtectedHeader(protectedHeader); + return this; + } + async sign(key, options) { + const jws = await this.#flattened.sign(key, options); + if (jws.payload === void 0) { + throw new TypeError("use the flattened module for creating JWS with b64: false"); + } + return `${jws.protected}.${jws.payload}.${jws.signature}`; + } +}; + +// ../../node_modules/jose/dist/webapi/jwt/sign.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var SignJWT = class { + static { + __name(this, "SignJWT"); + } + #protectedHeader; + #jwt; + constructor(payload = {}) { + this.#jwt = new JWTClaimsBuilder(payload); + } + setIssuer(issuer) { + this.#jwt.iss = issuer; + return this; + } + setSubject(subject) { + this.#jwt.sub = subject; + return this; + } + setAudience(audience) { + this.#jwt.aud = audience; + return this; + } + setJti(jwtId) { + this.#jwt.jti = jwtId; + return this; + } + setNotBefore(input) { + this.#jwt.nbf = input; + return this; + } + setExpirationTime(input) { + this.#jwt.exp = input; + return this; + } + setIssuedAt(input) { + this.#jwt.iat = input; + return this; + } + setProtectedHeader(protectedHeader) { + this.#protectedHeader = protectedHeader; + return this; + } + async sign(key, options) { + const sig = new CompactSign(this.#jwt.data()); + sig.setProtectedHeader(this.#protectedHeader); + if (Array.isArray(this.#protectedHeader?.crit) && this.#protectedHeader.crit.includes("b64") && this.#protectedHeader.b64 === false) { + throw new JWTInvalid("JWTs MUST NOT use unencoded payload"); + } + return sig.sign(key, options); + } +}; + +// src/lib/api-error.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var ApiError = class _ApiError extends Error { + static { + __name(this, "ApiError"); + } + constructor(message2, statusCode = 500, details) { + console.log(message2); + super(message2); + this.name = "ApiError"; + this.statusCode = statusCode; + this.details = details; + Error.captureStackTrace?.(this, _ApiError); + } +}; + +// src/lib/env-exporter.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var runtimeEnv = globalThis.ENV || globalThis.process?.env || {}; +var appUrl = runtimeEnv.APP_URL; +var jwtSecret = runtimeEnv.JWT_SECRET; +var encodedJwtSecret = new TextEncoder().encode(jwtSecret); +var s3AccessKeyId = runtimeEnv.S3_ACCESS_KEY_ID; +var s3SecretAccessKey = runtimeEnv.S3_SECRET_ACCESS_KEY; +var s3BucketName = runtimeEnv.S3_BUCKET_NAME; +var s3Region = runtimeEnv.S3_REGION; +var assetsDomain = runtimeEnv.ASSETS_DOMAIN; +var apiCacheKey = runtimeEnv.API_CACHE_KEY; +var cloudflareApiToken = runtimeEnv.CLOUDFLARE_API_TOKEN; +var cloudflareZoneId = runtimeEnv.CLOUDFLARE_ZONE_ID; +var s3Url = runtimeEnv.S3_URL; +var redisUrl = runtimeEnv.REDIS_URL; +var expoAccessToken = runtimeEnv.EXPO_ACCESS_TOKEN; +var phonePeBaseUrl = runtimeEnv.PHONE_PE_BASE_URL; +var phonePeClientId = runtimeEnv.PHONE_PE_CLIENT_ID; +var phonePeClientVersion = Number(runtimeEnv.PHONE_PE_CLIENT_VERSION); +var phonePeClientSecret = runtimeEnv.PHONE_PE_CLIENT_SECRET; +var phonePeMerchantId = runtimeEnv.PHONE_PE_MERCHANT_ID; +var razorpayId = runtimeEnv.RAZORPAY_KEY; +var razorpaySecret = runtimeEnv.RAZORPAY_SECRET; +var otpSenderAuthToken = runtimeEnv.OTP_SENDER_AUTH_TOKEN; +var minOrderValue = Number(runtimeEnv.MIN_ORDER_VALUE); +var deliveryCharge = Number(runtimeEnv.DELIVERY_CHARGE); +var telegramBotToken = runtimeEnv.TELEGRAM_BOT_TOKEN; +var telegramChatIds = runtimeEnv.TELEGRAM_CHAT_IDS?.split(",").map((id) => id.trim()) || []; +var isDevMode = runtimeEnv.ENV_MODE === "dev"; + +// src/middleware/staff-auth.ts +var verifyStaffToken = /* @__PURE__ */ __name(async (token) => { + try { + const { payload } = await jwtVerify(token, encodedJwtSecret); + return payload; + } catch (error50) { + throw new ApiError("Access denied. Invalid auth credentials", 401); + } +}, "verifyStaffToken"); +var authenticateStaff = /* @__PURE__ */ __name(async (c, next) => { + try { + const authHeader = c.req.header("authorization"); + if (!authHeader || !authHeader.startsWith("Bearer ")) { + throw new ApiError("Staff authentication required", 401); + } + const token = authHeader.split(" ")[1]; + if (!token) { + throw new ApiError("Staff authentication token missing", 401); + } + const decoded = await verifyStaffToken(token); + if (!decoded.staffId) { + throw new ApiError("Invalid staff token format", 401); + } + const staff = await getStaffUserById(decoded.staffId); + if (!staff) { + throw new ApiError("Staff user not found", 401); + } + c.set("staffUser", { + id: staff.id, + name: staff.name + }); + await next(); + } catch (error50) { + throw error50; + } +}, "authenticateStaff"); + +// src/apis/admin-apis/apis/av-router.ts +var router = new Hono2(); +router.use("*", authenticateStaff); +var avRouter = router; +var av_router_default = avRouter; + +// src/apis/common-apis/apis/common.router.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/apis/common-apis/apis/common-product.router.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/apis/common-apis/apis/common-product.controller.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/lib/s3-client.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@smithy/types/dist-es/middleware.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var SMITHY_CONTEXT_KEY = "__smithy_context"; + +// ../../node_modules/@smithy/protocol-http/dist-es/httpRequest.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var HttpRequest = class _HttpRequest { + static { + __name(this, "HttpRequest"); + } + method; + protocol; + hostname; + port; + path; + query; + headers; + username; + password; + fragment; + body; + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; + this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; + } + static clone(request) { + const cloned = new _HttpRequest({ + ...request, + headers: { ...request.headers } + }); + if (cloned.query) { + cloned.query = cloneQuery(cloned.query); + } + return cloned; + } + static isInstance(request) { + if (!request) { + return false; + } + const req = request; + return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; + } + clone() { + return _HttpRequest.clone(this); + } +}; +function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; + }, {}); +} +__name(cloneQuery, "cloneQuery"); + +// ../../node_modules/@smithy/protocol-http/dist-es/httpResponse.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var HttpResponse = class { + static { + __name(this, "HttpResponse"); + } + statusCode; + reason; + headers; + body; + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; + } + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + } +}; + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/constants.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var RequestChecksumCalculation = { + WHEN_SUPPORTED: "WHEN_SUPPORTED", + WHEN_REQUIRED: "WHEN_REQUIRED" +}; +var DEFAULT_REQUEST_CHECKSUM_CALCULATION = RequestChecksumCalculation.WHEN_SUPPORTED; +var ResponseChecksumValidation = { + WHEN_SUPPORTED: "WHEN_SUPPORTED", + WHEN_REQUIRED: "WHEN_REQUIRED" +}; +var DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.WHEN_SUPPORTED; +var ChecksumAlgorithm; +(function(ChecksumAlgorithm2) { + ChecksumAlgorithm2["MD5"] = "MD5"; + ChecksumAlgorithm2["CRC32"] = "CRC32"; + ChecksumAlgorithm2["CRC32C"] = "CRC32C"; + ChecksumAlgorithm2["CRC64NVME"] = "CRC64NVME"; + ChecksumAlgorithm2["SHA1"] = "SHA1"; + ChecksumAlgorithm2["SHA256"] = "SHA256"; +})(ChecksumAlgorithm || (ChecksumAlgorithm = {})); +var ChecksumLocation; +(function(ChecksumLocation2) { + ChecksumLocation2["HEADER"] = "header"; + ChecksumLocation2["TRAILER"] = "trailer"; +})(ChecksumLocation || (ChecksumLocation = {})); +var DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.CRC32; + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsMiddleware.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function setFeature(context2, feature2, value) { + if (!context2.__aws_sdk_context) { + context2.__aws_sdk_context = { + features: {} + }; + } else if (!context2.__aws_sdk_context.features) { + context2.__aws_sdk_context.features = {}; + } + context2.__aws_sdk_context.features[feature2] = value; +} +__name(setFeature, "setFeature"); + +// ../../node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var getSmithyContext = /* @__PURE__ */ __name((context2) => context2[SMITHY_CONTEXT_KEY] || (context2[SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); + +// ../../node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var normalizeProvider = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; +}, "normalizeProvider"); + +// ../../node_modules/@smithy/util-base64/dist-es/constants.browser.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`; +var alphabetByEncoding = Object.entries(chars).reduce((acc, [i, c]) => { + acc[c] = Number(i); + return acc; +}, {}); +var alphabetByValue = chars.split(""); +var bitsPerLetter = 6; +var bitsPerByte = 8; +var maxLetterValue = 63; + +// ../../node_modules/@smithy/util-base64/dist-es/toBase64.browser.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_dist_es(); +function toBase64(_input) { + let input; + if (typeof _input === "string") { + input = fromUtf8(_input); + } else { + input = _input; + } + const isArrayLike = typeof input === "object" && typeof input.length === "number"; + const isUint8Array = typeof input === "object" && typeof input.byteOffset === "number" && typeof input.byteLength === "number"; + if (!isArrayLike && !isUint8Array) { + throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); + } + let str = ""; + for (let i = 0; i < input.length; i += 3) { + let bits = 0; + let bitLength = 0; + for (let j = i, limit = Math.min(i + 3, input.length); j < limit; j++) { + bits |= input[j] << (limit - j - 1) * bitsPerByte; + bitLength += bitsPerByte; + } + const bitClusterCount = Math.ceil(bitLength / bitsPerLetter); + bits <<= bitClusterCount * bitsPerLetter - bitLength; + for (let k = 1; k <= bitClusterCount; k++) { + const offset = (bitClusterCount - k) * bitsPerLetter; + str += alphabetByValue[(bits & maxLetterValue << offset) >> offset]; + } + str += "==".slice(0, 4 - bitClusterCount); + } + return str; +} +__name(toBase64, "toBase64"); + +// ../../node_modules/@smithy/util-stream/dist-es/checksum/ChecksumStream.browser.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() { +}; +var ChecksumStream = class extends ReadableStreamRef { + static { + __name(this, "ChecksumStream"); + } +}; + +// ../../node_modules/@smithy/util-stream/dist-es/checksum/createChecksumStream.browser.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@smithy/util-stream/dist-es/stream-type-check.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var isReadableStream = /* @__PURE__ */ __name((stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream), "isReadableStream"); + +// ../../node_modules/@smithy/util-stream/dist-es/checksum/createChecksumStream.browser.js +var createChecksumStream = /* @__PURE__ */ __name(({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => { + if (!isReadableStream(source)) { + throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); + } + const encoder2 = base64Encoder ?? toBase64; + if (typeof TransformStream !== "function") { + throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream."); + } + const transform2 = new TransformStream({ + start() { + }, + async transform(chunk, controller) { + checksum.update(chunk); + controller.enqueue(chunk); + }, + async flush(controller) { + const digest = await checksum.digest(); + const received = encoder2(digest); + if (expectedChecksum !== received) { + const error50 = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}" in response header "${checksumSourceLocation}".`); + controller.error(error50); + } else { + controller.terminate(); + } + } + }); + source.pipeThrough(transform2); + const readable = transform2.readable; + Object.setPrototypeOf(readable, ChecksumStream.prototype); + return readable; +}, "createChecksumStream"); + +// ../../node_modules/@smithy/util-stream/dist-es/createBufferedReadableStream.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@smithy/util-stream/dist-es/ByteArrayCollector.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var ByteArrayCollector = class { + static { + __name(this, "ByteArrayCollector"); + } + allocByteArray; + byteLength = 0; + byteArrays = []; + constructor(allocByteArray) { + this.allocByteArray = allocByteArray; + } + push(byteArray) { + this.byteArrays.push(byteArray); + this.byteLength += byteArray.byteLength; + } + flush() { + if (this.byteArrays.length === 1) { + const bytes = this.byteArrays[0]; + this.reset(); + return bytes; + } + const aggregation = this.allocByteArray(this.byteLength); + let cursor = 0; + for (let i = 0; i < this.byteArrays.length; ++i) { + const bytes = this.byteArrays[i]; + aggregation.set(bytes, cursor); + cursor += bytes.byteLength; + } + this.reset(); + return aggregation; + } + reset() { + this.byteArrays = []; + this.byteLength = 0; + } +}; + +// ../../node_modules/@smithy/util-stream/dist-es/createBufferedReadableStream.js +function createBufferedReadableStream(upstream, size, logger4) { + const reader = upstream.getReader(); + let streamBufferingLoggedWarning = false; + let bytesSeen = 0; + const buffers = ["", new ByteArrayCollector((size2) => new Uint8Array(size2))]; + let mode = -1; + const pull = /* @__PURE__ */ __name(async (controller) => { + const { value, done } = await reader.read(); + const chunk = value; + if (done) { + if (mode !== -1) { + const remainder = flush(buffers, mode); + if (sizeOf(remainder) > 0) { + controller.enqueue(remainder); + } + } + controller.close(); + } else { + const chunkMode = modeOf(chunk, false); + if (mode !== chunkMode) { + if (mode >= 0) { + controller.enqueue(flush(buffers, mode)); + } + mode = chunkMode; + } + if (mode === -1) { + controller.enqueue(chunk); + return; + } + const chunkSize = sizeOf(chunk); + bytesSeen += chunkSize; + const bufferSize = sizeOf(buffers[mode]); + if (chunkSize >= size && bufferSize === 0) { + controller.enqueue(chunk); + } else { + const newSize = merge(buffers, mode, chunk); + if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { + streamBufferingLoggedWarning = true; + logger4?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); + } + if (newSize >= size) { + controller.enqueue(flush(buffers, mode)); + } else { + await pull(controller); + } + } + } + }, "pull"); + return new ReadableStream({ + pull + }); +} +__name(createBufferedReadableStream, "createBufferedReadableStream"); +var createBufferedReadable = createBufferedReadableStream; +function merge(buffers, mode, chunk) { + switch (mode) { + case 0: + buffers[0] += chunk; + return sizeOf(buffers[0]); + case 1: + case 2: + buffers[mode].push(chunk); + return sizeOf(buffers[mode]); + } +} +__name(merge, "merge"); +function flush(buffers, mode) { + switch (mode) { + case 0: + const s = buffers[0]; + buffers[0] = ""; + return s; + case 1: + case 2: + return buffers[mode].flush(); + } + throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`); +} +__name(flush, "flush"); +function sizeOf(chunk) { + return chunk?.byteLength ?? chunk?.length ?? 0; +} +__name(sizeOf, "sizeOf"); +function modeOf(chunk, allowBuffer = true) { + if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) { + return 2; + } + if (chunk instanceof Uint8Array) { + return 1; + } + if (typeof chunk === "string") { + return 0; + } + return -1; +} +__name(modeOf, "modeOf"); + +// ../../node_modules/@smithy/util-stream/dist-es/headStream.browser.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +async function headStream(stream, bytes) { + let byteLengthCounter = 0; + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + byteLengthCounter += value?.byteLength ?? 0; + } + if (byteLengthCounter >= bytes) { + break; + } + isDone = done; + } + reader.releaseLock(); + const collected = new Uint8Array(Math.min(bytes, byteLengthCounter)); + let offset = 0; + for (const chunk of chunks) { + if (chunk.byteLength > collected.byteLength - offset) { + collected.set(chunk.subarray(0, collected.byteLength - offset), offset); + break; + } else { + collected.set(chunk, offset); + } + offset += chunk.length; + } + return collected; +} +__name(headStream, "headStream"); + +// ../../node_modules/@smithy/querystring-builder/dist-es/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var escapeUri = /* @__PURE__ */ __name((uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode), "escapeUri"); +var hexEncode = /* @__PURE__ */ __name((c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, "hexEncode"); + +// ../../node_modules/@smithy/querystring-builder/dist-es/index.js +function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = escapeUri(key); + if (Array.isArray(value)) { + for (let i = 0, iLen = value.length; i < iLen; i++) { + parts.push(`${key}=${escapeUri(value[i])}`); + } + } else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${escapeUri(value)}`; + } + parts.push(qsEntry); + } + } + return parts.join("&"); +} +__name(buildQueryString, "buildQueryString"); + +// ../../node_modules/@smithy/util-hex-encoding/dist-es/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var SHORT_TO_HEX = {}; +var HEX_TO_SHORT = {}; +for (let i = 0; i < 256; i++) { + let encodedByte = i.toString(16).toLowerCase(); + if (encodedByte.length === 1) { + encodedByte = `0${encodedByte}`; + } + SHORT_TO_HEX[i] = encodedByte; + HEX_TO_SHORT[encodedByte] = i; +} +function fromHex(encoded) { + if (encoded.length % 2 !== 0) { + throw new Error("Hex encoded strings must have an even number length"); + } + const out = new Uint8Array(encoded.length / 2); + for (let i = 0; i < encoded.length; i += 2) { + const encodedByte = encoded.slice(i, i + 2).toLowerCase(); + if (encodedByte in HEX_TO_SHORT) { + out[i / 2] = HEX_TO_SHORT[encodedByte]; + } else { + throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + } + } + return out; +} +__name(fromHex, "fromHex"); +function toHex(bytes) { + let out = ""; + for (let i = 0; i < bytes.byteLength; i++) { + out += SHORT_TO_HEX[bytes[i]]; + } + return out; +} +__name(toHex, "toHex"); + +// ../../node_modules/@smithy/util-stream/dist-es/splitStream.browser.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +async function splitStream(stream) { + if (typeof stream.stream === "function") { + stream = stream.stream(); + } + const readableStream = stream; + return readableStream.tee(); +} +__name(splitStream, "splitStream"); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/deref.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var deref = /* @__PURE__ */ __name((schemaRef) => { + if (typeof schemaRef === "function") { + return schemaRef(); + } + return schemaRef; +}, "deref"); + +// ../../node_modules/@smithy/url-parser/dist-es/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@smithy/querystring-parser/dist-es/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } else if (Array.isArray(query[key])) { + query[key].push(value); + } else { + query[key] = [query[key], value]; + } + } + } + return query; +} +__name(parseQueryString, "parseQueryString"); + +// ../../node_modules/@smithy/url-parser/dist-es/index.js +var parseUrl = /* @__PURE__ */ __name((url2) => { + if (typeof url2 === "string") { + return parseUrl(new URL(url2)); + } + const { hostname: hostname3, pathname, port, protocol, search } = url2; + let query; + if (search) { + query = parseQueryString(search); + } + return { + hostname: hostname3, + port: port ? parseInt(port) : void 0, + protocol, + path: pathname, + query + }; +}, "parseUrl"); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var traitsCache = []; +function translateTraits(indicator) { + if (typeof indicator === "object") { + return indicator; + } + indicator = indicator | 0; + if (traitsCache[indicator]) { + return traitsCache[indicator]; + } + const traits = {}; + let i = 0; + for (const trait of [ + "httpLabel", + "idempotent", + "idempotencyToken", + "sensitive", + "httpPayload", + "httpResponseCode", + "httpQueryParams" + ]) { + if ((indicator >> i++ & 1) === 1) { + traits[trait] = 1; + } + } + return traitsCache[indicator] = traits; +} +__name(translateTraits, "translateTraits"); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +var anno = { + it: /* @__PURE__ */ Symbol.for("@smithy/nor-struct-it"), + ns: /* @__PURE__ */ Symbol.for("@smithy/ns") +}; +var simpleSchemaCacheN = []; +var simpleSchemaCacheS = {}; +var NormalizedSchema = class _NormalizedSchema { + static { + __name(this, "NormalizedSchema"); + } + ref; + memberName; + static symbol = /* @__PURE__ */ Symbol.for("@smithy/nor"); + symbol = _NormalizedSchema.symbol; + name; + schema; + _isMemberSchema; + traits; + memberTraits; + normalizedTraits; + constructor(ref2, memberName) { + this.ref = ref2; + this.memberName = memberName; + const traitStack = []; + let _ref = ref2; + let schema = ref2; + this._isMemberSchema = false; + while (isMemberSchema(_ref)) { + traitStack.push(_ref[1]); + _ref = _ref[0]; + schema = deref(_ref); + this._isMemberSchema = true; + } + if (traitStack.length > 0) { + this.memberTraits = {}; + for (let i = traitStack.length - 1; i >= 0; --i) { + const traitSet = traitStack[i]; + Object.assign(this.memberTraits, translateTraits(traitSet)); + } + } else { + this.memberTraits = 0; + } + if (schema instanceof _NormalizedSchema) { + const computedMemberTraits = this.memberTraits; + Object.assign(this, schema); + this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits()); + this.normalizedTraits = void 0; + this.memberName = memberName ?? schema.memberName; + return; + } + this.schema = deref(schema); + if (isStaticSchema(this.schema)) { + this.name = `${this.schema[1]}#${this.schema[2]}`; + this.traits = this.schema[3]; + } else { + this.name = this.memberName ?? String(schema); + this.traits = 0; + } + if (this._isMemberSchema && !memberName) { + throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`); + } + } + static [Symbol.hasInstance](lhs) { + const isPrototype = this.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const ns = lhs; + return ns.symbol === this.symbol; + } + return isPrototype; + } + static of(ref2) { + const keyAble = typeof ref2 === "function" || typeof ref2 === "object" && ref2 !== null; + if (typeof ref2 === "number") { + if (simpleSchemaCacheN[ref2]) { + return simpleSchemaCacheN[ref2]; + } + } else if (typeof ref2 === "string") { + if (simpleSchemaCacheS[ref2]) { + return simpleSchemaCacheS[ref2]; + } + } else if (keyAble) { + if (ref2[anno.ns]) { + return ref2[anno.ns]; + } + } + const sc = deref(ref2); + if (sc instanceof _NormalizedSchema) { + return sc; + } + if (isMemberSchema(sc)) { + const [ns2, traits] = sc; + if (ns2 instanceof _NormalizedSchema) { + Object.assign(ns2.getMergedTraits(), translateTraits(traits)); + return ns2; + } + throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref2, null, 2)}.`); + } + const ns = new _NormalizedSchema(sc); + if (keyAble) { + return ref2[anno.ns] = ns; + } + if (typeof sc === "string") { + return simpleSchemaCacheS[sc] = ns; + } + if (typeof sc === "number") { + return simpleSchemaCacheN[sc] = ns; + } + return ns; + } + getSchema() { + const sc = this.schema; + if (Array.isArray(sc) && sc[0] === 0) { + return sc[4]; + } + return sc; + } + getName(withNamespace = false) { + const { name } = this; + const short = !withNamespace && name && name.includes("#"); + return short ? name.split("#")[1] : name || void 0; + } + getMemberName() { + return this.memberName; + } + isMemberSchema() { + return this._isMemberSchema; + } + isListSchema() { + const sc = this.getSchema(); + return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1; + } + isMapSchema() { + const sc = this.getSchema(); + return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2; + } + isStructSchema() { + const sc = this.getSchema(); + if (typeof sc !== "object") { + return false; + } + const id = sc[0]; + return id === 3 || id === -3 || id === 4; + } + isUnionSchema() { + const sc = this.getSchema(); + if (typeof sc !== "object") { + return false; + } + return sc[0] === 4; + } + isBlobSchema() { + const sc = this.getSchema(); + return sc === 21 || sc === 42; + } + isTimestampSchema() { + const sc = this.getSchema(); + return typeof sc === "number" && sc >= 4 && sc <= 7; + } + isUnitSchema() { + return this.getSchema() === "unit"; + } + isDocumentSchema() { + return this.getSchema() === 15; + } + isStringSchema() { + return this.getSchema() === 0; + } + isBooleanSchema() { + return this.getSchema() === 2; + } + isNumericSchema() { + return this.getSchema() === 1; + } + isBigIntegerSchema() { + return this.getSchema() === 17; + } + isBigDecimalSchema() { + return this.getSchema() === 19; + } + isStreaming() { + const { streaming } = this.getMergedTraits(); + return !!streaming || this.getSchema() === 42; + } + isIdempotencyToken() { + return !!this.getMergedTraits().idempotencyToken; + } + getMergedTraits() { + return this.normalizedTraits ?? (this.normalizedTraits = { + ...this.getOwnTraits(), + ...this.getMemberTraits() + }); + } + getMemberTraits() { + return translateTraits(this.memberTraits); + } + getOwnTraits() { + return translateTraits(this.traits); + } + getKeySchema() { + const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()]; + if (!isDoc && !isMap) { + throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`); + } + const schema = this.getSchema(); + const memberSchema = isDoc ? 15 : schema[4] ?? 0; + return member([memberSchema, 0], "key"); + } + getValueSchema() { + const sc = this.getSchema(); + const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()]; + const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap || isList) ? sc[3 + sc[0]] : isDoc ? 15 : void 0; + if (memberSchema != null) { + return member([memberSchema, 0], isMap ? "value" : "member"); + } + throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`); + } + getMemberSchema(memberName) { + const struct = this.getSchema(); + if (this.isStructSchema() && struct[4].includes(memberName)) { + const i = struct[4].indexOf(memberName); + const memberSchema = struct[5][i]; + return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName); + } + if (this.isDocumentSchema()) { + return member([15, 0], memberName); + } + throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`); + } + getMemberSchemas() { + const buffer = {}; + try { + for (const [k, v2] of this.structIterator()) { + buffer[k] = v2; + } + } catch (ignored) { + } + return buffer; + } + getEventStreamMember() { + if (this.isStructSchema()) { + for (const [memberName, memberSchema] of this.structIterator()) { + if (memberSchema.isStreaming() && memberSchema.isStructSchema()) { + return memberName; + } + } + } + return ""; + } + *structIterator() { + if (this.isUnitSchema()) { + return; + } + if (!this.isStructSchema()) { + throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); + } + const struct = this.getSchema(); + const z2 = struct[4].length; + let it = struct[anno.it]; + if (it && z2 === it.length) { + yield* it; + return; + } + it = Array(z2); + for (let i = 0; i < z2; ++i) { + const k = struct[4][i]; + const v2 = member([struct[5][i], 0], k); + yield it[i] = [k, v2]; + } + struct[anno.it] = it; + } +}; +function member(memberSchema, memberName) { + if (memberSchema instanceof NormalizedSchema) { + return Object.assign(memberSchema, { + memberName, + _isMemberSchema: true + }); + } + const internalCtorAccess = NormalizedSchema; + return new internalCtorAccess(memberSchema, memberName); +} +__name(member, "member"); +var isMemberSchema = /* @__PURE__ */ __name((sc) => Array.isArray(sc) && sc.length === 2, "isMemberSchema"); +var isStaticSchema = /* @__PURE__ */ __name((sc) => Array.isArray(sc) && sc.length >= 5, "isStaticSchema"); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var TypeRegistry = class _TypeRegistry { + static { + __name(this, "TypeRegistry"); + } + namespace; + schemas; + exceptions; + static registries = /* @__PURE__ */ new Map(); + constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) { + this.namespace = namespace; + this.schemas = schemas; + this.exceptions = exceptions; + } + static for(namespace) { + if (!_TypeRegistry.registries.has(namespace)) { + _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace)); + } + return _TypeRegistry.registries.get(namespace); + } + copyFrom(other) { + const { schemas, exceptions } = this; + for (const [k, v2] of other.schemas) { + if (!schemas.has(k)) { + schemas.set(k, v2); + } + } + for (const [k, v2] of other.exceptions) { + if (!exceptions.has(k)) { + exceptions.set(k, v2); + } + } + } + register(shapeId, schema) { + const qualifiedName = this.normalizeShapeId(shapeId); + for (const r of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) { + r.schemas.set(qualifiedName, schema); + } + } + getSchema(shapeId) { + const id = this.normalizeShapeId(shapeId); + if (!this.schemas.has(id)) { + throw new Error(`@smithy/core/schema - schema not found for ${id}`); + } + return this.schemas.get(id); + } + registerError(es, ctor) { + const $error = es; + const ns = $error[1]; + for (const r of [this, _TypeRegistry.for(ns)]) { + r.schemas.set(ns + "#" + $error[2], $error); + r.exceptions.set($error, ctor); + } + } + getErrorCtor(es) { + const $error = es; + if (this.exceptions.has($error)) { + return this.exceptions.get($error); + } + const registry2 = _TypeRegistry.for($error[1]); + return registry2.exceptions.get($error); + } + getBaseException() { + for (const exceptionKey of this.exceptions.keys()) { + if (Array.isArray(exceptionKey)) { + const [, ns, name] = exceptionKey; + const id = ns + "#" + name; + if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) { + return exceptionKey; + } + } + } + return void 0; + } + find(predicate) { + return [...this.schemas.values()].find(predicate); + } + clear() { + this.schemas.clear(); + this.exceptions.clear(); + } + normalizeShapeId(shapeId) { + if (shapeId.includes("#")) { + return shapeId; + } + return this.namespace + "#" + shapeId; + } +}; + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var expectNumber = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "string") { + const parsed = parseFloat(value); + if (!Number.isNaN(parsed)) { + if (String(parsed) !== String(value)) { + logger2.warn(stackTraceWarning(`Expected number but observed string: ${value}`)); + } + return parsed; + } + } + if (typeof value === "number") { + return value; + } + throw new TypeError(`Expected number, got ${typeof value}: ${value}`); +}, "expectNumber"); +var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); +var expectFloat32 = /* @__PURE__ */ __name((value) => { + const expected = expectNumber(value); + if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { + if (Math.abs(expected) > MAX_FLOAT) { + throw new TypeError(`Expected 32-bit float, got ${value}`); + } + } + return expected; +}, "expectFloat32"); +var expectLong = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (Number.isInteger(value) && !Number.isNaN(value)) { + return value; + } + throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); +}, "expectLong"); +var expectShort = /* @__PURE__ */ __name((value) => expectSizedInt(value, 16), "expectShort"); +var expectByte = /* @__PURE__ */ __name((value) => expectSizedInt(value, 8), "expectByte"); +var expectSizedInt = /* @__PURE__ */ __name((value, size) => { + const expected = expectLong(value); + if (expected !== void 0 && castInt(expected, size) !== expected) { + throw new TypeError(`Expected ${size}-bit integer, got ${value}`); + } + return expected; +}, "expectSizedInt"); +var castInt = /* @__PURE__ */ __name((value, size) => { + switch (size) { + case 32: + return Int32Array.of(value)[0]; + case 16: + return Int16Array.of(value)[0]; + case 8: + return Int8Array.of(value)[0]; + } +}, "castInt"); +var strictParseFloat32 = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return expectFloat32(parseNumber(value)); + } + return expectFloat32(value); +}, "strictParseFloat32"); +var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; +var parseNumber = /* @__PURE__ */ __name((value) => { + const matches = value.match(NUMBER_REGEX); + if (matches === null || matches[0].length !== value.length) { + throw new TypeError(`Expected real number, got implicit NaN`); + } + return parseFloat(value); +}, "parseNumber"); +var strictParseShort = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectShort(parseNumber(value)); + } + return expectShort(value); +}, "strictParseShort"); +var strictParseByte = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectByte(parseNumber(value)); + } + return expectByte(value); +}, "strictParseByte"); +var stackTraceWarning = /* @__PURE__ */ __name((message2) => { + return String(new TypeError(message2).stack || message2).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n"); +}, "stackTraceWarning"); +var logger2 = { + warn: console.warn +}; + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js +var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; +var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); +var RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/); +var IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); +var RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); +var ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/); +var parseRfc7231DateTime = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-7231 date-times must be expressed as strings"); + } + let match2 = IMF_FIXDATE.exec(value); + if (match2) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match2; + return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + match2 = RFC_850_DATE.exec(value); + if (match2) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match2; + return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { + hours, + minutes, + seconds, + fractionalMilliseconds + })); + } + match2 = ASC_TIME.exec(value); + if (match2) { + const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match2; + return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + throw new TypeError("Invalid RFC-7231 date-time value"); +}, "parseRfc7231DateTime"); +var buildDate = /* @__PURE__ */ __name((year2, month, day2, time6) => { + const adjustedMonth = month - 1; + validateDayOfMonth(year2, adjustedMonth, day2); + return new Date(Date.UTC(year2, adjustedMonth, day2, parseDateValue(time6.hours, "hour", 0, 23), parseDateValue(time6.minutes, "minute", 0, 59), parseDateValue(time6.seconds, "seconds", 0, 60), parseMilliseconds(time6.fractionalMilliseconds))); +}, "buildDate"); +var parseTwoDigitYear = /* @__PURE__ */ __name((value) => { + const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear(); + const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value)); + if (valueInThisCentury < thisYear) { + return valueInThisCentury + 100; + } + return valueInThisCentury; +}, "parseTwoDigitYear"); +var FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3; +var adjustRfc850Year = /* @__PURE__ */ __name((input) => { + if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) { + return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds())); + } + return input; +}, "adjustRfc850Year"); +var parseMonthByShortName = /* @__PURE__ */ __name((value) => { + const monthIdx = MONTHS.indexOf(value); + if (monthIdx < 0) { + throw new TypeError(`Invalid month: ${value}`); + } + return monthIdx + 1; +}, "parseMonthByShortName"); +var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; +var validateDayOfMonth = /* @__PURE__ */ __name((year2, month, day2) => { + let maxDays = DAYS_IN_MONTH[month]; + if (month === 1 && isLeapYear(year2)) { + maxDays = 29; + } + if (day2 > maxDays) { + throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year2}: ${day2}`); + } +}, "validateDayOfMonth"); +var isLeapYear = /* @__PURE__ */ __name((year2) => { + return year2 % 4 === 0 && (year2 % 100 !== 0 || year2 % 400 === 0); +}, "isLeapYear"); +var parseDateValue = /* @__PURE__ */ __name((value, type, lower, upper) => { + const dateVal = strictParseByte(stripLeadingZeroes(value)); + if (dateVal < lower || dateVal > upper) { + throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`); + } + return dateVal; +}, "parseDateValue"); +var parseMilliseconds = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return 0; + } + return strictParseFloat32("0." + value) * 1e3; +}, "parseMilliseconds"); +var stripLeadingZeroes = /* @__PURE__ */ __name((value) => { + let idx = 0; + while (idx < value.length - 1 && value.charAt(idx) === "0") { + idx++; + } + if (idx === 0) { + return value; + } + return value.slice(idx); +}, "stripLeadingZeroes"); + +// ../../node_modules/@smithy/core/dist-es/setFeature.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function setFeature2(context2, feature2, value) { + if (!context2.__smithy_context) { + context2.__smithy_context = { + features: {} + }; + } else if (!context2.__smithy_context.features) { + context2.__smithy_context.features = {}; + } + context2.__smithy_context.features[feature2] = value; +} +__name(setFeature2, "setFeature"); + +// ../../node_modules/@smithy/signature-v4/dist-es/SignatureV4.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_dist_es(); + +// ../../node_modules/@smithy/signature-v4/dist-es/constants.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; +var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; +var AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; +var SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; +var EXPIRES_QUERY_PARAM = "X-Amz-Expires"; +var SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; +var TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; +var AUTH_HEADER = "authorization"; +var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); +var DATE_HEADER = "date"; +var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; +var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); +var SHA256_HEADER = "x-amz-content-sha256"; +var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); +var ALWAYS_UNSIGNABLE_HEADERS = { + authorization: true, + "cache-control": true, + connection: true, + expect: true, + from: true, + "keep-alive": true, + "max-forwards": true, + pragma: true, + referer: true, + te: true, + trailer: true, + "transfer-encoding": true, + upgrade: true, + "user-agent": true, + "x-amzn-trace-id": true +}; +var PROXY_HEADER_PATTERN = /^proxy-/; +var SEC_HEADER_PATTERN = /^sec-/; +var ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; +var EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; +var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; +var MAX_CACHE_SIZE = 50; +var KEY_TYPE_IDENTIFIER = "aws4_request"; +var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; + +// ../../node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_dist_es(); +var signingKeyCache = {}; +var cacheQueue = []; +var createScope = /* @__PURE__ */ __name((shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, "createScope"); +var getSigningKey = /* @__PURE__ */ __name(async (sha256Constructor, credentials, shortDate, region, service) => { + const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); + const cacheKey = `${shortDate}:${region}:${service}:${toHex(credsHash)}:${credentials.sessionToken}`; + if (cacheKey in signingKeyCache) { + return signingKeyCache[cacheKey]; + } + cacheQueue.push(cacheKey); + while (cacheQueue.length > MAX_CACHE_SIZE) { + delete signingKeyCache[cacheQueue.shift()]; + } + let key = `AWS4${credentials.secretAccessKey}`; + for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { + key = await hmac(sha256Constructor, key, signable); + } + return signingKeyCache[cacheKey] = key; +}, "getSigningKey"); +var hmac = /* @__PURE__ */ __name((ctor, secret, data) => { + const hash3 = new ctor(secret); + hash3.update(toUint8Array(data)); + return hash3.digest(); +}, "hmac"); + +// ../../node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var getCanonicalHeaders = /* @__PURE__ */ __name(({ headers }, unsignableHeaders, signableHeaders) => { + const canonical = {}; + for (const headerName of Object.keys(headers).sort()) { + if (headers[headerName] == void 0) { + continue; + } + const canonicalHeaderName = headerName.toLowerCase(); + if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) { + if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) { + continue; + } + } + canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); + } + return canonical; +}, "getCanonicalHeaders"); + +// ../../node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@smithy/is-array-buffer/dist-es/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); + +// ../../node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +init_dist_es(); +var getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => { + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase() === SHA256_HEADER) { + return headers[headerName]; + } + } + if (body == void 0) { + return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + } else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer(body)) { + const hashCtor = new hashConstructor(); + hashCtor.update(toUint8Array(body)); + return toHex(await hashCtor.digest()); + } + return UNSIGNED_PAYLOAD; +}, "getPayloadHash"); + +// ../../node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_dist_es(); +var HeaderFormatter = class { + static { + __name(this, "HeaderFormatter"); + } + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position3 = 0; + for (const chunk of chunks) { + out.set(chunk, position3); + position3 += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([header.value ? 0 : 1]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8(0, 3); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8(0, 4); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8(0, 6); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8(0, 7); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set(fromHex(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } +}; +var HEADER_VALUE_TYPE; +(function(HEADER_VALUE_TYPE2) { + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolTrue"] = 0] = "boolTrue"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolFalse"] = 1] = "boolFalse"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byte"] = 2] = "byte"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["short"] = 3] = "short"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["integer"] = 4] = "integer"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["long"] = 5] = "long"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byteArray"] = 6] = "byteArray"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["string"] = 7] = "string"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["timestamp"] = 8] = "timestamp"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["uuid"] = 9] = "uuid"; +})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {})); +var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; +var Int64 = class _Int64 { + static { + __name(this, "Int64"); + } + bytes; + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static fromNumber(number4) { + if (number4 > 9223372036854776e3 || number4 < -9223372036854776e3) { + throw new Error(`${number4} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i = 7, remaining = Math.abs(Math.round(number4)); i > -1 && remaining > 0; i--, remaining /= 256) { + bytes[i] = remaining; + } + if (number4 < 0) { + negate(bytes); + } + return new _Int64(bytes); + } + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate(bytes); + } + return parseInt(toHex(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } +}; +function negate(bytes) { + for (let i = 0; i < 8; i++) { + bytes[i] ^= 255; + } + for (let i = 7; i > -1; i--) { + bytes[i]++; + if (bytes[i] !== 0) + break; + } +} +__name(negate, "negate"); + +// ../../node_modules/@smithy/signature-v4/dist-es/headerUtil.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var hasHeader = /* @__PURE__ */ __name((soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; +}, "hasHeader"); + +// ../../node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var moveHeadersToQuery = /* @__PURE__ */ __name((request, options = {}) => { + const { headers, query = {} } = HttpRequest.clone(request); + for (const name of Object.keys(headers)) { + const lname = name.toLowerCase(); + if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) { + query[name] = headers[name]; + delete headers[name]; + } + } + return { + ...request, + headers, + query + }; +}, "moveHeadersToQuery"); + +// ../../node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var prepareRequest = /* @__PURE__ */ __name((request) => { + request = HttpRequest.clone(request); + for (const headerName of Object.keys(request.headers)) { + if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { + delete request.headers[headerName]; + } + } + return request; +}, "prepareRequest"); + +// ../../node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_dist_es(); + +// ../../node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => { + const keys = []; + const serialized = {}; + for (const key of Object.keys(query)) { + if (key.toLowerCase() === SIGNATURE_HEADER) { + continue; + } + const encodedKey = escapeUri(key); + keys.push(encodedKey); + const value = query[key]; + if (typeof value === "string") { + serialized[encodedKey] = `${encodedKey}=${escapeUri(value)}`; + } else if (Array.isArray(value)) { + serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${escapeUri(value2)}`]), []).sort().join("&"); + } + } + return keys.sort().map((key) => serialized[key]).filter((serialized2) => serialized2).join("&"); +}, "getCanonicalQuery"); + +// ../../node_modules/@smithy/signature-v4/dist-es/utilDate.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var iso8601 = /* @__PURE__ */ __name((time6) => toDate(time6).toISOString().replace(/\.\d{3}Z$/, "Z"), "iso8601"); +var toDate = /* @__PURE__ */ __name((time6) => { + if (typeof time6 === "number") { + return new Date(time6 * 1e3); + } + if (typeof time6 === "string") { + if (Number(time6)) { + return new Date(Number(time6) * 1e3); + } + return new Date(time6); + } + return time6; +}, "toDate"); + +// ../../node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +var SignatureV4Base = class { + static { + __name(this, "SignatureV4Base"); + } + service; + regionProvider; + credentialProvider; + sha256; + uriEscapePath; + applyChecksum; + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) { + this.service = service; + this.sha256 = sha256; + this.uriEscapePath = uriEscapePath; + this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; + this.regionProvider = normalizeProvider(region); + this.credentialProvider = normalizeProvider(credentials); + } + createCanonicalRequest(request, canonicalHeaders, payloadHash) { + const sortedHeaders = Object.keys(canonicalHeaders).sort(); + return `${request.method} +${this.getCanonicalPath(request)} +${getCanonicalQuery(request)} +${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")} + +${sortedHeaders.join(";")} +${payloadHash}`; + } + async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) { + const hash3 = new this.sha256(); + hash3.update(toUint8Array(canonicalRequest)); + const hashedRequest = await hash3.digest(); + return `${algorithmIdentifier} +${longDate} +${credentialScope} +${toHex(hashedRequest)}`; + } + getCanonicalPath({ path: path3 }) { + if (this.uriEscapePath) { + const normalizedPathSegments = []; + for (const pathSegment of path3.split("/")) { + if (pathSegment?.length === 0) + continue; + if (pathSegment === ".") + continue; + if (pathSegment === "..") { + normalizedPathSegments.pop(); + } else { + normalizedPathSegments.push(pathSegment); + } + } + const normalizedPath = `${path3?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path3?.endsWith("/") ? "/" : ""}`; + const doubleEncoded = escapeUri(normalizedPath); + return doubleEncoded.replace(/%2F/g, "/"); + } + return path3; + } + validateResolvedCredentials(credentials) { + if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") { + throw new Error("Resolved credential object is not valid"); + } + } + formatDate(now) { + const longDate = iso8601(now).replace(/[\-:]/g, ""); + return { + longDate, + shortDate: longDate.slice(0, 8) + }; + } + getCanonicalHeaderList(headers) { + return Object.keys(headers).sort().join(";"); + } +}; + +// ../../node_modules/@smithy/signature-v4/dist-es/SignatureV4.js +var SignatureV4 = class extends SignatureV4Base { + static { + __name(this, "SignatureV4"); + } + headerFormatter = new HeaderFormatter(); + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) { + super({ + applyChecksum, + credentials, + region, + service, + sha256, + uriEscapePath + }); + } + async presign(originalRequest, options = {}) { + const { signingDate = /* @__PURE__ */ new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService } = options; + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { longDate, shortDate } = this.formatDate(signingDate); + if (expiresIn > MAX_PRESIGNED_TTL) { + return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future"); + } + const scope = createScope(shortDate, region, signingService ?? this.service); + const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders }); + if (credentials.sessionToken) { + request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken; + } + request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER; + request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; + request.query[AMZ_DATE_QUERY_PARAM] = longDate; + request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10); + const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders); + request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256))); + return request; + } + async sign(toSign, options) { + if (typeof toSign === "string") { + return this.signString(toSign, options); + } else if (toSign.headers && toSign.payload) { + return this.signEvent(toSign, options); + } else if (toSign.message) { + return this.signMessage(toSign, options); + } else { + return this.signRequest(toSign, options); + } + } + async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) { + const region = signingRegion ?? await this.regionProvider(); + const { shortDate, longDate } = this.formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256); + const hash3 = new this.sha256(); + hash3.update(headers); + const hashedHeaders = toHex(await hash3.digest()); + const stringToSign = [ + EVENT_ALGORITHM_IDENTIFIER, + longDate, + scope, + priorSignature, + hashedHeaders, + hashedPayload + ].join("\n"); + return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); + } + async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) { + const promise2 = this.signEvent({ + headers: this.headerFormatter.format(signableMessage.message.headers), + payload: signableMessage.message.body + }, { + signingDate, + signingRegion, + signingService, + priorSignature: signableMessage.priorSignature + }); + return promise2.then((signature) => { + return { message: signableMessage.message, signature }; + }); + } + async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { shortDate } = this.formatDate(signingDate); + const hash3 = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); + hash3.update(toUint8Array(stringToSign)); + return toHex(await hash3.digest()); + } + async signRequest(requestToSign, { signingDate = /* @__PURE__ */ new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const request = prepareRequest(requestToSign); + const { longDate, shortDate } = this.formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + request.headers[AMZ_DATE_HEADER] = longDate; + if (credentials.sessionToken) { + request.headers[TOKEN_HEADER] = credentials.sessionToken; + } + const payloadHash = await getPayloadHash(request, this.sha256); + if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) { + request.headers[SHA256_HEADER] = payloadHash; + } + const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash)); + request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`; + return request; + } + async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { + const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER); + const hash3 = new this.sha256(await keyPromise); + hash3.update(toUint8Array(stringToSign)); + return toHex(await hash3.digest()); + } + getSigningKey(credentials, region, shortDate, service) { + return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); + } +}; + +// ../../node_modules/@smithy/signature-v4/dist-es/signature-v4a-container.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var signatureV4aContainer = { + SignatureV4a: null +}; + +// ../../node_modules/@smithy/middleware-stack/dist-es/MiddlewareStack.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var getAllAliases = /* @__PURE__ */ __name((name, aliases) => { + const _aliases = []; + if (name) { + _aliases.push(name); + } + if (aliases) { + for (const alias of aliases) { + _aliases.push(alias); + } + } + return _aliases; +}, "getAllAliases"); +var getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => { + return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; +}, "getMiddlewareNameWithAliases"); +var constructStack = /* @__PURE__ */ __name(() => { + let absoluteEntries = []; + let relativeEntries = []; + let identifyOnResolve = false; + const entriesNameSet = /* @__PURE__ */ new Set(); + const sort = /* @__PURE__ */ __name((entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"]), "sort"); + const removeByName = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + const aliases = getAllAliases(entry.name, entry.aliases); + if (aliases.includes(toRemove)) { + isRemoved = true; + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByName"); + const removeByReference = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + if (entry.middleware === toRemove) { + isRemoved = true; + for (const alias of getAllAliases(entry.name, entry.aliases)) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByReference"); + const cloneTo = /* @__PURE__ */ __name((toStack) => { + absoluteEntries.forEach((entry) => { + toStack.add(entry.middleware, { ...entry }); + }); + relativeEntries.forEach((entry) => { + toStack.addRelativeTo(entry.middleware, { ...entry }); + }); + toStack.identifyOnResolve?.(stack.identifyOnResolve()); + return toStack; + }, "cloneTo"); + const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => { + const expandedMiddlewareList = []; + from.before.forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + expandedMiddlewareList.push(from); + from.after.reverse().forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + return expandedMiddlewareList; + }, "expandRelativeMiddlewareList"); + const getMiddlewareList = /* @__PURE__ */ __name((debug3 = false) => { + const normalizedAbsoluteEntries = []; + const normalizedRelativeEntries = []; + const normalizedEntriesNameMap = {}; + absoluteEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedAbsoluteEntries.push(normalizedEntry); + }); + relativeEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedRelativeEntries.push(normalizedEntry); + }); + normalizedRelativeEntries.forEach((entry) => { + if (entry.toMiddleware) { + const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; + if (toMiddleware === void 0) { + if (debug3) { + return; + } + throw new Error(`${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`); + } + if (entry.relation === "after") { + toMiddleware.after.push(entry); + } + if (entry.relation === "before") { + toMiddleware.before.push(entry); + } + } + }); + const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => { + wholeList.push(...expandedMiddlewareList); + return wholeList; + }, []); + return mainChain; + }, "getMiddlewareList"); + const stack = { + add: /* @__PURE__ */ __name((middleware2, options = {}) => { + const { name, override, aliases: _aliases } = options; + const entry = { + step: "initialize", + priority: "normal", + middleware: middleware2, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = absoluteEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias)); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = absoluteEntries[toOverrideIndex]; + if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ${entry.priority} priority in ${entry.step} step.`); + } + absoluteEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + absoluteEntries.push(entry); + }, "add"), + addRelativeTo: /* @__PURE__ */ __name((middleware2, options) => { + const { name, override, aliases: _aliases } = options; + const entry = { + middleware: middleware2, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = relativeEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias)); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = relativeEntries[toOverrideIndex]; + if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.`); + } + relativeEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + relativeEntries.push(entry); + }, "addRelativeTo"), + clone: /* @__PURE__ */ __name(() => cloneTo(constructStack()), "clone"), + use: /* @__PURE__ */ __name((plugin) => { + plugin.applyToStack(stack); + }, "use"), + remove: /* @__PURE__ */ __name((toRemove) => { + if (typeof toRemove === "string") + return removeByName(toRemove); + else + return removeByReference(toRemove); + }, "remove"), + removeByTag: /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + const { tags, name, aliases: _aliases } = entry; + if (tags && tags.includes(toRemove)) { + const aliases = getAllAliases(name, _aliases); + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + isRemoved = true; + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByTag"), + concat: /* @__PURE__ */ __name((from) => { + const cloned = cloneTo(constructStack()); + cloned.use(from); + cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false)); + return cloned; + }, "concat"), + applyToStack: cloneTo, + identify: /* @__PURE__ */ __name(() => { + return getMiddlewareList(true).map((mw) => { + const step = mw.step ?? mw.relation + " " + mw.toMiddleware; + return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; + }); + }, "identify"), + identifyOnResolve(toggle) { + if (typeof toggle === "boolean") + identifyOnResolve = toggle; + return identifyOnResolve; + }, + resolve: /* @__PURE__ */ __name((handler, context2) => { + for (const middleware2 of getMiddlewareList().map((entry) => entry.middleware).reverse()) { + handler = middleware2(handler, context2); + } + if (identifyOnResolve) { + console.log(stack.identify()); + } + return handler; + }, "resolve") + }; + return stack; +}, "constructStack"); +var stepWeights = { + initialize: 5, + serialize: 4, + build: 3, + finalizeRequest: 2, + deserialize: 1 +}; +var priorityWeights = { + high: 3, + normal: 2, + low: 1 +}; + +// ../../node_modules/@smithy/smithy-client/dist-es/command.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@smithy/smithy-client/dist-es/schemaLogFilter.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var SENSITIVE_STRING = "***SensitiveInformation***"; +function schemaLogFilter(schema, data) { + if (data == null) { + return data; + } + const ns = NormalizedSchema.of(schema); + if (ns.getMergedTraits().sensitive) { + return SENSITIVE_STRING; + } + if (ns.isListSchema()) { + const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING; + } + } else if (ns.isMapSchema()) { + const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING; + } + } else if (ns.isStructSchema() && typeof data === "object") { + const object2 = data; + const newObject = {}; + for (const [member2, memberNs] of ns.structIterator()) { + if (object2[member2] != null) { + newObject[member2] = schemaLogFilter(memberNs, object2[member2]); + } + } + return newObject; + } + return data; +} +__name(schemaLogFilter, "schemaLogFilter"); + +// ../../node_modules/@smithy/smithy-client/dist-es/command.js +var Command = class { + static { + __name(this, "Command"); + } + middlewareStack = constructStack(); + schema; + static classBuilder() { + return new ClassBuilder(); + } + resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) { + for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { + this.middlewareStack.use(mw); + } + const stack = clientStack.concat(this.middlewareStack); + const { logger: logger4 } = configuration; + const handlerExecutionContext = { + logger: logger4, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + commandInstance: this, + ...smithyContext + }, + ...additionalContext + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } +}; +var ClassBuilder = class { + static { + __name(this, "ClassBuilder"); + } + _init = /* @__PURE__ */ __name(() => { + }, "_init"); + _ep = {}; + _middlewareFn = /* @__PURE__ */ __name(() => [], "_middlewareFn"); + _commandName = ""; + _clientName = ""; + _additionalContext = {}; + _smithyContext = {}; + _inputFilterSensitiveLog = void 0; + _outputFilterSensitiveLog = void 0; + _serializer = null; + _deserializer = null; + _operationSchema; + init(cb) { + this._init = cb; + } + ep(endpointParameterInstructions) { + this._ep = endpointParameterInstructions; + return this; + } + m(middlewareSupplier) { + this._middlewareFn = middlewareSupplier; + return this; + } + s(service, operation, smithyContext = {}) { + this._smithyContext = { + service, + operation, + ...smithyContext + }; + return this; + } + c(additionalContext = {}) { + this._additionalContext = additionalContext; + return this; + } + n(clientName, commandName) { + this._clientName = clientName; + this._commandName = commandName; + return this; + } + f(inputFilter = (_) => _, outputFilter = (_) => _) { + this._inputFilterSensitiveLog = inputFilter; + this._outputFilterSensitiveLog = outputFilter; + return this; + } + ser(serializer) { + this._serializer = serializer; + return this; + } + de(deserializer) { + this._deserializer = deserializer; + return this; + } + sc(operation) { + this._operationSchema = operation; + this._smithyContext.operationSchema = operation; + return this; + } + build() { + const closure = this; + let CommandRef; + return CommandRef = class extends Command { + static { + __name(this, "CommandRef"); + } + input; + static getEndpointParameterInstructions() { + return closure._ep; + } + constructor(...[input]) { + super(); + this.input = input ?? {}; + closure._init(this); + this.schema = closure._operationSchema; + } + resolveMiddleware(stack, configuration, options) { + const op = closure._operationSchema; + const input = op?.[4] ?? op?.input; + const output = op?.[5] ?? op?.output; + return this.resolveMiddlewareWithContext(stack, configuration, options, { + CommandCtor: CommandRef, + middlewareFn: closure._middlewareFn, + clientName: closure._clientName, + commandName: closure._commandName, + inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_) => _), + outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_) => _), + smithyContext: closure._smithyContext, + additionalContext: closure._additionalContext + }); + } + serialize = closure._serializer; + deserialize = closure._deserializer; + }; + } +}; + +// ../../node_modules/@smithy/smithy-client/dist-es/exceptions.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var ServiceException = class _ServiceException extends Error { + static { + __name(this, "ServiceException"); + } + $fault; + $response; + $retryable; + $metadata; + constructor(options) { + super(options.message); + Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype); + this.name = options.name; + this.$fault = options.$fault; + this.$metadata = options.$metadata; + } + static isInstance(value) { + if (!value) + return false; + const candidate = value; + return _ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server"); + } + static [Symbol.hasInstance](instance) { + if (!instance) + return false; + const candidate = instance; + if (this === _ServiceException) { + return _ServiceException.isInstance(instance); + } + if (_ServiceException.isInstance(instance)) { + if (candidate.name && this.name) { + return this.prototype.isPrototypeOf(instance) || candidate.name === this.name; + } + return this.prototype.isPrototypeOf(instance); + } + return false; + } +}; + +// ../../node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var NoOpLogger = class { + static { + __name(this, "NoOpLogger"); + } + trace() { + } + debug() { + } + info() { + } + warn() { + } + error() { + } +}; + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmForRequest.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var getChecksumAlgorithmForRequest = /* @__PURE__ */ __name((input, { requestChecksumRequired, requestAlgorithmMember, requestChecksumCalculation }) => { + if (!requestAlgorithmMember) { + return requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired ? DEFAULT_CHECKSUM_ALGORITHM : void 0; + } + if (!input[requestAlgorithmMember]) { + return void 0; + } + const checksumAlgorithm = input[requestAlgorithmMember]; + return checksumAlgorithm; +}, "getChecksumAlgorithmForRequest"); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumLocationName.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var getChecksumLocationName = /* @__PURE__ */ __name((algorithm) => algorithm === ChecksumAlgorithm.MD5 ? "content-md5" : `x-amz-checksum-${algorithm.toLowerCase()}`, "getChecksumLocationName"); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeader.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var hasHeader2 = /* @__PURE__ */ __name((header, headers) => { + const soughtHeader = header.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; +}, "hasHeader"); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeaderWithPrefix.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var hasHeaderWithPrefix = /* @__PURE__ */ __name((headerPrefix, headers) => { + const soughtHeaderPrefix = headerPrefix.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase().startsWith(soughtHeaderPrefix)) { + return true; + } + } + return false; +}, "hasHeaderWithPrefix"); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isStreaming.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var isStreaming = /* @__PURE__ */ __name((body) => body !== void 0 && typeof body !== "string" && !ArrayBuffer.isView(body) && !isArrayBuffer(body), "isStreaming"); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/selectChecksumAlgorithmFunction.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-crypto/crc32c/build/module/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/tslib/tslib.es6.mjs +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function __rest(s, e) { + var t8 = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t8[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t8[p[i]] = s[p[i]]; + } + return t8; +} +__name(__rest, "__rest"); +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} +__name(__awaiter, "__awaiter"); +function __generator(thisArg, body) { + var _ = { label: 0, sent: /* @__PURE__ */ __name(function() { + if (t8[0] & 1) throw t8[1]; + return t8[1]; + }, "sent"), trys: [], ops: [] }, f, y, t8, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v2) { + return step([n, v2]); + }; + } + __name(verb, "verb"); + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t8 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t8 = y["return"]) && t8.call(y), 0) : y.next) && !(t8 = t8.call(y, op[1])).done) return t8; + if (y = 0, t8) op = [op[0] & 2, t8.value]; + switch (op[0]) { + case 0: + case 1: + t8 = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t8 = _.trys, t8 = t8.length > 0 && t8[t8.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t8 || op[1] > t8[0] && op[1] < t8[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t8[1]) { + _.label = t8[1]; + t8 = op; + break; + } + if (t8 && _.label < t8[2]) { + _.label = t8[2]; + _.ops.push(op); + break; + } + if (t8[2]) _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t8 = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + __name(step, "step"); +} +__name(__generator, "__generator"); +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: /* @__PURE__ */ __name(function() { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + }, "next") + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} +__name(__values, "__values"); + +// ../../node_modules/@aws-crypto/util/build/module/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-crypto/util/build/module/convertToBuffer.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var fromUtf82 = /* @__PURE__ */ __name((input) => new TextEncoder().encode(input), "fromUtf8"); + +// ../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-crypto/util/build/module/convertToBuffer.js +var fromUtf83 = typeof Buffer !== "undefined" && Buffer.from ? function(input) { + return Buffer.from(input, "utf8"); +} : fromUtf82; +function convertToBuffer(data) { + if (data instanceof Uint8Array) + return data; + if (typeof data === "string") { + return fromUtf83(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); +} +__name(convertToBuffer, "convertToBuffer"); + +// ../../node_modules/@aws-crypto/util/build/module/isEmptyData.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function isEmptyData(data) { + if (typeof data === "string") { + return data.length === 0; + } + return data.byteLength === 0; +} +__name(isEmptyData, "isEmptyData"); + +// ../../node_modules/@aws-crypto/util/build/module/numToUint8.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function numToUint8(num) { + return new Uint8Array([ + (num & 4278190080) >> 24, + (num & 16711680) >> 16, + (num & 65280) >> 8, + num & 255 + ]); +} +__name(numToUint8, "numToUint8"); + +// ../../node_modules/@aws-crypto/util/build/module/uint32ArrayFrom.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function uint32ArrayFrom(a_lookUpTable2) { + if (!Uint32Array.from) { + var return_array = new Uint32Array(a_lookUpTable2.length); + var a_index = 0; + while (a_index < a_lookUpTable2.length) { + return_array[a_index] = a_lookUpTable2[a_index]; + a_index += 1; + } + return return_array; + } + return Uint32Array.from(a_lookUpTable2); +} +__name(uint32ArrayFrom, "uint32ArrayFrom"); + +// ../../node_modules/@aws-crypto/crc32c/build/module/aws_crc32c.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var AwsCrc32c = ( + /** @class */ + (function() { + function AwsCrc32c2() { + this.crc32c = new Crc32c(); + } + __name(AwsCrc32c2, "AwsCrc32c"); + AwsCrc32c2.prototype.update = function(toHash) { + if (isEmptyData(toHash)) + return; + this.crc32c.update(convertToBuffer(toHash)); + }; + AwsCrc32c2.prototype.digest = function() { + return __awaiter(this, void 0, void 0, function() { + return __generator(this, function(_a2) { + return [2, numToUint8(this.crc32c.digest())]; + }); + }); + }; + AwsCrc32c2.prototype.reset = function() { + this.crc32c = new Crc32c(); + }; + return AwsCrc32c2; + })() +); + +// ../../node_modules/@aws-crypto/crc32c/build/module/index.js +var Crc32c = ( + /** @class */ + (function() { + function Crc32c2() { + this.checksum = 4294967295; + } + __name(Crc32c2, "Crc32c"); + Crc32c2.prototype.update = function(data) { + var e_1, _a2; + try { + for (var data_1 = __values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { + var byte = data_1_1.value; + this.checksum = this.checksum >>> 8 ^ lookupTable[(this.checksum ^ byte) & 255]; + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (data_1_1 && !data_1_1.done && (_a2 = data_1.return)) _a2.call(data_1); + } finally { + if (e_1) throw e_1.error; + } + } + return this; + }; + Crc32c2.prototype.digest = function() { + return (this.checksum ^ 4294967295) >>> 0; + }; + return Crc32c2; + })() +); +var a_lookupTable = [ + 0, + 4067132163, + 3778769143, + 324072436, + 3348797215, + 904991772, + 648144872, + 3570033899, + 2329499855, + 2024987596, + 1809983544, + 2575936315, + 1296289744, + 3207089363, + 2893594407, + 1578318884, + 274646895, + 3795141740, + 4049975192, + 51262619, + 3619967088, + 632279923, + 922689671, + 3298075524, + 2592579488, + 1760304291, + 2075979607, + 2312596564, + 1562183871, + 2943781820, + 3156637768, + 1313733451, + 549293790, + 3537243613, + 3246849577, + 871202090, + 3878099393, + 357341890, + 102525238, + 4101499445, + 2858735121, + 1477399826, + 1264559846, + 3107202533, + 1845379342, + 2677391885, + 2361733625, + 2125378298, + 820201905, + 3263744690, + 3520608582, + 598981189, + 4151959214, + 85089709, + 373468761, + 3827903834, + 3124367742, + 1213305469, + 1526817161, + 2842354314, + 2107672161, + 2412447074, + 2627466902, + 1861252501, + 1098587580, + 3004210879, + 2688576843, + 1378610760, + 2262928035, + 1955203488, + 1742404180, + 2511436119, + 3416409459, + 969524848, + 714683780, + 3639785095, + 205050476, + 4266873199, + 3976438427, + 526918040, + 1361435347, + 2739821008, + 2954799652, + 1114974503, + 2529119692, + 1691668175, + 2005155131, + 2247081528, + 3690758684, + 697762079, + 986182379, + 3366744552, + 476452099, + 3993867776, + 4250756596, + 255256311, + 1640403810, + 2477592673, + 2164122517, + 1922457750, + 2791048317, + 1412925310, + 1197962378, + 3037525897, + 3944729517, + 427051182, + 170179418, + 4165941337, + 746937522, + 3740196785, + 3451792453, + 1070968646, + 1905808397, + 2213795598, + 2426610938, + 1657317369, + 3053634322, + 1147748369, + 1463399397, + 2773627110, + 4215344322, + 153784257, + 444234805, + 3893493558, + 1021025245, + 3467647198, + 3722505002, + 797665321, + 2197175160, + 1889384571, + 1674398607, + 2443626636, + 1164749927, + 3070701412, + 2757221520, + 1446797203, + 137323447, + 4198817972, + 3910406976, + 461344835, + 3484808360, + 1037989803, + 781091935, + 3705997148, + 2460548119, + 1623424788, + 1939049696, + 2180517859, + 1429367560, + 2807687179, + 3020495871, + 1180866812, + 410100952, + 3927582683, + 4182430767, + 186734380, + 3756733383, + 763408580, + 1053836080, + 3434856499, + 2722870694, + 1344288421, + 1131464017, + 2971354706, + 1708204729, + 2545590714, + 2229949006, + 1988219213, + 680717673, + 3673779818, + 3383336350, + 1002577565, + 4010310262, + 493091189, + 238226049, + 4233660802, + 2987750089, + 1082061258, + 1395524158, + 2705686845, + 1972364758, + 2279892693, + 2494862625, + 1725896226, + 952904198, + 3399985413, + 3656866545, + 731699698, + 4283874585, + 222117402, + 510512622, + 3959836397, + 3280807620, + 837199303, + 582374963, + 3504198960, + 68661723, + 4135334616, + 3844915500, + 390545967, + 1230274059, + 3141532936, + 2825850620, + 1510247935, + 2395924756, + 2091215383, + 1878366691, + 2644384480, + 3553878443, + 565732008, + 854102364, + 3229815391, + 340358836, + 3861050807, + 4117890627, + 119113024, + 1493875044, + 2875275879, + 3090270611, + 1247431312, + 2660249211, + 1828433272, + 2141937292, + 2378227087, + 3811616794, + 291187481, + 34330861, + 4032846830, + 615137029, + 3603020806, + 3314634738, + 939183345, + 1776939221, + 2609017814, + 2295496738, + 2058945313, + 2926798794, + 1545135305, + 1330124605, + 3173225534, + 4084100981, + 17165430, + 307568514, + 3762199681, + 888469610, + 3332340585, + 3587147933, + 665062302, + 2042050490, + 2346497209, + 2559330125, + 1793573966, + 3190661285, + 1279665062, + 1595330642, + 2910671697 +]; +var lookupTable = uint32ArrayFrom(a_lookupTable); + +// ../../node_modules/@aws-sdk/crc64-nvme/dist-es/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-sdk/crc64-nvme/dist-es/Crc64Nvme.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var generateCRC64NVMETable = /* @__PURE__ */ __name(() => { + const sliceLength = 8; + const tables = new Array(sliceLength); + for (let slice = 0; slice < sliceLength; slice++) { + const table3 = new Array(512); + for (let i = 0; i < 256; i++) { + let crc = BigInt(i); + for (let j = 0; j < 8 * (slice + 1); j++) { + if (crc & 1n) { + crc = crc >> 1n ^ 0x9a6c9329ac4bc9b5n; + } else { + crc = crc >> 1n; + } + } + table3[i * 2] = Number(crc >> 32n & 0xffffffffn); + table3[i * 2 + 1] = Number(crc & 0xffffffffn); + } + tables[slice] = new Uint32Array(table3); + } + return tables; +}, "generateCRC64NVMETable"); +var CRC64_NVME_REVERSED_TABLE; +var t0; +var t1; +var t2; +var t3; +var t4; +var t5; +var t6; +var t7; +var ensureTablesInitialized = /* @__PURE__ */ __name(() => { + if (!CRC64_NVME_REVERSED_TABLE) { + CRC64_NVME_REVERSED_TABLE = generateCRC64NVMETable(); + [t0, t1, t2, t3, t4, t5, t6, t7] = CRC64_NVME_REVERSED_TABLE; + } +}, "ensureTablesInitialized"); +var Crc64Nvme = class { + static { + __name(this, "Crc64Nvme"); + } + c1 = 0; + c2 = 0; + constructor() { + ensureTablesInitialized(); + this.reset(); + } + update(data) { + const len = data.length; + let i = 0; + let crc1 = this.c1; + let crc2 = this.c2; + while (i + 8 <= len) { + const idx0 = ((crc2 ^ data[i++]) & 255) << 1; + const idx1 = ((crc2 >>> 8 ^ data[i++]) & 255) << 1; + const idx2 = ((crc2 >>> 16 ^ data[i++]) & 255) << 1; + const idx3 = ((crc2 >>> 24 ^ data[i++]) & 255) << 1; + const idx4 = ((crc1 ^ data[i++]) & 255) << 1; + const idx5 = ((crc1 >>> 8 ^ data[i++]) & 255) << 1; + const idx6 = ((crc1 >>> 16 ^ data[i++]) & 255) << 1; + const idx7 = ((crc1 >>> 24 ^ data[i++]) & 255) << 1; + crc1 = t7[idx0] ^ t6[idx1] ^ t5[idx2] ^ t4[idx3] ^ t3[idx4] ^ t2[idx5] ^ t1[idx6] ^ t0[idx7]; + crc2 = t7[idx0 + 1] ^ t6[idx1 + 1] ^ t5[idx2 + 1] ^ t4[idx3 + 1] ^ t3[idx4 + 1] ^ t2[idx5 + 1] ^ t1[idx6 + 1] ^ t0[idx7 + 1]; + } + while (i < len) { + const idx = ((crc2 ^ data[i]) & 255) << 1; + crc2 = (crc2 >>> 8 | (crc1 & 255) << 24) >>> 0; + crc1 = crc1 >>> 8 ^ t0[idx]; + crc2 ^= t0[idx + 1]; + i++; + } + this.c1 = crc1; + this.c2 = crc2; + } + async digest() { + const c1 = this.c1 ^ 4294967295; + const c2 = this.c2 ^ 4294967295; + return new Uint8Array([ + c1 >>> 24, + c1 >>> 16 & 255, + c1 >>> 8 & 255, + c1 & 255, + c2 >>> 24, + c2 >>> 16 & 255, + c2 >>> 8 & 255, + c2 & 255 + ]); + } + reset() { + this.c1 = 4294967295; + this.c2 = 4294967295; + } +}; + +// ../../node_modules/@aws-sdk/crc64-nvme/dist-es/crc64-nvme-crt-container.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var crc64NvmeCrtContainer = { + CrtCrc64Nvme: null +}; + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getCrc32ChecksumAlgorithmFunction.browser.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-crypto/crc32/build/module/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-crypto/crc32/build/module/aws_crc32.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var AwsCrc32 = ( + /** @class */ + (function() { + function AwsCrc322() { + this.crc32 = new Crc32(); + } + __name(AwsCrc322, "AwsCrc32"); + AwsCrc322.prototype.update = function(toHash) { + if (isEmptyData(toHash)) + return; + this.crc32.update(convertToBuffer(toHash)); + }; + AwsCrc322.prototype.digest = function() { + return __awaiter(this, void 0, void 0, function() { + return __generator(this, function(_a2) { + return [2, numToUint8(this.crc32.digest())]; + }); + }); + }; + AwsCrc322.prototype.reset = function() { + this.crc32 = new Crc32(); + }; + return AwsCrc322; + })() +); + +// ../../node_modules/@aws-crypto/crc32/build/module/index.js +var Crc32 = ( + /** @class */ + (function() { + function Crc322() { + this.checksum = 4294967295; + } + __name(Crc322, "Crc32"); + Crc322.prototype.update = function(data) { + var e_1, _a2; + try { + for (var data_1 = __values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { + var byte = data_1_1.value; + this.checksum = this.checksum >>> 8 ^ lookupTable2[(this.checksum ^ byte) & 255]; + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (data_1_1 && !data_1_1.done && (_a2 = data_1.return)) _a2.call(data_1); + } finally { + if (e_1) throw e_1.error; + } + } + return this; + }; + Crc322.prototype.digest = function() { + return (this.checksum ^ 4294967295) >>> 0; + }; + return Crc322; + })() +); +var a_lookUpTable = [ + 0, + 1996959894, + 3993919788, + 2567524794, + 124634137, + 1886057615, + 3915621685, + 2657392035, + 249268274, + 2044508324, + 3772115230, + 2547177864, + 162941995, + 2125561021, + 3887607047, + 2428444049, + 498536548, + 1789927666, + 4089016648, + 2227061214, + 450548861, + 1843258603, + 4107580753, + 2211677639, + 325883990, + 1684777152, + 4251122042, + 2321926636, + 335633487, + 1661365465, + 4195302755, + 2366115317, + 997073096, + 1281953886, + 3579855332, + 2724688242, + 1006888145, + 1258607687, + 3524101629, + 2768942443, + 901097722, + 1119000684, + 3686517206, + 2898065728, + 853044451, + 1172266101, + 3705015759, + 2882616665, + 651767980, + 1373503546, + 3369554304, + 3218104598, + 565507253, + 1454621731, + 3485111705, + 3099436303, + 671266974, + 1594198024, + 3322730930, + 2970347812, + 795835527, + 1483230225, + 3244367275, + 3060149565, + 1994146192, + 31158534, + 2563907772, + 4023717930, + 1907459465, + 112637215, + 2680153253, + 3904427059, + 2013776290, + 251722036, + 2517215374, + 3775830040, + 2137656763, + 141376813, + 2439277719, + 3865271297, + 1802195444, + 476864866, + 2238001368, + 4066508878, + 1812370925, + 453092731, + 2181625025, + 4111451223, + 1706088902, + 314042704, + 2344532202, + 4240017532, + 1658658271, + 366619977, + 2362670323, + 4224994405, + 1303535960, + 984961486, + 2747007092, + 3569037538, + 1256170817, + 1037604311, + 2765210733, + 3554079995, + 1131014506, + 879679996, + 2909243462, + 3663771856, + 1141124467, + 855842277, + 2852801631, + 3708648649, + 1342533948, + 654459306, + 3188396048, + 3373015174, + 1466479909, + 544179635, + 3110523913, + 3462522015, + 1591671054, + 702138776, + 2966460450, + 3352799412, + 1504918807, + 783551873, + 3082640443, + 3233442989, + 3988292384, + 2596254646, + 62317068, + 1957810842, + 3939845945, + 2647816111, + 81470997, + 1943803523, + 3814918930, + 2489596804, + 225274430, + 2053790376, + 3826175755, + 2466906013, + 167816743, + 2097651377, + 4027552580, + 2265490386, + 503444072, + 1762050814, + 4150417245, + 2154129355, + 426522225, + 1852507879, + 4275313526, + 2312317920, + 282753626, + 1742555852, + 4189708143, + 2394877945, + 397917763, + 1622183637, + 3604390888, + 2714866558, + 953729732, + 1340076626, + 3518719985, + 2797360999, + 1068828381, + 1219638859, + 3624741850, + 2936675148, + 906185462, + 1090812512, + 3747672003, + 2825379669, + 829329135, + 1181335161, + 3412177804, + 3160834842, + 628085408, + 1382605366, + 3423369109, + 3138078467, + 570562233, + 1426400815, + 3317316542, + 2998733608, + 733239954, + 1555261956, + 3268935591, + 3050360625, + 752459403, + 1541320221, + 2607071920, + 3965973030, + 1969922972, + 40735498, + 2617837225, + 3943577151, + 1913087877, + 83908371, + 2512341634, + 3803740692, + 2075208622, + 213261112, + 2463272603, + 3855990285, + 2094854071, + 198958881, + 2262029012, + 4057260610, + 1759359992, + 534414190, + 2176718541, + 4139329115, + 1873836001, + 414664567, + 2282248934, + 4279200368, + 1711684554, + 285281116, + 2405801727, + 4167216745, + 1634467795, + 376229701, + 2685067896, + 3608007406, + 1308918612, + 956543938, + 2808555105, + 3495958263, + 1231636301, + 1047427035, + 2932959818, + 3654703836, + 1088359270, + 936918e3, + 2847714899, + 3736837829, + 1202900863, + 817233897, + 3183342108, + 3401237130, + 1404277552, + 615818150, + 3134207493, + 3453421203, + 1423857449, + 601450431, + 3009837614, + 3294710456, + 1567103746, + 711928724, + 3020668471, + 3272380065, + 1510334235, + 755167117 +]; +var lookupTable2 = uint32ArrayFrom(a_lookUpTable); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getCrc32ChecksumAlgorithmFunction.browser.js +var getCrc32ChecksumAlgorithmFunction = /* @__PURE__ */ __name(() => AwsCrc32, "getCrc32ChecksumAlgorithmFunction"); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/types.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var CLIENT_SUPPORTED_ALGORITHMS = [ + ChecksumAlgorithm.CRC32, + ChecksumAlgorithm.CRC32C, + ChecksumAlgorithm.CRC64NVME, + ChecksumAlgorithm.SHA1, + ChecksumAlgorithm.SHA256 +]; +var PRIORITY_ORDER_ALGORITHMS = [ + ChecksumAlgorithm.SHA256, + ChecksumAlgorithm.SHA1, + ChecksumAlgorithm.CRC32, + ChecksumAlgorithm.CRC32C, + ChecksumAlgorithm.CRC64NVME +]; + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/selectChecksumAlgorithmFunction.js +var selectChecksumAlgorithmFunction = /* @__PURE__ */ __name((checksumAlgorithm, config3) => { + const { checksumAlgorithms = {} } = config3; + switch (checksumAlgorithm) { + case ChecksumAlgorithm.MD5: + return checksumAlgorithms?.MD5 ?? config3.md5; + case ChecksumAlgorithm.CRC32: + return checksumAlgorithms?.CRC32 ?? getCrc32ChecksumAlgorithmFunction(); + case ChecksumAlgorithm.CRC32C: + return checksumAlgorithms?.CRC32C ?? AwsCrc32c; + case ChecksumAlgorithm.CRC64NVME: + if (typeof crc64NvmeCrtContainer.CrtCrc64Nvme !== "function") { + return checksumAlgorithms?.CRC64NVME ?? Crc64Nvme; + } + return checksumAlgorithms?.CRC64NVME ?? crc64NvmeCrtContainer.CrtCrc64Nvme; + case ChecksumAlgorithm.SHA1: + return checksumAlgorithms?.SHA1 ?? config3.sha1; + case ChecksumAlgorithm.SHA256: + return checksumAlgorithms?.SHA256 ?? config3.sha256; + default: + if (checksumAlgorithms?.[checksumAlgorithm]) { + return checksumAlgorithms[checksumAlgorithm]; + } + throw new Error(`The checksum algorithm "${checksumAlgorithm}" is not supported by the client. Select one of ${CLIENT_SUPPORTED_ALGORITHMS}, or provide an implementation to the client constructor checksums field.`); + } +}, "selectChecksumAlgorithmFunction"); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/stringHasher.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_dist_es(); +var stringHasher = /* @__PURE__ */ __name((checksumAlgorithmFn, body) => { + const hash3 = new checksumAlgorithmFn(); + hash3.update(toUint8Array(body || "")); + return hash3.digest(); +}, "stringHasher"); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsMiddleware.js +var flexibleChecksumsMiddlewareOptions = { + name: "flexibleChecksumsMiddleware", + step: "build", + tags: ["BODY_CHECKSUM"], + override: true +}; +var flexibleChecksumsMiddleware = /* @__PURE__ */ __name((config3, middlewareConfig) => (next, context2) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + if (hasHeaderWithPrefix("x-amz-checksum-", args.request.headers)) { + return next(args); + } + const { request, input } = args; + const { body: requestBody, headers } = request; + const { base64Encoder, streamHasher } = config3; + const { requestChecksumRequired, requestAlgorithmMember } = middlewareConfig; + const requestChecksumCalculation = await config3.requestChecksumCalculation(); + const requestAlgorithmMemberName = requestAlgorithmMember?.name; + const requestAlgorithmMemberHttpHeader = requestAlgorithmMember?.httpHeader; + if (requestAlgorithmMemberName && !input[requestAlgorithmMemberName]) { + if (requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired) { + input[requestAlgorithmMemberName] = DEFAULT_CHECKSUM_ALGORITHM; + if (requestAlgorithmMemberHttpHeader) { + headers[requestAlgorithmMemberHttpHeader] = DEFAULT_CHECKSUM_ALGORITHM; + } + } + } + const checksumAlgorithm = getChecksumAlgorithmForRequest(input, { + requestChecksumRequired, + requestAlgorithmMember: requestAlgorithmMember?.name, + requestChecksumCalculation + }); + let updatedBody = requestBody; + let updatedHeaders = headers; + if (checksumAlgorithm) { + switch (checksumAlgorithm) { + case ChecksumAlgorithm.CRC32: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_CRC32", "U"); + break; + case ChecksumAlgorithm.CRC32C: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_CRC32C", "V"); + break; + case ChecksumAlgorithm.CRC64NVME: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_CRC64", "W"); + break; + case ChecksumAlgorithm.SHA1: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_SHA1", "X"); + break; + case ChecksumAlgorithm.SHA256: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_SHA256", "Y"); + break; + } + const checksumLocationName = getChecksumLocationName(checksumAlgorithm); + const checksumAlgorithmFn = selectChecksumAlgorithmFunction(checksumAlgorithm, config3); + if (isStreaming(requestBody)) { + const { getAwsChunkedEncodingStream, bodyLengthChecker } = config3; + updatedBody = getAwsChunkedEncodingStream(typeof config3.requestStreamBufferSize === "number" && config3.requestStreamBufferSize >= 8 * 1024 ? createBufferedReadable(requestBody, config3.requestStreamBufferSize, context2.logger) : requestBody, { + base64Encoder, + bodyLengthChecker, + checksumLocationName, + checksumAlgorithmFn, + streamHasher + }); + updatedHeaders = { + ...headers, + "content-encoding": headers["content-encoding"] ? `${headers["content-encoding"]},aws-chunked` : "aws-chunked", + "transfer-encoding": "chunked", + "x-amz-decoded-content-length": headers["content-length"], + "x-amz-content-sha256": "STREAMING-UNSIGNED-PAYLOAD-TRAILER", + "x-amz-trailer": checksumLocationName + }; + delete updatedHeaders["content-length"]; + } else if (!hasHeader2(checksumLocationName, headers)) { + const rawChecksum = await stringHasher(checksumAlgorithmFn, requestBody); + updatedHeaders = { + ...headers, + [checksumLocationName]: base64Encoder(rawChecksum) + }; + } + } + try { + const result = await next({ + ...args, + request: { + ...request, + headers: updatedHeaders, + body: updatedBody + } + }); + return result; + } catch (e) { + if (e instanceof Error && e.name === "InvalidChunkSizeError") { + try { + if (!e.message.endsWith(".")) { + e.message += "."; + } + e.message += " Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."; + } catch (ignored) { + } + } + throw e; + } +}, "flexibleChecksumsMiddleware"); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getFlexibleChecksumsPlugin.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsInputMiddleware.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var flexibleChecksumsInputMiddlewareOptions = { + name: "flexibleChecksumsInputMiddleware", + toMiddleware: "serializerMiddleware", + relation: "before", + tags: ["BODY_CHECKSUM"], + override: true +}; +var flexibleChecksumsInputMiddleware = /* @__PURE__ */ __name((config3, middlewareConfig) => (next, context2) => async (args) => { + const input = args.input; + const { requestValidationModeMember } = middlewareConfig; + const requestChecksumCalculation = await config3.requestChecksumCalculation(); + const responseChecksumValidation = await config3.responseChecksumValidation(); + switch (requestChecksumCalculation) { + case RequestChecksumCalculation.WHEN_REQUIRED: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED", "a"); + break; + case RequestChecksumCalculation.WHEN_SUPPORTED: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED", "Z"); + break; + } + switch (responseChecksumValidation) { + case ResponseChecksumValidation.WHEN_REQUIRED: + setFeature(context2, "FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED", "c"); + break; + case ResponseChecksumValidation.WHEN_SUPPORTED: + setFeature(context2, "FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED", "b"); + break; + } + if (requestValidationModeMember && !input[requestValidationModeMember]) { + if (responseChecksumValidation === ResponseChecksumValidation.WHEN_SUPPORTED) { + input[requestValidationModeMember] = "ENABLED"; + } + } + return next(args); +}, "flexibleChecksumsInputMiddleware"); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsResponseMiddleware.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmListForResponse.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var getChecksumAlgorithmListForResponse = /* @__PURE__ */ __name((responseAlgorithms = []) => { + const validChecksumAlgorithms = []; + for (const algorithm of PRIORITY_ORDER_ALGORITHMS) { + if (!responseAlgorithms.includes(algorithm) || !CLIENT_SUPPORTED_ALGORITHMS.includes(algorithm)) { + continue; + } + validChecksumAlgorithms.push(algorithm); + } + return validChecksumAlgorithms; +}, "getChecksumAlgorithmListForResponse"); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isChecksumWithPartNumber.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var isChecksumWithPartNumber = /* @__PURE__ */ __name((checksum) => { + const lastHyphenIndex = checksum.lastIndexOf("-"); + if (lastHyphenIndex !== -1) { + const numberPart = checksum.slice(lastHyphenIndex + 1); + if (!numberPart.startsWith("0")) { + const number4 = parseInt(numberPart, 10); + if (!isNaN(number4) && number4 >= 1 && number4 <= 1e4) { + return true; + } + } + } + return false; +}, "isChecksumWithPartNumber"); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/validateChecksumFromResponse.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksum.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var getChecksum = /* @__PURE__ */ __name(async (body, { checksumAlgorithmFn, base64Encoder }) => base64Encoder(await stringHasher(checksumAlgorithmFn, body)), "getChecksum"); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/validateChecksumFromResponse.js +var validateChecksumFromResponse = /* @__PURE__ */ __name(async (response, { config: config3, responseAlgorithms, logger: logger4 }) => { + const checksumAlgorithms = getChecksumAlgorithmListForResponse(responseAlgorithms); + const { body: responseBody, headers: responseHeaders } = response; + for (const algorithm of checksumAlgorithms) { + const responseHeader = getChecksumLocationName(algorithm); + const checksumFromResponse = responseHeaders[responseHeader]; + if (checksumFromResponse) { + let checksumAlgorithmFn; + try { + checksumAlgorithmFn = selectChecksumAlgorithmFunction(algorithm, config3); + } catch (error50) { + if (algorithm === ChecksumAlgorithm.CRC64NVME) { + logger4?.warn(`Skipping ${ChecksumAlgorithm.CRC64NVME} checksum validation: ${error50.message}`); + continue; + } + throw error50; + } + const { base64Encoder } = config3; + if (isStreaming(responseBody)) { + response.body = createChecksumStream({ + expectedChecksum: checksumFromResponse, + checksumSourceLocation: responseHeader, + checksum: new checksumAlgorithmFn(), + source: responseBody, + base64Encoder + }); + return; + } + const checksum = await getChecksum(responseBody, { checksumAlgorithmFn, base64Encoder }); + if (checksum === checksumFromResponse) { + break; + } + throw new Error(`Checksum mismatch: expected "${checksum}" but received "${checksumFromResponse}" in response header "${responseHeader}".`); + } + } +}, "validateChecksumFromResponse"); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsResponseMiddleware.js +var flexibleChecksumsResponseMiddlewareOptions = { + name: "flexibleChecksumsResponseMiddleware", + toMiddleware: "deserializerMiddleware", + relation: "after", + tags: ["BODY_CHECKSUM"], + override: true +}; +var flexibleChecksumsResponseMiddleware = /* @__PURE__ */ __name((config3, middlewareConfig) => (next, context2) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + const input = args.input; + const result = await next(args); + const response = result.response; + const { requestValidationModeMember, responseAlgorithms } = middlewareConfig; + if (requestValidationModeMember && input[requestValidationModeMember] === "ENABLED") { + const { clientName, commandName } = context2; + const isS3WholeObjectMultipartGetResponseChecksum = clientName === "S3Client" && commandName === "GetObjectCommand" && getChecksumAlgorithmListForResponse(responseAlgorithms).every((algorithm) => { + const responseHeader = getChecksumLocationName(algorithm); + const checksumFromResponse = response.headers[responseHeader]; + return !checksumFromResponse || isChecksumWithPartNumber(checksumFromResponse); + }); + if (isS3WholeObjectMultipartGetResponseChecksum) { + return result; + } + await validateChecksumFromResponse(response, { + config: config3, + responseAlgorithms, + logger: context2.logger + }); + } + return result; +}, "flexibleChecksumsResponseMiddleware"); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getFlexibleChecksumsPlugin.js +var getFlexibleChecksumsPlugin = /* @__PURE__ */ __name((config3, middlewareConfig) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.add(flexibleChecksumsMiddleware(config3, middlewareConfig), flexibleChecksumsMiddlewareOptions); + clientStack.addRelativeTo(flexibleChecksumsInputMiddleware(config3, middlewareConfig), flexibleChecksumsInputMiddlewareOptions); + clientStack.addRelativeTo(flexibleChecksumsResponseMiddleware(config3, middlewareConfig), flexibleChecksumsResponseMiddlewareOptions); + }, "applyToStack") +}), "getFlexibleChecksumsPlugin"); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/check-content-length-header.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var CONTENT_LENGTH_HEADER = "content-length"; +var DECODED_CONTENT_LENGTH_HEADER = "x-amz-decoded-content-length"; +function checkContentLengthHeader() { + return (next, context2) => async (args) => { + const { request } = args; + if (HttpRequest.isInstance(request)) { + if (!(CONTENT_LENGTH_HEADER in request.headers) && !(DECODED_CONTENT_LENGTH_HEADER in request.headers)) { + const message2 = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`; + if (typeof context2?.logger?.warn === "function" && !(context2.logger instanceof NoOpLogger)) { + context2.logger.warn(message2); + } else { + console.warn(message2); + } + } + } + return next({ ...args }); + }; +} +__name(checkContentLengthHeader, "checkContentLengthHeader"); +var checkContentLengthHeaderMiddlewareOptions = { + step: "finalizeRequest", + tags: ["CHECK_CONTENT_LENGTH_HEADER"], + name: "getCheckContentLengthHeaderPlugin", + override: true +}; +var getCheckContentLengthHeaderPlugin = /* @__PURE__ */ __name((unused) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.add(checkContentLengthHeader(), checkContentLengthHeaderMiddlewareOptions); + }, "applyToStack") +}), "getCheckContentLengthHeaderPlugin"); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-expires-middleware.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var s3ExpiresMiddleware = /* @__PURE__ */ __name((config3) => { + return (next, context2) => async (args) => { + const result = await next(args); + const { response } = result; + if (HttpResponse.isInstance(response)) { + if (response.headers.expires) { + response.headers.expiresstring = response.headers.expires; + try { + parseRfc7231DateTime(response.headers.expires); + } catch (e) { + context2.logger?.warn(`AWS SDK Warning for ${context2.clientName}::${context2.commandName} response parsing (${response.headers.expires}): ${e}`); + delete response.headers.expires; + } + } + } + return result; + }; +}, "s3ExpiresMiddleware"); +var s3ExpiresMiddlewareOptions = { + tags: ["S3"], + name: "s3ExpiresMiddleware", + override: true, + relation: "after", + toMiddleware: "deserializerMiddleware" +}; +var getS3ExpiresMiddlewarePlugin = /* @__PURE__ */ __name((clientConfig) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.addRelativeTo(s3ExpiresMiddleware(clientConfig), s3ExpiresMiddlewareOptions); + }, "applyToStack") +}), "getS3ExpiresMiddlewarePlugin"); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/SignatureV4S3Express.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/constants.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token"; +var SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase(); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/SignatureV4S3Express.js +var SignatureV4S3Express = class extends SignatureV4 { + static { + __name(this, "SignatureV4S3Express"); + } + async signWithCredentials(requestToSign, credentials, options) { + const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); + requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken; + const privateAccess = this; + setSingleOverride(privateAccess, credentialsWithoutSessionToken); + return privateAccess.signRequest(requestToSign, options ?? {}); + } + async presignWithCredentials(requestToSign, credentials, options) { + const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); + delete requestToSign.headers[SESSION_TOKEN_HEADER]; + requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; + requestToSign.query = requestToSign.query ?? {}; + requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; + const privateAccess = this; + setSingleOverride(privateAccess, credentialsWithoutSessionToken); + return this.presign(requestToSign, options); + } +}; +function getCredentialsWithoutSessionToken(credentials) { + const credentialsWithoutSessionToken = { + accessKeyId: credentials.accessKeyId, + secretAccessKey: credentials.secretAccessKey, + expiration: credentials.expiration + }; + return credentialsWithoutSessionToken; +} +__name(getCredentialsWithoutSessionToken, "getCredentialsWithoutSessionToken"); +function setSingleOverride(privateAccess, credentialsWithoutSessionToken) { + const id = setTimeout(() => { + throw new Error("SignatureV4S3Express credential override was created but not called."); + }, 10); + const currentCredentialProvider = privateAccess.credentialProvider; + const overrideCredentialsProviderOnce = /* @__PURE__ */ __name(() => { + clearTimeout(id); + privateAccess.credentialProvider = currentCredentialProvider; + return Promise.resolve(credentialsWithoutSessionToken); + }, "overrideCredentialsProviderOnce"); + privateAccess.credentialProvider = overrideCredentialsProviderOnce; +} +__name(setSingleOverride, "setSingleOverride"); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var THROW_IF_EMPTY_BODY = { + CopyObjectCommand: true, + UploadPartCopyCommand: true, + CompleteMultipartUploadCommand: true +}; +var MAX_BYTES_TO_INSPECT = 3e3; +var throw200ExceptionsMiddleware = /* @__PURE__ */ __name((config3) => (next, context2) => async (args) => { + const result = await next(args); + const { response } = result; + if (!HttpResponse.isInstance(response)) { + return result; + } + const { statusCode, body: sourceBody } = response; + if (statusCode < 200 || statusCode >= 300) { + return result; + } + const isSplittableStream = typeof sourceBody?.stream === "function" || typeof sourceBody?.pipe === "function" || typeof sourceBody?.tee === "function"; + if (!isSplittableStream) { + return result; + } + let bodyCopy = sourceBody; + let body = sourceBody; + if (sourceBody && typeof sourceBody === "object" && !(sourceBody instanceof Uint8Array)) { + [bodyCopy, body] = await splitStream(sourceBody); + } + response.body = body; + const bodyBytes = await collectBody(bodyCopy, { + streamCollector: /* @__PURE__ */ __name(async (stream) => { + return headStream(stream, MAX_BYTES_TO_INSPECT); + }, "streamCollector") + }); + if (typeof bodyCopy?.destroy === "function") { + bodyCopy.destroy(); + } + const bodyStringTail = config3.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16)); + if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context2.commandName]) { + const err = new Error("S3 aborted request"); + err.name = "InternalError"; + throw err; + } + if (bodyStringTail && bodyStringTail.endsWith("")) { + response.statusCode = 400; + } + return result; +}, "throw200ExceptionsMiddleware"); +var collectBody = /* @__PURE__ */ __name((streamBody = new Uint8Array(), context2) => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context2.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}, "collectBody"); +var throw200ExceptionsMiddlewareOptions = { + relation: "after", + toMiddleware: "deserializerMiddleware", + tags: ["THROW_200_EXCEPTIONS", "S3"], + name: "throw200ExceptionsMiddleware", + override: true +}; +var getThrow200ExceptionsPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.addRelativeTo(throw200ExceptionsMiddleware(config3), throw200ExceptionsMiddlewareOptions); + }, "applyToStack") +}), "getThrow200ExceptionsPlugin"); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/s3.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { + const bucket = endpointParams?.Bucket || ""; + if (typeof endpointParams.Bucket === "string") { + endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); + } + if (isArnBucketName(bucket)) { + if (endpointParams.ForcePathStyle === true) { + throw new Error("Path-style addressing cannot be used with ARN buckets"); + } + } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { + endpointParams.ForcePathStyle = true; + } + if (endpointParams.DisableMultiRegionAccessPoints) { + endpointParams.disableMultiRegionAccessPoints = true; + endpointParams.DisableMRAP = true; + } + return endpointParams; +}, "resolveParamsForS3"); +var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; +var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; +var DOTS_PATTERN = /\.\./; +var isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); +var isArnBucketName = /* @__PURE__ */ __name((bucketName) => { + const [arn, partition, service, , , bucket] = bucketName.split(":"); + const isArn = arn === "arn" && bucketName.split(":").length >= 6; + const isValidArn = Boolean(isArn && partition && service && bucket); + if (isArn && !isValidArn) { + throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); + } + return isValidArn; +}, "isArnBucketName"); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config3, isClientContextParam = false) => { + const configProvider = /* @__PURE__ */ __name(async () => { + let configValue; + if (isClientContextParam) { + const clientContextParams = config3.clientContextParams; + const nestedValue = clientContextParams?.[configKey]; + configValue = nestedValue ?? config3[configKey] ?? config3[canonicalEndpointParamKey]; + } else { + configValue = config3[configKey] ?? config3[canonicalEndpointParamKey]; + } + if (typeof configValue === "function") { + return configValue(); + } + return configValue; + }, "configProvider"); + if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { + return async () => { + const credentials = typeof config3.credentials === "function" ? await config3.credentials() : config3.credentials; + const configValue = credentials?.credentialScope ?? credentials?.CredentialScope; + return configValue; + }; + } + if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") { + return async () => { + const credentials = typeof config3.credentials === "function" ? await config3.credentials() : config3.credentials; + const configValue = credentials?.accountId ?? credentials?.AccountId; + return configValue; + }; + } + if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { + return async () => { + if (config3.isCustomEndpoint === false) { + return void 0; + } + const endpoint = await configProvider(); + if (endpoint && typeof endpoint === "object") { + if ("url" in endpoint) { + return endpoint.url.href; + } + if ("hostname" in endpoint) { + const { protocol, hostname: hostname3, port, path: path3 } = endpoint; + return `${protocol}//${hostname3}${port ? ":" + port : ""}${path3}`; + } + } + return endpoint; + }; + } + return configProvider; +}, "createConfigValueProvider"); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.browser.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var getEndpointFromConfig = /* @__PURE__ */ __name(async (serviceId) => void 0, "getEndpointFromConfig"); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + const v1Endpoint = parseUrl(endpoint.url); + if (endpoint.headers) { + v1Endpoint.headers = {}; + for (const [name, values] of Object.entries(endpoint.headers)) { + v1Endpoint.headers[name.toLowerCase()] = values.join(", "); + } + } + return v1Endpoint; + } + return endpoint; + } + return parseUrl(endpoint); +}, "toEndpointV1"); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js +var getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context2) => { + if (!clientConfig.isCustomEndpoint) { + let endpointFromConfig; + if (clientConfig.serviceConfiguredEndpoint) { + endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); + } else { + endpointFromConfig = await getEndpointFromConfig(clientConfig.serviceId); + } + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); + clientConfig.isCustomEndpoint = true; + } + } + const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); + if (typeof clientConfig.endpointProvider !== "function") { + throw new Error("config.endpointProvider is not set."); + } + const endpoint = clientConfig.endpointProvider(endpointParams, context2); + if (clientConfig.isCustomEndpoint && clientConfig.endpoint) { + const customEndpoint = await clientConfig.endpoint(); + if (customEndpoint?.headers) { + endpoint.headers ??= {}; + for (const [name, value] of Object.entries(customEndpoint.headers)) { + endpoint.headers[name] = Array.isArray(value) ? value : [value]; + } + } + } + return endpoint; +}, "getEndpointFromInstructions"); +var resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => { + const endpointParams = {}; + const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {}; + for (const [name, instruction] of Object.entries(instructions)) { + switch (instruction.type) { + case "staticContextParams": + endpointParams[name] = instruction.value; + break; + case "contextParams": + endpointParams[name] = commandInput[instruction.name]; + break; + case "clientContextParams": + case "builtInParams": + endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")(); + break; + case "operationContextParams": + endpointParams[name] = instruction.get(commandInput); + break; + default: + throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); + } + } + if (Object.keys(instructions).length === 0) { + Object.assign(endpointParams, clientConfig); + } + if (String(clientConfig.serviceId).toLowerCase() === "s3") { + await resolveParamsForS3(endpointParams); + } + return endpointParams; +}, "resolveParams"); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var endpointMiddleware = /* @__PURE__ */ __name(({ config: config3, instructions }) => { + return (next, context2) => async (args) => { + if (config3.isCustomEndpoint) { + setFeature2(context2, "ENDPOINT_OVERRIDE", "N"); + } + const endpoint = await getEndpointFromInstructions(args.input, { + getEndpointParameterInstructions() { + return instructions; + } + }, { ...config3 }, context2); + context2.endpointV2 = endpoint; + context2.authSchemes = endpoint.properties?.authSchemes; + const authScheme = context2.authSchemes?.[0]; + if (authScheme) { + context2["signing_region"] = authScheme.signingRegion; + context2["signing_service"] = authScheme.signingName; + const smithyContext = getSmithyContext(context2); + const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption; + if (httpAuthOption) { + httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, { + signing_region: authScheme.signingRegion, + signingRegion: authScheme.signingRegion, + signing_service: authScheme.signingName, + signingName: authScheme.signingName, + signingRegionSet: authScheme.signingRegionSet + }, authScheme.properties); + } + } + return next({ + ...args + }); + }; +}, "endpointMiddleware"); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@smithy/middleware-serde/dist-es/serdePlugin.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var serializerMiddlewareOption = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true +}; + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js +var endpointMiddlewareOptions = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: serializerMiddlewareOption.name +}; +var getEndpointPlugin = /* @__PURE__ */ __name((config3, instructions) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.addRelativeTo(endpointMiddleware({ + config: config3, + instructions + }), endpointMiddlewareOptions); + }, "applyToStack") +}), "getEndpointPlugin"); + +// ../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4MultiRegion.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/signature-v4-crt-container.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var signatureV4CrtContainer = { + CrtSignerV4: null +}; + +// ../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4MultiRegion.js +var SignatureV4MultiRegion = class { + static { + __name(this, "SignatureV4MultiRegion"); + } + sigv4aSigner; + sigv4Signer; + signerOptions; + static sigv4aDependency() { + if (typeof signatureV4CrtContainer.CrtSignerV4 === "function") { + return "crt"; + } else if (typeof signatureV4aContainer.SignatureV4a === "function") { + return "js"; + } + return "none"; + } + constructor(options) { + this.sigv4Signer = new SignatureV4S3Express(options); + this.signerOptions = options; + } + async sign(requestToSign, options = {}) { + if (options.signingRegion === "*") { + return this.getSigv4aSigner().sign(requestToSign, options); + } + return this.sigv4Signer.sign(requestToSign, options); + } + async signWithCredentials(requestToSign, credentials, options = {}) { + if (options.signingRegion === "*") { + const signer = this.getSigv4aSigner(); + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + if (CrtSignerV4 && signer instanceof CrtSignerV4) { + return signer.signWithCredentials(requestToSign, credentials, options); + } else { + throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`); + } + } + return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options); + } + async presign(originalRequest, options = {}) { + if (options.signingRegion === "*") { + const signer = this.getSigv4aSigner(); + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + if (CrtSignerV4 && signer instanceof CrtSignerV4) { + return signer.presign(originalRequest, options); + } else { + throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`); + } + } + return this.sigv4Signer.presign(originalRequest, options); + } + async presignWithCredentials(originalRequest, credentials, options = {}) { + if (options.signingRegion === "*") { + throw new Error("Method presignWithCredentials is not supported for [signingRegion=*]."); + } + return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options); + } + getSigv4aSigner() { + if (!this.sigv4aSigner) { + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + const JsSigV4aSigner = signatureV4aContainer.SignatureV4a; + if (this.signerOptions.runtime === "node") { + if (!CrtSignerV4 && !JsSigV4aSigner) { + throw new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"); + } + if (CrtSignerV4 && typeof CrtSignerV4 === "function") { + this.sigv4aSigner = new CrtSignerV4({ + ...this.signerOptions, + signingAlgorithm: 1 + }); + } else if (JsSigV4aSigner && typeof JsSigV4aSigner === "function") { + this.sigv4aSigner = new JsSigV4aSigner({ + ...this.signerOptions + }); + } else { + throw new Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"); + } + } else { + if (!JsSigV4aSigner || typeof JsSigV4aSigner !== "function") { + throw new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a"); + } + this.sigv4aSigner = new JsSigV4aSigner({ + ...this.signerOptions + }); + } + } + return this.sigv4aSigner; + } +}; + +// ../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var commonParams = { + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } +}; + +// ../../node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/errors.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var S3ServiceException = class _S3ServiceException extends ServiceException { + static { + __name(this, "S3ServiceException"); + } + constructor(options) { + super(options); + Object.setPrototypeOf(this, _S3ServiceException.prototype); + } +}; + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/errors.js +var NoSuchUpload = class _NoSuchUpload extends S3ServiceException { + static { + __name(this, "NoSuchUpload"); + } + name = "NoSuchUpload"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoSuchUpload", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _NoSuchUpload.prototype); + } +}; +var AccessDenied = class _AccessDenied extends S3ServiceException { + static { + __name(this, "AccessDenied"); + } + name = "AccessDenied"; + $fault = "client"; + constructor(opts) { + super({ + name: "AccessDenied", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _AccessDenied.prototype); + } +}; +var ObjectNotInActiveTierError = class _ObjectNotInActiveTierError extends S3ServiceException { + static { + __name(this, "ObjectNotInActiveTierError"); + } + name = "ObjectNotInActiveTierError"; + $fault = "client"; + constructor(opts) { + super({ + name: "ObjectNotInActiveTierError", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ObjectNotInActiveTierError.prototype); + } +}; +var BucketAlreadyExists = class _BucketAlreadyExists extends S3ServiceException { + static { + __name(this, "BucketAlreadyExists"); + } + name = "BucketAlreadyExists"; + $fault = "client"; + constructor(opts) { + super({ + name: "BucketAlreadyExists", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _BucketAlreadyExists.prototype); + } +}; +var BucketAlreadyOwnedByYou = class _BucketAlreadyOwnedByYou extends S3ServiceException { + static { + __name(this, "BucketAlreadyOwnedByYou"); + } + name = "BucketAlreadyOwnedByYou"; + $fault = "client"; + constructor(opts) { + super({ + name: "BucketAlreadyOwnedByYou", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _BucketAlreadyOwnedByYou.prototype); + } +}; +var NoSuchBucket = class _NoSuchBucket extends S3ServiceException { + static { + __name(this, "NoSuchBucket"); + } + name = "NoSuchBucket"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoSuchBucket", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _NoSuchBucket.prototype); + } +}; +var InvalidObjectState = class _InvalidObjectState extends S3ServiceException { + static { + __name(this, "InvalidObjectState"); + } + name = "InvalidObjectState"; + $fault = "client"; + StorageClass; + AccessTier; + constructor(opts) { + super({ + name: "InvalidObjectState", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _InvalidObjectState.prototype); + this.StorageClass = opts.StorageClass; + this.AccessTier = opts.AccessTier; + } +}; +var NoSuchKey = class _NoSuchKey extends S3ServiceException { + static { + __name(this, "NoSuchKey"); + } + name = "NoSuchKey"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoSuchKey", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _NoSuchKey.prototype); + } +}; +var NotFound = class _NotFound extends S3ServiceException { + static { + __name(this, "NotFound"); + } + name = "NotFound"; + $fault = "client"; + constructor(opts) { + super({ + name: "NotFound", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _NotFound.prototype); + } +}; +var EncryptionTypeMismatch = class _EncryptionTypeMismatch extends S3ServiceException { + static { + __name(this, "EncryptionTypeMismatch"); + } + name = "EncryptionTypeMismatch"; + $fault = "client"; + constructor(opts) { + super({ + name: "EncryptionTypeMismatch", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _EncryptionTypeMismatch.prototype); + } +}; +var InvalidRequest = class _InvalidRequest extends S3ServiceException { + static { + __name(this, "InvalidRequest"); + } + name = "InvalidRequest"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidRequest", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _InvalidRequest.prototype); + } +}; +var InvalidWriteOffset = class _InvalidWriteOffset extends S3ServiceException { + static { + __name(this, "InvalidWriteOffset"); + } + name = "InvalidWriteOffset"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidWriteOffset", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _InvalidWriteOffset.prototype); + } +}; +var TooManyParts = class _TooManyParts extends S3ServiceException { + static { + __name(this, "TooManyParts"); + } + name = "TooManyParts"; + $fault = "client"; + constructor(opts) { + super({ + name: "TooManyParts", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _TooManyParts.prototype); + } +}; +var IdempotencyParameterMismatch = class _IdempotencyParameterMismatch extends S3ServiceException { + static { + __name(this, "IdempotencyParameterMismatch"); + } + name = "IdempotencyParameterMismatch"; + $fault = "client"; + constructor(opts) { + super({ + name: "IdempotencyParameterMismatch", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _IdempotencyParameterMismatch.prototype); + } +}; +var ObjectAlreadyInActiveTierError = class _ObjectAlreadyInActiveTierError extends S3ServiceException { + static { + __name(this, "ObjectAlreadyInActiveTierError"); + } + name = "ObjectAlreadyInActiveTierError"; + $fault = "client"; + constructor(opts) { + super({ + name: "ObjectAlreadyInActiveTierError", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ObjectAlreadyInActiveTierError.prototype); + } +}; + +// ../../node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js +var _A = "Account"; +var _AAO = "AnalyticsAndOperator"; +var _AC = "AccelerateConfiguration"; +var _ACL = "AccessControlList"; +var _ACL_ = "ACL"; +var _ACLn = "AnalyticsConfigurationList"; +var _ACP = "AccessControlPolicy"; +var _ACT = "AccessControlTranslation"; +var _ACn = "AnalyticsConfiguration"; +var _AD = "AccessDenied"; +var _ADb = "AbortDate"; +var _AED = "AnalyticsExportDestination"; +var _AF = "AnalyticsFilter"; +var _AH = "AllowedHeaders"; +var _AHl = "AllowedHeader"; +var _AI = "AccountId"; +var _AIMU = "AbortIncompleteMultipartUpload"; +var _AKI = "AccessKeyId"; +var _AM = "AllowedMethods"; +var _AMU = "AbortMultipartUpload"; +var _AMUO = "AbortMultipartUploadOutput"; +var _AMUR = "AbortMultipartUploadRequest"; +var _AMl = "AllowedMethod"; +var _AO = "AllowedOrigins"; +var _AOl = "AllowedOrigin"; +var _APA = "AccessPointAlias"; +var _APAc = "AccessPointArn"; +var _AQRD = "AllowQuotedRecordDelimiter"; +var _AR = "AcceptRanges"; +var _ARI = "AbortRuleId"; +var _AS = "AbacStatus"; +var _ASBD = "AnalyticsS3BucketDestination"; +var _ASSEBD = "ApplyServerSideEncryptionByDefault"; +var _ASr = "ArchiveStatus"; +var _AT = "AccessTier"; +var _An = "And"; +var _B = "Bucket"; +var _BA = "BucketArn"; +var _BAE = "BucketAlreadyExists"; +var _BAI = "BucketAccountId"; +var _BAOBY = "BucketAlreadyOwnedByYou"; +var _BET = "BlockedEncryptionTypes"; +var _BGR = "BypassGovernanceRetention"; +var _BI = "BucketInfo"; +var _BKE = "BucketKeyEnabled"; +var _BLC = "BucketLifecycleConfiguration"; +var _BLN = "BucketLocationName"; +var _BLS = "BucketLoggingStatus"; +var _BLT = "BucketLocationType"; +var _BN = "BucketNamespace"; +var _BNu = "BucketName"; +var _BP = "BytesProcessed"; +var _BPA = "BlockPublicAcls"; +var _BPP = "BlockPublicPolicy"; +var _BR = "BucketRegion"; +var _BRy = "BytesReturned"; +var _BS = "BytesScanned"; +var _Bo = "Body"; +var _Bu = "Buckets"; +var _C = "Checksum"; +var _CA = "ChecksumAlgorithm"; +var _CACL = "CannedACL"; +var _CB = "CreateBucket"; +var _CBC = "CreateBucketConfiguration"; +var _CBMC = "CreateBucketMetadataConfiguration"; +var _CBMCR = "CreateBucketMetadataConfigurationRequest"; +var _CBMTC = "CreateBucketMetadataTableConfiguration"; +var _CBMTCR = "CreateBucketMetadataTableConfigurationRequest"; +var _CBO = "CreateBucketOutput"; +var _CBR = "CreateBucketRequest"; +var _CC = "CacheControl"; +var _CCRC = "ChecksumCRC32"; +var _CCRCC = "ChecksumCRC32C"; +var _CCRCNVME = "ChecksumCRC64NVME"; +var _CC_ = "Cache-Control"; +var _CD = "CreationDate"; +var _CD_ = "Content-Disposition"; +var _CDo = "ContentDisposition"; +var _CE = "ContinuationEvent"; +var _CE_ = "Content-Encoding"; +var _CEo = "ContentEncoding"; +var _CF = "CloudFunction"; +var _CFC = "CloudFunctionConfiguration"; +var _CL = "ContentLanguage"; +var _CL_ = "Content-Language"; +var _CL__ = "Content-Length"; +var _CLo = "ContentLength"; +var _CM = "Content-MD5"; +var _CMD = "ContentMD5"; +var _CMU = "CompletedMultipartUpload"; +var _CMUO = "CompleteMultipartUploadOutput"; +var _CMUOr = "CreateMultipartUploadOutput"; +var _CMUR = "CompleteMultipartUploadResult"; +var _CMURo = "CompleteMultipartUploadRequest"; +var _CMURr = "CreateMultipartUploadRequest"; +var _CMUo = "CompleteMultipartUpload"; +var _CMUr = "CreateMultipartUpload"; +var _CMh = "ChecksumMode"; +var _CO = "CopyObject"; +var _COO = "CopyObjectOutput"; +var _COR = "CopyObjectResult"; +var _CORSC = "CORSConfiguration"; +var _CORSR = "CORSRules"; +var _CORSRu = "CORSRule"; +var _CORo = "CopyObjectRequest"; +var _CP = "CommonPrefix"; +var _CPL = "CommonPrefixList"; +var _CPLo = "CompletedPartList"; +var _CPR = "CopyPartResult"; +var _CPo = "CompletedPart"; +var _CPom = "CommonPrefixes"; +var _CR = "ContentRange"; +var _CRSBA = "ConfirmRemoveSelfBucketAccess"; +var _CR_ = "Content-Range"; +var _CS = "CopySource"; +var _CSHA = "ChecksumSHA1"; +var _CSHAh = "ChecksumSHA256"; +var _CSIM = "CopySourceIfMatch"; +var _CSIMS = "CopySourceIfModifiedSince"; +var _CSINM = "CopySourceIfNoneMatch"; +var _CSIUS = "CopySourceIfUnmodifiedSince"; +var _CSO = "CreateSessionOutput"; +var _CSR = "CreateSessionResult"; +var _CSRo = "CopySourceRange"; +var _CSRr = "CreateSessionRequest"; +var _CSSSECA = "CopySourceSSECustomerAlgorithm"; +var _CSSSECK = "CopySourceSSECustomerKey"; +var _CSSSECKMD = "CopySourceSSECustomerKeyMD5"; +var _CSV = "CSV"; +var _CSVI = "CopySourceVersionId"; +var _CSVIn = "CSVInput"; +var _CSVO = "CSVOutput"; +var _CSo = "ConfigurationState"; +var _CSr = "CreateSession"; +var _CT = "ChecksumType"; +var _CT_ = "Content-Type"; +var _CTl = "ClientToken"; +var _CTo = "ContentType"; +var _CTom = "CompressionType"; +var _CTon = "ContinuationToken"; +var _Co = "Condition"; +var _Cod = "Code"; +var _Com = "Comments"; +var _Con = "Contents"; +var _Cont = "Cont"; +var _Cr = "Credentials"; +var _D = "Days"; +var _DAI = "DaysAfterInitiation"; +var _DB = "DeleteBucket"; +var _DBAC = "DeleteBucketAnalyticsConfiguration"; +var _DBACR = "DeleteBucketAnalyticsConfigurationRequest"; +var _DBC = "DeleteBucketCors"; +var _DBCR = "DeleteBucketCorsRequest"; +var _DBE = "DeleteBucketEncryption"; +var _DBER = "DeleteBucketEncryptionRequest"; +var _DBIC = "DeleteBucketInventoryConfiguration"; +var _DBICR = "DeleteBucketInventoryConfigurationRequest"; +var _DBITC = "DeleteBucketIntelligentTieringConfiguration"; +var _DBITCR = "DeleteBucketIntelligentTieringConfigurationRequest"; +var _DBL = "DeleteBucketLifecycle"; +var _DBLR = "DeleteBucketLifecycleRequest"; +var _DBMC = "DeleteBucketMetadataConfiguration"; +var _DBMCR = "DeleteBucketMetadataConfigurationRequest"; +var _DBMCRe = "DeleteBucketMetricsConfigurationRequest"; +var _DBMCe = "DeleteBucketMetricsConfiguration"; +var _DBMTC = "DeleteBucketMetadataTableConfiguration"; +var _DBMTCR = "DeleteBucketMetadataTableConfigurationRequest"; +var _DBOC = "DeleteBucketOwnershipControls"; +var _DBOCR = "DeleteBucketOwnershipControlsRequest"; +var _DBP = "DeleteBucketPolicy"; +var _DBPR = "DeleteBucketPolicyRequest"; +var _DBR = "DeleteBucketRequest"; +var _DBRR = "DeleteBucketReplicationRequest"; +var _DBRe = "DeleteBucketReplication"; +var _DBT = "DeleteBucketTagging"; +var _DBTR = "DeleteBucketTaggingRequest"; +var _DBW = "DeleteBucketWebsite"; +var _DBWR = "DeleteBucketWebsiteRequest"; +var _DE = "DataExport"; +var _DIM = "DestinationIfMatch"; +var _DIMS = "DestinationIfModifiedSince"; +var _DINM = "DestinationIfNoneMatch"; +var _DIUS = "DestinationIfUnmodifiedSince"; +var _DM = "DeleteMarker"; +var _DME = "DeleteMarkerEntry"; +var _DMR = "DeleteMarkerReplication"; +var _DMVI = "DeleteMarkerVersionId"; +var _DMe = "DeleteMarkers"; +var _DN = "DisplayName"; +var _DO = "DeletedObject"; +var _DOO = "DeleteObjectOutput"; +var _DOOe = "DeleteObjectsOutput"; +var _DOR = "DeleteObjectRequest"; +var _DORe = "DeleteObjectsRequest"; +var _DOT = "DeleteObjectTagging"; +var _DOTO = "DeleteObjectTaggingOutput"; +var _DOTR = "DeleteObjectTaggingRequest"; +var _DOe = "DeletedObjects"; +var _DOel = "DeleteObject"; +var _DOele = "DeleteObjects"; +var _DPAB = "DeletePublicAccessBlock"; +var _DPABR = "DeletePublicAccessBlockRequest"; +var _DR = "DataRedundancy"; +var _DRe = "DefaultRetention"; +var _DRel = "DeleteResult"; +var _DRes = "DestinationResult"; +var _Da = "Date"; +var _De = "Delete"; +var _Del = "Deleted"; +var _Deli = "Delimiter"; +var _Des = "Destination"; +var _Desc = "Description"; +var _Det = "Details"; +var _E = "Expiration"; +var _EA = "EmailAddress"; +var _EBC = "EventBridgeConfiguration"; +var _EBO = "ExpectedBucketOwner"; +var _EC = "EncryptionConfiguration"; +var _ECr = "ErrorCode"; +var _ED = "ErrorDetails"; +var _EDr = "ErrorDocument"; +var _EE = "EndEvent"; +var _EH = "ExposeHeaders"; +var _EHx = "ExposeHeader"; +var _EM = "ErrorMessage"; +var _EODM = "ExpiredObjectDeleteMarker"; +var _EOR = "ExistingObjectReplication"; +var _ES = "ExpiresString"; +var _ESBO = "ExpectedSourceBucketOwner"; +var _ET = "EncryptionType"; +var _ETL = "EncryptionTypeList"; +var _ETM = "EncryptionTypeMismatch"; +var _ETa = "ETag"; +var _ETn = "EncodingType"; +var _ETv = "EventThreshold"; +var _ETx = "ExpressionType"; +var _En = "Encryption"; +var _Ena = "Enabled"; +var _End = "End"; +var _Er = "Errors"; +var _Err = "Error"; +var _Ev = "Events"; +var _Eve = "Event"; +var _Ex = "Expires"; +var _Exp = "Expression"; +var _F = "Filter"; +var _FD = "FieldDelimiter"; +var _FHI = "FileHeaderInfo"; +var _FO = "FetchOwner"; +var _FR = "FilterRule"; +var _FRL = "FilterRuleList"; +var _FRi = "FilterRules"; +var _Fi = "Field"; +var _Fo = "Format"; +var _Fr = "Frequency"; +var _G = "Grants"; +var _GBA = "GetBucketAbac"; +var _GBAC = "GetBucketAccelerateConfiguration"; +var _GBACO = "GetBucketAccelerateConfigurationOutput"; +var _GBACOe = "GetBucketAnalyticsConfigurationOutput"; +var _GBACR = "GetBucketAccelerateConfigurationRequest"; +var _GBACRe = "GetBucketAnalyticsConfigurationRequest"; +var _GBACe = "GetBucketAnalyticsConfiguration"; +var _GBAO = "GetBucketAbacOutput"; +var _GBAOe = "GetBucketAclOutput"; +var _GBAR = "GetBucketAbacRequest"; +var _GBARe = "GetBucketAclRequest"; +var _GBAe = "GetBucketAcl"; +var _GBC = "GetBucketCors"; +var _GBCO = "GetBucketCorsOutput"; +var _GBCR = "GetBucketCorsRequest"; +var _GBE = "GetBucketEncryption"; +var _GBEO = "GetBucketEncryptionOutput"; +var _GBER = "GetBucketEncryptionRequest"; +var _GBIC = "GetBucketInventoryConfiguration"; +var _GBICO = "GetBucketInventoryConfigurationOutput"; +var _GBICR = "GetBucketInventoryConfigurationRequest"; +var _GBITC = "GetBucketIntelligentTieringConfiguration"; +var _GBITCO = "GetBucketIntelligentTieringConfigurationOutput"; +var _GBITCR = "GetBucketIntelligentTieringConfigurationRequest"; +var _GBL = "GetBucketLocation"; +var _GBLC = "GetBucketLifecycleConfiguration"; +var _GBLCO = "GetBucketLifecycleConfigurationOutput"; +var _GBLCR = "GetBucketLifecycleConfigurationRequest"; +var _GBLO = "GetBucketLocationOutput"; +var _GBLOe = "GetBucketLoggingOutput"; +var _GBLR = "GetBucketLocationRequest"; +var _GBLRe = "GetBucketLoggingRequest"; +var _GBLe = "GetBucketLogging"; +var _GBMC = "GetBucketMetadataConfiguration"; +var _GBMCO = "GetBucketMetadataConfigurationOutput"; +var _GBMCOe = "GetBucketMetricsConfigurationOutput"; +var _GBMCR = "GetBucketMetadataConfigurationResult"; +var _GBMCRe = "GetBucketMetadataConfigurationRequest"; +var _GBMCRet = "GetBucketMetricsConfigurationRequest"; +var _GBMCe = "GetBucketMetricsConfiguration"; +var _GBMTC = "GetBucketMetadataTableConfiguration"; +var _GBMTCO = "GetBucketMetadataTableConfigurationOutput"; +var _GBMTCR = "GetBucketMetadataTableConfigurationResult"; +var _GBMTCRe = "GetBucketMetadataTableConfigurationRequest"; +var _GBNC = "GetBucketNotificationConfiguration"; +var _GBNCR = "GetBucketNotificationConfigurationRequest"; +var _GBOC = "GetBucketOwnershipControls"; +var _GBOCO = "GetBucketOwnershipControlsOutput"; +var _GBOCR = "GetBucketOwnershipControlsRequest"; +var _GBP = "GetBucketPolicy"; +var _GBPO = "GetBucketPolicyOutput"; +var _GBPR = "GetBucketPolicyRequest"; +var _GBPS = "GetBucketPolicyStatus"; +var _GBPSO = "GetBucketPolicyStatusOutput"; +var _GBPSR = "GetBucketPolicyStatusRequest"; +var _GBR = "GetBucketReplication"; +var _GBRO = "GetBucketReplicationOutput"; +var _GBRP = "GetBucketRequestPayment"; +var _GBRPO = "GetBucketRequestPaymentOutput"; +var _GBRPR = "GetBucketRequestPaymentRequest"; +var _GBRR = "GetBucketReplicationRequest"; +var _GBT = "GetBucketTagging"; +var _GBTO = "GetBucketTaggingOutput"; +var _GBTR = "GetBucketTaggingRequest"; +var _GBV = "GetBucketVersioning"; +var _GBVO = "GetBucketVersioningOutput"; +var _GBVR = "GetBucketVersioningRequest"; +var _GBW = "GetBucketWebsite"; +var _GBWO = "GetBucketWebsiteOutput"; +var _GBWR = "GetBucketWebsiteRequest"; +var _GFC = "GrantFullControl"; +var _GJP = "GlacierJobParameters"; +var _GO = "GetObject"; +var _GOA = "GetObjectAcl"; +var _GOAO = "GetObjectAclOutput"; +var _GOAOe = "GetObjectAttributesOutput"; +var _GOAP = "GetObjectAttributesParts"; +var _GOAR = "GetObjectAclRequest"; +var _GOARe = "GetObjectAttributesResponse"; +var _GOARet = "GetObjectAttributesRequest"; +var _GOAe = "GetObjectAttributes"; +var _GOLC = "GetObjectLockConfiguration"; +var _GOLCO = "GetObjectLockConfigurationOutput"; +var _GOLCR = "GetObjectLockConfigurationRequest"; +var _GOLH = "GetObjectLegalHold"; +var _GOLHO = "GetObjectLegalHoldOutput"; +var _GOLHR = "GetObjectLegalHoldRequest"; +var _GOO = "GetObjectOutput"; +var _GOR = "GetObjectRequest"; +var _GORO = "GetObjectRetentionOutput"; +var _GORR = "GetObjectRetentionRequest"; +var _GORe = "GetObjectRetention"; +var _GOT = "GetObjectTagging"; +var _GOTO = "GetObjectTaggingOutput"; +var _GOTOe = "GetObjectTorrentOutput"; +var _GOTR = "GetObjectTaggingRequest"; +var _GOTRe = "GetObjectTorrentRequest"; +var _GOTe = "GetObjectTorrent"; +var _GPAB = "GetPublicAccessBlock"; +var _GPABO = "GetPublicAccessBlockOutput"; +var _GPABR = "GetPublicAccessBlockRequest"; +var _GR = "GrantRead"; +var _GRACP = "GrantReadACP"; +var _GW = "GrantWrite"; +var _GWACP = "GrantWriteACP"; +var _Gr = "Grant"; +var _Gra = "Grantee"; +var _HB = "HeadBucket"; +var _HBO = "HeadBucketOutput"; +var _HBR = "HeadBucketRequest"; +var _HECRE = "HttpErrorCodeReturnedEquals"; +var _HN = "HostName"; +var _HO = "HeadObject"; +var _HOO = "HeadObjectOutput"; +var _HOR = "HeadObjectRequest"; +var _HRC = "HttpRedirectCode"; +var _I = "Id"; +var _IC = "InventoryConfiguration"; +var _ICL = "InventoryConfigurationList"; +var _ID = "ID"; +var _IDn = "IndexDocument"; +var _IDnv = "InventoryDestination"; +var _IE = "IsEnabled"; +var _IEn = "InventoryEncryption"; +var _IF = "InventoryFilter"; +var _IL = "IsLatest"; +var _IM = "IfMatch"; +var _IMIT = "IfMatchInitiatedTime"; +var _IMLMT = "IfMatchLastModifiedTime"; +var _IMS = "IfMatchSize"; +var _IMS_ = "If-Modified-Since"; +var _IMSf = "IfModifiedSince"; +var _IMUR = "InitiateMultipartUploadResult"; +var _IM_ = "If-Match"; +var _INM = "IfNoneMatch"; +var _INM_ = "If-None-Match"; +var _IOF = "InventoryOptionalFields"; +var _IOS = "InvalidObjectState"; +var _IOV = "IncludedObjectVersions"; +var _IP = "IsPublic"; +var _IPA = "IgnorePublicAcls"; +var _IPM = "IdempotencyParameterMismatch"; +var _IR = "InvalidRequest"; +var _IRIP = "IsRestoreInProgress"; +var _IS = "InputSerialization"; +var _ISBD = "InventoryS3BucketDestination"; +var _ISn = "InventorySchedule"; +var _IT = "IsTruncated"; +var _ITAO = "IntelligentTieringAndOperator"; +var _ITC = "IntelligentTieringConfiguration"; +var _ITCL = "IntelligentTieringConfigurationList"; +var _ITCR = "InventoryTableConfigurationResult"; +var _ITCU = "InventoryTableConfigurationUpdates"; +var _ITCn = "InventoryTableConfiguration"; +var _ITF = "IntelligentTieringFilter"; +var _IUS = "IfUnmodifiedSince"; +var _IUS_ = "If-Unmodified-Since"; +var _IWO = "InvalidWriteOffset"; +var _In = "Initiator"; +var _Ini = "Initiated"; +var _JSON = "JSON"; +var _JSONI = "JSONInput"; +var _JSONO = "JSONOutput"; +var _JTC = "JournalTableConfiguration"; +var _JTCR = "JournalTableConfigurationResult"; +var _JTCU = "JournalTableConfigurationUpdates"; +var _K = "Key"; +var _KC = "KeyCount"; +var _KI = "KeyId"; +var _KKA = "KmsKeyArn"; +var _KM = "KeyMarker"; +var _KMSC = "KMSContext"; +var _KMSKA = "KMSKeyArn"; +var _KMSKI = "KMSKeyId"; +var _KMSMKID = "KMSMasterKeyID"; +var _KPE = "KeyPrefixEquals"; +var _L = "Location"; +var _LAMBR = "ListAllMyBucketsResult"; +var _LAMDBR = "ListAllMyDirectoryBucketsResult"; +var _LB = "ListBuckets"; +var _LBAC = "ListBucketAnalyticsConfigurations"; +var _LBACO = "ListBucketAnalyticsConfigurationsOutput"; +var _LBACR = "ListBucketAnalyticsConfigurationResult"; +var _LBACRi = "ListBucketAnalyticsConfigurationsRequest"; +var _LBIC = "ListBucketInventoryConfigurations"; +var _LBICO = "ListBucketInventoryConfigurationsOutput"; +var _LBICR = "ListBucketInventoryConfigurationsRequest"; +var _LBITC = "ListBucketIntelligentTieringConfigurations"; +var _LBITCO = "ListBucketIntelligentTieringConfigurationsOutput"; +var _LBITCR = "ListBucketIntelligentTieringConfigurationsRequest"; +var _LBMC = "ListBucketMetricsConfigurations"; +var _LBMCO = "ListBucketMetricsConfigurationsOutput"; +var _LBMCR = "ListBucketMetricsConfigurationsRequest"; +var _LBO = "ListBucketsOutput"; +var _LBR = "ListBucketsRequest"; +var _LBRi = "ListBucketResult"; +var _LC = "LocationConstraint"; +var _LCi = "LifecycleConfiguration"; +var _LDB = "ListDirectoryBuckets"; +var _LDBO = "ListDirectoryBucketsOutput"; +var _LDBR = "ListDirectoryBucketsRequest"; +var _LE = "LoggingEnabled"; +var _LEi = "LifecycleExpiration"; +var _LFA = "LambdaFunctionArn"; +var _LFC = "LambdaFunctionConfiguration"; +var _LFCL = "LambdaFunctionConfigurationList"; +var _LFCa = "LambdaFunctionConfigurations"; +var _LH = "LegalHold"; +var _LI = "LocationInfo"; +var _LICR = "ListInventoryConfigurationsResult"; +var _LM = "LastModified"; +var _LMCR = "ListMetricsConfigurationsResult"; +var _LMT = "LastModifiedTime"; +var _LMU = "ListMultipartUploads"; +var _LMUO = "ListMultipartUploadsOutput"; +var _LMUR = "ListMultipartUploadsResult"; +var _LMURi = "ListMultipartUploadsRequest"; +var _LM_ = "Last-Modified"; +var _LO = "ListObjects"; +var _LOO = "ListObjectsOutput"; +var _LOR = "ListObjectsRequest"; +var _LOV = "ListObjectsV2"; +var _LOVO = "ListObjectsV2Output"; +var _LOVOi = "ListObjectVersionsOutput"; +var _LOVR = "ListObjectsV2Request"; +var _LOVRi = "ListObjectVersionsRequest"; +var _LOVi = "ListObjectVersions"; +var _LP = "ListParts"; +var _LPO = "ListPartsOutput"; +var _LPR = "ListPartsResult"; +var _LPRi = "ListPartsRequest"; +var _LR = "LifecycleRule"; +var _LRAO = "LifecycleRuleAndOperator"; +var _LRF = "LifecycleRuleFilter"; +var _LRi = "LifecycleRules"; +var _LVR = "ListVersionsResult"; +var _M = "Metadata"; +var _MAO = "MetricsAndOperator"; +var _MAS = "MaxAgeSeconds"; +var _MB = "MaxBuckets"; +var _MC = "MetadataConfiguration"; +var _MCL = "MetricsConfigurationList"; +var _MCR = "MetadataConfigurationResult"; +var _MCe = "MetricsConfiguration"; +var _MD = "MetadataDirective"; +var _MDB = "MaxDirectoryBuckets"; +var _MDf = "MfaDelete"; +var _ME = "MetadataEntry"; +var _MF = "MetricsFilter"; +var _MFA = "MFA"; +var _MFAD = "MFADelete"; +var _MK = "MaxKeys"; +var _MM = "MissingMeta"; +var _MOS = "MpuObjectSize"; +var _MP = "MaxParts"; +var _MTC = "MetadataTableConfiguration"; +var _MTCR = "MetadataTableConfigurationResult"; +var _MTEC = "MetadataTableEncryptionConfiguration"; +var _MU = "MultipartUpload"; +var _MUL = "MultipartUploadList"; +var _MUa = "MaxUploads"; +var _Ma = "Marker"; +var _Me = "Metrics"; +var _Mes = "Message"; +var _Mi = "Minutes"; +var _Mo = "Mode"; +var _N = "Name"; +var _NC = "NotificationConfiguration"; +var _NCF = "NotificationConfigurationFilter"; +var _NCT = "NextContinuationToken"; +var _ND = "NoncurrentDays"; +var _NEKKAS = "NonEmptyKmsKeyArnString"; +var _NF = "NotFound"; +var _NKM = "NextKeyMarker"; +var _NM = "NextMarker"; +var _NNV = "NewerNoncurrentVersions"; +var _NPNM = "NextPartNumberMarker"; +var _NSB = "NoSuchBucket"; +var _NSK = "NoSuchKey"; +var _NSU = "NoSuchUpload"; +var _NUIM = "NextUploadIdMarker"; +var _NVE = "NoncurrentVersionExpiration"; +var _NVIM = "NextVersionIdMarker"; +var _NVT = "NoncurrentVersionTransitions"; +var _NVTL = "NoncurrentVersionTransitionList"; +var _NVTo = "NoncurrentVersionTransition"; +var _O = "Owner"; +var _OA = "ObjectAttributes"; +var _OAIATE = "ObjectAlreadyInActiveTierError"; +var _OC = "OwnershipControls"; +var _OCR = "OwnershipControlsRule"; +var _OCRw = "OwnershipControlsRules"; +var _OE = "ObjectEncryption"; +var _OF = "OptionalFields"; +var _OI = "ObjectIdentifier"; +var _OIL = "ObjectIdentifierList"; +var _OL = "OutputLocation"; +var _OLC = "ObjectLockConfiguration"; +var _OLE = "ObjectLockEnabled"; +var _OLEFB = "ObjectLockEnabledForBucket"; +var _OLLH = "ObjectLockLegalHold"; +var _OLLHS = "ObjectLockLegalHoldStatus"; +var _OLM = "ObjectLockMode"; +var _OLR = "ObjectLockRetention"; +var _OLRUD = "ObjectLockRetainUntilDate"; +var _OLRb = "ObjectLockRule"; +var _OLb = "ObjectList"; +var _ONIATE = "ObjectNotInActiveTierError"; +var _OO = "ObjectOwnership"; +var _OOA = "OptionalObjectAttributes"; +var _OP = "ObjectParts"; +var _OPb = "ObjectPart"; +var _OS = "ObjectSize"; +var _OSGT = "ObjectSizeGreaterThan"; +var _OSLT = "ObjectSizeLessThan"; +var _OSV = "OutputSchemaVersion"; +var _OSu = "OutputSerialization"; +var _OV = "ObjectVersion"; +var _OVL = "ObjectVersionList"; +var _Ob = "Objects"; +var _Obj = "Object"; +var _P = "Prefix"; +var _PABC = "PublicAccessBlockConfiguration"; +var _PBA = "PutBucketAbac"; +var _PBAC = "PutBucketAccelerateConfiguration"; +var _PBACR = "PutBucketAccelerateConfigurationRequest"; +var _PBACRu = "PutBucketAnalyticsConfigurationRequest"; +var _PBACu = "PutBucketAnalyticsConfiguration"; +var _PBAR = "PutBucketAbacRequest"; +var _PBARu = "PutBucketAclRequest"; +var _PBAu = "PutBucketAcl"; +var _PBC = "PutBucketCors"; +var _PBCR = "PutBucketCorsRequest"; +var _PBE = "PutBucketEncryption"; +var _PBER = "PutBucketEncryptionRequest"; +var _PBIC = "PutBucketInventoryConfiguration"; +var _PBICR = "PutBucketInventoryConfigurationRequest"; +var _PBITC = "PutBucketIntelligentTieringConfiguration"; +var _PBITCR = "PutBucketIntelligentTieringConfigurationRequest"; +var _PBL = "PutBucketLogging"; +var _PBLC = "PutBucketLifecycleConfiguration"; +var _PBLCO = "PutBucketLifecycleConfigurationOutput"; +var _PBLCR = "PutBucketLifecycleConfigurationRequest"; +var _PBLR = "PutBucketLoggingRequest"; +var _PBMC = "PutBucketMetricsConfiguration"; +var _PBMCR = "PutBucketMetricsConfigurationRequest"; +var _PBNC = "PutBucketNotificationConfiguration"; +var _PBNCR = "PutBucketNotificationConfigurationRequest"; +var _PBOC = "PutBucketOwnershipControls"; +var _PBOCR = "PutBucketOwnershipControlsRequest"; +var _PBP = "PutBucketPolicy"; +var _PBPR = "PutBucketPolicyRequest"; +var _PBR = "PutBucketReplication"; +var _PBRP = "PutBucketRequestPayment"; +var _PBRPR = "PutBucketRequestPaymentRequest"; +var _PBRR = "PutBucketReplicationRequest"; +var _PBT = "PutBucketTagging"; +var _PBTR = "PutBucketTaggingRequest"; +var _PBV = "PutBucketVersioning"; +var _PBVR = "PutBucketVersioningRequest"; +var _PBW = "PutBucketWebsite"; +var _PBWR = "PutBucketWebsiteRequest"; +var _PC = "PartsCount"; +var _PDS = "PartitionDateSource"; +var _PE = "ProgressEvent"; +var _PI = "ParquetInput"; +var _PL = "PartsList"; +var _PN = "PartNumber"; +var _PNM = "PartNumberMarker"; +var _PO = "PutObject"; +var _POA = "PutObjectAcl"; +var _POAO = "PutObjectAclOutput"; +var _POAR = "PutObjectAclRequest"; +var _POLC = "PutObjectLockConfiguration"; +var _POLCO = "PutObjectLockConfigurationOutput"; +var _POLCR = "PutObjectLockConfigurationRequest"; +var _POLH = "PutObjectLegalHold"; +var _POLHO = "PutObjectLegalHoldOutput"; +var _POLHR = "PutObjectLegalHoldRequest"; +var _POO = "PutObjectOutput"; +var _POR = "PutObjectRequest"; +var _PORO = "PutObjectRetentionOutput"; +var _PORR = "PutObjectRetentionRequest"; +var _PORu = "PutObjectRetention"; +var _POT = "PutObjectTagging"; +var _POTO = "PutObjectTaggingOutput"; +var _POTR = "PutObjectTaggingRequest"; +var _PP = "PartitionedPrefix"; +var _PPAB = "PutPublicAccessBlock"; +var _PPABR = "PutPublicAccessBlockRequest"; +var _PS = "PolicyStatus"; +var _Pa = "Parts"; +var _Par = "Part"; +var _Parq = "Parquet"; +var _Pay = "Payer"; +var _Payl = "Payload"; +var _Pe = "Permission"; +var _Po = "Policy"; +var _Pr = "Progress"; +var _Pri = "Priority"; +var _Pro = "Protocol"; +var _Q = "Quiet"; +var _QA = "QueueArn"; +var _QC = "QuoteCharacter"; +var _QCL = "QueueConfigurationList"; +var _QCu = "QueueConfigurations"; +var _QCue = "QueueConfiguration"; +var _QEC = "QuoteEscapeCharacter"; +var _QF = "QuoteFields"; +var _Qu = "Queue"; +var _R = "Rules"; +var _RART = "RedirectAllRequestsTo"; +var _RC = "RequestCharged"; +var _RCC = "ResponseCacheControl"; +var _RCD = "ResponseContentDisposition"; +var _RCE = "ResponseContentEncoding"; +var _RCL = "ResponseContentLanguage"; +var _RCT = "ResponseContentType"; +var _RCe = "ReplicationConfiguration"; +var _RD = "RecordDelimiter"; +var _RE = "ResponseExpires"; +var _RED = "RestoreExpiryDate"; +var _REe = "RecordExpiration"; +var _REec = "RecordsEvent"; +var _RKKID = "ReplicaKmsKeyID"; +var _RKPW = "ReplaceKeyPrefixWith"; +var _RKW = "ReplaceKeyWith"; +var _RM = "ReplicaModifications"; +var _RO = "RenameObject"; +var _ROO = "RenameObjectOutput"; +var _ROOe = "RestoreObjectOutput"; +var _ROP = "RestoreOutputPath"; +var _ROR = "RenameObjectRequest"; +var _RORe = "RestoreObjectRequest"; +var _ROe = "RestoreObject"; +var _RP = "RequestPayer"; +var _RPB = "RestrictPublicBuckets"; +var _RPC = "RequestPaymentConfiguration"; +var _RPe = "RequestProgress"; +var _RR = "RoutingRules"; +var _RRAO = "ReplicationRuleAndOperator"; +var _RRF = "ReplicationRuleFilter"; +var _RRe = "ReplicationRule"; +var _RRep = "ReplicationRules"; +var _RReq = "RequestRoute"; +var _RRes = "RestoreRequest"; +var _RRo = "RoutingRule"; +var _RS = "ReplicationStatus"; +var _RSe = "RestoreStatus"; +var _RSen = "RenameSource"; +var _RT = "ReplicationTime"; +var _RTV = "ReplicationTimeValue"; +var _RTe = "RequestToken"; +var _RUD = "RetainUntilDate"; +var _Ra = "Range"; +var _Re = "Restore"; +var _Rec = "Records"; +var _Red = "Redirect"; +var _Ret = "Retention"; +var _Ro = "Role"; +var _Ru = "Rule"; +var _S = "Status"; +var _SA = "StartAfter"; +var _SAK = "SecretAccessKey"; +var _SAs = "SseAlgorithm"; +var _SB = "StreamingBlob"; +var _SBD = "S3BucketDestination"; +var _SC = "StorageClass"; +var _SCA = "StorageClassAnalysis"; +var _SCADE = "StorageClassAnalysisDataExport"; +var _SCV = "SessionCredentialValue"; +var _SCe = "SessionCredentials"; +var _SCt = "StatusCode"; +var _SDV = "SkipDestinationValidation"; +var _SE = "StatsEvent"; +var _SIM = "SourceIfMatch"; +var _SIMS = "SourceIfModifiedSince"; +var _SINM = "SourceIfNoneMatch"; +var _SIUS = "SourceIfUnmodifiedSince"; +var _SK = "SSE-KMS"; +var _SKEO = "SseKmsEncryptedObjects"; +var _SKF = "S3KeyFilter"; +var _SKe = "S3Key"; +var _SL = "S3Location"; +var _SM = "SessionMode"; +var _SOC = "SelectObjectContent"; +var _SOCES = "SelectObjectContentEventStream"; +var _SOCO = "SelectObjectContentOutput"; +var _SOCR = "SelectObjectContentRequest"; +var _SP = "SelectParameters"; +var _SPi = "SimplePrefix"; +var _SR = "ScanRange"; +var _SS = "SSE-S3"; +var _SSC = "SourceSelectionCriteria"; +var _SSE = "ServerSideEncryption"; +var _SSEA = "SSEAlgorithm"; +var _SSEBD = "ServerSideEncryptionByDefault"; +var _SSEC = "ServerSideEncryptionConfiguration"; +var _SSECA = "SSECustomerAlgorithm"; +var _SSECK = "SSECustomerKey"; +var _SSECKMD = "SSECustomerKeyMD5"; +var _SSEKMS = "SSEKMS"; +var _SSEKMSE = "SSEKMSEncryption"; +var _SSEKMSEC = "SSEKMSEncryptionContext"; +var _SSEKMSKI = "SSEKMSKeyId"; +var _SSER = "ServerSideEncryptionRule"; +var _SSERe = "ServerSideEncryptionRules"; +var _SSES = "SSES3"; +var _ST = "SessionToken"; +var _STD = "S3TablesDestination"; +var _STDR = "S3TablesDestinationResult"; +var _S_ = "S3"; +var _Sc = "Schedule"; +var _Si = "Size"; +var _St = "Start"; +var _Sta = "Stats"; +var _Su = "Suffix"; +var _T = "Tags"; +var _TA = "TableArn"; +var _TAo = "TopicArn"; +var _TB = "TargetBucket"; +var _TBA = "TableBucketArn"; +var _TBT = "TableBucketType"; +var _TC = "TagCount"; +var _TCL = "TopicConfigurationList"; +var _TCo = "TopicConfigurations"; +var _TCop = "TopicConfiguration"; +var _TD = "TaggingDirective"; +var _TDMOS = "TransitionDefaultMinimumObjectSize"; +var _TG = "TargetGrants"; +var _TGa = "TargetGrant"; +var _TL = "TieringList"; +var _TLr = "TransitionList"; +var _TMP = "TooManyParts"; +var _TN = "TableNamespace"; +var _TNa = "TableName"; +var _TOKF = "TargetObjectKeyFormat"; +var _TP = "TargetPrefix"; +var _TPC = "TotalPartsCount"; +var _TS = "TagSet"; +var _TSa = "TableStatus"; +var _Ta = "Tag"; +var _Tag = "Tagging"; +var _Ti = "Tier"; +var _Tie = "Tierings"; +var _Tier = "Tiering"; +var _Tim = "Time"; +var _To = "Token"; +var _Top = "Topic"; +var _Tr = "Transitions"; +var _Tra = "Transition"; +var _Ty = "Type"; +var _U = "Uploads"; +var _UBMITC = "UpdateBucketMetadataInventoryTableConfiguration"; +var _UBMITCR = "UpdateBucketMetadataInventoryTableConfigurationRequest"; +var _UBMJTC = "UpdateBucketMetadataJournalTableConfiguration"; +var _UBMJTCR = "UpdateBucketMetadataJournalTableConfigurationRequest"; +var _UI = "UploadId"; +var _UIM = "UploadIdMarker"; +var _UM = "UserMetadata"; +var _UOE = "UpdateObjectEncryption"; +var _UOER = "UpdateObjectEncryptionRequest"; +var _UOERp = "UpdateObjectEncryptionResponse"; +var _UP = "UploadPart"; +var _UPC = "UploadPartCopy"; +var _UPCO = "UploadPartCopyOutput"; +var _UPCR = "UploadPartCopyRequest"; +var _UPO = "UploadPartOutput"; +var _UPR = "UploadPartRequest"; +var _URI = "URI"; +var _Up = "Upload"; +var _V = "Value"; +var _VC = "VersioningConfiguration"; +var _VI = "VersionId"; +var _VIM = "VersionIdMarker"; +var _Ve = "Versions"; +var _Ver = "Version"; +var _WC = "WebsiteConfiguration"; +var _WGOR = "WriteGetObjectResponse"; +var _WGORR = "WriteGetObjectResponseRequest"; +var _WOB = "WriteOffsetBytes"; +var _WRL = "WebsiteRedirectLocation"; +var _Y = "Years"; +var _ar = "accept-ranges"; +var _br = "bucket-region"; +var _c = "client"; +var _ct = "continuation-token"; +var _d = "delimiter"; +var _e = "error"; +var _eP = "eventPayload"; +var _en = "endpoint"; +var _et = "encoding-type"; +var _fo = "fetch-owner"; +var _h = "http"; +var _hC = "httpChecksum"; +var _hE = "httpError"; +var _hH = "httpHeader"; +var _hL = "hostLabel"; +var _hP = "httpPayload"; +var _hPH = "httpPrefixHeaders"; +var _hQ = "httpQuery"; +var _hi = "http://www.w3.org/2001/XMLSchema-instance"; +var _i = "id"; +var _iT = "idempotencyToken"; +var _km = "key-marker"; +var _m = "marker"; +var _mb = "max-buckets"; +var _mdb = "max-directory-buckets"; +var _mk = "max-keys"; +var _mp = "max-parts"; +var _mu = "max-uploads"; +var _p = "prefix"; +var _pN = "partNumber"; +var _pnm = "part-number-marker"; +var _rcc = "response-cache-control"; +var _rcd = "response-content-disposition"; +var _rce = "response-content-encoding"; +var _rcl = "response-content-language"; +var _rct = "response-content-type"; +var _re = "response-expires"; +var _s = "smithy.ts.sdk.synthetic.com.amazonaws.s3"; +var _sa = "start-after"; +var _st = "streaming"; +var _uI = "uploadId"; +var _uim = "upload-id-marker"; +var _vI = "versionId"; +var _vim = "version-id-marker"; +var _x = "xsi"; +var _xA = "xmlAttribute"; +var _xF = "xmlFlattened"; +var _xN = "xmlName"; +var _xNm = "xmlNamespace"; +var _xaa = "x-amz-acl"; +var _xaad = "x-amz-abort-date"; +var _xaapa = "x-amz-access-point-alias"; +var _xaari = "x-amz-abort-rule-id"; +var _xaas = "x-amz-archive-status"; +var _xaba = "x-amz-bucket-arn"; +var _xabgr = "x-amz-bypass-governance-retention"; +var _xabln = "x-amz-bucket-location-name"; +var _xablt = "x-amz-bucket-location-type"; +var _xabn = "x-amz-bucket-namespace"; +var _xabole = "x-amz-bucket-object-lock-enabled"; +var _xabolt = "x-amz-bucket-object-lock-token"; +var _xabr = "x-amz-bucket-region"; +var _xaca = "x-amz-checksum-algorithm"; +var _xacc = "x-amz-checksum-crc32"; +var _xacc_ = "x-amz-checksum-crc32c"; +var _xacc__ = "x-amz-checksum-crc64nvme"; +var _xacm = "x-amz-checksum-mode"; +var _xacrsba = "x-amz-confirm-remove-self-bucket-access"; +var _xacs = "x-amz-checksum-sha1"; +var _xacs_ = "x-amz-checksum-sha256"; +var _xacs__ = "x-amz-copy-source"; +var _xacsim = "x-amz-copy-source-if-match"; +var _xacsims = "x-amz-copy-source-if-modified-since"; +var _xacsinm = "x-amz-copy-source-if-none-match"; +var _xacsius = "x-amz-copy-source-if-unmodified-since"; +var _xacsm = "x-amz-create-session-mode"; +var _xacsr = "x-amz-copy-source-range"; +var _xacssseca = "x-amz-copy-source-server-side-encryption-customer-algorithm"; +var _xacssseck = "x-amz-copy-source-server-side-encryption-customer-key"; +var _xacssseckM = "x-amz-copy-source-server-side-encryption-customer-key-MD5"; +var _xacsvi = "x-amz-copy-source-version-id"; +var _xact = "x-amz-checksum-type"; +var _xact_ = "x-amz-client-token"; +var _xadm = "x-amz-delete-marker"; +var _xae = "x-amz-expiration"; +var _xaebo = "x-amz-expected-bucket-owner"; +var _xafec = "x-amz-fwd-error-code"; +var _xafem = "x-amz-fwd-error-message"; +var _xafhCC = "x-amz-fwd-header-Cache-Control"; +var _xafhCD = "x-amz-fwd-header-Content-Disposition"; +var _xafhCE = "x-amz-fwd-header-Content-Encoding"; +var _xafhCL = "x-amz-fwd-header-Content-Language"; +var _xafhCR = "x-amz-fwd-header-Content-Range"; +var _xafhCT = "x-amz-fwd-header-Content-Type"; +var _xafhE = "x-amz-fwd-header-ETag"; +var _xafhE_ = "x-amz-fwd-header-Expires"; +var _xafhLM = "x-amz-fwd-header-Last-Modified"; +var _xafhar = "x-amz-fwd-header-accept-ranges"; +var _xafhxacc = "x-amz-fwd-header-x-amz-checksum-crc32"; +var _xafhxacc_ = "x-amz-fwd-header-x-amz-checksum-crc32c"; +var _xafhxacc__ = "x-amz-fwd-header-x-amz-checksum-crc64nvme"; +var _xafhxacs = "x-amz-fwd-header-x-amz-checksum-sha1"; +var _xafhxacs_ = "x-amz-fwd-header-x-amz-checksum-sha256"; +var _xafhxadm = "x-amz-fwd-header-x-amz-delete-marker"; +var _xafhxae = "x-amz-fwd-header-x-amz-expiration"; +var _xafhxamm = "x-amz-fwd-header-x-amz-missing-meta"; +var _xafhxampc = "x-amz-fwd-header-x-amz-mp-parts-count"; +var _xafhxaollh = "x-amz-fwd-header-x-amz-object-lock-legal-hold"; +var _xafhxaolm = "x-amz-fwd-header-x-amz-object-lock-mode"; +var _xafhxaolrud = "x-amz-fwd-header-x-amz-object-lock-retain-until-date"; +var _xafhxar = "x-amz-fwd-header-x-amz-restore"; +var _xafhxarc = "x-amz-fwd-header-x-amz-request-charged"; +var _xafhxars = "x-amz-fwd-header-x-amz-replication-status"; +var _xafhxasc = "x-amz-fwd-header-x-amz-storage-class"; +var _xafhxasse = "x-amz-fwd-header-x-amz-server-side-encryption"; +var _xafhxasseakki = "x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"; +var _xafhxassebke = "x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"; +var _xafhxasseca = "x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"; +var _xafhxasseckM = "x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5"; +var _xafhxatc = "x-amz-fwd-header-x-amz-tagging-count"; +var _xafhxavi = "x-amz-fwd-header-x-amz-version-id"; +var _xafs = "x-amz-fwd-status"; +var _xagfc = "x-amz-grant-full-control"; +var _xagr = "x-amz-grant-read"; +var _xagra = "x-amz-grant-read-acp"; +var _xagw = "x-amz-grant-write"; +var _xagwa = "x-amz-grant-write-acp"; +var _xaimit = "x-amz-if-match-initiated-time"; +var _xaimlmt = "x-amz-if-match-last-modified-time"; +var _xaims = "x-amz-if-match-size"; +var _xam = "x-amz-meta-"; +var _xam_ = "x-amz-mfa"; +var _xamd = "x-amz-metadata-directive"; +var _xamm = "x-amz-missing-meta"; +var _xamos = "x-amz-mp-object-size"; +var _xamp = "x-amz-max-parts"; +var _xampc = "x-amz-mp-parts-count"; +var _xaoa = "x-amz-object-attributes"; +var _xaollh = "x-amz-object-lock-legal-hold"; +var _xaolm = "x-amz-object-lock-mode"; +var _xaolrud = "x-amz-object-lock-retain-until-date"; +var _xaoo = "x-amz-object-ownership"; +var _xaooa = "x-amz-optional-object-attributes"; +var _xaos = "x-amz-object-size"; +var _xapnm = "x-amz-part-number-marker"; +var _xar = "x-amz-restore"; +var _xarc = "x-amz-request-charged"; +var _xarop = "x-amz-restore-output-path"; +var _xarp = "x-amz-request-payer"; +var _xarr = "x-amz-request-route"; +var _xars = "x-amz-replication-status"; +var _xars_ = "x-amz-rename-source"; +var _xarsim = "x-amz-rename-source-if-match"; +var _xarsims = "x-amz-rename-source-if-modified-since"; +var _xarsinm = "x-amz-rename-source-if-none-match"; +var _xarsius = "x-amz-rename-source-if-unmodified-since"; +var _xart = "x-amz-request-token"; +var _xasc = "x-amz-storage-class"; +var _xasca = "x-amz-sdk-checksum-algorithm"; +var _xasdv = "x-amz-skip-destination-validation"; +var _xasebo = "x-amz-source-expected-bucket-owner"; +var _xasse = "x-amz-server-side-encryption"; +var _xasseakki = "x-amz-server-side-encryption-aws-kms-key-id"; +var _xassebke = "x-amz-server-side-encryption-bucket-key-enabled"; +var _xassec = "x-amz-server-side-encryption-context"; +var _xasseca = "x-amz-server-side-encryption-customer-algorithm"; +var _xasseck = "x-amz-server-side-encryption-customer-key"; +var _xasseckM = "x-amz-server-side-encryption-customer-key-MD5"; +var _xat = "x-amz-tagging"; +var _xatc = "x-amz-tagging-count"; +var _xatd = "x-amz-tagging-directive"; +var _xatdmos = "x-amz-transition-default-minimum-object-size"; +var _xavi = "x-amz-version-id"; +var _xawob = "x-amz-write-offset-bytes"; +var _xawrl = "x-amz-website-redirect-location"; +var _xs = "xsi:type"; +var n0 = "com.amazonaws.s3"; +var _s_registry = TypeRegistry.for(_s); +var S3ServiceException$ = [-3, _s, "S3ServiceException", 0, [], []]; +_s_registry.registerError(S3ServiceException$, S3ServiceException); +var n0_registry = TypeRegistry.for(n0); +var AccessDenied$ = [ + -3, + n0, + _AD, + { [_e]: _c, [_hE]: 403 }, + [], + [] +]; +n0_registry.registerError(AccessDenied$, AccessDenied); +var BucketAlreadyExists$ = [ + -3, + n0, + _BAE, + { [_e]: _c, [_hE]: 409 }, + [], + [] +]; +n0_registry.registerError(BucketAlreadyExists$, BucketAlreadyExists); +var BucketAlreadyOwnedByYou$ = [ + -3, + n0, + _BAOBY, + { [_e]: _c, [_hE]: 409 }, + [], + [] +]; +n0_registry.registerError(BucketAlreadyOwnedByYou$, BucketAlreadyOwnedByYou); +var EncryptionTypeMismatch$ = [ + -3, + n0, + _ETM, + { [_e]: _c, [_hE]: 400 }, + [], + [] +]; +n0_registry.registerError(EncryptionTypeMismatch$, EncryptionTypeMismatch); +var IdempotencyParameterMismatch$ = [ + -3, + n0, + _IPM, + { [_e]: _c, [_hE]: 400 }, + [], + [] +]; +n0_registry.registerError(IdempotencyParameterMismatch$, IdempotencyParameterMismatch); +var InvalidObjectState$ = [ + -3, + n0, + _IOS, + { [_e]: _c, [_hE]: 403 }, + [_SC, _AT], + [0, 0] +]; +n0_registry.registerError(InvalidObjectState$, InvalidObjectState); +var InvalidRequest$ = [ + -3, + n0, + _IR, + { [_e]: _c, [_hE]: 400 }, + [], + [] +]; +n0_registry.registerError(InvalidRequest$, InvalidRequest); +var InvalidWriteOffset$ = [ + -3, + n0, + _IWO, + { [_e]: _c, [_hE]: 400 }, + [], + [] +]; +n0_registry.registerError(InvalidWriteOffset$, InvalidWriteOffset); +var NoSuchBucket$ = [ + -3, + n0, + _NSB, + { [_e]: _c, [_hE]: 404 }, + [], + [] +]; +n0_registry.registerError(NoSuchBucket$, NoSuchBucket); +var NoSuchKey$ = [ + -3, + n0, + _NSK, + { [_e]: _c, [_hE]: 404 }, + [], + [] +]; +n0_registry.registerError(NoSuchKey$, NoSuchKey); +var NoSuchUpload$ = [ + -3, + n0, + _NSU, + { [_e]: _c, [_hE]: 404 }, + [], + [] +]; +n0_registry.registerError(NoSuchUpload$, NoSuchUpload); +var NotFound$ = [ + -3, + n0, + _NF, + { [_e]: _c }, + [], + [] +]; +n0_registry.registerError(NotFound$, NotFound); +var ObjectAlreadyInActiveTierError$ = [ + -3, + n0, + _OAIATE, + { [_e]: _c, [_hE]: 403 }, + [], + [] +]; +n0_registry.registerError(ObjectAlreadyInActiveTierError$, ObjectAlreadyInActiveTierError); +var ObjectNotInActiveTierError$ = [ + -3, + n0, + _ONIATE, + { [_e]: _c, [_hE]: 403 }, + [], + [] +]; +n0_registry.registerError(ObjectNotInActiveTierError$, ObjectNotInActiveTierError); +var TooManyParts$ = [ + -3, + n0, + _TMP, + { [_e]: _c, [_hE]: 400 }, + [], + [] +]; +n0_registry.registerError(TooManyParts$, TooManyParts); +var CopySourceSSECustomerKey = [0, n0, _CSSSECK, 8, 0]; +var NonEmptyKmsKeyArnString = [0, n0, _NEKKAS, 8, 0]; +var SessionCredentialValue = [0, n0, _SCV, 8, 0]; +var SSECustomerKey = [0, n0, _SSECK, 8, 0]; +var SSEKMSEncryptionContext = [0, n0, _SSEKMSEC, 8, 0]; +var SSEKMSKeyId = [0, n0, _SSEKMSKI, 8, 0]; +var StreamingBlob = [0, n0, _SB, { [_st]: 1 }, 42]; +var AbacStatus$ = [ + 3, + n0, + _AS, + 0, + [_S], + [0] +]; +var AbortIncompleteMultipartUpload$ = [ + 3, + n0, + _AIMU, + 0, + [_DAI], + [1] +]; +var AbortMultipartUploadOutput$ = [ + 3, + n0, + _AMUO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] +]; +var AbortMultipartUploadRequest$ = [ + 3, + n0, + _AMUR, + 0, + [_B, _K, _UI, _RP, _EBO, _IMIT], + [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [6, { [_hH]: _xaimit }]], + 3 +]; +var AccelerateConfiguration$ = [ + 3, + n0, + _AC, + 0, + [_S], + [0] +]; +var AccessControlPolicy$ = [ + 3, + n0, + _ACP, + 0, + [_G, _O], + [[() => Grants, { [_xN]: _ACL }], () => Owner$] +]; +var AccessControlTranslation$ = [ + 3, + n0, + _ACT, + 0, + [_O], + [0], + 1 +]; +var AnalyticsAndOperator$ = [ + 3, + n0, + _AAO, + 0, + [_P, _T], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]] +]; +var AnalyticsConfiguration$ = [ + 3, + n0, + _ACn, + 0, + [_I, _SCA, _F], + [0, () => StorageClassAnalysis$, [() => AnalyticsFilter$, 0]], + 2 +]; +var AnalyticsExportDestination$ = [ + 3, + n0, + _AED, + 0, + [_SBD], + [() => AnalyticsS3BucketDestination$], + 1 +]; +var AnalyticsS3BucketDestination$ = [ + 3, + n0, + _ASBD, + 0, + [_Fo, _B, _BAI, _P], + [0, 0, 0, 0], + 2 +]; +var BlockedEncryptionTypes$ = [ + 3, + n0, + _BET, + 0, + [_ET], + [[() => EncryptionTypeList, { [_xF]: 1 }]] +]; +var Bucket$ = [ + 3, + n0, + _B, + 0, + [_N, _CD, _BR, _BA], + [0, 4, 0, 0] +]; +var BucketInfo$ = [ + 3, + n0, + _BI, + 0, + [_DR, _Ty], + [0, 0] +]; +var BucketLifecycleConfiguration$ = [ + 3, + n0, + _BLC, + 0, + [_R], + [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Ru }]], + 1 +]; +var BucketLoggingStatus$ = [ + 3, + n0, + _BLS, + 0, + [_LE], + [[() => LoggingEnabled$, 0]] +]; +var Checksum$ = [ + 3, + n0, + _C, + 0, + [_CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT], + [0, 0, 0, 0, 0, 0] +]; +var CommonPrefix$ = [ + 3, + n0, + _CP, + 0, + [_P], + [0] +]; +var CompletedMultipartUpload$ = [ + 3, + n0, + _CMU, + 0, + [_Pa], + [[() => CompletedPartList, { [_xF]: 1, [_xN]: _Par }]] +]; +var CompletedPart$ = [ + 3, + n0, + _CPo, + 0, + [_ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _PN], + [0, 0, 0, 0, 0, 0, 1] +]; +var CompleteMultipartUploadOutput$ = [ + 3, + n0, + _CMUO, + { [_xN]: _CMUR }, + [_L, _B, _K, _E, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _SSE, _VI, _SSEKMSKI, _BKE, _RC], + [0, 0, 0, [0, { [_hH]: _xae }], 0, 0, 0, 0, 0, 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] +]; +var CompleteMultipartUploadRequest$ = [ + 3, + n0, + _CMURo, + 0, + [_B, _K, _UI, _MU, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _MOS, _RP, _EBO, _IM, _INM, _SSECA, _SSECK, _SSECKMD], + [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [() => CompletedMultipartUpload$, { [_hP]: 1, [_xN]: _CMUo }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamos }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], + 3 +]; +var Condition$ = [ + 3, + n0, + _Co, + 0, + [_HECRE, _KPE], + [0, 0] +]; +var ContinuationEvent$ = [ + 3, + n0, + _CE, + 0, + [], + [] +]; +var CopyObjectOutput$ = [ + 3, + n0, + _COO, + 0, + [_COR, _E, _CSVI, _VI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC], + [[() => CopyObjectResult$, 16], [0, { [_hH]: _xae }], [0, { [_hH]: _xacsvi }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] +]; +var CopyObjectRequest$ = [ + 3, + n0, + _CORo, + 0, + [_B, _CS, _K, _ACL_, _CC, _CA, _CDo, _CEo, _CL, _CTo, _CSIM, _CSIMS, _CSINM, _CSIUS, _Ex, _GFC, _GR, _GRACP, _GWACP, _IM, _INM, _M, _MD, _TD, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _ESBO], + [[0, 1], [0, { [_hH]: _xacs__ }], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _xaca }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [4, { [_hH]: _Ex }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xamd }], [0, { [_hH]: _xatd }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], + 3 +]; +var CopyObjectResult$ = [ + 3, + n0, + _COR, + 0, + [_ETa, _LM, _CT, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh], + [0, 4, 0, 0, 0, 0, 0, 0] +]; +var CopyPartResult$ = [ + 3, + n0, + _CPR, + 0, + [_ETa, _LM, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh], + [0, 4, 0, 0, 0, 0, 0] +]; +var CORSConfiguration$ = [ + 3, + n0, + _CORSC, + 0, + [_CORSR], + [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]], + 1 +]; +var CORSRule$ = [ + 3, + n0, + _CORSRu, + 0, + [_AM, _AO, _ID, _AH, _EH, _MAS], + [[64 | 0, { [_xF]: 1, [_xN]: _AMl }], [64 | 0, { [_xF]: 1, [_xN]: _AOl }], 0, [64 | 0, { [_xF]: 1, [_xN]: _AHl }], [64 | 0, { [_xF]: 1, [_xN]: _EHx }], 1], + 2 +]; +var CreateBucketConfiguration$ = [ + 3, + n0, + _CBC, + 0, + [_LC, _L, _B, _T], + [0, () => LocationInfo$, () => BucketInfo$, [() => TagSet, 0]] +]; +var CreateBucketMetadataConfigurationRequest$ = [ + 3, + n0, + _CBMCR, + 0, + [_B, _MC, _CMD, _CA, _EBO], + [[0, 1], [() => MetadataConfiguration$, { [_hP]: 1, [_xN]: _MC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 +]; +var CreateBucketMetadataTableConfigurationRequest$ = [ + 3, + n0, + _CBMTCR, + 0, + [_B, _MTC, _CMD, _CA, _EBO], + [[0, 1], [() => MetadataTableConfiguration$, { [_hP]: 1, [_xN]: _MTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 +]; +var CreateBucketOutput$ = [ + 3, + n0, + _CBO, + 0, + [_L, _BA], + [[0, { [_hH]: _L }], [0, { [_hH]: _xaba }]] +]; +var CreateBucketRequest$ = [ + 3, + n0, + _CBR, + 0, + [_B, _ACL_, _CBC, _GFC, _GR, _GRACP, _GW, _GWACP, _OLEFB, _OO, _BN], + [[0, 1], [0, { [_hH]: _xaa }], [() => CreateBucketConfiguration$, { [_hP]: 1, [_xN]: _CBC }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [2, { [_hH]: _xabole }], [0, { [_hH]: _xaoo }], [0, { [_hH]: _xabn }]], + 1 +]; +var CreateMultipartUploadOutput$ = [ + 3, + n0, + _CMUOr, + { [_xN]: _IMUR }, + [_ADb, _ARI, _B, _K, _UI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC, _CA, _CT], + [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], [0, { [_xN]: _B }], 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]] +]; +var CreateMultipartUploadRequest$ = [ + 3, + n0, + _CMURr, + 0, + [_B, _K, _ACL_, _CC, _CDo, _CEo, _CL, _CTo, _Ex, _GFC, _GR, _GRACP, _GWACP, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _CA, _CT], + [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]], + 2 +]; +var CreateSessionOutput$ = [ + 3, + n0, + _CSO, + { [_xN]: _CSR }, + [_Cr, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE], + [[() => SessionCredentials$, { [_xN]: _Cr }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], + 1 +]; +var CreateSessionRequest$ = [ + 3, + n0, + _CSRr, + 0, + [_B, _SM, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE], + [[0, 1], [0, { [_hH]: _xacsm }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], + 1 +]; +var CSVInput$ = [ + 3, + n0, + _CSVIn, + 0, + [_FHI, _Com, _QEC, _RD, _FD, _QC, _AQRD], + [0, 0, 0, 0, 0, 0, 2] +]; +var CSVOutput$ = [ + 3, + n0, + _CSVO, + 0, + [_QF, _QEC, _RD, _FD, _QC], + [0, 0, 0, 0, 0] +]; +var DefaultRetention$ = [ + 3, + n0, + _DRe, + 0, + [_Mo, _D, _Y], + [0, 1, 1] +]; +var Delete$ = [ + 3, + n0, + _De, + 0, + [_Ob, _Q], + [[() => ObjectIdentifierList, { [_xF]: 1, [_xN]: _Obj }], 2], + 1 +]; +var DeleteBucketAnalyticsConfigurationRequest$ = [ + 3, + n0, + _DBACR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 +]; +var DeleteBucketCorsRequest$ = [ + 3, + n0, + _DBCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var DeleteBucketEncryptionRequest$ = [ + 3, + n0, + _DBER, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var DeleteBucketIntelligentTieringConfigurationRequest$ = [ + 3, + n0, + _DBITCR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 +]; +var DeleteBucketInventoryConfigurationRequest$ = [ + 3, + n0, + _DBICR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 +]; +var DeleteBucketLifecycleRequest$ = [ + 3, + n0, + _DBLR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var DeleteBucketMetadataConfigurationRequest$ = [ + 3, + n0, + _DBMCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var DeleteBucketMetadataTableConfigurationRequest$ = [ + 3, + n0, + _DBMTCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var DeleteBucketMetricsConfigurationRequest$ = [ + 3, + n0, + _DBMCRe, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 +]; +var DeleteBucketOwnershipControlsRequest$ = [ + 3, + n0, + _DBOCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var DeleteBucketPolicyRequest$ = [ + 3, + n0, + _DBPR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var DeleteBucketReplicationRequest$ = [ + 3, + n0, + _DBRR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var DeleteBucketRequest$ = [ + 3, + n0, + _DBR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var DeleteBucketTaggingRequest$ = [ + 3, + n0, + _DBTR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var DeleteBucketWebsiteRequest$ = [ + 3, + n0, + _DBWR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var DeletedObject$ = [ + 3, + n0, + _DO, + 0, + [_K, _VI, _DM, _DMVI], + [0, 0, 2, 0] +]; +var DeleteMarkerEntry$ = [ + 3, + n0, + _DME, + 0, + [_O, _K, _VI, _IL, _LM], + [() => Owner$, 0, 0, 2, 4] +]; +var DeleteMarkerReplication$ = [ + 3, + n0, + _DMR, + 0, + [_S], + [0] +]; +var DeleteObjectOutput$ = [ + 3, + n0, + _DOO, + 0, + [_DM, _VI, _RC], + [[2, { [_hH]: _xadm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }]] +]; +var DeleteObjectRequest$ = [ + 3, + n0, + _DOR, + 0, + [_B, _K, _MFA, _VI, _RP, _BGR, _EBO, _IM, _IMLMT, _IMS], + [[0, 1], [0, 1], [0, { [_hH]: _xam_ }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [6, { [_hH]: _xaimlmt }], [1, { [_hH]: _xaims }]], + 2 +]; +var DeleteObjectsOutput$ = [ + 3, + n0, + _DOOe, + { [_xN]: _DRel }, + [_Del, _RC, _Er], + [[() => DeletedObjects, { [_xF]: 1 }], [0, { [_hH]: _xarc }], [() => Errors, { [_xF]: 1, [_xN]: _Err }]] +]; +var DeleteObjectsRequest$ = [ + 3, + n0, + _DORe, + 0, + [_B, _De, _MFA, _RP, _BGR, _EBO, _CA], + [[0, 1], [() => Delete$, { [_hP]: 1, [_xN]: _De }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], + 2 +]; +var DeleteObjectTaggingOutput$ = [ + 3, + n0, + _DOTO, + 0, + [_VI], + [[0, { [_hH]: _xavi }]] +]; +var DeleteObjectTaggingRequest$ = [ + 3, + n0, + _DOTR, + 0, + [_B, _K, _VI, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], + 2 +]; +var DeletePublicAccessBlockRequest$ = [ + 3, + n0, + _DPABR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var Destination$ = [ + 3, + n0, + _Des, + 0, + [_B, _A, _SC, _ACT, _EC, _RT, _Me], + [0, 0, 0, () => AccessControlTranslation$, () => EncryptionConfiguration$, () => ReplicationTime$, () => Metrics$], + 1 +]; +var DestinationResult$ = [ + 3, + n0, + _DRes, + 0, + [_TBT, _TBA, _TN], + [0, 0, 0] +]; +var Encryption$ = [ + 3, + n0, + _En, + 0, + [_ET, _KMSKI, _KMSC], + [0, [() => SSEKMSKeyId, 0], 0], + 1 +]; +var EncryptionConfiguration$ = [ + 3, + n0, + _EC, + 0, + [_RKKID], + [0] +]; +var EndEvent$ = [ + 3, + n0, + _EE, + 0, + [], + [] +]; +var _Error$ = [ + 3, + n0, + _Err, + 0, + [_K, _VI, _Cod, _Mes], + [0, 0, 0, 0] +]; +var ErrorDetails$ = [ + 3, + n0, + _ED, + 0, + [_ECr, _EM], + [0, 0] +]; +var ErrorDocument$ = [ + 3, + n0, + _EDr, + 0, + [_K], + [0], + 1 +]; +var EventBridgeConfiguration$ = [ + 3, + n0, + _EBC, + 0, + [], + [] +]; +var ExistingObjectReplication$ = [ + 3, + n0, + _EOR, + 0, + [_S], + [0], + 1 +]; +var FilterRule$ = [ + 3, + n0, + _FR, + 0, + [_N, _V], + [0, 0] +]; +var GetBucketAbacOutput$ = [ + 3, + n0, + _GBAO, + 0, + [_AS], + [[() => AbacStatus$, 16]] +]; +var GetBucketAbacRequest$ = [ + 3, + n0, + _GBAR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketAccelerateConfigurationOutput$ = [ + 3, + n0, + _GBACO, + { [_xN]: _AC }, + [_S, _RC], + [0, [0, { [_hH]: _xarc }]] +]; +var GetBucketAccelerateConfigurationRequest$ = [ + 3, + n0, + _GBACR, + 0, + [_B, _EBO, _RP], + [[0, 1], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 1 +]; +var GetBucketAclOutput$ = [ + 3, + n0, + _GBAOe, + { [_xN]: _ACP }, + [_O, _G], + [() => Owner$, [() => Grants, { [_xN]: _ACL }]] +]; +var GetBucketAclRequest$ = [ + 3, + n0, + _GBARe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketAnalyticsConfigurationOutput$ = [ + 3, + n0, + _GBACOe, + 0, + [_ACn], + [[() => AnalyticsConfiguration$, 16]] +]; +var GetBucketAnalyticsConfigurationRequest$ = [ + 3, + n0, + _GBACRe, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 +]; +var GetBucketCorsOutput$ = [ + 3, + n0, + _GBCO, + { [_xN]: _CORSC }, + [_CORSR], + [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]] +]; +var GetBucketCorsRequest$ = [ + 3, + n0, + _GBCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketEncryptionOutput$ = [ + 3, + n0, + _GBEO, + 0, + [_SSEC], + [[() => ServerSideEncryptionConfiguration$, 16]] +]; +var GetBucketEncryptionRequest$ = [ + 3, + n0, + _GBER, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketIntelligentTieringConfigurationOutput$ = [ + 3, + n0, + _GBITCO, + 0, + [_ITC], + [[() => IntelligentTieringConfiguration$, 16]] +]; +var GetBucketIntelligentTieringConfigurationRequest$ = [ + 3, + n0, + _GBITCR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 +]; +var GetBucketInventoryConfigurationOutput$ = [ + 3, + n0, + _GBICO, + 0, + [_IC], + [[() => InventoryConfiguration$, 16]] +]; +var GetBucketInventoryConfigurationRequest$ = [ + 3, + n0, + _GBICR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 +]; +var GetBucketLifecycleConfigurationOutput$ = [ + 3, + n0, + _GBLCO, + { [_xN]: _LCi }, + [_R, _TDMOS], + [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Ru }], [0, { [_hH]: _xatdmos }]] +]; +var GetBucketLifecycleConfigurationRequest$ = [ + 3, + n0, + _GBLCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketLocationOutput$ = [ + 3, + n0, + _GBLO, + { [_xN]: _LC }, + [_LC], + [0] +]; +var GetBucketLocationRequest$ = [ + 3, + n0, + _GBLR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketLoggingOutput$ = [ + 3, + n0, + _GBLOe, + { [_xN]: _BLS }, + [_LE], + [[() => LoggingEnabled$, 0]] +]; +var GetBucketLoggingRequest$ = [ + 3, + n0, + _GBLRe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketMetadataConfigurationOutput$ = [ + 3, + n0, + _GBMCO, + 0, + [_GBMCR], + [[() => GetBucketMetadataConfigurationResult$, 16]] +]; +var GetBucketMetadataConfigurationRequest$ = [ + 3, + n0, + _GBMCRe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketMetadataConfigurationResult$ = [ + 3, + n0, + _GBMCR, + 0, + [_MCR], + [() => MetadataConfigurationResult$], + 1 +]; +var GetBucketMetadataTableConfigurationOutput$ = [ + 3, + n0, + _GBMTCO, + 0, + [_GBMTCR], + [[() => GetBucketMetadataTableConfigurationResult$, 16]] +]; +var GetBucketMetadataTableConfigurationRequest$ = [ + 3, + n0, + _GBMTCRe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketMetadataTableConfigurationResult$ = [ + 3, + n0, + _GBMTCR, + 0, + [_MTCR, _S, _Err], + [() => MetadataTableConfigurationResult$, 0, () => ErrorDetails$], + 2 +]; +var GetBucketMetricsConfigurationOutput$ = [ + 3, + n0, + _GBMCOe, + 0, + [_MCe], + [[() => MetricsConfiguration$, 16]] +]; +var GetBucketMetricsConfigurationRequest$ = [ + 3, + n0, + _GBMCRet, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 +]; +var GetBucketNotificationConfigurationRequest$ = [ + 3, + n0, + _GBNCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketOwnershipControlsOutput$ = [ + 3, + n0, + _GBOCO, + 0, + [_OC], + [[() => OwnershipControls$, 16]] +]; +var GetBucketOwnershipControlsRequest$ = [ + 3, + n0, + _GBOCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketPolicyOutput$ = [ + 3, + n0, + _GBPO, + 0, + [_Po], + [[0, 16]] +]; +var GetBucketPolicyRequest$ = [ + 3, + n0, + _GBPR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketPolicyStatusOutput$ = [ + 3, + n0, + _GBPSO, + 0, + [_PS], + [[() => PolicyStatus$, 16]] +]; +var GetBucketPolicyStatusRequest$ = [ + 3, + n0, + _GBPSR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketReplicationOutput$ = [ + 3, + n0, + _GBRO, + 0, + [_RCe], + [[() => ReplicationConfiguration$, 16]] +]; +var GetBucketReplicationRequest$ = [ + 3, + n0, + _GBRR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketRequestPaymentOutput$ = [ + 3, + n0, + _GBRPO, + { [_xN]: _RPC }, + [_Pay], + [0] +]; +var GetBucketRequestPaymentRequest$ = [ + 3, + n0, + _GBRPR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketTaggingOutput$ = [ + 3, + n0, + _GBTO, + { [_xN]: _Tag }, + [_TS], + [[() => TagSet, 0]], + 1 +]; +var GetBucketTaggingRequest$ = [ + 3, + n0, + _GBTR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketVersioningOutput$ = [ + 3, + n0, + _GBVO, + { [_xN]: _VC }, + [_S, _MFAD], + [0, [0, { [_xN]: _MDf }]] +]; +var GetBucketVersioningRequest$ = [ + 3, + n0, + _GBVR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetBucketWebsiteOutput$ = [ + 3, + n0, + _GBWO, + { [_xN]: _WC }, + [_RART, _IDn, _EDr, _RR], + [() => RedirectAllRequestsTo$, () => IndexDocument$, () => ErrorDocument$, [() => RoutingRules, 0]] +]; +var GetBucketWebsiteRequest$ = [ + 3, + n0, + _GBWR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetObjectAclOutput$ = [ + 3, + n0, + _GOAO, + { [_xN]: _ACP }, + [_O, _G, _RC], + [() => Owner$, [() => Grants, { [_xN]: _ACL }], [0, { [_hH]: _xarc }]] +]; +var GetObjectAclRequest$ = [ + 3, + n0, + _GOAR, + 0, + [_B, _K, _VI, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 +]; +var GetObjectAttributesOutput$ = [ + 3, + n0, + _GOAOe, + { [_xN]: _GOARe }, + [_DM, _LM, _VI, _RC, _ETa, _C, _OP, _SC, _OS], + [[2, { [_hH]: _xadm }], [4, { [_hH]: _LM_ }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }], 0, () => Checksum$, [() => GetObjectAttributesParts$, 0], 0, 1] +]; +var GetObjectAttributesParts$ = [ + 3, + n0, + _GOAP, + 0, + [_TPC, _PNM, _NPNM, _MP, _IT, _Pa], + [[1, { [_xN]: _PC }], 0, 0, 1, 2, [() => PartsList, { [_xF]: 1, [_xN]: _Par }]] +]; +var GetObjectAttributesRequest$ = [ + 3, + n0, + _GOARet, + 0, + [_B, _K, _OA, _VI, _MP, _PNM, _SSECA, _SSECK, _SSECKMD, _RP, _EBO], + [[0, 1], [0, 1], [64 | 0, { [_hH]: _xaoa }], [0, { [_hQ]: _vI }], [1, { [_hH]: _xamp }], [0, { [_hH]: _xapnm }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 3 +]; +var GetObjectLegalHoldOutput$ = [ + 3, + n0, + _GOLHO, + 0, + [_LH], + [[() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }]] +]; +var GetObjectLegalHoldRequest$ = [ + 3, + n0, + _GOLHR, + 0, + [_B, _K, _VI, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 +]; +var GetObjectLockConfigurationOutput$ = [ + 3, + n0, + _GOLCO, + 0, + [_OLC], + [[() => ObjectLockConfiguration$, 16]] +]; +var GetObjectLockConfigurationRequest$ = [ + 3, + n0, + _GOLCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GetObjectOutput$ = [ + 3, + n0, + _GOO, + 0, + [_Bo, _DM, _AR, _E, _Re, _LM, _CLo, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _MM, _VI, _CC, _CDo, _CEo, _CL, _CR, _CTo, _Ex, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS], + [[() => StreamingBlob, 16], [2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CR_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]] +]; +var GetObjectRequest$ = [ + 3, + n0, + _GOR, + 0, + [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh], + [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm }]], + 2 +]; +var GetObjectRetentionOutput$ = [ + 3, + n0, + _GORO, + 0, + [_Ret], + [[() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }]] +]; +var GetObjectRetentionRequest$ = [ + 3, + n0, + _GORR, + 0, + [_B, _K, _VI, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 +]; +var GetObjectTaggingOutput$ = [ + 3, + n0, + _GOTO, + { [_xN]: _Tag }, + [_TS, _VI], + [[() => TagSet, 0], [0, { [_hH]: _xavi }]], + 1 +]; +var GetObjectTaggingRequest$ = [ + 3, + n0, + _GOTR, + 0, + [_B, _K, _VI, _EBO, _RP], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 2 +]; +var GetObjectTorrentOutput$ = [ + 3, + n0, + _GOTOe, + 0, + [_Bo, _RC], + [[() => StreamingBlob, 16], [0, { [_hH]: _xarc }]] +]; +var GetObjectTorrentRequest$ = [ + 3, + n0, + _GOTRe, + 0, + [_B, _K, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 +]; +var GetPublicAccessBlockOutput$ = [ + 3, + n0, + _GPABO, + 0, + [_PABC], + [[() => PublicAccessBlockConfiguration$, 16]] +]; +var GetPublicAccessBlockRequest$ = [ + 3, + n0, + _GPABR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var GlacierJobParameters$ = [ + 3, + n0, + _GJP, + 0, + [_Ti], + [0], + 1 +]; +var Grant$ = [ + 3, + n0, + _Gr, + 0, + [_Gra, _Pe], + [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0] +]; +var Grantee$ = [ + 3, + n0, + _Gra, + 0, + [_Ty, _DN, _EA, _ID, _URI], + [[0, { [_xA]: 1, [_xN]: _xs }], 0, 0, 0, 0], + 1 +]; +var HeadBucketOutput$ = [ + 3, + n0, + _HBO, + 0, + [_BA, _BLT, _BLN, _BR, _APA], + [[0, { [_hH]: _xaba }], [0, { [_hH]: _xablt }], [0, { [_hH]: _xabln }], [0, { [_hH]: _xabr }], [2, { [_hH]: _xaapa }]] +]; +var HeadBucketRequest$ = [ + 3, + n0, + _HBR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 +]; +var HeadObjectOutput$ = [ + 3, + n0, + _HOO, + 0, + [_DM, _AR, _E, _Re, _ASr, _LM, _CLo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _ETa, _MM, _VI, _CC, _CDo, _CEo, _CL, _CTo, _CR, _Ex, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS], + [[2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [0, { [_hH]: _xaas }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [0, { [_hH]: _ETa }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _CR_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]] +]; +var HeadObjectRequest$ = [ + 3, + n0, + _HOR, + 0, + [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh], + [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm }]], + 2 +]; +var IndexDocument$ = [ + 3, + n0, + _IDn, + 0, + [_Su], + [0], + 1 +]; +var Initiator$ = [ + 3, + n0, + _In, + 0, + [_ID, _DN], + [0, 0] +]; +var InputSerialization$ = [ + 3, + n0, + _IS, + 0, + [_CSV, _CTom, _JSON, _Parq], + [() => CSVInput$, 0, () => JSONInput$, () => ParquetInput$] +]; +var IntelligentTieringAndOperator$ = [ + 3, + n0, + _ITAO, + 0, + [_P, _T], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]] +]; +var IntelligentTieringConfiguration$ = [ + 3, + n0, + _ITC, + 0, + [_I, _S, _Tie, _F], + [0, 0, [() => TieringList, { [_xF]: 1, [_xN]: _Tier }], [() => IntelligentTieringFilter$, 0]], + 3 +]; +var IntelligentTieringFilter$ = [ + 3, + n0, + _ITF, + 0, + [_P, _Ta, _An], + [0, () => Tag$, [() => IntelligentTieringAndOperator$, 0]] +]; +var InventoryConfiguration$ = [ + 3, + n0, + _IC, + 0, + [_Des, _IE, _I, _IOV, _Sc, _F, _OF], + [[() => InventoryDestination$, 0], 2, 0, 0, () => InventorySchedule$, () => InventoryFilter$, [() => InventoryOptionalFields, 0]], + 5 +]; +var InventoryDestination$ = [ + 3, + n0, + _IDnv, + 0, + [_SBD], + [[() => InventoryS3BucketDestination$, 0]], + 1 +]; +var InventoryEncryption$ = [ + 3, + n0, + _IEn, + 0, + [_SSES, _SSEKMS], + [[() => SSES3$, { [_xN]: _SS }], [() => SSEKMS$, { [_xN]: _SK }]] +]; +var InventoryFilter$ = [ + 3, + n0, + _IF, + 0, + [_P], + [0], + 1 +]; +var InventoryS3BucketDestination$ = [ + 3, + n0, + _ISBD, + 0, + [_B, _Fo, _AI, _P, _En], + [0, 0, 0, 0, [() => InventoryEncryption$, 0]], + 2 +]; +var InventorySchedule$ = [ + 3, + n0, + _ISn, + 0, + [_Fr], + [0], + 1 +]; +var InventoryTableConfiguration$ = [ + 3, + n0, + _ITCn, + 0, + [_CSo, _EC], + [0, () => MetadataTableEncryptionConfiguration$], + 1 +]; +var InventoryTableConfigurationResult$ = [ + 3, + n0, + _ITCR, + 0, + [_CSo, _TSa, _Err, _TNa, _TA], + [0, 0, () => ErrorDetails$, 0, 0], + 1 +]; +var InventoryTableConfigurationUpdates$ = [ + 3, + n0, + _ITCU, + 0, + [_CSo, _EC], + [0, () => MetadataTableEncryptionConfiguration$], + 1 +]; +var JournalTableConfiguration$ = [ + 3, + n0, + _JTC, + 0, + [_REe, _EC], + [() => RecordExpiration$, () => MetadataTableEncryptionConfiguration$], + 1 +]; +var JournalTableConfigurationResult$ = [ + 3, + n0, + _JTCR, + 0, + [_TSa, _TNa, _REe, _Err, _TA], + [0, 0, () => RecordExpiration$, () => ErrorDetails$, 0], + 3 +]; +var JournalTableConfigurationUpdates$ = [ + 3, + n0, + _JTCU, + 0, + [_REe], + [() => RecordExpiration$], + 1 +]; +var JSONInput$ = [ + 3, + n0, + _JSONI, + 0, + [_Ty], + [0] +]; +var JSONOutput$ = [ + 3, + n0, + _JSONO, + 0, + [_RD], + [0] +]; +var LambdaFunctionConfiguration$ = [ + 3, + n0, + _LFC, + 0, + [_LFA, _Ev, _I, _F], + [[0, { [_xN]: _CF }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], + 2 +]; +var LifecycleExpiration$ = [ + 3, + n0, + _LEi, + 0, + [_Da, _D, _EODM], + [5, 1, 2] +]; +var LifecycleRule$ = [ + 3, + n0, + _LR, + 0, + [_S, _E, _ID, _P, _F, _Tr, _NVT, _NVE, _AIMU], + [0, () => LifecycleExpiration$, 0, 0, [() => LifecycleRuleFilter$, 0], [() => TransitionList, { [_xF]: 1, [_xN]: _Tra }], [() => NoncurrentVersionTransitionList, { [_xF]: 1, [_xN]: _NVTo }], () => NoncurrentVersionExpiration$, () => AbortIncompleteMultipartUpload$], + 1 +]; +var LifecycleRuleAndOperator$ = [ + 3, + n0, + _LRAO, + 0, + [_P, _T, _OSGT, _OSLT], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 1, 1] +]; +var LifecycleRuleFilter$ = [ + 3, + n0, + _LRF, + 0, + [_P, _Ta, _OSGT, _OSLT, _An], + [0, () => Tag$, 1, 1, [() => LifecycleRuleAndOperator$, 0]] +]; +var ListBucketAnalyticsConfigurationsOutput$ = [ + 3, + n0, + _LBACO, + { [_xN]: _LBACR }, + [_IT, _CTon, _NCT, _ACLn], + [2, 0, 0, [() => AnalyticsConfigurationList, { [_xF]: 1, [_xN]: _ACn }]] +]; +var ListBucketAnalyticsConfigurationsRequest$ = [ + 3, + n0, + _LBACRi, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 +]; +var ListBucketIntelligentTieringConfigurationsOutput$ = [ + 3, + n0, + _LBITCO, + 0, + [_IT, _CTon, _NCT, _ITCL], + [2, 0, 0, [() => IntelligentTieringConfigurationList, { [_xF]: 1, [_xN]: _ITC }]] +]; +var ListBucketIntelligentTieringConfigurationsRequest$ = [ + 3, + n0, + _LBITCR, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 +]; +var ListBucketInventoryConfigurationsOutput$ = [ + 3, + n0, + _LBICO, + { [_xN]: _LICR }, + [_CTon, _ICL, _IT, _NCT], + [0, [() => InventoryConfigurationList, { [_xF]: 1, [_xN]: _IC }], 2, 0] +]; +var ListBucketInventoryConfigurationsRequest$ = [ + 3, + n0, + _LBICR, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 +]; +var ListBucketMetricsConfigurationsOutput$ = [ + 3, + n0, + _LBMCO, + { [_xN]: _LMCR }, + [_IT, _CTon, _NCT, _MCL], + [2, 0, 0, [() => MetricsConfigurationList, { [_xF]: 1, [_xN]: _MCe }]] +]; +var ListBucketMetricsConfigurationsRequest$ = [ + 3, + n0, + _LBMCR, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 +]; +var ListBucketsOutput$ = [ + 3, + n0, + _LBO, + { [_xN]: _LAMBR }, + [_Bu, _O, _CTon, _P], + [[() => Buckets, 0], () => Owner$, 0, 0] +]; +var ListBucketsRequest$ = [ + 3, + n0, + _LBR, + 0, + [_MB, _CTon, _P, _BR], + [[1, { [_hQ]: _mb }], [0, { [_hQ]: _ct }], [0, { [_hQ]: _p }], [0, { [_hQ]: _br }]] +]; +var ListDirectoryBucketsOutput$ = [ + 3, + n0, + _LDBO, + { [_xN]: _LAMDBR }, + [_Bu, _CTon], + [[() => Buckets, 0], 0] +]; +var ListDirectoryBucketsRequest$ = [ + 3, + n0, + _LDBR, + 0, + [_CTon, _MDB], + [[0, { [_hQ]: _ct }], [1, { [_hQ]: _mdb }]] +]; +var ListMultipartUploadsOutput$ = [ + 3, + n0, + _LMUO, + { [_xN]: _LMUR }, + [_B, _KM, _UIM, _NKM, _P, _Deli, _NUIM, _MUa, _IT, _U, _CPom, _ETn, _RC], + [0, 0, 0, 0, 0, 0, 0, 1, 2, [() => MultipartUploadList, { [_xF]: 1, [_xN]: _Up }], [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]] +]; +var ListMultipartUploadsRequest$ = [ + 3, + n0, + _LMURi, + 0, + [_B, _Deli, _ETn, _KM, _MUa, _P, _UIM, _EBO, _RP], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mu }], [0, { [_hQ]: _p }], [0, { [_hQ]: _uim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 1 +]; +var ListObjectsOutput$ = [ + 3, + n0, + _LOO, + { [_xN]: _LBRi }, + [_IT, _Ma, _NM, _Con, _N, _P, _Deli, _MK, _CPom, _ETn, _RC], + [2, 0, 0, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]] +]; +var ListObjectsRequest$ = [ + 3, + n0, + _LOR, + 0, + [_B, _Deli, _ETn, _Ma, _MK, _P, _RP, _EBO, _OOA], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _m }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], + 1 +]; +var ListObjectsV2Output$ = [ + 3, + n0, + _LOVO, + { [_xN]: _LBRi }, + [_IT, _Con, _N, _P, _Deli, _MK, _CPom, _ETn, _KC, _CTon, _NCT, _SA, _RC], + [2, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, 1, 0, 0, 0, [0, { [_hH]: _xarc }]] +]; +var ListObjectsV2Request$ = [ + 3, + n0, + _LOVR, + 0, + [_B, _Deli, _ETn, _MK, _P, _CTon, _FO, _SA, _RP, _EBO, _OOA], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _ct }], [2, { [_hQ]: _fo }], [0, { [_hQ]: _sa }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], + 1 +]; +var ListObjectVersionsOutput$ = [ + 3, + n0, + _LOVOi, + { [_xN]: _LVR }, + [_IT, _KM, _VIM, _NKM, _NVIM, _Ve, _DMe, _N, _P, _Deli, _MK, _CPom, _ETn, _RC], + [2, 0, 0, 0, 0, [() => ObjectVersionList, { [_xF]: 1, [_xN]: _Ver }], [() => DeleteMarkers, { [_xF]: 1, [_xN]: _DM }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]] +]; +var ListObjectVersionsRequest$ = [ + 3, + n0, + _LOVRi, + 0, + [_B, _Deli, _ETn, _KM, _MK, _P, _VIM, _EBO, _RP, _OOA], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _vim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }], [64 | 0, { [_hH]: _xaooa }]], + 1 +]; +var ListPartsOutput$ = [ + 3, + n0, + _LPO, + { [_xN]: _LPR }, + [_ADb, _ARI, _B, _K, _UI, _PNM, _NPNM, _MP, _IT, _Pa, _In, _O, _SC, _RC, _CA, _CT], + [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], 0, 0, 0, 0, 0, 1, 2, [() => Parts, { [_xF]: 1, [_xN]: _Par }], () => Initiator$, () => Owner$, 0, [0, { [_hH]: _xarc }], 0, 0] +]; +var ListPartsRequest$ = [ + 3, + n0, + _LPRi, + 0, + [_B, _K, _UI, _MP, _PNM, _RP, _EBO, _SSECA, _SSECK, _SSECKMD], + [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [1, { [_hQ]: _mp }], [0, { [_hQ]: _pnm }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], + 3 +]; +var LocationInfo$ = [ + 3, + n0, + _LI, + 0, + [_Ty, _N], + [0, 0] +]; +var LoggingEnabled$ = [ + 3, + n0, + _LE, + 0, + [_TB, _TP, _TG, _TOKF], + [0, 0, [() => TargetGrants, 0], [() => TargetObjectKeyFormat$, 0]], + 2 +]; +var MetadataConfiguration$ = [ + 3, + n0, + _MC, + 0, + [_JTC, _ITCn], + [() => JournalTableConfiguration$, () => InventoryTableConfiguration$], + 1 +]; +var MetadataConfigurationResult$ = [ + 3, + n0, + _MCR, + 0, + [_DRes, _JTCR, _ITCR], + [() => DestinationResult$, () => JournalTableConfigurationResult$, () => InventoryTableConfigurationResult$], + 1 +]; +var MetadataEntry$ = [ + 3, + n0, + _ME, + 0, + [_N, _V], + [0, 0] +]; +var MetadataTableConfiguration$ = [ + 3, + n0, + _MTC, + 0, + [_STD], + [() => S3TablesDestination$], + 1 +]; +var MetadataTableConfigurationResult$ = [ + 3, + n0, + _MTCR, + 0, + [_STDR], + [() => S3TablesDestinationResult$], + 1 +]; +var MetadataTableEncryptionConfiguration$ = [ + 3, + n0, + _MTEC, + 0, + [_SAs, _KKA], + [0, 0], + 1 +]; +var Metrics$ = [ + 3, + n0, + _Me, + 0, + [_S, _ETv], + [0, () => ReplicationTimeValue$], + 1 +]; +var MetricsAndOperator$ = [ + 3, + n0, + _MAO, + 0, + [_P, _T, _APAc], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 0] +]; +var MetricsConfiguration$ = [ + 3, + n0, + _MCe, + 0, + [_I, _F], + [0, [() => MetricsFilter$, 0]], + 1 +]; +var MultipartUpload$ = [ + 3, + n0, + _MU, + 0, + [_UI, _K, _Ini, _SC, _O, _In, _CA, _CT], + [0, 0, 4, 0, () => Owner$, () => Initiator$, 0, 0] +]; +var NoncurrentVersionExpiration$ = [ + 3, + n0, + _NVE, + 0, + [_ND, _NNV], + [1, 1] +]; +var NoncurrentVersionTransition$ = [ + 3, + n0, + _NVTo, + 0, + [_ND, _SC, _NNV], + [1, 0, 1] +]; +var NotificationConfiguration$ = [ + 3, + n0, + _NC, + 0, + [_TCo, _QCu, _LFCa, _EBC], + [[() => TopicConfigurationList, { [_xF]: 1, [_xN]: _TCop }], [() => QueueConfigurationList, { [_xF]: 1, [_xN]: _QCue }], [() => LambdaFunctionConfigurationList, { [_xF]: 1, [_xN]: _CFC }], () => EventBridgeConfiguration$] +]; +var NotificationConfigurationFilter$ = [ + 3, + n0, + _NCF, + 0, + [_K], + [[() => S3KeyFilter$, { [_xN]: _SKe }]] +]; +var _Object$ = [ + 3, + n0, + _Obj, + 0, + [_K, _LM, _ETa, _CA, _CT, _Si, _SC, _O, _RSe], + [0, 4, 0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, () => Owner$, () => RestoreStatus$] +]; +var ObjectIdentifier$ = [ + 3, + n0, + _OI, + 0, + [_K, _VI, _ETa, _LMT, _Si], + [0, 0, 0, 6, 1], + 1 +]; +var ObjectLockConfiguration$ = [ + 3, + n0, + _OLC, + 0, + [_OLE, _Ru], + [0, () => ObjectLockRule$] +]; +var ObjectLockLegalHold$ = [ + 3, + n0, + _OLLH, + 0, + [_S], + [0] +]; +var ObjectLockRetention$ = [ + 3, + n0, + _OLR, + 0, + [_Mo, _RUD], + [0, 5] +]; +var ObjectLockRule$ = [ + 3, + n0, + _OLRb, + 0, + [_DRe], + [() => DefaultRetention$] +]; +var ObjectPart$ = [ + 3, + n0, + _OPb, + 0, + [_PN, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh], + [1, 1, 0, 0, 0, 0, 0] +]; +var ObjectVersion$ = [ + 3, + n0, + _OV, + 0, + [_ETa, _CA, _CT, _Si, _SC, _K, _VI, _IL, _LM, _O, _RSe], + [0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, 0, 0, 2, 4, () => Owner$, () => RestoreStatus$] +]; +var OutputLocation$ = [ + 3, + n0, + _OL, + 0, + [_S_], + [[() => S3Location$, 0]] +]; +var OutputSerialization$ = [ + 3, + n0, + _OSu, + 0, + [_CSV, _JSON], + [() => CSVOutput$, () => JSONOutput$] +]; +var Owner$ = [ + 3, + n0, + _O, + 0, + [_DN, _ID], + [0, 0] +]; +var OwnershipControls$ = [ + 3, + n0, + _OC, + 0, + [_R], + [[() => OwnershipControlsRules, { [_xF]: 1, [_xN]: _Ru }]], + 1 +]; +var OwnershipControlsRule$ = [ + 3, + n0, + _OCR, + 0, + [_OO], + [0], + 1 +]; +var ParquetInput$ = [ + 3, + n0, + _PI, + 0, + [], + [] +]; +var Part$ = [ + 3, + n0, + _Par, + 0, + [_PN, _LM, _ETa, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh], + [1, 4, 0, 1, 0, 0, 0, 0, 0] +]; +var PartitionedPrefix$ = [ + 3, + n0, + _PP, + { [_xN]: _PP }, + [_PDS], + [0] +]; +var PolicyStatus$ = [ + 3, + n0, + _PS, + 0, + [_IP], + [[2, { [_xN]: _IP }]] +]; +var Progress$ = [ + 3, + n0, + _Pr, + 0, + [_BS, _BP, _BRy], + [1, 1, 1] +]; +var ProgressEvent$ = [ + 3, + n0, + _PE, + 0, + [_Det], + [[() => Progress$, { [_eP]: 1 }]] +]; +var PublicAccessBlockConfiguration$ = [ + 3, + n0, + _PABC, + 0, + [_BPA, _IPA, _BPP, _RPB], + [[2, { [_xN]: _BPA }], [2, { [_xN]: _IPA }], [2, { [_xN]: _BPP }], [2, { [_xN]: _RPB }]] +]; +var PutBucketAbacRequest$ = [ + 3, + n0, + _PBAR, + 0, + [_B, _AS, _CMD, _CA, _EBO], + [[0, 1], [() => AbacStatus$, { [_hP]: 1, [_xN]: _AS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 +]; +var PutBucketAccelerateConfigurationRequest$ = [ + 3, + n0, + _PBACR, + 0, + [_B, _AC, _EBO, _CA], + [[0, 1], [() => AccelerateConfiguration$, { [_hP]: 1, [_xN]: _AC }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], + 2 +]; +var PutBucketAclRequest$ = [ + 3, + n0, + _PBARu, + 0, + [_B, _ACL_, _ACP, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _EBO], + [[0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xaebo }]], + 1 +]; +var PutBucketAnalyticsConfigurationRequest$ = [ + 3, + n0, + _PBACRu, + 0, + [_B, _I, _ACn, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => AnalyticsConfiguration$, { [_hP]: 1, [_xN]: _ACn }], [0, { [_hH]: _xaebo }]], + 3 +]; +var PutBucketCorsRequest$ = [ + 3, + n0, + _PBCR, + 0, + [_B, _CORSC, _CMD, _CA, _EBO], + [[0, 1], [() => CORSConfiguration$, { [_hP]: 1, [_xN]: _CORSC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 +]; +var PutBucketEncryptionRequest$ = [ + 3, + n0, + _PBER, + 0, + [_B, _SSEC, _CMD, _CA, _EBO], + [[0, 1], [() => ServerSideEncryptionConfiguration$, { [_hP]: 1, [_xN]: _SSEC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 +]; +var PutBucketIntelligentTieringConfigurationRequest$ = [ + 3, + n0, + _PBITCR, + 0, + [_B, _I, _ITC, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => IntelligentTieringConfiguration$, { [_hP]: 1, [_xN]: _ITC }], [0, { [_hH]: _xaebo }]], + 3 +]; +var PutBucketInventoryConfigurationRequest$ = [ + 3, + n0, + _PBICR, + 0, + [_B, _I, _IC, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => InventoryConfiguration$, { [_hP]: 1, [_xN]: _IC }], [0, { [_hH]: _xaebo }]], + 3 +]; +var PutBucketLifecycleConfigurationOutput$ = [ + 3, + n0, + _PBLCO, + 0, + [_TDMOS], + [[0, { [_hH]: _xatdmos }]] +]; +var PutBucketLifecycleConfigurationRequest$ = [ + 3, + n0, + _PBLCR, + 0, + [_B, _CA, _LCi, _EBO, _TDMOS], + [[0, 1], [0, { [_hH]: _xasca }], [() => BucketLifecycleConfiguration$, { [_hP]: 1, [_xN]: _LCi }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xatdmos }]], + 1 +]; +var PutBucketLoggingRequest$ = [ + 3, + n0, + _PBLR, + 0, + [_B, _BLS, _CMD, _CA, _EBO], + [[0, 1], [() => BucketLoggingStatus$, { [_hP]: 1, [_xN]: _BLS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 +]; +var PutBucketMetricsConfigurationRequest$ = [ + 3, + n0, + _PBMCR, + 0, + [_B, _I, _MCe, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => MetricsConfiguration$, { [_hP]: 1, [_xN]: _MCe }], [0, { [_hH]: _xaebo }]], + 3 +]; +var PutBucketNotificationConfigurationRequest$ = [ + 3, + n0, + _PBNCR, + 0, + [_B, _NC, _EBO, _SDV], + [[0, 1], [() => NotificationConfiguration$, { [_hP]: 1, [_xN]: _NC }], [0, { [_hH]: _xaebo }], [2, { [_hH]: _xasdv }]], + 2 +]; +var PutBucketOwnershipControlsRequest$ = [ + 3, + n0, + _PBOCR, + 0, + [_B, _OC, _CMD, _EBO, _CA], + [[0, 1], [() => OwnershipControls$, { [_hP]: 1, [_xN]: _OC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], + 2 +]; +var PutBucketPolicyRequest$ = [ + 3, + n0, + _PBPR, + 0, + [_B, _Po, _CMD, _CA, _CRSBA, _EBO], + [[0, 1], [0, 16], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [2, { [_hH]: _xacrsba }], [0, { [_hH]: _xaebo }]], + 2 +]; +var PutBucketReplicationRequest$ = [ + 3, + n0, + _PBRR, + 0, + [_B, _RCe, _CMD, _CA, _To, _EBO], + [[0, 1], [() => ReplicationConfiguration$, { [_hP]: 1, [_xN]: _RCe }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _xaebo }]], + 2 +]; +var PutBucketRequestPaymentRequest$ = [ + 3, + n0, + _PBRPR, + 0, + [_B, _RPC, _CMD, _CA, _EBO], + [[0, 1], [() => RequestPaymentConfiguration$, { [_hP]: 1, [_xN]: _RPC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 +]; +var PutBucketTaggingRequest$ = [ + 3, + n0, + _PBTR, + 0, + [_B, _Tag, _CMD, _CA, _EBO], + [[0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 +]; +var PutBucketVersioningRequest$ = [ + 3, + n0, + _PBVR, + 0, + [_B, _VC, _CMD, _CA, _MFA, _EBO], + [[0, 1], [() => VersioningConfiguration$, { [_hP]: 1, [_xN]: _VC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xaebo }]], + 2 +]; +var PutBucketWebsiteRequest$ = [ + 3, + n0, + _PBWR, + 0, + [_B, _WC, _CMD, _CA, _EBO], + [[0, 1], [() => WebsiteConfiguration$, { [_hP]: 1, [_xN]: _WC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 +]; +var PutObjectAclOutput$ = [ + 3, + n0, + _POAO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] +]; +var PutObjectAclRequest$ = [ + 3, + n0, + _POAR, + 0, + [_B, _K, _ACL_, _ACP, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _RP, _VI, _EBO], + [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], + 2 +]; +var PutObjectLegalHoldOutput$ = [ + 3, + n0, + _POLHO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] +]; +var PutObjectLegalHoldRequest$ = [ + 3, + n0, + _POLHR, + 0, + [_B, _K, _LH, _RP, _VI, _CMD, _CA, _EBO], + [[0, 1], [0, 1], [() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 +]; +var PutObjectLockConfigurationOutput$ = [ + 3, + n0, + _POLCO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] +]; +var PutObjectLockConfigurationRequest$ = [ + 3, + n0, + _POLCR, + 0, + [_B, _OLC, _RP, _To, _CMD, _CA, _EBO], + [[0, 1], [() => ObjectLockConfiguration$, { [_hP]: 1, [_xN]: _OLC }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 1 +]; +var PutObjectOutput$ = [ + 3, + n0, + _POO, + 0, + [_E, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _SSE, _VI, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _Si, _RC], + [[0, { [_hH]: _xae }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [1, { [_hH]: _xaos }], [0, { [_hH]: _xarc }]] +]; +var PutObjectRequest$ = [ + 3, + n0, + _POR, + 0, + [_B, _K, _ACL_, _Bo, _CC, _CDo, _CEo, _CL, _CLo, _CMD, _CTo, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _Ex, _IM, _INM, _GFC, _GR, _GRACP, _GWACP, _WOB, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO], + [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => StreamingBlob, 16], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [1, { [_hH]: _xawob }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }]], + 2 +]; +var PutObjectRetentionOutput$ = [ + 3, + n0, + _PORO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] +]; +var PutObjectRetentionRequest$ = [ + 3, + n0, + _PORR, + 0, + [_B, _K, _Ret, _RP, _VI, _BGR, _CMD, _CA, _EBO], + [[0, 1], [0, 1], [() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 +]; +var PutObjectTaggingOutput$ = [ + 3, + n0, + _POTO, + 0, + [_VI], + [[0, { [_hH]: _xavi }]] +]; +var PutObjectTaggingRequest$ = [ + 3, + n0, + _POTR, + 0, + [_B, _K, _Tag, _VI, _CMD, _CA, _EBO, _RP], + [[0, 1], [0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 3 +]; +var PutPublicAccessBlockRequest$ = [ + 3, + n0, + _PPABR, + 0, + [_B, _PABC, _CMD, _CA, _EBO], + [[0, 1], [() => PublicAccessBlockConfiguration$, { [_hP]: 1, [_xN]: _PABC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 +]; +var QueueConfiguration$ = [ + 3, + n0, + _QCue, + 0, + [_QA, _Ev, _I, _F], + [[0, { [_xN]: _Qu }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], + 2 +]; +var RecordExpiration$ = [ + 3, + n0, + _REe, + 0, + [_E, _D], + [0, 1], + 1 +]; +var RecordsEvent$ = [ + 3, + n0, + _REec, + 0, + [_Payl], + [[21, { [_eP]: 1 }]] +]; +var Redirect$ = [ + 3, + n0, + _Red, + 0, + [_HN, _HRC, _Pro, _RKPW, _RKW], + [0, 0, 0, 0, 0] +]; +var RedirectAllRequestsTo$ = [ + 3, + n0, + _RART, + 0, + [_HN, _Pro], + [0, 0], + 1 +]; +var RenameObjectOutput$ = [ + 3, + n0, + _ROO, + 0, + [], + [] +]; +var RenameObjectRequest$ = [ + 3, + n0, + _ROR, + 0, + [_B, _K, _RSen, _DIM, _DINM, _DIMS, _DIUS, _SIM, _SINM, _SIMS, _SIUS, _CTl], + [[0, 1], [0, 1], [0, { [_hH]: _xars_ }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IMS_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _xarsim }], [0, { [_hH]: _xarsinm }], [6, { [_hH]: _xarsims }], [6, { [_hH]: _xarsius }], [0, { [_hH]: _xact_, [_iT]: 1 }]], + 3 +]; +var ReplicaModifications$ = [ + 3, + n0, + _RM, + 0, + [_S], + [0], + 1 +]; +var ReplicationConfiguration$ = [ + 3, + n0, + _RCe, + 0, + [_Ro, _R], + [0, [() => ReplicationRules, { [_xF]: 1, [_xN]: _Ru }]], + 2 +]; +var ReplicationRule$ = [ + 3, + n0, + _RRe, + 0, + [_S, _Des, _ID, _Pri, _P, _F, _SSC, _EOR, _DMR], + [0, () => Destination$, 0, 1, 0, [() => ReplicationRuleFilter$, 0], () => SourceSelectionCriteria$, () => ExistingObjectReplication$, () => DeleteMarkerReplication$], + 2 +]; +var ReplicationRuleAndOperator$ = [ + 3, + n0, + _RRAO, + 0, + [_P, _T], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]] +]; +var ReplicationRuleFilter$ = [ + 3, + n0, + _RRF, + 0, + [_P, _Ta, _An], + [0, () => Tag$, [() => ReplicationRuleAndOperator$, 0]] +]; +var ReplicationTime$ = [ + 3, + n0, + _RT, + 0, + [_S, _Tim], + [0, () => ReplicationTimeValue$], + 2 +]; +var ReplicationTimeValue$ = [ + 3, + n0, + _RTV, + 0, + [_Mi], + [1] +]; +var RequestPaymentConfiguration$ = [ + 3, + n0, + _RPC, + 0, + [_Pay], + [0], + 1 +]; +var RequestProgress$ = [ + 3, + n0, + _RPe, + 0, + [_Ena], + [2] +]; +var RestoreObjectOutput$ = [ + 3, + n0, + _ROOe, + 0, + [_RC, _ROP], + [[0, { [_hH]: _xarc }], [0, { [_hH]: _xarop }]] +]; +var RestoreObjectRequest$ = [ + 3, + n0, + _RORe, + 0, + [_B, _K, _VI, _RRes, _RP, _CA, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [() => RestoreRequest$, { [_hP]: 1, [_xN]: _RRes }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 +]; +var RestoreRequest$ = [ + 3, + n0, + _RRes, + 0, + [_D, _GJP, _Ty, _Ti, _Desc, _SP, _OL], + [1, () => GlacierJobParameters$, 0, 0, 0, () => SelectParameters$, [() => OutputLocation$, 0]] +]; +var RestoreStatus$ = [ + 3, + n0, + _RSe, + 0, + [_IRIP, _RED], + [2, 4] +]; +var RoutingRule$ = [ + 3, + n0, + _RRo, + 0, + [_Red, _Co], + [() => Redirect$, () => Condition$], + 1 +]; +var S3KeyFilter$ = [ + 3, + n0, + _SKF, + 0, + [_FRi], + [[() => FilterRuleList, { [_xF]: 1, [_xN]: _FR }]] +]; +var S3Location$ = [ + 3, + n0, + _SL, + 0, + [_BNu, _P, _En, _CACL, _ACL, _Tag, _UM, _SC], + [0, 0, [() => Encryption$, 0], 0, [() => Grants, 0], [() => Tagging$, 0], [() => UserMetadata, 0], 0], + 2 +]; +var S3TablesDestination$ = [ + 3, + n0, + _STD, + 0, + [_TBA, _TNa], + [0, 0], + 2 +]; +var S3TablesDestinationResult$ = [ + 3, + n0, + _STDR, + 0, + [_TBA, _TNa, _TA, _TN], + [0, 0, 0, 0], + 4 +]; +var ScanRange$ = [ + 3, + n0, + _SR, + 0, + [_St, _End], + [1, 1] +]; +var SelectObjectContentOutput$ = [ + 3, + n0, + _SOCO, + 0, + [_Payl], + [[() => SelectObjectContentEventStream$, 16]] +]; +var SelectObjectContentRequest$ = [ + 3, + n0, + _SOCR, + 0, + [_B, _K, _Exp, _ETx, _IS, _OSu, _SSECA, _SSECK, _SSECKMD, _RPe, _SR, _EBO], + [[0, 1], [0, 1], 0, 0, () => InputSerialization$, () => OutputSerialization$, [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], () => RequestProgress$, () => ScanRange$, [0, { [_hH]: _xaebo }]], + 6 +]; +var SelectParameters$ = [ + 3, + n0, + _SP, + 0, + [_IS, _ETx, _Exp, _OSu], + [() => InputSerialization$, 0, 0, () => OutputSerialization$], + 4 +]; +var ServerSideEncryptionByDefault$ = [ + 3, + n0, + _SSEBD, + 0, + [_SSEA, _KMSMKID], + [0, [() => SSEKMSKeyId, 0]], + 1 +]; +var ServerSideEncryptionConfiguration$ = [ + 3, + n0, + _SSEC, + 0, + [_R], + [[() => ServerSideEncryptionRules, { [_xF]: 1, [_xN]: _Ru }]], + 1 +]; +var ServerSideEncryptionRule$ = [ + 3, + n0, + _SSER, + 0, + [_ASSEBD, _BKE, _BET], + [[() => ServerSideEncryptionByDefault$, 0], 2, [() => BlockedEncryptionTypes$, 0]] +]; +var SessionCredentials$ = [ + 3, + n0, + _SCe, + 0, + [_AKI, _SAK, _ST, _E], + [[0, { [_xN]: _AKI }], [() => SessionCredentialValue, { [_xN]: _SAK }], [() => SessionCredentialValue, { [_xN]: _ST }], [4, { [_xN]: _E }]], + 4 +]; +var SimplePrefix$ = [ + 3, + n0, + _SPi, + { [_xN]: _SPi }, + [], + [] +]; +var SourceSelectionCriteria$ = [ + 3, + n0, + _SSC, + 0, + [_SKEO, _RM], + [() => SseKmsEncryptedObjects$, () => ReplicaModifications$] +]; +var SSEKMS$ = [ + 3, + n0, + _SSEKMS, + { [_xN]: _SK }, + [_KI], + [[() => SSEKMSKeyId, 0]], + 1 +]; +var SseKmsEncryptedObjects$ = [ + 3, + n0, + _SKEO, + 0, + [_S], + [0], + 1 +]; +var SSEKMSEncryption$ = [ + 3, + n0, + _SSEKMSE, + { [_xN]: _SK }, + [_KMSKA, _BKE], + [[() => NonEmptyKmsKeyArnString, 0], 2], + 1 +]; +var SSES3$ = [ + 3, + n0, + _SSES, + { [_xN]: _SS }, + [], + [] +]; +var Stats$ = [ + 3, + n0, + _Sta, + 0, + [_BS, _BP, _BRy], + [1, 1, 1] +]; +var StatsEvent$ = [ + 3, + n0, + _SE, + 0, + [_Det], + [[() => Stats$, { [_eP]: 1 }]] +]; +var StorageClassAnalysis$ = [ + 3, + n0, + _SCA, + 0, + [_DE], + [() => StorageClassAnalysisDataExport$] +]; +var StorageClassAnalysisDataExport$ = [ + 3, + n0, + _SCADE, + 0, + [_OSV, _Des], + [0, () => AnalyticsExportDestination$], + 2 +]; +var Tag$ = [ + 3, + n0, + _Ta, + 0, + [_K, _V], + [0, 0], + 2 +]; +var Tagging$ = [ + 3, + n0, + _Tag, + 0, + [_TS], + [[() => TagSet, 0]], + 1 +]; +var TargetGrant$ = [ + 3, + n0, + _TGa, + 0, + [_Gra, _Pe], + [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0] +]; +var TargetObjectKeyFormat$ = [ + 3, + n0, + _TOKF, + 0, + [_SPi, _PP], + [[() => SimplePrefix$, { [_xN]: _SPi }], [() => PartitionedPrefix$, { [_xN]: _PP }]] +]; +var Tiering$ = [ + 3, + n0, + _Tier, + 0, + [_D, _AT], + [1, 0], + 2 +]; +var TopicConfiguration$ = [ + 3, + n0, + _TCop, + 0, + [_TAo, _Ev, _I, _F], + [[0, { [_xN]: _Top }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], + 2 +]; +var Transition$ = [ + 3, + n0, + _Tra, + 0, + [_Da, _D, _SC], + [5, 1, 0] +]; +var UpdateBucketMetadataInventoryTableConfigurationRequest$ = [ + 3, + n0, + _UBMITCR, + 0, + [_B, _ITCn, _CMD, _CA, _EBO], + [[0, 1], [() => InventoryTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _ITCn }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 +]; +var UpdateBucketMetadataJournalTableConfigurationRequest$ = [ + 3, + n0, + _UBMJTCR, + 0, + [_B, _JTC, _CMD, _CA, _EBO], + [[0, 1], [() => JournalTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _JTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 +]; +var UpdateObjectEncryptionRequest$ = [ + 3, + n0, + _UOER, + 0, + [_B, _K, _OE, _VI, _RP, _EBO, _CMD, _CA], + [[0, 1], [0, 1], [() => ObjectEncryption$, 16], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }]], + 3 +]; +var UpdateObjectEncryptionResponse$ = [ + 3, + n0, + _UOERp, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] +]; +var UploadPartCopyOutput$ = [ + 3, + n0, + _UPCO, + 0, + [_CSVI, _CPR, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC], + [[0, { [_hH]: _xacsvi }], [() => CopyPartResult$, 16], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] +]; +var UploadPartCopyRequest$ = [ + 3, + n0, + _UPCR, + 0, + [_B, _CS, _K, _PN, _UI, _CSIM, _CSIMS, _CSINM, _CSIUS, _CSRo, _SSECA, _SSECK, _SSECKMD, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _EBO, _ESBO], + [[0, 1], [0, { [_hH]: _xacs__ }], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [0, { [_hH]: _xacsr }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], + 5 +]; +var UploadPartOutput$ = [ + 3, + n0, + _UPO, + 0, + [_SSE, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC], + [[0, { [_hH]: _xasse }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] +]; +var UploadPartRequest$ = [ + 3, + n0, + _UPR, + 0, + [_B, _K, _PN, _UI, _Bo, _CLo, _CMD, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _SSECA, _SSECK, _SSECKMD, _RP, _EBO], + [[0, 1], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [() => StreamingBlob, 16], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 4 +]; +var VersioningConfiguration$ = [ + 3, + n0, + _VC, + 0, + [_MFAD, _S], + [[0, { [_xN]: _MDf }], 0] +]; +var WebsiteConfiguration$ = [ + 3, + n0, + _WC, + 0, + [_EDr, _IDn, _RART, _RR], + [() => ErrorDocument$, () => IndexDocument$, () => RedirectAllRequestsTo$, [() => RoutingRules, 0]] +]; +var WriteGetObjectResponseRequest$ = [ + 3, + n0, + _WGORR, + 0, + [_RReq, _RTe, _Bo, _SCt, _ECr, _EM, _AR, _CC, _CDo, _CEo, _CL, _CLo, _CR, _CTo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _DM, _ETa, _Ex, _E, _LM, _MM, _M, _OLM, _OLLHS, _OLRUD, _PC, _RS, _RC, _Re, _SSE, _SSECA, _SSEKMSKI, _SSECKMD, _SC, _TC, _VI, _BKE], + [[0, { [_hL]: 1, [_hH]: _xarr }], [0, { [_hH]: _xart }], [() => StreamingBlob, 16], [1, { [_hH]: _xafs }], [0, { [_hH]: _xafec }], [0, { [_hH]: _xafem }], [0, { [_hH]: _xafhar }], [0, { [_hH]: _xafhCC }], [0, { [_hH]: _xafhCD }], [0, { [_hH]: _xafhCE }], [0, { [_hH]: _xafhCL }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xafhCR }], [0, { [_hH]: _xafhCT }], [0, { [_hH]: _xafhxacc }], [0, { [_hH]: _xafhxacc_ }], [0, { [_hH]: _xafhxacc__ }], [0, { [_hH]: _xafhxacs }], [0, { [_hH]: _xafhxacs_ }], [2, { [_hH]: _xafhxadm }], [0, { [_hH]: _xafhE }], [4, { [_hH]: _xafhE_ }], [0, { [_hH]: _xafhxae }], [4, { [_hH]: _xafhLM }], [1, { [_hH]: _xafhxamm }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xafhxaolm }], [0, { [_hH]: _xafhxaollh }], [5, { [_hH]: _xafhxaolrud }], [1, { [_hH]: _xafhxampc }], [0, { [_hH]: _xafhxars }], [0, { [_hH]: _xafhxarc }], [0, { [_hH]: _xafhxar }], [0, { [_hH]: _xafhxasse }], [0, { [_hH]: _xafhxasseca }], [() => SSEKMSKeyId, { [_hH]: _xafhxasseakki }], [0, { [_hH]: _xafhxasseckM }], [0, { [_hH]: _xafhxasc }], [1, { [_hH]: _xafhxatc }], [0, { [_hH]: _xafhxavi }], [2, { [_hH]: _xafhxassebke }]], + 2 +]; +var __Unit = "unit"; +var AllowedHeaders = 64 | 0; +var AllowedMethods = 64 | 0; +var AllowedOrigins = 64 | 0; +var AnalyticsConfigurationList = [ + 1, + n0, + _ACLn, + 0, + [ + () => AnalyticsConfiguration$, + 0 + ] +]; +var Buckets = [ + 1, + n0, + _Bu, + 0, + [ + () => Bucket$, + { [_xN]: _B } + ] +]; +var ChecksumAlgorithmList = 64 | 0; +var CommonPrefixList = [ + 1, + n0, + _CPL, + 0, + () => CommonPrefix$ +]; +var CompletedPartList = [ + 1, + n0, + _CPLo, + 0, + () => CompletedPart$ +]; +var CORSRules = [ + 1, + n0, + _CORSR, + 0, + [ + () => CORSRule$, + 0 + ] +]; +var DeletedObjects = [ + 1, + n0, + _DOe, + 0, + () => DeletedObject$ +]; +var DeleteMarkers = [ + 1, + n0, + _DMe, + 0, + () => DeleteMarkerEntry$ +]; +var EncryptionTypeList = [ + 1, + n0, + _ETL, + 0, + [ + 0, + { [_xN]: _ET } + ] +]; +var Errors = [ + 1, + n0, + _Er, + 0, + () => _Error$ +]; +var EventList = 64 | 0; +var ExposeHeaders = 64 | 0; +var FilterRuleList = [ + 1, + n0, + _FRL, + 0, + () => FilterRule$ +]; +var Grants = [ + 1, + n0, + _G, + 0, + [ + () => Grant$, + { [_xN]: _Gr } + ] +]; +var IntelligentTieringConfigurationList = [ + 1, + n0, + _ITCL, + 0, + [ + () => IntelligentTieringConfiguration$, + 0 + ] +]; +var InventoryConfigurationList = [ + 1, + n0, + _ICL, + 0, + [ + () => InventoryConfiguration$, + 0 + ] +]; +var InventoryOptionalFields = [ + 1, + n0, + _IOF, + 0, + [ + 0, + { [_xN]: _Fi } + ] +]; +var LambdaFunctionConfigurationList = [ + 1, + n0, + _LFCL, + 0, + [ + () => LambdaFunctionConfiguration$, + 0 + ] +]; +var LifecycleRules = [ + 1, + n0, + _LRi, + 0, + [ + () => LifecycleRule$, + 0 + ] +]; +var MetricsConfigurationList = [ + 1, + n0, + _MCL, + 0, + [ + () => MetricsConfiguration$, + 0 + ] +]; +var MultipartUploadList = [ + 1, + n0, + _MUL, + 0, + () => MultipartUpload$ +]; +var NoncurrentVersionTransitionList = [ + 1, + n0, + _NVTL, + 0, + () => NoncurrentVersionTransition$ +]; +var ObjectAttributesList = 64 | 0; +var ObjectIdentifierList = [ + 1, + n0, + _OIL, + 0, + () => ObjectIdentifier$ +]; +var ObjectList = [ + 1, + n0, + _OLb, + 0, + [ + () => _Object$, + 0 + ] +]; +var ObjectVersionList = [ + 1, + n0, + _OVL, + 0, + [ + () => ObjectVersion$, + 0 + ] +]; +var OptionalObjectAttributesList = 64 | 0; +var OwnershipControlsRules = [ + 1, + n0, + _OCRw, + 0, + () => OwnershipControlsRule$ +]; +var Parts = [ + 1, + n0, + _Pa, + 0, + () => Part$ +]; +var PartsList = [ + 1, + n0, + _PL, + 0, + () => ObjectPart$ +]; +var QueueConfigurationList = [ + 1, + n0, + _QCL, + 0, + [ + () => QueueConfiguration$, + 0 + ] +]; +var ReplicationRules = [ + 1, + n0, + _RRep, + 0, + [ + () => ReplicationRule$, + 0 + ] +]; +var RoutingRules = [ + 1, + n0, + _RR, + 0, + [ + () => RoutingRule$, + { [_xN]: _RRo } + ] +]; +var ServerSideEncryptionRules = [ + 1, + n0, + _SSERe, + 0, + [ + () => ServerSideEncryptionRule$, + 0 + ] +]; +var TagSet = [ + 1, + n0, + _TS, + 0, + [ + () => Tag$, + { [_xN]: _Ta } + ] +]; +var TargetGrants = [ + 1, + n0, + _TG, + 0, + [ + () => TargetGrant$, + { [_xN]: _Gr } + ] +]; +var TieringList = [ + 1, + n0, + _TL, + 0, + () => Tiering$ +]; +var TopicConfigurationList = [ + 1, + n0, + _TCL, + 0, + [ + () => TopicConfiguration$, + 0 + ] +]; +var TransitionList = [ + 1, + n0, + _TLr, + 0, + () => Transition$ +]; +var UserMetadata = [ + 1, + n0, + _UM, + 0, + [ + () => MetadataEntry$, + { [_xN]: _ME } + ] +]; +var Metadata = 128 | 0; +var AnalyticsFilter$ = [ + 4, + n0, + _AF, + 0, + [_P, _Ta, _An], + [0, () => Tag$, [() => AnalyticsAndOperator$, 0]] +]; +var MetricsFilter$ = [ + 4, + n0, + _MF, + 0, + [_P, _Ta, _APAc, _An], + [0, () => Tag$, 0, [() => MetricsAndOperator$, 0]] +]; +var ObjectEncryption$ = [ + 4, + n0, + _OE, + 0, + [_SSEKMS], + [[() => SSEKMSEncryption$, { [_xN]: _SK }]] +]; +var SelectObjectContentEventStream$ = [ + 4, + n0, + _SOCES, + { [_st]: 1 }, + [_Rec, _Sta, _Pr, _Cont, _End], + [[() => RecordsEvent$, 0], [() => StatsEvent$, 0], [() => ProgressEvent$, 0], () => ContinuationEvent$, () => EndEvent$] +]; +var AbortMultipartUpload$ = [ + 9, + n0, + _AMU, + { [_h]: ["DELETE", "/{Key+}?x-id=AbortMultipartUpload", 204] }, + () => AbortMultipartUploadRequest$, + () => AbortMultipartUploadOutput$ +]; +var CompleteMultipartUpload$ = [ + 9, + n0, + _CMUo, + { [_h]: ["POST", "/{Key+}", 200] }, + () => CompleteMultipartUploadRequest$, + () => CompleteMultipartUploadOutput$ +]; +var CopyObject$ = [ + 9, + n0, + _CO, + { [_h]: ["PUT", "/{Key+}?x-id=CopyObject", 200] }, + () => CopyObjectRequest$, + () => CopyObjectOutput$ +]; +var CreateBucket$ = [ + 9, + n0, + _CB, + { [_h]: ["PUT", "/", 200] }, + () => CreateBucketRequest$, + () => CreateBucketOutput$ +]; +var CreateBucketMetadataConfiguration$ = [ + 9, + n0, + _CBMC, + { [_hC]: "-", [_h]: ["POST", "/?metadataConfiguration", 200] }, + () => CreateBucketMetadataConfigurationRequest$, + () => __Unit +]; +var CreateBucketMetadataTableConfiguration$ = [ + 9, + n0, + _CBMTC, + { [_hC]: "-", [_h]: ["POST", "/?metadataTable", 200] }, + () => CreateBucketMetadataTableConfigurationRequest$, + () => __Unit +]; +var CreateMultipartUpload$ = [ + 9, + n0, + _CMUr, + { [_h]: ["POST", "/{Key+}?uploads", 200] }, + () => CreateMultipartUploadRequest$, + () => CreateMultipartUploadOutput$ +]; +var CreateSession$ = [ + 9, + n0, + _CSr, + { [_h]: ["GET", "/?session", 200] }, + () => CreateSessionRequest$, + () => CreateSessionOutput$ +]; +var DeleteBucket$ = [ + 9, + n0, + _DB, + { [_h]: ["DELETE", "/", 204] }, + () => DeleteBucketRequest$, + () => __Unit +]; +var DeleteBucketAnalyticsConfiguration$ = [ + 9, + n0, + _DBAC, + { [_h]: ["DELETE", "/?analytics", 204] }, + () => DeleteBucketAnalyticsConfigurationRequest$, + () => __Unit +]; +var DeleteBucketCors$ = [ + 9, + n0, + _DBC, + { [_h]: ["DELETE", "/?cors", 204] }, + () => DeleteBucketCorsRequest$, + () => __Unit +]; +var DeleteBucketEncryption$ = [ + 9, + n0, + _DBE, + { [_h]: ["DELETE", "/?encryption", 204] }, + () => DeleteBucketEncryptionRequest$, + () => __Unit +]; +var DeleteBucketIntelligentTieringConfiguration$ = [ + 9, + n0, + _DBITC, + { [_h]: ["DELETE", "/?intelligent-tiering", 204] }, + () => DeleteBucketIntelligentTieringConfigurationRequest$, + () => __Unit +]; +var DeleteBucketInventoryConfiguration$ = [ + 9, + n0, + _DBIC, + { [_h]: ["DELETE", "/?inventory", 204] }, + () => DeleteBucketInventoryConfigurationRequest$, + () => __Unit +]; +var DeleteBucketLifecycle$ = [ + 9, + n0, + _DBL, + { [_h]: ["DELETE", "/?lifecycle", 204] }, + () => DeleteBucketLifecycleRequest$, + () => __Unit +]; +var DeleteBucketMetadataConfiguration$ = [ + 9, + n0, + _DBMC, + { [_h]: ["DELETE", "/?metadataConfiguration", 204] }, + () => DeleteBucketMetadataConfigurationRequest$, + () => __Unit +]; +var DeleteBucketMetadataTableConfiguration$ = [ + 9, + n0, + _DBMTC, + { [_h]: ["DELETE", "/?metadataTable", 204] }, + () => DeleteBucketMetadataTableConfigurationRequest$, + () => __Unit +]; +var DeleteBucketMetricsConfiguration$ = [ + 9, + n0, + _DBMCe, + { [_h]: ["DELETE", "/?metrics", 204] }, + () => DeleteBucketMetricsConfigurationRequest$, + () => __Unit +]; +var DeleteBucketOwnershipControls$ = [ + 9, + n0, + _DBOC, + { [_h]: ["DELETE", "/?ownershipControls", 204] }, + () => DeleteBucketOwnershipControlsRequest$, + () => __Unit +]; +var DeleteBucketPolicy$ = [ + 9, + n0, + _DBP, + { [_h]: ["DELETE", "/?policy", 204] }, + () => DeleteBucketPolicyRequest$, + () => __Unit +]; +var DeleteBucketReplication$ = [ + 9, + n0, + _DBRe, + { [_h]: ["DELETE", "/?replication", 204] }, + () => DeleteBucketReplicationRequest$, + () => __Unit +]; +var DeleteBucketTagging$ = [ + 9, + n0, + _DBT, + { [_h]: ["DELETE", "/?tagging", 204] }, + () => DeleteBucketTaggingRequest$, + () => __Unit +]; +var DeleteBucketWebsite$ = [ + 9, + n0, + _DBW, + { [_h]: ["DELETE", "/?website", 204] }, + () => DeleteBucketWebsiteRequest$, + () => __Unit +]; +var DeleteObject$ = [ + 9, + n0, + _DOel, + { [_h]: ["DELETE", "/{Key+}?x-id=DeleteObject", 204] }, + () => DeleteObjectRequest$, + () => DeleteObjectOutput$ +]; +var DeleteObjects$ = [ + 9, + n0, + _DOele, + { [_hC]: "-", [_h]: ["POST", "/?delete", 200] }, + () => DeleteObjectsRequest$, + () => DeleteObjectsOutput$ +]; +var DeleteObjectTagging$ = [ + 9, + n0, + _DOT, + { [_h]: ["DELETE", "/{Key+}?tagging", 204] }, + () => DeleteObjectTaggingRequest$, + () => DeleteObjectTaggingOutput$ +]; +var DeletePublicAccessBlock$ = [ + 9, + n0, + _DPAB, + { [_h]: ["DELETE", "/?publicAccessBlock", 204] }, + () => DeletePublicAccessBlockRequest$, + () => __Unit +]; +var GetBucketAbac$ = [ + 9, + n0, + _GBA, + { [_h]: ["GET", "/?abac", 200] }, + () => GetBucketAbacRequest$, + () => GetBucketAbacOutput$ +]; +var GetBucketAccelerateConfiguration$ = [ + 9, + n0, + _GBAC, + { [_h]: ["GET", "/?accelerate", 200] }, + () => GetBucketAccelerateConfigurationRequest$, + () => GetBucketAccelerateConfigurationOutput$ +]; +var GetBucketAcl$ = [ + 9, + n0, + _GBAe, + { [_h]: ["GET", "/?acl", 200] }, + () => GetBucketAclRequest$, + () => GetBucketAclOutput$ +]; +var GetBucketAnalyticsConfiguration$ = [ + 9, + n0, + _GBACe, + { [_h]: ["GET", "/?analytics&x-id=GetBucketAnalyticsConfiguration", 200] }, + () => GetBucketAnalyticsConfigurationRequest$, + () => GetBucketAnalyticsConfigurationOutput$ +]; +var GetBucketCors$ = [ + 9, + n0, + _GBC, + { [_h]: ["GET", "/?cors", 200] }, + () => GetBucketCorsRequest$, + () => GetBucketCorsOutput$ +]; +var GetBucketEncryption$ = [ + 9, + n0, + _GBE, + { [_h]: ["GET", "/?encryption", 200] }, + () => GetBucketEncryptionRequest$, + () => GetBucketEncryptionOutput$ +]; +var GetBucketIntelligentTieringConfiguration$ = [ + 9, + n0, + _GBITC, + { [_h]: ["GET", "/?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", 200] }, + () => GetBucketIntelligentTieringConfigurationRequest$, + () => GetBucketIntelligentTieringConfigurationOutput$ +]; +var GetBucketInventoryConfiguration$ = [ + 9, + n0, + _GBIC, + { [_h]: ["GET", "/?inventory&x-id=GetBucketInventoryConfiguration", 200] }, + () => GetBucketInventoryConfigurationRequest$, + () => GetBucketInventoryConfigurationOutput$ +]; +var GetBucketLifecycleConfiguration$ = [ + 9, + n0, + _GBLC, + { [_h]: ["GET", "/?lifecycle", 200] }, + () => GetBucketLifecycleConfigurationRequest$, + () => GetBucketLifecycleConfigurationOutput$ +]; +var GetBucketLocation$ = [ + 9, + n0, + _GBL, + { [_h]: ["GET", "/?location", 200] }, + () => GetBucketLocationRequest$, + () => GetBucketLocationOutput$ +]; +var GetBucketLogging$ = [ + 9, + n0, + _GBLe, + { [_h]: ["GET", "/?logging", 200] }, + () => GetBucketLoggingRequest$, + () => GetBucketLoggingOutput$ +]; +var GetBucketMetadataConfiguration$ = [ + 9, + n0, + _GBMC, + { [_h]: ["GET", "/?metadataConfiguration", 200] }, + () => GetBucketMetadataConfigurationRequest$, + () => GetBucketMetadataConfigurationOutput$ +]; +var GetBucketMetadataTableConfiguration$ = [ + 9, + n0, + _GBMTC, + { [_h]: ["GET", "/?metadataTable", 200] }, + () => GetBucketMetadataTableConfigurationRequest$, + () => GetBucketMetadataTableConfigurationOutput$ +]; +var GetBucketMetricsConfiguration$ = [ + 9, + n0, + _GBMCe, + { [_h]: ["GET", "/?metrics&x-id=GetBucketMetricsConfiguration", 200] }, + () => GetBucketMetricsConfigurationRequest$, + () => GetBucketMetricsConfigurationOutput$ +]; +var GetBucketNotificationConfiguration$ = [ + 9, + n0, + _GBNC, + { [_h]: ["GET", "/?notification", 200] }, + () => GetBucketNotificationConfigurationRequest$, + () => NotificationConfiguration$ +]; +var GetBucketOwnershipControls$ = [ + 9, + n0, + _GBOC, + { [_h]: ["GET", "/?ownershipControls", 200] }, + () => GetBucketOwnershipControlsRequest$, + () => GetBucketOwnershipControlsOutput$ +]; +var GetBucketPolicy$ = [ + 9, + n0, + _GBP, + { [_h]: ["GET", "/?policy", 200] }, + () => GetBucketPolicyRequest$, + () => GetBucketPolicyOutput$ +]; +var GetBucketPolicyStatus$ = [ + 9, + n0, + _GBPS, + { [_h]: ["GET", "/?policyStatus", 200] }, + () => GetBucketPolicyStatusRequest$, + () => GetBucketPolicyStatusOutput$ +]; +var GetBucketReplication$ = [ + 9, + n0, + _GBR, + { [_h]: ["GET", "/?replication", 200] }, + () => GetBucketReplicationRequest$, + () => GetBucketReplicationOutput$ +]; +var GetBucketRequestPayment$ = [ + 9, + n0, + _GBRP, + { [_h]: ["GET", "/?requestPayment", 200] }, + () => GetBucketRequestPaymentRequest$, + () => GetBucketRequestPaymentOutput$ +]; +var GetBucketTagging$ = [ + 9, + n0, + _GBT, + { [_h]: ["GET", "/?tagging", 200] }, + () => GetBucketTaggingRequest$, + () => GetBucketTaggingOutput$ +]; +var GetBucketVersioning$ = [ + 9, + n0, + _GBV, + { [_h]: ["GET", "/?versioning", 200] }, + () => GetBucketVersioningRequest$, + () => GetBucketVersioningOutput$ +]; +var GetBucketWebsite$ = [ + 9, + n0, + _GBW, + { [_h]: ["GET", "/?website", 200] }, + () => GetBucketWebsiteRequest$, + () => GetBucketWebsiteOutput$ +]; +var GetObject$ = [ + 9, + n0, + _GO, + { [_hC]: "-", [_h]: ["GET", "/{Key+}?x-id=GetObject", 200] }, + () => GetObjectRequest$, + () => GetObjectOutput$ +]; +var GetObjectAcl$ = [ + 9, + n0, + _GOA, + { [_h]: ["GET", "/{Key+}?acl", 200] }, + () => GetObjectAclRequest$, + () => GetObjectAclOutput$ +]; +var GetObjectAttributes$ = [ + 9, + n0, + _GOAe, + { [_h]: ["GET", "/{Key+}?attributes", 200] }, + () => GetObjectAttributesRequest$, + () => GetObjectAttributesOutput$ +]; +var GetObjectLegalHold$ = [ + 9, + n0, + _GOLH, + { [_h]: ["GET", "/{Key+}?legal-hold", 200] }, + () => GetObjectLegalHoldRequest$, + () => GetObjectLegalHoldOutput$ +]; +var GetObjectLockConfiguration$ = [ + 9, + n0, + _GOLC, + { [_h]: ["GET", "/?object-lock", 200] }, + () => GetObjectLockConfigurationRequest$, + () => GetObjectLockConfigurationOutput$ +]; +var GetObjectRetention$ = [ + 9, + n0, + _GORe, + { [_h]: ["GET", "/{Key+}?retention", 200] }, + () => GetObjectRetentionRequest$, + () => GetObjectRetentionOutput$ +]; +var GetObjectTagging$ = [ + 9, + n0, + _GOT, + { [_h]: ["GET", "/{Key+}?tagging", 200] }, + () => GetObjectTaggingRequest$, + () => GetObjectTaggingOutput$ +]; +var GetObjectTorrent$ = [ + 9, + n0, + _GOTe, + { [_h]: ["GET", "/{Key+}?torrent", 200] }, + () => GetObjectTorrentRequest$, + () => GetObjectTorrentOutput$ +]; +var GetPublicAccessBlock$ = [ + 9, + n0, + _GPAB, + { [_h]: ["GET", "/?publicAccessBlock", 200] }, + () => GetPublicAccessBlockRequest$, + () => GetPublicAccessBlockOutput$ +]; +var HeadBucket$ = [ + 9, + n0, + _HB, + { [_h]: ["HEAD", "/", 200] }, + () => HeadBucketRequest$, + () => HeadBucketOutput$ +]; +var HeadObject$ = [ + 9, + n0, + _HO, + { [_h]: ["HEAD", "/{Key+}", 200] }, + () => HeadObjectRequest$, + () => HeadObjectOutput$ +]; +var ListBucketAnalyticsConfigurations$ = [ + 9, + n0, + _LBAC, + { [_h]: ["GET", "/?analytics&x-id=ListBucketAnalyticsConfigurations", 200] }, + () => ListBucketAnalyticsConfigurationsRequest$, + () => ListBucketAnalyticsConfigurationsOutput$ +]; +var ListBucketIntelligentTieringConfigurations$ = [ + 9, + n0, + _LBITC, + { [_h]: ["GET", "/?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", 200] }, + () => ListBucketIntelligentTieringConfigurationsRequest$, + () => ListBucketIntelligentTieringConfigurationsOutput$ +]; +var ListBucketInventoryConfigurations$ = [ + 9, + n0, + _LBIC, + { [_h]: ["GET", "/?inventory&x-id=ListBucketInventoryConfigurations", 200] }, + () => ListBucketInventoryConfigurationsRequest$, + () => ListBucketInventoryConfigurationsOutput$ +]; +var ListBucketMetricsConfigurations$ = [ + 9, + n0, + _LBMC, + { [_h]: ["GET", "/?metrics&x-id=ListBucketMetricsConfigurations", 200] }, + () => ListBucketMetricsConfigurationsRequest$, + () => ListBucketMetricsConfigurationsOutput$ +]; +var ListBuckets$ = [ + 9, + n0, + _LB, + { [_h]: ["GET", "/?x-id=ListBuckets", 200] }, + () => ListBucketsRequest$, + () => ListBucketsOutput$ +]; +var ListDirectoryBuckets$ = [ + 9, + n0, + _LDB, + { [_h]: ["GET", "/?x-id=ListDirectoryBuckets", 200] }, + () => ListDirectoryBucketsRequest$, + () => ListDirectoryBucketsOutput$ +]; +var ListMultipartUploads$ = [ + 9, + n0, + _LMU, + { [_h]: ["GET", "/?uploads", 200] }, + () => ListMultipartUploadsRequest$, + () => ListMultipartUploadsOutput$ +]; +var ListObjects$ = [ + 9, + n0, + _LO, + { [_h]: ["GET", "/", 200] }, + () => ListObjectsRequest$, + () => ListObjectsOutput$ +]; +var ListObjectsV2$ = [ + 9, + n0, + _LOV, + { [_h]: ["GET", "/?list-type=2", 200] }, + () => ListObjectsV2Request$, + () => ListObjectsV2Output$ +]; +var ListObjectVersions$ = [ + 9, + n0, + _LOVi, + { [_h]: ["GET", "/?versions", 200] }, + () => ListObjectVersionsRequest$, + () => ListObjectVersionsOutput$ +]; +var ListParts$ = [ + 9, + n0, + _LP, + { [_h]: ["GET", "/{Key+}?x-id=ListParts", 200] }, + () => ListPartsRequest$, + () => ListPartsOutput$ +]; +var PutBucketAbac$ = [ + 9, + n0, + _PBA, + { [_hC]: "-", [_h]: ["PUT", "/?abac", 200] }, + () => PutBucketAbacRequest$, + () => __Unit +]; +var PutBucketAccelerateConfiguration$ = [ + 9, + n0, + _PBAC, + { [_hC]: "-", [_h]: ["PUT", "/?accelerate", 200] }, + () => PutBucketAccelerateConfigurationRequest$, + () => __Unit +]; +var PutBucketAcl$ = [ + 9, + n0, + _PBAu, + { [_hC]: "-", [_h]: ["PUT", "/?acl", 200] }, + () => PutBucketAclRequest$, + () => __Unit +]; +var PutBucketAnalyticsConfiguration$ = [ + 9, + n0, + _PBACu, + { [_h]: ["PUT", "/?analytics", 200] }, + () => PutBucketAnalyticsConfigurationRequest$, + () => __Unit +]; +var PutBucketCors$ = [ + 9, + n0, + _PBC, + { [_hC]: "-", [_h]: ["PUT", "/?cors", 200] }, + () => PutBucketCorsRequest$, + () => __Unit +]; +var PutBucketEncryption$ = [ + 9, + n0, + _PBE, + { [_hC]: "-", [_h]: ["PUT", "/?encryption", 200] }, + () => PutBucketEncryptionRequest$, + () => __Unit +]; +var PutBucketIntelligentTieringConfiguration$ = [ + 9, + n0, + _PBITC, + { [_h]: ["PUT", "/?intelligent-tiering", 200] }, + () => PutBucketIntelligentTieringConfigurationRequest$, + () => __Unit +]; +var PutBucketInventoryConfiguration$ = [ + 9, + n0, + _PBIC, + { [_h]: ["PUT", "/?inventory", 200] }, + () => PutBucketInventoryConfigurationRequest$, + () => __Unit +]; +var PutBucketLifecycleConfiguration$ = [ + 9, + n0, + _PBLC, + { [_hC]: "-", [_h]: ["PUT", "/?lifecycle", 200] }, + () => PutBucketLifecycleConfigurationRequest$, + () => PutBucketLifecycleConfigurationOutput$ +]; +var PutBucketLogging$ = [ + 9, + n0, + _PBL, + { [_hC]: "-", [_h]: ["PUT", "/?logging", 200] }, + () => PutBucketLoggingRequest$, + () => __Unit +]; +var PutBucketMetricsConfiguration$ = [ + 9, + n0, + _PBMC, + { [_h]: ["PUT", "/?metrics", 200] }, + () => PutBucketMetricsConfigurationRequest$, + () => __Unit +]; +var PutBucketNotificationConfiguration$ = [ + 9, + n0, + _PBNC, + { [_h]: ["PUT", "/?notification", 200] }, + () => PutBucketNotificationConfigurationRequest$, + () => __Unit +]; +var PutBucketOwnershipControls$ = [ + 9, + n0, + _PBOC, + { [_hC]: "-", [_h]: ["PUT", "/?ownershipControls", 200] }, + () => PutBucketOwnershipControlsRequest$, + () => __Unit +]; +var PutBucketPolicy$ = [ + 9, + n0, + _PBP, + { [_hC]: "-", [_h]: ["PUT", "/?policy", 200] }, + () => PutBucketPolicyRequest$, + () => __Unit +]; +var PutBucketReplication$ = [ + 9, + n0, + _PBR, + { [_hC]: "-", [_h]: ["PUT", "/?replication", 200] }, + () => PutBucketReplicationRequest$, + () => __Unit +]; +var PutBucketRequestPayment$ = [ + 9, + n0, + _PBRP, + { [_hC]: "-", [_h]: ["PUT", "/?requestPayment", 200] }, + () => PutBucketRequestPaymentRequest$, + () => __Unit +]; +var PutBucketTagging$ = [ + 9, + n0, + _PBT, + { [_hC]: "-", [_h]: ["PUT", "/?tagging", 200] }, + () => PutBucketTaggingRequest$, + () => __Unit +]; +var PutBucketVersioning$ = [ + 9, + n0, + _PBV, + { [_hC]: "-", [_h]: ["PUT", "/?versioning", 200] }, + () => PutBucketVersioningRequest$, + () => __Unit +]; +var PutBucketWebsite$ = [ + 9, + n0, + _PBW, + { [_hC]: "-", [_h]: ["PUT", "/?website", 200] }, + () => PutBucketWebsiteRequest$, + () => __Unit +]; +var PutObject$ = [ + 9, + n0, + _PO, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?x-id=PutObject", 200] }, + () => PutObjectRequest$, + () => PutObjectOutput$ +]; +var PutObjectAcl$ = [ + 9, + n0, + _POA, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?acl", 200] }, + () => PutObjectAclRequest$, + () => PutObjectAclOutput$ +]; +var PutObjectLegalHold$ = [ + 9, + n0, + _POLH, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?legal-hold", 200] }, + () => PutObjectLegalHoldRequest$, + () => PutObjectLegalHoldOutput$ +]; +var PutObjectLockConfiguration$ = [ + 9, + n0, + _POLC, + { [_hC]: "-", [_h]: ["PUT", "/?object-lock", 200] }, + () => PutObjectLockConfigurationRequest$, + () => PutObjectLockConfigurationOutput$ +]; +var PutObjectRetention$ = [ + 9, + n0, + _PORu, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?retention", 200] }, + () => PutObjectRetentionRequest$, + () => PutObjectRetentionOutput$ +]; +var PutObjectTagging$ = [ + 9, + n0, + _POT, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?tagging", 200] }, + () => PutObjectTaggingRequest$, + () => PutObjectTaggingOutput$ +]; +var PutPublicAccessBlock$ = [ + 9, + n0, + _PPAB, + { [_hC]: "-", [_h]: ["PUT", "/?publicAccessBlock", 200] }, + () => PutPublicAccessBlockRequest$, + () => __Unit +]; +var RenameObject$ = [ + 9, + n0, + _RO, + { [_h]: ["PUT", "/{Key+}?renameObject", 200] }, + () => RenameObjectRequest$, + () => RenameObjectOutput$ +]; +var RestoreObject$ = [ + 9, + n0, + _ROe, + { [_hC]: "-", [_h]: ["POST", "/{Key+}?restore", 200] }, + () => RestoreObjectRequest$, + () => RestoreObjectOutput$ +]; +var SelectObjectContent$ = [ + 9, + n0, + _SOC, + { [_h]: ["POST", "/{Key+}?select&select-type=2", 200] }, + () => SelectObjectContentRequest$, + () => SelectObjectContentOutput$ +]; +var UpdateBucketMetadataInventoryTableConfiguration$ = [ + 9, + n0, + _UBMITC, + { [_hC]: "-", [_h]: ["PUT", "/?metadataInventoryTable", 200] }, + () => UpdateBucketMetadataInventoryTableConfigurationRequest$, + () => __Unit +]; +var UpdateBucketMetadataJournalTableConfiguration$ = [ + 9, + n0, + _UBMJTC, + { [_hC]: "-", [_h]: ["PUT", "/?metadataJournalTable", 200] }, + () => UpdateBucketMetadataJournalTableConfigurationRequest$, + () => __Unit +]; +var UpdateObjectEncryption$ = [ + 9, + n0, + _UOE, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?encryption", 200] }, + () => UpdateObjectEncryptionRequest$, + () => UpdateObjectEncryptionResponse$ +]; +var UploadPart$ = [ + 9, + n0, + _UP, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?x-id=UploadPart", 200] }, + () => UploadPartRequest$, + () => UploadPartOutput$ +]; +var UploadPartCopy$ = [ + 9, + n0, + _UPC, + { [_h]: ["PUT", "/{Key+}?x-id=UploadPartCopy", 200] }, + () => UploadPartCopyRequest$, + () => UploadPartCopyOutput$ +]; +var WriteGetObjectResponse$ = [ + 9, + n0, + _WGOR, + { [_en]: ["{RequestRoute}."], [_h]: ["POST", "/WriteGetObjectResponse", 200] }, + () => WriteGetObjectResponseRequest$, + () => __Unit +]; + +// ../../node_modules/@aws-sdk/middleware-ssec/dist-es/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function ssecMiddleware(options) { + return (next) => async (args) => { + const input = { ...args.input }; + const properties = [ + { + target: "SSECustomerKey", + hash: "SSECustomerKeyMD5" + }, + { + target: "CopySourceSSECustomerKey", + hash: "CopySourceSSECustomerKeyMD5" + } + ]; + for (const prop of properties) { + const value = input[prop.target]; + if (value) { + let valueForHash; + if (typeof value === "string") { + if (isValidBase64EncodedSSECustomerKey(value, options)) { + valueForHash = options.base64Decoder(value); + } else { + valueForHash = options.utf8Decoder(value); + input[prop.target] = options.base64Encoder(valueForHash); + } + } else { + valueForHash = ArrayBuffer.isView(value) ? new Uint8Array(value.buffer, value.byteOffset, value.byteLength) : new Uint8Array(value); + input[prop.target] = options.base64Encoder(valueForHash); + } + const hash3 = new options.md5(); + hash3.update(valueForHash); + input[prop.hash] = options.base64Encoder(await hash3.digest()); + } + } + return next({ + ...args, + input + }); + }; +} +__name(ssecMiddleware, "ssecMiddleware"); +var ssecMiddlewareOptions = { + name: "ssecMiddleware", + step: "initialize", + tags: ["SSE"], + override: true +}; +var getSsecPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.add(ssecMiddleware(config3), ssecMiddlewareOptions); + }, "applyToStack") +}), "getSsecPlugin"); +function isValidBase64EncodedSSECustomerKey(str, options) { + const base64Regex = /^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/; + if (!base64Regex.test(str)) + return false; + try { + const decodedBytes = options.base64Decoder(str); + return decodedBytes.length === 32; + } catch { + return false; + } +} +__name(isValidBase64EncodedSSECustomerKey, "isValidBase64EncodedSSECustomerKey"); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectsCommand.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var DeleteObjectsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } +}).m(function(Command2, cs, config3, o) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; +}).s("AmazonS3", "DeleteObjects", {}).n("S3Client", "DeleteObjectsCommand").sc(DeleteObjects$).build() { + static { + __name(this, "DeleteObjectsCommand"); + } +}; + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectCommand.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var GetObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } +}).m(function(Command2, cs, config3, o) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestChecksumRequired: false, + requestValidationModeMember: "ChecksumMode", + "responseAlgorithms": ["CRC64NVME", "CRC32", "CRC32C", "SHA256", "SHA1"] + }), + getSsecPlugin(config3), + getS3ExpiresMiddlewarePlugin(config3) + ]; +}).s("AmazonS3", "GetObject", {}).n("S3Client", "GetObjectCommand").sc(GetObject$).build() { + static { + __name(this, "GetObjectCommand"); + } +}; + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectCommand.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var PutObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } +}).m(function(Command2, cs, config3, o) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: false + }), + getCheckContentLengthHeaderPlugin(config3), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; +}).s("AmazonS3", "PutObject", {}).n("S3Client", "PutObjectCommand").sc(PutObject$).build() { + static { + __name(this, "PutObjectCommand"); + } +}; + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/getSignedUrl.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-sdk/util-format-url/dist-es/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function formatUrl(request) { + const { port, query } = request; + let { protocol, path: path3, hostname: hostname3 } = request; + if (protocol && protocol.slice(-1) !== ":") { + protocol += ":"; + } + if (port) { + hostname3 += `:${port}`; + } + if (path3 && path3.charAt(0) !== "/") { + path3 = `/${path3}`; + } + let queryString = query ? buildQueryString(query) : ""; + if (queryString && queryString[0] !== "?") { + queryString = `?${queryString}`; + } + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + let fragment = ""; + if (request.fragment) { + fragment = `#${request.fragment}`; + } + return `${protocol}//${auth}${hostname3}${path3}${queryString}${fragment}`; +} +__name(formatUrl, "formatUrl"); + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/presigner.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/constants.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var UNSIGNED_PAYLOAD2 = "UNSIGNED-PAYLOAD"; +var SHA256_HEADER2 = "X-Amz-Content-Sha256"; + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/presigner.js +var S3RequestPresigner = class { + static { + __name(this, "S3RequestPresigner"); + } + signer; + constructor(options) { + const resolvedOptions = { + service: options.signingName || options.service || "s3", + uriEscapePath: options.uriEscapePath || false, + applyChecksum: options.applyChecksum || false, + ...options + }; + this.signer = new SignatureV4MultiRegion(resolvedOptions); + } + presign(requestToSign, { unsignableHeaders = /* @__PURE__ */ new Set(), hoistableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), ...options } = {}) { + this.prepareRequest(requestToSign, { + unsignableHeaders, + unhoistableHeaders, + hoistableHeaders + }); + return this.signer.presign(requestToSign, { + expiresIn: 900, + unsignableHeaders, + unhoistableHeaders, + ...options + }); + } + presignWithCredentials(requestToSign, credentials, { unsignableHeaders = /* @__PURE__ */ new Set(), hoistableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), ...options } = {}) { + this.prepareRequest(requestToSign, { + unsignableHeaders, + unhoistableHeaders, + hoistableHeaders + }); + return this.signer.presignWithCredentials(requestToSign, credentials, { + expiresIn: 900, + unsignableHeaders, + unhoistableHeaders, + ...options + }); + } + prepareRequest(requestToSign, { unsignableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), hoistableHeaders = /* @__PURE__ */ new Set() } = {}) { + unsignableHeaders.add("content-type"); + Object.keys(requestToSign.headers).map((header) => header.toLowerCase()).filter((header) => header.startsWith("x-amz-server-side-encryption")).forEach((header) => { + if (!hoistableHeaders.has(header)) { + unhoistableHeaders.add(header); + } + }); + requestToSign.headers[SHA256_HEADER2] = UNSIGNED_PAYLOAD2; + const currentHostHeader = requestToSign.headers.host; + const port = requestToSign.port; + const expectedHostHeader = `${requestToSign.hostname}${requestToSign.port != null ? ":" + port : ""}`; + if (!currentHostHeader || currentHostHeader === requestToSign.hostname && requestToSign.port != null) { + requestToSign.headers.host = expectedHostHeader; + } + } +}; + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/getSignedUrl.js +var getSignedUrl = /* @__PURE__ */ __name(async (client, command, options = {}) => { + let s3Presigner; + let region; + if (typeof client.config.endpointProvider === "function") { + const endpointV2 = await getEndpointFromInstructions(command.input, command.constructor, client.config); + const authScheme = endpointV2.properties?.authSchemes?.[0]; + if (authScheme?.name === "sigv4a") { + region = authScheme?.signingRegionSet?.join(","); + } else { + region = authScheme?.signingRegion; + } + s3Presigner = new S3RequestPresigner({ + ...client.config, + signingName: authScheme?.signingName, + region: /* @__PURE__ */ __name(async () => region, "region") + }); + } else { + s3Presigner = new S3RequestPresigner(client.config); + } + const presignInterceptMiddleware = /* @__PURE__ */ __name((next, context2) => async (args) => { + const { request } = args; + if (!HttpRequest.isInstance(request)) { + throw new Error("Request to be presigned is not an valid HTTP request."); + } + delete request.headers["amz-sdk-invocation-id"]; + delete request.headers["amz-sdk-request"]; + delete request.headers["x-amz-user-agent"]; + let presigned2; + const presignerOptions = { + ...options, + signingRegion: options.signingRegion ?? context2["signing_region"] ?? region, + signingService: options.signingService ?? context2["signing_service"] + }; + if (context2.s3ExpressIdentity) { + presigned2 = await s3Presigner.presignWithCredentials(request, context2.s3ExpressIdentity, presignerOptions); + } else { + presigned2 = await s3Presigner.presign(request, presignerOptions); + } + return { + response: {}, + output: { + $metadata: { httpStatusCode: 200 }, + presigned: presigned2 + } + }; + }, "presignInterceptMiddleware"); + const middlewareName = "presignInterceptMiddleware"; + const clientStack = client.middlewareStack.clone(); + clientStack.addRelativeTo(presignInterceptMiddleware, { + name: middlewareName, + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true + }); + const handler = command.resolveMiddleware(clientStack, client.config, {}); + const { output } = await handler({ input: command.input }); + const { presigned } = output; + return formatUrl(presigned); +}, "getSignedUrl"); + +// src/lib/s3-client.ts +var s3Client = null; +var imageUploadS3 = /* @__PURE__ */ __name(async (body, type, key) => { + const command = new PutObjectCommand({ + Bucket: s3BucketName, + Key: key, + Body: body, + ContentType: type + }); + const resp = await s3Client.send(command); + const imageUrl = `${key}`; + return imageUrl; +}, "imageUploadS3"); +async function deleteImageUtil({ bucket = s3BucketName, keys }) { + if (keys.length === 0) { + return true; + } + try { + const deleteParams = { + Bucket: bucket, + Delete: { + Objects: keys.map((key) => ({ Key: key })), + Quiet: false + } + }; + const deleteCommand = new DeleteObjectsCommand(deleteParams); + await s3Client.send(deleteCommand); + return true; + } catch (error50) { + console.error("Error deleting image:", error50); + throw new Error("Failed to delete image"); + return false; + } +} +__name(deleteImageUtil, "deleteImageUtil"); +function scaffoldAssetUrl(input) { + if (Array.isArray(input)) { + return input.map((key) => scaffoldAssetUrl(key)); + } + if (!input) { + return ""; + } + const normalizedKey = input.replace(/^\/+/, ""); + const domain3 = assetsDomain.endsWith("/") ? assetsDomain.slice(0, -1) : assetsDomain; + return `${domain3}/${normalizedKey}`; +} +__name(scaffoldAssetUrl, "scaffoldAssetUrl"); +async function generateSignedUrlFromS3Url(s3UrlRaw, expiresIn = 259200) { + if (!s3UrlRaw) { + return ""; + } + const s3Url2 = s3UrlRaw; + try { + const command = new GetObjectCommand({ + Bucket: s3BucketName, + Key: s3Url2 + }); + const signedUrl = await getSignedUrl(s3Client, command, { expiresIn }); + return signedUrl; + } catch (error50) { + console.error("Error generating signed URL:", error50); + throw new Error("Failed to generate signed URL"); + } +} +__name(generateSignedUrlFromS3Url, "generateSignedUrlFromS3Url"); +async function generateSignedUrlsFromS3Urls(s3Urls, expiresIn = 259200) { + if (!s3Urls || !s3Urls.length) { + return []; + } + try { + const signedUrls = await Promise.all( + s3Urls.map((url2) => generateSignedUrlFromS3Url(url2, expiresIn).catch(() => "")) + ); + return signedUrls; + } catch (error50) { + console.error("Error generating multiple signed URLs:", error50); + return s3Urls.map(() => ""); + } +} +__name(generateSignedUrlsFromS3Urls, "generateSignedUrlsFromS3Urls"); +async function generateUploadUrl(key, mimeType, expiresIn = 180) { + try { + await createUploadUrlStatus(key); + const command = new PutObjectCommand({ + Bucket: s3BucketName, + Key: key, + ContentType: mimeType + }); + const signedUrl = await getSignedUrl(s3Client, command, { expiresIn }); + return signedUrl; + } catch (error50) { + console.error("Error generating upload URL:", error50); + throw new Error("Failed to generate upload URL"); + } +} +__name(generateUploadUrl, "generateUploadUrl"); +function extractKeyFromPresignedUrl(url2) { + const u4 = new URL(url2); + const rawKey = u4.pathname.replace(/^\/+/, ""); + const decodedKey = decodeURIComponent(rawKey); + const parts = decodedKey.split("/"); + parts.shift(); + return parts.join("/"); +} +__name(extractKeyFromPresignedUrl, "extractKeyFromPresignedUrl"); +async function claimUploadUrl(url2) { + try { + const semiKey = extractKeyFromPresignedUrl(url2); + const updated = await claimUploadUrlStatus(semiKey); + if (!updated) { + throw new Error("Upload URL not found or already claimed"); + } + } catch (error50) { + console.error("Error claiming upload URL:", error50); + throw new Error("Failed to claim upload URL"); + } +} +__name(claimUploadUrl, "claimUploadUrl"); + +// src/trpc/apis/common-apis/common.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/trpc/trpc-index.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@trpc/server/dist/index.mjs +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@trpc/server/dist/initTRPC-RoZMIBeA.mjs +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var import_objectSpread2$2 = __toESM2(require_objectSpread2(), 1); +var middlewareMarker = "middlewareMarker"; +function createMiddlewareFactory() { + function createMiddlewareInner(middlewares) { + return { + _middlewares: middlewares, + unstable_pipe(middlewareBuilderOrFn) { + const pipedMiddleware = "_middlewares" in middlewareBuilderOrFn ? middlewareBuilderOrFn._middlewares : [middlewareBuilderOrFn]; + return createMiddlewareInner([...middlewares, ...pipedMiddleware]); + } + }; + } + __name(createMiddlewareInner, "createMiddlewareInner"); + function createMiddleware(fn) { + return createMiddlewareInner([fn]); + } + __name(createMiddleware, "createMiddleware"); + return createMiddleware; +} +__name(createMiddlewareFactory, "createMiddlewareFactory"); +function createInputMiddleware(parse3) { + const inputMiddleware = /* @__PURE__ */ __name(async function inputValidatorMiddleware(opts) { + let parsedInput; + const rawInput = await opts.getRawInput(); + try { + parsedInput = await parse3(rawInput); + } catch (cause) { + throw new TRPCError({ + code: "BAD_REQUEST", + cause + }); + } + const combinedInput = isObject(opts.input) && isObject(parsedInput) ? (0, import_objectSpread2$2.default)((0, import_objectSpread2$2.default)({}, opts.input), parsedInput) : parsedInput; + return opts.next({ input: combinedInput }); + }, "inputValidatorMiddleware"); + inputMiddleware._type = "input"; + return inputMiddleware; +} +__name(createInputMiddleware, "createInputMiddleware"); +function createOutputMiddleware(parse3) { + const outputMiddleware = /* @__PURE__ */ __name(async function outputValidatorMiddleware({ next }) { + const result = await next(); + if (!result.ok) return result; + try { + const data = await parse3(result.data); + return (0, import_objectSpread2$2.default)((0, import_objectSpread2$2.default)({}, result), {}, { data }); + } catch (cause) { + throw new TRPCError({ + message: "Output validation failed", + code: "INTERNAL_SERVER_ERROR", + cause + }); + } + }, "outputValidatorMiddleware"); + outputMiddleware._type = "output"; + return outputMiddleware; +} +__name(createOutputMiddleware, "createOutputMiddleware"); +var import_defineProperty3 = __toESM2(require_defineProperty(), 1); +var StandardSchemaV1Error = class extends Error { + static { + __name(this, "StandardSchemaV1Error"); + } + /** + * Creates a schema error with useful information. + * + * @param issues The schema issues. + */ + constructor(issues) { + var _issues$; + super((_issues$ = issues[0]) === null || _issues$ === void 0 ? void 0 : _issues$.message); + (0, import_defineProperty3.default)(this, "issues", void 0); + this.name = "SchemaError"; + this.issues = issues; + } +}; +function getParseFn(procedureParser) { + const parser = procedureParser; + const isStandardSchema = "~standard" in parser; + if (typeof parser === "function" && typeof parser.assert === "function") return parser.assert.bind(parser); + if (typeof parser === "function" && !isStandardSchema) return parser; + if (typeof parser.parseAsync === "function") return parser.parseAsync.bind(parser); + if (typeof parser.parse === "function") return parser.parse.bind(parser); + if (typeof parser.validateSync === "function") return parser.validateSync.bind(parser); + if (typeof parser.create === "function") return parser.create.bind(parser); + if (typeof parser.assert === "function") return (value) => { + parser.assert(value); + return value; + }; + if (isStandardSchema) return async (value) => { + const result = await parser["~standard"].validate(value); + if (result.issues) throw new StandardSchemaV1Error(result.issues); + return result.value; + }; + throw new Error("Could not find a validator fn"); +} +__name(getParseFn, "getParseFn"); +var require_objectWithoutPropertiesLoose = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(exports, module2) { + function _objectWithoutPropertiesLoose(r, e) { + if (null == r) return {}; + var t8 = {}; + for (var n in r) if ({}.hasOwnProperty.call(r, n)) { + if (e.includes(n)) continue; + t8[n] = r[n]; + } + return t8; + } + __name(_objectWithoutPropertiesLoose, "_objectWithoutPropertiesLoose"); + module2.exports = _objectWithoutPropertiesLoose, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; +} }); +var require_objectWithoutProperties = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(exports, module2) { + var objectWithoutPropertiesLoose = require_objectWithoutPropertiesLoose(); + function _objectWithoutProperties$1(e, t8) { + if (null == e) return {}; + var o, r, i = objectWithoutPropertiesLoose(e, t8); + if (Object.getOwnPropertySymbols) { + var s = Object.getOwnPropertySymbols(e); + for (r = 0; r < s.length; r++) o = s[r], t8.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); + } + return i; + } + __name(_objectWithoutProperties$1, "_objectWithoutProperties$1"); + module2.exports = _objectWithoutProperties$1, module2.exports.__esModule = true, module2.exports["default"] = module2.exports; +} }); +var import_objectWithoutProperties = __toESM2(require_objectWithoutProperties(), 1); +var import_objectSpread2$13 = __toESM2(require_objectSpread2(), 1); +var _excluded = [ + "middlewares", + "inputs", + "meta" +]; +function createNewBuilder(def1, def2) { + const { middlewares = [], inputs, meta: meta3 } = def2, rest = (0, import_objectWithoutProperties.default)(def2, _excluded); + return createBuilder((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, mergeWithoutOverrides(def1, rest)), {}, { + inputs: [...def1.inputs, ...inputs !== null && inputs !== void 0 ? inputs : []], + middlewares: [...def1.middlewares, ...middlewares], + meta: def1.meta && meta3 ? (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, def1.meta), meta3) : meta3 !== null && meta3 !== void 0 ? meta3 : def1.meta + })); +} +__name(createNewBuilder, "createNewBuilder"); +function createBuilder(initDef = {}) { + const _def = (0, import_objectSpread2$13.default)({ + procedure: true, + inputs: [], + middlewares: [] + }, initDef); + const builder = { + _def, + input(input) { + const parser = getParseFn(input); + return createNewBuilder(_def, { + inputs: [input], + middlewares: [createInputMiddleware(parser)] + }); + }, + output(output) { + const parser = getParseFn(output); + return createNewBuilder(_def, { + output, + middlewares: [createOutputMiddleware(parser)] + }); + }, + meta(meta3) { + return createNewBuilder(_def, { meta: meta3 }); + }, + use(middlewareBuilderOrFn) { + const middlewares = "_middlewares" in middlewareBuilderOrFn ? middlewareBuilderOrFn._middlewares : [middlewareBuilderOrFn]; + return createNewBuilder(_def, { middlewares }); + }, + unstable_concat(builder$1) { + return createNewBuilder(_def, builder$1._def); + }, + concat(builder$1) { + return createNewBuilder(_def, builder$1._def); + }, + query(resolver) { + return createResolver((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, _def), {}, { type: "query" }), resolver); + }, + mutation(resolver) { + return createResolver((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, _def), {}, { type: "mutation" }), resolver); + }, + subscription(resolver) { + return createResolver((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, _def), {}, { type: "subscription" }), resolver); + }, + experimental_caller(caller) { + return createNewBuilder(_def, { caller }); + } + }; + return builder; +} +__name(createBuilder, "createBuilder"); +function createResolver(_defIn, resolver) { + const finalBuilder = createNewBuilder(_defIn, { + resolver, + middlewares: [/* @__PURE__ */ __name(async function resolveMiddleware(opts) { + const data = await resolver(opts); + return { + marker: middlewareMarker, + ok: true, + data, + ctx: opts.ctx + }; + }, "resolveMiddleware")] + }); + const _def = (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, finalBuilder._def), {}, { + type: _defIn.type, + experimental_caller: Boolean(finalBuilder._def.caller), + meta: finalBuilder._def.meta, + $types: null + }); + const invoke = createProcedureCaller(finalBuilder._def); + const callerOverride = finalBuilder._def.caller; + if (!callerOverride) return invoke; + const callerWrapper = /* @__PURE__ */ __name(async (...args) => { + return await callerOverride({ + args, + invoke, + _def + }); + }, "callerWrapper"); + callerWrapper._def = _def; + return callerWrapper; +} +__name(createResolver, "createResolver"); +var codeblock = ` +This is a client-only function. +If you want to call this function on the server, see https://trpc.io/docs/v11/server/server-side-calls +`.trim(); +async function callRecursive(index, _def, opts) { + try { + const middleware2 = _def.middlewares[index]; + const result = await middleware2((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, opts), {}, { + meta: _def.meta, + input: opts.input, + next(_nextOpts) { + var _nextOpts$getRawInput; + const nextOpts = _nextOpts; + return callRecursive(index + 1, _def, (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, opts), {}, { + ctx: (nextOpts === null || nextOpts === void 0 ? void 0 : nextOpts.ctx) ? (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, opts.ctx), nextOpts.ctx) : opts.ctx, + input: nextOpts && "input" in nextOpts ? nextOpts.input : opts.input, + getRawInput: (_nextOpts$getRawInput = nextOpts === null || nextOpts === void 0 ? void 0 : nextOpts.getRawInput) !== null && _nextOpts$getRawInput !== void 0 ? _nextOpts$getRawInput : opts.getRawInput + })); + } + })); + return result; + } catch (cause) { + return { + ok: false, + error: getTRPCErrorFromUnknown(cause), + marker: middlewareMarker + }; + } +} +__name(callRecursive, "callRecursive"); +function createProcedureCaller(_def) { + async function procedure(opts) { + if (!opts || !("getRawInput" in opts)) throw new Error(codeblock); + const result = await callRecursive(0, _def, opts); + if (!result) throw new TRPCError({ + code: "INTERNAL_SERVER_ERROR", + message: "No result from middlewares - did you forget to `return next()`?" + }); + if (!result.ok) throw result.error; + return result.data; + } + __name(procedure, "procedure"); + procedure._def = _def; + procedure.procedure = true; + procedure.meta = _def.meta; + return procedure; +} +__name(createProcedureCaller, "createProcedureCaller"); +var _globalThis$process; +var _globalThis$process2; +var _globalThis$process3; +var isServerDefault = typeof window === "undefined" || "Deno" in window || ((_globalThis$process = globalThis.process) === null || _globalThis$process === void 0 || (_globalThis$process = _globalThis$process.env) === null || _globalThis$process === void 0 ? void 0 : _globalThis$process["NODE_ENV"]) === "test" || !!((_globalThis$process2 = globalThis.process) === null || _globalThis$process2 === void 0 || (_globalThis$process2 = _globalThis$process2.env) === null || _globalThis$process2 === void 0 ? void 0 : _globalThis$process2["JEST_WORKER_ID"]) || !!((_globalThis$process3 = globalThis.process) === null || _globalThis$process3 === void 0 || (_globalThis$process3 = _globalThis$process3.env) === null || _globalThis$process3 === void 0 ? void 0 : _globalThis$process3["VITEST_WORKER_ID"]); +var import_objectSpread25 = __toESM2(require_objectSpread2(), 1); +var TRPCBuilder = class TRPCBuilder2 { + static { + __name(this, "TRPCBuilder"); + } + /** + * Add a context shape as a generic to the root object + * @see https://trpc.io/docs/v11/server/context + */ + context() { + return new TRPCBuilder2(); + } + /** + * Add a meta shape as a generic to the root object + * @see https://trpc.io/docs/v11/quickstart + */ + meta() { + return new TRPCBuilder2(); + } + /** + * Create the root object + * @see https://trpc.io/docs/v11/server/routers#initialize-trpc + */ + create(opts) { + var _opts$transformer, _opts$isDev, _globalThis$process$1, _opts$allowOutsideOfS, _opts$errorFormatter, _opts$isServer; + const config3 = (0, import_objectSpread25.default)((0, import_objectSpread25.default)({}, opts), {}, { + transformer: getDataTransformer((_opts$transformer = opts === null || opts === void 0 ? void 0 : opts.transformer) !== null && _opts$transformer !== void 0 ? _opts$transformer : defaultTransformer), + isDev: (_opts$isDev = opts === null || opts === void 0 ? void 0 : opts.isDev) !== null && _opts$isDev !== void 0 ? _opts$isDev : ((_globalThis$process$1 = globalThis.process) === null || _globalThis$process$1 === void 0 ? void 0 : _globalThis$process$1.env["NODE_ENV"]) !== "production", + allowOutsideOfServer: (_opts$allowOutsideOfS = opts === null || opts === void 0 ? void 0 : opts.allowOutsideOfServer) !== null && _opts$allowOutsideOfS !== void 0 ? _opts$allowOutsideOfS : false, + errorFormatter: (_opts$errorFormatter = opts === null || opts === void 0 ? void 0 : opts.errorFormatter) !== null && _opts$errorFormatter !== void 0 ? _opts$errorFormatter : defaultFormatter, + isServer: (_opts$isServer = opts === null || opts === void 0 ? void 0 : opts.isServer) !== null && _opts$isServer !== void 0 ? _opts$isServer : isServerDefault, + $types: null + }); + { + var _opts$isServer2; + const isServer = (_opts$isServer2 = opts === null || opts === void 0 ? void 0 : opts.isServer) !== null && _opts$isServer2 !== void 0 ? _opts$isServer2 : isServerDefault; + if (!isServer && (opts === null || opts === void 0 ? void 0 : opts.allowOutsideOfServer) !== true) throw new Error(`You're trying to use @trpc/server in a non-server environment. This is not supported by default.`); + } + return { + _config: config3, + procedure: createBuilder({ meta: opts === null || opts === void 0 ? void 0 : opts.defaultMeta }), + middleware: createMiddlewareFactory(), + router: createRouterFactory(config3), + mergeRouters, + createCallerFactory: createCallerFactory() + }; + } +}; +var initTRPC = new TRPCBuilder(); + +// src/trpc/trpc-index.ts +var t = initTRPC.context().create(); +var middleware = t.middleware; +var router2 = t.router; +var errorLoggerMiddleware = middleware(async ({ path: path3, type, next, ctx }) => { + const start = Date.now(); + try { + const result = await next(); + const duration3 = Date.now() - start; + if (true) { + console.log(`\u2705 ${type} ${path3} - ${duration3}ms`); + } + return result; + } catch (error50) { + const duration3 = Date.now() - start; + const err = error50; + console.error("\u{1F6A8} tRPC Error:", { + timestamp: (/* @__PURE__ */ new Date()).toISOString(), + path: path3, + type, + duration: `${duration3}ms`, + userId: ctx?.user?.userId || ctx?.staffUser?.id || "anonymous", + error: { + name: err.name, + message: err.message, + code: err.code, + stack: err.stack + }, + // Add SQL-specific details if available + ...err.code && { sqlCode: err.code }, + ...err.meta && { sqlMeta: err.meta }, + ...err.sql && { sql: err.sql } + }); + throw error50; + } +}); +var publicProcedure = t.procedure.use(errorLoggerMiddleware); +var protectedProcedure = t.procedure.use(errorLoggerMiddleware).use( + middleware(async ({ ctx, next }) => { + if (!ctx.user && !ctx.staffUser) { + throw new TRPCError({ code: "UNAUTHORIZED" }); + } + return next(); + }) +); +var createCallerFactory2 = t.createCallerFactory; +var createTRPCRouter = t.router; + +// src/stores/product-store.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +async function initializeProducts() { + try { + console.log("Initializing product store in Redis..."); + const productsData = await getAllProductsForCache(); + const allStores = await getAllStoresForCache(); + const storeMap = new Map(allStores.map((s) => [s.id, s])); + const allDeliverySlots = await getAllDeliverySlotsForCache(); + const deliverySlotsMap = /* @__PURE__ */ new Map(); + for (const slot of allDeliverySlots) { + if (!deliverySlotsMap.has(slot.productId)) + deliverySlotsMap.set(slot.productId, []); + deliverySlotsMap.get(slot.productId).push(slot); + } + const allSpecialDeals = await getAllSpecialDealsForCache(); + const specialDealsMap = /* @__PURE__ */ new Map(); + for (const deal of allSpecialDeals) { + if (!specialDealsMap.has(deal.productId)) + specialDealsMap.set(deal.productId, []); + specialDealsMap.get(deal.productId).push(deal); + } + const allProductTags = await getAllProductTagsForCache(); + const productTagsMap = /* @__PURE__ */ new Map(); + for (const tag2 of allProductTags) { + if (!productTagsMap.has(tag2.productId)) + productTagsMap.set(tag2.productId, []); + productTagsMap.get(tag2.productId).push(tag2.tagName); + } + console.log("Product store initialized successfully"); + } catch (error50) { + console.error("Error initializing product store:", error50); + } +} +__name(initializeProducts, "initializeProducts"); +async function getProductById5(id) { + try { + const product = await getProductById(id); + if (!product) return null; + const signedImages = scaffoldAssetUrl( + product.images || [] + ); + const allStores = await getAllStoresForCache(); + const store = product.storeId ? allStores.find((s) => s.id === product.storeId) || null : null; + const allDeliverySlots = await getAllDeliverySlotsForCache(); + const productSlots2 = allDeliverySlots.filter((s) => s.productId === id); + const allSpecialDeals = await getAllSpecialDealsForCache(); + const productDeals = allSpecialDeals.filter((d) => d.productId === id); + const allProductTags = await getAllProductTagsForCache(); + const productTagNames = allProductTags.filter((t8) => t8.productId === id).map((t8) => t8.tagName); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + longDescription: product.longDescription, + price: product.price.toString(), + marketPrice: product.marketPrice?.toString() || null, + unitNotation: product.unit.shortNotation, + images: signedImages, + isOutOfStock: product.isOutOfStock, + store: store ? { id: store.id, name: store.name, description: store.description } : null, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + isFlashAvailable: product.isFlashAvailable, + flashPrice: product.flashPrice?.toString() || null, + deliverySlots: productSlots2.map((s) => ({ + id: s.id, + deliveryTime: s.deliveryTime, + freezeTime: s.freezeTime, + isCapacityFull: s.isCapacityFull + })), + specialDeals: productDeals.map((d) => ({ + quantity: d.quantity.toString(), + price: d.price.toString(), + validTill: d.validTill + })), + productTags: productTagNames + }; + } catch (error50) { + console.error(`Error getting product ${id}:`, error50); + return null; + } +} +__name(getProductById5, "getProductById"); +async function getAllProducts2() { + try { + const productsData = await getAllProductsForCache(); + const allStores = await getAllStoresForCache(); + const storeMap = new Map(allStores.map((s) => [s.id, s])); + const allDeliverySlots = await getAllDeliverySlotsForCache(); + const deliverySlotsMap = /* @__PURE__ */ new Map(); + for (const slot of allDeliverySlots) { + if (!deliverySlotsMap.has(slot.productId)) + deliverySlotsMap.set(slot.productId, []); + deliverySlotsMap.get(slot.productId).push(slot); + } + const allSpecialDeals = await getAllSpecialDealsForCache(); + const specialDealsMap = /* @__PURE__ */ new Map(); + for (const deal of allSpecialDeals) { + if (!specialDealsMap.has(deal.productId)) + specialDealsMap.set(deal.productId, []); + specialDealsMap.get(deal.productId).push(deal); + } + const allProductTags = await getAllProductTagsForCache(); + const productTagsMap = /* @__PURE__ */ new Map(); + for (const tag2 of allProductTags) { + if (!productTagsMap.has(tag2.productId)) + productTagsMap.set(tag2.productId, []); + productTagsMap.get(tag2.productId).push(tag2.tagName); + } + const products = []; + for (const product of productsData) { + const signedImages = scaffoldAssetUrl( + product.images || [] + ); + const store = product.storeId ? storeMap.get(product.storeId) || null : null; + const deliverySlots = deliverySlotsMap.get(product.id) || []; + const specialDeals2 = specialDealsMap.get(product.id) || []; + const productTags2 = productTagsMap.get(product.id) || []; + products.push({ + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + longDescription: product.longDescription, + price: product.price.toString(), + marketPrice: product.marketPrice?.toString() || null, + unitNotation: product.unitShortNotation, + images: signedImages, + isOutOfStock: product.isOutOfStock, + store: store ? { id: store.id, name: store.name, description: store.description } : null, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + isFlashAvailable: product.isFlashAvailable, + flashPrice: product.flashPrice?.toString() || null, + deliverySlots: deliverySlots.map((s) => ({ + id: s.id, + deliveryTime: s.deliveryTime, + freezeTime: s.freezeTime, + isCapacityFull: s.isCapacityFull + })), + specialDeals: specialDeals2.map((d) => ({ + quantity: d.quantity.toString(), + price: d.price.toString(), + validTill: d.validTill + })), + productTags: productTags2 + }); + } + return products; + } catch (error50) { + console.error("Error getting all products:", error50); + return []; + } +} +__name(getAllProducts2, "getAllProducts"); + +// src/stores/product-tag-store.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +async function transformTagToStoreTag(tag2) { + const signedImageUrl = tag2.imageUrl ? await generateSignedUrlFromS3Url(tag2.imageUrl) : null; + return { + id: tag2.id, + tagName: tag2.tagName, + tagDescription: tag2.tagDescription, + imageUrl: signedImageUrl, + isDashboardTag: tag2.isDashboardTag, + relatedStores: tag2.relatedStores || [], + productIds: tag2.products ? tag2.products.map((p) => p.productId) : [] + }; +} +__name(transformTagToStoreTag, "transformTagToStoreTag"); +async function initializeProductTagStore() { + try { + console.log("Initializing product tag store in Redis..."); + const tagsData = await getAllTagsForCache(); + const productTagsData = await getAllTagProductMappings(); + const productIdsByTag = /* @__PURE__ */ new Map(); + for (const pt of productTagsData) { + if (!productIdsByTag.has(pt.tagId)) { + productIdsByTag.set(pt.tagId, []); + } + productIdsByTag.get(pt.tagId).push(pt.productId); + } + console.log("Product tag store initialized successfully"); + } catch (error50) { + console.error("Error initializing product tag store:", error50); + } +} +__name(initializeProductTagStore, "initializeProductTagStore"); +async function getDashboardTags() { + try { + const tags = await getAllProductTags(); + const result = []; + for (const tag2 of tags) { + if (tag2.isDashboardTag) { + result.push(await transformTagToStoreTag(tag2)); + } + } + return result; + } catch (error50) { + console.error("Error getting dashboard tags:", error50); + return []; + } +} +__name(getDashboardTags, "getDashboardTags"); +async function getTagsByStoreId(storeId) { + try { + const tags = await getAllProductTags(); + const result = []; + for (const tag2 of tags) { + const relatedStores = tag2.relatedStores || []; + if (relatedStores.includes(storeId)) { + result.push(await transformTagToStoreTag(tag2)); + } + } + return result; + } catch (error50) { + console.error(`Error getting tags for store ${storeId}:`, error50); + return []; + } +} +__name(getTagsByStoreId, "getTagsByStoreId"); + +// src/trpc/apis/common-apis/common.ts +var getNextDeliveryDate = getNextDeliveryDateWithCapacity; +async function scaffoldProducts() { + let products = await getAllProducts2(); + products = products.filter((item) => Boolean(item.id)); + const suspendedProductIds = new Set(await getSuspendedProductIds()); + products = products.filter((product) => !suspendedProductIds.has(product.id)); + const formattedProducts = await Promise.all( + products.map(async (product) => { + const nextDeliveryDate = await getNextDeliveryDateWithCapacity(product.id); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + price: parseFloat(product.price), + marketPrice: product.marketPrice ? parseFloat(product.marketPrice) : null, + unit: product.unitNotation, + unitNotation: product.unitNotation, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + storeId: product.store?.id || null, + isOutOfStock: product.isOutOfStock, + isFlashAvailable: product.isFlashAvailable, + nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null, + images: product.images, + flashPrice: product.flashPrice + }; + }) + ); + return { + products: formattedProducts, + count: formattedProducts.length + }; +} +__name(scaffoldProducts, "scaffoldProducts"); +var commonRouter = router2({ + getDashboardTags: publicProcedure.query(async () => { + const tags = await getDashboardTags(); + return { + tags + }; + }), + getAllProductsSummary: publicProcedure.query(async () => { + const response = await scaffoldProducts(); + return response; + }) + /* + // Old implementation - moved to common-trpc-index.ts: + getStoresSummary: publicProcedure + .query(async () => { + const stores = await getStoresSummary(); + return { stores }; + }), + + healthCheck: publicProcedure + .query(async () => { + const result = await healthCheck(); + return result; + }), + */ +}); + +// src/apis/common-apis/apis/common-product.controller.ts +var getAllProductsSummary = /* @__PURE__ */ __name(async (c) => { + try { + const tagId = c.req.query("tagId"); + const tagIdNum = tagId ? parseInt(tagId) : void 0; + if (tagIdNum) { + const products = await getAllProductsWithUnits(tagIdNum); + if (products.length === 0) { + return c.json({ + products: [], + count: 0 + }, 200); + } + } + const productsWithUnits = await getAllProductsWithUnits(tagIdNum); + const formattedProducts = await Promise.all( + productsWithUnits.map(async (product) => { + const nextDeliveryDate = await getNextDeliveryDate(product.id); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + price: product.price, + marketPrice: product.marketPrice, + unit: product.unitShortNotation, + productQuantity: product.productQuantity, + isOutOfStock: product.isOutOfStock, + nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null, + images: scaffoldAssetUrl(product.images || []) + }; + }) + ); + return c.json({ + products: formattedProducts, + count: formattedProducts.length + }, 200); + } catch (error50) { + console.error("Get products summary error:", error50); + return c.json({ error: "Failed to fetch products summary" }, 500); + } +}, "getAllProductsSummary"); + +// src/apis/common-apis/apis/common-product.router.ts +var router3 = new Hono2(); +router3.get("/summary", getAllProductsSummary); +var commonProductsRouter = router3; +var common_product_router_default = commonProductsRouter; + +// src/apis/common-apis/apis/common.router.ts +var router4 = new Hono2(); +router4.route("/products", common_product_router_default); +var commonRouter2 = router4; +var common_router_default = commonRouter2; + +// src/v1-router.ts +var router5 = new Hono2(); +router5.route("/av", av_router_default); +router5.route("/cm", common_router_default); +var v1Router = router5; +var v1_router_default = v1Router; + +// src/test-controller.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var router6 = new Hono2(); +router6.get("/", (c) => { + return c.json({ + status: "ok", + message: "Health check passed", + timestamp: (/* @__PURE__ */ new Date()).toISOString() + }); +}); +var test_controller_default = router6; + +// src/middleware/auth.middleware.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var authenticateUser = /* @__PURE__ */ __name(async (c, next) => { + try { + const authHeader = c.req.header("authorization"); + if (!authHeader?.startsWith("Bearer ")) { + throw new ApiError("Authorization token required", 401); + } + const token = authHeader.substring(7); + console.log(c.req.header); + const { payload } = await jwtVerify(token, encodedJwtSecret); + const decoded = payload; + if (decoded.staffId) { + const staff = await getStaffUserById(decoded.staffId); + if (!staff) { + throw new ApiError("Invalid staff token", 401); + } + c.set("staffUser", { + id: staff.id, + name: staff.name + }); + } else { + c.set("user", decoded); + const suspended = await isUserSuspended(decoded.userId); + if (suspended) { + throw new ApiError("Account suspended", 403); + } + } + await next(); + } catch (error50) { + throw error50; + } +}, "authenticateUser"); + +// src/main-router.ts +var router7 = new Hono2(); +router7.get("/health", (c) => { + return c.json({ + status: "OK", + timestamp: (/* @__PURE__ */ new Date()).toISOString(), + uptime: process.uptime(), + message: "Hello world" + }); +}); +router7.get("/seed", (c) => { + return c.json({ + status: "OK", + timestamp: (/* @__PURE__ */ new Date()).toISOString(), + uptime: process.uptime() + }); +}); +router7.use("*", authenticateUser); +router7.route("/v1", v1_router_default); +router7.route("/test", test_controller_default); +var mainRouter = router7; +var main_router_default = mainRouter; + +// src/trpc/router.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/zod/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/zod/v4/classic/external.js +var external_exports = {}; +__export(external_exports, { + $brand: () => $brand, + $input: () => $input, + $output: () => $output, + NEVER: () => NEVER, + TimePrecision: () => TimePrecision, + ZodAny: () => ZodAny, + ZodArray: () => ZodArray, + ZodBase64: () => ZodBase64, + ZodBase64URL: () => ZodBase64URL, + ZodBigInt: () => ZodBigInt, + ZodBigIntFormat: () => ZodBigIntFormat, + ZodBoolean: () => ZodBoolean, + ZodCIDRv4: () => ZodCIDRv4, + ZodCIDRv6: () => ZodCIDRv6, + ZodCUID: () => ZodCUID, + ZodCUID2: () => ZodCUID2, + ZodCatch: () => ZodCatch, + ZodCodec: () => ZodCodec, + ZodCustom: () => ZodCustom, + ZodCustomStringFormat: () => ZodCustomStringFormat, + ZodDate: () => ZodDate, + ZodDefault: () => ZodDefault, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, + ZodE164: () => ZodE164, + ZodEmail: () => ZodEmail, + ZodEmoji: () => ZodEmoji, + ZodEnum: () => ZodEnum, + ZodError: () => ZodError, + ZodExactOptional: () => ZodExactOptional, + ZodFile: () => ZodFile, + ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind, + ZodFunction: () => ZodFunction, + ZodGUID: () => ZodGUID, + ZodIPv4: () => ZodIPv4, + ZodIPv6: () => ZodIPv6, + ZodISODate: () => ZodISODate, + ZodISODateTime: () => ZodISODateTime, + ZodISODuration: () => ZodISODuration, + ZodISOTime: () => ZodISOTime, + ZodIntersection: () => ZodIntersection, + ZodIssueCode: () => ZodIssueCode, + ZodJWT: () => ZodJWT, + ZodKSUID: () => ZodKSUID, + ZodLazy: () => ZodLazy, + ZodLiteral: () => ZodLiteral, + ZodMAC: () => ZodMAC, + ZodMap: () => ZodMap, + ZodNaN: () => ZodNaN, + ZodNanoID: () => ZodNanoID, + ZodNever: () => ZodNever, + ZodNonOptional: () => ZodNonOptional, + ZodNull: () => ZodNull, + ZodNullable: () => ZodNullable, + ZodNumber: () => ZodNumber, + ZodNumberFormat: () => ZodNumberFormat, + ZodObject: () => ZodObject, + ZodOptional: () => ZodOptional, + ZodPipe: () => ZodPipe, + ZodPrefault: () => ZodPrefault, + ZodPromise: () => ZodPromise, + ZodReadonly: () => ZodReadonly, + ZodRealError: () => ZodRealError, + ZodRecord: () => ZodRecord, + ZodSet: () => ZodSet, + ZodString: () => ZodString, + ZodStringFormat: () => ZodStringFormat, + ZodSuccess: () => ZodSuccess, + ZodSymbol: () => ZodSymbol, + ZodTemplateLiteral: () => ZodTemplateLiteral, + ZodTransform: () => ZodTransform, + ZodTuple: () => ZodTuple, + ZodType: () => ZodType, + ZodULID: () => ZodULID, + ZodURL: () => ZodURL, + ZodUUID: () => ZodUUID, + ZodUndefined: () => ZodUndefined, + ZodUnion: () => ZodUnion, + ZodUnknown: () => ZodUnknown, + ZodVoid: () => ZodVoid, + ZodXID: () => ZodXID, + ZodXor: () => ZodXor, + _ZodString: () => _ZodString, + _default: () => _default2, + _function: () => _function, + any: () => any, + array: () => array, + base64: () => base642, + base64url: () => base64url2, + bigint: () => bigint3, + boolean: () => boolean2, + catch: () => _catch2, + check: () => check2, + cidrv4: () => cidrv42, + cidrv6: () => cidrv62, + clone: () => clone, + codec: () => codec, + coerce: () => coerce_exports, + config: () => config2, + core: () => core_exports2, + cuid: () => cuid3, + cuid2: () => cuid22, + custom: () => custom, + date: () => date3, + decode: () => decode3, + decodeAsync: () => decodeAsync2, + describe: () => describe2, + discriminatedUnion: () => discriminatedUnion, + e164: () => e1642, + email: () => email2, + emoji: () => emoji2, + encode: () => encode4, + encodeAsync: () => encodeAsync2, + endsWith: () => _endsWith, + enum: () => _enum2, + exactOptional: () => exactOptional, + file: () => file, + flattenError: () => flattenError, + float32: () => float32, + float64: () => float64, + formatError: () => formatError, + fromJSONSchema: () => fromJSONSchema, + function: () => _function, + getErrorMap: () => getErrorMap, + globalRegistry: () => globalRegistry, + gt: () => _gt, + gte: () => _gte, + guid: () => guid2, + hash: () => hash, + hex: () => hex2, + hostname: () => hostname2, + httpUrl: () => httpUrl, + includes: () => _includes, + instanceof: () => _instanceof, + int: () => int, + int32: () => int32, + int64: () => int64, + intersection: () => intersection, + ipv4: () => ipv42, + ipv6: () => ipv62, + iso: () => iso_exports, + json: () => json, + jwt: () => jwt, + keyof: () => keyof, + ksuid: () => ksuid2, + lazy: () => lazy2, + length: () => _length, + literal: () => literal, + locales: () => locales_exports, + looseObject: () => looseObject, + looseRecord: () => looseRecord, + lowercase: () => _lowercase, + lt: () => _lt, + lte: () => _lte, + mac: () => mac2, + map: () => map, + maxLength: () => _maxLength, + maxSize: () => _maxSize, + meta: () => meta2, + mime: () => _mime, + minLength: () => _minLength, + minSize: () => _minSize, + multipleOf: () => _multipleOf, + nan: () => nan, + nanoid: () => nanoid2, + nativeEnum: () => nativeEnum, + negative: () => _negative, + never: () => never, + nonnegative: () => _nonnegative, + nonoptional: () => nonoptional, + nonpositive: () => _nonpositive, + normalize: () => _normalize, + null: () => _null3, + nullable: () => nullable, + nullish: () => nullish2, + number: () => number2, + object: () => object, + optional: () => optional, + overwrite: () => _overwrite, + parse: () => parse2, + parseAsync: () => parseAsync2, + partialRecord: () => partialRecord, + pipe: () => pipe, + positive: () => _positive, + prefault: () => prefault, + preprocess: () => preprocess, + prettifyError: () => prettifyError, + promise: () => promise, + property: () => _property, + readonly: () => readonly, + record: () => record, + refine: () => refine, + regex: () => _regex, + regexes: () => regexes_exports, + registry: () => registry, + safeDecode: () => safeDecode2, + safeDecodeAsync: () => safeDecodeAsync2, + safeEncode: () => safeEncode2, + safeEncodeAsync: () => safeEncodeAsync2, + safeParse: () => safeParse2, + safeParseAsync: () => safeParseAsync2, + set: () => set, + setErrorMap: () => setErrorMap, + size: () => _size, + slugify: () => _slugify, + startsWith: () => _startsWith, + strictObject: () => strictObject, + string: () => string2, + stringFormat: () => stringFormat, + stringbool: () => stringbool, + success: () => success, + superRefine: () => superRefine, + symbol: () => symbol, + templateLiteral: () => templateLiteral, + toJSONSchema: () => toJSONSchema, + toLowerCase: () => _toLowerCase, + toUpperCase: () => _toUpperCase, + transform: () => transform, + treeifyError: () => treeifyError, + trim: () => _trim, + tuple: () => tuple, + uint32: () => uint32, + uint64: () => uint64, + ulid: () => ulid2, + undefined: () => _undefined3, + union: () => union2, + unknown: () => unknown, + uppercase: () => _uppercase, + url: () => url, + util: () => util_exports, + uuid: () => uuid2, + uuidv4: () => uuidv4, + uuidv6: () => uuidv6, + uuidv7: () => uuidv7, + void: () => _void2, + xid: () => xid2, + xor: () => xor +}); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/zod/v4/core/index.js +var core_exports2 = {}; +__export(core_exports2, { + $ZodAny: () => $ZodAny, + $ZodArray: () => $ZodArray, + $ZodAsyncError: () => $ZodAsyncError, + $ZodBase64: () => $ZodBase64, + $ZodBase64URL: () => $ZodBase64URL, + $ZodBigInt: () => $ZodBigInt, + $ZodBigIntFormat: () => $ZodBigIntFormat, + $ZodBoolean: () => $ZodBoolean, + $ZodCIDRv4: () => $ZodCIDRv4, + $ZodCIDRv6: () => $ZodCIDRv6, + $ZodCUID: () => $ZodCUID, + $ZodCUID2: () => $ZodCUID2, + $ZodCatch: () => $ZodCatch, + $ZodCheck: () => $ZodCheck, + $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat, + $ZodCheckEndsWith: () => $ZodCheckEndsWith, + $ZodCheckGreaterThan: () => $ZodCheckGreaterThan, + $ZodCheckIncludes: () => $ZodCheckIncludes, + $ZodCheckLengthEquals: () => $ZodCheckLengthEquals, + $ZodCheckLessThan: () => $ZodCheckLessThan, + $ZodCheckLowerCase: () => $ZodCheckLowerCase, + $ZodCheckMaxLength: () => $ZodCheckMaxLength, + $ZodCheckMaxSize: () => $ZodCheckMaxSize, + $ZodCheckMimeType: () => $ZodCheckMimeType, + $ZodCheckMinLength: () => $ZodCheckMinLength, + $ZodCheckMinSize: () => $ZodCheckMinSize, + $ZodCheckMultipleOf: () => $ZodCheckMultipleOf, + $ZodCheckNumberFormat: () => $ZodCheckNumberFormat, + $ZodCheckOverwrite: () => $ZodCheckOverwrite, + $ZodCheckProperty: () => $ZodCheckProperty, + $ZodCheckRegex: () => $ZodCheckRegex, + $ZodCheckSizeEquals: () => $ZodCheckSizeEquals, + $ZodCheckStartsWith: () => $ZodCheckStartsWith, + $ZodCheckStringFormat: () => $ZodCheckStringFormat, + $ZodCheckUpperCase: () => $ZodCheckUpperCase, + $ZodCodec: () => $ZodCodec, + $ZodCustom: () => $ZodCustom, + $ZodCustomStringFormat: () => $ZodCustomStringFormat, + $ZodDate: () => $ZodDate, + $ZodDefault: () => $ZodDefault, + $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion, + $ZodE164: () => $ZodE164, + $ZodEmail: () => $ZodEmail, + $ZodEmoji: () => $ZodEmoji, + $ZodEncodeError: () => $ZodEncodeError, + $ZodEnum: () => $ZodEnum, + $ZodError: () => $ZodError, + $ZodExactOptional: () => $ZodExactOptional, + $ZodFile: () => $ZodFile, + $ZodFunction: () => $ZodFunction, + $ZodGUID: () => $ZodGUID, + $ZodIPv4: () => $ZodIPv4, + $ZodIPv6: () => $ZodIPv6, + $ZodISODate: () => $ZodISODate, + $ZodISODateTime: () => $ZodISODateTime, + $ZodISODuration: () => $ZodISODuration, + $ZodISOTime: () => $ZodISOTime, + $ZodIntersection: () => $ZodIntersection, + $ZodJWT: () => $ZodJWT, + $ZodKSUID: () => $ZodKSUID, + $ZodLazy: () => $ZodLazy, + $ZodLiteral: () => $ZodLiteral, + $ZodMAC: () => $ZodMAC, + $ZodMap: () => $ZodMap, + $ZodNaN: () => $ZodNaN, + $ZodNanoID: () => $ZodNanoID, + $ZodNever: () => $ZodNever, + $ZodNonOptional: () => $ZodNonOptional, + $ZodNull: () => $ZodNull, + $ZodNullable: () => $ZodNullable, + $ZodNumber: () => $ZodNumber, + $ZodNumberFormat: () => $ZodNumberFormat, + $ZodObject: () => $ZodObject, + $ZodObjectJIT: () => $ZodObjectJIT, + $ZodOptional: () => $ZodOptional, + $ZodPipe: () => $ZodPipe, + $ZodPrefault: () => $ZodPrefault, + $ZodPromise: () => $ZodPromise, + $ZodReadonly: () => $ZodReadonly, + $ZodRealError: () => $ZodRealError, + $ZodRecord: () => $ZodRecord, + $ZodRegistry: () => $ZodRegistry, + $ZodSet: () => $ZodSet, + $ZodString: () => $ZodString, + $ZodStringFormat: () => $ZodStringFormat, + $ZodSuccess: () => $ZodSuccess, + $ZodSymbol: () => $ZodSymbol, + $ZodTemplateLiteral: () => $ZodTemplateLiteral, + $ZodTransform: () => $ZodTransform, + $ZodTuple: () => $ZodTuple, + $ZodType: () => $ZodType, + $ZodULID: () => $ZodULID, + $ZodURL: () => $ZodURL, + $ZodUUID: () => $ZodUUID, + $ZodUndefined: () => $ZodUndefined, + $ZodUnion: () => $ZodUnion, + $ZodUnknown: () => $ZodUnknown, + $ZodVoid: () => $ZodVoid, + $ZodXID: () => $ZodXID, + $ZodXor: () => $ZodXor, + $brand: () => $brand, + $constructor: () => $constructor, + $input: () => $input, + $output: () => $output, + Doc: () => Doc, + JSONSchema: () => json_schema_exports, + JSONSchemaGenerator: () => JSONSchemaGenerator, + NEVER: () => NEVER, + TimePrecision: () => TimePrecision, + _any: () => _any, + _array: () => _array, + _base64: () => _base64, + _base64url: () => _base64url, + _bigint: () => _bigint, + _boolean: () => _boolean, + _catch: () => _catch, + _check: () => _check, + _cidrv4: () => _cidrv4, + _cidrv6: () => _cidrv6, + _coercedBigint: () => _coercedBigint, + _coercedBoolean: () => _coercedBoolean, + _coercedDate: () => _coercedDate, + _coercedNumber: () => _coercedNumber, + _coercedString: () => _coercedString, + _cuid: () => _cuid, + _cuid2: () => _cuid2, + _custom: () => _custom, + _date: () => _date, + _decode: () => _decode, + _decodeAsync: () => _decodeAsync, + _default: () => _default, + _discriminatedUnion: () => _discriminatedUnion, + _e164: () => _e164, + _email: () => _email, + _emoji: () => _emoji2, + _encode: () => _encode, + _encodeAsync: () => _encodeAsync, + _endsWith: () => _endsWith, + _enum: () => _enum, + _file: () => _file, + _float32: () => _float32, + _float64: () => _float64, + _gt: () => _gt, + _gte: () => _gte, + _guid: () => _guid, + _includes: () => _includes, + _int: () => _int, + _int32: () => _int32, + _int64: () => _int64, + _intersection: () => _intersection, + _ipv4: () => _ipv4, + _ipv6: () => _ipv6, + _isoDate: () => _isoDate, + _isoDateTime: () => _isoDateTime, + _isoDuration: () => _isoDuration, + _isoTime: () => _isoTime, + _jwt: () => _jwt, + _ksuid: () => _ksuid, + _lazy: () => _lazy, + _length: () => _length, + _literal: () => _literal, + _lowercase: () => _lowercase, + _lt: () => _lt, + _lte: () => _lte, + _mac: () => _mac, + _map: () => _map, + _max: () => _lte, + _maxLength: () => _maxLength, + _maxSize: () => _maxSize, + _mime: () => _mime, + _min: () => _gte, + _minLength: () => _minLength, + _minSize: () => _minSize, + _multipleOf: () => _multipleOf, + _nan: () => _nan, + _nanoid: () => _nanoid, + _nativeEnum: () => _nativeEnum, + _negative: () => _negative, + _never: () => _never, + _nonnegative: () => _nonnegative, + _nonoptional: () => _nonoptional, + _nonpositive: () => _nonpositive, + _normalize: () => _normalize, + _null: () => _null2, + _nullable: () => _nullable, + _number: () => _number, + _optional: () => _optional, + _overwrite: () => _overwrite, + _parse: () => _parse, + _parseAsync: () => _parseAsync, + _pipe: () => _pipe, + _positive: () => _positive, + _promise: () => _promise, + _property: () => _property, + _readonly: () => _readonly, + _record: () => _record, + _refine: () => _refine, + _regex: () => _regex, + _safeDecode: () => _safeDecode, + _safeDecodeAsync: () => _safeDecodeAsync, + _safeEncode: () => _safeEncode, + _safeEncodeAsync: () => _safeEncodeAsync, + _safeParse: () => _safeParse, + _safeParseAsync: () => _safeParseAsync, + _set: () => _set, + _size: () => _size, + _slugify: () => _slugify, + _startsWith: () => _startsWith, + _string: () => _string, + _stringFormat: () => _stringFormat, + _stringbool: () => _stringbool, + _success: () => _success, + _superRefine: () => _superRefine, + _symbol: () => _symbol, + _templateLiteral: () => _templateLiteral, + _toLowerCase: () => _toLowerCase, + _toUpperCase: () => _toUpperCase, + _transform: () => _transform, + _trim: () => _trim, + _tuple: () => _tuple, + _uint32: () => _uint32, + _uint64: () => _uint64, + _ulid: () => _ulid, + _undefined: () => _undefined2, + _union: () => _union, + _unknown: () => _unknown, + _uppercase: () => _uppercase, + _url: () => _url, + _uuid: () => _uuid, + _uuidv4: () => _uuidv4, + _uuidv6: () => _uuidv6, + _uuidv7: () => _uuidv7, + _void: () => _void, + _xid: () => _xid, + _xor: () => _xor, + clone: () => clone, + config: () => config2, + createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod, + createToJSONSchemaMethod: () => createToJSONSchemaMethod, + decode: () => decode2, + decodeAsync: () => decodeAsync, + describe: () => describe, + encode: () => encode3, + encodeAsync: () => encodeAsync, + extractDefs: () => extractDefs, + finalize: () => finalize, + flattenError: () => flattenError, + formatError: () => formatError, + globalConfig: () => globalConfig, + globalRegistry: () => globalRegistry, + initializeContext: () => initializeContext, + isValidBase64: () => isValidBase64, + isValidBase64URL: () => isValidBase64URL, + isValidJWT: () => isValidJWT, + locales: () => locales_exports, + meta: () => meta, + parse: () => parse, + parseAsync: () => parseAsync, + prettifyError: () => prettifyError, + process: () => process2, + regexes: () => regexes_exports, + registry: () => registry, + safeDecode: () => safeDecode, + safeDecodeAsync: () => safeDecodeAsync, + safeEncode: () => safeEncode, + safeEncodeAsync: () => safeEncodeAsync, + safeParse: () => safeParse, + safeParseAsync: () => safeParseAsync, + toDotPath: () => toDotPath, + toJSONSchema: () => toJSONSchema, + treeifyError: () => treeifyError, + util: () => util_exports, + version: () => version3 +}); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/zod/v4/core/core.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var NEVER = Object.freeze({ + status: "aborted" +}); +// @__NO_SIDE_EFFECTS__ +function $constructor(name, initializer3, params) { + function init(inst, def) { + if (!inst._zod) { + Object.defineProperty(inst, "_zod", { + value: { + def, + constr: _, + traits: /* @__PURE__ */ new Set() + }, + enumerable: false + }); + } + if (inst._zod.traits.has(name)) { + return; + } + inst._zod.traits.add(name); + initializer3(inst, def); + const proto = _.prototype; + const keys = Object.keys(proto); + for (let i = 0; i < keys.length; i++) { + const k = keys[i]; + if (!(k in inst)) { + inst[k] = proto[k].bind(inst); + } + } + } + __name(init, "init"); + const Parent = params?.Parent ?? Object; + class Definition extends Parent { + static { + __name(this, "Definition"); + } + } + Object.defineProperty(Definition, "name", { value: name }); + function _(def) { + var _a2; + const inst = params?.Parent ? new Definition() : this; + init(inst, def); + (_a2 = inst._zod).deferred ?? (_a2.deferred = []); + for (const fn of inst._zod.deferred) { + fn(); + } + return inst; + } + __name(_, "_"); + Object.defineProperty(_, "init", { value: init }); + Object.defineProperty(_, Symbol.hasInstance, { + value: /* @__PURE__ */ __name((inst) => { + if (params?.Parent && inst instanceof params.Parent) + return true; + return inst?._zod?.traits?.has(name); + }, "value") + }); + Object.defineProperty(_, "name", { value: name }); + return _; +} +__name($constructor, "$constructor"); +var $brand = /* @__PURE__ */ Symbol("zod_brand"); +var $ZodAsyncError = class extends Error { + static { + __name(this, "$ZodAsyncError"); + } + constructor() { + super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); + } +}; +var $ZodEncodeError = class extends Error { + static { + __name(this, "$ZodEncodeError"); + } + constructor(name) { + super(`Encountered unidirectional transform during encode: ${name}`); + this.name = "ZodEncodeError"; + } +}; +var globalConfig = {}; +function config2(newConfig) { + if (newConfig) + Object.assign(globalConfig, newConfig); + return globalConfig; +} +__name(config2, "config"); + +// ../../node_modules/zod/v4/core/parse.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/zod/v4/core/errors.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/zod/v4/core/util.js +var util_exports = {}; +__export(util_exports, { + BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES, + Class: () => Class, + NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES, + aborted: () => aborted, + allowsEval: () => allowsEval, + assert: () => assert3, + assertEqual: () => assertEqual, + assertIs: () => assertIs, + assertNever: () => assertNever, + assertNotEqual: () => assertNotEqual, + assignProp: () => assignProp, + base64ToUint8Array: () => base64ToUint8Array, + base64urlToUint8Array: () => base64urlToUint8Array, + cached: () => cached, + captureStackTrace: () => captureStackTrace, + cleanEnum: () => cleanEnum, + cleanRegex: () => cleanRegex, + clone: () => clone, + cloneDef: () => cloneDef, + createTransparentProxy: () => createTransparentProxy, + defineLazy: () => defineLazy, + esc: () => esc, + escapeRegex: () => escapeRegex, + extend: () => extend, + finalizeIssue: () => finalizeIssue, + floatSafeRemainder: () => floatSafeRemainder, + getElementAtPath: () => getElementAtPath, + getEnumValues: () => getEnumValues, + getLengthableOrigin: () => getLengthableOrigin, + getParsedType: () => getParsedType, + getSizableOrigin: () => getSizableOrigin, + hexToUint8Array: () => hexToUint8Array, + isObject: () => isObject3, + isPlainObject: () => isPlainObject2, + issue: () => issue, + joinValues: () => joinValues, + jsonStringifyReplacer: () => jsonStringifyReplacer, + merge: () => merge2, + mergeDefs: () => mergeDefs, + normalizeParams: () => normalizeParams, + nullish: () => nullish, + numKeys: () => numKeys, + objectClone: () => objectClone, + omit: () => omit, + optionalKeys: () => optionalKeys, + parsedType: () => parsedType, + partial: () => partial, + pick: () => pick, + prefixIssues: () => prefixIssues, + primitiveTypes: () => primitiveTypes, + promiseAllObject: () => promiseAllObject, + propertyKeyTypes: () => propertyKeyTypes, + randomString: () => randomString, + required: () => required, + safeExtend: () => safeExtend, + shallowClone: () => shallowClone, + slugify: () => slugify, + stringifyPrimitive: () => stringifyPrimitive, + uint8ArrayToBase64: () => uint8ArrayToBase64, + uint8ArrayToBase64url: () => uint8ArrayToBase64url, + uint8ArrayToHex: () => uint8ArrayToHex, + unwrapMessage: () => unwrapMessage +}); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function assertEqual(val) { + return val; +} +__name(assertEqual, "assertEqual"); +function assertNotEqual(val) { + return val; +} +__name(assertNotEqual, "assertNotEqual"); +function assertIs(_arg) { +} +__name(assertIs, "assertIs"); +function assertNever(_x2) { + throw new Error("Unexpected value in exhaustive check"); +} +__name(assertNever, "assertNever"); +function assert3(_) { +} +__name(assert3, "assert"); +function getEnumValues(entries) { + const numericValues = Object.values(entries).filter((v2) => typeof v2 === "number"); + const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v2]) => v2); + return values; +} +__name(getEnumValues, "getEnumValues"); +function joinValues(array2, separator = "|") { + return array2.map((val) => stringifyPrimitive(val)).join(separator); +} +__name(joinValues, "joinValues"); +function jsonStringifyReplacer(_, value) { + if (typeof value === "bigint") + return value.toString(); + return value; +} +__name(jsonStringifyReplacer, "jsonStringifyReplacer"); +function cached(getter) { + const set2 = false; + return { + get value() { + if (!set2) { + const value = getter(); + Object.defineProperty(this, "value", { value }); + return value; + } + throw new Error("cached value already set"); + } + }; +} +__name(cached, "cached"); +function nullish(input) { + return input === null || input === void 0; +} +__name(nullish, "nullish"); +function cleanRegex(source) { + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + return source.slice(start, end); +} +__name(cleanRegex, "cleanRegex"); +function floatSafeRemainder(val, step) { + const valDecCount = (val.toString().split(".")[1] || "").length; + const stepString = step.toString(); + let stepDecCount = (stepString.split(".")[1] || "").length; + if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) { + const match2 = stepString.match(/\d?e-(\d?)/); + if (match2?.[1]) { + stepDecCount = Number.parseInt(match2[1]); + } + } + const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; + const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); + const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); + return valInt % stepInt / 10 ** decCount; +} +__name(floatSafeRemainder, "floatSafeRemainder"); +var EVALUATING = /* @__PURE__ */ Symbol("evaluating"); +function defineLazy(object2, key, getter) { + let value = void 0; + Object.defineProperty(object2, key, { + get() { + if (value === EVALUATING) { + return void 0; + } + if (value === void 0) { + value = EVALUATING; + value = getter(); + } + return value; + }, + set(v2) { + Object.defineProperty(object2, key, { + value: v2 + // configurable: true, + }); + }, + configurable: true + }); +} +__name(defineLazy, "defineLazy"); +function objectClone(obj) { + return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj)); +} +__name(objectClone, "objectClone"); +function assignProp(target2, prop, value) { + Object.defineProperty(target2, prop, { + value, + writable: true, + enumerable: true, + configurable: true + }); +} +__name(assignProp, "assignProp"); +function mergeDefs(...defs) { + const mergedDescriptors = {}; + for (const def of defs) { + const descriptors = Object.getOwnPropertyDescriptors(def); + Object.assign(mergedDescriptors, descriptors); + } + return Object.defineProperties({}, mergedDescriptors); +} +__name(mergeDefs, "mergeDefs"); +function cloneDef(schema) { + return mergeDefs(schema._zod.def); +} +__name(cloneDef, "cloneDef"); +function getElementAtPath(obj, path3) { + if (!path3) + return obj; + return path3.reduce((acc, key) => acc?.[key], obj); +} +__name(getElementAtPath, "getElementAtPath"); +function promiseAllObject(promisesObj) { + const keys = Object.keys(promisesObj); + const promises = keys.map((key) => promisesObj[key]); + return Promise.all(promises).then((results) => { + const resolvedObj = {}; + for (let i = 0; i < keys.length; i++) { + resolvedObj[keys[i]] = results[i]; + } + return resolvedObj; + }); +} +__name(promiseAllObject, "promiseAllObject"); +function randomString(length = 10) { + const chars2 = "abcdefghijklmnopqrstuvwxyz"; + let str = ""; + for (let i = 0; i < length; i++) { + str += chars2[Math.floor(Math.random() * chars2.length)]; + } + return str; +} +__name(randomString, "randomString"); +function esc(str) { + return JSON.stringify(str); +} +__name(esc, "esc"); +function slugify(input) { + return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, ""); +} +__name(slugify, "slugify"); +var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => { +}; +function isObject3(data) { + return typeof data === "object" && data !== null && !Array.isArray(data); +} +__name(isObject3, "isObject"); +var allowsEval = cached(() => { + if (typeof navigator !== "undefined" && "Cloudflare-Workers"?.includes("Cloudflare")) { + return false; + } + try { + const F = Function; + new F(""); + return true; + } catch (_) { + return false; + } +}); +function isPlainObject2(o) { + if (isObject3(o) === false) + return false; + const ctor = o.constructor; + if (ctor === void 0) + return true; + if (typeof ctor !== "function") + return true; + const prot = ctor.prototype; + if (isObject3(prot) === false) + return false; + if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) { + return false; + } + return true; +} +__name(isPlainObject2, "isPlainObject"); +function shallowClone(o) { + if (isPlainObject2(o)) + return { ...o }; + if (Array.isArray(o)) + return [...o]; + return o; +} +__name(shallowClone, "shallowClone"); +function numKeys(data) { + let keyCount = 0; + for (const key in data) { + if (Object.prototype.hasOwnProperty.call(data, key)) { + keyCount++; + } + } + return keyCount; +} +__name(numKeys, "numKeys"); +var getParsedType = /* @__PURE__ */ __name((data) => { + const t8 = typeof data; + switch (t8) { + case "undefined": + return "undefined"; + case "string": + return "string"; + case "number": + return Number.isNaN(data) ? "nan" : "number"; + case "boolean": + return "boolean"; + case "function": + return "function"; + case "bigint": + return "bigint"; + case "symbol": + return "symbol"; + case "object": + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { + return "promise"; + } + if (typeof Map !== "undefined" && data instanceof Map) { + return "map"; + } + if (typeof Set !== "undefined" && data instanceof Set) { + return "set"; + } + if (typeof Date !== "undefined" && data instanceof Date) { + return "date"; + } + if (typeof File !== "undefined" && data instanceof File) { + return "file"; + } + return "object"; + default: + throw new Error(`Unknown data type: ${t8}`); + } +}, "getParsedType"); +var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]); +var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]); +function escapeRegex(str) { + return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); +} +__name(escapeRegex, "escapeRegex"); +function clone(inst, def, params) { + const cl = new inst._zod.constr(def ?? inst._zod.def); + if (!def || params?.parent) + cl._zod.parent = inst; + return cl; +} +__name(clone, "clone"); +function normalizeParams(_params) { + const params = _params; + if (!params) + return {}; + if (typeof params === "string") + return { error: /* @__PURE__ */ __name(() => params, "error") }; + if (params?.message !== void 0) { + if (params?.error !== void 0) + throw new Error("Cannot specify both `message` and `error` params"); + params.error = params.message; + } + delete params.message; + if (typeof params.error === "string") + return { ...params, error: /* @__PURE__ */ __name(() => params.error, "error") }; + return params; +} +__name(normalizeParams, "normalizeParams"); +function createTransparentProxy(getter) { + let target2; + return new Proxy({}, { + get(_, prop, receiver) { + target2 ?? (target2 = getter()); + return Reflect.get(target2, prop, receiver); + }, + set(_, prop, value, receiver) { + target2 ?? (target2 = getter()); + return Reflect.set(target2, prop, value, receiver); + }, + has(_, prop) { + target2 ?? (target2 = getter()); + return Reflect.has(target2, prop); + }, + deleteProperty(_, prop) { + target2 ?? (target2 = getter()); + return Reflect.deleteProperty(target2, prop); + }, + ownKeys(_) { + target2 ?? (target2 = getter()); + return Reflect.ownKeys(target2); + }, + getOwnPropertyDescriptor(_, prop) { + target2 ?? (target2 = getter()); + return Reflect.getOwnPropertyDescriptor(target2, prop); + }, + defineProperty(_, prop, descriptor) { + target2 ?? (target2 = getter()); + return Reflect.defineProperty(target2, prop, descriptor); + } + }); +} +__name(createTransparentProxy, "createTransparentProxy"); +function stringifyPrimitive(value) { + if (typeof value === "bigint") + return value.toString() + "n"; + if (typeof value === "string") + return `"${value}"`; + return `${value}`; +} +__name(stringifyPrimitive, "stringifyPrimitive"); +function optionalKeys(shape) { + return Object.keys(shape).filter((k) => { + return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional"; + }); +} +__name(optionalKeys, "optionalKeys"); +var NUMBER_FORMAT_RANGES = { + safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], + int32: [-2147483648, 2147483647], + uint32: [0, 4294967295], + float32: [-34028234663852886e22, 34028234663852886e22], + float64: [-Number.MAX_VALUE, Number.MAX_VALUE] +}; +var BIGINT_FORMAT_RANGES = { + int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")], + uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")] +}; +function pick(schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".pick() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const newShape = {}; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + newShape[key] = currDef.shape[key]; + } + assignProp(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone(schema, def); +} +__name(pick, "pick"); +function omit(schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".omit() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const newShape = { ...schema._zod.def.shape }; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + delete newShape[key]; + } + assignProp(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone(schema, def); +} +__name(omit, "omit"); +function extend(schema, shape) { + if (!isPlainObject2(shape)) { + throw new Error("Invalid input to extend: expected a plain object"); + } + const checks = schema._zod.def.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + const existingShape = schema._zod.def.shape; + for (const key in shape) { + if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) { + throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead."); + } + } + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + } + }); + return clone(schema, def); +} +__name(extend, "extend"); +function safeExtend(schema, shape) { + if (!isPlainObject2(shape)) { + throw new Error("Invalid input to safeExtend: expected a plain object"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + } + }); + return clone(schema, def); +} +__name(safeExtend, "safeExtend"); +function merge2(a, b) { + const def = mergeDefs(a._zod.def, { + get shape() { + const _shape = { ...a._zod.def.shape, ...b._zod.def.shape }; + assignProp(this, "shape", _shape); + return _shape; + }, + get catchall() { + return b._zod.def.catchall; + }, + checks: [] + // delete existing checks + }); + return clone(a, def); +} +__name(merge2, "merge"); +function partial(Class2, schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".partial() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const oldShape = schema._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in oldShape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = Class2 ? new Class2({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; + } + } else { + for (const key in oldShape) { + shape[key] = Class2 ? new Class2({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; + } + } + assignProp(this, "shape", shape); + return shape; + }, + checks: [] + }); + return clone(schema, def); +} +__name(partial, "partial"); +function required(Class2, schema, mask) { + const def = mergeDefs(schema._zod.def, { + get shape() { + const oldShape = schema._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = new Class2({ + type: "nonoptional", + innerType: oldShape[key] + }); + } + } else { + for (const key in oldShape) { + shape[key] = new Class2({ + type: "nonoptional", + innerType: oldShape[key] + }); + } + } + assignProp(this, "shape", shape); + return shape; + } + }); + return clone(schema, def); +} +__name(required, "required"); +function aborted(x, startIndex = 0) { + if (x.aborted === true) + return true; + for (let i = startIndex; i < x.issues.length; i++) { + if (x.issues[i]?.continue !== true) { + return true; + } + } + return false; +} +__name(aborted, "aborted"); +function prefixIssues(path3, issues) { + return issues.map((iss) => { + var _a2; + (_a2 = iss).path ?? (_a2.path = []); + iss.path.unshift(path3); + return iss; + }); +} +__name(prefixIssues, "prefixIssues"); +function unwrapMessage(message2) { + return typeof message2 === "string" ? message2 : message2?.message; +} +__name(unwrapMessage, "unwrapMessage"); +function finalizeIssue(iss, ctx, config3) { + const full = { ...iss, path: iss.path ?? [] }; + if (!iss.message) { + const message2 = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config3.customError?.(iss)) ?? unwrapMessage(config3.localeError?.(iss)) ?? "Invalid input"; + full.message = message2; + } + delete full.inst; + delete full.continue; + if (!ctx?.reportInput) { + delete full.input; + } + return full; +} +__name(finalizeIssue, "finalizeIssue"); +function getSizableOrigin(input) { + if (input instanceof Set) + return "set"; + if (input instanceof Map) + return "map"; + if (input instanceof File) + return "file"; + return "unknown"; +} +__name(getSizableOrigin, "getSizableOrigin"); +function getLengthableOrigin(input) { + if (Array.isArray(input)) + return "array"; + if (typeof input === "string") + return "string"; + return "unknown"; +} +__name(getLengthableOrigin, "getLengthableOrigin"); +function parsedType(data) { + const t8 = typeof data; + switch (t8) { + case "number": { + return Number.isNaN(data) ? "nan" : "number"; + } + case "object": { + if (data === null) { + return "null"; + } + if (Array.isArray(data)) { + return "array"; + } + const obj = data; + if (obj && Object.getPrototypeOf(obj) !== Object.prototype && "constructor" in obj && obj.constructor) { + return obj.constructor.name; + } + } + } + return t8; +} +__name(parsedType, "parsedType"); +function issue(...args) { + const [iss, input, inst] = args; + if (typeof iss === "string") { + return { + message: iss, + code: "custom", + input, + inst + }; + } + return { ...iss }; +} +__name(issue, "issue"); +function cleanEnum(obj) { + return Object.entries(obj).filter(([k, _]) => { + return Number.isNaN(Number.parseInt(k, 10)); + }).map((el) => el[1]); +} +__name(cleanEnum, "cleanEnum"); +function base64ToUint8Array(base643) { + const binaryString = atob(base643); + const bytes = new Uint8Array(binaryString.length); + for (let i = 0; i < binaryString.length; i++) { + bytes[i] = binaryString.charCodeAt(i); + } + return bytes; +} +__name(base64ToUint8Array, "base64ToUint8Array"); +function uint8ArrayToBase64(bytes) { + let binaryString = ""; + for (let i = 0; i < bytes.length; i++) { + binaryString += String.fromCharCode(bytes[i]); + } + return btoa(binaryString); +} +__name(uint8ArrayToBase64, "uint8ArrayToBase64"); +function base64urlToUint8Array(base64url3) { + const base643 = base64url3.replace(/-/g, "+").replace(/_/g, "/"); + const padding = "=".repeat((4 - base643.length % 4) % 4); + return base64ToUint8Array(base643 + padding); +} +__name(base64urlToUint8Array, "base64urlToUint8Array"); +function uint8ArrayToBase64url(bytes) { + return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); +} +__name(uint8ArrayToBase64url, "uint8ArrayToBase64url"); +function hexToUint8Array(hex3) { + const cleanHex = hex3.replace(/^0x/, ""); + if (cleanHex.length % 2 !== 0) { + throw new Error("Invalid hex string length"); + } + const bytes = new Uint8Array(cleanHex.length / 2); + for (let i = 0; i < cleanHex.length; i += 2) { + bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16); + } + return bytes; +} +__name(hexToUint8Array, "hexToUint8Array"); +function uint8ArrayToHex(bytes) { + return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join(""); +} +__name(uint8ArrayToHex, "uint8ArrayToHex"); +var Class = class { + static { + __name(this, "Class"); + } + constructor(..._args) { + } +}; + +// ../../node_modules/zod/v4/core/errors.js +var initializer = /* @__PURE__ */ __name((inst, def) => { + inst.name = "$ZodError"; + Object.defineProperty(inst, "_zod", { + value: inst._zod, + enumerable: false + }); + Object.defineProperty(inst, "issues", { + value: def, + enumerable: false + }); + inst.message = JSON.stringify(def, jsonStringifyReplacer, 2); + Object.defineProperty(inst, "toString", { + value: /* @__PURE__ */ __name(() => inst.message, "value"), + enumerable: false + }); +}, "initializer"); +var $ZodError = $constructor("$ZodError", initializer); +var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error }); +function flattenError(error50, mapper = (issue2) => issue2.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of error50.issues) { + if (sub.path.length > 0) { + fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; + fieldErrors[sub.path[0]].push(mapper(sub)); + } else { + formErrors.push(mapper(sub)); + } + } + return { formErrors, fieldErrors }; +} +__name(flattenError, "flattenError"); +function formatError(error50, mapper = (issue2) => issue2.message) { + const fieldErrors = { _errors: [] }; + const processError = /* @__PURE__ */ __name((error51) => { + for (const issue2 of error51.issues) { + if (issue2.code === "invalid_union" && issue2.errors.length) { + issue2.errors.map((issues) => processError({ issues })); + } else if (issue2.code === "invalid_key") { + processError({ issues: issue2.issues }); + } else if (issue2.code === "invalid_element") { + processError({ issues: issue2.issues }); + } else if (issue2.path.length === 0) { + fieldErrors._errors.push(mapper(issue2)); + } else { + let curr = fieldErrors; + let i = 0; + while (i < issue2.path.length) { + const el = issue2.path[i]; + const terminal = i === issue2.path.length - 1; + if (!terminal) { + curr[el] = curr[el] || { _errors: [] }; + } else { + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue2)); + } + curr = curr[el]; + i++; + } + } + } + }, "processError"); + processError(error50); + return fieldErrors; +} +__name(formatError, "formatError"); +function treeifyError(error50, mapper = (issue2) => issue2.message) { + const result = { errors: [] }; + const processError = /* @__PURE__ */ __name((error51, path3 = []) => { + var _a2, _b; + for (const issue2 of error51.issues) { + if (issue2.code === "invalid_union" && issue2.errors.length) { + issue2.errors.map((issues) => processError({ issues }, issue2.path)); + } else if (issue2.code === "invalid_key") { + processError({ issues: issue2.issues }, issue2.path); + } else if (issue2.code === "invalid_element") { + processError({ issues: issue2.issues }, issue2.path); + } else { + const fullpath = [...path3, ...issue2.path]; + if (fullpath.length === 0) { + result.errors.push(mapper(issue2)); + continue; + } + let curr = result; + let i = 0; + while (i < fullpath.length) { + const el = fullpath[i]; + const terminal = i === fullpath.length - 1; + if (typeof el === "string") { + curr.properties ?? (curr.properties = {}); + (_a2 = curr.properties)[el] ?? (_a2[el] = { errors: [] }); + curr = curr.properties[el]; + } else { + curr.items ?? (curr.items = []); + (_b = curr.items)[el] ?? (_b[el] = { errors: [] }); + curr = curr.items[el]; + } + if (terminal) { + curr.errors.push(mapper(issue2)); + } + i++; + } + } + } + }, "processError"); + processError(error50); + return result; +} +__name(treeifyError, "treeifyError"); +function toDotPath(_path) { + const segs = []; + const path3 = _path.map((seg) => typeof seg === "object" ? seg.key : seg); + for (const seg of path3) { + if (typeof seg === "number") + segs.push(`[${seg}]`); + else if (typeof seg === "symbol") + segs.push(`[${JSON.stringify(String(seg))}]`); + else if (/[^\w$]/.test(seg)) + segs.push(`[${JSON.stringify(seg)}]`); + else { + if (segs.length) + segs.push("."); + segs.push(seg); + } + } + return segs.join(""); +} +__name(toDotPath, "toDotPath"); +function prettifyError(error50) { + const lines = []; + const issues = [...error50.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length); + for (const issue2 of issues) { + lines.push(`\u2716 ${issue2.message}`); + if (issue2.path?.length) + lines.push(` \u2192 at ${toDotPath(issue2.path)}`); + } + return lines.join("\n"); +} +__name(prettifyError, "prettifyError"); + +// ../../node_modules/zod/v4/core/parse.js +var _parse = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx, _params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; + const result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) { + throw new $ZodAsyncError(); + } + if (result.issues.length) { + const e = new (_params?.Err ?? _Err2)(result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))); + captureStackTrace(e, _params?.callee); + throw e; + } + return result.value; +}, "_parse"); +var parse = /* @__PURE__ */ _parse($ZodRealError); +var _parseAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx, params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + if (result.issues.length) { + const e = new (params?.Err ?? _Err2)(result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))); + captureStackTrace(e, params?.callee); + throw e; + } + return result.value; +}, "_parseAsync"); +var parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError); +var _safeParse = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + const ctx = _ctx ? { ..._ctx, async: false } : { async: false }; + const result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) { + throw new $ZodAsyncError(); + } + return result.issues.length ? { + success: false, + error: new (_Err2 ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))) + } : { success: true, data: result.value }; +}, "_safeParse"); +var safeParse = /* @__PURE__ */ _safeParse($ZodRealError); +var _safeParseAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + return result.issues.length ? { + success: false, + error: new _Err2(result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))) + } : { success: true, data: result.value }; +}, "_safeParseAsync"); +var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError); +var _encode = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parse(_Err2)(schema, value, ctx); +}, "_encode"); +var encode3 = /* @__PURE__ */ _encode($ZodRealError); +var _decode = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + return _parse(_Err2)(schema, value, _ctx); +}, "_decode"); +var decode2 = /* @__PURE__ */ _decode($ZodRealError); +var _encodeAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parseAsync(_Err2)(schema, value, ctx); +}, "_encodeAsync"); +var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError); +var _decodeAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + return _parseAsync(_Err2)(schema, value, _ctx); +}, "_decodeAsync"); +var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError); +var _safeEncode = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParse(_Err2)(schema, value, ctx); +}, "_safeEncode"); +var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError); +var _safeDecode = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + return _safeParse(_Err2)(schema, value, _ctx); +}, "_safeDecode"); +var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError); +var _safeEncodeAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParseAsync(_Err2)(schema, value, ctx); +}, "_safeEncodeAsync"); +var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError); +var _safeDecodeAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + return _safeParseAsync(_Err2)(schema, value, _ctx); +}, "_safeDecodeAsync"); +var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError); + +// ../../node_modules/zod/v4/core/schemas.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/zod/v4/core/checks.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/zod/v4/core/regexes.js +var regexes_exports = {}; +__export(regexes_exports, { + base64: () => base64, + base64url: () => base64url, + bigint: () => bigint2, + boolean: () => boolean, + browserEmail: () => browserEmail, + cidrv4: () => cidrv4, + cidrv6: () => cidrv6, + cuid: () => cuid, + cuid2: () => cuid2, + date: () => date, + datetime: () => datetime, + domain: () => domain2, + duration: () => duration, + e164: () => e164, + email: () => email, + emoji: () => emoji, + extendedDuration: () => extendedDuration, + guid: () => guid, + hex: () => hex, + hostname: () => hostname, + html5Email: () => html5Email, + idnEmail: () => idnEmail, + integer: () => integer2, + ipv4: () => ipv4, + ipv6: () => ipv6, + ksuid: () => ksuid, + lowercase: () => lowercase, + mac: () => mac, + md5_base64: () => md5_base64, + md5_base64url: () => md5_base64url, + md5_hex: () => md5_hex, + nanoid: () => nanoid, + null: () => _null, + number: () => number, + rfc5322Email: () => rfc5322Email, + sha1_base64: () => sha1_base64, + sha1_base64url: () => sha1_base64url, + sha1_hex: () => sha1_hex, + sha256_base64: () => sha256_base64, + sha256_base64url: () => sha256_base64url, + sha256_hex: () => sha256_hex, + sha384_base64: () => sha384_base64, + sha384_base64url: () => sha384_base64url, + sha384_hex: () => sha384_hex, + sha512_base64: () => sha512_base64, + sha512_base64url: () => sha512_base64url, + sha512_hex: () => sha512_hex, + string: () => string, + time: () => time4, + ulid: () => ulid, + undefined: () => _undefined, + unicodeEmail: () => unicodeEmail, + uppercase: () => uppercase, + uuid: () => uuid, + uuid4: () => uuid4, + uuid6: () => uuid6, + uuid7: () => uuid7, + xid: () => xid +}); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var cuid = /^[cC][^\s-]{8,}$/; +var cuid2 = /^[0-9a-z]+$/; +var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; +var xid = /^[0-9a-vA-V]{20}$/; +var ksuid = /^[A-Za-z0-9]{27}$/; +var nanoid = /^[a-zA-Z0-9_-]{21}$/; +var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; +var extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; +var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; +var uuid = /* @__PURE__ */ __name((version5) => { + if (!version5) + return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; + return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version5}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); +}, "uuid"); +var uuid4 = /* @__PURE__ */ uuid(4); +var uuid6 = /* @__PURE__ */ uuid(6); +var uuid7 = /* @__PURE__ */ uuid(7); +var email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; +var html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; +var rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; +var unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u; +var idnEmail = unicodeEmail; +var browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; +var _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; +function emoji() { + return new RegExp(_emoji, "u"); +} +__name(emoji, "emoji"); +var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; +var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/; +var mac = /* @__PURE__ */ __name((delimiter) => { + const escapedDelim = escapeRegex(delimiter ?? ":"); + return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`); +}, "mac"); +var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; +var cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; +var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; +var base64url = /^[A-Za-z0-9_-]*$/; +var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/; +var domain2 = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/; +var e164 = /^\+[1-9]\d{6,14}$/; +var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; +var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`); +function timeSource(args) { + const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`; + const regex = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`; + return regex; +} +__name(timeSource, "timeSource"); +function time4(args) { + return new RegExp(`^${timeSource(args)}$`); +} +__name(time4, "time"); +function datetime(args) { + const time6 = timeSource({ precision: args.precision }); + const opts = ["Z"]; + if (args.local) + opts.push(""); + if (args.offset) + opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`); + const timeRegex = `${time6}(?:${opts.join("|")})`; + return new RegExp(`^${dateSource}T(?:${timeRegex})$`); +} +__name(datetime, "datetime"); +var string = /* @__PURE__ */ __name((params) => { + const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; + return new RegExp(`^${regex}$`); +}, "string"); +var bigint2 = /^-?\d+n?$/; +var integer2 = /^-?\d+$/; +var number = /^-?\d+(?:\.\d+)?$/; +var boolean = /^(?:true|false)$/i; +var _null = /^null$/i; +var _undefined = /^undefined$/i; +var lowercase = /^[^A-Z]*$/; +var uppercase = /^[^a-z]*$/; +var hex = /^[0-9a-fA-F]*$/; +function fixedBase64(bodyLength, padding) { + return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`); +} +__name(fixedBase64, "fixedBase64"); +function fixedBase64url(length) { + return new RegExp(`^[A-Za-z0-9_-]{${length}}$`); +} +__name(fixedBase64url, "fixedBase64url"); +var md5_hex = /^[0-9a-fA-F]{32}$/; +var md5_base64 = /* @__PURE__ */ fixedBase64(22, "=="); +var md5_base64url = /* @__PURE__ */ fixedBase64url(22); +var sha1_hex = /^[0-9a-fA-F]{40}$/; +var sha1_base64 = /* @__PURE__ */ fixedBase64(27, "="); +var sha1_base64url = /* @__PURE__ */ fixedBase64url(27); +var sha256_hex = /^[0-9a-fA-F]{64}$/; +var sha256_base64 = /* @__PURE__ */ fixedBase64(43, "="); +var sha256_base64url = /* @__PURE__ */ fixedBase64url(43); +var sha384_hex = /^[0-9a-fA-F]{96}$/; +var sha384_base64 = /* @__PURE__ */ fixedBase64(64, ""); +var sha384_base64url = /* @__PURE__ */ fixedBase64url(64); +var sha512_hex = /^[0-9a-fA-F]{128}$/; +var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "=="); +var sha512_base64url = /* @__PURE__ */ fixedBase64url(86); + +// ../../node_modules/zod/v4/core/checks.js +var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { + var _a2; + inst._zod ?? (inst._zod = {}); + inst._zod.def = def; + (_a2 = inst._zod).onattach ?? (_a2.onattach = []); +}); +var numericOriginMap = { + number: "number", + bigint: "bigint", + object: "date" +}; +var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => { + $ZodCheck.init(inst, def); + const origin2 = numericOriginMap[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; + if (def.value < curr) { + if (def.inclusive) + bag.maximum = def.value; + else + bag.exclusiveMaximum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value <= def.value : payload.value < def.value) { + return; + } + payload.issues.push({ + origin: origin2, + code: "too_big", + maximum: typeof def.value === "object" ? def.value.getTime() : def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => { + $ZodCheck.init(inst, def); + const origin2 = numericOriginMap[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; + if (def.value > curr) { + if (def.inclusive) + bag.minimum = def.value; + else + bag.exclusiveMinimum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value >= def.value : payload.value > def.value) { + return; + } + payload.issues.push({ + origin: origin2, + code: "too_small", + minimum: typeof def.value === "object" ? def.value.getTime() : def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.onattach.push((inst2) => { + var _a2; + (_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value); + }); + inst._zod.check = (payload) => { + if (typeof payload.value !== typeof def.value) + throw new Error("Cannot mix number and bigint in multiple_of check."); + const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0; + if (isMultiple) + return; + payload.issues.push({ + origin: typeof payload.value, + code: "not_multiple_of", + divisor: def.value, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => { + $ZodCheck.init(inst, def); + def.format = def.format || "float64"; + const isInt = def.format?.includes("int"); + const origin2 = isInt ? "int" : "number"; + const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + if (isInt) + bag.pattern = integer2; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (isInt) { + if (!Number.isInteger(input)) { + payload.issues.push({ + expected: origin2, + format: def.format, + code: "invalid_type", + continue: false, + input, + inst + }); + return; + } + if (!Number.isSafeInteger(input)) { + if (input > 0) { + payload.issues.push({ + input, + code: "too_big", + maximum: Number.MAX_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin: origin2, + inclusive: true, + continue: !def.abort + }); + } else { + payload.issues.push({ + input, + code: "too_small", + minimum: Number.MIN_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin: origin2, + inclusive: true, + continue: !def.abort + }); + } + return; + } + } + if (input < minimum) { + payload.issues.push({ + origin: "number", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "number", + input, + code: "too_big", + maximum, + inclusive: true, + inst, + continue: !def.abort + }); + } + }; +}); +var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat", (inst, def) => { + $ZodCheck.init(inst, def); + const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (input < minimum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_big", + maximum, + inclusive: true, + inst, + continue: !def.abort + }); + } + }; +}); +var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => { + var _a2; + $ZodCheck.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size <= def.maximum) + return; + payload.issues.push({ + origin: getSizableOrigin(input), + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => { + var _a2; + $ZodCheck.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size >= def.minimum) + return; + payload.issues.push({ + origin: getSizableOrigin(input), + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => { + var _a2; + $ZodCheck.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.size; + bag.maximum = def.size; + bag.size = def.size; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size === def.size) + return; + const tooBig = size > def.size; + payload.issues.push({ + origin: getSizableOrigin(input), + ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => { + var _a2; + $ZodCheck.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length <= def.maximum) + return; + const origin2 = getLengthableOrigin(input); + payload.issues.push({ + origin: origin2, + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => { + var _a2; + $ZodCheck.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length >= def.minimum) + return; + const origin2 = getLengthableOrigin(input); + payload.issues.push({ + origin: origin2, + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => { + var _a2; + $ZodCheck.init(inst, def); + (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.length; + bag.maximum = def.length; + bag.length = def.length; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length === def.length) + return; + const origin2 = getLengthableOrigin(input); + const tooBig = length > def.length; + payload.issues.push({ + origin: origin2, + ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => { + var _a2, _b; + $ZodCheck.init(inst, def); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + if (def.pattern) { + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(def.pattern); + } + }); + if (def.pattern) + (_a2 = inst._zod).check ?? (_a2.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: def.format, + input: payload.value, + ...def.pattern ? { pattern: def.pattern.toString() } : {}, + inst, + continue: !def.abort + }); + }); + else + (_b = inst._zod).check ?? (_b.check = () => { + }); +}); +var $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => { + $ZodCheckStringFormat.init(inst, def); + inst._zod.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "regex", + input: payload.value, + pattern: def.pattern.toString(), + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => { + def.pattern ?? (def.pattern = lowercase); + $ZodCheckStringFormat.init(inst, def); +}); +var $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => { + def.pattern ?? (def.pattern = uppercase); + $ZodCheckStringFormat.init(inst, def); +}); +var $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => { + $ZodCheck.init(inst, def); + const escapedRegex = escapeRegex(def.includes); + const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex); + def.pattern = pattern; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.includes(def.includes, def.position)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "includes", + includes: def.includes, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => { + $ZodCheck.init(inst, def); + const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.startsWith(def.prefix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "starts_with", + prefix: def.prefix, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => { + $ZodCheck.init(inst, def); + const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.endsWith(def.suffix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "ends_with", + suffix: def.suffix, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +function handleCheckPropertyResult(result, payload, property) { + if (result.issues.length) { + payload.issues.push(...prefixIssues(property, result.issues)); + } +} +__name(handleCheckPropertyResult, "handleCheckPropertyResult"); +var $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.check = (payload) => { + const result = def.schema._zod.run({ + value: payload.value[def.property], + issues: [] + }, {}); + if (result instanceof Promise) { + return result.then((result2) => handleCheckPropertyResult(result2, payload, def.property)); + } + handleCheckPropertyResult(result, payload, def.property); + return; + }; +}); +var $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => { + $ZodCheck.init(inst, def); + const mimeSet = new Set(def.mime); + inst._zod.onattach.push((inst2) => { + inst2._zod.bag.mime = def.mime; + }); + inst._zod.check = (payload) => { + if (mimeSet.has(payload.value.type)) + return; + payload.issues.push({ + code: "invalid_value", + values: def.mime, + input: payload.value.type, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.check = (payload) => { + payload.value = def.tx(payload.value); + }; +}); + +// ../../node_modules/zod/v4/core/doc.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var Doc = class { + static { + __name(this, "Doc"); + } + constructor(args = []) { + this.content = []; + this.indent = 0; + if (this) + this.args = args; + } + indented(fn) { + this.indent += 1; + fn(this); + this.indent -= 1; + } + write(arg) { + if (typeof arg === "function") { + arg(this, { execution: "sync" }); + arg(this, { execution: "async" }); + return; + } + const content52 = arg; + const lines = content52.split("\n").filter((x) => x); + const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length)); + const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x); + for (const line of dedented) { + this.content.push(line); + } + } + compile() { + const F = Function; + const args = this?.args; + const content52 = this?.content ?? [``]; + const lines = [...content52.map((x) => ` ${x}`)]; + return new F(...args, lines.join("\n")); + } +}; + +// ../../node_modules/zod/v4/core/versions.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var version3 = { + major: 4, + minor: 3, + patch: 6 +}; + +// ../../node_modules/zod/v4/core/schemas.js +var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { + var _a2; + inst ?? (inst = {}); + inst._zod.def = def; + inst._zod.bag = inst._zod.bag || {}; + inst._zod.version = version3; + const checks = [...inst._zod.def.checks ?? []]; + if (inst._zod.traits.has("$ZodCheck")) { + checks.unshift(inst); + } + for (const ch of checks) { + for (const fn of ch._zod.onattach) { + fn(inst); + } + } + if (checks.length === 0) { + (_a2 = inst._zod).deferred ?? (_a2.deferred = []); + inst._zod.deferred?.push(() => { + inst._zod.run = inst._zod.parse; + }); + } else { + const runChecks = /* @__PURE__ */ __name((payload, checks2, ctx) => { + let isAborted = aborted(payload); + let asyncResult; + for (const ch of checks2) { + if (ch._zod.def.when) { + const shouldRun = ch._zod.def.when(payload); + if (!shouldRun) + continue; + } else if (isAborted) { + continue; + } + const currLen = payload.issues.length; + const _ = ch._zod.check(payload); + if (_ instanceof Promise && ctx?.async === false) { + throw new $ZodAsyncError(); + } + if (asyncResult || _ instanceof Promise) { + asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { + await _; + const nextLen = payload.issues.length; + if (nextLen === currLen) + return; + if (!isAborted) + isAborted = aborted(payload, currLen); + }); + } else { + const nextLen = payload.issues.length; + if (nextLen === currLen) + continue; + if (!isAborted) + isAborted = aborted(payload, currLen); + } + } + if (asyncResult) { + return asyncResult.then(() => { + return payload; + }); + } + return payload; + }, "runChecks"); + const handleCanaryResult = /* @__PURE__ */ __name((canary, payload, ctx) => { + if (aborted(canary)) { + canary.aborted = true; + return canary; + } + const checkResult = runChecks(payload, checks, ctx); + if (checkResult instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx)); + } + return inst._zod.parse(checkResult, ctx); + }, "handleCanaryResult"); + inst._zod.run = (payload, ctx) => { + if (ctx.skipChecks) { + return inst._zod.parse(payload, ctx); + } + if (ctx.direction === "backward") { + const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true }); + if (canary instanceof Promise) { + return canary.then((canary2) => { + return handleCanaryResult(canary2, payload, ctx); + }); + } + return handleCanaryResult(canary, payload, ctx); + } + const result = inst._zod.parse(payload, ctx); + if (result instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return result.then((result2) => runChecks(result2, checks, ctx)); + } + return runChecks(result, checks, ctx); + }; + } + defineLazy(inst, "~standard", () => ({ + validate: /* @__PURE__ */ __name((value) => { + try { + const r = safeParse(inst, value); + return r.success ? { value: r.data } : { issues: r.error?.issues }; + } catch (_) { + return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues }); + } + }, "validate"), + vendor: "zod", + version: 1 + })); +}); +var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag); + inst._zod.parse = (payload, _) => { + if (def.coerce) + try { + payload.value = String(payload.value); + } catch (_2) { + } + if (typeof payload.value === "string") + return payload; + payload.issues.push({ + expected: "string", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; +}); +var $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => { + $ZodCheckStringFormat.init(inst, def); + $ZodString.init(inst, def); +}); +var $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => { + def.pattern ?? (def.pattern = guid); + $ZodStringFormat.init(inst, def); +}); +var $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => { + if (def.version) { + const versionMap = { + v1: 1, + v2: 2, + v3: 3, + v4: 4, + v5: 5, + v6: 6, + v7: 7, + v8: 8 + }; + const v2 = versionMap[def.version]; + if (v2 === void 0) + throw new Error(`Invalid UUID version: "${def.version}"`); + def.pattern ?? (def.pattern = uuid(v2)); + } else + def.pattern ?? (def.pattern = uuid()); + $ZodStringFormat.init(inst, def); +}); +var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => { + def.pattern ?? (def.pattern = email); + $ZodStringFormat.init(inst, def); +}); +var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + try { + const trimmed = payload.value.trim(); + const url2 = new URL(trimmed); + if (def.hostname) { + def.hostname.lastIndex = 0; + if (!def.hostname.test(url2.hostname)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid hostname", + pattern: def.hostname.source, + input: payload.value, + inst, + continue: !def.abort + }); + } + } + if (def.protocol) { + def.protocol.lastIndex = 0; + if (!def.protocol.test(url2.protocol.endsWith(":") ? url2.protocol.slice(0, -1) : url2.protocol)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid protocol", + pattern: def.protocol.source, + input: payload.value, + inst, + continue: !def.abort + }); + } + } + if (def.normalize) { + payload.value = url2.href; + } else { + payload.value = trimmed; + } + return; + } catch (_) { + payload.issues.push({ + code: "invalid_format", + format: "url", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; +}); +var $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => { + def.pattern ?? (def.pattern = emoji()); + $ZodStringFormat.init(inst, def); +}); +var $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => { + def.pattern ?? (def.pattern = nanoid); + $ZodStringFormat.init(inst, def); +}); +var $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => { + def.pattern ?? (def.pattern = cuid); + $ZodStringFormat.init(inst, def); +}); +var $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => { + def.pattern ?? (def.pattern = cuid2); + $ZodStringFormat.init(inst, def); +}); +var $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => { + def.pattern ?? (def.pattern = ulid); + $ZodStringFormat.init(inst, def); +}); +var $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => { + def.pattern ?? (def.pattern = xid); + $ZodStringFormat.init(inst, def); +}); +var $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => { + def.pattern ?? (def.pattern = ksuid); + $ZodStringFormat.init(inst, def); +}); +var $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => { + def.pattern ?? (def.pattern = datetime(def)); + $ZodStringFormat.init(inst, def); +}); +var $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => { + def.pattern ?? (def.pattern = date); + $ZodStringFormat.init(inst, def); +}); +var $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => { + def.pattern ?? (def.pattern = time4(def)); + $ZodStringFormat.init(inst, def); +}); +var $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => { + def.pattern ?? (def.pattern = duration); + $ZodStringFormat.init(inst, def); +}); +var $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => { + def.pattern ?? (def.pattern = ipv4); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `ipv4`; +}); +var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => { + def.pattern ?? (def.pattern = ipv6); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `ipv6`; + inst._zod.check = (payload) => { + try { + new URL(`http://[${payload.value}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "ipv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; +}); +var $ZodMAC = /* @__PURE__ */ $constructor("$ZodMAC", (inst, def) => { + def.pattern ?? (def.pattern = mac(def.delimiter)); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `mac`; +}); +var $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => { + def.pattern ?? (def.pattern = cidrv4); + $ZodStringFormat.init(inst, def); +}); +var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => { + def.pattern ?? (def.pattern = cidrv6); + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + const parts = payload.value.split("/"); + try { + if (parts.length !== 2) + throw new Error(); + const [address, prefix] = parts; + if (!prefix) + throw new Error(); + const prefixNum = Number(prefix); + if (`${prefixNum}` !== prefix) + throw new Error(); + if (prefixNum < 0 || prefixNum > 128) + throw new Error(); + new URL(`http://[${address}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "cidrv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; +}); +function isValidBase64(data) { + if (data === "") + return true; + if (data.length % 4 !== 0) + return false; + try { + atob(data); + return true; + } catch { + return false; + } +} +__name(isValidBase64, "isValidBase64"); +var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => { + def.pattern ?? (def.pattern = base64); + $ZodStringFormat.init(inst, def); + inst._zod.bag.contentEncoding = "base64"; + inst._zod.check = (payload) => { + if (isValidBase64(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64", + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +function isValidBase64URL(data) { + if (!base64url.test(data)) + return false; + const base643 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/"); + const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "="); + return isValidBase64(padded); +} +__name(isValidBase64URL, "isValidBase64URL"); +var $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => { + def.pattern ?? (def.pattern = base64url); + $ZodStringFormat.init(inst, def); + inst._zod.bag.contentEncoding = "base64url"; + inst._zod.check = (payload) => { + if (isValidBase64URL(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64url", + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => { + def.pattern ?? (def.pattern = e164); + $ZodStringFormat.init(inst, def); +}); +function isValidJWT(token, algorithm = null) { + try { + const tokensParts = token.split("."); + if (tokensParts.length !== 3) + return false; + const [header] = tokensParts; + if (!header) + return false; + const parsedHeader = JSON.parse(atob(header)); + if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") + return false; + if (!parsedHeader.alg) + return false; + if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) + return false; + return true; + } catch { + return false; + } +} +__name(isValidJWT, "isValidJWT"); +var $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + if (isValidJWT(payload.value, def.alg)) + return; + payload.issues.push({ + code: "invalid_format", + format: "jwt", + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + if (def.fn(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: def.format, + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = inst._zod.bag.pattern ?? number; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Number(payload.value); + } catch (_) { + } + const input = payload.value; + if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) { + return payload; + } + const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0; + payload.issues.push({ + expected: "number", + code: "invalid_type", + input, + inst, + ...received ? { received } : {} + }); + return payload; + }; +}); +var $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst, def) => { + $ZodCheckNumberFormat.init(inst, def); + $ZodNumber.init(inst, def); +}); +var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = boolean; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Boolean(payload.value); + } catch (_) { + } + const input = payload.value; + if (typeof input === "boolean") + return payload; + payload.issues.push({ + expected: "boolean", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = bigint2; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = BigInt(payload.value); + } catch (_) { + } + if (typeof payload.value === "bigint") + return payload; + payload.issues.push({ + expected: "bigint", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; +}); +var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, def) => { + $ZodCheckBigIntFormat.init(inst, def); + $ZodBigInt.init(inst, def); +}); +var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "symbol") + return payload; + payload.issues.push({ + expected: "symbol", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = _undefined; + inst._zod.values = /* @__PURE__ */ new Set([void 0]); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "undefined", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = _null; + inst._zod.values = /* @__PURE__ */ new Set([null]); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input === null) + return payload; + payload.issues.push({ + expected: "null", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload) => payload; +}); +var $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload) => payload; +}); +var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + payload.issues.push({ + expected: "never", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; +}); +var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "void", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) { + try { + payload.value = new Date(payload.value); + } catch (_err) { + } + } + const input = payload.value; + const isDate2 = input instanceof Date; + const isValidDate = isDate2 && !Number.isNaN(input.getTime()); + if (isValidDate) + return payload; + payload.issues.push({ + expected: "date", + code: "invalid_type", + input, + ...isDate2 ? { received: "Invalid Date" } : {}, + inst + }); + return payload; + }; +}); +function handleArrayResult(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues(index, result.issues)); + } + final.value[index] = result.value; +} +__name(handleArrayResult, "handleArrayResult"); +var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + expected: "array", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = Array(input.length); + const proms = []; + for (let i = 0; i < input.length; i++) { + const item = input[i]; + const result = def.element._zod.run({ + value: item, + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleArrayResult(result2, payload, i))); + } else { + handleArrayResult(result, payload, i); + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; +}); +function handlePropertyResult(result, final, key, input, isOptionalOut) { + if (result.issues.length) { + if (isOptionalOut && !(key in input)) { + return; + } + final.issues.push(...prefixIssues(key, result.issues)); + } + if (result.value === void 0) { + if (key in input) { + final.value[key] = void 0; + } + } else { + final.value[key] = result.value; + } +} +__name(handlePropertyResult, "handlePropertyResult"); +function normalizeDef(def) { + const keys = Object.keys(def.shape); + for (const k of keys) { + if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) { + throw new Error(`Invalid element at key "${k}": expected a Zod schema`); + } + } + const okeys = optionalKeys(def.shape); + return { + ...def, + keys, + keySet: new Set(keys), + numKeys: keys.length, + optionalKeys: new Set(okeys) + }; +} +__name(normalizeDef, "normalizeDef"); +function handleCatchall(proms, input, payload, ctx, def, inst) { + const unrecognized = []; + const keySet = def.keySet; + const _catchall = def.catchall._zod; + const t8 = _catchall.def.type; + const isOptionalOut = _catchall.optout === "optional"; + for (const key in input) { + if (keySet.has(key)) + continue; + if (t8 === "never") { + unrecognized.push(key); + continue; + } + const r = _catchall.run({ value: input[key], issues: [] }, ctx); + if (r instanceof Promise) { + proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut))); + } else { + handlePropertyResult(r, payload, key, input, isOptionalOut); + } + } + if (unrecognized.length) { + payload.issues.push({ + code: "unrecognized_keys", + keys: unrecognized, + input, + inst + }); + } + if (!proms.length) + return payload; + return Promise.all(proms).then(() => { + return payload; + }); +} +__name(handleCatchall, "handleCatchall"); +var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => { + $ZodType.init(inst, def); + const desc2 = Object.getOwnPropertyDescriptor(def, "shape"); + if (!desc2?.get) { + const sh = def.shape; + Object.defineProperty(def, "shape", { + get: /* @__PURE__ */ __name(() => { + const newSh = { ...sh }; + Object.defineProperty(def, "shape", { + value: newSh + }); + return newSh; + }, "get") + }); + } + const _normalized = cached(() => normalizeDef(def)); + defineLazy(inst._zod, "propValues", () => { + const shape = def.shape; + const propValues = {}; + for (const key in shape) { + const field = shape[key]._zod; + if (field.values) { + propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set()); + for (const v2 of field.values) + propValues[key].add(v2); + } + } + return propValues; + }); + const isObject5 = isObject3; + const catchall = def.catchall; + let value; + inst._zod.parse = (payload, ctx) => { + value ?? (value = _normalized.value); + const input = payload.value; + if (!isObject5(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = {}; + const proms = []; + const shape = value.shape; + for (const key of value.keys) { + const el = shape[key]; + const isOptionalOut = el._zod.optout === "optional"; + const r = el._zod.run({ value: input[key], issues: [] }, ctx); + if (r instanceof Promise) { + proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut))); + } else { + handlePropertyResult(r, payload, key, input, isOptionalOut); + } + } + if (!catchall) { + return proms.length ? Promise.all(proms).then(() => payload) : payload; + } + return handleCatchall(proms, input, payload, ctx, _normalized.value, inst); + }; +}); +var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => { + $ZodObject.init(inst, def); + const superParse = inst._zod.parse; + const _normalized = cached(() => normalizeDef(def)); + const generateFastpass = /* @__PURE__ */ __name((shape) => { + const doc = new Doc(["shape", "payload", "ctx"]); + const normalized = _normalized.value; + const parseStr = /* @__PURE__ */ __name((key) => { + const k = esc(key); + return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`; + }, "parseStr"); + doc.write(`const input = payload.value;`); + const ids = /* @__PURE__ */ Object.create(null); + let counter = 0; + for (const key of normalized.keys) { + ids[key] = `key_${counter++}`; + } + doc.write(`const newResult = {};`); + for (const key of normalized.keys) { + const id = ids[key]; + const k = esc(key); + const schema = shape[key]; + const isOptionalOut = schema?._zod?.optout === "optional"; + doc.write(`const ${id} = ${parseStr(key)};`); + if (isOptionalOut) { + doc.write(` + if (${id}.issues.length) { + if (${k} in input) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k}, ...iss.path] : [${k}] + }))); + } + } + + if (${id}.value === undefined) { + if (${k} in input) { + newResult[${k}] = undefined; + } + } else { + newResult[${k}] = ${id}.value; + } + + `); + } else { + doc.write(` + if (${id}.issues.length) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k}, ...iss.path] : [${k}] + }))); + } + + if (${id}.value === undefined) { + if (${k} in input) { + newResult[${k}] = undefined; + } + } else { + newResult[${k}] = ${id}.value; + } + + `); + } + } + doc.write(`payload.value = newResult;`); + doc.write(`return payload;`); + const fn = doc.compile(); + return (payload, ctx) => fn(shape, payload, ctx); + }, "generateFastpass"); + let fastpass; + const isObject5 = isObject3; + const jit = !globalConfig.jitless; + const allowsEval2 = allowsEval; + const fastEnabled = jit && allowsEval2.value; + const catchall = def.catchall; + let value; + inst._zod.parse = (payload, ctx) => { + value ?? (value = _normalized.value); + const input = payload.value; + if (!isObject5(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) { + if (!fastpass) + fastpass = generateFastpass(def.shape); + payload = fastpass(payload, ctx); + if (!catchall) + return payload; + return handleCatchall([], input, payload, ctx, value, inst); + } + return superParse(payload, ctx); + }; +}); +function handleUnionResults(results, final, inst, ctx) { + for (const result of results) { + if (result.issues.length === 0) { + final.value = result.value; + return final; + } + } + const nonaborted = results.filter((r) => !aborted(r)); + if (nonaborted.length === 1) { + final.value = nonaborted[0].value; + return nonaborted[0]; + } + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))) + }); + return final; +} +__name(handleUnionResults, "handleUnionResults"); +var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0); + defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0); + defineLazy(inst._zod, "values", () => { + if (def.options.every((o) => o._zod.values)) { + return new Set(def.options.flatMap((option) => Array.from(option._zod.values))); + } + return void 0; + }); + defineLazy(inst._zod, "pattern", () => { + if (def.options.every((o) => o._zod.pattern)) { + const patterns = def.options.map((o) => o._zod.pattern); + return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`); + } + return void 0; + }); + const single = def.options.length === 1; + const first = def.options[0]._zod.run; + inst._zod.parse = (payload, ctx) => { + if (single) { + return first(payload, ctx); + } + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + if (result.issues.length === 0) + return result; + results.push(result); + } + } + if (!async) + return handleUnionResults(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleUnionResults(results2, payload, inst, ctx); + }); + }; +}); +function handleExclusiveUnionResults(results, final, inst, ctx) { + const successes = results.filter((r) => r.issues.length === 0); + if (successes.length === 1) { + final.value = successes[0].value; + return final; + } + if (successes.length === 0) { + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))) + }); + } else { + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: [], + inclusive: false + }); + } + return final; +} +__name(handleExclusiveUnionResults, "handleExclusiveUnionResults"); +var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => { + $ZodUnion.init(inst, def); + def.inclusive = false; + const single = def.options.length === 1; + const first = def.options[0]._zod.run; + inst._zod.parse = (payload, ctx) => { + if (single) { + return first(payload, ctx); + } + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + results.push(result); + } + } + if (!async) + return handleExclusiveUnionResults(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleExclusiveUnionResults(results2, payload, inst, ctx); + }); + }; +}); +var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => { + def.inclusive = false; + $ZodUnion.init(inst, def); + const _super = inst._zod.parse; + defineLazy(inst._zod, "propValues", () => { + const propValues = {}; + for (const option of def.options) { + const pv = option._zod.propValues; + if (!pv || Object.keys(pv).length === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`); + for (const [k, v2] of Object.entries(pv)) { + if (!propValues[k]) + propValues[k] = /* @__PURE__ */ new Set(); + for (const val of v2) { + propValues[k].add(val); + } + } + } + return propValues; + }); + const disc = cached(() => { + const opts = def.options; + const map2 = /* @__PURE__ */ new Map(); + for (const o of opts) { + const values = o._zod.propValues?.[def.discriminator]; + if (!values || values.size === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`); + for (const v2 of values) { + if (map2.has(v2)) { + throw new Error(`Duplicate discriminator value "${String(v2)}"`); + } + map2.set(v2, o); + } + } + return map2; + }); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isObject3(input)) { + payload.issues.push({ + code: "invalid_type", + expected: "object", + input, + inst + }); + return payload; + } + const opt = disc.value.get(input?.[def.discriminator]); + if (opt) { + return opt._zod.run(payload, ctx); + } + if (def.unionFallback) { + return _super(payload, ctx); + } + payload.issues.push({ + code: "invalid_union", + errors: [], + note: "No matching discriminator", + discriminator: def.discriminator, + input, + path: [def.discriminator], + inst + }); + return payload; + }; +}); +var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + const left = def.left._zod.run({ value: input, issues: [] }, ctx); + const right = def.right._zod.run({ value: input, issues: [] }, ctx); + const async = left instanceof Promise || right instanceof Promise; + if (async) { + return Promise.all([left, right]).then(([left2, right2]) => { + return handleIntersectionResults(payload, left2, right2); + }); + } + return handleIntersectionResults(payload, left, right); + }; +}); +function mergeValues(a, b) { + if (a === b) { + return { valid: true, data: a }; + } + if (a instanceof Date && b instanceof Date && +a === +b) { + return { valid: true, data: a }; + } + if (isPlainObject2(a) && isPlainObject2(b)) { + const bKeys = Object.keys(b); + const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1); + const newObj = { ...a, ...b }; + for (const key of sharedKeys) { + const sharedValue = mergeValues(a[key], b[key]); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [key, ...sharedValue.mergeErrorPath] + }; + } + newObj[key] = sharedValue.data; + } + return { valid: true, data: newObj }; + } + if (Array.isArray(a) && Array.isArray(b)) { + if (a.length !== b.length) { + return { valid: false, mergeErrorPath: [] }; + } + const newArray = []; + for (let index = 0; index < a.length; index++) { + const itemA = a[index]; + const itemB = b[index]; + const sharedValue = mergeValues(itemA, itemB); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [index, ...sharedValue.mergeErrorPath] + }; + } + newArray.push(sharedValue.data); + } + return { valid: true, data: newArray }; + } + return { valid: false, mergeErrorPath: [] }; +} +__name(mergeValues, "mergeValues"); +function handleIntersectionResults(result, left, right) { + const unrecKeys = /* @__PURE__ */ new Map(); + let unrecIssue; + for (const iss of left.issues) { + if (iss.code === "unrecognized_keys") { + unrecIssue ?? (unrecIssue = iss); + for (const k of iss.keys) { + if (!unrecKeys.has(k)) + unrecKeys.set(k, {}); + unrecKeys.get(k).l = true; + } + } else { + result.issues.push(iss); + } + } + for (const iss of right.issues) { + if (iss.code === "unrecognized_keys") { + for (const k of iss.keys) { + if (!unrecKeys.has(k)) + unrecKeys.set(k, {}); + unrecKeys.get(k).r = true; + } + } else { + result.issues.push(iss); + } + } + const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k); + if (bothKeys.length && unrecIssue) { + result.issues.push({ ...unrecIssue, keys: bothKeys }); + } + if (aborted(result)) + return result; + const merged = mergeValues(left.value, right.value); + if (!merged.valid) { + throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`); + } + result.value = merged.data; + return result; +} +__name(handleIntersectionResults, "handleIntersectionResults"); +var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => { + $ZodType.init(inst, def); + const items = def.items; + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + input, + inst, + expected: "tuple", + code: "invalid_type" + }); + return payload; + } + payload.value = []; + const proms = []; + const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional"); + const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex; + if (!def.rest) { + const tooBig = input.length > items.length; + const tooSmall = input.length < optStart - 1; + if (tooBig || tooSmall) { + payload.issues.push({ + ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length }, + input, + inst, + origin: "array" + }); + return payload; + } + } + let i = -1; + for (const item of items) { + i++; + if (i >= input.length) { + if (i >= optStart) + continue; + } + const result = item._zod.run({ + value: input[i], + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleTupleResult(result2, payload, i))); + } else { + handleTupleResult(result, payload, i); + } + } + if (def.rest) { + const rest = input.slice(items.length); + for (const el of rest) { + i++; + const result = def.rest._zod.run({ + value: el, + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleTupleResult(result2, payload, i))); + } else { + handleTupleResult(result, payload, i); + } + } + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; +}); +function handleTupleResult(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues(index, result.issues)); + } + final.value[index] = result.value; +} +__name(handleTupleResult, "handleTupleResult"); +var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isPlainObject2(input)) { + payload.issues.push({ + expected: "record", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + const values = def.keyType._zod.values; + if (values) { + payload.value = {}; + const recordKeys = /* @__PURE__ */ new Set(); + for (const key of values) { + if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") { + recordKeys.add(typeof key === "number" ? key.toString() : key); + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues(key, result2.issues)); + } + payload.value[key] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues(key, result.issues)); + } + payload.value[key] = result.value; + } + } + } + let unrecognized; + for (const key in input) { + if (!recordKeys.has(key)) { + unrecognized = unrecognized ?? []; + unrecognized.push(key); + } + } + if (unrecognized && unrecognized.length > 0) { + payload.issues.push({ + code: "unrecognized_keys", + input, + inst, + keys: unrecognized + }); + } + } else { + payload.value = {}; + for (const key of Reflect.ownKeys(input)) { + if (key === "__proto__") + continue; + let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + if (keyResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + const checkNumericKey = typeof key === "string" && number.test(key) && keyResult.issues.length; + if (checkNumericKey) { + const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx); + if (retryResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + if (retryResult.issues.length === 0) { + keyResult = retryResult; + } + } + if (keyResult.issues.length) { + if (def.mode === "loose") { + payload.value[key] = input[key]; + } else { + payload.issues.push({ + code: "invalid_key", + origin: "record", + issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config2())), + input: key, + path: [key], + inst + }); + } + continue; + } + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues(key, result2.issues)); + } + payload.value[keyResult.value] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues(key, result.issues)); + } + payload.value[keyResult.value] = result.value; + } + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; +}); +var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Map)) { + payload.issues.push({ + expected: "map", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Map(); + for (const [key, value] of input) { + const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx); + if (keyResult instanceof Promise || valueResult instanceof Promise) { + proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => { + handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx); + })); + } else { + handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx); + } + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; +}); +function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) { + if (keyResult.issues.length) { + if (propertyKeyTypes.has(typeof key)) { + final.issues.push(...prefixIssues(key, keyResult.issues)); + } else { + final.issues.push({ + code: "invalid_key", + origin: "map", + input, + inst, + issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config2())) + }); + } + } + if (valueResult.issues.length) { + if (propertyKeyTypes.has(typeof key)) { + final.issues.push(...prefixIssues(key, valueResult.issues)); + } else { + final.issues.push({ + origin: "map", + code: "invalid_element", + input, + inst, + key, + issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config2())) + }); + } + } + final.value.set(keyResult.value, valueResult.value); +} +__name(handleMapResult, "handleMapResult"); +var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Set)) { + payload.issues.push({ + input, + inst, + expected: "set", + code: "invalid_type" + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Set(); + for (const item of input) { + const result = def.valueType._zod.run({ value: item, issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleSetResult(result2, payload))); + } else + handleSetResult(result, payload); + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; +}); +function handleSetResult(result, final) { + if (result.issues.length) { + final.issues.push(...result.issues); + } + final.value.add(result.value); +} +__name(handleSetResult, "handleSetResult"); +var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => { + $ZodType.init(inst, def); + const values = getEnumValues(def.entries); + const valuesSet = new Set(values); + inst._zod.values = valuesSet; + inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (valuesSet.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values, + input, + inst + }); + return payload; + }; +}); +var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => { + $ZodType.init(inst, def); + if (def.values.length === 0) { + throw new Error("Cannot create literal schema with no valid values"); + } + const values = new Set(def.values); + inst._zod.values = values; + inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (values.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values: def.values, + input, + inst + }); + return payload; + }; +}); +var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input instanceof File) + return payload; + payload.issues.push({ + expected: "file", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } + const _out = def.transform(payload.value, payload); + if (ctx.async) { + const output = _out instanceof Promise ? _out : Promise.resolve(_out); + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + if (_out instanceof Promise) { + throw new $ZodAsyncError(); + } + payload.value = _out; + return payload; + }; +}); +function handleOptionalResult(result, input) { + if (result.issues.length && input === void 0) { + return { issues: [], value: void 0 }; + } + return result; +} +__name(handleOptionalResult, "handleOptionalResult"); +var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + defineLazy(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0; + }); + defineLazy(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (def.innerType._zod.optin === "optional") { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) + return result.then((r) => handleOptionalResult(r, payload.value)); + return handleOptionalResult(result, payload.value); + } + if (payload.value === void 0) { + return payload; + } + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (inst, def) => { + $ZodOptional.init(inst, def); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern); + inst._zod.parse = (payload, ctx) => { + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0; + }); + defineLazy(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (payload.value === null) + return payload; + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + return payload; + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleDefaultResult(result2, def)); + } + return handleDefaultResult(result, def); + }; +}); +function handleDefaultResult(payload, def) { + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return payload; +} +__name(handleDefaultResult, "handleDefaultResult"); +var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => { + const v2 = def.innerType._zod.values; + return v2 ? new Set([...v2].filter((x) => x !== void 0)) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleNonOptionalResult(result2, inst)); + } + return handleNonOptionalResult(result, inst); + }; +}); +function handleNonOptionalResult(payload, inst) { + if (!payload.issues.length && payload.value === void 0) { + payload.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: payload.value, + inst + }); + } + return payload; +} +__name(handleNonOptionalResult, "handleNonOptionalResult"); +var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError("ZodSuccess"); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.issues.length === 0; + return payload; + }); + } + payload.value = result.issues.length === 0; + return payload; + }; +}); +var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.value; + if (result2.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config2())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }); + } + payload.value = result.value; + if (result.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config2())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }; +}); +var $ZodNaN = /* @__PURE__ */ $constructor("$ZodNaN", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + expected: "nan", + code: "invalid_type" + }); + return payload; + } + return payload; + }; +}); +var $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => def.in._zod.values); + defineLazy(inst._zod, "optin", () => def.in._zod.optin); + defineLazy(inst._zod, "optout", () => def.out._zod.optout); + defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handlePipeResult(right2, def.in, ctx)); + } + return handlePipeResult(right, def.in, ctx); + } + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handlePipeResult(left2, def.out, ctx)); + } + return handlePipeResult(left, def.out, ctx); + }; +}); +function handlePipeResult(left, next, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return next._zod.run({ value: left.value, issues: left.issues }, ctx); +} +__name(handlePipeResult, "handlePipeResult"); +var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => def.in._zod.values); + defineLazy(inst._zod, "optin", () => def.in._zod.optin); + defineLazy(inst._zod, "optout", () => def.out._zod.optout); + defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handleCodecAResult(left2, def, ctx)); + } + return handleCodecAResult(left, def, ctx); + } else { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handleCodecAResult(right2, def, ctx)); + } + return handleCodecAResult(right, def, ctx); + } + }; +}); +function handleCodecAResult(result, def, ctx) { + if (result.issues.length) { + result.aborted = true; + return result; + } + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const transformed = def.transform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx)); + } + return handleCodecTxResult(result, transformed, def.out, ctx); + } else { + const transformed = def.reverseTransform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx)); + } + return handleCodecTxResult(result, transformed, def.in, ctx); + } +} +__name(handleCodecAResult, "handleCodecAResult"); +function handleCodecTxResult(left, value, nextSchema, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return nextSchema._zod.run({ value, issues: left.issues }, ctx); +} +__name(handleCodecTxResult, "handleCodecTxResult"); +var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin); + defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then(handleReadonlyResult); + } + return handleReadonlyResult(result); + }; +}); +function handleReadonlyResult(payload) { + payload.value = Object.freeze(payload.value); + return payload; +} +__name(handleReadonlyResult, "handleReadonlyResult"); +var $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (inst, def) => { + $ZodType.init(inst, def); + const regexParts = []; + for (const part of def.parts) { + if (typeof part === "object" && part !== null) { + if (!part._zod.pattern) { + throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`); + } + const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern; + if (!source) + throw new Error(`Invalid template literal part: ${part._zod.traits}`); + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + regexParts.push(source.slice(start, end)); + } else if (part === null || primitiveTypes.has(typeof part)) { + regexParts.push(escapeRegex(`${part}`)); + } else { + throw new Error(`Invalid template literal part: ${part}`); + } + } + inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "string") { + payload.issues.push({ + input: payload.value, + inst, + expected: "string", + code: "invalid_type" + }); + return payload; + } + inst._zod.pattern.lastIndex = 0; + if (!inst._zod.pattern.test(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + code: "invalid_format", + format: def.format ?? "template_literal", + pattern: inst._zod.pattern.source + }); + return payload; + } + return payload; + }; +}); +var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => { + $ZodType.init(inst, def); + inst._def = def; + inst._zod.def = def; + inst.implement = (func) => { + if (typeof func !== "function") { + throw new Error("implement() must be called with a function"); + } + return function(...args) { + const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args; + const result = Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return parse(inst._def.output, result); + } + return result; + }; + }; + inst.implementAsync = (func) => { + if (typeof func !== "function") { + throw new Error("implementAsync() must be called with a function"); + } + return async function(...args) { + const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args; + const result = await Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return await parseAsync(inst._def.output, result); + } + return result; + }; + }; + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "function") { + payload.issues.push({ + code: "invalid_type", + expected: "function", + input: payload.value, + inst + }); + return payload; + } + const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise"; + if (hasPromiseOutput) { + payload.value = inst.implementAsync(payload.value); + } else { + payload.value = inst.implement(payload.value); + } + return payload; + }; + inst.input = (...args) => { + const F = inst.constructor; + if (Array.isArray(args[0])) { + return new F({ + type: "function", + input: new $ZodTuple({ + type: "tuple", + items: args[0], + rest: args[1] + }), + output: inst._def.output + }); + } + return new F({ + type: "function", + input: args[0], + output: inst._def.output + }); + }; + inst.output = (output) => { + const F = inst.constructor; + return new F({ + type: "function", + input: inst._def.input, + output + }); + }; + return inst; +}); +var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx)); + }; +}); +var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "innerType", () => def.getter()); + defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern); + defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues); + defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0); + defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0); + inst._zod.parse = (payload, ctx) => { + const inner = inst._zod.innerType; + return inner._zod.run(payload, ctx); + }; +}); +var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => { + $ZodCheck.init(inst, def); + $ZodType.init(inst, def); + inst._zod.parse = (payload, _) => { + return payload; + }; + inst._zod.check = (payload) => { + const input = payload.value; + const r = def.fn(input); + if (r instanceof Promise) { + return r.then((r2) => handleRefineResult(r2, payload, input, inst)); + } + handleRefineResult(r, payload, input, inst); + return; + }; +}); +function handleRefineResult(result, payload, input, inst) { + if (!result) { + const _iss = { + code: "custom", + input, + inst, + // incorporates params.error into issue reporting + path: [...inst._zod.def.path ?? []], + // incorporates params.error into issue reporting + continue: !inst._zod.def.abort + // params: inst._zod.def.params, + }; + if (inst._zod.def.params) + _iss.params = inst._zod.def.params; + payload.issues.push(issue(_iss)); + } +} +__name(handleRefineResult, "handleRefineResult"); + +// ../../node_modules/zod/v4/locales/index.js +var locales_exports = {}; +__export(locales_exports, { + ar: () => ar_default, + az: () => az_default, + be: () => be_default, + bg: () => bg_default, + ca: () => ca_default, + cs: () => cs_default, + da: () => da_default, + de: () => de_default, + en: () => en_default, + eo: () => eo_default, + es: () => es_default, + fa: () => fa_default, + fi: () => fi_default, + fr: () => fr_default, + frCA: () => fr_CA_default, + he: () => he_default, + hu: () => hu_default, + hy: () => hy_default, + id: () => id_default, + is: () => is_default, + it: () => it_default, + ja: () => ja_default, + ka: () => ka_default, + kh: () => kh_default, + km: () => km_default, + ko: () => ko_default, + lt: () => lt_default, + mk: () => mk_default, + ms: () => ms_default, + nl: () => nl_default, + no: () => no_default, + ota: () => ota_default, + pl: () => pl_default, + ps: () => ps_default, + pt: () => pt_default, + ru: () => ru_default, + sl: () => sl_default, + sv: () => sv_default, + ta: () => ta_default, + th: () => th_default, + tr: () => tr_default, + ua: () => ua_default, + uk: () => uk_default, + ur: () => ur_default, + uz: () => uz_default, + vi: () => vi_default, + yo: () => yo_default, + zhCN: () => zh_CN_default, + zhTW: () => zh_TW_default +}); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/zod/v4/locales/ar.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error3 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + file: { unit: "\u0628\u0627\u064A\u062A", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + array: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + set: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0645\u062F\u062E\u0644", + email: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A", + url: "\u0631\u0627\u0628\u0637", + emoji: "\u0625\u064A\u0645\u0648\u062C\u064A", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + date: "\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + time: "\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + duration: "\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + ipv4: "\u0639\u0646\u0648\u0627\u0646 IPv4", + ipv6: "\u0639\u0646\u0648\u0627\u0646 IPv6", + cidrv4: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4", + cidrv6: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6", + base64: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded", + base64url: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded", + json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON", + e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164", + jwt: "JWT", + template_literal: "\u0645\u062F\u062E\u0644" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${issue2.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; + } + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`; + return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue2.prefix}"`; + if (_issue.format === "ends_with") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`; + } + case "not_multiple_of": + return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue2.divisor}`; + case "unrecognized_keys": + return `\u0645\u0639\u0631\u0641${issue2.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue2.keys.length > 1 ? "\u0629" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; + case "invalid_key": + return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; + case "invalid_union": + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; + case "invalid_element": + return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; + default: + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; + } + }; +}, "error"); +function ar_default() { + return { + localeError: error3() + }; +} +__name(ar_default, "default"); + +// ../../node_modules/zod/v4/locales/az.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error4 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "element", verb: "olmal\u0131d\u0131r" }, + set: { unit: "element", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${issue2.expected}, daxil olan ${received}`; + } + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${expected}, daxil olan ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive(issue2.values[0])}`; + return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`; + if (_issue.format === "ends_with") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.suffix}" il\u0259 bitm\u0259lidir`; + if (_issue.format === "includes") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.includes}" daxil olmal\u0131d\u0131r`; + if (_issue.format === "regex") + return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`; + return `Yanl\u0131\u015F ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Yanl\u0131\u015F \u0259d\u0259d: ${issue2.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; + case "unrecognized_keys": + return `Tan\u0131nmayan a\xE7ar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; + case "invalid_union": + return "Yanl\u0131\u015F d\u0259y\u0259r"; + case "invalid_element": + return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; + default: + return `Yanl\u0131\u015F d\u0259y\u0259r`; + } + }; +}, "error"); +function az_default() { + return { + localeError: error4() + }; +} +__name(az_default, "default"); + +// ../../node_modules/zod/v4/locales/be.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function getBelarusianPlural(count4, one, few, many) { + const absCount = Math.abs(count4); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; + } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; +} +__name(getBelarusianPlural, "getBelarusianPlural"); +var error5 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0456\u043C\u0432\u0430\u043B", + few: "\u0441\u0456\u043C\u0432\u0430\u043B\u044B", + many: "\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u044B", + many: "\u0431\u0430\u0439\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0443\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0430\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0447\u0430\u0441", + duration: "ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0430\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0430\u0441", + cidrv4: "IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + base64: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64", + base64url: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url", + json_string: "JSON \u0440\u0430\u0434\u043E\u043A", + e164: "\u043D\u0443\u043C\u0430\u0440 E.164", + jwt: "JWT", + template_literal: "\u0443\u0432\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u043B\u0456\u043A", + array: "\u043C\u0430\u0441\u0456\u045E" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${issue2.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; + } + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const maxValue = Number(issue2.maximum); + const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.maximum.toString()} ${unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const minValue = Number(issue2.minimum); + const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.minimum.toString()} ${unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue2.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"; + case "invalid_element": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue2.origin}`; + default: + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`; + } + }; +}, "error"); +function be_default() { + return { + localeError: error5() + }; +} +__name(be_default, "default"); + +// ../../node_modules/zod/v4/locales/bg.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error6 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0432\u0445\u043E\u0434", + email: "\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u0435\u043C\u043E\u0434\u0436\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + base64url: "base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + json_string: "JSON \u043D\u0438\u0437", + e164: "E.164 \u043D\u043E\u043C\u0435\u0440", + jwt: "JWT", + template_literal: "\u0432\u0445\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0438\u0432" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; + } + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`; + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`; + let invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D"; + if (_issue.format === "emoji") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "datetime") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "date") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + if (_issue.format === "time") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "duration") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue2.keys.length > 1 ? "\u0438" : ""} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u043E\u0432\u0435" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"; + case "invalid_element": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue2.origin}`; + default: + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`; + } + }; +}, "error"); +function bg_default() { + return { + localeError: error6() + }; +} +__name(bg_default, "default"); + +// ../../node_modules/zod/v4/locales/ca.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error7 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "car\xE0cters", verb: "contenir" }, + file: { unit: "bytes", verb: "contenir" }, + array: { unit: "elements", verb: "contenir" }, + set: { unit: "elements", verb: "contenir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "entrada", + email: "adre\xE7a electr\xF2nica", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "durada ISO", + ipv4: "adre\xE7a IPv4", + ipv6: "adre\xE7a IPv6", + cidrv4: "rang IPv4", + cidrv6: "rang IPv6", + base64: "cadena codificada en base64", + base64url: "cadena codificada en base64url", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Tipus inv\xE0lid: s'esperava instanceof ${issue2.expected}, s'ha rebut ${received}`; + } + return `Tipus inv\xE0lid: s'esperava ${expected}, s'ha rebut ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive(issue2.values[0])}`; + return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues(issue2.values, " o ")}`; + case "too_big": { + const adj = issue2.inclusive ? "com a m\xE0xim" : "menys de"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} contingu\xE9s ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} fos ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "com a m\xEDnim" : "m\xE9s de"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Massa petit: s'esperava que ${issue2.origin} contingu\xE9s ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Massa petit: s'esperava que ${issue2.origin} fos ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Format inv\xE0lid: ha d'acabar amb "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Format inv\xE0lid: ha d'incloure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${_issue.pattern}`; + return `Format inv\xE0lid per a ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Clau${issue2.keys.length > 1 ? "s" : ""} no reconeguda${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Clau inv\xE0lida a ${issue2.origin}`; + case "invalid_union": + return "Entrada inv\xE0lida"; + // Could also be "Tipus d'unió invàlid" but "Entrada invàlida" is more general + case "invalid_element": + return `Element inv\xE0lid a ${issue2.origin}`; + default: + return `Entrada inv\xE0lida`; + } + }; +}, "error"); +function ca_default() { + return { + localeError: error7() + }; +} +__name(ca_default, "default"); + +// ../../node_modules/zod/v4/locales/cs.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error8 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "znak\u016F", verb: "m\xEDt" }, + file: { unit: "bajt\u016F", verb: "m\xEDt" }, + array: { unit: "prvk\u016F", verb: "m\xEDt" }, + set: { unit: "prvk\u016F", verb: "m\xEDt" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "regul\xE1rn\xED v\xFDraz", + email: "e-mailov\xE1 adresa", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "datum a \u010Das ve form\xE1tu ISO", + date: "datum ve form\xE1tu ISO", + time: "\u010Das ve form\xE1tu ISO", + duration: "doba trv\xE1n\xED ISO", + ipv4: "IPv4 adresa", + ipv6: "IPv6 adresa", + cidrv4: "rozsah IPv4", + cidrv6: "rozsah IPv6", + base64: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64", + base64url: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url", + json_string: "\u0159et\u011Bzec ve form\xE1tu JSON", + e164: "\u010D\xEDslo E.164", + jwt: "JWT", + template_literal: "vstup" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u010D\xEDslo", + string: "\u0159et\u011Bzec", + function: "funkce", + array: "pole" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${issue2.expected}, obdr\u017Eeno ${received}`; + } + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${expected}, obdr\u017Eeno ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive(issue2.values[0])}`; + return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${_issue.pattern}`; + return `Neplatn\xFD form\xE1t ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue2.divisor}`; + case "unrecognized_keys": + return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Neplatn\xFD kl\xED\u010D v ${issue2.origin}`; + case "invalid_union": + return "Neplatn\xFD vstup"; + case "invalid_element": + return `Neplatn\xE1 hodnota v ${issue2.origin}`; + default: + return `Neplatn\xFD vstup`; + } + }; +}, "error"); +function cs_default() { + return { + localeError: error8() + }; +} +__name(cs_default, "default"); + +// ../../node_modules/zod/v4/locales/da.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error9 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "tegn", verb: "havde" }, + file: { unit: "bytes", verb: "havde" }, + array: { unit: "elementer", verb: "indeholdt" }, + set: { unit: "elementer", verb: "indeholdt" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "e-mailadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkesl\xE6t", + date: "ISO-dato", + time: "ISO-klokkesl\xE6t", + duration: "ISO-varighed", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodet streng", + base64url: "base64url-kodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + string: "streng", + number: "tal", + boolean: "boolean", + array: "liste", + object: "objekt", + set: "s\xE6t", + file: "fil" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ugyldigt input: forventede instanceof ${issue2.expected}, fik ${received}`; + } + return `Ugyldigt input: forventede ${expected}, fik ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ugyldig v\xE6rdi: forventede ${stringifyPrimitive(issue2.values[0])}`; + return `Ugyldigt valg: forventede en af f\xF8lgende ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + if (sizing) + return `For stor: forventede ${origin2 ?? "value"} ${sizing.verb} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor: forventede ${origin2 ?? "value"} havde ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + if (sizing) { + return `For lille: forventede ${origin2} ${sizing.verb} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `For lille: forventede ${origin2} havde ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ugyldig streng: skal starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: skal ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: skal indeholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: skal matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ugyldigt tal: skal v\xE6re deleligt med ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ukendte n\xF8gler" : "Ukendt n\xF8gle"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8gle i ${issue2.origin}`; + case "invalid_union": + return "Ugyldigt input: matcher ingen af de tilladte typer"; + case "invalid_element": + return `Ugyldig v\xE6rdi i ${issue2.origin}`; + default: + return `Ugyldigt input`; + } + }; +}, "error"); +function da_default() { + return { + localeError: error9() + }; +} +__name(da_default, "default"); + +// ../../node_modules/zod/v4/locales/de.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error10 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "Zeichen", verb: "zu haben" }, + file: { unit: "Bytes", verb: "zu haben" }, + array: { unit: "Elemente", verb: "zu haben" }, + set: { unit: "Elemente", verb: "zu haben" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "Eingabe", + email: "E-Mail-Adresse", + url: "URL", + emoji: "Emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-Datum und -Uhrzeit", + date: "ISO-Datum", + time: "ISO-Uhrzeit", + duration: "ISO-Dauer", + ipv4: "IPv4-Adresse", + ipv6: "IPv6-Adresse", + cidrv4: "IPv4-Bereich", + cidrv6: "IPv6-Bereich", + base64: "Base64-codierter String", + base64url: "Base64-URL-codierter String", + json_string: "JSON-String", + e164: "E.164-Nummer", + jwt: "JWT", + template_literal: "Eingabe" + }; + const TypeDictionary = { + nan: "NaN", + number: "Zahl", + array: "Array" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ung\xFCltige Eingabe: erwartet instanceof ${issue2.expected}, erhalten ${received}`; + } + return `Ung\xFCltige Eingabe: erwartet ${expected}, erhalten ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive(issue2.values[0])}`; + return `Ung\xFCltige Option: erwartet eine von ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; + return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ist`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} hat`; + } + return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ist`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`; + if (_issue.format === "ends_with") + return `Ung\xFCltiger String: muss mit "${_issue.suffix}" enden`; + if (_issue.format === "includes") + return `Ung\xFCltiger String: muss "${_issue.includes}" enthalten`; + if (_issue.format === "regex") + return `Ung\xFCltiger String: muss dem Muster ${_issue.pattern} entsprechen`; + return `Ung\xFCltig: ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue2.divisor} sein`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ung\xFCltiger Schl\xFCssel in ${issue2.origin}`; + case "invalid_union": + return "Ung\xFCltige Eingabe"; + case "invalid_element": + return `Ung\xFCltiger Wert in ${issue2.origin}`; + default: + return `Ung\xFCltige Eingabe`; + } + }; +}, "error"); +function de_default() { + return { + localeError: error10() + }; +} +__name(de_default, "default"); + +// ../../node_modules/zod/v4/locales/en.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error11 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "characters", verb: "to have" }, + file: { unit: "bytes", verb: "to have" }, + array: { unit: "items", verb: "to have" }, + set: { unit: "items", verb: "to have" }, + map: { unit: "entries", verb: "to have" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + mac: "MAC address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + // Compatibility: "nan" -> "NaN" for display + nan: "NaN" + // All other type names omitted - they fall back to raw values via ?? operator + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + return `Invalid input: expected ${expected}, received ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; + return `Invalid option: expected one of ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Too big: expected ${issue2.origin ?? "value"} to have ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Too big: expected ${issue2.origin ?? "value"} to be ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Too small: expected ${issue2.origin} to have ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Too small: expected ${issue2.origin} to be ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Invalid string: must start with "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Invalid string: must end with "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Invalid string: must include "${_issue.includes}"`; + if (_issue.format === "regex") + return `Invalid string: must match pattern ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Invalid number: must be a multiple of ${issue2.divisor}`; + case "unrecognized_keys": + return `Unrecognized key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Invalid key in ${issue2.origin}`; + case "invalid_union": + return "Invalid input"; + case "invalid_element": + return `Invalid value in ${issue2.origin}`; + default: + return `Invalid input`; + } + }; +}, "error"); +function en_default() { + return { + localeError: error11() + }; +} +__name(en_default, "default"); + +// ../../node_modules/zod/v4/locales/eo.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error12 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "karaktrojn", verb: "havi" }, + file: { unit: "bajtojn", verb: "havi" }, + array: { unit: "elementojn", verb: "havi" }, + set: { unit: "elementojn", verb: "havi" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "enigo", + email: "retadreso", + url: "URL", + emoji: "emo\u011Dio", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datotempo", + date: "ISO-dato", + time: "ISO-tempo", + duration: "ISO-da\u016Dro", + ipv4: "IPv4-adreso", + ipv6: "IPv6-adreso", + cidrv4: "IPv4-rango", + cidrv6: "IPv6-rango", + base64: "64-ume kodita karaktraro", + base64url: "URL-64-ume kodita karaktraro", + json_string: "JSON-karaktraro", + e164: "E.164-nombro", + jwt: "JWT", + template_literal: "enigo" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombro", + array: "tabelo", + null: "senvalora" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Nevalida enigo: atendi\u011Dis instanceof ${issue2.expected}, ricevi\u011Dis ${received}`; + } + return `Nevalida enigo: atendi\u011Dis ${expected}, ricevi\u011Dis ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive(issue2.values[0])}`; + return `Nevalida opcio: atendi\u011Dis unu el ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementojn"}`; + return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} havu ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} estu ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nevalida karaktraro: devas fini\u011Di per "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`; + return `Nevalida ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Nevalida nombro: devas esti oblo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Nekonata${issue2.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue2.keys.length > 1 ? "j" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Nevalida \u015Dlosilo en ${issue2.origin}`; + case "invalid_union": + return "Nevalida enigo"; + case "invalid_element": + return `Nevalida valoro en ${issue2.origin}`; + default: + return `Nevalida enigo`; + } + }; +}, "error"); +function eo_default() { + return { + localeError: error12() + }; +} +__name(eo_default, "default"); + +// ../../node_modules/zod/v4/locales/es.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error13 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caracteres", verb: "tener" }, + file: { unit: "bytes", verb: "tener" }, + array: { unit: "elementos", verb: "tener" }, + set: { unit: "elementos", verb: "tener" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "entrada", + email: "direcci\xF3n de correo electr\xF3nico", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "fecha y hora ISO", + date: "fecha ISO", + time: "hora ISO", + duration: "duraci\xF3n ISO", + ipv4: "direcci\xF3n IPv4", + ipv6: "direcci\xF3n IPv6", + cidrv4: "rango IPv4", + cidrv6: "rango IPv6", + base64: "cadena codificada en base64", + base64url: "URL codificada en base64", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN", + string: "texto", + number: "n\xFAmero", + boolean: "booleano", + array: "arreglo", + object: "objeto", + set: "conjunto", + file: "archivo", + date: "fecha", + bigint: "n\xFAmero grande", + symbol: "s\xEDmbolo", + undefined: "indefinido", + null: "nulo", + function: "funci\xF3n", + map: "mapa", + record: "registro", + tuple: "tupla", + enum: "enumeraci\xF3n", + union: "uni\xF3n", + literal: "literal", + promise: "promesa", + void: "vac\xEDo", + never: "nunca", + unknown: "desconocido", + any: "cualquiera" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Entrada inv\xE1lida: se esperaba instanceof ${issue2.expected}, recibido ${received}`; + } + return `Entrada inv\xE1lida: se esperaba ${expected}, recibido ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive(issue2.values[0])}`; + return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + if (sizing) + return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} tuviera ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} fuera ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + if (sizing) { + return `Demasiado peque\xF1o: se esperaba que ${origin2} tuviera ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Demasiado peque\xF1o: se esperaba que ${origin2} fuera ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cadena inv\xE1lida: debe terminar en "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cadena inv\xE1lida: debe incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${_issue.pattern}`; + return `Inv\xE1lido ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Llave${issue2.keys.length > 1 ? "s" : ""} desconocida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Llave inv\xE1lida en ${TypeDictionary[issue2.origin] ?? issue2.origin}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido en ${TypeDictionary[issue2.origin] ?? issue2.origin}`; + default: + return `Entrada inv\xE1lida`; + } + }; +}, "error"); +function es_default() { + return { + localeError: error13() + }; +} +__name(es_default, "default"); + +// ../../node_modules/zod/v4/locales/fa.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error14 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + array: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + set: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0648\u0631\u0648\u062F\u06CC", + email: "\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644", + url: "URL", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + date: "\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648", + time: "\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + duration: "\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + ipv4: "IPv4 \u0622\u062F\u0631\u0633", + ipv6: "IPv6 \u0622\u062F\u0631\u0633", + cidrv4: "IPv4 \u062F\u0627\u0645\u0646\u0647", + cidrv6: "IPv6 \u062F\u0627\u0645\u0646\u0647", + base64: "base64-encoded \u0631\u0634\u062A\u0647", + base64url: "base64url-encoded \u0631\u0634\u062A\u0647", + json_string: "JSON \u0631\u0634\u062A\u0647", + e164: "E.164 \u0639\u062F\u062F", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u06CC" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0639\u062F\u062F", + array: "\u0622\u0631\u0627\u06CC\u0647" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${issue2.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + } + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + } + case "invalid_value": + if (issue2.values.length === 1) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive(issue2.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`; + } + return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues(issue2.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0628\u0627\u0634\u062F`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0628\u0627\u0634\u062F`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`; + } + if (_issue.format === "ends_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`; + } + if (_issue.format === "includes") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${_issue.includes}" \u0628\u0627\u0634\u062F`; + } + if (_issue.format === "regex") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`; + } + return `${FormatDictionary[_issue.format] ?? issue2.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + } + case "not_multiple_of": + return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue2.divisor} \u0628\u0627\u0634\u062F`; + case "unrecognized_keys": + return `\u06A9\u0644\u06CC\u062F${issue2.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue2.origin}`; + case "invalid_union": + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + case "invalid_element": + return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue2.origin}`; + default: + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + } + }; +}, "error"); +function fa_default() { + return { + localeError: error14() + }; +} +__name(fa_default, "default"); + +// ../../node_modules/zod/v4/locales/fi.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error15 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "merkki\xE4", subject: "merkkijonon" }, + file: { unit: "tavua", subject: "tiedoston" }, + array: { unit: "alkiota", subject: "listan" }, + set: { unit: "alkiota", subject: "joukon" }, + number: { unit: "", subject: "luvun" }, + bigint: { unit: "", subject: "suuren kokonaisluvun" }, + int: { unit: "", subject: "kokonaisluvun" }, + date: { unit: "", subject: "p\xE4iv\xE4m\xE4\xE4r\xE4n" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "s\xE4\xE4nn\xF6llinen lauseke", + email: "s\xE4hk\xF6postiosoite", + url: "URL-osoite", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-aikaleima", + date: "ISO-p\xE4iv\xE4m\xE4\xE4r\xE4", + time: "ISO-aika", + duration: "ISO-kesto", + ipv4: "IPv4-osoite", + ipv6: "IPv6-osoite", + cidrv4: "IPv4-alue", + cidrv6: "IPv6-alue", + base64: "base64-koodattu merkkijono", + base64url: "base64url-koodattu merkkijono", + json_string: "JSON-merkkijono", + e164: "E.164-luku", + jwt: "JWT", + template_literal: "templaattimerkkijono" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Virheellinen tyyppi: odotettiin instanceof ${issue2.expected}, oli ${received}`; + } + return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive(issue2.values[0])}`; + return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.maximum.toString()} ${sizing.unit}`.trim(); + } + return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.minimum.toString()} ${sizing.unit}`.trim(); + } + return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Virheellinen sy\xF6te: t\xE4ytyy loppua "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${_issue.includes}"`; + if (_issue.format === "regex") { + return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`; + } + return `Virheellinen ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Virheellinen luku: t\xE4ytyy olla luvun ${issue2.divisor} monikerta`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return "Virheellinen avain tietueessa"; + case "invalid_union": + return "Virheellinen unioni"; + case "invalid_element": + return "Virheellinen arvo joukossa"; + default: + return `Virheellinen sy\xF6te`; + } + }; +}, "error"); +function fi_default() { + return { + localeError: error15() + }; +} +__name(fi_default, "default"); + +// ../../node_modules/zod/v4/locales/fr.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error16 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "entr\xE9e", + email: "adresse e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date et heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombre", + array: "tableau" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Entr\xE9e invalide : instanceof ${issue2.expected} attendu, ${received} re\xE7u`; + } + return `Entr\xE9e invalide : ${expected} attendu, ${received} re\xE7u`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Entr\xE9e invalide : ${stringifyPrimitive(issue2.values[0])} attendu`; + return `Option invalide : une valeur parmi ${joinValues(issue2.values, "|")} attendue`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; + return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue2.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue2.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; +}, "error"); +function fr_default() { + return { + localeError: error16() + }; +} +__name(fr_default, "default"); + +// ../../node_modules/zod/v4/locales/fr-CA.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error17 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "entr\xE9e", + email: "adresse courriel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date-heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Entr\xE9e invalide : attendu instanceof ${issue2.expected}, re\xE7u ${received}`; + } + return `Entr\xE9e invalide : attendu ${expected}, re\xE7u ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Entr\xE9e invalide : attendu ${stringifyPrimitive(issue2.values[0])}`; + return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "\u2264" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} ait ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} soit ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u2265" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Trop petit : attendu que ${issue2.origin} ait ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : attendu que ${issue2.origin} soit ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue2.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue2.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; +}, "error"); +function fr_CA_default() { + return { + localeError: error17() + }; +} +__name(fr_CA_default, "default"); + +// ../../node_modules/zod/v4/locales/he.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error18 = /* @__PURE__ */ __name(() => { + const TypeNames = { + string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" }, + number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" }, + boolean: { label: "\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9", gender: "m" }, + bigint: { label: "BigInt", gender: "m" }, + date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA", gender: "m" }, + array: { label: "\u05DE\u05E2\u05E8\u05DA", gender: "m" }, + object: { label: "\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8", gender: "m" }, + null: { label: "\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)", gender: "m" }, + undefined: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)", gender: "m" }, + symbol: { label: "\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)", gender: "m" }, + function: { label: "\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4", gender: "f" }, + map: { label: "\u05DE\u05E4\u05D4 (Map)", gender: "f" }, + set: { label: "\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)", gender: "f" }, + file: { label: "\u05E7\u05D5\u05D1\u05E5", gender: "m" }, + promise: { label: "Promise", gender: "m" }, + NaN: { label: "NaN", gender: "m" }, + unknown: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2", gender: "m" }, + value: { label: "\u05E2\u05E8\u05DA", gender: "m" } + }; + const Sizable = { + string: { unit: "\u05EA\u05D5\u05D5\u05D9\u05DD", shortLabel: "\u05E7\u05E6\u05E8", longLabel: "\u05D0\u05E8\u05D5\u05DA" }, + file: { unit: "\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" } + // no unit + }; + const typeEntry = /* @__PURE__ */ __name((t8) => t8 ? TypeNames[t8] : void 0, "typeEntry"); + const typeLabel = /* @__PURE__ */ __name((t8) => { + const e = typeEntry(t8); + if (e) + return e.label; + return t8 ?? TypeNames.unknown.label; + }, "typeLabel"); + const withDefinite = /* @__PURE__ */ __name((t8) => `\u05D4${typeLabel(t8)}`, "withDefinite"); + const verbFor = /* @__PURE__ */ __name((t8) => { + const e = typeEntry(t8); + const gender = e?.gender ?? "m"; + return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"; + }, "verbFor"); + const getSizing = /* @__PURE__ */ __name((origin2) => { + if (!origin2) + return null; + return Sizable[origin2] ?? null; + }, "getSizing"); + const FormatDictionary = { + regex: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + email: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC", gender: "f" }, + url: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA", gender: "f" }, + emoji: { label: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9", gender: "m" }, + uuid: { label: "UUID", gender: "m" }, + nanoid: { label: "nanoid", gender: "m" }, + guid: { label: "GUID", gender: "m" }, + cuid: { label: "cuid", gender: "m" }, + cuid2: { label: "cuid2", gender: "m" }, + ulid: { label: "ULID", gender: "m" }, + xid: { label: "XID", gender: "m" }, + ksuid: { label: "KSUID", gender: "m" }, + datetime: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO", gender: "m" }, + date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA ISO", gender: "m" }, + time: { label: "\u05D6\u05DE\u05DF ISO", gender: "m" }, + duration: { label: "\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO", gender: "m" }, + ipv4: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv4", gender: "f" }, + ipv6: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv6", gender: "f" }, + cidrv4: { label: "\u05D8\u05D5\u05D5\u05D7 IPv4", gender: "m" }, + cidrv6: { label: "\u05D8\u05D5\u05D5\u05D7 IPv6", gender: "m" }, + base64: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64", gender: "f" }, + base64url: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA", gender: "f" }, + json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" }, + e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" }, + jwt: { label: "JWT", gender: "m" }, + ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + includes: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + lowercase: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + starts_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + uppercase: { label: "\u05E7\u05DC\u05D8", gender: "m" } + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expectedKey = issue2.expected; + const expected = TypeDictionary[expectedKey ?? ""] ?? typeLabel(expectedKey); + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue2.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; + } + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; + } + case "invalid_value": { + if (issue2.values.length === 1) { + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${stringifyPrimitive(issue2.values[0])}`; + } + const stringified = issue2.values.map((v2) => stringifyPrimitive(v2)); + if (issue2.values.length === 2) { + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`; + } + const lastValue = stringified[stringified.length - 1]; + const restValues = stringified.slice(0, -1).join(", "); + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`; + } + case "too_big": { + const sizing = getSizing(issue2.origin); + const subject = withDefinite(issue2.origin ?? "value"); + if (issue2.origin === "string") { + return `${sizing?.longLabel ?? "\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.maximum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA" : "\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim(); + } + if (issue2.origin === "number") { + const comparison = issue2.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue2.maximum}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; + } + if (issue2.origin === "array" || issue2.origin === "set") { + const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; + const comparison = issue2.inclusive ? `${issue2.maximum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA` : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue2.maximum} ${sizing?.unit ?? ""}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); + } + const adj = issue2.inclusive ? "<=" : "<"; + const be = verbFor(issue2.origin ?? "value"); + if (sizing?.unit) { + return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + } + return `${sizing?.longLabel ?? "\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const sizing = getSizing(issue2.origin); + const subject = withDefinite(issue2.origin ?? "value"); + if (issue2.origin === "string") { + return `${sizing?.shortLabel ?? "\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.minimum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8" : "\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim(); + } + if (issue2.origin === "number") { + const comparison = issue2.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue2.minimum}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; + } + if (issue2.origin === "array" || issue2.origin === "set") { + const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; + if (issue2.minimum === 1 && issue2.inclusive) { + const singularPhrase = issue2.origin === "set" ? "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3" : "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3"; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`; + } + const comparison = issue2.inclusive ? `${issue2.minimum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8` : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue2.minimum} ${sizing?.unit ?? ""}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); + } + const adj = issue2.inclusive ? ">=" : ">"; + const be = verbFor(issue2.origin ?? "value"); + if (sizing?.unit) { + return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `${sizing?.shortLabel ?? "\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`; + const nounEntry = FormatDictionary[_issue.format]; + const noun = nounEntry?.label ?? _issue.format; + const gender = nounEntry?.gender ?? "m"; + const adjective = gender === "f" ? "\u05EA\u05E7\u05D9\u05E0\u05D4" : "\u05EA\u05E7\u05D9\u05DF"; + return `${noun} \u05DC\u05D0 ${adjective}`; + } + case "not_multiple_of": + return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue2.divisor}`; + case "unrecognized_keys": + return `\u05DE\u05E4\u05EA\u05D7${issue2.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue2.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": { + return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`; + } + case "invalid_union": + return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"; + case "invalid_element": { + const place = withDefinite(issue2.origin ?? "array"); + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`; + } + default: + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; + } + }; +}, "error"); +function he_default() { + return { + localeError: error18() + }; +} +__name(he_default, "default"); + +// ../../node_modules/zod/v4/locales/hu.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error19 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "karakter", verb: "legyen" }, + file: { unit: "byte", verb: "legyen" }, + array: { unit: "elem", verb: "legyen" }, + set: { unit: "elem", verb: "legyen" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "bemenet", + email: "email c\xEDm", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO id\u0151b\xE9lyeg", + date: "ISO d\xE1tum", + time: "ISO id\u0151", + duration: "ISO id\u0151intervallum", + ipv4: "IPv4 c\xEDm", + ipv6: "IPv6 c\xEDm", + cidrv4: "IPv4 tartom\xE1ny", + cidrv6: "IPv6 tartom\xE1ny", + base64: "base64-k\xF3dolt string", + base64url: "base64url-k\xF3dolt string", + json_string: "JSON string", + e164: "E.164 sz\xE1m", + jwt: "JWT", + template_literal: "bemenet" + }; + const TypeDictionary = { + nan: "NaN", + number: "sz\xE1m", + array: "t\xF6mb" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`; + } + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`; + return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`; + return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`; + if (_issue.format === "ends_with") + return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`; + if (_issue.format === "includes") + return `\xC9rv\xE9nytelen string: "${_issue.includes}" \xE9rt\xE9ket kell tartalmaznia`; + if (_issue.format === "regex") + return `\xC9rv\xE9nytelen string: ${_issue.pattern} mint\xE1nak kell megfelelnie`; + return `\xC9rv\xE9nytelen ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\xC9rv\xE9nytelen sz\xE1m: ${issue2.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; + case "unrecognized_keys": + return `Ismeretlen kulcs${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\xC9rv\xE9nytelen kulcs ${issue2.origin}`; + case "invalid_union": + return "\xC9rv\xE9nytelen bemenet"; + case "invalid_element": + return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue2.origin}`; + default: + return `\xC9rv\xE9nytelen bemenet`; + } + }; +}, "error"); +function hu_default() { + return { + localeError: error19() + }; +} +__name(hu_default, "default"); + +// ../../node_modules/zod/v4/locales/hy.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function getArmenianPlural(count4, one, many) { + return Math.abs(count4) === 1 ? one : many; +} +__name(getArmenianPlural, "getArmenianPlural"); +function withDefiniteArticle(word) { + if (!word) + return ""; + const vowels = ["\u0561", "\u0565", "\u0568", "\u056B", "\u0578", "\u0578\u0582", "\u0585"]; + const lastChar = word[word.length - 1]; + return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568"); +} +__name(withDefiniteArticle, "withDefiniteArticle"); +var error20 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { + unit: { + one: "\u0576\u0577\u0561\u0576", + many: "\u0576\u0577\u0561\u0576\u0576\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + file: { + unit: { + one: "\u0562\u0561\u0575\u0569", + many: "\u0562\u0561\u0575\u0569\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + array: { + unit: { + one: "\u057F\u0561\u0580\u0580", + many: "\u057F\u0561\u0580\u0580\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + set: { + unit: { + one: "\u057F\u0561\u0580\u0580", + many: "\u057F\u0561\u0580\u0580\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0574\u0578\u0582\u057F\u0584", + email: "\u0567\u056C. \u0570\u0561\u057D\u0581\u0565", + url: "URL", + emoji: "\u0567\u0574\u0578\u057B\u056B", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574", + date: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E", + time: "ISO \u056A\u0561\u0574", + duration: "ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576", + ipv4: "IPv4 \u0570\u0561\u057D\u0581\u0565", + ipv6: "IPv6 \u0570\u0561\u057D\u0581\u0565", + cidrv4: "IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", + cidrv6: "IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", + base64: "base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", + base64url: "base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", + json_string: "JSON \u057F\u0578\u0572", + e164: "E.164 \u0570\u0561\u0574\u0561\u0580", + jwt: "JWT", + template_literal: "\u0574\u0578\u0582\u057F\u0584" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0569\u056B\u057E", + array: "\u0566\u0561\u0576\u0563\u057E\u0561\u056E" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${issue2.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; + } + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${stringifyPrimitive(issue2.values[1])}`; + return `\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const maxValue = Number(issue2.maximum); + const unit = getArmenianPlural(maxValue, sizing.unit.one, sizing.unit.many); + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue2.maximum.toString()} ${unit}`; + } + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const minValue = Number(issue2.minimum); + const unit = getArmenianPlural(minValue, sizing.unit.one, sizing.unit.many); + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue2.minimum.toString()} ${unit}`; + } + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin)} \u056C\u056B\u0576\u056B ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${_issue.prefix}"-\u0578\u057E`; + if (_issue.format === "ends_with") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${_issue.suffix}"-\u0578\u057E`; + if (_issue.format === "includes") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${_issue.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`; + return `\u054D\u056D\u0561\u056C ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${issue2.divisor}-\u056B`; + case "unrecognized_keys": + return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${issue2.keys.length > 1 ? "\u0576\u0565\u0580" : ""}. ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${withDefiniteArticle(issue2.origin)}-\u0578\u0582\u0574`; + case "invalid_union": + return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"; + case "invalid_element": + return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${withDefiniteArticle(issue2.origin)}-\u0578\u0582\u0574`; + default: + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574`; + } + }; +}, "error"); +function hy_default() { + return { + localeError: error20() + }; +} +__name(hy_default, "default"); + +// ../../node_modules/zod/v4/locales/id.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error21 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "karakter", verb: "memiliki" }, + file: { unit: "byte", verb: "memiliki" }, + array: { unit: "item", verb: "memiliki" }, + set: { unit: "item", verb: "memiliki" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "alamat email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tanggal dan waktu format ISO", + date: "tanggal format ISO", + time: "jam format ISO", + duration: "durasi format ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "rentang alamat IPv4", + cidrv6: "rentang alamat IPv6", + base64: "string dengan enkode base64", + base64url: "string dengan enkode base64url", + json_string: "string JSON", + e164: "angka E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Input tidak valid: diharapkan instanceof ${issue2.expected}, diterima ${received}`; + } + return `Input tidak valid: diharapkan ${expected}, diterima ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Input tidak valid: diharapkan ${stringifyPrimitive(issue2.values[0])}`; + return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} memiliki ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} menjadi ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Terlalu kecil: diharapkan ${issue2.origin} memiliki ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: diharapkan ${issue2.origin} menjadi ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak valid: harus menyertakan "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak valid: harus sesuai pola ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} tidak valid`; + } + case "not_multiple_of": + return `Angka tidak valid: harus kelipatan dari ${issue2.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak valid di ${issue2.origin}`; + case "invalid_union": + return "Input tidak valid"; + case "invalid_element": + return `Nilai tidak valid di ${issue2.origin}`; + default: + return `Input tidak valid`; + } + }; +}, "error"); +function id_default() { + return { + localeError: error21() + }; +} +__name(id_default, "default"); + +// ../../node_modules/zod/v4/locales/is.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error22 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "stafi", verb: "a\xF0 hafa" }, + file: { unit: "b\xE6ti", verb: "a\xF0 hafa" }, + array: { unit: "hluti", verb: "a\xF0 hafa" }, + set: { unit: "hluti", verb: "a\xF0 hafa" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "gildi", + email: "netfang", + url: "vefsl\xF3\xF0", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dagsetning og t\xEDmi", + date: "ISO dagsetning", + time: "ISO t\xEDmi", + duration: "ISO t\xEDmalengd", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded strengur", + base64url: "base64url-encoded strengur", + json_string: "JSON strengur", + e164: "E.164 t\xF6lugildi", + jwt: "JWT", + template_literal: "gildi" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\xFAmer", + array: "fylki" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera instanceof ${issue2.expected}`; + } + return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera ${expected}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Rangt gildi: gert r\xE1\xF0 fyrir ${stringifyPrimitive(issue2.values[0])}`; + return `\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin ?? "gildi"} hafi ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "hluti"}`; + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin ?? "gildi"} s\xE9 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin} hafi ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin} s\xE9 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${_issue.includes}"`; + if (_issue.format === "regex") + return `\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${_issue.pattern}`; + return `Rangt ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${issue2.divisor}`; + case "unrecognized_keys": + return `\xD3\xFEekkt ${issue2.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Rangur lykill \xED ${issue2.origin}`; + case "invalid_union": + return "Rangt gildi"; + case "invalid_element": + return `Rangt gildi \xED ${issue2.origin}`; + default: + return `Rangt gildi`; + } + }; +}, "error"); +function is_default() { + return { + localeError: error22() + }; +} +__name(is_default, "default"); + +// ../../node_modules/zod/v4/locales/it.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error23 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caratteri", verb: "avere" }, + file: { unit: "byte", verb: "avere" }, + array: { unit: "elementi", verb: "avere" }, + set: { unit: "elementi", verb: "avere" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "indirizzo email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e ora ISO", + date: "data ISO", + time: "ora ISO", + duration: "durata ISO", + ipv4: "indirizzo IPv4", + ipv6: "indirizzo IPv6", + cidrv4: "intervallo IPv4", + cidrv6: "intervallo IPv6", + base64: "stringa codificata in base64", + base64url: "URL codificata in base64", + json_string: "stringa JSON", + e164: "numero E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "numero", + array: "vettore" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Input non valido: atteso instanceof ${issue2.expected}, ricevuto ${received}`; + } + return `Input non valido: atteso ${expected}, ricevuto ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Input non valido: atteso ${stringifyPrimitive(issue2.values[0])}`; + return `Opzione non valida: atteso uno tra ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Troppo grande: ${issue2.origin ?? "valore"} deve avere ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementi"}`; + return `Troppo grande: ${issue2.origin ?? "valore"} deve essere ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Troppo piccolo: ${issue2.origin} deve avere ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Troppo piccolo: ${issue2.origin} deve essere ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Stringa non valida: deve iniziare con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Stringa non valida: deve terminare con "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Stringa non valida: deve includere "${_issue.includes}"`; + if (_issue.format === "regex") + return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`; + case "unrecognized_keys": + return `Chiav${issue2.keys.length > 1 ? "i" : "e"} non riconosciut${issue2.keys.length > 1 ? "e" : "a"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Chiave non valida in ${issue2.origin}`; + case "invalid_union": + return "Input non valido"; + case "invalid_element": + return `Valore non valido in ${issue2.origin}`; + default: + return `Input non valido`; + } + }; +}, "error"); +function it_default() { + return { + localeError: error23() + }; +} +__name(it_default, "default"); + +// ../../node_modules/zod/v4/locales/ja.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error24 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, + file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" }, + array: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" }, + set: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u5165\u529B\u5024", + email: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9", + url: "URL", + emoji: "\u7D75\u6587\u5B57", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u6642", + date: "ISO\u65E5\u4ED8", + time: "ISO\u6642\u523B", + duration: "ISO\u671F\u9593", + ipv4: "IPv4\u30A2\u30C9\u30EC\u30B9", + ipv6: "IPv6\u30A2\u30C9\u30EC\u30B9", + cidrv4: "IPv4\u7BC4\u56F2", + cidrv6: "IPv6\u7BC4\u56F2", + base64: "base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + base64url: "base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + json_string: "JSON\u6587\u5B57\u5217", + e164: "E.164\u756A\u53F7", + jwt: "JWT", + template_literal: "\u5165\u529B\u5024" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u6570\u5024", + array: "\u914D\u5217" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u7121\u52B9\u306A\u5165\u529B: instanceof ${issue2.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + } + return `\u7121\u52B9\u306A\u5165\u529B: ${expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive(issue2.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; + return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues(issue2.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "too_big": { + const adj = issue2.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "ends_with") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "includes") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "regex") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u7121\u52B9\u306A${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u7121\u52B9\u306A\u6570\u5024: ${issue2.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "unrecognized_keys": + return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue2.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue2.keys, "\u3001")}`; + case "invalid_key": + return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; + case "invalid_union": + return "\u7121\u52B9\u306A\u5165\u529B"; + case "invalid_element": + return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; + default: + return `\u7121\u52B9\u306A\u5165\u529B`; + } + }; +}, "error"); +function ja_default() { + return { + localeError: error24() + }; +} +__name(ja_default, "default"); + +// ../../node_modules/zod/v4/locales/ka.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error25 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + array: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + set: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0", + email: "\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + url: "URL", + emoji: "\u10D4\u10DB\u10DD\u10EF\u10D8", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD", + date: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8", + time: "\u10D3\u10E0\u10DD", + duration: "\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0", + ipv4: "IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8", + jwt: "JWT", + template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8", + string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8", + function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0", + array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${issue2.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; + } + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${stringifyPrimitive(issue2.values[0])}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${joinValues(issue2.values, "|")}-\u10D3\u10D0\u10DC`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`; + } + if (_issue.format === "ends_with") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`; + if (_issue.format === "includes") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`; + if (_issue.format === "regex") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue2.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`; + case "unrecognized_keys": + return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue2.keys.length > 1 ? "\u10D4\u10D1\u10D8" : "\u10D8"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue2.origin}-\u10E8\u10D8`; + case "invalid_union": + return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"; + case "invalid_element": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue2.origin}-\u10E8\u10D8`; + default: + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`; + } + }; +}, "error"); +function ka_default() { + return { + localeError: error25() + }; +} +__name(ka_default, "default"); + +// ../../node_modules/zod/v4/locales/kh.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/zod/v4/locales/km.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error26 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + array: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + set: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B", + email: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B", + url: "URL", + emoji: "\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO", + date: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO", + time: "\u1798\u17C9\u17C4\u1784 ISO", + duration: "\u179A\u1799\u17C8\u1796\u17C1\u179B ISO", + ipv4: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + ipv6: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + cidrv4: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + cidrv6: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + base64: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64", + base64url: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url", + json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON", + e164: "\u179B\u17C1\u1781 E.164", + jwt: "JWT", + template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u179B\u17C1\u1781", + array: "\u17A2\u17B6\u179A\u17C1 (Array)", + null: "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${issue2.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; + } + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive(issue2.values[0])}`; + return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`; + return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue2.divisor}`; + case "unrecognized_keys": + return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`; + case "invalid_union": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; + case "invalid_element": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`; + default: + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; + } + }; +}, "error"); +function km_default() { + return { + localeError: error26() + }; +} +__name(km_default, "default"); + +// ../../node_modules/zod/v4/locales/kh.js +function kh_default() { + return km_default(); +} +__name(kh_default, "default"); + +// ../../node_modules/zod/v4/locales/ko.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error27 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\uBB38\uC790", verb: "to have" }, + file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" }, + array: { unit: "\uAC1C", verb: "to have" }, + set: { unit: "\uAC1C", verb: "to have" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\uC785\uB825", + email: "\uC774\uBA54\uC77C \uC8FC\uC18C", + url: "URL", + emoji: "\uC774\uBAA8\uC9C0", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \uB0A0\uC9DC\uC2DC\uAC04", + date: "ISO \uB0A0\uC9DC", + time: "ISO \uC2DC\uAC04", + duration: "ISO \uAE30\uAC04", + ipv4: "IPv4 \uC8FC\uC18C", + ipv6: "IPv6 \uC8FC\uC18C", + cidrv4: "IPv4 \uBC94\uC704", + cidrv6: "IPv6 \uBC94\uC704", + base64: "base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + base64url: "base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + json_string: "JSON \uBB38\uC790\uC5F4", + e164: "E.164 \uBC88\uD638", + jwt: "JWT", + template_literal: "\uC785\uB825" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${issue2.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; + } + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive(issue2.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues(issue2.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "too_big": { + const adj = issue2.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; + const suffix = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue2.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()}${unit} ${adj}${suffix}`; + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()} ${adj}${suffix}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; + const suffix = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue2.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) { + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()}${unit} ${adj}${suffix}`; + } + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()} ${adj}${suffix}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`; + } + if (_issue.format === "ends_with") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "includes") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "regex") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue2.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "unrecognized_keys": + return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\uC798\uBABB\uB41C \uD0A4: ${issue2.origin}`; + case "invalid_union": + return `\uC798\uBABB\uB41C \uC785\uB825`; + case "invalid_element": + return `\uC798\uBABB\uB41C \uAC12: ${issue2.origin}`; + default: + return `\uC798\uBABB\uB41C \uC785\uB825`; + } + }; +}, "error"); +function ko_default() { + return { + localeError: error27() + }; +} +__name(ko_default, "default"); + +// ../../node_modules/zod/v4/locales/lt.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var capitalizeFirstCharacter = /* @__PURE__ */ __name((text2) => { + return text2.charAt(0).toUpperCase() + text2.slice(1); +}, "capitalizeFirstCharacter"); +function getUnitTypeFromNumber(number4) { + const abs = Math.abs(number4); + const last = abs % 10; + const last2 = abs % 100; + if (last2 >= 11 && last2 <= 19 || last === 0) + return "many"; + if (last === 1) + return "one"; + return "few"; +} +__name(getUnitTypeFromNumber, "getUnitTypeFromNumber"); +var error28 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { + unit: { + one: "simbolis", + few: "simboliai", + many: "simboli\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne ilgesn\u0117 kaip", + notInclusive: "turi b\u016Bti trumpesn\u0117 kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne trumpesn\u0117 kaip", + notInclusive: "turi b\u016Bti ilgesn\u0117 kaip" + } + } + }, + file: { + unit: { + one: "baitas", + few: "baitai", + many: "bait\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne didesnis kaip", + notInclusive: "turi b\u016Bti ma\u017Eesnis kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne ma\u017Eesnis kaip", + notInclusive: "turi b\u016Bti didesnis kaip" + } + } + }, + array: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } + } + }, + set: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } + } + } + }; + function getSizing(origin2, unitType, inclusive, targetShouldBe) { + const result = Sizable[origin2] ?? null; + if (result === null) + return result; + return { + unit: result.unit[unitType], + verb: result.verb[targetShouldBe][inclusive ? "inclusive" : "notInclusive"] + }; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u012Fvestis", + email: "el. pa\u0161to adresas", + url: "URL", + emoji: "jaustukas", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO data ir laikas", + date: "ISO data", + time: "ISO laikas", + duration: "ISO trukm\u0117", + ipv4: "IPv4 adresas", + ipv6: "IPv6 adresas", + cidrv4: "IPv4 tinklo prefiksas (CIDR)", + cidrv6: "IPv6 tinklo prefiksas (CIDR)", + base64: "base64 u\u017Ekoduota eilut\u0117", + base64url: "base64url u\u017Ekoduota eilut\u0117", + json_string: "JSON eilut\u0117", + e164: "E.164 numeris", + jwt: "JWT", + template_literal: "\u012Fvestis" + }; + const TypeDictionary = { + nan: "NaN", + number: "skai\u010Dius", + bigint: "sveikasis skai\u010Dius", + string: "eilut\u0117", + boolean: "login\u0117 reik\u0161m\u0117", + undefined: "neapibr\u0117\u017Eta reik\u0161m\u0117", + function: "funkcija", + symbol: "simbolis", + array: "masyvas", + object: "objektas", + null: "nulin\u0117 reik\u0161m\u0117" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Gautas tipas ${received}, o tik\u0117tasi - instanceof ${issue2.expected}`; + } + return `Gautas tipas ${received}, o tik\u0117tasi - ${expected}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Privalo b\u016Bti ${stringifyPrimitive(issue2.values[0])}`; + return `Privalo b\u016Bti vienas i\u0161 ${joinValues(issue2.values, "|")} pasirinkim\u0173`; + case "too_big": { + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.maximum)), issue2.inclusive ?? false, "smaller"); + if (sizing?.verb) + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.maximum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue2.inclusive ? "ne didesnis kaip" : "ma\u017Eesnis kaip"; + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.maximum.toString()} ${sizing?.unit}`; + } + case "too_small": { + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.minimum)), issue2.inclusive ?? false, "bigger"); + if (sizing?.verb) + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.minimum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue2.inclusive ? "ne ma\u017Eesnis kaip" : "didesnis kaip"; + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.minimum.toString()} ${sizing?.unit}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Eilut\u0117 privalo prasid\u0117ti "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Eilut\u0117 privalo pasibaigti "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Eilut\u0117 privalo \u012Ftraukti "${_issue.includes}"`; + if (_issue.format === "regex") + return `Eilut\u0117 privalo atitikti ${_issue.pattern}`; + return `Neteisingas ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Skai\u010Dius privalo b\u016Bti ${issue2.divisor} kartotinis.`; + case "unrecognized_keys": + return `Neatpa\u017Eint${issue2.keys.length > 1 ? "i" : "as"} rakt${issue2.keys.length > 1 ? "ai" : "as"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return "Rastas klaidingas raktas"; + case "invalid_union": + return "Klaidinga \u012Fvestis"; + case "invalid_element": { + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`; + } + default: + return "Klaidinga \u012Fvestis"; + } + }; +}, "error"); +function lt_default() { + return { + localeError: error28() + }; +} +__name(lt_default, "default"); + +// ../../node_modules/zod/v4/locales/mk.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error29 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + array: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + set: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0432\u043D\u0435\u0441", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430", + url: "URL", + emoji: "\u0435\u043C\u043E\u045F\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0443\u043C", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441\u0430", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441\u0430", + cidrv4: "IPv4 \u043E\u043F\u0441\u0435\u0433", + cidrv6: "IPv6 \u043E\u043F\u0441\u0435\u0433", + base64: "base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + base64url: "base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + json_string: "JSON \u043D\u0438\u0437\u0430", + e164: "E.164 \u0431\u0440\u043E\u0458", + jwt: "JWT", + template_literal: "\u0432\u043D\u0435\u0441" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0431\u0440\u043E\u0458", + array: "\u043D\u0438\u0437\u0430" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${issue2.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; + } + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; + return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue2.origin}`; + case "invalid_union": + return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"; + case "invalid_element": + return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue2.origin}`; + default: + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`; + } + }; +}, "error"); +function mk_default() { + return { + localeError: error29() + }; +} +__name(mk_default, "default"); + +// ../../node_modules/zod/v4/locales/ms.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error30 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "aksara", verb: "mempunyai" }, + file: { unit: "bait", verb: "mempunyai" }, + array: { unit: "elemen", verb: "mempunyai" }, + set: { unit: "elemen", verb: "mempunyai" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "alamat e-mel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tarikh masa ISO", + date: "tarikh ISO", + time: "masa ISO", + duration: "tempoh ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "julat IPv4", + cidrv6: "julat IPv6", + base64: "string dikodkan base64", + base64url: "string dikodkan base64url", + json_string: "string JSON", + e164: "nombor E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombor" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Input tidak sah: dijangka instanceof ${issue2.expected}, diterima ${received}`; + } + return `Input tidak sah: dijangka ${expected}, diterima ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Input tidak sah: dijangka ${stringifyPrimitive(issue2.values[0])}`; + return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} adalah ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Terlalu kecil: dijangka ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: dijangka ${issue2.origin} adalah ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak sah: mesti mengandungi "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} tidak sah`; + } + case "not_multiple_of": + return `Nombor tidak sah: perlu gandaan ${issue2.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak sah dalam ${issue2.origin}`; + case "invalid_union": + return "Input tidak sah"; + case "invalid_element": + return `Nilai tidak sah dalam ${issue2.origin}`; + default: + return `Input tidak sah`; + } + }; +}, "error"); +function ms_default() { + return { + localeError: error30() + }; +} +__name(ms_default, "default"); + +// ../../node_modules/zod/v4/locales/nl.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error31 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "tekens", verb: "heeft" }, + file: { unit: "bytes", verb: "heeft" }, + array: { unit: "elementen", verb: "heeft" }, + set: { unit: "elementen", verb: "heeft" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "invoer", + email: "emailadres", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum en tijd", + date: "ISO datum", + time: "ISO tijd", + duration: "ISO duur", + ipv4: "IPv4-adres", + ipv6: "IPv6-adres", + cidrv4: "IPv4-bereik", + cidrv6: "IPv6-bereik", + base64: "base64-gecodeerde tekst", + base64url: "base64 URL-gecodeerde tekst", + json_string: "JSON string", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "invoer" + }; + const TypeDictionary = { + nan: "NaN", + number: "getal" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ongeldige invoer: verwacht instanceof ${issue2.expected}, ontving ${received}`; + } + return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue2.values[0])}`; + return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + const longName = issue2.origin === "date" ? "laat" : issue2.origin === "string" ? "lang" : "groot"; + if (sizing) + return `Te ${longName}: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementen"} ${sizing.verb}`; + return `Te ${longName}: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} is`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + const shortName = issue2.origin === "date" ? "vroeg" : issue2.origin === "string" ? "kort" : "klein"; + if (sizing) { + return `Te ${shortName}: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} ${sizing.verb}`; + } + return `Te ${shortName}: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} is`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`; + } + if (_issue.format === "ends_with") + return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`; + if (_issue.format === "includes") + return `Ongeldige tekst: moet "${_issue.includes}" bevatten`; + if (_issue.format === "regex") + return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`; + return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ongeldig getal: moet een veelvoud van ${issue2.divisor} zijn`; + case "unrecognized_keys": + return `Onbekende key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ongeldige key in ${issue2.origin}`; + case "invalid_union": + return "Ongeldige invoer"; + case "invalid_element": + return `Ongeldige waarde in ${issue2.origin}`; + default: + return `Ongeldige invoer`; + } + }; +}, "error"); +function nl_default() { + return { + localeError: error31() + }; +} +__name(nl_default, "default"); + +// ../../node_modules/zod/v4/locales/no.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error32 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "tegn", verb: "\xE5 ha" }, + file: { unit: "bytes", verb: "\xE5 ha" }, + array: { unit: "elementer", verb: "\xE5 inneholde" }, + set: { unit: "elementer", verb: "\xE5 inneholde" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "e-postadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkeslett", + date: "ISO-dato", + time: "ISO-klokkeslett", + duration: "ISO-varighet", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spekter", + cidrv6: "IPv6-spekter", + base64: "base64-enkodet streng", + base64url: "base64url-enkodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "tall", + array: "liste" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ugyldig input: forventet instanceof ${issue2.expected}, fikk ${received}`; + } + return `Ugyldig input: forventet ${expected}, fikk ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ugyldig verdi: forventet ${stringifyPrimitive(issue2.values[0])}`; + return `Ugyldig valg: forventet en av ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: m\xE5 ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8kkel i ${issue2.origin}`; + case "invalid_union": + return "Ugyldig input"; + case "invalid_element": + return `Ugyldig verdi i ${issue2.origin}`; + default: + return `Ugyldig input`; + } + }; +}, "error"); +function no_default() { + return { + localeError: error32() + }; +} +__name(no_default, "default"); + +// ../../node_modules/zod/v4/locales/ota.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error33 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "unsur", verb: "olmal\u0131d\u0131r" }, + set: { unit: "unsur", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "giren", + email: "epostag\xE2h", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO heng\xE2m\u0131", + date: "ISO tarihi", + time: "ISO zaman\u0131", + duration: "ISO m\xFCddeti", + ipv4: "IPv4 ni\u015F\xE2n\u0131", + ipv6: "IPv6 ni\u015F\xE2n\u0131", + cidrv4: "IPv4 menzili", + cidrv6: "IPv6 menzili", + base64: "base64-\u015Fifreli metin", + base64url: "base64url-\u015Fifreli metin", + json_string: "JSON metin", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "giren" + }; + const TypeDictionary = { + nan: "NaN", + number: "numara", + array: "saf", + null: "gayb" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `F\xE2sit giren: umulan instanceof ${issue2.expected}, al\u0131nan ${received}`; + } + return `F\xE2sit giren: umulan ${expected}, al\u0131nan ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `F\xE2sit giren: umulan ${stringifyPrimitive(issue2.values[0])}`; + return `F\xE2sit tercih: m\xFBteberler ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; + return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} olmal\u0131yd\u0131.`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; + } + return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} olmal\u0131yd\u0131.`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`; + if (_issue.format === "ends_with") + return `F\xE2sit metin: "${_issue.suffix}" ile bitmeli.`; + if (_issue.format === "includes") + return `F\xE2sit metin: "${_issue.includes}" ihtiv\xE2 etmeli.`; + if (_issue.format === "regex") + return `F\xE2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`; + return `F\xE2sit ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `F\xE2sit say\u0131: ${issue2.divisor} kat\u0131 olmal\u0131yd\u0131.`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} i\xE7in tan\u0131nmayan anahtar var.`; + case "invalid_union": + return "Giren tan\u0131namad\u0131."; + case "invalid_element": + return `${issue2.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; + default: + return `K\u0131ymet tan\u0131namad\u0131.`; + } + }; +}, "error"); +function ota_default() { + return { + localeError: error33() + }; +} +__name(ota_default, "default"); + +// ../../node_modules/zod/v4/locales/ps.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error34 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" }, + array: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + set: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0648\u0631\u0648\u062F\u064A", + email: "\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u0644", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u064A", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A", + date: "\u0646\u06D0\u067C\u0647", + time: "\u0648\u062E\u062A", + duration: "\u0645\u0648\u062F\u0647", + ipv4: "\u062F IPv4 \u067E\u062A\u0647", + ipv6: "\u062F IPv6 \u067E\u062A\u0647", + cidrv4: "\u062F IPv4 \u0633\u0627\u062D\u0647", + cidrv6: "\u062F IPv6 \u0633\u0627\u062D\u0647", + base64: "base64-encoded \u0645\u062A\u0646", + base64url: "base64url-encoded \u0645\u062A\u0646", + json_string: "JSON \u0645\u062A\u0646", + e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u064A" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0639\u062F\u062F", + array: "\u0627\u0631\u06D0" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${issue2.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + } + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + } + case "invalid_value": + if (issue2.values.length === 1) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive(issue2.values[0])} \u0648\u0627\u06CC`; + } + return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues(issue2.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0648\u064A`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0648\u064A`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`; + } + if (_issue.format === "ends_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`; + } + if (_issue.format === "includes") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${_issue.includes}" \u0648\u0644\u0631\u064A`; + } + if (_issue.format === "regex") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`; + } + return `${FormatDictionary[_issue.format] ?? issue2.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; + } + case "not_multiple_of": + return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue2.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; + case "unrecognized_keys": + return `\u0646\u0627\u0633\u0645 ${issue2.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; + case "invalid_union": + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + case "invalid_element": + return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; + default: + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + } + }; +}, "error"); +function ps_default() { + return { + localeError: error34() + }; +} +__name(ps_default, "default"); + +// ../../node_modules/zod/v4/locales/pl.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error35 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "znak\xF3w", verb: "mie\u0107" }, + file: { unit: "bajt\xF3w", verb: "mie\u0107" }, + array: { unit: "element\xF3w", verb: "mie\u0107" }, + set: { unit: "element\xF3w", verb: "mie\u0107" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "wyra\u017Cenie", + email: "adres email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i godzina w formacie ISO", + date: "data w formacie ISO", + time: "godzina w formacie ISO", + duration: "czas trwania ISO", + ipv4: "adres IPv4", + ipv6: "adres IPv6", + cidrv4: "zakres IPv4", + cidrv6: "zakres IPv6", + base64: "ci\u0105g znak\xF3w zakodowany w formacie base64", + base64url: "ci\u0105g znak\xF3w zakodowany w formacie base64url", + json_string: "ci\u0105g znak\xF3w w formacie JSON", + e164: "liczba E.164", + jwt: "JWT", + template_literal: "wej\u015Bcie" + }; + const TypeDictionary = { + nan: "NaN", + number: "liczba", + array: "tablica" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${issue2.expected}, otrzymano ${received}`; + } + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${expected}, otrzymano ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive(issue2.values[0])}`; + return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`; + return `Nieprawid\u0142ow(y/a/e) ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue2.divisor}`; + case "unrecognized_keys": + return `Nierozpoznane klucze${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Nieprawid\u0142owy klucz w ${issue2.origin}`; + case "invalid_union": + return "Nieprawid\u0142owe dane wej\u015Bciowe"; + case "invalid_element": + return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue2.origin}`; + default: + return `Nieprawid\u0142owe dane wej\u015Bciowe`; + } + }; +}, "error"); +function pl_default() { + return { + localeError: error35() + }; +} +__name(pl_default, "default"); + +// ../../node_modules/zod/v4/locales/pt.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error36 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caracteres", verb: "ter" }, + file: { unit: "bytes", verb: "ter" }, + array: { unit: "itens", verb: "ter" }, + set: { unit: "itens", verb: "ter" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "padr\xE3o", + email: "endere\xE7o de e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "dura\xE7\xE3o ISO", + ipv4: "endere\xE7o IPv4", + ipv6: "endere\xE7o IPv6", + cidrv4: "faixa de IPv4", + cidrv6: "faixa de IPv6", + base64: "texto codificado em base64", + base64url: "URL codificada em base64", + json_string: "texto JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\xFAmero", + null: "nulo" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Tipo inv\xE1lido: esperado instanceof ${issue2.expected}, recebido ${received}`; + } + return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue2.values[0])}`; + return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} inv\xE1lido`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Chave inv\xE1lida em ${issue2.origin}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido em ${issue2.origin}`; + default: + return `Campo inv\xE1lido`; + } + }; +}, "error"); +function pt_default() { + return { + localeError: error36() + }; +} +__name(pt_default, "default"); + +// ../../node_modules/zod/v4/locales/ru.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function getRussianPlural(count4, one, few, many) { + const absCount = Math.abs(count4); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; + } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; +} +__name(getRussianPlural, "getRussianPlural"); +var error37 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0438\u043C\u0432\u043E\u043B", + few: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", + many: "\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u0430", + many: "\u0431\u0430\u0439\u0442" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0432\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u044F", + duration: "ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64", + base64url: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url", + json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0432\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0441\u0438\u0432" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; + } + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const maxValue = Number(issue2.maximum); + const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.maximum.toString()} ${unit}`; + } + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const minValue = Number(issue2.minimum); + const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.minimum.toString()} ${unit}`; + } + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue2.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0438" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"; + case "invalid_element": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue2.origin}`; + default: + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`; + } + }; +}, "error"); +function ru_default() { + return { + localeError: error37() + }; +} +__name(ru_default, "default"); + +// ../../node_modules/zod/v4/locales/sl.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error38 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "znakov", verb: "imeti" }, + file: { unit: "bajtov", verb: "imeti" }, + array: { unit: "elementov", verb: "imeti" }, + set: { unit: "elementov", verb: "imeti" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "vnos", + email: "e-po\u0161tni naslov", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum in \u010Das", + date: "ISO datum", + time: "ISO \u010Das", + duration: "ISO trajanje", + ipv4: "IPv4 naslov", + ipv6: "IPv6 naslov", + cidrv4: "obseg IPv4", + cidrv6: "obseg IPv6", + base64: "base64 kodiran niz", + base64url: "base64url kodiran niz", + json_string: "JSON niz", + e164: "E.164 \u0161tevilka", + jwt: "JWT", + template_literal: "vnos" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0161tevilo", + array: "tabela" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Neveljaven vnos: pri\u010Dakovano instanceof ${issue2.expected}, prejeto ${received}`; + } + return `Neveljaven vnos: pri\u010Dakovano ${expected}, prejeto ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive(issue2.values[0])}`; + return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} imelo ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementov"}`; + return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} imelo ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Neveljaven niz: mora se kon\u010Dati z "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neveljaven niz: mora vsebovati "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`; + return `Neveljaven ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue2.divisor}`; + case "unrecognized_keys": + return `Neprepoznan${issue2.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Neveljaven klju\u010D v ${issue2.origin}`; + case "invalid_union": + return "Neveljaven vnos"; + case "invalid_element": + return `Neveljavna vrednost v ${issue2.origin}`; + default: + return "Neveljaven vnos"; + } + }; +}, "error"); +function sl_default() { + return { + localeError: error38() + }; +} +__name(sl_default, "default"); + +// ../../node_modules/zod/v4/locales/sv.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error39 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "tecken", verb: "att ha" }, + file: { unit: "bytes", verb: "att ha" }, + array: { unit: "objekt", verb: "att inneh\xE5lla" }, + set: { unit: "objekt", verb: "att inneh\xE5lla" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "regulj\xE4rt uttryck", + email: "e-postadress", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datum och tid", + date: "ISO-datum", + time: "ISO-tid", + duration: "ISO-varaktighet", + ipv4: "IPv4-intervall", + ipv6: "IPv6-intervall", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodad str\xE4ng", + base64url: "base64url-kodad str\xE4ng", + json_string: "JSON-str\xE4ng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "mall-literal" + }; + const TypeDictionary = { + nan: "NaN", + number: "antal", + array: "lista" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${issue2.expected}, fick ${received}`; + } + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${expected}, fick ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive(issue2.values[0])}`; + return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; + } + return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Ogiltig str\xE4ng: m\xE5ste sluta med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${_issue.pattern}"`; + return `Ogiltig(t) ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ogiltig nyckel i ${issue2.origin ?? "v\xE4rdet"}`; + case "invalid_union": + return "Ogiltig input"; + case "invalid_element": + return `Ogiltigt v\xE4rde i ${issue2.origin ?? "v\xE4rdet"}`; + default: + return `Ogiltig input`; + } + }; +}, "error"); +function sv_default() { + return { + localeError: error39() + }; +} +__name(sv_default, "default"); + +// ../../node_modules/zod/v4/locales/ta.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error40 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + array: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + set: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1", + email: "\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + date: "ISO \u0BA4\u0BC7\u0BA4\u0BBF", + time: "ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + duration: "ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1", + ipv4: "IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + ipv6: "IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + cidrv4: "IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + cidrv6: "IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + base64: "base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + base64url: "base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD", + e164: "E.164 \u0B8E\u0BA3\u0BCD", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0B8E\u0BA3\u0BCD", + array: "\u0B85\u0BA3\u0BBF", + null: "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${issue2.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; + } + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues(issue2.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "ends_with") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "includes") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "regex") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue2.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + case "unrecognized_keys": + return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue2.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`; + case "invalid_union": + return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"; + case "invalid_element": + return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`; + default: + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`; + } + }; +}, "error"); +function ta_default() { + return { + localeError: error40() + }; +} +__name(ta_default, "default"); + +// ../../node_modules/zod/v4/locales/th.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error41 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19", + email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25", + url: "URL", + emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO", + time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4", + ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6", + cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4", + cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6", + base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64", + base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL", + json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON", + e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)", + jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT", + template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02", + array: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)", + null: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue2.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; + } + return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${_issue.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`; + if (_issue.format === "regex") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`; + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue2.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`; + case "unrecognized_keys": + return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; + case "invalid_union": + return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49"; + case "invalid_element": + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; + default: + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`; + } + }; +}, "error"); +function th_default() { + return { + localeError: error41() + }; +} +__name(th_default, "default"); + +// ../../node_modules/zod/v4/locales/tr.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error42 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "karakter", verb: "olmal\u0131" }, + file: { unit: "bayt", verb: "olmal\u0131" }, + array: { unit: "\xF6\u011Fe", verb: "olmal\u0131" }, + set: { unit: "\xF6\u011Fe", verb: "olmal\u0131" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "girdi", + email: "e-posta adresi", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO tarih ve saat", + date: "ISO tarih", + time: "ISO saat", + duration: "ISO s\xFCre", + ipv4: "IPv4 adresi", + ipv6: "IPv6 adresi", + cidrv4: "IPv4 aral\u0131\u011F\u0131", + cidrv6: "IPv6 aral\u0131\u011F\u0131", + base64: "base64 ile \u015Fifrelenmi\u015F metin", + base64url: "base64url ile \u015Fifrelenmi\u015F metin", + json_string: "JSON dizesi", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "\u015Eablon dizesi" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ge\xE7ersiz de\u011Fer: beklenen instanceof ${issue2.expected}, al\u0131nan ${received}`; + } + return `Ge\xE7ersiz de\u011Fer: beklenen ${expected}, al\u0131nan ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive(issue2.values[0])}`; + return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; + return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`; + if (_issue.format === "ends_with") + return `Ge\xE7ersiz metin: "${_issue.suffix}" ile bitmeli`; + if (_issue.format === "includes") + return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`; + if (_issue.format === "regex") + return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`; + return `Ge\xE7ersiz ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ge\xE7ersiz say\u0131: ${issue2.divisor} ile tam b\xF6l\xFCnebilmeli`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} i\xE7inde ge\xE7ersiz anahtar`; + case "invalid_union": + return "Ge\xE7ersiz de\u011Fer"; + case "invalid_element": + return `${issue2.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; + default: + return `Ge\xE7ersiz de\u011Fer`; + } + }; +}, "error"); +function tr_default() { + return { + localeError: error42() + }; +} +__name(tr_default, "default"); + +// ../../node_modules/zod/v4/locales/ua.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/zod/v4/locales/uk.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error43 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438", + url: "URL", + emoji: "\u0435\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO", + date: "\u0434\u0430\u0442\u0430 ISO", + time: "\u0447\u0430\u0441 ISO", + duration: "\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO", + ipv4: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv4", + ipv6: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv6", + cidrv4: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4", + cidrv6: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6", + base64: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64", + base64url: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url", + json_string: "\u0440\u044F\u0434\u043E\u043A JSON", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0438\u0432" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${issue2.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; + } + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} \u0431\u0443\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0456" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"; + case "invalid_element": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue2.origin}`; + default: + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`; + } + }; +}, "error"); +function uk_default() { + return { + localeError: error43() + }; +} +__name(uk_default, "default"); + +// ../../node_modules/zod/v4/locales/ua.js +function ua_default() { + return uk_default(); +} +__name(ua_default, "default"); + +// ../../node_modules/zod/v4/locales/ur.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error44 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, + file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" }, + array: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" }, + set: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0627\u0646 \u067E\u0679", + email: "\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + uuidv4: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4", + uuidv6: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6", + nanoid: "\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC", + guid: "\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid2: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2", + ulid: "\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC", + xid: "\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC", + ksuid: "\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + datetime: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645", + date: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E", + time: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A", + duration: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A", + ipv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633", + ipv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633", + cidrv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C", + cidrv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C", + base64: "\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + base64url: "\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF", + e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631", + jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC", + template_literal: "\u0627\u0646 \u067E\u0679" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0646\u0645\u0628\u0631", + array: "\u0622\u0631\u06D2", + null: "\u0646\u0644" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${issue2.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + } + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive(issue2.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues(issue2.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue2.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u06D2 ${adj}${issue2.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + } + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u0627 ${adj}${issue2.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + } + if (_issue.format === "ends_with") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "includes") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "regex") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + return `\u063A\u0644\u0637 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue2.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + case "unrecognized_keys": + return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue2.keys.length > 1 ? "\u0632" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; + case "invalid_key": + return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; + case "invalid_union": + return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"; + case "invalid_element": + return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; + default: + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`; + } + }; +}, "error"); +function ur_default() { + return { + localeError: error44() + }; +} +__name(ur_default, "default"); + +// ../../node_modules/zod/v4/locales/uz.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error45 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "belgi", verb: "bo\u2018lishi kerak" }, + file: { unit: "bayt", verb: "bo\u2018lishi kerak" }, + array: { unit: "element", verb: "bo\u2018lishi kerak" }, + set: { unit: "element", verb: "bo\u2018lishi kerak" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "kirish", + email: "elektron pochta manzili", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO sana va vaqti", + date: "ISO sana", + time: "ISO vaqt", + duration: "ISO davomiylik", + ipv4: "IPv4 manzil", + ipv6: "IPv6 manzil", + mac: "MAC manzil", + cidrv4: "IPv4 diapazon", + cidrv6: "IPv6 diapazon", + base64: "base64 kodlangan satr", + base64url: "base64url kodlangan satr", + json_string: "JSON satr", + e164: "E.164 raqam", + jwt: "JWT", + template_literal: "kirish" + }; + const TypeDictionary = { + nan: "NaN", + number: "raqam", + array: "massiv" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Noto\u2018g\u2018ri kirish: kutilgan instanceof ${issue2.expected}, qabul qilingan ${received}`; + } + return `Noto\u2018g\u2018ri kirish: kutilgan ${expected}, qabul qilingan ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Noto\u2018g\u2018ri kirish: kutilgan ${stringifyPrimitive(issue2.values[0])}`; + return `Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Juda katta: kutilgan ${issue2.origin ?? "qiymat"} ${adj}${issue2.maximum.toString()} ${sizing.unit} ${sizing.verb}`; + return `Juda katta: kutilgan ${issue2.origin ?? "qiymat"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Juda kichik: kutilgan ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} ${sizing.verb}`; + } + return `Juda kichik: kutilgan ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Noto\u2018g\u2018ri satr: "${_issue.prefix}" bilan boshlanishi kerak`; + if (_issue.format === "ends_with") + return `Noto\u2018g\u2018ri satr: "${_issue.suffix}" bilan tugashi kerak`; + if (_issue.format === "includes") + return `Noto\u2018g\u2018ri satr: "${_issue.includes}" ni o\u2018z ichiga olishi kerak`; + if (_issue.format === "regex") + return `Noto\u2018g\u2018ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`; + return `Noto\u2018g\u2018ri ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Noto\u2018g\u2018ri raqam: ${issue2.divisor} ning karralisi bo\u2018lishi kerak`; + case "unrecognized_keys": + return `Noma\u2019lum kalit${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} dagi kalit noto\u2018g\u2018ri`; + case "invalid_union": + return "Noto\u2018g\u2018ri kirish"; + case "invalid_element": + return `${issue2.origin} da noto\u2018g\u2018ri qiymat`; + default: + return `Noto\u2018g\u2018ri kirish`; + } + }; +}, "error"); +function uz_default() { + return { + localeError: error45() + }; +} +__name(uz_default, "default"); + +// ../../node_modules/zod/v4/locales/vi.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error46 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, + file: { unit: "byte", verb: "c\xF3" }, + array: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" }, + set: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0111\u1EA7u v\xE0o", + email: "\u0111\u1ECBa ch\u1EC9 email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ng\xE0y gi\u1EDD ISO", + date: "ng\xE0y ISO", + time: "gi\u1EDD ISO", + duration: "kho\u1EA3ng th\u1EDDi gian ISO", + ipv4: "\u0111\u1ECBa ch\u1EC9 IPv4", + ipv6: "\u0111\u1ECBa ch\u1EC9 IPv6", + cidrv4: "d\u1EA3i IPv4", + cidrv6: "d\u1EA3i IPv6", + base64: "chu\u1ED7i m\xE3 h\xF3a base64", + base64url: "chu\u1ED7i m\xE3 h\xF3a base64url", + json_string: "chu\u1ED7i JSON", + e164: "s\u1ED1 E.164", + jwt: "JWT", + template_literal: "\u0111\u1EA7u v\xE0o" + }; + const TypeDictionary = { + nan: "NaN", + number: "s\u1ED1", + array: "m\u1EA3ng" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${issue2.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; + } + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive(issue2.values[0])}`; + return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${_issue.includes}"`; + if (_issue.format === "regex") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} kh\xF4ng h\u1EE3p l\u1EC7`; + } + case "not_multiple_of": + return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue2.divisor}`; + case "unrecognized_keys": + return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; + case "invalid_union": + return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"; + case "invalid_element": + return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; + default: + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`; + } + }; +}, "error"); +function vi_default() { + return { + localeError: error46() + }; +} +__name(vi_default, "default"); + +// ../../node_modules/zod/v4/locales/zh-CN.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error47 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, + file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" }, + array: { unit: "\u9879", verb: "\u5305\u542B" }, + set: { unit: "\u9879", verb: "\u5305\u542B" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u8F93\u5165", + email: "\u7535\u5B50\u90AE\u4EF6", + url: "URL", + emoji: "\u8868\u60C5\u7B26\u53F7", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u671F\u65F6\u95F4", + date: "ISO\u65E5\u671F", + time: "ISO\u65F6\u95F4", + duration: "ISO\u65F6\u957F", + ipv4: "IPv4\u5730\u5740", + ipv6: "IPv6\u5730\u5740", + cidrv4: "IPv4\u7F51\u6BB5", + cidrv6: "IPv6\u7F51\u6BB5", + base64: "base64\u7F16\u7801\u5B57\u7B26\u4E32", + base64url: "base64url\u7F16\u7801\u5B57\u7B26\u4E32", + json_string: "JSON\u5B57\u7B26\u4E32", + e164: "E.164\u53F7\u7801", + jwt: "JWT", + template_literal: "\u8F93\u5165" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u6570\u5B57", + array: "\u6570\u7EC4", + null: "\u7A7A\u503C(null)" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${issue2.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; + } + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive(issue2.values[0])}`; + return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`; + if (_issue.format === "ends_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.suffix}" \u7ED3\u5C3E`; + if (_issue.format === "includes") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`; + return `\u65E0\u6548${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue2.divisor} \u7684\u500D\u6570`; + case "unrecognized_keys": + return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; + case "invalid_union": + return "\u65E0\u6548\u8F93\u5165"; + case "invalid_element": + return `${issue2.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; + default: + return `\u65E0\u6548\u8F93\u5165`; + } + }; +}, "error"); +function zh_CN_default() { + return { + localeError: error47() + }; +} +__name(zh_CN_default, "default"); + +// ../../node_modules/zod/v4/locales/zh-TW.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error48 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, + file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" }, + array: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" }, + set: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u8F38\u5165", + email: "\u90F5\u4EF6\u5730\u5740", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u65E5\u671F\u6642\u9593", + date: "ISO \u65E5\u671F", + time: "ISO \u6642\u9593", + duration: "ISO \u671F\u9593", + ipv4: "IPv4 \u4F4D\u5740", + ipv6: "IPv6 \u4F4D\u5740", + cidrv4: "IPv4 \u7BC4\u570D", + cidrv6: "IPv6 \u7BC4\u570D", + base64: "base64 \u7DE8\u78BC\u5B57\u4E32", + base64url: "base64url \u7DE8\u78BC\u5B57\u4E32", + json_string: "JSON \u5B57\u4E32", + e164: "E.164 \u6578\u503C", + jwt: "JWT", + template_literal: "\u8F38\u5165" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${issue2.expected}\uFF0C\u4F46\u6536\u5230 ${received}`; + } + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${expected}\uFF0C\u4F46\u6536\u5230 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive(issue2.values[0])}`; + return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`; + } + if (_issue.format === "ends_with") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.suffix}" \u7D50\u5C3E`; + if (_issue.format === "includes") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`; + return `\u7121\u6548\u7684 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue2.divisor} \u7684\u500D\u6578`; + case "unrecognized_keys": + return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue2.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues(issue2.keys, "\u3001")}`; + case "invalid_key": + return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; + case "invalid_union": + return "\u7121\u6548\u7684\u8F38\u5165\u503C"; + case "invalid_element": + return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; + default: + return `\u7121\u6548\u7684\u8F38\u5165\u503C`; + } + }; +}, "error"); +function zh_TW_default() { + return { + localeError: error48() + }; +} +__name(zh_TW_default, "default"); + +// ../../node_modules/zod/v4/locales/yo.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var error49 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\xE0mi", verb: "n\xED" }, + file: { unit: "bytes", verb: "n\xED" }, + array: { unit: "nkan", verb: "n\xED" }, + set: { unit: "nkan", verb: "n\xED" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9", + email: "\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\xE0k\xF3k\xF2 ISO", + date: "\u1ECDj\u1ECD\u0301 ISO", + time: "\xE0k\xF3k\xF2 ISO", + duration: "\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO", + ipv4: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv4", + ipv6: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv6", + cidrv4: "\xE0gb\xE8gb\xE8 IPv4", + cidrv6: "\xE0gb\xE8gb\xE8 IPv6", + base64: "\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64", + base64url: "\u1ECD\u0300r\u1ECD\u0300 base64url", + json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON", + e164: "n\u1ECD\u0301mb\xE0 E.164", + jwt: "JWT", + template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\u1ECD\u0301mb\xE0", + array: "akop\u1ECD" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${issue2.expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; + } + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${stringifyPrimitive(issue2.values[0])}`; + return `\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue2.origin ?? "iye"} ${sizing.verb} ${adj}${issue2.maximum} ${sizing.unit}`; + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue2.maximum}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum} ${sizing.unit}`; + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue2.minimum}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`; + return `A\u1E63\xEC\u1E63e: ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${issue2.divisor}`; + case "unrecognized_keys": + return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue2.origin}`; + case "invalid_union": + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + case "invalid_element": + return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue2.origin}`; + default: + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + } + }; +}, "error"); +function yo_default() { + return { + localeError: error49() + }; +} +__name(yo_default, "default"); + +// ../../node_modules/zod/v4/core/registries.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var _a; +var $output = /* @__PURE__ */ Symbol("ZodOutput"); +var $input = /* @__PURE__ */ Symbol("ZodInput"); +var $ZodRegistry = class { + static { + __name(this, "$ZodRegistry"); + } + constructor() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + } + add(schema, ..._meta) { + const meta3 = _meta[0]; + this._map.set(schema, meta3); + if (meta3 && typeof meta3 === "object" && "id" in meta3) { + this._idmap.set(meta3.id, schema); + } + return this; + } + clear() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + return this; + } + remove(schema) { + const meta3 = this._map.get(schema); + if (meta3 && typeof meta3 === "object" && "id" in meta3) { + this._idmap.delete(meta3.id); + } + this._map.delete(schema); + return this; + } + get(schema) { + const p = schema._zod.parent; + if (p) { + const pm = { ...this.get(p) ?? {} }; + delete pm.id; + const f = { ...pm, ...this._map.get(schema) }; + return Object.keys(f).length ? f : void 0; + } + return this._map.get(schema); + } + has(schema) { + return this._map.has(schema); + } +}; +function registry() { + return new $ZodRegistry(); +} +__name(registry, "registry"); +(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry()); +var globalRegistry = globalThis.__zod_globalRegistry; + +// ../../node_modules/zod/v4/core/api.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +// @__NO_SIDE_EFFECTS__ +function _string(Class2, params) { + return new Class2({ + type: "string", + ...normalizeParams(params) + }); +} +__name(_string, "_string"); +// @__NO_SIDE_EFFECTS__ +function _coercedString(Class2, params) { + return new Class2({ + type: "string", + coerce: true, + ...normalizeParams(params) + }); +} +__name(_coercedString, "_coercedString"); +// @__NO_SIDE_EFFECTS__ +function _email(Class2, params) { + return new Class2({ + type: "string", + format: "email", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_email, "_email"); +// @__NO_SIDE_EFFECTS__ +function _guid(Class2, params) { + return new Class2({ + type: "string", + format: "guid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_guid, "_guid"); +// @__NO_SIDE_EFFECTS__ +function _uuid(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_uuid, "_uuid"); +// @__NO_SIDE_EFFECTS__ +function _uuidv4(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v4", + ...normalizeParams(params) + }); +} +__name(_uuidv4, "_uuidv4"); +// @__NO_SIDE_EFFECTS__ +function _uuidv6(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v6", + ...normalizeParams(params) + }); +} +__name(_uuidv6, "_uuidv6"); +// @__NO_SIDE_EFFECTS__ +function _uuidv7(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v7", + ...normalizeParams(params) + }); +} +__name(_uuidv7, "_uuidv7"); +// @__NO_SIDE_EFFECTS__ +function _url(Class2, params) { + return new Class2({ + type: "string", + format: "url", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_url, "_url"); +// @__NO_SIDE_EFFECTS__ +function _emoji2(Class2, params) { + return new Class2({ + type: "string", + format: "emoji", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_emoji2, "_emoji"); +// @__NO_SIDE_EFFECTS__ +function _nanoid(Class2, params) { + return new Class2({ + type: "string", + format: "nanoid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_nanoid, "_nanoid"); +// @__NO_SIDE_EFFECTS__ +function _cuid(Class2, params) { + return new Class2({ + type: "string", + format: "cuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_cuid, "_cuid"); +// @__NO_SIDE_EFFECTS__ +function _cuid2(Class2, params) { + return new Class2({ + type: "string", + format: "cuid2", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_cuid2, "_cuid2"); +// @__NO_SIDE_EFFECTS__ +function _ulid(Class2, params) { + return new Class2({ + type: "string", + format: "ulid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_ulid, "_ulid"); +// @__NO_SIDE_EFFECTS__ +function _xid(Class2, params) { + return new Class2({ + type: "string", + format: "xid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_xid, "_xid"); +// @__NO_SIDE_EFFECTS__ +function _ksuid(Class2, params) { + return new Class2({ + type: "string", + format: "ksuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_ksuid, "_ksuid"); +// @__NO_SIDE_EFFECTS__ +function _ipv4(Class2, params) { + return new Class2({ + type: "string", + format: "ipv4", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_ipv4, "_ipv4"); +// @__NO_SIDE_EFFECTS__ +function _ipv6(Class2, params) { + return new Class2({ + type: "string", + format: "ipv6", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_ipv6, "_ipv6"); +// @__NO_SIDE_EFFECTS__ +function _mac(Class2, params) { + return new Class2({ + type: "string", + format: "mac", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_mac, "_mac"); +// @__NO_SIDE_EFFECTS__ +function _cidrv4(Class2, params) { + return new Class2({ + type: "string", + format: "cidrv4", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_cidrv4, "_cidrv4"); +// @__NO_SIDE_EFFECTS__ +function _cidrv6(Class2, params) { + return new Class2({ + type: "string", + format: "cidrv6", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_cidrv6, "_cidrv6"); +// @__NO_SIDE_EFFECTS__ +function _base64(Class2, params) { + return new Class2({ + type: "string", + format: "base64", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_base64, "_base64"); +// @__NO_SIDE_EFFECTS__ +function _base64url(Class2, params) { + return new Class2({ + type: "string", + format: "base64url", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_base64url, "_base64url"); +// @__NO_SIDE_EFFECTS__ +function _e164(Class2, params) { + return new Class2({ + type: "string", + format: "e164", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_e164, "_e164"); +// @__NO_SIDE_EFFECTS__ +function _jwt(Class2, params) { + return new Class2({ + type: "string", + format: "jwt", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +__name(_jwt, "_jwt"); +var TimePrecision = { + Any: null, + Minute: -1, + Second: 0, + Millisecond: 3, + Microsecond: 6 +}; +// @__NO_SIDE_EFFECTS__ +function _isoDateTime(Class2, params) { + return new Class2({ + type: "string", + format: "datetime", + check: "string_format", + offset: false, + local: false, + precision: null, + ...normalizeParams(params) + }); +} +__name(_isoDateTime, "_isoDateTime"); +// @__NO_SIDE_EFFECTS__ +function _isoDate(Class2, params) { + return new Class2({ + type: "string", + format: "date", + check: "string_format", + ...normalizeParams(params) + }); +} +__name(_isoDate, "_isoDate"); +// @__NO_SIDE_EFFECTS__ +function _isoTime(Class2, params) { + return new Class2({ + type: "string", + format: "time", + check: "string_format", + precision: null, + ...normalizeParams(params) + }); +} +__name(_isoTime, "_isoTime"); +// @__NO_SIDE_EFFECTS__ +function _isoDuration(Class2, params) { + return new Class2({ + type: "string", + format: "duration", + check: "string_format", + ...normalizeParams(params) + }); +} +__name(_isoDuration, "_isoDuration"); +// @__NO_SIDE_EFFECTS__ +function _number(Class2, params) { + return new Class2({ + type: "number", + checks: [], + ...normalizeParams(params) + }); +} +__name(_number, "_number"); +// @__NO_SIDE_EFFECTS__ +function _coercedNumber(Class2, params) { + return new Class2({ + type: "number", + coerce: true, + checks: [], + ...normalizeParams(params) + }); +} +__name(_coercedNumber, "_coercedNumber"); +// @__NO_SIDE_EFFECTS__ +function _int(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "safeint", + ...normalizeParams(params) + }); +} +__name(_int, "_int"); +// @__NO_SIDE_EFFECTS__ +function _float32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "float32", + ...normalizeParams(params) + }); +} +__name(_float32, "_float32"); +// @__NO_SIDE_EFFECTS__ +function _float64(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "float64", + ...normalizeParams(params) + }); +} +__name(_float64, "_float64"); +// @__NO_SIDE_EFFECTS__ +function _int32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "int32", + ...normalizeParams(params) + }); +} +__name(_int32, "_int32"); +// @__NO_SIDE_EFFECTS__ +function _uint32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "uint32", + ...normalizeParams(params) + }); +} +__name(_uint32, "_uint32"); +// @__NO_SIDE_EFFECTS__ +function _boolean(Class2, params) { + return new Class2({ + type: "boolean", + ...normalizeParams(params) + }); +} +__name(_boolean, "_boolean"); +// @__NO_SIDE_EFFECTS__ +function _coercedBoolean(Class2, params) { + return new Class2({ + type: "boolean", + coerce: true, + ...normalizeParams(params) + }); +} +__name(_coercedBoolean, "_coercedBoolean"); +// @__NO_SIDE_EFFECTS__ +function _bigint(Class2, params) { + return new Class2({ + type: "bigint", + ...normalizeParams(params) + }); +} +__name(_bigint, "_bigint"); +// @__NO_SIDE_EFFECTS__ +function _coercedBigint(Class2, params) { + return new Class2({ + type: "bigint", + coerce: true, + ...normalizeParams(params) + }); +} +__name(_coercedBigint, "_coercedBigint"); +// @__NO_SIDE_EFFECTS__ +function _int64(Class2, params) { + return new Class2({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "int64", + ...normalizeParams(params) + }); +} +__name(_int64, "_int64"); +// @__NO_SIDE_EFFECTS__ +function _uint64(Class2, params) { + return new Class2({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "uint64", + ...normalizeParams(params) + }); +} +__name(_uint64, "_uint64"); +// @__NO_SIDE_EFFECTS__ +function _symbol(Class2, params) { + return new Class2({ + type: "symbol", + ...normalizeParams(params) + }); +} +__name(_symbol, "_symbol"); +// @__NO_SIDE_EFFECTS__ +function _undefined2(Class2, params) { + return new Class2({ + type: "undefined", + ...normalizeParams(params) + }); +} +__name(_undefined2, "_undefined"); +// @__NO_SIDE_EFFECTS__ +function _null2(Class2, params) { + return new Class2({ + type: "null", + ...normalizeParams(params) + }); +} +__name(_null2, "_null"); +// @__NO_SIDE_EFFECTS__ +function _any(Class2) { + return new Class2({ + type: "any" + }); +} +__name(_any, "_any"); +// @__NO_SIDE_EFFECTS__ +function _unknown(Class2) { + return new Class2({ + type: "unknown" + }); +} +__name(_unknown, "_unknown"); +// @__NO_SIDE_EFFECTS__ +function _never(Class2, params) { + return new Class2({ + type: "never", + ...normalizeParams(params) + }); +} +__name(_never, "_never"); +// @__NO_SIDE_EFFECTS__ +function _void(Class2, params) { + return new Class2({ + type: "void", + ...normalizeParams(params) + }); +} +__name(_void, "_void"); +// @__NO_SIDE_EFFECTS__ +function _date(Class2, params) { + return new Class2({ + type: "date", + ...normalizeParams(params) + }); +} +__name(_date, "_date"); +// @__NO_SIDE_EFFECTS__ +function _coercedDate(Class2, params) { + return new Class2({ + type: "date", + coerce: true, + ...normalizeParams(params) + }); +} +__name(_coercedDate, "_coercedDate"); +// @__NO_SIDE_EFFECTS__ +function _nan(Class2, params) { + return new Class2({ + type: "nan", + ...normalizeParams(params) + }); +} +__name(_nan, "_nan"); +// @__NO_SIDE_EFFECTS__ +function _lt(value, params) { + return new $ZodCheckLessThan({ + check: "less_than", + ...normalizeParams(params), + value, + inclusive: false + }); +} +__name(_lt, "_lt"); +// @__NO_SIDE_EFFECTS__ +function _lte(value, params) { + return new $ZodCheckLessThan({ + check: "less_than", + ...normalizeParams(params), + value, + inclusive: true + }); +} +__name(_lte, "_lte"); +// @__NO_SIDE_EFFECTS__ +function _gt(value, params) { + return new $ZodCheckGreaterThan({ + check: "greater_than", + ...normalizeParams(params), + value, + inclusive: false + }); +} +__name(_gt, "_gt"); +// @__NO_SIDE_EFFECTS__ +function _gte(value, params) { + return new $ZodCheckGreaterThan({ + check: "greater_than", + ...normalizeParams(params), + value, + inclusive: true + }); +} +__name(_gte, "_gte"); +// @__NO_SIDE_EFFECTS__ +function _positive(params) { + return /* @__PURE__ */ _gt(0, params); +} +__name(_positive, "_positive"); +// @__NO_SIDE_EFFECTS__ +function _negative(params) { + return /* @__PURE__ */ _lt(0, params); +} +__name(_negative, "_negative"); +// @__NO_SIDE_EFFECTS__ +function _nonpositive(params) { + return /* @__PURE__ */ _lte(0, params); +} +__name(_nonpositive, "_nonpositive"); +// @__NO_SIDE_EFFECTS__ +function _nonnegative(params) { + return /* @__PURE__ */ _gte(0, params); +} +__name(_nonnegative, "_nonnegative"); +// @__NO_SIDE_EFFECTS__ +function _multipleOf(value, params) { + return new $ZodCheckMultipleOf({ + check: "multiple_of", + ...normalizeParams(params), + value + }); +} +__name(_multipleOf, "_multipleOf"); +// @__NO_SIDE_EFFECTS__ +function _maxSize(maximum, params) { + return new $ZodCheckMaxSize({ + check: "max_size", + ...normalizeParams(params), + maximum + }); +} +__name(_maxSize, "_maxSize"); +// @__NO_SIDE_EFFECTS__ +function _minSize(minimum, params) { + return new $ZodCheckMinSize({ + check: "min_size", + ...normalizeParams(params), + minimum + }); +} +__name(_minSize, "_minSize"); +// @__NO_SIDE_EFFECTS__ +function _size(size, params) { + return new $ZodCheckSizeEquals({ + check: "size_equals", + ...normalizeParams(params), + size + }); +} +__name(_size, "_size"); +// @__NO_SIDE_EFFECTS__ +function _maxLength(maximum, params) { + const ch = new $ZodCheckMaxLength({ + check: "max_length", + ...normalizeParams(params), + maximum + }); + return ch; +} +__name(_maxLength, "_maxLength"); +// @__NO_SIDE_EFFECTS__ +function _minLength(minimum, params) { + return new $ZodCheckMinLength({ + check: "min_length", + ...normalizeParams(params), + minimum + }); +} +__name(_minLength, "_minLength"); +// @__NO_SIDE_EFFECTS__ +function _length(length, params) { + return new $ZodCheckLengthEquals({ + check: "length_equals", + ...normalizeParams(params), + length + }); +} +__name(_length, "_length"); +// @__NO_SIDE_EFFECTS__ +function _regex(pattern, params) { + return new $ZodCheckRegex({ + check: "string_format", + format: "regex", + ...normalizeParams(params), + pattern + }); +} +__name(_regex, "_regex"); +// @__NO_SIDE_EFFECTS__ +function _lowercase(params) { + return new $ZodCheckLowerCase({ + check: "string_format", + format: "lowercase", + ...normalizeParams(params) + }); +} +__name(_lowercase, "_lowercase"); +// @__NO_SIDE_EFFECTS__ +function _uppercase(params) { + return new $ZodCheckUpperCase({ + check: "string_format", + format: "uppercase", + ...normalizeParams(params) + }); +} +__name(_uppercase, "_uppercase"); +// @__NO_SIDE_EFFECTS__ +function _includes(includes, params) { + return new $ZodCheckIncludes({ + check: "string_format", + format: "includes", + ...normalizeParams(params), + includes + }); +} +__name(_includes, "_includes"); +// @__NO_SIDE_EFFECTS__ +function _startsWith(prefix, params) { + return new $ZodCheckStartsWith({ + check: "string_format", + format: "starts_with", + ...normalizeParams(params), + prefix + }); +} +__name(_startsWith, "_startsWith"); +// @__NO_SIDE_EFFECTS__ +function _endsWith(suffix, params) { + return new $ZodCheckEndsWith({ + check: "string_format", + format: "ends_with", + ...normalizeParams(params), + suffix + }); +} +__name(_endsWith, "_endsWith"); +// @__NO_SIDE_EFFECTS__ +function _property(property, schema, params) { + return new $ZodCheckProperty({ + check: "property", + property, + schema, + ...normalizeParams(params) + }); +} +__name(_property, "_property"); +// @__NO_SIDE_EFFECTS__ +function _mime(types, params) { + return new $ZodCheckMimeType({ + check: "mime_type", + mime: types, + ...normalizeParams(params) + }); +} +__name(_mime, "_mime"); +// @__NO_SIDE_EFFECTS__ +function _overwrite(tx) { + return new $ZodCheckOverwrite({ + check: "overwrite", + tx + }); +} +__name(_overwrite, "_overwrite"); +// @__NO_SIDE_EFFECTS__ +function _normalize(form) { + return /* @__PURE__ */ _overwrite((input) => input.normalize(form)); +} +__name(_normalize, "_normalize"); +// @__NO_SIDE_EFFECTS__ +function _trim() { + return /* @__PURE__ */ _overwrite((input) => input.trim()); +} +__name(_trim, "_trim"); +// @__NO_SIDE_EFFECTS__ +function _toLowerCase() { + return /* @__PURE__ */ _overwrite((input) => input.toLowerCase()); +} +__name(_toLowerCase, "_toLowerCase"); +// @__NO_SIDE_EFFECTS__ +function _toUpperCase() { + return /* @__PURE__ */ _overwrite((input) => input.toUpperCase()); +} +__name(_toUpperCase, "_toUpperCase"); +// @__NO_SIDE_EFFECTS__ +function _slugify() { + return /* @__PURE__ */ _overwrite((input) => slugify(input)); +} +__name(_slugify, "_slugify"); +// @__NO_SIDE_EFFECTS__ +function _array(Class2, element, params) { + return new Class2({ + type: "array", + element, + // get element() { + // return element; + // }, + ...normalizeParams(params) + }); +} +__name(_array, "_array"); +// @__NO_SIDE_EFFECTS__ +function _union(Class2, options, params) { + return new Class2({ + type: "union", + options, + ...normalizeParams(params) + }); +} +__name(_union, "_union"); +function _xor(Class2, options, params) { + return new Class2({ + type: "union", + options, + inclusive: false, + ...normalizeParams(params) + }); +} +__name(_xor, "_xor"); +// @__NO_SIDE_EFFECTS__ +function _discriminatedUnion(Class2, discriminator, options, params) { + return new Class2({ + type: "union", + options, + discriminator, + ...normalizeParams(params) + }); +} +__name(_discriminatedUnion, "_discriminatedUnion"); +// @__NO_SIDE_EFFECTS__ +function _intersection(Class2, left, right) { + return new Class2({ + type: "intersection", + left, + right + }); +} +__name(_intersection, "_intersection"); +// @__NO_SIDE_EFFECTS__ +function _tuple(Class2, items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new Class2({ + type: "tuple", + items, + rest, + ...normalizeParams(params) + }); +} +__name(_tuple, "_tuple"); +// @__NO_SIDE_EFFECTS__ +function _record(Class2, keyType, valueType, params) { + return new Class2({ + type: "record", + keyType, + valueType, + ...normalizeParams(params) + }); +} +__name(_record, "_record"); +// @__NO_SIDE_EFFECTS__ +function _map(Class2, keyType, valueType, params) { + return new Class2({ + type: "map", + keyType, + valueType, + ...normalizeParams(params) + }); +} +__name(_map, "_map"); +// @__NO_SIDE_EFFECTS__ +function _set(Class2, valueType, params) { + return new Class2({ + type: "set", + valueType, + ...normalizeParams(params) + }); +} +__name(_set, "_set"); +// @__NO_SIDE_EFFECTS__ +function _enum(Class2, values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values; + return new Class2({ + type: "enum", + entries, + ...normalizeParams(params) + }); +} +__name(_enum, "_enum"); +// @__NO_SIDE_EFFECTS__ +function _nativeEnum(Class2, entries, params) { + return new Class2({ + type: "enum", + entries, + ...normalizeParams(params) + }); +} +__name(_nativeEnum, "_nativeEnum"); +// @__NO_SIDE_EFFECTS__ +function _literal(Class2, value, params) { + return new Class2({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...normalizeParams(params) + }); +} +__name(_literal, "_literal"); +// @__NO_SIDE_EFFECTS__ +function _file(Class2, params) { + return new Class2({ + type: "file", + ...normalizeParams(params) + }); +} +__name(_file, "_file"); +// @__NO_SIDE_EFFECTS__ +function _transform(Class2, fn) { + return new Class2({ + type: "transform", + transform: fn + }); +} +__name(_transform, "_transform"); +// @__NO_SIDE_EFFECTS__ +function _optional(Class2, innerType) { + return new Class2({ + type: "optional", + innerType + }); +} +__name(_optional, "_optional"); +// @__NO_SIDE_EFFECTS__ +function _nullable(Class2, innerType) { + return new Class2({ + type: "nullable", + innerType + }); +} +__name(_nullable, "_nullable"); +// @__NO_SIDE_EFFECTS__ +function _default(Class2, innerType, defaultValue) { + return new Class2({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue); + } + }); +} +__name(_default, "_default"); +// @__NO_SIDE_EFFECTS__ +function _nonoptional(Class2, innerType, params) { + return new Class2({ + type: "nonoptional", + innerType, + ...normalizeParams(params) + }); +} +__name(_nonoptional, "_nonoptional"); +// @__NO_SIDE_EFFECTS__ +function _success(Class2, innerType) { + return new Class2({ + type: "success", + innerType + }); +} +__name(_success, "_success"); +// @__NO_SIDE_EFFECTS__ +function _catch(Class2, innerType, catchValue) { + return new Class2({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +__name(_catch, "_catch"); +// @__NO_SIDE_EFFECTS__ +function _pipe(Class2, in_, out) { + return new Class2({ + type: "pipe", + in: in_, + out + }); +} +__name(_pipe, "_pipe"); +// @__NO_SIDE_EFFECTS__ +function _readonly(Class2, innerType) { + return new Class2({ + type: "readonly", + innerType + }); +} +__name(_readonly, "_readonly"); +// @__NO_SIDE_EFFECTS__ +function _templateLiteral(Class2, parts, params) { + return new Class2({ + type: "template_literal", + parts, + ...normalizeParams(params) + }); +} +__name(_templateLiteral, "_templateLiteral"); +// @__NO_SIDE_EFFECTS__ +function _lazy(Class2, getter) { + return new Class2({ + type: "lazy", + getter + }); +} +__name(_lazy, "_lazy"); +// @__NO_SIDE_EFFECTS__ +function _promise(Class2, innerType) { + return new Class2({ + type: "promise", + innerType + }); +} +__name(_promise, "_promise"); +// @__NO_SIDE_EFFECTS__ +function _custom(Class2, fn, _params) { + const norm = normalizeParams(_params); + norm.abort ?? (norm.abort = true); + const schema = new Class2({ + type: "custom", + check: "custom", + fn, + ...norm + }); + return schema; +} +__name(_custom, "_custom"); +// @__NO_SIDE_EFFECTS__ +function _refine(Class2, fn, _params) { + const schema = new Class2({ + type: "custom", + check: "custom", + fn, + ...normalizeParams(_params) + }); + return schema; +} +__name(_refine, "_refine"); +// @__NO_SIDE_EFFECTS__ +function _superRefine(fn) { + const ch = /* @__PURE__ */ _check((payload) => { + payload.addIssue = (issue2) => { + if (typeof issue2 === "string") { + payload.issues.push(issue(issue2, payload.value, ch._zod.def)); + } else { + const _issue = issue2; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = ch); + _issue.continue ?? (_issue.continue = !ch._zod.def.abort); + payload.issues.push(issue(_issue)); + } + }; + return fn(payload.value, payload); + }); + return ch; +} +__name(_superRefine, "_superRefine"); +// @__NO_SIDE_EFFECTS__ +function _check(fn, params) { + const ch = new $ZodCheck({ + check: "custom", + ...normalizeParams(params) + }); + ch._zod.check = fn; + return ch; +} +__name(_check, "_check"); +// @__NO_SIDE_EFFECTS__ +function describe(description) { + const ch = new $ZodCheck({ check: "describe" }); + ch._zod.onattach = [ + (inst) => { + const existing = globalRegistry.get(inst) ?? {}; + globalRegistry.add(inst, { ...existing, description }); + } + ]; + ch._zod.check = () => { + }; + return ch; +} +__name(describe, "describe"); +// @__NO_SIDE_EFFECTS__ +function meta(metadata) { + const ch = new $ZodCheck({ check: "meta" }); + ch._zod.onattach = [ + (inst) => { + const existing = globalRegistry.get(inst) ?? {}; + globalRegistry.add(inst, { ...existing, ...metadata }); + } + ]; + ch._zod.check = () => { + }; + return ch; +} +__name(meta, "meta"); +// @__NO_SIDE_EFFECTS__ +function _stringbool(Classes, _params) { + const params = normalizeParams(_params); + let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"]; + let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"]; + if (params.case !== "sensitive") { + truthyArray = truthyArray.map((v2) => typeof v2 === "string" ? v2.toLowerCase() : v2); + falsyArray = falsyArray.map((v2) => typeof v2 === "string" ? v2.toLowerCase() : v2); + } + const truthySet = new Set(truthyArray); + const falsySet = new Set(falsyArray); + const _Codec = Classes.Codec ?? $ZodCodec; + const _Boolean = Classes.Boolean ?? $ZodBoolean; + const _String = Classes.String ?? $ZodString; + const stringSchema = new _String({ type: "string", error: params.error }); + const booleanSchema = new _Boolean({ type: "boolean", error: params.error }); + const codec2 = new _Codec({ + type: "pipe", + in: stringSchema, + out: booleanSchema, + transform: /* @__PURE__ */ __name(((input, payload) => { + let data = input; + if (params.case !== "sensitive") + data = data.toLowerCase(); + if (truthySet.has(data)) { + return true; + } else if (falsySet.has(data)) { + return false; + } else { + payload.issues.push({ + code: "invalid_value", + expected: "stringbool", + values: [...truthySet, ...falsySet], + input: payload.value, + inst: codec2, + continue: false + }); + return {}; + } + }), "transform"), + reverseTransform: /* @__PURE__ */ __name(((input, _payload) => { + if (input === true) { + return truthyArray[0] || "true"; + } else { + return falsyArray[0] || "false"; + } + }), "reverseTransform"), + error: params.error + }); + return codec2; +} +__name(_stringbool, "_stringbool"); +// @__NO_SIDE_EFFECTS__ +function _stringFormat(Class2, format, fnOrRegex, _params = {}) { + const params = normalizeParams(_params); + const def = { + ...normalizeParams(_params), + check: "string_format", + type: "string", + format, + fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val), + ...params + }; + if (fnOrRegex instanceof RegExp) { + def.pattern = fnOrRegex; + } + const inst = new Class2(def); + return inst; +} +__name(_stringFormat, "_stringFormat"); + +// ../../node_modules/zod/v4/core/to-json-schema.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function initializeContext(params) { + let target2 = params?.target ?? "draft-2020-12"; + if (target2 === "draft-4") + target2 = "draft-04"; + if (target2 === "draft-7") + target2 = "draft-07"; + return { + processors: params.processors ?? {}, + metadataRegistry: params?.metadata ?? globalRegistry, + target: target2, + unrepresentable: params?.unrepresentable ?? "throw", + override: params?.override ?? (() => { + }), + io: params?.io ?? "output", + counter: 0, + seen: /* @__PURE__ */ new Map(), + cycles: params?.cycles ?? "ref", + reused: params?.reused ?? "inline", + external: params?.external ?? void 0 + }; +} +__name(initializeContext, "initializeContext"); +function process2(schema, ctx, _params = { path: [], schemaPath: [] }) { + var _a2; + const def = schema._zod.def; + const seen = ctx.seen.get(schema); + if (seen) { + seen.count++; + const isCycle = _params.schemaPath.includes(schema); + if (isCycle) { + seen.cycle = _params.path; + } + return seen.schema; + } + const result = { schema: {}, count: 1, cycle: void 0, path: _params.path }; + ctx.seen.set(schema, result); + const overrideSchema = schema._zod.toJSONSchema?.(); + if (overrideSchema) { + result.schema = overrideSchema; + } else { + const params = { + ..._params, + schemaPath: [..._params.schemaPath, schema], + path: _params.path + }; + if (schema._zod.processJSONSchema) { + schema._zod.processJSONSchema(ctx, result.schema, params); + } else { + const _json = result.schema; + const processor = ctx.processors[def.type]; + if (!processor) { + throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`); + } + processor(schema, ctx, _json, params); + } + const parent = schema._zod.parent; + if (parent) { + if (!result.ref) + result.ref = parent; + process2(parent, ctx, params); + ctx.seen.get(parent).isParent = true; + } + } + const meta3 = ctx.metadataRegistry.get(schema); + if (meta3) + Object.assign(result.schema, meta3); + if (ctx.io === "input" && isTransforming(schema)) { + delete result.schema.examples; + delete result.schema.default; + } + if (ctx.io === "input" && result.schema._prefault) + (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault); + delete result.schema._prefault; + const _result = ctx.seen.get(schema); + return _result.schema; +} +__name(process2, "process"); +function extractDefs(ctx, schema) { + const root = ctx.seen.get(schema); + if (!root) + throw new Error("Unprocessed schema. This is a bug in Zod."); + const idToSchema = /* @__PURE__ */ new Map(); + for (const entry of ctx.seen.entries()) { + const id = ctx.metadataRegistry.get(entry[0])?.id; + if (id) { + const existing = idToSchema.get(id); + if (existing && existing !== entry[0]) { + throw new Error(`Duplicate schema id "${id}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`); + } + idToSchema.set(id, entry[0]); + } + } + const makeURI = /* @__PURE__ */ __name((entry) => { + const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions"; + if (ctx.external) { + const externalId = ctx.external.registry.get(entry[0])?.id; + const uriGenerator = ctx.external.uri ?? ((id2) => id2); + if (externalId) { + return { ref: uriGenerator(externalId) }; + } + const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`; + entry[1].defId = id; + return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` }; + } + if (entry[1] === root) { + return { ref: "#" }; + } + const uriPrefix = `#`; + const defUriPrefix = `${uriPrefix}/${defsSegment}/`; + const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`; + return { defId, ref: defUriPrefix + defId }; + }, "makeURI"); + const extractToDef = /* @__PURE__ */ __name((entry) => { + if (entry[1].schema.$ref) { + return; + } + const seen = entry[1]; + const { ref: ref2, defId } = makeURI(entry); + seen.def = { ...seen.schema }; + if (defId) + seen.defId = defId; + const schema2 = seen.schema; + for (const key in schema2) { + delete schema2[key]; + } + schema2.$ref = ref2; + }, "extractToDef"); + if (ctx.cycles === "throw") { + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (seen.cycle) { + throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); + } + } + } + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (schema === entry[0]) { + extractToDef(entry); + continue; + } + if (ctx.external) { + const ext = ctx.external.registry.get(entry[0])?.id; + if (schema !== entry[0] && ext) { + extractToDef(entry); + continue; + } + } + const id = ctx.metadataRegistry.get(entry[0])?.id; + if (id) { + extractToDef(entry); + continue; + } + if (seen.cycle) { + extractToDef(entry); + continue; + } + if (seen.count > 1) { + if (ctx.reused === "ref") { + extractToDef(entry); + continue; + } + } + } +} +__name(extractDefs, "extractDefs"); +function finalize(ctx, schema) { + const root = ctx.seen.get(schema); + if (!root) + throw new Error("Unprocessed schema. This is a bug in Zod."); + const flattenRef = /* @__PURE__ */ __name((zodSchema) => { + const seen = ctx.seen.get(zodSchema); + if (seen.ref === null) + return; + const schema2 = seen.def ?? seen.schema; + const _cached = { ...schema2 }; + const ref2 = seen.ref; + seen.ref = null; + if (ref2) { + flattenRef(ref2); + const refSeen = ctx.seen.get(ref2); + const refSchema = refSeen.schema; + if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) { + schema2.allOf = schema2.allOf ?? []; + schema2.allOf.push(refSchema); + } else { + Object.assign(schema2, refSchema); + } + Object.assign(schema2, _cached); + const isParentRef = zodSchema._zod.parent === ref2; + if (isParentRef) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (!(key in _cached)) { + delete schema2[key]; + } + } + } + if (refSchema.$ref && refSeen.def) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (key in refSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(refSeen.def[key])) { + delete schema2[key]; + } + } + } + } + const parent = zodSchema._zod.parent; + if (parent && parent !== ref2) { + flattenRef(parent); + const parentSeen = ctx.seen.get(parent); + if (parentSeen?.schema.$ref) { + schema2.$ref = parentSeen.schema.$ref; + if (parentSeen.def) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (key in parentSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(parentSeen.def[key])) { + delete schema2[key]; + } + } + } + } + } + ctx.override({ + zodSchema, + jsonSchema: schema2, + path: seen.path ?? [] + }); + }, "flattenRef"); + for (const entry of [...ctx.seen.entries()].reverse()) { + flattenRef(entry[0]); + } + const result = {}; + if (ctx.target === "draft-2020-12") { + result.$schema = "https://json-schema.org/draft/2020-12/schema"; + } else if (ctx.target === "draft-07") { + result.$schema = "http://json-schema.org/draft-07/schema#"; + } else if (ctx.target === "draft-04") { + result.$schema = "http://json-schema.org/draft-04/schema#"; + } else if (ctx.target === "openapi-3.0") { + } else { + } + if (ctx.external?.uri) { + const id = ctx.external.registry.get(schema)?.id; + if (!id) + throw new Error("Schema is missing an `id` property"); + result.$id = ctx.external.uri(id); + } + Object.assign(result, root.def ?? root.schema); + const defs = ctx.external?.defs ?? {}; + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (seen.def && seen.defId) { + defs[seen.defId] = seen.def; + } + } + if (ctx.external) { + } else { + if (Object.keys(defs).length > 0) { + if (ctx.target === "draft-2020-12") { + result.$defs = defs; + } else { + result.definitions = defs; + } + } + } + try { + const finalized = JSON.parse(JSON.stringify(result)); + Object.defineProperty(finalized, "~standard", { + value: { + ...schema["~standard"], + jsonSchema: { + input: createStandardJSONSchemaMethod(schema, "input", ctx.processors), + output: createStandardJSONSchemaMethod(schema, "output", ctx.processors) + } + }, + enumerable: false, + writable: false + }); + return finalized; + } catch (_err) { + throw new Error("Error converting schema to JSON."); + } +} +__name(finalize, "finalize"); +function isTransforming(_schema, _ctx) { + const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() }; + if (ctx.seen.has(_schema)) + return false; + ctx.seen.add(_schema); + const def = _schema._zod.def; + if (def.type === "transform") + return true; + if (def.type === "array") + return isTransforming(def.element, ctx); + if (def.type === "set") + return isTransforming(def.valueType, ctx); + if (def.type === "lazy") + return isTransforming(def.getter(), ctx); + if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") { + return isTransforming(def.innerType, ctx); + } + if (def.type === "intersection") { + return isTransforming(def.left, ctx) || isTransforming(def.right, ctx); + } + if (def.type === "record" || def.type === "map") { + return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx); + } + if (def.type === "pipe") { + return isTransforming(def.in, ctx) || isTransforming(def.out, ctx); + } + if (def.type === "object") { + for (const key in def.shape) { + if (isTransforming(def.shape[key], ctx)) + return true; + } + return false; + } + if (def.type === "union") { + for (const option of def.options) { + if (isTransforming(option, ctx)) + return true; + } + return false; + } + if (def.type === "tuple") { + for (const item of def.items) { + if (isTransforming(item, ctx)) + return true; + } + if (def.rest && isTransforming(def.rest, ctx)) + return true; + return false; + } + return false; +} +__name(isTransforming, "isTransforming"); +var createToJSONSchemaMethod = /* @__PURE__ */ __name((schema, processors = {}) => (params) => { + const ctx = initializeContext({ ...params, processors }); + process2(schema, ctx); + extractDefs(ctx, schema); + return finalize(ctx, schema); +}, "createToJSONSchemaMethod"); +var createStandardJSONSchemaMethod = /* @__PURE__ */ __name((schema, io, processors = {}) => (params) => { + const { libraryOptions, target: target2 } = params ?? {}; + const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors }); + process2(schema, ctx); + extractDefs(ctx, schema); + return finalize(ctx, schema); +}, "createStandardJSONSchemaMethod"); + +// ../../node_modules/zod/v4/core/json-schema-processors.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var formatMap = { + guid: "uuid", + url: "uri", + datetime: "date-time", + json_string: "json-string", + regex: "" + // do not set +}; +var stringProcessor = /* @__PURE__ */ __name((schema, ctx, _json, _params) => { + const json2 = _json; + json2.type = "string"; + const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag; + if (typeof minimum === "number") + json2.minLength = minimum; + if (typeof maximum === "number") + json2.maxLength = maximum; + if (format) { + json2.format = formatMap[format] ?? format; + if (json2.format === "") + delete json2.format; + if (format === "time") { + delete json2.format; + } + } + if (contentEncoding) + json2.contentEncoding = contentEncoding; + if (patterns && patterns.size > 0) { + const regexes = [...patterns]; + if (regexes.length === 1) + json2.pattern = regexes[0].source; + else if (regexes.length > 1) { + json2.allOf = [ + ...regexes.map((regex) => ({ + ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {}, + pattern: regex.source + })) + ]; + } + } +}, "stringProcessor"); +var numberProcessor = /* @__PURE__ */ __name((schema, ctx, _json, _params) => { + const json2 = _json; + const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag; + if (typeof format === "string" && format.includes("int")) + json2.type = "integer"; + else + json2.type = "number"; + if (typeof exclusiveMinimum === "number") { + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json2.minimum = exclusiveMinimum; + json2.exclusiveMinimum = true; + } else { + json2.exclusiveMinimum = exclusiveMinimum; + } + } + if (typeof minimum === "number") { + json2.minimum = minimum; + if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") { + if (exclusiveMinimum >= minimum) + delete json2.minimum; + else + delete json2.exclusiveMinimum; + } + } + if (typeof exclusiveMaximum === "number") { + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json2.maximum = exclusiveMaximum; + json2.exclusiveMaximum = true; + } else { + json2.exclusiveMaximum = exclusiveMaximum; + } + } + if (typeof maximum === "number") { + json2.maximum = maximum; + if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") { + if (exclusiveMaximum <= maximum) + delete json2.maximum; + else + delete json2.exclusiveMaximum; + } + } + if (typeof multipleOf === "number") + json2.multipleOf = multipleOf; +}, "numberProcessor"); +var booleanProcessor = /* @__PURE__ */ __name((_schema, _ctx, json2, _params) => { + json2.type = "boolean"; +}, "booleanProcessor"); +var bigintProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("BigInt cannot be represented in JSON Schema"); + } +}, "bigintProcessor"); +var symbolProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Symbols cannot be represented in JSON Schema"); + } +}, "symbolProcessor"); +var nullProcessor = /* @__PURE__ */ __name((_schema, ctx, json2, _params) => { + if (ctx.target === "openapi-3.0") { + json2.type = "string"; + json2.nullable = true; + json2.enum = [null]; + } else { + json2.type = "null"; + } +}, "nullProcessor"); +var undefinedProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Undefined cannot be represented in JSON Schema"); + } +}, "undefinedProcessor"); +var voidProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Void cannot be represented in JSON Schema"); + } +}, "voidProcessor"); +var neverProcessor = /* @__PURE__ */ __name((_schema, _ctx, json2, _params) => { + json2.not = {}; +}, "neverProcessor"); +var anyProcessor = /* @__PURE__ */ __name((_schema, _ctx, _json, _params) => { +}, "anyProcessor"); +var unknownProcessor = /* @__PURE__ */ __name((_schema, _ctx, _json, _params) => { +}, "unknownProcessor"); +var dateProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Date cannot be represented in JSON Schema"); + } +}, "dateProcessor"); +var enumProcessor = /* @__PURE__ */ __name((schema, _ctx, json2, _params) => { + const def = schema._zod.def; + const values = getEnumValues(def.entries); + if (values.every((v2) => typeof v2 === "number")) + json2.type = "number"; + if (values.every((v2) => typeof v2 === "string")) + json2.type = "string"; + json2.enum = values; +}, "enumProcessor"); +var literalProcessor = /* @__PURE__ */ __name((schema, ctx, json2, _params) => { + const def = schema._zod.def; + const vals = []; + for (const val of def.values) { + if (val === void 0) { + if (ctx.unrepresentable === "throw") { + throw new Error("Literal `undefined` cannot be represented in JSON Schema"); + } else { + } + } else if (typeof val === "bigint") { + if (ctx.unrepresentable === "throw") { + throw new Error("BigInt literals cannot be represented in JSON Schema"); + } else { + vals.push(Number(val)); + } + } else { + vals.push(val); + } + } + if (vals.length === 0) { + } else if (vals.length === 1) { + const val = vals[0]; + json2.type = val === null ? "null" : typeof val; + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json2.enum = [val]; + } else { + json2.const = val; + } + } else { + if (vals.every((v2) => typeof v2 === "number")) + json2.type = "number"; + if (vals.every((v2) => typeof v2 === "string")) + json2.type = "string"; + if (vals.every((v2) => typeof v2 === "boolean")) + json2.type = "boolean"; + if (vals.every((v2) => v2 === null)) + json2.type = "null"; + json2.enum = vals; + } +}, "literalProcessor"); +var nanProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("NaN cannot be represented in JSON Schema"); + } +}, "nanProcessor"); +var templateLiteralProcessor = /* @__PURE__ */ __name((schema, _ctx, json2, _params) => { + const _json = json2; + const pattern = schema._zod.pattern; + if (!pattern) + throw new Error("Pattern not found in template literal"); + _json.type = "string"; + _json.pattern = pattern.source; +}, "templateLiteralProcessor"); +var fileProcessor = /* @__PURE__ */ __name((schema, _ctx, json2, _params) => { + const _json = json2; + const file2 = { + type: "string", + format: "binary", + contentEncoding: "binary" + }; + const { minimum, maximum, mime } = schema._zod.bag; + if (minimum !== void 0) + file2.minLength = minimum; + if (maximum !== void 0) + file2.maxLength = maximum; + if (mime) { + if (mime.length === 1) { + file2.contentMediaType = mime[0]; + Object.assign(_json, file2); + } else { + Object.assign(_json, file2); + _json.anyOf = mime.map((m) => ({ contentMediaType: m })); + } + } else { + Object.assign(_json, file2); + } +}, "fileProcessor"); +var successProcessor = /* @__PURE__ */ __name((_schema, _ctx, json2, _params) => { + json2.type = "boolean"; +}, "successProcessor"); +var customProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Custom types cannot be represented in JSON Schema"); + } +}, "customProcessor"); +var functionProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Function types cannot be represented in JSON Schema"); + } +}, "functionProcessor"); +var transformProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Transforms cannot be represented in JSON Schema"); + } +}, "transformProcessor"); +var mapProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Map cannot be represented in JSON Schema"); + } +}, "mapProcessor"); +var setProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Set cannot be represented in JSON Schema"); + } +}, "setProcessor"); +var arrayProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const json2 = _json; + const def = schema._zod.def; + const { minimum, maximum } = schema._zod.bag; + if (typeof minimum === "number") + json2.minItems = minimum; + if (typeof maximum === "number") + json2.maxItems = maximum; + json2.type = "array"; + json2.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] }); +}, "arrayProcessor"); +var objectProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const json2 = _json; + const def = schema._zod.def; + json2.type = "object"; + json2.properties = {}; + const shape = def.shape; + for (const key in shape) { + json2.properties[key] = process2(shape[key], ctx, { + ...params, + path: [...params.path, "properties", key] + }); + } + const allKeys = new Set(Object.keys(shape)); + const requiredKeys = new Set([...allKeys].filter((key) => { + const v2 = def.shape[key]._zod; + if (ctx.io === "input") { + return v2.optin === void 0; + } else { + return v2.optout === void 0; + } + })); + if (requiredKeys.size > 0) { + json2.required = Array.from(requiredKeys); + } + if (def.catchall?._zod.def.type === "never") { + json2.additionalProperties = false; + } else if (!def.catchall) { + if (ctx.io === "output") + json2.additionalProperties = false; + } else if (def.catchall) { + json2.additionalProperties = process2(def.catchall, ctx, { + ...params, + path: [...params.path, "additionalProperties"] + }); + } +}, "objectProcessor"); +var unionProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + const isExclusive = def.inclusive === false; + const options = def.options.map((x, i) => process2(x, ctx, { + ...params, + path: [...params.path, isExclusive ? "oneOf" : "anyOf", i] + })); + if (isExclusive) { + json2.oneOf = options; + } else { + json2.anyOf = options; + } +}, "unionProcessor"); +var intersectionProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + const a = process2(def.left, ctx, { + ...params, + path: [...params.path, "allOf", 0] + }); + const b = process2(def.right, ctx, { + ...params, + path: [...params.path, "allOf", 1] + }); + const isSimpleIntersection = /* @__PURE__ */ __name((val) => "allOf" in val && Object.keys(val).length === 1, "isSimpleIntersection"); + const allOf = [ + ...isSimpleIntersection(a) ? a.allOf : [a], + ...isSimpleIntersection(b) ? b.allOf : [b] + ]; + json2.allOf = allOf; +}, "intersectionProcessor"); +var tupleProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const json2 = _json; + const def = schema._zod.def; + json2.type = "array"; + const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items"; + const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems"; + const prefixItems = def.items.map((x, i) => process2(x, ctx, { + ...params, + path: [...params.path, prefixPath, i] + })); + const rest = def.rest ? process2(def.rest, ctx, { + ...params, + path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []] + }) : null; + if (ctx.target === "draft-2020-12") { + json2.prefixItems = prefixItems; + if (rest) { + json2.items = rest; + } + } else if (ctx.target === "openapi-3.0") { + json2.items = { + anyOf: prefixItems + }; + if (rest) { + json2.items.anyOf.push(rest); + } + json2.minItems = prefixItems.length; + if (!rest) { + json2.maxItems = prefixItems.length; + } + } else { + json2.items = prefixItems; + if (rest) { + json2.additionalItems = rest; + } + } + const { minimum, maximum } = schema._zod.bag; + if (typeof minimum === "number") + json2.minItems = minimum; + if (typeof maximum === "number") + json2.maxItems = maximum; +}, "tupleProcessor"); +var recordProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const json2 = _json; + const def = schema._zod.def; + json2.type = "object"; + const keyType = def.keyType; + const keyBag = keyType._zod.bag; + const patterns = keyBag?.patterns; + if (def.mode === "loose" && patterns && patterns.size > 0) { + const valueSchema = process2(def.valueType, ctx, { + ...params, + path: [...params.path, "patternProperties", "*"] + }); + json2.patternProperties = {}; + for (const pattern of patterns) { + json2.patternProperties[pattern.source] = valueSchema; + } + } else { + if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") { + json2.propertyNames = process2(def.keyType, ctx, { + ...params, + path: [...params.path, "propertyNames"] + }); + } + json2.additionalProperties = process2(def.valueType, ctx, { + ...params, + path: [...params.path, "additionalProperties"] + }); + } + const keyValues = keyType._zod.values; + if (keyValues) { + const validKeyValues = [...keyValues].filter((v2) => typeof v2 === "string" || typeof v2 === "number"); + if (validKeyValues.length > 0) { + json2.required = validKeyValues; + } + } +}, "recordProcessor"); +var nullableProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + const inner = process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + if (ctx.target === "openapi-3.0") { + seen.ref = def.innerType; + json2.nullable = true; + } else { + json2.anyOf = [inner, { type: "null" }]; + } +}, "nullableProcessor"); +var nonoptionalProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; +}, "nonoptionalProcessor"); +var defaultProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + json2.default = JSON.parse(JSON.stringify(def.defaultValue)); +}, "defaultProcessor"); +var prefaultProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + if (ctx.io === "input") + json2._prefault = JSON.parse(JSON.stringify(def.defaultValue)); +}, "prefaultProcessor"); +var catchProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + let catchValue; + try { + catchValue = def.catchValue(void 0); + } catch { + throw new Error("Dynamic catch values are not supported in JSON Schema"); + } + json2.default = catchValue; +}, "catchProcessor"); +var pipeProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const def = schema._zod.def; + const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out; + process2(innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = innerType; +}, "pipeProcessor"); +var readonlyProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + json2.readOnly = true; +}, "readonlyProcessor"); +var promiseProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; +}, "promiseProcessor"); +var optionalProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; +}, "optionalProcessor"); +var lazyProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const innerType = schema._zod.innerType; + process2(innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = innerType; +}, "lazyProcessor"); +var allProcessors = { + string: stringProcessor, + number: numberProcessor, + boolean: booleanProcessor, + bigint: bigintProcessor, + symbol: symbolProcessor, + null: nullProcessor, + undefined: undefinedProcessor, + void: voidProcessor, + never: neverProcessor, + any: anyProcessor, + unknown: unknownProcessor, + date: dateProcessor, + enum: enumProcessor, + literal: literalProcessor, + nan: nanProcessor, + template_literal: templateLiteralProcessor, + file: fileProcessor, + success: successProcessor, + custom: customProcessor, + function: functionProcessor, + transform: transformProcessor, + map: mapProcessor, + set: setProcessor, + array: arrayProcessor, + object: objectProcessor, + union: unionProcessor, + intersection: intersectionProcessor, + tuple: tupleProcessor, + record: recordProcessor, + nullable: nullableProcessor, + nonoptional: nonoptionalProcessor, + default: defaultProcessor, + prefault: prefaultProcessor, + catch: catchProcessor, + pipe: pipeProcessor, + readonly: readonlyProcessor, + promise: promiseProcessor, + optional: optionalProcessor, + lazy: lazyProcessor +}; +function toJSONSchema(input, params) { + if ("_idmap" in input) { + const registry2 = input; + const ctx2 = initializeContext({ ...params, processors: allProcessors }); + const defs = {}; + for (const entry of registry2._idmap.entries()) { + const [_, schema] = entry; + process2(schema, ctx2); + } + const schemas = {}; + const external = { + registry: registry2, + uri: params?.uri, + defs + }; + ctx2.external = external; + for (const entry of registry2._idmap.entries()) { + const [key, schema] = entry; + extractDefs(ctx2, schema); + schemas[key] = finalize(ctx2, schema); + } + if (Object.keys(defs).length > 0) { + const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions"; + schemas.__shared = { + [defsSegment]: defs + }; + } + return { schemas }; + } + const ctx = initializeContext({ ...params, processors: allProcessors }); + process2(input, ctx); + extractDefs(ctx, input); + return finalize(ctx, input); +} +__name(toJSONSchema, "toJSONSchema"); + +// ../../node_modules/zod/v4/core/json-schema-generator.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var JSONSchemaGenerator = class { + static { + __name(this, "JSONSchemaGenerator"); + } + /** @deprecated Access via ctx instead */ + get metadataRegistry() { + return this.ctx.metadataRegistry; + } + /** @deprecated Access via ctx instead */ + get target() { + return this.ctx.target; + } + /** @deprecated Access via ctx instead */ + get unrepresentable() { + return this.ctx.unrepresentable; + } + /** @deprecated Access via ctx instead */ + get override() { + return this.ctx.override; + } + /** @deprecated Access via ctx instead */ + get io() { + return this.ctx.io; + } + /** @deprecated Access via ctx instead */ + get counter() { + return this.ctx.counter; + } + set counter(value) { + this.ctx.counter = value; + } + /** @deprecated Access via ctx instead */ + get seen() { + return this.ctx.seen; + } + constructor(params) { + let normalizedTarget = params?.target ?? "draft-2020-12"; + if (normalizedTarget === "draft-4") + normalizedTarget = "draft-04"; + if (normalizedTarget === "draft-7") + normalizedTarget = "draft-07"; + this.ctx = initializeContext({ + processors: allProcessors, + target: normalizedTarget, + ...params?.metadata && { metadata: params.metadata }, + ...params?.unrepresentable && { unrepresentable: params.unrepresentable }, + ...params?.override && { override: params.override }, + ...params?.io && { io: params.io } + }); + } + /** + * Process a schema to prepare it for JSON Schema generation. + * This must be called before emit(). + */ + process(schema, _params = { path: [], schemaPath: [] }) { + return process2(schema, this.ctx, _params); + } + /** + * Emit the final JSON Schema after processing. + * Must call process() first. + */ + emit(schema, _params) { + if (_params) { + if (_params.cycles) + this.ctx.cycles = _params.cycles; + if (_params.reused) + this.ctx.reused = _params.reused; + if (_params.external) + this.ctx.external = _params.external; + } + extractDefs(this.ctx, schema); + const result = finalize(this.ctx, schema); + const { "~standard": _, ...plainResult } = result; + return plainResult; + } +}; + +// ../../node_modules/zod/v4/core/json-schema.js +var json_schema_exports = {}; +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/zod/v4/classic/schemas.js +var schemas_exports2 = {}; +__export(schemas_exports2, { + ZodAny: () => ZodAny, + ZodArray: () => ZodArray, + ZodBase64: () => ZodBase64, + ZodBase64URL: () => ZodBase64URL, + ZodBigInt: () => ZodBigInt, + ZodBigIntFormat: () => ZodBigIntFormat, + ZodBoolean: () => ZodBoolean, + ZodCIDRv4: () => ZodCIDRv4, + ZodCIDRv6: () => ZodCIDRv6, + ZodCUID: () => ZodCUID, + ZodCUID2: () => ZodCUID2, + ZodCatch: () => ZodCatch, + ZodCodec: () => ZodCodec, + ZodCustom: () => ZodCustom, + ZodCustomStringFormat: () => ZodCustomStringFormat, + ZodDate: () => ZodDate, + ZodDefault: () => ZodDefault, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, + ZodE164: () => ZodE164, + ZodEmail: () => ZodEmail, + ZodEmoji: () => ZodEmoji, + ZodEnum: () => ZodEnum, + ZodExactOptional: () => ZodExactOptional, + ZodFile: () => ZodFile, + ZodFunction: () => ZodFunction, + ZodGUID: () => ZodGUID, + ZodIPv4: () => ZodIPv4, + ZodIPv6: () => ZodIPv6, + ZodIntersection: () => ZodIntersection, + ZodJWT: () => ZodJWT, + ZodKSUID: () => ZodKSUID, + ZodLazy: () => ZodLazy, + ZodLiteral: () => ZodLiteral, + ZodMAC: () => ZodMAC, + ZodMap: () => ZodMap, + ZodNaN: () => ZodNaN, + ZodNanoID: () => ZodNanoID, + ZodNever: () => ZodNever, + ZodNonOptional: () => ZodNonOptional, + ZodNull: () => ZodNull, + ZodNullable: () => ZodNullable, + ZodNumber: () => ZodNumber, + ZodNumberFormat: () => ZodNumberFormat, + ZodObject: () => ZodObject, + ZodOptional: () => ZodOptional, + ZodPipe: () => ZodPipe, + ZodPrefault: () => ZodPrefault, + ZodPromise: () => ZodPromise, + ZodReadonly: () => ZodReadonly, + ZodRecord: () => ZodRecord, + ZodSet: () => ZodSet, + ZodString: () => ZodString, + ZodStringFormat: () => ZodStringFormat, + ZodSuccess: () => ZodSuccess, + ZodSymbol: () => ZodSymbol, + ZodTemplateLiteral: () => ZodTemplateLiteral, + ZodTransform: () => ZodTransform, + ZodTuple: () => ZodTuple, + ZodType: () => ZodType, + ZodULID: () => ZodULID, + ZodURL: () => ZodURL, + ZodUUID: () => ZodUUID, + ZodUndefined: () => ZodUndefined, + ZodUnion: () => ZodUnion, + ZodUnknown: () => ZodUnknown, + ZodVoid: () => ZodVoid, + ZodXID: () => ZodXID, + ZodXor: () => ZodXor, + _ZodString: () => _ZodString, + _default: () => _default2, + _function: () => _function, + any: () => any, + array: () => array, + base64: () => base642, + base64url: () => base64url2, + bigint: () => bigint3, + boolean: () => boolean2, + catch: () => _catch2, + check: () => check2, + cidrv4: () => cidrv42, + cidrv6: () => cidrv62, + codec: () => codec, + cuid: () => cuid3, + cuid2: () => cuid22, + custom: () => custom, + date: () => date3, + describe: () => describe2, + discriminatedUnion: () => discriminatedUnion, + e164: () => e1642, + email: () => email2, + emoji: () => emoji2, + enum: () => _enum2, + exactOptional: () => exactOptional, + file: () => file, + float32: () => float32, + float64: () => float64, + function: () => _function, + guid: () => guid2, + hash: () => hash, + hex: () => hex2, + hostname: () => hostname2, + httpUrl: () => httpUrl, + instanceof: () => _instanceof, + int: () => int, + int32: () => int32, + int64: () => int64, + intersection: () => intersection, + ipv4: () => ipv42, + ipv6: () => ipv62, + json: () => json, + jwt: () => jwt, + keyof: () => keyof, + ksuid: () => ksuid2, + lazy: () => lazy2, + literal: () => literal, + looseObject: () => looseObject, + looseRecord: () => looseRecord, + mac: () => mac2, + map: () => map, + meta: () => meta2, + nan: () => nan, + nanoid: () => nanoid2, + nativeEnum: () => nativeEnum, + never: () => never, + nonoptional: () => nonoptional, + null: () => _null3, + nullable: () => nullable, + nullish: () => nullish2, + number: () => number2, + object: () => object, + optional: () => optional, + partialRecord: () => partialRecord, + pipe: () => pipe, + prefault: () => prefault, + preprocess: () => preprocess, + promise: () => promise, + readonly: () => readonly, + record: () => record, + refine: () => refine, + set: () => set, + strictObject: () => strictObject, + string: () => string2, + stringFormat: () => stringFormat, + stringbool: () => stringbool, + success: () => success, + superRefine: () => superRefine, + symbol: () => symbol, + templateLiteral: () => templateLiteral, + transform: () => transform, + tuple: () => tuple, + uint32: () => uint32, + uint64: () => uint64, + ulid: () => ulid2, + undefined: () => _undefined3, + union: () => union2, + unknown: () => unknown, + url: () => url, + uuid: () => uuid2, + uuidv4: () => uuidv4, + uuidv6: () => uuidv6, + uuidv7: () => uuidv7, + void: () => _void2, + xid: () => xid2, + xor: () => xor +}); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/zod/v4/classic/checks.js +var checks_exports2 = {}; +__export(checks_exports2, { + endsWith: () => _endsWith, + gt: () => _gt, + gte: () => _gte, + includes: () => _includes, + length: () => _length, + lowercase: () => _lowercase, + lt: () => _lt, + lte: () => _lte, + maxLength: () => _maxLength, + maxSize: () => _maxSize, + mime: () => _mime, + minLength: () => _minLength, + minSize: () => _minSize, + multipleOf: () => _multipleOf, + negative: () => _negative, + nonnegative: () => _nonnegative, + nonpositive: () => _nonpositive, + normalize: () => _normalize, + overwrite: () => _overwrite, + positive: () => _positive, + property: () => _property, + regex: () => _regex, + size: () => _size, + slugify: () => _slugify, + startsWith: () => _startsWith, + toLowerCase: () => _toLowerCase, + toUpperCase: () => _toUpperCase, + trim: () => _trim, + uppercase: () => _uppercase +}); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/zod/v4/classic/iso.js +var iso_exports = {}; +__export(iso_exports, { + ZodISODate: () => ZodISODate, + ZodISODateTime: () => ZodISODateTime, + ZodISODuration: () => ZodISODuration, + ZodISOTime: () => ZodISOTime, + date: () => date2, + datetime: () => datetime2, + duration: () => duration2, + time: () => time5 +}); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => { + $ZodISODateTime.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function datetime2(params) { + return _isoDateTime(ZodISODateTime, params); +} +__name(datetime2, "datetime"); +var ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => { + $ZodISODate.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function date2(params) { + return _isoDate(ZodISODate, params); +} +__name(date2, "date"); +var ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => { + $ZodISOTime.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function time5(params) { + return _isoTime(ZodISOTime, params); +} +__name(time5, "time"); +var ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => { + $ZodISODuration.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function duration2(params) { + return _isoDuration(ZodISODuration, params); +} +__name(duration2, "duration"); + +// ../../node_modules/zod/v4/classic/parse.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/zod/v4/classic/errors.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var initializer2 = /* @__PURE__ */ __name((inst, issues) => { + $ZodError.init(inst, issues); + inst.name = "ZodError"; + Object.defineProperties(inst, { + format: { + value: /* @__PURE__ */ __name((mapper) => formatError(inst, mapper), "value") + // enumerable: false, + }, + flatten: { + value: /* @__PURE__ */ __name((mapper) => flattenError(inst, mapper), "value") + // enumerable: false, + }, + addIssue: { + value: /* @__PURE__ */ __name((issue2) => { + inst.issues.push(issue2); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2); + }, "value") + // enumerable: false, + }, + addIssues: { + value: /* @__PURE__ */ __name((issues2) => { + inst.issues.push(...issues2); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2); + }, "value") + // enumerable: false, + }, + isEmpty: { + get() { + return inst.issues.length === 0; + } + // enumerable: false, + } + }); +}, "initializer"); +var ZodError = $constructor("ZodError", initializer2); +var ZodRealError = $constructor("ZodError", initializer2, { + Parent: Error +}); + +// ../../node_modules/zod/v4/classic/parse.js +var parse2 = /* @__PURE__ */ _parse(ZodRealError); +var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError); +var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError); +var safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError); +var encode4 = /* @__PURE__ */ _encode(ZodRealError); +var decode3 = /* @__PURE__ */ _decode(ZodRealError); +var encodeAsync2 = /* @__PURE__ */ _encodeAsync(ZodRealError); +var decodeAsync2 = /* @__PURE__ */ _decodeAsync(ZodRealError); +var safeEncode2 = /* @__PURE__ */ _safeEncode(ZodRealError); +var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError); +var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError); +var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError); + +// ../../node_modules/zod/v4/classic/schemas.js +var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => { + $ZodType.init(inst, def); + Object.assign(inst["~standard"], { + jsonSchema: { + input: createStandardJSONSchemaMethod(inst, "input"), + output: createStandardJSONSchemaMethod(inst, "output") + } + }); + inst.toJSONSchema = createToJSONSchemaMethod(inst, {}); + inst.def = def; + inst.type = def.type; + Object.defineProperty(inst, "_def", { value: def }); + inst.check = (...checks) => { + return inst.clone(util_exports.mergeDefs(def, { + checks: [ + ...def.checks ?? [], + ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch) + ] + }), { + parent: true + }); + }; + inst.with = inst.check; + inst.clone = (def2, params) => clone(inst, def2, params); + inst.brand = () => inst; + inst.register = ((reg, meta3) => { + reg.add(inst, meta3); + return inst; + }); + inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse }); + inst.safeParse = (data, params) => safeParse2(inst, data, params); + inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync }); + inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params); + inst.spa = inst.safeParseAsync; + inst.encode = (data, params) => encode4(inst, data, params); + inst.decode = (data, params) => decode3(inst, data, params); + inst.encodeAsync = async (data, params) => encodeAsync2(inst, data, params); + inst.decodeAsync = async (data, params) => decodeAsync2(inst, data, params); + inst.safeEncode = (data, params) => safeEncode2(inst, data, params); + inst.safeDecode = (data, params) => safeDecode2(inst, data, params); + inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params); + inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params); + inst.refine = (check3, params) => inst.check(refine(check3, params)); + inst.superRefine = (refinement) => inst.check(superRefine(refinement)); + inst.overwrite = (fn) => inst.check(_overwrite(fn)); + inst.optional = () => optional(inst); + inst.exactOptional = () => exactOptional(inst); + inst.nullable = () => nullable(inst); + inst.nullish = () => optional(nullable(inst)); + inst.nonoptional = (params) => nonoptional(inst, params); + inst.array = () => array(inst); + inst.or = (arg) => union2([inst, arg]); + inst.and = (arg) => intersection(inst, arg); + inst.transform = (tx) => pipe(inst, transform(tx)); + inst.default = (def2) => _default2(inst, def2); + inst.prefault = (def2) => prefault(inst, def2); + inst.catch = (params) => _catch2(inst, params); + inst.pipe = (target2) => pipe(inst, target2); + inst.readonly = () => readonly(inst); + inst.describe = (description) => { + const cl = inst.clone(); + globalRegistry.add(cl, { description }); + return cl; + }; + Object.defineProperty(inst, "description", { + get() { + return globalRegistry.get(inst)?.description; + }, + configurable: true + }); + inst.meta = (...args) => { + if (args.length === 0) { + return globalRegistry.get(inst); + } + const cl = inst.clone(); + globalRegistry.add(cl, args[0]); + return cl; + }; + inst.isOptional = () => inst.safeParse(void 0).success; + inst.isNullable = () => inst.safeParse(null).success; + inst.apply = (fn) => fn(inst); + return inst; +}); +var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => { + $ZodString.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => stringProcessor(inst, ctx, json2, params); + const bag = inst._zod.bag; + inst.format = bag.format ?? null; + inst.minLength = bag.minimum ?? null; + inst.maxLength = bag.maximum ?? null; + inst.regex = (...args) => inst.check(_regex(...args)); + inst.includes = (...args) => inst.check(_includes(...args)); + inst.startsWith = (...args) => inst.check(_startsWith(...args)); + inst.endsWith = (...args) => inst.check(_endsWith(...args)); + inst.min = (...args) => inst.check(_minLength(...args)); + inst.max = (...args) => inst.check(_maxLength(...args)); + inst.length = (...args) => inst.check(_length(...args)); + inst.nonempty = (...args) => inst.check(_minLength(1, ...args)); + inst.lowercase = (params) => inst.check(_lowercase(params)); + inst.uppercase = (params) => inst.check(_uppercase(params)); + inst.trim = () => inst.check(_trim()); + inst.normalize = (...args) => inst.check(_normalize(...args)); + inst.toLowerCase = () => inst.check(_toLowerCase()); + inst.toUpperCase = () => inst.check(_toUpperCase()); + inst.slugify = () => inst.check(_slugify()); +}); +var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => { + $ZodString.init(inst, def); + _ZodString.init(inst, def); + inst.email = (params) => inst.check(_email(ZodEmail, params)); + inst.url = (params) => inst.check(_url(ZodURL, params)); + inst.jwt = (params) => inst.check(_jwt(ZodJWT, params)); + inst.emoji = (params) => inst.check(_emoji2(ZodEmoji, params)); + inst.guid = (params) => inst.check(_guid(ZodGUID, params)); + inst.uuid = (params) => inst.check(_uuid(ZodUUID, params)); + inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params)); + inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params)); + inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params)); + inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params)); + inst.guid = (params) => inst.check(_guid(ZodGUID, params)); + inst.cuid = (params) => inst.check(_cuid(ZodCUID, params)); + inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params)); + inst.ulid = (params) => inst.check(_ulid(ZodULID, params)); + inst.base64 = (params) => inst.check(_base64(ZodBase64, params)); + inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params)); + inst.xid = (params) => inst.check(_xid(ZodXID, params)); + inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params)); + inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params)); + inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params)); + inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params)); + inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params)); + inst.e164 = (params) => inst.check(_e164(ZodE164, params)); + inst.datetime = (params) => inst.check(datetime2(params)); + inst.date = (params) => inst.check(date2(params)); + inst.time = (params) => inst.check(time5(params)); + inst.duration = (params) => inst.check(duration2(params)); +}); +function string2(params) { + return _string(ZodString, params); +} +__name(string2, "string"); +var ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => { + $ZodStringFormat.init(inst, def); + _ZodString.init(inst, def); +}); +var ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => { + $ZodEmail.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function email2(params) { + return _email(ZodEmail, params); +} +__name(email2, "email"); +var ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => { + $ZodGUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function guid2(params) { + return _guid(ZodGUID, params); +} +__name(guid2, "guid"); +var ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => { + $ZodUUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function uuid2(params) { + return _uuid(ZodUUID, params); +} +__name(uuid2, "uuid"); +function uuidv4(params) { + return _uuidv4(ZodUUID, params); +} +__name(uuidv4, "uuidv4"); +function uuidv6(params) { + return _uuidv6(ZodUUID, params); +} +__name(uuidv6, "uuidv6"); +function uuidv7(params) { + return _uuidv7(ZodUUID, params); +} +__name(uuidv7, "uuidv7"); +var ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => { + $ZodURL.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function url(params) { + return _url(ZodURL, params); +} +__name(url, "url"); +function httpUrl(params) { + return _url(ZodURL, { + protocol: /^https?$/, + hostname: regexes_exports.domain, + ...util_exports.normalizeParams(params) + }); +} +__name(httpUrl, "httpUrl"); +var ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => { + $ZodEmoji.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function emoji2(params) { + return _emoji2(ZodEmoji, params); +} +__name(emoji2, "emoji"); +var ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => { + $ZodNanoID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function nanoid2(params) { + return _nanoid(ZodNanoID, params); +} +__name(nanoid2, "nanoid"); +var ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => { + $ZodCUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function cuid3(params) { + return _cuid(ZodCUID, params); +} +__name(cuid3, "cuid"); +var ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => { + $ZodCUID2.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function cuid22(params) { + return _cuid2(ZodCUID2, params); +} +__name(cuid22, "cuid2"); +var ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => { + $ZodULID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function ulid2(params) { + return _ulid(ZodULID, params); +} +__name(ulid2, "ulid"); +var ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => { + $ZodXID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function xid2(params) { + return _xid(ZodXID, params); +} +__name(xid2, "xid"); +var ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => { + $ZodKSUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function ksuid2(params) { + return _ksuid(ZodKSUID, params); +} +__name(ksuid2, "ksuid"); +var ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => { + $ZodIPv4.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function ipv42(params) { + return _ipv4(ZodIPv4, params); +} +__name(ipv42, "ipv4"); +var ZodMAC = /* @__PURE__ */ $constructor("ZodMAC", (inst, def) => { + $ZodMAC.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function mac2(params) { + return _mac(ZodMAC, params); +} +__name(mac2, "mac"); +var ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => { + $ZodIPv6.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function ipv62(params) { + return _ipv6(ZodIPv6, params); +} +__name(ipv62, "ipv6"); +var ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => { + $ZodCIDRv4.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function cidrv42(params) { + return _cidrv4(ZodCIDRv4, params); +} +__name(cidrv42, "cidrv4"); +var ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => { + $ZodCIDRv6.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function cidrv62(params) { + return _cidrv6(ZodCIDRv6, params); +} +__name(cidrv62, "cidrv6"); +var ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => { + $ZodBase64.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function base642(params) { + return _base64(ZodBase64, params); +} +__name(base642, "base64"); +var ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => { + $ZodBase64URL.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function base64url2(params) { + return _base64url(ZodBase64URL, params); +} +__name(base64url2, "base64url"); +var ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => { + $ZodE164.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function e1642(params) { + return _e164(ZodE164, params); +} +__name(e1642, "e164"); +var ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => { + $ZodJWT.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function jwt(params) { + return _jwt(ZodJWT, params); +} +__name(jwt, "jwt"); +var ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => { + $ZodCustomStringFormat.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function stringFormat(format, fnOrRegex, _params = {}) { + return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params); +} +__name(stringFormat, "stringFormat"); +function hostname2(_params) { + return _stringFormat(ZodCustomStringFormat, "hostname", regexes_exports.hostname, _params); +} +__name(hostname2, "hostname"); +function hex2(_params) { + return _stringFormat(ZodCustomStringFormat, "hex", regexes_exports.hex, _params); +} +__name(hex2, "hex"); +function hash(alg, params) { + const enc = params?.enc ?? "hex"; + const format = `${alg}_${enc}`; + const regex = regexes_exports[format]; + if (!regex) + throw new Error(`Unrecognized hash format: ${format}`); + return _stringFormat(ZodCustomStringFormat, format, regex, params); +} +__name(hash, "hash"); +var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => { + $ZodNumber.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params); + inst.gt = (value, params) => inst.check(_gt(value, params)); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.lt = (value, params) => inst.check(_lt(value, params)); + inst.lte = (value, params) => inst.check(_lte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + inst.int = (params) => inst.check(int(params)); + inst.safe = (params) => inst.check(int(params)); + inst.positive = (params) => inst.check(_gt(0, params)); + inst.nonnegative = (params) => inst.check(_gte(0, params)); + inst.negative = (params) => inst.check(_lt(0, params)); + inst.nonpositive = (params) => inst.check(_lte(0, params)); + inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); + inst.step = (value, params) => inst.check(_multipleOf(value, params)); + inst.finite = () => inst; + const bag = inst._zod.bag; + inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null; + inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null; + inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5); + inst.isFinite = true; + inst.format = bag.format ?? null; +}); +function number2(params) { + return _number(ZodNumber, params); +} +__name(number2, "number"); +var ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => { + $ZodNumberFormat.init(inst, def); + ZodNumber.init(inst, def); +}); +function int(params) { + return _int(ZodNumberFormat, params); +} +__name(int, "int"); +function float32(params) { + return _float32(ZodNumberFormat, params); +} +__name(float32, "float32"); +function float64(params) { + return _float64(ZodNumberFormat, params); +} +__name(float64, "float64"); +function int32(params) { + return _int32(ZodNumberFormat, params); +} +__name(int32, "int32"); +function uint32(params) { + return _uint32(ZodNumberFormat, params); +} +__name(uint32, "uint32"); +var ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => { + $ZodBoolean.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => booleanProcessor(inst, ctx, json2, params); +}); +function boolean2(params) { + return _boolean(ZodBoolean, params); +} +__name(boolean2, "boolean"); +var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => { + $ZodBigInt.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => bigintProcessor(inst, ctx, json2, params); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.gt = (value, params) => inst.check(_gt(value, params)); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.lt = (value, params) => inst.check(_lt(value, params)); + inst.lte = (value, params) => inst.check(_lte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + inst.positive = (params) => inst.check(_gt(BigInt(0), params)); + inst.negative = (params) => inst.check(_lt(BigInt(0), params)); + inst.nonpositive = (params) => inst.check(_lte(BigInt(0), params)); + inst.nonnegative = (params) => inst.check(_gte(BigInt(0), params)); + inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); + const bag = inst._zod.bag; + inst.minValue = bag.minimum ?? null; + inst.maxValue = bag.maximum ?? null; + inst.format = bag.format ?? null; +}); +function bigint3(params) { + return _bigint(ZodBigInt, params); +} +__name(bigint3, "bigint"); +var ZodBigIntFormat = /* @__PURE__ */ $constructor("ZodBigIntFormat", (inst, def) => { + $ZodBigIntFormat.init(inst, def); + ZodBigInt.init(inst, def); +}); +function int64(params) { + return _int64(ZodBigIntFormat, params); +} +__name(int64, "int64"); +function uint64(params) { + return _uint64(ZodBigIntFormat, params); +} +__name(uint64, "uint64"); +var ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => { + $ZodSymbol.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => symbolProcessor(inst, ctx, json2, params); +}); +function symbol(params) { + return _symbol(ZodSymbol, params); +} +__name(symbol, "symbol"); +var ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => { + $ZodUndefined.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => undefinedProcessor(inst, ctx, json2, params); +}); +function _undefined3(params) { + return _undefined2(ZodUndefined, params); +} +__name(_undefined3, "_undefined"); +var ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => { + $ZodNull.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => nullProcessor(inst, ctx, json2, params); +}); +function _null3(params) { + return _null2(ZodNull, params); +} +__name(_null3, "_null"); +var ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => { + $ZodAny.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => anyProcessor(inst, ctx, json2, params); +}); +function any() { + return _any(ZodAny); +} +__name(any, "any"); +var ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => { + $ZodUnknown.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => unknownProcessor(inst, ctx, json2, params); +}); +function unknown() { + return _unknown(ZodUnknown); +} +__name(unknown, "unknown"); +var ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => { + $ZodNever.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => neverProcessor(inst, ctx, json2, params); +}); +function never(params) { + return _never(ZodNever, params); +} +__name(never, "never"); +var ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => { + $ZodVoid.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => voidProcessor(inst, ctx, json2, params); +}); +function _void2(params) { + return _void(ZodVoid, params); +} +__name(_void2, "_void"); +var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => { + $ZodDate.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => dateProcessor(inst, ctx, json2, params); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + const c = inst._zod.bag; + inst.minDate = c.minimum ? new Date(c.minimum) : null; + inst.maxDate = c.maximum ? new Date(c.maximum) : null; +}); +function date3(params) { + return _date(ZodDate, params); +} +__name(date3, "date"); +var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => { + $ZodArray.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params); + inst.element = def.element; + inst.min = (minLength, params) => inst.check(_minLength(minLength, params)); + inst.nonempty = (params) => inst.check(_minLength(1, params)); + inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params)); + inst.length = (len, params) => inst.check(_length(len, params)); + inst.unwrap = () => inst.element; +}); +function array(element, params) { + return _array(ZodArray, element, params); +} +__name(array, "array"); +function keyof(schema) { + const shape = schema._zod.def.shape; + return _enum2(Object.keys(shape)); +} +__name(keyof, "keyof"); +var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => { + $ZodObjectJIT.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => objectProcessor(inst, ctx, json2, params); + util_exports.defineLazy(inst, "shape", () => { + return def.shape; + }); + inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape)); + inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall }); + inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); + inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); + inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() }); + inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 }); + inst.extend = (incoming) => { + return util_exports.extend(inst, incoming); + }; + inst.safeExtend = (incoming) => { + return util_exports.safeExtend(inst, incoming); + }; + inst.merge = (other) => util_exports.merge(inst, other); + inst.pick = (mask) => util_exports.pick(inst, mask); + inst.omit = (mask) => util_exports.omit(inst, mask); + inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]); + inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]); +}); +function object(shape, params) { + const def = { + type: "object", + shape: shape ?? {}, + ...util_exports.normalizeParams(params) + }; + return new ZodObject(def); +} +__name(object, "object"); +function strictObject(shape, params) { + return new ZodObject({ + type: "object", + shape, + catchall: never(), + ...util_exports.normalizeParams(params) + }); +} +__name(strictObject, "strictObject"); +function looseObject(shape, params) { + return new ZodObject({ + type: "object", + shape, + catchall: unknown(), + ...util_exports.normalizeParams(params) + }); +} +__name(looseObject, "looseObject"); +var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => { + $ZodUnion.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor(inst, ctx, json2, params); + inst.options = def.options; +}); +function union2(options, params) { + return new ZodUnion({ + type: "union", + options, + ...util_exports.normalizeParams(params) + }); +} +__name(union2, "union"); +var ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => { + ZodUnion.init(inst, def); + $ZodXor.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor(inst, ctx, json2, params); + inst.options = def.options; +}); +function xor(options, params) { + return new ZodXor({ + type: "union", + options, + inclusive: false, + ...util_exports.normalizeParams(params) + }); +} +__name(xor, "xor"); +var ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => { + ZodUnion.init(inst, def); + $ZodDiscriminatedUnion.init(inst, def); +}); +function discriminatedUnion(discriminator, options, params) { + return new ZodDiscriminatedUnion({ + type: "union", + options, + discriminator, + ...util_exports.normalizeParams(params) + }); +} +__name(discriminatedUnion, "discriminatedUnion"); +var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => { + $ZodIntersection.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => intersectionProcessor(inst, ctx, json2, params); +}); +function intersection(left, right) { + return new ZodIntersection({ + type: "intersection", + left, + right + }); +} +__name(intersection, "intersection"); +var ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => { + $ZodTuple.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => tupleProcessor(inst, ctx, json2, params); + inst.rest = (rest) => inst.clone({ + ...inst._zod.def, + rest + }); +}); +function tuple(items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new ZodTuple({ + type: "tuple", + items, + rest, + ...util_exports.normalizeParams(params) + }); +} +__name(tuple, "tuple"); +var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => { + $ZodRecord.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => recordProcessor(inst, ctx, json2, params); + inst.keyType = def.keyType; + inst.valueType = def.valueType; +}); +function record(keyType, valueType, params) { + return new ZodRecord({ + type: "record", + keyType, + valueType, + ...util_exports.normalizeParams(params) + }); +} +__name(record, "record"); +function partialRecord(keyType, valueType, params) { + const k = clone(keyType); + k._zod.values = void 0; + return new ZodRecord({ + type: "record", + keyType: k, + valueType, + ...util_exports.normalizeParams(params) + }); +} +__name(partialRecord, "partialRecord"); +function looseRecord(keyType, valueType, params) { + return new ZodRecord({ + type: "record", + keyType, + valueType, + mode: "loose", + ...util_exports.normalizeParams(params) + }); +} +__name(looseRecord, "looseRecord"); +var ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => { + $ZodMap.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => mapProcessor(inst, ctx, json2, params); + inst.keyType = def.keyType; + inst.valueType = def.valueType; + inst.min = (...args) => inst.check(_minSize(...args)); + inst.nonempty = (params) => inst.check(_minSize(1, params)); + inst.max = (...args) => inst.check(_maxSize(...args)); + inst.size = (...args) => inst.check(_size(...args)); +}); +function map(keyType, valueType, params) { + return new ZodMap({ + type: "map", + keyType, + valueType, + ...util_exports.normalizeParams(params) + }); +} +__name(map, "map"); +var ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => { + $ZodSet.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => setProcessor(inst, ctx, json2, params); + inst.min = (...args) => inst.check(_minSize(...args)); + inst.nonempty = (params) => inst.check(_minSize(1, params)); + inst.max = (...args) => inst.check(_maxSize(...args)); + inst.size = (...args) => inst.check(_size(...args)); +}); +function set(valueType, params) { + return new ZodSet({ + type: "set", + valueType, + ...util_exports.normalizeParams(params) + }); +} +__name(set, "set"); +var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => { + $ZodEnum.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => enumProcessor(inst, ctx, json2, params); + inst.enum = def.entries; + inst.options = Object.values(def.entries); + const keys = new Set(Object.keys(def.entries)); + inst.extract = (values, params) => { + const newEntries = {}; + for (const value of values) { + if (keys.has(value)) { + newEntries[value] = def.entries[value]; + } else + throw new Error(`Key ${value} not found in enum`); + } + return new ZodEnum({ + ...def, + checks: [], + ...util_exports.normalizeParams(params), + entries: newEntries + }); + }; + inst.exclude = (values, params) => { + const newEntries = { ...def.entries }; + for (const value of values) { + if (keys.has(value)) { + delete newEntries[value]; + } else + throw new Error(`Key ${value} not found in enum`); + } + return new ZodEnum({ + ...def, + checks: [], + ...util_exports.normalizeParams(params), + entries: newEntries + }); + }; +}); +function _enum2(values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values; + return new ZodEnum({ + type: "enum", + entries, + ...util_exports.normalizeParams(params) + }); +} +__name(_enum2, "_enum"); +function nativeEnum(entries, params) { + return new ZodEnum({ + type: "enum", + entries, + ...util_exports.normalizeParams(params) + }); +} +__name(nativeEnum, "nativeEnum"); +var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => { + $ZodLiteral.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => literalProcessor(inst, ctx, json2, params); + inst.values = new Set(def.values); + Object.defineProperty(inst, "value", { + get() { + if (def.values.length > 1) { + throw new Error("This schema contains multiple valid literal values. Use `.values` instead."); + } + return def.values[0]; + } + }); +}); +function literal(value, params) { + return new ZodLiteral({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...util_exports.normalizeParams(params) + }); +} +__name(literal, "literal"); +var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => { + $ZodFile.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => fileProcessor(inst, ctx, json2, params); + inst.min = (size, params) => inst.check(_minSize(size, params)); + inst.max = (size, params) => inst.check(_maxSize(size, params)); + inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params)); +}); +function file(params) { + return _file(ZodFile, params); +} +__name(file, "file"); +var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => { + $ZodTransform.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => transformProcessor(inst, ctx, json2, params); + inst._zod.parse = (payload, _ctx) => { + if (_ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } + payload.addIssue = (issue2) => { + if (typeof issue2 === "string") { + payload.issues.push(util_exports.issue(issue2, payload.value, def)); + } else { + const _issue = issue2; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = inst); + payload.issues.push(util_exports.issue(_issue)); + } + }; + const output = def.transform(payload.value, payload); + if (output instanceof Promise) { + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + payload.value = output; + return payload; + }; +}); +function transform(fn) { + return new ZodTransform({ + type: "transform", + transform: fn + }); +} +__name(transform, "transform"); +var ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => { + $ZodOptional.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => optionalProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function optional(innerType) { + return new ZodOptional({ + type: "optional", + innerType + }); +} +__name(optional, "optional"); +var ZodExactOptional = /* @__PURE__ */ $constructor("ZodExactOptional", (inst, def) => { + $ZodExactOptional.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => optionalProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function exactOptional(innerType) { + return new ZodExactOptional({ + type: "optional", + innerType + }); +} +__name(exactOptional, "exactOptional"); +var ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => { + $ZodNullable.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => nullableProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function nullable(innerType) { + return new ZodNullable({ + type: "nullable", + innerType + }); +} +__name(nullable, "nullable"); +function nullish2(innerType) { + return optional(nullable(innerType)); +} +__name(nullish2, "nullish"); +var ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => { + $ZodDefault.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => defaultProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeDefault = inst.unwrap; +}); +function _default2(innerType, defaultValue) { + return new ZodDefault({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); + } + }); +} +__name(_default2, "_default"); +var ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => { + $ZodPrefault.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => prefaultProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function prefault(innerType, defaultValue) { + return new ZodPrefault({ + type: "prefault", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); + } + }); +} +__name(prefault, "prefault"); +var ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => { + $ZodNonOptional.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => nonoptionalProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function nonoptional(innerType, params) { + return new ZodNonOptional({ + type: "nonoptional", + innerType, + ...util_exports.normalizeParams(params) + }); +} +__name(nonoptional, "nonoptional"); +var ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => { + $ZodSuccess.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => successProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function success(innerType) { + return new ZodSuccess({ + type: "success", + innerType + }); +} +__name(success, "success"); +var ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => { + $ZodCatch.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => catchProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeCatch = inst.unwrap; +}); +function _catch2(innerType, catchValue) { + return new ZodCatch({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +__name(_catch2, "_catch"); +var ZodNaN = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => { + $ZodNaN.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => nanProcessor(inst, ctx, json2, params); +}); +function nan(params) { + return _nan(ZodNaN, params); +} +__name(nan, "nan"); +var ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => { + $ZodPipe.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => pipeProcessor(inst, ctx, json2, params); + inst.in = def.in; + inst.out = def.out; +}); +function pipe(in_, out) { + return new ZodPipe({ + type: "pipe", + in: in_, + out + // ...util.normalizeParams(params), + }); +} +__name(pipe, "pipe"); +var ZodCodec = /* @__PURE__ */ $constructor("ZodCodec", (inst, def) => { + ZodPipe.init(inst, def); + $ZodCodec.init(inst, def); +}); +function codec(in_, out, params) { + return new ZodCodec({ + type: "pipe", + in: in_, + out, + transform: params.decode, + reverseTransform: params.encode + }); +} +__name(codec, "codec"); +var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => { + $ZodReadonly.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => readonlyProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function readonly(innerType) { + return new ZodReadonly({ + type: "readonly", + innerType + }); +} +__name(readonly, "readonly"); +var ZodTemplateLiteral = /* @__PURE__ */ $constructor("ZodTemplateLiteral", (inst, def) => { + $ZodTemplateLiteral.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => templateLiteralProcessor(inst, ctx, json2, params); +}); +function templateLiteral(parts, params) { + return new ZodTemplateLiteral({ + type: "template_literal", + parts, + ...util_exports.normalizeParams(params) + }); +} +__name(templateLiteral, "templateLiteral"); +var ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => { + $ZodLazy.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => lazyProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.getter(); +}); +function lazy2(getter) { + return new ZodLazy({ + type: "lazy", + getter + }); +} +__name(lazy2, "lazy"); +var ZodPromise = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => { + $ZodPromise.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => promiseProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function promise(innerType) { + return new ZodPromise({ + type: "promise", + innerType + }); +} +__name(promise, "promise"); +var ZodFunction = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => { + $ZodFunction.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => functionProcessor(inst, ctx, json2, params); +}); +function _function(params) { + return new ZodFunction({ + type: "function", + input: Array.isArray(params?.input) ? tuple(params?.input) : params?.input ?? array(unknown()), + output: params?.output ?? unknown() + }); +} +__name(_function, "_function"); +var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => { + $ZodCustom.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => customProcessor(inst, ctx, json2, params); +}); +function check2(fn) { + const ch = new $ZodCheck({ + check: "custom" + // ...util.normalizeParams(params), + }); + ch._zod.check = fn; + return ch; +} +__name(check2, "check"); +function custom(fn, _params) { + return _custom(ZodCustom, fn ?? (() => true), _params); +} +__name(custom, "custom"); +function refine(fn, _params = {}) { + return _refine(ZodCustom, fn, _params); +} +__name(refine, "refine"); +function superRefine(fn) { + return _superRefine(fn); +} +__name(superRefine, "superRefine"); +var describe2 = describe; +var meta2 = meta; +function _instanceof(cls, params = {}) { + const inst = new ZodCustom({ + type: "custom", + check: "custom", + fn: /* @__PURE__ */ __name((data) => data instanceof cls, "fn"), + abort: true, + ...util_exports.normalizeParams(params) + }); + inst._zod.bag.Class = cls; + inst._zod.check = (payload) => { + if (!(payload.value instanceof cls)) { + payload.issues.push({ + code: "invalid_type", + expected: cls.name, + input: payload.value, + inst, + path: [...inst._zod.def.path ?? []] + }); + } + }; + return inst; +} +__name(_instanceof, "_instanceof"); +var stringbool = /* @__PURE__ */ __name((...args) => _stringbool({ + Codec: ZodCodec, + Boolean: ZodBoolean, + String: ZodString +}, ...args), "stringbool"); +function json(params) { + const jsonSchema = lazy2(() => { + return union2([string2(params), number2(), boolean2(), _null3(), array(jsonSchema), record(string2(), jsonSchema)]); + }); + return jsonSchema; +} +__name(json, "json"); +function preprocess(fn, schema) { + return pipe(transform(fn), schema); +} +__name(preprocess, "preprocess"); + +// ../../node_modules/zod/v4/classic/compat.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var ZodIssueCode = { + invalid_type: "invalid_type", + too_big: "too_big", + too_small: "too_small", + invalid_format: "invalid_format", + not_multiple_of: "not_multiple_of", + unrecognized_keys: "unrecognized_keys", + invalid_union: "invalid_union", + invalid_key: "invalid_key", + invalid_element: "invalid_element", + invalid_value: "invalid_value", + custom: "custom" +}; +function setErrorMap(map2) { + config2({ + customError: map2 + }); +} +__name(setErrorMap, "setErrorMap"); +function getErrorMap() { + return config2().customError; +} +__name(getErrorMap, "getErrorMap"); +var ZodFirstPartyTypeKind; +/* @__PURE__ */ (function(ZodFirstPartyTypeKind2) { +})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {})); + +// ../../node_modules/zod/v4/classic/from-json-schema.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var z = { + ...schemas_exports2, + ...checks_exports2, + iso: iso_exports +}; +var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([ + // Schema identification + "$schema", + "$ref", + "$defs", + "definitions", + // Core schema keywords + "$id", + "id", + "$comment", + "$anchor", + "$vocabulary", + "$dynamicRef", + "$dynamicAnchor", + // Type + "type", + "enum", + "const", + // Composition + "anyOf", + "oneOf", + "allOf", + "not", + // Object + "properties", + "required", + "additionalProperties", + "patternProperties", + "propertyNames", + "minProperties", + "maxProperties", + // Array + "items", + "prefixItems", + "additionalItems", + "minItems", + "maxItems", + "uniqueItems", + "contains", + "minContains", + "maxContains", + // String + "minLength", + "maxLength", + "pattern", + "format", + // Number + "minimum", + "maximum", + "exclusiveMinimum", + "exclusiveMaximum", + "multipleOf", + // Already handled metadata + "description", + "default", + // Content + "contentEncoding", + "contentMediaType", + "contentSchema", + // Unsupported (error-throwing) + "unevaluatedItems", + "unevaluatedProperties", + "if", + "then", + "else", + "dependentSchemas", + "dependentRequired", + // OpenAPI + "nullable", + "readOnly" +]); +function detectVersion(schema, defaultTarget) { + const $schema = schema.$schema; + if ($schema === "https://json-schema.org/draft/2020-12/schema") { + return "draft-2020-12"; + } + if ($schema === "http://json-schema.org/draft-07/schema#") { + return "draft-7"; + } + if ($schema === "http://json-schema.org/draft-04/schema#") { + return "draft-4"; + } + return defaultTarget ?? "draft-2020-12"; +} +__name(detectVersion, "detectVersion"); +function resolveRef(ref2, ctx) { + if (!ref2.startsWith("#")) { + throw new Error("External $ref is not supported, only local refs (#/...) are allowed"); + } + const path3 = ref2.slice(1).split("/").filter(Boolean); + if (path3.length === 0) { + return ctx.rootSchema; + } + const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions"; + if (path3[0] === defsKey) { + const key = path3[1]; + if (!key || !ctx.defs[key]) { + throw new Error(`Reference not found: ${ref2}`); + } + return ctx.defs[key]; + } + throw new Error(`Reference not found: ${ref2}`); +} +__name(resolveRef, "resolveRef"); +function convertBaseSchema(schema, ctx) { + if (schema.not !== void 0) { + if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) { + return z.never(); + } + throw new Error("not is not supported in Zod (except { not: {} } for never)"); + } + if (schema.unevaluatedItems !== void 0) { + throw new Error("unevaluatedItems is not supported"); + } + if (schema.unevaluatedProperties !== void 0) { + throw new Error("unevaluatedProperties is not supported"); + } + if (schema.if !== void 0 || schema.then !== void 0 || schema.else !== void 0) { + throw new Error("Conditional schemas (if/then/else) are not supported"); + } + if (schema.dependentSchemas !== void 0 || schema.dependentRequired !== void 0) { + throw new Error("dependentSchemas and dependentRequired are not supported"); + } + if (schema.$ref) { + const refPath = schema.$ref; + if (ctx.refs.has(refPath)) { + return ctx.refs.get(refPath); + } + if (ctx.processing.has(refPath)) { + return z.lazy(() => { + if (!ctx.refs.has(refPath)) { + throw new Error(`Circular reference not resolved: ${refPath}`); + } + return ctx.refs.get(refPath); + }); + } + ctx.processing.add(refPath); + const resolved = resolveRef(refPath, ctx); + const zodSchema2 = convertSchema(resolved, ctx); + ctx.refs.set(refPath, zodSchema2); + ctx.processing.delete(refPath); + return zodSchema2; + } + if (schema.enum !== void 0) { + const enumValues = schema.enum; + if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) { + return z.null(); + } + if (enumValues.length === 0) { + return z.never(); + } + if (enumValues.length === 1) { + return z.literal(enumValues[0]); + } + if (enumValues.every((v2) => typeof v2 === "string")) { + return z.enum(enumValues); + } + const literalSchemas = enumValues.map((v2) => z.literal(v2)); + if (literalSchemas.length < 2) { + return literalSchemas[0]; + } + return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]); + } + if (schema.const !== void 0) { + return z.literal(schema.const); + } + const type = schema.type; + if (Array.isArray(type)) { + const typeSchemas = type.map((t8) => { + const typeSchema = { ...schema, type: t8 }; + return convertBaseSchema(typeSchema, ctx); + }); + if (typeSchemas.length === 0) { + return z.never(); + } + if (typeSchemas.length === 1) { + return typeSchemas[0]; + } + return z.union(typeSchemas); + } + if (!type) { + return z.any(); + } + let zodSchema; + switch (type) { + case "string": { + let stringSchema = z.string(); + if (schema.format) { + const format = schema.format; + if (format === "email") { + stringSchema = stringSchema.check(z.email()); + } else if (format === "uri" || format === "uri-reference") { + stringSchema = stringSchema.check(z.url()); + } else if (format === "uuid" || format === "guid") { + stringSchema = stringSchema.check(z.uuid()); + } else if (format === "date-time") { + stringSchema = stringSchema.check(z.iso.datetime()); + } else if (format === "date") { + stringSchema = stringSchema.check(z.iso.date()); + } else if (format === "time") { + stringSchema = stringSchema.check(z.iso.time()); + } else if (format === "duration") { + stringSchema = stringSchema.check(z.iso.duration()); + } else if (format === "ipv4") { + stringSchema = stringSchema.check(z.ipv4()); + } else if (format === "ipv6") { + stringSchema = stringSchema.check(z.ipv6()); + } else if (format === "mac") { + stringSchema = stringSchema.check(z.mac()); + } else if (format === "cidr") { + stringSchema = stringSchema.check(z.cidrv4()); + } else if (format === "cidr-v6") { + stringSchema = stringSchema.check(z.cidrv6()); + } else if (format === "base64") { + stringSchema = stringSchema.check(z.base64()); + } else if (format === "base64url") { + stringSchema = stringSchema.check(z.base64url()); + } else if (format === "e164") { + stringSchema = stringSchema.check(z.e164()); + } else if (format === "jwt") { + stringSchema = stringSchema.check(z.jwt()); + } else if (format === "emoji") { + stringSchema = stringSchema.check(z.emoji()); + } else if (format === "nanoid") { + stringSchema = stringSchema.check(z.nanoid()); + } else if (format === "cuid") { + stringSchema = stringSchema.check(z.cuid()); + } else if (format === "cuid2") { + stringSchema = stringSchema.check(z.cuid2()); + } else if (format === "ulid") { + stringSchema = stringSchema.check(z.ulid()); + } else if (format === "xid") { + stringSchema = stringSchema.check(z.xid()); + } else if (format === "ksuid") { + stringSchema = stringSchema.check(z.ksuid()); + } + } + if (typeof schema.minLength === "number") { + stringSchema = stringSchema.min(schema.minLength); + } + if (typeof schema.maxLength === "number") { + stringSchema = stringSchema.max(schema.maxLength); + } + if (schema.pattern) { + stringSchema = stringSchema.regex(new RegExp(schema.pattern)); + } + zodSchema = stringSchema; + break; + } + case "number": + case "integer": { + let numberSchema = type === "integer" ? z.number().int() : z.number(); + if (typeof schema.minimum === "number") { + numberSchema = numberSchema.min(schema.minimum); + } + if (typeof schema.maximum === "number") { + numberSchema = numberSchema.max(schema.maximum); + } + if (typeof schema.exclusiveMinimum === "number") { + numberSchema = numberSchema.gt(schema.exclusiveMinimum); + } else if (schema.exclusiveMinimum === true && typeof schema.minimum === "number") { + numberSchema = numberSchema.gt(schema.minimum); + } + if (typeof schema.exclusiveMaximum === "number") { + numberSchema = numberSchema.lt(schema.exclusiveMaximum); + } else if (schema.exclusiveMaximum === true && typeof schema.maximum === "number") { + numberSchema = numberSchema.lt(schema.maximum); + } + if (typeof schema.multipleOf === "number") { + numberSchema = numberSchema.multipleOf(schema.multipleOf); + } + zodSchema = numberSchema; + break; + } + case "boolean": { + zodSchema = z.boolean(); + break; + } + case "null": { + zodSchema = z.null(); + break; + } + case "object": { + const shape = {}; + const properties = schema.properties || {}; + const requiredSet = new Set(schema.required || []); + for (const [key, propSchema] of Object.entries(properties)) { + const propZodSchema = convertSchema(propSchema, ctx); + shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional(); + } + if (schema.propertyNames) { + const keySchema = convertSchema(schema.propertyNames, ctx); + const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z.any(); + if (Object.keys(shape).length === 0) { + zodSchema = z.record(keySchema, valueSchema); + break; + } + const objectSchema2 = z.object(shape).passthrough(); + const recordSchema = z.looseRecord(keySchema, valueSchema); + zodSchema = z.intersection(objectSchema2, recordSchema); + break; + } + if (schema.patternProperties) { + const patternProps = schema.patternProperties; + const patternKeys = Object.keys(patternProps); + const looseRecords = []; + for (const pattern of patternKeys) { + const patternValue = convertSchema(patternProps[pattern], ctx); + const keySchema = z.string().regex(new RegExp(pattern)); + looseRecords.push(z.looseRecord(keySchema, patternValue)); + } + const schemasToIntersect = []; + if (Object.keys(shape).length > 0) { + schemasToIntersect.push(z.object(shape).passthrough()); + } + schemasToIntersect.push(...looseRecords); + if (schemasToIntersect.length === 0) { + zodSchema = z.object({}).passthrough(); + } else if (schemasToIntersect.length === 1) { + zodSchema = schemasToIntersect[0]; + } else { + let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]); + for (let i = 2; i < schemasToIntersect.length; i++) { + result = z.intersection(result, schemasToIntersect[i]); + } + zodSchema = result; + } + break; + } + const objectSchema = z.object(shape); + if (schema.additionalProperties === false) { + zodSchema = objectSchema.strict(); + } else if (typeof schema.additionalProperties === "object") { + zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx)); + } else { + zodSchema = objectSchema.passthrough(); + } + break; + } + case "array": { + const prefixItems = schema.prefixItems; + const items = schema.items; + if (prefixItems && Array.isArray(prefixItems)) { + const tupleItems = prefixItems.map((item) => convertSchema(item, ctx)); + const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0; + if (rest) { + zodSchema = z.tuple(tupleItems).rest(rest); + } else { + zodSchema = z.tuple(tupleItems); + } + if (typeof schema.minItems === "number") { + zodSchema = zodSchema.check(z.minLength(schema.minItems)); + } + if (typeof schema.maxItems === "number") { + zodSchema = zodSchema.check(z.maxLength(schema.maxItems)); + } + } else if (Array.isArray(items)) { + const tupleItems = items.map((item) => convertSchema(item, ctx)); + const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0; + if (rest) { + zodSchema = z.tuple(tupleItems).rest(rest); + } else { + zodSchema = z.tuple(tupleItems); + } + if (typeof schema.minItems === "number") { + zodSchema = zodSchema.check(z.minLength(schema.minItems)); + } + if (typeof schema.maxItems === "number") { + zodSchema = zodSchema.check(z.maxLength(schema.maxItems)); + } + } else if (items !== void 0) { + const element = convertSchema(items, ctx); + let arraySchema = z.array(element); + if (typeof schema.minItems === "number") { + arraySchema = arraySchema.min(schema.minItems); + } + if (typeof schema.maxItems === "number") { + arraySchema = arraySchema.max(schema.maxItems); + } + zodSchema = arraySchema; + } else { + zodSchema = z.array(z.any()); + } + break; + } + default: + throw new Error(`Unsupported type: ${type}`); + } + if (schema.description) { + zodSchema = zodSchema.describe(schema.description); + } + if (schema.default !== void 0) { + zodSchema = zodSchema.default(schema.default); + } + return zodSchema; +} +__name(convertBaseSchema, "convertBaseSchema"); +function convertSchema(schema, ctx) { + if (typeof schema === "boolean") { + return schema ? z.any() : z.never(); + } + let baseSchema = convertBaseSchema(schema, ctx); + const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0; + if (schema.anyOf && Array.isArray(schema.anyOf)) { + const options = schema.anyOf.map((s) => convertSchema(s, ctx)); + const anyOfUnion = z.union(options); + baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion; + } + if (schema.oneOf && Array.isArray(schema.oneOf)) { + const options = schema.oneOf.map((s) => convertSchema(s, ctx)); + const oneOfUnion = z.xor(options); + baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion; + } + if (schema.allOf && Array.isArray(schema.allOf)) { + if (schema.allOf.length === 0) { + baseSchema = hasExplicitType ? baseSchema : z.any(); + } else { + let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx); + const startIdx = hasExplicitType ? 0 : 1; + for (let i = startIdx; i < schema.allOf.length; i++) { + result = z.intersection(result, convertSchema(schema.allOf[i], ctx)); + } + baseSchema = result; + } + } + if (schema.nullable === true && ctx.version === "openapi-3.0") { + baseSchema = z.nullable(baseSchema); + } + if (schema.readOnly === true) { + baseSchema = z.readonly(baseSchema); + } + const extraMeta = {}; + const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"]; + for (const key of coreMetadataKeys) { + if (key in schema) { + extraMeta[key] = schema[key]; + } + } + const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"]; + for (const key of contentMetadataKeys) { + if (key in schema) { + extraMeta[key] = schema[key]; + } + } + for (const key of Object.keys(schema)) { + if (!RECOGNIZED_KEYS.has(key)) { + extraMeta[key] = schema[key]; + } + } + if (Object.keys(extraMeta).length > 0) { + ctx.registry.add(baseSchema, extraMeta); + } + return baseSchema; +} +__name(convertSchema, "convertSchema"); +function fromJSONSchema(schema, params) { + if (typeof schema === "boolean") { + return schema ? z.any() : z.never(); + } + const version5 = detectVersion(schema, params?.defaultTarget); + const defs = schema.$defs || schema.definitions || {}; + const ctx = { + version: version5, + defs, + refs: /* @__PURE__ */ new Map(), + processing: /* @__PURE__ */ new Set(), + rootSchema: schema, + registry: params?.registry ?? globalRegistry + }; + return convertSchema(schema, ctx); +} +__name(fromJSONSchema, "fromJSONSchema"); + +// ../../node_modules/zod/v4/classic/coerce.js +var coerce_exports = {}; +__export(coerce_exports, { + bigint: () => bigint4, + boolean: () => boolean3, + date: () => date4, + number: () => number3, + string: () => string3 +}); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function string3(params) { + return _coercedString(ZodString, params); +} +__name(string3, "string"); +function number3(params) { + return _coercedNumber(ZodNumber, params); +} +__name(number3, "number"); +function boolean3(params) { + return _coercedBoolean(ZodBoolean, params); +} +__name(boolean3, "boolean"); +function bigint4(params) { + return _coercedBigint(ZodBigInt, params); +} +__name(bigint4, "bigint"); +function date4(params) { + return _coercedDate(ZodDate, params); +} +__name(date4, "date"); + +// ../../node_modules/zod/v4/classic/external.js +config2(en_default()); + +// src/trpc/apis/admin-apis/apis/admin-trpc-index.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/trpc/apis/admin-apis/apis/complaint.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var complaintRouter = router2({ + getAll: protectedProcedure.input(external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(20) + })).query(async ({ input }) => { + const { cursor, limit } = input; + const { complaints: complaintsData, hasMore } = await getComplaints(cursor, limit); + const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData; + const complaintsWithSignedImages = await Promise.all( + complaintsToReturn.map(async (c) => { + const signedImages = c.images ? await generateSignedUrlsFromS3Urls(c.images) : []; + return { + id: c.id, + text: c.complaintBody, + userId: c.userId, + userName: c.userName, + userMobile: c.userMobile, + orderId: c.orderId, + status: c.isResolved ? "resolved" : "pending", + createdAt: c.createdAt, + images: signedImages + }; + }) + ); + return { + complaints: complaintsWithSignedImages, + nextCursor: hasMore ? complaintsToReturn[complaintsToReturn.length - 1].id : void 0 + }; + }), + resolve: protectedProcedure.input(external_exports.object({ id: external_exports.string(), response: external_exports.string().optional() })).mutation(async ({ input }) => { + await resolveComplaint(parseInt(input.id), input.response); + return { message: "Complaint resolved successfully" }; + }) +}); + +// src/trpc/apis/admin-apis/apis/coupon.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var import_dayjs = __toESM(require_dayjs_min()); +var createCouponBodySchema = external_exports.object({ + couponCode: external_exports.string().optional(), + isUserBased: external_exports.boolean().optional(), + discountPercent: external_exports.number().optional(), + flatDiscount: external_exports.number().optional(), + minOrder: external_exports.number().optional(), + targetUser: external_exports.number().optional(), + productIds: external_exports.array(external_exports.number()).optional().nullable(), + applicableUsers: external_exports.array(external_exports.number()).optional(), + applicableProducts: external_exports.array(external_exports.number()).optional(), + maxValue: external_exports.number().optional(), + isApplyForAll: external_exports.boolean().optional(), + validTill: external_exports.string().optional(), + maxLimitForUser: external_exports.number().optional(), + exclusiveApply: external_exports.boolean().optional() +}); +var validateCouponBodySchema = external_exports.object({ + code: external_exports.string(), + userId: external_exports.number(), + orderAmount: external_exports.number() +}); +var couponRouter = router2({ + create: protectedProcedure.input(createCouponBodySchema).mutation(async ({ input, ctx }) => { + const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableUsers, applicableProducts, maxValue, isApplyForAll, validTill, maxLimitForUser, exclusiveApply } = input; + if (!discountPercent && !flatDiscount || discountPercent && flatDiscount) { + throw new Error("Either discountPercent or flatDiscount must be provided (but not both)"); + } + if (isUserBased && (!applicableUsers || applicableUsers.length === 0) && !isApplyForAll) { + throw new Error("applicableUsers is required for user-based coupons (or set isApplyForAll to true)"); + } + if (isUserBased && isApplyForAll) { + throw new Error("Cannot be both user-based and apply for all users"); + } + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + let finalCouponCode = couponCode; + if (!finalCouponCode) { + const timestamp = Date.now().toString().slice(-6); + const random = Math.random().toString(36).substring(2, 8).toUpperCase(); + finalCouponCode = `MF${timestamp}${random}`; + } + const codeExists = await checkCouponExists(finalCouponCode); + if (codeExists) { + throw new Error("Coupon code already exists"); + } + if (applicableUsers && applicableUsers.length > 0) { + const usersExist = await checkUsersExist(applicableUsers); + if (!usersExist) { + throw new Error("Some applicable users not found"); + } + } + const coupon = await createCouponWithRelations( + { + couponCode: finalCouponCode, + isUserBased: isUserBased || false, + discountPercent: discountPercent?.toString(), + flatDiscount: flatDiscount?.toString(), + minOrder: minOrder?.toString(), + productIds: productIds || null, + createdBy: staffUserId, + maxValue: maxValue?.toString(), + isApplyForAll: isApplyForAll || false, + validTill: validTill ? (0, import_dayjs.default)(validTill).toDate() : void 0, + maxLimitForUser, + exclusiveApply: exclusiveApply || false + }, + applicableUsers, + applicableProducts + ); + return coupon; + }), + getAll: protectedProcedure.input(external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(50), + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { cursor, limit, search } = input; + const { coupons: couponsList, hasMore } = await getAllCoupons(cursor, limit, search); + const nextCursor = hasMore ? couponsList[couponsList.length - 1].id : void 0; + return { coupons: couponsList, nextCursor }; + }), + getById: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).query(async ({ input }) => { + const couponId = input.id; + const result = await getCouponById(couponId); + if (!result) { + throw new Error("Coupon not found"); + } + return { + ...result, + productIds: result.productIds || void 0, + applicableUsers: result.applicableUsers.map((au) => au.user), + applicableProducts: result.applicableProducts.map((ap) => ap.product) + }; + }), + update: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + updates: createCouponBodySchema.extend({ + isInvalidated: external_exports.boolean().optional() + }) + })).mutation(async ({ input }) => { + const { id, updates } = input; + if (updates.discountPercent !== void 0 && updates.flatDiscount !== void 0) { + if (updates.discountPercent && updates.flatDiscount) { + throw new Error("Cannot have both discountPercent and flatDiscount"); + } + } + const updateData2 = {}; + if (updates.couponCode !== void 0) updateData2.couponCode = updates.couponCode; + if (updates.isUserBased !== void 0) updateData2.isUserBased = updates.isUserBased; + if (updates.discountPercent !== void 0) updateData2.discountPercent = updates.discountPercent?.toString(); + if (updates.flatDiscount !== void 0) updateData2.flatDiscount = updates.flatDiscount?.toString(); + if (updates.minOrder !== void 0) updateData2.minOrder = updates.minOrder?.toString(); + if (updates.maxValue !== void 0) updateData2.maxValue = updates.maxValue?.toString(); + if (updates.isApplyForAll !== void 0) updateData2.isApplyForAll = updates.isApplyForAll; + if (updates.validTill !== void 0) updateData2.validTill = updates.validTill ? (0, import_dayjs.default)(updates.validTill).toDate() : null; + if (updates.maxLimitForUser !== void 0) updateData2.maxLimitForUser = updates.maxLimitForUser; + if (updates.exclusiveApply !== void 0) updateData2.exclusiveApply = updates.exclusiveApply; + if (updates.isInvalidated !== void 0) updateData2.isInvalidated = updates.isInvalidated; + if (updates.productIds !== void 0) updateData2.productIds = updates.productIds; + const coupon = await updateCouponWithRelations( + id, + updateData2, + updates.applicableUsers, + updates.applicableProducts + ); + return coupon; + }), + delete: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).mutation(async ({ input }) => { + const { id } = input; + await invalidateCoupon(id); + return { message: "Coupon invalidated successfully" }; + }), + validate: protectedProcedure.input(validateCouponBodySchema).query(async ({ input }) => { + const { code, userId, orderAmount } = input; + if (!code || typeof code !== "string") { + return { valid: false, message: "Invalid coupon code" }; + } + const result = await validateCoupon(code, userId, orderAmount); + return result; + }), + generateCancellationCoupon: protectedProcedure.input( + external_exports.object({ + orderId: external_exports.number() + }) + ).mutation(async ({ input, ctx }) => { + const { orderId } = input; + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + const order = await getOrderWithUser(orderId); + if (!order) { + throw new Error("Order not found"); + } + if (!order.user) { + throw new Error("User not found for this order"); + } + const userNamePrefix = (order.user.name || order.user.mobile || "USR").substring(0, 3).toUpperCase(); + const couponCode = `${userNamePrefix}${orderId}`; + const codeExists = await checkCouponExists(couponCode); + if (codeExists) { + throw new Error("Coupon code already exists"); + } + const orderAmount = parseFloat(order.totalAmount); + const coupon = await generateCancellationCoupon( + orderId, + staffUserId, + order.userId, + orderAmount, + couponCode + ); + return coupon; + }), + getReservedCoupons: protectedProcedure.input(external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(50), + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { cursor, limit, search } = input; + const { coupons: result, hasMore } = await getReservedCoupons(cursor, limit, search); + const nextCursor = hasMore ? result[result.length - 1].id : void 0; + return { + coupons: result, + nextCursor + }; + }), + createReservedCoupon: protectedProcedure.input(createCouponBodySchema).mutation(async ({ input, ctx }) => { + const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableProducts, maxValue, validTill, maxLimitForUser, exclusiveApply } = input; + if (!discountPercent && !flatDiscount || discountPercent && flatDiscount) { + throw new Error("Either discountPercent or flatDiscount must be provided (but not both)"); + } + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + let secretCode = couponCode || `SECRET${Date.now().toString().slice(-6)}${Math.random().toString(36).substring(2, 8).toUpperCase()}`; + const codeExists = await checkReservedCouponExists(secretCode); + if (codeExists) { + throw new Error("Secret code already exists"); + } + const coupon = await createReservedCouponWithProducts( + { + secretCode, + couponCode: couponCode || `RESERVED${Date.now().toString().slice(-6)}`, + discountPercent: discountPercent?.toString(), + flatDiscount: flatDiscount?.toString(), + minOrder: minOrder?.toString(), + productIds, + maxValue: maxValue?.toString(), + validTill: validTill ? (0, import_dayjs.default)(validTill).toDate() : void 0, + maxLimitForUser, + exclusiveApply: exclusiveApply || false, + createdBy: staffUserId + }, + applicableProducts + ); + return coupon; + }), + getUsersMiniInfo: protectedProcedure.input(external_exports.object({ + search: external_exports.string().optional(), + limit: external_exports.number().min(1).max(50).default(20), + offset: external_exports.number().min(0).default(0) + })).query(async ({ input }) => { + const { search, limit, offset } = input; + const result = await getUsersForCoupon(search, limit, offset); + return result; + }), + createCoupon: protectedProcedure.input(external_exports.object({ + mobile: external_exports.string().min(1, "Mobile number is required") + })).mutation(async ({ input, ctx }) => { + const { mobile } = input; + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + const cleanMobile = mobile.replace(/\D/g, ""); + if (cleanMobile.length !== 10) { + throw new Error("Mobile number must be exactly 10 digits"); + } + const timestamp = Date.now().toString().slice(-6); + const random = Math.random().toString(36).substring(2, 6).toUpperCase(); + const couponCode = `MF${cleanMobile.slice(-4)}${timestamp}${random}`; + const codeExists = await checkCouponExists(couponCode); + if (codeExists) { + throw new Error("Generated coupon code already exists - please try again"); + } + const { coupon, user } = await createCouponForUser(cleanMobile, couponCode, staffUserId); + return { + success: true, + coupon: { + id: coupon.id, + couponCode: coupon.couponCode, + userId: user.id, + userMobile: user.mobile, + discountPercent: 20, + minOrder: 1e3, + maxValue: 500, + maxLimitForUser: 1 + } + }; + }) +}); + +// src/trpc/apis/admin-apis/apis/order.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/lib/notif-job.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/classes/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/classes/async-fifo-queue.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var Node3 = class { + static { + __name(this, "Node"); + } + constructor(value) { + this.value = void 0; + this.next = null; + this.value = value; + } +}; +var LinkedList = class { + static { + __name(this, "LinkedList"); + } + constructor() { + this.length = 0; + this.head = null; + this.tail = null; + } + push(value) { + const newNode = new Node3(value); + if (!this.length) { + this.head = newNode; + } else { + this.tail.next = newNode; + } + this.tail = newNode; + this.length += 1; + return newNode; + } + shift() { + if (!this.length) { + return null; + } else { + const head = this.head; + this.head = this.head.next; + this.length -= 1; + return head; + } + } +}; +var AsyncFifoQueue = class { + static { + __name(this, "AsyncFifoQueue"); + } + constructor(ignoreErrors = false) { + this.ignoreErrors = ignoreErrors; + this.queue = new LinkedList(); + this.pending = /* @__PURE__ */ new Set(); + this.newPromise(); + } + add(promise2) { + this.pending.add(promise2); + promise2.then((data) => { + this.pending.delete(promise2); + if (this.queue.length === 0) { + this.resolvePromise(data); + } + this.queue.push(data); + }).catch((err) => { + if (this.ignoreErrors) { + this.queue.push(void 0); + } + this.pending.delete(promise2); + this.rejectPromise(err); + }); + } + async waitAll() { + await Promise.all(this.pending); + } + numTotal() { + return this.pending.size + this.queue.length; + } + numPending() { + return this.pending.size; + } + numQueued() { + return this.queue.length; + } + resolvePromise(data) { + this.resolve(data); + this.newPromise(); + } + rejectPromise(err) { + this.reject(err); + this.newPromise(); + } + newPromise() { + this.nextPromise = new Promise((resolve, reject) => { + this.resolve = resolve; + this.reject = reject; + }); + } + async wait() { + return this.nextPromise; + } + async fetch() { + var _a2; + if (this.pending.size === 0 && this.queue.length === 0) { + return; + } + while (this.queue.length === 0) { + try { + await this.wait(); + } catch (err) { + if (!this.ignoreErrors) { + console.error("Unexpected Error in AsyncFifoQueue", err); + } + } + } + return (_a2 = this.queue.shift()) === null || _a2 === void 0 ? void 0 : _a2.value; + } +}; + +// ../../node_modules/bullmq/dist/esm/classes/backoffs.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var Backoffs = class { + static { + __name(this, "Backoffs"); + } + static normalize(backoff) { + if (Number.isFinite(backoff)) { + return { + type: "fixed", + delay: backoff + }; + } else if (backoff) { + return backoff; + } + } + static calculate(backoff, attemptsMade, err, job, customStrategy) { + if (backoff) { + const strategy = lookupStrategy(backoff, customStrategy); + return strategy(attemptsMade, backoff.type, err, job); + } + } +}; +Backoffs.builtinStrategies = { + fixed: /* @__PURE__ */ __name(function(delay2, jitter = 0) { + return function() { + if (jitter > 0) { + const minDelay = delay2 * (1 - jitter); + return Math.floor(Math.random() * delay2 * jitter + minDelay); + } else { + return delay2; + } + }; + }, "fixed"), + exponential: /* @__PURE__ */ __name(function(delay2, jitter = 0) { + return function(attemptsMade) { + if (jitter > 0) { + const maxDelay = Math.round(Math.pow(2, attemptsMade - 1) * delay2); + const minDelay = maxDelay * (1 - jitter); + return Math.floor(Math.random() * maxDelay * jitter + minDelay); + } else { + return Math.round(Math.pow(2, attemptsMade - 1) * delay2); + } + }; + }, "exponential") +}; +function lookupStrategy(backoff, customStrategy) { + if (backoff.type in Backoffs.builtinStrategies) { + return Backoffs.builtinStrategies[backoff.type](backoff.delay, backoff.jitter); + } else if (customStrategy) { + return customStrategy; + } else { + throw new Error(`Unknown backoff strategy ${backoff.type}. + If a custom backoff strategy is used, specify it when the queue is created.`); + } +} +__name(lookupStrategy, "lookupStrategy"); + +// ../../node_modules/bullmq/dist/esm/classes/child.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/child_process.mjs +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_utils(); +var fork = /* @__PURE__ */ notImplemented("child_process.fork"); + +// ../../node_modules/bullmq/dist/esm/classes/child.js +import { createServer } from "net"; + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/worker_threads.mjs +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/worker_threads/worker.mjs +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +import { EventEmitter as EventEmitter2 } from "node:events"; +import { Readable } from "node:stream"; +var Worker = class extends EventEmitter2 { + static { + __name(this, "Worker"); + } + stdin = null; + stdout = new Readable(); + stderr = new Readable(); + threadId = 0; + performance = { eventLoopUtilization: /* @__PURE__ */ __name(() => ({ + idle: 0, + active: 0, + utilization: 0 + }), "eventLoopUtilization") }; + postMessage(_value, _transferList) { + } + postMessageToThread(_threadId, _value, _transferList, _timeout) { + return Promise.resolve(); + } + ref() { + } + unref() { + } + terminate() { + return Promise.resolve(0); + } + getHeapSnapshot() { + return Promise.resolve(new Readable()); + } +}; + +// ../../node_modules/bullmq/dist/esm/enums/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/enums/child-command.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var ChildCommand; +(function(ChildCommand2) { + ChildCommand2[ChildCommand2["Init"] = 0] = "Init"; + ChildCommand2[ChildCommand2["Start"] = 1] = "Start"; + ChildCommand2[ChildCommand2["Stop"] = 2] = "Stop"; + ChildCommand2[ChildCommand2["GetChildrenValuesResponse"] = 3] = "GetChildrenValuesResponse"; + ChildCommand2[ChildCommand2["GetIgnoredChildrenFailuresResponse"] = 4] = "GetIgnoredChildrenFailuresResponse"; + ChildCommand2[ChildCommand2["MoveToWaitingChildrenResponse"] = 5] = "MoveToWaitingChildrenResponse"; + ChildCommand2[ChildCommand2["Cancel"] = 6] = "Cancel"; +})(ChildCommand || (ChildCommand = {})); + +// ../../node_modules/bullmq/dist/esm/enums/error-code.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var ErrorCode; +(function(ErrorCode2) { + ErrorCode2[ErrorCode2["JobNotExist"] = -1] = "JobNotExist"; + ErrorCode2[ErrorCode2["JobLockNotExist"] = -2] = "JobLockNotExist"; + ErrorCode2[ErrorCode2["JobNotInState"] = -3] = "JobNotInState"; + ErrorCode2[ErrorCode2["JobPendingChildren"] = -4] = "JobPendingChildren"; + ErrorCode2[ErrorCode2["ParentJobNotExist"] = -5] = "ParentJobNotExist"; + ErrorCode2[ErrorCode2["JobLockMismatch"] = -6] = "JobLockMismatch"; + ErrorCode2[ErrorCode2["ParentJobCannotBeReplaced"] = -7] = "ParentJobCannotBeReplaced"; + ErrorCode2[ErrorCode2["JobBelongsToJobScheduler"] = -8] = "JobBelongsToJobScheduler"; + ErrorCode2[ErrorCode2["JobHasFailedChildren"] = -9] = "JobHasFailedChildren"; + ErrorCode2[ErrorCode2["SchedulerJobIdCollision"] = -10] = "SchedulerJobIdCollision"; + ErrorCode2[ErrorCode2["SchedulerJobSlotsBusy"] = -11] = "SchedulerJobSlotsBusy"; +})(ErrorCode || (ErrorCode = {})); + +// ../../node_modules/bullmq/dist/esm/enums/parent-command.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var ParentCommand; +(function(ParentCommand2) { + ParentCommand2[ParentCommand2["Completed"] = 0] = "Completed"; + ParentCommand2[ParentCommand2["Error"] = 1] = "Error"; + ParentCommand2[ParentCommand2["Failed"] = 2] = "Failed"; + ParentCommand2[ParentCommand2["InitFailed"] = 3] = "InitFailed"; + ParentCommand2[ParentCommand2["InitCompleted"] = 4] = "InitCompleted"; + ParentCommand2[ParentCommand2["Log"] = 5] = "Log"; + ParentCommand2[ParentCommand2["MoveToDelayed"] = 6] = "MoveToDelayed"; + ParentCommand2[ParentCommand2["MoveToWait"] = 7] = "MoveToWait"; + ParentCommand2[ParentCommand2["Progress"] = 8] = "Progress"; + ParentCommand2[ParentCommand2["Update"] = 9] = "Update"; + ParentCommand2[ParentCommand2["GetChildrenValues"] = 10] = "GetChildrenValues"; + ParentCommand2[ParentCommand2["GetIgnoredChildrenFailures"] = 11] = "GetIgnoredChildrenFailures"; + ParentCommand2[ParentCommand2["MoveToWaitingChildren"] = 12] = "MoveToWaitingChildren"; +})(ParentCommand || (ParentCommand = {})); + +// ../../node_modules/bullmq/dist/esm/enums/metrics-time.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var MetricsTime; +(function(MetricsTime2) { + MetricsTime2[MetricsTime2["ONE_MINUTE"] = 1] = "ONE_MINUTE"; + MetricsTime2[MetricsTime2["FIVE_MINUTES"] = 5] = "FIVE_MINUTES"; + MetricsTime2[MetricsTime2["FIFTEEN_MINUTES"] = 15] = "FIFTEEN_MINUTES"; + MetricsTime2[MetricsTime2["THIRTY_MINUTES"] = 30] = "THIRTY_MINUTES"; + MetricsTime2[MetricsTime2["ONE_HOUR"] = 60] = "ONE_HOUR"; + MetricsTime2[MetricsTime2["ONE_WEEK"] = 10080] = "ONE_WEEK"; + MetricsTime2[MetricsTime2["TWO_WEEKS"] = 20160] = "TWO_WEEKS"; + MetricsTime2[MetricsTime2["ONE_MONTH"] = 80640] = "ONE_MONTH"; +})(MetricsTime || (MetricsTime = {})); + +// ../../node_modules/bullmq/dist/esm/enums/telemetry-attributes.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var TelemetryAttributes; +(function(TelemetryAttributes2) { + TelemetryAttributes2["QueueName"] = "bullmq.queue.name"; + TelemetryAttributes2["QueueOperation"] = "bullmq.queue.operation"; + TelemetryAttributes2["BulkCount"] = "bullmq.job.bulk.count"; + TelemetryAttributes2["BulkNames"] = "bullmq.job.bulk.names"; + TelemetryAttributes2["JobName"] = "bullmq.job.name"; + TelemetryAttributes2["JobId"] = "bullmq.job.id"; + TelemetryAttributes2["JobKey"] = "bullmq.job.key"; + TelemetryAttributes2["JobIds"] = "bullmq.job.ids"; + TelemetryAttributes2["JobAttemptsMade"] = "bullmq.job.attempts.made"; + TelemetryAttributes2["DeduplicationKey"] = "bullmq.job.deduplication.key"; + TelemetryAttributes2["JobOptions"] = "bullmq.job.options"; + TelemetryAttributes2["JobProgress"] = "bullmq.job.progress"; + TelemetryAttributes2["QueueDrainDelay"] = "bullmq.queue.drain.delay"; + TelemetryAttributes2["QueueGrace"] = "bullmq.queue.grace"; + TelemetryAttributes2["QueueCleanLimit"] = "bullmq.queue.clean.limit"; + TelemetryAttributes2["QueueRateLimit"] = "bullmq.queue.rate.limit"; + TelemetryAttributes2["JobType"] = "bullmq.job.type"; + TelemetryAttributes2["QueueOptions"] = "bullmq.queue.options"; + TelemetryAttributes2["QueueEventMaxLength"] = "bullmq.queue.event.max.length"; + TelemetryAttributes2["QueueJobsState"] = "bullmq.queue.jobs.state"; + TelemetryAttributes2["WorkerOptions"] = "bullmq.worker.options"; + TelemetryAttributes2["WorkerName"] = "bullmq.worker.name"; + TelemetryAttributes2["WorkerId"] = "bullmq.worker.id"; + TelemetryAttributes2["WorkerRateLimit"] = "bullmq.worker.rate.limit"; + TelemetryAttributes2["WorkerDoNotWaitActive"] = "bullmq.worker.do.not.wait.active"; + TelemetryAttributes2["WorkerForceClose"] = "bullmq.worker.force.close"; + TelemetryAttributes2["WorkerStalledJobs"] = "bullmq.worker.stalled.jobs"; + TelemetryAttributes2["WorkerFailedJobs"] = "bullmq.worker.failed.jobs"; + TelemetryAttributes2["WorkerJobsToExtendLocks"] = "bullmq.worker.jobs.to.extend.locks"; + TelemetryAttributes2["JobFinishedTimestamp"] = "bullmq.job.finished.timestamp"; + TelemetryAttributes2["JobAttemptFinishedTimestamp"] = "bullmq.job.attempt_finished_timestamp"; + TelemetryAttributes2["JobProcessedTimestamp"] = "bullmq.job.processed.timestamp"; + TelemetryAttributes2["JobResult"] = "bullmq.job.result"; + TelemetryAttributes2["JobFailedReason"] = "bullmq.job.failed.reason"; + TelemetryAttributes2["FlowName"] = "bullmq.flow.name"; + TelemetryAttributes2["JobSchedulerId"] = "bullmq.job.scheduler.id"; + TelemetryAttributes2["JobStatus"] = "bullmq.job.status"; +})(TelemetryAttributes || (TelemetryAttributes = {})); +var MetricNames; +(function(MetricNames2) { + MetricNames2["QueueJobsCount"] = "bullmq.queue.jobs"; + MetricNames2["JobsCompleted"] = "bullmq.jobs.completed"; + MetricNames2["JobsFailed"] = "bullmq.jobs.failed"; + MetricNames2["JobsDelayed"] = "bullmq.jobs.delayed"; + MetricNames2["JobsRetried"] = "bullmq.jobs.retried"; + MetricNames2["JobsWaiting"] = "bullmq.jobs.waiting"; + MetricNames2["JobsWaitingChildren"] = "bullmq.jobs.waiting_children"; + MetricNames2["JobDuration"] = "bullmq.job.duration"; +})(MetricNames || (MetricNames = {})); +var SpanKind; +(function(SpanKind2) { + SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL"; + SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER"; + SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT"; + SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER"; + SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER"; +})(SpanKind || (SpanKind = {})); + +// ../../node_modules/bullmq/dist/esm/classes/child.js +import { EventEmitter as EventEmitter3 } from "events"; +var exitCodesErrors = { + 1: "Uncaught Fatal Exception", + 2: "Unused", + 3: "Internal JavaScript Parse Error", + 4: "Internal JavaScript Evaluation Failure", + 5: "Fatal Error", + 6: "Non-function Internal Exception Handler", + 7: "Internal Exception Handler Run-Time Failure", + 8: "Unused", + 9: "Invalid Argument", + 10: "Internal JavaScript Run-Time Failure", + 12: "Invalid Debug Argument", + 13: "Unfinished Top-Level Await" +}; +var Child = class extends EventEmitter3 { + static { + __name(this, "Child"); + } + constructor(mainFile, processFile, opts = { + useWorkerThreads: false + }) { + super(); + this.mainFile = mainFile; + this.processFile = processFile; + this.opts = opts; + this._exitCode = null; + this._signalCode = null; + this._killed = false; + } + get pid() { + if (this.childProcess) { + return this.childProcess.pid; + } else if (this.worker) { + return Math.abs(this.worker.threadId); + } else { + throw new Error("No child process or worker thread"); + } + } + get exitCode() { + return this._exitCode; + } + get signalCode() { + return this._signalCode; + } + get killed() { + if (this.childProcess) { + return this.childProcess.killed; + } + return this._killed; + } + async init() { + const execArgv2 = await convertExecArgv(process.execArgv); + let parent; + if (this.opts.useWorkerThreads) { + this.worker = parent = new Worker(this.mainFile, Object.assign({ execArgv: execArgv2, stdin: true, stdout: true, stderr: true }, this.opts.workerThreadsOptions ? this.opts.workerThreadsOptions : {})); + } else { + this.childProcess = parent = fork(this.mainFile, [], Object.assign({ execArgv: execArgv2, stdio: "pipe" }, this.opts.workerForkOptions ? this.opts.workerForkOptions : {})); + } + parent.on("exit", (exitCode2, signalCode) => { + this._exitCode = exitCode2; + signalCode = typeof signalCode === "undefined" ? null : signalCode; + this._signalCode = signalCode; + this._killed = true; + this.emit("exit", exitCode2, signalCode); + parent.removeAllListeners(); + this.removeAllListeners(); + }); + parent.on("error", (...args) => this.emit("error", ...args)); + parent.on("message", (...args) => this.emit("message", ...args)); + parent.on("close", (...args) => this.emit("close", ...args)); + parent.stdout.pipe(process.stdout); + parent.stderr.pipe(process.stderr); + await this.initChild(); + } + async send(msg) { + return new Promise((resolve, reject) => { + if (this.childProcess) { + this.childProcess.send(msg, (err) => { + if (err) { + reject(err); + } else { + resolve(); + } + }); + } else if (this.worker) { + resolve(this.worker.postMessage(msg)); + } else { + resolve(); + } + }); + } + killProcess(signal = "SIGKILL") { + if (this.childProcess) { + this.childProcess.kill(signal); + } else if (this.worker) { + this.worker.terminate(); + } + } + async kill(signal = "SIGKILL", timeoutMs) { + if (this.hasProcessExited()) { + return; + } + const onExit = onExitOnce(this.childProcess || this.worker); + this.killProcess(signal); + if (timeoutMs !== void 0 && (timeoutMs === 0 || isFinite(timeoutMs))) { + const timeoutHandle = setTimeout(() => { + if (!this.hasProcessExited()) { + this.killProcess("SIGKILL"); + } + }, timeoutMs); + await onExit; + clearTimeout(timeoutHandle); + } + await onExit; + } + async initChild() { + const onComplete = new Promise((resolve, reject) => { + const onMessageHandler = /* @__PURE__ */ __name((msg) => { + if (!Object.values(ParentCommand).includes(msg.cmd)) { + return; + } + if (msg.cmd === ParentCommand.InitCompleted) { + resolve(); + } else if (msg.cmd === ParentCommand.InitFailed) { + const err = new Error(); + err.stack = msg.err.stack; + err.message = msg.err.message; + reject(err); + } + this.off("message", onMessageHandler); + this.off("close", onCloseHandler); + }, "onMessageHandler"); + const onCloseHandler = /* @__PURE__ */ __name((code, signal) => { + if (code > 128) { + code -= 128; + } + const msg = exitCodesErrors[code] || `Unknown exit code ${code}`; + reject(new Error(`Error initializing child: ${msg} and signal ${signal}`)); + this.off("message", onMessageHandler); + this.off("close", onCloseHandler); + }, "onCloseHandler"); + this.on("message", onMessageHandler); + this.on("close", onCloseHandler); + }); + await this.send({ + cmd: ChildCommand.Init, + value: this.processFile + }); + await onComplete; + } + hasProcessExited() { + return !!(this.exitCode !== null || this.signalCode); + } +}; +function onExitOnce(child) { + return new Promise((resolve) => { + child.once("exit", () => resolve()); + }); +} +__name(onExitOnce, "onExitOnce"); +var getFreePort = /* @__PURE__ */ __name(async () => { + return new Promise((resolve) => { + const server = createServer(); + server.listen(0, () => { + const { port } = server.address(); + server.close(() => resolve(port)); + }); + }); +}, "getFreePort"); +var convertExecArgv = /* @__PURE__ */ __name(async (execArgv2) => { + const standard = []; + const convertedArgs = []; + for (let i = 0; i < execArgv2.length; i++) { + const arg = execArgv2[i]; + if (arg.indexOf("--inspect") === -1) { + standard.push(arg); + } else { + const argName = arg.split("=")[0]; + const port = await getFreePort(); + convertedArgs.push(`${argName}=${port}`); + } + } + return standard.concat(convertedArgs); +}, "convertExecArgv"); + +// ../../node_modules/bullmq/dist/esm/classes/child-pool.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +import * as path from "path"; +var CHILD_KILL_TIMEOUT = 3e4; +var supportCJS = /* @__PURE__ */ __name(() => { + return typeof __require === "function" && typeof module === "object" && typeof module.exports === "object"; +}, "supportCJS"); +var ChildPool = class { + static { + __name(this, "ChildPool"); + } + constructor({ mainFile = supportCJS() ? path.join(process.cwd(), "dist/cjs/classes/main.js") : path.join(process.cwd(), "dist/esm/classes/main.js"), useWorkerThreads, workerForkOptions, workerThreadsOptions }) { + this.retained = {}; + this.free = {}; + this.opts = { + mainFile, + useWorkerThreads, + workerForkOptions, + workerThreadsOptions + }; + } + async retain(processFile) { + let child = this.getFree(processFile).pop(); + if (child) { + this.retained[child.pid] = child; + return child; + } + child = new Child(this.opts.mainFile, processFile, { + useWorkerThreads: this.opts.useWorkerThreads, + workerForkOptions: this.opts.workerForkOptions, + workerThreadsOptions: this.opts.workerThreadsOptions + }); + child.on("exit", this.remove.bind(this, child)); + try { + await child.init(); + if (child.exitCode !== null || child.signalCode !== null) { + throw new Error("Child exited before it could be retained"); + } + this.retained[child.pid] = child; + return child; + } catch (err) { + console.error(err); + this.release(child); + throw err; + } + } + release(child) { + delete this.retained[child.pid]; + this.getFree(child.processFile).push(child); + } + remove(child) { + delete this.retained[child.pid]; + const free = this.getFree(child.processFile); + const childIndex = free.indexOf(child); + if (childIndex > -1) { + free.splice(childIndex, 1); + } + } + async kill(child, signal = "SIGKILL") { + this.remove(child); + return child.kill(signal, CHILD_KILL_TIMEOUT); + } + async clean() { + const children = Object.values(this.retained).concat(this.getAllFree()); + this.retained = {}; + this.free = {}; + await Promise.all(children.map((c) => this.kill(c, "SIGTERM"))); + } + getFree(id) { + return this.free[id] = this.free[id] || []; + } + getAllFree() { + return Object.values(this.free).reduce((first, second) => first.concat(second), []); + } +}; + +// ../../node_modules/bullmq/dist/esm/classes/child-processor.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var import_node_abort_controller = __toESM(require_browser()); + +// ../../node_modules/bullmq/dist/esm/utils/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var import_ioredis = __toESM(require_built3()); +var import_utils24 = __toESM(require_utils2()); +var semver = __toESM(require_semver2()); +var errorObject = { value: null }; +function tryCatch(fn, ctx, args) { + try { + return fn.apply(ctx, args); + } catch (e) { + errorObject.value = e; + return errorObject; + } +} +__name(tryCatch, "tryCatch"); +function lengthInUtf8Bytes(str) { + return Buffer.byteLength(str, "utf8"); +} +__name(lengthInUtf8Bytes, "lengthInUtf8Bytes"); +function isEmpty(obj) { + for (const key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + return false; + } + } + return true; +} +__name(isEmpty, "isEmpty"); +function array2obj(arr) { + const obj = {}; + for (let i = 0; i < arr.length; i += 2) { + obj[arr[i]] = arr[i + 1]; + } + return obj; +} +__name(array2obj, "array2obj"); +function objectToFlatArray(obj) { + const arr = []; + for (const key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key) && obj[key] !== void 0) { + arr[arr.length] = key; + arr[arr.length] = obj[key]; + } + } + return arr; +} +__name(objectToFlatArray, "objectToFlatArray"); +function delay(ms, abortController) { + return new Promise((resolve) => { + let timeout; + const callback = /* @__PURE__ */ __name(() => { + abortController === null || abortController === void 0 ? void 0 : abortController.signal.removeEventListener("abort", callback); + clearTimeout(timeout); + resolve(); + }, "callback"); + timeout = setTimeout(callback, ms); + abortController === null || abortController === void 0 ? void 0 : abortController.signal.addEventListener("abort", callback); + }); +} +__name(delay, "delay"); +function increaseMaxListeners(emitter, count4) { + const maxListeners = emitter.getMaxListeners(); + emitter.setMaxListeners(maxListeners + count4); +} +__name(increaseMaxListeners, "increaseMaxListeners"); +function invertObject(obj) { + return Object.entries(obj).reduce((result, [key, value]) => { + result[value] = key; + return result; + }, {}); +} +__name(invertObject, "invertObject"); +var optsDecodeMap = { + de: "deduplication", + fpof: "failParentOnFailure", + cpof: "continueParentOnFailure", + idof: "ignoreDependencyOnFailure", + kl: "keepLogs", + rdof: "removeDependencyOnFailure" +}; +var optsEncodeMap = Object.assign(Object.assign({}, invertObject(optsDecodeMap)), { + /*/ Legacy for backwards compatibility */ + debounce: "de" +}); +function isRedisInstance(obj) { + if (!obj) { + return false; + } + const redisApi = ["connect", "disconnect", "duplicate"]; + return redisApi.every((name) => typeof obj[name] === "function"); +} +__name(isRedisInstance, "isRedisInstance"); +function isRedisCluster(obj) { + return isRedisInstance(obj) && obj.isCluster; +} +__name(isRedisCluster, "isRedisCluster"); +function decreaseMaxListeners(emitter, count4) { + increaseMaxListeners(emitter, -count4); +} +__name(decreaseMaxListeners, "decreaseMaxListeners"); +function getParentKey(opts) { + if (opts) { + return `${opts.queue}:${opts.id}`; + } +} +__name(getParentKey, "getParentKey"); +var clientCommandMessageReg = /ERR unknown command ['`]\s*client\s*['`]/; +var DELAY_TIME_5 = 5e3; +var DELAY_TIME_1 = 100; +function isNotConnectionError(error50) { + const { code, message: errorMessage } = error50; + return errorMessage !== import_utils24.CONNECTION_CLOSED_ERROR_MSG && !errorMessage.includes("ECONNREFUSED") && code !== "ECONNREFUSED"; +} +__name(isNotConnectionError, "isNotConnectionError"); +var isRedisVersionLowerThan = /* @__PURE__ */ __name((currentVersion, minimumVersion, currentDatabaseType, desiredDatabaseType = "redis") => { + if (currentDatabaseType === desiredDatabaseType) { + const version5 = semver.valid(semver.coerce(currentVersion)); + return semver.lt(version5, minimumVersion); + } + return false; +}, "isRedisVersionLowerThan"); +var parseObjectValues = /* @__PURE__ */ __name((obj) => { + const accumulator = {}; + for (const value of Object.entries(obj)) { + accumulator[value[0]] = JSON.parse(value[1]); + } + return accumulator; +}, "parseObjectValues"); +var INFINITY = 1 / 0; +var QUEUE_EVENT_SUFFIX = ":qe"; +function removeUndefinedFields(obj) { + const newObj = {}; + for (const key in obj) { + if (obj[key] !== void 0) { + newObj[key] = obj[key]; + } + } + return newObj; +} +__name(removeUndefinedFields, "removeUndefinedFields"); +async function trace3(telemetry, spanKind, queueName, operation, destination, callback, srcPropagationMetadata) { + if (!telemetry) { + return callback(); + } else { + const { tracer: tracer2, contextManager } = telemetry; + const currentContext = contextManager.active(); + let parentContext; + if (srcPropagationMetadata) { + parentContext = contextManager.fromMetadata(currentContext, srcPropagationMetadata); + } + const spanName = destination ? `${operation} ${destination}` : operation; + const span = tracer2.startSpan(spanName, { + kind: spanKind + }, parentContext); + try { + span.setAttributes({ + [TelemetryAttributes.QueueName]: queueName, + [TelemetryAttributes.QueueOperation]: operation + }); + let messageContext; + let dstPropagationMetadata; + if (spanKind === SpanKind.CONSUMER && parentContext) { + messageContext = span.setSpanOnContext(parentContext); + } else { + messageContext = span.setSpanOnContext(currentContext); + } + if (callback.length == 2) { + dstPropagationMetadata = contextManager.getMetadata(messageContext); + } + return await contextManager.with(messageContext, () => callback(span, dstPropagationMetadata)); + } catch (err) { + span.recordException(err); + throw err; + } finally { + span.end(); + } + } +} +__name(trace3, "trace"); + +// ../../node_modules/bullmq/dist/esm/classes/child-processor.js +var ChildStatus; +(function(ChildStatus2) { + ChildStatus2[ChildStatus2["Idle"] = 0] = "Idle"; + ChildStatus2[ChildStatus2["Started"] = 1] = "Started"; + ChildStatus2[ChildStatus2["Terminating"] = 2] = "Terminating"; + ChildStatus2[ChildStatus2["Errored"] = 3] = "Errored"; +})(ChildStatus || (ChildStatus = {})); + +// ../../node_modules/bullmq/dist/esm/classes/errors/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/classes/errors/delayed-error.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var DELAYED_ERROR = "bullmq:movedToDelayed"; +var DelayedError = class extends Error { + static { + __name(this, "DelayedError"); + } + constructor(message2 = DELAYED_ERROR) { + super(message2); + this.name = this.constructor.name; + Object.setPrototypeOf(this, new.target.prototype); + } +}; + +// ../../node_modules/bullmq/dist/esm/classes/errors/rate-limit-error.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var RATE_LIMIT_ERROR = "bullmq:rateLimitExceeded"; +var RateLimitError = class extends Error { + static { + __name(this, "RateLimitError"); + } + constructor(message2 = RATE_LIMIT_ERROR) { + super(message2); + this.name = this.constructor.name; + Object.setPrototypeOf(this, new.target.prototype); + } +}; + +// ../../node_modules/bullmq/dist/esm/classes/errors/unrecoverable-error.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var UNRECOVERABLE_ERROR = "bullmq:unrecoverable"; +var UnrecoverableError = class extends Error { + static { + __name(this, "UnrecoverableError"); + } + constructor(message2 = UNRECOVERABLE_ERROR) { + super(message2); + this.name = this.constructor.name; + Object.setPrototypeOf(this, new.target.prototype); + } +}; + +// ../../node_modules/bullmq/dist/esm/classes/errors/waiting-children-error.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var WAITING_CHILDREN_ERROR = "bullmq:movedToWaitingChildren"; +var WaitingChildrenError = class extends Error { + static { + __name(this, "WaitingChildrenError"); + } + constructor(message2 = WAITING_CHILDREN_ERROR) { + super(message2); + this.name = this.constructor.name; + Object.setPrototypeOf(this, new.target.prototype); + } +}; + +// ../../node_modules/bullmq/dist/esm/classes/errors/waiting-error.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var WAITING_ERROR = "bullmq:movedToWait"; +var WaitingError = class extends Error { + static { + __name(this, "WaitingError"); + } + constructor(message2 = WAITING_ERROR) { + super(message2); + this.name = this.constructor.name; + Object.setPrototypeOf(this, new.target.prototype); + } +}; + +// ../../node_modules/bullmq/dist/esm/classes/flow-producer.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +import { EventEmitter as EventEmitter5 } from "events"; + +// ../../node_modules/uuid/dist/esm-browser/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/uuid/dist/esm-browser/rng.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var getRandomValues = typeof crypto != "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != "undefined" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto); +var rnds8 = new Uint8Array(16); +function rng() { + if (!getRandomValues) { + throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported"); + } + return getRandomValues(rnds8); +} +__name(rng, "rng"); + +// ../../node_modules/uuid/dist/esm-browser/bytesToUuid.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var byteToHex = []; +for (i = 0; i < 256; ++i) { + byteToHex[i] = (i + 256).toString(16).substr(1); +} +var i; +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], "-", bth[buf[i++]], bth[buf[i++]], "-", bth[buf[i++]], bth[buf[i++]], "-", bth[buf[i++]], bth[buf[i++]], "-", bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join(""); +} +__name(bytesToUuid, "bytesToUuid"); +var bytesToUuid_default = bytesToUuid; + +// ../../node_modules/uuid/dist/esm-browser/v4.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function v4(options, buf, offset) { + var i = buf && offset || 0; + if (typeof options == "string") { + buf = options === "binary" ? new Array(16) : null; + options = null; + } + options = options || {}; + var rnds = options.random || (options.rng || rng)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + return buf || bytesToUuid_default(rnds); +} +__name(v4, "v4"); +var v4_default = v4; + +// ../../node_modules/bullmq/dist/esm/classes/job.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +import { debuglog } from "util"; + +// ../../node_modules/bullmq/dist/esm/utils/create-scripts.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/classes/scripts.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/msgpackr/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/msgpackr/pack.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/msgpackr/unpack.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var decoder2; +try { + decoder2 = new TextDecoder(); +} catch (error50) { +} +var src; +var srcEnd; +var position = 0; +var EMPTY_ARRAY = []; +var strings = EMPTY_ARRAY; +var stringPosition = 0; +var currentUnpackr = {}; +var currentStructures; +var srcString; +var srcStringStart = 0; +var srcStringEnd = 0; +var bundledStrings; +var referenceMap; +var currentExtensions = []; +var dataView; +var defaultOptions = { + useRecords: false, + mapsAsObjects: true +}; +var C1Type = class { + static { + __name(this, "C1Type"); + } +}; +var C1 = new C1Type(); +C1.name = "MessagePack 0xC1"; +var sequentialMode = false; +var inlineObjectReadThreshold = 2; +var readStruct; +var onLoadedStructures; +var onSaveState; +try { + new Function(""); +} catch (error50) { + inlineObjectReadThreshold = Infinity; +} +var Unpackr = class _Unpackr { + static { + __name(this, "Unpackr"); + } + constructor(options) { + if (options) { + if (options.useRecords === false && options.mapsAsObjects === void 0) + options.mapsAsObjects = true; + if (options.sequential && options.trusted !== false) { + options.trusted = true; + if (!options.structures && options.useRecords != false) { + options.structures = []; + if (!options.maxSharedStructures) + options.maxSharedStructures = 0; + } + } + if (options.structures) + options.structures.sharedLength = options.structures.length; + else if (options.getStructures) { + (options.structures = []).uninitialized = true; + options.structures.sharedLength = 0; + } + if (options.int64AsNumber) { + options.int64AsType = "number"; + } + } + Object.assign(this, options); + } + unpack(source, options) { + if (src) { + return saveState(() => { + clearSource(); + return this ? this.unpack(source, options) : _Unpackr.prototype.unpack.call(defaultOptions, source, options); + }); + } + if (!source.buffer && source.constructor === ArrayBuffer) + source = typeof Buffer !== "undefined" ? Buffer.from(source) : new Uint8Array(source); + if (typeof options === "object") { + srcEnd = options.end || source.length; + position = options.start || 0; + } else { + position = 0; + srcEnd = options > -1 ? options : source.length; + } + stringPosition = 0; + srcStringEnd = 0; + srcString = null; + strings = EMPTY_ARRAY; + bundledStrings = null; + src = source; + try { + dataView = source.dataView || (source.dataView = new DataView(source.buffer, source.byteOffset, source.byteLength)); + } catch (error50) { + src = null; + if (source instanceof Uint8Array) + throw error50; + throw new Error("Source must be a Uint8Array or Buffer but was a " + (source && typeof source == "object" ? source.constructor.name : typeof source)); + } + if (this instanceof _Unpackr) { + currentUnpackr = this; + if (this.structures) { + currentStructures = this.structures; + return checkedRead(options); + } else if (!currentStructures || currentStructures.length > 0) { + currentStructures = []; + } + } else { + currentUnpackr = defaultOptions; + if (!currentStructures || currentStructures.length > 0) + currentStructures = []; + } + return checkedRead(options); + } + unpackMultiple(source, forEach2) { + let values, lastPosition = 0; + try { + sequentialMode = true; + let size = source.length; + let value = this ? this.unpack(source, size) : defaultUnpackr.unpack(source, size); + if (forEach2) { + if (forEach2(value, lastPosition, position) === false) return; + while (position < size) { + lastPosition = position; + if (forEach2(checkedRead(), lastPosition, position) === false) { + return; + } + } + } else { + values = [value]; + while (position < size) { + lastPosition = position; + values.push(checkedRead()); + } + return values; + } + } catch (error50) { + error50.lastPosition = lastPosition; + error50.values = values; + throw error50; + } finally { + sequentialMode = false; + clearSource(); + } + } + _mergeStructures(loadedStructures, existingStructures) { + if (onLoadedStructures) + loadedStructures = onLoadedStructures.call(this, loadedStructures); + loadedStructures = loadedStructures || []; + if (Object.isFrozen(loadedStructures)) + loadedStructures = loadedStructures.map((structure) => structure.slice(0)); + for (let i = 0, l = loadedStructures.length; i < l; i++) { + let structure = loadedStructures[i]; + if (structure) { + structure.isShared = true; + if (i >= 32) + structure.highByte = i - 32 >> 5; + } + } + loadedStructures.sharedLength = loadedStructures.length; + for (let id in existingStructures || []) { + if (id >= 0) { + let structure = loadedStructures[id]; + let existing = existingStructures[id]; + if (existing) { + if (structure) + (loadedStructures.restoreStructures || (loadedStructures.restoreStructures = []))[id] = structure; + loadedStructures[id] = existing; + } + } + } + return this.structures = loadedStructures; + } + decode(source, options) { + return this.unpack(source, options); + } +}; +function checkedRead(options) { + try { + if (!currentUnpackr.trusted && !sequentialMode) { + let sharedLength = currentStructures.sharedLength || 0; + if (sharedLength < currentStructures.length) + currentStructures.length = sharedLength; + } + let result; + if (currentUnpackr.randomAccessStructure && src[position] < 64 && src[position] >= 32 && readStruct) { + result = readStruct(src, position, srcEnd, currentUnpackr); + src = null; + if (!(options && options.lazy) && result) + result = result.toJSON(); + position = srcEnd; + } else + result = read2(); + if (bundledStrings) { + position = bundledStrings.postBundlePosition; + bundledStrings = null; + } + if (sequentialMode) + currentStructures.restoreStructures = null; + if (position == srcEnd) { + if (currentStructures && currentStructures.restoreStructures) + restoreStructures(); + currentStructures = null; + src = null; + if (referenceMap) + referenceMap = null; + } else if (position > srcEnd) { + throw new Error("Unexpected end of MessagePack data"); + } else if (!sequentialMode) { + let jsonView; + try { + jsonView = JSON.stringify(result, (_, value) => typeof value === "bigint" ? `${value}n` : value).slice(0, 100); + } catch (error50) { + jsonView = "(JSON view not available " + error50 + ")"; + } + throw new Error("Data read, but end of buffer not reached " + jsonView); + } + return result; + } catch (error50) { + if (currentStructures && currentStructures.restoreStructures) + restoreStructures(); + clearSource(); + if (error50 instanceof RangeError || error50.message.startsWith("Unexpected end of buffer") || position > srcEnd) { + error50.incomplete = true; + } + throw error50; + } +} +__name(checkedRead, "checkedRead"); +function restoreStructures() { + for (let id in currentStructures.restoreStructures) { + currentStructures[id] = currentStructures.restoreStructures[id]; + } + currentStructures.restoreStructures = null; +} +__name(restoreStructures, "restoreStructures"); +function read2() { + let token = src[position++]; + if (token < 160) { + if (token < 128) { + if (token < 64) + return token; + else { + let structure = currentStructures[token & 63] || currentUnpackr.getStructures && loadStructures()[token & 63]; + if (structure) { + if (!structure.read) { + structure.read = createStructureReader(structure, token & 63); + } + return structure.read(); + } else + return token; + } + } else if (token < 144) { + token -= 128; + if (currentUnpackr.mapsAsObjects) { + let object2 = {}; + for (let i = 0; i < token; i++) { + let key = readKey(); + if (key === "__proto__") + key = "__proto_"; + object2[key] = read2(); + } + return object2; + } else { + let map2 = /* @__PURE__ */ new Map(); + for (let i = 0; i < token; i++) { + map2.set(read2(), read2()); + } + return map2; + } + } else { + token -= 144; + let array2 = new Array(token); + for (let i = 0; i < token; i++) { + array2[i] = read2(); + } + if (currentUnpackr.freezeData) + return Object.freeze(array2); + return array2; + } + } else if (token < 192) { + let length = token - 160; + if (srcStringEnd >= position) { + return srcString.slice(position - srcStringStart, (position += length) - srcStringStart); + } + if (srcStringEnd == 0 && srcEnd < 140) { + let string4 = length < 16 ? shortStringInJS(length) : longStringInJS(length); + if (string4 != null) + return string4; + } + return readFixedString(length); + } else { + let value; + switch (token) { + case 192: + return null; + case 193: + if (bundledStrings) { + value = read2(); + if (value > 0) + return bundledStrings[1].slice(bundledStrings.position1, bundledStrings.position1 += value); + else + return bundledStrings[0].slice(bundledStrings.position0, bundledStrings.position0 -= value); + } + return C1; + // "never-used", return special object to denote that + case 194: + return false; + case 195: + return true; + case 196: + value = src[position++]; + if (value === void 0) + throw new Error("Unexpected end of buffer"); + return readBin(value); + case 197: + value = dataView.getUint16(position); + position += 2; + return readBin(value); + case 198: + value = dataView.getUint32(position); + position += 4; + return readBin(value); + case 199: + return readExt(src[position++]); + case 200: + value = dataView.getUint16(position); + position += 2; + return readExt(value); + case 201: + value = dataView.getUint32(position); + position += 4; + return readExt(value); + case 202: + value = dataView.getFloat32(position); + if (currentUnpackr.useFloat32 > 2) { + let multiplier = mult10[(src[position] & 127) << 1 | src[position + 1] >> 7]; + position += 4; + return (multiplier * value + (value > 0 ? 0.5 : -0.5) >> 0) / multiplier; + } + position += 4; + return value; + case 203: + value = dataView.getFloat64(position); + position += 8; + return value; + // uint handlers + case 204: + return src[position++]; + case 205: + value = dataView.getUint16(position); + position += 2; + return value; + case 206: + value = dataView.getUint32(position); + position += 4; + return value; + case 207: + if (currentUnpackr.int64AsType === "number") { + value = dataView.getUint32(position) * 4294967296; + value += dataView.getUint32(position + 4); + } else if (currentUnpackr.int64AsType === "string") { + value = dataView.getBigUint64(position).toString(); + } else if (currentUnpackr.int64AsType === "auto") { + value = dataView.getBigUint64(position); + if (value <= BigInt(2) << BigInt(52)) value = Number(value); + } else + value = dataView.getBigUint64(position); + position += 8; + return value; + // int handlers + case 208: + return dataView.getInt8(position++); + case 209: + value = dataView.getInt16(position); + position += 2; + return value; + case 210: + value = dataView.getInt32(position); + position += 4; + return value; + case 211: + if (currentUnpackr.int64AsType === "number") { + value = dataView.getInt32(position) * 4294967296; + value += dataView.getUint32(position + 4); + } else if (currentUnpackr.int64AsType === "string") { + value = dataView.getBigInt64(position).toString(); + } else if (currentUnpackr.int64AsType === "auto") { + value = dataView.getBigInt64(position); + if (value >= BigInt(-2) << BigInt(52) && value <= BigInt(2) << BigInt(52)) value = Number(value); + } else + value = dataView.getBigInt64(position); + position += 8; + return value; + case 212: + value = src[position++]; + if (value == 114) { + return recordDefinition(src[position++] & 63); + } else { + let extension = currentExtensions[value]; + if (extension) { + if (extension.read) { + position++; + return extension.read(read2()); + } else if (extension.noBuffer) { + position++; + return extension(); + } else + return extension(src.subarray(position, ++position)); + } else + throw new Error("Unknown extension " + value); + } + case 213: + value = src[position]; + if (value == 114) { + position++; + return recordDefinition(src[position++] & 63, src[position++]); + } else + return readExt(2); + case 214: + return readExt(4); + case 215: + return readExt(8); + case 216: + return readExt(16); + case 217: + value = src[position++]; + if (srcStringEnd >= position) { + return srcString.slice(position - srcStringStart, (position += value) - srcStringStart); + } + return readString8(value); + case 218: + value = dataView.getUint16(position); + position += 2; + if (srcStringEnd >= position) { + return srcString.slice(position - srcStringStart, (position += value) - srcStringStart); + } + return readString16(value); + case 219: + value = dataView.getUint32(position); + position += 4; + if (srcStringEnd >= position) { + return srcString.slice(position - srcStringStart, (position += value) - srcStringStart); + } + return readString32(value); + case 220: + value = dataView.getUint16(position); + position += 2; + return readArray(value); + case 221: + value = dataView.getUint32(position); + position += 4; + return readArray(value); + case 222: + value = dataView.getUint16(position); + position += 2; + return readMap(value); + case 223: + value = dataView.getUint32(position); + position += 4; + return readMap(value); + default: + if (token >= 224) + return token - 256; + if (token === void 0) { + let error50 = new Error("Unexpected end of MessagePack data"); + error50.incomplete = true; + throw error50; + } + throw new Error("Unknown MessagePack token " + token); + } + } +} +__name(read2, "read"); +var validName = /^[a-zA-Z_$][a-zA-Z\d_$]*$/; +function createStructureReader(structure, firstId) { + function readObject() { + if (readObject.count++ > inlineObjectReadThreshold) { + let readObject2 = structure.read = new Function("r", "return function(){return " + (currentUnpackr.freezeData ? "Object.freeze" : "") + "({" + structure.map((key) => key === "__proto__" ? "__proto_:r()" : validName.test(key) ? key + ":r()" : "[" + JSON.stringify(key) + "]:r()").join(",") + "})}")(read2); + if (structure.highByte === 0) + structure.read = createSecondByteReader(firstId, structure.read); + return readObject2(); + } + let object2 = {}; + for (let i = 0, l = structure.length; i < l; i++) { + let key = structure[i]; + if (key === "__proto__") + key = "__proto_"; + object2[key] = read2(); + } + if (currentUnpackr.freezeData) + return Object.freeze(object2); + return object2; + } + __name(readObject, "readObject"); + readObject.count = 0; + if (structure.highByte === 0) { + return createSecondByteReader(firstId, readObject); + } + return readObject; +} +__name(createStructureReader, "createStructureReader"); +var createSecondByteReader = /* @__PURE__ */ __name((firstId, read0) => { + return function() { + let highByte = src[position++]; + if (highByte === 0) + return read0(); + let id = firstId < 32 ? -(firstId + (highByte << 5)) : firstId + (highByte << 5); + let structure = currentStructures[id] || loadStructures()[id]; + if (!structure) { + throw new Error("Record id is not defined for " + id); + } + if (!structure.read) + structure.read = createStructureReader(structure, firstId); + return structure.read(); + }; +}, "createSecondByteReader"); +function loadStructures() { + let loadedStructures = saveState(() => { + src = null; + return currentUnpackr.getStructures(); + }); + return currentStructures = currentUnpackr._mergeStructures(loadedStructures, currentStructures); +} +__name(loadStructures, "loadStructures"); +var readFixedString = readStringJS; +var readString8 = readStringJS; +var readString16 = readStringJS; +var readString32 = readStringJS; +function readStringJS(length) { + let result; + if (length < 16) { + if (result = shortStringInJS(length)) + return result; + } + if (length > 64 && decoder2) + return decoder2.decode(src.subarray(position, position += length)); + const end = position + length; + const units2 = []; + result = ""; + while (position < end) { + const byte1 = src[position++]; + if ((byte1 & 128) === 0) { + units2.push(byte1); + } else if ((byte1 & 224) === 192) { + const byte2 = src[position++] & 63; + units2.push((byte1 & 31) << 6 | byte2); + } else if ((byte1 & 240) === 224) { + const byte2 = src[position++] & 63; + const byte3 = src[position++] & 63; + units2.push((byte1 & 31) << 12 | byte2 << 6 | byte3); + } else if ((byte1 & 248) === 240) { + const byte2 = src[position++] & 63; + const byte3 = src[position++] & 63; + const byte4 = src[position++] & 63; + let unit = (byte1 & 7) << 18 | byte2 << 12 | byte3 << 6 | byte4; + if (unit > 65535) { + unit -= 65536; + units2.push(unit >>> 10 & 1023 | 55296); + unit = 56320 | unit & 1023; + } + units2.push(unit); + } else { + units2.push(byte1); + } + if (units2.length >= 4096) { + result += fromCharCode.apply(String, units2); + units2.length = 0; + } + } + if (units2.length > 0) { + result += fromCharCode.apply(String, units2); + } + return result; +} +__name(readStringJS, "readStringJS"); +function readArray(length) { + let array2 = new Array(length); + for (let i = 0; i < length; i++) { + array2[i] = read2(); + } + if (currentUnpackr.freezeData) + return Object.freeze(array2); + return array2; +} +__name(readArray, "readArray"); +function readMap(length) { + if (currentUnpackr.mapsAsObjects) { + let object2 = {}; + for (let i = 0; i < length; i++) { + let key = readKey(); + if (key === "__proto__") + key = "__proto_"; + object2[key] = read2(); + } + return object2; + } else { + let map2 = /* @__PURE__ */ new Map(); + for (let i = 0; i < length; i++) { + map2.set(read2(), read2()); + } + return map2; + } +} +__name(readMap, "readMap"); +var fromCharCode = String.fromCharCode; +function longStringInJS(length) { + let start = position; + let bytes = new Array(length); + for (let i = 0; i < length; i++) { + const byte = src[position++]; + if ((byte & 128) > 0) { + position = start; + return; + } + bytes[i] = byte; + } + return fromCharCode.apply(String, bytes); +} +__name(longStringInJS, "longStringInJS"); +function shortStringInJS(length) { + if (length < 4) { + if (length < 2) { + if (length === 0) + return ""; + else { + let a = src[position++]; + if ((a & 128) > 1) { + position -= 1; + return; + } + return fromCharCode(a); + } + } else { + let a = src[position++]; + let b = src[position++]; + if ((a & 128) > 0 || (b & 128) > 0) { + position -= 2; + return; + } + if (length < 3) + return fromCharCode(a, b); + let c = src[position++]; + if ((c & 128) > 0) { + position -= 3; + return; + } + return fromCharCode(a, b, c); + } + } else { + let a = src[position++]; + let b = src[position++]; + let c = src[position++]; + let d = src[position++]; + if ((a & 128) > 0 || (b & 128) > 0 || (c & 128) > 0 || (d & 128) > 0) { + position -= 4; + return; + } + if (length < 6) { + if (length === 4) + return fromCharCode(a, b, c, d); + else { + let e = src[position++]; + if ((e & 128) > 0) { + position -= 5; + return; + } + return fromCharCode(a, b, c, d, e); + } + } else if (length < 8) { + let e = src[position++]; + let f = src[position++]; + if ((e & 128) > 0 || (f & 128) > 0) { + position -= 6; + return; + } + if (length < 7) + return fromCharCode(a, b, c, d, e, f); + let g = src[position++]; + if ((g & 128) > 0) { + position -= 7; + return; + } + return fromCharCode(a, b, c, d, e, f, g); + } else { + let e = src[position++]; + let f = src[position++]; + let g = src[position++]; + let h = src[position++]; + if ((e & 128) > 0 || (f & 128) > 0 || (g & 128) > 0 || (h & 128) > 0) { + position -= 8; + return; + } + if (length < 10) { + if (length === 8) + return fromCharCode(a, b, c, d, e, f, g, h); + else { + let i = src[position++]; + if ((i & 128) > 0) { + position -= 9; + return; + } + return fromCharCode(a, b, c, d, e, f, g, h, i); + } + } else if (length < 12) { + let i = src[position++]; + let j = src[position++]; + if ((i & 128) > 0 || (j & 128) > 0) { + position -= 10; + return; + } + if (length < 11) + return fromCharCode(a, b, c, d, e, f, g, h, i, j); + let k = src[position++]; + if ((k & 128) > 0) { + position -= 11; + return; + } + return fromCharCode(a, b, c, d, e, f, g, h, i, j, k); + } else { + let i = src[position++]; + let j = src[position++]; + let k = src[position++]; + let l = src[position++]; + if ((i & 128) > 0 || (j & 128) > 0 || (k & 128) > 0 || (l & 128) > 0) { + position -= 12; + return; + } + if (length < 14) { + if (length === 12) + return fromCharCode(a, b, c, d, e, f, g, h, i, j, k, l); + else { + let m = src[position++]; + if ((m & 128) > 0) { + position -= 13; + return; + } + return fromCharCode(a, b, c, d, e, f, g, h, i, j, k, l, m); + } + } else { + let m = src[position++]; + let n = src[position++]; + if ((m & 128) > 0 || (n & 128) > 0) { + position -= 14; + return; + } + if (length < 15) + return fromCharCode(a, b, c, d, e, f, g, h, i, j, k, l, m, n); + let o = src[position++]; + if ((o & 128) > 0) { + position -= 15; + return; + } + return fromCharCode(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); + } + } + } + } +} +__name(shortStringInJS, "shortStringInJS"); +function readOnlyJSString() { + let token = src[position++]; + let length; + if (token < 192) { + length = token - 160; + } else { + switch (token) { + case 217: + length = src[position++]; + break; + case 218: + length = dataView.getUint16(position); + position += 2; + break; + case 219: + length = dataView.getUint32(position); + position += 4; + break; + default: + throw new Error("Expected string"); + } + } + return readStringJS(length); +} +__name(readOnlyJSString, "readOnlyJSString"); +function readBin(length) { + return currentUnpackr.copyBuffers ? ( + // specifically use the copying slice (not the node one) + Uint8Array.prototype.slice.call(src, position, position += length) + ) : src.subarray(position, position += length); +} +__name(readBin, "readBin"); +function readExt(length) { + let type = src[position++]; + if (currentExtensions[type]) { + let end; + return currentExtensions[type](src.subarray(position, end = position += length), (readPosition) => { + position = readPosition; + try { + return read2(); + } finally { + position = end; + } + }); + } else + throw new Error("Unknown extension type " + type); +} +__name(readExt, "readExt"); +var keyCache = new Array(4096); +function readKey() { + let length = src[position++]; + if (length >= 160 && length < 192) { + length = length - 160; + if (srcStringEnd >= position) + return srcString.slice(position - srcStringStart, (position += length) - srcStringStart); + else if (!(srcStringEnd == 0 && srcEnd < 180)) + return readFixedString(length); + } else { + position--; + return asSafeString(read2()); + } + let key = (length << 5 ^ (length > 1 ? dataView.getUint16(position) : length > 0 ? src[position] : 0)) & 4095; + let entry = keyCache[key]; + let checkPosition = position; + let end = position + length - 3; + let chunk; + let i = 0; + if (entry && entry.bytes == length) { + while (checkPosition < end) { + chunk = dataView.getUint32(checkPosition); + if (chunk != entry[i++]) { + checkPosition = 1879048192; + break; + } + checkPosition += 4; + } + end += 3; + while (checkPosition < end) { + chunk = src[checkPosition++]; + if (chunk != entry[i++]) { + checkPosition = 1879048192; + break; + } + } + if (checkPosition === end) { + position = checkPosition; + return entry.string; + } + end -= 3; + checkPosition = position; + } + entry = []; + keyCache[key] = entry; + entry.bytes = length; + while (checkPosition < end) { + chunk = dataView.getUint32(checkPosition); + entry.push(chunk); + checkPosition += 4; + } + end += 3; + while (checkPosition < end) { + chunk = src[checkPosition++]; + entry.push(chunk); + } + let string4 = length < 16 ? shortStringInJS(length) : longStringInJS(length); + if (string4 != null) + return entry.string = string4; + return entry.string = readFixedString(length); +} +__name(readKey, "readKey"); +function asSafeString(property) { + if (typeof property === "string") return property; + if (typeof property === "number" || typeof property === "boolean" || typeof property === "bigint") return property.toString(); + if (property == null) return property + ""; + if (currentUnpackr.allowArraysInMapKeys && Array.isArray(property) && property.flat().every((item) => ["string", "number", "boolean", "bigint"].includes(typeof item))) { + return property.flat().toString(); + } + throw new Error(`Invalid property type for record: ${typeof property}`); +} +__name(asSafeString, "asSafeString"); +var recordDefinition = /* @__PURE__ */ __name((id, highByte) => { + let structure = read2().map(asSafeString); + let firstByte = id; + if (highByte !== void 0) { + id = id < 32 ? -((highByte << 5) + id) : (highByte << 5) + id; + structure.highByte = highByte; + } + let existingStructure = currentStructures[id]; + if (existingStructure && (existingStructure.isShared || sequentialMode)) { + (currentStructures.restoreStructures || (currentStructures.restoreStructures = []))[id] = existingStructure; + } + currentStructures[id] = structure; + structure.read = createStructureReader(structure, firstByte); + return structure.read(); +}, "recordDefinition"); +currentExtensions[0] = () => { +}; +currentExtensions[0].noBuffer = true; +currentExtensions[66] = (data) => { + let headLength = data.byteLength % 8 || 8; + let head = BigInt(data[0] & 128 ? data[0] - 256 : data[0]); + for (let i = 1; i < headLength; i++) { + head <<= BigInt(8); + head += BigInt(data[i]); + } + if (data.byteLength !== headLength) { + let view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let decode5 = /* @__PURE__ */ __name((start, end) => { + let length = end - start; + if (length <= 40) { + let out = view.getBigUint64(start); + for (let i = start + 8; i < end; i += 8) { + out <<= BigInt(64n); + out |= view.getBigUint64(i); + } + return out; + } + let middle = start + (length >> 4 << 3); + let left = decode5(start, middle); + let right = decode5(middle, end); + return left << BigInt((end - middle) * 8) | right; + }, "decode"); + head = head << BigInt((view.byteLength - headLength) * 8) | decode5(headLength, view.byteLength); + } + return head; +}; +var errors = { + Error, + EvalError, + RangeError, + ReferenceError, + SyntaxError, + TypeError, + URIError, + AggregateError: typeof AggregateError === "function" ? AggregateError : null +}; +currentExtensions[101] = () => { + let data = read2(); + if (!errors[data[0]]) { + let error50 = Error(data[1], { cause: data[2] }); + error50.name = data[0]; + return error50; + } + return errors[data[0]](data[1], { cause: data[2] }); +}; +currentExtensions[105] = (data) => { + if (currentUnpackr.structuredClone === false) throw new Error("Structured clone extension is disabled"); + let id = dataView.getUint32(position - 4); + if (!referenceMap) + referenceMap = /* @__PURE__ */ new Map(); + let token = src[position]; + let target2; + if (token >= 144 && token < 160 || token == 220 || token == 221) + target2 = []; + else if (token >= 128 && token < 144 || token == 222 || token == 223) + target2 = /* @__PURE__ */ new Map(); + else if ((token >= 199 && token <= 201 || token >= 212 && token <= 216) && src[position + 1] === 115) + target2 = /* @__PURE__ */ new Set(); + else + target2 = {}; + let refEntry = { target: target2 }; + referenceMap.set(id, refEntry); + let targetProperties = read2(); + if (!refEntry.used) { + return refEntry.target = targetProperties; + } else { + Object.assign(target2, targetProperties); + } + if (target2 instanceof Map) + for (let [k, v2] of targetProperties.entries()) target2.set(k, v2); + if (target2 instanceof Set) + for (let i of Array.from(targetProperties)) target2.add(i); + return target2; +}; +currentExtensions[112] = (data) => { + if (currentUnpackr.structuredClone === false) throw new Error("Structured clone extension is disabled"); + let id = dataView.getUint32(position - 4); + let refEntry = referenceMap.get(id); + refEntry.used = true; + return refEntry.target; +}; +currentExtensions[115] = () => new Set(read2()); +var typedArrays = ["Int8", "Uint8", "Uint8Clamped", "Int16", "Uint16", "Int32", "Uint32", "Float32", "Float64", "BigInt64", "BigUint64"].map((type) => type + "Array"); +var glbl = typeof globalThis === "object" ? globalThis : window; +currentExtensions[116] = (data) => { + let typeCode = data[0]; + let buffer = Uint8Array.prototype.slice.call(data, 1).buffer; + let typedArrayName = typedArrays[typeCode]; + if (!typedArrayName) { + if (typeCode === 16) return buffer; + if (typeCode === 17) return new DataView(buffer); + throw new Error("Could not find typed array for code " + typeCode); + } + return new glbl[typedArrayName](buffer); +}; +currentExtensions[120] = () => { + let data = read2(); + return new RegExp(data[0], data[1]); +}; +var TEMP_BUNDLE = []; +currentExtensions[98] = (data) => { + let dataSize = (data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3]; + let dataPosition = position; + position += dataSize - data.length; + bundledStrings = TEMP_BUNDLE; + bundledStrings = [readOnlyJSString(), readOnlyJSString()]; + bundledStrings.position0 = 0; + bundledStrings.position1 = 0; + bundledStrings.postBundlePosition = position; + position = dataPosition; + return read2(); +}; +currentExtensions[255] = (data) => { + if (data.length == 4) + return new Date((data[0] * 16777216 + (data[1] << 16) + (data[2] << 8) + data[3]) * 1e3); + else if (data.length == 8) + return new Date( + ((data[0] << 22) + (data[1] << 14) + (data[2] << 6) + (data[3] >> 2)) / 1e6 + ((data[3] & 3) * 4294967296 + data[4] * 16777216 + (data[5] << 16) + (data[6] << 8) + data[7]) * 1e3 + ); + else if (data.length == 12) + return new Date( + ((data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3]) / 1e6 + ((data[4] & 128 ? -281474976710656 : 0) + data[6] * 1099511627776 + data[7] * 4294967296 + data[8] * 16777216 + (data[9] << 16) + (data[10] << 8) + data[11]) * 1e3 + ); + else + return /* @__PURE__ */ new Date("invalid"); +}; +function saveState(callback) { + if (onSaveState) + onSaveState(); + let savedSrcEnd = srcEnd; + let savedPosition = position; + let savedStringPosition = stringPosition; + let savedSrcStringStart = srcStringStart; + let savedSrcStringEnd = srcStringEnd; + let savedSrcString = srcString; + let savedStrings = strings; + let savedReferenceMap = referenceMap; + let savedBundledStrings = bundledStrings; + let savedSrc = new Uint8Array(src.slice(0, srcEnd)); + let savedStructures = currentStructures; + let savedStructuresContents = currentStructures.slice(0, currentStructures.length); + let savedPackr = currentUnpackr; + let savedSequentialMode = sequentialMode; + let value = callback(); + srcEnd = savedSrcEnd; + position = savedPosition; + stringPosition = savedStringPosition; + srcStringStart = savedSrcStringStart; + srcStringEnd = savedSrcStringEnd; + srcString = savedSrcString; + strings = savedStrings; + referenceMap = savedReferenceMap; + bundledStrings = savedBundledStrings; + src = savedSrc; + sequentialMode = savedSequentialMode; + currentStructures = savedStructures; + currentStructures.splice(0, currentStructures.length, ...savedStructuresContents); + currentUnpackr = savedPackr; + dataView = new DataView(src.buffer, src.byteOffset, src.byteLength); + return value; +} +__name(saveState, "saveState"); +function clearSource() { + src = null; + referenceMap = null; + currentStructures = null; +} +__name(clearSource, "clearSource"); +var mult10 = new Array(147); +for (let i = 0; i < 256; i++) { + mult10[i] = +("1e" + Math.floor(45.15 - i * 0.30103)); +} +var defaultUnpackr = new Unpackr({ useRecords: false }); +var unpack = defaultUnpackr.unpack; +var unpackMultiple = defaultUnpackr.unpackMultiple; +var decode4 = defaultUnpackr.unpack; +var FLOAT32_OPTIONS = { + NEVER: 0, + ALWAYS: 1, + DECIMAL_ROUND: 3, + DECIMAL_FIT: 4 +}; +var f32Array = new Float32Array(1); +var u8Array = new Uint8Array(f32Array.buffer, 0, 4); + +// ../../node_modules/msgpackr/pack.js +var textEncoder; +try { + textEncoder = new TextEncoder(); +} catch (error50) { +} +var extensions; +var extensionClasses; +var hasNodeBuffer = typeof Buffer !== "undefined"; +var ByteArrayAllocate = hasNodeBuffer ? function(length) { + return Buffer.allocUnsafeSlow(length); +} : Uint8Array; +var ByteArray = hasNodeBuffer ? Buffer : Uint8Array; +var MAX_BUFFER_SIZE = hasNodeBuffer ? 4294967296 : 2144337920; +var target; +var keysTarget; +var targetView; +var position2 = 0; +var safeEnd; +var bundledStrings2 = null; +var writeStructSlots; +var MAX_BUNDLE_SIZE = 21760; +var hasNonLatin = /[\u0080-\uFFFF]/; +var RECORD_SYMBOL = /* @__PURE__ */ Symbol("record-id"); +var Packr = class extends Unpackr { + static { + __name(this, "Packr"); + } + constructor(options) { + super(options); + this.offset = 0; + let typeBuffer; + let start; + let hasSharedUpdate; + let structures; + let referenceMap2; + let encodeUtf8 = ByteArray.prototype.utf8Write ? function(string4, position3) { + return target.utf8Write(string4, position3, target.byteLength - position3); + } : textEncoder && textEncoder.encodeInto ? function(string4, position3) { + return textEncoder.encodeInto(string4, target.subarray(position3)).written; + } : false; + let packr = this; + if (!options) + options = {}; + let isSequential = options && options.sequential; + let hasSharedStructures = options.structures || options.saveStructures; + let maxSharedStructures = options.maxSharedStructures; + if (maxSharedStructures == null) + maxSharedStructures = hasSharedStructures ? 32 : 0; + if (maxSharedStructures > 8160) + throw new Error("Maximum maxSharedStructure is 8160"); + if (options.structuredClone && options.moreTypes == void 0) { + this.moreTypes = true; + } + let maxOwnStructures = options.maxOwnStructures; + if (maxOwnStructures == null) + maxOwnStructures = hasSharedStructures ? 32 : 64; + if (!this.structures && options.useRecords != false) + this.structures = []; + let useTwoByteRecords = maxSharedStructures > 32 || maxOwnStructures + maxSharedStructures > 64; + let sharedLimitId = maxSharedStructures + 64; + let maxStructureId = maxSharedStructures + maxOwnStructures + 64; + if (maxStructureId > 8256) { + throw new Error("Maximum maxSharedStructure + maxOwnStructure is 8192"); + } + let recordIdsToRemove = []; + let transitionsCount = 0; + let serializationsSinceTransitionRebuild = 0; + this.pack = this.encode = function(value, encodeOptions) { + if (!target) { + target = new ByteArrayAllocate(8192); + targetView = target.dataView || (target.dataView = new DataView(target.buffer, 0, 8192)); + position2 = 0; + } + safeEnd = target.length - 10; + if (safeEnd - position2 < 2048) { + target = new ByteArrayAllocate(target.length); + targetView = target.dataView || (target.dataView = new DataView(target.buffer, 0, target.length)); + safeEnd = target.length - 10; + position2 = 0; + } else + position2 = position2 + 7 & 2147483640; + start = position2; + if (encodeOptions & RESERVE_START_SPACE) position2 += encodeOptions & 255; + referenceMap2 = packr.structuredClone ? /* @__PURE__ */ new Map() : null; + if (packr.bundleStrings && typeof value !== "string") { + bundledStrings2 = []; + bundledStrings2.size = Infinity; + } else + bundledStrings2 = null; + structures = packr.structures; + if (structures) { + if (structures.uninitialized) + structures = packr._mergeStructures(packr.getStructures()); + let sharedLength = structures.sharedLength || 0; + if (sharedLength > maxSharedStructures) { + throw new Error("Shared structures is larger than maximum shared structures, try increasing maxSharedStructures to " + structures.sharedLength); + } + if (!structures.transitions) { + structures.transitions = /* @__PURE__ */ Object.create(null); + for (let i = 0; i < sharedLength; i++) { + let keys = structures[i]; + if (!keys) + continue; + let nextTransition, transition = structures.transitions; + for (let j = 0, l = keys.length; j < l; j++) { + let key = keys[j]; + nextTransition = transition[key]; + if (!nextTransition) { + nextTransition = transition[key] = /* @__PURE__ */ Object.create(null); + } + transition = nextTransition; + } + transition[RECORD_SYMBOL] = i + 64; + } + this.lastNamedStructuresLength = sharedLength; + } + if (!isSequential) { + structures.nextId = sharedLength + 64; + } + } + if (hasSharedUpdate) + hasSharedUpdate = false; + let encodingError; + try { + if (packr.randomAccessStructure && value && value.constructor && value.constructor === Object) + writeStruct(value); + else + pack3(value); + let lastBundle = bundledStrings2; + if (bundledStrings2) + writeBundles(start, pack3, 0); + if (referenceMap2 && referenceMap2.idsToInsert) { + let idsToInsert = referenceMap2.idsToInsert.sort((a, b) => a.offset > b.offset ? 1 : -1); + let i = idsToInsert.length; + let incrementPosition = -1; + while (lastBundle && i > 0) { + let insertionPoint = idsToInsert[--i].offset + start; + if (insertionPoint < lastBundle.stringsPosition + start && incrementPosition === -1) + incrementPosition = 0; + if (insertionPoint > lastBundle.position + start) { + if (incrementPosition >= 0) + incrementPosition += 6; + } else { + if (incrementPosition >= 0) { + targetView.setUint32( + lastBundle.position + start, + targetView.getUint32(lastBundle.position + start) + incrementPosition + ); + incrementPosition = -1; + } + lastBundle = lastBundle.previous; + i++; + } + } + if (incrementPosition >= 0 && lastBundle) { + targetView.setUint32( + lastBundle.position + start, + targetView.getUint32(lastBundle.position + start) + incrementPosition + ); + } + position2 += idsToInsert.length * 6; + if (position2 > safeEnd) + makeRoom(position2); + packr.offset = position2; + let serialized = insertIds(target.subarray(start, position2), idsToInsert); + referenceMap2 = null; + return serialized; + } + packr.offset = position2; + if (encodeOptions & REUSE_BUFFER_MODE) { + target.start = start; + target.end = position2; + return target; + } + return target.subarray(start, position2); + } catch (error50) { + encodingError = error50; + throw error50; + } finally { + if (structures) { + resetStructures(); + if (hasSharedUpdate && packr.saveStructures) { + let sharedLength = structures.sharedLength || 0; + let returnBuffer = target.subarray(start, position2); + let newSharedData = prepareStructures(structures, packr); + if (!encodingError) { + if (packr.saveStructures(newSharedData, newSharedData.isCompatible) === false) { + return packr.pack(value, encodeOptions); + } + packr.lastNamedStructuresLength = sharedLength; + if (target.length > 1073741824) target = null; + return returnBuffer; + } + } + } + if (target.length > 1073741824) target = null; + if (encodeOptions & RESET_BUFFER_MODE) + position2 = start; + } + }; + const resetStructures = /* @__PURE__ */ __name(() => { + if (serializationsSinceTransitionRebuild < 10) + serializationsSinceTransitionRebuild++; + let sharedLength = structures.sharedLength || 0; + if (structures.length > sharedLength && !isSequential) + structures.length = sharedLength; + if (transitionsCount > 1e4) { + structures.transitions = null; + serializationsSinceTransitionRebuild = 0; + transitionsCount = 0; + if (recordIdsToRemove.length > 0) + recordIdsToRemove = []; + } else if (recordIdsToRemove.length > 0 && !isSequential) { + for (let i = 0, l = recordIdsToRemove.length; i < l; i++) { + recordIdsToRemove[i][RECORD_SYMBOL] = 0; + } + recordIdsToRemove = []; + } + }, "resetStructures"); + const packArray = /* @__PURE__ */ __name((value) => { + var length = value.length; + if (length < 16) { + target[position2++] = 144 | length; + } else if (length < 65536) { + target[position2++] = 220; + target[position2++] = length >> 8; + target[position2++] = length & 255; + } else { + target[position2++] = 221; + targetView.setUint32(position2, length); + position2 += 4; + } + for (let i = 0; i < length; i++) { + pack3(value[i]); + } + }, "packArray"); + const pack3 = /* @__PURE__ */ __name((value) => { + if (position2 > safeEnd) + target = makeRoom(position2); + var type = typeof value; + var length; + if (type === "string") { + let strLength = value.length; + if (bundledStrings2 && strLength >= 4 && strLength < 4096) { + if ((bundledStrings2.size += strLength) > MAX_BUNDLE_SIZE) { + let extStart; + let maxBytes2 = (bundledStrings2[0] ? bundledStrings2[0].length * 3 + bundledStrings2[1].length : 0) + 10; + if (position2 + maxBytes2 > safeEnd) + target = makeRoom(position2 + maxBytes2); + let lastBundle; + if (bundledStrings2.position) { + lastBundle = bundledStrings2; + target[position2] = 200; + position2 += 3; + target[position2++] = 98; + extStart = position2 - start; + position2 += 4; + writeBundles(start, pack3, 0); + targetView.setUint16(extStart + start - 3, position2 - start - extStart); + } else { + target[position2++] = 214; + target[position2++] = 98; + extStart = position2 - start; + position2 += 4; + } + bundledStrings2 = ["", ""]; + bundledStrings2.previous = lastBundle; + bundledStrings2.size = 0; + bundledStrings2.position = extStart; + } + let twoByte = hasNonLatin.test(value); + bundledStrings2[twoByte ? 0 : 1] += value; + target[position2++] = 193; + pack3(twoByte ? -strLength : strLength); + return; + } + let headerSize; + if (strLength < 32) { + headerSize = 1; + } else if (strLength < 256) { + headerSize = 2; + } else if (strLength < 65536) { + headerSize = 3; + } else { + headerSize = 5; + } + let maxBytes = strLength * 3; + if (position2 + maxBytes > safeEnd) + target = makeRoom(position2 + maxBytes); + if (strLength < 64 || !encodeUtf8) { + let i, c1, c2, strPosition = position2 + headerSize; + for (i = 0; i < strLength; i++) { + c1 = value.charCodeAt(i); + if (c1 < 128) { + target[strPosition++] = c1; + } else if (c1 < 2048) { + target[strPosition++] = c1 >> 6 | 192; + target[strPosition++] = c1 & 63 | 128; + } else if ((c1 & 64512) === 55296 && ((c2 = value.charCodeAt(i + 1)) & 64512) === 56320) { + c1 = 65536 + ((c1 & 1023) << 10) + (c2 & 1023); + i++; + target[strPosition++] = c1 >> 18 | 240; + target[strPosition++] = c1 >> 12 & 63 | 128; + target[strPosition++] = c1 >> 6 & 63 | 128; + target[strPosition++] = c1 & 63 | 128; + } else { + target[strPosition++] = c1 >> 12 | 224; + target[strPosition++] = c1 >> 6 & 63 | 128; + target[strPosition++] = c1 & 63 | 128; + } + } + length = strPosition - position2 - headerSize; + } else { + length = encodeUtf8(value, position2 + headerSize); + } + if (length < 32) { + target[position2++] = 160 | length; + } else if (length < 256) { + if (headerSize < 2) { + target.copyWithin(position2 + 2, position2 + 1, position2 + 1 + length); + } + target[position2++] = 217; + target[position2++] = length; + } else if (length < 65536) { + if (headerSize < 3) { + target.copyWithin(position2 + 3, position2 + 2, position2 + 2 + length); + } + target[position2++] = 218; + target[position2++] = length >> 8; + target[position2++] = length & 255; + } else { + if (headerSize < 5) { + target.copyWithin(position2 + 5, position2 + 3, position2 + 3 + length); + } + target[position2++] = 219; + targetView.setUint32(position2, length); + position2 += 4; + } + position2 += length; + } else if (type === "number") { + if (value >>> 0 === value) { + if (value < 32 || value < 128 && this.useRecords === false || value < 64 && !this.randomAccessStructure) { + target[position2++] = value; + } else if (value < 256) { + target[position2++] = 204; + target[position2++] = value; + } else if (value < 65536) { + target[position2++] = 205; + target[position2++] = value >> 8; + target[position2++] = value & 255; + } else { + target[position2++] = 206; + targetView.setUint32(position2, value); + position2 += 4; + } + } else if (value >> 0 === value) { + if (value >= -32) { + target[position2++] = 256 + value; + } else if (value >= -128) { + target[position2++] = 208; + target[position2++] = value + 256; + } else if (value >= -32768) { + target[position2++] = 209; + targetView.setInt16(position2, value); + position2 += 2; + } else { + target[position2++] = 210; + targetView.setInt32(position2, value); + position2 += 4; + } + } else { + let useFloat32; + if ((useFloat32 = this.useFloat32) > 0 && value < 4294967296 && value >= -2147483648) { + target[position2++] = 202; + targetView.setFloat32(position2, value); + let xShifted; + if (useFloat32 < 4 || // this checks for rounding of numbers that were encoded in 32-bit float to nearest significant decimal digit that could be preserved + (xShifted = value * mult10[(target[position2] & 127) << 1 | target[position2 + 1] >> 7]) >> 0 === xShifted) { + position2 += 4; + return; + } else + position2--; + } + target[position2++] = 203; + targetView.setFloat64(position2, value); + position2 += 8; + } + } else if (type === "object" || type === "function") { + if (!value) + target[position2++] = 192; + else { + if (referenceMap2) { + let referee = referenceMap2.get(value); + if (referee) { + if (!referee.id) { + let idsToInsert = referenceMap2.idsToInsert || (referenceMap2.idsToInsert = []); + referee.id = idsToInsert.push(referee); + } + target[position2++] = 214; + target[position2++] = 112; + targetView.setUint32(position2, referee.id); + position2 += 4; + return; + } else + referenceMap2.set(value, { offset: position2 - start }); + } + let constructor = value.constructor; + if (constructor === Object) { + writeObject(value); + } else if (constructor === Array) { + packArray(value); + } else if (constructor === Map) { + if (this.mapAsEmptyObject) target[position2++] = 128; + else { + length = value.size; + if (length < 16) { + target[position2++] = 128 | length; + } else if (length < 65536) { + target[position2++] = 222; + target[position2++] = length >> 8; + target[position2++] = length & 255; + } else { + target[position2++] = 223; + targetView.setUint32(position2, length); + position2 += 4; + } + for (let [key, entryValue] of value) { + pack3(key); + pack3(entryValue); + } + } + } else { + for (let i = 0, l = extensions.length; i < l; i++) { + let extensionClass = extensionClasses[i]; + if (value instanceof extensionClass) { + let extension = extensions[i]; + if (extension.write) { + if (extension.type) { + target[position2++] = 212; + target[position2++] = extension.type; + target[position2++] = 0; + } + let writeResult = extension.write.call(this, value); + if (writeResult === value) { + if (Array.isArray(value)) { + packArray(value); + } else { + writeObject(value); + } + } else { + pack3(writeResult); + } + return; + } + let currentTarget = target; + let currentTargetView = targetView; + let currentPosition = position2; + target = null; + let result; + try { + result = extension.pack.call(this, value, (size) => { + target = currentTarget; + currentTarget = null; + position2 += size; + if (position2 > safeEnd) + makeRoom(position2); + return { + target, + targetView, + position: position2 - size + }; + }, pack3); + } finally { + if (currentTarget) { + target = currentTarget; + targetView = currentTargetView; + position2 = currentPosition; + safeEnd = target.length - 10; + } + } + if (result) { + if (result.length + position2 > safeEnd) + makeRoom(result.length + position2); + position2 = writeExtensionData(result, target, position2, extension.type); + } + return; + } + } + if (Array.isArray(value)) { + packArray(value); + } else { + if (value.toJSON) { + const json2 = value.toJSON(); + if (json2 !== value) + return pack3(json2); + } + if (type === "function") + return pack3(this.writeFunction && this.writeFunction(value)); + writeObject(value); + } + } + } + } else if (type === "boolean") { + target[position2++] = value ? 195 : 194; + } else if (type === "bigint") { + if (value < 9223372036854776e3 && value >= -9223372036854776e3) { + target[position2++] = 211; + targetView.setBigInt64(position2, value); + } else if (value < 18446744073709552e3 && value > 0) { + target[position2++] = 207; + targetView.setBigUint64(position2, value); + } else { + if (this.largeBigIntToFloat) { + target[position2++] = 203; + targetView.setFloat64(position2, Number(value)); + } else if (this.largeBigIntToString) { + return pack3(value.toString()); + } else if (this.useBigIntExtension || this.moreTypes) { + let empty = value < 0 ? BigInt(-1) : BigInt(0); + let array2; + if (value >> BigInt(65536) === empty) { + let mask = BigInt(18446744073709552e3) - BigInt(1); + let chunks = []; + while (true) { + chunks.push(value & mask); + if (value >> BigInt(63) === empty) break; + value >>= BigInt(64); + } + array2 = new Uint8Array(new BigUint64Array(chunks).buffer); + array2.reverse(); + } else { + let invert = value < 0; + let string4 = (invert ? ~value : value).toString(16); + if (string4.length % 2) { + string4 = "0" + string4; + } else if (parseInt(string4.charAt(0), 16) >= 8) { + string4 = "00" + string4; + } + if (hasNodeBuffer) { + array2 = Buffer.from(string4, "hex"); + } else { + array2 = new Uint8Array(string4.length / 2); + for (let i = 0; i < array2.length; i++) { + array2[i] = parseInt(string4.slice(i * 2, i * 2 + 2), 16); + } + } + if (invert) { + for (let i = 0; i < array2.length; i++) array2[i] = ~array2[i]; + } + } + if (array2.length + position2 > safeEnd) + makeRoom(array2.length + position2); + position2 = writeExtensionData(array2, target, position2, 66); + return; + } else { + throw new RangeError(value + " was too large to fit in MessagePack 64-bit integer format, use useBigIntExtension, or set largeBigIntToFloat to convert to float-64, or set largeBigIntToString to convert to string"); + } + } + position2 += 8; + } else if (type === "undefined") { + if (this.encodeUndefinedAsNil) + target[position2++] = 192; + else { + target[position2++] = 212; + target[position2++] = 0; + target[position2++] = 0; + } + } else { + throw new Error("Unknown type: " + type); + } + }, "pack"); + const writePlainObject = this.variableMapSize || this.coercibleKeyAsNumber || this.skipValues ? (object2) => { + let keys; + if (this.skipValues) { + keys = []; + for (let key2 in object2) { + if ((typeof object2.hasOwnProperty !== "function" || object2.hasOwnProperty(key2)) && !this.skipValues.includes(object2[key2])) + keys.push(key2); + } + } else { + keys = Object.keys(object2); + } + let length = keys.length; + if (length < 16) { + target[position2++] = 128 | length; + } else if (length < 65536) { + target[position2++] = 222; + target[position2++] = length >> 8; + target[position2++] = length & 255; + } else { + target[position2++] = 223; + targetView.setUint32(position2, length); + position2 += 4; + } + let key; + if (this.coercibleKeyAsNumber) { + for (let i = 0; i < length; i++) { + key = keys[i]; + let num = Number(key); + pack3(isNaN(num) ? key : num); + pack3(object2[key]); + } + } else { + for (let i = 0; i < length; i++) { + pack3(key = keys[i]); + pack3(object2[key]); + } + } + } : (object2) => { + target[position2++] = 222; + let objectOffset = position2 - start; + position2 += 2; + let size = 0; + for (let key in object2) { + if (typeof object2.hasOwnProperty !== "function" || object2.hasOwnProperty(key)) { + pack3(key); + pack3(object2[key]); + size++; + } + } + if (size > 65535) { + throw new Error('Object is too large to serialize with fast 16-bit map size, use the "variableMapSize" option to serialize this object'); + } + target[objectOffset++ + start] = size >> 8; + target[objectOffset + start] = size & 255; + }; + const writeRecord = this.useRecords === false ? writePlainObject : options.progressiveRecords && !useTwoByteRecords ? ( + // this is about 2% faster for highly stable structures, since it only requires one for-in loop (but much more expensive when new structure needs to be written) + (object2) => { + let nextTransition, transition = structures.transitions || (structures.transitions = /* @__PURE__ */ Object.create(null)); + let objectOffset = position2++ - start; + let wroteKeys; + for (let key in object2) { + if (typeof object2.hasOwnProperty !== "function" || object2.hasOwnProperty(key)) { + nextTransition = transition[key]; + if (nextTransition) + transition = nextTransition; + else { + let keys = Object.keys(object2); + let lastTransition = transition; + transition = structures.transitions; + let newTransitions = 0; + for (let i = 0, l = keys.length; i < l; i++) { + let key2 = keys[i]; + nextTransition = transition[key2]; + if (!nextTransition) { + nextTransition = transition[key2] = /* @__PURE__ */ Object.create(null); + newTransitions++; + } + transition = nextTransition; + } + if (objectOffset + start + 1 == position2) { + position2--; + newRecord(transition, keys, newTransitions); + } else + insertNewRecord(transition, keys, objectOffset, newTransitions); + wroteKeys = true; + transition = lastTransition[key]; + } + pack3(object2[key]); + } + } + if (!wroteKeys) { + let recordId = transition[RECORD_SYMBOL]; + if (recordId) + target[objectOffset + start] = recordId; + else + insertNewRecord(transition, Object.keys(object2), objectOffset, 0); + } + } + ) : (object2) => { + let nextTransition, transition = structures.transitions || (structures.transitions = /* @__PURE__ */ Object.create(null)); + let newTransitions = 0; + for (let key in object2) if (typeof object2.hasOwnProperty !== "function" || object2.hasOwnProperty(key)) { + nextTransition = transition[key]; + if (!nextTransition) { + nextTransition = transition[key] = /* @__PURE__ */ Object.create(null); + newTransitions++; + } + transition = nextTransition; + } + let recordId = transition[RECORD_SYMBOL]; + if (recordId) { + if (recordId >= 96 && useTwoByteRecords) { + target[position2++] = ((recordId -= 96) & 31) + 96; + target[position2++] = recordId >> 5; + } else + target[position2++] = recordId; + } else { + newRecord(transition, transition.__keys__ || Object.keys(object2), newTransitions); + } + for (let key in object2) + if (typeof object2.hasOwnProperty !== "function" || object2.hasOwnProperty(key)) { + pack3(object2[key]); + } + }; + const checkUseRecords = typeof this.useRecords == "function" && this.useRecords; + const writeObject = checkUseRecords ? (object2) => { + checkUseRecords(object2) ? writeRecord(object2) : writePlainObject(object2); + } : writeRecord; + const makeRoom = /* @__PURE__ */ __name((end) => { + let newSize; + if (end > 16777216) { + if (end - start > MAX_BUFFER_SIZE) + throw new Error("Packed buffer would be larger than maximum buffer size"); + newSize = Math.min( + MAX_BUFFER_SIZE, + Math.round(Math.max((end - start) * (end > 67108864 ? 1.25 : 2), 4194304) / 4096) * 4096 + ); + } else + newSize = (Math.max(end - start << 2, target.length - 1) >> 12) + 1 << 12; + let newBuffer = new ByteArrayAllocate(newSize); + targetView = newBuffer.dataView || (newBuffer.dataView = new DataView(newBuffer.buffer, 0, newSize)); + end = Math.min(end, target.length); + if (target.copy) + target.copy(newBuffer, 0, start, end); + else + newBuffer.set(target.slice(start, end)); + position2 -= start; + start = 0; + safeEnd = newBuffer.length - 10; + return target = newBuffer; + }, "makeRoom"); + const newRecord = /* @__PURE__ */ __name((transition, keys, newTransitions) => { + let recordId = structures.nextId; + if (!recordId) + recordId = 64; + if (recordId < sharedLimitId && this.shouldShareStructure && !this.shouldShareStructure(keys)) { + recordId = structures.nextOwnId; + if (!(recordId < maxStructureId)) + recordId = sharedLimitId; + structures.nextOwnId = recordId + 1; + } else { + if (recordId >= maxStructureId) + recordId = sharedLimitId; + structures.nextId = recordId + 1; + } + let highByte = keys.highByte = recordId >= 96 && useTwoByteRecords ? recordId - 96 >> 5 : -1; + transition[RECORD_SYMBOL] = recordId; + transition.__keys__ = keys; + structures[recordId - 64] = keys; + if (recordId < sharedLimitId) { + keys.isShared = true; + structures.sharedLength = recordId - 63; + hasSharedUpdate = true; + if (highByte >= 0) { + target[position2++] = (recordId & 31) + 96; + target[position2++] = highByte; + } else { + target[position2++] = recordId; + } + } else { + if (highByte >= 0) { + target[position2++] = 213; + target[position2++] = 114; + target[position2++] = (recordId & 31) + 96; + target[position2++] = highByte; + } else { + target[position2++] = 212; + target[position2++] = 114; + target[position2++] = recordId; + } + if (newTransitions) + transitionsCount += serializationsSinceTransitionRebuild * newTransitions; + if (recordIdsToRemove.length >= maxOwnStructures) + recordIdsToRemove.shift()[RECORD_SYMBOL] = 0; + recordIdsToRemove.push(transition); + pack3(keys); + } + }, "newRecord"); + const insertNewRecord = /* @__PURE__ */ __name((transition, keys, insertionOffset, newTransitions) => { + let mainTarget = target; + let mainPosition = position2; + let mainSafeEnd = safeEnd; + let mainStart = start; + target = keysTarget; + position2 = 0; + start = 0; + if (!target) + keysTarget = target = new ByteArrayAllocate(8192); + safeEnd = target.length - 10; + newRecord(transition, keys, newTransitions); + keysTarget = target; + let keysPosition = position2; + target = mainTarget; + position2 = mainPosition; + safeEnd = mainSafeEnd; + start = mainStart; + if (keysPosition > 1) { + let newEnd = position2 + keysPosition - 1; + if (newEnd > safeEnd) + makeRoom(newEnd); + let insertionPosition = insertionOffset + start; + target.copyWithin(insertionPosition + keysPosition, insertionPosition + 1, position2); + target.set(keysTarget.slice(0, keysPosition), insertionPosition); + position2 = newEnd; + } else { + target[insertionOffset + start] = keysTarget[0]; + } + }, "insertNewRecord"); + const writeStruct = /* @__PURE__ */ __name((object2) => { + let newPosition = writeStructSlots(object2, target, start, position2, structures, makeRoom, (value, newPosition2, notifySharedUpdate) => { + if (notifySharedUpdate) + return hasSharedUpdate = true; + position2 = newPosition2; + let startTarget = target; + pack3(value); + resetStructures(); + if (startTarget !== target) { + return { position: position2, targetView, target }; + } + return position2; + }, this); + if (newPosition === 0) + return writeObject(object2); + position2 = newPosition; + }, "writeStruct"); + } + useBuffer(buffer) { + target = buffer; + target.dataView || (target.dataView = new DataView(target.buffer, target.byteOffset, target.byteLength)); + targetView = target.dataView; + position2 = 0; + } + set position(value) { + position2 = value; + } + get position() { + return position2; + } + clearSharedData() { + if (this.structures) + this.structures = []; + if (this.typedStructs) + this.typedStructs = []; + } +}; +extensionClasses = [Date, Set, Error, RegExp, ArrayBuffer, Object.getPrototypeOf(Uint8Array.prototype).constructor, DataView, C1Type]; +extensions = [{ + pack(date5, allocateForWrite, pack3) { + let seconds = date5.getTime() / 1e3; + if ((this.useTimestamp32 || date5.getMilliseconds() === 0) && seconds >= 0 && seconds < 4294967296) { + let { target: target2, targetView: targetView2, position: position3 } = allocateForWrite(6); + target2[position3++] = 214; + target2[position3++] = 255; + targetView2.setUint32(position3, seconds); + } else if (seconds > 0 && seconds < 4294967296) { + let { target: target2, targetView: targetView2, position: position3 } = allocateForWrite(10); + target2[position3++] = 215; + target2[position3++] = 255; + targetView2.setUint32(position3, date5.getMilliseconds() * 4e6 + (seconds / 1e3 / 4294967296 >> 0)); + targetView2.setUint32(position3 + 4, seconds); + } else if (isNaN(seconds)) { + if (this.onInvalidDate) { + allocateForWrite(0); + return pack3(this.onInvalidDate()); + } + let { target: target2, targetView: targetView2, position: position3 } = allocateForWrite(3); + target2[position3++] = 212; + target2[position3++] = 255; + target2[position3++] = 255; + } else { + let { target: target2, targetView: targetView2, position: position3 } = allocateForWrite(15); + target2[position3++] = 199; + target2[position3++] = 12; + target2[position3++] = 255; + targetView2.setUint32(position3, date5.getMilliseconds() * 1e6); + targetView2.setBigInt64(position3 + 4, BigInt(Math.floor(seconds))); + } + } +}, { + pack(set2, allocateForWrite, pack3) { + if (this.setAsEmptyObject) { + allocateForWrite(0); + return pack3({}); + } + let array2 = Array.from(set2); + let { target: target2, position: position3 } = allocateForWrite(this.moreTypes ? 3 : 0); + if (this.moreTypes) { + target2[position3++] = 212; + target2[position3++] = 115; + target2[position3++] = 0; + } + pack3(array2); + } +}, { + pack(error50, allocateForWrite, pack3) { + let { target: target2, position: position3 } = allocateForWrite(this.moreTypes ? 3 : 0); + if (this.moreTypes) { + target2[position3++] = 212; + target2[position3++] = 101; + target2[position3++] = 0; + } + pack3([error50.name, error50.message, error50.cause]); + } +}, { + pack(regex, allocateForWrite, pack3) { + let { target: target2, position: position3 } = allocateForWrite(this.moreTypes ? 3 : 0); + if (this.moreTypes) { + target2[position3++] = 212; + target2[position3++] = 120; + target2[position3++] = 0; + } + pack3([regex.source, regex.flags]); + } +}, { + pack(arrayBuffer, allocateForWrite) { + if (this.moreTypes) + writeExtBuffer(arrayBuffer, 16, allocateForWrite); + else + writeBuffer(hasNodeBuffer ? Buffer.from(arrayBuffer) : new Uint8Array(arrayBuffer), allocateForWrite); + } +}, { + pack(typedArray, allocateForWrite) { + let constructor = typedArray.constructor; + if (constructor !== ByteArray && this.moreTypes) + writeExtBuffer(typedArray, typedArrays.indexOf(constructor.name), allocateForWrite); + else + writeBuffer(typedArray, allocateForWrite); + } +}, { + pack(arrayBuffer, allocateForWrite) { + if (this.moreTypes) + writeExtBuffer(arrayBuffer, 17, allocateForWrite); + else + writeBuffer(hasNodeBuffer ? Buffer.from(arrayBuffer) : new Uint8Array(arrayBuffer), allocateForWrite); + } +}, { + pack(c1, allocateForWrite) { + let { target: target2, position: position3 } = allocateForWrite(1); + target2[position3] = 193; + } +}]; +function writeExtBuffer(typedArray, type, allocateForWrite, encode8) { + let length = typedArray.byteLength; + if (length + 1 < 256) { + var { target: target2, position: position3 } = allocateForWrite(4 + length); + target2[position3++] = 199; + target2[position3++] = length + 1; + } else if (length + 1 < 65536) { + var { target: target2, position: position3 } = allocateForWrite(5 + length); + target2[position3++] = 200; + target2[position3++] = length + 1 >> 8; + target2[position3++] = length + 1 & 255; + } else { + var { target: target2, position: position3, targetView: targetView2 } = allocateForWrite(7 + length); + target2[position3++] = 201; + targetView2.setUint32(position3, length + 1); + position3 += 4; + } + target2[position3++] = 116; + target2[position3++] = type; + if (!typedArray.buffer) typedArray = new Uint8Array(typedArray); + target2.set(new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength), position3); +} +__name(writeExtBuffer, "writeExtBuffer"); +function writeBuffer(buffer, allocateForWrite) { + let length = buffer.byteLength; + var target2, position3; + if (length < 256) { + var { target: target2, position: position3 } = allocateForWrite(length + 2); + target2[position3++] = 196; + target2[position3++] = length; + } else if (length < 65536) { + var { target: target2, position: position3 } = allocateForWrite(length + 3); + target2[position3++] = 197; + target2[position3++] = length >> 8; + target2[position3++] = length & 255; + } else { + var { target: target2, position: position3, targetView: targetView2 } = allocateForWrite(length + 5); + target2[position3++] = 198; + targetView2.setUint32(position3, length); + position3 += 4; + } + target2.set(buffer, position3); +} +__name(writeBuffer, "writeBuffer"); +function writeExtensionData(result, target2, position3, type) { + let length = result.length; + switch (length) { + case 1: + target2[position3++] = 212; + break; + case 2: + target2[position3++] = 213; + break; + case 4: + target2[position3++] = 214; + break; + case 8: + target2[position3++] = 215; + break; + case 16: + target2[position3++] = 216; + break; + default: + if (length < 256) { + target2[position3++] = 199; + target2[position3++] = length; + } else if (length < 65536) { + target2[position3++] = 200; + target2[position3++] = length >> 8; + target2[position3++] = length & 255; + } else { + target2[position3++] = 201; + target2[position3++] = length >> 24; + target2[position3++] = length >> 16 & 255; + target2[position3++] = length >> 8 & 255; + target2[position3++] = length & 255; + } + } + target2[position3++] = type; + target2.set(result, position3); + position3 += length; + return position3; +} +__name(writeExtensionData, "writeExtensionData"); +function insertIds(serialized, idsToInsert) { + let nextId; + let distanceToMove = idsToInsert.length * 6; + let lastEnd = serialized.length - distanceToMove; + while (nextId = idsToInsert.pop()) { + let offset = nextId.offset; + let id = nextId.id; + serialized.copyWithin(offset + distanceToMove, offset, lastEnd); + distanceToMove -= 6; + let position3 = offset + distanceToMove; + serialized[position3++] = 214; + serialized[position3++] = 105; + serialized[position3++] = id >> 24; + serialized[position3++] = id >> 16 & 255; + serialized[position3++] = id >> 8 & 255; + serialized[position3++] = id & 255; + lastEnd = offset; + } + return serialized; +} +__name(insertIds, "insertIds"); +function writeBundles(start, pack3, incrementPosition) { + if (bundledStrings2.length > 0) { + targetView.setUint32(bundledStrings2.position + start, position2 + incrementPosition - bundledStrings2.position - start); + bundledStrings2.stringsPosition = position2 - start; + let writeStrings = bundledStrings2; + bundledStrings2 = null; + pack3(writeStrings[0]); + pack3(writeStrings[1]); + } +} +__name(writeBundles, "writeBundles"); +function prepareStructures(structures, packr) { + structures.isCompatible = (existingStructures) => { + let compatible = !existingStructures || (packr.lastNamedStructuresLength || 0) === existingStructures.length; + if (!compatible) + packr._mergeStructures(existingStructures); + return compatible; + }; + return structures; +} +__name(prepareStructures, "prepareStructures"); +var defaultPackr = new Packr({ useRecords: false }); +var pack = defaultPackr.pack; +var encode5 = defaultPackr.pack; +var { NEVER: NEVER2, ALWAYS, DECIMAL_ROUND, DECIMAL_FIT } = FLOAT32_OPTIONS; +var REUSE_BUFFER_MODE = 512; +var RESET_BUFFER_MODE = 1024; +var RESERVE_START_SPACE = 2048; + +// ../../node_modules/msgpackr/iterators.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/version.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var version4 = "5.71.0"; + +// ../../node_modules/bullmq/dist/esm/classes/scripts.js +var packer = new Packr({ + useRecords: false, + encodeUndefinedAsNil: true +}); +var pack2 = packer.pack; +var Scripts = class { + static { + __name(this, "Scripts"); + } + constructor(queue) { + this.queue = queue; + this.version = version4; + const queueKeys = this.queue.keys; + this.moveToFinishedKeys = [ + queueKeys.wait, + queueKeys.active, + queueKeys.prioritized, + queueKeys.events, + queueKeys.stalled, + queueKeys.limiter, + queueKeys.delayed, + queueKeys.paused, + queueKeys.meta, + queueKeys.pc, + void 0, + void 0, + void 0, + void 0 + ]; + } + execCommand(client, commandName, args) { + const commandNameWithVersion = `${commandName}:${this.version}`; + return client[commandNameWithVersion](args); + } + async isJobInList(listKey, jobId) { + const client = await this.queue.client; + let result; + if (isRedisVersionLowerThan(this.queue.redisVersion, "6.0.6", this.queue.databaseType)) { + result = await this.execCommand(client, "isJobInList", [listKey, jobId]); + } else { + result = await client.lpos(listKey, jobId); + } + return Number.isInteger(result); + } + addDelayedJobArgs(job, encodedOpts, args) { + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.marker, + queueKeys.meta, + queueKeys.id, + queueKeys.delayed, + queueKeys.completed, + queueKeys.events + ]; + keys.push(pack2(args), job.data, encodedOpts); + return keys; + } + addDelayedJob(client, job, encodedOpts, args) { + const argsList = this.addDelayedJobArgs(job, encodedOpts, args); + return this.execCommand(client, "addDelayedJob", argsList); + } + addPrioritizedJobArgs(job, encodedOpts, args) { + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.marker, + queueKeys.meta, + queueKeys.id, + queueKeys.prioritized, + queueKeys.delayed, + queueKeys.completed, + queueKeys.active, + queueKeys.events, + queueKeys.pc + ]; + keys.push(pack2(args), job.data, encodedOpts); + return keys; + } + addPrioritizedJob(client, job, encodedOpts, args) { + const argsList = this.addPrioritizedJobArgs(job, encodedOpts, args); + return this.execCommand(client, "addPrioritizedJob", argsList); + } + addParentJobArgs(job, encodedOpts, args) { + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.meta, + queueKeys.id, + queueKeys.delayed, + queueKeys["waiting-children"], + queueKeys.completed, + queueKeys.events + ]; + keys.push(pack2(args), job.data, encodedOpts); + return keys; + } + addParentJob(client, job, encodedOpts, args) { + const argsList = this.addParentJobArgs(job, encodedOpts, args); + return this.execCommand(client, "addParentJob", argsList); + } + addStandardJobArgs(job, encodedOpts, args) { + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.wait, + queueKeys.paused, + queueKeys.meta, + queueKeys.id, + queueKeys.completed, + queueKeys.delayed, + queueKeys.active, + queueKeys.events, + queueKeys.marker + ]; + keys.push(pack2(args), job.data, encodedOpts); + return keys; + } + addStandardJob(client, job, encodedOpts, args) { + const argsList = this.addStandardJobArgs(job, encodedOpts, args); + return this.execCommand(client, "addStandardJob", argsList); + } + async addJob(client, job, opts, jobId, parentKeyOpts = {}) { + const queueKeys = this.queue.keys; + const parent = job.parent; + const args = [ + queueKeys[""], + typeof jobId !== "undefined" ? jobId : "", + job.name, + job.timestamp, + job.parentKey || null, + parentKeyOpts.parentDependenciesKey || null, + parent, + job.repeatJobKey, + job.deduplicationId ? `${queueKeys.de}:${job.deduplicationId}` : null + ]; + let encodedOpts; + if (opts.repeat) { + const repeat = Object.assign({}, opts.repeat); + if (repeat.startDate) { + repeat.startDate = +new Date(repeat.startDate); + } + if (repeat.endDate) { + repeat.endDate = +new Date(repeat.endDate); + } + encodedOpts = pack2(Object.assign(Object.assign({}, opts), { repeat })); + } else { + encodedOpts = pack2(opts); + } + let result; + if (parentKeyOpts.addToWaitingChildren) { + result = await this.addParentJob(client, job, encodedOpts, args); + } else if (typeof opts.delay == "number" && opts.delay > 0) { + result = await this.addDelayedJob(client, job, encodedOpts, args); + } else if (opts.priority) { + result = await this.addPrioritizedJob(client, job, encodedOpts, args); + } else { + result = await this.addStandardJob(client, job, encodedOpts, args); + } + if (result < 0) { + throw this.finishedErrors({ + code: result, + parentKey: parentKeyOpts.parentKey, + command: "addJob" + }); + } + return result; + } + pauseArgs(pause2) { + let src2 = "wait", dst = "paused"; + if (!pause2) { + src2 = "paused"; + dst = "wait"; + } + const keys = [src2, dst, "meta", "prioritized"].map((name) => this.queue.toKey(name)); + keys.push(this.queue.keys.events, this.queue.keys.delayed, this.queue.keys.marker); + const args = [pause2 ? "paused" : "resumed"]; + return keys.concat(args); + } + async pause(pause2) { + const client = await this.queue.client; + const args = this.pauseArgs(pause2); + return this.execCommand(client, "pause", args); + } + addRepeatableJobArgs(customKey, nextMillis, opts, legacyCustomKey) { + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.repeat, + queueKeys.delayed + ]; + const args = [ + nextMillis, + pack2(opts), + legacyCustomKey, + customKey, + queueKeys[""] + ]; + return keys.concat(args); + } + async addRepeatableJob(customKey, nextMillis, opts, legacyCustomKey) { + const client = await this.queue.client; + const args = this.addRepeatableJobArgs(customKey, nextMillis, opts, legacyCustomKey); + return this.execCommand(client, "addRepeatableJob", args); + } + async removeDeduplicationKey(deduplicationId, jobId) { + const client = await this.queue.client; + const queueKeys = this.queue.keys; + const keys = [`${queueKeys.de}:${deduplicationId}`]; + const args = [jobId]; + return this.execCommand(client, "removeDeduplicationKey", keys.concat(args)); + } + async addJobScheduler(jobSchedulerId, nextMillis, templateData, templateOpts, opts, delayedJobOpts, producerId) { + const client = await this.queue.client; + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.repeat, + queueKeys.delayed, + queueKeys.wait, + queueKeys.paused, + queueKeys.meta, + queueKeys.prioritized, + queueKeys.marker, + queueKeys.id, + queueKeys.events, + queueKeys.pc, + queueKeys.active + ]; + const args = [ + nextMillis, + pack2(opts), + jobSchedulerId, + templateData, + pack2(templateOpts), + pack2(delayedJobOpts), + Date.now(), + queueKeys[""], + producerId ? this.queue.toKey(producerId) : "" + ]; + const result = await this.execCommand(client, "addJobScheduler", keys.concat(args)); + if (typeof result === "number" && result < 0) { + throw this.finishedErrors({ + code: result, + command: "addJobScheduler" + }); + } + return result; + } + async updateRepeatableJobMillis(client, customKey, nextMillis, legacyCustomKey) { + const args = [ + this.queue.keys.repeat, + nextMillis, + customKey, + legacyCustomKey + ]; + return this.execCommand(client, "updateRepeatableJobMillis", args); + } + async updateJobSchedulerNextMillis(jobSchedulerId, nextMillis, templateData, delayedJobOpts, producerId) { + const client = await this.queue.client; + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.repeat, + queueKeys.delayed, + queueKeys.wait, + queueKeys.paused, + queueKeys.meta, + queueKeys.prioritized, + queueKeys.marker, + queueKeys.id, + queueKeys.events, + queueKeys.pc, + producerId ? this.queue.toKey(producerId) : "", + queueKeys.active + ]; + const args = [ + nextMillis, + jobSchedulerId, + templateData, + pack2(delayedJobOpts), + Date.now(), + queueKeys[""], + producerId + ]; + return this.execCommand(client, "updateJobScheduler", keys.concat(args)); + } + removeRepeatableArgs(legacyRepeatJobId, repeatConcatOptions, repeatJobKey) { + const queueKeys = this.queue.keys; + const keys = [queueKeys.repeat, queueKeys.delayed, queueKeys.events]; + const args = [ + legacyRepeatJobId, + this.getRepeatConcatOptions(repeatConcatOptions, repeatJobKey), + repeatJobKey, + queueKeys[""] + ]; + return keys.concat(args); + } + // TODO: remove this check in next breaking change + getRepeatConcatOptions(repeatConcatOptions, repeatJobKey) { + if (repeatJobKey && repeatJobKey.split(":").length > 2) { + return repeatJobKey; + } + return repeatConcatOptions; + } + async removeRepeatable(legacyRepeatJobId, repeatConcatOptions, repeatJobKey) { + const client = await this.queue.client; + const args = this.removeRepeatableArgs(legacyRepeatJobId, repeatConcatOptions, repeatJobKey); + return this.execCommand(client, "removeRepeatable", args); + } + async removeJobScheduler(jobSchedulerId) { + const client = await this.queue.client; + const queueKeys = this.queue.keys; + const keys = [queueKeys.repeat, queueKeys.delayed, queueKeys.events]; + const args = [jobSchedulerId, queueKeys[""]]; + return this.execCommand(client, "removeJobScheduler", keys.concat(args)); + } + removeArgs(jobId, removeChildren) { + const keys = [jobId, "repeat"].map((name) => this.queue.toKey(name)); + const args = [jobId, removeChildren ? 1 : 0, this.queue.toKey("")]; + return keys.concat(args); + } + async remove(jobId, removeChildren) { + const client = await this.queue.client; + const args = this.removeArgs(jobId, removeChildren); + const result = await this.execCommand(client, "removeJob", args); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "removeJob" + }); + } + return result; + } + async removeUnprocessedChildren(jobId) { + const client = await this.queue.client; + const args = [ + this.queue.toKey(jobId), + this.queue.keys.meta, + this.queue.toKey(""), + jobId + ]; + await this.execCommand(client, "removeUnprocessedChildren", args); + } + async extendLock(jobId, token, duration3, client) { + client = client || await this.queue.client; + const args = [ + this.queue.toKey(jobId) + ":lock", + this.queue.keys.stalled, + token, + duration3, + jobId + ]; + return this.execCommand(client, "extendLock", args); + } + async extendLocks(jobIds, tokens, duration3) { + const client = await this.queue.client; + const args = [ + this.queue.keys.stalled, + this.queue.toKey(""), + pack2(tokens), + pack2(jobIds), + duration3 + ]; + return this.execCommand(client, "extendLocks", args); + } + async updateData(job, data) { + const client = await this.queue.client; + const keys = [this.queue.toKey(job.id)]; + const dataJson = JSON.stringify(data); + const result = await this.execCommand(client, "updateData", keys.concat([dataJson])); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId: job.id, + command: "updateData" + }); + } + } + async updateProgress(jobId, progress) { + const client = await this.queue.client; + const keys = [ + this.queue.toKey(jobId), + this.queue.keys.events, + this.queue.keys.meta + ]; + const progressJson = JSON.stringify(progress); + const result = await this.execCommand(client, "updateProgress", keys.concat([jobId, progressJson])); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "updateProgress" + }); + } + } + async addLog(jobId, logRow, keepLogs) { + const client = await this.queue.client; + const keys = [ + this.queue.toKey(jobId), + this.queue.toKey(jobId) + ":logs" + ]; + const result = await this.execCommand(client, "addLog", keys.concat([jobId, logRow, keepLogs ? keepLogs : ""])); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "addLog" + }); + } + return result; + } + moveToFinishedArgs(job, val, propVal, shouldRemove, target2, token, timestamp, fetchNext = true, fieldsToUpdate) { + var _a2, _b, _c2, _d2, _e2, _f, _g; + const queueKeys = this.queue.keys; + const opts = this.queue.opts; + const workerKeepJobs = target2 === "completed" ? opts.removeOnComplete : opts.removeOnFail; + const metricsKey = this.queue.toKey(`metrics:${target2}`); + const keys = this.moveToFinishedKeys; + keys[10] = queueKeys[target2]; + keys[11] = this.queue.toKey((_a2 = job.id) !== null && _a2 !== void 0 ? _a2 : ""); + keys[12] = metricsKey; + keys[13] = this.queue.keys.marker; + const keepJobs = this.getKeepJobs(shouldRemove, workerKeepJobs); + const args = [ + job.id, + timestamp, + propVal, + typeof val === "undefined" ? "null" : val, + target2, + !fetchNext || this.queue.closing ? 0 : 1, + queueKeys[""], + pack2({ + token, + name: opts.name, + keepJobs, + limiter: opts.limiter, + lockDuration: opts.lockDuration, + attempts: job.opts.attempts, + maxMetricsSize: ((_b = opts.metrics) === null || _b === void 0 ? void 0 : _b.maxDataPoints) ? (_c2 = opts.metrics) === null || _c2 === void 0 ? void 0 : _c2.maxDataPoints : "", + fpof: !!((_d2 = job.opts) === null || _d2 === void 0 ? void 0 : _d2.failParentOnFailure), + cpof: !!((_e2 = job.opts) === null || _e2 === void 0 ? void 0 : _e2.continueParentOnFailure), + idof: !!((_f = job.opts) === null || _f === void 0 ? void 0 : _f.ignoreDependencyOnFailure), + rdof: !!((_g = job.opts) === null || _g === void 0 ? void 0 : _g.removeDependencyOnFailure) + }), + fieldsToUpdate ? pack2(objectToFlatArray(fieldsToUpdate)) : void 0 + ]; + return keys.concat(args); + } + getKeepJobs(shouldRemove, workerKeepJobs) { + if (typeof shouldRemove === "undefined") { + return workerKeepJobs || { count: shouldRemove ? 0 : -1 }; + } + return typeof shouldRemove === "object" ? shouldRemove : typeof shouldRemove === "number" ? { count: shouldRemove } : { count: shouldRemove ? 0 : -1 }; + } + async moveToFinished(jobId, args) { + const client = await this.queue.client; + const result = await this.execCommand(client, "moveToFinished", args); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "moveToFinished", + state: "active" + }); + } else { + if (typeof result !== "undefined") { + return raw2NextJobData(result); + } + } + } + drainArgs(delayed) { + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.wait, + queueKeys.paused, + queueKeys.delayed, + queueKeys.prioritized, + queueKeys.repeat + ]; + const args = [queueKeys[""], delayed ? "1" : "0"]; + return keys.concat(args); + } + async drain(delayed) { + const client = await this.queue.client; + const args = this.drainArgs(delayed); + return this.execCommand(client, "drain", args); + } + removeChildDependencyArgs(jobId, parentKey) { + const queueKeys = this.queue.keys; + const keys = [queueKeys[""]]; + const args = [this.queue.toKey(jobId), parentKey]; + return keys.concat(args); + } + async removeChildDependency(jobId, parentKey) { + const client = await this.queue.client; + const args = this.removeChildDependencyArgs(jobId, parentKey); + const result = await this.execCommand(client, "removeChildDependency", args); + switch (result) { + case 0: + return true; + case 1: + return false; + default: + throw this.finishedErrors({ + code: result, + jobId, + parentKey, + command: "removeChildDependency" + }); + } + } + getRangesArgs(types, start, end, asc2) { + const queueKeys = this.queue.keys; + const transformedTypes = types.map((type) => { + return type === "waiting" ? "wait" : type; + }); + const keys = [queueKeys[""]]; + const args = [start, end, asc2 ? "1" : "0", ...transformedTypes]; + return keys.concat(args); + } + async getRanges(types, start = 0, end = 1, asc2 = false) { + const client = await this.queue.client; + const args = this.getRangesArgs(types, start, end, asc2); + return await this.execCommand(client, "getRanges", args); + } + getCountsArgs(types) { + const queueKeys = this.queue.keys; + const transformedTypes = types.map((type) => { + return type === "waiting" ? "wait" : type; + }); + const keys = [queueKeys[""]]; + const args = [...transformedTypes]; + return keys.concat(args); + } + async getCounts(types) { + const client = await this.queue.client; + const args = this.getCountsArgs(types); + return await this.execCommand(client, "getCounts", args); + } + getCountsPerPriorityArgs(priorities) { + const keys = [ + this.queue.keys.wait, + this.queue.keys.paused, + this.queue.keys.meta, + this.queue.keys.prioritized + ]; + const args = priorities; + return keys.concat(args); + } + async getCountsPerPriority(priorities) { + const client = await this.queue.client; + const args = this.getCountsPerPriorityArgs(priorities); + return await this.execCommand(client, "getCountsPerPriority", args); + } + getDependencyCountsArgs(jobId, types) { + const keys = [ + `${jobId}:processed`, + `${jobId}:dependencies`, + `${jobId}:failed`, + `${jobId}:unsuccessful` + ].map((name) => { + return this.queue.toKey(name); + }); + const args = types; + return keys.concat(args); + } + async getDependencyCounts(jobId, types) { + const client = await this.queue.client; + const args = this.getDependencyCountsArgs(jobId, types); + return await this.execCommand(client, "getDependencyCounts", args); + } + moveToCompletedArgs(job, returnvalue, removeOnComplete, token, fetchNext = false) { + const timestamp = Date.now(); + return this.moveToFinishedArgs(job, returnvalue, "returnvalue", removeOnComplete, "completed", token, timestamp, fetchNext); + } + moveToFailedArgs(job, failedReason, removeOnFailed, token, fetchNext = false, fieldsToUpdate) { + const timestamp = Date.now(); + return this.moveToFinishedArgs(job, failedReason, "failedReason", removeOnFailed, "failed", token, timestamp, fetchNext, fieldsToUpdate); + } + async isFinished(jobId, returnValue = false) { + const client = await this.queue.client; + const keys = ["completed", "failed", jobId].map((key) => { + return this.queue.toKey(key); + }); + return this.execCommand(client, "isFinished", keys.concat([jobId, returnValue ? "1" : ""])); + } + async getState(jobId) { + const client = await this.queue.client; + const keys = [ + "completed", + "failed", + "delayed", + "active", + "wait", + "paused", + "waiting-children", + "prioritized" + ].map((key) => { + return this.queue.toKey(key); + }); + if (isRedisVersionLowerThan(this.queue.redisVersion, "6.0.6", this.queue.databaseType)) { + return this.execCommand(client, "getState", keys.concat([jobId])); + } + return this.execCommand(client, "getStateV2", keys.concat([jobId])); + } + /** + * Change delay of a delayed job. + * + * Reschedules a delayed job by setting a new delay from the current time. + * For example, calling changeDelay(5000) will reschedule the job to execute + * 5000 milliseconds (5 seconds) from now, regardless of the original delay. + * + * @param jobId - the ID of the job to change the delay for. + * @param delay - milliseconds from now when the job should be processed. + * @returns delay in milliseconds. + * @throws JobNotExist + * This exception is thrown if jobId is missing. + * @throws JobNotInState + * This exception is thrown if job is not in delayed state. + */ + async changeDelay(jobId, delay2) { + const client = await this.queue.client; + const args = this.changeDelayArgs(jobId, delay2); + const result = await this.execCommand(client, "changeDelay", args); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "changeDelay", + state: "delayed" + }); + } + } + changeDelayArgs(jobId, delay2) { + const timestamp = Date.now(); + const keys = [ + this.queue.keys.delayed, + this.queue.keys.meta, + this.queue.keys.marker, + this.queue.keys.events + ]; + return keys.concat([ + delay2, + JSON.stringify(timestamp), + jobId, + this.queue.toKey(jobId) + ]); + } + async changePriority(jobId, priority = 0, lifo = false) { + const client = await this.queue.client; + const args = this.changePriorityArgs(jobId, priority, lifo); + const result = await this.execCommand(client, "changePriority", args); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "changePriority" + }); + } + } + changePriorityArgs(jobId, priority = 0, lifo = false) { + const keys = [ + this.queue.keys.wait, + this.queue.keys.paused, + this.queue.keys.meta, + this.queue.keys.prioritized, + this.queue.keys.active, + this.queue.keys.pc, + this.queue.keys.marker + ]; + return keys.concat([priority, this.queue.toKey(""), jobId, lifo ? 1 : 0]); + } + moveToDelayedArgs(jobId, timestamp, token, delay2, opts = {}) { + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.marker, + queueKeys.active, + queueKeys.prioritized, + queueKeys.delayed, + this.queue.toKey(jobId), + queueKeys.events, + queueKeys.meta, + queueKeys.stalled + ]; + return keys.concat([ + this.queue.keys[""], + timestamp, + jobId, + token, + delay2, + opts.skipAttempt ? "1" : "0", + opts.fieldsToUpdate ? pack2(objectToFlatArray(opts.fieldsToUpdate)) : void 0 + ]); + } + moveToWaitingChildrenArgs(jobId, token, opts) { + const timestamp = Date.now(); + const childKey = getParentKey(opts.child); + const keys = [ + "active", + "waiting-children", + jobId, + `${jobId}:dependencies`, + `${jobId}:unsuccessful`, + "stalled", + "events" + ].map((name) => { + return this.queue.toKey(name); + }); + return keys.concat([ + token, + childKey !== null && childKey !== void 0 ? childKey : "", + JSON.stringify(timestamp), + jobId, + this.queue.toKey("") + ]); + } + isMaxedArgs() { + const queueKeys = this.queue.keys; + const keys = [queueKeys.meta, queueKeys.active]; + return keys; + } + async isMaxed() { + const client = await this.queue.client; + const args = this.isMaxedArgs(); + return !!await this.execCommand(client, "isMaxed", args); + } + async moveToDelayed(jobId, timestamp, delay2, token = "0", opts = {}) { + const client = await this.queue.client; + const args = this.moveToDelayedArgs(jobId, timestamp, token, delay2, opts); + const result = await this.execCommand(client, "moveToDelayed", args); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "moveToDelayed", + state: "active" + }); + } + } + /** + * Move parent job to waiting-children state. + * + * @returns true if job is successfully moved, false if there are pending dependencies. + * @throws JobNotExist + * This exception is thrown if jobId is missing. + * @throws JobLockNotExist + * This exception is thrown if job lock is missing. + * @throws JobNotInState + * This exception is thrown if job is not in active state. + */ + async moveToWaitingChildren(jobId, token, opts = {}) { + const client = await this.queue.client; + const args = this.moveToWaitingChildrenArgs(jobId, token, opts); + const result = await this.execCommand(client, "moveToWaitingChildren", args); + switch (result) { + case 0: + return true; + case 1: + return false; + default: + throw this.finishedErrors({ + code: result, + jobId, + command: "moveToWaitingChildren", + state: "active" + }); + } + } + getRateLimitTtlArgs(maxJobs) { + const keys = [ + this.queue.keys.limiter, + this.queue.keys.meta + ]; + return keys.concat([maxJobs !== null && maxJobs !== void 0 ? maxJobs : "0"]); + } + async getRateLimitTtl(maxJobs) { + const client = await this.queue.client; + const args = this.getRateLimitTtlArgs(maxJobs); + return this.execCommand(client, "getRateLimitTtl", args); + } + /** + * Remove jobs in a specific state. + * + * @returns Id jobs from the deleted records. + */ + async cleanJobsInSet(set2, timestamp, limit = 0) { + const client = await this.queue.client; + return this.execCommand(client, "cleanJobsInSet", [ + this.queue.toKey(set2), + this.queue.toKey("events"), + this.queue.toKey("repeat"), + this.queue.toKey(""), + timestamp, + limit, + set2 + ]); + } + getJobSchedulerArgs(id) { + const keys = [this.queue.keys.repeat]; + return keys.concat([id]); + } + async getJobScheduler(id) { + const client = await this.queue.client; + const args = this.getJobSchedulerArgs(id); + return this.execCommand(client, "getJobScheduler", args); + } + retryJobArgs(jobId, lifo, token, opts = {}) { + const keys = [ + this.queue.keys.active, + this.queue.keys.wait, + this.queue.keys.paused, + this.queue.toKey(jobId), + this.queue.keys.meta, + this.queue.keys.events, + this.queue.keys.delayed, + this.queue.keys.prioritized, + this.queue.keys.pc, + this.queue.keys.marker, + this.queue.keys.stalled + ]; + const pushCmd = (lifo ? "R" : "L") + "PUSH"; + return keys.concat([ + this.queue.toKey(""), + Date.now(), + pushCmd, + jobId, + token, + opts.fieldsToUpdate ? pack2(objectToFlatArray(opts.fieldsToUpdate)) : void 0 + ]); + } + async retryJob(jobId, lifo, token = "0", opts = {}) { + const client = await this.queue.client; + const args = this.retryJobArgs(jobId, lifo, token, opts); + const result = await this.execCommand(client, "retryJob", args); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "retryJob", + state: "active" + }); + } + } + moveJobsToWaitArgs(state, count4, timestamp) { + const keys = [ + this.queue.toKey(""), + this.queue.keys.events, + this.queue.toKey(state), + this.queue.toKey("wait"), + this.queue.toKey("paused"), + this.queue.keys.meta, + this.queue.keys.active, + this.queue.keys.marker + ]; + const args = [count4, timestamp, state]; + return keys.concat(args); + } + async retryJobs(state = "failed", count4 = 1e3, timestamp = (/* @__PURE__ */ new Date()).getTime()) { + const client = await this.queue.client; + const args = this.moveJobsToWaitArgs(state, count4, timestamp); + return this.execCommand(client, "moveJobsToWait", args); + } + async promoteJobs(count4 = 1e3) { + const client = await this.queue.client; + const args = this.moveJobsToWaitArgs("delayed", count4, Number.MAX_VALUE); + return this.execCommand(client, "moveJobsToWait", args); + } + /** + * Attempts to reprocess a job + * + * @param job - The job to reprocess + * @param state - The expected job state. If the job is not found + * on the provided state, then it's not reprocessed. Supported states: 'failed', 'completed' + * + * @returns A promise that resolves when the job has been successfully moved to the wait queue. + * @throws Will throw an error with a code property indicating the failure reason: + * - code 0: Job does not exist + * - code -1: Job is currently locked and can't be retried + * - code -2: Job was not found in the expected set + */ + async reprocessJob(job, state, opts = {}) { + const client = await this.queue.client; + const keys = [ + this.queue.toKey(job.id), + this.queue.keys.events, + this.queue.toKey(state), + this.queue.keys.wait, + this.queue.keys.meta, + this.queue.keys.paused, + this.queue.keys.active, + this.queue.keys.marker + ]; + const args = [ + job.id, + (job.opts.lifo ? "R" : "L") + "PUSH", + state === "failed" ? "failedReason" : "returnvalue", + state, + opts.resetAttemptsMade ? "1" : "0", + opts.resetAttemptsStarted ? "1" : "0" + ]; + const result = await this.execCommand(client, "reprocessJob", keys.concat(args)); + switch (result) { + case 1: + return; + default: + throw this.finishedErrors({ + code: result, + jobId: job.id, + command: "reprocessJob", + state + }); + } + } + async getMetrics(type, start = 0, end = -1) { + const client = await this.queue.client; + const keys = [ + this.queue.toKey(`metrics:${type}`), + this.queue.toKey(`metrics:${type}:data`) + ]; + const args = [start, end]; + const result = await this.execCommand(client, "getMetrics", keys.concat(args)); + return result; + } + async moveToActive(client, token, name) { + const opts = this.queue.opts; + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.wait, + queueKeys.active, + queueKeys.prioritized, + queueKeys.events, + queueKeys.stalled, + queueKeys.limiter, + queueKeys.delayed, + queueKeys.paused, + queueKeys.meta, + queueKeys.pc, + queueKeys.marker + ]; + const args = [ + queueKeys[""], + Date.now(), + pack2({ + token, + lockDuration: opts.lockDuration, + limiter: opts.limiter, + name + }) + ]; + const result = await this.execCommand(client, "moveToActive", keys.concat(args)); + return raw2NextJobData(result); + } + async promote(jobId) { + const client = await this.queue.client; + const keys = [ + this.queue.keys.delayed, + this.queue.keys.wait, + this.queue.keys.paused, + this.queue.keys.meta, + this.queue.keys.prioritized, + this.queue.keys.active, + this.queue.keys.pc, + this.queue.keys.events, + this.queue.keys.marker + ]; + const args = [this.queue.toKey(""), jobId]; + const code = await this.execCommand(client, "promote", keys.concat(args)); + if (code < 0) { + throw this.finishedErrors({ + code, + jobId, + command: "promote", + state: "delayed" + }); + } + } + moveStalledJobsToWaitArgs() { + const opts = this.queue.opts; + const keys = [ + this.queue.keys.stalled, + this.queue.keys.wait, + this.queue.keys.active, + this.queue.keys["stalled-check"], + this.queue.keys.meta, + this.queue.keys.paused, + this.queue.keys.marker, + this.queue.keys.events + ]; + const args = [ + opts.maxStalledCount, + this.queue.toKey(""), + Date.now(), + opts.stalledInterval + ]; + return keys.concat(args); + } + /** + * Looks for unlocked jobs in the active queue. + * + * The job was being worked on, but the worker process died and it failed to renew the lock. + * We call these jobs 'stalled'. This is the most common case. We resolve these by moving them + * back to wait to be re-processed. To prevent jobs from cycling endlessly between active and wait, + * (e.g. if the job handler keeps crashing), + * we limit the number stalled job recoveries to settings.maxStalledCount. + */ + async moveStalledJobsToWait() { + const client = await this.queue.client; + const args = this.moveStalledJobsToWaitArgs(); + return this.execCommand(client, "moveStalledJobsToWait", args); + } + /** + * Moves a job back from Active to Wait. + * This script is used when a job has been manually rate limited and needs + * to be moved back to wait from active status. + * + * @param client - Redis client + * @param jobId - Job id + * @returns + */ + async moveJobFromActiveToWait(jobId, token = "0") { + const client = await this.queue.client; + const keys = [ + this.queue.keys.active, + this.queue.keys.wait, + this.queue.keys.stalled, + this.queue.keys.paused, + this.queue.keys.meta, + this.queue.keys.limiter, + this.queue.keys.prioritized, + this.queue.keys.marker, + this.queue.keys.events + ]; + const args = [jobId, token, this.queue.toKey(jobId)]; + const result = await this.execCommand(client, "moveJobFromActiveToWait", keys.concat(args)); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "moveJobFromActiveToWait", + state: "active" + }); + } + return result; + } + async obliterate(opts) { + const client = await this.queue.client; + const keys = [ + this.queue.keys.meta, + this.queue.toKey("") + ]; + const args = [opts.count, opts.force ? "force" : null]; + const result = await this.execCommand(client, "obliterate", keys.concat(args)); + if (result < 0) { + switch (result) { + case -1: + throw new Error("Cannot obliterate non-paused queue"); + case -2: + throw new Error("Cannot obliterate queue with active jobs"); + } + } + return result; + } + /** + * Paginate a set or hash keys. + * @param opts - options to define the pagination behaviour + * + */ + async paginate(key, opts) { + const client = await this.queue.client; + const keys = [key]; + const maxIterations = 5; + const pageSize = opts.end >= 0 ? opts.end - opts.start + 1 : Infinity; + let cursor = "0", offset = 0, items, total, rawJobs, page = [], jobs = []; + do { + const args = [ + opts.start + page.length, + opts.end, + cursor, + offset, + maxIterations + ]; + if (opts.fetchJobs) { + args.push(1); + } + [cursor, offset, items, total, rawJobs] = await this.execCommand(client, "paginate", keys.concat(args)); + page = page.concat(items); + if (rawJobs && rawJobs.length) { + jobs = jobs.concat(rawJobs.map(array2obj)); + } + } while (cursor != "0" && page.length < pageSize); + if (page.length && Array.isArray(page[0])) { + const result = []; + for (let index = 0; index < page.length; index++) { + const [id, value] = page[index]; + try { + result.push({ id, v: JSON.parse(value) }); + } catch (err) { + result.push({ id, err: err.message }); + } + } + return { + cursor, + items: result, + total, + jobs + }; + } else { + return { + cursor, + items: page.map((item) => ({ id: item })), + total, + jobs + }; + } + } + finishedErrors({ code, jobId, parentKey, command, state }) { + let error50; + switch (code) { + case ErrorCode.JobNotExist: + error50 = new Error(`Missing key for job ${jobId}. ${command}`); + break; + case ErrorCode.JobLockNotExist: + error50 = new Error(`Missing lock for job ${jobId}. ${command}`); + break; + case ErrorCode.JobNotInState: + error50 = new Error(`Job ${jobId} is not in the ${state} state. ${command}`); + break; + case ErrorCode.JobPendingChildren: + error50 = new Error(`Job ${jobId} has pending dependencies. ${command}`); + break; + case ErrorCode.ParentJobNotExist: + error50 = new Error(`Missing key for parent job ${parentKey}. ${command}`); + break; + case ErrorCode.JobLockMismatch: + error50 = new Error(`Lock mismatch for job ${jobId}. Cmd ${command} from ${state}`); + break; + case ErrorCode.ParentJobCannotBeReplaced: + error50 = new Error(`The parent job ${parentKey} cannot be replaced. ${command}`); + break; + case ErrorCode.JobBelongsToJobScheduler: + error50 = new Error(`Job ${jobId} belongs to a job scheduler and cannot be removed directly. ${command}`); + break; + case ErrorCode.JobHasFailedChildren: + error50 = new UnrecoverableError(`Cannot complete job ${jobId} because it has at least one failed child. ${command}`); + break; + case ErrorCode.SchedulerJobIdCollision: + error50 = new Error(`Cannot create job scheduler iteration - job ID already exists. ${command}`); + break; + case ErrorCode.SchedulerJobSlotsBusy: + error50 = new Error(`Cannot create job scheduler iteration - current and next time slots already have jobs. ${command}`); + break; + default: + error50 = new Error(`Unknown code ${code} error for ${jobId}. ${command}`); + } + error50.code = code; + return error50; + } + async removeOrphanedJobs(candidateJobIds, stateKeySuffixes, jobSubKeySuffixes) { + const client = await this.queue.client; + const args = [ + this.queue.toKey(""), + stateKeySuffixes.length, + ...stateKeySuffixes, + jobSubKeySuffixes.length, + ...jobSubKeySuffixes, + ...candidateJobIds + ]; + return this.execCommand(client, "removeOrphanedJobs", args); + } +}; +function raw2NextJobData(raw2) { + if (raw2) { + const result = [null, raw2[1], raw2[2], raw2[3]]; + if (raw2[0]) { + result[0] = array2obj(raw2[0]); + } + return result; + } + return []; +} +__name(raw2NextJobData, "raw2NextJobData"); + +// ../../node_modules/bullmq/dist/esm/utils/create-scripts.js +var createScripts = /* @__PURE__ */ __name((queue) => { + return new Scripts({ + keys: queue.keys, + client: queue.client, + get redisVersion() { + return queue.redisVersion; + }, + toKey: queue.toKey, + opts: queue.opts, + closing: queue.closing, + databaseType: queue.databaseType + }); +}, "createScripts"); + +// ../../node_modules/bullmq/dist/esm/classes/job.js +var logger3 = debuglog("bull"); +var PRIORITY_LIMIT = 2 ** 21; +var Job = class _Job { + static { + __name(this, "Job"); + } + constructor(queue, name, data, opts = {}, id) { + this.queue = queue; + this.name = name; + this.data = data; + this.opts = opts; + this.id = id; + this.progress = 0; + this.returnvalue = null; + this.stacktrace = null; + this.delay = 0; + this.priority = 0; + this.attemptsStarted = 0; + this.attemptsMade = 0; + this.stalledCounter = 0; + const _a2 = this.opts, { repeatJobKey } = _a2, restOpts = __rest(_a2, ["repeatJobKey"]); + this.opts = Object.assign({ + attempts: 0 + }, restOpts); + this.delay = this.opts.delay; + this.priority = this.opts.priority || 0; + this.repeatJobKey = repeatJobKey; + this.timestamp = opts.timestamp ? opts.timestamp : Date.now(); + this.opts.backoff = Backoffs.normalize(opts.backoff); + this.parentKey = getParentKey(opts.parent); + if (opts.parent) { + this.parent = { id: opts.parent.id, queueKey: opts.parent.queue }; + if (opts.failParentOnFailure) { + this.parent.fpof = true; + } + if (opts.removeDependencyOnFailure) { + this.parent.rdof = true; + } + if (opts.ignoreDependencyOnFailure) { + this.parent.idof = true; + } + if (opts.continueParentOnFailure) { + this.parent.cpof = true; + } + } + this.debounceId = opts.debounce ? opts.debounce.id : void 0; + this.deduplicationId = opts.deduplication ? opts.deduplication.id : this.debounceId; + this.toKey = queue.toKey.bind(queue); + this.createScripts(); + this.queueQualifiedName = queue.qualifiedName; + } + /** + * Creates a new job and adds it to the queue. + * + * @param queue - the queue where to add the job. + * @param name - the name of the job. + * @param data - the payload of the job. + * @param opts - the options bag for this job. + * @returns + */ + static async create(queue, name, data, opts) { + const client = await queue.client; + const job = new this(queue, name, data, opts, opts && opts.jobId); + job.id = await job.addJob(client, { + parentKey: job.parentKey, + parentDependenciesKey: job.parentKey ? `${job.parentKey}:dependencies` : "" + }); + return job; + } + /** + * Creates a bulk of jobs and adds them atomically to the given queue. + * + * @param queue -the queue were to add the jobs. + * @param jobs - an array of jobs to be added to the queue. + * @returns + */ + static async createBulk(queue, jobs) { + const client = await queue.client; + const jobInstances = jobs.map((job) => { + var _a2; + return new this(queue, job.name, job.data, job.opts, (_a2 = job.opts) === null || _a2 === void 0 ? void 0 : _a2.jobId); + }); + const pipeline = client.pipeline(); + for (const job of jobInstances) { + job.addJob(pipeline, { + parentKey: job.parentKey, + parentDependenciesKey: job.parentKey ? `${job.parentKey}:dependencies` : "" + }); + } + const results = await pipeline.exec(); + for (let index = 0; index < results.length; ++index) { + const [err, id] = results[index]; + if (err) { + throw err; + } + jobInstances[index].id = id; + } + return jobInstances; + } + /** + * Instantiates a Job from a JobJsonRaw object (coming from a deserialized JSON object) + * + * @param queue - the queue where the job belongs to. + * @param json - the plain object containing the job. + * @param jobId - an optional job id (overrides the id coming from the JSON object) + * @returns + */ + static fromJSON(queue, json2, jobId) { + const data = JSON.parse(json2.data || "{}"); + const opts = _Job.optsFromJSON(json2.opts); + const job = new this(queue, json2.name, data, opts, json2.id || jobId); + job.progress = JSON.parse(json2.progress || "0"); + job.delay = parseInt(json2.delay); + job.priority = parseInt(json2.priority); + job.timestamp = parseInt(json2.timestamp); + if (json2.finishedOn) { + job.finishedOn = parseInt(json2.finishedOn); + } + if (json2.processedOn) { + job.processedOn = parseInt(json2.processedOn); + } + if (json2.rjk) { + job.repeatJobKey = json2.rjk; + } + if (json2.deid) { + job.debounceId = json2.deid; + job.deduplicationId = json2.deid; + } + if (json2.failedReason) { + job.failedReason = json2.failedReason; + } + job.attemptsStarted = parseInt(json2.ats || "0"); + job.attemptsMade = parseInt(json2.attemptsMade || json2.atm || "0"); + job.stalledCounter = parseInt(json2.stc || "0"); + if (json2.defa) { + job.deferredFailure = json2.defa; + } + job.stacktrace = getTraces(json2.stacktrace); + if (typeof json2.returnvalue === "string") { + job.returnvalue = getReturnValue(json2.returnvalue); + } + if (json2.parentKey) { + job.parentKey = json2.parentKey; + } + if (json2.parent) { + job.parent = JSON.parse(json2.parent); + } + if (json2.pb) { + job.processedBy = json2.pb; + } + if (json2.nrjid) { + job.nextRepeatableJobId = json2.nrjid; + } + return job; + } + createScripts() { + this.scripts = createScripts(this.queue); + } + static optsFromJSON(rawOpts, optsDecode = optsDecodeMap) { + const opts = JSON.parse(rawOpts || "{}"); + const optionEntries = Object.entries(opts); + const options = {}; + for (const item of optionEntries) { + const [attributeName, value] = item; + if (optsDecode[attributeName]) { + options[optsDecode[attributeName]] = value; + } else { + if (attributeName === "tm") { + options.telemetry = Object.assign(Object.assign({}, options.telemetry), { metadata: value }); + } else if (attributeName === "omc") { + options.telemetry = Object.assign(Object.assign({}, options.telemetry), { omitContext: value }); + } else { + options[attributeName] = value; + } + } + } + return options; + } + /** + * Fetches a Job from the queue given the passed job id. + * + * @param queue - the queue where the job belongs to. + * @param jobId - the job id. + * @returns + */ + static async fromId(queue, jobId) { + if (jobId) { + const client = await queue.client; + const jobData = await client.hgetall(queue.toKey(jobId)); + return isEmpty(jobData) ? void 0 : this.fromJSON(queue, jobData, jobId); + } + } + /** + * addJobLog + * + * @param queue - A minimal queue instance + * @param jobId - Job id + * @param logRow - String with a row of log data to be logged + * @param keepLogs - The optional amount of log entries to preserve + * + * @returns The total number of log entries for this job so far. + */ + static addJobLog(queue, jobId, logRow, keepLogs) { + const scripts = queue.scripts; + return scripts.addLog(jobId, logRow, keepLogs); + } + toJSON() { + const _a2 = this, { queue, scripts } = _a2, withoutQueueAndScripts = __rest(_a2, ["queue", "scripts"]); + return withoutQueueAndScripts; + } + /** + * Prepares a job to be serialized for storage in Redis. + * @returns + */ + asJSON() { + return removeUndefinedFields({ + id: this.id, + name: this.name, + data: JSON.stringify(typeof this.data === "undefined" ? {} : this.data), + opts: _Job.optsAsJSON(this.opts), + parent: this.parent ? Object.assign({}, this.parent) : void 0, + parentKey: this.parentKey, + progress: this.progress, + attemptsMade: this.attemptsMade, + attemptsStarted: this.attemptsStarted, + stalledCounter: this.stalledCounter, + finishedOn: this.finishedOn, + processedOn: this.processedOn, + timestamp: this.timestamp, + failedReason: JSON.stringify(this.failedReason), + stacktrace: JSON.stringify(this.stacktrace), + debounceId: this.debounceId, + deduplicationId: this.deduplicationId, + repeatJobKey: this.repeatJobKey, + returnvalue: JSON.stringify(this.returnvalue), + nrjid: this.nextRepeatableJobId + }); + } + static optsAsJSON(opts = {}, optsEncode = optsEncodeMap) { + const optionEntries = Object.entries(opts); + const options = {}; + for (const [attributeName, value] of optionEntries) { + if (typeof value === "undefined") { + continue; + } + if (attributeName in optsEncode) { + const compressableAttribute = attributeName; + const key = optsEncode[compressableAttribute]; + options[key] = value; + } else { + if (attributeName === "telemetry") { + if (value.metadata !== void 0) { + options.tm = value.metadata; + } + if (value.omitContext !== void 0) { + options.omc = value.omitContext; + } + } else { + options[attributeName] = value; + } + } + } + return options; + } + /** + * Prepares a job to be passed to Sandbox. + * @returns + */ + asJSONSandbox() { + return Object.assign(Object.assign({}, this.asJSON()), { queueName: this.queueName, queueQualifiedName: this.queueQualifiedName, prefix: this.prefix }); + } + /** + * Updates a job's data + * + * @param data - the data that will replace the current jobs data. + */ + updateData(data) { + this.data = data; + return this.scripts.updateData(this, data); + } + /** + * Updates a job's progress + * + * @param progress - number or object to be saved as progress. + */ + async updateProgress(progress) { + this.progress = progress; + await this.scripts.updateProgress(this.id, progress); + this.queue.emit("progress", this, progress); + } + /** + * Logs one row of log data. + * + * @param logRow - string with log data to be logged. + * @returns The total number of log entries for this job so far. + */ + async log(logRow) { + return _Job.addJobLog(this.queue, this.id, logRow, this.opts.keepLogs); + } + /** + * Removes child dependency from parent when child is not yet finished + * + * @returns True if the relationship existed and if it was removed. + */ + async removeChildDependency() { + const childDependencyIsRemoved = await this.scripts.removeChildDependency(this.id, this.parentKey); + if (childDependencyIsRemoved) { + this.parent = void 0; + this.parentKey = void 0; + return true; + } + return false; + } + /** + * Clears job's logs + * + * @param keepLogs - the amount of log entries to preserve + */ + async clearLogs(keepLogs) { + const client = await this.queue.client; + const logsKey = this.toKey(this.id) + ":logs"; + if (keepLogs) { + await client.ltrim(logsKey, -keepLogs, -1); + } else { + await client.del(logsKey); + } + } + /** + * Completely remove the job from the queue. + * Note, this call will throw an exception if the job + * is being processed when the call is performed. + * + * @param opts - Options to remove a job + */ + async remove({ removeChildren = true } = {}) { + await this.queue.waitUntilReady(); + const queue = this.queue; + const job = this; + const removed = await this.scripts.remove(job.id, removeChildren); + if (removed) { + queue.emit("removed", job); + } else { + throw new Error(`Job ${this.id} could not be removed because it is locked by another worker`); + } + } + /** + * Remove all children from this job that are not yet processed, + * in other words that are in any other state than completed, failed or active. + * + * @remarks + * - Jobs with locks (most likely active) are ignored. + * - This method can be slow if the number of children is large (\> 1000). + */ + async removeUnprocessedChildren() { + const jobId = this.id; + await this.scripts.removeUnprocessedChildren(jobId); + } + /** + * Extend the lock for this job. + * + * @param token - unique token for the lock + * @param duration - lock duration in milliseconds + */ + extendLock(token, duration3) { + return this.scripts.extendLock(this.id, token, duration3); + } + /** + * Moves a job to the completed queue. + * Returned job to be used with Queue.prototype.nextJobFromJobData. + * + * @param returnValue - The jobs success message. + * @param token - Worker token used to acquire completed job. + * @param fetchNext - True when wanting to fetch the next job. + * @returns Returns the jobData of the next job in the waiting queue or void. + */ + async moveToCompleted(returnValue, token, fetchNext = true) { + return this.queue.trace(SpanKind.INTERNAL, "complete", this.queue.name, async (span) => { + this.setSpanJobAttributes(span); + await this.queue.waitUntilReady(); + this.returnvalue = returnValue || void 0; + const stringifiedReturnValue = tryCatch(JSON.stringify, JSON, [ + returnValue + ]); + if (stringifiedReturnValue === errorObject) { + throw errorObject.value; + } + const args = this.scripts.moveToCompletedArgs(this, stringifiedReturnValue, this.opts.removeOnComplete, token, fetchNext); + const result = await this.scripts.moveToFinished(this.id, args); + this.finishedOn = args[this.scripts.moveToFinishedKeys.length + 1]; + this.attemptsMade += 1; + this.recordJobMetrics("completed"); + return result; + }); + } + /** + * Moves a job to the wait or prioritized state. + * + * @param token - Worker token used to acquire completed job. + * @returns Returns pttl. + */ + async moveToWait(token) { + const result = await this.scripts.moveJobFromActiveToWait(this.id, token); + this.recordJobMetrics("waiting"); + return result; + } + async shouldRetryJob(err) { + if (this.attemptsMade + 1 < this.opts.attempts && !this.discarded && !(err instanceof UnrecoverableError || err.name == "UnrecoverableError")) { + const opts = this.queue.opts; + const delay2 = await Backoffs.calculate(this.opts.backoff, this.attemptsMade + 1, err, this, opts.settings && opts.settings.backoffStrategy); + return [delay2 == -1 ? false : true, delay2 == -1 ? 0 : delay2]; + } else { + return [false, 0]; + } + } + /** + * Moves a job to the failed queue. + * + * @param err - the jobs error message. + * @param token - token to check job is locked by current worker + * @param fetchNext - true when wanting to fetch the next job + * @returns Returns the jobData of the next job in the waiting queue or void. + */ + async moveToFailed(err, token, fetchNext = false) { + this.failedReason = err === null || err === void 0 ? void 0 : err.message; + const [shouldRetry, retryDelay] = await this.shouldRetryJob(err); + return this.queue.trace(SpanKind.INTERNAL, this.getSpanOperation(shouldRetry, retryDelay), this.queue.name, async (span, dstPropagationMedatadata) => { + var _a2, _b; + this.setSpanJobAttributes(span); + let tm; + if (!((_b = (_a2 = this.opts) === null || _a2 === void 0 ? void 0 : _a2.telemetry) === null || _b === void 0 ? void 0 : _b.omitContext) && dstPropagationMedatadata) { + tm = dstPropagationMedatadata; + } + let result; + this.updateStacktrace(err); + const fieldsToUpdate = { + failedReason: this.failedReason, + stacktrace: JSON.stringify(this.stacktrace), + tm + }; + let finishedOn; + if (shouldRetry) { + if (retryDelay) { + result = await this.scripts.moveToDelayed(this.id, Date.now(), retryDelay, token, { fieldsToUpdate }); + this.recordJobMetrics("delayed"); + } else { + result = await this.scripts.retryJob(this.id, this.opts.lifo, token, { + fieldsToUpdate + }); + this.recordJobMetrics("retried"); + } + } else { + const args = this.scripts.moveToFailedArgs(this, this.failedReason, this.opts.removeOnFail, token, fetchNext, fieldsToUpdate); + result = await this.scripts.moveToFinished(this.id, args); + finishedOn = args[this.scripts.moveToFinishedKeys.length + 1]; + this.recordJobMetrics("failed"); + } + if (finishedOn && typeof finishedOn === "number") { + this.finishedOn = finishedOn; + } + if (retryDelay && typeof retryDelay === "number") { + this.delay = retryDelay; + } + this.attemptsMade += 1; + return result; + }); + } + getSpanOperation(shouldRetry, retryDelay) { + if (shouldRetry) { + if (retryDelay) { + return "delay"; + } + return "retry"; + } + return "fail"; + } + /** + * Records job metrics if a meter is configured in telemetry options. + * + * @param status - The job status + */ + recordJobMetrics(status) { + var _a2, _b; + const meter = (_b = (_a2 = this.queue.opts) === null || _a2 === void 0 ? void 0 : _a2.telemetry) === null || _b === void 0 ? void 0 : _b.meter; + if (!meter) { + return; + } + const attributes = { + [TelemetryAttributes.QueueName]: this.queue.name, + [TelemetryAttributes.JobName]: this.name, + [TelemetryAttributes.JobStatus]: status + }; + const statusToCounterName = { + completed: MetricNames.JobsCompleted, + failed: MetricNames.JobsFailed, + delayed: MetricNames.JobsDelayed, + retried: MetricNames.JobsRetried, + waiting: MetricNames.JobsWaiting, + "waiting-children": MetricNames.JobsWaitingChildren + }; + const counterName = statusToCounterName[status]; + const counter = meter.createCounter(counterName, { + description: `Number of jobs ${status}`, + unit: "1" + }); + counter.add(1, attributes); + if (this.processedOn) { + const duration3 = Date.now() - this.processedOn; + const histogram = meter.createHistogram(MetricNames.JobDuration, { + description: "Job processing duration", + unit: "ms" + }); + histogram.record(duration3, attributes); + } + } + /** + * @returns true if the job has completed. + */ + isCompleted() { + return this.isInZSet("completed"); + } + /** + * @returns true if the job has failed. + */ + isFailed() { + return this.isInZSet("failed"); + } + /** + * @returns true if the job is delayed. + */ + isDelayed() { + return this.isInZSet("delayed"); + } + /** + * @returns true if the job is waiting for children. + */ + isWaitingChildren() { + return this.isInZSet("waiting-children"); + } + /** + * @returns true of the job is active. + */ + isActive() { + return this.isInList("active"); + } + /** + * @returns true if the job is waiting. + */ + async isWaiting() { + return await this.isInList("wait") || await this.isInList("paused"); + } + /** + * @returns the queue name this job belongs to. + */ + get queueName() { + return this.queue.name; + } + /** + * @returns the prefix that is used. + */ + get prefix() { + return this.queue.opts.prefix; + } + /** + * Get current state. + * + * @returns Returns one of these values: + * 'completed', 'failed', 'delayed', 'active', 'waiting', 'waiting-children', 'unknown'. + */ + getState() { + return this.scripts.getState(this.id); + } + /** + * Change delay of a delayed job. + * + * Reschedules a delayed job by setting a new delay from the current time. + * For example, calling changeDelay(5000) will reschedule the job to execute + * 5000 milliseconds (5 seconds) from now, regardless of the original delay. + * + * @param delay - milliseconds from now when the job should be processed. + * @returns void + * @throws JobNotExist + * This exception is thrown if jobId is missing. + * @throws JobNotInState + * This exception is thrown if job is not in delayed state. + */ + async changeDelay(delay2) { + await this.scripts.changeDelay(this.id, delay2); + this.delay = delay2; + } + /** + * Change job priority. + * + * @param opts - options containing priority and lifo values. + * @returns void + */ + async changePriority(opts) { + await this.scripts.changePriority(this.id, opts.priority, opts.lifo); + this.priority = opts.priority || 0; + } + /** + * Get this jobs children result values if any. + * + * @returns Object mapping children job keys with their values. + */ + async getChildrenValues() { + const client = await this.queue.client; + const result = await client.hgetall(this.toKey(`${this.id}:processed`)); + if (result) { + return parseObjectValues(result); + } + } + /** + * Retrieves the failures of child jobs that were explicitly ignored while using ignoreDependencyOnFailure option. + * This method is useful for inspecting which child jobs were intentionally ignored when an error occured. + * @see {@link https://docs.bullmq.io/guide/flows/ignore-dependency} + * + * @returns Object mapping children job keys with their failure values. + */ + async getIgnoredChildrenFailures() { + const client = await this.queue.client; + return client.hgetall(this.toKey(`${this.id}:failed`)); + } + /** + * Get job's children failure values that were ignored if any. + * + * @deprecated This method is deprecated and will be removed in v6. Use getIgnoredChildrenFailures instead. + * + * @returns Object mapping children job keys with their failure values. + */ + async getFailedChildrenValues() { + const client = await this.queue.client; + return client.hgetall(this.toKey(`${this.id}:failed`)); + } + /** + * Get children job keys if this job is a parent and has children. + * @remarks + * Count options before Redis v7.2 works as expected with any quantity of entries + * on processed/unprocessed dependencies, since v7.2 you must consider that count + * won't have any effect until processed/unprocessed dependencies have a length + * greater than 127 + * @see {@link https://redis.io/docs/management/optimization/memory-optimization/#redis--72} + * @see {@link https://docs.bullmq.io/guide/flows#getters} + * @returns dependencies separated by processed, unprocessed, ignored and failed. + */ + async getDependencies(opts = {}) { + const client = await this.queue.client; + const multi = client.multi(); + if (!opts.processed && !opts.unprocessed && !opts.ignored && !opts.failed) { + multi.hgetall(this.toKey(`${this.id}:processed`)); + multi.smembers(this.toKey(`${this.id}:dependencies`)); + multi.hgetall(this.toKey(`${this.id}:failed`)); + multi.zrange(this.toKey(`${this.id}:unsuccessful`), 0, -1); + const [[err1, processed], [err2, unprocessed], [err3, ignored], [err4, failed]] = await multi.exec(); + return { + processed: parseObjectValues(processed), + unprocessed, + failed, + ignored + }; + } else { + const defaultOpts = { + cursor: 0, + count: 20 + }; + const childrenResultOrder = []; + if (opts.processed) { + childrenResultOrder.push("processed"); + const processedOpts = Object.assign(Object.assign({}, defaultOpts), opts.processed); + multi.hscan(this.toKey(`${this.id}:processed`), processedOpts.cursor, "COUNT", processedOpts.count); + } + if (opts.unprocessed) { + childrenResultOrder.push("unprocessed"); + const unprocessedOpts = Object.assign(Object.assign({}, defaultOpts), opts.unprocessed); + multi.sscan(this.toKey(`${this.id}:dependencies`), unprocessedOpts.cursor, "COUNT", unprocessedOpts.count); + } + if (opts.ignored) { + childrenResultOrder.push("ignored"); + const ignoredOpts = Object.assign(Object.assign({}, defaultOpts), opts.ignored); + multi.hscan(this.toKey(`${this.id}:failed`), ignoredOpts.cursor, "COUNT", ignoredOpts.count); + } + let failedCursor; + if (opts.failed) { + childrenResultOrder.push("failed"); + const failedOpts = Object.assign(Object.assign({}, defaultOpts), opts.failed); + failedCursor = failedOpts.cursor + failedOpts.count; + multi.zrange(this.toKey(`${this.id}:unsuccessful`), failedOpts.cursor, failedOpts.count - 1); + } + const results = await multi.exec(); + let processedCursor, processed, unprocessedCursor, unprocessed, failed, ignoredCursor, ignored; + childrenResultOrder.forEach((key, index) => { + switch (key) { + case "processed": { + processedCursor = results[index][1][0]; + const rawProcessed = results[index][1][1]; + const transformedProcessed = {}; + for (let ind = 0; ind < rawProcessed.length; ++ind) { + if (ind % 2) { + transformedProcessed[rawProcessed[ind - 1]] = JSON.parse(rawProcessed[ind]); + } + } + processed = transformedProcessed; + break; + } + case "failed": { + failed = results[index][1]; + break; + } + case "ignored": { + ignoredCursor = results[index][1][0]; + const rawIgnored = results[index][1][1]; + const transformedIgnored = {}; + for (let ind = 0; ind < rawIgnored.length; ++ind) { + if (ind % 2) { + transformedIgnored[rawIgnored[ind - 1]] = rawIgnored[ind]; + } + } + ignored = transformedIgnored; + break; + } + case "unprocessed": { + unprocessedCursor = results[index][1][0]; + unprocessed = results[index][1][1]; + break; + } + } + }); + return Object.assign(Object.assign(Object.assign(Object.assign({}, processedCursor ? { + processed, + nextProcessedCursor: Number(processedCursor) + } : {}), ignoredCursor ? { + ignored, + nextIgnoredCursor: Number(ignoredCursor) + } : {}), failedCursor ? { + failed, + nextFailedCursor: failedCursor + } : {}), unprocessedCursor ? { unprocessed, nextUnprocessedCursor: Number(unprocessedCursor) } : {}); + } + } + /** + * Get children job counts if this job is a parent and has children. + * + * @returns dependencies count separated by processed, unprocessed, ignored and failed. + */ + async getDependenciesCount(opts = {}) { + const types = []; + Object.entries(opts).forEach(([key, value]) => { + if (value) { + types.push(key); + } + }); + const finalTypes = types.length ? types : ["processed", "unprocessed", "ignored", "failed"]; + const responses = await this.scripts.getDependencyCounts(this.id, finalTypes); + const counts = {}; + responses.forEach((res, index) => { + counts[`${finalTypes[index]}`] = res || 0; + }); + return counts; + } + /** + * Returns a promise the resolves when the job has completed (containing the return value of the job), + * or rejects when the job has failed (containing the failedReason). + * + * @param queueEvents - Instance of QueueEvents. + * @param ttl - Time in milliseconds to wait for job to finish before timing out. + */ + async waitUntilFinished(queueEvents, ttl) { + await this.queue.waitUntilReady(); + const jobId = this.id; + return new Promise(async (resolve, reject) => { + let timeout; + if (ttl) { + timeout = setTimeout(() => onFailed( + /* eslint-disable max-len */ + `Job wait ${this.name} timed out before finishing, no finish notification arrived after ${ttl}ms (id=${jobId})` + ), ttl); + } + function onCompleted(args) { + removeListeners(); + resolve(args.returnvalue); + } + __name(onCompleted, "onCompleted"); + function onFailed(args) { + removeListeners(); + reject(new Error(args.failedReason || args)); + } + __name(onFailed, "onFailed"); + const completedEvent = `completed:${jobId}`; + const failedEvent = `failed:${jobId}`; + queueEvents.on(completedEvent, onCompleted); + queueEvents.on(failedEvent, onFailed); + this.queue.on("closing", onFailed); + const removeListeners = /* @__PURE__ */ __name(() => { + clearInterval(timeout); + queueEvents.removeListener(completedEvent, onCompleted); + queueEvents.removeListener(failedEvent, onFailed); + this.queue.removeListener("closing", onFailed); + }, "removeListeners"); + await queueEvents.waitUntilReady(); + const [status, result] = await this.scripts.isFinished(jobId, true); + const finished = status != 0; + if (finished) { + if (status == -1 || status == 2) { + onFailed({ failedReason: result }); + } else { + onCompleted({ returnvalue: getReturnValue(result) }); + } + } + }); + } + /** + * Moves the job to the delay set. + * + * @param timestamp - timestamp when the job should be moved back to "wait" + * @param token - token to check job is locked by current worker + * @returns + */ + async moveToDelayed(timestamp, token) { + const now = Date.now(); + const delay2 = timestamp - now; + const finalDelay = delay2 > 0 ? delay2 : 0; + const movedToDelayed = await this.scripts.moveToDelayed(this.id, now, finalDelay, token, { skipAttempt: true }); + this.delay = finalDelay; + this.recordJobMetrics("delayed"); + return movedToDelayed; + } + /** + * Moves the job to the waiting-children set. + * + * @param token - Token to check job is locked by current worker + * @param opts - The options bag for moving a job to waiting-children. + * @returns true if the job was moved + */ + async moveToWaitingChildren(token, opts = {}) { + const movedToWaitingChildren = await this.scripts.moveToWaitingChildren(this.id, token, opts); + if (movedToWaitingChildren) { + this.recordJobMetrics("waiting-children"); + } + return movedToWaitingChildren; + } + /** + * Promotes a delayed job so that it starts to be processed as soon as possible. + */ + async promote() { + const jobId = this.id; + await this.scripts.promote(jobId); + this.delay = 0; + } + /** + * Attempts to retry the job. Only a job that has failed or completed can be retried. + * + * @param state - completed / failed + * @param opts - options to retry a job + * @returns A promise that resolves when the job has been successfully moved to the wait queue. + * The queue emits a waiting event when the job is successfully moved. + * @throws Will throw an error if the job does not exist, is locked, or is not in the expected state. + */ + async retry(state = "failed", opts = {}) { + await this.scripts.reprocessJob(this, state, opts); + this.failedReason = null; + this.finishedOn = null; + this.processedOn = null; + this.returnvalue = null; + if (opts.resetAttemptsMade) { + this.attemptsMade = 0; + } + if (opts.resetAttemptsStarted) { + this.attemptsStarted = 0; + } + } + /** + * Marks a job to not be retried if it fails (even if attempts has been configured) + * @deprecated use UnrecoverableError + */ + discard() { + this.discarded = true; + } + async isInZSet(set2) { + const client = await this.queue.client; + const score = await client.zscore(this.queue.toKey(set2), this.id); + return score !== null; + } + async isInList(list) { + return this.scripts.isJobInList(this.queue.toKey(list), this.id); + } + /** + * Adds the job to Redis. + * + * @param client - + * @param parentOpts - + * @returns + */ + addJob(client, parentOpts) { + const jobData = this.asJSON(); + this.validateOptions(jobData); + return this.scripts.addJob(client, jobData, jobData.opts, this.id, parentOpts); + } + /** + * Removes a deduplication key if job is still the cause of deduplication. + * @returns true if the deduplication key was removed. + */ + async removeDeduplicationKey() { + if (this.deduplicationId) { + const result = await this.scripts.removeDeduplicationKey(this.deduplicationId, this.id); + return result > 0; + } + return false; + } + validateOptions(jobData) { + var _a2, _b, _c2, _d2, _e2, _f, _g, _h2; + const exclusiveOptions = [ + "removeDependencyOnFailure", + "failParentOnFailure", + "continueParentOnFailure", + "ignoreDependencyOnFailure" + ]; + const exceedLimit = this.opts.sizeLimit && lengthInUtf8Bytes(jobData.data) > this.opts.sizeLimit; + if (exceedLimit) { + throw new Error(`The size of job ${this.name} exceeds the limit ${this.opts.sizeLimit} bytes`); + } + if (this.opts.delay && this.opts.repeat && !((_a2 = this.opts.repeat) === null || _a2 === void 0 ? void 0 : _a2.count)) { + throw new Error(`Delay and repeat options could not be used together`); + } + const enabledExclusiveOptions = exclusiveOptions.filter((opt) => this.opts[opt]); + if (enabledExclusiveOptions.length > 1) { + const optionsList = enabledExclusiveOptions.join(", "); + throw new Error(`The following options cannot be used together: ${optionsList}`); + } + if ((_b = this.opts) === null || _b === void 0 ? void 0 : _b.jobId) { + if (`${parseInt(this.opts.jobId, 10)}` === ((_c2 = this.opts) === null || _c2 === void 0 ? void 0 : _c2.jobId)) { + throw new Error("Custom Id cannot be integers"); + } + if (((_d2 = this.opts) === null || _d2 === void 0 ? void 0 : _d2.jobId.includes(":")) && ((_f = (_e2 = this.opts) === null || _e2 === void 0 ? void 0 : _e2.jobId) === null || _f === void 0 ? void 0 : _f.split(":").length) !== 3) { + throw new Error("Custom Id cannot contain :"); + } + } + if (this.opts.priority) { + if (Math.trunc(this.opts.priority) !== this.opts.priority) { + throw new Error(`Priority should not be float`); + } + if (this.opts.priority > PRIORITY_LIMIT) { + throw new Error(`Priority should be between 0 and ${PRIORITY_LIMIT}`); + } + } + if (this.opts.deduplication) { + if (!((_g = this.opts.deduplication) === null || _g === void 0 ? void 0 : _g.id)) { + throw new Error("Deduplication id must be provided"); + } + if (this.parentKey) { + throw new Error("Deduplication and parent options cannot be used together"); + } + } + if (this.opts.debounce) { + if (!((_h2 = this.opts.debounce) === null || _h2 === void 0 ? void 0 : _h2.id)) { + throw new Error("Debounce id must be provided"); + } + if (this.parentKey) { + throw new Error("Debounce and parent options cannot be used together"); + } + } + if (typeof this.opts.backoff === "object" && typeof this.opts.backoff.jitter === "number") { + if (this.opts.backoff.jitter < 0 || this.opts.backoff.jitter > 1) { + throw new Error(`Jitter should be between 0 and 1`); + } + } + } + updateStacktrace(err) { + this.stacktrace = this.stacktrace || []; + if (err === null || err === void 0 ? void 0 : err.stack) { + this.stacktrace.push(err.stack); + if (this.opts.stackTraceLimit === 0) { + this.stacktrace = []; + } else if (this.opts.stackTraceLimit) { + this.stacktrace = this.stacktrace.slice(-this.opts.stackTraceLimit); + } + } + } + setSpanJobAttributes(span) { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.JobName]: this.name, + [TelemetryAttributes.JobId]: this.id + }); + } +}; +function getTraces(stacktrace) { + if (!stacktrace) { + return []; + } + const traces = tryCatch(JSON.parse, JSON, [stacktrace]); + if (traces === errorObject || !(traces instanceof Array)) { + return []; + } else { + return traces; + } +} +__name(getTraces, "getTraces"); +function getReturnValue(_value) { + const value = tryCatch(JSON.parse, JSON, [_value]); + if (value !== errorObject) { + return value; + } else { + logger3("corrupted returnvalue: " + _value, value); + } +} +__name(getReturnValue, "getReturnValue"); + +// ../../node_modules/bullmq/dist/esm/classes/queue-keys.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var QueueKeys = class { + static { + __name(this, "QueueKeys"); + } + constructor(prefix = "bull") { + this.prefix = prefix; + } + getKeys(name) { + const keys = {}; + [ + "", + "active", + "wait", + "waiting-children", + "paused", + "id", + "delayed", + "prioritized", + "stalled-check", + "completed", + "failed", + "stalled", + "repeat", + "limiter", + "meta", + "events", + "pc", + // priority counter key + "marker", + // marker key + "de" + // deduplication key + ].forEach((key) => { + keys[key] = this.toKey(name, key); + }); + return keys; + } + toKey(name, type) { + return `${this.getQueueQualifiedName(name)}:${type}`; + } + getQueueQualifiedName(name) { + return `${this.prefix}:${name}`; + } +}; + +// ../../node_modules/bullmq/dist/esm/classes/redis-connection.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var import_ioredis2 = __toESM(require_built3()); +var import_utils28 = __toESM(require_utils2()); +import { EventEmitter as EventEmitter4 } from "events"; + +// ../../node_modules/bullmq/dist/esm/scripts/index.js +var scripts_exports = {}; +__export(scripts_exports, { + addDelayedJob: () => addDelayedJob, + addJobScheduler: () => addJobScheduler, + addLog: () => addLog, + addParentJob: () => addParentJob, + addPrioritizedJob: () => addPrioritizedJob, + addRepeatableJob: () => addRepeatableJob, + addStandardJob: () => addStandardJob, + changeDelay: () => changeDelay, + changePriority: () => changePriority, + cleanJobsInSet: () => cleanJobsInSet, + drain: () => drain, + extendLock: () => extendLock, + extendLocks: () => extendLocks, + getCounts: () => getCounts, + getCountsPerPriority: () => getCountsPerPriority, + getDependencyCounts: () => getDependencyCounts, + getJobScheduler: () => getJobScheduler, + getMetrics: () => getMetrics, + getRanges: () => getRanges, + getRateLimitTtl: () => getRateLimitTtl, + getState: () => getState, + getStateV2: () => getStateV2, + isFinished: () => isFinished, + isJobInList: () => isJobInList, + isMaxed: () => isMaxed, + moveJobFromActiveToWait: () => moveJobFromActiveToWait, + moveJobsToWait: () => moveJobsToWait, + moveStalledJobsToWait: () => moveStalledJobsToWait, + moveToActive: () => moveToActive, + moveToDelayed: () => moveToDelayed, + moveToFinished: () => moveToFinished, + moveToWaitingChildren: () => moveToWaitingChildren, + obliterate: () => obliterate, + paginate: () => paginate, + pause: () => pause, + promote: () => promote, + releaseLock: () => releaseLock, + removeChildDependency: () => removeChildDependency, + removeDeduplicationKey: () => removeDeduplicationKey, + removeJob: () => removeJob, + removeJobScheduler: () => removeJobScheduler, + removeOrphanedJobs: () => removeOrphanedJobs, + removeRepeatable: () => removeRepeatable, + removeUnprocessedChildren: () => removeUnprocessedChildren, + reprocessJob: () => reprocessJob, + retryJob: () => retryJob, + saveStacktrace: () => saveStacktrace, + updateData: () => updateData, + updateJobScheduler: () => updateJobScheduler, + updateProgress: () => updateProgress, + updateRepeatableJobMillis: () => updateRepeatableJobMillis +}); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/scripts/addDelayedJob-6.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content = `--[[ + Adds a delayed job to the queue by doing the following: + - Increases the job counter if needed. + - Creates a new job key with the job data. + - computes timestamp. + - adds to delayed zset. + - Emits a global event 'delayed' if the job is delayed. + Input: + KEYS[1] 'marker', + KEYS[2] 'meta' + KEYS[3] 'id' + KEYS[4] 'delayed' + KEYS[5] 'completed' + KEYS[6] events stream key + ARGV[1] msgpacked arguments array + [1] key prefix, + [2] custom id (use custom instead of one generated automatically) + [3] name + [4] timestamp + [5] parentKey? + [6] parent dependencies key. + [7] parent? {id, queueKey} + [8] repeat job key + [9] deduplication key + ARGV[2] Json stringified job data + ARGV[3] msgpacked options + Output: + jobId - OK + -5 - Missing parent key +]] +local metaKey = KEYS[2] +local idKey = KEYS[3] +local delayedKey = KEYS[4] +local completedKey = KEYS[5] +local eventsKey = KEYS[6] +local jobId +local jobIdKey +local rcall = redis.call +local args = cmsgpack.unpack(ARGV[1]) +local data = ARGV[2] +local parentKey = args[5] +local parent = args[7] +local repeatJobKey = args[8] +local deduplicationKey = args[9] +local parentData +-- Includes +--[[ + Adds a delayed job to the queue by doing the following: + - Creates a new job key with the job data. + - adds to delayed zset. + - Emits a global event 'delayed' if the job is delayed. +]] +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Bake in the job id first 12 bits into the timestamp + to guarantee correct execution order of delayed jobs + (up to 4096 jobs per given timestamp or 4096 jobs apart per timestamp) + WARNING: Jobs that are so far apart that they wrap around will cause FIFO to fail +]] +local function getDelayedScore(delayedKey, timestamp, delay) + local delayedTimestamp = (delay > 0 and (tonumber(timestamp) + delay)) or tonumber(timestamp) + local minScore = delayedTimestamp * 0x1000 + local maxScore = (delayedTimestamp + 1 ) * 0x1000 - 1 + local result = rcall("ZREVRANGEBYSCORE", delayedKey, maxScore, + minScore, "WITHSCORES","LIMIT", 0, 1) + if #result then + local currentMaxScore = tonumber(result[2]) + if currentMaxScore ~= nil then + if currentMaxScore >= maxScore then + return maxScore, delayedTimestamp + else + return currentMaxScore + 1, delayedTimestamp + end + end + end + return minScore, delayedTimestamp +end +local function addDelayedJob(jobId, delayedKey, eventsKey, timestamp, + maxEvents, markerKey, delay) + local score, delayedTimestamp = getDelayedScore(delayedKey, timestamp, tonumber(delay)) + rcall("ZADD", delayedKey, score, jobId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "delayed", + "jobId", jobId, "delay", delayedTimestamp) + -- mark that a delayed job is available + addDelayMarkerIfNeeded(markerKey, delayedKey) +end +--[[ + Function to debounce a job. +]] +-- Includes +--[[ + Function to deduplicate a job. +]] +local function deduplicateJobWithoutReplace(deduplicationId, deduplicationOpts, jobId, deduplicationKey, + eventsKey, maxEvents) + local ttl = deduplicationOpts['ttl'] + local deduplicationKeyExists + if ttl and ttl > 0 then + if deduplicationOpts['extend'] then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + rcall('SET', deduplicationKey, currentDebounceJobId, 'PX', ttl) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", + "jobId", currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return currentDebounceJobId + else + rcall('SET', deduplicationKey, jobId, 'PX', ttl) + return + end + else + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'PX', ttl, 'NX') + end + else + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'NX') + end + if deduplicationKeyExists then + local currentDebounceJobId = rcall('GET', deduplicationKey) + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return currentDebounceJobId + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +local function removeDelayedJob(delayedKey, deduplicationKey, eventsKey, maxEvents, currentDeduplicatedJobId, + jobId, deduplicationId, prefix) + if rcall("ZREM", delayedKey, currentDeduplicatedJobId) > 0 then + removeJobKeys(prefix .. currentDeduplicatedJobId) + rcall("XADD", eventsKey, "*", "event", "removed", "jobId", currentDeduplicatedJobId, + "prev", "delayed") + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + jobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + jobId, "deduplicationId", deduplicationId, "deduplicatedJobId", currentDeduplicatedJobId) + return true + end + return false +end +local function deduplicateJob(deduplicationOpts, jobId, delayedKey, deduplicationKey, eventsKey, maxEvents, + prefix) + local deduplicationId = deduplicationOpts and deduplicationOpts['id'] + if deduplicationId then + if deduplicationOpts['replace'] then + local ttl = deduplicationOpts['ttl'] + if ttl and ttl > 0 then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + local isRemoved = removeDelayedJob(delayedKey, deduplicationKey, eventsKey, maxEvents, + currentDebounceJobId, jobId, deduplicationId, prefix) + if isRemoved then + if deduplicationOpts['extend'] then + rcall('SET', deduplicationKey, jobId, 'PX', ttl) + else + rcall('SET', deduplicationKey, jobId, 'KEEPTTL') + end + return + else + return currentDebounceJobId + end + else + rcall('SET', deduplicationKey, jobId, 'PX', ttl) + return + end + else + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + local isRemoved = removeDelayedJob(delayedKey, deduplicationKey, eventsKey, maxEvents, + currentDebounceJobId, jobId, deduplicationId, prefix) + if isRemoved then + rcall('SET', deduplicationKey, jobId) + return + else + return currentDebounceJobId + end + else + rcall('SET', deduplicationKey, jobId) + return + end + end + else + return deduplicateJobWithoutReplace(deduplicationId, deduplicationOpts, + jobId, deduplicationKey, eventsKey, maxEvents) + end + end +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to handle the case when job is duplicated. +]] +-- Includes +--[[ + This function is used to update the parent's dependencies if the job + is already completed and about to be ignored. The parent must get its + dependencies updated to avoid the parent job being stuck forever in + the waiting-children state. +]] +-- Includes +--[[ + Validate and move or add dependencies to parent. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) + if no pending dependencies. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) if needed. +]] +-- Includes +--[[ + Move parent to a wait status (wait, prioritized or delayed) +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check if queue is paused or maxed + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePausedOrMaxed(queueMetaKey, activeKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency") + if queueAttributes[1] then + return true + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + return activeCount >= tonumber(queueAttributes[2]) + end + end + return false +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + local parentWaitKey = parentQueueKey .. ":wait" + local parentPausedKey = parentQueueKey .. ":paused" + local parentActiveKey = parentQueueKey .. ":active" + local parentMetaKey = parentQueueKey .. ":meta" + local parentMarkerKey = parentQueueKey .. ":marker" + local jobAttributes = rcall("HMGET", parentKey, "priority", "delay") + local priority = tonumber(jobAttributes[1]) or 0 + local delay = tonumber(jobAttributes[2]) or 0 + if delay > 0 then + local delayedTimestamp = tonumber(timestamp) + delay + local score = delayedTimestamp * 0x1000 + local parentDelayedKey = parentQueueKey .. ":delayed" + rcall("ZADD", parentDelayedKey, score, parentId) + rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed", "jobId", parentId, "delay", + delayedTimestamp) + addDelayMarkerIfNeeded(parentMarkerKey, parentDelayedKey) + else + if priority == 0 then + local parentTarget, isParentPausedOrMaxed = getTargetQueueList(parentMetaKey, parentActiveKey, + parentWaitKey, parentPausedKey) + addJobInTargetList(parentTarget, parentMarkerKey, "RPUSH", isParentPausedOrMaxed, parentId) + else + local isPausedOrMaxed = isQueuePausedOrMaxed(parentMetaKey, parentActiveKey) + addJobWithPriority(parentMarkerKey, parentQueueKey .. ":prioritized", priority, parentId, + parentQueueKey .. ":pc", isPausedOrMaxed) + end + rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting", "jobId", parentId, "prev", + "waiting-children") + end +end +local function moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + if rcall("EXISTS", parentKey) == 1 then + local parentWaitingChildrenKey = parentQueueKey .. ":waiting-children" + if rcall("ZSCORE", parentWaitingChildrenKey, parentId) then + rcall("ZREM", parentWaitingChildrenKey, parentId) + moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + end + end +end +local function moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, + parentId, timestamp) + local doNotHavePendingDependencies = rcall("SCARD", parentDependenciesKey) == 0 + if doNotHavePendingDependencies then + moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + end +end +local function updateParentDepsIfNeeded(parentKey, parentQueueKey, parentDependenciesKey, + parentId, jobIdKey, returnvalue, timestamp ) + local processedSet = parentKey .. ":processed" + rcall("HSET", processedSet, jobIdKey, returnvalue) + moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, parentId, timestamp) +end +local function updateExistingJobsParent(parentKey, parent, parentData, + parentDependenciesKey, completedKey, + jobIdKey, jobId, timestamp) + if parentKey ~= nil then + if rcall("ZSCORE", completedKey, jobId) then + local returnvalue = rcall("HGET", jobIdKey, "returnvalue") + updateParentDepsIfNeeded(parentKey, parent['queueKey'], + parentDependenciesKey, parent['id'], + jobIdKey, returnvalue, timestamp) + else + if parentDependenciesKey ~= nil then + rcall("SADD", parentDependenciesKey, jobIdKey) + end + end + rcall("HMSET", jobIdKey, "parentKey", parentKey, "parent", parentData) + end +end +local function handleDuplicatedJob(jobKey, jobId, currentParentKey, currentParent, + parentData, parentDependenciesKey, completedKey, eventsKey, maxEvents, timestamp) + local existedParentKey = rcall("HGET", jobKey, "parentKey") + if not existedParentKey or existedParentKey == currentParentKey then + updateExistingJobsParent(currentParentKey, currentParent, parentData, + parentDependenciesKey, completedKey, jobKey, + jobId, timestamp) + else + if currentParentKey ~= nil and currentParentKey ~= existedParentKey + and (rcall("EXISTS", existedParentKey) == 1) then + return -7 + end + end + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", + "duplicated", "jobId", jobId) + return jobId .. "" -- convert to string +end +--[[ + Function to store a job +]] +local function storeJob(eventsKey, jobIdKey, jobId, name, data, opts, timestamp, + parentKey, parentData, repeatJobKey) + local jsonOpts = cjson.encode(opts) + local delay = opts['delay'] or 0 + local priority = opts['priority'] or 0 + local debounceId = opts['de'] and opts['de']['id'] + local optionalValues = {} + if parentKey ~= nil then + table.insert(optionalValues, "parentKey") + table.insert(optionalValues, parentKey) + table.insert(optionalValues, "parent") + table.insert(optionalValues, parentData) + end + if repeatJobKey then + table.insert(optionalValues, "rjk") + table.insert(optionalValues, repeatJobKey) + end + if debounceId then + table.insert(optionalValues, "deid") + table.insert(optionalValues, debounceId) + end + rcall("HMSET", jobIdKey, "name", name, "data", data, "opts", jsonOpts, + "timestamp", timestamp, "delay", delay, "priority", priority, + unpack(optionalValues)) + rcall("XADD", eventsKey, "*", "event", "added", "jobId", jobId, "name", name) + return delay, priority +end +if parentKey ~= nil then + if rcall("EXISTS", parentKey) ~= 1 then return -5 end + parentData = cjson.encode(parent) +end +local jobCounter = rcall("INCR", idKey) +local maxEvents = getOrSetMaxEvents(metaKey) +local opts = cmsgpack.unpack(ARGV[3]) +local parentDependenciesKey = args[6] +local timestamp = args[4] +if args[2] == "" then + jobId = jobCounter + jobIdKey = args[1] .. jobId +else + jobId = args[2] + jobIdKey = args[1] .. jobId + if rcall("EXISTS", jobIdKey) == 1 then + return handleDuplicatedJob(jobIdKey, jobId, parentKey, parent, + parentData, parentDependenciesKey, completedKey, eventsKey, + maxEvents, timestamp) + end +end +local deduplicationJobId = deduplicateJob(opts['de'], jobId, delayedKey, deduplicationKey, + eventsKey, maxEvents, args[1]) +if deduplicationJobId then + return deduplicationJobId +end +local delay, priority = storeJob(eventsKey, jobIdKey, jobId, args[3], ARGV[2], + opts, timestamp, parentKey, parentData, repeatJobKey) +addDelayedJob(jobId, delayedKey, eventsKey, timestamp, maxEvents, KEYS[1], delay) +-- Check if this job is a child of another job, if so add it to the parents dependencies +if parentDependenciesKey ~= nil then + rcall("SADD", parentDependenciesKey, jobIdKey) +end +return jobId .. "" -- convert to string +`; +var addDelayedJob = { + name: "addDelayedJob", + content, + keys: 6 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/addJobScheduler-11.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content2 = `--[[ + Adds a job scheduler, i.e. a job factory that creates jobs based on a given schedule (repeat options). + Input: + KEYS[1] 'repeat' key + KEYS[2] 'delayed' key + KEYS[3] 'wait' key + KEYS[4] 'paused' key + KEYS[5] 'meta' key + KEYS[6] 'prioritized' key + KEYS[7] 'marker' key + KEYS[8] 'id' key + KEYS[9] 'events' key + KEYS[10] 'pc' priority counter + KEYS[11] 'active' key + ARGV[1] next milliseconds + ARGV[2] msgpacked options + [1] name + [2] tz? + [3] pattern? + [4] endDate? + [5] every? + ARGV[3] jobs scheduler id + ARGV[4] Json stringified template data + ARGV[5] mspacked template opts + ARGV[6] msgpacked delayed opts + ARGV[7] timestamp + ARGV[8] prefix key + ARGV[9] producer key + Output: + repeatableKey - OK +]] local rcall = redis.call +local repeatKey = KEYS[1] +local delayedKey = KEYS[2] +local waitKey = KEYS[3] +local pausedKey = KEYS[4] +local metaKey = KEYS[5] +local prioritizedKey = KEYS[6] +local eventsKey = KEYS[9] +local nextMillis = ARGV[1] +local jobSchedulerId = ARGV[3] +local templateOpts = cmsgpack.unpack(ARGV[5]) +local now = tonumber(ARGV[7]) +local prefixKey = ARGV[8] +local jobOpts = cmsgpack.unpack(ARGV[6]) +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Adds a delayed job to the queue by doing the following: + - Creates a new job key with the job data. + - adds to delayed zset. + - Emits a global event 'delayed' if the job is delayed. +]] +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Bake in the job id first 12 bits into the timestamp + to guarantee correct execution order of delayed jobs + (up to 4096 jobs per given timestamp or 4096 jobs apart per timestamp) + WARNING: Jobs that are so far apart that they wrap around will cause FIFO to fail +]] +local function getDelayedScore(delayedKey, timestamp, delay) + local delayedTimestamp = (delay > 0 and (tonumber(timestamp) + delay)) or tonumber(timestamp) + local minScore = delayedTimestamp * 0x1000 + local maxScore = (delayedTimestamp + 1 ) * 0x1000 - 1 + local result = rcall("ZREVRANGEBYSCORE", delayedKey, maxScore, + minScore, "WITHSCORES","LIMIT", 0, 1) + if #result then + local currentMaxScore = tonumber(result[2]) + if currentMaxScore ~= nil then + if currentMaxScore >= maxScore then + return maxScore, delayedTimestamp + else + return currentMaxScore + 1, delayedTimestamp + end + end + end + return minScore, delayedTimestamp +end +local function addDelayedJob(jobId, delayedKey, eventsKey, timestamp, + maxEvents, markerKey, delay) + local score, delayedTimestamp = getDelayedScore(delayedKey, timestamp, tonumber(delay)) + rcall("ZADD", delayedKey, score, jobId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "delayed", + "jobId", jobId, "delay", delayedTimestamp) + -- mark that a delayed job is available + addDelayMarkerIfNeeded(markerKey, delayedKey) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePaused(queueMetaKey) + return rcall("HEXISTS", queueMetaKey, "paused") == 1 +end +--[[ + Function to store a job +]] +local function storeJob(eventsKey, jobIdKey, jobId, name, data, opts, timestamp, + parentKey, parentData, repeatJobKey) + local jsonOpts = cjson.encode(opts) + local delay = opts['delay'] or 0 + local priority = opts['priority'] or 0 + local debounceId = opts['de'] and opts['de']['id'] + local optionalValues = {} + if parentKey ~= nil then + table.insert(optionalValues, "parentKey") + table.insert(optionalValues, parentKey) + table.insert(optionalValues, "parent") + table.insert(optionalValues, parentData) + end + if repeatJobKey then + table.insert(optionalValues, "rjk") + table.insert(optionalValues, repeatJobKey) + end + if debounceId then + table.insert(optionalValues, "deid") + table.insert(optionalValues, debounceId) + end + rcall("HMSET", jobIdKey, "name", name, "data", data, "opts", jsonOpts, + "timestamp", timestamp, "delay", delay, "priority", priority, + unpack(optionalValues)) + rcall("XADD", eventsKey, "*", "event", "added", "jobId", jobId, "name", name) + return delay, priority +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +local function addJobFromScheduler(jobKey, jobId, opts, waitKey, pausedKey, activeKey, metaKey, + prioritizedKey, priorityCounter, delayedKey, markerKey, eventsKey, name, maxEvents, timestamp, + data, jobSchedulerId, repeatDelay) + opts['delay'] = repeatDelay + opts['jobId'] = jobId + local delay, priority = storeJob(eventsKey, jobKey, jobId, name, data, + opts, timestamp, nil, nil, jobSchedulerId) + if delay ~= 0 then + addDelayedJob(jobId, delayedKey, eventsKey, timestamp, maxEvents, markerKey, delay) + else + local target, isPausedOrMaxed = getTargetQueueList(metaKey, activeKey, waitKey, pausedKey) + -- Standard or priority add + if priority == 0 then + local pushCmd = opts['lifo'] and 'RPUSH' or 'LPUSH' + addJobInTargetList(target, markerKey, pushCmd, isPausedOrMaxed, jobId) + else + -- Priority add + addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounter, isPausedOrMaxed) + end + -- Emit waiting event + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "waiting", "jobId", jobId) + end +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to remove job. +]] +-- Includes +--[[ + Function to remove deduplication key if needed + when a job is being removed. +]] +local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey, + jobId, deduplicationId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + return rcall("DEL", deduplicationKey) + end + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +local function removeJob(jobId, hard, baseKey, shouldRemoveDeduplicationKey) + local jobKey = baseKey .. jobId + removeParentDependencyKey(jobKey, hard, nil, baseKey) + if shouldRemoveDeduplicationKey then + local deduplicationId = rcall("HGET", jobKey, "deid") + removeDeduplicationKeyIfNeededOnRemoval(baseKey, jobId, deduplicationId) + end + removeJobKeys(jobKey) +end +--[[ + Function to store a job scheduler +]] +local function storeJobScheduler(schedulerId, schedulerKey, repeatKey, nextMillis, opts, + templateData, templateOpts) + rcall("ZADD", repeatKey, nextMillis, schedulerId) + local optionalValues = {} + if opts['tz'] then + table.insert(optionalValues, "tz") + table.insert(optionalValues, opts['tz']) + end + if opts['limit'] then + table.insert(optionalValues, "limit") + table.insert(optionalValues, opts['limit']) + end + if opts['pattern'] then + table.insert(optionalValues, "pattern") + table.insert(optionalValues, opts['pattern']) + end + if opts['startDate'] then + table.insert(optionalValues, "startDate") + table.insert(optionalValues, opts['startDate']) + end + if opts['endDate'] then + table.insert(optionalValues, "endDate") + table.insert(optionalValues, opts['endDate']) + end + if opts['every'] then + table.insert(optionalValues, "every") + table.insert(optionalValues, opts['every']) + end + if opts['offset'] then + table.insert(optionalValues, "offset") + table.insert(optionalValues, opts['offset']) + else + local offset = rcall("HGET", schedulerKey, "offset") + if offset then + table.insert(optionalValues, "offset") + table.insert(optionalValues, tonumber(offset)) + end + end + local jsonTemplateOpts = cjson.encode(templateOpts) + if jsonTemplateOpts and jsonTemplateOpts ~= '{}' then + table.insert(optionalValues, "opts") + table.insert(optionalValues, jsonTemplateOpts) + end + if templateData and templateData ~= '{}' then + table.insert(optionalValues, "data") + table.insert(optionalValues, templateData) + end + table.insert(optionalValues, "ic") + table.insert(optionalValues, rcall("HGET", schedulerKey, "ic") or 1) + rcall("DEL", schedulerKey) -- remove all attributes and then re-insert new ones + rcall("HMSET", schedulerKey, "name", opts['name'], unpack(optionalValues)) +end +local function getJobSchedulerEveryNextMillis(prevMillis, every, now, offset, startDate) + local nextMillis + if not prevMillis then + if startDate then + -- Assuming startDate is passed as milliseconds from JavaScript + nextMillis = tonumber(startDate) + nextMillis = nextMillis > now and nextMillis or now + else + nextMillis = now + end + else + nextMillis = prevMillis + every + -- check if we may have missed some iterations + if nextMillis < now then + nextMillis = math.floor(now / every) * every + every + (offset or 0) + end + end + if not offset or offset == 0 then + local timeSlot = math.floor(nextMillis / every) * every; + offset = nextMillis - timeSlot; + end + -- Return a tuple nextMillis, offset + return math.floor(nextMillis), math.floor(offset) +end +-- If we are overriding a repeatable job we must delete the delayed job for +-- the next iteration. +local schedulerKey = repeatKey .. ":" .. jobSchedulerId +local maxEvents = getOrSetMaxEvents(metaKey) +local templateData = ARGV[4] +local prevMillis = rcall("ZSCORE", repeatKey, jobSchedulerId) +if prevMillis then + prevMillis = tonumber(prevMillis) +end +local schedulerOpts = cmsgpack.unpack(ARGV[2]) +local every = schedulerOpts['every'] +-- For backwards compatibility we also check the offset from the job itself. +-- could be removed in future major versions. +local jobOffset = jobOpts['repeat'] and jobOpts['repeat']['offset'] or 0 +local offset = schedulerOpts['offset'] or jobOffset or 0 +local newOffset = offset +local updatedEvery = false +if every then + -- if we changed the 'every' value we need to reset millis to nil + local millis = prevMillis + if prevMillis then + local prevEvery = tonumber(rcall("HGET", schedulerKey, "every")) + if prevEvery ~= every then + millis = nil + updatedEvery = true + end + end + local startDate = schedulerOpts['startDate'] + nextMillis, newOffset = getJobSchedulerEveryNextMillis(millis, every, now, offset, startDate) +end +local function removeJobFromScheduler(prefixKey, delayedKey, prioritizedKey, waitKey, pausedKey, jobId, metaKey, + eventsKey) + if rcall("ZSCORE", delayedKey, jobId) then + removeJob(jobId, true, prefixKey, true --[[remove debounce key]] ) + rcall("ZREM", delayedKey, jobId) + return true + elseif rcall("ZSCORE", prioritizedKey, jobId) then + removeJob(jobId, true, prefixKey, true --[[remove debounce key]] ) + rcall("ZREM", prioritizedKey, jobId) + return true + else + local pausedOrWaitKey = waitKey + if isQueuePaused(metaKey) then + pausedOrWaitKey = pausedKey + end + if rcall("LREM", pausedOrWaitKey, 1, jobId) > 0 then + removeJob(jobId, true, prefixKey, true --[[remove debounce key]] ) + return true + end + end + return false +end +local removedPrevJob = false +if prevMillis then + local currentJobId = "repeat:" .. jobSchedulerId .. ":" .. prevMillis + local currentJobKey = schedulerKey .. ":" .. prevMillis + -- In theory it should always exist the currentJobKey if there is a prevMillis unless something has + -- gone really wrong. + if rcall("EXISTS", currentJobKey) == 1 then + removedPrevJob = removeJobFromScheduler(prefixKey, delayedKey, prioritizedKey, waitKey, pausedKey, currentJobId, + metaKey, eventsKey) + end +end +if removedPrevJob then + -- The jobs has been removed and we want to replace it, so lets use the same millis. + if every and not updatedEvery then + nextMillis = prevMillis + end +else + -- Special case where no job was removed, and we need to add the next iteration. + schedulerOpts['offset'] = newOffset +end +-- Check for job ID collision with existing jobs (in any state) +local jobId = "repeat:" .. jobSchedulerId .. ":" .. nextMillis +local jobKey = prefixKey .. jobId +-- If there's already a job with this ID, in a state +-- that is not updatable (active, completed, failed) we must +-- handle the collision +local hasCollision = false +if rcall("EXISTS", jobKey) == 1 then + if every then + -- For 'every' case: try next time slot to avoid collision + local nextSlotMillis = nextMillis + every + local nextSlotJobId = "repeat:" .. jobSchedulerId .. ":" .. nextSlotMillis + local nextSlotJobKey = prefixKey .. nextSlotJobId + if rcall("EXISTS", nextSlotJobKey) == 0 then + -- Next slot is free, use it + nextMillis = nextSlotMillis + jobId = nextSlotJobId + else + -- Next slot also has a job, return error code + return -11 -- SchedulerJobSlotsBusy + end + else + hasCollision = true + end +end +local delay = nextMillis - now +-- Fast Clamp delay to minimum of 0 +if delay < 0 then + delay = 0 +end +local nextJobKey = schedulerKey .. ":" .. nextMillis +if not hasCollision or removedPrevJob then + -- jobId already calculated above during collision check + storeJobScheduler(jobSchedulerId, schedulerKey, repeatKey, nextMillis, schedulerOpts, templateData, templateOpts) + rcall("INCR", KEYS[8]) + addJobFromScheduler(nextJobKey, jobId, jobOpts, waitKey, pausedKey, KEYS[11], metaKey, prioritizedKey, KEYS[10], + delayedKey, KEYS[7], eventsKey, schedulerOpts['name'], maxEvents, now, templateData, jobSchedulerId, delay) +elseif hasCollision then + -- For 'pattern' case: return error code + return -10 -- SchedulerJobIdCollision +end +if ARGV[9] ~= "" then + rcall("HSET", ARGV[9], "nrjid", jobId) +end +return {jobId .. "", delay} +`; +var addJobScheduler = { + name: "addJobScheduler", + content: content2, + keys: 11 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/addLog-2.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content3 = `--[[ + Add job log + Input: + KEYS[1] job id key + KEYS[2] job logs key + ARGV[1] id + ARGV[2] log + ARGV[3] keepLogs + Output: + -1 - Missing job. +]] +local rcall = redis.call +if rcall("EXISTS", KEYS[1]) == 1 then -- // Make sure job exists + local logCount = rcall("RPUSH", KEYS[2], ARGV[2]) + if ARGV[3] ~= '' then + local keepLogs = tonumber(ARGV[3]) + rcall("LTRIM", KEYS[2], -keepLogs, -1) + return math.min(keepLogs, logCount) + end + return logCount +else + return -1 +end +`; +var addLog = { + name: "addLog", + content: content3, + keys: 2 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/addParentJob-6.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content4 = `--[[ + Adds a parent job to the queue by doing the following: + - Increases the job counter if needed. + - Creates a new job key with the job data. + - adds the job to the waiting-children zset + Input: + KEYS[1] 'meta' + KEYS[2] 'id' + KEYS[3] 'delayed' + KEYS[4] 'waiting-children' + KEYS[5] 'completed' + KEYS[6] events stream key + ARGV[1] msgpacked arguments array + [1] key prefix, + [2] custom id (will not generate one automatically) + [3] name + [4] timestamp + [5] parentKey? + [6] parent dependencies key. + [7] parent? {id, queueKey} + [8] repeat job key + [9] deduplication key + ARGV[2] Json stringified job data + ARGV[3] msgpacked options + Output: + jobId - OK + -5 - Missing parent key +]] +local metaKey = KEYS[1] +local idKey = KEYS[2] +local delayedKey = KEYS[3] +local completedKey = KEYS[5] +local eventsKey = KEYS[6] +local jobId +local jobIdKey +local rcall = redis.call +local args = cmsgpack.unpack(ARGV[1]) +local data = ARGV[2] +local opts = cmsgpack.unpack(ARGV[3]) +local parentKey = args[5] +local parent = args[7] +local repeatJobKey = args[8] +local deduplicationKey = args[9] +local parentData +-- Includes +--[[ + Function to deduplicate a job. +]] +local function deduplicateJobWithoutReplace(deduplicationId, deduplicationOpts, jobId, deduplicationKey, + eventsKey, maxEvents) + local ttl = deduplicationOpts['ttl'] + local deduplicationKeyExists + if ttl and ttl > 0 then + if deduplicationOpts['extend'] then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + rcall('SET', deduplicationKey, currentDebounceJobId, 'PX', ttl) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", + "jobId", currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return currentDebounceJobId + else + rcall('SET', deduplicationKey, jobId, 'PX', ttl) + return + end + else + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'PX', ttl, 'NX') + end + else + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'NX') + end + if deduplicationKeyExists then + local currentDebounceJobId = rcall('GET', deduplicationKey) + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return currentDebounceJobId + end +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to handle the case when job is duplicated. +]] +-- Includes +--[[ + This function is used to update the parent's dependencies if the job + is already completed and about to be ignored. The parent must get its + dependencies updated to avoid the parent job being stuck forever in + the waiting-children state. +]] +-- Includes +--[[ + Validate and move or add dependencies to parent. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) + if no pending dependencies. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) if needed. +]] +-- Includes +--[[ + Move parent to a wait status (wait, prioritized or delayed) +]] +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check if queue is paused or maxed + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePausedOrMaxed(queueMetaKey, activeKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency") + if queueAttributes[1] then + return true + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + return activeCount >= tonumber(queueAttributes[2]) + end + end + return false +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + local parentWaitKey = parentQueueKey .. ":wait" + local parentPausedKey = parentQueueKey .. ":paused" + local parentActiveKey = parentQueueKey .. ":active" + local parentMetaKey = parentQueueKey .. ":meta" + local parentMarkerKey = parentQueueKey .. ":marker" + local jobAttributes = rcall("HMGET", parentKey, "priority", "delay") + local priority = tonumber(jobAttributes[1]) or 0 + local delay = tonumber(jobAttributes[2]) or 0 + if delay > 0 then + local delayedTimestamp = tonumber(timestamp) + delay + local score = delayedTimestamp * 0x1000 + local parentDelayedKey = parentQueueKey .. ":delayed" + rcall("ZADD", parentDelayedKey, score, parentId) + rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed", "jobId", parentId, "delay", + delayedTimestamp) + addDelayMarkerIfNeeded(parentMarkerKey, parentDelayedKey) + else + if priority == 0 then + local parentTarget, isParentPausedOrMaxed = getTargetQueueList(parentMetaKey, parentActiveKey, + parentWaitKey, parentPausedKey) + addJobInTargetList(parentTarget, parentMarkerKey, "RPUSH", isParentPausedOrMaxed, parentId) + else + local isPausedOrMaxed = isQueuePausedOrMaxed(parentMetaKey, parentActiveKey) + addJobWithPriority(parentMarkerKey, parentQueueKey .. ":prioritized", priority, parentId, + parentQueueKey .. ":pc", isPausedOrMaxed) + end + rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting", "jobId", parentId, "prev", + "waiting-children") + end +end +local function moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + if rcall("EXISTS", parentKey) == 1 then + local parentWaitingChildrenKey = parentQueueKey .. ":waiting-children" + if rcall("ZSCORE", parentWaitingChildrenKey, parentId) then + rcall("ZREM", parentWaitingChildrenKey, parentId) + moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + end + end +end +local function moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, + parentId, timestamp) + local doNotHavePendingDependencies = rcall("SCARD", parentDependenciesKey) == 0 + if doNotHavePendingDependencies then + moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + end +end +local function updateParentDepsIfNeeded(parentKey, parentQueueKey, parentDependenciesKey, + parentId, jobIdKey, returnvalue, timestamp ) + local processedSet = parentKey .. ":processed" + rcall("HSET", processedSet, jobIdKey, returnvalue) + moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, parentId, timestamp) +end +local function updateExistingJobsParent(parentKey, parent, parentData, + parentDependenciesKey, completedKey, + jobIdKey, jobId, timestamp) + if parentKey ~= nil then + if rcall("ZSCORE", completedKey, jobId) then + local returnvalue = rcall("HGET", jobIdKey, "returnvalue") + updateParentDepsIfNeeded(parentKey, parent['queueKey'], + parentDependenciesKey, parent['id'], + jobIdKey, returnvalue, timestamp) + else + if parentDependenciesKey ~= nil then + rcall("SADD", parentDependenciesKey, jobIdKey) + end + end + rcall("HMSET", jobIdKey, "parentKey", parentKey, "parent", parentData) + end +end +local function handleDuplicatedJob(jobKey, jobId, currentParentKey, currentParent, + parentData, parentDependenciesKey, completedKey, eventsKey, maxEvents, timestamp) + local existedParentKey = rcall("HGET", jobKey, "parentKey") + if not existedParentKey or existedParentKey == currentParentKey then + updateExistingJobsParent(currentParentKey, currentParent, parentData, + parentDependenciesKey, completedKey, jobKey, + jobId, timestamp) + else + if currentParentKey ~= nil and currentParentKey ~= existedParentKey + and (rcall("EXISTS", existedParentKey) == 1) then + return -7 + end + end + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", + "duplicated", "jobId", jobId) + return jobId .. "" -- convert to string +end +--[[ + Function to store a job +]] +local function storeJob(eventsKey, jobIdKey, jobId, name, data, opts, timestamp, + parentKey, parentData, repeatJobKey) + local jsonOpts = cjson.encode(opts) + local delay = opts['delay'] or 0 + local priority = opts['priority'] or 0 + local debounceId = opts['de'] and opts['de']['id'] + local optionalValues = {} + if parentKey ~= nil then + table.insert(optionalValues, "parentKey") + table.insert(optionalValues, parentKey) + table.insert(optionalValues, "parent") + table.insert(optionalValues, parentData) + end + if repeatJobKey then + table.insert(optionalValues, "rjk") + table.insert(optionalValues, repeatJobKey) + end + if debounceId then + table.insert(optionalValues, "deid") + table.insert(optionalValues, debounceId) + end + rcall("HMSET", jobIdKey, "name", name, "data", data, "opts", jsonOpts, + "timestamp", timestamp, "delay", delay, "priority", priority, + unpack(optionalValues)) + rcall("XADD", eventsKey, "*", "event", "added", "jobId", jobId, "name", name) + return delay, priority +end +if parentKey ~= nil then + if rcall("EXISTS", parentKey) ~= 1 then return -5 end + parentData = cjson.encode(parent) +end +local jobCounter = rcall("INCR", idKey) +local maxEvents = getOrSetMaxEvents(metaKey) +local parentDependenciesKey = args[6] +local timestamp = args[4] +if args[2] == "" then + jobId = jobCounter + jobIdKey = args[1] .. jobId +else + jobId = args[2] + jobIdKey = args[1] .. jobId + if rcall("EXISTS", jobIdKey) == 1 then + return handleDuplicatedJob(jobIdKey, jobId, parentKey, parent, + parentData, parentDependenciesKey, completedKey, eventsKey, + maxEvents, timestamp) + end +end +local deduplicationId = opts['de'] and opts['de']['id'] +if deduplicationId then + local deduplicationJobId = deduplicateJobWithoutReplace(deduplicationId, opts['de'], + jobId, deduplicationKey, eventsKey, maxEvents) + if deduplicationJobId then + return deduplicationJobId + end +end +-- Store the job. +storeJob(eventsKey, jobIdKey, jobId, args[3], ARGV[2], opts, timestamp, + parentKey, parentData, repeatJobKey) +local waitChildrenKey = KEYS[4] +rcall("ZADD", waitChildrenKey, timestamp, jobId) +rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", + "waiting-children", "jobId", jobId) +-- Check if this job is a child of another job, if so add it to the parents dependencies +if parentDependenciesKey ~= nil then + rcall("SADD", parentDependenciesKey, jobIdKey) +end +return jobId .. "" -- convert to string +`; +var addParentJob = { + name: "addParentJob", + content: content4, + keys: 6 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/addPrioritizedJob-9.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content5 = `--[[ + Adds a priotitized job to the queue by doing the following: + - Increases the job counter if needed. + - Creates a new job key with the job data. + - Adds the job to the "added" list so that workers gets notified. + Input: + KEYS[1] 'marker', + KEYS[2] 'meta' + KEYS[3] 'id' + KEYS[4] 'prioritized' + KEYS[5] 'delayed' + KEYS[6] 'completed' + KEYS[7] 'active' + KEYS[8] events stream key + KEYS[9] 'pc' priority counter + ARGV[1] msgpacked arguments array + [1] key prefix, + [2] custom id (will not generate one automatically) + [3] name + [4] timestamp + [5] parentKey? + [6] parent dependencies key. + [7] parent? {id, queueKey} + [8] repeat job key + [9] deduplication key + ARGV[2] Json stringified job data + ARGV[3] msgpacked options + Output: + jobId - OK + -5 - Missing parent key +]] +local metaKey = KEYS[2] +local idKey = KEYS[3] +local priorityKey = KEYS[4] +local completedKey = KEYS[6] +local activeKey = KEYS[7] +local eventsKey = KEYS[8] +local priorityCounterKey = KEYS[9] +local jobId +local jobIdKey +local rcall = redis.call +local args = cmsgpack.unpack(ARGV[1]) +local data = ARGV[2] +local opts = cmsgpack.unpack(ARGV[3]) +local parentKey = args[5] +local parent = args[7] +local repeatJobKey = args[8] +local deduplicationKey = args[9] +local parentData +-- Includes +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to debounce a job. +]] +-- Includes +--[[ + Function to deduplicate a job. +]] +local function deduplicateJobWithoutReplace(deduplicationId, deduplicationOpts, jobId, deduplicationKey, + eventsKey, maxEvents) + local ttl = deduplicationOpts['ttl'] + local deduplicationKeyExists + if ttl and ttl > 0 then + if deduplicationOpts['extend'] then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + rcall('SET', deduplicationKey, currentDebounceJobId, 'PX', ttl) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", + "jobId", currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return currentDebounceJobId + else + rcall('SET', deduplicationKey, jobId, 'PX', ttl) + return + end + else + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'PX', ttl, 'NX') + end + else + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'NX') + end + if deduplicationKeyExists then + local currentDebounceJobId = rcall('GET', deduplicationKey) + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return currentDebounceJobId + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +local function removeDelayedJob(delayedKey, deduplicationKey, eventsKey, maxEvents, currentDeduplicatedJobId, + jobId, deduplicationId, prefix) + if rcall("ZREM", delayedKey, currentDeduplicatedJobId) > 0 then + removeJobKeys(prefix .. currentDeduplicatedJobId) + rcall("XADD", eventsKey, "*", "event", "removed", "jobId", currentDeduplicatedJobId, + "prev", "delayed") + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + jobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + jobId, "deduplicationId", deduplicationId, "deduplicatedJobId", currentDeduplicatedJobId) + return true + end + return false +end +local function deduplicateJob(deduplicationOpts, jobId, delayedKey, deduplicationKey, eventsKey, maxEvents, + prefix) + local deduplicationId = deduplicationOpts and deduplicationOpts['id'] + if deduplicationId then + if deduplicationOpts['replace'] then + local ttl = deduplicationOpts['ttl'] + if ttl and ttl > 0 then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + local isRemoved = removeDelayedJob(delayedKey, deduplicationKey, eventsKey, maxEvents, + currentDebounceJobId, jobId, deduplicationId, prefix) + if isRemoved then + if deduplicationOpts['extend'] then + rcall('SET', deduplicationKey, jobId, 'PX', ttl) + else + rcall('SET', deduplicationKey, jobId, 'KEEPTTL') + end + return + else + return currentDebounceJobId + end + else + rcall('SET', deduplicationKey, jobId, 'PX', ttl) + return + end + else + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + local isRemoved = removeDelayedJob(delayedKey, deduplicationKey, eventsKey, maxEvents, + currentDebounceJobId, jobId, deduplicationId, prefix) + if isRemoved then + rcall('SET', deduplicationKey, jobId) + return + else + return currentDebounceJobId + end + else + rcall('SET', deduplicationKey, jobId) + return + end + end + else + return deduplicateJobWithoutReplace(deduplicationId, deduplicationOpts, + jobId, deduplicationKey, eventsKey, maxEvents) + end + end +end +--[[ + Function to store a job +]] +local function storeJob(eventsKey, jobIdKey, jobId, name, data, opts, timestamp, + parentKey, parentData, repeatJobKey) + local jsonOpts = cjson.encode(opts) + local delay = opts['delay'] or 0 + local priority = opts['priority'] or 0 + local debounceId = opts['de'] and opts['de']['id'] + local optionalValues = {} + if parentKey ~= nil then + table.insert(optionalValues, "parentKey") + table.insert(optionalValues, parentKey) + table.insert(optionalValues, "parent") + table.insert(optionalValues, parentData) + end + if repeatJobKey then + table.insert(optionalValues, "rjk") + table.insert(optionalValues, repeatJobKey) + end + if debounceId then + table.insert(optionalValues, "deid") + table.insert(optionalValues, debounceId) + end + rcall("HMSET", jobIdKey, "name", name, "data", data, "opts", jsonOpts, + "timestamp", timestamp, "delay", delay, "priority", priority, + unpack(optionalValues)) + rcall("XADD", eventsKey, "*", "event", "added", "jobId", jobId, "name", name) + return delay, priority +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to handle the case when job is duplicated. +]] +-- Includes +--[[ + This function is used to update the parent's dependencies if the job + is already completed and about to be ignored. The parent must get its + dependencies updated to avoid the parent job being stuck forever in + the waiting-children state. +]] +-- Includes +--[[ + Validate and move or add dependencies to parent. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) + if no pending dependencies. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) if needed. +]] +-- Includes +--[[ + Move parent to a wait status (wait, prioritized or delayed) +]] +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check if queue is paused or maxed + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePausedOrMaxed(queueMetaKey, activeKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency") + if queueAttributes[1] then + return true + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + return activeCount >= tonumber(queueAttributes[2]) + end + end + return false +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + local parentWaitKey = parentQueueKey .. ":wait" + local parentPausedKey = parentQueueKey .. ":paused" + local parentActiveKey = parentQueueKey .. ":active" + local parentMetaKey = parentQueueKey .. ":meta" + local parentMarkerKey = parentQueueKey .. ":marker" + local jobAttributes = rcall("HMGET", parentKey, "priority", "delay") + local priority = tonumber(jobAttributes[1]) or 0 + local delay = tonumber(jobAttributes[2]) or 0 + if delay > 0 then + local delayedTimestamp = tonumber(timestamp) + delay + local score = delayedTimestamp * 0x1000 + local parentDelayedKey = parentQueueKey .. ":delayed" + rcall("ZADD", parentDelayedKey, score, parentId) + rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed", "jobId", parentId, "delay", + delayedTimestamp) + addDelayMarkerIfNeeded(parentMarkerKey, parentDelayedKey) + else + if priority == 0 then + local parentTarget, isParentPausedOrMaxed = getTargetQueueList(parentMetaKey, parentActiveKey, + parentWaitKey, parentPausedKey) + addJobInTargetList(parentTarget, parentMarkerKey, "RPUSH", isParentPausedOrMaxed, parentId) + else + local isPausedOrMaxed = isQueuePausedOrMaxed(parentMetaKey, parentActiveKey) + addJobWithPriority(parentMarkerKey, parentQueueKey .. ":prioritized", priority, parentId, + parentQueueKey .. ":pc", isPausedOrMaxed) + end + rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting", "jobId", parentId, "prev", + "waiting-children") + end +end +local function moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + if rcall("EXISTS", parentKey) == 1 then + local parentWaitingChildrenKey = parentQueueKey .. ":waiting-children" + if rcall("ZSCORE", parentWaitingChildrenKey, parentId) then + rcall("ZREM", parentWaitingChildrenKey, parentId) + moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + end + end +end +local function moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, + parentId, timestamp) + local doNotHavePendingDependencies = rcall("SCARD", parentDependenciesKey) == 0 + if doNotHavePendingDependencies then + moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + end +end +local function updateParentDepsIfNeeded(parentKey, parentQueueKey, parentDependenciesKey, + parentId, jobIdKey, returnvalue, timestamp ) + local processedSet = parentKey .. ":processed" + rcall("HSET", processedSet, jobIdKey, returnvalue) + moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, parentId, timestamp) +end +local function updateExistingJobsParent(parentKey, parent, parentData, + parentDependenciesKey, completedKey, + jobIdKey, jobId, timestamp) + if parentKey ~= nil then + if rcall("ZSCORE", completedKey, jobId) then + local returnvalue = rcall("HGET", jobIdKey, "returnvalue") + updateParentDepsIfNeeded(parentKey, parent['queueKey'], + parentDependenciesKey, parent['id'], + jobIdKey, returnvalue, timestamp) + else + if parentDependenciesKey ~= nil then + rcall("SADD", parentDependenciesKey, jobIdKey) + end + end + rcall("HMSET", jobIdKey, "parentKey", parentKey, "parent", parentData) + end +end +local function handleDuplicatedJob(jobKey, jobId, currentParentKey, currentParent, + parentData, parentDependenciesKey, completedKey, eventsKey, maxEvents, timestamp) + local existedParentKey = rcall("HGET", jobKey, "parentKey") + if not existedParentKey or existedParentKey == currentParentKey then + updateExistingJobsParent(currentParentKey, currentParent, parentData, + parentDependenciesKey, completedKey, jobKey, + jobId, timestamp) + else + if currentParentKey ~= nil and currentParentKey ~= existedParentKey + and (rcall("EXISTS", existedParentKey) == 1) then + return -7 + end + end + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", + "duplicated", "jobId", jobId) + return jobId .. "" -- convert to string +end +if parentKey ~= nil then + if rcall("EXISTS", parentKey) ~= 1 then return -5 end + parentData = cjson.encode(parent) +end +local jobCounter = rcall("INCR", idKey) +local maxEvents = getOrSetMaxEvents(metaKey) +local parentDependenciesKey = args[6] +local timestamp = args[4] +if args[2] == "" then + jobId = jobCounter + jobIdKey = args[1] .. jobId +else + jobId = args[2] + jobIdKey = args[1] .. jobId + if rcall("EXISTS", jobIdKey) == 1 then + return handleDuplicatedJob(jobIdKey, jobId, parentKey, parent, + parentData, parentDependenciesKey, completedKey, eventsKey, + maxEvents, timestamp) + end +end +local deduplicationJobId = deduplicateJob(opts['de'], jobId, KEYS[5], + deduplicationKey, eventsKey, maxEvents, args[1]) +if deduplicationJobId then + return deduplicationJobId +end +-- Store the job. +local delay, priority = storeJob(eventsKey, jobIdKey, jobId, args[3], ARGV[2], + opts, timestamp, parentKey, parentData, + repeatJobKey) +-- Add the job to the prioritized set +local isPausedOrMaxed = isQueuePausedOrMaxed(metaKey, activeKey) +addJobWithPriority( KEYS[1], priorityKey, priority, jobId, priorityCounterKey, isPausedOrMaxed) +-- Emit waiting event +rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "waiting", + "jobId", jobId) +-- Check if this job is a child of another job, if so add it to the parents dependencies +if parentDependenciesKey ~= nil then + rcall("SADD", parentDependenciesKey, jobIdKey) +end +return jobId .. "" -- convert to string +`; +var addPrioritizedJob = { + name: "addPrioritizedJob", + content: content5, + keys: 9 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/addRepeatableJob-2.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content6 = `--[[ + Adds a repeatable job + Input: + KEYS[1] 'repeat' key + KEYS[2] 'delayed' key + ARGV[1] next milliseconds + ARGV[2] msgpacked options + [1] name + [2] tz? + [3] pattern? + [4] endDate? + [5] every? + ARGV[3] legacy custom key TODO: remove this logic in next breaking change + ARGV[4] custom key + ARGV[5] prefix key + Output: + repeatableKey - OK +]] +local rcall = redis.call +local repeatKey = KEYS[1] +local delayedKey = KEYS[2] +local nextMillis = ARGV[1] +local legacyCustomKey = ARGV[3] +local customKey = ARGV[4] +local prefixKey = ARGV[5] +-- Includes +--[[ + Function to remove job. +]] +-- Includes +--[[ + Function to remove deduplication key if needed + when a job is being removed. +]] +local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey, + jobId, deduplicationId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + return rcall("DEL", deduplicationKey) + end + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +local function removeJob(jobId, hard, baseKey, shouldRemoveDeduplicationKey) + local jobKey = baseKey .. jobId + removeParentDependencyKey(jobKey, hard, nil, baseKey) + if shouldRemoveDeduplicationKey then + local deduplicationId = rcall("HGET", jobKey, "deid") + removeDeduplicationKeyIfNeededOnRemoval(baseKey, jobId, deduplicationId) + end + removeJobKeys(jobKey) +end +local function storeRepeatableJob(repeatKey, customKey, nextMillis, rawOpts) + rcall("ZADD", repeatKey, nextMillis, customKey) + local opts = cmsgpack.unpack(rawOpts) + local optionalValues = {} + if opts['tz'] then + table.insert(optionalValues, "tz") + table.insert(optionalValues, opts['tz']) + end + if opts['pattern'] then + table.insert(optionalValues, "pattern") + table.insert(optionalValues, opts['pattern']) + end + if opts['endDate'] then + table.insert(optionalValues, "endDate") + table.insert(optionalValues, opts['endDate']) + end + if opts['every'] then + table.insert(optionalValues, "every") + table.insert(optionalValues, opts['every']) + end + rcall("HMSET", repeatKey .. ":" .. customKey, "name", opts['name'], + unpack(optionalValues)) + return customKey +end +-- If we are overriding a repeatable job we must delete the delayed job for +-- the next iteration. +local prevMillis = rcall("ZSCORE", repeatKey, customKey) +if prevMillis then + local delayedJobId = "repeat:" .. customKey .. ":" .. prevMillis + local nextDelayedJobId = repeatKey .. ":" .. customKey .. ":" .. nextMillis + if rcall("ZSCORE", delayedKey, delayedJobId) + and rcall("EXISTS", nextDelayedJobId) ~= 1 then + removeJob(delayedJobId, true, prefixKey, true --[[remove debounce key]]) + rcall("ZREM", delayedKey, delayedJobId) + end +end +-- Keep backwards compatibility with old repeatable jobs (<= 3.0.0) +if rcall("ZSCORE", repeatKey, legacyCustomKey) ~= false then + return storeRepeatableJob(repeatKey, legacyCustomKey, nextMillis, ARGV[2]) +end +return storeRepeatableJob(repeatKey, customKey, nextMillis, ARGV[2]) +`; +var addRepeatableJob = { + name: "addRepeatableJob", + content: content6, + keys: 2 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/addStandardJob-9.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content7 = `--[[ + Adds a job to the queue by doing the following: + - Increases the job counter if needed. + - Creates a new job key with the job data. + - if delayed: + - computes timestamp. + - adds to delayed zset. + - Emits a global event 'delayed' if the job is delayed. + - if not delayed + - Adds the jobId to the wait/paused list in one of three ways: + - LIFO + - FIFO + - prioritized. + - Adds the job to the "added" list so that workers gets notified. + Input: + KEYS[1] 'wait', + KEYS[2] 'paused' + KEYS[3] 'meta' + KEYS[4] 'id' + KEYS[5] 'completed' + KEYS[6] 'delayed' + KEYS[7] 'active' + KEYS[8] events stream key + KEYS[9] marker key + ARGV[1] msgpacked arguments array + [1] key prefix, + [2] custom id (will not generate one automatically) + [3] name + [4] timestamp + [5] parentKey? + [6] parent dependencies key. + [7] parent? {id, queueKey} + [8] repeat job key + [9] deduplication key + ARGV[2] Json stringified job data + ARGV[3] msgpacked options + Output: + jobId - OK + -5 - Missing parent key +]] +local eventsKey = KEYS[8] +local jobId +local jobIdKey +local rcall = redis.call +local args = cmsgpack.unpack(ARGV[1]) +local data = ARGV[2] +local opts = cmsgpack.unpack(ARGV[3]) +local parentKey = args[5] +local parent = args[7] +local repeatJobKey = args[8] +local deduplicationKey = args[9] +local parentData +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to debounce a job. +]] +-- Includes +--[[ + Function to deduplicate a job. +]] +local function deduplicateJobWithoutReplace(deduplicationId, deduplicationOpts, jobId, deduplicationKey, + eventsKey, maxEvents) + local ttl = deduplicationOpts['ttl'] + local deduplicationKeyExists + if ttl and ttl > 0 then + if deduplicationOpts['extend'] then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + rcall('SET', deduplicationKey, currentDebounceJobId, 'PX', ttl) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", + "jobId", currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return currentDebounceJobId + else + rcall('SET', deduplicationKey, jobId, 'PX', ttl) + return + end + else + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'PX', ttl, 'NX') + end + else + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'NX') + end + if deduplicationKeyExists then + local currentDebounceJobId = rcall('GET', deduplicationKey) + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return currentDebounceJobId + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +local function removeDelayedJob(delayedKey, deduplicationKey, eventsKey, maxEvents, currentDeduplicatedJobId, + jobId, deduplicationId, prefix) + if rcall("ZREM", delayedKey, currentDeduplicatedJobId) > 0 then + removeJobKeys(prefix .. currentDeduplicatedJobId) + rcall("XADD", eventsKey, "*", "event", "removed", "jobId", currentDeduplicatedJobId, + "prev", "delayed") + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + jobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + jobId, "deduplicationId", deduplicationId, "deduplicatedJobId", currentDeduplicatedJobId) + return true + end + return false +end +local function deduplicateJob(deduplicationOpts, jobId, delayedKey, deduplicationKey, eventsKey, maxEvents, + prefix) + local deduplicationId = deduplicationOpts and deduplicationOpts['id'] + if deduplicationId then + if deduplicationOpts['replace'] then + local ttl = deduplicationOpts['ttl'] + if ttl and ttl > 0 then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + local isRemoved = removeDelayedJob(delayedKey, deduplicationKey, eventsKey, maxEvents, + currentDebounceJobId, jobId, deduplicationId, prefix) + if isRemoved then + if deduplicationOpts['extend'] then + rcall('SET', deduplicationKey, jobId, 'PX', ttl) + else + rcall('SET', deduplicationKey, jobId, 'KEEPTTL') + end + return + else + return currentDebounceJobId + end + else + rcall('SET', deduplicationKey, jobId, 'PX', ttl) + return + end + else + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + local isRemoved = removeDelayedJob(delayedKey, deduplicationKey, eventsKey, maxEvents, + currentDebounceJobId, jobId, deduplicationId, prefix) + if isRemoved then + rcall('SET', deduplicationKey, jobId) + return + else + return currentDebounceJobId + end + else + rcall('SET', deduplicationKey, jobId) + return + end + end + else + return deduplicateJobWithoutReplace(deduplicationId, deduplicationOpts, + jobId, deduplicationKey, eventsKey, maxEvents) + end + end +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to handle the case when job is duplicated. +]] +-- Includes +--[[ + This function is used to update the parent's dependencies if the job + is already completed and about to be ignored. The parent must get its + dependencies updated to avoid the parent job being stuck forever in + the waiting-children state. +]] +-- Includes +--[[ + Validate and move or add dependencies to parent. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) + if no pending dependencies. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) if needed. +]] +-- Includes +--[[ + Move parent to a wait status (wait, prioritized or delayed) +]] +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check if queue is paused or maxed + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePausedOrMaxed(queueMetaKey, activeKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency") + if queueAttributes[1] then + return true + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + return activeCount >= tonumber(queueAttributes[2]) + end + end + return false +end +local function moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + local parentWaitKey = parentQueueKey .. ":wait" + local parentPausedKey = parentQueueKey .. ":paused" + local parentActiveKey = parentQueueKey .. ":active" + local parentMetaKey = parentQueueKey .. ":meta" + local parentMarkerKey = parentQueueKey .. ":marker" + local jobAttributes = rcall("HMGET", parentKey, "priority", "delay") + local priority = tonumber(jobAttributes[1]) or 0 + local delay = tonumber(jobAttributes[2]) or 0 + if delay > 0 then + local delayedTimestamp = tonumber(timestamp) + delay + local score = delayedTimestamp * 0x1000 + local parentDelayedKey = parentQueueKey .. ":delayed" + rcall("ZADD", parentDelayedKey, score, parentId) + rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed", "jobId", parentId, "delay", + delayedTimestamp) + addDelayMarkerIfNeeded(parentMarkerKey, parentDelayedKey) + else + if priority == 0 then + local parentTarget, isParentPausedOrMaxed = getTargetQueueList(parentMetaKey, parentActiveKey, + parentWaitKey, parentPausedKey) + addJobInTargetList(parentTarget, parentMarkerKey, "RPUSH", isParentPausedOrMaxed, parentId) + else + local isPausedOrMaxed = isQueuePausedOrMaxed(parentMetaKey, parentActiveKey) + addJobWithPriority(parentMarkerKey, parentQueueKey .. ":prioritized", priority, parentId, + parentQueueKey .. ":pc", isPausedOrMaxed) + end + rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting", "jobId", parentId, "prev", + "waiting-children") + end +end +local function moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + if rcall("EXISTS", parentKey) == 1 then + local parentWaitingChildrenKey = parentQueueKey .. ":waiting-children" + if rcall("ZSCORE", parentWaitingChildrenKey, parentId) then + rcall("ZREM", parentWaitingChildrenKey, parentId) + moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + end + end +end +local function moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, + parentId, timestamp) + local doNotHavePendingDependencies = rcall("SCARD", parentDependenciesKey) == 0 + if doNotHavePendingDependencies then + moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + end +end +local function updateParentDepsIfNeeded(parentKey, parentQueueKey, parentDependenciesKey, + parentId, jobIdKey, returnvalue, timestamp ) + local processedSet = parentKey .. ":processed" + rcall("HSET", processedSet, jobIdKey, returnvalue) + moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, parentId, timestamp) +end +local function updateExistingJobsParent(parentKey, parent, parentData, + parentDependenciesKey, completedKey, + jobIdKey, jobId, timestamp) + if parentKey ~= nil then + if rcall("ZSCORE", completedKey, jobId) then + local returnvalue = rcall("HGET", jobIdKey, "returnvalue") + updateParentDepsIfNeeded(parentKey, parent['queueKey'], + parentDependenciesKey, parent['id'], + jobIdKey, returnvalue, timestamp) + else + if parentDependenciesKey ~= nil then + rcall("SADD", parentDependenciesKey, jobIdKey) + end + end + rcall("HMSET", jobIdKey, "parentKey", parentKey, "parent", parentData) + end +end +local function handleDuplicatedJob(jobKey, jobId, currentParentKey, currentParent, + parentData, parentDependenciesKey, completedKey, eventsKey, maxEvents, timestamp) + local existedParentKey = rcall("HGET", jobKey, "parentKey") + if not existedParentKey or existedParentKey == currentParentKey then + updateExistingJobsParent(currentParentKey, currentParent, parentData, + parentDependenciesKey, completedKey, jobKey, + jobId, timestamp) + else + if currentParentKey ~= nil and currentParentKey ~= existedParentKey + and (rcall("EXISTS", existedParentKey) == 1) then + return -7 + end + end + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", + "duplicated", "jobId", jobId) + return jobId .. "" -- convert to string +end +--[[ + Function to store a job +]] +local function storeJob(eventsKey, jobIdKey, jobId, name, data, opts, timestamp, + parentKey, parentData, repeatJobKey) + local jsonOpts = cjson.encode(opts) + local delay = opts['delay'] or 0 + local priority = opts['priority'] or 0 + local debounceId = opts['de'] and opts['de']['id'] + local optionalValues = {} + if parentKey ~= nil then + table.insert(optionalValues, "parentKey") + table.insert(optionalValues, parentKey) + table.insert(optionalValues, "parent") + table.insert(optionalValues, parentData) + end + if repeatJobKey then + table.insert(optionalValues, "rjk") + table.insert(optionalValues, repeatJobKey) + end + if debounceId then + table.insert(optionalValues, "deid") + table.insert(optionalValues, debounceId) + end + rcall("HMSET", jobIdKey, "name", name, "data", data, "opts", jsonOpts, + "timestamp", timestamp, "delay", delay, "priority", priority, + unpack(optionalValues)) + rcall("XADD", eventsKey, "*", "event", "added", "jobId", jobId, "name", name) + return delay, priority +end +if parentKey ~= nil then + if rcall("EXISTS", parentKey) ~= 1 then return -5 end + parentData = cjson.encode(parent) +end +local jobCounter = rcall("INCR", KEYS[4]) +local metaKey = KEYS[3] +local maxEvents = getOrSetMaxEvents(metaKey) +local parentDependenciesKey = args[6] +local timestamp = args[4] +if args[2] == "" then + jobId = jobCounter + jobIdKey = args[1] .. jobId +else + jobId = args[2] + jobIdKey = args[1] .. jobId + if rcall("EXISTS", jobIdKey) == 1 then + return handleDuplicatedJob(jobIdKey, jobId, parentKey, parent, + parentData, parentDependenciesKey, KEYS[5], eventsKey, + maxEvents, timestamp) + end +end +local deduplicationJobId = deduplicateJob(opts['de'], jobId, KEYS[6], + deduplicationKey, eventsKey, maxEvents, args[1]) +if deduplicationJobId then + return deduplicationJobId +end +-- Store the job. +storeJob(eventsKey, jobIdKey, jobId, args[3], ARGV[2], opts, timestamp, + parentKey, parentData, repeatJobKey) +local target, isPausedOrMaxed = getTargetQueueList(metaKey, KEYS[7], KEYS[1], KEYS[2]) +-- LIFO or FIFO +local pushCmd = opts['lifo'] and 'RPUSH' or 'LPUSH' +addJobInTargetList(target, KEYS[9], pushCmd, isPausedOrMaxed, jobId) +-- Emit waiting event +rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "waiting", + "jobId", jobId) +-- Check if this job is a child of another job, if so add it to the parents dependencies +if parentDependenciesKey ~= nil then + rcall("SADD", parentDependenciesKey, jobIdKey) +end +return jobId .. "" -- convert to string +`; +var addStandardJob = { + name: "addStandardJob", + content: content7, + keys: 9 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/changeDelay-4.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content8 = `--[[ + Change job delay when it is in delayed set. + Input: + KEYS[1] delayed key + KEYS[2] meta key + KEYS[3] marker key + KEYS[4] events stream + ARGV[1] delay + ARGV[2] timestamp + ARGV[3] the id of the job + ARGV[4] job key + Output: + 0 - OK + -1 - Missing job. + -3 - Job not in delayed set. + Events: + - delayed key. +]] +local rcall = redis.call +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Bake in the job id first 12 bits into the timestamp + to guarantee correct execution order of delayed jobs + (up to 4096 jobs per given timestamp or 4096 jobs apart per timestamp) + WARNING: Jobs that are so far apart that they wrap around will cause FIFO to fail +]] +local function getDelayedScore(delayedKey, timestamp, delay) + local delayedTimestamp = (delay > 0 and (tonumber(timestamp) + delay)) or tonumber(timestamp) + local minScore = delayedTimestamp * 0x1000 + local maxScore = (delayedTimestamp + 1 ) * 0x1000 - 1 + local result = rcall("ZREVRANGEBYSCORE", delayedKey, maxScore, + minScore, "WITHSCORES","LIMIT", 0, 1) + if #result then + local currentMaxScore = tonumber(result[2]) + if currentMaxScore ~= nil then + if currentMaxScore >= maxScore then + return maxScore, delayedTimestamp + else + return currentMaxScore + 1, delayedTimestamp + end + end + end + return minScore, delayedTimestamp +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +if rcall("EXISTS", ARGV[4]) == 1 then + local jobId = ARGV[3] + local delay = tonumber(ARGV[1]) + local score, delayedTimestamp = getDelayedScore(KEYS[1], ARGV[2], delay) + local numRemovedElements = rcall("ZREM", KEYS[1], jobId) + if numRemovedElements < 1 then + return -3 + end + rcall("HSET", ARGV[4], "delay", delay) + rcall("ZADD", KEYS[1], score, jobId) + local maxEvents = getOrSetMaxEvents(KEYS[2]) + rcall("XADD", KEYS[4], "MAXLEN", "~", maxEvents, "*", "event", "delayed", + "jobId", jobId, "delay", delayedTimestamp) + -- mark that a delayed job is available + addDelayMarkerIfNeeded(KEYS[3], KEYS[1]) + return 0 +else + return -1 +end`; +var changeDelay = { + name: "changeDelay", + content: content8, + keys: 4 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/changePriority-7.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content9 = `--[[ + Change job priority + Input: + KEYS[1] 'wait', + KEYS[2] 'paused' + KEYS[3] 'meta' + KEYS[4] 'prioritized' + KEYS[5] 'active' + KEYS[6] 'pc' priority counter + KEYS[7] 'marker' + ARGV[1] priority value + ARGV[2] prefix key + ARGV[3] job id + ARGV[4] lifo + Output: + 0 - OK + -1 - Missing job +]] +local jobId = ARGV[3] +local jobKey = ARGV[2] .. jobId +local priority = tonumber(ARGV[1]) +local rcall = redis.call +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to push back job considering priority in front of same prioritized jobs. +]] +local function pushBackJobWithPriority(prioritizedKey, priority, jobId) + -- in order to put it at front of same prioritized jobs + -- we consider prioritized counter as 0 + local score = priority * 0x100000000 + rcall("ZADD", prioritizedKey, score, jobId) +end +local function reAddJobWithNewPriority( prioritizedKey, markerKey, targetKey, + priorityCounter, lifo, priority, jobId, isPausedOrMaxed) + if priority == 0 then + local pushCmd = lifo and 'RPUSH' or 'LPUSH' + addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + else + if lifo then + pushBackJobWithPriority(prioritizedKey, priority, jobId) + else + addJobWithPriority(markerKey, prioritizedKey, priority, jobId, + priorityCounter, isPausedOrMaxed) + end + end +end +if rcall("EXISTS", jobKey) == 1 then + local metaKey = KEYS[3] + local target, isPausedOrMaxed = getTargetQueueList(metaKey, KEYS[5], KEYS[1], KEYS[2]) + local prioritizedKey = KEYS[4] + local priorityCounterKey = KEYS[6] + local markerKey = KEYS[7] + -- Re-add with the new priority + if rcall("ZREM", prioritizedKey, jobId) > 0 then + reAddJobWithNewPriority( prioritizedKey, markerKey, target, + priorityCounterKey, ARGV[4] == '1', priority, jobId, isPausedOrMaxed) + elseif rcall("LREM", target, -1, jobId) > 0 then + reAddJobWithNewPriority( prioritizedKey, markerKey, target, + priorityCounterKey, ARGV[4] == '1', priority, jobId, isPausedOrMaxed) + end + rcall("HSET", jobKey, "priority", priority) + return 0 +else + return -1 +end +`; +var changePriority = { + name: "changePriority", + content: content9, + keys: 7 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/cleanJobsInSet-3.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content10 = `--[[ + Remove jobs from the specific set. + Input: + KEYS[1] set key, + KEYS[2] events stream key + KEYS[3] repeat key + ARGV[1] jobKey prefix + ARGV[2] timestamp + ARGV[3] limit the number of jobs to be removed. 0 is unlimited + ARGV[4] set name, can be any of 'wait', 'active', 'paused', 'delayed', 'completed', or 'failed' +]] +local rcall = redis.call +local repeatKey = KEYS[3] +local rangeStart = 0 +local rangeEnd = -1 +local limit = tonumber(ARGV[3]) +-- If we're only deleting _n_ items, avoid retrieving all items +-- for faster performance +-- +-- Start from the tail of the list, since that's where oldest elements +-- are generally added for FIFO lists +if limit > 0 then + rangeStart = -1 - limit + 1 + rangeEnd = -1 +end +-- Includes +--[[ + Function to clean job list. + Returns jobIds and deleted count number. +]] +-- Includes +--[[ + Function to get the latest saved timestamp. +]] +local function getTimestamp(jobKey, attributes) + if #attributes == 1 then + return rcall("HGET", jobKey, attributes[1]) + end + local jobTs + for _, ts in ipairs(rcall("HMGET", jobKey, unpack(attributes))) do + if (ts) then + jobTs = ts + break + end + end + return jobTs +end +--[[ + Function to check if the job belongs to a job scheduler and + current delayed job matches with jobId +]] +local function isJobSchedulerJob(jobId, jobKey, jobSchedulersKey) + local repeatJobKey = rcall("HGET", jobKey, "rjk") + if repeatJobKey then + local prevMillis = rcall("ZSCORE", jobSchedulersKey, repeatJobKey) + if prevMillis then + local currentDelayedJobId = "repeat:" .. repeatJobKey .. ":" .. prevMillis + return jobId == currentDelayedJobId + end + end + return false +end +--[[ + Function to remove job. +]] +-- Includes +--[[ + Function to remove deduplication key if needed + when a job is being removed. +]] +local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey, + jobId, deduplicationId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + return rcall("DEL", deduplicationKey) + end + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +local function removeJob(jobId, hard, baseKey, shouldRemoveDeduplicationKey) + local jobKey = baseKey .. jobId + removeParentDependencyKey(jobKey, hard, nil, baseKey) + if shouldRemoveDeduplicationKey then + local deduplicationId = rcall("HGET", jobKey, "deid") + removeDeduplicationKeyIfNeededOnRemoval(baseKey, jobId, deduplicationId) + end + removeJobKeys(jobKey) +end +local function cleanList(listKey, jobKeyPrefix, rangeStart, rangeEnd, + timestamp, isWaiting, jobSchedulersKey) + local jobs = rcall("LRANGE", listKey, rangeStart, rangeEnd) + local deleted = {} + local deletedCount = 0 + local jobTS + local deletionMarker = '' + local jobIdsLen = #jobs + for i, job in ipairs(jobs) do + if limit > 0 and deletedCount >= limit then + break + end + local jobKey = jobKeyPrefix .. job + if (isWaiting or rcall("EXISTS", jobKey .. ":lock") == 0) and + not isJobSchedulerJob(job, jobKey, jobSchedulersKey) then + -- Find the right timestamp of the job to compare to maxTimestamp: + -- * finishedOn says when the job was completed, but it isn't set unless the job has actually completed + -- * processedOn represents when the job was last attempted, but it doesn't get populated until + -- the job is first tried + -- * timestamp is the original job submission time + -- Fetch all three of these (in that order) and use the first one that is set so that we'll leave jobs + -- that have been active within the grace period: + jobTS = getTimestamp(jobKey, {"finishedOn", "processedOn", "timestamp"}) + if (not jobTS or jobTS <= timestamp) then + -- replace the entry with a deletion marker; the actual deletion will + -- occur at the end of the script + rcall("LSET", listKey, rangeEnd - jobIdsLen + i, deletionMarker) + removeJob(job, true, jobKeyPrefix, true --[[remove debounce key]]) + deletedCount = deletedCount + 1 + table.insert(deleted, job) + end + end + end + rcall("LREM", listKey, 0, deletionMarker) + return {deleted, deletedCount} +end +--[[ + Function to clean job set. + Returns jobIds and deleted count number. +]] +-- Includes +--[[ + Function to loop in batches. + Just a bit of warning, some commands as ZREM + could receive a maximum of 7000 parameters per call. +]] +local function batches(n, batchSize) + local i = 0 + return function() + local from = i * batchSize + 1 + i = i + 1 + if (from <= n) then + local to = math.min(from + batchSize - 1, n) + return from, to + end + end +end +--[[ + We use ZRANGEBYSCORE to make the case where we're deleting a limited number + of items in a sorted set only run a single iteration. If we simply used + ZRANGE, we may take a long time traversing through jobs that are within the + grace period. +]] +local function getJobsInZset(zsetKey, rangeEnd, limit) + if limit > 0 then + return rcall("ZRANGEBYSCORE", zsetKey, 0, rangeEnd, "LIMIT", 0, limit) + else + return rcall("ZRANGEBYSCORE", zsetKey, 0, rangeEnd) + end +end +local function cleanSet( + setKey, + jobKeyPrefix, + rangeEnd, + timestamp, + limit, + attributes, + isFinished, + jobSchedulersKey) + local jobs = getJobsInZset(setKey, rangeEnd, limit) + local deleted = {} + local deletedCount = 0 + local jobTS + for i, job in ipairs(jobs) do + if limit > 0 and deletedCount >= limit then + break + end + local jobKey = jobKeyPrefix .. job + -- Extract a Job Scheduler Id from jobId ("repeat:job-scheduler-id:millis") + -- and check if it is in the scheduled jobs + if not (jobSchedulersKey and isJobSchedulerJob(job, jobKey, jobSchedulersKey)) then + if isFinished then + removeJob(job, true, jobKeyPrefix, true --[[remove debounce key]] ) + deletedCount = deletedCount + 1 + table.insert(deleted, job) + else + -- * finishedOn says when the job was completed, but it isn't set unless the job has actually completed + jobTS = getTimestamp(jobKey, attributes) + if (not jobTS or jobTS <= timestamp) then + removeJob(job, true, jobKeyPrefix, true --[[remove debounce key]] ) + deletedCount = deletedCount + 1 + table.insert(deleted, job) + end + end + end + end + if (#deleted > 0) then + for from, to in batches(#deleted, 7000) do + rcall("ZREM", setKey, unpack(deleted, from, to)) + end + end + return {deleted, deletedCount} +end +local result +if ARGV[4] == "active" then + result = cleanList(KEYS[1], ARGV[1], rangeStart, rangeEnd, ARGV[2], false --[[ hasFinished ]], + repeatKey) +elseif ARGV[4] == "delayed" then + rangeEnd = "+inf" + result = cleanSet(KEYS[1], ARGV[1], rangeEnd, ARGV[2], limit, + {"processedOn", "timestamp"}, false --[[ hasFinished ]], repeatKey) +elseif ARGV[4] == "prioritized" then + rangeEnd = "+inf" + result = cleanSet(KEYS[1], ARGV[1], rangeEnd, ARGV[2], limit, + {"timestamp"}, false --[[ hasFinished ]], repeatKey) +elseif ARGV[4] == "wait" or ARGV[4] == "paused" then + result = cleanList(KEYS[1], ARGV[1], rangeStart, rangeEnd, ARGV[2], true --[[ hasFinished ]], + repeatKey) +else + rangeEnd = ARGV[2] + -- No need to pass repeat key as in that moment job won't be related to a job scheduler + result = cleanSet(KEYS[1], ARGV[1], rangeEnd, ARGV[2], limit, + {"finishedOn"}, true --[[ hasFinished ]]) +end +rcall("XADD", KEYS[2], "*", "event", "cleaned", "count", result[2]) +return result[1] +`; +var cleanJobsInSet = { + name: "cleanJobsInSet", + content: content10, + keys: 3 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/drain-5.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content11 = `--[[ + Drains the queue, removes all jobs that are waiting + or delayed, but not active, completed or failed + Input: + KEYS[1] 'wait', + KEYS[2] 'paused' + KEYS[3] 'delayed' + KEYS[4] 'prioritized' + KEYS[5] 'jobschedulers' (repeat) + ARGV[1] queue key prefix + ARGV[2] should clean delayed jobs +]] +local rcall = redis.call +local queueBaseKey = ARGV[1] +--[[ + Functions to remove jobs. +]] +-- Includes +--[[ + Function to filter out jobs to ignore from a table. +]] +local function filterOutJobsToIgnore(jobs, jobsToIgnore) + local filteredJobs = {} + for i = 1, #jobs do + if not jobsToIgnore[jobs[i]] then + table.insert(filteredJobs, jobs[i]) + end + end + return filteredJobs +end +--[[ + Functions to remove jobs. +]] +-- Includes +--[[ + Function to remove job. +]] +-- Includes +--[[ + Function to remove deduplication key if needed + when a job is being removed. +]] +local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey, + jobId, deduplicationId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + return rcall("DEL", deduplicationKey) + end + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +local function removeJob(jobId, hard, baseKey, shouldRemoveDeduplicationKey) + local jobKey = baseKey .. jobId + removeParentDependencyKey(jobKey, hard, nil, baseKey) + if shouldRemoveDeduplicationKey then + local deduplicationId = rcall("HGET", jobKey, "deid") + removeDeduplicationKeyIfNeededOnRemoval(baseKey, jobId, deduplicationId) + end + removeJobKeys(jobKey) +end +local function removeJobs(keys, hard, baseKey, max) + for i, key in ipairs(keys) do + removeJob(key, hard, baseKey, true --[[remove debounce key]]) + end + return max - #keys +end +local function getListItems(keyName, max) + return rcall('LRANGE', keyName, 0, max - 1) +end +local function removeListJobs(keyName, hard, baseKey, max, jobsToIgnore) + local jobs = getListItems(keyName, max) + if jobsToIgnore then + jobs = filterOutJobsToIgnore(jobs, jobsToIgnore) + end + local count = removeJobs(jobs, hard, baseKey, max) + rcall("LTRIM", keyName, #jobs, -1) + return count +end +-- Includes +--[[ + Function to loop in batches. + Just a bit of warning, some commands as ZREM + could receive a maximum of 7000 parameters per call. +]] +local function batches(n, batchSize) + local i = 0 + return function() + local from = i * batchSize + 1 + i = i + 1 + if (from <= n) then + local to = math.min(from + batchSize - 1, n) + return from, to + end + end +end +--[[ + Function to get ZSet items. +]] +local function getZSetItems(keyName, max) + return rcall('ZRANGE', keyName, 0, max - 1) +end +local function removeZSetJobs(keyName, hard, baseKey, max, jobsToIgnore) + local jobs = getZSetItems(keyName, max) + if jobsToIgnore then + jobs = filterOutJobsToIgnore(jobs, jobsToIgnore) + end + local count = removeJobs(jobs, hard, baseKey, max) + if(#jobs > 0) then + for from, to in batches(#jobs, 7000) do + rcall("ZREM", keyName, unpack(jobs, from, to)) + end + end + return count +end +-- We must not remove delayed jobs if they are associated to a job scheduler. +local scheduledJobs = {} +local jobSchedulers = rcall("ZRANGE", KEYS[5], 0, -1, "WITHSCORES") +-- For every job scheduler, get the current delayed job id. +for i = 1, #jobSchedulers, 2 do + local jobSchedulerId = jobSchedulers[i] + local jobSchedulerMillis = jobSchedulers[i + 1] + local delayedJobId = "repeat:" .. jobSchedulerId .. ":" .. jobSchedulerMillis + scheduledJobs[delayedJobId] = true +end +removeListJobs(KEYS[1], true, queueBaseKey, 0, scheduledJobs) -- wait +removeListJobs(KEYS[2], true, queueBaseKey, 0, scheduledJobs) -- paused +if ARGV[2] == "1" then + removeZSetJobs(KEYS[3], true, queueBaseKey, 0, scheduledJobs) -- delayed +end +removeZSetJobs(KEYS[4], true, queueBaseKey, 0, scheduledJobs) -- prioritized +`; +var drain = { + name: "drain", + content: content11, + keys: 5 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/extendLock-2.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content12 = `--[[ + Extend lock and removes the job from the stalled set. + Input: + KEYS[1] 'lock', + KEYS[2] 'stalled' + ARGV[1] token + ARGV[2] lock duration in milliseconds + ARGV[3] jobid + Output: + "1" if lock extented succesfully. +]] +local rcall = redis.call +if rcall("GET", KEYS[1]) == ARGV[1] then + -- if rcall("SET", KEYS[1], ARGV[1], "PX", ARGV[2], "XX") then + if rcall("SET", KEYS[1], ARGV[1], "PX", ARGV[2]) then + rcall("SREM", KEYS[2], ARGV[3]) + return 1 + end +end +return 0 +`; +var extendLock = { + name: "extendLock", + content: content12, + keys: 2 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/extendLocks-1.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content13 = `--[[ + Extend locks for multiple jobs and remove them from the stalled set if successful. + Return the list of job IDs for which the operation failed. + KEYS[1] = stalled key + ARGV[1] = baseKey + ARGV[2] = tokens + ARGV[3] = jobIds + ARGV[4] = lockDuration (ms) + Output: + An array of failed job IDs. If empty, all succeeded. +]] +local rcall = redis.call +local stalledKey = KEYS[1] +local baseKey = ARGV[1] +local tokens = cmsgpack.unpack(ARGV[2]) +local jobIds = cmsgpack.unpack(ARGV[3]) +local lockDuration = ARGV[4] +local jobCount = #jobIds +local failedJobs = {} +for i = 1, jobCount, 1 do + local lockKey = baseKey .. jobIds[i] .. ':lock' + local jobId = jobIds[i] + local token = tokens[i] + local currentToken = rcall("GET", lockKey) + if currentToken then + if currentToken == token then + local setResult = rcall("SET", lockKey, token, "PX", lockDuration) + if setResult then + rcall("SREM", stalledKey, jobId) + else + table.insert(failedJobs, jobId) + end + else + table.insert(failedJobs, jobId) + end + else + table.insert(failedJobs, jobId) + end +end +return failedJobs +`; +var extendLocks = { + name: "extendLocks", + content: content13, + keys: 1 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/getCounts-1.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content14 = `--[[ + Get counts per provided states + Input: + KEYS[1] 'prefix' + ARGV[1...] types +]] +local rcall = redis.call; +local prefix = KEYS[1] +local results = {} +for i = 1, #ARGV do + local stateKey = prefix .. ARGV[i] + if ARGV[i] == "wait" or ARGV[i] == "paused" then + -- Markers in waitlist DEPRECATED in v5: Remove in v6. + local marker = rcall("LINDEX", stateKey, -1) + if marker and string.sub(marker, 1, 2) == "0:" then + local count = rcall("LLEN", stateKey) + if count > 1 then + rcall("RPOP", stateKey) + results[#results+1] = count-1 + else + results[#results+1] = 0 + end + else + results[#results+1] = rcall("LLEN", stateKey) + end + elseif ARGV[i] == "active" then + results[#results+1] = rcall("LLEN", stateKey) + else + results[#results+1] = rcall("ZCARD", stateKey) + end +end +return results +`; +var getCounts = { + name: "getCounts", + content: content14, + keys: 1 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/getCountsPerPriority-4.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content15 = `--[[ + Get counts per provided states + Input: + KEYS[1] wait key + KEYS[2] paused key + KEYS[3] meta key + KEYS[4] prioritized key + ARGV[1...] priorities +]] +local rcall = redis.call +local results = {} +local waitKey = KEYS[1] +local pausedKey = KEYS[2] +local prioritizedKey = KEYS[4] +-- Includes +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePaused(queueMetaKey) + return rcall("HEXISTS", queueMetaKey, "paused") == 1 +end +for i = 1, #ARGV do + local priority = tonumber(ARGV[i]) + if priority == 0 then + if isQueuePaused(KEYS[3]) then + results[#results+1] = rcall("LLEN", pausedKey) + else + results[#results+1] = rcall("LLEN", waitKey) + end + else + results[#results+1] = rcall("ZCOUNT", prioritizedKey, + priority * 0x100000000, (priority + 1) * 0x100000000 - 1) + end +end +return results +`; +var getCountsPerPriority = { + name: "getCountsPerPriority", + content: content15, + keys: 4 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/getDependencyCounts-4.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content16 = `--[[ + Get counts per child states + Input: + KEYS[1] processed key + KEYS[2] unprocessed key + KEYS[3] ignored key + KEYS[4] failed key + ARGV[1...] types +]] +local rcall = redis.call; +local processedKey = KEYS[1] +local unprocessedKey = KEYS[2] +local ignoredKey = KEYS[3] +local failedKey = KEYS[4] +local results = {} +for i = 1, #ARGV do + if ARGV[i] == "processed" then + results[#results+1] = rcall("HLEN", processedKey) + elseif ARGV[i] == "unprocessed" then + results[#results+1] = rcall("SCARD", unprocessedKey) + elseif ARGV[i] == "ignored" then + results[#results+1] = rcall("HLEN", ignoredKey) + else + results[#results+1] = rcall("ZCARD", failedKey) + end +end +return results +`; +var getDependencyCounts = { + name: "getDependencyCounts", + content: content16, + keys: 4 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/getJobScheduler-1.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content17 = `--[[ + Get job scheduler record. + Input: + KEYS[1] 'repeat' key + ARGV[1] id +]] +local rcall = redis.call +local jobSchedulerKey = KEYS[1] .. ":" .. ARGV[1] +local score = rcall("ZSCORE", KEYS[1], ARGV[1]) +if score then + return {rcall("HGETALL", jobSchedulerKey), score} -- get job data +end +return {nil, nil} +`; +var getJobScheduler = { + name: "getJobScheduler", + content: content17, + keys: 1 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/getMetrics-2.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content18 = `--[[ + Get metrics + Input: + KEYS[1] 'metrics' key + KEYS[2] 'metrics data' key + ARGV[1] start index + ARGV[2] end index +]] +local rcall = redis.call; +local metricsKey = KEYS[1] +local dataKey = KEYS[2] +local metrics = rcall("HMGET", metricsKey, "count", "prevTS", "prevCount") +local data = rcall("LRANGE", dataKey, tonumber(ARGV[1]), tonumber(ARGV[2])) +local numPoints = rcall("LLEN", dataKey) +return {metrics, data, numPoints} +`; +var getMetrics = { + name: "getMetrics", + content: content18, + keys: 2 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/getRanges-1.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content19 = `--[[ + Get job ids per provided states + Input: + KEYS[1] 'prefix' + ARGV[1] start + ARGV[2] end + ARGV[3] asc + ARGV[4...] types +]] +local rcall = redis.call +local prefix = KEYS[1] +local rangeStart = tonumber(ARGV[1]) +local rangeEnd = tonumber(ARGV[2]) +local asc = ARGV[3] +local results = {} +local function getRangeInList(listKey, asc, rangeStart, rangeEnd, results) + if asc == "1" then + local modifiedRangeStart + local modifiedRangeEnd + if rangeStart == -1 then + modifiedRangeStart = 0 + else + modifiedRangeStart = -(rangeStart + 1) + end + if rangeEnd == -1 then + modifiedRangeEnd = 0 + else + modifiedRangeEnd = -(rangeEnd + 1) + end + results[#results+1] = rcall("LRANGE", listKey, + modifiedRangeEnd, + modifiedRangeStart) + else + results[#results+1] = rcall("LRANGE", listKey, rangeStart, rangeEnd) + end +end +for i = 4, #ARGV do + local stateKey = prefix .. ARGV[i] + if ARGV[i] == "wait" or ARGV[i] == "paused" then + -- Markers in waitlist DEPRECATED in v5: Remove in v6. + local marker = rcall("LINDEX", stateKey, -1) + if marker and string.sub(marker, 1, 2) == "0:" then + local count = rcall("LLEN", stateKey) + if count > 1 then + rcall("RPOP", stateKey) + getRangeInList(stateKey, asc, rangeStart, rangeEnd, results) + else + results[#results+1] = {} + end + else + getRangeInList(stateKey, asc, rangeStart, rangeEnd, results) + end + elseif ARGV[i] == "active" then + getRangeInList(stateKey, asc, rangeStart, rangeEnd, results) + else + if asc == "1" then + results[#results+1] = rcall("ZRANGE", stateKey, rangeStart, rangeEnd) + else + results[#results+1] = rcall("ZREVRANGE", stateKey, rangeStart, rangeEnd) + end + end +end +return results +`; +var getRanges = { + name: "getRanges", + content: content19, + keys: 1 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/getRateLimitTtl-2.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content20 = `--[[ + Get rate limit ttl + Input: + KEYS[1] 'limiter' + KEYS[2] 'meta' + ARGV[1] maxJobs +]] +local rcall = redis.call +-- Includes +--[[ + Function to get current rate limit ttl. +]] +local function getRateLimitTTL(maxJobs, rateLimiterKey) + if maxJobs and maxJobs <= tonumber(rcall("GET", rateLimiterKey) or 0) then + local pttl = rcall("PTTL", rateLimiterKey) + if pttl == 0 then + rcall("DEL", rateLimiterKey) + end + if pttl > 0 then + return pttl + end + end + return 0 +end +local rateLimiterKey = KEYS[1] +if ARGV[1] ~= "0" then + return getRateLimitTTL(tonumber(ARGV[1]), rateLimiterKey) +else + local rateLimitMax = rcall("HGET", KEYS[2], "max") + if rateLimitMax then + return getRateLimitTTL(tonumber(rateLimitMax), rateLimiterKey) + end + return rcall("PTTL", rateLimiterKey) +end +`; +var getRateLimitTtl = { + name: "getRateLimitTtl", + content: content20, + keys: 2 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/getState-8.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content21 = `--[[ + Get a job state + Input: + KEYS[1] 'completed' key, + KEYS[2] 'failed' key + KEYS[3] 'delayed' key + KEYS[4] 'active' key + KEYS[5] 'wait' key + KEYS[6] 'paused' key + KEYS[7] 'waiting-children' key + KEYS[8] 'prioritized' key + ARGV[1] job id + Output: + 'completed' + 'failed' + 'delayed' + 'active' + 'prioritized' + 'waiting' + 'waiting-children' + 'unknown' +]] +local rcall = redis.call +if rcall("ZSCORE", KEYS[1], ARGV[1]) then + return "completed" +end +if rcall("ZSCORE", KEYS[2], ARGV[1]) then + return "failed" +end +if rcall("ZSCORE", KEYS[3], ARGV[1]) then + return "delayed" +end +if rcall("ZSCORE", KEYS[8], ARGV[1]) then + return "prioritized" +end +-- Includes +--[[ + Functions to check if a item belongs to a list. +]] +local function checkItemInList(list, item) + for _, v in pairs(list) do + if v == item then + return 1 + end + end + return nil +end +local active_items = rcall("LRANGE", KEYS[4] , 0, -1) +if checkItemInList(active_items, ARGV[1]) ~= nil then + return "active" +end +local wait_items = rcall("LRANGE", KEYS[5] , 0, -1) +if checkItemInList(wait_items, ARGV[1]) ~= nil then + return "waiting" +end +local paused_items = rcall("LRANGE", KEYS[6] , 0, -1) +if checkItemInList(paused_items, ARGV[1]) ~= nil then + return "waiting" +end +if rcall("ZSCORE", KEYS[7], ARGV[1]) then + return "waiting-children" +end +return "unknown" +`; +var getState = { + name: "getState", + content: content21, + keys: 8 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/getStateV2-8.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content22 = `--[[ + Get a job state + Input: + KEYS[1] 'completed' key, + KEYS[2] 'failed' key + KEYS[3] 'delayed' key + KEYS[4] 'active' key + KEYS[5] 'wait' key + KEYS[6] 'paused' key + KEYS[7] 'waiting-children' key + KEYS[8] 'prioritized' key + ARGV[1] job id + Output: + 'completed' + 'failed' + 'delayed' + 'active' + 'waiting' + 'waiting-children' + 'unknown' +]] +local rcall = redis.call +if rcall("ZSCORE", KEYS[1], ARGV[1]) then + return "completed" +end +if rcall("ZSCORE", KEYS[2], ARGV[1]) then + return "failed" +end +if rcall("ZSCORE", KEYS[3], ARGV[1]) then + return "delayed" +end +if rcall("ZSCORE", KEYS[8], ARGV[1]) then + return "prioritized" +end +if rcall("LPOS", KEYS[4] , ARGV[1]) then + return "active" +end +if rcall("LPOS", KEYS[5] , ARGV[1]) then + return "waiting" +end +if rcall("LPOS", KEYS[6] , ARGV[1]) then + return "waiting" +end +if rcall("ZSCORE", KEYS[7] , ARGV[1]) then + return "waiting-children" +end +return "unknown" +`; +var getStateV2 = { + name: "getStateV2", + content: content22, + keys: 8 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/isFinished-3.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content23 = `--[[ + Checks if a job is finished (.i.e. is in the completed or failed set) + Input: + KEYS[1] completed key + KEYS[2] failed key + KEYS[3] job key + ARGV[1] job id + ARGV[2] return value? + Output: + 0 - Not finished. + 1 - Completed. + 2 - Failed. + -1 - Missing job. +]] +local rcall = redis.call +if rcall("EXISTS", KEYS[3]) ~= 1 then + if ARGV[2] == "1" then + return {-1,"Missing key for job " .. KEYS[3] .. ". isFinished"} + end + return -1 +end +if rcall("ZSCORE", KEYS[1], ARGV[1]) then + if ARGV[2] == "1" then + local returnValue = rcall("HGET", KEYS[3], "returnvalue") + return {1,returnValue} + end + return 1 +end +if rcall("ZSCORE", KEYS[2], ARGV[1]) then + if ARGV[2] == "1" then + local failedReason = rcall("HGET", KEYS[3], "failedReason") + return {2,failedReason} + end + return 2 +end +if ARGV[2] == "1" then + return {0} +end +return 0 +`; +var isFinished = { + name: "isFinished", + content: content23, + keys: 3 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/isJobInList-1.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content24 = `--[[ + Checks if job is in a given list. + Input: + KEYS[1] + ARGV[1] + Output: + 1 if element found in the list. +]] +-- Includes +--[[ + Functions to check if a item belongs to a list. +]] +local function checkItemInList(list, item) + for _, v in pairs(list) do + if v == item then + return 1 + end + end + return nil +end +local items = redis.call("LRANGE", KEYS[1] , 0, -1) +return checkItemInList(items, ARGV[1]) +`; +var isJobInList = { + name: "isJobInList", + content: content24, + keys: 1 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/isMaxed-2.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content25 = `--[[ + Checks if queue is maxed. + Input: + KEYS[1] meta key + KEYS[2] active key + Output: + 1 if element found in the list. +]] +local rcall = redis.call +-- Includes +--[[ + Function to check if queue is maxed or not. +]] +local function isQueueMaxed(queueMetaKey, activeKey) + local maxConcurrency = rcall("HGET", queueMetaKey, "concurrency") + if maxConcurrency then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(maxConcurrency) then + return true + end + end + return false +end +return isQueueMaxed(KEYS[1], KEYS[2]) +`; +var isMaxed = { + name: "isMaxed", + content: content25, + keys: 2 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/moveJobFromActiveToWait-9.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content26 = `--[[ + Function to move job from active state to wait. + Input: + KEYS[1] active key + KEYS[2] wait key + KEYS[3] stalled key + KEYS[4] paused key + KEYS[5] meta key + KEYS[6] limiter key + KEYS[7] prioritized key + KEYS[8] marker key + KEYS[9] event key + ARGV[1] job id + ARGV[2] lock token + ARGV[3] job id key +]] +local rcall = redis.call +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to push back job considering priority in front of same prioritized jobs. +]] +local function pushBackJobWithPriority(prioritizedKey, priority, jobId) + -- in order to put it at front of same prioritized jobs + -- we consider prioritized counter as 0 + local score = priority * 0x100000000 + rcall("ZADD", prioritizedKey, score, jobId) +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function removeLock(jobKey, stalledKey, token, jobId) + if token ~= "0" then + local lockKey = jobKey .. ':lock' + local lockToken = rcall("GET", lockKey) + if lockToken == token then + rcall("DEL", lockKey) + rcall("SREM", stalledKey, jobId) + else + if lockToken then + -- Lock exists but token does not match + return -6 + else + -- Lock is missing completely + return -2 + end + end + end + return 0 +end +local jobId = ARGV[1] +local token = ARGV[2] +local jobKey = ARGV[3] +if rcall("EXISTS", jobKey) == 0 then + return -1 +end +local errorCode = removeLock(jobKey, KEYS[3], token, jobId) +if errorCode < 0 then + return errorCode +end +local metaKey = KEYS[5] +local removed = rcall("LREM", KEYS[1], 1, jobId) +if removed > 0 then + local target, isPausedOrMaxed = getTargetQueueList(metaKey, KEYS[1], KEYS[2], KEYS[4]) + local priority = tonumber(rcall("HGET", ARGV[3], "priority")) or 0 + if priority > 0 then + pushBackJobWithPriority(KEYS[7], priority, jobId) + else + addJobInTargetList(target, KEYS[8], "RPUSH", isPausedOrMaxed, jobId) + end + local maxEvents = getOrSetMaxEvents(metaKey) + -- Emit waiting event + rcall("XADD", KEYS[9], "MAXLEN", "~", maxEvents, "*", "event", "waiting", + "jobId", jobId, "prev", "active") +end +local pttl = rcall("PTTL", KEYS[6]) +if pttl > 0 then + return pttl +else + return 0 +end +`; +var moveJobFromActiveToWait = { + name: "moveJobFromActiveToWait", + content: content26, + keys: 9 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/moveJobsToWait-8.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content27 = `--[[ + Move completed, failed or delayed jobs to wait. + Note: Does not support jobs with priorities. + Input: + KEYS[1] base key + KEYS[2] events stream + KEYS[3] state key (failed, completed, delayed) + KEYS[4] 'wait' + KEYS[5] 'paused' + KEYS[6] 'meta' + KEYS[7] 'active' + KEYS[8] 'marker' + ARGV[1] count + ARGV[2] timestamp + ARGV[3] prev state + Output: + 1 means the operation is not completed + 0 means the operation is completed +]] +local maxCount = tonumber(ARGV[1]) +local timestamp = tonumber(ARGV[2]) +local rcall = redis.call; +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +--[[ + Function to loop in batches. + Just a bit of warning, some commands as ZREM + could receive a maximum of 7000 parameters per call. +]] +local function batches(n, batchSize) + local i = 0 + return function() + local from = i * batchSize + 1 + i = i + 1 + if (from <= n) then + local to = math.min(from + batchSize - 1, n) + return from, to + end + end +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local metaKey = KEYS[6] +local target, isPausedOrMaxed = getTargetQueueList(metaKey, KEYS[7], KEYS[4], KEYS[5]) +local jobs = rcall('ZRANGEBYSCORE', KEYS[3], 0, timestamp, 'LIMIT', 0, maxCount) +if (#jobs > 0) then + if ARGV[3] == "failed" then + for i, key in ipairs(jobs) do + local jobKey = KEYS[1] .. key + rcall("HDEL", jobKey, "finishedOn", "processedOn", "failedReason") + end + elseif ARGV[3] == "completed" then + for i, key in ipairs(jobs) do + local jobKey = KEYS[1] .. key + rcall("HDEL", jobKey, "finishedOn", "processedOn", "returnvalue") + end + end + local maxEvents = getOrSetMaxEvents(metaKey) + for i, key in ipairs(jobs) do + -- Emit waiting event + rcall("XADD", KEYS[2], "MAXLEN", "~", maxEvents, "*", "event", + "waiting", "jobId", key, "prev", ARGV[3]); + end + for from, to in batches(#jobs, 7000) do + rcall("ZREM", KEYS[3], unpack(jobs, from, to)) + rcall("LPUSH", target, unpack(jobs, from, to)) + end + addBaseMarkerIfNeeded(KEYS[8], isPausedOrMaxed) +end +maxCount = maxCount - #jobs +if (maxCount <= 0) then return 1 end +return 0 +`; +var moveJobsToWait = { + name: "moveJobsToWait", + content: content27, + keys: 8 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/moveStalledJobsToWait-8.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content28 = `--[[ + Move stalled jobs to wait. + Input: + KEYS[1] 'stalled' (SET) + KEYS[2] 'wait', (LIST) + KEYS[3] 'active', (LIST) + KEYS[4] 'stalled-check', (KEY) + KEYS[5] 'meta', (KEY) + KEYS[6] 'paused', (LIST) + KEYS[7] 'marker' + KEYS[8] 'event stream' (STREAM) + ARGV[1] Max stalled job count + ARGV[2] queue.toKey('') + ARGV[3] timestamp + ARGV[4] max check time + Events: + 'stalled' with stalled job id. +]] +local rcall = redis.call +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to loop in batches. + Just a bit of warning, some commands as ZREM + could receive a maximum of 7000 parameters per call. +]] +local function batches(n, batchSize) + local i = 0 + return function() + local from = i * batchSize + 1 + i = i + 1 + if (from <= n) then + local to = math.min(from + batchSize - 1, n) + return from, to + end + end +end +--[[ + Function to move job to wait to be picked up by a waiting worker. +]] +-- Includes +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function moveJobToWait(metaKey, activeKey, waitKey, pausedKey, markerKey, eventStreamKey, + jobId, pushCmd) + local target, isPausedOrMaxed = getTargetQueueList(metaKey, activeKey, waitKey, pausedKey) + addJobInTargetList(target, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall("XADD", eventStreamKey, "*", "event", "waiting", "jobId", jobId, 'prev', 'active') +end +--[[ + Function to trim events, default 10000. +]] +-- Includes +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +local function trimEvents(metaKey, eventStreamKey) + local maxEvents = getOrSetMaxEvents(metaKey) + if maxEvents then + rcall("XTRIM", eventStreamKey, "MAXLEN", "~", maxEvents) + else + rcall("XTRIM", eventStreamKey, "MAXLEN", "~", 10000) + end +end +local stalledKey = KEYS[1] +local waitKey = KEYS[2] +local activeKey = KEYS[3] +local stalledCheckKey = KEYS[4] +local metaKey = KEYS[5] +local pausedKey = KEYS[6] +local markerKey = KEYS[7] +local eventStreamKey = KEYS[8] +local maxStalledJobCount = tonumber(ARGV[1]) +local queueKeyPrefix = ARGV[2] +local timestamp = ARGV[3] +local maxCheckTime = ARGV[4] +if rcall("EXISTS", stalledCheckKey) == 1 then + return {} +end +rcall("SET", stalledCheckKey, timestamp, "PX", maxCheckTime) +-- Trim events before emiting them to avoid trimming events emitted in this script +trimEvents(metaKey, eventStreamKey) +-- Move all stalled jobs to wait +local stalling = rcall('SMEMBERS', stalledKey) +local stalled = {} +if (#stalling > 0) then + rcall('DEL', stalledKey) + -- Remove from active list + for i, jobId in ipairs(stalling) do + -- Markers in waitlist DEPRECATED in v5: Remove in v6. + if string.sub(jobId, 1, 2) == "0:" then + -- If the jobId is a delay marker ID we just remove it. + rcall("LREM", activeKey, 1, jobId) + else + local jobKey = queueKeyPrefix .. jobId + -- Check that the lock is also missing, then we can handle this job as really stalled. + if (rcall("EXISTS", jobKey .. ":lock") == 0) then + -- Remove from the active queue. + local removed = rcall("LREM", activeKey, 1, jobId) + if (removed > 0) then + -- If this job has been stalled too many times, such as if it crashes the worker, then fail it. + local stalledCount = rcall("HINCRBY", jobKey, "stc", 1) + -- Check if this is a repeatable job by looking at job options + local jobOpts = rcall("HGET", jobKey, "opts") + local isRepeatableJob = false + if jobOpts then + local opts = cjson.decode(jobOpts) + if opts and opts["repeat"] then + isRepeatableJob = true + end + end + -- Only fail job if it exceeds stall limit AND is not a repeatable job + if stalledCount > maxStalledJobCount and not isRepeatableJob then + local failedReason = "job stalled more than allowable limit" + rcall("HSET", jobKey, "defa", failedReason) + end + moveJobToWait(metaKey, activeKey, waitKey, pausedKey, markerKey, eventStreamKey, jobId, + "RPUSH") + -- Emit the stalled event + rcall("XADD", eventStreamKey, "*", "event", "stalled", "jobId", jobId) + table.insert(stalled, jobId) + end + end + end + end +end +-- Mark potentially stalled jobs +local active = rcall('LRANGE', activeKey, 0, -1) +if (#active > 0) then + for from, to in batches(#active, 7000) do + rcall('SADD', stalledKey, unpack(active, from, to)) + end +end +return stalled +`; +var moveStalledJobsToWait = { + name: "moveStalledJobsToWait", + content: content28, + keys: 8 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/moveToActive-11.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content29 = `--[[ + Move next job to be processed to active, lock it and fetch its data. The job + may be delayed, in that case we need to move it to the delayed set instead. + This operation guarantees that the worker owns the job during the lock + expiration time. The worker is responsible of keeping the lock fresh + so that no other worker picks this job again. + Input: + KEYS[1] wait key + KEYS[2] active key + KEYS[3] prioritized key + KEYS[4] stream events key + KEYS[5] stalled key + -- Rate limiting + KEYS[6] rate limiter key + KEYS[7] delayed key + -- Delayed jobs + KEYS[8] paused key + KEYS[9] meta key + KEYS[10] pc priority counter + -- Marker + KEYS[11] marker key + -- Arguments + ARGV[1] key prefix + ARGV[2] timestamp + ARGV[3] opts + opts - token - lock token + opts - lockDuration + opts - limiter + opts - name - worker name +]] +local rcall = redis.call +local waitKey = KEYS[1] +local activeKey = KEYS[2] +local eventStreamKey = KEYS[4] +local rateLimiterKey = KEYS[6] +local delayedKey = KEYS[7] +local opts = cmsgpack.unpack(ARGV[3]) +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +--[[ + Function to get current rate limit ttl. +]] +local function getRateLimitTTL(maxJobs, rateLimiterKey) + if maxJobs and maxJobs <= tonumber(rcall("GET", rateLimiterKey) or 0) then + local pttl = rcall("PTTL", rateLimiterKey) + if pttl == 0 then + rcall("DEL", rateLimiterKey) + end + if pttl > 0 then + return pttl + end + end + return 0 +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to move job from prioritized state to active. +]] +local function moveJobFromPrioritizedToActive(priorityKey, activeKey, priorityCounterKey) + local prioritizedJob = rcall("ZPOPMIN", priorityKey) + if #prioritizedJob > 0 then + rcall("LPUSH", activeKey, prioritizedJob[1]) + return prioritizedJob[1] + else + rcall("DEL", priorityCounterKey) + end +end +--[[ + Function to move job from wait state to active. + Input: + opts - token - lock token + opts - lockDuration + opts - limiter +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function prepareJobForProcessing(keyPrefix, rateLimiterKey, eventStreamKey, + jobId, processedOn, maxJobs, limiterDuration, markerKey, opts) + local jobKey = keyPrefix .. jobId + -- Check if we need to perform rate limiting. + if maxJobs then + local jobCounter = tonumber(rcall("INCR", rateLimiterKey)) + if jobCounter == 1 then + local integerDuration = math.floor(math.abs(limiterDuration)) + rcall("PEXPIRE", rateLimiterKey, integerDuration) + end + end + -- get a lock + if opts['token'] ~= "0" then + local lockKey = jobKey .. ':lock' + rcall("SET", lockKey, opts['token'], "PX", opts['lockDuration']) + end + local optionalValues = {} + if opts['name'] then + -- Set "processedBy" field to the worker name + table.insert(optionalValues, "pb") + table.insert(optionalValues, opts['name']) + end + rcall("XADD", eventStreamKey, "*", "event", "active", "jobId", jobId, "prev", "waiting") + rcall("HMSET", jobKey, "processedOn", processedOn, unpack(optionalValues)) + rcall("HINCRBY", jobKey, "ats", 1) + addBaseMarkerIfNeeded(markerKey, false) + -- rate limit delay must be 0 in this case to prevent adding more delay + -- when job that is moved to active needs to be processed + return {rcall("HGETALL", jobKey), jobId, 0, 0} -- get job data +end +--[[ + Updates the delay set, by moving delayed jobs that should + be processed now to "wait". + Events: + 'waiting' +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +-- Try to get as much as 1000 jobs at once +local function promoteDelayedJobs(delayedKey, markerKey, targetKey, prioritizedKey, + eventStreamKey, prefix, timestamp, priorityCounterKey, isPaused) + local jobs = rcall("ZRANGEBYSCORE", delayedKey, 0, (timestamp + 1) * 0x1000 - 1, "LIMIT", 0, 1000) + if (#jobs > 0) then + rcall("ZREM", delayedKey, unpack(jobs)) + for _, jobId in ipairs(jobs) do + local jobKey = prefix .. jobId + local priority = + tonumber(rcall("HGET", jobKey, "priority")) or 0 + if priority == 0 then + -- LIFO or FIFO + rcall("LPUSH", targetKey, jobId) + else + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + end + -- Emit waiting event + rcall("XADD", eventStreamKey, "*", "event", "waiting", "jobId", + jobId, "prev", "delayed") + rcall("HSET", jobKey, "delay", 0) + end + addBaseMarkerIfNeeded(markerKey, isPaused) + end +end +local target, isPausedOrMaxed, rateLimitMax, rateLimitDuration = getTargetQueueList(KEYS[9], + activeKey, waitKey, KEYS[8]) +-- Check if there are delayed jobs that we can move to wait. +local markerKey = KEYS[11] +promoteDelayedJobs(delayedKey, markerKey, target, KEYS[3], eventStreamKey, ARGV[1], + ARGV[2], KEYS[10], isPausedOrMaxed) +local maxJobs = tonumber(rateLimitMax or (opts['limiter'] and opts['limiter']['max'])) +local expireTime = getRateLimitTTL(maxJobs, rateLimiterKey) +-- Check if we are rate limited first. +if expireTime > 0 then return {0, 0, expireTime, 0} end +-- paused or maxed queue +if isPausedOrMaxed then return {0, 0, 0, 0} end +local limiterDuration = (opts['limiter'] and opts['limiter']['duration']) or rateLimitDuration +-- no job ID, try non-blocking move from wait to active +local jobId = rcall("RPOPLPUSH", waitKey, activeKey) +-- Markers in waitlist DEPRECATED in v5: Will be completely removed in v6. +if jobId and string.sub(jobId, 1, 2) == "0:" then + rcall("LREM", activeKey, 1, jobId) + jobId = rcall("RPOPLPUSH", waitKey, activeKey) +end +if jobId then + return prepareJobForProcessing(ARGV[1], rateLimiterKey, eventStreamKey, jobId, ARGV[2], + maxJobs, limiterDuration, markerKey, opts) +else + jobId = moveJobFromPrioritizedToActive(KEYS[3], activeKey, KEYS[10]) + if jobId then + return prepareJobForProcessing(ARGV[1], rateLimiterKey, eventStreamKey, jobId, ARGV[2], + maxJobs, limiterDuration, markerKey, opts) + end +end +-- Return the timestamp for the next delayed job if any. +local nextTimestamp = getNextDelayedTimestamp(delayedKey) +if nextTimestamp ~= nil then return {0, 0, 0, nextTimestamp} end +return {0, 0, 0, 0} +`; +var moveToActive = { + name: "moveToActive", + content: content29, + keys: 11 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/moveToDelayed-8.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content30 = `--[[ + Moves job from active to delayed set. + Input: + KEYS[1] marker key + KEYS[2] active key + KEYS[3] prioritized key + KEYS[4] delayed key + KEYS[5] job key + KEYS[6] events stream + KEYS[7] meta key + KEYS[8] stalled key + ARGV[1] key prefix + ARGV[2] timestamp + ARGV[3] the id of the job + ARGV[4] queue token + ARGV[5] delay value + ARGV[6] skip attempt + ARGV[7] optional job fields to update + Output: + 0 - OK + -1 - Missing job. + -3 - Job not in active set. + Events: + - delayed key. +]] +local rcall = redis.call +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Bake in the job id first 12 bits into the timestamp + to guarantee correct execution order of delayed jobs + (up to 4096 jobs per given timestamp or 4096 jobs apart per timestamp) + WARNING: Jobs that are so far apart that they wrap around will cause FIFO to fail +]] +local function getDelayedScore(delayedKey, timestamp, delay) + local delayedTimestamp = (delay > 0 and (tonumber(timestamp) + delay)) or tonumber(timestamp) + local minScore = delayedTimestamp * 0x1000 + local maxScore = (delayedTimestamp + 1 ) * 0x1000 - 1 + local result = rcall("ZREVRANGEBYSCORE", delayedKey, maxScore, + minScore, "WITHSCORES","LIMIT", 0, 1) + if #result then + local currentMaxScore = tonumber(result[2]) + if currentMaxScore ~= nil then + if currentMaxScore >= maxScore then + return maxScore, delayedTimestamp + else + return currentMaxScore + 1, delayedTimestamp + end + end + end + return minScore, delayedTimestamp +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +local function removeLock(jobKey, stalledKey, token, jobId) + if token ~= "0" then + local lockKey = jobKey .. ':lock' + local lockToken = rcall("GET", lockKey) + if lockToken == token then + rcall("DEL", lockKey) + rcall("SREM", stalledKey, jobId) + else + if lockToken then + -- Lock exists but token does not match + return -6 + else + -- Lock is missing completely + return -2 + end + end + end + return 0 +end +--[[ + Function to update a bunch of fields in a job. +]] +local function updateJobFields(jobKey, msgpackedFields) + if msgpackedFields and #msgpackedFields > 0 then + local fieldsToUpdate = cmsgpack.unpack(msgpackedFields) + if fieldsToUpdate then + rcall("HMSET", jobKey, unpack(fieldsToUpdate)) + end + end +end +local jobKey = KEYS[5] +local metaKey = KEYS[7] +local token = ARGV[4] +if rcall("EXISTS", jobKey) == 1 then + local errorCode = removeLock(jobKey, KEYS[8], token, ARGV[3]) + if errorCode < 0 then + return errorCode + end + updateJobFields(jobKey, ARGV[7]) + local delayedKey = KEYS[4] + local jobId = ARGV[3] + local delay = tonumber(ARGV[5]) + local numRemovedElements = rcall("LREM", KEYS[2], -1, jobId) + if numRemovedElements < 1 then return -3 end + local score, delayedTimestamp = getDelayedScore(delayedKey, ARGV[2], delay) + if ARGV[6] == "0" then + rcall("HINCRBY", jobKey, "atm", 1) + end + rcall("HSET", jobKey, "delay", ARGV[5]) + local maxEvents = getOrSetMaxEvents(metaKey) + rcall("ZADD", delayedKey, score, jobId) + rcall("XADD", KEYS[6], "MAXLEN", "~", maxEvents, "*", "event", "delayed", + "jobId", jobId, "delay", delayedTimestamp) + -- Check if we need to push a marker job to wake up sleeping workers. + local markerKey = KEYS[1] + addDelayMarkerIfNeeded(markerKey, delayedKey) + return 0 +else + return -1 +end +`; +var moveToDelayed = { + name: "moveToDelayed", + content: content30, + keys: 8 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/moveToFinished-14.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content31 = `--[[ + Move job from active to a finished status (completed o failed) + A job can only be moved to completed if it was active. + The job must be locked before it can be moved to a finished status, + and the lock must be released in this script. + Input: + KEYS[1] wait key + KEYS[2] active key + KEYS[3] prioritized key + KEYS[4] event stream key + KEYS[5] stalled key + -- Rate limiting + KEYS[6] rate limiter key + KEYS[7] delayed key + KEYS[8] paused key + KEYS[9] meta key + KEYS[10] pc priority counter + KEYS[11] completed/failed key + KEYS[12] jobId key + KEYS[13] metrics key + KEYS[14] marker key + ARGV[1] jobId + ARGV[2] timestamp + ARGV[3] msg property returnvalue / failedReason + ARGV[4] return value / failed reason + ARGV[5] target (completed/failed) + ARGV[6] fetch next? + ARGV[7] keys prefix + ARGV[8] opts + ARGV[9] job fields to update + opts - token - lock token + opts - keepJobs + opts - lockDuration - lock duration in milliseconds + opts - attempts max attempts + opts - maxMetricsSize + opts - fpof - fail parent on fail + opts - cpof - continue parent on fail + opts - idof - ignore dependency on fail + opts - rdof - remove dependency on fail + opts - name - worker name + Output: + 0 OK + -1 Missing key. + -2 Missing lock. + -3 Job not in active set + -4 Job has pending children + -6 Lock is not owned by this client + -9 Job has failed children + Events: + 'completed/failed' +]] +local rcall = redis.call +--- Includes +--[[ + Functions to collect metrics based on a current and previous count of jobs. + Granualarity is fixed at 1 minute. +]] +--[[ + Function to loop in batches. + Just a bit of warning, some commands as ZREM + could receive a maximum of 7000 parameters per call. +]] +local function batches(n, batchSize) + local i = 0 + return function() + local from = i * batchSize + 1 + i = i + 1 + if (from <= n) then + local to = math.min(from + batchSize - 1, n) + return from, to + end + end +end +local function collectMetrics(metaKey, dataPointsList, maxDataPoints, + timestamp) + -- Increment current count + local count = rcall("HINCRBY", metaKey, "count", 1) - 1 + -- Compute how many data points we need to add to the list, N. + local prevTS = rcall("HGET", metaKey, "prevTS") + if not prevTS then + -- If prevTS is nil, set it to the current timestamp + rcall("HSET", metaKey, "prevTS", timestamp, "prevCount", 0) + return + end + local N = math.min(math.floor(timestamp / 60000) - math.floor(prevTS / 60000), tonumber(maxDataPoints)) + if N > 0 then + local delta = count - rcall("HGET", metaKey, "prevCount") + -- If N > 1, add N-1 zeros to the list + if N > 1 then + local points = {} + points[1] = delta + for i = 2, N do + points[i] = 0 + end + for from, to in batches(#points, 7000) do + rcall("LPUSH", dataPointsList, unpack(points, from, to)) + end + else + -- LPUSH delta to the list + rcall("LPUSH", dataPointsList, delta) + end + -- LTRIM to keep list to its max size + rcall("LTRIM", dataPointsList, 0, maxDataPoints - 1) + -- update prev count with current count + rcall("HSET", metaKey, "prevCount", count, "prevTS", timestamp) + end +end +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +--[[ + Function to get current rate limit ttl. +]] +local function getRateLimitTTL(maxJobs, rateLimiterKey) + if maxJobs and maxJobs <= tonumber(rcall("GET", rateLimiterKey) or 0) then + local pttl = rcall("PTTL", rateLimiterKey) + if pttl == 0 then + rcall("DEL", rateLimiterKey) + end + if pttl > 0 then + return pttl + end + end + return 0 +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to move job from prioritized state to active. +]] +local function moveJobFromPrioritizedToActive(priorityKey, activeKey, priorityCounterKey) + local prioritizedJob = rcall("ZPOPMIN", priorityKey) + if #prioritizedJob > 0 then + rcall("LPUSH", activeKey, prioritizedJob[1]) + return prioritizedJob[1] + else + rcall("DEL", priorityCounterKey) + end +end +--[[ + Function to recursively move from waitingChildren to failed. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) + if no pending dependencies. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) if needed. +]] +-- Includes +--[[ + Move parent to a wait status (wait, prioritized or delayed) +]] +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check if queue is paused or maxed + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePausedOrMaxed(queueMetaKey, activeKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency") + if queueAttributes[1] then + return true + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + return activeCount >= tonumber(queueAttributes[2]) + end + end + return false +end +local function moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + local parentWaitKey = parentQueueKey .. ":wait" + local parentPausedKey = parentQueueKey .. ":paused" + local parentActiveKey = parentQueueKey .. ":active" + local parentMetaKey = parentQueueKey .. ":meta" + local parentMarkerKey = parentQueueKey .. ":marker" + local jobAttributes = rcall("HMGET", parentKey, "priority", "delay") + local priority = tonumber(jobAttributes[1]) or 0 + local delay = tonumber(jobAttributes[2]) or 0 + if delay > 0 then + local delayedTimestamp = tonumber(timestamp) + delay + local score = delayedTimestamp * 0x1000 + local parentDelayedKey = parentQueueKey .. ":delayed" + rcall("ZADD", parentDelayedKey, score, parentId) + rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed", "jobId", parentId, "delay", + delayedTimestamp) + addDelayMarkerIfNeeded(parentMarkerKey, parentDelayedKey) + else + if priority == 0 then + local parentTarget, isParentPausedOrMaxed = getTargetQueueList(parentMetaKey, parentActiveKey, + parentWaitKey, parentPausedKey) + addJobInTargetList(parentTarget, parentMarkerKey, "RPUSH", isParentPausedOrMaxed, parentId) + else + local isPausedOrMaxed = isQueuePausedOrMaxed(parentMetaKey, parentActiveKey) + addJobWithPriority(parentMarkerKey, parentQueueKey .. ":prioritized", priority, parentId, + parentQueueKey .. ":pc", isPausedOrMaxed) + end + rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting", "jobId", parentId, "prev", + "waiting-children") + end +end +local function moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + if rcall("EXISTS", parentKey) == 1 then + local parentWaitingChildrenKey = parentQueueKey .. ":waiting-children" + if rcall("ZSCORE", parentWaitingChildrenKey, parentId) then + rcall("ZREM", parentWaitingChildrenKey, parentId) + moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + end + end +end +local function moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, + parentId, timestamp) + local doNotHavePendingDependencies = rcall("SCARD", parentDependenciesKey) == 0 + if doNotHavePendingDependencies then + moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + end +end +local handleChildFailureAndMoveParentToWait = function (parentQueueKey, parentKey, parentId, jobIdKey, timestamp) + if rcall("EXISTS", parentKey) == 1 then + local parentWaitingChildrenKey = parentQueueKey .. ":waiting-children" + local parentDelayedKey = parentQueueKey .. ":delayed" + local parentWaitingChildrenOrDelayedKey + if rcall("ZSCORE", parentWaitingChildrenKey, parentId) then + parentWaitingChildrenOrDelayedKey = parentWaitingChildrenKey + elseif rcall("ZSCORE", parentDelayedKey, parentId) then + parentWaitingChildrenOrDelayedKey = parentDelayedKey + rcall("HSET", parentKey, "delay", 0) + end + if parentWaitingChildrenOrDelayedKey then + rcall("ZREM", parentWaitingChildrenOrDelayedKey, parentId) + local deferredFailure = "child " .. jobIdKey .. " failed" + rcall("HSET", parentKey, "defa", deferredFailure) + moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + else + if not rcall("ZSCORE", parentQueueKey .. ":failed", parentId) then + local deferredFailure = "child " .. jobIdKey .. " failed" + rcall("HSET", parentKey, "defa", deferredFailure) + end + end + end +end +local moveChildFromDependenciesIfNeeded = function (rawParentData, childKey, failedReason, timestamp) + if rawParentData then + local parentData = cjson.decode(rawParentData) + local parentKey = parentData['queueKey'] .. ':' .. parentData['id'] + local parentDependenciesChildrenKey = parentKey .. ":dependencies" + if parentData['fpof'] then + if rcall("SREM", parentDependenciesChildrenKey, childKey) == 1 then + local parentUnsuccessfulChildrenKey = parentKey .. ":unsuccessful" + rcall("ZADD", parentUnsuccessfulChildrenKey, timestamp, childKey) + handleChildFailureAndMoveParentToWait( + parentData['queueKey'], + parentKey, + parentData['id'], + childKey, + timestamp + ) + end + elseif parentData['cpof'] then + if rcall("SREM", parentDependenciesChildrenKey, childKey) == 1 then + local parentFailedChildrenKey = parentKey .. ":failed" + rcall("HSET", parentFailedChildrenKey, childKey, failedReason) + moveParentToWaitIfNeeded(parentData['queueKey'], parentKey, parentData['id'], timestamp) + end + elseif parentData['idof'] or parentData['rdof'] then + if rcall("SREM", parentDependenciesChildrenKey, childKey) == 1 then + moveParentToWaitIfNoPendingDependencies(parentData['queueKey'], parentDependenciesChildrenKey, + parentKey, parentData['id'], timestamp) + if parentData['idof'] then + local parentFailedChildrenKey = parentKey .. ":failed" + rcall("HSET", parentFailedChildrenKey, childKey, failedReason) + end + end + end + end +end +--[[ + Function to move job from wait state to active. + Input: + opts - token - lock token + opts - lockDuration + opts - limiter +]] +-- Includes +local function prepareJobForProcessing(keyPrefix, rateLimiterKey, eventStreamKey, + jobId, processedOn, maxJobs, limiterDuration, markerKey, opts) + local jobKey = keyPrefix .. jobId + -- Check if we need to perform rate limiting. + if maxJobs then + local jobCounter = tonumber(rcall("INCR", rateLimiterKey)) + if jobCounter == 1 then + local integerDuration = math.floor(math.abs(limiterDuration)) + rcall("PEXPIRE", rateLimiterKey, integerDuration) + end + end + -- get a lock + if opts['token'] ~= "0" then + local lockKey = jobKey .. ':lock' + rcall("SET", lockKey, opts['token'], "PX", opts['lockDuration']) + end + local optionalValues = {} + if opts['name'] then + -- Set "processedBy" field to the worker name + table.insert(optionalValues, "pb") + table.insert(optionalValues, opts['name']) + end + rcall("XADD", eventStreamKey, "*", "event", "active", "jobId", jobId, "prev", "waiting") + rcall("HMSET", jobKey, "processedOn", processedOn, unpack(optionalValues)) + rcall("HINCRBY", jobKey, "ats", 1) + addBaseMarkerIfNeeded(markerKey, false) + -- rate limit delay must be 0 in this case to prevent adding more delay + -- when job that is moved to active needs to be processed + return {rcall("HGETALL", jobKey), jobId, 0, 0} -- get job data +end +--[[ + Updates the delay set, by moving delayed jobs that should + be processed now to "wait". + Events: + 'waiting' +]] +-- Includes +-- Try to get as much as 1000 jobs at once +local function promoteDelayedJobs(delayedKey, markerKey, targetKey, prioritizedKey, + eventStreamKey, prefix, timestamp, priorityCounterKey, isPaused) + local jobs = rcall("ZRANGEBYSCORE", delayedKey, 0, (timestamp + 1) * 0x1000 - 1, "LIMIT", 0, 1000) + if (#jobs > 0) then + rcall("ZREM", delayedKey, unpack(jobs)) + for _, jobId in ipairs(jobs) do + local jobKey = prefix .. jobId + local priority = + tonumber(rcall("HGET", jobKey, "priority")) or 0 + if priority == 0 then + -- LIFO or FIFO + rcall("LPUSH", targetKey, jobId) + else + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + end + -- Emit waiting event + rcall("XADD", eventStreamKey, "*", "event", "waiting", "jobId", + jobId, "prev", "delayed") + rcall("HSET", jobKey, "delay", 0) + end + addBaseMarkerIfNeeded(markerKey, isPaused) + end +end +--[[ + Function to remove deduplication key if needed + when a job is moved to completed or failed states. +]] +local function removeDeduplicationKeyIfNeededOnFinalization(prefixKey, + deduplicationId, jobId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local pttl = rcall("PTTL", deduplicationKey) + if pttl == 0 then + return rcall("DEL", deduplicationKey) + end + if pttl == -1 then + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + return rcall("DEL", deduplicationKey) + end + end + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +--[[ + Functions to remove jobs by max age. +]] +-- Includes +--[[ + Function to remove job. +]] +-- Includes +--[[ + Function to remove deduplication key if needed + when a job is being removed. +]] +local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey, + jobId, deduplicationId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + return rcall("DEL", deduplicationKey) + end + end +end +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +local function removeJob(jobId, hard, baseKey, shouldRemoveDeduplicationKey) + local jobKey = baseKey .. jobId + removeParentDependencyKey(jobKey, hard, nil, baseKey) + if shouldRemoveDeduplicationKey then + local deduplicationId = rcall("HGET", jobKey, "deid") + removeDeduplicationKeyIfNeededOnRemoval(baseKey, jobId, deduplicationId) + end + removeJobKeys(jobKey) +end +local function removeJobsByMaxAge(timestamp, maxAge, targetSet, prefix, maxLimit) + local start = timestamp - maxAge * 1000 + local jobIds = rcall("ZREVRANGEBYSCORE", targetSet, start, "-inf", "LIMIT", 0, maxLimit) + for i, jobId in ipairs(jobIds) do + removeJob(jobId, false, prefix, false --[[remove debounce key]]) + end + if #jobIds > 0 then + if #jobIds < maxLimit then + rcall("ZREMRANGEBYSCORE", targetSet, "-inf", start) + else + for from, to in batches(#jobIds, 7000) do + rcall("ZREM", targetSet, unpack(jobIds, from, to)) + end + end + end +end +--[[ + Functions to remove jobs by max count. +]] +-- Includes +local function removeJobsByMaxCount(maxCount, targetSet, prefix) + local start = maxCount + local jobIds = rcall("ZREVRANGE", targetSet, start, -1) + for i, jobId in ipairs(jobIds) do + removeJob(jobId, false, prefix, false --[[remove debounce key]]) + end + rcall("ZREMRANGEBYRANK", targetSet, 0, -(maxCount + 1)) +end +local function removeLock(jobKey, stalledKey, token, jobId) + if token ~= "0" then + local lockKey = jobKey .. ':lock' + local lockToken = rcall("GET", lockKey) + if lockToken == token then + rcall("DEL", lockKey) + rcall("SREM", stalledKey, jobId) + else + if lockToken then + -- Lock exists but token does not match + return -6 + else + -- Lock is missing completely + return -2 + end + end + end + return 0 +end +--[[ + Function to trim events, default 10000. +]] +-- Includes +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +local function trimEvents(metaKey, eventStreamKey) + local maxEvents = getOrSetMaxEvents(metaKey) + if maxEvents then + rcall("XTRIM", eventStreamKey, "MAXLEN", "~", maxEvents) + else + rcall("XTRIM", eventStreamKey, "MAXLEN", "~", 10000) + end +end +--[[ + Validate and move or add dependencies to parent. +]] +-- Includes +local function updateParentDepsIfNeeded(parentKey, parentQueueKey, parentDependenciesKey, + parentId, jobIdKey, returnvalue, timestamp ) + local processedSet = parentKey .. ":processed" + rcall("HSET", processedSet, jobIdKey, returnvalue) + moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, parentId, timestamp) +end +--[[ + Function to update a bunch of fields in a job. +]] +local function updateJobFields(jobKey, msgpackedFields) + if msgpackedFields and #msgpackedFields > 0 then + local fieldsToUpdate = cmsgpack.unpack(msgpackedFields) + if fieldsToUpdate then + rcall("HMSET", jobKey, unpack(fieldsToUpdate)) + end + end +end +local jobIdKey = KEYS[12] +if rcall("EXISTS", jobIdKey) == 1 then -- Make sure job exists + -- Make sure it does not have pending dependencies + -- It must happen before removing lock + if ARGV[5] == "completed" then + if rcall("SCARD", jobIdKey .. ":dependencies") ~= 0 then + return -4 + end + if rcall("ZCARD", jobIdKey .. ":unsuccessful") ~= 0 then + return -9 + end + end + local opts = cmsgpack.unpack(ARGV[8]) + local token = opts['token'] + local errorCode = removeLock(jobIdKey, KEYS[5], token, ARGV[1]) + if errorCode < 0 then + return errorCode + end + updateJobFields(jobIdKey, ARGV[9]); + local attempts = opts['attempts'] + local maxMetricsSize = opts['maxMetricsSize'] + local maxCount = opts['keepJobs']['count'] + local maxAge = opts['keepJobs']['age'] + local maxLimit = opts['keepJobs']['limit'] or 1000 + local jobAttributes = rcall("HMGET", jobIdKey, "parentKey", "parent", "deid") + local parentKey = jobAttributes[1] or "" + local parentId = "" + local parentQueueKey = "" + if jobAttributes[2] then -- TODO: need to revisit this logic if it's still needed + local jsonDecodedParent = cjson.decode(jobAttributes[2]) + parentId = jsonDecodedParent['id'] + parentQueueKey = jsonDecodedParent['queueKey'] + end + local jobId = ARGV[1] + local timestamp = ARGV[2] + -- Remove from active list (if not active we shall return error) + local numRemovedElements = rcall("LREM", KEYS[2], -1, jobId) + if (numRemovedElements < 1) then + return -3 + end + local eventStreamKey = KEYS[4] + local metaKey = KEYS[9] + -- Trim events before emiting them to avoid trimming events emitted in this script + trimEvents(metaKey, eventStreamKey) + local prefix = ARGV[7] + removeDeduplicationKeyIfNeededOnFinalization(prefix, jobAttributes[3], jobId) + -- If job has a parent we need to + -- 1) remove this job id from parents dependencies + -- 2) move the job Id to parent "processed" set + -- 3) push the results into parent "results" list + -- 4) if parent's dependencies is empty, then move parent to "wait/paused". Note it may be a different queue!. + if parentId == "" and parentKey ~= "" then + parentId = getJobIdFromKey(parentKey) + parentQueueKey = getJobKeyPrefix(parentKey, ":" .. parentId) + end + if parentId ~= "" then + if ARGV[5] == "completed" then + local dependenciesSet = parentKey .. ":dependencies" + if rcall("SREM", dependenciesSet, jobIdKey) == 1 then + updateParentDepsIfNeeded(parentKey, parentQueueKey, dependenciesSet, parentId, jobIdKey, ARGV[4], + timestamp) + end + else + moveChildFromDependenciesIfNeeded(jobAttributes[2], jobIdKey, ARGV[4], timestamp) + end + end + local attemptsMade = rcall("HINCRBY", jobIdKey, "atm", 1) + -- Remove job? + if maxCount ~= 0 then + local targetSet = KEYS[11] + -- Add to complete/failed set + rcall("ZADD", targetSet, timestamp, jobId) + rcall("HSET", jobIdKey, ARGV[3], ARGV[4], "finishedOn", timestamp) + -- "returnvalue" / "failedReason" and "finishedOn" + if ARGV[5] == "failed" then + rcall("HDEL", jobIdKey, "defa") + end + -- Remove old jobs? + if maxAge ~= nil then + removeJobsByMaxAge(timestamp, maxAge, targetSet, prefix, maxLimit) + end + if maxCount ~= nil and maxCount > 0 then + removeJobsByMaxCount(maxCount, targetSet, prefix) + end + else + removeJobKeys(jobIdKey) + if parentKey ~= "" then + -- TODO: when a child is removed when finished, result or failure in parent + -- must not be deleted, those value references should be deleted when the parent + -- is deleted + removeParentDependencyKey(jobIdKey, false, parentKey, jobAttributes[3]) + end + end + rcall("XADD", eventStreamKey, "*", "event", ARGV[5], "jobId", jobId, ARGV[3], ARGV[4], "prev", "active") + if ARGV[5] == "failed" then + if tonumber(attemptsMade) >= tonumber(attempts) then + rcall("XADD", eventStreamKey, "*", "event", "retries-exhausted", "jobId", jobId, "attemptsMade", + attemptsMade) + end + end + -- Collect metrics + if maxMetricsSize ~= "" then + collectMetrics(KEYS[13], KEYS[13] .. ':data', maxMetricsSize, timestamp) + end + -- Try to get next job to avoid an extra roundtrip if the queue is not closing, + -- and not rate limited. + if (ARGV[6] == "1") then + local target, isPausedOrMaxed, rateLimitMax, rateLimitDuration = getTargetQueueList(metaKey, KEYS[2], + KEYS[1], KEYS[8]) + local markerKey = KEYS[14] + -- Check if there are delayed jobs that can be promoted + promoteDelayedJobs(KEYS[7], markerKey, target, KEYS[3], eventStreamKey, prefix, timestamp, KEYS[10], + isPausedOrMaxed) + local maxJobs = tonumber(rateLimitMax or (opts['limiter'] and opts['limiter']['max'])) + -- Check if we are rate limited first. + local expireTime = getRateLimitTTL(maxJobs, KEYS[6]) + if expireTime > 0 then + return {0, 0, expireTime, 0} + end + -- paused or maxed queue + if isPausedOrMaxed then + return {0, 0, 0, 0} + end + local limiterDuration = (opts['limiter'] and opts['limiter']['duration']) or rateLimitDuration + jobId = rcall("RPOPLPUSH", KEYS[1], KEYS[2]) + if jobId then + -- Markers in waitlist DEPRECATED in v5: Remove in v6. + if string.sub(jobId, 1, 2) == "0:" then + rcall("LREM", KEYS[2], 1, jobId) + -- If jobId is special ID 0:delay (delay greater than 0), then there is no job to process + -- but if ID is 0:0, then there is at least 1 prioritized job to process + if jobId == "0:0" then + jobId = moveJobFromPrioritizedToActive(KEYS[3], KEYS[2], KEYS[10]) + return prepareJobForProcessing(prefix, KEYS[6], eventStreamKey, jobId, timestamp, maxJobs, + limiterDuration, markerKey, opts) + end + else + return prepareJobForProcessing(prefix, KEYS[6], eventStreamKey, jobId, timestamp, maxJobs, + limiterDuration, markerKey, opts) + end + else + jobId = moveJobFromPrioritizedToActive(KEYS[3], KEYS[2], KEYS[10]) + if jobId then + return prepareJobForProcessing(prefix, KEYS[6], eventStreamKey, jobId, timestamp, maxJobs, + limiterDuration, markerKey, opts) + end + end + -- Return the timestamp for the next delayed job if any. + local nextTimestamp = getNextDelayedTimestamp(KEYS[7]) + if nextTimestamp ~= nil then + -- The result is guaranteed to be positive, since the + -- ZRANGEBYSCORE command would have return a job otherwise. + return {0, 0, 0, nextTimestamp} + end + end + local waitLen = rcall("LLEN", KEYS[1]) + if waitLen == 0 then + local activeLen = rcall("LLEN", KEYS[2]) + if activeLen == 0 then + local prioritizedLen = rcall("ZCARD", KEYS[3]) + if prioritizedLen == 0 then + rcall("XADD", eventStreamKey, "*", "event", "drained") + end + end + end + return 0 +else + return -1 +end +`; +var moveToFinished = { + name: "moveToFinished", + content: content31, + keys: 14 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/moveToWaitingChildren-7.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content32 = `--[[ + Moves job from active to waiting children set. + Input: + KEYS[1] active key + KEYS[2] wait-children key + KEYS[3] job key + KEYS[4] job dependencies key + KEYS[5] job unsuccessful key + KEYS[6] stalled key + KEYS[7] events key + ARGV[1] token + ARGV[2] child key + ARGV[3] timestamp + ARGV[4] jobId + ARGV[5] prefix + Output: + 0 - OK + 1 - There are not pending dependencies. + -1 - Missing job. + -2 - Missing lock + -3 - Job not in active set + -9 - Job has failed children +]] +local rcall = redis.call +local activeKey = KEYS[1] +local waitingChildrenKey = KEYS[2] +local jobKey = KEYS[3] +local jobDependenciesKey = KEYS[4] +local jobUnsuccessfulKey = KEYS[5] +local stalledKey = KEYS[6] +local eventStreamKey = KEYS[7] +local token = ARGV[1] +local timestamp = ARGV[3] +local jobId = ARGV[4] +--- Includes +local function removeLock(jobKey, stalledKey, token, jobId) + if token ~= "0" then + local lockKey = jobKey .. ':lock' + local lockToken = rcall("GET", lockKey) + if lockToken == token then + rcall("DEL", lockKey) + rcall("SREM", stalledKey, jobId) + else + if lockToken then + -- Lock exists but token does not match + return -6 + else + -- Lock is missing completely + return -2 + end + end + end + return 0 +end +local function removeJobFromActive(activeKey, stalledKey, jobKey, jobId, + token) + local errorCode = removeLock(jobKey, stalledKey, token, jobId) + if errorCode < 0 then + return errorCode + end + local numRemovedElements = rcall("LREM", activeKey, -1, jobId) + if numRemovedElements < 1 then + return -3 + end + return 0 +end +local function moveToWaitingChildren(activeKey, waitingChildrenKey, stalledKey, eventStreamKey, + jobKey, jobId, timestamp, token) + local errorCode = removeJobFromActive(activeKey, stalledKey, jobKey, jobId, token) + if errorCode < 0 then + return errorCode + end + local score = tonumber(timestamp) + rcall("ZADD", waitingChildrenKey, score, jobId) + rcall("XADD", eventStreamKey, "*", "event", "waiting-children", "jobId", jobId, 'prev', 'active') + return 0 +end +if rcall("EXISTS", jobKey) == 1 then + if rcall("ZCARD", jobUnsuccessfulKey) ~= 0 then + return -9 + else + if ARGV[2] ~= "" then + if rcall("SISMEMBER", jobDependenciesKey, ARGV[2]) ~= 0 then + return moveToWaitingChildren(activeKey, waitingChildrenKey, stalledKey, eventStreamKey, + jobKey, jobId, timestamp, token) + end + return 1 + else + if rcall("SCARD", jobDependenciesKey) ~= 0 then + return moveToWaitingChildren(activeKey, waitingChildrenKey, stalledKey, eventStreamKey, + jobKey, jobId, timestamp, token) + end + return 1 + end + end +end +return -1 +`; +var moveToWaitingChildren = { + name: "moveToWaitingChildren", + content: content32, + keys: 7 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/obliterate-2.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content33 = `--[[ + Completely obliterates a queue and all of its contents + This command completely destroys a queue including all of its jobs, current or past + leaving no trace of its existence. Since this script needs to iterate to find all the job + keys, consider that this call may be slow for very large queues. + The queue needs to be "paused" or it will return an error + If the queue has currently active jobs then the script by default will return error, + however this behaviour can be overrided using the 'force' option. + Input: + KEYS[1] meta + KEYS[2] base + ARGV[1] count + ARGV[2] force +]] +local maxCount = tonumber(ARGV[1]) +local baseKey = KEYS[2] +local rcall = redis.call +-- Includes +--[[ + Functions to remove jobs. +]] +-- Includes +--[[ + Function to remove job. +]] +-- Includes +--[[ + Function to remove deduplication key if needed + when a job is being removed. +]] +local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey, + jobId, deduplicationId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + return rcall("DEL", deduplicationKey) + end + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +local function removeJob(jobId, hard, baseKey, shouldRemoveDeduplicationKey) + local jobKey = baseKey .. jobId + removeParentDependencyKey(jobKey, hard, nil, baseKey) + if shouldRemoveDeduplicationKey then + local deduplicationId = rcall("HGET", jobKey, "deid") + removeDeduplicationKeyIfNeededOnRemoval(baseKey, jobId, deduplicationId) + end + removeJobKeys(jobKey) +end +local function removeJobs(keys, hard, baseKey, max) + for i, key in ipairs(keys) do + removeJob(key, hard, baseKey, true --[[remove debounce key]]) + end + return max - #keys +end +--[[ + Functions to remove jobs. +]] +-- Includes +--[[ + Function to filter out jobs to ignore from a table. +]] +local function filterOutJobsToIgnore(jobs, jobsToIgnore) + local filteredJobs = {} + for i = 1, #jobs do + if not jobsToIgnore[jobs[i]] then + table.insert(filteredJobs, jobs[i]) + end + end + return filteredJobs +end +local function getListItems(keyName, max) + return rcall('LRANGE', keyName, 0, max - 1) +end +local function removeListJobs(keyName, hard, baseKey, max, jobsToIgnore) + local jobs = getListItems(keyName, max) + if jobsToIgnore then + jobs = filterOutJobsToIgnore(jobs, jobsToIgnore) + end + local count = removeJobs(jobs, hard, baseKey, max) + rcall("LTRIM", keyName, #jobs, -1) + return count +end +-- Includes +--[[ + Function to loop in batches. + Just a bit of warning, some commands as ZREM + could receive a maximum of 7000 parameters per call. +]] +local function batches(n, batchSize) + local i = 0 + return function() + local from = i * batchSize + 1 + i = i + 1 + if (from <= n) then + local to = math.min(from + batchSize - 1, n) + return from, to + end + end +end +--[[ + Function to get ZSet items. +]] +local function getZSetItems(keyName, max) + return rcall('ZRANGE', keyName, 0, max - 1) +end +local function removeZSetJobs(keyName, hard, baseKey, max, jobsToIgnore) + local jobs = getZSetItems(keyName, max) + if jobsToIgnore then + jobs = filterOutJobsToIgnore(jobs, jobsToIgnore) + end + local count = removeJobs(jobs, hard, baseKey, max) + if(#jobs > 0) then + for from, to in batches(#jobs, 7000) do + rcall("ZREM", keyName, unpack(jobs, from, to)) + end + end + return count +end +local function removeLockKeys(keys) + for i, key in ipairs(keys) do + rcall("DEL", baseKey .. key .. ':lock') + end +end +-- 1) Check if paused, if not return with error. +if rcall("HEXISTS", KEYS[1], "paused") ~= 1 then + return -1 -- Error, NotPaused +end +-- 2) Check if there are active jobs, if there are and not "force" return error. +local activeKey = baseKey .. 'active' +local activeJobs = getListItems(activeKey, maxCount) +if (#activeJobs > 0) then + if(ARGV[2] == "") then + return -2 -- Error, ExistActiveJobs + end +end +removeLockKeys(activeJobs) +maxCount = removeJobs(activeJobs, true, baseKey, maxCount) +rcall("LTRIM", activeKey, #activeJobs, -1) +if(maxCount <= 0) then + return 1 +end +local delayedKey = baseKey .. 'delayed' +maxCount = removeZSetJobs(delayedKey, true, baseKey, maxCount) +if(maxCount <= 0) then + return 1 +end +local repeatKey = baseKey .. 'repeat' +local repeatJobsIds = getZSetItems(repeatKey, maxCount) +for i, key in ipairs(repeatJobsIds) do + local jobKey = repeatKey .. ":" .. key + rcall("DEL", jobKey) +end +if(#repeatJobsIds > 0) then + for from, to in batches(#repeatJobsIds, 7000) do + rcall("ZREM", repeatKey, unpack(repeatJobsIds, from, to)) + end +end +maxCount = maxCount - #repeatJobsIds +if(maxCount <= 0) then + return 1 +end +local completedKey = baseKey .. 'completed' +maxCount = removeZSetJobs(completedKey, true, baseKey, maxCount) +if(maxCount <= 0) then + return 1 +end +local waitKey = baseKey .. 'paused' +maxCount = removeListJobs(waitKey, true, baseKey, maxCount) +if(maxCount <= 0) then + return 1 +end +local prioritizedKey = baseKey .. 'prioritized' +maxCount = removeZSetJobs(prioritizedKey, true, baseKey, maxCount) +if(maxCount <= 0) then + return 1 +end +local failedKey = baseKey .. 'failed' +maxCount = removeZSetJobs(failedKey, true, baseKey, maxCount) +if(maxCount <= 0) then + return 1 +end +if(maxCount > 0) then + rcall("DEL", + baseKey .. 'events', + baseKey .. 'delay', + baseKey .. 'stalled-check', + baseKey .. 'stalled', + baseKey .. 'id', + baseKey .. 'pc', + baseKey .. 'marker', + baseKey .. 'meta', + baseKey .. 'metrics:completed', + baseKey .. 'metrics:completed:data', + baseKey .. 'metrics:failed', + baseKey .. 'metrics:failed:data') + return 0 +else + return 1 +end +`; +var obliterate = { + name: "obliterate", + content: content33, + keys: 2 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/paginate-1.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content34 = `--[[ + Paginate a set or hash + Input: + KEYS[1] key pointing to the set or hash to be paginated. + ARGV[1] page start offset + ARGV[2] page end offset (-1 for all the elements) + ARGV[3] cursor + ARGV[4] offset + ARGV[5] max iterations + ARGV[6] fetch jobs? + Output: + [cursor, offset, items, numItems] +]] +local rcall = redis.call +-- Includes +--[[ + Function to achieve pagination for a set or hash. + This function simulates pagination in the most efficient way possible + for a set using sscan or hscan. + The main limitation is that sets are not order preserving, so the + pagination is not stable. This means that if the set is modified + between pages, the same element may appear in different pages. +]] -- Maximum number of elements to be returned by sscan per iteration. +local maxCount = 100 +-- Finds the cursor, and returns the first elements available for the requested page. +local function findPage(key, command, pageStart, pageSize, cursor, offset, + maxIterations, fetchJobs) + local items = {} + local jobs = {} + local iterations = 0 + repeat + -- Iterate over the set using sscan/hscan. + local result = rcall(command, key, cursor, "COUNT", maxCount) + cursor = result[1] + local members = result[2] + local step = 1 + if command == "HSCAN" then + step = 2 + end + if #members == 0 then + -- If the result is empty, we can return the result. + return cursor, offset, items, jobs + end + local chunkStart = offset + local chunkEnd = offset + #members / step + local pageEnd = pageStart + pageSize + if chunkEnd < pageStart then + -- If the chunk is before the page, we can skip it. + offset = chunkEnd + elseif chunkStart > pageEnd then + -- If the chunk is after the page, we can return the result. + return cursor, offset, items, jobs + else + -- If the chunk is overlapping the page, we need to add the elements to the result. + for i = 1, #members, step do + if offset >= pageEnd then + return cursor, offset, items, jobs + end + if offset >= pageStart then + local index = #items + 1 + if fetchJobs ~= nil then + jobs[#jobs+1] = rcall("HGETALL", members[i]) + end + if step == 2 then + items[index] = {members[i], members[i + 1]} + else + items[index] = members[i] + end + end + offset = offset + 1 + end + end + iterations = iterations + 1 + until cursor == "0" or iterations >= maxIterations + return cursor, offset, items, jobs +end +local key = KEYS[1] +local scanCommand = "SSCAN" +local countCommand = "SCARD" +local type = rcall("TYPE", key)["ok"] +if type == "none" then + return {0, 0, {}, 0} +elseif type == "hash" then + scanCommand = "HSCAN" + countCommand = "HLEN" +elseif type ~= "set" then + return + redis.error_reply("Pagination is only supported for sets and hashes.") +end +local numItems = rcall(countCommand, key) +local startOffset = tonumber(ARGV[1]) +local endOffset = tonumber(ARGV[2]) +if endOffset == -1 then + endOffset = numItems +end +local pageSize = (endOffset - startOffset) + 1 +local cursor, offset, items, jobs = findPage(key, scanCommand, startOffset, + pageSize, ARGV[3], tonumber(ARGV[4]), + tonumber(ARGV[5]), ARGV[6]) +return {cursor, offset, items, numItems, jobs} +`; +var paginate = { + name: "paginate", + content: content34, + keys: 1 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/pause-7.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content35 = `--[[ + Pauses or resumes a queue globably. + Input: + KEYS[1] 'wait' or 'paused'' + KEYS[2] 'paused' or 'wait' + KEYS[3] 'meta' + KEYS[4] 'prioritized' + KEYS[5] events stream key + KEYS[6] 'delayed' + KEYS|7] 'marker' + ARGV[1] 'paused' or 'resumed' + Event: + publish paused or resumed event. +]] +local rcall = redis.call +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +local markerKey = KEYS[7] +local hasJobs = rcall("EXISTS", KEYS[1]) == 1 +--TODO: check this logic to be reused when changing a delay +if hasJobs then rcall("RENAME", KEYS[1], KEYS[2]) end +if ARGV[1] == "paused" then + rcall("HSET", KEYS[3], "paused", 1) + rcall("DEL", markerKey) +else + rcall("HDEL", KEYS[3], "paused") + if hasJobs or rcall("ZCARD", KEYS[4]) > 0 then + -- Add marker if there are waiting or priority jobs + rcall("ZADD", markerKey, 0, "0") + else + addDelayMarkerIfNeeded(markerKey, KEYS[6]) + end +end +rcall("XADD", KEYS[5], "*", "event", ARGV[1]); +`; +var pause = { + name: "pause", + content: content35, + keys: 7 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/promote-9.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content36 = `--[[ + Promotes a job that is currently "delayed" to the "waiting" state + Input: + KEYS[1] 'delayed' + KEYS[2] 'wait' + KEYS[3] 'paused' + KEYS[4] 'meta' + KEYS[5] 'prioritized' + KEYS[6] 'active' + KEYS[7] 'pc' priority counter + KEYS[8] 'event stream' + KEYS[9] 'marker' + ARGV[1] queue.toKey('') + ARGV[2] jobId + Output: + 0 - OK + -3 - Job not in delayed zset. + Events: + 'waiting' +]] +local rcall = redis.call +local jobId = ARGV[2] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +if rcall("ZREM", KEYS[1], jobId) == 1 then + local jobKey = ARGV[1] .. jobId + local priority = tonumber(rcall("HGET", jobKey, "priority")) or 0 + local metaKey = KEYS[4] + local markerKey = KEYS[9] + -- Remove delayed "marker" from the wait list if there is any. + -- Since we are adding a job we do not need the marker anymore. + -- Markers in waitlist DEPRECATED in v5: Remove in v6. + local target, isPausedOrMaxed = getTargetQueueList(metaKey, KEYS[6], KEYS[2], KEYS[3]) + local marker = rcall("LINDEX", target, 0) + if marker and string.sub(marker, 1, 2) == "0:" then rcall("LPOP", target) end + if priority == 0 then + -- LIFO or FIFO + addJobInTargetList(target, markerKey, "LPUSH", isPausedOrMaxed, jobId) + else + addJobWithPriority(markerKey, KEYS[5], priority, jobId, KEYS[7], isPausedOrMaxed) + end + rcall("XADD", KEYS[8], "*", "event", "waiting", "jobId", jobId, "prev", + "delayed"); + rcall("HSET", jobKey, "delay", 0) + return 0 +else + return -3 +end +`; +var promote = { + name: "promote", + content: content36, + keys: 9 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/releaseLock-1.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content37 = `--[[ + Release lock + Input: + KEYS[1] 'lock', + ARGV[1] token + ARGV[2] lock duration in milliseconds + Output: + "OK" if lock extented succesfully. +]] +local rcall = redis.call +if rcall("GET", KEYS[1]) == ARGV[1] then + return rcall("DEL", KEYS[1]) +else + return 0 +end +`; +var releaseLock = { + name: "releaseLock", + content: content37, + keys: 1 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/removeChildDependency-1.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content38 = `--[[ + Break parent-child dependency by removing + child reference from parent + Input: + KEYS[1] 'key' prefix, + ARGV[1] job key + ARGV[2] parent key + Output: + 0 - OK + 1 - There is not relationship. + -1 - Missing job key + -5 - Missing parent key +]] +local rcall = redis.call +local jobKey = ARGV[1] +local parentKey = ARGV[2] +-- Includes +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +if rcall("EXISTS", jobKey) ~= 1 then return -1 end +if rcall("EXISTS", parentKey) ~= 1 then return -5 end +if removeParentDependencyKey(jobKey, false, parentKey, KEYS[1], nil) then + rcall("HDEL", jobKey, "parentKey", "parent") + return 0 +else + return 1 +end`; +var removeChildDependency = { + name: "removeChildDependency", + content: content38, + keys: 1 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/removeDeduplicationKey-1.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content39 = `--[[ + Remove deduplication key if it matches the job id. + Input: + KEYS[1] deduplication key + ARGV[1] job id + Output: + 0 - false + 1 - true +]] +local rcall = redis.call +local deduplicationKey = KEYS[1] +local jobId = ARGV[1] +local currentJobId = rcall('GET', deduplicationKey) +if currentJobId and currentJobId == jobId then + return rcall("DEL", deduplicationKey) +end +return 0 +`; +var removeDeduplicationKey = { + name: "removeDeduplicationKey", + content: content39, + keys: 1 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/removeJob-2.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content40 = `--[[ + Remove a job from all the statuses it may be in as well as all its data. + In order to be able to remove a job, it cannot be active. + Input: + KEYS[1] jobKey + KEYS[2] repeat key + ARGV[1] jobId + ARGV[2] remove children + ARGV[3] queue prefix + Events: + 'removed' +]] +local rcall = redis.call +-- Includes +--[[ + Function to check if the job belongs to a job scheduler and + current delayed job matches with jobId +]] +local function isJobSchedulerJob(jobId, jobKey, jobSchedulersKey) + local repeatJobKey = rcall("HGET", jobKey, "rjk") + if repeatJobKey then + local prevMillis = rcall("ZSCORE", jobSchedulersKey, repeatJobKey) + if prevMillis then + local currentDelayedJobId = "repeat:" .. repeatJobKey .. ":" .. prevMillis + return jobId == currentDelayedJobId + end + end + return false +end +--[[ + Function to recursively check if there are no locks + on the jobs to be removed. + returns: + boolean +]] +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +local function isLocked( prefix, jobId, removeChildren) + local jobKey = prefix .. jobId; + -- Check if this job is locked + local lockKey = jobKey .. ':lock' + local lock = rcall("GET", lockKey) + if not lock then + if removeChildren == "1" then + local dependencies = rcall("SMEMBERS", jobKey .. ":dependencies") + if (#dependencies > 0) then + for i, childJobKey in ipairs(dependencies) do + -- We need to get the jobId for this job. + local childJobId = getJobIdFromKey(childJobKey) + local childJobPrefix = getJobKeyPrefix(childJobKey, childJobId) + local result = isLocked( childJobPrefix, childJobId, removeChildren ) + if result then + return true + end + end + end + end + return false + end + return true +end +--[[ + Remove a job from all the statuses it may be in as well as all its data, + including its children. Active children can be ignored. + Events: + 'removed' +]] +local rcall = redis.call +-- Includes +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to remove deduplication key if needed + when a job is being removed. +]] +local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey, + jobId, deduplicationId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + return rcall("DEL", deduplicationKey) + end + end +end +--[[ + Function to remove from any state. + returns: + prev state +]] +local function removeJobFromAnyState( prefix, jobId) + -- We start with the ZSCORE checks, since they have O(1) complexity + if rcall("ZSCORE", prefix .. "completed", jobId) then + rcall("ZREM", prefix .. "completed", jobId) + return "completed" + elseif rcall("ZSCORE", prefix .. "waiting-children", jobId) then + rcall("ZREM", prefix .. "waiting-children", jobId) + return "waiting-children" + elseif rcall("ZSCORE", prefix .. "delayed", jobId) then + rcall("ZREM", prefix .. "delayed", jobId) + return "delayed" + elseif rcall("ZSCORE", prefix .. "failed", jobId) then + rcall("ZREM", prefix .. "failed", jobId) + return "failed" + elseif rcall("ZSCORE", prefix .. "prioritized", jobId) then + rcall("ZREM", prefix .. "prioritized", jobId) + return "prioritized" + -- We remove only 1 element from the list, since we assume they are not added multiple times + elseif rcall("LREM", prefix .. "wait", 1, jobId) == 1 then + return "wait" + elseif rcall("LREM", prefix .. "paused", 1, jobId) == 1 then + return "paused" + elseif rcall("LREM", prefix .. "active", 1, jobId) == 1 then + return "active" + end + return "unknown" +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +local removeJobChildren +local removeJobWithChildren +removeJobChildren = function(prefix, jobKey, options) + -- Check if this job has children + -- If so, we are going to try to remove the children recursively in a depth-first way + -- because if some job is locked, we must exit with an error. + if not options.ignoreProcessed then + local processed = rcall("HGETALL", jobKey .. ":processed") + if #processed > 0 then + for i = 1, #processed, 2 do + local childJobId = getJobIdFromKey(processed[i]) + local childJobPrefix = getJobKeyPrefix(processed[i], childJobId) + removeJobWithChildren(childJobPrefix, childJobId, jobKey, options) + end + end + local failed = rcall("HGETALL", jobKey .. ":failed") + if #failed > 0 then + for i = 1, #failed, 2 do + local childJobId = getJobIdFromKey(failed[i]) + local childJobPrefix = getJobKeyPrefix(failed[i], childJobId) + removeJobWithChildren(childJobPrefix, childJobId, jobKey, options) + end + end + local unsuccessful = rcall("ZRANGE", jobKey .. ":unsuccessful", 0, -1) + if #unsuccessful > 0 then + for i = 1, #unsuccessful, 1 do + local childJobId = getJobIdFromKey(unsuccessful[i]) + local childJobPrefix = getJobKeyPrefix(unsuccessful[i], childJobId) + removeJobWithChildren(childJobPrefix, childJobId, jobKey, options) + end + end + end + local dependencies = rcall("SMEMBERS", jobKey .. ":dependencies") + if #dependencies > 0 then + for i, childJobKey in ipairs(dependencies) do + local childJobId = getJobIdFromKey(childJobKey) + local childJobPrefix = getJobKeyPrefix(childJobKey, childJobId) + removeJobWithChildren(childJobPrefix, childJobId, jobKey, options) + end + end +end +removeJobWithChildren = function(prefix, jobId, parentKey, options) + local jobKey = prefix .. jobId + if options.ignoreLocked then + if isLocked(prefix, jobId) then + return + end + end + -- Check if job is in the failed zset + local failedSet = prefix .. "failed" + if not (options.ignoreProcessed and rcall("ZSCORE", failedSet, jobId)) then + removeParentDependencyKey(jobKey, false, parentKey, nil) + if options.removeChildren then + removeJobChildren(prefix, jobKey, options) + end + local prev = removeJobFromAnyState(prefix, jobId) + local deduplicationId = rcall("HGET", jobKey, "deid") + removeDeduplicationKeyIfNeededOnRemoval(prefix, jobId, deduplicationId) + if removeJobKeys(jobKey) > 0 then + local metaKey = prefix .. "meta" + local maxEvents = getOrSetMaxEvents(metaKey) + rcall("XADD", prefix .. "events", "MAXLEN", "~", maxEvents, "*", "event", "removed", + "jobId", jobId, "prev", prev) + end + end +end +local jobId = ARGV[1] +local shouldRemoveChildren = ARGV[2] +local prefix = ARGV[3] +local jobKey = KEYS[1] +local repeatKey = KEYS[2] +if isJobSchedulerJob(jobId, jobKey, repeatKey) then + return -8 +end +if not isLocked(prefix, jobId, shouldRemoveChildren) then + local options = { + removeChildren = shouldRemoveChildren == "1", + ignoreProcessed = false, + ignoreLocked = false + } + removeJobWithChildren(prefix, jobId, nil, options) + return 1 +end +return 0 +`; +var removeJob = { + name: "removeJob", + content: content40, + keys: 2 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/removeJobScheduler-3.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content41 = `--[[ + Removes a job scheduler and its next scheduled job. + Input: + KEYS[1] job schedulers key + KEYS[2] delayed jobs key + KEYS[3] events key + ARGV[1] job scheduler id + ARGV[2] prefix key + Output: + 0 - OK + 1 - Missing repeat job + Events: + 'removed' +]] +local rcall = redis.call +-- Includes +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +local jobSchedulerId = ARGV[1] +local prefix = ARGV[2] +local millis = rcall("ZSCORE", KEYS[1], jobSchedulerId) +if millis then + -- Delete next programmed job. + local delayedJobId = "repeat:" .. jobSchedulerId .. ":" .. millis + if(rcall("ZREM", KEYS[2], delayedJobId) == 1) then + removeJobKeys(prefix .. delayedJobId) + rcall("XADD", KEYS[3], "*", "event", "removed", "jobId", delayedJobId, "prev", "delayed") + end +end +if(rcall("ZREM", KEYS[1], jobSchedulerId) == 1) then + rcall("DEL", KEYS[1] .. ":" .. jobSchedulerId) + return 0 +end +return 1 +`; +var removeJobScheduler = { + name: "removeJobScheduler", + content: content41, + keys: 3 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/removeOrphanedJobs-1.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content42 = `--[[ + Removes orphaned job keys that exist in Redis but are not referenced + in any queue state set. Checks each candidate atomically. + Input: + KEYS[1] base prefix key including trailing colon (e.g. bull:queueName:) + ARGV[1] number of state key suffixes + ARGV[2 .. 1+N] state key suffixes (e.g. active, wait, completed, ...) + ARGV[2+N] number of job sub-key suffixes + ARGV[3+N .. 2+N+M] job sub-key suffixes (e.g. logs, dependencies, ...) + ARGV[3+N+M .. end] candidate job IDs to check + Output: + number of removed jobs +]] +local rcall = redis.call +local basePrefix = KEYS[1] +-- Parse state key suffixes and cache their full key names + types. +local stateKeyCount = tonumber(ARGV[1]) +local stateKeys = {} +local stateKeyTypes = {} +for i = 1, stateKeyCount do + local fullKey = basePrefix .. ARGV[1 + i] + stateKeys[i] = fullKey + stateKeyTypes[i] = rcall('TYPE', fullKey)['ok'] +end +-- Parse job sub-key suffixes. +local subKeyCountIdx = 2 + stateKeyCount +local subKeyCount = tonumber(ARGV[subKeyCountIdx]) +local subKeySuffixes = {} +for i = 1, subKeyCount do + subKeySuffixes[i] = ARGV[subKeyCountIdx + i] +end +-- Process candidate job IDs. +local candidateStart = subKeyCountIdx + subKeyCount + 1 +local removedCount = 0 +for c = candidateStart, #ARGV do + local jobId = ARGV[c] + local found = false + for i = 1, stateKeyCount do + local kt = stateKeyTypes[i] + if kt == 'list' then + if rcall('LPOS', stateKeys[i], jobId) then + found = true + break + end + elseif kt == 'zset' then + if rcall('ZSCORE', stateKeys[i], jobId) then + found = true + break + end + elseif kt == 'set' then + if rcall('SISMEMBER', stateKeys[i], jobId) == 1 then + found = true + break + end + end + end + if not found then + local jobKey = basePrefix .. jobId + local keysToDelete = { jobKey } + for _, suffix in ipairs(subKeySuffixes) do + keysToDelete[#keysToDelete + 1] = jobKey .. ':' .. suffix + end + rcall('DEL', unpack(keysToDelete)) + removedCount = removedCount + 1 + end +end +return removedCount +`; +var removeOrphanedJobs = { + name: "removeOrphanedJobs", + content: content42, + keys: 1 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/removeRepeatable-3.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content43 = `--[[ + Removes a repeatable job + Input: + KEYS[1] repeat jobs key + KEYS[2] delayed jobs key + KEYS[3] events key + ARGV[1] old repeat job id + ARGV[2] options concat + ARGV[3] repeat job key + ARGV[4] prefix key + Output: + 0 - OK + 1 - Missing repeat job + Events: + 'removed' +]] +local rcall = redis.call +local millis = rcall("ZSCORE", KEYS[1], ARGV[2]) +-- Includes +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +-- legacy removal TODO: remove in next breaking change +if millis then + -- Delete next programmed job. + local repeatJobId = ARGV[1] .. millis + if(rcall("ZREM", KEYS[2], repeatJobId) == 1) then + removeJobKeys(ARGV[4] .. repeatJobId) + rcall("XADD", KEYS[3], "*", "event", "removed", "jobId", repeatJobId, "prev", "delayed"); + end +end +if(rcall("ZREM", KEYS[1], ARGV[2]) == 1) then + return 0 +end +-- new removal +millis = rcall("ZSCORE", KEYS[1], ARGV[3]) +if millis then + -- Delete next programmed job. + local repeatJobId = "repeat:" .. ARGV[3] .. ":" .. millis + if(rcall("ZREM", KEYS[2], repeatJobId) == 1) then + removeJobKeys(ARGV[4] .. repeatJobId) + rcall("XADD", KEYS[3], "*", "event", "removed", "jobId", repeatJobId, "prev", "delayed") + end +end +if(rcall("ZREM", KEYS[1], ARGV[3]) == 1) then + rcall("DEL", KEYS[1] .. ":" .. ARGV[3]) + return 0 +end +return 1 +`; +var removeRepeatable = { + name: "removeRepeatable", + content: content43, + keys: 3 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/removeUnprocessedChildren-2.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content44 = `--[[ + Remove a job from all the statuses it may be in as well as all its data. + In order to be able to remove a job, it cannot be active. + Input: + KEYS[1] jobKey + KEYS[2] meta key + ARGV[1] prefix + ARGV[2] jobId + Events: + 'removed' for every children removed +]] +-- Includes +--[[ + Remove a job from all the statuses it may be in as well as all its data, + including its children. Active children can be ignored. + Events: + 'removed' +]] +local rcall = redis.call +-- Includes +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to check if the job belongs to a job scheduler and + current delayed job matches with jobId +]] +local function isJobSchedulerJob(jobId, jobKey, jobSchedulersKey) + local repeatJobKey = rcall("HGET", jobKey, "rjk") + if repeatJobKey then + local prevMillis = rcall("ZSCORE", jobSchedulersKey, repeatJobKey) + if prevMillis then + local currentDelayedJobId = "repeat:" .. repeatJobKey .. ":" .. prevMillis + return jobId == currentDelayedJobId + end + end + return false +end +--[[ + Function to remove deduplication key if needed + when a job is being removed. +]] +local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey, + jobId, deduplicationId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + return rcall("DEL", deduplicationKey) + end + end +end +--[[ + Function to remove from any state. + returns: + prev state +]] +local function removeJobFromAnyState( prefix, jobId) + -- We start with the ZSCORE checks, since they have O(1) complexity + if rcall("ZSCORE", prefix .. "completed", jobId) then + rcall("ZREM", prefix .. "completed", jobId) + return "completed" + elseif rcall("ZSCORE", prefix .. "waiting-children", jobId) then + rcall("ZREM", prefix .. "waiting-children", jobId) + return "waiting-children" + elseif rcall("ZSCORE", prefix .. "delayed", jobId) then + rcall("ZREM", prefix .. "delayed", jobId) + return "delayed" + elseif rcall("ZSCORE", prefix .. "failed", jobId) then + rcall("ZREM", prefix .. "failed", jobId) + return "failed" + elseif rcall("ZSCORE", prefix .. "prioritized", jobId) then + rcall("ZREM", prefix .. "prioritized", jobId) + return "prioritized" + -- We remove only 1 element from the list, since we assume they are not added multiple times + elseif rcall("LREM", prefix .. "wait", 1, jobId) == 1 then + return "wait" + elseif rcall("LREM", prefix .. "paused", 1, jobId) == 1 then + return "paused" + elseif rcall("LREM", prefix .. "active", 1, jobId) == 1 then + return "active" + end + return "unknown" +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +--[[ + Function to recursively check if there are no locks + on the jobs to be removed. + returns: + boolean +]] +local function isLocked( prefix, jobId, removeChildren) + local jobKey = prefix .. jobId; + -- Check if this job is locked + local lockKey = jobKey .. ':lock' + local lock = rcall("GET", lockKey) + if not lock then + if removeChildren == "1" then + local dependencies = rcall("SMEMBERS", jobKey .. ":dependencies") + if (#dependencies > 0) then + for i, childJobKey in ipairs(dependencies) do + -- We need to get the jobId for this job. + local childJobId = getJobIdFromKey(childJobKey) + local childJobPrefix = getJobKeyPrefix(childJobKey, childJobId) + local result = isLocked( childJobPrefix, childJobId, removeChildren ) + if result then + return true + end + end + end + end + return false + end + return true +end +local removeJobChildren +local removeJobWithChildren +removeJobChildren = function(prefix, jobKey, options) + -- Check if this job has children + -- If so, we are going to try to remove the children recursively in a depth-first way + -- because if some job is locked, we must exit with an error. + if not options.ignoreProcessed then + local processed = rcall("HGETALL", jobKey .. ":processed") + if #processed > 0 then + for i = 1, #processed, 2 do + local childJobId = getJobIdFromKey(processed[i]) + local childJobPrefix = getJobKeyPrefix(processed[i], childJobId) + removeJobWithChildren(childJobPrefix, childJobId, jobKey, options) + end + end + local failed = rcall("HGETALL", jobKey .. ":failed") + if #failed > 0 then + for i = 1, #failed, 2 do + local childJobId = getJobIdFromKey(failed[i]) + local childJobPrefix = getJobKeyPrefix(failed[i], childJobId) + removeJobWithChildren(childJobPrefix, childJobId, jobKey, options) + end + end + local unsuccessful = rcall("ZRANGE", jobKey .. ":unsuccessful", 0, -1) + if #unsuccessful > 0 then + for i = 1, #unsuccessful, 1 do + local childJobId = getJobIdFromKey(unsuccessful[i]) + local childJobPrefix = getJobKeyPrefix(unsuccessful[i], childJobId) + removeJobWithChildren(childJobPrefix, childJobId, jobKey, options) + end + end + end + local dependencies = rcall("SMEMBERS", jobKey .. ":dependencies") + if #dependencies > 0 then + for i, childJobKey in ipairs(dependencies) do + local childJobId = getJobIdFromKey(childJobKey) + local childJobPrefix = getJobKeyPrefix(childJobKey, childJobId) + removeJobWithChildren(childJobPrefix, childJobId, jobKey, options) + end + end +end +removeJobWithChildren = function(prefix, jobId, parentKey, options) + local jobKey = prefix .. jobId + if options.ignoreLocked then + if isLocked(prefix, jobId) then + return + end + end + -- Check if job is in the failed zset + local failedSet = prefix .. "failed" + if not (options.ignoreProcessed and rcall("ZSCORE", failedSet, jobId)) then + removeParentDependencyKey(jobKey, false, parentKey, nil) + if options.removeChildren then + removeJobChildren(prefix, jobKey, options) + end + local prev = removeJobFromAnyState(prefix, jobId) + local deduplicationId = rcall("HGET", jobKey, "deid") + removeDeduplicationKeyIfNeededOnRemoval(prefix, jobId, deduplicationId) + if removeJobKeys(jobKey) > 0 then + local metaKey = prefix .. "meta" + local maxEvents = getOrSetMaxEvents(metaKey) + rcall("XADD", prefix .. "events", "MAXLEN", "~", maxEvents, "*", "event", "removed", + "jobId", jobId, "prev", prev) + end + end +end +local prefix = ARGV[1] +local jobId = ARGV[2] +local jobKey = KEYS[1] +local metaKey = KEYS[2] +local options = { + removeChildren = "1", + ignoreProcessed = true, + ignoreLocked = true +} +removeJobChildren(prefix, jobKey, options) +`; +var removeUnprocessedChildren = { + name: "removeUnprocessedChildren", + content: content44, + keys: 2 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/reprocessJob-8.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content45 = `--[[ + Attempts to reprocess a job + Input: + KEYS[1] job key + KEYS[2] events stream + KEYS[3] job state + KEYS[4] wait key + KEYS[5] meta + KEYS[6] paused key + KEYS[7] active key + KEYS[8] marker key + ARGV[1] job.id + ARGV[2] (job.opts.lifo ? 'R' : 'L') + 'PUSH' + ARGV[3] propVal - failedReason/returnvalue + ARGV[4] prev state - failed/completed + ARGV[5] reset attemptsMade - "1" or "0" + ARGV[6] reset attemptsStarted - "1" or "0" + Output: + 1 means the operation was a success + -1 means the job does not exist + -3 means the job was not found in the expected set. +]] +local rcall = redis.call; +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local jobKey = KEYS[1] +if rcall("EXISTS", jobKey) == 1 then + local jobId = ARGV[1] + if (rcall("ZREM", KEYS[3], jobId) == 1) then + local attributesToRemove = {} + if ARGV[5] == "1" then + table.insert(attributesToRemove, "atm") + end + if ARGV[6] == "1" then + table.insert(attributesToRemove, "ats") + end + rcall("HDEL", jobKey, "finishedOn", "processedOn", ARGV[3], unpack(attributesToRemove)) + local target, isPausedOrMaxed = getTargetQueueList(KEYS[5], KEYS[7], KEYS[4], KEYS[6]) + addJobInTargetList(target, KEYS[8], ARGV[2], isPausedOrMaxed, jobId) + local parentKey = rcall("HGET", jobKey, "parentKey") + if parentKey and rcall("EXISTS", parentKey) == 1 then + if ARGV[4] == "failed" then + if rcall("ZREM", parentKey .. ":unsuccessful", jobKey) == 1 or + rcall("ZREM", parentKey .. ":failed", jobKey) == 1 then + rcall("SADD", parentKey .. ":dependencies", jobKey) + end + else + if rcall("HDEL", parentKey .. ":processed", jobKey) == 1 then + rcall("SADD", parentKey .. ":dependencies", jobKey) + end + end + end + local maxEvents = getOrSetMaxEvents(KEYS[5]) + -- Emit waiting event + rcall("XADD", KEYS[2], "MAXLEN", "~", maxEvents, "*", "event", "waiting", + "jobId", jobId, "prev", ARGV[4]); + return 1 + else + return -3 + end +else + return -1 +end +`; +var reprocessJob = { + name: "reprocessJob", + content: content45, + keys: 8 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/retryJob-11.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content46 = `--[[ + Retries a failed job by moving it back to the wait queue. + Input: + KEYS[1] 'active', + KEYS[2] 'wait' + KEYS[3] 'paused' + KEYS[4] job key + KEYS[5] 'meta' + KEYS[6] events stream + KEYS[7] delayed key + KEYS[8] prioritized key + KEYS[9] 'pc' priority counter + KEYS[10] 'marker' + KEYS[11] 'stalled' + ARGV[1] key prefix + ARGV[2] timestamp + ARGV[3] pushCmd + ARGV[4] jobId + ARGV[5] token + ARGV[6] optional job fields to update + Events: + 'waiting' + Output: + 0 - OK + -1 - Missing key + -2 - Missing lock + -3 - Job not in active set +]] +local rcall = redis.call +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to check if queue is paused or maxed + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePausedOrMaxed(queueMetaKey, activeKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency") + if queueAttributes[1] then + return true + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + return activeCount >= tonumber(queueAttributes[2]) + end + end + return false +end +--[[ + Updates the delay set, by moving delayed jobs that should + be processed now to "wait". + Events: + 'waiting' +]] +-- Includes +-- Try to get as much as 1000 jobs at once +local function promoteDelayedJobs(delayedKey, markerKey, targetKey, prioritizedKey, + eventStreamKey, prefix, timestamp, priorityCounterKey, isPaused) + local jobs = rcall("ZRANGEBYSCORE", delayedKey, 0, (timestamp + 1) * 0x1000 - 1, "LIMIT", 0, 1000) + if (#jobs > 0) then + rcall("ZREM", delayedKey, unpack(jobs)) + for _, jobId in ipairs(jobs) do + local jobKey = prefix .. jobId + local priority = + tonumber(rcall("HGET", jobKey, "priority")) or 0 + if priority == 0 then + -- LIFO or FIFO + rcall("LPUSH", targetKey, jobId) + else + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + end + -- Emit waiting event + rcall("XADD", eventStreamKey, "*", "event", "waiting", "jobId", + jobId, "prev", "delayed") + rcall("HSET", jobKey, "delay", 0) + end + addBaseMarkerIfNeeded(markerKey, isPaused) + end +end +local function removeLock(jobKey, stalledKey, token, jobId) + if token ~= "0" then + local lockKey = jobKey .. ':lock' + local lockToken = rcall("GET", lockKey) + if lockToken == token then + rcall("DEL", lockKey) + rcall("SREM", stalledKey, jobId) + else + if lockToken then + -- Lock exists but token does not match + return -6 + else + -- Lock is missing completely + return -2 + end + end + end + return 0 +end +--[[ + Function to update a bunch of fields in a job. +]] +local function updateJobFields(jobKey, msgpackedFields) + if msgpackedFields and #msgpackedFields > 0 then + local fieldsToUpdate = cmsgpack.unpack(msgpackedFields) + if fieldsToUpdate then + rcall("HMSET", jobKey, unpack(fieldsToUpdate)) + end + end +end +local target, isPausedOrMaxed = getTargetQueueList(KEYS[5], KEYS[1], KEYS[2], KEYS[3]) +local markerKey = KEYS[10] +-- Check if there are delayed jobs that we can move to wait. +-- test example: when there are delayed jobs between retries +promoteDelayedJobs(KEYS[7], markerKey, target, KEYS[8], KEYS[6], ARGV[1], ARGV[2], KEYS[9], isPausedOrMaxed) +local jobKey = KEYS[4] +if rcall("EXISTS", jobKey) == 1 then + local errorCode = removeLock(jobKey, KEYS[11], ARGV[5], ARGV[4]) + if errorCode < 0 then + return errorCode + end + updateJobFields(jobKey, ARGV[6]) + local numRemovedElements = rcall("LREM", KEYS[1], -1, ARGV[4]) + if (numRemovedElements < 1) then return -3 end + local priority = tonumber(rcall("HGET", jobKey, "priority")) or 0 + --need to re-evaluate after removing job from active + isPausedOrMaxed = isQueuePausedOrMaxed(KEYS[5], KEYS[1]) + -- Standard or priority add + if priority == 0 then + addJobInTargetList(target, markerKey, ARGV[3], isPausedOrMaxed, ARGV[4]) + else + addJobWithPriority(markerKey, KEYS[8], priority, ARGV[4], KEYS[9], isPausedOrMaxed) + end + rcall("HINCRBY", jobKey, "atm", 1) + local maxEvents = getOrSetMaxEvents(KEYS[5]) + -- Emit waiting event + rcall("XADD", KEYS[6], "MAXLEN", "~", maxEvents, "*", "event", "waiting", + "jobId", ARGV[4], "prev", "active") + return 0 +else + return -1 +end +`; +var retryJob = { + name: "retryJob", + content: content46, + keys: 11 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/saveStacktrace-1.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content47 = `--[[ + Save stacktrace and failedReason. + Input: + KEYS[1] job key + ARGV[1] stacktrace + ARGV[2] failedReason + Output: + 0 - OK + -1 - Missing key +]] +local rcall = redis.call +if rcall("EXISTS", KEYS[1]) == 1 then + rcall("HMSET", KEYS[1], "stacktrace", ARGV[1], "failedReason", ARGV[2]) + return 0 +else + return -1 +end +`; +var saveStacktrace = { + name: "saveStacktrace", + content: content47, + keys: 1 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/updateData-1.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content48 = `--[[ + Update job data + Input: + KEYS[1] Job id key + ARGV[1] data + Output: + 0 - OK + -1 - Missing job. +]] +local rcall = redis.call +if rcall("EXISTS",KEYS[1]) == 1 then -- // Make sure job exists + rcall("HSET", KEYS[1], "data", ARGV[1]) + return 0 +else + return -1 +end +`; +var updateData = { + name: "updateData", + content: content48, + keys: 1 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/updateJobScheduler-12.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content49 = `--[[ + Updates a job scheduler and adds next delayed job + Input: + KEYS[1] 'repeat' key + KEYS[2] 'delayed' + KEYS[3] 'wait' key + KEYS[4] 'paused' key + KEYS[5] 'meta' + KEYS[6] 'prioritized' key + KEYS[7] 'marker', + KEYS[8] 'id' + KEYS[9] events stream key + KEYS[10] 'pc' priority counter + KEYS[11] producer key + KEYS[12] 'active' key + ARGV[1] next milliseconds + ARGV[2] jobs scheduler id + ARGV[3] Json stringified delayed data + ARGV[4] msgpacked delayed opts + ARGV[5] timestamp + ARGV[6] prefix key + ARGV[7] producer id + Output: + next delayed job id - OK +]] local rcall = redis.call +local repeatKey = KEYS[1] +local delayedKey = KEYS[2] +local waitKey = KEYS[3] +local pausedKey = KEYS[4] +local metaKey = KEYS[5] +local prioritizedKey = KEYS[6] +local nextMillis = tonumber(ARGV[1]) +local jobSchedulerId = ARGV[2] +local timestamp = tonumber(ARGV[5]) +local prefixKey = ARGV[6] +local producerId = ARGV[7] +local jobOpts = cmsgpack.unpack(ARGV[4]) +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Adds a delayed job to the queue by doing the following: + - Creates a new job key with the job data. + - adds to delayed zset. + - Emits a global event 'delayed' if the job is delayed. +]] +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Bake in the job id first 12 bits into the timestamp + to guarantee correct execution order of delayed jobs + (up to 4096 jobs per given timestamp or 4096 jobs apart per timestamp) + WARNING: Jobs that are so far apart that they wrap around will cause FIFO to fail +]] +local function getDelayedScore(delayedKey, timestamp, delay) + local delayedTimestamp = (delay > 0 and (tonumber(timestamp) + delay)) or tonumber(timestamp) + local minScore = delayedTimestamp * 0x1000 + local maxScore = (delayedTimestamp + 1 ) * 0x1000 - 1 + local result = rcall("ZREVRANGEBYSCORE", delayedKey, maxScore, + minScore, "WITHSCORES","LIMIT", 0, 1) + if #result then + local currentMaxScore = tonumber(result[2]) + if currentMaxScore ~= nil then + if currentMaxScore >= maxScore then + return maxScore, delayedTimestamp + else + return currentMaxScore + 1, delayedTimestamp + end + end + end + return minScore, delayedTimestamp +end +local function addDelayedJob(jobId, delayedKey, eventsKey, timestamp, + maxEvents, markerKey, delay) + local score, delayedTimestamp = getDelayedScore(delayedKey, timestamp, tonumber(delay)) + rcall("ZADD", delayedKey, score, jobId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "delayed", + "jobId", jobId, "delay", delayedTimestamp) + -- mark that a delayed job is available + addDelayMarkerIfNeeded(markerKey, delayedKey) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePaused(queueMetaKey) + return rcall("HEXISTS", queueMetaKey, "paused") == 1 +end +--[[ + Function to store a job +]] +local function storeJob(eventsKey, jobIdKey, jobId, name, data, opts, timestamp, + parentKey, parentData, repeatJobKey) + local jsonOpts = cjson.encode(opts) + local delay = opts['delay'] or 0 + local priority = opts['priority'] or 0 + local debounceId = opts['de'] and opts['de']['id'] + local optionalValues = {} + if parentKey ~= nil then + table.insert(optionalValues, "parentKey") + table.insert(optionalValues, parentKey) + table.insert(optionalValues, "parent") + table.insert(optionalValues, parentData) + end + if repeatJobKey then + table.insert(optionalValues, "rjk") + table.insert(optionalValues, repeatJobKey) + end + if debounceId then + table.insert(optionalValues, "deid") + table.insert(optionalValues, debounceId) + end + rcall("HMSET", jobIdKey, "name", name, "data", data, "opts", jsonOpts, + "timestamp", timestamp, "delay", delay, "priority", priority, + unpack(optionalValues)) + rcall("XADD", eventsKey, "*", "event", "added", "jobId", jobId, "name", name) + return delay, priority +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +local function addJobFromScheduler(jobKey, jobId, opts, waitKey, pausedKey, activeKey, metaKey, + prioritizedKey, priorityCounter, delayedKey, markerKey, eventsKey, name, maxEvents, timestamp, + data, jobSchedulerId, repeatDelay) + opts['delay'] = repeatDelay + opts['jobId'] = jobId + local delay, priority = storeJob(eventsKey, jobKey, jobId, name, data, + opts, timestamp, nil, nil, jobSchedulerId) + if delay ~= 0 then + addDelayedJob(jobId, delayedKey, eventsKey, timestamp, maxEvents, markerKey, delay) + else + local target, isPausedOrMaxed = getTargetQueueList(metaKey, activeKey, waitKey, pausedKey) + -- Standard or priority add + if priority == 0 then + local pushCmd = opts['lifo'] and 'RPUSH' or 'LPUSH' + addJobInTargetList(target, markerKey, pushCmd, isPausedOrMaxed, jobId) + else + -- Priority add + addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounter, isPausedOrMaxed) + end + -- Emit waiting event + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "waiting", "jobId", jobId) + end +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +local function getJobSchedulerEveryNextMillis(prevMillis, every, now, offset, startDate) + local nextMillis + if not prevMillis then + if startDate then + -- Assuming startDate is passed as milliseconds from JavaScript + nextMillis = tonumber(startDate) + nextMillis = nextMillis > now and nextMillis or now + else + nextMillis = now + end + else + nextMillis = prevMillis + every + -- check if we may have missed some iterations + if nextMillis < now then + nextMillis = math.floor(now / every) * every + every + (offset or 0) + end + end + if not offset or offset == 0 then + local timeSlot = math.floor(nextMillis / every) * every; + offset = nextMillis - timeSlot; + end + -- Return a tuple nextMillis, offset + return math.floor(nextMillis), math.floor(offset) +end +local prevMillis = rcall("ZSCORE", repeatKey, jobSchedulerId) +-- Validate that scheduler exists. +-- If it does not exist we should not iterate anymore. +if prevMillis then + prevMillis = tonumber(prevMillis) + local schedulerKey = repeatKey .. ":" .. jobSchedulerId + local schedulerAttributes = rcall("HMGET", schedulerKey, "name", "data", "every", "startDate", "offset") + local every = tonumber(schedulerAttributes[3]) + local now = tonumber(timestamp) + -- If every is not found in scheduler attributes, try to get it from job options + if not every and jobOpts['repeat'] and jobOpts['repeat']['every'] then + every = tonumber(jobOpts['repeat']['every']) + end + if every then + local startDate = schedulerAttributes[4] + local jobOptsOffset = jobOpts['repeat'] and jobOpts['repeat']['offset'] or 0 + local offset = schedulerAttributes[5] or jobOptsOffset or 0 + local newOffset + nextMillis, newOffset = getJobSchedulerEveryNextMillis(prevMillis, every, now, offset, startDate) + if not offset then + rcall("HSET", schedulerKey, "offset", newOffset) + jobOpts['repeat']['offset'] = newOffset + end + end + local nextDelayedJobId = "repeat:" .. jobSchedulerId .. ":" .. nextMillis + local nextDelayedJobKey = schedulerKey .. ":" .. nextMillis + local currentDelayedJobId = "repeat:" .. jobSchedulerId .. ":" .. prevMillis + if producerId == currentDelayedJobId then + local eventsKey = KEYS[9] + local maxEvents = getOrSetMaxEvents(metaKey) + if rcall("EXISTS", nextDelayedJobKey) ~= 1 then + rcall("ZADD", repeatKey, nextMillis, jobSchedulerId) + rcall("HINCRBY", schedulerKey, "ic", 1) + rcall("INCR", KEYS[8]) + -- TODO: remove this workaround in next breaking change, + -- all job-schedulers must save job data + local templateData = schedulerAttributes[2] or ARGV[3] + if templateData and templateData ~= '{}' then + rcall("HSET", schedulerKey, "data", templateData) + end + local delay = nextMillis - now + -- Fast Clamp delay to minimum of 0 + if delay < 0 then + delay = 0 + end + jobOpts["delay"] = delay + addJobFromScheduler(nextDelayedJobKey, nextDelayedJobId, jobOpts, waitKey, pausedKey, KEYS[12], metaKey, + prioritizedKey, KEYS[10], delayedKey, KEYS[7], eventsKey, schedulerAttributes[1], maxEvents, ARGV[5], + templateData or '{}', jobSchedulerId, delay) + -- TODO: remove this workaround in next breaking change + if KEYS[11] ~= "" then + rcall("HSET", KEYS[11], "nrjid", nextDelayedJobId) + end + return nextDelayedJobId .. "" -- convert to string + else + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "duplicated", "jobId", nextDelayedJobId) + end + end +end +`; +var updateJobScheduler = { + name: "updateJobScheduler", + content: content49, + keys: 12 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/updateProgress-3.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content50 = `--[[ + Update job progress + Input: + KEYS[1] Job id key + KEYS[2] event stream key + KEYS[3] meta key + ARGV[1] id + ARGV[2] progress + Output: + 0 - OK + -1 - Missing job. + Event: + progress(jobId, progress) +]] +local rcall = redis.call +-- Includes +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +if rcall("EXISTS", KEYS[1]) == 1 then -- // Make sure job exists + local maxEvents = getOrSetMaxEvents(KEYS[3]) + rcall("HSET", KEYS[1], "progress", ARGV[2]) + rcall("XADD", KEYS[2], "MAXLEN", "~", maxEvents, "*", "event", "progress", + "jobId", ARGV[1], "data", ARGV[2]); + return 0 +else + return -1 +end +`; +var updateProgress = { + name: "updateProgress", + content: content50, + keys: 3 +}; + +// ../../node_modules/bullmq/dist/esm/scripts/updateRepeatableJobMillis-1.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var content51 = `--[[ + Adds a repeatable job + Input: + KEYS[1] 'repeat' key + ARGV[1] next milliseconds + ARGV[2] custom key + ARGV[3] legacy custom key TODO: remove this logic in next breaking change + Output: + repeatableKey - OK +]] +local rcall = redis.call +local repeatKey = KEYS[1] +local nextMillis = ARGV[1] +local customKey = ARGV[2] +local legacyCustomKey = ARGV[3] +if rcall("ZSCORE", repeatKey, customKey) then + rcall("ZADD", repeatKey, nextMillis, customKey) + return customKey +elseif rcall("ZSCORE", repeatKey, legacyCustomKey) ~= false then + rcall("ZADD", repeatKey, nextMillis, legacyCustomKey) + return legacyCustomKey +end +return '' +`; +var updateRepeatableJobMillis = { + name: "updateRepeatableJobMillis", + content: content51, + keys: 1 +}; + +// ../../node_modules/bullmq/dist/esm/classes/redis-connection.js +var overrideMessage = [ + "BullMQ: WARNING! Your redis options maxRetriesPerRequest must be null", + "and will be overridden by BullMQ." +].join(" "); +var deprecationMessage = "BullMQ: Your redis options maxRetriesPerRequest must be null."; +var RedisConnection = class _RedisConnection extends EventEmitter4 { + static { + __name(this, "RedisConnection"); + } + constructor(opts, extraOptions) { + super(); + this.extraOptions = extraOptions; + this.capabilities = { + canDoubleTimeout: false, + canBlockFor1Ms: true + }; + this.status = "initializing"; + this.dbType = "redis"; + this.packageVersion = version4; + this.extraOptions = Object.assign({ shared: false, blocking: true, skipVersionCheck: false, skipWaitingForReady: false }, extraOptions); + if (!isRedisInstance(opts)) { + this.checkBlockingOptions(overrideMessage, opts); + this.opts = Object.assign({ port: 6379, host: "127.0.0.1", retryStrategy: /* @__PURE__ */ __name(function(times) { + return Math.max(Math.min(Math.exp(times), 2e4), 1e3); + }, "retryStrategy") }, opts); + if (this.extraOptions.blocking) { + this.opts.maxRetriesPerRequest = null; + } + } else { + this._client = opts; + if (this._client.options.keyPrefix) { + throw new Error("BullMQ: ioredis does not support ioredis prefixes, use the prefix option instead."); + } + if (isRedisCluster(this._client)) { + this.opts = this._client.options.redisOptions; + } else { + this.opts = this._client.options; + } + this.checkBlockingOptions(deprecationMessage, this.opts, true); + } + this.skipVersionCheck = (extraOptions === null || extraOptions === void 0 ? void 0 : extraOptions.skipVersionCheck) || !!(this.opts && this.opts.skipVersionCheck); + this.handleClientError = (err) => { + this.emit("error", err); + }; + this.handleClientClose = () => { + this.emit("close"); + }; + this.handleClientReady = () => { + this.emit("ready"); + }; + this.initializing = this.init(); + this.initializing.catch((err) => this.emit("error", err)); + } + checkBlockingOptions(msg, options, throwError = false) { + if (this.extraOptions.blocking && options && options.maxRetriesPerRequest) { + if (throwError) { + throw new Error(msg); + } else { + console.error(msg); + } + } + } + /** + * Waits for a redis client to be ready. + * @param redis - client + */ + static async waitUntilReady(client) { + if (client.status === "ready") { + return; + } + if (client.status === "wait") { + return client.connect(); + } + if (client.status === "end") { + throw new Error(import_utils28.CONNECTION_CLOSED_ERROR_MSG); + } + let handleReady; + let handleEnd; + let handleError; + try { + await new Promise((resolve, reject) => { + let lastError; + handleError = /* @__PURE__ */ __name((err) => { + lastError = err; + }, "handleError"); + handleReady = /* @__PURE__ */ __name(() => { + resolve(); + }, "handleReady"); + handleEnd = /* @__PURE__ */ __name(() => { + if (client.status !== "end") { + reject(lastError || new Error(import_utils28.CONNECTION_CLOSED_ERROR_MSG)); + } else { + if (lastError) { + reject(lastError); + } else { + resolve(); + } + } + }, "handleEnd"); + increaseMaxListeners(client, 3); + client.once("ready", handleReady); + client.on("end", handleEnd); + client.once("error", handleError); + }); + } finally { + client.removeListener("end", handleEnd); + client.removeListener("error", handleError); + client.removeListener("ready", handleReady); + decreaseMaxListeners(client, 3); + } + } + get client() { + return this.initializing; + } + loadCommands(packageVersion, providedScripts) { + const finalScripts = providedScripts || scripts_exports; + for (const property in finalScripts) { + const commandName = `${finalScripts[property].name}:${packageVersion}`; + if (!this._client[commandName]) { + this._client.defineCommand(commandName, { + numberOfKeys: finalScripts[property].keys, + lua: finalScripts[property].content + }); + } + } + } + async init() { + if (!this._client) { + const _a2 = this.opts, { url: url2 } = _a2, rest = __rest(_a2, ["url"]); + this._client = url2 ? new import_ioredis2.default(url2, rest) : new import_ioredis2.default(rest); + } + increaseMaxListeners(this._client, 3); + this._client.on("error", this.handleClientError); + this._client.on("close", this.handleClientClose); + this._client.on("ready", this.handleClientReady); + if (!this.extraOptions.skipWaitingForReady) { + await _RedisConnection.waitUntilReady(this._client); + } + this.loadCommands(this.packageVersion); + if (this._client["status"] !== "end") { + const versionResult = await this.getRedisVersionAndType(); + this.version = versionResult.version; + this.dbType = versionResult.databaseType; + if (this.skipVersionCheck !== true && !this.closing) { + if (isRedisVersionLowerThan(this.version, _RedisConnection.minimumVersion, this.dbType)) { + throw new Error(`Redis version needs to be greater or equal than ${_RedisConnection.minimumVersion} Current: ${this.version}`); + } + if (isRedisVersionLowerThan(this.version, _RedisConnection.recommendedMinimumVersion, this.dbType)) { + console.warn(`It is highly recommended to use a minimum Redis version of ${_RedisConnection.recommendedMinimumVersion} + Current: ${this.version}`); + } + } + this.capabilities = { + canDoubleTimeout: !isRedisVersionLowerThan(this.version, "6.0.0", this.dbType), + canBlockFor1Ms: !isRedisVersionLowerThan(this.version, "7.0.8", this.dbType) + }; + this.status = "ready"; + } + return this._client; + } + async disconnect(wait = true) { + const client = await this.client; + if (client.status !== "end") { + let _resolve, _reject; + if (!wait) { + return client.disconnect(); + } + const disconnecting = new Promise((resolve, reject) => { + increaseMaxListeners(client, 2); + client.once("end", resolve); + client.once("error", reject); + _resolve = resolve; + _reject = reject; + }); + client.disconnect(); + try { + await disconnecting; + } finally { + decreaseMaxListeners(client, 2); + client.removeListener("end", _resolve); + client.removeListener("error", _reject); + } + } + } + async reconnect() { + const client = await this.client; + return client.connect(); + } + async close(force = false) { + if (!this.closing) { + const status = this.status; + this.status = "closing"; + this.closing = true; + try { + if (status === "ready") { + await this.initializing; + } + if (!this.extraOptions.shared) { + if (status == "initializing" || force) { + this._client.disconnect(); + } else { + await this._client.quit(); + } + this._client["status"] = "end"; + } + } catch (error50) { + if (isNotConnectionError(error50)) { + throw error50; + } + } finally { + this._client.off("error", this.handleClientError); + this._client.off("close", this.handleClientClose); + this._client.off("ready", this.handleClientReady); + decreaseMaxListeners(this._client, 3); + this.removeAllListeners(); + this.status = "closed"; + } + } + } + async getRedisVersionAndType() { + if (this.skipVersionCheck) { + return { + version: _RedisConnection.minimumVersion, + databaseType: "redis" + }; + } + const doc = await this._client.info(); + const redisPrefix = "redis_version:"; + const maxMemoryPolicyPrefix = "maxmemory_policy:"; + const lines = doc.split(/\r?\n/); + let redisVersion; + let databaseType = "redis"; + for (let i = 0; i < lines.length; i++) { + const line = lines[i]; + if (line.includes("dragonfly_version:") || line.includes("server:Dragonfly")) { + databaseType = "dragonfly"; + if (line.indexOf("dragonfly_version:") === 0) { + redisVersion = line.substr("dragonfly_version:".length); + } + } else if (line.includes("valkey_version:") || line.includes("server:Valkey")) { + databaseType = "valkey"; + if (line.indexOf("valkey_version:") === 0) { + redisVersion = line.substr("valkey_version:".length); + } + } else if (line.indexOf(redisPrefix) === 0) { + redisVersion = line.substr(redisPrefix.length); + if (databaseType === "redis") { + databaseType = "redis"; + } + } + if (line.indexOf(maxMemoryPolicyPrefix) === 0) { + const maxMemoryPolicy = line.substr(maxMemoryPolicyPrefix.length); + if (maxMemoryPolicy !== "noeviction") { + console.warn(`IMPORTANT! Eviction policy is ${maxMemoryPolicy}. It should be "noeviction"`); + } + } + } + if (!redisVersion) { + for (const line of lines) { + if (line.includes("version:")) { + const parts = line.split(":"); + if (parts.length >= 2) { + redisVersion = parts[1]; + break; + } + } + } + } + return { + version: redisVersion || _RedisConnection.minimumVersion, + databaseType + }; + } + get redisVersion() { + return this.version; + } + get databaseType() { + return this.dbType; + } +}; +RedisConnection.minimumVersion = "5.0.0"; +RedisConnection.recommendedMinimumVersion = "6.2.0"; + +// ../../node_modules/bullmq/dist/esm/classes/job-scheduler.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var import_cron_parser = __toESM(require_parser2()); + +// ../../node_modules/bullmq/dist/esm/classes/queue-base.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +import { EventEmitter as EventEmitter6 } from "events"; +var QueueBase = class extends EventEmitter6 { + static { + __name(this, "QueueBase"); + } + /** + * + * @param name - The name of the queue. + * @param opts - Options for the queue. + * @param Connection - An optional "Connection" class used to instantiate a Connection. This is useful for + * testing with mockups and/or extending the Connection class and passing an alternate implementation. + */ + constructor(name, opts = { connection: {} }, Connection = RedisConnection, hasBlockingConnection = false) { + super(); + this.name = name; + this.opts = opts; + this.closed = false; + this.hasBlockingConnection = false; + this.hasBlockingConnection = hasBlockingConnection; + this.opts = Object.assign({ prefix: "bull" }, opts); + if (!name) { + throw new Error("Queue name must be provided"); + } + if (name.includes(":")) { + throw new Error("Queue name cannot contain :"); + } + this.connection = new Connection(opts.connection, { + shared: isRedisInstance(opts.connection), + blocking: hasBlockingConnection, + skipVersionCheck: opts.skipVersionCheck, + skipWaitingForReady: opts.skipWaitingForReady + }); + this.connection.on("error", (error50) => this.emit("error", error50)); + this.connection.on("close", () => { + if (!this.closing) { + this.emit("ioredis:close"); + } + }); + const queueKeys = new QueueKeys(opts.prefix); + this.qualifiedName = queueKeys.getQueueQualifiedName(name); + this.keys = queueKeys.getKeys(name); + this.toKey = (type) => queueKeys.toKey(name, type); + this.createScripts(); + } + /** + * Returns a promise that resolves to a redis client. Normally used only by subclasses. + */ + get client() { + return this.connection.client; + } + createScripts() { + this.scripts = createScripts(this); + } + /** + * Returns the version of the Redis instance the client is connected to, + */ + get redisVersion() { + return this.connection.redisVersion; + } + /** + * Returns the database type of the Redis instance the client is connected to, + */ + get databaseType() { + return this.connection.databaseType; + } + /** + * Helper to easily extend Job class calls. + */ + get Job() { + return Job; + } + /** + * Emits an event. Normally used by subclasses to emit events. + * + * @param event - The emitted event. + * @param args - + * @returns + */ + emit(event, ...args) { + try { + return super.emit(event, ...args); + } catch (err) { + try { + return super.emit("error", err); + } catch (err2) { + console.error(err2); + return false; + } + } + } + waitUntilReady() { + return this.client; + } + base64Name() { + return Buffer.from(this.name).toString("base64"); + } + clientName(suffix = "") { + const queueNameBase64 = this.base64Name(); + return `${this.opts.prefix}:${queueNameBase64}${suffix}`; + } + /** + * + * Closes the connection and returns a promise that resolves when the connection is closed. + */ + async close() { + if (!this.closing) { + this.closing = this.connection.close(); + } + await this.closing; + this.closed = true; + } + /** + * + * Force disconnects a connection. + */ + disconnect() { + return this.connection.disconnect(); + } + async checkConnectionError(fn, delayInMs = DELAY_TIME_5) { + try { + return await fn(); + } catch (error50) { + if (isNotConnectionError(error50)) { + this.emit("error", error50); + } + if (!this.closing && delayInMs) { + await delay(delayInMs); + } else { + return; + } + } + } + /** + * Wraps the code with telemetry and provides a span for configuration. + * + * @param spanKind - kind of the span: Producer, Consumer, Internal + * @param operation - operation name (such as add, process, etc) + * @param destination - destination name (normally the queue name) + * @param callback - code to wrap with telemetry + * @param srcPropagationMedatada - + * @returns + */ + trace(spanKind, operation, destination, callback, srcPropagationMetadata) { + return trace3(this.opts.telemetry, spanKind, this.name, operation, destination, callback, srcPropagationMetadata); + } +}; + +// ../../node_modules/bullmq/dist/esm/classes/job-scheduler.js +var JobScheduler = class extends QueueBase { + static { + __name(this, "JobScheduler"); + } + constructor(name, opts, Connection) { + super(name, opts, Connection); + this.repeatStrategy = opts.settings && opts.settings.repeatStrategy || defaultRepeatStrategy; + } + async upsertJobScheduler(jobSchedulerId, repeatOpts, jobName, jobData, opts, { override, producerId }) { + const { every, limit, pattern, offset } = repeatOpts; + if (pattern && every) { + throw new Error("Both .pattern and .every options are defined for this repeatable job"); + } + if (!pattern && !every) { + throw new Error("Either .pattern or .every options must be defined for this repeatable job"); + } + if (repeatOpts.immediately && repeatOpts.startDate) { + throw new Error("Both .immediately and .startDate options are defined for this repeatable job"); + } + if (repeatOpts.immediately && repeatOpts.every) { + console.warn("Using option immediately with every does not affect the job's schedule. Job will run immediately anyway."); + } + const iterationCount = repeatOpts.count ? repeatOpts.count + 1 : 1; + if (typeof repeatOpts.limit !== "undefined" && iterationCount > repeatOpts.limit) { + return; + } + let now = Date.now(); + const { endDate } = repeatOpts; + if (endDate && now > new Date(endDate).getTime()) { + return; + } + const prevMillis = opts.prevMillis || 0; + now = prevMillis < now ? now : prevMillis; + const { immediately } = repeatOpts, filteredRepeatOpts = __rest(repeatOpts, ["immediately"]); + let nextMillis; + const newOffset = null; + if (pattern) { + nextMillis = await this.repeatStrategy(now, repeatOpts, jobName); + if (nextMillis < now) { + nextMillis = now; + } + } + if (nextMillis || every) { + return this.trace(SpanKind.PRODUCER, "add", `${this.name}.${jobName}`, async (span, srcPropagationMedatada) => { + var _a2, _b; + let telemetry = opts.telemetry; + if (srcPropagationMedatada) { + const omitContext = (_a2 = opts.telemetry) === null || _a2 === void 0 ? void 0 : _a2.omitContext; + const telemetryMetadata = ((_b = opts.telemetry) === null || _b === void 0 ? void 0 : _b.metadata) || !omitContext && srcPropagationMedatada; + if (telemetryMetadata || omitContext) { + telemetry = { + metadata: telemetryMetadata, + omitContext + }; + } + } + const mergedOpts = this.getNextJobOpts(nextMillis, jobSchedulerId, Object.assign(Object.assign({}, opts), { repeat: filteredRepeatOpts, telemetry }), iterationCount, newOffset); + if (override) { + if (nextMillis < now) { + nextMillis = now; + } + const [jobId, delay2] = await this.scripts.addJobScheduler(jobSchedulerId, nextMillis, JSON.stringify(typeof jobData === "undefined" ? {} : jobData), Job.optsAsJSON(opts), { + name: jobName, + startDate: repeatOpts.startDate ? new Date(repeatOpts.startDate).getTime() : void 0, + endDate: endDate ? new Date(endDate).getTime() : void 0, + tz: repeatOpts.tz, + pattern, + every, + limit, + offset: newOffset + }, Job.optsAsJSON(mergedOpts), producerId); + const numericDelay = typeof delay2 === "string" ? parseInt(delay2, 10) : delay2; + const job = new this.Job(this, jobName, jobData, Object.assign(Object.assign({}, mergedOpts), { delay: numericDelay }), jobId); + job.id = jobId; + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.JobSchedulerId]: jobSchedulerId, + [TelemetryAttributes.JobId]: job.id + }); + return job; + } else { + const jobId = await this.scripts.updateJobSchedulerNextMillis(jobSchedulerId, nextMillis, JSON.stringify(typeof jobData === "undefined" ? {} : jobData), Job.optsAsJSON(mergedOpts), producerId); + if (jobId) { + const job = new this.Job(this, jobName, jobData, mergedOpts, jobId); + job.id = jobId; + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.JobSchedulerId]: jobSchedulerId, + [TelemetryAttributes.JobId]: job.id + }); + return job; + } + } + }); + } + } + getNextJobOpts(nextMillis, jobSchedulerId, opts, currentCount, offset) { + var _a2, _b; + const jobId = this.getSchedulerNextJobId({ + jobSchedulerId, + nextMillis + }); + const now = Date.now(); + const delay2 = nextMillis + offset - now; + const mergedOpts = Object.assign(Object.assign({}, opts), { jobId, delay: delay2 < 0 ? 0 : delay2, timestamp: now, prevMillis: nextMillis, repeatJobKey: jobSchedulerId }); + mergedOpts.repeat = Object.assign(Object.assign({}, opts.repeat), { offset, count: currentCount, startDate: ((_a2 = opts.repeat) === null || _a2 === void 0 ? void 0 : _a2.startDate) ? new Date(opts.repeat.startDate).getTime() : void 0, endDate: ((_b = opts.repeat) === null || _b === void 0 ? void 0 : _b.endDate) ? new Date(opts.repeat.endDate).getTime() : void 0 }); + return mergedOpts; + } + async removeJobScheduler(jobSchedulerId) { + return this.scripts.removeJobScheduler(jobSchedulerId); + } + async getSchedulerData(client, key, next) { + const jobData = await client.hgetall(this.toKey("repeat:" + key)); + return this.transformSchedulerData(key, jobData, next); + } + transformSchedulerData(key, jobData, next) { + if (jobData && Object.keys(jobData).length > 0) { + const jobSchedulerData = { + key, + name: jobData.name, + next + }; + if (jobData.ic) { + jobSchedulerData.iterationCount = parseInt(jobData.ic); + } + if (jobData.limit) { + jobSchedulerData.limit = parseInt(jobData.limit); + } + if (jobData.startDate) { + jobSchedulerData.startDate = parseInt(jobData.startDate); + } + if (jobData.endDate) { + jobSchedulerData.endDate = parseInt(jobData.endDate); + } + if (jobData.tz) { + jobSchedulerData.tz = jobData.tz; + } + if (jobData.pattern) { + jobSchedulerData.pattern = jobData.pattern; + } + if (jobData.every) { + jobSchedulerData.every = parseInt(jobData.every); + } + if (jobData.offset) { + jobSchedulerData.offset = parseInt(jobData.offset); + } + if (jobData.data || jobData.opts) { + jobSchedulerData.template = this.getTemplateFromJSON(jobData.data, jobData.opts); + } + return jobSchedulerData; + } + if (key.includes(":")) { + return this.keyToData(key, next); + } + } + keyToData(key, next) { + const data = key.split(":"); + const pattern = data.slice(4).join(":") || null; + return { + key, + name: data[0], + id: data[1] || null, + endDate: parseInt(data[2]) || null, + tz: data[3] || null, + pattern, + next + }; + } + async getScheduler(id) { + const [rawJobData, next] = await this.scripts.getJobScheduler(id); + return this.transformSchedulerData(id, rawJobData ? array2obj(rawJobData) : null, next ? parseInt(next) : null); + } + getTemplateFromJSON(rawData, rawOpts) { + const template = {}; + if (rawData) { + template.data = JSON.parse(rawData); + } + if (rawOpts) { + template.opts = Job.optsFromJSON(rawOpts); + } + return template; + } + async getJobSchedulers(start = 0, end = -1, asc2 = false) { + const client = await this.client; + const jobSchedulersKey = this.keys.repeat; + const result = asc2 ? await client.zrange(jobSchedulersKey, start, end, "WITHSCORES") : await client.zrevrange(jobSchedulersKey, start, end, "WITHSCORES"); + const jobs = []; + for (let i = 0; i < result.length; i += 2) { + jobs.push(this.getSchedulerData(client, result[i], parseInt(result[i + 1]))); + } + return Promise.all(jobs); + } + async getSchedulersCount() { + const jobSchedulersKey = this.keys.repeat; + const client = await this.client; + return client.zcard(jobSchedulersKey); + } + getSchedulerNextJobId({ nextMillis, jobSchedulerId }) { + return `repeat:${jobSchedulerId}:${nextMillis}`; + } +}; +var defaultRepeatStrategy = /* @__PURE__ */ __name((millis, opts) => { + const { pattern } = opts; + const dateFromMillis = new Date(millis); + const startDate = opts.startDate && new Date(opts.startDate); + const currentDate = startDate > dateFromMillis ? startDate : dateFromMillis; + const interval = (0, import_cron_parser.parseExpression)(pattern, Object.assign(Object.assign({}, opts), { currentDate })); + try { + if (opts.immediately) { + return (/* @__PURE__ */ new Date()).getTime(); + } else { + return interval.next().getTime(); + } + } catch (e) { + } +}, "defaultRepeatStrategy"); + +// ../../node_modules/bullmq/dist/esm/classes/lock-manager.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var import_node_abort_controller2 = __toESM(require_browser()); +var LockManager = class { + static { + __name(this, "LockManager"); + } + constructor(worker, opts) { + this.worker = worker; + this.opts = opts; + this.trackedJobs = /* @__PURE__ */ new Map(); + this.closed = false; + } + /** + * Starts the lock manager timers for lock renewal. + */ + start() { + if (this.closed) { + return; + } + if (this.opts.lockRenewTime > 0) { + this.startLockExtenderTimer(); + } + } + async extendLocks(jobIds) { + await this.worker.trace(SpanKind.INTERNAL, "extendLocks", this.worker.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.WorkerId]: this.opts.workerId, + [TelemetryAttributes.WorkerName]: this.opts.workerName, + [TelemetryAttributes.WorkerJobsToExtendLocks]: jobIds + }); + try { + const jobTokens = jobIds.map((id) => { + var _a2; + return ((_a2 = this.trackedJobs.get(id)) === null || _a2 === void 0 ? void 0 : _a2.token) || ""; + }); + const erroredJobIds = await this.worker.extendJobLocks(jobIds, jobTokens, this.opts.lockDuration); + if (erroredJobIds.length > 0) { + this.worker.emit("lockRenewalFailed", erroredJobIds); + for (const jobId of erroredJobIds) { + this.worker.emit("error", new Error(`could not renew lock for job ${jobId}`)); + } + } + const succeededJobIds = jobIds.filter((id) => !erroredJobIds.includes(id)); + if (succeededJobIds.length > 0) { + this.worker.emit("locksRenewed", { + count: succeededJobIds.length, + jobIds: succeededJobIds + }); + } + } catch (err) { + this.worker.emit("error", err); + } + }); + } + startLockExtenderTimer() { + clearTimeout(this.lockRenewalTimer); + if (!this.closed) { + this.lockRenewalTimer = setTimeout(async () => { + const now = Date.now(); + const jobsToExtend = []; + for (const jobId of this.trackedJobs.keys()) { + const tracked2 = this.trackedJobs.get(jobId); + const { ts, token, abortController } = tracked2; + if (!ts) { + this.trackedJobs.set(jobId, { token, ts: now, abortController }); + continue; + } + if (ts + this.opts.lockRenewTime / 2 < now) { + this.trackedJobs.set(jobId, { token, ts: now, abortController }); + jobsToExtend.push(jobId); + } + } + if (jobsToExtend.length) { + await this.extendLocks(jobsToExtend); + } + this.startLockExtenderTimer(); + }, this.opts.lockRenewTime / 2); + } + } + /** + * Stops the lock manager and clears all timers. + */ + async close() { + if (this.closed) { + return; + } + this.closed = true; + if (this.lockRenewalTimer) { + clearTimeout(this.lockRenewalTimer); + this.lockRenewalTimer = void 0; + } + this.trackedJobs.clear(); + } + /** + * Adds a job to be tracked for lock renewal. + * Returns an AbortController if shouldCreateController is true, undefined otherwise. + */ + trackJob(jobId, token, ts, shouldCreateController = false) { + const abortController = shouldCreateController ? new import_node_abort_controller2.AbortController() : void 0; + if (!this.closed && jobId) { + this.trackedJobs.set(jobId, { token, ts, abortController }); + } + return abortController; + } + /** + * Removes a job from lock renewal tracking. + */ + untrackJob(jobId) { + this.trackedJobs.delete(jobId); + } + /** + * Gets the number of jobs currently being tracked. + */ + getActiveJobCount() { + return this.trackedJobs.size; + } + /** + * Checks if the lock manager is running. + */ + isRunning() { + return !this.closed && this.lockRenewalTimer !== void 0; + } + /** + * Cancels a specific job by aborting its signal. + * @param jobId - The ID of the job to cancel + * @param reason - Optional reason for the cancellation + * @returns true if the job was found and cancelled, false otherwise + */ + cancelJob(jobId, reason) { + const tracked2 = this.trackedJobs.get(jobId); + if (tracked2 === null || tracked2 === void 0 ? void 0 : tracked2.abortController) { + tracked2.abortController.abort(reason); + return true; + } + return false; + } + /** + * Cancels all tracked jobs by aborting their signals. + * @param reason - Optional reason for the cancellation + */ + cancelAllJobs(reason) { + for (const tracked2 of this.trackedJobs.values()) { + if (tracked2.abortController) { + tracked2.abortController.abort(reason); + } + } + } + /** + * Gets a list of all tracked job IDs. + * @returns Array of job IDs currently being tracked + */ + getTrackedJobIds() { + return Array.from(this.trackedJobs.keys()); + } +}; + +// ../../node_modules/bullmq/dist/esm/classes/queue-events.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/classes/queue-events-producer.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/classes/queue-getters.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var QueueGetters = class extends QueueBase { + static { + __name(this, "QueueGetters"); + } + getJob(jobId) { + return this.Job.fromId(this, jobId); + } + commandByType(types, count4, callback) { + return types.map((type) => { + type = type === "waiting" ? "wait" : type; + const key = this.toKey(type); + switch (type) { + case "completed": + case "failed": + case "delayed": + case "prioritized": + case "repeat": + case "waiting-children": + return callback(key, count4 ? "zcard" : "zrange"); + case "active": + case "wait": + case "paused": + return callback(key, count4 ? "llen" : "lrange"); + } + }); + } + sanitizeJobTypes(types) { + const currentTypes = typeof types === "string" ? [types] : types; + if (Array.isArray(currentTypes) && currentTypes.length > 0) { + const sanitizedTypes = [...currentTypes]; + if (sanitizedTypes.indexOf("waiting") !== -1) { + sanitizedTypes.push("paused"); + } + return [...new Set(sanitizedTypes)]; + } + return [ + "active", + "completed", + "delayed", + "failed", + "paused", + "prioritized", + "waiting", + "waiting-children" + ]; + } + /** + Returns the number of jobs waiting to be processed. This includes jobs that are + "waiting" or "delayed" or "prioritized" or "waiting-children". + */ + async count() { + const count4 = await this.getJobCountByTypes("waiting", "paused", "delayed", "prioritized", "waiting-children"); + return count4; + } + /** + * Returns the time to live for a rate limited key in milliseconds. + * @param maxJobs - max jobs to be considered in rate limit state. If not passed + * it will return the remaining ttl without considering if max jobs is excedeed. + * @returns -2 if the key does not exist. + * -1 if the key exists but has no associated expire. + * @see {@link https://redis.io/commands/pttl/} + */ + async getRateLimitTtl(maxJobs) { + return this.scripts.getRateLimitTtl(maxJobs); + } + /** + * Get jobId that starts debounced state. + * @deprecated use getDeduplicationJobId method + * + * @param id - debounce identifier + */ + async getDebounceJobId(id) { + const client = await this.client; + return client.get(`${this.keys.de}:${id}`); + } + /** + * Get jobId from deduplicated state. + * + * @param id - deduplication identifier + */ + async getDeduplicationJobId(id) { + const client = await this.client; + return client.get(`${this.keys.de}:${id}`); + } + /** + * Get global concurrency value. + * Returns null in case no value is set. + */ + async getGlobalConcurrency() { + const client = await this.client; + const concurrency = await client.hget(this.keys.meta, "concurrency"); + if (concurrency) { + return Number(concurrency); + } + return null; + } + /** + * Get global rate limit values. + * Returns null in case no value is set. + */ + async getGlobalRateLimit() { + const client = await this.client; + const [max2, duration3] = await client.hmget(this.keys.meta, "max", "duration"); + if (max2 && duration3) { + return { + max: Number(max2), + duration: Number(duration3) + }; + } + return null; + } + /** + * Job counts by type + * + * Queue#getJobCountByTypes('completed') =\> completed count + * Queue#getJobCountByTypes('completed', 'failed') =\> completed + failed count + * Queue#getJobCountByTypes('completed', 'waiting', 'failed') =\> completed + waiting + failed count + */ + async getJobCountByTypes(...types) { + const result = await this.getJobCounts(...types); + return Object.values(result).reduce((sum2, count4) => sum2 + count4, 0); + } + /** + * Returns the job counts for each type specified or every list/set in the queue by default. + * @param types - the types of jobs to count. If not specified, it will return the counts for all types. + * @returns An object, key (type) and value (count) + */ + async getJobCounts(...types) { + const currentTypes = this.sanitizeJobTypes(types); + const responses = await this.scripts.getCounts(currentTypes); + const counts = {}; + responses.forEach((res, index) => { + counts[currentTypes[index]] = res || 0; + }); + return counts; + } + /** + * Records job counts as gauge metrics for telemetry purposes. + * Each job state count is recorded with the queue name and state as attributes. + * @param types - the types of jobs to count. If not specified, it will return the counts for all types. + * @returns An object, key (type) and value (count) + */ + async recordJobCountsMetric(...types) { + var _a2; + const counts = await this.getJobCounts(...types); + const meter = (_a2 = this.opts.telemetry) === null || _a2 === void 0 ? void 0 : _a2.meter; + if (meter && typeof meter.createGauge === "function") { + const gauge = meter.createGauge(MetricNames.QueueJobsCount, { + description: "Number of jobs in the queue by state", + unit: "{jobs}" + }); + for (const [state, jobCount] of Object.entries(counts)) { + gauge.record(jobCount, { + [TelemetryAttributes.QueueName]: this.name, + [TelemetryAttributes.QueueJobsState]: state + }); + } + } + return counts; + } + /** + * Get current job state. + * + * @param jobId - job identifier. + * @returns Returns one of these values: + * 'completed', 'failed', 'delayed', 'active', 'waiting', 'waiting-children', 'unknown'. + */ + getJobState(jobId) { + return this.scripts.getState(jobId); + } + /** + * Get global queue configuration. + * + * @returns Returns the global queue configuration. + */ + async getMeta() { + const client = await this.client; + const config3 = await client.hgetall(this.keys.meta); + const { concurrency, max: max2, duration: duration3, paused, "opts.maxLenEvents": maxLenEvents } = config3, rest = __rest(config3, ["concurrency", "max", "duration", "paused", "opts.maxLenEvents"]); + const parsedConfig = rest; + if (concurrency) { + parsedConfig["concurrency"] = Number(concurrency); + } + if (maxLenEvents) { + parsedConfig["maxLenEvents"] = Number(maxLenEvents); + } + if (max2) { + parsedConfig["max"] = Number(max2); + } + if (duration3) { + parsedConfig["duration"] = Number(duration3); + } + parsedConfig["paused"] = paused === "1"; + return parsedConfig; + } + /** + * @returns Returns the number of jobs in completed status. + */ + getCompletedCount() { + return this.getJobCountByTypes("completed"); + } + /** + * Returns the number of jobs in failed status. + */ + getFailedCount() { + return this.getJobCountByTypes("failed"); + } + /** + * Returns the number of jobs in delayed status. + */ + getDelayedCount() { + return this.getJobCountByTypes("delayed"); + } + /** + * Returns the number of jobs in active status. + */ + getActiveCount() { + return this.getJobCountByTypes("active"); + } + /** + * Returns the number of jobs in prioritized status. + */ + getPrioritizedCount() { + return this.getJobCountByTypes("prioritized"); + } + /** + * Returns the number of jobs per priority. + */ + async getCountsPerPriority(priorities) { + const uniquePriorities = [...new Set(priorities)]; + const responses = await this.scripts.getCountsPerPriority(uniquePriorities); + const counts = {}; + responses.forEach((res, index) => { + counts[`${uniquePriorities[index]}`] = res || 0; + }); + return counts; + } + /** + * Returns the number of jobs in waiting or paused statuses. + */ + getWaitingCount() { + return this.getJobCountByTypes("waiting"); + } + /** + * Returns the number of jobs in waiting-children status. + */ + getWaitingChildrenCount() { + return this.getJobCountByTypes("waiting-children"); + } + /** + * Returns the jobs that are in the "waiting" status. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + */ + getWaiting(start = 0, end = -1) { + return this.getJobs(["waiting"], start, end, true); + } + /** + * Returns the jobs that are in the "waiting-children" status. + * I.E. parent jobs that have at least one child that has not completed yet. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + */ + getWaitingChildren(start = 0, end = -1) { + return this.getJobs(["waiting-children"], start, end, true); + } + /** + * Returns the jobs that are in the "active" status. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + */ + getActive(start = 0, end = -1) { + return this.getJobs(["active"], start, end, true); + } + /** + * Returns the jobs that are in the "delayed" status. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + */ + getDelayed(start = 0, end = -1) { + return this.getJobs(["delayed"], start, end, true); + } + /** + * Returns the jobs that are in the "prioritized" status. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + */ + getPrioritized(start = 0, end = -1) { + return this.getJobs(["prioritized"], start, end, true); + } + /** + * Returns the jobs that are in the "completed" status. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + */ + getCompleted(start = 0, end = -1) { + return this.getJobs(["completed"], start, end, false); + } + /** + * Returns the jobs that are in the "failed" status. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + */ + getFailed(start = 0, end = -1) { + return this.getJobs(["failed"], start, end, false); + } + /** + * Returns the qualified job ids and the raw job data (if available) of the + * children jobs of the given parent job. + * It is possible to get either the already processed children, in this case + * an array of qualified job ids and their result values will be returned, + * or the pending children, in this case an array of qualified job ids will + * be returned. + * A qualified job id is a string representing the job id in a given queue, + * for example: "bull:myqueue:jobid". + * + * @param parentId - The id of the parent job + * @param type - "processed" | "pending" + * @param opts - Options for the query. + * + * @returns an object with the following shape: + * `{ items: { id: string, v?: any, err?: string } [], jobs: JobJsonRaw[], total: number}` + */ + async getDependencies(parentId, type, start, end) { + const key = this.toKey(type == "processed" ? `${parentId}:processed` : `${parentId}:dependencies`); + const { items, total, jobs } = await this.scripts.paginate(key, { + start, + end, + fetchJobs: true + }); + return { + items, + jobs, + total + }; + } + async getRanges(types, start = 0, end = 1, asc2 = false) { + const multiCommands = []; + this.commandByType(types, false, (key, command) => { + switch (command) { + case "lrange": + multiCommands.push("lrange"); + break; + case "zrange": + multiCommands.push("zrange"); + break; + } + }); + const responses = await this.scripts.getRanges(types, start, end, asc2); + let results = []; + responses.forEach((response, index) => { + const result = response || []; + if (asc2 && multiCommands[index] === "lrange") { + results = results.concat(result.reverse()); + } else { + results = results.concat(result); + } + }); + return [...new Set(results)]; + } + /** + * Returns the jobs that are on the given statuses (note that JobType is synonym for job status) + * @param types - the statuses of the jobs to return. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + * @param asc - if true, the jobs will be returned in ascending order. + */ + async getJobs(types, start = 0, end = -1, asc2 = false) { + const currentTypes = this.sanitizeJobTypes(types); + const jobIds = await this.getRanges(currentTypes, start, end, asc2); + return Promise.all(jobIds.map((jobId) => this.Job.fromId(this, jobId))); + } + /** + * Returns the logs for a given Job. + * @param jobId - the id of the job to get the logs for. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + * @param asc - if true, the jobs will be returned in ascending order. + */ + async getJobLogs(jobId, start = 0, end = -1, asc2 = true) { + const client = await this.client; + const multi = client.multi(); + const logsKey = this.toKey(jobId + ":logs"); + if (asc2) { + multi.lrange(logsKey, start, end); + } else { + multi.lrange(logsKey, -(end + 1), -(start + 1)); + } + multi.llen(logsKey); + const result = await multi.exec(); + if (!asc2) { + result[0][1].reverse(); + } + return { + logs: result[0][1], + count: result[1][1] + }; + } + async baseGetClients(matcher) { + const client = await this.client; + try { + if (client.isCluster) { + const clusterNodes = client.nodes(); + const clientsPerNode = []; + for (let nodeIndex = 0; nodeIndex < clusterNodes.length; nodeIndex++) { + const node = clusterNodes[nodeIndex]; + const clients = await node.client("LIST"); + const list = this.parseClientList(clients, matcher); + clientsPerNode.push(list); + } + const clientsFromNodeWithMostConnections = clientsPerNode.reduce((prev, current) => { + return prev.length > current.length ? prev : current; + }, []); + return clientsFromNodeWithMostConnections; + } else { + const clients = await client.client("LIST"); + const list = this.parseClientList(clients, matcher); + return list; + } + } catch (err) { + if (!clientCommandMessageReg.test(err.message)) { + throw err; + } + return [{ name: "GCP does not support client list" }]; + } + } + /** + * Get the worker list related to the queue. i.e. all the known + * workers that are available to process jobs for this queue. + * Note: GCP does not support SETNAME, so this call will not work + * + * @returns - Returns an array with workers info. + */ + getWorkers() { + const unnamedWorkerClientName = `${this.clientName()}`; + const namedWorkerClientName = `${this.clientName()}:w:`; + const matcher = /* @__PURE__ */ __name((name) => name && (name === unnamedWorkerClientName || name.startsWith(namedWorkerClientName)), "matcher"); + return this.baseGetClients(matcher); + } + /** + * Returns the current count of workers for the queue. + * + * getWorkersCount(): Promise + * + */ + async getWorkersCount() { + const workers = await this.getWorkers(); + return workers.length; + } + /** + * Get queue events list related to the queue. + * Note: GCP does not support SETNAME, so this call will not work + * + * @deprecated do not use this method, it will be removed in the future. + * + * @returns - Returns an array with queue events info. + */ + async getQueueEvents() { + const clientName = `${this.clientName()}${QUEUE_EVENT_SUFFIX}`; + return this.baseGetClients((name) => name === clientName); + } + /** + * Get queue metrics related to the queue. + * + * This method returns the gathered metrics for the queue. + * The metrics are represented as an array of job counts + * per unit of time (1 minute). + * + * @param start - Start point of the metrics, where 0 + * is the newest point to be returned. + * @param end - End point of the metrics, where -1 is the + * oldest point to be returned. + * + * @returns - Returns an object with queue metrics. + */ + async getMetrics(type, start = 0, end = -1) { + const [meta3, data, count4] = await this.scripts.getMetrics(type, start, end); + return { + meta: { + count: parseInt(meta3[0] || "0", 10), + prevTS: parseInt(meta3[1] || "0", 10), + prevCount: parseInt(meta3[2] || "0", 10) + }, + data: data.map((point2) => +point2 || 0), + count: count4 + }; + } + parseClientList(list, matcher) { + const lines = list.split(/\r?\n/); + const clients = []; + lines.forEach((line) => { + const client = {}; + const keyValues = line.split(" "); + keyValues.forEach(function(keyValue) { + const index = keyValue.indexOf("="); + const key = keyValue.substring(0, index); + const value = keyValue.substring(index + 1); + client[key] = value; + }); + const name = client["name"]; + if (matcher(name)) { + client["name"] = this.name; + client["rawname"] = name; + clients.push(client); + } + }); + return clients; + } + /** + * Export the metrics for the queue in the Prometheus format. + * Automatically exports all the counts returned by getJobCounts(). + * + * @returns - Returns a string with the metrics in the Prometheus format. + * + * @see {@link https://prometheus.io/docs/instrumenting/exposition_formats/} + * + **/ + async exportPrometheusMetrics(globalVariables) { + const counts = await this.getJobCounts(); + const metrics = []; + metrics.push("# HELP bullmq_job_count Number of jobs in the queue by state"); + metrics.push("# TYPE bullmq_job_count gauge"); + const variables = !globalVariables ? "" : Object.keys(globalVariables).reduce((acc, curr) => `${acc}, ${curr}="${globalVariables[curr]}"`, ""); + for (const [state, count4] of Object.entries(counts)) { + metrics.push(`bullmq_job_count{queue="${this.name}", state="${state}"${variables}} ${count4}`); + } + return metrics.join("\n"); + } +}; + +// ../../node_modules/bullmq/dist/esm/classes/queue.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/classes/repeat.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var import_cron_parser2 = __toESM(require_parser2()); +import { createHash } from "crypto"; +var Repeat = class extends QueueBase { + static { + __name(this, "Repeat"); + } + constructor(name, opts, Connection) { + super(name, opts, Connection); + this.repeatStrategy = opts.settings && opts.settings.repeatStrategy || getNextMillis; + this.repeatKeyHashAlgorithm = opts.settings && opts.settings.repeatKeyHashAlgorithm || "md5"; + } + async updateRepeatableJob(name, data, opts, { override }) { + var _a2, _b; + const repeatOpts = Object.assign({}, opts.repeat); + (_a2 = repeatOpts.pattern) !== null && _a2 !== void 0 ? _a2 : repeatOpts.pattern = repeatOpts.cron; + delete repeatOpts.cron; + const iterationCount = repeatOpts.count ? repeatOpts.count + 1 : 1; + if (typeof repeatOpts.limit !== "undefined" && iterationCount > repeatOpts.limit) { + return; + } + let now = Date.now(); + const { endDate } = repeatOpts; + if (endDate && now > new Date(endDate).getTime()) { + return; + } + const prevMillis = opts.prevMillis || 0; + now = prevMillis < now ? now : prevMillis; + const nextMillis = await this.repeatStrategy(now, repeatOpts, name); + const { every, pattern } = repeatOpts; + const hasImmediately = Boolean((every || pattern) && repeatOpts.immediately); + const offset = hasImmediately && every ? now - nextMillis : void 0; + if (nextMillis) { + if (!prevMillis && opts.jobId) { + repeatOpts.jobId = opts.jobId; + } + const legacyRepeatKey = getRepeatConcatOptions(name, repeatOpts); + const newRepeatKey = (_b = opts.repeat.key) !== null && _b !== void 0 ? _b : this.hash(legacyRepeatKey); + let repeatJobKey; + if (override) { + repeatJobKey = await this.scripts.addRepeatableJob(newRepeatKey, nextMillis, { + name, + endDate: endDate ? new Date(endDate).getTime() : void 0, + tz: repeatOpts.tz, + pattern, + every + }, legacyRepeatKey); + } else { + const client = await this.client; + repeatJobKey = await this.scripts.updateRepeatableJobMillis(client, newRepeatKey, nextMillis, legacyRepeatKey); + } + const { immediately } = repeatOpts, filteredRepeatOpts = __rest(repeatOpts, ["immediately"]); + return this.createNextJob(name, nextMillis, repeatJobKey, Object.assign(Object.assign({}, opts), { repeat: Object.assign({ offset }, filteredRepeatOpts) }), data, iterationCount, hasImmediately); + } + } + async createNextJob(name, nextMillis, repeatJobKey, opts, data, currentCount, hasImmediately) { + const jobId = this.getRepeatJobKey(name, nextMillis, repeatJobKey, data); + const now = Date.now(); + const delay2 = nextMillis + (opts.repeat.offset ? opts.repeat.offset : 0) - now; + const mergedOpts = Object.assign(Object.assign({}, opts), { jobId, delay: delay2 < 0 || hasImmediately ? 0 : delay2, timestamp: now, prevMillis: nextMillis, repeatJobKey }); + mergedOpts.repeat = Object.assign(Object.assign({}, opts.repeat), { count: currentCount }); + return this.Job.create(this, name, data, mergedOpts); + } + // TODO: remove legacy code in next breaking change + getRepeatJobKey(name, nextMillis, repeatJobKey, data) { + if (repeatJobKey.split(":").length > 2) { + return this.getRepeatJobId({ + name, + nextMillis, + namespace: this.hash(repeatJobKey), + jobId: data === null || data === void 0 ? void 0 : data.id + }); + } + return this.getRepeatDelayedJobId({ + customKey: repeatJobKey, + nextMillis + }); + } + async removeRepeatable(name, repeat, jobId) { + var _a2; + const repeatConcatOptions = getRepeatConcatOptions(name, Object.assign(Object.assign({}, repeat), { jobId })); + const repeatJobKey = (_a2 = repeat.key) !== null && _a2 !== void 0 ? _a2 : this.hash(repeatConcatOptions); + const legacyRepeatJobId = this.getRepeatJobId({ + name, + nextMillis: "", + namespace: this.hash(repeatConcatOptions), + jobId: jobId !== null && jobId !== void 0 ? jobId : repeat.jobId, + key: repeat.key + }); + return this.scripts.removeRepeatable(legacyRepeatJobId, repeatConcatOptions, repeatJobKey); + } + async removeRepeatableByKey(repeatJobKey) { + const data = this.keyToData(repeatJobKey); + const legacyRepeatJobId = this.getRepeatJobId({ + name: data.name, + nextMillis: "", + namespace: this.hash(repeatJobKey), + jobId: data.id + }); + return this.scripts.removeRepeatable(legacyRepeatJobId, "", repeatJobKey); + } + async getRepeatableData(client, key, next) { + const jobData = await client.hgetall(this.toKey("repeat:" + key)); + if (jobData) { + return { + key, + name: jobData.name, + endDate: parseInt(jobData.endDate) || null, + tz: jobData.tz || null, + pattern: jobData.pattern || null, + every: jobData.every || null, + next + }; + } + return this.keyToData(key, next); + } + keyToData(key, next) { + const data = key.split(":"); + const pattern = data.slice(4).join(":") || null; + return { + key, + name: data[0], + id: data[1] || null, + endDate: parseInt(data[2]) || null, + tz: data[3] || null, + pattern, + next + }; + } + async getRepeatableJobs(start = 0, end = -1, asc2 = false) { + const client = await this.client; + const key = this.keys.repeat; + const result = asc2 ? await client.zrange(key, start, end, "WITHSCORES") : await client.zrevrange(key, start, end, "WITHSCORES"); + const jobs = []; + for (let i = 0; i < result.length; i += 2) { + jobs.push(this.getRepeatableData(client, result[i], parseInt(result[i + 1]))); + } + return Promise.all(jobs); + } + async getRepeatableCount() { + const client = await this.client; + return client.zcard(this.toKey("repeat")); + } + hash(str) { + return createHash(this.repeatKeyHashAlgorithm).update(str).digest("hex"); + } + getRepeatDelayedJobId({ nextMillis, customKey }) { + return `repeat:${customKey}:${nextMillis}`; + } + getRepeatJobId({ name, nextMillis, namespace, jobId, key }) { + const checksum = key !== null && key !== void 0 ? key : this.hash(`${name}${jobId || ""}${namespace}`); + return `repeat:${checksum}:${nextMillis}`; + } +}; +function getRepeatConcatOptions(name, repeat) { + const endDate = repeat.endDate ? new Date(repeat.endDate).getTime() : ""; + const tz = repeat.tz || ""; + const pattern = repeat.pattern; + const suffix = (pattern ? pattern : String(repeat.every)) || ""; + const jobId = repeat.jobId ? repeat.jobId : ""; + return `${name}:${jobId}:${endDate}:${tz}:${suffix}`; +} +__name(getRepeatConcatOptions, "getRepeatConcatOptions"); +var getNextMillis = /* @__PURE__ */ __name((millis, opts) => { + const pattern = opts.pattern; + if (pattern && opts.every) { + throw new Error("Both .pattern and .every options are defined for this repeatable job"); + } + if (opts.every) { + return Math.floor(millis / opts.every) * opts.every + (opts.immediately ? 0 : opts.every); + } + const currentDate = opts.startDate && new Date(opts.startDate) > new Date(millis) ? new Date(opts.startDate) : new Date(millis); + const interval = (0, import_cron_parser2.parseExpression)(pattern, Object.assign(Object.assign({}, opts), { currentDate })); + try { + if (opts.immediately) { + return (/* @__PURE__ */ new Date()).getTime(); + } else { + return interval.next().getTime(); + } + } catch (e) { + } +}, "getNextMillis"); + +// ../../node_modules/bullmq/dist/esm/classes/queue.js +var Queue = class extends QueueGetters { + static { + __name(this, "Queue"); + } + constructor(name, opts, Connection) { + var _a2; + super(name, Object.assign({}, opts), Connection); + this.token = v4_default(); + this.libName = "bullmq"; + this.jobsOpts = (_a2 = opts === null || opts === void 0 ? void 0 : opts.defaultJobOptions) !== null && _a2 !== void 0 ? _a2 : {}; + this.waitUntilReady().then((client) => { + if (!this.closing && !(opts === null || opts === void 0 ? void 0 : opts.skipMetasUpdate)) { + return client.hmset(this.keys.meta, this.metaValues); + } + }).catch((err) => { + }); + } + emit(event, ...args) { + return super.emit(event, ...args); + } + off(eventName, listener) { + super.off(eventName, listener); + return this; + } + on(event, listener) { + super.on(event, listener); + return this; + } + once(event, listener) { + super.once(event, listener); + return this; + } + /** + * Returns this instance current default job options. + */ + get defaultJobOptions() { + return Object.assign({}, this.jobsOpts); + } + get metaValues() { + var _a2, _b, _c2, _d2; + return { + "opts.maxLenEvents": (_d2 = (_c2 = (_b = (_a2 = this.opts) === null || _a2 === void 0 ? void 0 : _a2.streams) === null || _b === void 0 ? void 0 : _b.events) === null || _c2 === void 0 ? void 0 : _c2.maxLen) !== null && _d2 !== void 0 ? _d2 : 1e4, + version: `${this.libName}:${version4}` + }; + } + /** + * Get library version. + * + * @returns the content of the meta.library field. + */ + async getVersion() { + const client = await this.client; + return await client.hget(this.keys.meta, "version"); + } + get repeat() { + return new Promise(async (resolve) => { + if (!this._repeat) { + this._repeat = new Repeat(this.name, Object.assign(Object.assign({}, this.opts), { connection: await this.client })); + this._repeat.on("error", this.emit.bind(this, "error")); + } + resolve(this._repeat); + }); + } + get jobScheduler() { + return new Promise(async (resolve) => { + if (!this._jobScheduler) { + this._jobScheduler = new JobScheduler(this.name, Object.assign(Object.assign({}, this.opts), { connection: await this.client })); + this._jobScheduler.on("error", this.emit.bind(this, "error")); + } + resolve(this._jobScheduler); + }); + } + /** + * Enable and set global concurrency value. + * @param concurrency - Maximum number of simultaneous jobs that the workers can handle. + * For instance, setting this value to 1 ensures that no more than one job + * is processed at any given time. If this limit is not defined, there will be no + * restriction on the number of concurrent jobs. + */ + async setGlobalConcurrency(concurrency) { + const client = await this.client; + return client.hset(this.keys.meta, "concurrency", concurrency); + } + /** + * Enable and set rate limit. + * @param max - Max number of jobs to process in the time period specified in `duration` + * @param duration - Time in milliseconds. During this time, a maximum of `max` jobs will be processed. + */ + async setGlobalRateLimit(max2, duration3) { + const client = await this.client; + return client.hset(this.keys.meta, "max", max2, "duration", duration3); + } + /** + * Remove global concurrency value. + */ + async removeGlobalConcurrency() { + const client = await this.client; + return client.hdel(this.keys.meta, "concurrency"); + } + /** + * Remove global rate limit values. + */ + async removeGlobalRateLimit() { + const client = await this.client; + return client.hdel(this.keys.meta, "max", "duration"); + } + /** + * Adds a new job to the queue. + * + * @param name - Name of the job to be added to the queue. + * @param data - Arbitrary data to append to the job. + * @param opts - Job options that affects how the job is going to be processed. + */ + async add(name, data, opts) { + return this.trace(SpanKind.PRODUCER, "add", `${this.name}.${name}`, async (span, srcPropagationMedatada) => { + var _a2; + if (srcPropagationMedatada && !((_a2 = opts === null || opts === void 0 ? void 0 : opts.telemetry) === null || _a2 === void 0 ? void 0 : _a2.omitContext)) { + const telemetry = { + metadata: srcPropagationMedatada + }; + opts = Object.assign(Object.assign({}, opts), { telemetry }); + } + const job = await this.addJob(name, data, opts); + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.JobName]: name, + [TelemetryAttributes.JobId]: job.id + }); + return job; + }); + } + /** + * addJob is a telemetry free version of the add method, useful in order to wrap it + * with custom telemetry on subclasses. + * + * @param name - Name of the job to be added to the queue. + * @param data - Arbitrary data to append to the job. + * @param opts - Job options that affects how the job is going to be processed. + * + * @returns Job + */ + async addJob(name, data, opts) { + if (opts && opts.repeat) { + if (opts.repeat.endDate) { + if (+new Date(opts.repeat.endDate) < Date.now()) { + throw new Error("End date must be greater than current timestamp"); + } + } + return (await this.repeat).updateRepeatableJob(name, data, Object.assign(Object.assign({}, this.jobsOpts), opts), { override: true }); + } else { + const jobId = opts === null || opts === void 0 ? void 0 : opts.jobId; + if (jobId == "0" || (jobId === null || jobId === void 0 ? void 0 : jobId.startsWith("0:"))) { + throw new Error("JobId cannot be '0' or start with 0:"); + } + const job = await this.Job.create(this, name, data, Object.assign(Object.assign(Object.assign({}, this.jobsOpts), opts), { jobId })); + this.emit("waiting", job); + return job; + } + } + /** + * Adds an array of jobs to the queue. This method may be faster than adding + * one job at a time in a sequence. + * + * @param jobs - The array of jobs to add to the queue. Each job is defined by 3 + * properties, 'name', 'data' and 'opts'. They follow the same signature as 'Queue.add'. + */ + async addBulk(jobs) { + return this.trace(SpanKind.PRODUCER, "addBulk", this.name, async (span, srcPropagationMedatada) => { + if (span) { + span.setAttributes({ + [TelemetryAttributes.BulkNames]: jobs.map((job) => job.name), + [TelemetryAttributes.BulkCount]: jobs.length + }); + } + return await this.Job.createBulk(this, jobs.map((job) => { + var _a2, _b, _c2, _d2, _e2, _f; + let telemetry = (_a2 = job.opts) === null || _a2 === void 0 ? void 0 : _a2.telemetry; + if (srcPropagationMedatada) { + const omitContext = (_c2 = (_b = job.opts) === null || _b === void 0 ? void 0 : _b.telemetry) === null || _c2 === void 0 ? void 0 : _c2.omitContext; + const telemetryMetadata = ((_e2 = (_d2 = job.opts) === null || _d2 === void 0 ? void 0 : _d2.telemetry) === null || _e2 === void 0 ? void 0 : _e2.metadata) || !omitContext && srcPropagationMedatada; + if (telemetryMetadata || omitContext) { + telemetry = { + metadata: telemetryMetadata, + omitContext + }; + } + } + return { + name: job.name, + data: job.data, + opts: Object.assign(Object.assign(Object.assign({}, this.jobsOpts), job.opts), { jobId: (_f = job.opts) === null || _f === void 0 ? void 0 : _f.jobId, telemetry }) + }; + })); + }); + } + /** + * Upserts a scheduler. + * + * A scheduler is a job factory that creates jobs at a given interval. + * Upserting a scheduler will create a new job scheduler or update an existing one. + * It will also create the first job based on the repeat options and delayed accordingly. + * + * @param key - Unique key for the repeatable job meta. + * @param repeatOpts - Repeat options + * @param jobTemplate - Job template. If provided it will be used for all the jobs + * created by the scheduler. + * + * @returns The next job to be scheduled (would normally be in delayed state). + */ + async upsertJobScheduler(jobSchedulerId, repeatOpts, jobTemplate) { + var _a2, _b; + if (repeatOpts.endDate) { + if (+new Date(repeatOpts.endDate) < Date.now()) { + throw new Error("End date must be greater than current timestamp"); + } + } + return (await this.jobScheduler).upsertJobScheduler(jobSchedulerId, repeatOpts, (_a2 = jobTemplate === null || jobTemplate === void 0 ? void 0 : jobTemplate.name) !== null && _a2 !== void 0 ? _a2 : jobSchedulerId, (_b = jobTemplate === null || jobTemplate === void 0 ? void 0 : jobTemplate.data) !== null && _b !== void 0 ? _b : {}, Object.assign(Object.assign({}, this.jobsOpts), jobTemplate === null || jobTemplate === void 0 ? void 0 : jobTemplate.opts), { override: true }); + } + /** + * Pauses the processing of this queue globally. + * + * We use an atomic RENAME operation on the wait queue. Since + * we have blocking calls with BRPOPLPUSH on the wait queue, as long as the queue + * is renamed to 'paused', no new jobs will be processed (the current ones + * will run until finalized). + * + * Adding jobs requires a LUA script to check first if the paused list exist + * and in that case it will add it there instead of the wait list. + */ + async pause() { + await this.trace(SpanKind.INTERNAL, "pause", this.name, async () => { + await this.scripts.pause(true); + this.emit("paused"); + }); + } + /** + * Close the queue instance. + * + */ + async close() { + await this.trace(SpanKind.INTERNAL, "close", this.name, async () => { + if (!this.closing) { + if (this._repeat) { + await this._repeat.close(); + } + } + await super.close(); + }); + } + /** + * Overrides the rate limit to be active for the next jobs. + * + * @param expireTimeMs - expire time in ms of this rate limit. + */ + async rateLimit(expireTimeMs) { + await this.trace(SpanKind.INTERNAL, "rateLimit", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.QueueRateLimit]: expireTimeMs + }); + await this.client.then((client) => client.set(this.keys.limiter, Number.MAX_SAFE_INTEGER, "PX", expireTimeMs)); + }); + } + /** + * Resumes the processing of this queue globally. + * + * The method reverses the pause operation by resuming the processing of the + * queue. + */ + async resume() { + await this.trace(SpanKind.INTERNAL, "resume", this.name, async () => { + await this.scripts.pause(false); + this.emit("resumed"); + }); + } + /** + * Returns true if the queue is currently paused. + */ + async isPaused() { + const client = await this.client; + const pausedKeyExists = await client.hexists(this.keys.meta, "paused"); + return pausedKeyExists === 1; + } + /** + * Returns true if the queue is currently maxed. + */ + isMaxed() { + return this.scripts.isMaxed(); + } + /** + * Get all repeatable meta jobs. + * + * @deprecated This method is deprecated and will be removed in v6. Use getJobSchedulers instead. + * + * @param start - Offset of first job to return. + * @param end - Offset of last job to return. + * @param asc - Determine the order in which jobs are returned based on their + * next execution time. + */ + async getRepeatableJobs(start, end, asc2) { + return (await this.repeat).getRepeatableJobs(start, end, asc2); + } + /** + * Get Job Scheduler by id + * + * @param id - identifier of scheduler. + */ + async getJobScheduler(id) { + return (await this.jobScheduler).getScheduler(id); + } + /** + * Get all Job Schedulers + * + * @param start - Offset of first scheduler to return. + * @param end - Offset of last scheduler to return. + * @param asc - Determine the order in which schedulers are returned based on their + * next execution time. + */ + async getJobSchedulers(start, end, asc2) { + return (await this.jobScheduler).getJobSchedulers(start, end, asc2); + } + /** + * + * Get the number of job schedulers. + * + * @returns The number of job schedulers. + */ + async getJobSchedulersCount() { + return (await this.jobScheduler).getSchedulersCount(); + } + /** + * Removes a repeatable job. + * + * Note: you need to use the exact same repeatOpts when deleting a repeatable job + * than when adding it. + * + * @deprecated This method is deprecated and will be removed in v6. Use removeJobScheduler instead. + * + * @see removeRepeatableByKey + * + * @param name - Job name + * @param repeatOpts - Repeat options + * @param jobId - Job id to remove. If not provided, all jobs with the same repeatOpts + * @returns + */ + async removeRepeatable(name, repeatOpts, jobId) { + return this.trace(SpanKind.INTERNAL, "removeRepeatable", `${this.name}.${name}`, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.JobName]: name, + [TelemetryAttributes.JobId]: jobId + }); + const repeat = await this.repeat; + const removed = await repeat.removeRepeatable(name, repeatOpts, jobId); + return !removed; + }); + } + /** + * + * Removes a job scheduler. + * + * @param jobSchedulerId - identifier of the job scheduler. + * + * @returns + */ + async removeJobScheduler(jobSchedulerId) { + const jobScheduler = await this.jobScheduler; + const removed = await jobScheduler.removeJobScheduler(jobSchedulerId); + return !removed; + } + /** + * Removes a debounce key. + * @deprecated use removeDeduplicationKey + * + * @param id - debounce identifier + */ + async removeDebounceKey(id) { + return this.trace(SpanKind.INTERNAL, "removeDebounceKey", `${this.name}`, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.JobKey]: id + }); + const client = await this.client; + return await client.del(`${this.keys.de}:${id}`); + }); + } + /** + * Removes a deduplication key. + * + * @param id - identifier + */ + async removeDeduplicationKey(id) { + return this.trace(SpanKind.INTERNAL, "removeDeduplicationKey", `${this.name}`, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.DeduplicationKey]: id + }); + const client = await this.client; + return client.del(`${this.keys.de}:${id}`); + }); + } + /** + * Removes rate limit key. + */ + async removeRateLimitKey() { + const client = await this.client; + return client.del(this.keys.limiter); + } + /** + * Removes a repeatable job by its key. Note that the key is the one used + * to store the repeatable job metadata and not one of the job iterations + * themselves. You can use "getRepeatableJobs" in order to get the keys. + * + * @see getRepeatableJobs + * + * @deprecated This method is deprecated and will be removed in v6. Use removeJobScheduler instead. + * + * @param repeatJobKey - To the repeatable job. + * @returns + */ + async removeRepeatableByKey(key) { + return this.trace(SpanKind.INTERNAL, "removeRepeatableByKey", `${this.name}`, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.JobKey]: key + }); + const repeat = await this.repeat; + const removed = await repeat.removeRepeatableByKey(key); + return !removed; + }); + } + /** + * Removes the given job from the queue as well as all its + * dependencies. + * + * @param jobId - The id of the job to remove + * @param opts - Options to remove a job + * @returns 1 if it managed to remove the job or 0 if the job or + * any of its dependencies were locked. + */ + async remove(jobId, { removeChildren = true } = {}) { + return this.trace(SpanKind.INTERNAL, "remove", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.JobId]: jobId, + [TelemetryAttributes.JobOptions]: JSON.stringify({ + removeChildren + }) + }); + const code = await this.scripts.remove(jobId, removeChildren); + if (code === 1) { + this.emit("removed", jobId); + } + return code; + }); + } + /** + * Updates the given job's progress. + * + * @param jobId - The id of the job to update + * @param progress - Number or object to be saved as progress. + */ + async updateJobProgress(jobId, progress) { + await this.trace(SpanKind.INTERNAL, "updateJobProgress", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.JobId]: jobId, + [TelemetryAttributes.JobProgress]: JSON.stringify(progress) + }); + await this.scripts.updateProgress(jobId, progress); + this.emit("progress", jobId, progress); + }); + } + /** + * Logs one row of job's log data. + * + * @param jobId - The job id to log against. + * @param logRow - String with log data to be logged. + * @param keepLogs - Max number of log entries to keep (0 for unlimited). + * + * @returns The total number of log entries for this job so far. + */ + async addJobLog(jobId, logRow, keepLogs) { + return Job.addJobLog(this, jobId, logRow, keepLogs); + } + /** + * Drains the queue, i.e., removes all jobs that are waiting + * or delayed, but not active, completed or failed. + * + * @param delayed - Pass true if it should also clean the + * delayed jobs. + */ + async drain(delayed = false) { + await this.trace(SpanKind.INTERNAL, "drain", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.QueueDrainDelay]: delayed + }); + await this.scripts.drain(delayed); + }); + } + /** + * Cleans jobs from a queue. Similar to drain but keeps jobs within a certain + * grace period. + * + * @param grace - The grace period in milliseconds + * @param limit - Max number of jobs to clean + * @param type - The type of job to clean + * Possible values are completed, wait, active, paused, delayed, failed. Defaults to completed. + * @returns Id jobs from the deleted records + */ + async clean(grace, limit, type = "completed") { + return this.trace(SpanKind.INTERNAL, "clean", this.name, async (span) => { + const maxCount = limit || Infinity; + const maxCountPerCall = Math.min(1e4, maxCount); + const timestamp = Date.now() - grace; + let deletedCount = 0; + const deletedJobsIds = []; + const normalizedType = type === "waiting" ? "wait" : type; + while (deletedCount < maxCount) { + const jobsIds = await this.scripts.cleanJobsInSet(normalizedType, timestamp, maxCountPerCall); + this.emit("cleaned", jobsIds, normalizedType); + deletedCount += jobsIds.length; + deletedJobsIds.push(...jobsIds); + if (jobsIds.length < maxCountPerCall) { + break; + } + } + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.QueueGrace]: grace, + [TelemetryAttributes.JobType]: type, + [TelemetryAttributes.QueueCleanLimit]: maxCount, + [TelemetryAttributes.JobIds]: deletedJobsIds + }); + return deletedJobsIds; + }); + } + /** + * Completely destroys the queue and all of its contents irreversibly. + * This method will *pause* the queue and requires that there are no + * active jobs. It is possible to bypass this requirement, i.e. not + * having active jobs using the "force" option. + * + * Note: This operation requires to iterate on all the jobs stored in the queue + * and can be slow for very large queues. + * + * @param opts - Obliterate options. + */ + async obliterate(opts) { + await this.trace(SpanKind.INTERNAL, "obliterate", this.name, async () => { + await this.pause(); + let cursor = 0; + do { + cursor = await this.scripts.obliterate(Object.assign({ force: false, count: 1e3 }, opts)); + } while (cursor); + }); + } + /** + * Retry all the failed or completed jobs. + * + * @param opts - An object with the following properties: + * - count number to limit how many jobs will be moved to wait status per iteration, + * - state failed by default or completed. + * - timestamp from which timestamp to start moving jobs to wait status, default Date.now(). + * + * @returns + */ + async retryJobs(opts = {}) { + await this.trace(SpanKind.PRODUCER, "retryJobs", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.QueueOptions]: JSON.stringify(opts) + }); + let cursor = 0; + do { + cursor = await this.scripts.retryJobs(opts.state, opts.count, opts.timestamp); + } while (cursor); + }); + } + /** + * Promote all the delayed jobs. + * + * @param opts - An object with the following properties: + * - count number to limit how many jobs will be moved to wait status per iteration + * + * @returns + */ + async promoteJobs(opts = {}) { + await this.trace(SpanKind.INTERNAL, "promoteJobs", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.QueueOptions]: JSON.stringify(opts) + }); + let cursor = 0; + do { + cursor = await this.scripts.promoteJobs(opts.count); + } while (cursor); + }); + } + /** + * Trim the event stream to an approximately maxLength. + * + * @param maxLength - + */ + async trimEvents(maxLength) { + return this.trace(SpanKind.INTERNAL, "trimEvents", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.QueueEventMaxLength]: maxLength + }); + const client = await this.client; + return await client.xtrim(this.keys.events, "MAXLEN", "~", maxLength); + }); + } + /** + * Delete old priority helper key. + */ + async removeDeprecatedPriorityKey() { + const client = await this.client; + return client.del(this.toKey("priority")); + } + /** + * Removes orphaned job keys that exist in Redis but are not referenced + * in any queue state set. + * + * Orphaned keys can occur in rare cases when the removal-by-max-age logic + * removes sorted-set entries without fully cleaning up the corresponding + * job hash data (a regression introduced in v5.66.6 via #3694). + * Under normal operation this method is + * **not needed** — it is provided only as a one-time migration helper for + * users who were affected by that specific bug and want to reclaim the + * leaked memory. + * + * The method uses a Lua script so that every check-and-delete cycle is + * atomic (per SCAN iteration). State keys are derived dynamically from + * the queue's key map and their Redis TYPE is checked at runtime, so newly + * introduced states are picked up automatically. + * + * @param count - Approximate number of keys to SCAN per iteration (default 1000). + * @param limit - Maximum number of orphaned jobs to remove (0 = unlimited). + * When set, the method returns as soon as the limit is reached. + * Users with a very large number of orphans can call this method + * in a loop: `while (await queue.removeOrphanedJobs(1000, 10000)) {}` + * @returns The total number of orphaned jobs that were removed. + */ + async removeOrphanedJobs(count4 = 1e3, limit = 0) { + const client = await this.client; + const knownSuffixes = new Set(Object.keys(this.keys)); + const stateKeySuffixes = Object.keys(this.keys).filter((s) => s !== ""); + const jobSubKeySuffixes = [ + "logs", + "dependencies", + "processed", + "failed", + "unsuccessful", + "lock" + ]; + const basePrefix = this.qualifiedName + ":"; + const scanPattern = basePrefix + "*"; + let totalRemoved = 0; + let cursor = "0"; + do { + const [nextCursor, keys] = await client.scan(cursor, "MATCH", scanPattern, "COUNT", count4); + cursor = nextCursor; + const candidateJobIds = /* @__PURE__ */ new Set(); + for (const key of keys) { + const suffix = key.slice(basePrefix.length); + if (knownSuffixes.has(suffix)) { + continue; + } + const colonIdx = suffix.indexOf(":"); + if (colonIdx !== -1) { + const prefixPart = suffix.slice(0, colonIdx); + if (knownSuffixes.has(prefixPart)) { + continue; + } + } + const jobId = colonIdx === -1 ? suffix : suffix.slice(0, colonIdx); + if (colonIdx !== -1) { + const subKey = suffix.slice(colonIdx + 1); + if (!jobSubKeySuffixes.includes(subKey)) { + continue; + } + } + candidateJobIds.add(jobId); + } + if (candidateJobIds.size === 0) { + continue; + } + const result = await this.scripts.removeOrphanedJobs([...candidateJobIds], stateKeySuffixes, jobSubKeySuffixes); + totalRemoved += result || 0; + if (limit > 0 && totalRemoved >= limit) { + break; + } + } while (cursor !== "0"); + return totalRemoved; + } +}; + +// ../../node_modules/bullmq/dist/esm/classes/sandbox.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var sandbox = /* @__PURE__ */ __name((processFile, childPool) => { + return /* @__PURE__ */ __name(async function process3(job, token, signal) { + let child; + let msgHandler; + let exitHandler; + let abortHandler; + try { + const done = new Promise((resolve, reject) => { + const initChild = /* @__PURE__ */ __name(async () => { + try { + exitHandler = /* @__PURE__ */ __name((exitCode2, signal2) => { + reject(new Error("Unexpected exit code: " + exitCode2 + " signal: " + signal2)); + }, "exitHandler"); + child = await childPool.retain(processFile); + child.on("exit", exitHandler); + msgHandler = /* @__PURE__ */ __name(async (msg) => { + var _a2, _b, _c2, _d2, _e2; + try { + switch (msg.cmd) { + case ParentCommand.Completed: + resolve(msg.value); + break; + case ParentCommand.Failed: + case ParentCommand.Error: { + const err = new Error(); + Object.assign(err, msg.value); + reject(err); + break; + } + case ParentCommand.Progress: + await job.updateProgress(msg.value); + break; + case ParentCommand.Log: + await job.log(msg.value); + break; + case ParentCommand.MoveToDelayed: + await job.moveToDelayed((_a2 = msg.value) === null || _a2 === void 0 ? void 0 : _a2.timestamp, (_b = msg.value) === null || _b === void 0 ? void 0 : _b.token); + break; + case ParentCommand.MoveToWait: + await job.moveToWait((_c2 = msg.value) === null || _c2 === void 0 ? void 0 : _c2.token); + break; + case ParentCommand.MoveToWaitingChildren: + { + const value = await job.moveToWaitingChildren((_d2 = msg.value) === null || _d2 === void 0 ? void 0 : _d2.token, (_e2 = msg.value) === null || _e2 === void 0 ? void 0 : _e2.opts); + child.send({ + requestId: msg.requestId, + cmd: ChildCommand.MoveToWaitingChildrenResponse, + value + }); + } + break; + case ParentCommand.Update: + await job.updateData(msg.value); + break; + case ParentCommand.GetChildrenValues: + { + const value = await job.getChildrenValues(); + child.send({ + requestId: msg.requestId, + cmd: ChildCommand.GetChildrenValuesResponse, + value + }); + } + break; + case ParentCommand.GetIgnoredChildrenFailures: + { + const value = await job.getIgnoredChildrenFailures(); + child.send({ + requestId: msg.requestId, + cmd: ChildCommand.GetIgnoredChildrenFailuresResponse, + value + }); + } + break; + } + } catch (err) { + reject(err); + } + }, "msgHandler"); + child.on("message", msgHandler); + child.send({ + cmd: ChildCommand.Start, + job: job.asJSONSandbox(), + token + }); + if (signal) { + abortHandler = /* @__PURE__ */ __name(() => { + try { + child.send({ + cmd: ChildCommand.Cancel, + value: signal.reason + }); + } catch (_a2) { + } + }, "abortHandler"); + if (signal.aborted) { + abortHandler(); + } else { + signal.addEventListener("abort", abortHandler, { once: true }); + } + } + } catch (error50) { + reject(error50); + } + }, "initChild"); + initChild(); + }); + await done; + return done; + } finally { + if (signal && abortHandler) { + signal.removeEventListener("abort", abortHandler); + } + if (child) { + child.off("message", msgHandler); + child.off("exit", exitHandler); + if (child.exitCode === null && child.signalCode === null) { + childPool.release(child); + } + } + } + }, "process"); +}, "sandbox"); +var sandbox_default = sandbox; + +// ../../node_modules/bullmq/dist/esm/classes/worker.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +init_fs2(); +import { URL as URL2 } from "url"; +import * as path2 from "path"; +var import_node_abort_controller3 = __toESM(require_browser()); +var maximumBlockTimeout = 10; +var Worker2 = class extends QueueBase { + static { + __name(this, "Worker"); + } + static RateLimitError() { + return new RateLimitError(); + } + constructor(name, processor, opts, Connection) { + var _a2; + super(name, Object.assign(Object.assign({ drainDelay: 5, concurrency: 1, lockDuration: 3e4, maximumRateLimitDelay: 3e4, maxStalledCount: 1, stalledInterval: 3e4, autorun: true, runRetryDelay: 15e3 }, opts), { blockingConnection: true }), Connection); + this.abortDelayController = null; + this.blockUntil = 0; + this.drained = false; + this.limitUntil = 0; + this.processorAcceptsSignal = false; + this.waiting = null; + this.running = false; + this.mainLoopRunning = null; + if (!opts || !opts.connection) { + throw new Error("Worker requires a connection"); + } + if (typeof this.opts.maxStalledCount !== "number" || this.opts.maxStalledCount < 0) { + throw new Error("maxStalledCount must be greater or equal than 0"); + } + if (typeof this.opts.maxStartedAttempts === "number" && this.opts.maxStartedAttempts < 0) { + throw new Error("maxStartedAttempts must be greater or equal than 0"); + } + if (typeof this.opts.stalledInterval !== "number" || this.opts.stalledInterval <= 0) { + throw new Error("stalledInterval must be greater than 0"); + } + if (typeof this.opts.drainDelay !== "number" || this.opts.drainDelay <= 0) { + throw new Error("drainDelay must be greater than 0"); + } + this.concurrency = this.opts.concurrency; + this.opts.lockRenewTime = this.opts.lockRenewTime || this.opts.lockDuration / 2; + this.id = v4_default(); + this.createLockManager(); + if (processor) { + if (typeof processor === "function") { + this.processFn = processor; + this.processorAcceptsSignal = processor.length >= 3; + } else { + if (processor instanceof URL2) { + if (!existsSync(processor)) { + throw new Error(`URL ${processor} does not exist in the local file system`); + } + processor = processor.href; + } else { + const supportedFileTypes = [".js", ".ts", ".flow", ".cjs", ".mjs"]; + const processorFile = processor + (supportedFileTypes.includes(path2.extname(processor)) ? "" : ".js"); + if (!existsSync(processorFile)) { + throw new Error(`File ${processorFile} does not exist`); + } + } + const dirname2 = path2.dirname(module.filename || __filename); + const workerThreadsMainFile = path2.join(dirname2, "main-worker.js"); + const spawnProcessMainFile = path2.join(dirname2, "main.js"); + let mainFilePath = this.opts.useWorkerThreads ? workerThreadsMainFile : spawnProcessMainFile; + try { + statSync(mainFilePath); + } catch (_) { + const mainFile = this.opts.useWorkerThreads ? "main-worker.js" : "main.js"; + mainFilePath = path2.join(process.cwd(), `dist/cjs/classes/${mainFile}`); + statSync(mainFilePath); + } + this.childPool = new ChildPool({ + mainFile: mainFilePath, + useWorkerThreads: this.opts.useWorkerThreads, + workerForkOptions: this.opts.workerForkOptions, + workerThreadsOptions: this.opts.workerThreadsOptions + }); + this.createSandbox(processor); + this.processorAcceptsSignal = true; + } + if (this.opts.autorun) { + this.run().catch((error50) => this.emit("error", error50)); + } + } + const connectionName = this.clientName() + (this.opts.name ? `:w:${this.opts.name}` : ""); + this.blockingConnection = new RedisConnection(isRedisInstance(opts.connection) ? opts.connection.isCluster ? opts.connection.duplicate(void 0, { + redisOptions: Object.assign(Object.assign({}, ((_a2 = opts.connection.options) === null || _a2 === void 0 ? void 0 : _a2.redisOptions) || {}), { connectionName }) + }) : opts.connection.duplicate({ connectionName }) : Object.assign(Object.assign({}, opts.connection), { connectionName }), { + shared: false, + blocking: true, + skipVersionCheck: opts.skipVersionCheck + }); + this.blockingConnection.on("error", (error50) => this.emit("error", error50)); + this.blockingConnection.on("ready", () => setTimeout(() => this.emit("ready"), 0)); + } + /** + * Creates and configures the lock manager for processing jobs. + * This method can be overridden in subclasses to customize lock manager behavior. + */ + createLockManager() { + this.lockManager = new LockManager(this, { + lockRenewTime: this.opts.lockRenewTime, + lockDuration: this.opts.lockDuration, + workerId: this.id, + workerName: this.opts.name + }); + } + /** + * Creates and configures the sandbox for processing jobs. + * This method can be overridden in subclasses to customize sandbox behavior. + * + * @param processor - The processor file path, URL, or function to be sandboxed + */ + createSandbox(processor) { + this.processFn = sandbox_default(processor, this.childPool).bind(this); + } + /** + * Public accessor method for LockManager to extend locks. + * This delegates to the protected scripts object. + */ + async extendJobLocks(jobIds, tokens, duration3) { + return this.scripts.extendLocks(jobIds, tokens, duration3); + } + emit(event, ...args) { + return super.emit(event, ...args); + } + off(eventName, listener) { + super.off(eventName, listener); + return this; + } + on(event, listener) { + super.on(event, listener); + return this; + } + once(event, listener) { + super.once(event, listener); + return this; + } + callProcessJob(job, token, signal) { + return this.processFn(job, token, signal); + } + createJob(data, jobId) { + return this.Job.fromJSON(this, data, jobId); + } + /** + * + * Waits until the worker is ready to start processing jobs. + * In general only useful when writing tests. + * + */ + async waitUntilReady() { + await super.waitUntilReady(); + return this.blockingConnection.client; + } + /** + * Cancels a specific job currently being processed by this worker. + * The job's processor function will receive an abort signal. + * + * @param jobId - The ID of the job to cancel + * @param reason - Optional reason for the cancellation + * @returns true if the job was found and cancelled, false otherwise + */ + cancelJob(jobId, reason) { + return this.lockManager.cancelJob(jobId, reason); + } + /** + * Cancels all jobs currently being processed by this worker. + * All active job processor functions will receive abort signals. + * + * @param reason - Optional reason for the cancellation + */ + cancelAllJobs(reason) { + this.lockManager.cancelAllJobs(reason); + } + set concurrency(concurrency) { + if (typeof concurrency !== "number" || concurrency < 1 || !isFinite(concurrency)) { + throw new Error("concurrency must be a finite number greater than 0"); + } + this._concurrency = concurrency; + } + get concurrency() { + return this._concurrency; + } + get repeat() { + return new Promise(async (resolve) => { + if (!this._repeat) { + const connection = await this.client; + this._repeat = new Repeat(this.name, Object.assign(Object.assign({}, this.opts), { connection })); + this._repeat.on("error", this.emit.bind(this, "error")); + } + resolve(this._repeat); + }); + } + get jobScheduler() { + return new Promise(async (resolve) => { + if (!this._jobScheduler) { + const connection = await this.client; + this._jobScheduler = new JobScheduler(this.name, Object.assign(Object.assign({}, this.opts), { connection })); + this._jobScheduler.on("error", this.emit.bind(this, "error")); + } + resolve(this._jobScheduler); + }); + } + async run() { + if (!this.processFn) { + throw new Error("No process function is defined."); + } + if (this.running) { + throw new Error("Worker is already running."); + } + try { + this.running = true; + if (this.closing || this.paused) { + return; + } + await this.startStalledCheckTimer(); + if (!this.opts.skipLockRenewal) { + this.lockManager.start(); + } + const client = await this.client; + const bclient = await this.blockingConnection.client; + this.mainLoopRunning = this.mainLoop(client, bclient); + await this.mainLoopRunning; + } finally { + this.running = false; + } + } + async waitForRateLimit() { + var _a2; + const limitUntil = this.limitUntil; + if (limitUntil > Date.now()) { + (_a2 = this.abortDelayController) === null || _a2 === void 0 ? void 0 : _a2.abort(); + this.abortDelayController = new import_node_abort_controller3.AbortController(); + const delay2 = this.getRateLimitDelay(limitUntil - Date.now()); + await this.delay(delay2, this.abortDelayController); + this.drained = false; + this.limitUntil = 0; + } + } + /** + * This is the main loop in BullMQ. Its goals are to fetch jobs from the queue + * as efficiently as possible, providing concurrency and minimal unnecessary calls + * to Redis. + */ + async mainLoop(client, bclient) { + const asyncFifoQueue = new AsyncFifoQueue(); + let tokenPostfix = 0; + while (!this.closing && !this.paused || asyncFifoQueue.numTotal() > 0) { + while (!this.closing && !this.paused && !this.waiting && asyncFifoQueue.numTotal() < this._concurrency && !this.isRateLimited()) { + const token = `${this.id}:${tokenPostfix++}`; + const fetchedJob = this.retryIfFailed(() => this._getNextJob(client, bclient, token, { block: true }), { + delayInMs: this.opts.runRetryDelay, + onlyEmitError: true + }); + asyncFifoQueue.add(fetchedJob); + if (this.waiting && asyncFifoQueue.numTotal() > 1) { + break; + } + const job2 = await fetchedJob; + if (!job2 && asyncFifoQueue.numTotal() > 1) { + break; + } + if (this.blockUntil) { + break; + } + } + let job; + do { + job = await asyncFifoQueue.fetch(); + } while (!job && asyncFifoQueue.numQueued() > 0); + if (job) { + const token = job.token; + asyncFifoQueue.add(this.processJob(job, token, () => asyncFifoQueue.numTotal() <= this._concurrency)); + } else if (asyncFifoQueue.numQueued() === 0) { + await this.waitForRateLimit(); + } + } + } + /** + * Returns a promise that resolves to the next job in queue. + * @param token - worker token to be assigned to retrieved job + * @returns a Job or undefined if no job was available in the queue. + */ + async getNextJob(token, { block = true } = {}) { + var _a2, _b; + const nextJob = await this._getNextJob(await this.client, await this.blockingConnection.client, token, { block }); + return this.trace(SpanKind.INTERNAL, "getNextJob", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.WorkerId]: this.id, + [TelemetryAttributes.QueueName]: this.name, + [TelemetryAttributes.WorkerName]: this.opts.name, + [TelemetryAttributes.WorkerOptions]: JSON.stringify({ block }), + [TelemetryAttributes.JobId]: nextJob === null || nextJob === void 0 ? void 0 : nextJob.id + }); + return nextJob; + }, (_b = (_a2 = nextJob === null || nextJob === void 0 ? void 0 : nextJob.opts) === null || _a2 === void 0 ? void 0 : _a2.telemetry) === null || _b === void 0 ? void 0 : _b.metadata); + } + async _getNextJob(client, bclient, token, { block = true } = {}) { + if (this.paused) { + return; + } + if (this.closing) { + return; + } + if (this.drained && block && !this.limitUntil && !this.waiting) { + this.waiting = this.waitForJob(bclient, this.blockUntil); + try { + this.blockUntil = await this.waiting; + if (this.blockUntil <= 0 || this.blockUntil - Date.now() < 1) { + return await this.moveToActive(client, token, this.opts.name); + } + } finally { + this.waiting = null; + } + } else { + if (!this.isRateLimited()) { + return this.moveToActive(client, token, this.opts.name); + } + } + } + /** + * Overrides the rate limit to be active for the next jobs. + * @deprecated This method is deprecated and will be removed in v6. Use queue.rateLimit method instead. + * @param expireTimeMs - expire time in ms of this rate limit. + */ + async rateLimit(expireTimeMs) { + await this.trace(SpanKind.INTERNAL, "rateLimit", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.WorkerId]: this.id, + [TelemetryAttributes.WorkerRateLimit]: expireTimeMs + }); + await this.client.then((client) => client.set(this.keys.limiter, Number.MAX_SAFE_INTEGER, "PX", expireTimeMs)); + }); + } + get minimumBlockTimeout() { + return this.blockingConnection.capabilities.canBlockFor1Ms ? ( + /* 1 millisecond is chosen because the granularity of our timestamps are milliseconds. + Obviously we can still process much faster than 1 job per millisecond but delays and rate limits + will never work with more accuracy than 1ms. */ + 1e-3 + ) : 2e-3; + } + isRateLimited() { + return this.limitUntil > Date.now(); + } + async moveToActive(client, token, name) { + const [jobData, id, rateLimitDelay, delayUntil] = await this.scripts.moveToActive(client, token, name); + this.updateDelays(rateLimitDelay, delayUntil); + return this.nextJobFromJobData(jobData, id, token); + } + async waitForJob(bclient, blockUntil) { + if (this.paused) { + return Infinity; + } + let timeout; + try { + if (!this.closing && !this.isRateLimited()) { + let blockTimeout = this.getBlockTimeout(blockUntil); + if (blockTimeout > 0) { + blockTimeout = this.blockingConnection.capabilities.canDoubleTimeout ? blockTimeout : Math.ceil(blockTimeout); + timeout = setTimeout(async () => { + bclient.disconnect(!this.closing); + }, blockTimeout * 1e3 + 1e3); + this.updateDelays(); + const result = await bclient.bzpopmin(this.keys.marker, blockTimeout); + if (result) { + const [_key2, member2, score] = result; + if (member2) { + const newBlockUntil = parseInt(score); + if (blockUntil && newBlockUntil > blockUntil) { + return blockUntil; + } + return newBlockUntil; + } + } + } + return 0; + } + } catch (error50) { + if (isNotConnectionError(error50)) { + this.emit("error", error50); + } + if (!this.closing) { + await this.delay(); + } + } finally { + clearTimeout(timeout); + } + return Infinity; + } + getBlockTimeout(blockUntil) { + const opts = this.opts; + if (blockUntil) { + const blockDelay = blockUntil - Date.now(); + if (blockDelay <= 0) { + return blockDelay; + } else if (blockDelay < this.minimumBlockTimeout * 1e3) { + return this.minimumBlockTimeout; + } else { + return Math.min(blockDelay / 1e3, maximumBlockTimeout); + } + } else { + return Math.max(opts.drainDelay, this.minimumBlockTimeout); + } + } + getRateLimitDelay(delay2) { + return Math.min(delay2, this.opts.maximumRateLimitDelay); + } + /** + * + * This function is exposed only for testing purposes. + */ + async delay(milliseconds, abortController) { + await delay(milliseconds || DELAY_TIME_1, abortController); + } + updateDelays(limitDelay = 0, delayUntil = 0) { + const clampedLimit = Math.max(limitDelay, 0); + if (clampedLimit > 0) { + this.limitUntil = Date.now() + clampedLimit; + } else { + this.limitUntil = 0; + } + this.blockUntil = Math.max(delayUntil, 0) || 0; + } + async nextJobFromJobData(jobData, jobId, token) { + if (!jobData) { + if (!this.drained) { + this.emit("drained"); + this.drained = true; + } + } else { + this.drained = false; + const job = this.createJob(jobData, jobId); + job.token = token; + try { + await this.retryIfFailed(async () => { + if (job.repeatJobKey && job.repeatJobKey.split(":").length < 5) { + const jobScheduler = await this.jobScheduler; + await jobScheduler.upsertJobScheduler( + // Most of these arguments are not really needed + // anymore as we read them from the job scheduler itself + job.repeatJobKey, + job.opts.repeat, + job.name, + job.data, + job.opts, + { override: false, producerId: job.id } + ); + } else if (job.opts.repeat) { + const repeat = await this.repeat; + await repeat.updateRepeatableJob(job.name, job.data, job.opts, { + override: false + }); + } + }, { delayInMs: this.opts.runRetryDelay }); + } catch (err) { + const errorMessage = err instanceof Error ? err.message : String(err); + const schedulingError = new Error(`Failed to add repeatable job for next iteration: ${errorMessage}`); + this.emit("error", schedulingError); + return void 0; + } + return job; + } + } + async processJob(job, token, fetchNextCallback = () => true) { + var _a2, _b; + const srcPropagationMedatada = (_b = (_a2 = job.opts) === null || _a2 === void 0 ? void 0 : _a2.telemetry) === null || _b === void 0 ? void 0 : _b.metadata; + return this.trace(SpanKind.CONSUMER, "process", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.WorkerId]: this.id, + [TelemetryAttributes.WorkerName]: this.opts.name, + [TelemetryAttributes.JobId]: job.id, + [TelemetryAttributes.JobName]: job.name + }); + this.emit("active", job, "waiting"); + const abortController = this.lockManager.trackJob(job.id, token, job.processedOn, this.processorAcceptsSignal); + try { + const unrecoverableErrorMessage = this.getUnrecoverableErrorMessage(job); + if (unrecoverableErrorMessage) { + const failed = await this.retryIfFailed(() => { + this.lockManager.untrackJob(job.id); + return this.handleFailed(new UnrecoverableError(unrecoverableErrorMessage), job, token, fetchNextCallback, span); + }, { delayInMs: this.opts.runRetryDelay, span }); + return failed; + } + const result = await this.callProcessJob(job, token, abortController ? abortController.signal : void 0); + return await this.retryIfFailed(() => { + this.lockManager.untrackJob(job.id); + return this.handleCompleted(result, job, token, fetchNextCallback, span); + }, { delayInMs: this.opts.runRetryDelay, span }); + } catch (err) { + const failed = await this.retryIfFailed(() => { + this.lockManager.untrackJob(job.id); + return this.handleFailed(err, job, token, fetchNextCallback, span); + }, { delayInMs: this.opts.runRetryDelay, span, onlyEmitError: true }); + return failed; + } finally { + this.lockManager.untrackJob(job.id); + const now = Date.now(); + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.JobFinishedTimestamp]: now, + [TelemetryAttributes.JobAttemptFinishedTimestamp]: job.finishedOn || now, + [TelemetryAttributes.JobProcessedTimestamp]: job.processedOn + }); + } + }, srcPropagationMedatada); + } + getUnrecoverableErrorMessage(job) { + if (job.deferredFailure) { + return job.deferredFailure; + } + if (this.opts.maxStartedAttempts && this.opts.maxStartedAttempts < job.attemptsStarted) { + return "job started more than allowable limit"; + } + } + async handleCompleted(result, job, token, fetchNextCallback = () => true, span) { + if (!this.connection.closing) { + const completed = await job.moveToCompleted(result, token, fetchNextCallback() && !(this.closing || this.paused)); + this.emit("completed", job, result, "active"); + span === null || span === void 0 ? void 0 : span.addEvent("job completed", { + [TelemetryAttributes.JobResult]: JSON.stringify(result) + }); + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.JobAttemptsMade]: job.attemptsMade + }); + if (Array.isArray(completed)) { + const [jobData, jobId, rateLimitDelay, delayUntil] = completed; + this.updateDelays(rateLimitDelay, delayUntil); + return this.nextJobFromJobData(jobData, jobId, token); + } + } + } + async handleFailed(err, job, token, fetchNextCallback = () => true, span) { + if (!this.connection.closing) { + if (err.message === RATE_LIMIT_ERROR) { + const rateLimitTtl = await this.moveLimitedBackToWait(job, token); + this.limitUntil = rateLimitTtl > 0 ? Date.now() + rateLimitTtl : 0; + return; + } + if (err instanceof DelayedError || err.name == "DelayedError" || err instanceof WaitingError || err.name == "WaitingError" || err instanceof WaitingChildrenError || err.name == "WaitingChildrenError") { + const client = await this.client; + return this.moveToActive(client, token, this.opts.name); + } + const result = await job.moveToFailed(err, token, fetchNextCallback() && !(this.closing || this.paused)); + this.emit("failed", job, err, "active"); + span === null || span === void 0 ? void 0 : span.addEvent("job failed", { + [TelemetryAttributes.JobFailedReason]: err.message + }); + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.JobAttemptsMade]: job.attemptsMade + }); + if (Array.isArray(result)) { + const [jobData, jobId, rateLimitDelay, delayUntil] = result; + this.updateDelays(rateLimitDelay, delayUntil); + return this.nextJobFromJobData(jobData, jobId, token); + } + } + } + /** + * + * Pauses the processing of this queue only for this worker. + */ + async pause(doNotWaitActive) { + await this.trace(SpanKind.INTERNAL, "pause", this.name, async (span) => { + var _a2; + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.WorkerId]: this.id, + [TelemetryAttributes.WorkerName]: this.opts.name, + [TelemetryAttributes.WorkerDoNotWaitActive]: doNotWaitActive + }); + if (!this.paused) { + this.paused = true; + if (!doNotWaitActive) { + await this.whenCurrentJobsFinished(); + } + (_a2 = this.stalledCheckStopper) === null || _a2 === void 0 ? void 0 : _a2.call(this); + this.emit("paused"); + } + }); + } + /** + * + * Resumes processing of this worker (if paused). + */ + resume() { + if (!this.running) { + this.trace(SpanKind.INTERNAL, "resume", this.name, (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.WorkerId]: this.id, + [TelemetryAttributes.WorkerName]: this.opts.name + }); + this.paused = false; + if (this.processFn) { + this.run(); + } + this.emit("resumed"); + }); + } + } + /** + * + * Checks if worker is paused. + * + * @returns true if worker is paused, false otherwise. + */ + isPaused() { + return !!this.paused; + } + /** + * + * Checks if worker is currently running. + * + * @returns true if worker is running, false otherwise. + */ + isRunning() { + return this.running; + } + /** + * + * Closes the worker and related redis connections. + * + * This method waits for current jobs to finalize before returning. + * + * @param force - Use force boolean parameter if you do not want to wait for + * current jobs to be processed. When using telemetry, be mindful that it can + * interfere with the proper closure of spans, potentially preventing them from being exported. + * + * @returns Promise that resolves when the worker has been closed. + */ + async close(force = false) { + if (this.closing) { + return this.closing; + } + this.closing = (async () => { + await this.trace(SpanKind.INTERNAL, "close", this.name, async (span) => { + var _a2, _b; + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.WorkerId]: this.id, + [TelemetryAttributes.WorkerName]: this.opts.name, + [TelemetryAttributes.WorkerForceClose]: force + }); + this.emit("closing", "closing queue"); + (_a2 = this.abortDelayController) === null || _a2 === void 0 ? void 0 : _a2.abort(); + const asyncCleanups = [ + () => { + return force || this.whenCurrentJobsFinished(false); + }, + () => this.lockManager.close(), + () => { + var _a3; + return (_a3 = this.childPool) === null || _a3 === void 0 ? void 0 : _a3.clean(); + }, + () => this.blockingConnection.close(force), + () => this.connection.close(force) + ]; + for (const cleanup of asyncCleanups) { + try { + await cleanup(); + } catch (err) { + this.emit("error", err); + } + } + (_b = this.stalledCheckStopper) === null || _b === void 0 ? void 0 : _b.call(this); + this.closed = true; + this.emit("closed"); + }); + })(); + return await this.closing; + } + /** + * + * Manually starts the stalled checker. + * The check will run once as soon as this method is called, and + * then every opts.stalledInterval milliseconds until the worker is closed. + * Note: Normally you do not need to call this method, since the stalled checker + * is automatically started when the worker starts processing jobs after + * calling run. However if you want to process the jobs manually you need + * to call this method to start the stalled checker. + * + * @see {@link https://docs.bullmq.io/patterns/manually-fetching-jobs} + */ + async startStalledCheckTimer() { + if (!this.opts.skipStalledCheck) { + if (!this.closing) { + await this.trace(SpanKind.INTERNAL, "startStalledCheckTimer", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.WorkerId]: this.id, + [TelemetryAttributes.WorkerName]: this.opts.name + }); + this.stalledChecker().catch((err) => { + this.emit("error", err); + }); + }); + } + } + } + async stalledChecker() { + while (!(this.closing || this.paused)) { + await this.checkConnectionError(() => this.moveStalledJobsToWait()); + await new Promise((resolve) => { + const timeout = setTimeout(resolve, this.opts.stalledInterval); + this.stalledCheckStopper = () => { + clearTimeout(timeout); + resolve(); + }; + }); + } + } + /** + * Returns a promise that resolves when active jobs are cleared + * + * @returns + */ + async whenCurrentJobsFinished(reconnect = true) { + if (this.waiting) { + await this.blockingConnection.disconnect(reconnect); + } else { + reconnect = false; + } + if (this.mainLoopRunning) { + await this.mainLoopRunning; + } + reconnect && await this.blockingConnection.reconnect(); + } + async retryIfFailed(fn, opts) { + var _a2; + let retry = 0; + const maxRetries = opts.maxRetries || Infinity; + do { + try { + return await fn(); + } catch (err) { + (_a2 = opts.span) === null || _a2 === void 0 ? void 0 : _a2.recordException(err.message); + if (isNotConnectionError(err)) { + if (!this.paused && !this.closing) { + this.emit("error", err); + } + if (opts.onlyEmitError) { + return; + } else { + throw err; + } + } else { + if (opts.delayInMs && !this.closing && !this.closed) { + await this.delay(opts.delayInMs, this.abortDelayController); + } + if (retry + 1 >= maxRetries) { + throw err; + } + } + } + } while (++retry < maxRetries); + } + async moveStalledJobsToWait() { + await this.trace(SpanKind.INTERNAL, "moveStalledJobsToWait", this.name, async (span) => { + const stalled = await this.scripts.moveStalledJobsToWait(); + span === null || span === void 0 ? void 0 : span.setAttributes({ + [TelemetryAttributes.WorkerId]: this.id, + [TelemetryAttributes.WorkerName]: this.opts.name, + [TelemetryAttributes.WorkerStalledJobs]: stalled + }); + stalled.forEach((jobId) => { + span === null || span === void 0 ? void 0 : span.addEvent("job stalled", { + [TelemetryAttributes.JobId]: jobId + }); + this.emit("stalled", jobId, "active"); + }); + }); + } + moveLimitedBackToWait(job, token) { + return job.moveToWait(token); + } +}; + +// ../../node_modules/bullmq/dist/esm/interfaces/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/advanced-options.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/backoff-options.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/base-job-options.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/child-message.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/connection.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/flow-job.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/ioredis-events.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/job-json.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/job-scheduler-json.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/lock-manager-worker-context.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/metrics-options.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/metrics.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/minimal-job.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/minimal-queue.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/parent-message.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/parent.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/parent-options.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/queue-meta.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/queue-options.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var ClientType; +(function(ClientType2) { + ClientType2["blocking"] = "blocking"; + ClientType2["normal"] = "normal"; +})(ClientType || (ClientType = {})); + +// ../../node_modules/bullmq/dist/esm/interfaces/rate-limiter-options.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/redis-options.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/redis-streams.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/repeatable-job.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/repeatable-options.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/repeat-options.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/retry-options.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/script-queue-context.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/sandboxed-job-processor.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/sandboxed-job.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/sandboxed-options.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/worker-options.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/telemetry.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/interfaces/receiver.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/types/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/types/backoff-strategy.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/types/database-type.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/types/deduplication-options.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/types/finished-status.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/types/job-json-sandbox.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/types/job-options.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/types/job-scheduler-template-options.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/types/job-type.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/types/job-progress.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/types/repeat-strategy.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/types/keep-jobs.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bullmq/dist/esm/types/processor.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/lib/notif-job.ts +var import_expo_server_sdk = __toESM(require_ExpoClient()); + +// src/lib/const-strings.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var NOTIFS_QUEUE = "notifications"; +var ORDER_PLACED_MESSAGE = "Your order has been placed successfully!"; +var ORDER_PACKAGED_MESSAGE = "Your order has been packaged and is ready for delivery."; +var ORDER_DELIVERED_MESSAGE = "Your order has been delivered."; +var ORDER_CANCELLED_MESSAGE = "Your order has been cancelled."; + +// src/lib/notif-job.ts +var notificationQueue = new Queue(NOTIFS_QUEUE, { + connection: { url: redisUrl }, + defaultJobOptions: { + removeOnComplete: true, + removeOnFail: 10, + attempts: 3 + } +}); +var notificationWorker = new Worker2(NOTIFS_QUEUE, async (job) => { + if (!job) return; + const { name, data } = job; + console.log(`Processing notification job ${job.id} - ${name}`); + if (name === "send-admin-notification") { + await sendAdminNotification(data); + } else if (name === "send-notification") { + console.log("Legacy notification job - not implemented yet"); + } +}, { + connection: { url: redisUrl }, + concurrency: 5 +}); +async function sendAdminNotification(data) { + const { token, title: title2, body, imageUrl } = data; + if (!import_expo_server_sdk.Expo.isExpoPushToken(token)) { + console.error(`Invalid Expo push token: ${token}`); + return; + } + const signedImageUrl = imageUrl ? await generateSignedUrlFromS3Url(imageUrl) : null; + const expo = new import_expo_server_sdk.Expo(); + const message2 = { + to: token, + sound: "default", + title: title2, + body, + data: { imageUrl }, + ...signedImageUrl ? { + attachments: [ + { + url: signedImageUrl, + contentType: "image/jpeg" + } + ] + } : {} + }; + try { + const [ticket] = await expo.sendPushNotificationsAsync([message2]); + console.log(`Notification sent:`, ticket); + } catch (error50) { + console.error(`Failed to send notification:`, error50); + throw error50; + } +} +__name(sendAdminNotification, "sendAdminNotification"); +notificationWorker.on("completed", (job) => { + if (job) console.log(`Notification job ${job.id} completed`); +}); +notificationWorker.on("failed", (job, err) => { + if (job) console.error(`Notification job ${job.id} failed:`, err); +}); +async function scheduleNotification(userId, payload, options) { + const jobData = { userId, ...payload }; + await notificationQueue.add("send-notification", jobData, options); +} +__name(scheduleNotification, "scheduleNotification"); +async function sendOrderPlacedNotification(userId, orderId) { + await scheduleNotification(userId, { + title: "Order Placed", + body: ORDER_PLACED_MESSAGE, + type: "order", + orderId + }); +} +__name(sendOrderPlacedNotification, "sendOrderPlacedNotification"); +async function sendOrderPackagedNotification(userId, orderId) { + await scheduleNotification(userId, { + title: "Order Packaged", + body: ORDER_PACKAGED_MESSAGE, + type: "order", + orderId + }); +} +__name(sendOrderPackagedNotification, "sendOrderPackagedNotification"); +async function sendOrderDeliveredNotification(userId, orderId) { + await scheduleNotification(userId, { + title: "Order Delivered", + body: ORDER_DELIVERED_MESSAGE, + type: "order", + orderId + }); +} +__name(sendOrderDeliveredNotification, "sendOrderDeliveredNotification"); +async function sendOrderCancelledNotification(userId, orderId) { + await scheduleNotification(userId, { + title: "Order Cancelled", + body: ORDER_CANCELLED_MESSAGE, + type: "order", + orderId + }); +} +__name(sendOrderCancelledNotification, "sendOrderCancelledNotification"); +process.on("SIGTERM", async () => { + await notificationQueue.close(); + await notificationWorker.close(); +}); + +// src/lib/post-order-handler.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/lib/redis-client.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var createClient = /* @__PURE__ */ __name((args) => { +}, "createClient"); +var RedisClient = class { + constructor() { + this.isConnected = false; + this.client = createClient({ + url: redisUrl + }); + } + static { + __name(this, "RedisClient"); + } + async set(key, value, ttlSeconds) { + if (ttlSeconds) { + return await this.client.setEx(key, ttlSeconds, value); + } else { + return await this.client.set(key, value); + } + } + async get(key) { + return await this.client.get(key); + } + async exists(key) { + const result = await this.client.exists(key); + return result === 1; + } + async delete(key) { + return await this.client.del(key); + } + async lPush(key, value) { + return await this.client.lPush(key, value); + } + async KEYS(pattern) { + return await this.client.KEYS(pattern); + } + async MGET(keys) { + return await this.client.MGET(keys); + } + // Publish message to a channel + async publish(channel2, message2) { + return await this.client.publish(channel2, message2); + } + // Subscribe to a channel with callback + async subscribe(channel2, callback) { + console.log(`Subscribed to channel: ${channel2}`); + } + // Unsubscribe from a channel + async unsubscribe(channel2) { + } + disconnect() { + } + get isClientConnected() { + return this.isConnected; + } +}; +var redisClient = new RedisClient(); +var redis_client_default = redisClient; + +// src/lib/telegram-service.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/axios.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/utils.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/helpers/bind.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function bind(fn, thisArg) { + return /* @__PURE__ */ __name(function wrap() { + return fn.apply(thisArg, arguments); + }, "wrap"); +} +__name(bind, "bind"); + +// ../../node_modules/axios/lib/utils.js +var { toString } = Object.prototype; +var { getPrototypeOf } = Object; +var { iterator, toStringTag } = Symbol; +var kindOf = /* @__PURE__ */ ((cache2) => (thing) => { + const str = toString.call(thing); + return cache2[str] || (cache2[str] = str.slice(8, -1).toLowerCase()); +})(/* @__PURE__ */ Object.create(null)); +var kindOfTest = /* @__PURE__ */ __name((type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type; +}, "kindOfTest"); +var typeOfTest = /* @__PURE__ */ __name((type) => (thing) => typeof thing === type, "typeOfTest"); +var { isArray } = Array; +var isUndefined = typeOfTest("undefined"); +function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction2(val.constructor.isBuffer) && val.constructor.isBuffer(val); +} +__name(isBuffer, "isBuffer"); +var isArrayBuffer2 = kindOfTest("ArrayBuffer"); +function isArrayBufferView(val) { + let result; + if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) { + result = ArrayBuffer.isView(val); + } else { + result = val && val.buffer && isArrayBuffer2(val.buffer); + } + return result; +} +__name(isArrayBufferView, "isArrayBufferView"); +var isString = typeOfTest("string"); +var isFunction2 = typeOfTest("function"); +var isNumber = typeOfTest("number"); +var isObject4 = /* @__PURE__ */ __name((thing) => thing !== null && typeof thing === "object", "isObject"); +var isBoolean = /* @__PURE__ */ __name((thing) => thing === true || thing === false, "isBoolean"); +var isPlainObject3 = /* @__PURE__ */ __name((val) => { + if (kindOf(val) !== "object") { + return false; + } + const prototype2 = getPrototypeOf(val); + return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val); +}, "isPlainObject"); +var isEmptyObject = /* @__PURE__ */ __name((val) => { + if (!isObject4(val) || isBuffer(val)) { + return false; + } + try { + return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype; + } catch (e) { + return false; + } +}, "isEmptyObject"); +var isDate = kindOfTest("Date"); +var isFile = kindOfTest("File"); +var isReactNativeBlob = /* @__PURE__ */ __name((value) => { + return !!(value && typeof value.uri !== "undefined"); +}, "isReactNativeBlob"); +var isReactNative = /* @__PURE__ */ __name((formData) => formData && typeof formData.getParts !== "undefined", "isReactNative"); +var isBlob = kindOfTest("Blob"); +var isFileList = kindOfTest("FileList"); +var isStream = /* @__PURE__ */ __name((val) => isObject4(val) && isFunction2(val.pipe), "isStream"); +function getGlobal() { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + return {}; +} +__name(getGlobal, "getGlobal"); +var G = getGlobal(); +var FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : void 0; +var isFormData = /* @__PURE__ */ __name((thing) => { + let kind; + return thing && (FormDataCtor && thing instanceof FormDataCtor || isFunction2(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance + kind === "object" && isFunction2(thing.toString) && thing.toString() === "[object FormData]")); +}, "isFormData"); +var isURLSearchParams = kindOfTest("URLSearchParams"); +var [isReadableStream2, isRequest, isResponse, isHeaders] = [ + "ReadableStream", + "Request", + "Response", + "Headers" +].map(kindOfTest); +var trim = /* @__PURE__ */ __name((str) => { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); +}, "trim"); +function forEach(obj, fn, { allOwnKeys = false } = {}) { + if (obj === null || typeof obj === "undefined") { + return; + } + let i; + let l; + if (typeof obj !== "object") { + obj = [obj]; + } + if (isArray(obj)) { + for (i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + if (isBuffer(obj)) { + return; + } + const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + fn.call(null, obj[key], key, obj); + } + } +} +__name(forEach, "forEach"); +function findKey(obj, key) { + if (isBuffer(obj)) { + return null; + } + key = key.toLowerCase(); + const keys = Object.keys(obj); + let i = keys.length; + let _key2; + while (i-- > 0) { + _key2 = keys[i]; + if (key === _key2.toLowerCase()) { + return _key2; + } + } + return null; +} +__name(findKey, "findKey"); +var _global = (() => { + if (typeof globalThis !== "undefined") return globalThis; + return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global; +})(); +var isContextDefined = /* @__PURE__ */ __name((context2) => !isUndefined(context2) && context2 !== _global, "isContextDefined"); +function merge3() { + const { caseless, skipUndefined } = isContextDefined(this) && this || {}; + const result = {}; + const assignValue = /* @__PURE__ */ __name((val, key) => { + if (key === "__proto__" || key === "constructor" || key === "prototype") { + return; + } + const targetKey = caseless && findKey(result, key) || key; + if (isPlainObject3(result[targetKey]) && isPlainObject3(val)) { + result[targetKey] = merge3(result[targetKey], val); + } else if (isPlainObject3(val)) { + result[targetKey] = merge3({}, val); + } else if (isArray(val)) { + result[targetKey] = val.slice(); + } else if (!skipUndefined || !isUndefined(val)) { + result[targetKey] = val; + } + }, "assignValue"); + for (let i = 0, l = arguments.length; i < l; i++) { + arguments[i] && forEach(arguments[i], assignValue); + } + return result; +} +__name(merge3, "merge"); +var extend2 = /* @__PURE__ */ __name((a, b, thisArg, { allOwnKeys } = {}) => { + forEach( + b, + (val, key) => { + if (thisArg && isFunction2(val)) { + Object.defineProperty(a, key, { + value: bind(val, thisArg), + writable: true, + enumerable: true, + configurable: true + }); + } else { + Object.defineProperty(a, key, { + value: val, + writable: true, + enumerable: true, + configurable: true + }); + } + }, + { allOwnKeys } + ); + return a; +}, "extend"); +var stripBOM = /* @__PURE__ */ __name((content52) => { + if (content52.charCodeAt(0) === 65279) { + content52 = content52.slice(1); + } + return content52; +}, "stripBOM"); +var inherits = /* @__PURE__ */ __name((constructor, superConstructor, props, descriptors) => { + constructor.prototype = Object.create(superConstructor.prototype, descriptors); + Object.defineProperty(constructor.prototype, "constructor", { + value: constructor, + writable: true, + enumerable: false, + configurable: true + }); + Object.defineProperty(constructor, "super", { + value: superConstructor.prototype + }); + props && Object.assign(constructor.prototype, props); +}, "inherits"); +var toFlatObject = /* @__PURE__ */ __name((sourceObj, destObj, filter2, propFilter) => { + let props; + let i; + let prop; + const merged = {}; + destObj = destObj || {}; + if (sourceObj == null) return destObj; + do { + props = Object.getOwnPropertyNames(sourceObj); + i = props.length; + while (i-- > 0) { + prop = props[i]; + if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; + } + } + sourceObj = filter2 !== false && getPrototypeOf(sourceObj); + } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype); + return destObj; +}, "toFlatObject"); +var endsWith = /* @__PURE__ */ __name((str, searchString, position3) => { + str = String(str); + if (position3 === void 0 || position3 > str.length) { + position3 = str.length; + } + position3 -= searchString.length; + const lastIndex = str.indexOf(searchString, position3); + return lastIndex !== -1 && lastIndex === position3; +}, "endsWith"); +var toArray = /* @__PURE__ */ __name((thing) => { + if (!thing) return null; + if (isArray(thing)) return thing; + let i = thing.length; + if (!isNumber(i)) return null; + const arr = new Array(i); + while (i-- > 0) { + arr[i] = thing[i]; + } + return arr; +}, "toArray"); +var isTypedArray = /* @__PURE__ */ ((TypedArray) => { + return (thing) => { + return TypedArray && thing instanceof TypedArray; + }; +})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array)); +var forEachEntry = /* @__PURE__ */ __name((obj, fn) => { + const generator = obj && obj[iterator]; + const _iterator = generator.call(obj); + let result; + while ((result = _iterator.next()) && !result.done) { + const pair = result.value; + fn.call(obj, pair[0], pair[1]); + } +}, "forEachEntry"); +var matchAll = /* @__PURE__ */ __name((regExp, str) => { + let matches; + const arr = []; + while ((matches = regExp.exec(str)) !== null) { + arr.push(matches); + } + return arr; +}, "matchAll"); +var isHTMLForm = kindOfTest("HTMLFormElement"); +var toCamelCase2 = /* @__PURE__ */ __name((str) => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, /* @__PURE__ */ __name(function replacer(m, p1, p2) { + return p1.toUpperCase() + p2; + }, "replacer")); +}, "toCamelCase"); +var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype); +var isRegExp = kindOfTest("RegExp"); +var reduceDescriptors = /* @__PURE__ */ __name((obj, reducer) => { + const descriptors = Object.getOwnPropertyDescriptors(obj); + const reducedDescriptors = {}; + forEach(descriptors, (descriptor, name) => { + let ret; + if ((ret = reducer(descriptor, name, obj)) !== false) { + reducedDescriptors[name] = ret || descriptor; + } + }); + Object.defineProperties(obj, reducedDescriptors); +}, "reduceDescriptors"); +var freezeMethods = /* @__PURE__ */ __name((obj) => { + reduceDescriptors(obj, (descriptor, name) => { + if (isFunction2(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) { + return false; + } + const value = obj[name]; + if (!isFunction2(value)) return; + descriptor.enumerable = false; + if ("writable" in descriptor) { + descriptor.writable = false; + return; + } + if (!descriptor.set) { + descriptor.set = () => { + throw Error("Can not rewrite read-only method '" + name + "'"); + }; + } + }); +}, "freezeMethods"); +var toObjectSet = /* @__PURE__ */ __name((arrayOrString, delimiter) => { + const obj = {}; + const define2 = /* @__PURE__ */ __name((arr) => { + arr.forEach((value) => { + obj[value] = true; + }); + }, "define"); + isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter)); + return obj; +}, "toObjectSet"); +var noop2 = /* @__PURE__ */ __name(() => { +}, "noop"); +var toFiniteNumber = /* @__PURE__ */ __name((value, defaultValue) => { + return value != null && Number.isFinite(value = +value) ? value : defaultValue; +}, "toFiniteNumber"); +function isSpecCompliantForm(thing) { + return !!(thing && isFunction2(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]); +} +__name(isSpecCompliantForm, "isSpecCompliantForm"); +var toJSONObject = /* @__PURE__ */ __name((obj) => { + const stack = new Array(10); + const visit = /* @__PURE__ */ __name((source, i) => { + if (isObject4(source)) { + if (stack.indexOf(source) >= 0) { + return; + } + if (isBuffer(source)) { + return source; + } + if (!("toJSON" in source)) { + stack[i] = source; + const target2 = isArray(source) ? [] : {}; + forEach(source, (value, key) => { + const reducedValue = visit(value, i + 1); + !isUndefined(reducedValue) && (target2[key] = reducedValue); + }); + stack[i] = void 0; + return target2; + } + } + return source; + }, "visit"); + return visit(obj, 0); +}, "toJSONObject"); +var isAsyncFn = kindOfTest("AsyncFunction"); +var isThenable = /* @__PURE__ */ __name((thing) => thing && (isObject4(thing) || isFunction2(thing)) && isFunction2(thing.then) && isFunction2(thing.catch), "isThenable"); +var _setImmediate = ((setImmediateSupported, postMessageSupported) => { + if (setImmediateSupported) { + return setImmediate; + } + return postMessageSupported ? ((token, callbacks) => { + _global.addEventListener( + "message", + ({ source, data }) => { + if (source === _global && data === token) { + callbacks.length && callbacks.shift()(); + } + }, + false + ); + return (cb) => { + callbacks.push(cb); + _global.postMessage(token, "*"); + }; + })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); +})(typeof setImmediate === "function", isFunction2(_global.postMessage)); +var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate; +var isIterable = /* @__PURE__ */ __name((thing) => thing != null && isFunction2(thing[iterator]), "isIterable"); +var utils_default = { + isArray, + isArrayBuffer: isArrayBuffer2, + isBuffer, + isFormData, + isArrayBufferView, + isString, + isNumber, + isBoolean, + isObject: isObject4, + isPlainObject: isPlainObject3, + isEmptyObject, + isReadableStream: isReadableStream2, + isRequest, + isResponse, + isHeaders, + isUndefined, + isDate, + isFile, + isReactNativeBlob, + isReactNative, + isBlob, + isRegExp, + isFunction: isFunction2, + isStream, + isURLSearchParams, + isTypedArray, + isFileList, + forEach, + merge: merge3, + extend: extend2, + trim, + stripBOM, + inherits, + toFlatObject, + kindOf, + kindOfTest, + endsWith, + toArray, + forEachEntry, + matchAll, + isHTMLForm, + hasOwnProperty, + hasOwnProp: hasOwnProperty, + // an alias to avoid ESLint no-prototype-builtins detection + reduceDescriptors, + freezeMethods, + toObjectSet, + toCamelCase: toCamelCase2, + noop: noop2, + toFiniteNumber, + findKey, + global: _global, + isContextDefined, + isSpecCompliantForm, + toJSONObject, + isAsyncFn, + isThenable, + setImmediate: _setImmediate, + asap, + isIterable +}; + +// ../../node_modules/axios/lib/core/Axios.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/helpers/buildURL.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/helpers/toFormData.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/core/AxiosError.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var AxiosError = class _AxiosError extends Error { + static { + __name(this, "AxiosError"); + } + static from(error50, code, config3, request, response, customProps) { + const axiosError = new _AxiosError(error50.message, code || error50.code, config3, request, response); + axiosError.cause = error50; + axiosError.name = error50.name; + if (error50.status != null && axiosError.status == null) { + axiosError.status = error50.status; + } + customProps && Object.assign(axiosError, customProps); + return axiosError; + } + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ + constructor(message2, code, config3, request, response) { + super(message2); + Object.defineProperty(this, "message", { + value: message2, + enumerable: true, + writable: true, + configurable: true + }); + this.name = "AxiosError"; + this.isAxiosError = true; + code && (this.code = code); + config3 && (this.config = config3); + request && (this.request = request); + if (response) { + this.response = response; + this.status = response.status; + } + } + toJSON() { + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: utils_default.toJSONObject(this.config), + code: this.code, + status: this.status + }; + } +}; +AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE"; +AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION"; +AxiosError.ECONNABORTED = "ECONNABORTED"; +AxiosError.ETIMEDOUT = "ETIMEDOUT"; +AxiosError.ERR_NETWORK = "ERR_NETWORK"; +AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS"; +AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED"; +AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE"; +AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST"; +AxiosError.ERR_CANCELED = "ERR_CANCELED"; +AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT"; +AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL"; +var AxiosError_default = AxiosError; + +// ../../node_modules/axios/lib/helpers/null.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var null_default = null; + +// ../../node_modules/axios/lib/helpers/toFormData.js +function isVisitable(thing) { + return utils_default.isPlainObject(thing) || utils_default.isArray(thing); +} +__name(isVisitable, "isVisitable"); +function removeBrackets(key) { + return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key; +} +__name(removeBrackets, "removeBrackets"); +function renderKey(path3, key, dots) { + if (!path3) return key; + return path3.concat(key).map(/* @__PURE__ */ __name(function each(token, i) { + token = removeBrackets(token); + return !dots && i ? "[" + token + "]" : token; + }, "each")).join(dots ? "." : ""); +} +__name(renderKey, "renderKey"); +function isFlatArray(arr) { + return utils_default.isArray(arr) && !arr.some(isVisitable); +} +__name(isFlatArray, "isFlatArray"); +var predicates = utils_default.toFlatObject(utils_default, {}, null, /* @__PURE__ */ __name(function filter(prop) { + return /^is[A-Z]/.test(prop); +}, "filter")); +function toFormData(obj, formData, options) { + if (!utils_default.isObject(obj)) { + throw new TypeError("target must be an object"); + } + formData = formData || new (null_default || FormData)(); + options = utils_default.toFlatObject( + options, + { + metaTokens: true, + dots: false, + indexes: false + }, + false, + /* @__PURE__ */ __name(function defined(option, source) { + return !utils_default.isUndefined(source[option]); + }, "defined") + ); + const metaTokens = options.metaTokens; + const visitor = options.visitor || defaultVisitor; + const dots = options.dots; + const indexes = options.indexes; + const _Blob = options.Blob || typeof Blob !== "undefined" && Blob; + const useBlob = _Blob && utils_default.isSpecCompliantForm(formData); + if (!utils_default.isFunction(visitor)) { + throw new TypeError("visitor must be a function"); + } + function convertValue(value) { + if (value === null) return ""; + if (utils_default.isDate(value)) { + return value.toISOString(); + } + if (utils_default.isBoolean(value)) { + return value.toString(); + } + if (!useBlob && utils_default.isBlob(value)) { + throw new AxiosError_default("Blob is not supported. Use a Buffer instead."); + } + if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) { + return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value); + } + return value; + } + __name(convertValue, "convertValue"); + function defaultVisitor(value, key, path3) { + let arr = value; + if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) { + formData.append(renderKey(path3, key, dots), convertValue(value)); + return false; + } + if (value && !path3 && typeof value === "object") { + if (utils_default.endsWith(key, "{}")) { + key = metaTokens ? key : key.slice(0, -2); + value = JSON.stringify(value); + } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) { + key = removeBrackets(key); + arr.forEach(/* @__PURE__ */ __name(function each(el, index) { + !(utils_default.isUndefined(el) || el === null) && formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", + convertValue(el) + ); + }, "each")); + return false; + } + } + if (isVisitable(value)) { + return true; + } + formData.append(renderKey(path3, key, dots), convertValue(value)); + return false; + } + __name(defaultVisitor, "defaultVisitor"); + const stack = []; + const exposedHelpers = Object.assign(predicates, { + defaultVisitor, + convertValue, + isVisitable + }); + function build(value, path3) { + if (utils_default.isUndefined(value)) return; + if (stack.indexOf(value) !== -1) { + throw Error("Circular reference detected in " + path3.join(".")); + } + stack.push(value); + utils_default.forEach(value, /* @__PURE__ */ __name(function each(el, key) { + const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path3, exposedHelpers); + if (result === true) { + build(el, path3 ? path3.concat(key) : [key]); + } + }, "each")); + stack.pop(); + } + __name(build, "build"); + if (!utils_default.isObject(obj)) { + throw new TypeError("data must be an object"); + } + build(obj); + return formData; +} +__name(toFormData, "toFormData"); +var toFormData_default = toFormData; + +// ../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js +function encode6(str) { + const charMap = { + "!": "%21", + "'": "%27", + "(": "%28", + ")": "%29", + "~": "%7E", + "%20": "+", + "%00": "\0" + }; + return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, /* @__PURE__ */ __name(function replacer(match2) { + return charMap[match2]; + }, "replacer")); +} +__name(encode6, "encode"); +function AxiosURLSearchParams(params, options) { + this._pairs = []; + params && toFormData_default(params, this, options); +} +__name(AxiosURLSearchParams, "AxiosURLSearchParams"); +var prototype = AxiosURLSearchParams.prototype; +prototype.append = /* @__PURE__ */ __name(function append(name, value) { + this._pairs.push([name, value]); +}, "append"); +prototype.toString = /* @__PURE__ */ __name(function toString2(encoder2) { + const _encode2 = encoder2 ? function(value) { + return encoder2.call(this, value, encode6); + } : encode6; + return this._pairs.map(/* @__PURE__ */ __name(function each(pair) { + return _encode2(pair[0]) + "=" + _encode2(pair[1]); + }, "each"), "").join("&"); +}, "toString"); +var AxiosURLSearchParams_default = AxiosURLSearchParams; + +// ../../node_modules/axios/lib/helpers/buildURL.js +function encode7(val) { + return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+"); +} +__name(encode7, "encode"); +function buildURL(url2, params, options) { + if (!params) { + return url2; + } + const _encode2 = options && options.encode || encode7; + const _options = utils_default.isFunction(options) ? { + serialize: options + } : options; + const serializeFn = _options && _options.serialize; + let serializedParams; + if (serializeFn) { + serializedParams = serializeFn(params, _options); + } else { + serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, _options).toString(_encode2); + } + if (serializedParams) { + const hashmarkIndex = url2.indexOf("#"); + if (hashmarkIndex !== -1) { + url2 = url2.slice(0, hashmarkIndex); + } + url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams; + } + return url2; +} +__name(buildURL, "buildURL"); + +// ../../node_modules/axios/lib/core/InterceptorManager.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var InterceptorManager = class { + static { + __name(this, "InterceptorManager"); + } + constructor() { + this.handlers = []; + } + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * @param {Object} options The options for the interceptor, synchronous and runWhen + * + * @return {Number} An ID used to remove interceptor later + */ + use(fulfilled, rejected, options) { + this.handlers.push({ + fulfilled, + rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null + }); + return this.handlers.length - 1; + } + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {void} + */ + eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } + } + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + clear() { + if (this.handlers) { + this.handlers = []; + } + } + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + forEach(fn) { + utils_default.forEach(this.handlers, /* @__PURE__ */ __name(function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }, "forEachHandler")); + } +}; +var InterceptorManager_default = InterceptorManager; + +// ../../node_modules/axios/lib/core/dispatchRequest.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/core/transformData.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/defaults/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/defaults/transitional.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var transitional_default = { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false, + legacyInterceptorReqResOrdering: true +}; + +// ../../node_modules/axios/lib/helpers/toURLEncodedForm.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/platform/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/platform/browser/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var URLSearchParams_default = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams_default; + +// ../../node_modules/axios/lib/platform/browser/classes/FormData.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var FormData_default = typeof FormData !== "undefined" ? FormData : null; + +// ../../node_modules/axios/lib/platform/browser/classes/Blob.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var Blob_default = typeof Blob !== "undefined" ? Blob : null; + +// ../../node_modules/axios/lib/platform/browser/index.js +var browser_default = { + isBrowser: true, + classes: { + URLSearchParams: URLSearchParams_default, + FormData: FormData_default, + Blob: Blob_default + }, + protocols: ["http", "https", "file", "blob", "url", "data"] +}; + +// ../../node_modules/axios/lib/platform/common/utils.js +var utils_exports = {}; +__export(utils_exports, { + hasBrowserEnv: () => hasBrowserEnv, + hasStandardBrowserEnv: () => hasStandardBrowserEnv, + hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv, + navigator: () => _navigator, + origin: () => origin +}); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined"; +var _navigator = typeof navigator === "object" && navigator || void 0; +var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0); +var hasStandardBrowserWebWorkerEnv = (() => { + return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && typeof self.importScripts === "function"; +})(); +var origin = hasBrowserEnv && window.location.href || "http://localhost"; + +// ../../node_modules/axios/lib/platform/index.js +var platform_default = { + ...utils_exports, + ...browser_default +}; + +// ../../node_modules/axios/lib/helpers/toURLEncodedForm.js +function toURLEncodedForm(data, options) { + return toFormData_default(data, new platform_default.classes.URLSearchParams(), { + visitor: /* @__PURE__ */ __name(function(value, key, path3, helpers) { + if (platform_default.isNode && utils_default.isBuffer(value)) { + this.append(key, value.toString("base64")); + return false; + } + return helpers.defaultVisitor.apply(this, arguments); + }, "visitor"), + ...options + }); +} +__name(toURLEncodedForm, "toURLEncodedForm"); + +// ../../node_modules/axios/lib/helpers/formDataToJSON.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function parsePropPath(name) { + return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match2) => { + return match2[0] === "[]" ? "" : match2[1] || match2[0]; + }); +} +__name(parsePropPath, "parsePropPath"); +function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i; + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + obj[key] = arr[key]; + } + return obj; +} +__name(arrayToObject, "arrayToObject"); +function formDataToJSON(formData) { + function buildPath(path3, value, target2, index) { + let name = path3[index++]; + if (name === "__proto__") return true; + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path3.length; + name = !name && utils_default.isArray(target2) ? target2.length : name; + if (isLast) { + if (utils_default.hasOwnProp(target2, name)) { + target2[name] = [target2[name], value]; + } else { + target2[name] = value; + } + return !isNumericKey; + } + if (!target2[name] || !utils_default.isObject(target2[name])) { + target2[name] = []; + } + const result = buildPath(path3, value, target2[name], index); + if (result && utils_default.isArray(target2[name])) { + target2[name] = arrayToObject(target2[name]); + } + return !isNumericKey; + } + __name(buildPath, "buildPath"); + if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) { + const obj = {}; + utils_default.forEachEntry(formData, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); + return obj; + } + return null; +} +__name(formDataToJSON, "formDataToJSON"); +var formDataToJSON_default = formDataToJSON; + +// ../../node_modules/axios/lib/defaults/index.js +function stringifySafely(rawValue, parser, encoder2) { + if (utils_default.isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return utils_default.trim(rawValue); + } catch (e) { + if (e.name !== "SyntaxError") { + throw e; + } + } + } + return (encoder2 || JSON.stringify)(rawValue); +} +__name(stringifySafely, "stringifySafely"); +var defaults = { + transitional: transitional_default, + adapter: ["xhr", "http", "fetch"], + transformRequest: [ + /* @__PURE__ */ __name(function transformRequest(data, headers) { + const contentType = headers.getContentType() || ""; + const hasJSONContentType = contentType.indexOf("application/json") > -1; + const isObjectPayload = utils_default.isObject(data); + if (isObjectPayload && utils_default.isHTMLForm(data)) { + data = new FormData(data); + } + const isFormData2 = utils_default.isFormData(data); + if (isFormData2) { + return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data; + } + if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) { + return data; + } + if (utils_default.isArrayBufferView(data)) { + return data.buffer; + } + if (utils_default.isURLSearchParams(data)) { + headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false); + return data.toString(); + } + let isFileList2; + if (isObjectPayload) { + if (contentType.indexOf("application/x-www-form-urlencoded") > -1) { + return toURLEncodedForm(data, this.formSerializer).toString(); + } + if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) { + const _FormData = this.env && this.env.FormData; + return toFormData_default( + isFileList2 ? { "files[]": data } : data, + _FormData && new _FormData(), + this.formSerializer + ); + } + } + if (isObjectPayload || hasJSONContentType) { + headers.setContentType("application/json", false); + return stringifySafely(data); + } + return data; + }, "transformRequest") + ], + transformResponse: [ + /* @__PURE__ */ __name(function transformResponse(data) { + const transitional2 = this.transitional || defaults.transitional; + const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing; + const JSONRequested = this.responseType === "json"; + if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) { + return data; + } + if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) { + const silentJSONParsing = transitional2 && transitional2.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; + try { + return JSON.parse(data, this.parseReviver); + } catch (e) { + if (strictJSONParsing) { + if (e.name === "SyntaxError") { + throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response); + } + throw e; + } + } + } + return data; + }, "transformResponse") + ], + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + xsrfCookieName: "XSRF-TOKEN", + xsrfHeaderName: "X-XSRF-TOKEN", + maxContentLength: -1, + maxBodyLength: -1, + env: { + FormData: platform_default.classes.FormData, + Blob: platform_default.classes.Blob + }, + validateStatus: /* @__PURE__ */ __name(function validateStatus(status) { + return status >= 200 && status < 300; + }, "validateStatus"), + headers: { + common: { + Accept: "application/json, text/plain, */*", + "Content-Type": void 0 + } + } +}; +utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => { + defaults.headers[method] = {}; +}); +var defaults_default = defaults; + +// ../../node_modules/axios/lib/core/AxiosHeaders.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/helpers/parseHeaders.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var ignoreDuplicateOf = utils_default.toObjectSet([ + "age", + "authorization", + "content-length", + "content-type", + "etag", + "expires", + "from", + "host", + "if-modified-since", + "if-unmodified-since", + "last-modified", + "location", + "max-forwards", + "proxy-authorization", + "referer", + "retry-after", + "user-agent" +]); +var parseHeaders_default = /* @__PURE__ */ __name((rawHeaders) => { + const parsed = {}; + let key; + let val; + let i; + rawHeaders && rawHeaders.split("\n").forEach(/* @__PURE__ */ __name(function parser(line) { + i = line.indexOf(":"); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); + if (!key || parsed[key] && ignoreDuplicateOf[key]) { + return; + } + if (key === "set-cookie") { + if (parsed[key]) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = parsed[key] ? parsed[key] + ", " + val : val; + } + }, "parser")); + return parsed; +}, "default"); + +// ../../node_modules/axios/lib/core/AxiosHeaders.js +var $internals = /* @__PURE__ */ Symbol("internals"); +function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); +} +__name(normalizeHeader, "normalizeHeader"); +function normalizeValue(value) { + if (value === false || value == null) { + return value; + } + return utils_default.isArray(value) ? value.map(normalizeValue) : String(value); +} +__name(normalizeValue, "normalizeValue"); +function parseTokens(str) { + const tokens = /* @__PURE__ */ Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match2; + while (match2 = tokensRE.exec(str)) { + tokens[match2[1]] = match2[2]; + } + return tokens; +} +__name(parseTokens, "parseTokens"); +var isValidHeaderName = /* @__PURE__ */ __name((str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()), "isValidHeaderName"); +function matchHeaderValue(context2, value, header, filter2, isHeaderNameFilter) { + if (utils_default.isFunction(filter2)) { + return filter2.call(this, value, header); + } + if (isHeaderNameFilter) { + value = header; + } + if (!utils_default.isString(value)) return; + if (utils_default.isString(filter2)) { + return value.indexOf(filter2) !== -1; + } + if (utils_default.isRegExp(filter2)) { + return filter2.test(value); + } +} +__name(matchHeaderValue, "matchHeaderValue"); +function formatHeader(header) { + return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; + }); +} +__name(formatHeader, "formatHeader"); +function buildAccessors(obj, header) { + const accessorName = utils_default.toCamelCase(" " + header); + ["get", "set", "has"].forEach((methodName) => { + Object.defineProperty(obj, methodName + accessorName, { + value: /* @__PURE__ */ __name(function(arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, "value"), + configurable: true + }); + }); +} +__name(buildAccessors, "buildAccessors"); +var AxiosHeaders = class { + static { + __name(this, "AxiosHeaders"); + } + constructor(headers) { + headers && this.set(headers); + } + set(header, valueOrRewrite, rewrite) { + const self2 = this; + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); + if (!lHeader) { + throw new Error("header name must be a non-empty string"); + } + const key = utils_default.findKey(self2, lHeader); + if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) { + self2[key || _header] = normalizeValue(_value); + } + } + __name(setHeader, "setHeader"); + const setHeaders = /* @__PURE__ */ __name((headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)), "setHeaders"); + if (utils_default.isPlainObject(header) || header instanceof this.constructor) { + setHeaders(header, valueOrRewrite); + } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + setHeaders(parseHeaders_default(header), valueOrRewrite); + } else if (utils_default.isObject(header) && utils_default.isIterable(header)) { + let obj = {}, dest, key; + for (const entry of header) { + if (!utils_default.isArray(entry)) { + throw TypeError("Object iterator must return a key-value pair"); + } + obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1]; + } + setHeaders(obj, valueOrRewrite); + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); + } + return this; + } + get(header, parser) { + header = normalizeHeader(header); + if (header) { + const key = utils_default.findKey(this, header); + if (key) { + const value = this[key]; + if (!parser) { + return value; + } + if (parser === true) { + return parseTokens(value); + } + if (utils_default.isFunction(parser)) { + return parser.call(this, value, key); + } + if (utils_default.isRegExp(parser)) { + return parser.exec(value); + } + throw new TypeError("parser must be boolean|regexp|function"); + } + } + } + has(header, matcher) { + header = normalizeHeader(header); + if (header) { + const key = utils_default.findKey(this, header); + return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher))); + } + return false; + } + delete(header, matcher) { + const self2 = this; + let deleted = false; + function deleteHeader(_header) { + _header = normalizeHeader(_header); + if (_header) { + const key = utils_default.findKey(self2, _header); + if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) { + delete self2[key]; + deleted = true; + } + } + } + __name(deleteHeader, "deleteHeader"); + if (utils_default.isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); + } + return deleted; + } + clear(matcher) { + const keys = Object.keys(this); + let i = keys.length; + let deleted = false; + while (i--) { + const key = keys[i]; + if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; + } + } + return deleted; + } + normalize(format) { + const self2 = this; + const headers = {}; + utils_default.forEach(this, (value, header) => { + const key = utils_default.findKey(headers, header); + if (key) { + self2[key] = normalizeValue(value); + delete self2[header]; + return; + } + const normalized = format ? formatHeader(header) : String(header).trim(); + if (normalized !== header) { + delete self2[header]; + } + self2[normalized] = normalizeValue(value); + headers[normalized] = true; + }); + return this; + } + concat(...targets) { + return this.constructor.concat(this, ...targets); + } + toJSON(asStrings) { + const obj = /* @__PURE__ */ Object.create(null); + utils_default.forEach(this, (value, header) => { + value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value); + }); + return obj; + } + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + toString() { + return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n"); + } + getSetCookie() { + return this.get("set-cookie") || []; + } + get [Symbol.toStringTag]() { + return "AxiosHeaders"; + } + static from(thing) { + return thing instanceof this ? thing : new this(thing); + } + static concat(first, ...targets) { + const computed = new this(first); + targets.forEach((target2) => computed.set(target2)); + return computed; + } + static accessor(header) { + const internals = this[$internals] = this[$internals] = { + accessors: {} + }; + const accessors = internals.accessors; + const prototype2 = this.prototype; + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); + if (!accessors[lHeader]) { + buildAccessors(prototype2, _header); + accessors[lHeader] = true; + } + } + __name(defineAccessor, "defineAccessor"); + utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + return this; + } +}; +AxiosHeaders.accessor([ + "Content-Type", + "Content-Length", + "Accept", + "Accept-Encoding", + "User-Agent", + "Authorization" +]); +utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); + return { + get: /* @__PURE__ */ __name(() => value, "get"), + set(headerValue) { + this[mapped] = headerValue; + } + }; +}); +utils_default.freezeMethods(AxiosHeaders); +var AxiosHeaders_default = AxiosHeaders; + +// ../../node_modules/axios/lib/core/transformData.js +function transformData(fns, response) { + const config3 = this || defaults_default; + const context2 = response || config3; + const headers = AxiosHeaders_default.from(context2.headers); + let data = context2.data; + utils_default.forEach(fns, /* @__PURE__ */ __name(function transform2(fn) { + data = fn.call(config3, data, headers.normalize(), response ? response.status : void 0); + }, "transform")); + headers.normalize(); + return data; +} +__name(transformData, "transformData"); + +// ../../node_modules/axios/lib/cancel/isCancel.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function isCancel(value) { + return !!(value && value.__CANCEL__); +} +__name(isCancel, "isCancel"); + +// ../../node_modules/axios/lib/cancel/CanceledError.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var CanceledError = class extends AxiosError_default { + static { + __name(this, "CanceledError"); + } + /** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ + constructor(message2, config3, request) { + super(message2 == null ? "canceled" : message2, AxiosError_default.ERR_CANCELED, config3, request); + this.name = "CanceledError"; + this.__CANCEL__ = true; + } +}; +var CanceledError_default = CanceledError; + +// ../../node_modules/axios/lib/adapters/adapters.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/adapters/xhr.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/core/settle.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function settle(resolve, reject, response) { + const validateStatus2 = response.config.validateStatus; + if (!response.status || !validateStatus2 || validateStatus2(response.status)) { + resolve(response); + } else { + reject( + new AxiosError_default( + "Request failed with status code " + response.status, + [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], + response.config, + response.request, + response + ) + ); + } +} +__name(settle, "settle"); + +// ../../node_modules/axios/lib/helpers/parseProtocol.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function parseProtocol(url2) { + const match2 = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2); + return match2 && match2[1] || ""; +} +__name(parseProtocol, "parseProtocol"); + +// ../../node_modules/axios/lib/helpers/progressEventReducer.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/helpers/speedometer.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; + min = min !== void 0 ? min : 1e3; + return /* @__PURE__ */ __name(function push(chunkLength) { + const now = Date.now(); + const startedAt = timestamps[tail]; + if (!firstSampleTS) { + firstSampleTS = now; + } + bytes[head] = chunkLength; + timestamps[head] = now; + let i = tail; + let bytesCount = 0; + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; + } + head = (head + 1) % samplesCount; + if (head === tail) { + tail = (tail + 1) % samplesCount; + } + if (now - firstSampleTS < min) { + return; + } + const passed = startedAt && now - startedAt; + return passed ? Math.round(bytesCount * 1e3 / passed) : void 0; + }, "push"); +} +__name(speedometer, "speedometer"); +var speedometer_default = speedometer; + +// ../../node_modules/axios/lib/helpers/throttle.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function throttle(fn, freq) { + let timestamp = 0; + let threshold = 1e3 / freq; + let lastArgs; + let timer; + const invoke = /* @__PURE__ */ __name((args, now = Date.now()) => { + timestamp = now; + lastArgs = null; + if (timer) { + clearTimeout(timer); + timer = null; + } + fn(...args); + }, "invoke"); + const throttled = /* @__PURE__ */ __name((...args) => { + const now = Date.now(); + const passed = now - timestamp; + if (passed >= threshold) { + invoke(args, now); + } else { + lastArgs = args; + if (!timer) { + timer = setTimeout(() => { + timer = null; + invoke(lastArgs); + }, threshold - passed); + } + } + }, "throttled"); + const flush2 = /* @__PURE__ */ __name(() => lastArgs && invoke(lastArgs), "flush"); + return [throttled, flush2]; +} +__name(throttle, "throttle"); +var throttle_default = throttle; + +// ../../node_modules/axios/lib/helpers/progressEventReducer.js +var progressEventReducer = /* @__PURE__ */ __name((listener, isDownloadStream, freq = 3) => { + let bytesNotified = 0; + const _speedometer = speedometer_default(50, 250); + return throttle_default((e) => { + const loaded = e.loaded; + const total = e.lengthComputable ? e.total : void 0; + const progressBytes = loaded - bytesNotified; + const rate = _speedometer(progressBytes); + const inRange = loaded <= total; + bytesNotified = loaded; + const data = { + loaded, + total, + progress: total ? loaded / total : void 0, + bytes: progressBytes, + rate: rate ? rate : void 0, + estimated: rate && total && inRange ? (total - loaded) / rate : void 0, + event: e, + lengthComputable: total != null, + [isDownloadStream ? "download" : "upload"]: true + }; + listener(data); + }, freq); +}, "progressEventReducer"); +var progressEventDecorator = /* @__PURE__ */ __name((total, throttled) => { + const lengthComputable = total != null; + return [ + (loaded) => throttled[0]({ + lengthComputable, + total, + loaded + }), + throttled[1] + ]; +}, "progressEventDecorator"); +var asyncDecorator = /* @__PURE__ */ __name((fn) => (...args) => utils_default.asap(() => fn(...args)), "asyncDecorator"); + +// ../../node_modules/axios/lib/helpers/resolveConfig.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/helpers/isURLSameOrigin.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url2) => { + url2 = new URL(url2, platform_default.origin); + return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port); +})( + new URL(platform_default.origin), + platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent) +) : () => true; + +// ../../node_modules/axios/lib/helpers/cookies.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var cookies_default = platform_default.hasStandardBrowserEnv ? ( + // Standard browser envs support document.cookie + { + write(name, value, expires, path3, domain3, secure, sameSite) { + if (typeof document === "undefined") return; + const cookie = [`${name}=${encodeURIComponent(value)}`]; + if (utils_default.isNumber(expires)) { + cookie.push(`expires=${new Date(expires).toUTCString()}`); + } + if (utils_default.isString(path3)) { + cookie.push(`path=${path3}`); + } + if (utils_default.isString(domain3)) { + cookie.push(`domain=${domain3}`); + } + if (secure === true) { + cookie.push("secure"); + } + if (utils_default.isString(sameSite)) { + cookie.push(`SameSite=${sameSite}`); + } + document.cookie = cookie.join("; "); + }, + read(name) { + if (typeof document === "undefined") return null; + const match2 = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)")); + return match2 ? decodeURIComponent(match2[1]) : null; + }, + remove(name) { + this.write(name, "", Date.now() - 864e5, "/"); + } + } +) : ( + // Non-standard browser env (web workers, react-native) lack needed support. + { + write() { + }, + read() { + return null; + }, + remove() { + } + } +); + +// ../../node_modules/axios/lib/core/buildFullPath.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/helpers/isAbsoluteURL.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function isAbsoluteURL(url2) { + if (typeof url2 !== "string") { + return false; + } + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2); +} +__name(isAbsoluteURL, "isAbsoluteURL"); + +// ../../node_modules/axios/lib/helpers/combineURLs.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function combineURLs(baseURL, relativeURL) { + return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL; +} +__name(combineURLs, "combineURLs"); + +// ../../node_modules/axios/lib/core/buildFullPath.js +function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { + let isRelativeUrl = !isAbsoluteURL(requestedURL); + if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { + return combineURLs(baseURL, requestedURL); + } + return requestedURL; +} +__name(buildFullPath, "buildFullPath"); + +// ../../node_modules/axios/lib/core/mergeConfig.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var headersToObject = /* @__PURE__ */ __name((thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing, "headersToObject"); +function mergeConfig(config1, config22) { + config22 = config22 || {}; + const config3 = {}; + function getMergedValue(target2, source, prop, caseless) { + if (utils_default.isPlainObject(target2) && utils_default.isPlainObject(source)) { + return utils_default.merge.call({ caseless }, target2, source); + } else if (utils_default.isPlainObject(source)) { + return utils_default.merge({}, source); + } else if (utils_default.isArray(source)) { + return source.slice(); + } + return source; + } + __name(getMergedValue, "getMergedValue"); + function mergeDeepProperties(a, b, prop, caseless) { + if (!utils_default.isUndefined(b)) { + return getMergedValue(a, b, prop, caseless); + } else if (!utils_default.isUndefined(a)) { + return getMergedValue(void 0, a, prop, caseless); + } + } + __name(mergeDeepProperties, "mergeDeepProperties"); + function valueFromConfig2(a, b) { + if (!utils_default.isUndefined(b)) { + return getMergedValue(void 0, b); + } + } + __name(valueFromConfig2, "valueFromConfig2"); + function defaultToConfig2(a, b) { + if (!utils_default.isUndefined(b)) { + return getMergedValue(void 0, b); + } else if (!utils_default.isUndefined(a)) { + return getMergedValue(void 0, a); + } + } + __name(defaultToConfig2, "defaultToConfig2"); + function mergeDirectKeys(a, b, prop) { + if (prop in config22) { + return getMergedValue(a, b); + } else if (prop in config1) { + return getMergedValue(void 0, a); + } + } + __name(mergeDirectKeys, "mergeDirectKeys"); + const mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + withXSRFToken: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: /* @__PURE__ */ __name((a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true), "headers") + }; + utils_default.forEach(Object.keys({ ...config1, ...config22 }), /* @__PURE__ */ __name(function computeConfigValue(prop) { + if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return; + const merge4 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; + const configValue = merge4(config1[prop], config22[prop], prop); + utils_default.isUndefined(configValue) && merge4 !== mergeDirectKeys || (config3[prop] = configValue); + }, "computeConfigValue")); + return config3; +} +__name(mergeConfig, "mergeConfig"); + +// ../../node_modules/axios/lib/helpers/resolveConfig.js +var resolveConfig_default = /* @__PURE__ */ __name((config3) => { + const newConfig = mergeConfig({}, config3); + let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig; + newConfig.headers = headers = AxiosHeaders_default.from(headers); + newConfig.url = buildURL( + buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), + config3.params, + config3.paramsSerializer + ); + if (auth) { + headers.set( + "Authorization", + "Basic " + btoa( + (auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "") + ) + ); + } + if (utils_default.isFormData(data)) { + if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) { + headers.setContentType(void 0); + } else if (utils_default.isFunction(data.getHeaders)) { + const formHeaders = data.getHeaders(); + const allowedHeaders = ["content-type", "content-length"]; + Object.entries(formHeaders).forEach(([key, val]) => { + if (allowedHeaders.includes(key.toLowerCase())) { + headers.set(key, val); + } + }); + } + } + if (platform_default.hasStandardBrowserEnv) { + withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); + if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) { + const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName); + if (xsrfValue) { + headers.set(xsrfHeaderName, xsrfValue); + } + } + } + return newConfig; +}, "default"); + +// ../../node_modules/axios/lib/adapters/xhr.js +var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined"; +var xhr_default = isXHRAdapterSupported && function(config3) { + return new Promise(/* @__PURE__ */ __name(function dispatchXhrRequest(resolve, reject) { + const _config = resolveConfig_default(config3); + let requestData = _config.data; + const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize(); + let { responseType, onUploadProgress, onDownloadProgress } = _config; + let onCanceled; + let uploadThrottled, downloadThrottled; + let flushUpload, flushDownload; + function done() { + flushUpload && flushUpload(); + flushDownload && flushDownload(); + _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); + _config.signal && _config.signal.removeEventListener("abort", onCanceled); + } + __name(done, "done"); + let request = new XMLHttpRequest(); + request.open(_config.method.toUpperCase(), _config.url, true); + request.timeout = _config.timeout; + function onloadend() { + if (!request) { + return; + } + const responseHeaders = AxiosHeaders_default.from( + "getAllResponseHeaders" in request && request.getAllResponseHeaders() + ); + const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response; + const response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config: config3, + request + }; + settle( + /* @__PURE__ */ __name(function _resolve(value) { + resolve(value); + done(); + }, "_resolve"), + /* @__PURE__ */ __name(function _reject(err) { + reject(err); + done(); + }, "_reject"), + response + ); + request = null; + } + __name(onloadend, "onloadend"); + if ("onloadend" in request) { + request.onloadend = onloadend; + } else { + request.onreadystatechange = /* @__PURE__ */ __name(function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) { + return; + } + setTimeout(onloadend); + }, "handleLoad"); + } + request.onabort = /* @__PURE__ */ __name(function handleAbort() { + if (!request) { + return; + } + reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config3, request)); + request = null; + }, "handleAbort"); + request.onerror = /* @__PURE__ */ __name(function handleError(event) { + const msg = event && event.message ? event.message : "Network Error"; + const err = new AxiosError_default(msg, AxiosError_default.ERR_NETWORK, config3, request); + err.event = event || null; + reject(err); + request = null; + }, "handleError"); + request.ontimeout = /* @__PURE__ */ __name(function handleTimeout() { + let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded"; + const transitional2 = _config.transitional || transitional_default; + if (_config.timeoutErrorMessage) { + timeoutErrorMessage = _config.timeoutErrorMessage; + } + reject( + new AxiosError_default( + timeoutErrorMessage, + transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, + config3, + request + ) + ); + request = null; + }, "handleTimeout"); + requestData === void 0 && requestHeaders.setContentType(null); + if ("setRequestHeader" in request) { + utils_default.forEach(requestHeaders.toJSON(), /* @__PURE__ */ __name(function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + }, "setRequestHeader")); + } + if (!utils_default.isUndefined(_config.withCredentials)) { + request.withCredentials = !!_config.withCredentials; + } + if (responseType && responseType !== "json") { + request.responseType = _config.responseType; + } + if (onDownloadProgress) { + [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true); + request.addEventListener("progress", downloadThrottled); + } + if (onUploadProgress && request.upload) { + [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress); + request.upload.addEventListener("progress", uploadThrottled); + request.upload.addEventListener("loadend", flushUpload); + } + if (_config.cancelToken || _config.signal) { + onCanceled = /* @__PURE__ */ __name((cancel) => { + if (!request) { + return; + } + reject(!cancel || cancel.type ? new CanceledError_default(null, config3, request) : cancel); + request.abort(); + request = null; + }, "onCanceled"); + _config.cancelToken && _config.cancelToken.subscribe(onCanceled); + if (_config.signal) { + _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled); + } + } + const protocol = parseProtocol(_config.url); + if (protocol && platform_default.protocols.indexOf(protocol) === -1) { + reject( + new AxiosError_default( + "Unsupported protocol " + protocol + ":", + AxiosError_default.ERR_BAD_REQUEST, + config3 + ) + ); + return; + } + request.send(requestData || null); + }, "dispatchXhrRequest")); +}; + +// ../../node_modules/axios/lib/adapters/fetch.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/helpers/composeSignals.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var composeSignals = /* @__PURE__ */ __name((signals, timeout) => { + const { length } = signals = signals ? signals.filter(Boolean) : []; + if (timeout || length) { + let controller = new AbortController(); + let aborted2; + const onabort = /* @__PURE__ */ __name(function(reason) { + if (!aborted2) { + aborted2 = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort( + err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err) + ); + } + }, "onabort"); + let timer = timeout && setTimeout(() => { + timer = null; + onabort(new AxiosError_default(`timeout of ${timeout}ms exceeded`, AxiosError_default.ETIMEDOUT)); + }, timeout); + const unsubscribe = /* @__PURE__ */ __name(() => { + if (signals) { + timer && clearTimeout(timer); + timer = null; + signals.forEach((signal2) => { + signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort); + }); + signals = null; + } + }, "unsubscribe"); + signals.forEach((signal2) => signal2.addEventListener("abort", onabort)); + const { signal } = controller; + signal.unsubscribe = () => utils_default.asap(unsubscribe); + return signal; + } +}, "composeSignals"); +var composeSignals_default = composeSignals; + +// ../../node_modules/axios/lib/helpers/trackStream.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var streamChunk = /* @__PURE__ */ __name(function* (chunk, chunkSize) { + let len = chunk.byteLength; + if (!chunkSize || len < chunkSize) { + yield chunk; + return; + } + let pos = 0; + let end; + while (pos < len) { + end = pos + chunkSize; + yield chunk.slice(pos, end); + pos = end; + } +}, "streamChunk"); +var readBytes = /* @__PURE__ */ __name(async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) { + yield* streamChunk(chunk, chunkSize); + } +}, "readBytes"); +var readStream = /* @__PURE__ */ __name(async function* (stream) { + if (stream[Symbol.asyncIterator]) { + yield* stream; + return; + } + const reader = stream.getReader(); + try { + for (; ; ) { + const { done, value } = await reader.read(); + if (done) { + break; + } + yield value; + } + } finally { + await reader.cancel(); + } +}, "readStream"); +var trackStream = /* @__PURE__ */ __name((stream, chunkSize, onProgress, onFinish) => { + const iterator2 = readBytes(stream, chunkSize); + let bytes = 0; + let done; + let _onFinish = /* @__PURE__ */ __name((e) => { + if (!done) { + done = true; + onFinish && onFinish(e); + } + }, "_onFinish"); + return new ReadableStream( + { + async pull(controller) { + try { + const { done: done2, value } = await iterator2.next(); + if (done2) { + _onFinish(); + controller.close(); + return; + } + let len = value.byteLength; + if (onProgress) { + let loadedBytes = bytes += len; + onProgress(loadedBytes); + } + controller.enqueue(new Uint8Array(value)); + } catch (err) { + _onFinish(err); + throw err; + } + }, + cancel(reason) { + _onFinish(reason); + return iterator2.return(); + } + }, + { + highWaterMark: 2 + } + ); +}, "trackStream"); + +// ../../node_modules/axios/lib/adapters/fetch.js +var DEFAULT_CHUNK_SIZE = 64 * 1024; +var { isFunction: isFunction3 } = utils_default; +var globalFetchAPI = (({ Request: Request3, Response: Response3 }) => ({ + Request: Request3, + Response: Response3 +}))(utils_default.global); +var { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = utils_default.global; +var test = /* @__PURE__ */ __name((fn, ...args) => { + try { + return !!fn(...args); + } catch (e) { + return false; + } +}, "test"); +var factory = /* @__PURE__ */ __name((env2) => { + env2 = utils_default.merge.call( + { + skipUndefined: true + }, + globalFetchAPI, + env2 + ); + const { fetch: envFetch, Request: Request3, Response: Response3 } = env2; + const isFetchSupported = envFetch ? isFunction3(envFetch) : typeof fetch === "function"; + const isRequestSupported = isFunction3(Request3); + const isResponseSupported = isFunction3(Response3); + if (!isFetchSupported) { + return false; + } + const isReadableStreamSupported = isFetchSupported && isFunction3(ReadableStream2); + const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder2) => (str) => encoder2.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request3(str).arrayBuffer())); + const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => { + let duplexAccessed = false; + const hasContentType = new Request3(platform_default.origin, { + body: new ReadableStream2(), + method: "POST", + get duplex() { + duplexAccessed = true; + return "half"; + } + }).headers.has("Content-Type"); + return duplexAccessed && !hasContentType; + }); + const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response3("").body)); + const resolvers = { + stream: supportsResponseStream && ((res) => res.body) + }; + isFetchSupported && (() => { + ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => { + !resolvers[type] && (resolvers[type] = (res, config3) => { + let method = res && res[type]; + if (method) { + return method.call(res); + } + throw new AxiosError_default( + `Response type '${type}' is not supported`, + AxiosError_default.ERR_NOT_SUPPORT, + config3 + ); + }); + }); + })(); + const getBodyLength = /* @__PURE__ */ __name(async (body) => { + if (body == null) { + return 0; + } + if (utils_default.isBlob(body)) { + return body.size; + } + if (utils_default.isSpecCompliantForm(body)) { + const _request = new Request3(platform_default.origin, { + method: "POST", + body + }); + return (await _request.arrayBuffer()).byteLength; + } + if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) { + return body.byteLength; + } + if (utils_default.isURLSearchParams(body)) { + body = body + ""; + } + if (utils_default.isString(body)) { + return (await encodeText(body)).byteLength; + } + }, "getBodyLength"); + const resolveBodyLength = /* @__PURE__ */ __name(async (headers, body) => { + const length = utils_default.toFiniteNumber(headers.getContentLength()); + return length == null ? getBodyLength(body) : length; + }, "resolveBodyLength"); + return async (config3) => { + let { + url: url2, + method, + data, + signal, + cancelToken, + timeout, + onDownloadProgress, + onUploadProgress, + responseType, + headers, + withCredentials = "same-origin", + fetchOptions + } = resolveConfig_default(config3); + let _fetch = envFetch || fetch; + responseType = responseType ? (responseType + "").toLowerCase() : "text"; + let composedSignal = composeSignals_default( + [signal, cancelToken && cancelToken.toAbortSignal()], + timeout + ); + let request = null; + const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { + composedSignal.unsubscribe(); + }); + let requestContentLength; + try { + if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) { + let _request = new Request3(url2, { + method: "POST", + body: data, + duplex: "half" + }); + let contentTypeHeader; + if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) { + headers.setContentType(contentTypeHeader); + } + if (_request.body) { + const [onProgress, flush2] = progressEventDecorator( + requestContentLength, + progressEventReducer(asyncDecorator(onUploadProgress)) + ); + data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush2); + } + } + if (!utils_default.isString(withCredentials)) { + withCredentials = withCredentials ? "include" : "omit"; + } + const isCredentialsSupported = isRequestSupported && "credentials" in Request3.prototype; + const resolvedOptions = { + ...fetchOptions, + signal: composedSignal, + method: method.toUpperCase(), + headers: headers.normalize().toJSON(), + body: data, + duplex: "half", + credentials: isCredentialsSupported ? withCredentials : void 0 + }; + request = isRequestSupported && new Request3(url2, resolvedOptions); + let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions)); + const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response"); + if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) { + const options = {}; + ["status", "statusText", "headers"].forEach((prop) => { + options[prop] = response[prop]; + }); + const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length")); + const [onProgress, flush2] = onDownloadProgress && progressEventDecorator( + responseContentLength, + progressEventReducer(asyncDecorator(onDownloadProgress), true) + ) || []; + response = new Response3( + trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { + flush2 && flush2(); + unsubscribe && unsubscribe(); + }), + options + ); + } + responseType = responseType || "text"; + let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"]( + response, + config3 + ); + !isStreamResponse && unsubscribe && unsubscribe(); + return await new Promise((resolve, reject) => { + settle(resolve, reject, { + data: responseData, + headers: AxiosHeaders_default.from(response.headers), + status: response.status, + statusText: response.statusText, + config: config3, + request + }); + }); + } catch (err) { + unsubscribe && unsubscribe(); + if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) { + throw Object.assign( + new AxiosError_default( + "Network Error", + AxiosError_default.ERR_NETWORK, + config3, + request, + err && err.response + ), + { + cause: err.cause || err + } + ); + } + throw AxiosError_default.from(err, err && err.code, config3, request, err && err.response); + } + }; +}, "factory"); +var seedCache = /* @__PURE__ */ new Map(); +var getFetch = /* @__PURE__ */ __name((config3) => { + let env2 = config3 && config3.env || {}; + const { fetch: fetch3, Request: Request3, Response: Response3 } = env2; + const seeds = [Request3, Response3, fetch3]; + let len = seeds.length, i = len, seed, target2, map2 = seedCache; + while (i--) { + seed = seeds[i]; + target2 = map2.get(seed); + target2 === void 0 && map2.set(seed, target2 = i ? /* @__PURE__ */ new Map() : factory(env2)); + map2 = target2; + } + return target2; +}, "getFetch"); +var adapter = getFetch(); + +// ../../node_modules/axios/lib/adapters/adapters.js +var knownAdapters = { + http: null_default, + xhr: xhr_default, + fetch: { + get: getFetch + } +}; +utils_default.forEach(knownAdapters, (fn, value) => { + if (fn) { + try { + Object.defineProperty(fn, "name", { value }); + } catch (e) { + } + Object.defineProperty(fn, "adapterName", { value }); + } +}); +var renderReason = /* @__PURE__ */ __name((reason) => `- ${reason}`, "renderReason"); +var isResolvedHandle = /* @__PURE__ */ __name((adapter2) => utils_default.isFunction(adapter2) || adapter2 === null || adapter2 === false, "isResolvedHandle"); +function getAdapter(adapters, config3) { + adapters = utils_default.isArray(adapters) ? adapters : [adapters]; + const { length } = adapters; + let nameOrAdapter; + let adapter2; + const rejectedReasons = {}; + for (let i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + let id; + adapter2 = nameOrAdapter; + if (!isResolvedHandle(nameOrAdapter)) { + adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + if (adapter2 === void 0) { + throw new AxiosError_default(`Unknown adapter '${id}'`); + } + } + if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config3)))) { + break; + } + rejectedReasons[id || "#" + i] = adapter2; + } + if (!adapter2) { + const reasons = Object.entries(rejectedReasons).map( + ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build") + ); + let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"; + throw new AxiosError_default( + `There is no suitable adapter to dispatch the request ` + s, + "ERR_NOT_SUPPORT" + ); + } + return adapter2; +} +__name(getAdapter, "getAdapter"); +var adapters_default = { + /** + * Resolve an adapter from a list of adapter names or functions. + * @type {Function} + */ + getAdapter, + /** + * Exposes all known adapters + * @type {Object} + */ + adapters: knownAdapters +}; + +// ../../node_modules/axios/lib/core/dispatchRequest.js +function throwIfCancellationRequested(config3) { + if (config3.cancelToken) { + config3.cancelToken.throwIfRequested(); + } + if (config3.signal && config3.signal.aborted) { + throw new CanceledError_default(null, config3); + } +} +__name(throwIfCancellationRequested, "throwIfCancellationRequested"); +function dispatchRequest(config3) { + throwIfCancellationRequested(config3); + config3.headers = AxiosHeaders_default.from(config3.headers); + config3.data = transformData.call(config3, config3.transformRequest); + if (["post", "put", "patch"].indexOf(config3.method) !== -1) { + config3.headers.setContentType("application/x-www-form-urlencoded", false); + } + const adapter2 = adapters_default.getAdapter(config3.adapter || defaults_default.adapter, config3); + return adapter2(config3).then( + /* @__PURE__ */ __name(function onAdapterResolution(response) { + throwIfCancellationRequested(config3); + response.data = transformData.call(config3, config3.transformResponse, response); + response.headers = AxiosHeaders_default.from(response.headers); + return response; + }, "onAdapterResolution"), + /* @__PURE__ */ __name(function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config3); + if (reason && reason.response) { + reason.response.data = transformData.call( + config3, + config3.transformResponse, + reason.response + ); + reason.response.headers = AxiosHeaders_default.from(reason.response.headers); + } + } + return Promise.reject(reason); + }, "onAdapterRejection") + ); +} +__name(dispatchRequest, "dispatchRequest"); + +// ../../node_modules/axios/lib/helpers/validator.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/axios/lib/env/data.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var VERSION = "1.13.6"; + +// ../../node_modules/axios/lib/helpers/validator.js +var validators = {}; +["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => { + validators[type] = /* @__PURE__ */ __name(function validator(thing) { + return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type; + }, "validator"); +}); +var deprecatedWarnings = {}; +validators.transitional = /* @__PURE__ */ __name(function transitional(validator, version5, message2) { + function formatMessage(opt, desc2) { + return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc2 + (message2 ? ". " + message2 : ""); + } + __name(formatMessage, "formatMessage"); + return (value, opt, opts) => { + if (validator === false) { + throw new AxiosError_default( + formatMessage(opt, " has been removed" + (version5 ? " in " + version5 : "")), + AxiosError_default.ERR_DEPRECATED + ); + } + if (version5 && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + console.warn( + formatMessage( + opt, + " has been deprecated since v" + version5 + " and will be removed in the near future" + ) + ); + } + return validator ? validator(value, opt, opts) : true; + }; +}, "transitional"); +validators.spelling = /* @__PURE__ */ __name(function spelling(correctSpelling) { + return (value, opt) => { + console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); + return true; + }; +}, "spelling"); +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== "object") { + throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE); + } + const keys = Object.keys(options); + let i = keys.length; + while (i-- > 0) { + const opt = keys[i]; + const validator = schema[opt]; + if (validator) { + const value = options[opt]; + const result = value === void 0 || validator(value, opt, options); + if (result !== true) { + throw new AxiosError_default( + "option " + opt + " must be " + result, + AxiosError_default.ERR_BAD_OPTION_VALUE + ); + } + continue; + } + if (allowUnknown !== true) { + throw new AxiosError_default("Unknown option " + opt, AxiosError_default.ERR_BAD_OPTION); + } + } +} +__name(assertOptions, "assertOptions"); +var validator_default = { + assertOptions, + validators +}; + +// ../../node_modules/axios/lib/core/Axios.js +var validators2 = validator_default.validators; +var Axios = class { + static { + __name(this, "Axios"); + } + constructor(instanceConfig) { + this.defaults = instanceConfig || {}; + this.interceptors = { + request: new InterceptorManager_default(), + response: new InterceptorManager_default() + }; + } + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ + async request(configOrUrl, config3) { + try { + return await this._request(configOrUrl, config3); + } catch (err) { + if (err instanceof Error) { + let dummy = {}; + Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error(); + const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : ""; + try { + if (!err.stack) { + err.stack = stack; + } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) { + err.stack += "\n" + stack; + } + } catch (e) { + } + } + throw err; + } + } + _request(configOrUrl, config3) { + if (typeof configOrUrl === "string") { + config3 = config3 || {}; + config3.url = configOrUrl; + } else { + config3 = configOrUrl || {}; + } + config3 = mergeConfig(this.defaults, config3); + const { transitional: transitional2, paramsSerializer, headers } = config3; + if (transitional2 !== void 0) { + validator_default.assertOptions( + transitional2, + { + silentJSONParsing: validators2.transitional(validators2.boolean), + forcedJSONParsing: validators2.transitional(validators2.boolean), + clarifyTimeoutError: validators2.transitional(validators2.boolean), + legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean) + }, + false + ); + } + if (paramsSerializer != null) { + if (utils_default.isFunction(paramsSerializer)) { + config3.paramsSerializer = { + serialize: paramsSerializer + }; + } else { + validator_default.assertOptions( + paramsSerializer, + { + encode: validators2.function, + serialize: validators2.function + }, + true + ); + } + } + if (config3.allowAbsoluteUrls !== void 0) { + } else if (this.defaults.allowAbsoluteUrls !== void 0) { + config3.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; + } else { + config3.allowAbsoluteUrls = true; + } + validator_default.assertOptions( + config3, + { + baseUrl: validators2.spelling("baseURL"), + withXsrfToken: validators2.spelling("withXSRFToken") + }, + true + ); + config3.method = (config3.method || this.defaults.method || "get").toLowerCase(); + let contextHeaders = headers && utils_default.merge(headers.common, headers[config3.method]); + headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => { + delete headers[method]; + }); + config3.headers = AxiosHeaders_default.concat(contextHeaders, headers); + const requestInterceptorChain = []; + let synchronousRequestInterceptors = true; + this.interceptors.request.forEach(/* @__PURE__ */ __name(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config3) === false) { + return; + } + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + const transitional3 = config3.transitional || transitional_default; + const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering; + if (legacyInterceptorReqResOrdering) { + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + } else { + requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + } + }, "unshiftRequestInterceptors")); + const responseInterceptorChain = []; + this.interceptors.response.forEach(/* @__PURE__ */ __name(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }, "pushResponseInterceptors")); + let promise2; + let i = 0; + let len; + if (!synchronousRequestInterceptors) { + const chain = [dispatchRequest.bind(this), void 0]; + chain.unshift(...requestInterceptorChain); + chain.push(...responseInterceptorChain); + len = chain.length; + promise2 = Promise.resolve(config3); + while (i < len) { + promise2 = promise2.then(chain[i++], chain[i++]); + } + return promise2; + } + len = requestInterceptorChain.length; + let newConfig = config3; + while (i < len) { + const onFulfilled = requestInterceptorChain[i++]; + const onRejected = requestInterceptorChain[i++]; + try { + newConfig = onFulfilled(newConfig); + } catch (error50) { + onRejected.call(this, error50); + break; + } + } + try { + promise2 = dispatchRequest.call(this, newConfig); + } catch (error50) { + return Promise.reject(error50); + } + i = 0; + len = responseInterceptorChain.length; + while (i < len) { + promise2 = promise2.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); + } + return promise2; + } + getUri(config3) { + config3 = mergeConfig(this.defaults, config3); + const fullPath = buildFullPath(config3.baseURL, config3.url, config3.allowAbsoluteUrls); + return buildURL(fullPath, config3.params, config3.paramsSerializer); + } +}; +utils_default.forEach(["delete", "get", "head", "options"], /* @__PURE__ */ __name(function forEachMethodNoData(method) { + Axios.prototype[method] = function(url2, config3) { + return this.request( + mergeConfig(config3 || {}, { + method, + url: url2, + data: (config3 || {}).data + }) + ); + }; +}, "forEachMethodNoData")); +utils_default.forEach(["post", "put", "patch"], /* @__PURE__ */ __name(function forEachMethodWithData(method) { + function generateHTTPMethod(isForm) { + return /* @__PURE__ */ __name(function httpMethod(url2, data, config3) { + return this.request( + mergeConfig(config3 || {}, { + method, + headers: isForm ? { + "Content-Type": "multipart/form-data" + } : {}, + url: url2, + data + }) + ); + }, "httpMethod"); + } + __name(generateHTTPMethod, "generateHTTPMethod"); + Axios.prototype[method] = generateHTTPMethod(); + Axios.prototype[method + "Form"] = generateHTTPMethod(true); +}, "forEachMethodWithData")); +var Axios_default = Axios; + +// ../../node_modules/axios/lib/cancel/CancelToken.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var CancelToken = class _CancelToken { + static { + __name(this, "CancelToken"); + } + constructor(executor) { + if (typeof executor !== "function") { + throw new TypeError("executor must be a function."); + } + let resolvePromise; + this.promise = new Promise(/* @__PURE__ */ __name(function promiseExecutor(resolve) { + resolvePromise = resolve; + }, "promiseExecutor")); + const token = this; + this.promise.then((cancel) => { + if (!token._listeners) return; + let i = token._listeners.length; + while (i-- > 0) { + token._listeners[i](cancel); + } + token._listeners = null; + }); + this.promise.then = (onfulfilled) => { + let _resolve; + const promise2 = new Promise((resolve) => { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + promise2.cancel = /* @__PURE__ */ __name(function reject() { + token.unsubscribe(_resolve); + }, "reject"); + return promise2; + }; + executor(/* @__PURE__ */ __name(function cancel(message2, config3, request) { + if (token.reason) { + return; + } + token.reason = new CanceledError_default(message2, config3, request); + resolvePromise(token.reason); + }, "cancel")); + } + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + throwIfRequested() { + if (this.reason) { + throw this.reason; + } + } + /** + * Subscribe to the cancel signal + */ + subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; + } + } + /** + * Unsubscribe from the cancel signal + */ + unsubscribe(listener) { + if (!this._listeners) { + return; + } + const index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } + } + toAbortSignal() { + const controller = new AbortController(); + const abort2 = /* @__PURE__ */ __name((err) => { + controller.abort(err); + }, "abort"); + this.subscribe(abort2); + controller.signal.unsubscribe = () => this.unsubscribe(abort2); + return controller.signal; + } + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + static source() { + let cancel; + const token = new _CancelToken(/* @__PURE__ */ __name(function executor(c) { + cancel = c; + }, "executor")); + return { + token, + cancel + }; + } +}; +var CancelToken_default = CancelToken; + +// ../../node_modules/axios/lib/helpers/spread.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function spread(callback) { + return /* @__PURE__ */ __name(function wrap(arr) { + return callback.apply(null, arr); + }, "wrap"); +} +__name(spread, "spread"); + +// ../../node_modules/axios/lib/helpers/isAxiosError.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function isAxiosError(payload) { + return utils_default.isObject(payload) && payload.isAxiosError === true; +} +__name(isAxiosError, "isAxiosError"); + +// ../../node_modules/axios/lib/helpers/HttpStatusCode.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var HttpStatusCode = { + Continue: 100, + SwitchingProtocols: 101, + Processing: 102, + EarlyHints: 103, + Ok: 200, + Created: 201, + Accepted: 202, + NonAuthoritativeInformation: 203, + NoContent: 204, + ResetContent: 205, + PartialContent: 206, + MultiStatus: 207, + AlreadyReported: 208, + ImUsed: 226, + MultipleChoices: 300, + MovedPermanently: 301, + Found: 302, + SeeOther: 303, + NotModified: 304, + UseProxy: 305, + Unused: 306, + TemporaryRedirect: 307, + PermanentRedirect: 308, + BadRequest: 400, + Unauthorized: 401, + PaymentRequired: 402, + Forbidden: 403, + NotFound: 404, + MethodNotAllowed: 405, + NotAcceptable: 406, + ProxyAuthenticationRequired: 407, + RequestTimeout: 408, + Conflict: 409, + Gone: 410, + LengthRequired: 411, + PreconditionFailed: 412, + PayloadTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + UnprocessableEntity: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, + WebServerIsDown: 521, + ConnectionTimedOut: 522, + OriginIsUnreachable: 523, + TimeoutOccurred: 524, + SslHandshakeFailed: 525, + InvalidSslCertificate: 526 +}; +Object.entries(HttpStatusCode).forEach(([key, value]) => { + HttpStatusCode[value] = key; +}); +var HttpStatusCode_default = HttpStatusCode; + +// ../../node_modules/axios/lib/axios.js +function createInstance(defaultConfig) { + const context2 = new Axios_default(defaultConfig); + const instance = bind(Axios_default.prototype.request, context2); + utils_default.extend(instance, Axios_default.prototype, context2, { allOwnKeys: true }); + utils_default.extend(instance, context2, null, { allOwnKeys: true }); + instance.create = /* @__PURE__ */ __name(function create(instanceConfig) { + return createInstance(mergeConfig(defaultConfig, instanceConfig)); + }, "create"); + return instance; +} +__name(createInstance, "createInstance"); +var axios = createInstance(defaults_default); +axios.Axios = Axios_default; +axios.CanceledError = CanceledError_default; +axios.CancelToken = CancelToken_default; +axios.isCancel = isCancel; +axios.VERSION = VERSION; +axios.toFormData = toFormData_default; +axios.AxiosError = AxiosError_default; +axios.Cancel = axios.CanceledError; +axios.all = /* @__PURE__ */ __name(function all(promises) { + return Promise.all(promises); +}, "all"); +axios.spread = spread; +axios.isAxiosError = isAxiosError; +axios.mergeConfig = mergeConfig; +axios.AxiosHeaders = AxiosHeaders_default; +axios.formToJSON = (thing) => formDataToJSON_default(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing); +axios.getAdapter = adapters_default.getAdapter; +axios.HttpStatusCode = HttpStatusCode_default; +axios.default = axios; +var axios_default = axios; + +// ../../node_modules/axios/index.js +var { + Axios: Axios2, + AxiosError: AxiosError2, + CanceledError: CanceledError2, + isCancel: isCancel2, + CancelToken: CancelToken2, + VERSION: VERSION2, + all: all2, + Cancel, + isAxiosError: isAxiosError2, + spread: spread2, + toFormData: toFormData2, + AxiosHeaders: AxiosHeaders2, + HttpStatusCode: HttpStatusCode2, + formToJSON, + getAdapter: getAdapter2, + mergeConfig: mergeConfig2 +} = axios_default; + +// src/lib/telegram-service.ts +var BOT_TOKEN = telegramBotToken; +var TELEGRAM_API_URL = `https://api.telegram.org/bot${BOT_TOKEN}`; + +// src/lib/post-order-handler.ts +var ORDER_CHANNEL = "orders:placed"; +var CANCELLED_CHANNEL = "orders:cancelled"; +var publishOrder = /* @__PURE__ */ __name(async (orderDetails) => { + try { + const message2 = JSON.stringify(orderDetails); + await redis_client_default.publish(ORDER_CHANNEL, message2); + return true; + } catch (error50) { + console.error("Failed to publish order:", error50); + return false; + } +}, "publishOrder"); +var publishFormattedOrder = /* @__PURE__ */ __name(async (createdOrders, ordersBySlot) => { + try { + const orderIds = createdOrders.map((order) => order.id); + return await publishOrder({ orderIds }); + } catch (error50) { + console.error("Failed to format and publish order:", error50); + return false; + } +}, "publishFormattedOrder"); +var publishCancellation = /* @__PURE__ */ __name(async (orderId, cancelledBy, reason) => { + try { + const message2 = { + orderId, + cancelledBy, + reason, + cancelledAt: (/* @__PURE__ */ new Date()).toISOString() + }; + await redis_client_default.publish(CANCELLED_CHANNEL, JSON.stringify(message2)); + console.log("Cancellation published to Redis:", orderId); + return true; + } catch (error50) { + console.error("Failed to publish cancellation:", error50); + return false; + } +}, "publishCancellation"); + +// src/stores/user-negativity-store.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +async function getMultipleUserNegativityScores(userIds) { + try { + if (userIds.length === 0) return {}; + const result = {}; + for (const userId of userIds) { + result[userId] = await getUserNegativityScore(userId); + } + return result; + } catch (error50) { + console.error("Error getting multiple user negativity scores:", error50); + return {}; + } +} +__name(getMultipleUserNegativityScores, "getMultipleUserNegativityScores"); +async function recomputeUserNegativityScore(userId) { + try { + const totalScore = await getUserNegativityScore(userId); + } catch (error50) { + console.error(`Error recomputing negativity score for user ${userId}:`, error50); + throw error50; + } +} +__name(recomputeUserNegativityScore, "recomputeUserNegativityScore"); + +// src/trpc/apis/admin-apis/apis/order.ts +var updateOrderNotesSchema = external_exports.object({ + orderId: external_exports.number(), + adminNotes: external_exports.string() +}); +var getOrderDetailsSchema = external_exports.object({ + orderId: external_exports.number() +}); +var updatePackagedSchema = external_exports.object({ + orderId: external_exports.string(), + isPackaged: external_exports.boolean() +}); +var updateDeliveredSchema = external_exports.object({ + orderId: external_exports.string(), + isDelivered: external_exports.boolean() +}); +var updateOrderItemPackagingSchema = external_exports.object({ + orderItemId: external_exports.number(), + isPackaged: external_exports.boolean().optional(), + isPackageVerified: external_exports.boolean().optional() +}); +var getSlotOrdersSchema = external_exports.object({ + slotId: external_exports.string() +}); +var getAllOrdersSchema = external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(20), + slotId: external_exports.number().optional().nullable(), + packagedFilter: external_exports.enum(["all", "packaged", "not_packaged"]).optional().default("all"), + deliveredFilter: external_exports.enum(["all", "delivered", "not_delivered"]).optional().default("all"), + cancellationFilter: external_exports.enum(["all", "cancelled", "not_cancelled"]).optional().default("all"), + flashDeliveryFilter: external_exports.enum(["all", "flash", "regular"]).optional().default("all") +}); +var orderRouter = router2({ + updateNotes: protectedProcedure.input(updateOrderNotesSchema).mutation(async ({ input }) => { + const { orderId, adminNotes } = input; + const result = await updateOrderNotes(orderId, adminNotes || null); + if (!result) { + throw new Error("Order not found"); + } + return result; + }), + getOrderDetails: protectedProcedure.input(getOrderDetailsSchema).query(async ({ input }) => { + const { orderId } = input; + const orderDetails = await getOrderDetails(orderId); + if (!orderDetails) { + throw new Error("Order not found"); + } + return orderDetails; + }), + updatePackaged: protectedProcedure.input(updatePackagedSchema).mutation(async ({ input }) => { + const { orderId, isPackaged } = input; + const result = await updateOrderPackaged(orderId, isPackaged); + if (result.userId) await sendOrderPackagedNotification(result.userId, orderId); + return { success: true, userId: result.userId }; + }), + updateDelivered: protectedProcedure.input(updateDeliveredSchema).mutation(async ({ input }) => { + const { orderId, isDelivered } = input; + const result = await updateOrderDelivered(orderId, isDelivered); + if (result.userId) await sendOrderDeliveredNotification(result.userId, orderId); + return { success: true, userId: result.userId }; + }), + updateOrderItemPackaging: protectedProcedure.input(updateOrderItemPackagingSchema).mutation(async ({ input }) => { + const { orderItemId, isPackaged, isPackageVerified } = input; + const result = await updateOrderItemPackaging(orderItemId, isPackaged, isPackageVerified); + if (!result.updated) { + throw new ApiError("Order item not found", 404); + } + return result; + }), + removeDeliveryCharge: protectedProcedure.input(external_exports.object({ orderId: external_exports.number() })).mutation(async ({ input }) => { + const { orderId } = input; + const result = await removeDeliveryCharge(orderId); + if (!result) { + throw new Error("Order not found"); + } + return result; + }), + getSlotOrders: protectedProcedure.input(getSlotOrdersSchema).query(async ({ input }) => { + const { slotId } = input; + const result = await getSlotOrders(slotId); + return result; + }), + updateAddressCoords: protectedProcedure.input( + external_exports.object({ + addressId: external_exports.number(), + latitude: external_exports.number(), + longitude: external_exports.number() + }) + ).mutation(async ({ input }) => { + const { addressId, latitude, longitude } = input; + const result = await updateAddressCoords(addressId, latitude, longitude); + if (!result.success) { + throw new ApiError("Address not found", 404); + } + return result; + }), + getAll: protectedProcedure.input(getAllOrdersSchema).query(async ({ input }) => { + try { + const result = await getAllOrders(input); + const userIds = [...new Set(result.orders.map((order) => order.userId))]; + const negativityScores = await getMultipleUserNegativityScores(userIds); + const orders3 = result.orders.map((order) => { + const { userId, userNegativityScore, ...rest } = order; + return { + ...rest, + userNegativityScore: negativityScores[userId] || 0 + }; + }); + return { + orders: orders3, + nextCursor: result.nextCursor + }; + } catch (e) { + console.log({ e }); + } + }), + rebalanceSlots: protectedProcedure.input(external_exports.object({ slotIds: external_exports.array(external_exports.number()).min(1).max(50) })).mutation(async ({ input }) => { + const slotIds = input.slotIds; + const result = await rebalanceSlots(slotIds); + return result; + }), + cancelOrder: protectedProcedure.input(external_exports.object({ + orderId: external_exports.number(), + reason: external_exports.string().min(1, "Cancellation reason is required") + })).mutation(async ({ input }) => { + const { orderId, reason } = input; + const result = await cancelOrder(orderId, reason); + if (!result.success) { + if (result.error === "order_not_found") { + throw new ApiError(result.message, 404); + } + if (result.error === "status_not_found") { + throw new ApiError(result.message, 400); + } + if (result.error === "already_cancelled") { + throw new ApiError(result.message, 400); + } + if (result.error === "already_delivered") { + throw new ApiError(result.message, 400); + } + throw new ApiError(result.message, 400); + } + if (result.orderId) { + await publishCancellation(result.orderId, "admin", reason); + } + return { success: true, message: result.message }; + }) +}); + +// src/trpc/apis/admin-apis/apis/vendor-snippets.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var import_dayjs2 = __toESM(require_dayjs_min()); +var createSnippetSchema = external_exports.object({ + snippetCode: external_exports.string().min(1, "Snippet code is required"), + slotId: external_exports.number().optional(), + productIds: external_exports.array(external_exports.number().int().positive()).min(1, "At least one product is required"), + validTill: external_exports.string().optional(), + isPermanent: external_exports.boolean().default(false) +}); +var updateSnippetSchema = external_exports.object({ + id: external_exports.number().int().positive(), + updates: createSnippetSchema.partial().extend({ + snippetCode: external_exports.string().min(1).optional(), + productIds: external_exports.array(external_exports.number().int().positive()).optional(), + isPermanent: external_exports.boolean().default(false) + }) +}); +var vendorSnippetsRouter = router2({ + create: protectedProcedure.input(createSnippetSchema).mutation(async ({ input, ctx }) => { + const { snippetCode, slotId, productIds, validTill, isPermanent } = input; + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + if (slotId) { + const slot = await getVendorSlotById(slotId); + if (!slot) { + throw new Error("Invalid slot ID"); + } + } + const products = await getProductsByIds(productIds); + if (products.length !== productIds.length) { + throw new Error("One or more invalid product IDs"); + } + const existingSnippet = await checkVendorSnippetExists(snippetCode); + if (existingSnippet) { + throw new Error("Snippet code already exists"); + } + const result = await createVendorSnippet({ + snippetCode, + slotId, + productIds, + isPermanent, + validTill: validTill ? new Date(validTill) : void 0 + }); + return result; + }), + getAll: protectedProcedure.query(async () => { + console.log("from the vendor snipptes methods"); + try { + const result = await getAllVendorSnippets(); + const snippetsWithProducts = await Promise.all( + result.map(async (snippet) => { + const products = await getProductsByIds(snippet.productIds); + return { + ...snippet, + accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`, + products + }; + }) + ); + return snippetsWithProducts; + } catch (e) { + console.log(e); + } + return []; + }), + getById: protectedProcedure.input(external_exports.object({ id: external_exports.number().int().positive() })).query(async ({ input }) => { + const { id } = input; + const result = await getVendorSnippetById(id); + if (!result) { + throw new Error("Vendor snippet not found"); + } + return result; + }), + update: protectedProcedure.input(updateSnippetSchema).mutation(async ({ input }) => { + const { id, updates } = input; + const existingSnippet = await getVendorSnippetById(id); + if (!existingSnippet) { + throw new Error("Vendor snippet not found"); + } + if (updates.slotId) { + const slot = await getVendorSlotById(updates.slotId); + if (!slot) { + throw new Error("Invalid slot ID"); + } + } + if (updates.productIds) { + const products = await getProductsByIds(updates.productIds); + if (products.length !== updates.productIds.length) { + throw new Error("One or more invalid product IDs"); + } + } + if (updates.snippetCode && updates.snippetCode !== existingSnippet.snippetCode) { + const duplicateSnippet = await checkVendorSnippetExists(updates.snippetCode); + if (duplicateSnippet) { + throw new Error("Snippet code already exists"); + } + } + const updateData2 = { + ...updates, + validTill: updates.validTill !== void 0 ? updates.validTill ? new Date(updates.validTill) : null : void 0 + }; + const result = await updateVendorSnippet(id, updateData2); + if (!result) { + throw new Error("Failed to update vendor snippet"); + } + return result; + }), + delete: protectedProcedure.input(external_exports.object({ id: external_exports.number().int().positive() })).mutation(async ({ input }) => { + const { id } = input; + const result = await deleteVendorSnippet(id); + if (!result) { + throw new Error("Vendor snippet not found"); + } + return { message: "Vendor snippet deleted successfully" }; + }), + getOrdersBySnippet: publicProcedure.input(external_exports.object({ + snippetCode: external_exports.string().min(1, "Snippet code is required") + })).query(async ({ input }) => { + const { snippetCode } = input; + const snippet = await getVendorSnippetByCode(snippetCode); + if (!snippet) { + throw new Error("Vendor snippet not found"); + } + if (snippet.validTill && new Date(snippet.validTill) < /* @__PURE__ */ new Date()) { + throw new Error("Vendor snippet has expired"); + } + if (!snippet.slotId) { + throw new Error("Vendor snippet not associated with a slot"); + } + const matchingOrders = await getVendorOrdersBySlotId(snippet.slotId); + const filteredOrders = matchingOrders.filter((order) => { + const status = order.orderStatus; + if (status[0].isCancelled) return false; + const orderProductIds = order.orderItems.map((item) => item.productId); + return snippet.productIds.some((productId) => orderProductIds.includes(productId)); + }); + const formattedOrders = filteredOrders.map((order) => { + const attachedOrderItems = order.orderItems.filter( + (item) => snippet.productIds.includes(item.productId) + ); + const products = attachedOrderItems.map((item) => ({ + orderItemId: item.id, + productId: item.productId, + productName: item.product.name, + quantity: parseFloat(item.quantity), + productSize: item.product.productQuantity, + price: parseFloat((item.price ?? 0).toString()), + unit: item.product.unit?.shortNotation || "unit", + subtotal: parseFloat((item.price ?? 0).toString()) * parseFloat(item.quantity), + is_packaged: item.is_packaged, + is_package_verified: item.is_package_verified + })); + const orderTotal = products.reduce((sum2, p) => sum2 + p.subtotal, 0); + return { + orderId: `ORD${order.id}`, + orderDate: order.createdAt.toISOString(), + customerName: order.user.name || "", + totalAmount: orderTotal, + slotInfo: order.slot ? { + time: order.slot.deliveryTime.toISOString(), + sequence: order.slot.deliverySequence + } : null, + products, + matchedProducts: snippet.productIds, + // All snippet products are considered matched + snippetCode: snippet.snippetCode + }; + }); + return { + success: true, + data: formattedOrders, + snippet: { + id: snippet.id, + snippetCode: snippet.snippetCode, + slotId: snippet.slotId, + productIds: snippet.productIds, + validTill: snippet.validTill?.toISOString(), + createdAt: snippet.createdAt.toISOString(), + isPermanent: snippet.isPermanent + } + }; + }), + getVendorOrders: protectedProcedure.query(async () => { + const vendorOrders = await getVendorOrders(); + return vendorOrders.map((order) => ({ + id: order.id, + status: "pending", + orderDate: order.createdAt.toISOString(), + totalQuantity: order.orderItems.reduce((sum2, item) => sum2 + parseFloat(item.quantity || "0"), 0), + products: order.orderItems.map((item) => ({ + name: item.product.name, + quantity: parseFloat(item.quantity || "0"), + unit: item.product.unit?.shortNotation || "unit" + })) + })); + }), + getUpcomingSlots: publicProcedure.query(async () => { + const threeHoursAgo = (0, import_dayjs2.default)().subtract(3, "hour").toDate(); + const slots = await getSlotsAfterDate(threeHoursAgo); + return { + success: true, + data: slots.map((slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime.toISOString(), + freezeTime: slot.freezeTime.toISOString(), + deliverySequence: slot.deliverySequence + })) + }; + }), + getOrdersBySnippetAndSlot: publicProcedure.input(external_exports.object({ + snippetCode: external_exports.string().min(1, "Snippet code is required"), + slotId: external_exports.number().int().positive("Valid slot ID is required") + })).query(async ({ input }) => { + const { snippetCode, slotId } = input; + const snippet = await getVendorSnippetByCode(snippetCode); + const slot = await getVendorSlotById(slotId); + if (!snippet) { + throw new Error("Vendor snippet not found"); + } + if (!slot) { + throw new Error("Slot not found"); + } + const matchingOrders = await getVendorOrdersBySlotId(slotId); + const filteredOrders = matchingOrders.filter((order) => { + const status = order.orderStatus; + if (status[0]?.isCancelled) return false; + const orderProductIds = order.orderItems.map((item) => item.productId); + return snippet.productIds.some((productId) => orderProductIds.includes(productId)); + }); + const formattedOrders = filteredOrders.map((order) => { + const attachedOrderItems = order.orderItems.filter( + (item) => snippet.productIds.includes(item.productId) + ); + const products = attachedOrderItems.map((item) => ({ + orderItemId: item.id, + productId: item.productId, + productName: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat((item.price ?? 0).toString()), + unit: item.product.unit?.shortNotation || "unit", + subtotal: parseFloat((item.price ?? 0).toString()) * parseFloat(item.quantity), + productSize: item.product.productQuantity, + is_packaged: item.is_packaged, + is_package_verified: item.is_package_verified + })); + const orderTotal = products.reduce((sum2, p) => sum2 + p.subtotal, 0); + return { + orderId: `ORD${order.id}`, + orderDate: order.createdAt.toISOString(), + customerName: order.user.name || "", + totalAmount: orderTotal, + slotInfo: order.slot ? { + time: order.slot.deliveryTime.toISOString(), + sequence: order.slot.deliverySequence + } : null, + products, + matchedProducts: snippet.productIds, + snippetCode: snippet.snippetCode + }; + }); + return { + success: true, + data: formattedOrders, + snippet: { + id: snippet.id, + snippetCode: snippet.snippetCode, + slotId: snippet.slotId, + productIds: snippet.productIds, + validTill: snippet.validTill?.toISOString(), + createdAt: snippet.createdAt.toISOString(), + isPermanent: snippet.isPermanent + }, + selectedSlot: { + id: slot.id, + deliveryTime: slot.deliveryTime.toISOString(), + freezeTime: slot.freezeTime.toISOString(), + deliverySequence: slot.deliverySequence + } + }; + }), + updateOrderItemPackaging: publicProcedure.input(external_exports.object({ + orderItemId: external_exports.number().int().positive("Valid order item ID required"), + is_packaged: external_exports.boolean() + })).mutation(async ({ input, ctx }) => { + const { orderItemId, is_packaged } = input; + const result = await updateVendorOrderItemPackaging(orderItemId, is_packaged); + if (!result.success) { + throw new Error(result.message); + } + return result; + }) +}); + +// src/trpc/apis/admin-apis/apis/slots.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/stores/store-initializer.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/lib/roles-manager.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var ROLE_NAMES = { + ADMIN: "admin", + GENERAL_USER: "gen_user", + HOSPITAL_ADMIN: "hospital_admin", + DOCTOR: "doctor", + RECEPTIONIST: "receptionist" +}; +var defaultRole = ROLE_NAMES.GENERAL_USER; +var RoleManager = class { + constructor() { + this.roles = /* @__PURE__ */ new Map(); + this.rolesByName = /* @__PURE__ */ new Map(); + this.isInitialized = false; + } + static { + __name(this, "RoleManager"); + } + /** + * Fetch all roles from the database and cache them + * This should be called during application startup + */ + async fetchRoles() { + try { + } catch (error50) { + console.error("[RoleManager] Error fetching roles:", error50); + throw error50; + } + } + /** + * Get all roles from cache + * If not initialized, fetches roles from DB first + */ + async getRoles() { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return Array.from(this.roles.values()); + } + /** + * Get role by ID + * @param id Role ID + */ + async getRoleById(id) { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return this.roles.get(id); + } + /** + * Get role by name + * @param name Role name + */ + async getRoleByName(name) { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return this.rolesByName.get(name); + } + /** + * Check if a role exists by name + * @param name Role name + */ + async roleExists(name) { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return this.rolesByName.has(name); + } + /** + * Get business roles (roles that are not 'admin' or 'gen_user') + */ + async getBusinessRoles() { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return Array.from(this.roles.values()).filter( + (role) => role.name !== ROLE_NAMES.ADMIN && role.name !== ROLE_NAMES.GENERAL_USER + ); + } + /** + * Force refresh the roles cache + */ + async refreshRoles() { + await this.fetchRoles(); + } +}; +var roleManager = new RoleManager(); +var roles_manager_default = roleManager; + +// src/lib/const-store.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/lib/const-keys.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var CONST_KEYS = { + minRegularOrderValue: "minRegularOrderValue", + freeDeliveryThreshold: "freeDeliveryThreshold", + deliveryCharge: "deliveryCharge", + flashFreeDeliveryThreshold: "flashFreeDeliveryThreshold", + flashDeliveryCharge: "flashDeliveryCharge", + platformFeePercent: "platformFeePercent", + taxRate: "taxRate", + tester: "tester", + minOrderAmountForCoupon: "minOrderAmountForCoupon", + maxCouponDiscount: "maxCouponDiscount", + flashDeliverySlotId: "flashDeliverySlotId", + readableOrderId: "readableOrderId", + versionNum: "versionNum", + playStoreUrl: "playStoreUrl", + appStoreUrl: "appStoreUrl", + popularItems: "popularItems", + allItemsOrder: "allItemsOrder", + isFlashDeliveryEnabled: "isFlashDeliveryEnabled", + supportMobile: "supportMobile", + supportEmail: "supportEmail" +}; +var CONST_KEYS_ARRAY = Object.values(CONST_KEYS); + +// src/lib/const-store.ts +var computeConstants = /* @__PURE__ */ __name(async () => { + try { + console.log("Computing constants from database..."); + const constants = await getAllKeyValStore(); + console.log(`Computed ${constants.length} constants from DB`); + } catch (error50) { + console.error("Failed to compute constants:", error50); + throw error50; + } +}, "computeConstants"); +var getConstant = /* @__PURE__ */ __name(async (key) => { + const constants = await getAllKeyValStore(); + const entry = constants.find((c) => c.key === key); + if (!entry) { + return null; + } + return entry.value; +}, "getConstant"); +var getConstants = /* @__PURE__ */ __name(async (keys) => { + const constants = await getAllKeyValStore(); + const constantsMap = new Map(constants.map((c) => [c.key, c.value])); + const result = {}; + for (const key of keys) { + const value = constantsMap.get(key); + result[key] = value !== void 0 ? value : null; + } + return result; +}, "getConstants"); +var getAllConstValues = /* @__PURE__ */ __name(async () => { + const constants = await getAllKeyValStore(); + const constantsMap = new Map(constants.map((c) => [c.key, c.value])); + const result = {}; + for (const key of CONST_KEYS_ARRAY) { + result[key] = constantsMap.get(key) ?? null; + } + return result; +}, "getAllConstValues"); + +// src/stores/slot-store.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +async function transformSlotToStoreSlot(slot) { + return { + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isCapacityFull: slot.isCapacityFull, + products: slot.productSlots.map((productSlot) => ({ + id: productSlot.product.id, + name: productSlot.product.name, + productQuantity: productSlot.product.productQuantity, + shortDescription: productSlot.product.shortDescription, + price: productSlot.product.price.toString(), + marketPrice: productSlot.product.marketPrice?.toString() || null, + unit: productSlot.product.unit?.shortNotation || null, + images: scaffoldAssetUrl( + productSlot.product.images || [] + ), + isOutOfStock: productSlot.product.isOutOfStock, + storeId: productSlot.product.storeId, + nextDeliveryDate: slot.deliveryTime + })) + }; +} +__name(transformSlotToStoreSlot, "transformSlotToStoreSlot"); +function extractSlotInfo(slot) { + return { + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isCapacityFull: slot.isCapacityFull + }; +} +__name(extractSlotInfo, "extractSlotInfo"); +async function fetchAllTransformedSlots() { + const slots = await getAllSlotsWithProductsForCache(); + return Promise.all(slots.map(transformSlotToStoreSlot)); +} +__name(fetchAllTransformedSlots, "fetchAllTransformedSlots"); +async function initializeSlotStore() { + try { + console.log("Initializing slot store in Redis..."); + const slots = await getAllSlotsWithProductsForCache(); + const slotsWithProducts = await Promise.all( + slots.map(async (slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isCapacityFull: slot.isCapacityFull, + products: await Promise.all( + slot.productSlots.map(async (productSlot) => ({ + id: productSlot.product.id, + name: productSlot.product.name, + productQuantity: productSlot.product.productQuantity, + shortDescription: productSlot.product.shortDescription, + price: productSlot.product.price.toString(), + marketPrice: productSlot.product.marketPrice?.toString() || null, + unit: productSlot.product.unit?.shortNotation || null, + images: scaffoldAssetUrl( + productSlot.product.images || [] + ), + isOutOfStock: productSlot.product.isOutOfStock, + storeId: productSlot.product.storeId, + nextDeliveryDate: slot.deliveryTime + })) + ) + })) + ); + const productSlotsMap = {}; + for (const slot of slotsWithProducts) { + for (const product of slot.products) { + if (!productSlotsMap[product.id]) { + productSlotsMap[product.id] = []; + } + productSlotsMap[product.id].push({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isCapacityFull: slot.isCapacityFull + }); + } + } + console.log("Slot store initialized successfully"); + } catch (error50) { + console.error("Error initializing slot store:", error50); + } +} +__name(initializeSlotStore, "initializeSlotStore"); +async function getSlotById(slotId) { + try { + const slots = await getAllSlotsWithProductsForCache(); + const slot = slots.find((s) => s.id === slotId); + if (!slot) return null; + return transformSlotToStoreSlot(slot); + } catch (error50) { + console.error(`Error getting slot ${slotId}:`, error50); + return null; + } +} +__name(getSlotById, "getSlotById"); +async function getAllSlots() { + try { + return fetchAllTransformedSlots(); + } catch (error50) { + console.error("Error getting all slots:", error50); + return []; + } +} +__name(getAllSlots, "getAllSlots"); +async function getMultipleProductsSlots(productIds) { + try { + if (productIds.length === 0) return {}; + const slots = await getAllSlotsWithProductsForCache(); + const productIdSet = new Set(productIds); + const result = {}; + for (const productId of productIds) { + result[productId] = []; + } + for (const slot of slots) { + const slotInfo = extractSlotInfo(slot); + for (const productSlot of slot.productSlots) { + const pid2 = productSlot.product.id; + if (productIdSet.has(pid2) && !slot.isCapacityFull) { + result[pid2].push(slotInfo); + } + } + } + return result; + } catch (error50) { + console.error("Error getting products slots:", error50); + return {}; + } +} +__name(getMultipleProductsSlots, "getMultipleProductsSlots"); + +// src/stores/banner-store.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +async function initializeBannerStore() { + try { + console.log("Initializing banner store in Redis..."); + const banners = await getAllBannersForCache(); + console.log("Banner store initialized successfully"); + } catch (error50) { + console.error("Error initializing banner store:", error50); + } +} +__name(initializeBannerStore, "initializeBannerStore"); + +// src/lib/cloud_cache.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/trpc/apis/common-apis/common-trpc-index.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@turf/turf/dist/esm/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/@turf/helpers/dist/esm/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var earthRadius = 63710088e-1; +var factors = { + centimeters: earthRadius * 100, + centimetres: earthRadius * 100, + degrees: 360 / (2 * Math.PI), + feet: earthRadius * 3.28084, + inches: earthRadius * 39.37, + kilometers: earthRadius / 1e3, + kilometres: earthRadius / 1e3, + meters: earthRadius, + metres: earthRadius, + miles: earthRadius / 1609.344, + millimeters: earthRadius * 1e3, + millimetres: earthRadius * 1e3, + nauticalmiles: earthRadius / 1852, + radians: 1, + yards: earthRadius * 1.0936 +}; +function feature(geom, properties, options = {}) { + const feat = { type: "Feature" }; + if (options.id === 0 || options.id) { + feat.id = options.id; + } + if (options.bbox) { + feat.bbox = options.bbox; + } + feat.properties = properties || {}; + feat.geometry = geom; + return feat; +} +__name(feature, "feature"); +function point(coordinates, properties, options = {}) { + if (!coordinates) { + throw new Error("coordinates is required"); + } + if (!Array.isArray(coordinates)) { + throw new Error("coordinates must be an Array"); + } + if (coordinates.length < 2) { + throw new Error("coordinates must be at least 2 numbers long"); + } + if (!isNumber2(coordinates[0]) || !isNumber2(coordinates[1])) { + throw new Error("coordinates must contain numbers"); + } + const geom = { + type: "Point", + coordinates + }; + return feature(geom, properties, options); +} +__name(point, "point"); +function polygon(coordinates, properties, options = {}) { + for (const ring of coordinates) { + if (ring.length < 4) { + throw new Error( + "Each LinearRing of a Polygon must have 4 or more Positions." + ); + } + if (ring[ring.length - 1].length !== ring[0].length) { + throw new Error("First and last Position are not equivalent."); + } + for (let j = 0; j < ring[ring.length - 1].length; j++) { + if (ring[ring.length - 1][j] !== ring[0][j]) { + throw new Error("First and last Position are not equivalent."); + } + } + } + const geom = { + type: "Polygon", + coordinates + }; + return feature(geom, properties, options); +} +__name(polygon, "polygon"); +function isNumber2(num) { + return !isNaN(num) && num !== null && !Array.isArray(num); +} +__name(isNumber2, "isNumber"); + +// ../../node_modules/@turf/invariant/dist/esm/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function getCoord(coord) { + if (!coord) { + throw new Error("coord is required"); + } + if (!Array.isArray(coord)) { + if (coord.type === "Feature" && coord.geometry !== null && coord.geometry.type === "Point") { + return [...coord.geometry.coordinates]; + } + if (coord.type === "Point") { + return [...coord.coordinates]; + } + } + if (Array.isArray(coord) && coord.length >= 2 && !Array.isArray(coord[0]) && !Array.isArray(coord[1])) { + return [...coord]; + } + throw new Error("coord must be GeoJSON Point or an Array of numbers"); +} +__name(getCoord, "getCoord"); +function getGeom(geojson) { + if (geojson.type === "Feature") { + return geojson.geometry; + } + return geojson; +} +__name(getGeom, "getGeom"); + +// ../../node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/point-in-polygon-hao/dist/esm/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/robust-predicates/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/robust-predicates/esm/orient2d.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/robust-predicates/esm/util.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var epsilon = 11102230246251565e-32; +var splitter = 134217729; +var resulterrbound = (3 + 8 * epsilon) * epsilon; +function sum(elen, e, flen, f, h) { + let Q, Qnew, hh, bvirt; + let enow = e[0]; + let fnow = f[0]; + let eindex = 0; + let findex = 0; + if (fnow > enow === fnow > -enow) { + Q = enow; + enow = e[++eindex]; + } else { + Q = fnow; + fnow = f[++findex]; + } + let hindex = 0; + if (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = enow + Q; + hh = Q - (Qnew - enow); + enow = e[++eindex]; + } else { + Qnew = fnow + Q; + hh = Q - (Qnew - fnow); + fnow = f[++findex]; + } + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + while (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = Q + enow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (enow - bvirt); + enow = e[++eindex]; + } else { + Qnew = Q + fnow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (fnow - bvirt); + fnow = f[++findex]; + } + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + } + while (eindex < elen) { + Qnew = Q + enow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (enow - bvirt); + enow = e[++eindex]; + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + while (findex < flen) { + Qnew = Q + fnow; + bvirt = Qnew - Q; + hh = Q - (Qnew - bvirt) + (fnow - bvirt); + fnow = f[++findex]; + Q = Qnew; + if (hh !== 0) { + h[hindex++] = hh; + } + } + if (Q !== 0 || hindex === 0) { + h[hindex++] = Q; + } + return hindex; +} +__name(sum, "sum"); +function estimate(elen, e) { + let Q = e[0]; + for (let i = 1; i < elen; i++) Q += e[i]; + return Q; +} +__name(estimate, "estimate"); +function vec(n) { + return new Float64Array(n); +} +__name(vec, "vec"); + +// ../../node_modules/robust-predicates/esm/orient2d.js +var ccwerrboundA = (3 + 16 * epsilon) * epsilon; +var ccwerrboundB = (2 + 12 * epsilon) * epsilon; +var ccwerrboundC = (9 + 64 * epsilon) * epsilon * epsilon; +var B = vec(4); +var C12 = vec(8); +var C2 = vec(12); +var D = vec(16); +var u = vec(4); +function orient2dadapt(ax, ay, bx, by, cx, cy, detsum) { + let acxtail, acytail, bcxtail, bcytail; + let bvirt, c, ahi, alo, bhi, blo, _i2, _j, _0, s1, s0, t12, t02, u32; + const acx = ax - cx; + const bcx = bx - cx; + const acy = ay - cy; + const bcy = by - cy; + s1 = acx * bcy; + c = splitter * acx; + ahi = c - (c - acx); + alo = acx - ahi; + c = splitter * bcy; + bhi = c - (c - bcy); + blo = bcy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t12 = acy * bcx; + c = splitter * acy; + ahi = c - (c - acy); + alo = acy - ahi; + c = splitter * bcx; + bhi = c - (c - bcx); + blo = bcx - bhi; + t02 = alo * blo - (t12 - ahi * bhi - alo * bhi - ahi * blo); + _i2 = s0 - t02; + bvirt = s0 - _i2; + B[0] = s0 - (_i2 + bvirt) + (bvirt - t02); + _j = s1 + _i2; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i2 - bvirt); + _i2 = _0 - t12; + bvirt = _0 - _i2; + B[1] = _0 - (_i2 + bvirt) + (bvirt - t12); + u32 = _j + _i2; + bvirt = u32 - _j; + B[2] = _j - (u32 - bvirt) + (_i2 - bvirt); + B[3] = u32; + let det = estimate(4, B); + let errbound = ccwerrboundB * detsum; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax - acx; + acxtail = ax - (acx + bvirt) + (bvirt - cx); + bvirt = bx - bcx; + bcxtail = bx - (bcx + bvirt) + (bvirt - cx); + bvirt = ay - acy; + acytail = ay - (acy + bvirt) + (bvirt - cy); + bvirt = by - bcy; + bcytail = by - (bcy + bvirt) + (bvirt - cy); + if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) { + return det; + } + errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det); + det += acx * bcytail + bcy * acxtail - (acy * bcxtail + bcx * acytail); + if (det >= errbound || -det >= errbound) return det; + s1 = acxtail * bcy; + c = splitter * acxtail; + ahi = c - (c - acxtail); + alo = acxtail - ahi; + c = splitter * bcy; + bhi = c - (c - bcy); + blo = bcy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t12 = acytail * bcx; + c = splitter * acytail; + ahi = c - (c - acytail); + alo = acytail - ahi; + c = splitter * bcx; + bhi = c - (c - bcx); + blo = bcx - bhi; + t02 = alo * blo - (t12 - ahi * bhi - alo * bhi - ahi * blo); + _i2 = s0 - t02; + bvirt = s0 - _i2; + u[0] = s0 - (_i2 + bvirt) + (bvirt - t02); + _j = s1 + _i2; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i2 - bvirt); + _i2 = _0 - t12; + bvirt = _0 - _i2; + u[1] = _0 - (_i2 + bvirt) + (bvirt - t12); + u32 = _j + _i2; + bvirt = u32 - _j; + u[2] = _j - (u32 - bvirt) + (_i2 - bvirt); + u[3] = u32; + const C1len = sum(4, B, 4, u, C12); + s1 = acx * bcytail; + c = splitter * acx; + ahi = c - (c - acx); + alo = acx - ahi; + c = splitter * bcytail; + bhi = c - (c - bcytail); + blo = bcytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t12 = acy * bcxtail; + c = splitter * acy; + ahi = c - (c - acy); + alo = acy - ahi; + c = splitter * bcxtail; + bhi = c - (c - bcxtail); + blo = bcxtail - bhi; + t02 = alo * blo - (t12 - ahi * bhi - alo * bhi - ahi * blo); + _i2 = s0 - t02; + bvirt = s0 - _i2; + u[0] = s0 - (_i2 + bvirt) + (bvirt - t02); + _j = s1 + _i2; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i2 - bvirt); + _i2 = _0 - t12; + bvirt = _0 - _i2; + u[1] = _0 - (_i2 + bvirt) + (bvirt - t12); + u32 = _j + _i2; + bvirt = u32 - _j; + u[2] = _j - (u32 - bvirt) + (_i2 - bvirt); + u[3] = u32; + const C2len = sum(C1len, C12, 4, u, C2); + s1 = acxtail * bcytail; + c = splitter * acxtail; + ahi = c - (c - acxtail); + alo = acxtail - ahi; + c = splitter * bcytail; + bhi = c - (c - bcytail); + blo = bcytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t12 = acytail * bcxtail; + c = splitter * acytail; + ahi = c - (c - acytail); + alo = acytail - ahi; + c = splitter * bcxtail; + bhi = c - (c - bcxtail); + blo = bcxtail - bhi; + t02 = alo * blo - (t12 - ahi * bhi - alo * bhi - ahi * blo); + _i2 = s0 - t02; + bvirt = s0 - _i2; + u[0] = s0 - (_i2 + bvirt) + (bvirt - t02); + _j = s1 + _i2; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i2 - bvirt); + _i2 = _0 - t12; + bvirt = _0 - _i2; + u[1] = _0 - (_i2 + bvirt) + (bvirt - t12); + u32 = _j + _i2; + bvirt = u32 - _j; + u[2] = _j - (u32 - bvirt) + (_i2 - bvirt); + u[3] = u32; + const Dlen = sum(C2len, C2, 4, u, D); + return D[Dlen - 1]; +} +__name(orient2dadapt, "orient2dadapt"); +function orient2d(ax, ay, bx, by, cx, cy) { + const detleft = (ay - cy) * (bx - cx); + const detright = (ax - cx) * (by - cy); + const det = detleft - detright; + const detsum = Math.abs(detleft + detright); + if (Math.abs(det) >= ccwerrboundA * detsum) return det; + return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum); +} +__name(orient2d, "orient2d"); + +// ../../node_modules/robust-predicates/esm/orient3d.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var o3derrboundA = (7 + 56 * epsilon) * epsilon; +var o3derrboundB = (3 + 28 * epsilon) * epsilon; +var o3derrboundC = (26 + 288 * epsilon) * epsilon * epsilon; +var bc = vec(4); +var ca = vec(4); +var ab = vec(4); +var at_b = vec(4); +var at_c = vec(4); +var bt_c = vec(4); +var bt_a = vec(4); +var ct_a = vec(4); +var ct_b = vec(4); +var bct = vec(8); +var cat = vec(8); +var abt = vec(8); +var u2 = vec(4); +var _8 = vec(8); +var _8b = vec(8); +var _16 = vec(8); +var _12 = vec(12); +var fin = vec(192); +var fin2 = vec(192); + +// ../../node_modules/robust-predicates/esm/incircle.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var iccerrboundA = (10 + 96 * epsilon) * epsilon; +var iccerrboundB = (4 + 48 * epsilon) * epsilon; +var iccerrboundC = (44 + 576 * epsilon) * epsilon * epsilon; +var bc2 = vec(4); +var ca2 = vec(4); +var ab2 = vec(4); +var aa = vec(4); +var bb = vec(4); +var cc = vec(4); +var u3 = vec(4); +var v = vec(4); +var axtbc = vec(8); +var aytbc = vec(8); +var bxtca = vec(8); +var bytca = vec(8); +var cxtab = vec(8); +var cytab = vec(8); +var abt2 = vec(8); +var bct2 = vec(8); +var cat2 = vec(8); +var abtt = vec(4); +var bctt = vec(4); +var catt = vec(4); +var _82 = vec(8); +var _162 = vec(16); +var _16b = vec(16); +var _16c = vec(16); +var _32 = vec(32); +var _32b = vec(32); +var _48 = vec(48); +var _64 = vec(64); +var fin3 = vec(1152); +var fin22 = vec(1152); + +// ../../node_modules/robust-predicates/esm/insphere.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var isperrboundA = (16 + 224 * epsilon) * epsilon; +var isperrboundB = (5 + 72 * epsilon) * epsilon; +var isperrboundC = (71 + 1408 * epsilon) * epsilon * epsilon; +var ab3 = vec(4); +var bc3 = vec(4); +var cd = vec(4); +var de = vec(4); +var ea = vec(4); +var ac = vec(4); +var bd = vec(4); +var ce = vec(4); +var da = vec(4); +var eb = vec(4); +var abc = vec(24); +var bcd = vec(24); +var cde = vec(24); +var dea = vec(24); +var eab = vec(24); +var abd = vec(24); +var bce = vec(24); +var cda = vec(24); +var deb = vec(24); +var eac = vec(24); +var adet = vec(1152); +var bdet = vec(1152); +var cdet = vec(1152); +var ddet = vec(1152); +var edet = vec(1152); +var abdet = vec(2304); +var cddet = vec(2304); +var cdedet = vec(3456); +var deter = vec(5760); +var _83 = vec(8); +var _8b2 = vec(8); +var _8c = vec(8); +var _163 = vec(16); +var _24 = vec(24); +var _482 = vec(48); +var _48b = vec(48); +var _96 = vec(96); +var _192 = vec(192); +var _384x = vec(384); +var _384y = vec(384); +var _384z = vec(384); +var _768 = vec(768); +var xdet = vec(96); +var ydet = vec(96); +var zdet = vec(96); +var fin4 = vec(1152); + +// ../../node_modules/point-in-polygon-hao/dist/esm/index.js +function pointInPolygon(p, polygon3) { + var i; + var ii; + var k = 0; + var f; + var u1; + var v1; + var u22; + var v2; + var currentP; + var nextP; + var x = p[0]; + var y = p[1]; + var numContours = polygon3.length; + for (i = 0; i < numContours; i++) { + ii = 0; + var contour = polygon3[i]; + var contourLen = contour.length - 1; + currentP = contour[0]; + if (currentP[0] !== contour[contourLen][0] && currentP[1] !== contour[contourLen][1]) { + throw new Error("First and last coordinates in a ring must be the same"); + } + u1 = currentP[0] - x; + v1 = currentP[1] - y; + for (ii; ii < contourLen; ii++) { + nextP = contour[ii + 1]; + u22 = nextP[0] - x; + v2 = nextP[1] - y; + if (v1 === 0 && v2 === 0) { + if (u22 <= 0 && u1 >= 0 || u1 <= 0 && u22 >= 0) { + return 0; + } + } else if (v2 >= 0 && v1 <= 0 || v2 <= 0 && v1 >= 0) { + f = orient2d(u1, u22, v1, v2, 0, 0); + if (f === 0) { + return 0; + } + if (f > 0 && v2 > 0 && v1 <= 0 || f < 0 && v2 <= 0 && v1 > 0) { + k++; + } + } + currentP = nextP; + v1 = v2; + u1 = u22; + } + } + if (k % 2 === 0) { + return false; + } + return true; +} +__name(pointInPolygon, "pointInPolygon"); + +// ../../node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +function booleanPointInPolygon(point2, polygon3, options = {}) { + if (!point2) { + throw new Error("point is required"); + } + if (!polygon3) { + throw new Error("polygon is required"); + } + const pt = getCoord(point2); + const geom = getGeom(polygon3); + const type = geom.type; + const bbox = polygon3.bbox; + let polys = geom.coordinates; + if (bbox && inBBox(pt, bbox) === false) { + return false; + } + if (type === "Polygon") { + polys = [polys]; + } + let result = false; + for (var i = 0; i < polys.length; ++i) { + const polyResult = pointInPolygon(pt, polys[i]); + if (polyResult === 0) return options.ignoreBoundary ? false : true; + else if (polyResult) result = true; + } + return result; +} +__name(booleanPointInPolygon, "booleanPointInPolygon"); +function inBBox(pt, bbox) { + return bbox[0] <= pt[0] && bbox[1] <= pt[1] && bbox[2] >= pt[0] && bbox[3] >= pt[1]; +} +__name(inBBox, "inBBox"); + +// src/lib/mbnr-geojson.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var mbnrGeoJson = { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + [ + [ + 78.0540565157155, + 16.750355644371382 + ], + [ + 78.02147549424018, + 16.72066473405593 + ], + [ + 78.03026125246384, + 16.71696749930787 + ], + [ + 78.0438058450269, + 16.72191442229257 + ], + [ + 78.01378723066603, + 16.729427120762438 + ], + [ + 78.01192390645633, + 16.767270033080678 + ], + [ + 77.98897480599248, + 16.78383139678816 + ], + [ + 77.98650506846502, + 16.779477610410623 + ], + [ + 77.99211289459566, + 16.764294442899583 + ], + [ + 77.9917733766166, + 16.760247911187193 + ], + [ + 77.9871626670851, + 16.762487176781022 + ], + [ + 77.98216269568468, + 16.762520539253813 + ], + [ + 77.9728079653313, + 16.75895746646411 + ], + [ + 77.97076993211158, + 16.749241850772236 + ], + [ + 77.97290869571145, + 16.714289841456335 + ], + [ + 77.98673742913684, + 16.716189282573396 + ], + [ + 78.00286970994557, + 16.718191131206893 + ], + [ + 78.02757966423519, + 16.720603921728966 + ], + [ + 78.01653780770818, + 16.73184590223127 + ], + [ + 78.0064695230268, + 16.760236966033375 + ], + [ + 78.0148831108591, + 16.760801801995825 + ], + [ + 78.01488756695255, + 16.75827980335133 + ], + [ + 78.0244311364159, + 16.744778942163208 + ], + [ + 78.03342267256608, + 16.760773251410058 + ], + [ + 78.05078586709863, + 16.763902127913653 + ], + [ + 78.0540565157155, + 16.750355644371382 + ] + ] + ], + "type": "Polygon" + } + } + ] +}; + +// src/trpc/apis/common-apis/common-trpc-index.ts +var polygon2 = polygon(mbnrGeoJson.features[0].geometry.coordinates); +async function scaffoldEssentialConsts() { + const consts = await getAllConstValues(); + return { + freeDeliveryThreshold: consts[CONST_KEYS.freeDeliveryThreshold] ?? 200, + deliveryCharge: consts[CONST_KEYS.deliveryCharge] ?? 0, + flashFreeDeliveryThreshold: consts[CONST_KEYS.flashFreeDeliveryThreshold] ?? 500, + flashDeliveryCharge: consts[CONST_KEYS.flashDeliveryCharge] ?? 69, + popularItems: consts[CONST_KEYS.popularItems] ?? "5,3,2,4,1", + versionNum: consts[CONST_KEYS.versionNum] ?? "1.1.0", + playStoreUrl: consts[CONST_KEYS.playStoreUrl] ?? "https://play.google.com/store/apps/details?id=in.freshyo.app", + appStoreUrl: consts[CONST_KEYS.appStoreUrl] ?? "https://apps.apple.com/in/app/freshyo/id6756889077", + webViewHtml: null, + isWebviewClosable: true, + isFlashDeliveryEnabled: consts[CONST_KEYS.isFlashDeliveryEnabled] ?? true, + supportMobile: consts[CONST_KEYS.supportMobile] ?? "", + supportEmail: consts[CONST_KEYS.supportEmail] ?? "", + assetsDomain, + apiCacheKey + }; +} +__name(scaffoldEssentialConsts, "scaffoldEssentialConsts"); +var commonApiRouter = router2({ + product: commonRouter, + getStoresSummary: publicProcedure.query(async () => { + const stores = await getStoresSummary(); + return { + stores + }; + }), + checkLocationInPolygon: publicProcedure.input(external_exports.object({ + lat: external_exports.number().min(-90).max(90), + lng: external_exports.number().min(-180).max(180) + })).query(({ input }) => { + try { + const { lat, lng } = input; + const point2 = point([lng, lat]); + const isInside = booleanPointInPolygon(point2, polygon2); + return { isInside }; + } catch (error50) { + throw new Error("Invalid coordinates or polygon data"); + } + }), + generateUploadUrls: protectedProcedure.input(external_exports.object({ + contextString: external_exports.enum(["review", "review_response", "product_info", "notification", "store", "complaint", "profile", "tags"]), + mimeTypes: external_exports.array(external_exports.string()) + })).mutation(async ({ input }) => { + const { contextString, mimeTypes } = input; + const uploadUrls = []; + const keys = []; + for (const mimeType of mimeTypes) { + let folder; + if (contextString === "review") { + folder = "review-images"; + } else if (contextString === "product_info") { + folder = "product-images"; + } else if (contextString === "store") { + folder = "store-images"; + } else if (contextString === "review_response") { + folder = "review-response-images"; + } else if (contextString === "complaint") { + folder = "complaint-images"; + } else if (contextString === "profile") { + folder = "profile-images"; + } else if (contextString === "tags") { + folder = "tags"; + } else { + folder = ""; + } + const extension = mimeType === "image/jpeg" ? ".jpg" : mimeType === "image/png" ? ".png" : mimeType === "image/gif" ? ".gif" : ".jpg"; + const key = `${folder}/${Date.now()}${extension}`; + try { + const uploadUrl = await generateUploadUrl(key, mimeType); + uploadUrls.push(uploadUrl); + keys.push(key); + } catch (error50) { + console.error("Error generating upload URL:", error50); + throw new ApiError("Failed to generate upload URL", 500); + } + } + return { uploadUrls }; + }), + healthCheck: publicProcedure.query(async () => { + const result = await healthCheck(); + return result; + }), + essentialConsts: publicProcedure.query(async () => { + const response = await scaffoldEssentialConsts(); + return response; + }) +}); + +// src/trpc/apis/user-apis/apis/stores.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +async function scaffoldStores() { + const storesData = await getStoreSummaries(); + const storesWithDetails = storesData.map((store) => { + const signedImageUrl = store.imageUrl ? scaffoldAssetUrl(store.imageUrl) : null; + const sampleProducts = store.sampleProducts.map((product) => ({ + id: product.id, + name: product.name, + signedImageUrl: product.images && product.images.length > 0 ? scaffoldAssetUrl(product.images[0]) : null + })); + return { + id: store.id, + name: store.name, + description: store.description, + signedImageUrl, + productCount: store.productCount, + sampleProducts + }; + }); + return { + stores: storesWithDetails + }; +} +__name(scaffoldStores, "scaffoldStores"); +async function scaffoldStoreWithProducts(storeId) { + const storeDetail = await getStoreDetail(storeId); + if (!storeDetail) { + throw new ApiError("Store not found", 404); + } + const signedImageUrl = storeDetail.store.imageUrl ? scaffoldAssetUrl(storeDetail.store.imageUrl) : null; + const productsWithSignedUrls = storeDetail.products.map((product) => ({ + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + price: product.price, + marketPrice: product.marketPrice, + incrementStep: product.incrementStep, + unit: product.unit, + unitNotation: product.unitNotation, + images: scaffoldAssetUrl(product.images || []), + isOutOfStock: product.isOutOfStock, + productQuantity: product.productQuantity + })); + const tags = await getTagsByStoreId(storeId); + return { + store: { + id: storeDetail.store.id, + name: storeDetail.store.name, + description: storeDetail.store.description, + signedImageUrl + }, + products: productsWithSignedUrls, + tags: tags.map((tag2) => ({ + id: tag2.id, + tagName: tag2.tagName, + tagDescription: tag2.tagDescription, + imageUrl: tag2.imageUrl, + productIds: tag2.productIds + })) + }; +} +__name(scaffoldStoreWithProducts, "scaffoldStoreWithProducts"); +var storesRouter = router2({ + getStores: publicProcedure.query(async () => { + const response = await scaffoldStores(); + return response; + }), + getStoreWithProducts: publicProcedure.input(external_exports.object({ + storeId: external_exports.number() + })).query(async ({ input }) => { + const { storeId } = input; + const response = await scaffoldStoreWithProducts(storeId); + return response; + }) +}); + +// src/trpc/apis/user-apis/apis/slots.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var import_dayjs3 = __toESM(require_dayjs_min()); +async function getSlotData(slotId) { + const slot = await getSlotById(slotId); + if (!slot) { + return null; + } + const currentTime = /* @__PURE__ */ new Date(); + if ((0, import_dayjs3.default)(slot.freezeTime).isBefore(currentTime)) { + return null; + } + return { + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + slotId: slot.id, + products: slot.products.filter((product) => !product.isOutOfStock) + }; +} +__name(getSlotData, "getSlotData"); +async function scaffoldSlotsWithProducts() { + const allSlots = await getAllSlots(); + const currentTime = /* @__PURE__ */ new Date(); + const validSlots = allSlots.filter((slot) => { + return (0, import_dayjs3.default)(slot.freezeTime).isAfter(currentTime) && (0, import_dayjs3.default)(slot.deliveryTime).isAfter(currentTime) && !slot.isCapacityFull; + }).sort((a, b) => (0, import_dayjs3.default)(a.deliveryTime).valueOf() - (0, import_dayjs3.default)(b.deliveryTime).valueOf()); + const productAvailability = await getProductAvailability(); + return { + slots: validSlots, + productAvailability, + count: validSlots.length + }; +} +__name(scaffoldSlotsWithProducts, "scaffoldSlotsWithProducts"); +var slotsRouter = router2({ + getSlots: publicProcedure.query(async () => { + const slots = await getActiveSlotsList(); + return { + slots, + count: slots.length + }; + }), + getSlotsWithProducts: publicProcedure.query(async () => { + const response = await scaffoldSlotsWithProducts(); + return response; + }), + getSlotById: publicProcedure.input(external_exports.object({ slotId: external_exports.number() })).query(async ({ input }) => { + return await getSlotData(input.slotId); + }) +}); + +// src/trpc/apis/user-apis/apis/banners.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +async function scaffoldBanners() { + const banners = await getActiveBanners(); + const bannersWithSignedUrls = banners.map((banner) => ({ + ...banner, + imageUrl: banner.imageUrl ? scaffoldAssetUrl(banner.imageUrl) : banner.imageUrl + })); + return { + banners: bannersWithSignedUrls + }; +} +__name(scaffoldBanners, "scaffoldBanners"); +var bannerRouter = router2({ + getBanners: publicProcedure.query(async () => { + const response = await scaffoldBanners(); + return response; + }) +}); + +// ../../packages/shared/index.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../packages/shared/types/index.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../packages/shared/index.ts +var CACHE_FILENAMES = { + products: "products.json", + stores: "stores.json", + slots: "slots.json", + essentialConsts: "essential-consts.json", + banners: "banners.json" +}; + +// src/lib/retry.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +async function retryWithExponentialBackoff(fn, maxRetries = 3, delayMs = 1e3) { + let lastError; + for (let attempt = 1; attempt <= maxRetries; attempt++) { + try { + return await fn(); + } catch (error50) { + lastError = error50 instanceof Error ? error50 : new Error(String(error50)); + if (attempt < maxRetries) { + console.log(`Attempt ${attempt} failed, retrying in ${delayMs}ms...`); + await new Promise((resolve) => setTimeout(resolve, delayMs)); + delayMs *= 2; + } + } + } + throw lastError; +} +__name(retryWithExponentialBackoff, "retryWithExponentialBackoff"); + +// src/lib/cloud_cache.ts +function constructCacheUrl(path3) { + return `${assetsDomain}${apiCacheKey}/${path3}`; +} +__name(constructCacheUrl, "constructCacheUrl"); +async function createAllCacheFiles() { + console.log("Starting creation of all cache files..."); + const [ + productsKey, + essentialConstsKey, + storesKey, + slotsKey, + bannersKey, + individualStoreKeys + ] = await Promise.all([ + createProductsFileInternal(), + createEssentialConstsFileInternal(), + createStoresFileInternal(), + createSlotsFileInternal(), + createBannersFileInternal(), + createAllStoresFilesInternal() + ]); + const urls = [ + constructCacheUrl(CACHE_FILENAMES.products), + constructCacheUrl(CACHE_FILENAMES.essentialConsts), + constructCacheUrl(CACHE_FILENAMES.stores), + constructCacheUrl(CACHE_FILENAMES.slots), + constructCacheUrl(CACHE_FILENAMES.banners), + ...individualStoreKeys.map((_, index) => constructCacheUrl(`stores/${index + 1}.json`)) + ]; + try { + await retryWithExponentialBackoff(() => clearUrlCache(urls)); + console.log(`Cache purged for all ${urls.length} files`); + } catch (error50) { + console.error(`Failed to purge cache for all files after 3 retries`, error50); + } + console.log("All cache files created successfully"); + return { + products: productsKey, + essentialConsts: essentialConstsKey, + stores: storesKey, + slots: slotsKey, + banners: bannersKey, + individualStores: individualStoreKeys + }; +} +__name(createAllCacheFiles, "createAllCacheFiles"); +async function createProductsFileInternal() { + const productsData = await scaffoldProducts(); + const jsonContent = JSON.stringify(productsData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.products}`); +} +__name(createProductsFileInternal, "createProductsFileInternal"); +async function createEssentialConstsFileInternal() { + const essentialConstsData = await scaffoldEssentialConsts(); + const jsonContent = JSON.stringify(essentialConstsData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.essentialConsts}`); +} +__name(createEssentialConstsFileInternal, "createEssentialConstsFileInternal"); +async function createStoresFileInternal() { + const storesData = await scaffoldStores(); + const jsonContent = JSON.stringify(storesData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.stores}`); +} +__name(createStoresFileInternal, "createStoresFileInternal"); +async function createSlotsFileInternal() { + const slotsData = await scaffoldSlotsWithProducts(); + const jsonContent = JSON.stringify(slotsData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.slots}`); +} +__name(createSlotsFileInternal, "createSlotsFileInternal"); +async function createBannersFileInternal() { + const bannersData = await scaffoldBanners(); + const jsonContent = JSON.stringify(bannersData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.banners}`); +} +__name(createBannersFileInternal, "createBannersFileInternal"); +async function createAllStoresFilesInternal() { + const stores = await getStoresSummary(); + const results = []; + for (const store of stores) { + const storeData = await scaffoldStoreWithProducts(store.id); + const jsonContent = JSON.stringify(storeData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + const s3Key = await imageUploadS3(buffer, "application/json", `${apiCacheKey}/stores/${store.id}.json`); + results.push(s3Key); + } + console.log(`Created ${results.length} store cache files`); + return results; +} +__name(createAllStoresFilesInternal, "createAllStoresFilesInternal"); +async function clearUrlCache(urls) { + if (!cloudflareApiToken || !cloudflareZoneId) { + console.warn("Cloudflare credentials not configured, skipping cache clear"); + return { success: false, errors: ["Cloudflare credentials not configured"] }; + } + try { + const response = await axios_default.post( + `https://api.cloudflare.com/client/v4/zones/${cloudflareZoneId}/purge_cache`, + { files: urls }, + { + headers: { + "Authorization": `Bearer ${cloudflareApiToken}`, + "Content-Type": "application/json" + } + } + ); + const result = response.data; + if (!result.success) { + const errorMessages = result.errors?.map((e) => e.message) || ["Unknown error"]; + console.error(`Cloudflare cache purge failed for URLs: ${urls.join(", ")}`, errorMessages); + return { success: false, errors: errorMessages }; + } + console.log(`Successfully purged ${urls.length} URLs from Cloudflare cache: ${urls.join(", ")}`); + return { success: true }; + } catch (error50) { + console.log(error50); + const errorMessage = error50 instanceof Error ? error50.message : "Unknown error"; + console.error(`Error clearing Cloudflare cache for URLs: ${urls.join(", ")}`, errorMessage); + return { success: false, errors: [errorMessage] }; + } +} +__name(clearUrlCache, "clearUrlCache"); + +// src/stores/store-initializer.ts +var STORE_INIT_DELAY_MS = 3 * 60 * 1e3; +var storeInitializationTimeout = null; +var initializeAllStores = /* @__PURE__ */ __name(async () => { + try { + console.log("Starting application stores initialization..."); + await Promise.all([ + roles_manager_default.fetchRoles(), + computeConstants(), + initializeProducts(), + initializeProductTagStore(), + initializeSlotStore(), + initializeBannerStore() + ]); + console.log("All application stores initialized successfully"); + createAllCacheFiles().catch((error50) => { + console.error("Failed to regenerate cache files during store initialization:", error50); + }); + } catch (error50) { + console.error("Application stores initialization failed:", error50); + throw error50; + } +}, "initializeAllStores"); +var scheduleStoreInitialization = /* @__PURE__ */ __name(() => { + if (storeInitializationTimeout) { + clearTimeout(storeInitializationTimeout); + storeInitializationTimeout = null; + } + storeInitializationTimeout = setTimeout(() => { + storeInitializationTimeout = null; + initializeAllStores().catch((error50) => { + console.error("Scheduled store initialization failed:", error50); + }); + }, STORE_INIT_DELAY_MS); +}, "scheduleStoreInitialization"); + +// src/trpc/apis/admin-apis/apis/slots.ts +var cachedSequenceSchema = external_exports.record(external_exports.string(), external_exports.array(external_exports.number())); +var createSlotSchema = external_exports.object({ + deliveryTime: external_exports.string(), + freezeTime: external_exports.string(), + isActive: external_exports.boolean().optional(), + productIds: external_exports.array(external_exports.number()).optional(), + vendorSnippets: external_exports.array(external_exports.object({ + name: external_exports.string().min(1), + productIds: external_exports.array(external_exports.number().int().positive()).min(1), + validTill: external_exports.string().optional() + })).optional(), + groupIds: external_exports.array(external_exports.number()).optional() +}); +var getSlotByIdSchema = external_exports.object({ + id: external_exports.number() +}); +var updateSlotSchema = external_exports.object({ + id: external_exports.number(), + deliveryTime: external_exports.string(), + freezeTime: external_exports.string(), + isActive: external_exports.boolean().optional(), + productIds: external_exports.array(external_exports.number()).optional(), + vendorSnippets: external_exports.array(external_exports.object({ + name: external_exports.string().min(1), + productIds: external_exports.array(external_exports.number().int().positive()).min(1), + validTill: external_exports.string().optional() + })).optional(), + groupIds: external_exports.array(external_exports.number()).optional() +}); +var deleteSlotSchema = external_exports.object({ + id: external_exports.number() +}); +var getDeliverySequenceSchema = external_exports.object({ + id: external_exports.string() +}); +var updateDeliverySequenceSchema = external_exports.object({ + id: external_exports.number(), + // deliverySequence: z.array(z.number()), + deliverySequence: external_exports.any() +}); +var slotsRouter2 = router2({ + // Exact replica of GET /av/slots + getAll: protectedProcedure.query(async ({ ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const slots = await getActiveSlotsWithProducts(); + return { + slots, + count: slots.length + }; + }), + // Exact replica of POST /av/products/slots/product-ids + getSlotsProductIds: protectedProcedure.input(external_exports.object({ slotIds: external_exports.array(external_exports.number()) })).query(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { slotIds } = input; + if (!Array.isArray(slotIds)) { + throw new TRPCError({ + code: "BAD_REQUEST", + message: "slotIds must be an array" + }); + } + const result = await getSlotsProductIds(slotIds); + return result; + }), + // Exact replica of PUT /av/products/slots/:slotId/products + updateSlotProducts: protectedProcedure.input( + external_exports.object({ + slotId: external_exports.number(), + productIds: external_exports.array(external_exports.number()) + }) + ).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { slotId, productIds } = input; + if (!Array.isArray(productIds)) { + throw new TRPCError({ + code: "BAD_REQUEST", + message: "productIds must be an array" + }); + } + const result = await updateSlotProducts(String(slotId), productIds.map(String)); + scheduleStoreInitialization(); + return { + message: result.message, + added: result.added, + removed: result.removed + }; + }), + createSlot: protectedProcedure.input(createSlotSchema).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input; + if (!deliveryTime || !freezeTime) { + throw new ApiError("Delivery time and orders close time are required", 400); + } + const result = await createSlotWithRelations({ + deliveryTime, + freezeTime, + isActive, + productIds, + vendorSnippets: snippets, + groupIds + }); + scheduleStoreInitialization(); + return result; + }), + getSlots: protectedProcedure.query(async ({ ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const slots = await getActiveSlots(); + return { + slots, + count: slots.length + }; + }), + getSlotById: protectedProcedure.input(getSlotByIdSchema).query(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { id } = input; + const slot = await getSlotByIdWithRelations(id); + if (!slot) { + throw new ApiError("Slot not found", 404); + } + return { + slot: { + ...slot, + vendorSnippets: slot.vendorSnippets.map((snippet) => ({ + ...snippet, + accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}` + })) + } + }; + }), + updateSlot: protectedProcedure.input(updateSlotSchema).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + try { + const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input; + if (!deliveryTime || !freezeTime) { + throw new ApiError("Delivery time and orders close time are required", 400); + } + const result = await updateSlotWithRelations({ + id, + deliveryTime, + freezeTime, + isActive, + productIds, + vendorSnippets: snippets, + groupIds + }); + if (!result) { + throw new ApiError("Slot not found", 404); + } + scheduleStoreInitialization(); + return result; + } catch (e) { + console.log(e); + throw new ApiError("Unable to Update Slot"); + } + }), + deleteSlot: protectedProcedure.input(deleteSlotSchema).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { id } = input; + const deletedSlot = await deleteSlotById(id); + if (!deletedSlot) { + throw new ApiError("Slot not found", 404); + } + scheduleStoreInitialization(); + return { + message: "Slot deleted successfully" + }; + }), + getDeliverySequence: protectedProcedure.input(getDeliverySequenceSchema).query(async ({ input, ctx }) => { + const { id } = input; + const slotId = parseInt(id); + const slot = await getSlotDeliverySequence(slotId); + if (!slot) { + throw new ApiError("Slot not found", 404); + } + const sequence = slot.deliverySequence || {}; + return { deliverySequence: sequence }; + }), + updateDeliverySequence: protectedProcedure.input(updateDeliverySequenceSchema).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { id, deliverySequence } = input; + const updatedSlot = await updateSlotDeliverySequence(id, deliverySequence); + if (!updatedSlot) { + throw new ApiError("Slot not found", 404); + } + return { + slot: updatedSlot, + message: "Delivery sequence updated successfully" + }; + }), + updateSlotCapacity: protectedProcedure.input(external_exports.object({ + slotId: external_exports.number(), + isCapacityFull: external_exports.boolean() + })).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { slotId, isCapacityFull } = input; + const result = await updateSlotCapacity(slotId, isCapacityFull); + if (!result) { + throw new ApiError("Slot not found", 404); + } + scheduleStoreInitialization(); + return result; + }) +}); + +// src/trpc/apis/admin-apis/apis/product.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var productRouter = router2({ + getProducts: protectedProcedure.query(async () => { + const products = await getAllProducts(); + const productsWithSignedUrls = await Promise.all( + products.map(async (product) => ({ + ...product, + images: await generateSignedUrlsFromS3Urls(product.images || []) + })) + ); + return { + products: productsWithSignedUrls, + count: productsWithSignedUrls.length + }; + }), + getProductById: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).query(async ({ input }) => { + const { id } = input; + const product = await getProductById(id); + if (!product) { + throw new ApiError("Product not found", 404); + } + const productWithSignedUrls = { + ...product, + images: await generateSignedUrlsFromS3Urls(product.images || []) + }; + return { + product: productWithSignedUrls + }; + }), + deleteProduct: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).mutation(async ({ input }) => { + const { id } = input; + const deletedProduct = await deleteProduct(id); + if (!deletedProduct) { + throw new ApiError("Product not found", 404); + } + scheduleStoreInitialization(); + return { + message: "Product deleted successfully" + }; + }), + toggleOutOfStock: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).mutation(async ({ input }) => { + const { id } = input; + const updatedProduct = await toggleProductOutOfStock(id); + if (!updatedProduct) { + throw new ApiError("Product not found", 404); + } + scheduleStoreInitialization(); + return { + product: updatedProduct, + message: `Product marked as ${updatedProduct.isOutOfStock ? "out of stock" : "in stock"}` + }; + }), + createProduct: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + shortDescription: external_exports.string().optional(), + longDescription: external_exports.string().optional(), + unitId: external_exports.number().min(1, "Unit is required"), + storeId: external_exports.number().min(1, "Store is required"), + price: external_exports.number().positive("Price must be positive"), + marketPrice: external_exports.number().optional(), + incrementStep: external_exports.number().optional().default(1), + productQuantity: external_exports.number().optional().default(1), + isSuspended: external_exports.boolean().optional().default(false), + isFlashAvailable: external_exports.boolean().optional().default(false), + flashPrice: external_exports.number().optional(), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]), + deals: external_exports.array(external_exports.object({ + quantity: external_exports.number(), + price: external_exports.number(), + validTill: external_exports.string() + })).optional(), + tagIds: external_exports.array(external_exports.number()).optional().default([]) + })).mutation(async ({ input }) => { + const { name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, uploadUrls, deals, tagIds } = input; + const existingProduct = await checkProductExistsByName(name.trim()); + if (existingProduct) { + throw new ApiError("A product with this name already exists", 400); + } + const unitExists = await checkUnitExists(unitId); + if (!unitExists) { + throw new ApiError("Invalid unit ID", 400); + } + const imageKeys = uploadUrls.map((url2) => extractKeyFromPresignedUrl(url2)); + const newProduct = await createProduct({ + name, + shortDescription, + longDescription, + unitId, + storeId, + price: price.toString(), + marketPrice: marketPrice?.toString(), + incrementStep, + productQuantity, + isSuspended, + isFlashAvailable, + flashPrice: flashPrice?.toString(), + images: imageKeys + }); + let createdDeals = []; + if (deals && deals.length > 0) { + createdDeals = await createSpecialDealsForProduct(newProduct.id, deals); + } + if (tagIds.length > 0) { + await replaceProductTags(newProduct.id, tagIds); + } + if (uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + scheduleStoreInitialization(); + return { + product: newProduct, + deals: createdDeals, + message: "Product created successfully" + }; + }), + updateProduct: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + name: external_exports.string().min(1, "Name is required"), + shortDescription: external_exports.string().optional(), + longDescription: external_exports.string().optional(), + unitId: external_exports.number().min(1, "Unit is required"), + storeId: external_exports.number().min(1, "Store is required"), + price: external_exports.number().positive("Price must be positive"), + marketPrice: external_exports.number().optional(), + incrementStep: external_exports.number().optional().default(1), + productQuantity: external_exports.number().optional().default(1), + isSuspended: external_exports.boolean().optional().default(false), + isFlashAvailable: external_exports.boolean().optional().default(false), + flashPrice: external_exports.number().nullable().optional(), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]), + imagesToDelete: external_exports.array(external_exports.string()).optional().default([]), + deals: external_exports.array(external_exports.object({ + quantity: external_exports.number(), + price: external_exports.number(), + validTill: external_exports.string() + })).optional(), + tagIds: external_exports.array(external_exports.number()).optional().default([]) + })).mutation(async ({ input }) => { + const { id, name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, uploadUrls, imagesToDelete, deals, tagIds } = input; + const unitExists = await checkUnitExists(unitId); + if (!unitExists) { + throw new ApiError("Invalid unit ID", 400); + } + const currentImages = await getProductImagesById(id); + if (!currentImages) { + throw new ApiError("Product not found", 404); + } + let updatedImages = currentImages || []; + if (imagesToDelete.length > 0) { + const imagesToRemove = updatedImages.filter((img) => imagesToDelete.includes(img)); + await deleteImageUtil({ keys: imagesToRemove }); + updatedImages = updatedImages.filter((img) => !imagesToRemove.includes(img)); + } + const newImageKeys = uploadUrls.map((url2) => extractKeyFromPresignedUrl(url2)); + const finalImages = [...updatedImages, ...newImageKeys]; + const updatedProduct = await updateProduct(id, { + name, + shortDescription, + longDescription, + unitId, + storeId, + price: price.toString(), + marketPrice: marketPrice?.toString(), + incrementStep, + productQuantity, + isSuspended, + isFlashAvailable, + flashPrice: flashPrice?.toString() ?? null, + images: finalImages + }); + if (!updatedProduct) { + throw new ApiError("Product not found", 404); + } + if (deals && deals.length > 0) { + await updateProductDeals(id, deals); + } + if (tagIds.length > 0) { + await replaceProductTags(id, tagIds); + } + if (uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + scheduleStoreInitialization(); + return { + product: updatedProduct, + message: "Product updated successfully" + }; + }), + updateSlotProducts: protectedProcedure.input(external_exports.object({ + slotId: external_exports.string(), + productIds: external_exports.array(external_exports.string()) + })).mutation(async ({ input }) => { + const { slotId, productIds } = input; + if (!Array.isArray(productIds)) { + throw new ApiError("productIds must be an array", 400); + } + const result = await updateSlotProducts(slotId, productIds); + scheduleStoreInitialization(); + return { + message: "Slot products updated successfully", + added: result.added, + removed: result.removed + }; + }), + getSlotProductIds: protectedProcedure.input(external_exports.object({ + slotId: external_exports.string() + })).query(async ({ input }) => { + const { slotId } = input; + const productIds = await getSlotProductIds(slotId); + return { + productIds + }; + }), + getSlotsProductIds: protectedProcedure.input(external_exports.object({ + slotIds: external_exports.array(external_exports.number()) + })).query(async ({ input }) => { + const { slotIds } = input; + if (!Array.isArray(slotIds)) { + throw new ApiError("slotIds must be an array", 400); + } + const result = await getSlotsProductIds(slotIds); + return result; + }), + getProductReviews: protectedProcedure.input(external_exports.object({ + productId: external_exports.number().int().positive(), + limit: external_exports.number().int().min(1).max(50).optional().default(10), + offset: external_exports.number().int().min(0).optional().default(0) + })).query(async ({ input }) => { + const { productId, limit, offset } = input; + const { reviews, totalCount } = await getProductReviews(productId, limit, offset); + const reviewsWithSignedUrls = await Promise.all( + reviews.map(async (review) => ({ + ...review, + signedImageUrls: await generateSignedUrlsFromS3Urls(review.imageUrls || []), + signedAdminImageUrls: await generateSignedUrlsFromS3Urls(review.adminResponseImages || []) + })) + ); + const hasMore = offset + limit < totalCount; + return { reviews: reviewsWithSignedUrls, hasMore }; + }), + respondToReview: protectedProcedure.input(external_exports.object({ + reviewId: external_exports.number().int().positive(), + adminResponse: external_exports.string().optional(), + adminResponseImages: external_exports.array(external_exports.string()).optional().default([]), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]) + })).mutation(async ({ input }) => { + const { reviewId, adminResponse, adminResponseImages, uploadUrls } = input; + const updatedReview = await respondToReview(reviewId, adminResponse, adminResponseImages); + if (!updatedReview) { + throw new ApiError("Review not found", 404); + } + if (uploadUrls && uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + return { success: true, review: updatedReview }; + }), + getGroups: protectedProcedure.query(async () => { + const groups = await getAllProductGroups(); + return { + groups: groups.map((group3) => ({ + ...group3, + products: group3.memberships.map((m) => ({ + ...m.product, + images: m.product.images || null + })), + productCount: group3.memberships.length + })) + }; + }), + createGroup: protectedProcedure.input(external_exports.object({ + group_name: external_exports.string().min(1), + description: external_exports.string().optional(), + product_ids: external_exports.array(external_exports.number()).default([]) + })).mutation(async ({ input }) => { + const { group_name, description, product_ids } = input; + const newGroup = await createProductGroup(group_name, description, product_ids); + scheduleStoreInitialization(); + return { + group: newGroup, + message: "Group created successfully" + }; + }), + updateGroup: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + group_name: external_exports.string().optional(), + description: external_exports.string().optional(), + product_ids: external_exports.array(external_exports.number()).optional() + })).mutation(async ({ input }) => { + const { id, group_name, description, product_ids } = input; + const updatedGroup = await updateProductGroup(id, group_name, description, product_ids); + if (!updatedGroup) { + throw new ApiError("Group not found", 404); + } + scheduleStoreInitialization(); + return { + group: updatedGroup, + message: "Group updated successfully" + }; + }), + deleteGroup: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).mutation(async ({ input }) => { + const { id } = input; + const deletedGroup = await deleteProductGroup(id); + if (!deletedGroup) { + throw new ApiError("Group not found", 404); + } + scheduleStoreInitialization(); + return { + message: "Group deleted successfully" + }; + }), + updateProductPrices: protectedProcedure.input(external_exports.object({ + updates: external_exports.array(external_exports.object({ + productId: external_exports.number(), + price: external_exports.number().optional(), + marketPrice: external_exports.number().nullable().optional(), + flashPrice: external_exports.number().nullable().optional(), + isFlashAvailable: external_exports.boolean().optional() + })) + })).mutation(async ({ input }) => { + const { updates } = input; + if (updates.length === 0) { + throw new ApiError("No updates provided", 400); + } + const result = await updateProductPrices(updates); + if (result.invalidIds.length > 0) { + throw new ApiError(`Invalid product IDs: ${result.invalidIds.join(", ")}`, 400); + } + scheduleStoreInitialization(); + return { + message: `Updated prices for ${result.updatedCount} product(s)`, + updatedCount: result.updatedCount + }; + }), + getProductTags: protectedProcedure.query(async () => { + const tags = await getAllProductTagInfos(); + const tagsWithSignedUrls = await Promise.all( + tags.map(async (tag2) => ({ + ...tag2, + imageUrl: tag2.imageUrl ? await generateSignedUrlFromS3Url(tag2.imageUrl) : null + })) + ); + return { + tags: tagsWithSignedUrls, + message: "Tags retrieved successfully" + }; + }), + getProductTagById: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).query(async ({ input }) => { + const tag2 = await getProductTagInfoById(input.id); + if (!tag2) { + throw new ApiError("Tag not found", 404); + } + const tagWithSignedUrl = { + ...tag2, + imageUrl: tag2.imageUrl ? await generateSignedUrlFromS3Url(tag2.imageUrl) : null + }; + return { + tag: tagWithSignedUrl, + message: "Tag retrieved successfully" + }; + }), + createProductTag: protectedProcedure.input(external_exports.object({ + tagName: external_exports.string().min(1, "Tag name is required"), + tagDescription: external_exports.string().optional(), + imageUrl: external_exports.string().optional().nullable(), + isDashboardTag: external_exports.boolean().optional().default(false), + relatedStores: external_exports.array(external_exports.number()).optional().default([]), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]) + })).mutation(async ({ input }) => { + const { tagName, tagDescription, imageUrl, isDashboardTag, relatedStores, uploadUrls } = input; + const existingTag = await checkProductTagExistsByName(tagName.trim()); + if (existingTag) { + throw new ApiError("A tag with this name already exists", 400); + } + const createdTag = await createProductTag({ + tagName: tagName.trim(), + tagDescription, + imageUrl: imageUrl ?? null, + isDashboardTag, + relatedStores + }); + if (uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + scheduleStoreInitialization(); + const { products, ...createdTagInfo } = createdTag; + return { + tag: { + ...createdTagInfo, + imageUrl: createdTagInfo.imageUrl ? await generateSignedUrlFromS3Url(createdTagInfo.imageUrl) : null + }, + message: "Tag created successfully" + }; + }), + updateProductTag: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + tagName: external_exports.string().min(1).optional(), + tagDescription: external_exports.string().optional().nullable(), + imageUrl: external_exports.string().optional().nullable(), + isDashboardTag: external_exports.boolean().optional(), + relatedStores: external_exports.array(external_exports.number()).optional(), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]) + })).mutation(async ({ input }) => { + const { id, tagName, tagDescription, imageUrl, isDashboardTag, relatedStores, uploadUrls } = input; + const currentTag = await getProductTagInfoById(id); + if (!currentTag) { + throw new ApiError("Tag not found", 404); + } + if (imageUrl !== void 0 && imageUrl !== currentTag.imageUrl) { + if (currentTag.imageUrl) { + await deleteImageUtil({ keys: [currentTag.imageUrl] }); + } + } + const updatedTag = await updateProductTag(id, { + tagName: tagName?.trim(), + tagDescription: tagDescription ?? void 0, + imageUrl: imageUrl ?? void 0, + isDashboardTag, + relatedStores + }); + if (uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + scheduleStoreInitialization(); + const { products, ...updatedTagInfo } = updatedTag; + return { + tag: { + ...updatedTagInfo, + imageUrl: updatedTagInfo.imageUrl ? await generateSignedUrlFromS3Url(updatedTagInfo.imageUrl) : null + }, + message: "Tag updated successfully" + }; + }), + deleteProductTag: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).mutation(async ({ input }) => { + const tag2 = await getProductTagInfoById(input.id); + if (!tag2) { + throw new ApiError("Tag not found", 404); + } + if (tag2.imageUrl) { + await deleteImageUtil({ keys: [tag2.imageUrl] }); + } + await deleteProductTag(input.id); + scheduleStoreInitialization(); + return { message: "Tag deleted successfully" }; + }) +}); + +// src/trpc/apis/admin-apis/apis/staff-user.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// ../../node_modules/bcryptjs/index.js +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +import nodeCrypto from "crypto"; +var randomFallback = null; +function randomBytes(len) { + try { + return crypto.getRandomValues(new Uint8Array(len)); + } catch { + } + try { + return nodeCrypto.randomBytes(len); + } catch { + } + if (!randomFallback) { + throw Error( + "Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative" + ); + } + return randomFallback(len); +} +__name(randomBytes, "randomBytes"); +function setRandomFallback(random) { + randomFallback = random; +} +__name(setRandomFallback, "setRandomFallback"); +function genSaltSync(rounds, seed_length) { + rounds = rounds || GENSALT_DEFAULT_LOG2_ROUNDS; + if (typeof rounds !== "number") + throw Error( + "Illegal arguments: " + typeof rounds + ", " + typeof seed_length + ); + if (rounds < 4) rounds = 4; + else if (rounds > 31) rounds = 31; + var salt = []; + salt.push("$2b$"); + if (rounds < 10) salt.push("0"); + salt.push(rounds.toString()); + salt.push("$"); + salt.push(base64_encode(randomBytes(BCRYPT_SALT_LEN), BCRYPT_SALT_LEN)); + return salt.join(""); +} +__name(genSaltSync, "genSaltSync"); +function genSalt(rounds, seed_length, callback) { + if (typeof seed_length === "function") + callback = seed_length, seed_length = void 0; + if (typeof rounds === "function") callback = rounds, rounds = void 0; + if (typeof rounds === "undefined") rounds = GENSALT_DEFAULT_LOG2_ROUNDS; + else if (typeof rounds !== "number") + throw Error("illegal arguments: " + typeof rounds); + function _async(callback2) { + nextTick2(function() { + try { + callback2(null, genSaltSync(rounds)); + } catch (err) { + callback2(err); + } + }); + } + __name(_async, "_async"); + if (callback) { + if (typeof callback !== "function") + throw Error("Illegal callback: " + typeof callback); + _async(callback); + } else + return new Promise(function(resolve, reject) { + _async(function(err, res) { + if (err) { + reject(err); + return; + } + resolve(res); + }); + }); +} +__name(genSalt, "genSalt"); +function hashSync(password, salt) { + if (typeof salt === "undefined") salt = GENSALT_DEFAULT_LOG2_ROUNDS; + if (typeof salt === "number") salt = genSaltSync(salt); + if (typeof password !== "string" || typeof salt !== "string") + throw Error("Illegal arguments: " + typeof password + ", " + typeof salt); + return _hash(password, salt); +} +__name(hashSync, "hashSync"); +function hash2(password, salt, callback, progressCallback) { + function _async(callback2) { + if (typeof password === "string" && typeof salt === "number") + genSalt(salt, function(err, salt2) { + _hash(password, salt2, callback2, progressCallback); + }); + else if (typeof password === "string" && typeof salt === "string") + _hash(password, salt, callback2, progressCallback); + else + nextTick2( + callback2.bind( + this, + Error("Illegal arguments: " + typeof password + ", " + typeof salt) + ) + ); + } + __name(_async, "_async"); + if (callback) { + if (typeof callback !== "function") + throw Error("Illegal callback: " + typeof callback); + _async(callback); + } else + return new Promise(function(resolve, reject) { + _async(function(err, res) { + if (err) { + reject(err); + return; + } + resolve(res); + }); + }); +} +__name(hash2, "hash"); +function safeStringCompare(known, unknown2) { + var diff = known.length ^ unknown2.length; + for (var i = 0; i < known.length; ++i) { + diff |= known.charCodeAt(i) ^ unknown2.charCodeAt(i); + } + return diff === 0; +} +__name(safeStringCompare, "safeStringCompare"); +function compareSync(password, hash3) { + if (typeof password !== "string" || typeof hash3 !== "string") + throw Error("Illegal arguments: " + typeof password + ", " + typeof hash3); + if (hash3.length !== 60) return false; + return safeStringCompare( + hashSync(password, hash3.substring(0, hash3.length - 31)), + hash3 + ); +} +__name(compareSync, "compareSync"); +function compare(password, hashValue, callback, progressCallback) { + function _async(callback2) { + if (typeof password !== "string" || typeof hashValue !== "string") { + nextTick2( + callback2.bind( + this, + Error( + "Illegal arguments: " + typeof password + ", " + typeof hashValue + ) + ) + ); + return; + } + if (hashValue.length !== 60) { + nextTick2(callback2.bind(this, null, false)); + return; + } + hash2( + password, + hashValue.substring(0, 29), + function(err, comp) { + if (err) callback2(err); + else callback2(null, safeStringCompare(comp, hashValue)); + }, + progressCallback + ); + } + __name(_async, "_async"); + if (callback) { + if (typeof callback !== "function") + throw Error("Illegal callback: " + typeof callback); + _async(callback); + } else + return new Promise(function(resolve, reject) { + _async(function(err, res) { + if (err) { + reject(err); + return; + } + resolve(res); + }); + }); +} +__name(compare, "compare"); +function getRounds(hash3) { + if (typeof hash3 !== "string") + throw Error("Illegal arguments: " + typeof hash3); + return parseInt(hash3.split("$")[2], 10); +} +__name(getRounds, "getRounds"); +function getSalt(hash3) { + if (typeof hash3 !== "string") + throw Error("Illegal arguments: " + typeof hash3); + if (hash3.length !== 60) + throw Error("Illegal hash length: " + hash3.length + " != 60"); + return hash3.substring(0, 29); +} +__name(getSalt, "getSalt"); +function truncates(password) { + if (typeof password !== "string") + throw Error("Illegal arguments: " + typeof password); + return utf8Length(password) > 72; +} +__name(truncates, "truncates"); +var nextTick2 = typeof setImmediate === "function" ? setImmediate : typeof scheduler === "object" && typeof scheduler.postTask === "function" ? scheduler.postTask.bind(scheduler) : setTimeout; +function utf8Length(string4) { + var len = 0, c = 0; + for (var i = 0; i < string4.length; ++i) { + c = string4.charCodeAt(i); + if (c < 128) len += 1; + else if (c < 2048) len += 2; + else if ((c & 64512) === 55296 && (string4.charCodeAt(i + 1) & 64512) === 56320) { + ++i; + len += 4; + } else len += 3; + } + return len; +} +__name(utf8Length, "utf8Length"); +function utf8Array(string4) { + var offset = 0, c1, c2; + var buffer = new Array(utf8Length(string4)); + for (var i = 0, k = string4.length; i < k; ++i) { + c1 = string4.charCodeAt(i); + if (c1 < 128) { + buffer[offset++] = c1; + } else if (c1 < 2048) { + buffer[offset++] = c1 >> 6 | 192; + buffer[offset++] = c1 & 63 | 128; + } else if ((c1 & 64512) === 55296 && ((c2 = string4.charCodeAt(i + 1)) & 64512) === 56320) { + c1 = 65536 + ((c1 & 1023) << 10) + (c2 & 1023); + ++i; + buffer[offset++] = c1 >> 18 | 240; + buffer[offset++] = c1 >> 12 & 63 | 128; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } else { + buffer[offset++] = c1 >> 12 | 224; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } + } + return buffer; +} +__name(utf8Array, "utf8Array"); +var BASE64_CODE = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""); +var BASE64_INDEX = [ + -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, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + -1, + -1, + -1, + -1, + -1, + -1, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + -1, + -1, + -1, + -1, + -1 +]; +function base64_encode(b, len) { + var off2 = 0, rs = [], c1, c2; + if (len <= 0 || len > b.length) throw Error("Illegal len: " + len); + while (off2 < len) { + c1 = b[off2++] & 255; + rs.push(BASE64_CODE[c1 >> 2 & 63]); + c1 = (c1 & 3) << 4; + if (off2 >= len) { + rs.push(BASE64_CODE[c1 & 63]); + break; + } + c2 = b[off2++] & 255; + c1 |= c2 >> 4 & 15; + rs.push(BASE64_CODE[c1 & 63]); + c1 = (c2 & 15) << 2; + if (off2 >= len) { + rs.push(BASE64_CODE[c1 & 63]); + break; + } + c2 = b[off2++] & 255; + c1 |= c2 >> 6 & 3; + rs.push(BASE64_CODE[c1 & 63]); + rs.push(BASE64_CODE[c2 & 63]); + } + return rs.join(""); +} +__name(base64_encode, "base64_encode"); +function base64_decode(s, len) { + var off2 = 0, slen = s.length, olen = 0, rs = [], c1, c2, c3, c4, o, code; + if (len <= 0) throw Error("Illegal len: " + len); + while (off2 < slen - 1 && olen < len) { + code = s.charCodeAt(off2++); + c1 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + code = s.charCodeAt(off2++); + c2 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + if (c1 == -1 || c2 == -1) break; + o = c1 << 2 >>> 0; + o |= (c2 & 48) >> 4; + rs.push(String.fromCharCode(o)); + if (++olen >= len || off2 >= slen) break; + code = s.charCodeAt(off2++); + c3 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + if (c3 == -1) break; + o = (c2 & 15) << 4 >>> 0; + o |= (c3 & 60) >> 2; + rs.push(String.fromCharCode(o)); + if (++olen >= len || off2 >= slen) break; + code = s.charCodeAt(off2++); + c4 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + o = (c3 & 3) << 6 >>> 0; + o |= c4; + rs.push(String.fromCharCode(o)); + ++olen; + } + var res = []; + for (off2 = 0; off2 < olen; off2++) res.push(rs[off2].charCodeAt(0)); + return res; +} +__name(base64_decode, "base64_decode"); +var BCRYPT_SALT_LEN = 16; +var GENSALT_DEFAULT_LOG2_ROUNDS = 10; +var BLOWFISH_NUM_ROUNDS = 16; +var MAX_EXECUTION_TIME = 100; +var P_ORIG = [ + 608135816, + 2242054355, + 320440878, + 57701188, + 2752067618, + 698298832, + 137296536, + 3964562569, + 1160258022, + 953160567, + 3193202383, + 887688300, + 3232508343, + 3380367581, + 1065670069, + 3041331479, + 2450970073, + 2306472731 +]; +var S_ORIG = [ + 3509652390, + 2564797868, + 805139163, + 3491422135, + 3101798381, + 1780907670, + 3128725573, + 4046225305, + 614570311, + 3012652279, + 134345442, + 2240740374, + 1667834072, + 1901547113, + 2757295779, + 4103290238, + 227898511, + 1921955416, + 1904987480, + 2182433518, + 2069144605, + 3260701109, + 2620446009, + 720527379, + 3318853667, + 677414384, + 3393288472, + 3101374703, + 2390351024, + 1614419982, + 1822297739, + 2954791486, + 3608508353, + 3174124327, + 2024746970, + 1432378464, + 3864339955, + 2857741204, + 1464375394, + 1676153920, + 1439316330, + 715854006, + 3033291828, + 289532110, + 2706671279, + 2087905683, + 3018724369, + 1668267050, + 732546397, + 1947742710, + 3462151702, + 2609353502, + 2950085171, + 1814351708, + 2050118529, + 680887927, + 999245976, + 1800124847, + 3300911131, + 1713906067, + 1641548236, + 4213287313, + 1216130144, + 1575780402, + 4018429277, + 3917837745, + 3693486850, + 3949271944, + 596196993, + 3549867205, + 258830323, + 2213823033, + 772490370, + 2760122372, + 1774776394, + 2652871518, + 566650946, + 4142492826, + 1728879713, + 2882767088, + 1783734482, + 3629395816, + 2517608232, + 2874225571, + 1861159788, + 326777828, + 3124490320, + 2130389656, + 2716951837, + 967770486, + 1724537150, + 2185432712, + 2364442137, + 1164943284, + 2105845187, + 998989502, + 3765401048, + 2244026483, + 1075463327, + 1455516326, + 1322494562, + 910128902, + 469688178, + 1117454909, + 936433444, + 3490320968, + 3675253459, + 1240580251, + 122909385, + 2157517691, + 634681816, + 4142456567, + 3825094682, + 3061402683, + 2540495037, + 79693498, + 3249098678, + 1084186820, + 1583128258, + 426386531, + 1761308591, + 1047286709, + 322548459, + 995290223, + 1845252383, + 2603652396, + 3431023940, + 2942221577, + 3202600964, + 3727903485, + 1712269319, + 422464435, + 3234572375, + 1170764815, + 3523960633, + 3117677531, + 1434042557, + 442511882, + 3600875718, + 1076654713, + 1738483198, + 4213154764, + 2393238008, + 3677496056, + 1014306527, + 4251020053, + 793779912, + 2902807211, + 842905082, + 4246964064, + 1395751752, + 1040244610, + 2656851899, + 3396308128, + 445077038, + 3742853595, + 3577915638, + 679411651, + 2892444358, + 2354009459, + 1767581616, + 3150600392, + 3791627101, + 3102740896, + 284835224, + 4246832056, + 1258075500, + 768725851, + 2589189241, + 3069724005, + 3532540348, + 1274779536, + 3789419226, + 2764799539, + 1660621633, + 3471099624, + 4011903706, + 913787905, + 3497959166, + 737222580, + 2514213453, + 2928710040, + 3937242737, + 1804850592, + 3499020752, + 2949064160, + 2386320175, + 2390070455, + 2415321851, + 4061277028, + 2290661394, + 2416832540, + 1336762016, + 1754252060, + 3520065937, + 3014181293, + 791618072, + 3188594551, + 3933548030, + 2332172193, + 3852520463, + 3043980520, + 413987798, + 3465142937, + 3030929376, + 4245938359, + 2093235073, + 3534596313, + 375366246, + 2157278981, + 2479649556, + 555357303, + 3870105701, + 2008414854, + 3344188149, + 4221384143, + 3956125452, + 2067696032, + 3594591187, + 2921233993, + 2428461, + 544322398, + 577241275, + 1471733935, + 610547355, + 4027169054, + 1432588573, + 1507829418, + 2025931657, + 3646575487, + 545086370, + 48609733, + 2200306550, + 1653985193, + 298326376, + 1316178497, + 3007786442, + 2064951626, + 458293330, + 2589141269, + 3591329599, + 3164325604, + 727753846, + 2179363840, + 146436021, + 1461446943, + 4069977195, + 705550613, + 3059967265, + 3887724982, + 4281599278, + 3313849956, + 1404054877, + 2845806497, + 146425753, + 1854211946, + 1266315497, + 3048417604, + 3681880366, + 3289982499, + 290971e4, + 1235738493, + 2632868024, + 2414719590, + 3970600049, + 1771706367, + 1449415276, + 3266420449, + 422970021, + 1963543593, + 2690192192, + 3826793022, + 1062508698, + 1531092325, + 1804592342, + 2583117782, + 2714934279, + 4024971509, + 1294809318, + 4028980673, + 1289560198, + 2221992742, + 1669523910, + 35572830, + 157838143, + 1052438473, + 1016535060, + 1802137761, + 1753167236, + 1386275462, + 3080475397, + 2857371447, + 1040679964, + 2145300060, + 2390574316, + 1461121720, + 2956646967, + 4031777805, + 4028374788, + 33600511, + 2920084762, + 1018524850, + 629373528, + 3691585981, + 3515945977, + 2091462646, + 2486323059, + 586499841, + 988145025, + 935516892, + 3367335476, + 2599673255, + 2839830854, + 265290510, + 3972581182, + 2759138881, + 3795373465, + 1005194799, + 847297441, + 406762289, + 1314163512, + 1332590856, + 1866599683, + 4127851711, + 750260880, + 613907577, + 1450815602, + 3165620655, + 3734664991, + 3650291728, + 3012275730, + 3704569646, + 1427272223, + 778793252, + 1343938022, + 2676280711, + 2052605720, + 1946737175, + 3164576444, + 3914038668, + 3967478842, + 3682934266, + 1661551462, + 3294938066, + 4011595847, + 840292616, + 3712170807, + 616741398, + 312560963, + 711312465, + 1351876610, + 322626781, + 1910503582, + 271666773, + 2175563734, + 1594956187, + 70604529, + 3617834859, + 1007753275, + 1495573769, + 4069517037, + 2549218298, + 2663038764, + 504708206, + 2263041392, + 3941167025, + 2249088522, + 1514023603, + 1998579484, + 1312622330, + 694541497, + 2582060303, + 2151582166, + 1382467621, + 776784248, + 2618340202, + 3323268794, + 2497899128, + 2784771155, + 503983604, + 4076293799, + 907881277, + 423175695, + 432175456, + 1378068232, + 4145222326, + 3954048622, + 3938656102, + 3820766613, + 2793130115, + 2977904593, + 26017576, + 3274890735, + 3194772133, + 1700274565, + 1756076034, + 4006520079, + 3677328699, + 720338349, + 1533947780, + 354530856, + 688349552, + 3973924725, + 1637815568, + 332179504, + 3949051286, + 53804574, + 2852348879, + 3044236432, + 1282449977, + 3583942155, + 3416972820, + 4006381244, + 1617046695, + 2628476075, + 3002303598, + 1686838959, + 431878346, + 2686675385, + 1700445008, + 1080580658, + 1009431731, + 832498133, + 3223435511, + 2605976345, + 2271191193, + 2516031870, + 1648197032, + 4164389018, + 2548247927, + 300782431, + 375919233, + 238389289, + 3353747414, + 2531188641, + 2019080857, + 1475708069, + 455242339, + 2609103871, + 448939670, + 3451063019, + 1395535956, + 2413381860, + 1841049896, + 1491858159, + 885456874, + 4264095073, + 4001119347, + 1565136089, + 3898914787, + 1108368660, + 540939232, + 1173283510, + 2745871338, + 3681308437, + 4207628240, + 3343053890, + 4016749493, + 1699691293, + 1103962373, + 3625875870, + 2256883143, + 3830138730, + 1031889488, + 3479347698, + 1535977030, + 4236805024, + 3251091107, + 2132092099, + 1774941330, + 1199868427, + 1452454533, + 157007616, + 2904115357, + 342012276, + 595725824, + 1480756522, + 206960106, + 497939518, + 591360097, + 863170706, + 2375253569, + 3596610801, + 1814182875, + 2094937945, + 3421402208, + 1082520231, + 3463918190, + 2785509508, + 435703966, + 3908032597, + 1641649973, + 2842273706, + 3305899714, + 1510255612, + 2148256476, + 2655287854, + 3276092548, + 4258621189, + 236887753, + 3681803219, + 274041037, + 1734335097, + 3815195456, + 3317970021, + 1899903192, + 1026095262, + 4050517792, + 356393447, + 2410691914, + 3873677099, + 3682840055, + 3913112168, + 2491498743, + 4132185628, + 2489919796, + 1091903735, + 1979897079, + 3170134830, + 3567386728, + 3557303409, + 857797738, + 1136121015, + 1342202287, + 507115054, + 2535736646, + 337727348, + 3213592640, + 1301675037, + 2528481711, + 1895095763, + 1721773893, + 3216771564, + 62756741, + 2142006736, + 835421444, + 2531993523, + 1442658625, + 3659876326, + 2882144922, + 676362277, + 1392781812, + 170690266, + 3921047035, + 1759253602, + 3611846912, + 1745797284, + 664899054, + 1329594018, + 3901205900, + 3045908486, + 2062866102, + 2865634940, + 3543621612, + 3464012697, + 1080764994, + 553557557, + 3656615353, + 3996768171, + 991055499, + 499776247, + 1265440854, + 648242737, + 3940784050, + 980351604, + 3713745714, + 1749149687, + 3396870395, + 4211799374, + 3640570775, + 1161844396, + 3125318951, + 1431517754, + 545492359, + 4268468663, + 3499529547, + 1437099964, + 2702547544, + 3433638243, + 2581715763, + 2787789398, + 1060185593, + 1593081372, + 2418618748, + 4260947970, + 69676912, + 2159744348, + 86519011, + 2512459080, + 3838209314, + 1220612927, + 3339683548, + 133810670, + 1090789135, + 1078426020, + 1569222167, + 845107691, + 3583754449, + 4072456591, + 1091646820, + 628848692, + 1613405280, + 3757631651, + 526609435, + 236106946, + 48312990, + 2942717905, + 3402727701, + 1797494240, + 859738849, + 992217954, + 4005476642, + 2243076622, + 3870952857, + 3732016268, + 765654824, + 3490871365, + 2511836413, + 1685915746, + 3888969200, + 1414112111, + 2273134842, + 3281911079, + 4080962846, + 172450625, + 2569994100, + 980381355, + 4109958455, + 2819808352, + 2716589560, + 2568741196, + 3681446669, + 3329971472, + 1835478071, + 660984891, + 3704678404, + 4045999559, + 3422617507, + 3040415634, + 1762651403, + 1719377915, + 3470491036, + 2693910283, + 3642056355, + 3138596744, + 1364962596, + 2073328063, + 1983633131, + 926494387, + 3423689081, + 2150032023, + 4096667949, + 1749200295, + 3328846651, + 309677260, + 2016342300, + 1779581495, + 3079819751, + 111262694, + 1274766160, + 443224088, + 298511866, + 1025883608, + 3806446537, + 1145181785, + 168956806, + 3641502830, + 3584813610, + 1689216846, + 3666258015, + 3200248200, + 1692713982, + 2646376535, + 4042768518, + 1618508792, + 1610833997, + 3523052358, + 4130873264, + 2001055236, + 3610705100, + 2202168115, + 4028541809, + 2961195399, + 1006657119, + 2006996926, + 3186142756, + 1430667929, + 3210227297, + 1314452623, + 4074634658, + 4101304120, + 2273951170, + 1399257539, + 3367210612, + 3027628629, + 1190975929, + 2062231137, + 2333990788, + 2221543033, + 2438960610, + 1181637006, + 548689776, + 2362791313, + 3372408396, + 3104550113, + 3145860560, + 296247880, + 1970579870, + 3078560182, + 3769228297, + 1714227617, + 3291629107, + 3898220290, + 166772364, + 1251581989, + 493813264, + 448347421, + 195405023, + 2709975567, + 677966185, + 3703036547, + 1463355134, + 2715995803, + 1338867538, + 1343315457, + 2802222074, + 2684532164, + 233230375, + 2599980071, + 2000651841, + 3277868038, + 1638401717, + 4028070440, + 3237316320, + 6314154, + 819756386, + 300326615, + 590932579, + 1405279636, + 3267499572, + 3150704214, + 2428286686, + 3959192993, + 3461946742, + 1862657033, + 1266418056, + 963775037, + 2089974820, + 2263052895, + 1917689273, + 448879540, + 3550394620, + 3981727096, + 150775221, + 3627908307, + 1303187396, + 508620638, + 2975983352, + 2726630617, + 1817252668, + 1876281319, + 1457606340, + 908771278, + 3720792119, + 3617206836, + 2455994898, + 1729034894, + 1080033504, + 976866871, + 3556439503, + 2881648439, + 1522871579, + 1555064734, + 1336096578, + 3548522304, + 2579274686, + 3574697629, + 3205460757, + 3593280638, + 3338716283, + 3079412587, + 564236357, + 2993598910, + 1781952180, + 1464380207, + 3163844217, + 3332601554, + 1699332808, + 1393555694, + 1183702653, + 3581086237, + 1288719814, + 691649499, + 2847557200, + 2895455976, + 3193889540, + 2717570544, + 1781354906, + 1676643554, + 2592534050, + 3230253752, + 1126444790, + 2770207658, + 2633158820, + 2210423226, + 2615765581, + 2414155088, + 3127139286, + 673620729, + 2805611233, + 1269405062, + 4015350505, + 3341807571, + 4149409754, + 1057255273, + 2012875353, + 2162469141, + 2276492801, + 2601117357, + 993977747, + 3918593370, + 2654263191, + 753973209, + 36408145, + 2530585658, + 25011837, + 3520020182, + 2088578344, + 530523599, + 2918365339, + 1524020338, + 1518925132, + 3760827505, + 3759777254, + 1202760957, + 3985898139, + 3906192525, + 674977740, + 4174734889, + 2031300136, + 2019492241, + 3983892565, + 4153806404, + 3822280332, + 352677332, + 2297720250, + 60907813, + 90501309, + 3286998549, + 1016092578, + 2535922412, + 2839152426, + 457141659, + 509813237, + 4120667899, + 652014361, + 1966332200, + 2975202805, + 55981186, + 2327461051, + 676427537, + 3255491064, + 2882294119, + 3433927263, + 1307055953, + 942726286, + 933058658, + 2468411793, + 3933900994, + 4215176142, + 1361170020, + 2001714738, + 2830558078, + 3274259782, + 1222529897, + 1679025792, + 2729314320, + 3714953764, + 1770335741, + 151462246, + 3013232138, + 1682292957, + 1483529935, + 471910574, + 1539241949, + 458788160, + 3436315007, + 1807016891, + 3718408830, + 978976581, + 1043663428, + 3165965781, + 1927990952, + 4200891579, + 2372276910, + 3208408903, + 3533431907, + 1412390302, + 2931980059, + 4132332400, + 1947078029, + 3881505623, + 4168226417, + 2941484381, + 1077988104, + 1320477388, + 886195818, + 18198404, + 3786409e3, + 2509781533, + 112762804, + 3463356488, + 1866414978, + 891333506, + 18488651, + 661792760, + 1628790961, + 3885187036, + 3141171499, + 876946877, + 2693282273, + 1372485963, + 791857591, + 2686433993, + 3759982718, + 3167212022, + 3472953795, + 2716379847, + 445679433, + 3561995674, + 3504004811, + 3574258232, + 54117162, + 3331405415, + 2381918588, + 3769707343, + 4154350007, + 1140177722, + 4074052095, + 668550556, + 3214352940, + 367459370, + 261225585, + 2610173221, + 4209349473, + 3468074219, + 3265815641, + 314222801, + 3066103646, + 3808782860, + 282218597, + 3406013506, + 3773591054, + 379116347, + 1285071038, + 846784868, + 2669647154, + 3771962079, + 3550491691, + 2305946142, + 453669953, + 1268987020, + 3317592352, + 3279303384, + 3744833421, + 2610507566, + 3859509063, + 266596637, + 3847019092, + 517658769, + 3462560207, + 3443424879, + 370717030, + 4247526661, + 2224018117, + 4143653529, + 4112773975, + 2788324899, + 2477274417, + 1456262402, + 2901442914, + 1517677493, + 1846949527, + 2295493580, + 3734397586, + 2176403920, + 1280348187, + 1908823572, + 3871786941, + 846861322, + 1172426758, + 3287448474, + 3383383037, + 1655181056, + 3139813346, + 901632758, + 1897031941, + 2986607138, + 3066810236, + 3447102507, + 1393639104, + 373351379, + 950779232, + 625454576, + 3124240540, + 4148612726, + 2007998917, + 544563296, + 2244738638, + 2330496472, + 2058025392, + 1291430526, + 424198748, + 50039436, + 29584100, + 3605783033, + 2429876329, + 2791104160, + 1057563949, + 3255363231, + 3075367218, + 3463963227, + 1469046755, + 985887462 +]; +var C_ORIG = [ + 1332899944, + 1700884034, + 1701343084, + 1684370003, + 1668446532, + 1869963892 +]; +function _encipher(lr, off2, P, S) { + var n, l = lr[off2], r = lr[off2 + 1]; + l ^= P[0]; + n = S[l >>> 24]; + n += S[256 | l >> 16 & 255]; + n ^= S[512 | l >> 8 & 255]; + n += S[768 | l & 255]; + r ^= n ^ P[1]; + n = S[r >>> 24]; + n += S[256 | r >> 16 & 255]; + n ^= S[512 | r >> 8 & 255]; + n += S[768 | r & 255]; + l ^= n ^ P[2]; + n = S[l >>> 24]; + n += S[256 | l >> 16 & 255]; + n ^= S[512 | l >> 8 & 255]; + n += S[768 | l & 255]; + r ^= n ^ P[3]; + n = S[r >>> 24]; + n += S[256 | r >> 16 & 255]; + n ^= S[512 | r >> 8 & 255]; + n += S[768 | r & 255]; + l ^= n ^ P[4]; + n = S[l >>> 24]; + n += S[256 | l >> 16 & 255]; + n ^= S[512 | l >> 8 & 255]; + n += S[768 | l & 255]; + r ^= n ^ P[5]; + n = S[r >>> 24]; + n += S[256 | r >> 16 & 255]; + n ^= S[512 | r >> 8 & 255]; + n += S[768 | r & 255]; + l ^= n ^ P[6]; + n = S[l >>> 24]; + n += S[256 | l >> 16 & 255]; + n ^= S[512 | l >> 8 & 255]; + n += S[768 | l & 255]; + r ^= n ^ P[7]; + n = S[r >>> 24]; + n += S[256 | r >> 16 & 255]; + n ^= S[512 | r >> 8 & 255]; + n += S[768 | r & 255]; + l ^= n ^ P[8]; + n = S[l >>> 24]; + n += S[256 | l >> 16 & 255]; + n ^= S[512 | l >> 8 & 255]; + n += S[768 | l & 255]; + r ^= n ^ P[9]; + n = S[r >>> 24]; + n += S[256 | r >> 16 & 255]; + n ^= S[512 | r >> 8 & 255]; + n += S[768 | r & 255]; + l ^= n ^ P[10]; + n = S[l >>> 24]; + n += S[256 | l >> 16 & 255]; + n ^= S[512 | l >> 8 & 255]; + n += S[768 | l & 255]; + r ^= n ^ P[11]; + n = S[r >>> 24]; + n += S[256 | r >> 16 & 255]; + n ^= S[512 | r >> 8 & 255]; + n += S[768 | r & 255]; + l ^= n ^ P[12]; + n = S[l >>> 24]; + n += S[256 | l >> 16 & 255]; + n ^= S[512 | l >> 8 & 255]; + n += S[768 | l & 255]; + r ^= n ^ P[13]; + n = S[r >>> 24]; + n += S[256 | r >> 16 & 255]; + n ^= S[512 | r >> 8 & 255]; + n += S[768 | r & 255]; + l ^= n ^ P[14]; + n = S[l >>> 24]; + n += S[256 | l >> 16 & 255]; + n ^= S[512 | l >> 8 & 255]; + n += S[768 | l & 255]; + r ^= n ^ P[15]; + n = S[r >>> 24]; + n += S[256 | r >> 16 & 255]; + n ^= S[512 | r >> 8 & 255]; + n += S[768 | r & 255]; + l ^= n ^ P[16]; + lr[off2] = r ^ P[BLOWFISH_NUM_ROUNDS + 1]; + lr[off2 + 1] = l; + return lr; +} +__name(_encipher, "_encipher"); +function _streamtoword(data, offp) { + for (var i = 0, word = 0; i < 4; ++i) + word = word << 8 | data[offp] & 255, offp = (offp + 1) % data.length; + return { key: word, offp }; +} +__name(_streamtoword, "_streamtoword"); +function _key(key, P, S) { + var offset = 0, lr = [0, 0], plen = P.length, slen = S.length, sw; + for (var i = 0; i < plen; i++) + sw = _streamtoword(key, offset), offset = sw.offp, P[i] = P[i] ^ sw.key; + for (i = 0; i < plen; i += 2) + lr = _encipher(lr, 0, P, S), P[i] = lr[0], P[i + 1] = lr[1]; + for (i = 0; i < slen; i += 2) + lr = _encipher(lr, 0, P, S), S[i] = lr[0], S[i + 1] = lr[1]; +} +__name(_key, "_key"); +function _ekskey(data, key, P, S) { + var offp = 0, lr = [0, 0], plen = P.length, slen = S.length, sw; + for (var i = 0; i < plen; i++) + sw = _streamtoword(key, offp), offp = sw.offp, P[i] = P[i] ^ sw.key; + offp = 0; + for (i = 0; i < plen; i += 2) + sw = _streamtoword(data, offp), offp = sw.offp, lr[0] ^= sw.key, sw = _streamtoword(data, offp), offp = sw.offp, lr[1] ^= sw.key, lr = _encipher(lr, 0, P, S), P[i] = lr[0], P[i + 1] = lr[1]; + for (i = 0; i < slen; i += 2) + sw = _streamtoword(data, offp), offp = sw.offp, lr[0] ^= sw.key, sw = _streamtoword(data, offp), offp = sw.offp, lr[1] ^= sw.key, lr = _encipher(lr, 0, P, S), S[i] = lr[0], S[i + 1] = lr[1]; +} +__name(_ekskey, "_ekskey"); +function _crypt(b, salt, rounds, callback, progressCallback) { + var cdata = C_ORIG.slice(), clen = cdata.length, err; + if (rounds < 4 || rounds > 31) { + err = Error("Illegal number of rounds (4-31): " + rounds); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else throw err; + } + if (salt.length !== BCRYPT_SALT_LEN) { + err = Error( + "Illegal salt length: " + salt.length + " != " + BCRYPT_SALT_LEN + ); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else throw err; + } + rounds = 1 << rounds >>> 0; + var P, S, i = 0, j; + if (typeof Int32Array === "function") { + P = new Int32Array(P_ORIG); + S = new Int32Array(S_ORIG); + } else { + P = P_ORIG.slice(); + S = S_ORIG.slice(); + } + _ekskey(salt, b, P, S); + function next() { + if (progressCallback) progressCallback(i / rounds); + if (i < rounds) { + var start = Date.now(); + for (; i < rounds; ) { + i = i + 1; + _key(b, P, S); + _key(salt, P, S); + if (Date.now() - start > MAX_EXECUTION_TIME) break; + } + } else { + for (i = 0; i < 64; i++) + for (j = 0; j < clen >> 1; j++) _encipher(cdata, j << 1, P, S); + var ret = []; + for (i = 0; i < clen; i++) + ret.push((cdata[i] >> 24 & 255) >>> 0), ret.push((cdata[i] >> 16 & 255) >>> 0), ret.push((cdata[i] >> 8 & 255) >>> 0), ret.push((cdata[i] & 255) >>> 0); + if (callback) { + callback(null, ret); + return; + } else return ret; + } + if (callback) nextTick2(next); + } + __name(next, "next"); + if (typeof callback !== "undefined") { + next(); + } else { + var res; + while (true) if (typeof (res = next()) !== "undefined") return res || []; + } +} +__name(_crypt, "_crypt"); +function _hash(password, salt, callback, progressCallback) { + var err; + if (typeof password !== "string" || typeof salt !== "string") { + err = Error("Invalid string / salt: Not a string"); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else throw err; + } + var minor, offset; + if (salt.charAt(0) !== "$" || salt.charAt(1) !== "2") { + err = Error("Invalid salt version: " + salt.substring(0, 2)); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else throw err; + } + if (salt.charAt(2) === "$") minor = String.fromCharCode(0), offset = 3; + else { + minor = salt.charAt(2); + if (minor !== "a" && minor !== "b" && minor !== "y" || salt.charAt(3) !== "$") { + err = Error("Invalid salt revision: " + salt.substring(2, 4)); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else throw err; + } + offset = 4; + } + if (salt.charAt(offset + 2) > "$") { + err = Error("Missing salt rounds"); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else throw err; + } + var r1 = parseInt(salt.substring(offset, offset + 1), 10) * 10, r2 = parseInt(salt.substring(offset + 1, offset + 2), 10), rounds = r1 + r2, real_salt = salt.substring(offset + 3, offset + 25); + password += minor >= "a" ? "\0" : ""; + var passwordb = utf8Array(password), saltb = base64_decode(real_salt, BCRYPT_SALT_LEN); + function finish(bytes) { + var res = []; + res.push("$2"); + if (minor >= "a") res.push(minor); + res.push("$"); + if (rounds < 10) res.push("0"); + res.push(rounds.toString()); + res.push("$"); + res.push(base64_encode(saltb, saltb.length)); + res.push(base64_encode(bytes, C_ORIG.length * 4 - 1)); + return res.join(""); + } + __name(finish, "finish"); + if (typeof callback == "undefined") + return finish(_crypt(passwordb, saltb, rounds)); + else { + _crypt( + passwordb, + saltb, + rounds, + function(err2, bytes) { + if (err2) callback(err2, null); + else callback(null, finish(bytes)); + }, + progressCallback + ); + } +} +__name(_hash, "_hash"); +function encodeBase642(bytes, length) { + return base64_encode(bytes, length); +} +__name(encodeBase642, "encodeBase64"); +function decodeBase642(string4, length) { + return base64_decode(string4, length); +} +__name(decodeBase642, "decodeBase64"); +var bcryptjs_default = { + setRandomFallback, + genSaltSync, + genSalt, + hashSync, + hash: hash2, + compareSync, + compare, + getRounds, + getSalt, + truncates, + encodeBase64: encodeBase642, + decodeBase64: decodeBase642 +}; + +// src/trpc/apis/admin-apis/apis/staff-user.ts +var staffUserRouter = router2({ + login: publicProcedure.input(external_exports.object({ + name: external_exports.string(), + password: external_exports.string() + })).mutation(async ({ input }) => { + const { name, password } = input; + if (!name || !password) { + throw new ApiError("Name and password are required", 400); + } + const staff = await getStaffUserByName(name); + if (!staff) { + throw new ApiError("Invalid credentials", 401); + } + const isPasswordValid = await bcryptjs_default.compare(password, staff.password); + if (!isPasswordValid) { + throw new ApiError("Invalid credentials", 401); + } + const token = await new SignJWT({ staffId: staff.id, name: staff.name }).setProtectedHeader({ alg: "HS256" }).setExpirationTime("30d").sign(encodedJwtSecret); + return { + message: "Login successful", + token, + staff: { id: staff.id, name: staff.name } + }; + }), + getStaff: protectedProcedure.query(async ({ ctx }) => { + const staff = await getAllStaff(); + const transformedStaff = staff.map((user) => ({ + id: user.id, + name: user.name, + role: user.role ? { + id: user.role.id, + name: user.role.roleName + } : null, + permissions: user.role?.rolePermissions.map((rp) => ({ + id: rp.permission.id, + name: rp.permission.permissionName + })) || [] + })); + return { + staff: transformedStaff + }; + }), + getUsers: protectedProcedure.input(external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(20), + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { cursor, limit, search } = input; + const { users: usersToReturn, hasMore } = await getAllUsers(cursor, limit, search); + const formattedUsers = usersToReturn.map((user) => ({ + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile, + image: user.userDetails?.profileImage || null + })); + return { + users: formattedUsers, + nextCursor: hasMore ? usersToReturn[usersToReturn.length - 1].id : void 0 + }; + }), + getUserDetails: protectedProcedure.input(external_exports.object({ userId: external_exports.number() })).query(async ({ input }) => { + const { userId } = input; + const user = await getUserWithDetails(userId); + if (!user) { + throw new ApiError("User not found", 404); + } + const lastOrder = user.orders[0]; + return { + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile, + addedOn: user.createdAt, + lastOrdered: lastOrder?.createdAt || null, + isSuspended: user.userDetails?.isSuspended || false + }; + }), + updateUserSuspension: protectedProcedure.input(external_exports.object({ userId: external_exports.number(), isSuspended: external_exports.boolean() })).mutation(async ({ input }) => { + const { userId, isSuspended } = input; + await upsertUserSuspension(userId, isSuspended); + return { success: true }; + }), + createStaffUser: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + password: external_exports.string().min(6, "Password must be at least 6 characters"), + roleId: external_exports.number().int().positive("Role is required") + })).mutation(async ({ input, ctx }) => { + const { name, password, roleId } = input; + const existingUser = await checkStaffUserExists(name); + if (existingUser) { + throw new ApiError("Staff user with this name already exists", 409); + } + const roleExists = await checkStaffRoleExists(roleId); + if (!roleExists) { + throw new ApiError("Invalid role selected", 400); + } + const hashedPassword = await bcryptjs_default.hash(password, 12); + const newUser = await createStaffUser(name, hashedPassword, roleId); + return { success: true, user: { id: newUser.id, name: newUser.name } }; + }), + getRoles: protectedProcedure.query(async ({ ctx }) => { + const roles = await getAllRoles(); + return { + roles: roles.map((role) => ({ + id: role.id, + name: role.roleName + })) + }; + }) +}); + +// src/trpc/apis/admin-apis/apis/store.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var storeRouter = router2({ + getStores: protectedProcedure.query(async ({ ctx }) => { + const stores = await getAllStores(); + await Promise.all(stores.map(async (store) => { + if (store.imageUrl) + store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl); + })).catch((e) => { + throw new ApiError("Unable to find store image urls"); + }); + return { + stores, + count: stores.length + }; + }), + getStoreById: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).query(async ({ input, ctx }) => { + const { id } = input; + const store = await getStoreById(id); + if (!store) { + throw new ApiError("Store not found", 404); + } + store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl); + return { + store + }; + }), + createStore: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + description: external_exports.string().optional(), + imageUrl: external_exports.string().optional(), + owner: external_exports.number().min(1, "Owner is required"), + products: external_exports.array(external_exports.number()).optional() + })).mutation(async ({ input, ctx }) => { + const { name, description, imageUrl, owner, products } = input; + const imageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : void 0; + const newStore = await createStore( + { + name, + description, + imageUrl: imageKey, + owner + }, + products + ); + scheduleStoreInitialization(); + return { + store: newStore, + message: "Store created successfully" + }; + }), + updateStore: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + name: external_exports.string().min(1, "Name is required"), + description: external_exports.string().optional(), + imageUrl: external_exports.string().optional(), + owner: external_exports.number().min(1, "Owner is required"), + products: external_exports.array(external_exports.number()).optional() + })).mutation(async ({ input, ctx }) => { + const { id, name, description, imageUrl, owner, products } = input; + const existingStore = await getStoreById(id); + if (!existingStore) { + throw new ApiError("Store not found", 404); + } + const oldImageKey = existingStore.imageUrl; + const newImageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : oldImageKey; + if (oldImageKey && (newImageKey && newImageKey !== oldImageKey || !newImageKey)) { + try { + await deleteImageUtil({ keys: [oldImageKey] }); + } catch (error50) { + console.error("Failed to delete old image:", error50); + } + } + const updatedStore = await updateStore( + id, + { + name, + description, + imageUrl: newImageKey, + owner + }, + products + ); + scheduleStoreInitialization(); + return { + store: updatedStore, + message: "Store updated successfully" + }; + }), + deleteStore: protectedProcedure.input(external_exports.object({ + storeId: external_exports.number() + })).mutation(async ({ input, ctx }) => { + const { storeId } = input; + const result = await deleteStore(storeId); + scheduleStoreInitialization(); + return result; + }) +}); + +// src/trpc/apis/admin-apis/apis/payments.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var initiateRefundSchema = external_exports.object({ + orderId: external_exports.number(), + refundPercent: external_exports.number().min(0).max(100).optional(), + refundAmount: external_exports.number().min(0).optional() +}).refine( + (data) => { + const hasPercent = data.refundPercent !== void 0; + const hasAmount = data.refundAmount !== void 0; + return hasPercent && !hasAmount || !hasPercent && hasAmount; + }, + { + message: "Provide either refundPercent or refundAmount, not both or neither" + } +); +var adminPaymentsRouter = router2({ + initiateRefund: protectedProcedure.input(initiateRefundSchema).mutation(async ({ input }) => { + return {}; + }) +}); + +// src/trpc/apis/admin-apis/apis/banner.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var bannerRouter2 = router2({ + // Get all banners + getBanners: protectedProcedure.query(async () => { + try { + const banners = await getBanners(); + const bannersWithSignedUrls = await Promise.all( + banners.map(async (banner) => { + try { + return { + ...banner, + imageUrl: banner.imageUrl ? await generateSignedUrlFromS3Url(banner.imageUrl) : banner.imageUrl, + // Ensure productIds is always an array + productIds: banner.productIds || [] + }; + } catch (error50) { + console.error(`Failed to generate signed URL for banner ${banner.id}:`, error50); + return { + ...banner, + imageUrl: banner.imageUrl, + // Keep original on error + // Ensure productIds is always an array + productIds: banner.productIds || [] + }; + } + }) + ); + return { + banners: bannersWithSignedUrls + }; + } catch (e) { + console.log(e); + throw new ApiError(e.message); + } + }), + // Get single banner by ID + getBanner: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).query(async ({ input }) => { + const banner = await getBannerById(input.id); + if (banner) { + try { + if (banner.imageUrl) { + banner.imageUrl = await generateSignedUrlFromS3Url(banner.imageUrl); + } + } catch (error50) { + console.error(`Failed to generate signed URL for banner ${banner.id}:`, error50); + } + if (!banner.productIds) { + banner.productIds = []; + } + } + return banner; + }), + // Create new banner + createBanner: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1), + imageUrl: external_exports.string().url(), + description: external_exports.string().optional(), + productIds: external_exports.array(external_exports.number()).optional(), + redirectUrl: external_exports.string().url().optional() + // serialNum removed completely + })).mutation(async ({ input }) => { + try { + const imageUrl = extractKeyFromPresignedUrl(input.imageUrl); + const banner = await createBanner({ + name: input.name, + imageUrl, + description: input.description ?? null, + productIds: input.productIds || [], + redirectUrl: input.redirectUrl ?? null, + serialNum: 999, + // Default value, not used + isActive: false + // Default to inactive + }); + scheduleStoreInitialization(); + return banner; + } catch (error50) { + console.error("Error creating banner:", error50); + throw error50; + } + }), + // Update banner + updateBanner: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + name: external_exports.string().min(1).optional(), + imageUrl: external_exports.string().url().optional(), + description: external_exports.string().optional(), + productIds: external_exports.array(external_exports.number()).optional(), + redirectUrl: external_exports.string().url().optional(), + serialNum: external_exports.number().nullable().optional(), + isActive: external_exports.boolean().optional() + })).mutation(async ({ input }) => { + try { + const { id, ...updateData2 } = input; + const processedData = { + ...updateData2, + ...updateData2.imageUrl && { + imageUrl: extractKeyFromPresignedUrl(updateData2.imageUrl) + } + }; + if ("serialNum" in processedData && processedData.serialNum === null) { + processedData.serialNum = null; + } + const banner = await updateBanner(id, processedData); + scheduleStoreInitialization(); + return banner; + } catch (error50) { + console.error("Error updating banner:", error50); + throw error50; + } + }), + // Delete banner + deleteBanner: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).mutation(async ({ input }) => { + await deleteBanner(input.id); + scheduleStoreInitialization(); + return { success: true }; + }) +}); + +// src/trpc/apis/admin-apis/apis/user.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var userRouter = { + createUserByMobile: protectedProcedure.input(external_exports.object({ + mobile: external_exports.string().min(1, "Mobile number is required") + })).mutation(async ({ input }) => { + const cleanMobile = input.mobile.replace(/\D/g, ""); + if (cleanMobile.length !== 10) { + throw new ApiError("Mobile number must be exactly 10 digits", 400); + } + const existingUser = await getUserByMobile(cleanMobile); + if (existingUser) { + throw new ApiError("User with this mobile number already exists", 409); + } + const newUser = await createUserByMobile(cleanMobile); + return { + success: true, + data: newUser + }; + }), + getEssentials: protectedProcedure.query(async () => { + const count4 = await getUnresolvedComplaintsCount(); + return { + unresolvedComplaints: count4 + }; + }), + getAllUsers: protectedProcedure.input(external_exports.object({ + limit: external_exports.number().min(1).max(100).default(50), + cursor: external_exports.number().optional(), + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { limit, cursor, search } = input; + const { users: usersToReturn, hasMore } = await getAllUsersWithFilters(limit, cursor, search); + const userIds = usersToReturn.map((u4) => u4.id); + const orderCounts = await getOrderCountsByUserIds(userIds); + const lastOrders = await getLastOrdersByUserIds(userIds); + const suspensionStatuses = await getSuspensionStatusesByUserIds(userIds); + const orderCountMap = new Map(orderCounts.map((o) => [o.userId, o.totalOrders])); + const lastOrderMap = new Map(lastOrders.map((o) => [o.userId, o.lastOrderDate])); + const suspensionMap = new Map(suspensionStatuses.map((s) => [s.userId, s.isSuspended])); + const usersWithStats = usersToReturn.map((user) => ({ + ...user, + totalOrders: orderCountMap.get(user.id) || 0, + lastOrderDate: lastOrderMap.get(user.id) || null, + isSuspended: suspensionMap.get(user.id) ?? false + })); + const nextCursor = hasMore ? usersToReturn[usersToReturn.length - 1].id : void 0; + return { + users: usersWithStats, + nextCursor, + hasMore + }; + }), + getUserDetails: protectedProcedure.input(external_exports.object({ + userId: external_exports.number() + })).query(async ({ input }) => { + const { userId } = input; + const user = await getUserBasicInfo(userId); + if (!user) { + throw new ApiError("User not found", 404); + } + const isSuspended = await getUserSuspensionStatus(userId); + const userOrders = await getUserOrders(userId); + const orderIds = userOrders.map((o) => o.id); + const orderStatuses = await getOrderStatusesByOrderIds(orderIds); + const itemCounts = await getItemCountsByOrderIds(orderIds); + const statusMap = new Map(orderStatuses.map((s) => [s.orderId, s])); + const itemCountMap = new Map(itemCounts.map((c) => [c.orderId, c.itemCount])); + const getStatus = /* @__PURE__ */ __name((status) => { + if (!status) return "pending"; + if (status.isCancelled) return "cancelled"; + if (status.isDelivered) return "delivered"; + return "pending"; + }, "getStatus"); + const ordersWithDetails = userOrders.map((order) => { + const status = statusMap.get(order.id); + return { + id: order.id, + readableId: order.readableId, + totalAmount: order.totalAmount, + createdAt: order.createdAt, + isFlashDelivery: order.isFlashDelivery, + status: getStatus(status), + itemCount: itemCountMap.get(order.id) || 0 + }; + }); + return { + user: { + ...user, + isSuspended + }, + orders: ordersWithDetails + }; + }), + updateUserSuspension: protectedProcedure.input(external_exports.object({ + userId: external_exports.number(), + isSuspended: external_exports.boolean() + })).mutation(async ({ input }) => { + const { userId, isSuspended } = input; + await upsertUserSuspension(userId, isSuspended); + return { + success: true, + message: `User ${isSuspended ? "suspended" : "unsuspended"} successfully` + }; + }), + getUsersForNotification: protectedProcedure.input(external_exports.object({ + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { search } = input; + const usersList = await searchUsers(search); + const eligibleUsers = await getAllNotifCreds(); + const eligibleSet = new Set(eligibleUsers.map((u4) => u4.userId)); + return { + users: usersList.map((user) => ({ + id: user.id, + name: user.name, + mobile: user.mobile, + isEligibleForNotif: eligibleSet.has(user.id) + })) + }; + }), + sendNotification: protectedProcedure.input(external_exports.object({ + userIds: external_exports.array(external_exports.number()).default([]), + title: external_exports.string().min(1, "Title is required"), + text: external_exports.string().min(1, "Message is required"), + imageUrl: external_exports.string().optional() + })).mutation(async ({ input }) => { + const { userIds, title: title2, text: text2, imageUrl } = input; + let tokens = []; + if (userIds.length === 0) { + const loggedInTokens = await getAllNotifCreds(); + const unloggedTokens = await getAllUnloggedTokens(); + tokens = [ + ...loggedInTokens.map((t8) => t8.token), + ...unloggedTokens.map((t8) => t8.token) + ]; + } else { + const userTokens = await getNotifTokensByUserIds(userIds); + tokens = userTokens.map((t8) => t8.token); + } + let queuedCount = 0; + for (const token of tokens) { + try { + await notificationQueue.add("send-admin-notification", { + token, + title: title2, + body: text2, + imageUrl: imageUrl || null + }, { + attempts: 3, + backoff: { + type: "exponential", + delay: 2e3 + } + }); + queuedCount++; + } catch (error50) { + console.error(`Failed to queue notification for token:`, error50); + } + } + return { + success: true, + message: `Notification queued for ${queuedCount} users` + }; + }), + getUserIncidents: protectedProcedure.input(external_exports.object({ + userId: external_exports.number() + })).query(async ({ input }) => { + const { userId } = input; + const incidents = await getUserIncidentsWithRelations(userId); + return { + incidents: incidents.map((incident) => ({ + id: incident.id, + userId: incident.userId, + orderId: incident.orderId, + dateAdded: incident.dateAdded, + adminComment: incident.adminComment, + addedBy: incident.addedBy?.name || "Unknown", + negativityScore: incident.negativityScore, + orderStatus: incident.order?.orderStatus?.[0]?.isCancelled ? "cancelled" : "active" + })) + }; + }), + addUserIncident: protectedProcedure.input(external_exports.object({ + userId: external_exports.number(), + orderId: external_exports.number().optional(), + adminComment: external_exports.string().optional(), + negativityScore: external_exports.number().optional() + })).mutation(async ({ input, ctx }) => { + const { userId, orderId, adminComment, negativityScore } = input; + const adminUserId = ctx.staffUser?.id; + if (!adminUserId) { + throw new ApiError("Admin user not authenticated", 401); + } + const incident = await createUserIncident( + userId, + orderId, + adminComment, + adminUserId, + negativityScore + ); + recomputeUserNegativityScore(userId); + return { + success: true, + data: incident + }; + }) +}; + +// src/trpc/apis/admin-apis/apis/const.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var constRouter = router2({ + getConstants: protectedProcedure.query(async () => { + const constants = await getAllConstants(); + return constants; + }), + updateConstants: protectedProcedure.input(external_exports.object({ + constants: external_exports.array(external_exports.object({ + key: external_exports.string(), + value: external_exports.any() + })) + })).mutation(async ({ input }) => { + const { constants } = input; + const validKeys = Object.values(CONST_KEYS); + const invalidKeys = constants.filter((c) => !validKeys.includes(c.key)).map((c) => c.key); + if (invalidKeys.length > 0) { + throw new Error(`Invalid constant keys: ${invalidKeys.join(", ")}`); + } + await upsertConstants(constants); + await computeConstants(); + return { + success: true, + updatedCount: constants.length, + keys: constants.map((c) => c.key) + }; + }) +}); + +// src/trpc/apis/admin-apis/apis/admin-trpc-index.ts +var adminRouter = router2({ + complaint: complaintRouter, + coupon: couponRouter, + order: orderRouter, + vendorSnippets: vendorSnippetsRouter, + slots: slotsRouter2, + product: productRouter, + staffUser: staffUserRouter, + store: storeRouter, + payments: adminPaymentsRouter, + banner: bannerRouter2, + user: userRouter, + const: constRouter +}); + +// src/trpc/apis/user-apis/apis/user-trpc-index.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/trpc/apis/user-apis/apis/address.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/lib/license-util.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +async function extractCoordsFromRedirectUrl(url2) { + try { + await axios_default.get(url2, { maxRedirects: 0 }); + return null; + } catch (error50) { + if (error50.response?.status === 302 || error50.response?.status === 301) { + const redirectUrl = error50.response.headers.location; + const coordsMatch = redirectUrl.match(/!3d([-\d.]+)!4d([-\d.]+)/); + if (coordsMatch) { + return { + latitude: coordsMatch[1], + longitude: coordsMatch[2] + }; + } + } + return null; + } +} +__name(extractCoordsFromRedirectUrl, "extractCoordsFromRedirectUrl"); + +// src/trpc/apis/user-apis/apis/address.ts +var addressRouter = router2({ + getDefaultAddress: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + const defaultAddress = await getDefaultAddress(userId); + return { success: true, data: defaultAddress }; + }), + getUserAddresses: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + const userAddresses = await getUserAddresses(userId); + return { success: true, data: userAddresses }; + }), + createAddress: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + phone: external_exports.string().min(1, "Phone is required"), + addressLine1: external_exports.string().min(1, "Address line 1 is required"), + addressLine2: external_exports.string().optional(), + city: external_exports.string().min(1, "City is required"), + state: external_exports.string().min(1, "State is required"), + pincode: external_exports.string().min(1, "Pincode is required"), + isDefault: external_exports.boolean().optional(), + latitude: external_exports.number().optional(), + longitude: external_exports.number().optional(), + googleMapsUrl: external_exports.string().optional() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { name, phone, addressLine1, addressLine2, city, state, pincode, isDefault, googleMapsUrl } = input; + let { latitude, longitude } = input; + if (googleMapsUrl && latitude === void 0 && longitude === void 0) { + const coords = await extractCoordsFromRedirectUrl(googleMapsUrl); + if (coords) { + latitude = Number(coords.latitude); + longitude = Number(coords.longitude); + } + } + if (!name || !phone || !addressLine1 || !city || !state || !pincode) { + throw new Error("Missing required fields"); + } + if (isDefault) { + await clearDefaultAddress(userId); + } + const newAddress = await createUserAddress({ + userId, + name, + phone, + addressLine1, + addressLine2, + city, + state, + pincode, + isDefault: isDefault || false, + latitude, + longitude, + googleMapsUrl + }); + return { success: true, data: newAddress }; + }), + updateAddress: protectedProcedure.input(external_exports.object({ + id: external_exports.number().int().positive(), + name: external_exports.string().min(1, "Name is required"), + phone: external_exports.string().min(1, "Phone is required"), + addressLine1: external_exports.string().min(1, "Address line 1 is required"), + addressLine2: external_exports.string().optional(), + city: external_exports.string().min(1, "City is required"), + state: external_exports.string().min(1, "State is required"), + pincode: external_exports.string().min(1, "Pincode is required"), + isDefault: external_exports.boolean().optional(), + latitude: external_exports.number().optional(), + longitude: external_exports.number().optional(), + googleMapsUrl: external_exports.string().optional() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { id, name, phone, addressLine1, addressLine2, city, state, pincode, isDefault, googleMapsUrl } = input; + let { latitude, longitude } = input; + if (googleMapsUrl && latitude === void 0 && longitude === void 0) { + const coords = await extractCoordsFromRedirectUrl(googleMapsUrl); + if (coords) { + latitude = Number(coords.latitude); + longitude = Number(coords.longitude); + } + } + const existingAddress = await getUserAddressById(userId, id); + if (!existingAddress) { + throw new Error("Address not found"); + } + if (isDefault) { + await clearDefaultAddress(userId); + } + const updatedAddress = await updateUserAddress({ + userId, + addressId: id, + name, + phone, + addressLine1, + addressLine2, + city, + state, + pincode, + isDefault: isDefault || false, + googleMapsUrl, + latitude, + longitude + }); + return { success: true, data: updatedAddress }; + }), + deleteAddress: protectedProcedure.input(external_exports.object({ + id: external_exports.number().int().positive() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { id } = input; + const existingAddress = await getUserAddressById(userId, id); + if (!existingAddress) { + throw new Error("Address not found or does not belong to user"); + } + const hasOngoingOrders = await hasOngoingOrdersForAddress(id); + if (hasOngoingOrders) { + throw new Error("Address is attached to an ongoing order. Please cancel the order first."); + } + if (existingAddress.isDefault) { + throw new Error("Cannot delete default address. Please set another address as default first."); + } + const deleted = await deleteUserAddress(userId, id); + if (!deleted) { + throw new Error("Address not found or does not belong to user"); + } + return { success: true, message: "Address deleted successfully" }; + }) +}); + +// src/trpc/apis/user-apis/apis/auth.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// src/lib/otp-utils.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var otpStore = /* @__PURE__ */ new Map(); +var setOtpCreds = /* @__PURE__ */ __name((phone, verificationId) => { + otpStore.set(phone, verificationId); +}, "setOtpCreds"); +function getOtpCreds(mobile) { + const authKey = otpStore.get(mobile); + return authKey || null; +} +__name(getOtpCreds, "getOtpCreds"); +var sendOtp = /* @__PURE__ */ __name(async (phone) => { + if (!phone) { + throw new ApiError("Phone number is required", 400); + } + const reqUrl = `https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=${phone}&timeout=300`; + const resp = await fetch(reqUrl, { + headers: { + authToken: otpSenderAuthToken + }, + method: "POST" + }); + const data = await resp.json(); + if (data.message === "SUCCESS") { + setOtpCreds(phone, data.data.verificationId); + return { success: true, message: "OTP sent successfully", verificationId: data.data.verificationId }; + } + if (data.message === "REQUEST_ALREADY_EXISTS") { + return { success: true, message: "OTP already sent. Last OTP is still valid" }; + } + throw new ApiError("Error while sending OTP. Please try again", 500); +}, "sendOtp"); +async function verifyOtpUtil(mobile, otp, verifId) { + const reqUrl = `https://cpaas.messagecentral.com/verification/v3/validateOtp?&verificationId=${verifId}&code=${otp}`; + const resp = await fetch(reqUrl, { + method: "GET", + headers: { + authToken: otpSenderAuthToken + } + }); + const rawData = await resp.json(); + if (rawData.data?.verificationStatus === "VERIFICATION_COMPLETED") { + return true; + } + return false; +} +__name(verifyOtpUtil, "verifyOtpUtil"); + +// src/trpc/apis/user-apis/apis/auth.ts +var generateToken = /* @__PURE__ */ __name(async (userId) => { + return await new SignJWT({ userId }).setProtectedHeader({ alg: "HS256" }).setExpirationTime("7d").sign(encodedJwtSecret); +}, "generateToken"); +var authRouter = router2({ + login: publicProcedure.input(external_exports.object({ + identifier: external_exports.string().min(1, "Email/mobile is required"), + password: external_exports.string().min(1, "Password is required") + })).mutation(async ({ input }) => { + const { identifier, password } = input; + if (!identifier || !password) { + throw new ApiError("Email/mobile and password are required", 400); + } + const user = await getUserByEmail(identifier.toLowerCase()); + let foundUser = user || null; + if (!foundUser) { + const userByMobile = await getUserByMobile2(identifier); + foundUser = userByMobile || null; + } + if (!foundUser) { + throw new ApiError("Invalid credentials", 401); + } + const userCredentials = await getUserCreds(foundUser.id); + if (!userCredentials) { + throw new ApiError("Account setup incomplete. Please contact support.", 401); + } + const userDetail = await getUserDetails(foundUser.id); + const profileImageSignedUrl = userDetail?.profileImage ? await generateSignedUrlFromS3Url(userDetail.profileImage) : null; + const isPasswordValid = await bcryptjs_default.compare(password, userCredentials.userPassword); + if (!isPasswordValid) { + throw new ApiError("Invalid credentials", 401); + } + const token = await generateToken(foundUser.id); + const response = { + token, + user: { + id: foundUser.id, + name: foundUser.name, + email: foundUser.email, + mobile: foundUser.mobile, + createdAt: foundUser.createdAt.toISOString(), + profileImage: profileImageSignedUrl, + bio: userDetail?.bio || null, + dateOfBirth: userDetail?.dateOfBirth ? new Date(userDetail.dateOfBirth).toISOString() : null, + gender: userDetail?.gender || null, + occupation: userDetail?.occupation || null + } + }; + return { + success: true, + data: response + }; + }), + register: publicProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + email: external_exports.string().email("Invalid email format"), + mobile: external_exports.string().min(1, "Mobile is required"), + password: external_exports.string().min(1, "Password is required"), + profileImageUrl: external_exports.string().nullable().optional() + })).mutation(async ({ input }) => { + const { name, email: email3, mobile, password, profileImageUrl } = input; + if (!name || !email3 || !mobile || !password) { + throw new ApiError("All fields are required", 400); + } + const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + if (!emailRegex.test(email3)) { + throw new ApiError("Invalid email format", 400); + } + const cleanMobile = mobile.replace(/\D/g, ""); + if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) { + throw new ApiError("Invalid mobile number", 400); + } + const existingEmail = await getUserByEmail(email3.toLowerCase()); + if (existingEmail) { + throw new ApiError("Email already registered", 409); + } + const existingMobile = await getUserByMobile2(cleanMobile); + if (existingMobile) { + throw new ApiError("Mobile number already registered", 409); + } + const hashedPassword = await bcryptjs_default.hash(password, 12); + const newUser = await createUserWithProfile({ + name: name.trim(), + email: email3.toLowerCase().trim(), + mobile: cleanMobile, + hashedPassword, + profileImage: profileImageUrl ?? null + }); + const token = await generateToken(newUser.id); + const profileImageSignedUrl = profileImageUrl ? await generateSignedUrlFromS3Url(profileImageUrl) : null; + const response = { + token, + user: { + id: newUser.id, + name: newUser.name, + email: newUser.email, + mobile: newUser.mobile, + createdAt: newUser.createdAt.toISOString(), + profileImage: profileImageSignedUrl + } + }; + return { + success: true, + data: response + }; + }), + sendOtp: publicProcedure.input(external_exports.object({ + mobile: external_exports.string() + })).mutation(async ({ input }) => { + return await sendOtp(input.mobile); + }), + verifyOtp: publicProcedure.input(external_exports.object({ + mobile: external_exports.string(), + otp: external_exports.string() + })).mutation(async ({ input }) => { + const verificationId = getOtpCreds(input.mobile); + if (!verificationId) { + throw new ApiError("OTP not sent or expired", 400); + } + const isVerified = await verifyOtpUtil(input.mobile, input.otp, verificationId); + if (!isVerified) { + throw new ApiError("Invalid OTP", 400); + } + let user = await getUserByMobile2(input.mobile); + if (!user) { + user = await createUserWithMobile(input.mobile); + } + const token = await generateToken(user.id); + return { + success: true, + token, + user: { + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile, + createdAt: user.createdAt.toISOString(), + profileImage: null + } + }; + }), + updatePassword: protectedProcedure.input(external_exports.object({ + password: external_exports.string().min(6, "Password must be at least 6 characters") + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const hashedPassword = await bcryptjs_default.hash(input.password, 10); + await upsertUserPassword(userId, hashedPassword); + return { success: true, message: "Password updated successfully" }; + }), + updateProfile: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1).optional(), + email: external_exports.string().email("Invalid email format").optional(), + mobile: external_exports.string().min(1).optional(), + password: external_exports.string().min(6, "Password must be at least 6 characters").optional(), + bio: external_exports.string().optional().nullable(), + dateOfBirth: external_exports.string().optional().nullable(), + gender: external_exports.string().optional().nullable(), + occupation: external_exports.string().optional().nullable(), + profileImageUrl: external_exports.string().optional().nullable() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const { name, email: email3, mobile, password, bio, dateOfBirth, gender, occupation, profileImageUrl } = input; + if (email3) { + const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + if (!emailRegex.test(email3)) { + throw new ApiError("Invalid email format", 400); + } + } + if (mobile) { + const cleanMobile = mobile.replace(/\D/g, ""); + if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) { + throw new ApiError("Invalid mobile number", 400); + } + } + if (email3) { + const existingEmail = await getUserByEmail(email3.toLowerCase()); + if (existingEmail && existingEmail.id !== userId) { + throw new ApiError("Email already registered", 409); + } + } + if (mobile) { + const cleanMobile = mobile.replace(/\D/g, ""); + const existingMobile = await getUserByMobile2(cleanMobile); + if (existingMobile && existingMobile.id !== userId) { + throw new ApiError("Mobile number already registered", 409); + } + } + let hashedPassword; + if (password) { + hashedPassword = await bcryptjs_default.hash(password, 12); + } + const updatedUser = await updateUserProfile(userId, { + name: name?.trim(), + email: email3?.toLowerCase().trim(), + mobile: mobile?.replace(/\D/g, ""), + hashedPassword, + profileImage: profileImageUrl ?? void 0, + bio: bio ?? void 0, + dateOfBirth: dateOfBirth ? new Date(dateOfBirth) : void 0, + gender: gender ?? void 0, + occupation: occupation ?? void 0 + }); + const userDetail = await getUserDetailsByUserId(userId); + const profileImageSignedUrl = userDetail?.profileImage ? await generateSignedUrlFromS3Url(userDetail.profileImage) : null; + const authHeader = ctx.req.header("authorization"); + const token = authHeader?.replace("Bearer ", "") || ""; + const response = { + token, + user: { + id: updatedUser.id, + name: updatedUser.name, + email: updatedUser.email, + mobile: updatedUser.mobile, + createdAt: updatedUser.createdAt?.toISOString?.() || (/* @__PURE__ */ new Date()).toISOString(), + profileImage: profileImageSignedUrl, + bio: userDetail?.bio || null, + dateOfBirth: userDetail?.dateOfBirth ? new Date(userDetail.dateOfBirth).toISOString() : null, + gender: userDetail?.gender || null, + occupation: userDetail?.occupation || null + } + }; + return { + success: true, + data: response + }; + }), + getProfile: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const user = await getUserById(userId); + if (!user) { + throw new ApiError("User not found", 404); + } + return { + success: true, + data: { + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile + } + }; + }), + deleteAccount: protectedProcedure.input(external_exports.object({ + mobile: external_exports.string().min(10, "Mobile number is required") + })).mutation(async ({ ctx, input }) => { + const userId = ctx.user.userId; + const { mobile } = input; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const existingUser = await getUserById(userId); + if (!existingUser) { + throw new ApiError("User not found", 404); + } + if (existingUser.id !== userId) { + throw new ApiError("Unauthorized: Cannot delete another user's account", 403); + } + const cleanInputMobile = mobile.replace(/\D/g, ""); + const cleanUserMobile = existingUser.mobile?.replace(/\D/g, ""); + if (cleanInputMobile !== cleanUserMobile) { + throw new ApiError("Mobile number does not match your registered number", 400); + } + await deleteUserAccount(userId); + return { success: true, message: "Account deleted successfully" }; + }) +}); + +// src/trpc/apis/user-apis/apis/cart.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var getCartData = /* @__PURE__ */ __name(async (userId) => { + const cartItemsWithProducts = await getCartItemsWithProducts(userId); + const cartWithSignedUrls = cartItemsWithProducts.map((item) => ({ + ...item, + product: { + ...item.product, + images: scaffoldAssetUrl(item.product.images || []) + } + })); + const totalAmount = cartWithSignedUrls.reduce((sum2, item) => sum2 + item.subtotal, 0); + return { + items: cartWithSignedUrls, + totalItems: cartWithSignedUrls.length, + totalAmount + }; +}, "getCartData"); +var cartRouter = router2({ + getCart: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + return await getCartData(userId); + }), + addToCart: protectedProcedure.input(external_exports.object({ + productId: external_exports.number().int().positive(), + quantity: external_exports.number().int().positive() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { productId, quantity } = input; + if (!productId || !quantity || quantity <= 0) { + throw new ApiError("Product ID and positive quantity required", 400); + } + const product = await getProductById2(productId); + if (!product) { + throw new ApiError("Product not found", 404); + } + const existingItem = await getCartItemByUserProduct(userId, productId); + if (existingItem) { + await incrementCartItemQuantity(existingItem.id, quantity); + } else { + await insertCartItem(userId, productId, quantity); + } + return await getCartData(userId); + }), + updateCartItem: protectedProcedure.input(external_exports.object({ + itemId: external_exports.number().int().positive(), + quantity: external_exports.number().int().min(0) + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { itemId, quantity } = input; + if (!quantity || quantity <= 0) { + throw new ApiError("Positive quantity required", 400); + } + const updated = await updateCartItemQuantity(userId, itemId, quantity); + if (!updated) { + throw new ApiError("Cart item not found", 404); + } + return await getCartData(userId); + }), + removeFromCart: protectedProcedure.input(external_exports.object({ + itemId: external_exports.number().int().positive() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { itemId } = input; + const deleted = await deleteCartItem(userId, itemId); + if (!deleted) { + throw new ApiError("Cart item not found", 404); + } + return await getCartData(userId); + }), + clearCart: protectedProcedure.mutation(async ({ ctx }) => { + const userId = ctx.user.userId; + await clearUserCart(userId); + return { + items: [], + totalItems: 0, + totalAmount: 0, + message: "Cart cleared successfully" + }; + }), + // Original DB-based getCartSlots (commented out) + // getCartSlots: publicProcedure + // .input(z.object({ + // productIds: z.array(z.number().int().positive()) + // })) + // .query(async ({ input }) => { + // const { productIds } = input; + // + // if (productIds.length === 0) { + // return {}; + // } + // + // // Get slots for these products where freeze time is after current time + // const slotsData = await db + // .select({ + // productId: productSlots.productId, + // slotId: deliverySlotInfo.id, + // deliveryTime: deliverySlotInfo.deliveryTime, + // freezeTime: deliverySlotInfo.freezeTime, + // isActive: deliverySlotInfo.isActive, + // }) + // .from(productSlots) + // .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id)) + // .where(and( + // inArray(productSlots.productId, productIds), + // gt(deliverySlotInfo.freezeTime, sql`NOW()`), + // eq(deliverySlotInfo.isActive, true) + // )); + // + // // Group by productId + // const result: Record = {}; + // slotsData.forEach(slot => { + // if (!result[slot.productId]) { + // result[slot.productId] = []; + // } + // result[slot.productId].push({ + // id: slot.slotId, + // deliveryTime: slot.deliveryTime, + // freezeTime: slot.freezeTime, + // }); + // }); + // + // return result; + // }), + // Cache-based getCartSlots + getCartSlots: publicProcedure.input(external_exports.object({ + productIds: external_exports.array(external_exports.number().int().positive()) + })).query(async ({ input }) => { + const { productIds } = input; + if (productIds.length === 0) { + return {}; + } + return await getMultipleProductsSlots(productIds); + }) +}); + +// src/trpc/apis/user-apis/apis/complaint.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var complaintRouter2 = router2({ + getAll: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + const userComplaints = await getUserComplaints(userId); + return { + complaints: userComplaints + }; + }), + raise: protectedProcedure.input(external_exports.object({ + orderId: external_exports.string().optional(), + complaintBody: external_exports.string().min(1, "Complaint body is required"), + imageUrls: external_exports.array(external_exports.string()).optional() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { orderId, complaintBody, imageUrls } = input; + let orderIdNum = null; + if (orderId) { + const readableIdMatch = orderId.match(/^ORD(\d+)$/); + if (readableIdMatch) { + orderIdNum = parseInt(readableIdMatch[1]); + } + } + await createComplaint( + userId, + orderIdNum, + complaintBody.trim(), + imageUrls && imageUrls.length > 0 ? imageUrls : null + ); + return { success: true, message: "Complaint raised successfully" }; + }) +}); + +// src/trpc/apis/user-apis/apis/order.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var placeOrderUtil = /* @__PURE__ */ __name(async (params) => { + const { + userId, + selectedItems, + addressId, + paymentMethod, + couponId, + userNotes + } = params; + const constants = await getConstants([ + CONST_KEYS.minRegularOrderValue, + CONST_KEYS.deliveryCharge, + CONST_KEYS.flashFreeDeliveryThreshold, + CONST_KEYS.flashDeliveryCharge + ]); + const isFlashDelivery = params.isFlash; + const minOrderValue2 = (isFlashDelivery ? constants[CONST_KEYS.flashFreeDeliveryThreshold] : constants[CONST_KEYS.minRegularOrderValue]) || 0; + const deliveryCharge2 = (isFlashDelivery ? constants[CONST_KEYS.flashDeliveryCharge] : constants[CONST_KEYS.deliveryCharge]) || 0; + const orderGroupId = `${Date.now()}-${userId}`; + const address = await getAddressByIdAndUser(addressId, userId); + if (!address) { + throw new ApiError("Invalid address", 400); + } + const ordersBySlot = /* @__PURE__ */ new Map(); + for (const item of selectedItems) { + const product = await getProductById4(item.productId); + if (!product) { + throw new ApiError(`Product ${item.productId} not found`, 400); + } + if (!ordersBySlot.has(item.slotId)) { + ordersBySlot.set(item.slotId, []); + } + ordersBySlot.get(item.slotId).push({ ...item, product }); + } + if (params.isFlash) { + for (const item of selectedItems) { + const product = await getProductById4(item.productId); + if (!product?.isFlashAvailable) { + throw new ApiError(`Product ${item.productId} is not available for flash delivery`, 400); + } + } + } + let totalAmount = 0; + for (const [slotId, items] of ordersBySlot) { + const orderTotal = items.reduce( + (sum2, item) => { + if (!item.product) return sum2; + const basePrice = params.isFlash ? item.product.flashPrice ?? item.product.price : item.product.price; + const itemPrice = parseFloat((basePrice ?? 0).toString()); + return sum2 + itemPrice * item.quantity; + }, + 0 + ); + totalAmount += orderTotal; + } + const appliedCoupon = await validateAndGetCoupon(couponId, userId, totalAmount); + const expectedDeliveryCharge = totalAmount < minOrderValue2 ? deliveryCharge2 : 0; + const totalWithDelivery = totalAmount + expectedDeliveryCharge; + const ordersData = []; + let isFirstOrder = true; + for (const [slotId, items] of ordersBySlot) { + const subOrderTotal = items.reduce( + (sum2, item) => { + if (!item.product) return sum2; + const basePrice = params.isFlash ? item.product.flashPrice ?? item.product.price : item.product.price; + const itemPrice = parseFloat((basePrice ?? 0).toString()); + return sum2 + itemPrice * item.quantity; + }, + 0 + ); + const subOrderTotalWithDelivery = subOrderTotal + expectedDeliveryCharge; + const orderGroupProportion = subOrderTotal / totalAmount; + const orderTotalAmount = isFirstOrder ? subOrderTotalWithDelivery : subOrderTotal; + const { finalOrderTotal: finalOrderAmount } = applyDiscountToOrder( + orderTotalAmount, + appliedCoupon, + orderGroupProportion + ); + const order = { + userId, + addressId, + slotId: params.isFlash ? null : slotId, + isCod: paymentMethod === "cod", + isOnlinePayment: paymentMethod === "online", + paymentInfoId: null, + totalAmount: finalOrderAmount.toString(), + deliveryCharge: isFirstOrder ? expectedDeliveryCharge.toString() : "0", + readableId: -1, + userNotes: userNotes || null, + orderGroupId, + orderGroupProportion: orderGroupProportion.toString(), + isFlashDelivery: params.isFlash + }; + const validItems = items.filter( + (item) => item.product !== null && item.product !== void 0 + ); + const orderItemsData = validItems.map( + (item) => { + const basePrice = params.isFlash ? item.product.flashPrice ?? item.product.price : item.product.price; + const priceString = (basePrice ?? 0).toString(); + return { + orderId: 0, + productId: item.productId, + quantity: item.quantity.toString(), + price: priceString, + discountedPrice: priceString + }; + } + ); + const orderStatusData = { + userId, + orderId: 0, + paymentStatus: paymentMethod === "cod" ? "cod" : "pending" + }; + ordersData.push({ order, orderItems: orderItemsData, orderStatus: orderStatusData }); + isFirstOrder = false; + } + const createdOrders = await placeOrderTransaction({ + userId, + ordersData, + paymentMethod, + totalWithDelivery + }); + await deleteCartItemsForOrder( + userId, + selectedItems.map((item) => item.productId) + ); + if (appliedCoupon && createdOrders.length > 0) { + await recordCouponUsage( + userId, + appliedCoupon.id, + createdOrders[0].id + ); + } + for (const order of createdOrders) { + sendOrderPlacedNotification(userId, order.id.toString()); + } + await publishFormattedOrder(createdOrders, ordersBySlot); + return { success: true, data: createdOrders }; +}, "placeOrderUtil"); +var orderRouter2 = router2({ + placeOrder: protectedProcedure.input( + external_exports.object({ + selectedItems: external_exports.array( + external_exports.object({ + productId: external_exports.number().int().positive(), + quantity: external_exports.number().int().positive(), + slotId: external_exports.union([external_exports.number().int(), external_exports.null()]) + }) + ), + addressId: external_exports.number().int().positive(), + paymentMethod: external_exports.enum(["online", "cod"]), + couponId: external_exports.number().int().positive().optional(), + userNotes: external_exports.string().optional(), + isFlashDelivery: external_exports.boolean().optional().default(false) + }) + ).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const isSuspended = await checkUserSuspended(userId); + if (isSuspended) { + throw new ApiError("Unable to place order", 403); + } + const { + selectedItems, + addressId, + paymentMethod, + couponId, + userNotes, + isFlashDelivery + } = input; + if (isFlashDelivery) { + const isFlashDeliveryEnabled = await getConstant(CONST_KEYS.isFlashDeliveryEnabled); + if (!isFlashDeliveryEnabled) { + throw new ApiError("Flash delivery is currently unavailable. Please opt for scheduled delivery.", 403); + } + } + if (!isFlashDelivery) { + const slotIds = [...new Set(selectedItems.filter((i) => i.slotId !== null).map((i) => i.slotId))]; + for (const slotId of slotIds) { + const isCapacityFull = await getSlotCapacityStatus(slotId); + if (isCapacityFull) { + throw new ApiError("Selected delivery slot is at full capacity. Please choose another slot.", 403); + } + } + } + let processedItems = selectedItems; + if (isFlashDelivery) { + processedItems = selectedItems.map((item) => ({ + ...item, + slotId: null + })); + } + return await placeOrderUtil({ + userId, + selectedItems: processedItems, + addressId, + paymentMethod, + couponId, + userNotes, + isFlash: isFlashDelivery + }); + }), + getOrders: protectedProcedure.input( + external_exports.object({ + page: external_exports.number().min(1).default(1), + pageSize: external_exports.number().min(1).max(50).default(10) + }).optional() + ).query(async ({ input, ctx }) => { + const { page = 1, pageSize = 10 } = input || {}; + const userId = ctx.user.userId; + const offset = (page - 1) * pageSize; + const totalCount = await getOrderCount(userId); + const userOrders = await getOrdersWithRelations(userId, offset, pageSize); + const mappedOrders = await Promise.all( + userOrders.map(async (order) => { + const status = order.orderStatus[0]; + const refund = order.refunds[0]; + let deliveryStatus; + let orderStatus3; + const allItemsPackaged = order.orderItems.every( + (item) => item.is_packaged + ); + if (status?.isCancelled) { + deliveryStatus = "cancelled"; + orderStatus3 = "cancelled"; + } else if (status?.isDelivered) { + deliveryStatus = "success"; + orderStatus3 = "success"; + } else if (allItemsPackaged) { + deliveryStatus = "packaged"; + orderStatus3 = "success"; + } else { + deliveryStatus = "pending"; + orderStatus3 = "success"; + } + const paymentMode = order.isCod ? "CoD" : "Online"; + const paymentStatus = status?.paymentStatus || "pending"; + const refundStatus = refund?.refundStatus || "none"; + const refundAmount = refund?.refundAmount ? parseFloat(refund.refundAmount.toString()) : null; + const items = await Promise.all( + order.orderItems.map(async (item) => { + const signedImages = item.product.images ? scaffoldAssetUrl( + item.product.images + ) : []; + return { + productName: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat(item.price.toString()), + discountedPrice: parseFloat( + item.discountedPrice?.toString() || item.price.toString() + ), + amount: parseFloat(item.price.toString()) * parseFloat(item.quantity), + image: signedImages[0] || null + }; + }) + ); + return { + id: order.id, + orderId: `ORD${order.id}`, + orderDate: order.createdAt.toISOString(), + deliveryStatus, + deliveryDate: order.slot?.deliveryTime.toISOString(), + orderStatus: orderStatus3, + cancelReason: status?.cancelReason || null, + paymentMode, + totalAmount: Number(order.totalAmount), + deliveryCharge: Number(order.deliveryCharge), + paymentStatus, + refundStatus, + refundAmount, + userNotes: order.userNotes || null, + items, + isFlashDelivery: order.isFlashDelivery, + createdAt: order.createdAt.toISOString() + }; + }) + ); + return { + success: true, + data: mappedOrders, + pagination: { + page, + pageSize, + totalCount, + totalPages: Math.ceil(totalCount / pageSize) + } + }; + }), + getOrderById: protectedProcedure.input(external_exports.object({ orderId: external_exports.string() })).query(async ({ input, ctx }) => { + const { orderId } = input; + const userId = ctx.user.userId; + const order = await getOrderByIdWithRelations(parseInt(orderId), userId); + if (!order) { + throw new Error("Order not found"); + } + const couponUsageData = await getCouponUsageForOrder(order.id); + let couponData = null; + if (couponUsageData.length > 0) { + let totalDiscountAmount = 0; + const orderTotal = parseFloat(order.totalAmount.toString()); + for (const usage of couponUsageData) { + let discountAmount = 0; + if (usage.coupon.discountPercent) { + discountAmount = orderTotal * parseFloat(usage.coupon.discountPercent.toString()) / 100; + } else if (usage.coupon.flatDiscount) { + discountAmount = parseFloat(usage.coupon.flatDiscount.toString()); + } + if (usage.coupon.maxValue && discountAmount > parseFloat(usage.coupon.maxValue.toString())) { + discountAmount = parseFloat(usage.coupon.maxValue.toString()); + } + totalDiscountAmount += discountAmount; + } + couponData = { + couponCode: couponUsageData.map((u4) => u4.coupon.couponCode).join(", "), + couponDescription: `${couponUsageData.length} coupons applied`, + discountAmount: totalDiscountAmount + }; + } + const status = order.orderStatus[0]; + const refund = order.refunds[0]; + let deliveryStatus; + let orderStatusResult; + const allItemsPackaged = order.orderItems.every( + (item) => item.is_packaged + ); + if (status?.isCancelled) { + deliveryStatus = "cancelled"; + orderStatusResult = "cancelled"; + } else if (status?.isDelivered) { + deliveryStatus = "success"; + orderStatusResult = "success"; + } else if (allItemsPackaged) { + deliveryStatus = "packaged"; + orderStatusResult = "success"; + } else { + deliveryStatus = "pending"; + orderStatusResult = "success"; + } + const paymentMode = order.isCod ? "CoD" : "Online"; + const paymentStatus = status?.paymentStatus || "pending"; + const refundStatus = refund?.refundStatus || "none"; + const refundAmount = refund?.refundAmount ? parseFloat(refund.refundAmount.toString()) : null; + const items = await Promise.all( + order.orderItems.map(async (item) => { + const signedImages = item.product.images ? scaffoldAssetUrl( + item.product.images + ) : []; + return { + productName: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat(item.price.toString()), + discountedPrice: parseFloat( + item.discountedPrice?.toString() || item.price.toString() + ), + amount: parseFloat(item.price.toString()) * parseFloat(item.quantity), + image: signedImages[0] || null + }; + }) + ); + return { + id: order.id, + orderId: `ORD${order.id}`, + orderDate: order.createdAt.toISOString(), + deliveryStatus, + deliveryDate: order.slot?.deliveryTime.toISOString(), + orderStatus: orderStatusResult, + cancellationStatus: orderStatusResult, + cancelReason: status?.cancelReason || null, + paymentMode, + paymentStatus, + refundStatus, + refundAmount, + userNotes: order.userNotes || null, + items, + couponCode: couponData?.couponCode || null, + couponDescription: couponData?.couponDescription || null, + discountAmount: couponData?.discountAmount || null, + orderAmount: parseFloat(order.totalAmount.toString()), + isFlashDelivery: order.isFlashDelivery, + createdAt: order.createdAt.toISOString(), + totalAmount: parseFloat(order.totalAmount.toString()), + deliveryCharge: parseFloat(order.deliveryCharge.toString()) + }; + }), + cancelOrder: protectedProcedure.input( + external_exports.object({ + id: external_exports.number(), + reason: external_exports.string().min(1, "Cancellation reason is required") + }) + ).mutation(async ({ input, ctx }) => { + try { + const userId = ctx.user.userId; + const { id, reason } = input; + const order = await getOrderBasic(id); + if (!order) { + console.error("Order not found:", id); + throw new ApiError("Order not found", 404); + } + if (order.userId !== userId) { + console.error("Order does not belong to user:", { + orderId: id, + orderUserId: order.userId, + requestUserId: userId + }); + throw new ApiError("Order not found", 404); + } + const status = order.orderStatus[0]; + if (!status) { + console.error("Order status not found for order:", id); + throw new ApiError("Order status not found", 400); + } + if (status.isCancelled) { + console.error("Order is already cancelled:", id); + throw new ApiError("Order is already cancelled", 400); + } + if (status.isDelivered) { + console.error("Cannot cancel delivered order:", id); + throw new ApiError("Cannot cancel delivered order", 400); + } + await cancelOrderTransaction(id, status.id, reason, order.isCod); + await sendOrderCancelledNotification(userId, id.toString()); + await publishCancellation(id, "user", reason); + return { success: true, message: "Order cancelled successfully" }; + } catch (e) { + console.log(e); + throw new ApiError("failed to cancel order"); + } + }), + updateUserNotes: protectedProcedure.input( + external_exports.object({ + id: external_exports.number(), + userNotes: external_exports.string() + }) + ).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { id, userNotes } = input; + const order = await getOrderBasic(id); + if (!order) { + console.error("Order not found:", id); + throw new ApiError("Order not found", 404); + } + if (order.userId !== userId) { + console.error("Order does not belong to user:", { + orderId: id, + orderUserId: order.userId, + requestUserId: userId + }); + throw new ApiError("Order not found", 404); + } + const status = order.orderStatus[0]; + if (!status) { + console.error("Order status not found for order:", id); + throw new ApiError("Order status not found", 400); + } + if (status.isDelivered) { + console.error("Cannot update notes for delivered order:", id); + throw new ApiError("Cannot update notes for delivered order", 400); + } + if (status.isCancelled) { + console.error("Cannot update notes for cancelled order:", id); + throw new ApiError("Cannot update notes for cancelled order", 400); + } + await updateOrderNotes2(id, userNotes); + return { success: true, message: "Notes updated successfully" }; + }), + getRecentlyOrderedProducts: protectedProcedure.input( + external_exports.object({ + limit: external_exports.number().min(1).max(50).default(20) + }).optional() + ).query(async ({ input, ctx }) => { + const { limit = 20 } = input || {}; + const userId = ctx.user.userId; + const thirtyDaysAgo = /* @__PURE__ */ new Date(); + thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30); + const recentOrderIds = await getRecentlyDeliveredOrderIds(userId, 10, thirtyDaysAgo); + if (recentOrderIds.length === 0) { + return { success: true, products: [] }; + } + const productIds = await getProductIdsFromOrders(recentOrderIds); + if (productIds.length === 0) { + return { success: true, products: [] }; + } + const productsWithUnits = await getProductsForRecentOrders(productIds, limit); + const formattedProducts = await Promise.all( + productsWithUnits.map(async (product) => { + const nextDeliveryDate = await getNextDeliveryDate(product.id); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + price: product.price, + unit: product.unitShortNotation, + incrementStep: product.incrementStep, + isOutOfStock: product.isOutOfStock, + nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null, + images: scaffoldAssetUrl( + product.images || [] + ) + }; + }) + ); + return { + success: true, + products: formattedProducts + }; + }) +}); + +// src/trpc/apis/user-apis/apis/product.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var import_dayjs4 = __toESM(require_dayjs_min()); +var signProductImages = /* @__PURE__ */ __name((product) => ({ + ...product, + images: scaffoldAssetUrl(product.images || []) +}), "signProductImages"); +var productRouter2 = router2({ + getProductDetails: publicProcedure.input(external_exports.object({ + id: external_exports.string().regex(/^\d+$/, "Invalid product ID") + })).query(async ({ input }) => { + const { id } = input; + const productId = parseInt(id); + if (isNaN(productId)) { + throw new Error("Invalid product ID"); + } + console.log("from the api to get product details"); + const cachedProduct = await getProductById5(productId); + if (cachedProduct) { + const currentTime = /* @__PURE__ */ new Date(); + const filteredSlots = cachedProduct.deliverySlots.filter( + (slot) => (0, import_dayjs4.default)(slot.freezeTime).isAfter(currentTime) && !slot.isCapacityFull + ); + return { + ...cachedProduct, + deliverySlots: filteredSlots + }; + } + const productData = await getProductDetailById(productId); + if (!productData) { + throw new Error("Product not found"); + } + return signProductImages(productData); + }), + getProductReviews: publicProcedure.input(external_exports.object({ + productId: external_exports.number().int().positive(), + limit: external_exports.number().int().min(1).max(50).optional().default(10), + offset: external_exports.number().int().min(0).optional().default(0) + })).query(async ({ input }) => { + const { productId, limit, offset } = input; + const { reviews, totalCount } = await getProductReviews2(productId, limit, offset); + const reviewsWithSignedUrls = reviews.map((review) => ({ + ...review, + signedImageUrls: scaffoldAssetUrl(review.imageUrls || []) + })); + const hasMore = offset + limit < totalCount; + return { reviews: reviewsWithSignedUrls, hasMore }; + }), + createReview: protectedProcedure.input(external_exports.object({ + productId: external_exports.number().int().positive(), + reviewBody: external_exports.string().min(1, "Review body is required"), + ratings: external_exports.number().int().min(1).max(5), + imageUrls: external_exports.array(external_exports.string()).optional().default([]), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]) + })).mutation(async ({ input, ctx }) => { + const { productId, reviewBody, ratings, imageUrls, uploadUrls } = input; + const userId = ctx.user.userId; + const product = await getProductById3(productId); + if (!product) { + throw new ApiError("Product not found", 404); + } + const imageKeys = uploadUrls.map((item) => extractKeyFromPresignedUrl(item)); + const newReview = await createProductReview(userId, productId, reviewBody, ratings, imageKeys); + if (uploadUrls && uploadUrls.length > 0) { + try { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } catch (error50) { + console.error("Error claiming upload URLs:", error50); + } + } + return { success: true, review: newReview }; + }), + getAllProductsSummary: publicProcedure.query(async () => { + const allCachedProducts = await getAllProducts2(); + const transformedProducts = allCachedProducts.map((product) => ({ + ...product, + images: product.images || [], + deliverySlots: [], + specialDeals: [] + })); + return transformedProducts; + }) +}); + +// src/trpc/apis/user-apis/apis/user.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var userRouter2 = router2({ + getSelfData: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const user = await getUserById2(userId); + if (!user) { + throw new ApiError("User not found", 404); + } + const userDetail = await getUserDetailByUserId(userId); + const profileImageSignedUrl = userDetail?.profileImage ? await generateSignedUrlFromS3Url(userDetail.profileImage) : null; + return { + success: true, + data: { + user: { + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile, + profileImage: profileImageSignedUrl, + bio: userDetail?.bio || null, + dateOfBirth: userDetail?.dateOfBirth ? new Date(userDetail.dateOfBirth).toISOString() : null, + gender: userDetail?.gender || null, + occupation: userDetail?.occupation || null + } + } + }; + }), + checkProfileComplete: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const result = await getUserWithCreds(userId); + if (!result) { + throw new ApiError("User not found", 404); + } + return { + isComplete: !!(result.user.name && result.user.email && result.creds) + }; + }), + savePushToken: publicProcedure.input(external_exports.object({ token: external_exports.string() })).mutation(async ({ input, ctx }) => { + const { token } = input; + const userId = ctx.user?.userId; + if (userId) { + await upsertNotifCred(userId, token); + await deleteUnloggedToken(token); + } else { + const existing = await getUnloggedToken(token); + if (existing) { + await upsertUnloggedToken(token); + } else { + await upsertUnloggedToken(token); + } + } + return { success: true }; + }) +}); + +// src/trpc/apis/user-apis/apis/coupon.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var generateCouponDescription = /* @__PURE__ */ __name((coupon) => { + let desc2 = ""; + if (coupon.discountPercent) { + desc2 += `${coupon.discountPercent}% off`; + } else if (coupon.flatDiscount) { + desc2 += `\u20B9${coupon.flatDiscount} off`; + } + if (coupon.minOrder) { + desc2 += ` on orders above \u20B9${coupon.minOrder}`; + } + if (coupon.maxValue) { + desc2 += ` (max discount \u20B9${coupon.maxValue})`; + } + return desc2; +}, "generateCouponDescription"); +var userCouponRouter = router2({ + getEligible: protectedProcedure.query(async ({ ctx }) => { + try { + const userId = ctx.user.userId; + const allCoupons = await getActiveCouponsWithRelations(userId); + const applicableCoupons = allCoupons.filter((coupon) => { + if (!coupon.isUserBased) return true; + const applicableUsers = coupon.applicableUsers || []; + return applicableUsers.some((au) => au.userId === userId); + }); + return { success: true, data: applicableCoupons }; + } catch (e) { + console.log(e); + throw new ApiError("Unable to get coupons"); + } + }), + getProductCoupons: protectedProcedure.input(external_exports.object({ productId: external_exports.number().int().positive() })).query(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { productId } = input; + const allCoupons = await getActiveCouponsWithRelations(userId); + const applicableCoupons = allCoupons.filter((coupon) => { + const applicableUsers = coupon.applicableUsers || []; + const userApplicable = !coupon.isUserBased || applicableUsers.some((au) => au.userId === userId); + const applicableProducts = coupon.applicableProducts || []; + const productApplicable = applicableProducts.length === 0 || applicableProducts.some((ap) => ap.productId === productId); + return userApplicable && productApplicable; + }); + return { success: true, data: applicableCoupons }; + }), + getMyCoupons: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + const allCoupons = await getAllCouponsWithRelations(userId); + const applicableCoupons = allCoupons.filter((coupon) => { + const isNotInvalidated = !coupon.isInvalidated; + const applicableUsers = coupon.applicableUsers || []; + const isApplicable = coupon.isApplyForAll || applicableUsers.some((au) => au.userId === userId); + const isNotExpired = !coupon.validTill || new Date(coupon.validTill) > /* @__PURE__ */ new Date(); + return isNotInvalidated && isApplicable && isNotExpired; + }); + const personalCoupons = []; + const generalCoupons = []; + applicableCoupons.forEach((coupon) => { + const usageCount = coupon.usages.length; + const isExpired = false; + const isUsedUp = Boolean(coupon.maxLimitForUser && usageCount >= coupon.maxLimitForUser); + const couponDisplay = { + id: coupon.id, + code: coupon.couponCode, + discountType: coupon.discountPercent ? "percentage" : "flat", + discountValue: parseFloat(coupon.discountPercent || coupon.flatDiscount || "0"), + maxValue: coupon.maxValue ? parseFloat(coupon.maxValue) : void 0, + minOrder: coupon.minOrder ? parseFloat(coupon.minOrder) : void 0, + description: generateCouponDescription(coupon), + validTill: coupon.validTill ? new Date(coupon.validTill) : void 0, + usageCount, + maxLimitForUser: coupon.maxLimitForUser ? parseInt(coupon.maxLimitForUser.toString()) : void 0, + isExpired, + isUsedUp + }; + if ((coupon.applicableUsers || []).some((au) => au.userId === userId) && !coupon.isApplyForAll) { + personalCoupons.push(couponDisplay); + } else if (coupon.isApplyForAll) { + generalCoupons.push(couponDisplay); + } + }); + return { + success: true, + data: { + personal: personalCoupons, + general: generalCoupons + } + }; + }), + redeemReservedCoupon: protectedProcedure.input(external_exports.object({ secretCode: external_exports.string() })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { secretCode } = input; + const reservedCoupon = await getReservedCouponByCode(secretCode); + if (!reservedCoupon) { + throw new ApiError("Invalid or already redeemed coupon code", 400); + } + if (reservedCoupon.redeemedBy === userId) { + throw new ApiError("You have already redeemed this coupon", 400); + } + const couponResult = await redeemReservedCoupon(userId, reservedCoupon); + return { success: true, coupon: couponResult }; + }) +}); + +// src/trpc/apis/user-apis/apis/payments.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +import crypto2 from "crypto"; + +// src/lib/payments-utils.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var RazorpayPaymentService = class { + static { + __name(this, "RazorpayPaymentService"); + } + // private static instance = new Razorpay({ + // key_id: razorpayId, + // key_secret: razorpaySecret, + // }); + // + static async createOrder(orderId, amount) { + } + static async insertPaymentRecord(orderId, razorpayOrder, tx) { + } + static async initiateRefund(paymentId, amount) { + } + static async fetchRefund(refundId) { + } +}; + +// src/trpc/apis/user-apis/apis/payments.ts +var paymentRouter = router2({ + createRazorpayOrder: protectedProcedure.input(external_exports.object({ + orderId: external_exports.string() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { orderId } = input; + const order = await getOrderById(parseInt(orderId)); + if (!order) { + throw new ApiError("Order not found", 404); + } + if (order.userId !== userId) { + throw new ApiError("Order does not belong to user", 403); + } + const existingPayment = await getPaymentByOrderId(parseInt(orderId)); + if (existingPayment && existingPayment.status === "pending") { + return { + razorpayOrderId: existingPayment.merchantOrderId, + key: razorpayId + }; + } + if (order.totalAmount === null) { + throw new ApiError("Order total is missing", 400); + } + const razorpayOrder = await RazorpayPaymentService.createOrder(parseInt(orderId), order.totalAmount); + await RazorpayPaymentService.insertPaymentRecord(parseInt(orderId), razorpayOrder); + return { + razorpayOrderId: 0, + key: razorpayId + }; + }), + verifyPayment: protectedProcedure.input(external_exports.object({ + razorpay_payment_id: external_exports.string(), + razorpay_order_id: external_exports.string(), + razorpay_signature: external_exports.string() + })).mutation(async ({ input, ctx }) => { + const { razorpay_payment_id, razorpay_order_id, razorpay_signature } = input; + const expectedSignature = crypto2.createHmac("sha256", razorpaySecret).update(razorpay_order_id + "|" + razorpay_payment_id).digest("hex"); + if (expectedSignature !== razorpay_signature) { + throw new ApiError("Invalid payment signature", 400); + } + const currentPayment = await getPaymentByMerchantOrderId(razorpay_order_id); + if (!currentPayment) { + throw new ApiError("Payment record not found", 404); + } + const updatedPayload = { + ...currentPayment.payload || {}, + payment_id: razorpay_payment_id, + signature: razorpay_signature + }; + const updatedPayment = await updatePaymentSuccess(razorpay_order_id, updatedPayload); + if (!updatedPayment) { + throw new ApiError("Payment record not found", 404); + } + await updateOrderPaymentStatus(updatedPayment.orderId, "success"); + return { + success: true, + message: "Payment verified successfully" + }; + }), + markPaymentFailed: protectedProcedure.input(external_exports.object({ + merchantOrderId: external_exports.string() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { merchantOrderId } = input; + const payment = await getPaymentByMerchantOrderId(merchantOrderId); + if (!payment) { + throw new ApiError("Payment not found", 404); + } + const order = await getOrderById(payment.orderId); + if (!order || order.userId !== userId) { + throw new ApiError("Payment does not belong to user", 403); + } + await markPaymentFailed(payment.id); + return { + success: true, + message: "Payment marked as failed" + }; + }) +}); + +// src/trpc/apis/user-apis/apis/file-upload.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var fileUploadRouter = router2({ + generateUploadUrls: protectedProcedure.input(external_exports.object({ + contextString: external_exports.enum(["review", "product_info", "notification", "complaint", "profile", "tags"]), + mimeTypes: external_exports.array(external_exports.string()) + })).mutation(async ({ input }) => { + const { contextString, mimeTypes } = input; + const uploadUrls = []; + const keys = []; + for (const mimeType of mimeTypes) { + let folder; + if (contextString === "review") { + folder = "review-images"; + } else if (contextString === "product_info") { + folder = "product-images"; + } else if (contextString === "notification") { + folder = "notification-images"; + } else if (contextString === "complaint") { + folder = "complaint-images"; + } else if (contextString === "profile") { + folder = "profile-images"; + } else if (contextString === "tags") { + folder = "tags"; + } else { + folder = ""; + } + const extension = mimeType === "image/jpeg" ? ".jpg" : mimeType === "image/png" ? ".png" : mimeType === "image/gif" ? ".gif" : ".jpg"; + const key = `${folder}/${Date.now()}${extension}`; + try { + const uploadUrl = await generateUploadUrl(key, mimeType); + uploadUrls.push(uploadUrl); + keys.push(key); + } catch (error50) { + console.error("Error generating upload URL:", error50); + throw new ApiError("Failed to generate upload URL", 500); + } + } + return { uploadUrls }; + }) +}); + +// src/trpc/apis/user-apis/apis/tags.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var tagsRouter = router2({ + getTagsByStore: publicProcedure.input(external_exports.object({ + storeId: external_exports.number() + })).query(async ({ input }) => { + const { storeId } = input; + const tags = await getTagsByStoreId(storeId); + return { + tags: tags.map((tag2) => ({ + id: tag2.id, + tagName: tag2.tagName, + tagDescription: tag2.tagDescription, + imageUrl: tag2.imageUrl, + productIds: tag2.productIds + })) + }; + }) +}); + +// src/trpc/apis/user-apis/apis/user-trpc-index.ts +var userRouter3 = router2({ + address: addressRouter, + auth: authRouter, + banner: bannerRouter, + cart: cartRouter, + complaint: complaintRouter2, + order: orderRouter2, + product: productRouter2, + slots: slotsRouter, + user: userRouter2, + coupon: userCouponRouter, + payment: paymentRouter, + stores: storesRouter, + fileUpload: fileUploadRouter, + tags: tagsRouter +}); + +// src/trpc/router.ts +var appRouter = router2({ + hello: publicProcedure.input(external_exports.object({ name: external_exports.string() })).query(({ input }) => { + return { greeting: `Hello ${input.name}!` }; + }), + admin: adminRouter, + user: userRouter3, + common: commonApiRouter +}); + +// src/app.ts +var createApp = /* @__PURE__ */ __name(() => { + const app = new Hono2(); + app.use(cors({ + origin: "http://localhost:5174", + allowMethods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], + allowHeaders: ["Origin", "X-Requested-With", "Content-Type", "Accept", "Authorization"], + credentials: true + })); + app.use(logger()); + app.use("/api/trpc", trpcServer({ + router: appRouter, + createContext: /* @__PURE__ */ __name(async ({ req }) => { + let user = null; + let staffUser = null; + const authHeader = req.headers.get("authorization"); + if (authHeader?.startsWith("Bearer ")) { + const token = authHeader.substring(7); + try { + const { payload } = await jwtVerify(token, encodedJwtSecret); + const decoded = payload; + if (decoded.staffId) { + const staff = await getStaffUserById(decoded.staffId); + if (staff) { + user = staffUser; + staffUser = { + id: staff.id, + name: staff.name + }; + } + } else { + user = decoded; + const suspended = await isUserSuspended(user.userId); + if (suspended) { + throw new TRPCError({ + code: "FORBIDDEN", + message: "Account suspended" + }); + } + } + } catch (err) { + } + } + return { req, user, staffUser }; + }, "createContext"), + onError({ error: error50, path: path3, type, ctx }) { + console.error("\u{1F6A8} tRPC Error :", { + path: path3, + type, + code: error50.code, + message: error50.message, + userId: ctx?.user?.userId, + stack: error50.stack + }); + } + })); + app.route("/api", main_router_default); + app.onError((err, c) => { + console.error(err); + let status = 500; + let message2 = "Internal Server Error"; + if (err instanceof TRPCError) { + const trpcStatusMap = { + BAD_REQUEST: 400, + UNAUTHORIZED: 401, + FORBIDDEN: 403, + NOT_FOUND: 404, + TIMEOUT: 408, + CONFLICT: 409, + PRECONDITION_FAILED: 412, + PAYLOAD_TOO_LARGE: 413, + METHOD_NOT_SUPPORTED: 405, + UNPROCESSABLE_CONTENT: 422, + TOO_MANY_REQUESTS: 429, + INTERNAL_SERVER_ERROR: 500 + }; + status = trpcStatusMap[err.code] || 500; + message2 = err.message; + } else if (err.statusCode) { + status = err.statusCode; + message2 = err.message; + } else if (err.status) { + status = err.status; + message2 = err.message; + } else if (err.message) { + message2 = err.message; + } + return c.json({ message: message2 }, status); + }); + return app; +}, "createApp"); + +// worker.ts +var worker_default = { + async fetch(request, env2, ctx) { + ; + globalThis.ENV = env2; + if (env2.DB) { + initDb(env2.DB); + } + const app = createApp(); + return app.fetch(request, env2, ctx); + } +}; + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var drainBody = /* @__PURE__ */ __name(async (request, env2, _ctx, middlewareCtx) => { + try { + return await middlewareCtx.next(request, env2); + } finally { + try { + if (request.body !== null && !request.bodyUsed) { + const reader = request.body.getReader(); + while (!(await reader.read()).done) { + } + } + } catch (e) { + console.error("Failed to drain the unused request body.", e); + } + } +}, "drainBody"); +var middleware_ensure_req_body_drained_default = drainBody; + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function reduceError(e) { + return { + name: e?.name, + message: e?.message ?? String(e), + stack: e?.stack, + cause: e?.cause === void 0 ? void 0 : reduceError(e.cause) + }; +} +__name(reduceError, "reduceError"); +var jsonError = /* @__PURE__ */ __name(async (request, env2, _ctx, middlewareCtx) => { + try { + return await middlewareCtx.next(request, env2); + } catch (e) { + const error50 = reduceError(e); + return Response.json(error50, { + status: 500, + headers: { "MF-Experimental-Error-Stack": "true" } + }); + } +}, "jsonError"); +var middleware_miniflare3_json_error_default = jsonError; + +// .wrangler/tmp/bundle-rJ86wI/middleware-insertion-facade.js +var __INTERNAL_WRANGLER_MIDDLEWARE__ = [ + middleware_ensure_req_body_drained_default, + middleware_miniflare3_json_error_default +]; +var middleware_insertion_facade_default = worker_default; + +// ../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/templates/middleware/common.ts +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var __facade_middleware__ = []; +function __facade_register__(...args) { + __facade_middleware__.push(...args.flat()); +} +__name(__facade_register__, "__facade_register__"); +function __facade_invokeChain__(request, env2, ctx, dispatch, middlewareChain) { + const [head, ...tail] = middlewareChain; + const middlewareCtx = { + dispatch, + next(newRequest, newEnv) { + return __facade_invokeChain__(newRequest, newEnv, ctx, dispatch, tail); + } + }; + return head(request, env2, ctx, middlewareCtx); +} +__name(__facade_invokeChain__, "__facade_invokeChain__"); +function __facade_invoke__(request, env2, ctx, dispatch, finalMiddleware) { + return __facade_invokeChain__(request, env2, ctx, dispatch, [ + ...__facade_middleware__, + finalMiddleware + ]); +} +__name(__facade_invoke__, "__facade_invoke__"); + +// .wrangler/tmp/bundle-rJ86wI/middleware-loader.entry.ts +var __Facade_ScheduledController__ = class ___Facade_ScheduledController__ { + constructor(scheduledTime, cron, noRetry) { + this.scheduledTime = scheduledTime; + this.cron = cron; + this.#noRetry = noRetry; + } + static { + __name(this, "__Facade_ScheduledController__"); + } + #noRetry; + noRetry() { + if (!(this instanceof ___Facade_ScheduledController__)) { + throw new TypeError("Illegal invocation"); + } + this.#noRetry(); + } +}; +function wrapExportedHandler(worker) { + if (__INTERNAL_WRANGLER_MIDDLEWARE__ === void 0 || __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0) { + return worker; + } + for (const middleware2 of __INTERNAL_WRANGLER_MIDDLEWARE__) { + __facade_register__(middleware2); + } + const fetchDispatcher = /* @__PURE__ */ __name(function(request, env2, ctx) { + if (worker.fetch === void 0) { + throw new Error("Handler does not export a fetch() function."); + } + return worker.fetch(request, env2, ctx); + }, "fetchDispatcher"); + return { + ...worker, + fetch(request, env2, ctx) { + const dispatcher = /* @__PURE__ */ __name(function(type, init) { + if (type === "scheduled" && worker.scheduled !== void 0) { + const controller = new __Facade_ScheduledController__( + Date.now(), + init.cron ?? "", + () => { + } + ); + return worker.scheduled(controller, env2, ctx); + } + }, "dispatcher"); + return __facade_invoke__(request, env2, ctx, dispatcher, fetchDispatcher); + } + }; +} +__name(wrapExportedHandler, "wrapExportedHandler"); +function wrapWorkerEntrypoint(klass) { + if (__INTERNAL_WRANGLER_MIDDLEWARE__ === void 0 || __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0) { + return klass; + } + for (const middleware2 of __INTERNAL_WRANGLER_MIDDLEWARE__) { + __facade_register__(middleware2); + } + return class extends klass { + #fetchDispatcher = /* @__PURE__ */ __name((request, env2, ctx) => { + this.env = env2; + this.ctx = ctx; + if (super.fetch === void 0) { + throw new Error("Entrypoint class does not define a fetch() function."); + } + return super.fetch(request); + }, "#fetchDispatcher"); + #dispatcher = /* @__PURE__ */ __name((type, init) => { + if (type === "scheduled" && super.scheduled !== void 0) { + const controller = new __Facade_ScheduledController__( + Date.now(), + init.cron ?? "", + () => { + } + ); + return super.scheduled(controller); + } + }, "#dispatcher"); + fetch(request) { + return __facade_invoke__( + request, + this.env, + this.ctx, + this.#dispatcher, + this.#fetchDispatcher + ); + } + }; +} +__name(wrapWorkerEntrypoint, "wrapWorkerEntrypoint"); +var WRAPPED_ENTRY; +if (typeof middleware_insertion_facade_default === "object") { + WRAPPED_ENTRY = wrapExportedHandler(middleware_insertion_facade_default); +} else if (typeof middleware_insertion_facade_default === "function") { + WRAPPED_ENTRY = wrapWorkerEntrypoint(middleware_insertion_facade_default); +} +var middleware_loader_entry_default = WRAPPED_ENTRY; +export { + __INTERNAL_WRANGLER_MIDDLEWARE__, + middleware_loader_entry_default as default +}; +/*! Bundled license information: + +@trpc/server/dist/resolveResponse-CHqBlAgR.mjs: + (* istanbul ignore if -- @preserve *) + (*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + *) + +@trpc/server/dist/resolveResponse-CHqBlAgR.mjs: + (* istanbul ignore if -- @preserve *) +*/ +//# sourceMappingURL=worker.js.map diff --git a/apps/backend/.wrangler/tmp/dev-4RTD5h/worker.js.map b/apps/backend/.wrangler/tmp/dev-4RTD5h/worker.js.map new file mode 100644 index 0000000..ca8d751 --- /dev/null +++ b/apps/backend/.wrangler/tmp/dev-4RTD5h/worker.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "sources": ["../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/_internal/utils.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/perf_hooks/performance.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/perf_hooks.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/mock/noop.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/console.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-console", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/process/hrtime.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/tty/read-stream.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/tty/write-stream.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/tty.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/process/node-version.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/process/process.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-process", "wrangler-modules-watch:wrangler:modules-watch", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/templates/modules-watch-stub.js", "../../../../../packages/db_helper_sqlite/node_modules/src/entity.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/logger.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/table.utils.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/table.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/column.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/column-builder.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/foreign-keys.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/tracing-utils.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/unique-constraint.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/utils/array.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/columns/common.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/columns/enum.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/subquery.ts", "../../../../../packages/db_helper_sqlite/node_modules/drizzle-orm/version.js", "../../../../../packages/db_helper_sqlite/node_modules/src/tracing.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/view-common.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/sql.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/utils.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/table.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/primary-keys.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/expressions/conditions.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/expressions/select.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/expressions/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/relations.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/alias.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/selection-proxy.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/query-promise.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/foreign-keys.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/unique-constraint.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/common.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/blob.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/custom.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/integer.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/numeric.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/real.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/text.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/all.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/table.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/checks.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/indexes.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/primary-keys.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/utils.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/delete.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/casing.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/errors.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/functions/aggregate.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/functions/vector.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/functions/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/view-base.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/dialect.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/query-builders/query-builder.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/select.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/query-builder.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/insert.ts", "../../../../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.types.js", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/update.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/count.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/query.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/raw.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/db.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/cache/core/cache.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/alias.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/session.ts", "../../../../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/subquery.js", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/view.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/drizzle-orm/operations.js", "../../../../../packages/db_helper_sqlite/node_modules/src/index.ts", "../../../../../packages/db_helper_sqlite/src/db/schema.ts", "../../../../../node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js", "../../../../../node_modules/@smithy/util-utf8/dist-es/toUint8Array.js", "../../../../../node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js", "../../../../../node_modules/@smithy/util-utf8/dist-es/index.js", "../../../../../node_modules/dayjs/dayjs.min.js", "../../../../../node_modules/node-abort-controller/browser.js", "../../../../../node_modules/@ioredis/commands/built/commands.json", "../../../../../node_modules/@ioredis/commands/built/index.js", "node-built-in-modules:events", "../../../../../node_modules/standard-as-callback/built/utils.js", "../../../../../node_modules/standard-as-callback/built/index.js", "node-built-in-modules:assert", "node-built-in-modules:util", "../../../../../node_modules/redis-errors/lib/old.js", "../../../../../node_modules/redis-errors/lib/modern.js", "../../../../../node_modules/redis-errors/index.js", "../../../../../node_modules/cluster-key-slot/lib/index.js", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/fs/promises.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/fs/constants.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/fs/promises.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/fs/classes.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/fs/fs.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/fs.mjs", "node-built-in-modules:fs", "node-built-in-modules:path", "node-built-in-modules:url", "../../../../../node_modules/lodash.defaults/index.js", "../../../../../node_modules/lodash.isarguments/index.js", "../../../../../node_modules/ioredis/built/utils/lodash.js", "../../../../../node_modules/ms/index.js", "../../../../../node_modules/debug/src/common.js", "../../../../../node_modules/debug/src/browser.js", "../../../../../node_modules/ioredis/built/utils/debug.js", "../../../../../node_modules/ioredis/built/constants/TLSProfiles.js", "../../../../../node_modules/ioredis/built/utils/index.js", "../../../../../node_modules/ioredis/built/utils/argumentParsers.js", "../../../../../node_modules/ioredis/built/Command.js", "../../../../../node_modules/ioredis/built/errors/ClusterAllFailedError.js", "node-built-in-modules:stream", "../../../../../node_modules/ioredis/built/ScanStream.js", "../../../../../node_modules/ioredis/built/autoPipelining.js", "node-built-in-modules:crypto", "../../../../../node_modules/ioredis/built/Script.js", "../../../../../node_modules/ioredis/built/utils/Commander.js", "../../../../../node_modules/ioredis/built/Pipeline.js", "../../../../../node_modules/ioredis/built/transaction.js", "../../../../../node_modules/ioredis/built/utils/applyMixin.js", "node-built-in-modules:dns", "../../../../../node_modules/ioredis/built/cluster/ClusterOptions.js", "node-built-in-modules:net", "../../../../../node_modules/ioredis/built/cluster/util.js", "../../../../../node_modules/ioredis/built/cluster/ClusterSubscriber.js", "../../../../../node_modules/ioredis/built/cluster/ConnectionPool.js", "../../../../../node_modules/denque/index.js", "../../../../../node_modules/ioredis/built/cluster/DelayQueue.js", "../../../../../node_modules/ioredis/built/cluster/ShardedSubscriber.js", "../../../../../node_modules/ioredis/built/cluster/ClusterSubscriberGroup.js", "../../../../../node_modules/ioredis/built/cluster/index.js", "node-built-in-modules:tls", "../../../../../node_modules/ioredis/built/connectors/AbstractConnector.js", "../../../../../node_modules/ioredis/built/connectors/StandaloneConnector.js", "../../../../../node_modules/ioredis/built/connectors/SentinelConnector/SentinelIterator.js", "../../../../../node_modules/ioredis/built/connectors/SentinelConnector/FailoverDetector.js", "../../../../../node_modules/ioredis/built/connectors/SentinelConnector/index.js", "../../../../../node_modules/ioredis/built/connectors/index.js", "../../../../../node_modules/ioredis/built/errors/MaxRetriesPerRequestError.js", "../../../../../node_modules/ioredis/built/errors/index.js", "node-built-in-modules:buffer", "node-built-in-modules:string_decoder", "../../../../../node_modules/redis-parser/lib/parser.js", "../../../../../node_modules/redis-parser/index.js", "../../../../../node_modules/ioredis/built/SubscriptionSet.js", "../../../../../node_modules/ioredis/built/DataHandler.js", "../../../../../node_modules/ioredis/built/redis/event_handler.js", "../../../../../node_modules/ioredis/built/redis/RedisOptions.js", "../../../../../node_modules/ioredis/built/Redis.js", "../../../../../node_modules/ioredis/built/index.js", "../../../../../node_modules/bullmq/node_modules/semver/internal/constants.js", "../../../../../node_modules/bullmq/node_modules/semver/internal/debug.js", "../../../../../node_modules/bullmq/node_modules/semver/internal/re.js", "../../../../../node_modules/bullmq/node_modules/semver/internal/parse-options.js", "../../../../../node_modules/bullmq/node_modules/semver/internal/identifiers.js", "../../../../../node_modules/bullmq/node_modules/semver/classes/semver.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/parse.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/valid.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/clean.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/inc.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/diff.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/major.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/minor.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/patch.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/prerelease.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/compare.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/rcompare.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/compare-loose.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/compare-build.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/sort.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/rsort.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/gt.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/lt.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/eq.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/neq.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/gte.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/lte.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/cmp.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/coerce.js", "../../../../../node_modules/bullmq/node_modules/semver/internal/lrucache.js", "../../../../../node_modules/bullmq/node_modules/semver/classes/range.js", "../../../../../node_modules/bullmq/node_modules/semver/classes/comparator.js", "../../../../../node_modules/bullmq/node_modules/semver/functions/satisfies.js", "../../../../../node_modules/bullmq/node_modules/semver/ranges/to-comparators.js", "../../../../../node_modules/bullmq/node_modules/semver/ranges/max-satisfying.js", "../../../../../node_modules/bullmq/node_modules/semver/ranges/min-satisfying.js", "../../../../../node_modules/bullmq/node_modules/semver/ranges/min-version.js", "../../../../../node_modules/bullmq/node_modules/semver/ranges/valid.js", "../../../../../node_modules/bullmq/node_modules/semver/ranges/outside.js", "../../../../../node_modules/bullmq/node_modules/semver/ranges/gtr.js", "../../../../../node_modules/bullmq/node_modules/semver/ranges/ltr.js", "../../../../../node_modules/bullmq/node_modules/semver/ranges/intersects.js", "../../../../../node_modules/bullmq/node_modules/semver/ranges/simplify.js", "../../../../../node_modules/bullmq/node_modules/semver/ranges/subset.js", "../../../../../node_modules/bullmq/node_modules/semver/index.js", "../../../../../node_modules/luxon/src/errors.js", "../../../../../node_modules/luxon/src/impl/formats.js", "../../../../../node_modules/luxon/src/zone.js", "../../../../../node_modules/luxon/src/zones/systemZone.js", "../../../../../node_modules/luxon/src/zones/IANAZone.js", "../../../../../node_modules/luxon/src/impl/locale.js", "../../../../../node_modules/luxon/src/zones/fixedOffsetZone.js", "../../../../../node_modules/luxon/src/zones/invalidZone.js", "../../../../../node_modules/luxon/src/impl/zoneUtil.js", "../../../../../node_modules/luxon/src/impl/digits.js", "../../../../../node_modules/luxon/src/settings.js", "../../../../../node_modules/luxon/src/impl/invalid.js", "../../../../../node_modules/luxon/src/impl/conversions.js", "../../../../../node_modules/luxon/src/impl/util.js", "../../../../../node_modules/luxon/src/impl/english.js", "../../../../../node_modules/luxon/src/impl/formatter.js", "../../../../../node_modules/luxon/src/impl/regexParser.js", "../../../../../node_modules/luxon/src/duration.js", "../../../../../node_modules/luxon/src/interval.js", "../../../../../node_modules/luxon/src/info.js", "../../../../../node_modules/luxon/src/impl/diff.js", "../../../../../node_modules/luxon/src/impl/tokenParser.js", "../../../../../node_modules/luxon/src/datetime.js", "../../../../../node_modules/luxon/src/luxon.js", "../../../../../node_modules/cron-parser/lib/date.js", "../../../../../node_modules/cron-parser/lib/field_compactor.js", "../../../../../node_modules/cron-parser/lib/field_stringify.js", "../../../../../node_modules/cron-parser/lib/expression.js", "../../../../../node_modules/cron-parser/lib/parser.js", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/npm/node-fetch.mjs", "required-unenv-alias:node-fetch", "node-built-in-modules:node:assert", "node-built-in-modules:node:zlib", "../../../../../node_modules/promise-limit/index.js", "../../../../../node_modules/err-code/index.js", "../../../../../node_modules/retry/lib/retry_operation.js", "../../../../../node_modules/retry/lib/retry.js", "../../../../../node_modules/retry/index.js", "../../../../../node_modules/promise-retry/index.js", "../../../node_modules/expo-server-sdk/src/ExpoClientValues.ts", "../../../node_modules/expo-server-sdk/package.json", "../../../node_modules/expo-server-sdk/src/ExpoClient.ts", "../bundle-rJ86wI/middleware-loader.entry.ts", "../bundle-rJ86wI/middleware-insertion-facade.js", "../../../worker.ts", "../../../src/app.ts", "../../../../../node_modules/hono/dist/index.js", "../../../../../node_modules/hono/dist/hono.js", "../../../../../node_modules/hono/dist/hono-base.js", "../../../../../node_modules/hono/dist/compose.js", "../../../../../node_modules/hono/dist/context.js", "../../../../../node_modules/hono/dist/request.js", "../../../../../node_modules/hono/dist/http-exception.js", "../../../../../node_modules/hono/dist/request/constants.js", "../../../../../node_modules/hono/dist/utils/body.js", "../../../../../node_modules/hono/dist/utils/url.js", "../../../../../node_modules/hono/dist/utils/html.js", "../../../../../node_modules/hono/dist/router.js", "../../../../../node_modules/hono/dist/utils/constants.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/index.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/router.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/matcher.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/node.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/trie.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/prepared-router.js", "../../../../../node_modules/hono/dist/router/smart-router/index.js", "../../../../../node_modules/hono/dist/router/smart-router/router.js", "../../../../../node_modules/hono/dist/router/trie-router/index.js", "../../../../../node_modules/hono/dist/router/trie-router/router.js", "../../../../../node_modules/hono/dist/router/trie-router/node.js", "../../../../../node_modules/hono/dist/middleware/cors/index.js", "../../../../../node_modules/hono/dist/middleware/logger/index.js", "../../../../../node_modules/hono/dist/utils/color.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/utils.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/rpc/codes.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/createProxy.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/error/getErrorShape.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/error/formatter.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/error/TRPCError.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/transformer.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/router.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/tracked.ts", "../../../../../node_modules/@trpc/server/src/observable/observable.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/parseConnectionParams.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/contentType.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/abortError.ts", "../../../../../node_modules/@trpc/server/src/vendor/is-plain-object.ts", "../../../../../node_modules/@trpc/server/src/vendor/unpromise/unpromise.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/disposable.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/timerResource.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/createDeferred.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/mergeAsyncIterables.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/readableStreamFrom.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/withPing.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/jsonl.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/sse.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/resolveResponse.ts", "../../../../../node_modules/@trpc/server/src/adapters/fetch/fetchRequestHandler.ts", "../../../../../node_modules/hono/dist/helper/route/index.js", "../../../../../node_modules/@hono/trpc-server/src/index.ts", "../../../src/dbService.ts", "../../../src/sqliteImporter.ts", "../../../../../packages/db_helper_sqlite/index.ts", "../../../../../packages/db_helper_sqlite/src/db/db_index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/d1/driver.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/d1/session.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/banner.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/complaint.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/const.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/coupon.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/order.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/product.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/slots.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/staff-user.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/store.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/user.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/vendor-snippets.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/address.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/banners.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/cart.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/complaint.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/stores.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/product.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/slots.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/payments.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/auth.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/coupon.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/user.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/order.ts", "../../../../../packages/db_helper_sqlite/src/stores/store-helpers.ts", "../../../../../packages/db_helper_sqlite/src/lib/automated-jobs.ts", "../../../../../packages/db_helper_sqlite/src/lib/health-check.ts", "../../../../../packages/db_helper_sqlite/src/lib/delete-orders.ts", "../../../../../packages/db_helper_sqlite/src/helper_methods/upload-url.ts", "../../../../../packages/db_helper_sqlite/src/lib/seed.ts", "../../../src/main-router.ts", "../../../src/v1-router.ts", "../../../src/apis/admin-apis/apis/av-router.ts", "../../../src/middleware/staff-auth.ts", "../../../../../node_modules/jose/dist/webapi/index.js", "../../../../../node_modules/jose/dist/webapi/util/base64url.js", "../../../../../node_modules/jose/dist/webapi/lib/buffer_utils.js", "../../../../../node_modules/jose/dist/webapi/lib/base64.js", "../../../../../node_modules/jose/dist/webapi/lib/crypto_key.js", "../../../../../node_modules/jose/dist/webapi/lib/invalid_key_input.js", "../../../../../node_modules/jose/dist/webapi/util/errors.js", "../../../../../node_modules/jose/dist/webapi/lib/is_key_like.js", "../../../../../node_modules/jose/dist/webapi/lib/helpers.js", "../../../../../node_modules/jose/dist/webapi/lib/type_checks.js", "../../../../../node_modules/jose/dist/webapi/lib/signing.js", "../../../../../node_modules/jose/dist/webapi/lib/normalize_key.js", "../../../../../node_modules/jose/dist/webapi/lib/jwk_to_key.js", "../../../../../node_modules/jose/dist/webapi/lib/validate_crit.js", "../../../../../node_modules/jose/dist/webapi/lib/validate_algorithms.js", "../../../../../node_modules/jose/dist/webapi/lib/check_key_type.js", "../../../../../node_modules/jose/dist/webapi/jws/compact/verify.js", "../../../../../node_modules/jose/dist/webapi/jws/flattened/verify.js", "../../../../../node_modules/jose/dist/webapi/jwt/verify.js", "../../../../../node_modules/jose/dist/webapi/lib/jwt_claims_set.js", "../../../../../node_modules/jose/dist/webapi/jws/compact/sign.js", "../../../../../node_modules/jose/dist/webapi/jws/flattened/sign.js", "../../../../../node_modules/jose/dist/webapi/jwt/sign.js", "../../../src/lib/api-error.ts", "../../../src/lib/env-exporter.ts", "../../../src/apis/common-apis/apis/common.router.ts", "../../../src/apis/common-apis/apis/common-product.router.ts", "../../../src/apis/common-apis/apis/common-product.controller.ts", "../../../src/lib/s3-client.ts", "../../../../../node_modules/@smithy/types/dist-es/middleware.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/httpRequest.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/httpResponse.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/constants.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsMiddleware.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js", "../../../../../node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js", "../../../../../node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js", "../../../../../node_modules/@smithy/util-base64/dist-es/constants.browser.js", "../../../../../node_modules/@smithy/util-base64/dist-es/toBase64.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/checksum/ChecksumStream.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/checksum/createChecksumStream.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/stream-type-check.js", "../../../../../node_modules/@smithy/util-stream/dist-es/createBufferedReadableStream.js", "../../../../../node_modules/@smithy/util-stream/dist-es/ByteArrayCollector.js", "../../../../../node_modules/@smithy/util-stream/dist-es/headStream.browser.js", "../../../../../node_modules/@smithy/querystring-builder/dist-es/index.js", "../../../../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri.js", "../../../../../node_modules/@smithy/util-hex-encoding/dist-es/index.js", "../../../../../node_modules/@smithy/util-stream/dist-es/splitStream.browser.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/deref.js", "../../../../../node_modules/@smithy/url-parser/dist-es/index.js", "../../../../../node_modules/@smithy/querystring-parser/dist-es/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js", "../../../../../node_modules/@smithy/core/dist-es/setFeature.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/SignatureV4.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/constants.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js", "../../../../../node_modules/@smithy/is-array-buffer/dist-es/index.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/headerUtil.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/prepareRequest.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/utilDate.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/signature-v4a-container.js", "../../../../../node_modules/@smithy/middleware-stack/dist-es/MiddlewareStack.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/command.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/schemaLogFilter.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/exceptions.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmForRequest.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumLocationName.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeader.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeaderWithPrefix.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isStreaming.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/selectChecksumAlgorithmFunction.js", "../../../../../node_modules/@aws-crypto/crc32c/src/index.ts", "../../../../../node_modules/tslib/tslib.es6.mjs", "../../../../../node_modules/@aws-crypto/util/src/index.ts", "../../../../../node_modules/@aws-crypto/util/src/convertToBuffer.ts", "../../../../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/index.js", "../../../../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js", "../../../../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js", "../../../../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js", "../../../../../node_modules/@aws-crypto/util/src/isEmptyData.ts", "../../../../../node_modules/@aws-crypto/util/src/numToUint8.ts", "../../../../../node_modules/@aws-crypto/util/src/uint32ArrayFrom.ts", "../../../../../node_modules/@aws-crypto/crc32c/src/aws_crc32c.ts", "../../../../../node_modules/@aws-sdk/crc64-nvme/dist-es/index.js", "../../../../../node_modules/@aws-sdk/crc64-nvme/dist-es/Crc64Nvme.js", "../../../../../node_modules/@aws-sdk/crc64-nvme/dist-es/crc64-nvme-crt-container.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getCrc32ChecksumAlgorithmFunction.browser.js", "../../../../../node_modules/@aws-crypto/crc32/src/aws_crc32.ts", "../../../../../node_modules/@aws-crypto/crc32/src/index.ts", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/types.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/stringHasher.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getFlexibleChecksumsPlugin.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsInputMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsResponseMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmListForResponse.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isChecksumWithPartNumber.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/validateChecksumFromResponse.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksum.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/check-content-length-header.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-expires-middleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/index.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/SignatureV4S3Express.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/constants.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/s3.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.browser.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js", "../../../../../node_modules/@smithy/middleware-serde/dist-es/serdePlugin.js", "../../../../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4MultiRegion.js", "../../../../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/signature-v4-crt-container.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/errors.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js", "../../../../../node_modules/@aws-sdk/middleware-ssec/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectCommand.js", "../../../../../node_modules/@aws-sdk/s3-request-presigner/dist-es/getSignedUrl.js", "../../../../../node_modules/@aws-sdk/util-format-url/dist-es/index.js", "../../../../../node_modules/@aws-sdk/s3-request-presigner/dist-es/presigner.js", "../../../../../node_modules/@aws-sdk/s3-request-presigner/dist-es/constants.js", "../../../src/trpc/apis/common-apis/common.ts", "../../../src/trpc/trpc-index.ts", "../../../../../node_modules/@trpc/server/dist/index.mjs", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/middleware.ts", "../../../../../node_modules/@trpc/server/src/vendor/standard-schema-v1/error.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/parser.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/procedureBuilder.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/rootConfig.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/initTRPC.ts", "../../../src/stores/product-store.ts", "../../../src/stores/product-tag-store.ts", "../../../src/test-controller.ts", "../../../src/middleware/auth.middleware.ts", "../../../src/trpc/router.ts", "../../../../../node_modules/zod/index.js", "../../../../../node_modules/zod/v4/classic/external.js", "../../../../../node_modules/zod/v4/core/index.js", "../../../../../node_modules/zod/v4/core/core.js", "../../../../../node_modules/zod/v4/core/parse.js", "../../../../../node_modules/zod/v4/core/errors.js", "../../../../../node_modules/zod/v4/core/util.js", "../../../../../node_modules/zod/v4/core/schemas.js", "../../../../../node_modules/zod/v4/core/checks.js", "../../../../../node_modules/zod/v4/core/regexes.js", "../../../../../node_modules/zod/v4/core/doc.js", "../../../../../node_modules/zod/v4/core/versions.js", "../../../../../node_modules/zod/v4/locales/index.js", "../../../../../node_modules/zod/v4/locales/ar.js", "../../../../../node_modules/zod/v4/locales/az.js", "../../../../../node_modules/zod/v4/locales/be.js", "../../../../../node_modules/zod/v4/locales/bg.js", "../../../../../node_modules/zod/v4/locales/ca.js", "../../../../../node_modules/zod/v4/locales/cs.js", "../../../../../node_modules/zod/v4/locales/da.js", "../../../../../node_modules/zod/v4/locales/de.js", "../../../../../node_modules/zod/v4/locales/en.js", "../../../../../node_modules/zod/v4/locales/eo.js", "../../../../../node_modules/zod/v4/locales/es.js", "../../../../../node_modules/zod/v4/locales/fa.js", "../../../../../node_modules/zod/v4/locales/fi.js", "../../../../../node_modules/zod/v4/locales/fr.js", "../../../../../node_modules/zod/v4/locales/fr-CA.js", "../../../../../node_modules/zod/v4/locales/he.js", "../../../../../node_modules/zod/v4/locales/hu.js", "../../../../../node_modules/zod/v4/locales/hy.js", "../../../../../node_modules/zod/v4/locales/id.js", "../../../../../node_modules/zod/v4/locales/is.js", "../../../../../node_modules/zod/v4/locales/it.js", "../../../../../node_modules/zod/v4/locales/ja.js", "../../../../../node_modules/zod/v4/locales/ka.js", "../../../../../node_modules/zod/v4/locales/kh.js", "../../../../../node_modules/zod/v4/locales/km.js", "../../../../../node_modules/zod/v4/locales/ko.js", "../../../../../node_modules/zod/v4/locales/lt.js", "../../../../../node_modules/zod/v4/locales/mk.js", "../../../../../node_modules/zod/v4/locales/ms.js", "../../../../../node_modules/zod/v4/locales/nl.js", "../../../../../node_modules/zod/v4/locales/no.js", "../../../../../node_modules/zod/v4/locales/ota.js", "../../../../../node_modules/zod/v4/locales/ps.js", "../../../../../node_modules/zod/v4/locales/pl.js", "../../../../../node_modules/zod/v4/locales/pt.js", "../../../../../node_modules/zod/v4/locales/ru.js", "../../../../../node_modules/zod/v4/locales/sl.js", "../../../../../node_modules/zod/v4/locales/sv.js", "../../../../../node_modules/zod/v4/locales/ta.js", "../../../../../node_modules/zod/v4/locales/th.js", "../../../../../node_modules/zod/v4/locales/tr.js", "../../../../../node_modules/zod/v4/locales/ua.js", "../../../../../node_modules/zod/v4/locales/uk.js", "../../../../../node_modules/zod/v4/locales/ur.js", "../../../../../node_modules/zod/v4/locales/uz.js", "../../../../../node_modules/zod/v4/locales/vi.js", "../../../../../node_modules/zod/v4/locales/zh-CN.js", "../../../../../node_modules/zod/v4/locales/zh-TW.js", "../../../../../node_modules/zod/v4/locales/yo.js", "../../../../../node_modules/zod/v4/core/registries.js", "../../../../../node_modules/zod/v4/core/api.js", "../../../../../node_modules/zod/v4/core/to-json-schema.js", "../../../../../node_modules/zod/v4/core/json-schema-processors.js", "../../../../../node_modules/zod/v4/core/json-schema-generator.js", "../../../../../node_modules/zod/v4/core/json-schema.js", "../../../../../node_modules/zod/v4/classic/schemas.js", "../../../../../node_modules/zod/v4/classic/checks.js", "../../../../../node_modules/zod/v4/classic/iso.js", "../../../../../node_modules/zod/v4/classic/parse.js", "../../../../../node_modules/zod/v4/classic/errors.js", "../../../../../node_modules/zod/v4/classic/compat.js", "../../../../../node_modules/zod/v4/classic/from-json-schema.js", "../../../../../node_modules/zod/v4/classic/coerce.js", "../../../src/trpc/apis/admin-apis/apis/admin-trpc-index.ts", "../../../src/trpc/apis/admin-apis/apis/complaint.ts", "../../../src/trpc/apis/admin-apis/apis/coupon.ts", "../../../src/trpc/apis/admin-apis/apis/order.ts", "../../../src/lib/notif-job.ts", "../../../../../node_modules/bullmq/src/index.ts", "../../../../../node_modules/bullmq/src/classes/index.ts", "../../../../../node_modules/bullmq/src/classes/async-fifo-queue.ts", "../../../../../node_modules/bullmq/src/classes/backoffs.ts", "../../../../../node_modules/bullmq/src/classes/child.ts", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/child_process.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/worker_threads.mjs", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/unenv/dist/runtime/node/internal/worker_threads/worker.mjs", "../../../../../node_modules/bullmq/src/enums/index.ts", "../../../../../node_modules/bullmq/src/enums/child-command.ts", "../../../../../node_modules/bullmq/src/enums/error-code.ts", "../../../../../node_modules/bullmq/src/enums/parent-command.ts", "../../../../../node_modules/bullmq/src/enums/metrics-time.ts", "../../../../../node_modules/bullmq/src/enums/telemetry-attributes.ts", "../../../../../node_modules/bullmq/src/classes/child-pool.ts", "../../../../../node_modules/bullmq/src/classes/child-processor.ts", "../../../../../node_modules/bullmq/src/utils/index.ts", "../../../../../node_modules/bullmq/src/classes/errors/index.ts", "../../../../../node_modules/bullmq/src/classes/errors/delayed-error.ts", "../../../../../node_modules/bullmq/src/classes/errors/rate-limit-error.ts", "../../../../../node_modules/bullmq/src/classes/errors/unrecoverable-error.ts", "../../../../../node_modules/bullmq/src/classes/errors/waiting-children-error.ts", "../../../../../node_modules/bullmq/src/classes/errors/waiting-error.ts", "../../../../../node_modules/bullmq/src/classes/flow-producer.ts", "../../../../../node_modules/uuid/dist/esm-browser/index.js", "../../../../../node_modules/uuid/dist/esm-browser/rng.js", "../../../../../node_modules/uuid/dist/esm-browser/bytesToUuid.js", "../../../../../node_modules/uuid/dist/esm-browser/v4.js", "../../../../../node_modules/bullmq/src/classes/job.ts", "../../../../../node_modules/bullmq/src/utils/create-scripts.ts", "../../../../../node_modules/bullmq/src/classes/scripts.ts", "../../../../../node_modules/msgpackr/index.js", "../../../../../node_modules/msgpackr/pack.js", "../../../../../node_modules/msgpackr/unpack.js", "../../../../../node_modules/msgpackr/iterators.js", "../../../../../node_modules/bullmq/src/version.ts", "../../../../../node_modules/bullmq/src/classes/queue-keys.ts", "../../../../../node_modules/bullmq/src/classes/redis-connection.ts", "../../../../../node_modules/bullmq/src/scripts/index.ts", "../../../../../node_modules/bullmq/src/scripts/addDelayedJob-6.ts", "../../../../../node_modules/bullmq/src/scripts/addJobScheduler-11.ts", "../../../../../node_modules/bullmq/src/scripts/addLog-2.ts", "../../../../../node_modules/bullmq/src/scripts/addParentJob-6.ts", "../../../../../node_modules/bullmq/src/scripts/addPrioritizedJob-9.ts", "../../../../../node_modules/bullmq/src/scripts/addRepeatableJob-2.ts", "../../../../../node_modules/bullmq/src/scripts/addStandardJob-9.ts", "../../../../../node_modules/bullmq/src/scripts/changeDelay-4.ts", "../../../../../node_modules/bullmq/src/scripts/changePriority-7.ts", "../../../../../node_modules/bullmq/src/scripts/cleanJobsInSet-3.ts", "../../../../../node_modules/bullmq/src/scripts/drain-5.ts", "../../../../../node_modules/bullmq/src/scripts/extendLock-2.ts", "../../../../../node_modules/bullmq/src/scripts/extendLocks-1.ts", "../../../../../node_modules/bullmq/src/scripts/getCounts-1.ts", "../../../../../node_modules/bullmq/src/scripts/getCountsPerPriority-4.ts", "../../../../../node_modules/bullmq/src/scripts/getDependencyCounts-4.ts", "../../../../../node_modules/bullmq/src/scripts/getJobScheduler-1.ts", "../../../../../node_modules/bullmq/src/scripts/getMetrics-2.ts", "../../../../../node_modules/bullmq/src/scripts/getRanges-1.ts", "../../../../../node_modules/bullmq/src/scripts/getRateLimitTtl-2.ts", "../../../../../node_modules/bullmq/src/scripts/getState-8.ts", "../../../../../node_modules/bullmq/src/scripts/getStateV2-8.ts", "../../../../../node_modules/bullmq/src/scripts/isFinished-3.ts", "../../../../../node_modules/bullmq/src/scripts/isJobInList-1.ts", "../../../../../node_modules/bullmq/src/scripts/isMaxed-2.ts", "../../../../../node_modules/bullmq/src/scripts/moveJobFromActiveToWait-9.ts", "../../../../../node_modules/bullmq/src/scripts/moveJobsToWait-8.ts", "../../../../../node_modules/bullmq/src/scripts/moveStalledJobsToWait-8.ts", "../../../../../node_modules/bullmq/src/scripts/moveToActive-11.ts", "../../../../../node_modules/bullmq/src/scripts/moveToDelayed-8.ts", "../../../../../node_modules/bullmq/src/scripts/moveToFinished-14.ts", "../../../../../node_modules/bullmq/src/scripts/moveToWaitingChildren-7.ts", "../../../../../node_modules/bullmq/src/scripts/obliterate-2.ts", "../../../../../node_modules/bullmq/src/scripts/paginate-1.ts", "../../../../../node_modules/bullmq/src/scripts/pause-7.ts", "../../../../../node_modules/bullmq/src/scripts/promote-9.ts", "../../../../../node_modules/bullmq/src/scripts/releaseLock-1.ts", "../../../../../node_modules/bullmq/src/scripts/removeChildDependency-1.ts", "../../../../../node_modules/bullmq/src/scripts/removeDeduplicationKey-1.ts", "../../../../../node_modules/bullmq/src/scripts/removeJob-2.ts", "../../../../../node_modules/bullmq/src/scripts/removeJobScheduler-3.ts", "../../../../../node_modules/bullmq/src/scripts/removeOrphanedJobs-1.ts", "../../../../../node_modules/bullmq/src/scripts/removeRepeatable-3.ts", "../../../../../node_modules/bullmq/src/scripts/removeUnprocessedChildren-2.ts", "../../../../../node_modules/bullmq/src/scripts/reprocessJob-8.ts", "../../../../../node_modules/bullmq/src/scripts/retryJob-11.ts", "../../../../../node_modules/bullmq/src/scripts/saveStacktrace-1.ts", "../../../../../node_modules/bullmq/src/scripts/updateData-1.ts", "../../../../../node_modules/bullmq/src/scripts/updateJobScheduler-12.ts", "../../../../../node_modules/bullmq/src/scripts/updateProgress-3.ts", "../../../../../node_modules/bullmq/src/scripts/updateRepeatableJobMillis-1.ts", "../../../../../node_modules/bullmq/src/classes/job-scheduler.ts", "../../../../../node_modules/bullmq/src/classes/queue-base.ts", "../../../../../node_modules/bullmq/src/classes/lock-manager.ts", "../../../../../node_modules/bullmq/src/classes/queue-getters.ts", "../../../../../node_modules/bullmq/src/classes/queue.ts", "../../../../../node_modules/bullmq/src/classes/repeat.ts", "../../../../../node_modules/bullmq/src/classes/sandbox.ts", "../../../../../node_modules/bullmq/src/classes/worker.ts", "../../../../../node_modules/bullmq/src/interfaces/index.ts", "../../../../../node_modules/bullmq/dist/esm/interfaces/advanced-options.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/backoff-options.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/base-job-options.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/child-message.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/connection.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/flow-job.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/ioredis-events.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/job-json.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/job-scheduler-json.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/lock-manager-worker-context.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/metrics-options.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/metrics.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/minimal-job.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/minimal-queue.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/parent-message.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/parent.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/parent-options.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/queue-meta.js", "../../../../../node_modules/bullmq/src/interfaces/queue-options.ts", "../../../../../node_modules/bullmq/dist/esm/interfaces/rate-limiter-options.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/redis-options.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/redis-streams.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/repeatable-job.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/repeatable-options.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/repeat-options.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/retry-options.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/script-queue-context.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/sandboxed-job-processor.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/sandboxed-job.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/sandboxed-options.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/worker-options.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/telemetry.js", "../../../../../node_modules/bullmq/dist/esm/interfaces/receiver.js", "../../../../../node_modules/bullmq/src/types/index.ts", "../../../../../node_modules/bullmq/dist/esm/types/backoff-strategy.js", "../../../../../node_modules/bullmq/dist/esm/types/database-type.js", "../../../../../node_modules/bullmq/dist/esm/types/deduplication-options.js", "../../../../../node_modules/bullmq/dist/esm/types/finished-status.js", "../../../../../node_modules/bullmq/dist/esm/types/job-json-sandbox.js", "../../../../../node_modules/bullmq/dist/esm/types/job-options.js", "../../../../../node_modules/bullmq/dist/esm/types/job-scheduler-template-options.js", "../../../../../node_modules/bullmq/dist/esm/types/job-type.js", "../../../../../node_modules/bullmq/dist/esm/types/job-progress.js", "../../../../../node_modules/bullmq/dist/esm/types/repeat-strategy.js", "../../../../../node_modules/bullmq/dist/esm/types/keep-jobs.js", "../../../../../node_modules/bullmq/dist/esm/types/processor.js", "../../../src/lib/const-strings.ts", "../../../src/lib/post-order-handler.ts", "../../../src/lib/redis-client.ts", "../../../src/lib/telegram-service.ts", "../../../../../node_modules/axios/index.js", "../../../../../node_modules/axios/lib/axios.js", "../../../../../node_modules/axios/lib/utils.js", "../../../../../node_modules/axios/lib/helpers/bind.js", "../../../../../node_modules/axios/lib/core/Axios.js", "../../../../../node_modules/axios/lib/helpers/buildURL.js", "../../../../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js", "../../../../../node_modules/axios/lib/helpers/toFormData.js", "../../../../../node_modules/axios/lib/core/AxiosError.js", "../../../../../node_modules/axios/lib/helpers/null.js", "../../../../../node_modules/axios/lib/core/InterceptorManager.js", "../../../../../node_modules/axios/lib/core/dispatchRequest.js", "../../../../../node_modules/axios/lib/core/transformData.js", "../../../../../node_modules/axios/lib/defaults/index.js", "../../../../../node_modules/axios/lib/defaults/transitional.js", "../../../../../node_modules/axios/lib/helpers/toURLEncodedForm.js", "../../../../../node_modules/axios/lib/platform/index.js", "../../../../../node_modules/axios/lib/platform/browser/index.js", "../../../../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js", "../../../../../node_modules/axios/lib/platform/browser/classes/FormData.js", "../../../../../node_modules/axios/lib/platform/browser/classes/Blob.js", "../../../../../node_modules/axios/lib/platform/common/utils.js", "../../../../../node_modules/axios/lib/helpers/formDataToJSON.js", "../../../../../node_modules/axios/lib/core/AxiosHeaders.js", "../../../../../node_modules/axios/lib/helpers/parseHeaders.js", "../../../../../node_modules/axios/lib/cancel/isCancel.js", "../../../../../node_modules/axios/lib/cancel/CanceledError.js", "../../../../../node_modules/axios/lib/adapters/adapters.js", "../../../../../node_modules/axios/lib/adapters/xhr.js", "../../../../../node_modules/axios/lib/core/settle.js", "../../../../../node_modules/axios/lib/helpers/parseProtocol.js", "../../../../../node_modules/axios/lib/helpers/progressEventReducer.js", "../../../../../node_modules/axios/lib/helpers/speedometer.js", "../../../../../node_modules/axios/lib/helpers/throttle.js", "../../../../../node_modules/axios/lib/helpers/resolveConfig.js", "../../../../../node_modules/axios/lib/helpers/isURLSameOrigin.js", "../../../../../node_modules/axios/lib/helpers/cookies.js", "../../../../../node_modules/axios/lib/core/buildFullPath.js", "../../../../../node_modules/axios/lib/helpers/isAbsoluteURL.js", "../../../../../node_modules/axios/lib/helpers/combineURLs.js", "../../../../../node_modules/axios/lib/core/mergeConfig.js", "../../../../../node_modules/axios/lib/adapters/fetch.js", "../../../../../node_modules/axios/lib/helpers/composeSignals.js", "../../../../../node_modules/axios/lib/helpers/trackStream.js", "../../../../../node_modules/axios/lib/helpers/validator.js", "../../../../../node_modules/axios/lib/env/data.js", "../../../../../node_modules/axios/lib/cancel/CancelToken.js", "../../../../../node_modules/axios/lib/helpers/spread.js", "../../../../../node_modules/axios/lib/helpers/isAxiosError.js", "../../../../../node_modules/axios/lib/helpers/HttpStatusCode.js", "../../../src/stores/user-negativity-store.ts", "../../../src/trpc/apis/admin-apis/apis/vendor-snippets.ts", "../../../src/trpc/apis/admin-apis/apis/slots.ts", "../../../src/stores/store-initializer.ts", "../../../src/lib/roles-manager.ts", "../../../src/lib/const-store.ts", "../../../src/lib/const-keys.ts", "../../../src/stores/slot-store.ts", "../../../src/stores/banner-store.ts", "../../../src/lib/cloud_cache.ts", "../../../src/trpc/apis/common-apis/common-trpc-index.ts", "../../../../../node_modules/@turf/helpers/index.ts", "../../../../../node_modules/@turf/invariant/index.ts", "../../../../../node_modules/point-in-polygon-hao/dist/esm/index.js", "../../../../../node_modules/robust-predicates/index.js", "../../../../../node_modules/robust-predicates/esm/orient2d.js", "../../../../../node_modules/robust-predicates/esm/util.js", "../../../../../node_modules/robust-predicates/esm/orient3d.js", "../../../../../node_modules/robust-predicates/esm/incircle.js", "../../../../../node_modules/robust-predicates/esm/insphere.js", "../../../../../node_modules/@turf/boolean-point-in-polygon/index.ts", "../../../src/lib/mbnr-geojson.ts", "../../../src/trpc/apis/user-apis/apis/stores.ts", "../../../src/trpc/apis/user-apis/apis/slots.ts", "../../../src/trpc/apis/user-apis/apis/banners.ts", "../../../../../packages/shared/index.ts", "../../../../../packages/shared/types/index.ts", "../../../src/lib/retry.ts", "../../../src/trpc/apis/admin-apis/apis/product.ts", "../../../src/trpc/apis/admin-apis/apis/staff-user.ts", "../../../../../node_modules/bcryptjs/index.js", "../../../src/trpc/apis/admin-apis/apis/store.ts", "../../../src/trpc/apis/admin-apis/apis/payments.ts", "../../../src/trpc/apis/admin-apis/apis/banner.ts", "../../../src/trpc/apis/admin-apis/apis/user.ts", "../../../src/trpc/apis/admin-apis/apis/const.ts", "../../../src/trpc/apis/user-apis/apis/user-trpc-index.ts", "../../../src/trpc/apis/user-apis/apis/address.ts", "../../../src/lib/license-util.ts", "../../../src/trpc/apis/user-apis/apis/auth.ts", "../../../src/lib/otp-utils.ts", "../../../src/trpc/apis/user-apis/apis/cart.ts", "../../../src/trpc/apis/user-apis/apis/complaint.ts", "../../../src/trpc/apis/user-apis/apis/order.ts", "../../../src/trpc/apis/user-apis/apis/product.ts", "../../../src/trpc/apis/user-apis/apis/user.ts", "../../../src/trpc/apis/user-apis/apis/coupon.ts", "../../../src/trpc/apis/user-apis/apis/payments.ts", "../../../src/lib/payments-utils.ts", "../../../src/trpc/apis/user-apis/apis/file-upload.ts", "../../../src/trpc/apis/user-apis/apis/tags.ts", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts", "../../../../../../../../../private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/templates/middleware/common.ts"], + "sourceRoot": "/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/dev-4RTD5h", + "sourcesContent": ["/* @__NO_SIDE_EFFECTS__ */\nexport function rawHeaders(headers) {\n\tconst rawHeaders = [];\n\tfor (const key in headers) {\n\t\tif (Array.isArray(headers[key])) {\n\t\t\tfor (const h of headers[key]) {\n\t\t\t\trawHeaders.push(key, h);\n\t\t\t}\n\t\t} else {\n\t\t\trawHeaders.push(key, headers[key]);\n\t\t}\n\t}\n\treturn rawHeaders;\n}\n/* @__NO_SIDE_EFFECTS__ */\nexport function mergeFns(...functions) {\n\treturn function(...args) {\n\t\tfor (const fn of functions) {\n\t\t\tfn(...args);\n\t\t}\n\t};\n}\n/* @__NO_SIDE_EFFECTS__ */\nexport function createNotImplementedError(name) {\n\treturn new Error(`[unenv] ${name} is not implemented yet!`);\n}\n/* @__NO_SIDE_EFFECTS__ */\nexport function notImplemented(name) {\n\tconst fn = () => {\n\t\tthrow createNotImplementedError(name);\n\t};\n\treturn Object.assign(fn, { __unenv__: true });\n}\n/* @__NO_SIDE_EFFECTS__ */\nexport function notImplementedAsync(name) {\n\tconst fn = notImplemented(name);\n\tfn.__promisify__ = () => notImplemented(name + \".__promisify__\");\n\tfn.native = fn;\n\treturn fn;\n}\n/* @__NO_SIDE_EFFECTS__ */\nexport function notImplementedClass(name) {\n\treturn class {\n\t\t__unenv__ = true;\n\t\tconstructor() {\n\t\t\tthrow new Error(`[unenv] ${name} is not implemented yet!`);\n\t\t}\n\t};\n}\n", "import { createNotImplementedError } from \"../../../_internal/utils.mjs\";\nconst _timeOrigin = globalThis.performance?.timeOrigin ?? Date.now();\nconst _performanceNow = globalThis.performance?.now ? globalThis.performance.now.bind(globalThis.performance) : () => Date.now() - _timeOrigin;\nconst nodeTiming = {\n\tname: \"node\",\n\tentryType: \"node\",\n\tstartTime: 0,\n\tduration: 0,\n\tnodeStart: 0,\n\tv8Start: 0,\n\tbootstrapComplete: 0,\n\tenvironment: 0,\n\tloopStart: 0,\n\tloopExit: 0,\n\tidleTime: 0,\n\tuvMetricsInfo: {\n\t\tloopCount: 0,\n\t\tevents: 0,\n\t\teventsWaiting: 0\n\t},\n\tdetail: undefined,\n\ttoJSON() {\n\t\treturn this;\n\t}\n};\n// PerformanceEntry\nexport class PerformanceEntry {\n\t__unenv__ = true;\n\tdetail;\n\tentryType = \"event\";\n\tname;\n\tstartTime;\n\tconstructor(name, options) {\n\t\tthis.name = name;\n\t\tthis.startTime = options?.startTime || _performanceNow();\n\t\tthis.detail = options?.detail;\n\t}\n\tget duration() {\n\t\treturn _performanceNow() - this.startTime;\n\t}\n\ttoJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tentryType: this.entryType,\n\t\t\tstartTime: this.startTime,\n\t\t\tduration: this.duration,\n\t\t\tdetail: this.detail\n\t\t};\n\t}\n}\n// PerformanceMark\nexport const PerformanceMark = class PerformanceMark extends PerformanceEntry {\n\tentryType = \"mark\";\n\tconstructor() {\n\t\t// @ts-ignore\n\t\tsuper(...arguments);\n\t}\n\tget duration() {\n\t\treturn 0;\n\t}\n};\n// PerformanceMark\nexport class PerformanceMeasure extends PerformanceEntry {\n\tentryType = \"measure\";\n}\n// PerformanceResourceTiming\nexport class PerformanceResourceTiming extends PerformanceEntry {\n\tentryType = \"resource\";\n\tserverTiming = [];\n\tconnectEnd = 0;\n\tconnectStart = 0;\n\tdecodedBodySize = 0;\n\tdomainLookupEnd = 0;\n\tdomainLookupStart = 0;\n\tencodedBodySize = 0;\n\tfetchStart = 0;\n\tinitiatorType = \"\";\n\tname = \"\";\n\tnextHopProtocol = \"\";\n\tredirectEnd = 0;\n\tredirectStart = 0;\n\trequestStart = 0;\n\tresponseEnd = 0;\n\tresponseStart = 0;\n\tsecureConnectionStart = 0;\n\tstartTime = 0;\n\ttransferSize = 0;\n\tworkerStart = 0;\n\tresponseStatus = 0;\n}\n// PerformanceObserverEntryList\nexport class PerformanceObserverEntryList {\n\t__unenv__ = true;\n\tgetEntries() {\n\t\treturn [];\n\t}\n\tgetEntriesByName(_name, _type) {\n\t\treturn [];\n\t}\n\tgetEntriesByType(type) {\n\t\treturn [];\n\t}\n}\n// Performance\nexport class Performance {\n\t__unenv__ = true;\n\ttimeOrigin = _timeOrigin;\n\teventCounts = new Map();\n\t_entries = [];\n\t_resourceTimingBufferSize = 0;\n\tnavigation = undefined;\n\ttiming = undefined;\n\ttimerify(_fn, _options) {\n\t\tthrow createNotImplementedError(\"Performance.timerify\");\n\t}\n\tget nodeTiming() {\n\t\treturn nodeTiming;\n\t}\n\teventLoopUtilization() {\n\t\treturn {};\n\t}\n\tmarkResourceTiming() {\n\t\t// TODO: create a new PerformanceResourceTiming entry\n\t\t// so that performance.getEntries, getEntriesByName, and getEntriesByType return it\n\t\t// see: https://nodejs.org/api/perf_hooks.html#performancemarkresourcetimingtiminginfo-requestedurl-initiatortype-global-cachemode-bodyinfo-responsestatus-deliverytype\n\t\treturn new PerformanceResourceTiming(\"\");\n\t}\n\tonresourcetimingbufferfull = null;\n\tnow() {\n\t\t// https://developer.mozilla.org/en-US/docs/Web/API/Performance/now\n\t\tif (this.timeOrigin === _timeOrigin) {\n\t\t\treturn _performanceNow();\n\t\t}\n\t\treturn Date.now() - this.timeOrigin;\n\t}\n\tclearMarks(markName) {\n\t\tthis._entries = markName ? this._entries.filter((e) => e.name !== markName) : this._entries.filter((e) => e.entryType !== \"mark\");\n\t}\n\tclearMeasures(measureName) {\n\t\tthis._entries = measureName ? this._entries.filter((e) => e.name !== measureName) : this._entries.filter((e) => e.entryType !== \"measure\");\n\t}\n\tclearResourceTimings() {\n\t\tthis._entries = this._entries.filter((e) => e.entryType !== \"resource\" || e.entryType !== \"navigation\");\n\t}\n\tgetEntries() {\n\t\treturn this._entries;\n\t}\n\tgetEntriesByName(name, type) {\n\t\treturn this._entries.filter((e) => e.name === name && (!type || e.entryType === type));\n\t}\n\tgetEntriesByType(type) {\n\t\treturn this._entries.filter((e) => e.entryType === type);\n\t}\n\tmark(name, options) {\n\t\t// @ts-expect-error constructor is not protected\n\t\tconst entry = new PerformanceMark(name, options);\n\t\tthis._entries.push(entry);\n\t\treturn entry;\n\t}\n\tmeasure(measureName, startOrMeasureOptions, endMark) {\n\t\tlet start;\n\t\tlet end;\n\t\tif (typeof startOrMeasureOptions === \"string\") {\n\t\t\tstart = this.getEntriesByName(startOrMeasureOptions, \"mark\")[0]?.startTime;\n\t\t\tend = this.getEntriesByName(endMark, \"mark\")[0]?.startTime;\n\t\t} else {\n\t\t\tstart = Number.parseFloat(startOrMeasureOptions?.start) || this.now();\n\t\t\tend = Number.parseFloat(startOrMeasureOptions?.end) || this.now();\n\t\t}\n\t\tconst entry = new PerformanceMeasure(measureName, {\n\t\t\tstartTime: start,\n\t\t\tdetail: {\n\t\t\t\tstart,\n\t\t\t\tend\n\t\t\t}\n\t\t});\n\t\tthis._entries.push(entry);\n\t\treturn entry;\n\t}\n\tsetResourceTimingBufferSize(maxSize) {\n\t\tthis._resourceTimingBufferSize = maxSize;\n\t}\n\taddEventListener(type, listener, options) {\n\t\tthrow createNotImplementedError(\"Performance.addEventListener\");\n\t}\n\tremoveEventListener(type, listener, options) {\n\t\tthrow createNotImplementedError(\"Performance.removeEventListener\");\n\t}\n\tdispatchEvent(event) {\n\t\tthrow createNotImplementedError(\"Performance.dispatchEvent\");\n\t}\n\ttoJSON() {\n\t\treturn this;\n\t}\n}\n// PerformanceObserver\nexport class PerformanceObserver {\n\t__unenv__ = true;\n\tstatic supportedEntryTypes = [];\n\t_callback = null;\n\tconstructor(callback) {\n\t\tthis._callback = callback;\n\t}\n\ttakeRecords() {\n\t\treturn [];\n\t}\n\tdisconnect() {\n\t\tthrow createNotImplementedError(\"PerformanceObserver.disconnect\");\n\t}\n\tobserve(options) {\n\t\tthrow createNotImplementedError(\"PerformanceObserver.observe\");\n\t}\n\tbind(fn) {\n\t\treturn fn;\n\t}\n\trunInAsyncScope(fn, thisArg, ...args) {\n\t\treturn fn.call(thisArg, ...args);\n\t}\n\tasyncId() {\n\t\treturn 0;\n\t}\n\ttriggerAsyncId() {\n\t\treturn 0;\n\t}\n\temitDestroy() {\n\t\treturn this;\n\t}\n}\n// workerd implements a subset of globalThis.performance (as of last check, only timeOrigin set to 0 + now() implemented)\n// We already use performance.now() from globalThis.performance, if provided (see top of this file)\n// If we detect this condition, we can just use polyfill instead.\nexport const performance = globalThis.performance && \"addEventListener\" in globalThis.performance ? globalThis.performance : new Performance();\n", "import { IntervalHistogram, RecordableHistogram } from \"./internal/perf_hooks/histogram.mjs\";\nimport { performance, Performance, PerformanceEntry, PerformanceMark, PerformanceMeasure, PerformanceObserverEntryList, PerformanceObserver, PerformanceResourceTiming } from \"./internal/perf_hooks/performance.mjs\";\nexport * from \"./internal/perf_hooks/performance.mjs\";\n// prettier-ignore\nimport { NODE_PERFORMANCE_GC_MAJOR, NODE_PERFORMANCE_GC_MINOR, NODE_PERFORMANCE_GC_INCREMENTAL, NODE_PERFORMANCE_GC_WEAKCB, NODE_PERFORMANCE_GC_FLAGS_NO, NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED, NODE_PERFORMANCE_GC_FLAGS_FORCED, NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING, NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE, NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY, NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE, NODE_PERFORMANCE_ENTRY_TYPE_GC, NODE_PERFORMANCE_ENTRY_TYPE_HTTP, NODE_PERFORMANCE_ENTRY_TYPE_HTTP2, NODE_PERFORMANCE_ENTRY_TYPE_NET, NODE_PERFORMANCE_ENTRY_TYPE_DNS, NODE_PERFORMANCE_MILESTONE_TIME_ORIGIN_TIMESTAMP, NODE_PERFORMANCE_MILESTONE_TIME_ORIGIN, NODE_PERFORMANCE_MILESTONE_ENVIRONMENT, NODE_PERFORMANCE_MILESTONE_NODE_START, NODE_PERFORMANCE_MILESTONE_V8_START, NODE_PERFORMANCE_MILESTONE_LOOP_START, NODE_PERFORMANCE_MILESTONE_LOOP_EXIT, NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE } from \"./internal/perf_hooks/constants.mjs\";\n// prettier-ignore\nexport const constants = {\n\tNODE_PERFORMANCE_GC_MAJOR,\n\tNODE_PERFORMANCE_GC_MINOR,\n\tNODE_PERFORMANCE_GC_INCREMENTAL,\n\tNODE_PERFORMANCE_GC_WEAKCB,\n\tNODE_PERFORMANCE_GC_FLAGS_NO,\n\tNODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED,\n\tNODE_PERFORMANCE_GC_FLAGS_FORCED,\n\tNODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING,\n\tNODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE,\n\tNODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY,\n\tNODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE,\n\tNODE_PERFORMANCE_ENTRY_TYPE_GC,\n\tNODE_PERFORMANCE_ENTRY_TYPE_HTTP,\n\tNODE_PERFORMANCE_ENTRY_TYPE_HTTP2,\n\tNODE_PERFORMANCE_ENTRY_TYPE_NET,\n\tNODE_PERFORMANCE_ENTRY_TYPE_DNS,\n\tNODE_PERFORMANCE_MILESTONE_TIME_ORIGIN_TIMESTAMP,\n\tNODE_PERFORMANCE_MILESTONE_TIME_ORIGIN,\n\tNODE_PERFORMANCE_MILESTONE_ENVIRONMENT,\n\tNODE_PERFORMANCE_MILESTONE_NODE_START,\n\tNODE_PERFORMANCE_MILESTONE_V8_START,\n\tNODE_PERFORMANCE_MILESTONE_LOOP_START,\n\tNODE_PERFORMANCE_MILESTONE_LOOP_EXIT,\n\tNODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE\n};\nexport const monitorEventLoopDelay = function(_options) {\n\treturn new IntervalHistogram();\n};\nexport const createHistogram = function(_options) {\n\treturn new RecordableHistogram();\n};\nexport default {\n\tPerformance,\n\tPerformanceMark,\n\tPerformanceEntry,\n\tPerformanceMeasure,\n\tPerformanceObserverEntryList,\n\tPerformanceObserver,\n\tPerformanceResourceTiming,\n\tperformance,\n\tconstants,\n\tcreateHistogram,\n\tmonitorEventLoopDelay\n};\n", "import {\n performance,\n Performance,\n PerformanceEntry,\n PerformanceMark,\n PerformanceMeasure,\n PerformanceObserver,\n PerformanceObserverEntryList,\n PerformanceResourceTiming\n} from \"node:perf_hooks\";\nif (!(\"__unenv__\" in performance)) {\n const proto = Performance.prototype;\n for (const key of Object.getOwnPropertyNames(proto)) {\n if (key !== \"constructor\" && !(key in performance)) {\n const desc = Object.getOwnPropertyDescriptor(proto, key);\n if (desc) {\n Object.defineProperty(performance, key, desc);\n }\n }\n }\n}\nglobalThis.performance = performance;\nglobalThis.Performance = Performance;\nglobalThis.PerformanceEntry = PerformanceEntry;\nglobalThis.PerformanceMark = PerformanceMark;\nglobalThis.PerformanceMeasure = PerformanceMeasure;\nglobalThis.PerformanceObserver = PerformanceObserver;\nglobalThis.PerformanceObserverEntryList = PerformanceObserverEntryList;\nglobalThis.PerformanceResourceTiming = PerformanceResourceTiming;\n", "export default Object.assign(() => {}, { __unenv__: true });\n", "import { Writable } from \"node:stream\";\nimport noop from \"../mock/noop.mjs\";\nimport { notImplemented, notImplementedClass } from \"../_internal/utils.mjs\";\nconst _console = globalThis.console;\n// undocumented public APIs\nexport const _ignoreErrors = true;\nexport const _stderr = new Writable();\nexport const _stdout = new Writable();\nexport const log = _console?.log ?? noop;\nexport const info = _console?.info ?? log;\nexport const trace = _console?.trace ?? info;\nexport const debug = _console?.debug ?? log;\nexport const table = _console?.table ?? log;\nexport const error = _console?.error ?? log;\nexport const warn = _console?.warn ?? error;\n// https://developer.chrome.com/docs/devtools/console/api#createtask\nexport const createTask = _console?.createTask ?? /* @__PURE__ */ notImplemented(\"console.createTask\");\nexport const assert = /* @__PURE__ */ notImplemented(\"console.assert\");\n// noop\nexport const clear = _console?.clear ?? noop;\nexport const count = _console?.count ?? noop;\nexport const countReset = _console?.countReset ?? noop;\nexport const dir = _console?.dir ?? noop;\nexport const dirxml = _console?.dirxml ?? noop;\nexport const group = _console?.group ?? noop;\nexport const groupEnd = _console?.groupEnd ?? noop;\nexport const groupCollapsed = _console?.groupCollapsed ?? noop;\nexport const profile = _console?.profile ?? noop;\nexport const profileEnd = _console?.profileEnd ?? noop;\nexport const time = _console?.time ?? noop;\nexport const timeEnd = _console?.timeEnd ?? noop;\nexport const timeLog = _console?.timeLog ?? noop;\nexport const timeStamp = _console?.timeStamp ?? noop;\nexport const Console = _console?.Console ?? /* @__PURE__ */ notImplementedClass(\"console.Console\");\nexport const _times = /* @__PURE__ */ new Map();\nexport function context() {\n\t// TODO: Should be Console with all the methods\n\treturn _console;\n}\nexport const _stdoutErrorHandler = noop;\nexport const _stderrErrorHandler = noop;\nexport default {\n\t_times,\n\t_ignoreErrors,\n\t_stdoutErrorHandler,\n\t_stderrErrorHandler,\n\t_stdout,\n\t_stderr,\n\tassert,\n\tclear,\n\tConsole,\n\tcount,\n\tcountReset,\n\tdebug,\n\tdir,\n\tdirxml,\n\terror,\n\tcontext,\n\tcreateTask,\n\tgroup,\n\tgroupEnd,\n\tgroupCollapsed,\n\tinfo,\n\tlog,\n\tprofile,\n\tprofileEnd,\n\ttable,\n\ttime,\n\ttimeEnd,\n\ttimeLog,\n\ttimeStamp,\n\ttrace,\n\twarn\n};\n", "import {\n _ignoreErrors,\n _stderr,\n _stderrErrorHandler,\n _stdout,\n _stdoutErrorHandler,\n _times,\n Console\n} from \"unenv/node/console\";\nexport {\n Console,\n _ignoreErrors,\n _stderr,\n _stderrErrorHandler,\n _stdout,\n _stdoutErrorHandler,\n _times\n} from \"unenv/node/console\";\nconst workerdConsole = globalThis[\"console\"];\nexport const {\n assert,\n clear,\n // @ts-expect-error undocumented public API\n context,\n count,\n countReset,\n // @ts-expect-error undocumented public API\n createTask,\n debug,\n dir,\n dirxml,\n error,\n group,\n groupCollapsed,\n groupEnd,\n info,\n log,\n profile,\n profileEnd,\n table,\n time,\n timeEnd,\n timeLog,\n timeStamp,\n trace,\n warn\n} = workerdConsole;\nObject.assign(workerdConsole, {\n Console,\n _ignoreErrors,\n _stderr,\n _stderrErrorHandler,\n _stdout,\n _stdoutErrorHandler,\n _times\n});\nexport default workerdConsole;\n", "import { default as defaultExport } from \"@cloudflare/unenv-preset/node/console\";\nglobalThis.console = defaultExport;", "// https://nodejs.org/api/process.html#processhrtime\nexport const hrtime = /* @__PURE__ */ Object.assign(function hrtime(startTime) {\n\tconst now = Date.now();\n\t// millis to seconds\n\tconst seconds = Math.trunc(now / 1e3);\n\t// convert millis to nanos\n\tconst nanos = now % 1e3 * 1e6;\n\tif (startTime) {\n\t\tlet diffSeconds = seconds - startTime[0];\n\t\tlet diffNanos = nanos - startTime[0];\n\t\tif (diffNanos < 0) {\n\t\t\tdiffSeconds = diffSeconds - 1;\n\t\t\tdiffNanos = 1e9 + diffNanos;\n\t\t}\n\t\treturn [diffSeconds, diffNanos];\n\t}\n\treturn [seconds, nanos];\n}, { bigint: function bigint() {\n\t// Convert milliseconds to nanoseconds\n\treturn BigInt(Date.now() * 1e6);\n} });\n", "export class ReadStream {\n\tfd;\n\tisRaw = false;\n\tisTTY = false;\n\tconstructor(fd) {\n\t\tthis.fd = fd;\n\t}\n\tsetRawMode(mode) {\n\t\tthis.isRaw = mode;\n\t\treturn this;\n\t}\n}\n", "export class WriteStream {\n\tfd;\n\tcolumns = 80;\n\trows = 24;\n\tisTTY = false;\n\tconstructor(fd) {\n\t\tthis.fd = fd;\n\t}\n\tclearLine(dir, callback) {\n\t\tcallback && callback();\n\t\treturn false;\n\t}\n\tclearScreenDown(callback) {\n\t\tcallback && callback();\n\t\treturn false;\n\t}\n\tcursorTo(x, y, callback) {\n\t\tcallback && typeof callback === \"function\" && callback();\n\t\treturn false;\n\t}\n\tmoveCursor(dx, dy, callback) {\n\t\tcallback && callback();\n\t\treturn false;\n\t}\n\tgetColorDepth(env) {\n\t\treturn 1;\n\t}\n\thasColors(count, env) {\n\t\treturn false;\n\t}\n\tgetWindowSize() {\n\t\treturn [this.columns, this.rows];\n\t}\n\twrite(str, encoding, cb) {\n\t\tif (str instanceof Uint8Array) {\n\t\t\tstr = new TextDecoder().decode(str);\n\t\t}\n\t\ttry {\n\t\t\tconsole.log(str);\n\t\t} catch {}\n\t\tcb && typeof cb === \"function\" && cb();\n\t\treturn false;\n\t}\n}\n", "import { ReadStream } from \"./internal/tty/read-stream.mjs\";\nimport { WriteStream } from \"./internal/tty/write-stream.mjs\";\nexport { ReadStream } from \"./internal/tty/read-stream.mjs\";\nexport { WriteStream } from \"./internal/tty/write-stream.mjs\";\nexport const isatty = function() {\n\treturn false;\n};\nexport default {\n\tReadStream,\n\tWriteStream,\n\tisatty\n};\n", "// Extracted from .nvmrc\nexport const NODE_VERSION = \"22.14.0\";\n", "import { EventEmitter } from \"node:events\";\nimport { ReadStream, WriteStream } from \"node:tty\";\nimport { notImplemented, createNotImplementedError } from \"../../../_internal/utils.mjs\";\n// node-version.ts is generated at build time\nimport { NODE_VERSION } from \"./node-version.mjs\";\nexport class Process extends EventEmitter {\n\tenv;\n\thrtime;\n\tnextTick;\n\tconstructor(impl) {\n\t\tsuper();\n\t\tthis.env = impl.env;\n\t\tthis.hrtime = impl.hrtime;\n\t\tthis.nextTick = impl.nextTick;\n\t\tfor (const prop of [...Object.getOwnPropertyNames(Process.prototype), ...Object.getOwnPropertyNames(EventEmitter.prototype)]) {\n\t\t\tconst value = this[prop];\n\t\t\tif (typeof value === \"function\") {\n\t\t\t\tthis[prop] = value.bind(this);\n\t\t\t}\n\t\t}\n\t}\n\t// --- event emitter ---\n\temitWarning(warning, type, code) {\n\t\tconsole.warn(`${code ? `[${code}] ` : \"\"}${type ? `${type}: ` : \"\"}${warning}`);\n\t}\n\temit(...args) {\n\t\t// @ts-ignore\n\t\treturn super.emit(...args);\n\t}\n\tlisteners(eventName) {\n\t\treturn super.listeners(eventName);\n\t}\n\t// --- stdio (lazy initializers) ---\n\t#stdin;\n\t#stdout;\n\t#stderr;\n\tget stdin() {\n\t\treturn this.#stdin ??= new ReadStream(0);\n\t}\n\tget stdout() {\n\t\treturn this.#stdout ??= new WriteStream(1);\n\t}\n\tget stderr() {\n\t\treturn this.#stderr ??= new WriteStream(2);\n\t}\n\t// --- cwd ---\n\t#cwd = \"/\";\n\tchdir(cwd) {\n\t\tthis.#cwd = cwd;\n\t}\n\tcwd() {\n\t\treturn this.#cwd;\n\t}\n\t// --- dummy props and getters ---\n\tarch = \"\";\n\tplatform = \"\";\n\targv = [];\n\targv0 = \"\";\n\texecArgv = [];\n\texecPath = \"\";\n\ttitle = \"\";\n\tpid = 200;\n\tppid = 100;\n\tget version() {\n\t\treturn `v${NODE_VERSION}`;\n\t}\n\tget versions() {\n\t\treturn { node: NODE_VERSION };\n\t}\n\tget allowedNodeEnvironmentFlags() {\n\t\treturn new Set();\n\t}\n\tget sourceMapsEnabled() {\n\t\treturn false;\n\t}\n\tget debugPort() {\n\t\treturn 0;\n\t}\n\tget throwDeprecation() {\n\t\treturn false;\n\t}\n\tget traceDeprecation() {\n\t\treturn false;\n\t}\n\tget features() {\n\t\treturn {};\n\t}\n\tget release() {\n\t\treturn {};\n\t}\n\tget connected() {\n\t\treturn false;\n\t}\n\tget config() {\n\t\treturn {};\n\t}\n\tget moduleLoadList() {\n\t\treturn [];\n\t}\n\tconstrainedMemory() {\n\t\treturn 0;\n\t}\n\tavailableMemory() {\n\t\treturn 0;\n\t}\n\tuptime() {\n\t\treturn 0;\n\t}\n\tresourceUsage() {\n\t\treturn {};\n\t}\n\t// --- noop methods ---\n\tref() {\n\t\t// noop\n\t}\n\tunref() {\n\t\t// noop\n\t}\n\t// --- unimplemented methods ---\n\tumask() {\n\t\tthrow createNotImplementedError(\"process.umask\");\n\t}\n\tgetBuiltinModule() {\n\t\treturn undefined;\n\t}\n\tgetActiveResourcesInfo() {\n\t\tthrow createNotImplementedError(\"process.getActiveResourcesInfo\");\n\t}\n\texit() {\n\t\tthrow createNotImplementedError(\"process.exit\");\n\t}\n\treallyExit() {\n\t\tthrow createNotImplementedError(\"process.reallyExit\");\n\t}\n\tkill() {\n\t\tthrow createNotImplementedError(\"process.kill\");\n\t}\n\tabort() {\n\t\tthrow createNotImplementedError(\"process.abort\");\n\t}\n\tdlopen() {\n\t\tthrow createNotImplementedError(\"process.dlopen\");\n\t}\n\tsetSourceMapsEnabled() {\n\t\tthrow createNotImplementedError(\"process.setSourceMapsEnabled\");\n\t}\n\tloadEnvFile() {\n\t\tthrow createNotImplementedError(\"process.loadEnvFile\");\n\t}\n\tdisconnect() {\n\t\tthrow createNotImplementedError(\"process.disconnect\");\n\t}\n\tcpuUsage() {\n\t\tthrow createNotImplementedError(\"process.cpuUsage\");\n\t}\n\tsetUncaughtExceptionCaptureCallback() {\n\t\tthrow createNotImplementedError(\"process.setUncaughtExceptionCaptureCallback\");\n\t}\n\thasUncaughtExceptionCaptureCallback() {\n\t\tthrow createNotImplementedError(\"process.hasUncaughtExceptionCaptureCallback\");\n\t}\n\tinitgroups() {\n\t\tthrow createNotImplementedError(\"process.initgroups\");\n\t}\n\topenStdin() {\n\t\tthrow createNotImplementedError(\"process.openStdin\");\n\t}\n\tassert() {\n\t\tthrow createNotImplementedError(\"process.assert\");\n\t}\n\tbinding() {\n\t\tthrow createNotImplementedError(\"process.binding\");\n\t}\n\t// --- attached interfaces ---\n\tpermission = { has: /* @__PURE__ */ notImplemented(\"process.permission.has\") };\n\treport = {\n\t\tdirectory: \"\",\n\t\tfilename: \"\",\n\t\tsignal: \"SIGUSR2\",\n\t\tcompact: false,\n\t\treportOnFatalError: false,\n\t\treportOnSignal: false,\n\t\treportOnUncaughtException: false,\n\t\tgetReport: /* @__PURE__ */ notImplemented(\"process.report.getReport\"),\n\t\twriteReport: /* @__PURE__ */ notImplemented(\"process.report.writeReport\")\n\t};\n\tfinalization = {\n\t\tregister: /* @__PURE__ */ notImplemented(\"process.finalization.register\"),\n\t\tunregister: /* @__PURE__ */ notImplemented(\"process.finalization.unregister\"),\n\t\tregisterBeforeExit: /* @__PURE__ */ notImplemented(\"process.finalization.registerBeforeExit\")\n\t};\n\tmemoryUsage = Object.assign(() => ({\n\t\tarrayBuffers: 0,\n\t\trss: 0,\n\t\texternal: 0,\n\t\theapTotal: 0,\n\t\theapUsed: 0\n\t}), { rss: () => 0 });\n\t// --- undefined props ---\n\tmainModule = undefined;\n\tdomain = undefined;\n\t// optional\n\tsend = undefined;\n\texitCode = undefined;\n\tchannel = undefined;\n\tgetegid = undefined;\n\tgeteuid = undefined;\n\tgetgid = undefined;\n\tgetgroups = undefined;\n\tgetuid = undefined;\n\tsetegid = undefined;\n\tseteuid = undefined;\n\tsetgid = undefined;\n\tsetgroups = undefined;\n\tsetuid = undefined;\n\t// internals\n\t_events = undefined;\n\t_eventsCount = undefined;\n\t_exiting = undefined;\n\t_maxListeners = undefined;\n\t_debugEnd = undefined;\n\t_debugProcess = undefined;\n\t_fatalException = undefined;\n\t_getActiveHandles = undefined;\n\t_getActiveRequests = undefined;\n\t_kill = undefined;\n\t_preload_modules = undefined;\n\t_rawDebug = undefined;\n\t_startProfilerIdleNotifier = undefined;\n\t_stopProfilerIdleNotifier = undefined;\n\t_tickCallback = undefined;\n\t_disconnect = undefined;\n\t_handleQueue = undefined;\n\t_pendingMessage = undefined;\n\t_channel = undefined;\n\t_send = undefined;\n\t_linkedBinding = undefined;\n}\n", "import { hrtime as UnenvHrTime } from \"unenv/node/internal/process/hrtime\";\nimport { Process as UnenvProcess } from \"unenv/node/internal/process/process\";\nconst globalProcess = globalThis[\"process\"];\nexport const getBuiltinModule = globalProcess.getBuiltinModule;\nconst workerdProcess = getBuiltinModule(\"node:process\");\nconst unenvProcess = new UnenvProcess({\n env: globalProcess.env,\n hrtime: UnenvHrTime,\n // `nextTick` is available from workerd process v1\n nextTick: workerdProcess.nextTick\n});\nexport const { exit, features, platform } = workerdProcess;\nexport const {\n _channel,\n _debugEnd,\n _debugProcess,\n _disconnect,\n _events,\n _eventsCount,\n _exiting,\n _fatalException,\n _getActiveHandles,\n _getActiveRequests,\n _handleQueue,\n _kill,\n _linkedBinding,\n _maxListeners,\n _pendingMessage,\n _preload_modules,\n _rawDebug,\n _send,\n _startProfilerIdleNotifier,\n _stopProfilerIdleNotifier,\n _tickCallback,\n abort,\n addListener,\n allowedNodeEnvironmentFlags,\n arch,\n argv,\n argv0,\n assert,\n availableMemory,\n binding,\n channel,\n chdir,\n config,\n connected,\n constrainedMemory,\n cpuUsage,\n cwd,\n debugPort,\n disconnect,\n dlopen,\n domain,\n emit,\n emitWarning,\n env,\n eventNames,\n execArgv,\n execPath,\n exitCode,\n finalization,\n getActiveResourcesInfo,\n getegid,\n geteuid,\n getgid,\n getgroups,\n getMaxListeners,\n getuid,\n hasUncaughtExceptionCaptureCallback,\n hrtime,\n initgroups,\n kill,\n listenerCount,\n listeners,\n loadEnvFile,\n mainModule,\n memoryUsage,\n moduleLoadList,\n nextTick,\n off,\n on,\n once,\n openStdin,\n permission,\n pid,\n ppid,\n prependListener,\n prependOnceListener,\n rawListeners,\n reallyExit,\n ref,\n release,\n removeAllListeners,\n removeListener,\n report,\n resourceUsage,\n send,\n setegid,\n seteuid,\n setgid,\n setgroups,\n setMaxListeners,\n setSourceMapsEnabled,\n setuid,\n setUncaughtExceptionCaptureCallback,\n sourceMapsEnabled,\n stderr,\n stdin,\n stdout,\n throwDeprecation,\n title,\n traceDeprecation,\n umask,\n unref,\n uptime,\n version,\n versions\n} = unenvProcess;\nconst _process = {\n abort,\n addListener,\n allowedNodeEnvironmentFlags,\n hasUncaughtExceptionCaptureCallback,\n setUncaughtExceptionCaptureCallback,\n loadEnvFile,\n sourceMapsEnabled,\n arch,\n argv,\n argv0,\n chdir,\n config,\n connected,\n constrainedMemory,\n availableMemory,\n cpuUsage,\n cwd,\n debugPort,\n dlopen,\n disconnect,\n emit,\n emitWarning,\n env,\n eventNames,\n execArgv,\n execPath,\n exit,\n finalization,\n features,\n getBuiltinModule,\n getActiveResourcesInfo,\n getMaxListeners,\n hrtime,\n kill,\n listeners,\n listenerCount,\n memoryUsage,\n nextTick,\n on,\n off,\n once,\n pid,\n platform,\n ppid,\n prependListener,\n prependOnceListener,\n rawListeners,\n release,\n removeAllListeners,\n removeListener,\n report,\n resourceUsage,\n setMaxListeners,\n setSourceMapsEnabled,\n stderr,\n stdin,\n stdout,\n title,\n throwDeprecation,\n traceDeprecation,\n umask,\n uptime,\n version,\n versions,\n // @ts-expect-error old API\n domain,\n initgroups,\n moduleLoadList,\n reallyExit,\n openStdin,\n assert,\n binding,\n send,\n exitCode,\n channel,\n getegid,\n geteuid,\n getgid,\n getgroups,\n getuid,\n setegid,\n seteuid,\n setgid,\n setgroups,\n setuid,\n permission,\n mainModule,\n _events,\n _eventsCount,\n _exiting,\n _maxListeners,\n _debugEnd,\n _debugProcess,\n _fatalException,\n _getActiveHandles,\n _getActiveRequests,\n _kill,\n _preload_modules,\n _rawDebug,\n _startProfilerIdleNotifier,\n _stopProfilerIdleNotifier,\n _tickCallback,\n _disconnect,\n _handleQueue,\n _pendingMessage,\n _channel,\n _send,\n _linkedBinding\n};\nexport default _process;\n", "import { default as defaultExport } from \"@cloudflare/unenv-preset/node/process\";\nglobalThis.process = defaultExport;", "", "// `esbuild` doesn't support returning `watch*` options from `onStart()`\n// plugin callbacks. Instead, we define an empty virtual module that is\n// imported by this injected file. Importing the module registers watchers.\nimport \"wrangler:modules-watch\";\n", "export const entityKind = Symbol.for('drizzle:entityKind');\nexport const hasOwnEntityKind = Symbol.for('drizzle:hasOwnEntityKind');\n\nexport interface DrizzleEntity {\n\t[entityKind]: string;\n}\n\nexport type DrizzleEntityClass =\n\t& ((abstract new(...args: any[]) => T) | (new(...args: any[]) => T))\n\t& DrizzleEntity;\n\nexport function is>(value: any, type: T): value is InstanceType {\n\tif (!value || typeof value !== 'object') {\n\t\treturn false;\n\t}\n\n\tif (value instanceof type) { // eslint-disable-line no-instanceof/no-instanceof\n\t\treturn true;\n\t}\n\n\tif (!Object.prototype.hasOwnProperty.call(type, entityKind)) {\n\t\tthrow new Error(\n\t\t\t`Class \"${\n\t\t\t\ttype.name ?? ''\n\t\t\t}\" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`,\n\t\t);\n\t}\n\n\tlet cls = Object.getPrototypeOf(value).constructor;\n\tif (cls) {\n\t\t// Traverse the prototype chain to find the entityKind\n\t\twhile (cls) {\n\t\t\tif (entityKind in cls && cls[entityKind] === type[entityKind]) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tcls = Object.getPrototypeOf(cls);\n\t\t}\n\t}\n\n\treturn false;\n}\n", "import { entityKind } from '~/entity.ts';\n\nexport interface Logger {\n\tlogQuery(query: string, params: unknown[]): void;\n}\n\nexport interface LogWriter {\n\twrite(message: string): void;\n}\n\nexport class ConsoleLogWriter implements LogWriter {\n\tstatic readonly [entityKind]: string = 'ConsoleLogWriter';\n\n\twrite(message: string) {\n\t\tconsole.log(message);\n\t}\n}\n\nexport class DefaultLogger implements Logger {\n\tstatic readonly [entityKind]: string = 'DefaultLogger';\n\n\treadonly writer: LogWriter;\n\n\tconstructor(config?: { writer: LogWriter }) {\n\t\tthis.writer = config?.writer ?? new ConsoleLogWriter();\n\t}\n\n\tlogQuery(query: string, params: unknown[]): void {\n\t\tconst stringifiedParams = params.map((p) => {\n\t\t\ttry {\n\t\t\t\treturn JSON.stringify(p);\n\t\t\t} catch {\n\t\t\t\treturn String(p);\n\t\t\t}\n\t\t});\n\t\tconst paramsStr = stringifiedParams.length ? ` -- params: [${stringifiedParams.join(', ')}]` : '';\n\t\tthis.writer.write(`Query: ${query}${paramsStr}`);\n\t}\n}\n\nexport class NoopLogger implements Logger {\n\tstatic readonly [entityKind]: string = 'NoopLogger';\n\n\tlogQuery(): void {\n\t\t// noop\n\t}\n}\n", "/** @internal */\nexport const TableName = Symbol.for('drizzle:Name');\n", "import type { Column, GetColumnData } from './column.ts';\nimport { entityKind } from './entity.ts';\nimport type { OptionalKeyOnly, RequiredKeyOnly } from './operations.ts';\nimport type { SQLWrapper } from './sql/sql.ts';\nimport { TableName } from './table.utils.ts';\nimport type { Simplify, Update } from './utils.ts';\n\nexport interface TableConfig> {\n\tname: string;\n\tschema: string | undefined;\n\tcolumns: Record;\n\tdialect: string;\n}\n\nexport type UpdateTableConfig> = Required<\n\tUpdate\n>;\n\n/** @internal */\nexport const Schema = Symbol.for('drizzle:Schema');\n\n/** @internal */\nexport const Columns = Symbol.for('drizzle:Columns');\n\n/** @internal */\nexport const ExtraConfigColumns = Symbol.for('drizzle:ExtraConfigColumns');\n\n/** @internal */\nexport const OriginalName = Symbol.for('drizzle:OriginalName');\n\n/** @internal */\nexport const BaseName = Symbol.for('drizzle:BaseName');\n\n/** @internal */\nexport const IsAlias = Symbol.for('drizzle:IsAlias');\n\n/** @internal */\nexport const ExtraConfigBuilder = Symbol.for('drizzle:ExtraConfigBuilder');\n\nconst IsDrizzleTable = Symbol.for('drizzle:IsDrizzleTable');\n\nexport interface Table<\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tT extends TableConfig = TableConfig,\n> extends SQLWrapper {\n\t// SQLWrapper runtime implementation is defined in 'sql/sql.ts'\n}\n\nexport class Table implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Table';\n\n\tdeclare readonly _: {\n\t\treadonly brand: 'Table';\n\t\treadonly config: T;\n\t\treadonly name: T['name'];\n\t\treadonly schema: T['schema'];\n\t\treadonly columns: T['columns'];\n\t\treadonly inferSelect: InferSelectModel>;\n\t\treadonly inferInsert: InferInsertModel>;\n\t};\n\n\tdeclare readonly $inferSelect: InferSelectModel>;\n\tdeclare readonly $inferInsert: InferInsertModel>;\n\n\t/** @internal */\n\tstatic readonly Symbol = {\n\t\tName: TableName as typeof TableName,\n\t\tSchema: Schema as typeof Schema,\n\t\tOriginalName: OriginalName as typeof OriginalName,\n\t\tColumns: Columns as typeof Columns,\n\t\tExtraConfigColumns: ExtraConfigColumns as typeof ExtraConfigColumns,\n\t\tBaseName: BaseName as typeof BaseName,\n\t\tIsAlias: IsAlias as typeof IsAlias,\n\t\tExtraConfigBuilder: ExtraConfigBuilder as typeof ExtraConfigBuilder,\n\t};\n\n\t/**\n\t * @internal\n\t * Can be changed if the table is aliased.\n\t */\n\t[TableName]: string;\n\n\t/**\n\t * @internal\n\t * Used to store the original name of the table, before any aliasing.\n\t */\n\t[OriginalName]: string;\n\n\t/** @internal */\n\t[Schema]: string | undefined;\n\n\t/** @internal */\n\t[Columns]!: T['columns'];\n\n\t/** @internal */\n\t[ExtraConfigColumns]!: Record;\n\n\t/**\n\t * @internal\n\t * Used to store the table name before the transformation via the `tableCreator` functions.\n\t */\n\t[BaseName]: string;\n\n\t/** @internal */\n\t[IsAlias] = false;\n\n\t/** @internal */\n\t[IsDrizzleTable] = true;\n\n\t/** @internal */\n\t[ExtraConfigBuilder]: ((self: any) => Record | unknown[]) | undefined = undefined;\n\n\tconstructor(name: string, schema: string | undefined, baseName: string) {\n\t\tthis[TableName] = this[OriginalName] = name;\n\t\tthis[Schema] = schema;\n\t\tthis[BaseName] = baseName;\n\t}\n}\n\nexport function isTable(table: unknown): table is Table {\n\treturn typeof table === 'object' && table !== null && IsDrizzleTable in table;\n}\n\n/**\n * Any table with a specified boundary.\n *\n * @example\n\t```ts\n\t// Any table with a specific name\n\ttype AnyUsersTable = AnyTable<{ name: 'users' }>;\n\t```\n *\n * To describe any table with any config, simply use `Table` without any type arguments, like this:\n *\n\t```ts\n\tfunction needsTable(table: Table) {\n\t\t...\n\t}\n\t```\n */\nexport type AnyTable> = Table>;\n\nexport function getTableName(table: T): T['_']['name'] {\n\treturn table[TableName];\n}\n\nexport function getTableUniqueName(table: T): `${T['_']['schema']}.${T['_']['name']}` {\n\treturn `${table[Schema] ?? 'public'}.${table[TableName]}`;\n}\n\nexport type MapColumnName =\n\tTDBColumNames extends true ? TColumn['_']['name']\n\t\t: TName;\n\nexport type InferModelFromColumns<\n\tTColumns extends Record,\n\tTInferMode extends 'select' | 'insert' = 'select',\n\tTConfig extends { dbColumnNames: boolean; override?: boolean } = { dbColumnNames: false; override: false },\n> = Simplify<\n\tTInferMode extends 'insert' ?\n\t\t\t& {\n\t\t\t\t[\n\t\t\t\t\tKey in keyof TColumns & string as RequiredKeyOnly<\n\t\t\t\t\t\tMapColumnName,\n\t\t\t\t\t\tTColumns[Key]\n\t\t\t\t\t>\n\t\t\t\t]: GetColumnData;\n\t\t\t}\n\t\t\t& {\n\t\t\t\t[\n\t\t\t\t\tKey in keyof TColumns & string as OptionalKeyOnly<\n\t\t\t\t\t\tMapColumnName,\n\t\t\t\t\t\tTColumns[Key],\n\t\t\t\t\t\tTConfig['override']\n\t\t\t\t\t>\n\t\t\t\t]?: GetColumnData | undefined;\n\t\t\t}\n\t\t: {\n\t\t\t[\n\t\t\t\tKey in keyof TColumns & string as MapColumnName<\n\t\t\t\t\tKey,\n\t\t\t\t\tTColumns[Key],\n\t\t\t\t\tTConfig['dbColumnNames']\n\t\t\t\t>\n\t\t\t]: GetColumnData;\n\t\t}\n>;\n\n/** @deprecated Use one of the alternatives: {@link InferSelectModel} / {@link InferInsertModel}, or `table.$inferSelect` / `table.$inferInsert`\n */\nexport type InferModel<\n\tTTable extends Table,\n\tTInferMode extends 'select' | 'insert' = 'select',\n\tTConfig extends { dbColumnNames: boolean } = { dbColumnNames: false },\n> = InferModelFromColumns;\n\nexport type InferSelectModel<\n\tTTable extends Table,\n\tTConfig extends { dbColumnNames: boolean } = { dbColumnNames: false },\n> = InferModelFromColumns;\n\nexport type InferInsertModel<\n\tTTable extends Table,\n\tTConfig extends { dbColumnNames: boolean; override?: boolean } = { dbColumnNames: false; override: false },\n> = InferModelFromColumns;\n\nexport type InferEnum = T extends { enumValues: readonly (infer U)[] } ? U\n\t: never;\n", "import type {\n\tColumnBuilderBaseConfig,\n\tColumnBuilderRuntimeConfig,\n\tColumnDataType,\n\tGeneratedColumnConfig,\n\tGeneratedIdentityConfig,\n} from './column-builder.ts';\nimport { entityKind } from './entity.ts';\nimport type { DriverValueMapper, SQL, SQLWrapper } from './sql/sql.ts';\nimport type { Table } from './table.ts';\nimport type { Update } from './utils.ts';\n\nexport interface ColumnBaseConfig<\n\tTDataType extends ColumnDataType,\n\tTColumnType extends string,\n> extends ColumnBuilderBaseConfig {\n\ttableName: string;\n\tnotNull: boolean;\n\thasDefault: boolean;\n\tisPrimaryKey: boolean;\n\tisAutoincrement: boolean;\n\thasRuntimeDefault: boolean;\n}\n\nexport type ColumnTypeConfig, TTypeConfig extends object> = T & {\n\tbrand: 'Column';\n\ttableName: T['tableName'];\n\tname: T['name'];\n\tdataType: T['dataType'];\n\tcolumnType: T['columnType'];\n\tdata: T['data'];\n\tdriverParam: T['driverParam'];\n\tnotNull: T['notNull'];\n\thasDefault: T['hasDefault'];\n\tisPrimaryKey: T['isPrimaryKey'];\n\tisAutoincrement: T['isAutoincrement'];\n\thasRuntimeDefault: T['hasRuntimeDefault'];\n\tenumValues: T['enumValues'];\n\tbaseColumn: T extends { baseColumn: infer U } ? U : unknown;\n\tgenerated: GeneratedColumnConfig | undefined;\n\tidentity: undefined | 'always' | 'byDefault';\n} & TTypeConfig;\n\nexport type ColumnRuntimeConfig = ColumnBuilderRuntimeConfig<\n\tTData,\n\tTRuntimeConfig\n>;\n\nexport interface Column<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTRuntimeConfig extends object = object,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTTypeConfig extends object = object,\n> extends DriverValueMapper, SQLWrapper {\n\t// SQLWrapper runtime implementation is defined in 'sql/sql.ts'\n}\n/*\n\t`Column` only accepts a full `ColumnConfig` as its generic.\n\tTo infer parts of the config, use `AnyColumn` that accepts a partial config.\n\tSee `GetColumnData` for example usage of inferring.\n*/\nexport abstract class Column<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n\tTRuntimeConfig extends object = object,\n\tTTypeConfig extends object = object,\n> implements DriverValueMapper, SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Column';\n\n\tdeclare readonly _: ColumnTypeConfig;\n\n\treadonly name: string;\n\treadonly keyAsName: boolean;\n\treadonly primary: boolean;\n\treadonly notNull: boolean;\n\treadonly default: T['data'] | SQL | undefined;\n\treadonly defaultFn: (() => T['data'] | SQL) | undefined;\n\treadonly onUpdateFn: (() => T['data'] | SQL) | undefined;\n\treadonly hasDefault: boolean;\n\treadonly isUnique: boolean;\n\treadonly uniqueName: string | undefined;\n\treadonly uniqueType: string | undefined;\n\treadonly dataType: T['dataType'];\n\treadonly columnType: T['columnType'];\n\treadonly enumValues: T['enumValues'] = undefined;\n\treadonly generated: GeneratedColumnConfig | undefined = undefined;\n\treadonly generatedIdentity: GeneratedIdentityConfig | undefined = undefined;\n\n\tprotected config: ColumnRuntimeConfig;\n\n\tconstructor(\n\t\treadonly table: Table,\n\t\tconfig: ColumnRuntimeConfig,\n\t) {\n\t\tthis.config = config;\n\t\tthis.name = config.name;\n\t\tthis.keyAsName = config.keyAsName;\n\t\tthis.notNull = config.notNull;\n\t\tthis.default = config.default;\n\t\tthis.defaultFn = config.defaultFn;\n\t\tthis.onUpdateFn = config.onUpdateFn;\n\t\tthis.hasDefault = config.hasDefault;\n\t\tthis.primary = config.primaryKey;\n\t\tthis.isUnique = config.isUnique;\n\t\tthis.uniqueName = config.uniqueName;\n\t\tthis.uniqueType = config.uniqueType;\n\t\tthis.dataType = config.dataType as T['dataType'];\n\t\tthis.columnType = config.columnType;\n\t\tthis.generated = config.generated;\n\t\tthis.generatedIdentity = config.generatedIdentity;\n\t}\n\n\tabstract getSQLType(): string;\n\n\tmapFromDriverValue(value: unknown): unknown {\n\t\treturn value;\n\t}\n\n\tmapToDriverValue(value: unknown): unknown {\n\t\treturn value;\n\t}\n\n\t// ** @internal */\n\tshouldDisableInsert(): boolean {\n\t\treturn this.config.generated !== undefined && this.config.generated.type !== 'byDefault';\n\t}\n}\n\nexport type UpdateColConfig<\n\tT extends ColumnBaseConfig,\n\tTUpdate extends Partial>,\n> = Update;\n\nexport type AnyColumn> = {}> = Column<\n\tRequired, TPartial>>\n>;\n\nexport type GetColumnData =\n\t// dprint-ignore\n\tTInferMode extends 'raw' // Raw mode\n\t\t? TColumn['_']['data'] // Just return the underlying type\n\t\t: TColumn['_']['notNull'] extends true // Query mode\n\t\t? TColumn['_']['data'] // Query mode, not null\n\t\t: TColumn['_']['data'] | null; // Query mode, nullable\n\nexport type InferColumnsDataTypes> = {\n\t[Key in keyof TColumns]: GetColumnData;\n};\n", "import { entityKind } from '~/entity.ts';\nimport type { Column } from './column.ts';\nimport type { GelColumn, GelExtraConfigColumn } from './gel-core/index.ts';\nimport type { MySqlColumn } from './mysql-core/index.ts';\nimport type { ExtraConfigColumn, PgColumn, PgSequenceOptions } from './pg-core/index.ts';\nimport type { SingleStoreColumn } from './singlestore-core/index.ts';\nimport type { SQL } from './sql/sql.ts';\nimport type { SQLiteColumn } from './sqlite-core/index.ts';\nimport type { Assume, Simplify } from './utils.ts';\n\nexport type ColumnDataType =\n\t| 'string'\n\t| 'number'\n\t| 'boolean'\n\t| 'array'\n\t| 'json'\n\t| 'date'\n\t| 'bigint'\n\t| 'custom'\n\t| 'buffer'\n\t| 'dateDuration'\n\t| 'duration'\n\t| 'relDuration'\n\t| 'localTime'\n\t| 'localDate'\n\t| 'localDateTime';\n\nexport type Dialect = 'pg' | 'mysql' | 'sqlite' | 'singlestore' | 'common' | 'gel';\n\nexport type GeneratedStorageMode = 'virtual' | 'stored';\n\nexport type GeneratedType = 'always' | 'byDefault';\n\nexport type GeneratedColumnConfig = {\n\tas: TDataType | SQL | (() => SQL);\n\ttype?: GeneratedType;\n\tmode?: GeneratedStorageMode;\n};\n\nexport type GeneratedIdentityConfig = {\n\tsequenceName?: string;\n\tsequenceOptions?: PgSequenceOptions;\n\ttype: 'always' | 'byDefault';\n};\n\nexport interface ColumnBuilderBaseConfig {\n\tname: string;\n\tdataType: TDataType;\n\tcolumnType: TColumnType;\n\tdata: unknown;\n\tdriverParam: unknown;\n\tenumValues: string[] | undefined;\n}\n\nexport type MakeColumnConfig<\n\tT extends ColumnBuilderBaseConfig,\n\tTTableName extends string,\n\tTData = T extends { $type: infer U } ? U : T['data'],\n> = {\n\tname: T['name'];\n\ttableName: TTableName;\n\tdataType: T['dataType'];\n\tcolumnType: T['columnType'];\n\tdata: TData;\n\tdriverParam: T['driverParam'];\n\tnotNull: T extends { notNull: true } ? true : false;\n\thasDefault: T extends { hasDefault: true } ? true : false;\n\tisPrimaryKey: T extends { isPrimaryKey: true } ? true : false;\n\tisAutoincrement: T extends { isAutoincrement: true } ? true : false;\n\thasRuntimeDefault: T extends { hasRuntimeDefault: true } ? true : false;\n\tenumValues: T['enumValues'];\n\tbaseColumn: T extends { baseBuilder: infer U extends ColumnBuilderBase } ? BuildColumn\n\t\t: never;\n\tidentity: T extends { identity: 'always' } ? 'always' : T extends { identity: 'byDefault' } ? 'byDefault' : undefined;\n\tgenerated: T extends { generated: infer G } ? unknown extends G ? undefined\n\t\t: G extends undefined ? undefined\n\t\t: G\n\t\t: undefined;\n} & {};\n\nexport type ColumnBuilderTypeConfig<\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tT extends ColumnBuilderBaseConfig,\n\tTTypeConfig extends object = object,\n> = Simplify<\n\t& {\n\t\tbrand: 'ColumnBuilder';\n\t\tname: T['name'];\n\t\tdataType: T['dataType'];\n\t\tcolumnType: T['columnType'];\n\t\tdata: T['data'];\n\t\tdriverParam: T['driverParam'];\n\t\tnotNull: T extends { notNull: infer U } ? U : boolean;\n\t\thasDefault: T extends { hasDefault: infer U } ? U : boolean;\n\t\tenumValues: T['enumValues'];\n\t\tidentity: T extends { identity: infer U } ? U : unknown;\n\t\tgenerated: T extends { generated: infer G } ? G extends undefined ? unknown : G : unknown;\n\t}\n\t& TTypeConfig\n>;\n\nexport type ColumnBuilderRuntimeConfig = {\n\tname: string;\n\tkeyAsName: boolean;\n\tnotNull: boolean;\n\tdefault: TData | SQL | undefined;\n\tdefaultFn: (() => TData | SQL) | undefined;\n\tonUpdateFn: (() => TData | SQL) | undefined;\n\thasDefault: boolean;\n\tprimaryKey: boolean;\n\tisUnique: boolean;\n\tuniqueName: string | undefined;\n\tuniqueType: string | undefined;\n\tdataType: string;\n\tcolumnType: string;\n\tgenerated: GeneratedColumnConfig | undefined;\n\tgeneratedIdentity: GeneratedIdentityConfig | undefined;\n} & TRuntimeConfig;\n\nexport interface ColumnBuilderExtraConfig {\n\tprimaryKeyHasDefault?: boolean;\n}\n\nexport type NotNull = T & {\n\t_: {\n\t\tnotNull: true;\n\t};\n};\n\nexport type HasDefault = T & {\n\t_: {\n\t\thasDefault: true;\n\t};\n};\n\nexport type IsPrimaryKey = T & {\n\t_: {\n\t\tisPrimaryKey: true;\n\t};\n};\n\nexport type IsAutoincrement = T & {\n\t_: {\n\t\tisAutoincrement: true;\n\t};\n};\n\nexport type HasRuntimeDefault = T & {\n\t_: {\n\t\thasRuntimeDefault: true;\n\t};\n};\n\nexport type $Type = T & {\n\t_: {\n\t\t$type: TType;\n\t};\n};\n\nexport type HasGenerated = T & {\n\t_: {\n\t\thasDefault: true;\n\t\tgenerated: TGenerated;\n\t};\n};\n\nexport type IsIdentity<\n\tT extends ColumnBuilderBase,\n\tTType extends 'always' | 'byDefault',\n> = T & {\n\t_: {\n\t\tnotNull: true;\n\t\thasDefault: true;\n\t\tidentity: TType;\n\t};\n};\nexport interface ColumnBuilderBase<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTTypeConfig extends object = object,\n> {\n\t_: ColumnBuilderTypeConfig;\n}\n\n// To understand how to use `ColumnBuilder` and `AnyColumnBuilder`, see `Column` and `AnyColumn` documentation.\nexport abstract class ColumnBuilder<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTRuntimeConfig extends object = object,\n\tTTypeConfig extends object = object,\n\tTExtraConfig extends ColumnBuilderExtraConfig = ColumnBuilderExtraConfig,\n> implements ColumnBuilderBase {\n\tstatic readonly [entityKind]: string = 'ColumnBuilder';\n\n\tdeclare _: ColumnBuilderTypeConfig;\n\n\tprotected config: ColumnBuilderRuntimeConfig;\n\n\tconstructor(name: T['name'], dataType: T['dataType'], columnType: T['columnType']) {\n\t\tthis.config = {\n\t\t\tname,\n\t\t\tkeyAsName: name === '',\n\t\t\tnotNull: false,\n\t\t\tdefault: undefined,\n\t\t\thasDefault: false,\n\t\t\tprimaryKey: false,\n\t\t\tisUnique: false,\n\t\t\tuniqueName: undefined,\n\t\t\tuniqueType: undefined,\n\t\t\tdataType,\n\t\t\tcolumnType,\n\t\t\tgenerated: undefined,\n\t\t} as ColumnBuilderRuntimeConfig;\n\t}\n\n\t/**\n\t * Changes the data type of the column. Commonly used with `json` columns. Also, useful for branded types.\n\t *\n\t * @example\n\t * ```ts\n\t * const users = pgTable('users', {\n\t * \tid: integer('id').$type().primaryKey(),\n\t * \tdetails: json('details').$type().notNull(),\n\t * });\n\t * ```\n\t */\n\t$type(): $Type {\n\t\treturn this as $Type;\n\t}\n\n\t/**\n\t * Adds a `not null` clause to the column definition.\n\t *\n\t * Affects the `select` model of the table - columns *without* `not null` will be nullable on select.\n\t */\n\tnotNull(): NotNull {\n\t\tthis.config.notNull = true;\n\t\treturn this as NotNull;\n\t}\n\n\t/**\n\t * Adds a `default ` clause to the column definition.\n\t *\n\t * Affects the `insert` model of the table - columns *with* `default` are optional on insert.\n\t *\n\t * If you need to set a dynamic default value, use {@link $defaultFn} instead.\n\t */\n\tdefault(value: (this['_'] extends { $type: infer U } ? U : this['_']['data']) | SQL): HasDefault {\n\t\tthis.config.default = value;\n\t\tthis.config.hasDefault = true;\n\t\treturn this as HasDefault;\n\t}\n\n\t/**\n\t * Adds a dynamic default value to the column.\n\t * The function will be called when the row is inserted, and the returned value will be used as the column value.\n\t *\n\t * **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`.\n\t */\n\t$defaultFn(\n\t\tfn: () => (this['_'] extends { $type: infer U } ? U : this['_']['data']) | SQL,\n\t): HasRuntimeDefault> {\n\t\tthis.config.defaultFn = fn;\n\t\tthis.config.hasDefault = true;\n\t\treturn this as HasRuntimeDefault>;\n\t}\n\n\t/**\n\t * Alias for {@link $defaultFn}.\n\t */\n\t$default = this.$defaultFn;\n\n\t/**\n\t * Adds a dynamic update value to the column.\n\t * The function will be called when the row is updated, and the returned value will be used as the column value if none is provided.\n\t * If no `default` (or `$defaultFn`) value is provided, the function will be called when the row is inserted as well, and the returned value will be used as the column value.\n\t *\n\t * **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`.\n\t */\n\t$onUpdateFn(\n\t\tfn: () => (this['_'] extends { $type: infer U } ? U : this['_']['data']) | SQL,\n\t): HasDefault {\n\t\tthis.config.onUpdateFn = fn;\n\t\tthis.config.hasDefault = true;\n\t\treturn this as HasDefault;\n\t}\n\n\t/**\n\t * Alias for {@link $onUpdateFn}.\n\t */\n\t$onUpdate = this.$onUpdateFn;\n\n\t/**\n\t * Adds a `primary key` clause to the column definition. This implicitly makes the column `not null`.\n\t *\n\t * In SQLite, `integer primary key` implicitly makes the column auto-incrementing.\n\t */\n\tprimaryKey(): TExtraConfig['primaryKeyHasDefault'] extends true ? IsPrimaryKey>>\n\t\t: IsPrimaryKey>\n\t{\n\t\tthis.config.primaryKey = true;\n\t\tthis.config.notNull = true;\n\t\treturn this as TExtraConfig['primaryKeyHasDefault'] extends true ? IsPrimaryKey>>\n\t\t\t: IsPrimaryKey>;\n\t}\n\n\tabstract generatedAlwaysAs(\n\t\tas: SQL | T['data'] | (() => SQL),\n\t\tconfig?: Partial>,\n\t): HasGenerated;\n\n\t/** @internal Sets the name of the column to the key within the table definition if a name was not given. */\n\tsetName(name: string) {\n\t\tif (this.config.name !== '') return;\n\t\tthis.config.name = name;\n\t}\n}\n\nexport type BuildColumn<\n\tTTableName extends string,\n\tTBuilder extends ColumnBuilderBase,\n\tTDialect extends Dialect,\n> = TDialect extends 'pg' ? PgColumn<\n\t\tMakeColumnConfig,\n\t\t{},\n\t\tSimplify | 'brand' | 'dialect'>>\n\t>\n\t: TDialect extends 'mysql' ? MySqlColumn<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify<\n\t\t\t\tOmit<\n\t\t\t\t\tTBuilder['_'],\n\t\t\t\t\t| keyof MakeColumnConfig\n\t\t\t\t\t| 'brand'\n\t\t\t\t\t| 'dialect'\n\t\t\t\t\t| 'primaryKeyHasDefault'\n\t\t\t\t\t| 'mysqlColumnBuilderBrand'\n\t\t\t\t>\n\t\t\t>\n\t\t>\n\t: TDialect extends 'sqlite' ? SQLiteColumn<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify | 'brand' | 'dialect'>>\n\t\t>\n\t: TDialect extends 'common' ? Column<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify | 'brand' | 'dialect'>>\n\t\t>\n\t: TDialect extends 'singlestore' ? SingleStoreColumn<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify<\n\t\t\t\tOmit<\n\t\t\t\t\tTBuilder['_'],\n\t\t\t\t\t| keyof MakeColumnConfig\n\t\t\t\t\t| 'brand'\n\t\t\t\t\t| 'dialect'\n\t\t\t\t\t| 'primaryKeyHasDefault'\n\t\t\t\t\t| 'singlestoreColumnBuilderBrand'\n\t\t\t\t>\n\t\t\t>\n\t\t>\n\t: TDialect extends 'gel' ? GelColumn<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify | 'brand' | 'dialect'>>\n\t\t>\n\t: never;\n\nexport type BuildIndexColumn<\n\tTDialect extends Dialect,\n> = TDialect extends 'pg' ? ExtraConfigColumn\n\t: TDialect extends 'gel' ? GelExtraConfigColumn\n\t: never;\n\n// TODO\n// try to make sql as well + indexRaw\n\n// optional after everything will be working as expected\n// also try to leave only needed methods for extraConfig\n// make an error if I pass .asc() to fk and so on\n\nexport type BuildColumns<\n\tTTableName extends string,\n\tTConfigMap extends Record,\n\tTDialect extends Dialect,\n> =\n\t& {\n\t\t[Key in keyof TConfigMap]: BuildColumn\n\t\t\t\t& { name: TConfigMap[Key]['_']['name'] extends '' ? Assume : TConfigMap[Key]['_']['name'] };\n\t\t}, TDialect>;\n\t}\n\t& {};\n\nexport type BuildExtraConfigColumns<\n\t_TTableName extends string,\n\tTConfigMap extends Record,\n\tTDialect extends Dialect,\n> =\n\t& {\n\t\t[Key in keyof TConfigMap]: BuildIndexColumn;\n\t}\n\t& {};\n\nexport type ChangeColumnTableName =\n\tTDialect extends 'pg' ? PgColumn>\n\t\t: TDialect extends 'mysql' ? MySqlColumn>\n\t\t: TDialect extends 'singlestore' ? SingleStoreColumn>\n\t\t: TDialect extends 'sqlite' ? SQLiteColumn>\n\t\t: TDialect extends 'gel' ? GelColumn>\n\t\t: never;\n", "import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { AnyPgColumn, PgColumn } from './columns/index.ts';\nimport type { PgTable } from './table.ts';\n\nexport type UpdateDeleteAction = 'cascade' | 'restrict' | 'no action' | 'set null' | 'set default';\n\nexport type Reference = () => {\n\treadonly name?: string;\n\treadonly columns: PgColumn[];\n\treadonly foreignTable: PgTable;\n\treadonly foreignColumns: PgColumn[];\n};\n\nexport class ForeignKeyBuilder {\n\tstatic readonly [entityKind]: string = 'PgForeignKeyBuilder';\n\n\t/** @internal */\n\treference: Reference;\n\n\t/** @internal */\n\t_onUpdate: UpdateDeleteAction | undefined = 'no action';\n\n\t/** @internal */\n\t_onDelete: UpdateDeleteAction | undefined = 'no action';\n\n\tconstructor(\n\t\tconfig: () => {\n\t\t\tname?: string;\n\t\t\tcolumns: PgColumn[];\n\t\t\tforeignColumns: PgColumn[];\n\t\t},\n\t\tactions?: {\n\t\t\tonUpdate?: UpdateDeleteAction;\n\t\t\tonDelete?: UpdateDeleteAction;\n\t\t} | undefined,\n\t) {\n\t\tthis.reference = () => {\n\t\t\tconst { name, columns, foreignColumns } = config();\n\t\t\treturn { name, columns, foreignTable: foreignColumns[0]!.table as PgTable, foreignColumns };\n\t\t};\n\t\tif (actions) {\n\t\t\tthis._onUpdate = actions.onUpdate;\n\t\t\tthis._onDelete = actions.onDelete;\n\t\t}\n\t}\n\n\tonUpdate(action: UpdateDeleteAction): this {\n\t\tthis._onUpdate = action === undefined ? 'no action' : action;\n\t\treturn this;\n\t}\n\n\tonDelete(action: UpdateDeleteAction): this {\n\t\tthis._onDelete = action === undefined ? 'no action' : action;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: PgTable): ForeignKey {\n\t\treturn new ForeignKey(table, this);\n\t}\n}\n\nexport type AnyForeignKeyBuilder = ForeignKeyBuilder;\n\nexport class ForeignKey {\n\tstatic readonly [entityKind]: string = 'PgForeignKey';\n\n\treadonly reference: Reference;\n\treadonly onUpdate: UpdateDeleteAction | undefined;\n\treadonly onDelete: UpdateDeleteAction | undefined;\n\n\tconstructor(readonly table: PgTable, builder: ForeignKeyBuilder) {\n\t\tthis.reference = builder.reference;\n\t\tthis.onUpdate = builder._onUpdate;\n\t\tthis.onDelete = builder._onDelete;\n\t}\n\n\tgetName(): string {\n\t\tconst { name, columns, foreignColumns } = this.reference();\n\t\tconst columnNames = columns.map((column) => column.name);\n\t\tconst foreignColumnNames = foreignColumns.map((column) => column.name);\n\t\tconst chunks = [\n\t\t\tthis.table[TableName],\n\t\t\t...columnNames,\n\t\t\tforeignColumns[0]!.table[TableName],\n\t\t\t...foreignColumnNames,\n\t\t];\n\t\treturn name ?? `${chunks.join('_')}_fk`;\n\t}\n}\n\ntype ColumnsWithTable<\n\tTTableName extends string,\n\tTColumns extends PgColumn[],\n> = { [Key in keyof TColumns]: AnyPgColumn<{ tableName: TTableName }> };\n\nexport function foreignKey<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends [AnyPgColumn<{ tableName: TTableName }>, ...AnyPgColumn<{ tableName: TTableName }>[]],\n>(\n\tconfig: {\n\t\tname?: string;\n\t\tcolumns: TColumns;\n\t\tforeignColumns: ColumnsWithTable;\n\t},\n): ForeignKeyBuilder {\n\tfunction mappedConfig() {\n\t\tconst { name, columns, foreignColumns } = config;\n\t\treturn {\n\t\t\tname,\n\t\t\tcolumns,\n\t\t\tforeignColumns,\n\t\t};\n\t}\n\n\treturn new ForeignKeyBuilder(mappedConfig);\n}\n", "export function iife(fn: (...args: T) => U, ...args: T): U {\n\treturn fn(...args);\n}\n", "import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { PgColumn } from './columns/index.ts';\nimport type { PgTable } from './table.ts';\n\nexport function unique(name?: string): UniqueOnConstraintBuilder {\n\treturn new UniqueOnConstraintBuilder(name);\n}\n\nexport function uniqueKeyName(table: PgTable, columns: string[]) {\n\treturn `${table[TableName]}_${columns.join('_')}_unique`;\n}\n\nexport class UniqueConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'PgUniqueConstraintBuilder';\n\n\t/** @internal */\n\tcolumns: PgColumn[];\n\t/** @internal */\n\tnullsNotDistinctConfig = false;\n\n\tconstructor(\n\t\tcolumns: PgColumn[],\n\t\tprivate name?: string,\n\t) {\n\t\tthis.columns = columns;\n\t}\n\n\tnullsNotDistinct() {\n\t\tthis.nullsNotDistinctConfig = true;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: PgTable): UniqueConstraint {\n\t\treturn new UniqueConstraint(table, this.columns, this.nullsNotDistinctConfig, this.name);\n\t}\n}\n\nexport class UniqueOnConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'PgUniqueOnConstraintBuilder';\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tname?: string,\n\t) {\n\t\tthis.name = name;\n\t}\n\n\ton(...columns: [PgColumn, ...PgColumn[]]) {\n\t\treturn new UniqueConstraintBuilder(columns, this.name);\n\t}\n}\n\nexport class UniqueConstraint {\n\tstatic readonly [entityKind]: string = 'PgUniqueConstraint';\n\n\treadonly columns: PgColumn[];\n\treadonly name?: string;\n\treadonly nullsNotDistinct: boolean = false;\n\n\tconstructor(readonly table: PgTable, columns: PgColumn[], nullsNotDistinct: boolean, name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name));\n\t\tthis.nullsNotDistinct = nullsNotDistinct;\n\t}\n\n\tgetName() {\n\t\treturn this.name;\n\t}\n}\n", "function parsePgArrayValue(arrayString: string, startFrom: number, inQuotes: boolean): [string, number] {\n\tfor (let i = startFrom; i < arrayString.length; i++) {\n\t\tconst char = arrayString[i];\n\n\t\tif (char === '\\\\') {\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === '\"') {\n\t\t\treturn [arrayString.slice(startFrom, i).replace(/\\\\/g, ''), i + 1];\n\t\t}\n\n\t\tif (inQuotes) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === ',' || char === '}') {\n\t\t\treturn [arrayString.slice(startFrom, i).replace(/\\\\/g, ''), i];\n\t\t}\n\t}\n\n\treturn [arrayString.slice(startFrom).replace(/\\\\/g, ''), arrayString.length];\n}\n\nexport function parsePgNestedArray(arrayString: string, startFrom = 0): [any[], number] {\n\tconst result: any[] = [];\n\tlet i = startFrom;\n\tlet lastCharIsComma = false;\n\n\twhile (i < arrayString.length) {\n\t\tconst char = arrayString[i];\n\n\t\tif (char === ',') {\n\t\t\tif (lastCharIsComma || i === startFrom) {\n\t\t\t\tresult.push('');\n\t\t\t}\n\t\t\tlastCharIsComma = true;\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tlastCharIsComma = false;\n\n\t\tif (char === '\\\\') {\n\t\t\ti += 2;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === '\"') {\n\t\t\tconst [value, startFrom] = parsePgArrayValue(arrayString, i + 1, true);\n\t\t\tresult.push(value);\n\t\t\ti = startFrom;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === '}') {\n\t\t\treturn [result, i + 1];\n\t\t}\n\n\t\tif (char === '{') {\n\t\t\tconst [value, startFrom] = parsePgNestedArray(arrayString, i + 1);\n\t\t\tresult.push(value);\n\t\t\ti = startFrom;\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst [value, newStartFrom] = parsePgArrayValue(arrayString, i, false);\n\t\tresult.push(value);\n\t\ti = newStartFrom;\n\t}\n\n\treturn [result, i];\n}\n\nexport function parsePgArray(arrayString: string): any[] {\n\tconst [result] = parsePgNestedArray(arrayString, 1);\n\treturn result;\n}\n\nexport function makePgArray(array: any[]): string {\n\treturn `{${\n\t\tarray.map((item) => {\n\t\t\tif (Array.isArray(item)) {\n\t\t\t\treturn makePgArray(item);\n\t\t\t}\n\n\t\t\tif (typeof item === 'string') {\n\t\t\t\treturn `\"${item.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"')}\"`;\n\t\t\t}\n\n\t\t\treturn `${item}`;\n\t\t}).join(',')\n\t}}`;\n}\n", "import type {\n\tColumnBuilderBase,\n\tColumnBuilderBaseConfig,\n\tColumnBuilderExtraConfig,\n\tColumnBuilderRuntimeConfig,\n\tColumnDataType,\n\tHasGenerated,\n\tMakeColumnConfig,\n} from '~/column-builder.ts';\nimport { ColumnBuilder } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { Column } from '~/column.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport type { Simplify, Update } from '~/utils.ts';\n\nimport type { ForeignKey, UpdateDeleteAction } from '~/pg-core/foreign-keys.ts';\nimport { ForeignKeyBuilder } from '~/pg-core/foreign-keys.ts';\nimport type { AnyPgTable, PgTable } from '~/pg-core/table.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport { iife } from '~/tracing-utils.ts';\nimport type { PgIndexOpClass } from '../indexes.ts';\nimport { uniqueKeyName } from '../unique-constraint.ts';\nimport { makePgArray, parsePgArray } from '../utils/array.ts';\n\nexport interface ReferenceConfig {\n\tref: () => PgColumn;\n\tactions: {\n\t\tonUpdate?: UpdateDeleteAction;\n\t\tonDelete?: UpdateDeleteAction;\n\t};\n}\n\nexport interface PgColumnBuilderBase<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTTypeConfig extends object = object,\n> extends ColumnBuilderBase {}\n\nexport abstract class PgColumnBuilder<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTRuntimeConfig extends object = object,\n\tTTypeConfig extends object = object,\n\tTExtraConfig extends ColumnBuilderExtraConfig = ColumnBuilderExtraConfig,\n> extends ColumnBuilder\n\timplements PgColumnBuilderBase\n{\n\tprivate foreignKeyConfigs: ReferenceConfig[] = [];\n\n\tstatic override readonly [entityKind]: string = 'PgColumnBuilder';\n\n\tarray(size?: TSize): PgArrayBuilder<\n\t\t& {\n\t\t\tname: T['name'];\n\t\t\tdataType: 'array';\n\t\t\tcolumnType: 'PgArray';\n\t\t\tdata: T['data'][];\n\t\t\tdriverParam: T['driverParam'][] | string;\n\t\t\tenumValues: T['enumValues'];\n\t\t\tsize: TSize;\n\t\t\tbaseBuilder: T;\n\t\t}\n\t\t& (T extends { notNull: true } ? { notNull: true } : {})\n\t\t& (T extends { hasDefault: true } ? { hasDefault: true } : {}),\n\t\tT\n\t> {\n\t\treturn new PgArrayBuilder(this.config.name, this as PgColumnBuilder, size as any);\n\t}\n\n\treferences(\n\t\tref: ReferenceConfig['ref'],\n\t\tactions: ReferenceConfig['actions'] = {},\n\t): this {\n\t\tthis.foreignKeyConfigs.push({ ref, actions });\n\t\treturn this;\n\t}\n\n\tunique(\n\t\tname?: string,\n\t\tconfig?: { nulls: 'distinct' | 'not distinct' },\n\t): this {\n\t\tthis.config.isUnique = true;\n\t\tthis.config.uniqueName = name;\n\t\tthis.config.uniqueType = config?.nulls;\n\t\treturn this;\n\t}\n\n\tgeneratedAlwaysAs(as: SQL | T['data'] | (() => SQL)): HasGenerated {\n\t\tthis.config.generated = {\n\t\t\tas,\n\t\t\ttype: 'always',\n\t\t\tmode: 'stored',\n\t\t};\n\t\treturn this as HasGenerated;\n\t}\n\n\t/** @internal */\n\tbuildForeignKeys(column: PgColumn, table: PgTable): ForeignKey[] {\n\t\treturn this.foreignKeyConfigs.map(({ ref, actions }) => {\n\t\t\treturn iife(\n\t\t\t\t(ref, actions) => {\n\t\t\t\t\tconst builder = new ForeignKeyBuilder(() => {\n\t\t\t\t\t\tconst foreignColumn = ref();\n\t\t\t\t\t\treturn { columns: [column], foreignColumns: [foreignColumn] };\n\t\t\t\t\t});\n\t\t\t\t\tif (actions.onUpdate) {\n\t\t\t\t\t\tbuilder.onUpdate(actions.onUpdate);\n\t\t\t\t\t}\n\t\t\t\t\tif (actions.onDelete) {\n\t\t\t\t\t\tbuilder.onDelete(actions.onDelete);\n\t\t\t\t\t}\n\t\t\t\t\treturn builder.build(table);\n\t\t\t\t},\n\t\t\t\tref,\n\t\t\t\tactions,\n\t\t\t);\n\t\t});\n\t}\n\n\t/** @internal */\n\tabstract build(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgColumn>;\n\n\t/** @internal */\n\tbuildExtraConfigColumn(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): ExtraConfigColumn {\n\t\treturn new ExtraConfigColumn(table, this.config);\n\t}\n}\n\n// To understand how to use `PgColumn` and `PgColumn`, see `Column` and `AnyColumn` documentation.\nexport abstract class PgColumn<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n\tTRuntimeConfig extends object = {},\n\tTTypeConfig extends object = {},\n> extends Column {\n\tstatic override readonly [entityKind]: string = 'PgColumn';\n\n\tconstructor(\n\t\toverride readonly table: PgTable,\n\t\tconfig: ColumnBuilderRuntimeConfig,\n\t) {\n\t\tif (!config.uniqueName) {\n\t\t\tconfig.uniqueName = uniqueKeyName(table, [config.name]);\n\t\t}\n\t\tsuper(table, config);\n\t}\n}\n\nexport type IndexedExtraConfigType = { order?: 'asc' | 'desc'; nulls?: 'first' | 'last'; opClass?: string };\n\nexport class ExtraConfigColumn<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n> extends PgColumn {\n\tstatic override readonly [entityKind]: string = 'ExtraConfigColumn';\n\n\toverride getSQLType(): string {\n\t\treturn this.getSQLType();\n\t}\n\n\tindexConfig: IndexedExtraConfigType = {\n\t\torder: this.config.order ?? 'asc',\n\t\tnulls: this.config.nulls ?? 'last',\n\t\topClass: this.config.opClass,\n\t};\n\tdefaultConfig: IndexedExtraConfigType = {\n\t\torder: 'asc',\n\t\tnulls: 'last',\n\t\topClass: undefined,\n\t};\n\n\tasc(): Omit {\n\t\tthis.indexConfig.order = 'asc';\n\t\treturn this;\n\t}\n\n\tdesc(): Omit {\n\t\tthis.indexConfig.order = 'desc';\n\t\treturn this;\n\t}\n\n\tnullsFirst(): Omit {\n\t\tthis.indexConfig.nulls = 'first';\n\t\treturn this;\n\t}\n\n\tnullsLast(): Omit {\n\t\tthis.indexConfig.nulls = 'last';\n\t\treturn this;\n\t}\n\n\t/**\n\t * ### PostgreSQL documentation quote\n\t *\n\t * > An operator class with optional parameters can be specified for each column of an index.\n\t * The operator class identifies the operators to be used by the index for that column.\n\t * For example, a B-tree index on four-byte integers would use the int4_ops class;\n\t * this operator class includes comparison functions for four-byte integers.\n\t * In practice the default operator class for the column's data type is usually sufficient.\n\t * The main point of having operator classes is that for some data types, there could be more than one meaningful ordering.\n\t * For example, we might want to sort a complex-number data type either by absolute value or by real part.\n\t * We could do this by defining two operator classes for the data type and then selecting the proper class when creating an index.\n\t * More information about operator classes check:\n\t *\n\t * ### Useful links\n\t * https://www.postgresql.org/docs/current/sql-createindex.html\n\t *\n\t * https://www.postgresql.org/docs/current/indexes-opclass.html\n\t *\n\t * https://www.postgresql.org/docs/current/xindex.html\n\t *\n\t * ### Additional types\n\t * If you have the `pg_vector` extension installed in your database, you can use the\n\t * `vector_l2_ops`, `vector_ip_ops`, `vector_cosine_ops`, `vector_l1_ops`, `bit_hamming_ops`, `bit_jaccard_ops`, `halfvec_l2_ops`, `sparsevec_l2_ops` options, which are predefined types.\n\t *\n\t * **You can always specify any string you want in the operator class, in case Drizzle doesn't have it natively in its types**\n\t *\n\t * @param opClass\n\t * @returns\n\t */\n\top(opClass: PgIndexOpClass): Omit {\n\t\tthis.indexConfig.opClass = opClass;\n\t\treturn this;\n\t}\n}\n\nexport class IndexedColumn {\n\tstatic readonly [entityKind]: string = 'IndexedColumn';\n\tconstructor(\n\t\tname: string | undefined,\n\t\tkeyAsName: boolean,\n\t\ttype: string,\n\t\tindexConfig: IndexedExtraConfigType,\n\t) {\n\t\tthis.name = name;\n\t\tthis.keyAsName = keyAsName;\n\t\tthis.type = type;\n\t\tthis.indexConfig = indexConfig;\n\t}\n\n\tname: string | undefined;\n\tkeyAsName: boolean;\n\ttype: string;\n\tindexConfig: IndexedExtraConfigType;\n}\n\nexport type AnyPgColumn> = {}> = PgColumn<\n\tRequired, TPartial>>\n>;\n\nexport type PgArrayColumnBuilderBaseConfig = ColumnBuilderBaseConfig<'array', 'PgArray'> & {\n\tsize: number | undefined;\n\tbaseBuilder: ColumnBuilderBaseConfig;\n};\n\nexport class PgArrayBuilder<\n\tT extends PgArrayColumnBuilderBaseConfig,\n\tTBase extends ColumnBuilderBaseConfig | PgArrayColumnBuilderBaseConfig,\n> extends PgColumnBuilder<\n\tT,\n\t{\n\t\tbaseBuilder: TBase extends PgArrayColumnBuilderBaseConfig ? PgArrayBuilder<\n\t\t\t\tTBase,\n\t\t\t\tTBase extends { baseBuilder: infer TBaseBuilder extends ColumnBuilderBaseConfig } ? TBaseBuilder\n\t\t\t\t\t: never\n\t\t\t>\n\t\t\t: PgColumnBuilder>>>;\n\t\tsize: T['size'];\n\t},\n\t{\n\t\tbaseBuilder: TBase extends PgArrayColumnBuilderBaseConfig ? PgArrayBuilder<\n\t\t\t\tTBase,\n\t\t\t\tTBase extends { baseBuilder: infer TBaseBuilder extends ColumnBuilderBaseConfig } ? TBaseBuilder\n\t\t\t\t\t: never\n\t\t\t>\n\t\t\t: PgColumnBuilder>>>;\n\t\tsize: T['size'];\n\t}\n> {\n\tstatic override readonly [entityKind] = 'PgArrayBuilder';\n\n\tconstructor(\n\t\tname: string,\n\t\tbaseBuilder: PgArrayBuilder['config']['baseBuilder'],\n\t\tsize: T['size'],\n\t) {\n\t\tsuper(name, 'array', 'PgArray');\n\t\tthis.config.baseBuilder = baseBuilder;\n\t\tthis.config.size = size;\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgArray & { size: T['size']; baseBuilder: T['baseBuilder'] }, TBase> {\n\t\tconst baseColumn = this.config.baseBuilder.build(table);\n\t\treturn new PgArray & { size: T['size']; baseBuilder: T['baseBuilder'] }, TBase>(\n\t\t\ttable as AnyPgTable<{ name: MakeColumnConfig['tableName'] }>,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t\tbaseColumn,\n\t\t);\n\t}\n}\n\nexport class PgArray<\n\tT extends ColumnBaseConfig<'array', 'PgArray'> & {\n\t\tsize: number | undefined;\n\t\tbaseBuilder: ColumnBuilderBaseConfig;\n\t},\n\tTBase extends ColumnBuilderBaseConfig,\n> extends PgColumn {\n\treadonly size: T['size'];\n\n\tstatic override readonly [entityKind]: string = 'PgArray';\n\n\tconstructor(\n\t\ttable: AnyPgTable<{ name: T['tableName'] }>,\n\t\tconfig: PgArrayBuilder['config'],\n\t\treadonly baseColumn: PgColumn,\n\t\treadonly range?: [number | undefined, number | undefined],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.size = config.size;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn `${this.baseColumn.getSQLType()}[${typeof this.size === 'number' ? this.size : ''}]`;\n\t}\n\n\toverride mapFromDriverValue(value: unknown[] | string): T['data'] {\n\t\tif (typeof value === 'string') {\n\t\t\t// Thank you node-postgres for not parsing enum arrays\n\t\t\tvalue = parsePgArray(value);\n\t\t}\n\t\treturn value.map((v) => this.baseColumn.mapFromDriverValue(v));\n\t}\n\n\toverride mapToDriverValue(value: unknown[], isNestedArray = false): unknown[] | string {\n\t\tconst a = value.map((v) =>\n\t\t\tv === null\n\t\t\t\t? null\n\t\t\t\t: is(this.baseColumn, PgArray)\n\t\t\t\t? this.baseColumn.mapToDriverValue(v as unknown[], true)\n\t\t\t\t: this.baseColumn.mapToDriverValue(v)\n\t\t);\n\t\tif (isNestedArray) return a;\n\t\treturn makePgArray(a);\n\t}\n}\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport type { NonArray, Writable } from '~/utils.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\n// Enum as ts enum\n\nexport type PgEnumObjectColumnBuilderInitial = PgEnumObjectColumnBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgEnumObjectColumn';\n\tdata: TValues[keyof TValues];\n\tenumValues: string[];\n\tdriverParam: string;\n}>;\n\nexport interface PgEnumObject {\n\t(): PgEnumObjectColumnBuilderInitial<'', TValues>;\n\t(name: TName): PgEnumObjectColumnBuilderInitial;\n\t(name?: TName): PgEnumObjectColumnBuilderInitial;\n\n\treadonly enumName: string;\n\treadonly enumValues: string[];\n\treadonly schema: string | undefined;\n\t/** @internal */\n\t[isPgEnumSym]: true;\n}\n\nexport class PgEnumObjectColumnBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'PgEnumObjectColumn'> & { enumValues: string[] },\n> extends PgColumnBuilder }> {\n\tstatic override readonly [entityKind]: string = 'PgEnumObjectColumnBuilder';\n\n\tconstructor(name: T['name'], enumInstance: PgEnumObject) {\n\t\tsuper(name, 'string', 'PgEnumObjectColumn');\n\t\tthis.config.enum = enumInstance;\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgEnumObjectColumn> {\n\t\treturn new PgEnumObjectColumn>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class PgEnumObjectColumn & { enumValues: object }>\n\textends PgColumn }>\n{\n\tstatic override readonly [entityKind]: string = 'PgEnumObjectColumn';\n\n\treadonly enum;\n\toverride readonly enumValues = this.config.enum.enumValues;\n\n\tconstructor(\n\t\ttable: AnyPgTable<{ name: T['tableName'] }>,\n\t\tconfig: PgEnumObjectColumnBuilder['config'],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.enum = config.enum;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn this.enum.enumName;\n\t}\n}\n\n// Enum as string union\n\nexport type PgEnumColumnBuilderInitial =\n\tPgEnumColumnBuilder<{\n\t\tname: TName;\n\t\tdataType: 'string';\n\t\tcolumnType: 'PgEnumColumn';\n\t\tdata: TValues[number];\n\t\tenumValues: TValues;\n\t\tdriverParam: string;\n\t}>;\n\nconst isPgEnumSym = Symbol.for('drizzle:isPgEnum');\nexport interface PgEnum {\n\t(): PgEnumColumnBuilderInitial<'', TValues>;\n\t(name: TName): PgEnumColumnBuilderInitial;\n\t(name?: TName): PgEnumColumnBuilderInitial;\n\n\treadonly enumName: string;\n\treadonly enumValues: TValues;\n\treadonly schema: string | undefined;\n\t/** @internal */\n\t[isPgEnumSym]: true;\n}\n\nexport function isPgEnum(obj: unknown): obj is PgEnum<[string, ...string[]]> {\n\treturn !!obj && typeof obj === 'function' && isPgEnumSym in obj && obj[isPgEnumSym] === true;\n}\n\nexport class PgEnumColumnBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'PgEnumColumn'> & { enumValues: [string, ...string[]] },\n> extends PgColumnBuilder }> {\n\tstatic override readonly [entityKind]: string = 'PgEnumColumnBuilder';\n\n\tconstructor(name: T['name'], enumInstance: PgEnum) {\n\t\tsuper(name, 'string', 'PgEnumColumn');\n\t\tthis.config.enum = enumInstance;\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgEnumColumn> {\n\t\treturn new PgEnumColumn>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class PgEnumColumn & { enumValues: [string, ...string[]] }>\n\textends PgColumn }>\n{\n\tstatic override readonly [entityKind]: string = 'PgEnumColumn';\n\n\treadonly enum = this.config.enum;\n\toverride readonly enumValues = this.config.enum.enumValues;\n\n\tconstructor(\n\t\ttable: AnyPgTable<{ name: T['tableName'] }>,\n\t\tconfig: PgEnumColumnBuilder['config'],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.enum = config.enum;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn this.enum.enumName;\n\t}\n}\n\nexport function pgEnum>(\n\tenumName: string,\n\tvalues: T | Writable,\n): PgEnum>;\n\nexport function pgEnum>(\n\tenumName: string,\n\tenumObj: NonArray,\n): PgEnumObject;\n\nexport function pgEnum(\n\tenumName: any,\n\tinput: any,\n): any {\n\treturn Array.isArray(input)\n\t\t? pgEnumWithSchema(enumName, [...input] as [string, ...string[]], undefined)\n\t\t: pgEnumObjectWithSchema(enumName, input, undefined);\n}\n\n/** @internal */\nexport function pgEnumWithSchema>(\n\tenumName: string,\n\tvalues: T | Writable,\n\tschema?: string,\n): PgEnum> {\n\tconst enumInstance: PgEnum> = Object.assign(\n\t\t(name?: TName): PgEnumColumnBuilderInitial> =>\n\t\t\tnew PgEnumColumnBuilder(name ?? '' as TName, enumInstance),\n\t\t{\n\t\t\tenumName,\n\t\t\tenumValues: values,\n\t\t\tschema,\n\t\t\t[isPgEnumSym]: true,\n\t\t} as const,\n\t);\n\n\treturn enumInstance;\n}\n\n/** @internal */\nexport function pgEnumObjectWithSchema(\n\tenumName: string,\n\tvalues: T,\n\tschema?: string,\n): PgEnumObject {\n\tconst enumInstance: PgEnumObject = Object.assign(\n\t\t(name?: TName): PgEnumObjectColumnBuilderInitial =>\n\t\t\tnew PgEnumObjectColumnBuilder(name ?? '' as TName, enumInstance),\n\t\t{\n\t\t\tenumName,\n\t\t\tenumValues: Object.values(values),\n\t\t\tschema,\n\t\t\t[isPgEnumSym]: true,\n\t\t} as const,\n\t);\n\n\treturn enumInstance;\n}\n", "import { entityKind } from './entity.ts';\nimport type { SQL, SQLWrapper } from './sql/sql.ts';\n\nexport interface Subquery<\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTAlias extends string = string,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTSelectedFields extends Record = Record,\n> extends SQLWrapper {\n\t// SQLWrapper runtime implementation is defined in 'sql/sql.ts'\n}\nexport class Subquery<\n\tTAlias extends string = string,\n\tTSelectedFields extends Record = Record,\n> implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Subquery';\n\n\tdeclare _: {\n\t\tbrand: 'Subquery';\n\t\tsql: SQL;\n\t\tselectedFields: TSelectedFields;\n\t\talias: TAlias;\n\t\tisWith: boolean;\n\t\tusedTables?: string[];\n\t};\n\n\tconstructor(sql: SQL, fields: TSelectedFields, alias: string, isWith = false, usedTables: string[] = []) {\n\t\tthis._ = {\n\t\t\tbrand: 'Subquery',\n\t\t\tsql,\n\t\t\tselectedFields: fields as TSelectedFields,\n\t\t\talias: alias as TAlias,\n\t\t\tisWith,\n\t\t\tusedTables,\n\t\t};\n\t}\n\n\t// getSQL(): SQL {\n\t// \treturn new SQL([this]);\n\t// }\n}\n\nexport class WithSubquery<\n\tTAlias extends string = string,\n\tTSelection extends Record = Record,\n> extends Subquery {\n\tstatic override readonly [entityKind]: string = 'WithSubquery';\n}\n\nexport type WithSubqueryWithoutSelection = WithSubquery;\n", "// package.json\nvar version = \"0.44.7\";\n\n// src/version.ts\nvar compatibilityVersion = 10;\nexport {\n compatibilityVersion,\n version as npmVersion\n};\n", "import type { Span, Tracer } from '@opentelemetry/api';\nimport { iife } from '~/tracing-utils.ts';\nimport { npmVersion } from '~/version.ts';\n\nlet otel: typeof import('@opentelemetry/api') | undefined;\nlet rawTracer: Tracer | undefined;\n// try {\n// \totel = await import('@opentelemetry/api');\n// } catch (err: any) {\n// \tif (err.code !== 'MODULE_NOT_FOUND' && err.code !== 'ERR_MODULE_NOT_FOUND') {\n// \t\tthrow err;\n// \t}\n// }\n\ntype SpanName =\n\t| 'drizzle.operation'\n\t| 'drizzle.prepareQuery'\n\t| 'drizzle.buildSQL'\n\t| 'drizzle.execute'\n\t| 'drizzle.driver.execute'\n\t| 'drizzle.mapResponse';\n\n/** @internal */\nexport const tracer = {\n\tstartActiveSpan unknown>(name: SpanName, fn: F): ReturnType {\n\t\tif (!otel) {\n\t\t\treturn fn() as ReturnType;\n\t\t}\n\n\t\tif (!rawTracer) {\n\t\t\trawTracer = otel.trace.getTracer('drizzle-orm', npmVersion);\n\t\t}\n\n\t\treturn iife(\n\t\t\t(otel, rawTracer) =>\n\t\t\t\trawTracer.startActiveSpan(\n\t\t\t\t\tname,\n\t\t\t\t\t((span: Span) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn fn(span);\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tspan.setStatus({\n\t\t\t\t\t\t\t\tcode: otel.SpanStatusCode.ERROR,\n\t\t\t\t\t\t\t\tmessage: e instanceof Error ? e.message : 'Unknown error', // eslint-disable-line no-instanceof/no-instanceof\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tthrow e;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tspan.end();\n\t\t\t\t\t\t}\n\t\t\t\t\t}) as F,\n\t\t\t\t),\n\t\t\totel,\n\t\t\trawTracer,\n\t\t);\n\t},\n};\n", "export const ViewBaseConfig = Symbol.for('drizzle:ViewBaseConfig');\n", "import type { CasingCache } from '~/casing.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport { isPgEnum } from '~/pg-core/columns/enum.ts';\nimport type { SelectResult } from '~/query-builders/select.types.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { tracer } from '~/tracing.ts';\nimport type { Assume, Equal } from '~/utils.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport type { AnyColumn } from '../column.ts';\nimport { Column } from '../column.ts';\nimport { IsAlias, Table } from '../table.ts';\n\n/**\n * This class is used to indicate a primitive param value that is used in `sql` tag.\n * It is only used on type level and is never instantiated at runtime.\n * If you see a value of this type in the code, its runtime value is actually the primitive param value.\n */\nexport class FakePrimitiveParam {\n\tstatic readonly [entityKind]: string = 'FakePrimitiveParam';\n}\n\nexport type Chunk =\n\t| string\n\t| Table\n\t| View\n\t| AnyColumn\n\t| Name\n\t| Param\n\t| Placeholder\n\t| SQL;\n\nexport interface BuildQueryConfig {\n\tcasing: CasingCache;\n\tescapeName(name: string): string;\n\tescapeParam(num: number, value: unknown): string;\n\tescapeString(str: string): string;\n\tprepareTyping?: (encoder: DriverValueEncoder) => QueryTypingsValue;\n\tparamStartIndex?: { value: number };\n\tinlineParams?: boolean;\n\tinvokeSource?: 'indexes' | undefined;\n}\n\nexport type QueryTypingsValue = 'json' | 'decimal' | 'time' | 'timestamp' | 'uuid' | 'date' | 'none';\n\nexport interface Query {\n\tsql: string;\n\tparams: unknown[];\n}\n\nexport interface QueryWithTypings extends Query {\n\ttypings?: QueryTypingsValue[];\n}\n\n/**\n * Any value that implements the `getSQL` method. The implementations include:\n * - `Table`\n * - `Column`\n * - `View`\n * - `Subquery`\n * - `SQL`\n * - `SQL.Aliased`\n * - `Placeholder`\n * - `Param`\n */\nexport interface SQLWrapper {\n\tgetSQL(): SQL;\n\tshouldOmitSQLParens?(): boolean;\n}\n\nexport function isSQLWrapper(value: unknown): value is SQLWrapper {\n\treturn value !== null && value !== undefined && typeof (value as any).getSQL === 'function';\n}\n\nfunction mergeQueries(queries: QueryWithTypings[]): QueryWithTypings {\n\tconst result: QueryWithTypings = { sql: '', params: [] };\n\tfor (const query of queries) {\n\t\tresult.sql += query.sql;\n\t\tresult.params.push(...query.params);\n\t\tif (query.typings?.length) {\n\t\t\tif (!result.typings) {\n\t\t\t\tresult.typings = [];\n\t\t\t}\n\t\t\tresult.typings.push(...query.typings);\n\t\t}\n\t}\n\treturn result;\n}\n\nexport class StringChunk implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'StringChunk';\n\n\treadonly value: string[];\n\n\tconstructor(value: string | string[]) {\n\t\tthis.value = Array.isArray(value) ? value : [value];\n\t}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\nexport class SQL implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'SQL';\n\n\tdeclare _: {\n\t\tbrand: 'SQL';\n\t\ttype: T;\n\t};\n\n\t/** @internal */\n\tdecoder: DriverValueDecoder = noopDecoder;\n\tprivate shouldInlineParams = false;\n\n\t/** @internal */\n\tusedTables: string[] = [];\n\n\tconstructor(readonly queryChunks: SQLChunk[]) {\n\t\tfor (const chunk of queryChunks) {\n\t\t\tif (is(chunk, Table)) {\n\t\t\t\tconst schemaName = chunk[Table.Symbol.Schema];\n\n\t\t\t\tthis.usedTables.push(\n\t\t\t\t\tschemaName === undefined\n\t\t\t\t\t\t? chunk[Table.Symbol.Name]\n\t\t\t\t\t\t: schemaName + '.' + chunk[Table.Symbol.Name],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tappend(query: SQL): this {\n\t\tthis.queryChunks.push(...query.queryChunks);\n\t\treturn this;\n\t}\n\n\ttoQuery(config: BuildQueryConfig): QueryWithTypings {\n\t\treturn tracer.startActiveSpan('drizzle.buildSQL', (span) => {\n\t\t\tconst query = this.buildQueryFromSourceParams(this.queryChunks, config);\n\t\t\tspan?.setAttributes({\n\t\t\t\t'drizzle.query.text': query.sql,\n\t\t\t\t'drizzle.query.params': JSON.stringify(query.params),\n\t\t\t});\n\t\t\treturn query;\n\t\t});\n\t}\n\n\tbuildQueryFromSourceParams(chunks: SQLChunk[], _config: BuildQueryConfig): Query {\n\t\tconst config = Object.assign({}, _config, {\n\t\t\tinlineParams: _config.inlineParams || this.shouldInlineParams,\n\t\t\tparamStartIndex: _config.paramStartIndex || { value: 0 },\n\t\t});\n\n\t\tconst {\n\t\t\tcasing,\n\t\t\tescapeName,\n\t\t\tescapeParam,\n\t\t\tprepareTyping,\n\t\t\tinlineParams,\n\t\t\tparamStartIndex,\n\t\t} = config;\n\n\t\treturn mergeQueries(chunks.map((chunk): QueryWithTypings => {\n\t\t\tif (is(chunk, StringChunk)) {\n\t\t\t\treturn { sql: chunk.value.join(''), params: [] };\n\t\t\t}\n\n\t\t\tif (is(chunk, Name)) {\n\t\t\t\treturn { sql: escapeName(chunk.value), params: [] };\n\t\t\t}\n\n\t\t\tif (chunk === undefined) {\n\t\t\t\treturn { sql: '', params: [] };\n\t\t\t}\n\n\t\t\tif (Array.isArray(chunk)) {\n\t\t\t\tconst result: SQLChunk[] = [new StringChunk('(')];\n\t\t\t\tfor (const [i, p] of chunk.entries()) {\n\t\t\t\t\tresult.push(p);\n\t\t\t\t\tif (i < chunk.length - 1) {\n\t\t\t\t\t\tresult.push(new StringChunk(', '));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult.push(new StringChunk(')'));\n\t\t\t\treturn this.buildQueryFromSourceParams(result, config);\n\t\t\t}\n\n\t\t\tif (is(chunk, SQL)) {\n\t\t\t\treturn this.buildQueryFromSourceParams(chunk.queryChunks, {\n\t\t\t\t\t...config,\n\t\t\t\t\tinlineParams: inlineParams || chunk.shouldInlineParams,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (is(chunk, Table)) {\n\t\t\t\tconst schemaName = chunk[Table.Symbol.Schema];\n\t\t\t\tconst tableName = chunk[Table.Symbol.Name];\n\t\t\t\treturn {\n\t\t\t\t\tsql: schemaName === undefined || chunk[IsAlias]\n\t\t\t\t\t\t? escapeName(tableName)\n\t\t\t\t\t\t: escapeName(schemaName) + '.' + escapeName(tableName),\n\t\t\t\t\tparams: [],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (is(chunk, Column)) {\n\t\t\t\tconst columnName = casing.getColumnCasing(chunk);\n\t\t\t\tif (_config.invokeSource === 'indexes') {\n\t\t\t\t\treturn { sql: escapeName(columnName), params: [] };\n\t\t\t\t}\n\n\t\t\t\tconst schemaName = chunk.table[Table.Symbol.Schema];\n\t\t\t\treturn {\n\t\t\t\t\tsql: chunk.table[IsAlias] || schemaName === undefined\n\t\t\t\t\t\t? escapeName(chunk.table[Table.Symbol.Name]) + '.' + escapeName(columnName)\n\t\t\t\t\t\t: escapeName(schemaName) + '.' + escapeName(chunk.table[Table.Symbol.Name]) + '.'\n\t\t\t\t\t\t\t+ escapeName(columnName),\n\t\t\t\t\tparams: [],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (is(chunk, View)) {\n\t\t\t\tconst schemaName = chunk[ViewBaseConfig].schema;\n\t\t\t\tconst viewName = chunk[ViewBaseConfig].name;\n\t\t\t\treturn {\n\t\t\t\t\tsql: schemaName === undefined || chunk[ViewBaseConfig].isAlias\n\t\t\t\t\t\t? escapeName(viewName)\n\t\t\t\t\t\t: escapeName(schemaName) + '.' + escapeName(viewName),\n\t\t\t\t\tparams: [],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (is(chunk, Param)) {\n\t\t\t\tif (is(chunk.value, Placeholder)) {\n\t\t\t\t\treturn { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ['none'] };\n\t\t\t\t}\n\n\t\t\t\tconst mappedValue = chunk.value === null ? null : chunk.encoder.mapToDriverValue(chunk.value);\n\n\t\t\t\tif (is(mappedValue, SQL)) {\n\t\t\t\t\treturn this.buildQueryFromSourceParams([mappedValue], config);\n\t\t\t\t}\n\n\t\t\t\tif (inlineParams) {\n\t\t\t\t\treturn { sql: this.mapInlineParam(mappedValue, config), params: [] };\n\t\t\t\t}\n\n\t\t\t\tlet typings: QueryTypingsValue[] = ['none'];\n\t\t\t\tif (prepareTyping) {\n\t\t\t\t\ttypings = [prepareTyping(chunk.encoder)];\n\t\t\t\t}\n\n\t\t\t\treturn { sql: escapeParam(paramStartIndex.value++, mappedValue), params: [mappedValue], typings };\n\t\t\t}\n\n\t\t\tif (is(chunk, Placeholder)) {\n\t\t\t\treturn { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ['none'] };\n\t\t\t}\n\n\t\t\tif (is(chunk, SQL.Aliased) && chunk.fieldAlias !== undefined) {\n\t\t\t\treturn { sql: escapeName(chunk.fieldAlias), params: [] };\n\t\t\t}\n\n\t\t\tif (is(chunk, Subquery)) {\n\t\t\t\tif (chunk._.isWith) {\n\t\t\t\t\treturn { sql: escapeName(chunk._.alias), params: [] };\n\t\t\t\t}\n\t\t\t\treturn this.buildQueryFromSourceParams([\n\t\t\t\t\tnew StringChunk('('),\n\t\t\t\t\tchunk._.sql,\n\t\t\t\t\tnew StringChunk(') '),\n\t\t\t\t\tnew Name(chunk._.alias),\n\t\t\t\t], config);\n\t\t\t}\n\n\t\t\tif (isPgEnum(chunk)) {\n\t\t\t\tif (chunk.schema) {\n\t\t\t\t\treturn { sql: escapeName(chunk.schema) + '.' + escapeName(chunk.enumName), params: [] };\n\t\t\t\t}\n\t\t\t\treturn { sql: escapeName(chunk.enumName), params: [] };\n\t\t\t}\n\n\t\t\tif (isSQLWrapper(chunk)) {\n\t\t\t\tif (chunk.shouldOmitSQLParens?.()) {\n\t\t\t\t\treturn this.buildQueryFromSourceParams([chunk.getSQL()], config);\n\t\t\t\t}\n\t\t\t\treturn this.buildQueryFromSourceParams([\n\t\t\t\t\tnew StringChunk('('),\n\t\t\t\t\tchunk.getSQL(),\n\t\t\t\t\tnew StringChunk(')'),\n\t\t\t\t], config);\n\t\t\t}\n\n\t\t\tif (inlineParams) {\n\t\t\t\treturn { sql: this.mapInlineParam(chunk, config), params: [] };\n\t\t\t}\n\n\t\t\treturn { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ['none'] };\n\t\t}));\n\t}\n\n\tprivate mapInlineParam(\n\t\tchunk: unknown,\n\t\t{ escapeString }: BuildQueryConfig,\n\t): string {\n\t\tif (chunk === null) {\n\t\t\treturn 'null';\n\t\t}\n\t\tif (typeof chunk === 'number' || typeof chunk === 'boolean') {\n\t\t\treturn chunk.toString();\n\t\t}\n\t\tif (typeof chunk === 'string') {\n\t\t\treturn escapeString(chunk);\n\t\t}\n\t\tif (typeof chunk === 'object') {\n\t\t\tconst mappedValueAsString = chunk.toString();\n\t\t\tif (mappedValueAsString === '[object Object]') {\n\t\t\t\treturn escapeString(JSON.stringify(chunk));\n\t\t\t}\n\t\t\treturn escapeString(mappedValueAsString);\n\t\t}\n\t\tthrow new Error('Unexpected param value: ' + chunk);\n\t}\n\n\tgetSQL(): SQL {\n\t\treturn this;\n\t}\n\n\tas(alias: string): SQL.Aliased;\n\t/**\n\t * @deprecated\n\t * Use ``sql`query`.as(alias)`` instead.\n\t */\n\tas(): SQL;\n\t/**\n\t * @deprecated\n\t * Use ``sql`query`.as(alias)`` instead.\n\t */\n\tas(alias: string): SQL.Aliased;\n\tas(alias?: string): SQL | SQL.Aliased {\n\t\t// TODO: remove with deprecated overloads\n\t\tif (alias === undefined) {\n\t\t\treturn this;\n\t\t}\n\n\t\treturn new SQL.Aliased(this, alias);\n\t}\n\n\tmapWith<\n\t\tTDecoder extends\n\t\t\t| DriverValueDecoder\n\t\t\t| DriverValueDecoder['mapFromDriverValue'],\n\t>(decoder: TDecoder): SQL> {\n\t\tthis.decoder = typeof decoder === 'function' ? { mapFromDriverValue: decoder } : decoder;\n\t\treturn this as SQL>;\n\t}\n\n\tinlineParams(): this {\n\t\tthis.shouldInlineParams = true;\n\t\treturn this;\n\t}\n\n\t/**\n\t * This method is used to conditionally include a part of the query.\n\t *\n\t * @param condition - Condition to check\n\t * @returns itself if the condition is `true`, otherwise `undefined`\n\t */\n\tif(condition: any | undefined): this | undefined {\n\t\treturn condition ? this : undefined;\n\t}\n}\n\nexport type GetDecoderResult = T extends Column ? T['_']['data'] : T extends\n\t| DriverValueDecoder\n\t| DriverValueDecoder['mapFromDriverValue'] ? TData\n: never;\n\n/**\n * Any DB name (table, column, index etc.)\n */\nexport class Name implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Name';\n\n\tprotected brand!: 'Name';\n\n\tconstructor(readonly value: string) {}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\n/**\n * Any DB name (table, column, index etc.)\n * @deprecated Use `sql.identifier` instead.\n */\nexport function name(value: string): Name {\n\treturn new Name(value);\n}\n\nexport interface DriverValueDecoder {\n\tmapFromDriverValue(value: TDriverParam): TData;\n}\n\nexport interface DriverValueEncoder {\n\tmapToDriverValue(value: TData): TDriverParam | SQL;\n}\n\nexport function isDriverValueEncoder(value: unknown): value is DriverValueEncoder {\n\treturn typeof value === 'object' && value !== null && 'mapToDriverValue' in value\n\t\t&& typeof (value as any).mapToDriverValue === 'function';\n}\n\nexport const noopDecoder: DriverValueDecoder = {\n\tmapFromDriverValue: (value) => value,\n};\n\nexport const noopEncoder: DriverValueEncoder = {\n\tmapToDriverValue: (value) => value,\n};\n\nexport interface DriverValueMapper\n\textends DriverValueDecoder, DriverValueEncoder\n{}\n\nexport const noopMapper: DriverValueMapper = {\n\t...noopDecoder,\n\t...noopEncoder,\n};\n\n/** Parameter value that is optionally bound to an encoder (for example, a column). */\nexport class Param implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Param';\n\n\tprotected brand!: 'BoundParamValue';\n\n\t/**\n\t * @param value - Parameter value\n\t * @param encoder - Encoder to convert the value to a driver parameter\n\t */\n\tconstructor(\n\t\treadonly value: TDataType,\n\t\treadonly encoder: DriverValueEncoder = noopEncoder,\n\t) {}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\n/** @deprecated Use `sql.param` instead. */\nexport function param(\n\tvalue: TData,\n\tencoder?: DriverValueEncoder,\n): Param {\n\treturn new Param(value, encoder);\n}\n\n/**\n * Anything that can be passed to the `` sql`...` `` tagged function.\n */\nexport type SQLChunk =\n\t| StringChunk\n\t| SQLChunk[]\n\t| SQLWrapper\n\t| SQL\n\t| Table\n\t| View\n\t| Subquery\n\t| AnyColumn\n\t| Param\n\t| Name\n\t| undefined\n\t| FakePrimitiveParam\n\t| Placeholder;\n\nexport function sql(strings: TemplateStringsArray, ...params: any[]): SQL;\n/*\n\tThe type of `params` is specified as `SQLChunk[]`, but that's slightly incorrect -\n\tin runtime, users won't pass `FakePrimitiveParam` instances as `params` - they will pass primitive values\n\twhich will be wrapped in `Param`. That's why the overload specifies `params` as `any[]` and not as `SQLSourceParam[]`.\n\tThis type is used to make our lives easier and the type checker happy.\n*/\nexport function sql(strings: TemplateStringsArray, ...params: SQLChunk[]): SQL {\n\tconst queryChunks: SQLChunk[] = [];\n\tif (params.length > 0 || (strings.length > 0 && strings[0] !== '')) {\n\t\tqueryChunks.push(new StringChunk(strings[0]!));\n\t}\n\tfor (const [paramIndex, param] of params.entries()) {\n\t\tqueryChunks.push(param, new StringChunk(strings[paramIndex + 1]!));\n\t}\n\n\treturn new SQL(queryChunks);\n}\n\nexport namespace sql {\n\texport function empty(): SQL {\n\t\treturn new SQL([]);\n\t}\n\n\t/** @deprecated - use `sql.join()` */\n\texport function fromList(list: SQLChunk[]): SQL {\n\t\treturn new SQL(list);\n\t}\n\n\t/**\n\t * Convenience function to create an SQL query from a raw string.\n\t * @param str The raw SQL query string.\n\t */\n\texport function raw(str: string): SQL {\n\t\treturn new SQL([new StringChunk(str)]);\n\t}\n\n\t/**\n\t * Join a list of SQL chunks with a separator.\n\t * @example\n\t * ```ts\n\t * const query = sql.join([sql`a`, sql`b`, sql`c`]);\n\t * // sql`abc`\n\t * ```\n\t * @example\n\t * ```ts\n\t * const query = sql.join([sql`a`, sql`b`, sql`c`], sql`, `);\n\t * // sql`a, b, c`\n\t * ```\n\t */\n\texport function join(chunks: SQLChunk[], separator?: SQLChunk): SQL {\n\t\tconst result: SQLChunk[] = [];\n\t\tfor (const [i, chunk] of chunks.entries()) {\n\t\t\tif (i > 0 && separator !== undefined) {\n\t\t\t\tresult.push(separator);\n\t\t\t}\n\t\t\tresult.push(chunk);\n\t\t}\n\t\treturn new SQL(result);\n\t}\n\n\t/**\n\t * Create a SQL chunk that represents a DB identifier (table, column, index etc.).\n\t * When used in a query, the identifier will be escaped based on the DB engine.\n\t * For example, in PostgreSQL, identifiers are escaped with double quotes.\n\t *\n\t * **WARNING: This function does not offer any protection against SQL injections, so you must validate any user input beforehand.**\n\t *\n\t * @example ```ts\n\t * const query = sql`SELECT * FROM ${sql.identifier('my-table')}`;\n\t * // 'SELECT * FROM \"my-table\"'\n\t * ```\n\t */\n\texport function identifier(value: string): Name {\n\t\treturn new Name(value);\n\t}\n\n\texport function placeholder(name: TName): Placeholder {\n\t\treturn new Placeholder(name);\n\t}\n\n\texport function param(\n\t\tvalue: TData,\n\t\tencoder?: DriverValueEncoder,\n\t): Param {\n\t\treturn new Param(value, encoder);\n\t}\n}\n\nexport namespace SQL {\n\texport class Aliased implements SQLWrapper {\n\t\tstatic readonly [entityKind]: string = 'SQL.Aliased';\n\n\t\tdeclare _: {\n\t\t\tbrand: 'SQL.Aliased';\n\t\t\ttype: T;\n\t\t};\n\n\t\t/** @internal */\n\t\tisSelectionField = false;\n\n\t\tconstructor(\n\t\t\treadonly sql: SQL,\n\t\t\treadonly fieldAlias: string,\n\t\t) {}\n\n\t\tgetSQL(): SQL {\n\t\t\treturn this.sql;\n\t\t}\n\n\t\t/** @internal */\n\t\tclone() {\n\t\t\treturn new Aliased(this.sql, this.fieldAlias);\n\t\t}\n\t}\n}\n\nexport class Placeholder implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Placeholder';\n\n\tdeclare protected: TValue;\n\n\tconstructor(readonly name: TName) {}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\n/** @deprecated Use `sql.placeholder` instead. */\nexport function placeholder(name: TName): Placeholder {\n\treturn new Placeholder(name);\n}\n\nexport function fillPlaceholders(params: unknown[], values: Record): unknown[] {\n\treturn params.map((p) => {\n\t\tif (is(p, Placeholder)) {\n\t\t\tif (!(p.name in values)) {\n\t\t\t\tthrow new Error(`No value for placeholder \"${p.name}\" was provided`);\n\t\t\t}\n\n\t\t\treturn values[p.name];\n\t\t}\n\n\t\tif (is(p, Param) && is(p.value, Placeholder)) {\n\t\t\tif (!(p.value.name in values)) {\n\t\t\t\tthrow new Error(`No value for placeholder \"${p.value.name}\" was provided`);\n\t\t\t}\n\n\t\t\treturn p.encoder.mapToDriverValue(values[p.value.name]);\n\t\t}\n\n\t\treturn p;\n\t});\n}\n\nexport type ColumnsSelection = Record;\n\nconst IsDrizzleView = Symbol.for('drizzle:IsDrizzleView');\n\nexport abstract class View<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n\tTSelection extends ColumnsSelection = ColumnsSelection,\n> implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'View';\n\n\tdeclare _: {\n\t\tbrand: 'View';\n\t\tviewBrand: string;\n\t\tname: TName;\n\t\texisting: TExisting;\n\t\tselectedFields: TSelection;\n\t};\n\n\t/** @internal */\n\t[ViewBaseConfig]: {\n\t\tname: TName;\n\t\toriginalName: TName;\n\t\tschema: string | undefined;\n\t\tselectedFields: ColumnsSelection;\n\t\tisExisting: TExisting;\n\t\tquery: TExisting extends true ? undefined : SQL;\n\t\tisAlias: boolean;\n\t};\n\n\t/** @internal */\n\t[IsDrizzleView] = true;\n\n\tdeclare readonly $inferSelect: InferSelectViewModel, TExisting, TSelection>>;\n\n\tconstructor(\n\t\t{ name, schema, selectedFields, query }: {\n\t\t\tname: TName;\n\t\t\tschema: string | undefined;\n\t\t\tselectedFields: ColumnsSelection;\n\t\t\tquery: SQL | undefined;\n\t\t},\n\t) {\n\t\tthis[ViewBaseConfig] = {\n\t\t\tname,\n\t\t\toriginalName: name,\n\t\t\tschema,\n\t\t\tselectedFields,\n\t\t\tquery: query as (TExisting extends true ? undefined : SQL),\n\t\t\tisExisting: !query as TExisting,\n\t\t\tisAlias: false,\n\t\t};\n\t}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\nexport function isView(view: unknown): view is View {\n\treturn typeof view === 'object' && view !== null && IsDrizzleView in view;\n}\n\nexport function getViewName(view: T): T['_']['name'] {\n\treturn view[ViewBaseConfig].name;\n}\n\nexport type InferSelectViewModel =\n\tEqual extends true ? { [x: string]: unknown }\n\t\t: SelectResult<\n\t\t\tTView['_']['selectedFields'],\n\t\t\t'single',\n\t\t\tRecord\n\t\t>;\n\n// Defined separately from the Column class to resolve circular dependency\nColumn.prototype.getSQL = function() {\n\treturn new SQL([this]);\n};\n\n// Defined separately from the Table class to resolve circular dependency\nTable.prototype.getSQL = function() {\n\treturn new SQL([this]);\n};\n\n// Defined separately from the Column class to resolve circular dependency\nSubquery.prototype.getSQL = function() {\n\treturn new SQL([this]);\n};\n", "import type { Cache } from './cache/core/cache.ts';\nimport type { AnyColumn } from './column.ts';\nimport { Column } from './column.ts';\nimport { is } from './entity.ts';\nimport type { Logger } from './logger.ts';\nimport type { SelectedFieldsOrdered } from './operations.ts';\nimport type { TableLike } from './query-builders/select.types.ts';\nimport { Param, SQL, View } from './sql/sql.ts';\nimport type { DriverValueDecoder } from './sql/sql.ts';\nimport { Subquery } from './subquery.ts';\nimport { getTableName, Table } from './table.ts';\nimport { ViewBaseConfig } from './view-common.ts';\n\n/** @internal */\nexport function mapResultRow(\n\tcolumns: SelectedFieldsOrdered,\n\trow: unknown[],\n\tjoinsNotNullableMap: Record | undefined,\n): TResult {\n\t// Key -> nested object key, value -> table name if all fields in the nested object are from the same table, false otherwise\n\tconst nullifyMap: Record = {};\n\n\tconst result = columns.reduce>(\n\t\t(result, { path, field }, columnIndex) => {\n\t\t\tlet decoder: DriverValueDecoder;\n\t\t\tif (is(field, Column)) {\n\t\t\t\tdecoder = field;\n\t\t\t} else if (is(field, SQL)) {\n\t\t\t\tdecoder = field.decoder;\n\t\t\t} else {\n\t\t\t\tdecoder = field.sql.decoder;\n\t\t\t}\n\t\t\tlet node = result;\n\t\t\tfor (const [pathChunkIndex, pathChunk] of path.entries()) {\n\t\t\t\tif (pathChunkIndex < path.length - 1) {\n\t\t\t\t\tif (!(pathChunk in node)) {\n\t\t\t\t\t\tnode[pathChunk] = {};\n\t\t\t\t\t}\n\t\t\t\t\tnode = node[pathChunk];\n\t\t\t\t} else {\n\t\t\t\t\tconst rawValue = row[columnIndex]!;\n\t\t\t\t\tconst value = node[pathChunk] = rawValue === null ? null : decoder.mapFromDriverValue(rawValue);\n\n\t\t\t\t\tif (joinsNotNullableMap && is(field, Column) && path.length === 2) {\n\t\t\t\t\t\tconst objectName = path[0]!;\n\t\t\t\t\t\tif (!(objectName in nullifyMap)) {\n\t\t\t\t\t\t\tnullifyMap[objectName] = value === null ? getTableName(field.table) : false;\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\ttypeof nullifyMap[objectName] === 'string' && nullifyMap[objectName] !== getTableName(field.table)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tnullifyMap[objectName] = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t},\n\t\t{},\n\t);\n\n\t// Nullify all nested objects from nullifyMap that are nullable\n\tif (joinsNotNullableMap && Object.keys(nullifyMap).length > 0) {\n\t\tfor (const [objectName, tableName] of Object.entries(nullifyMap)) {\n\t\t\tif (typeof tableName === 'string' && !joinsNotNullableMap[tableName]) {\n\t\t\t\tresult[objectName] = null;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result as TResult;\n}\n\n/** @internal */\nexport function orderSelectedFields(\n\tfields: Record,\n\tpathPrefix?: string[],\n): SelectedFieldsOrdered {\n\treturn Object.entries(fields).reduce>((result, [name, field]) => {\n\t\tif (typeof name !== 'string') {\n\t\t\treturn result;\n\t\t}\n\n\t\tconst newPath = pathPrefix ? [...pathPrefix, name] : [name];\n\t\tif (is(field, Column) || is(field, SQL) || is(field, SQL.Aliased)) {\n\t\t\tresult.push({ path: newPath, field });\n\t\t} else if (is(field, Table)) {\n\t\t\tresult.push(...orderSelectedFields(field[Table.Symbol.Columns], newPath));\n\t\t} else {\n\t\t\tresult.push(...orderSelectedFields(field as Record, newPath));\n\t\t}\n\t\treturn result;\n\t}, []) as SelectedFieldsOrdered;\n}\n\nexport function haveSameKeys(left: Record, right: Record) {\n\tconst leftKeys = Object.keys(left);\n\tconst rightKeys = Object.keys(right);\n\n\tif (leftKeys.length !== rightKeys.length) {\n\t\treturn false;\n\t}\n\n\tfor (const [index, key] of leftKeys.entries()) {\n\t\tif (key !== rightKeys[index]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/** @internal */\nexport function mapUpdateSet(table: Table, values: Record): UpdateSet {\n\tconst entries: [string, UpdateSet[string]][] = Object.entries(values)\n\t\t.filter(([, value]) => value !== undefined)\n\t\t.map(([key, value]) => {\n\t\t\t// eslint-disable-next-line unicorn/prefer-ternary\n\t\t\tif (is(value, SQL) || is(value, Column)) {\n\t\t\t\treturn [key, value];\n\t\t\t} else {\n\t\t\t\treturn [key, new Param(value, table[Table.Symbol.Columns][key])];\n\t\t\t}\n\t\t});\n\n\tif (entries.length === 0) {\n\t\tthrow new Error('No values to set');\n\t}\n\n\treturn Object.fromEntries(entries);\n}\n\nexport type UpdateSet = Record;\n\nexport type OneOrMany = T | T[];\n\nexport type Update =\n\t& {\n\t\t[K in Exclude]: T[K];\n\t}\n\t& TUpdate;\n\nexport type Simplify =\n\t& {\n\t\t// @ts-ignore - \"Type parameter 'K' has a circular constraint\", not sure why\n\t\t[K in keyof T]: T[K];\n\t}\n\t& {};\n\nexport type SimplifyMappedType = [T] extends [unknown] ? T : never;\n\nexport type ShallowRecord = SimplifyMappedType<{ [P in K]: T }>;\n\nexport type Assume = T extends U ? T : U;\n\nexport type Equal = (() => T extends X ? 1 : 2) extends (() => T extends Y ? 1 : 2) ? true : false;\n\nexport interface DrizzleTypeError {\n\t$drizzleTypeError: T;\n}\n\nexport type ValueOrArray = T | T[];\n\n/** @internal */\nexport function applyMixins(baseClass: any, extendedClasses: any[]) {\n\tfor (const extendedClass of extendedClasses) {\n\t\tfor (const name of Object.getOwnPropertyNames(extendedClass.prototype)) {\n\t\t\tif (name === 'constructor') continue;\n\n\t\t\tObject.defineProperty(\n\t\t\t\tbaseClass.prototype,\n\t\t\t\tname,\n\t\t\t\tObject.getOwnPropertyDescriptor(extendedClass.prototype, name) || Object.create(null),\n\t\t\t);\n\t\t}\n\t}\n}\n\nexport type Or = T1 extends true ? true : T2 extends true ? true : false;\n\nexport type IfThenElse = If extends true ? Then : Else;\n\nexport type PromiseOf = T extends Promise ? U : T;\n\nexport type Writable = {\n\t-readonly [P in keyof T]: T[P];\n};\n\nexport type NonArray = T extends any[] ? never : T;\n\nexport function getTableColumns(table: T): T['_']['columns'] {\n\treturn table[Table.Symbol.Columns];\n}\n\nexport function getViewSelectedFields(view: T): T['_']['selectedFields'] {\n\treturn view[ViewBaseConfig].selectedFields;\n}\n\n/** @internal */\nexport function getTableLikeName(table: TableLike): string | undefined {\n\treturn is(table, Subquery)\n\t\t? table._.alias\n\t\t: is(table, View)\n\t\t? table[ViewBaseConfig].name\n\t\t: is(table, SQL)\n\t\t? undefined\n\t\t: table[Table.Symbol.IsAlias]\n\t\t? table[Table.Symbol.Name]\n\t\t: table[Table.Symbol.BaseName];\n}\n\nexport type ColumnsWithTable<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends AnyColumn<{ tableName: TTableName }>[],\n> = { [Key in keyof TColumns]: AnyColumn<{ tableName: TForeignTableName }> };\n\nexport type Casing = 'snake_case' | 'camelCase';\n\nexport interface DrizzleConfig = Record> {\n\tlogger?: boolean | Logger;\n\tschema?: TSchema;\n\tcasing?: Casing;\n\tcache?: Cache;\n}\nexport type ValidateShape = T extends ValidShape\n\t? Exclude extends never ? TResult\n\t: DrizzleTypeError<\n\t\t`Invalid key(s): ${Exclude<(keyof T) & (string | number | bigint | boolean | null | undefined), keyof ValidShape>}`\n\t>\n\t: never;\n\nexport type KnownKeysOnly = {\n\t[K in keyof T]: K extends keyof U ? T[K] : never;\n};\n\nexport type IsAny = 0 extends (1 & T) ? true : false;\n\n/** @internal */\nexport function getColumnNameAndConfig<\n\tTConfig extends Record | undefined,\n>(a: string | TConfig | undefined, b: TConfig | undefined) {\n\treturn {\n\t\tname: typeof a === 'string' && a.length > 0 ? a : '' as string,\n\t\tconfig: typeof a === 'object' ? a : b as TConfig,\n\t};\n}\n\nexport type IfNotImported = unknown extends T ? Y : N;\n\nexport type ImportTypeError =\n\t`Please install \\`${TPackageName}\\` to allow Drizzle ORM to connect to the database`;\n\nexport type RequireAtLeastOne = Keys extends any\n\t? Required> & Partial>\n\t: never;\n\ntype ExpectedConfigShape = {\n\tlogger?: boolean | {\n\t\tlogQuery(query: string, params: unknown[]): void;\n\t};\n\tschema?: Record;\n\tcasing?: 'snake_case' | 'camelCase';\n};\n\n// If this errors, you must update config shape checker function with new config specs\nconst _: DrizzleConfig = {} as ExpectedConfigShape;\nconst __: ExpectedConfigShape = {} as DrizzleConfig;\n\nexport function isConfig(data: any): boolean {\n\tif (typeof data !== 'object' || data === null) return false;\n\n\tif (data.constructor.name !== 'Object') return false;\n\n\tif ('logger' in data) {\n\t\tconst type = typeof data['logger'];\n\t\tif (\n\t\t\ttype !== 'boolean' && (type !== 'object' || typeof data['logger']['logQuery'] !== 'function')\n\t\t\t&& type !== 'undefined'\n\t\t) return false;\n\n\t\treturn true;\n\t}\n\n\tif ('schema' in data) {\n\t\tconst type = typeof data['schema'];\n\t\tif (type !== 'object' && type !== 'undefined') return false;\n\n\t\treturn true;\n\t}\n\n\tif ('casing' in data) {\n\t\tconst type = typeof data['casing'];\n\t\tif (type !== 'string' && type !== 'undefined') return false;\n\n\t\treturn true;\n\t}\n\n\tif ('mode' in data) {\n\t\tif (data['mode'] !== 'default' || data['mode'] !== 'planetscale' || data['mode'] !== undefined) return false;\n\n\t\treturn true;\n\t}\n\n\tif ('connection' in data) {\n\t\tconst type = typeof data['connection'];\n\t\tif (type !== 'string' && type !== 'object' && type !== 'undefined') return false;\n\n\t\treturn true;\n\t}\n\n\tif ('client' in data) {\n\t\tconst type = typeof data['client'];\n\t\tif (type !== 'object' && type !== 'function' && type !== 'undefined') return false;\n\n\t\treturn true;\n\t}\n\n\tif (Object.keys(data).length === 0) return true;\n\n\treturn false;\n}\n\nexport type NeonAuthToken = string | (() => string | Promise);\n\nexport const textDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder();\n", "import type { BuildColumns, BuildExtraConfigColumns } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport { Table, type TableConfig as TableConfigBase, type UpdateTableConfig } from '~/table.ts';\nimport type { CheckBuilder } from './checks.ts';\nimport { getPgColumnBuilders, type PgColumnsBuilders } from './columns/all.ts';\nimport type { ExtraConfigColumn, PgColumn, PgColumnBuilder, PgColumnBuilderBase } from './columns/common.ts';\nimport type { ForeignKey, ForeignKeyBuilder } from './foreign-keys.ts';\nimport type { AnyIndexBuilder } from './indexes.ts';\nimport type { PgPolicy } from './policies.ts';\nimport type { PrimaryKeyBuilder } from './primary-keys.ts';\nimport type { UniqueConstraintBuilder } from './unique-constraint.ts';\n\nexport type PgTableExtraConfigValue =\n\t| AnyIndexBuilder\n\t| CheckBuilder\n\t| ForeignKeyBuilder\n\t| PrimaryKeyBuilder\n\t| UniqueConstraintBuilder\n\t| PgPolicy;\n\nexport type PgTableExtraConfig = Record<\n\tstring,\n\tPgTableExtraConfigValue\n>;\n\nexport type TableConfig = TableConfigBase;\n\n/** @internal */\nexport const InlineForeignKeys = Symbol.for('drizzle:PgInlineForeignKeys');\n/** @internal */\nexport const EnableRLS = Symbol.for('drizzle:EnableRLS');\n\nexport class PgTable extends Table {\n\tstatic override readonly [entityKind]: string = 'PgTable';\n\n\t/** @internal */\n\tstatic override readonly Symbol = Object.assign({}, Table.Symbol, {\n\t\tInlineForeignKeys: InlineForeignKeys as typeof InlineForeignKeys,\n\t\tEnableRLS: EnableRLS as typeof EnableRLS,\n\t});\n\n\t/**@internal */\n\t[InlineForeignKeys]: ForeignKey[] = [];\n\n\t/** @internal */\n\t[EnableRLS]: boolean = false;\n\n\t/** @internal */\n\toverride [Table.Symbol.ExtraConfigBuilder]: ((self: Record) => PgTableExtraConfig) | undefined =\n\t\tundefined;\n\n\t/** @internal */\n\toverride [Table.Symbol.ExtraConfigColumns]: Record = {};\n}\n\nexport type AnyPgTable = {}> = PgTable>;\n\nexport type PgTableWithColumns =\n\t& PgTable\n\t& {\n\t\t[Key in keyof T['columns']]: T['columns'][Key];\n\t}\n\t& {\n\t\tenableRLS: () => Omit<\n\t\t\tPgTableWithColumns,\n\t\t\t'enableRLS'\n\t\t>;\n\t};\n\n/** @internal */\nexport function pgTableWithSchema<\n\tTTableName extends string,\n\tTSchemaName extends string | undefined,\n\tTColumnsMap extends Record,\n>(\n\tname: TTableName,\n\tcolumns: TColumnsMap | ((columnTypes: PgColumnsBuilders) => TColumnsMap),\n\textraConfig:\n\t\t| ((self: BuildExtraConfigColumns) => PgTableExtraConfig | PgTableExtraConfigValue[])\n\t\t| undefined,\n\tschema: TSchemaName,\n\tbaseName = name,\n): PgTableWithColumns<{\n\tname: TTableName;\n\tschema: TSchemaName;\n\tcolumns: BuildColumns;\n\tdialect: 'pg';\n}> {\n\tconst rawTable = new PgTable<{\n\t\tname: TTableName;\n\t\tschema: TSchemaName;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>(name, schema, baseName);\n\n\tconst parsedColumns: TColumnsMap = typeof columns === 'function' ? columns(getPgColumnBuilders()) : columns;\n\n\tconst builtColumns = Object.fromEntries(\n\t\tObject.entries(parsedColumns).map(([name, colBuilderBase]) => {\n\t\t\tconst colBuilder = colBuilderBase as PgColumnBuilder;\n\t\t\tcolBuilder.setName(name);\n\t\t\tconst column = colBuilder.build(rawTable);\n\t\t\trawTable[InlineForeignKeys].push(...colBuilder.buildForeignKeys(column, rawTable));\n\t\t\treturn [name, column];\n\t\t}),\n\t) as unknown as BuildColumns;\n\n\tconst builtColumnsForExtraConfig = Object.fromEntries(\n\t\tObject.entries(parsedColumns).map(([name, colBuilderBase]) => {\n\t\t\tconst colBuilder = colBuilderBase as PgColumnBuilder;\n\t\t\tcolBuilder.setName(name);\n\t\t\tconst column = colBuilder.buildExtraConfigColumn(rawTable);\n\t\t\treturn [name, column];\n\t\t}),\n\t) as unknown as BuildExtraConfigColumns;\n\n\tconst table = Object.assign(rawTable, builtColumns);\n\n\ttable[Table.Symbol.Columns] = builtColumns;\n\ttable[Table.Symbol.ExtraConfigColumns] = builtColumnsForExtraConfig;\n\n\tif (extraConfig) {\n\t\ttable[PgTable.Symbol.ExtraConfigBuilder] = extraConfig as any;\n\t}\n\n\treturn Object.assign(table, {\n\t\tenableRLS: () => {\n\t\t\ttable[PgTable.Symbol.EnableRLS] = true;\n\t\t\treturn table as PgTableWithColumns<{\n\t\t\t\tname: TTableName;\n\t\t\t\tschema: TSchemaName;\n\t\t\t\tcolumns: BuildColumns;\n\t\t\t\tdialect: 'pg';\n\t\t\t}>;\n\t\t},\n\t});\n}\n\nexport interface PgTableFn {\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: TColumnsMap,\n\t\textraConfig?: (\n\t\t\tself: BuildExtraConfigColumns,\n\t\t) => PgTableExtraConfigValue[],\n\t): PgTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>;\n\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: (columnTypes: PgColumnsBuilders) => TColumnsMap,\n\t\textraConfig?: (self: BuildExtraConfigColumns) => PgTableExtraConfigValue[],\n\t): PgTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>;\n\t/**\n\t * @deprecated The third parameter of pgTable is changing and will only accept an array instead of an object\n\t *\n\t * @example\n\t * Deprecated version:\n\t * ```ts\n\t * export const users = pgTable(\"users\", {\n\t * \tid: integer(),\n\t * }, (t) => ({\n\t * \tidx: index('custom_name').on(t.id)\n\t * }));\n\t * ```\n\t *\n\t * New API:\n\t * ```ts\n\t * export const users = pgTable(\"users\", {\n\t * \tid: integer(),\n\t * }, (t) => [\n\t * \tindex('custom_name').on(t.id)\n\t * ]);\n\t * ```\n\t */\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: TColumnsMap,\n\t\textraConfig: (\n\t\t\tself: BuildExtraConfigColumns,\n\t\t) => PgTableExtraConfig,\n\t): PgTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>;\n\n\t/**\n\t * @deprecated The third parameter of pgTable is changing and will only accept an array instead of an object\n\t *\n\t * @example\n\t * Deprecated version:\n\t * ```ts\n\t * export const users = pgTable(\"users\", {\n\t * \tid: integer(),\n\t * }, (t) => ({\n\t * \tidx: index('custom_name').on(t.id)\n\t * }));\n\t * ```\n\t *\n\t * New API:\n\t * ```ts\n\t * export const users = pgTable(\"users\", {\n\t * \tid: integer(),\n\t * }, (t) => [\n\t * \tindex('custom_name').on(t.id)\n\t * ]);\n\t * ```\n\t */\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: (columnTypes: PgColumnsBuilders) => TColumnsMap,\n\t\textraConfig: (self: BuildExtraConfigColumns) => PgTableExtraConfig,\n\t): PgTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>;\n}\n\nexport const pgTable: PgTableFn = (name, columns, extraConfig) => {\n\treturn pgTableWithSchema(name, columns, extraConfig, undefined);\n};\n\nexport function pgTableCreator(customizeTableName: (name: string) => string): PgTableFn {\n\treturn (name, columns, extraConfig) => {\n\t\treturn pgTableWithSchema(customizeTableName(name) as typeof name, columns, extraConfig, undefined, name);\n\t};\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { AnyPgColumn, PgColumn } from './columns/index.ts';\nimport { PgTable } from './table.ts';\n\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumn extends AnyPgColumn<{ tableName: TTableName }>,\n\tTColumns extends AnyPgColumn<{ tableName: TTableName }>[],\n>(config: { name?: string; columns: [TColumn, ...TColumns] }): PrimaryKeyBuilder;\n/**\n * @deprecated: Please use primaryKey({ columns: [] }) instead of this function\n * @param columns\n */\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumns extends AnyPgColumn<{ tableName: TTableName }>[],\n>(...columns: TColumns): PrimaryKeyBuilder;\nexport function primaryKey(...config: any) {\n\tif (config[0].columns) {\n\t\treturn new PrimaryKeyBuilder(config[0].columns, config[0].name);\n\t}\n\treturn new PrimaryKeyBuilder(config);\n}\n\nexport class PrimaryKeyBuilder {\n\tstatic readonly [entityKind]: string = 'PgPrimaryKeyBuilder';\n\n\t/** @internal */\n\tcolumns: PgColumn[];\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tcolumns: PgColumn[],\n\t\tname?: string,\n\t) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\t/** @internal */\n\tbuild(table: PgTable): PrimaryKey {\n\t\treturn new PrimaryKey(table, this.columns, this.name);\n\t}\n}\n\nexport class PrimaryKey {\n\tstatic readonly [entityKind]: string = 'PgPrimaryKey';\n\n\treadonly columns: AnyPgColumn<{}>[];\n\treadonly name?: string;\n\n\tconstructor(readonly table: PgTable, columns: AnyPgColumn<{}>[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\tgetName(): string {\n\t\treturn this.name ?? `${this.table[PgTable.Symbol.Name]}_${this.columns.map((column) => column.name).join('_')}_pk`;\n\t}\n}\n", "import { type AnyColumn, Column, type GetColumnData } from '~/column.ts';\nimport { is } from '~/entity.ts';\nimport { Table } from '~/table.ts';\nimport {\n\tisDriverValueEncoder,\n\tisSQLWrapper,\n\tParam,\n\tPlaceholder,\n\tSQL,\n\tsql,\n\ttype SQLChunk,\n\ttype SQLWrapper,\n\tStringChunk,\n\tView,\n} from '../sql.ts';\n\nexport function bindIfParam(value: unknown, column: SQLWrapper): SQLChunk {\n\tif (\n\t\tisDriverValueEncoder(column)\n\t\t&& !isSQLWrapper(value)\n\t\t&& !is(value, Param)\n\t\t&& !is(value, Placeholder)\n\t\t&& !is(value, Column)\n\t\t&& !is(value, Table)\n\t\t&& !is(value, View)\n\t) {\n\t\treturn new Param(value, column);\n\t}\n\treturn value as SQLChunk;\n}\n\nexport interface BinaryOperator {\n\t(\n\t\tleft: TColumn,\n\t\tright: GetColumnData | SQLWrapper,\n\t): SQL;\n\t(left: SQL.Aliased, right: T | SQLWrapper): SQL;\n\t(\n\t\tleft: Exclude,\n\t\tright: unknown,\n\t): SQL;\n}\n\n/**\n * Test that two values are equal.\n *\n * Remember that the SQL standard dictates that\n * two NULL values are not equal, so if you want to test\n * whether a value is null, you may want to use\n * `isNull` instead.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made by Ford\n * db.select().from(cars)\n * .where(eq(cars.make, 'Ford'))\n * ```\n *\n * @see isNull for a way to test equality to NULL.\n */\nexport const eq: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} = ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test that two values are not equal.\n *\n * Remember that the SQL standard dictates that\n * two NULL values are not equal, so if you want to test\n * whether a value is not null, you may want to use\n * `isNotNull` instead.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars not made by Ford\n * db.select().from(cars)\n * .where(ne(cars.make, 'Ford'))\n * ```\n *\n * @see isNotNull for a way to test whether a value is not null.\n */\nexport const ne: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} <> ${bindIfParam(right, left)}`;\n};\n\n/**\n * Combine a list of conditions with the `and` operator. Conditions\n * that are equal `undefined` are automatically ignored.\n *\n * ## Examples\n *\n * ```ts\n * db.select().from(cars)\n * .where(\n * and(\n * eq(cars.make, 'Volvo'),\n * eq(cars.year, 1950),\n * )\n * )\n * ```\n */\nexport function and(...conditions: (SQLWrapper | undefined)[]): SQL | undefined;\nexport function and(\n\t...unfilteredConditions: (SQLWrapper | undefined)[]\n): SQL | undefined {\n\tconst conditions = unfilteredConditions.filter(\n\t\t(c): c is Exclude => c !== undefined,\n\t);\n\n\tif (conditions.length === 0) {\n\t\treturn undefined;\n\t}\n\n\tif (conditions.length === 1) {\n\t\treturn new SQL(conditions);\n\t}\n\n\treturn new SQL([\n\t\tnew StringChunk('('),\n\t\tsql.join(conditions, new StringChunk(' and ')),\n\t\tnew StringChunk(')'),\n\t]);\n}\n\n/**\n * Combine a list of conditions with the `or` operator. Conditions\n * that are equal `undefined` are automatically ignored.\n *\n * ## Examples\n *\n * ```ts\n * db.select().from(cars)\n * .where(\n * or(\n * eq(cars.make, 'GM'),\n * eq(cars.make, 'Ford'),\n * )\n * )\n * ```\n */\nexport function or(...conditions: (SQLWrapper | undefined)[]): SQL | undefined;\nexport function or(\n\t...unfilteredConditions: (SQLWrapper | undefined)[]\n): SQL | undefined {\n\tconst conditions = unfilteredConditions.filter(\n\t\t(c): c is Exclude => c !== undefined,\n\t);\n\n\tif (conditions.length === 0) {\n\t\treturn undefined;\n\t}\n\n\tif (conditions.length === 1) {\n\t\treturn new SQL(conditions);\n\t}\n\n\treturn new SQL([\n\t\tnew StringChunk('('),\n\t\tsql.join(conditions, new StringChunk(' or ')),\n\t\tnew StringChunk(')'),\n\t]);\n}\n\n/**\n * Negate the meaning of an expression using the `not` keyword.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars _not_ made by GM or Ford.\n * db.select().from(cars)\n * .where(not(inArray(cars.make, ['GM', 'Ford'])))\n * ```\n */\nexport function not(condition: SQLWrapper): SQL {\n\treturn sql`not ${condition}`;\n}\n\n/**\n * Test that the first expression passed is greater than\n * the second expression.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made after 2000.\n * db.select().from(cars)\n * .where(gt(cars.year, 2000))\n * ```\n *\n * @see gte for greater-than-or-equal\n */\nexport const gt: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} > ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test that the first expression passed is greater than\n * or equal to the second expression. Use `gt` to\n * test whether an expression is strictly greater\n * than another.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made on or after 2000.\n * db.select().from(cars)\n * .where(gte(cars.year, 2000))\n * ```\n *\n * @see gt for a strictly greater-than condition\n */\nexport const gte: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} >= ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test that the first expression passed is less than\n * the second expression.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made before 2000.\n * db.select().from(cars)\n * .where(lt(cars.year, 2000))\n * ```\n *\n * @see lte for less-than-or-equal\n */\nexport const lt: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} < ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test that the first expression passed is less than\n * or equal to the second expression.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made before 2000.\n * db.select().from(cars)\n * .where(lte(cars.year, 2000))\n * ```\n *\n * @see lt for a strictly less-than condition\n */\nexport const lte: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} <= ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test whether the first parameter, a column or expression,\n * has a value from a list passed as the second argument.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made by Ford or GM.\n * db.select().from(cars)\n * .where(inArray(cars.make, ['Ford', 'GM']))\n * ```\n *\n * @see notInArray for the inverse of this test\n */\nexport function inArray(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function inArray(\n\tcolumn: TColumn,\n\tvalues: ReadonlyArray | Placeholder> | SQLWrapper,\n): SQL;\nexport function inArray(\n\tcolumn: Exclude,\n\tvalues: ReadonlyArray | SQLWrapper,\n): SQL;\nexport function inArray(\n\tcolumn: SQLWrapper,\n\tvalues: ReadonlyArray | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\treturn sql`false`;\n\t\t}\n\t\treturn sql`${column} in ${values.map((v) => bindIfParam(v, column))}`;\n\t}\n\n\treturn sql`${column} in ${bindIfParam(values, column)}`;\n}\n\n/**\n * Test whether the first parameter, a column or expression,\n * has a value that is not present in a list passed as the\n * second argument.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made by any company except Ford or GM.\n * db.select().from(cars)\n * .where(notInArray(cars.make, ['Ford', 'GM']))\n * ```\n *\n * @see inArray for the inverse of this test\n */\nexport function notInArray(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function notInArray(\n\tcolumn: TColumn,\n\tvalues: (GetColumnData | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function notInArray(\n\tcolumn: Exclude,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function notInArray(\n\tcolumn: SQLWrapper,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\treturn sql`true`;\n\t\t}\n\t\treturn sql`${column} not in ${values.map((v) => bindIfParam(v, column))}`;\n\t}\n\n\treturn sql`${column} not in ${bindIfParam(values, column)}`;\n}\n\n/**\n * Test whether an expression is NULL. By the SQL standard,\n * NULL is neither equal nor not equal to itself, so\n * it's recommended to use `isNull` and `notIsNull` for\n * comparisons to NULL.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars that have no discontinuedAt date.\n * db.select().from(cars)\n * .where(isNull(cars.discontinuedAt))\n * ```\n *\n * @see isNotNull for the inverse of this test\n */\nexport function isNull(value: SQLWrapper): SQL {\n\treturn sql`${value} is null`;\n}\n\n/**\n * Test whether an expression is not NULL. By the SQL standard,\n * NULL is neither equal nor not equal to itself, so\n * it's recommended to use `isNull` and `notIsNull` for\n * comparisons to NULL.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars that have been discontinued.\n * db.select().from(cars)\n * .where(isNotNull(cars.discontinuedAt))\n * ```\n *\n * @see isNull for the inverse of this test\n */\nexport function isNotNull(value: SQLWrapper): SQL {\n\treturn sql`${value} is not null`;\n}\n\n/**\n * Test whether a subquery evaluates to have any rows.\n *\n * ## Examples\n *\n * ```ts\n * // Users whose `homeCity` column has a match in a cities\n * // table.\n * db\n * .select()\n * .from(users)\n * .where(\n * exists(db.select()\n * .from(cities)\n * .where(eq(users.homeCity, cities.id))),\n * );\n * ```\n *\n * @see notExists for the inverse of this test\n */\nexport function exists(subquery: SQLWrapper): SQL {\n\treturn sql`exists ${subquery}`;\n}\n\n/**\n * Test whether a subquery doesn't include any result\n * rows.\n *\n * ## Examples\n *\n * ```ts\n * // Users whose `homeCity` column doesn't match\n * // a row in the cities table.\n * db\n * .select()\n * .from(users)\n * .where(\n * notExists(db.select()\n * .from(cities)\n * .where(eq(users.homeCity, cities.id))),\n * );\n * ```\n *\n * @see exists for the inverse of this test\n */\nexport function notExists(subquery: SQLWrapper): SQL {\n\treturn sql`not exists ${subquery}`;\n}\n\n/**\n * Test whether an expression is between two values. This\n * is an easier way to express range tests, which would be\n * expressed mathematically as `x <= a <= y` but in SQL\n * would have to be like `a >= x AND a <= y`.\n *\n * Between is inclusive of the endpoints: if `column`\n * is equal to `min` or `max`, it will be TRUE.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made between 1990 and 2000\n * db.select().from(cars)\n * .where(between(cars.year, 1990, 2000))\n * ```\n *\n * @see notBetween for the inverse of this test\n */\nexport function between(\n\tcolumn: SQL.Aliased,\n\tmin: T | SQLWrapper,\n\tmax: T | SQLWrapper,\n): SQL;\nexport function between(\n\tcolumn: TColumn,\n\tmin: GetColumnData | SQLWrapper,\n\tmax: GetColumnData | SQLWrapper,\n): SQL;\nexport function between(\n\tcolumn: Exclude,\n\tmin: unknown,\n\tmax: unknown,\n): SQL;\nexport function between(column: SQLWrapper, min: unknown, max: unknown): SQL {\n\treturn sql`${column} between ${bindIfParam(min, column)} and ${\n\t\tbindIfParam(\n\t\t\tmax,\n\t\t\tcolumn,\n\t\t)\n\t}`;\n}\n\n/**\n * Test whether an expression is not between two values.\n *\n * This, like `between`, includes its endpoints, so if\n * the `column` is equal to `min` or `max`, in this case\n * it will evaluate to FALSE.\n *\n * ## Examples\n *\n * ```ts\n * // Exclude cars made in the 1970s\n * db.select().from(cars)\n * .where(notBetween(cars.year, 1970, 1979))\n * ```\n *\n * @see between for the inverse of this test\n */\nexport function notBetween(\n\tcolumn: SQL.Aliased,\n\tmin: T | SQLWrapper,\n\tmax: T | SQLWrapper,\n): SQL;\nexport function notBetween(\n\tcolumn: TColumn,\n\tmin: GetColumnData | SQLWrapper,\n\tmax: GetColumnData | SQLWrapper,\n): SQL;\nexport function notBetween(\n\tcolumn: Exclude,\n\tmin: unknown,\n\tmax: unknown,\n): SQL;\nexport function notBetween(\n\tcolumn: SQLWrapper,\n\tmin: unknown,\n\tmax: unknown,\n): SQL {\n\treturn sql`${column} not between ${\n\t\tbindIfParam(\n\t\t\tmin,\n\t\t\tcolumn,\n\t\t)\n\t} and ${bindIfParam(max, column)}`;\n}\n\n/**\n * Compare a column to a pattern, which can include `%` and `_`\n * characters to match multiple variations. Including `%`\n * in the pattern matches zero or more characters, and including\n * `_` will match a single character.\n *\n * ## Examples\n *\n * ```ts\n * // Select all cars with 'Turbo' in their names.\n * db.select().from(cars)\n * .where(like(cars.name, '%Turbo%'))\n * ```\n *\n * @see ilike for a case-insensitive version of this condition\n */\nexport function like(column: Column | SQL.Aliased | SQL, value: string | SQLWrapper): SQL {\n\treturn sql`${column} like ${value}`;\n}\n\n/**\n * The inverse of like - this tests that a given column\n * does not match a pattern, which can include `%` and `_`\n * characters to match multiple variations. Including `%`\n * in the pattern matches zero or more characters, and including\n * `_` will match a single character.\n *\n * ## Examples\n *\n * ```ts\n * // Select all cars that don't have \"ROver\" in their name.\n * db.select().from(cars)\n * .where(notLike(cars.name, '%Rover%'))\n * ```\n *\n * @see like for the inverse condition\n * @see notIlike for a case-insensitive version of this condition\n */\nexport function notLike(column: Column | SQL.Aliased | SQL, value: string | SQLWrapper): SQL {\n\treturn sql`${column} not like ${value}`;\n}\n\n/**\n * Case-insensitively compare a column to a pattern,\n * which can include `%` and `_`\n * characters to match multiple variations. Including `%`\n * in the pattern matches zero or more characters, and including\n * `_` will match a single character.\n *\n * Unlike like, this performs a case-insensitive comparison.\n *\n * ## Examples\n *\n * ```ts\n * // Select all cars with 'Turbo' in their names.\n * db.select().from(cars)\n * .where(ilike(cars.name, '%Turbo%'))\n * ```\n *\n * @see like for a case-sensitive version of this condition\n */\nexport function ilike(column: Column | SQL.Aliased | SQL, value: string | SQLWrapper): SQL {\n\treturn sql`${column} ilike ${value}`;\n}\n\n/**\n * The inverse of ilike - this case-insensitively tests that a given column\n * does not match a pattern, which can include `%` and `_`\n * characters to match multiple variations. Including `%`\n * in the pattern matches zero or more characters, and including\n * `_` will match a single character.\n *\n * ## Examples\n *\n * ```ts\n * // Select all cars that don't have \"Rover\" in their name.\n * db.select().from(cars)\n * .where(notLike(cars.name, '%Rover%'))\n * ```\n *\n * @see ilike for the inverse condition\n * @see notLike for a case-sensitive version of this condition\n */\nexport function notIlike(column: Column | SQL.Aliased | SQL, value: string | SQLWrapper): SQL {\n\treturn sql`${column} not ilike ${value}`;\n}\n\n/**\n * Test that a column or expression contains all elements of\n * the list passed as the second argument.\n *\n * ## Throws\n *\n * The argument passed in the second array can't be empty:\n * if an empty is provided, this method will throw.\n *\n * ## Examples\n *\n * ```ts\n * // Select posts where its tags contain \"Typescript\" and \"ORM\".\n * db.select().from(posts)\n * .where(arrayContains(posts.tags, ['Typescript', 'ORM']))\n * ```\n *\n * @see arrayContained to find if an array contains all elements of a column or expression\n * @see arrayOverlaps to find if a column or expression contains any elements of an array\n */\nexport function arrayContains(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayContains(\n\tcolumn: TColumn,\n\tvalues: (GetColumnData | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayContains(\n\tcolumn: Exclude,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function arrayContains(\n\tcolumn: SQLWrapper,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\tthrow new Error('arrayContains requires at least one value');\n\t\t}\n\t\tconst array = sql`${bindIfParam(values, column)}`;\n\t\treturn sql`${column} @> ${array}`;\n\t}\n\n\treturn sql`${column} @> ${bindIfParam(values, column)}`;\n}\n\n/**\n * Test that the list passed as the second argument contains\n * all elements of a column or expression.\n *\n * ## Throws\n *\n * The argument passed in the second array can't be empty:\n * if an empty is provided, this method will throw.\n *\n * ## Examples\n *\n * ```ts\n * // Select posts where its tags contain \"Typescript\", \"ORM\" or both,\n * // but filtering posts that have additional tags.\n * db.select().from(posts)\n * .where(arrayContained(posts.tags, ['Typescript', 'ORM']))\n * ```\n *\n * @see arrayContains to find if a column or expression contains all elements of an array\n * @see arrayOverlaps to find if a column or expression contains any elements of an array\n */\nexport function arrayContained(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayContained(\n\tcolumn: TColumn,\n\tvalues: (GetColumnData | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayContained(\n\tcolumn: Exclude,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function arrayContained(\n\tcolumn: SQLWrapper,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\tthrow new Error('arrayContained requires at least one value');\n\t\t}\n\t\tconst array = sql`${bindIfParam(values, column)}`;\n\t\treturn sql`${column} <@ ${array}`;\n\t}\n\n\treturn sql`${column} <@ ${bindIfParam(values, column)}`;\n}\n\n/**\n * Test that a column or expression contains any elements of\n * the list passed as the second argument.\n *\n * ## Throws\n *\n * The argument passed in the second array can't be empty:\n * if an empty is provided, this method will throw.\n *\n * ## Examples\n *\n * ```ts\n * // Select posts where its tags contain \"Typescript\", \"ORM\" or both.\n * db.select().from(posts)\n * .where(arrayOverlaps(posts.tags, ['Typescript', 'ORM']))\n * ```\n *\n * @see arrayContains to find if a column or expression contains all elements of an array\n * @see arrayContained to find if an array contains all elements of a column or expression\n */\nexport function arrayOverlaps(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayOverlaps(\n\tcolumn: TColumn,\n\tvalues: (GetColumnData | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayOverlaps(\n\tcolumn: Exclude,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function arrayOverlaps(\n\tcolumn: SQLWrapper,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\tthrow new Error('arrayOverlaps requires at least one value');\n\t\t}\n\t\tconst array = sql`${bindIfParam(values, column)}`;\n\t\treturn sql`${column} && ${array}`;\n\t}\n\n\treturn sql`${column} && ${bindIfParam(values, column)}`;\n}\n", "import type { AnyColumn } from '../../column.ts';\nimport type { SQL, SQLWrapper } from '../sql.ts';\nimport { sql } from '../sql.ts';\n\n/**\n * Used in sorting, this specifies that the given\n * column or expression should be sorted in ascending\n * order. By the SQL standard, ascending order is the\n * default, so it is not usually necessary to specify\n * ascending sort order.\n *\n * ## Examples\n *\n * ```ts\n * // Return cars, starting with the oldest models\n * // and going in ascending order to the newest.\n * db.select().from(cars)\n * .orderBy(asc(cars.year));\n * ```\n *\n * @see desc to sort in descending order\n */\nexport function asc(column: AnyColumn | SQLWrapper): SQL {\n\treturn sql`${column} asc`;\n}\n\n/**\n * Used in sorting, this specifies that the given\n * column or expression should be sorted in descending\n * order.\n *\n * ## Examples\n *\n * ```ts\n * // Select users, with the most recently created\n * // records coming first.\n * db.select().from(users)\n * .orderBy(desc(users.createdAt));\n * ```\n *\n * @see asc to sort in ascending order\n */\nexport function desc(column: AnyColumn | SQLWrapper): SQL {\n\treturn sql`${column} desc`;\n}\n", "export * from './conditions.ts';\nexport * from './select.ts';\n", "import { type AnyTable, getTableUniqueName, type InferModelFromColumns, Table } from '~/table.ts';\nimport { type AnyColumn, Column } from './column.ts';\nimport { entityKind, is } from './entity.ts';\nimport { PrimaryKeyBuilder } from './pg-core/primary-keys.ts';\nimport {\n\tand,\n\tasc,\n\tbetween,\n\tdesc,\n\teq,\n\texists,\n\tgt,\n\tgte,\n\tilike,\n\tinArray,\n\tisNotNull,\n\tisNull,\n\tlike,\n\tlt,\n\tlte,\n\tne,\n\tnot,\n\tnotBetween,\n\tnotExists,\n\tnotIlike,\n\tnotInArray,\n\tnotLike,\n\tor,\n} from './sql/expressions/index.ts';\nimport { type Placeholder, SQL, sql } from './sql/sql.ts';\nimport type { Assume, ColumnsWithTable, Equal, Simplify, ValueOrArray } from './utils.ts';\n\nexport abstract class Relation {\n\tstatic readonly [entityKind]: string = 'Relation';\n\n\tdeclare readonly $brand: 'Relation';\n\treadonly referencedTableName: TTableName;\n\tfieldName!: string;\n\n\tconstructor(\n\t\treadonly sourceTable: Table,\n\t\treadonly referencedTable: AnyTable<{ name: TTableName }>,\n\t\treadonly relationName: string | undefined,\n\t) {\n\t\tthis.referencedTableName = referencedTable[Table.Symbol.Name] as TTableName;\n\t}\n\n\tabstract withFieldName(fieldName: string): Relation;\n}\n\nexport class Relations<\n\tTTableName extends string = string,\n\tTConfig extends Record = Record,\n> {\n\tstatic readonly [entityKind]: string = 'Relations';\n\n\tdeclare readonly $brand: 'Relations';\n\n\tconstructor(\n\t\treadonly table: AnyTable<{ name: TTableName }>,\n\t\treadonly config: (helpers: TableRelationsHelpers) => TConfig,\n\t) {}\n}\n\nexport class One<\n\tTTableName extends string = string,\n\tTIsNullable extends boolean = boolean,\n> extends Relation {\n\tstatic override readonly [entityKind]: string = 'One';\n\n\tdeclare protected $relationBrand: 'One';\n\n\tconstructor(\n\t\tsourceTable: Table,\n\t\treferencedTable: AnyTable<{ name: TTableName }>,\n\t\treadonly config:\n\t\t\t| RelationConfig<\n\t\t\t\tTTableName,\n\t\t\t\tstring,\n\t\t\t\tAnyColumn<{ tableName: TTableName }>[]\n\t\t\t>\n\t\t\t| undefined,\n\t\treadonly isNullable: TIsNullable,\n\t) {\n\t\tsuper(sourceTable, referencedTable, config?.relationName);\n\t}\n\n\twithFieldName(fieldName: string): One {\n\t\tconst relation = new One(\n\t\t\tthis.sourceTable,\n\t\t\tthis.referencedTable,\n\t\t\tthis.config,\n\t\t\tthis.isNullable,\n\t\t);\n\t\trelation.fieldName = fieldName;\n\t\treturn relation;\n\t}\n}\n\nexport class Many extends Relation {\n\tstatic override readonly [entityKind]: string = 'Many';\n\n\tdeclare protected $relationBrand: 'Many';\n\n\tconstructor(\n\t\tsourceTable: Table,\n\t\treferencedTable: AnyTable<{ name: TTableName }>,\n\t\treadonly config: { relationName: string } | undefined,\n\t) {\n\t\tsuper(sourceTable, referencedTable, config?.relationName);\n\t}\n\n\twithFieldName(fieldName: string): Many {\n\t\tconst relation = new Many(\n\t\t\tthis.sourceTable,\n\t\t\tthis.referencedTable,\n\t\t\tthis.config,\n\t\t);\n\t\trelation.fieldName = fieldName;\n\t\treturn relation;\n\t}\n}\n\nexport type TableRelationsKeysOnly<\n\tTSchema extends Record,\n\tTTableName extends string,\n\tK extends keyof TSchema,\n> = TSchema[K] extends Relations ? K : never;\n\nexport type ExtractTableRelationsFromSchema<\n\tTSchema extends Record,\n\tTTableName extends string,\n> = ExtractObjectValues<\n\t{\n\t\t[\n\t\t\tK in keyof TSchema as TableRelationsKeysOnly<\n\t\t\t\tTSchema,\n\t\t\t\tTTableName,\n\t\t\t\tK\n\t\t\t>\n\t\t]: TSchema[K] extends Relations ? TConfig : never;\n\t}\n>;\n\nexport type ExtractObjectValues = T[keyof T];\n\nexport type ExtractRelationsFromTableExtraConfigSchema<\n\tTConfig extends unknown[],\n> = ExtractObjectValues<\n\t{\n\t\t[\n\t\t\tK in keyof TConfig as TConfig[K] extends Relations ? K\n\t\t\t\t: never\n\t\t]: TConfig[K] extends Relations ? TRelationConfig\n\t\t\t: never;\n\t}\n>;\n\nexport function getOperators() {\n\treturn {\n\t\tand,\n\t\tbetween,\n\t\teq,\n\t\texists,\n\t\tgt,\n\t\tgte,\n\t\tilike,\n\t\tinArray,\n\t\tisNull,\n\t\tisNotNull,\n\t\tlike,\n\t\tlt,\n\t\tlte,\n\t\tne,\n\t\tnot,\n\t\tnotBetween,\n\t\tnotExists,\n\t\tnotLike,\n\t\tnotIlike,\n\t\tnotInArray,\n\t\tor,\n\t\tsql,\n\t};\n}\n\nexport type Operators = ReturnType;\n\nexport function getOrderByOperators() {\n\treturn {\n\t\tsql,\n\t\tasc,\n\t\tdesc,\n\t};\n}\n\nexport type OrderByOperators = ReturnType;\n\nexport type FindTableByDBName<\n\tTSchema extends TablesRelationalConfig,\n\tTTableName extends string,\n> = ExtractObjectValues<\n\t{\n\t\t[\n\t\t\tK in keyof TSchema as TSchema[K]['dbName'] extends TTableName ? K\n\t\t\t\t: never\n\t\t]: TSchema[K];\n\t}\n>;\n\nexport type DBQueryConfig<\n\tTRelationType extends 'one' | 'many' = 'one' | 'many',\n\tTIsRoot extends boolean = boolean,\n\tTSchema extends TablesRelationalConfig = TablesRelationalConfig,\n\tTTableConfig extends TableRelationalConfig = TableRelationalConfig,\n> =\n\t& {\n\t\tcolumns?:\n\t\t\t| {\n\t\t\t\t[K in keyof TTableConfig['columns']]?: boolean;\n\t\t\t}\n\t\t\t| undefined;\n\t\twith?:\n\t\t\t| {\n\t\t\t\t[K in keyof TTableConfig['relations']]?:\n\t\t\t\t\t| true\n\t\t\t\t\t| DBQueryConfig<\n\t\t\t\t\t\tTTableConfig['relations'][K] extends One ? 'one' : 'many',\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\tTSchema,\n\t\t\t\t\t\tFindTableByDBName<\n\t\t\t\t\t\t\tTSchema,\n\t\t\t\t\t\t\tTTableConfig['relations'][K]['referencedTableName']\n\t\t\t\t\t\t>\n\t\t\t\t\t>\n\t\t\t\t\t| undefined;\n\t\t\t}\n\t\t\t| undefined;\n\t\textras?:\n\t\t\t| Record\n\t\t\t| ((\n\t\t\t\tfields: Simplify<\n\t\t\t\t\t[TTableConfig['columns']] extends [never] ? {}\n\t\t\t\t\t\t: TTableConfig['columns']\n\t\t\t\t>,\n\t\t\t\toperators: { sql: Operators['sql'] },\n\t\t\t) => Record)\n\t\t\t| undefined;\n\t}\n\t& (TRelationType extends 'many' ?\n\t\t\t& {\n\t\t\t\twhere?:\n\t\t\t\t\t| SQL\n\t\t\t\t\t| undefined\n\t\t\t\t\t| ((\n\t\t\t\t\t\tfields: Simplify<\n\t\t\t\t\t\t\t[TTableConfig['columns']] extends [never] ? {}\n\t\t\t\t\t\t\t\t: TTableConfig['columns']\n\t\t\t\t\t\t>,\n\t\t\t\t\t\toperators: Operators,\n\t\t\t\t\t) => SQL | undefined);\n\t\t\t\torderBy?:\n\t\t\t\t\t| ValueOrArray\n\t\t\t\t\t| ((\n\t\t\t\t\t\tfields: Simplify<\n\t\t\t\t\t\t\t[TTableConfig['columns']] extends [never] ? {}\n\t\t\t\t\t\t\t\t: TTableConfig['columns']\n\t\t\t\t\t\t>,\n\t\t\t\t\t\toperators: OrderByOperators,\n\t\t\t\t\t) => ValueOrArray)\n\t\t\t\t\t| undefined;\n\t\t\t\tlimit?: number | Placeholder | undefined;\n\t\t\t}\n\t\t\t& (TIsRoot extends true ? {\n\t\t\t\t\toffset?: number | Placeholder | undefined;\n\t\t\t\t}\n\t\t\t\t: {})\n\t\t: {});\n\nexport interface TableRelationalConfig {\n\ttsName: string;\n\tdbName: string;\n\tcolumns: Record;\n\trelations: Record;\n\tprimaryKey: AnyColumn[];\n\tschema?: string;\n}\n\nexport type TablesRelationalConfig = Record;\n\nexport interface RelationalSchemaConfig<\n\tTSchema extends TablesRelationalConfig,\n> {\n\tfullSchema: Record;\n\tschema: TSchema;\n\ttableNamesMap: Record;\n}\n\nexport type ExtractTablesWithRelations<\n\tTSchema extends Record,\n> = {\n\t[\n\t\tK in keyof TSchema as TSchema[K] extends Table ? K\n\t\t\t: never\n\t]: TSchema[K] extends Table ? {\n\t\t\ttsName: K & string;\n\t\t\tdbName: TSchema[K]['_']['name'];\n\t\t\tcolumns: TSchema[K]['_']['columns'];\n\t\t\trelations: ExtractTableRelationsFromSchema<\n\t\t\t\tTSchema,\n\t\t\t\tTSchema[K]['_']['name']\n\t\t\t>;\n\t\t\tprimaryKey: AnyColumn[];\n\t\t}\n\t\t: never;\n};\n\nexport type ReturnTypeOrValue = T extends (...args: any[]) => infer R ? R\n\t: T;\n\nexport type BuildRelationResult<\n\tTSchema extends TablesRelationalConfig,\n\tTInclude,\n\tTRelations extends Record,\n> = {\n\t[\n\t\tK in\n\t\t\t& NonUndefinedKeysOnly\n\t\t\t& keyof TRelations\n\t]: TRelations[K] extends infer TRel extends Relation ? BuildQueryResult<\n\t\t\tTSchema,\n\t\t\tFindTableByDBName,\n\t\t\tAssume>\n\t\t> extends infer TResult ? TRel extends One ?\n\t\t\t\t\t| TResult\n\t\t\t\t\t| (Equal extends true ? null : never)\n\t\t\t: TResult[]\n\t\t: never\n\t\t: never;\n};\n\nexport type NonUndefinedKeysOnly =\n\t& ExtractObjectValues<\n\t\t{\n\t\t\t[K in keyof T as T[K] extends undefined ? never : K]: K;\n\t\t}\n\t>\n\t& keyof T;\n\nexport type BuildQueryResult<\n\tTSchema extends TablesRelationalConfig,\n\tTTableConfig extends TableRelationalConfig,\n\tTFullSelection extends true | Record,\n> = Equal extends true ? InferModelFromColumns\n\t: TFullSelection extends Record ? Simplify<\n\t\t\t& (TFullSelection['columns'] extends Record ? InferModelFromColumns<\n\t\t\t\t\t{\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\tK in Equal<\n\t\t\t\t\t\t\t\tExclude<\n\t\t\t\t\t\t\t\t\tTFullSelection['columns'][\n\t\t\t\t\t\t\t\t\t\t& keyof TFullSelection['columns']\n\t\t\t\t\t\t\t\t\t\t& keyof TTableConfig['columns']\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\tundefined\n\t\t\t\t\t\t\t\t>,\n\t\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t\t> extends true ? Exclude<\n\t\t\t\t\t\t\t\t\tkeyof TTableConfig['columns'],\n\t\t\t\t\t\t\t\t\tNonUndefinedKeysOnly\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t\t\t& {\n\t\t\t\t\t\t\t\t\t\t[K in keyof TFullSelection['columns']]: Equal<\n\t\t\t\t\t\t\t\t\t\t\tTFullSelection['columns'][K],\n\t\t\t\t\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t\t\t\t\t> extends true ? K\n\t\t\t\t\t\t\t\t\t\t\t: never;\n\t\t\t\t\t\t\t\t\t}[keyof TFullSelection['columns']]\n\t\t\t\t\t\t\t\t\t& keyof TTableConfig['columns']\n\t\t\t\t\t\t]: TTableConfig['columns'][K];\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t: InferModelFromColumns)\n\t\t\t& (TFullSelection['extras'] extends\n\t\t\t\t| Record\n\t\t\t\t| ((...args: any[]) => Record) ? {\n\t\t\t\t\t[\n\t\t\t\t\t\tK in NonUndefinedKeysOnly<\n\t\t\t\t\t\t\tReturnTypeOrValue\n\t\t\t\t\t\t>\n\t\t\t\t\t]: Assume<\n\t\t\t\t\t\tReturnTypeOrValue[K],\n\t\t\t\t\t\tSQL.Aliased\n\t\t\t\t\t>['_']['type'];\n\t\t\t\t}\n\t\t\t\t: {})\n\t\t\t& (TFullSelection['with'] extends Record ? BuildRelationResult<\n\t\t\t\t\tTSchema,\n\t\t\t\t\tTFullSelection['with'],\n\t\t\t\t\tTTableConfig['relations']\n\t\t\t\t>\n\t\t\t\t: {})\n\t\t>\n\t: never;\n\nexport interface RelationConfig<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends AnyColumn<{ tableName: TTableName }>[],\n> {\n\trelationName?: string;\n\tfields: TColumns;\n\treferences: ColumnsWithTable;\n}\n\nexport function extractTablesRelationalConfig<\n\tTTables extends TablesRelationalConfig,\n>(\n\tschema: Record,\n\tconfigHelpers: (table: Table) => any,\n): { tables: TTables; tableNamesMap: Record } {\n\tif (\n\t\tObject.keys(schema).length === 1\n\t\t&& 'default' in schema\n\t\t&& !is(schema['default'], Table)\n\t) {\n\t\tschema = schema['default'] as Record;\n\t}\n\n\t// table DB name -> schema table key\n\tconst tableNamesMap: Record = {};\n\t// Table relations found before their tables - need to buffer them until we know the schema table key\n\tconst relationsBuffer: Record<\n\t\tstring,\n\t\t{ relations: Record; primaryKey?: AnyColumn[] }\n\t> = {};\n\tconst tablesConfig: TablesRelationalConfig = {};\n\tfor (const [key, value] of Object.entries(schema)) {\n\t\tif (is(value, Table)) {\n\t\t\tconst dbName = getTableUniqueName(value);\n\t\t\tconst bufferedRelations = relationsBuffer[dbName];\n\t\t\ttableNamesMap[dbName] = key;\n\t\t\ttablesConfig[key] = {\n\t\t\t\ttsName: key,\n\t\t\t\tdbName: value[Table.Symbol.Name],\n\t\t\t\tschema: value[Table.Symbol.Schema],\n\t\t\t\tcolumns: value[Table.Symbol.Columns],\n\t\t\t\trelations: bufferedRelations?.relations ?? {},\n\t\t\t\tprimaryKey: bufferedRelations?.primaryKey ?? [],\n\t\t\t};\n\n\t\t\t// Fill in primary keys\n\t\t\tfor (\n\t\t\t\tconst column of Object.values(\n\t\t\t\t\t(value as Table)[Table.Symbol.Columns],\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tif (column.primary) {\n\t\t\t\t\ttablesConfig[key]!.primaryKey.push(column);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst extraConfig = value[Table.Symbol.ExtraConfigBuilder]?.((value as Table)[Table.Symbol.ExtraConfigColumns]);\n\t\t\tif (extraConfig) {\n\t\t\t\tfor (const configEntry of Object.values(extraConfig)) {\n\t\t\t\t\tif (is(configEntry, PrimaryKeyBuilder)) {\n\t\t\t\t\t\ttablesConfig[key]!.primaryKey.push(...configEntry.columns);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (is(value, Relations)) {\n\t\t\tconst dbName = getTableUniqueName(value.table);\n\t\t\tconst tableName = tableNamesMap[dbName];\n\t\t\tconst relations: Record = value.config(\n\t\t\t\tconfigHelpers(value.table),\n\t\t\t);\n\t\t\tlet primaryKey: AnyColumn[] | undefined;\n\n\t\t\tfor (const [relationName, relation] of Object.entries(relations)) {\n\t\t\t\tif (tableName) {\n\t\t\t\t\tconst tableConfig = tablesConfig[tableName]!;\n\t\t\t\t\ttableConfig.relations[relationName] = relation;\n\t\t\t\t\tif (primaryKey) {\n\t\t\t\t\t\ttableConfig.primaryKey.push(...primaryKey);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (!(dbName in relationsBuffer)) {\n\t\t\t\t\t\trelationsBuffer[dbName] = {\n\t\t\t\t\t\t\trelations: {},\n\t\t\t\t\t\t\tprimaryKey,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\trelationsBuffer[dbName]!.relations[relationName] = relation;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { tables: tablesConfig as TTables, tableNamesMap };\n}\n\nexport function relations<\n\tTTableName extends string,\n\tTRelations extends Record>,\n>(\n\ttable: AnyTable<{ name: TTableName }>,\n\trelations: (helpers: TableRelationsHelpers) => TRelations,\n): Relations {\n\treturn new Relations(\n\t\ttable,\n\t\t(helpers: TableRelationsHelpers) =>\n\t\t\tObject.fromEntries(\n\t\t\t\tObject.entries(relations(helpers)).map(([key, value]) => [\n\t\t\t\t\tkey,\n\t\t\t\t\tvalue.withFieldName(key),\n\t\t\t\t]),\n\t\t\t) as TRelations,\n\t);\n}\n\nexport function createOne(sourceTable: Table) {\n\treturn function one<\n\t\tTForeignTable extends Table,\n\t\tTColumns extends [\n\t\t\tAnyColumn<{ tableName: TTableName }>,\n\t\t\t...AnyColumn<{ tableName: TTableName }>[],\n\t\t],\n\t>(\n\t\ttable: TForeignTable,\n\t\tconfig?: RelationConfig,\n\t): One<\n\t\tTForeignTable['_']['name'],\n\t\tEqual\n\t> {\n\t\treturn new One(\n\t\t\tsourceTable,\n\t\t\ttable,\n\t\t\tconfig,\n\t\t\t(config?.fields.reduce((res, f) => res && f.notNull, true)\n\t\t\t\t?? false) as Equal,\n\t\t);\n\t};\n}\n\nexport function createMany(sourceTable: Table) {\n\treturn function many(\n\t\treferencedTable: TForeignTable,\n\t\tconfig?: { relationName: string },\n\t): Many {\n\t\treturn new Many(sourceTable, referencedTable, config);\n\t};\n}\n\nexport interface NormalizedRelation {\n\tfields: AnyColumn[];\n\treferences: AnyColumn[];\n}\n\nexport function normalizeRelation(\n\tschema: TablesRelationalConfig,\n\ttableNamesMap: Record,\n\trelation: Relation,\n): NormalizedRelation {\n\tif (is(relation, One) && relation.config) {\n\t\treturn {\n\t\t\tfields: relation.config.fields,\n\t\t\treferences: relation.config.references,\n\t\t};\n\t}\n\n\tconst referencedTableTsName = tableNamesMap[getTableUniqueName(relation.referencedTable)];\n\tif (!referencedTableTsName) {\n\t\tthrow new Error(\n\t\t\t`Table \"${relation.referencedTable[Table.Symbol.Name]}\" not found in schema`,\n\t\t);\n\t}\n\n\tconst referencedTableConfig = schema[referencedTableTsName];\n\tif (!referencedTableConfig) {\n\t\tthrow new Error(`Table \"${referencedTableTsName}\" not found in schema`);\n\t}\n\n\tconst sourceTable = relation.sourceTable;\n\tconst sourceTableTsName = tableNamesMap[getTableUniqueName(sourceTable)];\n\tif (!sourceTableTsName) {\n\t\tthrow new Error(\n\t\t\t`Table \"${sourceTable[Table.Symbol.Name]}\" not found in schema`,\n\t\t);\n\t}\n\n\tconst reverseRelations: Relation[] = [];\n\tfor (\n\t\tconst referencedTableRelation of Object.values(\n\t\t\treferencedTableConfig.relations,\n\t\t)\n\t) {\n\t\tif (\n\t\t\t(relation.relationName\n\t\t\t\t&& relation !== referencedTableRelation\n\t\t\t\t&& referencedTableRelation.relationName === relation.relationName)\n\t\t\t|| (!relation.relationName\n\t\t\t\t&& referencedTableRelation.referencedTable === relation.sourceTable)\n\t\t) {\n\t\t\treverseRelations.push(referencedTableRelation);\n\t\t}\n\t}\n\n\tif (reverseRelations.length > 1) {\n\t\tthrow relation.relationName\n\t\t\t? new Error(\n\t\t\t\t`There are multiple relations with name \"${relation.relationName}\" in table \"${referencedTableTsName}\"`,\n\t\t\t)\n\t\t\t: new Error(\n\t\t\t\t`There are multiple relations between \"${referencedTableTsName}\" and \"${\n\t\t\t\t\trelation.sourceTable[Table.Symbol.Name]\n\t\t\t\t}\". Please specify relation name`,\n\t\t\t);\n\t}\n\n\tif (\n\t\treverseRelations[0]\n\t\t&& is(reverseRelations[0], One)\n\t\t&& reverseRelations[0].config\n\t) {\n\t\treturn {\n\t\t\tfields: reverseRelations[0].config.references,\n\t\t\treferences: reverseRelations[0].config.fields,\n\t\t};\n\t}\n\n\tthrow new Error(\n\t\t`There is not enough information to infer relation \"${sourceTableTsName}.${relation.fieldName}\"`,\n\t);\n}\n\nexport function createTableRelationsHelpers(\n\tsourceTable: AnyTable<{ name: TTableName }>,\n) {\n\treturn {\n\t\tone: createOne(sourceTable),\n\t\tmany: createMany(sourceTable),\n\t};\n}\n\nexport type TableRelationsHelpers = ReturnType<\n\ttypeof createTableRelationsHelpers\n>;\n\nexport interface BuildRelationalQueryResult<\n\tTTable extends Table = Table,\n\tTColumn extends Column = Column,\n> {\n\ttableTsKey: string;\n\tselection: {\n\t\tdbKey: string;\n\t\ttsKey: string;\n\t\tfield: TColumn | SQL | SQL.Aliased;\n\t\trelationTableTsKey: string | undefined;\n\t\tisJson: boolean;\n\t\tisExtra?: boolean;\n\t\tselection: BuildRelationalQueryResult['selection'];\n\t}[];\n\tsql: TTable | SQL;\n}\n\nexport function mapRelationalRow(\n\ttablesConfig: TablesRelationalConfig,\n\ttableConfig: TableRelationalConfig,\n\trow: unknown[],\n\tbuildQueryResultSelection: BuildRelationalQueryResult['selection'],\n\tmapColumnValue: (value: unknown) => unknown = (value) => value,\n): Record {\n\tconst result: Record = {};\n\n\tfor (\n\t\tconst [\n\t\t\tselectionItemIndex,\n\t\t\tselectionItem,\n\t\t] of buildQueryResultSelection.entries()\n\t) {\n\t\tif (selectionItem.isJson) {\n\t\t\tconst relation = tableConfig.relations[selectionItem.tsKey]!;\n\t\t\tconst rawSubRows = row[selectionItemIndex] as\n\t\t\t\t| unknown[]\n\t\t\t\t| null\n\t\t\t\t| [null]\n\t\t\t\t| string;\n\t\t\tconst subRows = typeof rawSubRows === 'string'\n\t\t\t\t? (JSON.parse(rawSubRows) as unknown[])\n\t\t\t\t: rawSubRows;\n\t\t\tresult[selectionItem.tsKey] = is(relation, One)\n\t\t\t\t? subRows\n\t\t\t\t\t&& mapRelationalRow(\n\t\t\t\t\t\ttablesConfig,\n\t\t\t\t\t\ttablesConfig[selectionItem.relationTableTsKey!]!,\n\t\t\t\t\t\tsubRows,\n\t\t\t\t\t\tselectionItem.selection,\n\t\t\t\t\t\tmapColumnValue,\n\t\t\t\t\t)\n\t\t\t\t: (subRows as unknown[][]).map((subRow) =>\n\t\t\t\t\tmapRelationalRow(\n\t\t\t\t\t\ttablesConfig,\n\t\t\t\t\t\ttablesConfig[selectionItem.relationTableTsKey!]!,\n\t\t\t\t\t\tsubRow,\n\t\t\t\t\t\tselectionItem.selection,\n\t\t\t\t\t\tmapColumnValue,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t} else {\n\t\t\tconst value = mapColumnValue(row[selectionItemIndex]);\n\t\t\tconst field = selectionItem.field!;\n\t\t\tlet decoder;\n\t\t\tif (is(field, Column)) {\n\t\t\t\tdecoder = field;\n\t\t\t} else if (is(field, SQL)) {\n\t\t\t\tdecoder = field.decoder;\n\t\t\t} else {\n\t\t\t\tdecoder = field.sql.decoder;\n\t\t\t}\n\t\t\tresult[selectionItem.tsKey] = value === null ? null : decoder.mapFromDriverValue(value);\n\t\t}\n\t}\n\n\treturn result;\n}\n", "import type { AnyColumn } from './column.ts';\nimport { Column } from './column.ts';\nimport { entityKind, is } from './entity.ts';\nimport type { Relation } from './relations.ts';\nimport type { View } from './sql/sql.ts';\nimport { SQL, sql } from './sql/sql.ts';\nimport { Table } from './table.ts';\nimport { ViewBaseConfig } from './view-common.ts';\n\nexport class ColumnAliasProxyHandler implements ProxyHandler {\n\tstatic readonly [entityKind]: string = 'ColumnAliasProxyHandler';\n\n\tconstructor(private table: Table | View) {}\n\n\tget(columnObj: TColumn, prop: string | symbol): any {\n\t\tif (prop === 'table') {\n\t\t\treturn this.table;\n\t\t}\n\n\t\treturn columnObj[prop as keyof TColumn];\n\t}\n}\n\nexport class TableAliasProxyHandler implements ProxyHandler {\n\tstatic readonly [entityKind]: string = 'TableAliasProxyHandler';\n\n\tconstructor(private alias: string, private replaceOriginalName: boolean) {}\n\n\tget(target: T, prop: string | symbol): any {\n\t\tif (prop === Table.Symbol.IsAlias) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (prop === Table.Symbol.Name) {\n\t\t\treturn this.alias;\n\t\t}\n\n\t\tif (this.replaceOriginalName && prop === Table.Symbol.OriginalName) {\n\t\t\treturn this.alias;\n\t\t}\n\n\t\tif (prop === ViewBaseConfig) {\n\t\t\treturn {\n\t\t\t\t...target[ViewBaseConfig as keyof typeof target],\n\t\t\t\tname: this.alias,\n\t\t\t\tisAlias: true,\n\t\t\t};\n\t\t}\n\n\t\tif (prop === Table.Symbol.Columns) {\n\t\t\tconst columns = (target as Table)[Table.Symbol.Columns];\n\t\t\tif (!columns) {\n\t\t\t\treturn columns;\n\t\t\t}\n\n\t\t\tconst proxiedColumns: { [key: string]: any } = {};\n\n\t\t\tObject.keys(columns).map((key) => {\n\t\t\t\tproxiedColumns[key] = new Proxy(\n\t\t\t\t\tcolumns[key]!,\n\t\t\t\t\tnew ColumnAliasProxyHandler(new Proxy(target, this)),\n\t\t\t\t);\n\t\t\t});\n\n\t\t\treturn proxiedColumns;\n\t\t}\n\n\t\tconst value = target[prop as keyof typeof target];\n\t\tif (is(value, Column)) {\n\t\t\treturn new Proxy(value as AnyColumn, new ColumnAliasProxyHandler(new Proxy(target, this)));\n\t\t}\n\n\t\treturn value;\n\t}\n}\n\nexport class RelationTableAliasProxyHandler implements ProxyHandler {\n\tstatic readonly [entityKind]: string = 'RelationTableAliasProxyHandler';\n\n\tconstructor(private alias: string) {}\n\n\tget(target: T, prop: string | symbol): any {\n\t\tif (prop === 'sourceTable') {\n\t\t\treturn aliasedTable(target.sourceTable, this.alias);\n\t\t}\n\n\t\treturn target[prop as keyof typeof target];\n\t}\n}\n\nexport function aliasedTable(\n\ttable: T,\n\ttableAlias: string,\n): T {\n\treturn new Proxy(table, new TableAliasProxyHandler(tableAlias, false)) as any;\n}\n\nexport function aliasedRelation(relation: T, tableAlias: string): T {\n\treturn new Proxy(relation, new RelationTableAliasProxyHandler(tableAlias));\n}\n\nexport function aliasedTableColumn(column: T, tableAlias: string): T {\n\treturn new Proxy(\n\t\tcolumn,\n\t\tnew ColumnAliasProxyHandler(new Proxy(column.table, new TableAliasProxyHandler(tableAlias, false))),\n\t);\n}\n\nexport function mapColumnsInAliasedSQLToAlias(query: SQL.Aliased, alias: string): SQL.Aliased {\n\treturn new SQL.Aliased(mapColumnsInSQLToAlias(query.sql, alias), query.fieldAlias);\n}\n\nexport function mapColumnsInSQLToAlias(query: SQL, alias: string): SQL {\n\treturn sql.join(query.queryChunks.map((c) => {\n\t\tif (is(c, Column)) {\n\t\t\treturn aliasedTableColumn(c, alias);\n\t\t}\n\t\tif (is(c, SQL)) {\n\t\t\treturn mapColumnsInSQLToAlias(c, alias);\n\t\t}\n\t\tif (is(c, SQL.Aliased)) {\n\t\t\treturn mapColumnsInAliasedSQLToAlias(c, alias);\n\t\t}\n\t\treturn c;\n\t}));\n}\n", "import { ColumnAliasProxyHandler, TableAliasProxyHandler } from './alias.ts';\nimport { Column } from './column.ts';\nimport { entityKind, is } from './entity.ts';\nimport { SQL, View } from './sql/sql.ts';\nimport { Subquery } from './subquery.ts';\nimport { ViewBaseConfig } from './view-common.ts';\n\nexport class SelectionProxyHandler | View>\n\timplements ProxyHandler | View>\n{\n\tstatic readonly [entityKind]: string = 'SelectionProxyHandler';\n\n\tprivate config: {\n\t\t/**\n\t\t * Table alias for the columns\n\t\t */\n\t\talias?: string;\n\t\t/**\n\t\t * What to do when a field is an instance of `SQL.Aliased` and it's not a selection field (from a subquery)\n\t\t *\n\t\t * `sql` - return the underlying SQL expression\n\t\t *\n\t\t * `alias` - return the field alias\n\t\t */\n\t\tsqlAliasedBehavior: 'sql' | 'alias';\n\t\t/**\n\t\t * What to do when a field is an instance of `SQL` and it doesn't have an alias declared\n\t\t *\n\t\t * `sql` - return the underlying SQL expression\n\t\t *\n\t\t * `error` - return a DrizzleTypeError on type level and throw an error on runtime\n\t\t */\n\t\tsqlBehavior: 'sql' | 'error';\n\n\t\t/**\n\t\t * Whether to replace the original name of the column with the alias\n\t\t * Should be set to `true` for views creation\n\t\t * @default false\n\t\t */\n\t\treplaceOriginalName?: boolean;\n\t};\n\n\tconstructor(config: SelectionProxyHandler['config']) {\n\t\tthis.config = { ...config };\n\t}\n\n\tget(subquery: T, prop: string | symbol): any {\n\t\tif (prop === '_') {\n\t\t\treturn {\n\t\t\t\t...subquery['_' as keyof typeof subquery],\n\t\t\t\tselectedFields: new Proxy(\n\t\t\t\t\t(subquery as Subquery)._.selectedFields,\n\t\t\t\t\tthis as ProxyHandler>,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\n\t\tif (prop === ViewBaseConfig) {\n\t\t\treturn {\n\t\t\t\t...subquery[ViewBaseConfig as keyof typeof subquery],\n\t\t\t\tselectedFields: new Proxy(\n\t\t\t\t\t(subquery as View)[ViewBaseConfig].selectedFields,\n\t\t\t\t\tthis as ProxyHandler>,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\n\t\tif (typeof prop === 'symbol') {\n\t\t\treturn subquery[prop as keyof typeof subquery];\n\t\t}\n\n\t\tconst columns = is(subquery, Subquery)\n\t\t\t? subquery._.selectedFields\n\t\t\t: is(subquery, View)\n\t\t\t? subquery[ViewBaseConfig].selectedFields\n\t\t\t: subquery;\n\t\tconst value: unknown = columns[prop as keyof typeof columns];\n\n\t\tif (is(value, SQL.Aliased)) {\n\t\t\t// Never return the underlying SQL expression for a field previously selected in a subquery\n\t\t\tif (this.config.sqlAliasedBehavior === 'sql' && !value.isSelectionField) {\n\t\t\t\treturn value.sql;\n\t\t\t}\n\n\t\t\tconst newValue = value.clone();\n\t\t\tnewValue.isSelectionField = true;\n\t\t\treturn newValue;\n\t\t}\n\n\t\tif (is(value, SQL)) {\n\t\t\tif (this.config.sqlBehavior === 'sql') {\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\tthrow new Error(\n\t\t\t\t`You tried to reference \"${prop}\" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using \".as('alias')\" method.`,\n\t\t\t);\n\t\t}\n\n\t\tif (is(value, Column)) {\n\t\t\tif (this.config.alias) {\n\t\t\t\treturn new Proxy(\n\t\t\t\t\tvalue,\n\t\t\t\t\tnew ColumnAliasProxyHandler(\n\t\t\t\t\t\tnew Proxy(\n\t\t\t\t\t\t\tvalue.table,\n\t\t\t\t\t\t\tnew TableAliasProxyHandler(this.config.alias, this.config.replaceOriginalName ?? false),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\n\t\tif (typeof value !== 'object' || value === null) {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn new Proxy(value, new SelectionProxyHandler(this.config));\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\n\nexport abstract class QueryPromise implements Promise {\n\tstatic readonly [entityKind]: string = 'QueryPromise';\n\n\t[Symbol.toStringTag] = 'QueryPromise';\n\n\tcatch(\n\t\tonRejected?: ((reason: any) => TResult | PromiseLike) | null | undefined,\n\t): Promise {\n\t\treturn this.then(undefined, onRejected);\n\t}\n\n\tfinally(onFinally?: (() => void) | null | undefined): Promise {\n\t\treturn this.then(\n\t\t\t(value) => {\n\t\t\t\tonFinally?.();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\t(reason) => {\n\t\t\t\tonFinally?.();\n\t\t\t\tthrow reason;\n\t\t\t},\n\t\t);\n\t}\n\n\tthen(\n\t\tonFulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null,\n\t\tonRejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null,\n\t): Promise {\n\t\treturn this.execute().then(onFulfilled, onRejected);\n\t}\n\n\tabstract execute(): Promise;\n}\n", "import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { AnySQLiteColumn, SQLiteColumn } from './columns/index.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport type UpdateDeleteAction = 'cascade' | 'restrict' | 'no action' | 'set null' | 'set default';\n\nexport type Reference = () => {\n\treadonly name?: string;\n\treadonly columns: SQLiteColumn[];\n\treadonly foreignTable: SQLiteTable;\n\treadonly foreignColumns: SQLiteColumn[];\n};\n\nexport class ForeignKeyBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteForeignKeyBuilder';\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteForeignKeyBuilder';\n\t\tforeignTableName: 'TForeignTableName';\n\t};\n\n\t/** @internal */\n\treference: Reference;\n\n\t/** @internal */\n\t_onUpdate: UpdateDeleteAction | undefined;\n\n\t/** @internal */\n\t_onDelete: UpdateDeleteAction | undefined;\n\n\tconstructor(\n\t\tconfig: () => {\n\t\t\tname?: string;\n\t\t\tcolumns: SQLiteColumn[];\n\t\t\tforeignColumns: SQLiteColumn[];\n\t\t},\n\t\tactions?: {\n\t\t\tonUpdate?: UpdateDeleteAction;\n\t\t\tonDelete?: UpdateDeleteAction;\n\t\t} | undefined,\n\t) {\n\t\tthis.reference = () => {\n\t\t\tconst { name, columns, foreignColumns } = config();\n\t\t\treturn { name, columns, foreignTable: foreignColumns[0]!.table as SQLiteTable, foreignColumns };\n\t\t};\n\t\tif (actions) {\n\t\t\tthis._onUpdate = actions.onUpdate;\n\t\t\tthis._onDelete = actions.onDelete;\n\t\t}\n\t}\n\n\tonUpdate(action: UpdateDeleteAction): this {\n\t\tthis._onUpdate = action;\n\t\treturn this;\n\t}\n\n\tonDelete(action: UpdateDeleteAction): this {\n\t\tthis._onDelete = action;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): ForeignKey {\n\t\treturn new ForeignKey(table, this);\n\t}\n}\n\nexport class ForeignKey {\n\tstatic readonly [entityKind]: string = 'SQLiteForeignKey';\n\n\treadonly reference: Reference;\n\treadonly onUpdate: UpdateDeleteAction | undefined;\n\treadonly onDelete: UpdateDeleteAction | undefined;\n\n\tconstructor(readonly table: SQLiteTable, builder: ForeignKeyBuilder) {\n\t\tthis.reference = builder.reference;\n\t\tthis.onUpdate = builder._onUpdate;\n\t\tthis.onDelete = builder._onDelete;\n\t}\n\n\tgetName(): string {\n\t\tconst { name, columns, foreignColumns } = this.reference();\n\t\tconst columnNames = columns.map((column) => column.name);\n\t\tconst foreignColumnNames = foreignColumns.map((column) => column.name);\n\t\tconst chunks = [\n\t\t\tthis.table[TableName],\n\t\t\t...columnNames,\n\t\t\tforeignColumns[0]!.table[TableName],\n\t\t\t...foreignColumnNames,\n\t\t];\n\t\treturn name ?? `${chunks.join('_')}_fk`;\n\t}\n}\n\ntype ColumnsWithTable<\n\tTTableName extends string,\n\tTColumns extends SQLiteColumn[],\n> = { [Key in keyof TColumns]: AnySQLiteColumn<{ tableName: TTableName }> };\n\n/**\n * @deprecated please use `foreignKey({ columns: [], foreignColumns: [] })` syntax without callback\n * @param config\n * @returns\n */\nexport function foreignKey<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends [AnySQLiteColumn<{ tableName: TTableName }>, ...AnySQLiteColumn<{ tableName: TTableName }>[]],\n>(\n\tconfig: () => {\n\t\tname?: string;\n\t\tcolumns: TColumns;\n\t\tforeignColumns: ColumnsWithTable;\n\t},\n): ForeignKeyBuilder;\nexport function foreignKey<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends [AnySQLiteColumn<{ tableName: TTableName }>, ...AnySQLiteColumn<{ tableName: TTableName }>[]],\n>(\n\tconfig: {\n\t\tname?: string;\n\t\tcolumns: TColumns;\n\t\tforeignColumns: ColumnsWithTable;\n\t},\n): ForeignKeyBuilder;\nexport function foreignKey(\n\tconfig: any,\n): ForeignKeyBuilder {\n\tfunction mappedConfig() {\n\t\tif (typeof config === 'function') {\n\t\t\tconst { name, columns, foreignColumns } = config();\n\t\t\treturn {\n\t\t\t\tname,\n\t\t\t\tcolumns,\n\t\t\t\tforeignColumns,\n\t\t\t};\n\t\t}\n\t\treturn config;\n\t}\n\n\treturn new ForeignKeyBuilder(mappedConfig);\n}\n", "import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { SQLiteColumn } from './columns/common.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport function uniqueKeyName(table: SQLiteTable, columns: string[]) {\n\treturn `${table[TableName]}_${columns.join('_')}_unique`;\n}\n\nexport function unique(name?: string): UniqueOnConstraintBuilder {\n\treturn new UniqueOnConstraintBuilder(name);\n}\n\nexport class UniqueConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueConstraintBuilder';\n\n\t/** @internal */\n\tcolumns: SQLiteColumn[];\n\n\tconstructor(\n\t\tcolumns: SQLiteColumn[],\n\t\tprivate name?: string,\n\t) {\n\t\tthis.columns = columns;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): UniqueConstraint {\n\t\treturn new UniqueConstraint(table, this.columns, this.name);\n\t}\n}\n\nexport class UniqueOnConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueOnConstraintBuilder';\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tname?: string,\n\t) {\n\t\tthis.name = name;\n\t}\n\n\ton(...columns: [SQLiteColumn, ...SQLiteColumn[]]) {\n\t\treturn new UniqueConstraintBuilder(columns, this.name);\n\t}\n}\n\nexport class UniqueConstraint {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueConstraint';\n\n\treadonly columns: SQLiteColumn[];\n\treadonly name?: string;\n\n\tconstructor(readonly table: SQLiteTable, columns: SQLiteColumn[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name));\n\t}\n\n\tgetName() {\n\t\treturn this.name;\n\t}\n}\n", "import type {\n\tColumnBuilderBase,\n\tColumnBuilderBaseConfig,\n\tColumnBuilderExtraConfig,\n\tColumnBuilderRuntimeConfig,\n\tColumnDataType,\n\tHasGenerated,\n\tMakeColumnConfig,\n} from '~/column-builder.ts';\nimport { ColumnBuilder } from '~/column-builder.ts';\nimport { Column } from '~/column.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { ForeignKey, UpdateDeleteAction } from '~/sqlite-core/foreign-keys.ts';\nimport { ForeignKeyBuilder } from '~/sqlite-core/foreign-keys.ts';\nimport type { AnySQLiteTable, SQLiteTable } from '~/sqlite-core/table.ts';\nimport type { Update } from '~/utils.ts';\nimport { uniqueKeyName } from '../unique-constraint.ts';\n\nexport interface ReferenceConfig {\n\tref: () => SQLiteColumn;\n\tactions: {\n\t\tonUpdate?: UpdateDeleteAction;\n\t\tonDelete?: UpdateDeleteAction;\n\t};\n}\n\nexport interface SQLiteColumnBuilderBase<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTTypeConfig extends object = object,\n> extends ColumnBuilderBase {}\n\nexport interface SQLiteGeneratedColumnConfig {\n\tmode?: 'virtual' | 'stored';\n}\n\nexport abstract class SQLiteColumnBuilder<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTRuntimeConfig extends object = object,\n\tTTypeConfig extends object = object,\n\tTExtraConfig extends ColumnBuilderExtraConfig = object,\n> extends ColumnBuilder\n\timplements SQLiteColumnBuilderBase\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteColumnBuilder';\n\n\tprivate foreignKeyConfigs: ReferenceConfig[] = [];\n\n\treferences(\n\t\tref: ReferenceConfig['ref'],\n\t\tactions: ReferenceConfig['actions'] = {},\n\t): this {\n\t\tthis.foreignKeyConfigs.push({ ref, actions });\n\t\treturn this;\n\t}\n\n\tunique(\n\t\tname?: string,\n\t): this {\n\t\tthis.config.isUnique = true;\n\t\tthis.config.uniqueName = name;\n\t\treturn this;\n\t}\n\n\tgeneratedAlwaysAs(as: SQL | T['data'] | (() => SQL), config?: SQLiteGeneratedColumnConfig): HasGenerated {\n\t\tthis.config.generated = {\n\t\t\tas,\n\t\t\ttype: 'always',\n\t\t\tmode: config?.mode ?? 'virtual',\n\t\t};\n\t\treturn this as any;\n\t}\n\n\t/** @internal */\n\tbuildForeignKeys(column: SQLiteColumn, table: SQLiteTable): ForeignKey[] {\n\t\treturn this.foreignKeyConfigs.map(({ ref, actions }) => {\n\t\t\treturn ((ref, actions) => {\n\t\t\t\tconst builder = new ForeignKeyBuilder(() => {\n\t\t\t\t\tconst foreignColumn = ref();\n\t\t\t\t\treturn { columns: [column], foreignColumns: [foreignColumn] };\n\t\t\t\t});\n\t\t\t\tif (actions.onUpdate) {\n\t\t\t\t\tbuilder.onUpdate(actions.onUpdate);\n\t\t\t\t}\n\t\t\t\tif (actions.onDelete) {\n\t\t\t\t\tbuilder.onDelete(actions.onDelete);\n\t\t\t\t}\n\t\t\t\treturn builder.build(table);\n\t\t\t})(ref, actions);\n\t\t});\n\t}\n\n\t/** @internal */\n\tabstract build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteColumn>;\n}\n\n// To understand how to use `SQLiteColumn` and `AnySQLiteColumn`, see `Column` and `AnyColumn` documentation.\nexport abstract class SQLiteColumn<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n\tTRuntimeConfig extends object = {},\n\tTTypeConfig extends object = {},\n> extends Column {\n\tstatic override readonly [entityKind]: string = 'SQLiteColumn';\n\n\tconstructor(\n\t\toverride readonly table: SQLiteTable,\n\t\tconfig: ColumnBuilderRuntimeConfig,\n\t) {\n\t\tif (!config.uniqueName) {\n\t\t\tconfig.uniqueName = uniqueKeyName(table, [config.name]);\n\t\t}\n\t\tsuper(table, config);\n\t}\n}\n\nexport type AnySQLiteColumn> = {}> = SQLiteColumn<\n\tRequired, TPartial>>\n>;\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySQLiteTable } from '~/sqlite-core/table.ts';\nimport { type Equal, getColumnNameAndConfig, textDecoder } from '~/utils.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\ntype BlobMode = 'buffer' | 'json' | 'bigint';\n\nexport type SQLiteBigIntBuilderInitial = SQLiteBigIntBuilder<{\n\tname: TName;\n\tdataType: 'bigint';\n\tcolumnType: 'SQLiteBigInt';\n\tdata: bigint;\n\tdriverParam: Buffer;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteBigIntBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBigIntBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'bigint', 'SQLiteBigInt');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBigInt> {\n\t\treturn new SQLiteBigInt>(table, this.config as ColumnBuilderRuntimeConfig);\n\t}\n}\n\nexport class SQLiteBigInt> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteBigInt';\n\n\tgetSQLType(): string {\n\t\treturn 'blob';\n\t}\n\n\toverride mapFromDriverValue(value: Buffer | Uint8Array | ArrayBuffer): bigint {\n\t\tif (typeof Buffer !== 'undefined' && Buffer.from) {\n\t\t\tconst buf = Buffer.isBuffer(value)\n\t\t\t\t? value\n\t\t\t\t// eslint-disable-next-line no-instanceof/no-instanceof\n\t\t\t\t: value instanceof ArrayBuffer\n\t\t\t\t? Buffer.from(value)\n\t\t\t\t: value.buffer\n\t\t\t\t? Buffer.from(value.buffer, value.byteOffset, value.byteLength)\n\t\t\t\t: Buffer.from(value);\n\t\t\treturn BigInt(buf.toString('utf8'));\n\t\t}\n\n\t\treturn BigInt(textDecoder!.decode(value));\n\t}\n\n\toverride mapToDriverValue(value: bigint): Buffer {\n\t\treturn Buffer.from(value.toString());\n\t}\n}\n\nexport type SQLiteBlobJsonBuilderInitial = SQLiteBlobJsonBuilder<{\n\tname: TName;\n\tdataType: 'json';\n\tcolumnType: 'SQLiteBlobJson';\n\tdata: unknown;\n\tdriverParam: Buffer;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteBlobJsonBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBlobJsonBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'json', 'SQLiteBlobJson');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBlobJson> {\n\t\treturn new SQLiteBlobJson>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteBlobJson> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteBlobJson';\n\n\tgetSQLType(): string {\n\t\treturn 'blob';\n\t}\n\n\toverride mapFromDriverValue(value: Buffer | Uint8Array | ArrayBuffer): T['data'] {\n\t\tif (typeof Buffer !== 'undefined' && Buffer.from) {\n\t\t\tconst buf = Buffer.isBuffer(value)\n\t\t\t\t? value\n\t\t\t\t// eslint-disable-next-line no-instanceof/no-instanceof\n\t\t\t\t: value instanceof ArrayBuffer\n\t\t\t\t? Buffer.from(value)\n\t\t\t\t: value.buffer\n\t\t\t\t? Buffer.from(value.buffer, value.byteOffset, value.byteLength)\n\t\t\t\t: Buffer.from(value);\n\t\t\treturn JSON.parse(buf.toString('utf8'));\n\t\t}\n\n\t\treturn JSON.parse(textDecoder!.decode(value));\n\t}\n\n\toverride mapToDriverValue(value: T['data']): Buffer {\n\t\treturn Buffer.from(JSON.stringify(value));\n\t}\n}\n\nexport type SQLiteBlobBufferBuilderInitial = SQLiteBlobBufferBuilder<{\n\tname: TName;\n\tdataType: 'buffer';\n\tcolumnType: 'SQLiteBlobBuffer';\n\tdata: Buffer;\n\tdriverParam: Buffer;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteBlobBufferBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBlobBufferBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'buffer', 'SQLiteBlobBuffer');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBlobBuffer> {\n\t\treturn new SQLiteBlobBuffer>(table, this.config as ColumnBuilderRuntimeConfig);\n\t}\n}\n\nexport class SQLiteBlobBuffer> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteBlobBuffer';\n\n\toverride mapFromDriverValue(value: Buffer | Uint8Array | ArrayBuffer): T['data'] {\n\t\tif (Buffer.isBuffer(value)) {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn Buffer.from(value as Uint8Array);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn 'blob';\n\t}\n}\n\nexport interface BlobConfig {\n\tmode: TMode;\n}\n\n/**\n * It's recommended to use `text('...', { mode: 'json' })` instead of `blob` in JSON mode, because it supports JSON functions:\n * >All JSON functions currently throw an error if any of their arguments are BLOBs because BLOBs are reserved for a future enhancement in which BLOBs will store the binary encoding for JSON.\n *\n * https://www.sqlite.org/json1.html\n */\nexport function blob(): SQLiteBlobJsonBuilderInitial<''>;\nexport function blob(\n\tconfig?: BlobConfig,\n): Equal extends true ? SQLiteBigIntBuilderInitial<''>\n\t: Equal extends true ? SQLiteBlobBufferBuilderInitial<''>\n\t: SQLiteBlobJsonBuilderInitial<''>;\nexport function blob(\n\tname: TName,\n\tconfig?: BlobConfig,\n): Equal extends true ? SQLiteBigIntBuilderInitial\n\t: Equal extends true ? SQLiteBlobBufferBuilderInitial\n\t: SQLiteBlobJsonBuilderInitial;\nexport function blob(a?: string | BlobConfig, b?: BlobConfig) {\n\tconst { name, config } = getColumnNameAndConfig(a, b);\n\tif (config?.mode === 'json') {\n\t\treturn new SQLiteBlobJsonBuilder(name);\n\t}\n\tif (config?.mode === 'bigint') {\n\t\treturn new SQLiteBigIntBuilder(name);\n\t}\n\treturn new SQLiteBlobBufferBuilder(name);\n}\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { AnySQLiteTable } from '~/sqlite-core/table.ts';\nimport { type Equal, getColumnNameAndConfig } from '~/utils.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport type ConvertCustomConfig> =\n\t& {\n\t\tname: TName;\n\t\tdataType: 'custom';\n\t\tcolumnType: 'SQLiteCustomColumn';\n\t\tdata: T['data'];\n\t\tdriverParam: T['driverData'];\n\t\tenumValues: undefined;\n\t}\n\t& (T['notNull'] extends true ? { notNull: true } : {})\n\t& (T['default'] extends true ? { hasDefault: true } : {});\n\nexport interface SQLiteCustomColumnInnerConfig {\n\tcustomTypeValues: CustomTypeValues;\n}\n\nexport class SQLiteCustomColumnBuilder>\n\textends SQLiteColumnBuilder<\n\t\tT,\n\t\t{\n\t\t\tfieldConfig: CustomTypeValues['config'];\n\t\t\tcustomTypeParams: CustomTypeParams;\n\t\t},\n\t\t{\n\t\t\tsqliteColumnBuilderBrand: 'SQLiteCustomColumnBuilderBrand';\n\t\t}\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteCustomColumnBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t\tfieldConfig: CustomTypeValues['config'],\n\t\tcustomTypeParams: CustomTypeParams,\n\t) {\n\t\tsuper(name, 'custom', 'SQLiteCustomColumn');\n\t\tthis.config.fieldConfig = fieldConfig;\n\t\tthis.config.customTypeParams = customTypeParams;\n\t}\n\n\t/** @internal */\n\tbuild(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteCustomColumn> {\n\t\treturn new SQLiteCustomColumn>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteCustomColumn> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteCustomColumn';\n\n\tprivate sqlName: string;\n\tprivate mapTo?: (value: T['data']) => T['driverParam'];\n\tprivate mapFrom?: (value: T['driverParam']) => T['data'];\n\n\tconstructor(\n\t\ttable: AnySQLiteTable<{ name: T['tableName'] }>,\n\t\tconfig: SQLiteCustomColumnBuilder['config'],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.sqlName = config.customTypeParams.dataType(config.fieldConfig);\n\t\tthis.mapTo = config.customTypeParams.toDriver;\n\t\tthis.mapFrom = config.customTypeParams.fromDriver;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn this.sqlName;\n\t}\n\n\toverride mapFromDriverValue(value: T['driverParam']): T['data'] {\n\t\treturn typeof this.mapFrom === 'function' ? this.mapFrom(value) : value as T['data'];\n\t}\n\n\toverride mapToDriverValue(value: T['data']): T['driverParam'] {\n\t\treturn typeof this.mapTo === 'function' ? this.mapTo(value) : value as T['data'];\n\t}\n}\n\nexport type CustomTypeValues = {\n\t/**\n\t * Required type for custom column, that will infer proper type model\n\t *\n\t * Examples:\n\t *\n\t * If you want your column to be `string` type after selecting/or on inserting - use `data: string`. Like `text`, `varchar`\n\t *\n\t * If you want your column to be `number` type after selecting/or on inserting - use `data: number`. Like `integer`\n\t */\n\tdata: unknown;\n\n\t/**\n\t * Type helper, that represents what type database driver is accepting for specific database data type\n\t */\n\tdriverData?: unknown;\n\n\t/**\n\t * What config type should be used for {@link CustomTypeParams} `dataType` generation\n\t */\n\tconfig?: Record;\n\n\t/**\n\t * Whether the config argument should be required or not\n\t * @default false\n\t */\n\tconfigRequired?: boolean;\n\n\t/**\n\t * If your custom data type should be notNull by default you can use `notNull: true`\n\t *\n\t * @example\n\t * const customSerial = customType<{ data: number, notNull: true, default: true }>({\n\t * \t dataType() {\n\t * \t return 'serial';\n\t * },\n\t * });\n\t */\n\tnotNull?: boolean;\n\n\t/**\n\t * If your custom data type has default you can use `default: true`\n\t *\n\t * @example\n\t * const customSerial = customType<{ data: number, notNull: true, default: true }>({\n\t * \t dataType() {\n\t * \t return 'serial';\n\t * },\n\t * });\n\t */\n\tdefault?: boolean;\n};\n\nexport interface CustomTypeParams {\n\t/**\n\t * Database data type string representation, that is used for migrations\n\t * @example\n\t * ```\n\t * `jsonb`, `text`\n\t * ```\n\t *\n\t * If database data type needs additional params you can use them from `config` param\n\t * @example\n\t * ```\n\t * `varchar(256)`, `numeric(2,3)`\n\t * ```\n\t *\n\t * To make `config` be of specific type please use config generic in {@link CustomTypeValues}\n\t *\n\t * @example\n\t * Usage example\n\t * ```\n\t * dataType() {\n\t * return 'boolean';\n\t * },\n\t * ```\n\t * Or\n\t * ```\n\t * dataType(config) {\n\t * \t return typeof config.length !== 'undefined' ? `varchar(${config.length})` : `varchar`;\n\t * \t }\n\t * ```\n\t */\n\tdataType: (config: T['config'] | (Equal extends true ? never : undefined)) => string;\n\n\t/**\n\t * Optional mapping function, between user input and driver\n\t * @example\n\t * For example, when using jsonb we need to map JS/TS object to string before writing to database\n\t * ```\n\t * toDriver(value: TData): string {\n\t * \t return JSON.stringify(value);\n\t * }\n\t * ```\n\t */\n\ttoDriver?: (value: T['data']) => T['driverData'] | SQL;\n\n\t/**\n\t * Optional mapping function, that is responsible for data mapping from database to JS/TS code\n\t * @example\n\t * For example, when using timestamp we need to map string Date representation to JS Date\n\t * ```\n\t * fromDriver(value: string): Date {\n\t * \treturn new Date(value);\n\t * },\n\t * ```\n\t */\n\tfromDriver?: (value: T['driverData']) => T['data'];\n}\n\n/**\n * Custom sqlite database data type generator\n */\nexport function customType(\n\tcustomTypeParams: CustomTypeParams,\n): Equal extends true ? {\n\t\t & T['config']>(\n\t\t\tfieldConfig: TConfig,\n\t\t): SQLiteCustomColumnBuilder>;\n\t\t(\n\t\t\tdbName: TName,\n\t\t\tfieldConfig: T['config'],\n\t\t): SQLiteCustomColumnBuilder>;\n\t}\n\t: {\n\t\t(): SQLiteCustomColumnBuilder>;\n\t\t & T['config']>(\n\t\t\tfieldConfig?: TConfig,\n\t\t): SQLiteCustomColumnBuilder>;\n\t\t(\n\t\t\tdbName: TName,\n\t\t\tfieldConfig?: T['config'],\n\t\t): SQLiteCustomColumnBuilder>;\n\t}\n{\n\treturn (\n\t\ta?: TName | T['config'],\n\t\tb?: T['config'],\n\t): SQLiteCustomColumnBuilder> => {\n\t\tconst { name, config } = getColumnNameAndConfig(a, b);\n\t\treturn new SQLiteCustomColumnBuilder(\n\t\t\tname as ConvertCustomConfig['name'],\n\t\t\tconfig,\n\t\t\tcustomTypeParams,\n\t\t);\n\t};\n}\n", "import type {\n\tColumnBuilderBaseConfig,\n\tColumnBuilderRuntimeConfig,\n\tColumnDataType,\n\tHasDefault,\n\tIsPrimaryKey,\n\tMakeColumnConfig,\n\tNotNull,\n} from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport { sql } from '~/sql/sql.ts';\nimport type { OnConflict } from '~/sqlite-core/utils.ts';\nimport { type Equal, getColumnNameAndConfig, type Or } from '~/utils.ts';\nimport type { AnySQLiteTable } from '../table.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport interface PrimaryKeyConfig {\n\tautoIncrement?: boolean;\n\tonConflict?: OnConflict;\n}\n\nexport abstract class SQLiteBaseIntegerBuilder<\n\tT extends ColumnBuilderBaseConfig,\n\tTRuntimeConfig extends object = object,\n> extends SQLiteColumnBuilder<\n\tT,\n\tTRuntimeConfig & { autoIncrement: boolean },\n\t{},\n\t{ primaryKeyHasDefault: true }\n> {\n\tstatic override readonly [entityKind]: string = 'SQLiteBaseIntegerBuilder';\n\n\tconstructor(name: T['name'], dataType: T['dataType'], columnType: T['columnType']) {\n\t\tsuper(name, dataType, columnType);\n\t\tthis.config.autoIncrement = false;\n\t}\n\n\toverride primaryKey(config?: PrimaryKeyConfig): IsPrimaryKey>> {\n\t\tif (config?.autoIncrement) {\n\t\t\tthis.config.autoIncrement = true;\n\t\t}\n\t\tthis.config.hasDefault = true;\n\t\treturn super.primaryKey() as IsPrimaryKey>>;\n\t}\n\n\t/** @internal */\n\tabstract override build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBaseInteger>;\n}\n\nexport abstract class SQLiteBaseInteger<\n\tT extends ColumnBaseConfig,\n\tTRuntimeConfig extends object = object,\n> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteBaseInteger';\n\n\treadonly autoIncrement: boolean = this.config.autoIncrement;\n\n\tgetSQLType(): string {\n\t\treturn 'integer';\n\t}\n}\n\nexport type SQLiteIntegerBuilderInitial = SQLiteIntegerBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'SQLiteInteger';\n\tdata: number;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteIntegerBuilder>\n\textends SQLiteBaseIntegerBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteIntegerBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'SQLiteInteger');\n\t}\n\n\tbuild(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteInteger> {\n\t\treturn new SQLiteInteger>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteInteger> extends SQLiteBaseInteger {\n\tstatic override readonly [entityKind]: string = 'SQLiteInteger';\n}\n\nexport type SQLiteTimestampBuilderInitial = SQLiteTimestampBuilder<{\n\tname: TName;\n\tdataType: 'date';\n\tcolumnType: 'SQLiteTimestamp';\n\tdata: Date;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteTimestampBuilder>\n\textends SQLiteBaseIntegerBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteTimestampBuilder';\n\n\tconstructor(name: T['name'], mode: 'timestamp' | 'timestamp_ms') {\n\t\tsuper(name, 'date', 'SQLiteTimestamp');\n\t\tthis.config.mode = mode;\n\t}\n\n\t/**\n\t * @deprecated Use `default()` with your own expression instead.\n\t *\n\t * Adds `DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer))` to the column, which is the current epoch timestamp in milliseconds.\n\t */\n\tdefaultNow(): HasDefault {\n\t\treturn this.default(sql`(cast((julianday('now') - 2440587.5)*86400000 as integer))`) as any;\n\t}\n\n\tbuild(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteTimestamp> {\n\t\treturn new SQLiteTimestamp>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteTimestamp>\n\textends SQLiteBaseInteger\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteTimestamp';\n\n\treadonly mode: 'timestamp' | 'timestamp_ms' = this.config.mode;\n\n\toverride mapFromDriverValue(value: number): Date {\n\t\tif (this.config.mode === 'timestamp') {\n\t\t\treturn new Date(value * 1000);\n\t\t}\n\t\treturn new Date(value);\n\t}\n\n\toverride mapToDriverValue(value: Date): number {\n\t\tconst unix = value.getTime();\n\t\tif (this.config.mode === 'timestamp') {\n\t\t\treturn Math.floor(unix / 1000);\n\t\t}\n\t\treturn unix;\n\t}\n}\n\nexport type SQLiteBooleanBuilderInitial = SQLiteBooleanBuilder<{\n\tname: TName;\n\tdataType: 'boolean';\n\tcolumnType: 'SQLiteBoolean';\n\tdata: boolean;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteBooleanBuilder>\n\textends SQLiteBaseIntegerBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBooleanBuilder';\n\n\tconstructor(name: T['name'], mode: 'boolean') {\n\t\tsuper(name, 'boolean', 'SQLiteBoolean');\n\t\tthis.config.mode = mode;\n\t}\n\n\tbuild(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBoolean> {\n\t\treturn new SQLiteBoolean>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteBoolean>\n\textends SQLiteBaseInteger\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBoolean';\n\n\treadonly mode: 'boolean' = this.config.mode;\n\n\toverride mapFromDriverValue(value: number): boolean {\n\t\treturn Number(value) === 1;\n\t}\n\n\toverride mapToDriverValue(value: boolean): number {\n\t\treturn value ? 1 : 0;\n\t}\n}\n\nexport interface IntegerConfig<\n\tTMode extends 'number' | 'timestamp' | 'timestamp_ms' | 'boolean' =\n\t\t| 'number'\n\t\t| 'timestamp'\n\t\t| 'timestamp_ms'\n\t\t| 'boolean',\n> {\n\tmode: TMode;\n}\n\nexport function integer(): SQLiteIntegerBuilderInitial<''>;\nexport function integer(\n\tconfig?: IntegerConfig,\n): Or, Equal> extends true ? SQLiteTimestampBuilderInitial<''>\n\t: Equal extends true ? SQLiteBooleanBuilderInitial<''>\n\t: SQLiteIntegerBuilderInitial<''>;\nexport function integer(\n\tname: TName,\n\tconfig?: IntegerConfig,\n): Or, Equal> extends true ? SQLiteTimestampBuilderInitial\n\t: Equal extends true ? SQLiteBooleanBuilderInitial\n\t: SQLiteIntegerBuilderInitial;\nexport function integer(a?: string | IntegerConfig, b?: IntegerConfig) {\n\tconst { name, config } = getColumnNameAndConfig(a, b);\n\tif (config?.mode === 'timestamp' || config?.mode === 'timestamp_ms') {\n\t\treturn new SQLiteTimestampBuilder(name, config.mode);\n\t}\n\tif (config?.mode === 'boolean') {\n\t\treturn new SQLiteBooleanBuilder(name, config.mode);\n\t}\n\treturn new SQLiteIntegerBuilder(name);\n}\n\nexport const int = integer;\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySQLiteTable } from '~/sqlite-core/table.ts';\nimport { type Equal, getColumnNameAndConfig } from '~/utils.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport type SQLiteNumericBuilderInitial = SQLiteNumericBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'SQLiteNumeric';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteNumericBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'string', 'SQLiteNumeric');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteNumeric> {\n\t\treturn new SQLiteNumeric>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteNumeric> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteNumeric';\n\n\toverride mapFromDriverValue(value: unknown): string {\n\t\tif (typeof value === 'string') return value;\n\n\t\treturn String(value);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn 'numeric';\n\t}\n}\n\nexport type SQLiteNumericNumberBuilderInitial = SQLiteNumericNumberBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'SQLiteNumericNumber';\n\tdata: number;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteNumericNumberBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericNumberBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'SQLiteNumericNumber');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteNumericNumber> {\n\t\treturn new SQLiteNumericNumber>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteNumericNumber> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericNumber';\n\n\toverride mapFromDriverValue(value: unknown): number {\n\t\tif (typeof value === 'number') return value;\n\n\t\treturn Number(value);\n\t}\n\n\toverride mapToDriverValue = String;\n\n\tgetSQLType(): string {\n\t\treturn 'numeric';\n\t}\n}\n\nexport type SQLiteNumericBigIntBuilderInitial = SQLiteNumericBigIntBuilder<{\n\tname: TName;\n\tdataType: 'bigint';\n\tcolumnType: 'SQLiteNumericBigInt';\n\tdata: bigint;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteNumericBigIntBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericBigIntBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'bigint', 'SQLiteNumericBigInt');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteNumericBigInt> {\n\t\treturn new SQLiteNumericBigInt>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteNumericBigInt> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericBigInt';\n\n\toverride mapFromDriverValue = BigInt;\n\n\toverride mapToDriverValue = String;\n\n\tgetSQLType(): string {\n\t\treturn 'numeric';\n\t}\n}\n\nexport type SQLiteNumericConfig = {\n\tmode: T;\n};\n\nexport function numeric(\n\tconfig?: SQLiteNumericConfig,\n): Equal extends true ? SQLiteNumericNumberBuilderInitial<''>\n\t: Equal extends true ? SQLiteNumericBigIntBuilderInitial<''>\n\t: SQLiteNumericBuilderInitial<''>;\nexport function numeric(\n\tname: TName,\n\tconfig?: SQLiteNumericConfig,\n): Equal extends true ? SQLiteNumericNumberBuilderInitial\n\t: Equal extends true ? SQLiteNumericBigIntBuilderInitial\n\t: SQLiteNumericBuilderInitial;\nexport function numeric(a?: string | SQLiteNumericConfig, b?: SQLiteNumericConfig) {\n\tconst { name, config } = getColumnNameAndConfig(a, b);\n\tconst mode = config?.mode;\n\treturn mode === 'number'\n\t\t? new SQLiteNumericNumberBuilder(name)\n\t\t: mode === 'bigint'\n\t\t? new SQLiteNumericBigIntBuilder(name)\n\t\t: new SQLiteNumericBuilder(name);\n}\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySQLiteTable } from '../table.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport type SQLiteRealBuilderInitial = SQLiteRealBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'SQLiteReal';\n\tdata: number;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteRealBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteRealBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'SQLiteReal');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteReal> {\n\t\treturn new SQLiteReal>(table, this.config as ColumnBuilderRuntimeConfig);\n\t}\n}\n\nexport class SQLiteReal> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteReal';\n\n\tgetSQLType(): string {\n\t\treturn 'real';\n\t}\n}\n\nexport function real(): SQLiteRealBuilderInitial<''>;\nexport function real(name: TName): SQLiteRealBuilderInitial;\nexport function real(name?: string) {\n\treturn new SQLiteRealBuilder(name ?? '');\n}\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySQLiteTable } from '~/sqlite-core/table.ts';\nimport { type Equal, getColumnNameAndConfig, type Writable } from '~/utils.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport type SQLiteTextBuilderInitial<\n\tTName extends string,\n\tTEnum extends [string, ...string[]],\n\tTLength extends number | undefined,\n> = SQLiteTextBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'SQLiteText';\n\tdata: TEnum[number];\n\tdriverParam: string;\n\tenumValues: TEnum;\n\tlength: TLength;\n}>;\n\nexport class SQLiteTextBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'SQLiteText'> & { length?: number | undefined },\n> extends SQLiteColumnBuilder<\n\tT,\n\t{ length: T['length']; enumValues: T['enumValues'] },\n\t{ length: T['length'] }\n> {\n\tstatic override readonly [entityKind]: string = 'SQLiteTextBuilder';\n\n\tconstructor(name: T['name'], config: SQLiteTextConfig<'text', T['enumValues'], T['length']>) {\n\t\tsuper(name, 'string', 'SQLiteText');\n\t\tthis.config.enumValues = config.enum;\n\t\tthis.config.length = config.length;\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteText & { length: T['length'] }> {\n\t\treturn new SQLiteText & { length: T['length'] }>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteText & { length?: number | undefined }>\n\textends SQLiteColumn\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteText';\n\n\toverride readonly enumValues = this.config.enumValues;\n\n\treadonly length: T['length'] = this.config.length;\n\n\tconstructor(\n\t\ttable: AnySQLiteTable<{ name: T['tableName'] }>,\n\t\tconfig: SQLiteTextBuilder['config'],\n\t) {\n\t\tsuper(table, config);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn `text${this.config.length ? `(${this.config.length})` : ''}`;\n\t}\n}\n\nexport type SQLiteTextJsonBuilderInitial = SQLiteTextJsonBuilder<{\n\tname: TName;\n\tdataType: 'json';\n\tcolumnType: 'SQLiteTextJson';\n\tdata: unknown;\n\tdriverParam: string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class SQLiteTextJsonBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteTextJsonBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'json', 'SQLiteTextJson');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteTextJson> {\n\t\treturn new SQLiteTextJson>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteTextJson>\n\textends SQLiteColumn\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteTextJson';\n\n\tgetSQLType(): string {\n\t\treturn 'text';\n\t}\n\n\toverride mapFromDriverValue(value: string): T['data'] {\n\t\treturn JSON.parse(value);\n\t}\n\n\toverride mapToDriverValue(value: T['data']): string {\n\t\treturn JSON.stringify(value);\n\t}\n}\n\nexport type SQLiteTextConfig<\n\tTMode extends 'text' | 'json' = 'text' | 'json',\n\tTEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined,\n\tTLength extends number | undefined = number | undefined,\n> = TMode extends 'text' ? {\n\t\tmode?: TMode;\n\t\tlength?: TLength;\n\t\tenum?: TEnum;\n\t}\n\t: {\n\t\tmode?: TMode;\n\t};\n\nexport function text(): SQLiteTextBuilderInitial<'', [string, ...string[]], undefined>;\nexport function text<\n\tU extends string,\n\tT extends Readonly<[U, ...U[]]>,\n\tL extends number | undefined,\n\tTMode extends 'text' | 'json' = 'text' | 'json',\n>(\n\tconfig?: SQLiteTextConfig, L>,\n): Equal extends true ? SQLiteTextJsonBuilderInitial<''>\n\t: SQLiteTextBuilderInitial<'', Writable, L>;\nexport function text<\n\tTName extends string,\n\tU extends string,\n\tT extends Readonly<[U, ...U[]]>,\n\tL extends number | undefined,\n\tTMode extends 'text' | 'json' = 'text' | 'json',\n>(\n\tname: TName,\n\tconfig?: SQLiteTextConfig, L>,\n): Equal extends true ? SQLiteTextJsonBuilderInitial\n\t: SQLiteTextBuilderInitial, L>;\nexport function text(a?: string | SQLiteTextConfig, b: SQLiteTextConfig = {}): any {\n\tconst { name, config } = getColumnNameAndConfig(a, b);\n\tif (config.mode === 'json') {\n\t\treturn new SQLiteTextJsonBuilder(name);\n\t}\n\treturn new SQLiteTextBuilder(name, config as any);\n}\n", "import { blob } from './blob.ts';\nimport { customType } from './custom.ts';\nimport { integer } from './integer.ts';\nimport { numeric } from './numeric.ts';\nimport { real } from './real.ts';\nimport { text } from './text.ts';\n\nexport function getSQLiteColumnBuilders() {\n\treturn {\n\t\tblob,\n\t\tcustomType,\n\t\tinteger,\n\t\tnumeric,\n\t\treal,\n\t\ttext,\n\t};\n}\n\nexport type SQLiteColumnBuilders = ReturnType;\n", "import type { BuildColumns, BuildExtraConfigColumns } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport { Table, type TableConfig as TableConfigBase, type UpdateTableConfig } from '~/table.ts';\nimport type { CheckBuilder } from './checks.ts';\nimport { getSQLiteColumnBuilders, type SQLiteColumnBuilders } from './columns/all.ts';\nimport type { SQLiteColumn, SQLiteColumnBuilder, SQLiteColumnBuilderBase } from './columns/common.ts';\nimport type { ForeignKey, ForeignKeyBuilder } from './foreign-keys.ts';\nimport type { IndexBuilder } from './indexes.ts';\nimport type { PrimaryKeyBuilder } from './primary-keys.ts';\nimport type { UniqueConstraintBuilder } from './unique-constraint.ts';\n\nexport type SQLiteTableExtraConfigValue =\n\t| IndexBuilder\n\t| CheckBuilder\n\t| ForeignKeyBuilder\n\t| PrimaryKeyBuilder\n\t| UniqueConstraintBuilder;\n\nexport type SQLiteTableExtraConfig = Record<\n\tstring,\n\tSQLiteTableExtraConfigValue\n>;\n\nexport type TableConfig = TableConfigBase>;\n\n/** @internal */\nexport const InlineForeignKeys = Symbol.for('drizzle:SQLiteInlineForeignKeys');\n\nexport class SQLiteTable extends Table {\n\tstatic override readonly [entityKind]: string = 'SQLiteTable';\n\n\t/** @internal */\n\tstatic override readonly Symbol = Object.assign({}, Table.Symbol, {\n\t\tInlineForeignKeys: InlineForeignKeys as typeof InlineForeignKeys,\n\t});\n\n\t/** @internal */\n\toverride [Table.Symbol.Columns]!: NonNullable;\n\n\t/** @internal */\n\t[InlineForeignKeys]: ForeignKey[] = [];\n\n\t/** @internal */\n\toverride [Table.Symbol.ExtraConfigBuilder]:\n\t\t| ((self: Record) => SQLiteTableExtraConfig)\n\t\t| undefined = undefined;\n}\n\nexport type AnySQLiteTable = {}> = SQLiteTable<\n\tUpdateTableConfig\n>;\n\nexport type SQLiteTableWithColumns =\n\t& SQLiteTable\n\t& {\n\t\t[Key in keyof T['columns']]: T['columns'][Key];\n\t};\n\nexport interface SQLiteTableFn {\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: TColumnsMap,\n\t\textraConfig?: (\n\t\t\tself: BuildColumns,\n\t\t) => SQLiteTableExtraConfigValue[],\n\t): SQLiteTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>;\n\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: (columnTypes: SQLiteColumnBuilders) => TColumnsMap,\n\t\textraConfig?: (self: BuildColumns) => SQLiteTableExtraConfigValue[],\n\t): SQLiteTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>;\n\t/**\n\t * @deprecated The third parameter of sqliteTable is changing and will only accept an array instead of an object\n\t *\n\t * @example\n\t * Deprecated version:\n\t * ```ts\n\t * export const users = sqliteTable(\"users\", {\n\t * \tid: int(),\n\t * }, (t) => ({\n\t * \tidx: index('custom_name').on(t.id)\n\t * }));\n\t * ```\n\t *\n\t * New API:\n\t * ```ts\n\t * export const users = sqliteTable(\"users\", {\n\t * \tid: int(),\n\t * }, (t) => [\n\t * \tindex('custom_name').on(t.id)\n\t * ]);\n\t * ```\n\t */\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: TColumnsMap,\n\t\textraConfig?: (self: BuildColumns) => SQLiteTableExtraConfig,\n\t): SQLiteTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>;\n\n\t/**\n\t * @deprecated The third parameter of sqliteTable is changing and will only accept an array instead of an object\n\t *\n\t * @example\n\t * Deprecated version:\n\t * ```ts\n\t * export const users = sqliteTable(\"users\", {\n\t * \tid: int(),\n\t * }, (t) => ({\n\t * \tidx: index('custom_name').on(t.id)\n\t * }));\n\t * ```\n\t *\n\t * New API:\n\t * ```ts\n\t * export const users = sqliteTable(\"users\", {\n\t * \tid: int(),\n\t * }, (t) => [\n\t * \tindex('custom_name').on(t.id)\n\t * ]);\n\t * ```\n\t */\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: (columnTypes: SQLiteColumnBuilders) => TColumnsMap,\n\t\textraConfig?: (self: BuildColumns) => SQLiteTableExtraConfig,\n\t): SQLiteTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>;\n}\n\nfunction sqliteTableBase<\n\tTTableName extends string,\n\tTColumnsMap extends Record,\n\tTSchema extends string | undefined,\n>(\n\tname: TTableName,\n\tcolumns: TColumnsMap | ((columnTypes: SQLiteColumnBuilders) => TColumnsMap),\n\textraConfig:\n\t\t| ((\n\t\t\tself: BuildColumns,\n\t\t) => SQLiteTableExtraConfig | SQLiteTableExtraConfigValue[])\n\t\t| undefined,\n\tschema?: TSchema,\n\tbaseName = name,\n): SQLiteTableWithColumns<{\n\tname: TTableName;\n\tschema: TSchema;\n\tcolumns: BuildColumns;\n\tdialect: 'sqlite';\n}> {\n\tconst rawTable = new SQLiteTable<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>(name, schema, baseName);\n\n\tconst parsedColumns: TColumnsMap = typeof columns === 'function' ? columns(getSQLiteColumnBuilders()) : columns;\n\n\tconst builtColumns = Object.fromEntries(\n\t\tObject.entries(parsedColumns).map(([name, colBuilderBase]) => {\n\t\t\tconst colBuilder = colBuilderBase as SQLiteColumnBuilder;\n\t\t\tcolBuilder.setName(name);\n\t\t\tconst column = colBuilder.build(rawTable);\n\t\t\trawTable[InlineForeignKeys].push(...colBuilder.buildForeignKeys(column, rawTable));\n\t\t\treturn [name, column];\n\t\t}),\n\t) as unknown as BuildColumns;\n\n\tconst table = Object.assign(rawTable, builtColumns);\n\n\ttable[Table.Symbol.Columns] = builtColumns;\n\ttable[Table.Symbol.ExtraConfigColumns] = builtColumns as unknown as BuildExtraConfigColumns<\n\t\tTTableName,\n\t\tTColumnsMap,\n\t\t'sqlite'\n\t>;\n\n\tif (extraConfig) {\n\t\ttable[SQLiteTable.Symbol.ExtraConfigBuilder] = extraConfig as (\n\t\t\tself: Record,\n\t\t) => SQLiteTableExtraConfig;\n\t}\n\n\treturn table;\n}\n\nexport const sqliteTable: SQLiteTableFn = (name, columns, extraConfig) => {\n\treturn sqliteTableBase(name, columns, extraConfig);\n};\n\nexport function sqliteTableCreator(customizeTableName: (name: string) => string): SQLiteTableFn {\n\treturn (name, columns, extraConfig) => {\n\t\treturn sqliteTableBase(customizeTableName(name) as typeof name, columns, extraConfig, undefined, name);\n\t};\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport class CheckBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteCheckBuilder';\n\n\tprotected brand!: 'SQLiteConstraintBuilder';\n\n\tconstructor(public name: string, public value: SQL) {}\n\n\tbuild(table: SQLiteTable): Check {\n\t\treturn new Check(table, this);\n\t}\n}\n\nexport class Check {\n\tstatic readonly [entityKind]: string = 'SQLiteCheck';\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteCheck';\n\t};\n\n\treadonly name: string;\n\treadonly value: SQL;\n\n\tconstructor(public table: SQLiteTable, builder: CheckBuilder) {\n\t\tthis.name = builder.name;\n\t\tthis.value = builder.value;\n\t}\n}\n\nexport function check(name: string, value: SQL): CheckBuilder {\n\treturn new CheckBuilder(name, value);\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { SQLiteColumn } from './columns/index.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport interface IndexConfig {\n\tname: string;\n\tcolumns: IndexColumn[];\n\tunique: boolean;\n\twhere: SQL | undefined;\n}\n\nexport type IndexColumn = SQLiteColumn | SQL;\n\nexport class IndexBuilderOn {\n\tstatic readonly [entityKind]: string = 'SQLiteIndexBuilderOn';\n\n\tconstructor(private name: string, private unique: boolean) {}\n\n\ton(...columns: [IndexColumn, ...IndexColumn[]]): IndexBuilder {\n\t\treturn new IndexBuilder(this.name, columns, this.unique);\n\t}\n}\n\nexport class IndexBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteIndexBuilder';\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteIndexBuilder';\n\t};\n\n\t/** @internal */\n\tconfig: IndexConfig;\n\n\tconstructor(name: string, columns: IndexColumn[], unique: boolean) {\n\t\tthis.config = {\n\t\t\tname,\n\t\t\tcolumns,\n\t\t\tunique,\n\t\t\twhere: undefined,\n\t\t};\n\t}\n\n\t/**\n\t * Condition for partial index.\n\t */\n\twhere(condition: SQL): this {\n\t\tthis.config.where = condition;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): Index {\n\t\treturn new Index(this.config, table);\n\t}\n}\n\nexport class Index {\n\tstatic readonly [entityKind]: string = 'SQLiteIndex';\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteIndex';\n\t};\n\n\treadonly config: IndexConfig & { table: SQLiteTable };\n\n\tconstructor(config: IndexConfig, table: SQLiteTable) {\n\t\tthis.config = { ...config, table };\n\t}\n}\n\nexport function index(name: string): IndexBuilderOn {\n\treturn new IndexBuilderOn(name, false);\n}\n\nexport function uniqueIndex(name: string): IndexBuilderOn {\n\treturn new IndexBuilderOn(name, true);\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { AnySQLiteColumn, SQLiteColumn } from './columns/index.ts';\nimport { SQLiteTable } from './table.ts';\n\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumn extends AnySQLiteColumn<{ tableName: TTableName }>,\n\tTColumns extends AnySQLiteColumn<{ tableName: TTableName }>[],\n>(config: { name?: string; columns: [TColumn, ...TColumns] }): PrimaryKeyBuilder;\n/**\n * @deprecated: Please use primaryKey({ columns: [] }) instead of this function\n * @param columns\n */\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumns extends AnySQLiteColumn<{ tableName: TTableName }>[],\n>(...columns: TColumns): PrimaryKeyBuilder;\nexport function primaryKey(...config: any) {\n\tif (config[0].columns) {\n\t\treturn new PrimaryKeyBuilder(config[0].columns, config[0].name);\n\t}\n\treturn new PrimaryKeyBuilder(config);\n}\nexport class PrimaryKeyBuilder {\n\tstatic readonly [entityKind]: string = 'SQLitePrimaryKeyBuilder';\n\n\tdeclare _: {\n\t\tbrand: 'SQLitePrimaryKeyBuilder';\n\t};\n\n\t/** @internal */\n\tcolumns: SQLiteColumn[];\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tcolumns: SQLiteColumn[],\n\t\tname?: string,\n\t) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): PrimaryKey {\n\t\treturn new PrimaryKey(table, this.columns, this.name);\n\t}\n}\n\nexport class PrimaryKey {\n\tstatic readonly [entityKind]: string = 'SQLitePrimaryKey';\n\n\treadonly columns: SQLiteColumn[];\n\treadonly name?: string;\n\n\tconstructor(readonly table: SQLiteTable, columns: SQLiteColumn[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\tgetName(): string {\n\t\treturn this.name\n\t\t\t?? `${this.table[SQLiteTable.Symbol.Name]}_${this.columns.map((column) => column.name).join('_')}_pk`;\n\t}\n}\n", "import { is } from '~/entity.ts';\nimport { SQL } from '~/sql/sql.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { Table } from '~/table.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport type { Check } from './checks.ts';\nimport { CheckBuilder } from './checks.ts';\nimport type { ForeignKey } from './foreign-keys.ts';\nimport { ForeignKeyBuilder } from './foreign-keys.ts';\nimport type { Index } from './indexes.ts';\nimport { IndexBuilder } from './indexes.ts';\nimport type { PrimaryKey } from './primary-keys.ts';\nimport { PrimaryKeyBuilder } from './primary-keys.ts';\nimport { SQLiteTable } from './table.ts';\nimport { type UniqueConstraint, UniqueConstraintBuilder } from './unique-constraint.ts';\nimport type { SQLiteViewBase } from './view-base.ts';\nimport type { SQLiteView } from './view.ts';\n\nexport function getTableConfig(table: TTable) {\n\tconst columns = Object.values(table[SQLiteTable.Symbol.Columns]);\n\tconst indexes: Index[] = [];\n\tconst checks: Check[] = [];\n\tconst primaryKeys: PrimaryKey[] = [];\n\tconst uniqueConstraints: UniqueConstraint[] = [];\n\tconst foreignKeys: ForeignKey[] = Object.values(table[SQLiteTable.Symbol.InlineForeignKeys]);\n\tconst name = table[Table.Symbol.Name];\n\n\tconst extraConfigBuilder = table[SQLiteTable.Symbol.ExtraConfigBuilder];\n\n\tif (extraConfigBuilder !== undefined) {\n\t\tconst extraConfig = extraConfigBuilder(table[SQLiteTable.Symbol.Columns]);\n\t\tconst extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) as any[] : Object.values(extraConfig);\n\t\tfor (const builder of Object.values(extraValues)) {\n\t\t\tif (is(builder, IndexBuilder)) {\n\t\t\t\tindexes.push(builder.build(table));\n\t\t\t} else if (is(builder, CheckBuilder)) {\n\t\t\t\tchecks.push(builder.build(table));\n\t\t\t} else if (is(builder, UniqueConstraintBuilder)) {\n\t\t\t\tuniqueConstraints.push(builder.build(table));\n\t\t\t} else if (is(builder, PrimaryKeyBuilder)) {\n\t\t\t\tprimaryKeys.push(builder.build(table));\n\t\t\t} else if (is(builder, ForeignKeyBuilder)) {\n\t\t\t\tforeignKeys.push(builder.build(table));\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tcolumns,\n\t\tindexes,\n\t\tforeignKeys,\n\t\tchecks,\n\t\tprimaryKeys,\n\t\tuniqueConstraints,\n\t\tname,\n\t};\n}\n\nexport function extractUsedTable(table: SQLiteTable | Subquery | SQLiteViewBase | SQL): string[] {\n\tif (is(table, SQLiteTable)) {\n\t\treturn [`${table[Table.Symbol.BaseName]}`];\n\t}\n\tif (is(table, Subquery)) {\n\t\treturn table._.usedTables ?? [];\n\t}\n\tif (is(table, SQL)) {\n\t\treturn table.usedTables ?? [];\n\t}\n\treturn [];\n}\n\nexport type OnConflict = 'rollback' | 'abort' | 'fail' | 'ignore' | 'replace';\n\nexport function getViewConfig<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n>(view: SQLiteView) {\n\treturn {\n\t\t...view[ViewBaseConfig],\n\t\t// ...view[SQLiteViewConfig],\n\t};\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { SelectResultFields } from '~/query-builders/select.types.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { Placeholder, Query, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteDialect } from '~/sqlite-core/dialect.ts';\nimport type { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/session.ts';\nimport { SQLiteTable } from '~/sqlite-core/table.ts';\nimport type { Subquery } from '~/subquery.ts';\nimport { Table } from '~/table.ts';\nimport { type DrizzleTypeError, orderSelectedFields, type ValueOrArray } from '~/utils.ts';\nimport type { SQLiteColumn } from '../columns/common.ts';\nimport { extractUsedTable } from '../utils.ts';\nimport type { SelectedFieldsFlat, SelectedFieldsOrdered } from './select.types.ts';\n\nexport type SQLiteDeleteWithout<\n\tT extends AnySQLiteDeleteBase,\n\tTDynamic extends boolean,\n\tK extends keyof T & string,\n> = TDynamic extends true ? T\n\t: Omit<\n\t\tSQLiteDeleteBase<\n\t\t\tT['_']['table'],\n\t\t\tT['_']['resultType'],\n\t\t\tT['_']['runResult'],\n\t\t\tT['_']['returning'],\n\t\t\tTDynamic,\n\t\t\tT['_']['excludedMethods'] | K\n\t\t>,\n\t\tT['_']['excludedMethods'] | K\n\t>;\n\nexport type SQLiteDelete<\n\tTTable extends SQLiteTable = SQLiteTable,\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = unknown,\n\tTReturning extends Record | undefined = undefined,\n> = SQLiteDeleteBase;\n\nexport interface SQLiteDeleteConfig {\n\twhere?: SQL | undefined;\n\tlimit?: number | Placeholder;\n\torderBy?: (SQLiteColumn | SQL | SQL.Aliased)[];\n\ttable: SQLiteTable;\n\treturning?: SelectedFieldsOrdered;\n\twithList?: Subquery[];\n}\n\nexport type SQLiteDeleteReturningAll<\n\tT extends AnySQLiteDeleteBase,\n\tTDynamic extends boolean,\n> = SQLiteDeleteWithout<\n\tSQLiteDeleteBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['table']['$inferSelect'],\n\t\tT['_']['dynamic'],\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteDeleteReturning<\n\tT extends AnySQLiteDeleteBase,\n\tTDynamic extends boolean,\n\tTSelectedFields extends SelectedFieldsFlat,\n> = SQLiteDeleteWithout<\n\tSQLiteDeleteBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tSelectResultFields,\n\t\tT['_']['dynamic'],\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteDeleteExecute = T['_']['returning'] extends undefined\n\t? T['_']['runResult']\n\t: T['_']['returning'][];\n\nexport type SQLiteDeletePrepare = SQLitePreparedQuery<{\n\ttype: T['_']['resultType'];\n\trun: T['_']['runResult'];\n\tall: T['_']['returning'] extends undefined ? DrizzleTypeError<'.all() cannot be used without .returning()'>\n\t\t: T['_']['returning'][];\n\tget: T['_']['returning'] extends undefined ? DrizzleTypeError<'.get() cannot be used without .returning()'>\n\t\t: T['_']['returning'] | undefined;\n\tvalues: T['_']['returning'] extends undefined ? DrizzleTypeError<'.values() cannot be used without .returning()'>\n\t\t: any[][];\n\texecute: SQLiteDeleteExecute;\n}>;\n\nexport type SQLiteDeleteDynamic = SQLiteDelete<\n\tT['_']['table'],\n\tT['_']['resultType'],\n\tT['_']['runResult'],\n\tT['_']['returning']\n>;\n\nexport type AnySQLiteDeleteBase = SQLiteDeleteBase;\n\nexport interface SQLiteDeleteBase<\n\tTTable extends SQLiteTable,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTReturning extends Record | undefined = undefined,\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n> extends\n\tQueryPromise,\n\tRunnableQuery,\n\tSQLWrapper\n{\n\treadonly _: {\n\t\tdialect: 'sqlite';\n\t\treadonly table: TTable;\n\t\treadonly resultType: TResultType;\n\t\treadonly runResult: TRunResult;\n\t\treadonly returning: TReturning;\n\t\treadonly dynamic: TDynamic;\n\t\treadonly excludedMethods: TExcludedMethods;\n\t\treadonly result: TReturning extends undefined ? TRunResult : TReturning[];\n\t};\n}\n\nexport class SQLiteDeleteBase<\n\tTTable extends SQLiteTable,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTReturning extends Record | undefined = undefined,\n\tTDynamic extends boolean = false,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTExcludedMethods extends string = never,\n> extends QueryPromise\n\timplements RunnableQuery, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteDelete';\n\n\t/** @internal */\n\tconfig: SQLiteDeleteConfig;\n\n\tconstructor(\n\t\tprivate table: TTable,\n\t\tprivate session: SQLiteSession,\n\t\tprivate dialect: SQLiteDialect,\n\t\twithList?: Subquery[],\n\t) {\n\t\tsuper();\n\t\tthis.config = { table, withList };\n\t}\n\n\t/**\n\t * Adds a `where` clause to the query.\n\t *\n\t * Calling this method will delete only those rows that fulfill a specified condition.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/delete}\n\t *\n\t * @param where the `where` clause.\n\t *\n\t * @example\n\t * You can use conditional operators and `sql function` to filter the rows to be deleted.\n\t *\n\t * ```ts\n\t * // Delete all cars with green color\n\t * db.delete(cars).where(eq(cars.color, 'green'));\n\t * // or\n\t * db.delete(cars).where(sql`${cars.color} = 'green'`)\n\t * ```\n\t *\n\t * You can logically combine conditional operators with `and()` and `or()` operators:\n\t *\n\t * ```ts\n\t * // Delete all BMW cars with a green color\n\t * db.delete(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW')));\n\t *\n\t * // Delete all cars with the green or blue color\n\t * db.delete(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue')));\n\t * ```\n\t */\n\twhere(where: SQL | undefined): SQLiteDeleteWithout {\n\t\tthis.config.where = where;\n\t\treturn this as any;\n\t}\n\n\torderBy(\n\t\tbuilder: (deleteTable: TTable) => ValueOrArray,\n\t): SQLiteDeleteWithout;\n\torderBy(...columns: (SQLiteColumn | SQL | SQL.Aliased)[]): SQLiteDeleteWithout;\n\torderBy(\n\t\t...columns:\n\t\t\t| [(deleteTable: TTable) => ValueOrArray]\n\t\t\t| (SQLiteColumn | SQL | SQL.Aliased)[]\n\t): SQLiteDeleteWithout {\n\t\tif (typeof columns[0] === 'function') {\n\t\t\tconst orderBy = columns[0](\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.table[Table.Symbol.Columns],\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'alias', sqlBehavior: 'sql' }),\n\t\t\t\t) as any,\n\t\t\t);\n\n\t\t\tconst orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy];\n\t\t\tthis.config.orderBy = orderByArray;\n\t\t} else {\n\t\t\tconst orderByArray = columns as (SQLiteColumn | SQL | SQL.Aliased)[];\n\t\t\tthis.config.orderBy = orderByArray;\n\t\t}\n\t\treturn this as any;\n\t}\n\n\tlimit(limit: number | Placeholder): SQLiteDeleteWithout {\n\t\tthis.config.limit = limit;\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `returning` clause to the query.\n\t *\n\t * Calling this method will return the specified fields of the deleted rows. If no fields are specified, all fields will be returned.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/delete#delete-with-return}\n\t *\n\t * @example\n\t * ```ts\n\t * // Delete all cars with the green color and return all fields\n\t * const deletedCars: Car[] = await db.delete(cars)\n\t * .where(eq(cars.color, 'green'))\n\t * .returning();\n\t *\n\t * // Delete all cars with the green color and return only their id and brand fields\n\t * const deletedCarsIdsAndBrands: { id: number, brand: string }[] = await db.delete(cars)\n\t * .where(eq(cars.color, 'green'))\n\t * .returning({ id: cars.id, brand: cars.brand });\n\t * ```\n\t */\n\treturning(): SQLiteDeleteReturningAll;\n\treturning(\n\t\tfields: TSelectedFields,\n\t): SQLiteDeleteReturning;\n\treturning(\n\t\tfields: SelectedFieldsFlat = this.table[SQLiteTable.Symbol.Columns],\n\t): SQLiteDeleteReturning {\n\t\tthis.config.returning = orderSelectedFields(fields);\n\t\treturn this as any;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildDeleteQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\t/** @internal */\n\t_prepare(isOneTimeQuery = true): SQLiteDeletePrepare {\n\t\treturn this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tthis.dialect.sqlToQuery(this.getSQL()),\n\t\t\tthis.config.returning,\n\t\t\tthis.config.returning ? 'all' : 'run',\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\ttype: 'delete',\n\t\t\t\ttables: extractUsedTable(this.config.table),\n\t\t\t},\n\t\t) as SQLiteDeletePrepare;\n\t}\n\n\tprepare(): SQLiteDeletePrepare {\n\t\treturn this._prepare(false);\n\t}\n\n\trun: ReturnType['run'] = (placeholderValues) => {\n\t\treturn this._prepare().run(placeholderValues);\n\t};\n\n\tall: ReturnType['all'] = (placeholderValues) => {\n\t\treturn this._prepare().all(placeholderValues);\n\t};\n\n\tget: ReturnType['get'] = (placeholderValues) => {\n\t\treturn this._prepare().get(placeholderValues);\n\t};\n\n\tvalues: ReturnType['values'] = (placeholderValues) => {\n\t\treturn this._prepare().values(placeholderValues);\n\t};\n\n\toverride async execute(placeholderValues?: Record): Promise> {\n\t\treturn this._prepare().execute(placeholderValues) as SQLiteDeleteExecute;\n\t}\n\n\t$dynamic(): SQLiteDeleteDynamic {\n\t\treturn this as any;\n\t}\n}\n", "import type { Column } from '~/column.ts';\nimport { entityKind } from './entity.ts';\nimport { Table } from './table.ts';\nimport type { Casing } from './utils.ts';\n\nexport function toSnakeCase(input: string) {\n\tconst words = input\n\t\t.replace(/['\\u2019]/g, '')\n\t\t.match(/[\\da-z]+|[A-Z]+(?![a-z])|[A-Z][\\da-z]+/g) ?? [];\n\n\treturn words.map((word) => word.toLowerCase()).join('_');\n}\n\nexport function toCamelCase(input: string) {\n\tconst words = input\n\t\t.replace(/['\\u2019]/g, '')\n\t\t.match(/[\\da-z]+|[A-Z]+(?![a-z])|[A-Z][\\da-z]+/g) ?? [];\n\n\treturn words.reduce((acc, word, i) => {\n\t\tconst formattedWord = i === 0 ? word.toLowerCase() : `${word[0]!.toUpperCase()}${word.slice(1)}`;\n\t\treturn acc + formattedWord;\n\t}, '');\n}\n\nfunction noopCase(input: string) {\n\treturn input;\n}\n\nexport class CasingCache {\n\tstatic readonly [entityKind]: string = 'CasingCache';\n\n\t/** @internal */\n\tcache: Record = {};\n\tprivate cachedTables: Record = {};\n\tprivate convert: (input: string) => string;\n\n\tconstructor(casing?: Casing) {\n\t\tthis.convert = casing === 'snake_case'\n\t\t\t? toSnakeCase\n\t\t\t: casing === 'camelCase'\n\t\t\t? toCamelCase\n\t\t\t: noopCase;\n\t}\n\n\tgetColumnCasing(column: Column): string {\n\t\tif (!column.keyAsName) return column.name;\n\n\t\tconst schema = column.table[Table.Symbol.Schema] ?? 'public';\n\t\tconst tableName = column.table[Table.Symbol.OriginalName];\n\t\tconst key = `${schema}.${tableName}.${column.name}`;\n\n\t\tif (!this.cache[key]) {\n\t\t\tthis.cacheTable(column.table);\n\t\t}\n\t\treturn this.cache[key]!;\n\t}\n\n\tprivate cacheTable(table: Table) {\n\t\tconst schema = table[Table.Symbol.Schema] ?? 'public';\n\t\tconst tableName = table[Table.Symbol.OriginalName];\n\t\tconst tableKey = `${schema}.${tableName}`;\n\n\t\tif (!this.cachedTables[tableKey]) {\n\t\t\tfor (const column of Object.values(table[Table.Symbol.Columns])) {\n\t\t\t\tconst columnKey = `${tableKey}.${column.name}`;\n\t\t\t\tthis.cache[columnKey] = this.convert(column.name);\n\t\t\t}\n\t\t\tthis.cachedTables[tableKey] = true;\n\t\t}\n\t}\n\n\tclearCache() {\n\t\tthis.cache = {};\n\t\tthis.cachedTables = {};\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\n\nexport class DrizzleError extends Error {\n\tstatic readonly [entityKind]: string = 'DrizzleError';\n\n\tconstructor({ message, cause }: { message?: string; cause?: unknown }) {\n\t\tsuper(message);\n\t\tthis.name = 'DrizzleError';\n\t\tthis.cause = cause;\n\t}\n}\n\nexport class DrizzleQueryError extends Error {\n\tconstructor(\n\t\tpublic query: string,\n\t\tpublic params: any[],\n\t\tpublic override cause?: Error,\n\t) {\n\t\tsuper(`Failed query: ${query}\\nparams: ${params}`);\n\t\tError.captureStackTrace(this, DrizzleQueryError);\n\n\t\t// ES2022+: preserves original error on `.cause`\n\t\tif (cause) (this as any).cause = cause;\n\t}\n}\n\nexport class TransactionRollbackError extends DrizzleError {\n\tstatic override readonly [entityKind]: string = 'TransactionRollbackError';\n\n\tconstructor() {\n\t\tsuper({ message: 'Rollback' });\n\t}\n}\n", "import { type AnyColumn, Column } from '~/column.ts';\nimport { is } from '~/entity.ts';\nimport { type SQL, sql, type SQLWrapper } from '../sql.ts';\n\n/**\n * Returns the number of values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Number employees with null values\n * db.select({ value: count() }).from(employees)\n * // Number of employees where `name` is not null\n * db.select({ value: count(employees.name) }).from(employees)\n * ```\n *\n * @see countDistinct to get the number of non-duplicate values in `expression`\n */\nexport function count(expression?: SQLWrapper): SQL {\n\treturn sql`count(${expression || sql.raw('*')})`.mapWith(Number);\n}\n\n/**\n * Returns the number of non-duplicate values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Number of employees where `name` is distinct\n * db.select({ value: countDistinct(employees.name) }).from(employees)\n * ```\n *\n * @see count to get the number of values in `expression`, including duplicates\n */\nexport function countDistinct(expression: SQLWrapper): SQL {\n\treturn sql`count(distinct ${expression})`.mapWith(Number);\n}\n\n/**\n * Returns the average (arithmetic mean) of all non-null values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Average salary of an employee\n * db.select({ value: avg(employees.salary) }).from(employees)\n * ```\n *\n * @see avgDistinct to get the average of all non-null and non-duplicate values in `expression`\n */\nexport function avg(expression: SQLWrapper): SQL {\n\treturn sql`avg(${expression})`.mapWith(String);\n}\n\n/**\n * Returns the average (arithmetic mean) of all non-null and non-duplicate values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Average salary of an employee where `salary` is distinct\n * db.select({ value: avgDistinct(employees.salary) }).from(employees)\n * ```\n *\n * @see avg to get the average of all non-null values in `expression`, including duplicates\n */\nexport function avgDistinct(expression: SQLWrapper): SQL {\n\treturn sql`avg(distinct ${expression})`.mapWith(String);\n}\n\n/**\n * Returns the sum of all non-null values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Sum of every employee's salary\n * db.select({ value: sum(employees.salary) }).from(employees)\n * ```\n *\n * @see sumDistinct to get the sum of all non-null and non-duplicate values in `expression`\n */\nexport function sum(expression: SQLWrapper): SQL {\n\treturn sql`sum(${expression})`.mapWith(String);\n}\n\n/**\n * Returns the sum of all non-null and non-duplicate values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Sum of every employee's salary where `salary` is distinct (no duplicates)\n * db.select({ value: sumDistinct(employees.salary) }).from(employees)\n * ```\n *\n * @see sum to get the sum of all non-null values in `expression`, including duplicates\n */\nexport function sumDistinct(expression: SQLWrapper): SQL {\n\treturn sql`sum(distinct ${expression})`.mapWith(String);\n}\n\n/**\n * Returns the maximum value in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // The employee with the highest salary\n * db.select({ value: max(employees.salary) }).from(employees)\n * ```\n */\nexport function max(expression: T): SQL<(T extends AnyColumn ? T['_']['data'] : string) | null> {\n\treturn sql`max(${expression})`.mapWith(is(expression, Column) ? expression : String) as any;\n}\n\n/**\n * Returns the minimum value in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // The employee with the lowest salary\n * db.select({ value: min(employees.salary) }).from(employees)\n * ```\n */\nexport function min(expression: T): SQL<(T extends AnyColumn ? T['_']['data'] : string) | null> {\n\treturn sql`min(${expression})`.mapWith(is(expression, Column) ? expression : String) as any;\n}\n", "import type { AnyColumn } from '~/column.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport { type SQL, sql, type SQLWrapper } from '../sql.ts';\n\nfunction toSql(value: number[] | string[]): string {\n\treturn JSON.stringify(value);\n}\n\n/**\n * Used in sorting and in querying, if used in sorting,\n * this specifies that the given column or expression should be sorted in an order\n * that minimizes the L2 distance to the given value.\n * If used in querying, this specifies that it should return the L2 distance\n * between the given column or expression and the given value.\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(l2Distance(cars.embedding, embedding));\n * ```\n *\n * ```ts\n * // Select distance of cars and embedding\n * // to the given embedding\n * db.select({distance: l2Distance(cars.embedding, embedding)}).from(cars)\n * ```\n */\nexport function l2Distance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <-> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <-> ${value}`;\n}\n\n/**\n * L1 distance is one of the possible distance measures between two probability distribution vectors and it is\n * calculated as the sum of the absolute differences.\n * The smaller the distance between the observed probability vectors, the higher the accuracy of the synthetic data\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(l1Distance(cars.embedding, embedding));\n * ```\n *\n * ```ts\n * // Select distance of cars and embedding\n * // to the given embedding\n * db.select({distance: l1Distance(cars.embedding, embedding)}).from(cars)\n * ```\n */\nexport function l1Distance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <+> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <+> ${value}`;\n}\n\n/**\n * Used in sorting and in querying, if used in sorting,\n * this specifies that the given column or expression should be sorted in an order\n * that minimizes the inner product distance to the given value.\n * If used in querying, this specifies that it should return the inner product distance\n * between the given column or expression and the given value.\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(innerProduct(cars.embedding, embedding));\n * ```\n *\n * ```ts\n * // Select distance of cars and embedding\n * // to the given embedding\n * db.select({ distance: innerProduct(cars.embedding, embedding) }).from(cars)\n * ```\n */\nexport function innerProduct(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <#> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <#> ${value}`;\n}\n\n/**\n * Used in sorting and in querying, if used in sorting,\n * this specifies that the given column or expression should be sorted in an order\n * that minimizes the cosine distance to the given value.\n * If used in querying, this specifies that it should return the cosine distance\n * between the given column or expression and the given value.\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(cosineDistance(cars.embedding, embedding));\n * ```\n *\n * ```ts\n * // Select distance of cars and embedding\n * // to the given embedding\n * db.select({distance: cosineDistance(cars.embedding, embedding)}).from(cars)\n * ```\n */\nexport function cosineDistance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <=> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <=> ${value}`;\n}\n\n/**\n * Hamming distance between two strings or vectors of equal length is the number of positions at which the\n * corresponding symbols are different. In other words, it measures the minimum number of\n * substitutions required to change one string into the other, or equivalently,\n * the minimum number of errors that could have transformed one string into the other\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(hammingDistance(cars.embedding, embedding));\n * ```\n */\nexport function hammingDistance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <~> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <~> ${value}`;\n}\n\n/**\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(jaccardDistance(cars.embedding, embedding));\n * ```\n */\nexport function jaccardDistance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <%> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <%> ${value}`;\n}\n", "export * from './aggregate.ts';\nexport * from './vector.ts';\n", "export * from './expressions/index.ts';\nexport * from './functions/index.ts';\nexport * from './sql.ts';\n", "export * from './blob.ts';\nexport * from './common.ts';\nexport * from './custom.ts';\nexport * from './integer.ts';\nexport * from './numeric.ts';\nexport * from './real.ts';\nexport * from './text.ts';\n", "import { entityKind } from '~/entity.ts';\nimport type { ColumnsSelection } from '~/sql/sql.ts';\nimport { View } from '~/sql/sql.ts';\n\nexport abstract class SQLiteViewBase<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n\tTSelection extends ColumnsSelection = ColumnsSelection,\n> extends View {\n\tstatic override readonly [entityKind]: string = 'SQLiteViewBase';\n\n\tdeclare _: View['_'] & {\n\t\tviewBrand: 'SQLiteView';\n\t};\n}\n", "import { aliasedTable, aliasedTableColumn, mapColumnsInAliasedSQLToAlias, mapColumnsInSQLToAlias } from '~/alias.ts';\nimport { CasingCache } from '~/casing.ts';\nimport type { AnyColumn } from '~/column.ts';\nimport { Column } from '~/column.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport { DrizzleError } from '~/errors.ts';\nimport type { MigrationConfig, MigrationMeta } from '~/migrator.ts';\nimport {\n\ttype BuildRelationalQueryResult,\n\ttype DBQueryConfig,\n\tgetOperators,\n\tgetOrderByOperators,\n\tMany,\n\tnormalizeRelation,\n\tOne,\n\ttype Relation,\n\ttype TableRelationalConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport type { Name, Placeholder } from '~/sql/index.ts';\nimport { and, eq } from '~/sql/index.ts';\nimport { Param, type QueryWithTypings, SQL, sql, type SQLChunk } from '~/sql/sql.ts';\nimport { SQLiteColumn } from '~/sqlite-core/columns/index.ts';\nimport type {\n\tAnySQLiteSelectQueryBuilder,\n\tSQLiteDeleteConfig,\n\tSQLiteInsertConfig,\n\tSQLiteUpdateConfig,\n} from '~/sqlite-core/query-builders/index.ts';\nimport { SQLiteTable } from '~/sqlite-core/table.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { getTableName, getTableUniqueName, Table } from '~/table.ts';\nimport { type Casing, orderSelectedFields, type UpdateSet } from '~/utils.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport type {\n\tSelectedFieldsOrdered,\n\tSQLiteSelectConfig,\n\tSQLiteSelectJoinConfig,\n} from './query-builders/select.types.ts';\nimport type { SQLiteSession } from './session.ts';\nimport { SQLiteViewBase } from './view-base.ts';\n\nexport interface SQLiteDialectConfig {\n\tcasing?: Casing;\n}\n\nexport abstract class SQLiteDialect {\n\tstatic readonly [entityKind]: string = 'SQLiteDialect';\n\n\t/** @internal */\n\treadonly casing: CasingCache;\n\n\tconstructor(config?: SQLiteDialectConfig) {\n\t\tthis.casing = new CasingCache(config?.casing);\n\t}\n\n\tescapeName(name: string): string {\n\t\treturn `\"${name}\"`;\n\t}\n\n\tescapeParam(_num: number): string {\n\t\treturn '?';\n\t}\n\n\tescapeString(str: string): string {\n\t\treturn `'${str.replace(/'/g, \"''\")}'`;\n\t}\n\n\tprivate buildWithCTE(queries: Subquery[] | undefined): SQL | undefined {\n\t\tif (!queries?.length) return undefined;\n\n\t\tconst withSqlChunks = [sql`with `];\n\t\tfor (const [i, w] of queries.entries()) {\n\t\t\twithSqlChunks.push(sql`${sql.identifier(w._.alias)} as (${w._.sql})`);\n\t\t\tif (i < queries.length - 1) {\n\t\t\t\twithSqlChunks.push(sql`, `);\n\t\t\t}\n\t\t}\n\t\twithSqlChunks.push(sql` `);\n\t\treturn sql.join(withSqlChunks);\n\t}\n\n\tbuildDeleteQuery({ table, where, returning, withList, limit, orderBy }: SQLiteDeleteConfig): SQL {\n\t\tconst withSql = this.buildWithCTE(withList);\n\n\t\tconst returningSql = returning\n\t\t\t? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}`\n\t\t\t: undefined;\n\n\t\tconst whereSql = where ? sql` where ${where}` : undefined;\n\n\t\tconst orderBySql = this.buildOrderBy(orderBy);\n\n\t\tconst limitSql = this.buildLimit(limit);\n\n\t\treturn sql`${withSql}delete from ${table}${whereSql}${returningSql}${orderBySql}${limitSql}`;\n\t}\n\n\tbuildUpdateSet(table: SQLiteTable, set: UpdateSet): SQL {\n\t\tconst tableColumns = table[Table.Symbol.Columns];\n\n\t\tconst columnNames = Object.keys(tableColumns).filter((colName) =>\n\t\t\tset[colName] !== undefined || tableColumns[colName]?.onUpdateFn !== undefined\n\t\t);\n\n\t\tconst setSize = columnNames.length;\n\t\treturn sql.join(columnNames.flatMap((colName, i) => {\n\t\t\tconst col = tableColumns[colName]!;\n\n\t\t\tconst value = set[colName] ?? sql.param(col.onUpdateFn!(), col);\n\t\t\tconst res = sql`${sql.identifier(this.casing.getColumnCasing(col))} = ${value}`;\n\n\t\t\tif (i < setSize - 1) {\n\t\t\t\treturn [res, sql.raw(', ')];\n\t\t\t}\n\t\t\treturn [res];\n\t\t}));\n\t}\n\n\tbuildUpdateQuery({ table, set, where, returning, withList, joins, from, limit, orderBy }: SQLiteUpdateConfig): SQL {\n\t\tconst withSql = this.buildWithCTE(withList);\n\n\t\tconst setSql = this.buildUpdateSet(table, set);\n\n\t\tconst fromSql = from && sql.join([sql.raw(' from '), this.buildFromTable(from)]);\n\n\t\tconst joinsSql = this.buildJoins(joins);\n\n\t\tconst returningSql = returning\n\t\t\t? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}`\n\t\t\t: undefined;\n\n\t\tconst whereSql = where ? sql` where ${where}` : undefined;\n\n\t\tconst orderBySql = this.buildOrderBy(orderBy);\n\n\t\tconst limitSql = this.buildLimit(limit);\n\n\t\treturn sql`${withSql}update ${table} set ${setSql}${fromSql}${joinsSql}${whereSql}${returningSql}${orderBySql}${limitSql}`;\n\t}\n\n\t/**\n\t * Builds selection SQL with provided fields/expressions\n\t *\n\t * Examples:\n\t *\n\t * `select from`\n\t *\n\t * `insert ... returning `\n\t *\n\t * If `isSingleTable` is true, then columns won't be prefixed with table name\n\t */\n\tprivate buildSelection(\n\t\tfields: SelectedFieldsOrdered,\n\t\t{ isSingleTable = false }: { isSingleTable?: boolean } = {},\n\t): SQL {\n\t\tconst columnsLen = fields.length;\n\n\t\tconst chunks = fields\n\t\t\t.flatMap(({ field }, i) => {\n\t\t\t\tconst chunk: SQLChunk[] = [];\n\n\t\t\t\tif (is(field, SQL.Aliased) && field.isSelectionField) {\n\t\t\t\t\tchunk.push(sql.identifier(field.fieldAlias));\n\t\t\t\t} else if (is(field, SQL.Aliased) || is(field, SQL)) {\n\t\t\t\t\tconst query = is(field, SQL.Aliased) ? field.sql : field;\n\n\t\t\t\t\tif (isSingleTable) {\n\t\t\t\t\t\tchunk.push(\n\t\t\t\t\t\t\tnew SQL(\n\t\t\t\t\t\t\t\tquery.queryChunks.map((c) => {\n\t\t\t\t\t\t\t\t\tif (is(c, Column)) {\n\t\t\t\t\t\t\t\t\t\treturn sql.identifier(this.casing.getColumnCasing(c));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn c;\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchunk.push(query);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (is(field, SQL.Aliased)) {\n\t\t\t\t\t\tchunk.push(sql` as ${sql.identifier(field.fieldAlias)}`);\n\t\t\t\t\t}\n\t\t\t\t} else if (is(field, Column)) {\n\t\t\t\t\tconst tableName = field.table[Table.Symbol.Name];\n\t\t\t\t\tif (field.columnType === 'SQLiteNumericBigInt') {\n\t\t\t\t\t\tif (isSingleTable) {\n\t\t\t\t\t\t\tchunk.push(sql`cast(${sql.identifier(this.casing.getColumnCasing(field))} as text)`);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchunk.push(\n\t\t\t\t\t\t\t\tsql`cast(${sql.identifier(tableName)}.${sql.identifier(this.casing.getColumnCasing(field))} as text)`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (isSingleTable) {\n\t\t\t\t\t\t\tchunk.push(sql.identifier(this.casing.getColumnCasing(field)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchunk.push(sql`${sql.identifier(tableName)}.${sql.identifier(this.casing.getColumnCasing(field))}`);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (i < columnsLen - 1) {\n\t\t\t\t\tchunk.push(sql`, `);\n\t\t\t\t}\n\n\t\t\t\treturn chunk;\n\t\t\t});\n\n\t\treturn sql.join(chunks);\n\t}\n\n\tprivate buildJoins(joins: SQLiteSelectJoinConfig[] | undefined): SQL | undefined {\n\t\tif (!joins || joins.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst joinsArray: SQL[] = [];\n\n\t\tif (joins) {\n\t\t\tfor (const [index, joinMeta] of joins.entries()) {\n\t\t\t\tif (index === 0) {\n\t\t\t\t\tjoinsArray.push(sql` `);\n\t\t\t\t}\n\t\t\t\tconst table = joinMeta.table;\n\t\t\t\tconst onSql = joinMeta.on ? sql` on ${joinMeta.on}` : undefined;\n\n\t\t\t\tif (is(table, SQLiteTable)) {\n\t\t\t\t\tconst tableName = table[SQLiteTable.Symbol.Name];\n\t\t\t\t\tconst tableSchema = table[SQLiteTable.Symbol.Schema];\n\t\t\t\t\tconst origTableName = table[SQLiteTable.Symbol.OriginalName];\n\t\t\t\t\tconst alias = tableName === origTableName ? undefined : joinMeta.alias;\n\t\t\t\t\tjoinsArray.push(\n\t\t\t\t\t\tsql`${sql.raw(joinMeta.joinType)} join ${tableSchema ? sql`${sql.identifier(tableSchema)}.` : undefined}${\n\t\t\t\t\t\t\tsql.identifier(origTableName)\n\t\t\t\t\t\t}${alias && sql` ${sql.identifier(alias)}`}${onSql}`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tjoinsArray.push(\n\t\t\t\t\t\tsql`${sql.raw(joinMeta.joinType)} join ${table}${onSql}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (index < joins.length - 1) {\n\t\t\t\t\tjoinsArray.push(sql` `);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn sql.join(joinsArray);\n\t}\n\n\tprivate buildLimit(limit: number | Placeholder | undefined): SQL | undefined {\n\t\treturn typeof limit === 'object' || (typeof limit === 'number' && limit >= 0)\n\t\t\t? sql` limit ${limit}`\n\t\t\t: undefined;\n\t}\n\n\tprivate buildOrderBy(orderBy: (SQLiteColumn | SQL | SQL.Aliased)[] | undefined): SQL | undefined {\n\t\tconst orderByList: (SQLiteColumn | SQL | SQL.Aliased)[] = [];\n\n\t\tif (orderBy) {\n\t\t\tfor (const [index, orderByValue] of orderBy.entries()) {\n\t\t\t\torderByList.push(orderByValue);\n\n\t\t\t\tif (index < orderBy.length - 1) {\n\t\t\t\t\torderByList.push(sql`, `);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn orderByList.length > 0 ? sql` order by ${sql.join(orderByList)}` : undefined;\n\t}\n\n\tprivate buildFromTable(\n\t\ttable: SQL | Subquery | SQLiteViewBase | SQLiteTable | undefined,\n\t): SQL | Subquery | SQLiteViewBase | SQLiteTable | undefined {\n\t\tif (is(table, Table) && table[Table.Symbol.IsAlias]) {\n\t\t\treturn sql`${sql`${sql.identifier(table[Table.Symbol.Schema] ?? '')}.`.if(table[Table.Symbol.Schema])}${\n\t\t\t\tsql.identifier(table[Table.Symbol.OriginalName])\n\t\t\t} ${sql.identifier(table[Table.Symbol.Name])}`;\n\t\t}\n\n\t\treturn table;\n\t}\n\n\tbuildSelectQuery(\n\t\t{\n\t\t\twithList,\n\t\t\tfields,\n\t\t\tfieldsFlat,\n\t\t\twhere,\n\t\t\thaving,\n\t\t\ttable,\n\t\t\tjoins,\n\t\t\torderBy,\n\t\t\tgroupBy,\n\t\t\tlimit,\n\t\t\toffset,\n\t\t\tdistinct,\n\t\t\tsetOperators,\n\t\t}: SQLiteSelectConfig,\n\t): SQL {\n\t\tconst fieldsList = fieldsFlat ?? orderSelectedFields(fields);\n\t\tfor (const f of fieldsList) {\n\t\t\tif (\n\t\t\t\tis(f.field, Column)\n\t\t\t\t&& getTableName(f.field.table)\n\t\t\t\t\t!== (is(table, Subquery)\n\t\t\t\t\t\t? table._.alias\n\t\t\t\t\t\t: is(table, SQLiteViewBase)\n\t\t\t\t\t\t? table[ViewBaseConfig].name\n\t\t\t\t\t\t: is(table, SQL)\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: getTableName(table))\n\t\t\t\t&& !((table) =>\n\t\t\t\t\tjoins?.some(({ alias }) =>\n\t\t\t\t\t\talias === (table[Table.Symbol.IsAlias] ? getTableName(table) : table[Table.Symbol.BaseName])\n\t\t\t\t\t))(f.field.table)\n\t\t\t) {\n\t\t\t\tconst tableName = getTableName(f.field.table);\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Your \"${\n\t\t\t\t\t\tf.path.join('->')\n\t\t\t\t\t}\" field references a column \"${tableName}\".\"${f.field.name}\", but the table \"${tableName}\" is not part of the query! Did you forget to join it?`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst isSingleTable = !joins || joins.length === 0;\n\n\t\tconst withSql = this.buildWithCTE(withList);\n\n\t\tconst distinctSql = distinct ? sql` distinct` : undefined;\n\n\t\tconst selection = this.buildSelection(fieldsList, { isSingleTable });\n\n\t\tconst tableSql = this.buildFromTable(table);\n\n\t\tconst joinsSql = this.buildJoins(joins);\n\n\t\tconst whereSql = where ? sql` where ${where}` : undefined;\n\n\t\tconst havingSql = having ? sql` having ${having}` : undefined;\n\n\t\tconst groupByList: (SQL | AnyColumn | SQL.Aliased)[] = [];\n\t\tif (groupBy) {\n\t\t\tfor (const [index, groupByValue] of groupBy.entries()) {\n\t\t\t\tgroupByList.push(groupByValue);\n\n\t\t\t\tif (index < groupBy.length - 1) {\n\t\t\t\t\tgroupByList.push(sql`, `);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst groupBySql = groupByList.length > 0 ? sql` group by ${sql.join(groupByList)}` : undefined;\n\n\t\tconst orderBySql = this.buildOrderBy(orderBy);\n\n\t\tconst limitSql = this.buildLimit(limit);\n\n\t\tconst offsetSql = offset ? sql` offset ${offset}` : undefined;\n\n\t\tconst finalQuery =\n\t\t\tsql`${withSql}select${distinctSql} ${selection} from ${tableSql}${joinsSql}${whereSql}${groupBySql}${havingSql}${orderBySql}${limitSql}${offsetSql}`;\n\n\t\tif (setOperators.length > 0) {\n\t\t\treturn this.buildSetOperations(finalQuery, setOperators);\n\t\t}\n\n\t\treturn finalQuery;\n\t}\n\n\tbuildSetOperations(leftSelect: SQL, setOperators: SQLiteSelectConfig['setOperators']): SQL {\n\t\tconst [setOperator, ...rest] = setOperators;\n\n\t\tif (!setOperator) {\n\t\t\tthrow new Error('Cannot pass undefined values to any set operator');\n\t\t}\n\n\t\tif (rest.length === 0) {\n\t\t\treturn this.buildSetOperationQuery({ leftSelect, setOperator });\n\t\t}\n\n\t\t// Some recursive magic here\n\t\treturn this.buildSetOperations(\n\t\t\tthis.buildSetOperationQuery({ leftSelect, setOperator }),\n\t\t\trest,\n\t\t);\n\t}\n\n\tbuildSetOperationQuery({\n\t\tleftSelect,\n\t\tsetOperator: { type, isAll, rightSelect, limit, orderBy, offset },\n\t}: { leftSelect: SQL; setOperator: SQLiteSelectConfig['setOperators'][number] }): SQL {\n\t\t// SQLite doesn't support parenthesis in set operations\n\t\tconst leftChunk = sql`${leftSelect.getSQL()} `;\n\t\tconst rightChunk = sql`${rightSelect.getSQL()}`;\n\n\t\tlet orderBySql;\n\t\tif (orderBy && orderBy.length > 0) {\n\t\t\tconst orderByValues: (SQL | Name)[] = [];\n\n\t\t\t// The next bit is necessary because the sql operator replaces ${table.column} with `table`.`column`\n\t\t\t// which is invalid Sql syntax, Table from one of the SELECTs cannot be used in global ORDER clause\n\t\t\tfor (const singleOrderBy of orderBy) {\n\t\t\t\tif (is(singleOrderBy, SQLiteColumn)) {\n\t\t\t\t\torderByValues.push(sql.identifier(singleOrderBy.name));\n\t\t\t\t} else if (is(singleOrderBy, SQL)) {\n\t\t\t\t\tfor (let i = 0; i < singleOrderBy.queryChunks.length; i++) {\n\t\t\t\t\t\tconst chunk = singleOrderBy.queryChunks[i];\n\n\t\t\t\t\t\tif (is(chunk, SQLiteColumn)) {\n\t\t\t\t\t\t\tsingleOrderBy.queryChunks[i] = sql.identifier(this.casing.getColumnCasing(chunk));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\torderByValues.push(sql`${singleOrderBy}`);\n\t\t\t\t} else {\n\t\t\t\t\torderByValues.push(sql`${singleOrderBy}`);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\torderBySql = sql` order by ${sql.join(orderByValues, sql`, `)}`;\n\t\t}\n\n\t\tconst limitSql = typeof limit === 'object' || (typeof limit === 'number' && limit >= 0)\n\t\t\t? sql` limit ${limit}`\n\t\t\t: undefined;\n\n\t\tconst operatorChunk = sql.raw(`${type} ${isAll ? 'all ' : ''}`);\n\n\t\tconst offsetSql = offset ? sql` offset ${offset}` : undefined;\n\n\t\treturn sql`${leftChunk}${operatorChunk}${rightChunk}${orderBySql}${limitSql}${offsetSql}`;\n\t}\n\n\tbuildInsertQuery(\n\t\t{ table, values: valuesOrSelect, onConflict, returning, withList, select }: SQLiteInsertConfig,\n\t): SQL {\n\t\t// const isSingleValue = values.length === 1;\n\t\tconst valuesSqlList: ((SQLChunk | SQL)[] | SQL)[] = [];\n\t\tconst columns: Record = table[Table.Symbol.Columns];\n\n\t\tconst colEntries: [string, SQLiteColumn][] = Object.entries(columns).filter(([_, col]) =>\n\t\t\t!col.shouldDisableInsert()\n\t\t);\n\t\tconst insertOrder = colEntries.map(([, column]) => sql.identifier(this.casing.getColumnCasing(column)));\n\n\t\tif (select) {\n\t\t\tconst select = valuesOrSelect as AnySQLiteSelectQueryBuilder | SQL;\n\n\t\t\tif (is(select, SQL)) {\n\t\t\t\tvaluesSqlList.push(select);\n\t\t\t} else {\n\t\t\t\tvaluesSqlList.push(select.getSQL());\n\t\t\t}\n\t\t} else {\n\t\t\tconst values = valuesOrSelect as Record[];\n\t\t\tvaluesSqlList.push(sql.raw('values '));\n\n\t\t\tfor (const [valueIndex, value] of values.entries()) {\n\t\t\t\tconst valueList: (SQLChunk | SQL)[] = [];\n\t\t\t\tfor (const [fieldName, col] of colEntries) {\n\t\t\t\t\tconst colValue = value[fieldName];\n\t\t\t\t\tif (colValue === undefined || (is(colValue, Param) && colValue.value === undefined)) {\n\t\t\t\t\t\tlet defaultValue;\n\t\t\t\t\t\tif (col.default !== null && col.default !== undefined) {\n\t\t\t\t\t\t\tdefaultValue = is(col.default, SQL) ? col.default : sql.param(col.default, col);\n\t\t\t\t\t\t\t// eslint-disable-next-line unicorn/no-negated-condition\n\t\t\t\t\t\t} else if (col.defaultFn !== undefined) {\n\t\t\t\t\t\t\tconst defaultFnResult = col.defaultFn();\n\t\t\t\t\t\t\tdefaultValue = is(defaultFnResult, SQL) ? defaultFnResult : sql.param(defaultFnResult, col);\n\t\t\t\t\t\t\t// eslint-disable-next-line unicorn/no-negated-condition\n\t\t\t\t\t\t} else if (!col.default && col.onUpdateFn !== undefined) {\n\t\t\t\t\t\t\tconst onUpdateFnResult = col.onUpdateFn();\n\t\t\t\t\t\t\tdefaultValue = is(onUpdateFnResult, SQL) ? onUpdateFnResult : sql.param(onUpdateFnResult, col);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdefaultValue = sql`null`;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalueList.push(defaultValue);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalueList.push(colValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvaluesSqlList.push(valueList);\n\t\t\t\tif (valueIndex < values.length - 1) {\n\t\t\t\t\tvaluesSqlList.push(sql`, `);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst withSql = this.buildWithCTE(withList);\n\n\t\tconst valuesSql = sql.join(valuesSqlList);\n\n\t\tconst returningSql = returning\n\t\t\t? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}`\n\t\t\t: undefined;\n\n\t\tconst onConflictSql = onConflict?.length\n\t\t\t? sql.join(onConflict)\n\t\t\t: undefined;\n\n\t\t// if (isSingleValue && valuesSqlList.length === 0){\n\t\t// \treturn sql`insert into ${table} default values ${onConflictSql}${returningSql}`;\n\t\t// }\n\n\t\treturn sql`${withSql}insert into ${table} ${insertOrder} ${valuesSql}${onConflictSql}${returningSql}`;\n\t}\n\n\tsqlToQuery(sql: SQL, invokeSource?: 'indexes' | undefined): QueryWithTypings {\n\t\treturn sql.toQuery({\n\t\t\tcasing: this.casing,\n\t\t\tescapeName: this.escapeName,\n\t\t\tescapeParam: this.escapeParam,\n\t\t\tescapeString: this.escapeString,\n\t\t\tinvokeSource,\n\t\t});\n\t}\n\n\tbuildRelationalQuery({\n\t\tfullSchema,\n\t\tschema,\n\t\ttableNamesMap,\n\t\ttable,\n\t\ttableConfig,\n\t\tqueryConfig: config,\n\t\ttableAlias,\n\t\tnestedQueryRelation,\n\t\tjoinOn,\n\t}: {\n\t\tfullSchema: Record;\n\t\tschema: TablesRelationalConfig;\n\t\ttableNamesMap: Record;\n\t\ttable: SQLiteTable;\n\t\ttableConfig: TableRelationalConfig;\n\t\tqueryConfig: true | DBQueryConfig<'many', true>;\n\t\ttableAlias: string;\n\t\tnestedQueryRelation?: Relation;\n\t\tjoinOn?: SQL;\n\t}): BuildRelationalQueryResult {\n\t\tlet selection: BuildRelationalQueryResult['selection'] = [];\n\t\tlet limit, offset, orderBy: SQLiteSelectConfig['orderBy'] = [], where;\n\t\tconst joins: SQLiteSelectJoinConfig[] = [];\n\n\t\tif (config === true) {\n\t\t\tconst selectionEntries = Object.entries(tableConfig.columns);\n\t\t\tselection = selectionEntries.map((\n\t\t\t\t[key, value],\n\t\t\t) => ({\n\t\t\t\tdbKey: value.name,\n\t\t\t\ttsKey: key,\n\t\t\t\tfield: aliasedTableColumn(value as SQLiteColumn, tableAlias),\n\t\t\t\trelationTableTsKey: undefined,\n\t\t\t\tisJson: false,\n\t\t\t\tselection: [],\n\t\t\t}));\n\t\t} else {\n\t\t\tconst aliasedColumns = Object.fromEntries(\n\t\t\t\tObject.entries(tableConfig.columns).map(([key, value]) => [key, aliasedTableColumn(value, tableAlias)]),\n\t\t\t);\n\n\t\t\tif (config.where) {\n\t\t\t\tconst whereSql = typeof config.where === 'function'\n\t\t\t\t\t? config.where(aliasedColumns, getOperators())\n\t\t\t\t\t: config.where;\n\t\t\t\twhere = whereSql && mapColumnsInSQLToAlias(whereSql, tableAlias);\n\t\t\t}\n\n\t\t\tconst fieldsSelection: { tsKey: string; value: SQLiteColumn | SQL.Aliased }[] = [];\n\t\t\tlet selectedColumns: string[] = [];\n\n\t\t\t// Figure out which columns to select\n\t\t\tif (config.columns) {\n\t\t\t\tlet isIncludeMode = false;\n\n\t\t\t\tfor (const [field, value] of Object.entries(config.columns)) {\n\t\t\t\t\tif (value === undefined) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (field in tableConfig.columns) {\n\t\t\t\t\t\tif (!isIncludeMode && value === true) {\n\t\t\t\t\t\t\tisIncludeMode = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tselectedColumns.push(field);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (selectedColumns.length > 0) {\n\t\t\t\t\tselectedColumns = isIncludeMode\n\t\t\t\t\t\t? selectedColumns.filter((c) => config.columns?.[c] === true)\n\t\t\t\t\t\t: Object.keys(tableConfig.columns).filter((key) => !selectedColumns.includes(key));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Select all columns if selection is not specified\n\t\t\t\tselectedColumns = Object.keys(tableConfig.columns);\n\t\t\t}\n\n\t\t\tfor (const field of selectedColumns) {\n\t\t\t\tconst column = tableConfig.columns[field]! as SQLiteColumn;\n\t\t\t\tfieldsSelection.push({ tsKey: field, value: column });\n\t\t\t}\n\n\t\t\tlet selectedRelations: {\n\t\t\t\ttsKey: string;\n\t\t\t\tqueryConfig: true | DBQueryConfig<'many', false>;\n\t\t\t\trelation: Relation;\n\t\t\t}[] = [];\n\n\t\t\t// Figure out which relations to select\n\t\t\tif (config.with) {\n\t\t\t\tselectedRelations = Object.entries(config.with)\n\t\t\t\t\t.filter((entry): entry is [typeof entry[0], NonNullable] => !!entry[1])\n\t\t\t\t\t.map(([tsKey, queryConfig]) => ({ tsKey, queryConfig, relation: tableConfig.relations[tsKey]! }));\n\t\t\t}\n\n\t\t\tlet extras;\n\n\t\t\t// Figure out which extras to select\n\t\t\tif (config.extras) {\n\t\t\t\textras = typeof config.extras === 'function'\n\t\t\t\t\t? config.extras(aliasedColumns, { sql })\n\t\t\t\t\t: config.extras;\n\t\t\t\tfor (const [tsKey, value] of Object.entries(extras)) {\n\t\t\t\t\tfieldsSelection.push({\n\t\t\t\t\t\ttsKey,\n\t\t\t\t\t\tvalue: mapColumnsInAliasedSQLToAlias(value, tableAlias),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Transform `fieldsSelection` into `selection`\n\t\t\t// `fieldsSelection` shouldn't be used after this point\n\t\t\tfor (const { tsKey, value } of fieldsSelection) {\n\t\t\t\tselection.push({\n\t\t\t\t\tdbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey]!.name,\n\t\t\t\t\ttsKey,\n\t\t\t\t\tfield: is(value, Column) ? aliasedTableColumn(value, tableAlias) : value,\n\t\t\t\t\trelationTableTsKey: undefined,\n\t\t\t\t\tisJson: false,\n\t\t\t\t\tselection: [],\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tlet orderByOrig = typeof config.orderBy === 'function'\n\t\t\t\t? config.orderBy(aliasedColumns, getOrderByOperators())\n\t\t\t\t: config.orderBy ?? [];\n\t\t\tif (!Array.isArray(orderByOrig)) {\n\t\t\t\torderByOrig = [orderByOrig];\n\t\t\t}\n\t\t\torderBy = orderByOrig.map((orderByValue) => {\n\t\t\t\tif (is(orderByValue, Column)) {\n\t\t\t\t\treturn aliasedTableColumn(orderByValue, tableAlias) as SQLiteColumn;\n\t\t\t\t}\n\t\t\t\treturn mapColumnsInSQLToAlias(orderByValue, tableAlias);\n\t\t\t});\n\n\t\t\tlimit = config.limit;\n\t\t\toffset = config.offset;\n\n\t\t\t// Process all relations\n\t\t\tfor (\n\t\t\t\tconst {\n\t\t\t\t\ttsKey: selectedRelationTsKey,\n\t\t\t\t\tqueryConfig: selectedRelationConfigValue,\n\t\t\t\t\trelation,\n\t\t\t\t} of selectedRelations\n\t\t\t) {\n\t\t\t\tconst normalizedRelation = normalizeRelation(schema, tableNamesMap, relation);\n\t\t\t\tconst relationTableName = getTableUniqueName(relation.referencedTable);\n\t\t\t\tconst relationTableTsName = tableNamesMap[relationTableName]!;\n\t\t\t\tconst relationTableAlias = `${tableAlias}_${selectedRelationTsKey}`;\n\t\t\t\t// const relationTable = schema[relationTableTsName]!;\n\t\t\t\tconst joinOn = and(\n\t\t\t\t\t...normalizedRelation.fields.map((field, i) =>\n\t\t\t\t\t\teq(\n\t\t\t\t\t\t\taliasedTableColumn(normalizedRelation.references[i]!, relationTableAlias),\n\t\t\t\t\t\t\taliasedTableColumn(field, tableAlias),\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tconst builtRelation = this.buildRelationalQuery({\n\t\t\t\t\tfullSchema,\n\t\t\t\t\tschema,\n\t\t\t\t\ttableNamesMap,\n\t\t\t\t\ttable: fullSchema[relationTableTsName] as SQLiteTable,\n\t\t\t\t\ttableConfig: schema[relationTableTsName]!,\n\t\t\t\t\tqueryConfig: is(relation, One)\n\t\t\t\t\t\t? (selectedRelationConfigValue === true\n\t\t\t\t\t\t\t? { limit: 1 }\n\t\t\t\t\t\t\t: { ...selectedRelationConfigValue, limit: 1 })\n\t\t\t\t\t\t: selectedRelationConfigValue,\n\t\t\t\t\ttableAlias: relationTableAlias,\n\t\t\t\t\tjoinOn,\n\t\t\t\t\tnestedQueryRelation: relation,\n\t\t\t\t});\n\t\t\t\tconst field = (sql`(${builtRelation.sql})`).as(selectedRelationTsKey);\n\t\t\t\tselection.push({\n\t\t\t\t\tdbKey: selectedRelationTsKey,\n\t\t\t\t\ttsKey: selectedRelationTsKey,\n\t\t\t\t\tfield,\n\t\t\t\t\trelationTableTsKey: relationTableTsName,\n\t\t\t\t\tisJson: true,\n\t\t\t\t\tselection: builtRelation.selection,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (selection.length === 0) {\n\t\t\tthrow new DrizzleError({\n\t\t\t\tmessage:\n\t\t\t\t\t`No fields selected for table \"${tableConfig.tsName}\" (\"${tableAlias}\"). You need to have at least one item in \"columns\", \"with\" or \"extras\". If you need to select all columns, omit the \"columns\" key or set it to undefined.`,\n\t\t\t});\n\t\t}\n\n\t\tlet result;\n\n\t\twhere = and(joinOn, where);\n\n\t\tif (nestedQueryRelation) {\n\t\t\tlet field = sql`json_array(${\n\t\t\t\tsql.join(\n\t\t\t\t\tselection.map(({ field }) =>\n\t\t\t\t\t\tis(field, SQLiteColumn)\n\t\t\t\t\t\t\t? sql.identifier(this.casing.getColumnCasing(field))\n\t\t\t\t\t\t\t: is(field, SQL.Aliased)\n\t\t\t\t\t\t\t? field.sql\n\t\t\t\t\t\t\t: field\n\t\t\t\t\t),\n\t\t\t\t\tsql`, `,\n\t\t\t\t)\n\t\t\t})`;\n\t\t\tif (is(nestedQueryRelation, Many)) {\n\t\t\t\tfield = sql`coalesce(json_group_array(${field}), json_array())`;\n\t\t\t}\n\t\t\tconst nestedSelection = [{\n\t\t\t\tdbKey: 'data',\n\t\t\t\ttsKey: 'data',\n\t\t\t\tfield: field.as('data'),\n\t\t\t\tisJson: true,\n\t\t\t\trelationTableTsKey: tableConfig.tsName,\n\t\t\t\tselection,\n\t\t\t}];\n\n\t\t\tconst needsSubquery = limit !== undefined || offset !== undefined || orderBy.length > 0;\n\n\t\t\tif (needsSubquery) {\n\t\t\t\tresult = this.buildSelectQuery({\n\t\t\t\t\ttable: aliasedTable(table, tableAlias),\n\t\t\t\t\tfields: {},\n\t\t\t\t\tfieldsFlat: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpath: [],\n\t\t\t\t\t\t\tfield: sql.raw('*'),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\twhere,\n\t\t\t\t\tlimit,\n\t\t\t\t\toffset,\n\t\t\t\t\torderBy,\n\t\t\t\t\tsetOperators: [],\n\t\t\t\t});\n\n\t\t\t\twhere = undefined;\n\t\t\t\tlimit = undefined;\n\t\t\t\toffset = undefined;\n\t\t\t\torderBy = undefined;\n\t\t\t} else {\n\t\t\t\tresult = aliasedTable(table, tableAlias);\n\t\t\t}\n\n\t\t\tresult = this.buildSelectQuery({\n\t\t\t\ttable: is(result, SQLiteTable) ? result : new Subquery(result, {}, tableAlias),\n\t\t\t\tfields: {},\n\t\t\t\tfieldsFlat: nestedSelection.map(({ field }) => ({\n\t\t\t\t\tpath: [],\n\t\t\t\t\tfield: is(field, Column) ? aliasedTableColumn(field, tableAlias) : field,\n\t\t\t\t})),\n\t\t\t\tjoins,\n\t\t\t\twhere,\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t\torderBy,\n\t\t\t\tsetOperators: [],\n\t\t\t});\n\t\t} else {\n\t\t\tresult = this.buildSelectQuery({\n\t\t\t\ttable: aliasedTable(table, tableAlias),\n\t\t\t\tfields: {},\n\t\t\t\tfieldsFlat: selection.map(({ field }) => ({\n\t\t\t\t\tpath: [],\n\t\t\t\t\tfield: is(field, Column) ? aliasedTableColumn(field, tableAlias) : field,\n\t\t\t\t})),\n\t\t\t\tjoins,\n\t\t\t\twhere,\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t\torderBy,\n\t\t\t\tsetOperators: [],\n\t\t\t});\n\t\t}\n\n\t\treturn {\n\t\t\ttableTsKey: tableConfig.tsName,\n\t\t\tsql: result,\n\t\t\tselection,\n\t\t};\n\t}\n}\n\nexport class SQLiteSyncDialect extends SQLiteDialect {\n\tstatic override readonly [entityKind]: string = 'SQLiteSyncDialect';\n\n\tmigrate(\n\t\tmigrations: MigrationMeta[],\n\t\tsession: SQLiteSession<'sync', unknown, Record, TablesRelationalConfig>,\n\t\tconfig?: string | MigrationConfig,\n\t): void {\n\t\tconst migrationsTable = config === undefined\n\t\t\t? '__drizzle_migrations'\n\t\t\t: typeof config === 'string'\n\t\t\t? '__drizzle_migrations'\n\t\t\t: config.migrationsTable ?? '__drizzle_migrations';\n\n\t\tconst migrationTableCreate = sql`\n\t\t\tCREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (\n\t\t\t\tid SERIAL PRIMARY KEY,\n\t\t\t\thash text NOT NULL,\n\t\t\t\tcreated_at numeric\n\t\t\t)\n\t\t`;\n\t\tsession.run(migrationTableCreate);\n\n\t\tconst dbMigrations = session.values<[number, string, string]>(\n\t\t\tsql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1`,\n\t\t);\n\n\t\tconst lastDbMigration = dbMigrations[0] ?? undefined;\n\t\tsession.run(sql`BEGIN`);\n\n\t\ttry {\n\t\t\tfor (const migration of migrations) {\n\t\t\t\tif (!lastDbMigration || Number(lastDbMigration[2])! < migration.folderMillis) {\n\t\t\t\t\tfor (const stmt of migration.sql) {\n\t\t\t\t\t\tsession.run(sql.raw(stmt));\n\t\t\t\t\t}\n\t\t\t\t\tsession.run(\n\t\t\t\t\t\tsql`INSERT INTO ${\n\t\t\t\t\t\t\tsql.identifier(migrationsTable)\n\t\t\t\t\t\t} (\"hash\", \"created_at\") VALUES(${migration.hash}, ${migration.folderMillis})`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsession.run(sql`COMMIT`);\n\t\t} catch (e) {\n\t\t\tsession.run(sql`ROLLBACK`);\n\t\t\tthrow e;\n\t\t}\n\t}\n}\n\nexport class SQLiteAsyncDialect extends SQLiteDialect {\n\tstatic override readonly [entityKind]: string = 'SQLiteAsyncDialect';\n\n\tasync migrate(\n\t\tmigrations: MigrationMeta[],\n\t\tsession: SQLiteSession<'async', any, any, any>,\n\t\tconfig?: string | MigrationConfig,\n\t): Promise {\n\t\tconst migrationsTable = config === undefined\n\t\t\t? '__drizzle_migrations'\n\t\t\t: typeof config === 'string'\n\t\t\t? '__drizzle_migrations'\n\t\t\t: config.migrationsTable ?? '__drizzle_migrations';\n\n\t\tconst migrationTableCreate = sql`\n\t\t\tCREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (\n\t\t\t\tid SERIAL PRIMARY KEY,\n\t\t\t\thash text NOT NULL,\n\t\t\t\tcreated_at numeric\n\t\t\t)\n\t\t`;\n\t\tawait session.run(migrationTableCreate);\n\n\t\tconst dbMigrations = await session.values<[number, string, string]>(\n\t\t\tsql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1`,\n\t\t);\n\n\t\tconst lastDbMigration = dbMigrations[0] ?? undefined;\n\n\t\tawait session.transaction(async (tx) => {\n\t\t\tfor (const migration of migrations) {\n\t\t\t\tif (!lastDbMigration || Number(lastDbMigration[2])! < migration.folderMillis) {\n\t\t\t\t\tfor (const stmt of migration.sql) {\n\t\t\t\t\t\tawait tx.run(sql.raw(stmt));\n\t\t\t\t\t}\n\t\t\t\t\tawait tx.run(\n\t\t\t\t\t\tsql`INSERT INTO ${\n\t\t\t\t\t\t\tsql.identifier(migrationsTable)\n\t\t\t\t\t\t} (\"hash\", \"created_at\") VALUES(${migration.hash}, ${migration.folderMillis})`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { SQL, SQLWrapper } from '~/sql/index.ts';\n\nexport abstract class TypedQueryBuilder implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'TypedQueryBuilder';\n\n\tdeclare _: {\n\t\tselectedFields: TSelection;\n\t\tresult: TResult;\n\t\tconfig?: TConfig;\n\t};\n\n\t/** @internal */\n\tgetSelectedFields(): TSelection {\n\t\treturn this._.selectedFields;\n\t}\n\n\tabstract getSQL(): SQL;\n}\n", "import type { CacheConfig, WithCacheConfig } from '~/cache/core/types.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type {\n\tBuildSubquerySelection,\n\tGetSelectTableName,\n\tGetSelectTableSelection,\n\tJoinNullability,\n\tJoinType,\n\tSelectMode,\n\tSelectResult,\n\tSetOperator,\n} from '~/query-builders/select.types.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport { SQL, View } from '~/sql/sql.ts';\nimport type { ColumnsSelection, Placeholder, Query, SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteColumn } from '~/sqlite-core/columns/index.ts';\nimport type { SQLiteDialect } from '~/sqlite-core/dialect.ts';\nimport type { SQLiteSession } from '~/sqlite-core/session.ts';\nimport type { SubqueryWithSelection } from '~/sqlite-core/subquery.ts';\nimport type { SQLiteTable } from '~/sqlite-core/table.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { Table } from '~/table.ts';\nimport {\n\tapplyMixins,\n\tgetTableColumns,\n\tgetTableLikeName,\n\thaveSameKeys,\n\torderSelectedFields,\n\ttype ValueOrArray,\n} from '~/utils.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport { extractUsedTable } from '../utils.ts';\nimport { SQLiteViewBase } from '../view-base.ts';\nimport type {\n\tAnySQLiteSelect,\n\tCreateSQLiteSelectFromBuilderMode,\n\tGetSQLiteSetOperators,\n\tSelectedFields,\n\tSetOperatorRightSelect,\n\tSQLiteCreateSetOperatorFn,\n\tSQLiteSelectConfig,\n\tSQLiteSelectCrossJoinFn,\n\tSQLiteSelectDynamic,\n\tSQLiteSelectExecute,\n\tSQLiteSelectHKT,\n\tSQLiteSelectHKTBase,\n\tSQLiteSelectJoinFn,\n\tSQLiteSelectPrepare,\n\tSQLiteSelectWithout,\n\tSQLiteSetOperatorExcludedMethods,\n\tSQLiteSetOperatorWithResult,\n} from './select.types.ts';\n\nexport class SQLiteSelectBuilder<\n\tTSelection extends SelectedFields | undefined,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTBuilderMode extends 'db' | 'qb' = 'db',\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteSelectBuilder';\n\n\tprivate fields: TSelection;\n\tprivate session: SQLiteSession | undefined;\n\tprivate dialect: SQLiteDialect;\n\tprivate withList: Subquery[] | undefined;\n\tprivate distinct: boolean | undefined;\n\n\tconstructor(\n\t\tconfig: {\n\t\t\tfields: TSelection;\n\t\t\tsession: SQLiteSession | undefined;\n\t\t\tdialect: SQLiteDialect;\n\t\t\twithList?: Subquery[];\n\t\t\tdistinct?: boolean;\n\t\t},\n\t) {\n\t\tthis.fields = config.fields;\n\t\tthis.session = config.session;\n\t\tthis.dialect = config.dialect;\n\t\tthis.withList = config.withList;\n\t\tthis.distinct = config.distinct;\n\t}\n\n\tfrom(\n\t\tsource: TFrom,\n\t): CreateSQLiteSelectFromBuilderMode<\n\t\tTBuilderMode,\n\t\tGetSelectTableName,\n\t\tTResultType,\n\t\tTRunResult,\n\t\tTSelection extends undefined ? GetSelectTableSelection : TSelection,\n\t\tTSelection extends undefined ? 'single' : 'partial'\n\t> {\n\t\tconst isPartialSelect = !!this.fields;\n\n\t\tlet fields: SelectedFields;\n\t\tif (this.fields) {\n\t\t\tfields = this.fields;\n\t\t} else if (is(source, Subquery)) {\n\t\t\t// This is required to use the proxy handler to get the correct field values from the subquery\n\t\t\tfields = Object.fromEntries(\n\t\t\t\tObject.keys(source._.selectedFields).map((\n\t\t\t\t\tkey,\n\t\t\t\t) => [key, source[key as unknown as keyof typeof source] as unknown as SelectedFields[string]]),\n\t\t\t);\n\t\t} else if (is(source, SQLiteViewBase)) {\n\t\t\tfields = source[ViewBaseConfig].selectedFields as SelectedFields;\n\t\t} else if (is(source, SQL)) {\n\t\t\tfields = {};\n\t\t} else {\n\t\t\tfields = getTableColumns(source);\n\t\t}\n\n\t\treturn new SQLiteSelectBase({\n\t\t\ttable: source,\n\t\t\tfields,\n\t\t\tisPartialSelect,\n\t\t\tsession: this.session,\n\t\t\tdialect: this.dialect,\n\t\t\twithList: this.withList,\n\t\t\tdistinct: this.distinct,\n\t\t}) as any;\n\t}\n}\n\nexport abstract class SQLiteSelectQueryBuilderBase<\n\tTHKT extends SQLiteSelectHKTBase,\n\tTTableName extends string | undefined,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTSelection extends ColumnsSelection,\n\tTSelectMode extends SelectMode,\n\tTNullabilityMap extends Record = TTableName extends string ? Record\n\t\t: {},\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n\tTResult extends any[] = SelectResult[],\n\tTSelectedFields extends ColumnsSelection = BuildSubquerySelection,\n> extends TypedQueryBuilder {\n\tstatic override readonly [entityKind]: string = 'SQLiteSelectQueryBuilder';\n\n\toverride readonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly hkt: THKT;\n\t\treadonly tableName: TTableName;\n\t\treadonly resultType: TResultType;\n\t\treadonly runResult: TRunResult;\n\t\treadonly selection: TSelection;\n\t\treadonly selectMode: TSelectMode;\n\t\treadonly nullabilityMap: TNullabilityMap;\n\t\treadonly dynamic: TDynamic;\n\t\treadonly excludedMethods: TExcludedMethods;\n\t\treadonly result: TResult;\n\t\treadonly selectedFields: TSelectedFields;\n\t\treadonly config: SQLiteSelectConfig;\n\t};\n\n\t/** @internal */\n\tconfig: SQLiteSelectConfig;\n\tprotected joinsNotNullableMap: Record;\n\tprivate tableName: string | undefined;\n\tprivate isPartialSelect: boolean;\n\tprotected session: SQLiteSession | undefined;\n\tprotected dialect: SQLiteDialect;\n\tprotected cacheConfig?: WithCacheConfig = undefined;\n\tprotected usedTables: Set = new Set();\n\n\tconstructor(\n\t\t{ table, fields, isPartialSelect, session, dialect, withList, distinct }: {\n\t\t\ttable: SQLiteSelectConfig['table'];\n\t\t\tfields: SQLiteSelectConfig['fields'];\n\t\t\tisPartialSelect: boolean;\n\t\t\tsession: SQLiteSession | undefined;\n\t\t\tdialect: SQLiteDialect;\n\t\t\twithList: Subquery[] | undefined;\n\t\t\tdistinct: boolean | undefined;\n\t\t},\n\t) {\n\t\tsuper();\n\t\tthis.config = {\n\t\t\twithList,\n\t\t\ttable,\n\t\t\tfields: { ...fields },\n\t\t\tdistinct,\n\t\t\tsetOperators: [],\n\t\t};\n\t\tthis.isPartialSelect = isPartialSelect;\n\t\tthis.session = session;\n\t\tthis.dialect = dialect;\n\t\tthis._ = {\n\t\t\tselectedFields: fields as TSelectedFields,\n\t\t\tconfig: this.config,\n\t\t} as this['_'];\n\t\tthis.tableName = getTableLikeName(table);\n\t\tthis.joinsNotNullableMap = typeof this.tableName === 'string' ? { [this.tableName]: true } : {};\n\t\tfor (const item of extractUsedTable(table)) this.usedTables.add(item);\n\t}\n\n\t/** @internal */\n\tgetUsedTables() {\n\t\treturn [...this.usedTables];\n\t}\n\n\tprivate createJoin(\n\t\tjoinType: TJoinType,\n\t): 'cross' extends TJoinType ? SQLiteSelectCrossJoinFn\n\t\t: SQLiteSelectJoinFn\n\t{\n\t\treturn (\n\t\t\ttable: SQLiteTable | Subquery | SQLiteViewBase | SQL,\n\t\t\ton?: ((aliases: TSelection) => SQL | undefined) | SQL | undefined,\n\t\t) => {\n\t\t\tconst baseTableName = this.tableName;\n\t\t\tconst tableName = getTableLikeName(table);\n\n\t\t\t// store all tables used in a query\n\t\t\tfor (const item of extractUsedTable(table)) this.usedTables.add(item);\n\n\t\t\tif (typeof tableName === 'string' && this.config.joins?.some((join) => join.alias === tableName)) {\n\t\t\t\tthrow new Error(`Alias \"${tableName}\" is already used in this query`);\n\t\t\t}\n\n\t\t\tif (!this.isPartialSelect) {\n\t\t\t\t// If this is the first join and this is not a partial select and we're not selecting from raw SQL, \"move\" the fields from the main table to the nested object\n\t\t\t\tif (Object.keys(this.joinsNotNullableMap).length === 1 && typeof baseTableName === 'string') {\n\t\t\t\t\tthis.config.fields = {\n\t\t\t\t\t\t[baseTableName]: this.config.fields,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif (typeof tableName === 'string' && !is(table, SQL)) {\n\t\t\t\t\tconst selection = is(table, Subquery)\n\t\t\t\t\t\t? table._.selectedFields\n\t\t\t\t\t\t: is(table, View)\n\t\t\t\t\t\t? table[ViewBaseConfig].selectedFields\n\t\t\t\t\t\t: table[Table.Symbol.Columns];\n\t\t\t\t\tthis.config.fields[tableName] = selection;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof on === 'function') {\n\t\t\t\ton = on(\n\t\t\t\t\tnew Proxy(\n\t\t\t\t\t\tthis.config.fields,\n\t\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t\t) as TSelection,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (!this.config.joins) {\n\t\t\t\tthis.config.joins = [];\n\t\t\t}\n\t\t\tthis.config.joins.push({ on, table, joinType, alias: tableName });\n\n\t\t\tif (typeof tableName === 'string') {\n\t\t\t\tswitch (joinType) {\n\t\t\t\t\tcase 'left': {\n\t\t\t\t\t\tthis.joinsNotNullableMap[tableName] = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'right': {\n\t\t\t\t\t\tthis.joinsNotNullableMap = Object.fromEntries(\n\t\t\t\t\t\t\tObject.entries(this.joinsNotNullableMap).map(([key]) => [key, false]),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.joinsNotNullableMap[tableName] = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'cross':\n\t\t\t\t\tcase 'inner': {\n\t\t\t\t\t\tthis.joinsNotNullableMap[tableName] = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'full': {\n\t\t\t\t\t\tthis.joinsNotNullableMap = Object.fromEntries(\n\t\t\t\t\t\t\tObject.entries(this.joinsNotNullableMap).map(([key]) => [key, false]),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.joinsNotNullableMap[tableName] = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this as any;\n\t\t};\n\t}\n\n\t/**\n\t * Executes a `left join` operation by adding another table to the current query.\n\t *\n\t * Calling this method associates each row of the table with the corresponding row from the joined table, if a match is found. If no matching row exists, it sets all columns of the joined table to null.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#left-join}\n\t *\n\t * @param table the table to join.\n\t * @param on the `on` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users and their pets\n\t * const usersWithPets: { user: User; pets: Pet | null; }[] = await db.select()\n\t * .from(users)\n\t * .leftJoin(pets, eq(users.id, pets.ownerId))\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number; petId: number | null; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .leftJoin(pets, eq(users.id, pets.ownerId))\n\t * ```\n\t */\n\tleftJoin = this.createJoin('left');\n\n\t/**\n\t * Executes a `right join` operation by adding another table to the current query.\n\t *\n\t * Calling this method associates each row of the joined table with the corresponding row from the main table, if a match is found. If no matching row exists, it sets all columns of the main table to null.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#right-join}\n\t *\n\t * @param table the table to join.\n\t * @param on the `on` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users and their pets\n\t * const usersWithPets: { user: User | null; pets: Pet; }[] = await db.select()\n\t * .from(users)\n\t * .rightJoin(pets, eq(users.id, pets.ownerId))\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number | null; petId: number; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .rightJoin(pets, eq(users.id, pets.ownerId))\n\t * ```\n\t */\n\trightJoin = this.createJoin('right');\n\n\t/**\n\t * Executes an `inner join` operation, creating a new table by combining rows from two tables that have matching values.\n\t *\n\t * Calling this method retrieves rows that have corresponding entries in both joined tables. Rows without matching entries in either table are excluded, resulting in a table that includes only matching pairs.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#inner-join}\n\t *\n\t * @param table the table to join.\n\t * @param on the `on` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users and their pets\n\t * const usersWithPets: { user: User; pets: Pet; }[] = await db.select()\n\t * .from(users)\n\t * .innerJoin(pets, eq(users.id, pets.ownerId))\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number; petId: number; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .innerJoin(pets, eq(users.id, pets.ownerId))\n\t * ```\n\t */\n\tinnerJoin = this.createJoin('inner');\n\n\t/**\n\t * Executes a `full join` operation by combining rows from two tables into a new table.\n\t *\n\t * Calling this method retrieves all rows from both main and joined tables, merging rows with matching values and filling in `null` for non-matching columns.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#full-join}\n\t *\n\t * @param table the table to join.\n\t * @param on the `on` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users and their pets\n\t * const usersWithPets: { user: User | null; pets: Pet | null; }[] = await db.select()\n\t * .from(users)\n\t * .fullJoin(pets, eq(users.id, pets.ownerId))\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number | null; petId: number | null; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .fullJoin(pets, eq(users.id, pets.ownerId))\n\t * ```\n\t */\n\tfullJoin = this.createJoin('full');\n\n\t/**\n\t * Executes a `cross join` operation by combining rows from two tables into a new table.\n\t *\n\t * Calling this method retrieves all rows from both main and joined tables, merging all rows from each table.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#cross-join}\n\t *\n\t * @param table the table to join.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users, each user with every pet\n\t * const usersWithPets: { user: User; pets: Pet; }[] = await db.select()\n\t * .from(users)\n\t * .crossJoin(pets)\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number; petId: number; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .crossJoin(pets)\n\t * ```\n\t */\n\tcrossJoin = this.createJoin('cross');\n\n\tprivate createSetOperator(\n\t\ttype: SetOperator,\n\t\tisAll: boolean,\n\t): >(\n\t\trightSelection:\n\t\t\t| ((setOperators: GetSQLiteSetOperators) => SetOperatorRightSelect)\n\t\t\t| SetOperatorRightSelect,\n\t) => SQLiteSelectWithout<\n\t\tthis,\n\t\tTDynamic,\n\t\tSQLiteSetOperatorExcludedMethods,\n\t\ttrue\n\t> {\n\t\treturn (rightSelection) => {\n\t\t\tconst rightSelect = (typeof rightSelection === 'function'\n\t\t\t\t? rightSelection(getSQLiteSetOperators())\n\t\t\t\t: rightSelection) as TypedQueryBuilder<\n\t\t\t\t\tany,\n\t\t\t\t\tTResult\n\t\t\t\t>;\n\n\t\t\tif (!haveSameKeys(this.getSelectedFields(), rightSelect.getSelectedFields())) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'Set operator error (union / intersect / except): selected fields are not the same or are in a different order',\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.config.setOperators.push({ type, isAll, rightSelect });\n\t\t\treturn this as any;\n\t\t};\n\t}\n\n\t/**\n\t * Adds `union` set operator to the query.\n\t *\n\t * Calling this method will combine the result sets of the `select` statements and remove any duplicate rows that appear across them.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/set-operations#union}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all unique names from customers and users tables\n\t * await db.select({ name: users.name })\n\t * .from(users)\n\t * .union(\n\t * db.select({ name: customers.name }).from(customers)\n\t * );\n\t * // or\n\t * import { union } from 'drizzle-orm/sqlite-core'\n\t *\n\t * await union(\n\t * db.select({ name: users.name }).from(users),\n\t * db.select({ name: customers.name }).from(customers)\n\t * );\n\t * ```\n\t */\n\tunion = this.createSetOperator('union', false);\n\n\t/**\n\t * Adds `union all` set operator to the query.\n\t *\n\t * Calling this method will combine the result-set of the `select` statements and keep all duplicate rows that appear across them.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/set-operations#union-all}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all transaction ids from both online and in-store sales\n\t * await db.select({ transaction: onlineSales.transactionId })\n\t * .from(onlineSales)\n\t * .unionAll(\n\t * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)\n\t * );\n\t * // or\n\t * import { unionAll } from 'drizzle-orm/sqlite-core'\n\t *\n\t * await unionAll(\n\t * db.select({ transaction: onlineSales.transactionId }).from(onlineSales),\n\t * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)\n\t * );\n\t * ```\n\t */\n\tunionAll = this.createSetOperator('union', true);\n\n\t/**\n\t * Adds `intersect` set operator to the query.\n\t *\n\t * Calling this method will retain only the rows that are present in both result sets and eliminate duplicates.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/set-operations#intersect}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select course names that are offered in both departments A and B\n\t * await db.select({ courseName: depA.courseName })\n\t * .from(depA)\n\t * .intersect(\n\t * db.select({ courseName: depB.courseName }).from(depB)\n\t * );\n\t * // or\n\t * import { intersect } from 'drizzle-orm/sqlite-core'\n\t *\n\t * await intersect(\n\t * db.select({ courseName: depA.courseName }).from(depA),\n\t * db.select({ courseName: depB.courseName }).from(depB)\n\t * );\n\t * ```\n\t */\n\tintersect = this.createSetOperator('intersect', false);\n\n\t/**\n\t * Adds `except` set operator to the query.\n\t *\n\t * Calling this method will retrieve all unique rows from the left query, except for the rows that are present in the result set of the right query.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/set-operations#except}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all courses offered in department A but not in department B\n\t * await db.select({ courseName: depA.courseName })\n\t * .from(depA)\n\t * .except(\n\t * db.select({ courseName: depB.courseName }).from(depB)\n\t * );\n\t * // or\n\t * import { except } from 'drizzle-orm/sqlite-core'\n\t *\n\t * await except(\n\t * db.select({ courseName: depA.courseName }).from(depA),\n\t * db.select({ courseName: depB.courseName }).from(depB)\n\t * );\n\t * ```\n\t */\n\texcept = this.createSetOperator('except', false);\n\n\t/** @internal */\n\taddSetOperators(setOperators: SQLiteSelectConfig['setOperators']): SQLiteSelectWithout<\n\t\tthis,\n\t\tTDynamic,\n\t\tSQLiteSetOperatorExcludedMethods,\n\t\ttrue\n\t> {\n\t\tthis.config.setOperators.push(...setOperators);\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `where` clause to the query.\n\t *\n\t * Calling this method will select only those rows that fulfill a specified condition.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#filtering}\n\t *\n\t * @param where the `where` clause.\n\t *\n\t * @example\n\t * You can use conditional operators and `sql function` to filter the rows to be selected.\n\t *\n\t * ```ts\n\t * // Select all cars with green color\n\t * await db.select().from(cars).where(eq(cars.color, 'green'));\n\t * // or\n\t * await db.select().from(cars).where(sql`${cars.color} = 'green'`)\n\t * ```\n\t *\n\t * You can logically combine conditional operators with `and()` and `or()` operators:\n\t *\n\t * ```ts\n\t * // Select all BMW cars with a green color\n\t * await db.select().from(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW')));\n\t *\n\t * // Select all cars with the green or blue color\n\t * await db.select().from(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue')));\n\t * ```\n\t */\n\twhere(\n\t\twhere: ((aliases: TSelection) => SQL | undefined) | SQL | undefined,\n\t): SQLiteSelectWithout {\n\t\tif (typeof where === 'function') {\n\t\t\twhere = where(\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.fields,\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t) as TSelection,\n\t\t\t);\n\t\t}\n\t\tthis.config.where = where;\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `having` clause to the query.\n\t *\n\t * Calling this method will select only those rows that fulfill a specified condition. It is typically used with aggregate functions to filter the aggregated data based on a specified condition.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#aggregations}\n\t *\n\t * @param having the `having` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all brands with more than one car\n\t * await db.select({\n\t * \tbrand: cars.brand,\n\t * \tcount: sql`cast(count(${cars.id}) as int)`,\n\t * })\n\t * .from(cars)\n\t * .groupBy(cars.brand)\n\t * .having(({ count }) => gt(count, 1));\n\t * ```\n\t */\n\thaving(\n\t\thaving: ((aliases: this['_']['selection']) => SQL | undefined) | SQL | undefined,\n\t): SQLiteSelectWithout {\n\t\tif (typeof having === 'function') {\n\t\t\thaving = having(\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.fields,\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t) as TSelection,\n\t\t\t);\n\t\t}\n\t\tthis.config.having = having;\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `group by` clause to the query.\n\t *\n\t * Calling this method will group rows that have the same values into summary rows, often used for aggregation purposes.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#aggregations}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Group and count people by their last names\n\t * await db.select({\n\t * lastName: people.lastName,\n\t * count: sql`cast(count(*) as int)`\n\t * })\n\t * .from(people)\n\t * .groupBy(people.lastName);\n\t * ```\n\t */\n\tgroupBy(\n\t\tbuilder: (aliases: this['_']['selection']) => ValueOrArray,\n\t): SQLiteSelectWithout;\n\tgroupBy(...columns: (SQLiteColumn | SQL)[]): SQLiteSelectWithout;\n\tgroupBy(\n\t\t...columns:\n\t\t\t| [(aliases: this['_']['selection']) => ValueOrArray]\n\t\t\t| (SQLiteColumn | SQL | SQL.Aliased)[]\n\t): SQLiteSelectWithout {\n\t\tif (typeof columns[0] === 'function') {\n\t\t\tconst groupBy = columns[0](\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.fields,\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'alias', sqlBehavior: 'sql' }),\n\t\t\t\t) as TSelection,\n\t\t\t);\n\t\t\tthis.config.groupBy = Array.isArray(groupBy) ? groupBy : [groupBy];\n\t\t} else {\n\t\t\tthis.config.groupBy = columns as (SQLiteColumn | SQL | SQL.Aliased)[];\n\t\t}\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds an `order by` clause to the query.\n\t *\n\t * Calling this method will sort the result-set in ascending or descending order. By default, the sort order is ascending.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#order-by}\n\t *\n\t * @example\n\t *\n\t * ```\n\t * // Select cars ordered by year\n\t * await db.select().from(cars).orderBy(cars.year);\n\t * ```\n\t *\n\t * You can specify whether results are in ascending or descending order with the `asc()` and `desc()` operators.\n\t *\n\t * ```ts\n\t * // Select cars ordered by year in descending order\n\t * await db.select().from(cars).orderBy(desc(cars.year));\n\t *\n\t * // Select cars ordered by year and price\n\t * await db.select().from(cars).orderBy(asc(cars.year), desc(cars.price));\n\t * ```\n\t */\n\torderBy(\n\t\tbuilder: (aliases: this['_']['selection']) => ValueOrArray,\n\t): SQLiteSelectWithout;\n\torderBy(...columns: (SQLiteColumn | SQL)[]): SQLiteSelectWithout;\n\torderBy(\n\t\t...columns:\n\t\t\t| [(aliases: this['_']['selection']) => ValueOrArray]\n\t\t\t| (SQLiteColumn | SQL | SQL.Aliased)[]\n\t): SQLiteSelectWithout {\n\t\tif (typeof columns[0] === 'function') {\n\t\t\tconst orderBy = columns[0](\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.fields,\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'alias', sqlBehavior: 'sql' }),\n\t\t\t\t) as TSelection,\n\t\t\t);\n\n\t\t\tconst orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy];\n\n\t\t\tif (this.config.setOperators.length > 0) {\n\t\t\t\tthis.config.setOperators.at(-1)!.orderBy = orderByArray;\n\t\t\t} else {\n\t\t\t\tthis.config.orderBy = orderByArray;\n\t\t\t}\n\t\t} else {\n\t\t\tconst orderByArray = columns as (SQLiteColumn | SQL | SQL.Aliased)[];\n\n\t\t\tif (this.config.setOperators.length > 0) {\n\t\t\t\tthis.config.setOperators.at(-1)!.orderBy = orderByArray;\n\t\t\t} else {\n\t\t\t\tthis.config.orderBy = orderByArray;\n\t\t\t}\n\t\t}\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `limit` clause to the query.\n\t *\n\t * Calling this method will set the maximum number of rows that will be returned by this query.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#limit--offset}\n\t *\n\t * @param limit the `limit` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Get the first 10 people from this query.\n\t * await db.select().from(people).limit(10);\n\t * ```\n\t */\n\tlimit(limit: number | Placeholder): SQLiteSelectWithout {\n\t\tif (this.config.setOperators.length > 0) {\n\t\t\tthis.config.setOperators.at(-1)!.limit = limit;\n\t\t} else {\n\t\t\tthis.config.limit = limit;\n\t\t}\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds an `offset` clause to the query.\n\t *\n\t * Calling this method will skip a number of rows when returning results from this query.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#limit--offset}\n\t *\n\t * @param offset the `offset` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Get the 10th-20th people from this query.\n\t * await db.select().from(people).offset(10).limit(10);\n\t * ```\n\t */\n\toffset(offset: number | Placeholder): SQLiteSelectWithout {\n\t\tif (this.config.setOperators.length > 0) {\n\t\t\tthis.config.setOperators.at(-1)!.offset = offset;\n\t\t} else {\n\t\t\tthis.config.offset = offset;\n\t\t}\n\t\treturn this as any;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildSelectQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\tas(\n\t\talias: TAlias,\n\t): SubqueryWithSelection {\n\t\tconst usedTables: string[] = [];\n\t\tusedTables.push(...extractUsedTable(this.config.table));\n\t\tif (this.config.joins) { for (const it of this.config.joins) usedTables.push(...extractUsedTable(it.table)); }\n\n\t\treturn new Proxy(\n\t\t\tnew Subquery(this.getSQL(), this.config.fields, alias, false, [...new Set(usedTables)]),\n\t\t\tnew SelectionProxyHandler({ alias, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t) as SubqueryWithSelection;\n\t}\n\n\t/** @internal */\n\toverride getSelectedFields(): this['_']['selectedFields'] {\n\t\treturn new Proxy(\n\t\t\tthis.config.fields,\n\t\t\tnew SelectionProxyHandler({ alias: this.tableName, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t) as this['_']['selectedFields'];\n\t}\n\n\t$dynamic(): SQLiteSelectDynamic {\n\t\treturn this;\n\t}\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface SQLiteSelectBase<\n\tTTableName extends string | undefined,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTSelection extends ColumnsSelection,\n\tTSelectMode extends SelectMode = 'single',\n\tTNullabilityMap extends Record = TTableName extends string ? Record\n\t\t: {},\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n\tTResult extends any[] = SelectResult[],\n\tTSelectedFields extends ColumnsSelection = BuildSubquerySelection,\n> extends\n\tSQLiteSelectQueryBuilderBase<\n\t\tSQLiteSelectHKT,\n\t\tTTableName,\n\t\tTResultType,\n\t\tTRunResult,\n\t\tTSelection,\n\t\tTSelectMode,\n\t\tTNullabilityMap,\n\t\tTDynamic,\n\t\tTExcludedMethods,\n\t\tTResult,\n\t\tTSelectedFields\n\t>,\n\tQueryPromise\n{}\n\nexport class SQLiteSelectBase<\n\tTTableName extends string | undefined,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTSelection,\n\tTSelectMode extends SelectMode = 'single',\n\tTNullabilityMap extends Record = TTableName extends string ? Record\n\t\t: {},\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n\tTResult = SelectResult[],\n\tTSelectedFields extends ColumnsSelection = BuildSubquerySelection,\n> extends SQLiteSelectQueryBuilderBase<\n\tSQLiteSelectHKT,\n\tTTableName,\n\tTResultType,\n\tTRunResult,\n\tTSelection,\n\tTSelectMode,\n\tTNullabilityMap,\n\tTDynamic,\n\tTExcludedMethods,\n\tTResult,\n\tTSelectedFields\n> implements RunnableQuery, SQLWrapper {\n\tstatic override readonly [entityKind]: string = 'SQLiteSelect';\n\n\t/** @internal */\n\t_prepare(isOneTimeQuery = true): SQLiteSelectPrepare {\n\t\tif (!this.session) {\n\t\t\tthrow new Error('Cannot execute a query on a query builder. Please use a database instance instead.');\n\t\t}\n\t\tconst fieldsList = orderSelectedFields(this.config.fields);\n\t\tconst query = this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tthis.dialect.sqlToQuery(this.getSQL()),\n\t\t\tfieldsList,\n\t\t\t'all',\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\ttype: 'select',\n\t\t\t\ttables: [...this.usedTables],\n\t\t\t},\n\t\t\tthis.cacheConfig,\n\t\t);\n\t\tquery.joinsNotNullableMap = this.joinsNotNullableMap;\n\t\treturn query as ReturnType;\n\t}\n\n\t$withCache(config?: { config?: CacheConfig; tag?: string; autoInvalidate?: boolean } | false) {\n\t\tthis.cacheConfig = config === undefined\n\t\t\t? { config: {}, enable: true, autoInvalidate: true }\n\t\t\t: config === false\n\t\t\t? { enable: false }\n\t\t\t: { enable: true, autoInvalidate: true, ...config };\n\t\treturn this;\n\t}\n\n\tprepare(): SQLiteSelectPrepare {\n\t\treturn this._prepare(false);\n\t}\n\n\trun: ReturnType['run'] = (placeholderValues) => {\n\t\treturn this._prepare().run(placeholderValues);\n\t};\n\n\tall: ReturnType['all'] = (placeholderValues) => {\n\t\treturn this._prepare().all(placeholderValues);\n\t};\n\n\tget: ReturnType['get'] = (placeholderValues) => {\n\t\treturn this._prepare().get(placeholderValues);\n\t};\n\n\tvalues: ReturnType['values'] = (placeholderValues) => {\n\t\treturn this._prepare().values(placeholderValues);\n\t};\n\n\tasync execute(): Promise> {\n\t\treturn this.all() as SQLiteSelectExecute;\n\t}\n}\n\napplyMixins(SQLiteSelectBase, [QueryPromise]);\n\nfunction createSetOperator(type: SetOperator, isAll: boolean): SQLiteCreateSetOperatorFn {\n\treturn (leftSelect, rightSelect, ...restSelects) => {\n\t\tconst setOperators = [rightSelect, ...restSelects].map((select) => ({\n\t\t\ttype,\n\t\t\tisAll,\n\t\t\trightSelect: select as AnySQLiteSelect,\n\t\t}));\n\n\t\tfor (const setOperator of setOperators) {\n\t\t\tif (!haveSameKeys((leftSelect as any).getSelectedFields(), setOperator.rightSelect.getSelectedFields())) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'Set operator error (union / intersect / except): selected fields are not the same or are in a different order',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn (leftSelect as AnySQLiteSelect).addSetOperators(setOperators) as any;\n\t};\n}\n\nconst getSQLiteSetOperators = () => ({\n\tunion,\n\tunionAll,\n\tintersect,\n\texcept,\n});\n\n/**\n * Adds `union` set operator to the query.\n *\n * Calling this method will combine the result sets of the `select` statements and remove any duplicate rows that appear across them.\n *\n * See docs: {@link https://orm.drizzle.team/docs/set-operations#union}\n *\n * @example\n *\n * ```ts\n * // Select all unique names from customers and users tables\n * import { union } from 'drizzle-orm/sqlite-core'\n *\n * await union(\n * db.select({ name: users.name }).from(users),\n * db.select({ name: customers.name }).from(customers)\n * );\n * // or\n * await db.select({ name: users.name })\n * .from(users)\n * .union(\n * db.select({ name: customers.name }).from(customers)\n * );\n * ```\n */\nexport const union = createSetOperator('union', false);\n\n/**\n * Adds `union all` set operator to the query.\n *\n * Calling this method will combine the result-set of the `select` statements and keep all duplicate rows that appear across them.\n *\n * See docs: {@link https://orm.drizzle.team/docs/set-operations#union-all}\n *\n * @example\n *\n * ```ts\n * // Select all transaction ids from both online and in-store sales\n * import { unionAll } from 'drizzle-orm/sqlite-core'\n *\n * await unionAll(\n * db.select({ transaction: onlineSales.transactionId }).from(onlineSales),\n * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)\n * );\n * // or\n * await db.select({ transaction: onlineSales.transactionId })\n * .from(onlineSales)\n * .unionAll(\n * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)\n * );\n * ```\n */\nexport const unionAll = createSetOperator('union', true);\n\n/**\n * Adds `intersect` set operator to the query.\n *\n * Calling this method will retain only the rows that are present in both result sets and eliminate duplicates.\n *\n * See docs: {@link https://orm.drizzle.team/docs/set-operations#intersect}\n *\n * @example\n *\n * ```ts\n * // Select course names that are offered in both departments A and B\n * import { intersect } from 'drizzle-orm/sqlite-core'\n *\n * await intersect(\n * db.select({ courseName: depA.courseName }).from(depA),\n * db.select({ courseName: depB.courseName }).from(depB)\n * );\n * // or\n * await db.select({ courseName: depA.courseName })\n * .from(depA)\n * .intersect(\n * db.select({ courseName: depB.courseName }).from(depB)\n * );\n * ```\n */\nexport const intersect = createSetOperator('intersect', false);\n\n/**\n * Adds `except` set operator to the query.\n *\n * Calling this method will retrieve all unique rows from the left query, except for the rows that are present in the result set of the right query.\n *\n * See docs: {@link https://orm.drizzle.team/docs/set-operations#except}\n *\n * @example\n *\n * ```ts\n * // Select all courses offered in department A but not in department B\n * import { except } from 'drizzle-orm/sqlite-core'\n *\n * await except(\n * db.select({ courseName: depA.courseName }).from(depA),\n * db.select({ courseName: depB.courseName }).from(depB)\n * );\n * // or\n * await db.select({ courseName: depA.courseName })\n * .from(depA)\n * .except(\n * db.select({ courseName: depB.courseName }).from(depB)\n * );\n * ```\n */\nexport const except = createSetOperator('except', false);\n", "import { entityKind, is } from '~/entity.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { ColumnsSelection, SQL } from '~/sql/sql.ts';\nimport type { SQLiteDialectConfig } from '~/sqlite-core/dialect.ts';\nimport { SQLiteDialect, SQLiteSyncDialect } from '~/sqlite-core/dialect.ts';\nimport type { WithBuilder } from '~/sqlite-core/subquery.ts';\nimport { WithSubquery } from '~/subquery.ts';\nimport { SQLiteSelectBuilder } from './select.ts';\nimport type { SelectedFields } from './select.types.ts';\n\nexport class QueryBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteQueryBuilder';\n\n\tprivate dialect: SQLiteDialect | undefined;\n\tprivate dialectConfig: SQLiteDialectConfig | undefined;\n\n\tconstructor(dialect?: SQLiteDialect | SQLiteDialectConfig) {\n\t\tthis.dialect = is(dialect, SQLiteDialect) ? dialect : undefined;\n\t\tthis.dialectConfig = is(dialect, SQLiteDialect) ? undefined : dialect;\n\t}\n\n\t$with: WithBuilder = (alias: string, selection?: ColumnsSelection) => {\n\t\tconst queryBuilder = this;\n\t\tconst as = (\n\t\t\tqb:\n\t\t\t\t| TypedQueryBuilder\n\t\t\t\t| SQL\n\t\t\t\t| ((qb: QueryBuilder) => TypedQueryBuilder | SQL),\n\t\t) => {\n\t\t\tif (typeof qb === 'function') {\n\t\t\t\tqb = qb(queryBuilder);\n\t\t\t}\n\n\t\t\treturn new Proxy(\n\t\t\t\tnew WithSubquery(\n\t\t\t\t\tqb.getSQL(),\n\t\t\t\t\tselection ?? ('getSelectedFields' in qb ? qb.getSelectedFields() ?? {} : {}) as SelectedFields,\n\t\t\t\t\talias,\n\t\t\t\t\ttrue,\n\t\t\t\t),\n\t\t\t\tnew SelectionProxyHandler({ alias, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t\t) as any;\n\t\t};\n\t\treturn { as };\n\t};\n\n\twith(...queries: WithSubquery[]) {\n\t\tconst self = this;\n\n\t\tfunction select(): SQLiteSelectBuilder;\n\t\tfunction select(\n\t\t\tfields: TSelection,\n\t\t): SQLiteSelectBuilder;\n\t\tfunction select(\n\t\t\tfields?: TSelection,\n\t\t): SQLiteSelectBuilder {\n\t\t\treturn new SQLiteSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: undefined,\n\t\t\t\tdialect: self.getDialect(),\n\t\t\t\twithList: queries,\n\t\t\t});\n\t\t}\n\n\t\tfunction selectDistinct(): SQLiteSelectBuilder;\n\t\tfunction selectDistinct(\n\t\t\tfields: TSelection,\n\t\t): SQLiteSelectBuilder;\n\t\tfunction selectDistinct(\n\t\t\tfields?: TSelection,\n\t\t): SQLiteSelectBuilder {\n\t\t\treturn new SQLiteSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: undefined,\n\t\t\t\tdialect: self.getDialect(),\n\t\t\t\twithList: queries,\n\t\t\t\tdistinct: true,\n\t\t\t});\n\t\t}\n\n\t\treturn { select, selectDistinct };\n\t}\n\n\tselect(): SQLiteSelectBuilder;\n\tselect(\n\t\tfields: TSelection,\n\t): SQLiteSelectBuilder;\n\tselect(\n\t\tfields?: TSelection,\n\t): SQLiteSelectBuilder {\n\t\treturn new SQLiteSelectBuilder({ fields: fields ?? undefined, session: undefined, dialect: this.getDialect() });\n\t}\n\n\tselectDistinct(): SQLiteSelectBuilder;\n\tselectDistinct(\n\t\tfields: TSelection,\n\t): SQLiteSelectBuilder;\n\tselectDistinct(\n\t\tfields?: TSelection,\n\t): SQLiteSelectBuilder {\n\t\treturn new SQLiteSelectBuilder({\n\t\t\tfields: fields ?? undefined,\n\t\t\tsession: undefined,\n\t\t\tdialect: this.getDialect(),\n\t\t\tdistinct: true,\n\t\t});\n\t}\n\n\t// Lazy load dialect to avoid circular dependency\n\tprivate getDialect() {\n\t\tif (!this.dialect) {\n\t\t\tthis.dialect = new SQLiteSyncDialect(this.dialectConfig);\n\t\t}\n\n\t\treturn this.dialect;\n\t}\n}\n", "import { entityKind, is } from '~/entity.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type { SelectResultFields } from '~/query-builders/select.types.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { Placeholder, Query, SQLWrapper } from '~/sql/sql.ts';\nimport { Param, SQL, sql } from '~/sql/sql.ts';\nimport type { SQLiteDialect } from '~/sqlite-core/dialect.ts';\nimport type { IndexColumn } from '~/sqlite-core/indexes.ts';\nimport type { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/session.ts';\nimport { SQLiteTable } from '~/sqlite-core/table.ts';\nimport type { Subquery } from '~/subquery.ts';\nimport { Columns, Table } from '~/table.ts';\nimport { type DrizzleTypeError, haveSameKeys, mapUpdateSet, orderSelectedFields, type Simplify } from '~/utils.ts';\nimport type { AnySQLiteColumn, SQLiteColumn } from '../columns/common.ts';\nimport { extractUsedTable } from '../utils.ts';\nimport { QueryBuilder } from './query-builder.ts';\nimport type { SelectedFieldsFlat, SelectedFieldsOrdered } from './select.types.ts';\nimport type { SQLiteUpdateSetSource } from './update.ts';\n\nexport interface SQLiteInsertConfig {\n\ttable: TTable;\n\tvalues: Record[] | SQLiteInsertSelectQueryBuilder | SQL;\n\twithList?: Subquery[];\n\tonConflict?: SQL[];\n\treturning?: SelectedFieldsOrdered;\n\tselect?: boolean;\n}\n\nexport type SQLiteInsertValue = Simplify<\n\t{\n\t\t[Key in keyof TTable['$inferInsert']]: TTable['$inferInsert'][Key] | SQL | Placeholder;\n\t}\n>;\n\nexport type SQLiteInsertSelectQueryBuilder = TypedQueryBuilder<\n\t{ [K in keyof TTable['$inferInsert']]: AnySQLiteColumn | SQL | SQL.Aliased | TTable['$inferInsert'][K] }\n>;\n\nexport class SQLiteInsertBuilder<\n\tTTable extends SQLiteTable,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteInsertBuilder';\n\n\tconstructor(\n\t\tprotected table: TTable,\n\t\tprotected session: SQLiteSession,\n\t\tprotected dialect: SQLiteDialect,\n\t\tprivate withList?: Subquery[],\n\t) {}\n\n\tvalues(value: SQLiteInsertValue): SQLiteInsertBase;\n\tvalues(values: SQLiteInsertValue[]): SQLiteInsertBase;\n\tvalues(\n\t\tvalues: SQLiteInsertValue | SQLiteInsertValue[],\n\t): SQLiteInsertBase {\n\t\tvalues = Array.isArray(values) ? values : [values];\n\t\tif (values.length === 0) {\n\t\t\tthrow new Error('values() must be called with at least one value');\n\t\t}\n\t\tconst mappedValues = values.map((entry) => {\n\t\t\tconst result: Record = {};\n\t\t\tconst cols = this.table[Table.Symbol.Columns];\n\t\t\tfor (const colKey of Object.keys(entry)) {\n\t\t\t\tconst colValue = entry[colKey as keyof typeof entry];\n\t\t\t\tresult[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]);\n\t\t\t}\n\t\t\treturn result;\n\t\t});\n\n\t\t// if (mappedValues.length > 1 && mappedValues.some((t) => Object.keys(t).length === 0)) {\n\t\t// \tthrow new Error(\n\t\t// \t\t`One of the values you want to insert is empty. In SQLite you can insert only one empty object per statement. For this case Drizzle with use \"INSERT INTO ... DEFAULT VALUES\" syntax`,\n\t\t// \t);\n\t\t// }\n\n\t\treturn new SQLiteInsertBase(this.table, mappedValues, this.session, this.dialect, this.withList);\n\t}\n\n\tselect(\n\t\tselectQuery: (qb: QueryBuilder) => SQLiteInsertSelectQueryBuilder,\n\t): SQLiteInsertBase;\n\tselect(selectQuery: (qb: QueryBuilder) => SQL): SQLiteInsertBase;\n\tselect(selectQuery: SQL): SQLiteInsertBase;\n\tselect(selectQuery: SQLiteInsertSelectQueryBuilder): SQLiteInsertBase;\n\tselect(\n\t\tselectQuery:\n\t\t\t| SQL\n\t\t\t| SQLiteInsertSelectQueryBuilder\n\t\t\t| ((qb: QueryBuilder) => SQLiteInsertSelectQueryBuilder | SQL),\n\t): SQLiteInsertBase {\n\t\tconst select = typeof selectQuery === 'function' ? selectQuery(new QueryBuilder()) : selectQuery;\n\n\t\tif (\n\t\t\t!is(select, SQL)\n\t\t\t&& !haveSameKeys(this.table[Columns], select._.selectedFields)\n\t\t) {\n\t\t\tthrow new Error(\n\t\t\t\t'Insert select error: selected fields are not the same or are in a different order compared to the table definition',\n\t\t\t);\n\t\t}\n\n\t\treturn new SQLiteInsertBase(this.table, select, this.session, this.dialect, this.withList, true);\n\t}\n}\n\nexport type SQLiteInsertWithout =\n\tTDynamic extends true ? T\n\t\t: Omit<\n\t\t\tSQLiteInsertBase<\n\t\t\t\tT['_']['table'],\n\t\t\t\tT['_']['resultType'],\n\t\t\t\tT['_']['runResult'],\n\t\t\t\tT['_']['returning'],\n\t\t\t\tTDynamic,\n\t\t\t\tT['_']['excludedMethods'] | K\n\t\t\t>,\n\t\t\tT['_']['excludedMethods'] | K\n\t\t>;\n\nexport type SQLiteInsertReturning<\n\tT extends AnySQLiteInsert,\n\tTDynamic extends boolean,\n\tTSelectedFields extends SelectedFieldsFlat,\n> = SQLiteInsertWithout<\n\tSQLiteInsertBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tSelectResultFields,\n\t\tTDynamic,\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteInsertReturningAll<\n\tT extends AnySQLiteInsert,\n\tTDynamic extends boolean,\n> = SQLiteInsertWithout<\n\tSQLiteInsertBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['table']['$inferSelect'],\n\t\tTDynamic,\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteInsertOnConflictDoUpdateConfig = {\n\ttarget: IndexColumn | IndexColumn[];\n\t/** @deprecated - use either `targetWhere` or `setWhere` */\n\twhere?: SQL;\n\t// TODO: add tests for targetWhere and setWhere\n\ttargetWhere?: SQL;\n\tsetWhere?: SQL;\n\tset: SQLiteUpdateSetSource;\n};\n\nexport type SQLiteInsertDynamic = SQLiteInsert<\n\tT['_']['table'],\n\tT['_']['resultType'],\n\tT['_']['runResult'],\n\tT['_']['returning']\n>;\n\nexport type SQLiteInsertExecute = T['_']['returning'] extends undefined ? T['_']['runResult']\n\t: T['_']['returning'][];\n\nexport type SQLiteInsertPrepare = SQLitePreparedQuery<\n\t{\n\t\ttype: T['_']['resultType'];\n\t\trun: T['_']['runResult'];\n\t\tall: T['_']['returning'] extends undefined ? DrizzleTypeError<'.all() cannot be used without .returning()'>\n\t\t\t: T['_']['returning'][];\n\t\tget: T['_']['returning'] extends undefined ? DrizzleTypeError<'.get() cannot be used without .returning()'>\n\t\t\t: T['_']['returning'];\n\t\tvalues: T['_']['returning'] extends undefined ? DrizzleTypeError<'.values() cannot be used without .returning()'>\n\t\t\t: any[][];\n\t\texecute: SQLiteInsertExecute;\n\t}\n>;\n\nexport type AnySQLiteInsert = SQLiteInsertBase;\n\nexport type SQLiteInsert<\n\tTTable extends SQLiteTable = SQLiteTable,\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = unknown,\n\tTReturning = any,\n> = SQLiteInsertBase;\n\nexport interface SQLiteInsertBase<\n\tTTable extends SQLiteTable,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTReturning = undefined,\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n> extends\n\tSQLWrapper,\n\tQueryPromise,\n\tRunnableQuery\n{\n\treadonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly table: TTable;\n\t\treadonly resultType: TResultType;\n\t\treadonly runResult: TRunResult;\n\t\treadonly returning: TReturning;\n\t\treadonly dynamic: TDynamic;\n\t\treadonly excludedMethods: TExcludedMethods;\n\t\treadonly result: TReturning extends undefined ? TRunResult : TReturning[];\n\t};\n}\n\nexport class SQLiteInsertBase<\n\tTTable extends SQLiteTable,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTReturning = undefined,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTDynamic extends boolean = false,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTExcludedMethods extends string = never,\n> extends QueryPromise\n\timplements RunnableQuery, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteInsert';\n\n\t/** @internal */\n\tconfig: SQLiteInsertConfig;\n\n\tconstructor(\n\t\ttable: TTable,\n\t\tvalues: SQLiteInsertConfig['values'],\n\t\tprivate session: SQLiteSession,\n\t\tprivate dialect: SQLiteDialect,\n\t\twithList?: Subquery[],\n\t\tselect?: boolean,\n\t) {\n\t\tsuper();\n\t\tthis.config = { table, values: values as any, withList, select };\n\t}\n\n\t/**\n\t * Adds a `returning` clause to the query.\n\t *\n\t * Calling this method will return the specified fields of the inserted rows. If no fields are specified, all fields will be returned.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/insert#insert-returning}\n\t *\n\t * @example\n\t * ```ts\n\t * // Insert one row and return all fields\n\t * const insertedCar: Car[] = await db.insert(cars)\n\t * .values({ brand: 'BMW' })\n\t * .returning();\n\t *\n\t * // Insert one row and return only the id\n\t * const insertedCarId: { id: number }[] = await db.insert(cars)\n\t * .values({ brand: 'BMW' })\n\t * .returning({ id: cars.id });\n\t * ```\n\t */\n\treturning(): SQLiteInsertReturningAll;\n\treturning(\n\t\tfields: TSelectedFields,\n\t): SQLiteInsertReturning;\n\treturning(\n\t\tfields: SelectedFieldsFlat = this.config.table[SQLiteTable.Symbol.Columns],\n\t): SQLiteInsertWithout {\n\t\tthis.config.returning = orderSelectedFields(fields);\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds an `on conflict do nothing` clause to the query.\n\t *\n\t * Calling this method simply avoids inserting a row as its alternative action.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/insert#on-conflict-do-nothing}\n\t *\n\t * @param config The `target` and `where` clauses.\n\t *\n\t * @example\n\t * ```ts\n\t * // Insert one row and cancel the insert if there's a conflict\n\t * await db.insert(cars)\n\t * .values({ id: 1, brand: 'BMW' })\n\t * .onConflictDoNothing();\n\t *\n\t * // Explicitly specify conflict target\n\t * await db.insert(cars)\n\t * .values({ id: 1, brand: 'BMW' })\n\t * .onConflictDoNothing({ target: cars.id });\n\t * ```\n\t */\n\tonConflictDoNothing(config: { target?: IndexColumn | IndexColumn[]; where?: SQL } = {}): this {\n\t\tif (!this.config.onConflict) this.config.onConflict = [];\n\n\t\tif (config.target === undefined) {\n\t\t\tthis.config.onConflict.push(sql` on conflict do nothing`);\n\t\t} else {\n\t\t\tconst targetSql = Array.isArray(config.target) ? sql`${config.target}` : sql`${[config.target]}`;\n\t\t\tconst whereSql = config.where ? sql` where ${config.where}` : sql``;\n\t\t\tthis.config.onConflict.push(sql` on conflict ${targetSql} do nothing${whereSql}`);\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds an `on conflict do update` clause to the query.\n\t *\n\t * Calling this method will update the existing row that conflicts with the row proposed for insertion as its alternative action.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/insert#upserts-and-conflicts}\n\t *\n\t * @param config The `target`, `set` and `where` clauses.\n\t *\n\t * @example\n\t * ```ts\n\t * // Update the row if there's a conflict\n\t * await db.insert(cars)\n\t * .values({ id: 1, brand: 'BMW' })\n\t * .onConflictDoUpdate({\n\t * target: cars.id,\n\t * set: { brand: 'Porsche' }\n\t * });\n\t *\n\t * // Upsert with 'where' clause\n\t * await db.insert(cars)\n\t * .values({ id: 1, brand: 'BMW' })\n\t * .onConflictDoUpdate({\n\t * target: cars.id,\n\t * set: { brand: 'newBMW' },\n\t * where: sql`${cars.createdAt} > '2023-01-01'::date`,\n\t * });\n\t * ```\n\t */\n\tonConflictDoUpdate(config: SQLiteInsertOnConflictDoUpdateConfig): this {\n\t\tif (config.where && (config.targetWhere || config.setWhere)) {\n\t\t\tthrow new Error(\n\t\t\t\t'You cannot use both \"where\" and \"targetWhere\"/\"setWhere\" at the same time - \"where\" is deprecated, use \"targetWhere\" or \"setWhere\" instead.',\n\t\t\t);\n\t\t}\n\n\t\tif (!this.config.onConflict) this.config.onConflict = [];\n\n\t\tconst whereSql = config.where ? sql` where ${config.where}` : undefined;\n\t\tconst targetWhereSql = config.targetWhere ? sql` where ${config.targetWhere}` : undefined;\n\t\tconst setWhereSql = config.setWhere ? sql` where ${config.setWhere}` : undefined;\n\t\tconst targetSql = Array.isArray(config.target) ? sql`${config.target}` : sql`${[config.target]}`;\n\t\tconst setSql = this.dialect.buildUpdateSet(this.config.table, mapUpdateSet(this.config.table, config.set));\n\t\tthis.config.onConflict.push(\n\t\t\tsql` on conflict ${targetSql}${targetWhereSql} do update set ${setSql}${whereSql}${setWhereSql}`,\n\t\t);\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildInsertQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\t/** @internal */\n\t_prepare(isOneTimeQuery = true): SQLiteInsertPrepare {\n\t\treturn this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tthis.dialect.sqlToQuery(this.getSQL()),\n\t\t\tthis.config.returning,\n\t\t\tthis.config.returning ? 'all' : 'run',\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\ttype: 'insert',\n\t\t\t\ttables: extractUsedTable(this.config.table),\n\t\t\t},\n\t\t) as SQLiteInsertPrepare;\n\t}\n\n\tprepare(): SQLiteInsertPrepare {\n\t\treturn this._prepare(false);\n\t}\n\n\trun: ReturnType['run'] = (placeholderValues) => {\n\t\treturn this._prepare().run(placeholderValues);\n\t};\n\n\tall: ReturnType['all'] = (placeholderValues) => {\n\t\treturn this._prepare().all(placeholderValues);\n\t};\n\n\tget: ReturnType['get'] = (placeholderValues) => {\n\t\treturn this._prepare().get(placeholderValues);\n\t};\n\n\tvalues: ReturnType['values'] = (placeholderValues) => {\n\t\treturn this._prepare().values(placeholderValues);\n\t};\n\n\toverride async execute(): Promise> {\n\t\treturn (this.config.returning ? this.all() : this.run()) as SQLiteInsertExecute;\n\t}\n\n\t$dynamic(): SQLiteInsertDynamic {\n\t\treturn this as any;\n\t}\n}\n", "//# sourceMappingURL=select.types.js.map", "import type { GetColumnData } from '~/column.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport type { JoinType, SelectResultFields } from '~/query-builders/select.types.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { Placeholder, Query, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteDialect } from '~/sqlite-core/dialect.ts';\nimport type { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/session.ts';\nimport { SQLiteTable } from '~/sqlite-core/table.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { Table } from '~/table.ts';\nimport {\n\ttype DrizzleTypeError,\n\tgetTableLikeName,\n\tmapUpdateSet,\n\torderSelectedFields,\n\ttype UpdateSet,\n\ttype ValueOrArray,\n} from '~/utils.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport type { SQLiteColumn } from '../columns/common.ts';\nimport { extractUsedTable } from '../utils.ts';\nimport { SQLiteViewBase } from '../view-base.ts';\nimport type { SelectedFields, SelectedFieldsOrdered, SQLiteSelectJoinConfig } from './select.types.ts';\n\nexport interface SQLiteUpdateConfig {\n\twhere?: SQL | undefined;\n\tlimit?: number | Placeholder;\n\torderBy?: (SQLiteColumn | SQL | SQL.Aliased)[];\n\tset: UpdateSet;\n\ttable: SQLiteTable;\n\tfrom?: SQLiteTable | Subquery | SQLiteViewBase | SQL;\n\tjoins: SQLiteSelectJoinConfig[];\n\treturning?: SelectedFieldsOrdered;\n\twithList?: Subquery[];\n}\n\nexport type SQLiteUpdateSetSource =\n\t& {\n\t\t[Key in keyof TTable['$inferInsert']]?:\n\t\t\t| GetColumnData\n\t\t\t| SQL\n\t\t\t| SQLiteColumn\n\t\t\t| undefined;\n\t}\n\t& {};\n\nexport class SQLiteUpdateBuilder<\n\tTTable extends SQLiteTable,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteUpdateBuilder';\n\n\tdeclare readonly _: {\n\t\treadonly table: TTable;\n\t};\n\n\tconstructor(\n\t\tprotected table: TTable,\n\t\tprotected session: SQLiteSession,\n\t\tprotected dialect: SQLiteDialect,\n\t\tprivate withList?: Subquery[],\n\t) {}\n\n\tset(\n\t\tvalues: SQLiteUpdateSetSource,\n\t): SQLiteUpdateWithout<\n\t\tSQLiteUpdateBase,\n\t\tfalse,\n\t\t'leftJoin' | 'rightJoin' | 'innerJoin' | 'fullJoin'\n\t> {\n\t\treturn new SQLiteUpdateBase(\n\t\t\tthis.table,\n\t\t\tmapUpdateSet(this.table, values),\n\t\t\tthis.session,\n\t\t\tthis.dialect,\n\t\t\tthis.withList,\n\t\t) as any;\n\t}\n}\n\nexport type SQLiteUpdateWithout<\n\tT extends AnySQLiteUpdate,\n\tTDynamic extends boolean,\n\tK extends keyof T & string,\n> = TDynamic extends true ? T : Omit<\n\tSQLiteUpdateBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['from'],\n\t\tT['_']['returning'],\n\t\tTDynamic,\n\t\tT['_']['excludedMethods'] | K\n\t>,\n\tT['_']['excludedMethods'] | K\n>;\n\nexport type SQLiteUpdateWithJoins<\n\tT extends AnySQLiteUpdate,\n\tTDynamic extends boolean,\n\tTFrom extends SQLiteTable | Subquery | SQLiteViewBase | SQL,\n> = TDynamic extends true ? T : Omit<\n\tSQLiteUpdateBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tTFrom,\n\t\tT['_']['returning'],\n\t\tTDynamic,\n\t\tExclude\n\t>,\n\tExclude\n>;\n\nexport type SQLiteUpdateReturningAll = SQLiteUpdateWithout<\n\tSQLiteUpdateBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['from'],\n\t\tT['_']['table']['$inferSelect'],\n\t\tTDynamic,\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteUpdateReturning<\n\tT extends AnySQLiteUpdate,\n\tTDynamic extends boolean,\n\tTSelectedFields extends SelectedFields,\n> = SQLiteUpdateWithout<\n\tSQLiteUpdateBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['from'],\n\t\tSelectResultFields,\n\t\tTDynamic,\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteUpdateExecute = T['_']['returning'] extends undefined ? T['_']['runResult']\n\t: T['_']['returning'][];\n\nexport type SQLiteUpdatePrepare = SQLitePreparedQuery<\n\t{\n\t\ttype: T['_']['resultType'];\n\t\trun: T['_']['runResult'];\n\t\tall: T['_']['returning'] extends undefined ? DrizzleTypeError<'.all() cannot be used without .returning()'>\n\t\t\t: T['_']['returning'][];\n\t\tget: T['_']['returning'] extends undefined ? DrizzleTypeError<'.get() cannot be used without .returning()'>\n\t\t\t: T['_']['returning'];\n\t\tvalues: T['_']['returning'] extends undefined ? DrizzleTypeError<'.values() cannot be used without .returning()'>\n\t\t\t: any[][];\n\t\texecute: SQLiteUpdateExecute;\n\t}\n>;\n\nexport type SQLiteUpdateJoinFn<\n\tT extends AnySQLiteUpdate,\n> = <\n\tTJoinedTable extends SQLiteTable | Subquery | SQLiteViewBase | SQL,\n>(\n\ttable: TJoinedTable,\n\ton:\n\t\t| (\n\t\t\t(\n\t\t\t\tupdateTable: T['_']['table']['_']['columns'],\n\t\t\t\tfrom: T['_']['from'] extends SQLiteTable ? T['_']['from']['_']['columns']\n\t\t\t\t\t: T['_']['from'] extends Subquery | SQLiteViewBase ? T['_']['from']['_']['selectedFields']\n\t\t\t\t\t: never,\n\t\t\t) => SQL | undefined\n\t\t)\n\t\t| SQL\n\t\t| undefined,\n) => T;\n\nexport type SQLiteUpdateDynamic = SQLiteUpdate<\n\tT['_']['table'],\n\tT['_']['resultType'],\n\tT['_']['runResult'],\n\tT['_']['returning']\n>;\n\nexport type SQLiteUpdate<\n\tTTable extends SQLiteTable = SQLiteTable,\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = any,\n\tTFrom extends SQLiteTable | Subquery | SQLiteViewBase | SQL | undefined = undefined,\n\tTReturning extends Record | undefined = Record | undefined,\n> = SQLiteUpdateBase;\n\nexport type AnySQLiteUpdate = SQLiteUpdateBase;\n\nexport interface SQLiteUpdateBase<\n\tTTable extends SQLiteTable = SQLiteTable,\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = unknown,\n\tTFrom extends SQLiteTable | Subquery | SQLiteViewBase | SQL | undefined = undefined,\n\tTReturning = undefined,\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n> extends SQLWrapper, QueryPromise {\n\treadonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly table: TTable;\n\t\treadonly resultType: TResultType;\n\t\treadonly runResult: TRunResult;\n\t\treadonly from: TFrom;\n\t\treadonly returning: TReturning;\n\t\treadonly dynamic: TDynamic;\n\t\treadonly excludedMethods: TExcludedMethods;\n\t\treadonly result: TReturning extends undefined ? TRunResult : TReturning[];\n\t};\n}\n\nexport class SQLiteUpdateBase<\n\tTTable extends SQLiteTable = SQLiteTable,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = unknown,\n\tTFrom extends SQLiteTable | Subquery | SQLiteViewBase | SQL | undefined = undefined,\n\tTReturning = undefined,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTDynamic extends boolean = false,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTExcludedMethods extends string = never,\n> extends QueryPromise\n\timplements RunnableQuery, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteUpdate';\n\n\t/** @internal */\n\tconfig: SQLiteUpdateConfig;\n\n\tconstructor(\n\t\ttable: TTable,\n\t\tset: UpdateSet,\n\t\tprivate session: SQLiteSession,\n\t\tprivate dialect: SQLiteDialect,\n\t\twithList?: Subquery[],\n\t) {\n\t\tsuper();\n\t\tthis.config = { set, table, withList, joins: [] };\n\t}\n\n\tfrom(\n\t\tsource: TFrom,\n\t): SQLiteUpdateWithJoins {\n\t\tthis.config.from = source;\n\t\treturn this as any;\n\t}\n\n\tprivate createJoin(\n\t\tjoinType: TJoinType,\n\t): SQLiteUpdateJoinFn {\n\t\treturn ((\n\t\t\ttable: SQLiteTable | Subquery | SQLiteViewBase | SQL,\n\t\t\ton: ((updateTable: TTable, from: TFrom) => SQL | undefined) | SQL | undefined,\n\t\t) => {\n\t\t\tconst tableName = getTableLikeName(table);\n\n\t\t\tif (typeof tableName === 'string' && this.config.joins.some((join) => join.alias === tableName)) {\n\t\t\t\tthrow new Error(`Alias \"${tableName}\" is already used in this query`);\n\t\t\t}\n\n\t\t\tif (typeof on === 'function') {\n\t\t\t\tconst from = this.config.from\n\t\t\t\t\t? is(table, SQLiteTable)\n\t\t\t\t\t\t? table[Table.Symbol.Columns]\n\t\t\t\t\t\t: is(table, Subquery)\n\t\t\t\t\t\t? table._.selectedFields\n\t\t\t\t\t\t: is(table, SQLiteViewBase)\n\t\t\t\t\t\t? table[ViewBaseConfig].selectedFields\n\t\t\t\t\t\t: undefined\n\t\t\t\t\t: undefined;\n\t\t\t\ton = on(\n\t\t\t\t\tnew Proxy(\n\t\t\t\t\t\tthis.config.table[Table.Symbol.Columns],\n\t\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t\t) as any,\n\t\t\t\t\tfrom && new Proxy(\n\t\t\t\t\t\tfrom,\n\t\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t\t) as any,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.config.joins.push({ on, table, joinType, alias: tableName });\n\n\t\t\treturn this as any;\n\t\t}) as any;\n\t}\n\n\tleftJoin = this.createJoin('left');\n\n\trightJoin = this.createJoin('right');\n\n\tinnerJoin = this.createJoin('inner');\n\n\tfullJoin = this.createJoin('full');\n\n\t/**\n\t * Adds a 'where' clause to the query.\n\t *\n\t * Calling this method will update only those rows that fulfill a specified condition.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/update}\n\t *\n\t * @param where the 'where' clause.\n\t *\n\t * @example\n\t * You can use conditional operators and `sql function` to filter the rows to be updated.\n\t *\n\t * ```ts\n\t * // Update all cars with green color\n\t * db.update(cars).set({ color: 'red' })\n\t * .where(eq(cars.color, 'green'));\n\t * // or\n\t * db.update(cars).set({ color: 'red' })\n\t * .where(sql`${cars.color} = 'green'`)\n\t * ```\n\t *\n\t * You can logically combine conditional operators with `and()` and `or()` operators:\n\t *\n\t * ```ts\n\t * // Update all BMW cars with a green color\n\t * db.update(cars).set({ color: 'red' })\n\t * .where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW')));\n\t *\n\t * // Update all cars with the green or blue color\n\t * db.update(cars).set({ color: 'red' })\n\t * .where(or(eq(cars.color, 'green'), eq(cars.color, 'blue')));\n\t * ```\n\t */\n\twhere(where: SQL | undefined): SQLiteUpdateWithout {\n\t\tthis.config.where = where;\n\t\treturn this as any;\n\t}\n\n\torderBy(\n\t\tbuilder: (updateTable: TTable) => ValueOrArray,\n\t): SQLiteUpdateWithout;\n\torderBy(...columns: (SQLiteColumn | SQL | SQL.Aliased)[]): SQLiteUpdateWithout;\n\torderBy(\n\t\t...columns:\n\t\t\t| [(updateTable: TTable) => ValueOrArray]\n\t\t\t| (SQLiteColumn | SQL | SQL.Aliased)[]\n\t): SQLiteUpdateWithout {\n\t\tif (typeof columns[0] === 'function') {\n\t\t\tconst orderBy = columns[0](\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.table[Table.Symbol.Columns],\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'alias', sqlBehavior: 'sql' }),\n\t\t\t\t) as any,\n\t\t\t);\n\n\t\t\tconst orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy];\n\t\t\tthis.config.orderBy = orderByArray;\n\t\t} else {\n\t\t\tconst orderByArray = columns as (SQLiteColumn | SQL | SQL.Aliased)[];\n\t\t\tthis.config.orderBy = orderByArray;\n\t\t}\n\t\treturn this as any;\n\t}\n\n\tlimit(limit: number | Placeholder): SQLiteUpdateWithout {\n\t\tthis.config.limit = limit;\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `returning` clause to the query.\n\t *\n\t * Calling this method will return the specified fields of the updated rows. If no fields are specified, all fields will be returned.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/update#update-with-returning}\n\t *\n\t * @example\n\t * ```ts\n\t * // Update all cars with the green color and return all fields\n\t * const updatedCars: Car[] = await db.update(cars)\n\t * .set({ color: 'red' })\n\t * .where(eq(cars.color, 'green'))\n\t * .returning();\n\t *\n\t * // Update all cars with the green color and return only their id and brand fields\n\t * const updatedCarsIdsAndBrands: { id: number, brand: string }[] = await db.update(cars)\n\t * .set({ color: 'red' })\n\t * .where(eq(cars.color, 'green'))\n\t * .returning({ id: cars.id, brand: cars.brand });\n\t * ```\n\t */\n\treturning(): SQLiteUpdateReturningAll;\n\treturning(\n\t\tfields: TSelectedFields,\n\t): SQLiteUpdateReturning;\n\treturning(\n\t\tfields: SelectedFields = this.config.table[SQLiteTable.Symbol.Columns],\n\t): SQLiteUpdateWithout {\n\t\tthis.config.returning = orderSelectedFields(fields);\n\t\treturn this as any;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildUpdateQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\t/** @internal */\n\t_prepare(isOneTimeQuery = true): SQLiteUpdatePrepare {\n\t\treturn this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tthis.dialect.sqlToQuery(this.getSQL()),\n\t\t\tthis.config.returning,\n\t\t\tthis.config.returning ? 'all' : 'run',\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\ttype: 'insert',\n\t\t\t\ttables: extractUsedTable(this.config.table),\n\t\t\t},\n\t\t) as SQLiteUpdatePrepare;\n\t}\n\n\tprepare(): SQLiteUpdatePrepare {\n\t\treturn this._prepare(false);\n\t}\n\n\trun: ReturnType['run'] = (placeholderValues) => {\n\t\treturn this._prepare().run(placeholderValues);\n\t};\n\n\tall: ReturnType['all'] = (placeholderValues) => {\n\t\treturn this._prepare().all(placeholderValues);\n\t};\n\n\tget: ReturnType['get'] = (placeholderValues) => {\n\t\treturn this._prepare().get(placeholderValues);\n\t};\n\n\tvalues: ReturnType['values'] = (placeholderValues) => {\n\t\treturn this._prepare().values(placeholderValues);\n\t};\n\n\toverride async execute(): Promise> {\n\t\treturn (this.config.returning ? this.all() : this.run()) as SQLiteUpdateExecute;\n\t}\n\n\t$dynamic(): SQLiteUpdateDynamic {\n\t\treturn this as any;\n\t}\n}\n", "export * from './delete.ts';\nexport * from './insert.ts';\nexport * from './query-builder.ts';\nexport * from './select.ts';\nexport * from './select.types.ts';\nexport * from './update.ts';\n", "import { entityKind } from '~/entity.ts';\nimport { SQL, sql, type SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteSession } from '../session.ts';\nimport type { SQLiteTable } from '../table.ts';\nimport type { SQLiteView } from '../view.ts';\n\nexport class SQLiteCountBuilder<\n\tTSession extends SQLiteSession,\n> extends SQL implements Promise, SQLWrapper {\n\tprivate sql: SQL;\n\n\tstatic override readonly [entityKind] = 'SQLiteCountBuilderAsync';\n\t[Symbol.toStringTag] = 'SQLiteCountBuilderAsync';\n\n\tprivate session: TSession;\n\n\tprivate static buildEmbeddedCount(\n\t\tsource: SQLiteTable | SQLiteView | SQL | SQLWrapper,\n\t\tfilters?: SQL,\n\t): SQL {\n\t\treturn sql`(select count(*) from ${source}${sql.raw(' where ').if(filters)}${filters})`;\n\t}\n\n\tprivate static buildCount(\n\t\tsource: SQLiteTable | SQLiteView | SQL | SQLWrapper,\n\t\tfilters?: SQL,\n\t): SQL {\n\t\treturn sql`select count(*) from ${source}${sql.raw(' where ').if(filters)}${filters}`;\n\t}\n\n\tconstructor(\n\t\treadonly params: {\n\t\t\tsource: SQLiteTable | SQLiteView | SQL | SQLWrapper;\n\t\t\tfilters?: SQL;\n\t\t\tsession: TSession;\n\t\t},\n\t) {\n\t\tsuper(SQLiteCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);\n\n\t\tthis.session = params.session;\n\n\t\tthis.sql = SQLiteCountBuilder.buildCount(\n\t\t\tparams.source,\n\t\t\tparams.filters,\n\t\t);\n\t}\n\n\tthen(\n\t\tonfulfilled?: ((value: number) => TResult1 | PromiseLike) | null | undefined,\n\t\tonrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined,\n\t): Promise {\n\t\treturn Promise.resolve(this.session.count(this.sql)).then(\n\t\t\tonfulfilled,\n\t\t\tonrejected,\n\t\t);\n\t}\n\n\tcatch(\n\t\tonRejected?: ((reason: any) => never | PromiseLike) | null | undefined,\n\t): Promise {\n\t\treturn this.then(undefined, onRejected);\n\t}\n\n\tfinally(onFinally?: (() => void) | null | undefined): Promise {\n\t\treturn this.then(\n\t\t\t(value) => {\n\t\t\t\tonFinally?.();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\t(reason) => {\n\t\t\t\tonFinally?.();\n\t\t\t\tthrow reason;\n\t\t\t},\n\t\t);\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport {\n\ttype BuildQueryResult,\n\ttype BuildRelationalQueryResult,\n\ttype DBQueryConfig,\n\tmapRelationalRow,\n\ttype TableRelationalConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { Query, QueryWithTypings, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport type { KnownKeysOnly } from '~/utils.ts';\nimport type { SQLiteDialect } from '../dialect.ts';\nimport type { PreparedQueryConfig, SQLitePreparedQuery, SQLiteSession } from '../session.ts';\nimport type { SQLiteTable } from '../table.ts';\n\nexport type SQLiteRelationalQueryKind = TMode extends 'async'\n\t? SQLiteRelationalQuery\n\t: SQLiteSyncRelationalQuery;\n\nexport class RelationalQueryBuilder<\n\tTMode extends 'sync' | 'async',\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n\tTFields extends TableRelationalConfig,\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteAsyncRelationalQueryBuilder';\n\n\tconstructor(\n\t\tprotected mode: TMode,\n\t\tprotected fullSchema: Record,\n\t\tprotected schema: TSchema,\n\t\tprotected tableNamesMap: Record,\n\t\tprotected table: SQLiteTable,\n\t\tprotected tableConfig: TableRelationalConfig,\n\t\tprotected dialect: SQLiteDialect,\n\t\tprotected session: SQLiteSession<'async', unknown, TFullSchema, TSchema>,\n\t) {}\n\n\tfindMany>(\n\t\tconfig?: KnownKeysOnly>,\n\t): SQLiteRelationalQueryKind[]> {\n\t\treturn (this.mode === 'sync'\n\t\t\t? new SQLiteSyncRelationalQuery(\n\t\t\t\tthis.fullSchema,\n\t\t\t\tthis.schema,\n\t\t\t\tthis.tableNamesMap,\n\t\t\t\tthis.table,\n\t\t\t\tthis.tableConfig,\n\t\t\t\tthis.dialect,\n\t\t\t\tthis.session,\n\t\t\t\tconfig ? (config as DBQueryConfig<'many', true>) : {},\n\t\t\t\t'many',\n\t\t\t)\n\t\t\t: new SQLiteRelationalQuery(\n\t\t\t\tthis.fullSchema,\n\t\t\t\tthis.schema,\n\t\t\t\tthis.tableNamesMap,\n\t\t\t\tthis.table,\n\t\t\t\tthis.tableConfig,\n\t\t\t\tthis.dialect,\n\t\t\t\tthis.session,\n\t\t\t\tconfig ? (config as DBQueryConfig<'many', true>) : {},\n\t\t\t\t'many',\n\t\t\t)) as SQLiteRelationalQueryKind[]>;\n\t}\n\n\tfindFirst, 'limit'>>(\n\t\tconfig?: KnownKeysOnly, 'limit'>>,\n\t): SQLiteRelationalQueryKind | undefined> {\n\t\treturn (this.mode === 'sync'\n\t\t\t? new SQLiteSyncRelationalQuery(\n\t\t\t\tthis.fullSchema,\n\t\t\t\tthis.schema,\n\t\t\t\tthis.tableNamesMap,\n\t\t\t\tthis.table,\n\t\t\t\tthis.tableConfig,\n\t\t\t\tthis.dialect,\n\t\t\t\tthis.session,\n\t\t\t\tconfig ? { ...(config as DBQueryConfig<'many', true> | undefined), limit: 1 } : { limit: 1 },\n\t\t\t\t'first',\n\t\t\t)\n\t\t\t: new SQLiteRelationalQuery(\n\t\t\t\tthis.fullSchema,\n\t\t\t\tthis.schema,\n\t\t\t\tthis.tableNamesMap,\n\t\t\t\tthis.table,\n\t\t\t\tthis.tableConfig,\n\t\t\t\tthis.dialect,\n\t\t\t\tthis.session,\n\t\t\t\tconfig ? { ...(config as DBQueryConfig<'many', true> | undefined), limit: 1 } : { limit: 1 },\n\t\t\t\t'first',\n\t\t\t)) as SQLiteRelationalQueryKind | undefined>;\n\t}\n}\n\nexport class SQLiteRelationalQuery extends QueryPromise\n\timplements RunnableQuery, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteAsyncRelationalQuery';\n\n\tdeclare readonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly type: TType;\n\t\treadonly result: TResult;\n\t};\n\n\t/** @internal */\n\tmode: 'many' | 'first';\n\n\tconstructor(\n\t\tprivate fullSchema: Record,\n\t\tprivate schema: TablesRelationalConfig,\n\t\tprivate tableNamesMap: Record,\n\t\t/** @internal */\n\t\tpublic table: SQLiteTable,\n\t\tprivate tableConfig: TableRelationalConfig,\n\t\tprivate dialect: SQLiteDialect,\n\t\tprivate session: SQLiteSession<'sync' | 'async', unknown, Record, TablesRelationalConfig>,\n\t\tprivate config: DBQueryConfig<'many', true> | true,\n\t\tmode: 'many' | 'first',\n\t) {\n\t\tsuper();\n\t\tthis.mode = mode;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildRelationalQuery({\n\t\t\tfullSchema: this.fullSchema,\n\t\t\tschema: this.schema,\n\t\t\ttableNamesMap: this.tableNamesMap,\n\t\t\ttable: this.table,\n\t\t\ttableConfig: this.tableConfig,\n\t\t\tqueryConfig: this.config,\n\t\t\ttableAlias: this.tableConfig.tsName,\n\t\t}).sql as SQL;\n\t}\n\n\t/** @internal */\n\t_prepare(\n\t\tisOneTimeQuery = false,\n\t): SQLitePreparedQuery {\n\t\tconst { query, builtQuery } = this._toSQL();\n\n\t\treturn this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tbuiltQuery,\n\t\t\tundefined,\n\t\t\tthis.mode === 'first' ? 'get' : 'all',\n\t\t\ttrue,\n\t\t\t(rawRows, mapColumnValue) => {\n\t\t\t\tconst rows = rawRows.map((row) =>\n\t\t\t\t\tmapRelationalRow(this.schema, this.tableConfig, row, query.selection, mapColumnValue)\n\t\t\t\t);\n\t\t\t\tif (this.mode === 'first') {\n\t\t\t\t\treturn rows[0] as TResult;\n\t\t\t\t}\n\t\t\t\treturn rows as TResult;\n\t\t\t},\n\t\t) as SQLitePreparedQuery;\n\t}\n\n\tprepare(): SQLitePreparedQuery {\n\t\treturn this._prepare(false);\n\t}\n\n\tprivate _toSQL(): { query: BuildRelationalQueryResult; builtQuery: QueryWithTypings } {\n\t\tconst query = this.dialect.buildRelationalQuery({\n\t\t\tfullSchema: this.fullSchema,\n\t\t\tschema: this.schema,\n\t\t\ttableNamesMap: this.tableNamesMap,\n\t\t\ttable: this.table,\n\t\t\ttableConfig: this.tableConfig,\n\t\t\tqueryConfig: this.config,\n\t\t\ttableAlias: this.tableConfig.tsName,\n\t\t});\n\n\t\tconst builtQuery = this.dialect.sqlToQuery(query.sql as SQL);\n\n\t\treturn { query, builtQuery };\n\t}\n\n\ttoSQL(): Query {\n\t\treturn this._toSQL().builtQuery;\n\t}\n\n\t/** @internal */\n\texecuteRaw(): TResult {\n\t\tif (this.mode === 'first') {\n\t\t\treturn this._prepare(false).get() as TResult;\n\t\t}\n\t\treturn this._prepare(false).all() as TResult;\n\t}\n\n\toverride async execute(): Promise {\n\t\treturn this.executeRaw();\n\t}\n}\n\nexport class SQLiteSyncRelationalQuery extends SQLiteRelationalQuery<'sync', TResult> {\n\tstatic override readonly [entityKind]: string = 'SQLiteSyncRelationalQuery';\n\n\tsync(): TResult {\n\t\treturn this.executeRaw();\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { PreparedQuery } from '~/session.ts';\nimport type { SQL, SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteAsyncDialect } from '../dialect.ts';\n\ntype SQLiteRawAction = 'all' | 'get' | 'values' | 'run';\nexport interface SQLiteRawConfig {\n\taction: SQLiteRawAction;\n}\n\nexport interface SQLiteRaw extends QueryPromise, RunnableQuery, SQLWrapper {}\n\nexport class SQLiteRaw extends QueryPromise\n\timplements RunnableQuery, SQLWrapper, PreparedQuery\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteRaw';\n\n\tdeclare readonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly result: TResult;\n\t};\n\n\t/** @internal */\n\tconfig: SQLiteRawConfig;\n\n\tconstructor(\n\t\tpublic execute: () => Promise,\n\t\t/** @internal */\n\t\tpublic getSQL: () => SQL,\n\t\taction: SQLiteRawAction,\n\t\tprivate dialect: SQLiteAsyncDialect,\n\t\tprivate mapBatchResult: (result: unknown) => unknown,\n\t) {\n\t\tsuper();\n\t\tthis.config = { action };\n\t}\n\n\tgetQuery() {\n\t\treturn { ...this.dialect.sqlToQuery(this.getSQL()), method: this.config.action };\n\t}\n\n\tmapResult(result: unknown, isFromBatch?: boolean) {\n\t\treturn isFromBatch ? this.mapBatchResult(result) : result;\n\t}\n\n\t_prepare(): PreparedQuery {\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tisResponseInArrayMode(): boolean {\n\t\treturn false;\n\t}\n}\n", "import type { Cache } from '~/cache/core/cache.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type { ExtractTablesWithRelations, RelationalSchemaConfig, TablesRelationalConfig } from '~/relations.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport { type ColumnsSelection, type SQL, sql, type SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteAsyncDialect, SQLiteSyncDialect } from '~/sqlite-core/dialect.ts';\nimport {\n\tQueryBuilder,\n\tSQLiteDeleteBase,\n\tSQLiteInsertBuilder,\n\tSQLiteSelectBuilder,\n\tSQLiteUpdateBuilder,\n} from '~/sqlite-core/query-builders/index.ts';\nimport type {\n\tDBResult,\n\tResult,\n\tSQLiteSession,\n\tSQLiteTransaction,\n\tSQLiteTransactionConfig,\n} from '~/sqlite-core/session.ts';\nimport type { SQLiteTable } from '~/sqlite-core/table.ts';\nimport { WithSubquery } from '~/subquery.ts';\nimport type { DrizzleTypeError } from '~/utils.ts';\nimport { SQLiteCountBuilder } from './query-builders/count.ts';\nimport { RelationalQueryBuilder } from './query-builders/query.ts';\nimport { SQLiteRaw } from './query-builders/raw.ts';\nimport type { SelectedFields } from './query-builders/select.types.ts';\nimport type { WithBuilder } from './subquery.ts';\nimport type { SQLiteViewBase } from './view-base.ts';\n\nexport class BaseSQLiteDatabase<\n\tTResultKind extends 'sync' | 'async',\n\tTRunResult,\n\tTFullSchema extends Record = Record,\n\tTSchema extends TablesRelationalConfig = ExtractTablesWithRelations,\n> {\n\tstatic readonly [entityKind]: string = 'BaseSQLiteDatabase';\n\n\tdeclare readonly _: {\n\t\treadonly schema: TSchema | undefined;\n\t\treadonly fullSchema: TFullSchema;\n\t\treadonly tableNamesMap: Record;\n\t};\n\n\tquery: TFullSchema extends Record\n\t\t? DrizzleTypeError<'Seems like the schema generic is missing - did you forget to add it to your DB type?'>\n\t\t: {\n\t\t\t[K in keyof TSchema]: RelationalQueryBuilder;\n\t\t};\n\n\tconstructor(\n\t\tprivate resultKind: TResultKind,\n\t\t/** @internal */\n\t\treadonly dialect: { sync: SQLiteSyncDialect; async: SQLiteAsyncDialect }[TResultKind],\n\t\t/** @internal */\n\t\treadonly session: SQLiteSession,\n\t\tschema: RelationalSchemaConfig | undefined,\n\t) {\n\t\tthis._ = schema\n\t\t\t? {\n\t\t\t\tschema: schema.schema,\n\t\t\t\tfullSchema: schema.fullSchema as TFullSchema,\n\t\t\t\ttableNamesMap: schema.tableNamesMap,\n\t\t\t}\n\t\t\t: {\n\t\t\t\tschema: undefined,\n\t\t\t\tfullSchema: {} as TFullSchema,\n\t\t\t\ttableNamesMap: {},\n\t\t\t};\n\t\tthis.query = {} as typeof this['query'];\n\t\tconst query = this.query as {\n\t\t\t[K in keyof TSchema]: RelationalQueryBuilder;\n\t\t};\n\t\tif (this._.schema) {\n\t\t\tfor (const [tableName, columns] of Object.entries(this._.schema)) {\n\t\t\t\tquery[tableName as keyof TSchema] = new RelationalQueryBuilder(\n\t\t\t\t\tresultKind,\n\t\t\t\t\tschema!.fullSchema,\n\t\t\t\t\tthis._.schema,\n\t\t\t\t\tthis._.tableNamesMap,\n\t\t\t\t\tschema!.fullSchema[tableName] as SQLiteTable,\n\t\t\t\t\tcolumns,\n\t\t\t\t\tdialect,\n\t\t\t\t\tsession as SQLiteSession as any,\n\t\t\t\t) as typeof query[keyof TSchema];\n\t\t\t}\n\t\t}\n\t\tthis.$cache = { invalidate: async (_params: any) => {} };\n\t}\n\n\t/**\n\t * Creates a subquery that defines a temporary named result set as a CTE.\n\t *\n\t * It is useful for breaking down complex queries into simpler parts and for reusing the result set in subsequent parts of the query.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#with-clause}\n\t *\n\t * @param alias The alias for the subquery.\n\t *\n\t * Failure to provide an alias will result in a DrizzleTypeError, preventing the subquery from being referenced in other queries.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Create a subquery with alias 'sq' and use it in the select query\n\t * const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42)));\n\t *\n\t * const result = await db.with(sq).select().from(sq);\n\t * ```\n\t *\n\t * To select arbitrary SQL values as fields in a CTE and reference them in other CTEs or in the main query, you need to add aliases to them:\n\t *\n\t * ```ts\n\t * // Select an arbitrary SQL value as a field in a CTE and reference it in the main query\n\t * const sq = db.$with('sq').as(db.select({\n\t * name: sql`upper(${users.name})`.as('name'),\n\t * })\n\t * .from(users));\n\t *\n\t * const result = await db.with(sq).select({ name: sq.name }).from(sq);\n\t * ```\n\t */\n\t$with: WithBuilder = (alias: string, selection?: ColumnsSelection) => {\n\t\tconst self = this;\n\t\tconst as = (\n\t\t\tqb:\n\t\t\t\t| TypedQueryBuilder\n\t\t\t\t| SQL\n\t\t\t\t| ((qb: QueryBuilder) => TypedQueryBuilder | SQL),\n\t\t) => {\n\t\t\tif (typeof qb === 'function') {\n\t\t\t\tqb = qb(new QueryBuilder(self.dialect));\n\t\t\t}\n\n\t\t\treturn new Proxy(\n\t\t\t\tnew WithSubquery(\n\t\t\t\t\tqb.getSQL(),\n\t\t\t\t\tselection ?? ('getSelectedFields' in qb ? qb.getSelectedFields() ?? {} : {}) as SelectedFields,\n\t\t\t\t\talias,\n\t\t\t\t\ttrue,\n\t\t\t\t),\n\t\t\t\tnew SelectionProxyHandler({ alias, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t\t);\n\t\t};\n\t\treturn { as };\n\t};\n\n\t$count(\n\t\tsource: SQLiteTable | SQLiteViewBase | SQL | SQLWrapper,\n\t\tfilters?: SQL,\n\t) {\n\t\treturn new SQLiteCountBuilder({ source, filters, session: this.session });\n\t}\n\n\t/**\n\t * Incorporates a previously defined CTE (using `$with`) into the main query.\n\t *\n\t * This method allows the main query to reference a temporary named result set.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#with-clause}\n\t *\n\t * @param queries The CTEs to incorporate into the main query.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Define a subquery 'sq' as a CTE using $with\n\t * const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42)));\n\t *\n\t * // Incorporate the CTE 'sq' into the main query and select from it\n\t * const result = await db.with(sq).select().from(sq);\n\t * ```\n\t */\n\twith(...queries: WithSubquery[]) {\n\t\tconst self = this;\n\n\t\t/**\n\t\t * Creates a select query.\n\t\t *\n\t\t * Calling this method with no arguments will select all columns from the table. Pass a selection object to specify the columns you want to select.\n\t\t *\n\t\t * Use `.from()` method to specify which table to select from.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/select}\n\t\t *\n\t\t * @param fields The selection object.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Select all columns and all rows from the 'cars' table\n\t\t * const allCars: Car[] = await db.select().from(cars);\n\t\t *\n\t\t * // Select specific columns and all rows from the 'cars' table\n\t\t * const carsIdsAndBrands: { id: number; brand: string }[] = await db.select({\n\t\t * id: cars.id,\n\t\t * brand: cars.brand\n\t\t * })\n\t\t * .from(cars);\n\t\t * ```\n\t\t *\n\t\t * Like in SQL, you can use arbitrary expressions as selection fields, not just table columns:\n\t\t *\n\t\t * ```ts\n\t\t * // Select specific columns along with expression and all rows from the 'cars' table\n\t\t * const carsIdsAndLowerNames: { id: number; lowerBrand: string }[] = await db.select({\n\t\t * id: cars.id,\n\t\t * lowerBrand: sql`lower(${cars.brand})`,\n\t\t * })\n\t\t * .from(cars);\n\t\t * ```\n\t\t */\n\t\tfunction select(): SQLiteSelectBuilder;\n\t\tfunction select(\n\t\t\tfields: TSelection,\n\t\t): SQLiteSelectBuilder;\n\t\tfunction select(\n\t\t\tfields?: SelectedFields,\n\t\t): SQLiteSelectBuilder {\n\t\t\treturn new SQLiteSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: self.session,\n\t\t\t\tdialect: self.dialect,\n\t\t\t\twithList: queries,\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Adds `distinct` expression to the select query.\n\t\t *\n\t\t * Calling this method will return only unique values. When multiple columns are selected, it returns rows with unique combinations of values in these columns.\n\t\t *\n\t\t * Use `.from()` method to specify which table to select from.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/select#distinct}\n\t\t *\n\t\t * @param fields The selection object.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Select all unique rows from the 'cars' table\n\t\t * await db.selectDistinct()\n\t\t * .from(cars)\n\t\t * .orderBy(cars.id, cars.brand, cars.color);\n\t\t *\n\t\t * // Select all unique brands from the 'cars' table\n\t\t * await db.selectDistinct({ brand: cars.brand })\n\t\t * .from(cars)\n\t\t * .orderBy(cars.brand);\n\t\t * ```\n\t\t */\n\t\tfunction selectDistinct(): SQLiteSelectBuilder;\n\t\tfunction selectDistinct(\n\t\t\tfields: TSelection,\n\t\t): SQLiteSelectBuilder;\n\t\tfunction selectDistinct(\n\t\t\tfields?: SelectedFields,\n\t\t): SQLiteSelectBuilder {\n\t\t\treturn new SQLiteSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: self.session,\n\t\t\t\tdialect: self.dialect,\n\t\t\t\twithList: queries,\n\t\t\t\tdistinct: true,\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Creates an update query.\n\t\t *\n\t\t * Calling this method without `.where()` clause will update all rows in a table. The `.where()` clause specifies which rows should be updated.\n\t\t *\n\t\t * Use `.set()` method to specify which values to update.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/update}\n\t\t *\n\t\t * @param table The table to update.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Update all rows in the 'cars' table\n\t\t * await db.update(cars).set({ color: 'red' });\n\t\t *\n\t\t * // Update rows with filters and conditions\n\t\t * await db.update(cars).set({ color: 'red' }).where(eq(cars.brand, 'BMW'));\n\t\t *\n\t\t * // Update with returning clause\n\t\t * const updatedCar: Car[] = await db.update(cars)\n\t\t * .set({ color: 'red' })\n\t\t * .where(eq(cars.id, 1))\n\t\t * .returning();\n\t\t * ```\n\t\t */\n\t\tfunction update(table: TTable): SQLiteUpdateBuilder {\n\t\t\treturn new SQLiteUpdateBuilder(table, self.session, self.dialect, queries);\n\t\t}\n\n\t\t/**\n\t\t * Creates an insert query.\n\t\t *\n\t\t * Calling this method will create new rows in a table. Use `.values()` method to specify which values to insert.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/insert}\n\t\t *\n\t\t * @param table The table to insert into.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Insert one row\n\t\t * await db.insert(cars).values({ brand: 'BMW' });\n\t\t *\n\t\t * // Insert multiple rows\n\t\t * await db.insert(cars).values([{ brand: 'BMW' }, { brand: 'Porsche' }]);\n\t\t *\n\t\t * // Insert with returning clause\n\t\t * const insertedCar: Car[] = await db.insert(cars)\n\t\t * .values({ brand: 'BMW' })\n\t\t * .returning();\n\t\t * ```\n\t\t */\n\t\tfunction insert(into: TTable): SQLiteInsertBuilder {\n\t\t\treturn new SQLiteInsertBuilder(into, self.session, self.dialect, queries);\n\t\t}\n\n\t\t/**\n\t\t * Creates a delete query.\n\t\t *\n\t\t * Calling this method without `.where()` clause will delete all rows in a table. The `.where()` clause specifies which rows should be deleted.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/delete}\n\t\t *\n\t\t * @param table The table to delete from.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Delete all rows in the 'cars' table\n\t\t * await db.delete(cars);\n\t\t *\n\t\t * // Delete rows with filters and conditions\n\t\t * await db.delete(cars).where(eq(cars.color, 'green'));\n\t\t *\n\t\t * // Delete with returning clause\n\t\t * const deletedCar: Car[] = await db.delete(cars)\n\t\t * .where(eq(cars.id, 1))\n\t\t * .returning();\n\t\t * ```\n\t\t */\n\t\tfunction delete_(from: TTable): SQLiteDeleteBase {\n\t\t\treturn new SQLiteDeleteBase(from, self.session, self.dialect, queries);\n\t\t}\n\n\t\treturn { select, selectDistinct, update, insert, delete: delete_ };\n\t}\n\n\t/**\n\t * Creates a select query.\n\t *\n\t * Calling this method with no arguments will select all columns from the table. Pass a selection object to specify the columns you want to select.\n\t *\n\t * Use `.from()` method to specify which table to select from.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select}\n\t *\n\t * @param fields The selection object.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all columns and all rows from the 'cars' table\n\t * const allCars: Car[] = await db.select().from(cars);\n\t *\n\t * // Select specific columns and all rows from the 'cars' table\n\t * const carsIdsAndBrands: { id: number; brand: string }[] = await db.select({\n\t * id: cars.id,\n\t * brand: cars.brand\n\t * })\n\t * .from(cars);\n\t * ```\n\t *\n\t * Like in SQL, you can use arbitrary expressions as selection fields, not just table columns:\n\t *\n\t * ```ts\n\t * // Select specific columns along with expression and all rows from the 'cars' table\n\t * const carsIdsAndLowerNames: { id: number; lowerBrand: string }[] = await db.select({\n\t * id: cars.id,\n\t * lowerBrand: sql`lower(${cars.brand})`,\n\t * })\n\t * .from(cars);\n\t * ```\n\t */\n\tselect(): SQLiteSelectBuilder;\n\tselect(\n\t\tfields: TSelection,\n\t): SQLiteSelectBuilder;\n\tselect(fields?: SelectedFields): SQLiteSelectBuilder {\n\t\treturn new SQLiteSelectBuilder({ fields: fields ?? undefined, session: this.session, dialect: this.dialect });\n\t}\n\n\t/**\n\t * Adds `distinct` expression to the select query.\n\t *\n\t * Calling this method will return only unique values. When multiple columns are selected, it returns rows with unique combinations of values in these columns.\n\t *\n\t * Use `.from()` method to specify which table to select from.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#distinct}\n\t *\n\t * @param fields The selection object.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all unique rows from the 'cars' table\n\t * await db.selectDistinct()\n\t * .from(cars)\n\t * .orderBy(cars.id, cars.brand, cars.color);\n\t *\n\t * // Select all unique brands from the 'cars' table\n\t * await db.selectDistinct({ brand: cars.brand })\n\t * .from(cars)\n\t * .orderBy(cars.brand);\n\t * ```\n\t */\n\tselectDistinct(): SQLiteSelectBuilder;\n\tselectDistinct(\n\t\tfields: TSelection,\n\t): SQLiteSelectBuilder;\n\tselectDistinct(\n\t\tfields?: SelectedFields,\n\t): SQLiteSelectBuilder {\n\t\treturn new SQLiteSelectBuilder({\n\t\t\tfields: fields ?? undefined,\n\t\t\tsession: this.session,\n\t\t\tdialect: this.dialect,\n\t\t\tdistinct: true,\n\t\t});\n\t}\n\n\t/**\n\t * Creates an update query.\n\t *\n\t * Calling this method without `.where()` clause will update all rows in a table. The `.where()` clause specifies which rows should be updated.\n\t *\n\t * Use `.set()` method to specify which values to update.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/update}\n\t *\n\t * @param table The table to update.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Update all rows in the 'cars' table\n\t * await db.update(cars).set({ color: 'red' });\n\t *\n\t * // Update rows with filters and conditions\n\t * await db.update(cars).set({ color: 'red' }).where(eq(cars.brand, 'BMW'));\n\t *\n\t * // Update with returning clause\n\t * const updatedCar: Car[] = await db.update(cars)\n\t * .set({ color: 'red' })\n\t * .where(eq(cars.id, 1))\n\t * .returning();\n\t * ```\n\t */\n\tupdate(table: TTable): SQLiteUpdateBuilder {\n\t\treturn new SQLiteUpdateBuilder(table, this.session, this.dialect);\n\t}\n\n\t$cache: { invalidate: Cache['onMutate'] };\n\n\t/**\n\t * Creates an insert query.\n\t *\n\t * Calling this method will create new rows in a table. Use `.values()` method to specify which values to insert.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/insert}\n\t *\n\t * @param table The table to insert into.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Insert one row\n\t * await db.insert(cars).values({ brand: 'BMW' });\n\t *\n\t * // Insert multiple rows\n\t * await db.insert(cars).values([{ brand: 'BMW' }, { brand: 'Porsche' }]);\n\t *\n\t * // Insert with returning clause\n\t * const insertedCar: Car[] = await db.insert(cars)\n\t * .values({ brand: 'BMW' })\n\t * .returning();\n\t * ```\n\t */\n\tinsert(into: TTable): SQLiteInsertBuilder {\n\t\treturn new SQLiteInsertBuilder(into, this.session, this.dialect);\n\t}\n\n\t/**\n\t * Creates a delete query.\n\t *\n\t * Calling this method without `.where()` clause will delete all rows in a table. The `.where()` clause specifies which rows should be deleted.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/delete}\n\t *\n\t * @param table The table to delete from.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Delete all rows in the 'cars' table\n\t * await db.delete(cars);\n\t *\n\t * // Delete rows with filters and conditions\n\t * await db.delete(cars).where(eq(cars.color, 'green'));\n\t *\n\t * // Delete with returning clause\n\t * const deletedCar: Car[] = await db.delete(cars)\n\t * .where(eq(cars.id, 1))\n\t * .returning();\n\t * ```\n\t */\n\tdelete(from: TTable): SQLiteDeleteBase {\n\t\treturn new SQLiteDeleteBase(from, this.session, this.dialect);\n\t}\n\n\trun(query: SQLWrapper | string): DBResult {\n\t\tconst sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();\n\t\tif (this.resultKind === 'async') {\n\t\t\treturn new SQLiteRaw(\n\t\t\t\tasync () => this.session.run(sequel),\n\t\t\t\t() => sequel,\n\t\t\t\t'run',\n\t\t\t\tthis.dialect as SQLiteAsyncDialect,\n\t\t\t\tthis.session.extractRawRunValueFromBatchResult.bind(this.session),\n\t\t\t) as DBResult;\n\t\t}\n\t\treturn this.session.run(sequel) as DBResult;\n\t}\n\n\tall(query: SQLWrapper | string): DBResult {\n\t\tconst sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();\n\t\tif (this.resultKind === 'async') {\n\t\t\treturn new SQLiteRaw(\n\t\t\t\tasync () => this.session.all(sequel),\n\t\t\t\t() => sequel,\n\t\t\t\t'all',\n\t\t\t\tthis.dialect as SQLiteAsyncDialect,\n\t\t\t\tthis.session.extractRawAllValueFromBatchResult.bind(this.session),\n\t\t\t) as any;\n\t\t}\n\t\treturn this.session.all(sequel) as DBResult;\n\t}\n\n\tget(query: SQLWrapper | string): DBResult {\n\t\tconst sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();\n\t\tif (this.resultKind === 'async') {\n\t\t\treturn new SQLiteRaw(\n\t\t\t\tasync () => this.session.get(sequel),\n\t\t\t\t() => sequel,\n\t\t\t\t'get',\n\t\t\t\tthis.dialect as SQLiteAsyncDialect,\n\t\t\t\tthis.session.extractRawGetValueFromBatchResult.bind(this.session),\n\t\t\t) as DBResult;\n\t\t}\n\t\treturn this.session.get(sequel) as DBResult;\n\t}\n\n\tvalues(query: SQLWrapper | string): DBResult {\n\t\tconst sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();\n\t\tif (this.resultKind === 'async') {\n\t\t\treturn new SQLiteRaw(\n\t\t\t\tasync () => this.session.values(sequel),\n\t\t\t\t() => sequel,\n\t\t\t\t'values',\n\t\t\t\tthis.dialect as SQLiteAsyncDialect,\n\t\t\t\tthis.session.extractRawValuesValueFromBatchResult.bind(this.session),\n\t\t\t) as any;\n\t\t}\n\t\treturn this.session.values(sequel) as DBResult;\n\t}\n\n\ttransaction(\n\t\ttransaction: (tx: SQLiteTransaction) => Result,\n\t\tconfig?: SQLiteTransactionConfig,\n\t): Result {\n\t\treturn this.session.transaction(transaction, config);\n\t}\n}\n\nexport type SQLiteWithReplicas = Q & { $primary: Q; $replicas: Q[] };\n\nexport const withReplicas = <\n\tTResultKind extends 'sync' | 'async',\n\tTRunResult,\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n\tQ extends BaseSQLiteDatabase<\n\t\tTResultKind,\n\t\tTRunResult,\n\t\tTFullSchema,\n\t\tTSchema extends Record ? ExtractTablesWithRelations : TSchema\n\t>,\n>(\n\tprimary: Q,\n\treplicas: [Q, ...Q[]],\n\tgetReplica: (replicas: Q[]) => Q = () => replicas[Math.floor(Math.random() * replicas.length)]!,\n): SQLiteWithReplicas => {\n\tconst select: Q['select'] = (...args: []) => getReplica(replicas).select(...args);\n\tconst selectDistinct: Q['selectDistinct'] = (...args: []) => getReplica(replicas).selectDistinct(...args);\n\tconst $count: Q['$count'] = (...args: [any]) => getReplica(replicas).$count(...args);\n\tconst $with: Q['with'] = (...args: []) => getReplica(replicas).with(...args);\n\n\tconst update: Q['update'] = (...args: [any]) => primary.update(...args);\n\tconst insert: Q['insert'] = (...args: [any]) => primary.insert(...args);\n\tconst $delete: Q['delete'] = (...args: [any]) => primary.delete(...args);\n\tconst run: Q['run'] = (...args: [any]) => primary.run(...args);\n\tconst all: Q['all'] = (...args: [any]) => primary.all(...args);\n\tconst get: Q['get'] = (...args: [any]) => primary.get(...args);\n\tconst values: Q['values'] = (...args: [any]) => primary.values(...args);\n\tconst transaction: Q['transaction'] = (...args: [any]) => primary.transaction(...args);\n\n\treturn {\n\t\t...primary,\n\t\tupdate,\n\t\tinsert,\n\t\tdelete: $delete,\n\t\trun,\n\t\tall,\n\t\tget,\n\t\tvalues,\n\t\ttransaction,\n\t\t$primary: primary,\n\t\t$replicas: replicas,\n\t\tselect,\n\t\tselectDistinct,\n\t\t$count,\n\t\twith: $with,\n\t\tget query() {\n\t\t\treturn getReplica(replicas).query;\n\t\t},\n\t};\n};\n", "import { entityKind } from '~/entity.ts';\nimport type { Table } from '~/index.ts';\nimport type { CacheConfig } from './types.ts';\n\nexport abstract class Cache {\n\tstatic readonly [entityKind]: string = 'Cache';\n\n\tabstract strategy(): 'explicit' | 'all';\n\n\t/**\n\t * Invoked if we should check cache for cached response\n\t * @param sql\n\t * @param tables\n\t */\n\tabstract get(\n\t\tkey: string,\n\t\ttables: string[],\n\t\tisTag: boolean,\n\t\tisAutoInvalidate?: boolean,\n\t): Promise;\n\n\t/**\n\t * Invoked if new query should be inserted to cache\n\t * @param sql\n\t * @param tables\n\t */\n\tabstract put(\n\t\thashedQuery: string,\n\t\tresponse: any,\n\t\ttables: string[],\n\t\tisTag: boolean,\n\t\tconfig?: CacheConfig,\n\t): Promise;\n\n\t/**\n\t * Invoked if insert, update, delete was invoked\n\t * @param tables\n\t */\n\tabstract onMutate(\n\t\tparams: MutationOption,\n\t): Promise;\n}\n\nexport class NoopCache extends Cache {\n\toverride strategy() {\n\t\treturn 'all' as const;\n\t}\n\n\tstatic override readonly [entityKind]: string = 'NoopCache';\n\n\toverride async get(_key: string): Promise {\n\t\treturn undefined;\n\t}\n\toverride async put(\n\t\t_hashedQuery: string,\n\t\t_response: any,\n\t\t_tables: string[],\n\t\t_config?: any,\n\t): Promise {\n\t\t// noop\n\t}\n\toverride async onMutate(_params: MutationOption): Promise {\n\t\t// noop\n\t}\n}\n\nexport type MutationOption = { tags?: string | string[]; tables?: Table | Table[] | string | string[] };\n\nexport async function hashQuery(sql: string, params?: any[]) {\n\tconst dataToHash = `${sql}-${JSON.stringify(params)}`;\n\tconst encoder = new TextEncoder();\n\tconst data = encoder.encode(dataToHash);\n\tconst hashBuffer = await crypto.subtle.digest('SHA-256', data);\n\tconst hashArray = [...new Uint8Array(hashBuffer)];\n\tconst hashHex = hashArray.map((b) => b.toString(16).padStart(2, '0')).join('');\n\n\treturn hashHex;\n}\n", "import { TableAliasProxyHandler } from '~/alias.ts';\nimport type { BuildAliasTable } from './query-builders/select.types.ts';\n\nimport type { SQLiteTable } from './table.ts';\nimport type { SQLiteViewBase } from './view-base.ts';\n\nexport function alias(\n\ttable: TTable,\n\talias: TAlias,\n): BuildAliasTable {\n\treturn new Proxy(table, new TableAliasProxyHandler(alias, false)) as any;\n}\n", "import { type Cache, hashQuery, NoopCache } from '~/cache/core/cache.ts';\nimport type { WithCacheConfig } from '~/cache/core/types.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport { DrizzleError, DrizzleQueryError, TransactionRollbackError } from '~/errors.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { TablesRelationalConfig } from '~/relations.ts';\nimport type { PreparedQuery } from '~/session.ts';\nimport type { Query, SQL } from '~/sql/sql.ts';\nimport type { SQLiteAsyncDialect, SQLiteSyncDialect } from '~/sqlite-core/dialect.ts';\nimport { BaseSQLiteDatabase } from './db.ts';\nimport type { SQLiteRaw } from './query-builders/raw.ts';\nimport type { SelectedFieldsOrdered } from './query-builders/select.types.ts';\n\nexport interface PreparedQueryConfig {\n\ttype: 'sync' | 'async';\n\trun: unknown;\n\tall: unknown;\n\tget: unknown;\n\tvalues: unknown;\n\texecute: unknown;\n}\n\nexport class ExecuteResultSync extends QueryPromise {\n\tstatic override readonly [entityKind]: string = 'ExecuteResultSync';\n\n\tconstructor(private resultCb: () => T) {\n\t\tsuper();\n\t}\n\n\toverride async execute(): Promise {\n\t\treturn this.resultCb();\n\t}\n\n\tsync(): T {\n\t\treturn this.resultCb();\n\t}\n}\n\nexport type ExecuteResult = TType extends 'async' ? Promise\n\t: ExecuteResultSync;\n\nexport abstract class SQLitePreparedQuery implements PreparedQuery {\n\tstatic readonly [entityKind]: string = 'PreparedQuery';\n\n\t/** @internal */\n\tjoinsNotNullableMap?: Record;\n\n\tconstructor(\n\t\tprivate mode: 'sync' | 'async',\n\t\tprivate executeMethod: SQLiteExecuteMethod,\n\t\tprotected query: Query,\n\t\tprivate cache?: Cache,\n\t\t// per query related metadata\n\t\tprivate queryMetadata?: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t} | undefined,\n\t\t// config that was passed through $withCache\n\t\tprivate cacheConfig?: WithCacheConfig,\n\t) {\n\t\t// it means that no $withCache options were passed and it should be just enabled\n\t\tif (cache && cache.strategy() === 'all' && cacheConfig === undefined) {\n\t\t\tthis.cacheConfig = { enable: true, autoInvalidate: true };\n\t\t}\n\t\tif (!this.cacheConfig?.enable) {\n\t\t\tthis.cacheConfig = undefined;\n\t\t}\n\t}\n\n\t/** @internal */\n\tprotected async queryWithCache(\n\t\tqueryString: string,\n\t\tparams: any[],\n\t\tquery: () => Promise,\n\t): Promise {\n\t\tif (this.cache === undefined || is(this.cache, NoopCache) || this.queryMetadata === undefined) {\n\t\t\ttry {\n\t\t\t\treturn await query();\n\t\t\t} catch (e) {\n\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t}\n\t\t}\n\n\t\t// don't do any mutations, if globally is false\n\t\tif (this.cacheConfig && !this.cacheConfig.enable) {\n\t\t\ttry {\n\t\t\t\treturn await query();\n\t\t\t} catch (e) {\n\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t}\n\t\t}\n\n\t\t// For mutate queries, we should query the database, wait for a response, and then perform invalidation\n\t\tif (\n\t\t\t(\n\t\t\t\tthis.queryMetadata.type === 'insert' || this.queryMetadata.type === 'update'\n\t\t\t\t|| this.queryMetadata.type === 'delete'\n\t\t\t) && this.queryMetadata.tables.length > 0\n\t\t) {\n\t\t\ttry {\n\t\t\t\tconst [res] = await Promise.all([\n\t\t\t\t\tquery(),\n\t\t\t\t\tthis.cache.onMutate({ tables: this.queryMetadata.tables }),\n\t\t\t\t]);\n\t\t\t\treturn res;\n\t\t\t} catch (e) {\n\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t}\n\t\t}\n\n\t\t// don't do any reads if globally disabled\n\t\tif (!this.cacheConfig) {\n\t\t\ttry {\n\t\t\t\treturn await query();\n\t\t\t} catch (e) {\n\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t}\n\t\t}\n\n\t\tif (this.queryMetadata.type === 'select') {\n\t\t\tconst fromCache = await this.cache.get(\n\t\t\t\tthis.cacheConfig.tag ?? await hashQuery(queryString, params),\n\t\t\t\tthis.queryMetadata.tables,\n\t\t\t\tthis.cacheConfig.tag !== undefined,\n\t\t\t\tthis.cacheConfig.autoInvalidate,\n\t\t\t);\n\t\t\tif (fromCache === undefined) {\n\t\t\t\tlet result;\n\t\t\t\ttry {\n\t\t\t\t\tresult = await query();\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t\t}\n\n\t\t\t\t// put actual key\n\t\t\t\tawait this.cache.put(\n\t\t\t\t\tthis.cacheConfig.tag ?? await hashQuery(queryString, params),\n\t\t\t\t\tresult,\n\t\t\t\t\t// make sure we send tables that were used in a query only if user wants to invalidate it on each write\n\t\t\t\t\tthis.cacheConfig.autoInvalidate ? this.queryMetadata.tables : [],\n\t\t\t\t\tthis.cacheConfig.tag !== undefined,\n\t\t\t\t\tthis.cacheConfig.config,\n\t\t\t\t);\n\t\t\t\t// put flag if we should invalidate or not\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\treturn fromCache as unknown as T;\n\t\t}\n\t\ttry {\n\t\t\treturn await query();\n\t\t} catch (e) {\n\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t}\n\t}\n\n\tgetQuery(): Query {\n\t\treturn this.query;\n\t}\n\n\tabstract run(placeholderValues?: Record): Result;\n\n\tmapRunResult(result: unknown, _isFromBatch?: boolean): unknown {\n\t\treturn result;\n\t}\n\n\tabstract all(placeholderValues?: Record): Result;\n\n\tmapAllResult(_result: unknown, _isFromBatch?: boolean): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n\n\tabstract get(placeholderValues?: Record): Result;\n\n\tmapGetResult(_result: unknown, _isFromBatch?: boolean): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n\n\tabstract values(placeholderValues?: Record): Result;\n\n\texecute(placeholderValues?: Record): ExecuteResult {\n\t\tif (this.mode === 'async') {\n\t\t\treturn this[this.executeMethod](placeholderValues) as ExecuteResult;\n\t\t}\n\t\treturn new ExecuteResultSync(() => this[this.executeMethod](placeholderValues));\n\t}\n\n\tmapResult(response: unknown, isFromBatch?: boolean) {\n\t\tswitch (this.executeMethod) {\n\t\t\tcase 'run': {\n\t\t\t\treturn this.mapRunResult(response, isFromBatch);\n\t\t\t}\n\t\t\tcase 'all': {\n\t\t\t\treturn this.mapAllResult(response, isFromBatch);\n\t\t\t}\n\t\t\tcase 'get': {\n\t\t\t\treturn this.mapGetResult(response, isFromBatch);\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @internal */\n\tabstract isResponseInArrayMode(): boolean;\n}\n\nexport interface SQLiteTransactionConfig {\n\tbehavior?: 'deferred' | 'immediate' | 'exclusive';\n}\n\nexport type SQLiteExecuteMethod = 'run' | 'all' | 'get';\n\nexport abstract class SQLiteSession<\n\tTResultKind extends 'sync' | 'async',\n\tTRunResult,\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteSession';\n\n\tconstructor(\n\t\t/** @internal */\n\t\treadonly dialect: { sync: SQLiteSyncDialect; async: SQLiteAsyncDialect }[TResultKind],\n\t) {}\n\n\tabstract prepareQuery(\n\t\tquery: Query,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t\tisResponseInArrayMode: boolean,\n\t\tcustomResultMapper?: (rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => unknown,\n\t\tqueryMetadata?: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t},\n\t\tcacheConfig?: WithCacheConfig,\n\t): SQLitePreparedQuery;\n\n\tprepareOneTimeQuery(\n\t\tquery: Query,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t\tisResponseInArrayMode: boolean,\n\t\tcustomResultMapper?: (rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => unknown,\n\t\tqueryMetadata?: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t},\n\t\tcacheConfig?: WithCacheConfig,\n\t): SQLitePreparedQuery {\n\t\treturn this.prepareQuery(\n\t\t\tquery,\n\t\t\tfields,\n\t\t\texecuteMethod,\n\t\t\tisResponseInArrayMode,\n\t\t\tcustomResultMapper,\n\t\t\tqueryMetadata,\n\t\t\tcacheConfig,\n\t\t);\n\t}\n\n\tabstract transaction(\n\t\ttransaction: (tx: SQLiteTransaction) => Result,\n\t\tconfig?: SQLiteTransactionConfig,\n\t): Result;\n\n\trun(query: SQL): Result {\n\t\tconst staticQuery = this.dialect.sqlToQuery(query);\n\t\ttry {\n\t\t\treturn this.prepareOneTimeQuery(staticQuery, undefined, 'run', false).run() as Result;\n\t\t} catch (err) {\n\t\t\tthrow new DrizzleError({ cause: err, message: `Failed to run the query '${staticQuery.sql}'` });\n\t\t}\n\t}\n\n\t/** @internal */\n\textractRawRunValueFromBatchResult(result: unknown) {\n\t\treturn result;\n\t}\n\n\tall(query: SQL): Result {\n\t\treturn this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), undefined, 'run', false).all() as Result<\n\t\t\tTResultKind,\n\t\t\tT[]\n\t\t>;\n\t}\n\n\t/** @internal */\n\textractRawAllValueFromBatchResult(_result: unknown): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n\n\tget(query: SQL): Result {\n\t\treturn this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), undefined, 'run', false).get() as Result<\n\t\t\tTResultKind,\n\t\t\tT\n\t\t>;\n\t}\n\n\t/** @internal */\n\textractRawGetValueFromBatchResult(_result: unknown): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n\n\tvalues(\n\t\tquery: SQL,\n\t): Result {\n\t\treturn this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), undefined, 'run', false).values() as Result<\n\t\t\tTResultKind,\n\t\t\tT[]\n\t\t>;\n\t}\n\n\tasync count(sql: SQL) {\n\t\tconst result = await this.values(sql) as [[number]];\n\n\t\treturn result[0][0];\n\t}\n\n\t/** @internal */\n\textractRawValuesValueFromBatchResult(_result: unknown): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n}\n\nexport type Result = { sync: TResult; async: Promise }[TKind];\n\nexport type DBResult = { sync: TResult; async: SQLiteRaw }[TKind];\n\nexport abstract class SQLiteTransaction<\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n> extends BaseSQLiteDatabase {\n\tstatic override readonly [entityKind]: string = 'SQLiteTransaction';\n\n\tconstructor(\n\t\tresultType: TResultType,\n\t\tdialect: { sync: SQLiteSyncDialect; async: SQLiteAsyncDialect }[TResultType],\n\t\tsession: SQLiteSession,\n\t\tprotected schema: {\n\t\t\tfullSchema: Record;\n\t\t\tschema: TSchema;\n\t\t\ttableNamesMap: Record;\n\t\t} | undefined,\n\t\tprotected readonly nestedIndex = 0,\n\t) {\n\t\tsuper(resultType, dialect, session, schema);\n\t}\n\n\trollback(): never {\n\t\tthrow new TransactionRollbackError();\n\t}\n}\n", "//# sourceMappingURL=subquery.js.map", "import type { BuildColumns } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type { AddAliasToSelection } from '~/query-builders/select.types.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { ColumnsSelection, SQL } from '~/sql/sql.ts';\nimport { getTableColumns } from '~/utils.ts';\nimport type { SQLiteColumn, SQLiteColumnBuilderBase } from './columns/common.ts';\nimport { QueryBuilder } from './query-builders/query-builder.ts';\nimport { sqliteTable } from './table.ts';\nimport { SQLiteViewBase } from './view-base.ts';\n\nexport interface ViewBuilderConfig {\n\talgorithm?: 'undefined' | 'merge' | 'temptable';\n\tdefiner?: string;\n\tsqlSecurity?: 'definer' | 'invoker';\n\twithCheckOption?: 'cascaded' | 'local';\n}\n\nexport class ViewBuilderCore<\n\tTConfig extends { name: string; columns?: unknown },\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteViewBuilderCore';\n\n\tdeclare readonly _: {\n\t\treadonly name: TConfig['name'];\n\t\treadonly columns: TConfig['columns'];\n\t};\n\n\tconstructor(\n\t\tprotected name: TConfig['name'],\n\t) {}\n\n\tprotected config: ViewBuilderConfig = {};\n}\n\nexport class ViewBuilder extends ViewBuilderCore<{ name: TName }> {\n\tstatic override readonly [entityKind]: string = 'SQLiteViewBuilder';\n\n\tas(\n\t\tqb: TypedQueryBuilder | ((qb: QueryBuilder) => TypedQueryBuilder),\n\t): SQLiteViewWithSelection> {\n\t\tif (typeof qb === 'function') {\n\t\t\tqb = qb(new QueryBuilder());\n\t\t}\n\t\tconst selectionProxy = new SelectionProxyHandler({\n\t\t\talias: this.name,\n\t\t\tsqlBehavior: 'error',\n\t\t\tsqlAliasedBehavior: 'alias',\n\t\t\treplaceOriginalName: true,\n\t\t});\n\t\t// const aliasedSelectedFields = new Proxy(qb.getSelectedFields(), selectionProxy);\n\t\tconst aliasedSelectedFields = qb.getSelectedFields();\n\t\treturn new Proxy(\n\t\t\tnew SQLiteView({\n\t\t\t\t// sqliteConfig: this.config,\n\t\t\t\tconfig: {\n\t\t\t\t\tname: this.name,\n\t\t\t\t\tschema: undefined,\n\t\t\t\t\tselectedFields: aliasedSelectedFields,\n\t\t\t\t\tquery: qb.getSQL().inlineParams(),\n\t\t\t\t},\n\t\t\t}),\n\t\t\tselectionProxy as any,\n\t\t) as SQLiteViewWithSelection>;\n\t}\n}\n\nexport class ManualViewBuilder<\n\tTName extends string = string,\n\tTColumns extends Record = Record,\n> extends ViewBuilderCore<\n\t{ name: TName; columns: TColumns }\n> {\n\tstatic override readonly [entityKind]: string = 'SQLiteManualViewBuilder';\n\n\tprivate columns: Record;\n\n\tconstructor(\n\t\tname: TName,\n\t\tcolumns: TColumns,\n\t) {\n\t\tsuper(name);\n\t\tthis.columns = getTableColumns(sqliteTable(name, columns)) as BuildColumns;\n\t}\n\n\texisting(): SQLiteViewWithSelection> {\n\t\treturn new Proxy(\n\t\t\tnew SQLiteView({\n\t\t\t\tconfig: {\n\t\t\t\t\tname: this.name,\n\t\t\t\t\tschema: undefined,\n\t\t\t\t\tselectedFields: this.columns,\n\t\t\t\t\tquery: undefined,\n\t\t\t\t},\n\t\t\t}),\n\t\t\tnew SelectionProxyHandler({\n\t\t\t\talias: this.name,\n\t\t\t\tsqlBehavior: 'error',\n\t\t\t\tsqlAliasedBehavior: 'alias',\n\t\t\t\treplaceOriginalName: true,\n\t\t\t}),\n\t\t) as SQLiteViewWithSelection>;\n\t}\n\n\tas(query: SQL): SQLiteViewWithSelection> {\n\t\treturn new Proxy(\n\t\t\tnew SQLiteView({\n\t\t\t\tconfig: {\n\t\t\t\t\tname: this.name,\n\t\t\t\t\tschema: undefined,\n\t\t\t\t\tselectedFields: this.columns,\n\t\t\t\t\tquery: query.inlineParams(),\n\t\t\t\t},\n\t\t\t}),\n\t\t\tnew SelectionProxyHandler({\n\t\t\t\talias: this.name,\n\t\t\t\tsqlBehavior: 'error',\n\t\t\t\tsqlAliasedBehavior: 'alias',\n\t\t\t\treplaceOriginalName: true,\n\t\t\t}),\n\t\t) as SQLiteViewWithSelection>;\n\t}\n}\n\nexport class SQLiteView<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n\tTSelection extends ColumnsSelection = ColumnsSelection,\n> extends SQLiteViewBase {\n\tstatic override readonly [entityKind]: string = 'SQLiteView';\n\n\tconstructor({ config }: {\n\t\tconfig: {\n\t\t\tname: TName;\n\t\t\tschema: string | undefined;\n\t\t\tselectedFields: ColumnsSelection;\n\t\t\tquery: SQL | undefined;\n\t\t};\n\t}) {\n\t\tsuper(config);\n\t}\n}\n\nexport type SQLiteViewWithSelection<\n\tTName extends string,\n\tTExisting extends boolean,\n\tTSelection extends ColumnsSelection,\n> = SQLiteView & TSelection;\n\nexport function sqliteView(name: TName): ViewBuilder;\nexport function sqliteView>(\n\tname: TName,\n\tcolumns: TColumns,\n): ManualViewBuilder;\nexport function sqliteView(\n\tname: string,\n\tselection?: Record,\n): ViewBuilder | ManualViewBuilder {\n\tif (selection) {\n\t\treturn new ManualViewBuilder(name, selection);\n\t}\n\treturn new ViewBuilder(name);\n}\n\nexport const view = sqliteView;\n", "export * from './alias.ts';\nexport * from './checks.ts';\nexport * from './columns/index.ts';\nexport * from './db.ts';\nexport * from './dialect.ts';\nexport * from './foreign-keys.ts';\nexport * from './indexes.ts';\nexport * from './primary-keys.ts';\nexport * from './query-builders/index.ts';\nexport * from './session.ts';\nexport * from './subquery.ts';\nexport * from './table.ts';\nexport * from './unique-constraint.ts';\nexport * from './utils.ts';\nexport * from './view.ts';\n", "//# sourceMappingURL=operations.js.map", "export * from './alias.ts';\nexport * from './column-builder.ts';\nexport * from './column.ts';\nexport * from './entity.ts';\nexport * from './errors.ts';\nexport * from './logger.ts';\nexport * from './operations.ts';\nexport * from './query-promise.ts';\nexport * from './relations.ts';\nexport * from './sql/index.ts';\nexport * from './subquery.ts';\nexport * from './table.ts';\nexport * from './utils.ts';\nexport * from './view-common.ts';\n", "import {\n sqliteTable,\n integer,\n text,\n real,\n uniqueIndex,\n primaryKey,\n check,\n customType,\n} from 'drizzle-orm/sqlite-core'\nimport { relations, sql } from 'drizzle-orm'\n\nconst jsonText = (name: string) =>\n customType<{ data: T | null; driverData: string | null }>({\n dataType() {\n return 'text'\n },\n toDriver(value) {\n if (value === undefined || value === null) return null\n return JSON.stringify(value)\n },\n fromDriver(value) {\n if (value === null || value === undefined) return null\n try {\n return JSON.parse(String(value)) as T\n } catch {\n return null\n }\n },\n })(name)\n\nconst numericText = (name: string) =>\n customType<{ data: string | null; driverData: string | null }>({\n dataType() {\n return 'text'\n },\n toDriver(value) {\n if (value === undefined || value === null) return null\n return String(value)\n },\n fromDriver(value) {\n if (value === null || value === undefined) return null\n return String(value)\n },\n })(name)\n\nconst staffRoleValues = ['super_admin', 'admin', 'marketer', 'delivery_staff'] as const\nconst staffPermissionValues = ['crud_product', 'make_coupon', 'crud_staff_users'] as const\nconst uploadStatusValues = ['pending', 'claimed'] as const\nconst paymentStatusValues = ['pending', 'success', 'cod', 'failed'] as const\n\nexport const staffRoleEnum = (name: string) => text(name, { enum: staffRoleValues })\nexport const staffPermissionEnum = (name: string) => text(name, { enum: staffPermissionValues })\nexport const uploadStatusEnum = (name: string) => text(name, { enum: uploadStatusValues })\nexport const paymentStatusEnum = (name: string) => text(name, { enum: paymentStatusValues })\n\nexport const users = sqliteTable('users', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text(),\n email: text(),\n mobile: text(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_email: uniqueIndex('unique_email').on(t.email),\n}))\n\nexport const userDetails = sqliteTable('user_details', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id).unique(),\n bio: text('bio'),\n dateOfBirth: integer('date_of_birth', { mode: 'timestamp' }),\n gender: text('gender'),\n occupation: text('occupation'),\n profileImage: text('profile_image'),\n isSuspended: integer('is_suspended', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const userCreds = sqliteTable('user_creds', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n userPassword: text('user_password').notNull(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const addressZones = sqliteTable('address_zones', {\n id: integer().primaryKey({ autoIncrement: true }),\n zoneName: text('zone_name').notNull(),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const addressAreas = sqliteTable('address_areas', {\n id: integer().primaryKey({ autoIncrement: true }),\n placeName: text('place_name').notNull(),\n zoneId: integer('zone_id').references(() => addressZones.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const addresses = sqliteTable('addresses', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n name: text('name').notNull(),\n phone: text('phone').notNull(),\n addressLine1: text('address_line1').notNull(),\n addressLine2: text('address_line2'),\n city: text('city').notNull(),\n state: text('state').notNull(),\n pincode: text('pincode').notNull(),\n isDefault: integer('is_default', { mode: 'boolean' }).notNull().default(false),\n latitude: real('latitude'),\n longitude: real('longitude'),\n googleMapsUrl: text('google_maps_url'),\n adminLatitude: real('admin_latitude'),\n adminLongitude: real('admin_longitude'),\n zoneId: integer('zone_id').references(() => addressZones.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const staffRoles = sqliteTable('staff_roles', {\n id: integer().primaryKey({ autoIncrement: true }),\n roleName: staffRoleEnum('role_name').notNull(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_role_name: uniqueIndex('unique_role_name').on(t.roleName),\n}))\n\nexport const staffPermissions = sqliteTable('staff_permissions', {\n id: integer().primaryKey({ autoIncrement: true }),\n permissionName: staffPermissionEnum('permission_name').notNull(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_permission_name: uniqueIndex('unique_permission_name').on(t.permissionName),\n}))\n\nexport const staffRolePermissions = sqliteTable('staff_role_permissions', {\n id: integer().primaryKey({ autoIncrement: true }),\n staffRoleId: integer('staff_role_id').notNull().references(() => staffRoles.id),\n staffPermissionId: integer('staff_permission_id').notNull().references(() => staffPermissions.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_role_permission: uniqueIndex('unique_role_permission').on(t.staffRoleId, t.staffPermissionId),\n}))\n\nexport const staffUsers = sqliteTable('staff_users', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text().notNull(),\n password: text().notNull(),\n staffRoleId: integer('staff_role_id').references(() => staffRoles.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const storeInfo = sqliteTable('store_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text().notNull(),\n description: text(),\n imageUrl: text('image_url'),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n owner: integer('owner').notNull().references(() => staffUsers.id),\n})\n\nexport const units = sqliteTable('units', {\n id: integer().primaryKey({ autoIncrement: true }),\n shortNotation: text('short_notation').notNull(),\n fullName: text('full_name').notNull(),\n}, (t) => ({\n unq_short_notation: uniqueIndex('unique_short_notation').on(t.shortNotation),\n}))\n\nexport const productInfo = sqliteTable('product_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text().notNull(),\n shortDescription: text('short_description'),\n longDescription: text('long_description'),\n unitId: integer('unit_id').notNull().references(() => units.id),\n price: numericText('price').notNull(),\n marketPrice: numericText('market_price'),\n images: jsonText('images'),\n isOutOfStock: integer('is_out_of_stock', { mode: 'boolean' }).notNull().default(false),\n isSuspended: integer('is_suspended', { mode: 'boolean' }).notNull().default(false),\n isFlashAvailable: integer('is_flash_available', { mode: 'boolean' }).notNull().default(false),\n flashPrice: numericText('flash_price'),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n incrementStep: real('increment_step').notNull().default(1),\n productQuantity: real('product_quantity').notNull().default(1),\n storeId: integer('store_id').references(() => storeInfo.id),\n})\n\nexport const productGroupInfo = sqliteTable('product_group_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n groupName: text('group_name').notNull(),\n description: text(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productGroupMembership = sqliteTable('product_group_membership', {\n productId: integer('product_id').notNull().references(() => productInfo.id),\n groupId: integer('group_id').notNull().references(() => productGroupInfo.id),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n pk: primaryKey({ columns: [t.productId, t.groupId], name: 'product_group_membership_pk' }),\n}))\n\nexport const homeBanners = sqliteTable('home_banners', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text('name').notNull(),\n imageUrl: text('image_url').notNull(),\n description: text('description'),\n productIds: jsonText('product_ids'),\n redirectUrl: text('redirect_url'),\n serialNum: integer('serial_num'),\n isActive: integer('is_active', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n lastUpdated: integer('last_updated', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productReviews = sqliteTable('product_reviews', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n reviewBody: text('review_body').notNull(),\n imageUrls: jsonText('image_urls').$defaultFn(() => []),\n reviewTime: integer('review_time', { mode: 'timestamp' }).notNull().defaultNow(),\n ratings: real('ratings').notNull(),\n adminResponse: text('admin_response'),\n adminResponseImages: jsonText('admin_response_images').$defaultFn(() => []),\n}, (t) => ({\n ratingCheck: check('rating_check', sql`${t.ratings} >= 1 AND ${t.ratings} <= 5`),\n}))\n\nexport const uploadUrlStatus = sqliteTable('upload_url_status', {\n id: integer().primaryKey({ autoIncrement: true }),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n key: text('key').notNull(),\n status: uploadStatusEnum('status').notNull().default('pending'),\n})\n\nexport const productTagInfo = sqliteTable('product_tag_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n tagName: text('tag_name').notNull().unique(),\n tagDescription: text('tag_description'),\n imageUrl: text('image_url'),\n isDashboardTag: integer('is_dashboard_tag', { mode: 'boolean' }).notNull().default(false),\n relatedStores: jsonText('related_stores').$defaultFn(() => []),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productTags = sqliteTable('product_tags', {\n id: integer().primaryKey({ autoIncrement: true }),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n tagId: integer('tag_id').notNull().references(() => productTagInfo.id),\n assignedAt: integer('assigned_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_product_tag: uniqueIndex('unique_product_tag').on(t.productId, t.tagId),\n}))\n\nexport const deliverySlotInfo = sqliteTable('delivery_slot_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n deliveryTime: integer('delivery_time', { mode: 'timestamp' }).notNull(),\n freezeTime: integer('freeze_time', { mode: 'timestamp' }).notNull(),\n isActive: integer('is_active', { mode: 'boolean' }).notNull().default(true),\n isFlash: integer('is_flash', { mode: 'boolean' }).notNull().default(false),\n isCapacityFull: integer('is_capacity_full', { mode: 'boolean' }).notNull().default(false),\n deliverySequence: jsonText>('delivery_sequence').$defaultFn(() => ({})),\n groupIds: jsonText('group_ids').$defaultFn(() => []),\n})\n\nexport const vendorSnippets = sqliteTable('vendor_snippets', {\n id: integer().primaryKey({ autoIncrement: true }),\n snippetCode: text('snippet_code').notNull().unique(),\n slotId: integer('slot_id').references(() => deliverySlotInfo.id),\n isPermanent: integer('is_permanent', { mode: 'boolean' }).notNull().default(false),\n productIds: jsonText('product_ids').notNull(),\n validTill: integer('valid_till', { mode: 'timestamp' }),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productSlots = sqliteTable('product_slots', {\n productId: integer('product_id').notNull().references(() => productInfo.id),\n slotId: integer('slot_id').notNull().references(() => deliverySlotInfo.id),\n}, (t) => ({\n pk: primaryKey({ columns: [t.productId, t.slotId], name: 'product_slot_pk' }),\n}))\n\nexport const specialDeals = sqliteTable('special_deals', {\n id: integer().primaryKey({ autoIncrement: true }),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n quantity: numericText('quantity').notNull(),\n price: numericText('price').notNull(),\n validTill: integer('valid_till', { mode: 'timestamp' }).notNull(),\n})\n\nexport const paymentInfoTable = sqliteTable('payment_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n status: text().notNull(),\n gateway: text().notNull(),\n orderId: text('order_id'),\n token: text('token'),\n merchantOrderId: text('merchant_order_id').notNull().unique(),\n payload: jsonText('payload'),\n})\n\nexport const orders = sqliteTable('orders', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n addressId: integer('address_id').notNull().references(() => addresses.id),\n slotId: integer('slot_id').references(() => deliverySlotInfo.id),\n isCod: integer('is_cod', { mode: 'boolean' }).notNull().default(false),\n isOnlinePayment: integer('is_online_payment', { mode: 'boolean' }).notNull().default(false),\n paymentInfoId: integer('payment_info_id').references(() => paymentInfoTable.id),\n totalAmount: numericText('total_amount').notNull(),\n deliveryCharge: numericText('delivery_charge').notNull().default('0'),\n readableId: integer('readable_id').notNull(),\n adminNotes: text('admin_notes'),\n userNotes: text('user_notes'),\n orderGroupId: text('order_group_id'),\n orderGroupProportion: numericText('order_group_proportion'),\n isFlashDelivery: integer('is_flash_delivery', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const orderItems = sqliteTable('order_items', {\n id: integer().primaryKey({ autoIncrement: true }),\n orderId: integer('order_id').notNull().references(() => orders.id),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n quantity: text('quantity').notNull(),\n price: numericText('price').notNull(),\n discountedPrice: numericText('discounted_price'),\n is_packaged: integer('is_packaged', { mode: 'boolean' }).notNull().default(false),\n is_package_verified: integer('is_package_verified', { mode: 'boolean' }).notNull().default(false),\n})\n\nexport const orderStatus = sqliteTable('order_status', {\n id: integer().primaryKey({ autoIncrement: true }),\n orderTime: integer('order_time', { mode: 'timestamp' }).notNull().defaultNow(),\n userId: integer('user_id').notNull().references(() => users.id),\n orderId: integer('order_id').notNull().references(() => orders.id),\n isPackaged: integer('is_packaged', { mode: 'boolean' }).notNull().default(false),\n isDelivered: integer('is_delivered', { mode: 'boolean' }).notNull().default(false),\n isCancelled: integer('is_cancelled', { mode: 'boolean' }).notNull().default(false),\n cancelReason: text('cancel_reason'),\n isCancelledByAdmin: integer('is_cancelled_by_admin', { mode: 'boolean' }),\n paymentStatus: paymentStatusEnum('payment_state').notNull().default('pending'),\n cancellationUserNotes: text('cancellation_user_notes'),\n cancellationAdminNotes: text('cancellation_admin_notes'),\n cancellationReviewed: integer('cancellation_reviewed', { mode: 'boolean' }).notNull().default(false),\n cancellationReviewedAt: integer('cancellation_reviewed_at', { mode: 'timestamp' }),\n refundCouponId: integer('refund_coupon_id').references(() => coupons.id),\n})\n\nexport const payments = sqliteTable('payments', {\n id: integer().primaryKey({ autoIncrement: true }),\n status: text().notNull(),\n gateway: text().notNull(),\n orderId: integer('order_id').notNull().references(() => orders.id),\n token: text('token'),\n merchantOrderId: text('merchant_order_id').notNull().unique(),\n payload: jsonText('payload'),\n})\n\nexport const refunds = sqliteTable('refunds', {\n id: integer().primaryKey({ autoIncrement: true }),\n orderId: integer('order_id').notNull().references(() => orders.id),\n refundAmount: numericText('refund_amount'),\n refundStatus: text('refund_status').default('none'),\n merchantRefundId: text('merchant_refund_id'),\n refundProcessedAt: integer('refund_processed_at', { mode: 'timestamp' }),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const keyValStore = sqliteTable('key_val_store', {\n key: text('key').primaryKey(),\n value: jsonText('value'),\n})\n\nexport const notifications = sqliteTable('notifications', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n title: text().notNull(),\n body: text().notNull(),\n type: text(),\n isRead: integer('is_read', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productCategories = sqliteTable('product_categories', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text().notNull(),\n description: text(),\n})\n\nexport const cartItems = sqliteTable('cart_items', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n quantity: numericText('quantity').notNull(),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_user_product: uniqueIndex('unique_user_product').on(t.userId, t.productId),\n}))\n\nexport const complaints = sqliteTable('complaints', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n orderId: integer('order_id').references(() => orders.id),\n complaintBody: text('complaint_body').notNull(),\n images: jsonText('images'),\n response: text('response'),\n isResolved: integer('is_resolved', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const coupons = sqliteTable('coupons', {\n id: integer().primaryKey({ autoIncrement: true }),\n couponCode: text('coupon_code').notNull().unique(),\n isUserBased: integer('is_user_based', { mode: 'boolean' }).notNull().default(false),\n discountPercent: numericText('discount_percent'),\n flatDiscount: numericText('flat_discount'),\n minOrder: numericText('min_order'),\n productIds: jsonText('product_ids'),\n createdBy: integer('created_by').notNull().references(() => staffUsers.id),\n maxValue: numericText('max_value'),\n isApplyForAll: integer('is_apply_for_all', { mode: 'boolean' }).notNull().default(false),\n validTill: integer('valid_till', { mode: 'timestamp' }),\n maxLimitForUser: integer('max_limit_for_user'),\n isInvalidated: integer('is_invalidated', { mode: 'boolean' }).notNull().default(false),\n exclusiveApply: integer('exclusive_apply', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const couponUsage = sqliteTable('coupon_usage', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n couponId: integer('coupon_id').notNull().references(() => coupons.id),\n orderId: integer('order_id').references(() => orders.id),\n orderItemId: integer('order_item_id').references(() => orderItems.id),\n usedAt: integer('used_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const couponApplicableUsers = sqliteTable('coupon_applicable_users', {\n id: integer().primaryKey({ autoIncrement: true }),\n couponId: integer('coupon_id').notNull().references(() => coupons.id),\n userId: integer('user_id').notNull().references(() => users.id),\n}, (t) => ({\n unq_coupon_user: uniqueIndex('unique_coupon_user').on(t.couponId, t.userId),\n}))\n\nexport const couponApplicableProducts = sqliteTable('coupon_applicable_products', {\n id: integer().primaryKey({ autoIncrement: true }),\n couponId: integer('coupon_id').notNull().references(() => coupons.id),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n}, (t) => ({\n unq_coupon_product: uniqueIndex('unique_coupon_product').on(t.couponId, t.productId),\n}))\n\nexport const userIncidents = sqliteTable('user_incidents', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n orderId: integer('order_id').references(() => orders.id),\n dateAdded: integer('date_added', { mode: 'timestamp' }).notNull().defaultNow(),\n adminComment: text('admin_comment'),\n addedBy: integer('added_by').references(() => staffUsers.id),\n negativityScore: integer('negativity_score'),\n})\n\nexport const reservedCoupons = sqliteTable('reserved_coupons', {\n id: integer().primaryKey({ autoIncrement: true }),\n secretCode: text('secret_code').notNull().unique(),\n couponCode: text('coupon_code').notNull(),\n discountPercent: numericText('discount_percent'),\n flatDiscount: numericText('flat_discount'),\n minOrder: numericText('min_order'),\n productIds: jsonText('product_ids'),\n maxValue: numericText('max_value'),\n validTill: integer('valid_till', { mode: 'timestamp' }),\n maxLimitForUser: integer('max_limit_for_user'),\n exclusiveApply: integer('exclusive_apply', { mode: 'boolean' }).notNull().default(false),\n isRedeemed: integer('is_redeemed', { mode: 'boolean' }).notNull().default(false),\n redeemedBy: integer('redeemed_by').references(() => users.id),\n redeemedAt: integer('redeemed_at', { mode: 'timestamp' }),\n createdBy: integer('created_by').notNull().references(() => staffUsers.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const notifCreds = sqliteTable('notif_creds', {\n id: integer().primaryKey({ autoIncrement: true }),\n token: text().notNull().unique(),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n userId: integer('user_id').notNull().references(() => users.id),\n lastVerified: integer('last_verified', { mode: 'timestamp' }),\n})\n\nexport const unloggedUserTokens = sqliteTable('unlogged_user_tokens', {\n id: integer().primaryKey({ autoIncrement: true }),\n token: text().notNull().unique(),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n lastVerified: integer('last_verified', { mode: 'timestamp' }),\n})\n\nexport const userNotifications = sqliteTable('user_notifications', {\n id: integer().primaryKey({ autoIncrement: true }),\n title: text('title').notNull(),\n imageUrl: text('image_url'),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n body: text('body').notNull(),\n applicableUsers: jsonText('applicable_users'),\n})\n\n// Relations\nexport const usersRelations = relations(users, ({ many, one }) => ({\n addresses: many(addresses),\n orders: many(orders),\n notifications: many(notifications),\n cartItems: many(cartItems),\n userCreds: one(userCreds),\n coupons: many(coupons),\n couponUsages: many(couponUsage),\n applicableCoupons: many(couponApplicableUsers),\n userDetails: one(userDetails),\n notifCreds: many(notifCreds),\n userIncidents: many(userIncidents),\n}))\n\nexport const userCredsRelations = relations(userCreds, ({ one }) => ({\n user: one(users, { fields: [userCreds.userId], references: [users.id] }),\n}))\n\nexport const staffUsersRelations = relations(staffUsers, ({ one, many }) => ({\n role: one(staffRoles, { fields: [staffUsers.staffRoleId], references: [staffRoles.id] }),\n coupons: many(coupons),\n stores: many(storeInfo),\n}))\n\nexport const addressesRelations = relations(addresses, ({ one, many }) => ({\n user: one(users, { fields: [addresses.userId], references: [users.id] }),\n orders: many(orders),\n zone: one(addressZones, { fields: [addresses.zoneId], references: [addressZones.id] }),\n}))\n\nexport const unitsRelations = relations(units, ({ many }) => ({\n products: many(productInfo),\n}))\n\nexport const productInfoRelations = relations(productInfo, ({ one, many }) => ({\n unit: one(units, { fields: [productInfo.unitId], references: [units.id] }),\n store: one(storeInfo, { fields: [productInfo.storeId], references: [storeInfo.id] }),\n productSlots: many(productSlots),\n specialDeals: many(specialDeals),\n orderItems: many(orderItems),\n cartItems: many(cartItems),\n tags: many(productTags),\n applicableCoupons: many(couponApplicableProducts),\n reviews: many(productReviews),\n groups: many(productGroupMembership),\n}))\n\nexport const productTagInfoRelations = relations(productTagInfo, ({ many }) => ({\n products: many(productTags),\n}))\n\nexport const productTagsRelations = relations(productTags, ({ one }) => ({\n product: one(productInfo, { fields: [productTags.productId], references: [productInfo.id] }),\n tag: one(productTagInfo, { fields: [productTags.tagId], references: [productTagInfo.id] }),\n}))\n\nexport const deliverySlotInfoRelations = relations(deliverySlotInfo, ({ many }) => ({\n productSlots: many(productSlots),\n orders: many(orders),\n vendorSnippets: many(vendorSnippets),\n}))\n\nexport const productSlotsRelations = relations(productSlots, ({ one }) => ({\n product: one(productInfo, { fields: [productSlots.productId], references: [productInfo.id] }),\n slot: one(deliverySlotInfo, { fields: [productSlots.slotId], references: [deliverySlotInfo.id] }),\n}))\n\nexport const specialDealsRelations = relations(specialDeals, ({ one }) => ({\n product: one(productInfo, { fields: [specialDeals.productId], references: [productInfo.id] }),\n}))\n\nexport const ordersRelations = relations(orders, ({ one, many }) => ({\n user: one(users, { fields: [orders.userId], references: [users.id] }),\n address: one(addresses, { fields: [orders.addressId], references: [addresses.id] }),\n slot: one(deliverySlotInfo, { fields: [orders.slotId], references: [deliverySlotInfo.id] }),\n orderItems: many(orderItems),\n payment: one(payments),\n paymentInfo: one(paymentInfoTable, { fields: [orders.paymentInfoId], references: [paymentInfoTable.id] }),\n orderStatus: many(orderStatus),\n refunds: many(refunds),\n couponUsages: many(couponUsage),\n userIncidents: many(userIncidents),\n}))\n\nexport const orderItemsRelations = relations(orderItems, ({ one }) => ({\n order: one(orders, { fields: [orderItems.orderId], references: [orders.id] }),\n product: one(productInfo, { fields: [orderItems.productId], references: [productInfo.id] }),\n}))\n\nexport const orderStatusRelations = relations(orderStatus, ({ one }) => ({\n order: one(orders, { fields: [orderStatus.orderId], references: [orders.id] }),\n user: one(users, { fields: [orderStatus.userId], references: [users.id] }),\n refundCoupon: one(coupons, { fields: [orderStatus.refundCouponId], references: [coupons.id] }),\n}))\n\nexport const paymentInfoRelations = relations(paymentInfoTable, ({ one }) => ({\n order: one(orders, { fields: [paymentInfoTable.id], references: [orders.paymentInfoId] }),\n}))\n\nexport const paymentsRelations = relations(payments, ({ one }) => ({\n order: one(orders, { fields: [payments.orderId], references: [orders.id] }),\n}))\n\nexport const refundsRelations = relations(refunds, ({ one }) => ({\n order: one(orders, { fields: [refunds.orderId], references: [orders.id] }),\n}))\n\nexport const notificationsRelations = relations(notifications, ({ one }) => ({\n user: one(users, { fields: [notifications.userId], references: [users.id] }),\n}))\n\nexport const productCategoriesRelations = relations(productCategories, ({}) => ({}))\n\nexport const cartItemsRelations = relations(cartItems, ({ one }) => ({\n user: one(users, { fields: [cartItems.userId], references: [users.id] }),\n product: one(productInfo, { fields: [cartItems.productId], references: [productInfo.id] }),\n}))\n\nexport const complaintsRelations = relations(complaints, ({ one }) => ({\n user: one(users, { fields: [complaints.userId], references: [users.id] }),\n order: one(orders, { fields: [complaints.orderId], references: [orders.id] }),\n}))\n\nexport const couponsRelations = relations(coupons, ({ one, many }) => ({\n creator: one(staffUsers, { fields: [coupons.createdBy], references: [staffUsers.id] }),\n usages: many(couponUsage),\n applicableUsers: many(couponApplicableUsers),\n applicableProducts: many(couponApplicableProducts),\n}))\n\nexport const couponUsageRelations = relations(couponUsage, ({ one }) => ({\n user: one(users, { fields: [couponUsage.userId], references: [users.id] }),\n coupon: one(coupons, { fields: [couponUsage.couponId], references: [coupons.id] }),\n order: one(orders, { fields: [couponUsage.orderId], references: [orders.id] }),\n orderItem: one(orderItems, { fields: [couponUsage.orderItemId], references: [orderItems.id] }),\n}))\n\nexport const userDetailsRelations = relations(userDetails, ({ one }) => ({\n user: one(users, { fields: [userDetails.userId], references: [users.id] }),\n}))\n\nexport const notifCredsRelations = relations(notifCreds, ({ one }) => ({\n user: one(users, { fields: [notifCreds.userId], references: [users.id] }),\n}))\n\nexport const userNotificationsRelations = relations(userNotifications, ({}) => ({\n // No relations needed for now\n}))\n\nexport const storeInfoRelations = relations(storeInfo, ({ one, many }) => ({\n owner: one(staffUsers, { fields: [storeInfo.owner], references: [staffUsers.id] }),\n products: many(productInfo),\n}))\n\nexport const couponApplicableUsersRelations = relations(couponApplicableUsers, ({ one }) => ({\n coupon: one(coupons, { fields: [couponApplicableUsers.couponId], references: [coupons.id] }),\n user: one(users, { fields: [couponApplicableUsers.userId], references: [users.id] }),\n}))\n\nexport const couponApplicableProductsRelations = relations(couponApplicableProducts, ({ one }) => ({\n coupon: one(coupons, { fields: [couponApplicableProducts.couponId], references: [coupons.id] }),\n product: one(productInfo, { fields: [couponApplicableProducts.productId], references: [productInfo.id] }),\n}))\n\nexport const reservedCouponsRelations = relations(reservedCoupons, ({ one }) => ({\n redeemedUser: one(users, { fields: [reservedCoupons.redeemedBy], references: [users.id] }),\n creator: one(staffUsers, { fields: [reservedCoupons.createdBy], references: [staffUsers.id] }),\n}))\n\nexport const productReviewsRelations = relations(productReviews, ({ one }) => ({\n user: one(users, { fields: [productReviews.userId], references: [users.id] }),\n product: one(productInfo, { fields: [productReviews.productId], references: [productInfo.id] }),\n}))\n\nexport const addressZonesRelations = relations(addressZones, ({ many }) => ({\n addresses: many(addresses),\n areas: many(addressAreas),\n}))\n\nexport const addressAreasRelations = relations(addressAreas, ({ one }) => ({\n zone: one(addressZones, { fields: [addressAreas.zoneId], references: [addressZones.id] }),\n}))\n\nexport const productGroupInfoRelations = relations(productGroupInfo, ({ many }) => ({\n memberships: many(productGroupMembership),\n}))\n\nexport const productGroupMembershipRelations = relations(productGroupMembership, ({ one }) => ({\n product: one(productInfo, { fields: [productGroupMembership.productId], references: [productInfo.id] }),\n group: one(productGroupInfo, { fields: [productGroupMembership.groupId], references: [productGroupInfo.id] }),\n}))\n\nexport const homeBannersRelations = relations(homeBanners, ({}) => ({\n // Relations for productIds array would be more complex, skipping for now\n}))\n\nexport const staffRolesRelations = relations(staffRoles, ({ many }) => ({\n staffUsers: many(staffUsers),\n rolePermissions: many(staffRolePermissions),\n}))\n\nexport const staffPermissionsRelations = relations(staffPermissions, ({ many }) => ({\n rolePermissions: many(staffRolePermissions),\n}))\n\nexport const staffRolePermissionsRelations = relations(staffRolePermissions, ({ one }) => ({\n role: one(staffRoles, { fields: [staffRolePermissions.staffRoleId], references: [staffRoles.id] }),\n permission: one(staffPermissions, { fields: [staffRolePermissions.staffPermissionId], references: [staffPermissions.id] }),\n}))\n\nexport const userIncidentsRelations = relations(userIncidents, ({ one }) => ({\n user: one(users, { fields: [userIncidents.userId], references: [users.id] }),\n order: one(orders, { fields: [userIncidents.orderId], references: [orders.id] }),\n addedBy: one(staffUsers, { fields: [userIncidents.addedBy], references: [staffUsers.id] }),\n}))\n\nexport const vendorSnippetsRelations = relations(vendorSnippets, ({ one }) => ({\n slot: one(deliverySlotInfo, { fields: [vendorSnippets.slotId], references: [deliverySlotInfo.id] }),\n}))\n", "export const fromUtf8 = (input) => new TextEncoder().encode(input);\n", "import { fromUtf8 } from \"./fromUtf8\";\nexport const toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n", "export const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return new TextDecoder(\"utf-8\").decode(input);\n};\n", "export * from \"./fromUtf8\";\nexport * from \"./toUint8Array\";\nexport * from \"./toUtf8\";\n", "!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t) {\n flags[commandName] = commands_json_1.default[commandName].flags.reduce(function (flags, flag) {\n flags[flag] = true;\n return flags;\n }, {});\n});\n/**\n * Check if the command exists\n */\nfunction exists(commandName, options) {\n commandName = (options === null || options === void 0 ? void 0 : options.caseInsensitive)\n ? String(commandName).toLowerCase()\n : commandName;\n return Boolean(commands_json_1.default[commandName]);\n}\nexports.exists = exists;\n/**\n * Check if the command has the flag\n *\n * Some of possible flags: readonly, noscript, loading\n */\nfunction hasFlag(commandName, flag, options) {\n commandName = (options === null || options === void 0 ? void 0 : options.nameCaseInsensitive)\n ? String(commandName).toLowerCase()\n : commandName;\n if (!flags[commandName]) {\n throw new Error(\"Unknown command \" + commandName);\n }\n return Boolean(flags[commandName][flag]);\n}\nexports.hasFlag = hasFlag;\n/**\n * Get indexes of keys in the command arguments\n *\n * @example\n * ```javascript\n * getKeyIndexes('set', ['key', 'value']) // [0]\n * getKeyIndexes('mget', ['key1', 'key2']) // [0, 1]\n * ```\n */\nfunction getKeyIndexes(commandName, args, options) {\n commandName = (options === null || options === void 0 ? void 0 : options.nameCaseInsensitive)\n ? String(commandName).toLowerCase()\n : commandName;\n const command = commands_json_1.default[commandName];\n if (!command) {\n throw new Error(\"Unknown command \" + commandName);\n }\n if (!Array.isArray(args)) {\n throw new Error(\"Expect args to be an array\");\n }\n const keys = [];\n const parseExternalKey = Boolean(options && options.parseExternalKey);\n const takeDynamicKeys = (args, startIndex) => {\n const keys = [];\n const keyStop = Number(args[startIndex]);\n for (let i = 0; i < keyStop; i++) {\n keys.push(i + startIndex + 1);\n }\n return keys;\n };\n const takeKeyAfterToken = (args, startIndex, token) => {\n for (let i = startIndex; i < args.length - 1; i += 1) {\n if (String(args[i]).toLowerCase() === token.toLowerCase()) {\n return i + 1;\n }\n }\n return null;\n };\n switch (commandName) {\n case \"zunionstore\":\n case \"zinterstore\":\n case \"zdiffstore\":\n keys.push(0, ...takeDynamicKeys(args, 1));\n break;\n case \"eval\":\n case \"evalsha\":\n case \"eval_ro\":\n case \"evalsha_ro\":\n case \"fcall\":\n case \"fcall_ro\":\n case \"blmpop\":\n case \"bzmpop\":\n keys.push(...takeDynamicKeys(args, 1));\n break;\n case \"sintercard\":\n case \"lmpop\":\n case \"zunion\":\n case \"zinter\":\n case \"zmpop\":\n case \"zintercard\":\n case \"zdiff\": {\n keys.push(...takeDynamicKeys(args, 0));\n break;\n }\n case \"georadius\": {\n keys.push(0);\n const storeKey = takeKeyAfterToken(args, 5, \"STORE\");\n if (storeKey)\n keys.push(storeKey);\n const distKey = takeKeyAfterToken(args, 5, \"STOREDIST\");\n if (distKey)\n keys.push(distKey);\n break;\n }\n case \"georadiusbymember\": {\n keys.push(0);\n const storeKey = takeKeyAfterToken(args, 4, \"STORE\");\n if (storeKey)\n keys.push(storeKey);\n const distKey = takeKeyAfterToken(args, 4, \"STOREDIST\");\n if (distKey)\n keys.push(distKey);\n break;\n }\n case \"sort\":\n case \"sort_ro\":\n keys.push(0);\n for (let i = 1; i < args.length - 1; i++) {\n let arg = args[i];\n if (typeof arg !== \"string\") {\n continue;\n }\n const directive = arg.toUpperCase();\n if (directive === \"GET\") {\n i += 1;\n arg = args[i];\n if (arg !== \"#\") {\n if (parseExternalKey) {\n keys.push([i, getExternalKeyNameLength(arg)]);\n }\n else {\n keys.push(i);\n }\n }\n }\n else if (directive === \"BY\") {\n i += 1;\n if (parseExternalKey) {\n keys.push([i, getExternalKeyNameLength(args[i])]);\n }\n else {\n keys.push(i);\n }\n }\n else if (directive === \"STORE\") {\n i += 1;\n keys.push(i);\n }\n }\n break;\n case \"migrate\":\n if (args[2] === \"\") {\n for (let i = 5; i < args.length - 1; i++) {\n const arg = args[i];\n if (typeof arg === \"string\" && arg.toUpperCase() === \"KEYS\") {\n for (let j = i + 1; j < args.length; j++) {\n keys.push(j);\n }\n break;\n }\n }\n }\n else {\n keys.push(2);\n }\n break;\n case \"xreadgroup\":\n case \"xread\":\n // Keys are 1st half of the args after STREAMS argument.\n for (let i = commandName === \"xread\" ? 0 : 3; i < args.length - 1; i++) {\n if (String(args[i]).toUpperCase() === \"STREAMS\") {\n for (let j = i + 1; j <= i + (args.length - 1 - i) / 2; j++) {\n keys.push(j);\n }\n break;\n }\n }\n break;\n default:\n // Step has to be at least one in this case, otherwise the command does\n // not contain a key.\n if (command.step > 0) {\n const keyStart = command.keyStart - 1;\n const keyStop = command.keyStop > 0\n ? command.keyStop\n : args.length + command.keyStop + 1;\n for (let i = keyStart; i < keyStop; i += command.step) {\n keys.push(i);\n }\n }\n break;\n }\n return keys;\n}\nexports.getKeyIndexes = getKeyIndexes;\nfunction getExternalKeyNameLength(key) {\n if (typeof key !== \"string\") {\n key = String(key);\n }\n const hashPos = key.indexOf(\"->\");\n return hashPos === -1 ? key.length : hashPos;\n}\n", "import libDefault from 'events';\nmodule.exports = libDefault;", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.tryCatch = exports.errorObj = void 0;\n//Try catch is not supported in optimizing\n//compiler, so it is isolated\nexports.errorObj = { e: {} };\nlet tryCatchTarget;\nfunction tryCatcher(err, val) {\n try {\n const target = tryCatchTarget;\n tryCatchTarget = null;\n return target.apply(this, arguments);\n }\n catch (e) {\n exports.errorObj.e = e;\n return exports.errorObj;\n }\n}\nfunction tryCatch(fn) {\n tryCatchTarget = fn;\n return tryCatcher;\n}\nexports.tryCatch = tryCatch;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"./utils\");\nfunction throwLater(e) {\n setTimeout(function () {\n throw e;\n }, 0);\n}\nfunction asCallback(promise, nodeback, options) {\n if (typeof nodeback === \"function\") {\n promise.then((val) => {\n let ret;\n if (options !== undefined &&\n Object(options).spread &&\n Array.isArray(val)) {\n ret = utils_1.tryCatch(nodeback).apply(undefined, [null].concat(val));\n }\n else {\n ret =\n val === undefined\n ? utils_1.tryCatch(nodeback)(null)\n : utils_1.tryCatch(nodeback)(null, val);\n }\n if (ret === utils_1.errorObj) {\n throwLater(ret.e);\n }\n }, (cause) => {\n if (!cause) {\n const newReason = new Error(cause + \"\");\n Object.assign(newReason, { cause });\n cause = newReason;\n }\n const ret = utils_1.tryCatch(nodeback)(cause);\n if (ret === utils_1.errorObj) {\n throwLater(ret.e);\n }\n });\n }\n return promise;\n}\nexports.default = asCallback;\n", "import libDefault from 'assert';\nmodule.exports = libDefault;", "import libDefault from 'util';\nmodule.exports = libDefault;", "'use strict'\n\nconst assert = require('assert')\nconst util = require('util')\n\n// RedisError\n\nfunction RedisError (message) {\n Object.defineProperty(this, 'message', {\n value: message || '',\n configurable: true,\n writable: true\n })\n Error.captureStackTrace(this, this.constructor)\n}\n\nutil.inherits(RedisError, Error)\n\nObject.defineProperty(RedisError.prototype, 'name', {\n value: 'RedisError',\n configurable: true,\n writable: true\n})\n\n// ParserError\n\nfunction ParserError (message, buffer, offset) {\n assert(buffer)\n assert.strictEqual(typeof offset, 'number')\n\n Object.defineProperty(this, 'message', {\n value: message || '',\n configurable: true,\n writable: true\n })\n\n const tmp = Error.stackTraceLimit\n Error.stackTraceLimit = 2\n Error.captureStackTrace(this, this.constructor)\n Error.stackTraceLimit = tmp\n this.offset = offset\n this.buffer = buffer\n}\n\nutil.inherits(ParserError, RedisError)\n\nObject.defineProperty(ParserError.prototype, 'name', {\n value: 'ParserError',\n configurable: true,\n writable: true\n})\n\n// ReplyError\n\nfunction ReplyError (message) {\n Object.defineProperty(this, 'message', {\n value: message || '',\n configurable: true,\n writable: true\n })\n const tmp = Error.stackTraceLimit\n Error.stackTraceLimit = 2\n Error.captureStackTrace(this, this.constructor)\n Error.stackTraceLimit = tmp\n}\n\nutil.inherits(ReplyError, RedisError)\n\nObject.defineProperty(ReplyError.prototype, 'name', {\n value: 'ReplyError',\n configurable: true,\n writable: true\n})\n\n// AbortError\n\nfunction AbortError (message) {\n Object.defineProperty(this, 'message', {\n value: message || '',\n configurable: true,\n writable: true\n })\n Error.captureStackTrace(this, this.constructor)\n}\n\nutil.inherits(AbortError, RedisError)\n\nObject.defineProperty(AbortError.prototype, 'name', {\n value: 'AbortError',\n configurable: true,\n writable: true\n})\n\n// InterruptError\n\nfunction InterruptError (message) {\n Object.defineProperty(this, 'message', {\n value: message || '',\n configurable: true,\n writable: true\n })\n Error.captureStackTrace(this, this.constructor)\n}\n\nutil.inherits(InterruptError, AbortError)\n\nObject.defineProperty(InterruptError.prototype, 'name', {\n value: 'InterruptError',\n configurable: true,\n writable: true\n})\n\nmodule.exports = {\n RedisError,\n ParserError,\n ReplyError,\n AbortError,\n InterruptError\n}\n", "'use strict'\n\nconst assert = require('assert')\n\nclass RedisError extends Error {\n get name () {\n return this.constructor.name\n }\n}\n\nclass ParserError extends RedisError {\n constructor (message, buffer, offset) {\n assert(buffer)\n assert.strictEqual(typeof offset, 'number')\n\n const tmp = Error.stackTraceLimit\n Error.stackTraceLimit = 2\n super(message)\n Error.stackTraceLimit = tmp\n this.offset = offset\n this.buffer = buffer\n }\n\n get name () {\n return this.constructor.name\n }\n}\n\nclass ReplyError extends RedisError {\n constructor (message) {\n const tmp = Error.stackTraceLimit\n Error.stackTraceLimit = 2\n super(message)\n Error.stackTraceLimit = tmp\n }\n get name () {\n return this.constructor.name\n }\n}\n\nclass AbortError extends RedisError {\n get name () {\n return this.constructor.name\n }\n}\n\nclass InterruptError extends AbortError {\n get name () {\n return this.constructor.name\n }\n}\n\nmodule.exports = {\n RedisError,\n ParserError,\n ReplyError,\n AbortError,\n InterruptError\n}\n", "'use strict'\n\nconst Errors = process.version.charCodeAt(1) < 55 && process.version.charCodeAt(2) === 46\n ? require('./lib/old') // Node.js < 7\n : require('./lib/modern')\n\nmodule.exports = Errors\n", "/*\n * Copyright 2001-2010 Georges Menie (www.menie.org)\n * Copyright 2010 Salvatore Sanfilippo (adapted to Redis coding style)\n * Copyright 2015 Zihua Li (http://zihua.li) (ported to JavaScript)\n * Copyright 2016 Mike Diarmid (http://github.com/salakar) (re-write for performance, ~700% perf inc)\n * All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of the University of California, Berkeley nor the\n * names of its contributors may be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* CRC16 implementation according to CCITT standards.\n *\n * Note by @antirez: this is actually the XMODEM CRC 16 algorithm, using the\n * following parameters:\n *\n * Name : \"XMODEM\", also known as \"ZMODEM\", \"CRC-16/ACORN\"\n * Width : 16 bit\n * Poly : 1021 (That is actually x^16 + x^12 + x^5 + 1)\n * Initialization : 0000\n * Reflect Input byte : False\n * Reflect Output CRC : False\n * Xor constant to output CRC : 0000\n * Output for \"123456789\" : 31C3\n */\n\nvar lookup = [\n 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7,\n 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef,\n 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6,\n 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de,\n 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485,\n 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d,\n 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4,\n 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc,\n 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823,\n 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b,\n 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12,\n 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a,\n 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41,\n 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49,\n 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70,\n 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78,\n 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f,\n 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067,\n 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e,\n 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256,\n 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d,\n 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,\n 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c,\n 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634,\n 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab,\n 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3,\n 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a,\n 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92,\n 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9,\n 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1,\n 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8,\n 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0\n];\n\n/**\n * Convert a string to a UTF8 array - faster than via buffer\n * @param str\n * @returns {Array}\n */\nvar toUTF8Array = function toUTF8Array(str) {\n var char;\n var i = 0;\n var p = 0;\n var utf8 = [];\n var len = str.length;\n\n for (; i < len; i++) {\n char = str.charCodeAt(i);\n if (char < 128) {\n utf8[p++] = char;\n } else if (char < 2048) {\n utf8[p++] = (char >> 6) | 192;\n utf8[p++] = (char & 63) | 128;\n } else if (\n ((char & 0xFC00) === 0xD800) && (i + 1) < str.length &&\n ((str.charCodeAt(i + 1) & 0xFC00) === 0xDC00)) {\n char = 0x10000 + ((char & 0x03FF) << 10) + (str.charCodeAt(++i) & 0x03FF);\n utf8[p++] = (char >> 18) | 240;\n utf8[p++] = ((char >> 12) & 63) | 128;\n utf8[p++] = ((char >> 6) & 63) | 128;\n utf8[p++] = (char & 63) | 128;\n } else {\n utf8[p++] = (char >> 12) | 224;\n utf8[p++] = ((char >> 6) & 63) | 128;\n utf8[p++] = (char & 63) | 128;\n }\n }\n\n return utf8;\n};\n\n/**\n * Convert a string into a redis slot hash.\n * @param str\n * @returns {number}\n */\nvar generate = module.exports = function generate(str) {\n var char;\n var i = 0;\n var start = -1;\n var result = 0;\n var resultHash = 0;\n var utf8 = typeof str === 'string' ? toUTF8Array(str) : str;\n var len = utf8.length;\n\n while (i < len) {\n char = utf8[i++];\n if (start === -1) {\n if (char === 0x7B) {\n start = i;\n }\n } else if (char !== 0x7D) {\n resultHash = lookup[(char ^ (resultHash >> 8)) & 0xFF] ^ (resultHash << 8);\n } else if (i - 1 !== start) {\n return resultHash & 0x3FFF;\n }\n\n result = lookup[(char ^ (result >> 8)) & 0xFF] ^ (result << 8);\n }\n\n return result & 0x3FFF;\n};\n\n/**\n * Convert an array of multiple strings into a redis slot hash.\n * Returns -1 if one of the keys is not for the same slot as the others\n * @param keys\n * @returns {number}\n */\nmodule.exports.generateMulti = function generateMulti(keys) {\n var i = 1;\n var len = keys.length;\n var base = generate(keys[0]);\n\n while (i < len) {\n if (generate(keys[i++]) !== base) return -1;\n }\n\n return base;\n};\n", "import { notImplemented } from \"../../../_internal/utils.mjs\";\nexport const access = /* @__PURE__ */ notImplemented(\"fs.access\");\nexport const copyFile = /* @__PURE__ */ notImplemented(\"fs.copyFile\");\nexport const cp = /* @__PURE__ */ notImplemented(\"fs.cp\");\nexport const open = /* @__PURE__ */ notImplemented(\"fs.open\");\nexport const opendir = /* @__PURE__ */ notImplemented(\"fs.opendir\");\nexport const rename = /* @__PURE__ */ notImplemented(\"fs.rename\");\nexport const truncate = /* @__PURE__ */ notImplemented(\"fs.truncate\");\nexport const rm = /* @__PURE__ */ notImplemented(\"fs.rm\");\nexport const rmdir = /* @__PURE__ */ notImplemented(\"fs.rmdir\");\nexport const mkdir = /* @__PURE__ */ notImplemented(\"fs.mkdir\");\nexport const readdir = /* @__PURE__ */ notImplemented(\"fs.readdir\");\nexport const readlink = /* @__PURE__ */ notImplemented(\"fs.readlink\");\nexport const symlink = /* @__PURE__ */ notImplemented(\"fs.symlink\");\nexport const lstat = /* @__PURE__ */ notImplemented(\"fs.lstat\");\nexport const stat = /* @__PURE__ */ notImplemented(\"fs.stat\");\nexport const link = /* @__PURE__ */ notImplemented(\"fs.link\");\nexport const unlink = /* @__PURE__ */ notImplemented(\"fs.unlink\");\nexport const chmod = /* @__PURE__ */ notImplemented(\"fs.chmod\");\nexport const lchmod = /* @__PURE__ */ notImplemented(\"fs.lchmod\");\nexport const lchown = /* @__PURE__ */ notImplemented(\"fs.lchown\");\nexport const chown = /* @__PURE__ */ notImplemented(\"fs.chown\");\nexport const utimes = /* @__PURE__ */ notImplemented(\"fs.utimes\");\nexport const lutimes = /* @__PURE__ */ notImplemented(\"fs.lutimes\");\nexport const realpath = /* @__PURE__ */ notImplemented(\"fs.realpath\");\nexport const mkdtemp = /* @__PURE__ */ notImplemented(\"fs.mkdtemp\");\nexport const writeFile = /* @__PURE__ */ notImplemented(\"fs.writeFile\");\nexport const appendFile = /* @__PURE__ */ notImplemented(\"fs.appendFile\");\nexport const readFile = /* @__PURE__ */ notImplemented(\"fs.readFile\");\nexport const watch = /* @__PURE__ */ notImplemented(\"fs.watch\");\nexport const statfs = /* @__PURE__ */ notImplemented(\"fs.statfs\");\nexport const glob = /* @__PURE__ */ notImplemented(\"fs.glob\");\n", "// npx -y node@22.14 -e 'const{constants}=require(\"fs\");console.log(Object.entries(constants).map(([k,v]) => `export const ${k} = ${JSON.stringify(v)}`).join(\"\\n\"))'\nexport const UV_FS_SYMLINK_DIR = 1;\nexport const UV_FS_SYMLINK_JUNCTION = 2;\nexport const O_RDONLY = 0;\nexport const O_WRONLY = 1;\nexport const O_RDWR = 2;\nexport const UV_DIRENT_UNKNOWN = 0;\nexport const UV_DIRENT_FILE = 1;\nexport const UV_DIRENT_DIR = 2;\nexport const UV_DIRENT_LINK = 3;\nexport const UV_DIRENT_FIFO = 4;\nexport const UV_DIRENT_SOCKET = 5;\nexport const UV_DIRENT_CHAR = 6;\nexport const UV_DIRENT_BLOCK = 7;\nexport const EXTENSIONLESS_FORMAT_JAVASCRIPT = 0;\nexport const EXTENSIONLESS_FORMAT_WASM = 1;\nexport const S_IFMT = 61440;\nexport const S_IFREG = 32768;\nexport const S_IFDIR = 16384;\nexport const S_IFCHR = 8192;\nexport const S_IFBLK = 24576;\nexport const S_IFIFO = 4096;\nexport const S_IFLNK = 40960;\nexport const S_IFSOCK = 49152;\nexport const O_CREAT = 64;\nexport const O_EXCL = 128;\nexport const UV_FS_O_FILEMAP = 0;\nexport const O_NOCTTY = 256;\nexport const O_TRUNC = 512;\nexport const O_APPEND = 1024;\nexport const O_DIRECTORY = 65536;\nexport const O_NOATIME = 262144;\nexport const O_NOFOLLOW = 131072;\nexport const O_SYNC = 1052672;\nexport const O_DSYNC = 4096;\nexport const O_DIRECT = 16384;\nexport const O_NONBLOCK = 2048;\nexport const S_IRWXU = 448;\nexport const S_IRUSR = 256;\nexport const S_IWUSR = 128;\nexport const S_IXUSR = 64;\nexport const S_IRWXG = 56;\nexport const S_IRGRP = 32;\nexport const S_IWGRP = 16;\nexport const S_IXGRP = 8;\nexport const S_IRWXO = 7;\nexport const S_IROTH = 4;\nexport const S_IWOTH = 2;\nexport const S_IXOTH = 1;\nexport const F_OK = 0;\nexport const R_OK = 4;\nexport const W_OK = 2;\nexport const X_OK = 1;\nexport const UV_FS_COPYFILE_EXCL = 1;\nexport const COPYFILE_EXCL = 1;\nexport const UV_FS_COPYFILE_FICLONE = 2;\nexport const COPYFILE_FICLONE = 2;\nexport const UV_FS_COPYFILE_FICLONE_FORCE = 4;\nexport const COPYFILE_FICLONE_FORCE = 4;\n", "import { access, appendFile, chmod, chown, copyFile, cp, glob, lchmod, lchown, link, lstat, lutimes, mkdir, mkdtemp, open, opendir, readFile, readdir, readlink, realpath, rename, rm, rmdir, stat, statfs, symlink, truncate, unlink, utimes, watch, writeFile } from \"../internal/fs/promises.mjs\";\nimport * as constants from \"../internal/fs/constants.mjs\";\nexport { constants };\nexport * from \"../internal/fs/promises.mjs\";\nexport default {\n\tconstants,\n\taccess,\n\tappendFile,\n\tchmod,\n\tchown,\n\tcopyFile,\n\tcp,\n\tglob,\n\tlchmod,\n\tlchown,\n\tlink,\n\tlstat,\n\tlutimes,\n\tmkdir,\n\tmkdtemp,\n\topen,\n\topendir,\n\treadFile,\n\treaddir,\n\treadlink,\n\trealpath,\n\trename,\n\trm,\n\trmdir,\n\tstat,\n\tstatfs,\n\tsymlink,\n\ttruncate,\n\tunlink,\n\tutimes,\n\twatch,\n\twriteFile\n};\n", "import { notImplementedClass } from \"../../../_internal/utils.mjs\";\nexport const Dir = /* @__PURE__ */ notImplementedClass(\"fs.Dir\");\nexport const Dirent = /* @__PURE__ */ notImplementedClass(\"fs.Dirent\");\nexport const Stats = /* @__PURE__ */ notImplementedClass(\"fs.Stats\");\nexport const ReadStream = /* @__PURE__ */ notImplementedClass(\"fs.ReadStream\");\nexport const WriteStream = /* @__PURE__ */ notImplementedClass(\"fs.WriteStream\");\nexport const FileReadStream = ReadStream;\nexport const FileWriteStream = WriteStream;\n", "import { notImplemented, notImplementedAsync } from \"../../../_internal/utils.mjs\";\nimport * as fsp from \"./promises.mjs\";\nfunction callbackify(fn) {\n\tconst fnc = function(...args) {\n\t\tconst cb = args.pop();\n\t\tfn().catch((error) => cb(error)).then((val) => cb(undefined, val));\n\t};\n\tfnc.__promisify__ = fn;\n\tfnc.native = fnc;\n\treturn fnc;\n}\n// Async\nexport const access = callbackify(fsp.access);\nexport const appendFile = callbackify(fsp.appendFile);\nexport const chown = callbackify(fsp.chown);\nexport const chmod = callbackify(fsp.chmod);\nexport const copyFile = callbackify(fsp.copyFile);\nexport const cp = callbackify(fsp.cp);\nexport const lchown = callbackify(fsp.lchown);\nexport const lchmod = callbackify(fsp.lchmod);\nexport const link = callbackify(fsp.link);\nexport const lstat = callbackify(fsp.lstat);\nexport const lutimes = callbackify(fsp.lutimes);\nexport const mkdir = callbackify(fsp.mkdir);\nexport const mkdtemp = callbackify(fsp.mkdtemp);\nexport const realpath = callbackify(fsp.realpath);\nexport const open = callbackify(fsp.open);\nexport const opendir = callbackify(fsp.opendir);\nexport const readdir = callbackify(fsp.readdir);\nexport const readFile = callbackify(fsp.readFile);\nexport const readlink = callbackify(fsp.readlink);\nexport const rename = callbackify(fsp.rename);\nexport const rm = callbackify(fsp.rm);\nexport const rmdir = callbackify(fsp.rmdir);\nexport const stat = callbackify(fsp.stat);\nexport const symlink = callbackify(fsp.symlink);\nexport const truncate = callbackify(fsp.truncate);\nexport const unlink = callbackify(fsp.unlink);\nexport const utimes = callbackify(fsp.utimes);\nexport const writeFile = callbackify(fsp.writeFile);\nexport const statfs = callbackify(fsp.statfs);\nexport const close = /* @__PURE__ */ notImplementedAsync(\"fs.close\");\nexport const createReadStream = /* @__PURE__ */ notImplementedAsync(\"fs.createReadStream\");\nexport const createWriteStream = /* @__PURE__ */ notImplementedAsync(\"fs.createWriteStream\");\nexport const exists = /* @__PURE__ */ notImplementedAsync(\"fs.exists\");\nexport const fchown = /* @__PURE__ */ notImplementedAsync(\"fs.fchown\");\nexport const fchmod = /* @__PURE__ */ notImplementedAsync(\"fs.fchmod\");\nexport const fdatasync = /* @__PURE__ */ notImplementedAsync(\"fs.fdatasync\");\nexport const fstat = /* @__PURE__ */ notImplementedAsync(\"fs.fstat\");\nexport const fsync = /* @__PURE__ */ notImplementedAsync(\"fs.fsync\");\nexport const ftruncate = /* @__PURE__ */ notImplementedAsync(\"fs.ftruncate\");\nexport const futimes = /* @__PURE__ */ notImplementedAsync(\"fs.futimes\");\nexport const lstatSync = /* @__PURE__ */ notImplementedAsync(\"fs.lstatSync\");\nexport const read = /* @__PURE__ */ notImplementedAsync(\"fs.read\");\nexport const readv = /* @__PURE__ */ notImplementedAsync(\"fs.readv\");\nexport const realpathSync = /* @__PURE__ */ notImplementedAsync(\"fs.realpathSync\");\nexport const statSync = /* @__PURE__ */ notImplementedAsync(\"fs.statSync\");\nexport const unwatchFile = /* @__PURE__ */ notImplementedAsync(\"fs.unwatchFile\");\nexport const watch = /* @__PURE__ */ notImplementedAsync(\"fs.watch\");\nexport const watchFile = /* @__PURE__ */ notImplementedAsync(\"fs.watchFile\");\nexport const write = /* @__PURE__ */ notImplementedAsync(\"fs.write\");\nexport const writev = /* @__PURE__ */ notImplementedAsync(\"fs.writev\");\nexport const _toUnixTimestamp = /* @__PURE__ */ notImplementedAsync(\"fs._toUnixTimestamp\");\nexport const openAsBlob = /* @__PURE__ */ notImplementedAsync(\"fs.openAsBlob\");\nexport const glob = /* @__PURE__ */ notImplementedAsync(\"fs.glob\");\n// Sync\nexport const appendFileSync = /* @__PURE__ */ notImplemented(\"fs.appendFileSync\");\nexport const accessSync = /* @__PURE__ */ notImplemented(\"fs.accessSync\");\nexport const chownSync = /* @__PURE__ */ notImplemented(\"fs.chownSync\");\nexport const chmodSync = /* @__PURE__ */ notImplemented(\"fs.chmodSync\");\nexport const closeSync = /* @__PURE__ */ notImplemented(\"fs.closeSync\");\nexport const copyFileSync = /* @__PURE__ */ notImplemented(\"fs.copyFileSync\");\nexport const cpSync = /* @__PURE__ */ notImplemented(\"fs.cpSync\");\nexport const existsSync = () => false;\nexport const fchownSync = /* @__PURE__ */ notImplemented(\"fs.fchownSync\");\nexport const fchmodSync = /* @__PURE__ */ notImplemented(\"fs.fchmodSync\");\nexport const fdatasyncSync = /* @__PURE__ */ notImplemented(\"fs.fdatasyncSync\");\nexport const fstatSync = /* @__PURE__ */ notImplemented(\"fs.fstatSync\");\nexport const fsyncSync = /* @__PURE__ */ notImplemented(\"fs.fsyncSync\");\nexport const ftruncateSync = /* @__PURE__ */ notImplemented(\"fs.ftruncateSync\");\nexport const futimesSync = /* @__PURE__ */ notImplemented(\"fs.futimesSync\");\nexport const lchownSync = /* @__PURE__ */ notImplemented(\"fs.lchownSync\");\nexport const lchmodSync = /* @__PURE__ */ notImplemented(\"fs.lchmodSync\");\nexport const linkSync = /* @__PURE__ */ notImplemented(\"fs.linkSync\");\nexport const lutimesSync = /* @__PURE__ */ notImplemented(\"fs.lutimesSync\");\nexport const mkdirSync = /* @__PURE__ */ notImplemented(\"fs.mkdirSync\");\nexport const mkdtempSync = /* @__PURE__ */ notImplemented(\"fs.mkdtempSync\");\nexport const openSync = /* @__PURE__ */ notImplemented(\"fs.openSync\");\nexport const opendirSync = /* @__PURE__ */ notImplemented(\"fs.opendirSync\");\nexport const readdirSync = /* @__PURE__ */ notImplemented(\"fs.readdirSync\");\nexport const readSync = /* @__PURE__ */ notImplemented(\"fs.readSync\");\nexport const readvSync = /* @__PURE__ */ notImplemented(\"fs.readvSync\");\nexport const readFileSync = /* @__PURE__ */ notImplemented(\"fs.readFileSync\");\nexport const readlinkSync = /* @__PURE__ */ notImplemented(\"fs.readlinkSync\");\nexport const renameSync = /* @__PURE__ */ notImplemented(\"fs.renameSync\");\nexport const rmSync = /* @__PURE__ */ notImplemented(\"fs.rmSync\");\nexport const rmdirSync = /* @__PURE__ */ notImplemented(\"fs.rmdirSync\");\nexport const symlinkSync = /* @__PURE__ */ notImplemented(\"fs.symlinkSync\");\nexport const truncateSync = /* @__PURE__ */ notImplemented(\"fs.truncateSync\");\nexport const unlinkSync = /* @__PURE__ */ notImplemented(\"fs.unlinkSync\");\nexport const utimesSync = /* @__PURE__ */ notImplemented(\"fs.utimesSync\");\nexport const writeFileSync = /* @__PURE__ */ notImplemented(\"fs.writeFileSync\");\nexport const writeSync = /* @__PURE__ */ notImplemented(\"fs.writeSync\");\nexport const writevSync = /* @__PURE__ */ notImplemented(\"fs.writevSync\");\nexport const statfsSync = /* @__PURE__ */ notImplemented(\"fs.statfsSync\");\nexport const globSync = /* @__PURE__ */ notImplemented(\"fs.globSync\");\n", "import promises from \"node:fs/promises\";\nimport { Dir, Dirent, FileReadStream, FileWriteStream, ReadStream, Stats, WriteStream } from \"./internal/fs/classes.mjs\";\nimport { _toUnixTimestamp, access, accessSync, appendFile, appendFileSync, chmod, chmodSync, chown, chownSync, close, closeSync, copyFile, copyFileSync, cp, cpSync, createReadStream, createWriteStream, exists, existsSync, fchmod, fchmodSync, fchown, fchownSync, fdatasync, fdatasyncSync, fstat, fstatSync, fsync, fsyncSync, ftruncate, ftruncateSync, futimes, futimesSync, glob, lchmod, globSync, lchmodSync, lchown, lchownSync, link, linkSync, lstat, lstatSync, lutimes, lutimesSync, mkdir, mkdirSync, mkdtemp, mkdtempSync, open, openAsBlob, openSync, opendir, opendirSync, read, readFile, readFileSync, readSync, readdir, readdirSync, readlink, readlinkSync, readv, readvSync, realpath, realpathSync, rename, renameSync, rm, rmSync, rmdir, rmdirSync, stat, statSync, statfs, statfsSync, symlink, symlinkSync, truncate, truncateSync, unlink, unlinkSync, unwatchFile, utimes, utimesSync, watch, watchFile, write, writeFile, writeFileSync, writeSync, writev, writevSync } from \"./internal/fs/fs.mjs\";\nimport * as constants from \"./internal/fs/constants.mjs\";\nimport { F_OK, R_OK, W_OK, X_OK } from \"./internal/fs/constants.mjs\";\nexport { F_OK, R_OK, W_OK, X_OK } from \"./internal/fs/constants.mjs\";\nexport { promises, constants };\nexport * from \"./internal/fs/fs.mjs\";\nexport * from \"./internal/fs/classes.mjs\";\nexport default {\n\tF_OK,\n\tR_OK,\n\tW_OK,\n\tX_OK,\n\tconstants,\n\tpromises,\n\tDir,\n\tDirent,\n\tFileReadStream,\n\tFileWriteStream,\n\tReadStream,\n\tStats,\n\tWriteStream,\n\t_toUnixTimestamp,\n\taccess,\n\taccessSync,\n\tappendFile,\n\tappendFileSync,\n\tchmod,\n\tchmodSync,\n\tchown,\n\tchownSync,\n\tclose,\n\tcloseSync,\n\tcopyFile,\n\tcopyFileSync,\n\tcp,\n\tcpSync,\n\tcreateReadStream,\n\tcreateWriteStream,\n\texists,\n\texistsSync,\n\tfchmod,\n\tfchmodSync,\n\tfchown,\n\tfchownSync,\n\tfdatasync,\n\tfdatasyncSync,\n\tfstat,\n\tfstatSync,\n\tfsync,\n\tfsyncSync,\n\tftruncate,\n\tftruncateSync,\n\tfutimes,\n\tfutimesSync,\n\tglob,\n\tlchmod,\n\tglobSync,\n\tlchmodSync,\n\tlchown,\n\tlchownSync,\n\tlink,\n\tlinkSync,\n\tlstat,\n\tlstatSync,\n\tlutimes,\n\tlutimesSync,\n\tmkdir,\n\tmkdirSync,\n\tmkdtemp,\n\tmkdtempSync,\n\topen,\n\topenAsBlob,\n\topenSync,\n\topendir,\n\topendirSync,\n\tread,\n\treadFile,\n\treadFileSync,\n\treadSync,\n\treaddir,\n\treaddirSync,\n\treadlink,\n\treadlinkSync,\n\treadv,\n\treadvSync,\n\trealpath,\n\trealpathSync,\n\trename,\n\trenameSync,\n\trm,\n\trmSync,\n\trmdir,\n\trmdirSync,\n\tstat,\n\tstatSync,\n\tstatfs,\n\tstatfsSync,\n\tsymlink,\n\tsymlinkSync,\n\ttruncate,\n\ttruncateSync,\n\tunlink,\n\tunlinkSync,\n\tunwatchFile,\n\tutimes,\n\tutimesSync,\n\twatch,\n\twatchFile,\n\twrite,\n\twriteFile,\n\twriteFileSync,\n\twriteSync,\n\twritev,\n\twritevSync\n};\n", "import libDefault from 'fs';\nmodule.exports = libDefault;", "import libDefault from 'path';\nmodule.exports = libDefault;", "import libDefault from 'url';\nmodule.exports = libDefault;", "/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]';\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Used by `_.defaults` to customize its `_.assignIn` use.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\nfunction assignInDefaults(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n object[key] = value;\n }\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = array;\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n assignValue(object, key, newValue === undefined ? source[key] : newValue);\n }\n return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n});\n\n/**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar defaults = baseRest(function(args) {\n args.push(undefined, assignInDefaults);\n return apply(assignInWith, undefined, args);\n});\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = defaults;\n", "/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\nmodule.exports = isArguments;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isArguments = exports.defaults = exports.noop = void 0;\nconst defaults = require(\"lodash.defaults\");\nexports.defaults = defaults;\nconst isArguments = require(\"lodash.isarguments\");\nexports.isArguments = isArguments;\nfunction noop() { }\nexports.noop = noop;\n", "/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n", "\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n", "/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.genRedactedString = exports.getStringValue = exports.MAX_ARGUMENT_LENGTH = void 0;\nconst debug_1 = require(\"debug\");\nconst MAX_ARGUMENT_LENGTH = 200;\nexports.MAX_ARGUMENT_LENGTH = MAX_ARGUMENT_LENGTH;\nconst NAMESPACE_PREFIX = \"ioredis\";\n/**\n * helper function that tried to get a string value for\n * arbitrary \"debug\" arg\n */\nfunction getStringValue(v) {\n if (v === null) {\n return;\n }\n switch (typeof v) {\n case \"boolean\":\n return;\n case \"number\":\n return;\n case \"object\":\n if (Buffer.isBuffer(v)) {\n return v.toString(\"hex\");\n }\n if (Array.isArray(v)) {\n return v.join(\",\");\n }\n try {\n return JSON.stringify(v);\n }\n catch (e) {\n return;\n }\n case \"string\":\n return v;\n }\n}\nexports.getStringValue = getStringValue;\n/**\n * helper function that redacts a string representation of a \"debug\" arg\n */\nfunction genRedactedString(str, maxLen) {\n const { length } = str;\n return length <= maxLen\n ? str\n : str.slice(0, maxLen) + ' ... ';\n}\nexports.genRedactedString = genRedactedString;\n/**\n * a wrapper for the `debug` module, used to generate\n * \"debug functions\" that trim the values in their output\n */\nfunction genDebugFunction(namespace) {\n const fn = (0, debug_1.default)(`${NAMESPACE_PREFIX}:${namespace}`);\n function wrappedDebug(...args) {\n if (!fn.enabled) {\n return; // no-op\n }\n // we skip the first arg because that is the message\n for (let i = 1; i < args.length; i++) {\n const str = getStringValue(args[i]);\n if (typeof str === \"string\" && str.length > MAX_ARGUMENT_LENGTH) {\n args[i] = genRedactedString(str, MAX_ARGUMENT_LENGTH);\n }\n }\n return fn.apply(null, args);\n }\n Object.defineProperties(wrappedDebug, {\n namespace: {\n get() {\n return fn.namespace;\n },\n },\n enabled: {\n get() {\n return fn.enabled;\n },\n },\n destroy: {\n get() {\n return fn.destroy;\n },\n },\n log: {\n get() {\n return fn.log;\n },\n set(l) {\n fn.log = l;\n },\n },\n });\n return wrappedDebug;\n}\nexports.default = genDebugFunction;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * TLS settings for Redis Cloud. Updated on 2022-08-19.\n */\nconst RedisCloudCA = `-----BEGIN CERTIFICATE-----\nMIIDTzCCAjegAwIBAgIJAKSVpiDswLcwMA0GCSqGSIb3DQEBBQUAMD4xFjAUBgNV\nBAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1\ndGhvcml0eTAeFw0xMzEwMDExMjE0NTVaFw0yMzA5MjkxMjE0NTVaMD4xFjAUBgNV\nBAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1\ndGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALZqkh/DczWP\nJnxnHLQ7QL0T4B4CDKWBKCcisriGbA6ZePWVNo4h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WqQPabumDk3F2xmmFghcCAwEAAaNCMEAw\nDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o\nLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU\nRUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp\njjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK\n6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX\nmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs\nMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH\nWD9f\n-----END CERTIFICATE-----`;\nconst TLSProfiles = {\n RedisCloudFixed: { ca: RedisCloudCA },\n RedisCloudFlexible: { ca: RedisCloudCA },\n};\nexports.default = TLSProfiles;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.noop = exports.defaults = exports.Debug = exports.getPackageMeta = exports.zipMap = exports.CONNECTION_CLOSED_ERROR_MSG = exports.shuffle = exports.sample = exports.resolveTLSProfile = exports.parseURL = exports.optimizeErrorStack = exports.toArg = exports.convertMapToArray = exports.convertObjectToArray = exports.timeout = exports.packObject = exports.isInt = exports.wrapMultiResult = exports.convertBufferToString = void 0;\nconst fs_1 = require(\"fs\");\nconst path_1 = require(\"path\");\nconst url_1 = require(\"url\");\nconst lodash_1 = require(\"./lodash\");\nObject.defineProperty(exports, \"defaults\", { enumerable: true, get: function () { return lodash_1.defaults; } });\nObject.defineProperty(exports, \"noop\", { enumerable: true, get: function () { return lodash_1.noop; } });\nconst debug_1 = require(\"./debug\");\nexports.Debug = debug_1.default;\nconst TLSProfiles_1 = require(\"../constants/TLSProfiles\");\n/**\n * Convert a buffer to string, supports buffer array\n *\n * @example\n * ```js\n * const input = [Buffer.from('foo'), [Buffer.from('bar')]]\n * const res = convertBufferToString(input, 'utf8')\n * expect(res).to.eql(['foo', ['bar']])\n * ```\n */\nfunction convertBufferToString(value, encoding) {\n if (value instanceof Buffer) {\n return value.toString(encoding);\n }\n if (Array.isArray(value)) {\n const length = value.length;\n const res = Array(length);\n for (let i = 0; i < length; ++i) {\n res[i] =\n value[i] instanceof Buffer && encoding === \"utf8\"\n ? value[i].toString()\n : convertBufferToString(value[i], encoding);\n }\n return res;\n }\n return value;\n}\nexports.convertBufferToString = convertBufferToString;\n/**\n * Convert a list of results to node-style\n *\n * @example\n * ```js\n * const input = ['a', 'b', new Error('c'), 'd']\n * const output = exports.wrapMultiResult(input)\n * expect(output).to.eql([[null, 'a'], [null, 'b'], [new Error('c')], [null, 'd'])\n * ```\n */\nfunction wrapMultiResult(arr) {\n // When using WATCH/EXEC transactions, the EXEC will return\n // a null instead of an array\n if (!arr) {\n return null;\n }\n const result = [];\n const length = arr.length;\n for (let i = 0; i < length; ++i) {\n const item = arr[i];\n if (item instanceof Error) {\n result.push([item]);\n }\n else {\n result.push([null, item]);\n }\n }\n return result;\n}\nexports.wrapMultiResult = wrapMultiResult;\n/**\n * Detect if the argument is a int\n * @example\n * ```js\n * > isInt('123')\n * true\n * > isInt('123.3')\n * false\n * > isInt('1x')\n * false\n * > isInt(123)\n * true\n * > isInt(true)\n * false\n * ```\n */\nfunction isInt(value) {\n const x = parseFloat(value);\n return !isNaN(value) && (x | 0) === x;\n}\nexports.isInt = isInt;\n/**\n * Pack an array to an Object\n *\n * @example\n * ```js\n * > packObject(['a', 'b', 'c', 'd'])\n * { a: 'b', c: 'd' }\n * ```\n */\nfunction packObject(array) {\n const result = {};\n const length = array.length;\n for (let i = 1; i < length; i += 2) {\n result[array[i - 1]] = array[i];\n }\n return result;\n}\nexports.packObject = packObject;\n/**\n * Return a callback with timeout\n */\nfunction timeout(callback, timeout) {\n let timer = null;\n const run = function () {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n callback.apply(this, arguments);\n }\n };\n timer = setTimeout(run, timeout, new Error(\"timeout\"));\n return run;\n}\nexports.timeout = timeout;\n/**\n * Convert an object to an array\n * @example\n * ```js\n * > convertObjectToArray({ a: '1' })\n * ['a', '1']\n * ```\n */\nfunction convertObjectToArray(obj) {\n const result = [];\n const keys = Object.keys(obj); // Object.entries requires node 7+\n for (let i = 0, l = keys.length; i < l; i++) {\n result.push(keys[i], obj[keys[i]]);\n }\n return result;\n}\nexports.convertObjectToArray = convertObjectToArray;\n/**\n * Convert a map to an array\n * @example\n * ```js\n * > convertMapToArray(new Map([[1, '2']]))\n * [1, '2']\n * ```\n */\nfunction convertMapToArray(map) {\n const result = [];\n let pos = 0;\n map.forEach(function (value, key) {\n result[pos] = key;\n result[pos + 1] = value;\n pos += 2;\n });\n return result;\n}\nexports.convertMapToArray = convertMapToArray;\n/**\n * Convert a non-string arg to a string\n */\nfunction toArg(arg) {\n if (arg === null || typeof arg === \"undefined\") {\n return \"\";\n }\n return String(arg);\n}\nexports.toArg = toArg;\n/**\n * Optimize error stack\n *\n * @param error actually error\n * @param friendlyStack the stack that more meaningful\n * @param filterPath only show stacks with the specified path\n */\nfunction optimizeErrorStack(error, friendlyStack, filterPath) {\n const stacks = friendlyStack.split(\"\\n\");\n let lines = \"\";\n let i;\n for (i = 1; i < stacks.length; ++i) {\n if (stacks[i].indexOf(filterPath) === -1) {\n break;\n }\n }\n for (let j = i; j < stacks.length; ++j) {\n lines += \"\\n\" + stacks[j];\n }\n if (error.stack) {\n const pos = error.stack.indexOf(\"\\n\");\n error.stack = error.stack.slice(0, pos) + lines;\n }\n return error;\n}\nexports.optimizeErrorStack = optimizeErrorStack;\n/**\n * Parse the redis protocol url\n */\nfunction parseURL(url) {\n if (isInt(url)) {\n return { port: url };\n }\n let parsed = (0, url_1.parse)(url, true, true);\n if (!parsed.slashes && url[0] !== \"/\") {\n url = \"//\" + url;\n parsed = (0, url_1.parse)(url, true, true);\n }\n const options = parsed.query || {};\n const result = {};\n if (parsed.auth) {\n const index = parsed.auth.indexOf(\":\");\n result.username = index === -1 ? parsed.auth : parsed.auth.slice(0, index);\n result.password = index === -1 ? \"\" : parsed.auth.slice(index + 1);\n }\n if (parsed.pathname) {\n if (parsed.protocol === \"redis:\" || parsed.protocol === \"rediss:\") {\n if (parsed.pathname.length > 1) {\n result.db = parsed.pathname.slice(1);\n }\n }\n else {\n result.path = parsed.pathname;\n }\n }\n if (parsed.host) {\n result.host = parsed.hostname;\n }\n if (parsed.port) {\n result.port = parsed.port;\n }\n if (typeof options.family === \"string\") {\n const intFamily = Number.parseInt(options.family, 10);\n if (!Number.isNaN(intFamily)) {\n result.family = intFamily;\n }\n }\n (0, lodash_1.defaults)(result, options);\n return result;\n}\nexports.parseURL = parseURL;\n/**\n * Resolve TLS profile shortcut in connection options\n */\nfunction resolveTLSProfile(options) {\n let tls = options === null || options === void 0 ? void 0 : options.tls;\n if (typeof tls === \"string\")\n tls = { profile: tls };\n const profile = TLSProfiles_1.default[tls === null || tls === void 0 ? void 0 : tls.profile];\n if (profile) {\n tls = Object.assign({}, profile, tls);\n delete tls.profile;\n options = Object.assign({}, options, { tls });\n }\n return options;\n}\nexports.resolveTLSProfile = resolveTLSProfile;\n/**\n * Get a random element from `array`\n */\nfunction sample(array, from = 0) {\n const length = array.length;\n if (from >= length) {\n return null;\n }\n return array[from + Math.floor(Math.random() * (length - from))];\n}\nexports.sample = sample;\n/**\n * Shuffle the array using the Fisher-Yates Shuffle.\n * This method will mutate the original array.\n */\nfunction shuffle(array) {\n let counter = array.length;\n // While there are elements in the array\n while (counter > 0) {\n // Pick a random index\n const index = Math.floor(Math.random() * counter);\n // Decrease counter by 1\n counter--;\n // And swap the last element with it\n [array[counter], array[index]] = [array[index], array[counter]];\n }\n return array;\n}\nexports.shuffle = shuffle;\n/**\n * Error message for connection being disconnected\n */\nexports.CONNECTION_CLOSED_ERROR_MSG = \"Connection is closed.\";\nfunction zipMap(keys, values) {\n const map = new Map();\n keys.forEach((key, index) => {\n map.set(key, values[index]);\n });\n return map;\n}\nexports.zipMap = zipMap;\n/**\n * Memoized package metadata to avoid repeated file system reads.\n *\n * @internal\n */\nlet cachedPackageMeta = null;\n/**\n * Retrieves cached package metadata from package.json.\n *\n * @internal\n * @returns {Promise<{version: string} | null>} Package metadata or null if unavailable\n */\nasync function getPackageMeta() {\n if (cachedPackageMeta) {\n return cachedPackageMeta;\n }\n try {\n const filePath = (0, path_1.resolve)(__dirname, \"..\", \"..\", \"package.json\");\n const data = await fs_1.promises.readFile(filePath, \"utf8\");\n const parsed = JSON.parse(data);\n cachedPackageMeta = {\n version: parsed.version,\n };\n return cachedPackageMeta;\n }\n catch (err) {\n cachedPackageMeta = {\n version: \"error-fetching-version\",\n };\n return cachedPackageMeta;\n }\n}\nexports.getPackageMeta = getPackageMeta;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseBlockOption = exports.parseSecondsArgument = void 0;\n/**\n * Parses a command parameter to a number.\n * @param arg - The command parameter to parse (number, string, or Buffer)\n * @returns The parsed number, or undefined if parsing fails or arg is undefined\n */\nconst parseNumberArgument = (arg) => {\n if (typeof arg === \"number\") {\n return arg;\n }\n if (Buffer.isBuffer(arg)) {\n return parseNumberArgument(arg.toString());\n }\n if (typeof arg === \"string\") {\n const value = Number(arg);\n return Number.isFinite(value) ? value : undefined;\n }\n return undefined;\n};\n/**\n * Parses a command parameter to a string.\n * @param arg - The command parameter to parse (string or Buffer)\n * @returns The parsed string, or undefined if arg is not a string/Buffer or is undefined\n */\nconst parseStringArgument = (arg) => {\n if (typeof arg === \"string\") {\n return arg;\n }\n if (Buffer.isBuffer(arg)) {\n return arg.toString();\n }\n return undefined;\n};\n/**\n * Parses a command parameter as seconds and converts to milliseconds.\n * @param arg - The command parameter representing seconds\n * @returns The value in milliseconds, 0 if value is <= 0, or undefined if parsing fails\n */\nconst parseSecondsArgument = (arg) => {\n const value = parseNumberArgument(arg);\n if (value === undefined) {\n return undefined;\n }\n if (value <= 0) {\n return 0;\n }\n return value * 1000;\n};\nexports.parseSecondsArgument = parseSecondsArgument;\n/**\n * Parses the BLOCK option from Redis command arguments (e.g., XREAD, XREADGROUP).\n * @param args - Array of command parameters to search for the BLOCK option\n * @returns The block duration in milliseconds, 0 if duration is <= 0,\n * null if BLOCK option is not found, or undefined if BLOCK is found but duration is invalid\n */\nconst parseBlockOption = (args) => {\n for (let i = 0; i < args.length; i++) {\n const token = parseStringArgument(args[i]);\n if (token && token.toLowerCase() === \"block\") {\n const duration = parseNumberArgument(args[i + 1]);\n if (duration === undefined) {\n return undefined;\n }\n if (duration <= 0) {\n return 0;\n }\n return duration;\n }\n }\n return null;\n};\nexports.parseBlockOption = parseBlockOption;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst commands_1 = require(\"@ioredis/commands\");\nconst calculateSlot = require(\"cluster-key-slot\");\nconst standard_as_callback_1 = require(\"standard-as-callback\");\nconst utils_1 = require(\"./utils\");\nconst argumentParsers_1 = require(\"./utils/argumentParsers\");\n/**\n * Command instance\n *\n * It's rare that you need to create a Command instance yourself.\n *\n * ```js\n * var infoCommand = new Command('info', null, function (err, result) {\n * console.log('result', result);\n * });\n *\n * redis.sendCommand(infoCommand);\n *\n * // When no callback provided, Command instance will have a `promise` property,\n * // which will resolve/reject with the result of the command.\n * var getCommand = new Command('get', ['foo']);\n * getCommand.promise.then(function (result) {\n * console.log('result', result);\n * });\n * ```\n */\nclass Command {\n /**\n * Creates an instance of Command.\n * @param name Command name\n * @param args An array of command arguments\n * @param options\n * @param callback The callback that handles the response.\n * If omit, the response will be handled via Promise\n */\n constructor(name, args = [], options = {}, callback) {\n this.name = name;\n this.inTransaction = false;\n this.isResolved = false;\n this.transformed = false;\n this.replyEncoding = options.replyEncoding;\n this.errorStack = options.errorStack;\n this.args = args.flat();\n this.callback = callback;\n this.initPromise();\n if (options.keyPrefix) {\n // @ts-expect-error\n const isBufferKeyPrefix = options.keyPrefix instanceof Buffer;\n // @ts-expect-error\n let keyPrefixBuffer = isBufferKeyPrefix\n ? options.keyPrefix\n : null;\n this._iterateKeys((key) => {\n if (key instanceof Buffer) {\n if (keyPrefixBuffer === null) {\n keyPrefixBuffer = Buffer.from(options.keyPrefix);\n }\n return Buffer.concat([keyPrefixBuffer, key]);\n }\n else if (isBufferKeyPrefix) {\n // @ts-expect-error\n return Buffer.concat([options.keyPrefix, Buffer.from(String(key))]);\n }\n return options.keyPrefix + key;\n });\n }\n if (options.readOnly) {\n this.isReadOnly = true;\n }\n }\n /**\n * Check whether the command has the flag\n */\n static checkFlag(flagName, commandName) {\n commandName = commandName.toLowerCase();\n return !!this.getFlagMap()[flagName][commandName];\n }\n static setArgumentTransformer(name, func) {\n this._transformer.argument[name] = func;\n }\n static setReplyTransformer(name, func) {\n this._transformer.reply[name] = func;\n }\n static getFlagMap() {\n if (!this.flagMap) {\n this.flagMap = Object.keys(Command.FLAGS).reduce((map, flagName) => {\n map[flagName] = {};\n Command.FLAGS[flagName].forEach((commandName) => {\n map[flagName][commandName] = true;\n });\n return map;\n }, {});\n }\n return this.flagMap;\n }\n getSlot() {\n if (typeof this.slot === \"undefined\") {\n const key = this.getKeys()[0];\n this.slot = key == null ? null : calculateSlot(key);\n }\n return this.slot;\n }\n getKeys() {\n return this._iterateKeys();\n }\n /**\n * Convert command to writable buffer or string\n */\n toWritable(_socket) {\n let result;\n const commandStr = \"*\" +\n (this.args.length + 1) +\n \"\\r\\n$\" +\n Buffer.byteLength(this.name) +\n \"\\r\\n\" +\n this.name +\n \"\\r\\n\";\n if (this.bufferMode) {\n const buffers = new MixedBuffers();\n buffers.push(commandStr);\n for (let i = 0; i < this.args.length; ++i) {\n const arg = this.args[i];\n if (arg instanceof Buffer) {\n if (arg.length === 0) {\n buffers.push(\"$0\\r\\n\\r\\n\");\n }\n else {\n buffers.push(\"$\" + arg.length + \"\\r\\n\");\n buffers.push(arg);\n buffers.push(\"\\r\\n\");\n }\n }\n else {\n buffers.push(\"$\" +\n Buffer.byteLength(arg) +\n \"\\r\\n\" +\n arg +\n \"\\r\\n\");\n }\n }\n result = buffers.toBuffer();\n }\n else {\n result = commandStr;\n for (let i = 0; i < this.args.length; ++i) {\n const arg = this.args[i];\n result +=\n \"$\" +\n Buffer.byteLength(arg) +\n \"\\r\\n\" +\n arg +\n \"\\r\\n\";\n }\n }\n return result;\n }\n stringifyArguments() {\n for (let i = 0; i < this.args.length; ++i) {\n const arg = this.args[i];\n if (typeof arg === \"string\") {\n // buffers and strings don't need any transformation\n }\n else if (arg instanceof Buffer) {\n this.bufferMode = true;\n }\n else {\n this.args[i] = (0, utils_1.toArg)(arg);\n }\n }\n }\n /**\n * Convert buffer/buffer[] to string/string[],\n * and apply reply transformer.\n */\n transformReply(result) {\n if (this.replyEncoding) {\n result = (0, utils_1.convertBufferToString)(result, this.replyEncoding);\n }\n const transformer = Command._transformer.reply[this.name];\n if (transformer) {\n result = transformer(result);\n }\n return result;\n }\n /**\n * Set the wait time before terminating the attempt to execute a command\n * and generating an error.\n */\n setTimeout(ms) {\n if (!this._commandTimeoutTimer) {\n this._commandTimeoutTimer = setTimeout(() => {\n if (!this.isResolved) {\n this.reject(new Error(\"Command timed out\"));\n }\n }, ms);\n }\n }\n /**\n * Set a timeout for blocking commands.\n * When the timeout expires, the command resolves with null (matching Redis behavior).\n * This handles the case of undetectable network failures (e.g., docker network disconnect)\n * where the TCP connection becomes a zombie and no close event fires.\n */\n setBlockingTimeout(ms) {\n if (ms <= 0) {\n return;\n }\n // Clear existing timer if any (can happen when command moves from offline to command queue)\n if (this._blockingTimeoutTimer) {\n clearTimeout(this._blockingTimeoutTimer);\n this._blockingTimeoutTimer = undefined;\n }\n const now = Date.now();\n // First call: establish absolute deadline\n if (this._blockingDeadline === undefined) {\n this._blockingDeadline = now + ms;\n }\n // Check if we've already exceeded the deadline\n const remaining = this._blockingDeadline - now;\n if (remaining <= 0) {\n // Resolve with null to indicate timeout (same as Redis behavior)\n this.resolve(null);\n return;\n }\n this._blockingTimeoutTimer = setTimeout(() => {\n if (this.isResolved) {\n this._blockingTimeoutTimer = undefined;\n return;\n }\n this._blockingTimeoutTimer = undefined;\n // Timeout expired - resolve with null (same as Redis behavior when blocking command times out)\n this.resolve(null);\n }, remaining);\n }\n /**\n * Extract the blocking timeout from the command arguments.\n *\n * @returns The timeout in seconds, null for indefinite blocking (timeout of 0),\n * or undefined if this is not a blocking command\n */\n extractBlockingTimeout() {\n const args = this.args;\n if (!args || args.length === 0) {\n return undefined;\n }\n const name = this.name.toLowerCase();\n if (Command.checkFlag(\"LAST_ARG_TIMEOUT_COMMANDS\", name)) {\n return (0, argumentParsers_1.parseSecondsArgument)(args[args.length - 1]);\n }\n if (Command.checkFlag(\"FIRST_ARG_TIMEOUT_COMMANDS\", name)) {\n return (0, argumentParsers_1.parseSecondsArgument)(args[0]);\n }\n if (Command.checkFlag(\"BLOCK_OPTION_COMMANDS\", name)) {\n return (0, argumentParsers_1.parseBlockOption)(args);\n }\n return undefined;\n }\n /**\n * Clear the command and blocking timers\n */\n _clearTimers() {\n const existingTimer = this._commandTimeoutTimer;\n if (existingTimer) {\n clearTimeout(existingTimer);\n delete this._commandTimeoutTimer;\n }\n const blockingTimer = this._blockingTimeoutTimer;\n if (blockingTimer) {\n clearTimeout(blockingTimer);\n delete this._blockingTimeoutTimer;\n }\n }\n initPromise() {\n const promise = new Promise((resolve, reject) => {\n if (!this.transformed) {\n this.transformed = true;\n const transformer = Command._transformer.argument[this.name];\n if (transformer) {\n this.args = transformer(this.args);\n }\n this.stringifyArguments();\n }\n this.resolve = this._convertValue(resolve);\n this.reject = (err) => {\n this._clearTimers();\n if (this.errorStack) {\n reject((0, utils_1.optimizeErrorStack)(err, this.errorStack.stack, __dirname));\n }\n else {\n reject(err);\n }\n };\n });\n this.promise = (0, standard_as_callback_1.default)(promise, this.callback);\n }\n /**\n * Iterate through the command arguments that are considered keys.\n */\n _iterateKeys(transform = (key) => key) {\n if (typeof this.keys === \"undefined\") {\n this.keys = [];\n if ((0, commands_1.exists)(this.name, { caseInsensitive: true })) {\n // @ts-expect-error\n const keyIndexes = (0, commands_1.getKeyIndexes)(this.name, this.args, {\n nameCaseInsensitive: true,\n });\n for (const index of keyIndexes) {\n this.args[index] = transform(this.args[index]);\n this.keys.push(this.args[index]);\n }\n }\n }\n return this.keys;\n }\n /**\n * Convert the value from buffer to the target encoding.\n */\n _convertValue(resolve) {\n return (value) => {\n try {\n this._clearTimers();\n resolve(this.transformReply(value));\n this.isResolved = true;\n }\n catch (err) {\n this.reject(err);\n }\n return this.promise;\n };\n }\n}\nexports.default = Command;\nCommand.FLAGS = {\n VALID_IN_SUBSCRIBER_MODE: [\n \"subscribe\",\n \"psubscribe\",\n \"unsubscribe\",\n \"punsubscribe\",\n \"ssubscribe\",\n \"sunsubscribe\",\n \"ping\",\n \"quit\",\n ],\n VALID_IN_MONITOR_MODE: [\"monitor\", \"auth\"],\n ENTER_SUBSCRIBER_MODE: [\"subscribe\", \"psubscribe\", \"ssubscribe\"],\n EXIT_SUBSCRIBER_MODE: [\"unsubscribe\", \"punsubscribe\", \"sunsubscribe\"],\n WILL_DISCONNECT: [\"quit\"],\n HANDSHAKE_COMMANDS: [\"auth\", \"select\", \"client\", \"readonly\", \"info\"],\n IGNORE_RECONNECT_ON_ERROR: [\"client\"],\n BLOCKING_COMMANDS: [\n \"blpop\",\n \"brpop\",\n \"brpoplpush\",\n \"blmove\",\n \"bzpopmin\",\n \"bzpopmax\",\n \"bzmpop\",\n \"blmpop\",\n \"xread\",\n \"xreadgroup\",\n ],\n LAST_ARG_TIMEOUT_COMMANDS: [\n \"blpop\",\n \"brpop\",\n \"brpoplpush\",\n \"blmove\",\n \"bzpopmin\",\n \"bzpopmax\",\n ],\n FIRST_ARG_TIMEOUT_COMMANDS: [\"bzmpop\", \"blmpop\"],\n BLOCK_OPTION_COMMANDS: [\"xread\", \"xreadgroup\"],\n};\nCommand._transformer = {\n argument: {},\n reply: {},\n};\nconst msetArgumentTransformer = function (args) {\n if (args.length === 1) {\n if (args[0] instanceof Map) {\n return (0, utils_1.convertMapToArray)(args[0]);\n }\n if (typeof args[0] === \"object\" && args[0] !== null) {\n return (0, utils_1.convertObjectToArray)(args[0]);\n }\n }\n return args;\n};\nconst hsetArgumentTransformer = function (args) {\n if (args.length === 2) {\n if (args[1] instanceof Map) {\n return [args[0]].concat((0, utils_1.convertMapToArray)(args[1]));\n }\n if (typeof args[1] === \"object\" && args[1] !== null) {\n return [args[0]].concat((0, utils_1.convertObjectToArray)(args[1]));\n }\n }\n return args;\n};\nCommand.setArgumentTransformer(\"mset\", msetArgumentTransformer);\nCommand.setArgumentTransformer(\"msetnx\", msetArgumentTransformer);\nCommand.setArgumentTransformer(\"hset\", hsetArgumentTransformer);\nCommand.setArgumentTransformer(\"hmset\", hsetArgumentTransformer);\nCommand.setReplyTransformer(\"hgetall\", function (result) {\n if (Array.isArray(result)) {\n const obj = {};\n for (let i = 0; i < result.length; i += 2) {\n const key = result[i];\n const value = result[i + 1];\n if (key in obj) {\n // can only be truthy if the property is special somehow, like '__proto__' or 'constructor'\n // https://github.com/luin/ioredis/issues/1267\n Object.defineProperty(obj, key, {\n value,\n configurable: true,\n enumerable: true,\n writable: true,\n });\n }\n else {\n obj[key] = value;\n }\n }\n return obj;\n }\n return result;\n});\nclass MixedBuffers {\n constructor() {\n this.length = 0;\n this.items = [];\n }\n push(x) {\n this.length += Buffer.byteLength(x);\n this.items.push(x);\n }\n toBuffer() {\n const result = Buffer.allocUnsafe(this.length);\n let offset = 0;\n for (const item of this.items) {\n const length = Buffer.byteLength(item);\n Buffer.isBuffer(item)\n ? item.copy(result, offset)\n : result.write(item, offset, length);\n offset += length;\n }\n return result;\n }\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst redis_errors_1 = require(\"redis-errors\");\nclass ClusterAllFailedError extends redis_errors_1.RedisError {\n constructor(message, lastNodeError) {\n super(message);\n this.lastNodeError = lastNodeError;\n Error.captureStackTrace(this, this.constructor);\n }\n get name() {\n return this.constructor.name;\n }\n}\nexports.default = ClusterAllFailedError;\nClusterAllFailedError.defaultMessage = \"Failed to refresh slots cache.\";\n", "import libDefault from 'stream';\nmodule.exports = libDefault;", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst stream_1 = require(\"stream\");\n/**\n * Convenient class to convert the process of scanning keys to a readable stream.\n */\nclass ScanStream extends stream_1.Readable {\n constructor(opt) {\n super(opt);\n this.opt = opt;\n this._redisCursor = \"0\";\n this._redisDrained = false;\n }\n _read() {\n if (this._redisDrained) {\n this.push(null);\n return;\n }\n const args = [this._redisCursor];\n if (this.opt.key) {\n args.unshift(this.opt.key);\n }\n if (this.opt.match) {\n args.push(\"MATCH\", this.opt.match);\n }\n if (this.opt.type) {\n args.push(\"TYPE\", this.opt.type);\n }\n if (this.opt.count) {\n args.push(\"COUNT\", String(this.opt.count));\n }\n if (this.opt.noValues) {\n args.push(\"NOVALUES\");\n }\n this.opt.redis[this.opt.command](args, (err, res) => {\n if (err) {\n this.emit(\"error\", err);\n return;\n }\n this._redisCursor = res[0] instanceof Buffer ? res[0].toString() : res[0];\n if (this._redisCursor === \"0\") {\n this._redisDrained = true;\n }\n this.push(res[1]);\n });\n }\n close() {\n this._redisDrained = true;\n }\n}\nexports.default = ScanStream;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.executeWithAutoPipelining = exports.getFirstValueInFlattenedArray = exports.shouldUseAutoPipelining = exports.notAllowedAutoPipelineCommands = exports.kCallbacks = exports.kExec = void 0;\nconst lodash_1 = require(\"./utils/lodash\");\nconst calculateSlot = require(\"cluster-key-slot\");\nconst standard_as_callback_1 = require(\"standard-as-callback\");\nconst commands_1 = require(\"@ioredis/commands\");\nexports.kExec = Symbol(\"exec\");\nexports.kCallbacks = Symbol(\"callbacks\");\nexports.notAllowedAutoPipelineCommands = [\n \"auth\",\n \"info\",\n \"script\",\n \"quit\",\n \"cluster\",\n \"pipeline\",\n \"multi\",\n \"subscribe\",\n \"psubscribe\",\n \"unsubscribe\",\n \"unpsubscribe\",\n \"select\",\n \"client\",\n];\nfunction executeAutoPipeline(client, slotKey) {\n /*\n If a pipeline is already executing, keep queueing up commands\n since ioredis won't serve two pipelines at the same time\n */\n if (client._runningAutoPipelines.has(slotKey)) {\n return;\n }\n if (!client._autoPipelines.has(slotKey)) {\n /*\n Rare edge case. Somehow, something has deleted this running autopipeline in an immediate\n call to executeAutoPipeline.\n \n Maybe the callback in the pipeline.exec is sometimes called in the same tick,\n e.g. if redis is disconnected?\n */\n return;\n }\n client._runningAutoPipelines.add(slotKey);\n // Get the pipeline and immediately delete it so that new commands are queued on a new pipeline\n const pipeline = client._autoPipelines.get(slotKey);\n client._autoPipelines.delete(slotKey);\n const callbacks = pipeline[exports.kCallbacks];\n // Stop keeping a reference to callbacks immediately after the callbacks stop being used.\n // This allows the GC to reclaim objects referenced by callbacks, especially with 16384 slots\n // in Redis.Cluster\n pipeline[exports.kCallbacks] = null;\n // Perform the call\n pipeline.exec(function (err, results) {\n client._runningAutoPipelines.delete(slotKey);\n /*\n Invoke all callback in nextTick so the stack is cleared\n and callbacks can throw errors without affecting other callbacks.\n */\n if (err) {\n for (let i = 0; i < callbacks.length; i++) {\n process.nextTick(callbacks[i], err);\n }\n }\n else {\n for (let i = 0; i < callbacks.length; i++) {\n process.nextTick(callbacks[i], ...results[i]);\n }\n }\n // If there is another pipeline on the same node, immediately execute it without waiting for nextTick\n if (client._autoPipelines.has(slotKey)) {\n executeAutoPipeline(client, slotKey);\n }\n });\n}\nfunction shouldUseAutoPipelining(client, functionName, commandName) {\n return (functionName &&\n client.options.enableAutoPipelining &&\n !client.isPipeline &&\n !exports.notAllowedAutoPipelineCommands.includes(commandName) &&\n !client.options.autoPipeliningIgnoredCommands.includes(commandName));\n}\nexports.shouldUseAutoPipelining = shouldUseAutoPipelining;\nfunction getFirstValueInFlattenedArray(args) {\n for (let i = 0; i < args.length; i++) {\n const arg = args[i];\n if (typeof arg === \"string\") {\n return arg;\n }\n else if (Array.isArray(arg) || (0, lodash_1.isArguments)(arg)) {\n if (arg.length === 0) {\n continue;\n }\n return arg[0];\n }\n const flattened = [arg].flat();\n if (flattened.length > 0) {\n return flattened[0];\n }\n }\n return undefined;\n}\nexports.getFirstValueInFlattenedArray = getFirstValueInFlattenedArray;\nfunction executeWithAutoPipelining(client, functionName, commandName, args, callback) {\n // On cluster mode let's wait for slots to be available\n if (client.isCluster && !client.slots.length) {\n if (client.status === \"wait\")\n client.connect().catch(lodash_1.noop);\n return (0, standard_as_callback_1.default)(new Promise(function (resolve, reject) {\n client.delayUntilReady((err) => {\n if (err) {\n reject(err);\n return;\n }\n executeWithAutoPipelining(client, functionName, commandName, args, null).then(resolve, reject);\n });\n }), callback);\n }\n // If we have slot information, we can improve routing by grouping slots served by the same subset of nodes\n // Note that the first value in args may be a (possibly empty) array.\n // ioredis will only flatten one level of the array, in the Command constructor.\n const prefix = client.options.keyPrefix || \"\";\n let slotKey = client.isCluster\n ? client.slots[calculateSlot(`${prefix}${getFirstValueInFlattenedArray(args)}`)].join(\",\")\n : \"main\";\n // When scaleReads is enabled, separate read and write commands into different pipelines\n // so they can be routed to replicas and masters respectively\n if (client.isCluster && client.options.scaleReads !== \"master\") {\n const isReadOnly = (0, commands_1.exists)(commandName) && (0, commands_1.hasFlag)(commandName, \"readonly\");\n slotKey += isReadOnly ? \":read\" : \":write\";\n }\n if (!client._autoPipelines.has(slotKey)) {\n const pipeline = client.pipeline();\n pipeline[exports.kExec] = false;\n pipeline[exports.kCallbacks] = [];\n client._autoPipelines.set(slotKey, pipeline);\n }\n const pipeline = client._autoPipelines.get(slotKey);\n /*\n Mark the pipeline as scheduled.\n The symbol will make sure that the pipeline is only scheduled once per tick.\n New commands are appended to an already scheduled pipeline.\n */\n if (!pipeline[exports.kExec]) {\n pipeline[exports.kExec] = true;\n /*\n Deferring with setImmediate so we have a chance to capture multiple\n commands that can be scheduled by I/O events already in the event loop queue.\n */\n setImmediate(executeAutoPipeline, client, slotKey);\n }\n // Create the promise which will execute the command in the pipeline.\n const autoPipelinePromise = new Promise(function (resolve, reject) {\n pipeline[exports.kCallbacks].push(function (err, value) {\n if (err) {\n reject(err);\n return;\n }\n resolve(value);\n });\n if (functionName === \"call\") {\n args.unshift(commandName);\n }\n pipeline[functionName](...args);\n });\n return (0, standard_as_callback_1.default)(autoPipelinePromise, callback);\n}\nexports.executeWithAutoPipelining = executeWithAutoPipelining;\n", "import libDefault from 'crypto';\nmodule.exports = libDefault;", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst crypto_1 = require(\"crypto\");\nconst Command_1 = require(\"./Command\");\nconst standard_as_callback_1 = require(\"standard-as-callback\");\nclass Script {\n constructor(lua, numberOfKeys = null, keyPrefix = \"\", readOnly = false) {\n this.lua = lua;\n this.numberOfKeys = numberOfKeys;\n this.keyPrefix = keyPrefix;\n this.readOnly = readOnly;\n this.sha = (0, crypto_1.createHash)(\"sha1\").update(lua).digest(\"hex\");\n const sha = this.sha;\n const socketHasScriptLoaded = new WeakSet();\n this.Command = class CustomScriptCommand extends Command_1.default {\n toWritable(socket) {\n const origReject = this.reject;\n this.reject = (err) => {\n if (err.message.indexOf(\"NOSCRIPT\") !== -1) {\n socketHasScriptLoaded.delete(socket);\n }\n origReject.call(this, err);\n };\n if (!socketHasScriptLoaded.has(socket)) {\n socketHasScriptLoaded.add(socket);\n this.name = \"eval\";\n this.args[0] = lua;\n }\n else if (this.name === \"eval\") {\n this.name = \"evalsha\";\n this.args[0] = sha;\n }\n return super.toWritable(socket);\n }\n };\n }\n execute(container, args, options, callback) {\n if (typeof this.numberOfKeys === \"number\") {\n args.unshift(this.numberOfKeys);\n }\n if (this.keyPrefix) {\n options.keyPrefix = this.keyPrefix;\n }\n if (this.readOnly) {\n options.readOnly = true;\n }\n const evalsha = new this.Command(\"evalsha\", [this.sha, ...args], options);\n evalsha.promise = evalsha.promise.catch((err) => {\n if (err.message.indexOf(\"NOSCRIPT\") === -1) {\n throw err;\n }\n // Resend the same custom evalsha command that gets transformed\n // to an eval in case it's not loaded yet on the connection.\n const resend = new this.Command(\"evalsha\", [this.sha, ...args], options);\n const client = container.isPipeline ? container.redis : container;\n return client.sendCommand(resend);\n });\n (0, standard_as_callback_1.default)(evalsha.promise, callback);\n return container.sendCommand(evalsha);\n }\n}\nexports.default = Script;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst commands_1 = require(\"@ioredis/commands\");\nconst autoPipelining_1 = require(\"../autoPipelining\");\nconst Command_1 = require(\"../Command\");\nconst Script_1 = require(\"../Script\");\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nclass Commander {\n constructor() {\n this.options = {};\n /**\n * @ignore\n */\n this.scriptsSet = {};\n /**\n * @ignore\n */\n this.addedBuiltinSet = new Set();\n }\n /**\n * Return supported builtin commands\n */\n getBuiltinCommands() {\n return commands.slice(0);\n }\n /**\n * Create a builtin command\n */\n createBuiltinCommand(commandName) {\n return {\n string: generateFunction(null, commandName, \"utf8\"),\n buffer: generateFunction(null, commandName, null),\n };\n }\n /**\n * Create add builtin command\n */\n addBuiltinCommand(commandName) {\n this.addedBuiltinSet.add(commandName);\n this[commandName] = generateFunction(commandName, commandName, \"utf8\");\n this[commandName + \"Buffer\"] = generateFunction(commandName + \"Buffer\", commandName, null);\n }\n /**\n * Define a custom command using lua script\n */\n defineCommand(name, definition) {\n const script = new Script_1.default(definition.lua, definition.numberOfKeys, this.options.keyPrefix, definition.readOnly);\n this.scriptsSet[name] = script;\n this[name] = generateScriptingFunction(name, name, script, \"utf8\");\n this[name + \"Buffer\"] = generateScriptingFunction(name + \"Buffer\", name, script, null);\n }\n /**\n * @ignore\n */\n sendCommand(command, stream, node) {\n throw new Error('\"sendCommand\" is not implemented');\n }\n}\nconst commands = commands_1.list.filter((command) => command !== \"monitor\");\ncommands.push(\"sentinel\");\ncommands.forEach(function (commandName) {\n Commander.prototype[commandName] = generateFunction(commandName, commandName, \"utf8\");\n Commander.prototype[commandName + \"Buffer\"] = generateFunction(commandName + \"Buffer\", commandName, null);\n});\nCommander.prototype.call = generateFunction(\"call\", \"utf8\");\nCommander.prototype.callBuffer = generateFunction(\"callBuffer\", null);\n// @ts-expect-error\nCommander.prototype.send_command = Commander.prototype.call;\nfunction generateFunction(functionName, _commandName, _encoding) {\n if (typeof _encoding === \"undefined\") {\n _encoding = _commandName;\n _commandName = null;\n }\n return function (...args) {\n const commandName = (_commandName || args.shift());\n let callback = args[args.length - 1];\n if (typeof callback === \"function\") {\n args.pop();\n }\n else {\n callback = undefined;\n }\n const options = {\n errorStack: this.options.showFriendlyErrorStack ? new Error() : undefined,\n keyPrefix: this.options.keyPrefix,\n replyEncoding: _encoding,\n };\n // No auto pipeline, use regular command sending\n if (!(0, autoPipelining_1.shouldUseAutoPipelining)(this, functionName, commandName)) {\n return this.sendCommand(\n // @ts-expect-error\n new Command_1.default(commandName, args, options, callback));\n }\n // Create a new pipeline and make sure it's scheduled\n return (0, autoPipelining_1.executeWithAutoPipelining)(this, functionName, commandName, \n // @ts-expect-error\n args, callback);\n };\n}\nfunction generateScriptingFunction(functionName, commandName, script, encoding) {\n return function (...args) {\n const callback = typeof args[args.length - 1] === \"function\" ? args.pop() : undefined;\n const options = {\n replyEncoding: encoding,\n };\n if (this.options.showFriendlyErrorStack) {\n options.errorStack = new Error();\n }\n // No auto pipeline, use regular command sending\n if (!(0, autoPipelining_1.shouldUseAutoPipelining)(this, functionName, commandName)) {\n return script.execute(this, args, options, callback);\n }\n // Create a new pipeline and make sure it's scheduled\n return (0, autoPipelining_1.executeWithAutoPipelining)(this, functionName, commandName, args, callback);\n };\n}\nexports.default = Commander;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst calculateSlot = require(\"cluster-key-slot\");\nconst commands_1 = require(\"@ioredis/commands\");\nconst standard_as_callback_1 = require(\"standard-as-callback\");\nconst util_1 = require(\"util\");\nconst Command_1 = require(\"./Command\");\nconst utils_1 = require(\"./utils\");\nconst Commander_1 = require(\"./utils/Commander\");\n/*\n This function derives from the cluster-key-slot implementation.\n Instead of checking that all keys have the same slot, it checks that all slots are served by the same set of nodes.\n If this is satisfied, it returns the first key's slot.\n*/\nfunction generateMultiWithNodes(redis, keys) {\n const slot = calculateSlot(keys[0]);\n const target = redis._groupsBySlot[slot];\n for (let i = 1; i < keys.length; i++) {\n if (redis._groupsBySlot[calculateSlot(keys[i])] !== target) {\n return -1;\n }\n }\n return slot;\n}\nclass Pipeline extends Commander_1.default {\n constructor(redis) {\n super();\n this.redis = redis;\n this.isPipeline = true;\n this.replyPending = 0;\n this._queue = [];\n this._result = [];\n this._transactions = 0;\n this._shaToScript = {};\n this.isCluster =\n this.redis.constructor.name === \"Cluster\" || this.redis.isCluster;\n this.options = redis.options;\n Object.keys(redis.scriptsSet).forEach((name) => {\n const script = redis.scriptsSet[name];\n this._shaToScript[script.sha] = script;\n this[name] = redis[name];\n this[name + \"Buffer\"] = redis[name + \"Buffer\"];\n });\n redis.addedBuiltinSet.forEach((name) => {\n this[name] = redis[name];\n this[name + \"Buffer\"] = redis[name + \"Buffer\"];\n });\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n const _this = this;\n Object.defineProperty(this, \"length\", {\n get: function () {\n return _this._queue.length;\n },\n });\n }\n fillResult(value, position) {\n if (this._queue[position].name === \"exec\" && Array.isArray(value[1])) {\n const execLength = value[1].length;\n for (let i = 0; i < execLength; i++) {\n if (value[1][i] instanceof Error) {\n continue;\n }\n const cmd = this._queue[position - (execLength - i)];\n try {\n value[1][i] = cmd.transformReply(value[1][i]);\n }\n catch (err) {\n value[1][i] = err;\n }\n }\n }\n this._result[position] = value;\n if (--this.replyPending) {\n return;\n }\n if (this.isCluster) {\n let retriable = true;\n let commonError;\n for (let i = 0; i < this._result.length; ++i) {\n const error = this._result[i][0];\n const command = this._queue[i];\n if (error) {\n if (command.name === \"exec\" &&\n error.message ===\n \"EXECABORT Transaction discarded because of previous errors.\") {\n continue;\n }\n if (!commonError) {\n commonError = {\n name: error.name,\n message: error.message,\n };\n }\n else if (commonError.name !== error.name ||\n commonError.message !== error.message) {\n retriable = false;\n break;\n }\n }\n else if (!command.inTransaction) {\n const isReadOnly = (0, commands_1.exists)(command.name, { caseInsensitive: true }) &&\n (0, commands_1.hasFlag)(command.name, \"readonly\", { nameCaseInsensitive: true });\n if (!isReadOnly) {\n retriable = false;\n break;\n }\n }\n }\n if (commonError && retriable) {\n const _this = this;\n const errv = commonError.message.split(\" \");\n const queue = this._queue;\n let inTransaction = false;\n this._queue = [];\n for (let i = 0; i < queue.length; ++i) {\n if (errv[0] === \"ASK\" &&\n !inTransaction &&\n queue[i].name !== \"asking\" &&\n (!queue[i - 1] || queue[i - 1].name !== \"asking\")) {\n const asking = new Command_1.default(\"asking\");\n asking.ignore = true;\n this.sendCommand(asking);\n }\n queue[i].initPromise();\n this.sendCommand(queue[i]);\n inTransaction = queue[i].inTransaction;\n }\n let matched = true;\n if (typeof this.leftRedirections === \"undefined\") {\n this.leftRedirections = {};\n }\n const exec = function () {\n _this.exec();\n };\n const cluster = this.redis;\n cluster.handleError(commonError, this.leftRedirections, {\n moved: function (_slot, key) {\n _this.preferKey = key;\n if (cluster.slots[errv[1]]) {\n if (cluster.slots[errv[1]][0] !== key) {\n cluster.slots[errv[1]] = [key];\n }\n }\n else {\n cluster.slots[errv[1]] = [key];\n }\n cluster._groupsBySlot[errv[1]] =\n cluster._groupsIds[cluster.slots[errv[1]].join(\";\")];\n cluster.refreshSlotsCache();\n _this.exec();\n },\n ask: function (_slot, key) {\n _this.preferKey = key;\n _this.exec();\n },\n tryagain: exec,\n clusterDown: exec,\n connectionClosed: exec,\n maxRedirections: () => {\n matched = false;\n },\n defaults: () => {\n matched = false;\n },\n });\n if (matched) {\n return;\n }\n }\n }\n let ignoredCount = 0;\n for (let i = 0; i < this._queue.length - ignoredCount; ++i) {\n if (this._queue[i + ignoredCount].ignore) {\n ignoredCount += 1;\n }\n this._result[i] = this._result[i + ignoredCount];\n }\n this.resolve(this._result.slice(0, this._result.length - ignoredCount));\n }\n sendCommand(command) {\n if (this._transactions > 0) {\n command.inTransaction = true;\n }\n const position = this._queue.length;\n command.pipelineIndex = position;\n command.promise\n .then((result) => {\n this.fillResult([null, result], position);\n })\n .catch((error) => {\n this.fillResult([error], position);\n });\n this._queue.push(command);\n return this;\n }\n addBatch(commands) {\n let command, commandName, args;\n for (let i = 0; i < commands.length; ++i) {\n command = commands[i];\n commandName = command[0];\n args = command.slice(1);\n this[commandName].apply(this, args);\n }\n return this;\n }\n}\nexports.default = Pipeline;\n// @ts-expect-error\nconst multi = Pipeline.prototype.multi;\n// @ts-expect-error\nPipeline.prototype.multi = function () {\n this._transactions += 1;\n return multi.apply(this, arguments);\n};\n// @ts-expect-error\nconst execBuffer = Pipeline.prototype.execBuffer;\n// @ts-expect-error\nPipeline.prototype.execBuffer = (0, util_1.deprecate)(function () {\n if (this._transactions > 0) {\n this._transactions -= 1;\n }\n return execBuffer.apply(this, arguments);\n}, \"Pipeline#execBuffer: Use Pipeline#exec instead\");\n// NOTE: To avoid an unhandled promise rejection, this will unconditionally always return this.promise,\n// which always has the rejection handled by standard-as-callback\n// adding the provided rejection callback.\n//\n// If a different promise instance were returned, that promise would cause its own unhandled promise rejection\n// errors, even if that promise unconditionally resolved to **the resolved value of** this.promise.\nPipeline.prototype.exec = function (callback) {\n // Wait for the cluster to be connected, since we need nodes information before continuing\n if (this.isCluster && !this.redis.slots.length) {\n if (this.redis.status === \"wait\")\n this.redis.connect().catch(utils_1.noop);\n if (callback && !this.nodeifiedPromise) {\n this.nodeifiedPromise = true;\n (0, standard_as_callback_1.default)(this.promise, callback);\n }\n this.redis.delayUntilReady((err) => {\n if (err) {\n this.reject(err);\n return;\n }\n this.exec(callback);\n });\n return this.promise;\n }\n if (this._transactions > 0) {\n this._transactions -= 1;\n return execBuffer.apply(this, arguments);\n }\n if (!this.nodeifiedPromise) {\n this.nodeifiedPromise = true;\n (0, standard_as_callback_1.default)(this.promise, callback);\n }\n if (!this._queue.length) {\n this.resolve([]);\n }\n let pipelineSlot;\n if (this.isCluster) {\n // List of the first key for each command\n const sampleKeys = [];\n for (let i = 0; i < this._queue.length; i++) {\n const keys = this._queue[i].getKeys();\n if (keys.length) {\n sampleKeys.push(keys[0]);\n }\n // For each command, check that the keys belong to the same slot\n if (keys.length && calculateSlot.generateMulti(keys) < 0) {\n this.reject(new Error(\"All the keys in a pipeline command should belong to the same slot\"));\n return this.promise;\n }\n }\n if (sampleKeys.length) {\n pipelineSlot = generateMultiWithNodes(this.redis, sampleKeys);\n if (pipelineSlot < 0) {\n this.reject(new Error(\"All keys in the pipeline should belong to the same slots allocation group\"));\n return this.promise;\n }\n }\n else {\n // Send the pipeline to a random node\n pipelineSlot = (Math.random() * 16384) | 0;\n }\n }\n const _this = this;\n execPipeline();\n return this.promise;\n function execPipeline() {\n let writePending = (_this.replyPending = _this._queue.length);\n let node;\n if (_this.isCluster) {\n node = {\n slot: pipelineSlot,\n redis: _this.redis.connectionPool.nodes.all[_this.preferKey],\n };\n }\n let data = \"\";\n let buffers;\n const stream = {\n isPipeline: true,\n destination: _this.isCluster ? node : { redis: _this.redis },\n write(writable) {\n if (typeof writable !== \"string\") {\n if (!buffers) {\n buffers = [];\n }\n if (data) {\n buffers.push(Buffer.from(data, \"utf8\"));\n data = \"\";\n }\n buffers.push(writable);\n }\n else {\n data += writable;\n }\n if (!--writePending) {\n if (buffers) {\n if (data) {\n buffers.push(Buffer.from(data, \"utf8\"));\n }\n stream.destination.redis.stream.write(Buffer.concat(buffers));\n }\n else {\n stream.destination.redis.stream.write(data);\n }\n // Reset writePending for resending\n writePending = _this._queue.length;\n data = \"\";\n buffers = undefined;\n }\n },\n };\n for (let i = 0; i < _this._queue.length; ++i) {\n _this.redis.sendCommand(_this._queue[i], stream, node);\n }\n return _this.promise;\n }\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.addTransactionSupport = void 0;\nconst utils_1 = require(\"./utils\");\nconst standard_as_callback_1 = require(\"standard-as-callback\");\nconst Pipeline_1 = require(\"./Pipeline\");\nfunction addTransactionSupport(redis) {\n redis.pipeline = function (commands) {\n const pipeline = new Pipeline_1.default(this);\n if (Array.isArray(commands)) {\n pipeline.addBatch(commands);\n }\n return pipeline;\n };\n const { multi } = redis;\n redis.multi = function (commands, options) {\n if (typeof options === \"undefined\" && !Array.isArray(commands)) {\n options = commands;\n commands = null;\n }\n if (options && options.pipeline === false) {\n return multi.call(this);\n }\n const pipeline = new Pipeline_1.default(this);\n // @ts-expect-error\n pipeline.multi();\n if (Array.isArray(commands)) {\n pipeline.addBatch(commands);\n }\n const exec = pipeline.exec;\n pipeline.exec = function (callback) {\n // Wait for the cluster to be connected, since we need nodes information before continuing\n if (this.isCluster && !this.redis.slots.length) {\n if (this.redis.status === \"wait\")\n this.redis.connect().catch(utils_1.noop);\n return (0, standard_as_callback_1.default)(new Promise((resolve, reject) => {\n this.redis.delayUntilReady((err) => {\n if (err) {\n reject(err);\n return;\n }\n this.exec(pipeline).then(resolve, reject);\n });\n }), callback);\n }\n if (this._transactions > 0) {\n exec.call(pipeline);\n }\n // Returns directly when the pipeline\n // has been called multiple times (retries).\n if (this.nodeifiedPromise) {\n return exec.call(pipeline);\n }\n const promise = exec.call(pipeline);\n return (0, standard_as_callback_1.default)(promise.then(function (result) {\n const execResult = result[result.length - 1];\n if (typeof execResult === \"undefined\") {\n throw new Error(\"Pipeline cannot be used to send any commands when the `exec()` has been called on it.\");\n }\n if (execResult[0]) {\n execResult[0].previousErrors = [];\n for (let i = 0; i < result.length - 1; ++i) {\n if (result[i][0]) {\n execResult[0].previousErrors.push(result[i][0]);\n }\n }\n throw execResult[0];\n }\n return (0, utils_1.wrapMultiResult)(execResult[1]);\n }), callback);\n };\n // @ts-expect-error\n const { execBuffer } = pipeline;\n // @ts-expect-error\n pipeline.execBuffer = function (callback) {\n if (this._transactions > 0) {\n execBuffer.call(pipeline);\n }\n return pipeline.exec(callback);\n };\n return pipeline;\n };\n const { exec } = redis;\n redis.exec = function (callback) {\n return (0, standard_as_callback_1.default)(exec.call(this).then(function (results) {\n if (Array.isArray(results)) {\n results = (0, utils_1.wrapMultiResult)(results);\n }\n return results;\n }), callback);\n };\n}\nexports.addTransactionSupport = addTransactionSupport;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction applyMixin(derivedConstructor, mixinConstructor) {\n Object.getOwnPropertyNames(mixinConstructor.prototype).forEach((name) => {\n Object.defineProperty(derivedConstructor.prototype, name, Object.getOwnPropertyDescriptor(mixinConstructor.prototype, name));\n });\n}\nexports.default = applyMixin;\n", "import libDefault from 'dns';\nmodule.exports = libDefault;", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_CLUSTER_OPTIONS = void 0;\nconst dns_1 = require(\"dns\");\nexports.DEFAULT_CLUSTER_OPTIONS = {\n clusterRetryStrategy: (times) => Math.min(100 + times * 2, 2000),\n enableOfflineQueue: true,\n enableReadyCheck: true,\n scaleReads: \"master\",\n maxRedirections: 16,\n retryDelayOnMoved: 0,\n retryDelayOnFailover: 100,\n retryDelayOnClusterDown: 100,\n retryDelayOnTryAgain: 100,\n slotsRefreshTimeout: 1000,\n useSRVRecords: false,\n resolveSrv: dns_1.resolveSrv,\n dnsLookup: dns_1.lookup,\n enableAutoPipelining: false,\n autoPipeliningIgnoredCommands: [],\n shardedSubscribers: false,\n};\n", "import libDefault from 'net';\nmodule.exports = libDefault;", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getConnectionName = exports.weightSrvRecords = exports.groupSrvRecords = exports.getUniqueHostnamesFromOptions = exports.normalizeNodeOptions = exports.nodeKeyToRedisOptions = exports.getNodeKey = void 0;\nconst utils_1 = require(\"../utils\");\nconst net_1 = require(\"net\");\nfunction getNodeKey(node) {\n node.port = node.port || 6379;\n node.host = node.host || \"127.0.0.1\";\n return node.host + \":\" + node.port;\n}\nexports.getNodeKey = getNodeKey;\nfunction nodeKeyToRedisOptions(nodeKey) {\n const portIndex = nodeKey.lastIndexOf(\":\");\n if (portIndex === -1) {\n throw new Error(`Invalid node key ${nodeKey}`);\n }\n return {\n host: nodeKey.slice(0, portIndex),\n port: Number(nodeKey.slice(portIndex + 1)),\n };\n}\nexports.nodeKeyToRedisOptions = nodeKeyToRedisOptions;\nfunction normalizeNodeOptions(nodes) {\n return nodes.map((node) => {\n const options = {};\n if (typeof node === \"object\") {\n Object.assign(options, node);\n }\n else if (typeof node === \"string\") {\n Object.assign(options, (0, utils_1.parseURL)(node));\n }\n else if (typeof node === \"number\") {\n options.port = node;\n }\n else {\n throw new Error(\"Invalid argument \" + node);\n }\n if (typeof options.port === \"string\") {\n options.port = parseInt(options.port, 10);\n }\n // Cluster mode only support db 0\n delete options.db;\n if (!options.port) {\n options.port = 6379;\n }\n if (!options.host) {\n options.host = \"127.0.0.1\";\n }\n return (0, utils_1.resolveTLSProfile)(options);\n });\n}\nexports.normalizeNodeOptions = normalizeNodeOptions;\nfunction getUniqueHostnamesFromOptions(nodes) {\n const uniqueHostsMap = {};\n nodes.forEach((node) => {\n uniqueHostsMap[node.host] = true;\n });\n return Object.keys(uniqueHostsMap).filter((host) => !(0, net_1.isIP)(host));\n}\nexports.getUniqueHostnamesFromOptions = getUniqueHostnamesFromOptions;\nfunction groupSrvRecords(records) {\n const recordsByPriority = {};\n for (const record of records) {\n if (!recordsByPriority.hasOwnProperty(record.priority)) {\n recordsByPriority[record.priority] = {\n totalWeight: record.weight,\n records: [record],\n };\n }\n else {\n recordsByPriority[record.priority].totalWeight += record.weight;\n recordsByPriority[record.priority].records.push(record);\n }\n }\n return recordsByPriority;\n}\nexports.groupSrvRecords = groupSrvRecords;\nfunction weightSrvRecords(recordsGroup) {\n if (recordsGroup.records.length === 1) {\n recordsGroup.totalWeight = 0;\n return recordsGroup.records.shift();\n }\n // + `recordsGroup.records.length` to support `weight` 0\n const random = Math.floor(Math.random() * (recordsGroup.totalWeight + recordsGroup.records.length));\n let total = 0;\n for (const [i, record] of recordsGroup.records.entries()) {\n total += 1 + record.weight;\n if (total > random) {\n recordsGroup.totalWeight -= record.weight;\n recordsGroup.records.splice(i, 1);\n return record;\n }\n }\n}\nexports.weightSrvRecords = weightSrvRecords;\nfunction getConnectionName(component, nodeConnectionName) {\n const prefix = `ioredis-cluster(${component})`;\n return nodeConnectionName ? `${prefix}:${nodeConnectionName}` : prefix;\n}\nexports.getConnectionName = getConnectionName;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"./util\");\nconst utils_1 = require(\"../utils\");\nconst Redis_1 = require(\"../Redis\");\nconst debug = (0, utils_1.Debug)(\"cluster:subscriber\");\nclass ClusterSubscriber {\n constructor(connectionPool, emitter, isSharded = false) {\n this.connectionPool = connectionPool;\n this.emitter = emitter;\n this.isSharded = isSharded;\n this.started = false;\n //There is only one connection for the entire pool\n this.subscriber = null;\n //The slot range for which this subscriber is responsible\n this.slotRange = [];\n this.onSubscriberEnd = () => {\n if (!this.started) {\n debug(\"subscriber has disconnected, but ClusterSubscriber is not started, so not reconnecting.\");\n return;\n }\n // If the subscriber closes whilst it's still the active connection,\n // we might as well try to connecting to a new node if possible to\n // minimise the number of missed publishes.\n debug(\"subscriber has disconnected, selecting a new one...\");\n this.selectSubscriber();\n };\n // If the current node we're using as the subscriber disappears\n // from the node pool for some reason, we will select a new one\n // to connect to.\n // Note that this event is only triggered if the connection to\n // the node has been used; cluster subscriptions are setup with\n // lazyConnect = true. It's possible for the subscriber node to\n // disappear without this method being called!\n // See https://github.com/luin/ioredis/pull/1589\n this.connectionPool.on(\"-node\", (_, key) => {\n if (!this.started || !this.subscriber) {\n return;\n }\n if ((0, util_1.getNodeKey)(this.subscriber.options) === key) {\n debug(\"subscriber has left, selecting a new one...\");\n this.selectSubscriber();\n }\n });\n this.connectionPool.on(\"+node\", () => {\n if (!this.started || this.subscriber) {\n return;\n }\n debug(\"a new node is discovered and there is no subscriber, selecting a new one...\");\n this.selectSubscriber();\n });\n }\n getInstance() {\n return this.subscriber;\n }\n /**\n * Associate this subscriber to a specific slot range.\n *\n * Returns the range or an empty array if the slot range couldn't be associated.\n *\n * BTW: This is more for debugging and testing purposes.\n *\n * @param range\n */\n associateSlotRange(range) {\n if (this.isSharded) {\n this.slotRange = range;\n }\n return this.slotRange;\n }\n start() {\n this.started = true;\n this.selectSubscriber();\n debug(\"started\");\n }\n stop() {\n this.started = false;\n if (this.subscriber) {\n this.subscriber.disconnect();\n this.subscriber = null;\n }\n }\n isStarted() {\n return this.started;\n }\n selectSubscriber() {\n const lastActiveSubscriber = this.lastActiveSubscriber;\n // Disconnect the previous subscriber even if there\n // will not be a new one.\n if (lastActiveSubscriber) {\n lastActiveSubscriber.off(\"end\", this.onSubscriberEnd);\n lastActiveSubscriber.disconnect();\n }\n if (this.subscriber) {\n this.subscriber.off(\"end\", this.onSubscriberEnd);\n this.subscriber.disconnect();\n }\n const sampleNode = (0, utils_1.sample)(this.connectionPool.getNodes());\n if (!sampleNode) {\n debug(\"selecting subscriber failed since there is no node discovered in the cluster yet\");\n this.subscriber = null;\n return;\n }\n const { options } = sampleNode;\n debug(\"selected a subscriber %s:%s\", options.host, options.port);\n /*\n * Create a specialized Redis connection for the subscription.\n * Note that auto reconnection is enabled here.\n *\n * `enableReadyCheck` is also enabled because although subscription is allowed\n * while redis is loading data from the disk, we can check if the password\n * provided for the subscriber is correct, and if not, the current subscriber\n * will be disconnected and a new subscriber will be selected.\n */\n let connectionPrefix = \"subscriber\";\n if (this.isSharded)\n connectionPrefix = \"ssubscriber\";\n this.subscriber = new Redis_1.default({\n port: options.port,\n host: options.host,\n username: options.username,\n password: options.password,\n enableReadyCheck: true,\n connectionName: (0, util_1.getConnectionName)(connectionPrefix, options.connectionName),\n lazyConnect: true,\n tls: options.tls,\n // Don't try to reconnect the subscriber connection. If the connection fails\n // we will get an end event (handled below), at which point we'll pick a new\n // node from the pool and try to connect to that as the subscriber connection.\n retryStrategy: null,\n });\n // Ignore the errors since they're handled in the connection pool.\n this.subscriber.on(\"error\", utils_1.noop);\n this.subscriber.on(\"moved\", () => {\n this.emitter.emit(\"forceRefresh\");\n });\n // The node we lost connection to may not come back up in a\n // reasonable amount of time (e.g. a slave that's taken down\n // for maintainence), we could potentially miss many published\n // messages so we should reconnect as quickly as possible, to\n // a different node if needed.\n this.subscriber.once(\"end\", this.onSubscriberEnd);\n // Re-subscribe previous channels\n const previousChannels = { subscribe: [], psubscribe: [], ssubscribe: [] };\n if (lastActiveSubscriber) {\n const condition = lastActiveSubscriber.condition || lastActiveSubscriber.prevCondition;\n if (condition && condition.subscriber) {\n previousChannels.subscribe = condition.subscriber.channels(\"subscribe\");\n previousChannels.psubscribe =\n condition.subscriber.channels(\"psubscribe\");\n previousChannels.ssubscribe =\n condition.subscriber.channels(\"ssubscribe\");\n }\n }\n if (previousChannels.subscribe.length ||\n previousChannels.psubscribe.length ||\n previousChannels.ssubscribe.length) {\n let pending = 0;\n for (const type of [\"subscribe\", \"psubscribe\", \"ssubscribe\"]) {\n const channels = previousChannels[type];\n if (channels.length == 0) {\n continue;\n }\n debug(\"%s %d channels\", type, channels.length);\n if (type === \"ssubscribe\") {\n for (const channel of channels) {\n pending += 1;\n this.subscriber[type](channel)\n .then(() => {\n if (!--pending) {\n this.lastActiveSubscriber = this.subscriber;\n }\n })\n .catch(() => {\n // TODO: should probably disconnect the subscriber and try again.\n debug(\"failed to ssubscribe to channel: %s\", channel);\n });\n }\n }\n else {\n pending += 1;\n this.subscriber[type](channels)\n .then(() => {\n if (!--pending) {\n this.lastActiveSubscriber = this.subscriber;\n }\n })\n .catch(() => {\n // TODO: should probably disconnect the subscriber and try again.\n debug(\"failed to %s %d channels\", type, channels.length);\n });\n }\n }\n }\n else {\n this.lastActiveSubscriber = this.subscriber;\n }\n for (const event of [\n \"message\",\n \"messageBuffer\",\n ]) {\n this.subscriber.on(event, (arg1, arg2) => {\n this.emitter.emit(event, arg1, arg2);\n });\n }\n for (const event of [\"pmessage\", \"pmessageBuffer\"]) {\n this.subscriber.on(event, (arg1, arg2, arg3) => {\n this.emitter.emit(event, arg1, arg2, arg3);\n });\n }\n if (this.isSharded == true) {\n for (const event of [\n \"smessage\",\n \"smessageBuffer\",\n ]) {\n this.subscriber.on(event, (arg1, arg2) => {\n this.emitter.emit(event, arg1, arg2);\n });\n }\n }\n }\n}\nexports.default = ClusterSubscriber;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst events_1 = require(\"events\");\nconst utils_1 = require(\"../utils\");\nconst util_1 = require(\"./util\");\nconst Redis_1 = require(\"../Redis\");\nconst debug = (0, utils_1.Debug)(\"cluster:connectionPool\");\nclass ConnectionPool extends events_1.EventEmitter {\n constructor(redisOptions) {\n super();\n this.redisOptions = redisOptions;\n // master + slave = all\n this.nodes = {\n all: {},\n master: {},\n slave: {},\n };\n this.specifiedOptions = {};\n }\n getNodes(role = \"all\") {\n const nodes = this.nodes[role];\n return Object.keys(nodes).map((key) => nodes[key]);\n }\n getInstanceByKey(key) {\n return this.nodes.all[key];\n }\n getSampleInstance(role) {\n const keys = Object.keys(this.nodes[role]);\n const sampleKey = (0, utils_1.sample)(keys);\n return this.nodes[role][sampleKey];\n }\n /**\n * Add a master node to the pool\n * @param node\n */\n addMasterNode(node) {\n const key = (0, util_1.getNodeKey)(node.options);\n const redis = this.createRedisFromOptions(node, node.options.readOnly);\n //Master nodes aren't read-only\n if (!node.options.readOnly) {\n this.nodes.all[key] = redis;\n this.nodes.master[key] = redis;\n return true;\n }\n return false;\n }\n /**\n * Creates a Redis connection instance from the node options\n * @param node\n * @param readOnly\n */\n createRedisFromOptions(node, readOnly) {\n const redis = new Redis_1.default((0, utils_1.defaults)({\n // Never try to reconnect when a node is lose,\n // instead, waiting for a `MOVED` error and\n // fetch the slots again.\n retryStrategy: null,\n // Offline queue should be enabled so that\n // we don't need to wait for the `ready` event\n // before sending commands to the node.\n enableOfflineQueue: true,\n readOnly: readOnly,\n }, node, this.redisOptions, { lazyConnect: true }));\n return redis;\n }\n /**\n * Find or create a connection to the node\n */\n findOrCreate(node, readOnly = false) {\n const key = (0, util_1.getNodeKey)(node);\n readOnly = Boolean(readOnly);\n if (this.specifiedOptions[key]) {\n Object.assign(node, this.specifiedOptions[key]);\n }\n else {\n this.specifiedOptions[key] = node;\n }\n let redis;\n if (this.nodes.all[key]) {\n redis = this.nodes.all[key];\n if (redis.options.readOnly !== readOnly) {\n redis.options.readOnly = readOnly;\n debug(\"Change role of %s to %s\", key, readOnly ? \"slave\" : \"master\");\n redis[readOnly ? \"readonly\" : \"readwrite\"]().catch(utils_1.noop);\n if (readOnly) {\n delete this.nodes.master[key];\n this.nodes.slave[key] = redis;\n }\n else {\n delete this.nodes.slave[key];\n this.nodes.master[key] = redis;\n }\n }\n }\n else {\n debug(\"Connecting to %s as %s\", key, readOnly ? \"slave\" : \"master\");\n redis = this.createRedisFromOptions(node, readOnly);\n this.nodes.all[key] = redis;\n this.nodes[readOnly ? \"slave\" : \"master\"][key] = redis;\n redis.once(\"end\", () => {\n this.removeNode(key);\n this.emit(\"-node\", redis, key);\n if (!Object.keys(this.nodes.all).length) {\n this.emit(\"drain\");\n }\n });\n this.emit(\"+node\", redis, key);\n redis.on(\"error\", function (error) {\n this.emit(\"nodeError\", error, key);\n });\n }\n return redis;\n }\n /**\n * Reset the pool with a set of nodes.\n * The old node will be removed.\n */\n reset(nodes) {\n debug(\"Reset with %O\", nodes);\n const newNodes = {};\n nodes.forEach((node) => {\n const key = (0, util_1.getNodeKey)(node);\n // Don't override the existing (master) node\n // when the current one is slave.\n if (!(node.readOnly && newNodes[key])) {\n newNodes[key] = node;\n }\n });\n Object.keys(this.nodes.all).forEach((key) => {\n if (!newNodes[key]) {\n debug(\"Disconnect %s because the node does not hold any slot\", key);\n this.nodes.all[key].disconnect();\n this.removeNode(key);\n }\n });\n Object.keys(newNodes).forEach((key) => {\n const node = newNodes[key];\n this.findOrCreate(node, node.readOnly);\n });\n }\n /**\n * Remove a node from the pool.\n */\n removeNode(key) {\n const { nodes } = this;\n if (nodes.all[key]) {\n debug(\"Remove %s from the pool\", key);\n delete nodes.all[key];\n }\n delete nodes.master[key];\n delete nodes.slave[key];\n }\n}\nexports.default = ConnectionPool;\n", "'use strict';\n\n/**\n * Custom implementation of a double ended queue.\n */\nfunction Denque(array, options) {\n var options = options || {};\n this._capacity = options.capacity;\n\n this._head = 0;\n this._tail = 0;\n\n if (Array.isArray(array)) {\n this._fromArray(array);\n } else {\n this._capacityMask = 0x3;\n this._list = new Array(4);\n }\n}\n\n/**\n * --------------\n * PUBLIC API\n * -------------\n */\n\n/**\n * Returns the item at the specified index from the list.\n * 0 is the first element, 1 is the second, and so on...\n * Elements at negative values are that many from the end: -1 is one before the end\n * (the last element), -2 is two before the end (one before last), etc.\n * @param index\n * @returns {*}\n */\nDenque.prototype.peekAt = function peekAt(index) {\n var i = index;\n // expect a number or return undefined\n if ((i !== (i | 0))) {\n return void 0;\n }\n var len = this.size();\n if (i >= len || i < -len) return undefined;\n if (i < 0) i += len;\n i = (this._head + i) & this._capacityMask;\n return this._list[i];\n};\n\n/**\n * Alias for peekAt()\n * @param i\n * @returns {*}\n */\nDenque.prototype.get = function get(i) {\n return this.peekAt(i);\n};\n\n/**\n * Returns the first item in the list without removing it.\n * @returns {*}\n */\nDenque.prototype.peek = function peek() {\n if (this._head === this._tail) return undefined;\n return this._list[this._head];\n};\n\n/**\n * Alias for peek()\n * @returns {*}\n */\nDenque.prototype.peekFront = function peekFront() {\n return this.peek();\n};\n\n/**\n * Returns the item that is at the back of the queue without removing it.\n * Uses peekAt(-1)\n */\nDenque.prototype.peekBack = function peekBack() {\n return this.peekAt(-1);\n};\n\n/**\n * Returns the current length of the queue\n * @return {Number}\n */\nObject.defineProperty(Denque.prototype, 'length', {\n get: function length() {\n return this.size();\n }\n});\n\n/**\n * Return the number of items on the list, or 0 if empty.\n * @returns {number}\n */\nDenque.prototype.size = function size() {\n if (this._head === this._tail) return 0;\n if (this._head < this._tail) return this._tail - this._head;\n else return this._capacityMask + 1 - (this._head - this._tail);\n};\n\n/**\n * Add an item at the beginning of the list.\n * @param item\n */\nDenque.prototype.unshift = function unshift(item) {\n if (arguments.length === 0) return this.size();\n var len = this._list.length;\n this._head = (this._head - 1 + len) & this._capacityMask;\n this._list[this._head] = item;\n if (this._tail === this._head) this._growArray();\n if (this._capacity && this.size() > this._capacity) this.pop();\n if (this._head < this._tail) return this._tail - this._head;\n else return this._capacityMask + 1 - (this._head - this._tail);\n};\n\n/**\n * Remove and return the first item on the list,\n * Returns undefined if the list is empty.\n * @returns {*}\n */\nDenque.prototype.shift = function shift() {\n var head = this._head;\n if (head === this._tail) return undefined;\n var item = this._list[head];\n this._list[head] = undefined;\n this._head = (head + 1) & this._capacityMask;\n if (head < 2 && this._tail > 10000 && this._tail <= this._list.length >>> 2) this._shrinkArray();\n return item;\n};\n\n/**\n * Add an item to the bottom of the list.\n * @param item\n */\nDenque.prototype.push = function push(item) {\n if (arguments.length === 0) return this.size();\n var tail = this._tail;\n this._list[tail] = item;\n this._tail = (tail + 1) & this._capacityMask;\n if (this._tail === this._head) {\n this._growArray();\n }\n if (this._capacity && this.size() > this._capacity) {\n this.shift();\n }\n if (this._head < this._tail) return this._tail - this._head;\n else return this._capacityMask + 1 - (this._head - this._tail);\n};\n\n/**\n * Remove and return the last item on the list.\n * Returns undefined if the list is empty.\n * @returns {*}\n */\nDenque.prototype.pop = function pop() {\n var tail = this._tail;\n if (tail === this._head) return undefined;\n var len = this._list.length;\n this._tail = (tail - 1 + len) & this._capacityMask;\n var item = this._list[this._tail];\n this._list[this._tail] = undefined;\n if (this._head < 2 && tail > 10000 && tail <= len >>> 2) this._shrinkArray();\n return item;\n};\n\n/**\n * Remove and return the item at the specified index from the list.\n * Returns undefined if the list is empty.\n * @param index\n * @returns {*}\n */\nDenque.prototype.removeOne = function removeOne(index) {\n var i = index;\n // expect a number or return undefined\n if ((i !== (i | 0))) {\n return void 0;\n }\n if (this._head === this._tail) return void 0;\n var size = this.size();\n var len = this._list.length;\n if (i >= size || i < -size) return void 0;\n if (i < 0) i += size;\n i = (this._head + i) & this._capacityMask;\n var item = this._list[i];\n var k;\n if (index < size / 2) {\n for (k = index; k > 0; k--) {\n this._list[i] = this._list[i = (i - 1 + len) & this._capacityMask];\n }\n this._list[i] = void 0;\n this._head = (this._head + 1 + len) & this._capacityMask;\n } else {\n for (k = size - 1 - index; k > 0; k--) {\n this._list[i] = this._list[i = (i + 1 + len) & this._capacityMask];\n }\n this._list[i] = void 0;\n this._tail = (this._tail - 1 + len) & this._capacityMask;\n }\n return item;\n};\n\n/**\n * Remove number of items from the specified index from the list.\n * Returns array of removed items.\n * Returns undefined if the list is empty.\n * @param index\n * @param count\n * @returns {array}\n */\nDenque.prototype.remove = function remove(index, count) {\n var i = index;\n var removed;\n var del_count = count;\n // expect a number or return undefined\n if ((i !== (i | 0))) {\n return void 0;\n }\n if (this._head === this._tail) return void 0;\n var size = this.size();\n var len = this._list.length;\n if (i >= size || i < -size || count < 1) return void 0;\n if (i < 0) i += size;\n if (count === 1 || !count) {\n removed = new Array(1);\n removed[0] = this.removeOne(i);\n return removed;\n }\n if (i === 0 && i + count >= size) {\n removed = this.toArray();\n this.clear();\n return removed;\n }\n if (i + count > size) count = size - i;\n var k;\n removed = new Array(count);\n for (k = 0; k < count; k++) {\n removed[k] = this._list[(this._head + i + k) & this._capacityMask];\n }\n i = (this._head + i) & this._capacityMask;\n if (index + count === size) {\n this._tail = (this._tail - count + len) & this._capacityMask;\n for (k = count; k > 0; k--) {\n this._list[i = (i + 1 + len) & this._capacityMask] = void 0;\n }\n return removed;\n }\n if (index === 0) {\n this._head = (this._head + count + len) & this._capacityMask;\n for (k = count - 1; k > 0; k--) {\n this._list[i = (i + 1 + len) & this._capacityMask] = void 0;\n }\n return removed;\n }\n if (i < size / 2) {\n this._head = (this._head + index + count + len) & this._capacityMask;\n for (k = index; k > 0; k--) {\n this.unshift(this._list[i = (i - 1 + len) & this._capacityMask]);\n }\n i = (this._head - 1 + len) & this._capacityMask;\n while (del_count > 0) {\n this._list[i = (i - 1 + len) & this._capacityMask] = void 0;\n del_count--;\n }\n if (index < 0) this._tail = i;\n } else {\n this._tail = i;\n i = (i + count + len) & this._capacityMask;\n for (k = size - (count + index); k > 0; k--) {\n this.push(this._list[i++]);\n }\n i = this._tail;\n while (del_count > 0) {\n this._list[i = (i + 1 + len) & this._capacityMask] = void 0;\n del_count--;\n }\n }\n if (this._head < 2 && this._tail > 10000 && this._tail <= len >>> 2) this._shrinkArray();\n return removed;\n};\n\n/**\n * Native splice implementation.\n * Remove number of items from the specified index from the list and/or add new elements.\n * Returns array of removed items or empty array if count == 0.\n * Returns undefined if the list is empty.\n *\n * @param index\n * @param count\n * @param {...*} [elements]\n * @returns {array}\n */\nDenque.prototype.splice = function splice(index, count) {\n var i = index;\n // expect a number or return undefined\n if ((i !== (i | 0))) {\n return void 0;\n }\n var size = this.size();\n if (i < 0) i += size;\n if (i > size) return void 0;\n if (arguments.length > 2) {\n var k;\n var temp;\n var removed;\n var arg_len = arguments.length;\n var len = this._list.length;\n var arguments_index = 2;\n if (!size || i < size / 2) {\n temp = new Array(i);\n for (k = 0; k < i; k++) {\n temp[k] = this._list[(this._head + k) & this._capacityMask];\n }\n if (count === 0) {\n removed = [];\n if (i > 0) {\n this._head = (this._head + i + len) & this._capacityMask;\n }\n } else {\n removed = this.remove(i, count);\n this._head = (this._head + i + len) & this._capacityMask;\n }\n while (arg_len > arguments_index) {\n this.unshift(arguments[--arg_len]);\n }\n for (k = i; k > 0; k--) {\n this.unshift(temp[k - 1]);\n }\n } else {\n temp = new Array(size - (i + count));\n var leng = temp.length;\n for (k = 0; k < leng; k++) {\n temp[k] = this._list[(this._head + i + count + k) & this._capacityMask];\n }\n if (count === 0) {\n removed = [];\n if (i != size) {\n this._tail = (this._head + i + len) & this._capacityMask;\n }\n } else {\n removed = this.remove(i, count);\n this._tail = (this._tail - leng + len) & this._capacityMask;\n }\n while (arguments_index < arg_len) {\n this.push(arguments[arguments_index++]);\n }\n for (k = 0; k < leng; k++) {\n this.push(temp[k]);\n }\n }\n return removed;\n } else {\n return this.remove(i, count);\n }\n};\n\n/**\n * Soft clear - does not reset capacity.\n */\nDenque.prototype.clear = function clear() {\n this._list = new Array(this._list.length);\n this._head = 0;\n this._tail = 0;\n};\n\n/**\n * Returns true or false whether the list is empty.\n * @returns {boolean}\n */\nDenque.prototype.isEmpty = function isEmpty() {\n return this._head === this._tail;\n};\n\n/**\n * Returns an array of all queue items.\n * @returns {Array}\n */\nDenque.prototype.toArray = function toArray() {\n return this._copyArray(false);\n};\n\n/**\n * -------------\n * INTERNALS\n * -------------\n */\n\n/**\n * Fills the queue with items from an array\n * For use in the constructor\n * @param array\n * @private\n */\nDenque.prototype._fromArray = function _fromArray(array) {\n var length = array.length;\n var capacity = this._nextPowerOf2(length);\n\n this._list = new Array(capacity);\n this._capacityMask = capacity - 1;\n this._tail = length;\n\n for (var i = 0; i < length; i++) this._list[i] = array[i];\n};\n\n/**\n *\n * @param fullCopy\n * @param size Initialize the array with a specific size. Will default to the current list size\n * @returns {Array}\n * @private\n */\nDenque.prototype._copyArray = function _copyArray(fullCopy, size) {\n var src = this._list;\n var capacity = src.length;\n var length = this.length;\n size = size | length;\n\n // No prealloc requested and the buffer is contiguous\n if (size == length && this._head < this._tail) {\n // Simply do a fast slice copy\n return this._list.slice(this._head, this._tail);\n }\n\n var dest = new Array(size);\n\n var k = 0;\n var i;\n if (fullCopy || this._head > this._tail) {\n for (i = this._head; i < capacity; i++) dest[k++] = src[i];\n for (i = 0; i < this._tail; i++) dest[k++] = src[i];\n } else {\n for (i = this._head; i < this._tail; i++) dest[k++] = src[i];\n }\n\n return dest;\n}\n\n/**\n * Grows the internal list array.\n * @private\n */\nDenque.prototype._growArray = function _growArray() {\n if (this._head != 0) {\n // double array size and copy existing data, head to end, then beginning to tail.\n var newList = this._copyArray(true, this._list.length << 1);\n\n this._tail = this._list.length;\n this._head = 0;\n\n this._list = newList;\n } else {\n this._tail = this._list.length;\n this._list.length <<= 1;\n }\n\n this._capacityMask = (this._capacityMask << 1) | 1;\n};\n\n/**\n * Shrinks the internal list array.\n * @private\n */\nDenque.prototype._shrinkArray = function _shrinkArray() {\n this._list.length >>>= 1;\n this._capacityMask >>>= 1;\n};\n\n/**\n * Find the next power of 2, at least 4\n * @private\n * @param {number} num \n * @returns {number}\n */\nDenque.prototype._nextPowerOf2 = function _nextPowerOf2(num) {\n var log2 = Math.log(num) / Math.log(2);\n var nextPow2 = 1 << (log2 + 1);\n\n return Math.max(nextPow2, 4);\n}\n\nmodule.exports = Denque;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"../utils\");\nconst Deque = require(\"denque\");\nconst debug = (0, utils_1.Debug)(\"delayqueue\");\n/**\n * Queue that runs items after specified duration\n */\nclass DelayQueue {\n constructor() {\n this.queues = {};\n this.timeouts = {};\n }\n /**\n * Add a new item to the queue\n *\n * @param bucket bucket name\n * @param item function that will run later\n * @param options\n */\n push(bucket, item, options) {\n const callback = options.callback || process.nextTick;\n if (!this.queues[bucket]) {\n this.queues[bucket] = new Deque();\n }\n const queue = this.queues[bucket];\n queue.push(item);\n if (!this.timeouts[bucket]) {\n this.timeouts[bucket] = setTimeout(() => {\n callback(() => {\n this.timeouts[bucket] = null;\n this.execute(bucket);\n });\n }, options.timeout);\n }\n }\n execute(bucket) {\n const queue = this.queues[bucket];\n if (!queue) {\n return;\n }\n const { length } = queue;\n if (!length) {\n return;\n }\n debug(\"send %d commands in %s queue\", length, bucket);\n this.queues[bucket] = null;\n while (queue.length > 0) {\n queue.shift()();\n }\n }\n}\nexports.default = DelayQueue;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"./util\");\nconst utils_1 = require(\"../utils\");\nconst Redis_1 = require(\"../Redis\");\nconst debug = (0, utils_1.Debug)(\"cluster:subscriberGroup:shardedSubscriber\");\nclass ShardedSubscriber {\n constructor(emitter, options) {\n this.emitter = emitter;\n this.started = false;\n this.instance = null;\n // Store listener references for cleanup\n this.messageListeners = new Map();\n this.onEnd = () => {\n this.started = false;\n this.emitter.emit(\"-node\", this.instance, this.nodeKey);\n };\n this.onError = (error) => {\n this.emitter.emit(\"nodeError\", error, this.nodeKey);\n };\n this.onMoved = () => {\n this.emitter.emit(\"moved\");\n };\n this.instance = new Redis_1.default({\n port: options.port,\n host: options.host,\n username: options.username,\n password: options.password,\n enableReadyCheck: false,\n offlineQueue: true,\n connectionName: (0, util_1.getConnectionName)(\"ssubscriber\", options.connectionName),\n lazyConnect: true,\n tls: options.tls,\n /**\n * Disable auto reconnection for subscribers.\n * The ClusterSubscriberGroup will handle the reconnection.\n */\n retryStrategy: null,\n });\n this.nodeKey = (0, util_1.getNodeKey)(options);\n // Register listeners\n this.instance.once(\"end\", this.onEnd);\n this.instance.on(\"error\", this.onError);\n this.instance.on(\"moved\", this.onMoved);\n for (const event of [\"smessage\", \"smessageBuffer\"]) {\n const listener = (...args) => {\n this.emitter.emit(event, ...args);\n };\n this.messageListeners.set(event, listener);\n this.instance.on(event, listener);\n }\n }\n async start() {\n if (this.started) {\n debug(\"already started %s\", this.nodeKey);\n return;\n }\n try {\n await this.instance.connect();\n debug(\"started %s\", this.nodeKey);\n this.started = true;\n }\n catch (err) {\n debug(\"failed to start %s: %s\", this.nodeKey, err);\n this.started = false;\n throw err; // Re-throw so caller knows it failed\n }\n }\n stop() {\n this.started = false;\n if (this.instance) {\n this.instance.disconnect();\n this.instance.removeAllListeners();\n this.messageListeners.clear();\n this.instance = null;\n }\n debug(\"stopped %s\", this.nodeKey);\n }\n isStarted() {\n return this.started;\n }\n getInstance() {\n return this.instance;\n }\n getNodeKey() {\n return this.nodeKey;\n }\n}\nexports.default = ShardedSubscriber;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"../utils\");\nconst util_1 = require(\"./util\");\nconst calculateSlot = require(\"cluster-key-slot\");\nconst ShardedSubscriber_1 = require(\"./ShardedSubscriber\");\nconst debug = (0, utils_1.Debug)(\"cluster:subscriberGroup\");\n/**\n * Redis distinguishes between \"normal\" and sharded PubSub. When using the normal PubSub feature,\n * exactly one subscriber exists per cluster instance because the Redis cluster bus forwards\n * messages between shards. Sharded PubSub removes this limitation by making each shard\n * responsible for its own messages.\n *\n * This class coordinates one ShardedSubscriber per master node in the cluster, providing\n * sharded PubSub support while keeping the public API backward compatible.\n */\nclass ClusterSubscriberGroup {\n /**\n * Register callbacks\n *\n * @param cluster\n */\n constructor(subscriberGroupEmitter) {\n this.subscriberGroupEmitter = subscriberGroupEmitter;\n this.shardedSubscribers = new Map();\n this.clusterSlots = [];\n // Simple [min, max] slot ranges aren't enough because you can migrate single slots\n this.subscriberToSlotsIndex = new Map();\n this.channels = new Map();\n this.failedAttemptsByNode = new Map();\n // Only latest pending reset kept; throttled by refreshSlotsCache's isRefreshing + backoff delay\n this.isResetting = false;\n this.pendingReset = null;\n /**\n * Handles failed subscriber connections by emitting an event to refresh the slots cache\n * after a backoff period.\n *\n * @param error\n * @param nodeKey\n */\n this.handleSubscriberConnectFailed = (error, nodeKey) => {\n const currentAttempts = this.failedAttemptsByNode.get(nodeKey) || 0;\n const failedAttempts = currentAttempts + 1;\n this.failedAttemptsByNode.set(nodeKey, failedAttempts);\n const attempts = Math.min(failedAttempts, ClusterSubscriberGroup.MAX_RETRY_ATTEMPTS);\n const backoff = Math.min(ClusterSubscriberGroup.BASE_BACKOFF_MS * 2 ** attempts, ClusterSubscriberGroup.MAX_BACKOFF_MS);\n const jitter = Math.floor((Math.random() - 0.5) * (backoff * 0.5));\n const delay = Math.max(0, backoff + jitter);\n debug(\"Failed to connect subscriber for %s. Refreshing slots in %dms\", nodeKey, delay);\n this.subscriberGroupEmitter.emit(\"subscriberConnectFailed\", {\n delay,\n error,\n });\n };\n /**\n * Handles successful subscriber connections by resetting the failed attempts counter.\n *\n * @param nodeKey\n */\n this.handleSubscriberConnectSucceeded = (nodeKey) => {\n this.failedAttemptsByNode.delete(nodeKey);\n };\n }\n /**\n * Get the responsible subscriber.\n *\n * @param slot\n */\n getResponsibleSubscriber(slot) {\n const nodeKey = this.clusterSlots[slot][0];\n return this.shardedSubscribers.get(nodeKey);\n }\n /**\n * Adds a channel for which this subscriber group is responsible\n *\n * @param channels\n */\n addChannels(channels) {\n const slot = calculateSlot(channels[0]);\n // Check if the all channels belong to the same slot and otherwise reject the operation\n for (const c of channels) {\n if (calculateSlot(c) !== slot) {\n return -1;\n }\n }\n const currChannels = this.channels.get(slot);\n if (!currChannels) {\n this.channels.set(slot, channels);\n }\n else {\n this.channels.set(slot, currChannels.concat(channels));\n }\n return Array.from(this.channels.values()).reduce((sum, array) => sum + array.length, 0);\n }\n /**\n * Removes channels for which the subscriber group is responsible by optionally unsubscribing\n * @param channels\n */\n removeChannels(channels) {\n const slot = calculateSlot(channels[0]);\n // Check if the all channels belong to the same slot and otherwise reject the operation\n for (const c of channels) {\n if (calculateSlot(c) !== slot) {\n return -1;\n }\n }\n const slotChannels = this.channels.get(slot);\n if (slotChannels) {\n const updatedChannels = slotChannels.filter((c) => !channels.includes(c));\n this.channels.set(slot, updatedChannels);\n }\n return Array.from(this.channels.values()).reduce((sum, array) => sum + array.length, 0);\n }\n /**\n * Disconnect all subscribers and clear some of the internal state.\n */\n stop() {\n for (const s of this.shardedSubscribers.values()) {\n s.stop();\n }\n // Clear subscriber instances and pending operations.\n // Channels are preserved for resubscription on reconnect.\n this.pendingReset = null;\n this.shardedSubscribers.clear();\n this.subscriberToSlotsIndex.clear();\n }\n /**\n * Start all not yet started subscribers\n */\n start() {\n const startPromises = [];\n for (const s of this.shardedSubscribers.values()) {\n if (!s.isStarted()) {\n startPromises.push(s\n .start()\n .then(() => {\n this.handleSubscriberConnectSucceeded(s.getNodeKey());\n })\n .catch((err) => {\n this.handleSubscriberConnectFailed(err, s.getNodeKey());\n }));\n }\n }\n return Promise.all(startPromises);\n }\n /**\n * Resets the subscriber group by disconnecting all subscribers that are no longer needed and connecting new ones.\n */\n async reset(clusterSlots, clusterNodes) {\n if (this.isResetting) {\n this.pendingReset = { slots: clusterSlots, nodes: clusterNodes };\n return;\n }\n this.isResetting = true;\n try {\n const hasTopologyChanged = this._refreshSlots(clusterSlots);\n const hasFailedSubscribers = this.hasUnhealthySubscribers();\n if (!hasTopologyChanged && !hasFailedSubscribers) {\n debug(\"No topology change detected or failed subscribers. Skipping reset.\");\n return;\n }\n // For each of the sharded subscribers\n for (const [nodeKey, shardedSubscriber] of this.shardedSubscribers) {\n if (\n // If the subscriber is still responsible for a slot range and is running then keep it\n this.subscriberToSlotsIndex.has(nodeKey) &&\n shardedSubscriber.isStarted()) {\n debug(\"Skipping deleting subscriber for %s\", nodeKey);\n continue;\n }\n debug(\"Removing subscriber for %s\", nodeKey);\n // Otherwise stop the subscriber and remove it\n shardedSubscriber.stop();\n this.shardedSubscribers.delete(nodeKey);\n this.subscriberGroupEmitter.emit(\"-subscriber\");\n }\n const startPromises = [];\n // For each node in slots cache\n for (const [nodeKey, _] of this.subscriberToSlotsIndex) {\n // If we already have a subscriber for this node then keep it\n if (this.shardedSubscribers.has(nodeKey)) {\n debug(\"Skipping creating new subscriber for %s\", nodeKey);\n continue;\n }\n debug(\"Creating new subscriber for %s\", nodeKey);\n // Otherwise create a new subscriber\n const redis = clusterNodes.find((node) => {\n return (0, util_1.getNodeKey)(node.options) === nodeKey;\n });\n if (!redis) {\n debug(\"Failed to find node for key %s\", nodeKey);\n continue;\n }\n const sub = new ShardedSubscriber_1.default(this.subscriberGroupEmitter, redis.options);\n this.shardedSubscribers.set(nodeKey, sub);\n startPromises.push(sub\n .start()\n .then(() => {\n this.handleSubscriberConnectSucceeded(nodeKey);\n })\n .catch((error) => {\n this.handleSubscriberConnectFailed(error, nodeKey);\n }));\n this.subscriberGroupEmitter.emit(\"+subscriber\");\n }\n // It's vital to await the start promises before resubscribing\n // Otherwise we might try to resubscribe to a subscriber that is not yet connected\n // This can cause a race condition\n await Promise.all(startPromises);\n this._resubscribe();\n this.subscriberGroupEmitter.emit(\"subscribersReady\");\n }\n finally {\n this.isResetting = false;\n if (this.pendingReset) {\n const { slots, nodes } = this.pendingReset;\n this.pendingReset = null;\n await this.reset(slots, nodes);\n }\n }\n }\n /**\n * Refreshes the subscriber-related slot ranges\n *\n * Returns false if no refresh was needed\n *\n * @param targetSlots\n */\n _refreshSlots(targetSlots) {\n //If there was an actual change, then reassign the slot ranges\n if (this._slotsAreEqual(targetSlots)) {\n debug(\"Nothing to refresh because the new cluster map is equal to the previous one.\");\n return false;\n }\n debug(\"Refreshing the slots of the subscriber group.\");\n //Rebuild the slots index\n this.subscriberToSlotsIndex = new Map();\n for (let slot = 0; slot < targetSlots.length; slot++) {\n const node = targetSlots[slot][0];\n if (!this.subscriberToSlotsIndex.has(node)) {\n this.subscriberToSlotsIndex.set(node, []);\n }\n this.subscriberToSlotsIndex.get(node).push(Number(slot));\n }\n //Update the cached slots map\n this.clusterSlots = JSON.parse(JSON.stringify(targetSlots));\n return true;\n }\n /**\n * Resubscribes to the previous channels\n *\n * @private\n */\n _resubscribe() {\n if (this.shardedSubscribers) {\n this.shardedSubscribers.forEach((s, nodeKey) => {\n const subscriberSlots = this.subscriberToSlotsIndex.get(nodeKey);\n if (subscriberSlots) {\n //Resubscribe on the underlying connection\n subscriberSlots.forEach((ss) => {\n //Might return null if being disconnected\n const redis = s.getInstance();\n const channels = this.channels.get(ss);\n if (channels && channels.length > 0) {\n if (redis.status === \"end\") {\n return;\n }\n if (redis.status === \"ready\") {\n redis.ssubscribe(...channels).catch((err) => {\n // TODO: Should we emit an error event here?\n debug(\"Failed to ssubscribe on node %s: %s\", nodeKey, err);\n });\n }\n else {\n redis.once(\"ready\", () => {\n redis.ssubscribe(...channels).catch((err) => {\n // TODO: Should we emit an error event here?\n debug(\"Failed to ssubscribe on node %s: %s\", nodeKey, err);\n });\n });\n }\n }\n });\n }\n });\n }\n }\n /**\n * Deep equality of the cluster slots objects\n *\n * @param other\n * @private\n */\n _slotsAreEqual(other) {\n if (this.clusterSlots === undefined) {\n return false;\n }\n else {\n return JSON.stringify(this.clusterSlots) === JSON.stringify(other);\n }\n }\n /**\n * Checks if any subscribers are in an unhealthy state.\n *\n * A subscriber is considered unhealthy if:\n * - It exists but is not started (failed/disconnected)\n * - It's missing entirely for a node that should have one\n *\n * @returns true if any subscribers need to be recreated\n */\n hasUnhealthySubscribers() {\n const hasFailedSubscribers = Array.from(this.shardedSubscribers.values()).some((sub) => !sub.isStarted());\n const hasMissingSubscribers = Array.from(this.subscriberToSlotsIndex.keys()).some((nodeKey) => !this.shardedSubscribers.has(nodeKey));\n return hasFailedSubscribers || hasMissingSubscribers;\n }\n}\nexports.default = ClusterSubscriberGroup;\n// Retry strategy\nClusterSubscriberGroup.MAX_RETRY_ATTEMPTS = 10;\nClusterSubscriberGroup.MAX_BACKOFF_MS = 2000;\nClusterSubscriberGroup.BASE_BACKOFF_MS = 100;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst commands_1 = require(\"@ioredis/commands\");\nconst events_1 = require(\"events\");\nconst redis_errors_1 = require(\"redis-errors\");\nconst standard_as_callback_1 = require(\"standard-as-callback\");\nconst Command_1 = require(\"../Command\");\nconst ClusterAllFailedError_1 = require(\"../errors/ClusterAllFailedError\");\nconst Redis_1 = require(\"../Redis\");\nconst ScanStream_1 = require(\"../ScanStream\");\nconst transaction_1 = require(\"../transaction\");\nconst utils_1 = require(\"../utils\");\nconst applyMixin_1 = require(\"../utils/applyMixin\");\nconst Commander_1 = require(\"../utils/Commander\");\nconst ClusterOptions_1 = require(\"./ClusterOptions\");\nconst ClusterSubscriber_1 = require(\"./ClusterSubscriber\");\nconst ConnectionPool_1 = require(\"./ConnectionPool\");\nconst DelayQueue_1 = require(\"./DelayQueue\");\nconst util_1 = require(\"./util\");\nconst Deque = require(\"denque\");\nconst ClusterSubscriberGroup_1 = require(\"./ClusterSubscriberGroup\");\nconst debug = (0, utils_1.Debug)(\"cluster\");\nconst REJECT_OVERWRITTEN_COMMANDS = new WeakSet();\n/**\n * Client for the official Redis Cluster\n */\nclass Cluster extends Commander_1.default {\n /**\n * Creates an instance of Cluster.\n */\n //TODO: Add an option that enables or disables sharded PubSub\n constructor(startupNodes, options = {}) {\n super();\n this.slots = [];\n /**\n * @ignore\n */\n this._groupsIds = {};\n /**\n * @ignore\n */\n this._groupsBySlot = Array(16384);\n /**\n * @ignore\n */\n this.isCluster = true;\n this.retryAttempts = 0;\n this.delayQueue = new DelayQueue_1.default();\n this.offlineQueue = new Deque();\n this.isRefreshing = false;\n this._refreshSlotsCacheCallbacks = [];\n this._autoPipelines = new Map();\n this._runningAutoPipelines = new Set();\n this._readyDelayedCallbacks = [];\n /**\n * Every time Cluster#connect() is called, this value will be\n * auto-incrementing. The purpose of this value is used for\n * discarding previous connect attampts when creating a new\n * connection.\n */\n this.connectionEpoch = 0;\n events_1.EventEmitter.call(this);\n this.startupNodes = startupNodes;\n this.options = (0, utils_1.defaults)({}, options, ClusterOptions_1.DEFAULT_CLUSTER_OPTIONS, this.options);\n if (this.options.shardedSubscribers) {\n this.createShardedSubscriberGroup();\n }\n if (this.options.redisOptions &&\n this.options.redisOptions.keyPrefix &&\n !this.options.keyPrefix) {\n this.options.keyPrefix = this.options.redisOptions.keyPrefix;\n }\n // validate options\n if (typeof this.options.scaleReads !== \"function\" &&\n [\"all\", \"master\", \"slave\"].indexOf(this.options.scaleReads) === -1) {\n throw new Error('Invalid option scaleReads \"' +\n this.options.scaleReads +\n '\". Expected \"all\", \"master\", \"slave\" or a custom function');\n }\n this.connectionPool = new ConnectionPool_1.default(this.options.redisOptions);\n this.connectionPool.on(\"-node\", (redis, key) => {\n this.emit(\"-node\", redis);\n });\n this.connectionPool.on(\"+node\", (redis) => {\n this.emit(\"+node\", redis);\n });\n this.connectionPool.on(\"drain\", () => {\n this.setStatus(\"close\");\n });\n this.connectionPool.on(\"nodeError\", (error, key) => {\n this.emit(\"node error\", error, key);\n });\n this.subscriber = new ClusterSubscriber_1.default(this.connectionPool, this);\n if (this.options.scripts) {\n Object.entries(this.options.scripts).forEach(([name, definition]) => {\n this.defineCommand(name, definition);\n });\n }\n if (this.options.lazyConnect) {\n this.setStatus(\"wait\");\n }\n else {\n this.connect().catch((err) => {\n debug(\"connecting failed: %s\", err);\n });\n }\n }\n /**\n * Connect to a cluster\n */\n connect() {\n return new Promise((resolve, reject) => {\n if (this.status === \"connecting\" ||\n this.status === \"connect\" ||\n this.status === \"ready\") {\n reject(new Error(\"Redis is already connecting/connected\"));\n return;\n }\n const epoch = ++this.connectionEpoch;\n this.setStatus(\"connecting\");\n this.resolveStartupNodeHostnames()\n .then((nodes) => {\n if (this.connectionEpoch !== epoch) {\n debug(\"discard connecting after resolving startup nodes because epoch not match: %d != %d\", epoch, this.connectionEpoch);\n reject(new redis_errors_1.RedisError(\"Connection is discarded because a new connection is made\"));\n return;\n }\n if (this.status !== \"connecting\") {\n debug(\"discard connecting after resolving startup nodes because the status changed to %s\", this.status);\n reject(new redis_errors_1.RedisError(\"Connection is aborted\"));\n return;\n }\n this.connectionPool.reset(nodes);\n if (this.options.shardedSubscribers) {\n this.shardedSubscribers\n .reset(this.slots, this.connectionPool.getNodes(\"all\"))\n .catch((err) => {\n // TODO should we emit an error event here?\n debug(\"Error while starting subscribers: %s\", err);\n });\n }\n const readyHandler = () => {\n this.setStatus(\"ready\");\n this.retryAttempts = 0;\n this.executeOfflineCommands();\n this.resetNodesRefreshInterval();\n resolve();\n };\n let closeListener = undefined;\n const refreshListener = () => {\n this.invokeReadyDelayedCallbacks(undefined);\n this.removeListener(\"close\", closeListener);\n this.manuallyClosing = false;\n this.setStatus(\"connect\");\n if (this.options.enableReadyCheck) {\n this.readyCheck((err, fail) => {\n if (err || fail) {\n debug(\"Ready check failed (%s). Reconnecting...\", err || fail);\n if (this.status === \"connect\") {\n this.disconnect(true);\n }\n }\n else {\n readyHandler();\n }\n });\n }\n else {\n readyHandler();\n }\n };\n closeListener = () => {\n const error = new Error(\"None of startup nodes is available\");\n this.removeListener(\"refresh\", refreshListener);\n this.invokeReadyDelayedCallbacks(error);\n reject(error);\n };\n this.once(\"refresh\", refreshListener);\n this.once(\"close\", closeListener);\n this.once(\"close\", this.handleCloseEvent.bind(this));\n this.refreshSlotsCache((err) => {\n if (err && err.message === ClusterAllFailedError_1.default.defaultMessage) {\n Redis_1.default.prototype.silentEmit.call(this, \"error\", err);\n this.connectionPool.reset([]);\n }\n });\n this.subscriber.start();\n if (this.options.shardedSubscribers) {\n this.shardedSubscribers.start().catch((err) => {\n // TODO should we emit an error event here?\n debug(\"Error while starting subscribers: %s\", err);\n });\n }\n })\n .catch((err) => {\n this.setStatus(\"close\");\n this.handleCloseEvent(err);\n this.invokeReadyDelayedCallbacks(err);\n reject(err);\n });\n });\n }\n /**\n * Disconnect from every node in the cluster.\n */\n disconnect(reconnect = false) {\n const status = this.status;\n this.setStatus(\"disconnecting\");\n if (!reconnect) {\n this.manuallyClosing = true;\n }\n if (this.reconnectTimeout && !reconnect) {\n clearTimeout(this.reconnectTimeout);\n this.reconnectTimeout = null;\n debug(\"Canceled reconnecting attempts\");\n }\n this.clearNodesRefreshInterval();\n this.subscriber.stop();\n if (this.options.shardedSubscribers) {\n this.shardedSubscribers.stop();\n }\n if (status === \"wait\") {\n this.setStatus(\"close\");\n this.handleCloseEvent();\n }\n else {\n this.connectionPool.reset([]);\n }\n }\n /**\n * Quit the cluster gracefully.\n */\n quit(callback) {\n const status = this.status;\n this.setStatus(\"disconnecting\");\n this.manuallyClosing = true;\n if (this.reconnectTimeout) {\n clearTimeout(this.reconnectTimeout);\n this.reconnectTimeout = null;\n }\n this.clearNodesRefreshInterval();\n this.subscriber.stop();\n if (this.options.shardedSubscribers) {\n this.shardedSubscribers.stop();\n }\n if (status === \"wait\") {\n const ret = (0, standard_as_callback_1.default)(Promise.resolve(\"OK\"), callback);\n // use setImmediate to make sure \"close\" event\n // being emitted after quit() is returned\n setImmediate(function () {\n this.setStatus(\"close\");\n this.handleCloseEvent();\n }.bind(this));\n return ret;\n }\n return (0, standard_as_callback_1.default)(Promise.all(this.nodes().map((node) => node.quit().catch((err) => {\n // Ignore the error caused by disconnecting since\n // we're disconnecting...\n if (err.message === utils_1.CONNECTION_CLOSED_ERROR_MSG) {\n return \"OK\";\n }\n throw err;\n }))).then(() => \"OK\"), callback);\n }\n /**\n * Create a new instance with the same startup nodes and options as the current one.\n *\n * @example\n * ```js\n * var cluster = new Redis.Cluster([{ host: \"127.0.0.1\", port: \"30001\" }]);\n * var anotherCluster = cluster.duplicate();\n * ```\n */\n duplicate(overrideStartupNodes = [], overrideOptions = {}) {\n const startupNodes = overrideStartupNodes.length > 0\n ? overrideStartupNodes\n : this.startupNodes.slice(0);\n const options = Object.assign({}, this.options, overrideOptions);\n return new Cluster(startupNodes, options);\n }\n /**\n * Get nodes with the specified role\n */\n nodes(role = \"all\") {\n if (role !== \"all\" && role !== \"master\" && role !== \"slave\") {\n throw new Error('Invalid role \"' + role + '\". Expected \"all\", \"master\" or \"slave\"');\n }\n return this.connectionPool.getNodes(role);\n }\n /**\n * This is needed in order not to install a listener for each auto pipeline\n *\n * @ignore\n */\n delayUntilReady(callback) {\n this._readyDelayedCallbacks.push(callback);\n }\n /**\n * Get the number of commands queued in automatic pipelines.\n *\n * This is not available (and returns 0) until the cluster is connected and slots information have been received.\n */\n get autoPipelineQueueSize() {\n let queued = 0;\n for (const pipeline of this._autoPipelines.values()) {\n queued += pipeline.length;\n }\n return queued;\n }\n /**\n * Refresh the slot cache\n *\n * @ignore\n */\n refreshSlotsCache(callback) {\n if (callback) {\n this._refreshSlotsCacheCallbacks.push(callback);\n }\n if (this.isRefreshing) {\n return;\n }\n this.isRefreshing = true;\n const _this = this;\n const wrapper = (error) => {\n this.isRefreshing = false;\n for (const callback of this._refreshSlotsCacheCallbacks) {\n callback(error);\n }\n this._refreshSlotsCacheCallbacks = [];\n };\n const nodes = (0, utils_1.shuffle)(this.connectionPool.getNodes());\n let lastNodeError = null;\n function tryNode(index) {\n if (index === nodes.length) {\n const error = new ClusterAllFailedError_1.default(ClusterAllFailedError_1.default.defaultMessage, lastNodeError);\n return wrapper(error);\n }\n const node = nodes[index];\n const key = `${node.options.host}:${node.options.port}`;\n debug(\"getting slot cache from %s\", key);\n _this.getInfoFromNode(node, function (err) {\n switch (_this.status) {\n case \"close\":\n case \"end\":\n return wrapper(new Error(\"Cluster is disconnected.\"));\n case \"disconnecting\":\n return wrapper(new Error(\"Cluster is disconnecting.\"));\n }\n if (err) {\n _this.emit(\"node error\", err, key);\n lastNodeError = err;\n tryNode(index + 1);\n }\n else {\n _this.emit(\"refresh\");\n wrapper();\n }\n });\n }\n tryNode(0);\n }\n /**\n * @ignore\n */\n sendCommand(command, stream, node) {\n if (this.status === \"wait\") {\n this.connect().catch(utils_1.noop);\n }\n if (this.status === \"end\") {\n command.reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG));\n return command.promise;\n }\n let to = this.options.scaleReads;\n if (to !== \"master\") {\n const isCommandReadOnly = command.isReadOnly ||\n ((0, commands_1.exists)(command.name) && (0, commands_1.hasFlag)(command.name, \"readonly\"));\n if (!isCommandReadOnly) {\n to = \"master\";\n }\n }\n let targetSlot = node ? node.slot : command.getSlot();\n const ttl = {};\n const _this = this;\n if (!node && !REJECT_OVERWRITTEN_COMMANDS.has(command)) {\n REJECT_OVERWRITTEN_COMMANDS.add(command);\n const reject = command.reject;\n command.reject = function (err) {\n const partialTry = tryConnection.bind(null, true);\n _this.handleError(err, ttl, {\n moved: function (slot, key) {\n debug(\"command %s is moved to %s\", command.name, key);\n targetSlot = Number(slot);\n if (_this.slots[slot]) {\n _this.slots[slot][0] = key;\n }\n else {\n _this.slots[slot] = [key];\n }\n _this._groupsBySlot[slot] =\n _this._groupsIds[_this.slots[slot].join(\";\")];\n _this.connectionPool.findOrCreate(_this.natMapper(key));\n tryConnection();\n debug(\"refreshing slot caches... (triggered by MOVED error)\");\n _this.refreshSlotsCache();\n },\n ask: function (slot, key) {\n debug(\"command %s is required to ask %s:%s\", command.name, key);\n const mapped = _this.natMapper(key);\n _this.connectionPool.findOrCreate(mapped);\n tryConnection(false, `${mapped.host}:${mapped.port}`);\n },\n tryagain: partialTry,\n clusterDown: partialTry,\n connectionClosed: partialTry,\n maxRedirections: function (redirectionError) {\n reject.call(command, redirectionError);\n },\n defaults: function () {\n reject.call(command, err);\n },\n });\n };\n }\n tryConnection();\n function tryConnection(random, asking) {\n if (_this.status === \"end\") {\n command.reject(new redis_errors_1.AbortError(\"Cluster is ended.\"));\n return;\n }\n let redis;\n if (_this.status === \"ready\" || command.name === \"cluster\") {\n if (node && node.redis) {\n redis = node.redis;\n }\n else if (Command_1.default.checkFlag(\"ENTER_SUBSCRIBER_MODE\", command.name) ||\n Command_1.default.checkFlag(\"EXIT_SUBSCRIBER_MODE\", command.name)) {\n if (_this.options.shardedSubscribers &&\n (command.name == \"ssubscribe\" || command.name == \"sunsubscribe\")) {\n const sub = _this.shardedSubscribers.getResponsibleSubscriber(targetSlot);\n if (!sub) {\n command.reject(new redis_errors_1.AbortError(`No sharded subscriber for slot: ${targetSlot}`));\n return;\n }\n let status = -1;\n if (command.name == \"ssubscribe\") {\n status = _this.shardedSubscribers.addChannels(command.getKeys());\n }\n if (command.name == \"sunsubscribe\") {\n status = _this.shardedSubscribers.removeChannels(command.getKeys());\n }\n if (status !== -1) {\n redis = sub.getInstance();\n }\n else {\n command.reject(new redis_errors_1.AbortError(\"Possible CROSSSLOT error: All channels must hash to the same slot\"));\n }\n }\n else {\n redis = _this.subscriber.getInstance();\n }\n if (!redis) {\n command.reject(new redis_errors_1.AbortError(\"No subscriber for the cluster\"));\n return;\n }\n }\n else {\n if (!random) {\n if (typeof targetSlot === \"number\" && _this.slots[targetSlot]) {\n const nodeKeys = _this.slots[targetSlot];\n if (typeof to === \"function\") {\n const nodes = nodeKeys.map(function (key) {\n return _this.connectionPool.getInstanceByKey(key);\n });\n redis = to(nodes, command);\n if (Array.isArray(redis)) {\n redis = (0, utils_1.sample)(redis);\n }\n if (!redis) {\n redis = nodes[0];\n }\n }\n else {\n let key;\n if (to === \"all\") {\n key = (0, utils_1.sample)(nodeKeys);\n }\n else if (to === \"slave\" && nodeKeys.length > 1) {\n key = (0, utils_1.sample)(nodeKeys, 1);\n }\n else {\n key = nodeKeys[0];\n }\n redis = _this.connectionPool.getInstanceByKey(key);\n }\n }\n if (asking) {\n redis = _this.connectionPool.getInstanceByKey(asking);\n redis.asking();\n }\n }\n if (!redis) {\n redis =\n (typeof to === \"function\"\n ? null\n : _this.connectionPool.getSampleInstance(to)) ||\n _this.connectionPool.getSampleInstance(\"all\");\n }\n }\n if (node && !node.redis) {\n node.redis = redis;\n }\n }\n if (redis) {\n redis.sendCommand(command, stream);\n }\n else if (_this.options.enableOfflineQueue) {\n _this.offlineQueue.push({\n command: command,\n stream: stream,\n node: node,\n });\n }\n else {\n command.reject(new Error(\"Cluster isn't ready and enableOfflineQueue options is false\"));\n }\n }\n return command.promise;\n }\n sscanStream(key, options) {\n return this.createScanStream(\"sscan\", { key, options });\n }\n sscanBufferStream(key, options) {\n return this.createScanStream(\"sscanBuffer\", { key, options });\n }\n hscanStream(key, options) {\n return this.createScanStream(\"hscan\", { key, options });\n }\n hscanBufferStream(key, options) {\n return this.createScanStream(\"hscanBuffer\", { key, options });\n }\n zscanStream(key, options) {\n return this.createScanStream(\"zscan\", { key, options });\n }\n zscanBufferStream(key, options) {\n return this.createScanStream(\"zscanBuffer\", { key, options });\n }\n /**\n * @ignore\n */\n handleError(error, ttl, handlers) {\n if (typeof ttl.value === \"undefined\") {\n ttl.value = this.options.maxRedirections;\n }\n else {\n ttl.value -= 1;\n }\n if (ttl.value <= 0) {\n handlers.maxRedirections(new Error(\"Too many Cluster redirections. Last error: \" + error));\n return;\n }\n const errv = error.message.split(\" \");\n if (errv[0] === \"MOVED\") {\n const timeout = this.options.retryDelayOnMoved;\n if (timeout && typeof timeout === \"number\") {\n this.delayQueue.push(\"moved\", handlers.moved.bind(null, errv[1], errv[2]), { timeout });\n }\n else {\n handlers.moved(errv[1], errv[2]);\n }\n }\n else if (errv[0] === \"ASK\") {\n handlers.ask(errv[1], errv[2]);\n }\n else if (errv[0] === \"TRYAGAIN\") {\n this.delayQueue.push(\"tryagain\", handlers.tryagain, {\n timeout: this.options.retryDelayOnTryAgain,\n });\n }\n else if (errv[0] === \"CLUSTERDOWN\" &&\n this.options.retryDelayOnClusterDown > 0) {\n this.delayQueue.push(\"clusterdown\", handlers.connectionClosed, {\n timeout: this.options.retryDelayOnClusterDown,\n callback: this.refreshSlotsCache.bind(this),\n });\n }\n else if (error.message === utils_1.CONNECTION_CLOSED_ERROR_MSG &&\n this.options.retryDelayOnFailover > 0 &&\n this.status === \"ready\") {\n this.delayQueue.push(\"failover\", handlers.connectionClosed, {\n timeout: this.options.retryDelayOnFailover,\n callback: this.refreshSlotsCache.bind(this),\n });\n }\n else {\n handlers.defaults();\n }\n }\n resetOfflineQueue() {\n this.offlineQueue = new Deque();\n }\n clearNodesRefreshInterval() {\n if (this.slotsTimer) {\n clearTimeout(this.slotsTimer);\n this.slotsTimer = null;\n }\n }\n resetNodesRefreshInterval() {\n if (this.slotsTimer || !this.options.slotsRefreshInterval) {\n return;\n }\n const nextRound = () => {\n this.slotsTimer = setTimeout(() => {\n debug('refreshing slot caches... (triggered by \"slotsRefreshInterval\" option)');\n this.refreshSlotsCache(() => {\n nextRound();\n });\n }, this.options.slotsRefreshInterval);\n };\n nextRound();\n }\n /**\n * Change cluster instance's status\n */\n setStatus(status) {\n debug(\"status: %s -> %s\", this.status || \"[empty]\", status);\n this.status = status;\n process.nextTick(() => {\n this.emit(status);\n });\n }\n /**\n * Called when closed to check whether a reconnection should be made\n */\n handleCloseEvent(reason) {\n var _a;\n if (reason) {\n debug(\"closed because %s\", reason);\n }\n let retryDelay;\n if (!this.manuallyClosing &&\n typeof this.options.clusterRetryStrategy === \"function\") {\n retryDelay = this.options.clusterRetryStrategy.call(this, ++this.retryAttempts, reason);\n }\n if (typeof retryDelay === \"number\") {\n this.setStatus(\"reconnecting\");\n this.reconnectTimeout = setTimeout(() => {\n this.reconnectTimeout = null;\n debug(\"Cluster is disconnected. Retrying after %dms\", retryDelay);\n this.connect().catch(function (err) {\n debug(\"Got error %s when reconnecting. Ignoring...\", err);\n });\n }, retryDelay);\n }\n else {\n if (this.options.shardedSubscribers) {\n (_a = this.subscriberGroupEmitter) === null || _a === void 0 ? void 0 : _a.removeAllListeners();\n }\n this.setStatus(\"end\");\n this.flushQueue(new Error(\"None of startup nodes is available\"));\n }\n }\n /**\n * Flush offline queue with error.\n */\n flushQueue(error) {\n let item;\n while ((item = this.offlineQueue.shift())) {\n item.command.reject(error);\n }\n }\n executeOfflineCommands() {\n if (this.offlineQueue.length) {\n debug(\"send %d commands in offline queue\", this.offlineQueue.length);\n const offlineQueue = this.offlineQueue;\n this.resetOfflineQueue();\n let item;\n while ((item = offlineQueue.shift())) {\n this.sendCommand(item.command, item.stream, item.node);\n }\n }\n }\n natMapper(nodeKey) {\n const key = typeof nodeKey === \"string\"\n ? nodeKey\n : `${nodeKey.host}:${nodeKey.port}`;\n let mapped = null;\n if (this.options.natMap && typeof this.options.natMap === \"function\") {\n mapped = this.options.natMap(key);\n }\n else if (this.options.natMap && typeof this.options.natMap === \"object\") {\n mapped = this.options.natMap[key];\n }\n if (mapped) {\n debug(\"NAT mapping %s -> %O\", key, mapped);\n return Object.assign({}, mapped);\n }\n return typeof nodeKey === \"string\"\n ? (0, util_1.nodeKeyToRedisOptions)(nodeKey)\n : nodeKey;\n }\n getInfoFromNode(redis, callback) {\n if (!redis) {\n return callback(new Error(\"Node is disconnected\"));\n }\n // Use a duplication of the connection to avoid\n // timeouts when the connection is in the blocking\n // mode (e.g. waiting for BLPOP).\n const duplicatedConnection = redis.duplicate({\n enableOfflineQueue: true,\n enableReadyCheck: false,\n retryStrategy: null,\n connectionName: (0, util_1.getConnectionName)(\"refresher\", this.options.redisOptions && this.options.redisOptions.connectionName),\n });\n // Ignore error events since we will handle\n // exceptions for the CLUSTER SLOTS command.\n duplicatedConnection.on(\"error\", utils_1.noop);\n duplicatedConnection.cluster(\"SLOTS\", (0, utils_1.timeout)((err, result) => {\n duplicatedConnection.disconnect();\n if (err) {\n debug(\"error encountered running CLUSTER.SLOTS: %s\", err);\n return callback(err);\n }\n if (this.status === \"disconnecting\" ||\n this.status === \"close\" ||\n this.status === \"end\") {\n debug(\"ignore CLUSTER.SLOTS results (count: %d) since cluster status is %s\", result.length, this.status);\n callback();\n return;\n }\n const nodes = [];\n debug(\"cluster slots result count: %d\", result.length);\n for (let i = 0; i < result.length; ++i) {\n const items = result[i];\n const slotRangeStart = items[0];\n const slotRangeEnd = items[1];\n const keys = [];\n for (let j = 2; j < items.length; j++) {\n if (!items[j][0]) {\n continue;\n }\n const node = this.natMapper({\n host: items[j][0],\n port: items[j][1],\n });\n node.readOnly = j !== 2;\n nodes.push(node);\n keys.push(node.host + \":\" + node.port);\n }\n debug(\"cluster slots result [%d]: slots %d~%d served by %s\", i, slotRangeStart, slotRangeEnd, keys);\n for (let slot = slotRangeStart; slot <= slotRangeEnd; slot++) {\n this.slots[slot] = keys;\n }\n }\n // Assign to each node keys a numeric value to make autopipeline comparison faster.\n this._groupsIds = Object.create(null);\n let j = 0;\n for (let i = 0; i < 16384; i++) {\n const target = (this.slots[i] || []).join(\";\");\n if (!target.length) {\n this._groupsBySlot[i] = undefined;\n continue;\n }\n if (!this._groupsIds[target]) {\n this._groupsIds[target] = ++j;\n }\n this._groupsBySlot[i] = this._groupsIds[target];\n }\n this.connectionPool.reset(nodes);\n if (this.options.shardedSubscribers) {\n this.shardedSubscribers\n .reset(this.slots, this.connectionPool.getNodes(\"all\"))\n .catch((err) => {\n // TODO should we emit an error event here?\n debug(\"Error while starting subscribers: %s\", err);\n });\n }\n callback();\n }, this.options.slotsRefreshTimeout));\n }\n invokeReadyDelayedCallbacks(err) {\n for (const c of this._readyDelayedCallbacks) {\n process.nextTick(c, err);\n }\n this._readyDelayedCallbacks = [];\n }\n /**\n * Check whether Cluster is able to process commands\n */\n readyCheck(callback) {\n this.cluster(\"INFO\", (err, res) => {\n if (err) {\n return callback(err);\n }\n if (typeof res !== \"string\") {\n return callback();\n }\n let state;\n const lines = res.split(\"\\r\\n\");\n for (let i = 0; i < lines.length; ++i) {\n const parts = lines[i].split(\":\");\n if (parts[0] === \"cluster_state\") {\n state = parts[1];\n break;\n }\n }\n if (state === \"fail\") {\n debug(\"cluster state not ok (%s)\", state);\n callback(null, state);\n }\n else {\n callback();\n }\n });\n }\n resolveSrv(hostname) {\n return new Promise((resolve, reject) => {\n this.options.resolveSrv(hostname, (err, records) => {\n if (err) {\n return reject(err);\n }\n const self = this, groupedRecords = (0, util_1.groupSrvRecords)(records), sortedKeys = Object.keys(groupedRecords).sort((a, b) => parseInt(a) - parseInt(b));\n function tryFirstOne(err) {\n if (!sortedKeys.length) {\n return reject(err);\n }\n const key = sortedKeys[0], group = groupedRecords[key], record = (0, util_1.weightSrvRecords)(group);\n if (!group.records.length) {\n sortedKeys.shift();\n }\n self.dnsLookup(record.name).then((host) => resolve({\n host,\n port: record.port,\n }), tryFirstOne);\n }\n tryFirstOne();\n });\n });\n }\n dnsLookup(hostname) {\n return new Promise((resolve, reject) => {\n this.options.dnsLookup(hostname, (err, address) => {\n if (err) {\n debug(\"failed to resolve hostname %s to IP: %s\", hostname, err.message);\n reject(err);\n }\n else {\n debug(\"resolved hostname %s to IP %s\", hostname, address);\n resolve(address);\n }\n });\n });\n }\n /**\n * Normalize startup nodes, and resolving hostnames to IPs.\n *\n * This process happens every time when #connect() is called since\n * #startupNodes and DNS records may chanage.\n */\n async resolveStartupNodeHostnames() {\n if (!Array.isArray(this.startupNodes) || this.startupNodes.length === 0) {\n throw new Error(\"`startupNodes` should contain at least one node.\");\n }\n const startupNodes = (0, util_1.normalizeNodeOptions)(this.startupNodes);\n const hostnames = (0, util_1.getUniqueHostnamesFromOptions)(startupNodes);\n if (hostnames.length === 0) {\n return startupNodes;\n }\n const configs = await Promise.all(hostnames.map((this.options.useSRVRecords ? this.resolveSrv : this.dnsLookup).bind(this)));\n const hostnameToConfig = (0, utils_1.zipMap)(hostnames, configs);\n return startupNodes.map((node) => {\n const config = hostnameToConfig.get(node.host);\n if (!config) {\n return node;\n }\n if (this.options.useSRVRecords) {\n return Object.assign({}, node, config);\n }\n return Object.assign({}, node, { host: config });\n });\n }\n createScanStream(command, { key, options = {} }) {\n return new ScanStream_1.default({\n objectMode: true,\n key: key,\n redis: this,\n command: command,\n ...options,\n });\n }\n createShardedSubscriberGroup() {\n this.subscriberGroupEmitter = new events_1.EventEmitter();\n this.shardedSubscribers = new ClusterSubscriberGroup_1.default(this.subscriberGroupEmitter);\n // Error handler used only for sharded-subscriber-triggered slots cache refreshes.\n // Normal (non-subscriber) connections are created with lazyConnect: true and can\n // become zombied. For sharded subscribers, a ClusterAllFailedError means\n // we have lost all nodes from the subscriber perspective and must tear down.\n const refreshSlotsCacheCallback = (err) => {\n // Disconnect only when refreshing the slots cache fails with ClusterAllFailedError\n if (err instanceof ClusterAllFailedError_1.default) {\n this.disconnect(true);\n }\n };\n this.subscriberGroupEmitter.on(\"-node\", (redis, nodeKey) => {\n this.emit(\"-node\", redis, nodeKey);\n this.refreshSlotsCache(refreshSlotsCacheCallback);\n });\n this.subscriberGroupEmitter.on(\"subscriberConnectFailed\", ({ delay, error }) => {\n this.emit(\"error\", error);\n setTimeout(() => {\n this.refreshSlotsCache(refreshSlotsCacheCallback);\n }, delay);\n });\n this.subscriberGroupEmitter.on(\"moved\", () => {\n this.refreshSlotsCache(refreshSlotsCacheCallback);\n });\n this.subscriberGroupEmitter.on(\"-subscriber\", () => {\n this.emit(\"-subscriber\");\n });\n this.subscriberGroupEmitter.on(\"+subscriber\", () => {\n this.emit(\"+subscriber\");\n });\n this.subscriberGroupEmitter.on(\"nodeError\", (error, nodeKey) => {\n this.emit(\"nodeError\", error, nodeKey);\n });\n this.subscriberGroupEmitter.on(\"subscribersReady\", () => {\n this.emit(\"subscribersReady\");\n });\n for (const event of [\"smessage\", \"smessageBuffer\"]) {\n this.subscriberGroupEmitter.on(event, (arg1, arg2, arg3) => {\n this.emit(event, arg1, arg2, arg3);\n });\n }\n }\n}\n(0, applyMixin_1.default)(Cluster, events_1.EventEmitter);\n(0, transaction_1.addTransactionSupport)(Cluster.prototype);\nexports.default = Cluster;\n", "import libDefault from 'tls';\nmodule.exports = libDefault;", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils_1 = require(\"../utils\");\nconst debug = (0, utils_1.Debug)(\"AbstractConnector\");\nclass AbstractConnector {\n constructor(disconnectTimeout) {\n this.connecting = false;\n this.disconnectTimeout = disconnectTimeout;\n }\n check(info) {\n return true;\n }\n disconnect() {\n this.connecting = false;\n if (this.stream) {\n const stream = this.stream; // Make sure callbacks refer to the same instance\n const timeout = setTimeout(() => {\n debug(\"stream %s:%s still open, destroying it\", stream.remoteAddress, stream.remotePort);\n stream.destroy();\n }, this.disconnectTimeout);\n stream.on(\"close\", () => clearTimeout(timeout));\n stream.end();\n }\n }\n}\nexports.default = AbstractConnector;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst net_1 = require(\"net\");\nconst tls_1 = require(\"tls\");\nconst utils_1 = require(\"../utils\");\nconst AbstractConnector_1 = require(\"./AbstractConnector\");\nclass StandaloneConnector extends AbstractConnector_1.default {\n constructor(options) {\n super(options.disconnectTimeout);\n this.options = options;\n }\n connect(_) {\n const { options } = this;\n this.connecting = true;\n let connectionOptions;\n if (\"path\" in options && options.path) {\n connectionOptions = {\n path: options.path,\n };\n }\n else {\n connectionOptions = {};\n if (\"port\" in options && options.port != null) {\n connectionOptions.port = options.port;\n }\n if (\"host\" in options && options.host != null) {\n connectionOptions.host = options.host;\n }\n if (\"family\" in options && options.family != null) {\n connectionOptions.family = options.family;\n }\n }\n if (options.tls) {\n Object.assign(connectionOptions, options.tls);\n }\n // TODO:\n // We use native Promise here since other Promise\n // implementation may use different schedulers that\n // cause issue when the stream is resolved in the\n // next tick.\n // Should use the provided promise in the next major\n // version and do not connect before resolved.\n return new Promise((resolve, reject) => {\n process.nextTick(() => {\n if (!this.connecting) {\n reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG));\n return;\n }\n try {\n if (options.tls) {\n this.stream = (0, tls_1.connect)(connectionOptions);\n }\n else {\n this.stream = (0, net_1.createConnection)(connectionOptions);\n }\n }\n catch (err) {\n reject(err);\n return;\n }\n this.stream.once(\"error\", (err) => {\n this.firstError = err;\n });\n resolve(this.stream);\n });\n });\n }\n}\nexports.default = StandaloneConnector;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction isSentinelEql(a, b) {\n return ((a.host || \"127.0.0.1\") === (b.host || \"127.0.0.1\") &&\n (a.port || 26379) === (b.port || 26379));\n}\nclass SentinelIterator {\n constructor(sentinels) {\n this.cursor = 0;\n this.sentinels = sentinels.slice(0);\n }\n next() {\n const done = this.cursor >= this.sentinels.length;\n return { done, value: done ? undefined : this.sentinels[this.cursor++] };\n }\n reset(moveCurrentEndpointToFirst) {\n if (moveCurrentEndpointToFirst &&\n this.sentinels.length > 1 &&\n this.cursor !== 1) {\n this.sentinels.unshift(...this.sentinels.splice(this.cursor - 1));\n }\n this.cursor = 0;\n }\n add(sentinel) {\n for (let i = 0; i < this.sentinels.length; i++) {\n if (isSentinelEql(sentinel, this.sentinels[i])) {\n return false;\n }\n }\n this.sentinels.push(sentinel);\n return true;\n }\n toString() {\n return `${JSON.stringify(this.sentinels)} @${this.cursor}`;\n }\n}\nexports.default = SentinelIterator;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FailoverDetector = void 0;\nconst utils_1 = require(\"../../utils\");\nconst debug = (0, utils_1.Debug)(\"FailoverDetector\");\nconst CHANNEL_NAME = \"+switch-master\";\nclass FailoverDetector {\n // sentinels can't be used for regular commands after this\n constructor(connector, sentinels) {\n this.isDisconnected = false;\n this.connector = connector;\n this.sentinels = sentinels;\n }\n cleanup() {\n this.isDisconnected = true;\n for (const sentinel of this.sentinels) {\n sentinel.client.disconnect();\n }\n }\n async subscribe() {\n debug(\"Starting FailoverDetector\");\n const promises = [];\n for (const sentinel of this.sentinels) {\n const promise = sentinel.client.subscribe(CHANNEL_NAME).catch((err) => {\n debug(\"Failed to subscribe to failover messages on sentinel %s:%s (%s)\", sentinel.address.host || \"127.0.0.1\", sentinel.address.port || 26739, err.message);\n });\n promises.push(promise);\n sentinel.client.on(\"message\", (channel) => {\n if (!this.isDisconnected && channel === CHANNEL_NAME) {\n this.disconnect();\n }\n });\n }\n await Promise.all(promises);\n }\n disconnect() {\n // Avoid disconnecting more than once per failover.\n // A new FailoverDetector will be created after reconnecting.\n this.isDisconnected = true;\n debug(\"Failover detected, disconnecting\");\n // Will call this.cleanup()\n this.connector.disconnect();\n }\n}\nexports.FailoverDetector = FailoverDetector;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SentinelIterator = void 0;\nconst net_1 = require(\"net\");\nconst utils_1 = require(\"../../utils\");\nconst tls_1 = require(\"tls\");\nconst SentinelIterator_1 = require(\"./SentinelIterator\");\nexports.SentinelIterator = SentinelIterator_1.default;\nconst AbstractConnector_1 = require(\"../AbstractConnector\");\nconst Redis_1 = require(\"../../Redis\");\nconst FailoverDetector_1 = require(\"./FailoverDetector\");\nconst debug = (0, utils_1.Debug)(\"SentinelConnector\");\nclass SentinelConnector extends AbstractConnector_1.default {\n constructor(options) {\n super(options.disconnectTimeout);\n this.options = options;\n this.emitter = null;\n this.failoverDetector = null;\n if (!this.options.sentinels.length) {\n throw new Error(\"Requires at least one sentinel to connect to.\");\n }\n if (!this.options.name) {\n throw new Error(\"Requires the name of master.\");\n }\n this.sentinelIterator = new SentinelIterator_1.default(this.options.sentinels);\n }\n check(info) {\n const roleMatches = !info.role || this.options.role === info.role;\n if (!roleMatches) {\n debug(\"role invalid, expected %s, but got %s\", this.options.role, info.role);\n // Start from the next item.\n // Note that `reset` will move the cursor to the previous element,\n // so we advance two steps here.\n this.sentinelIterator.next();\n this.sentinelIterator.next();\n this.sentinelIterator.reset(true);\n }\n return roleMatches;\n }\n disconnect() {\n super.disconnect();\n if (this.failoverDetector) {\n this.failoverDetector.cleanup();\n }\n }\n connect(eventEmitter) {\n this.connecting = true;\n this.retryAttempts = 0;\n let lastError;\n const connectToNext = async () => {\n const endpoint = this.sentinelIterator.next();\n if (endpoint.done) {\n this.sentinelIterator.reset(false);\n const retryDelay = typeof this.options.sentinelRetryStrategy === \"function\"\n ? this.options.sentinelRetryStrategy(++this.retryAttempts)\n : null;\n let errorMsg = typeof retryDelay !== \"number\"\n ? \"All sentinels are unreachable and retry is disabled.\"\n : `All sentinels are unreachable. Retrying from scratch after ${retryDelay}ms.`;\n if (lastError) {\n errorMsg += ` Last error: ${lastError.message}`;\n }\n debug(errorMsg);\n const error = new Error(errorMsg);\n if (typeof retryDelay === \"number\") {\n eventEmitter(\"error\", error);\n await new Promise((resolve) => setTimeout(resolve, retryDelay));\n return connectToNext();\n }\n else {\n throw error;\n }\n }\n let resolved = null;\n let err = null;\n try {\n resolved = await this.resolve(endpoint.value);\n }\n catch (error) {\n err = error;\n }\n if (!this.connecting) {\n throw new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG);\n }\n const endpointAddress = endpoint.value.host + \":\" + endpoint.value.port;\n if (resolved) {\n debug(\"resolved: %s:%s from sentinel %s\", resolved.host, resolved.port, endpointAddress);\n if (this.options.enableTLSForSentinelMode && this.options.tls) {\n Object.assign(resolved, this.options.tls);\n this.stream = (0, tls_1.connect)(resolved);\n this.stream.once(\"secureConnect\", this.initFailoverDetector.bind(this));\n }\n else {\n this.stream = (0, net_1.createConnection)(resolved);\n this.stream.once(\"connect\", this.initFailoverDetector.bind(this));\n }\n this.stream.once(\"error\", (err) => {\n this.firstError = err;\n });\n return this.stream;\n }\n else {\n const errorMsg = err\n ? \"failed to connect to sentinel \" +\n endpointAddress +\n \" because \" +\n err.message\n : \"connected to sentinel \" +\n endpointAddress +\n \" successfully, but got an invalid reply: \" +\n resolved;\n debug(errorMsg);\n eventEmitter(\"sentinelError\", new Error(errorMsg));\n if (err) {\n lastError = err;\n }\n return connectToNext();\n }\n };\n return connectToNext();\n }\n async updateSentinels(client) {\n if (!this.options.updateSentinels) {\n return;\n }\n const result = await client.sentinel(\"sentinels\", this.options.name);\n if (!Array.isArray(result)) {\n return;\n }\n result\n .map(utils_1.packObject)\n .forEach((sentinel) => {\n const flags = sentinel.flags ? sentinel.flags.split(\",\") : [];\n if (flags.indexOf(\"disconnected\") === -1 &&\n sentinel.ip &&\n sentinel.port) {\n const endpoint = this.sentinelNatResolve(addressResponseToAddress(sentinel));\n if (this.sentinelIterator.add(endpoint)) {\n debug(\"adding sentinel %s:%s\", endpoint.host, endpoint.port);\n }\n }\n });\n debug(\"Updated internal sentinels: %s\", this.sentinelIterator);\n }\n async resolveMaster(client) {\n const result = await client.sentinel(\"get-master-addr-by-name\", this.options.name);\n await this.updateSentinels(client);\n return this.sentinelNatResolve(Array.isArray(result)\n ? { host: result[0], port: Number(result[1]) }\n : null);\n }\n async resolveSlave(client) {\n const result = await client.sentinel(\"slaves\", this.options.name);\n if (!Array.isArray(result)) {\n return null;\n }\n const availableSlaves = result\n .map(utils_1.packObject)\n .filter((slave) => slave.flags && !slave.flags.match(/(disconnected|s_down|o_down)/));\n return this.sentinelNatResolve(selectPreferredSentinel(availableSlaves, this.options.preferredSlaves));\n }\n sentinelNatResolve(item) {\n if (!item || !this.options.natMap)\n return item;\n const key = `${item.host}:${item.port}`;\n let result = item;\n if (typeof this.options.natMap === \"function\") {\n result = this.options.natMap(key) || item;\n }\n else if (typeof this.options.natMap === \"object\") {\n result = this.options.natMap[key] || item;\n }\n return result;\n }\n connectToSentinel(endpoint, options) {\n const redis = new Redis_1.default({\n port: endpoint.port || 26379,\n host: endpoint.host,\n username: this.options.sentinelUsername || null,\n password: this.options.sentinelPassword || null,\n family: endpoint.family ||\n // @ts-expect-error\n (\"path\" in this.options && this.options.path\n ? undefined\n : // @ts-expect-error\n this.options.family),\n tls: this.options.sentinelTLS,\n retryStrategy: null,\n enableReadyCheck: false,\n connectTimeout: this.options.connectTimeout,\n commandTimeout: this.options.sentinelCommandTimeout,\n ...options,\n });\n // @ts-expect-error\n return redis;\n }\n async resolve(endpoint) {\n const client = this.connectToSentinel(endpoint);\n // ignore the errors since resolve* methods will handle them\n client.on(\"error\", noop);\n try {\n if (this.options.role === \"slave\") {\n return await this.resolveSlave(client);\n }\n else {\n return await this.resolveMaster(client);\n }\n }\n finally {\n client.disconnect();\n }\n }\n async initFailoverDetector() {\n var _a;\n if (!this.options.failoverDetector) {\n return;\n }\n // Move the current sentinel to the first position\n this.sentinelIterator.reset(true);\n const sentinels = [];\n // In case of a large amount of sentinels, limit the number of concurrent connections\n while (sentinels.length < this.options.sentinelMaxConnections) {\n const { done, value } = this.sentinelIterator.next();\n if (done) {\n break;\n }\n const client = this.connectToSentinel(value, {\n lazyConnect: true,\n retryStrategy: this.options.sentinelReconnectStrategy,\n });\n client.on(\"reconnecting\", () => {\n var _a;\n // Tests listen to this event\n (_a = this.emitter) === null || _a === void 0 ? void 0 : _a.emit(\"sentinelReconnecting\");\n });\n sentinels.push({ address: value, client });\n }\n this.sentinelIterator.reset(false);\n if (this.failoverDetector) {\n // Clean up previous detector\n this.failoverDetector.cleanup();\n }\n this.failoverDetector = new FailoverDetector_1.FailoverDetector(this, sentinels);\n await this.failoverDetector.subscribe();\n // Tests listen to this event\n (_a = this.emitter) === null || _a === void 0 ? void 0 : _a.emit(\"failoverSubscribed\");\n }\n}\nexports.default = SentinelConnector;\nfunction selectPreferredSentinel(availableSlaves, preferredSlaves) {\n if (availableSlaves.length === 0) {\n return null;\n }\n let selectedSlave;\n if (typeof preferredSlaves === \"function\") {\n selectedSlave = preferredSlaves(availableSlaves);\n }\n else if (preferredSlaves !== null && typeof preferredSlaves === \"object\") {\n const preferredSlavesArray = Array.isArray(preferredSlaves)\n ? preferredSlaves\n : [preferredSlaves];\n // sort by priority\n preferredSlavesArray.sort((a, b) => {\n // default the priority to 1\n if (!a.prio) {\n a.prio = 1;\n }\n if (!b.prio) {\n b.prio = 1;\n }\n // lowest priority first\n if (a.prio < b.prio) {\n return -1;\n }\n if (a.prio > b.prio) {\n return 1;\n }\n return 0;\n });\n // loop over preferred slaves and return the first match\n for (let p = 0; p < preferredSlavesArray.length; p++) {\n for (let a = 0; a < availableSlaves.length; a++) {\n const slave = availableSlaves[a];\n if (slave.ip === preferredSlavesArray[p].ip) {\n if (slave.port === preferredSlavesArray[p].port) {\n selectedSlave = slave;\n break;\n }\n }\n }\n if (selectedSlave) {\n break;\n }\n }\n }\n // if none of the preferred slaves are available, a random available slave is returned\n if (!selectedSlave) {\n selectedSlave = (0, utils_1.sample)(availableSlaves);\n }\n return addressResponseToAddress(selectedSlave);\n}\nfunction addressResponseToAddress(input) {\n return { host: input.ip, port: Number(input.port) };\n}\nfunction noop() { }\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SentinelConnector = exports.StandaloneConnector = void 0;\nconst StandaloneConnector_1 = require(\"./StandaloneConnector\");\nexports.StandaloneConnector = StandaloneConnector_1.default;\nconst SentinelConnector_1 = require(\"./SentinelConnector\");\nexports.SentinelConnector = SentinelConnector_1.default;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst redis_errors_1 = require(\"redis-errors\");\nclass MaxRetriesPerRequestError extends redis_errors_1.AbortError {\n constructor(maxRetriesPerRequest) {\n const message = `Reached the max retries per request limit (which is ${maxRetriesPerRequest}). Refer to \"maxRetriesPerRequest\" option for details.`;\n super(message);\n Error.captureStackTrace(this, this.constructor);\n }\n get name() {\n return this.constructor.name;\n }\n}\nexports.default = MaxRetriesPerRequestError;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MaxRetriesPerRequestError = void 0;\nconst MaxRetriesPerRequestError_1 = require(\"./MaxRetriesPerRequestError\");\nexports.MaxRetriesPerRequestError = MaxRetriesPerRequestError_1.default;\n", "import libDefault from 'buffer';\nmodule.exports = libDefault;", "import libDefault from 'string_decoder';\nmodule.exports = libDefault;", "'use strict'\n\nconst Buffer = require('buffer').Buffer\nconst StringDecoder = require('string_decoder').StringDecoder\nconst decoder = new StringDecoder()\nconst errors = require('redis-errors')\nconst ReplyError = errors.ReplyError\nconst ParserError = errors.ParserError\nvar bufferPool = Buffer.allocUnsafe(32 * 1024)\nvar bufferOffset = 0\nvar interval = null\nvar counter = 0\nvar notDecreased = 0\n\n/**\n * Used for integer numbers only\n * @param {JavascriptRedisParser} parser\n * @returns {undefined|number}\n */\nfunction parseSimpleNumbers (parser) {\n const length = parser.buffer.length - 1\n var offset = parser.offset\n var number = 0\n var sign = 1\n\n if (parser.buffer[offset] === 45) {\n sign = -1\n offset++\n }\n\n while (offset < length) {\n const c1 = parser.buffer[offset++]\n if (c1 === 13) { // \\r\\n\n parser.offset = offset + 1\n return sign * number\n }\n number = (number * 10) + (c1 - 48)\n }\n}\n\n/**\n * Used for integer numbers in case of the returnNumbers option\n *\n * Reading the string as parts of n SMI is more efficient than\n * using a string directly.\n *\n * @param {JavascriptRedisParser} parser\n * @returns {undefined|string}\n */\nfunction parseStringNumbers (parser) {\n const length = parser.buffer.length - 1\n var offset = parser.offset\n var number = 0\n var res = ''\n\n if (parser.buffer[offset] === 45) {\n res += '-'\n offset++\n }\n\n while (offset < length) {\n var c1 = parser.buffer[offset++]\n if (c1 === 13) { // \\r\\n\n parser.offset = offset + 1\n if (number !== 0) {\n res += number\n }\n return res\n } else if (number > 429496728) {\n res += (number * 10) + (c1 - 48)\n number = 0\n } else if (c1 === 48 && number === 0) {\n res += 0\n } else {\n number = (number * 10) + (c1 - 48)\n }\n }\n}\n\n/**\n * Parse a '+' redis simple string response but forward the offsets\n * onto convertBufferRange to generate a string.\n * @param {JavascriptRedisParser} parser\n * @returns {undefined|string|Buffer}\n */\nfunction parseSimpleString (parser) {\n const start = parser.offset\n const buffer = parser.buffer\n const length = buffer.length - 1\n var offset = start\n\n while (offset < length) {\n if (buffer[offset++] === 13) { // \\r\\n\n parser.offset = offset + 1\n if (parser.optionReturnBuffers === true) {\n return parser.buffer.slice(start, offset - 1)\n }\n return parser.buffer.toString('utf8', start, offset - 1)\n }\n }\n}\n\n/**\n * Returns the read length\n * @param {JavascriptRedisParser} parser\n * @returns {undefined|number}\n */\nfunction parseLength (parser) {\n const length = parser.buffer.length - 1\n var offset = parser.offset\n var number = 0\n\n while (offset < length) {\n const c1 = parser.buffer[offset++]\n if (c1 === 13) {\n parser.offset = offset + 1\n return number\n }\n number = (number * 10) + (c1 - 48)\n }\n}\n\n/**\n * Parse a ':' redis integer response\n *\n * If stringNumbers is activated the parser always returns numbers as string\n * This is important for big numbers (number > Math.pow(2, 53)) as js numbers\n * are 64bit floating point numbers with reduced precision\n *\n * @param {JavascriptRedisParser} parser\n * @returns {undefined|number|string}\n */\nfunction parseInteger (parser) {\n if (parser.optionStringNumbers === true) {\n return parseStringNumbers(parser)\n }\n return parseSimpleNumbers(parser)\n}\n\n/**\n * Parse a '$' redis bulk string response\n * @param {JavascriptRedisParser} parser\n * @returns {undefined|null|string}\n */\nfunction parseBulkString (parser) {\n const length = parseLength(parser)\n if (length === undefined) {\n return\n }\n if (length < 0) {\n return null\n }\n const offset = parser.offset + length\n if (offset + 2 > parser.buffer.length) {\n parser.bigStrSize = offset + 2\n parser.totalChunkSize = parser.buffer.length\n parser.bufferCache.push(parser.buffer)\n return\n }\n const start = parser.offset\n parser.offset = offset + 2\n if (parser.optionReturnBuffers === true) {\n return parser.buffer.slice(start, offset)\n }\n return parser.buffer.toString('utf8', start, offset)\n}\n\n/**\n * Parse a '-' redis error response\n * @param {JavascriptRedisParser} parser\n * @returns {ReplyError}\n */\nfunction parseError (parser) {\n var string = parseSimpleString(parser)\n if (string !== undefined) {\n if (parser.optionReturnBuffers === true) {\n string = string.toString()\n }\n return new ReplyError(string)\n }\n}\n\n/**\n * Parsing error handler, resets parser buffer\n * @param {JavascriptRedisParser} parser\n * @param {number} type\n * @returns {undefined}\n */\nfunction handleError (parser, type) {\n const err = new ParserError(\n 'Protocol error, got ' + JSON.stringify(String.fromCharCode(type)) + ' as reply type byte',\n JSON.stringify(parser.buffer),\n parser.offset\n )\n parser.buffer = null\n parser.returnFatalError(err)\n}\n\n/**\n * Parse a '*' redis array response\n * @param {JavascriptRedisParser} parser\n * @returns {undefined|null|any[]}\n */\nfunction parseArray (parser) {\n const length = parseLength(parser)\n if (length === undefined) {\n return\n }\n if (length < 0) {\n return null\n }\n const responses = new Array(length)\n return parseArrayElements(parser, responses, 0)\n}\n\n/**\n * Push a partly parsed array to the stack\n *\n * @param {JavascriptRedisParser} parser\n * @param {any[]} array\n * @param {number} pos\n * @returns {undefined}\n */\nfunction pushArrayCache (parser, array, pos) {\n parser.arrayCache.push(array)\n parser.arrayPos.push(pos)\n}\n\n/**\n * Parse chunked redis array response\n * @param {JavascriptRedisParser} parser\n * @returns {undefined|any[]}\n */\nfunction parseArrayChunks (parser) {\n const tmp = parser.arrayCache.pop()\n var pos = parser.arrayPos.pop()\n if (parser.arrayCache.length) {\n const res = parseArrayChunks(parser)\n if (res === undefined) {\n pushArrayCache(parser, tmp, pos)\n return\n }\n tmp[pos++] = res\n }\n return parseArrayElements(parser, tmp, pos)\n}\n\n/**\n * Parse redis array response elements\n * @param {JavascriptRedisParser} parser\n * @param {Array} responses\n * @param {number} i\n * @returns {undefined|null|any[]}\n */\nfunction parseArrayElements (parser, responses, i) {\n const bufferLength = parser.buffer.length\n while (i < responses.length) {\n const offset = parser.offset\n if (parser.offset >= bufferLength) {\n pushArrayCache(parser, responses, i)\n return\n }\n const response = parseType(parser, parser.buffer[parser.offset++])\n if (response === undefined) {\n if (!(parser.arrayCache.length || parser.bufferCache.length)) {\n parser.offset = offset\n }\n pushArrayCache(parser, responses, i)\n return\n }\n responses[i] = response\n i++\n }\n\n return responses\n}\n\n/**\n * Called the appropriate parser for the specified type.\n *\n * 36: $\n * 43: +\n * 42: *\n * 58: :\n * 45: -\n *\n * @param {JavascriptRedisParser} parser\n * @param {number} type\n * @returns {*}\n */\nfunction parseType (parser, type) {\n switch (type) {\n case 36:\n return parseBulkString(parser)\n case 43:\n return parseSimpleString(parser)\n case 42:\n return parseArray(parser)\n case 58:\n return parseInteger(parser)\n case 45:\n return parseError(parser)\n default:\n return handleError(parser, type)\n }\n}\n\n/**\n * Decrease the bufferPool size over time\n *\n * Balance between increasing and decreasing the bufferPool.\n * Decrease the bufferPool by 10% by removing the first 10% of the current pool.\n * @returns {undefined}\n */\nfunction decreaseBufferPool () {\n if (bufferPool.length > 50 * 1024) {\n if (counter === 1 || notDecreased > counter * 2) {\n const minSliceLen = Math.floor(bufferPool.length / 10)\n const sliceLength = minSliceLen < bufferOffset\n ? bufferOffset\n : minSliceLen\n bufferOffset = 0\n bufferPool = bufferPool.slice(sliceLength, bufferPool.length)\n } else {\n notDecreased++\n counter--\n }\n } else {\n clearInterval(interval)\n counter = 0\n notDecreased = 0\n interval = null\n }\n}\n\n/**\n * Check if the requested size fits in the current bufferPool.\n * If it does not, reset and increase the bufferPool accordingly.\n *\n * @param {number} length\n * @returns {undefined}\n */\nfunction resizeBuffer (length) {\n if (bufferPool.length < length + bufferOffset) {\n const multiplier = length > 1024 * 1024 * 75 ? 2 : 3\n if (bufferOffset > 1024 * 1024 * 111) {\n bufferOffset = 1024 * 1024 * 50\n }\n bufferPool = Buffer.allocUnsafe(length * multiplier + bufferOffset)\n bufferOffset = 0\n counter++\n if (interval === null) {\n interval = setInterval(decreaseBufferPool, 50)\n }\n }\n}\n\n/**\n * Concat a bulk string containing multiple chunks\n *\n * Notes:\n * 1) The first chunk might contain the whole bulk string including the \\r\n * 2) We are only safe to fully add up elements that are neither the first nor any of the last two elements\n *\n * @param {JavascriptRedisParser} parser\n * @returns {String}\n */\nfunction concatBulkString (parser) {\n const list = parser.bufferCache\n const oldOffset = parser.offset\n var chunks = list.length\n var offset = parser.bigStrSize - parser.totalChunkSize\n parser.offset = offset\n if (offset <= 2) {\n if (chunks === 2) {\n return list[0].toString('utf8', oldOffset, list[0].length + offset - 2)\n }\n chunks--\n offset = list[list.length - 2].length + offset\n }\n var res = decoder.write(list[0].slice(oldOffset))\n for (var i = 1; i < chunks - 1; i++) {\n res += decoder.write(list[i])\n }\n res += decoder.end(list[i].slice(0, offset - 2))\n return res\n}\n\n/**\n * Concat the collected chunks from parser.bufferCache.\n *\n * Increases the bufferPool size beforehand if necessary.\n *\n * @param {JavascriptRedisParser} parser\n * @returns {Buffer}\n */\nfunction concatBulkBuffer (parser) {\n const list = parser.bufferCache\n const oldOffset = parser.offset\n const length = parser.bigStrSize - oldOffset - 2\n var chunks = list.length\n var offset = parser.bigStrSize - parser.totalChunkSize\n parser.offset = offset\n if (offset <= 2) {\n if (chunks === 2) {\n return list[0].slice(oldOffset, list[0].length + offset - 2)\n }\n chunks--\n offset = list[list.length - 2].length + offset\n }\n resizeBuffer(length)\n const start = bufferOffset\n list[0].copy(bufferPool, start, oldOffset, list[0].length)\n bufferOffset += list[0].length - oldOffset\n for (var i = 1; i < chunks - 1; i++) {\n list[i].copy(bufferPool, bufferOffset)\n bufferOffset += list[i].length\n }\n list[i].copy(bufferPool, bufferOffset, 0, offset - 2)\n bufferOffset += offset - 2\n return bufferPool.slice(start, bufferOffset)\n}\n\nclass JavascriptRedisParser {\n /**\n * Javascript Redis Parser constructor\n * @param {{returnError: Function, returnReply: Function, returnFatalError?: Function, returnBuffers: boolean, stringNumbers: boolean }} options\n * @constructor\n */\n constructor (options) {\n if (!options) {\n throw new TypeError('Options are mandatory.')\n }\n if (typeof options.returnError !== 'function' || typeof options.returnReply !== 'function') {\n throw new TypeError('The returnReply and returnError options have to be functions.')\n }\n this.setReturnBuffers(!!options.returnBuffers)\n this.setStringNumbers(!!options.stringNumbers)\n this.returnError = options.returnError\n this.returnFatalError = options.returnFatalError || options.returnError\n this.returnReply = options.returnReply\n this.reset()\n }\n\n /**\n * Reset the parser values to the initial state\n *\n * @returns {undefined}\n */\n reset () {\n this.offset = 0\n this.buffer = null\n this.bigStrSize = 0\n this.totalChunkSize = 0\n this.bufferCache = []\n this.arrayCache = []\n this.arrayPos = []\n }\n\n /**\n * Set the returnBuffers option\n *\n * @param {boolean} returnBuffers\n * @returns {undefined}\n */\n setReturnBuffers (returnBuffers) {\n if (typeof returnBuffers !== 'boolean') {\n throw new TypeError('The returnBuffers argument has to be a boolean')\n }\n this.optionReturnBuffers = returnBuffers\n }\n\n /**\n * Set the stringNumbers option\n *\n * @param {boolean} stringNumbers\n * @returns {undefined}\n */\n setStringNumbers (stringNumbers) {\n if (typeof stringNumbers !== 'boolean') {\n throw new TypeError('The stringNumbers argument has to be a boolean')\n }\n this.optionStringNumbers = stringNumbers\n }\n\n /**\n * Parse the redis buffer\n * @param {Buffer} buffer\n * @returns {undefined}\n */\n execute (buffer) {\n if (this.buffer === null) {\n this.buffer = buffer\n this.offset = 0\n } else if (this.bigStrSize === 0) {\n const oldLength = this.buffer.length\n const remainingLength = oldLength - this.offset\n const newBuffer = Buffer.allocUnsafe(remainingLength + buffer.length)\n this.buffer.copy(newBuffer, 0, this.offset, oldLength)\n buffer.copy(newBuffer, remainingLength, 0, buffer.length)\n this.buffer = newBuffer\n this.offset = 0\n if (this.arrayCache.length) {\n const arr = parseArrayChunks(this)\n if (arr === undefined) {\n return\n }\n this.returnReply(arr)\n }\n } else if (this.totalChunkSize + buffer.length >= this.bigStrSize) {\n this.bufferCache.push(buffer)\n var tmp = this.optionReturnBuffers ? concatBulkBuffer(this) : concatBulkString(this)\n this.bigStrSize = 0\n this.bufferCache = []\n this.buffer = buffer\n if (this.arrayCache.length) {\n this.arrayCache[0][this.arrayPos[0]++] = tmp\n tmp = parseArrayChunks(this)\n if (tmp === undefined) {\n return\n }\n }\n this.returnReply(tmp)\n } else {\n this.bufferCache.push(buffer)\n this.totalChunkSize += buffer.length\n return\n }\n\n while (this.offset < this.buffer.length) {\n const offset = this.offset\n const type = this.buffer[this.offset++]\n const response = parseType(this, type)\n if (response === undefined) {\n if (!(this.arrayCache.length || this.bufferCache.length)) {\n this.offset = offset\n }\n return\n }\n\n if (type === 45) {\n this.returnError(response)\n } else {\n this.returnReply(response)\n }\n }\n\n this.buffer = null\n }\n}\n\nmodule.exports = JavascriptRedisParser\n", "'use strict'\n\nmodule.exports = require('./lib/parser')\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Tiny class to simplify dealing with subscription set\n */\nclass SubscriptionSet {\n constructor() {\n this.set = {\n subscribe: {},\n psubscribe: {},\n ssubscribe: {},\n };\n }\n add(set, channel) {\n this.set[mapSet(set)][channel] = true;\n }\n del(set, channel) {\n delete this.set[mapSet(set)][channel];\n }\n channels(set) {\n return Object.keys(this.set[mapSet(set)]);\n }\n isEmpty() {\n return (this.channels(\"subscribe\").length === 0 &&\n this.channels(\"psubscribe\").length === 0 &&\n this.channels(\"ssubscribe\").length === 0);\n }\n}\nexports.default = SubscriptionSet;\nfunction mapSet(set) {\n if (set === \"unsubscribe\") {\n return \"subscribe\";\n }\n if (set === \"punsubscribe\") {\n return \"psubscribe\";\n }\n if (set === \"sunsubscribe\") {\n return \"ssubscribe\";\n }\n return set;\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Command_1 = require(\"./Command\");\nconst utils_1 = require(\"./utils\");\nconst RedisParser = require(\"redis-parser\");\nconst SubscriptionSet_1 = require(\"./SubscriptionSet\");\nconst debug = (0, utils_1.Debug)(\"dataHandler\");\nclass DataHandler {\n constructor(redis, parserOptions) {\n this.redis = redis;\n const parser = new RedisParser({\n stringNumbers: parserOptions.stringNumbers,\n returnBuffers: true,\n returnError: (err) => {\n this.returnError(err);\n },\n returnFatalError: (err) => {\n this.returnFatalError(err);\n },\n returnReply: (reply) => {\n this.returnReply(reply);\n },\n });\n // prependListener ensures the parser receives and processes data before socket timeout checks are performed\n redis.stream.prependListener(\"data\", (data) => {\n parser.execute(data);\n });\n // prependListener() doesn't enable flowing mode automatically - we need to resume the stream manually\n redis.stream.resume();\n }\n returnFatalError(err) {\n err.message += \". Please report this.\";\n this.redis.recoverFromFatalError(err, err, { offlineQueue: false });\n }\n returnError(err) {\n const item = this.shiftCommand(err);\n if (!item) {\n return;\n }\n err.command = {\n name: item.command.name,\n args: item.command.args,\n };\n if (item.command.name == \"ssubscribe\" && err.message.includes(\"MOVED\")) {\n this.redis.emit(\"moved\");\n return;\n }\n this.redis.handleReconnection(err, item);\n }\n returnReply(reply) {\n if (this.handleMonitorReply(reply)) {\n return;\n }\n if (this.handleSubscriberReply(reply)) {\n return;\n }\n const item = this.shiftCommand(reply);\n if (!item) {\n return;\n }\n if (Command_1.default.checkFlag(\"ENTER_SUBSCRIBER_MODE\", item.command.name)) {\n this.redis.condition.subscriber = new SubscriptionSet_1.default();\n this.redis.condition.subscriber.add(item.command.name, reply[1].toString());\n if (!fillSubCommand(item.command, reply[2])) {\n this.redis.commandQueue.unshift(item);\n }\n }\n else if (Command_1.default.checkFlag(\"EXIT_SUBSCRIBER_MODE\", item.command.name)) {\n if (!fillUnsubCommand(item.command, reply[2])) {\n this.redis.commandQueue.unshift(item);\n }\n }\n else {\n item.command.resolve(reply);\n }\n }\n handleSubscriberReply(reply) {\n if (!this.redis.condition.subscriber) {\n return false;\n }\n const replyType = Array.isArray(reply) ? reply[0].toString() : null;\n debug('receive reply \"%s\" in subscriber mode', replyType);\n switch (replyType) {\n case \"message\":\n if (this.redis.listeners(\"message\").length > 0) {\n // Check if there're listeners to avoid unnecessary `toString()`.\n this.redis.emit(\"message\", reply[1].toString(), reply[2] ? reply[2].toString() : \"\");\n }\n this.redis.emit(\"messageBuffer\", reply[1], reply[2]);\n break;\n case \"pmessage\": {\n const pattern = reply[1].toString();\n if (this.redis.listeners(\"pmessage\").length > 0) {\n this.redis.emit(\"pmessage\", pattern, reply[2].toString(), reply[3].toString());\n }\n this.redis.emit(\"pmessageBuffer\", pattern, reply[2], reply[3]);\n break;\n }\n case \"smessage\": {\n if (this.redis.listeners(\"smessage\").length > 0) {\n this.redis.emit(\"smessage\", reply[1].toString(), reply[2] ? reply[2].toString() : \"\");\n }\n this.redis.emit(\"smessageBuffer\", reply[1], reply[2]);\n break;\n }\n case \"ssubscribe\":\n case \"subscribe\":\n case \"psubscribe\": {\n const channel = reply[1].toString();\n this.redis.condition.subscriber.add(replyType, channel);\n const item = this.shiftCommand(reply);\n if (!item) {\n return;\n }\n if (!fillSubCommand(item.command, reply[2])) {\n this.redis.commandQueue.unshift(item);\n }\n break;\n }\n case \"sunsubscribe\":\n case \"unsubscribe\":\n case \"punsubscribe\": {\n const channel = reply[1] ? reply[1].toString() : null;\n if (channel) {\n this.redis.condition.subscriber.del(replyType, channel);\n }\n const count = reply[2];\n if (Number(count) === 0) {\n this.redis.condition.subscriber = false;\n }\n const item = this.shiftCommand(reply);\n if (!item) {\n return;\n }\n if (!fillUnsubCommand(item.command, count)) {\n this.redis.commandQueue.unshift(item);\n }\n break;\n }\n default: {\n const item = this.shiftCommand(reply);\n if (!item) {\n return;\n }\n item.command.resolve(reply);\n }\n }\n return true;\n }\n handleMonitorReply(reply) {\n if (this.redis.status !== \"monitoring\") {\n return false;\n }\n const replyStr = reply.toString();\n if (replyStr === \"OK\") {\n // Valid commands in the monitoring mode are AUTH and MONITOR,\n // both of which always reply with 'OK'.\n // So if we got an 'OK', we can make certain that\n // the reply is made to AUTH & MONITOR.\n return false;\n }\n // Since commands sent in the monitoring mode will trigger an exception,\n // any replies we received in the monitoring mode should consider to be\n // realtime monitor data instead of result of commands.\n const len = replyStr.indexOf(\" \");\n const timestamp = replyStr.slice(0, len);\n const argIndex = replyStr.indexOf('\"');\n const args = replyStr\n .slice(argIndex + 1, -1)\n .split('\" \"')\n .map((elem) => elem.replace(/\\\\\"/g, '\"'));\n const dbAndSource = replyStr.slice(len + 2, argIndex - 2).split(\" \");\n this.redis.emit(\"monitor\", timestamp, args, dbAndSource[1], dbAndSource[0]);\n return true;\n }\n shiftCommand(reply) {\n const item = this.redis.commandQueue.shift();\n if (!item) {\n const message = \"Command queue state error. If you can reproduce this, please report it.\";\n const error = new Error(message +\n (reply instanceof Error\n ? ` Last error: ${reply.message}`\n : ` Last reply: ${reply.toString()}`));\n this.redis.emit(\"error\", error);\n return null;\n }\n return item;\n }\n}\nexports.default = DataHandler;\nconst remainingRepliesMap = new WeakMap();\nfunction fillSubCommand(command, count) {\n let remainingReplies = remainingRepliesMap.has(command)\n ? remainingRepliesMap.get(command)\n : command.args.length;\n remainingReplies -= 1;\n if (remainingReplies <= 0) {\n command.resolve(count);\n remainingRepliesMap.delete(command);\n return true;\n }\n remainingRepliesMap.set(command, remainingReplies);\n return false;\n}\nfunction fillUnsubCommand(command, count) {\n let remainingReplies = remainingRepliesMap.has(command)\n ? remainingRepliesMap.get(command)\n : command.args.length;\n if (remainingReplies === 0) {\n if (Number(count) === 0) {\n remainingRepliesMap.delete(command);\n command.resolve(count);\n return true;\n }\n return false;\n }\n remainingReplies -= 1;\n if (remainingReplies <= 0) {\n command.resolve(count);\n return true;\n }\n remainingRepliesMap.set(command, remainingReplies);\n return false;\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.readyHandler = exports.errorHandler = exports.closeHandler = exports.connectHandler = void 0;\nconst redis_errors_1 = require(\"redis-errors\");\nconst Command_1 = require(\"../Command\");\nconst errors_1 = require(\"../errors\");\nconst utils_1 = require(\"../utils\");\nconst DataHandler_1 = require(\"../DataHandler\");\nconst debug = (0, utils_1.Debug)(\"connection\");\nfunction connectHandler(self) {\n return function () {\n var _a;\n self.setStatus(\"connect\");\n self.resetCommandQueue();\n // AUTH command should be processed before any other commands\n let flushed = false;\n const { connectionEpoch } = self;\n if (self.condition.auth) {\n self.auth(self.condition.auth, function (err) {\n if (connectionEpoch !== self.connectionEpoch) {\n return;\n }\n if (err) {\n if (err.message.indexOf(\"no password is set\") !== -1) {\n console.warn(\"[WARN] Redis server does not require a password, but a password was supplied.\");\n }\n else if (err.message.indexOf(\"without any password configured for the default user\") !== -1) {\n console.warn(\"[WARN] This Redis server's `default` user does not require a password, but a password was supplied\");\n }\n else if (err.message.indexOf(\"wrong number of arguments for 'auth' command\") !== -1) {\n console.warn(`[ERROR] The server returned \"wrong number of arguments for 'auth' command\". You are probably passing both username and password to Redis version 5 or below. You should only pass the 'password' option for Redis version 5 and under.`);\n }\n else {\n flushed = true;\n self.recoverFromFatalError(err, err);\n }\n }\n });\n }\n if (self.condition.select) {\n self.select(self.condition.select).catch((err) => {\n // If the node is in cluster mode, select is disallowed.\n // In this case, reconnect won't help.\n self.silentEmit(\"error\", err);\n });\n }\n /*\n No need to keep the reference of DataHandler here\n because we don't need to do the cleanup.\n `Stream#end()` will remove all listeners for us.\n */\n new DataHandler_1.default(self, {\n stringNumbers: self.options.stringNumbers,\n });\n const clientCommandPromises = [];\n if (self.options.connectionName) {\n debug(\"set the connection name [%s]\", self.options.connectionName);\n clientCommandPromises.push(self.client(\"setname\", self.options.connectionName).catch(utils_1.noop));\n }\n if (!self.options.disableClientInfo) {\n debug(\"set the client info\");\n clientCommandPromises.push((0, utils_1.getPackageMeta)()\n .then((packageMeta) => {\n return self\n .client(\"SETINFO\", \"LIB-VER\", packageMeta.version)\n .catch(utils_1.noop);\n })\n .catch(utils_1.noop));\n clientCommandPromises.push(self\n .client(\"SETINFO\", \"LIB-NAME\", ((_a = self.options) === null || _a === void 0 ? void 0 : _a.clientInfoTag)\n ? `ioredis(${self.options.clientInfoTag})`\n : \"ioredis\")\n .catch(utils_1.noop));\n }\n Promise.all(clientCommandPromises)\n .catch(utils_1.noop)\n .finally(() => {\n if (!self.options.enableReadyCheck) {\n exports.readyHandler(self)();\n }\n if (self.options.enableReadyCheck) {\n self._readyCheck(function (err, info) {\n if (connectionEpoch !== self.connectionEpoch) {\n return;\n }\n if (err) {\n if (!flushed) {\n self.recoverFromFatalError(new Error(\"Ready check failed: \" + err.message), err);\n }\n }\n else {\n if (self.connector.check(info)) {\n exports.readyHandler(self)();\n }\n else {\n self.disconnect(true);\n }\n }\n });\n }\n });\n };\n}\nexports.connectHandler = connectHandler;\nfunction abortError(command) {\n const err = new redis_errors_1.AbortError(\"Command aborted due to connection close\");\n err.command = {\n name: command.name,\n args: command.args,\n };\n return err;\n}\n// If a contiguous set of pipeline commands starts from index zero then they\n// can be safely reattempted. If however we have a chain of pipelined commands\n// starting at index 1 or more it means we received a partial response before\n// the connection close and those pipelined commands must be aborted. For\n// example, if the queue looks like this: [2, 3, 4, 0, 1, 2] then after\n// aborting and purging we'll have a queue that looks like this: [0, 1, 2]\nfunction abortIncompletePipelines(commandQueue) {\n var _a;\n let expectedIndex = 0;\n for (let i = 0; i < commandQueue.length;) {\n const command = (_a = commandQueue.peekAt(i)) === null || _a === void 0 ? void 0 : _a.command;\n const pipelineIndex = command.pipelineIndex;\n if (pipelineIndex === undefined || pipelineIndex === 0) {\n expectedIndex = 0;\n }\n if (pipelineIndex !== undefined && pipelineIndex !== expectedIndex++) {\n commandQueue.remove(i, 1);\n command.reject(abortError(command));\n continue;\n }\n i++;\n }\n}\n// If only a partial transaction result was received before connection close,\n// we have to abort any transaction fragments that may have ended up in the\n// offline queue\nfunction abortTransactionFragments(commandQueue) {\n var _a;\n for (let i = 0; i < commandQueue.length;) {\n const command = (_a = commandQueue.peekAt(i)) === null || _a === void 0 ? void 0 : _a.command;\n if (command.name === \"multi\") {\n break;\n }\n if (command.name === \"exec\") {\n commandQueue.remove(i, 1);\n command.reject(abortError(command));\n break;\n }\n if (command.inTransaction) {\n commandQueue.remove(i, 1);\n command.reject(abortError(command));\n }\n else {\n i++;\n }\n }\n}\nfunction closeHandler(self) {\n return function () {\n const prevStatus = self.status;\n self.setStatus(\"close\");\n if (self.commandQueue.length) {\n abortIncompletePipelines(self.commandQueue);\n }\n if (self.offlineQueue.length) {\n abortTransactionFragments(self.offlineQueue);\n }\n if (prevStatus === \"ready\") {\n if (!self.prevCondition) {\n self.prevCondition = self.condition;\n }\n if (self.commandQueue.length) {\n self.prevCommandQueue = self.commandQueue;\n }\n }\n if (self.manuallyClosing) {\n self.manuallyClosing = false;\n debug(\"skip reconnecting since the connection is manually closed.\");\n return close();\n }\n if (typeof self.options.retryStrategy !== \"function\") {\n debug(\"skip reconnecting because `retryStrategy` is not a function\");\n return close();\n }\n const retryDelay = self.options.retryStrategy(++self.retryAttempts);\n if (typeof retryDelay !== \"number\") {\n debug(\"skip reconnecting because `retryStrategy` doesn't return a number\");\n return close();\n }\n debug(\"reconnect in %sms\", retryDelay);\n self.setStatus(\"reconnecting\", retryDelay);\n self.reconnectTimeout = setTimeout(function () {\n self.reconnectTimeout = null;\n self.connect().catch(utils_1.noop);\n }, retryDelay);\n const { maxRetriesPerRequest } = self.options;\n if (typeof maxRetriesPerRequest === \"number\") {\n if (maxRetriesPerRequest < 0) {\n debug(\"maxRetriesPerRequest is negative, ignoring...\");\n }\n else {\n const remainder = self.retryAttempts % (maxRetriesPerRequest + 1);\n if (remainder === 0) {\n debug(\"reach maxRetriesPerRequest limitation, flushing command queue...\");\n self.flushQueue(new errors_1.MaxRetriesPerRequestError(maxRetriesPerRequest));\n }\n }\n }\n };\n function close() {\n self.setStatus(\"end\");\n self.flushQueue(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG));\n }\n}\nexports.closeHandler = closeHandler;\nfunction errorHandler(self) {\n return function (error) {\n debug(\"error: %s\", error);\n self.silentEmit(\"error\", error);\n };\n}\nexports.errorHandler = errorHandler;\nfunction readyHandler(self) {\n return function () {\n self.setStatus(\"ready\");\n self.retryAttempts = 0;\n if (self.options.monitor) {\n self.call(\"monitor\").then(() => self.setStatus(\"monitoring\"), (error) => self.emit(\"error\", error));\n const { sendCommand } = self;\n self.sendCommand = function (command) {\n if (Command_1.default.checkFlag(\"VALID_IN_MONITOR_MODE\", command.name)) {\n return sendCommand.call(self, command);\n }\n command.reject(new Error(\"Connection is in monitoring mode, can't process commands.\"));\n return command.promise;\n };\n self.once(\"close\", function () {\n delete self.sendCommand;\n });\n return;\n }\n const finalSelect = self.prevCondition\n ? self.prevCondition.select\n : self.condition.select;\n if (self.options.readOnly) {\n debug(\"set the connection to readonly mode\");\n self.readonly().catch(utils_1.noop);\n }\n if (self.prevCondition) {\n const condition = self.prevCondition;\n self.prevCondition = null;\n if (condition.subscriber && self.options.autoResubscribe) {\n // We re-select the previous db first since\n // `SELECT` command is not valid in sub mode.\n if (self.condition.select !== finalSelect) {\n debug(\"connect to db [%d]\", finalSelect);\n self.select(finalSelect);\n }\n const subscribeChannels = condition.subscriber.channels(\"subscribe\");\n if (subscribeChannels.length) {\n debug(\"subscribe %d channels\", subscribeChannels.length);\n self.subscribe(subscribeChannels);\n }\n const psubscribeChannels = condition.subscriber.channels(\"psubscribe\");\n if (psubscribeChannels.length) {\n debug(\"psubscribe %d channels\", psubscribeChannels.length);\n self.psubscribe(psubscribeChannels);\n }\n const ssubscribeChannels = condition.subscriber.channels(\"ssubscribe\");\n if (ssubscribeChannels.length) {\n debug(\"ssubscribe %s\", ssubscribeChannels.length);\n for (const channel of ssubscribeChannels) {\n self.ssubscribe(channel);\n }\n }\n }\n }\n if (self.prevCommandQueue) {\n if (self.options.autoResendUnfulfilledCommands) {\n debug(\"resend %d unfulfilled commands\", self.prevCommandQueue.length);\n while (self.prevCommandQueue.length > 0) {\n const item = self.prevCommandQueue.shift();\n if (item.select !== self.condition.select &&\n item.command.name !== \"select\") {\n self.select(item.select);\n }\n self.sendCommand(item.command, item.stream);\n }\n }\n else {\n self.prevCommandQueue = null;\n }\n }\n if (self.offlineQueue.length) {\n debug(\"send %d commands in offline queue\", self.offlineQueue.length);\n const offlineQueue = self.offlineQueue;\n self.resetOfflineQueue();\n while (offlineQueue.length > 0) {\n const item = offlineQueue.shift();\n if (item.select !== self.condition.select &&\n item.command.name !== \"select\") {\n self.select(item.select);\n }\n self.sendCommand(item.command, item.stream);\n }\n }\n if (self.condition.select !== finalSelect) {\n debug(\"connect to db [%d]\", finalSelect);\n self.select(finalSelect);\n }\n };\n}\nexports.readyHandler = readyHandler;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_REDIS_OPTIONS = void 0;\nexports.DEFAULT_REDIS_OPTIONS = {\n // Connection\n port: 6379,\n host: \"localhost\",\n family: 0,\n connectTimeout: 10000,\n disconnectTimeout: 2000,\n retryStrategy: function (times) {\n return Math.min(times * 50, 2000);\n },\n keepAlive: 0,\n noDelay: true,\n connectionName: null,\n disableClientInfo: false,\n clientInfoTag: undefined,\n // Sentinel\n sentinels: null,\n name: null,\n role: \"master\",\n sentinelRetryStrategy: function (times) {\n return Math.min(times * 10, 1000);\n },\n sentinelReconnectStrategy: function () {\n // This strategy only applies when sentinels are used for detecting\n // a failover, not during initial master resolution.\n // The deployment can still function when some of the sentinels are down\n // for a long period of time, so we may not want to attempt reconnection\n // very often. Therefore the default interval is fairly long (1 minute).\n return 60000;\n },\n natMap: null,\n enableTLSForSentinelMode: false,\n updateSentinels: true,\n failoverDetector: false,\n // Status\n username: null,\n password: null,\n db: 0,\n // Others\n enableOfflineQueue: true,\n enableReadyCheck: true,\n autoResubscribe: true,\n autoResendUnfulfilledCommands: true,\n lazyConnect: false,\n keyPrefix: \"\",\n reconnectOnError: null,\n readOnly: false,\n stringNumbers: false,\n maxRetriesPerRequest: 20,\n maxLoadingRetryTime: 10000,\n enableAutoPipelining: false,\n autoPipeliningIgnoredCommands: [],\n sentinelMaxConnections: 10,\n blockingTimeoutGrace: 100,\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst commands_1 = require(\"@ioredis/commands\");\nconst events_1 = require(\"events\");\nconst standard_as_callback_1 = require(\"standard-as-callback\");\nconst cluster_1 = require(\"./cluster\");\nconst Command_1 = require(\"./Command\");\nconst connectors_1 = require(\"./connectors\");\nconst SentinelConnector_1 = require(\"./connectors/SentinelConnector\");\nconst eventHandler = require(\"./redis/event_handler\");\nconst RedisOptions_1 = require(\"./redis/RedisOptions\");\nconst ScanStream_1 = require(\"./ScanStream\");\nconst transaction_1 = require(\"./transaction\");\nconst utils_1 = require(\"./utils\");\nconst applyMixin_1 = require(\"./utils/applyMixin\");\nconst Commander_1 = require(\"./utils/Commander\");\nconst lodash_1 = require(\"./utils/lodash\");\nconst Deque = require(\"denque\");\nconst debug = (0, utils_1.Debug)(\"redis\");\n/**\n * This is the major component of ioredis.\n * Use it to connect to a standalone Redis server or Sentinels.\n *\n * ```typescript\n * const redis = new Redis(); // Default port is 6379\n * async function main() {\n * redis.set(\"foo\", \"bar\");\n * redis.get(\"foo\", (err, result) => {\n * // `result` should be \"bar\"\n * console.log(err, result);\n * });\n * // Or use Promise\n * const result = await redis.get(\"foo\");\n * }\n * ```\n */\nclass Redis extends Commander_1.default {\n constructor(arg1, arg2, arg3) {\n super();\n this.status = \"wait\";\n /**\n * @ignore\n */\n this.isCluster = false;\n this.reconnectTimeout = null;\n this.connectionEpoch = 0;\n this.retryAttempts = 0;\n this.manuallyClosing = false;\n // Prepare autopipelines structures\n this._autoPipelines = new Map();\n this._runningAutoPipelines = new Set();\n this.parseOptions(arg1, arg2, arg3);\n events_1.EventEmitter.call(this);\n this.resetCommandQueue();\n this.resetOfflineQueue();\n if (this.options.Connector) {\n this.connector = new this.options.Connector(this.options);\n }\n else if (this.options.sentinels) {\n const sentinelConnector = new SentinelConnector_1.default(this.options);\n sentinelConnector.emitter = this;\n this.connector = sentinelConnector;\n }\n else {\n this.connector = new connectors_1.StandaloneConnector(this.options);\n }\n if (this.options.scripts) {\n Object.entries(this.options.scripts).forEach(([name, definition]) => {\n this.defineCommand(name, definition);\n });\n }\n // end(or wait) -> connecting -> connect -> ready -> end\n if (this.options.lazyConnect) {\n this.setStatus(\"wait\");\n }\n else {\n this.connect().catch(lodash_1.noop);\n }\n }\n /**\n * Create a Redis instance.\n * This is the same as `new Redis()` but is included for compatibility with node-redis.\n */\n static createClient(...args) {\n return new Redis(...args);\n }\n get autoPipelineQueueSize() {\n let queued = 0;\n for (const pipeline of this._autoPipelines.values()) {\n queued += pipeline.length;\n }\n return queued;\n }\n /**\n * Create a connection to Redis.\n * This method will be invoked automatically when creating a new Redis instance\n * unless `lazyConnect: true` is passed.\n *\n * When calling this method manually, a Promise is returned, which will\n * be resolved when the connection status is ready. The promise can reject\n * if the connection fails, times out, or if Redis is already connecting/connected.\n */\n connect(callback) {\n const promise = new Promise((resolve, reject) => {\n if (this.status === \"connecting\" ||\n this.status === \"connect\" ||\n this.status === \"ready\") {\n reject(new Error(\"Redis is already connecting/connected\"));\n return;\n }\n this.connectionEpoch += 1;\n this.setStatus(\"connecting\");\n const { options } = this;\n this.condition = {\n select: options.db,\n auth: options.username\n ? [options.username, options.password]\n : options.password,\n subscriber: false,\n };\n const _this = this;\n (0, standard_as_callback_1.default)(this.connector.connect(function (type, err) {\n _this.silentEmit(type, err);\n }), function (err, stream) {\n if (err) {\n _this.flushQueue(err);\n _this.silentEmit(\"error\", err);\n reject(err);\n _this.setStatus(\"end\");\n return;\n }\n let CONNECT_EVENT = options.tls ? \"secureConnect\" : \"connect\";\n if (\"sentinels\" in options &&\n options.sentinels &&\n !options.enableTLSForSentinelMode) {\n CONNECT_EVENT = \"connect\";\n }\n _this.stream = stream;\n if (options.noDelay) {\n stream.setNoDelay(true);\n }\n // Node ignores setKeepAlive before connect, therefore we wait for the event:\n // https://github.com/nodejs/node/issues/31663\n if (typeof options.keepAlive === \"number\") {\n if (stream.connecting) {\n stream.once(CONNECT_EVENT, () => {\n stream.setKeepAlive(true, options.keepAlive);\n });\n }\n else {\n stream.setKeepAlive(true, options.keepAlive);\n }\n }\n if (stream.connecting) {\n stream.once(CONNECT_EVENT, eventHandler.connectHandler(_this));\n if (options.connectTimeout) {\n /*\n * Typically, Socket#setTimeout(0) will clear the timer\n * set before. However, in some platforms (Electron 3.x~4.x),\n * the timer will not be cleared. So we introduce a variable here.\n *\n * See https://github.com/electron/electron/issues/14915\n */\n let connectTimeoutCleared = false;\n stream.setTimeout(options.connectTimeout, function () {\n if (connectTimeoutCleared) {\n return;\n }\n stream.setTimeout(0);\n stream.destroy();\n const err = new Error(\"connect ETIMEDOUT\");\n // @ts-expect-error\n err.errorno = \"ETIMEDOUT\";\n // @ts-expect-error\n err.code = \"ETIMEDOUT\";\n // @ts-expect-error\n err.syscall = \"connect\";\n eventHandler.errorHandler(_this)(err);\n });\n stream.once(CONNECT_EVENT, function () {\n connectTimeoutCleared = true;\n stream.setTimeout(0);\n });\n }\n }\n else if (stream.destroyed) {\n const firstError = _this.connector.firstError;\n if (firstError) {\n process.nextTick(() => {\n eventHandler.errorHandler(_this)(firstError);\n });\n }\n process.nextTick(eventHandler.closeHandler(_this));\n }\n else {\n process.nextTick(eventHandler.connectHandler(_this));\n }\n if (!stream.destroyed) {\n stream.once(\"error\", eventHandler.errorHandler(_this));\n stream.once(\"close\", eventHandler.closeHandler(_this));\n }\n const connectionReadyHandler = function () {\n _this.removeListener(\"close\", connectionCloseHandler);\n resolve();\n };\n var connectionCloseHandler = function () {\n _this.removeListener(\"ready\", connectionReadyHandler);\n reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG));\n };\n _this.once(\"ready\", connectionReadyHandler);\n _this.once(\"close\", connectionCloseHandler);\n });\n });\n return (0, standard_as_callback_1.default)(promise, callback);\n }\n /**\n * Disconnect from Redis.\n *\n * This method closes the connection immediately,\n * and may lose some pending replies that haven't written to client.\n * If you want to wait for the pending replies, use Redis#quit instead.\n */\n disconnect(reconnect = false) {\n if (!reconnect) {\n this.manuallyClosing = true;\n }\n if (this.reconnectTimeout && !reconnect) {\n clearTimeout(this.reconnectTimeout);\n this.reconnectTimeout = null;\n }\n if (this.status === \"wait\") {\n eventHandler.closeHandler(this)();\n }\n else {\n this.connector.disconnect();\n }\n }\n /**\n * Disconnect from Redis.\n *\n * @deprecated\n */\n end() {\n this.disconnect();\n }\n /**\n * Create a new instance with the same options as the current one.\n *\n * @example\n * ```js\n * var redis = new Redis(6380);\n * var anotherRedis = redis.duplicate();\n * ```\n */\n duplicate(override) {\n return new Redis({ ...this.options, ...override });\n }\n /**\n * Mode of the connection.\n *\n * One of `\"normal\"`, `\"subscriber\"`, or `\"monitor\"`. When the connection is\n * not in `\"normal\"` mode, certain commands are not allowed.\n */\n get mode() {\n var _a;\n return this.options.monitor\n ? \"monitor\"\n : ((_a = this.condition) === null || _a === void 0 ? void 0 : _a.subscriber)\n ? \"subscriber\"\n : \"normal\";\n }\n /**\n * Listen for all requests received by the server in real time.\n *\n * This command will create a new connection to Redis and send a\n * MONITOR command via the new connection in order to avoid disturbing\n * the current connection.\n *\n * @param callback The callback function. If omit, a promise will be returned.\n * @example\n * ```js\n * var redis = new Redis();\n * redis.monitor(function (err, monitor) {\n * // Entering monitoring mode.\n * monitor.on('monitor', function (time, args, source, database) {\n * console.log(time + \": \" + util.inspect(args));\n * });\n * });\n *\n * // supports promise as well as other commands\n * redis.monitor().then(function (monitor) {\n * monitor.on('monitor', function (time, args, source, database) {\n * console.log(time + \": \" + util.inspect(args));\n * });\n * });\n * ```\n */\n monitor(callback) {\n const monitorInstance = this.duplicate({\n monitor: true,\n lazyConnect: false,\n });\n return (0, standard_as_callback_1.default)(new Promise(function (resolve, reject) {\n monitorInstance.once(\"error\", reject);\n monitorInstance.once(\"monitoring\", function () {\n resolve(monitorInstance);\n });\n }), callback);\n }\n /**\n * Send a command to Redis\n *\n * This method is used internally and in most cases you should not\n * use it directly. If you need to send a command that is not supported\n * by the library, you can use the `call` method:\n *\n * ```js\n * const redis = new Redis();\n *\n * redis.call('set', 'foo', 'bar');\n * // or\n * redis.call(['set', 'foo', 'bar']);\n * ```\n *\n * @ignore\n */\n sendCommand(command, stream) {\n var _a, _b;\n if (this.status === \"wait\") {\n this.connect().catch(lodash_1.noop);\n }\n if (this.status === \"end\") {\n command.reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG));\n return command.promise;\n }\n if (((_a = this.condition) === null || _a === void 0 ? void 0 : _a.subscriber) &&\n !Command_1.default.checkFlag(\"VALID_IN_SUBSCRIBER_MODE\", command.name)) {\n command.reject(new Error(\"Connection in subscriber mode, only subscriber commands may be used\"));\n return command.promise;\n }\n if (typeof this.options.commandTimeout === \"number\") {\n command.setTimeout(this.options.commandTimeout);\n }\n const blockingTimeout = this.getBlockingTimeoutInMs(command);\n let writable = this.status === \"ready\" ||\n (!stream &&\n this.status === \"connect\" &&\n (0, commands_1.exists)(command.name, { caseInsensitive: true }) &&\n ((0, commands_1.hasFlag)(command.name, \"loading\", { nameCaseInsensitive: true }) ||\n Command_1.default.checkFlag(\"HANDSHAKE_COMMANDS\", command.name)));\n if (!this.stream) {\n writable = false;\n }\n else if (!this.stream.writable) {\n writable = false;\n // @ts-expect-error\n }\n else if (this.stream._writableState && this.stream._writableState.ended) {\n // TODO: We should be able to remove this as the PR has already been merged.\n // https://github.com/iojs/io.js/pull/1217\n writable = false;\n }\n if (!writable) {\n if (!this.options.enableOfflineQueue) {\n command.reject(new Error(\"Stream isn't writeable and enableOfflineQueue options is false\"));\n return command.promise;\n }\n if (command.name === \"quit\" && this.offlineQueue.length === 0) {\n this.disconnect();\n command.resolve(Buffer.from(\"OK\"));\n return command.promise;\n }\n // @ts-expect-error\n if (debug.enabled) {\n debug(\"queue command[%s]: %d -> %s(%o)\", this._getDescription(), this.condition.select, command.name, command.args);\n }\n this.offlineQueue.push({\n command: command,\n stream: stream,\n select: this.condition.select,\n });\n // For blocking commands in the offline queue, arm a client-side timeout\n // only when blockingTimeout is configured. Without this option, queued\n // blocking commands may wait indefinitely on a dead connection.\n if (Command_1.default.checkFlag(\"BLOCKING_COMMANDS\", command.name)) {\n const offlineTimeout = this.getConfiguredBlockingTimeout();\n if (offlineTimeout !== undefined) {\n command.setBlockingTimeout(offlineTimeout);\n }\n }\n }\n else {\n // @ts-expect-error\n if (debug.enabled) {\n debug(\"write command[%s]: %d -> %s(%o)\", this._getDescription(), (_b = this.condition) === null || _b === void 0 ? void 0 : _b.select, command.name, command.args);\n }\n if (stream) {\n if (\"isPipeline\" in stream && stream.isPipeline) {\n stream.write(command.toWritable(stream.destination.redis.stream));\n }\n else {\n stream.write(command.toWritable(stream));\n }\n }\n else {\n this.stream.write(command.toWritable(this.stream));\n }\n this.commandQueue.push({\n command: command,\n stream: stream,\n select: this.condition.select,\n });\n if (blockingTimeout !== undefined) {\n command.setBlockingTimeout(blockingTimeout);\n }\n if (Command_1.default.checkFlag(\"WILL_DISCONNECT\", command.name)) {\n this.manuallyClosing = true;\n }\n if (this.options.socketTimeout !== undefined && this.socketTimeoutTimer === undefined) {\n this.setSocketTimeout();\n }\n }\n if (command.name === \"select\" && (0, utils_1.isInt)(command.args[0])) {\n const db = parseInt(command.args[0], 10);\n if (this.condition.select !== db) {\n this.condition.select = db;\n this.emit(\"select\", db);\n debug(\"switch to db [%d]\", this.condition.select);\n }\n }\n return command.promise;\n }\n getBlockingTimeoutInMs(command) {\n var _a;\n if (!Command_1.default.checkFlag(\"BLOCKING_COMMANDS\", command.name)) {\n return undefined;\n }\n // Feature is opt-in: only enabled when blockingTimeout is set to a positive number\n const configuredTimeout = this.getConfiguredBlockingTimeout();\n if (configuredTimeout === undefined) {\n return undefined;\n }\n const timeout = command.extractBlockingTimeout();\n if (typeof timeout === \"number\") {\n if (timeout > 0) {\n // Finite timeout from command args - add grace period\n return timeout + ((_a = this.options.blockingTimeoutGrace) !== null && _a !== void 0 ? _a : RedisOptions_1.DEFAULT_REDIS_OPTIONS.blockingTimeoutGrace);\n }\n // Command has timeout=0 (block forever), use blockingTimeout option as safety net\n return configuredTimeout;\n }\n if (timeout === null) {\n // No BLOCK option found (e.g., XREAD without BLOCK), use blockingTimeout as safety net\n return configuredTimeout;\n }\n return undefined;\n }\n getConfiguredBlockingTimeout() {\n if (typeof this.options.blockingTimeout === \"number\" &&\n this.options.blockingTimeout > 0) {\n return this.options.blockingTimeout;\n }\n return undefined;\n }\n setSocketTimeout() {\n this.socketTimeoutTimer = setTimeout(() => {\n this.stream.destroy(new Error(`Socket timeout. Expecting data, but didn't receive any in ${this.options.socketTimeout}ms.`));\n this.socketTimeoutTimer = undefined;\n }, this.options.socketTimeout);\n // this handler must run after the \"data\" handler in \"DataHandler\"\n // so that `this.commandQueue.length` will be updated\n this.stream.once(\"data\", () => {\n clearTimeout(this.socketTimeoutTimer);\n this.socketTimeoutTimer = undefined;\n if (this.commandQueue.length === 0)\n return;\n this.setSocketTimeout();\n });\n }\n scanStream(options) {\n return this.createScanStream(\"scan\", { options });\n }\n scanBufferStream(options) {\n return this.createScanStream(\"scanBuffer\", { options });\n }\n sscanStream(key, options) {\n return this.createScanStream(\"sscan\", { key, options });\n }\n sscanBufferStream(key, options) {\n return this.createScanStream(\"sscanBuffer\", { key, options });\n }\n hscanStream(key, options) {\n return this.createScanStream(\"hscan\", { key, options });\n }\n hscanBufferStream(key, options) {\n return this.createScanStream(\"hscanBuffer\", { key, options });\n }\n zscanStream(key, options) {\n return this.createScanStream(\"zscan\", { key, options });\n }\n zscanBufferStream(key, options) {\n return this.createScanStream(\"zscanBuffer\", { key, options });\n }\n /**\n * Emit only when there's at least one listener.\n *\n * @ignore\n */\n silentEmit(eventName, arg) {\n let error;\n if (eventName === \"error\") {\n error = arg;\n if (this.status === \"end\") {\n return;\n }\n if (this.manuallyClosing) {\n // ignore connection related errors when manually disconnecting\n if (error instanceof Error &&\n (error.message === utils_1.CONNECTION_CLOSED_ERROR_MSG ||\n // @ts-expect-error\n error.syscall === \"connect\" ||\n // @ts-expect-error\n error.syscall === \"read\")) {\n return;\n }\n }\n }\n if (this.listeners(eventName).length > 0) {\n return this.emit.apply(this, arguments);\n }\n if (error && error instanceof Error) {\n console.error(\"[ioredis] Unhandled error event:\", error.stack);\n }\n return false;\n }\n /**\n * @ignore\n */\n recoverFromFatalError(_commandError, err, options) {\n this.flushQueue(err, options);\n this.silentEmit(\"error\", err);\n this.disconnect(true);\n }\n /**\n * @ignore\n */\n handleReconnection(err, item) {\n var _a;\n let needReconnect = false;\n if (this.options.reconnectOnError &&\n !Command_1.default.checkFlag(\"IGNORE_RECONNECT_ON_ERROR\", item.command.name)) {\n needReconnect = this.options.reconnectOnError(err);\n }\n switch (needReconnect) {\n case 1:\n case true:\n if (this.status !== \"reconnecting\") {\n this.disconnect(true);\n }\n item.command.reject(err);\n break;\n case 2:\n if (this.status !== \"reconnecting\") {\n this.disconnect(true);\n }\n if (((_a = this.condition) === null || _a === void 0 ? void 0 : _a.select) !== item.select &&\n item.command.name !== \"select\") {\n this.select(item.select);\n }\n // TODO\n // @ts-expect-error\n this.sendCommand(item.command);\n break;\n default:\n item.command.reject(err);\n }\n }\n /**\n * Get description of the connection. Used for debugging.\n */\n _getDescription() {\n let description;\n if (\"path\" in this.options && this.options.path) {\n description = this.options.path;\n }\n else if (this.stream &&\n this.stream.remoteAddress &&\n this.stream.remotePort) {\n description = this.stream.remoteAddress + \":\" + this.stream.remotePort;\n }\n else if (\"host\" in this.options && this.options.host) {\n description = this.options.host + \":\" + this.options.port;\n }\n else {\n // Unexpected\n description = \"\";\n }\n if (this.options.connectionName) {\n description += ` (${this.options.connectionName})`;\n }\n return description;\n }\n resetCommandQueue() {\n this.commandQueue = new Deque();\n }\n resetOfflineQueue() {\n this.offlineQueue = new Deque();\n }\n parseOptions(...args) {\n const options = {};\n let isTls = false;\n for (let i = 0; i < args.length; ++i) {\n const arg = args[i];\n if (arg === null || typeof arg === \"undefined\") {\n continue;\n }\n if (typeof arg === \"object\") {\n (0, lodash_1.defaults)(options, arg);\n }\n else if (typeof arg === \"string\") {\n (0, lodash_1.defaults)(options, (0, utils_1.parseURL)(arg));\n if (arg.startsWith(\"rediss://\")) {\n isTls = true;\n }\n }\n else if (typeof arg === \"number\") {\n options.port = arg;\n }\n else {\n throw new Error(\"Invalid argument \" + arg);\n }\n }\n if (isTls) {\n (0, lodash_1.defaults)(options, { tls: true });\n }\n (0, lodash_1.defaults)(options, Redis.defaultOptions);\n if (typeof options.port === \"string\") {\n options.port = parseInt(options.port, 10);\n }\n if (typeof options.db === \"string\") {\n options.db = parseInt(options.db, 10);\n }\n // @ts-expect-error\n this.options = (0, utils_1.resolveTLSProfile)(options);\n }\n /**\n * Change instance's status\n */\n setStatus(status, arg) {\n // @ts-expect-error\n if (debug.enabled) {\n debug(\"status[%s]: %s -> %s\", this._getDescription(), this.status || \"[empty]\", status);\n }\n this.status = status;\n process.nextTick(this.emit.bind(this, status, arg));\n }\n createScanStream(command, { key, options = {} }) {\n return new ScanStream_1.default({\n objectMode: true,\n key: key,\n redis: this,\n command: command,\n ...options,\n });\n }\n /**\n * Flush offline queue and command queue with error.\n *\n * @param error The error object to send to the commands\n * @param options options\n */\n flushQueue(error, options) {\n options = (0, lodash_1.defaults)({}, options, {\n offlineQueue: true,\n commandQueue: true,\n });\n let item;\n if (options.offlineQueue) {\n while ((item = this.offlineQueue.shift())) {\n item.command.reject(error);\n }\n }\n if (options.commandQueue) {\n if (this.commandQueue.length > 0) {\n if (this.stream) {\n this.stream.removeAllListeners(\"data\");\n }\n while ((item = this.commandQueue.shift())) {\n item.command.reject(error);\n }\n }\n }\n }\n /**\n * Check whether Redis has finished loading the persistent data and is able to\n * process commands.\n */\n _readyCheck(callback) {\n const _this = this;\n this.info(function (err, res) {\n if (err) {\n if (err.message && err.message.includes(\"NOPERM\")) {\n console.warn(`Skipping the ready check because INFO command fails: \"${err.message}\". You can disable ready check with \"enableReadyCheck\". More: https://github.com/luin/ioredis/wiki/Disable-ready-check.`);\n return callback(null, {});\n }\n return callback(err);\n }\n if (typeof res !== \"string\") {\n return callback(null, res);\n }\n const info = {};\n const lines = res.split(\"\\r\\n\");\n for (let i = 0; i < lines.length; ++i) {\n const [fieldName, ...fieldValueParts] = lines[i].split(\":\");\n const fieldValue = fieldValueParts.join(\":\");\n if (fieldValue) {\n info[fieldName] = fieldValue;\n }\n }\n if (!info.loading || info.loading === \"0\") {\n callback(null, info);\n }\n else {\n const loadingEtaMs = (info.loading_eta_seconds || 1) * 1000;\n const retryTime = _this.options.maxLoadingRetryTime &&\n _this.options.maxLoadingRetryTime < loadingEtaMs\n ? _this.options.maxLoadingRetryTime\n : loadingEtaMs;\n debug(\"Redis server still loading, trying again in \" + retryTime + \"ms\");\n setTimeout(function () {\n _this._readyCheck(callback);\n }, retryTime);\n }\n }).catch(lodash_1.noop);\n }\n}\nRedis.Cluster = cluster_1.default;\nRedis.Command = Command_1.default;\n/**\n * Default options\n */\nRedis.defaultOptions = RedisOptions_1.DEFAULT_REDIS_OPTIONS;\n(0, applyMixin_1.default)(Redis, events_1.EventEmitter);\n(0, transaction_1.addTransactionSupport)(Redis.prototype);\nexports.default = Redis;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.print = exports.ReplyError = exports.SentinelIterator = exports.SentinelConnector = exports.AbstractConnector = exports.Pipeline = exports.ScanStream = exports.Command = exports.Cluster = exports.Redis = exports.default = void 0;\nexports = module.exports = require(\"./Redis\").default;\nvar Redis_1 = require(\"./Redis\");\nObject.defineProperty(exports, \"default\", { enumerable: true, get: function () { return Redis_1.default; } });\nvar Redis_2 = require(\"./Redis\");\nObject.defineProperty(exports, \"Redis\", { enumerable: true, get: function () { return Redis_2.default; } });\nvar cluster_1 = require(\"./cluster\");\nObject.defineProperty(exports, \"Cluster\", { enumerable: true, get: function () { return cluster_1.default; } });\n/**\n * @ignore\n */\nvar Command_1 = require(\"./Command\");\nObject.defineProperty(exports, \"Command\", { enumerable: true, get: function () { return Command_1.default; } });\n/**\n * @ignore\n */\nvar ScanStream_1 = require(\"./ScanStream\");\nObject.defineProperty(exports, \"ScanStream\", { enumerable: true, get: function () { return ScanStream_1.default; } });\n/**\n * @ignore\n */\nvar Pipeline_1 = require(\"./Pipeline\");\nObject.defineProperty(exports, \"Pipeline\", { enumerable: true, get: function () { return Pipeline_1.default; } });\n/**\n * @ignore\n */\nvar AbstractConnector_1 = require(\"./connectors/AbstractConnector\");\nObject.defineProperty(exports, \"AbstractConnector\", { enumerable: true, get: function () { return AbstractConnector_1.default; } });\n/**\n * @ignore\n */\nvar SentinelConnector_1 = require(\"./connectors/SentinelConnector\");\nObject.defineProperty(exports, \"SentinelConnector\", { enumerable: true, get: function () { return SentinelConnector_1.default; } });\nObject.defineProperty(exports, \"SentinelIterator\", { enumerable: true, get: function () { return SentinelConnector_1.SentinelIterator; } });\n// No TS typings\nexports.ReplyError = require(\"redis-errors\").ReplyError;\n/**\n * @ignore\n */\nObject.defineProperty(exports, \"Promise\", {\n get() {\n console.warn(\"ioredis v5 does not support plugging third-party Promise library anymore. Native Promise will be used.\");\n return Promise;\n },\n set(_lib) {\n console.warn(\"ioredis v5 does not support plugging third-party Promise library anymore. Native Promise will be used.\");\n },\n});\n/**\n * @ignore\n */\nfunction print(err, reply) {\n if (err) {\n console.log(\"Error: \" + err);\n }\n else {\n console.log(\"Reply: \" + reply);\n }\n}\nexports.print = print;\n", "'use strict'\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n", "'use strict'\n\nconst debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n", "'use strict'\n\nconst {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst safeSrc = exports.safeSrc = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n safeSrc[index] = safe\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n// Non-numeric identifiers include numeric identifiers but can be longer.\n// Therefore non-numeric identifiers must go first.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]\n}|${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]\n}|${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n", "'use strict'\n\n// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n", "'use strict'\n\nconst numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n if (typeof a === 'number' && typeof b === 'number') {\n return a === b ? 0 : a < b ? -1 : 1\n }\n\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n", "'use strict'\n\nconst debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n if (this.major < other.major) {\n return -1\n }\n if (this.major > other.major) {\n return 1\n }\n if (this.minor < other.minor) {\n return -1\n }\n if (this.minor > other.minor) {\n return 1\n }\n if (this.patch < other.patch) {\n return -1\n }\n if (this.patch > other.patch) {\n return 1\n }\n return 0\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('build compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n if (release.startsWith('pre')) {\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n // Avoid an invalid semver results\n if (identifier) {\n const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])\n if (!match || match[1] !== identifier) {\n throw new Error(`invalid identifier: ${identifier}`)\n }\n }\n }\n\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n case 'release':\n if (this.prerelease.length === 0) {\n throw new Error(`version ${this.raw} is not a prerelease`)\n }\n this.prerelease.length = 0\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n", "'use strict'\n\nconst parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n", "'use strict'\n\nconst parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n", "'use strict'\n\nconst parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n const lowHasPre = !!lowVersion.prerelease.length\n\n if (lowHasPre && !highHasPre) {\n // Going from prerelease -> no prerelease requires some special casing\n\n // If the low version has only a major, then it will always be a major\n // Some examples:\n // 1.0.0-1 -> 1.0.0\n // 1.0.0-1 -> 1.1.1\n // 1.0.0-1 -> 2.0.0\n if (!lowVersion.patch && !lowVersion.minor) {\n return 'major'\n }\n\n // If the main part has no difference\n if (lowVersion.compareMain(highVersion) === 0) {\n if (lowVersion.minor && !lowVersion.patch) {\n return 'minor'\n }\n return 'patch'\n }\n }\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // high and low are prereleases\n return 'prerelease'\n}\n\nmodule.exports = diff\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n", "'use strict'\n\nconst parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n", "'use strict'\n\nconst compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n", "'use strict'\n\nconst compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n", "'use strict'\n\nconst compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n", "'use strict'\n\nconst compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n", "'use strict'\n\nconst compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n", "'use strict'\n\nconst compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n", "'use strict'\n\nconst compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n", "'use strict'\n\nconst compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n", "'use strict'\n\nconst compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n", "'use strict'\n\nconst compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n", "'use strict'\n\nconst eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]\n let next\n while ((next = coerceRtlRegex.exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n coerceRtlRegex.lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n const major = match[2]\n const minor = match[3] || '0'\n const patch = match[4] || '0'\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''\n\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)\n}\nmodule.exports = coerce\n", "'use strict'\n\nclass LRUCache {\n constructor () {\n this.max = 1000\n this.map = new Map()\n }\n\n get (key) {\n const value = this.map.get(key)\n if (value === undefined) {\n return undefined\n } else {\n // Remove the key from the map and add it to the end\n this.map.delete(key)\n this.map.set(key, value)\n return value\n }\n }\n\n delete (key) {\n return this.map.delete(key)\n }\n\n set (key, value) {\n const deleted = this.delete(key)\n\n if (!deleted && value !== undefined) {\n // If cache is full, delete the least recently used item\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value\n this.delete(firstKey)\n }\n\n this.map.set(key, value)\n }\n\n return this\n }\n}\n\nmodule.exports = LRUCache\n", "'use strict'\n\nconst SPACE_CHARACTERS = /\\s+/g\n\n// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.formatted = undefined\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')\n\n // First, split on ||\n this.set = this.raw\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.formatted = undefined\n }\n\n get range () {\n if (this.formatted === undefined) {\n this.formatted = ''\n for (let i = 0; i < this.set.length; i++) {\n if (i > 0) {\n this.formatted += '||'\n }\n const comps = this.set[i]\n for (let k = 0; k < comps.length; k++) {\n if (k > 0) {\n this.formatted += ' '\n }\n this.formatted += comps[k].toString().trim()\n }\n }\n }\n return this.formatted\n }\n\n format () {\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n debug('tilde trim', range)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n debug('caret trim', range)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('../internal/lrucache')\nconst cache = new LRU()\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n safeRe: re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n comp = comp.replace(re[t.BUILD], '')\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceTilde(c, options))\n .join(' ')\n}\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceCaret(c, options))\n .join(' ')\n}\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp\n .split(/\\s+/)\n .map((c) => replaceXRange(c, options))\n .join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp\n .trim()\n .replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp\n .trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\n// TODO build?\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return `${from} ${to}`.trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n", "'use strict'\n\nconst ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { safeRe: re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n", "'use strict'\n\nconst Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n", "'use strict'\n\nconst Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n", "'use strict'\n\nconst Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n", "'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n", "'use strict'\n\n// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n", "'use strict'\n\nconst outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n", "'use strict'\n\nconst Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n", "'use strict'\n\n// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n", "'use strict'\n\nconst Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If LT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n", "'use strict'\n\n// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n", "// these aren't really private, but nor are they really useful to document\n\n/**\n * @private\n */\nclass LuxonError extends Error {}\n\n/**\n * @private\n */\nexport class InvalidDateTimeError extends LuxonError {\n constructor(reason) {\n super(`Invalid DateTime: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidIntervalError extends LuxonError {\n constructor(reason) {\n super(`Invalid Interval: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidDurationError extends LuxonError {\n constructor(reason) {\n super(`Invalid Duration: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class ConflictingSpecificationError extends LuxonError {}\n\n/**\n * @private\n */\nexport class InvalidUnitError extends LuxonError {\n constructor(unit) {\n super(`Invalid unit ${unit}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidArgumentError extends LuxonError {}\n\n/**\n * @private\n */\nexport class ZoneIsAbstractError extends LuxonError {\n constructor() {\n super(\"Zone is an abstract class\");\n }\n}\n", "/**\n * @private\n */\n\nconst n = \"numeric\",\n s = \"short\",\n l = \"long\";\n\nexport const DATE_SHORT = {\n year: n,\n month: n,\n day: n,\n};\n\nexport const DATE_MED = {\n year: n,\n month: s,\n day: n,\n};\n\nexport const DATE_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n};\n\nexport const DATE_FULL = {\n year: n,\n month: l,\n day: n,\n};\n\nexport const DATE_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n};\n\nexport const TIME_SIMPLE = {\n hour: n,\n minute: n,\n};\n\nexport const TIME_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const TIME_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s,\n};\n\nexport const TIME_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l,\n};\n\nexport const TIME_24_SIMPLE = {\n hour: n,\n minute: n,\n hourCycle: \"h23\",\n};\n\nexport const TIME_24_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n};\n\nexport const TIME_24_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n timeZoneName: s,\n};\n\nexport const TIME_24_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n timeZoneName: l,\n};\n\nexport const DATETIME_SHORT = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_SHORT_WITH_SECONDS = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const DATETIME_MED = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_MED_WITH_SECONDS = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const DATETIME_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_FULL = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n timeZoneName: s,\n};\n\nexport const DATETIME_FULL_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s,\n};\n\nexport const DATETIME_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n timeZoneName: l,\n};\n\nexport const DATETIME_HUGE_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l,\n};\n", "import { ZoneIsAbstractError } from \"./errors.js\";\n\n/**\n * @interface\n */\nexport default class Zone {\n /**\n * The type of zone\n * @abstract\n * @type {string}\n */\n get type() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The name of this zone.\n * @abstract\n * @type {string}\n */\n get name() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The IANA name of this zone.\n * Defaults to `name` if not overwritten by a subclass.\n * @abstract\n * @type {string}\n */\n get ianaName() {\n return this.name;\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year.\n * @abstract\n * @type {boolean}\n */\n get isUniversal() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n offsetName(ts, opts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's value as a string\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */\n offset(ts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @abstract\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is valid.\n * @abstract\n * @type {boolean}\n */\n get isValid() {\n throw new ZoneIsAbstractError();\n }\n}\n", "import { formatOffset, parseZoneInfo } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * Represents the local zone for this JavaScript environment.\n * @implements {Zone}\n */\nexport default class SystemZone extends Zone {\n /**\n * Get a singleton instance of the local zone\n * @return {SystemZone}\n */\n static get instance() {\n if (singleton === null) {\n singleton = new SystemZone();\n }\n return singleton;\n }\n\n /** @override **/\n get type() {\n return \"system\";\n }\n\n /** @override **/\n get name() {\n return new Intl.DateTimeFormat().resolvedOptions().timeZone;\n }\n\n /** @override **/\n get isUniversal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n return -new Date(ts).getTimezoneOffset();\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"system\";\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n", "import { formatOffset, parseZoneInfo, isUndefined, objToLocalTS } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nconst dtfCache = new Map();\nfunction makeDTF(zoneName) {\n let dtf = dtfCache.get(zoneName);\n if (dtf === undefined) {\n dtf = new Intl.DateTimeFormat(\"en-US\", {\n hour12: false,\n timeZone: zoneName,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n era: \"short\",\n });\n dtfCache.set(zoneName, dtf);\n }\n return dtf;\n}\n\nconst typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n era: 3,\n hour: 4,\n minute: 5,\n second: 6,\n};\n\nfunction hackyOffset(dtf, date) {\n const formatted = dtf.format(date).replace(/\\u200E/g, \"\"),\n parsed = /(\\d+)\\/(\\d+)\\/(\\d+) (AD|BC),? (\\d+):(\\d+):(\\d+)/.exec(formatted),\n [, fMonth, fDay, fYear, fadOrBc, fHour, fMinute, fSecond] = parsed;\n return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond];\n}\n\nfunction partsOffset(dtf, date) {\n const formatted = dtf.formatToParts(date);\n const filled = [];\n for (let i = 0; i < formatted.length; i++) {\n const { type, value } = formatted[i];\n const pos = typeToPos[type];\n\n if (type === \"era\") {\n filled[pos] = value;\n } else if (!isUndefined(pos)) {\n filled[pos] = parseInt(value, 10);\n }\n }\n return filled;\n}\n\nconst ianaZoneCache = new Map();\n/**\n * A zone identified by an IANA identifier, like America/New_York\n * @implements {Zone}\n */\nexport default class IANAZone extends Zone {\n /**\n * @param {string} name - Zone name\n * @return {IANAZone}\n */\n static create(name) {\n let zone = ianaZoneCache.get(name);\n if (zone === undefined) {\n ianaZoneCache.set(name, (zone = new IANAZone(name)));\n }\n return zone;\n }\n\n /**\n * Reset local caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCache() {\n ianaZoneCache.clear();\n dtfCache.clear();\n }\n\n /**\n * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.\n * @param {string} s - The string to check validity on\n * @example IANAZone.isValidSpecifier(\"America/New_York\") //=> true\n * @example IANAZone.isValidSpecifier(\"Sport~~blorp\") //=> false\n * @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead.\n * @return {boolean}\n */\n static isValidSpecifier(s) {\n return this.isValidZone(s);\n }\n\n /**\n * Returns whether the provided string identifies a real zone\n * @param {string} zone - The string to check\n * @example IANAZone.isValidZone(\"America/New_York\") //=> true\n * @example IANAZone.isValidZone(\"Fantasia/Castle\") //=> false\n * @example IANAZone.isValidZone(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */\n static isValidZone(zone) {\n if (!zone) {\n return false;\n }\n try {\n new Intl.DateTimeFormat(\"en-US\", { timeZone: zone }).format();\n return true;\n } catch (e) {\n return false;\n }\n }\n\n constructor(name) {\n super();\n /** @private **/\n this.zoneName = name;\n /** @private **/\n this.valid = IANAZone.isValidZone(name);\n }\n\n /**\n * The type of zone. `iana` for all instances of `IANAZone`.\n * @override\n * @type {string}\n */\n get type() {\n return \"iana\";\n }\n\n /**\n * The name of this zone (i.e. the IANA zone name).\n * @override\n * @type {string}\n */\n get name() {\n return this.zoneName;\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year:\n * Always returns false for all IANA zones.\n * @override\n * @type {boolean}\n */\n get isUniversal() {\n return false;\n }\n\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @override\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale, this.name);\n }\n\n /**\n * Returns the offset's value as a string\n * @override\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @override\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */\n offset(ts) {\n if (!this.valid) return NaN;\n const date = new Date(ts);\n\n if (isNaN(date)) return NaN;\n\n const dtf = makeDTF(this.name);\n let [year, month, day, adOrBc, hour, minute, second] = dtf.formatToParts\n ? partsOffset(dtf, date)\n : hackyOffset(dtf, date);\n\n if (adOrBc === \"BC\") {\n year = -Math.abs(year) + 1;\n }\n\n // because we're using hour12 and https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat\n const adjustedHour = hour === 24 ? 0 : hour;\n\n const asUTC = objToLocalTS({\n year,\n month,\n day,\n hour: adjustedHour,\n minute,\n second,\n millisecond: 0,\n });\n\n let asTS = +date;\n const over = asTS % 1000;\n asTS -= over >= 0 ? over : 1000 + over;\n return (asUTC - asTS) / (60 * 1000);\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @override\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n return otherZone.type === \"iana\" && otherZone.name === this.name;\n }\n\n /**\n * Return whether this Zone is valid.\n * @override\n * @type {boolean}\n */\n get isValid() {\n return this.valid;\n }\n}\n", "import { hasLocaleWeekInfo, hasRelative, padStart, roundTo, validateWeekSettings } from \"./util.js\";\nimport * as English from \"./english.js\";\nimport Settings from \"../settings.js\";\nimport DateTime from \"../datetime.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n// todo - remap caching\n\nlet intlLFCache = {};\nfunction getCachedLF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlLFCache[key];\n if (!dtf) {\n dtf = new Intl.ListFormat(locString, opts);\n intlLFCache[key] = dtf;\n }\n return dtf;\n}\n\nconst intlDTCache = new Map();\nfunction getCachedDTF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlDTCache.get(key);\n if (dtf === undefined) {\n dtf = new Intl.DateTimeFormat(locString, opts);\n intlDTCache.set(key, dtf);\n }\n return dtf;\n}\n\nconst intlNumCache = new Map();\nfunction getCachedINF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let inf = intlNumCache.get(key);\n if (inf === undefined) {\n inf = new Intl.NumberFormat(locString, opts);\n intlNumCache.set(key, inf);\n }\n return inf;\n}\n\nconst intlRelCache = new Map();\nfunction getCachedRTF(locString, opts = {}) {\n const { base, ...cacheKeyOpts } = opts; // exclude `base` from the options\n const key = JSON.stringify([locString, cacheKeyOpts]);\n let inf = intlRelCache.get(key);\n if (inf === undefined) {\n inf = new Intl.RelativeTimeFormat(locString, opts);\n intlRelCache.set(key, inf);\n }\n return inf;\n}\n\nlet sysLocaleCache = null;\nfunction systemLocale() {\n if (sysLocaleCache) {\n return sysLocaleCache;\n } else {\n sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale;\n return sysLocaleCache;\n }\n}\n\nconst intlResolvedOptionsCache = new Map();\nfunction getCachedIntResolvedOptions(locString) {\n let opts = intlResolvedOptionsCache.get(locString);\n if (opts === undefined) {\n opts = new Intl.DateTimeFormat(locString).resolvedOptions();\n intlResolvedOptionsCache.set(locString, opts);\n }\n return opts;\n}\n\nconst weekInfoCache = new Map();\nfunction getCachedWeekInfo(locString) {\n let data = weekInfoCache.get(locString);\n if (!data) {\n const locale = new Intl.Locale(locString);\n // browsers currently implement this as a property, but spec says it should be a getter function\n data = \"getWeekInfo\" in locale ? locale.getWeekInfo() : locale.weekInfo;\n // minimalDays was removed from WeekInfo: https://github.com/tc39/proposal-intl-locale-info/issues/86\n if (!(\"minimalDays\" in data)) {\n data = { ...fallbackWeekSettings, ...data };\n }\n weekInfoCache.set(locString, data);\n }\n return data;\n}\n\nfunction parseLocaleString(localeStr) {\n // I really want to avoid writing a BCP 47 parser\n // see, e.g. https://github.com/wooorm/bcp-47\n // Instead, we'll do this:\n\n // a) if the string has no -u extensions, just leave it alone\n // b) if it does, use Intl to resolve everything\n // c) if Intl fails, try again without the -u\n\n // private subtags and unicode subtags have ordering requirements,\n // and we're not properly parsing this, so just strip out the\n // private ones if they exist.\n const xIndex = localeStr.indexOf(\"-x-\");\n if (xIndex !== -1) {\n localeStr = localeStr.substring(0, xIndex);\n }\n\n const uIndex = localeStr.indexOf(\"-u-\");\n if (uIndex === -1) {\n return [localeStr];\n } else {\n let options;\n let selectedStr;\n try {\n options = getCachedDTF(localeStr).resolvedOptions();\n selectedStr = localeStr;\n } catch (e) {\n const smaller = localeStr.substring(0, uIndex);\n options = getCachedDTF(smaller).resolvedOptions();\n selectedStr = smaller;\n }\n\n const { numberingSystem, calendar } = options;\n return [selectedStr, numberingSystem, calendar];\n }\n}\n\nfunction intlConfigString(localeStr, numberingSystem, outputCalendar) {\n if (outputCalendar || numberingSystem) {\n if (!localeStr.includes(\"-u-\")) {\n localeStr += \"-u\";\n }\n\n if (outputCalendar) {\n localeStr += `-ca-${outputCalendar}`;\n }\n\n if (numberingSystem) {\n localeStr += `-nu-${numberingSystem}`;\n }\n return localeStr;\n } else {\n return localeStr;\n }\n}\n\nfunction mapMonths(f) {\n const ms = [];\n for (let i = 1; i <= 12; i++) {\n const dt = DateTime.utc(2009, i, 1);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction mapWeekdays(f) {\n const ms = [];\n for (let i = 1; i <= 7; i++) {\n const dt = DateTime.utc(2016, 11, 13 + i);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction listStuff(loc, length, englishFn, intlFn) {\n const mode = loc.listingMode();\n\n if (mode === \"error\") {\n return null;\n } else if (mode === \"en\") {\n return englishFn(length);\n } else {\n return intlFn(length);\n }\n}\n\nfunction supportsFastNumbers(loc) {\n if (loc.numberingSystem && loc.numberingSystem !== \"latn\") {\n return false;\n } else {\n return (\n loc.numberingSystem === \"latn\" ||\n !loc.locale ||\n loc.locale.startsWith(\"en\") ||\n getCachedIntResolvedOptions(loc.locale).numberingSystem === \"latn\"\n );\n }\n}\n\n/**\n * @private\n */\n\nclass PolyNumberFormatter {\n constructor(intl, forceSimple, opts) {\n this.padTo = opts.padTo || 0;\n this.floor = opts.floor || false;\n\n const { padTo, floor, ...otherOpts } = opts;\n\n if (!forceSimple || Object.keys(otherOpts).length > 0) {\n const intlOpts = { useGrouping: false, ...opts };\n if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;\n this.inf = getCachedINF(intl, intlOpts);\n }\n }\n\n format(i) {\n if (this.inf) {\n const fixed = this.floor ? Math.floor(i) : i;\n return this.inf.format(fixed);\n } else {\n // to match the browser's numberformatter defaults\n const fixed = this.floor ? Math.floor(i) : roundTo(i, 3);\n return padStart(fixed, this.padTo);\n }\n }\n}\n\n/**\n * @private\n */\n\nclass PolyDateFormatter {\n constructor(dt, intl, opts) {\n this.opts = opts;\n this.originalZone = undefined;\n\n let z = undefined;\n if (this.opts.timeZone) {\n // Don't apply any workarounds if a timeZone is explicitly provided in opts\n this.dt = dt;\n } else if (dt.zone.type === \"fixed\") {\n // UTC-8 or Etc/UTC-8 are not part of tzdata, only Etc/GMT+8 and the like.\n // That is why fixed-offset TZ is set to that unless it is:\n // 1. Representing offset 0 when UTC is used to maintain previous behavior and does not become GMT.\n // 2. Unsupported by the browser:\n // - some do not support Etc/\n // - < Etc/GMT-14, > Etc/GMT+12, and 30-minute or 45-minute offsets are not part of tzdata\n const gmtOffset = -1 * (dt.offset / 60);\n const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;\n if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {\n z = offsetZ;\n this.dt = dt;\n } else {\n // Not all fixed-offset zones like Etc/+4:30 are present in tzdata so\n // we manually apply the offset and substitute the zone as needed.\n z = \"UTC\";\n this.dt = dt.offset === 0 ? dt : dt.setZone(\"UTC\").plus({ minutes: dt.offset });\n this.originalZone = dt.zone;\n }\n } else if (dt.zone.type === \"system\") {\n this.dt = dt;\n } else if (dt.zone.type === \"iana\") {\n this.dt = dt;\n z = dt.zone.name;\n } else {\n // Custom zones can have any offset / offsetName so we just manually\n // apply the offset and substitute the zone as needed.\n z = \"UTC\";\n this.dt = dt.setZone(\"UTC\").plus({ minutes: dt.offset });\n this.originalZone = dt.zone;\n }\n\n const intlOpts = { ...this.opts };\n intlOpts.timeZone = intlOpts.timeZone || z;\n this.dtf = getCachedDTF(intl, intlOpts);\n }\n\n format() {\n if (this.originalZone) {\n // If we have to substitute in the actual zone name, we have to use\n // formatToParts so that the timezone can be replaced.\n return this.formatToParts()\n .map(({ value }) => value)\n .join(\"\");\n }\n return this.dtf.format(this.dt.toJSDate());\n }\n\n formatToParts() {\n const parts = this.dtf.formatToParts(this.dt.toJSDate());\n if (this.originalZone) {\n return parts.map((part) => {\n if (part.type === \"timeZoneName\") {\n const offsetName = this.originalZone.offsetName(this.dt.ts, {\n locale: this.dt.locale,\n format: this.opts.timeZoneName,\n });\n return {\n ...part,\n value: offsetName,\n };\n } else {\n return part;\n }\n });\n }\n return parts;\n }\n\n resolvedOptions() {\n return this.dtf.resolvedOptions();\n }\n}\n\n/**\n * @private\n */\nclass PolyRelFormatter {\n constructor(intl, isEnglish, opts) {\n this.opts = { style: \"long\", ...opts };\n if (!isEnglish && hasRelative()) {\n this.rtf = getCachedRTF(intl, opts);\n }\n }\n\n format(count, unit) {\n if (this.rtf) {\n return this.rtf.format(count, unit);\n } else {\n return English.formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== \"long\");\n }\n }\n\n formatToParts(count, unit) {\n if (this.rtf) {\n return this.rtf.formatToParts(count, unit);\n } else {\n return [];\n }\n }\n}\n\nconst fallbackWeekSettings = {\n firstDay: 1,\n minimalDays: 4,\n weekend: [6, 7],\n};\n\n/**\n * @private\n */\nexport default class Locale {\n static fromOpts(opts) {\n return Locale.create(\n opts.locale,\n opts.numberingSystem,\n opts.outputCalendar,\n opts.weekSettings,\n opts.defaultToEN\n );\n }\n\n static create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN = false) {\n const specifiedLocale = locale || Settings.defaultLocale;\n // the system locale is useful for human-readable strings but annoying for parsing/formatting known formats\n const localeR = specifiedLocale || (defaultToEN ? \"en-US\" : systemLocale());\n const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;\n const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;\n const weekSettingsR = validateWeekSettings(weekSettings) || Settings.defaultWeekSettings;\n return new Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale);\n }\n\n static resetCache() {\n sysLocaleCache = null;\n intlDTCache.clear();\n intlNumCache.clear();\n intlRelCache.clear();\n intlResolvedOptionsCache.clear();\n weekInfoCache.clear();\n }\n\n static fromObject({ locale, numberingSystem, outputCalendar, weekSettings } = {}) {\n return Locale.create(locale, numberingSystem, outputCalendar, weekSettings);\n }\n\n constructor(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {\n const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);\n\n this.locale = parsedLocale;\n this.numberingSystem = numbering || parsedNumberingSystem || null;\n this.outputCalendar = outputCalendar || parsedOutputCalendar || null;\n this.weekSettings = weekSettings;\n this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);\n\n this.weekdaysCache = { format: {}, standalone: {} };\n this.monthsCache = { format: {}, standalone: {} };\n this.meridiemCache = null;\n this.eraCache = {};\n\n this.specifiedLocale = specifiedLocale;\n this.fastNumbersCached = null;\n }\n\n get fastNumbers() {\n if (this.fastNumbersCached == null) {\n this.fastNumbersCached = supportsFastNumbers(this);\n }\n\n return this.fastNumbersCached;\n }\n\n listingMode() {\n const isActuallyEn = this.isEnglish();\n const hasNoWeirdness =\n (this.numberingSystem === null || this.numberingSystem === \"latn\") &&\n (this.outputCalendar === null || this.outputCalendar === \"gregory\");\n return isActuallyEn && hasNoWeirdness ? \"en\" : \"intl\";\n }\n\n clone(alts) {\n if (!alts || Object.getOwnPropertyNames(alts).length === 0) {\n return this;\n } else {\n return Locale.create(\n alts.locale || this.specifiedLocale,\n alts.numberingSystem || this.numberingSystem,\n alts.outputCalendar || this.outputCalendar,\n validateWeekSettings(alts.weekSettings) || this.weekSettings,\n alts.defaultToEN || false\n );\n }\n }\n\n redefaultToEN(alts = {}) {\n return this.clone({ ...alts, defaultToEN: true });\n }\n\n redefaultToSystem(alts = {}) {\n return this.clone({ ...alts, defaultToEN: false });\n }\n\n months(length, format = false) {\n return listStuff(this, length, English.months, () => {\n // Workaround for \"ja\" locale: formatToParts does not label all parts of the month\n // as \"month\" and for this locale there is no difference between \"format\" and \"non-format\".\n // As such, just use format() instead of formatToParts() and take the whole string\n const monthSpecialCase = this.intl === \"ja\" || this.intl.startsWith(\"ja-\");\n format &= !monthSpecialCase;\n const intl = format ? { month: length, day: \"numeric\" } : { month: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.monthsCache[formatStr][length]) {\n const mapper = !monthSpecialCase\n ? (dt) => this.extract(dt, intl, \"month\")\n : (dt) => this.dtFormatter(dt, intl).format();\n this.monthsCache[formatStr][length] = mapMonths(mapper);\n }\n return this.monthsCache[formatStr][length];\n });\n }\n\n weekdays(length, format = false) {\n return listStuff(this, length, English.weekdays, () => {\n const intl = format\n ? { weekday: length, year: \"numeric\", month: \"long\", day: \"numeric\" }\n : { weekday: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.weekdaysCache[formatStr][length]) {\n this.weekdaysCache[formatStr][length] = mapWeekdays((dt) =>\n this.extract(dt, intl, \"weekday\")\n );\n }\n return this.weekdaysCache[formatStr][length];\n });\n }\n\n meridiems() {\n return listStuff(\n this,\n undefined,\n () => English.meridiems,\n () => {\n // In theory there could be aribitrary day periods. We're gonna assume there are exactly two\n // for AM and PM. This is probably wrong, but it's makes parsing way easier.\n if (!this.meridiemCache) {\n const intl = { hour: \"numeric\", hourCycle: \"h12\" };\n this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(\n (dt) => this.extract(dt, intl, \"dayperiod\")\n );\n }\n\n return this.meridiemCache;\n }\n );\n }\n\n eras(length) {\n return listStuff(this, length, English.eras, () => {\n const intl = { era: length };\n\n // This is problematic. Different calendars are going to define eras totally differently. What I need is the minimum set of dates\n // to definitely enumerate them.\n if (!this.eraCache[length]) {\n this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map((dt) =>\n this.extract(dt, intl, \"era\")\n );\n }\n\n return this.eraCache[length];\n });\n }\n\n extract(dt, intlOpts, field) {\n const df = this.dtFormatter(dt, intlOpts),\n results = df.formatToParts(),\n matching = results.find((m) => m.type.toLowerCase() === field);\n return matching ? matching.value : null;\n }\n\n numberFormatter(opts = {}) {\n // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave)\n // (in contrast, the rest of the condition is used heavily)\n return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);\n }\n\n dtFormatter(dt, intlOpts = {}) {\n return new PolyDateFormatter(dt, this.intl, intlOpts);\n }\n\n relFormatter(opts = {}) {\n return new PolyRelFormatter(this.intl, this.isEnglish(), opts);\n }\n\n listFormatter(opts = {}) {\n return getCachedLF(this.intl, opts);\n }\n\n isEnglish() {\n return (\n this.locale === \"en\" ||\n this.locale.toLowerCase() === \"en-us\" ||\n getCachedIntResolvedOptions(this.intl).locale.startsWith(\"en-us\")\n );\n }\n\n getWeekSettings() {\n if (this.weekSettings) {\n return this.weekSettings;\n } else if (!hasLocaleWeekInfo()) {\n return fallbackWeekSettings;\n } else {\n return getCachedWeekInfo(this.locale);\n }\n }\n\n getStartOfWeek() {\n return this.getWeekSettings().firstDay;\n }\n\n getMinDaysInFirstWeek() {\n return this.getWeekSettings().minimalDays;\n }\n\n getWeekendDays() {\n return this.getWeekSettings().weekend;\n }\n\n equals(other) {\n return (\n this.locale === other.locale &&\n this.numberingSystem === other.numberingSystem &&\n this.outputCalendar === other.outputCalendar\n );\n }\n\n toString() {\n return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`;\n }\n}\n", "import { formatOffset, signedOffset } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * A zone with a fixed offset (meaning no DST)\n * @implements {Zone}\n */\nexport default class FixedOffsetZone extends Zone {\n /**\n * Get a singleton instance of UTC\n * @return {FixedOffsetZone}\n */\n static get utcInstance() {\n if (singleton === null) {\n singleton = new FixedOffsetZone(0);\n }\n return singleton;\n }\n\n /**\n * Get an instance with a specified offset\n * @param {number} offset - The offset in minutes\n * @return {FixedOffsetZone}\n */\n static instance(offset) {\n return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset);\n }\n\n /**\n * Get an instance of FixedOffsetZone from a UTC offset string, like \"UTC+6\"\n * @param {string} s - The offset string to parse\n * @example FixedOffsetZone.parseSpecifier(\"UTC+6\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC+06\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC-6:00\")\n * @return {FixedOffsetZone}\n */\n static parseSpecifier(s) {\n if (s) {\n const r = s.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);\n if (r) {\n return new FixedOffsetZone(signedOffset(r[1], r[2]));\n }\n }\n return null;\n }\n\n constructor(offset) {\n super();\n /** @private **/\n this.fixed = offset;\n }\n\n /**\n * The type of zone. `fixed` for all instances of `FixedOffsetZone`.\n * @override\n * @type {string}\n */\n get type() {\n return \"fixed\";\n }\n\n /**\n * The name of this zone.\n * All fixed zones' names always start with \"UTC\" (plus optional offset)\n * @override\n * @type {string}\n */\n get name() {\n return this.fixed === 0 ? \"UTC\" : `UTC${formatOffset(this.fixed, \"narrow\")}`;\n }\n\n /**\n * The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn`\n *\n * @override\n * @type {string}\n */\n get ianaName() {\n if (this.fixed === 0) {\n return \"Etc/UTC\";\n } else {\n return `Etc/GMT${formatOffset(-this.fixed, \"narrow\")}`;\n }\n }\n\n /**\n * Returns the offset's common name at the specified timestamp.\n *\n * For fixed offset zones this equals to the zone name.\n * @override\n */\n offsetName() {\n return this.name;\n }\n\n /**\n * Returns the offset's value as a string\n * @override\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n return formatOffset(this.fixed, format);\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year:\n * Always returns true for all fixed offset zones.\n * @override\n * @type {boolean}\n */\n get isUniversal() {\n return true;\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n *\n * For fixed offset zones, this is constant and does not depend on a timestamp.\n * @override\n * @return {number}\n */\n offset() {\n return this.fixed;\n }\n\n /**\n * Return whether this Zone is equal to another zone (i.e. also fixed and same offset)\n * @override\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n return otherZone.type === \"fixed\" && otherZone.fixed === this.fixed;\n }\n\n /**\n * Return whether this Zone is valid:\n * All fixed offset zones are valid.\n * @override\n * @type {boolean}\n */\n get isValid() {\n return true;\n }\n}\n", "import Zone from \"../zone.js\";\n\n/**\n * A zone that failed to parse. You should never need to instantiate this.\n * @implements {Zone}\n */\nexport default class InvalidZone extends Zone {\n constructor(zoneName) {\n super();\n /** @private */\n this.zoneName = zoneName;\n }\n\n /** @override **/\n get type() {\n return \"invalid\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get isUniversal() {\n return false;\n }\n\n /** @override **/\n offsetName() {\n return null;\n }\n\n /** @override **/\n formatOffset() {\n return \"\";\n }\n\n /** @override **/\n offset() {\n return NaN;\n }\n\n /** @override **/\n equals() {\n return false;\n }\n\n /** @override **/\n get isValid() {\n return false;\n }\n}\n", "/**\n * @private\n */\n\nimport Zone from \"../zone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport InvalidZone from \"../zones/invalidZone.js\";\n\nimport { isUndefined, isString, isNumber } from \"./util.js\";\nimport SystemZone from \"../zones/systemZone.js\";\n\nexport function normalizeZone(input, defaultZone) {\n let offset;\n if (isUndefined(input) || input === null) {\n return defaultZone;\n } else if (input instanceof Zone) {\n return input;\n } else if (isString(input)) {\n const lowered = input.toLowerCase();\n if (lowered === \"default\") return defaultZone;\n else if (lowered === \"local\" || lowered === \"system\") return SystemZone.instance;\n else if (lowered === \"utc\" || lowered === \"gmt\") return FixedOffsetZone.utcInstance;\n else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input);\n } else if (isNumber(input)) {\n return FixedOffsetZone.instance(input);\n } else if (typeof input === \"object\" && \"offset\" in input && typeof input.offset === \"function\") {\n // This is dumb, but the instanceof check above doesn't seem to really work\n // so we're duck checking it\n return input;\n } else {\n return new InvalidZone(input);\n }\n}\n", "const numberingSystems = {\n arab: \"[\\u0660-\\u0669]\",\n arabext: \"[\\u06F0-\\u06F9]\",\n bali: \"[\\u1B50-\\u1B59]\",\n beng: \"[\\u09E6-\\u09EF]\",\n deva: \"[\\u0966-\\u096F]\",\n fullwide: \"[\\uFF10-\\uFF19]\",\n gujr: \"[\\u0AE6-\\u0AEF]\",\n hanidec: \"[〇|一|二|三|四|五|六|七|八|九]\",\n khmr: \"[\\u17E0-\\u17E9]\",\n knda: \"[\\u0CE6-\\u0CEF]\",\n laoo: \"[\\u0ED0-\\u0ED9]\",\n limb: \"[\\u1946-\\u194F]\",\n mlym: \"[\\u0D66-\\u0D6F]\",\n mong: \"[\\u1810-\\u1819]\",\n mymr: \"[\\u1040-\\u1049]\",\n orya: \"[\\u0B66-\\u0B6F]\",\n tamldec: \"[\\u0BE6-\\u0BEF]\",\n telu: \"[\\u0C66-\\u0C6F]\",\n thai: \"[\\u0E50-\\u0E59]\",\n tibt: \"[\\u0F20-\\u0F29]\",\n latn: \"\\\\d\",\n};\n\nconst numberingSystemsUTF16 = {\n arab: [1632, 1641],\n arabext: [1776, 1785],\n bali: [6992, 7001],\n beng: [2534, 2543],\n deva: [2406, 2415],\n fullwide: [65296, 65303],\n gujr: [2790, 2799],\n khmr: [6112, 6121],\n knda: [3302, 3311],\n laoo: [3792, 3801],\n limb: [6470, 6479],\n mlym: [3430, 3439],\n mong: [6160, 6169],\n mymr: [4160, 4169],\n orya: [2918, 2927],\n tamldec: [3046, 3055],\n telu: [3174, 3183],\n thai: [3664, 3673],\n tibt: [3872, 3881],\n};\n\nconst hanidecChars = numberingSystems.hanidec.replace(/[\\[|\\]]/g, \"\").split(\"\");\n\nexport function parseDigits(str) {\n let value = parseInt(str, 10);\n if (isNaN(value)) {\n value = \"\";\n for (let i = 0; i < str.length; i++) {\n const code = str.charCodeAt(i);\n\n if (str[i].search(numberingSystems.hanidec) !== -1) {\n value += hanidecChars.indexOf(str[i]);\n } else {\n for (const key in numberingSystemsUTF16) {\n const [min, max] = numberingSystemsUTF16[key];\n if (code >= min && code <= max) {\n value += code - min;\n }\n }\n }\n }\n return parseInt(value, 10);\n } else {\n return value;\n }\n}\n\n// cache of {numberingSystem: {append: regex}}\nconst digitRegexCache = new Map();\nexport function resetDigitRegexCache() {\n digitRegexCache.clear();\n}\n\nexport function digitRegex({ numberingSystem }, append = \"\") {\n const ns = numberingSystem || \"latn\";\n\n let appendCache = digitRegexCache.get(ns);\n if (appendCache === undefined) {\n appendCache = new Map();\n digitRegexCache.set(ns, appendCache);\n }\n let regex = appendCache.get(append);\n if (regex === undefined) {\n regex = new RegExp(`${numberingSystems[ns]}${append}`);\n appendCache.set(append, regex);\n }\n\n return regex;\n}\n", "import SystemZone from \"./zones/systemZone.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport Locale from \"./impl/locale.js\";\nimport DateTime from \"./datetime.js\";\n\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\nimport { validateWeekSettings } from \"./impl/util.js\";\nimport { resetDigitRegexCache } from \"./impl/digits.js\";\n\nlet now = () => Date.now(),\n defaultZone = \"system\",\n defaultLocale = null,\n defaultNumberingSystem = null,\n defaultOutputCalendar = null,\n twoDigitCutoffYear = 60,\n throwOnInvalid,\n defaultWeekSettings = null;\n\n/**\n * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here.\n */\nexport default class Settings {\n /**\n * Get the callback for returning the current timestamp.\n * @type {function}\n */\n static get now() {\n return now;\n }\n\n /**\n * Set the callback for returning the current timestamp.\n * The function should return a number, which will be interpreted as an Epoch millisecond count\n * @type {function}\n * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future\n * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time\n */\n static set now(n) {\n now = n;\n }\n\n /**\n * Set the default time zone to create DateTimes in. Does not affect existing instances.\n * Use the value \"system\" to reset this value to the system's time zone.\n * @type {string}\n */\n static set defaultZone(zone) {\n defaultZone = zone;\n }\n\n /**\n * Get the default time zone object currently used to create DateTimes. Does not affect existing instances.\n * The default value is the system's time zone (the one set on the machine that runs this code).\n * @type {Zone}\n */\n static get defaultZone() {\n return normalizeZone(defaultZone, SystemZone.instance);\n }\n\n /**\n * Get the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultLocale() {\n return defaultLocale;\n }\n\n /**\n * Set the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultLocale(locale) {\n defaultLocale = locale;\n }\n\n /**\n * Get the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultNumberingSystem() {\n return defaultNumberingSystem;\n }\n\n /**\n * Set the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultNumberingSystem(numberingSystem) {\n defaultNumberingSystem = numberingSystem;\n }\n\n /**\n * Get the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultOutputCalendar() {\n return defaultOutputCalendar;\n }\n\n /**\n * Set the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultOutputCalendar(outputCalendar) {\n defaultOutputCalendar = outputCalendar;\n }\n\n /**\n * @typedef {Object} WeekSettings\n * @property {number} firstDay\n * @property {number} minimalDays\n * @property {number[]} weekend\n */\n\n /**\n * @return {WeekSettings|null}\n */\n static get defaultWeekSettings() {\n return defaultWeekSettings;\n }\n\n /**\n * Allows overriding the default locale week settings, i.e. the start of the week, the weekend and\n * how many days are required in the first week of a year.\n * Does not affect existing instances.\n *\n * @param {WeekSettings|null} weekSettings\n */\n static set defaultWeekSettings(weekSettings) {\n defaultWeekSettings = validateWeekSettings(weekSettings);\n }\n\n /**\n * Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.\n * @type {number}\n */\n static get twoDigitCutoffYear() {\n return twoDigitCutoffYear;\n }\n\n /**\n * Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.\n * @type {number}\n * @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century\n * @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century\n * @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950\n * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50\n * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50\n */\n static set twoDigitCutoffYear(cutoffYear) {\n twoDigitCutoffYear = cutoffYear % 100;\n }\n\n /**\n * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static get throwOnInvalid() {\n return throwOnInvalid;\n }\n\n /**\n * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static set throwOnInvalid(t) {\n throwOnInvalid = t;\n }\n\n /**\n * Reset Luxon's global caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCaches() {\n Locale.resetCache();\n IANAZone.resetCache();\n DateTime.resetCache();\n resetDigitRegexCache();\n }\n}\n", "export default class Invalid {\n constructor(reason, explanation) {\n this.reason = reason;\n this.explanation = explanation;\n }\n\n toMessage() {\n if (this.explanation) {\n return `${this.reason}: ${this.explanation}`;\n } else {\n return this.reason;\n }\n }\n}\n", "import {\n integerBetween,\n isLeapYear,\n timeObject,\n daysInYear,\n daysInMonth,\n weeksInWeekYear,\n isInteger,\n isUndefined,\n} from \"./util.js\";\nimport Invalid from \"./invalid.js\";\nimport { ConflictingSpecificationError } from \"../errors.js\";\n\nconst nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],\n leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\n\nfunction unitOutOfRange(unit, value) {\n return new Invalid(\n \"unit out of range\",\n `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`\n );\n}\n\nexport function dayOfWeek(year, month, day) {\n const d = new Date(Date.UTC(year, month - 1, day));\n\n if (year < 100 && year >= 0) {\n d.setUTCFullYear(d.getUTCFullYear() - 1900);\n }\n\n const js = d.getUTCDay();\n\n return js === 0 ? 7 : js;\n}\n\nfunction computeOrdinal(year, month, day) {\n return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1];\n}\n\nfunction uncomputeOrdinal(year, ordinal) {\n const table = isLeapYear(year) ? leapLadder : nonLeapLadder,\n month0 = table.findIndex((i) => i < ordinal),\n day = ordinal - table[month0];\n return { month: month0 + 1, day };\n}\n\nexport function isoWeekdayToLocal(isoWeekday, startOfWeek) {\n return ((isoWeekday - startOfWeek + 7) % 7) + 1;\n}\n\n/**\n * @private\n */\n\nexport function gregorianToWeek(gregObj, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const { year, month, day } = gregObj,\n ordinal = computeOrdinal(year, month, day),\n weekday = isoWeekdayToLocal(dayOfWeek(year, month, day), startOfWeek);\n\n let weekNumber = Math.floor((ordinal - weekday + 14 - minDaysInFirstWeek) / 7),\n weekYear;\n\n if (weekNumber < 1) {\n weekYear = year - 1;\n weekNumber = weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek);\n } else if (weekNumber > weeksInWeekYear(year, minDaysInFirstWeek, startOfWeek)) {\n weekYear = year + 1;\n weekNumber = 1;\n } else {\n weekYear = year;\n }\n\n return { weekYear, weekNumber, weekday, ...timeObject(gregObj) };\n}\n\nexport function weekToGregorian(weekData, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const { weekYear, weekNumber, weekday } = weekData,\n weekdayOfJan4 = isoWeekdayToLocal(dayOfWeek(weekYear, 1, minDaysInFirstWeek), startOfWeek),\n yearInDays = daysInYear(weekYear);\n\n let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 7 + minDaysInFirstWeek,\n year;\n\n if (ordinal < 1) {\n year = weekYear - 1;\n ordinal += daysInYear(year);\n } else if (ordinal > yearInDays) {\n year = weekYear + 1;\n ordinal -= daysInYear(weekYear);\n } else {\n year = weekYear;\n }\n\n const { month, day } = uncomputeOrdinal(year, ordinal);\n return { year, month, day, ...timeObject(weekData) };\n}\n\nexport function gregorianToOrdinal(gregData) {\n const { year, month, day } = gregData;\n const ordinal = computeOrdinal(year, month, day);\n return { year, ordinal, ...timeObject(gregData) };\n}\n\nexport function ordinalToGregorian(ordinalData) {\n const { year, ordinal } = ordinalData;\n const { month, day } = uncomputeOrdinal(year, ordinal);\n return { year, month, day, ...timeObject(ordinalData) };\n}\n\n/**\n * Check if local week units like localWeekday are used in obj.\n * If so, validates that they are not mixed with ISO week units and then copies them to the normal week unit properties.\n * Modifies obj in-place!\n * @param obj the object values\n */\nexport function usesLocalWeekValues(obj, loc) {\n const hasLocaleWeekData =\n !isUndefined(obj.localWeekday) ||\n !isUndefined(obj.localWeekNumber) ||\n !isUndefined(obj.localWeekYear);\n if (hasLocaleWeekData) {\n const hasIsoWeekData =\n !isUndefined(obj.weekday) || !isUndefined(obj.weekNumber) || !isUndefined(obj.weekYear);\n\n if (hasIsoWeekData) {\n throw new ConflictingSpecificationError(\n \"Cannot mix locale-based week fields with ISO-based week fields\"\n );\n }\n if (!isUndefined(obj.localWeekday)) obj.weekday = obj.localWeekday;\n if (!isUndefined(obj.localWeekNumber)) obj.weekNumber = obj.localWeekNumber;\n if (!isUndefined(obj.localWeekYear)) obj.weekYear = obj.localWeekYear;\n delete obj.localWeekday;\n delete obj.localWeekNumber;\n delete obj.localWeekYear;\n return {\n minDaysInFirstWeek: loc.getMinDaysInFirstWeek(),\n startOfWeek: loc.getStartOfWeek(),\n };\n } else {\n return { minDaysInFirstWeek: 4, startOfWeek: 1 };\n }\n}\n\nexport function hasInvalidWeekData(obj, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const validYear = isInteger(obj.weekYear),\n validWeek = integerBetween(\n obj.weekNumber,\n 1,\n weeksInWeekYear(obj.weekYear, minDaysInFirstWeek, startOfWeek)\n ),\n validWeekday = integerBetween(obj.weekday, 1, 7);\n\n if (!validYear) {\n return unitOutOfRange(\"weekYear\", obj.weekYear);\n } else if (!validWeek) {\n return unitOutOfRange(\"week\", obj.weekNumber);\n } else if (!validWeekday) {\n return unitOutOfRange(\"weekday\", obj.weekday);\n } else return false;\n}\n\nexport function hasInvalidOrdinalData(obj) {\n const validYear = isInteger(obj.year),\n validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validOrdinal) {\n return unitOutOfRange(\"ordinal\", obj.ordinal);\n } else return false;\n}\n\nexport function hasInvalidGregorianData(obj) {\n const validYear = isInteger(obj.year),\n validMonth = integerBetween(obj.month, 1, 12),\n validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validMonth) {\n return unitOutOfRange(\"month\", obj.month);\n } else if (!validDay) {\n return unitOutOfRange(\"day\", obj.day);\n } else return false;\n}\n\nexport function hasInvalidTimeData(obj) {\n const { hour, minute, second, millisecond } = obj;\n const validHour =\n integerBetween(hour, 0, 23) ||\n (hour === 24 && minute === 0 && second === 0 && millisecond === 0),\n validMinute = integerBetween(minute, 0, 59),\n validSecond = integerBetween(second, 0, 59),\n validMillisecond = integerBetween(millisecond, 0, 999);\n\n if (!validHour) {\n return unitOutOfRange(\"hour\", hour);\n } else if (!validMinute) {\n return unitOutOfRange(\"minute\", minute);\n } else if (!validSecond) {\n return unitOutOfRange(\"second\", second);\n } else if (!validMillisecond) {\n return unitOutOfRange(\"millisecond\", millisecond);\n } else return false;\n}\n", "/*\n This is just a junk drawer, containing anything used across multiple classes.\n Because Luxon is small(ish), this should stay small and we won't worry about splitting\n it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.\n*/\n\nimport { InvalidArgumentError } from \"../errors.js\";\nimport Settings from \"../settings.js\";\nimport { dayOfWeek, isoWeekdayToLocal } from \"./conversions.js\";\n\n/**\n * @private\n */\n\n// TYPES\n\nexport function isUndefined(o) {\n return typeof o === \"undefined\";\n}\n\nexport function isNumber(o) {\n return typeof o === \"number\";\n}\n\nexport function isInteger(o) {\n return typeof o === \"number\" && o % 1 === 0;\n}\n\nexport function isString(o) {\n return typeof o === \"string\";\n}\n\nexport function isDate(o) {\n return Object.prototype.toString.call(o) === \"[object Date]\";\n}\n\n// CAPABILITIES\n\nexport function hasRelative() {\n try {\n return typeof Intl !== \"undefined\" && !!Intl.RelativeTimeFormat;\n } catch (e) {\n return false;\n }\n}\n\nexport function hasLocaleWeekInfo() {\n try {\n return (\n typeof Intl !== \"undefined\" &&\n !!Intl.Locale &&\n (\"weekInfo\" in Intl.Locale.prototype || \"getWeekInfo\" in Intl.Locale.prototype)\n );\n } catch (e) {\n return false;\n }\n}\n\n// OBJECTS AND ARRAYS\n\nexport function maybeArray(thing) {\n return Array.isArray(thing) ? thing : [thing];\n}\n\nexport function bestBy(arr, by, compare) {\n if (arr.length === 0) {\n return undefined;\n }\n return arr.reduce((best, next) => {\n const pair = [by(next), next];\n if (!best) {\n return pair;\n } else if (compare(best[0], pair[0]) === best[0]) {\n return best;\n } else {\n return pair;\n }\n }, null)[1];\n}\n\nexport function pick(obj, keys) {\n return keys.reduce((a, k) => {\n a[k] = obj[k];\n return a;\n }, {});\n}\n\nexport function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nexport function validateWeekSettings(settings) {\n if (settings == null) {\n return null;\n } else if (typeof settings !== \"object\") {\n throw new InvalidArgumentError(\"Week settings must be an object\");\n } else {\n if (\n !integerBetween(settings.firstDay, 1, 7) ||\n !integerBetween(settings.minimalDays, 1, 7) ||\n !Array.isArray(settings.weekend) ||\n settings.weekend.some((v) => !integerBetween(v, 1, 7))\n ) {\n throw new InvalidArgumentError(\"Invalid week settings\");\n }\n return {\n firstDay: settings.firstDay,\n minimalDays: settings.minimalDays,\n weekend: Array.from(settings.weekend),\n };\n }\n}\n\n// NUMBERS AND STRINGS\n\nexport function integerBetween(thing, bottom, top) {\n return isInteger(thing) && thing >= bottom && thing <= top;\n}\n\n// x % n but takes the sign of n instead of x\nexport function floorMod(x, n) {\n return x - n * Math.floor(x / n);\n}\n\nexport function padStart(input, n = 2) {\n const isNeg = input < 0;\n let padded;\n if (isNeg) {\n padded = \"-\" + (\"\" + -input).padStart(n, \"0\");\n } else {\n padded = (\"\" + input).padStart(n, \"0\");\n }\n return padded;\n}\n\nexport function parseInteger(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseInt(string, 10);\n }\n}\n\nexport function parseFloating(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseFloat(string);\n }\n}\n\nexport function parseMillis(fraction) {\n // Return undefined (instead of 0) in these cases, where fraction is not set\n if (isUndefined(fraction) || fraction === null || fraction === \"\") {\n return undefined;\n } else {\n const f = parseFloat(\"0.\" + fraction) * 1000;\n return Math.floor(f);\n }\n}\n\nexport function roundTo(number, digits, rounding = \"round\") {\n const factor = 10 ** digits;\n switch (rounding) {\n case \"expand\":\n return number > 0\n ? Math.ceil(number * factor) / factor\n : Math.floor(number * factor) / factor;\n case \"trunc\":\n return Math.trunc(number * factor) / factor;\n case \"round\":\n return Math.round(number * factor) / factor;\n case \"floor\":\n return Math.floor(number * factor) / factor;\n case \"ceil\":\n return Math.ceil(number * factor) / factor;\n default:\n throw new RangeError(`Value rounding ${rounding} is out of range`);\n }\n}\n\n// DATE BASICS\n\nexport function isLeapYear(year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n\nexport function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\nexport function daysInMonth(year, month) {\n const modMonth = floorMod(month - 1, 12) + 1,\n modYear = year + (month - modMonth) / 12;\n\n if (modMonth === 2) {\n return isLeapYear(modYear) ? 29 : 28;\n } else {\n return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];\n }\n}\n\n// convert a calendar object to a local timestamp (epoch, but with the offset baked in)\nexport function objToLocalTS(obj) {\n let d = Date.UTC(\n obj.year,\n obj.month - 1,\n obj.day,\n obj.hour,\n obj.minute,\n obj.second,\n obj.millisecond\n );\n\n // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that\n if (obj.year < 100 && obj.year >= 0) {\n d = new Date(d);\n // set the month and day again, this is necessary because year 2000 is a leap year, but year 100 is not\n // so if obj.year is in 99, but obj.day makes it roll over into year 100,\n // the calculations done by Date.UTC are using year 2000 - which is incorrect\n d.setUTCFullYear(obj.year, obj.month - 1, obj.day);\n }\n return +d;\n}\n\n// adapted from moment.js: https://github.com/moment/moment/blob/000ac1800e620f770f4eb31b5ae908f6167b0ab2/src/lib/units/week-calendar-utils.js\nfunction firstWeekOffset(year, minDaysInFirstWeek, startOfWeek) {\n const fwdlw = isoWeekdayToLocal(dayOfWeek(year, 1, minDaysInFirstWeek), startOfWeek);\n return -fwdlw + minDaysInFirstWeek - 1;\n}\n\nexport function weeksInWeekYear(weekYear, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const weekOffset = firstWeekOffset(weekYear, minDaysInFirstWeek, startOfWeek);\n const weekOffsetNext = firstWeekOffset(weekYear + 1, minDaysInFirstWeek, startOfWeek);\n return (daysInYear(weekYear) - weekOffset + weekOffsetNext) / 7;\n}\n\nexport function untruncateYear(year) {\n if (year > 99) {\n return year;\n } else return year > Settings.twoDigitCutoffYear ? 1900 + year : 2000 + year;\n}\n\n// PARSING\n\nexport function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {\n const date = new Date(ts),\n intlOpts = {\n hourCycle: \"h23\",\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n };\n\n if (timeZone) {\n intlOpts.timeZone = timeZone;\n }\n\n const modified = { timeZoneName: offsetFormat, ...intlOpts };\n\n const parsed = new Intl.DateTimeFormat(locale, modified)\n .formatToParts(date)\n .find((m) => m.type.toLowerCase() === \"timezonename\");\n return parsed ? parsed.value : null;\n}\n\n// signedOffset('-5', '30') -> -330\nexport function signedOffset(offHourStr, offMinuteStr) {\n let offHour = parseInt(offHourStr, 10);\n\n // don't || this because we want to preserve -0\n if (Number.isNaN(offHour)) {\n offHour = 0;\n }\n\n const offMin = parseInt(offMinuteStr, 10) || 0,\n offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;\n return offHour * 60 + offMinSigned;\n}\n\n// COERCION\n\nexport function asNumber(value) {\n const numericValue = Number(value);\n if (typeof value === \"boolean\" || value === \"\" || !Number.isFinite(numericValue))\n throw new InvalidArgumentError(`Invalid unit value ${value}`);\n return numericValue;\n}\n\nexport function normalizeObject(obj, normalizer) {\n const normalized = {};\n for (const u in obj) {\n if (hasOwnProperty(obj, u)) {\n const v = obj[u];\n if (v === undefined || v === null) continue;\n normalized[normalizer(u)] = asNumber(v);\n }\n }\n return normalized;\n}\n\n/**\n * Returns the offset's value as a string\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\nexport function formatOffset(offset, format) {\n const hours = Math.trunc(Math.abs(offset / 60)),\n minutes = Math.trunc(Math.abs(offset % 60)),\n sign = offset >= 0 ? \"+\" : \"-\";\n\n switch (format) {\n case \"short\":\n return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`;\n case \"narrow\":\n return `${sign}${hours}${minutes > 0 ? `:${minutes}` : \"\"}`;\n case \"techie\":\n return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`;\n default:\n throw new RangeError(`Value format ${format} is out of range for property format`);\n }\n}\n\nexport function timeObject(obj) {\n return pick(obj, [\"hour\", \"minute\", \"second\", \"millisecond\"]);\n}\n", "import * as Formats from \"./formats.js\";\nimport { pick } from \"./util.js\";\n\nfunction stringify(obj) {\n return JSON.stringify(obj, Object.keys(obj).sort());\n}\n\n/**\n * @private\n */\n\nexport const monthsLong = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n];\n\nexport const monthsShort = [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n];\n\nexport const monthsNarrow = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"];\n\nexport function months(length) {\n switch (length) {\n case \"narrow\":\n return [...monthsNarrow];\n case \"short\":\n return [...monthsShort];\n case \"long\":\n return [...monthsLong];\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"];\n case \"2-digit\":\n return [\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\"];\n default:\n return null;\n }\n}\n\nexport const weekdaysLong = [\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n \"Sunday\",\n];\n\nexport const weekdaysShort = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\n\nexport const weekdaysNarrow = [\"M\", \"T\", \"W\", \"T\", \"F\", \"S\", \"S\"];\n\nexport function weekdays(length) {\n switch (length) {\n case \"narrow\":\n return [...weekdaysNarrow];\n case \"short\":\n return [...weekdaysShort];\n case \"long\":\n return [...weekdaysLong];\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"];\n default:\n return null;\n }\n}\n\nexport const meridiems = [\"AM\", \"PM\"];\n\nexport const erasLong = [\"Before Christ\", \"Anno Domini\"];\n\nexport const erasShort = [\"BC\", \"AD\"];\n\nexport const erasNarrow = [\"B\", \"A\"];\n\nexport function eras(length) {\n switch (length) {\n case \"narrow\":\n return [...erasNarrow];\n case \"short\":\n return [...erasShort];\n case \"long\":\n return [...erasLong];\n default:\n return null;\n }\n}\n\nexport function meridiemForDateTime(dt) {\n return meridiems[dt.hour < 12 ? 0 : 1];\n}\n\nexport function weekdayForDateTime(dt, length) {\n return weekdays(length)[dt.weekday - 1];\n}\n\nexport function monthForDateTime(dt, length) {\n return months(length)[dt.month - 1];\n}\n\nexport function eraForDateTime(dt, length) {\n return eras(length)[dt.year < 0 ? 0 : 1];\n}\n\nexport function formatRelativeTime(unit, count, numeric = \"always\", narrow = false) {\n const units = {\n years: [\"year\", \"yr.\"],\n quarters: [\"quarter\", \"qtr.\"],\n months: [\"month\", \"mo.\"],\n weeks: [\"week\", \"wk.\"],\n days: [\"day\", \"day\", \"days\"],\n hours: [\"hour\", \"hr.\"],\n minutes: [\"minute\", \"min.\"],\n seconds: [\"second\", \"sec.\"],\n };\n\n const lastable = [\"hours\", \"minutes\", \"seconds\"].indexOf(unit) === -1;\n\n if (numeric === \"auto\" && lastable) {\n const isDay = unit === \"days\";\n switch (count) {\n case 1:\n return isDay ? \"tomorrow\" : `next ${units[unit][0]}`;\n case -1:\n return isDay ? \"yesterday\" : `last ${units[unit][0]}`;\n case 0:\n return isDay ? \"today\" : `this ${units[unit][0]}`;\n default: // fall through\n }\n }\n\n const isInPast = Object.is(count, -0) || count < 0,\n fmtValue = Math.abs(count),\n singular = fmtValue === 1,\n lilUnits = units[unit],\n fmtUnit = narrow\n ? singular\n ? lilUnits[1]\n : lilUnits[2] || lilUnits[1]\n : singular\n ? units[unit][0]\n : unit;\n return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;\n}\n\nexport function formatString(knownFormat) {\n // these all have the offsets removed because we don't have access to them\n // without all the intl stuff this is backfilling\n const filtered = pick(knownFormat, [\n \"weekday\",\n \"era\",\n \"year\",\n \"month\",\n \"day\",\n \"hour\",\n \"minute\",\n \"second\",\n \"timeZoneName\",\n \"hourCycle\",\n ]),\n key = stringify(filtered),\n dateTimeHuge = \"EEEE, LLLL d, yyyy, h:mm a\";\n switch (key) {\n case stringify(Formats.DATE_SHORT):\n return \"M/d/yyyy\";\n case stringify(Formats.DATE_MED):\n return \"LLL d, yyyy\";\n case stringify(Formats.DATE_MED_WITH_WEEKDAY):\n return \"EEE, LLL d, yyyy\";\n case stringify(Formats.DATE_FULL):\n return \"LLLL d, yyyy\";\n case stringify(Formats.DATE_HUGE):\n return \"EEEE, LLLL d, yyyy\";\n case stringify(Formats.TIME_SIMPLE):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_SECONDS):\n return \"h:mm:ss a\";\n case stringify(Formats.TIME_WITH_SHORT_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_LONG_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_24_SIMPLE):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_SECONDS):\n return \"HH:mm:ss\";\n case stringify(Formats.TIME_24_WITH_SHORT_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_LONG_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.DATETIME_SHORT):\n return \"M/d/yyyy, h:mm a\";\n case stringify(Formats.DATETIME_MED):\n return \"LLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL):\n return \"LLLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_HUGE):\n return dateTimeHuge;\n case stringify(Formats.DATETIME_SHORT_WITH_SECONDS):\n return \"M/d/yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_SECONDS):\n return \"LLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_WEEKDAY):\n return \"EEE, d LLL yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL_WITH_SECONDS):\n return \"LLLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_HUGE_WITH_SECONDS):\n return \"EEEE, LLLL d, yyyy, h:mm:ss a\";\n default:\n return dateTimeHuge;\n }\n}\n", "import * as English from \"./english.js\";\nimport * as Formats from \"./formats.js\";\nimport { padStart } from \"./util.js\";\n\nfunction stringifyTokens(splits, tokenToString) {\n let s = \"\";\n for (const token of splits) {\n if (token.literal) {\n s += token.val;\n } else {\n s += tokenToString(token.val);\n }\n }\n return s;\n}\n\nconst macroTokenToFormatOpts = {\n D: Formats.DATE_SHORT,\n DD: Formats.DATE_MED,\n DDD: Formats.DATE_FULL,\n DDDD: Formats.DATE_HUGE,\n t: Formats.TIME_SIMPLE,\n tt: Formats.TIME_WITH_SECONDS,\n ttt: Formats.TIME_WITH_SHORT_OFFSET,\n tttt: Formats.TIME_WITH_LONG_OFFSET,\n T: Formats.TIME_24_SIMPLE,\n TT: Formats.TIME_24_WITH_SECONDS,\n TTT: Formats.TIME_24_WITH_SHORT_OFFSET,\n TTTT: Formats.TIME_24_WITH_LONG_OFFSET,\n f: Formats.DATETIME_SHORT,\n ff: Formats.DATETIME_MED,\n fff: Formats.DATETIME_FULL,\n ffff: Formats.DATETIME_HUGE,\n F: Formats.DATETIME_SHORT_WITH_SECONDS,\n FF: Formats.DATETIME_MED_WITH_SECONDS,\n FFF: Formats.DATETIME_FULL_WITH_SECONDS,\n FFFF: Formats.DATETIME_HUGE_WITH_SECONDS,\n};\n\n/**\n * @private\n */\n\nexport default class Formatter {\n static create(locale, opts = {}) {\n return new Formatter(locale, opts);\n }\n\n static parseFormat(fmt) {\n // white-space is always considered a literal in user-provided formats\n // the \" \" token has a special meaning (see unitForToken)\n\n let current = null,\n currentFull = \"\",\n bracketed = false;\n const splits = [];\n for (let i = 0; i < fmt.length; i++) {\n const c = fmt.charAt(i);\n if (c === \"'\") {\n // turn '' into a literal signal quote instead of just skipping the empty literal\n if (currentFull.length > 0 || bracketed) {\n splits.push({\n literal: bracketed || /^\\s+$/.test(currentFull),\n val: currentFull === \"\" ? \"'\" : currentFull,\n });\n }\n current = null;\n currentFull = \"\";\n bracketed = !bracketed;\n } else if (bracketed) {\n currentFull += c;\n } else if (c === current) {\n currentFull += c;\n } else {\n if (currentFull.length > 0) {\n splits.push({ literal: /^\\s+$/.test(currentFull), val: currentFull });\n }\n currentFull = c;\n current = c;\n }\n }\n\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed || /^\\s+$/.test(currentFull), val: currentFull });\n }\n\n return splits;\n }\n\n static macroTokenToFormatOpts(token) {\n return macroTokenToFormatOpts[token];\n }\n\n constructor(locale, formatOpts) {\n this.opts = formatOpts;\n this.loc = locale;\n this.systemLoc = null;\n }\n\n formatWithSystemDefault(dt, opts) {\n if (this.systemLoc === null) {\n this.systemLoc = this.loc.redefaultToSystem();\n }\n const df = this.systemLoc.dtFormatter(dt, { ...this.opts, ...opts });\n return df.format();\n }\n\n dtFormatter(dt, opts = {}) {\n return this.loc.dtFormatter(dt, { ...this.opts, ...opts });\n }\n\n formatDateTime(dt, opts) {\n return this.dtFormatter(dt, opts).format();\n }\n\n formatDateTimeParts(dt, opts) {\n return this.dtFormatter(dt, opts).formatToParts();\n }\n\n formatInterval(interval, opts) {\n const df = this.dtFormatter(interval.start, opts);\n return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate());\n }\n\n resolvedOptions(dt, opts) {\n return this.dtFormatter(dt, opts).resolvedOptions();\n }\n\n num(n, p = 0, signDisplay = undefined) {\n // we get some perf out of doing this here, annoyingly\n if (this.opts.forceSimple) {\n return padStart(n, p);\n }\n\n const opts = { ...this.opts };\n\n if (p > 0) {\n opts.padTo = p;\n }\n if (signDisplay) {\n opts.signDisplay = signDisplay;\n }\n\n return this.loc.numberFormatter(opts).format(n);\n }\n\n formatDateTimeFromString(dt, fmt) {\n const knownEnglish = this.loc.listingMode() === \"en\",\n useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== \"gregory\",\n string = (opts, extract) => this.loc.extract(dt, opts, extract),\n formatOffset = (opts) => {\n if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {\n return \"Z\";\n }\n\n return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : \"\";\n },\n meridiem = () =>\n knownEnglish\n ? English.meridiemForDateTime(dt)\n : string({ hour: \"numeric\", hourCycle: \"h12\" }, \"dayperiod\"),\n month = (length, standalone) =>\n knownEnglish\n ? English.monthForDateTime(dt, length)\n : string(standalone ? { month: length } : { month: length, day: \"numeric\" }, \"month\"),\n weekday = (length, standalone) =>\n knownEnglish\n ? English.weekdayForDateTime(dt, length)\n : string(\n standalone ? { weekday: length } : { weekday: length, month: \"long\", day: \"numeric\" },\n \"weekday\"\n ),\n maybeMacro = (token) => {\n const formatOpts = Formatter.macroTokenToFormatOpts(token);\n if (formatOpts) {\n return this.formatWithSystemDefault(dt, formatOpts);\n } else {\n return token;\n }\n },\n era = (length) =>\n knownEnglish ? English.eraForDateTime(dt, length) : string({ era: length }, \"era\"),\n tokenToString = (token) => {\n // Where possible: https://cldr.unicode.org/translation/date-time/date-time-symbols\n switch (token) {\n // ms\n case \"S\":\n return this.num(dt.millisecond);\n case \"u\":\n // falls through\n case \"SSS\":\n return this.num(dt.millisecond, 3);\n // seconds\n case \"s\":\n return this.num(dt.second);\n case \"ss\":\n return this.num(dt.second, 2);\n // fractional seconds\n case \"uu\":\n return this.num(Math.floor(dt.millisecond / 10), 2);\n case \"uuu\":\n return this.num(Math.floor(dt.millisecond / 100));\n // minutes\n case \"m\":\n return this.num(dt.minute);\n case \"mm\":\n return this.num(dt.minute, 2);\n // hours\n case \"h\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);\n case \"hh\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);\n case \"H\":\n return this.num(dt.hour);\n case \"HH\":\n return this.num(dt.hour, 2);\n // offset\n case \"Z\":\n // like +6\n return formatOffset({ format: \"narrow\", allowZ: this.opts.allowZ });\n case \"ZZ\":\n // like +06:00\n return formatOffset({ format: \"short\", allowZ: this.opts.allowZ });\n case \"ZZZ\":\n // like +0600\n return formatOffset({ format: \"techie\", allowZ: this.opts.allowZ });\n case \"ZZZZ\":\n // like EST\n return dt.zone.offsetName(dt.ts, { format: \"short\", locale: this.loc.locale });\n case \"ZZZZZ\":\n // like Eastern Standard Time\n return dt.zone.offsetName(dt.ts, { format: \"long\", locale: this.loc.locale });\n // zone\n case \"z\":\n // like America/New_York\n return dt.zoneName;\n // meridiems\n case \"a\":\n return meridiem();\n // dates\n case \"d\":\n return useDateTimeFormatter ? string({ day: \"numeric\" }, \"day\") : this.num(dt.day);\n case \"dd\":\n return useDateTimeFormatter ? string({ day: \"2-digit\" }, \"day\") : this.num(dt.day, 2);\n // weekdays - standalone\n case \"c\":\n // like 1\n return this.num(dt.weekday);\n case \"ccc\":\n // like 'Tues'\n return weekday(\"short\", true);\n case \"cccc\":\n // like 'Tuesday'\n return weekday(\"long\", true);\n case \"ccccc\":\n // like 'T'\n return weekday(\"narrow\", true);\n // weekdays - format\n case \"E\":\n // like 1\n return this.num(dt.weekday);\n case \"EEE\":\n // like 'Tues'\n return weekday(\"short\", false);\n case \"EEEE\":\n // like 'Tuesday'\n return weekday(\"long\", false);\n case \"EEEEE\":\n // like 'T'\n return weekday(\"narrow\", false);\n // months - standalone\n case \"L\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\", day: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"LL\":\n // like 01, doesn't seem to work\n return useDateTimeFormatter\n ? string({ month: \"2-digit\", day: \"numeric\" }, \"month\")\n : this.num(dt.month, 2);\n case \"LLL\":\n // like Jan\n return month(\"short\", true);\n case \"LLLL\":\n // like January\n return month(\"long\", true);\n case \"LLLLL\":\n // like J\n return month(\"narrow\", true);\n // months - format\n case \"M\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"MM\":\n // like 01\n return useDateTimeFormatter\n ? string({ month: \"2-digit\" }, \"month\")\n : this.num(dt.month, 2);\n case \"MMM\":\n // like Jan\n return month(\"short\", false);\n case \"MMMM\":\n // like January\n return month(\"long\", false);\n case \"MMMMM\":\n // like J\n return month(\"narrow\", false);\n // years\n case \"y\":\n // like 2014\n return useDateTimeFormatter ? string({ year: \"numeric\" }, \"year\") : this.num(dt.year);\n case \"yy\":\n // like 14\n return useDateTimeFormatter\n ? string({ year: \"2-digit\" }, \"year\")\n : this.num(dt.year.toString().slice(-2), 2);\n case \"yyyy\":\n // like 0012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 4);\n case \"yyyyyy\":\n // like 000012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 6);\n // eras\n case \"G\":\n // like AD\n return era(\"short\");\n case \"GG\":\n // like Anno Domini\n return era(\"long\");\n case \"GGGGG\":\n return era(\"narrow\");\n case \"kk\":\n return this.num(dt.weekYear.toString().slice(-2), 2);\n case \"kkkk\":\n return this.num(dt.weekYear, 4);\n case \"W\":\n return this.num(dt.weekNumber);\n case \"WW\":\n return this.num(dt.weekNumber, 2);\n case \"n\":\n return this.num(dt.localWeekNumber);\n case \"nn\":\n return this.num(dt.localWeekNumber, 2);\n case \"ii\":\n return this.num(dt.localWeekYear.toString().slice(-2), 2);\n case \"iiii\":\n return this.num(dt.localWeekYear, 4);\n case \"o\":\n return this.num(dt.ordinal);\n case \"ooo\":\n return this.num(dt.ordinal, 3);\n case \"q\":\n // like 1\n return this.num(dt.quarter);\n case \"qq\":\n // like 01\n return this.num(dt.quarter, 2);\n case \"X\":\n return this.num(Math.floor(dt.ts / 1000));\n case \"x\":\n return this.num(dt.ts);\n default:\n return maybeMacro(token);\n }\n };\n\n return stringifyTokens(Formatter.parseFormat(fmt), tokenToString);\n }\n\n formatDurationFromString(dur, fmt) {\n const invertLargest = this.opts.signMode === \"negativeLargestOnly\" ? -1 : 1;\n const tokenToField = (token) => {\n switch (token[0]) {\n case \"S\":\n return \"milliseconds\";\n case \"s\":\n return \"seconds\";\n case \"m\":\n return \"minutes\";\n case \"h\":\n return \"hours\";\n case \"d\":\n return \"days\";\n case \"w\":\n return \"weeks\";\n case \"M\":\n return \"months\";\n case \"y\":\n return \"years\";\n default:\n return null;\n }\n },\n tokenToString = (lildur, info) => (token) => {\n const mapped = tokenToField(token);\n if (mapped) {\n const inversionFactor =\n info.isNegativeDuration && mapped !== info.largestUnit ? invertLargest : 1;\n let signDisplay;\n if (this.opts.signMode === \"negativeLargestOnly\" && mapped !== info.largestUnit) {\n signDisplay = \"never\";\n } else if (this.opts.signMode === \"all\") {\n signDisplay = \"always\";\n } else {\n // \"auto\" and \"negative\" are the same, but \"auto\" has better support\n signDisplay = \"auto\";\n }\n return this.num(lildur.get(mapped) * inversionFactor, token.length, signDisplay);\n } else {\n return token;\n }\n },\n tokens = Formatter.parseFormat(fmt),\n realTokens = tokens.reduce(\n (found, { literal, val }) => (literal ? found : found.concat(val)),\n []\n ),\n collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t) => t)),\n durationInfo = {\n isNegativeDuration: collapsed < 0,\n // this relies on \"collapsed\" being based on \"shiftTo\", which builds up the object\n // in order\n largestUnit: Object.keys(collapsed.values)[0],\n };\n return stringifyTokens(tokens, tokenToString(collapsed, durationInfo));\n }\n}\n", "import {\n untruncateYear,\n signedOffset,\n parseInteger,\n parseMillis,\n isUndefined,\n parseFloating,\n} from \"./util.js\";\nimport * as English from \"./english.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n/*\n * This file handles parsing for well-specified formats. Here's how it works:\n * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match.\n * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object\n * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence.\n * Extractors can take a \"cursor\" representing the offset in the match to look at. This makes it easy to combine extractors.\n * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions.\n * Some extractions are super dumb and simpleParse and fromStrings help DRY them.\n */\n\nconst ianaRegex = /[A-Za-z_+-]{1,256}(?::?\\/[A-Za-z0-9_+-]{1,256}(?:\\/[A-Za-z0-9_+-]{1,256})?)?/;\n\nfunction combineRegexes(...regexes) {\n const full = regexes.reduce((f, r) => f + r.source, \"\");\n return RegExp(`^${full}$`);\n}\n\nfunction combineExtractors(...extractors) {\n return (m) =>\n extractors\n .reduce(\n ([mergedVals, mergedZone, cursor], ex) => {\n const [val, zone, next] = ex(m, cursor);\n return [{ ...mergedVals, ...val }, zone || mergedZone, next];\n },\n [{}, null, 1]\n )\n .slice(0, 2);\n}\n\nfunction parse(s, ...patterns) {\n if (s == null) {\n return [null, null];\n }\n\n for (const [regex, extractor] of patterns) {\n const m = regex.exec(s);\n if (m) {\n return extractor(m);\n }\n }\n return [null, null];\n}\n\nfunction simpleParse(...keys) {\n return (match, cursor) => {\n const ret = {};\n let i;\n\n for (i = 0; i < keys.length; i++) {\n ret[keys[i]] = parseInteger(match[cursor + i]);\n }\n return [ret, null, cursor + i];\n };\n}\n\n// ISO and SQL parsing\nconst offsetRegex = /(?:([Zz])|([+-]\\d\\d)(?::?(\\d\\d))?)/;\nconst isoExtendedZone = `(?:${offsetRegex.source}?(?:\\\\[(${ianaRegex.source})\\\\])?)?`;\nconst isoTimeBaseRegex = /(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d{1,30}))?)?)?/;\nconst isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`);\nconst isoTimeExtensionRegex = RegExp(`(?:[Tt]${isoTimeRegex.source})?`);\nconst isoYmdRegex = /([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/;\nconst isoWeekRegex = /(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/;\nconst isoOrdinalRegex = /(\\d{4})-?(\\d{3})/;\nconst extractISOWeekData = simpleParse(\"weekYear\", \"weekNumber\", \"weekDay\");\nconst extractISOOrdinalData = simpleParse(\"year\", \"ordinal\");\nconst sqlYmdRegex = /(\\d{4})-(\\d\\d)-(\\d\\d)/; // dumbed-down version of the ISO one\nconst sqlTimeRegex = RegExp(\n `${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`\n);\nconst sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);\n\nfunction int(match, pos, fallback) {\n const m = match[pos];\n return isUndefined(m) ? fallback : parseInteger(m);\n}\n\nfunction extractISOYmd(match, cursor) {\n const item = {\n year: int(match, cursor),\n month: int(match, cursor + 1, 1),\n day: int(match, cursor + 2, 1),\n };\n\n return [item, null, cursor + 3];\n}\n\nfunction extractISOTime(match, cursor) {\n const item = {\n hours: int(match, cursor, 0),\n minutes: int(match, cursor + 1, 0),\n seconds: int(match, cursor + 2, 0),\n milliseconds: parseMillis(match[cursor + 3]),\n };\n\n return [item, null, cursor + 4];\n}\n\nfunction extractISOOffset(match, cursor) {\n const local = !match[cursor] && !match[cursor + 1],\n fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]),\n zone = local ? null : FixedOffsetZone.instance(fullOffset);\n return [{}, zone, cursor + 3];\n}\n\nfunction extractIANAZone(match, cursor) {\n const zone = match[cursor] ? IANAZone.create(match[cursor]) : null;\n return [{}, zone, cursor + 1];\n}\n\n// ISO time parsing\n\nconst isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`);\n\n// ISO duration parsing\n\nconst isoDuration =\n /^-?P(?:(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)Y)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)W)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)D)?(?:T(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)H)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20})(?:[.,](-?\\d{1,20}))?S)?)?)$/;\n\nfunction extractISODuration(match) {\n const [s, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] =\n match;\n\n const hasNegativePrefix = s[0] === \"-\";\n const negativeSeconds = secondStr && secondStr[0] === \"-\";\n\n const maybeNegate = (num, force = false) =>\n num !== undefined && (force || (num && hasNegativePrefix)) ? -num : num;\n\n return [\n {\n years: maybeNegate(parseFloating(yearStr)),\n months: maybeNegate(parseFloating(monthStr)),\n weeks: maybeNegate(parseFloating(weekStr)),\n days: maybeNegate(parseFloating(dayStr)),\n hours: maybeNegate(parseFloating(hourStr)),\n minutes: maybeNegate(parseFloating(minuteStr)),\n seconds: maybeNegate(parseFloating(secondStr), secondStr === \"-0\"),\n milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds),\n },\n ];\n}\n\n// These are a little braindead. EDT *should* tell us that we're in, say, America/New_York\n// and not just that we're in -240 *right now*. But since I don't think these are used that often\n// I'm just going to ignore that\nconst obsOffsets = {\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n};\n\nfunction fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n const result = {\n year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr),\n month: English.monthsShort.indexOf(monthStr) + 1,\n day: parseInteger(dayStr),\n hour: parseInteger(hourStr),\n minute: parseInteger(minuteStr),\n };\n\n if (secondStr) result.second = parseInteger(secondStr);\n if (weekdayStr) {\n result.weekday =\n weekdayStr.length > 3\n ? English.weekdaysLong.indexOf(weekdayStr) + 1\n : English.weekdaysShort.indexOf(weekdayStr) + 1;\n }\n\n return result;\n}\n\n// RFC 2822/5322\nconst rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\\d\\d)(\\d\\d)))$/;\n\nfunction extractRFC2822(match) {\n const [\n ,\n weekdayStr,\n dayStr,\n monthStr,\n yearStr,\n hourStr,\n minuteStr,\n secondStr,\n obsOffset,\n milOffset,\n offHourStr,\n offMinuteStr,\n ] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n\n let offset;\n if (obsOffset) {\n offset = obsOffsets[obsOffset];\n } else if (milOffset) {\n offset = 0;\n } else {\n offset = signedOffset(offHourStr, offMinuteStr);\n }\n\n return [result, new FixedOffsetZone(offset)];\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, \" \")\n .replace(/(\\s\\s+)/g, \" \")\n .trim();\n}\n\n// http date\n\nconst rfc1123 =\n /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d\\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n rfc850 =\n /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d\\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n ascii =\n /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \\d|\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) (\\d{4})$/;\n\nfunction extractRFC1123Or850(match) {\n const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nfunction extractASCII(match) {\n const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nconst isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex);\nconst isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);\nconst isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);\nconst isoTimeCombinedRegex = combineRegexes(isoTimeRegex);\n\nconst extractISOYmdTimeAndOffset = combineExtractors(\n extractISOYmd,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOWeekTimeAndOffset = combineExtractors(\n extractISOWeekData,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOOrdinalDateAndTime = combineExtractors(\n extractISOOrdinalData,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOTimeAndOffset = combineExtractors(\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\n\n/*\n * @private\n */\n\nexport function parseISODate(s) {\n return parse(\n s,\n [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset],\n [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime],\n [isoTimeCombinedRegex, extractISOTimeAndOffset]\n );\n}\n\nexport function parseRFC2822Date(s) {\n return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]);\n}\n\nexport function parseHTTPDate(s) {\n return parse(\n s,\n [rfc1123, extractRFC1123Or850],\n [rfc850, extractRFC1123Or850],\n [ascii, extractASCII]\n );\n}\n\nexport function parseISODuration(s) {\n return parse(s, [isoDuration, extractISODuration]);\n}\n\nconst extractISOTimeOnly = combineExtractors(extractISOTime);\n\nexport function parseISOTimeOnly(s) {\n return parse(s, [isoTimeOnly, extractISOTimeOnly]);\n}\n\nconst sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);\nconst sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);\n\nconst extractISOTimeOffsetAndIANAZone = combineExtractors(\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\n\nexport function parseSQL(s) {\n return parse(\n s,\n [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]\n );\n}\n", "import { InvalidArgumentError, InvalidDurationError, InvalidUnitError } from \"./errors.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport Invalid from \"./impl/invalid.js\";\nimport Locale from \"./impl/locale.js\";\nimport { parseISODuration, parseISOTimeOnly } from \"./impl/regexParser.js\";\nimport {\n asNumber,\n hasOwnProperty,\n isNumber,\n isUndefined,\n normalizeObject,\n roundTo,\n} from \"./impl/util.js\";\nimport Settings from \"./settings.js\";\nimport DateTime from \"./datetime.js\";\n\nconst INVALID = \"Invalid Duration\";\n\n// unit conversion constants\nexport const lowOrderMatrix = {\n weeks: {\n days: 7,\n hours: 7 * 24,\n minutes: 7 * 24 * 60,\n seconds: 7 * 24 * 60 * 60,\n milliseconds: 7 * 24 * 60 * 60 * 1000,\n },\n days: {\n hours: 24,\n minutes: 24 * 60,\n seconds: 24 * 60 * 60,\n milliseconds: 24 * 60 * 60 * 1000,\n },\n hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1000 },\n minutes: { seconds: 60, milliseconds: 60 * 1000 },\n seconds: { milliseconds: 1000 },\n },\n casualMatrix = {\n years: {\n quarters: 4,\n months: 12,\n weeks: 52,\n days: 365,\n hours: 365 * 24,\n minutes: 365 * 24 * 60,\n seconds: 365 * 24 * 60 * 60,\n milliseconds: 365 * 24 * 60 * 60 * 1000,\n },\n quarters: {\n months: 3,\n weeks: 13,\n days: 91,\n hours: 91 * 24,\n minutes: 91 * 24 * 60,\n seconds: 91 * 24 * 60 * 60,\n milliseconds: 91 * 24 * 60 * 60 * 1000,\n },\n months: {\n weeks: 4,\n days: 30,\n hours: 30 * 24,\n minutes: 30 * 24 * 60,\n seconds: 30 * 24 * 60 * 60,\n milliseconds: 30 * 24 * 60 * 60 * 1000,\n },\n\n ...lowOrderMatrix,\n },\n daysInYearAccurate = 146097.0 / 400,\n daysInMonthAccurate = 146097.0 / 4800,\n accurateMatrix = {\n years: {\n quarters: 4,\n months: 12,\n weeks: daysInYearAccurate / 7,\n days: daysInYearAccurate,\n hours: daysInYearAccurate * 24,\n minutes: daysInYearAccurate * 24 * 60,\n seconds: daysInYearAccurate * 24 * 60 * 60,\n milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000,\n },\n quarters: {\n months: 3,\n weeks: daysInYearAccurate / 28,\n days: daysInYearAccurate / 4,\n hours: (daysInYearAccurate * 24) / 4,\n minutes: (daysInYearAccurate * 24 * 60) / 4,\n seconds: (daysInYearAccurate * 24 * 60 * 60) / 4,\n milliseconds: (daysInYearAccurate * 24 * 60 * 60 * 1000) / 4,\n },\n months: {\n weeks: daysInMonthAccurate / 7,\n days: daysInMonthAccurate,\n hours: daysInMonthAccurate * 24,\n minutes: daysInMonthAccurate * 24 * 60,\n seconds: daysInMonthAccurate * 24 * 60 * 60,\n milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000,\n },\n ...lowOrderMatrix,\n };\n\n// units ordered by size\nconst orderedUnits = [\n \"years\",\n \"quarters\",\n \"months\",\n \"weeks\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\",\n];\n\nconst reverseUnits = orderedUnits.slice(0).reverse();\n\n// clone really means \"create another instance just like this one, but with these changes\"\nfunction clone(dur, alts, clear = false) {\n // deep merge for vals\n const conf = {\n values: clear ? alts.values : { ...dur.values, ...(alts.values || {}) },\n loc: dur.loc.clone(alts.loc),\n conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,\n matrix: alts.matrix || dur.matrix,\n };\n return new Duration(conf);\n}\n\nfunction durationToMillis(matrix, vals) {\n let sum = vals.milliseconds ?? 0;\n for (const unit of reverseUnits.slice(1)) {\n if (vals[unit]) {\n sum += vals[unit] * matrix[unit][\"milliseconds\"];\n }\n }\n return sum;\n}\n\n// NB: mutates parameters\nfunction normalizeValues(matrix, vals) {\n // the logic below assumes the overall value of the duration is positive\n // if this is not the case, factor is used to make it so\n const factor = durationToMillis(matrix, vals) < 0 ? -1 : 1;\n\n orderedUnits.reduceRight((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n const previousVal = vals[previous] * factor;\n const conv = matrix[current][previous];\n\n // if (previousVal < 0):\n // lower order unit is negative (e.g. { years: 2, days: -2 })\n // normalize this by reducing the higher order unit by the appropriate amount\n // and increasing the lower order unit\n // this can never make the higher order unit negative, because this function only operates\n // on positive durations, so the amount of time represented by the lower order unit cannot\n // be larger than the higher order unit\n // else:\n // lower order unit is positive (e.g. { years: 2, days: 450 } or { years: -2, days: 450 })\n // in this case we attempt to convert as much as possible from the lower order unit into\n // the higher order one\n //\n // Math.floor takes care of both of these cases, rounding away from 0\n // if previousVal < 0 it makes the absolute value larger\n // if previousVal >= it makes the absolute value smaller\n const rollUp = Math.floor(previousVal / conv);\n vals[current] += rollUp * factor;\n vals[previous] -= rollUp * conv * factor;\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n\n // try to convert any decimals into smaller units if possible\n // for example for { years: 2.5, days: 0, seconds: 0 } we want to get { years: 2, days: 182, hours: 12 }\n orderedUnits.reduce((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n const fraction = vals[previous] % 1;\n vals[previous] -= fraction;\n vals[current] += fraction * matrix[previous][current];\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n}\n\n// Remove all properties with a value of 0 from an object\nfunction removeZeroes(vals) {\n const newVals = {};\n for (const [key, value] of Object.entries(vals)) {\n if (value !== 0) {\n newVals[key] = value;\n }\n }\n return newVals;\n}\n\n/**\n * A Duration object represents a period of time, like \"2 months\" or \"1 day, 1 hour\". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime#plus} to add a Duration object to a DateTime, producing another DateTime.\n *\n * Here is a brief overview of commonly used methods and getters in Duration:\n *\n * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}.\n * * **Unit values** See the {@link Duration#years}, {@link Duration#months}, {@link Duration#weeks}, {@link Duration#days}, {@link Duration#hours}, {@link Duration#minutes}, {@link Duration#seconds}, {@link Duration#milliseconds} accessors.\n * * **Configuration** See {@link Duration#locale} and {@link Duration#numberingSystem} accessors.\n * * **Transformation** To create new Durations out of old ones use {@link Duration#plus}, {@link Duration#minus}, {@link Duration#normalize}, {@link Duration#set}, {@link Duration#reconfigure}, {@link Duration#shiftTo}, and {@link Duration#negate}.\n * * **Output** To convert the Duration into other representations, see {@link Duration#as}, {@link Duration#toISO}, {@link Duration#toFormat}, and {@link Duration#toJSON}\n *\n * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation.\n */\nexport default class Duration {\n /**\n * @private\n */\n constructor(config) {\n const accurate = config.conversionAccuracy === \"longterm\" || false;\n let matrix = accurate ? accurateMatrix : casualMatrix;\n\n if (config.matrix) {\n matrix = config.matrix;\n }\n\n /**\n * @access private\n */\n this.values = config.values;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.conversionAccuracy = accurate ? \"longterm\" : \"casual\";\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.matrix = matrix;\n /**\n * @access private\n */\n this.isLuxonDuration = true;\n }\n\n /**\n * Create Duration from a number of milliseconds.\n * @param {number} count of milliseconds\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n static fromMillis(count, opts) {\n return Duration.fromObject({ milliseconds: count }, opts);\n }\n\n /**\n * Create a Duration from a JavaScript object with keys like 'years' and 'hours'.\n * If this object is empty then a zero milliseconds duration is returned.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.years\n * @param {number} obj.quarters\n * @param {number} obj.months\n * @param {number} obj.weeks\n * @param {number} obj.days\n * @param {number} obj.hours\n * @param {number} obj.minutes\n * @param {number} obj.seconds\n * @param {number} obj.milliseconds\n * @param {Object} [opts=[]] - options for creating this Duration\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the custom conversion system to use\n * @return {Duration}\n */\n static fromObject(obj, opts = {}) {\n if (obj == null || typeof obj !== \"object\") {\n throw new InvalidArgumentError(\n `Duration.fromObject: argument expected to be an object, got ${\n obj === null ? \"null\" : typeof obj\n }`\n );\n }\n\n return new Duration({\n values: normalizeObject(obj, Duration.normalizeUnit),\n loc: Locale.fromObject(opts),\n conversionAccuracy: opts.conversionAccuracy,\n matrix: opts.matrix,\n });\n }\n\n /**\n * Create a Duration from DurationLike.\n *\n * @param {Object | number | Duration} durationLike\n * One of:\n * - object with keys like 'years' and 'hours'.\n * - number representing milliseconds\n * - Duration instance\n * @return {Duration}\n */\n static fromDurationLike(durationLike) {\n if (isNumber(durationLike)) {\n return Duration.fromMillis(durationLike);\n } else if (Duration.isDuration(durationLike)) {\n return durationLike;\n } else if (typeof durationLike === \"object\") {\n return Duration.fromObject(durationLike);\n } else {\n throw new InvalidArgumentError(\n `Unknown duration argument ${durationLike} of type ${typeof durationLike}`\n );\n }\n }\n\n /**\n * Create a Duration from an ISO 8601 duration string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the preset conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }\n * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }\n * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }\n * @return {Duration}\n */\n static fromISO(text, opts) {\n const [parsed] = parseISODuration(text);\n if (parsed) {\n return Duration.fromObject(parsed, opts);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create a Duration from an ISO 8601 time string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 }\n * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @return {Duration}\n */\n static fromISOTime(text, opts) {\n const [parsed] = parseISOTimeOnly(text);\n if (parsed) {\n return Duration.fromObject(parsed, opts);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create an invalid Duration.\n * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Duration}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Duration is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDurationError(invalid);\n } else {\n return new Duration({ invalid });\n }\n }\n\n /**\n * @private\n */\n static normalizeUnit(unit) {\n const normalized = {\n year: \"years\",\n years: \"years\",\n quarter: \"quarters\",\n quarters: \"quarters\",\n month: \"months\",\n months: \"months\",\n week: \"weeks\",\n weeks: \"weeks\",\n day: \"days\",\n days: \"days\",\n hour: \"hours\",\n hours: \"hours\",\n minute: \"minutes\",\n minutes: \"minutes\",\n second: \"seconds\",\n seconds: \"seconds\",\n millisecond: \"milliseconds\",\n milliseconds: \"milliseconds\",\n }[unit ? unit.toLowerCase() : unit];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n }\n\n /**\n * Check if an object is a Duration. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDuration(o) {\n return (o && o.isLuxonDuration) || false;\n }\n\n /**\n * Get the locale of a Duration, such 'en-GB'\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:\n * * `S` for milliseconds\n * * `s` for seconds\n * * `m` for minutes\n * * `h` for hours\n * * `d` for days\n * * `w` for weeks\n * * `M` for months\n * * `y` for years\n * Notes:\n * * Add padding by repeating the token, e.g. \"yy\" pads the years to two digits, \"hhhh\" pads the hours out to four digits\n * * Tokens can be escaped by wrapping with single quotes.\n * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.\n * @param {string} fmt - the format string\n * @param {Object} opts - options\n * @param {boolean} [opts.floor=true] - floor numerical values\n * @param {'negative'|'all'|'negativeLargestOnly'} [opts.signMode=negative] - How to handle signs\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"y d s\") //=> \"1 6 2\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"yy dd sss\") //=> \"01 06 002\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"M S\") //=> \"12 518402000\"\n * @example Duration.fromObject({ days: 6, seconds: 2 }).toFormat(\"d s\", { signMode: \"all\" }) //=> \"+6 +2\"\n * @example Duration.fromObject({ days: -6, seconds: -2 }).toFormat(\"d s\", { signMode: \"all\" }) //=> \"-6 -2\"\n * @example Duration.fromObject({ days: -6, seconds: -2 }).toFormat(\"d s\", { signMode: \"negativeLargestOnly\" }) //=> \"-6 2\"\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n // reverse-compat since 1.2; we always round down now, never up, and we do it by default\n const fmtOpts = {\n ...opts,\n floor: opts.round !== false && opts.floor !== false,\n };\n return this.isValid\n ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a string representation of a Duration with all units included.\n * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options\n * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`.\n * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor.\n * @param {boolean} [opts.showZeros=true] - Show all units previously used by the duration even if they are zero\n * @example\n * ```js\n * var dur = Duration.fromObject({ months: 1, weeks: 0, hours: 5, minutes: 6 })\n * dur.toHuman() //=> '1 month, 0 weeks, 5 hours, 6 minutes'\n * dur.toHuman({ listStyle: \"long\" }) //=> '1 month, 0 weeks, 5 hours, and 6 minutes'\n * dur.toHuman({ unitDisplay: \"short\" }) //=> '1 mth, 0 wks, 5 hr, 6 min'\n * dur.toHuman({ showZeros: false }) //=> '1 month, 5 hours, 6 minutes'\n * ```\n */\n toHuman(opts = {}) {\n if (!this.isValid) return INVALID;\n\n const showZeros = opts.showZeros !== false;\n\n const l = orderedUnits\n .map((unit) => {\n const val = this.values[unit];\n if (isUndefined(val) || (val === 0 && !showZeros)) {\n return null;\n }\n return this.loc\n .numberFormatter({ style: \"unit\", unitDisplay: \"long\", ...opts, unit: unit.slice(0, -1) })\n .format(val);\n })\n .filter((n) => n);\n\n return this.loc\n .listFormatter({ type: \"conjunction\", style: opts.listStyle || \"narrow\", ...opts })\n .format(l);\n }\n\n /**\n * Returns a JavaScript object with this Duration's values.\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }\n * @return {Object}\n */\n toObject() {\n if (!this.isValid) return {};\n return { ...this.values };\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'\n * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'\n * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'\n * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'\n * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'\n * @return {string}\n */\n toISO() {\n // we could use the formatter, but this is an easier way to get the minimum string\n if (!this.isValid) return null;\n\n let s = \"P\";\n if (this.years !== 0) s += this.years + \"Y\";\n if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + \"M\";\n if (this.weeks !== 0) s += this.weeks + \"W\";\n if (this.days !== 0) s += this.days + \"D\";\n if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0)\n s += \"T\";\n if (this.hours !== 0) s += this.hours + \"H\";\n if (this.minutes !== 0) s += this.minutes + \"M\";\n if (this.seconds !== 0 || this.milliseconds !== 0)\n // this will handle \"floating point madness\" by removing extra decimal places\n // https://stackoverflow.com/questions/588004/is-floating-point-math-broken\n s += roundTo(this.seconds + this.milliseconds / 1000, 3) + \"S\";\n if (s === \"P\") s += \"T0S\";\n return s;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.\n * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000'\n * @return {string}\n */\n toISOTime(opts = {}) {\n if (!this.isValid) return null;\n\n const millis = this.toMillis();\n if (millis < 0 || millis >= 86400000) return null;\n\n opts = {\n suppressMilliseconds: false,\n suppressSeconds: false,\n includePrefix: false,\n format: \"extended\",\n ...opts,\n includeOffset: false,\n };\n\n const dateTime = DateTime.fromMillis(millis, { zone: \"UTC\" });\n return dateTime.toISOTime(opts);\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.\n * @return {string}\n */\n toString() {\n return this.toISO();\n }\n\n /**\n * Returns a string representation of this Duration appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `Duration { values: ${JSON.stringify(this.values)} }`;\n } else {\n return `Duration { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns an milliseconds value of this Duration.\n * @return {number}\n */\n toMillis() {\n if (!this.isValid) return NaN;\n\n return durationToMillis(this.matrix, this.values);\n }\n\n /**\n * Returns an milliseconds value of this Duration. Alias of {@link toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Make this Duration longer by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n plus(duration) {\n if (!this.isValid) return this;\n\n const dur = Duration.fromDurationLike(duration),\n result = {};\n\n for (const k of orderedUnits) {\n if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {\n result[k] = dur.get(k) + this.get(k);\n }\n }\n\n return clone(this, { values: result }, true);\n }\n\n /**\n * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n minus(duration) {\n if (!this.isValid) return this;\n\n const dur = Duration.fromDurationLike(duration);\n return this.plus(dur.negate());\n }\n\n /**\n * Scale this Duration by the specified amount. Return a newly-constructed Duration.\n * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === \"hours\" ? x * 2 : x) //=> { hours: 2, minutes: 30 }\n * @return {Duration}\n */\n mapUnits(fn) {\n if (!this.isValid) return this;\n const result = {};\n for (const k of Object.keys(this.values)) {\n result[k] = asNumber(fn(this.values[k], k));\n }\n return clone(this, { values: result }, true);\n }\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2\n * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0\n * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3\n * @return {number}\n */\n get(unit) {\n return this[Duration.normalizeUnit(unit)];\n }\n\n /**\n * \"Set\" the values of specified units. Return a newly-constructed Duration.\n * @param {Object} values - a mapping of units to numbers\n * @example dur.set({ years: 2017 })\n * @example dur.set({ hours: 8, minutes: 30 })\n * @return {Duration}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const mixed = { ...this.values, ...normalizeObject(values, Duration.normalizeUnit) };\n return clone(this, { values: mixed });\n }\n\n /**\n * \"Set\" the locale and/or numberingSystem. Returns a newly-constructed Duration.\n * @example dur.reconfigure({ locale: 'en-GB' })\n * @return {Duration}\n */\n reconfigure({ locale, numberingSystem, conversionAccuracy, matrix } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem });\n const opts = { loc, matrix, conversionAccuracy };\n return clone(this, opts);\n }\n\n /**\n * Return the length of the duration in the specified unit.\n * @param {string} unit - a unit such as 'minutes' or 'days'\n * @example Duration.fromObject({years: 1}).as('days') //=> 365\n * @example Duration.fromObject({years: 1}).as('months') //=> 12\n * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5\n * @return {number}\n */\n as(unit) {\n return this.isValid ? this.shiftTo(unit).get(unit) : NaN;\n }\n\n /**\n * Reduce this Duration to its canonical representation in its current units.\n * Assuming the overall value of the Duration is positive, this means:\n * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example)\n * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise\n * the overall value would be negative, see third example)\n * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example)\n *\n * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`.\n * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }\n * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 }\n * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }\n * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 }\n * @return {Duration}\n */\n normalize() {\n if (!this.isValid) return this;\n const vals = this.toObject();\n normalizeValues(this.matrix, vals);\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Rescale units to its largest representation\n * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 }\n * @return {Duration}\n */\n rescale() {\n if (!this.isValid) return this;\n const vals = removeZeroes(this.normalize().shiftToAll().toObject());\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Convert this Duration into its representation in a different set of units.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }\n * @return {Duration}\n */\n shiftTo(...units) {\n if (!this.isValid) return this;\n\n if (units.length === 0) {\n return this;\n }\n\n units = units.map((u) => Duration.normalizeUnit(u));\n\n const built = {},\n accumulated = {},\n vals = this.toObject();\n let lastUnit;\n\n for (const k of orderedUnits) {\n if (units.indexOf(k) >= 0) {\n lastUnit = k;\n\n let own = 0;\n\n // anything we haven't boiled down yet should get boiled to this unit\n for (const ak in accumulated) {\n own += this.matrix[ak][k] * accumulated[ak];\n accumulated[ak] = 0;\n }\n\n // plus anything that's already in this unit\n if (isNumber(vals[k])) {\n own += vals[k];\n }\n\n // only keep the integer part for now in the hopes of putting any decimal part\n // into a smaller unit later\n const i = Math.trunc(own);\n built[k] = i;\n accumulated[k] = (own * 1000 - i * 1000) / 1000;\n\n // otherwise, keep it in the wings to boil it later\n } else if (isNumber(vals[k])) {\n accumulated[k] = vals[k];\n }\n }\n\n // anything leftover becomes the decimal for the last unit\n // lastUnit must be defined since units is not empty\n for (const key in accumulated) {\n if (accumulated[key] !== 0) {\n built[lastUnit] +=\n key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key];\n }\n }\n\n normalizeValues(this.matrix, built);\n return clone(this, { values: built }, true);\n }\n\n /**\n * Shift this Duration to all available units.\n * Same as shiftTo(\"years\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"milliseconds\")\n * @return {Duration}\n */\n shiftToAll() {\n if (!this.isValid) return this;\n return this.shiftTo(\n \"years\",\n \"months\",\n \"weeks\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\"\n );\n }\n\n /**\n * Return the negative of this Duration.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }\n * @return {Duration}\n */\n negate() {\n if (!this.isValid) return this;\n const negated = {};\n for (const k of Object.keys(this.values)) {\n negated[k] = this.values[k] === 0 ? 0 : -this.values[k];\n }\n return clone(this, { values: negated }, true);\n }\n\n /**\n * Removes all units with values equal to 0 from this Duration.\n * @example Duration.fromObject({ years: 2, days: 0, hours: 0, minutes: 0 }).removeZeros().toObject() //=> { years: 2 }\n * @return {Duration}\n */\n removeZeros() {\n if (!this.isValid) return this;\n const vals = removeZeroes(this.values);\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Get the years.\n * @type {number}\n */\n get years() {\n return this.isValid ? this.values.years || 0 : NaN;\n }\n\n /**\n * Get the quarters.\n * @type {number}\n */\n get quarters() {\n return this.isValid ? this.values.quarters || 0 : NaN;\n }\n\n /**\n * Get the months.\n * @type {number}\n */\n get months() {\n return this.isValid ? this.values.months || 0 : NaN;\n }\n\n /**\n * Get the weeks\n * @type {number}\n */\n get weeks() {\n return this.isValid ? this.values.weeks || 0 : NaN;\n }\n\n /**\n * Get the days.\n * @type {number}\n */\n get days() {\n return this.isValid ? this.values.days || 0 : NaN;\n }\n\n /**\n * Get the hours.\n * @type {number}\n */\n get hours() {\n return this.isValid ? this.values.hours || 0 : NaN;\n }\n\n /**\n * Get the minutes.\n * @type {number}\n */\n get minutes() {\n return this.isValid ? this.values.minutes || 0 : NaN;\n }\n\n /**\n * Get the seconds.\n * @return {number}\n */\n get seconds() {\n return this.isValid ? this.values.seconds || 0 : NaN;\n }\n\n /**\n * Get the milliseconds.\n * @return {number}\n */\n get milliseconds() {\n return this.isValid ? this.values.milliseconds || 0 : NaN;\n }\n\n /**\n * Returns whether the Duration is invalid. Invalid durations are returned by diff operations\n * on invalid DateTimes or Intervals.\n * @return {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this Duration became invalid, or null if the Duration is valid\n * @return {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Duration became invalid, or null if the Duration is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Equality check\n * Two Durations are equal iff they have the same units and the same values for each unit.\n * @param {Duration} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n if (!this.loc.equals(other.loc)) {\n return false;\n }\n\n function eq(v1, v2) {\n // Consider 0 and undefined as equal\n if (v1 === undefined || v1 === 0) return v2 === undefined || v2 === 0;\n return v1 === v2;\n }\n\n for (const u of orderedUnits) {\n if (!eq(this.values[u], other.values[u])) {\n return false;\n }\n }\n return true;\n }\n}\n", "import DateTime, { friendlyDateTime } from \"./datetime.js\";\nimport Duration from \"./duration.js\";\nimport Settings from \"./settings.js\";\nimport { InvalidArgumentError, InvalidIntervalError } from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport * as Formats from \"./impl/formats.js\";\n\nconst INVALID = \"Invalid Interval\";\n\n// checks if the start is equal to or before the end\nfunction validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\n \"end before start\",\n `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`\n );\n } else {\n return null;\n }\n}\n\n/**\n * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them.\n *\n * Here is a brief overview of the most commonly used methods and getters in Interval:\n *\n * * **Creation** To create an Interval, use {@link Interval.fromDateTimes}, {@link Interval.after}, {@link Interval.before}, or {@link Interval.fromISO}.\n * * **Accessors** Use {@link Interval#start} and {@link Interval#end} to get the start and end.\n * * **Interrogation** To analyze the Interval, use {@link Interval#count}, {@link Interval#length}, {@link Interval#hasSame}, {@link Interval#contains}, {@link Interval#isAfter}, or {@link Interval#isBefore}.\n * * **Transformation** To create other Intervals out of this one, use {@link Interval#set}, {@link Interval#splitAt}, {@link Interval#splitBy}, {@link Interval#divideEqually}, {@link Interval.merge}, {@link Interval.xor}, {@link Interval#union}, {@link Interval#intersection}, or {@link Interval#difference}.\n * * **Comparison** To compare this Interval to another one, use {@link Interval#equals}, {@link Interval#overlaps}, {@link Interval#abutsStart}, {@link Interval#abutsEnd}, {@link Interval#engulfs}\n * * **Output** To convert the Interval into other representations, see {@link Interval#toString}, {@link Interval#toLocaleString}, {@link Interval#toISO}, {@link Interval#toISODate}, {@link Interval#toISOTime}, {@link Interval#toFormat}, and {@link Interval#toDuration}.\n */\nexport default class Interval {\n /**\n * @private\n */\n constructor(config) {\n /**\n * @access private\n */\n this.s = config.start;\n /**\n * @access private\n */\n this.e = config.end;\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.isLuxonInterval = true;\n }\n\n /**\n * Create an invalid Interval.\n * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Interval}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Interval is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidIntervalError(invalid);\n } else {\n return new Interval({ invalid });\n }\n }\n\n /**\n * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.\n * @param {DateTime|Date|Object} start\n * @param {DateTime|Date|Object} end\n * @return {Interval}\n */\n static fromDateTimes(start, end) {\n const builtStart = friendlyDateTime(start),\n builtEnd = friendlyDateTime(end);\n\n const validateError = validateStartEnd(builtStart, builtEnd);\n\n if (validateError == null) {\n return new Interval({\n start: builtStart,\n end: builtEnd,\n });\n } else {\n return validateError;\n }\n }\n\n /**\n * Create an Interval from a start DateTime and a Duration to extend to.\n * @param {DateTime|Date|Object} start\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static after(start, duration) {\n const dur = Duration.fromDurationLike(duration),\n dt = friendlyDateTime(start);\n return Interval.fromDateTimes(dt, dt.plus(dur));\n }\n\n /**\n * Create an Interval from an end DateTime and a Duration to extend backwards to.\n * @param {DateTime|Date|Object} end\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static before(end, duration) {\n const dur = Duration.fromDurationLike(duration),\n dt = friendlyDateTime(end);\n return Interval.fromDateTimes(dt.minus(dur), dt);\n }\n\n /**\n * Create an Interval from an ISO 8601 string.\n * Accepts `/`, `/`, and `/` formats.\n * @param {string} text - the ISO string to parse\n * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {Interval}\n */\n static fromISO(text, opts) {\n const [s, e] = (text || \"\").split(\"/\", 2);\n if (s && e) {\n let start, startIsValid;\n try {\n start = DateTime.fromISO(s, opts);\n startIsValid = start.isValid;\n } catch (e) {\n startIsValid = false;\n }\n\n let end, endIsValid;\n try {\n end = DateTime.fromISO(e, opts);\n endIsValid = end.isValid;\n } catch (e) {\n endIsValid = false;\n }\n\n if (startIsValid && endIsValid) {\n return Interval.fromDateTimes(start, end);\n }\n\n if (startIsValid) {\n const dur = Duration.fromISO(e, opts);\n if (dur.isValid) {\n return Interval.after(start, dur);\n }\n } else if (endIsValid) {\n const dur = Duration.fromISO(s, opts);\n if (dur.isValid) {\n return Interval.before(end, dur);\n }\n }\n }\n return Interval.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n\n /**\n * Check if an object is an Interval. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isInterval(o) {\n return (o && o.isLuxonInterval) || false;\n }\n\n /**\n * Returns the start of the Interval\n * @type {DateTime}\n */\n get start() {\n return this.isValid ? this.s : null;\n }\n\n /**\n * Returns the end of the Interval. This is the first instant which is not part of the interval\n * (Interval is half-open).\n * @type {DateTime}\n */\n get end() {\n return this.isValid ? this.e : null;\n }\n\n /**\n * Returns the last DateTime included in the interval (since end is not part of the interval)\n * @type {DateTime}\n */\n get lastDateTime() {\n return this.isValid ? (this.e ? this.e.minus(1) : null) : null;\n }\n\n /**\n * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.\n * @type {boolean}\n */\n get isValid() {\n return this.invalidReason === null;\n }\n\n /**\n * Returns an error code if this Interval is invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Interval became invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Returns the length of the Interval in the specified unit.\n * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.\n * @return {number}\n */\n length(unit = \"milliseconds\") {\n return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN;\n }\n\n /**\n * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.\n * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'\n * asks 'what dates are included in this interval?', not 'how many days long is this interval?'\n * @param {string} [unit='milliseconds'] - the unit of time to count.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime\n * @return {number}\n */\n count(unit = \"milliseconds\", opts) {\n if (!this.isValid) return NaN;\n const start = this.start.startOf(unit, opts);\n let end;\n if (opts?.useLocaleWeeks) {\n end = this.end.reconfigure({ locale: start.locale });\n } else {\n end = this.end;\n }\n end = end.startOf(unit, opts);\n return Math.floor(end.diff(start, unit).get(unit)) + (end.valueOf() !== this.end.valueOf());\n }\n\n /**\n * Returns whether this Interval's start and end are both in the same unit of time\n * @param {string} unit - the unit of time to check sameness on\n * @return {boolean}\n */\n hasSame(unit) {\n return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;\n }\n\n /**\n * Return whether this Interval has the same start and end DateTimes.\n * @return {boolean}\n */\n isEmpty() {\n return this.s.valueOf() === this.e.valueOf();\n }\n\n /**\n * Return whether this Interval's start is after the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isAfter(dateTime) {\n if (!this.isValid) return false;\n return this.s > dateTime;\n }\n\n /**\n * Return whether this Interval's end is before the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isBefore(dateTime) {\n if (!this.isValid) return false;\n return this.e <= dateTime;\n }\n\n /**\n * Return whether this Interval contains the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n contains(dateTime) {\n if (!this.isValid) return false;\n return this.s <= dateTime && this.e > dateTime;\n }\n\n /**\n * \"Sets\" the start and/or end dates. Returns a newly-constructed Interval.\n * @param {Object} values - the values to set\n * @param {DateTime} values.start - the starting DateTime\n * @param {DateTime} values.end - the ending DateTime\n * @return {Interval}\n */\n set({ start, end } = {}) {\n if (!this.isValid) return this;\n return Interval.fromDateTimes(start || this.s, end || this.e);\n }\n\n /**\n * Split this Interval at each of the specified DateTimes\n * @param {...DateTime} dateTimes - the unit of time to count.\n * @return {Array}\n */\n splitAt(...dateTimes) {\n if (!this.isValid) return [];\n const sorted = dateTimes\n .map(friendlyDateTime)\n .filter((d) => this.contains(d))\n .sort((a, b) => a.toMillis() - b.toMillis()),\n results = [];\n let { s } = this,\n i = 0;\n\n while (s < this.e) {\n const added = sorted[i] || this.e,\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n i += 1;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into smaller Intervals, each of the specified length.\n * Left over time is grouped into a smaller interval\n * @param {Duration|Object|number} duration - The length of each resulting interval.\n * @return {Array}\n */\n splitBy(duration) {\n const dur = Duration.fromDurationLike(duration);\n\n if (!this.isValid || !dur.isValid || dur.as(\"milliseconds\") === 0) {\n return [];\n }\n\n let { s } = this,\n idx = 1,\n next;\n\n const results = [];\n while (s < this.e) {\n const added = this.start.plus(dur.mapUnits((x) => x * idx));\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n idx += 1;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into the specified number of smaller intervals.\n * @param {number} numberOfParts - The number of Intervals to divide the Interval into.\n * @return {Array}\n */\n divideEqually(numberOfParts) {\n if (!this.isValid) return [];\n return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);\n }\n\n /**\n * Return whether this Interval overlaps with the specified Interval\n * @param {Interval} other\n * @return {boolean}\n */\n overlaps(other) {\n return this.e > other.s && this.s < other.e;\n }\n\n /**\n * Return whether this Interval's end is adjacent to the specified Interval's start.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsStart(other) {\n if (!this.isValid) return false;\n return +this.e === +other.s;\n }\n\n /**\n * Return whether this Interval's start is adjacent to the specified Interval's end.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsEnd(other) {\n if (!this.isValid) return false;\n return +other.e === +this.s;\n }\n\n /**\n * Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise.\n * @param {Interval} other\n * @return {boolean}\n */\n engulfs(other) {\n if (!this.isValid) return false;\n return this.s <= other.s && this.e >= other.e;\n }\n\n /**\n * Return whether this Interval has the same start and end as the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n return this.s.equals(other.s) && this.e.equals(other.e);\n }\n\n /**\n * Return an Interval representing the intersection of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.\n * Returns null if the intersection is empty, meaning, the intervals don't intersect.\n * @param {Interval} other\n * @return {Interval}\n */\n intersection(other) {\n if (!this.isValid) return this;\n const s = this.s > other.s ? this.s : other.s,\n e = this.e < other.e ? this.e : other.e;\n\n if (s >= e) {\n return null;\n } else {\n return Interval.fromDateTimes(s, e);\n }\n }\n\n /**\n * Return an Interval representing the union of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.\n * @param {Interval} other\n * @return {Interval}\n */\n union(other) {\n if (!this.isValid) return this;\n const s = this.s < other.s ? this.s : other.s,\n e = this.e > other.e ? this.e : other.e;\n return Interval.fromDateTimes(s, e);\n }\n\n /**\n * Merge an array of Intervals into an equivalent minimal set of Intervals.\n * Combines overlapping and adjacent Intervals.\n * The resulting array will contain the Intervals in ascending order, that is, starting with the earliest Interval\n * and ending with the latest.\n *\n * @param {Array} intervals\n * @return {Array}\n */\n static merge(intervals) {\n const [found, final] = intervals\n .sort((a, b) => a.s - b.s)\n .reduce(\n ([sofar, current], item) => {\n if (!current) {\n return [sofar, item];\n } else if (current.overlaps(item) || current.abutsStart(item)) {\n return [sofar, current.union(item)];\n } else {\n return [sofar.concat([current]), item];\n }\n },\n [[], null]\n );\n if (final) {\n found.push(final);\n }\n return found;\n }\n\n /**\n * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.\n * @param {Array} intervals\n * @return {Array}\n */\n static xor(intervals) {\n let start = null,\n currentCount = 0;\n const results = [],\n ends = intervals.map((i) => [\n { time: i.s, type: \"s\" },\n { time: i.e, type: \"e\" },\n ]),\n flattened = Array.prototype.concat(...ends),\n arr = flattened.sort((a, b) => a.time - b.time);\n\n for (const i of arr) {\n currentCount += i.type === \"s\" ? 1 : -1;\n\n if (currentCount === 1) {\n start = i.time;\n } else {\n if (start && +start !== +i.time) {\n results.push(Interval.fromDateTimes(start, i.time));\n }\n\n start = null;\n }\n }\n\n return Interval.merge(results);\n }\n\n /**\n * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.\n * @param {...Interval} intervals\n * @return {Array}\n */\n difference(...intervals) {\n return Interval.xor([this].concat(intervals))\n .map((i) => this.intersection(i))\n .filter((i) => i && !i.isEmpty());\n }\n\n /**\n * Returns a string representation of this Interval appropriate for debugging.\n * @return {string}\n */\n toString() {\n if (!this.isValid) return INVALID;\n return `[${this.s.toISO()} – ${this.e.toISO()})`;\n }\n\n /**\n * Returns a string representation of this Interval appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`;\n } else {\n return `Interval { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns a localized string representing this Interval. Accepts the same options as the\n * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as\n * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method\n * is browser-specific, but in general it will return an appropriate representation of the\n * Interval in the assigned locale. Defaults to the system's locale if no locale has been\n * specified.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or\n * Intl.DateTimeFormat constructor options.\n * @param {Object} opts - Options to override the configuration of the start DateTime.\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022\n * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM\n * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p\n * @return {string}\n */\n toLocaleString(formatOpts = Formats.DATE_SHORT, opts = {}) {\n return this.isValid\n ? Formatter.create(this.s.loc.clone(opts), formatOpts).formatInterval(this)\n : INVALID;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Interval.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */\n toISO(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of date of this Interval.\n * The time components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {string}\n */\n toISODate() {\n if (!this.isValid) return INVALID;\n return `${this.s.toISODate()}/${this.e.toISODate()}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of time of this Interval.\n * The date components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */\n toISOTime(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this Interval formatted according to the specified format\n * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible\n * formatting tool.\n * @param {string} dateFormat - The format string. This string formats the start and end time.\n * See {@link DateTime#toFormat} for details.\n * @param {Object} opts - Options.\n * @param {string} [opts.separator = ' – '] - A separator to place between the start and end\n * representations.\n * @return {string}\n */\n toFormat(dateFormat, { separator = \" – \" } = {}) {\n if (!this.isValid) return INVALID;\n return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`;\n }\n\n /**\n * Return a Duration representing the time spanned by this interval.\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }\n * @return {Duration}\n */\n toDuration(unit, opts) {\n if (!this.isValid) {\n return Duration.invalid(this.invalidReason);\n }\n return this.e.diff(this.s, unit, opts);\n }\n\n /**\n * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes\n * @param {function} mapFn\n * @return {Interval}\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))\n */\n mapEndpoints(mapFn) {\n return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));\n }\n}\n", "import DateTime from \"./datetime.js\";\nimport Settings from \"./settings.js\";\nimport Locale from \"./impl/locale.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nimport { hasLocaleWeekInfo, hasRelative } from \"./impl/util.js\";\n\n/**\n * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment.\n */\nexport default class Info {\n /**\n * Return whether the specified zone contains a DST.\n * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.\n * @return {boolean}\n */\n static hasDST(zone = Settings.defaultZone) {\n const proto = DateTime.now().setZone(zone).set({ month: 12 });\n\n return !zone.isUniversal && proto.offset !== proto.set({ month: 6 }).offset;\n }\n\n /**\n * Return whether the specified zone is a valid IANA specifier.\n * @param {string} zone - Zone to check\n * @return {boolean}\n */\n static isValidIANAZone(zone) {\n return IANAZone.isValidZone(zone);\n }\n\n /**\n * Converts the input into a {@link Zone} instance.\n *\n * * If `input` is already a Zone instance, it is returned unchanged.\n * * If `input` is a string containing a valid time zone name, a Zone instance\n * with that name is returned.\n * * If `input` is a string that doesn't refer to a known time zone, a Zone\n * instance with {@link Zone#isValid} == false is returned.\n * * If `input is a number, a Zone instance with the specified fixed offset\n * in minutes is returned.\n * * If `input` is `null` or `undefined`, the default zone is returned.\n * @param {string|Zone|number} [input] - the value to be converted\n * @return {Zone}\n */\n static normalizeZone(input) {\n return normalizeZone(input, Settings.defaultZone);\n }\n\n /**\n * Get the weekday on which the week starts according to the given locale.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number} the start of the week, 1 for Monday through 7 for Sunday\n */\n static getStartOfWeek({ locale = null, locObj = null } = {}) {\n return (locObj || Locale.create(locale)).getStartOfWeek();\n }\n\n /**\n * Get the minimum number of days necessary in a week before it is considered part of the next year according\n * to the given locale.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number}\n */\n static getMinimumDaysInFirstWeek({ locale = null, locObj = null } = {}) {\n return (locObj || Locale.create(locale)).getMinDaysInFirstWeek();\n }\n\n /**\n * Get the weekdays, which are considered the weekend according to the given locale\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday\n */\n static getWeekendWeekdays({ locale = null, locObj = null } = {}) {\n // copy the array, because we cache it internally\n return (locObj || Locale.create(locale)).getWeekendDays().slice();\n }\n\n /**\n * Return an array of standalone month names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @example Info.months()[0] //=> 'January'\n * @example Info.months('short')[0] //=> 'Jan'\n * @example Info.months('numeric')[0] //=> '1'\n * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'\n * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'\n * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'\n * @return {Array}\n */\n static months(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null, outputCalendar = \"gregory\" } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length);\n }\n\n /**\n * Return an array of format month names.\n * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that\n * changes the string.\n * See {@link Info#months}\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @return {Array}\n */\n static monthsFormat(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null, outputCalendar = \"gregory\" } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length, true);\n }\n\n /**\n * Return an array of standalone week names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @example Info.weekdays()[0] //=> 'Monday'\n * @example Info.weekdays('short')[0] //=> 'Mon'\n * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'\n * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'\n * @return {Array}\n */\n static weekdays(length = \"long\", { locale = null, numberingSystem = null, locObj = null } = {}) {\n return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length);\n }\n\n /**\n * Return an array of format week names.\n * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that\n * changes the string.\n * See {@link Info#weekdays}\n * @param {string} [length='long'] - the length of the month representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale=null] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @return {Array}\n */\n static weekdaysFormat(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length, true);\n }\n\n /**\n * Return an array of meridiems.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.meridiems() //=> [ 'AM', 'PM' ]\n * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]\n * @return {Array}\n */\n static meridiems({ locale = null } = {}) {\n return Locale.create(locale).meridiems();\n }\n\n /**\n * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.\n * @param {string} [length='short'] - the length of the era representation, such as \"short\" or \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.eras() //=> [ 'BC', 'AD' ]\n * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]\n * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]\n * @return {Array}\n */\n static eras(length = \"short\", { locale = null } = {}) {\n return Locale.create(locale, null, \"gregory\").eras(length);\n }\n\n /**\n * Return the set of available features in this environment.\n * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.\n * Keys:\n * * `relative`: whether this environment supports relative time formatting\n * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale\n * @example Info.features() //=> { relative: false, localeWeek: true }\n * @return {Object}\n */\n static features() {\n return { relative: hasRelative(), localeWeek: hasLocaleWeekInfo() };\n }\n}\n", "import Duration from \"../duration.js\";\n\nfunction dayDiff(earlier, later) {\n const utcDayStart = (dt) => dt.toUTC(0, { keepLocalTime: true }).startOf(\"day\").valueOf(),\n ms = utcDayStart(later) - utcDayStart(earlier);\n return Math.floor(Duration.fromMillis(ms).as(\"days\"));\n}\n\nfunction highOrderDiffs(cursor, later, units) {\n const differs = [\n [\"years\", (a, b) => b.year - a.year],\n [\"quarters\", (a, b) => b.quarter - a.quarter + (b.year - a.year) * 4],\n [\"months\", (a, b) => b.month - a.month + (b.year - a.year) * 12],\n [\n \"weeks\",\n (a, b) => {\n const days = dayDiff(a, b);\n return (days - (days % 7)) / 7;\n },\n ],\n [\"days\", dayDiff],\n ];\n\n const results = {};\n const earlier = cursor;\n let lowestOrder, highWater;\n\n /* This loop tries to diff using larger units first.\n If we overshoot, we backtrack and try the next smaller unit.\n \"cursor\" starts out at the earlier timestamp and moves closer and closer to \"later\"\n as we use smaller and smaller units.\n highWater keeps track of where we would be if we added one more of the smallest unit,\n this is used later to potentially convert any difference smaller than the smallest higher order unit\n into a fraction of that smallest higher order unit\n */\n for (const [unit, differ] of differs) {\n if (units.indexOf(unit) >= 0) {\n lowestOrder = unit;\n\n results[unit] = differ(cursor, later);\n highWater = earlier.plus(results);\n\n if (highWater > later) {\n // we overshot the end point, backtrack cursor by 1\n results[unit]--;\n cursor = earlier.plus(results);\n\n // if we are still overshooting now, we need to backtrack again\n // this happens in certain situations when diffing times in different zones,\n // because this calculation ignores time zones\n if (cursor > later) {\n // keep the \"overshot by 1\" around as highWater\n highWater = cursor;\n // backtrack cursor by 1\n results[unit]--;\n cursor = earlier.plus(results);\n }\n } else {\n cursor = highWater;\n }\n }\n }\n\n return [cursor, results, highWater, lowestOrder];\n}\n\nexport default function (earlier, later, units, opts) {\n let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units);\n\n const remainingMillis = later - cursor;\n\n const lowerOrderUnits = units.filter(\n (u) => [\"hours\", \"minutes\", \"seconds\", \"milliseconds\"].indexOf(u) >= 0\n );\n\n if (lowerOrderUnits.length === 0) {\n if (highWater < later) {\n highWater = cursor.plus({ [lowestOrder]: 1 });\n }\n\n if (highWater !== cursor) {\n results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);\n }\n }\n\n const duration = Duration.fromObject(results, opts);\n\n if (lowerOrderUnits.length > 0) {\n return Duration.fromMillis(remainingMillis, opts)\n .shiftTo(...lowerOrderUnits)\n .plus(duration);\n } else {\n return duration;\n }\n}\n", "import { parseMillis, isUndefined, untruncateYear, signedOffset, hasOwnProperty } from \"./util.js\";\nimport Formatter from \"./formatter.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport DateTime from \"../datetime.js\";\nimport { digitRegex, parseDigits } from \"./digits.js\";\nimport { ConflictingSpecificationError } from \"../errors.js\";\n\nconst MISSING_FTP = \"missing Intl.DateTimeFormat.formatToParts support\";\n\nfunction intUnit(regex, post = (i) => i) {\n return { regex, deser: ([s]) => post(parseDigits(s)) };\n}\n\nconst NBSP = String.fromCharCode(160);\nconst spaceOrNBSP = `[ ${NBSP}]`;\nconst spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, \"g\");\n\nfunction fixListRegex(s) {\n // make dots optional and also make them literal\n // make space and non breakable space characters interchangeable\n return s.replace(/\\./g, \"\\\\.?\").replace(spaceOrNBSPRegExp, spaceOrNBSP);\n}\n\nfunction stripInsensitivities(s) {\n return s\n .replace(/\\./g, \"\") // ignore dots that were made optional\n .replace(spaceOrNBSPRegExp, \" \") // interchange space and nbsp\n .toLowerCase();\n}\n\nfunction oneOf(strings, startIndex) {\n if (strings === null) {\n return null;\n } else {\n return {\n regex: RegExp(strings.map(fixListRegex).join(\"|\")),\n deser: ([s]) =>\n strings.findIndex((i) => stripInsensitivities(s) === stripInsensitivities(i)) + startIndex,\n };\n }\n}\n\nfunction offset(regex, groups) {\n return { regex, deser: ([, h, m]) => signedOffset(h, m), groups };\n}\n\nfunction simple(regex) {\n return { regex, deser: ([s]) => s };\n}\n\nfunction escapeToken(value) {\n return value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n}\n\n/**\n * @param token\n * @param {Locale} loc\n */\nfunction unitForToken(token, loc) {\n const one = digitRegex(loc),\n two = digitRegex(loc, \"{2}\"),\n three = digitRegex(loc, \"{3}\"),\n four = digitRegex(loc, \"{4}\"),\n six = digitRegex(loc, \"{6}\"),\n oneOrTwo = digitRegex(loc, \"{1,2}\"),\n oneToThree = digitRegex(loc, \"{1,3}\"),\n oneToSix = digitRegex(loc, \"{1,6}\"),\n oneToNine = digitRegex(loc, \"{1,9}\"),\n twoToFour = digitRegex(loc, \"{2,4}\"),\n fourToSix = digitRegex(loc, \"{4,6}\"),\n literal = (t) => ({ regex: RegExp(escapeToken(t.val)), deser: ([s]) => s, literal: true }),\n unitate = (t) => {\n if (token.literal) {\n return literal(t);\n }\n switch (t.val) {\n // era\n case \"G\":\n return oneOf(loc.eras(\"short\"), 0);\n case \"GG\":\n return oneOf(loc.eras(\"long\"), 0);\n // years\n case \"y\":\n return intUnit(oneToSix);\n case \"yy\":\n return intUnit(twoToFour, untruncateYear);\n case \"yyyy\":\n return intUnit(four);\n case \"yyyyy\":\n return intUnit(fourToSix);\n case \"yyyyyy\":\n return intUnit(six);\n // months\n case \"M\":\n return intUnit(oneOrTwo);\n case \"MM\":\n return intUnit(two);\n case \"MMM\":\n return oneOf(loc.months(\"short\", true), 1);\n case \"MMMM\":\n return oneOf(loc.months(\"long\", true), 1);\n case \"L\":\n return intUnit(oneOrTwo);\n case \"LL\":\n return intUnit(two);\n case \"LLL\":\n return oneOf(loc.months(\"short\", false), 1);\n case \"LLLL\":\n return oneOf(loc.months(\"long\", false), 1);\n // dates\n case \"d\":\n return intUnit(oneOrTwo);\n case \"dd\":\n return intUnit(two);\n // ordinals\n case \"o\":\n return intUnit(oneToThree);\n case \"ooo\":\n return intUnit(three);\n // time\n case \"HH\":\n return intUnit(two);\n case \"H\":\n return intUnit(oneOrTwo);\n case \"hh\":\n return intUnit(two);\n case \"h\":\n return intUnit(oneOrTwo);\n case \"mm\":\n return intUnit(two);\n case \"m\":\n return intUnit(oneOrTwo);\n case \"q\":\n return intUnit(oneOrTwo);\n case \"qq\":\n return intUnit(two);\n case \"s\":\n return intUnit(oneOrTwo);\n case \"ss\":\n return intUnit(two);\n case \"S\":\n return intUnit(oneToThree);\n case \"SSS\":\n return intUnit(three);\n case \"u\":\n return simple(oneToNine);\n case \"uu\":\n return simple(oneOrTwo);\n case \"uuu\":\n return intUnit(one);\n // meridiem\n case \"a\":\n return oneOf(loc.meridiems(), 0);\n // weekYear (k)\n case \"kkkk\":\n return intUnit(four);\n case \"kk\":\n return intUnit(twoToFour, untruncateYear);\n // weekNumber (W)\n case \"W\":\n return intUnit(oneOrTwo);\n case \"WW\":\n return intUnit(two);\n // weekdays\n case \"E\":\n case \"c\":\n return intUnit(one);\n case \"EEE\":\n return oneOf(loc.weekdays(\"short\", false), 1);\n case \"EEEE\":\n return oneOf(loc.weekdays(\"long\", false), 1);\n case \"ccc\":\n return oneOf(loc.weekdays(\"short\", true), 1);\n case \"cccc\":\n return oneOf(loc.weekdays(\"long\", true), 1);\n // offset/zone\n case \"Z\":\n case \"ZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2);\n case \"ZZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2);\n // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing\n // because we don't have any way to figure out what they are\n case \"z\":\n return simple(/[a-z_+-/]{1,256}?/i);\n // this special-case \"token\" represents a place where a macro-token expanded into a white-space literal\n // in this case we accept any non-newline white-space\n case \" \":\n return simple(/[^\\S\\n\\r]/);\n default:\n return literal(t);\n }\n };\n\n const unit = unitate(token) || {\n invalidReason: MISSING_FTP,\n };\n\n unit.token = token;\n\n return unit;\n}\n\nconst partTypeStyleToTokenVal = {\n year: {\n \"2-digit\": \"yy\",\n numeric: \"yyyyy\",\n },\n month: {\n numeric: \"M\",\n \"2-digit\": \"MM\",\n short: \"MMM\",\n long: \"MMMM\",\n },\n day: {\n numeric: \"d\",\n \"2-digit\": \"dd\",\n },\n weekday: {\n short: \"EEE\",\n long: \"EEEE\",\n },\n dayperiod: \"a\",\n dayPeriod: \"a\",\n hour12: {\n numeric: \"h\",\n \"2-digit\": \"hh\",\n },\n hour24: {\n numeric: \"H\",\n \"2-digit\": \"HH\",\n },\n minute: {\n numeric: \"m\",\n \"2-digit\": \"mm\",\n },\n second: {\n numeric: \"s\",\n \"2-digit\": \"ss\",\n },\n timeZoneName: {\n long: \"ZZZZZ\",\n short: \"ZZZ\",\n },\n};\n\nfunction tokenForPart(part, formatOpts, resolvedOpts) {\n const { type, value } = part;\n\n if (type === \"literal\") {\n const isSpace = /^\\s+$/.test(value);\n return {\n literal: !isSpace,\n val: isSpace ? \" \" : value,\n };\n }\n\n const style = formatOpts[type];\n\n // The user might have explicitly specified hour12 or hourCycle\n // if so, respect their decision\n // if not, refer back to the resolvedOpts, which are based on the locale\n let actualType = type;\n if (type === \"hour\") {\n if (formatOpts.hour12 != null) {\n actualType = formatOpts.hour12 ? \"hour12\" : \"hour24\";\n } else if (formatOpts.hourCycle != null) {\n if (formatOpts.hourCycle === \"h11\" || formatOpts.hourCycle === \"h12\") {\n actualType = \"hour12\";\n } else {\n actualType = \"hour24\";\n }\n } else {\n // tokens only differentiate between 24 hours or not,\n // so we do not need to check hourCycle here, which is less supported anyways\n actualType = resolvedOpts.hour12 ? \"hour12\" : \"hour24\";\n }\n }\n let val = partTypeStyleToTokenVal[actualType];\n if (typeof val === \"object\") {\n val = val[style];\n }\n\n if (val) {\n return {\n literal: false,\n val,\n };\n }\n\n return undefined;\n}\n\nfunction buildRegex(units) {\n const re = units.map((u) => u.regex).reduce((f, r) => `${f}(${r.source})`, \"\");\n return [`^${re}$`, units];\n}\n\nfunction match(input, regex, handlers) {\n const matches = input.match(regex);\n\n if (matches) {\n const all = {};\n let matchIndex = 1;\n for (const i in handlers) {\n if (hasOwnProperty(handlers, i)) {\n const h = handlers[i],\n groups = h.groups ? h.groups + 1 : 1;\n if (!h.literal && h.token) {\n all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));\n }\n matchIndex += groups;\n }\n }\n return [matches, all];\n } else {\n return [matches, {}];\n }\n}\n\nfunction dateTimeFromMatches(matches) {\n const toField = (token) => {\n switch (token) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n case \"H\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"o\":\n return \"ordinal\";\n case \"L\":\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n case \"E\":\n case \"c\":\n return \"weekday\";\n case \"W\":\n return \"weekNumber\";\n case \"k\":\n return \"weekYear\";\n case \"q\":\n return \"quarter\";\n default:\n return null;\n }\n };\n\n let zone = null;\n let specificOffset;\n if (!isUndefined(matches.z)) {\n zone = IANAZone.create(matches.z);\n }\n\n if (!isUndefined(matches.Z)) {\n if (!zone) {\n zone = new FixedOffsetZone(matches.Z);\n }\n specificOffset = matches.Z;\n }\n\n if (!isUndefined(matches.q)) {\n matches.M = (matches.q - 1) * 3 + 1;\n }\n\n if (!isUndefined(matches.h)) {\n if (matches.h < 12 && matches.a === 1) {\n matches.h += 12;\n } else if (matches.h === 12 && matches.a === 0) {\n matches.h = 0;\n }\n }\n\n if (matches.G === 0 && matches.y) {\n matches.y = -matches.y;\n }\n\n if (!isUndefined(matches.u)) {\n matches.S = parseMillis(matches.u);\n }\n\n const vals = Object.keys(matches).reduce((r, k) => {\n const f = toField(k);\n if (f) {\n r[f] = matches[k];\n }\n\n return r;\n }, {});\n\n return [vals, zone, specificOffset];\n}\n\nlet dummyDateTimeCache = null;\n\nfunction getDummyDateTime() {\n if (!dummyDateTimeCache) {\n dummyDateTimeCache = DateTime.fromMillis(1555555555555);\n }\n\n return dummyDateTimeCache;\n}\n\nfunction maybeExpandMacroToken(token, locale) {\n if (token.literal) {\n return token;\n }\n\n const formatOpts = Formatter.macroTokenToFormatOpts(token.val);\n const tokens = formatOptsToTokens(formatOpts, locale);\n\n if (tokens == null || tokens.includes(undefined)) {\n return token;\n }\n\n return tokens;\n}\n\nexport function expandMacroTokens(tokens, locale) {\n return Array.prototype.concat(...tokens.map((t) => maybeExpandMacroToken(t, locale)));\n}\n\n/**\n * @private\n */\n\nexport class TokenParser {\n constructor(locale, format) {\n this.locale = locale;\n this.format = format;\n this.tokens = expandMacroTokens(Formatter.parseFormat(format), locale);\n this.units = this.tokens.map((t) => unitForToken(t, locale));\n this.disqualifyingUnit = this.units.find((t) => t.invalidReason);\n\n if (!this.disqualifyingUnit) {\n const [regexString, handlers] = buildRegex(this.units);\n this.regex = RegExp(regexString, \"i\");\n this.handlers = handlers;\n }\n }\n\n explainFromTokens(input) {\n if (!this.isValid) {\n return { input, tokens: this.tokens, invalidReason: this.invalidReason };\n } else {\n const [rawMatches, matches] = match(input, this.regex, this.handlers),\n [result, zone, specificOffset] = matches\n ? dateTimeFromMatches(matches)\n : [null, null, undefined];\n if (hasOwnProperty(matches, \"a\") && hasOwnProperty(matches, \"H\")) {\n throw new ConflictingSpecificationError(\n \"Can't include meridiem when specifying 24-hour format\"\n );\n }\n return {\n input,\n tokens: this.tokens,\n regex: this.regex,\n rawMatches,\n matches,\n result,\n zone,\n specificOffset,\n };\n }\n }\n\n get isValid() {\n return !this.disqualifyingUnit;\n }\n\n get invalidReason() {\n return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null;\n }\n}\n\nexport function explainFromTokens(locale, input, format) {\n const parser = new TokenParser(locale, format);\n return parser.explainFromTokens(input);\n}\n\nexport function parseFromTokens(locale, input, format) {\n const { result, zone, specificOffset, invalidReason } = explainFromTokens(locale, input, format);\n return [result, zone, specificOffset, invalidReason];\n}\n\nexport function formatOptsToTokens(formatOpts, locale) {\n if (!formatOpts) {\n return null;\n }\n\n const formatter = Formatter.create(locale, formatOpts);\n const df = formatter.dtFormatter(getDummyDateTime());\n const parts = df.formatToParts();\n const resolvedOpts = df.resolvedOptions();\n return parts.map((p) => tokenForPart(p, formatOpts, resolvedOpts));\n}\n", "import Duration from \"./duration.js\";\nimport Interval from \"./interval.js\";\nimport Settings from \"./settings.js\";\nimport Info from \"./info.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport FixedOffsetZone from \"./zones/fixedOffsetZone.js\";\nimport Locale from \"./impl/locale.js\";\nimport {\n isUndefined,\n maybeArray,\n isDate,\n isNumber,\n bestBy,\n daysInMonth,\n daysInYear,\n isLeapYear,\n weeksInWeekYear,\n normalizeObject,\n roundTo,\n objToLocalTS,\n padStart,\n} from \"./impl/util.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\nimport diff from \"./impl/diff.js\";\nimport { parseRFC2822Date, parseISODate, parseHTTPDate, parseSQL } from \"./impl/regexParser.js\";\nimport {\n parseFromTokens,\n explainFromTokens,\n formatOptsToTokens,\n expandMacroTokens,\n TokenParser,\n} from \"./impl/tokenParser.js\";\nimport {\n gregorianToWeek,\n weekToGregorian,\n gregorianToOrdinal,\n ordinalToGregorian,\n hasInvalidGregorianData,\n hasInvalidWeekData,\n hasInvalidOrdinalData,\n hasInvalidTimeData,\n usesLocalWeekValues,\n isoWeekdayToLocal,\n} from \"./impl/conversions.js\";\nimport * as Formats from \"./impl/formats.js\";\nimport {\n InvalidArgumentError,\n ConflictingSpecificationError,\n InvalidUnitError,\n InvalidDateTimeError,\n} from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid DateTime\";\nconst MAX_DATE = 8.64e15;\n\nfunction unsupportedZone(zone) {\n return new Invalid(\"unsupported zone\", `the zone \"${zone.name}\" is not supported`);\n}\n\n// we cache week data on the DT object and this intermediates the cache\n/**\n * @param {DateTime} dt\n */\nfunction possiblyCachedWeekData(dt) {\n if (dt.weekData === null) {\n dt.weekData = gregorianToWeek(dt.c);\n }\n return dt.weekData;\n}\n\n/**\n * @param {DateTime} dt\n */\nfunction possiblyCachedLocalWeekData(dt) {\n if (dt.localWeekData === null) {\n dt.localWeekData = gregorianToWeek(\n dt.c,\n dt.loc.getMinDaysInFirstWeek(),\n dt.loc.getStartOfWeek()\n );\n }\n return dt.localWeekData;\n}\n\n// clone really means, \"make a new object with these modifications\". all \"setters\" really use this\n// to create a new object while only changing some of the properties\nfunction clone(inst, alts) {\n const current = {\n ts: inst.ts,\n zone: inst.zone,\n c: inst.c,\n o: inst.o,\n loc: inst.loc,\n invalid: inst.invalid,\n };\n return new DateTime({ ...current, ...alts, old: current });\n}\n\n// find the right offset a given local time. The o input is our guess, which determines which\n// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)\nfunction fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n let utcGuess = localTS - o * 60 * 1000;\n\n // Test whether the zone matches the offset for this ts\n const o2 = tz.offset(utcGuess);\n\n // If so, offset didn't change and we're done\n if (o === o2) {\n return [utcGuess, o];\n }\n\n // If not, change the ts by the difference in the offset\n utcGuess -= (o2 - o) * 60 * 1000;\n\n // If that gives us the local time we want, we're done\n const o3 = tz.offset(utcGuess);\n if (o2 === o3) {\n return [utcGuess, o2];\n }\n\n // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n}\n\n// convert an epoch timestamp into a calendar object with the given offset\nfunction tsToObj(ts, offset) {\n ts += offset * 60 * 1000;\n\n const d = new Date(ts);\n\n return {\n year: d.getUTCFullYear(),\n month: d.getUTCMonth() + 1,\n day: d.getUTCDate(),\n hour: d.getUTCHours(),\n minute: d.getUTCMinutes(),\n second: d.getUTCSeconds(),\n millisecond: d.getUTCMilliseconds(),\n };\n}\n\n// convert a calendar object to a epoch timestamp\nfunction objToTS(obj, offset, zone) {\n return fixOffset(objToLocalTS(obj), offset, zone);\n}\n\n// create a new DT instance by adding a duration, adjusting for DSTs\nfunction adjustTime(inst, dur) {\n const oPre = inst.o,\n year = inst.c.year + Math.trunc(dur.years),\n month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3,\n c = {\n ...inst.c,\n year,\n month,\n day:\n Math.min(inst.c.day, daysInMonth(year, month)) +\n Math.trunc(dur.days) +\n Math.trunc(dur.weeks) * 7,\n },\n millisToAdd = Duration.fromObject({\n years: dur.years - Math.trunc(dur.years),\n quarters: dur.quarters - Math.trunc(dur.quarters),\n months: dur.months - Math.trunc(dur.months),\n weeks: dur.weeks - Math.trunc(dur.weeks),\n days: dur.days - Math.trunc(dur.days),\n hours: dur.hours,\n minutes: dur.minutes,\n seconds: dur.seconds,\n milliseconds: dur.milliseconds,\n }).as(\"milliseconds\"),\n localTS = objToLocalTS(c);\n\n let [ts, o] = fixOffset(localTS, oPre, inst.zone);\n\n if (millisToAdd !== 0) {\n ts += millisToAdd;\n // that could have changed the offset by going over a DST, but we want to keep the ts the same\n o = inst.zone.offset(ts);\n }\n\n return { ts, o };\n}\n\n// helper useful in turning the results of parsing into real dates\n// by handling the zone options\nfunction parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {\n const { setZone, zone } = opts;\n if ((parsed && Object.keys(parsed).length !== 0) || parsedZone) {\n const interpretationZone = parsedZone || zone,\n inst = DateTime.fromObject(parsed, {\n ...opts,\n zone: interpretationZone,\n specificOffset,\n });\n return setZone ? inst : inst.setZone(zone);\n } else {\n return DateTime.invalid(\n new Invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ${format}`)\n );\n }\n}\n\n// if you want to output a technical format (e.g. RFC 2822), this helper\n// helps handle the details\nfunction toTechFormat(dt, format, allowZ = true) {\n return dt.isValid\n ? Formatter.create(Locale.create(\"en-US\"), {\n allowZ,\n forceSimple: true,\n }).formatDateTimeFromString(dt, format)\n : null;\n}\n\nfunction toISODate(o, extended, precision) {\n const longFormat = o.c.year > 9999 || o.c.year < 0;\n let c = \"\";\n if (longFormat && o.c.year >= 0) c += \"+\";\n c += padStart(o.c.year, longFormat ? 6 : 4);\n if (precision === \"year\") return c;\n if (extended) {\n c += \"-\";\n c += padStart(o.c.month);\n if (precision === \"month\") return c;\n c += \"-\";\n } else {\n c += padStart(o.c.month);\n if (precision === \"month\") return c;\n }\n c += padStart(o.c.day);\n return c;\n}\n\nfunction toISOTime(\n o,\n extended,\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n extendedZone,\n precision\n) {\n let showSeconds = !suppressSeconds || o.c.millisecond !== 0 || o.c.second !== 0,\n c = \"\";\n switch (precision) {\n case \"day\":\n case \"month\":\n case \"year\":\n break;\n default:\n c += padStart(o.c.hour);\n if (precision === \"hour\") break;\n if (extended) {\n c += \":\";\n c += padStart(o.c.minute);\n if (precision === \"minute\") break;\n if (showSeconds) {\n c += \":\";\n c += padStart(o.c.second);\n }\n } else {\n c += padStart(o.c.minute);\n if (precision === \"minute\") break;\n if (showSeconds) {\n c += padStart(o.c.second);\n }\n }\n if (precision === \"second\") break;\n if (showSeconds && (!suppressMilliseconds || o.c.millisecond !== 0)) {\n c += \".\";\n c += padStart(o.c.millisecond, 3);\n }\n }\n\n if (includeOffset) {\n if (o.isOffsetFixed && o.offset === 0 && !extendedZone) {\n c += \"Z\";\n } else if (o.o < 0) {\n c += \"-\";\n c += padStart(Math.trunc(-o.o / 60));\n c += \":\";\n c += padStart(Math.trunc(-o.o % 60));\n } else {\n c += \"+\";\n c += padStart(Math.trunc(o.o / 60));\n c += \":\";\n c += padStart(Math.trunc(o.o % 60));\n }\n }\n\n if (extendedZone) {\n c += \"[\" + o.zone.ianaName + \"]\";\n }\n return c;\n}\n\n// defaults for unspecified units in the supported calendars\nconst defaultUnitValues = {\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n },\n defaultWeekUnitValues = {\n weekNumber: 1,\n weekday: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n },\n defaultOrdinalUnitValues = {\n ordinal: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n };\n\n// Units in the supported calendars, sorted by bigness\nconst orderedUnits = [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n orderedWeekUnits = [\n \"weekYear\",\n \"weekNumber\",\n \"weekday\",\n \"hour\",\n \"minute\",\n \"second\",\n \"millisecond\",\n ],\n orderedOrdinalUnits = [\"year\", \"ordinal\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n\n// standardize case and plurality in units\nfunction normalizeUnit(unit) {\n const normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\",\n }[unit.toLowerCase()];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n}\n\nfunction normalizeUnitWithLocalWeeks(unit) {\n switch (unit.toLowerCase()) {\n case \"localweekday\":\n case \"localweekdays\":\n return \"localWeekday\";\n case \"localweeknumber\":\n case \"localweeknumbers\":\n return \"localWeekNumber\";\n case \"localweekyear\":\n case \"localweekyears\":\n return \"localWeekYear\";\n default:\n return normalizeUnit(unit);\n }\n}\n\n// cache offsets for zones based on the current timestamp when this function is\n// first called. When we are handling a datetime from components like (year,\n// month, day, hour) in a time zone, we need a guess about what the timezone\n// offset is so that we can convert into a UTC timestamp. One way is to find the\n// offset of now in the zone. The actual date may have a different offset (for\n// example, if we handle a date in June while we're in December in a zone that\n// observes DST), but we can check and adjust that.\n//\n// When handling many dates, calculating the offset for now every time is\n// expensive. It's just a guess, so we can cache the offset to use even if we\n// are right on a time change boundary (we'll just correct in the other\n// direction). Using a timestamp from first read is a slight optimization for\n// handling dates close to the current date, since those dates will usually be\n// in the same offset (we could set the timestamp statically, instead). We use a\n// single timestamp for all zones to make things a bit more predictable.\n//\n// This is safe for quickDT (used by local() and utc()) because we don't fill in\n// higher-order units from tsNow (as we do in fromObject, this requires that\n// offset is calculated from tsNow).\n/**\n * @param {Zone} zone\n * @return {number}\n */\nfunction guessOffsetForZone(zone) {\n if (zoneOffsetTs === undefined) {\n zoneOffsetTs = Settings.now();\n }\n\n // Do not cache anything but IANA zones, because it is not safe to do so.\n // Guessing an offset which is not present in the zone can cause wrong results from fixOffset\n if (zone.type !== \"iana\") {\n return zone.offset(zoneOffsetTs);\n }\n const zoneName = zone.name;\n let offsetGuess = zoneOffsetGuessCache.get(zoneName);\n if (offsetGuess === undefined) {\n offsetGuess = zone.offset(zoneOffsetTs);\n zoneOffsetGuessCache.set(zoneName, offsetGuess);\n }\n return offsetGuess;\n}\n\n// this is a dumbed down version of fromObject() that runs about 60% faster\n// but doesn't do any validation, makes a bunch of assumptions about what units\n// are present, and so on.\nfunction quickDT(obj, opts) {\n const zone = normalizeZone(opts.zone, Settings.defaultZone);\n if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n }\n\n const loc = Locale.fromObject(opts);\n\n let ts, o;\n\n // assume we have the higher-order units\n if (!isUndefined(obj.year)) {\n for (const u of orderedUnits) {\n if (isUndefined(obj[u])) {\n obj[u] = defaultUnitValues[u];\n }\n }\n\n const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n const offsetProvis = guessOffsetForZone(zone);\n [ts, o] = objToTS(obj, offsetProvis, zone);\n } else {\n ts = Settings.now();\n }\n\n return new DateTime({ ts, zone, loc, o });\n}\n\nfunction diffRelative(start, end, opts) {\n const round = isUndefined(opts.round) ? true : opts.round,\n rounding = isUndefined(opts.rounding) ? \"trunc\" : opts.rounding,\n format = (c, unit) => {\n c = roundTo(c, round || opts.calendary ? 0 : 2, opts.calendary ? \"round\" : rounding);\n const formatter = end.loc.clone(opts).relFormatter(opts);\n return formatter.format(c, unit);\n },\n differ = (unit) => {\n if (opts.calendary) {\n if (!end.hasSame(start, unit)) {\n return end.startOf(unit).diff(start.startOf(unit), unit).get(unit);\n } else return 0;\n } else {\n return end.diff(start, unit).get(unit);\n }\n };\n\n if (opts.unit) {\n return format(differ(opts.unit), opts.unit);\n }\n\n for (const unit of opts.units) {\n const count = differ(unit);\n if (Math.abs(count) >= 1) {\n return format(count, unit);\n }\n }\n return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]);\n}\n\nfunction lastOpts(argList) {\n let opts = {},\n args;\n if (argList.length > 0 && typeof argList[argList.length - 1] === \"object\") {\n opts = argList[argList.length - 1];\n args = Array.from(argList).slice(0, argList.length - 1);\n } else {\n args = Array.from(argList);\n }\n return [opts, args];\n}\n\n/**\n * Timestamp to use for cached zone offset guesses (exposed for test)\n */\nlet zoneOffsetTs;\n/**\n * Cache for zone offset guesses (exposed for test).\n *\n * This optimizes quickDT via guessOffsetForZone to avoid repeated calls of\n * zone.offset().\n */\nconst zoneOffsetGuessCache = new Map();\n\n/**\n * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them.\n *\n * A DateTime comprises of:\n * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch.\n * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone).\n * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`.\n *\n * Here is a brief overview of the most commonly used functionality it provides:\n *\n * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link DateTime.local}, {@link DateTime.utc}, and (most flexibly) {@link DateTime.fromObject}. To create one from a standard string format, use {@link DateTime.fromISO}, {@link DateTime.fromHTTP}, and {@link DateTime.fromRFC2822}. To create one from a custom string format, use {@link DateTime.fromFormat}. To create one from a native JS date, use {@link DateTime.fromJSDate}.\n * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link DateTime#toObject}), use the {@link DateTime#year}, {@link DateTime#month},\n * {@link DateTime#day}, {@link DateTime#hour}, {@link DateTime#minute}, {@link DateTime#second}, {@link DateTime#millisecond} accessors.\n * * **Week calendar**: For ISO week calendar attributes, see the {@link DateTime#weekYear}, {@link DateTime#weekNumber}, and {@link DateTime#weekday} accessors.\n * * **Configuration** See the {@link DateTime#locale} and {@link DateTime#numberingSystem} accessors.\n * * **Transformation**: To transform the DateTime into other DateTimes, use {@link DateTime#set}, {@link DateTime#reconfigure}, {@link DateTime#setZone}, {@link DateTime#setLocale}, {@link DateTime.plus}, {@link DateTime#minus}, {@link DateTime#endOf}, {@link DateTime#startOf}, {@link DateTime#toUTC}, and {@link DateTime#toLocal}.\n * * **Output**: To convert the DateTime to other representations, use the {@link DateTime#toRelative}, {@link DateTime#toRelativeCalendar}, {@link DateTime#toJSON}, {@link DateTime#toISO}, {@link DateTime#toHTTP}, {@link DateTime#toObject}, {@link DateTime#toRFC2822}, {@link DateTime#toString}, {@link DateTime#toLocaleString}, {@link DateTime#toFormat}, {@link DateTime#toMillis} and {@link DateTime#toJSDate}.\n *\n * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation.\n */\nexport default class DateTime {\n /**\n * @access private\n */\n constructor(config) {\n const zone = config.zone || Settings.defaultZone;\n\n let invalid =\n config.invalid ||\n (Number.isNaN(config.ts) ? new Invalid(\"invalid input\") : null) ||\n (!zone.isValid ? unsupportedZone(zone) : null);\n /**\n * @access private\n */\n this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;\n\n let c = null,\n o = null;\n if (!invalid) {\n const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);\n\n if (unchanged) {\n [c, o] = [config.old.c, config.old.o];\n } else {\n // If an offset has been passed and we have not been called from\n // clone(), we can trust it and avoid the offset calculation.\n const ot = isNumber(config.o) && !config.old ? config.o : zone.offset(this.ts);\n c = tsToObj(this.ts, ot);\n invalid = Number.isNaN(c.year) ? new Invalid(\"invalid input\") : null;\n c = invalid ? null : c;\n o = invalid ? null : ot;\n }\n }\n\n /**\n * @access private\n */\n this._zone = zone;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.invalid = invalid;\n /**\n * @access private\n */\n this.weekData = null;\n /**\n * @access private\n */\n this.localWeekData = null;\n /**\n * @access private\n */\n this.c = c;\n /**\n * @access private\n */\n this.o = o;\n /**\n * @access private\n */\n this.isLuxonDateTime = true;\n }\n\n // CONSTRUCT\n\n /**\n * Create a DateTime for the current instant, in the system's time zone.\n *\n * Use Settings to override these default values if needed.\n * @example DateTime.now().toISO() //~> now in the ISO format\n * @return {DateTime}\n */\n static now() {\n return new DateTime({});\n }\n\n /**\n * Create a local DateTime\n * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month, 1-indexed\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.local() //~> now\n * @example DateTime.local({ zone: \"America/New_York\" }) //~> now, in US east coast time\n * @example DateTime.local(2017) //~> 2017-01-01T00:00:00\n * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00\n * @example DateTime.local(2017, 3, 12, { locale: \"fr\" }) //~> 2017-03-12T00:00:00, with a French locale\n * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00\n * @example DateTime.local(2017, 3, 12, 5, { zone: \"utc\" }) //~> 2017-03-12T05:00:00, in UTC\n * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00\n * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10\n * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765\n * @return {DateTime}\n */\n static local() {\n const [opts, args] = lastOpts(arguments),\n [year, month, day, hour, minute, second, millisecond] = args;\n return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);\n }\n\n /**\n * Create a DateTime in UTC\n * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @param {Object} options - configuration options for the DateTime\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance\n * @example DateTime.utc() //~> now\n * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z\n * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z\n * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: \"fr\" }) //~> 2017-03-12T05:45:00Z with a French locale\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: \"fr\" }) //~> 2017-03-12T05:45:10.765Z with a French locale\n * @return {DateTime}\n */\n static utc() {\n const [opts, args] = lastOpts(arguments),\n [year, month, day, hour, minute, second, millisecond] = args;\n\n opts.zone = FixedOffsetZone.utcInstance;\n return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);\n }\n\n /**\n * Create a DateTime from a JavaScript Date object. Uses the default zone.\n * @param {Date} date - a JavaScript Date object\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @return {DateTime}\n */\n static fromJSDate(date, options = {}) {\n const ts = isDate(date) ? date.valueOf() : NaN;\n if (Number.isNaN(ts)) {\n return DateTime.invalid(\"invalid input\");\n }\n\n const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n return new DateTime({\n ts: ts,\n zone: zoneToUse,\n loc: Locale.fromObject(options),\n });\n }\n\n /**\n * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} milliseconds - a number of milliseconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromMillis(milliseconds, options = {}) {\n if (!isNumber(milliseconds)) {\n throw new InvalidArgumentError(\n `fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`\n );\n } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {\n // this isn't perfect because we can still end up out of range because of additional shifting, but it's a start\n return DateTime.invalid(\"Timestamp out of range\");\n } else {\n return new DateTime({\n ts: milliseconds,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options),\n });\n }\n }\n\n /**\n * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} seconds - a number of seconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromSeconds(seconds, options = {}) {\n if (!isNumber(seconds)) {\n throw new InvalidArgumentError(\"fromSeconds requires a numerical input\");\n } else {\n return new DateTime({\n ts: seconds * 1000,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options),\n });\n }\n }\n\n /**\n * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.year - a year, such as 1987\n * @param {number} obj.month - a month, 1-12\n * @param {number} obj.day - a day of the month, 1-31, depending on the month\n * @param {number} obj.ordinal - day of the year, 1-365 or 366\n * @param {number} obj.weekYear - an ISO week year\n * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year\n * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday\n * @param {number} obj.localWeekYear - a week year, according to the locale\n * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale\n * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale\n * @param {number} obj.hour - hour of the day, 0-23\n * @param {number} obj.minute - minute of the hour, 0-59\n * @param {number} obj.second - second of the minute, 0-59\n * @param {number} obj.millisecond - millisecond of the second, 0-999\n * @param {Object} opts - options for creating this DateTime\n * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()\n * @param {string} [opts.locale='system\\'s locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'\n * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })\n * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'\n * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: \"en-US\" }).toISODate() //=> '2021-12-26'\n * @return {DateTime}\n */\n static fromObject(obj, opts = {}) {\n obj = obj || {};\n const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n const loc = Locale.fromObject(opts);\n const normalized = normalizeObject(obj, normalizeUnitWithLocalWeeks);\n const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, loc);\n\n const tsNow = Settings.now(),\n offsetProvis = !isUndefined(opts.specificOffset)\n ? opts.specificOffset\n : zoneToUse.offset(tsNow),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n\n // cases:\n // just a weekday -> this week's instance of that weekday, no worries\n // (gregorian data or ordinal) + (weekYear or weekNumber) -> error\n // (gregorian month or day) + ordinal -> error\n // otherwise just use weeks or ordinals or gregorian, depending on what's specified\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\n \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n );\n }\n\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n\n const useWeekData = definiteWeekDef || (normalized.weekday && !containsGregor);\n\n // configure ourselves to deal with gregorian dates or week stuff\n let units,\n defaultValues,\n objNow = tsToObj(tsNow, offsetProvis);\n if (useWeekData) {\n units = orderedWeekUnits;\n defaultValues = defaultWeekUnitValues;\n objNow = gregorianToWeek(objNow, minDaysInFirstWeek, startOfWeek);\n } else if (containsOrdinal) {\n units = orderedOrdinalUnits;\n defaultValues = defaultOrdinalUnitValues;\n objNow = gregorianToOrdinal(objNow);\n } else {\n units = orderedUnits;\n defaultValues = defaultUnitValues;\n }\n\n // set default values for missing stuff\n let foundFirst = false;\n for (const u of units) {\n const v = normalized[u];\n if (!isUndefined(v)) {\n foundFirst = true;\n } else if (foundFirst) {\n normalized[u] = defaultValues[u];\n } else {\n normalized[u] = objNow[u];\n }\n }\n\n // make sure the values we have are in range\n const higherOrderInvalid = useWeekData\n ? hasInvalidWeekData(normalized, minDaysInFirstWeek, startOfWeek)\n : containsOrdinal\n ? hasInvalidOrdinalData(normalized)\n : hasInvalidGregorianData(normalized),\n invalid = higherOrderInvalid || hasInvalidTimeData(normalized);\n\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n // compute the actual time\n const gregorian = useWeekData\n ? weekToGregorian(normalized, minDaysInFirstWeek, startOfWeek)\n : containsOrdinal\n ? ordinalToGregorian(normalized)\n : normalized,\n [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse),\n inst = new DateTime({\n ts: tsFinal,\n zone: zoneToUse,\n o: offsetFinal,\n loc,\n });\n\n // gregorian data + weekday serves only to validate\n if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {\n return DateTime.invalid(\n \"mismatched weekday\",\n `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`\n );\n }\n\n if (!inst.isValid) {\n return DateTime.invalid(inst.invalid);\n }\n\n return inst;\n }\n\n /**\n * Create a DateTime from an ISO 8601 string\n * @param {string} text - the ISO string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromISO('2016-05-25T09:08:34.123')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})\n * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})\n * @example DateTime.fromISO('2016-W05-4')\n * @return {DateTime}\n */\n static fromISO(text, opts = {}) {\n const [vals, parsedZone] = parseISODate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"ISO 8601\", text);\n }\n\n /**\n * Create a DateTime from an RFC 2822 string\n * @param {string} text - the RFC 2822 string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')\n * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')\n * @return {DateTime}\n */\n static fromRFC2822(text, opts = {}) {\n const [vals, parsedZone] = parseRFC2822Date(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"RFC 2822\", text);\n }\n\n /**\n * Create a DateTime from an HTTP header date\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @param {string} text - the HTTP header date\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')\n * @return {DateTime}\n */\n static fromHTTP(text, opts = {}) {\n const [vals, parsedZone] = parseHTTPDate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"HTTP\", opts);\n }\n\n /**\n * Create a DateTime from an input string and format string.\n * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromFormat(text, fmt, opts = {}) {\n if (isUndefined(text) || isUndefined(fmt)) {\n throw new InvalidArgumentError(\"fromFormat requires an input string and a format\");\n }\n\n const { locale = null, numberingSystem = null } = opts,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n }),\n [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt);\n if (invalid) {\n return DateTime.invalid(invalid);\n } else {\n return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset);\n }\n }\n\n /**\n * @deprecated use fromFormat instead\n */\n static fromString(text, fmt, opts = {}) {\n return DateTime.fromFormat(text, fmt, opts);\n }\n\n /**\n * Create a DateTime from a SQL date, time, or datetime\n * Defaults to en-US if no locale has been specified, regardless of the system's locale\n * @param {string} text - the string to parse\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @example DateTime.fromSQL('2017-05-15')\n * @example DateTime.fromSQL('2017-05-15 09:12:34')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })\n * @example DateTime.fromSQL('09:12:34.342')\n * @return {DateTime}\n */\n static fromSQL(text, opts = {}) {\n const [vals, parsedZone] = parseSQL(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"SQL\", text);\n }\n\n /**\n * Create an invalid DateTime.\n * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent.\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {DateTime}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the DateTime is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDateTimeError(invalid);\n } else {\n return new DateTime({ invalid });\n }\n }\n\n /**\n * Check if an object is an instance of DateTime. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDateTime(o) {\n return (o && o.isLuxonDateTime) || false;\n }\n\n /**\n * Produce the format string for a set of options\n * @param formatOpts\n * @param localeOpts\n * @returns {string}\n */\n static parseFormatForOpts(formatOpts, localeOpts = {}) {\n const tokenList = formatOptsToTokens(formatOpts, Locale.fromObject(localeOpts));\n return !tokenList ? null : tokenList.map((t) => (t ? t.val : null)).join(\"\");\n }\n\n /**\n * Produce the the fully expanded format token for the locale\n * Does NOT quote characters, so quoted tokens will not round trip correctly\n * @param fmt\n * @param localeOpts\n * @returns {string}\n */\n static expandFormat(fmt, localeOpts = {}) {\n const expanded = expandMacroTokens(Formatter.parseFormat(fmt), Locale.fromObject(localeOpts));\n return expanded.map((t) => t.val).join(\"\");\n }\n\n static resetCache() {\n zoneOffsetTs = undefined;\n zoneOffsetGuessCache.clear();\n }\n\n // INFO\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example DateTime.local(2017, 7, 4).get('month'); //=> 7\n * @example DateTime.local(2017, 7, 4).get('day'); //=> 4\n * @return {number}\n */\n get(unit) {\n return this[unit];\n }\n\n /**\n * Returns whether the DateTime is valid. Invalid DateTimes occur when:\n * * The DateTime was created from invalid calendar information, such as the 13th month or February 30\n * * The DateTime was created by an operation on another invalid date\n * @type {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this DateTime is invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime\n *\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime\n *\n * @type {string}\n */\n get outputCalendar() {\n return this.isValid ? this.loc.outputCalendar : null;\n }\n\n /**\n * Get the time zone associated with this DateTime.\n * @type {Zone}\n */\n get zone() {\n return this._zone;\n }\n\n /**\n * Get the name of the time zone.\n * @type {string}\n */\n get zoneName() {\n return this.isValid ? this.zone.name : null;\n }\n\n /**\n * Get the year\n * @example DateTime.local(2017, 5, 25).year //=> 2017\n * @type {number}\n */\n get year() {\n return this.isValid ? this.c.year : NaN;\n }\n\n /**\n * Get the quarter\n * @example DateTime.local(2017, 5, 25).quarter //=> 2\n * @type {number}\n */\n get quarter() {\n return this.isValid ? Math.ceil(this.c.month / 3) : NaN;\n }\n\n /**\n * Get the month (1-12).\n * @example DateTime.local(2017, 5, 25).month //=> 5\n * @type {number}\n */\n get month() {\n return this.isValid ? this.c.month : NaN;\n }\n\n /**\n * Get the day of the month (1-30ish).\n * @example DateTime.local(2017, 5, 25).day //=> 25\n * @type {number}\n */\n get day() {\n return this.isValid ? this.c.day : NaN;\n }\n\n /**\n * Get the hour of the day (0-23).\n * @example DateTime.local(2017, 5, 25, 9).hour //=> 9\n * @type {number}\n */\n get hour() {\n return this.isValid ? this.c.hour : NaN;\n }\n\n /**\n * Get the minute of the hour (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30\n * @type {number}\n */\n get minute() {\n return this.isValid ? this.c.minute : NaN;\n }\n\n /**\n * Get the second of the minute (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52\n * @type {number}\n */\n get second() {\n return this.isValid ? this.c.second : NaN;\n }\n\n /**\n * Get the millisecond of the second (0-999).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654\n * @type {number}\n */\n get millisecond() {\n return this.isValid ? this.c.millisecond : NaN;\n }\n\n /**\n * Get the week year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 12, 31).weekYear //=> 2015\n * @type {number}\n */\n get weekYear() {\n return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the week number of the week year (1-52ish).\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2017, 5, 25).weekNumber //=> 21\n * @type {number}\n */\n get weekNumber() {\n return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the day of the week.\n * 1 is Monday and 7 is Sunday\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 11, 31).weekday //=> 4\n * @type {number}\n */\n get weekday() {\n return this.isValid ? possiblyCachedWeekData(this).weekday : NaN;\n }\n\n /**\n * Returns true if this date is on a weekend according to the locale, false otherwise\n * @returns {boolean}\n */\n get isWeekend() {\n return this.isValid && this.loc.getWeekendDays().includes(this.weekday);\n }\n\n /**\n * Get the day of the week according to the locale.\n * 1 is the first day of the week and 7 is the last day of the week.\n * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1,\n * @returns {number}\n */\n get localWeekday() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekday : NaN;\n }\n\n /**\n * Get the week number of the week year according to the locale. Different locales assign week numbers differently,\n * because the week can start on different days of the week (see localWeekday) and because a different number of days\n * is required for a week to count as the first week of a year.\n * @returns {number}\n */\n get localWeekNumber() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the week year according to the locale. Different locales assign week numbers (and therefor week years)\n * differently, see localWeekNumber.\n * @returns {number}\n */\n get localWeekYear() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the ordinal (meaning the day of the year)\n * @example DateTime.local(2017, 5, 25).ordinal //=> 145\n * @type {number|DateTime}\n */\n get ordinal() {\n return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN;\n }\n\n /**\n * Get the human readable short month name, such as 'Oct'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthShort //=> Oct\n * @type {string}\n */\n get monthShort() {\n return this.isValid ? Info.months(\"short\", { locObj: this.loc })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable long month name, such as 'October'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthLong //=> October\n * @type {string}\n */\n get monthLong() {\n return this.isValid ? Info.months(\"long\", { locObj: this.loc })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable short weekday, such as 'Mon'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon\n * @type {string}\n */\n get weekdayShort() {\n return this.isValid ? Info.weekdays(\"short\", { locObj: this.loc })[this.weekday - 1] : null;\n }\n\n /**\n * Get the human readable long weekday, such as 'Monday'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday\n * @type {string}\n */\n get weekdayLong() {\n return this.isValid ? Info.weekdays(\"long\", { locObj: this.loc })[this.weekday - 1] : null;\n }\n\n /**\n * Get the UTC offset of this DateTime in minutes\n * @example DateTime.now().offset //=> -240\n * @example DateTime.utc().offset //=> 0\n * @type {number}\n */\n get offset() {\n return this.isValid ? +this.o : NaN;\n }\n\n /**\n * Get the short human name for the zone's current offset, for example \"EST\" or \"EDT\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameShort() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"short\",\n locale: this.locale,\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get the long human name for the zone's current offset, for example \"Eastern Standard Time\" or \"Eastern Daylight Time\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameLong() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"long\",\n locale: this.locale,\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get whether this zone's offset ever changes, as in a DST.\n * @type {boolean}\n */\n get isOffsetFixed() {\n return this.isValid ? this.zone.isUniversal : null;\n }\n\n /**\n * Get whether the DateTime is in a DST.\n * @type {boolean}\n */\n get isInDST() {\n if (this.isOffsetFixed) {\n return false;\n } else {\n return (\n this.offset > this.set({ month: 1, day: 1 }).offset ||\n this.offset > this.set({ month: 5 }).offset\n );\n }\n }\n\n /**\n * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC\n * in this DateTime's zone. During DST changes local time can be ambiguous, for example\n * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`.\n * This method will return both possible DateTimes if this DateTime's local time is ambiguous.\n * @returns {DateTime[]}\n */\n getPossibleOffsets() {\n if (!this.isValid || this.isOffsetFixed) {\n return [this];\n }\n const dayMs = 86400000;\n const minuteMs = 60000;\n const localTS = objToLocalTS(this.c);\n const oEarlier = this.zone.offset(localTS - dayMs);\n const oLater = this.zone.offset(localTS + dayMs);\n\n const o1 = this.zone.offset(localTS - oEarlier * minuteMs);\n const o2 = this.zone.offset(localTS - oLater * minuteMs);\n if (o1 === o2) {\n return [this];\n }\n const ts1 = localTS - o1 * minuteMs;\n const ts2 = localTS - o2 * minuteMs;\n const c1 = tsToObj(ts1, o1);\n const c2 = tsToObj(ts2, o2);\n if (\n c1.hour === c2.hour &&\n c1.minute === c2.minute &&\n c1.second === c2.second &&\n c1.millisecond === c2.millisecond\n ) {\n return [clone(this, { ts: ts1 }), clone(this, { ts: ts2 })];\n }\n return [this];\n }\n\n /**\n * Returns true if this DateTime is in a leap year, false otherwise\n * @example DateTime.local(2016).isInLeapYear //=> true\n * @example DateTime.local(2013).isInLeapYear //=> false\n * @type {boolean}\n */\n get isInLeapYear() {\n return isLeapYear(this.year);\n }\n\n /**\n * Returns the number of days in this DateTime's month\n * @example DateTime.local(2016, 2).daysInMonth //=> 29\n * @example DateTime.local(2016, 3).daysInMonth //=> 31\n * @type {number}\n */\n get daysInMonth() {\n return daysInMonth(this.year, this.month);\n }\n\n /**\n * Returns the number of days in this DateTime's year\n * @example DateTime.local(2016).daysInYear //=> 366\n * @example DateTime.local(2013).daysInYear //=> 365\n * @type {number}\n */\n get daysInYear() {\n return this.isValid ? daysInYear(this.year) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2004).weeksInWeekYear //=> 53\n * @example DateTime.local(2013).weeksInWeekYear //=> 52\n * @type {number}\n */\n get weeksInWeekYear() {\n return this.isValid ? weeksInWeekYear(this.weekYear) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's local week year\n * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52\n * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53\n * @type {number}\n */\n get weeksInLocalWeekYear() {\n return this.isValid\n ? weeksInWeekYear(\n this.localWeekYear,\n this.loc.getMinDaysInFirstWeek(),\n this.loc.getStartOfWeek()\n )\n : NaN;\n }\n\n /**\n * Returns the resolved Intl options for this DateTime.\n * This is useful in understanding the behavior of formatting methods\n * @param {Object} opts - the same options as toLocaleString\n * @return {Object}\n */\n resolvedLocaleOptions(opts = {}) {\n const { locale, numberingSystem, calendar } = Formatter.create(\n this.loc.clone(opts),\n opts\n ).resolvedOptions(this);\n return { locale, numberingSystem, outputCalendar: calendar };\n }\n\n // TRANSFORM\n\n /**\n * \"Set\" the DateTime's zone to UTC. Returns a newly-constructed DateTime.\n *\n * Equivalent to {@link DateTime#setZone}('utc')\n * @param {number} [offset=0] - optionally, an offset from UTC in minutes\n * @param {Object} [opts={}] - options to pass to `setZone()`\n * @return {DateTime}\n */\n toUTC(offset = 0, opts = {}) {\n return this.setZone(FixedOffsetZone.instance(offset), opts);\n }\n\n /**\n * \"Set\" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.\n *\n * Equivalent to `setZone('local')`\n * @return {DateTime}\n */\n toLocal() {\n return this.setZone(Settings.defaultZone);\n }\n\n /**\n * \"Set\" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.\n *\n * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.\n * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.\n * @param {Object} opts - options\n * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.\n * @return {DateTime}\n */\n setZone(zone, { keepLocalTime = false, keepCalendarTime = false } = {}) {\n zone = normalizeZone(zone, Settings.defaultZone);\n if (zone.equals(this.zone)) {\n return this;\n } else if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n } else {\n let newTS = this.ts;\n if (keepLocalTime || keepCalendarTime) {\n const offsetGuess = zone.offset(this.ts);\n const asObj = this.toObject();\n [newTS] = objToTS(asObj, offsetGuess, zone);\n }\n return clone(this, { ts: newTS, zone });\n }\n }\n\n /**\n * \"Set\" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.\n * @param {Object} properties - the properties to set\n * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })\n * @return {DateTime}\n */\n reconfigure({ locale, numberingSystem, outputCalendar } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem, outputCalendar });\n return clone(this, { loc });\n }\n\n /**\n * \"Set\" the locale. Returns a newly-constructed DateTime.\n * Just a convenient alias for reconfigure({ locale })\n * @example DateTime.local(2017, 5, 25).setLocale('en-GB')\n * @return {DateTime}\n */\n setLocale(locale) {\n return this.reconfigure({ locale });\n }\n\n /**\n * \"Set\" the values of specified units. Returns a newly-constructed DateTime.\n * You can only set units with this method; for \"setting\" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.\n *\n * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`.\n * They cannot be mixed with ISO-week units like `weekday`.\n * @param {Object} values - a mapping of units to numbers\n * @example dt.set({ year: 2017 })\n * @example dt.set({ hour: 8, minute: 30 })\n * @example dt.set({ weekday: 5 })\n * @example dt.set({ year: 2005, ordinal: 234 })\n * @return {DateTime}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const normalized = normalizeObject(values, normalizeUnitWithLocalWeeks);\n const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, this.loc);\n\n const settingWeekStuff =\n !isUndefined(normalized.weekYear) ||\n !isUndefined(normalized.weekNumber) ||\n !isUndefined(normalized.weekday),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\n \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n );\n }\n\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n\n let mixed;\n if (settingWeekStuff) {\n mixed = weekToGregorian(\n { ...gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), ...normalized },\n minDaysInFirstWeek,\n startOfWeek\n );\n } else if (!isUndefined(normalized.ordinal)) {\n mixed = ordinalToGregorian({ ...gregorianToOrdinal(this.c), ...normalized });\n } else {\n mixed = { ...this.toObject(), ...normalized };\n\n // if we didn't set the day but we ended up on an overflow date,\n // use the last day of the right month\n if (isUndefined(normalized.day)) {\n mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);\n }\n }\n\n const [ts, o] = objToTS(mixed, this.o, this.zone);\n return clone(this, { ts, o });\n }\n\n /**\n * Add a period of time to this DateTime and return the resulting DateTime\n *\n * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @example DateTime.now().plus(123) //~> in 123 milliseconds\n * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes\n * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow\n * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday\n * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min\n * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min\n * @return {DateTime}\n */\n plus(duration) {\n if (!this.isValid) return this;\n const dur = Duration.fromDurationLike(duration);\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * Subtract a period of time to this DateTime and return the resulting DateTime\n * See {@link DateTime#plus}\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n @return {DateTime}\n */\n minus(duration) {\n if (!this.isValid) return this;\n const dur = Duration.fromDurationLike(duration).negate();\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * \"Set\" this DateTime to the beginning of a unit of time.\n * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'\n * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'\n * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'\n * @return {DateTime}\n */\n startOf(unit, { useLocaleWeeks = false } = {}) {\n if (!this.isValid) return this;\n\n const o = {},\n normalizedUnit = Duration.normalizeUnit(unit);\n switch (normalizedUnit) {\n case \"years\":\n o.month = 1;\n // falls through\n case \"quarters\":\n case \"months\":\n o.day = 1;\n // falls through\n case \"weeks\":\n case \"days\":\n o.hour = 0;\n // falls through\n case \"hours\":\n o.minute = 0;\n // falls through\n case \"minutes\":\n o.second = 0;\n // falls through\n case \"seconds\":\n o.millisecond = 0;\n break;\n case \"milliseconds\":\n break;\n // no default, invalid units throw in normalizeUnit()\n }\n\n if (normalizedUnit === \"weeks\") {\n if (useLocaleWeeks) {\n const startOfWeek = this.loc.getStartOfWeek();\n const { weekday } = this;\n if (weekday < startOfWeek) {\n o.weekNumber = this.weekNumber - 1;\n }\n o.weekday = startOfWeek;\n } else {\n o.weekday = 1;\n }\n }\n\n if (normalizedUnit === \"quarters\") {\n const q = Math.ceil(this.month / 3);\n o.month = (q - 1) * 3 + 1;\n }\n\n return this.set(o);\n }\n\n /**\n * \"Set\" this DateTime to the end (meaning the last millisecond) of a unit of time\n * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'\n * @return {DateTime}\n */\n endOf(unit, opts) {\n return this.isValid\n ? this.plus({ [unit]: 1 })\n .startOf(unit, opts)\n .minus(1)\n : this;\n }\n\n // OUTPUT\n\n /**\n * Returns a string representation of this DateTime formatted according to the specified format string.\n * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @param {string} fmt - the format string\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'\n * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'\n * @example DateTime.now().toFormat('yyyy LLL dd', { locale: \"fr\" }) //=> '2017 avr. 22'\n * @example DateTime.now().toFormat(\"HH 'hours and' mm 'minutes'\") //=> '20 hours and 55 minutes'\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.\n * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation\n * of the DateTime in the assigned locale.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toLocaleString(); //=> 4/20/2017\n * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022'\n * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'\n * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'\n * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'\n * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'\n * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'\n * @return {string}\n */\n toLocaleString(formatOpts = Formats.DATE_SHORT, opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this)\n : INVALID;\n }\n\n /**\n * Returns an array of format \"parts\", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts\n * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.\n * @example DateTime.now().toLocaleParts(); //=> [\n * //=> { type: 'day', value: '25' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'month', value: '05' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'year', value: '1982' }\n * //=> ]\n */\n toLocaleParts(opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this)\n : [];\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=false] - add the time zone format extension\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'years', 'months', 'days', 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0.\n * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'\n * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'\n * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'\n * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'\n * @example DateTime.now().toISO({ precision: 'day' }) //=> '2017-04-22Z'\n * @example DateTime.now().toISO({ precision: 'minute' }) //=> '2017-04-22T20:47Z'\n * @return {string|null}\n */\n toISO({\n format = \"extended\",\n suppressSeconds = false,\n suppressMilliseconds = false,\n includeOffset = true,\n extendedZone = false,\n precision = \"milliseconds\",\n } = {}) {\n if (!this.isValid) {\n return null;\n }\n\n precision = normalizeUnit(precision);\n const ext = format === \"extended\";\n\n let c = toISODate(this, ext, precision);\n if (orderedUnits.indexOf(precision) >= 3) c += \"T\";\n c += toISOTime(\n this,\n ext,\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n extendedZone,\n precision\n );\n return c;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's date component\n * @param {Object} opts - options\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @param {string} [opts.precision='day'] - truncate output to desired precision: 'years', 'months', or 'days'.\n * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'\n * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'\n * @example DateTime.utc(1982, 5, 25).toISODate({ precision: 'month' }) //=> '1982-05'\n * @return {string|null}\n */\n toISODate({ format = \"extended\", precision = \"day\" } = {}) {\n if (!this.isValid) {\n return null;\n }\n return toISODate(this, format === \"extended\", normalizeUnit(precision));\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's week date\n * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'\n * @return {string}\n */\n toISOWeekDate() {\n return toTechFormat(this, \"kkkk-'W'WW-c\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's time component\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=true] - add the time zone format extension\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0.\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34, second: 56 }).toISOTime({ precision: 'minute' }) //=> '07:34Z'\n * @return {string}\n */\n toISOTime({\n suppressMilliseconds = false,\n suppressSeconds = false,\n includeOffset = true,\n includePrefix = false,\n extendedZone = false,\n format = \"extended\",\n precision = \"milliseconds\",\n } = {}) {\n if (!this.isValid) {\n return null;\n }\n\n precision = normalizeUnit(precision);\n let c = includePrefix && orderedUnits.indexOf(precision) >= 3 ? \"T\" : \"\";\n return (\n c +\n toISOTime(\n this,\n format === \"extended\",\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n extendedZone,\n precision\n )\n );\n }\n\n /**\n * Returns an RFC 2822-compatible string representation of this DateTime\n * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'\n * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'\n * @return {string}\n */\n toRFC2822() {\n return toTechFormat(this, \"EEE, dd LLL yyyy HH:mm:ss ZZZ\", false);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.\n * Specifically, the string conforms to RFC 1123.\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'\n * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'\n * @return {string}\n */\n toHTTP() {\n return toTechFormat(this.toUTC(), \"EEE, dd LLL yyyy HH:mm:ss 'GMT'\");\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Date\n * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'\n * @return {string|null}\n */\n toSQLDate() {\n if (!this.isValid) {\n return null;\n }\n return toISODate(this, true);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Time\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc().toSQL() //=> '05:15:16.345'\n * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'\n * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'\n * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'\n * @return {string}\n */\n toSQLTime({ includeOffset = true, includeZone = false, includeOffsetSpace = true } = {}) {\n let fmt = \"HH:mm:ss.SSS\";\n\n if (includeZone || includeOffset) {\n if (includeOffsetSpace) {\n fmt += \" \";\n }\n if (includeZone) {\n fmt += \"z\";\n } else if (includeOffset) {\n fmt += \"ZZ\";\n }\n }\n\n return toTechFormat(this, fmt, true);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'\n * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'\n * @return {string}\n */\n toSQL(opts = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return `${this.toSQLDate()} ${this.toSQLTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for debugging\n * @return {string}\n */\n toString() {\n return this.isValid ? this.toISO() : INVALID;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`;\n } else {\n return `DateTime { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime.\n * @return {number}\n */\n toMillis() {\n return this.isValid ? this.ts : NaN;\n }\n\n /**\n * Returns the epoch seconds (including milliseconds in the fractional part) of this DateTime.\n * @return {number}\n */\n toSeconds() {\n return this.isValid ? this.ts / 1000 : NaN;\n }\n\n /**\n * Returns the epoch seconds (as a whole number) of this DateTime.\n * @return {number}\n */\n toUnixInteger() {\n return this.isValid ? Math.floor(this.ts / 1000) : NaN;\n }\n\n /**\n * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns a BSON serializable equivalent to this DateTime.\n * @return {Date}\n */\n toBSON() {\n return this.toJSDate();\n }\n\n /**\n * Returns a JavaScript object with this DateTime's year, month, day, and so on.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }\n * @return {Object}\n */\n toObject(opts = {}) {\n if (!this.isValid) return {};\n\n const base = { ...this.c };\n\n if (opts.includeConfig) {\n base.outputCalendar = this.outputCalendar;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n }\n\n /**\n * Returns a JavaScript Date equivalent to this DateTime.\n * @return {Date}\n */\n toJSDate() {\n return new Date(this.isValid ? this.ts : NaN);\n }\n\n // COMPARE\n\n /**\n * Return the difference between two DateTimes as a Duration.\n * @param {DateTime} otherDateTime - the DateTime to compare this one to\n * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example\n * var i1 = DateTime.fromISO('1982-05-25T09:45'),\n * i2 = DateTime.fromISO('1983-10-14T10:30');\n * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\n * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\n * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\n * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n * @return {Duration}\n */\n diff(otherDateTime, unit = \"milliseconds\", opts = {}) {\n if (!this.isValid || !otherDateTime.isValid) {\n return Duration.invalid(\"created by diffing an invalid DateTime\");\n }\n\n const durOpts = { locale: this.locale, numberingSystem: this.numberingSystem, ...opts };\n\n const units = maybeArray(unit).map(Duration.normalizeUnit),\n otherIsLater = otherDateTime.valueOf() > this.valueOf(),\n earlier = otherIsLater ? this : otherDateTime,\n later = otherIsLater ? otherDateTime : this,\n diffed = diff(earlier, later, units, durOpts);\n\n return otherIsLater ? diffed.negate() : diffed;\n }\n\n /**\n * Return the difference between this DateTime and right now.\n * See {@link DateTime#diff}\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n diffNow(unit = \"milliseconds\", opts = {}) {\n return this.diff(DateTime.now(), unit, opts);\n }\n\n /**\n * Return an Interval spanning between this DateTime and another DateTime\n * @param {DateTime} otherDateTime - the other end point of the Interval\n * @return {Interval|DateTime}\n */\n until(otherDateTime) {\n return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this;\n }\n\n /**\n * Return whether this DateTime is in the same unit of time as another DateTime.\n * Higher-order units must also be identical for this function to return `true`.\n * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.\n * @param {DateTime} otherDateTime - the other DateTime\n * @param {string} unit - the unit of time to check sameness on\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used\n * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day\n * @return {boolean}\n */\n hasSame(otherDateTime, unit, opts) {\n if (!this.isValid) return false;\n\n const inputMs = otherDateTime.valueOf();\n const adjustedToZone = this.setZone(otherDateTime.zone, { keepLocalTime: true });\n return (\n adjustedToZone.startOf(unit, opts) <= inputMs && inputMs <= adjustedToZone.endOf(unit, opts)\n );\n }\n\n /**\n * Equality check\n * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid.\n * To compare just the millisecond values, use `+dt1 === +dt2`.\n * @param {DateTime} other - the other DateTime\n * @return {boolean}\n */\n equals(other) {\n return (\n this.isValid &&\n other.isValid &&\n this.valueOf() === other.valueOf() &&\n this.zone.equals(other.zone) &&\n this.loc.equals(other.loc)\n );\n }\n\n /**\n * Returns a string representation of a this time relative to now, such as \"in two days\". Can only internationalize if your\n * platform supports Intl.RelativeTimeFormat. Rounds towards zero by default.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} [options.style=\"long\"] - the style of units, must be \"long\", \"short\", or \"narrow\"\n * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", or \"seconds\"\n * @param {boolean} [options.round=true] - whether to round the numbers in the output.\n * @param {string} [options.rounding=\"trunc\"] - rounding method to use when rounding the numbers in the output. Can be \"trunc\" (toward zero), \"expand\" (away from zero), \"round\", \"floor\", or \"ceil\".\n * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelative() //=> \"in 1 day\"\n * @example DateTime.now().setLocale(\"es\").toRelative({ days: 1 }) //=> \"dentro de 1 día\"\n * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: \"fr\" }) //=> \"dans 23 heures\"\n * @example DateTime.now().minus({ days: 2 }).toRelative() //=> \"2 days ago\"\n * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: \"hours\" }) //=> \"48 hours ago\"\n * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> \"1.5 days ago\"\n */\n toRelative(options = {}) {\n if (!this.isValid) return null;\n const base = options.base || DateTime.fromObject({}, { zone: this.zone }),\n padding = options.padding ? (this < base ? -options.padding : options.padding) : 0;\n let units = [\"years\", \"months\", \"days\", \"hours\", \"minutes\", \"seconds\"];\n let unit = options.unit;\n if (Array.isArray(options.unit)) {\n units = options.unit;\n unit = undefined;\n }\n return diffRelative(base, this.plus(padding), {\n ...options,\n numeric: \"always\",\n units,\n unit,\n });\n }\n\n /**\n * Returns a string representation of this date relative to today, such as \"yesterday\" or \"next month\".\n * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", or \"days\"\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> \"tomorrow\"\n * @example DateTime.now().setLocale(\"es\").plus({ days: 1 }).toRelative() //=> \"\"mañana\"\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: \"fr\" }) //=> \"demain\"\n * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> \"2 days ago\"\n */\n toRelativeCalendar(options = {}) {\n if (!this.isValid) return null;\n\n return diffRelative(options.base || DateTime.fromObject({}, { zone: this.zone }), this, {\n ...options,\n numeric: \"auto\",\n units: [\"years\", \"months\", \"days\"],\n calendary: true,\n });\n }\n\n /**\n * Return the min of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum\n * @return {DateTime} the min DateTime, or undefined if called with no argument\n */\n static min(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"min requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, (i) => i.valueOf(), Math.min);\n }\n\n /**\n * Return the max of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum\n * @return {DateTime} the max DateTime, or undefined if called with no argument\n */\n static max(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"max requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, (i) => i.valueOf(), Math.max);\n }\n\n // MISC\n\n /**\n * Explain how a string would be parsed by fromFormat()\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see description)\n * @param {Object} options - options taken by fromFormat()\n * @return {Object}\n */\n static fromFormatExplain(text, fmt, options = {}) {\n const { locale = null, numberingSystem = null } = options,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n });\n return explainFromTokens(localeToUse, text, fmt);\n }\n\n /**\n * @deprecated use fromFormatExplain instead\n */\n static fromStringExplain(text, fmt, options = {}) {\n return DateTime.fromFormatExplain(text, fmt, options);\n }\n\n /**\n * Build a parser for `fmt` using the given locale. This parser can be passed\n * to {@link DateTime.fromFormatParser} to a parse a date in this format. This\n * can be used to optimize cases where many dates need to be parsed in a\n * specific format.\n *\n * @param {String} fmt - the format the string is expected to be in (see\n * description)\n * @param {Object} options - options used to set locale and numberingSystem\n * for parser\n * @returns {TokenParser} - opaque object to be used\n */\n static buildFormatParser(fmt, options = {}) {\n const { locale = null, numberingSystem = null } = options,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n });\n return new TokenParser(localeToUse, fmt);\n }\n\n /**\n * Create a DateTime from an input string and format parser.\n *\n * The format parser must have been created with the same locale as this call.\n *\n * @param {String} text - the string to parse\n * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser}\n * @param {Object} opts - options taken by fromFormat()\n * @returns {DateTime}\n */\n static fromFormatParser(text, formatParser, opts = {}) {\n if (isUndefined(text) || isUndefined(formatParser)) {\n throw new InvalidArgumentError(\n \"fromFormatParser requires an input string and a format parser\"\n );\n }\n const { locale = null, numberingSystem = null } = opts,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n });\n\n if (!localeToUse.equals(formatParser.locale)) {\n throw new InvalidArgumentError(\n `fromFormatParser called with a locale of ${localeToUse}, ` +\n `but the format parser was created for ${formatParser.locale}`\n );\n }\n\n const { result, zone, specificOffset, invalidReason } = formatParser.explainFromTokens(text);\n\n if (invalidReason) {\n return DateTime.invalid(invalidReason);\n } else {\n return parseDataToDateTime(\n result,\n zone,\n opts,\n `format ${formatParser.format}`,\n text,\n specificOffset\n );\n }\n }\n\n // FORMAT PRESETS\n\n /**\n * {@link DateTime#toLocaleString} format like 10/14/1983\n * @type {Object}\n */\n static get DATE_SHORT() {\n return Formats.DATE_SHORT;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED() {\n return Formats.DATE_MED;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED_WITH_WEEKDAY() {\n return Formats.DATE_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983'\n * @type {Object}\n */\n static get DATE_FULL() {\n return Formats.DATE_FULL;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'\n * @type {Object}\n */\n static get DATE_HUGE() {\n return Formats.DATE_HUGE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_SIMPLE() {\n return Formats.TIME_SIMPLE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SECONDS() {\n return Formats.TIME_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SHORT_OFFSET() {\n return Formats.TIME_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_LONG_OFFSET() {\n return Formats.TIME_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_SIMPLE() {\n return Formats.TIME_24_SIMPLE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SECONDS() {\n return Formats.TIME_24_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SHORT_OFFSET() {\n return Formats.TIME_24_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_LONG_OFFSET() {\n return Formats.TIME_24_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT() {\n return Formats.DATETIME_SHORT;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT_WITH_SECONDS() {\n return Formats.DATETIME_SHORT_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED() {\n return Formats.DATETIME_MED;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_SECONDS() {\n return Formats.DATETIME_MED_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_WEEKDAY() {\n return Formats.DATETIME_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL() {\n return Formats.DATETIME_FULL;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL_WITH_SECONDS() {\n return Formats.DATETIME_FULL_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE() {\n return Formats.DATETIME_HUGE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE_WITH_SECONDS() {\n return Formats.DATETIME_HUGE_WITH_SECONDS;\n }\n}\n\n/**\n * @private\n */\nexport function friendlyDateTime(dateTimeish) {\n if (DateTime.isDateTime(dateTimeish)) {\n return dateTimeish;\n } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {\n return DateTime.fromJSDate(dateTimeish);\n } else if (dateTimeish && typeof dateTimeish === \"object\") {\n return DateTime.fromObject(dateTimeish);\n } else {\n throw new InvalidArgumentError(\n `Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`\n );\n }\n}\n", "import DateTime from \"./datetime.js\";\nimport Duration from \"./duration.js\";\nimport Interval from \"./interval.js\";\nimport Info from \"./info.js\";\nimport Zone from \"./zone.js\";\nimport FixedOffsetZone from \"./zones/fixedOffsetZone.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport InvalidZone from \"./zones/invalidZone.js\";\nimport SystemZone from \"./zones/systemZone.js\";\nimport Settings from \"./settings.js\";\n\nconst VERSION = \"3.7.2\";\n\nexport {\n VERSION,\n DateTime,\n Duration,\n Interval,\n Info,\n Zone,\n FixedOffsetZone,\n IANAZone,\n InvalidZone,\n SystemZone,\n Settings,\n};\n", "'use strict';\n\nvar luxon = require('luxon');\n\nCronDate.prototype.addYear = function() {\n this._date = this._date.plus({ years: 1 });\n};\n\nCronDate.prototype.addMonth = function() {\n this._date = this._date.plus({ months: 1 }).startOf('month');\n};\n\nCronDate.prototype.addDay = function() {\n this._date = this._date.plus({ days: 1 }).startOf('day');\n};\n\nCronDate.prototype.addHour = function() {\n var prev = this._date;\n this._date = this._date.plus({ hours: 1 }).startOf('hour');\n if (this._date <= prev) {\n this._date = this._date.plus({ hours: 1 });\n }\n};\n\nCronDate.prototype.addMinute = function() {\n var prev = this._date;\n this._date = this._date.plus({ minutes: 1 }).startOf('minute');\n if (this._date < prev) {\n this._date = this._date.plus({ hours: 1 });\n }\n};\n\nCronDate.prototype.addSecond = function() {\n var prev = this._date;\n this._date = this._date.plus({ seconds: 1 }).startOf('second');\n if (this._date < prev) {\n this._date = this._date.plus({ hours: 1 });\n }\n};\n\nCronDate.prototype.subtractYear = function() {\n this._date = this._date.minus({ years: 1 });\n};\n\nCronDate.prototype.subtractMonth = function() {\n this._date = this._date\n .minus({ months: 1 })\n .endOf('month')\n .startOf('second');\n};\n\nCronDate.prototype.subtractDay = function() {\n this._date = this._date\n .minus({ days: 1 })\n .endOf('day')\n .startOf('second');\n};\n\nCronDate.prototype.subtractHour = function() {\n var prev = this._date;\n this._date = this._date\n .minus({ hours: 1 })\n .endOf('hour')\n .startOf('second');\n if (this._date >= prev) {\n this._date = this._date.minus({ hours: 1 });\n }\n};\n\nCronDate.prototype.subtractMinute = function() {\n var prev = this._date;\n this._date = this._date.minus({ minutes: 1 })\n .endOf('minute')\n .startOf('second');\n if (this._date > prev) {\n this._date = this._date.minus({ hours: 1 });\n }\n};\n\nCronDate.prototype.subtractSecond = function() {\n var prev = this._date;\n this._date = this._date\n .minus({ seconds: 1 })\n .startOf('second');\n if (this._date > prev) {\n this._date = this._date.minus({ hours: 1 });\n }\n};\n\nCronDate.prototype.getDate = function() {\n return this._date.day;\n};\n\nCronDate.prototype.getFullYear = function() {\n return this._date.year;\n};\n\nCronDate.prototype.getDay = function() {\n var weekday = this._date.weekday;\n return weekday == 7 ? 0 : weekday;\n};\n\nCronDate.prototype.getMonth = function() {\n return this._date.month - 1;\n};\n\nCronDate.prototype.getHours = function() {\n return this._date.hour;\n};\n\nCronDate.prototype.getMinutes = function() {\n return this._date.minute;\n};\n\nCronDate.prototype.getSeconds = function() {\n return this._date.second;\n};\n\nCronDate.prototype.getMilliseconds = function() {\n return this._date.millisecond;\n};\n\nCronDate.prototype.getTime = function() {\n return this._date.valueOf();\n};\n\nCronDate.prototype.getUTCDate = function() {\n return this._getUTC().day;\n};\n\nCronDate.prototype.getUTCFullYear = function() {\n return this._getUTC().year;\n};\n\nCronDate.prototype.getUTCDay = function() {\n var weekday = this._getUTC().weekday;\n return weekday == 7 ? 0 : weekday;\n};\n\nCronDate.prototype.getUTCMonth = function() {\n return this._getUTC().month - 1;\n};\n\nCronDate.prototype.getUTCHours = function() {\n return this._getUTC().hour;\n};\n\nCronDate.prototype.getUTCMinutes = function() {\n return this._getUTC().minute;\n};\n\nCronDate.prototype.getUTCSeconds = function() {\n return this._getUTC().second;\n};\n\nCronDate.prototype.toISOString = function() {\n return this._date.toUTC().toISO();\n};\n\nCronDate.prototype.toJSON = function() {\n return this._date.toJSON();\n};\n\nCronDate.prototype.setDate = function(d) {\n this._date = this._date.set({ day: d });\n};\n\nCronDate.prototype.setFullYear = function(y) {\n this._date = this._date.set({ year: y });\n};\n\nCronDate.prototype.setDay = function(d) {\n this._date = this._date.set({ weekday: d });\n};\n\nCronDate.prototype.setMonth = function(m) {\n this._date = this._date.set({ month: m + 1 });\n};\n\nCronDate.prototype.setHours = function(h) {\n this._date = this._date.set({ hour: h });\n};\n\nCronDate.prototype.setMinutes = function(m) {\n this._date = this._date.set({ minute: m });\n};\n\nCronDate.prototype.setSeconds = function(s) {\n this._date = this._date.set({ second: s });\n};\n\nCronDate.prototype.setMilliseconds = function(s) {\n this._date = this._date.set({ millisecond: s });\n};\n\nCronDate.prototype._getUTC = function() {\n return this._date.toUTC();\n};\n\nCronDate.prototype.toString = function() {\n return this.toDate().toString();\n};\n\nCronDate.prototype.toDate = function() {\n return this._date.toJSDate();\n};\n\nCronDate.prototype.isLastDayOfMonth = function() {\n //next day\n var newDate = this._date.plus({ days: 1 }).startOf('day');\n return this._date.month !== newDate.month;\n};\n\n/**\n * Returns true when the current weekday is the last occurrence of this weekday\n * for the present month.\n */\nCronDate.prototype.isLastWeekdayOfMonth = function() {\n // Check this by adding 7 days to the current date and seeing if it's\n // a different month\n var newDate = this._date.plus({ days: 7 }).startOf('day');\n return this._date.month !== newDate.month;\n};\n\nfunction CronDate (timestamp, tz) {\n var dateOpts = { zone: tz };\n if (!timestamp) {\n this._date = luxon.DateTime.local();\n } else if (timestamp instanceof CronDate) {\n this._date = timestamp._date;\n } else if (timestamp instanceof Date) {\n this._date = luxon.DateTime.fromJSDate(timestamp, dateOpts);\n } else if (typeof timestamp === 'number') {\n this._date = luxon.DateTime.fromMillis(timestamp, dateOpts);\n } else if (typeof timestamp === 'string') {\n this._date = luxon.DateTime.fromISO(timestamp, dateOpts);\n this._date.isValid || (this._date = luxon.DateTime.fromRFC2822(timestamp, dateOpts));\n this._date.isValid || (this._date = luxon.DateTime.fromSQL(timestamp, dateOpts));\n // RFC2822-like format without the required timezone offset (used in tests)\n this._date.isValid || (this._date = luxon.DateTime.fromFormat(timestamp, 'EEE, d MMM yyyy HH:mm:ss', dateOpts));\n }\n\n if (!this._date || !this._date.isValid) {\n throw new Error('CronDate: unhandled timestamp: ' + JSON.stringify(timestamp));\n }\n \n if (tz && tz !== this._date.zoneName) {\n this._date = this._date.setZone(tz);\n }\n}\n\nmodule.exports = CronDate;\n", "'use strict';\n\nfunction buildRange(item) {\n return {\n start: item,\n count: 1\n };\n}\n\nfunction completeRangeWithItem(range, item) {\n range.end = item;\n range.step = item - range.start;\n range.count = 2;\n}\n\nfunction finalizeCurrentRange(results, currentRange, currentItemRange) {\n if (currentRange) {\n // Two elements do not form a range so split them into 2 single elements\n if (currentRange.count === 2) {\n results.push(buildRange(currentRange.start));\n results.push(buildRange(currentRange.end));\n } else {\n results.push(currentRange);\n }\n }\n if (currentItemRange) {\n results.push(currentItemRange);\n }\n}\n\nfunction compactField(arr) {\n var results = [];\n var currentRange = undefined;\n\n for (var i = 0; i < arr.length; i++) {\n var currentItem = arr[i];\n if (typeof currentItem !== 'number') {\n // String elements can't form a range\n finalizeCurrentRange(results, currentRange, buildRange(currentItem));\n currentRange = undefined;\n } else if (!currentRange) {\n // Start a new range\n currentRange = buildRange(currentItem);\n } else if (currentRange.count === 1) {\n // Guess that the current item starts a range\n completeRangeWithItem(currentRange, currentItem);\n } else {\n if (currentRange.step === currentItem - currentRange.end) {\n // We found another item that matches the current range\n currentRange.count++;\n currentRange.end = currentItem;\n } else if (currentRange.count === 2) { // The current range can't be continued\n // Break the first item of the current range into a single element, and try to start a new range with the second item\n results.push(buildRange(currentRange.start));\n currentRange = buildRange(currentRange.end);\n completeRangeWithItem(currentRange, currentItem);\n } else {\n // Persist the current range and start a new one with current item\n finalizeCurrentRange(results, currentRange);\n currentRange = buildRange(currentItem);\n }\n }\n }\n\n finalizeCurrentRange(results, currentRange);\n\n return results;\n}\n\nmodule.exports = compactField;\n", "'use strict';\n\nvar compactField = require('./field_compactor');\n\nfunction stringifyField(arr, min, max) {\n var ranges = compactField(arr);\n if (ranges.length === 1) {\n var singleRange = ranges[0];\n var step = singleRange.step;\n if (step === 1 && singleRange.start === min && singleRange.end === max) {\n return '*';\n }\n if (step !== 1 && singleRange.start === min && singleRange.end === max - step + 1) {\n return '*/' + step;\n }\n }\n\n var result = [];\n for (var i = 0, l = ranges.length; i < l; ++i) {\n var range = ranges[i];\n if (range.count === 1) {\n result.push(range.start);\n continue;\n }\n\n var step = range.step;\n if (range.step === 1) {\n result.push(range.start + '-' + range.end);\n continue;\n }\n\n var multiplier = range.start == 0 ? range.count - 1 : range.count;\n if (range.step * multiplier > range.end) {\n result = result.concat(\n Array\n .from({ length: range.end - range.start + 1 })\n .map(function (_, index) {\n var value = range.start + index;\n if ((value - range.start) % range.step === 0) {\n return value;\n }\n return null;\n })\n .filter(function (value) {\n return value != null;\n })\n );\n } else if (range.end === max - range.step + 1) {\n result.push(range.start + '/' + range.step);\n } else {\n result.push(range.start + '-' + range.end + '/' + range.step);\n }\n }\n\n return result.join(',');\n}\n\nmodule.exports = stringifyField;\n", "'use strict';\n\n// Load Date class extensions\nvar CronDate = require('./date');\n\nvar stringifyField = require('./field_stringify');\n\n/**\n * Cron iteration loop safety limit\n */\nvar LOOP_LIMIT = 10000;\n\n/**\n * Construct a new expression parser\n *\n * Options:\n * currentDate: iterator start date\n * endDate: iterator end date\n *\n * @constructor\n * @private\n * @param {Object} fields Expression fields parsed values\n * @param {Object} options Parser options\n */\nfunction CronExpression (fields, options) {\n this._options = options;\n this._utc = options.utc || false;\n this._tz = this._utc ? 'UTC' : options.tz;\n this._currentDate = new CronDate(options.currentDate, this._tz);\n this._startDate = options.startDate ? new CronDate(options.startDate, this._tz) : null;\n this._endDate = options.endDate ? new CronDate(options.endDate, this._tz) : null;\n this._isIterator = options.iterator || false;\n this._hasIterated = false;\n this._nthDayOfWeek = options.nthDayOfWeek || 0;\n this.fields = CronExpression._freezeFields(fields);\n}\n\n/**\n * Field mappings\n * @type {Array}\n */\nCronExpression.map = [ 'second', 'minute', 'hour', 'dayOfMonth', 'month', 'dayOfWeek' ];\n\n/**\n * Prefined intervals\n * @type {Object}\n */\nCronExpression.predefined = {\n '@yearly': '0 0 1 1 *',\n '@monthly': '0 0 1 * *',\n '@weekly': '0 0 * * 0',\n '@daily': '0 0 * * *',\n '@hourly': '0 * * * *'\n};\n\n/**\n * Fields constraints\n * @type {Array}\n */\nCronExpression.constraints = [\n { min: 0, max: 59, chars: [] }, // Second\n { min: 0, max: 59, chars: [] }, // Minute\n { min: 0, max: 23, chars: [] }, // Hour\n { min: 1, max: 31, chars: ['L'] }, // Day of month\n { min: 1, max: 12, chars: [] }, // Month\n { min: 0, max: 7, chars: ['L'] }, // Day of week\n];\n\n/**\n * Days in month\n * @type {number[]}\n */\nCronExpression.daysInMonth = [\n 31,\n 29,\n 31,\n 30,\n 31,\n 30,\n 31,\n 31,\n 30,\n 31,\n 30,\n 31\n];\n\n/**\n * Field aliases\n * @type {Object}\n */\nCronExpression.aliases = {\n month: {\n jan: 1,\n feb: 2,\n mar: 3,\n apr: 4,\n may: 5,\n jun: 6,\n jul: 7,\n aug: 8,\n sep: 9,\n oct: 10,\n nov: 11,\n dec: 12\n },\n\n dayOfWeek: {\n sun: 0,\n mon: 1,\n tue: 2,\n wed: 3,\n thu: 4,\n fri: 5,\n sat: 6\n }\n};\n\n/**\n * Field defaults\n * @type {Array}\n */\nCronExpression.parseDefaults = [ '0', '*', '*', '*', '*', '*' ];\n\nCronExpression.standardValidCharacters = /^[,*\\d/-]+$/;\nCronExpression.dayOfWeekValidCharacters = /^[?,*\\dL#/-]+$/;\nCronExpression.dayOfMonthValidCharacters = /^[?,*\\dL/-]+$/;\nCronExpression.validCharacters = {\n second: CronExpression.standardValidCharacters,\n minute: CronExpression.standardValidCharacters,\n hour: CronExpression.standardValidCharacters,\n dayOfMonth: CronExpression.dayOfMonthValidCharacters,\n month: CronExpression.standardValidCharacters,\n dayOfWeek: CronExpression.dayOfWeekValidCharacters,\n};\n\nCronExpression._isValidConstraintChar = function _isValidConstraintChar(constraints, value) {\n if (typeof value !== 'string') {\n return false;\n }\n\n return constraints.chars.some(function(char) {\n return value.indexOf(char) > -1;\n });\n};\n\n/**\n * Parse input interval\n *\n * @param {String} field Field symbolic name\n * @param {String} value Field value\n * @param {Array} constraints Range upper and lower constraints\n * @return {Array} Sequence of sorted values\n * @private\n */\nCronExpression._parseField = function _parseField (field, value, constraints) {\n // Replace aliases\n switch (field) {\n case 'month':\n case 'dayOfWeek':\n var aliases = CronExpression.aliases[field];\n\n value = value.replace(/[a-z]{3}/gi, function(match) {\n match = match.toLowerCase();\n\n if (typeof aliases[match] !== 'undefined') {\n return aliases[match];\n } else {\n throw new Error('Validation error, cannot resolve alias \"' + match + '\"');\n }\n });\n break;\n }\n\n // Check for valid characters.\n if (!(CronExpression.validCharacters[field].test(value))) {\n throw new Error('Invalid characters, got value: ' + value);\n }\n\n // Replace '*' and '?'\n if (value.indexOf('*') !== -1) {\n value = value.replace(/\\*/g, constraints.min + '-' + constraints.max);\n } else if (value.indexOf('?') !== -1) {\n value = value.replace(/\\?/g, constraints.min + '-' + constraints.max);\n }\n\n //\n // Inline parsing functions\n //\n // Parser path:\n // - parseSequence\n // - parseRepeat\n // - parseRange\n\n /**\n * Parse sequence\n *\n * @param {String} val\n * @return {Array}\n * @private\n */\n function parseSequence (val) {\n var stack = [];\n\n function handleResult (result) {\n if (result instanceof Array) { // Make sequence linear\n for (var i = 0, c = result.length; i < c; i++) {\n var value = result[i];\n\n if (CronExpression._isValidConstraintChar(constraints, value)) {\n stack.push(value);\n continue;\n }\n // Check constraints\n if (typeof value !== 'number' || Number.isNaN(value) || value < constraints.min || value > constraints.max) {\n throw new Error(\n 'Constraint error, got value ' + value + ' expected range ' +\n constraints.min + '-' + constraints.max\n );\n }\n\n stack.push(value);\n }\n } else { // Scalar value\n\n if (CronExpression._isValidConstraintChar(constraints, result)) {\n stack.push(result);\n return;\n }\n\n var numResult = +result;\n\n // Check constraints\n if (Number.isNaN(numResult) || numResult < constraints.min || numResult > constraints.max) {\n throw new Error(\n 'Constraint error, got value ' + result + ' expected range ' +\n constraints.min + '-' + constraints.max\n );\n }\n\n if (field === 'dayOfWeek') {\n numResult = numResult % 7;\n }\n\n stack.push(numResult);\n }\n }\n\n var atoms = val.split(',');\n if (!atoms.every(function (atom) {\n return atom.length > 0;\n })) {\n throw new Error('Invalid list value format');\n }\n\n if (atoms.length > 1) {\n for (var i = 0, c = atoms.length; i < c; i++) {\n handleResult(parseRepeat(atoms[i]));\n }\n } else {\n handleResult(parseRepeat(val));\n }\n\n stack.sort(CronExpression._sortCompareFn);\n\n return stack;\n }\n\n /**\n * Parse repetition interval\n *\n * @param {String} val\n * @return {Array}\n */\n function parseRepeat (val) {\n var repeatInterval = 1;\n var atoms = val.split('/');\n\n if (atoms.length > 2) {\n throw new Error('Invalid repeat: ' + val);\n }\n\n if (atoms.length > 1) {\n if (atoms[0] == +atoms[0]) {\n atoms = [atoms[0] + '-' + constraints.max, atoms[1]];\n }\n return parseRange(atoms[0], atoms[atoms.length - 1]);\n }\n\n return parseRange(val, repeatInterval);\n }\n\n /**\n * Parse range\n *\n * @param {String} val\n * @param {Number} repeatInterval Repetition interval\n * @return {Array}\n * @private\n */\n function parseRange (val, repeatInterval) {\n var stack = [];\n var atoms = val.split('-');\n\n if (atoms.length > 1 ) {\n // Invalid range, return value\n if (atoms.length < 2) {\n return +val;\n }\n\n if (!atoms[0].length) {\n if (!atoms[1].length) {\n throw new Error('Invalid range: ' + val);\n }\n\n return +val;\n }\n\n // Validate range\n var min = +atoms[0];\n var max = +atoms[1];\n\n if (Number.isNaN(min) || Number.isNaN(max) ||\n min < constraints.min || max > constraints.max) {\n throw new Error(\n 'Constraint error, got range ' +\n min + '-' + max +\n ' expected range ' +\n constraints.min + '-' + constraints.max\n );\n } else if (min > max) {\n throw new Error('Invalid range: ' + val);\n }\n\n // Create range\n var repeatIndex = +repeatInterval;\n\n if (Number.isNaN(repeatIndex) || repeatIndex <= 0) {\n throw new Error('Constraint error, cannot repeat at every ' + repeatIndex + ' time.');\n }\n\n // JS DOW is in range of 0-6 (SUN-SAT) but we also support 7 in the expression\n // Handle case when range contains 7 instead of 0 and translate this value to 0\n if (field === 'dayOfWeek' && max % 7 === 0) {\n stack.push(0);\n }\n\n for (var index = min, count = max; index <= count; index++) {\n var exists = stack.indexOf(index) !== -1;\n if (!exists && repeatIndex > 0 && (repeatIndex % repeatInterval) === 0) {\n repeatIndex = 1;\n stack.push(index);\n } else {\n repeatIndex++;\n }\n }\n return stack;\n }\n\n return Number.isNaN(+val) ? val : +val;\n }\n\n return parseSequence(value);\n};\n\nCronExpression._sortCompareFn = function(a, b) {\n var aIsNumber = typeof a === 'number';\n var bIsNumber = typeof b === 'number';\n\n if (aIsNumber && bIsNumber) {\n return a - b;\n }\n\n if (!aIsNumber && bIsNumber) {\n return 1;\n }\n\n if (aIsNumber && !bIsNumber) {\n return -1;\n }\n\n return a.localeCompare(b);\n};\n\nCronExpression._handleMaxDaysInMonth = function(mappedFields) {\n // Filter out any day of month value that is larger than given month expects\n if (mappedFields.month.length === 1) {\n var daysInMonth = CronExpression.daysInMonth[mappedFields.month[0] - 1];\n\n if (mappedFields.dayOfMonth[0] > daysInMonth) {\n throw new Error('Invalid explicit day of month definition');\n }\n\n return mappedFields.dayOfMonth\n .filter(function(dayOfMonth) {\n return dayOfMonth === 'L' ? true : dayOfMonth <= daysInMonth;\n })\n .sort(CronExpression._sortCompareFn);\n }\n};\n\nCronExpression._freezeFields = function(fields) {\n for (var i = 0, c = CronExpression.map.length; i < c; ++i) {\n var field = CronExpression.map[i]; // Field name\n var value = fields[field];\n fields[field] = Object.freeze(value);\n }\n return Object.freeze(fields);\n};\n\nCronExpression.prototype._applyTimezoneShift = function(currentDate, dateMathVerb, method) {\n if ((method === 'Month') || (method === 'Day')) {\n var prevTime = currentDate.getTime();\n currentDate[dateMathVerb + method]();\n var currTime = currentDate.getTime();\n if (prevTime === currTime) {\n // Jumped into a not existent date due to a DST transition\n if ((currentDate.getMinutes() === 0) &&\n (currentDate.getSeconds() === 0)) {\n currentDate.addHour();\n } else if ((currentDate.getMinutes() === 59) &&\n (currentDate.getSeconds() === 59)) {\n currentDate.subtractHour();\n }\n }\n } else {\n var previousHour = currentDate.getHours();\n currentDate[dateMathVerb + method]();\n var currentHour = currentDate.getHours();\n var diff = currentHour - previousHour;\n if (diff === 2) {\n // Starting DST\n if (this.fields.hour.length !== 24) {\n // Hour is specified\n this._dstStart = currentHour;\n }\n } else if ((diff === 0) &&\n (currentDate.getMinutes() === 0) &&\n (currentDate.getSeconds() === 0)) {\n // Ending DST\n if (this.fields.hour.length !== 24) {\n // Hour is specified\n this._dstEnd = currentHour;\n }\n }\n }\n};\n\n\n/**\n * Find next or previous matching schedule date\n *\n * @return {CronDate}\n * @private\n */\nCronExpression.prototype._findSchedule = function _findSchedule (reverse) {\n\n /**\n * Match field value\n *\n * @param {String} value\n * @param {Array} sequence\n * @return {Boolean}\n * @private\n */\n function matchSchedule (value, sequence) {\n for (var i = 0, c = sequence.length; i < c; i++) {\n if (sequence[i] >= value) {\n return sequence[i] === value;\n }\n }\n\n return sequence[0] === value;\n }\n\n /**\n * Helps determine if the provided date is the correct nth occurence of the\n * desired day of week.\n *\n * @param {CronDate} date\n * @param {Number} nthDayOfWeek\n * @return {Boolean}\n * @private\n */\n function isNthDayMatch(date, nthDayOfWeek) {\n if (nthDayOfWeek < 6) {\n if (\n date.getDate() < 8 &&\n nthDayOfWeek === 1 // First occurence has to happen in first 7 days of the month\n ) {\n return true;\n }\n\n var offset = date.getDate() % 7 ? 1 : 0; // Math is off by 1 when dayOfWeek isn't divisible by 7\n var adjustedDate = date.getDate() - (date.getDate() % 7); // find the first occurance\n var occurrence = Math.floor(adjustedDate / 7) + offset;\n\n return occurrence === nthDayOfWeek;\n }\n\n return false;\n }\n\n /**\n * Helper function that checks if 'L' is in the array\n *\n * @param {Array} expressions\n */\n function isLInExpressions(expressions) {\n return expressions.length > 0 && expressions.some(function(expression) {\n return typeof expression === 'string' && expression.indexOf('L') >= 0;\n });\n }\n\n\n // Whether to use backwards directionality when searching\n reverse = reverse || false;\n var dateMathVerb = reverse ? 'subtract' : 'add';\n\n var currentDate = new CronDate(this._currentDate, this._tz);\n var startDate = this._startDate;\n var endDate = this._endDate;\n\n // Find matching schedule\n var startTimestamp = currentDate.getTime();\n var stepCount = 0;\n\n function isLastWeekdayOfMonthMatch(expressions) {\n return expressions.some(function(expression) {\n // There might be multiple expressions and not all of them will contain\n // the \"L\".\n if (!isLInExpressions([expression])) {\n return false;\n }\n\n // The first character represents the weekday\n var weekday = Number.parseInt(expression[0]) % 7;\n\n if (Number.isNaN(weekday)) {\n throw new Error('Invalid last weekday of the month expression: ' + expression);\n }\n\n return currentDate.getDay() === weekday && currentDate.isLastWeekdayOfMonth();\n });\n }\n\n while (stepCount < LOOP_LIMIT) {\n stepCount++;\n\n // Validate timespan\n if (reverse) {\n if (startDate && (currentDate.getTime() - startDate.getTime() < 0)) {\n throw new Error('Out of the timespan range');\n }\n } else {\n if (endDate && (endDate.getTime() - currentDate.getTime()) < 0) {\n throw new Error('Out of the timespan range');\n }\n }\n\n // Day of month and week matching:\n //\n // \"The day of a command's execution can be specified by two fields --\n // day of month, and day of week. If both\t fields\t are restricted (ie,\n // aren't *), the command will be run when either field matches the cur-\n // rent time. For example, \"30 4 1,15 * 5\" would cause a command to be\n // run at 4:30 am on the 1st and 15th of each month, plus every Friday.\"\n //\n // http://unixhelp.ed.ac.uk/CGI/man-cgi?crontab+5\n //\n\n var dayOfMonthMatch = matchSchedule(currentDate.getDate(), this.fields.dayOfMonth);\n if (isLInExpressions(this.fields.dayOfMonth)) {\n dayOfMonthMatch = dayOfMonthMatch || currentDate.isLastDayOfMonth();\n }\n var dayOfWeekMatch = matchSchedule(currentDate.getDay(), this.fields.dayOfWeek);\n if (isLInExpressions(this.fields.dayOfWeek)) {\n dayOfWeekMatch = dayOfWeekMatch || isLastWeekdayOfMonthMatch(this.fields.dayOfWeek);\n }\n var isDayOfMonthWildcardMatch = this.fields.dayOfMonth.length >= CronExpression.daysInMonth[currentDate.getMonth()];\n var isDayOfWeekWildcardMatch = this.fields.dayOfWeek.length === CronExpression.constraints[5].max - CronExpression.constraints[5].min + 1;\n var currentHour = currentDate.getHours();\n\n // Add or subtract day if select day not match with month (according to calendar)\n if (!dayOfMonthMatch && (!dayOfWeekMatch || isDayOfWeekWildcardMatch)) {\n this._applyTimezoneShift(currentDate, dateMathVerb, 'Day');\n continue;\n }\n\n // Add or subtract day if not day of month is set (and no match) and day of week is wildcard\n if (!isDayOfMonthWildcardMatch && isDayOfWeekWildcardMatch && !dayOfMonthMatch) {\n this._applyTimezoneShift(currentDate, dateMathVerb, 'Day');\n continue;\n }\n\n // Add or subtract day if not day of week is set (and no match) and day of month is wildcard\n if (isDayOfMonthWildcardMatch && !isDayOfWeekWildcardMatch && !dayOfWeekMatch) {\n this._applyTimezoneShift(currentDate, dateMathVerb, 'Day');\n continue;\n }\n\n // Add or subtract day if day of week & nthDayOfWeek are set (and no match)\n if (\n this._nthDayOfWeek > 0 &&\n !isNthDayMatch(currentDate, this._nthDayOfWeek)\n ) {\n this._applyTimezoneShift(currentDate, dateMathVerb, 'Day');\n continue;\n }\n\n // Match month\n if (!matchSchedule(currentDate.getMonth() + 1, this.fields.month)) {\n this._applyTimezoneShift(currentDate, dateMathVerb, 'Month');\n continue;\n }\n\n // Match hour\n if (!matchSchedule(currentHour, this.fields.hour)) {\n if (this._dstStart !== currentHour) {\n this._dstStart = null;\n this._applyTimezoneShift(currentDate, dateMathVerb, 'Hour');\n continue;\n } else if (!matchSchedule(currentHour - 1, this.fields.hour)) {\n currentDate[dateMathVerb + 'Hour']();\n continue;\n }\n } else if (this._dstEnd === currentHour) {\n if (!reverse) {\n this._dstEnd = null;\n this._applyTimezoneShift(currentDate, 'add', 'Hour');\n continue;\n }\n }\n\n // Match minute\n if (!matchSchedule(currentDate.getMinutes(), this.fields.minute)) {\n this._applyTimezoneShift(currentDate, dateMathVerb, 'Minute');\n continue;\n }\n\n // Match second\n if (!matchSchedule(currentDate.getSeconds(), this.fields.second)) {\n this._applyTimezoneShift(currentDate, dateMathVerb, 'Second');\n continue;\n }\n\n // Increase a second in case in the first iteration the currentDate was not\n // modified\n if (startTimestamp === currentDate.getTime()) {\n if ((dateMathVerb === 'add') || (currentDate.getMilliseconds() === 0)) {\n this._applyTimezoneShift(currentDate, dateMathVerb, 'Second');\n } else {\n currentDate.setMilliseconds(0);\n }\n\n continue;\n }\n\n break;\n }\n\n if (stepCount >= LOOP_LIMIT) {\n throw new Error('Invalid expression, loop limit exceeded');\n }\n\n this._currentDate = new CronDate(currentDate, this._tz);\n this._hasIterated = true;\n\n return currentDate;\n};\n\n/**\n * Find next suitable date\n *\n * @public\n * @return {CronDate|Object}\n */\nCronExpression.prototype.next = function next () {\n var schedule = this._findSchedule();\n\n // Try to return ES6 compatible iterator\n if (this._isIterator) {\n return {\n value: schedule,\n done: !this.hasNext()\n };\n }\n\n return schedule;\n};\n\n/**\n * Find previous suitable date\n *\n * @public\n * @return {CronDate|Object}\n */\nCronExpression.prototype.prev = function prev () {\n var schedule = this._findSchedule(true);\n\n // Try to return ES6 compatible iterator\n if (this._isIterator) {\n return {\n value: schedule,\n done: !this.hasPrev()\n };\n }\n\n return schedule;\n};\n\n/**\n * Check if next suitable date exists\n *\n * @public\n * @return {Boolean}\n */\nCronExpression.prototype.hasNext = function() {\n var current = this._currentDate;\n var hasIterated = this._hasIterated;\n\n try {\n this._findSchedule();\n return true;\n } catch (err) {\n return false;\n } finally {\n this._currentDate = current;\n this._hasIterated = hasIterated;\n }\n};\n\n/**\n * Check if previous suitable date exists\n *\n * @public\n * @return {Boolean}\n */\nCronExpression.prototype.hasPrev = function() {\n var current = this._currentDate;\n var hasIterated = this._hasIterated;\n\n try {\n this._findSchedule(true);\n return true;\n } catch (err) {\n return false;\n } finally {\n this._currentDate = current;\n this._hasIterated = hasIterated;\n }\n};\n\n/**\n * Iterate over expression iterator\n *\n * @public\n * @param {Number} steps Numbers of steps to iterate\n * @param {Function} callback Optional callback\n * @return {Array} Array of the iterated results\n */\nCronExpression.prototype.iterate = function iterate (steps, callback) {\n var dates = [];\n\n if (steps >= 0) {\n for (var i = 0, c = steps; i < c; i++) {\n try {\n var item = this.next();\n dates.push(item);\n\n // Fire the callback\n if (callback) {\n callback(item, i);\n }\n } catch (err) {\n break;\n }\n }\n } else {\n for (var i = 0, c = steps; i > c; i--) {\n try {\n var item = this.prev();\n dates.push(item);\n\n // Fire the callback\n if (callback) {\n callback(item, i);\n }\n } catch (err) {\n break;\n }\n }\n }\n\n return dates;\n};\n\n/**\n * Reset expression iterator state\n *\n * @public\n */\nCronExpression.prototype.reset = function reset (newDate) {\n this._currentDate = new CronDate(newDate || this._options.currentDate);\n};\n\n/**\n * Stringify the expression\n *\n * @public\n * @param {Boolean} [includeSeconds] Should stringify seconds\n * @return {String}\n */\nCronExpression.prototype.stringify = function stringify(includeSeconds) {\n var resultArr = [];\n for (var i = includeSeconds ? 0 : 1, c = CronExpression.map.length; i < c; ++i) {\n var field = CronExpression.map[i];\n var value = this.fields[field];\n var constraint = CronExpression.constraints[i];\n\n if (field === 'dayOfMonth' && this.fields.month.length === 1) {\n constraint = { min: 1, max: CronExpression.daysInMonth[this.fields.month[0] - 1] };\n } else if (field === 'dayOfWeek') {\n // Prefer 0-6 range when serializing day of week field\n constraint = { min: 0, max: 6 };\n value = value[value.length - 1] === 7 ? value.slice(0, -1) : value;\n }\n\n resultArr.push(stringifyField(value, constraint.min, constraint.max));\n }\n return resultArr.join(' ');\n};\n\n/**\n * Parse input expression (async)\n *\n * @public\n * @param {String} expression Input expression\n * @param {Object} [options] Parsing options\n */\nCronExpression.parse = function parse(expression, options) {\n var self = this;\n if (typeof options === 'function') {\n options = {};\n }\n\n function parse (expression, options) {\n if (!options) {\n options = {};\n }\n\n if (typeof options.currentDate === 'undefined') {\n options.currentDate = new CronDate(undefined, self._tz);\n }\n\n // Is input expression predefined?\n if (CronExpression.predefined[expression]) {\n expression = CronExpression.predefined[expression];\n }\n\n // Split fields\n var fields = [];\n var atoms = (expression + '').trim().split(/\\s+/);\n\n if (atoms.length > 6) {\n throw new Error('Invalid cron expression');\n }\n\n // Resolve fields\n var start = (CronExpression.map.length - atoms.length);\n for (var i = 0, c = CronExpression.map.length; i < c; ++i) {\n var field = CronExpression.map[i]; // Field name\n var value = atoms[atoms.length > c ? i : i - start]; // Field value\n\n if (i < start || !value) { // Use default value\n fields.push(CronExpression._parseField(\n field,\n CronExpression.parseDefaults[i],\n CronExpression.constraints[i]\n )\n );\n } else {\n var val = field === 'dayOfWeek' ? parseNthDay(value) : value;\n\n fields.push(CronExpression._parseField(\n field,\n val,\n CronExpression.constraints[i]\n )\n );\n }\n }\n\n var mappedFields = {};\n for (var i = 0, c = CronExpression.map.length; i < c; i++) {\n var key = CronExpression.map[i];\n mappedFields[key] = fields[i];\n }\n\n var dayOfMonth = CronExpression._handleMaxDaysInMonth(mappedFields);\n mappedFields.dayOfMonth = dayOfMonth || mappedFields.dayOfMonth;\n return new CronExpression(mappedFields, options);\n\n /**\n * Parses out the # special character for the dayOfWeek field & adds it to options.\n *\n * @param {String} val\n * @return {String}\n * @private\n */\n function parseNthDay(val) {\n var atoms = val.split('#');\n if (atoms.length > 1) {\n var nthValue = +atoms[atoms.length - 1];\n if(/,/.test(val)) {\n throw new Error('Constraint error, invalid dayOfWeek `#` and `,` '\n + 'special characters are incompatible');\n }\n if(/\\//.test(val)) {\n throw new Error('Constraint error, invalid dayOfWeek `#` and `/` '\n + 'special characters are incompatible');\n }\n if(/-/.test(val)) {\n throw new Error('Constraint error, invalid dayOfWeek `#` and `-` '\n + 'special characters are incompatible');\n }\n if (atoms.length > 2 || Number.isNaN(nthValue) || (nthValue < 1 || nthValue > 5)) {\n throw new Error('Constraint error, invalid dayOfWeek occurrence number (#)');\n }\n\n options.nthDayOfWeek = nthValue;\n return atoms[0];\n }\n return val;\n }\n }\n\n return parse(expression, options);\n};\n\n/**\n * Convert cron fields back to Cron Expression\n *\n * @public\n * @param {Object} fields Input fields\n * @param {Object} [options] Parsing options\n * @return {Object}\n */\nCronExpression.fieldsToExpression = function fieldsToExpression(fields, options) {\n function validateConstraints (field, values, constraints) {\n if (!values) {\n throw new Error('Validation error, Field ' + field + ' is missing');\n }\n if (values.length === 0) {\n throw new Error('Validation error, Field ' + field + ' contains no values');\n }\n for (var i = 0, c = values.length; i < c; i++) {\n var value = values[i];\n\n if (CronExpression._isValidConstraintChar(constraints, value)) {\n continue;\n }\n\n // Check constraints\n if (typeof value !== 'number' || Number.isNaN(value) || value < constraints.min || value > constraints.max) {\n throw new Error(\n 'Constraint error, got value ' + value + ' expected range ' +\n constraints.min + '-' + constraints.max\n );\n }\n }\n }\n\n var mappedFields = {};\n for (var i = 0, c = CronExpression.map.length; i < c; ++i) {\n var field = CronExpression.map[i]; // Field name\n var values = fields[field];\n validateConstraints(\n field,\n values,\n CronExpression.constraints[i]\n );\n var copy = [];\n var j = -1;\n while (++j < values.length) {\n copy[j] = values[j];\n }\n values = copy.sort(CronExpression._sortCompareFn)\n .filter(function(item, pos, ary) {\n return !pos || item !== ary[pos - 1];\n });\n if (values.length !== copy.length) {\n throw new Error('Validation error, Field ' + field + ' contains duplicate values');\n }\n mappedFields[field] = values;\n }\n var dayOfMonth = CronExpression._handleMaxDaysInMonth(mappedFields);\n mappedFields.dayOfMonth = dayOfMonth || mappedFields.dayOfMonth;\n return new CronExpression(mappedFields, options || {});\n};\n\nmodule.exports = CronExpression;\n", "'use strict';\n\nvar CronExpression = require('./expression');\n\nfunction CronParser() {}\n\n/**\n * Parse crontab entry\n *\n * @private\n * @param {String} entry Crontab file entry/line\n */\nCronParser._parseEntry = function _parseEntry (entry) {\n var atoms = entry.split(' ');\n\n if (atoms.length === 6) {\n return {\n interval: CronExpression.parse(entry)\n };\n } else if (atoms.length > 6) {\n return {\n interval: CronExpression.parse(\n atoms.slice(0, 6).join(' ')\n ),\n command: atoms.slice(6, atoms.length)\n };\n } else {\n throw new Error('Invalid entry: ' + entry);\n }\n};\n\n/**\n * Wrapper for CronExpression.parser method\n *\n * @public\n * @param {String} expression Input expression\n * @param {Object} [options] Parsing options\n * @return {Object}\n */\nCronParser.parseExpression = function parseExpression (expression, options) {\n return CronExpression.parse(expression, options);\n};\n\n/**\n * Wrapper for CronExpression.fieldsToExpression method\n *\n * @public\n * @param {Object} fields Input fields\n * @param {Object} [options] Parsing options\n * @return {Object}\n */\nCronParser.fieldsToExpression = function fieldsToExpression (fields, options) {\n return CronExpression.fieldsToExpression(fields, options);\n};\n\n/**\n * Parse content string\n *\n * @public\n * @param {String} data Crontab content\n * @return {Object}\n */\nCronParser.parseString = function parseString (data) {\n var blocks = data.split('\\n');\n\n var response = {\n variables: {},\n expressions: [],\n errors: {}\n };\n\n for (var i = 0, c = blocks.length; i < c; i++) {\n var block = blocks[i];\n var matches = null;\n var entry = block.trim(); // Remove surrounding spaces\n\n if (entry.length > 0) {\n if (entry.match(/^#/)) { // Comment\n continue;\n } else if ((matches = entry.match(/^(.*)=(.*)$/))) { // Variable\n response.variables[matches[1]] = matches[2];\n } else { // Expression?\n var result = null;\n\n try {\n result = CronParser._parseEntry('0 ' + entry);\n response.expressions.push(result.interval);\n } catch (err) {\n response.errors[entry] = err;\n }\n }\n }\n }\n\n return response;\n};\n\n/**\n * Parse crontab file\n *\n * @public\n * @param {String} filePath Path to file\n * @param {Function} callback\n */\nCronParser.parseFile = function parseFile (filePath, callback) {\n require('fs').readFile(filePath, function(err, data) {\n if (err) {\n callback(err);\n return;\n }\n\n return callback(null, CronParser.parseString(data.toString()));\n });\n};\n\nmodule.exports = CronParser;\n", "// https://github.com/node-fetch/node-fetch\n// Native browser APIs\nexport const fetch = (...args) => globalThis.fetch(...args);\nexport const Headers = globalThis.Headers;\nexport const Request = globalThis.Request;\nexport const Response = globalThis.Response;\nexport const AbortController = globalThis.AbortController;\n// Error handling\nexport const FetchError = Error;\nexport const AbortError = Error;\n// Top-level exported helpers (from node-fetch v3)\nconst redirectStatus = new Set([\n\t301,\n\t302,\n\t303,\n\t307,\n\t308\n]);\nexport const isRedirect = (code) => redirectStatus.has(code);\n// node-fetch v2\nfetch.Promise = globalThis.Promise;\nfetch.isRedirect = isRedirect;\nexport default fetch;\n", "import * as esm from 'node-fetch';\nmodule.exports = Object.entries(esm)\n\t\t\t.filter(([k,]) => k !== 'default')\n\t\t\t.reduce((cjs, [k, value]) =>\n\t\t\t\tObject.defineProperty(cjs, k, { value, enumerable: true }),\n\t\t\t\t\"default\" in esm ? esm.default : {}\n\t\t\t);", "import libDefault from 'node:assert';\nmodule.exports = libDefault;", "import libDefault from 'node:zlib';\nmodule.exports = libDefault;", "function limiter (count) {\n var outstanding = 0\n var jobs = []\n\n function remove () {\n outstanding--\n\n if (outstanding < count) {\n dequeue()\n }\n }\n\n function dequeue () {\n var job = jobs.shift()\n semaphore.queue = jobs.length\n\n if (job) {\n run(job.fn).then(job.resolve).catch(job.reject)\n }\n }\n\n function queue (fn) {\n return new Promise(function (resolve, reject) {\n jobs.push({fn: fn, resolve: resolve, reject: reject})\n semaphore.queue = jobs.length\n })\n }\n\n function run (fn) {\n outstanding++\n try {\n return Promise.resolve(fn()).then(function (result) {\n remove()\n return result\n }, function (error) {\n remove()\n throw error\n })\n } catch (err) {\n remove()\n return Promise.reject(err)\n }\n }\n\n var semaphore = function (fn) {\n if (outstanding >= count) {\n return queue(fn)\n } else {\n return run(fn)\n }\n }\n\n return semaphore\n}\n\nfunction map (items, mapper) {\n var failed = false\n\n var limit = this\n\n return Promise.all(items.map(function () {\n var args = arguments\n return limit(function () {\n if (!failed) {\n return mapper.apply(undefined, args).catch(function (e) {\n failed = true\n throw e\n })\n }\n })\n }))\n}\n\nfunction addExtras (fn) {\n fn.queue = 0\n fn.map = map\n return fn\n}\n\nmodule.exports = function (count) {\n if (count) {\n return addExtras(limiter(count))\n } else {\n return addExtras(function (fn) {\n return fn()\n })\n }\n}\n", "'use strict';\n\nfunction assign(obj, props) {\n for (const key in props) {\n Object.defineProperty(obj, key, {\n value: props[key],\n enumerable: true,\n configurable: true,\n });\n }\n\n return obj;\n}\n\nfunction createError(err, code, props) {\n if (!err || typeof err === 'string') {\n throw new TypeError('Please pass an Error to err-code');\n }\n\n if (!props) {\n props = {};\n }\n\n if (typeof code === 'object') {\n props = code;\n code = undefined;\n }\n\n if (code != null) {\n props.code = code;\n }\n\n try {\n return assign(err, props);\n } catch (_) {\n props.message = err.message;\n props.stack = err.stack;\n\n const ErrClass = function () {};\n\n ErrClass.prototype = Object.create(Object.getPrototypeOf(err));\n\n return assign(new ErrClass(), props);\n }\n}\n\nmodule.exports = createError;\n", "function RetryOperation(timeouts, options) {\n // Compatibility for the old (timeouts, retryForever) signature\n if (typeof options === 'boolean') {\n options = { forever: options };\n }\n\n this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));\n this._timeouts = timeouts;\n this._options = options || {};\n this._maxRetryTime = options && options.maxRetryTime || Infinity;\n this._fn = null;\n this._errors = [];\n this._attempts = 1;\n this._operationTimeout = null;\n this._operationTimeoutCb = null;\n this._timeout = null;\n this._operationStart = null;\n\n if (this._options.forever) {\n this._cachedTimeouts = this._timeouts.slice(0);\n }\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.reset = function() {\n this._attempts = 1;\n this._timeouts = this._originalTimeouts;\n}\n\nRetryOperation.prototype.stop = function() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n this._timeouts = [];\n this._cachedTimeouts = null;\n};\n\nRetryOperation.prototype.retry = function(err) {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n if (!err) {\n return false;\n }\n var currentTime = new Date().getTime();\n if (err && currentTime - this._operationStart >= this._maxRetryTime) {\n this._errors.unshift(new Error('RetryOperation timeout occurred'));\n return false;\n }\n\n this._errors.push(err);\n\n var timeout = this._timeouts.shift();\n if (timeout === undefined) {\n if (this._cachedTimeouts) {\n // retry forever, only keep last error\n this._errors.splice(this._errors.length - 1, this._errors.length);\n this._timeouts = this._cachedTimeouts.slice(0);\n timeout = this._timeouts.shift();\n } else {\n return false;\n }\n }\n\n var self = this;\n var timer = setTimeout(function() {\n self._attempts++;\n\n if (self._operationTimeoutCb) {\n self._timeout = setTimeout(function() {\n self._operationTimeoutCb(self._attempts);\n }, self._operationTimeout);\n\n if (self._options.unref) {\n self._timeout.unref();\n }\n }\n\n self._fn(self._attempts);\n }, timeout);\n\n if (this._options.unref) {\n timer.unref();\n }\n\n return true;\n};\n\nRetryOperation.prototype.attempt = function(fn, timeoutOps) {\n this._fn = fn;\n\n if (timeoutOps) {\n if (timeoutOps.timeout) {\n this._operationTimeout = timeoutOps.timeout;\n }\n if (timeoutOps.cb) {\n this._operationTimeoutCb = timeoutOps.cb;\n }\n }\n\n var self = this;\n if (this._operationTimeoutCb) {\n this._timeout = setTimeout(function() {\n self._operationTimeoutCb();\n }, self._operationTimeout);\n }\n\n this._operationStart = new Date().getTime();\n\n this._fn(this._attempts);\n};\n\nRetryOperation.prototype.try = function(fn) {\n console.log('Using RetryOperation.try() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = function(fn) {\n console.log('Using RetryOperation.start() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = RetryOperation.prototype.try;\n\nRetryOperation.prototype.errors = function() {\n return this._errors;\n};\n\nRetryOperation.prototype.attempts = function() {\n return this._attempts;\n};\n\nRetryOperation.prototype.mainError = function() {\n if (this._errors.length === 0) {\n return null;\n }\n\n var counts = {};\n var mainError = null;\n var mainErrorCount = 0;\n\n for (var i = 0; i < this._errors.length; i++) {\n var error = this._errors[i];\n var message = error.message;\n var count = (counts[message] || 0) + 1;\n\n counts[message] = count;\n\n if (count >= mainErrorCount) {\n mainError = error;\n mainErrorCount = count;\n }\n }\n\n return mainError;\n};\n", "var RetryOperation = require('./retry_operation');\n\nexports.operation = function(options) {\n var timeouts = exports.timeouts(options);\n return new RetryOperation(timeouts, {\n forever: options && options.forever,\n unref: options && options.unref,\n maxRetryTime: options && options.maxRetryTime\n });\n};\n\nexports.timeouts = function(options) {\n if (options instanceof Array) {\n return [].concat(options);\n }\n\n var opts = {\n retries: 10,\n factor: 2,\n minTimeout: 1 * 1000,\n maxTimeout: Infinity,\n randomize: false\n };\n for (var key in options) {\n opts[key] = options[key];\n }\n\n if (opts.minTimeout > opts.maxTimeout) {\n throw new Error('minTimeout is greater than maxTimeout');\n }\n\n var timeouts = [];\n for (var i = 0; i < opts.retries; i++) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n if (options && options.forever && !timeouts.length) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n // sort the array numerically ascending\n timeouts.sort(function(a,b) {\n return a - b;\n });\n\n return timeouts;\n};\n\nexports.createTimeout = function(attempt, opts) {\n var random = (opts.randomize)\n ? (Math.random() + 1)\n : 1;\n\n var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));\n timeout = Math.min(timeout, opts.maxTimeout);\n\n return timeout;\n};\n\nexports.wrap = function(obj, options, methods) {\n if (options instanceof Array) {\n methods = options;\n options = null;\n }\n\n if (!methods) {\n methods = [];\n for (var key in obj) {\n if (typeof obj[key] === 'function') {\n methods.push(key);\n }\n }\n }\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n var original = obj[method];\n\n obj[method] = function retryWrapper(original) {\n var op = exports.operation(options);\n var args = Array.prototype.slice.call(arguments, 1);\n var callback = args.pop();\n\n args.push(function(err) {\n if (op.retry(err)) {\n return;\n }\n if (err) {\n arguments[0] = op.mainError();\n }\n callback.apply(this, arguments);\n });\n\n op.attempt(function() {\n original.apply(obj, args);\n });\n }.bind(obj, original);\n obj[method].options = options;\n }\n};\n", "module.exports = require('./lib/retry');", "'use strict';\n\nvar errcode = require('err-code');\nvar retry = require('retry');\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n\nfunction isRetryError(err) {\n return err && err.code === 'EPROMISERETRY' && hasOwn.call(err, 'retried');\n}\n\nfunction promiseRetry(fn, options) {\n var temp;\n var operation;\n\n if (typeof fn === 'object' && typeof options === 'function') {\n // Swap options and fn when using alternate signature (options, fn)\n temp = options;\n options = fn;\n fn = temp;\n }\n\n operation = retry.operation(options);\n\n return new Promise(function (resolve, reject) {\n operation.attempt(function (number) {\n Promise.resolve()\n .then(function () {\n return fn(function (err) {\n if (isRetryError(err)) {\n err = err.retried;\n }\n\n throw errcode(new Error('Retrying'), 'EPROMISERETRY', { retried: err });\n }, number);\n })\n .then(resolve, function (err) {\n if (isRetryError(err)) {\n err = err.retried;\n\n if (operation.retry(err || new Error())) {\n return;\n }\n }\n\n reject(err);\n });\n });\n });\n}\n\nmodule.exports = promiseRetry;\n", null, "{\n \"name\": \"expo-server-sdk\",\n \"version\": \"4.0.0\",\n \"description\": \"Server-side library for working with Expo using Node.js\",\n \"main\": \"build/ExpoClient.js\",\n \"types\": \"build/ExpoClient.d.ts\",\n \"files\": [\n \"build\"\n ],\n \"engines\": {\n \"node\": \">=20\"\n },\n \"scripts\": {\n \"build\": \"yarn prepack\",\n \"lint\": \"eslint\",\n \"prepack\": \"tsc --project tsconfig.build.json\",\n \"test\": \"jest\",\n \"tsc\": \"tsc\",\n \"watch\": \"tsc --watch\"\n },\n \"jest\": {\n \"coverageDirectory\": \"/../coverage\",\n \"coverageThreshold\": {\n \"global\": {\n \"branches\": 100,\n \"functions\": 100,\n \"lines\": 100,\n \"statements\": 0\n }\n },\n \"preset\": \"ts-jest\",\n \"rootDir\": \"src\",\n \"testEnvironment\": \"node\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/expo/expo-server-sdk-node.git\"\n },\n \"keywords\": [\n \"expo\",\n \"push-notifications\"\n ],\n \"author\": \"support@expo.dev\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/expo/expo-server-sdk-node/issues\"\n },\n \"homepage\": \"https://github.com/expo/expo-server-sdk-node#readme\",\n \"dependencies\": {\n \"node-fetch\": \"^2.6.0\",\n \"promise-limit\": \"^2.7.0\",\n \"promise-retry\": \"^2.0.1\"\n },\n \"devDependencies\": {\n \"@tsconfig/node20\": \"20.1.6\",\n \"@tsconfig/strictest\": \"2.0.5\",\n \"@types/node\": \"22.17.2\",\n \"@types/node-fetch\": \"2.6.12\",\n \"@types/promise-retry\": \"1.1.6\",\n \"eslint\": \"9.33.0\",\n \"eslint-config-universe\": \"15.0.3\",\n \"jest\": \"29.7.0\",\n \"jiti\": \"2.4.2\",\n \"msw\": \"2.10.5\",\n \"prettier\": \"3.6.2\",\n \"ts-jest\": \"29.4.1\",\n \"typescript\": \"5.9.2\"\n },\n \"packageManager\": \"yarn@4.9.2\"\n}\n", null, "// This loads all middlewares exposed on the middleware object and then starts\n// the invocation chain. The big idea is that we can add these to the middleware\n// export dynamically through wrangler, or we can potentially let users directly\n// add them as a sort of \"plugin\" system.\n\nimport ENTRY, { __INTERNAL_WRANGLER_MIDDLEWARE__ } from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/bundle-rJ86wI/middleware-insertion-facade.js\";\nimport { __facade_invoke__, __facade_register__, Dispatcher } from \"/private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/templates/middleware/common.ts\";\nimport type { WorkerEntrypointConstructor } from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/bundle-rJ86wI/middleware-insertion-facade.js\";\n\n// Preserve all the exports from the worker\nexport * from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/bundle-rJ86wI/middleware-insertion-facade.js\";\n\nclass __Facade_ScheduledController__ implements ScheduledController {\n\treadonly #noRetry: ScheduledController[\"noRetry\"];\n\n\tconstructor(\n\t\treadonly scheduledTime: number,\n\t\treadonly cron: string,\n\t\tnoRetry: ScheduledController[\"noRetry\"]\n\t) {\n\t\tthis.#noRetry = noRetry;\n\t}\n\n\tnoRetry() {\n\t\tif (!(this instanceof __Facade_ScheduledController__)) {\n\t\t\tthrow new TypeError(\"Illegal invocation\");\n\t\t}\n\t\t// Need to call native method immediately in case uncaught error thrown\n\t\tthis.#noRetry();\n\t}\n}\n\nfunction wrapExportedHandler(worker: ExportedHandler): ExportedHandler {\n\t// If we don't have any middleware defined, just return the handler as is\n\tif (\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__ === undefined ||\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__.length === 0\n\t) {\n\t\treturn worker;\n\t}\n\t// Otherwise, register all middleware once\n\tfor (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {\n\t\t__facade_register__(middleware);\n\t}\n\n\tconst fetchDispatcher: ExportedHandlerFetchHandler = function (\n\t\trequest,\n\t\tenv,\n\t\tctx\n\t) {\n\t\tif (worker.fetch === undefined) {\n\t\t\tthrow new Error(\"Handler does not export a fetch() function.\");\n\t\t}\n\t\treturn worker.fetch(request, env, ctx);\n\t};\n\n\treturn {\n\t\t...worker,\n\t\tfetch(request, env, ctx) {\n\t\t\tconst dispatcher: Dispatcher = function (type, init) {\n\t\t\t\tif (type === \"scheduled\" && worker.scheduled !== undefined) {\n\t\t\t\t\tconst controller = new __Facade_ScheduledController__(\n\t\t\t\t\t\tDate.now(),\n\t\t\t\t\t\tinit.cron ?? \"\",\n\t\t\t\t\t\t() => {}\n\t\t\t\t\t);\n\t\t\t\t\treturn worker.scheduled(controller, env, ctx);\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn __facade_invoke__(request, env, ctx, dispatcher, fetchDispatcher);\n\t\t},\n\t};\n}\n\nfunction wrapWorkerEntrypoint(\n\tklass: WorkerEntrypointConstructor\n): WorkerEntrypointConstructor {\n\t// If we don't have any middleware defined, just return the handler as is\n\tif (\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__ === undefined ||\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__.length === 0\n\t) {\n\t\treturn klass;\n\t}\n\t// Otherwise, register all middleware once\n\tfor (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {\n\t\t__facade_register__(middleware);\n\t}\n\n\t// `extend`ing `klass` here so other RPC methods remain callable\n\treturn class extends klass {\n\t\t#fetchDispatcher: ExportedHandlerFetchHandler> = (\n\t\t\trequest,\n\t\t\tenv,\n\t\t\tctx\n\t\t) => {\n\t\t\tthis.env = env;\n\t\t\tthis.ctx = ctx;\n\t\t\tif (super.fetch === undefined) {\n\t\t\t\tthrow new Error(\"Entrypoint class does not define a fetch() function.\");\n\t\t\t}\n\t\t\treturn super.fetch(request);\n\t\t};\n\n\t\t#dispatcher: Dispatcher = (type, init) => {\n\t\t\tif (type === \"scheduled\" && super.scheduled !== undefined) {\n\t\t\t\tconst controller = new __Facade_ScheduledController__(\n\t\t\t\t\tDate.now(),\n\t\t\t\t\tinit.cron ?? \"\",\n\t\t\t\t\t() => {}\n\t\t\t\t);\n\t\t\t\treturn super.scheduled(controller);\n\t\t\t}\n\t\t};\n\n\t\tfetch(request: Request) {\n\t\t\treturn __facade_invoke__(\n\t\t\t\trequest,\n\t\t\t\tthis.env,\n\t\t\t\tthis.ctx,\n\t\t\t\tthis.#dispatcher,\n\t\t\t\tthis.#fetchDispatcher\n\t\t\t);\n\t\t}\n\t};\n}\n\nlet WRAPPED_ENTRY: ExportedHandler | WorkerEntrypointConstructor | undefined;\nif (typeof ENTRY === \"object\") {\n\tWRAPPED_ENTRY = wrapExportedHandler(ENTRY);\n} else if (typeof ENTRY === \"function\") {\n\tWRAPPED_ENTRY = wrapWorkerEntrypoint(ENTRY);\n}\nexport default WRAPPED_ENTRY;\n", "\t\t\t\timport worker, * as OTHER_EXPORTS from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/worker.ts\";\n\t\t\t\timport * as __MIDDLEWARE_0__ from \"/private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts\";\nimport * as __MIDDLEWARE_1__ from \"/private/tmp/bunx-501-wrangler@latest/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts\";\n\n\t\t\t\texport * from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/worker.ts\";\n\t\t\t\tconst MIDDLEWARE_TEST_INJECT = \"__INJECT_FOR_TESTING_WRANGLER_MIDDLEWARE__\";\n\t\t\t\texport const __INTERNAL_WRANGLER_MIDDLEWARE__ = [\n\t\t\t\t\t\n\t\t\t\t\t__MIDDLEWARE_0__.default,__MIDDLEWARE_1__.default\n\t\t\t\t]\n\t\t\t\texport default worker;", "import type { ExecutionContext, D1Database } from '@cloudflare/workers-types'\nimport { createApp } from './src/app'\nimport { initDb } from './src/dbService'\n\nexport default {\n async fetch(\n request: Request,\n env: Record & { DB?: D1Database },\n ctx: ExecutionContext\n ) {\n ;(globalThis as any).ENV = env\n if (env.DB) {\n initDb(env.DB)\n }\n const app = createApp()\n return app.fetch(request, env, ctx)\n },\n}\n", "import { Hono } from 'hono'\nimport { cors } from 'hono/cors'\nimport { logger } from 'hono/logger'\nimport { trpcServer } from '@hono/trpc-server'\nimport { getStaffUserById, isUserSuspended } from '@/src/dbService'\nimport mainRouter from '@/src/main-router'\nimport { appRouter } from '@/src/trpc/router'\nimport { TRPCError } from '@trpc/server'\nimport { jwtVerify } from 'jose'\nimport { encodedJwtSecret } from '@/src/lib/env-exporter'\n\nexport const createApp = () => {\n const app = new Hono()\n\n // CORS middleware\n app.use(cors({\n origin: 'http://localhost:5174',\n allowMethods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],\n allowHeaders: ['Origin', 'X-Requested-With', 'Content-Type', 'Accept', 'Authorization'],\n credentials: true,\n }))\n\n // Logger middleware\n app.use(logger())\n\n // tRPC middleware\n app.use('/api/trpc', trpcServer({\n router: appRouter,\n createContext: async ({ req }) => {\n let user = null\n let staffUser = null\n const authHeader = req.headers.get('authorization')\n\n if (authHeader?.startsWith('Bearer ')) {\n const token = authHeader.substring(7)\n try {\n const { payload } = await jwtVerify(token, encodedJwtSecret)\n const decoded = payload as any\n\n // Check if this is a staff token (has staffId)\n if (decoded.staffId) {\n // This is a staff token, verify staff exists\n const staff = await getStaffUserById(decoded.staffId)\n\n if (staff) {\n user = staffUser\n staffUser = {\n id: staff.id,\n name: staff.name,\n }\n }\n } else {\n // This is a regular user token\n user = decoded\n\n // Check if user is suspended\n const suspended = await isUserSuspended(user.userId)\n\n if (suspended) {\n throw new TRPCError({\n code: 'FORBIDDEN',\n message: 'Account suspended',\n })\n }\n }\n } catch (err) {\n // Invalid token, both user and staffUser remain null\n }\n }\n return { req, user, staffUser }\n },\n onError({ error, path, type, ctx }) {\n console.error('\uD83D\uDEA8 tRPC Error :', {\n path,\n type,\n code: error.code,\n message: error.message,\n userId: ctx?.user?.userId,\n stack: error.stack,\n })\n },\n }))\n\n // Mount main router\n app.route('/api', mainRouter)\n\n // Global error handler\n app.onError((err, c) => {\n console.error(err)\n // Handle different error types\n let status = 500\n let message = 'Internal Server Error'\n\n if (err instanceof TRPCError) {\n // Map TRPC error codes to HTTP status codes\n const trpcStatusMap: Record = {\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n TIMEOUT: 408,\n CONFLICT: 409,\n PRECONDITION_FAILED: 412,\n PAYLOAD_TOO_LARGE: 413,\n METHOD_NOT_SUPPORTED: 405,\n UNPROCESSABLE_CONTENT: 422,\n TOO_MANY_REQUESTS: 429,\n INTERNAL_SERVER_ERROR: 500,\n }\n status = trpcStatusMap[err.code] || 500\n message = err.message\n } else if ((err as any).statusCode) {\n status = (err as any).statusCode\n message = err.message\n } else if ((err as any).status) {\n status = (err as any).status\n message = err.message\n } else if (err.message) {\n message = err.message\n }\n\n return c.json({ message }, status as any)\n })\n\n return app\n}\n", "// src/index.ts\nimport { Hono } from \"./hono.js\";\nexport {\n Hono\n};\n", "// src/hono.ts\nimport { HonoBase } from \"./hono-base.js\";\nimport { RegExpRouter } from \"./router/reg-exp-router/index.js\";\nimport { SmartRouter } from \"./router/smart-router/index.js\";\nimport { TrieRouter } from \"./router/trie-router/index.js\";\nvar Hono = class extends HonoBase {\n /**\n * Creates an instance of the Hono class.\n *\n * @param options - Optional configuration options for the Hono instance.\n */\n constructor(options = {}) {\n super(options);\n this.router = options.router ?? new SmartRouter({\n routers: [new RegExpRouter(), new TrieRouter()]\n });\n }\n};\nexport {\n Hono\n};\n", "// src/hono-base.ts\nimport { compose } from \"./compose.js\";\nimport { Context } from \"./context.js\";\nimport { METHODS, METHOD_NAME_ALL, METHOD_NAME_ALL_LOWERCASE } from \"./router.js\";\nimport { COMPOSED_HANDLER } from \"./utils/constants.js\";\nimport { getPath, getPathNoStrict, mergePath } from \"./utils/url.js\";\nvar notFoundHandler = (c) => {\n return c.text(\"404 Not Found\", 404);\n};\nvar errorHandler = (err, c) => {\n if (\"getResponse\" in err) {\n const res = err.getResponse();\n return c.newResponse(res.body, res);\n }\n console.error(err);\n return c.text(\"Internal Server Error\", 500);\n};\nvar Hono = class _Hono {\n get;\n post;\n put;\n delete;\n options;\n patch;\n all;\n on;\n use;\n /*\n This class is like an abstract class and does not have a router.\n To use it, inherit the class and implement router in the constructor.\n */\n router;\n getPath;\n // Cannot use `#` because it requires visibility at JavaScript runtime.\n _basePath = \"/\";\n #path = \"/\";\n routes = [];\n constructor(options = {}) {\n const allMethods = [...METHODS, METHOD_NAME_ALL_LOWERCASE];\n allMethods.forEach((method) => {\n this[method] = (args1, ...args) => {\n if (typeof args1 === \"string\") {\n this.#path = args1;\n } else {\n this.#addRoute(method, this.#path, args1);\n }\n args.forEach((handler) => {\n this.#addRoute(method, this.#path, handler);\n });\n return this;\n };\n });\n this.on = (method, path, ...handlers) => {\n for (const p of [path].flat()) {\n this.#path = p;\n for (const m of [method].flat()) {\n handlers.map((handler) => {\n this.#addRoute(m.toUpperCase(), this.#path, handler);\n });\n }\n }\n return this;\n };\n this.use = (arg1, ...handlers) => {\n if (typeof arg1 === \"string\") {\n this.#path = arg1;\n } else {\n this.#path = \"*\";\n handlers.unshift(arg1);\n }\n handlers.forEach((handler) => {\n this.#addRoute(METHOD_NAME_ALL, this.#path, handler);\n });\n return this;\n };\n const { strict, ...optionsWithoutStrict } = options;\n Object.assign(this, optionsWithoutStrict);\n this.getPath = strict ?? true ? options.getPath ?? getPath : getPathNoStrict;\n }\n #clone() {\n const clone = new _Hono({\n router: this.router,\n getPath: this.getPath\n });\n clone.errorHandler = this.errorHandler;\n clone.#notFoundHandler = this.#notFoundHandler;\n clone.routes = this.routes;\n return clone;\n }\n #notFoundHandler = notFoundHandler;\n // Cannot use `#` because it requires visibility at JavaScript runtime.\n errorHandler = errorHandler;\n /**\n * `.route()` allows grouping other Hono instance in routes.\n *\n * @see {@link https://hono.dev/docs/api/routing#grouping}\n *\n * @param {string} path - base Path\n * @param {Hono} app - other Hono instance\n * @returns {Hono} routed Hono instance\n *\n * @example\n * ```ts\n * const app = new Hono()\n * const app2 = new Hono()\n *\n * app2.get(\"/user\", (c) => c.text(\"user\"))\n * app.route(\"/api\", app2) // GET /api/user\n * ```\n */\n route(path, app) {\n const subApp = this.basePath(path);\n app.routes.map((r) => {\n let handler;\n if (app.errorHandler === errorHandler) {\n handler = r.handler;\n } else {\n handler = async (c, next) => (await compose([], app.errorHandler)(c, () => r.handler(c, next))).res;\n handler[COMPOSED_HANDLER] = r.handler;\n }\n subApp.#addRoute(r.method, r.path, handler);\n });\n return this;\n }\n /**\n * `.basePath()` allows base paths to be specified.\n *\n * @see {@link https://hono.dev/docs/api/routing#base-path}\n *\n * @param {string} path - base Path\n * @returns {Hono} changed Hono instance\n *\n * @example\n * ```ts\n * const api = new Hono().basePath('/api')\n * ```\n */\n basePath(path) {\n const subApp = this.#clone();\n subApp._basePath = mergePath(this._basePath, path);\n return subApp;\n }\n /**\n * `.onError()` handles an error and returns a customized Response.\n *\n * @see {@link https://hono.dev/docs/api/hono#error-handling}\n *\n * @param {ErrorHandler} handler - request Handler for error\n * @returns {Hono} changed Hono instance\n *\n * @example\n * ```ts\n * app.onError((err, c) => {\n * console.error(`${err}`)\n * return c.text('Custom Error Message', 500)\n * })\n * ```\n */\n onError = (handler) => {\n this.errorHandler = handler;\n return this;\n };\n /**\n * `.notFound()` allows you to customize a Not Found Response.\n *\n * @see {@link https://hono.dev/docs/api/hono#not-found}\n *\n * @param {NotFoundHandler} handler - request handler for not-found\n * @returns {Hono} changed Hono instance\n *\n * @example\n * ```ts\n * app.notFound((c) => {\n * return c.text('Custom 404 Message', 404)\n * })\n * ```\n */\n notFound = (handler) => {\n this.#notFoundHandler = handler;\n return this;\n };\n /**\n * `.mount()` allows you to mount applications built with other frameworks into your Hono application.\n *\n * @see {@link https://hono.dev/docs/api/hono#mount}\n *\n * @param {string} path - base Path\n * @param {Function} applicationHandler - other Request Handler\n * @param {MountOptions} [options] - options of `.mount()`\n * @returns {Hono} mounted Hono instance\n *\n * @example\n * ```ts\n * import { Router as IttyRouter } from 'itty-router'\n * import { Hono } from 'hono'\n * // Create itty-router application\n * const ittyRouter = IttyRouter()\n * // GET /itty-router/hello\n * ittyRouter.get('/hello', () => new Response('Hello from itty-router'))\n *\n * const app = new Hono()\n * app.mount('/itty-router', ittyRouter.handle)\n * ```\n *\n * @example\n * ```ts\n * const app = new Hono()\n * // Send the request to another application without modification.\n * app.mount('/app', anotherApp, {\n * replaceRequest: (req) => req,\n * })\n * ```\n */\n mount(path, applicationHandler, options) {\n let replaceRequest;\n let optionHandler;\n if (options) {\n if (typeof options === \"function\") {\n optionHandler = options;\n } else {\n optionHandler = options.optionHandler;\n if (options.replaceRequest === false) {\n replaceRequest = (request) => request;\n } else {\n replaceRequest = options.replaceRequest;\n }\n }\n }\n const getOptions = optionHandler ? (c) => {\n const options2 = optionHandler(c);\n return Array.isArray(options2) ? options2 : [options2];\n } : (c) => {\n let executionContext = void 0;\n try {\n executionContext = c.executionCtx;\n } catch {\n }\n return [c.env, executionContext];\n };\n replaceRequest ||= (() => {\n const mergedPath = mergePath(this._basePath, path);\n const pathPrefixLength = mergedPath === \"/\" ? 0 : mergedPath.length;\n return (request) => {\n const url = new URL(request.url);\n url.pathname = url.pathname.slice(pathPrefixLength) || \"/\";\n return new Request(url, request);\n };\n })();\n const handler = async (c, next) => {\n const res = await applicationHandler(replaceRequest(c.req.raw), ...getOptions(c));\n if (res) {\n return res;\n }\n await next();\n };\n this.#addRoute(METHOD_NAME_ALL, mergePath(path, \"*\"), handler);\n return this;\n }\n #addRoute(method, path, handler) {\n method = method.toUpperCase();\n path = mergePath(this._basePath, path);\n const r = { basePath: this._basePath, path, method, handler };\n this.router.add(method, path, [handler, r]);\n this.routes.push(r);\n }\n #handleError(err, c) {\n if (err instanceof Error) {\n return this.errorHandler(err, c);\n }\n throw err;\n }\n #dispatch(request, executionCtx, env, method) {\n if (method === \"HEAD\") {\n return (async () => new Response(null, await this.#dispatch(request, executionCtx, env, \"GET\")))();\n }\n const path = this.getPath(request, { env });\n const matchResult = this.router.match(method, path);\n const c = new Context(request, {\n path,\n matchResult,\n env,\n executionCtx,\n notFoundHandler: this.#notFoundHandler\n });\n if (matchResult[0].length === 1) {\n let res;\n try {\n res = matchResult[0][0][0][0](c, async () => {\n c.res = await this.#notFoundHandler(c);\n });\n } catch (err) {\n return this.#handleError(err, c);\n }\n return res instanceof Promise ? res.then(\n (resolved) => resolved || (c.finalized ? c.res : this.#notFoundHandler(c))\n ).catch((err) => this.#handleError(err, c)) : res ?? this.#notFoundHandler(c);\n }\n const composed = compose(matchResult[0], this.errorHandler, this.#notFoundHandler);\n return (async () => {\n try {\n const context = await composed(c);\n if (!context.finalized) {\n throw new Error(\n \"Context is not finalized. Did you forget to return a Response object or `await next()`?\"\n );\n }\n return context.res;\n } catch (err) {\n return this.#handleError(err, c);\n }\n })();\n }\n /**\n * `.fetch()` will be entry point of your app.\n *\n * @see {@link https://hono.dev/docs/api/hono#fetch}\n *\n * @param {Request} request - request Object of request\n * @param {Env} Env - env Object\n * @param {ExecutionContext} - context of execution\n * @returns {Response | Promise} response of request\n *\n */\n fetch = (request, ...rest) => {\n return this.#dispatch(request, rest[1], rest[0], request.method);\n };\n /**\n * `.request()` is a useful method for testing.\n * You can pass a URL or pathname to send a GET request.\n * app will return a Response object.\n * ```ts\n * test('GET /hello is ok', async () => {\n * const res = await app.request('/hello')\n * expect(res.status).toBe(200)\n * })\n * ```\n * @see https://hono.dev/docs/api/hono#request\n */\n request = (input, requestInit, Env, executionCtx) => {\n if (input instanceof Request) {\n return this.fetch(requestInit ? new Request(input, requestInit) : input, Env, executionCtx);\n }\n input = input.toString();\n return this.fetch(\n new Request(\n /^https?:\\/\\//.test(input) ? input : `http://localhost${mergePath(\"/\", input)}`,\n requestInit\n ),\n Env,\n executionCtx\n );\n };\n /**\n * `.fire()` automatically adds a global fetch event listener.\n * This can be useful for environments that adhere to the Service Worker API, such as non-ES module Cloudflare Workers.\n * @deprecated\n * Use `fire` from `hono/service-worker` instead.\n * ```ts\n * import { Hono } from 'hono'\n * import { fire } from 'hono/service-worker'\n *\n * const app = new Hono()\n * // ...\n * fire(app)\n * ```\n * @see https://hono.dev/docs/api/hono#fire\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API\n * @see https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/\n */\n fire = () => {\n addEventListener(\"fetch\", (event) => {\n event.respondWith(this.#dispatch(event.request, event, void 0, event.request.method));\n });\n };\n};\nexport {\n Hono as HonoBase\n};\n", "// src/compose.ts\nvar compose = (middleware, onError, onNotFound) => {\n return (context, next) => {\n let index = -1;\n return dispatch(0);\n async function dispatch(i) {\n if (i <= index) {\n throw new Error(\"next() called multiple times\");\n }\n index = i;\n let res;\n let isError = false;\n let handler;\n if (middleware[i]) {\n handler = middleware[i][0][0];\n context.req.routeIndex = i;\n } else {\n handler = i === middleware.length && next || void 0;\n }\n if (handler) {\n try {\n res = await handler(context, () => dispatch(i + 1));\n } catch (err) {\n if (err instanceof Error && onError) {\n context.error = err;\n res = await onError(err, context);\n isError = true;\n } else {\n throw err;\n }\n }\n } else {\n if (context.finalized === false && onNotFound) {\n res = await onNotFound(context);\n }\n }\n if (res && (context.finalized === false || isError)) {\n context.res = res;\n }\n return context;\n }\n };\n};\nexport {\n compose\n};\n", "// src/context.ts\nimport { HonoRequest } from \"./request.js\";\nimport { HtmlEscapedCallbackPhase, resolveCallback } from \"./utils/html.js\";\nvar TEXT_PLAIN = \"text/plain; charset=UTF-8\";\nvar setDefaultContentType = (contentType, headers) => {\n return {\n \"Content-Type\": contentType,\n ...headers\n };\n};\nvar createResponseInstance = (body, init) => new Response(body, init);\nvar Context = class {\n #rawRequest;\n #req;\n /**\n * `.env` can get bindings (environment variables, secrets, KV namespaces, D1 database, R2 bucket etc.) in Cloudflare Workers.\n *\n * @see {@link https://hono.dev/docs/api/context#env}\n *\n * @example\n * ```ts\n * // Environment object for Cloudflare Workers\n * app.get('*', async c => {\n * const counter = c.env.COUNTER\n * })\n * ```\n */\n env = {};\n #var;\n finalized = false;\n /**\n * `.error` can get the error object from the middleware if the Handler throws an error.\n *\n * @see {@link https://hono.dev/docs/api/context#error}\n *\n * @example\n * ```ts\n * app.use('*', async (c, next) => {\n * await next()\n * if (c.error) {\n * // do something...\n * }\n * })\n * ```\n */\n error;\n #status;\n #executionCtx;\n #res;\n #layout;\n #renderer;\n #notFoundHandler;\n #preparedHeaders;\n #matchResult;\n #path;\n /**\n * Creates an instance of the Context class.\n *\n * @param req - The Request object.\n * @param options - Optional configuration options for the context.\n */\n constructor(req, options) {\n this.#rawRequest = req;\n if (options) {\n this.#executionCtx = options.executionCtx;\n this.env = options.env;\n this.#notFoundHandler = options.notFoundHandler;\n this.#path = options.path;\n this.#matchResult = options.matchResult;\n }\n }\n /**\n * `.req` is the instance of {@link HonoRequest}.\n */\n get req() {\n this.#req ??= new HonoRequest(this.#rawRequest, this.#path, this.#matchResult);\n return this.#req;\n }\n /**\n * @see {@link https://hono.dev/docs/api/context#event}\n * The FetchEvent associated with the current request.\n *\n * @throws Will throw an error if the context does not have a FetchEvent.\n */\n get event() {\n if (this.#executionCtx && \"respondWith\" in this.#executionCtx) {\n return this.#executionCtx;\n } else {\n throw Error(\"This context has no FetchEvent\");\n }\n }\n /**\n * @see {@link https://hono.dev/docs/api/context#executionctx}\n * The ExecutionContext associated with the current request.\n *\n * @throws Will throw an error if the context does not have an ExecutionContext.\n */\n get executionCtx() {\n if (this.#executionCtx) {\n return this.#executionCtx;\n } else {\n throw Error(\"This context has no ExecutionContext\");\n }\n }\n /**\n * @see {@link https://hono.dev/docs/api/context#res}\n * The Response object for the current request.\n */\n get res() {\n return this.#res ||= createResponseInstance(null, {\n headers: this.#preparedHeaders ??= new Headers()\n });\n }\n /**\n * Sets the Response object for the current request.\n *\n * @param _res - The Response object to set.\n */\n set res(_res) {\n if (this.#res && _res) {\n _res = createResponseInstance(_res.body, _res);\n for (const [k, v] of this.#res.headers.entries()) {\n if (k === \"content-type\") {\n continue;\n }\n if (k === \"set-cookie\") {\n const cookies = this.#res.headers.getSetCookie();\n _res.headers.delete(\"set-cookie\");\n for (const cookie of cookies) {\n _res.headers.append(\"set-cookie\", cookie);\n }\n } else {\n _res.headers.set(k, v);\n }\n }\n }\n this.#res = _res;\n this.finalized = true;\n }\n /**\n * `.render()` can create a response within a layout.\n *\n * @see {@link https://hono.dev/docs/api/context#render-setrenderer}\n *\n * @example\n * ```ts\n * app.get('/', (c) => {\n * return c.render('Hello!')\n * })\n * ```\n */\n render = (...args) => {\n this.#renderer ??= (content) => this.html(content);\n return this.#renderer(...args);\n };\n /**\n * Sets the layout for the response.\n *\n * @param layout - The layout to set.\n * @returns The layout function.\n */\n setLayout = (layout) => this.#layout = layout;\n /**\n * Gets the current layout for the response.\n *\n * @returns The current layout function.\n */\n getLayout = () => this.#layout;\n /**\n * `.setRenderer()` can set the layout in the custom middleware.\n *\n * @see {@link https://hono.dev/docs/api/context#render-setrenderer}\n *\n * @example\n * ```tsx\n * app.use('*', async (c, next) => {\n * c.setRenderer((content) => {\n * return c.html(\n * \n * \n *

{content}

\n * \n * \n * )\n * })\n * await next()\n * })\n * ```\n */\n setRenderer = (renderer) => {\n this.#renderer = renderer;\n };\n /**\n * `.header()` can set headers.\n *\n * @see {@link https://hono.dev/docs/api/context#header}\n *\n * @example\n * ```ts\n * app.get('/welcome', (c) => {\n * // Set headers\n * c.header('X-Message', 'Hello!')\n * c.header('Content-Type', 'text/plain')\n *\n * return c.body('Thank you for coming')\n * })\n * ```\n */\n header = (name, value, options) => {\n if (this.finalized) {\n this.#res = createResponseInstance(this.#res.body, this.#res);\n }\n const headers = this.#res ? this.#res.headers : this.#preparedHeaders ??= new Headers();\n if (value === void 0) {\n headers.delete(name);\n } else if (options?.append) {\n headers.append(name, value);\n } else {\n headers.set(name, value);\n }\n };\n status = (status) => {\n this.#status = status;\n };\n /**\n * `.set()` can set the value specified by the key.\n *\n * @see {@link https://hono.dev/docs/api/context#set-get}\n *\n * @example\n * ```ts\n * app.use('*', async (c, next) => {\n * c.set('message', 'Hono is hot!!')\n * await next()\n * })\n * ```\n */\n set = (key, value) => {\n this.#var ??= /* @__PURE__ */ new Map();\n this.#var.set(key, value);\n };\n /**\n * `.get()` can use the value specified by the key.\n *\n * @see {@link https://hono.dev/docs/api/context#set-get}\n *\n * @example\n * ```ts\n * app.get('/', (c) => {\n * const message = c.get('message')\n * return c.text(`The message is \"${message}\"`)\n * })\n * ```\n */\n get = (key) => {\n return this.#var ? this.#var.get(key) : void 0;\n };\n /**\n * `.var` can access the value of a variable.\n *\n * @see {@link https://hono.dev/docs/api/context#var}\n *\n * @example\n * ```ts\n * const result = c.var.client.oneMethod()\n * ```\n */\n // c.var.propName is a read-only\n get var() {\n if (!this.#var) {\n return {};\n }\n return Object.fromEntries(this.#var);\n }\n #newResponse(data, arg, headers) {\n const responseHeaders = this.#res ? new Headers(this.#res.headers) : this.#preparedHeaders ?? new Headers();\n if (typeof arg === \"object\" && \"headers\" in arg) {\n const argHeaders = arg.headers instanceof Headers ? arg.headers : new Headers(arg.headers);\n for (const [key, value] of argHeaders) {\n if (key.toLowerCase() === \"set-cookie\") {\n responseHeaders.append(key, value);\n } else {\n responseHeaders.set(key, value);\n }\n }\n }\n if (headers) {\n for (const [k, v] of Object.entries(headers)) {\n if (typeof v === \"string\") {\n responseHeaders.set(k, v);\n } else {\n responseHeaders.delete(k);\n for (const v2 of v) {\n responseHeaders.append(k, v2);\n }\n }\n }\n }\n const status = typeof arg === \"number\" ? arg : arg?.status ?? this.#status;\n return createResponseInstance(data, { status, headers: responseHeaders });\n }\n newResponse = (...args) => this.#newResponse(...args);\n /**\n * `.body()` can return the HTTP response.\n * You can set headers with `.header()` and set HTTP status code with `.status`.\n * This can also be set in `.text()`, `.json()` and so on.\n *\n * @see {@link https://hono.dev/docs/api/context#body}\n *\n * @example\n * ```ts\n * app.get('/welcome', (c) => {\n * // Set headers\n * c.header('X-Message', 'Hello!')\n * c.header('Content-Type', 'text/plain')\n * // Set HTTP status code\n * c.status(201)\n *\n * // Return the response body\n * return c.body('Thank you for coming')\n * })\n * ```\n */\n body = (data, arg, headers) => this.#newResponse(data, arg, headers);\n /**\n * `.text()` can render text as `Content-Type:text/plain`.\n *\n * @see {@link https://hono.dev/docs/api/context#text}\n *\n * @example\n * ```ts\n * app.get('/say', (c) => {\n * return c.text('Hello!')\n * })\n * ```\n */\n text = (text, arg, headers) => {\n return !this.#preparedHeaders && !this.#status && !arg && !headers && !this.finalized ? new Response(text) : this.#newResponse(\n text,\n arg,\n setDefaultContentType(TEXT_PLAIN, headers)\n );\n };\n /**\n * `.json()` can render JSON as `Content-Type:application/json`.\n *\n * @see {@link https://hono.dev/docs/api/context#json}\n *\n * @example\n * ```ts\n * app.get('/api', (c) => {\n * return c.json({ message: 'Hello!' })\n * })\n * ```\n */\n json = (object, arg, headers) => {\n return this.#newResponse(\n JSON.stringify(object),\n arg,\n setDefaultContentType(\"application/json\", headers)\n );\n };\n html = (html, arg, headers) => {\n const res = (html2) => this.#newResponse(html2, arg, setDefaultContentType(\"text/html; charset=UTF-8\", headers));\n return typeof html === \"object\" ? resolveCallback(html, HtmlEscapedCallbackPhase.Stringify, false, {}).then(res) : res(html);\n };\n /**\n * `.redirect()` can Redirect, default status code is 302.\n *\n * @see {@link https://hono.dev/docs/api/context#redirect}\n *\n * @example\n * ```ts\n * app.get('/redirect', (c) => {\n * return c.redirect('/')\n * })\n * app.get('/redirect-permanently', (c) => {\n * return c.redirect('/', 301)\n * })\n * ```\n */\n redirect = (location, status) => {\n const locationString = String(location);\n this.header(\n \"Location\",\n // Multibyes should be encoded\n // eslint-disable-next-line no-control-regex\n !/[^\\x00-\\xFF]/.test(locationString) ? locationString : encodeURI(locationString)\n );\n return this.newResponse(null, status ?? 302);\n };\n /**\n * `.notFound()` can return the Not Found Response.\n *\n * @see {@link https://hono.dev/docs/api/context#notfound}\n *\n * @example\n * ```ts\n * app.get('/notfound', (c) => {\n * return c.notFound()\n * })\n * ```\n */\n notFound = () => {\n this.#notFoundHandler ??= () => createResponseInstance();\n return this.#notFoundHandler(this);\n };\n};\nexport {\n Context,\n TEXT_PLAIN\n};\n", "// src/request.ts\nimport { HTTPException } from \"./http-exception.js\";\nimport { GET_MATCH_RESULT } from \"./request/constants.js\";\nimport { parseBody } from \"./utils/body.js\";\nimport { decodeURIComponent_, getQueryParam, getQueryParams, tryDecode } from \"./utils/url.js\";\nvar tryDecodeURIComponent = (str) => tryDecode(str, decodeURIComponent_);\nvar HonoRequest = class {\n /**\n * `.raw` can get the raw Request object.\n *\n * @see {@link https://hono.dev/docs/api/request#raw}\n *\n * @example\n * ```ts\n * // For Cloudflare Workers\n * app.post('/', async (c) => {\n * const metadata = c.req.raw.cf?.hostMetadata?\n * ...\n * })\n * ```\n */\n raw;\n #validatedData;\n // Short name of validatedData\n #matchResult;\n routeIndex = 0;\n /**\n * `.path` can get the pathname of the request.\n *\n * @see {@link https://hono.dev/docs/api/request#path}\n *\n * @example\n * ```ts\n * app.get('/about/me', (c) => {\n * const pathname = c.req.path // `/about/me`\n * })\n * ```\n */\n path;\n bodyCache = {};\n constructor(request, path = \"/\", matchResult = [[]]) {\n this.raw = request;\n this.path = path;\n this.#matchResult = matchResult;\n this.#validatedData = {};\n }\n param(key) {\n return key ? this.#getDecodedParam(key) : this.#getAllDecodedParams();\n }\n #getDecodedParam(key) {\n const paramKey = this.#matchResult[0][this.routeIndex][1][key];\n const param = this.#getParamValue(paramKey);\n return param && /\\%/.test(param) ? tryDecodeURIComponent(param) : param;\n }\n #getAllDecodedParams() {\n const decoded = {};\n const keys = Object.keys(this.#matchResult[0][this.routeIndex][1]);\n for (const key of keys) {\n const value = this.#getParamValue(this.#matchResult[0][this.routeIndex][1][key]);\n if (value !== void 0) {\n decoded[key] = /\\%/.test(value) ? tryDecodeURIComponent(value) : value;\n }\n }\n return decoded;\n }\n #getParamValue(paramKey) {\n return this.#matchResult[1] ? this.#matchResult[1][paramKey] : paramKey;\n }\n query(key) {\n return getQueryParam(this.url, key);\n }\n queries(key) {\n return getQueryParams(this.url, key);\n }\n header(name) {\n if (name) {\n return this.raw.headers.get(name) ?? void 0;\n }\n const headerData = {};\n this.raw.headers.forEach((value, key) => {\n headerData[key] = value;\n });\n return headerData;\n }\n async parseBody(options) {\n return parseBody(this, options);\n }\n #cachedBody = (key) => {\n const { bodyCache, raw } = this;\n const cachedBody = bodyCache[key];\n if (cachedBody) {\n return cachedBody;\n }\n const anyCachedKey = Object.keys(bodyCache)[0];\n if (anyCachedKey) {\n return bodyCache[anyCachedKey].then((body) => {\n if (anyCachedKey === \"json\") {\n body = JSON.stringify(body);\n }\n return new Response(body)[key]();\n });\n }\n return bodyCache[key] = raw[key]();\n };\n /**\n * `.json()` can parse Request body of type `application/json`\n *\n * @see {@link https://hono.dev/docs/api/request#json}\n *\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.json()\n * })\n * ```\n */\n json() {\n return this.#cachedBody(\"text\").then((text) => JSON.parse(text));\n }\n /**\n * `.text()` can parse Request body of type `text/plain`\n *\n * @see {@link https://hono.dev/docs/api/request#text}\n *\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.text()\n * })\n * ```\n */\n text() {\n return this.#cachedBody(\"text\");\n }\n /**\n * `.arrayBuffer()` parse Request body as an `ArrayBuffer`\n *\n * @see {@link https://hono.dev/docs/api/request#arraybuffer}\n *\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.arrayBuffer()\n * })\n * ```\n */\n arrayBuffer() {\n return this.#cachedBody(\"arrayBuffer\");\n }\n /**\n * Parses the request body as a `Blob`.\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.blob();\n * });\n * ```\n * @see https://hono.dev/docs/api/request#blob\n */\n blob() {\n return this.#cachedBody(\"blob\");\n }\n /**\n * Parses the request body as `FormData`.\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.formData();\n * });\n * ```\n * @see https://hono.dev/docs/api/request#formdata\n */\n formData() {\n return this.#cachedBody(\"formData\");\n }\n /**\n * Adds validated data to the request.\n *\n * @param target - The target of the validation.\n * @param data - The validated data to add.\n */\n addValidatedData(target, data) {\n this.#validatedData[target] = data;\n }\n valid(target) {\n return this.#validatedData[target];\n }\n /**\n * `.url()` can get the request url strings.\n *\n * @see {@link https://hono.dev/docs/api/request#url}\n *\n * @example\n * ```ts\n * app.get('/about/me', (c) => {\n * const url = c.req.url // `http://localhost:8787/about/me`\n * ...\n * })\n * ```\n */\n get url() {\n return this.raw.url;\n }\n /**\n * `.method()` can get the method name of the request.\n *\n * @see {@link https://hono.dev/docs/api/request#method}\n *\n * @example\n * ```ts\n * app.get('/about/me', (c) => {\n * const method = c.req.method // `GET`\n * })\n * ```\n */\n get method() {\n return this.raw.method;\n }\n get [GET_MATCH_RESULT]() {\n return this.#matchResult;\n }\n /**\n * `.matchedRoutes()` can return a matched route in the handler\n *\n * @deprecated\n *\n * Use matchedRoutes helper defined in \"hono/route\" instead.\n *\n * @see {@link https://hono.dev/docs/api/request#matchedroutes}\n *\n * @example\n * ```ts\n * app.use('*', async function logger(c, next) {\n * await next()\n * c.req.matchedRoutes.forEach(({ handler, method, path }, i) => {\n * const name = handler.name || (handler.length < 2 ? '[handler]' : '[middleware]')\n * console.log(\n * method,\n * ' ',\n * path,\n * ' '.repeat(Math.max(10 - path.length, 0)),\n * name,\n * i === c.req.routeIndex ? '<- respond from here' : ''\n * )\n * })\n * })\n * ```\n */\n get matchedRoutes() {\n return this.#matchResult[0].map(([[, route]]) => route);\n }\n /**\n * `routePath()` can retrieve the path registered within the handler\n *\n * @deprecated\n *\n * Use routePath helper defined in \"hono/route\" instead.\n *\n * @see {@link https://hono.dev/docs/api/request#routepath}\n *\n * @example\n * ```ts\n * app.get('/posts/:id', (c) => {\n * return c.json({ path: c.req.routePath })\n * })\n * ```\n */\n get routePath() {\n return this.#matchResult[0].map(([[, route]]) => route)[this.routeIndex].path;\n }\n};\nvar cloneRawRequest = async (req) => {\n if (!req.raw.bodyUsed) {\n return req.raw.clone();\n }\n const cacheKey = Object.keys(req.bodyCache)[0];\n if (!cacheKey) {\n throw new HTTPException(500, {\n message: \"Cannot clone request: body was already consumed and not cached. Please use HonoRequest methods (e.g., req.json(), req.text()) instead of consuming req.raw directly.\"\n });\n }\n const requestInit = {\n body: await req[cacheKey](),\n cache: req.raw.cache,\n credentials: req.raw.credentials,\n headers: req.header(),\n integrity: req.raw.integrity,\n keepalive: req.raw.keepalive,\n method: req.method,\n mode: req.raw.mode,\n redirect: req.raw.redirect,\n referrer: req.raw.referrer,\n referrerPolicy: req.raw.referrerPolicy,\n signal: req.raw.signal\n };\n return new Request(req.url, requestInit);\n};\nexport {\n HonoRequest,\n cloneRawRequest\n};\n", "// src/http-exception.ts\nvar HTTPException = class extends Error {\n res;\n status;\n /**\n * Creates an instance of `HTTPException`.\n * @param status - HTTP status code for the exception. Defaults to 500.\n * @param options - Additional options for the exception.\n */\n constructor(status = 500, options) {\n super(options?.message, { cause: options?.cause });\n this.res = options?.res;\n this.status = status;\n }\n /**\n * Returns the response object associated with the exception.\n * If a response object is not provided, a new response is created with the error message and status code.\n * @returns The response object.\n */\n getResponse() {\n if (this.res) {\n const newResponse = new Response(this.res.body, {\n status: this.status,\n headers: this.res.headers\n });\n return newResponse;\n }\n return new Response(this.message, {\n status: this.status\n });\n }\n};\nexport {\n HTTPException\n};\n", "// src/request/constants.ts\nvar GET_MATCH_RESULT = /* @__PURE__ */ Symbol();\nexport {\n GET_MATCH_RESULT\n};\n", "// src/utils/body.ts\nimport { HonoRequest } from \"../request.js\";\nvar parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) => {\n const { all = false, dot = false } = options;\n const headers = request instanceof HonoRequest ? request.raw.headers : request.headers;\n const contentType = headers.get(\"Content-Type\");\n if (contentType?.startsWith(\"multipart/form-data\") || contentType?.startsWith(\"application/x-www-form-urlencoded\")) {\n return parseFormData(request, { all, dot });\n }\n return {};\n};\nasync function parseFormData(request, options) {\n const formData = await request.formData();\n if (formData) {\n return convertFormDataToBodyData(formData, options);\n }\n return {};\n}\nfunction convertFormDataToBodyData(formData, options) {\n const form = /* @__PURE__ */ Object.create(null);\n formData.forEach((value, key) => {\n const shouldParseAllValues = options.all || key.endsWith(\"[]\");\n if (!shouldParseAllValues) {\n form[key] = value;\n } else {\n handleParsingAllValues(form, key, value);\n }\n });\n if (options.dot) {\n Object.entries(form).forEach(([key, value]) => {\n const shouldParseDotValues = key.includes(\".\");\n if (shouldParseDotValues) {\n handleParsingNestedValues(form, key, value);\n delete form[key];\n }\n });\n }\n return form;\n}\nvar handleParsingAllValues = (form, key, value) => {\n if (form[key] !== void 0) {\n if (Array.isArray(form[key])) {\n ;\n form[key].push(value);\n } else {\n form[key] = [form[key], value];\n }\n } else {\n if (!key.endsWith(\"[]\")) {\n form[key] = value;\n } else {\n form[key] = [value];\n }\n }\n};\nvar handleParsingNestedValues = (form, key, value) => {\n if (/(?:^|\\.)__proto__\\./.test(key)) {\n return;\n }\n let nestedForm = form;\n const keys = key.split(\".\");\n keys.forEach((key2, index) => {\n if (index === keys.length - 1) {\n nestedForm[key2] = value;\n } else {\n if (!nestedForm[key2] || typeof nestedForm[key2] !== \"object\" || Array.isArray(nestedForm[key2]) || nestedForm[key2] instanceof File) {\n nestedForm[key2] = /* @__PURE__ */ Object.create(null);\n }\n nestedForm = nestedForm[key2];\n }\n });\n};\nexport {\n parseBody\n};\n", "// src/utils/url.ts\nvar splitPath = (path) => {\n const paths = path.split(\"/\");\n if (paths[0] === \"\") {\n paths.shift();\n }\n return paths;\n};\nvar splitRoutingPath = (routePath) => {\n const { groups, path } = extractGroupsFromPath(routePath);\n const paths = splitPath(path);\n return replaceGroupMarks(paths, groups);\n};\nvar extractGroupsFromPath = (path) => {\n const groups = [];\n path = path.replace(/\\{[^}]+\\}/g, (match, index) => {\n const mark = `@${index}`;\n groups.push([mark, match]);\n return mark;\n });\n return { groups, path };\n};\nvar replaceGroupMarks = (paths, groups) => {\n for (let i = groups.length - 1; i >= 0; i--) {\n const [mark] = groups[i];\n for (let j = paths.length - 1; j >= 0; j--) {\n if (paths[j].includes(mark)) {\n paths[j] = paths[j].replace(mark, groups[i][1]);\n break;\n }\n }\n }\n return paths;\n};\nvar patternCache = {};\nvar getPattern = (label, next) => {\n if (label === \"*\") {\n return \"*\";\n }\n const match = label.match(/^\\:([^\\{\\}]+)(?:\\{(.+)\\})?$/);\n if (match) {\n const cacheKey = `${label}#${next}`;\n if (!patternCache[cacheKey]) {\n if (match[2]) {\n patternCache[cacheKey] = next && next[0] !== \":\" && next[0] !== \"*\" ? [cacheKey, match[1], new RegExp(`^${match[2]}(?=/${next})`)] : [label, match[1], new RegExp(`^${match[2]}$`)];\n } else {\n patternCache[cacheKey] = [label, match[1], true];\n }\n }\n return patternCache[cacheKey];\n }\n return null;\n};\nvar tryDecode = (str, decoder) => {\n try {\n return decoder(str);\n } catch {\n return str.replace(/(?:%[0-9A-Fa-f]{2})+/g, (match) => {\n try {\n return decoder(match);\n } catch {\n return match;\n }\n });\n }\n};\nvar tryDecodeURI = (str) => tryDecode(str, decodeURI);\nvar getPath = (request) => {\n const url = request.url;\n const start = url.indexOf(\"/\", url.indexOf(\":\") + 4);\n let i = start;\n for (; i < url.length; i++) {\n const charCode = url.charCodeAt(i);\n if (charCode === 37) {\n const queryIndex = url.indexOf(\"?\", i);\n const hashIndex = url.indexOf(\"#\", i);\n const end = queryIndex === -1 ? hashIndex === -1 ? void 0 : hashIndex : hashIndex === -1 ? queryIndex : Math.min(queryIndex, hashIndex);\n const path = url.slice(start, end);\n return tryDecodeURI(path.includes(\"%25\") ? path.replace(/%25/g, \"%2525\") : path);\n } else if (charCode === 63 || charCode === 35) {\n break;\n }\n }\n return url.slice(start, i);\n};\nvar getQueryStrings = (url) => {\n const queryIndex = url.indexOf(\"?\", 8);\n return queryIndex === -1 ? \"\" : \"?\" + url.slice(queryIndex + 1);\n};\nvar getPathNoStrict = (request) => {\n const result = getPath(request);\n return result.length > 1 && result.at(-1) === \"/\" ? result.slice(0, -1) : result;\n};\nvar mergePath = (base, sub, ...rest) => {\n if (rest.length) {\n sub = mergePath(sub, ...rest);\n }\n return `${base?.[0] === \"/\" ? \"\" : \"/\"}${base}${sub === \"/\" ? \"\" : `${base?.at(-1) === \"/\" ? \"\" : \"/\"}${sub?.[0] === \"/\" ? sub.slice(1) : sub}`}`;\n};\nvar checkOptionalParameter = (path) => {\n if (path.charCodeAt(path.length - 1) !== 63 || !path.includes(\":\")) {\n return null;\n }\n const segments = path.split(\"/\");\n const results = [];\n let basePath = \"\";\n segments.forEach((segment) => {\n if (segment !== \"\" && !/\\:/.test(segment)) {\n basePath += \"/\" + segment;\n } else if (/\\:/.test(segment)) {\n if (/\\?/.test(segment)) {\n if (results.length === 0 && basePath === \"\") {\n results.push(\"/\");\n } else {\n results.push(basePath);\n }\n const optionalSegment = segment.replace(\"?\", \"\");\n basePath += \"/\" + optionalSegment;\n results.push(basePath);\n } else {\n basePath += \"/\" + segment;\n }\n }\n });\n return results.filter((v, i, a) => a.indexOf(v) === i);\n};\nvar _decodeURI = (value) => {\n if (!/[%+]/.test(value)) {\n return value;\n }\n if (value.indexOf(\"+\") !== -1) {\n value = value.replace(/\\+/g, \" \");\n }\n return value.indexOf(\"%\") !== -1 ? tryDecode(value, decodeURIComponent_) : value;\n};\nvar _getQueryParam = (url, key, multiple) => {\n let encoded;\n if (!multiple && key && !/[%+]/.test(key)) {\n let keyIndex2 = url.indexOf(\"?\", 8);\n if (keyIndex2 === -1) {\n return void 0;\n }\n if (!url.startsWith(key, keyIndex2 + 1)) {\n keyIndex2 = url.indexOf(`&${key}`, keyIndex2 + 1);\n }\n while (keyIndex2 !== -1) {\n const trailingKeyCode = url.charCodeAt(keyIndex2 + key.length + 1);\n if (trailingKeyCode === 61) {\n const valueIndex = keyIndex2 + key.length + 2;\n const endIndex = url.indexOf(\"&\", valueIndex);\n return _decodeURI(url.slice(valueIndex, endIndex === -1 ? void 0 : endIndex));\n } else if (trailingKeyCode == 38 || isNaN(trailingKeyCode)) {\n return \"\";\n }\n keyIndex2 = url.indexOf(`&${key}`, keyIndex2 + 1);\n }\n encoded = /[%+]/.test(url);\n if (!encoded) {\n return void 0;\n }\n }\n const results = {};\n encoded ??= /[%+]/.test(url);\n let keyIndex = url.indexOf(\"?\", 8);\n while (keyIndex !== -1) {\n const nextKeyIndex = url.indexOf(\"&\", keyIndex + 1);\n let valueIndex = url.indexOf(\"=\", keyIndex);\n if (valueIndex > nextKeyIndex && nextKeyIndex !== -1) {\n valueIndex = -1;\n }\n let name = url.slice(\n keyIndex + 1,\n valueIndex === -1 ? nextKeyIndex === -1 ? void 0 : nextKeyIndex : valueIndex\n );\n if (encoded) {\n name = _decodeURI(name);\n }\n keyIndex = nextKeyIndex;\n if (name === \"\") {\n continue;\n }\n let value;\n if (valueIndex === -1) {\n value = \"\";\n } else {\n value = url.slice(valueIndex + 1, nextKeyIndex === -1 ? void 0 : nextKeyIndex);\n if (encoded) {\n value = _decodeURI(value);\n }\n }\n if (multiple) {\n if (!(results[name] && Array.isArray(results[name]))) {\n results[name] = [];\n }\n ;\n results[name].push(value);\n } else {\n results[name] ??= value;\n }\n }\n return key ? results[key] : results;\n};\nvar getQueryParam = _getQueryParam;\nvar getQueryParams = (url, key) => {\n return _getQueryParam(url, key, true);\n};\nvar decodeURIComponent_ = decodeURIComponent;\nexport {\n checkOptionalParameter,\n decodeURIComponent_,\n getPath,\n getPathNoStrict,\n getPattern,\n getQueryParam,\n getQueryParams,\n getQueryStrings,\n mergePath,\n splitPath,\n splitRoutingPath,\n tryDecode,\n tryDecodeURI\n};\n", "// src/utils/html.ts\nvar HtmlEscapedCallbackPhase = {\n Stringify: 1,\n BeforeStream: 2,\n Stream: 3\n};\nvar raw = (value, callbacks) => {\n const escapedString = new String(value);\n escapedString.isEscaped = true;\n escapedString.callbacks = callbacks;\n return escapedString;\n};\nvar escapeRe = /[&<>'\"]/;\nvar stringBufferToString = async (buffer, callbacks) => {\n let str = \"\";\n callbacks ||= [];\n const resolvedBuffer = await Promise.all(buffer);\n for (let i = resolvedBuffer.length - 1; ; i--) {\n str += resolvedBuffer[i];\n i--;\n if (i < 0) {\n break;\n }\n let r = resolvedBuffer[i];\n if (typeof r === \"object\") {\n callbacks.push(...r.callbacks || []);\n }\n const isEscaped = r.isEscaped;\n r = await (typeof r === \"object\" ? r.toString() : r);\n if (typeof r === \"object\") {\n callbacks.push(...r.callbacks || []);\n }\n if (r.isEscaped ?? isEscaped) {\n str += r;\n } else {\n const buf = [str];\n escapeToBuffer(r, buf);\n str = buf[0];\n }\n }\n return raw(str, callbacks);\n};\nvar escapeToBuffer = (str, buffer) => {\n const match = str.search(escapeRe);\n if (match === -1) {\n buffer[0] += str;\n return;\n }\n let escape;\n let index;\n let lastIndex = 0;\n for (index = match; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n escape = \""\";\n break;\n case 39:\n escape = \"'\";\n break;\n case 38:\n escape = \"&\";\n break;\n case 60:\n escape = \"<\";\n break;\n case 62:\n escape = \">\";\n break;\n default:\n continue;\n }\n buffer[0] += str.substring(lastIndex, index) + escape;\n lastIndex = index + 1;\n }\n buffer[0] += str.substring(lastIndex, index);\n};\nvar resolveCallbackSync = (str) => {\n const callbacks = str.callbacks;\n if (!callbacks?.length) {\n return str;\n }\n const buffer = [str];\n const context = {};\n callbacks.forEach((c) => c({ phase: HtmlEscapedCallbackPhase.Stringify, buffer, context }));\n return buffer[0];\n};\nvar resolveCallback = async (str, phase, preserveCallbacks, context, buffer) => {\n if (typeof str === \"object\" && !(str instanceof String)) {\n if (!(str instanceof Promise)) {\n str = str.toString();\n }\n if (str instanceof Promise) {\n str = await str;\n }\n }\n const callbacks = str.callbacks;\n if (!callbacks?.length) {\n return Promise.resolve(str);\n }\n if (buffer) {\n buffer[0] += str;\n } else {\n buffer = [str];\n }\n const resStr = Promise.all(callbacks.map((c) => c({ phase, buffer, context }))).then(\n (res) => Promise.all(\n res.filter(Boolean).map((str2) => resolveCallback(str2, phase, false, context, buffer))\n ).then(() => buffer[0])\n );\n if (preserveCallbacks) {\n return raw(await resStr, callbacks);\n } else {\n return resStr;\n }\n};\nexport {\n HtmlEscapedCallbackPhase,\n escapeToBuffer,\n raw,\n resolveCallback,\n resolveCallbackSync,\n stringBufferToString\n};\n", "// src/router.ts\nvar METHOD_NAME_ALL = \"ALL\";\nvar METHOD_NAME_ALL_LOWERCASE = \"all\";\nvar METHODS = [\"get\", \"post\", \"put\", \"delete\", \"options\", \"patch\"];\nvar MESSAGE_MATCHER_IS_ALREADY_BUILT = \"Can not add a route since the matcher is already built.\";\nvar UnsupportedPathError = class extends Error {\n};\nexport {\n MESSAGE_MATCHER_IS_ALREADY_BUILT,\n METHODS,\n METHOD_NAME_ALL,\n METHOD_NAME_ALL_LOWERCASE,\n UnsupportedPathError\n};\n", "// src/utils/constants.ts\nvar COMPOSED_HANDLER = \"__COMPOSED_HANDLER\";\nexport {\n COMPOSED_HANDLER\n};\n", "// src/router/reg-exp-router/index.ts\nimport { RegExpRouter } from \"./router.js\";\nimport { PreparedRegExpRouter, buildInitParams, serializeInitParams } from \"./prepared-router.js\";\nexport {\n PreparedRegExpRouter,\n RegExpRouter,\n buildInitParams,\n serializeInitParams\n};\n", "// src/router/reg-exp-router/router.ts\nimport {\n MESSAGE_MATCHER_IS_ALREADY_BUILT,\n METHOD_NAME_ALL,\n UnsupportedPathError\n} from \"../../router.js\";\nimport { checkOptionalParameter } from \"../../utils/url.js\";\nimport { match, emptyParam } from \"./matcher.js\";\nimport { PATH_ERROR } from \"./node.js\";\nimport { Trie } from \"./trie.js\";\nvar nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];\nvar wildcardRegExpCache = /* @__PURE__ */ Object.create(null);\nfunction buildWildcardRegExp(path) {\n return wildcardRegExpCache[path] ??= new RegExp(\n path === \"*\" ? \"\" : `^${path.replace(\n /\\/\\*$|([.\\\\+*[^\\]$()])/g,\n (_, metaChar) => metaChar ? `\\\\${metaChar}` : \"(?:|/.*)\"\n )}$`\n );\n}\nfunction clearWildcardRegExpCache() {\n wildcardRegExpCache = /* @__PURE__ */ Object.create(null);\n}\nfunction buildMatcherFromPreprocessedRoutes(routes) {\n const trie = new Trie();\n const handlerData = [];\n if (routes.length === 0) {\n return nullMatcher;\n }\n const routesWithStaticPathFlag = routes.map(\n (route) => [!/\\*|\\/:/.test(route[0]), ...route]\n ).sort(\n ([isStaticA, pathA], [isStaticB, pathB]) => isStaticA ? 1 : isStaticB ? -1 : pathA.length - pathB.length\n );\n const staticMap = /* @__PURE__ */ Object.create(null);\n for (let i = 0, j = -1, len = routesWithStaticPathFlag.length; i < len; i++) {\n const [pathErrorCheckOnly, path, handlers] = routesWithStaticPathFlag[i];\n if (pathErrorCheckOnly) {\n staticMap[path] = [handlers.map(([h]) => [h, /* @__PURE__ */ Object.create(null)]), emptyParam];\n } else {\n j++;\n }\n let paramAssoc;\n try {\n paramAssoc = trie.insert(path, j, pathErrorCheckOnly);\n } catch (e) {\n throw e === PATH_ERROR ? new UnsupportedPathError(path) : e;\n }\n if (pathErrorCheckOnly) {\n continue;\n }\n handlerData[j] = handlers.map(([h, paramCount]) => {\n const paramIndexMap = /* @__PURE__ */ Object.create(null);\n paramCount -= 1;\n for (; paramCount >= 0; paramCount--) {\n const [key, value] = paramAssoc[paramCount];\n paramIndexMap[key] = value;\n }\n return [h, paramIndexMap];\n });\n }\n const [regexp, indexReplacementMap, paramReplacementMap] = trie.buildRegExp();\n for (let i = 0, len = handlerData.length; i < len; i++) {\n for (let j = 0, len2 = handlerData[i].length; j < len2; j++) {\n const map = handlerData[i][j]?.[1];\n if (!map) {\n continue;\n }\n const keys = Object.keys(map);\n for (let k = 0, len3 = keys.length; k < len3; k++) {\n map[keys[k]] = paramReplacementMap[map[keys[k]]];\n }\n }\n }\n const handlerMap = [];\n for (const i in indexReplacementMap) {\n handlerMap[i] = handlerData[indexReplacementMap[i]];\n }\n return [regexp, handlerMap, staticMap];\n}\nfunction findMiddleware(middleware, path) {\n if (!middleware) {\n return void 0;\n }\n for (const k of Object.keys(middleware).sort((a, b) => b.length - a.length)) {\n if (buildWildcardRegExp(k).test(path)) {\n return [...middleware[k]];\n }\n }\n return void 0;\n}\nvar RegExpRouter = class {\n name = \"RegExpRouter\";\n #middleware;\n #routes;\n constructor() {\n this.#middleware = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) };\n this.#routes = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) };\n }\n add(method, path, handler) {\n const middleware = this.#middleware;\n const routes = this.#routes;\n if (!middleware || !routes) {\n throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT);\n }\n if (!middleware[method]) {\n ;\n [middleware, routes].forEach((handlerMap) => {\n handlerMap[method] = /* @__PURE__ */ Object.create(null);\n Object.keys(handlerMap[METHOD_NAME_ALL]).forEach((p) => {\n handlerMap[method][p] = [...handlerMap[METHOD_NAME_ALL][p]];\n });\n });\n }\n if (path === \"/*\") {\n path = \"*\";\n }\n const paramCount = (path.match(/\\/:/g) || []).length;\n if (/\\*$/.test(path)) {\n const re = buildWildcardRegExp(path);\n if (method === METHOD_NAME_ALL) {\n Object.keys(middleware).forEach((m) => {\n middleware[m][path] ||= findMiddleware(middleware[m], path) || findMiddleware(middleware[METHOD_NAME_ALL], path) || [];\n });\n } else {\n middleware[method][path] ||= findMiddleware(middleware[method], path) || findMiddleware(middleware[METHOD_NAME_ALL], path) || [];\n }\n Object.keys(middleware).forEach((m) => {\n if (method === METHOD_NAME_ALL || method === m) {\n Object.keys(middleware[m]).forEach((p) => {\n re.test(p) && middleware[m][p].push([handler, paramCount]);\n });\n }\n });\n Object.keys(routes).forEach((m) => {\n if (method === METHOD_NAME_ALL || method === m) {\n Object.keys(routes[m]).forEach(\n (p) => re.test(p) && routes[m][p].push([handler, paramCount])\n );\n }\n });\n return;\n }\n const paths = checkOptionalParameter(path) || [path];\n for (let i = 0, len = paths.length; i < len; i++) {\n const path2 = paths[i];\n Object.keys(routes).forEach((m) => {\n if (method === METHOD_NAME_ALL || method === m) {\n routes[m][path2] ||= [\n ...findMiddleware(middleware[m], path2) || findMiddleware(middleware[METHOD_NAME_ALL], path2) || []\n ];\n routes[m][path2].push([handler, paramCount - len + i + 1]);\n }\n });\n }\n }\n match = match;\n buildAllMatchers() {\n const matchers = /* @__PURE__ */ Object.create(null);\n Object.keys(this.#routes).concat(Object.keys(this.#middleware)).forEach((method) => {\n matchers[method] ||= this.#buildMatcher(method);\n });\n this.#middleware = this.#routes = void 0;\n clearWildcardRegExpCache();\n return matchers;\n }\n #buildMatcher(method) {\n const routes = [];\n let hasOwnRoute = method === METHOD_NAME_ALL;\n [this.#middleware, this.#routes].forEach((r) => {\n const ownRoute = r[method] ? Object.keys(r[method]).map((path) => [path, r[method][path]]) : [];\n if (ownRoute.length !== 0) {\n hasOwnRoute ||= true;\n routes.push(...ownRoute);\n } else if (method !== METHOD_NAME_ALL) {\n routes.push(\n ...Object.keys(r[METHOD_NAME_ALL]).map((path) => [path, r[METHOD_NAME_ALL][path]])\n );\n }\n });\n if (!hasOwnRoute) {\n return null;\n } else {\n return buildMatcherFromPreprocessedRoutes(routes);\n }\n }\n};\nexport {\n RegExpRouter\n};\n", "// src/router/reg-exp-router/matcher.ts\nimport { METHOD_NAME_ALL } from \"../../router.js\";\nvar emptyParam = [];\nfunction match(method, path) {\n const matchers = this.buildAllMatchers();\n const match2 = ((method2, path2) => {\n const matcher = matchers[method2] || matchers[METHOD_NAME_ALL];\n const staticMatch = matcher[2][path2];\n if (staticMatch) {\n return staticMatch;\n }\n const match3 = path2.match(matcher[0]);\n if (!match3) {\n return [[], emptyParam];\n }\n const index = match3.indexOf(\"\", 1);\n return [matcher[1][index], match3];\n });\n this.match = match2;\n return match2(method, path);\n}\nexport {\n emptyParam,\n match\n};\n", "// src/router/reg-exp-router/node.ts\nvar LABEL_REG_EXP_STR = \"[^/]+\";\nvar ONLY_WILDCARD_REG_EXP_STR = \".*\";\nvar TAIL_WILDCARD_REG_EXP_STR = \"(?:|/.*)\";\nvar PATH_ERROR = /* @__PURE__ */ Symbol();\nvar regExpMetaChars = new Set(\".\\\\+*[^]$()\");\nfunction compareKey(a, b) {\n if (a.length === 1) {\n return b.length === 1 ? a < b ? -1 : 1 : -1;\n }\n if (b.length === 1) {\n return 1;\n }\n if (a === ONLY_WILDCARD_REG_EXP_STR || a === TAIL_WILDCARD_REG_EXP_STR) {\n return 1;\n } else if (b === ONLY_WILDCARD_REG_EXP_STR || b === TAIL_WILDCARD_REG_EXP_STR) {\n return -1;\n }\n if (a === LABEL_REG_EXP_STR) {\n return 1;\n } else if (b === LABEL_REG_EXP_STR) {\n return -1;\n }\n return a.length === b.length ? a < b ? -1 : 1 : b.length - a.length;\n}\nvar Node = class _Node {\n #index;\n #varIndex;\n #children = /* @__PURE__ */ Object.create(null);\n insert(tokens, index, paramMap, context, pathErrorCheckOnly) {\n if (tokens.length === 0) {\n if (this.#index !== void 0) {\n throw PATH_ERROR;\n }\n if (pathErrorCheckOnly) {\n return;\n }\n this.#index = index;\n return;\n }\n const [token, ...restTokens] = tokens;\n const pattern = token === \"*\" ? restTokens.length === 0 ? [\"\", \"\", ONLY_WILDCARD_REG_EXP_STR] : [\"\", \"\", LABEL_REG_EXP_STR] : token === \"/*\" ? [\"\", \"\", TAIL_WILDCARD_REG_EXP_STR] : token.match(/^\\:([^\\{\\}]+)(?:\\{(.+)\\})?$/);\n let node;\n if (pattern) {\n const name = pattern[1];\n let regexpStr = pattern[2] || LABEL_REG_EXP_STR;\n if (name && pattern[2]) {\n if (regexpStr === \".*\") {\n throw PATH_ERROR;\n }\n regexpStr = regexpStr.replace(/^\\((?!\\?:)(?=[^)]+\\)$)/, \"(?:\");\n if (/\\((?!\\?:)/.test(regexpStr)) {\n throw PATH_ERROR;\n }\n }\n node = this.#children[regexpStr];\n if (!node) {\n if (Object.keys(this.#children).some(\n (k) => k !== ONLY_WILDCARD_REG_EXP_STR && k !== TAIL_WILDCARD_REG_EXP_STR\n )) {\n throw PATH_ERROR;\n }\n if (pathErrorCheckOnly) {\n return;\n }\n node = this.#children[regexpStr] = new _Node();\n if (name !== \"\") {\n node.#varIndex = context.varIndex++;\n }\n }\n if (!pathErrorCheckOnly && name !== \"\") {\n paramMap.push([name, node.#varIndex]);\n }\n } else {\n node = this.#children[token];\n if (!node) {\n if (Object.keys(this.#children).some(\n (k) => k.length > 1 && k !== ONLY_WILDCARD_REG_EXP_STR && k !== TAIL_WILDCARD_REG_EXP_STR\n )) {\n throw PATH_ERROR;\n }\n if (pathErrorCheckOnly) {\n return;\n }\n node = this.#children[token] = new _Node();\n }\n }\n node.insert(restTokens, index, paramMap, context, pathErrorCheckOnly);\n }\n buildRegExpStr() {\n const childKeys = Object.keys(this.#children).sort(compareKey);\n const strList = childKeys.map((k) => {\n const c = this.#children[k];\n return (typeof c.#varIndex === \"number\" ? `(${k})@${c.#varIndex}` : regExpMetaChars.has(k) ? `\\\\${k}` : k) + c.buildRegExpStr();\n });\n if (typeof this.#index === \"number\") {\n strList.unshift(`#${this.#index}`);\n }\n if (strList.length === 0) {\n return \"\";\n }\n if (strList.length === 1) {\n return strList[0];\n }\n return \"(?:\" + strList.join(\"|\") + \")\";\n }\n};\nexport {\n Node,\n PATH_ERROR\n};\n", "// src/router/reg-exp-router/trie.ts\nimport { Node } from \"./node.js\";\nvar Trie = class {\n #context = { varIndex: 0 };\n #root = new Node();\n insert(path, index, pathErrorCheckOnly) {\n const paramAssoc = [];\n const groups = [];\n for (let i = 0; ; ) {\n let replaced = false;\n path = path.replace(/\\{[^}]+\\}/g, (m) => {\n const mark = `@\\\\${i}`;\n groups[i] = [mark, m];\n i++;\n replaced = true;\n return mark;\n });\n if (!replaced) {\n break;\n }\n }\n const tokens = path.match(/(?::[^\\/]+)|(?:\\/\\*$)|./g) || [];\n for (let i = groups.length - 1; i >= 0; i--) {\n const [mark] = groups[i];\n for (let j = tokens.length - 1; j >= 0; j--) {\n if (tokens[j].indexOf(mark) !== -1) {\n tokens[j] = tokens[j].replace(mark, groups[i][1]);\n break;\n }\n }\n }\n this.#root.insert(tokens, index, paramAssoc, this.#context, pathErrorCheckOnly);\n return paramAssoc;\n }\n buildRegExp() {\n let regexp = this.#root.buildRegExpStr();\n if (regexp === \"\") {\n return [/^$/, [], []];\n }\n let captureIndex = 0;\n const indexReplacementMap = [];\n const paramReplacementMap = [];\n regexp = regexp.replace(/#(\\d+)|@(\\d+)|\\.\\*\\$/g, (_, handlerIndex, paramIndex) => {\n if (handlerIndex !== void 0) {\n indexReplacementMap[++captureIndex] = Number(handlerIndex);\n return \"$()\";\n }\n if (paramIndex !== void 0) {\n paramReplacementMap[Number(paramIndex)] = ++captureIndex;\n return \"\";\n }\n return \"\";\n });\n return [new RegExp(`^${regexp}`), indexReplacementMap, paramReplacementMap];\n }\n};\nexport {\n Trie\n};\n", "// src/router/reg-exp-router/prepared-router.ts\nimport { METHOD_NAME_ALL } from \"../../router.js\";\nimport { match, emptyParam } from \"./matcher.js\";\nimport { RegExpRouter } from \"./router.js\";\nvar PreparedRegExpRouter = class {\n name = \"PreparedRegExpRouter\";\n #matchers;\n #relocateMap;\n constructor(matchers, relocateMap) {\n this.#matchers = matchers;\n this.#relocateMap = relocateMap;\n }\n #addWildcard(method, handlerData) {\n const matcher = this.#matchers[method];\n matcher[1].forEach((list) => list && list.push(handlerData));\n Object.values(matcher[2]).forEach((list) => list[0].push(handlerData));\n }\n #addPath(method, path, handler, indexes, map) {\n const matcher = this.#matchers[method];\n if (!map) {\n matcher[2][path][0].push([handler, {}]);\n } else {\n indexes.forEach((index) => {\n if (typeof index === \"number\") {\n matcher[1][index].push([handler, map]);\n } else {\n ;\n matcher[2][index || path][0].push([handler, map]);\n }\n });\n }\n }\n add(method, path, handler) {\n if (!this.#matchers[method]) {\n const all = this.#matchers[METHOD_NAME_ALL];\n const staticMap = {};\n for (const key in all[2]) {\n staticMap[key] = [all[2][key][0].slice(), emptyParam];\n }\n this.#matchers[method] = [\n all[0],\n all[1].map((list) => Array.isArray(list) ? list.slice() : 0),\n staticMap\n ];\n }\n if (path === \"/*\" || path === \"*\") {\n const handlerData = [handler, {}];\n if (method === METHOD_NAME_ALL) {\n for (const m in this.#matchers) {\n this.#addWildcard(m, handlerData);\n }\n } else {\n this.#addWildcard(method, handlerData);\n }\n return;\n }\n const data = this.#relocateMap[path];\n if (!data) {\n throw new Error(`Path ${path} is not registered`);\n }\n for (const [indexes, map] of data) {\n if (method === METHOD_NAME_ALL) {\n for (const m in this.#matchers) {\n this.#addPath(m, path, handler, indexes, map);\n }\n } else {\n this.#addPath(method, path, handler, indexes, map);\n }\n }\n }\n buildAllMatchers() {\n return this.#matchers;\n }\n match = match;\n};\nvar buildInitParams = ({ paths }) => {\n const RegExpRouterWithMatcherExport = class extends RegExpRouter {\n buildAndExportAllMatchers() {\n return this.buildAllMatchers();\n }\n };\n const router = new RegExpRouterWithMatcherExport();\n for (const path of paths) {\n router.add(METHOD_NAME_ALL, path, path);\n }\n const matchers = router.buildAndExportAllMatchers();\n const all = matchers[METHOD_NAME_ALL];\n const relocateMap = {};\n for (const path of paths) {\n if (path === \"/*\" || path === \"*\") {\n continue;\n }\n all[1].forEach((list, i) => {\n list.forEach(([p, map]) => {\n if (p === path) {\n if (relocateMap[path]) {\n relocateMap[path][0][1] = {\n ...relocateMap[path][0][1],\n ...map\n };\n } else {\n relocateMap[path] = [[[], map]];\n }\n if (relocateMap[path][0][0].findIndex((j) => j === i) === -1) {\n relocateMap[path][0][0].push(i);\n }\n }\n });\n });\n for (const path2 in all[2]) {\n all[2][path2][0].forEach(([p]) => {\n if (p === path) {\n relocateMap[path] ||= [[[]]];\n const value = path2 === path ? \"\" : path2;\n if (relocateMap[path][0][0].findIndex((v) => v === value) === -1) {\n relocateMap[path][0][0].push(value);\n }\n }\n });\n }\n }\n for (let i = 0, len = all[1].length; i < len; i++) {\n all[1][i] = all[1][i] ? [] : 0;\n }\n for (const path in all[2]) {\n all[2][path][0] = [];\n }\n return [matchers, relocateMap];\n};\nvar serializeInitParams = ([matchers, relocateMap]) => {\n const matchersStr = JSON.stringify(\n matchers,\n (_, value) => value instanceof RegExp ? `##${value.toString()}##` : value\n ).replace(/\"##(.+?)##\"/g, (_, str) => str.replace(/\\\\\\\\/g, \"\\\\\"));\n const relocateMapStr = JSON.stringify(relocateMap);\n return `[${matchersStr},${relocateMapStr}]`;\n};\nexport {\n PreparedRegExpRouter,\n buildInitParams,\n serializeInitParams\n};\n", "// src/router/smart-router/index.ts\nimport { SmartRouter } from \"./router.js\";\nexport {\n SmartRouter\n};\n", "// src/router/smart-router/router.ts\nimport { MESSAGE_MATCHER_IS_ALREADY_BUILT, UnsupportedPathError } from \"../../router.js\";\nvar SmartRouter = class {\n name = \"SmartRouter\";\n #routers = [];\n #routes = [];\n constructor(init) {\n this.#routers = init.routers;\n }\n add(method, path, handler) {\n if (!this.#routes) {\n throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT);\n }\n this.#routes.push([method, path, handler]);\n }\n match(method, path) {\n if (!this.#routes) {\n throw new Error(\"Fatal error\");\n }\n const routers = this.#routers;\n const routes = this.#routes;\n const len = routers.length;\n let i = 0;\n let res;\n for (; i < len; i++) {\n const router = routers[i];\n try {\n for (let i2 = 0, len2 = routes.length; i2 < len2; i2++) {\n router.add(...routes[i2]);\n }\n res = router.match(method, path);\n } catch (e) {\n if (e instanceof UnsupportedPathError) {\n continue;\n }\n throw e;\n }\n this.match = router.match.bind(router);\n this.#routers = [router];\n this.#routes = void 0;\n break;\n }\n if (i === len) {\n throw new Error(\"Fatal error\");\n }\n this.name = `SmartRouter + ${this.activeRouter.name}`;\n return res;\n }\n get activeRouter() {\n if (this.#routes || this.#routers.length !== 1) {\n throw new Error(\"No active router has been determined yet.\");\n }\n return this.#routers[0];\n }\n};\nexport {\n SmartRouter\n};\n", "// src/router/trie-router/index.ts\nimport { TrieRouter } from \"./router.js\";\nexport {\n TrieRouter\n};\n", "// src/router/trie-router/router.ts\nimport { checkOptionalParameter } from \"../../utils/url.js\";\nimport { Node } from \"./node.js\";\nvar TrieRouter = class {\n name = \"TrieRouter\";\n #node;\n constructor() {\n this.#node = new Node();\n }\n add(method, path, handler) {\n const results = checkOptionalParameter(path);\n if (results) {\n for (let i = 0, len = results.length; i < len; i++) {\n this.#node.insert(method, results[i], handler);\n }\n return;\n }\n this.#node.insert(method, path, handler);\n }\n match(method, path) {\n return this.#node.search(method, path);\n }\n};\nexport {\n TrieRouter\n};\n", "// src/router/trie-router/node.ts\nimport { METHOD_NAME_ALL } from \"../../router.js\";\nimport { getPattern, splitPath, splitRoutingPath } from \"../../utils/url.js\";\nvar emptyParams = /* @__PURE__ */ Object.create(null);\nvar hasChildren = (children) => {\n for (const _ in children) {\n return true;\n }\n return false;\n};\nvar Node = class _Node {\n #methods;\n #children;\n #patterns;\n #order = 0;\n #params = emptyParams;\n constructor(method, handler, children) {\n this.#children = children || /* @__PURE__ */ Object.create(null);\n this.#methods = [];\n if (method && handler) {\n const m = /* @__PURE__ */ Object.create(null);\n m[method] = { handler, possibleKeys: [], score: 0 };\n this.#methods = [m];\n }\n this.#patterns = [];\n }\n insert(method, path, handler) {\n this.#order = ++this.#order;\n let curNode = this;\n const parts = splitRoutingPath(path);\n const possibleKeys = [];\n for (let i = 0, len = parts.length; i < len; i++) {\n const p = parts[i];\n const nextP = parts[i + 1];\n const pattern = getPattern(p, nextP);\n const key = Array.isArray(pattern) ? pattern[0] : p;\n if (key in curNode.#children) {\n curNode = curNode.#children[key];\n if (pattern) {\n possibleKeys.push(pattern[1]);\n }\n continue;\n }\n curNode.#children[key] = new _Node();\n if (pattern) {\n curNode.#patterns.push(pattern);\n possibleKeys.push(pattern[1]);\n }\n curNode = curNode.#children[key];\n }\n curNode.#methods.push({\n [method]: {\n handler,\n possibleKeys: possibleKeys.filter((v, i, a) => a.indexOf(v) === i),\n score: this.#order\n }\n });\n return curNode;\n }\n #pushHandlerSets(handlerSets, node, method, nodeParams, params) {\n for (let i = 0, len = node.#methods.length; i < len; i++) {\n const m = node.#methods[i];\n const handlerSet = m[method] || m[METHOD_NAME_ALL];\n const processedSet = {};\n if (handlerSet !== void 0) {\n handlerSet.params = /* @__PURE__ */ Object.create(null);\n handlerSets.push(handlerSet);\n if (nodeParams !== emptyParams || params && params !== emptyParams) {\n for (let i2 = 0, len2 = handlerSet.possibleKeys.length; i2 < len2; i2++) {\n const key = handlerSet.possibleKeys[i2];\n const processed = processedSet[handlerSet.score];\n handlerSet.params[key] = params?.[key] && !processed ? params[key] : nodeParams[key] ?? params?.[key];\n processedSet[handlerSet.score] = true;\n }\n }\n }\n }\n }\n search(method, path) {\n const handlerSets = [];\n this.#params = emptyParams;\n const curNode = this;\n let curNodes = [curNode];\n const parts = splitPath(path);\n const curNodesQueue = [];\n const len = parts.length;\n let partOffsets = null;\n for (let i = 0; i < len; i++) {\n const part = parts[i];\n const isLast = i === len - 1;\n const tempNodes = [];\n for (let j = 0, len2 = curNodes.length; j < len2; j++) {\n const node = curNodes[j];\n const nextNode = node.#children[part];\n if (nextNode) {\n nextNode.#params = node.#params;\n if (isLast) {\n if (nextNode.#children[\"*\"]) {\n this.#pushHandlerSets(handlerSets, nextNode.#children[\"*\"], method, node.#params);\n }\n this.#pushHandlerSets(handlerSets, nextNode, method, node.#params);\n } else {\n tempNodes.push(nextNode);\n }\n }\n for (let k = 0, len3 = node.#patterns.length; k < len3; k++) {\n const pattern = node.#patterns[k];\n const params = node.#params === emptyParams ? {} : { ...node.#params };\n if (pattern === \"*\") {\n const astNode = node.#children[\"*\"];\n if (astNode) {\n this.#pushHandlerSets(handlerSets, astNode, method, node.#params);\n astNode.#params = params;\n tempNodes.push(astNode);\n }\n continue;\n }\n const [key, name, matcher] = pattern;\n if (!part && !(matcher instanceof RegExp)) {\n continue;\n }\n const child = node.#children[key];\n if (matcher instanceof RegExp) {\n if (partOffsets === null) {\n partOffsets = new Array(len);\n let offset = path[0] === \"/\" ? 1 : 0;\n for (let p = 0; p < len; p++) {\n partOffsets[p] = offset;\n offset += parts[p].length + 1;\n }\n }\n const restPathString = path.substring(partOffsets[i]);\n const m = matcher.exec(restPathString);\n if (m) {\n params[name] = m[0];\n this.#pushHandlerSets(handlerSets, child, method, node.#params, params);\n if (hasChildren(child.#children)) {\n child.#params = params;\n const componentCount = m[0].match(/\\//)?.length ?? 0;\n const targetCurNodes = curNodesQueue[componentCount] ||= [];\n targetCurNodes.push(child);\n }\n continue;\n }\n }\n if (matcher === true || matcher.test(part)) {\n params[name] = part;\n if (isLast) {\n this.#pushHandlerSets(handlerSets, child, method, params, node.#params);\n if (child.#children[\"*\"]) {\n this.#pushHandlerSets(\n handlerSets,\n child.#children[\"*\"],\n method,\n params,\n node.#params\n );\n }\n } else {\n child.#params = params;\n tempNodes.push(child);\n }\n }\n }\n }\n const shifted = curNodesQueue.shift();\n curNodes = shifted ? tempNodes.concat(shifted) : tempNodes;\n }\n if (handlerSets.length > 1) {\n handlerSets.sort((a, b) => {\n return a.score - b.score;\n });\n }\n return [handlerSets.map(({ handler, params }) => [handler, params])];\n }\n};\nexport {\n Node\n};\n", "// src/middleware/cors/index.ts\nvar cors = (options) => {\n const defaults = {\n origin: \"*\",\n allowMethods: [\"GET\", \"HEAD\", \"PUT\", \"POST\", \"DELETE\", \"PATCH\"],\n allowHeaders: [],\n exposeHeaders: []\n };\n const opts = {\n ...defaults,\n ...options\n };\n const findAllowOrigin = ((optsOrigin) => {\n if (typeof optsOrigin === \"string\") {\n if (optsOrigin === \"*\") {\n if (opts.credentials) {\n return (origin) => origin || null;\n }\n return () => optsOrigin;\n } else {\n return (origin) => optsOrigin === origin ? origin : null;\n }\n } else if (typeof optsOrigin === \"function\") {\n return optsOrigin;\n } else {\n return (origin) => optsOrigin.includes(origin) ? origin : null;\n }\n })(opts.origin);\n const findAllowMethods = ((optsAllowMethods) => {\n if (typeof optsAllowMethods === \"function\") {\n return optsAllowMethods;\n } else if (Array.isArray(optsAllowMethods)) {\n return () => optsAllowMethods;\n } else {\n return () => [];\n }\n })(opts.allowMethods);\n return async function cors2(c, next) {\n function set(key, value) {\n c.res.headers.set(key, value);\n }\n const allowOrigin = await findAllowOrigin(c.req.header(\"origin\") || \"\", c);\n if (allowOrigin) {\n set(\"Access-Control-Allow-Origin\", allowOrigin);\n }\n if (opts.credentials) {\n set(\"Access-Control-Allow-Credentials\", \"true\");\n }\n if (opts.exposeHeaders?.length) {\n set(\"Access-Control-Expose-Headers\", opts.exposeHeaders.join(\",\"));\n }\n if (c.req.method === \"OPTIONS\") {\n if (opts.origin !== \"*\" || opts.credentials) {\n set(\"Vary\", \"Origin\");\n }\n if (opts.maxAge != null) {\n set(\"Access-Control-Max-Age\", opts.maxAge.toString());\n }\n const allowMethods = await findAllowMethods(c.req.header(\"origin\") || \"\", c);\n if (allowMethods.length) {\n set(\"Access-Control-Allow-Methods\", allowMethods.join(\",\"));\n }\n let headers = opts.allowHeaders;\n if (!headers?.length) {\n const requestHeaders = c.req.header(\"Access-Control-Request-Headers\");\n if (requestHeaders) {\n headers = requestHeaders.split(/\\s*,\\s*/);\n }\n }\n if (headers?.length) {\n set(\"Access-Control-Allow-Headers\", headers.join(\",\"));\n c.res.headers.append(\"Vary\", \"Access-Control-Request-Headers\");\n }\n c.res.headers.delete(\"Content-Length\");\n c.res.headers.delete(\"Content-Type\");\n return new Response(null, {\n headers: c.res.headers,\n status: 204,\n statusText: \"No Content\"\n });\n }\n await next();\n if (opts.origin !== \"*\" || opts.credentials) {\n c.header(\"Vary\", \"Origin\", { append: true });\n }\n };\n};\nexport {\n cors\n};\n", "// src/middleware/logger/index.ts\nimport { getColorEnabledAsync } from \"../../utils/color.js\";\nvar humanize = (times) => {\n const [delimiter, separator] = [\",\", \".\"];\n const orderTimes = times.map((v) => v.replace(/(\\d)(?=(\\d\\d\\d)+(?!\\d))/g, \"$1\" + delimiter));\n return orderTimes.join(separator);\n};\nvar time = (start) => {\n const delta = Date.now() - start;\n return humanize([delta < 1e3 ? delta + \"ms\" : Math.round(delta / 1e3) + \"s\"]);\n};\nvar colorStatus = async (status) => {\n const colorEnabled = await getColorEnabledAsync();\n if (colorEnabled) {\n switch (status / 100 | 0) {\n case 5:\n return `\\x1B[31m${status}\\x1B[0m`;\n case 4:\n return `\\x1B[33m${status}\\x1B[0m`;\n case 3:\n return `\\x1B[36m${status}\\x1B[0m`;\n case 2:\n return `\\x1B[32m${status}\\x1B[0m`;\n }\n }\n return `${status}`;\n};\nasync function log(fn, prefix, method, path, status = 0, elapsed) {\n const out = prefix === \"<--\" /* Incoming */ ? `${prefix} ${method} ${path}` : `${prefix} ${method} ${path} ${await colorStatus(status)} ${elapsed}`;\n fn(out);\n}\nvar logger = (fn = console.log) => {\n return async function logger2(c, next) {\n const { method, url } = c.req;\n const path = url.slice(url.indexOf(\"/\", 8));\n await log(fn, \"<--\" /* Incoming */, method, path);\n const start = Date.now();\n await next();\n await log(fn, \"-->\" /* Outgoing */, method, path, c.res.status, time(start));\n };\n};\nexport {\n logger\n};\n", "// src/utils/color.ts\nfunction getColorEnabled() {\n const { process, Deno } = globalThis;\n const isNoColor = typeof Deno?.noColor === \"boolean\" ? Deno.noColor : process !== void 0 ? (\n // eslint-disable-next-line no-unsafe-optional-chaining\n \"NO_COLOR\" in process?.env\n ) : false;\n return !isNoColor;\n}\nasync function getColorEnabledAsync() {\n const { navigator } = globalThis;\n const cfWorkers = \"cloudflare:workers\";\n const isNoColor = navigator !== void 0 && navigator.userAgent === \"Cloudflare-Workers\" ? await (async () => {\n try {\n return \"NO_COLOR\" in ((await import(cfWorkers)).env ?? {});\n } catch {\n return false;\n }\n })() : !getColorEnabled();\n return !isNoColor;\n}\nexport {\n getColorEnabled,\n getColorEnabledAsync\n};\n", "/** @internal */\nexport type UnsetMarker = 'unsetMarker' & {\n __brand: 'unsetMarker';\n};\n\n/**\n * Ensures there are no duplicate keys when building a procedure.\n * @internal\n */\nexport function mergeWithoutOverrides>(\n obj1: TType,\n ...objs: Partial[]\n): TType {\n const newObj: TType = Object.assign(emptyObject(), obj1);\n\n for (const overrides of objs) {\n for (const key in overrides) {\n if (key in newObj && newObj[key] !== overrides[key]) {\n throw new Error(`Duplicate key ${key}`);\n }\n newObj[key as keyof TType] = overrides[key] as TType[keyof TType];\n }\n }\n return newObj;\n}\n\n/**\n * Check that value is object\n * @internal\n */\nexport function isObject(value: unknown): value is Record {\n return !!value && !Array.isArray(value) && typeof value === 'object';\n}\n\ntype AnyFn = ((...args: any[]) => unknown) & Record;\nexport function isFunction(fn: unknown): fn is AnyFn {\n return typeof fn === 'function';\n}\n\n/**\n * Create an object without inheriting anything from `Object.prototype`\n * @internal\n */\nexport function emptyObject>(): TObj {\n return Object.create(null);\n}\n\nconst asyncIteratorsSupported =\n typeof Symbol === 'function' && !!Symbol.asyncIterator;\n\nexport function isAsyncIterable(\n value: unknown,\n): value is AsyncIterable {\n return (\n asyncIteratorsSupported && isObject(value) && Symbol.asyncIterator in value\n );\n}\n\n/**\n * Run an IIFE\n */\nexport const run = (fn: () => TValue): TValue => fn();\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nexport function noop(): void {}\n\nexport function identity(it: T): T {\n return it;\n}\n\n/**\n * Generic runtime assertion function. Throws, if the condition is not `true`.\n *\n * Can be used as a slightly less dangerous variant of type assertions. Code\n * mistakes would be revealed at runtime then (hopefully during testing).\n */\nexport function assert(\n condition: boolean,\n msg = 'no additional info',\n): asserts condition {\n if (!condition) {\n throw new Error(`AssertionError: ${msg}`);\n }\n}\n\nexport function sleep(ms = 0): Promise {\n return new Promise((res) => setTimeout(res, ms));\n}\n\n/**\n * Ponyfill for\n * [`AbortSignal.any`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/any_static).\n */\nexport function abortSignalsAnyPonyfill(signals: AbortSignal[]): AbortSignal {\n if (typeof AbortSignal.any === 'function') {\n return AbortSignal.any(signals);\n }\n\n const ac = new AbortController();\n\n for (const signal of signals) {\n if (signal.aborted) {\n trigger();\n break;\n }\n signal.addEventListener('abort', trigger, { once: true });\n }\n\n return ac.signal;\n\n function trigger() {\n ac.abort();\n for (const signal of signals) {\n signal.removeEventListener('abort', trigger);\n }\n }\n}\n", "import type { InvertKeyValue, ValueOf } from '../types';\n\n// reference: https://www.jsonrpc.org/specification\n\n/**\n * JSON-RPC 2.0 Error codes\n *\n * `-32000` to `-32099` are reserved for implementation-defined server-errors.\n * For tRPC we're copying the last digits of HTTP 4XX errors.\n */\nexport const TRPC_ERROR_CODES_BY_KEY = {\n /**\n * Invalid JSON was received by the server.\n * An error occurred on the server while parsing the JSON text.\n */\n PARSE_ERROR: -32700,\n /**\n * The JSON sent is not a valid Request object.\n */\n BAD_REQUEST: -32600, // 400\n\n // Internal JSON-RPC error\n INTERNAL_SERVER_ERROR: -32603, // 500\n NOT_IMPLEMENTED: -32603, // 501\n BAD_GATEWAY: -32603, // 502\n SERVICE_UNAVAILABLE: -32603, // 503\n GATEWAY_TIMEOUT: -32603, // 504\n\n // Implementation specific errors\n UNAUTHORIZED: -32001, // 401\n PAYMENT_REQUIRED: -32002, // 402\n FORBIDDEN: -32003, // 403\n NOT_FOUND: -32004, // 404\n METHOD_NOT_SUPPORTED: -32005, // 405\n TIMEOUT: -32008, // 408\n CONFLICT: -32009, // 409\n PRECONDITION_FAILED: -32012, // 412\n PAYLOAD_TOO_LARGE: -32013, // 413\n UNSUPPORTED_MEDIA_TYPE: -32015, // 415\n UNPROCESSABLE_CONTENT: -32022, // 422\n PRECONDITION_REQUIRED: -32028, // 428\n TOO_MANY_REQUESTS: -32029, // 429\n CLIENT_CLOSED_REQUEST: -32099, // 499\n} as const;\n\n// pure\nexport const TRPC_ERROR_CODES_BY_NUMBER: InvertKeyValue<\n typeof TRPC_ERROR_CODES_BY_KEY\n> = {\n [-32700]: 'PARSE_ERROR',\n [-32600]: 'BAD_REQUEST',\n [-32603]: 'INTERNAL_SERVER_ERROR',\n [-32001]: 'UNAUTHORIZED',\n [-32002]: 'PAYMENT_REQUIRED',\n [-32003]: 'FORBIDDEN',\n [-32004]: 'NOT_FOUND',\n [-32005]: 'METHOD_NOT_SUPPORTED',\n [-32008]: 'TIMEOUT',\n [-32009]: 'CONFLICT',\n [-32012]: 'PRECONDITION_FAILED',\n [-32013]: 'PAYLOAD_TOO_LARGE',\n [-32015]: 'UNSUPPORTED_MEDIA_TYPE',\n [-32022]: 'UNPROCESSABLE_CONTENT',\n [-32028]: 'PRECONDITION_REQUIRED',\n [-32029]: 'TOO_MANY_REQUESTS',\n [-32099]: 'CLIENT_CLOSED_REQUEST',\n};\n\nexport type TRPC_ERROR_CODE_NUMBER = ValueOf;\nexport type TRPC_ERROR_CODE_KEY = keyof typeof TRPC_ERROR_CODES_BY_KEY;\n\n/**\n * tRPC error codes that are considered retryable\n * With out of the box SSE, the client will reconnect when these errors are encountered\n */\nexport const retryableRpcCodes: TRPC_ERROR_CODE_NUMBER[] = [\n TRPC_ERROR_CODES_BY_KEY.BAD_GATEWAY,\n TRPC_ERROR_CODES_BY_KEY.SERVICE_UNAVAILABLE,\n TRPC_ERROR_CODES_BY_KEY.GATEWAY_TIMEOUT,\n TRPC_ERROR_CODES_BY_KEY.INTERNAL_SERVER_ERROR,\n];\n", "import { emptyObject } from './utils';\n\ninterface ProxyCallbackOptions {\n path: readonly string[];\n args: readonly unknown[];\n}\ntype ProxyCallback = (opts: ProxyCallbackOptions) => unknown;\n\nconst noop = () => {\n // noop\n};\n\nconst freezeIfAvailable = (obj: object) => {\n if (Object.freeze) {\n Object.freeze(obj);\n }\n};\n\nfunction createInnerProxy(\n callback: ProxyCallback,\n path: readonly string[],\n memo: Record,\n) {\n const cacheKey = path.join('.');\n\n memo[cacheKey] ??= new Proxy(noop, {\n get(_obj, key) {\n if (typeof key !== 'string' || key === 'then') {\n // special case for if the proxy is accidentally treated\n // like a PromiseLike (like in `Promise.resolve(proxy)`)\n return undefined;\n }\n return createInnerProxy(callback, [...path, key], memo);\n },\n apply(_1, _2, args) {\n const lastOfPath = path[path.length - 1];\n\n let opts = { args, path };\n // special handling for e.g. `trpc.hello.call(this, 'there')` and `trpc.hello.apply(this, ['there'])\n if (lastOfPath === 'call') {\n opts = {\n args: args.length >= 2 ? [args[1]] : [],\n path: path.slice(0, -1),\n };\n } else if (lastOfPath === 'apply') {\n opts = {\n args: args.length >= 2 ? args[1] : [],\n path: path.slice(0, -1),\n };\n }\n freezeIfAvailable(opts.args);\n freezeIfAvailable(opts.path);\n return callback(opts);\n },\n });\n\n return memo[cacheKey];\n}\n\n/**\n * Creates a proxy that calls the callback with the path and arguments\n *\n * @internal\n */\nexport const createRecursiveProxy = (\n callback: ProxyCallback,\n): TFaux => createInnerProxy(callback, [], emptyObject()) as TFaux;\n\n/**\n * Used in place of `new Proxy` where each handler will map 1 level deep to another value.\n *\n * @internal\n */\nexport const createFlatProxy = (\n callback: (path: keyof TFaux) => any,\n): TFaux => {\n return new Proxy(noop, {\n get(_obj, name) {\n if (name === 'then') {\n // special case for if the proxy is accidentally treated\n // like a PromiseLike (like in `Promise.resolve(proxy)`)\n return undefined;\n }\n return callback(name as any);\n },\n }) as TFaux;\n};\n", "import type { TRPCError } from '../error/TRPCError';\nimport type { TRPC_ERROR_CODES_BY_KEY, TRPCResponse } from '../rpc';\nimport { TRPC_ERROR_CODES_BY_NUMBER } from '../rpc';\nimport type { InvertKeyValue, ValueOf } from '../types';\nimport { isObject } from '../utils';\n\nexport const JSONRPC2_TO_HTTP_CODE: Record<\n keyof typeof TRPC_ERROR_CODES_BY_KEY,\n number\n> = {\n PARSE_ERROR: 400,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n PAYMENT_REQUIRED: 402,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n METHOD_NOT_SUPPORTED: 405,\n TIMEOUT: 408,\n CONFLICT: 409,\n PRECONDITION_FAILED: 412,\n PAYLOAD_TOO_LARGE: 413,\n UNSUPPORTED_MEDIA_TYPE: 415,\n UNPROCESSABLE_CONTENT: 422,\n PRECONDITION_REQUIRED: 428,\n TOO_MANY_REQUESTS: 429,\n CLIENT_CLOSED_REQUEST: 499,\n INTERNAL_SERVER_ERROR: 500,\n NOT_IMPLEMENTED: 501,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n};\n\nexport const HTTP_CODE_TO_JSONRPC2: InvertKeyValue<\n typeof JSONRPC2_TO_HTTP_CODE\n> = {\n 400: 'BAD_REQUEST',\n 401: 'UNAUTHORIZED',\n 402: 'PAYMENT_REQUIRED',\n 403: 'FORBIDDEN',\n 404: 'NOT_FOUND',\n 405: 'METHOD_NOT_SUPPORTED',\n 408: 'TIMEOUT',\n 409: 'CONFLICT',\n 412: 'PRECONDITION_FAILED',\n 413: 'PAYLOAD_TOO_LARGE',\n 415: 'UNSUPPORTED_MEDIA_TYPE',\n 422: 'UNPROCESSABLE_CONTENT',\n 428: 'PRECONDITION_REQUIRED',\n 429: 'TOO_MANY_REQUESTS',\n 499: 'CLIENT_CLOSED_REQUEST',\n 500: 'INTERNAL_SERVER_ERROR',\n 501: 'NOT_IMPLEMENTED',\n 502: 'BAD_GATEWAY',\n 503: 'SERVICE_UNAVAILABLE',\n 504: 'GATEWAY_TIMEOUT',\n} as const;\n\nexport function getStatusCodeFromKey(\n code: keyof typeof TRPC_ERROR_CODES_BY_KEY,\n) {\n return JSONRPC2_TO_HTTP_CODE[code] ?? 500;\n}\n\nexport function getStatusKeyFromCode(\n code: keyof typeof HTTP_CODE_TO_JSONRPC2,\n): ValueOf {\n return HTTP_CODE_TO_JSONRPC2[code] ?? 'INTERNAL_SERVER_ERROR';\n}\n\nexport function getHTTPStatusCode(json: TRPCResponse | TRPCResponse[]) {\n const arr = Array.isArray(json) ? json : [json];\n const httpStatuses = new Set(\n arr.map((res) => {\n if ('error' in res && isObject(res.error.data)) {\n if (typeof res.error.data?.['httpStatus'] === 'number') {\n return res.error.data['httpStatus'];\n }\n const code = TRPC_ERROR_CODES_BY_NUMBER[res.error.code];\n return getStatusCodeFromKey(code);\n }\n return 200;\n }),\n );\n\n if (httpStatuses.size !== 1) {\n return 207;\n }\n\n const httpStatus = httpStatuses.values().next().value;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return httpStatus!;\n}\n\nexport function getHTTPStatusCodeFromError(error: TRPCError) {\n return getStatusCodeFromKey(error.code);\n}\n", "function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var defineProperty = require(\"./defineProperty.js\");\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nmodule.exports = _objectSpread2, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import { getHTTPStatusCodeFromError } from '../http/getHTTPStatusCode';\nimport type { ProcedureType } from '../procedure';\nimport type { AnyRootTypes, RootConfig } from '../rootConfig';\nimport { TRPC_ERROR_CODES_BY_KEY } from '../rpc';\nimport type { DefaultErrorShape } from './formatter';\nimport type { TRPCError } from './TRPCError';\n\n/**\n * @internal\n */\nexport function getErrorShape(opts: {\n config: RootConfig;\n error: TRPCError;\n type: ProcedureType | 'unknown';\n path: string | undefined;\n input: unknown;\n ctx: TRoot['ctx'] | undefined;\n}): TRoot['errorShape'] {\n const { path, error, config } = opts;\n const { code } = opts.error;\n const shape: DefaultErrorShape = {\n message: error.message,\n code: TRPC_ERROR_CODES_BY_KEY[code],\n data: {\n code,\n httpStatus: getHTTPStatusCodeFromError(error),\n },\n };\n if (config.isDev && typeof opts.error.stack === 'string') {\n shape.data.stack = opts.error.stack;\n }\n if (typeof path === 'string') {\n shape.data.path = path;\n }\n return config.errorFormatter({ ...opts, shape });\n}\n", "import type { ProcedureType } from '../procedure';\nimport type {\n TRPC_ERROR_CODE_KEY,\n TRPC_ERROR_CODE_NUMBER,\n TRPCErrorShape,\n} from '../rpc';\nimport type { TRPCError } from './TRPCError';\n\n/**\n * @internal\n */\nexport type ErrorFormatter = (opts: {\n error: TRPCError;\n type: ProcedureType | 'unknown';\n path: string | undefined;\n input: unknown;\n ctx: TContext | undefined;\n shape: DefaultErrorShape;\n}) => TShape;\n\n/**\n * @internal\n */\nexport type DefaultErrorData = {\n code: TRPC_ERROR_CODE_KEY;\n httpStatus: number;\n /**\n * Path to the procedure that threw the error\n */\n path?: string;\n /**\n * Stack trace of the error (only in development)\n */\n stack?: string;\n};\n\n/**\n * @internal\n */\nexport interface DefaultErrorShape extends TRPCErrorShape {\n message: string;\n code: TRPC_ERROR_CODE_NUMBER;\n}\n\nexport const defaultFormatter: ErrorFormatter = ({ shape }) => {\n return shape;\n};\n", "import type { TRPC_ERROR_CODE_KEY } from '../rpc/codes';\nimport { isObject } from '../utils';\n\nclass UnknownCauseError extends Error {\n [key: string]: unknown;\n}\nexport function getCauseFromUnknown(cause: unknown): Error | undefined {\n if (cause instanceof Error) {\n return cause;\n }\n\n const type = typeof cause;\n if (type === 'undefined' || type === 'function' || cause === null) {\n return undefined;\n }\n\n // Primitive types just get wrapped in an error\n if (type !== 'object') {\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n return new Error(String(cause));\n }\n\n // If it's an object, we'll create a synthetic error\n if (isObject(cause)) {\n return Object.assign(new UnknownCauseError(), cause);\n }\n\n return undefined;\n}\n\nexport function getTRPCErrorFromUnknown(cause: unknown): TRPCError {\n if (cause instanceof TRPCError) {\n return cause;\n }\n if (cause instanceof Error && cause.name === 'TRPCError') {\n // https://github.com/trpc/trpc/pull/4848\n return cause as TRPCError;\n }\n\n const trpcError = new TRPCError({\n code: 'INTERNAL_SERVER_ERROR',\n cause,\n });\n\n // Inherit stack from error\n if (cause instanceof Error && cause.stack) {\n trpcError.stack = cause.stack;\n }\n\n return trpcError;\n}\n\nexport class TRPCError extends Error {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore override doesn't work in all environments due to \"This member cannot have an 'override' modifier because it is not declared in the base class 'Error'\"\n public override readonly cause?: Error;\n public readonly code;\n\n constructor(opts: {\n message?: string;\n code: TRPC_ERROR_CODE_KEY;\n cause?: unknown;\n }) {\n const cause = getCauseFromUnknown(opts.cause);\n const message = opts.message ?? cause?.message ?? opts.code;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore https://github.com/tc39/proposal-error-cause\n super(message, { cause });\n\n this.code = opts.code;\n this.name = 'TRPCError';\n this.cause ??= cause;\n }\n}\n", "import type { AnyRootTypes, RootConfig } from './rootConfig';\nimport type { AnyRouter, inferRouterError } from './router';\nimport type {\n TRPCResponse,\n TRPCResponseMessage,\n TRPCResultMessage,\n} from './rpc';\nimport { isObject } from './utils';\n\n/**\n * @public\n */\nexport interface DataTransformer {\n serialize(object: any): any;\n deserialize(object: any): any;\n}\n\ninterface InputDataTransformer extends DataTransformer {\n /**\n * This function runs **on the client** before sending the data to the server.\n */\n serialize(object: any): any;\n /**\n * This function runs **on the server** to transform the data before it is passed to the resolver\n */\n deserialize(object: any): any;\n}\n\ninterface OutputDataTransformer extends DataTransformer {\n /**\n * This function runs **on the server** before sending the data to the client.\n */\n serialize(object: any): any;\n /**\n * This function runs **only on the client** to transform the data sent from the server.\n */\n deserialize(object: any): any;\n}\n\n/**\n * @public\n */\nexport interface CombinedDataTransformer {\n /**\n * Specify how the data sent from the client to the server should be transformed.\n */\n input: InputDataTransformer;\n /**\n * Specify how the data sent from the server to the client should be transformed.\n */\n output: OutputDataTransformer;\n}\n\n/**\n * @public\n */\nexport type CombinedDataTransformerClient = {\n input: Pick;\n output: Pick;\n};\n\n/**\n * @public\n */\nexport type DataTransformerOptions = CombinedDataTransformer | DataTransformer;\n\n/**\n * @internal\n */\nexport function getDataTransformer(\n transformer: DataTransformerOptions,\n): CombinedDataTransformer {\n if ('input' in transformer) {\n return transformer;\n }\n return { input: transformer, output: transformer };\n}\n\n/**\n * @internal\n */\nexport const defaultTransformer: CombinedDataTransformer = {\n input: { serialize: (obj) => obj, deserialize: (obj) => obj },\n output: { serialize: (obj) => obj, deserialize: (obj) => obj },\n};\n\nfunction transformTRPCResponseItem<\n TResponseItem extends TRPCResponse | TRPCResponseMessage,\n>(config: RootConfig, item: TResponseItem): TResponseItem {\n if ('error' in item) {\n return {\n ...item,\n error: config.transformer.output.serialize(item.error),\n };\n }\n\n if ('data' in item.result) {\n return {\n ...item,\n result: {\n ...item.result,\n data: config.transformer.output.serialize(item.result.data),\n },\n };\n }\n\n return item;\n}\n\n/**\n * Takes a unserialized `TRPCResponse` and serializes it with the router's transformers\n **/\nexport function transformTRPCResponse<\n TResponse extends\n | TRPCResponse\n | TRPCResponse[]\n | TRPCResponseMessage\n | TRPCResponseMessage[],\n>(config: RootConfig, itemOrItems: TResponse) {\n return Array.isArray(itemOrItems)\n ? itemOrItems.map((item) => transformTRPCResponseItem(config, item))\n : transformTRPCResponseItem(config, itemOrItems);\n}\n\n// FIXME:\n// - the generics here are probably unnecessary\n// - the RPC-spec could probably be simplified to combine HTTP + WS\n/** @internal */\nfunction transformResultInner(\n response:\n | TRPCResponse>\n | TRPCResponseMessage>,\n transformer: DataTransformer,\n) {\n if ('error' in response) {\n const error = transformer.deserialize(\n response.error,\n ) as inferRouterError;\n return {\n ok: false,\n error: {\n ...response,\n error,\n },\n } as const;\n }\n\n const result = {\n ...response.result,\n ...((!response.result.type || response.result.type === 'data') && {\n type: 'data',\n data: transformer.deserialize(response.result.data),\n }),\n } as TRPCResultMessage['result'];\n return { ok: true, result } as const;\n}\n\nclass TransformResultError extends Error {\n constructor() {\n super('Unable to transform response from server');\n }\n}\n\n/**\n * Transforms and validates that the result is a valid TRPCResponse\n * @internal\n */\nexport function transformResult(\n response:\n | TRPCResponse>\n | TRPCResponseMessage>,\n transformer: DataTransformer,\n): ReturnType {\n let result: ReturnType;\n try {\n // Use the data transformers on the JSON-response\n result = transformResultInner(response, transformer);\n } catch {\n throw new TransformResultError();\n }\n\n // check that output of the transformers is a valid TRPCResponse\n if (\n !result.ok &&\n (!isObject(result.error.error) ||\n typeof result.error.error['code'] !== 'number')\n ) {\n throw new TransformResultError();\n }\n if (result.ok && !isObject(result.result)) {\n throw new TransformResultError();\n }\n return result;\n}\n", "import type { Observable } from '../observable';\nimport { createRecursiveProxy } from './createProxy';\nimport { defaultFormatter } from './error/formatter';\nimport { getTRPCErrorFromUnknown, TRPCError } from './error/TRPCError';\nimport type {\n AnyProcedure,\n ErrorHandlerOptions,\n inferProcedureInput,\n inferProcedureOutput,\n LegacyObservableSubscriptionProcedure,\n} from './procedure';\nimport type { ProcedureCallOptions } from './procedureBuilder';\nimport type { AnyRootTypes, RootConfig } from './rootConfig';\nimport { defaultTransformer } from './transformer';\nimport type { MaybePromise, ValueOf } from './types';\nimport {\n emptyObject,\n isFunction,\n isObject,\n mergeWithoutOverrides,\n} from './utils';\n\nexport interface RouterRecord {\n [key: string]: AnyProcedure | RouterRecord;\n}\n\ntype DecorateProcedure = (\n input: inferProcedureInput,\n) => Promise<\n TProcedure['_def']['type'] extends 'subscription'\n ? TProcedure extends LegacyObservableSubscriptionProcedure\n ? Observable, TRPCError>\n : inferProcedureOutput\n : inferProcedureOutput\n>;\n\n/**\n * @internal\n */\nexport type DecorateRouterRecord = {\n [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value\n ? $Value extends AnyProcedure\n ? DecorateProcedure<$Value>\n : $Value extends RouterRecord\n ? DecorateRouterRecord<$Value>\n : never\n : never;\n};\n\n/**\n * @internal\n */\n\nexport type RouterCallerErrorHandler = (\n opts: ErrorHandlerOptions,\n) => void;\n\n/**\n * @internal\n */\nexport type RouterCaller<\n TRoot extends AnyRootTypes,\n TRecord extends RouterRecord,\n> = (\n /**\n * @note\n * If passing a function, we recommend it's a cached function\n * e.g. wrapped in `React.cache` to avoid unnecessary computations\n */\n ctx: TRoot['ctx'] | (() => MaybePromise),\n options?: {\n onError?: RouterCallerErrorHandler;\n signal?: AbortSignal;\n },\n) => DecorateRouterRecord;\n\n/**\n * @internal\n */\nconst lazyMarker = 'lazyMarker' as 'lazyMarker' & {\n __brand: 'lazyMarker';\n};\nexport type Lazy = (() => Promise) & { [lazyMarker]: true };\n\ntype LazyLoader = {\n load: () => Promise;\n ref: Lazy;\n};\n\nfunction once(fn: () => T): () => T {\n const uncalled = Symbol();\n let result: T | typeof uncalled = uncalled;\n return (): T => {\n if (result === uncalled) {\n result = fn();\n }\n return result;\n };\n}\n\n/**\n * Lazy load a router\n * @see https://trpc.io/docs/server/merging-routers#lazy-load\n */\nexport function lazy(\n importRouter: () => Promise<\n | TRouter\n | {\n [key: string]: TRouter;\n }\n >,\n): Lazy> {\n async function resolve(): Promise {\n const mod = await importRouter();\n\n // if the module is a router, return it\n if (isRouter(mod)) {\n return mod;\n }\n\n const routers = Object.values(mod);\n\n if (routers.length !== 1 || !isRouter(routers[0])) {\n throw new Error(\n \"Invalid router module - either define exactly 1 export or return the router directly.\\nExample: `lazy(() => import('./slow.js').then((m) => m.slowRouter))`\",\n );\n }\n\n return routers[0];\n }\n\n (resolve as Lazy>)[lazyMarker] = true as const;\n\n return resolve as Lazy>;\n}\n\nfunction isLazy(input: unknown): input is Lazy {\n return typeof input === 'function' && lazyMarker in input;\n}\n\n/**\n * @internal\n */\nexport interface RouterDef<\n TRoot extends AnyRootTypes,\n TRecord extends RouterRecord,\n> {\n _config: RootConfig;\n router: true;\n procedure?: never;\n procedures: TRecord;\n record: TRecord;\n lazy: Record>;\n}\n\nexport interface Router<\n TRoot extends AnyRootTypes,\n TRecord extends RouterRecord,\n> {\n _def: RouterDef;\n /**\n * @see https://trpc.io/docs/v11/server/server-side-calls\n */\n createCaller: RouterCaller;\n}\n\nexport type BuiltRouter<\n TRoot extends AnyRootTypes,\n TRecord extends RouterRecord,\n> = Router & TRecord;\n\nexport interface RouterBuilder {\n (\n _: TIn,\n ): BuiltRouter>;\n}\n\nexport type AnyRouter = Router;\n\nexport type inferRouterRootTypes =\n TRouter['_def']['_config']['$types'];\n\nexport type inferRouterContext =\n inferRouterRootTypes['ctx'];\nexport type inferRouterError =\n inferRouterRootTypes['errorShape'];\nexport type inferRouterMeta =\n inferRouterRootTypes['meta'];\n\nfunction isRouter(value: unknown): value is AnyRouter {\n return (\n isObject(value) && isObject(value['_def']) && 'router' in value['_def']\n );\n}\n\nconst emptyRouter = {\n _ctx: null as any,\n _errorShape: null as any,\n _meta: null as any,\n queries: {},\n mutations: {},\n subscriptions: {},\n errorFormatter: defaultFormatter,\n transformer: defaultTransformer,\n};\n\n/**\n * Reserved words that can't be used as router or procedure names\n */\nconst reservedWords = [\n /**\n * Then is a reserved word because otherwise we can't return a promise that returns a Proxy\n * since JS will think that `.then` is something that exists\n */\n 'then',\n /**\n * `fn.call()` and `fn.apply()` are reserved words because otherwise we can't call a function using `.call` or `.apply`\n */\n 'call',\n 'apply',\n];\n\n/** @internal */\nexport type CreateRouterOptions = {\n [key: string]:\n | AnyProcedure\n | AnyRouter\n | CreateRouterOptions\n | Lazy;\n};\n\n/** @internal */\nexport type DecorateCreateRouterOptions<\n TRouterOptions extends CreateRouterOptions,\n> = {\n [K in keyof TRouterOptions]: TRouterOptions[K] extends infer $Value\n ? $Value extends AnyProcedure\n ? $Value\n : $Value extends Router\n ? TRecord\n : $Value extends Lazy>\n ? TRecord\n : $Value extends CreateRouterOptions\n ? DecorateCreateRouterOptions<$Value>\n : never\n : never;\n};\n\n/**\n * @internal\n */\nexport function createRouterFactory(\n config: RootConfig,\n) {\n function createRouterInner(\n input: TInput,\n ): BuiltRouter> {\n const reservedWordsUsed = new Set(\n Object.keys(input).filter((v) => reservedWords.includes(v)),\n );\n if (reservedWordsUsed.size > 0) {\n throw new Error(\n 'Reserved words used in `router({})` call: ' +\n Array.from(reservedWordsUsed).join(', '),\n );\n }\n\n const procedures: Record = emptyObject();\n const lazy: Record> = emptyObject();\n\n function createLazyLoader(opts: {\n ref: Lazy;\n path: readonly string[];\n key: string;\n aggregate: RouterRecord;\n }): LazyLoader {\n return {\n ref: opts.ref,\n load: once(async () => {\n const router = await opts.ref();\n const lazyPath = [...opts.path, opts.key];\n const lazyKey = lazyPath.join('.');\n\n opts.aggregate[opts.key] = step(router._def.record, lazyPath);\n\n delete lazy[lazyKey];\n\n // add lazy loaders for nested routers\n for (const [nestedKey, nestedItem] of Object.entries(\n router._def.lazy,\n )) {\n const nestedRouterKey = [...lazyPath, nestedKey].join('.');\n\n // console.log('adding lazy', nestedRouterKey);\n lazy[nestedRouterKey] = createLazyLoader({\n ref: nestedItem.ref,\n path: lazyPath,\n key: nestedKey,\n aggregate: opts.aggregate[opts.key] as RouterRecord,\n });\n }\n }),\n };\n }\n\n function step(from: CreateRouterOptions, path: readonly string[] = []) {\n const aggregate: RouterRecord = emptyObject();\n for (const [key, item] of Object.entries(from ?? {})) {\n if (isLazy(item)) {\n lazy[[...path, key].join('.')] = createLazyLoader({\n path,\n ref: item,\n key,\n aggregate,\n });\n continue;\n }\n if (isRouter(item)) {\n aggregate[key] = step(item._def.record, [...path, key]);\n continue;\n }\n if (!isProcedure(item)) {\n // RouterRecord\n aggregate[key] = step(item, [...path, key]);\n continue;\n }\n\n const newPath = [...path, key].join('.');\n\n if (procedures[newPath]) {\n throw new Error(`Duplicate key: ${newPath}`);\n }\n\n procedures[newPath] = item;\n aggregate[key] = item;\n }\n\n return aggregate;\n }\n const record = step(input);\n\n const _def: AnyRouter['_def'] = {\n _config: config,\n router: true,\n procedures,\n lazy,\n ...emptyRouter,\n record,\n };\n\n const router: BuiltRouter = {\n ...(record as {}),\n _def,\n createCaller: createCallerFactory()({\n _def,\n }),\n };\n return router as BuiltRouter>;\n }\n\n return createRouterInner;\n}\n\nfunction isProcedure(\n procedureOrRouter: ValueOf,\n): procedureOrRouter is AnyProcedure {\n return typeof procedureOrRouter === 'function';\n}\n\n/**\n * @internal\n */\nexport async function getProcedureAtPath(\n router: Pick, '_def'>,\n path: string,\n): Promise {\n const { _def } = router;\n let procedure = _def.procedures[path];\n\n while (!procedure) {\n const key = Object.keys(_def.lazy).find((key) => path.startsWith(key));\n // console.log(`found lazy: ${key ?? 'NOPE'} (fullPath: ${fullPath})`);\n\n if (!key) {\n return null;\n }\n // console.log('loading', key, '.......');\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const lazyRouter = _def.lazy[key]!;\n await lazyRouter.load();\n\n procedure = _def.procedures[path];\n }\n\n return procedure;\n}\n\n/**\n * @internal\n */\nexport async function callProcedure(\n opts: ProcedureCallOptions & {\n router: AnyRouter;\n allowMethodOverride?: boolean;\n },\n) {\n const { type, path } = opts;\n const proc = await getProcedureAtPath(opts.router, path);\n if (\n !proc ||\n !isProcedure(proc) ||\n (proc._def.type !== type && !opts.allowMethodOverride)\n ) {\n throw new TRPCError({\n code: 'NOT_FOUND',\n message: `No \"${type}\"-procedure on path \"${path}\"`,\n });\n }\n\n /* istanbul ignore if -- @preserve */\n if (\n proc._def.type !== type &&\n opts.allowMethodOverride &&\n proc._def.type === 'subscription'\n ) {\n throw new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message: `Method override is not supported for subscriptions`,\n });\n }\n\n return proc(opts);\n}\n\nexport interface RouterCallerFactory {\n (\n router: Pick, '_def'>,\n ): RouterCaller;\n}\n\nexport function createCallerFactory<\n TRoot extends AnyRootTypes,\n>(): RouterCallerFactory {\n return function createCallerInner(\n router: Pick, '_def'>,\n ): RouterCaller {\n const { _def } = router;\n type Context = TRoot['ctx'];\n\n return function createCaller(ctxOrCallback, opts) {\n return createRecursiveProxy>>(\n async (innerOpts) => {\n const { path, args } = innerOpts;\n const fullPath = path.join('.');\n\n if (path.length === 1 && path[0] === '_def') {\n return _def;\n }\n\n const procedure = await getProcedureAtPath(router, fullPath);\n\n let ctx: Context | undefined = undefined;\n try {\n if (!procedure) {\n throw new TRPCError({\n code: 'NOT_FOUND',\n message: `No procedure found on path \"${path}\"`,\n });\n }\n ctx = isFunction(ctxOrCallback)\n ? await Promise.resolve(ctxOrCallback())\n : ctxOrCallback;\n\n return await procedure({\n path: fullPath,\n getRawInput: async () => args[0],\n ctx,\n type: procedure._def.type,\n signal: opts?.signal,\n batchIndex: 0,\n });\n } catch (cause) {\n opts?.onError?.({\n ctx,\n error: getTRPCErrorFromUnknown(cause),\n input: args[0],\n path: fullPath,\n type: procedure?._def.type ?? 'unknown',\n });\n throw cause;\n }\n },\n );\n };\n };\n}\n\n/** @internal */\nexport type MergeRouters<\n TRouters extends AnyRouter[],\n TRoot extends AnyRootTypes = TRouters[0]['_def']['_config']['$types'],\n TRecord extends RouterRecord = {},\n> = TRouters extends [\n infer Head extends AnyRouter,\n ...infer Tail extends AnyRouter[],\n]\n ? MergeRouters\n : BuiltRouter;\n\nexport function mergeRouters(\n ...routerList: [...TRouters]\n): MergeRouters {\n const record = mergeWithoutOverrides(\n {},\n ...routerList.map((r) => r._def.record),\n );\n const errorFormatter = routerList.reduce(\n (currentErrorFormatter, nextRouter) => {\n if (\n nextRouter._def._config.errorFormatter &&\n nextRouter._def._config.errorFormatter !== defaultFormatter\n ) {\n if (\n currentErrorFormatter !== defaultFormatter &&\n currentErrorFormatter !== nextRouter._def._config.errorFormatter\n ) {\n throw new Error('You seem to have several error formatters');\n }\n return nextRouter._def._config.errorFormatter;\n }\n return currentErrorFormatter;\n },\n defaultFormatter,\n );\n\n const transformer = routerList.reduce((prev, current) => {\n if (\n current._def._config.transformer &&\n current._def._config.transformer !== defaultTransformer\n ) {\n if (\n prev !== defaultTransformer &&\n prev !== current._def._config.transformer\n ) {\n throw new Error('You seem to have several transformers');\n }\n return current._def._config.transformer;\n }\n return prev;\n }, defaultTransformer);\n\n const router = createRouterFactory({\n errorFormatter,\n transformer,\n isDev: routerList.every((r) => r._def._config.isDev),\n allowOutsideOfServer: routerList.every(\n (r) => r._def._config.allowOutsideOfServer,\n ),\n isServer: routerList.every((r) => r._def._config.isServer),\n $types: routerList[0]?._def._config.$types,\n sse: routerList[0]?._def._config.sse,\n })(record);\n\n return router as MergeRouters;\n}\n", "const trackedSymbol = Symbol();\n\ntype TrackedId = string & {\n __brand: 'TrackedId';\n};\nexport type TrackedEnvelope = [TrackedId, TData, typeof trackedSymbol];\n\nexport interface TrackedData {\n /**\n * The id of the message to keep track of in case the connection gets lost\n */\n id: string;\n /**\n * The data field of the message\n */\n data: TData;\n}\n/**\n * Produce a typed server-sent event message\n * @deprecated use `tracked(id, data)` instead\n */\nexport function sse(event: { id: string; data: TData }) {\n return tracked(event.id, event.data);\n}\n\nexport function isTrackedEnvelope(\n value: unknown,\n): value is TrackedEnvelope {\n return Array.isArray(value) && value[2] === trackedSymbol;\n}\n\n/**\n * Automatically track an event so that it can be resumed from a given id if the connection is lost\n */\nexport function tracked(\n id: string,\n data: TData,\n): TrackedEnvelope {\n if (id === '') {\n // This limitation could be removed by using different SSE event names / channels for tracked event and non-tracked event\n throw new Error(\n '`id` must not be an empty string as empty string is the same as not setting the id at all',\n );\n }\n return [id as TrackedId, data, trackedSymbol];\n}\n\nexport type inferTrackedOutput =\n TData extends TrackedEnvelope ? TrackedData<$Data> : TData;\n", "import type { Result } from '../unstable-core-do-not-import';\nimport type {\n Observable,\n Observer,\n OperatorFunction,\n TeardownLogic,\n UnaryFunction,\n Unsubscribable,\n} from './types';\n\n/** @public */\nexport type inferObservableValue =\n TObservable extends Observable ? TValue : never;\n\n/** @public */\nexport function isObservable(x: unknown): x is Observable {\n return typeof x === 'object' && x !== null && 'subscribe' in x;\n}\n\n/** @public */\nexport function observable(\n subscribe: (observer: Observer) => TeardownLogic,\n): Observable {\n const self: Observable = {\n subscribe(observer) {\n let teardownRef: TeardownLogic | null = null;\n let isDone = false;\n let unsubscribed = false;\n let teardownImmediately = false;\n function unsubscribe() {\n if (teardownRef === null) {\n teardownImmediately = true;\n return;\n }\n if (unsubscribed) {\n return;\n }\n unsubscribed = true;\n\n if (typeof teardownRef === 'function') {\n teardownRef();\n } else if (teardownRef) {\n teardownRef.unsubscribe();\n }\n }\n teardownRef = subscribe({\n next(value) {\n if (isDone) {\n return;\n }\n observer.next?.(value);\n },\n error(err) {\n if (isDone) {\n return;\n }\n isDone = true;\n observer.error?.(err);\n unsubscribe();\n },\n complete() {\n if (isDone) {\n return;\n }\n isDone = true;\n observer.complete?.();\n unsubscribe();\n },\n });\n if (teardownImmediately) {\n unsubscribe();\n }\n return {\n unsubscribe,\n };\n },\n pipe(\n ...operations: OperatorFunction[]\n ): Observable {\n return operations.reduce(pipeReducer, self);\n },\n };\n return self;\n}\n\nfunction pipeReducer(prev: any, fn: UnaryFunction) {\n return fn(prev);\n}\n\n/** @internal */\nexport function observableToPromise(\n observable: Observable,\n) {\n const ac = new AbortController();\n const promise = new Promise((resolve, reject) => {\n let isDone = false;\n function onDone() {\n if (isDone) {\n return;\n }\n isDone = true;\n obs$.unsubscribe();\n }\n ac.signal.addEventListener('abort', () => {\n reject(ac.signal.reason);\n });\n const obs$ = observable.subscribe({\n next(data) {\n isDone = true;\n resolve(data);\n onDone();\n },\n error(data) {\n reject(data);\n },\n complete() {\n ac.abort();\n onDone();\n },\n });\n });\n return promise;\n}\n\n/**\n * @internal\n */\nfunction observableToReadableStream(\n observable: Observable,\n signal: AbortSignal,\n): ReadableStream> {\n let unsub: Unsubscribable | null = null;\n\n const onAbort = () => {\n unsub?.unsubscribe();\n unsub = null;\n signal.removeEventListener('abort', onAbort);\n };\n\n return new ReadableStream>({\n start(controller) {\n unsub = observable.subscribe({\n next(data) {\n controller.enqueue({ ok: true, value: data });\n },\n error(error) {\n controller.enqueue({ ok: false, error });\n controller.close();\n },\n complete() {\n controller.close();\n },\n });\n\n if (signal.aborted) {\n onAbort();\n } else {\n signal.addEventListener('abort', onAbort, { once: true });\n }\n },\n cancel() {\n onAbort();\n },\n });\n}\n\n/** @internal */\nexport function observableToAsyncIterable(\n observable: Observable,\n signal: AbortSignal,\n): AsyncIterable {\n const stream = observableToReadableStream(observable, signal);\n\n const reader = stream.getReader();\n const iterator: AsyncIterator = {\n async next() {\n const value = await reader.read();\n if (value.done) {\n return {\n value: undefined,\n done: true,\n };\n }\n const { value: result } = value;\n if (!result.ok) {\n throw result.error;\n }\n return {\n value: result.value,\n done: false,\n };\n },\n async return() {\n await reader.cancel();\n return {\n value: undefined,\n done: true,\n };\n },\n };\n return {\n [Symbol.asyncIterator]() {\n return iterator;\n },\n };\n}\n", "import { TRPCError } from '../error/TRPCError';\nimport { isObject } from '../utils';\nimport type { TRPCRequestInfo } from './types';\n\nexport function parseConnectionParamsFromUnknown(\n parsed: unknown,\n): TRPCRequestInfo['connectionParams'] {\n try {\n if (parsed === null) {\n return null;\n }\n if (!isObject(parsed)) {\n throw new Error('Expected object');\n }\n const nonStringValues = Object.entries(parsed).filter(\n ([_key, value]) => typeof value !== 'string',\n );\n\n if (nonStringValues.length > 0) {\n throw new Error(\n `Expected connectionParams to be string values. Got ${nonStringValues\n .map(([key, value]) => `${key}: ${typeof value}`)\n .join(', ')}`,\n );\n }\n return parsed as Record;\n } catch (cause) {\n throw new TRPCError({\n code: 'PARSE_ERROR',\n message: 'Invalid connection params shape',\n cause,\n });\n }\n}\nexport function parseConnectionParamsFromString(\n str: string,\n): TRPCRequestInfo['connectionParams'] {\n let parsed: unknown;\n try {\n parsed = JSON.parse(str);\n } catch (cause) {\n throw new TRPCError({\n code: 'PARSE_ERROR',\n message: 'Not JSON-parsable query params',\n cause,\n });\n }\n return parseConnectionParamsFromUnknown(parsed);\n}\n", "import { TRPCError } from '../error/TRPCError';\nimport type { ProcedureType } from '../procedure';\nimport { getProcedureAtPath, type AnyRouter } from '../router';\nimport { emptyObject, isObject } from '../utils';\nimport { parseConnectionParamsFromString } from './parseConnectionParams';\nimport type { TRPCAcceptHeader, TRPCRequestInfo } from './types';\n\nexport function getAcceptHeader(headers: Headers): TRPCAcceptHeader | null {\n return (\n (headers.get('trpc-accept') as TRPCAcceptHeader | null) ??\n (headers\n .get('accept')\n ?.split(',')\n .some((t) => t.trim() === 'application/jsonl')\n ? ('application/jsonl' as TRPCAcceptHeader)\n : null)\n );\n}\n\ntype GetRequestInfoOptions = {\n path: string;\n req: Request;\n url: URL | null;\n searchParams: URLSearchParams;\n headers: Headers;\n router: AnyRouter;\n};\n\ntype ContentTypeHandler = {\n isMatch: (opts: Request) => boolean;\n parse: (opts: GetRequestInfoOptions) => Promise;\n};\n\n/**\n * Memoize a function that takes no arguments\n * @internal\n */\nfunction memo(fn: () => Promise) {\n let promise: Promise | null = null;\n const sym = Symbol.for('@trpc/server/http/memo');\n let value: TReturn | typeof sym = sym;\n return {\n /**\n * Lazily read the value\n */\n read: async (): Promise => {\n if (value !== sym) {\n return value;\n }\n\n // dedupes promises and catches errors\n promise ??= fn().catch((cause) => {\n if (cause instanceof TRPCError) {\n throw cause;\n }\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: cause instanceof Error ? cause.message : 'Invalid input',\n cause,\n });\n });\n\n value = await promise;\n promise = null;\n\n return value;\n },\n /**\n * Get an already stored result\n */\n result: (): TReturn | undefined => {\n return value !== sym ? value : undefined;\n },\n };\n}\n\nconst jsonContentTypeHandler: ContentTypeHandler = {\n isMatch(req) {\n return !!req.headers.get('content-type')?.startsWith('application/json');\n },\n async parse(opts) {\n const { req } = opts;\n const isBatchCall = opts.searchParams.get('batch') === '1';\n const paths = isBatchCall ? opts.path.split(',') : [opts.path];\n\n type InputRecord = Record;\n const getInputs = memo(async (): Promise => {\n let inputs: unknown = undefined;\n if (req.method === 'GET') {\n const queryInput = opts.searchParams.get('input');\n if (queryInput) {\n inputs = JSON.parse(queryInput);\n }\n } else {\n inputs = await req.json();\n }\n if (inputs === undefined) {\n return emptyObject();\n }\n\n if (!isBatchCall) {\n const result: InputRecord = emptyObject();\n result[0] =\n opts.router._def._config.transformer.input.deserialize(inputs);\n return result;\n }\n\n if (!isObject(inputs)) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: '\"input\" needs to be an object when doing a batch call',\n });\n }\n const acc: InputRecord = emptyObject();\n for (const index of paths.keys()) {\n const input = inputs[index];\n if (input !== undefined) {\n acc[index] =\n opts.router._def._config.transformer.input.deserialize(input);\n }\n }\n\n return acc;\n });\n\n const calls = await Promise.all(\n paths.map(\n async (path, index): Promise => {\n const procedure = await getProcedureAtPath(opts.router, path);\n return {\n batchIndex: index,\n path,\n procedure,\n getRawInput: async () => {\n const inputs = await getInputs.read();\n let input = inputs[index];\n\n if (procedure?._def.type === 'subscription') {\n const lastEventId =\n opts.headers.get('last-event-id') ??\n opts.searchParams.get('lastEventId') ??\n opts.searchParams.get('Last-Event-Id');\n\n if (lastEventId) {\n if (isObject(input)) {\n input = {\n ...input,\n lastEventId: lastEventId,\n };\n } else {\n input ??= {\n lastEventId: lastEventId,\n };\n }\n }\n }\n return input;\n },\n result: () => {\n return getInputs.result()?.[index];\n },\n };\n },\n ),\n );\n\n const types = new Set(\n calls.map((call) => call.procedure?._def.type).filter(Boolean),\n );\n\n /* istanbul ignore if -- @preserve */\n if (types.size > 1) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: `Cannot mix procedure types in call: ${Array.from(types).join(\n ', ',\n )}`,\n });\n }\n const type: ProcedureType | 'unknown' =\n types.values().next().value ?? 'unknown';\n\n const connectionParamsStr = opts.searchParams.get('connectionParams');\n\n const info: TRPCRequestInfo = {\n isBatchCall,\n accept: getAcceptHeader(req.headers),\n calls,\n type,\n connectionParams:\n connectionParamsStr === null\n ? null\n : parseConnectionParamsFromString(connectionParamsStr),\n signal: req.signal,\n url: opts.url,\n };\n return info;\n },\n};\n\nconst formDataContentTypeHandler: ContentTypeHandler = {\n isMatch(req) {\n return !!req.headers.get('content-type')?.startsWith('multipart/form-data');\n },\n async parse(opts) {\n const { req } = opts;\n if (req.method !== 'POST') {\n throw new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message:\n 'Only POST requests are supported for multipart/form-data requests',\n });\n }\n const getInputs = memo(async () => {\n const fd = await req.formData();\n return fd;\n });\n const procedure = await getProcedureAtPath(opts.router, opts.path);\n return {\n accept: null,\n calls: [\n {\n batchIndex: 0,\n path: opts.path,\n getRawInput: getInputs.read,\n result: getInputs.result,\n procedure,\n },\n ],\n isBatchCall: false,\n type: 'mutation',\n connectionParams: null,\n signal: req.signal,\n url: opts.url,\n };\n },\n};\n\nconst octetStreamContentTypeHandler: ContentTypeHandler = {\n isMatch(req) {\n return !!req.headers\n .get('content-type')\n ?.startsWith('application/octet-stream');\n },\n async parse(opts) {\n const { req } = opts;\n if (req.method !== 'POST') {\n throw new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message:\n 'Only POST requests are supported for application/octet-stream requests',\n });\n }\n const getInputs = memo(async () => {\n return req.body;\n });\n return {\n calls: [\n {\n batchIndex: 0,\n path: opts.path,\n getRawInput: getInputs.read,\n result: getInputs.result,\n procedure: await getProcedureAtPath(opts.router, opts.path),\n },\n ],\n isBatchCall: false,\n accept: null,\n type: 'mutation',\n connectionParams: null,\n signal: req.signal,\n url: opts.url,\n };\n },\n};\n\nconst handlers = [\n jsonContentTypeHandler,\n formDataContentTypeHandler,\n octetStreamContentTypeHandler,\n];\n\nfunction getContentTypeHandler(req: Request): ContentTypeHandler {\n const handler = handlers.find((handler) => handler.isMatch(req));\n if (handler) {\n return handler;\n }\n\n if (!handler && req.method === 'GET') {\n // fallback to JSON for get requests so GET-requests can be opened in browser easily\n return jsonContentTypeHandler;\n }\n\n throw new TRPCError({\n code: 'UNSUPPORTED_MEDIA_TYPE',\n message: req.headers.has('content-type')\n ? `Unsupported content-type \"${req.headers.get('content-type')}`\n : 'Missing content-type header',\n });\n}\n\nexport async function getRequestInfo(\n opts: GetRequestInfoOptions,\n): Promise {\n const handler = getContentTypeHandler(opts.req);\n return await handler.parse(opts);\n}\n", "import { isObject } from '../utils';\n\nexport function isAbortError(\n error: unknown,\n): error is DOMException | Error | { name: 'AbortError' } {\n return isObject(error) && error['name'] === 'AbortError';\n}\n\nexport function throwAbortError(message = 'AbortError'): never {\n throw new DOMException(message, 'AbortError');\n}\n", "/*!\n * is-plain-object \n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o: unknown): o is Record {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n \nexport function isPlainObject(o: unknown): o is Record {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n};\n", "/* eslint-disable @typescript-eslint/unbound-method */\n \n \n\nimport type {\n PromiseExecutor,\n PromiseWithResolvers,\n ProxyPromise,\n SubscribedPromise,\n} from \"./types\";\n\n/** Memory safe (weakmapped) cache of the ProxyPromise for each Promise,\n * which is retained for the lifetime of the original Promise.\n */\nconst subscribableCache = new WeakMap<\n PromiseLike,\n ProxyPromise\n>();\n\n/** A NOOP function allowing a consistent interface for settled\n * SubscribedPromises (settled promises are not subscribed - they resolve\n * immediately). */\nconst NOOP = () => {\n // noop\n};\n\n/**\n * Every `Promise` can be shadowed by a single `ProxyPromise`. It is\n * created once, cached and reused throughout the lifetime of the Promise. Get a\n * Promise's ProxyPromise using `Unpromise.proxy(promise)`.\n *\n * The `ProxyPromise` attaches handlers to the original `Promise`\n * `.then()` and `.catch()` just once. Promises derived from it use a\n * subscription- (and unsubscription-) based mechanism that monitors these\n * handlers.\n *\n * Every time you call `.subscribe()`, `.then()` `.catch()` or `.finally()` on a\n * `ProxyPromise` it returns a `SubscribedPromise` having an additional\n * `unsubscribe()` method. Calling `unsubscribe()` detaches reference chains\n * from the original, potentially long-lived Promise, eliminating memory leaks.\n *\n * This approach can eliminate the memory leaks that otherwise come about from\n * repeated `race()` or `any()` calls invoking `.then()` and `.catch()` multiple\n * times on the same long-lived native Promise (subscriptions which can never be\n * cleaned up).\n *\n * `Unpromise.race(promises)` is a reference implementation of `Promise.race`\n * avoiding memory leaks when using long-lived unsettled Promises.\n *\n * `Unpromise.any(promises)` is a reference implementation of `Promise.any`\n * avoiding memory leaks when using long-lived unsettled Promises.\n *\n * `Unpromise.resolve(promise)` returns an ephemeral `SubscribedPromise` for\n * any given `Promise` facilitating arbitrary async/await patterns. Behind\n * the scenes, `resolve` is implemented simply as\n * `Unpromise.proxy(promise).subscribe()`. Don't forget to call `.unsubscribe()`\n * to tidy up!\n *\n */\nexport class Unpromise implements ProxyPromise {\n /** INSTANCE IMPLEMENTATION */\n\n /** The promise shadowed by this Unpromise */\n protected readonly promise: Promise | PromiseLike;\n\n /** Promises expecting eventual settlement (unless unsubscribed first). This list is deleted\n * after the original promise settles - no further notifications will be issued. */\n protected subscribers: ReadonlyArray> | null = [];\n\n /** The Promise's settlement (recorded when it fulfils or rejects). This is consulted when\n * calling .subscribe() .then() .catch() .finally() to see if an immediately-resolving Promise\n * can be returned, and therefore subscription can be bypassed. */\n protected settlement: PromiseSettledResult | null = null;\n\n /** Constructor accepts a normal Promise executor function like `new\n * Unpromise((resolve, reject) => {...})` or accepts a pre-existing Promise\n * like `new Unpromise(existingPromise)`. Adds `.then()` and `.catch()`\n * handlers to the Promise. These handlers pass fulfilment and rejection\n * notifications to downstream subscribers and maintains records of value\n * or error if the Promise ever settles. */\n protected constructor(promise: Promise);\n protected constructor(promise: PromiseLike);\n protected constructor(executor: PromiseExecutor);\n protected constructor(arg: Promise | PromiseLike | PromiseExecutor) {\n // handle either a Promise or a Promise executor function\n if (typeof arg === \"function\") {\n this.promise = new Promise(arg);\n } else {\n this.promise = arg;\n }\n\n // subscribe for eventual fulfilment and rejection\n\n // handle PromiseLike objects (that at least have .then)\n const thenReturn = this.promise.then((value) => {\n // atomically record fulfilment and detach subscriber list\n const { subscribers } = this;\n this.subscribers = null;\n this.settlement = {\n status: \"fulfilled\",\n value,\n };\n // notify fulfilment to subscriber list\n subscribers?.forEach(({ resolve }) => {\n resolve(value);\n });\n });\n\n // handle Promise (that also have a .catch behaviour)\n if (\"catch\" in thenReturn) {\n thenReturn.catch((reason) => {\n // atomically record rejection and detach subscriber list\n const { subscribers } = this;\n this.subscribers = null;\n this.settlement = {\n status: \"rejected\",\n reason,\n };\n // notify rejection to subscriber list\n subscribers?.forEach(({ reject }) => {\n reject(reason);\n });\n });\n }\n }\n\n /** Create a promise that mitigates uncontrolled subscription to a long-lived\n * Promise via .then() and .catch() - otherwise a source of memory leaks.\n *\n * The returned promise has an `unsubscribe()` method which can be called when\n * the Promise is no longer being tracked by application logic, and which\n * ensures that there is no reference chain from the original promise to the\n * new one, and therefore no memory leak.\n *\n * If original promise has not yet settled, this adds a new unique promise\n * that listens to then/catch events, along with an `unsubscribe()` method to\n * detach it.\n *\n * If original promise has settled, then creates a new Promise.resolve() or\n * Promise.reject() and provided unsubscribe is a noop.\n *\n * If you call `unsubscribe()` before the returned Promise has settled, it\n * will never settle.\n */\n subscribe(): SubscribedPromise {\n // in all cases we will combine some promise with its unsubscribe function\n let promise: Promise;\n let unsubscribe: () => void;\n\n const { settlement } = this;\n if (settlement === null) {\n // not yet settled - subscribe new promise. Expect eventual settlement\n if (this.subscribers === null) {\n // invariant - it is not settled, so it must have subscribers\n throw new Error(\"Unpromise settled but still has subscribers\");\n }\n const subscriber = withResolvers();\n this.subscribers = listWithMember(this.subscribers, subscriber);\n promise = subscriber.promise;\n unsubscribe = () => {\n if (this.subscribers !== null) {\n this.subscribers = listWithoutMember(this.subscribers, subscriber);\n }\n };\n } else {\n // settled - don't create subscribed promise. Just resolve or reject\n const { status } = settlement;\n if (status === \"fulfilled\") {\n promise = Promise.resolve(settlement.value);\n } else {\n promise = Promise.reject(settlement.reason);\n }\n unsubscribe = NOOP;\n }\n\n // extend promise signature with the extra method\n return Object.assign(promise, { unsubscribe });\n }\n\n /** STANDARD PROMISE METHODS (but returning a SubscribedPromise) */\n\n then(\n onfulfilled?:\n | ((value: T) => TResult1 | PromiseLike)\n | null\n ,\n onrejected?:\n | ((reason: any) => TResult2 | PromiseLike)\n | null\n \n ): SubscribedPromise {\n const subscribed = this.subscribe();\n const { unsubscribe } = subscribed;\n return Object.assign(subscribed.then(onfulfilled, onrejected), {\n unsubscribe,\n });\n }\n\n catch(\n onrejected?:\n | ((reason: any) => TResult | PromiseLike)\n | null\n \n ): SubscribedPromise {\n const subscribed = this.subscribe();\n const { unsubscribe } = subscribed;\n return Object.assign(subscribed.catch(onrejected), {\n unsubscribe,\n });\n }\n\n finally(onfinally?: (() => void) | null ): SubscribedPromise {\n const subscribed = this.subscribe();\n const { unsubscribe } = subscribed;\n return Object.assign(subscribed.finally(onfinally), {\n unsubscribe,\n });\n }\n\n /** TOSTRING SUPPORT */\n\n readonly [Symbol.toStringTag] = \"Unpromise\";\n\n /** Unpromise STATIC METHODS */\n\n /** Create or Retrieve the proxy Unpromise (a re-used Unpromise for the VM lifetime\n * of the provided Promise reference) */\n static proxy(promise: PromiseLike): ProxyPromise {\n const cached = Unpromise.getSubscribablePromise(promise);\n return typeof cached !== \"undefined\"\n ? cached\n : Unpromise.createSubscribablePromise(promise);\n }\n\n /** Create and store an Unpromise keyed by an original Promise. */\n protected static createSubscribablePromise(promise: PromiseLike) {\n const created = new Unpromise(promise);\n subscribableCache.set(promise, created as Unpromise); // resolve promise to unpromise\n subscribableCache.set(created, created as Unpromise); // resolve the unpromise to itself\n return created;\n }\n\n /** Retrieve a previously-created Unpromise keyed by an original Promise. */\n protected static getSubscribablePromise(promise: PromiseLike) {\n return subscribableCache.get(promise) as ProxyPromise | undefined;\n }\n\n /** Promise STATIC METHODS */\n\n /** Lookup the Unpromise for this promise, and derive a SubscribedPromise from\n * it (that can be later unsubscribed to eliminate Memory leaks) */\n static resolve(value: T | PromiseLike) {\n const promise: PromiseLike =\n typeof value === \"object\" &&\n value !== null &&\n \"then\" in value &&\n typeof value.then === \"function\"\n ? value\n : Promise.resolve(value);\n return Unpromise.proxy(promise).subscribe() as SubscribedPromise<\n Awaited\n >;\n }\n\n /** Perform Promise.any() via SubscribedPromises, then unsubscribe them.\n * Equivalent to Promise.any but eliminates memory leaks from long-lived\n * promises accumulating .then() and .catch() subscribers. */\n static async any(\n values: T\n ): Promise>;\n static async any(\n values: Iterable>\n ): Promise> {\n const valuesArray = Array.isArray(values) ? values : [...values];\n const subscribedPromises = valuesArray.map(Unpromise.resolve);\n try {\n return await Promise.any(subscribedPromises);\n } finally {\n subscribedPromises.forEach(({ unsubscribe }) => {\n unsubscribe();\n });\n }\n }\n\n /** Perform Promise.race via SubscribedPromises, then unsubscribe them.\n * Equivalent to Promise.race but eliminates memory leaks from long-lived\n * promises accumulating .then() and .catch() subscribers. */\n static async race(\n values: T\n ): Promise>;\n static async race(\n values: Iterable>\n ): Promise> {\n const valuesArray = Array.isArray(values) ? values : [...values];\n const subscribedPromises = valuesArray.map(Unpromise.resolve);\n try {\n return await Promise.race(subscribedPromises);\n } finally {\n subscribedPromises.forEach(({ unsubscribe }) => {\n unsubscribe();\n });\n }\n }\n\n /** Create a race of SubscribedPromises that will fulfil to a single winning\n * Promise (in a 1-Tuple). Eliminates memory leaks from long-lived promises\n * accumulating .then() and .catch() subscribers. Allows simple logic to\n * consume the result, like...\n * ```ts\n * const [ winner ] = await Unpromise.race([ promiseA, promiseB ]);\n * if(winner === promiseB){\n * const result = await promiseB;\n * // do the thing\n * }\n * ```\n * */\n static async raceReferences>(\n promises: readonly TPromise[]\n ) {\n // map each promise to an eventual 1-tuple containing itself\n const selfPromises = promises.map(resolveSelfTuple);\n\n // now race them. They will fulfil to a readonly [P] or reject.\n try {\n return await Promise.race(selfPromises);\n } finally {\n for (const promise of selfPromises) {\n // unsubscribe proxy promises when the race is over to mitigate memory leaks\n promise.unsubscribe();\n }\n }\n }\n}\n\n/** Promises a 1-tuple containing the original promise when it resolves. Allows\n * awaiting the eventual Promise ***reference*** (easy to destructure and\n * exactly compare with ===). Avoids resolving to the Promise ***value*** (which\n * may be ambiguous and therefore hard to identify as the winner of a race).\n * You can call unsubscribe on the Promise to mitigate memory leaks.\n * */\nexport function resolveSelfTuple>(\n promise: TPromise\n): SubscribedPromise {\n return Unpromise.proxy(promise).then(() => [promise] as const);\n}\n\n/** VENDORED (Future) PROMISE UTILITIES */\n\n/** Reference implementation of https://github.com/tc39/proposal-promise-with-resolvers */\nfunction withResolvers(): PromiseWithResolvers {\n let resolve!: PromiseWithResolvers[\"resolve\"];\n let reject!: PromiseWithResolvers[\"reject\"];\n const promise = new Promise((_resolve, _reject) => {\n resolve = _resolve;\n reject = _reject;\n });\n return {\n promise,\n resolve,\n reject,\n };\n}\n\n/** IMMUTABLE LIST OPERATIONS */\n\nfunction listWithMember(arr: readonly T[], member: T): readonly T[] {\n return [...arr, member];\n}\n\nfunction listWithoutIndex(arr: readonly T[], index: number) {\n return [...arr.slice(0, index), ...arr.slice(index + 1)];\n}\n\nfunction listWithoutMember(arr: readonly T[], member: unknown) {\n const index = arr.indexOf(member as T);\n if (index !== -1) {\n return listWithoutIndex(arr, index);\n }\n return arr;\n}\n", "// @ts-expect-error - polyfilling symbol\n// eslint-disable-next-line no-restricted-syntax\nSymbol.dispose ??= Symbol();\n\n// @ts-expect-error - polyfilling symbol\n// eslint-disable-next-line no-restricted-syntax\nSymbol.asyncDispose ??= Symbol();\n\n/**\n * Takes a value and a dispose function and returns a new object that implements the Disposable interface.\n * The returned object is the original value augmented with a Symbol.dispose method.\n * @param thing The value to make disposable\n * @param dispose Function to call when disposing the resource\n * @returns The original value with Symbol.dispose method added\n */\nexport function makeResource(thing: T, dispose: () => void): T & Disposable {\n const it = thing as T & Partial;\n\n // eslint-disable-next-line no-restricted-syntax\n const existing = it[Symbol.dispose];\n\n // eslint-disable-next-line no-restricted-syntax\n it[Symbol.dispose] = () => {\n dispose();\n existing?.();\n };\n\n return it as T & Disposable;\n}\n\n/**\n * Takes a value and an async dispose function and returns a new object that implements the AsyncDisposable interface.\n * The returned object is the original value augmented with a Symbol.asyncDispose method.\n * @param thing The value to make async disposable\n * @param dispose Async function to call when disposing the resource\n * @returns The original value with Symbol.asyncDispose method added\n */\nexport function makeAsyncResource(\n thing: T,\n dispose: () => Promise,\n): T & AsyncDisposable {\n const it = thing as T & Partial;\n\n // eslint-disable-next-line no-restricted-syntax\n const existing = it[Symbol.asyncDispose];\n\n // eslint-disable-next-line no-restricted-syntax\n it[Symbol.asyncDispose] = async () => {\n await dispose();\n await existing?.();\n };\n\n return it as T & AsyncDisposable;\n}\n", "import { makeResource } from './disposable';\n\nexport const disposablePromiseTimerResult = Symbol();\n\nexport function timerResource(ms: number) {\n let timer: ReturnType | null = null;\n\n return makeResource(\n {\n start() {\n if (timer) {\n throw new Error('Timer already started');\n }\n\n const promise = new Promise(\n (resolve) => {\n timer = setTimeout(() => resolve(disposablePromiseTimerResult), ms);\n },\n );\n return promise;\n },\n },\n () => {\n if (timer) {\n clearTimeout(timer);\n }\n },\n );\n}\n", "function _usingCtx() {\n var r = \"function\" == typeof SuppressedError ? SuppressedError : function (r, e) {\n var n = Error();\n return n.name = \"SuppressedError\", n.error = r, n.suppressed = e, n;\n },\n e = {},\n n = [];\n function using(r, e) {\n if (null != e) {\n if (Object(e) !== e) throw new TypeError(\"using declarations can only be used with objects, functions, null, or undefined.\");\n if (r) var o = e[Symbol.asyncDispose || Symbol[\"for\"](\"Symbol.asyncDispose\")];\n if (void 0 === o && (o = e[Symbol.dispose || Symbol[\"for\"](\"Symbol.dispose\")], r)) var t = o;\n if (\"function\" != typeof o) throw new TypeError(\"Object is not disposable.\");\n t && (o = function o() {\n try {\n t.call(e);\n } catch (r) {\n return Promise.reject(r);\n }\n }), n.push({\n v: e,\n d: o,\n a: r\n });\n } else r && n.push({\n d: e,\n a: r\n });\n return e;\n }\n return {\n e: e,\n u: using.bind(null, !1),\n a: using.bind(null, !0),\n d: function d() {\n var o,\n t = this.e,\n s = 0;\n function next() {\n for (; o = n.pop();) try {\n if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next);\n if (o.d) {\n var r = o.d.call(o.v);\n if (o.a) return s |= 2, Promise.resolve(r).then(next, err);\n } else s |= 1;\n } catch (r) {\n return err(r);\n }\n if (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve();\n if (t !== e) throw t;\n }\n function err(n) {\n return t = t !== e ? new r(n, t) : n, next();\n }\n return next();\n }\n };\n}\nmodule.exports = _usingCtx, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "function _OverloadYield(e, d) {\n this.v = e, this.k = d;\n}\nmodule.exports = _OverloadYield, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var OverloadYield = require(\"./OverloadYield.js\");\nfunction _awaitAsyncGenerator(e) {\n return new OverloadYield(e, 0);\n}\nmodule.exports = _awaitAsyncGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var OverloadYield = require(\"./OverloadYield.js\");\nfunction _wrapAsyncGenerator(e) {\n return function () {\n return new AsyncGenerator(e.apply(this, arguments));\n };\n}\nfunction AsyncGenerator(e) {\n var r, t;\n function resume(r, t) {\n try {\n var n = e[r](t),\n o = n.value,\n u = o instanceof OverloadYield;\n Promise.resolve(u ? o.v : o).then(function (t) {\n if (u) {\n var i = \"return\" === r ? \"return\" : \"next\";\n if (!o.k || t.done) return resume(i, t);\n t = e[i](t).value;\n }\n settle(n.done ? \"return\" : \"normal\", t);\n }, function (e) {\n resume(\"throw\", e);\n });\n } catch (e) {\n settle(\"throw\", e);\n }\n }\n function settle(e, n) {\n switch (e) {\n case \"return\":\n r.resolve({\n value: n,\n done: !0\n });\n break;\n case \"throw\":\n r.reject(n);\n break;\n default:\n r.resolve({\n value: n,\n done: !1\n });\n }\n (r = r.next) ? resume(r.key, r.arg) : t = null;\n }\n this._invoke = function (e, n) {\n return new Promise(function (o, u) {\n var i = {\n key: e,\n arg: n,\n resolve: o,\n reject: u,\n next: null\n };\n t ? t = t.next = i : (r = t = i, resume(e, n));\n });\n }, \"function\" != typeof e[\"return\"] && (this[\"return\"] = void 0);\n}\nAsyncGenerator.prototype[\"function\" == typeof Symbol && Symbol.asyncIterator || \"@@asyncIterator\"] = function () {\n return this;\n}, AsyncGenerator.prototype.next = function (e) {\n return this._invoke(\"next\", e);\n}, AsyncGenerator.prototype[\"throw\"] = function (e) {\n return this._invoke(\"throw\", e);\n}, AsyncGenerator.prototype[\"return\"] = function (e) {\n return this._invoke(\"return\", e);\n};\nmodule.exports = _wrapAsyncGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import { Unpromise } from '../../../vendor/unpromise';\nimport { throwAbortError } from '../../http/abortError';\nimport { makeAsyncResource } from './disposable';\nimport { disposablePromiseTimerResult, timerResource } from './timerResource';\n\nexport function iteratorResource(\n iterable: AsyncIterable,\n): AsyncIterator & AsyncDisposable {\n const iterator = iterable[Symbol.asyncIterator]();\n\n // @ts-expect-error - this is added in node 24 which we don't officially support yet\n // eslint-disable-next-line no-restricted-syntax\n if (iterator[Symbol.asyncDispose]) {\n return iterator as AsyncIterator & AsyncDisposable;\n }\n\n return makeAsyncResource(iterator, async () => {\n await iterator.return?.();\n });\n}\n\n/**\n * Derives a new {@link AsyncGenerator} based of {@link iterable}, that yields its first\n * {@link count} values. Then, a grace period of {@link gracePeriodMs} is started in which further\n * values may still come through. After this period, the generator aborts.\n */\nexport async function* takeWithGrace(\n iterable: AsyncIterable,\n opts: {\n count: number;\n gracePeriodMs: number;\n },\n): AsyncGenerator {\n await using iterator = iteratorResource(iterable);\n\n // declaration outside the loop for garbage collection reasons\n let result: null | IteratorResult | typeof disposablePromiseTimerResult;\n\n using timer = timerResource(opts.gracePeriodMs);\n\n let count = opts.count;\n\n let timerPromise = new Promise(() => {\n // never resolves\n });\n\n while (true) {\n result = await Unpromise.race([iterator.next(), timerPromise]);\n if (result === disposablePromiseTimerResult) {\n throwAbortError();\n }\n if (result.done) {\n return result.value;\n }\n yield result.value;\n if (--count === 0) {\n timerPromise = timer.start();\n }\n // free up reference for garbage collection\n result = null;\n }\n}\n", "/* eslint-disable @typescript-eslint/no-non-null-assertion */\nexport function createDeferred() {\n let resolve: (value: TValue) => void;\n let reject: (error: unknown) => void;\n const promise = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n return { promise, resolve: resolve!, reject: reject! };\n}\nexport type Deferred = ReturnType>;\n", "import { createDeferred } from './createDeferred';\nimport { makeAsyncResource } from './disposable';\n\ntype ManagedIteratorResult =\n | { status: 'yield'; value: TYield }\n | { status: 'return'; value: TReturn }\n | { status: 'error'; error: unknown };\nfunction createManagedIterator(\n iterable: AsyncIterable,\n onResult: (result: ManagedIteratorResult) => void,\n) {\n const iterator = iterable[Symbol.asyncIterator]();\n let state: 'idle' | 'pending' | 'done' = 'idle';\n\n function cleanup() {\n state = 'done';\n onResult = () => {\n // noop\n };\n }\n\n function pull() {\n if (state !== 'idle') {\n return;\n }\n state = 'pending';\n\n const next = iterator.next();\n next\n .then((result) => {\n if (result.done) {\n state = 'done';\n onResult({ status: 'return', value: result.value });\n cleanup();\n return;\n }\n state = 'idle';\n onResult({ status: 'yield', value: result.value });\n })\n .catch((cause) => {\n onResult({ status: 'error', error: cause });\n cleanup();\n });\n }\n\n return {\n pull,\n destroy: async () => {\n cleanup();\n await iterator.return?.();\n },\n };\n}\ntype ManagedIterator = ReturnType<\n typeof createManagedIterator\n>;\n\ninterface MergedAsyncIterables\n extends AsyncIterable {\n add(iterable: AsyncIterable): void;\n}\n\n/**\n * Creates a new async iterable that merges multiple async iterables into a single stream.\n * Values from the input iterables are yielded in the order they resolve, similar to Promise.race().\n *\n * New iterables can be added dynamically using the returned {@link MergedAsyncIterables.add} method, even after iteration has started.\n *\n * If any of the input iterables throws an error, that error will be propagated through the merged stream.\n * Other iterables will not continue to be processed.\n *\n * @template TYield The type of values yielded by the input iterables\n */\nexport function mergeAsyncIterables(): MergedAsyncIterables {\n let state: 'idle' | 'pending' | 'done' = 'idle';\n let flushSignal = createDeferred();\n\n /**\n * used while {@link state} is `idle`\n */\n const iterables: AsyncIterable[] = [];\n /**\n * used while {@link state} is `pending`\n */\n const iterators = new Set>();\n\n const buffer: Array<\n [\n iterator: ManagedIterator,\n result: Exclude<\n ManagedIteratorResult,\n { status: 'return' }\n >,\n ]\n > = [];\n\n function initIterable(iterable: AsyncIterable) {\n if (state !== 'pending') {\n // shouldn't happen\n return;\n }\n const iterator = createManagedIterator(iterable, (result) => {\n if (state !== 'pending') {\n // shouldn't happen\n return;\n }\n switch (result.status) {\n case 'yield':\n buffer.push([iterator, result]);\n break;\n case 'return':\n iterators.delete(iterator);\n break;\n case 'error':\n buffer.push([iterator, result]);\n iterators.delete(iterator);\n break;\n }\n flushSignal.resolve();\n });\n iterators.add(iterator);\n iterator.pull();\n }\n\n return {\n add(iterable: AsyncIterable) {\n switch (state) {\n case 'idle':\n iterables.push(iterable);\n break;\n case 'pending':\n initIterable(iterable);\n break;\n case 'done': {\n // shouldn't happen\n break;\n }\n }\n },\n async *[Symbol.asyncIterator]() {\n if (state !== 'idle') {\n throw new Error('Cannot iterate twice');\n }\n state = 'pending';\n\n await using _finally = makeAsyncResource({}, async () => {\n state = 'done';\n\n const errors: unknown[] = [];\n await Promise.all(\n Array.from(iterators.values()).map(async (it) => {\n try {\n await it.destroy();\n } catch (cause) {\n errors.push(cause);\n }\n }),\n );\n buffer.length = 0;\n iterators.clear();\n flushSignal.resolve();\n\n if (errors.length > 0) {\n throw new AggregateError(errors);\n }\n });\n\n while (iterables.length > 0) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n initIterable(iterables.shift()!);\n }\n\n while (iterators.size > 0) {\n await flushSignal.promise;\n\n while (buffer.length > 0) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const [iterator, result] = buffer.shift()!;\n\n switch (result.status) {\n case 'yield':\n yield result.value;\n iterator.pull();\n break;\n case 'error':\n throw result.error;\n }\n }\n flushSignal = createDeferred();\n }\n },\n };\n}\n", "/**\n * Creates a ReadableStream from an AsyncIterable.\n *\n * @param iterable - The source AsyncIterable to stream from\n * @returns A ReadableStream that yields values from the AsyncIterable\n */\nexport function readableStreamFrom(\n iterable: AsyncIterable,\n): ReadableStream {\n const iterator = iterable[Symbol.asyncIterator]();\n\n return new ReadableStream({\n async cancel() {\n await iterator.return?.();\n },\n\n async pull(controller) {\n const result = await iterator.next();\n\n if (result.done) {\n controller.close();\n return;\n }\n\n controller.enqueue(result.value);\n },\n });\n}\n", "import { Unpromise } from '../../../vendor/unpromise';\nimport { iteratorResource } from './asyncIterable';\nimport { disposablePromiseTimerResult, timerResource } from './timerResource';\n\nexport const PING_SYM = Symbol('ping');\n\n/**\n * Derives a new {@link AsyncGenerator} based of {@link iterable}, that yields {@link PING_SYM}\n * whenever no value has been yielded for {@link pingIntervalMs}.\n */\nexport async function* withPing(\n iterable: AsyncIterable,\n pingIntervalMs: number,\n): AsyncGenerator {\n await using iterator = iteratorResource(iterable);\n\n // declaration outside the loop for garbage collection reasons\n let result:\n | null\n | IteratorResult\n | typeof disposablePromiseTimerResult;\n\n let nextPromise = iterator.next();\n\n while (true) {\n using pingPromise = timerResource(pingIntervalMs);\n\n result = await Unpromise.race([nextPromise, pingPromise.start()]);\n\n if (result === disposablePromiseTimerResult) {\n // cancelled\n\n yield PING_SYM;\n continue;\n }\n\n if (result.done) {\n return result.value;\n }\n\n nextPromise = iterator.next();\n yield result.value;\n\n // free up reference for garbage collection\n result = null;\n }\n}\n", "function _asyncIterator(r) {\n var n,\n t,\n o,\n e = 2;\n for (\"undefined\" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) {\n if (t && null != (n = r[t])) return n.call(r);\n if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r));\n t = \"@@asyncIterator\", o = \"@@iterator\";\n }\n throw new TypeError(\"Object is not async iterable\");\n}\nfunction AsyncFromSyncIterator(r) {\n function AsyncFromSyncIteratorContinuation(r) {\n if (Object(r) !== r) return Promise.reject(new TypeError(r + \" is not an object.\"));\n var n = r.done;\n return Promise.resolve(r.value).then(function (r) {\n return {\n value: r,\n done: n\n };\n });\n }\n return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) {\n this.s = r, this.n = r.next;\n }, AsyncFromSyncIterator.prototype = {\n s: null,\n n: null,\n next: function next() {\n return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));\n },\n \"return\": function _return(r) {\n var n = this.s[\"return\"];\n return void 0 === n ? Promise.resolve({\n value: r,\n done: !0\n }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));\n },\n \"throw\": function _throw(r) {\n var n = this.s[\"return\"];\n return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));\n }\n }, new AsyncFromSyncIterator(r);\n}\nmodule.exports = _asyncIterator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import { isPlainObject } from '@trpc/server/vendor/is-plain-object';\nimport {\n emptyObject,\n isAsyncIterable,\n isFunction,\n isObject,\n run,\n} from '../utils';\nimport { iteratorResource } from './utils/asyncIterable';\nimport type { Deferred } from './utils/createDeferred';\nimport { createDeferred } from './utils/createDeferred';\nimport { makeResource } from './utils/disposable';\nimport { mergeAsyncIterables } from './utils/mergeAsyncIterables';\nimport { readableStreamFrom } from './utils/readableStreamFrom';\nimport { PING_SYM, withPing } from './utils/withPing';\n\n/**\n * A subset of the standard ReadableStream properties needed by tRPC internally.\n * @see ReadableStream from lib.dom.d.ts\n */\nexport type WebReadableStreamEsque = {\n getReader: () => ReadableStreamDefaultReader;\n};\n\nexport type NodeJSReadableStreamEsque = {\n on(\n eventName: string | symbol,\n listener: (...args: any[]) => void,\n ): NodeJSReadableStreamEsque;\n};\n\n// ---------- types\nconst CHUNK_VALUE_TYPE_PROMISE = 0;\ntype CHUNK_VALUE_TYPE_PROMISE = typeof CHUNK_VALUE_TYPE_PROMISE;\nconst CHUNK_VALUE_TYPE_ASYNC_ITERABLE = 1;\ntype CHUNK_VALUE_TYPE_ASYNC_ITERABLE = typeof CHUNK_VALUE_TYPE_ASYNC_ITERABLE;\n\nconst PROMISE_STATUS_FULFILLED = 0;\ntype PROMISE_STATUS_FULFILLED = typeof PROMISE_STATUS_FULFILLED;\nconst PROMISE_STATUS_REJECTED = 1;\ntype PROMISE_STATUS_REJECTED = typeof PROMISE_STATUS_REJECTED;\n\nconst ASYNC_ITERABLE_STATUS_RETURN = 0;\ntype ASYNC_ITERABLE_STATUS_RETURN = typeof ASYNC_ITERABLE_STATUS_RETURN;\nconst ASYNC_ITERABLE_STATUS_YIELD = 1;\ntype ASYNC_ITERABLE_STATUS_YIELD = typeof ASYNC_ITERABLE_STATUS_YIELD;\nconst ASYNC_ITERABLE_STATUS_ERROR = 2;\ntype ASYNC_ITERABLE_STATUS_ERROR = typeof ASYNC_ITERABLE_STATUS_ERROR;\n\ntype ChunkDefinitionKey =\n // root should be replaced\n | null\n // at array path\n | number\n // at key path\n | string;\n\ntype ChunkIndex = number & { __chunkIndex: true };\ntype ChunkValueType =\n | CHUNK_VALUE_TYPE_PROMISE\n | CHUNK_VALUE_TYPE_ASYNC_ITERABLE;\ntype ChunkDefinition = [\n key: ChunkDefinitionKey,\n type: ChunkValueType,\n chunkId: ChunkIndex,\n];\ntype EncodedValue = [\n // data\n [unknown] | [],\n // chunk descriptions\n ...ChunkDefinition[],\n];\n\ntype Head = Record;\ntype PromiseChunk =\n | [\n chunkIndex: ChunkIndex,\n status: PROMISE_STATUS_FULFILLED,\n value: EncodedValue,\n ]\n | [chunkIndex: ChunkIndex, status: PROMISE_STATUS_REJECTED, error: unknown];\ntype IterableChunk =\n | [\n chunkIndex: ChunkIndex,\n status: ASYNC_ITERABLE_STATUS_RETURN,\n value: EncodedValue,\n ]\n | [\n chunkIndex: ChunkIndex,\n status: ASYNC_ITERABLE_STATUS_YIELD,\n value: EncodedValue,\n ]\n | [\n chunkIndex: ChunkIndex,\n status: ASYNC_ITERABLE_STATUS_ERROR,\n error: unknown,\n ];\ntype ChunkData = PromiseChunk | IterableChunk;\ntype PlaceholderValue = 0 & { __placeholder: true };\nexport function isPromise(value: unknown): value is Promise {\n return (\n (isObject(value) || isFunction(value)) &&\n typeof value?.['then'] === 'function' &&\n typeof value?.['catch'] === 'function'\n );\n}\n\ntype Serialize = (value: any) => any;\ntype Deserialize = (value: any) => any;\n\ntype PathArray = readonly (string | number)[];\nexport type ProducerOnError = (opts: {\n error: unknown;\n path: PathArray;\n}) => void;\nexport interface JSONLProducerOptions {\n serialize?: Serialize;\n data: Record | unknown[];\n onError?: ProducerOnError;\n formatError?: (opts: { error: unknown; path: PathArray }) => unknown;\n maxDepth?: number;\n /**\n * Interval in milliseconds to send a ping to the client to keep the connection alive\n * This will be sent as a whitespace character\n * @default undefined\n */\n pingMs?: number;\n}\n\nclass MaxDepthError extends Error {\n constructor(public path: (string | number)[]) {\n super('Max depth reached at path: ' + path.join('.'));\n }\n}\n\nasync function* createBatchStreamProducer(\n opts: JSONLProducerOptions,\n): AsyncIterable {\n const { data } = opts;\n let counter = 0 as ChunkIndex;\n const placeholder = 0 as PlaceholderValue;\n\n const mergedIterables = mergeAsyncIterables();\n function registerAsync(\n callback: (idx: ChunkIndex) => AsyncIterable,\n ) {\n const idx = counter++ as ChunkIndex;\n\n const iterable = callback(idx);\n mergedIterables.add(iterable);\n\n return idx;\n }\n\n function encodePromise(promise: Promise, path: (string | number)[]) {\n return registerAsync(async function* (idx) {\n const error = checkMaxDepth(path);\n if (error) {\n // Catch any errors from the original promise to ensure they're reported\n promise.catch((cause) => {\n opts.onError?.({ error: cause, path });\n });\n // Replace the promise with a rejected one containing the max depth error\n promise = Promise.reject(error);\n }\n try {\n const next = await promise;\n yield [idx, PROMISE_STATUS_FULFILLED, encode(next, path)];\n } catch (cause) {\n opts.onError?.({ error: cause, path });\n yield [\n idx,\n PROMISE_STATUS_REJECTED,\n opts.formatError?.({ error: cause, path }),\n ];\n }\n });\n }\n function encodeAsyncIterable(\n iterable: AsyncIterable,\n path: (string | number)[],\n ) {\n return registerAsync(async function* (idx) {\n const error = checkMaxDepth(path);\n if (error) {\n throw error;\n }\n await using iterator = iteratorResource(iterable);\n\n try {\n while (true) {\n const next = await iterator.next();\n if (next.done) {\n yield [idx, ASYNC_ITERABLE_STATUS_RETURN, encode(next.value, path)];\n break;\n }\n yield [idx, ASYNC_ITERABLE_STATUS_YIELD, encode(next.value, path)];\n }\n } catch (cause) {\n opts.onError?.({ error: cause, path });\n\n yield [\n idx,\n ASYNC_ITERABLE_STATUS_ERROR,\n opts.formatError?.({ error: cause, path }),\n ];\n }\n });\n }\n function checkMaxDepth(path: (string | number)[]) {\n if (opts.maxDepth && path.length > opts.maxDepth) {\n return new MaxDepthError(path);\n }\n return null;\n }\n function encodeAsync(\n value: unknown,\n path: (string | number)[],\n ): null | [type: ChunkValueType, chunkId: ChunkIndex] {\n if (isPromise(value)) {\n return [CHUNK_VALUE_TYPE_PROMISE, encodePromise(value, path)];\n }\n if (isAsyncIterable(value)) {\n if (opts.maxDepth && path.length >= opts.maxDepth) {\n throw new Error('Max depth reached');\n }\n return [\n CHUNK_VALUE_TYPE_ASYNC_ITERABLE,\n encodeAsyncIterable(value, path),\n ];\n }\n return null;\n }\n function encode(value: unknown, path: (string | number)[]): EncodedValue {\n if (value === undefined) {\n return [[]];\n }\n const reg = encodeAsync(value, path);\n if (reg) {\n return [[placeholder], [null, ...reg]];\n }\n\n if (!isPlainObject(value)) {\n return [[value]];\n }\n\n const newObj: Record = emptyObject();\n const asyncValues: ChunkDefinition[] = [];\n for (const [key, item] of Object.entries(value)) {\n const transformed = encodeAsync(item, [...path, key]);\n if (!transformed) {\n newObj[key] = item;\n continue;\n }\n newObj[key] = placeholder;\n asyncValues.push([key, ...transformed]);\n }\n return [[newObj], ...asyncValues];\n }\n\n const newHead: Head = emptyObject();\n for (const [key, item] of Object.entries(data)) {\n newHead[key] = encode(item, [key]);\n }\n\n yield newHead;\n\n let iterable: AsyncIterable =\n mergedIterables;\n if (opts.pingMs) {\n iterable = withPing(mergedIterables, opts.pingMs);\n }\n\n for await (const value of iterable) {\n yield value;\n }\n}\n/**\n * JSON Lines stream producer\n * @see https://jsonlines.org/\n */\nexport function jsonlStreamProducer(opts: JSONLProducerOptions) {\n let stream = readableStreamFrom(createBatchStreamProducer(opts));\n\n const { serialize } = opts;\n if (serialize) {\n stream = stream.pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n if (chunk === PING_SYM) {\n controller.enqueue(PING_SYM);\n } else {\n controller.enqueue(serialize(chunk));\n }\n },\n }),\n );\n }\n\n return stream\n .pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n if (chunk === PING_SYM) {\n controller.enqueue(' ');\n } else {\n controller.enqueue(JSON.stringify(chunk) + '\\n');\n }\n },\n }),\n )\n .pipeThrough(new TextEncoderStream());\n}\n\nclass AsyncError extends Error {\n constructor(public readonly data: unknown) {\n super('Received error from server');\n }\n}\nexport type ConsumerOnError = (opts: { error: unknown }) => void;\n\nconst nodeJsStreamToReaderEsque = (source: NodeJSReadableStreamEsque) => {\n return {\n getReader() {\n const stream = new ReadableStream({\n start(controller) {\n source.on('data', (chunk) => {\n controller.enqueue(chunk);\n });\n source.on('end', () => {\n controller.close();\n });\n source.on('error', (error) => {\n controller.error(error);\n });\n },\n });\n return stream.getReader();\n },\n };\n};\n\nfunction createLineAccumulator(\n from: NodeJSReadableStreamEsque | WebReadableStreamEsque,\n) {\n const reader =\n 'getReader' in from\n ? from.getReader()\n : nodeJsStreamToReaderEsque(from).getReader();\n\n let lineAggregate = '';\n\n return new ReadableStream({\n async pull(controller) {\n const { done, value } = await reader.read();\n\n if (done) {\n controller.close();\n } else {\n controller.enqueue(value);\n }\n },\n cancel() {\n return reader.cancel();\n },\n })\n .pipeThrough(new TextDecoderStream())\n .pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n lineAggregate += chunk;\n const parts = lineAggregate.split('\\n');\n lineAggregate = parts.pop() ?? '';\n for (const part of parts) {\n controller.enqueue(part);\n }\n },\n }),\n );\n}\nfunction createConsumerStream(\n from: NodeJSReadableStreamEsque | WebReadableStreamEsque,\n) {\n const stream = createLineAccumulator(from);\n\n let sentHead = false;\n return stream.pipeThrough(\n new TransformStream({\n transform(line, controller) {\n if (!sentHead) {\n const head = JSON.parse(line);\n controller.enqueue(head as THead);\n sentHead = true;\n } else {\n const chunk: ChunkData = JSON.parse(line);\n controller.enqueue(chunk);\n }\n },\n }),\n );\n}\n\n/**\n * Creates a handler for managing stream controllers and their lifecycle\n */\nfunction createStreamsManager(abortController: AbortController) {\n const controllerMap = new Map<\n ChunkIndex,\n ReturnType\n >();\n\n /**\n * Checks if there are no pending controllers or deferred promises\n */\n function isEmpty() {\n return Array.from(controllerMap.values()).every((c) => c.closed);\n }\n\n /**\n * Creates a stream controller\n */\n function createStreamController() {\n let originalController: ReadableStreamDefaultController;\n const stream = new ReadableStream({\n start(controller) {\n originalController = controller;\n },\n });\n\n const streamController = {\n enqueue: (v: ChunkData) => originalController.enqueue(v),\n close: () => {\n originalController.close();\n\n clear();\n\n if (isEmpty()) {\n abortController.abort();\n }\n },\n closed: false,\n getReaderResource: () => {\n const reader = stream.getReader();\n\n return makeResource(reader, () => {\n streamController.close();\n reader.releaseLock();\n });\n },\n error: (reason: unknown) => {\n originalController.error(reason);\n\n clear();\n },\n };\n function clear() {\n Object.assign(streamController, {\n closed: true,\n close: () => {\n // noop\n },\n enqueue: () => {\n // noop\n },\n getReaderResource: null,\n error: () => {\n // noop\n },\n });\n }\n\n return streamController;\n }\n\n /**\n * Gets or creates a stream controller\n */\n function getOrCreate(chunkId: ChunkIndex) {\n let c = controllerMap.get(chunkId);\n if (!c) {\n c = createStreamController();\n controllerMap.set(chunkId, c);\n }\n return c;\n }\n\n /**\n * Cancels all pending controllers and rejects deferred promises\n */\n function cancelAll(reason: unknown) {\n for (const controller of controllerMap.values()) {\n controller.error(reason);\n }\n }\n\n return {\n getOrCreate,\n cancelAll,\n };\n}\n\n/**\n * JSON Lines stream consumer\n * @see https://jsonlines.org/\n */\nexport async function jsonlStreamConsumer(opts: {\n from: NodeJSReadableStreamEsque | WebReadableStreamEsque;\n deserialize?: Deserialize;\n onError?: ConsumerOnError;\n formatError?: (opts: { error: unknown }) => Error;\n /**\n * This `AbortController` will be triggered when there are no more listeners to the stream.\n */\n abortController: AbortController;\n}) {\n const { deserialize = (v) => v } = opts;\n\n let source = createConsumerStream(opts.from);\n if (deserialize) {\n source = source.pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n controller.enqueue(deserialize(chunk));\n },\n }),\n );\n }\n let headDeferred: null | Deferred = createDeferred();\n\n const streamManager = createStreamsManager(opts.abortController);\n\n function decodeChunkDefinition(value: ChunkDefinition) {\n const [_path, type, chunkId] = value;\n\n const controller = streamManager.getOrCreate(chunkId);\n\n switch (type) {\n case CHUNK_VALUE_TYPE_PROMISE: {\n return run(async () => {\n using reader = controller.getReaderResource();\n\n const { value } = await reader.read();\n const [_chunkId, status, data] = value as PromiseChunk;\n switch (status) {\n case PROMISE_STATUS_FULFILLED:\n return decode(data);\n case PROMISE_STATUS_REJECTED:\n throw opts.formatError?.({ error: data }) ?? new AsyncError(data);\n }\n });\n }\n case CHUNK_VALUE_TYPE_ASYNC_ITERABLE: {\n return run(async function* () {\n using reader = controller.getReaderResource();\n\n while (true) {\n const { value } = await reader.read();\n\n const [_chunkId, status, data] = value as IterableChunk;\n\n switch (status) {\n case ASYNC_ITERABLE_STATUS_YIELD:\n yield decode(data);\n break;\n case ASYNC_ITERABLE_STATUS_RETURN:\n return decode(data);\n case ASYNC_ITERABLE_STATUS_ERROR:\n throw (\n opts.formatError?.({ error: data }) ?? new AsyncError(data)\n );\n }\n }\n });\n }\n }\n }\n\n function decode(value: EncodedValue): unknown {\n const [[data], ...asyncProps] = value;\n\n for (const value of asyncProps) {\n const [key] = value;\n const decoded = decodeChunkDefinition(value);\n\n if (key === null) {\n return decoded;\n }\n\n (data as any)[key] = decoded;\n }\n return data;\n }\n\n const closeOrAbort = (reason?: unknown) => {\n headDeferred?.reject(reason);\n streamManager.cancelAll(reason);\n };\n\n source\n .pipeTo(\n new WritableStream({\n write(chunkOrHead) {\n if (headDeferred) {\n const head = chunkOrHead as Record;\n\n for (const [key, value] of Object.entries(chunkOrHead)) {\n const parsed = decode(value as any);\n head[key] = parsed;\n }\n headDeferred.resolve(head as THead);\n headDeferred = null;\n\n return;\n }\n const chunk = chunkOrHead as ChunkData;\n const [idx] = chunk;\n\n const controller = streamManager.getOrCreate(idx);\n controller.enqueue(chunk);\n },\n close: closeOrAbort,\n abort: closeOrAbort,\n }),\n )\n .catch((error) => {\n opts.onError?.({ error });\n closeOrAbort(error);\n });\n\n return [await headDeferred.promise] as const;\n}\n", "var OverloadYield = require(\"./OverloadYield.js\");\nfunction _asyncGeneratorDelegate(t) {\n var e = {},\n n = !1;\n function pump(e, r) {\n return n = !0, r = new Promise(function (n) {\n n(t[e](r));\n }), {\n done: !1,\n value: new OverloadYield(r, 1)\n };\n }\n return e[\"undefined\" != typeof Symbol && Symbol.iterator || \"@@iterator\"] = function () {\n return this;\n }, e.next = function (t) {\n return n ? (n = !1, t) : pump(\"next\", t);\n }, \"function\" == typeof t[\"throw\"] && (e[\"throw\"] = function (t) {\n if (n) throw n = !1, t;\n return pump(\"throw\", t);\n }), \"function\" == typeof t[\"return\"] && (e[\"return\"] = function (t) {\n return n ? (n = !1, t) : pump(\"return\", t);\n }), e;\n}\nmodule.exports = _asyncGeneratorDelegate, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import { Unpromise } from '../../vendor/unpromise';\nimport { getTRPCErrorFromUnknown } from '../error/TRPCError';\nimport { isAbortError } from '../http/abortError';\nimport type { MaybePromise } from '../types';\nimport { emptyObject, identity, run } from '../utils';\nimport type { EventSourceLike } from './sse.types';\nimport type { inferTrackedOutput } from './tracked';\nimport { isTrackedEnvelope } from './tracked';\nimport { takeWithGrace } from './utils/asyncIterable';\nimport { makeAsyncResource } from './utils/disposable';\nimport { readableStreamFrom } from './utils/readableStreamFrom';\nimport {\n disposablePromiseTimerResult,\n timerResource,\n} from './utils/timerResource';\nimport { PING_SYM, withPing } from './utils/withPing';\n\ntype Serialize = (value: any) => any;\ntype Deserialize = (value: any) => any;\n\n/**\n * @internal\n */\nexport interface SSEPingOptions {\n /**\n * Enable ping comments sent from the server\n * @default false\n */\n enabled: boolean;\n /**\n * Interval in milliseconds\n * @default 1000\n */\n intervalMs?: number;\n}\n\nexport interface SSEClientOptions {\n /**\n * Timeout and reconnect after inactivity in milliseconds\n * @default undefined\n */\n reconnectAfterInactivityMs?: number;\n}\n\nexport interface SSEStreamProducerOptions {\n serialize?: Serialize;\n data: AsyncIterable;\n\n maxDepth?: number;\n ping?: SSEPingOptions;\n /**\n * Maximum duration in milliseconds for the request before ending the stream\n * @default undefined\n */\n maxDurationMs?: number;\n /**\n * End the request immediately after data is sent\n * Only useful for serverless runtimes that do not support streaming responses\n * @default false\n */\n emitAndEndImmediately?: boolean;\n formatError?: (opts: { error: unknown }) => unknown;\n /**\n * Client-specific options - these will be sent to the client as part of the first message\n * @default {}\n */\n client?: SSEClientOptions;\n}\n\nconst PING_EVENT = 'ping';\nconst SERIALIZED_ERROR_EVENT = 'serialized-error';\nconst CONNECTED_EVENT = 'connected';\nconst RETURN_EVENT = 'return';\n\ninterface SSEvent {\n id?: string;\n data: unknown;\n comment?: string;\n event?: string;\n}\n/**\n *\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html\n */\nexport function sseStreamProducer(\n opts: SSEStreamProducerOptions,\n) {\n const { serialize = identity } = opts;\n\n const ping: Required = {\n enabled: opts.ping?.enabled ?? false,\n intervalMs: opts.ping?.intervalMs ?? 1000,\n };\n const client: SSEClientOptions = opts.client ?? {};\n\n if (\n ping.enabled &&\n client.reconnectAfterInactivityMs &&\n ping.intervalMs > client.reconnectAfterInactivityMs\n ) {\n throw new Error(\n `Ping interval must be less than client reconnect interval to prevent unnecessary reconnection - ping.intervalMs: ${ping.intervalMs} client.reconnectAfterInactivityMs: ${client.reconnectAfterInactivityMs}`,\n );\n }\n\n async function* generator(): AsyncIterable {\n yield {\n event: CONNECTED_EVENT,\n data: JSON.stringify(client),\n };\n\n type TIteratorValue = Awaited | typeof PING_SYM;\n\n let iterable: AsyncIterable = opts.data;\n\n if (opts.emitAndEndImmediately) {\n iterable = takeWithGrace(iterable, {\n count: 1,\n gracePeriodMs: 1,\n });\n }\n\n if (ping.enabled && ping.intervalMs !== Infinity && ping.intervalMs > 0) {\n iterable = withPing(iterable, ping.intervalMs);\n }\n\n // We need those declarations outside the loop for garbage collection reasons. If they were\n // declared inside, they would not be freed until the next value is present.\n let value: null | TIteratorValue;\n let chunk: null | SSEvent;\n\n for await (value of iterable) {\n if (value === PING_SYM) {\n yield { event: PING_EVENT, data: '' };\n continue;\n }\n\n chunk = isTrackedEnvelope(value)\n ? { id: value[0], data: value[1] }\n : { data: value };\n\n chunk.data = JSON.stringify(serialize(chunk.data));\n\n yield chunk;\n\n // free up references for garbage collection\n value = null;\n chunk = null;\n }\n }\n\n async function* generatorWithErrorHandling(): AsyncIterable {\n try {\n yield* generator();\n\n yield {\n event: RETURN_EVENT,\n data: '',\n };\n } catch (cause) {\n if (isAbortError(cause)) {\n // ignore abort errors, send any other errors\n return;\n }\n // `err` must be caused by `opts.data`, `JSON.stringify` or `serialize`.\n // So, a user error in any case.\n const error = getTRPCErrorFromUnknown(cause);\n const data = opts.formatError?.({ error }) ?? null;\n yield {\n event: SERIALIZED_ERROR_EVENT,\n data: JSON.stringify(serialize(data)),\n };\n }\n }\n\n const stream = readableStreamFrom(generatorWithErrorHandling());\n\n return stream\n .pipeThrough(\n new TransformStream({\n transform(chunk, controller: TransformStreamDefaultController) {\n if ('event' in chunk) {\n controller.enqueue(`event: ${chunk.event}\\n`);\n }\n if ('data' in chunk) {\n controller.enqueue(`data: ${chunk.data}\\n`);\n }\n if ('id' in chunk) {\n controller.enqueue(`id: ${chunk.id}\\n`);\n }\n if ('comment' in chunk) {\n controller.enqueue(`: ${chunk.comment}\\n`);\n }\n controller.enqueue('\\n\\n');\n },\n }),\n )\n .pipeThrough(new TextEncoderStream());\n}\n\ninterface ConsumerStreamResultBase {\n eventSource: InstanceType | null;\n}\n\ninterface ConsumerStreamResultData\n extends ConsumerStreamResultBase {\n type: 'data';\n data: inferTrackedOutput;\n}\n\ninterface ConsumerStreamResultError\n extends ConsumerStreamResultBase {\n type: 'serialized-error';\n error: TConfig['error'];\n}\n\ninterface ConsumerStreamResultConnecting\n extends ConsumerStreamResultBase {\n type: 'connecting';\n event: EventSourceLike.EventOf | null;\n}\ninterface ConsumerStreamResultTimeout\n extends ConsumerStreamResultBase {\n type: 'timeout';\n ms: number;\n}\ninterface ConsumerStreamResultPing\n extends ConsumerStreamResultBase {\n type: 'ping';\n}\n\ninterface ConsumerStreamResultConnected\n extends ConsumerStreamResultBase {\n type: 'connected';\n options: SSEClientOptions;\n}\n\ntype ConsumerStreamResult =\n | ConsumerStreamResultData\n | ConsumerStreamResultError\n | ConsumerStreamResultConnecting\n | ConsumerStreamResultTimeout\n | ConsumerStreamResultPing\n | ConsumerStreamResultConnected;\n\nexport interface SSEStreamConsumerOptions {\n url: () => MaybePromise;\n init: () =>\n | MaybePromise>\n | undefined;\n signal: AbortSignal;\n deserialize?: Deserialize;\n EventSource: TConfig['EventSource'];\n}\n\ninterface ConsumerConfig {\n data: unknown;\n error: unknown;\n EventSource: EventSourceLike.AnyConstructor;\n}\n\nasync function withTimeout(opts: {\n promise: Promise;\n timeoutMs: number;\n onTimeout: () => Promise>;\n}): Promise {\n using timeoutPromise = timerResource(opts.timeoutMs);\n const res = await Unpromise.race([opts.promise, timeoutPromise.start()]);\n\n if (res === disposablePromiseTimerResult) {\n return await opts.onTimeout();\n }\n return res;\n}\n\n/**\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html\n */\nexport function sseStreamConsumer(\n opts: SSEStreamConsumerOptions,\n): AsyncIterable> {\n const { deserialize = (v) => v } = opts;\n\n let clientOptions: SSEClientOptions = emptyObject();\n\n const signal = opts.signal;\n\n let _es: InstanceType | null = null;\n\n const createStream = () =>\n new ReadableStream>({\n async start(controller) {\n const [url, init] = await Promise.all([opts.url(), opts.init()]);\n const eventSource = (_es = new opts.EventSource(\n url,\n init,\n ) as InstanceType);\n\n controller.enqueue({\n type: 'connecting',\n eventSource: _es,\n event: null,\n });\n\n eventSource.addEventListener(CONNECTED_EVENT, (_msg) => {\n const msg = _msg as EventSourceLike.MessageEvent;\n\n const options: SSEClientOptions = JSON.parse(msg.data);\n\n clientOptions = options;\n controller.enqueue({\n type: 'connected',\n options,\n eventSource,\n });\n });\n\n eventSource.addEventListener(SERIALIZED_ERROR_EVENT, (_msg) => {\n const msg = _msg as EventSourceLike.MessageEvent;\n\n controller.enqueue({\n type: 'serialized-error',\n error: deserialize(JSON.parse(msg.data)),\n eventSource,\n });\n });\n eventSource.addEventListener(PING_EVENT, () => {\n controller.enqueue({\n type: 'ping',\n eventSource,\n });\n });\n eventSource.addEventListener(RETURN_EVENT, () => {\n eventSource.close();\n controller.close();\n _es = null;\n });\n eventSource.addEventListener('error', (event) => {\n if (eventSource.readyState === eventSource.CLOSED) {\n controller.error(event);\n } else {\n controller.enqueue({\n type: 'connecting',\n eventSource,\n event,\n });\n }\n });\n eventSource.addEventListener('message', (_msg) => {\n const msg = _msg as EventSourceLike.MessageEvent;\n\n const chunk = deserialize(JSON.parse(msg.data));\n\n const def: SSEvent = {\n data: chunk,\n };\n if (msg.lastEventId) {\n def.id = msg.lastEventId;\n }\n controller.enqueue({\n type: 'data',\n data: def as inferTrackedOutput,\n eventSource,\n });\n });\n\n const onAbort = () => {\n try {\n eventSource.close();\n controller.close();\n } catch {\n // ignore errors in case the controller is already closed\n }\n };\n if (signal.aborted) {\n onAbort();\n } else {\n signal.addEventListener('abort', onAbort);\n }\n },\n cancel() {\n _es?.close();\n },\n });\n\n const getStreamResource = () => {\n let stream = createStream();\n let reader = stream.getReader();\n\n async function dispose() {\n await reader.cancel();\n _es = null;\n }\n\n return makeAsyncResource(\n {\n read() {\n return reader.read();\n },\n async recreate() {\n await dispose();\n\n stream = createStream();\n reader = stream.getReader();\n },\n },\n dispose,\n );\n };\n\n return run(async function* () {\n await using stream = getStreamResource();\n\n while (true) {\n let promise = stream.read();\n\n const timeoutMs = clientOptions.reconnectAfterInactivityMs;\n if (timeoutMs) {\n promise = withTimeout({\n promise,\n timeoutMs,\n onTimeout: async () => {\n const res: Awaited = {\n value: {\n type: 'timeout',\n ms: timeoutMs,\n eventSource: _es,\n },\n done: false,\n };\n // Close and release old reader\n await stream.recreate();\n\n return res;\n },\n });\n }\n\n const result = await promise;\n\n if (result.done) {\n return result.value;\n }\n yield result.value;\n }\n });\n}\n\nexport const sseHeaders = {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache, no-transform',\n 'X-Accel-Buffering': 'no',\n Connection: 'keep-alive',\n} as const;\n", "/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport {\n isObservable,\n observableToAsyncIterable,\n} from '../../observable/observable';\nimport { getErrorShape } from '../error/getErrorShape';\nimport { getTRPCErrorFromUnknown, TRPCError } from '../error/TRPCError';\nimport type { ProcedureType } from '../procedure';\nimport {\n type AnyRouter,\n type inferRouterContext,\n type inferRouterError,\n} from '../router';\nimport type { TRPCResponse } from '../rpc';\nimport { isPromise, jsonlStreamProducer } from '../stream/jsonl';\nimport { sseHeaders, sseStreamProducer } from '../stream/sse';\nimport { transformTRPCResponse } from '../transformer';\nimport {\n abortSignalsAnyPonyfill,\n isAsyncIterable,\n isObject,\n run,\n} from '../utils';\nimport { getAcceptHeader, getRequestInfo } from './contentType';\nimport { getHTTPStatusCode } from './getHTTPStatusCode';\nimport type {\n HTTPBaseHandlerOptions,\n ResolveHTTPRequestOptionsContextFn,\n TRPCRequestInfo,\n} from './types';\n\nfunction errorToAsyncIterable(err: TRPCError): AsyncIterable {\n return run(async function* () {\n throw err;\n });\n}\ntype HTTPMethods =\n | 'GET'\n | 'POST'\n | 'HEAD'\n | 'OPTIONS'\n | 'PUT'\n | 'DELETE'\n | 'PATCH';\n\nfunction combinedAbortController(signal: AbortSignal) {\n const controller = new AbortController();\n const combinedSignal = abortSignalsAnyPonyfill([signal, controller.signal]);\n return {\n signal: combinedSignal,\n controller,\n };\n}\n\nconst TYPE_ACCEPTED_METHOD_MAP: Record = {\n mutation: ['POST'],\n query: ['GET'],\n subscription: ['GET'],\n};\nconst TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE: Record<\n ProcedureType,\n HTTPMethods[]\n> = {\n // never allow GET to do a mutation\n mutation: ['POST'],\n query: ['GET', 'POST'],\n subscription: ['GET', 'POST'],\n};\n\ninterface ResolveHTTPRequestOptions\n extends HTTPBaseHandlerOptions {\n createContext: ResolveHTTPRequestOptionsContextFn;\n req: Request;\n path: string;\n /**\n * If the request had an issue before reaching the handler\n */\n error: TRPCError | null;\n}\n\nfunction initResponse(initOpts: {\n ctx: inferRouterContext | undefined;\n info: TRPCRequestInfo | undefined;\n responseMeta?: HTTPBaseHandlerOptions['responseMeta'];\n untransformedJSON:\n | TRPCResponse>\n | TRPCResponse>[]\n | null;\n errors: TRPCError[];\n headers: Headers;\n}) {\n const {\n ctx,\n info,\n responseMeta,\n untransformedJSON,\n errors = [],\n headers,\n } = initOpts;\n\n let status = untransformedJSON ? getHTTPStatusCode(untransformedJSON) : 200;\n\n const eagerGeneration = !untransformedJSON;\n const data = eagerGeneration\n ? []\n : Array.isArray(untransformedJSON)\n ? untransformedJSON\n : [untransformedJSON];\n\n const meta =\n responseMeta?.({\n ctx,\n info,\n paths: info?.calls.map((call) => call.path),\n data,\n errors,\n eagerGeneration,\n type:\n info?.calls.find((call) => call.procedure?._def.type)?.procedure?._def\n .type ?? 'unknown',\n }) ?? {};\n\n if (meta.headers) {\n if (meta.headers instanceof Headers) {\n for (const [key, value] of meta.headers.entries()) {\n headers.append(key, value);\n }\n } else {\n /**\n * @deprecated, delete in v12\n */\n for (const [key, value] of Object.entries(meta.headers)) {\n if (Array.isArray(value)) {\n for (const v of value) {\n headers.append(key, v);\n }\n } else if (typeof value === 'string') {\n headers.set(key, value);\n }\n }\n }\n }\n if (meta.status) {\n status = meta.status;\n }\n\n return {\n status,\n };\n}\n\nfunction caughtErrorToData(\n cause: unknown,\n errorOpts: {\n opts: Pick<\n ResolveHTTPRequestOptions,\n 'onError' | 'req' | 'router'\n >;\n ctx: inferRouterContext | undefined;\n type: ProcedureType | 'unknown';\n path?: string;\n input?: unknown;\n },\n) {\n const { router, req, onError } = errorOpts.opts;\n const error = getTRPCErrorFromUnknown(cause);\n onError?.({\n error,\n path: errorOpts.path,\n input: errorOpts.input,\n ctx: errorOpts.ctx,\n type: errorOpts.type,\n req,\n });\n const untransformedJSON = {\n error: getErrorShape({\n config: router._def._config,\n error,\n type: errorOpts.type,\n path: errorOpts.path,\n input: errorOpts.input,\n ctx: errorOpts.ctx,\n }),\n };\n const transformedJSON = transformTRPCResponse(\n router._def._config,\n untransformedJSON,\n );\n const body = JSON.stringify(transformedJSON);\n return {\n error,\n untransformedJSON,\n body,\n };\n}\n\n/**\n * Check if a value is a stream-like object\n * - if it's an async iterable\n * - if it's an object with async iterables or promises\n */\nfunction isDataStream(v: unknown) {\n if (!isObject(v)) {\n return false;\n }\n\n if (isAsyncIterable(v)) {\n return true;\n }\n\n return (\n Object.values(v).some(isPromise) || Object.values(v).some(isAsyncIterable)\n );\n}\n\ntype ResultTuple = [undefined, T] | [TRPCError, undefined];\n\nexport async function resolveResponse(\n opts: ResolveHTTPRequestOptions,\n): Promise {\n const { router, req } = opts;\n const headers = new Headers([['vary', 'trpc-accept, accept']]);\n const config = router._def._config;\n\n const url = new URL(req.url);\n\n if (req.method === 'HEAD') {\n // can be used for lambda warmup\n return new Response(null, {\n status: 204,\n });\n }\n\n const allowBatching = opts.allowBatching ?? opts.batching?.enabled ?? true;\n const allowMethodOverride =\n (opts.allowMethodOverride ?? false) && req.method === 'POST';\n\n type $Context = inferRouterContext;\n\n const infoTuple: ResultTuple = await run(async () => {\n try {\n return [\n undefined,\n await getRequestInfo({\n req,\n path: decodeURIComponent(opts.path),\n router,\n searchParams: url.searchParams,\n headers: opts.req.headers,\n url,\n }),\n ];\n } catch (cause) {\n return [getTRPCErrorFromUnknown(cause), undefined];\n }\n });\n\n interface ContextManager {\n valueOrUndefined: () => $Context | undefined;\n value: () => $Context;\n create: (info: TRPCRequestInfo) => Promise;\n }\n const ctxManager: ContextManager = run(() => {\n let result: ResultTuple<$Context> | undefined = undefined;\n return {\n valueOrUndefined: () => {\n if (!result) {\n return undefined;\n }\n return result[1];\n },\n value: () => {\n const [err, ctx] = result!;\n if (err) {\n throw err;\n }\n return ctx;\n },\n create: async (info) => {\n if (result) {\n throw new Error(\n 'This should only be called once - report a bug in tRPC',\n );\n }\n try {\n const ctx = await opts.createContext({\n info,\n });\n result = [undefined, ctx];\n } catch (cause) {\n result = [getTRPCErrorFromUnknown(cause), undefined];\n }\n },\n };\n });\n\n const methodMapper = allowMethodOverride\n ? TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE\n : TYPE_ACCEPTED_METHOD_MAP;\n\n /**\n * @deprecated\n */\n const isStreamCall = getAcceptHeader(req.headers) === 'application/jsonl';\n\n const experimentalSSE = config.sse?.enabled ?? true;\n try {\n const [infoError, info] = infoTuple;\n if (infoError) {\n throw infoError;\n }\n if (info.isBatchCall && !allowBatching) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: `Batching is not enabled on the server`,\n });\n }\n /* istanbul ignore if -- @preserve */\n if (isStreamCall && !info.isBatchCall) {\n throw new TRPCError({\n message: `Streaming requests must be batched (you can do a batch of 1)`,\n code: 'BAD_REQUEST',\n });\n }\n await ctxManager.create(info);\n\n interface RPCResultOk {\n data: unknown;\n signal?: AbortSignal;\n }\n type RPCResult = ResultTuple;\n const rpcCalls = info.calls.map(async (call): Promise => {\n const proc = call.procedure;\n const combinedAbort = combinedAbortController(opts.req.signal);\n try {\n if (opts.error) {\n throw opts.error;\n }\n\n if (!proc) {\n throw new TRPCError({\n code: 'NOT_FOUND',\n message: `No procedure found on path \"${call.path}\"`,\n });\n }\n\n if (!methodMapper[proc._def.type].includes(req.method as HTTPMethods)) {\n throw new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message: `Unsupported ${req.method}-request to ${proc._def.type} procedure at path \"${call.path}\"`,\n });\n }\n\n if (proc._def.type === 'subscription') {\n /* istanbul ignore if -- @preserve */\n if (info.isBatchCall) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: `Cannot batch subscription calls`,\n });\n }\n\n if (config.sse?.maxDurationMs) {\n function cleanup() {\n clearTimeout(timer);\n combinedAbort.signal.removeEventListener('abort', cleanup);\n\n combinedAbort.controller.abort();\n }\n const timer = setTimeout(cleanup, config.sse.maxDurationMs);\n combinedAbort.signal.addEventListener('abort', cleanup);\n }\n }\n const data: unknown = await proc({\n path: call.path,\n getRawInput: call.getRawInput,\n ctx: ctxManager.value(),\n type: proc._def.type,\n signal: combinedAbort.signal,\n batchIndex: call.batchIndex,\n });\n return [\n undefined,\n {\n data,\n signal:\n proc._def.type === 'subscription'\n ? combinedAbort.signal\n : undefined,\n },\n ];\n } catch (cause) {\n const error = getTRPCErrorFromUnknown(cause);\n const input = call.result();\n\n opts.onError?.({\n error,\n path: call.path,\n input,\n ctx: ctxManager.valueOrUndefined(),\n type: call.procedure?._def.type ?? 'unknown',\n req: opts.req,\n });\n\n return [error, undefined];\n }\n });\n\n // ----------- response handlers -----------\n if (!info.isBatchCall) {\n const [call] = info.calls;\n const [error, result] = await rpcCalls[0]!;\n\n switch (info.type) {\n case 'unknown':\n case 'mutation':\n case 'query': {\n // httpLink\n headers.set('content-type', 'application/json');\n\n if (isDataStream(result?.data)) {\n throw new TRPCError({\n code: 'UNSUPPORTED_MEDIA_TYPE',\n message:\n 'Cannot use stream-like response in non-streaming request - use httpBatchStreamLink',\n });\n }\n const res: TRPCResponse> = error\n ? {\n error: getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input: call!.result(),\n path: call!.path,\n type: info.type,\n }),\n }\n : { result: { data: result.data } };\n\n const headResponse = initResponse({\n ctx: ctxManager.valueOrUndefined(),\n info,\n responseMeta: opts.responseMeta,\n errors: error ? [error] : [],\n headers,\n untransformedJSON: [res],\n });\n return new Response(\n JSON.stringify(transformTRPCResponse(config, res)),\n {\n status: headResponse.status,\n headers,\n },\n );\n }\n case 'subscription': {\n // httpSubscriptionLink\n\n const iterable: AsyncIterable = run(() => {\n if (error) {\n return errorToAsyncIterable(error);\n }\n if (!experimentalSSE) {\n return errorToAsyncIterable(\n new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message: 'Missing experimental flag \"sseSubscriptions\"',\n }),\n );\n }\n\n if (!isObservable(result.data) && !isAsyncIterable(result.data)) {\n return errorToAsyncIterable(\n new TRPCError({\n message: `Subscription ${\n call!.path\n } did not return an observable or a AsyncGenerator`,\n code: 'INTERNAL_SERVER_ERROR',\n }),\n );\n }\n const dataAsIterable = isObservable(result.data)\n ? observableToAsyncIterable(result.data, opts.req.signal)\n : result.data;\n return dataAsIterable;\n });\n\n const stream = sseStreamProducer({\n ...config.sse,\n data: iterable,\n serialize: (v) => config.transformer.output.serialize(v),\n formatError(errorOpts) {\n const error = getTRPCErrorFromUnknown(errorOpts.error);\n const input = call?.result();\n const path = call?.path;\n const type = call?.procedure?._def.type ?? 'unknown';\n\n opts.onError?.({\n error,\n path,\n input,\n ctx: ctxManager.valueOrUndefined(),\n req: opts.req,\n type,\n });\n\n const shape = getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input,\n path,\n type,\n });\n\n return shape;\n },\n });\n for (const [key, value] of Object.entries(sseHeaders)) {\n headers.set(key, value);\n }\n\n const headResponse = initResponse({\n ctx: ctxManager.valueOrUndefined(),\n info,\n responseMeta: opts.responseMeta,\n errors: [],\n headers,\n untransformedJSON: null,\n });\n\n const abortSignal = result?.signal;\n let responseBody: ReadableStream = stream;\n\n // Fixes: https://github.com/trpc/trpc/issues/7094\n if (abortSignal) {\n const reader = stream.getReader();\n const onAbort = () => void reader.cancel();\n if (abortSignal.aborted) {\n onAbort();\n } else {\n abortSignal.addEventListener('abort', onAbort, { once: true });\n }\n\n responseBody = new ReadableStream({\n async pull(controller) {\n const chunk = await reader.read();\n if (chunk.done) {\n abortSignal.removeEventListener('abort', onAbort);\n controller.close();\n } else {\n controller.enqueue(chunk.value);\n }\n },\n cancel() {\n abortSignal.removeEventListener('abort', onAbort);\n return reader.cancel();\n },\n });\n }\n\n return new Response(responseBody, {\n headers,\n status: headResponse.status,\n });\n }\n }\n }\n\n // batch response handlers\n if (info.accept === 'application/jsonl') {\n // httpBatchStreamLink\n headers.set('content-type', 'application/json');\n headers.set('transfer-encoding', 'chunked');\n const headResponse = initResponse({\n ctx: ctxManager.valueOrUndefined(),\n info,\n responseMeta: opts.responseMeta,\n errors: [],\n headers,\n untransformedJSON: null,\n });\n const stream = jsonlStreamProducer({\n ...config.jsonl,\n /**\n * Example structure for `maxDepth: 4`:\n * {\n * // 1\n * 0: {\n * // 2\n * result: {\n * // 3\n * data: // 4\n * }\n * }\n * }\n */\n maxDepth: Infinity,\n data: rpcCalls.map(async (res) => {\n const [error, result] = await res;\n\n const call = info.calls[0];\n\n if (error) {\n return {\n error: getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input: call!.result(),\n path: call!.path,\n type: call!.procedure?._def.type ?? 'unknown',\n }),\n };\n }\n\n /**\n * Not very pretty, but we need to wrap nested data in promises\n * Our stream producer will only resolve top-level async values or async values that are directly nested in another async value\n */\n const iterable = isObservable(result.data)\n ? observableToAsyncIterable(result.data, opts.req.signal)\n : Promise.resolve(result.data);\n return {\n result: Promise.resolve({\n data: iterable,\n }),\n };\n }),\n serialize: (data) => config.transformer.output.serialize(data),\n onError: (cause) => {\n opts.onError?.({\n error: getTRPCErrorFromUnknown(cause),\n path: undefined,\n input: undefined,\n ctx: ctxManager.valueOrUndefined(),\n req: opts.req,\n type: info?.type ?? 'unknown',\n });\n },\n\n formatError(errorOpts) {\n const call = info?.calls[errorOpts.path[0] as any];\n\n const error = getTRPCErrorFromUnknown(errorOpts.error);\n const input = call?.result();\n const path = call?.path;\n const type = call?.procedure?._def.type ?? 'unknown';\n\n // no need to call `onError` here as it will be propagated through the stream itself\n\n const shape = getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input,\n path,\n type,\n });\n\n return shape;\n },\n });\n\n return new Response(stream, {\n headers,\n status: headResponse.status,\n });\n }\n\n // httpBatchLink\n /**\n * Non-streaming response:\n * - await all responses in parallel, blocking on the slowest one\n * - create headers with known response body\n * - return a complete HTTPResponse\n */\n headers.set('content-type', 'application/json');\n const results: RPCResult[] = (await Promise.all(rpcCalls)).map(\n (res): RPCResult => {\n const [error, result] = res;\n if (error) {\n return res;\n }\n\n if (isDataStream(result.data)) {\n return [\n new TRPCError({\n code: 'UNSUPPORTED_MEDIA_TYPE',\n message:\n 'Cannot use stream-like response in non-streaming request - use httpBatchStreamLink',\n }),\n undefined,\n ];\n }\n return res;\n },\n );\n const resultAsRPCResponse = results.map(\n (\n [error, result],\n index,\n ): TRPCResponse> => {\n const call = info.calls[index]!;\n if (error) {\n return {\n error: getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input: call.result(),\n path: call.path,\n type: call.procedure?._def.type ?? 'unknown',\n }),\n };\n }\n return {\n result: { data: result.data },\n };\n },\n );\n\n const errors = results\n .map(([error]) => error)\n .filter(Boolean) as TRPCError[];\n\n const headResponse = initResponse({\n ctx: ctxManager.valueOrUndefined(),\n info,\n responseMeta: opts.responseMeta,\n untransformedJSON: resultAsRPCResponse,\n errors,\n headers,\n });\n\n return new Response(\n JSON.stringify(transformTRPCResponse(config, resultAsRPCResponse)),\n {\n status: headResponse.status,\n headers,\n },\n );\n } catch (cause) {\n const [_infoError, info] = infoTuple;\n const ctx = ctxManager.valueOrUndefined();\n // we get here if\n // - batching is called when it's not enabled\n // - `createContext()` throws\n // - `router._def._config.transformer.output.serialize()` throws\n // - post body is too large\n // - input deserialization fails\n // - `errorFormatter` return value is malformed\n const { error, untransformedJSON, body } = caughtErrorToData(cause, {\n opts,\n ctx: ctxManager.valueOrUndefined(),\n type: info?.type ?? 'unknown',\n });\n\n const headResponse = initResponse({\n ctx,\n info,\n responseMeta: opts.responseMeta,\n untransformedJSON,\n errors: [error],\n headers,\n });\n\n return new Response(body, {\n status: headResponse.status,\n headers,\n });\n }\n}\n", "/**\n * If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`\n *\n * @example\n * ```ts\n * import type { AnyTRPCRouter } from '@trpc/server'\n * import type { HTTPBaseHandlerOptions } from '@trpc/server/http'\n * ```\n */\n// @trpc/server\n\nimport type { AnyRouter } from '../../@trpc/server';\nimport type { ResolveHTTPRequestOptionsContextFn } from '../../@trpc/server/http';\nimport { resolveResponse } from '../../@trpc/server/http';\nimport type { FetchHandlerRequestOptions } from './types';\n\nconst trimSlashes = (path: string): string => {\n path = path.startsWith('/') ? path.slice(1) : path;\n path = path.endsWith('/') ? path.slice(0, -1) : path;\n\n return path;\n};\n\nexport async function fetchRequestHandler(\n opts: FetchHandlerRequestOptions,\n): Promise {\n const resHeaders = new Headers();\n\n const createContext: ResolveHTTPRequestOptionsContextFn = async (\n innerOpts,\n ) => {\n return opts.createContext?.({ req: opts.req, resHeaders, ...innerOpts });\n };\n\n const url = new URL(opts.req.url);\n\n const pathname = trimSlashes(url.pathname);\n const endpoint = trimSlashes(opts.endpoint);\n const path = trimSlashes(pathname.slice(endpoint.length));\n\n return await resolveResponse({\n ...opts,\n req: opts.req,\n createContext,\n path,\n error: null,\n onError(o) {\n opts?.onError?.({ ...o, req: opts.req });\n },\n responseMeta(data) {\n const meta = opts.responseMeta?.(data);\n\n if (meta?.headers) {\n if (meta.headers instanceof Headers) {\n for (const [key, value] of meta.headers.entries()) {\n resHeaders.append(key, value);\n }\n } else {\n /**\n * @deprecated, delete in v12\n */\n for (const [key, value] of Object.entries(meta.headers)) {\n if (Array.isArray(value)) {\n for (const v of value) {\n resHeaders.append(key, v);\n }\n } else if (typeof value === 'string') {\n resHeaders.set(key, value);\n }\n }\n }\n }\n\n return {\n headers: resHeaders,\n status: meta?.status,\n };\n },\n });\n}\n", "// src/helper/route/index.ts\nimport { GET_MATCH_RESULT } from \"../../request/constants.js\";\nimport { getPattern, splitRoutingPath } from \"../../utils/url.js\";\nvar matchedRoutes = (c) => (\n // @ts-expect-error c.req[GET_MATCH_RESULT] is not typed\n c.req[GET_MATCH_RESULT][0].map(([[, route]]) => route)\n);\nvar routePath = (c, index) => matchedRoutes(c).at(index ?? c.req.routeIndex)?.path ?? \"\";\nvar baseRoutePath = (c, index) => matchedRoutes(c).at(index ?? c.req.routeIndex)?.basePath ?? \"\";\nvar basePathCacheMap = /* @__PURE__ */ new WeakMap();\nvar basePath = (c, index) => {\n index ??= c.req.routeIndex;\n const cache = basePathCacheMap.get(c) || [];\n if (typeof cache[index] === \"string\") {\n return cache[index];\n }\n let result;\n const rp = baseRoutePath(c, index);\n if (!/[:*]/.test(rp)) {\n result = rp;\n } else {\n const paths = splitRoutingPath(rp);\n const reqPath = c.req.path;\n let basePathLength = 0;\n for (let i = 0, len = paths.length; i < len; i++) {\n const pattern = getPattern(paths[i], paths[i + 1]);\n if (pattern) {\n const re = pattern[2] === true || pattern === \"*\" ? /[^\\/]+/ : pattern[2];\n basePathLength += reqPath.substring(basePathLength + 1).match(re)?.[0].length || 0;\n } else {\n basePathLength += paths[i].length;\n }\n basePathLength += 1;\n }\n result = reqPath.substring(0, basePathLength);\n }\n cache[index] = result;\n basePathCacheMap.set(c, cache);\n return result;\n};\nexport {\n basePath,\n baseRoutePath,\n matchedRoutes,\n routePath\n};\n", "import type { AnyRouter } from '@trpc/server'\nimport type {\n FetchCreateContextFnOptions,\n FetchHandlerRequestOptions,\n} from '@trpc/server/adapters/fetch'\nimport { fetchRequestHandler } from '@trpc/server/adapters/fetch'\nimport type { Context, MiddlewareHandler } from 'hono'\nimport { routePath } from 'hono/route'\n\ntype tRPCOptions = Omit<\n FetchHandlerRequestOptions,\n 'req' | 'endpoint' | 'createContext'\n> &\n Partial, 'endpoint'>> & {\n createContext?(\n opts: FetchCreateContextFnOptions,\n c: Context\n ): Record | Promise>\n }\n\nexport const trpcServer = ({\n endpoint,\n createContext,\n ...rest\n}: tRPCOptions): MiddlewareHandler => {\n const bodyProps = new Set(['arrayBuffer', 'blob', 'formData', 'json', 'text'] as const)\n type BodyProp = typeof bodyProps extends Set ? T : never\n return async (c) => {\n const canWithBody = c.req.method === 'GET' || c.req.method === 'HEAD'\n\n // Auto-detect endpoint from route path if not explicitly provided\n let resolvedEndpoint = endpoint\n if (!endpoint) {\n const path = routePath(c)\n if (path) {\n // Remove wildcard suffix (e.g., \"/v1/*\" -> \"/v1\")\n resolvedEndpoint = path.replace(/\\/\\*+$/, '') || '/trpc'\n } else {\n resolvedEndpoint = '/trpc'\n }\n }\n\n const res = await fetchRequestHandler({\n ...rest,\n createContext: async (opts) => ({\n ...(createContext ? await createContext(opts, c) : {}),\n // propagate env by default\n env: c.env,\n }),\n endpoint: resolvedEndpoint!,\n req: canWithBody\n ? c.req.raw\n : new Proxy(c.req.raw, {\n get(t, p, _r) {\n if (bodyProps.has(p as BodyProp)) {\n return () => c.req[p as BodyProp]()\n }\n return Reflect.get(t, p, t)\n },\n }),\n })\n return res\n }\n}\n", "// Database Service - Central export for all database-related imports\n// This file re-exports everything from postgresImporter to provide a clean abstraction layer\n\nimport type { AdminOrderDetails } from '@packages/shared'\n// import { getOrderDetails } from '@/src/postgresImporter'\nimport { getOrderDetails, initDb } from '@/src/sqliteImporter'\n\n// Re-export everything from postgresImporter\n// export * from '@/src/postgresImporter'\n\nexport * from '@/src/sqliteImporter'\n\nexport { initDb }\n\n// Re-export getOrderDetails with the correct signature\nexport async function getOrderDetailsWrapper(orderId: number): Promise {\n return getOrderDetails(orderId)\n}\n\n// Re-export all types from shared package\nexport type {\n // Admin types\n Banner,\n Complaint,\n ComplaintWithUser,\n Constant,\n ConstantUpdateResult,\n Coupon,\n CouponValidationResult,\n UserMiniInfo,\n Store,\n StaffUser,\n StaffRole,\n AdminOrderRow,\n AdminOrderDetails,\n AdminOrderUpdateResult,\n AdminOrderItemPackagingResult,\n AdminOrderMessageResult,\n AdminOrderBasicResult,\n AdminGetSlotOrdersResult,\n AdminGetAllOrdersResult,\n AdminGetAllOrdersResultWithUserId,\n AdminRebalanceSlotsResult,\n AdminCancelOrderResult,\n AdminUnit,\n AdminProduct,\n AdminProductWithRelations,\n AdminProductWithDetails,\n AdminProductTagInfo,\n AdminProductTagWithProducts,\n AdminProductListResponse,\n AdminProductResponse,\n AdminDeleteProductResult,\n AdminToggleOutOfStockResult,\n AdminUpdateSlotProductsResult,\n AdminSlotProductIdsResult,\n AdminSlotsProductIdsResult,\n AdminProductReview,\n AdminProductReviewWithSignedUrls,\n AdminProductReviewsResult,\n AdminProductReviewResponse,\n AdminProductGroup,\n AdminProductGroupsResult,\n AdminProductGroupResponse,\n AdminProductGroupInfo,\n AdminUpdateProductPricesResult,\n AdminDeliverySlot,\n AdminSlotProductSummary,\n AdminSlotWithProducts,\n AdminSlotWithProductsAndSnippets,\n AdminSlotWithProductsAndSnippetsBase,\n AdminSlotsResult,\n AdminSlotsListResult,\n AdminSlotResult,\n AdminSlotCreateResult,\n AdminSlotUpdateResult,\n AdminSlotDeleteResult,\n AdminDeliverySequence,\n AdminDeliverySequenceResult,\n AdminUpdateDeliverySequenceResult,\n AdminUpdateSlotCapacityResult,\n AdminVendorSnippet,\n AdminVendorSnippetWithAccess,\n AdminVendorSnippetWithSlot,\n AdminVendorSnippetProduct,\n AdminVendorSnippetWithProducts,\n AdminVendorSnippetCreateInput,\n AdminVendorSnippetUpdateInput,\n AdminVendorSnippetDeleteResult,\n AdminVendorSnippetOrderProduct,\n AdminVendorSnippetOrderSummary,\n AdminVendorSnippetOrdersResult,\n AdminVendorSnippetOrdersWithSlotResult,\n AdminVendorOrderSummary,\n AdminUpcomingSlotsResult,\n AdminVendorUpdatePackagingResult,\n UserAddress,\n UserAddressResponse,\n UserAddressesResponse,\n UserAddressDeleteResponse,\n UserBanner,\n UserBannersResponse,\n UserCartProduct,\n UserCartItem,\n UserCartResponse,\n UserComplaint,\n UserComplaintsResponse,\n UserRaiseComplaintResponse,\n UserStoreSummary,\n UserStoreSummaryData,\n UserStoresResponse,\n UserStoreSampleProduct,\n UserStoreSampleProductData,\n UserStoreDetail,\n UserStoreDetailData,\n UserStoreProduct,\n UserStoreProductData,\n UserTagSummary,\n UserProductDetail,\n UserProductDetailData,\n UserProductReview,\n UserProductReviewWithSignedUrls,\n UserProductReviewsResponse,\n UserCreateReviewResponse,\n UserSlotProduct,\n UserSlotWithProducts,\n UserSlotData,\n UserSlotAvailability,\n UserDeliverySlot,\n UserSlotsResponse,\n UserSlotsWithProductsResponse,\n UserSlotsListResponse,\n UserPaymentOrderResponse,\n UserPaymentVerifyResponse,\n UserPaymentFailResponse,\n UserAuthProfile,\n UserAuthResponse,\n UserAuthResult,\n UserOtpVerifyResponse,\n UserPasswordUpdateResponse,\n UserProfileResponse,\n UserDeleteAccountResponse,\n UserCouponUsage,\n UserCouponApplicableUser,\n UserCouponApplicableProduct,\n UserCoupon,\n UserCouponWithRelations,\n UserEligibleCouponsResponse,\n UserCouponDisplay,\n UserMyCouponsResponse,\n UserRedeemCouponResponse,\n UserSelfDataResponse,\n UserProfileCompleteResponse,\n UserSavePushTokenResponse,\n UserOrderItemSummary,\n UserOrderSummary,\n UserOrdersResponse,\n UserOrderDetail,\n UserCancelOrderResponse,\n UserUpdateNotesResponse,\n UserRecentProduct,\n UserRecentProductsResponse,\n // Store types\n StoreSummary,\n StoresSummaryResponse,\n} from '@packages/shared';\n\nexport type {\n // User types\n User,\n UserDetails,\n Address,\n Product,\n CartItem,\n Order,\n OrderItem,\n Payment,\n} from '@packages/shared';\n", "// SQLite Importer - Intermediate layer to avoid direct db_helper_sqlite imports in dbService\n// This file re-exports everything from sqliteService\n\n// Re-export database connection\nexport { db, initDb } from 'sqliteService'\n\n// Re-export all schema exports\nexport * from 'sqliteService'\n\n// Re-export all helper methods from sqliteService\nexport {\n // Admin - Banner\n getBanners,\n getBannerById,\n createBanner,\n updateBanner,\n deleteBanner,\n // Admin - Complaint\n getComplaints,\n resolveComplaint,\n // Admin - Constants\n getAllConstants,\n upsertConstants,\n // Admin - Coupon\n getAllCoupons,\n getCouponById,\n invalidateCoupon,\n validateCoupon,\n getReservedCoupons,\n getUsersForCoupon,\n createCouponWithRelations,\n updateCouponWithRelations,\n generateCancellationCoupon,\n createReservedCouponWithProducts,\n createCouponForUser,\n checkUsersExist,\n checkCouponExists,\n checkReservedCouponExists,\n getOrderWithUser,\n // Admin - Order\n updateOrderNotes,\n getOrderDetails,\n updateOrderPackaged,\n updateOrderDelivered,\n updateOrderItemPackaging,\n removeDeliveryCharge,\n getSlotOrders,\n updateAddressCoords,\n getAllOrders,\n rebalanceSlots,\n cancelOrder,\n deleteOrderById,\n // Admin - Product\n getAllProducts,\n getProductById,\n deleteProduct,\n createProduct,\n updateProduct,\n checkProductExistsByName,\n checkUnitExists,\n getProductImagesById,\n createSpecialDealsForProduct,\n updateProductDeals,\n replaceProductTags,\n toggleProductOutOfStock,\n updateSlotProducts,\n getSlotProductIds,\n getSlotsProductIds,\n getAllUnits,\n getAllProductTags,\n getAllProductTagInfos,\n getProductTagInfoById,\n createProductTag,\n getProductTagById,\n updateProductTag,\n deleteProductTag,\n checkProductTagExistsByName,\n getProductReviews,\n respondToReview,\n getAllProductGroups,\n createProductGroup,\n updateProductGroup,\n deleteProductGroup,\n addProductToGroup,\n removeProductFromGroup,\n updateProductPrices,\n // Admin - Slots\n getActiveSlotsWithProducts,\n getActiveSlots,\n getSlotsAfterDate,\n getSlotByIdWithRelations,\n createSlotWithRelations,\n updateSlotWithRelations,\n deleteSlotById,\n updateSlotCapacity,\n getSlotDeliverySequence,\n updateSlotDeliverySequence,\n // Admin - Staff User\n getStaffUserByName,\n getStaffUserById,\n getAllStaff,\n getAllUsers,\n getUserWithDetails,\n updateUserSuspensionStatus,\n checkStaffUserExists,\n checkStaffRoleExists,\n createStaffUser,\n getAllRoles,\n // Admin - Store\n getAllStores,\n getStoreById,\n createStore,\n updateStore,\n deleteStore,\n // Admin - User\n createUserByMobile,\n getUserByMobile,\n getUnresolvedComplaintsCount,\n getAllUsersWithFilters,\n getOrderCountsByUserIds,\n getLastOrdersByUserIds,\n getSuspensionStatusesByUserIds,\n getUserBasicInfo,\n getUserSuspensionStatus,\n getUserOrders,\n getOrderStatusesByOrderIds,\n getItemCountsByOrderIds,\n upsertUserSuspension,\n searchUsers,\n getAllNotifCreds,\n getAllUnloggedTokens,\n getNotifTokensByUserIds,\n getUserIncidentsWithRelations,\n createUserIncident,\n // Admin - Vendor Snippets\n checkVendorSnippetExists,\n getVendorSnippetById,\n getVendorSnippetByCode,\n getAllVendorSnippets,\n createVendorSnippet,\n updateVendorSnippet,\n deleteVendorSnippet,\n getProductsByIds,\n getVendorSlotById,\n getVendorOrdersBySlotId,\n getOrderItemsByOrderIds,\n getOrderStatusByOrderIds,\n updateVendorOrderItemPackaging,\n getVendorOrders,\n // User - Address\n getUserDefaultAddress,\n getUserAddresses,\n getUserAddressById,\n clearUserDefaultAddress,\n createUserAddress,\n updateUserAddress,\n deleteUserAddress,\n hasOngoingOrdersForAddress,\n // User - Banners\n getUserActiveBanners,\n // User - Cart\n getUserCartItemsWithProducts,\n getUserProductById,\n getUserCartItemByUserProduct,\n incrementUserCartItemQuantity,\n insertUserCartItem,\n updateUserCartItemQuantity,\n deleteUserCartItem,\n clearUserCart,\n // User - Complaint\n getUserComplaints,\n createUserComplaint,\n // User - Stores\n getUserStoreSummaries,\n getUserStoreDetail,\n // User - Product\n getUserProductDetailById,\n getUserProductReviews,\n getUserProductByIdBasic,\n createUserProductReview,\n getAllProductsWithUnits,\n type ProductSummaryData,\n // User - Slots\n getUserActiveSlotsList,\n getUserProductAvailability,\n // User - Payments\n getUserPaymentOrderById,\n getUserPaymentByOrderId,\n getUserPaymentByMerchantOrderId,\n updateUserPaymentSuccess,\n updateUserOrderPaymentStatus,\n markUserPaymentFailed,\n // User - Auth\n getUserAuthByEmail,\n getUserAuthByMobile,\n getUserAuthById,\n getUserAuthCreds,\n getUserAuthDetails,\n isUserSuspended,\n createUserAuthWithCreds,\n createUserAuthWithMobile,\n upsertUserAuthPassword,\n deleteUserAuthAccount,\n // UV API helpers\n createUserWithProfile,\n getUserDetailsByUserId,\n updateUserProfile,\n // User - Coupon\n getUserActiveCouponsWithRelations,\n getUserAllCouponsWithRelations,\n getUserReservedCouponByCode,\n redeemUserReservedCoupon,\n // User - Profile\n getUserProfileById,\n getUserProfileDetailById,\n getUserWithCreds,\n getUserNotifCred,\n upsertUserNotifCred,\n deleteUserUnloggedToken,\n getUserUnloggedToken,\n upsertUserUnloggedToken,\n // User - Order\n validateAndGetUserCoupon,\n applyDiscountToUserOrder,\n getUserAddressByIdAndUser,\n getOrderProductById,\n checkUserSuspended,\n getUserSlotCapacityStatus,\n placeUserOrderTransaction,\n deleteUserCartItemsForOrder,\n recordUserCouponUsage,\n getUserOrdersWithRelations,\n getUserOrderCount,\n getUserOrderByIdWithRelations,\n getUserCouponUsageForOrder,\n getUserOrderBasic,\n cancelUserOrderTransaction,\n updateUserOrderNotes,\n getUserRecentlyDeliveredOrderIds,\n getUserProductIdsFromOrders,\n getUserProductsForRecentOrders,\n // Store Helpers\n getAllBannersForCache,\n getAllProductsForCache,\n getAllStoresForCache,\n getAllDeliverySlotsForCache,\n getAllSpecialDealsForCache,\n getAllProductTagsForCache,\n getAllTagsForCache,\n getAllTagProductMappings,\n getAllSlotsWithProductsForCache,\n getAllUserNegativityScores,\n getUserNegativityScore,\n type BannerData,\n type ProductBasicData,\n type StoreBasicData,\n type DeliverySlotData,\n type SpecialDealData,\n type ProductTagData,\n type TagBasicData,\n type TagProductMapping,\n type SlotWithProductsData,\n type UserNegativityData,\n // Automated Jobs\n toggleFlashDeliveryForItems,\n toggleKeyVal,\n getAllKeyValStore,\n // Post-order handler helpers\n getOrdersByIdsWithFullData,\n getOrderByIdWithFullData,\n type OrderWithFullData,\n type OrderWithCancellationData,\n // Common API helpers\n getSuspendedProductIds,\n getNextDeliveryDateWithCapacity,\n getStoresSummary,\n healthCheck,\n // Delete orders helper\n deleteOrdersWithRelations,\n // Seed helpers\n seedUnits,\n seedStaffRoles,\n seedStaffPermissions,\n seedRolePermissions,\n seedKeyValStore,\n type UnitSeedData,\n type RolePermissionAssignment,\n type KeyValSeedData,\n type StaffRoleName,\n type StaffPermissionName,\n // Upload URL Helpers\n createUploadUrlStatus,\n claimUploadUrlStatus,\n} from 'sqliteService'\n", "// Database Helper - SQLite (Cloudflare D1)\n// Main entry point for the package\n\n// Re-export database connection\nexport { db, initDb } from './src/db/db_index'\n// Re-export schema\nexport * from './src/db/schema'\n\n// Export enum types for type safety\nexport { staffRoleEnum, staffPermissionEnum } from './src/db/schema'\n\n// Admin API helpers - explicitly namespaced exports to avoid duplicates\nexport {\n // Banner\n getBanners,\n getBannerById,\n createBanner,\n updateBanner,\n deleteBanner,\n} from './src/admin-apis/banner'\n\nexport {\n // Complaint\n getComplaints,\n resolveComplaint,\n} from './src/admin-apis/complaint'\n\nexport {\n // Constants\n getAllConstants,\n upsertConstants,\n} from './src/admin-apis/const'\n\nexport {\n // Coupon\n getAllCoupons,\n getCouponById,\n invalidateCoupon,\n validateCoupon,\n getReservedCoupons,\n getUsersForCoupon,\n createCouponWithRelations,\n updateCouponWithRelations,\n generateCancellationCoupon,\n createReservedCouponWithProducts,\n createCouponForUser,\n checkUsersExist,\n checkCouponExists,\n checkReservedCouponExists,\n getOrderWithUser,\n} from './src/admin-apis/coupon'\n\nexport {\n // Order\n updateOrderNotes,\n getOrderDetails,\n updateOrderPackaged,\n updateOrderDelivered,\n updateOrderItemPackaging,\n removeDeliveryCharge,\n getSlotOrders,\n updateAddressCoords,\n getAllOrders,\n rebalanceSlots,\n cancelOrder,\n deleteOrderById,\n} from './src/admin-apis/order'\n\nexport {\n // Product\n getAllProducts,\n getProductById,\n deleteProduct,\n createProduct,\n updateProduct,\n checkProductExistsByName,\n checkUnitExists,\n getProductImagesById,\n createSpecialDealsForProduct,\n updateProductDeals,\n replaceProductTags,\n toggleProductOutOfStock,\n updateSlotProducts,\n getSlotProductIds,\n getSlotsProductIds,\n getAllUnits,\n getAllProductTags,\n getAllProductTagInfos,\n getProductTagInfoById,\n createProductTag,\n getProductTagById,\n updateProductTag,\n deleteProductTag,\n checkProductTagExistsByName,\n getProductReviews,\n respondToReview,\n getAllProductGroups,\n createProductGroup,\n updateProductGroup,\n deleteProductGroup,\n addProductToGroup,\n removeProductFromGroup,\n updateProductPrices,\n} from './src/admin-apis/product'\n\nexport {\n // Slots\n getActiveSlotsWithProducts,\n getActiveSlots,\n getSlotsAfterDate,\n getSlotByIdWithRelations,\n createSlotWithRelations,\n updateSlotWithRelations,\n deleteSlotById,\n updateSlotCapacity,\n getSlotDeliverySequence,\n updateSlotDeliverySequence,\n} from './src/admin-apis/slots'\n\nexport {\n // Staff User\n getStaffUserByName,\n getStaffUserById,\n getAllStaff,\n getAllUsers,\n getUserWithDetails,\n updateUserSuspensionStatus,\n checkStaffUserExists,\n checkStaffRoleExists,\n createStaffUser,\n getAllRoles,\n} from './src/admin-apis/staff-user'\n\nexport {\n // Store\n getAllStores,\n getStoreById,\n createStore,\n updateStore,\n deleteStore,\n} from './src/admin-apis/store'\n\nexport {\n // User\n createUserByMobile,\n getUserByMobile,\n getUnresolvedComplaintsCount,\n getAllUsersWithFilters,\n getOrderCountsByUserIds,\n getLastOrdersByUserIds,\n getSuspensionStatusesByUserIds,\n getUserBasicInfo,\n getUserSuspensionStatus,\n getUserOrders,\n getOrderStatusesByOrderIds,\n getItemCountsByOrderIds,\n upsertUserSuspension,\n searchUsers,\n getAllNotifCreds,\n getAllUnloggedTokens,\n getNotifTokensByUserIds,\n getUserIncidentsWithRelations,\n createUserIncident,\n} from './src/admin-apis/user'\n\nexport {\n // Vendor Snippets\n checkVendorSnippetExists,\n getVendorSnippetById,\n getVendorSnippetByCode,\n getAllVendorSnippets,\n createVendorSnippet,\n updateVendorSnippet,\n deleteVendorSnippet,\n getProductsByIds,\n getVendorSlotById,\n getVendorOrdersBySlotId,\n getOrderItemsByOrderIds,\n getOrderStatusByOrderIds,\n updateVendorOrderItemPackaging,\n getVendorOrders,\n} from './src/admin-apis/vendor-snippets'\n\nexport {\n // User Address\n getDefaultAddress as getUserDefaultAddress,\n getUserAddresses,\n getUserAddressById,\n clearDefaultAddress as clearUserDefaultAddress,\n createUserAddress,\n updateUserAddress,\n deleteUserAddress,\n hasOngoingOrdersForAddress,\n} from './src/user-apis/address'\n\nexport {\n // User Banners\n getActiveBanners as getUserActiveBanners,\n} from './src/user-apis/banners'\n\nexport {\n // User Cart\n getCartItemsWithProducts as getUserCartItemsWithProducts,\n getProductById as getUserProductById,\n getCartItemByUserProduct as getUserCartItemByUserProduct,\n incrementCartItemQuantity as incrementUserCartItemQuantity,\n insertCartItem as insertUserCartItem,\n updateCartItemQuantity as updateUserCartItemQuantity,\n deleteCartItem as deleteUserCartItem,\n clearUserCart,\n} from './src/user-apis/cart'\n\nexport {\n // User Complaint\n getUserComplaints as getUserComplaints,\n createComplaint as createUserComplaint,\n} from './src/user-apis/complaint'\n\nexport {\n // User Stores\n getStoreSummaries as getUserStoreSummaries,\n getStoreDetail as getUserStoreDetail,\n} from './src/user-apis/stores'\n\nexport {\n // User Product\n getProductDetailById as getUserProductDetailById,\n getProductReviews as getUserProductReviews,\n getProductById as getUserProductByIdBasic,\n createProductReview as createUserProductReview,\n getAllProductsWithUnits,\n type ProductSummaryData,\n} from './src/user-apis/product'\n\nexport {\n // User Slots\n getActiveSlotsList as getUserActiveSlotsList,\n getProductAvailability as getUserProductAvailability,\n} from './src/user-apis/slots'\n\nexport {\n // User Payments\n getOrderById as getUserPaymentOrderById,\n getPaymentByOrderId as getUserPaymentByOrderId,\n getPaymentByMerchantOrderId as getUserPaymentByMerchantOrderId,\n updatePaymentSuccess as updateUserPaymentSuccess,\n updateOrderPaymentStatus as updateUserOrderPaymentStatus,\n markPaymentFailed as markUserPaymentFailed,\n} from './src/user-apis/payments'\n\nexport {\n // User Auth\n getUserByEmail as getUserAuthByEmail,\n getUserByMobile as getUserAuthByMobile,\n getUserById as getUserAuthById,\n getUserCreds as getUserAuthCreds,\n getUserDetails as getUserAuthDetails,\n isUserSuspended,\n createUserWithCreds as createUserAuthWithCreds,\n createUserWithMobile as createUserAuthWithMobile,\n upsertUserPassword as upsertUserAuthPassword,\n deleteUserAccount as deleteUserAuthAccount,\n // UV API helpers\n createUserWithProfile,\n getUserDetailsByUserId,\n updateUserProfile,\n} from './src/user-apis/auth'\n\nexport {\n // User Coupon\n getActiveCouponsWithRelations as getUserActiveCouponsWithRelations,\n getAllCouponsWithRelations as getUserAllCouponsWithRelations,\n getReservedCouponByCode as getUserReservedCouponByCode,\n redeemReservedCoupon as redeemUserReservedCoupon,\n} from './src/user-apis/coupon'\n\nexport {\n // User Profile\n getUserById as getUserProfileById,\n getUserDetailByUserId as getUserProfileDetailById,\n getUserWithCreds as getUserWithCreds,\n getNotifCred as getUserNotifCred,\n upsertNotifCred as upsertUserNotifCred,\n deleteUnloggedToken as deleteUserUnloggedToken,\n getUnloggedToken as getUserUnloggedToken,\n upsertUnloggedToken as upsertUserUnloggedToken,\n} from './src/user-apis/user'\n\nexport {\n // User Order\n validateAndGetCoupon as validateAndGetUserCoupon,\n applyDiscountToOrder as applyDiscountToUserOrder,\n getAddressByIdAndUser as getUserAddressByIdAndUser,\n getProductById as getOrderProductById,\n checkUserSuspended,\n getSlotCapacityStatus as getUserSlotCapacityStatus,\n placeOrderTransaction as placeUserOrderTransaction,\n deleteCartItemsForOrder as deleteUserCartItemsForOrder,\n recordCouponUsage as recordUserCouponUsage,\n getOrdersWithRelations as getUserOrdersWithRelations,\n getOrderCount as getUserOrderCount,\n getOrderByIdWithRelations as getUserOrderByIdWithRelations,\n getCouponUsageForOrder as getUserCouponUsageForOrder,\n getOrderBasic as getUserOrderBasic,\n cancelOrderTransaction as cancelUserOrderTransaction,\n updateOrderNotes as updateUserOrderNotes,\n getRecentlyDeliveredOrderIds as getUserRecentlyDeliveredOrderIds,\n getProductIdsFromOrders as getUserProductIdsFromOrders,\n getProductsForRecentOrders as getUserProductsForRecentOrders,\n // Post-order handler helpers\n getOrdersByIdsWithFullData,\n getOrderByIdWithFullData,\n type OrderWithFullData,\n type OrderWithCancellationData,\n} from './src/user-apis/order'\n\n// Store Helpers (for cache initialization)\nexport {\n // Banner Store\n getAllBannersForCache,\n type BannerData,\n // Product Store\n getAllProductsForCache,\n getAllStoresForCache,\n getAllDeliverySlotsForCache,\n getAllSpecialDealsForCache,\n getAllProductTagsForCache,\n type ProductBasicData,\n type StoreBasicData,\n type DeliverySlotData,\n type SpecialDealData,\n type ProductTagData,\n // Product Tag Store\n getAllTagsForCache,\n getAllTagProductMappings,\n type TagBasicData,\n type TagProductMapping,\n // Slot Store\n getAllSlotsWithProductsForCache,\n type SlotWithProductsData,\n // User Negativity Store\n getAllUserNegativityScores,\n getUserNegativityScore,\n type UserNegativityData,\n} from './src/stores/store-helpers'\n\n// Automated Jobs Helpers\nexport {\n toggleFlashDeliveryForItems,\n toggleKeyVal,\n getAllKeyValStore,\n} from './src/lib/automated-jobs'\n\n// Health Check\nexport {\n healthCheck,\n} from './src/lib/health-check'\n\n// Common API Helpers\nexport {\n getSuspendedProductIds,\n getNextDeliveryDateWithCapacity,\n} from './src/user-apis/product'\n\nexport {\n getStoresSummary,\n} from './src/user-apis/stores'\n\n// Delete Orders Helper\nexport {\n deleteOrdersWithRelations,\n} from './src/lib/delete-orders'\n\n// Upload URL Helpers\nexport {\n createUploadUrlStatus,\n claimUploadUrlStatus,\n} from './src/helper_methods/upload-url'\n\n// Seed Helpers\nexport {\n seedUnits,\n seedStaffRoles,\n seedStaffPermissions,\n seedRolePermissions,\n seedKeyValStore,\n type UnitSeedData,\n type RolePermissionAssignment,\n type KeyValSeedData,\n type StaffRoleName,\n type StaffPermissionName,\n} from './src/lib/seed'\n", "import type { D1Database } from '@cloudflare/workers-types'\nimport { drizzle, type DrizzleD1Database } from 'drizzle-orm/d1'\nimport * as schema from './schema'\n\ntype DbClient = DrizzleD1Database\n\nlet dbInstance: DbClient | null = null\n\nexport function initDb(database: D1Database): void {\n const base = drizzle(database, { schema }) as DbClient\n dbInstance = Object.assign(base, {\n transaction: async (handler: (tx: DbClient) => Promise): Promise => {\n return handler(base)\n },\n })\n}\n\nexport const db = new Proxy({} as DbClient, {\n get(_target, prop: keyof DbClient) {\n if (!dbInstance) {\n throw new Error('D1 database not initialized. Call initDb(env.DB) before using db helpers.')\n }\n\n return dbInstance[prop]\n },\n})\n", "/// \nimport type { D1Database as MiniflareD1Database } from '@miniflare/d1';\nimport type { BatchItem, BatchResponse } from '~/batch.ts';\nimport { entityKind } from '~/entity.ts';\nimport { DefaultLogger } from '~/logger.ts';\nimport {\n\tcreateTableRelationsHelpers,\n\textractTablesRelationalConfig,\n\ttype ExtractTablesWithRelations,\n\ttype RelationalSchemaConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport { BaseSQLiteDatabase } from '~/sqlite-core/db.ts';\nimport { SQLiteAsyncDialect } from '~/sqlite-core/dialect.ts';\nimport type { DrizzleConfig, IfNotImported } from '~/utils.ts';\nimport { SQLiteD1Session } from './session.ts';\n\nexport type AnyD1Database = IfNotImported<\n\tD1Database,\n\tMiniflareD1Database,\n\tD1Database | IfNotImported\n>;\n\nexport class DrizzleD1Database<\n\tTSchema extends Record = Record,\n> extends BaseSQLiteDatabase<'async', D1Result, TSchema> {\n\tstatic override readonly [entityKind]: string = 'D1Database';\n\n\t/** @internal */\n\tdeclare readonly session: SQLiteD1Session>;\n\n\tasync batch, T extends Readonly<[U, ...U[]]>>(\n\t\tbatch: T,\n\t): Promise> {\n\t\treturn this.session.batch(batch) as Promise>;\n\t}\n}\n\nexport function drizzle<\n\tTSchema extends Record = Record,\n\tTClient extends AnyD1Database = AnyD1Database,\n>(\n\tclient: TClient,\n\tconfig: DrizzleConfig = {},\n): DrizzleD1Database & {\n\t$client: TClient;\n} {\n\tconst dialect = new SQLiteAsyncDialect({ casing: config.casing });\n\tlet logger;\n\tif (config.logger === true) {\n\t\tlogger = new DefaultLogger();\n\t} else if (config.logger !== false) {\n\t\tlogger = config.logger;\n\t}\n\n\tlet schema: RelationalSchemaConfig | undefined;\n\tif (config.schema) {\n\t\tconst tablesConfig = extractTablesRelationalConfig(\n\t\t\tconfig.schema,\n\t\t\tcreateTableRelationsHelpers,\n\t\t);\n\t\tschema = {\n\t\t\tfullSchema: config.schema,\n\t\t\tschema: tablesConfig.tables,\n\t\t\ttableNamesMap: tablesConfig.tableNamesMap,\n\t\t};\n\t}\n\n\tconst session = new SQLiteD1Session(client as D1Database, dialect, schema, { logger, cache: config.cache });\n\tconst db = new DrizzleD1Database('async', dialect, session, schema) as DrizzleD1Database;\n\t( db).$client = client;\n\t( db).$cache = config.cache;\n\tif (( db).$cache) {\n\t\t( db).$cache['invalidate'] = config.cache?.onMutate;\n\t}\n\n\treturn db as any;\n}\n", "/// \n\nimport type { BatchItem } from '~/batch.ts';\nimport { type Cache, NoopCache } from '~/cache/core/index.ts';\nimport type { WithCacheConfig } from '~/cache/core/types.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { Logger } from '~/logger.ts';\nimport { NoopLogger } from '~/logger.ts';\nimport type { RelationalSchemaConfig, TablesRelationalConfig } from '~/relations.ts';\nimport type { PreparedQuery } from '~/session.ts';\nimport { fillPlaceholders, type Query, sql } from '~/sql/sql.ts';\nimport type { SQLiteAsyncDialect } from '~/sqlite-core/dialect.ts';\nimport { SQLiteTransaction } from '~/sqlite-core/index.ts';\nimport type { SelectedFieldsOrdered } from '~/sqlite-core/query-builders/select.types.ts';\nimport type {\n\tPreparedQueryConfig as PreparedQueryConfigBase,\n\tSQLiteExecuteMethod,\n\tSQLiteTransactionConfig,\n} from '~/sqlite-core/session.ts';\nimport { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/session.ts';\nimport { mapResultRow } from '~/utils.ts';\n\nexport interface SQLiteD1SessionOptions {\n\tlogger?: Logger;\n\tcache?: Cache;\n}\n\ntype PreparedQueryConfig = Omit;\n\nexport class SQLiteD1Session<\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n> extends SQLiteSession<'async', D1Result, TFullSchema, TSchema> {\n\tstatic override readonly [entityKind]: string = 'SQLiteD1Session';\n\n\tprivate logger: Logger;\n\tprivate cache: Cache;\n\n\tconstructor(\n\t\tprivate client: D1Database,\n\t\tdialect: SQLiteAsyncDialect,\n\t\tprivate schema: RelationalSchemaConfig | undefined,\n\t\tprivate options: SQLiteD1SessionOptions = {},\n\t) {\n\t\tsuper(dialect);\n\t\tthis.logger = options.logger ?? new NoopLogger();\n\t\tthis.cache = options.cache ?? new NoopCache();\n\t}\n\n\tprepareQuery(\n\t\tquery: Query,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t\tisResponseInArrayMode: boolean,\n\t\tcustomResultMapper?: (rows: unknown[][]) => unknown,\n\t\tqueryMetadata?: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t},\n\t\tcacheConfig?: WithCacheConfig,\n\t): D1PreparedQuery {\n\t\tconst stmt = this.client.prepare(query.sql);\n\t\treturn new D1PreparedQuery(\n\t\t\tstmt,\n\t\t\tquery,\n\t\t\tthis.logger,\n\t\t\tthis.cache,\n\t\t\tqueryMetadata,\n\t\t\tcacheConfig,\n\t\t\tfields,\n\t\t\texecuteMethod,\n\t\t\tisResponseInArrayMode,\n\t\t\tcustomResultMapper,\n\t\t);\n\t}\n\n\tasync batch[] | readonly BatchItem<'sqlite'>[]>(queries: T) {\n\t\tconst preparedQueries: PreparedQuery[] = [];\n\t\tconst builtQueries: D1PreparedStatement[] = [];\n\n\t\tfor (const query of queries) {\n\t\t\tconst preparedQuery = query._prepare();\n\t\t\tconst builtQuery = preparedQuery.getQuery();\n\t\t\tpreparedQueries.push(preparedQuery);\n\t\t\tif (builtQuery.params.length > 0) {\n\t\t\t\tbuiltQueries.push((preparedQuery as D1PreparedQuery).stmt.bind(...builtQuery.params));\n\t\t\t} else {\n\t\t\t\tconst builtQuery = preparedQuery.getQuery();\n\t\t\t\tbuiltQueries.push(\n\t\t\t\t\tthis.client.prepare(builtQuery.sql).bind(...builtQuery.params),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst batchResults = await this.client.batch(builtQueries);\n\t\treturn batchResults.map((result, i) => preparedQueries[i]!.mapResult(result, true));\n\t}\n\n\toverride extractRawAllValueFromBatchResult(result: unknown): unknown {\n\t\treturn (result as D1Result).results;\n\t}\n\n\toverride extractRawGetValueFromBatchResult(result: unknown): unknown {\n\t\treturn (result as D1Result).results[0];\n\t}\n\n\toverride extractRawValuesValueFromBatchResult(result: unknown): unknown {\n\t\treturn d1ToRawMapping((result as D1Result).results);\n\t}\n\n\toverride async transaction(\n\t\ttransaction: (tx: D1Transaction) => T | Promise,\n\t\tconfig?: SQLiteTransactionConfig,\n\t): Promise {\n\t\tconst tx = new D1Transaction('async', this.dialect, this, this.schema);\n\t\tawait this.run(sql.raw(`begin${config?.behavior ? ' ' + config.behavior : ''}`));\n\t\ttry {\n\t\t\tconst result = await transaction(tx);\n\t\t\tawait this.run(sql`commit`);\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tawait this.run(sql`rollback`);\n\t\t\tthrow err;\n\t\t}\n\t}\n}\n\nexport class D1Transaction<\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n> extends SQLiteTransaction<'async', D1Result, TFullSchema, TSchema> {\n\tstatic override readonly [entityKind]: string = 'D1Transaction';\n\n\toverride async transaction(transaction: (tx: D1Transaction) => Promise): Promise {\n\t\tconst savepointName = `sp${this.nestedIndex}`;\n\t\tconst tx = new D1Transaction('async', this.dialect, this.session, this.schema, this.nestedIndex + 1);\n\t\tawait this.session.run(sql.raw(`savepoint ${savepointName}`));\n\t\ttry {\n\t\t\tconst result = await transaction(tx);\n\t\t\tawait this.session.run(sql.raw(`release savepoint ${savepointName}`));\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tawait this.session.run(sql.raw(`rollback to savepoint ${savepointName}`));\n\t\t\tthrow err;\n\t\t}\n\t}\n}\n\n/**\n * This function was taken from the D1 implementation: https://github.com/cloudflare/workerd/blob/4aae9f4c7ae30a59a88ca868c4aff88bda85c956/src/cloudflare/internal/d1-api.ts#L287\n * It may cause issues with duplicated column names in join queries, which should be fixed on the D1 side.\n * @param results\n * @returns\n */\nfunction d1ToRawMapping(results: any) {\n\tconst rows: unknown[][] = [];\n\tfor (const row of results) {\n\t\tconst entry = Object.keys(row).map((k) => row[k]);\n\t\trows.push(entry);\n\t}\n\treturn rows;\n}\n\nexport class D1PreparedQuery extends SQLitePreparedQuery<\n\t{ type: 'async'; run: D1Response; all: T['all']; get: T['get']; values: T['values']; execute: T['execute'] }\n> {\n\tstatic override readonly [entityKind]: string = 'D1PreparedQuery';\n\n\t/** @internal */\n\tcustomResultMapper?: (rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => unknown;\n\n\t/** @internal */\n\tfields?: SelectedFieldsOrdered;\n\n\t/** @internal */\n\tstmt: D1PreparedStatement;\n\n\tconstructor(\n\t\tstmt: D1PreparedStatement,\n\t\tquery: Query,\n\t\tprivate logger: Logger,\n\t\tcache: Cache,\n\t\tqueryMetadata: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t} | undefined,\n\t\tcacheConfig: WithCacheConfig | undefined,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t\tprivate _isResponseInArrayMode: boolean,\n\t\tcustomResultMapper?: (rows: unknown[][]) => unknown,\n\t) {\n\t\tsuper('async', executeMethod, query, cache, queryMetadata, cacheConfig);\n\t\tthis.customResultMapper = customResultMapper;\n\t\tthis.fields = fields;\n\t\tthis.stmt = stmt;\n\t}\n\n\tasync run(placeholderValues?: Record): Promise {\n\t\tconst params = fillPlaceholders(this.query.params, placeholderValues ?? {});\n\t\tthis.logger.logQuery(this.query.sql, params);\n\t\treturn await this.queryWithCache(this.query.sql, params, async () => {\n\t\t\treturn this.stmt.bind(...params).run();\n\t\t});\n\t}\n\n\tasync all(placeholderValues?: Record): Promise {\n\t\tconst { fields, query, logger, stmt, customResultMapper } = this;\n\t\tif (!fields && !customResultMapper) {\n\t\t\tconst params = fillPlaceholders(query.params, placeholderValues ?? {});\n\t\t\tlogger.logQuery(query.sql, params);\n\t\t\treturn await this.queryWithCache(query.sql, params, async () => {\n\t\t\t\treturn stmt.bind(...params).all().then(({ results }) => this.mapAllResult(results!));\n\t\t\t});\n\t\t}\n\n\t\tconst rows = await this.values(placeholderValues);\n\n\t\treturn this.mapAllResult(rows);\n\t}\n\n\toverride mapAllResult(rows: unknown, isFromBatch?: boolean): unknown {\n\t\tif (isFromBatch) {\n\t\t\trows = d1ToRawMapping((rows as D1Result).results);\n\t\t}\n\n\t\tif (!this.fields && !this.customResultMapper) {\n\t\t\treturn rows;\n\t\t}\n\n\t\tif (this.customResultMapper) {\n\t\t\treturn this.customResultMapper(rows as unknown[][]);\n\t\t}\n\n\t\treturn (rows as unknown[][]).map((row) => mapResultRow(this.fields!, row, this.joinsNotNullableMap));\n\t}\n\n\tasync get(placeholderValues?: Record): Promise {\n\t\tconst { fields, joinsNotNullableMap, query, logger, stmt, customResultMapper } = this;\n\t\tif (!fields && !customResultMapper) {\n\t\t\tconst params = fillPlaceholders(query.params, placeholderValues ?? {});\n\t\t\tlogger.logQuery(query.sql, params);\n\t\t\treturn await this.queryWithCache(query.sql, params, async () => {\n\t\t\t\treturn stmt.bind(...params).all().then(({ results }) => results![0]);\n\t\t\t});\n\t\t}\n\n\t\tconst rows = await this.values(placeholderValues);\n\n\t\tif (!rows[0]) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (customResultMapper) {\n\t\t\treturn customResultMapper(rows) as T['all'];\n\t\t}\n\n\t\treturn mapResultRow(fields!, rows[0], joinsNotNullableMap);\n\t}\n\n\toverride mapGetResult(result: unknown, isFromBatch?: boolean): unknown {\n\t\tif (isFromBatch) {\n\t\t\tresult = d1ToRawMapping((result as D1Result).results)[0];\n\t\t}\n\n\t\tif (!this.fields && !this.customResultMapper) {\n\t\t\treturn result;\n\t\t}\n\n\t\tif (this.customResultMapper) {\n\t\t\treturn this.customResultMapper([result as unknown[]]) as T['all'];\n\t\t}\n\n\t\treturn mapResultRow(this.fields!, result as unknown[], this.joinsNotNullableMap);\n\t}\n\n\tasync values(placeholderValues?: Record): Promise {\n\t\tconst params = fillPlaceholders(this.query.params, placeholderValues ?? {});\n\t\tthis.logger.logQuery(this.query.sql, params);\n\t\treturn await this.queryWithCache(this.query.sql, params, async () => {\n\t\t\treturn this.stmt.bind(...params).raw();\n\t\t});\n\t}\n\n\t/** @internal */\n\tisResponseInArrayMode(): boolean {\n\t\treturn this._isResponseInArrayMode;\n\t}\n}\n", "import { db } from '../db/db_index'\nimport { homeBanners, staffUsers } from '../db/schema'\nimport { eq, desc } from 'drizzle-orm'\n\n\nsetTimeout(async () => {\nconst res = await db.select().from(staffUsers)\n console.log(res)\n}, 5000)\nexport interface Banner {\n id: number\n name: string\n imageUrl: string\n description: string | null\n productIds: number[] | null\n redirectUrl: string | null\n serialNum: number | null\n isActive: boolean\n createdAt: Date\n lastUpdated: Date\n}\n\ntype BannerRow = typeof homeBanners.$inferSelect\n\nexport async function getBanners(): Promise {\n const banners = await db.query.homeBanners.findMany({\n orderBy: desc(homeBanners.createdAt),\n }) as BannerRow[]\n\n return banners.map((banner) => ({\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description,\n productIds: banner.productIds || [],\n redirectUrl: banner.redirectUrl,\n serialNum: banner.serialNum,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n }))\n}\n\nexport async function getBannerById(id: number): Promise {\n const banner = await db.query.homeBanners.findFirst({\n where: eq(homeBanners.id, id),\n })\n\n if (!banner) return null\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description,\n productIds: banner.productIds || [],\n redirectUrl: banner.redirectUrl,\n serialNum: banner.serialNum,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n }\n}\n\nexport type CreateBannerInput = Omit\n\nexport async function createBanner(input: CreateBannerInput): Promise {\n const [banner] = await db.insert(homeBanners).values({\n name: input.name,\n imageUrl: input.imageUrl,\n description: input.description,\n productIds: input.productIds || [],\n redirectUrl: input.redirectUrl,\n serialNum: input.serialNum,\n isActive: input.isActive,\n }).returning()\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description,\n productIds: banner.productIds || [],\n redirectUrl: banner.redirectUrl,\n serialNum: banner.serialNum,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n }\n}\n\nexport type UpdateBannerInput = Partial>\n\nexport async function updateBanner(id: number, input: UpdateBannerInput): Promise {\n const [banner] = await db.update(homeBanners)\n .set({\n ...input,\n lastUpdated: new Date(),\n })\n .where(eq(homeBanners.id, id))\n .returning()\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description,\n productIds: banner.productIds || [],\n redirectUrl: banner.redirectUrl,\n serialNum: banner.serialNum,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n }\n}\n\nexport async function deleteBanner(id: number): Promise {\n await db.delete(homeBanners).where(eq(homeBanners.id, id))\n}\n", "import { db } from '../db/db_index'\nimport { complaints, users } from '../db/schema'\nimport { eq, desc, lt } from 'drizzle-orm'\n\nexport interface Complaint {\n id: number\n complaintBody: string\n userId: number\n orderId: number | null\n isResolved: boolean\n response: string | null\n createdAt: Date\n images: string[] | null\n}\n\nexport interface ComplaintWithUser extends Complaint {\n userName: string | null\n userMobile: string | null\n}\n\nexport async function getComplaints(\n cursor?: number,\n limit: number = 20\n): Promise<{ complaints: ComplaintWithUser[]; hasMore: boolean }> {\n const whereCondition = cursor ? lt(complaints.id, cursor) : undefined\n\n const complaintsData = await db\n .select({\n id: complaints.id,\n complaintBody: complaints.complaintBody,\n userId: complaints.userId,\n orderId: complaints.orderId,\n isResolved: complaints.isResolved,\n response: complaints.response,\n createdAt: complaints.createdAt,\n images: complaints.images,\n userName: users.name,\n userMobile: users.mobile,\n })\n .from(complaints)\n .leftJoin(users, eq(complaints.userId, users.id))\n .where(whereCondition)\n .orderBy(desc(complaints.id))\n .limit(limit + 1)\n\n const hasMore = complaintsData.length > limit\n const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData\n\n return {\n complaints: complaintsToReturn.map((c) => ({\n id: c.id,\n complaintBody: c.complaintBody,\n userId: c.userId,\n orderId: c.orderId,\n isResolved: c.isResolved,\n response: c.response,\n createdAt: c.createdAt,\n images: c.images as string[],\n userName: c.userName,\n userMobile: c.userMobile,\n })),\n hasMore,\n }\n}\n\nexport async function resolveComplaint(\n id: number,\n response?: string\n): Promise {\n await db\n .update(complaints)\n .set({ isResolved: true, response })\n .where(eq(complaints.id, id))\n}\n", "import { db } from '../db/db_index'\nimport { keyValStore } from '../db/schema'\n\nexport interface Constant {\n key: string\n value: any\n}\n\nexport async function getAllConstants(): Promise {\n const constants = await db.select().from(keyValStore)\n\n return constants.map(c => ({\n key: c.key,\n value: c.value,\n }))\n}\n\nexport async function upsertConstants(constants: Constant[]): Promise {\n await db.transaction(async (tx) => {\n for (const { key, value } of constants) {\n await tx.insert(keyValStore)\n .values({ key, value })\n .onConflictDoUpdate({\n target: keyValStore.key,\n set: { value },\n })\n }\n })\n}\n", "import { db } from '../db/db_index'\nimport { coupons, reservedCoupons, users, orders, orderStatus, couponApplicableUsers, couponApplicableProducts } from '../db/schema'\nimport { eq, and, like, or, inArray, lt, desc, asc } from 'drizzle-orm'\n\nexport interface Coupon {\n id: number\n couponCode: string\n isUserBased: boolean\n discountPercent: string | null\n flatDiscount: string | null\n minOrder: string | null\n productIds: number[] | null\n maxValue: string | null\n isApplyForAll: boolean\n validTill: Date | null\n maxLimitForUser: number | null\n exclusiveApply: boolean\n isInvalidated: boolean\n createdAt: Date\n createdBy: number\n}\n\nexport async function getAllCoupons(\n cursor?: number,\n limit: number = 50,\n search?: string\n): Promise<{ coupons: any[]; hasMore: boolean }> {\n let whereCondition = undefined\n const conditions = []\n \n if (cursor) {\n conditions.push(lt(coupons.id, cursor))\n }\n \n if (search && search.trim()) {\n conditions.push(like(coupons.couponCode, `%${search}%`))\n }\n \n if (conditions.length > 0) {\n whereCondition = and(...conditions)\n }\n \n const result = await db.query.coupons.findMany({\n where: whereCondition,\n with: {\n creator: true,\n applicableUsers: {\n with: {\n user: true,\n },\n },\n applicableProducts: {\n with: {\n product: true,\n },\n },\n },\n orderBy: desc(coupons.createdAt),\n limit: limit + 1,\n })\n \n const hasMore = result.length > limit\n const couponsList = hasMore ? result.slice(0, limit) : result\n \n return { coupons: couponsList, hasMore }\n}\n\nexport async function getCouponById(id: number): Promise {\n return await db.query.coupons.findFirst({\n where: eq(coupons.id, id),\n with: {\n creator: true,\n applicableUsers: {\n with: {\n user: true,\n },\n },\n applicableProducts: {\n with: {\n product: true,\n },\n },\n },\n })\n}\n\nexport interface CreateCouponInput {\n couponCode: string\n isUserBased: boolean\n discountPercent?: string\n flatDiscount?: string\n minOrder?: string\n productIds?: number[] | null\n maxValue?: string\n isApplyForAll: boolean\n validTill?: Date\n maxLimitForUser?: number\n exclusiveApply: boolean\n createdBy: number\n}\n\nexport async function createCouponWithRelations(\n input: CreateCouponInput,\n applicableUsers?: number[],\n applicableProducts?: number[]\n): Promise {\n return await db.transaction(async (tx) => {\n const [coupon] = await tx.insert(coupons).values({\n couponCode: input.couponCode,\n isUserBased: input.isUserBased,\n discountPercent: input.discountPercent,\n flatDiscount: input.flatDiscount,\n minOrder: input.minOrder,\n productIds: input.productIds,\n createdBy: input.createdBy,\n maxValue: input.maxValue,\n isApplyForAll: input.isApplyForAll,\n validTill: input.validTill,\n maxLimitForUser: input.maxLimitForUser,\n exclusiveApply: input.exclusiveApply,\n }).returning()\n\n if (applicableUsers && applicableUsers.length > 0) {\n await tx.insert(couponApplicableUsers).values(\n applicableUsers.map(userId => ({\n couponId: coupon.id,\n userId,\n }))\n )\n }\n\n if (applicableProducts && applicableProducts.length > 0) {\n await tx.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: coupon.id,\n productId,\n }))\n )\n }\n\n return coupon as Coupon\n })\n}\n\nexport interface UpdateCouponInput {\n couponCode?: string\n isUserBased?: boolean\n discountPercent?: string\n flatDiscount?: string\n minOrder?: string\n productIds?: number[] | null\n maxValue?: string\n isApplyForAll?: boolean\n validTill?: Date | null\n maxLimitForUser?: number\n exclusiveApply?: boolean\n isInvalidated?: boolean\n}\n\nexport async function updateCouponWithRelations(\n id: number,\n input: UpdateCouponInput,\n applicableUsers?: number[],\n applicableProducts?: number[]\n): Promise {\n return await db.transaction(async (tx) => {\n const [coupon] = await tx.update(coupons)\n .set({\n ...input,\n })\n .where(eq(coupons.id, id))\n .returning()\n\n if (applicableUsers !== undefined) {\n await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.couponId, id))\n if (applicableUsers.length > 0) {\n await tx.insert(couponApplicableUsers).values(\n applicableUsers.map(userId => ({\n couponId: id,\n userId,\n }))\n )\n }\n }\n\n if (applicableProducts !== undefined) {\n await tx.delete(couponApplicableProducts).where(eq(couponApplicableProducts.couponId, id))\n if (applicableProducts.length > 0) {\n await tx.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: id,\n productId,\n }))\n )\n }\n }\n\n return coupon as Coupon\n })\n}\n\nexport async function invalidateCoupon(id: number): Promise {\n const result = await db.update(coupons)\n .set({ isInvalidated: true })\n .where(eq(coupons.id, id))\n .returning()\n\n return result[0] as Coupon\n}\n\nexport interface CouponValidationResult {\n valid: boolean\n message?: string\n discountAmount?: number\n coupon?: Partial\n}\n\nexport async function validateCoupon(\n code: string,\n userId: number,\n orderAmount: number\n): Promise {\n const coupon = await db.query.coupons.findFirst({\n where: and(\n eq(coupons.couponCode, code.toUpperCase()),\n eq(coupons.isInvalidated, false)\n ),\n })\n\n if (!coupon) {\n return { valid: false, message: 'Coupon not found or invalidated' }\n }\n\n if (coupon.validTill && new Date(coupon.validTill) < new Date()) {\n return { valid: false, message: 'Coupon has expired' }\n }\n\n if (!coupon.isApplyForAll && !coupon.isUserBased) {\n return { valid: false, message: 'Coupon is not available for use' }\n }\n\n const minOrderValue = coupon.minOrder ? parseFloat(coupon.minOrder) : 0\n if (minOrderValue > 0 && orderAmount < minOrderValue) {\n return { valid: false, message: `Minimum order amount is ${minOrderValue}` }\n }\n\n let discountAmount = 0\n if (coupon.discountPercent) {\n const percent = parseFloat(coupon.discountPercent)\n discountAmount = (orderAmount * percent) / 100\n } else if (coupon.flatDiscount) {\n discountAmount = parseFloat(coupon.flatDiscount)\n }\n\n const maxValueLimit = coupon.maxValue ? parseFloat(coupon.maxValue) : 0\n if (maxValueLimit > 0 && discountAmount > maxValueLimit) {\n discountAmount = maxValueLimit\n }\n\n return {\n valid: true,\n discountAmount,\n coupon: {\n id: coupon.id,\n discountPercent: coupon.discountPercent,\n flatDiscount: coupon.flatDiscount,\n maxValue: coupon.maxValue,\n }\n }\n}\n\nexport async function getReservedCoupons(\n cursor?: number,\n limit: number = 50,\n search?: string\n): Promise<{ coupons: any[]; hasMore: boolean }> {\n let whereCondition = undefined\n const conditions = []\n \n if (cursor) {\n conditions.push(lt(reservedCoupons.id, cursor))\n }\n \n if (search && search.trim()) {\n conditions.push(or(\n like(reservedCoupons.secretCode, `%${search}%`),\n like(reservedCoupons.couponCode, `%${search}%`)\n ))\n }\n \n if (conditions.length > 0) {\n whereCondition = and(...conditions)\n }\n\n const result = await db.query.reservedCoupons.findMany({\n where: whereCondition,\n with: {\n redeemedUser: true,\n creator: true,\n },\n orderBy: desc(reservedCoupons.createdAt),\n limit: limit + 1,\n })\n\n const hasMore = result.length > limit\n const couponsList = hasMore ? result.slice(0, limit) : result\n\n return { coupons: couponsList, hasMore }\n}\n\nexport async function createReservedCouponWithProducts(\n input: any,\n applicableProducts?: number[]\n): Promise {\n return await db.transaction(async (tx) => {\n const [coupon] = await tx.insert(reservedCoupons).values({\n secretCode: input.secretCode,\n couponCode: input.couponCode,\n discountPercent: input.discountPercent,\n flatDiscount: input.flatDiscount,\n minOrder: input.minOrder,\n productIds: input.productIds,\n maxValue: input.maxValue,\n validTill: input.validTill,\n maxLimitForUser: input.maxLimitForUser,\n exclusiveApply: input.exclusiveApply,\n createdBy: input.createdBy,\n }).returning()\n\n if (applicableProducts && applicableProducts.length > 0) {\n await tx.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: coupon.id,\n productId,\n }))\n )\n }\n\n return coupon\n })\n}\n\nexport async function checkUsersExist(userIds: number[]): Promise {\n const existingUsers = await db.query.users.findMany({\n where: inArray(users.id, userIds),\n columns: { id: true },\n })\n return existingUsers.length === userIds.length\n}\n\nexport async function checkCouponExists(couponCode: string): Promise {\n const existing = await db.query.coupons.findFirst({\n where: eq(coupons.couponCode, couponCode),\n })\n return !!existing\n}\n\nexport async function checkReservedCouponExists(secretCode: string): Promise {\n const existing = await db.query.reservedCoupons.findFirst({\n where: eq(reservedCoupons.secretCode, secretCode),\n })\n return !!existing\n}\n\nexport async function generateCancellationCoupon(\n orderId: number,\n staffUserId: number,\n userId: number,\n orderAmount: number,\n couponCode: string\n): Promise {\n return await db.transaction(async (tx) => {\n const expiryDate = new Date()\n expiryDate.setDate(expiryDate.getDate() + 30)\n\n const [coupon] = await tx.insert(coupons).values({\n couponCode,\n isUserBased: true,\n flatDiscount: orderAmount.toString(),\n minOrder: orderAmount.toString(),\n maxValue: orderAmount.toString(),\n validTill: expiryDate,\n maxLimitForUser: 1,\n createdBy: staffUserId,\n isApplyForAll: false,\n }).returning()\n\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId,\n })\n\n await tx.update(orderStatus)\n .set({ refundCouponId: coupon.id })\n .where(eq(orderStatus.orderId, orderId))\n\n return coupon as Coupon\n })\n}\n\nexport async function getOrderWithUser(orderId: number): Promise {\n return await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n user: true,\n },\n })\n}\n\nexport async function createCouponForUser(\n mobile: string,\n couponCode: string,\n staffUserId: number\n): Promise<{ coupon: Coupon; user: { id: number; mobile: string; name: string | null } }> {\n return await db.transaction(async (tx) => {\n let user = await tx.query.users.findFirst({\n where: eq(users.mobile, mobile),\n })\n\n if (!user) {\n const [newUser] = await tx.insert(users).values({\n name: null,\n email: null,\n mobile,\n }).returning()\n user = newUser\n }\n\n const [coupon] = await tx.insert(coupons).values({\n couponCode,\n isUserBased: true,\n discountPercent: '20',\n minOrder: '1000',\n maxValue: '500',\n maxLimitForUser: 1,\n isApplyForAll: false,\n exclusiveApply: false,\n createdBy: staffUserId,\n validTill: new Date(Date.now() + 90 * 24 * 60 * 60 * 1000),\n }).returning()\n\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId: user.id,\n })\n\n return {\n coupon: coupon as Coupon,\n user: {\n id: user.id,\n mobile: user.mobile as string,\n name: user.name,\n },\n }\n })\n}\n\nexport interface UserMiniInfo {\n id: number\n name: string\n mobile: string | null\n}\n\nexport async function getUsersForCoupon(\n search?: string,\n limit: number = 20,\n offset: number = 0\n): Promise<{ users: UserMiniInfo[] }> {\n let whereCondition = undefined\n if (search && search.trim()) {\n whereCondition = or(\n like(users.name, `%${search}%`),\n like(users.mobile, `%${search}%`)\n )\n }\n\n const userList = await db.query.users.findMany({\n where: whereCondition,\n columns: {\n id: true,\n name: true,\n mobile: true,\n },\n limit: limit,\n offset: offset,\n orderBy: asc(users.name),\n })\n\n return {\n users: userList.map((user) => ({\n id: user.id,\n name: user.name || 'Unknown',\n mobile: user.mobile,\n }))\n }\n}\n", "import { db } from '../db/db_index'\nimport {\n addresses,\n complaints,\n couponUsage,\n orderItems,\n orders,\n orderStatus,\n payments,\n refunds,\n} from '../db/schema'\nimport { and, desc, eq, inArray, lt, SQL } from 'drizzle-orm'\nimport type {\n AdminOrderDetails,\n AdminOrderRow,\n AdminOrderStatusRecord,\n AdminOrderUpdateResult,\n AdminOrderItemPackagingResult,\n AdminOrderMessageResult,\n AdminOrderBasicResult,\n AdminGetSlotOrdersResult,\n AdminGetAllOrdersResultWithUserId,\n AdminRebalanceSlotsResult,\n AdminCancelOrderResult,\n AdminRefundRecord,\n RefundStatus,\n PaymentStatus,\n} from '@packages/shared'\nimport type { InferSelectModel } from 'drizzle-orm'\n\nconst isPaymentStatus = (value: string): value is PaymentStatus =>\n value === 'pending' || value === 'success' || value === 'cod' || value === 'failed'\n\nconst isRefundStatus = (value: string): value is RefundStatus =>\n value === 'success' || value === 'pending' || value === 'failed' || value === 'none' || value === 'na' || value === 'processed'\n\ntype OrderStatusRow = InferSelectModel\n\nconst mapOrderStatusRecord = (record: OrderStatusRow): AdminOrderStatusRecord => ({\n id: record.id,\n orderTime: record.orderTime,\n userId: record.userId,\n orderId: record.orderId,\n isPackaged: record.isPackaged,\n isDelivered: record.isDelivered,\n isCancelled: record.isCancelled,\n cancelReason: record.cancelReason ?? null,\n isCancelledByAdmin: record.isCancelledByAdmin ?? null,\n paymentStatus: isPaymentStatus(record.paymentStatus) ? record.paymentStatus : 'pending',\n cancellationUserNotes: record.cancellationUserNotes ?? null,\n cancellationAdminNotes: record.cancellationAdminNotes ?? null,\n cancellationReviewed: record.cancellationReviewed,\n cancellationReviewedAt: record.cancellationReviewedAt ?? null,\n refundCouponId: record.refundCouponId ?? null,\n})\n\nexport async function updateOrderNotes(orderId: number, adminNotes: string | null): Promise {\n const [result] = await db\n .update(orders)\n .set({ adminNotes })\n .where(eq(orders.id, orderId))\n .returning()\n return (result || null) as AdminOrderRow | null\n}\n\nexport async function updateOrderPackaged(orderId: string, isPackaged: boolean): Promise {\n const orderIdNumber = parseInt(orderId)\n\n await db\n .update(orderItems)\n .set({ is_packaged: isPackaged })\n .where(eq(orderItems.orderId, orderIdNumber))\n\n if (!isPackaged) {\n await db\n .update(orderStatus)\n .set({ isPackaged, isDelivered: false })\n .where(eq(orderStatus.orderId, orderIdNumber))\n } else {\n await db\n .update(orderStatus)\n .set({ isPackaged })\n .where(eq(orderStatus.orderId, orderIdNumber))\n }\n\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderIdNumber),\n })\n\n return { success: true, userId: order?.userId ?? null }\n}\n\nexport async function updateOrderDelivered(orderId: string, isDelivered: boolean): Promise {\n const orderIdNumber = parseInt(orderId)\n\n await db\n .update(orderStatus)\n .set({ isDelivered })\n .where(eq(orderStatus.orderId, orderIdNumber))\n\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderIdNumber),\n })\n\n return { success: true, userId: order?.userId ?? null }\n}\n\nexport async function getOrderDetails(orderId: number): Promise {\n // Single optimized query with all relations\n const orderData = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n payment: true,\n paymentInfo: true,\n orderStatus: true,\n refunds: true,\n },\n })\n\n if (!orderData) {\n return null\n }\n\n const couponUsageData = await db.query.couponUsage.findMany({\n where: eq(couponUsage.orderId, orderData.id),\n with: {\n coupon: true,\n },\n })\n\n let couponData = null\n if (couponUsageData.length > 0) {\n let totalDiscountAmount = 0\n const orderTotal = parseFloat((orderData.totalAmount ?? '0').toString())\n\n for (const usage of couponUsageData) {\n let discountAmount = 0\n\n if (usage.coupon.discountPercent) {\n discountAmount =\n (orderTotal * parseFloat(usage.coupon.discountPercent.toString())) /\n 100\n } else if (usage.coupon.flatDiscount) {\n discountAmount = parseFloat(usage.coupon.flatDiscount.toString())\n }\n\n if (\n usage.coupon.maxValue &&\n discountAmount > parseFloat(usage.coupon.maxValue.toString())\n ) {\n discountAmount = parseFloat(usage.coupon.maxValue.toString())\n }\n\n totalDiscountAmount += discountAmount\n }\n\n couponData = {\n couponCode: couponUsageData.map((u: any) => u.coupon.couponCode).join(', '),\n couponDescription: `${couponUsageData.length} coupons applied`,\n discountAmount: totalDiscountAmount,\n }\n }\n\n const statusRecord = orderData.orderStatus?.[0]\n const orderStatusRecord = statusRecord ? mapOrderStatusRecord(statusRecord) : null\n let status: 'pending' | 'delivered' | 'cancelled' = 'pending'\n if (orderStatusRecord?.isCancelled) {\n status = 'cancelled'\n } else if (orderStatusRecord?.isDelivered) {\n status = 'delivered'\n }\n\n const refund = orderData.refunds?.[0]\n const refundStatus = refund?.refundStatus && isRefundStatus(refund.refundStatus)\n ? refund.refundStatus\n : null\n const refundRecord: AdminRefundRecord | null = refund\n ? {\n id: refund.id,\n orderId: refund.orderId,\n refundAmount: refund.refundAmount,\n refundStatus,\n merchantRefundId: refund.merchantRefundId,\n refundProcessedAt: refund.refundProcessedAt,\n createdAt: refund.createdAt,\n }\n : null\n\n return {\n id: orderData.id,\n readableId: orderData.id,\n userId: orderData.user.id,\n customerName: `${orderData.user.name}`,\n customerEmail: orderData.user.email,\n customerMobile: orderData.user.mobile,\n address: {\n name: orderData.address.name,\n line1: orderData.address.addressLine1,\n line2: orderData.address.addressLine2,\n city: orderData.address.city,\n state: orderData.address.state,\n pincode: orderData.address.pincode,\n phone: orderData.address.phone,\n },\n slotInfo: orderData.slot\n ? {\n time: orderData.slot.deliveryTime.toISOString(),\n sequence: orderData.slot.deliverySequence,\n }\n : null,\n isCod: orderData.isCod,\n isOnlinePayment: orderData.isOnlinePayment,\n totalAmount:\n parseFloat(orderData.totalAmount?.toString() || '0') -\n parseFloat(orderData.deliveryCharge?.toString() || '0'),\n deliveryCharge: parseFloat(orderData.deliveryCharge?.toString() || '0'),\n adminNotes: orderData.adminNotes,\n userNotes: orderData.userNotes,\n createdAt: orderData.createdAt,\n status,\n isPackaged: orderStatusRecord?.isPackaged || false,\n isDelivered: orderStatusRecord?.isDelivered || false,\n items: orderData.orderItems.map((item: any) => ({\n id: item.id,\n name: item.product.name,\n quantity: item.quantity,\n productSize: item.product.productQuantity,\n price: item.price,\n unit: item.product.unit?.shortNotation,\n amount: parseFloat(item.price.toString()) * parseFloat(item.quantity || '0'),\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n })),\n payment: orderData.payment\n ? {\n status: orderData.payment.status,\n gateway: orderData.payment.gateway,\n merchantOrderId: orderData.payment.merchantOrderId,\n }\n : null,\n paymentInfo: orderData.paymentInfo\n ? {\n status: orderData.paymentInfo.status,\n gateway: orderData.paymentInfo.gateway,\n merchantOrderId: orderData.paymentInfo.merchantOrderId,\n }\n : null,\n cancelReason: orderStatusRecord?.cancelReason || null,\n cancellationReviewed: orderStatusRecord?.cancellationReviewed || false,\n isRefundDone: refundStatus === 'processed' || false,\n refundStatus,\n refundAmount: refund?.refundAmount\n ? parseFloat(refund.refundAmount.toString())\n : null,\n couponData,\n couponCode: couponData?.couponCode || null,\n couponDescription: couponData?.couponDescription || null,\n discountAmount: couponData?.discountAmount || null,\n orderStatus: orderStatusRecord,\n refundRecord,\n isFlashDelivery: orderData.isFlashDelivery,\n }\n}\n\nexport async function updateOrderItemPackaging(\n orderItemId: number,\n isPackaged?: boolean,\n isPackageVerified?: boolean\n): Promise {\n const orderItem = await db.query.orderItems.findFirst({\n where: eq(orderItems.id, orderItemId),\n })\n\n if (!orderItem) {\n return { success: false, updated: false }\n }\n\n const updateData: Partial<{\n is_packaged: boolean\n is_package_verified: boolean\n }> = {}\n\n if (isPackaged !== undefined) {\n updateData.is_packaged = isPackaged\n }\n if (isPackageVerified !== undefined) {\n updateData.is_package_verified = isPackageVerified\n }\n\n await db\n .update(orderItems)\n .set(updateData)\n .where(eq(orderItems.id, orderItemId))\n\n return { success: true, updated: true }\n}\n\nexport async function removeDeliveryCharge(orderId: number): Promise {\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n })\n\n if (!order) {\n return null\n }\n\n const currentDeliveryCharge = parseFloat(order.deliveryCharge?.toString() || '0')\n const currentTotalAmount = parseFloat(order.totalAmount?.toString() || '0')\n const newTotalAmount = currentTotalAmount - currentDeliveryCharge\n\n await db\n .update(orders)\n .set({\n deliveryCharge: '0',\n totalAmount: newTotalAmount.toString(),\n })\n .where(eq(orders.id, orderId))\n\n return { success: true, message: 'Delivery charge removed' }\n}\n\nexport async function getSlotOrders(slotId: string): Promise {\n const slotOrders = await db.query.orders.findMany({\n where: eq(orders.slotId, parseInt(slotId)),\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n },\n })\n\n const filteredOrders = slotOrders.filter((order: any) => {\n const statusRecord = order.orderStatus[0]\n return order.isCod || (statusRecord && statusRecord.paymentStatus === 'success')\n })\n\n const formattedOrders = filteredOrders.map((order: any) => {\n const statusRecord = order.orderStatus[0]\n let status: 'pending' | 'delivered' | 'cancelled' = 'pending'\n if (statusRecord?.isCancelled) {\n status = 'cancelled'\n } else if (statusRecord?.isDelivered) {\n status = 'delivered'\n }\n\n const items = order.orderItems.map((item: any) => ({\n id: item.id,\n name: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n amount: parseFloat(item.quantity) * parseFloat(item.price.toString()),\n unit: item.product.unit?.shortNotation || '',\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n }))\n\n const paymentMode: 'COD' | 'Online' = order.isCod ? 'COD' : 'Online'\n\n return {\n id: order.id,\n readableId: order.id,\n customerName: order.user.name || order.user.mobile+'',\n address: `${order.address.addressLine1}${\n order.address.addressLine2 ? `, ${order.address.addressLine2}` : ''\n }, ${order.address.city}, ${order.address.state} - ${\n order.address.pincode\n }, Phone: ${order.address.phone}`,\n addressId: order.addressId,\n latitude: order.address.adminLatitude ?? order.address.latitude,\n longitude: order.address.adminLongitude ?? order.address.longitude,\n totalAmount: parseFloat(order.totalAmount),\n items,\n deliveryTime: order.slot?.deliveryTime.toISOString() || null,\n status,\n isPackaged: order.orderItems.every((item: any) => item.is_packaged) || false,\n isDelivered: statusRecord?.isDelivered || false,\n isCod: order.isCod,\n paymentMode,\n paymentStatus: isPaymentStatus(statusRecord?.paymentStatus || 'pending')\n ? statusRecord?.paymentStatus || 'pending'\n : 'pending',\n slotId: order.slotId,\n adminNotes: order.adminNotes,\n userNotes: order.userNotes,\n }\n })\n\n return { success: true, data: formattedOrders }\n}\n\nexport async function updateAddressCoords(\n addressId: number,\n latitude: number,\n longitude: number\n): Promise {\n const result = await db\n .update(addresses)\n .set({\n adminLatitude: latitude,\n adminLongitude: longitude,\n })\n .where(eq(addresses.id, addressId))\n .returning()\n\n return { success: result.length > 0 }\n}\n\ntype GetAllOrdersInput = {\n cursor?: number\n limit: number\n slotId?: number | null\n packagedFilter?: 'all' | 'packaged' | 'not_packaged'\n deliveredFilter?: 'all' | 'delivered' | 'not_delivered'\n cancellationFilter?: 'all' | 'cancelled' | 'not_cancelled'\n flashDeliveryFilter?: 'all' | 'flash' | 'regular'\n}\n\nexport async function getAllOrders(input: GetAllOrdersInput): Promise {\n const {\n cursor,\n limit,\n slotId,\n packagedFilter,\n deliveredFilter,\n cancellationFilter,\n flashDeliveryFilter,\n } = input\n\n let whereCondition: SQL | undefined = eq(orders.id, orders.id)\n if (cursor) {\n whereCondition = and(whereCondition, lt(orders.id, cursor))\n }\n if (slotId) {\n whereCondition = and(whereCondition, eq(orders.slotId, slotId))\n }\n if (packagedFilter === 'packaged') {\n whereCondition = and(whereCondition, eq(orderStatus.isPackaged, true))\n } else if (packagedFilter === 'not_packaged') {\n whereCondition = and(whereCondition, eq(orderStatus.isPackaged, false))\n }\n if (deliveredFilter === 'delivered') {\n whereCondition = and(whereCondition, eq(orderStatus.isDelivered, true))\n } else if (deliveredFilter === 'not_delivered') {\n whereCondition = and(whereCondition, eq(orderStatus.isDelivered, false))\n }\n if (cancellationFilter === 'cancelled') {\n whereCondition = and(whereCondition, eq(orderStatus.isCancelled, true))\n } else if (cancellationFilter === 'not_cancelled') {\n whereCondition = and(whereCondition, eq(orderStatus.isCancelled, false))\n }\n if (flashDeliveryFilter === 'flash') {\n whereCondition = and(whereCondition, eq(orders.isFlashDelivery, true))\n } else if (flashDeliveryFilter === 'regular') {\n whereCondition = and(whereCondition, eq(orders.isFlashDelivery, false))\n }\n\n const allOrders = await db.query.orders.findMany({\n where: whereCondition,\n orderBy: desc(orders.createdAt),\n limit: limit + 1,\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n },\n })\n\n const hasMore = allOrders.length > limit\n const ordersToReturn = hasMore ? allOrders.slice(0, limit) : allOrders\n\n const filteredOrders = ordersToReturn.filter((order: any) => {\n const statusRecord = order.orderStatus[0]\n return order.isCod || (statusRecord && statusRecord.paymentStatus === 'success')\n })\n\n const formattedOrders = filteredOrders.map((order: any) => {\n const statusRecord = order.orderStatus[0]\n let status: 'pending' | 'delivered' | 'cancelled' = 'pending'\n if (statusRecord?.isCancelled) {\n status = 'cancelled'\n } else if (statusRecord?.isDelivered) {\n status = 'delivered'\n }\n\n const items = order.orderItems\n .map((item: any) => ({\n id: item.id,\n name: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n amount: parseFloat(item.quantity) * parseFloat(item.price.toString()),\n unit: item.product.unit?.shortNotation || '',\n productSize: item.product.productQuantity,\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n }))\n .sort((first: any, second: any) => first.id - second.id)\n\n return {\n id: order.id,\n orderId: order.id.toString(),\n readableId: order.id,\n customerName: order.user.name || order.user.mobile + '',\n customerMobile: order.user.mobile,\n address: `${order.address.addressLine1}${\n order.address.addressLine2 ? `, ${order.address.addressLine2}` : ''\n }, ${order.address.city}, ${order.address.state} - ${\n order.address.pincode\n }, Phone: ${order.address.phone}`,\n addressId: order.addressId,\n latitude: order.address.adminLatitude ?? order.address.latitude,\n longitude: order.address.adminLongitude ?? order.address.longitude,\n totalAmount: parseFloat(order.totalAmount),\n deliveryCharge: parseFloat(order.deliveryCharge || '0'),\n items,\n createdAt: order.createdAt,\n deliveryTime: order.slot?.deliveryTime.toISOString() || null,\n status,\n isPackaged: order.orderItems.every((item: any) => item.is_packaged) || false,\n isDelivered: statusRecord?.isDelivered || false,\n isCod: order.isCod,\n isFlashDelivery: order.isFlashDelivery,\n userNotes: order.userNotes,\n adminNotes: order.adminNotes,\n userNegativityScore: 0,\n userId: order.userId,\n }\n })\n\n return {\n orders: formattedOrders,\n nextCursor: hasMore ? ordersToReturn[ordersToReturn.length - 1].id : undefined,\n }\n}\n\nexport async function rebalanceSlots(slotIds: number[]): Promise {\n const ordersList = await db.query.orders.findMany({\n where: inArray(orders.slotId, slotIds),\n with: {\n orderItems: {\n with: {\n product: true,\n },\n },\n couponUsages: {\n with: {\n coupon: true,\n },\n },\n },\n })\n\n const processedOrdersData = ordersList.map((order: any) => {\n let newTotal = order.orderItems.reduce((acc: number, item: any) => {\n const latestPrice = +item.product.price\n const amount = latestPrice * Number(item.quantity)\n return acc + amount\n }, 0)\n\n order.orderItems.forEach((item: any) => {\n item.price = item.product.price\n item.discountedPrice = item.product.price\n })\n\n const coupon = order.couponUsages[0]?.coupon\n\n let discount = 0\n if (coupon && !coupon.isInvalidated && (!coupon.validTill || new Date(coupon.validTill) > new Date())) {\n const proportion = Number(order.orderGroupProportion || 1)\n if (coupon.discountPercent) {\n const maxDiscount = Number(coupon.maxValue || Infinity) * proportion\n discount = Math.min((newTotal * parseFloat(coupon.discountPercent)) / 100, maxDiscount)\n } else {\n discount = Number(coupon.flatDiscount) * proportion\n }\n }\n newTotal -= discount\n\n const { couponUsages, orderItems: orderItemsRaw, ...rest } = order\n const updatedOrderItems = orderItemsRaw.map((item: any) => {\n const { product, ...rawOrderItem } = item\n return rawOrderItem\n })\n return { order: rest, updatedOrderItems, newTotal }\n })\n\n const updatedOrderIds: number[] = []\n await db.transaction(async (tx) => {\n for (const { order, updatedOrderItems, newTotal } of processedOrdersData) {\n await tx.update(orders).set({ totalAmount: newTotal.toString() }).where(eq(orders.id, order.id))\n updatedOrderIds.push(order.id)\n\n for (const item of updatedOrderItems) {\n await tx\n .update(orderItems)\n .set({\n price: item.price,\n discountedPrice: item.discountedPrice,\n })\n .where(eq(orderItems.id, item.id))\n }\n }\n })\n\n return {\n success: true,\n updatedOrders: updatedOrderIds,\n message: `Rebalanced ${updatedOrderIds.length} orders.`,\n }\n}\n\nexport async function cancelOrder(orderId: number, reason: string): Promise {\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n orderStatus: true,\n },\n })\n\n if (!order) {\n return { success: false, message: 'Order not found', error: 'order_not_found' }\n }\n\n const status = order.orderStatus[0]\n if (!status) {\n return { success: false, message: 'Order status not found', error: 'status_not_found' }\n }\n\n if (status.isCancelled) {\n return { success: false, message: 'Order is already cancelled', error: 'already_cancelled' }\n }\n\n if (status.isDelivered) {\n return { success: false, message: 'Cannot cancel delivered order', error: 'already_delivered' }\n }\n\n const result = await db.transaction(async (tx) => {\n await tx\n .update(orderStatus)\n .set({\n isCancelled: true,\n isCancelledByAdmin: true,\n cancelReason: reason,\n cancellationAdminNotes: reason,\n cancellationReviewed: true,\n cancellationReviewedAt: new Date(),\n })\n .where(eq(orderStatus.id, status.id))\n\n const refundStatus = order.isCod ? 'na' : 'pending'\n\n await tx.insert(refunds).values({\n orderId: order.id,\n refundStatus,\n })\n\n return { orderId: order.id, userId: order.userId }\n })\n\n return {\n success: true,\n message: 'Order cancelled successfully',\n orderId: result.orderId,\n userId: result.userId,\n }\n}\n\nexport async function deleteOrderById(orderId: number): Promise {\n await db.transaction(async (tx) => {\n await tx.delete(orderItems).where(eq(orderItems.orderId, orderId))\n await tx.delete(orderStatus).where(eq(orderStatus.orderId, orderId))\n await tx.delete(payments).where(eq(payments.orderId, orderId))\n await tx.delete(refunds).where(eq(refunds.orderId, orderId))\n await tx.delete(couponUsage).where(eq(couponUsage.orderId, orderId))\n await tx.delete(complaints).where(eq(complaints.orderId, orderId))\n await tx.delete(orders).where(eq(orders.id, orderId))\n })\n}\n", "import { db } from '../db/db_index'\nimport {\n productInfo,\n units,\n specialDeals,\n productSlots,\n productTags,\n productReviews,\n productGroupInfo,\n productGroupMembership,\n productTagInfo,\n users,\n storeInfo,\n} from '../db/schema'\nimport { and, desc, eq, inArray, sql } from 'drizzle-orm'\nimport type { InferInsertModel, InferSelectModel } from 'drizzle-orm'\nimport type {\n AdminProduct,\n AdminProductGroupInfo,\n AdminProductTagInfo,\n AdminProductTagWithProducts,\n AdminProductReview,\n AdminProductWithDetails,\n AdminProductWithRelations,\n AdminSpecialDeal,\n AdminUnit,\n AdminUpdateSlotProductsResult,\n Store,\n} from '@packages/shared'\n\ntype ProductRow = InferSelectModel\ntype UnitRow = InferSelectModel\ntype StoreRow = InferSelectModel\ntype SpecialDealRow = InferSelectModel\ntype ProductTagInfoRow = InferSelectModel\ntype ProductTagRow = InferSelectModel\ntype ProductGroupRow = InferSelectModel\ntype ProductGroupMembershipRow = InferSelectModel\ntype ProductReviewRow = InferSelectModel\n\nconst getStringArray = (value: unknown): string[] | null => {\n if (!Array.isArray(value)) return null\n return value.map((item) => String(item))\n}\n\nconst mapUnit = (unit: UnitRow): AdminUnit => ({\n id: unit.id,\n shortNotation: unit.shortNotation,\n fullName: unit.fullName,\n})\n\nconst mapStore = (store: StoreRow): Store => ({\n id: store.id,\n name: store.name,\n description: store.description,\n imageUrl: store.imageUrl,\n owner: store.owner,\n createdAt: store.createdAt,\n // updatedAt: store.createdAt,\n})\n\nconst mapProduct = (product: ProductRow): AdminProduct => ({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription ?? null,\n longDescription: product.longDescription ?? null,\n unitId: product.unitId,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n images: getStringArray(product.images),\n imageKeys: getStringArray(product.images),\n isOutOfStock: product.isOutOfStock,\n isSuspended: product.isSuspended,\n isFlashAvailable: product.isFlashAvailable,\n flashPrice: product.flashPrice ? String(product.flashPrice) : null,\n createdAt: product.createdAt,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n storeId: product.storeId,\n})\n\nconst mapSpecialDeal = (deal: SpecialDealRow): AdminSpecialDeal => ({\n id: deal.id,\n productId: deal.productId,\n quantity: String(deal.quantity ?? '0'),\n price: String(deal.price ?? '0'),\n validTill: deal.validTill,\n})\n\nconst mapTagInfo = (tag: ProductTagInfoRow): AdminProductTagInfo => ({\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription ?? null,\n imageUrl: tag.imageUrl ?? null,\n isDashboardTag: tag.isDashboardTag,\n relatedStores: tag.relatedStores,\n createdAt: tag.createdAt,\n})\n\nexport async function getAllProducts(): Promise {\n type ProductWithRelationsRow = ProductRow & { unit: UnitRow; store: StoreRow | null }\n const products = await db.query.productInfo.findMany({\n orderBy: productInfo.name,\n with: {\n unit: true,\n store: true,\n },\n }) as ProductWithRelationsRow[]\n\n return products.map((product) => ({\n ...mapProduct(product),\n unit: mapUnit(product.unit),\n store: product.store ? mapStore(product.store) : null,\n }))\n}\n\nexport async function getProductById(id: number): Promise {\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, id),\n with: {\n unit: true,\n },\n })\n\n if (!product) {\n return null\n }\n\n const deals = await db.query.specialDeals.findMany({\n where: eq(specialDeals.productId, id),\n orderBy: specialDeals.quantity,\n })\n\n const productTagsData = await db.query.productTags.findMany({\n where: eq(productTags.productId, id),\n with: {\n tag: true,\n },\n }) as Array\n\n return {\n ...mapProduct(product),\n unit: mapUnit(product.unit),\n deals: deals.map(mapSpecialDeal),\n tags: productTagsData.map((tag) => mapTagInfo(tag.tag)),\n }\n}\n\nexport async function deleteProduct(id: number): Promise {\n const [deletedProduct] = await db\n .delete(productInfo)\n .where(eq(productInfo.id, id))\n .returning()\n\n if (!deletedProduct) {\n return null\n }\n\n return mapProduct(deletedProduct)\n}\n\ntype ProductInfoInsert = InferInsertModel\ntype ProductInfoUpdate = Partial\n\nexport async function createProduct(input: ProductInfoInsert): Promise {\n const [product] = await db.insert(productInfo).values(input).returning()\n return mapProduct(product)\n}\n\nexport async function updateProduct(id: number, updates: ProductInfoUpdate): Promise {\n const [product] = await db.update(productInfo)\n .set(updates)\n .where(eq(productInfo.id, id))\n .returning()\n if (!product) {\n return null\n }\n\n return mapProduct(product)\n}\n\nexport async function toggleProductOutOfStock(id: number): Promise {\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, id),\n })\n\n if (!product) {\n return null\n }\n\n const [updatedProduct] = await db\n .update(productInfo)\n .set({\n isOutOfStock: !product.isOutOfStock,\n })\n .where(eq(productInfo.id, id))\n .returning()\n\n if (!updatedProduct) {\n return null\n }\n\n return mapProduct(updatedProduct)\n}\n\nexport async function updateSlotProducts(slotId: string, productIds: string[]): Promise {\n const currentAssociations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, parseInt(slotId)),\n columns: {\n productId: true,\n },\n }) as Array<{ productId: number }>\n\n const currentProductIds = currentAssociations.map((assoc: { productId: number }) => assoc.productId)\n const newProductIds = productIds.map((id: string) => parseInt(id))\n\n const productsToAdd = newProductIds.filter((id: number) => !currentProductIds.includes(id))\n const productsToRemove = currentProductIds.filter((id: number) => !newProductIds.includes(id))\n\n if (productsToRemove.length > 0) {\n await db.delete(productSlots).where(\n and(\n eq(productSlots.slotId, parseInt(slotId)),\n inArray(productSlots.productId, productsToRemove)\n )\n )\n }\n\n if (productsToAdd.length > 0) {\n const newAssociations = productsToAdd.map((productId) => ({\n productId,\n slotId: parseInt(slotId),\n }))\n\n await db.insert(productSlots).values(newAssociations)\n }\n\n return {\n message: 'Slot products updated successfully',\n added: productsToAdd.length,\n removed: productsToRemove.length,\n }\n}\n\nexport async function getSlotProductIds(slotId: string): Promise {\n const associations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, parseInt(slotId)),\n columns: {\n productId: true,\n },\n })\n\n return associations.map((assoc: { productId: number }) => assoc.productId)\n}\n\nexport async function getAllUnits(): Promise {\n const allUnits = await db.query.units.findMany({\n orderBy: units.shortNotation,\n })\n\n return allUnits.map(mapUnit)\n}\n\nexport async function getAllProductTags(): Promise {\n const tags = await db.query.productTagInfo.findMany({\n with: {\n products: {\n with: {\n product: true,\n },\n },\n },\n }) as Array }>\n\n return tags.map((tag: ProductTagInfoRow & { products: Array }) => ({\n ...mapTagInfo(tag),\n products: tag.products.map((assignment: ProductTagRow & { product: ProductRow }) => ({\n productId: assignment.productId,\n tagId: assignment.tagId,\n assignedAt: assignment.assignedAt,\n product: mapProduct(assignment.product),\n })),\n }))\n}\n\nexport async function getAllProductTagInfos(): Promise {\n const tags = await db.query.productTagInfo.findMany({\n orderBy: productTagInfo.tagName,\n })\n\n return tags.map(mapTagInfo)\n}\n\nexport async function getProductTagInfoById(tagId: number): Promise {\n const tag = await db.query.productTagInfo.findFirst({\n where: eq(productTagInfo.id, tagId),\n })\n\n if (!tag) {\n return null\n }\n\n return mapTagInfo(tag)\n}\n\nexport interface CreateProductTagInput {\n tagName: string\n tagDescription?: string | null\n imageUrl?: string | null\n isDashboardTag?: boolean\n relatedStores?: number[]\n}\n\nexport async function createProductTag(input: CreateProductTagInput): Promise {\n const [tag] = await db.insert(productTagInfo).values({\n tagName: input.tagName,\n tagDescription: input.tagDescription || null,\n imageUrl: input.imageUrl || null,\n isDashboardTag: input.isDashboardTag || false,\n relatedStores: input.relatedStores || [],\n }).returning()\n\n return {\n ...mapTagInfo(tag),\n products: [],\n }\n}\n\nexport async function getProductTagById(tagId: number): Promise {\n const tag = await db.query.productTagInfo.findFirst({\n where: eq(productTagInfo.id, tagId),\n with: {\n products: {\n with: {\n product: true,\n },\n },\n },\n })\n\n if (!tag) {\n return null\n }\n\n return {\n ...mapTagInfo(tag),\n products: tag.products.map((assignment: ProductTagRow & { product: ProductRow }) => ({\n productId: assignment.productId,\n tagId: assignment.tagId,\n assignedAt: assignment.assignedAt,\n product: mapProduct(assignment.product),\n })),\n }\n}\n\nexport interface UpdateProductTagInput {\n tagName?: string\n tagDescription?: string | null\n imageUrl?: string | null\n isDashboardTag?: boolean\n relatedStores?: number[]\n}\n\nexport async function updateProductTag(tagId: number, input: UpdateProductTagInput): Promise {\n const [tag] = await db.update(productTagInfo).set({\n ...(input.tagName !== undefined && { tagName: input.tagName }),\n ...(input.tagDescription !== undefined && { tagDescription: input.tagDescription }),\n ...(input.imageUrl !== undefined && { imageUrl: input.imageUrl }),\n ...(input.isDashboardTag !== undefined && { isDashboardTag: input.isDashboardTag }),\n ...(input.relatedStores !== undefined && { relatedStores: input.relatedStores }),\n }).where(eq(productTagInfo.id, tagId)).returning()\n\n const fullTag = await db.query.productTagInfo.findFirst({\n where: eq(productTagInfo.id, tagId),\n with: {\n products: {\n with: {\n product: true,\n },\n },\n },\n })\n\n return {\n ...mapTagInfo(tag),\n products: fullTag?.products.map((assignment: ProductTagRow & { product: ProductRow }) => ({\n productId: assignment.productId,\n tagId: assignment.tagId,\n assignedAt: assignment.assignedAt,\n product: mapProduct(assignment.product),\n })) || [],\n }\n}\n\nexport async function deleteProductTag(tagId: number): Promise {\n await db.delete(productTagInfo).where(eq(productTagInfo.id, tagId))\n}\n\nexport async function checkProductTagExistsByName(tagName: string): Promise {\n const tag = await db.query.productTagInfo.findFirst({\n where: eq(productTagInfo.tagName, tagName),\n })\n return !!tag\n}\n\nexport async function getSlotsProductIds(slotIds: number[]): Promise> {\n if (slotIds.length === 0) {\n return {}\n }\n\n const associations = await db.query.productSlots.findMany({\n where: inArray(productSlots.slotId, slotIds),\n columns: {\n slotId: true,\n productId: true,\n },\n }) as Array<{ slotId: number; productId: number }>\n\n const result: Record = {}\n for (const assoc of associations) {\n if (!result[assoc.slotId]) {\n result[assoc.slotId] = []\n }\n result[assoc.slotId].push(assoc.productId)\n }\n\n slotIds.forEach((slotId) => {\n if (!result[slotId]) {\n result[slotId] = []\n }\n })\n\n return result\n}\n\nexport async function getProductReviews(productId: number, limit: number, offset: number) {\n const reviews = await db\n .select({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n adminResponse: productReviews.adminResponse,\n adminResponseImages: productReviews.adminResponseImages,\n userName: users.name,\n })\n .from(productReviews)\n .innerJoin(users, eq(productReviews.userId, users.id))\n .where(eq(productReviews.productId, productId))\n .orderBy(desc(productReviews.reviewTime))\n .limit(limit)\n .offset(offset)\n\n const totalCountResult = await db\n .select({ count: sql`count(*)` })\n .from(productReviews)\n .where(eq(productReviews.productId, productId))\n\n const totalCount = Number(totalCountResult[0].count)\n\n const mappedReviews: AdminProductReview[] = reviews.map((review: any) => ({\n id: review.id,\n reviewBody: review.reviewBody,\n ratings: review.ratings,\n imageUrls: review.imageUrls,\n reviewTime: review.reviewTime,\n adminResponse: review.adminResponse ?? null,\n adminResponseImages: review.adminResponseImages,\n userName: review.userName ?? null,\n }))\n\n return {\n reviews: mappedReviews,\n totalCount,\n }\n}\n\nexport async function respondToReview(\n reviewId: number,\n adminResponse: string | undefined,\n adminResponseImages: string[]\n): Promise {\n const [updatedReview] = await db\n .update(productReviews)\n .set({\n adminResponse,\n adminResponseImages,\n })\n .where(eq(productReviews.id, reviewId))\n .returning()\n\n if (!updatedReview) {\n return null\n }\n\n return {\n id: updatedReview.id,\n reviewBody: updatedReview.reviewBody,\n ratings: updatedReview.ratings,\n imageUrls: updatedReview.imageUrls,\n reviewTime: updatedReview.reviewTime,\n adminResponse: updatedReview.adminResponse ?? null,\n adminResponseImages: updatedReview.adminResponseImages,\n userName: null,\n }\n}\n\nexport async function getAllProductGroups() {\n const groups = await db.query.productGroupInfo.findMany({\n with: {\n memberships: {\n with: {\n product: true,\n },\n },\n },\n orderBy: desc(productGroupInfo.createdAt),\n })\n\n return groups.map((group: any) => ({\n id: group.id,\n groupName: group.groupName,\n description: group.description ?? null,\n createdAt: group.createdAt,\n products: group.memberships.map((membership: any) => mapProduct(membership.product)),\n productCount: group.memberships.length,\n memberships: group.memberships\n }))\n}\n\nexport async function createProductGroup(\n groupName: string,\n description: string | undefined,\n productIds: number[]\n): Promise {\n const [newGroup] = await db\n .insert(productGroupInfo)\n .values({\n groupName,\n description,\n })\n .returning()\n\n if (productIds.length > 0) {\n const memberships = productIds.map((productId) => ({\n productId,\n groupId: newGroup.id,\n }))\n\n await db.insert(productGroupMembership).values(memberships)\n }\n\n return {\n id: newGroup.id,\n groupName: newGroup.groupName,\n description: newGroup.description ?? null,\n createdAt: newGroup.createdAt,\n }\n}\n\nexport async function updateProductGroup(\n id: number,\n groupName: string | undefined,\n description: string | undefined,\n productIds: number[] | undefined\n): Promise {\n const updateData: Partial<{\n groupName: string\n description: string | null\n }> = {}\n\n if (groupName !== undefined) updateData.groupName = groupName\n if (description !== undefined) updateData.description = description\n\n const [updatedGroup] = await db\n .update(productGroupInfo)\n .set(updateData)\n .where(eq(productGroupInfo.id, id))\n .returning()\n\n if (!updatedGroup) {\n return null\n }\n\n if (productIds !== undefined) {\n await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id))\n\n if (productIds.length > 0) {\n const memberships = productIds.map((productId) => ({\n productId,\n groupId: id,\n }))\n\n await db.insert(productGroupMembership).values(memberships)\n }\n }\n\n return {\n id: updatedGroup.id,\n groupName: updatedGroup.groupName,\n description: updatedGroup.description ?? null,\n createdAt: updatedGroup.createdAt,\n }\n}\n\nexport async function deleteProductGroup(id: number): Promise {\n await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id))\n\n const [deletedGroup] = await db\n .delete(productGroupInfo)\n .where(eq(productGroupInfo.id, id))\n .returning()\n\n if (!deletedGroup) {\n return null\n }\n\n return {\n id: deletedGroup.id,\n groupName: deletedGroup.groupName,\n description: deletedGroup.description ?? null,\n createdAt: deletedGroup.createdAt,\n }\n}\n\nexport async function addProductToGroup(groupId: number, productId: number): Promise {\n await db.insert(productGroupMembership).values({ groupId, productId })\n}\n\nexport async function removeProductFromGroup(groupId: number, productId: number): Promise {\n await db.delete(productGroupMembership)\n .where(and(\n eq(productGroupMembership.groupId, groupId),\n eq(productGroupMembership.productId, productId)\n ))\n}\n\nexport async function updateProductPrices(updates: Array<{\n productId: number\n price?: number\n marketPrice?: number | null\n flashPrice?: number | null\n isFlashAvailable?: boolean\n}>) {\n if (updates.length === 0) {\n return { updatedCount: 0, invalidIds: [] }\n }\n\n const productIds = updates.map((update) => update.productId)\n const existingProducts = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, productIds),\n columns: { id: true },\n }) as Array<{ id: number }>\n\n const existingIds = new Set(existingProducts.map((product: { id: number }) => product.id))\n const invalidIds = productIds.filter((id) => !existingIds.has(id))\n\n if (invalidIds.length > 0) {\n return { updatedCount: 0, invalidIds }\n }\n\n const updatePromises = updates.map((update) => {\n const { productId, price, marketPrice, flashPrice, isFlashAvailable } = update\n const updateData: Partial> = {}\n\n if (price !== undefined) updateData.price = price.toString()\n if (marketPrice !== undefined) updateData.marketPrice = marketPrice === null ? null : marketPrice.toString()\n if (flashPrice !== undefined) updateData.flashPrice = flashPrice === null ? null : flashPrice.toString()\n if (isFlashAvailable !== undefined) updateData.isFlashAvailable = isFlashAvailable\n\n return db\n .update(productInfo)\n .set(updateData)\n .where(eq(productInfo.id, productId))\n })\n\n await Promise.all(updatePromises)\n\n return { updatedCount: updates.length, invalidIds: [] }\n}\n\n\n// ==========================================================================\n// Product Helpers for Admin Controller\n// ==========================================================================\n\nexport async function checkProductExistsByName(name: string): Promise {\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.name, name),\n columns: { id: true },\n })\n\n return !!product\n}\n\nexport async function checkUnitExists(unitId: number): Promise {\n const unit = await db.query.units.findFirst({\n where: eq(units.id, unitId),\n columns: { id: true },\n })\n\n return !!unit\n}\n\nexport async function getProductImagesById(productId: number): Promise {\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n columns: { images: true },\n })\n\n if (!product) {\n return null\n }\n\n return getStringArray(product.images) || []\n}\n\nexport interface CreateSpecialDealInput {\n quantity: number\n price: number\n validTill: string | Date\n}\n\nexport async function createSpecialDealsForProduct(\n productId: number,\n deals: CreateSpecialDealInput[]\n): Promise {\n if (deals.length === 0) {\n return []\n }\n\n const dealInserts = deals.map((deal) => ({\n productId,\n quantity: deal.quantity.toString(),\n price: deal.price.toString(),\n validTill: new Date(deal.validTill),\n }))\n\n const createdDeals = await db\n .insert(specialDeals)\n .values(dealInserts)\n .returning()\n\n return createdDeals.map(mapSpecialDeal)\n}\n\nexport async function updateProductDeals(\n productId: number,\n deals: CreateSpecialDealInput[]\n): Promise {\n if (deals.length === 0) {\n await db.delete(specialDeals).where(eq(specialDeals.productId, productId))\n return\n }\n\n const existingDeals = await db.query.specialDeals.findMany({\n where: eq(specialDeals.productId, productId),\n })\n\n const existingDealsMap = new Map(\n existingDeals.map((deal: SpecialDealRow) => [`${deal.quantity}-${deal.price}`, deal])\n )\n const newDealsMap = new Map(\n deals.map((deal) => [`${deal.quantity}-${deal.price}`, deal])\n )\n\n const dealsToAdd = deals.filter((deal) => {\n const key = `${deal.quantity}-${deal.price}`\n return !existingDealsMap.has(key)\n })\n\n const dealsToRemove = existingDeals.filter((deal: SpecialDealRow) => {\n const key = `${deal.quantity}-${deal.price}`\n return !newDealsMap.has(key)\n })\n\n const dealsToUpdate = deals.filter((deal: CreateSpecialDealInput) => {\n const key = `${deal.quantity}-${deal.price}`\n const existing = existingDealsMap.get(key)\n const nextValidTill = deal.validTill instanceof Date\n ? deal.validTill.toISOString().split('T')[0]\n : String(deal.validTill)\n return existing && existing.validTill.toISOString().split('T')[0] !== nextValidTill\n })\n\n if (dealsToRemove.length > 0) {\n await db.delete(specialDeals).where(\n inArray(specialDeals.id, dealsToRemove.map((deal: SpecialDealRow) => deal.id))\n )\n }\n\n if (dealsToAdd.length > 0) {\n const dealInserts = dealsToAdd.map((deal) => ({\n productId,\n quantity: deal.quantity.toString(),\n price: deal.price.toString(),\n validTill: new Date(deal.validTill),\n }))\n await db.insert(specialDeals).values(dealInserts)\n }\n\n for (const deal of dealsToUpdate) {\n const key = `${deal.quantity}-${deal.price}`\n const existingDeal = existingDealsMap.get(key)\n if (existingDeal) {\n await db.update(specialDeals)\n .set({ validTill: new Date(deal.validTill) })\n .where(eq(specialDeals.id, existingDeal.id))\n }\n }\n}\n\nexport async function replaceProductTags(productId: number, tagIds: number[]): Promise {\n await db.delete(productTags).where(eq(productTags.productId, productId))\n\n if (tagIds.length === 0) {\n return\n }\n\n const tagAssociations = tagIds.map((tagId) => ({\n productId,\n tagId,\n }))\n\n await db.insert(productTags).values(tagAssociations)\n}\n", "import { db } from '../db/db_index'\nimport {\n deliverySlotInfo,\n productSlots,\n productInfo,\n vendorSnippets,\n productGroupInfo,\n} from '../db/schema'\nimport { and, asc, desc, eq, gt, inArray } from 'drizzle-orm'\nimport type {\n AdminDeliverySlot,\n AdminSlotWithProducts,\n AdminSlotWithProductsAndSnippetsBase,\n AdminSlotCreateResult,\n AdminSlotUpdateResult,\n AdminVendorSnippet,\n AdminSlotProductSummary,\n AdminUpdateSlotCapacityResult,\n} from '@packages/shared'\n\ntype SlotSnippetInput = {\n name: string\n productIds: number[]\n validTill?: string\n}\n\nconst getStringArray = (value: unknown): string[] | null => {\n if (!Array.isArray(value)) return null\n return value.map((item) => String(item))\n}\n\nconst getNumberArray = (value: unknown): number[] => {\n if (!Array.isArray(value)) return []\n return value.map((item) => Number(item))\n}\n\nconst mapDeliverySlot = (slot: typeof deliverySlotInfo.$inferSelect): AdminDeliverySlot => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isFlash: slot.isFlash,\n isCapacityFull: slot.isCapacityFull,\n deliverySequence: slot.deliverySequence,\n groupIds: slot.groupIds,\n})\n\nconst mapSlotProductSummary = (product: { id: number; name: string; images: unknown }): AdminSlotProductSummary => ({\n id: product.id,\n name: product.name,\n images: getStringArray(product.images),\n})\n\nconst mapVendorSnippet = (snippet: typeof vendorSnippets.$inferSelect): AdminVendorSnippet => ({\n id: snippet.id,\n snippetCode: snippet.snippetCode,\n slotId: snippet.slotId ?? null,\n productIds: snippet.productIds || [],\n isPermanent: snippet.isPermanent,\n validTill: snippet.validTill ?? null,\n createdAt: snippet.createdAt,\n})\n\nexport async function getActiveSlotsWithProducts(): Promise {\n const slots = await db.query.deliverySlotInfo\n .findMany({\n where: eq(deliverySlotInfo.isActive, true),\n orderBy: desc(deliverySlotInfo.deliveryTime),\n with: {\n productSlots: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n },\n })\n\n return slots.map((slot: any) => ({\n ...mapDeliverySlot(slot),\n deliverySequence: getNumberArray(slot.deliverySequence),\n products: slot.productSlots.map((ps: any) => mapSlotProductSummary(ps.product)),\n }))\n}\n\nexport async function getActiveSlots(): Promise {\n const slots = await db.query.deliverySlotInfo.findMany({\n where: eq(deliverySlotInfo.isActive, true),\n })\n\n return slots.map(mapDeliverySlot)\n}\n\nexport async function getSlotsAfterDate(afterDate: Date): Promise {\n const slots = await db.query.deliverySlotInfo.findMany({\n where: and(\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, afterDate)\n ),\n orderBy: asc(deliverySlotInfo.deliveryTime),\n })\n\n return slots.map(mapDeliverySlot)\n}\n\nexport async function getSlotByIdWithRelations(id: number): Promise {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, id),\n with: {\n productSlots: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n vendorSnippets: true,\n },\n })\n\n if (!slot) {\n return null\n }\n\n return {\n ...mapDeliverySlot(slot),\n deliverySequence: getNumberArray(slot.deliverySequence),\n groupIds: getNumberArray(slot.groupIds),\n products: slot.productSlots.map((ps: any) => mapSlotProductSummary(ps.product)),\n vendorSnippets: slot.vendorSnippets.map(mapVendorSnippet),\n }\n}\n\nexport async function createSlotWithRelations(input: {\n deliveryTime: string\n freezeTime: string\n isActive?: boolean\n productIds?: number[]\n vendorSnippets?: SlotSnippetInput[]\n groupIds?: number[]\n}): Promise {\n const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input\n\n const result = await db.transaction(async (tx) => {\n const [newSlot] = await tx\n .insert(deliverySlotInfo)\n .values({\n deliveryTime: new Date(deliveryTime),\n freezeTime: new Date(freezeTime),\n isActive: isActive !== undefined ? isActive : true,\n groupIds: groupIds !== undefined ? groupIds : [],\n })\n .returning()\n\n if (productIds && productIds.length > 0) {\n const associations = productIds.map((productId) => ({\n productId,\n slotId: newSlot.id,\n }))\n await tx.insert(productSlots).values(associations)\n }\n\n let createdSnippets: AdminVendorSnippet[] = []\n if (snippets && snippets.length > 0) {\n for (const snippet of snippets) {\n const products = await tx.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n })\n if (products.length !== snippet.productIds.length) {\n throw new Error(`One or more invalid product IDs in snippet \"${snippet.name}\"`)\n }\n\n const existingSnippet = await tx.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippet.name),\n })\n if (existingSnippet) {\n throw new Error(`Snippet name \"${snippet.name}\" already exists`)\n }\n\n const [createdSnippet] = await tx.insert(vendorSnippets).values({\n snippetCode: snippet.name,\n slotId: newSlot.id,\n productIds: snippet.productIds,\n validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,\n }).returning()\n\n createdSnippets.push(mapVendorSnippet(createdSnippet))\n }\n }\n\n return {\n slot: mapDeliverySlot(newSlot),\n createdSnippets,\n message: 'Slot created successfully',\n }\n })\n\n return result\n}\n\nexport async function updateSlotWithRelations(input: {\n id: number\n deliveryTime: string\n freezeTime: string\n isActive?: boolean\n productIds?: number[]\n vendorSnippets?: SlotSnippetInput[]\n groupIds?: number[]\n}): Promise {\n const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input\n\n let validGroupIds = groupIds\n if (groupIds && groupIds.length > 0) {\n const existingGroups = await db.query.productGroupInfo.findMany({\n where: inArray(productGroupInfo.id, groupIds),\n columns: { id: true },\n })\n validGroupIds = existingGroups.map((group: { id: number }) => group.id)\n }\n\n const result = await db.transaction(async (tx) => {\n const [updatedSlot] = await tx\n .update(deliverySlotInfo)\n .set({\n deliveryTime: new Date(deliveryTime),\n freezeTime: new Date(freezeTime),\n isActive: isActive !== undefined ? isActive : true,\n groupIds: validGroupIds !== undefined ? validGroupIds : [],\n })\n .where(eq(deliverySlotInfo.id, id))\n .returning()\n\n if (!updatedSlot) {\n return null\n }\n\n if (productIds !== undefined) {\n await tx.delete(productSlots).where(eq(productSlots.slotId, id))\n\n if (productIds.length > 0) {\n const associations = productIds.map((productId) => ({\n productId,\n slotId: id,\n }))\n await tx.insert(productSlots).values(associations)\n }\n }\n\n let createdSnippets: AdminVendorSnippet[] = []\n if (snippets && snippets.length > 0) {\n for (const snippet of snippets) {\n const products = await tx.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n })\n if (products.length !== snippet.productIds.length) {\n throw new Error(`One or more invalid product IDs in snippet \"${snippet.name}\"`)\n }\n\n const existingSnippet = await tx.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippet.name),\n })\n if (existingSnippet) {\n throw new Error(`Snippet name \"${snippet.name}\" already exists`)\n }\n\n const [createdSnippet] = await tx.insert(vendorSnippets).values({\n snippetCode: snippet.name,\n slotId: id,\n productIds: snippet.productIds,\n validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,\n }).returning()\n\n createdSnippets.push(mapVendorSnippet(createdSnippet))\n }\n }\n\n return {\n slot: mapDeliverySlot(updatedSlot),\n createdSnippets,\n message: 'Slot updated successfully',\n }\n })\n\n return result\n}\n\nexport async function deleteSlotById(id: number): Promise {\n const [deletedSlot] = await db\n .update(deliverySlotInfo)\n .set({ isActive: false })\n .where(eq(deliverySlotInfo.id, id))\n .returning()\n\n if (!deletedSlot) {\n return null\n }\n\n return mapDeliverySlot(deletedSlot)\n}\n\nexport async function getSlotDeliverySequence(slotId: number): Promise {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n })\n\n if (!slot) {\n return null\n }\n\n return mapDeliverySlot(slot)\n}\n\nexport async function updateSlotDeliverySequence(slotId: number, sequence: unknown) {\n const [updatedSlot] = await db\n .update(deliverySlotInfo)\n .set({ deliverySequence: sequence as Record })\n .where(eq(deliverySlotInfo.id, slotId))\n .returning({\n id: deliverySlotInfo.id,\n deliverySequence: deliverySlotInfo.deliverySequence,\n })\n\n return updatedSlot || null\n}\n\nexport async function updateSlotCapacity(slotId: number, isCapacityFull: boolean): Promise {\n const [updatedSlot] = await db\n .update(deliverySlotInfo)\n .set({ isCapacityFull })\n .where(eq(deliverySlotInfo.id, slotId))\n .returning()\n\n if (!updatedSlot) {\n return null\n }\n\n return {\n success: true,\n slot: mapDeliverySlot(updatedSlot),\n message: `Slot ${isCapacityFull ? 'marked as full capacity' : 'capacity reset'}`,\n }\n}\n", "import { db } from '../db/db_index'\nimport { staffUsers, staffRoles, users, userDetails, orders } from '../db/schema'\nimport { eq, or, like, and, lt, desc } from 'drizzle-orm'\n\nexport interface StaffUser {\n id: number\n name: string\n password: string\n staffRoleId: number | null\n createdAt: Date\n}\n\nexport async function getStaffUserByName(name: string): Promise {\n const staff = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.name, name),\n })\n\n return staff || null\n}\n\nexport async function getStaffUserById(staffId: number): Promise {\n const staff = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.id, staffId),\n })\n\n return staff || null\n}\n\nexport async function getAllStaff(): Promise {\n const staff = await db.query.staffUsers.findMany({\n columns: {\n id: true,\n name: true,\n },\n with: {\n role: {\n with: {\n rolePermissions: {\n with: {\n permission: true,\n },\n },\n },\n },\n },\n })\n\n return staff\n}\n\nexport async function getAllUsers(\n cursor?: number,\n limit: number = 20,\n search?: string\n): Promise<{ users: any[]; hasMore: boolean }> {\n let whereCondition = undefined\n\n if (search) {\n whereCondition = or(\n like(users.name, `%${search}%`),\n like(users.email, `%${search}%`),\n like(users.mobile, `%${search}%`)\n )\n }\n\n if (cursor) {\n const cursorCondition = lt(users.id, cursor)\n whereCondition = whereCondition ? and(whereCondition, cursorCondition) : cursorCondition\n }\n\n const allUsers = await db.query.users.findMany({\n where: whereCondition,\n with: {\n userDetails: true,\n },\n orderBy: desc(users.id),\n limit: limit + 1,\n })\n\n const hasMore = allUsers.length > limit\n const usersToReturn = hasMore ? allUsers.slice(0, limit) : allUsers\n\n return { users: usersToReturn, hasMore }\n}\n\nexport async function getUserWithDetails(userId: number): Promise {\n const user = await db.query.users.findFirst({\n where: eq(users.id, userId),\n with: {\n userDetails: true,\n orders: {\n orderBy: desc(orders.createdAt),\n limit: 1,\n },\n },\n })\n\n return user || null\n}\n\nexport async function updateUserSuspensionStatus(userId: number, isSuspended: boolean): Promise {\n await db\n .insert(userDetails)\n .values({ userId, isSuspended })\n .onConflictDoUpdate({\n target: userDetails.userId,\n set: { isSuspended },\n })\n}\n\nexport async function checkStaffUserExists(name: string): Promise {\n const existingUser = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.name, name),\n })\n return !!existingUser\n}\n\nexport async function checkStaffRoleExists(roleId: number): Promise {\n const role = await db.query.staffRoles.findFirst({\n where: eq(staffRoles.id, roleId),\n })\n return !!role\n}\n\nexport async function createStaffUser(\n name: string,\n password: string,\n roleId: number\n): Promise {\n const [newUser] = await db.insert(staffUsers).values({\n name: name.trim(),\n password,\n staffRoleId: roleId,\n }).returning()\n\n return {\n id: newUser.id,\n name: newUser.name,\n password: newUser.password,\n staffRoleId: newUser.staffRoleId,\n createdAt: newUser.createdAt,\n }\n}\n\nexport async function getAllRoles(): Promise {\n const roles = await db.query.staffRoles.findMany({\n columns: {\n id: true,\n roleName: true,\n },\n })\n\n return roles\n}\n", "import { db } from '../db/db_index'\nimport { storeInfo, productInfo } from '../db/schema'\nimport { eq, inArray } from 'drizzle-orm'\n\nexport interface Store {\n id: number\n name: string\n description: string | null\n imageUrl: string | null\n owner: number\n createdAt: Date\n // updatedAt: Date\n}\n\nexport async function getAllStores(): Promise {\n const stores = await db.query.storeInfo.findMany({\n with: {\n owner: true,\n },\n })\n\n return stores\n}\n\nexport async function getStoreById(id: number): Promise {\n const store = await db.query.storeInfo.findFirst({\n where: eq(storeInfo.id, id),\n with: {\n owner: true,\n },\n })\n\n return store || null\n}\n\nexport interface CreateStoreInput {\n name: string\n description?: string\n imageUrl?: string\n owner: number\n}\n\nexport async function createStore(\n input: CreateStoreInput,\n products?: number[]\n): Promise {\n const [newStore] = await db\n .insert(storeInfo)\n .values({\n name: input.name,\n description: input.description,\n imageUrl: input.imageUrl,\n owner: input.owner,\n })\n .returning()\n\n if (products && products.length > 0) {\n await db\n .update(productInfo)\n .set({ storeId: newStore.id })\n .where(inArray(productInfo.id, products))\n }\n\n return {\n id: newStore.id,\n name: newStore.name,\n description: newStore.description,\n imageUrl: newStore.imageUrl,\n owner: newStore.owner,\n createdAt: newStore.createdAt,\n // updatedAt: newStore.updatedAt,\n }\n}\n\nexport interface UpdateStoreInput {\n name?: string\n description?: string\n imageUrl?: string\n owner?: number\n}\n\nexport async function updateStore(\n id: number,\n input: UpdateStoreInput,\n products?: number[]\n): Promise {\n const [updatedStore] = await db\n .update(storeInfo)\n .set({\n ...input,\n // updatedAt: new Date(),\n })\n .where(eq(storeInfo.id, id))\n .returning()\n\n if (!updatedStore) {\n throw new Error('Store not found')\n }\n\n if (products !== undefined) {\n await db\n .update(productInfo)\n .set({ storeId: null })\n .where(eq(productInfo.storeId, id))\n\n if (products.length > 0) {\n await db\n .update(productInfo)\n .set({ storeId: id })\n .where(inArray(productInfo.id, products))\n }\n }\n\n return {\n id: updatedStore.id,\n name: updatedStore.name,\n description: updatedStore.description,\n imageUrl: updatedStore.imageUrl,\n owner: updatedStore.owner,\n createdAt: updatedStore.createdAt,\n // updatedAt: updatedStore.updatedAt,\n }\n}\n\nexport async function deleteStore(id: number): Promise<{ message: string }> {\n return await db.transaction(async (tx) => {\n await tx\n .update(productInfo)\n .set({ storeId: null })\n .where(eq(productInfo.storeId, id))\n\n const [deletedStore] = await tx\n .delete(storeInfo)\n .where(eq(storeInfo.id, id))\n .returning()\n\n if (!deletedStore) {\n throw new Error('Store not found')\n }\n\n return {\n message: 'Store deleted successfully',\n }\n })\n}\n", "import { db } from '../db/db_index'\nimport { users, userDetails, orders, orderItems, complaints, notifCreds, unloggedUserTokens, userIncidents, orderStatus } from '../db/schema'\nimport { eq, sql, desc, asc, count, max, inArray } from 'drizzle-orm'\n\nexport async function createUserByMobile(mobile: string): Promise {\n const [newUser] = await db\n .insert(users)\n .values({\n name: null,\n email: null,\n mobile,\n })\n .returning()\n\n return newUser\n}\n\nexport async function getUserByMobile(mobile: string): Promise {\n const [existingUser] = await db\n .select()\n .from(users)\n .where(eq(users.mobile, mobile))\n .limit(1)\n\n return existingUser || null\n}\n\nexport async function getUnresolvedComplaintsCount(): Promise {\n const result = await db\n .select({ count: count(complaints.id) })\n .from(complaints)\n .where(eq(complaints.isResolved, false))\n \n return result[0]?.count || 0\n}\n\nexport async function getAllUsersWithFilters(\n limit: number,\n cursor?: number,\n search?: string\n): Promise<{ users: any[]; hasMore: boolean }> {\n const whereConditions = []\n \n if (search && search.trim()) {\n whereConditions.push(sql`${users.mobile} LIKE ${`%${search.trim()}%`}`)\n }\n \n if (cursor) {\n whereConditions.push(sql`${users.id} > ${cursor}`)\n }\n\n const usersList = await db\n .select({\n id: users.id,\n name: users.name,\n mobile: users.mobile,\n createdAt: users.createdAt,\n })\n .from(users)\n .where(whereConditions.length > 0 ? sql.join(whereConditions, sql` AND `) : undefined)\n .orderBy(asc(users.id))\n .limit(limit + 1)\n\n const hasMore = usersList.length > limit\n const usersToReturn = hasMore ? usersList.slice(0, limit) : usersList\n\n return { users: usersToReturn, hasMore }\n}\n\nexport async function getOrderCountsByUserIds(userIds: number[]): Promise<{ userId: number; totalOrders: number }[]> {\n if (userIds.length === 0) return []\n \n return await db\n .select({\n userId: orders.userId,\n totalOrders: count(orders.id),\n })\n .from(orders)\n .where(sql`${orders.userId} IN (${sql.join(userIds, sql`, `)})`)\n .groupBy(orders.userId)\n}\n\nexport async function getLastOrdersByUserIds(userIds: number[]): Promise<{ userId: number; lastOrderDate: Date | null }[]> {\n if (userIds.length === 0) return []\n \n return await db\n .select({\n userId: orders.userId,\n lastOrderDate: max(orders.createdAt),\n })\n .from(orders)\n .where(sql`${orders.userId} IN (${sql.join(userIds, sql`, `)})`)\n .groupBy(orders.userId)\n}\n\nexport async function getSuspensionStatusesByUserIds(userIds: number[]): Promise<{ userId: number; isSuspended: boolean }[]> {\n if (userIds.length === 0) return []\n \n return await db\n .select({\n userId: userDetails.userId,\n isSuspended: userDetails.isSuspended,\n })\n .from(userDetails)\n .where(sql`${userDetails.userId} IN (${sql.join(userIds, sql`, `)})`)\n}\n\nexport async function getUserBasicInfo(userId: number): Promise {\n const user = await db\n .select({\n id: users.id,\n name: users.name,\n mobile: users.mobile,\n createdAt: users.createdAt,\n })\n .from(users)\n .where(eq(users.id, userId))\n .limit(1)\n\n return user[0] || null\n}\n\nexport async function getUserSuspensionStatus(userId: number): Promise {\n const userDetail = await db\n .select({\n isSuspended: userDetails.isSuspended,\n })\n .from(userDetails)\n .where(eq(userDetails.userId, userId))\n .limit(1)\n\n return userDetail[0]?.isSuspended ?? false\n}\n\nexport async function getUserOrders(userId: number): Promise {\n return await db\n .select({\n id: orders.id,\n readableId: orders.readableId,\n totalAmount: orders.totalAmount,\n createdAt: orders.createdAt,\n isFlashDelivery: orders.isFlashDelivery,\n })\n .from(orders)\n .where(eq(orders.userId, userId))\n .orderBy(desc(orders.createdAt))\n}\n\nexport async function getOrderStatusesByOrderIds(orderIds: number[]): Promise<{ orderId: number; isDelivered: boolean; isCancelled: boolean }[]> {\n if (orderIds.length === 0) return []\n \n return await db\n .select({\n orderId: orderStatus.orderId,\n isDelivered: orderStatus.isDelivered,\n isCancelled: orderStatus.isCancelled,\n })\n .from(orderStatus)\n .where(sql`${orderStatus.orderId} IN (${sql.join(orderIds, sql`, `)})`)\n}\n\nexport async function getItemCountsByOrderIds(orderIds: number[]): Promise<{ orderId: number; itemCount: number }[]> {\n if (orderIds.length === 0) return []\n \n return await db\n .select({\n orderId: orderItems.orderId,\n itemCount: count(orderItems.id),\n })\n .from(orderItems)\n .where(sql`${orderItems.orderId} IN (${sql.join(orderIds, sql`, `)})`)\n .groupBy(orderItems.orderId)\n}\n\nexport async function upsertUserSuspension(userId: number, isSuspended: boolean): Promise {\n const existingDetail = await db\n .select({ id: userDetails.id })\n .from(userDetails)\n .where(eq(userDetails.userId, userId))\n .limit(1)\n\n if (existingDetail.length > 0) {\n await db\n .update(userDetails)\n .set({ isSuspended })\n .where(eq(userDetails.userId, userId))\n } else {\n await db\n .insert(userDetails)\n .values({\n userId,\n isSuspended,\n })\n }\n}\n\nexport async function searchUsers(search?: string): Promise {\n if (search && search.trim()) {\n return await db\n .select({\n id: users.id,\n name: users.name,\n mobile: users.mobile,\n })\n .from(users)\n .where(sql`${users.mobile} LIKE ${`%${search.trim()}%`} OR ${users.name} LIKE ${`%${search.trim()}%`}`)\n } else {\n return await db\n .select({\n id: users.id,\n name: users.name,\n mobile: users.mobile,\n })\n .from(users)\n }\n}\n\nexport async function getAllNotifCreds(): Promise<{ userId: number, token: string }[]> {\n return await db\n .select({ userId: notifCreds.userId, token: notifCreds.token })\n .from(notifCreds)\n}\n\nexport async function getAllUnloggedTokens(): Promise<{ token: string }[]> {\n return await db\n .select({ token: unloggedUserTokens.token })\n .from(unloggedUserTokens)\n}\n\nexport async function getNotifTokensByUserIds(userIds: number[]): Promise<{ token: string }[]> {\n return await db\n .select({ token: notifCreds.token })\n .from(notifCreds)\n .where(inArray(notifCreds.userId, userIds))\n}\n\nexport async function getUserIncidentsWithRelations(userId: number): Promise {\n return await db.query.userIncidents.findMany({\n where: eq(userIncidents.userId, userId),\n with: {\n order: {\n with: {\n orderStatus: true,\n },\n },\n addedBy: true,\n },\n orderBy: desc(userIncidents.dateAdded),\n })\n}\n\nexport async function createUserIncident(\n userId: number,\n orderId: number | undefined,\n adminComment: string | undefined,\n adminUserId: number,\n negativityScore: number | undefined\n): Promise {\n const [incident] = await db.insert(userIncidents)\n .values({\n userId,\n orderId,\n adminComment,\n addedBy: adminUserId,\n negativityScore,\n })\n .returning()\n\n return incident\n}\n", "import { db } from '../db/db_index'\nimport { vendorSnippets, deliverySlotInfo, productInfo, orders, orderItems, orderStatus } from '../db/schema'\nimport { desc, eq, inArray } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type {\n AdminDeliverySlot,\n AdminVendorSnippet,\n AdminVendorSnippetWithSlot,\n AdminVendorSnippetProduct,\n AdminVendorUpdatePackagingResult,\n} from '@packages/shared'\n\ntype VendorSnippetRow = InferSelectModel\ntype DeliverySlotRow = InferSelectModel\ntype ProductRow = InferSelectModel\n\nconst mapVendorSnippet = (snippet: VendorSnippetRow): AdminVendorSnippet => ({\n id: snippet.id,\n snippetCode: snippet.snippetCode,\n slotId: snippet.slotId ?? null,\n productIds: snippet.productIds || [],\n isPermanent: snippet.isPermanent,\n validTill: snippet.validTill ?? null,\n createdAt: snippet.createdAt,\n})\n\nconst mapDeliverySlot = (slot: DeliverySlotRow): AdminDeliverySlot => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isFlash: slot.isFlash,\n isCapacityFull: slot.isCapacityFull,\n deliverySequence: slot.deliverySequence,\n groupIds: slot.groupIds,\n})\n\nconst mapProductSummary = (product: { id: number; name: string }): AdminVendorSnippetProduct => ({\n id: product.id,\n name: product.name,\n})\n\nexport async function checkVendorSnippetExists(snippetCode: string): Promise {\n const existingSnippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n })\n return !!existingSnippet\n}\n\nexport async function getVendorSnippetById(id: number): Promise {\n const snippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.id, id),\n with: {\n slot: true,\n },\n })\n\n if (!snippet) {\n return null\n }\n\n return {\n ...mapVendorSnippet(snippet),\n slot: snippet.slot ? mapDeliverySlot(snippet.slot) : null,\n }\n}\n\nexport async function getVendorSnippetByCode(snippetCode: string): Promise {\n const snippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n })\n\n return snippet ? mapVendorSnippet(snippet) : null\n}\n\nexport async function getAllVendorSnippets(): Promise {\n const snippets = await db.query.vendorSnippets.findMany({\n with: {\n slot: true,\n },\n orderBy: desc(vendorSnippets.createdAt),\n })\n\n return snippets.map((snippet: VendorSnippetRow & { slot: DeliverySlotRow | null }) => ({\n ...mapVendorSnippet(snippet),\n slot: snippet.slot ? mapDeliverySlot(snippet.slot) : null,\n }))\n}\n\nexport async function createVendorSnippet(input: {\n snippetCode: string\n slotId?: number\n productIds: number[]\n isPermanent: boolean\n validTill?: Date\n}): Promise {\n const [result] = await db.insert(vendorSnippets).values({\n snippetCode: input.snippetCode,\n slotId: input.slotId,\n productIds: input.productIds,\n isPermanent: input.isPermanent,\n validTill: input.validTill,\n }).returning()\n\n return mapVendorSnippet(result)\n}\n\nexport async function updateVendorSnippet(id: number, updates: {\n snippetCode?: string\n slotId?: number | null\n productIds?: number[]\n isPermanent?: boolean\n validTill?: Date | null\n}): Promise {\n const [result] = await db.update(vendorSnippets)\n .set(updates)\n .where(eq(vendorSnippets.id, id))\n .returning()\n\n return result ? mapVendorSnippet(result) : null\n}\n\nexport async function deleteVendorSnippet(id: number): Promise {\n const [result] = await db.delete(vendorSnippets)\n .where(eq(vendorSnippets.id, id))\n .returning()\n\n return result ? mapVendorSnippet(result) : null\n}\n\nexport async function getProductsByIds(productIds: number[]): Promise {\n const products = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, productIds),\n columns: { id: true, name: true },\n })\n\n const prods = products.map(mapProductSummary)\n return prods\n}\n\nexport async function getVendorSlotById(slotId: number): Promise {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n })\n\n return slot ? mapDeliverySlot(slot) : null\n}\n\nexport async function getVendorOrdersBySlotId(slotId: number) {\n return await db.query.orders.findMany({\n where: eq(orders.slotId, slotId),\n with: {\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n user: true,\n slot: true,\n },\n orderBy: desc(orders.createdAt),\n })\n}\n\nexport async function getVendorOrders() {\n return await db.query.orders.findMany({\n with: {\n user: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n },\n orderBy: desc(orders.createdAt),\n })\n}\n\nexport async function getOrderItemsByOrderIds(orderIds: number[]) {\n return await db.query.orderItems.findMany({\n where: inArray(orderItems.orderId, orderIds),\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n })\n}\n\nexport async function getOrderStatusByOrderIds(orderIds: number[]) {\n return await db.query.orderStatus.findMany({\n where: inArray(orderStatus.orderId, orderIds),\n })\n}\n\nexport async function updateVendorOrderItemPackaging(\n orderItemId: number,\n isPackaged: boolean\n): Promise {\n const orderItem = await db.query.orderItems.findFirst({\n where: eq(orderItems.id, orderItemId),\n with: {\n order: {\n with: {\n slot: true,\n },\n },\n },\n })\n\n if (!orderItem) {\n return { success: false, message: 'Order item not found' }\n }\n\n if (!orderItem.order.slotId) {\n return { success: false, message: 'Order item not associated with a vendor slot' }\n }\n\n const snippetExists = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.slotId, orderItem.order.slotId),\n })\n\n if (!snippetExists) {\n return { success: false, message: \"No vendor snippet found for this order's slot\" }\n }\n\n const [updatedItem] = await db.update(orderItems)\n .set({\n is_packaged: isPackaged,\n })\n .where(eq(orderItems.id, orderItemId))\n .returning({ id: orderItems.id })\n\n if (!updatedItem) {\n return { success: false, message: 'Failed to update packaging status' }\n }\n\n return { success: true, orderItemId, is_packaged: isPackaged }\n}\n", "import { db } from '../db/db_index'\nimport { addresses, deliverySlotInfo, orders, orderStatus } from '../db/schema'\nimport { and, eq, gte } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserAddress } from '@packages/shared'\n\ntype AddressRow = InferSelectModel\n\nconst mapUserAddress = (address: AddressRow): UserAddress => ({\n id: address.id,\n userId: address.userId,\n name: address.name,\n phone: address.phone,\n addressLine1: address.addressLine1,\n addressLine2: address.addressLine2 ?? null,\n city: address.city,\n state: address.state,\n pincode: address.pincode,\n isDefault: address.isDefault,\n latitude: address.latitude ?? null,\n longitude: address.longitude ?? null,\n googleMapsUrl: address.googleMapsUrl ?? null,\n adminLatitude: address.adminLatitude ?? null,\n adminLongitude: address.adminLongitude ?? null,\n zoneId: address.zoneId ?? null,\n createdAt: address.createdAt,\n})\n\nexport async function getDefaultAddress(userId: number): Promise {\n const [defaultAddress] = await db\n .select()\n .from(addresses)\n .where(and(eq(addresses.userId, userId), eq(addresses.isDefault, true)))\n .limit(1)\n\n return defaultAddress ? mapUserAddress(defaultAddress) : null\n}\n\nexport async function getUserAddresses(userId: number): Promise {\n const userAddresses = await db.select().from(addresses).where(eq(addresses.userId, userId))\n return userAddresses.map(mapUserAddress)\n}\n\nexport async function getUserAddressById(userId: number, addressId: number): Promise {\n const [address] = await db\n .select()\n .from(addresses)\n .where(and(eq(addresses.id, addressId), eq(addresses.userId, userId)))\n .limit(1)\n\n return address ? mapUserAddress(address) : null\n}\n\nexport async function clearDefaultAddress(userId: number): Promise {\n await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId))\n}\n\nexport async function createUserAddress(input: {\n userId: number\n name: string\n phone: string\n addressLine1: string\n addressLine2?: string\n city: string\n state: string\n pincode: string\n isDefault: boolean\n latitude?: number\n longitude?: number\n googleMapsUrl?: string\n}): Promise {\n const [newAddress] = await db.insert(addresses).values({\n userId: input.userId,\n name: input.name,\n phone: input.phone,\n addressLine1: input.addressLine1,\n addressLine2: input.addressLine2,\n city: input.city,\n state: input.state,\n pincode: input.pincode,\n isDefault: input.isDefault,\n latitude: input.latitude,\n longitude: input.longitude,\n googleMapsUrl: input.googleMapsUrl,\n }).returning()\n\n return mapUserAddress(newAddress)\n}\n\nexport async function updateUserAddress(input: {\n userId: number\n addressId: number\n name: string\n phone: string\n addressLine1: string\n addressLine2?: string\n city: string\n state: string\n pincode: string\n isDefault: boolean\n latitude?: number\n longitude?: number\n googleMapsUrl?: string\n}): Promise {\n const [updatedAddress] = await db.update(addresses)\n .set({\n name: input.name,\n phone: input.phone,\n addressLine1: input.addressLine1,\n addressLine2: input.addressLine2,\n city: input.city,\n state: input.state,\n pincode: input.pincode,\n isDefault: input.isDefault,\n googleMapsUrl: input.googleMapsUrl,\n latitude: input.latitude,\n longitude: input.longitude,\n })\n .where(and(eq(addresses.id, input.addressId), eq(addresses.userId, input.userId)))\n .returning()\n\n return updatedAddress ? mapUserAddress(updatedAddress) : null\n}\n\nexport async function deleteUserAddress(userId: number, addressId: number): Promise {\n const [deleted] = await db.delete(addresses)\n .where(and(eq(addresses.id, addressId), eq(addresses.userId, userId)))\n .returning({ id: addresses.id })\n\n return !!deleted\n}\n\nexport async function hasOngoingOrdersForAddress(addressId: number): Promise {\n const ongoingOrders = await db.select({\n orderId: orders.id,\n })\n .from(orders)\n .innerJoin(orderStatus, eq(orders.id, orderStatus.orderId))\n .innerJoin(deliverySlotInfo, eq(orders.slotId, deliverySlotInfo.id))\n .where(and(\n eq(orders.addressId, addressId),\n eq(orderStatus.isCancelled, false),\n gte(deliverySlotInfo.deliveryTime, new Date())\n ))\n .limit(1)\n\n return ongoingOrders.length > 0\n}\n", "import { db } from '../db/db_index'\nimport { homeBanners } from '../db/schema'\nimport { asc, isNotNull } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserBanner } from '@packages/shared'\n\ntype BannerRow = InferSelectModel\n\nconst mapBanner = (banner: BannerRow): UserBanner => ({\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description ?? null,\n productIds: banner.productIds ?? null,\n redirectUrl: banner.redirectUrl ?? null,\n serialNum: banner.serialNum ?? null,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n})\n\nexport async function getActiveBanners(): Promise {\n const banners = await db.query.homeBanners.findMany({\n where: isNotNull(homeBanners.serialNum),\n orderBy: asc(homeBanners.serialNum),\n })\n\n return banners.map(mapBanner)\n}\n", "import { db } from '../db/db_index'\nimport { cartItems, productInfo, units } from '../db/schema'\nimport { and, eq, sql } from 'drizzle-orm'\nimport type { UserCartItem } from '@packages/shared'\n\nconst getStringArray = (value: unknown): string[] => {\n if (!Array.isArray(value)) return []\n return value.map((item) => String(item))\n}\n\nexport async function getCartItemsWithProducts(userId: number): Promise {\n const cartItemsWithProducts = await db\n .select({\n cartId: cartItems.id,\n productId: productInfo.id,\n productName: productInfo.name,\n productPrice: productInfo.price,\n productImages: productInfo.images,\n productQuantity: productInfo.productQuantity,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n quantity: cartItems.quantity,\n addedAt: cartItems.addedAt,\n })\n .from(cartItems)\n .innerJoin(productInfo, eq(cartItems.productId, productInfo.id))\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(eq(cartItems.userId, userId))\n\n return cartItemsWithProducts.map((item) => {\n const priceValue = item.productPrice ?? '0'\n const quantityValue = item.quantity ?? '0'\n return {\n id: item.cartId,\n productId: item.productId,\n quantity: parseFloat(quantityValue),\n addedAt: item.addedAt,\n product: {\n id: item.productId,\n name: item.productName,\n price: priceValue.toString(),\n productQuantity: item.productQuantity,\n unit: item.unitShortNotation,\n isOutOfStock: item.isOutOfStock,\n images: getStringArray(item.productImages),\n },\n subtotal: parseFloat(priceValue.toString()) * parseFloat(quantityValue),\n }\n })\n}\n\nexport async function getProductById(productId: number) {\n return db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n })\n}\n\nexport async function getCartItemByUserProduct(userId: number, productId: number) {\n return db.query.cartItems.findFirst({\n where: and(eq(cartItems.userId, userId), eq(cartItems.productId, productId)),\n })\n}\n\nexport async function incrementCartItemQuantity(itemId: number, quantity: number): Promise {\n await db.update(cartItems)\n .set({\n quantity: sql`${cartItems.quantity} + ${quantity}`,\n })\n .where(eq(cartItems.id, itemId))\n}\n\nexport async function insertCartItem(userId: number, productId: number, quantity: number): Promise {\n await db.insert(cartItems).values({\n userId,\n productId,\n quantity: quantity.toString(),\n })\n}\n\nexport async function updateCartItemQuantity(userId: number, itemId: number, quantity: number) {\n const [updatedItem] = await db.update(cartItems)\n .set({ quantity: quantity.toString() })\n .where(and(eq(cartItems.id, itemId), eq(cartItems.userId, userId)))\n .returning({ id: cartItems.id })\n\n return !!updatedItem\n}\n\nexport async function deleteCartItem(userId: number, itemId: number): Promise {\n const [deletedItem] = await db.delete(cartItems)\n .where(and(eq(cartItems.id, itemId), eq(cartItems.userId, userId)))\n .returning({ id: cartItems.id })\n\n return !!deletedItem\n}\n\nexport async function clearUserCart(userId: number): Promise {\n await db.delete(cartItems).where(eq(cartItems.userId, userId))\n}\n", "import { db } from '../db/db_index'\nimport { complaints } from '../db/schema'\nimport { asc, eq } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserComplaint } from '@packages/shared'\n\ntype ComplaintRow = InferSelectModel\n\nexport async function getUserComplaints(userId: number): Promise {\n const userComplaints = await db\n .select({\n id: complaints.id,\n complaintBody: complaints.complaintBody,\n response: complaints.response,\n isResolved: complaints.isResolved,\n createdAt: complaints.createdAt,\n orderId: complaints.orderId,\n })\n .from(complaints)\n .where(eq(complaints.userId, userId))\n .orderBy(asc(complaints.createdAt))\n\n return userComplaints.map((complaint) => ({\n id: complaint.id,\n complaintBody: complaint.complaintBody,\n response: complaint.response ?? null,\n isResolved: complaint.isResolved,\n createdAt: complaint.createdAt,\n orderId: complaint.orderId ?? null,\n }))\n}\n\nexport async function createComplaint(\n userId: number,\n orderId: number | null,\n complaintBody: string,\n images?: string[] | null\n): Promise {\n await db.insert(complaints).values({\n userId,\n orderId,\n complaintBody,\n images: images || null,\n })\n}\n", "import { db } from '../db/db_index'\nimport { productInfo, storeInfo, units } from '../db/schema'\nimport { and, eq, sql } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserStoreDetailData, UserStoreProductData, UserStoreSummaryData, StoreSummary } from '@packages/shared'\n\ntype StoreRow = InferSelectModel\ntype StoreProductRow = {\n id: number\n name: string\n shortDescription: string | null\n price: string | null\n marketPrice: string | null\n images: unknown\n isOutOfStock: boolean\n incrementStep: number\n unitShortNotation: string\n productQuantity: number\n}\n\nconst getStringArray = (value: unknown): string[] | null => {\n if (!Array.isArray(value)) return null\n return value.map((item) => String(item))\n}\n\nexport async function getStoreSummaries(): Promise {\n const storesData = await db\n .select({\n id: storeInfo.id,\n name: storeInfo.name,\n description: storeInfo.description,\n imageUrl: storeInfo.imageUrl,\n productCount: sql`count(${productInfo.id})`.as('productCount'),\n })\n .from(storeInfo)\n .leftJoin(\n productInfo,\n and(eq(productInfo.storeId, storeInfo.id), eq(productInfo.isSuspended, false))\n )\n .groupBy(storeInfo.id)\n\n const storesWithDetails = await Promise.all(\n storesData.map(async (store) => {\n const sampleProducts = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n images: productInfo.images,\n })\n .from(productInfo)\n .where(and(eq(productInfo.storeId, store.id), eq(productInfo.isSuspended, false)))\n .limit(3)\n\n return {\n id: store.id,\n name: store.name,\n description: store.description ?? null,\n imageUrl: store.imageUrl ?? null,\n productCount: store.productCount || 0,\n sampleProducts: sampleProducts.map((product) => ({\n id: product.id,\n name: product.name,\n images: getStringArray(product.images),\n })),\n }\n })\n )\n\n return storesWithDetails\n}\n\nexport async function getStoreDetail(storeId: number): Promise {\n const storeData = await db.query.storeInfo.findFirst({\n where: eq(storeInfo.id, storeId),\n columns: {\n id: true,\n name: true,\n description: true,\n imageUrl: true,\n },\n })\n\n if (!storeData) {\n return null\n }\n\n const productsData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n incrementStep: productInfo.incrementStep,\n unitShortNotation: units.shortNotation,\n productQuantity: productInfo.productQuantity,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(and(eq(productInfo.storeId, storeId), eq(productInfo.isSuspended, false)))\n\n const products = productsData.map((product: StoreProductRow): UserStoreProductData => ({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription ?? null,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n incrementStep: product.incrementStep,\n unit: product.unitShortNotation,\n unitNotation: product.unitShortNotation,\n images: getStringArray(product.images),\n isOutOfStock: product.isOutOfStock,\n productQuantity: product.productQuantity,\n }))\n\n return {\n store: {\n id: storeData.id,\n name: storeData.name,\n description: storeData.description ?? null,\n imageUrl: storeData.imageUrl ?? null,\n },\n products,\n }\n}\n\n/**\n * Get simple store summary (id, name, description only)\n * Used for common API endpoints\n */\nexport async function getStoresSummary(): Promise {\n return db.query.storeInfo.findMany({\n columns: {\n id: true,\n name: true,\n description: true,\n },\n })\n}\n", "import { db } from '../db/db_index'\nimport { deliverySlotInfo, productInfo, productReviews, productSlots, productTags, specialDeals, storeInfo, units, users } from '../db/schema'\nimport { and, desc, eq, gt, inArray, sql } from 'drizzle-orm'\nimport type { UserProductDetailData, UserProductReview } from '@packages/shared'\n\nconst getStringArray = (value: unknown): string[] | null => {\n if (!Array.isArray(value)) return null\n return value.map((item) => String(item))\n}\n\nexport async function getProductDetailById(productId: number): Promise {\n const productData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n longDescription: productInfo.longDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n storeId: productInfo.storeId,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n productQuantity: productInfo.productQuantity,\n isFlashAvailable: productInfo.isFlashAvailable,\n flashPrice: productInfo.flashPrice,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(eq(productInfo.id, productId))\n .limit(1)\n\n if (productData.length === 0) {\n return null\n }\n\n const product = productData[0]\n\n const storeData = product.storeId ? await db.query.storeInfo.findFirst({\n where: eq(storeInfo.id, product.storeId),\n columns: { id: true, name: true, description: true },\n }) : null\n\n const deliverySlotsData = await db\n .select({\n id: deliverySlotInfo.id,\n deliveryTime: deliverySlotInfo.deliveryTime,\n freezeTime: deliverySlotInfo.freezeTime,\n })\n .from(productSlots)\n .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n .where(\n and(\n eq(productSlots.productId, productId),\n eq(deliverySlotInfo.isActive, true),\n eq(deliverySlotInfo.isCapacityFull, false),\n gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`),\n gt(deliverySlotInfo.freezeTime, sql`CURRENT_TIMESTAMP`)\n )\n )\n .orderBy(deliverySlotInfo.deliveryTime)\n\n const specialDealsData = await db\n .select({\n quantity: specialDeals.quantity,\n price: specialDeals.price,\n validTill: specialDeals.validTill,\n })\n .from(specialDeals)\n .where(\n and(\n eq(specialDeals.productId, productId),\n gt(specialDeals.validTill, sql`CURRENT_TIMESTAMP`)\n )\n )\n .orderBy(specialDeals.quantity)\n\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription ?? null,\n longDescription: product.longDescription ?? null,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n unitNotation: product.unitShortNotation,\n images: getStringArray(product.images),\n isOutOfStock: product.isOutOfStock,\n store: storeData ? {\n id: storeData.id,\n name: storeData.name,\n description: storeData.description ?? null,\n } : null,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n isFlashAvailable: product.isFlashAvailable,\n flashPrice: product.flashPrice?.toString() || null,\n deliverySlots: deliverySlotsData,\n specialDeals: specialDealsData.map((deal) => ({\n quantity: String(deal.quantity ?? '0'),\n price: String(deal.price ?? '0'),\n validTill: deal.validTill,\n })),\n }\n}\n\nexport async function getProductReviews(productId: number, limit: number, offset: number) {\n const reviews = await db\n .select({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n userName: users.name,\n })\n .from(productReviews)\n .innerJoin(users, eq(productReviews.userId, users.id))\n .where(eq(productReviews.productId, productId))\n .orderBy(desc(productReviews.reviewTime))\n .limit(limit)\n .offset(offset)\n\n const totalCountResult = await db\n .select({ count: sql`count(*)` })\n .from(productReviews)\n .where(eq(productReviews.productId, productId))\n\n const totalCount = Number(totalCountResult[0].count)\n\n const mappedReviews: UserProductReview[] = reviews.map((review) => ({\n id: review.id,\n reviewBody: review.reviewBody,\n ratings: review.ratings,\n imageUrls: getStringArray(review.imageUrls),\n reviewTime: review.reviewTime,\n userName: review.userName ?? null,\n }))\n\n return {\n reviews: mappedReviews,\n totalCount,\n }\n}\n\nexport async function getProductById(productId: number) {\n return db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n })\n}\n\nexport async function createProductReview(\n userId: number,\n productId: number,\n reviewBody: string,\n ratings: number,\n imageUrls: string[]\n): Promise {\n const [newReview] = await db.insert(productReviews).values({\n userId,\n productId,\n reviewBody,\n ratings,\n imageUrls,\n }).returning({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n })\n\n return {\n id: newReview.id,\n reviewBody: newReview.reviewBody,\n ratings: newReview.ratings,\n imageUrls: getStringArray(newReview.imageUrls),\n reviewTime: newReview.reviewTime,\n userName: null,\n }\n}\n\nexport interface ProductSummaryData {\n id: number\n name: string\n shortDescription: string | null\n price: string\n marketPrice: string | null\n images: unknown\n isOutOfStock: boolean\n unitShortNotation: string\n productQuantity: number\n}\n\nexport async function getAllProductsWithUnits(tagId?: number): Promise {\n let productIds: number[] | null = null\n\n // If tagId is provided, get products that have this tag\n if (tagId) {\n const taggedProducts = await db\n .select({ productId: productTags.productId })\n .from(productTags)\n .where(eq(productTags.tagId, tagId))\n\n productIds = taggedProducts.map(tp => tp.productId)\n }\n\n let whereCondition = undefined\n\n // Filter by product IDs if tag filtering is applied\n if (productIds && productIds.length > 0) {\n whereCondition = inArray(productInfo.id, productIds)\n }\n\n const results = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n productQuantity: productInfo.productQuantity,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(whereCondition)\n\n return results.map((product) => ({\n ...product,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n }))\n}\n\n/**\n * Get all suspended product IDs\n */\nexport async function getSuspendedProductIds(): Promise {\n const suspendedProducts = await db\n .select({ id: productInfo.id })\n .from(productInfo)\n .where(eq(productInfo.isSuspended, true))\n\n return suspendedProducts.map(sp => sp.id)\n}\n\n/**\n * Get next delivery date for a product (with capacity check)\n * This version filters by both isActive AND isCapacityFull\n */\nexport async function getNextDeliveryDateWithCapacity(productId: number): Promise {\n const result = await db\n .select({ deliveryTime: deliverySlotInfo.deliveryTime })\n .from(productSlots)\n .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n .where(\n and(\n eq(productSlots.productId, productId),\n eq(deliverySlotInfo.isActive, true),\n eq(deliverySlotInfo.isCapacityFull, false),\n gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`)\n )\n )\n .orderBy(deliverySlotInfo.deliveryTime)\n .limit(1)\n\n return result[0]?.deliveryTime || null\n}\n", "import { db } from '../db/db_index'\nimport { deliverySlotInfo, productInfo } from '../db/schema'\nimport { asc, eq } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserDeliverySlot, UserSlotAvailability } from '@packages/shared'\n\ntype SlotRow = InferSelectModel\n\nconst mapSlot = (slot: SlotRow): UserDeliverySlot => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isFlash: slot.isFlash,\n isCapacityFull: slot.isCapacityFull,\n deliverySequence: slot.deliverySequence,\n groupIds: slot.groupIds,\n})\n\nexport async function getActiveSlotsList(): Promise {\n const slots = await db.query.deliverySlotInfo.findMany({\n where: eq(deliverySlotInfo.isActive, true),\n orderBy: asc(deliverySlotInfo.deliveryTime),\n })\n\n return slots.map(mapSlot)\n}\n\nexport async function getProductAvailability(): Promise {\n const products = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n isOutOfStock: productInfo.isOutOfStock,\n isFlashAvailable: productInfo.isFlashAvailable,\n })\n .from(productInfo)\n .where(eq(productInfo.isSuspended, false))\n\n return products.map((product) => ({\n id: product.id,\n name: product.name,\n isOutOfStock: product.isOutOfStock,\n isFlashAvailable: product.isFlashAvailable,\n }))\n}\n", "import { db } from '../db/db_index'\nimport { orders, payments, orderStatus } from '../db/schema'\nimport { eq } from 'drizzle-orm'\n\nexport async function getOrderById(orderId: number) {\n return db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n })\n}\n\nexport async function getPaymentByOrderId(orderId: number) {\n return db.query.payments.findFirst({\n where: eq(payments.orderId, orderId),\n })\n}\n\nexport async function getPaymentByMerchantOrderId(merchantOrderId: string) {\n return db.query.payments.findFirst({\n where: eq(payments.merchantOrderId, merchantOrderId),\n })\n}\n\nexport async function updatePaymentSuccess(merchantOrderId: string, payload: unknown) {\n const [updatedPayment] = await db\n .update(payments)\n .set({\n status: 'success',\n payload,\n })\n .where(eq(payments.merchantOrderId, merchantOrderId))\n .returning({\n id: payments.id,\n orderId: payments.orderId,\n })\n\n return updatedPayment || null\n}\n\nexport async function updateOrderPaymentStatus(orderId: number, status: 'pending' | 'success' | 'cod' | 'failed') {\n await db\n .update(orderStatus)\n .set({ paymentStatus: status })\n .where(eq(orderStatus.orderId, orderId))\n}\n\nexport async function markPaymentFailed(paymentId: number) {\n await db\n .update(payments)\n .set({ status: 'failed' })\n .where(eq(payments.id, paymentId))\n}\n", "import { db } from '../db/db_index'\nimport {\n users,\n userCreds,\n userDetails,\n addresses,\n cartItems,\n complaints,\n couponApplicableUsers,\n couponUsage,\n notifCreds,\n notifications,\n orderItems,\n orderStatus,\n orders,\n payments,\n refunds,\n productReviews,\n reservedCoupons,\n} from '../db/schema'\nimport { eq } from 'drizzle-orm'\n\nexport async function getUserByEmail(email: string) {\n const [user] = await db.select().from(users).where(eq(users.email, email)).limit(1)\n return user || null\n}\n\nexport async function getUserByMobile(mobile: string) {\n const [user] = await db.select().from(users).where(eq(users.mobile, mobile)).limit(1)\n return user || null\n}\n\nexport async function getUserById(userId: number) {\n const [user] = await db.select().from(users).where(eq(users.id, userId)).limit(1)\n return user || null\n}\n\nexport async function getUserCreds(userId: number) {\n const [creds] = await db.select().from(userCreds).where(eq(userCreds.userId, userId)).limit(1)\n return creds || null\n}\n\nexport async function getUserDetails(userId: number) {\n const [details] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1)\n return details || null\n}\n\nexport async function isUserSuspended(userId: number): Promise {\n const details = await getUserDetails(userId)\n return details?.isSuspended ?? false\n}\n\nexport async function createUserWithProfile(input: {\n name: string\n email: string\n mobile: string\n hashedPassword: string\n profileImage?: string | null\n}) {\n return db.transaction(async (tx) => {\n // Create user\n const [user] = await tx.insert(users).values({\n name: input.name,\n email: input.email,\n mobile: input.mobile,\n }).returning()\n\n // Create user credentials\n await tx.insert(userCreds).values({\n userId: user.id,\n userPassword: input.hashedPassword,\n })\n\n // Create user details with profile image\n await tx.insert(userDetails).values({\n userId: user.id,\n profileImage: input.profileImage || null,\n })\n\n return user\n })\n}\n\nexport async function getUserDetailsByUserId(userId: number) {\n const [details] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1)\n return details || null\n}\n\nexport async function updateUserProfile(userId: number, data: {\n name?: string\n email?: string\n mobile?: string\n hashedPassword?: string\n profileImage?: string\n bio?: string\n dateOfBirth?: Date | null\n gender?: string\n occupation?: string\n}) {\n return db.transaction(async (tx) => {\n // Update user table\n const userUpdate: any = {}\n if (data.name !== undefined) userUpdate.name = data.name\n if (data.email !== undefined) userUpdate.email = data.email\n if (data.mobile !== undefined) userUpdate.mobile = data.mobile\n\n if (Object.keys(userUpdate).length > 0) {\n await tx.update(users).set(userUpdate).where(eq(users.id, userId))\n }\n\n // Update password if provided\n if (data.hashedPassword) {\n await tx.update(userCreds).set({\n userPassword: data.hashedPassword,\n }).where(eq(userCreds.userId, userId))\n }\n\n // Update or insert user details\n const detailsUpdate: any = {}\n if (data.bio !== undefined) detailsUpdate.bio = data.bio\n if (data.dateOfBirth !== undefined) detailsUpdate.dateOfBirth = data.dateOfBirth\n if (data.gender !== undefined) detailsUpdate.gender = data.gender\n if (data.occupation !== undefined) detailsUpdate.occupation = data.occupation\n if (data.profileImage !== undefined) detailsUpdate.profileImage = data.profileImage\n detailsUpdate.updatedAt = new Date()\n\n const [existingDetails] = await tx.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1)\n\n if (existingDetails) {\n await tx.update(userDetails).set(detailsUpdate).where(eq(userDetails.userId, userId))\n } else {\n await tx.insert(userDetails).values({\n userId,\n ...detailsUpdate,\n createdAt: new Date(),\n })\n }\n\n // Return updated user\n const [user] = await tx.select().from(users).where(eq(users.id, userId)).limit(1)\n return user\n })\n}\n\nexport async function createUserWithCreds(input: {\n name: string\n email: string\n mobile: string\n hashedPassword: string\n}) {\n return db.transaction(async (tx) => {\n const [user] = await tx.insert(users).values({\n name: input.name,\n email: input.email,\n mobile: input.mobile,\n }).returning()\n\n await tx.insert(userCreds).values({\n userId: user.id,\n userPassword: input.hashedPassword,\n })\n\n return user\n })\n}\n\nexport async function createUserWithMobile(mobile: string) {\n const [user] = await db.insert(users).values({\n name: null,\n email: null,\n mobile,\n }).returning()\n\n return user\n}\n\nexport async function upsertUserPassword(userId: number, hashedPassword: string) {\n try {\n await db.insert(userCreds).values({\n userId,\n userPassword: hashedPassword,\n })\n return\n } catch (error: any) {\n if (error.code === '23505') {\n await db.update(userCreds).set({\n userPassword: hashedPassword,\n }).where(eq(userCreds.userId, userId))\n return\n }\n throw error\n }\n}\n\nexport async function deleteUserAccount(userId: number) {\n await db.transaction(async (tx) => {\n await tx.delete(notifCreds).where(eq(notifCreds.userId, userId))\n await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.userId, userId))\n await tx.delete(couponUsage).where(eq(couponUsage.userId, userId))\n await tx.delete(complaints).where(eq(complaints.userId, userId))\n await tx.delete(cartItems).where(eq(cartItems.userId, userId))\n await tx.delete(notifications).where(eq(notifications.userId, userId))\n await tx.delete(productReviews).where(eq(productReviews.userId, userId))\n\n await tx.update(reservedCoupons)\n .set({ redeemedBy: null })\n .where(eq(reservedCoupons.redeemedBy, userId))\n\n const userOrders = await tx\n .select({ id: orders.id })\n .from(orders)\n .where(eq(orders.userId, userId))\n\n for (const order of userOrders) {\n await tx.delete(orderItems).where(eq(orderItems.orderId, order.id))\n await tx.delete(orderStatus).where(eq(orderStatus.orderId, order.id))\n await tx.delete(payments).where(eq(payments.orderId, order.id))\n await tx.delete(refunds).where(eq(refunds.orderId, order.id))\n await tx.delete(couponUsage).where(eq(couponUsage.orderId, order.id))\n await tx.delete(complaints).where(eq(complaints.orderId, order.id))\n }\n\n await tx.delete(orders).where(eq(orders.userId, userId))\n await tx.delete(addresses).where(eq(addresses.userId, userId))\n await tx.delete(userDetails).where(eq(userDetails.userId, userId))\n await tx.delete(userCreds).where(eq(userCreds.userId, userId))\n await tx.delete(users).where(eq(users.id, userId))\n })\n}\n", "import { db } from '../db/db_index'\nimport {\n couponApplicableProducts,\n couponApplicableUsers,\n couponUsage,\n coupons,\n reservedCoupons,\n} from '../db/schema'\nimport { and, eq, gt, isNull, or } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserCoupon, UserCouponApplicableProduct, UserCouponApplicableUser, UserCouponUsage, UserCouponWithRelations } from '@packages/shared'\n\ntype CouponRow = InferSelectModel\ntype CouponUsageRow = InferSelectModel\ntype CouponApplicableUserRow = InferSelectModel\ntype CouponApplicableProductRow = InferSelectModel\ntype ReservedCouponRow = InferSelectModel\n\nconst mapCoupon = (coupon: CouponRow): UserCoupon => ({\n id: coupon.id,\n couponCode: coupon.couponCode,\n isUserBased: coupon.isUserBased,\n discountPercent: coupon.discountPercent ? coupon.discountPercent.toString() : null,\n flatDiscount: coupon.flatDiscount ? coupon.flatDiscount.toString() : null,\n minOrder: coupon.minOrder ? coupon.minOrder.toString() : null,\n productIds: coupon.productIds,\n maxValue: coupon.maxValue ? coupon.maxValue.toString() : null,\n isApplyForAll: coupon.isApplyForAll,\n validTill: coupon.validTill ?? null,\n maxLimitForUser: coupon.maxLimitForUser ?? null,\n isInvalidated: coupon.isInvalidated,\n exclusiveApply: coupon.exclusiveApply,\n createdAt: coupon.createdAt,\n})\n\nconst mapUsage = (usage: CouponUsageRow): UserCouponUsage => ({\n id: usage.id,\n userId: usage.userId,\n couponId: usage.couponId,\n orderId: usage.orderId ?? null,\n orderItemId: usage.orderItemId ?? null,\n usedAt: usage.usedAt,\n})\n\nconst mapApplicableUser = (applicable: CouponApplicableUserRow): UserCouponApplicableUser => ({\n id: applicable.id,\n couponId: applicable.couponId,\n userId: applicable.userId,\n})\n\nconst mapApplicableProduct = (applicable: CouponApplicableProductRow): UserCouponApplicableProduct => ({\n id: applicable.id,\n couponId: applicable.couponId,\n productId: applicable.productId,\n})\n\nconst mapCouponWithRelations = (coupon: CouponRow & {\n usages: CouponUsageRow[]\n applicableUsers: CouponApplicableUserRow[]\n applicableProducts: CouponApplicableProductRow[]\n}): UserCouponWithRelations => ({\n ...mapCoupon(coupon),\n usages: coupon.usages.map(mapUsage),\n applicableUsers: coupon.applicableUsers.map(mapApplicableUser),\n applicableProducts: coupon.applicableProducts.map(mapApplicableProduct),\n})\n\nexport async function getActiveCouponsWithRelations(userId: number): Promise {\n const allCoupons = await db.query.coupons.findMany({\n where: and(\n eq(coupons.isInvalidated, false),\n or(\n isNull(coupons.validTill),\n gt(coupons.validTill, new Date())\n )\n ),\n with: {\n usages: {\n where: eq(couponUsage.userId, userId),\n },\n applicableUsers: true,\n applicableProducts: true,\n },\n })\n\n return allCoupons.map(mapCouponWithRelations)\n}\n\nexport async function getAllCouponsWithRelations(userId: number): Promise {\n const allCoupons = await db.query.coupons.findMany({\n with: {\n usages: {\n where: eq(couponUsage.userId, userId),\n },\n applicableUsers: true,\n applicableProducts: true,\n },\n })\n\n return allCoupons.map(mapCouponWithRelations)\n}\n\nexport async function getReservedCouponByCode(secretCode: string): Promise {\n const reserved = await db.query.reservedCoupons.findFirst({\n where: and(\n eq(reservedCoupons.secretCode, secretCode.toUpperCase()),\n eq(reservedCoupons.isRedeemed, false)\n ),\n })\n\n return reserved || null\n}\n\nexport async function redeemReservedCoupon(userId: number, reservedCoupon: ReservedCouponRow): Promise {\n const couponResult = await db.transaction(async (tx) => {\n const [coupon] = await tx.insert(coupons).values({\n couponCode: reservedCoupon.couponCode,\n isUserBased: true,\n discountPercent: reservedCoupon.discountPercent,\n flatDiscount: reservedCoupon.flatDiscount,\n minOrder: reservedCoupon.minOrder,\n productIds: reservedCoupon.productIds,\n maxValue: reservedCoupon.maxValue,\n isApplyForAll: false,\n validTill: reservedCoupon.validTill,\n maxLimitForUser: reservedCoupon.maxLimitForUser,\n exclusiveApply: reservedCoupon.exclusiveApply,\n createdBy: reservedCoupon.createdBy,\n }).returning()\n\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId,\n })\n\n await tx.update(reservedCoupons).set({\n isRedeemed: true,\n redeemedBy: userId,\n redeemedAt: new Date(),\n }).where(eq(reservedCoupons.id, reservedCoupon.id))\n\n return coupon\n })\n\n return mapCoupon(couponResult)\n}\n", "import { db } from '../db/db_index'\nimport { notifCreds, unloggedUserTokens, userCreds, userDetails, users } from '../db/schema'\nimport { and, eq } from 'drizzle-orm'\n\nexport async function getUserById(userId: number) {\n const [user] = await db.select().from(users).where(eq(users.id, userId)).limit(1)\n return user || null\n}\n\nexport async function getUserDetailByUserId(userId: number) {\n const [detail] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1)\n return detail || null\n}\n\nexport async function getUserWithCreds(userId: number) {\n const result = await db\n .select()\n .from(users)\n .leftJoin(userCreds, eq(users.id, userCreds.userId))\n .where(eq(users.id, userId))\n .limit(1)\n\n if (result.length === 0) return null\n return {\n user: result[0].users,\n creds: result[0].user_creds,\n }\n}\n\nexport async function getNotifCred(userId: number, token: string) {\n return db.query.notifCreds.findFirst({\n where: and(eq(notifCreds.userId, userId), eq(notifCreds.token, token)),\n })\n}\n\nexport async function upsertNotifCred(userId: number, token: string): Promise {\n const existing = await getNotifCred(userId, token)\n if (existing) {\n await db.update(notifCreds)\n .set({ lastVerified: new Date() })\n .where(eq(notifCreds.id, existing.id))\n return\n }\n\n await db.insert(notifCreds).values({\n userId,\n token,\n lastVerified: new Date(),\n })\n}\n\nexport async function deleteUnloggedToken(token: string): Promise {\n await db.delete(unloggedUserTokens).where(eq(unloggedUserTokens.token, token))\n}\n\nexport async function getUnloggedToken(token: string) {\n return db.query.unloggedUserTokens.findFirst({\n where: eq(unloggedUserTokens.token, token),\n })\n}\n\nexport async function upsertUnloggedToken(token: string): Promise {\n const existing = await getUnloggedToken(token)\n if (existing) {\n await db.update(unloggedUserTokens)\n .set({ lastVerified: new Date() })\n .where(eq(unloggedUserTokens.id, existing.id))\n return\n }\n\n await db.insert(unloggedUserTokens).values({\n token,\n lastVerified: new Date(),\n })\n}\n", "import { db } from '../db/db_index'\nimport {\n orders,\n orderItems,\n orderStatus,\n addresses,\n productInfo,\n paymentInfoTable,\n coupons,\n couponUsage,\n cartItems,\n refunds,\n units,\n userDetails,\n deliverySlotInfo,\n} from '../db/schema'\nimport { and, eq, inArray, desc, gte, sql } from 'drizzle-orm'\nimport type {\n UserOrderSummary,\n UserOrderDetail,\n UserRecentProduct,\n} from '@packages/shared'\n\nexport interface OrderItemInput {\n productId: number\n quantity: number\n slotId: number | null\n}\n\nexport interface PlaceOrderInput {\n userId: number\n selectedItems: OrderItemInput[]\n addressId: number\n paymentMethod: 'online' | 'cod'\n couponId?: number\n userNotes?: string\n isFlash?: boolean\n}\n\nexport interface OrderGroupData {\n slotId: number | null\n items: Array<{\n productId: number\n quantity: number\n slotId: number | null\n product: typeof productInfo.$inferSelect\n }>\n}\n\nexport interface PlacedOrder {\n id: number\n userId: number\n addressId: number\n slotId: number | null\n totalAmount: string\n deliveryCharge: string\n isCod: boolean\n isOnlinePayment: boolean\n paymentInfoId: number | null\n readableId: number\n userNotes: string | null\n orderGroupId: string\n orderGroupProportion: string\n isFlashDelivery: boolean\n createdAt: Date\n}\n\nexport interface OrderWithRelations {\n id: number\n userId: number\n addressId: number\n slotId: number | null\n totalAmount: string\n deliveryCharge: string\n isCod: boolean\n isOnlinePayment: boolean\n isFlashDelivery: boolean\n userNotes: string | null\n createdAt: Date\n orderItems: Array<{\n id: number\n productId: number\n quantity: string\n price: string\n discountedPrice: string | null\n is_packaged: boolean\n product: {\n id: number\n name: string\n images: unknown\n }\n }>\n slot: {\n deliveryTime: Date\n } | null\n paymentInfo: {\n id: number\n status: string\n } | null\n orderStatus: Array<{\n id: number\n isCancelled: boolean\n isDelivered: boolean\n paymentStatus: string\n cancelReason: string | null\n }>\n refunds: Array<{\n refundStatus: string\n refundAmount: string | null\n }>\n}\n\nexport interface OrderDetailWithRelations {\n id: number\n userId: number\n addressId: number\n slotId: number | null\n totalAmount: string\n deliveryCharge: string\n isCod: boolean\n isOnlinePayment: boolean\n isFlashDelivery: boolean\n userNotes: string | null\n createdAt: Date\n orderItems: Array<{\n id: number\n productId: number\n quantity: string\n price: string\n discountedPrice: string | null\n is_packaged: boolean\n product: {\n id: number\n name: string\n images: unknown\n }\n }>\n slot: {\n deliveryTime: Date\n } | null\n paymentInfo: {\n id: number\n status: string\n } | null\n orderStatus: Array<{\n id: number\n isCancelled: boolean\n isDelivered: boolean\n paymentStatus: string\n cancelReason: string | null\n }>\n refunds: Array<{\n refundStatus: string\n refundAmount: string | null\n }>\n}\n\nexport interface CouponValidationResult {\n id: number\n couponCode: string\n isInvalidated: boolean\n validTill: Date | null\n maxLimitForUser: number | null\n minOrder: string | null\n discountPercent: string | null\n flatDiscount: string | null\n maxValue: string | null\n usages: Array<{\n id: number\n userId: number\n }>\n}\n\nexport interface CouponUsageWithCoupon {\n id: number\n couponId: number\n orderId: number | null\n coupon: {\n id: number\n couponCode: string\n discountPercent: string | null\n flatDiscount: string | null\n maxValue: string | null\n }\n}\n\nexport async function validateAndGetCoupon(\n couponId: number | undefined,\n userId: number,\n totalAmount: number\n): Promise {\n if (!couponId) return null\n\n const coupon = await db.query.coupons.findFirst({\n where: eq(coupons.id, couponId),\n with: {\n usages: { where: eq(couponUsage.userId, userId) },\n },\n })\n\n if (!coupon) throw new Error('Invalid coupon')\n if (coupon.isInvalidated) throw new Error('Coupon is no longer valid')\n if (coupon.validTill && new Date(coupon.validTill) < new Date())\n throw new Error('Coupon has expired')\n if (\n coupon.maxLimitForUser &&\n coupon.usages.length >= coupon.maxLimitForUser\n )\n throw new Error('Coupon usage limit exceeded')\n if (\n coupon.minOrder &&\n parseFloat(coupon.minOrder.toString()) > totalAmount\n )\n throw new Error('Order amount does not meet coupon minimum requirement')\n\n return coupon as CouponValidationResult\n}\n\nexport function applyDiscountToOrder(\n orderTotal: number,\n appliedCoupon: CouponValidationResult | null,\n proportion: number\n): { finalOrderTotal: number; orderGroupProportion: number } {\n let finalOrderTotal = orderTotal\n \n if (appliedCoupon) {\n if (appliedCoupon.discountPercent) {\n const discount = Math.min(\n (orderTotal *\n parseFloat(appliedCoupon.discountPercent.toString())) /\n 100,\n appliedCoupon.maxValue\n ? parseFloat(appliedCoupon.maxValue.toString()) * proportion\n : Infinity\n )\n finalOrderTotal -= discount\n } else if (appliedCoupon.flatDiscount) {\n const discount = Math.min(\n parseFloat(appliedCoupon.flatDiscount.toString()) * proportion,\n appliedCoupon.maxValue\n ? parseFloat(appliedCoupon.maxValue.toString()) * proportion\n : finalOrderTotal\n )\n finalOrderTotal -= discount\n }\n }\n\n return { finalOrderTotal, orderGroupProportion: proportion }\n}\n\nexport async function getAddressByIdAndUser(\n addressId: number,\n userId: number\n) {\n return db.query.addresses.findFirst({\n where: and(eq(addresses.userId, userId), eq(addresses.id, addressId)),\n })\n}\n\nexport async function getProductById(productId: number) {\n return db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n })\n}\n\nexport async function checkUserSuspended(userId: number): Promise {\n const userDetail = await db.query.userDetails.findFirst({\n where: eq(userDetails.userId, userId),\n })\n return userDetail?.isSuspended ?? false\n}\n\nexport async function getSlotCapacityStatus(slotId: number): Promise {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n columns: {\n isCapacityFull: true,\n },\n })\n return slot?.isCapacityFull ?? false\n}\n\nexport async function placeOrderTransaction(params: {\n userId: number\n ordersData: Array<{\n order: Omit\n orderItems: Omit[]\n orderStatus: Omit\n }>\n paymentMethod: 'online' | 'cod'\n totalWithDelivery: number\n}): Promise {\n const { userId, ordersData, paymentMethod } = params\n\n return db.transaction(async (tx) => {\n let sharedPaymentInfoId: number | null = null\n if (paymentMethod === 'online') {\n const [paymentInfo] = await tx\n .insert(paymentInfoTable)\n .values({\n status: 'pending',\n gateway: 'razorpay',\n merchantOrderId: `multi_order_${Date.now()}`,\n })\n .returning()\n sharedPaymentInfoId = paymentInfo.id\n }\n\n const ordersToInsert: Omit[] =\n ordersData.map((od) => ({\n ...od.order,\n paymentInfoId: sharedPaymentInfoId,\n }))\n\n const insertedOrders = await tx.insert(orders).values(ordersToInsert).returning()\n\n const allOrderItems: Omit[] = []\n const allOrderStatuses: Omit[] = []\n\n insertedOrders.forEach((order, index) => {\n const od = ordersData[index]\n od.orderItems.forEach((item) => {\n allOrderItems.push({ ...item, orderId: order.id })\n })\n allOrderStatuses.push({\n ...od.orderStatus,\n orderId: order.id,\n })\n })\n\n await tx.insert(orderItems).values(allOrderItems)\n await tx.insert(orderStatus).values(allOrderStatuses)\n\n return insertedOrders as PlacedOrder[]\n })\n}\n\nexport async function deleteCartItemsForOrder(\n userId: number,\n productIds: number[]\n): Promise {\n await db.delete(cartItems).where(\n and(\n eq(cartItems.userId, userId),\n inArray(cartItems.productId, productIds)\n )\n )\n}\n\nexport async function recordCouponUsage(\n userId: number,\n couponId: number,\n orderId: number\n): Promise {\n await db.insert(couponUsage).values({\n userId,\n couponId,\n orderId,\n orderItemId: null,\n usedAt: new Date(),\n })\n}\n\nexport async function getOrdersWithRelations(\n userId: number,\n offset: number,\n pageSize: number\n): Promise {\n return db.query.orders.findMany({\n where: eq(orders.userId, userId),\n with: {\n orderItems: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n slot: {\n columns: {\n deliveryTime: true,\n },\n },\n paymentInfo: {\n columns: {\n id: true,\n status: true,\n },\n },\n orderStatus: {\n columns: {\n id: true,\n isCancelled: true,\n isDelivered: true,\n paymentStatus: true,\n cancelReason: true,\n },\n },\n refunds: {\n columns: {\n refundStatus: true,\n refundAmount: true,\n },\n },\n },\n orderBy: [desc(orders.createdAt)],\n limit: pageSize,\n offset: offset,\n }) as Promise\n}\n\nexport async function getOrderCount(userId: number): Promise {\n const result = await db\n .select({ count: sql`count(*)` })\n .from(orders)\n .where(eq(orders.userId, userId))\n\n return Number(result[0]?.count ?? 0)\n}\n\nexport async function getOrderByIdWithRelations(\n orderId: number,\n userId: number\n): Promise {\n const order = await db.query.orders.findFirst({\n where: and(eq(orders.id, orderId), eq(orders.userId, userId)),\n with: {\n orderItems: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n slot: {\n columns: {\n deliveryTime: true,\n },\n },\n paymentInfo: {\n columns: {\n id: true,\n status: true,\n },\n },\n orderStatus: {\n columns: {\n id: true,\n isCancelled: true,\n isDelivered: true,\n paymentStatus: true,\n cancelReason: true,\n },\n with: {\n refundCoupon: {\n columns: {\n id: true,\n couponCode: true,\n },\n },\n },\n },\n refunds: {\n columns: {\n refundStatus: true,\n refundAmount: true,\n },\n },\n },\n })\n\n return order as OrderDetailWithRelations | null\n}\n\nexport async function getCouponUsageForOrder(\n orderId: number\n): Promise {\n return db.query.couponUsage.findMany({\n where: eq(couponUsage.orderId, orderId),\n with: {\n coupon: {\n columns: {\n id: true,\n couponCode: true,\n discountPercent: true,\n flatDiscount: true,\n maxValue: true,\n },\n },\n },\n }) as Promise\n}\n\nexport async function getOrderBasic(orderId: number) {\n return db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n orderStatus: {\n columns: {\n id: true,\n isCancelled: true,\n isDelivered: true,\n },\n },\n },\n })\n}\n\nexport async function cancelOrderTransaction(\n orderId: number,\n statusId: number,\n reason: string,\n isCod: boolean\n): Promise {\n await db.transaction(async (tx) => {\n await tx\n .update(orderStatus)\n .set({\n isCancelled: true,\n cancelReason: reason,\n cancellationUserNotes: reason,\n cancellationReviewed: false,\n })\n .where(eq(orderStatus.id, statusId))\n\n const refundStatus = isCod ? 'na' : 'pending'\n\n await tx.insert(refunds).values({\n orderId,\n refundStatus,\n })\n })\n}\n\nexport async function updateOrderNotes(\n orderId: number,\n userNotes: string\n): Promise {\n await db\n .update(orders)\n .set({\n userNotes: userNotes || null,\n })\n .where(eq(orders.id, orderId))\n}\n\nexport async function getRecentlyDeliveredOrderIds(\n userId: number,\n limit: number,\n since: Date\n): Promise {\n const recentOrders = await db\n .select({ id: orders.id })\n .from(orders)\n .innerJoin(orderStatus, eq(orders.id, orderStatus.orderId))\n .where(\n and(\n eq(orders.userId, userId),\n eq(orderStatus.isDelivered, true),\n gte(orders.createdAt, since)\n )\n )\n .orderBy(desc(orders.createdAt))\n .limit(limit)\n\n return recentOrders.map((order) => order.id)\n}\n\nexport async function getProductIdsFromOrders(\n orderIds: number[]\n): Promise {\n const orderItemsResult = await db\n .select({ productId: orderItems.productId })\n .from(orderItems)\n .where(inArray(orderItems.orderId, orderIds))\n\n return [...new Set(orderItemsResult.map((item) => item.productId))]\n}\n\nexport interface RecentProductData {\n id: number\n name: string\n shortDescription: string | null\n price: string\n images: unknown\n isOutOfStock: boolean\n unitShortNotation: string\n incrementStep: number\n}\n\nexport async function getProductsForRecentOrders(\n productIds: number[],\n limit: number\n): Promise {\n const results = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(\n and(\n inArray(productInfo.id, productIds),\n eq(productInfo.isSuspended, false)\n )\n )\n .orderBy(desc(productInfo.createdAt))\n .limit(limit)\n\n return results.map((product) => ({\n ...product,\n price: String(product.price ?? '0'),\n }))\n}\n\n// ============================================================================\n// Post-Order Handler Helpers (for Telegram notifications)\n// ============================================================================\n\nexport interface OrderWithFullData {\n id: number\n totalAmount: string\n isFlashDelivery: boolean\n address: {\n name: string | null\n addressLine1: string | null\n addressLine2: string | null\n city: string | null\n state: string | null\n pincode: string | null\n phone: string | null\n } | null\n orderItems: Array<{\n quantity: string\n product: {\n name: string\n } | null\n }>\n slot: {\n deliveryTime: Date\n } | null\n}\n\nexport async function getOrdersByIdsWithFullData(\n orderIds: number[]\n): Promise {\n return db.query.orders.findMany({\n where: inArray(orders.id, orderIds),\n with: {\n address: {\n columns: {\n name: true,\n addressLine1: true,\n addressLine2: true,\n city: true,\n state: true,\n pincode: true,\n phone: true,\n },\n },\n orderItems: {\n with: {\n product: {\n columns: {\n name: true,\n },\n },\n },\n },\n slot: {\n columns: {\n deliveryTime: true,\n },\n },\n },\n }) as Promise\n}\n\nexport interface OrderWithCancellationData extends OrderWithFullData {\n refunds: Array<{\n refundStatus: string\n }>\n}\n\nexport async function getOrderByIdWithFullData(\n orderId: number\n): Promise {\n return db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n address: {\n columns: {\n name: true,\n addressLine1: true,\n addressLine2: true,\n city: true,\n state: true,\n pincode: true,\n phone: true,\n },\n },\n orderItems: {\n with: {\n product: {\n columns: {\n name: true,\n },\n },\n },\n },\n slot: {\n columns: {\n deliveryTime: true,\n },\n },\n refunds: {\n columns: {\n refundStatus: true,\n },\n },\n },\n }) as Promise\n}\n", "// Store Helpers - Database operations for cache initialization\n// These are used by stores in apps/backend/src/stores/\n\nimport { db } from '../db/db_index'\nimport {\n homeBanners,\n productInfo,\n units,\n productSlots,\n deliverySlotInfo,\n specialDeals,\n storeInfo,\n productTags,\n productTagInfo,\n userIncidents,\n} from '../db/schema'\nimport { eq, and, gt, sql, isNotNull, asc } from 'drizzle-orm'\n\n// ============================================================================\n// BANNER STORE HELPERS\n// ============================================================================\n\nexport interface BannerData {\n id: number\n name: string\n imageUrl: string | null\n serialNum: number | null\n productIds: number[] | null\n createdAt: Date\n}\n\nexport async function getAllBannersForCache(): Promise {\n return db.query.homeBanners.findMany({\n where: isNotNull(homeBanners.serialNum),\n orderBy: asc(homeBanners.serialNum),\n })\n}\n\n// ============================================================================\n// PRODUCT STORE HELPERS\n// ============================================================================\n\nexport interface ProductBasicData {\n id: number\n name: string\n shortDescription: string | null\n longDescription: string | null\n price: string\n marketPrice: string | null\n images: unknown\n isOutOfStock: boolean\n storeId: number | null\n unitShortNotation: string\n incrementStep: number\n productQuantity: number\n isFlashAvailable: boolean\n flashPrice: string | null\n}\n\nexport interface StoreBasicData {\n id: number\n name: string\n description: string | null\n}\n\nexport interface DeliverySlotData {\n productId: number\n id: number\n deliveryTime: Date\n freezeTime: Date\n isCapacityFull: boolean\n}\n\nexport interface SpecialDealData {\n productId: number\n quantity: string\n price: string\n validTill: Date\n}\n\nexport interface ProductTagData {\n productId: number\n tagName: string\n}\n\nexport async function getAllProductsForCache(): Promise {\n const results = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n longDescription: productInfo.longDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n storeId: productInfo.storeId,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n productQuantity: productInfo.productQuantity,\n isFlashAvailable: productInfo.isFlashAvailable,\n flashPrice: productInfo.flashPrice,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n\n return results.map((product) => ({\n ...product,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n flashPrice: product.flashPrice ? String(product.flashPrice) : null,\n }))\n}\n\nexport async function getAllStoresForCache(): Promise {\n return db.query.storeInfo.findMany({\n columns: { id: true, name: true, description: true },\n })\n}\n\nexport async function getAllDeliverySlotsForCache(): Promise {\n return db\n .select({\n productId: productSlots.productId,\n id: deliverySlotInfo.id,\n deliveryTime: deliverySlotInfo.deliveryTime,\n freezeTime: deliverySlotInfo.freezeTime,\n isCapacityFull: deliverySlotInfo.isCapacityFull,\n })\n .from(productSlots)\n .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n .where(\n and(\n eq(deliverySlotInfo.isActive, true),\n eq(deliverySlotInfo.isCapacityFull, false),\n gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`)\n )\n )\n}\n\nexport async function getAllSpecialDealsForCache(): Promise {\n const results = await db\n .select({\n productId: specialDeals.productId,\n quantity: specialDeals.quantity,\n price: specialDeals.price,\n validTill: specialDeals.validTill,\n })\n .from(specialDeals)\n .where(gt(specialDeals.validTill, sql`CURRENT_TIMESTAMP`))\n\n return results.map((deal) => ({\n ...deal,\n quantity: String(deal.quantity ?? '0'),\n price: String(deal.price ?? '0'),\n }))\n}\n\nexport async function getAllProductTagsForCache(): Promise {\n return db\n .select({\n productId: productTags.productId,\n tagName: productTagInfo.tagName,\n })\n .from(productTags)\n .innerJoin(productTagInfo, eq(productTags.tagId, productTagInfo.id))\n}\n\n// ============================================================================\n// PRODUCT TAG STORE HELPERS\n// ============================================================================\n\nexport interface TagBasicData {\n id: number\n tagName: string\n tagDescription: string | null\n imageUrl: string | null\n isDashboardTag: boolean\n relatedStores: unknown\n}\n\nexport interface TagProductMapping {\n tagId: number\n productId: number\n}\n\nexport async function getAllTagsForCache(): Promise {\n return db\n .select({\n id: productTagInfo.id,\n tagName: productTagInfo.tagName,\n tagDescription: productTagInfo.tagDescription,\n imageUrl: productTagInfo.imageUrl,\n isDashboardTag: productTagInfo.isDashboardTag,\n relatedStores: productTagInfo.relatedStores,\n })\n .from(productTagInfo)\n}\n\nexport async function getAllTagProductMappings(): Promise {\n return db\n .select({\n tagId: productTags.tagId,\n productId: productTags.productId,\n })\n .from(productTags)\n}\n\n// ============================================================================\n// SLOT STORE HELPERS\n// ============================================================================\n\nexport interface SlotWithProductsData {\n id: number\n deliveryTime: Date\n freezeTime: Date\n isActive: boolean\n isCapacityFull: boolean\n productSlots: Array<{\n product: {\n id: number\n name: string\n productQuantity: number\n shortDescription: string | null\n price: string\n marketPrice: string | null\n unit: { shortNotation: string } | null\n store: { id: number; name: string; description: string | null } | null\n images: unknown\n isOutOfStock: boolean\n storeId: number | null\n }\n }>\n}\n\nexport async function getAllSlotsWithProductsForCache(): Promise {\n const now = new Date()\n \n return db.query.deliverySlotInfo.findMany({\n where: and(\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, now)\n ),\n with: {\n productSlots: {\n with: {\n product: {\n with: {\n unit: true,\n store: true,\n },\n },\n },\n },\n },\n orderBy: asc(deliverySlotInfo.deliveryTime),\n }) as Promise\n}\n\n// ============================================================================\n// USER NEGATIVITY STORE HELPERS\n// ============================================================================\n\nexport interface UserNegativityData {\n userId: number\n totalNegativityScore: number\n}\n\nexport async function getAllUserNegativityScores(): Promise {\n const results = await db\n .select({\n userId: userIncidents.userId,\n totalNegativityScore: sql`sum(${userIncidents.negativityScore})`,\n })\n .from(userIncidents)\n .groupBy(userIncidents.userId)\n\n return results.map((result) => ({\n userId: result.userId,\n totalNegativityScore: Number(result.totalNegativityScore ?? 0),\n }))\n}\n\nexport async function getUserNegativityScore(userId: number): Promise {\n const [result] = await db\n .select({\n totalNegativityScore: sql`sum(${userIncidents.negativityScore})`,\n })\n .from(userIncidents)\n .where(eq(userIncidents.userId, userId))\n .limit(1)\n\n return Number(result?.totalNegativityScore ?? 0)\n}\n", "import { db } from '../db/db_index'\nimport { productInfo, keyValStore } from '../db/schema'\nimport { inArray, eq } from 'drizzle-orm'\n\n/**\n * Toggle flash delivery availability for specific products\n * @param isAvailable - Whether flash delivery should be available\n * @param productIds - Array of product IDs to update\n */\nexport async function toggleFlashDeliveryForItems(\n isAvailable: boolean,\n productIds: number[]\n): Promise {\n await db\n .update(productInfo)\n .set({ isFlashAvailable: isAvailable })\n .where(inArray(productInfo.id, productIds))\n}\n\n/**\n * Update key-value store\n * @param key - The key to update\n * @param value - The boolean value to set\n */\nexport async function toggleKeyVal(\n key: string,\n value: boolean\n): Promise {\n await db\n .update(keyValStore)\n .set({ value })\n .where(eq(keyValStore.key, key))\n}\n\n/**\n * Get all key-value store constants\n * @returns Array of all key-value pairs\n */\nexport async function getAllKeyValStore(): Promise> {\n return db.select().from(keyValStore)\n}\n", "import { db } from '../db/db_index'\nimport { keyValStore, productInfo } from '../db/schema'\n\n/**\n * Health check - test database connectivity\n * Tries to select from keyValStore first, falls back to productInfo\n */\nexport async function healthCheck(): Promise<{ status: string }> {\n try {\n // Try keyValStore first (smaller table)\n await db.select({ key: keyValStore.key }).from(keyValStore).limit(1)\n return { status: 'ok' }\n } catch {\n // Fallback to productInfo\n await db.select({ name: productInfo.name }).from(productInfo).limit(1)\n return { status: 'ok' }\n }\n}\n", "import { db } from '../db/db_index'\nimport { orders, orderItems, orderStatus, payments, refunds, couponUsage, complaints } from '../db/schema'\nimport { inArray } from 'drizzle-orm'\n\n/**\n * Delete orders and all their related records\n * @param orderIds Array of order IDs to delete\n * @returns Promise\n * @throws Error if deletion fails\n */\nexport async function deleteOrdersWithRelations(orderIds: number[]): Promise {\n if (orderIds.length === 0) {\n return\n }\n\n // Delete child records first (in correct order to avoid FK constraint errors)\n\n // 1. Delete coupon usage records\n await db.delete(couponUsage).where(inArray(couponUsage.orderId, orderIds))\n\n // 2. Delete complaints related to these orders\n await db.delete(complaints).where(inArray(complaints.orderId, orderIds))\n\n // 3. Delete refunds\n await db.delete(refunds).where(inArray(refunds.orderId, orderIds))\n\n // 4. Delete payments\n await db.delete(payments).where(inArray(payments.orderId, orderIds))\n\n // 5. Delete order status records\n await db.delete(orderStatus).where(inArray(orderStatus.orderId, orderIds))\n\n // 6. Delete order items\n await db.delete(orderItems).where(inArray(orderItems.orderId, orderIds))\n\n // 7. Finally delete the orders themselves\n await db.delete(orders).where(inArray(orders.id, orderIds))\n}\n", "import { and, eq } from 'drizzle-orm'\nimport { db } from '../db/db_index'\nimport { uploadUrlStatus } from '../db/schema'\n\nexport async function createUploadUrlStatus(key: string): Promise {\n await db.insert(uploadUrlStatus).values({\n key,\n status: 'pending',\n })\n}\n\nexport async function claimUploadUrlStatus(key: string): Promise {\n const result = await db\n .update(uploadUrlStatus)\n .set({ status: 'claimed' })\n .where(and(eq(uploadUrlStatus.key, key), eq(uploadUrlStatus.status, 'pending')))\n .returning()\n\n return result.length > 0\n}\n", "import { db } from '../db/db_index'\nimport { eq, and } from 'drizzle-orm'\n\n// ============================================================================\n// Unit Seed Helper\n// ============================================================================\n\nexport interface UnitSeedData {\n shortNotation: string\n fullName: string\n}\n\nexport async function seedUnits(unitsToSeed: UnitSeedData[]): Promise {\n for (const unit of unitsToSeed) {\n const { units: unitsTable } = await import('../db/schema')\n const existingUnit = await db.query.units.findFirst({\n where: eq(unitsTable.shortNotation, unit.shortNotation),\n })\n if (!existingUnit) {\n await db.insert(unitsTable).values(unit)\n }\n }\n}\n\n// ============================================================================\n// Staff Role Seed Helper\n// ============================================================================\n\n// Type for staff role names based on the enum values in schema\nexport type StaffRoleName = 'super_admin' | 'admin' | 'marketer' | 'delivery_staff'\n\nexport async function seedStaffRoles(rolesToSeed: StaffRoleName[]): Promise {\n for (const roleName of rolesToSeed) {\n const { staffRoles } = await import('../db/schema')\n const existingRole = await db.query.staffRoles.findFirst({\n where: eq(staffRoles.roleName, roleName),\n })\n if (!existingRole) {\n await db.insert(staffRoles).values({ roleName })\n }\n }\n}\n\n// ============================================================================\n// Staff Permission Seed Helper\n// ============================================================================\n\n// Type for staff permission names based on the enum values in schema\nexport type StaffPermissionName = 'crud_product' | 'make_coupon' | 'crud_staff_users'\n\nexport async function seedStaffPermissions(permissionsToSeed: StaffPermissionName[]): Promise {\n for (const permissionName of permissionsToSeed) {\n const { staffPermissions } = await import('../db/schema')\n const existingPermission = await db.query.staffPermissions.findFirst({\n where: eq(staffPermissions.permissionName, permissionName),\n })\n if (!existingPermission) {\n await db.insert(staffPermissions).values({ permissionName })\n }\n }\n}\n\n// ============================================================================\n// Role-Permission Assignment Helper\n// ============================================================================\n\nexport interface RolePermissionAssignment {\n roleName: StaffRoleName\n permissionName: StaffPermissionName\n}\n\nexport async function seedRolePermissions(assignments: RolePermissionAssignment[]): Promise {\n await db.transaction(async (tx) => {\n const { staffRoles, staffPermissions, staffRolePermissions } = await import('../db/schema')\n\n for (const assignment of assignments) {\n // Get role ID\n const role = await tx.query.staffRoles.findFirst({\n where: eq(staffRoles.roleName, assignment.roleName),\n })\n\n // Get permission ID\n const permission = await tx.query.staffPermissions.findFirst({\n where: eq(staffPermissions.permissionName, assignment.permissionName),\n })\n\n if (role && permission) {\n const existing = await tx.query.staffRolePermissions.findFirst({\n where: and(\n eq(staffRolePermissions.staffRoleId, role.id),\n eq(staffRolePermissions.staffPermissionId, permission.id)\n ),\n })\n if (!existing) {\n await tx.insert(staffRolePermissions).values({\n staffRoleId: role.id,\n staffPermissionId: permission.id,\n })\n }\n }\n }\n })\n}\n\n// ============================================================================\n// Key-Value Store Seed Helper\n// ============================================================================\n\nexport interface KeyValSeedData {\n key: string\n value: any\n}\n\nexport async function seedKeyValStore(constantsToSeed: KeyValSeedData[]): Promise {\n for (const constant of constantsToSeed) {\n const { keyValStore } = await import('../db/schema')\n const existing = await db.query.keyValStore.findFirst({\n where: eq(keyValStore.key, constant.key),\n })\n if (!existing) {\n await db.insert(keyValStore).values({\n key: constant.key,\n value: constant.value,\n })\n }\n }\n}\n", "import { Hono } from 'hono';\nimport avRouter from \"@/src/apis/admin-apis/apis/av-router\"\nimport { ApiError } from \"@/src/lib/api-error\"\nimport v1Router from \"@/src/v1-router\"\nimport testController from \"@/src/test-controller\"\nimport { authenticateUser } from \"@/src/middleware/auth.middleware\"\n\nconst router = new Hono();\n\n// Health check endpoints (no auth required)\nrouter.get('/health', (c) => {\n return c.json({\n status: 'OK',\n timestamp: new Date().toISOString(),\n uptime: process.uptime(),\n message: 'Hello world'\n });\n});\n\nrouter.get('/seed', (c) => {\n return c.json({\n status: 'OK',\n timestamp: new Date().toISOString(),\n uptime: process.uptime()\n });\n});\n\n// Apply authentication middleware to all subsequent routes\nrouter.use('*', authenticateUser);\n\nrouter.route('/v1', v1Router);\n// router.route('/av', avRouter);\nrouter.route('/test', testController);\n\nconst mainRouter = router;\n\nexport default mainRouter;\n", "import { Hono } from 'hono';\nimport avRouter from \"@/src/apis/admin-apis/apis/av-router\"\nimport commonRouter from \"@/src/apis/common-apis/apis/common.router\"\n\nconst router = new Hono();\n\nrouter.route('/av', avRouter);\nrouter.route('/cm', commonRouter);\n\nconst v1Router = router;\n\nexport default v1Router;\n", "import { Hono } from 'hono';\nimport { authenticateStaff } from \"@/src/middleware/staff-auth\";\n\nconst router = new Hono();\n\n// Apply staff authentication to all admin routes\nrouter.use('*', authenticateStaff);\n\nconst avRouter = router;\n\nexport default avRouter;\n", "import { Context, Next } from 'hono';\nimport { jwtVerify } from 'jose';\nimport { getStaffUserById } from '@/src/dbService';\nimport { ApiError } from '@/src/lib/api-error';\nimport { encodedJwtSecret } from '@/src/lib/env-exporter';\n\n/**\n * Verify JWT token and extract payload\n */\nconst verifyStaffToken = async (token: string) => {\n try {\n const { payload } = await jwtVerify(token, encodedJwtSecret);\n return payload;\n } catch (error) {\n throw new ApiError('Access denied. Invalid auth credentials', 401);\n }\n};\n\n/**\n * Middleware to authenticate staff users and attach staffUser to context\n */\nexport const authenticateStaff = async (c: Context, next: Next) => {\n try {\n // Extract token from Authorization header\n const authHeader = c.req.header('authorization');\n\n if (!authHeader || !authHeader.startsWith('Bearer ')) {\n throw new ApiError('Staff authentication required', 401);\n }\n\n const token = authHeader.split(' ')[1];\n\n if (!token) {\n throw new ApiError('Staff authentication token missing', 401);\n }\n\n // Verify token and extract payload\n const decoded = await verifyStaffToken(token) as any;\n\n // Verify staffId exists in token\n if (!decoded.staffId) {\n throw new ApiError('Invalid staff token format', 401);\n }\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { staffUsers } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n const staff = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.id, decoded.staffId),\n });\n */\n\n // Fetch staff user from database\n const staff = await getStaffUserById(decoded.staffId);\n\n if (!staff) {\n throw new ApiError('Staff user not found', 401);\n }\n\n // Attach staff user to context\n c.set('staffUser', {\n id: staff.id,\n name: staff.name,\n });\n\n await next();\n } catch (error) {\n throw error;\n }\n};\n", "export { compactDecrypt } from './jwe/compact/decrypt.js';\nexport { flattenedDecrypt } from './jwe/flattened/decrypt.js';\nexport { generalDecrypt } from './jwe/general/decrypt.js';\nexport { GeneralEncrypt } from './jwe/general/encrypt.js';\nexport { compactVerify } from './jws/compact/verify.js';\nexport { flattenedVerify } from './jws/flattened/verify.js';\nexport { generalVerify } from './jws/general/verify.js';\nexport { jwtVerify } from './jwt/verify.js';\nexport { jwtDecrypt } from './jwt/decrypt.js';\nexport { CompactEncrypt } from './jwe/compact/encrypt.js';\nexport { FlattenedEncrypt } from './jwe/flattened/encrypt.js';\nexport { CompactSign } from './jws/compact/sign.js';\nexport { FlattenedSign } from './jws/flattened/sign.js';\nexport { GeneralSign } from './jws/general/sign.js';\nexport { SignJWT } from './jwt/sign.js';\nexport { EncryptJWT } from './jwt/encrypt.js';\nexport { calculateJwkThumbprint, calculateJwkThumbprintUri } from './jwk/thumbprint.js';\nexport { EmbeddedJWK } from './jwk/embedded.js';\nexport { createLocalJWKSet } from './jwks/local.js';\nexport { createRemoteJWKSet, jwksCache, customFetch } from './jwks/remote.js';\nexport { UnsecuredJWT } from './jwt/unsecured.js';\nexport { exportPKCS8, exportSPKI, exportJWK } from './key/export.js';\nexport { importSPKI, importPKCS8, importX509, importJWK } from './key/import.js';\nexport { decodeProtectedHeader } from './util/decode_protected_header.js';\nexport { decodeJwt } from './util/decode_jwt.js';\nimport * as errors from './util/errors.js';\nexport { errors };\nexport { generateKeyPair } from './key/generate_key_pair.js';\nexport { generateSecret } from './key/generate_secret.js';\nimport * as base64url from './util/base64url.js';\nexport { base64url };\nexport const cryptoRuntime = 'WebCryptoAPI';\n", "import { encoder, decoder } from '../lib/buffer_utils.js';\nimport { encodeBase64, decodeBase64 } from '../lib/base64.js';\nexport function decode(input) {\n if (Uint8Array.fromBase64) {\n return Uint8Array.fromBase64(typeof input === 'string' ? input : decoder.decode(input), {\n alphabet: 'base64url',\n });\n }\n let encoded = input;\n if (encoded instanceof Uint8Array) {\n encoded = decoder.decode(encoded);\n }\n encoded = encoded.replace(/-/g, '+').replace(/_/g, '/');\n try {\n return decodeBase64(encoded);\n }\n catch {\n throw new TypeError('The input to be decoded is not correctly encoded.');\n }\n}\nexport function encode(input) {\n let unencoded = input;\n if (typeof unencoded === 'string') {\n unencoded = encoder.encode(unencoded);\n }\n if (Uint8Array.prototype.toBase64) {\n return unencoded.toBase64({ alphabet: 'base64url', omitPadding: true });\n }\n return encodeBase64(unencoded).replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n}\n", "export const encoder = new TextEncoder();\nexport const decoder = new TextDecoder();\nconst MAX_INT32 = 2 ** 32;\nexport function concat(...buffers) {\n const size = buffers.reduce((acc, { length }) => acc + length, 0);\n const buf = new Uint8Array(size);\n let i = 0;\n for (const buffer of buffers) {\n buf.set(buffer, i);\n i += buffer.length;\n }\n return buf;\n}\nfunction writeUInt32BE(buf, value, offset) {\n if (value < 0 || value >= MAX_INT32) {\n throw new RangeError(`value must be >= 0 and <= ${MAX_INT32 - 1}. Received ${value}`);\n }\n buf.set([value >>> 24, value >>> 16, value >>> 8, value & 0xff], offset);\n}\nexport function uint64be(value) {\n const high = Math.floor(value / MAX_INT32);\n const low = value % MAX_INT32;\n const buf = new Uint8Array(8);\n writeUInt32BE(buf, high, 0);\n writeUInt32BE(buf, low, 4);\n return buf;\n}\nexport function uint32be(value) {\n const buf = new Uint8Array(4);\n writeUInt32BE(buf, value);\n return buf;\n}\nexport function encode(string) {\n const bytes = new Uint8Array(string.length);\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code > 127) {\n throw new TypeError('non-ASCII string encountered in encode()');\n }\n bytes[i] = code;\n }\n return bytes;\n}\n", "export function encodeBase64(input) {\n if (Uint8Array.prototype.toBase64) {\n return input.toBase64();\n }\n const CHUNK_SIZE = 0x8000;\n const arr = [];\n for (let i = 0; i < input.length; i += CHUNK_SIZE) {\n arr.push(String.fromCharCode.apply(null, input.subarray(i, i + CHUNK_SIZE)));\n }\n return btoa(arr.join(''));\n}\nexport function decodeBase64(encoded) {\n if (Uint8Array.fromBase64) {\n return Uint8Array.fromBase64(encoded);\n }\n const binary = atob(encoded);\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i);\n }\n return bytes;\n}\n", "const unusable = (name, prop = 'algorithm.name') => new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`);\nconst isAlgorithm = (algorithm, name) => algorithm.name === name;\nfunction getHashLength(hash) {\n return parseInt(hash.name.slice(4), 10);\n}\nfunction checkHashLength(algorithm, expected) {\n const actual = getHashLength(algorithm.hash);\n if (actual !== expected)\n throw unusable(`SHA-${expected}`, 'algorithm.hash');\n}\nfunction getNamedCurve(alg) {\n switch (alg) {\n case 'ES256':\n return 'P-256';\n case 'ES384':\n return 'P-384';\n case 'ES512':\n return 'P-521';\n default:\n throw new Error('unreachable');\n }\n}\nfunction checkUsage(key, usage) {\n if (usage && !key.usages.includes(usage)) {\n throw new TypeError(`CryptoKey does not support this operation, its usages must include ${usage}.`);\n }\n}\nexport function checkSigCryptoKey(key, alg, usage) {\n switch (alg) {\n case 'HS256':\n case 'HS384':\n case 'HS512': {\n if (!isAlgorithm(key.algorithm, 'HMAC'))\n throw unusable('HMAC');\n checkHashLength(key.algorithm, parseInt(alg.slice(2), 10));\n break;\n }\n case 'RS256':\n case 'RS384':\n case 'RS512': {\n if (!isAlgorithm(key.algorithm, 'RSASSA-PKCS1-v1_5'))\n throw unusable('RSASSA-PKCS1-v1_5');\n checkHashLength(key.algorithm, parseInt(alg.slice(2), 10));\n break;\n }\n case 'PS256':\n case 'PS384':\n case 'PS512': {\n if (!isAlgorithm(key.algorithm, 'RSA-PSS'))\n throw unusable('RSA-PSS');\n checkHashLength(key.algorithm, parseInt(alg.slice(2), 10));\n break;\n }\n case 'Ed25519':\n case 'EdDSA': {\n if (!isAlgorithm(key.algorithm, 'Ed25519'))\n throw unusable('Ed25519');\n break;\n }\n case 'ML-DSA-44':\n case 'ML-DSA-65':\n case 'ML-DSA-87': {\n if (!isAlgorithm(key.algorithm, alg))\n throw unusable(alg);\n break;\n }\n case 'ES256':\n case 'ES384':\n case 'ES512': {\n if (!isAlgorithm(key.algorithm, 'ECDSA'))\n throw unusable('ECDSA');\n const expected = getNamedCurve(alg);\n const actual = key.algorithm.namedCurve;\n if (actual !== expected)\n throw unusable(expected, 'algorithm.namedCurve');\n break;\n }\n default:\n throw new TypeError('CryptoKey does not support this operation');\n }\n checkUsage(key, usage);\n}\nexport function checkEncCryptoKey(key, alg, usage) {\n switch (alg) {\n case 'A128GCM':\n case 'A192GCM':\n case 'A256GCM': {\n if (!isAlgorithm(key.algorithm, 'AES-GCM'))\n throw unusable('AES-GCM');\n const expected = parseInt(alg.slice(1, 4), 10);\n const actual = key.algorithm.length;\n if (actual !== expected)\n throw unusable(expected, 'algorithm.length');\n break;\n }\n case 'A128KW':\n case 'A192KW':\n case 'A256KW': {\n if (!isAlgorithm(key.algorithm, 'AES-KW'))\n throw unusable('AES-KW');\n const expected = parseInt(alg.slice(1, 4), 10);\n const actual = key.algorithm.length;\n if (actual !== expected)\n throw unusable(expected, 'algorithm.length');\n break;\n }\n case 'ECDH': {\n switch (key.algorithm.name) {\n case 'ECDH':\n case 'X25519':\n break;\n default:\n throw unusable('ECDH or X25519');\n }\n break;\n }\n case 'PBES2-HS256+A128KW':\n case 'PBES2-HS384+A192KW':\n case 'PBES2-HS512+A256KW':\n if (!isAlgorithm(key.algorithm, 'PBKDF2'))\n throw unusable('PBKDF2');\n break;\n case 'RSA-OAEP':\n case 'RSA-OAEP-256':\n case 'RSA-OAEP-384':\n case 'RSA-OAEP-512': {\n if (!isAlgorithm(key.algorithm, 'RSA-OAEP'))\n throw unusable('RSA-OAEP');\n checkHashLength(key.algorithm, parseInt(alg.slice(9), 10) || 1);\n break;\n }\n default:\n throw new TypeError('CryptoKey does not support this operation');\n }\n checkUsage(key, usage);\n}\n", "function message(msg, actual, ...types) {\n types = types.filter(Boolean);\n if (types.length > 2) {\n const last = types.pop();\n msg += `one of type ${types.join(', ')}, or ${last}.`;\n }\n else if (types.length === 2) {\n msg += `one of type ${types[0]} or ${types[1]}.`;\n }\n else {\n msg += `of type ${types[0]}.`;\n }\n if (actual == null) {\n msg += ` Received ${actual}`;\n }\n else if (typeof actual === 'function' && actual.name) {\n msg += ` Received function ${actual.name}`;\n }\n else if (typeof actual === 'object' && actual != null) {\n if (actual.constructor?.name) {\n msg += ` Received an instance of ${actual.constructor.name}`;\n }\n }\n return msg;\n}\nexport const invalidKeyInput = (actual, ...types) => message('Key must be ', actual, ...types);\nexport const withAlg = (alg, actual, ...types) => message(`Key for the ${alg} algorithm must be `, actual, ...types);\n", "export class JOSEError extends Error {\n static code = 'ERR_JOSE_GENERIC';\n code = 'ERR_JOSE_GENERIC';\n constructor(message, options) {\n super(message, options);\n this.name = this.constructor.name;\n Error.captureStackTrace?.(this, this.constructor);\n }\n}\nexport class JWTClaimValidationFailed extends JOSEError {\n static code = 'ERR_JWT_CLAIM_VALIDATION_FAILED';\n code = 'ERR_JWT_CLAIM_VALIDATION_FAILED';\n claim;\n reason;\n payload;\n constructor(message, payload, claim = 'unspecified', reason = 'unspecified') {\n super(message, { cause: { claim, reason, payload } });\n this.claim = claim;\n this.reason = reason;\n this.payload = payload;\n }\n}\nexport class JWTExpired extends JOSEError {\n static code = 'ERR_JWT_EXPIRED';\n code = 'ERR_JWT_EXPIRED';\n claim;\n reason;\n payload;\n constructor(message, payload, claim = 'unspecified', reason = 'unspecified') {\n super(message, { cause: { claim, reason, payload } });\n this.claim = claim;\n this.reason = reason;\n this.payload = payload;\n }\n}\nexport class JOSEAlgNotAllowed extends JOSEError {\n static code = 'ERR_JOSE_ALG_NOT_ALLOWED';\n code = 'ERR_JOSE_ALG_NOT_ALLOWED';\n}\nexport class JOSENotSupported extends JOSEError {\n static code = 'ERR_JOSE_NOT_SUPPORTED';\n code = 'ERR_JOSE_NOT_SUPPORTED';\n}\nexport class JWEDecryptionFailed extends JOSEError {\n static code = 'ERR_JWE_DECRYPTION_FAILED';\n code = 'ERR_JWE_DECRYPTION_FAILED';\n constructor(message = 'decryption operation failed', options) {\n super(message, options);\n }\n}\nexport class JWEInvalid extends JOSEError {\n static code = 'ERR_JWE_INVALID';\n code = 'ERR_JWE_INVALID';\n}\nexport class JWSInvalid extends JOSEError {\n static code = 'ERR_JWS_INVALID';\n code = 'ERR_JWS_INVALID';\n}\nexport class JWTInvalid extends JOSEError {\n static code = 'ERR_JWT_INVALID';\n code = 'ERR_JWT_INVALID';\n}\nexport class JWKInvalid extends JOSEError {\n static code = 'ERR_JWK_INVALID';\n code = 'ERR_JWK_INVALID';\n}\nexport class JWKSInvalid extends JOSEError {\n static code = 'ERR_JWKS_INVALID';\n code = 'ERR_JWKS_INVALID';\n}\nexport class JWKSNoMatchingKey extends JOSEError {\n static code = 'ERR_JWKS_NO_MATCHING_KEY';\n code = 'ERR_JWKS_NO_MATCHING_KEY';\n constructor(message = 'no applicable key found in the JSON Web Key Set', options) {\n super(message, options);\n }\n}\nexport class JWKSMultipleMatchingKeys extends JOSEError {\n [Symbol.asyncIterator];\n static code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';\n code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';\n constructor(message = 'multiple matching keys found in the JSON Web Key Set', options) {\n super(message, options);\n }\n}\nexport class JWKSTimeout extends JOSEError {\n static code = 'ERR_JWKS_TIMEOUT';\n code = 'ERR_JWKS_TIMEOUT';\n constructor(message = 'request timed out', options) {\n super(message, options);\n }\n}\nexport class JWSSignatureVerificationFailed extends JOSEError {\n static code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED';\n code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED';\n constructor(message = 'signature verification failed', options) {\n super(message, options);\n }\n}\n", "export function assertCryptoKey(key) {\n if (!isCryptoKey(key)) {\n throw new Error('CryptoKey instance expected');\n }\n}\nexport const isCryptoKey = (key) => {\n if (key?.[Symbol.toStringTag] === 'CryptoKey')\n return true;\n try {\n return key instanceof CryptoKey;\n }\n catch {\n return false;\n }\n};\nexport const isKeyObject = (key) => key?.[Symbol.toStringTag] === 'KeyObject';\nexport const isKeyLike = (key) => isCryptoKey(key) || isKeyObject(key);\n", "import { decode } from '../util/base64url.js';\nexport const unprotected = Symbol();\nexport function assertNotSet(value, name) {\n if (value) {\n throw new TypeError(`${name} can only be called once`);\n }\n}\nexport function decodeBase64url(value, label, ErrorClass) {\n try {\n return decode(value);\n }\n catch {\n throw new ErrorClass(`Failed to base64url decode the ${label}`);\n }\n}\nexport async function digest(algorithm, data) {\n const subtleDigest = `SHA-${algorithm.slice(-3)}`;\n return new Uint8Array(await crypto.subtle.digest(subtleDigest, data));\n}\n", "const isObjectLike = (value) => typeof value === 'object' && value !== null;\nexport function isObject(input) {\n if (!isObjectLike(input) || Object.prototype.toString.call(input) !== '[object Object]') {\n return false;\n }\n if (Object.getPrototypeOf(input) === null) {\n return true;\n }\n let proto = input;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(input) === proto;\n}\nexport function isDisjoint(...headers) {\n const sources = headers.filter(Boolean);\n if (sources.length === 0 || sources.length === 1) {\n return true;\n }\n let acc;\n for (const header of sources) {\n const parameters = Object.keys(header);\n if (!acc || acc.size === 0) {\n acc = new Set(parameters);\n continue;\n }\n for (const parameter of parameters) {\n if (acc.has(parameter)) {\n return false;\n }\n acc.add(parameter);\n }\n }\n return true;\n}\nexport const isJWK = (key) => isObject(key) && typeof key.kty === 'string';\nexport const isPrivateJWK = (key) => key.kty !== 'oct' &&\n ((key.kty === 'AKP' && typeof key.priv === 'string') || typeof key.d === 'string');\nexport const isPublicJWK = (key) => key.kty !== 'oct' && key.d === undefined && key.priv === undefined;\nexport const isSecretJWK = (key) => key.kty === 'oct' && typeof key.k === 'string';\n", "import { JOSENotSupported } from '../util/errors.js';\nimport { checkSigCryptoKey } from './crypto_key.js';\nimport { invalidKeyInput } from './invalid_key_input.js';\nexport function checkKeyLength(alg, key) {\n if (alg.startsWith('RS') || alg.startsWith('PS')) {\n const { modulusLength } = key.algorithm;\n if (typeof modulusLength !== 'number' || modulusLength < 2048) {\n throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);\n }\n }\n}\nfunction subtleAlgorithm(alg, algorithm) {\n const hash = `SHA-${alg.slice(-3)}`;\n switch (alg) {\n case 'HS256':\n case 'HS384':\n case 'HS512':\n return { hash, name: 'HMAC' };\n case 'PS256':\n case 'PS384':\n case 'PS512':\n return { hash, name: 'RSA-PSS', saltLength: parseInt(alg.slice(-3), 10) >> 3 };\n case 'RS256':\n case 'RS384':\n case 'RS512':\n return { hash, name: 'RSASSA-PKCS1-v1_5' };\n case 'ES256':\n case 'ES384':\n case 'ES512':\n return { hash, name: 'ECDSA', namedCurve: algorithm.namedCurve };\n case 'Ed25519':\n case 'EdDSA':\n return { name: 'Ed25519' };\n case 'ML-DSA-44':\n case 'ML-DSA-65':\n case 'ML-DSA-87':\n return { name: alg };\n default:\n throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);\n }\n}\nasync function getSigKey(alg, key, usage) {\n if (key instanceof Uint8Array) {\n if (!alg.startsWith('HS')) {\n throw new TypeError(invalidKeyInput(key, 'CryptoKey', 'KeyObject', 'JSON Web Key'));\n }\n return crypto.subtle.importKey('raw', key, { hash: `SHA-${alg.slice(-3)}`, name: 'HMAC' }, false, [usage]);\n }\n checkSigCryptoKey(key, alg, usage);\n return key;\n}\nexport async function sign(alg, key, data) {\n const cryptoKey = await getSigKey(alg, key, 'sign');\n checkKeyLength(alg, cryptoKey);\n const signature = await crypto.subtle.sign(subtleAlgorithm(alg, cryptoKey.algorithm), cryptoKey, data);\n return new Uint8Array(signature);\n}\nexport async function verify(alg, key, signature, data) {\n const cryptoKey = await getSigKey(alg, key, 'verify');\n checkKeyLength(alg, cryptoKey);\n const algorithm = subtleAlgorithm(alg, cryptoKey.algorithm);\n try {\n return await crypto.subtle.verify(algorithm, cryptoKey, signature, data);\n }\n catch {\n return false;\n }\n}\n", "import { isJWK } from './type_checks.js';\nimport { decode } from '../util/base64url.js';\nimport { jwkToKey } from './jwk_to_key.js';\nimport { isCryptoKey, isKeyObject } from './is_key_like.js';\nconst unusableForAlg = 'given KeyObject instance cannot be used for this algorithm';\nlet cache;\nconst handleJWK = async (key, jwk, alg, freeze = false) => {\n cache ||= new WeakMap();\n let cached = cache.get(key);\n if (cached?.[alg]) {\n return cached[alg];\n }\n const cryptoKey = await jwkToKey({ ...jwk, alg });\n if (freeze)\n Object.freeze(key);\n if (!cached) {\n cache.set(key, { [alg]: cryptoKey });\n }\n else {\n cached[alg] = cryptoKey;\n }\n return cryptoKey;\n};\nconst handleKeyObject = (keyObject, alg) => {\n cache ||= new WeakMap();\n let cached = cache.get(keyObject);\n if (cached?.[alg]) {\n return cached[alg];\n }\n const isPublic = keyObject.type === 'public';\n const extractable = isPublic ? true : false;\n let cryptoKey;\n if (keyObject.asymmetricKeyType === 'x25519') {\n switch (alg) {\n case 'ECDH-ES':\n case 'ECDH-ES+A128KW':\n case 'ECDH-ES+A192KW':\n case 'ECDH-ES+A256KW':\n break;\n default:\n throw new TypeError(unusableForAlg);\n }\n cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, isPublic ? [] : ['deriveBits']);\n }\n if (keyObject.asymmetricKeyType === 'ed25519') {\n if (alg !== 'EdDSA' && alg !== 'Ed25519') {\n throw new TypeError(unusableForAlg);\n }\n cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [\n isPublic ? 'verify' : 'sign',\n ]);\n }\n switch (keyObject.asymmetricKeyType) {\n case 'ml-dsa-44':\n case 'ml-dsa-65':\n case 'ml-dsa-87': {\n if (alg !== keyObject.asymmetricKeyType.toUpperCase()) {\n throw new TypeError(unusableForAlg);\n }\n cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [\n isPublic ? 'verify' : 'sign',\n ]);\n }\n }\n if (keyObject.asymmetricKeyType === 'rsa') {\n let hash;\n switch (alg) {\n case 'RSA-OAEP':\n hash = 'SHA-1';\n break;\n case 'RS256':\n case 'PS256':\n case 'RSA-OAEP-256':\n hash = 'SHA-256';\n break;\n case 'RS384':\n case 'PS384':\n case 'RSA-OAEP-384':\n hash = 'SHA-384';\n break;\n case 'RS512':\n case 'PS512':\n case 'RSA-OAEP-512':\n hash = 'SHA-512';\n break;\n default:\n throw new TypeError(unusableForAlg);\n }\n if (alg.startsWith('RSA-OAEP')) {\n return keyObject.toCryptoKey({\n name: 'RSA-OAEP',\n hash,\n }, extractable, isPublic ? ['encrypt'] : ['decrypt']);\n }\n cryptoKey = keyObject.toCryptoKey({\n name: alg.startsWith('PS') ? 'RSA-PSS' : 'RSASSA-PKCS1-v1_5',\n hash,\n }, extractable, [isPublic ? 'verify' : 'sign']);\n }\n if (keyObject.asymmetricKeyType === 'ec') {\n const nist = new Map([\n ['prime256v1', 'P-256'],\n ['secp384r1', 'P-384'],\n ['secp521r1', 'P-521'],\n ]);\n const namedCurve = nist.get(keyObject.asymmetricKeyDetails?.namedCurve);\n if (!namedCurve) {\n throw new TypeError(unusableForAlg);\n }\n const expectedCurve = { ES256: 'P-256', ES384: 'P-384', ES512: 'P-521' };\n if (expectedCurve[alg] && namedCurve === expectedCurve[alg]) {\n cryptoKey = keyObject.toCryptoKey({\n name: 'ECDSA',\n namedCurve,\n }, extractable, [isPublic ? 'verify' : 'sign']);\n }\n if (alg.startsWith('ECDH-ES')) {\n cryptoKey = keyObject.toCryptoKey({\n name: 'ECDH',\n namedCurve,\n }, extractable, isPublic ? [] : ['deriveBits']);\n }\n }\n if (!cryptoKey) {\n throw new TypeError(unusableForAlg);\n }\n if (!cached) {\n cache.set(keyObject, { [alg]: cryptoKey });\n }\n else {\n cached[alg] = cryptoKey;\n }\n return cryptoKey;\n};\nexport async function normalizeKey(key, alg) {\n if (key instanceof Uint8Array) {\n return key;\n }\n if (isCryptoKey(key)) {\n return key;\n }\n if (isKeyObject(key)) {\n if (key.type === 'secret') {\n return key.export();\n }\n if ('toCryptoKey' in key && typeof key.toCryptoKey === 'function') {\n try {\n return handleKeyObject(key, alg);\n }\n catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n }\n }\n let jwk = key.export({ format: 'jwk' });\n return handleJWK(key, jwk, alg);\n }\n if (isJWK(key)) {\n if (key.k) {\n return decode(key.k);\n }\n return handleJWK(key, key, alg, true);\n }\n throw new Error('unreachable');\n}\n", "import { JOSENotSupported } from '../util/errors.js';\nconst unsupportedAlg = 'Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value';\nfunction subtleMapping(jwk) {\n let algorithm;\n let keyUsages;\n switch (jwk.kty) {\n case 'AKP': {\n switch (jwk.alg) {\n case 'ML-DSA-44':\n case 'ML-DSA-65':\n case 'ML-DSA-87':\n algorithm = { name: jwk.alg };\n keyUsages = jwk.priv ? ['sign'] : ['verify'];\n break;\n default:\n throw new JOSENotSupported(unsupportedAlg);\n }\n break;\n }\n case 'RSA': {\n switch (jwk.alg) {\n case 'PS256':\n case 'PS384':\n case 'PS512':\n algorithm = { name: 'RSA-PSS', hash: `SHA-${jwk.alg.slice(-3)}` };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'RS256':\n case 'RS384':\n case 'RS512':\n algorithm = { name: 'RSASSA-PKCS1-v1_5', hash: `SHA-${jwk.alg.slice(-3)}` };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'RSA-OAEP':\n case 'RSA-OAEP-256':\n case 'RSA-OAEP-384':\n case 'RSA-OAEP-512':\n algorithm = {\n name: 'RSA-OAEP',\n hash: `SHA-${parseInt(jwk.alg.slice(-3), 10) || 1}`,\n };\n keyUsages = jwk.d ? ['decrypt', 'unwrapKey'] : ['encrypt', 'wrapKey'];\n break;\n default:\n throw new JOSENotSupported(unsupportedAlg);\n }\n break;\n }\n case 'EC': {\n switch (jwk.alg) {\n case 'ES256':\n case 'ES384':\n case 'ES512':\n algorithm = {\n name: 'ECDSA',\n namedCurve: { ES256: 'P-256', ES384: 'P-384', ES512: 'P-521' }[jwk.alg],\n };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'ECDH-ES':\n case 'ECDH-ES+A128KW':\n case 'ECDH-ES+A192KW':\n case 'ECDH-ES+A256KW':\n algorithm = { name: 'ECDH', namedCurve: jwk.crv };\n keyUsages = jwk.d ? ['deriveBits'] : [];\n break;\n default:\n throw new JOSENotSupported(unsupportedAlg);\n }\n break;\n }\n case 'OKP': {\n switch (jwk.alg) {\n case 'Ed25519':\n case 'EdDSA':\n algorithm = { name: 'Ed25519' };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'ECDH-ES':\n case 'ECDH-ES+A128KW':\n case 'ECDH-ES+A192KW':\n case 'ECDH-ES+A256KW':\n algorithm = { name: jwk.crv };\n keyUsages = jwk.d ? ['deriveBits'] : [];\n break;\n default:\n throw new JOSENotSupported(unsupportedAlg);\n }\n break;\n }\n default:\n throw new JOSENotSupported('Invalid or unsupported JWK \"kty\" (Key Type) Parameter value');\n }\n return { algorithm, keyUsages };\n}\nexport async function jwkToKey(jwk) {\n if (!jwk.alg) {\n throw new TypeError('\"alg\" argument is required when \"jwk.alg\" is not present');\n }\n const { algorithm, keyUsages } = subtleMapping(jwk);\n const keyData = { ...jwk };\n if (keyData.kty !== 'AKP') {\n delete keyData.alg;\n }\n delete keyData.use;\n return crypto.subtle.importKey('jwk', keyData, algorithm, jwk.ext ?? (jwk.d || jwk.priv ? false : true), jwk.key_ops ?? keyUsages);\n}\n", "import { JOSENotSupported, JWEInvalid, JWSInvalid } from '../util/errors.js';\nexport function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) {\n if (joseHeader.crit !== undefined && protectedHeader?.crit === undefined) {\n throw new Err('\"crit\" (Critical) Header Parameter MUST be integrity protected');\n }\n if (!protectedHeader || protectedHeader.crit === undefined) {\n return new Set();\n }\n if (!Array.isArray(protectedHeader.crit) ||\n protectedHeader.crit.length === 0 ||\n protectedHeader.crit.some((input) => typeof input !== 'string' || input.length === 0)) {\n throw new Err('\"crit\" (Critical) Header Parameter MUST be an array of non-empty strings when present');\n }\n let recognized;\n if (recognizedOption !== undefined) {\n recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]);\n }\n else {\n recognized = recognizedDefault;\n }\n for (const parameter of protectedHeader.crit) {\n if (!recognized.has(parameter)) {\n throw new JOSENotSupported(`Extension Header Parameter \"${parameter}\" is not recognized`);\n }\n if (joseHeader[parameter] === undefined) {\n throw new Err(`Extension Header Parameter \"${parameter}\" is missing`);\n }\n if (recognized.get(parameter) && protectedHeader[parameter] === undefined) {\n throw new Err(`Extension Header Parameter \"${parameter}\" MUST be integrity protected`);\n }\n }\n return new Set(protectedHeader.crit);\n}\n", "export function validateAlgorithms(option, algorithms) {\n if (algorithms !== undefined &&\n (!Array.isArray(algorithms) || algorithms.some((s) => typeof s !== 'string'))) {\n throw new TypeError(`\"${option}\" option must be an array of strings`);\n }\n if (!algorithms) {\n return undefined;\n }\n return new Set(algorithms);\n}\n", "import { withAlg as invalidKeyInput } from './invalid_key_input.js';\nimport { isKeyLike } from './is_key_like.js';\nimport * as jwk from './type_checks.js';\nconst tag = (key) => key?.[Symbol.toStringTag];\nconst jwkMatchesOp = (alg, key, usage) => {\n if (key.use !== undefined) {\n let expected;\n switch (usage) {\n case 'sign':\n case 'verify':\n expected = 'sig';\n break;\n case 'encrypt':\n case 'decrypt':\n expected = 'enc';\n break;\n }\n if (key.use !== expected) {\n throw new TypeError(`Invalid key for this operation, its \"use\" must be \"${expected}\" when present`);\n }\n }\n if (key.alg !== undefined && key.alg !== alg) {\n throw new TypeError(`Invalid key for this operation, its \"alg\" must be \"${alg}\" when present`);\n }\n if (Array.isArray(key.key_ops)) {\n let expectedKeyOp;\n switch (true) {\n case usage === 'sign' || usage === 'verify':\n case alg === 'dir':\n case alg.includes('CBC-HS'):\n expectedKeyOp = usage;\n break;\n case alg.startsWith('PBES2'):\n expectedKeyOp = 'deriveBits';\n break;\n case /^A\\d{3}(?:GCM)?(?:KW)?$/.test(alg):\n if (!alg.includes('GCM') && alg.endsWith('KW')) {\n expectedKeyOp = usage === 'encrypt' ? 'wrapKey' : 'unwrapKey';\n }\n else {\n expectedKeyOp = usage;\n }\n break;\n case usage === 'encrypt' && alg.startsWith('RSA'):\n expectedKeyOp = 'wrapKey';\n break;\n case usage === 'decrypt':\n expectedKeyOp = alg.startsWith('RSA') ? 'unwrapKey' : 'deriveBits';\n break;\n }\n if (expectedKeyOp && key.key_ops?.includes?.(expectedKeyOp) === false) {\n throw new TypeError(`Invalid key for this operation, its \"key_ops\" must include \"${expectedKeyOp}\" when present`);\n }\n }\n return true;\n};\nconst symmetricTypeCheck = (alg, key, usage) => {\n if (key instanceof Uint8Array)\n return;\n if (jwk.isJWK(key)) {\n if (jwk.isSecretJWK(key) && jwkMatchesOp(alg, key, usage))\n return;\n throw new TypeError(`JSON Web Key for symmetric algorithms must have JWK \"kty\" (Key Type) equal to \"oct\" and the JWK \"k\" (Key Value) present`);\n }\n if (!isKeyLike(key)) {\n throw new TypeError(invalidKeyInput(alg, key, 'CryptoKey', 'KeyObject', 'JSON Web Key', 'Uint8Array'));\n }\n if (key.type !== 'secret') {\n throw new TypeError(`${tag(key)} instances for symmetric algorithms must be of type \"secret\"`);\n }\n};\nconst asymmetricTypeCheck = (alg, key, usage) => {\n if (jwk.isJWK(key)) {\n switch (usage) {\n case 'decrypt':\n case 'sign':\n if (jwk.isPrivateJWK(key) && jwkMatchesOp(alg, key, usage))\n return;\n throw new TypeError(`JSON Web Key for this operation must be a private JWK`);\n case 'encrypt':\n case 'verify':\n if (jwk.isPublicJWK(key) && jwkMatchesOp(alg, key, usage))\n return;\n throw new TypeError(`JSON Web Key for this operation must be a public JWK`);\n }\n }\n if (!isKeyLike(key)) {\n throw new TypeError(invalidKeyInput(alg, key, 'CryptoKey', 'KeyObject', 'JSON Web Key'));\n }\n if (key.type === 'secret') {\n throw new TypeError(`${tag(key)} instances for asymmetric algorithms must not be of type \"secret\"`);\n }\n if (key.type === 'public') {\n switch (usage) {\n case 'sign':\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm signing must be of type \"private\"`);\n case 'decrypt':\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm decryption must be of type \"private\"`);\n }\n }\n if (key.type === 'private') {\n switch (usage) {\n case 'verify':\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm verifying must be of type \"public\"`);\n case 'encrypt':\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm encryption must be of type \"public\"`);\n }\n }\n};\nexport function checkKeyType(alg, key, usage) {\n switch (alg.substring(0, 2)) {\n case 'A1':\n case 'A2':\n case 'di':\n case 'HS':\n case 'PB':\n symmetricTypeCheck(alg, key, usage);\n break;\n default:\n asymmetricTypeCheck(alg, key, usage);\n }\n}\n", "import { flattenedVerify } from '../flattened/verify.js';\nimport { JWSInvalid } from '../../util/errors.js';\nimport { decoder } from '../../lib/buffer_utils.js';\nexport async function compactVerify(jws, key, options) {\n if (jws instanceof Uint8Array) {\n jws = decoder.decode(jws);\n }\n if (typeof jws !== 'string') {\n throw new JWSInvalid('Compact JWS must be a string or Uint8Array');\n }\n const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split('.');\n if (length !== 3) {\n throw new JWSInvalid('Invalid Compact JWS');\n }\n const verified = await flattenedVerify({ payload, protected: protectedHeader, signature }, key, options);\n const result = { payload: verified.payload, protectedHeader: verified.protectedHeader };\n if (typeof key === 'function') {\n return { ...result, key: verified.key };\n }\n return result;\n}\n", "import { decode as b64u } from '../../util/base64url.js';\nimport { verify } from '../../lib/signing.js';\nimport { JOSEAlgNotAllowed, JWSInvalid, JWSSignatureVerificationFailed } from '../../util/errors.js';\nimport { concat, encoder, decoder, encode } from '../../lib/buffer_utils.js';\nimport { decodeBase64url } from '../../lib/helpers.js';\nimport { isDisjoint } from '../../lib/type_checks.js';\nimport { isObject } from '../../lib/type_checks.js';\nimport { checkKeyType } from '../../lib/check_key_type.js';\nimport { validateCrit } from '../../lib/validate_crit.js';\nimport { validateAlgorithms } from '../../lib/validate_algorithms.js';\nimport { normalizeKey } from '../../lib/normalize_key.js';\nexport async function flattenedVerify(jws, key, options) {\n if (!isObject(jws)) {\n throw new JWSInvalid('Flattened JWS must be an object');\n }\n if (jws.protected === undefined && jws.header === undefined) {\n throw new JWSInvalid('Flattened JWS must have either of the \"protected\" or \"header\" members');\n }\n if (jws.protected !== undefined && typeof jws.protected !== 'string') {\n throw new JWSInvalid('JWS Protected Header incorrect type');\n }\n if (jws.payload === undefined) {\n throw new JWSInvalid('JWS Payload missing');\n }\n if (typeof jws.signature !== 'string') {\n throw new JWSInvalid('JWS Signature missing or incorrect type');\n }\n if (jws.header !== undefined && !isObject(jws.header)) {\n throw new JWSInvalid('JWS Unprotected Header incorrect type');\n }\n let parsedProt = {};\n if (jws.protected) {\n try {\n const protectedHeader = b64u(jws.protected);\n parsedProt = JSON.parse(decoder.decode(protectedHeader));\n }\n catch {\n throw new JWSInvalid('JWS Protected Header is invalid');\n }\n }\n if (!isDisjoint(parsedProt, jws.header)) {\n throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');\n }\n const joseHeader = {\n ...parsedProt,\n ...jws.header,\n };\n const extensions = validateCrit(JWSInvalid, new Map([['b64', true]]), options?.crit, parsedProt, joseHeader);\n let b64 = true;\n if (extensions.has('b64')) {\n b64 = parsedProt.b64;\n if (typeof b64 !== 'boolean') {\n throw new JWSInvalid('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean');\n }\n }\n const { alg } = joseHeader;\n if (typeof alg !== 'string' || !alg) {\n throw new JWSInvalid('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');\n }\n const algorithms = options && validateAlgorithms('algorithms', options.algorithms);\n if (algorithms && !algorithms.has(alg)) {\n throw new JOSEAlgNotAllowed('\"alg\" (Algorithm) Header Parameter value not allowed');\n }\n if (b64) {\n if (typeof jws.payload !== 'string') {\n throw new JWSInvalid('JWS Payload must be a string');\n }\n }\n else if (typeof jws.payload !== 'string' && !(jws.payload instanceof Uint8Array)) {\n throw new JWSInvalid('JWS Payload must be a string or an Uint8Array instance');\n }\n let resolvedKey = false;\n if (typeof key === 'function') {\n key = await key(parsedProt, jws);\n resolvedKey = true;\n }\n checkKeyType(alg, key, 'verify');\n const data = concat(jws.protected !== undefined ? encode(jws.protected) : new Uint8Array(), encode('.'), typeof jws.payload === 'string'\n ? b64\n ? encode(jws.payload)\n : encoder.encode(jws.payload)\n : jws.payload);\n const signature = decodeBase64url(jws.signature, 'signature', JWSInvalid);\n const k = await normalizeKey(key, alg);\n const verified = await verify(alg, k, signature, data);\n if (!verified) {\n throw new JWSSignatureVerificationFailed();\n }\n let payload;\n if (b64) {\n payload = decodeBase64url(jws.payload, 'payload', JWSInvalid);\n }\n else if (typeof jws.payload === 'string') {\n payload = encoder.encode(jws.payload);\n }\n else {\n payload = jws.payload;\n }\n const result = { payload };\n if (jws.protected !== undefined) {\n result.protectedHeader = parsedProt;\n }\n if (jws.header !== undefined) {\n result.unprotectedHeader = jws.header;\n }\n if (resolvedKey) {\n return { ...result, key: k };\n }\n return result;\n}\n", "import { compactVerify } from '../jws/compact/verify.js';\nimport { validateClaimsSet } from '../lib/jwt_claims_set.js';\nimport { JWTInvalid } from '../util/errors.js';\nexport async function jwtVerify(jwt, key, options) {\n const verified = await compactVerify(jwt, key, options);\n if (verified.protectedHeader.crit?.includes('b64') && verified.protectedHeader.b64 === false) {\n throw new JWTInvalid('JWTs MUST NOT use unencoded payload');\n }\n const payload = validateClaimsSet(verified.protectedHeader, verified.payload, options);\n const result = { payload, protectedHeader: verified.protectedHeader };\n if (typeof key === 'function') {\n return { ...result, key: verified.key };\n }\n return result;\n}\n", "import { JWTClaimValidationFailed, JWTExpired, JWTInvalid } from '../util/errors.js';\nimport { encoder, decoder } from './buffer_utils.js';\nimport { isObject } from './type_checks.js';\nconst epoch = (date) => Math.floor(date.getTime() / 1000);\nconst minute = 60;\nconst hour = minute * 60;\nconst day = hour * 24;\nconst week = day * 7;\nconst year = day * 365.25;\nconst REGEX = /^(\\+|\\-)? ?(\\d+|\\d+\\.\\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;\nexport function secs(str) {\n const matched = REGEX.exec(str);\n if (!matched || (matched[4] && matched[1])) {\n throw new TypeError('Invalid time period format');\n }\n const value = parseFloat(matched[2]);\n const unit = matched[3].toLowerCase();\n let numericDate;\n switch (unit) {\n case 'sec':\n case 'secs':\n case 'second':\n case 'seconds':\n case 's':\n numericDate = Math.round(value);\n break;\n case 'minute':\n case 'minutes':\n case 'min':\n case 'mins':\n case 'm':\n numericDate = Math.round(value * minute);\n break;\n case 'hour':\n case 'hours':\n case 'hr':\n case 'hrs':\n case 'h':\n numericDate = Math.round(value * hour);\n break;\n case 'day':\n case 'days':\n case 'd':\n numericDate = Math.round(value * day);\n break;\n case 'week':\n case 'weeks':\n case 'w':\n numericDate = Math.round(value * week);\n break;\n default:\n numericDate = Math.round(value * year);\n break;\n }\n if (matched[1] === '-' || matched[4] === 'ago') {\n return -numericDate;\n }\n return numericDate;\n}\nfunction validateInput(label, input) {\n if (!Number.isFinite(input)) {\n throw new TypeError(`Invalid ${label} input`);\n }\n return input;\n}\nconst normalizeTyp = (value) => {\n if (value.includes('/')) {\n return value.toLowerCase();\n }\n return `application/${value.toLowerCase()}`;\n};\nconst checkAudiencePresence = (audPayload, audOption) => {\n if (typeof audPayload === 'string') {\n return audOption.includes(audPayload);\n }\n if (Array.isArray(audPayload)) {\n return audOption.some(Set.prototype.has.bind(new Set(audPayload)));\n }\n return false;\n};\nexport function validateClaimsSet(protectedHeader, encodedPayload, options = {}) {\n let payload;\n try {\n payload = JSON.parse(decoder.decode(encodedPayload));\n }\n catch {\n }\n if (!isObject(payload)) {\n throw new JWTInvalid('JWT Claims Set must be a top-level JSON object');\n }\n const { typ } = options;\n if (typ &&\n (typeof protectedHeader.typ !== 'string' ||\n normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) {\n throw new JWTClaimValidationFailed('unexpected \"typ\" JWT header value', payload, 'typ', 'check_failed');\n }\n const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options;\n const presenceCheck = [...requiredClaims];\n if (maxTokenAge !== undefined)\n presenceCheck.push('iat');\n if (audience !== undefined)\n presenceCheck.push('aud');\n if (subject !== undefined)\n presenceCheck.push('sub');\n if (issuer !== undefined)\n presenceCheck.push('iss');\n for (const claim of new Set(presenceCheck.reverse())) {\n if (!(claim in payload)) {\n throw new JWTClaimValidationFailed(`missing required \"${claim}\" claim`, payload, claim, 'missing');\n }\n }\n if (issuer &&\n !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) {\n throw new JWTClaimValidationFailed('unexpected \"iss\" claim value', payload, 'iss', 'check_failed');\n }\n if (subject && payload.sub !== subject) {\n throw new JWTClaimValidationFailed('unexpected \"sub\" claim value', payload, 'sub', 'check_failed');\n }\n if (audience &&\n !checkAudiencePresence(payload.aud, typeof audience === 'string' ? [audience] : audience)) {\n throw new JWTClaimValidationFailed('unexpected \"aud\" claim value', payload, 'aud', 'check_failed');\n }\n let tolerance;\n switch (typeof options.clockTolerance) {\n case 'string':\n tolerance = secs(options.clockTolerance);\n break;\n case 'number':\n tolerance = options.clockTolerance;\n break;\n case 'undefined':\n tolerance = 0;\n break;\n default:\n throw new TypeError('Invalid clockTolerance option type');\n }\n const { currentDate } = options;\n const now = epoch(currentDate || new Date());\n if ((payload.iat !== undefined || maxTokenAge) && typeof payload.iat !== 'number') {\n throw new JWTClaimValidationFailed('\"iat\" claim must be a number', payload, 'iat', 'invalid');\n }\n if (payload.nbf !== undefined) {\n if (typeof payload.nbf !== 'number') {\n throw new JWTClaimValidationFailed('\"nbf\" claim must be a number', payload, 'nbf', 'invalid');\n }\n if (payload.nbf > now + tolerance) {\n throw new JWTClaimValidationFailed('\"nbf\" claim timestamp check failed', payload, 'nbf', 'check_failed');\n }\n }\n if (payload.exp !== undefined) {\n if (typeof payload.exp !== 'number') {\n throw new JWTClaimValidationFailed('\"exp\" claim must be a number', payload, 'exp', 'invalid');\n }\n if (payload.exp <= now - tolerance) {\n throw new JWTExpired('\"exp\" claim timestamp check failed', payload, 'exp', 'check_failed');\n }\n }\n if (maxTokenAge) {\n const age = now - payload.iat;\n const max = typeof maxTokenAge === 'number' ? maxTokenAge : secs(maxTokenAge);\n if (age - tolerance > max) {\n throw new JWTExpired('\"iat\" claim timestamp check failed (too far in the past)', payload, 'iat', 'check_failed');\n }\n if (age < 0 - tolerance) {\n throw new JWTClaimValidationFailed('\"iat\" claim timestamp check failed (it should be in the past)', payload, 'iat', 'check_failed');\n }\n }\n return payload;\n}\nexport class JWTClaimsBuilder {\n #payload;\n constructor(payload) {\n if (!isObject(payload)) {\n throw new TypeError('JWT Claims Set MUST be an object');\n }\n this.#payload = structuredClone(payload);\n }\n data() {\n return encoder.encode(JSON.stringify(this.#payload));\n }\n get iss() {\n return this.#payload.iss;\n }\n set iss(value) {\n this.#payload.iss = value;\n }\n get sub() {\n return this.#payload.sub;\n }\n set sub(value) {\n this.#payload.sub = value;\n }\n get aud() {\n return this.#payload.aud;\n }\n set aud(value) {\n this.#payload.aud = value;\n }\n set jti(value) {\n this.#payload.jti = value;\n }\n set nbf(value) {\n if (typeof value === 'number') {\n this.#payload.nbf = validateInput('setNotBefore', value);\n }\n else if (value instanceof Date) {\n this.#payload.nbf = validateInput('setNotBefore', epoch(value));\n }\n else {\n this.#payload.nbf = epoch(new Date()) + secs(value);\n }\n }\n set exp(value) {\n if (typeof value === 'number') {\n this.#payload.exp = validateInput('setExpirationTime', value);\n }\n else if (value instanceof Date) {\n this.#payload.exp = validateInput('setExpirationTime', epoch(value));\n }\n else {\n this.#payload.exp = epoch(new Date()) + secs(value);\n }\n }\n set iat(value) {\n if (value === undefined) {\n this.#payload.iat = epoch(new Date());\n }\n else if (value instanceof Date) {\n this.#payload.iat = validateInput('setIssuedAt', epoch(value));\n }\n else if (typeof value === 'string') {\n this.#payload.iat = validateInput('setIssuedAt', epoch(new Date()) + secs(value));\n }\n else {\n this.#payload.iat = validateInput('setIssuedAt', value);\n }\n }\n}\n", "import { FlattenedSign } from '../flattened/sign.js';\nexport class CompactSign {\n #flattened;\n constructor(payload) {\n this.#flattened = new FlattenedSign(payload);\n }\n setProtectedHeader(protectedHeader) {\n this.#flattened.setProtectedHeader(protectedHeader);\n return this;\n }\n async sign(key, options) {\n const jws = await this.#flattened.sign(key, options);\n if (jws.payload === undefined) {\n throw new TypeError('use the flattened module for creating JWS with b64: false');\n }\n return `${jws.protected}.${jws.payload}.${jws.signature}`;\n }\n}\n", "import { encode as b64u } from '../../util/base64url.js';\nimport { sign } from '../../lib/signing.js';\nimport { isDisjoint } from '../../lib/type_checks.js';\nimport { JWSInvalid } from '../../util/errors.js';\nimport { concat, encode } from '../../lib/buffer_utils.js';\nimport { checkKeyType } from '../../lib/check_key_type.js';\nimport { validateCrit } from '../../lib/validate_crit.js';\nimport { normalizeKey } from '../../lib/normalize_key.js';\nimport { assertNotSet } from '../../lib/helpers.js';\nexport class FlattenedSign {\n #payload;\n #protectedHeader;\n #unprotectedHeader;\n constructor(payload) {\n if (!(payload instanceof Uint8Array)) {\n throw new TypeError('payload must be an instance of Uint8Array');\n }\n this.#payload = payload;\n }\n setProtectedHeader(protectedHeader) {\n assertNotSet(this.#protectedHeader, 'setProtectedHeader');\n this.#protectedHeader = protectedHeader;\n return this;\n }\n setUnprotectedHeader(unprotectedHeader) {\n assertNotSet(this.#unprotectedHeader, 'setUnprotectedHeader');\n this.#unprotectedHeader = unprotectedHeader;\n return this;\n }\n async sign(key, options) {\n if (!this.#protectedHeader && !this.#unprotectedHeader) {\n throw new JWSInvalid('either setProtectedHeader or setUnprotectedHeader must be called before #sign()');\n }\n if (!isDisjoint(this.#protectedHeader, this.#unprotectedHeader)) {\n throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');\n }\n const joseHeader = {\n ...this.#protectedHeader,\n ...this.#unprotectedHeader,\n };\n const extensions = validateCrit(JWSInvalid, new Map([['b64', true]]), options?.crit, this.#protectedHeader, joseHeader);\n let b64 = true;\n if (extensions.has('b64')) {\n b64 = this.#protectedHeader.b64;\n if (typeof b64 !== 'boolean') {\n throw new JWSInvalid('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean');\n }\n }\n const { alg } = joseHeader;\n if (typeof alg !== 'string' || !alg) {\n throw new JWSInvalid('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');\n }\n checkKeyType(alg, key, 'sign');\n let payloadS;\n let payloadB;\n if (b64) {\n payloadS = b64u(this.#payload);\n payloadB = encode(payloadS);\n }\n else {\n payloadB = this.#payload;\n payloadS = '';\n }\n let protectedHeaderString;\n let protectedHeaderBytes;\n if (this.#protectedHeader) {\n protectedHeaderString = b64u(JSON.stringify(this.#protectedHeader));\n protectedHeaderBytes = encode(protectedHeaderString);\n }\n else {\n protectedHeaderString = '';\n protectedHeaderBytes = new Uint8Array();\n }\n const data = concat(protectedHeaderBytes, encode('.'), payloadB);\n const k = await normalizeKey(key, alg);\n const signature = await sign(alg, k, data);\n const jws = {\n signature: b64u(signature),\n payload: payloadS,\n };\n if (this.#unprotectedHeader) {\n jws.header = this.#unprotectedHeader;\n }\n if (this.#protectedHeader) {\n jws.protected = protectedHeaderString;\n }\n return jws;\n }\n}\n", "import { CompactSign } from '../jws/compact/sign.js';\nimport { JWTInvalid } from '../util/errors.js';\nimport { JWTClaimsBuilder } from '../lib/jwt_claims_set.js';\nexport class SignJWT {\n #protectedHeader;\n #jwt;\n constructor(payload = {}) {\n this.#jwt = new JWTClaimsBuilder(payload);\n }\n setIssuer(issuer) {\n this.#jwt.iss = issuer;\n return this;\n }\n setSubject(subject) {\n this.#jwt.sub = subject;\n return this;\n }\n setAudience(audience) {\n this.#jwt.aud = audience;\n return this;\n }\n setJti(jwtId) {\n this.#jwt.jti = jwtId;\n return this;\n }\n setNotBefore(input) {\n this.#jwt.nbf = input;\n return this;\n }\n setExpirationTime(input) {\n this.#jwt.exp = input;\n return this;\n }\n setIssuedAt(input) {\n this.#jwt.iat = input;\n return this;\n }\n setProtectedHeader(protectedHeader) {\n this.#protectedHeader = protectedHeader;\n return this;\n }\n async sign(key, options) {\n const sig = new CompactSign(this.#jwt.data());\n sig.setProtectedHeader(this.#protectedHeader);\n if (Array.isArray(this.#protectedHeader?.crit) &&\n this.#protectedHeader.crit.includes('b64') &&\n this.#protectedHeader.b64 === false) {\n throw new JWTInvalid('JWTs MUST NOT use unencoded payload');\n }\n return sig.sign(key, options);\n }\n}\n", "export class ApiError extends Error {\n public statusCode: number;\n public details?: any;\n\n constructor(message: string, statusCode: number = 500, details?: any) {\n console.log(message)\n \n super(message);\n this.name = 'ApiError';\n this.statusCode = statusCode;\n this.details = details;\n Error.captureStackTrace?.(this, ApiError);\n }\n}", "\n// Old env loading (Node only)\n// export const appUrl = process.env.APP_URL as string;\n//\n// export const jwtSecret: string = process.env.JWT_SECRET as string\n//\n// export const defaultRoleName = 'gen_user';\n//\n// export const encodedJwtSecret = new TextEncoder().encode(jwtSecret)\n//\n// export const s3AccessKeyId = process.env.S3_ACCESS_KEY_ID as string\n//\n// export const s3SecretAccessKey = process.env.S3_SECRET_ACCESS_KEY as string\n//\n// export const s3BucketName = process.env.S3_BUCKET_NAME as string\n//\n// export const s3Region = process.env.S3_REGION as string\n//\n// export const assetsDomain = process.env.ASSETS_DOMAIN as string;\n//\n// export const apiCacheKey = process.env.API_CACHE_KEY as string;\n//\n// export const cloudflareApiToken = process.env.CLOUDFLARE_API_TOKEN as string;\n//\n// export const cloudflareZoneId = process.env.CLOUDFLARE_ZONE_ID as string;\n//\n// export const s3Url = process.env.S3_URL as string\n//\n// export const redisUrl = process.env.REDIS_URL as string\n//\n//\n// export const expoAccessToken = process.env.EXPO_ACCESS_TOKEN as string;\n//\n// export const phonePeBaseUrl = process.env.PHONE_PE_BASE_URL as string;\n//\n// export const phonePeClientId = process.env.PHONE_PE_CLIENT_ID as string;\n//\n// export const phonePeClientVersion = Number(process.env.PHONE_PE_CLIENT_VERSION as string);\n//\n// export const phonePeClientSecret = process.env.PHONE_PE_CLIENT_SECRET as string;\n//\n// export const phonePeMerchantId = process.env.PHONE_PE_MERCHANT_ID as string;\n//\n// export const razorpayId = process.env.RAZORPAY_KEY as string;\n//\n// export const razorpaySecret = process.env.RAZORPAY_SECRET as string;\n//\n// export const otpSenderAuthToken = process.env.OTP_SENDER_AUTH_TOKEN as string;\n//\n// export const minOrderValue = Number(process.env.MIN_ORDER_VALUE as string);\n//\n// export const deliveryCharge = Number(process.env.DELIVERY_CHARGE as string);\n//\n// export const telegramBotToken = process.env.TELEGRAM_BOT_TOKEN as string;\n//\n// export const telegramChatIds = (process.env.TELEGRAM_CHAT_IDS as string)?.split(',').map(id => id.trim()) || [];\n//\n// export const isDevMode = (process.env.ENV_MODE as string) === 'dev';\n\nconst runtimeEnv = (globalThis as any).ENV || (globalThis as any).process?.env || {}\n\nexport const appUrl = runtimeEnv.APP_URL as string\n\nexport const jwtSecret: string = runtimeEnv.JWT_SECRET as string\n\nexport const defaultRoleName = 'gen_user';\n\nexport const encodedJwtSecret = new TextEncoder().encode(jwtSecret)\n\nexport const s3AccessKeyId = runtimeEnv.S3_ACCESS_KEY_ID as string\n\nexport const s3SecretAccessKey = runtimeEnv.S3_SECRET_ACCESS_KEY as string\n\nexport const s3BucketName = runtimeEnv.S3_BUCKET_NAME as string\n\nexport const s3Region = runtimeEnv.S3_REGION as string\n\nexport const assetsDomain = runtimeEnv.ASSETS_DOMAIN as string\n\nexport const apiCacheKey = runtimeEnv.API_CACHE_KEY as string\n\nexport const cloudflareApiToken = runtimeEnv.CLOUDFLARE_API_TOKEN as string\n\nexport const cloudflareZoneId = runtimeEnv.CLOUDFLARE_ZONE_ID as string\n\nexport const s3Url = runtimeEnv.S3_URL as string\n\nexport const redisUrl = runtimeEnv.REDIS_URL as string\n\nexport const expoAccessToken = runtimeEnv.EXPO_ACCESS_TOKEN as string\n\nexport const phonePeBaseUrl = runtimeEnv.PHONE_PE_BASE_URL as string\n\nexport const phonePeClientId = runtimeEnv.PHONE_PE_CLIENT_ID as string\n\nexport const phonePeClientVersion = Number(runtimeEnv.PHONE_PE_CLIENT_VERSION as string)\n\nexport const phonePeClientSecret = runtimeEnv.PHONE_PE_CLIENT_SECRET as string\n\nexport const phonePeMerchantId = runtimeEnv.PHONE_PE_MERCHANT_ID as string\n\nexport const razorpayId = runtimeEnv.RAZORPAY_KEY as string\n\nexport const razorpaySecret = runtimeEnv.RAZORPAY_SECRET as string\n\nexport const otpSenderAuthToken = runtimeEnv.OTP_SENDER_AUTH_TOKEN as string\n\nexport const minOrderValue = Number(runtimeEnv.MIN_ORDER_VALUE as string)\n\nexport const deliveryCharge = Number(runtimeEnv.DELIVERY_CHARGE as string)\n\nexport const telegramBotToken = runtimeEnv.TELEGRAM_BOT_TOKEN as string\n\nexport const telegramChatIds = (runtimeEnv.TELEGRAM_CHAT_IDS as string)?.split(',').map(id => id.trim()) || []\n\nexport const isDevMode = (runtimeEnv.ENV_MODE as string) === 'dev'\n", "import { Hono } from 'hono';\nimport commonProductsRouter from \"@/src/apis/common-apis/apis/common-product.router\"\n\nconst router = new Hono();\n\nrouter.route('/products', commonProductsRouter)\n\nconst commonRouter = router;\n\nexport default commonRouter;\n", "import { Hono } from 'hono';\nimport { getAllProductsSummary } from \"@/src/apis/common-apis/apis/common-product.controller\"\n\nconst router = new Hono();\n\nrouter.get(\"/summary\", getAllProductsSummary);\n\n\nconst commonProductsRouter= router;\nexport default commonProductsRouter;\n", "import { Context } from 'hono';\nimport { scaffoldAssetUrl } from \"@/src/lib/s3-client\"\nimport { getNextDeliveryDate } from \"@/src/trpc/apis/common-apis/common\"\nimport {\n getAllProductsWithUnits,\n type ProductSummaryData,\n} from \"@/src/dbService\"\n\n/**\n * Get all products summary for dropdown\n */\nexport const getAllProductsSummary = async (c: Context) => {\n try {\n const tagId = c.req.query('tagId');\n const tagIdNum = tagId ? parseInt(tagId) : undefined;\n\n // If tagId is provided but no products found, return empty array\n if (tagIdNum) {\n const products = await getAllProductsWithUnits(tagIdNum);\n if (products.length === 0) {\n return c.json({\n products: [],\n count: 0,\n }, 200);\n }\n }\n\n const productsWithUnits = await getAllProductsWithUnits(tagIdNum);\n\n // Generate signed URLs for product images\n const formattedProducts = await Promise.all(\n productsWithUnits.map(async (product: ProductSummaryData) => {\n const nextDeliveryDate = await getNextDeliveryDate(product.id);\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n marketPrice: product.marketPrice,\n unit: product.unitShortNotation,\n productQuantity: product.productQuantity,\n isOutOfStock: product.isOutOfStock,\n nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null,\n images: scaffoldAssetUrl((product.images as string[]) || []),\n };\n })\n );\n\n return c.json({\n products: formattedProducts,\n count: formattedProducts.length,\n }, 200);\n } catch (error) {\n console.error(\"Get products summary error:\", error);\n return c.json({ error: \"Failed to fetch products summary\" }, 500);\n }\n};\n\n/*\n// Old implementation - direct DB queries:\nimport { eq, gt, and, sql, inArray } from \"drizzle-orm\";\nimport { db } from \"@/src/db/db_index\"\nimport { productInfo, units, productSlots, deliverySlotInfo, productTags } from \"@/src/db/schema\"\n\nconst getNextDeliveryDate = async (productId: number): Promise => {\n const result = await db\n .select({ deliveryTime: deliverySlotInfo.deliveryTime })\n .from(productSlots)\n .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n .where(\n and(\n eq(productSlots.productId, productId),\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, sql`NOW()`)\n )\n )\n .orderBy(deliverySlotInfo.deliveryTime)\n .limit(1);\n \n return result[0]?.deliveryTime || null;\n};\n\nexport const getAllProductsSummary = async (req: Request, res: Response) => {\n try {\n const { tagId } = req.query;\n const tagIdNum = tagId ? parseInt(tagId as string) : null;\n\n let productIds: number[] | null = null;\n\n // If tagId is provided, get products that have this tag\n if (tagIdNum) {\n const taggedProducts = await db\n .select({ productId: productTags.productId })\n .from(productTags)\n .where(eq(productTags.tagId, tagIdNum));\n\n productIds = taggedProducts.map(tp => tp.productId);\n }\n\n let whereCondition = undefined;\n\n // Filter by product IDs if tag filtering is applied\n if (productIds && productIds.length > 0) {\n whereCondition = inArray(productInfo.id, productIds);\n } else if (tagIdNum) {\n // If tagId was provided but no products found, return empty array\n return res.status(200).json({\n products: [],\n count: 0,\n });\n }\n\n const productsWithUnits = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n productQuantity: productInfo.productQuantity,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(whereCondition);\n\n // Generate signed URLs for product images\n const formattedProducts = await Promise.all(\n productsWithUnits.map(async (product) => {\n const nextDeliveryDate = await getNextDeliveryDate(product.id);\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n marketPrice: product.marketPrice,\n unit: product.unitShortNotation,\n productQuantity: product.productQuantity,\n isOutOfStock: product.isOutOfStock,\n nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null,\n images: scaffoldAssetUrl((product.images as string[]) || []),\n };\n })\n );\n\n return res.status(200).json({\n products: formattedProducts,\n count: formattedProducts.length,\n });\n } catch (error) {\n console.error(\"Get products summary error:\", error);\n return res.status(500).json({ error: \"Failed to fetch products summary\" });\n }\n};\n*/\n", "// import { s3A, awsBucketName, awsRegion, awsSecretAccessKey } from \"@/src/lib/env-exporter\"\nimport { DeleteObjectCommand, DeleteObjectsCommand, PutObjectCommand, S3Client, GetObjectCommand } from \"@aws-sdk/client-s3\"\nimport { getSignedUrl } from \"@aws-sdk/s3-request-presigner\"\n// import signedUrlCache from \"@/src/lib/signed-url-cache\" // Disabled for Workers compatibility\nimport { claimUploadUrlStatus, createUploadUrlStatus } from '@/src/dbService'\nimport { s3AccessKeyId, s3Region, s3Url, s3SecretAccessKey, s3BucketName, assetsDomain } from \"@/src/lib/env-exporter\"\n\nlet s3Client: S3Client | null = null\n\nconst getS3Client = () => {\n if (!s3Client) {\n s3Client = new S3Client({\n region: s3Region,\n endpoint: s3Url,\n forcePathStyle: true,\n credentials: {\n accessKeyId: s3AccessKeyId,\n secretAccessKey: s3SecretAccessKey,\n },\n })\n }\n return s3Client\n}\n\nexport const imageUploadS3 = async(body: Buffer, type: string, key:string) => {\n // const key = `${category}/${Date.now()}`\n const command = new PutObjectCommand({\n Bucket: s3BucketName,\n Key: key,\n Body: body,\n ContentType: type,\n })\n const resp = await s3Client.send(command)\n \n const imageUrl = `${key}`\n return imageUrl;\n}\n\n\n// export async function deleteImageUtil(...keys:string[]):Promise;\n\nexport async function deleteImageUtil({bucket = s3BucketName, keys}:{bucket?:string, keys: string[]}) {\n \n if (keys.length === 0) {\n return true;\n }\n try {\n const deleteParams = {\n Bucket: bucket,\n Delete: {\n Objects: keys.map((key) => ({ Key: key })),\n Quiet: false,\n }\n }\n \n const deleteCommand = new DeleteObjectsCommand(deleteParams)\n await s3Client.send(deleteCommand)\n return true\n }\n catch (error) {\n console.error(\"Error deleting image:\", error)\n throw new Error(\"Failed to delete image\")\n return false;\n }\n}\n\nexport function scaffoldAssetUrl(input: string | null): string\nexport function scaffoldAssetUrl(input: (string | null)[]): string[]\nexport function scaffoldAssetUrl(input: string | null | (string | null)[]): string | string[] {\n if (Array.isArray(input)) {\n return input.map(key => scaffoldAssetUrl(key) as string);\n }\n if (!input) {\n return '';\n }\n const normalizedKey = input.replace(/^\\/+/, '');\n const domain = assetsDomain.endsWith('/')\n ? assetsDomain.slice(0, -1)\n : assetsDomain;\n return `${domain}/${normalizedKey}`;\n}\n\n\n/**\n * Generate a signed URL from an S3 URL\n * @param s3Url The full S3 URL (e.g., https://bucket-name.s3.region.amazonaws.com/path/to/object)\n * @param expiresIn Expiration time in seconds (default: 259200 seconds = 3 days)\n * @returns A pre-signed URL that provides temporary access to the object\n */\nexport async function generateSignedUrlFromS3Url(s3UrlRaw: string|null, expiresIn: number = 259200): Promise {\n if (!s3UrlRaw) {\n return '';\n }\n\n const s3Url = s3UrlRaw\n \n try {\n // Cache disabled for Workers compatibility\n // const cachedUrl = signedUrlCache.get(s3Url);\n // if (cachedUrl) {\n // return cachedUrl;\n // }\n \n // Create the command to get the object\n const command = new GetObjectCommand({\n Bucket: s3BucketName,\n Key: s3Url,\n });\n \n // Generate the signed URL\n const signedUrl = await getSignedUrl(s3Client, command, { expiresIn });\n \n // Cache disabled for Workers compatibility\n // signedUrlCache.set(s3Url, signedUrl, (expiresIn * 1000) - 60000);\n \n return signedUrl;\n } catch (error) {\n console.error(\"Error generating signed URL:\", error);\n throw new Error(\"Failed to generate signed URL\");\n }\n}\n\n/**\n * Get the original S3 URL from a signed URL\n * @param signedUrl The signed URL \n * @returns The original S3 URL if found in cache, otherwise null\n */\nexport function getOriginalUrlFromSignedUrl(signedUrl: string|null): string|null {\n // Cache disabled for Workers compatibility - cannot retrieve original URL without cache\n // To re-enable, migrate signed-url-cache to object storage (R2/S3)\n return null;\n}\n\n/**\n * Generate signed URLs for multiple S3 URLs\n * @param s3Urls Array of S3 URLs or null values\n * @param expiresIn Expiration time in seconds (default: 259200 seconds = 3 days)\n * @returns Array of signed URLs (empty strings for null/invalid inputs)\n */\nexport async function generateSignedUrlsFromS3Urls(s3Urls: (string|null)[], expiresIn: number = 259200): Promise {\n if (!s3Urls || !s3Urls.length) {\n return [];\n }\n\n try {\n // Process URLs in parallel for better performance\n const signedUrls = await Promise.all(\n s3Urls.map(url => generateSignedUrlFromS3Url(url, expiresIn).catch(() => ''))\n );\n \n return signedUrls;\n } catch (error) {\n console.error(\"Error generating multiple signed URLs:\", error);\n // Return an array of empty strings with the same length as input\n return s3Urls.map(() => '');\n }\n}\n\nexport async function generateUploadUrl(key: string, mimeType: string, expiresIn: number = 180): Promise {\n try {\n // Insert record into upload_url_status\n await createUploadUrlStatus(key)\n\n // Generate signed upload URL\n const command = new PutObjectCommand({\n Bucket: s3BucketName,\n Key: key,\n ContentType: mimeType,\n });\n\n const signedUrl = await getSignedUrl(s3Client, command, { expiresIn });\n return signedUrl;\n } catch (error) {\n console.error('Error generating upload URL:', error);\n throw new Error('Failed to generate upload URL');\n }\n}\n\n\n// export function extractKeyFromPresignedUrl(url:string) {\n// const u = new URL(url);\n// const rawKey = u.pathname.replace(/^\\/+/, \"\"); // remove leading slash\n// return decodeURIComponent(rawKey);\n// }\n\n// New function (excludes bucket name)\nexport function extractKeyFromPresignedUrl(url: string): string {\n const u = new URL(url);\n const rawKey = u.pathname.replace(/^\\/+/, \"\"); // remove leading slash\n const decodedKey = decodeURIComponent(rawKey);\n // Remove bucket prefix\n const parts = decodedKey.split('/');\n parts.shift(); // Remove bucket name\n return parts.join('/');\n}\n\nexport async function claimUploadUrl(url: string): Promise {\n try {\n const semiKey = extractKeyFromPresignedUrl(url);\n\n // Update status to 'claimed' if currently 'pending'\n const updated = await claimUploadUrlStatus(semiKey)\n \n if (!updated) {\n throw new Error('Upload URL not found or already claimed');\n }\n } catch (error) {\n console.error('Error claiming upload URL:', error);\n throw new Error('Failed to claim upload URL');\n }\n}\n", "export const SMITHY_CONTEXT_KEY = \"__smithy_context\";\n", "export class HttpRequest {\n method;\n protocol;\n hostname;\n port;\n path;\n query;\n headers;\n username;\n password;\n fragment;\n body;\n constructor(options) {\n this.method = options.method || \"GET\";\n this.hostname = options.hostname || \"localhost\";\n this.port = options.port;\n this.query = options.query || {};\n this.headers = options.headers || {};\n this.body = options.body;\n this.protocol = options.protocol\n ? options.protocol.slice(-1) !== \":\"\n ? `${options.protocol}:`\n : options.protocol\n : \"https:\";\n this.path = options.path ? (options.path.charAt(0) !== \"/\" ? `/${options.path}` : options.path) : \"/\";\n this.username = options.username;\n this.password = options.password;\n this.fragment = options.fragment;\n }\n static clone(request) {\n const cloned = new HttpRequest({\n ...request,\n headers: { ...request.headers },\n });\n if (cloned.query) {\n cloned.query = cloneQuery(cloned.query);\n }\n return cloned;\n }\n static isInstance(request) {\n if (!request) {\n return false;\n }\n const req = request;\n return (\"method\" in req &&\n \"protocol\" in req &&\n \"hostname\" in req &&\n \"path\" in req &&\n typeof req[\"query\"] === \"object\" &&\n typeof req[\"headers\"] === \"object\");\n }\n clone() {\n return HttpRequest.clone(this);\n }\n}\nfunction cloneQuery(query) {\n return Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param,\n };\n }, {});\n}\n", "export class HttpResponse {\n statusCode;\n reason;\n headers;\n body;\n constructor(options) {\n this.statusCode = options.statusCode;\n this.reason = options.reason;\n this.headers = options.headers || {};\n this.body = options.body;\n }\n static isInstance(response) {\n if (!response)\n return false;\n const resp = response;\n return typeof resp.statusCode === \"number\" && typeof resp.headers === \"object\";\n }\n}\n", "export const RequestChecksumCalculation = {\n WHEN_SUPPORTED: \"WHEN_SUPPORTED\",\n WHEN_REQUIRED: \"WHEN_REQUIRED\",\n};\nexport const DEFAULT_REQUEST_CHECKSUM_CALCULATION = RequestChecksumCalculation.WHEN_SUPPORTED;\nexport const ResponseChecksumValidation = {\n WHEN_SUPPORTED: \"WHEN_SUPPORTED\",\n WHEN_REQUIRED: \"WHEN_REQUIRED\",\n};\nexport const DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.WHEN_SUPPORTED;\nexport var ChecksumAlgorithm;\n(function (ChecksumAlgorithm) {\n ChecksumAlgorithm[\"MD5\"] = \"MD5\";\n ChecksumAlgorithm[\"CRC32\"] = \"CRC32\";\n ChecksumAlgorithm[\"CRC32C\"] = \"CRC32C\";\n ChecksumAlgorithm[\"CRC64NVME\"] = \"CRC64NVME\";\n ChecksumAlgorithm[\"SHA1\"] = \"SHA1\";\n ChecksumAlgorithm[\"SHA256\"] = \"SHA256\";\n})(ChecksumAlgorithm || (ChecksumAlgorithm = {}));\nexport var ChecksumLocation;\n(function (ChecksumLocation) {\n ChecksumLocation[\"HEADER\"] = \"header\";\n ChecksumLocation[\"TRAILER\"] = \"trailer\";\n})(ChecksumLocation || (ChecksumLocation = {}));\nexport const DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.CRC32;\n", "import { setFeature } from \"@aws-sdk/core\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { createBufferedReadable } from \"@smithy/util-stream\";\nimport { ChecksumAlgorithm, DEFAULT_CHECKSUM_ALGORITHM, RequestChecksumCalculation } from \"./constants\";\nimport { getChecksumAlgorithmForRequest } from \"./getChecksumAlgorithmForRequest\";\nimport { getChecksumLocationName } from \"./getChecksumLocationName\";\nimport { hasHeader } from \"./hasHeader\";\nimport { hasHeaderWithPrefix } from \"./hasHeaderWithPrefix\";\nimport { isStreaming } from \"./isStreaming\";\nimport { selectChecksumAlgorithmFunction } from \"./selectChecksumAlgorithmFunction\";\nimport { stringHasher } from \"./stringHasher\";\nexport const flexibleChecksumsMiddlewareOptions = {\n name: \"flexibleChecksumsMiddleware\",\n step: \"build\",\n tags: [\"BODY_CHECKSUM\"],\n override: true,\n};\nexport const flexibleChecksumsMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {\n if (!HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n if (hasHeaderWithPrefix(\"x-amz-checksum-\", args.request.headers)) {\n return next(args);\n }\n const { request, input } = args;\n const { body: requestBody, headers } = request;\n const { base64Encoder, streamHasher } = config;\n const { requestChecksumRequired, requestAlgorithmMember } = middlewareConfig;\n const requestChecksumCalculation = await config.requestChecksumCalculation();\n const requestAlgorithmMemberName = requestAlgorithmMember?.name;\n const requestAlgorithmMemberHttpHeader = requestAlgorithmMember?.httpHeader;\n if (requestAlgorithmMemberName && !input[requestAlgorithmMemberName]) {\n if (requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired) {\n input[requestAlgorithmMemberName] = DEFAULT_CHECKSUM_ALGORITHM;\n if (requestAlgorithmMemberHttpHeader) {\n headers[requestAlgorithmMemberHttpHeader] = DEFAULT_CHECKSUM_ALGORITHM;\n }\n }\n }\n const checksumAlgorithm = getChecksumAlgorithmForRequest(input, {\n requestChecksumRequired,\n requestAlgorithmMember: requestAlgorithmMember?.name,\n requestChecksumCalculation,\n });\n let updatedBody = requestBody;\n let updatedHeaders = headers;\n if (checksumAlgorithm) {\n switch (checksumAlgorithm) {\n case ChecksumAlgorithm.CRC32:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_CRC32\", \"U\");\n break;\n case ChecksumAlgorithm.CRC32C:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_CRC32C\", \"V\");\n break;\n case ChecksumAlgorithm.CRC64NVME:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_CRC64\", \"W\");\n break;\n case ChecksumAlgorithm.SHA1:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_SHA1\", \"X\");\n break;\n case ChecksumAlgorithm.SHA256:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_SHA256\", \"Y\");\n break;\n }\n const checksumLocationName = getChecksumLocationName(checksumAlgorithm);\n const checksumAlgorithmFn = selectChecksumAlgorithmFunction(checksumAlgorithm, config);\n if (isStreaming(requestBody)) {\n const { getAwsChunkedEncodingStream, bodyLengthChecker } = config;\n updatedBody = getAwsChunkedEncodingStream(typeof config.requestStreamBufferSize === \"number\" && config.requestStreamBufferSize >= 8 * 1024\n ? createBufferedReadable(requestBody, config.requestStreamBufferSize, context.logger)\n : requestBody, {\n base64Encoder,\n bodyLengthChecker,\n checksumLocationName,\n checksumAlgorithmFn,\n streamHasher,\n });\n updatedHeaders = {\n ...headers,\n \"content-encoding\": headers[\"content-encoding\"]\n ? `${headers[\"content-encoding\"]},aws-chunked`\n : \"aws-chunked\",\n \"transfer-encoding\": \"chunked\",\n \"x-amz-decoded-content-length\": headers[\"content-length\"],\n \"x-amz-content-sha256\": \"STREAMING-UNSIGNED-PAYLOAD-TRAILER\",\n \"x-amz-trailer\": checksumLocationName,\n };\n delete updatedHeaders[\"content-length\"];\n }\n else if (!hasHeader(checksumLocationName, headers)) {\n const rawChecksum = await stringHasher(checksumAlgorithmFn, requestBody);\n updatedHeaders = {\n ...headers,\n [checksumLocationName]: base64Encoder(rawChecksum),\n };\n }\n }\n try {\n const result = await next({\n ...args,\n request: {\n ...request,\n headers: updatedHeaders,\n body: updatedBody,\n },\n });\n return result;\n }\n catch (e) {\n if (e instanceof Error && e.name === \"InvalidChunkSizeError\") {\n try {\n if (!e.message.endsWith(\".\")) {\n e.message += \".\";\n }\n e.message +=\n \" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream.\";\n }\n catch (ignored) {\n }\n }\n throw e;\n }\n};\n", "export function setFeature(context, feature, value) {\n if (!context.__aws_sdk_context) {\n context.__aws_sdk_context = {\n features: {},\n };\n }\n else if (!context.__aws_sdk_context.features) {\n context.__aws_sdk_context.features = {};\n }\n context.__aws_sdk_context.features[feature] = value;\n}\n", "import { SMITHY_CONTEXT_KEY } from \"@smithy/types\";\nexport const getSmithyContext = (context) => context[SMITHY_CONTEXT_KEY] || (context[SMITHY_CONTEXT_KEY] = {});\n", "export const normalizeProvider = (input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n};\n", "const chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;\nexport const alphabetByEncoding = Object.entries(chars).reduce((acc, [i, c]) => {\n acc[c] = Number(i);\n return acc;\n}, {});\nexport const alphabetByValue = chars.split(\"\");\nexport const bitsPerLetter = 6;\nexport const bitsPerByte = 8;\nexport const maxLetterValue = 0b111111;\n", "import { fromUtf8 } from \"@smithy/util-utf8\";\nimport { alphabetByValue, bitsPerByte, bitsPerLetter, maxLetterValue } from \"./constants.browser\";\nexport function toBase64(_input) {\n let input;\n if (typeof _input === \"string\") {\n input = fromUtf8(_input);\n }\n else {\n input = _input;\n }\n const isArrayLike = typeof input === \"object\" && typeof input.length === \"number\";\n const isUint8Array = typeof input === \"object\" &&\n typeof input.byteOffset === \"number\" &&\n typeof input.byteLength === \"number\";\n if (!isArrayLike && !isUint8Array) {\n throw new Error(\"@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.\");\n }\n let str = \"\";\n for (let i = 0; i < input.length; i += 3) {\n let bits = 0;\n let bitLength = 0;\n for (let j = i, limit = Math.min(i + 3, input.length); j < limit; j++) {\n bits |= input[j] << ((limit - j - 1) * bitsPerByte);\n bitLength += bitsPerByte;\n }\n const bitClusterCount = Math.ceil(bitLength / bitsPerLetter);\n bits <<= bitClusterCount * bitsPerLetter - bitLength;\n for (let k = 1; k <= bitClusterCount; k++) {\n const offset = (bitClusterCount - k) * bitsPerLetter;\n str += alphabetByValue[(bits & (maxLetterValue << offset)) >> offset];\n }\n str += \"==\".slice(0, 4 - bitClusterCount);\n }\n return str;\n}\n", "const ReadableStreamRef = typeof ReadableStream === \"function\" ? ReadableStream : function () { };\nexport class ChecksumStream extends ReadableStreamRef {\n}\n", "import { toBase64 } from \"@smithy/util-base64\";\nimport { isReadableStream } from \"../stream-type-check\";\nimport { ChecksumStream } from \"./ChecksumStream.browser\";\nexport const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => {\n if (!isReadableStream(source)) {\n throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);\n }\n const encoder = base64Encoder ?? toBase64;\n if (typeof TransformStream !== \"function\") {\n throw new Error(\"@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.\");\n }\n const transform = new TransformStream({\n start() { },\n async transform(chunk, controller) {\n checksum.update(chunk);\n controller.enqueue(chunk);\n },\n async flush(controller) {\n const digest = await checksum.digest();\n const received = encoder(digest);\n if (expectedChecksum !== received) {\n const error = new Error(`Checksum mismatch: expected \"${expectedChecksum}\" but received \"${received}\"` +\n ` in response header \"${checksumSourceLocation}\".`);\n controller.error(error);\n }\n else {\n controller.terminate();\n }\n },\n });\n source.pipeThrough(transform);\n const readable = transform.readable;\n Object.setPrototypeOf(readable, ChecksumStream.prototype);\n return readable;\n};\n", "export const isReadableStream = (stream) => typeof ReadableStream === \"function\" &&\n (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream);\nexport const isBlob = (blob) => {\n return typeof Blob === \"function\" && (blob?.constructor?.name === Blob.name || blob instanceof Blob);\n};\n", "import { ByteArrayCollector } from \"./ByteArrayCollector\";\nexport function createBufferedReadableStream(upstream, size, logger) {\n const reader = upstream.getReader();\n let streamBufferingLoggedWarning = false;\n let bytesSeen = 0;\n const buffers = [\"\", new ByteArrayCollector((size) => new Uint8Array(size))];\n let mode = -1;\n const pull = async (controller) => {\n const { value, done } = await reader.read();\n const chunk = value;\n if (done) {\n if (mode !== -1) {\n const remainder = flush(buffers, mode);\n if (sizeOf(remainder) > 0) {\n controller.enqueue(remainder);\n }\n }\n controller.close();\n }\n else {\n const chunkMode = modeOf(chunk, false);\n if (mode !== chunkMode) {\n if (mode >= 0) {\n controller.enqueue(flush(buffers, mode));\n }\n mode = chunkMode;\n }\n if (mode === -1) {\n controller.enqueue(chunk);\n return;\n }\n const chunkSize = sizeOf(chunk);\n bytesSeen += chunkSize;\n const bufferSize = sizeOf(buffers[mode]);\n if (chunkSize >= size && bufferSize === 0) {\n controller.enqueue(chunk);\n }\n else {\n const newSize = merge(buffers, mode, chunk);\n if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {\n streamBufferingLoggedWarning = true;\n logger?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);\n }\n if (newSize >= size) {\n controller.enqueue(flush(buffers, mode));\n }\n else {\n await pull(controller);\n }\n }\n }\n };\n return new ReadableStream({\n pull,\n });\n}\nexport const createBufferedReadable = createBufferedReadableStream;\nexport function merge(buffers, mode, chunk) {\n switch (mode) {\n case 0:\n buffers[0] += chunk;\n return sizeOf(buffers[0]);\n case 1:\n case 2:\n buffers[mode].push(chunk);\n return sizeOf(buffers[mode]);\n }\n}\nexport function flush(buffers, mode) {\n switch (mode) {\n case 0:\n const s = buffers[0];\n buffers[0] = \"\";\n return s;\n case 1:\n case 2:\n return buffers[mode].flush();\n }\n throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`);\n}\nexport function sizeOf(chunk) {\n return chunk?.byteLength ?? chunk?.length ?? 0;\n}\nexport function modeOf(chunk, allowBuffer = true) {\n if (allowBuffer && typeof Buffer !== \"undefined\" && chunk instanceof Buffer) {\n return 2;\n }\n if (chunk instanceof Uint8Array) {\n return 1;\n }\n if (typeof chunk === \"string\") {\n return 0;\n }\n return -1;\n}\n", "export class ByteArrayCollector {\n allocByteArray;\n byteLength = 0;\n byteArrays = [];\n constructor(allocByteArray) {\n this.allocByteArray = allocByteArray;\n }\n push(byteArray) {\n this.byteArrays.push(byteArray);\n this.byteLength += byteArray.byteLength;\n }\n flush() {\n if (this.byteArrays.length === 1) {\n const bytes = this.byteArrays[0];\n this.reset();\n return bytes;\n }\n const aggregation = this.allocByteArray(this.byteLength);\n let cursor = 0;\n for (let i = 0; i < this.byteArrays.length; ++i) {\n const bytes = this.byteArrays[i];\n aggregation.set(bytes, cursor);\n cursor += bytes.byteLength;\n }\n this.reset();\n return aggregation;\n }\n reset() {\n this.byteArrays = [];\n this.byteLength = 0;\n }\n}\n", "export async function headStream(stream, bytes) {\n let byteLengthCounter = 0;\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n byteLengthCounter += value?.byteLength ?? 0;\n }\n if (byteLengthCounter >= bytes) {\n break;\n }\n isDone = done;\n }\n reader.releaseLock();\n const collected = new Uint8Array(Math.min(bytes, byteLengthCounter));\n let offset = 0;\n for (const chunk of chunks) {\n if (chunk.byteLength > collected.byteLength - offset) {\n collected.set(chunk.subarray(0, collected.byteLength - offset), offset);\n break;\n }\n else {\n collected.set(chunk, offset);\n }\n offset += chunk.length;\n }\n return collected;\n}\n", "import { escapeUri } from \"@smithy/util-uri-escape\";\nexport function buildQueryString(query) {\n const parts = [];\n for (let key of Object.keys(query).sort()) {\n const value = query[key];\n key = escapeUri(key);\n if (Array.isArray(value)) {\n for (let i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(`${key}=${escapeUri(value[i])}`);\n }\n }\n else {\n let qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += `=${escapeUri(value)}`;\n }\n parts.push(qsEntry);\n }\n }\n return parts.join(\"&\");\n}\n", "export const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);\nconst hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;\n", "const SHORT_TO_HEX = {};\nconst HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\nexport function fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n }\n else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n}\nexport function toHex(bytes) {\n let out = \"\";\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n}\n", "export async function splitStream(stream) {\n if (typeof stream.stream === \"function\") {\n stream = stream.stream();\n }\n const readableStream = stream;\n return readableStream.tee();\n}\n", "export const deref = (schemaRef) => {\n if (typeof schemaRef === \"function\") {\n return schemaRef();\n }\n return schemaRef;\n};\n", "import { parseQueryString } from \"@smithy/querystring-parser\";\nexport const parseUrl = (url) => {\n if (typeof url === \"string\") {\n return parseUrl(new URL(url));\n }\n const { hostname, pathname, port, protocol, search } = url;\n let query;\n if (search) {\n query = parseQueryString(search);\n }\n return {\n hostname,\n port: port ? parseInt(port) : undefined,\n protocol,\n path: pathname,\n query,\n };\n};\n", "export function parseQueryString(querystring) {\n const query = {};\n querystring = querystring.replace(/^\\?/, \"\");\n if (querystring) {\n for (const pair of querystring.split(\"&\")) {\n let [key, value = null] = pair.split(\"=\");\n key = decodeURIComponent(key);\n if (value) {\n value = decodeURIComponent(value);\n }\n if (!(key in query)) {\n query[key] = value;\n }\n else if (Array.isArray(query[key])) {\n query[key].push(value);\n }\n else {\n query[key] = [query[key], value];\n }\n }\n }\n return query;\n}\n", "import { deref } from \"../deref\";\nimport { translateTraits } from \"./translateTraits\";\nconst anno = {\n it: Symbol.for(\"@smithy/nor-struct-it\"),\n ns: Symbol.for(\"@smithy/ns\"),\n};\nexport const simpleSchemaCacheN = [];\nexport const simpleSchemaCacheS = {};\nexport class NormalizedSchema {\n ref;\n memberName;\n static symbol = Symbol.for(\"@smithy/nor\");\n symbol = NormalizedSchema.symbol;\n name;\n schema;\n _isMemberSchema;\n traits;\n memberTraits;\n normalizedTraits;\n constructor(ref, memberName) {\n this.ref = ref;\n this.memberName = memberName;\n const traitStack = [];\n let _ref = ref;\n let schema = ref;\n this._isMemberSchema = false;\n while (isMemberSchema(_ref)) {\n traitStack.push(_ref[1]);\n _ref = _ref[0];\n schema = deref(_ref);\n this._isMemberSchema = true;\n }\n if (traitStack.length > 0) {\n this.memberTraits = {};\n for (let i = traitStack.length - 1; i >= 0; --i) {\n const traitSet = traitStack[i];\n Object.assign(this.memberTraits, translateTraits(traitSet));\n }\n }\n else {\n this.memberTraits = 0;\n }\n if (schema instanceof NormalizedSchema) {\n const computedMemberTraits = this.memberTraits;\n Object.assign(this, schema);\n this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits());\n this.normalizedTraits = void 0;\n this.memberName = memberName ?? schema.memberName;\n return;\n }\n this.schema = deref(schema);\n if (isStaticSchema(this.schema)) {\n this.name = `${this.schema[1]}#${this.schema[2]}`;\n this.traits = this.schema[3];\n }\n else {\n this.name = this.memberName ?? String(schema);\n this.traits = 0;\n }\n if (this._isMemberSchema && !memberName) {\n throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`);\n }\n }\n static [Symbol.hasInstance](lhs) {\n const isPrototype = this.prototype.isPrototypeOf(lhs);\n if (!isPrototype && typeof lhs === \"object\" && lhs !== null) {\n const ns = lhs;\n return ns.symbol === this.symbol;\n }\n return isPrototype;\n }\n static of(ref) {\n const keyAble = typeof ref === \"function\" || (typeof ref === \"object\" && ref !== null);\n if (typeof ref === \"number\") {\n if (simpleSchemaCacheN[ref]) {\n return simpleSchemaCacheN[ref];\n }\n }\n else if (typeof ref === \"string\") {\n if (simpleSchemaCacheS[ref]) {\n return simpleSchemaCacheS[ref];\n }\n }\n else if (keyAble) {\n if (ref[anno.ns]) {\n return ref[anno.ns];\n }\n }\n const sc = deref(ref);\n if (sc instanceof NormalizedSchema) {\n return sc;\n }\n if (isMemberSchema(sc)) {\n const [ns, traits] = sc;\n if (ns instanceof NormalizedSchema) {\n Object.assign(ns.getMergedTraits(), translateTraits(traits));\n return ns;\n }\n throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`);\n }\n const ns = new NormalizedSchema(sc);\n if (keyAble) {\n return (ref[anno.ns] = ns);\n }\n if (typeof sc === \"string\") {\n return (simpleSchemaCacheS[sc] = ns);\n }\n if (typeof sc === \"number\") {\n return (simpleSchemaCacheN[sc] = ns);\n }\n return ns;\n }\n getSchema() {\n const sc = this.schema;\n if (Array.isArray(sc) && sc[0] === 0) {\n return sc[4];\n }\n return sc;\n }\n getName(withNamespace = false) {\n const { name } = this;\n const short = !withNamespace && name && name.includes(\"#\");\n return short ? name.split(\"#\")[1] : name || undefined;\n }\n getMemberName() {\n return this.memberName;\n }\n isMemberSchema() {\n return this._isMemberSchema;\n }\n isListSchema() {\n const sc = this.getSchema();\n return typeof sc === \"number\"\n ? sc >= 64 && sc < 128\n : sc[0] === 1;\n }\n isMapSchema() {\n const sc = this.getSchema();\n return typeof sc === \"number\"\n ? sc >= 128 && sc <= 0b1111_1111\n : sc[0] === 2;\n }\n isStructSchema() {\n const sc = this.getSchema();\n if (typeof sc !== \"object\") {\n return false;\n }\n const id = sc[0];\n return (id === 3 ||\n id === -3 ||\n id === 4);\n }\n isUnionSchema() {\n const sc = this.getSchema();\n if (typeof sc !== \"object\") {\n return false;\n }\n return sc[0] === 4;\n }\n isBlobSchema() {\n const sc = this.getSchema();\n return sc === 21 || sc === 42;\n }\n isTimestampSchema() {\n const sc = this.getSchema();\n return (typeof sc === \"number\" &&\n sc >= 4 &&\n sc <= 7);\n }\n isUnitSchema() {\n return this.getSchema() === \"unit\";\n }\n isDocumentSchema() {\n return this.getSchema() === 15;\n }\n isStringSchema() {\n return this.getSchema() === 0;\n }\n isBooleanSchema() {\n return this.getSchema() === 2;\n }\n isNumericSchema() {\n return this.getSchema() === 1;\n }\n isBigIntegerSchema() {\n return this.getSchema() === 17;\n }\n isBigDecimalSchema() {\n return this.getSchema() === 19;\n }\n isStreaming() {\n const { streaming } = this.getMergedTraits();\n return !!streaming || this.getSchema() === 42;\n }\n isIdempotencyToken() {\n return !!this.getMergedTraits().idempotencyToken;\n }\n getMergedTraits() {\n return (this.normalizedTraits ??\n (this.normalizedTraits = {\n ...this.getOwnTraits(),\n ...this.getMemberTraits(),\n }));\n }\n getMemberTraits() {\n return translateTraits(this.memberTraits);\n }\n getOwnTraits() {\n return translateTraits(this.traits);\n }\n getKeySchema() {\n const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()];\n if (!isDoc && !isMap) {\n throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`);\n }\n const schema = this.getSchema();\n const memberSchema = isDoc\n ? 15\n : schema[4] ?? 0;\n return member([memberSchema, 0], \"key\");\n }\n getValueSchema() {\n const sc = this.getSchema();\n const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()];\n const memberSchema = typeof sc === \"number\"\n ? 0b0011_1111 & sc\n : sc && typeof sc === \"object\" && (isMap || isList)\n ? sc[3 + sc[0]]\n : isDoc\n ? 15\n : void 0;\n if (memberSchema != null) {\n return member([memberSchema, 0], isMap ? \"value\" : \"member\");\n }\n throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`);\n }\n getMemberSchema(memberName) {\n const struct = this.getSchema();\n if (this.isStructSchema() && struct[4].includes(memberName)) {\n const i = struct[4].indexOf(memberName);\n const memberSchema = struct[5][i];\n return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName);\n }\n if (this.isDocumentSchema()) {\n return member([15, 0], memberName);\n }\n throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`);\n }\n getMemberSchemas() {\n const buffer = {};\n try {\n for (const [k, v] of this.structIterator()) {\n buffer[k] = v;\n }\n }\n catch (ignored) { }\n return buffer;\n }\n getEventStreamMember() {\n if (this.isStructSchema()) {\n for (const [memberName, memberSchema] of this.structIterator()) {\n if (memberSchema.isStreaming() && memberSchema.isStructSchema()) {\n return memberName;\n }\n }\n }\n return \"\";\n }\n *structIterator() {\n if (this.isUnitSchema()) {\n return;\n }\n if (!this.isStructSchema()) {\n throw new Error(\"@smithy/core/schema - cannot iterate non-struct schema.\");\n }\n const struct = this.getSchema();\n const z = struct[4].length;\n let it = struct[anno.it];\n if (it && z === it.length) {\n yield* it;\n return;\n }\n it = Array(z);\n for (let i = 0; i < z; ++i) {\n const k = struct[4][i];\n const v = member([struct[5][i], 0], k);\n yield (it[i] = [k, v]);\n }\n struct[anno.it] = it;\n }\n}\nfunction member(memberSchema, memberName) {\n if (memberSchema instanceof NormalizedSchema) {\n return Object.assign(memberSchema, {\n memberName,\n _isMemberSchema: true,\n });\n }\n const internalCtorAccess = NormalizedSchema;\n return new internalCtorAccess(memberSchema, memberName);\n}\nconst isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2;\nexport const isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5;\n", "export const traitsCache = [];\nexport function translateTraits(indicator) {\n if (typeof indicator === \"object\") {\n return indicator;\n }\n indicator = indicator | 0;\n if (traitsCache[indicator]) {\n return traitsCache[indicator];\n }\n const traits = {};\n let i = 0;\n for (const trait of [\n \"httpLabel\",\n \"idempotent\",\n \"idempotencyToken\",\n \"sensitive\",\n \"httpPayload\",\n \"httpResponseCode\",\n \"httpQueryParams\",\n ]) {\n if (((indicator >> i++) & 1) === 1) {\n traits[trait] = 1;\n }\n }\n return (traitsCache[indicator] = traits);\n}\n", "export class TypeRegistry {\n namespace;\n schemas;\n exceptions;\n static registries = new Map();\n constructor(namespace, schemas = new Map(), exceptions = new Map()) {\n this.namespace = namespace;\n this.schemas = schemas;\n this.exceptions = exceptions;\n }\n static for(namespace) {\n if (!TypeRegistry.registries.has(namespace)) {\n TypeRegistry.registries.set(namespace, new TypeRegistry(namespace));\n }\n return TypeRegistry.registries.get(namespace);\n }\n copyFrom(other) {\n const { schemas, exceptions } = this;\n for (const [k, v] of other.schemas) {\n if (!schemas.has(k)) {\n schemas.set(k, v);\n }\n }\n for (const [k, v] of other.exceptions) {\n if (!exceptions.has(k)) {\n exceptions.set(k, v);\n }\n }\n }\n register(shapeId, schema) {\n const qualifiedName = this.normalizeShapeId(shapeId);\n for (const r of [this, TypeRegistry.for(qualifiedName.split(\"#\")[0])]) {\n r.schemas.set(qualifiedName, schema);\n }\n }\n getSchema(shapeId) {\n const id = this.normalizeShapeId(shapeId);\n if (!this.schemas.has(id)) {\n throw new Error(`@smithy/core/schema - schema not found for ${id}`);\n }\n return this.schemas.get(id);\n }\n registerError(es, ctor) {\n const $error = es;\n const ns = $error[1];\n for (const r of [this, TypeRegistry.for(ns)]) {\n r.schemas.set(ns + \"#\" + $error[2], $error);\n r.exceptions.set($error, ctor);\n }\n }\n getErrorCtor(es) {\n const $error = es;\n if (this.exceptions.has($error)) {\n return this.exceptions.get($error);\n }\n const registry = TypeRegistry.for($error[1]);\n return registry.exceptions.get($error);\n }\n getBaseException() {\n for (const exceptionKey of this.exceptions.keys()) {\n if (Array.isArray(exceptionKey)) {\n const [, ns, name] = exceptionKey;\n const id = ns + \"#\" + name;\n if (id.startsWith(\"smithy.ts.sdk.synthetic.\") && id.endsWith(\"ServiceException\")) {\n return exceptionKey;\n }\n }\n }\n return undefined;\n }\n find(predicate) {\n return [...this.schemas.values()].find(predicate);\n }\n clear() {\n this.schemas.clear();\n this.exceptions.clear();\n }\n normalizeShapeId(shapeId) {\n if (shapeId.includes(\"#\")) {\n return shapeId;\n }\n return this.namespace + \"#\" + shapeId;\n }\n}\n", "import { strictParseByte, strictParseDouble, strictParseFloat32, strictParseShort } from \"./parse-utils\";\nconst DAYS = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\nconst MONTHS = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nexport function dateToUtcString(date) {\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const dayOfWeek = date.getUTCDay();\n const dayOfMonthInt = date.getUTCDate();\n const hoursInt = date.getUTCHours();\n const minutesInt = date.getUTCMinutes();\n const secondsInt = date.getUTCSeconds();\n const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;\n const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;\n const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;\n const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;\n return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;\n}\nconst RFC3339 = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?[zZ]$/);\nexport const parseRfc3339DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n};\nconst RFC3339_WITH_OFFSET = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?(([-+]\\d{2}\\:\\d{2})|[zZ])$/);\nexport const parseRfc3339DateTimeWithOffset = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339_WITH_OFFSET.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n if (offsetStr.toUpperCase() != \"Z\") {\n date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));\n }\n return date;\n};\nconst IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/);\nconst RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/);\nconst ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? (\\d{4})$/);\nexport const parseRfc7231DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-7231 date-times must be expressed as strings\");\n }\n let match = IMF_FIXDATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });\n }\n match = RFC_850_DATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), {\n hours,\n minutes,\n seconds,\n fractionalMilliseconds,\n }));\n }\n match = ASC_TIME.exec(value);\n if (match) {\n const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;\n return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), \"day\", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });\n }\n throw new TypeError(\"Invalid RFC-7231 date-time value\");\n};\nexport const parseEpochTimestamp = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n let valueAsDouble;\n if (typeof value === \"number\") {\n valueAsDouble = value;\n }\n else if (typeof value === \"string\") {\n valueAsDouble = strictParseDouble(value);\n }\n else if (typeof value === \"object\" && value.tag === 1) {\n valueAsDouble = value.value;\n }\n else {\n throw new TypeError(\"Epoch timestamps must be expressed as floating point numbers or their string representation\");\n }\n if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid, non-Infinite, non-NaN numerics\");\n }\n return new Date(Math.round(valueAsDouble * 1000));\n};\nconst buildDate = (year, month, day, time) => {\n const adjustedMonth = month - 1;\n validateDayOfMonth(year, adjustedMonth, day);\n return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, \"hour\", 0, 23), parseDateValue(time.minutes, \"minute\", 0, 59), parseDateValue(time.seconds, \"seconds\", 0, 60), parseMilliseconds(time.fractionalMilliseconds)));\n};\nconst parseTwoDigitYear = (value) => {\n const thisYear = new Date().getUTCFullYear();\n const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));\n if (valueInThisCentury < thisYear) {\n return valueInThisCentury + 100;\n }\n return valueInThisCentury;\n};\nconst FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000;\nconst adjustRfc850Year = (input) => {\n if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) {\n return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));\n }\n return input;\n};\nconst parseMonthByShortName = (value) => {\n const monthIdx = MONTHS.indexOf(value);\n if (monthIdx < 0) {\n throw new TypeError(`Invalid month: ${value}`);\n }\n return monthIdx + 1;\n};\nconst DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst validateDayOfMonth = (year, month, day) => {\n let maxDays = DAYS_IN_MONTH[month];\n if (month === 1 && isLeapYear(year)) {\n maxDays = 29;\n }\n if (day > maxDays) {\n throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);\n }\n};\nconst isLeapYear = (year) => {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n};\nconst parseDateValue = (value, type, lower, upper) => {\n const dateVal = strictParseByte(stripLeadingZeroes(value));\n if (dateVal < lower || dateVal > upper) {\n throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);\n }\n return dateVal;\n};\nconst parseMilliseconds = (value) => {\n if (value === null || value === undefined) {\n return 0;\n }\n return strictParseFloat32(\"0.\" + value) * 1000;\n};\nconst parseOffsetToMilliseconds = (value) => {\n const directionStr = value[0];\n let direction = 1;\n if (directionStr == \"+\") {\n direction = 1;\n }\n else if (directionStr == \"-\") {\n direction = -1;\n }\n else {\n throw new TypeError(`Offset direction, ${directionStr}, must be \"+\" or \"-\"`);\n }\n const hour = Number(value.substring(1, 3));\n const minute = Number(value.substring(4, 6));\n return direction * (hour * 60 + minute) * 60 * 1000;\n};\nconst stripLeadingZeroes = (value) => {\n let idx = 0;\n while (idx < value.length - 1 && value.charAt(idx) === \"0\") {\n idx++;\n }\n if (idx === 0) {\n return value;\n }\n return value.slice(idx);\n};\n", "export const parseBoolean = (value) => {\n switch (value) {\n case \"true\":\n return true;\n case \"false\":\n return false;\n default:\n throw new Error(`Unable to parse boolean value \"${value}\"`);\n }\n};\nexport const expectBoolean = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"number\") {\n if (value === 0 || value === 1) {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (value === 0) {\n return false;\n }\n if (value === 1) {\n return true;\n }\n }\n if (typeof value === \"string\") {\n const lower = value.toLowerCase();\n if (lower === \"false\" || lower === \"true\") {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (lower === \"false\") {\n return false;\n }\n if (lower === \"true\") {\n return true;\n }\n }\n if (typeof value === \"boolean\") {\n return value;\n }\n throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);\n};\nexport const expectNumber = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"string\") {\n const parsed = parseFloat(value);\n if (!Number.isNaN(parsed)) {\n if (String(parsed) !== String(value)) {\n logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));\n }\n return parsed;\n }\n }\n if (typeof value === \"number\") {\n return value;\n }\n throw new TypeError(`Expected number, got ${typeof value}: ${value}`);\n};\nconst MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));\nexport const expectFloat32 = (value) => {\n const expected = expectNumber(value);\n if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {\n if (Math.abs(expected) > MAX_FLOAT) {\n throw new TypeError(`Expected 32-bit float, got ${value}`);\n }\n }\n return expected;\n};\nexport const expectLong = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (Number.isInteger(value) && !Number.isNaN(value)) {\n return value;\n }\n throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);\n};\nexport const expectInt = expectLong;\nexport const expectInt32 = (value) => expectSizedInt(value, 32);\nexport const expectShort = (value) => expectSizedInt(value, 16);\nexport const expectByte = (value) => expectSizedInt(value, 8);\nconst expectSizedInt = (value, size) => {\n const expected = expectLong(value);\n if (expected !== undefined && castInt(expected, size) !== expected) {\n throw new TypeError(`Expected ${size}-bit integer, got ${value}`);\n }\n return expected;\n};\nconst castInt = (value, size) => {\n switch (size) {\n case 32:\n return Int32Array.of(value)[0];\n case 16:\n return Int16Array.of(value)[0];\n case 8:\n return Int8Array.of(value)[0];\n }\n};\nexport const expectNonNull = (value, location) => {\n if (value === null || value === undefined) {\n if (location) {\n throw new TypeError(`Expected a non-null value for ${location}`);\n }\n throw new TypeError(\"Expected a non-null value\");\n }\n return value;\n};\nexport const expectObject = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"object\" && !Array.isArray(value)) {\n return value;\n }\n const receivedType = Array.isArray(value) ? \"array\" : typeof value;\n throw new TypeError(`Expected object, got ${receivedType}: ${value}`);\n};\nexport const expectString = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"string\") {\n return value;\n }\n if ([\"boolean\", \"number\", \"bigint\"].includes(typeof value)) {\n logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));\n return String(value);\n }\n throw new TypeError(`Expected string, got ${typeof value}: ${value}`);\n};\nexport const expectUnion = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n const asObject = expectObject(value);\n const setKeys = Object.entries(asObject)\n .filter(([, v]) => v != null)\n .map(([k]) => k);\n if (setKeys.length === 0) {\n throw new TypeError(`Unions must have exactly one non-null member. None were found.`);\n }\n if (setKeys.length > 1) {\n throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);\n }\n return asObject;\n};\nexport const strictParseDouble = (value) => {\n if (typeof value == \"string\") {\n return expectNumber(parseNumber(value));\n }\n return expectNumber(value);\n};\nexport const strictParseFloat = strictParseDouble;\nexport const strictParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return expectFloat32(parseNumber(value));\n }\n return expectFloat32(value);\n};\nconst NUMBER_REGEX = /(-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)|(-?Infinity)|(NaN)/g;\nconst parseNumber = (value) => {\n const matches = value.match(NUMBER_REGEX);\n if (matches === null || matches[0].length !== value.length) {\n throw new TypeError(`Expected real number, got implicit NaN`);\n }\n return parseFloat(value);\n};\nexport const limitedParseDouble = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectNumber(value);\n};\nexport const handleFloat = limitedParseDouble;\nexport const limitedParseFloat = limitedParseDouble;\nexport const limitedParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectFloat32(value);\n};\nconst parseFloatString = (value) => {\n switch (value) {\n case \"NaN\":\n return NaN;\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n default:\n throw new Error(`Unable to parse float value: ${value}`);\n }\n};\nexport const strictParseLong = (value) => {\n if (typeof value === \"string\") {\n return expectLong(parseNumber(value));\n }\n return expectLong(value);\n};\nexport const strictParseInt = strictParseLong;\nexport const strictParseInt32 = (value) => {\n if (typeof value === \"string\") {\n return expectInt32(parseNumber(value));\n }\n return expectInt32(value);\n};\nexport const strictParseShort = (value) => {\n if (typeof value === \"string\") {\n return expectShort(parseNumber(value));\n }\n return expectShort(value);\n};\nexport const strictParseByte = (value) => {\n if (typeof value === \"string\") {\n return expectByte(parseNumber(value));\n }\n return expectByte(value);\n};\nconst stackTraceWarning = (message) => {\n return String(new TypeError(message).stack || message)\n .split(\"\\n\")\n .slice(0, 5)\n .filter((s) => !s.includes(\"stackTraceWarning\"))\n .join(\"\\n\");\n};\nexport const logger = {\n warn: console.warn,\n};\n", "export function setFeature(context, feature, value) {\n if (!context.__smithy_context) {\n context.__smithy_context = {\n features: {},\n };\n }\n else if (!context.__smithy_context.features) {\n context.__smithy_context.features = {};\n }\n context.__smithy_context.features[feature] = value;\n}\n", "import { toHex } from \"@smithy/util-hex-encoding\";\nimport { toUint8Array } from \"@smithy/util-utf8\";\nimport { ALGORITHM_IDENTIFIER, ALGORITHM_QUERY_PARAM, AMZ_DATE_HEADER, AMZ_DATE_QUERY_PARAM, AUTH_HEADER, CREDENTIAL_QUERY_PARAM, EVENT_ALGORITHM_IDENTIFIER, EXPIRES_QUERY_PARAM, MAX_PRESIGNED_TTL, SHA256_HEADER, SIGNATURE_QUERY_PARAM, SIGNED_HEADERS_QUERY_PARAM, TOKEN_HEADER, TOKEN_QUERY_PARAM, } from \"./constants\";\nimport { createScope, getSigningKey } from \"./credentialDerivation\";\nimport { getCanonicalHeaders } from \"./getCanonicalHeaders\";\nimport { getPayloadHash } from \"./getPayloadHash\";\nimport { HeaderFormatter } from \"./HeaderFormatter\";\nimport { hasHeader } from \"./headerUtil\";\nimport { moveHeadersToQuery } from \"./moveHeadersToQuery\";\nimport { prepareRequest } from \"./prepareRequest\";\nimport { SignatureV4Base } from \"./SignatureV4Base\";\nexport class SignatureV4 extends SignatureV4Base {\n headerFormatter = new HeaderFormatter();\n constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) {\n super({\n applyChecksum,\n credentials,\n region,\n service,\n sha256,\n uriEscapePath,\n });\n }\n async presign(originalRequest, options = {}) {\n const { signingDate = new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService, } = options;\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? (await this.regionProvider());\n const { longDate, shortDate } = this.formatDate(signingDate);\n if (expiresIn > MAX_PRESIGNED_TTL) {\n return Promise.reject(\"Signature version 4 presigned URLs\" + \" must have an expiration date less than one week in\" + \" the future\");\n }\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders });\n if (credentials.sessionToken) {\n request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;\n }\n request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;\n request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;\n request.query[AMZ_DATE_QUERY_PARAM] = longDate;\n request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders);\n request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)));\n return request;\n }\n async sign(toSign, options) {\n if (typeof toSign === \"string\") {\n return this.signString(toSign, options);\n }\n else if (toSign.headers && toSign.payload) {\n return this.signEvent(toSign, options);\n }\n else if (toSign.message) {\n return this.signMessage(toSign, options);\n }\n else {\n return this.signRequest(toSign, options);\n }\n }\n async signEvent({ headers, payload }, { signingDate = new Date(), priorSignature, signingRegion, signingService }) {\n const region = signingRegion ?? (await this.regionProvider());\n const { shortDate, longDate } = this.formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256);\n const hash = new this.sha256();\n hash.update(headers);\n const hashedHeaders = toHex(await hash.digest());\n const stringToSign = [\n EVENT_ALGORITHM_IDENTIFIER,\n longDate,\n scope,\n priorSignature,\n hashedHeaders,\n hashedPayload,\n ].join(\"\\n\");\n return this.signString(stringToSign, { signingDate, signingRegion: region, signingService });\n }\n async signMessage(signableMessage, { signingDate = new Date(), signingRegion, signingService }) {\n const promise = this.signEvent({\n headers: this.headerFormatter.format(signableMessage.message.headers),\n payload: signableMessage.message.body,\n }, {\n signingDate,\n signingRegion,\n signingService,\n priorSignature: signableMessage.priorSignature,\n });\n return promise.then((signature) => {\n return { message: signableMessage.message, signature };\n });\n }\n async signString(stringToSign, { signingDate = new Date(), signingRegion, signingService } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? (await this.regionProvider());\n const { shortDate } = this.formatDate(signingDate);\n const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));\n hash.update(toUint8Array(stringToSign));\n return toHex(await hash.digest());\n }\n async signRequest(requestToSign, { signingDate = new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService, } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? (await this.regionProvider());\n const request = prepareRequest(requestToSign);\n const { longDate, shortDate } = this.formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n request.headers[AMZ_DATE_HEADER] = longDate;\n if (credentials.sessionToken) {\n request.headers[TOKEN_HEADER] = credentials.sessionToken;\n }\n const payloadHash = await getPayloadHash(request, this.sha256);\n if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) {\n request.headers[SHA256_HEADER] = payloadHash;\n }\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash));\n request.headers[AUTH_HEADER] =\n `${ALGORITHM_IDENTIFIER} ` +\n `Credential=${credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, ` +\n `Signature=${signature}`;\n return request;\n }\n async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {\n const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER);\n const hash = new this.sha256(await keyPromise);\n hash.update(toUint8Array(stringToSign));\n return toHex(await hash.digest());\n }\n getSigningKey(credentials, region, shortDate, service) {\n return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);\n }\n}\n", "export const ALGORITHM_QUERY_PARAM = \"X-Amz-Algorithm\";\nexport const CREDENTIAL_QUERY_PARAM = \"X-Amz-Credential\";\nexport const AMZ_DATE_QUERY_PARAM = \"X-Amz-Date\";\nexport const SIGNED_HEADERS_QUERY_PARAM = \"X-Amz-SignedHeaders\";\nexport const EXPIRES_QUERY_PARAM = \"X-Amz-Expires\";\nexport const SIGNATURE_QUERY_PARAM = \"X-Amz-Signature\";\nexport const TOKEN_QUERY_PARAM = \"X-Amz-Security-Token\";\nexport const REGION_SET_PARAM = \"X-Amz-Region-Set\";\nexport const AUTH_HEADER = \"authorization\";\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();\nexport const DATE_HEADER = \"date\";\nexport const GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];\nexport const SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();\nexport const SHA256_HEADER = \"x-amz-content-sha256\";\nexport const TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();\nexport const HOST_HEADER = \"host\";\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n \"cache-control\": true,\n connection: true,\n expect: true,\n from: true,\n \"keep-alive\": true,\n \"max-forwards\": true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n \"transfer-encoding\": true,\n upgrade: true,\n \"user-agent\": true,\n \"x-amzn-trace-id\": true,\n};\nexport const PROXY_HEADER_PATTERN = /^proxy-/;\nexport const SEC_HEADER_PATTERN = /^sec-/;\nexport const UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i];\nexport const ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256\";\nexport const ALGORITHM_IDENTIFIER_V4A = \"AWS4-ECDSA-P256-SHA256\";\nexport const EVENT_ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256-PAYLOAD\";\nexport const UNSIGNED_PAYLOAD = \"UNSIGNED-PAYLOAD\";\nexport const MAX_CACHE_SIZE = 50;\nexport const KEY_TYPE_IDENTIFIER = \"aws4_request\";\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;\n", "import { toHex } from \"@smithy/util-hex-encoding\";\nimport { toUint8Array } from \"@smithy/util-utf8\";\nimport { KEY_TYPE_IDENTIFIER, MAX_CACHE_SIZE } from \"./constants\";\nconst signingKeyCache = {};\nconst cacheQueue = [];\nexport const createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`;\nexport const getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => {\n const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);\n const cacheKey = `${shortDate}:${region}:${service}:${toHex(credsHash)}:${credentials.sessionToken}`;\n if (cacheKey in signingKeyCache) {\n return signingKeyCache[cacheKey];\n }\n cacheQueue.push(cacheKey);\n while (cacheQueue.length > MAX_CACHE_SIZE) {\n delete signingKeyCache[cacheQueue.shift()];\n }\n let key = `AWS4${credentials.secretAccessKey}`;\n for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) {\n key = await hmac(sha256Constructor, key, signable);\n }\n return (signingKeyCache[cacheKey] = key);\n};\nexport const clearCredentialCache = () => {\n cacheQueue.length = 0;\n Object.keys(signingKeyCache).forEach((cacheKey) => {\n delete signingKeyCache[cacheKey];\n });\n};\nconst hmac = (ctor, secret, data) => {\n const hash = new ctor(secret);\n hash.update(toUint8Array(data));\n return hash.digest();\n};\n", "import { ALWAYS_UNSIGNABLE_HEADERS, PROXY_HEADER_PATTERN, SEC_HEADER_PATTERN } from \"./constants\";\nexport const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => {\n const canonical = {};\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue;\n }\n const canonicalHeaderName = headerName.toLowerCase();\n if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName) ||\n PROXY_HEADER_PATTERN.test(canonicalHeaderName) ||\n SEC_HEADER_PATTERN.test(canonicalHeaderName)) {\n if (!signableHeaders || (signableHeaders && !signableHeaders.has(canonicalHeaderName))) {\n continue;\n }\n }\n canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\\s+/g, \" \");\n }\n return canonical;\n};\n", "import { isArrayBuffer } from \"@smithy/is-array-buffer\";\nimport { toHex } from \"@smithy/util-hex-encoding\";\nimport { toUint8Array } from \"@smithy/util-utf8\";\nimport { SHA256_HEADER, UNSIGNED_PAYLOAD } from \"./constants\";\nexport const getPayloadHash = async ({ headers, body }, hashConstructor) => {\n for (const headerName of Object.keys(headers)) {\n if (headerName.toLowerCase() === SHA256_HEADER) {\n return headers[headerName];\n }\n }\n if (body == undefined) {\n return \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\";\n }\n else if (typeof body === \"string\" || ArrayBuffer.isView(body) || isArrayBuffer(body)) {\n const hashCtor = new hashConstructor();\n hashCtor.update(toUint8Array(body));\n return toHex(await hashCtor.digest());\n }\n return UNSIGNED_PAYLOAD;\n};\n", "export const isArrayBuffer = (arg) => (typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer) ||\n Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\";\n", "import { fromHex, toHex } from \"@smithy/util-hex-encoding\";\nimport { fromUtf8 } from \"@smithy/util-utf8\";\nexport class HeaderFormatter {\n format(headers) {\n const chunks = [];\n for (const headerName of Object.keys(headers)) {\n const bytes = fromUtf8(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? 0 : 1]);\n case \"byte\":\n return Uint8Array.from([2, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, 3);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, 4);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = 5;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, 6);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = fromUtf8(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, 7);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = 8;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = 9;\n uuidBytes.set(fromHex(header.value.replace(/\\-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n}\nvar HEADER_VALUE_TYPE;\n(function (HEADER_VALUE_TYPE) {\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolTrue\"] = 0] = \"boolTrue\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolFalse\"] = 1] = \"boolFalse\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byte\"] = 2] = \"byte\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"short\"] = 3] = \"short\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"integer\"] = 4] = \"integer\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"long\"] = 5] = \"long\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byteArray\"] = 6] = \"byteArray\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"string\"] = 7] = \"string\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"timestamp\"] = 8] = \"timestamp\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"uuid\"] = 9] = \"uuid\";\n})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));\nconst UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\nexport class Int64 {\n bytes;\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static fromNumber(number) {\n if (number > 9_223_372_036_854_775_807 || number < -9_223_372_036_854_775_808) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new Int64(bytes);\n }\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 0b10000000;\n if (negative) {\n negate(bytes);\n }\n return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n}\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 0xff;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n", "export const hasHeader = (soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true;\n }\n }\n return false;\n};\nexport const getHeaderValue = (soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return headers[headerName];\n }\n }\n return undefined;\n};\nexport const deleteHeader = (soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n delete headers[headerName];\n }\n }\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nexport const moveHeadersToQuery = (request, options = {}) => {\n const { headers, query = {} } = HttpRequest.clone(request);\n for (const name of Object.keys(headers)) {\n const lname = name.toLowerCase();\n if ((lname.slice(0, 6) === \"x-amz-\" && !options.unhoistableHeaders?.has(lname)) ||\n options.hoistableHeaders?.has(lname)) {\n query[name] = headers[name];\n delete headers[name];\n }\n }\n return {\n ...request,\n headers,\n query,\n };\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { GENERATED_HEADERS } from \"./constants\";\nexport const prepareRequest = (request) => {\n request = HttpRequest.clone(request);\n for (const headerName of Object.keys(request.headers)) {\n if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName];\n }\n }\n return request;\n};\n", "import { toHex } from \"@smithy/util-hex-encoding\";\nimport { normalizeProvider } from \"@smithy/util-middleware\";\nimport { escapeUri } from \"@smithy/util-uri-escape\";\nimport { toUint8Array } from \"@smithy/util-utf8\";\nimport { getCanonicalQuery } from \"./getCanonicalQuery\";\nimport { iso8601 } from \"./utilDate\";\nexport class SignatureV4Base {\n service;\n regionProvider;\n credentialProvider;\n sha256;\n uriEscapePath;\n applyChecksum;\n constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) {\n this.service = service;\n this.sha256 = sha256;\n this.uriEscapePath = uriEscapePath;\n this.applyChecksum = typeof applyChecksum === \"boolean\" ? applyChecksum : true;\n this.regionProvider = normalizeProvider(region);\n this.credentialProvider = normalizeProvider(credentials);\n }\n createCanonicalRequest(request, canonicalHeaders, payloadHash) {\n const sortedHeaders = Object.keys(canonicalHeaders).sort();\n return `${request.method}\n${this.getCanonicalPath(request)}\n${getCanonicalQuery(request)}\n${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join(\"\\n\")}\n\n${sortedHeaders.join(\";\")}\n${payloadHash}`;\n }\n async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {\n const hash = new this.sha256();\n hash.update(toUint8Array(canonicalRequest));\n const hashedRequest = await hash.digest();\n return `${algorithmIdentifier}\n${longDate}\n${credentialScope}\n${toHex(hashedRequest)}`;\n }\n getCanonicalPath({ path }) {\n if (this.uriEscapePath) {\n const normalizedPathSegments = [];\n for (const pathSegment of path.split(\"/\")) {\n if (pathSegment?.length === 0)\n continue;\n if (pathSegment === \".\")\n continue;\n if (pathSegment === \"..\") {\n normalizedPathSegments.pop();\n }\n else {\n normalizedPathSegments.push(pathSegment);\n }\n }\n const normalizedPath = `${path?.startsWith(\"/\") ? \"/\" : \"\"}${normalizedPathSegments.join(\"/\")}${normalizedPathSegments.length > 0 && path?.endsWith(\"/\") ? \"/\" : \"\"}`;\n const doubleEncoded = escapeUri(normalizedPath);\n return doubleEncoded.replace(/%2F/g, \"/\");\n }\n return path;\n }\n validateResolvedCredentials(credentials) {\n if (typeof credentials !== \"object\" ||\n typeof credentials.accessKeyId !== \"string\" ||\n typeof credentials.secretAccessKey !== \"string\") {\n throw new Error(\"Resolved credential object is not valid\");\n }\n }\n formatDate(now) {\n const longDate = iso8601(now).replace(/[\\-:]/g, \"\");\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n };\n }\n getCanonicalHeaderList(headers) {\n return Object.keys(headers).sort().join(\";\");\n }\n}\n", "import { escapeUri } from \"@smithy/util-uri-escape\";\nimport { SIGNATURE_HEADER } from \"./constants\";\nexport const getCanonicalQuery = ({ query = {} }) => {\n const keys = [];\n const serialized = {};\n for (const key of Object.keys(query)) {\n if (key.toLowerCase() === SIGNATURE_HEADER) {\n continue;\n }\n const encodedKey = escapeUri(key);\n keys.push(encodedKey);\n const value = query[key];\n if (typeof value === \"string\") {\n serialized[encodedKey] = `${encodedKey}=${escapeUri(value)}`;\n }\n else if (Array.isArray(value)) {\n serialized[encodedKey] = value\n .slice(0)\n .reduce((encoded, value) => encoded.concat([`${encodedKey}=${escapeUri(value)}`]), [])\n .sort()\n .join(\"&\");\n }\n }\n return keys\n .sort()\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join(\"&\");\n};\n", "export const iso8601 = (time) => toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, \"Z\");\nexport const toDate = (time) => {\n if (typeof time === \"number\") {\n return new Date(time * 1000);\n }\n if (typeof time === \"string\") {\n if (Number(time)) {\n return new Date(Number(time) * 1000);\n }\n return new Date(time);\n }\n return time;\n};\n", "export const signatureV4aContainer = {\n SignatureV4a: null,\n};\n", "const getAllAliases = (name, aliases) => {\n const _aliases = [];\n if (name) {\n _aliases.push(name);\n }\n if (aliases) {\n for (const alias of aliases) {\n _aliases.push(alias);\n }\n }\n return _aliases;\n};\nconst getMiddlewareNameWithAliases = (name, aliases) => {\n return `${name || \"anonymous\"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(\",\")})` : \"\"}`;\n};\nexport const constructStack = () => {\n let absoluteEntries = [];\n let relativeEntries = [];\n let identifyOnResolve = false;\n const entriesNameSet = new Set();\n const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] ||\n priorityWeights[b.priority || \"normal\"] - priorityWeights[a.priority || \"normal\"]);\n const removeByName = (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n const aliases = getAllAliases(entry.name, entry.aliases);\n if (aliases.includes(toRemove)) {\n isRemoved = true;\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n };\n const removeByReference = (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n if (entry.middleware === toRemove) {\n isRemoved = true;\n for (const alias of getAllAliases(entry.name, entry.aliases)) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n };\n const cloneTo = (toStack) => {\n absoluteEntries.forEach((entry) => {\n toStack.add(entry.middleware, { ...entry });\n });\n relativeEntries.forEach((entry) => {\n toStack.addRelativeTo(entry.middleware, { ...entry });\n });\n toStack.identifyOnResolve?.(stack.identifyOnResolve());\n return toStack;\n };\n const expandRelativeMiddlewareList = (from) => {\n const expandedMiddlewareList = [];\n from.before.forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n }\n else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n expandedMiddlewareList.push(from);\n from.after.reverse().forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n }\n else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n return expandedMiddlewareList;\n };\n const getMiddlewareList = (debug = false) => {\n const normalizedAbsoluteEntries = [];\n const normalizedRelativeEntries = [];\n const normalizedEntriesNameMap = {};\n absoluteEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: [],\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedAbsoluteEntries.push(normalizedEntry);\n });\n relativeEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: [],\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedRelativeEntries.push(normalizedEntry);\n });\n normalizedRelativeEntries.forEach((entry) => {\n if (entry.toMiddleware) {\n const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];\n if (toMiddleware === undefined) {\n if (debug) {\n return;\n }\n throw new Error(`${entry.toMiddleware} is not found when adding ` +\n `${getMiddlewareNameWithAliases(entry.name, entry.aliases)} ` +\n `middleware ${entry.relation} ${entry.toMiddleware}`);\n }\n if (entry.relation === \"after\") {\n toMiddleware.after.push(entry);\n }\n if (entry.relation === \"before\") {\n toMiddleware.before.push(entry);\n }\n }\n });\n const mainChain = sort(normalizedAbsoluteEntries)\n .map(expandRelativeMiddlewareList)\n .reduce((wholeList, expandedMiddlewareList) => {\n wholeList.push(...expandedMiddlewareList);\n return wholeList;\n }, []);\n return mainChain;\n };\n const stack = {\n add: (middleware, options = {}) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n step: \"initialize\",\n priority: \"normal\",\n middleware,\n ...options,\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = absoluteEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias));\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = absoluteEntries[toOverrideIndex];\n if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {\n throw new Error(`\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware with ` +\n `${toOverride.priority} priority in ${toOverride.step} step cannot ` +\n `be overridden by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware with ` +\n `${entry.priority} priority in ${entry.step} step.`);\n }\n absoluteEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n absoluteEntries.push(entry);\n },\n addRelativeTo: (middleware, options) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n middleware,\n ...options,\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = relativeEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias));\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = relativeEntries[toOverrideIndex];\n if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {\n throw new Error(`\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware ` +\n `${toOverride.relation} \"${toOverride.toMiddleware}\" middleware cannot be overridden ` +\n `by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware ${entry.relation} ` +\n `\"${entry.toMiddleware}\" middleware.`);\n }\n relativeEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n relativeEntries.push(entry);\n },\n clone: () => cloneTo(constructStack()),\n use: (plugin) => {\n plugin.applyToStack(stack);\n },\n remove: (toRemove) => {\n if (typeof toRemove === \"string\")\n return removeByName(toRemove);\n else\n return removeByReference(toRemove);\n },\n removeByTag: (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n const { tags, name, aliases: _aliases } = entry;\n if (tags && tags.includes(toRemove)) {\n const aliases = getAllAliases(name, _aliases);\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n isRemoved = true;\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n },\n concat: (from) => {\n const cloned = cloneTo(constructStack());\n cloned.use(from);\n cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false));\n return cloned;\n },\n applyToStack: cloneTo,\n identify: () => {\n return getMiddlewareList(true).map((mw) => {\n const step = mw.step ??\n mw.relation +\n \" \" +\n mw.toMiddleware;\n return getMiddlewareNameWithAliases(mw.name, mw.aliases) + \" - \" + step;\n });\n },\n identifyOnResolve(toggle) {\n if (typeof toggle === \"boolean\")\n identifyOnResolve = toggle;\n return identifyOnResolve;\n },\n resolve: (handler, context) => {\n for (const middleware of getMiddlewareList()\n .map((entry) => entry.middleware)\n .reverse()) {\n handler = middleware(handler, context);\n }\n if (identifyOnResolve) {\n console.log(stack.identify());\n }\n return handler;\n },\n };\n return stack;\n};\nconst stepWeights = {\n initialize: 5,\n serialize: 4,\n build: 3,\n finalizeRequest: 2,\n deserialize: 1,\n};\nconst priorityWeights = {\n high: 3,\n normal: 2,\n low: 1,\n};\n", "import { constructStack } from \"@smithy/middleware-stack\";\nimport { SMITHY_CONTEXT_KEY } from \"@smithy/types\";\nimport { schemaLogFilter } from \"./schemaLogFilter\";\nexport class Command {\n middlewareStack = constructStack();\n schema;\n static classBuilder() {\n return new ClassBuilder();\n }\n resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor, }) {\n for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {\n this.middlewareStack.use(mw);\n }\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog,\n outputFilterSensitiveLog,\n [SMITHY_CONTEXT_KEY]: {\n commandInstance: this,\n ...smithyContext,\n },\n ...additionalContext,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n}\nclass ClassBuilder {\n _init = () => { };\n _ep = {};\n _middlewareFn = () => [];\n _commandName = \"\";\n _clientName = \"\";\n _additionalContext = {};\n _smithyContext = {};\n _inputFilterSensitiveLog = undefined;\n _outputFilterSensitiveLog = undefined;\n _serializer = null;\n _deserializer = null;\n _operationSchema;\n init(cb) {\n this._init = cb;\n }\n ep(endpointParameterInstructions) {\n this._ep = endpointParameterInstructions;\n return this;\n }\n m(middlewareSupplier) {\n this._middlewareFn = middlewareSupplier;\n return this;\n }\n s(service, operation, smithyContext = {}) {\n this._smithyContext = {\n service,\n operation,\n ...smithyContext,\n };\n return this;\n }\n c(additionalContext = {}) {\n this._additionalContext = additionalContext;\n return this;\n }\n n(clientName, commandName) {\n this._clientName = clientName;\n this._commandName = commandName;\n return this;\n }\n f(inputFilter = (_) => _, outputFilter = (_) => _) {\n this._inputFilterSensitiveLog = inputFilter;\n this._outputFilterSensitiveLog = outputFilter;\n return this;\n }\n ser(serializer) {\n this._serializer = serializer;\n return this;\n }\n de(deserializer) {\n this._deserializer = deserializer;\n return this;\n }\n sc(operation) {\n this._operationSchema = operation;\n this._smithyContext.operationSchema = operation;\n return this;\n }\n build() {\n const closure = this;\n let CommandRef;\n return (CommandRef = class extends Command {\n input;\n static getEndpointParameterInstructions() {\n return closure._ep;\n }\n constructor(...[input]) {\n super();\n this.input = input ?? {};\n closure._init(this);\n this.schema = closure._operationSchema;\n }\n resolveMiddleware(stack, configuration, options) {\n const op = closure._operationSchema;\n const input = op?.[4] ?? op?.input;\n const output = op?.[5] ?? op?.output;\n return this.resolveMiddlewareWithContext(stack, configuration, options, {\n CommandCtor: CommandRef,\n middlewareFn: closure._middlewareFn,\n clientName: closure._clientName,\n commandName: closure._commandName,\n inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_) => _),\n outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_) => _),\n smithyContext: closure._smithyContext,\n additionalContext: closure._additionalContext,\n });\n }\n serialize = closure._serializer;\n deserialize = closure._deserializer;\n });\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nconst SENSITIVE_STRING = \"***SensitiveInformation***\";\nexport function schemaLogFilter(schema, data) {\n if (data == null) {\n return data;\n }\n const ns = NormalizedSchema.of(schema);\n if (ns.getMergedTraits().sensitive) {\n return SENSITIVE_STRING;\n }\n if (ns.isListSchema()) {\n const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive;\n if (isSensitive) {\n return SENSITIVE_STRING;\n }\n }\n else if (ns.isMapSchema()) {\n const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive;\n if (isSensitive) {\n return SENSITIVE_STRING;\n }\n }\n else if (ns.isStructSchema() && typeof data === \"object\") {\n const object = data;\n const newObject = {};\n for (const [member, memberNs] of ns.structIterator()) {\n if (object[member] != null) {\n newObject[member] = schemaLogFilter(memberNs, object[member]);\n }\n }\n return newObject;\n }\n return data;\n}\n", "export class ServiceException extends Error {\n $fault;\n $response;\n $retryable;\n $metadata;\n constructor(options) {\n super(options.message);\n Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype);\n this.name = options.name;\n this.$fault = options.$fault;\n this.$metadata = options.$metadata;\n }\n static isInstance(value) {\n if (!value)\n return false;\n const candidate = value;\n return (ServiceException.prototype.isPrototypeOf(candidate) ||\n (Boolean(candidate.$fault) &&\n Boolean(candidate.$metadata) &&\n (candidate.$fault === \"client\" || candidate.$fault === \"server\")));\n }\n static [Symbol.hasInstance](instance) {\n if (!instance)\n return false;\n const candidate = instance;\n if (this === ServiceException) {\n return ServiceException.isInstance(instance);\n }\n if (ServiceException.isInstance(instance)) {\n if (candidate.name && this.name) {\n return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;\n }\n return this.prototype.isPrototypeOf(instance);\n }\n return false;\n }\n}\nexport const decorateServiceException = (exception, additions = {}) => {\n Object.entries(additions)\n .filter(([, v]) => v !== undefined)\n .forEach(([k, v]) => {\n if (exception[k] == undefined || exception[k] === \"\") {\n exception[k] = v;\n }\n });\n const message = exception.message || exception.Message || \"UnknownError\";\n exception.message = message;\n delete exception.Message;\n return exception;\n};\n", "export class NoOpLogger {\n trace() { }\n debug() { }\n info() { }\n warn() { }\n error() { }\n}\n", "import { DEFAULT_CHECKSUM_ALGORITHM, RequestChecksumCalculation } from \"./constants\";\nexport const getChecksumAlgorithmForRequest = (input, { requestChecksumRequired, requestAlgorithmMember, requestChecksumCalculation }) => {\n if (!requestAlgorithmMember) {\n return requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired\n ? DEFAULT_CHECKSUM_ALGORITHM\n : undefined;\n }\n if (!input[requestAlgorithmMember]) {\n return undefined;\n }\n const checksumAlgorithm = input[requestAlgorithmMember];\n return checksumAlgorithm;\n};\n", "import { ChecksumAlgorithm } from \"./constants\";\nexport const getChecksumLocationName = (algorithm) => algorithm === ChecksumAlgorithm.MD5 ? \"content-md5\" : `x-amz-checksum-${algorithm.toLowerCase()}`;\n", "export const hasHeader = (header, headers) => {\n const soughtHeader = header.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true;\n }\n }\n return false;\n};\n", "export const hasHeaderWithPrefix = (headerPrefix, headers) => {\n const soughtHeaderPrefix = headerPrefix.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (headerName.toLowerCase().startsWith(soughtHeaderPrefix)) {\n return true;\n }\n }\n return false;\n};\n", "import { isArrayBuffer } from \"@smithy/is-array-buffer\";\nexport const isStreaming = (body) => body !== undefined && typeof body !== \"string\" && !ArrayBuffer.isView(body) && !isArrayBuffer(body);\n", "import { AwsCrc32c } from \"@aws-crypto/crc32c\";\nimport { Crc64Nvme, crc64NvmeCrtContainer } from \"@aws-sdk/crc64-nvme\";\nimport { ChecksumAlgorithm } from \"./constants\";\nimport { getCrc32ChecksumAlgorithmFunction } from \"./getCrc32ChecksumAlgorithmFunction\";\nimport { CLIENT_SUPPORTED_ALGORITHMS } from \"./types\";\nexport const selectChecksumAlgorithmFunction = (checksumAlgorithm, config) => {\n const { checksumAlgorithms = {} } = config;\n switch (checksumAlgorithm) {\n case ChecksumAlgorithm.MD5:\n return checksumAlgorithms?.MD5 ?? config.md5;\n case ChecksumAlgorithm.CRC32:\n return checksumAlgorithms?.CRC32 ?? getCrc32ChecksumAlgorithmFunction();\n case ChecksumAlgorithm.CRC32C:\n return checksumAlgorithms?.CRC32C ?? AwsCrc32c;\n case ChecksumAlgorithm.CRC64NVME:\n if (typeof crc64NvmeCrtContainer.CrtCrc64Nvme !== \"function\") {\n return checksumAlgorithms?.CRC64NVME ?? Crc64Nvme;\n }\n return checksumAlgorithms?.CRC64NVME ?? crc64NvmeCrtContainer.CrtCrc64Nvme;\n case ChecksumAlgorithm.SHA1:\n return checksumAlgorithms?.SHA1 ?? config.sha1;\n case ChecksumAlgorithm.SHA256:\n return checksumAlgorithms?.SHA256 ?? config.sha256;\n default:\n if (checksumAlgorithms?.[checksumAlgorithm]) {\n return checksumAlgorithms[checksumAlgorithm];\n }\n throw new Error(`The checksum algorithm \"${checksumAlgorithm}\" is not supported by the client.` +\n ` Select one of ${CLIENT_SUPPORTED_ALGORITHMS}, or provide an implementation to ` +\n ` the client constructor checksums field.`);\n }\n};\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport {uint32ArrayFrom} from \"@aws-crypto/util\";\n\nexport function crc32c(data: Uint8Array): number {\n return new Crc32c().update(data).digest();\n}\n\nexport class Crc32c {\n private checksum = 0xffffffff;\n\n update(data: Uint8Array): this {\n for (const byte of data) {\n this.checksum =\n (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff];\n }\n\n return this;\n }\n\n digest(): number {\n return (this.checksum ^ 0xffffffff) >>> 0;\n }\n}\n\n// prettier-ignore\nconst a_lookupTable = [\n 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB,\n 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24,\n 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B, 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384,\n 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B,\n 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A, 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35,\n 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5, 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA,\n 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45, 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A,\n 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595,\n 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957,\n 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198,\n 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38,\n 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8, 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7,\n 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096, 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789,\n 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859, 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46,\n 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6,\n 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829,\n 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93,\n 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C,\n 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3, 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC,\n 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C, 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033,\n 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652, 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D,\n 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982,\n 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622,\n 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED,\n 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F,\n 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF, 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0,\n 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F, 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540,\n 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90, 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F,\n 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1,\n 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E,\n 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E,\n 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351,\n];\n\nconst lookupTable: Uint32Array = uint32ArrayFrom(a_lookupTable)\nexport { AwsCrc32c } from \"./aws_crc32c\";\n", "/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport { convertToBuffer } from \"./convertToBuffer\";\nexport { isEmptyData } from \"./isEmptyData\";\nexport { numToUint8 } from \"./numToUint8\";\nexport {uint32ArrayFrom} from './uint32ArrayFrom';\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SourceData } from \"@aws-sdk/types\";\nimport { fromUtf8 as fromUtf8Browser } from \"@smithy/util-utf8\";\n\n// Quick polyfill\nconst fromUtf8 =\n typeof Buffer !== \"undefined\" && Buffer.from\n ? (input: string) => Buffer.from(input, \"utf8\")\n : fromUtf8Browser;\n\nexport function convertToBuffer(data: SourceData): Uint8Array {\n // Already a Uint8, do nothing\n if (data instanceof Uint8Array) return data;\n\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(\n data.buffer,\n data.byteOffset,\n data.byteLength / Uint8Array.BYTES_PER_ELEMENT\n );\n }\n\n return new Uint8Array(data);\n}\n", "export * from \"./fromUtf8\";\nexport * from \"./toUint8Array\";\nexport * from \"./toUtf8\";\n", "export const fromUtf8 = (input) => new TextEncoder().encode(input);\n", "import { fromUtf8 } from \"./fromUtf8\";\nexport const toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n", "export const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return new TextDecoder(\"utf-8\").decode(input);\n};\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SourceData } from \"@aws-sdk/types\";\n\nexport function isEmptyData(data: SourceData): boolean {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n\n return data.byteLength === 0;\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function numToUint8(num: number) {\n return new Uint8Array([\n (num & 0xff000000) >> 24,\n (num & 0x00ff0000) >> 16,\n (num & 0x0000ff00) >> 8,\n num & 0x000000ff,\n ]);\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n// IE 11 does not support Array.from, so we do it manually\nexport function uint32ArrayFrom(a_lookUpTable: Array): Uint32Array {\n if (!Uint32Array.from) {\n const return_array = new Uint32Array(a_lookUpTable.length)\n let a_index = 0\n while (a_index < a_lookUpTable.length) {\n return_array[a_index] = a_lookUpTable[a_index]\n a_index += 1\n }\n return return_array\n }\n return Uint32Array.from(a_lookUpTable)\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { convertToBuffer, isEmptyData, numToUint8 } from \"@aws-crypto/util\";\nimport { Crc32c } from \"./index\";\n\nexport class AwsCrc32c implements Checksum {\n private crc32c = new Crc32c();\n\n update(toHash: SourceData) {\n if (isEmptyData(toHash)) return;\n\n this.crc32c.update(convertToBuffer(toHash));\n }\n\n async digest(): Promise {\n return numToUint8(this.crc32c.digest());\n }\n\n reset(): void {\n this.crc32c = new Crc32c();\n }\n}\n", "export * from \"./Crc64Nvme\";\nexport * from \"./crc64-nvme-crt-container\";\n", "const generateCRC64NVMETable = () => {\n const sliceLength = 8;\n const tables = new Array(sliceLength);\n for (let slice = 0; slice < sliceLength; slice++) {\n const table = new Array(512);\n for (let i = 0; i < 256; i++) {\n let crc = BigInt(i);\n for (let j = 0; j < 8 * (slice + 1); j++) {\n if (crc & 1n) {\n crc = (crc >> 1n) ^ 0x9a6c9329ac4bc9b5n;\n }\n else {\n crc = crc >> 1n;\n }\n }\n table[i * 2] = Number((crc >> 32n) & 0xffffffffn);\n table[i * 2 + 1] = Number(crc & 0xffffffffn);\n }\n tables[slice] = new Uint32Array(table);\n }\n return tables;\n};\nlet CRC64_NVME_REVERSED_TABLE;\nlet t0, t1, t2, t3;\nlet t4, t5, t6, t7;\nconst ensureTablesInitialized = () => {\n if (!CRC64_NVME_REVERSED_TABLE) {\n CRC64_NVME_REVERSED_TABLE = generateCRC64NVMETable();\n [t0, t1, t2, t3, t4, t5, t6, t7] = CRC64_NVME_REVERSED_TABLE;\n }\n};\nexport class Crc64Nvme {\n c1 = 0;\n c2 = 0;\n constructor() {\n ensureTablesInitialized();\n this.reset();\n }\n update(data) {\n const len = data.length;\n let i = 0;\n let crc1 = this.c1;\n let crc2 = this.c2;\n while (i + 8 <= len) {\n const idx0 = ((crc2 ^ data[i++]) & 255) << 1;\n const idx1 = (((crc2 >>> 8) ^ data[i++]) & 255) << 1;\n const idx2 = (((crc2 >>> 16) ^ data[i++]) & 255) << 1;\n const idx3 = (((crc2 >>> 24) ^ data[i++]) & 255) << 1;\n const idx4 = ((crc1 ^ data[i++]) & 255) << 1;\n const idx5 = (((crc1 >>> 8) ^ data[i++]) & 255) << 1;\n const idx6 = (((crc1 >>> 16) ^ data[i++]) & 255) << 1;\n const idx7 = (((crc1 >>> 24) ^ data[i++]) & 255) << 1;\n crc1 = t7[idx0] ^ t6[idx1] ^ t5[idx2] ^ t4[idx3] ^ t3[idx4] ^ t2[idx5] ^ t1[idx6] ^ t0[idx7];\n crc2 =\n t7[idx0 + 1] ^\n t6[idx1 + 1] ^\n t5[idx2 + 1] ^\n t4[idx3 + 1] ^\n t3[idx4 + 1] ^\n t2[idx5 + 1] ^\n t1[idx6 + 1] ^\n t0[idx7 + 1];\n }\n while (i < len) {\n const idx = ((crc2 ^ data[i]) & 255) << 1;\n crc2 = ((crc2 >>> 8) | ((crc1 & 255) << 24)) >>> 0;\n crc1 = (crc1 >>> 8) ^ t0[idx];\n crc2 ^= t0[idx + 1];\n i++;\n }\n this.c1 = crc1;\n this.c2 = crc2;\n }\n async digest() {\n const c1 = this.c1 ^ 4294967295;\n const c2 = this.c2 ^ 4294967295;\n return new Uint8Array([\n c1 >>> 24,\n (c1 >>> 16) & 255,\n (c1 >>> 8) & 255,\n c1 & 255,\n c2 >>> 24,\n (c2 >>> 16) & 255,\n (c2 >>> 8) & 255,\n c2 & 255,\n ]);\n }\n reset() {\n this.c1 = 4294967295;\n this.c2 = 4294967295;\n }\n}\n", "export const crc64NvmeCrtContainer = {\n CrtCrc64Nvme: null,\n};\n", "import { AwsCrc32 } from \"@aws-crypto/crc32\";\nexport const getCrc32ChecksumAlgorithmFunction = () => AwsCrc32;\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SourceData, Checksum } from \"@aws-sdk/types\";\nimport { convertToBuffer, isEmptyData, numToUint8 } from \"@aws-crypto/util\";\nimport { Crc32 } from \"./index\";\n\nexport class AwsCrc32 implements Checksum {\n private crc32 = new Crc32();\n\n update(toHash: SourceData) {\n if (isEmptyData(toHash)) return;\n\n this.crc32.update(convertToBuffer(toHash));\n }\n\n async digest(): Promise {\n return numToUint8(this.crc32.digest());\n }\n\n reset(): void {\n this.crc32 = new Crc32();\n }\n}\n", "import {uint32ArrayFrom} from \"@aws-crypto/util\";\n\nexport function crc32(data: Uint8Array): number {\n return new Crc32().update(data).digest();\n}\n\nexport class Crc32 {\n private checksum = 0xffffffff;\n\n update(data: Uint8Array): this {\n for (const byte of data) {\n this.checksum =\n (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff];\n }\n\n return this;\n }\n\n digest(): number {\n return (this.checksum ^ 0xffffffff) >>> 0;\n }\n}\n\n// prettier-ignore\nconst a_lookUpTable = [\n 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,\n 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,\n 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,\n 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,\n 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,\n 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,\n 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,\n 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,\n 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,\n 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,\n 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,\n 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,\n 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,\n 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,\n 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,\n 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,\n 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,\n 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,\n 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,\n 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,\n 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,\n 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,\n 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,\n 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,\n 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,\n 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,\n 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,\n 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,\n 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,\n 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,\n 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,\n 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,\n 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,\n 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,\n 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,\n 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,\n 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,\n 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,\n 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,\n 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,\n 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,\n 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,\n 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,\n 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,\n 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,\n 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,\n 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,\n 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,\n 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,\n 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,\n 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,\n 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,\n 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,\n 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,\n 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,\n 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,\n 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,\n 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,\n 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,\n 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,\n 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,\n 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,\n 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,\n 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D,\n];\nconst lookupTable: Uint32Array = uint32ArrayFrom(a_lookUpTable)\nexport { AwsCrc32 } from \"./aws_crc32\";\n", "import { ChecksumAlgorithm } from \"./constants\";\nexport const CLIENT_SUPPORTED_ALGORITHMS = [\n ChecksumAlgorithm.CRC32,\n ChecksumAlgorithm.CRC32C,\n ChecksumAlgorithm.CRC64NVME,\n ChecksumAlgorithm.SHA1,\n ChecksumAlgorithm.SHA256,\n];\nexport const PRIORITY_ORDER_ALGORITHMS = [\n ChecksumAlgorithm.SHA256,\n ChecksumAlgorithm.SHA1,\n ChecksumAlgorithm.CRC32,\n ChecksumAlgorithm.CRC32C,\n ChecksumAlgorithm.CRC64NVME,\n];\n", "import { toUint8Array } from \"@smithy/util-utf8\";\nexport const stringHasher = (checksumAlgorithmFn, body) => {\n const hash = new checksumAlgorithmFn();\n hash.update(toUint8Array(body || \"\"));\n return hash.digest();\n};\n", "import { flexibleChecksumsInputMiddleware, flexibleChecksumsInputMiddlewareOptions, } from \"./flexibleChecksumsInputMiddleware\";\nimport { flexibleChecksumsMiddleware, flexibleChecksumsMiddlewareOptions } from \"./flexibleChecksumsMiddleware\";\nimport { flexibleChecksumsResponseMiddleware, flexibleChecksumsResponseMiddlewareOptions, } from \"./flexibleChecksumsResponseMiddleware\";\nexport const getFlexibleChecksumsPlugin = (config, middlewareConfig) => ({\n applyToStack: (clientStack) => {\n clientStack.add(flexibleChecksumsMiddleware(config, middlewareConfig), flexibleChecksumsMiddlewareOptions);\n clientStack.addRelativeTo(flexibleChecksumsInputMiddleware(config, middlewareConfig), flexibleChecksumsInputMiddlewareOptions);\n clientStack.addRelativeTo(flexibleChecksumsResponseMiddleware(config, middlewareConfig), flexibleChecksumsResponseMiddlewareOptions);\n },\n});\n", "import { setFeature } from \"@aws-sdk/core\";\nimport { RequestChecksumCalculation, ResponseChecksumValidation } from \"./constants\";\nexport const flexibleChecksumsInputMiddlewareOptions = {\n name: \"flexibleChecksumsInputMiddleware\",\n toMiddleware: \"serializerMiddleware\",\n relation: \"before\",\n tags: [\"BODY_CHECKSUM\"],\n override: true,\n};\nexport const flexibleChecksumsInputMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {\n const input = args.input;\n const { requestValidationModeMember } = middlewareConfig;\n const requestChecksumCalculation = await config.requestChecksumCalculation();\n const responseChecksumValidation = await config.responseChecksumValidation();\n switch (requestChecksumCalculation) {\n case RequestChecksumCalculation.WHEN_REQUIRED:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED\", \"a\");\n break;\n case RequestChecksumCalculation.WHEN_SUPPORTED:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED\", \"Z\");\n break;\n }\n switch (responseChecksumValidation) {\n case ResponseChecksumValidation.WHEN_REQUIRED:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED\", \"c\");\n break;\n case ResponseChecksumValidation.WHEN_SUPPORTED:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED\", \"b\");\n break;\n }\n if (requestValidationModeMember && !input[requestValidationModeMember]) {\n if (responseChecksumValidation === ResponseChecksumValidation.WHEN_SUPPORTED) {\n input[requestValidationModeMember] = \"ENABLED\";\n }\n }\n return next(args);\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { getChecksumAlgorithmListForResponse } from \"./getChecksumAlgorithmListForResponse\";\nimport { getChecksumLocationName } from \"./getChecksumLocationName\";\nimport { isChecksumWithPartNumber } from \"./isChecksumWithPartNumber\";\nimport { validateChecksumFromResponse } from \"./validateChecksumFromResponse\";\nexport const flexibleChecksumsResponseMiddlewareOptions = {\n name: \"flexibleChecksumsResponseMiddleware\",\n toMiddleware: \"deserializerMiddleware\",\n relation: \"after\",\n tags: [\"BODY_CHECKSUM\"],\n override: true,\n};\nexport const flexibleChecksumsResponseMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {\n if (!HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n const input = args.input;\n const result = await next(args);\n const response = result.response;\n const { requestValidationModeMember, responseAlgorithms } = middlewareConfig;\n if (requestValidationModeMember && input[requestValidationModeMember] === \"ENABLED\") {\n const { clientName, commandName } = context;\n const isS3WholeObjectMultipartGetResponseChecksum = clientName === \"S3Client\" &&\n commandName === \"GetObjectCommand\" &&\n getChecksumAlgorithmListForResponse(responseAlgorithms).every((algorithm) => {\n const responseHeader = getChecksumLocationName(algorithm);\n const checksumFromResponse = response.headers[responseHeader];\n return !checksumFromResponse || isChecksumWithPartNumber(checksumFromResponse);\n });\n if (isS3WholeObjectMultipartGetResponseChecksum) {\n return result;\n }\n await validateChecksumFromResponse(response, {\n config,\n responseAlgorithms,\n logger: context.logger,\n });\n }\n return result;\n};\n", "import { CLIENT_SUPPORTED_ALGORITHMS, PRIORITY_ORDER_ALGORITHMS } from \"./types\";\nexport const getChecksumAlgorithmListForResponse = (responseAlgorithms = []) => {\n const validChecksumAlgorithms = [];\n for (const algorithm of PRIORITY_ORDER_ALGORITHMS) {\n if (!responseAlgorithms.includes(algorithm) || !CLIENT_SUPPORTED_ALGORITHMS.includes(algorithm)) {\n continue;\n }\n validChecksumAlgorithms.push(algorithm);\n }\n return validChecksumAlgorithms;\n};\n", "export const isChecksumWithPartNumber = (checksum) => {\n const lastHyphenIndex = checksum.lastIndexOf(\"-\");\n if (lastHyphenIndex !== -1) {\n const numberPart = checksum.slice(lastHyphenIndex + 1);\n if (!numberPart.startsWith(\"0\")) {\n const number = parseInt(numberPart, 10);\n if (!isNaN(number) && number >= 1 && number <= 10000) {\n return true;\n }\n }\n }\n return false;\n};\n", "import { createChecksumStream } from \"@smithy/util-stream\";\nimport { ChecksumAlgorithm } from \"./constants\";\nimport { getChecksum } from \"./getChecksum\";\nimport { getChecksumAlgorithmListForResponse } from \"./getChecksumAlgorithmListForResponse\";\nimport { getChecksumLocationName } from \"./getChecksumLocationName\";\nimport { isStreaming } from \"./isStreaming\";\nimport { selectChecksumAlgorithmFunction } from \"./selectChecksumAlgorithmFunction\";\nexport const validateChecksumFromResponse = async (response, { config, responseAlgorithms, logger }) => {\n const checksumAlgorithms = getChecksumAlgorithmListForResponse(responseAlgorithms);\n const { body: responseBody, headers: responseHeaders } = response;\n for (const algorithm of checksumAlgorithms) {\n const responseHeader = getChecksumLocationName(algorithm);\n const checksumFromResponse = responseHeaders[responseHeader];\n if (checksumFromResponse) {\n let checksumAlgorithmFn;\n try {\n checksumAlgorithmFn = selectChecksumAlgorithmFunction(algorithm, config);\n }\n catch (error) {\n if (algorithm === ChecksumAlgorithm.CRC64NVME) {\n logger?.warn(`Skipping ${ChecksumAlgorithm.CRC64NVME} checksum validation: ${error.message}`);\n continue;\n }\n throw error;\n }\n const { base64Encoder } = config;\n if (isStreaming(responseBody)) {\n response.body = createChecksumStream({\n expectedChecksum: checksumFromResponse,\n checksumSourceLocation: responseHeader,\n checksum: new checksumAlgorithmFn(),\n source: responseBody,\n base64Encoder,\n });\n return;\n }\n const checksum = await getChecksum(responseBody, { checksumAlgorithmFn, base64Encoder });\n if (checksum === checksumFromResponse) {\n break;\n }\n throw new Error(`Checksum mismatch: expected \"${checksum}\" but received \"${checksumFromResponse}\"` +\n ` in response header \"${responseHeader}\".`);\n }\n }\n};\n", "import { stringHasher } from \"./stringHasher\";\nexport const getChecksum = async (body, { checksumAlgorithmFn, base64Encoder }) => base64Encoder(await stringHasher(checksumAlgorithmFn, body));\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { NoOpLogger } from \"@smithy/smithy-client\";\nconst CONTENT_LENGTH_HEADER = \"content-length\";\nconst DECODED_CONTENT_LENGTH_HEADER = \"x-amz-decoded-content-length\";\nexport function checkContentLengthHeader() {\n return (next, context) => async (args) => {\n const { request } = args;\n if (HttpRequest.isInstance(request)) {\n if (!(CONTENT_LENGTH_HEADER in request.headers) && !(DECODED_CONTENT_LENGTH_HEADER in request.headers)) {\n const message = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`;\n if (typeof context?.logger?.warn === \"function\" && !(context.logger instanceof NoOpLogger)) {\n context.logger.warn(message);\n }\n else {\n console.warn(message);\n }\n }\n }\n return next({ ...args });\n };\n}\nexport const checkContentLengthHeaderMiddlewareOptions = {\n step: \"finalizeRequest\",\n tags: [\"CHECK_CONTENT_LENGTH_HEADER\"],\n name: \"getCheckContentLengthHeaderPlugin\",\n override: true,\n};\nexport const getCheckContentLengthHeaderPlugin = (unused) => ({\n applyToStack: (clientStack) => {\n clientStack.add(checkContentLengthHeader(), checkContentLengthHeaderMiddlewareOptions);\n },\n});\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nimport { parseRfc7231DateTime } from \"@smithy/smithy-client\";\nexport const s3ExpiresMiddleware = (config) => {\n return (next, context) => async (args) => {\n const result = await next(args);\n const { response } = result;\n if (HttpResponse.isInstance(response)) {\n if (response.headers.expires) {\n response.headers.expiresstring = response.headers.expires;\n try {\n parseRfc7231DateTime(response.headers.expires);\n }\n catch (e) {\n context.logger?.warn(`AWS SDK Warning for ${context.clientName}::${context.commandName} response parsing (${response.headers.expires}): ${e}`);\n delete response.headers.expires;\n }\n }\n }\n return result;\n };\n};\nexport const s3ExpiresMiddlewareOptions = {\n tags: [\"S3\"],\n name: \"s3ExpiresMiddleware\",\n override: true,\n relation: \"after\",\n toMiddleware: \"deserializerMiddleware\",\n};\nexport const getS3ExpiresMiddlewarePlugin = (clientConfig) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(s3ExpiresMiddleware(clientConfig), s3ExpiresMiddlewareOptions);\n },\n});\n", "export { S3ExpressIdentityCache } from \"./classes/S3ExpressIdentityCache\";\nexport { S3ExpressIdentityCacheEntry } from \"./classes/S3ExpressIdentityCacheEntry\";\nexport { S3ExpressIdentityProviderImpl } from \"./classes/S3ExpressIdentityProviderImpl\";\nexport { SignatureV4S3Express } from \"./classes/SignatureV4S3Express\";\nexport { NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS } from \"./constants\";\nexport { getS3ExpressPlugin, s3ExpressMiddleware, s3ExpressMiddlewareOptions } from \"./functions/s3ExpressMiddleware\";\nexport { getS3ExpressHttpSigningPlugin, s3ExpressHttpSigningMiddleware, s3ExpressHttpSigningMiddlewareOptions, } from \"./functions/s3ExpressHttpSigningMiddleware\";\n", "import { SignatureV4 } from \"@smithy/signature-v4\";\nimport { SESSION_TOKEN_HEADER, SESSION_TOKEN_QUERY_PARAM } from \"../constants\";\nexport class SignatureV4S3Express extends SignatureV4 {\n async signWithCredentials(requestToSign, credentials, options) {\n const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);\n requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken;\n const privateAccess = this;\n setSingleOverride(privateAccess, credentialsWithoutSessionToken);\n return privateAccess.signRequest(requestToSign, options ?? {});\n }\n async presignWithCredentials(requestToSign, credentials, options) {\n const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);\n delete requestToSign.headers[SESSION_TOKEN_HEADER];\n requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;\n requestToSign.query = requestToSign.query ?? {};\n requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;\n const privateAccess = this;\n setSingleOverride(privateAccess, credentialsWithoutSessionToken);\n return this.presign(requestToSign, options);\n }\n}\nfunction getCredentialsWithoutSessionToken(credentials) {\n const credentialsWithoutSessionToken = {\n accessKeyId: credentials.accessKeyId,\n secretAccessKey: credentials.secretAccessKey,\n expiration: credentials.expiration,\n };\n return credentialsWithoutSessionToken;\n}\nfunction setSingleOverride(privateAccess, credentialsWithoutSessionToken) {\n const id = setTimeout(() => {\n throw new Error(\"SignatureV4S3Express credential override was created but not called.\");\n }, 10);\n const currentCredentialProvider = privateAccess.credentialProvider;\n const overrideCredentialsProviderOnce = () => {\n clearTimeout(id);\n privateAccess.credentialProvider = currentCredentialProvider;\n return Promise.resolve(credentialsWithoutSessionToken);\n };\n privateAccess.credentialProvider = overrideCredentialsProviderOnce;\n}\n", "import { booleanSelector, SelectorType } from \"@smithy/util-config-provider\";\nexport const S3_EXPRESS_BUCKET_TYPE = \"Directory\";\nexport const S3_EXPRESS_BACKEND = \"S3Express\";\nexport const S3_EXPRESS_AUTH_SCHEME = \"sigv4-s3express\";\nexport const SESSION_TOKEN_QUERY_PARAM = \"X-Amz-S3session-Token\";\nexport const SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase();\nexport const NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME = \"AWS_S3_DISABLE_EXPRESS_SESSION_AUTH\";\nexport const NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME = \"s3_disable_express_session_auth\";\nexport const NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = {\n environmentVariableSelector: (env) => booleanSelector(env, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME, SelectorType.ENV),\n configFileSelector: (profile) => booleanSelector(profile, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME, SelectorType.CONFIG),\n default: false,\n};\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nimport { headStream, splitStream } from \"@smithy/util-stream\";\nconst THROW_IF_EMPTY_BODY = {\n CopyObjectCommand: true,\n UploadPartCopyCommand: true,\n CompleteMultipartUploadCommand: true,\n};\nconst MAX_BYTES_TO_INSPECT = 3000;\nexport const throw200ExceptionsMiddleware = (config) => (next, context) => async (args) => {\n const result = await next(args);\n const { response } = result;\n if (!HttpResponse.isInstance(response)) {\n return result;\n }\n const { statusCode, body: sourceBody } = response;\n if (statusCode < 200 || statusCode >= 300) {\n return result;\n }\n const isSplittableStream = typeof sourceBody?.stream === \"function\" ||\n typeof sourceBody?.pipe === \"function\" ||\n typeof sourceBody?.tee === \"function\";\n if (!isSplittableStream) {\n return result;\n }\n let bodyCopy = sourceBody;\n let body = sourceBody;\n if (sourceBody && typeof sourceBody === \"object\" && !(sourceBody instanceof Uint8Array)) {\n [bodyCopy, body] = await splitStream(sourceBody);\n }\n response.body = body;\n const bodyBytes = await collectBody(bodyCopy, {\n streamCollector: async (stream) => {\n return headStream(stream, MAX_BYTES_TO_INSPECT);\n },\n });\n if (typeof bodyCopy?.destroy === \"function\") {\n bodyCopy.destroy();\n }\n const bodyStringTail = config.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16));\n if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context.commandName]) {\n const err = new Error(\"S3 aborted request\");\n err.name = \"InternalError\";\n throw err;\n }\n if (bodyStringTail && bodyStringTail.endsWith(\"\")) {\n response.statusCode = 400;\n }\n return result;\n};\nconst collectBody = (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return Promise.resolve(streamBody);\n }\n return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());\n};\nexport const throw200ExceptionsMiddlewareOptions = {\n relation: \"after\",\n toMiddleware: \"deserializerMiddleware\",\n tags: [\"THROW_200_EXCEPTIONS\", \"S3\"],\n name: \"throw200ExceptionsMiddleware\",\n override: true,\n};\nexport const getThrow200ExceptionsPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(throw200ExceptionsMiddleware(config), throw200ExceptionsMiddlewareOptions);\n },\n});\n", "import { resolveParamsForS3 } from \"../service-customizations\";\nimport { createConfigValueProvider } from \"./createConfigValueProvider\";\nimport { getEndpointFromConfig } from \"./getEndpointFromConfig\";\nimport { toEndpointV1 } from \"./toEndpointV1\";\nexport const getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => {\n if (!clientConfig.isCustomEndpoint) {\n let endpointFromConfig;\n if (clientConfig.serviceConfiguredEndpoint) {\n endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();\n }\n else {\n endpointFromConfig = await getEndpointFromConfig(clientConfig.serviceId);\n }\n if (endpointFromConfig) {\n clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));\n clientConfig.isCustomEndpoint = true;\n }\n }\n const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);\n if (typeof clientConfig.endpointProvider !== \"function\") {\n throw new Error(\"config.endpointProvider is not set.\");\n }\n const endpoint = clientConfig.endpointProvider(endpointParams, context);\n if (clientConfig.isCustomEndpoint && clientConfig.endpoint) {\n const customEndpoint = await clientConfig.endpoint();\n if (customEndpoint?.headers) {\n endpoint.headers ??= {};\n for (const [name, value] of Object.entries(customEndpoint.headers)) {\n endpoint.headers[name] = Array.isArray(value) ? value : [value];\n }\n }\n }\n return endpoint;\n};\nexport const resolveParams = async (commandInput, instructionsSupplier, clientConfig) => {\n const endpointParams = {};\n const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {};\n for (const [name, instruction] of Object.entries(instructions)) {\n switch (instruction.type) {\n case \"staticContextParams\":\n endpointParams[name] = instruction.value;\n break;\n case \"contextParams\":\n endpointParams[name] = commandInput[instruction.name];\n break;\n case \"clientContextParams\":\n case \"builtInParams\":\n endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== \"builtInParams\")();\n break;\n case \"operationContextParams\":\n endpointParams[name] = instruction.get(commandInput);\n break;\n default:\n throw new Error(\"Unrecognized endpoint parameter instruction: \" + JSON.stringify(instruction));\n }\n }\n if (Object.keys(instructions).length === 0) {\n Object.assign(endpointParams, clientConfig);\n }\n if (String(clientConfig.serviceId).toLowerCase() === \"s3\") {\n await resolveParamsForS3(endpointParams);\n }\n return endpointParams;\n};\n", "export const resolveParamsForS3 = async (endpointParams) => {\n const bucket = endpointParams?.Bucket || \"\";\n if (typeof endpointParams.Bucket === \"string\") {\n endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent(\"#\")).replace(/\\?/g, encodeURIComponent(\"?\"));\n }\n if (isArnBucketName(bucket)) {\n if (endpointParams.ForcePathStyle === true) {\n throw new Error(\"Path-style addressing cannot be used with ARN buckets\");\n }\n }\n else if (!isDnsCompatibleBucketName(bucket) ||\n (bucket.indexOf(\".\") !== -1 && !String(endpointParams.Endpoint).startsWith(\"http:\")) ||\n bucket.toLowerCase() !== bucket ||\n bucket.length < 3) {\n endpointParams.ForcePathStyle = true;\n }\n if (endpointParams.DisableMultiRegionAccessPoints) {\n endpointParams.disableMultiRegionAccessPoints = true;\n endpointParams.DisableMRAP = true;\n }\n return endpointParams;\n};\nconst DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\\.\\-]{1,61}[a-z0-9]$/;\nconst IP_ADDRESS_PATTERN = /(\\d+\\.){3}\\d+/;\nconst DOTS_PATTERN = /\\.\\./;\nexport const DOT_PATTERN = /\\./;\nexport const S3_HOSTNAME_PATTERN = /^(.+\\.)?s3(-fips)?(\\.dualstack)?[.-]([a-z0-9-]+)\\./;\nexport const isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName);\nexport const isArnBucketName = (bucketName) => {\n const [arn, partition, service, , , bucket] = bucketName.split(\":\");\n const isArn = arn === \"arn\" && bucketName.split(\":\").length >= 6;\n const isValidArn = Boolean(isArn && partition && service && bucket);\n if (isArn && !isValidArn) {\n throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);\n }\n return isValidArn;\n};\n", "export const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => {\n const configProvider = async () => {\n let configValue;\n if (isClientContextParam) {\n const clientContextParams = config.clientContextParams;\n const nestedValue = clientContextParams?.[configKey];\n configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey];\n }\n else {\n configValue = config[configKey] ?? config[canonicalEndpointParamKey];\n }\n if (typeof configValue === \"function\") {\n return configValue();\n }\n return configValue;\n };\n if (configKey === \"credentialScope\" || canonicalEndpointParamKey === \"CredentialScope\") {\n return async () => {\n const credentials = typeof config.credentials === \"function\" ? await config.credentials() : config.credentials;\n const configValue = credentials?.credentialScope ?? credentials?.CredentialScope;\n return configValue;\n };\n }\n if (configKey === \"accountId\" || canonicalEndpointParamKey === \"AccountId\") {\n return async () => {\n const credentials = typeof config.credentials === \"function\" ? await config.credentials() : config.credentials;\n const configValue = credentials?.accountId ?? credentials?.AccountId;\n return configValue;\n };\n }\n if (configKey === \"endpoint\" || canonicalEndpointParamKey === \"endpoint\") {\n return async () => {\n if (config.isCustomEndpoint === false) {\n return undefined;\n }\n const endpoint = await configProvider();\n if (endpoint && typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n return endpoint.url.href;\n }\n if (\"hostname\" in endpoint) {\n const { protocol, hostname, port, path } = endpoint;\n return `${protocol}//${hostname}${port ? \":\" + port : \"\"}${path}`;\n }\n }\n return endpoint;\n };\n }\n return configProvider;\n};\n", "export const getEndpointFromConfig = async (serviceId) => undefined;\n", "import { parseUrl } from \"@smithy/url-parser\";\nexport const toEndpointV1 = (endpoint) => {\n if (typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n const v1Endpoint = parseUrl(endpoint.url);\n if (endpoint.headers) {\n v1Endpoint.headers = {};\n for (const [name, values] of Object.entries(endpoint.headers)) {\n v1Endpoint.headers[name.toLowerCase()] = values.join(\", \");\n }\n }\n return v1Endpoint;\n }\n return endpoint;\n }\n return parseUrl(endpoint);\n};\n", "import { setFeature } from \"@smithy/core\";\nimport { getSmithyContext } from \"@smithy/util-middleware\";\nimport { getEndpointFromInstructions } from \"./adaptors/getEndpointFromInstructions\";\nexport const endpointMiddleware = ({ config, instructions, }) => {\n return (next, context) => async (args) => {\n if (config.isCustomEndpoint) {\n setFeature(context, \"ENDPOINT_OVERRIDE\", \"N\");\n }\n const endpoint = await getEndpointFromInstructions(args.input, {\n getEndpointParameterInstructions() {\n return instructions;\n },\n }, { ...config }, context);\n context.endpointV2 = endpoint;\n context.authSchemes = endpoint.properties?.authSchemes;\n const authScheme = context.authSchemes?.[0];\n if (authScheme) {\n context[\"signing_region\"] = authScheme.signingRegion;\n context[\"signing_service\"] = authScheme.signingName;\n const smithyContext = getSmithyContext(context);\n const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;\n if (httpAuthOption) {\n httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {\n signing_region: authScheme.signingRegion,\n signingRegion: authScheme.signingRegion,\n signing_service: authScheme.signingName,\n signingName: authScheme.signingName,\n signingRegionSet: authScheme.signingRegionSet,\n }, authScheme.properties);\n }\n }\n return next({\n ...args,\n });\n };\n};\n", "import { serializerMiddlewareOption } from \"@smithy/middleware-serde\";\nimport { endpointMiddleware } from \"./endpointMiddleware\";\nexport const endpointMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"ENDPOINT_PARAMETERS\", \"ENDPOINT_V2\", \"ENDPOINT\"],\n name: \"endpointV2Middleware\",\n override: true,\n relation: \"before\",\n toMiddleware: serializerMiddlewareOption.name,\n};\nexport const getEndpointPlugin = (config, instructions) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(endpointMiddleware({\n config,\n instructions,\n }), endpointMiddlewareOptions);\n },\n});\n", "import { deserializerMiddleware } from \"./deserializerMiddleware\";\nimport { serializerMiddleware } from \"./serializerMiddleware\";\nexport const deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true,\n};\nexport const serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true,\n};\nexport function getSerdePlugin(config, serializer, deserializer) {\n return {\n applyToStack: (commandStack) => {\n commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);\n commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);\n },\n };\n}\n", "import { SignatureV4S3Express } from \"@aws-sdk/middleware-sdk-s3\";\nimport { signatureV4aContainer } from \"@smithy/signature-v4\";\nimport { signatureV4CrtContainer } from \"./signature-v4-crt-container\";\nexport class SignatureV4MultiRegion {\n sigv4aSigner;\n sigv4Signer;\n signerOptions;\n static sigv4aDependency() {\n if (typeof signatureV4CrtContainer.CrtSignerV4 === \"function\") {\n return \"crt\";\n }\n else if (typeof signatureV4aContainer.SignatureV4a === \"function\") {\n return \"js\";\n }\n return \"none\";\n }\n constructor(options) {\n this.sigv4Signer = new SignatureV4S3Express(options);\n this.signerOptions = options;\n }\n async sign(requestToSign, options = {}) {\n if (options.signingRegion === \"*\") {\n return this.getSigv4aSigner().sign(requestToSign, options);\n }\n return this.sigv4Signer.sign(requestToSign, options);\n }\n async signWithCredentials(requestToSign, credentials, options = {}) {\n if (options.signingRegion === \"*\") {\n const signer = this.getSigv4aSigner();\n const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;\n if (CrtSignerV4 && signer instanceof CrtSignerV4) {\n return signer.signWithCredentials(requestToSign, credentials, options);\n }\n else {\n throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. ` +\n `Please check whether you have installed the \"@aws-sdk/signature-v4-crt\" package explicitly. ` +\n `You must also register the package by calling [require(\"@aws-sdk/signature-v4-crt\");] ` +\n `or an ESM equivalent such as [import \"@aws-sdk/signature-v4-crt\";]. ` +\n `For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);\n }\n }\n return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options);\n }\n async presign(originalRequest, options = {}) {\n if (options.signingRegion === \"*\") {\n const signer = this.getSigv4aSigner();\n const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;\n if (CrtSignerV4 && signer instanceof CrtSignerV4) {\n return signer.presign(originalRequest, options);\n }\n else {\n throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. ` +\n `Please check whether you have installed the \"@aws-sdk/signature-v4-crt\" package explicitly. ` +\n `You must also register the package by calling [require(\"@aws-sdk/signature-v4-crt\");] ` +\n `or an ESM equivalent such as [import \"@aws-sdk/signature-v4-crt\";]. ` +\n `For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);\n }\n }\n return this.sigv4Signer.presign(originalRequest, options);\n }\n async presignWithCredentials(originalRequest, credentials, options = {}) {\n if (options.signingRegion === \"*\") {\n throw new Error(\"Method presignWithCredentials is not supported for [signingRegion=*].\");\n }\n return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options);\n }\n getSigv4aSigner() {\n if (!this.sigv4aSigner) {\n const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;\n const JsSigV4aSigner = signatureV4aContainer.SignatureV4a;\n if (this.signerOptions.runtime === \"node\") {\n if (!CrtSignerV4 && !JsSigV4aSigner) {\n throw new Error(\"Neither CRT nor JS SigV4a implementation is available. \" +\n \"Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. \" +\n \"For more information please go to \" +\n \"https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt\");\n }\n if (CrtSignerV4 && typeof CrtSignerV4 === \"function\") {\n this.sigv4aSigner = new CrtSignerV4({\n ...this.signerOptions,\n signingAlgorithm: 1,\n });\n }\n else if (JsSigV4aSigner && typeof JsSigV4aSigner === \"function\") {\n this.sigv4aSigner = new JsSigV4aSigner({\n ...this.signerOptions,\n });\n }\n else {\n throw new Error(\"Available SigV4a implementation is not a valid constructor. \" +\n \"Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.\" +\n \"For more information please go to \" +\n \"https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt\");\n }\n }\n else {\n if (!JsSigV4aSigner || typeof JsSigV4aSigner !== \"function\") {\n throw new Error(\"JS SigV4a implementation is not available or not a valid constructor. \" +\n \"Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. \" +\n \"You must also register the package by calling [require('@aws-sdk/signature-v4a');] \" +\n \"or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. \" +\n \"For more information please go to \" +\n \"https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a\");\n }\n this.sigv4aSigner = new JsSigV4aSigner({\n ...this.signerOptions,\n });\n }\n }\n return this.sigv4aSigner;\n }\n}\n", "export const signatureV4CrtContainer = {\n CrtSignerV4: null,\n};\n", "const clientContextParamDefaults = {};\nexport const resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n forcePathStyle: options.forcePathStyle ?? false,\n useAccelerateEndpoint: options.useAccelerateEndpoint ?? false,\n useGlobalEndpoint: options.useGlobalEndpoint ?? false,\n disableMultiregionAccessPoints: options.disableMultiregionAccessPoints ?? false,\n defaultSigningName: \"s3\",\n clientContextParams: options.clientContextParams ?? {},\n });\n};\nexport const commonParams = {\n ForcePathStyle: { type: \"clientContextParams\", name: \"forcePathStyle\" },\n UseArnRegion: { type: \"clientContextParams\", name: \"useArnRegion\" },\n DisableMultiRegionAccessPoints: { type: \"clientContextParams\", name: \"disableMultiregionAccessPoints\" },\n Accelerate: { type: \"clientContextParams\", name: \"useAccelerateEndpoint\" },\n DisableS3ExpressSessionAuth: { type: \"clientContextParams\", name: \"disableS3ExpressSessionAuth\" },\n UseGlobalEndpoint: { type: \"builtInParams\", name: \"useGlobalEndpoint\" },\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n", "const _A = \"Account\";\nconst _AAO = \"AnalyticsAndOperator\";\nconst _AC = \"AccelerateConfiguration\";\nconst _ACL = \"AccessControlList\";\nconst _ACL_ = \"ACL\";\nconst _ACLn = \"AnalyticsConfigurationList\";\nconst _ACP = \"AccessControlPolicy\";\nconst _ACT = \"AccessControlTranslation\";\nconst _ACn = \"AnalyticsConfiguration\";\nconst _AD = \"AccessDenied\";\nconst _ADb = \"AbortDate\";\nconst _AED = \"AnalyticsExportDestination\";\nconst _AF = \"AnalyticsFilter\";\nconst _AH = \"AllowedHeaders\";\nconst _AHl = \"AllowedHeader\";\nconst _AI = \"AccountId\";\nconst _AIMU = \"AbortIncompleteMultipartUpload\";\nconst _AKI = \"AccessKeyId\";\nconst _AM = \"AllowedMethods\";\nconst _AMU = \"AbortMultipartUpload\";\nconst _AMUO = \"AbortMultipartUploadOutput\";\nconst _AMUR = \"AbortMultipartUploadRequest\";\nconst _AMl = \"AllowedMethod\";\nconst _AO = \"AllowedOrigins\";\nconst _AOl = \"AllowedOrigin\";\nconst _APA = \"AccessPointAlias\";\nconst _APAc = \"AccessPointArn\";\nconst _AQRD = \"AllowQuotedRecordDelimiter\";\nconst _AR = \"AcceptRanges\";\nconst _ARI = \"AbortRuleId\";\nconst _AS = \"AbacStatus\";\nconst _ASBD = \"AnalyticsS3BucketDestination\";\nconst _ASSEBD = \"ApplyServerSideEncryptionByDefault\";\nconst _ASr = \"ArchiveStatus\";\nconst _AT = \"AccessTier\";\nconst _An = \"And\";\nconst _B = \"Bucket\";\nconst _BA = \"BucketArn\";\nconst _BAE = \"BucketAlreadyExists\";\nconst _BAI = \"BucketAccountId\";\nconst _BAOBY = \"BucketAlreadyOwnedByYou\";\nconst _BET = \"BlockedEncryptionTypes\";\nconst _BGR = \"BypassGovernanceRetention\";\nconst _BI = \"BucketInfo\";\nconst _BKE = \"BucketKeyEnabled\";\nconst _BLC = \"BucketLifecycleConfiguration\";\nconst _BLN = \"BucketLocationName\";\nconst _BLS = \"BucketLoggingStatus\";\nconst _BLT = \"BucketLocationType\";\nconst _BN = \"BucketNamespace\";\nconst _BNu = \"BucketName\";\nconst _BP = \"BytesProcessed\";\nconst _BPA = \"BlockPublicAcls\";\nconst _BPP = \"BlockPublicPolicy\";\nconst _BR = \"BucketRegion\";\nconst _BRy = \"BytesReturned\";\nconst _BS = \"BytesScanned\";\nconst _Bo = \"Body\";\nconst _Bu = \"Buckets\";\nconst _C = \"Checksum\";\nconst _CA = \"ChecksumAlgorithm\";\nconst _CACL = \"CannedACL\";\nconst _CB = \"CreateBucket\";\nconst _CBC = \"CreateBucketConfiguration\";\nconst _CBMC = \"CreateBucketMetadataConfiguration\";\nconst _CBMCR = \"CreateBucketMetadataConfigurationRequest\";\nconst _CBMTC = \"CreateBucketMetadataTableConfiguration\";\nconst _CBMTCR = \"CreateBucketMetadataTableConfigurationRequest\";\nconst _CBO = \"CreateBucketOutput\";\nconst _CBR = \"CreateBucketRequest\";\nconst _CC = \"CacheControl\";\nconst _CCRC = \"ChecksumCRC32\";\nconst _CCRCC = \"ChecksumCRC32C\";\nconst _CCRCNVME = \"ChecksumCRC64NVME\";\nconst _CC_ = \"Cache-Control\";\nconst _CD = \"CreationDate\";\nconst _CD_ = \"Content-Disposition\";\nconst _CDo = \"ContentDisposition\";\nconst _CE = \"ContinuationEvent\";\nconst _CE_ = \"Content-Encoding\";\nconst _CEo = \"ContentEncoding\";\nconst _CF = \"CloudFunction\";\nconst _CFC = \"CloudFunctionConfiguration\";\nconst _CL = \"ContentLanguage\";\nconst _CL_ = \"Content-Language\";\nconst _CL__ = \"Content-Length\";\nconst _CLo = \"ContentLength\";\nconst _CM = \"Content-MD5\";\nconst _CMD = \"ContentMD5\";\nconst _CMU = \"CompletedMultipartUpload\";\nconst _CMUO = \"CompleteMultipartUploadOutput\";\nconst _CMUOr = \"CreateMultipartUploadOutput\";\nconst _CMUR = \"CompleteMultipartUploadResult\";\nconst _CMURo = \"CompleteMultipartUploadRequest\";\nconst _CMURr = \"CreateMultipartUploadRequest\";\nconst _CMUo = \"CompleteMultipartUpload\";\nconst _CMUr = \"CreateMultipartUpload\";\nconst _CMh = \"ChecksumMode\";\nconst _CO = \"CopyObject\";\nconst _COO = \"CopyObjectOutput\";\nconst _COR = \"CopyObjectResult\";\nconst _CORSC = \"CORSConfiguration\";\nconst _CORSR = \"CORSRules\";\nconst _CORSRu = \"CORSRule\";\nconst _CORo = \"CopyObjectRequest\";\nconst _CP = \"CommonPrefix\";\nconst _CPL = \"CommonPrefixList\";\nconst _CPLo = \"CompletedPartList\";\nconst _CPR = \"CopyPartResult\";\nconst _CPo = \"CompletedPart\";\nconst _CPom = \"CommonPrefixes\";\nconst _CR = \"ContentRange\";\nconst _CRSBA = \"ConfirmRemoveSelfBucketAccess\";\nconst _CR_ = \"Content-Range\";\nconst _CS = \"CopySource\";\nconst _CSHA = \"ChecksumSHA1\";\nconst _CSHAh = \"ChecksumSHA256\";\nconst _CSIM = \"CopySourceIfMatch\";\nconst _CSIMS = \"CopySourceIfModifiedSince\";\nconst _CSINM = \"CopySourceIfNoneMatch\";\nconst _CSIUS = \"CopySourceIfUnmodifiedSince\";\nconst _CSO = \"CreateSessionOutput\";\nconst _CSR = \"CreateSessionResult\";\nconst _CSRo = \"CopySourceRange\";\nconst _CSRr = \"CreateSessionRequest\";\nconst _CSSSECA = \"CopySourceSSECustomerAlgorithm\";\nconst _CSSSECK = \"CopySourceSSECustomerKey\";\nconst _CSSSECKMD = \"CopySourceSSECustomerKeyMD5\";\nconst _CSV = \"CSV\";\nconst _CSVI = \"CopySourceVersionId\";\nconst _CSVIn = \"CSVInput\";\nconst _CSVO = \"CSVOutput\";\nconst _CSo = \"ConfigurationState\";\nconst _CSr = \"CreateSession\";\nconst _CT = \"ChecksumType\";\nconst _CT_ = \"Content-Type\";\nconst _CTl = \"ClientToken\";\nconst _CTo = \"ContentType\";\nconst _CTom = \"CompressionType\";\nconst _CTon = \"ContinuationToken\";\nconst _Co = \"Condition\";\nconst _Cod = \"Code\";\nconst _Com = \"Comments\";\nconst _Con = \"Contents\";\nconst _Cont = \"Cont\";\nconst _Cr = \"Credentials\";\nconst _D = \"Days\";\nconst _DAI = \"DaysAfterInitiation\";\nconst _DB = \"DeleteBucket\";\nconst _DBAC = \"DeleteBucketAnalyticsConfiguration\";\nconst _DBACR = \"DeleteBucketAnalyticsConfigurationRequest\";\nconst _DBC = \"DeleteBucketCors\";\nconst _DBCR = \"DeleteBucketCorsRequest\";\nconst _DBE = \"DeleteBucketEncryption\";\nconst _DBER = \"DeleteBucketEncryptionRequest\";\nconst _DBIC = \"DeleteBucketInventoryConfiguration\";\nconst _DBICR = \"DeleteBucketInventoryConfigurationRequest\";\nconst _DBITC = \"DeleteBucketIntelligentTieringConfiguration\";\nconst _DBITCR = \"DeleteBucketIntelligentTieringConfigurationRequest\";\nconst _DBL = \"DeleteBucketLifecycle\";\nconst _DBLR = \"DeleteBucketLifecycleRequest\";\nconst _DBMC = \"DeleteBucketMetadataConfiguration\";\nconst _DBMCR = \"DeleteBucketMetadataConfigurationRequest\";\nconst _DBMCRe = \"DeleteBucketMetricsConfigurationRequest\";\nconst _DBMCe = \"DeleteBucketMetricsConfiguration\";\nconst _DBMTC = \"DeleteBucketMetadataTableConfiguration\";\nconst _DBMTCR = \"DeleteBucketMetadataTableConfigurationRequest\";\nconst _DBOC = \"DeleteBucketOwnershipControls\";\nconst _DBOCR = \"DeleteBucketOwnershipControlsRequest\";\nconst _DBP = \"DeleteBucketPolicy\";\nconst _DBPR = \"DeleteBucketPolicyRequest\";\nconst _DBR = \"DeleteBucketRequest\";\nconst _DBRR = \"DeleteBucketReplicationRequest\";\nconst _DBRe = \"DeleteBucketReplication\";\nconst _DBT = \"DeleteBucketTagging\";\nconst _DBTR = \"DeleteBucketTaggingRequest\";\nconst _DBW = \"DeleteBucketWebsite\";\nconst _DBWR = \"DeleteBucketWebsiteRequest\";\nconst _DE = \"DataExport\";\nconst _DIM = \"DestinationIfMatch\";\nconst _DIMS = \"DestinationIfModifiedSince\";\nconst _DINM = \"DestinationIfNoneMatch\";\nconst _DIUS = \"DestinationIfUnmodifiedSince\";\nconst _DM = \"DeleteMarker\";\nconst _DME = \"DeleteMarkerEntry\";\nconst _DMR = \"DeleteMarkerReplication\";\nconst _DMVI = \"DeleteMarkerVersionId\";\nconst _DMe = \"DeleteMarkers\";\nconst _DN = \"DisplayName\";\nconst _DO = \"DeletedObject\";\nconst _DOO = \"DeleteObjectOutput\";\nconst _DOOe = \"DeleteObjectsOutput\";\nconst _DOR = \"DeleteObjectRequest\";\nconst _DORe = \"DeleteObjectsRequest\";\nconst _DOT = \"DeleteObjectTagging\";\nconst _DOTO = \"DeleteObjectTaggingOutput\";\nconst _DOTR = \"DeleteObjectTaggingRequest\";\nconst _DOe = \"DeletedObjects\";\nconst _DOel = \"DeleteObject\";\nconst _DOele = \"DeleteObjects\";\nconst _DPAB = \"DeletePublicAccessBlock\";\nconst _DPABR = \"DeletePublicAccessBlockRequest\";\nconst _DR = \"DataRedundancy\";\nconst _DRe = \"DefaultRetention\";\nconst _DRel = \"DeleteResult\";\nconst _DRes = \"DestinationResult\";\nconst _Da = \"Date\";\nconst _De = \"Delete\";\nconst _Del = \"Deleted\";\nconst _Deli = \"Delimiter\";\nconst _Des = \"Destination\";\nconst _Desc = \"Description\";\nconst _Det = \"Details\";\nconst _E = \"Expiration\";\nconst _EA = \"EmailAddress\";\nconst _EBC = \"EventBridgeConfiguration\";\nconst _EBO = \"ExpectedBucketOwner\";\nconst _EC = \"EncryptionConfiguration\";\nconst _ECr = \"ErrorCode\";\nconst _ED = \"ErrorDetails\";\nconst _EDr = \"ErrorDocument\";\nconst _EE = \"EndEvent\";\nconst _EH = \"ExposeHeaders\";\nconst _EHx = \"ExposeHeader\";\nconst _EM = \"ErrorMessage\";\nconst _EODM = \"ExpiredObjectDeleteMarker\";\nconst _EOR = \"ExistingObjectReplication\";\nconst _ES = \"ExpiresString\";\nconst _ESBO = \"ExpectedSourceBucketOwner\";\nconst _ET = \"EncryptionType\";\nconst _ETL = \"EncryptionTypeList\";\nconst _ETM = \"EncryptionTypeMismatch\";\nconst _ETa = \"ETag\";\nconst _ETn = \"EncodingType\";\nconst _ETv = \"EventThreshold\";\nconst _ETx = \"ExpressionType\";\nconst _En = \"Encryption\";\nconst _Ena = \"Enabled\";\nconst _End = \"End\";\nconst _Er = \"Errors\";\nconst _Err = \"Error\";\nconst _Ev = \"Events\";\nconst _Eve = \"Event\";\nconst _Ex = \"Expires\";\nconst _Exp = \"Expression\";\nconst _F = \"Filter\";\nconst _FD = \"FieldDelimiter\";\nconst _FHI = \"FileHeaderInfo\";\nconst _FO = \"FetchOwner\";\nconst _FR = \"FilterRule\";\nconst _FRL = \"FilterRuleList\";\nconst _FRi = \"FilterRules\";\nconst _Fi = \"Field\";\nconst _Fo = \"Format\";\nconst _Fr = \"Frequency\";\nconst _G = \"Grants\";\nconst _GBA = \"GetBucketAbac\";\nconst _GBAC = \"GetBucketAccelerateConfiguration\";\nconst _GBACO = \"GetBucketAccelerateConfigurationOutput\";\nconst _GBACOe = \"GetBucketAnalyticsConfigurationOutput\";\nconst _GBACR = \"GetBucketAccelerateConfigurationRequest\";\nconst _GBACRe = \"GetBucketAnalyticsConfigurationRequest\";\nconst _GBACe = \"GetBucketAnalyticsConfiguration\";\nconst _GBAO = \"GetBucketAbacOutput\";\nconst _GBAOe = \"GetBucketAclOutput\";\nconst _GBAR = \"GetBucketAbacRequest\";\nconst _GBARe = \"GetBucketAclRequest\";\nconst _GBAe = \"GetBucketAcl\";\nconst _GBC = \"GetBucketCors\";\nconst _GBCO = \"GetBucketCorsOutput\";\nconst _GBCR = \"GetBucketCorsRequest\";\nconst _GBE = \"GetBucketEncryption\";\nconst _GBEO = \"GetBucketEncryptionOutput\";\nconst _GBER = \"GetBucketEncryptionRequest\";\nconst _GBIC = \"GetBucketInventoryConfiguration\";\nconst _GBICO = \"GetBucketInventoryConfigurationOutput\";\nconst _GBICR = \"GetBucketInventoryConfigurationRequest\";\nconst _GBITC = \"GetBucketIntelligentTieringConfiguration\";\nconst _GBITCO = \"GetBucketIntelligentTieringConfigurationOutput\";\nconst _GBITCR = \"GetBucketIntelligentTieringConfigurationRequest\";\nconst _GBL = \"GetBucketLocation\";\nconst _GBLC = \"GetBucketLifecycleConfiguration\";\nconst _GBLCO = \"GetBucketLifecycleConfigurationOutput\";\nconst _GBLCR = \"GetBucketLifecycleConfigurationRequest\";\nconst _GBLO = \"GetBucketLocationOutput\";\nconst _GBLOe = \"GetBucketLoggingOutput\";\nconst _GBLR = \"GetBucketLocationRequest\";\nconst _GBLRe = \"GetBucketLoggingRequest\";\nconst _GBLe = \"GetBucketLogging\";\nconst _GBMC = \"GetBucketMetadataConfiguration\";\nconst _GBMCO = \"GetBucketMetadataConfigurationOutput\";\nconst _GBMCOe = \"GetBucketMetricsConfigurationOutput\";\nconst _GBMCR = \"GetBucketMetadataConfigurationResult\";\nconst _GBMCRe = \"GetBucketMetadataConfigurationRequest\";\nconst _GBMCRet = \"GetBucketMetricsConfigurationRequest\";\nconst _GBMCe = \"GetBucketMetricsConfiguration\";\nconst _GBMTC = \"GetBucketMetadataTableConfiguration\";\nconst _GBMTCO = \"GetBucketMetadataTableConfigurationOutput\";\nconst _GBMTCR = \"GetBucketMetadataTableConfigurationResult\";\nconst _GBMTCRe = \"GetBucketMetadataTableConfigurationRequest\";\nconst _GBNC = \"GetBucketNotificationConfiguration\";\nconst _GBNCR = \"GetBucketNotificationConfigurationRequest\";\nconst _GBOC = \"GetBucketOwnershipControls\";\nconst _GBOCO = \"GetBucketOwnershipControlsOutput\";\nconst _GBOCR = \"GetBucketOwnershipControlsRequest\";\nconst _GBP = \"GetBucketPolicy\";\nconst _GBPO = \"GetBucketPolicyOutput\";\nconst _GBPR = \"GetBucketPolicyRequest\";\nconst _GBPS = \"GetBucketPolicyStatus\";\nconst _GBPSO = \"GetBucketPolicyStatusOutput\";\nconst _GBPSR = \"GetBucketPolicyStatusRequest\";\nconst _GBR = \"GetBucketReplication\";\nconst _GBRO = \"GetBucketReplicationOutput\";\nconst _GBRP = \"GetBucketRequestPayment\";\nconst _GBRPO = \"GetBucketRequestPaymentOutput\";\nconst _GBRPR = \"GetBucketRequestPaymentRequest\";\nconst _GBRR = \"GetBucketReplicationRequest\";\nconst _GBT = \"GetBucketTagging\";\nconst _GBTO = \"GetBucketTaggingOutput\";\nconst _GBTR = \"GetBucketTaggingRequest\";\nconst _GBV = \"GetBucketVersioning\";\nconst _GBVO = \"GetBucketVersioningOutput\";\nconst _GBVR = \"GetBucketVersioningRequest\";\nconst _GBW = \"GetBucketWebsite\";\nconst _GBWO = \"GetBucketWebsiteOutput\";\nconst _GBWR = \"GetBucketWebsiteRequest\";\nconst _GFC = \"GrantFullControl\";\nconst _GJP = \"GlacierJobParameters\";\nconst _GO = \"GetObject\";\nconst _GOA = \"GetObjectAcl\";\nconst _GOAO = \"GetObjectAclOutput\";\nconst _GOAOe = \"GetObjectAttributesOutput\";\nconst _GOAP = \"GetObjectAttributesParts\";\nconst _GOAR = \"GetObjectAclRequest\";\nconst _GOARe = \"GetObjectAttributesResponse\";\nconst _GOARet = \"GetObjectAttributesRequest\";\nconst _GOAe = \"GetObjectAttributes\";\nconst _GOLC = \"GetObjectLockConfiguration\";\nconst _GOLCO = \"GetObjectLockConfigurationOutput\";\nconst _GOLCR = \"GetObjectLockConfigurationRequest\";\nconst _GOLH = \"GetObjectLegalHold\";\nconst _GOLHO = \"GetObjectLegalHoldOutput\";\nconst _GOLHR = \"GetObjectLegalHoldRequest\";\nconst _GOO = \"GetObjectOutput\";\nconst _GOR = \"GetObjectRequest\";\nconst _GORO = \"GetObjectRetentionOutput\";\nconst _GORR = \"GetObjectRetentionRequest\";\nconst _GORe = \"GetObjectRetention\";\nconst _GOT = \"GetObjectTagging\";\nconst _GOTO = \"GetObjectTaggingOutput\";\nconst _GOTOe = \"GetObjectTorrentOutput\";\nconst _GOTR = \"GetObjectTaggingRequest\";\nconst _GOTRe = \"GetObjectTorrentRequest\";\nconst _GOTe = \"GetObjectTorrent\";\nconst _GPAB = \"GetPublicAccessBlock\";\nconst _GPABO = \"GetPublicAccessBlockOutput\";\nconst _GPABR = \"GetPublicAccessBlockRequest\";\nconst _GR = \"GrantRead\";\nconst _GRACP = \"GrantReadACP\";\nconst _GW = \"GrantWrite\";\nconst _GWACP = \"GrantWriteACP\";\nconst _Gr = \"Grant\";\nconst _Gra = \"Grantee\";\nconst _HB = \"HeadBucket\";\nconst _HBO = \"HeadBucketOutput\";\nconst _HBR = \"HeadBucketRequest\";\nconst _HECRE = \"HttpErrorCodeReturnedEquals\";\nconst _HN = \"HostName\";\nconst _HO = \"HeadObject\";\nconst _HOO = \"HeadObjectOutput\";\nconst _HOR = \"HeadObjectRequest\";\nconst _HRC = \"HttpRedirectCode\";\nconst _I = \"Id\";\nconst _IC = \"InventoryConfiguration\";\nconst _ICL = \"InventoryConfigurationList\";\nconst _ID = \"ID\";\nconst _IDn = \"IndexDocument\";\nconst _IDnv = \"InventoryDestination\";\nconst _IE = \"IsEnabled\";\nconst _IEn = \"InventoryEncryption\";\nconst _IF = \"InventoryFilter\";\nconst _IL = \"IsLatest\";\nconst _IM = \"IfMatch\";\nconst _IMIT = \"IfMatchInitiatedTime\";\nconst _IMLMT = \"IfMatchLastModifiedTime\";\nconst _IMS = \"IfMatchSize\";\nconst _IMS_ = \"If-Modified-Since\";\nconst _IMSf = \"IfModifiedSince\";\nconst _IMUR = \"InitiateMultipartUploadResult\";\nconst _IM_ = \"If-Match\";\nconst _INM = \"IfNoneMatch\";\nconst _INM_ = \"If-None-Match\";\nconst _IOF = \"InventoryOptionalFields\";\nconst _IOS = \"InvalidObjectState\";\nconst _IOV = \"IncludedObjectVersions\";\nconst _IP = \"IsPublic\";\nconst _IPA = \"IgnorePublicAcls\";\nconst _IPM = \"IdempotencyParameterMismatch\";\nconst _IR = \"InvalidRequest\";\nconst _IRIP = \"IsRestoreInProgress\";\nconst _IS = \"InputSerialization\";\nconst _ISBD = \"InventoryS3BucketDestination\";\nconst _ISn = \"InventorySchedule\";\nconst _IT = \"IsTruncated\";\nconst _ITAO = \"IntelligentTieringAndOperator\";\nconst _ITC = \"IntelligentTieringConfiguration\";\nconst _ITCL = \"IntelligentTieringConfigurationList\";\nconst _ITCR = \"InventoryTableConfigurationResult\";\nconst _ITCU = \"InventoryTableConfigurationUpdates\";\nconst _ITCn = \"InventoryTableConfiguration\";\nconst _ITF = \"IntelligentTieringFilter\";\nconst _IUS = \"IfUnmodifiedSince\";\nconst _IUS_ = \"If-Unmodified-Since\";\nconst _IWO = \"InvalidWriteOffset\";\nconst _In = \"Initiator\";\nconst _Ini = \"Initiated\";\nconst _JSON = \"JSON\";\nconst _JSONI = \"JSONInput\";\nconst _JSONO = \"JSONOutput\";\nconst _JTC = \"JournalTableConfiguration\";\nconst _JTCR = \"JournalTableConfigurationResult\";\nconst _JTCU = \"JournalTableConfigurationUpdates\";\nconst _K = \"Key\";\nconst _KC = \"KeyCount\";\nconst _KI = \"KeyId\";\nconst _KKA = \"KmsKeyArn\";\nconst _KM = \"KeyMarker\";\nconst _KMSC = \"KMSContext\";\nconst _KMSKA = \"KMSKeyArn\";\nconst _KMSKI = \"KMSKeyId\";\nconst _KMSMKID = \"KMSMasterKeyID\";\nconst _KPE = \"KeyPrefixEquals\";\nconst _L = \"Location\";\nconst _LAMBR = \"ListAllMyBucketsResult\";\nconst _LAMDBR = \"ListAllMyDirectoryBucketsResult\";\nconst _LB = \"ListBuckets\";\nconst _LBAC = \"ListBucketAnalyticsConfigurations\";\nconst _LBACO = \"ListBucketAnalyticsConfigurationsOutput\";\nconst _LBACR = \"ListBucketAnalyticsConfigurationResult\";\nconst _LBACRi = \"ListBucketAnalyticsConfigurationsRequest\";\nconst _LBIC = \"ListBucketInventoryConfigurations\";\nconst _LBICO = \"ListBucketInventoryConfigurationsOutput\";\nconst _LBICR = \"ListBucketInventoryConfigurationsRequest\";\nconst _LBITC = \"ListBucketIntelligentTieringConfigurations\";\nconst _LBITCO = \"ListBucketIntelligentTieringConfigurationsOutput\";\nconst _LBITCR = \"ListBucketIntelligentTieringConfigurationsRequest\";\nconst _LBMC = \"ListBucketMetricsConfigurations\";\nconst _LBMCO = \"ListBucketMetricsConfigurationsOutput\";\nconst _LBMCR = \"ListBucketMetricsConfigurationsRequest\";\nconst _LBO = \"ListBucketsOutput\";\nconst _LBR = \"ListBucketsRequest\";\nconst _LBRi = \"ListBucketResult\";\nconst _LC = \"LocationConstraint\";\nconst _LCi = \"LifecycleConfiguration\";\nconst _LDB = \"ListDirectoryBuckets\";\nconst _LDBO = \"ListDirectoryBucketsOutput\";\nconst _LDBR = \"ListDirectoryBucketsRequest\";\nconst _LE = \"LoggingEnabled\";\nconst _LEi = \"LifecycleExpiration\";\nconst _LFA = \"LambdaFunctionArn\";\nconst _LFC = \"LambdaFunctionConfiguration\";\nconst _LFCL = \"LambdaFunctionConfigurationList\";\nconst _LFCa = \"LambdaFunctionConfigurations\";\nconst _LH = \"LegalHold\";\nconst _LI = \"LocationInfo\";\nconst _LICR = \"ListInventoryConfigurationsResult\";\nconst _LM = \"LastModified\";\nconst _LMCR = \"ListMetricsConfigurationsResult\";\nconst _LMT = \"LastModifiedTime\";\nconst _LMU = \"ListMultipartUploads\";\nconst _LMUO = \"ListMultipartUploadsOutput\";\nconst _LMUR = \"ListMultipartUploadsResult\";\nconst _LMURi = \"ListMultipartUploadsRequest\";\nconst _LM_ = \"Last-Modified\";\nconst _LO = \"ListObjects\";\nconst _LOO = \"ListObjectsOutput\";\nconst _LOR = \"ListObjectsRequest\";\nconst _LOV = \"ListObjectsV2\";\nconst _LOVO = \"ListObjectsV2Output\";\nconst _LOVOi = \"ListObjectVersionsOutput\";\nconst _LOVR = \"ListObjectsV2Request\";\nconst _LOVRi = \"ListObjectVersionsRequest\";\nconst _LOVi = \"ListObjectVersions\";\nconst _LP = \"ListParts\";\nconst _LPO = \"ListPartsOutput\";\nconst _LPR = \"ListPartsResult\";\nconst _LPRi = \"ListPartsRequest\";\nconst _LR = \"LifecycleRule\";\nconst _LRAO = \"LifecycleRuleAndOperator\";\nconst _LRF = \"LifecycleRuleFilter\";\nconst _LRi = \"LifecycleRules\";\nconst _LVR = \"ListVersionsResult\";\nconst _M = \"Metadata\";\nconst _MAO = \"MetricsAndOperator\";\nconst _MAS = \"MaxAgeSeconds\";\nconst _MB = \"MaxBuckets\";\nconst _MC = \"MetadataConfiguration\";\nconst _MCL = \"MetricsConfigurationList\";\nconst _MCR = \"MetadataConfigurationResult\";\nconst _MCe = \"MetricsConfiguration\";\nconst _MD = \"MetadataDirective\";\nconst _MDB = \"MaxDirectoryBuckets\";\nconst _MDf = \"MfaDelete\";\nconst _ME = \"MetadataEntry\";\nconst _MF = \"MetricsFilter\";\nconst _MFA = \"MFA\";\nconst _MFAD = \"MFADelete\";\nconst _MK = \"MaxKeys\";\nconst _MM = \"MissingMeta\";\nconst _MOS = \"MpuObjectSize\";\nconst _MP = \"MaxParts\";\nconst _MTC = \"MetadataTableConfiguration\";\nconst _MTCR = \"MetadataTableConfigurationResult\";\nconst _MTEC = \"MetadataTableEncryptionConfiguration\";\nconst _MU = \"MultipartUpload\";\nconst _MUL = \"MultipartUploadList\";\nconst _MUa = \"MaxUploads\";\nconst _Ma = \"Marker\";\nconst _Me = \"Metrics\";\nconst _Mes = \"Message\";\nconst _Mi = \"Minutes\";\nconst _Mo = \"Mode\";\nconst _N = \"Name\";\nconst _NC = \"NotificationConfiguration\";\nconst _NCF = \"NotificationConfigurationFilter\";\nconst _NCT = \"NextContinuationToken\";\nconst _ND = \"NoncurrentDays\";\nconst _NEKKAS = \"NonEmptyKmsKeyArnString\";\nconst _NF = \"NotFound\";\nconst _NKM = \"NextKeyMarker\";\nconst _NM = \"NextMarker\";\nconst _NNV = \"NewerNoncurrentVersions\";\nconst _NPNM = \"NextPartNumberMarker\";\nconst _NSB = \"NoSuchBucket\";\nconst _NSK = \"NoSuchKey\";\nconst _NSU = \"NoSuchUpload\";\nconst _NUIM = \"NextUploadIdMarker\";\nconst _NVE = \"NoncurrentVersionExpiration\";\nconst _NVIM = \"NextVersionIdMarker\";\nconst _NVT = \"NoncurrentVersionTransitions\";\nconst _NVTL = \"NoncurrentVersionTransitionList\";\nconst _NVTo = \"NoncurrentVersionTransition\";\nconst _O = \"Owner\";\nconst _OA = \"ObjectAttributes\";\nconst _OAIATE = \"ObjectAlreadyInActiveTierError\";\nconst _OC = \"OwnershipControls\";\nconst _OCR = \"OwnershipControlsRule\";\nconst _OCRw = \"OwnershipControlsRules\";\nconst _OE = \"ObjectEncryption\";\nconst _OF = \"OptionalFields\";\nconst _OI = \"ObjectIdentifier\";\nconst _OIL = \"ObjectIdentifierList\";\nconst _OL = \"OutputLocation\";\nconst _OLC = \"ObjectLockConfiguration\";\nconst _OLE = \"ObjectLockEnabled\";\nconst _OLEFB = \"ObjectLockEnabledForBucket\";\nconst _OLLH = \"ObjectLockLegalHold\";\nconst _OLLHS = \"ObjectLockLegalHoldStatus\";\nconst _OLM = \"ObjectLockMode\";\nconst _OLR = \"ObjectLockRetention\";\nconst _OLRUD = \"ObjectLockRetainUntilDate\";\nconst _OLRb = \"ObjectLockRule\";\nconst _OLb = \"ObjectList\";\nconst _ONIATE = \"ObjectNotInActiveTierError\";\nconst _OO = \"ObjectOwnership\";\nconst _OOA = \"OptionalObjectAttributes\";\nconst _OP = \"ObjectParts\";\nconst _OPb = \"ObjectPart\";\nconst _OS = \"ObjectSize\";\nconst _OSGT = \"ObjectSizeGreaterThan\";\nconst _OSLT = \"ObjectSizeLessThan\";\nconst _OSV = \"OutputSchemaVersion\";\nconst _OSu = \"OutputSerialization\";\nconst _OV = \"ObjectVersion\";\nconst _OVL = \"ObjectVersionList\";\nconst _Ob = \"Objects\";\nconst _Obj = \"Object\";\nconst _P = \"Prefix\";\nconst _PABC = \"PublicAccessBlockConfiguration\";\nconst _PBA = \"PutBucketAbac\";\nconst _PBAC = \"PutBucketAccelerateConfiguration\";\nconst _PBACR = \"PutBucketAccelerateConfigurationRequest\";\nconst _PBACRu = \"PutBucketAnalyticsConfigurationRequest\";\nconst _PBACu = \"PutBucketAnalyticsConfiguration\";\nconst _PBAR = \"PutBucketAbacRequest\";\nconst _PBARu = \"PutBucketAclRequest\";\nconst _PBAu = \"PutBucketAcl\";\nconst _PBC = \"PutBucketCors\";\nconst _PBCR = \"PutBucketCorsRequest\";\nconst _PBE = \"PutBucketEncryption\";\nconst _PBER = \"PutBucketEncryptionRequest\";\nconst _PBIC = \"PutBucketInventoryConfiguration\";\nconst _PBICR = \"PutBucketInventoryConfigurationRequest\";\nconst _PBITC = \"PutBucketIntelligentTieringConfiguration\";\nconst _PBITCR = \"PutBucketIntelligentTieringConfigurationRequest\";\nconst _PBL = \"PutBucketLogging\";\nconst _PBLC = \"PutBucketLifecycleConfiguration\";\nconst _PBLCO = \"PutBucketLifecycleConfigurationOutput\";\nconst _PBLCR = \"PutBucketLifecycleConfigurationRequest\";\nconst _PBLR = \"PutBucketLoggingRequest\";\nconst _PBMC = \"PutBucketMetricsConfiguration\";\nconst _PBMCR = \"PutBucketMetricsConfigurationRequest\";\nconst _PBNC = \"PutBucketNotificationConfiguration\";\nconst _PBNCR = \"PutBucketNotificationConfigurationRequest\";\nconst _PBOC = \"PutBucketOwnershipControls\";\nconst _PBOCR = \"PutBucketOwnershipControlsRequest\";\nconst _PBP = \"PutBucketPolicy\";\nconst _PBPR = \"PutBucketPolicyRequest\";\nconst _PBR = \"PutBucketReplication\";\nconst _PBRP = \"PutBucketRequestPayment\";\nconst _PBRPR = \"PutBucketRequestPaymentRequest\";\nconst _PBRR = \"PutBucketReplicationRequest\";\nconst _PBT = \"PutBucketTagging\";\nconst _PBTR = \"PutBucketTaggingRequest\";\nconst _PBV = \"PutBucketVersioning\";\nconst _PBVR = \"PutBucketVersioningRequest\";\nconst _PBW = \"PutBucketWebsite\";\nconst _PBWR = \"PutBucketWebsiteRequest\";\nconst _PC = \"PartsCount\";\nconst _PDS = \"PartitionDateSource\";\nconst _PE = \"ProgressEvent\";\nconst _PI = \"ParquetInput\";\nconst _PL = \"PartsList\";\nconst _PN = \"PartNumber\";\nconst _PNM = \"PartNumberMarker\";\nconst _PO = \"PutObject\";\nconst _POA = \"PutObjectAcl\";\nconst _POAO = \"PutObjectAclOutput\";\nconst _POAR = \"PutObjectAclRequest\";\nconst _POLC = \"PutObjectLockConfiguration\";\nconst _POLCO = \"PutObjectLockConfigurationOutput\";\nconst _POLCR = \"PutObjectLockConfigurationRequest\";\nconst _POLH = \"PutObjectLegalHold\";\nconst _POLHO = \"PutObjectLegalHoldOutput\";\nconst _POLHR = \"PutObjectLegalHoldRequest\";\nconst _POO = \"PutObjectOutput\";\nconst _POR = \"PutObjectRequest\";\nconst _PORO = \"PutObjectRetentionOutput\";\nconst _PORR = \"PutObjectRetentionRequest\";\nconst _PORu = \"PutObjectRetention\";\nconst _POT = \"PutObjectTagging\";\nconst _POTO = \"PutObjectTaggingOutput\";\nconst _POTR = \"PutObjectTaggingRequest\";\nconst _PP = \"PartitionedPrefix\";\nconst _PPAB = \"PutPublicAccessBlock\";\nconst _PPABR = \"PutPublicAccessBlockRequest\";\nconst _PS = \"PolicyStatus\";\nconst _Pa = \"Parts\";\nconst _Par = \"Part\";\nconst _Parq = \"Parquet\";\nconst _Pay = \"Payer\";\nconst _Payl = \"Payload\";\nconst _Pe = \"Permission\";\nconst _Po = \"Policy\";\nconst _Pr = \"Progress\";\nconst _Pri = \"Priority\";\nconst _Pro = \"Protocol\";\nconst _Q = \"Quiet\";\nconst _QA = \"QueueArn\";\nconst _QC = \"QuoteCharacter\";\nconst _QCL = \"QueueConfigurationList\";\nconst _QCu = \"QueueConfigurations\";\nconst _QCue = \"QueueConfiguration\";\nconst _QEC = \"QuoteEscapeCharacter\";\nconst _QF = \"QuoteFields\";\nconst _Qu = \"Queue\";\nconst _R = \"Rules\";\nconst _RART = \"RedirectAllRequestsTo\";\nconst _RC = \"RequestCharged\";\nconst _RCC = \"ResponseCacheControl\";\nconst _RCD = \"ResponseContentDisposition\";\nconst _RCE = \"ResponseContentEncoding\";\nconst _RCL = \"ResponseContentLanguage\";\nconst _RCT = \"ResponseContentType\";\nconst _RCe = \"ReplicationConfiguration\";\nconst _RD = \"RecordDelimiter\";\nconst _RE = \"ResponseExpires\";\nconst _RED = \"RestoreExpiryDate\";\nconst _REe = \"RecordExpiration\";\nconst _REec = \"RecordsEvent\";\nconst _RKKID = \"ReplicaKmsKeyID\";\nconst _RKPW = \"ReplaceKeyPrefixWith\";\nconst _RKW = \"ReplaceKeyWith\";\nconst _RM = \"ReplicaModifications\";\nconst _RO = \"RenameObject\";\nconst _ROO = \"RenameObjectOutput\";\nconst _ROOe = \"RestoreObjectOutput\";\nconst _ROP = \"RestoreOutputPath\";\nconst _ROR = \"RenameObjectRequest\";\nconst _RORe = \"RestoreObjectRequest\";\nconst _ROe = \"RestoreObject\";\nconst _RP = \"RequestPayer\";\nconst _RPB = \"RestrictPublicBuckets\";\nconst _RPC = \"RequestPaymentConfiguration\";\nconst _RPe = \"RequestProgress\";\nconst _RR = \"RoutingRules\";\nconst _RRAO = \"ReplicationRuleAndOperator\";\nconst _RRF = \"ReplicationRuleFilter\";\nconst _RRe = \"ReplicationRule\";\nconst _RRep = \"ReplicationRules\";\nconst _RReq = \"RequestRoute\";\nconst _RRes = \"RestoreRequest\";\nconst _RRo = \"RoutingRule\";\nconst _RS = \"ReplicationStatus\";\nconst _RSe = \"RestoreStatus\";\nconst _RSen = \"RenameSource\";\nconst _RT = \"ReplicationTime\";\nconst _RTV = \"ReplicationTimeValue\";\nconst _RTe = \"RequestToken\";\nconst _RUD = \"RetainUntilDate\";\nconst _Ra = \"Range\";\nconst _Re = \"Restore\";\nconst _Rec = \"Records\";\nconst _Red = \"Redirect\";\nconst _Ret = \"Retention\";\nconst _Ro = \"Role\";\nconst _Ru = \"Rule\";\nconst _S = \"Status\";\nconst _SA = \"StartAfter\";\nconst _SAK = \"SecretAccessKey\";\nconst _SAs = \"SseAlgorithm\";\nconst _SB = \"StreamingBlob\";\nconst _SBD = \"S3BucketDestination\";\nconst _SC = \"StorageClass\";\nconst _SCA = \"StorageClassAnalysis\";\nconst _SCADE = \"StorageClassAnalysisDataExport\";\nconst _SCV = \"SessionCredentialValue\";\nconst _SCe = \"SessionCredentials\";\nconst _SCt = \"StatusCode\";\nconst _SDV = \"SkipDestinationValidation\";\nconst _SE = \"StatsEvent\";\nconst _SIM = \"SourceIfMatch\";\nconst _SIMS = \"SourceIfModifiedSince\";\nconst _SINM = \"SourceIfNoneMatch\";\nconst _SIUS = \"SourceIfUnmodifiedSince\";\nconst _SK = \"SSE-KMS\";\nconst _SKEO = \"SseKmsEncryptedObjects\";\nconst _SKF = \"S3KeyFilter\";\nconst _SKe = \"S3Key\";\nconst _SL = \"S3Location\";\nconst _SM = \"SessionMode\";\nconst _SOC = \"SelectObjectContent\";\nconst _SOCES = \"SelectObjectContentEventStream\";\nconst _SOCO = \"SelectObjectContentOutput\";\nconst _SOCR = \"SelectObjectContentRequest\";\nconst _SP = \"SelectParameters\";\nconst _SPi = \"SimplePrefix\";\nconst _SR = \"ScanRange\";\nconst _SS = \"SSE-S3\";\nconst _SSC = \"SourceSelectionCriteria\";\nconst _SSE = \"ServerSideEncryption\";\nconst _SSEA = \"SSEAlgorithm\";\nconst _SSEBD = \"ServerSideEncryptionByDefault\";\nconst _SSEC = \"ServerSideEncryptionConfiguration\";\nconst _SSECA = \"SSECustomerAlgorithm\";\nconst _SSECK = \"SSECustomerKey\";\nconst _SSECKMD = \"SSECustomerKeyMD5\";\nconst _SSEKMS = \"SSEKMS\";\nconst _SSEKMSE = \"SSEKMSEncryption\";\nconst _SSEKMSEC = \"SSEKMSEncryptionContext\";\nconst _SSEKMSKI = \"SSEKMSKeyId\";\nconst _SSER = \"ServerSideEncryptionRule\";\nconst _SSERe = \"ServerSideEncryptionRules\";\nconst _SSES = \"SSES3\";\nconst _ST = \"SessionToken\";\nconst _STD = \"S3TablesDestination\";\nconst _STDR = \"S3TablesDestinationResult\";\nconst _S_ = \"S3\";\nconst _Sc = \"Schedule\";\nconst _Si = \"Size\";\nconst _St = \"Start\";\nconst _Sta = \"Stats\";\nconst _Su = \"Suffix\";\nconst _T = \"Tags\";\nconst _TA = \"TableArn\";\nconst _TAo = \"TopicArn\";\nconst _TB = \"TargetBucket\";\nconst _TBA = \"TableBucketArn\";\nconst _TBT = \"TableBucketType\";\nconst _TC = \"TagCount\";\nconst _TCL = \"TopicConfigurationList\";\nconst _TCo = \"TopicConfigurations\";\nconst _TCop = \"TopicConfiguration\";\nconst _TD = \"TaggingDirective\";\nconst _TDMOS = \"TransitionDefaultMinimumObjectSize\";\nconst _TG = \"TargetGrants\";\nconst _TGa = \"TargetGrant\";\nconst _TL = \"TieringList\";\nconst _TLr = \"TransitionList\";\nconst _TMP = \"TooManyParts\";\nconst _TN = \"TableNamespace\";\nconst _TNa = \"TableName\";\nconst _TOKF = \"TargetObjectKeyFormat\";\nconst _TP = \"TargetPrefix\";\nconst _TPC = \"TotalPartsCount\";\nconst _TS = \"TagSet\";\nconst _TSa = \"TableStatus\";\nconst _Ta = \"Tag\";\nconst _Tag = \"Tagging\";\nconst _Ti = \"Tier\";\nconst _Tie = \"Tierings\";\nconst _Tier = \"Tiering\";\nconst _Tim = \"Time\";\nconst _To = \"Token\";\nconst _Top = \"Topic\";\nconst _Tr = \"Transitions\";\nconst _Tra = \"Transition\";\nconst _Ty = \"Type\";\nconst _U = \"Uploads\";\nconst _UBMITC = \"UpdateBucketMetadataInventoryTableConfiguration\";\nconst _UBMITCR = \"UpdateBucketMetadataInventoryTableConfigurationRequest\";\nconst _UBMJTC = \"UpdateBucketMetadataJournalTableConfiguration\";\nconst _UBMJTCR = \"UpdateBucketMetadataJournalTableConfigurationRequest\";\nconst _UI = \"UploadId\";\nconst _UIM = \"UploadIdMarker\";\nconst _UM = \"UserMetadata\";\nconst _UOE = \"UpdateObjectEncryption\";\nconst _UOER = \"UpdateObjectEncryptionRequest\";\nconst _UOERp = \"UpdateObjectEncryptionResponse\";\nconst _UP = \"UploadPart\";\nconst _UPC = \"UploadPartCopy\";\nconst _UPCO = \"UploadPartCopyOutput\";\nconst _UPCR = \"UploadPartCopyRequest\";\nconst _UPO = \"UploadPartOutput\";\nconst _UPR = \"UploadPartRequest\";\nconst _URI = \"URI\";\nconst _Up = \"Upload\";\nconst _V = \"Value\";\nconst _VC = \"VersioningConfiguration\";\nconst _VI = \"VersionId\";\nconst _VIM = \"VersionIdMarker\";\nconst _Ve = \"Versions\";\nconst _Ver = \"Version\";\nconst _WC = \"WebsiteConfiguration\";\nconst _WGOR = \"WriteGetObjectResponse\";\nconst _WGORR = \"WriteGetObjectResponseRequest\";\nconst _WOB = \"WriteOffsetBytes\";\nconst _WRL = \"WebsiteRedirectLocation\";\nconst _Y = \"Years\";\nconst _ar = \"accept-ranges\";\nconst _br = \"bucket-region\";\nconst _c = \"client\";\nconst _ct = \"continuation-token\";\nconst _d = \"delimiter\";\nconst _e = \"error\";\nconst _eP = \"eventPayload\";\nconst _en = \"endpoint\";\nconst _et = \"encoding-type\";\nconst _fo = \"fetch-owner\";\nconst _h = \"http\";\nconst _hC = \"httpChecksum\";\nconst _hE = \"httpError\";\nconst _hH = \"httpHeader\";\nconst _hL = \"hostLabel\";\nconst _hP = \"httpPayload\";\nconst _hPH = \"httpPrefixHeaders\";\nconst _hQ = \"httpQuery\";\nconst _hi = \"http://www.w3.org/2001/XMLSchema-instance\";\nconst _i = \"id\";\nconst _iT = \"idempotencyToken\";\nconst _km = \"key-marker\";\nconst _m = \"marker\";\nconst _mb = \"max-buckets\";\nconst _mdb = \"max-directory-buckets\";\nconst _mk = \"max-keys\";\nconst _mp = \"max-parts\";\nconst _mu = \"max-uploads\";\nconst _p = \"prefix\";\nconst _pN = \"partNumber\";\nconst _pnm = \"part-number-marker\";\nconst _rcc = \"response-cache-control\";\nconst _rcd = \"response-content-disposition\";\nconst _rce = \"response-content-encoding\";\nconst _rcl = \"response-content-language\";\nconst _rct = \"response-content-type\";\nconst _re = \"response-expires\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.s3\";\nconst _sa = \"start-after\";\nconst _st = \"streaming\";\nconst _uI = \"uploadId\";\nconst _uim = \"upload-id-marker\";\nconst _vI = \"versionId\";\nconst _vim = \"version-id-marker\";\nconst _x = \"xsi\";\nconst _xA = \"xmlAttribute\";\nconst _xF = \"xmlFlattened\";\nconst _xN = \"xmlName\";\nconst _xNm = \"xmlNamespace\";\nconst _xaa = \"x-amz-acl\";\nconst _xaad = \"x-amz-abort-date\";\nconst _xaapa = \"x-amz-access-point-alias\";\nconst _xaari = \"x-amz-abort-rule-id\";\nconst _xaas = \"x-amz-archive-status\";\nconst _xaba = \"x-amz-bucket-arn\";\nconst _xabgr = \"x-amz-bypass-governance-retention\";\nconst _xabln = \"x-amz-bucket-location-name\";\nconst _xablt = \"x-amz-bucket-location-type\";\nconst _xabn = \"x-amz-bucket-namespace\";\nconst _xabole = \"x-amz-bucket-object-lock-enabled\";\nconst _xabolt = \"x-amz-bucket-object-lock-token\";\nconst _xabr = \"x-amz-bucket-region\";\nconst _xaca = \"x-amz-checksum-algorithm\";\nconst _xacc = \"x-amz-checksum-crc32\";\nconst _xacc_ = \"x-amz-checksum-crc32c\";\nconst _xacc__ = \"x-amz-checksum-crc64nvme\";\nconst _xacm = \"x-amz-checksum-mode\";\nconst _xacrsba = \"x-amz-confirm-remove-self-bucket-access\";\nconst _xacs = \"x-amz-checksum-sha1\";\nconst _xacs_ = \"x-amz-checksum-sha256\";\nconst _xacs__ = \"x-amz-copy-source\";\nconst _xacsim = \"x-amz-copy-source-if-match\";\nconst _xacsims = \"x-amz-copy-source-if-modified-since\";\nconst _xacsinm = \"x-amz-copy-source-if-none-match\";\nconst _xacsius = \"x-amz-copy-source-if-unmodified-since\";\nconst _xacsm = \"x-amz-create-session-mode\";\nconst _xacsr = \"x-amz-copy-source-range\";\nconst _xacssseca = \"x-amz-copy-source-server-side-encryption-customer-algorithm\";\nconst _xacssseck = \"x-amz-copy-source-server-side-encryption-customer-key\";\nconst _xacssseckM = \"x-amz-copy-source-server-side-encryption-customer-key-MD5\";\nconst _xacsvi = \"x-amz-copy-source-version-id\";\nconst _xact = \"x-amz-checksum-type\";\nconst _xact_ = \"x-amz-client-token\";\nconst _xadm = \"x-amz-delete-marker\";\nconst _xae = \"x-amz-expiration\";\nconst _xaebo = \"x-amz-expected-bucket-owner\";\nconst _xafec = \"x-amz-fwd-error-code\";\nconst _xafem = \"x-amz-fwd-error-message\";\nconst _xafhCC = \"x-amz-fwd-header-Cache-Control\";\nconst _xafhCD = \"x-amz-fwd-header-Content-Disposition\";\nconst _xafhCE = \"x-amz-fwd-header-Content-Encoding\";\nconst _xafhCL = \"x-amz-fwd-header-Content-Language\";\nconst _xafhCR = \"x-amz-fwd-header-Content-Range\";\nconst _xafhCT = \"x-amz-fwd-header-Content-Type\";\nconst _xafhE = \"x-amz-fwd-header-ETag\";\nconst _xafhE_ = \"x-amz-fwd-header-Expires\";\nconst _xafhLM = \"x-amz-fwd-header-Last-Modified\";\nconst _xafhar = \"x-amz-fwd-header-accept-ranges\";\nconst _xafhxacc = \"x-amz-fwd-header-x-amz-checksum-crc32\";\nconst _xafhxacc_ = \"x-amz-fwd-header-x-amz-checksum-crc32c\";\nconst _xafhxacc__ = \"x-amz-fwd-header-x-amz-checksum-crc64nvme\";\nconst _xafhxacs = \"x-amz-fwd-header-x-amz-checksum-sha1\";\nconst _xafhxacs_ = \"x-amz-fwd-header-x-amz-checksum-sha256\";\nconst _xafhxadm = \"x-amz-fwd-header-x-amz-delete-marker\";\nconst _xafhxae = \"x-amz-fwd-header-x-amz-expiration\";\nconst _xafhxamm = \"x-amz-fwd-header-x-amz-missing-meta\";\nconst _xafhxampc = \"x-amz-fwd-header-x-amz-mp-parts-count\";\nconst _xafhxaollh = \"x-amz-fwd-header-x-amz-object-lock-legal-hold\";\nconst _xafhxaolm = \"x-amz-fwd-header-x-amz-object-lock-mode\";\nconst _xafhxaolrud = \"x-amz-fwd-header-x-amz-object-lock-retain-until-date\";\nconst _xafhxar = \"x-amz-fwd-header-x-amz-restore\";\nconst _xafhxarc = \"x-amz-fwd-header-x-amz-request-charged\";\nconst _xafhxars = \"x-amz-fwd-header-x-amz-replication-status\";\nconst _xafhxasc = \"x-amz-fwd-header-x-amz-storage-class\";\nconst _xafhxasse = \"x-amz-fwd-header-x-amz-server-side-encryption\";\nconst _xafhxasseakki = \"x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id\";\nconst _xafhxassebke = \"x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled\";\nconst _xafhxasseca = \"x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm\";\nconst _xafhxasseckM = \"x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5\";\nconst _xafhxatc = \"x-amz-fwd-header-x-amz-tagging-count\";\nconst _xafhxavi = \"x-amz-fwd-header-x-amz-version-id\";\nconst _xafs = \"x-amz-fwd-status\";\nconst _xagfc = \"x-amz-grant-full-control\";\nconst _xagr = \"x-amz-grant-read\";\nconst _xagra = \"x-amz-grant-read-acp\";\nconst _xagw = \"x-amz-grant-write\";\nconst _xagwa = \"x-amz-grant-write-acp\";\nconst _xaimit = \"x-amz-if-match-initiated-time\";\nconst _xaimlmt = \"x-amz-if-match-last-modified-time\";\nconst _xaims = \"x-amz-if-match-size\";\nconst _xam = \"x-amz-meta-\";\nconst _xam_ = \"x-amz-mfa\";\nconst _xamd = \"x-amz-metadata-directive\";\nconst _xamm = \"x-amz-missing-meta\";\nconst _xamos = \"x-amz-mp-object-size\";\nconst _xamp = \"x-amz-max-parts\";\nconst _xampc = \"x-amz-mp-parts-count\";\nconst _xaoa = \"x-amz-object-attributes\";\nconst _xaollh = \"x-amz-object-lock-legal-hold\";\nconst _xaolm = \"x-amz-object-lock-mode\";\nconst _xaolrud = \"x-amz-object-lock-retain-until-date\";\nconst _xaoo = \"x-amz-object-ownership\";\nconst _xaooa = \"x-amz-optional-object-attributes\";\nconst _xaos = \"x-amz-object-size\";\nconst _xapnm = \"x-amz-part-number-marker\";\nconst _xar = \"x-amz-restore\";\nconst _xarc = \"x-amz-request-charged\";\nconst _xarop = \"x-amz-restore-output-path\";\nconst _xarp = \"x-amz-request-payer\";\nconst _xarr = \"x-amz-request-route\";\nconst _xars = \"x-amz-replication-status\";\nconst _xars_ = \"x-amz-rename-source\";\nconst _xarsim = \"x-amz-rename-source-if-match\";\nconst _xarsims = \"x-amz-rename-source-if-modified-since\";\nconst _xarsinm = \"x-amz-rename-source-if-none-match\";\nconst _xarsius = \"x-amz-rename-source-if-unmodified-since\";\nconst _xart = \"x-amz-request-token\";\nconst _xasc = \"x-amz-storage-class\";\nconst _xasca = \"x-amz-sdk-checksum-algorithm\";\nconst _xasdv = \"x-amz-skip-destination-validation\";\nconst _xasebo = \"x-amz-source-expected-bucket-owner\";\nconst _xasse = \"x-amz-server-side-encryption\";\nconst _xasseakki = \"x-amz-server-side-encryption-aws-kms-key-id\";\nconst _xassebke = \"x-amz-server-side-encryption-bucket-key-enabled\";\nconst _xassec = \"x-amz-server-side-encryption-context\";\nconst _xasseca = \"x-amz-server-side-encryption-customer-algorithm\";\nconst _xasseck = \"x-amz-server-side-encryption-customer-key\";\nconst _xasseckM = \"x-amz-server-side-encryption-customer-key-MD5\";\nconst _xat = \"x-amz-tagging\";\nconst _xatc = \"x-amz-tagging-count\";\nconst _xatd = \"x-amz-tagging-directive\";\nconst _xatdmos = \"x-amz-transition-default-minimum-object-size\";\nconst _xavi = \"x-amz-version-id\";\nconst _xawob = \"x-amz-write-offset-bytes\";\nconst _xawrl = \"x-amz-website-redirect-location\";\nconst _xs = \"xsi:type\";\nconst n0 = \"com.amazonaws.s3\";\nimport { TypeRegistry } from \"@smithy/core/schema\";\nimport { AccessDenied, BucketAlreadyExists, BucketAlreadyOwnedByYou, EncryptionTypeMismatch, IdempotencyParameterMismatch, InvalidObjectState, InvalidRequest, InvalidWriteOffset, NoSuchBucket, NoSuchKey, NoSuchUpload, NotFound, ObjectAlreadyInActiveTierError, ObjectNotInActiveTierError, TooManyParts, } from \"../models/errors\";\nimport { S3ServiceException } from \"../models/S3ServiceException\";\nconst _s_registry = TypeRegistry.for(_s);\nexport var S3ServiceException$ = [-3, _s, \"S3ServiceException\", 0, [], []];\n_s_registry.registerError(S3ServiceException$, S3ServiceException);\nconst n0_registry = TypeRegistry.for(n0);\nexport var AccessDenied$ = [-3, n0, _AD,\n { [_e]: _c, [_hE]: 403 },\n [],\n []\n];\nn0_registry.registerError(AccessDenied$, AccessDenied);\nexport var BucketAlreadyExists$ = [-3, n0, _BAE,\n { [_e]: _c, [_hE]: 409 },\n [],\n []\n];\nn0_registry.registerError(BucketAlreadyExists$, BucketAlreadyExists);\nexport var BucketAlreadyOwnedByYou$ = [-3, n0, _BAOBY,\n { [_e]: _c, [_hE]: 409 },\n [],\n []\n];\nn0_registry.registerError(BucketAlreadyOwnedByYou$, BucketAlreadyOwnedByYou);\nexport var EncryptionTypeMismatch$ = [-3, n0, _ETM,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(EncryptionTypeMismatch$, EncryptionTypeMismatch);\nexport var IdempotencyParameterMismatch$ = [-3, n0, _IPM,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(IdempotencyParameterMismatch$, IdempotencyParameterMismatch);\nexport var InvalidObjectState$ = [-3, n0, _IOS,\n { [_e]: _c, [_hE]: 403 },\n [_SC, _AT],\n [0, 0]\n];\nn0_registry.registerError(InvalidObjectState$, InvalidObjectState);\nexport var InvalidRequest$ = [-3, n0, _IR,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(InvalidRequest$, InvalidRequest);\nexport var InvalidWriteOffset$ = [-3, n0, _IWO,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(InvalidWriteOffset$, InvalidWriteOffset);\nexport var NoSuchBucket$ = [-3, n0, _NSB,\n { [_e]: _c, [_hE]: 404 },\n [],\n []\n];\nn0_registry.registerError(NoSuchBucket$, NoSuchBucket);\nexport var NoSuchKey$ = [-3, n0, _NSK,\n { [_e]: _c, [_hE]: 404 },\n [],\n []\n];\nn0_registry.registerError(NoSuchKey$, NoSuchKey);\nexport var NoSuchUpload$ = [-3, n0, _NSU,\n { [_e]: _c, [_hE]: 404 },\n [],\n []\n];\nn0_registry.registerError(NoSuchUpload$, NoSuchUpload);\nexport var NotFound$ = [-3, n0, _NF,\n { [_e]: _c },\n [],\n []\n];\nn0_registry.registerError(NotFound$, NotFound);\nexport var ObjectAlreadyInActiveTierError$ = [-3, n0, _OAIATE,\n { [_e]: _c, [_hE]: 403 },\n [],\n []\n];\nn0_registry.registerError(ObjectAlreadyInActiveTierError$, ObjectAlreadyInActiveTierError);\nexport var ObjectNotInActiveTierError$ = [-3, n0, _ONIATE,\n { [_e]: _c, [_hE]: 403 },\n [],\n []\n];\nn0_registry.registerError(ObjectNotInActiveTierError$, ObjectNotInActiveTierError);\nexport var TooManyParts$ = [-3, n0, _TMP,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(TooManyParts$, TooManyParts);\nexport const errorTypeRegistries = [\n _s_registry,\n n0_registry,\n];\nvar CopySourceSSECustomerKey = [0, n0, _CSSSECK, 8, 0];\nvar NonEmptyKmsKeyArnString = [0, n0, _NEKKAS, 8, 0];\nvar SessionCredentialValue = [0, n0, _SCV, 8, 0];\nvar SSECustomerKey = [0, n0, _SSECK, 8, 0];\nvar SSEKMSEncryptionContext = [0, n0, _SSEKMSEC, 8, 0];\nvar SSEKMSKeyId = [0, n0, _SSEKMSKI, 8, 0];\nvar StreamingBlob = [0, n0, _SB, { [_st]: 1 }, 42];\nexport var AbacStatus$ = [3, n0, _AS,\n 0,\n [_S],\n [0]\n];\nexport var AbortIncompleteMultipartUpload$ = [3, n0, _AIMU,\n 0,\n [_DAI],\n [1]\n];\nexport var AbortMultipartUploadOutput$ = [3, n0, _AMUO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var AbortMultipartUploadRequest$ = [3, n0, _AMUR,\n 0,\n [_B, _K, _UI, _RP, _EBO, _IMIT],\n [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [6, { [_hH]: _xaimit }]], 3\n];\nexport var AccelerateConfiguration$ = [3, n0, _AC,\n 0,\n [_S],\n [0]\n];\nexport var AccessControlPolicy$ = [3, n0, _ACP,\n 0,\n [_G, _O],\n [[() => Grants, { [_xN]: _ACL }], () => Owner$]\n];\nexport var AccessControlTranslation$ = [3, n0, _ACT,\n 0,\n [_O],\n [0], 1\n];\nexport var AnalyticsAndOperator$ = [3, n0, _AAO,\n 0,\n [_P, _T],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]]\n];\nexport var AnalyticsConfiguration$ = [3, n0, _ACn,\n 0,\n [_I, _SCA, _F],\n [0, () => StorageClassAnalysis$, [() => AnalyticsFilter$, 0]], 2\n];\nexport var AnalyticsExportDestination$ = [3, n0, _AED,\n 0,\n [_SBD],\n [() => AnalyticsS3BucketDestination$], 1\n];\nexport var AnalyticsS3BucketDestination$ = [3, n0, _ASBD,\n 0,\n [_Fo, _B, _BAI, _P],\n [0, 0, 0, 0], 2\n];\nexport var BlockedEncryptionTypes$ = [3, n0, _BET,\n 0,\n [_ET],\n [[() => EncryptionTypeList, { [_xF]: 1 }]]\n];\nexport var Bucket$ = [3, n0, _B,\n 0,\n [_N, _CD, _BR, _BA],\n [0, 4, 0, 0]\n];\nexport var BucketInfo$ = [3, n0, _BI,\n 0,\n [_DR, _Ty],\n [0, 0]\n];\nexport var BucketLifecycleConfiguration$ = [3, n0, _BLC,\n 0,\n [_R],\n [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Ru }]], 1\n];\nexport var BucketLoggingStatus$ = [3, n0, _BLS,\n 0,\n [_LE],\n [[() => LoggingEnabled$, 0]]\n];\nexport var Checksum$ = [3, n0, _C,\n 0,\n [_CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT],\n [0, 0, 0, 0, 0, 0]\n];\nexport var CommonPrefix$ = [3, n0, _CP,\n 0,\n [_P],\n [0]\n];\nexport var CompletedMultipartUpload$ = [3, n0, _CMU,\n 0,\n [_Pa],\n [[() => CompletedPartList, { [_xF]: 1, [_xN]: _Par }]]\n];\nexport var CompletedPart$ = [3, n0, _CPo,\n 0,\n [_ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _PN],\n [0, 0, 0, 0, 0, 0, 1]\n];\nexport var CompleteMultipartUploadOutput$ = [3, n0, _CMUO,\n { [_xN]: _CMUR },\n [_L, _B, _K, _E, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _SSE, _VI, _SSEKMSKI, _BKE, _RC],\n [0, 0, 0, [0, { [_hH]: _xae }], 0, 0, 0, 0, 0, 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]]\n];\nexport var CompleteMultipartUploadRequest$ = [3, n0, _CMURo,\n 0,\n [_B, _K, _UI, _MU, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _MOS, _RP, _EBO, _IM, _INM, _SSECA, _SSECK, _SSECKMD],\n [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [() => CompletedMultipartUpload$, { [_hP]: 1, [_xN]: _CMUo }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamos }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], 3\n];\nexport var Condition$ = [3, n0, _Co,\n 0,\n [_HECRE, _KPE],\n [0, 0]\n];\nexport var ContinuationEvent$ = [3, n0, _CE,\n 0,\n [],\n []\n];\nexport var CopyObjectOutput$ = [3, n0, _COO,\n 0,\n [_COR, _E, _CSVI, _VI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC],\n [[() => CopyObjectResult$, 16], [0, { [_hH]: _xae }], [0, { [_hH]: _xacsvi }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]]\n];\nexport var CopyObjectRequest$ = [3, n0, _CORo,\n 0,\n [_B, _CS, _K, _ACL_, _CC, _CA, _CDo, _CEo, _CL, _CTo, _CSIM, _CSIMS, _CSINM, _CSIUS, _Ex, _GFC, _GR, _GRACP, _GWACP, _IM, _INM, _M, _MD, _TD, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _ESBO],\n [[0, 1], [0, { [_hH]: _xacs__ }], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _xaca }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [4, { [_hH]: _Ex }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xamd }], [0, { [_hH]: _xatd }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], 3\n];\nexport var CopyObjectResult$ = [3, n0, _COR,\n 0,\n [_ETa, _LM, _CT, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh],\n [0, 4, 0, 0, 0, 0, 0, 0]\n];\nexport var CopyPartResult$ = [3, n0, _CPR,\n 0,\n [_ETa, _LM, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh],\n [0, 4, 0, 0, 0, 0, 0]\n];\nexport var CORSConfiguration$ = [3, n0, _CORSC,\n 0,\n [_CORSR],\n [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]], 1\n];\nexport var CORSRule$ = [3, n0, _CORSRu,\n 0,\n [_AM, _AO, _ID, _AH, _EH, _MAS],\n [[64 | 0, { [_xF]: 1, [_xN]: _AMl }], [64 | 0, { [_xF]: 1, [_xN]: _AOl }], 0, [64 | 0, { [_xF]: 1, [_xN]: _AHl }], [64 | 0, { [_xF]: 1, [_xN]: _EHx }], 1], 2\n];\nexport var CreateBucketConfiguration$ = [3, n0, _CBC,\n 0,\n [_LC, _L, _B, _T],\n [0, () => LocationInfo$, () => BucketInfo$, [() => TagSet, 0]]\n];\nexport var CreateBucketMetadataConfigurationRequest$ = [3, n0, _CBMCR,\n 0,\n [_B, _MC, _CMD, _CA, _EBO],\n [[0, 1], [() => MetadataConfiguration$, { [_hP]: 1, [_xN]: _MC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var CreateBucketMetadataTableConfigurationRequest$ = [3, n0, _CBMTCR,\n 0,\n [_B, _MTC, _CMD, _CA, _EBO],\n [[0, 1], [() => MetadataTableConfiguration$, { [_hP]: 1, [_xN]: _MTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var CreateBucketOutput$ = [3, n0, _CBO,\n 0,\n [_L, _BA],\n [[0, { [_hH]: _L }], [0, { [_hH]: _xaba }]]\n];\nexport var CreateBucketRequest$ = [3, n0, _CBR,\n 0,\n [_B, _ACL_, _CBC, _GFC, _GR, _GRACP, _GW, _GWACP, _OLEFB, _OO, _BN],\n [[0, 1], [0, { [_hH]: _xaa }], [() => CreateBucketConfiguration$, { [_hP]: 1, [_xN]: _CBC }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [2, { [_hH]: _xabole }], [0, { [_hH]: _xaoo }], [0, { [_hH]: _xabn }]], 1\n];\nexport var CreateMultipartUploadOutput$ = [3, n0, _CMUOr,\n { [_xN]: _IMUR },\n [_ADb, _ARI, _B, _K, _UI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC, _CA, _CT],\n [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], [0, { [_xN]: _B }], 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]]\n];\nexport var CreateMultipartUploadRequest$ = [3, n0, _CMURr,\n 0,\n [_B, _K, _ACL_, _CC, _CDo, _CEo, _CL, _CTo, _Ex, _GFC, _GR, _GRACP, _GWACP, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _CA, _CT],\n [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]], 2\n];\nexport var CreateSessionOutput$ = [3, n0, _CSO,\n { [_xN]: _CSR },\n [_Cr, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE],\n [[() => SessionCredentials$, { [_xN]: _Cr }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], 1\n];\nexport var CreateSessionRequest$ = [3, n0, _CSRr,\n 0,\n [_B, _SM, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE],\n [[0, 1], [0, { [_hH]: _xacsm }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], 1\n];\nexport var CSVInput$ = [3, n0, _CSVIn,\n 0,\n [_FHI, _Com, _QEC, _RD, _FD, _QC, _AQRD],\n [0, 0, 0, 0, 0, 0, 2]\n];\nexport var CSVOutput$ = [3, n0, _CSVO,\n 0,\n [_QF, _QEC, _RD, _FD, _QC],\n [0, 0, 0, 0, 0]\n];\nexport var DefaultRetention$ = [3, n0, _DRe,\n 0,\n [_Mo, _D, _Y],\n [0, 1, 1]\n];\nexport var Delete$ = [3, n0, _De,\n 0,\n [_Ob, _Q],\n [[() => ObjectIdentifierList, { [_xF]: 1, [_xN]: _Obj }], 2], 1\n];\nexport var DeleteBucketAnalyticsConfigurationRequest$ = [3, n0, _DBACR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeleteBucketCorsRequest$ = [3, n0, _DBCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketEncryptionRequest$ = [3, n0, _DBER,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketIntelligentTieringConfigurationRequest$ = [3, n0, _DBITCR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeleteBucketInventoryConfigurationRequest$ = [3, n0, _DBICR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeleteBucketLifecycleRequest$ = [3, n0, _DBLR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketMetadataConfigurationRequest$ = [3, n0, _DBMCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketMetadataTableConfigurationRequest$ = [3, n0, _DBMTCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketMetricsConfigurationRequest$ = [3, n0, _DBMCRe,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeleteBucketOwnershipControlsRequest$ = [3, n0, _DBOCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketPolicyRequest$ = [3, n0, _DBPR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketReplicationRequest$ = [3, n0, _DBRR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketRequest$ = [3, n0, _DBR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketTaggingRequest$ = [3, n0, _DBTR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketWebsiteRequest$ = [3, n0, _DBWR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeletedObject$ = [3, n0, _DO,\n 0,\n [_K, _VI, _DM, _DMVI],\n [0, 0, 2, 0]\n];\nexport var DeleteMarkerEntry$ = [3, n0, _DME,\n 0,\n [_O, _K, _VI, _IL, _LM],\n [() => Owner$, 0, 0, 2, 4]\n];\nexport var DeleteMarkerReplication$ = [3, n0, _DMR,\n 0,\n [_S],\n [0]\n];\nexport var DeleteObjectOutput$ = [3, n0, _DOO,\n 0,\n [_DM, _VI, _RC],\n [[2, { [_hH]: _xadm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }]]\n];\nexport var DeleteObjectRequest$ = [3, n0, _DOR,\n 0,\n [_B, _K, _MFA, _VI, _RP, _BGR, _EBO, _IM, _IMLMT, _IMS],\n [[0, 1], [0, 1], [0, { [_hH]: _xam_ }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [6, { [_hH]: _xaimlmt }], [1, { [_hH]: _xaims }]], 2\n];\nexport var DeleteObjectsOutput$ = [3, n0, _DOOe,\n { [_xN]: _DRel },\n [_Del, _RC, _Er],\n [[() => DeletedObjects, { [_xF]: 1 }], [0, { [_hH]: _xarc }], [() => Errors, { [_xF]: 1, [_xN]: _Err }]]\n];\nexport var DeleteObjectsRequest$ = [3, n0, _DORe,\n 0,\n [_B, _De, _MFA, _RP, _BGR, _EBO, _CA],\n [[0, 1], [() => Delete$, { [_hP]: 1, [_xN]: _De }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], 2\n];\nexport var DeleteObjectTaggingOutput$ = [3, n0, _DOTO,\n 0,\n [_VI],\n [[0, { [_hH]: _xavi }]]\n];\nexport var DeleteObjectTaggingRequest$ = [3, n0, _DOTR,\n 0,\n [_B, _K, _VI, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeletePublicAccessBlockRequest$ = [3, n0, _DPABR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var Destination$ = [3, n0, _Des,\n 0,\n [_B, _A, _SC, _ACT, _EC, _RT, _Me],\n [0, 0, 0, () => AccessControlTranslation$, () => EncryptionConfiguration$, () => ReplicationTime$, () => Metrics$], 1\n];\nexport var DestinationResult$ = [3, n0, _DRes,\n 0,\n [_TBT, _TBA, _TN],\n [0, 0, 0]\n];\nexport var Encryption$ = [3, n0, _En,\n 0,\n [_ET, _KMSKI, _KMSC],\n [0, [() => SSEKMSKeyId, 0], 0], 1\n];\nexport var EncryptionConfiguration$ = [3, n0, _EC,\n 0,\n [_RKKID],\n [0]\n];\nexport var EndEvent$ = [3, n0, _EE,\n 0,\n [],\n []\n];\nexport var _Error$ = [3, n0, _Err,\n 0,\n [_K, _VI, _Cod, _Mes],\n [0, 0, 0, 0]\n];\nexport var ErrorDetails$ = [3, n0, _ED,\n 0,\n [_ECr, _EM],\n [0, 0]\n];\nexport var ErrorDocument$ = [3, n0, _EDr,\n 0,\n [_K],\n [0], 1\n];\nexport var EventBridgeConfiguration$ = [3, n0, _EBC,\n 0,\n [],\n []\n];\nexport var ExistingObjectReplication$ = [3, n0, _EOR,\n 0,\n [_S],\n [0], 1\n];\nexport var FilterRule$ = [3, n0, _FR,\n 0,\n [_N, _V],\n [0, 0]\n];\nexport var GetBucketAbacOutput$ = [3, n0, _GBAO,\n 0,\n [_AS],\n [[() => AbacStatus$, 16]]\n];\nexport var GetBucketAbacRequest$ = [3, n0, _GBAR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketAccelerateConfigurationOutput$ = [3, n0, _GBACO,\n { [_xN]: _AC },\n [_S, _RC],\n [0, [0, { [_hH]: _xarc }]]\n];\nexport var GetBucketAccelerateConfigurationRequest$ = [3, n0, _GBACR,\n 0,\n [_B, _EBO, _RP],\n [[0, 1], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], 1\n];\nexport var GetBucketAclOutput$ = [3, n0, _GBAOe,\n { [_xN]: _ACP },\n [_O, _G],\n [() => Owner$, [() => Grants, { [_xN]: _ACL }]]\n];\nexport var GetBucketAclRequest$ = [3, n0, _GBARe,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketAnalyticsConfigurationOutput$ = [3, n0, _GBACOe,\n 0,\n [_ACn],\n [[() => AnalyticsConfiguration$, 16]]\n];\nexport var GetBucketAnalyticsConfigurationRequest$ = [3, n0, _GBACRe,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetBucketCorsOutput$ = [3, n0, _GBCO,\n { [_xN]: _CORSC },\n [_CORSR],\n [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]]\n];\nexport var GetBucketCorsRequest$ = [3, n0, _GBCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketEncryptionOutput$ = [3, n0, _GBEO,\n 0,\n [_SSEC],\n [[() => ServerSideEncryptionConfiguration$, 16]]\n];\nexport var GetBucketEncryptionRequest$ = [3, n0, _GBER,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketIntelligentTieringConfigurationOutput$ = [3, n0, _GBITCO,\n 0,\n [_ITC],\n [[() => IntelligentTieringConfiguration$, 16]]\n];\nexport var GetBucketIntelligentTieringConfigurationRequest$ = [3, n0, _GBITCR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetBucketInventoryConfigurationOutput$ = [3, n0, _GBICO,\n 0,\n [_IC],\n [[() => InventoryConfiguration$, 16]]\n];\nexport var GetBucketInventoryConfigurationRequest$ = [3, n0, _GBICR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetBucketLifecycleConfigurationOutput$ = [3, n0, _GBLCO,\n { [_xN]: _LCi },\n [_R, _TDMOS],\n [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Ru }], [0, { [_hH]: _xatdmos }]]\n];\nexport var GetBucketLifecycleConfigurationRequest$ = [3, n0, _GBLCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketLocationOutput$ = [3, n0, _GBLO,\n { [_xN]: _LC },\n [_LC],\n [0]\n];\nexport var GetBucketLocationRequest$ = [3, n0, _GBLR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketLoggingOutput$ = [3, n0, _GBLOe,\n { [_xN]: _BLS },\n [_LE],\n [[() => LoggingEnabled$, 0]]\n];\nexport var GetBucketLoggingRequest$ = [3, n0, _GBLRe,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketMetadataConfigurationOutput$ = [3, n0, _GBMCO,\n 0,\n [_GBMCR],\n [[() => GetBucketMetadataConfigurationResult$, 16]]\n];\nexport var GetBucketMetadataConfigurationRequest$ = [3, n0, _GBMCRe,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketMetadataConfigurationResult$ = [3, n0, _GBMCR,\n 0,\n [_MCR],\n [() => MetadataConfigurationResult$], 1\n];\nexport var GetBucketMetadataTableConfigurationOutput$ = [3, n0, _GBMTCO,\n 0,\n [_GBMTCR],\n [[() => GetBucketMetadataTableConfigurationResult$, 16]]\n];\nexport var GetBucketMetadataTableConfigurationRequest$ = [3, n0, _GBMTCRe,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketMetadataTableConfigurationResult$ = [3, n0, _GBMTCR,\n 0,\n [_MTCR, _S, _Err],\n [() => MetadataTableConfigurationResult$, 0, () => ErrorDetails$], 2\n];\nexport var GetBucketMetricsConfigurationOutput$ = [3, n0, _GBMCOe,\n 0,\n [_MCe],\n [[() => MetricsConfiguration$, 16]]\n];\nexport var GetBucketMetricsConfigurationRequest$ = [3, n0, _GBMCRet,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetBucketNotificationConfigurationRequest$ = [3, n0, _GBNCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketOwnershipControlsOutput$ = [3, n0, _GBOCO,\n 0,\n [_OC],\n [[() => OwnershipControls$, 16]]\n];\nexport var GetBucketOwnershipControlsRequest$ = [3, n0, _GBOCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketPolicyOutput$ = [3, n0, _GBPO,\n 0,\n [_Po],\n [[0, 16]]\n];\nexport var GetBucketPolicyRequest$ = [3, n0, _GBPR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketPolicyStatusOutput$ = [3, n0, _GBPSO,\n 0,\n [_PS],\n [[() => PolicyStatus$, 16]]\n];\nexport var GetBucketPolicyStatusRequest$ = [3, n0, _GBPSR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketReplicationOutput$ = [3, n0, _GBRO,\n 0,\n [_RCe],\n [[() => ReplicationConfiguration$, 16]]\n];\nexport var GetBucketReplicationRequest$ = [3, n0, _GBRR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketRequestPaymentOutput$ = [3, n0, _GBRPO,\n { [_xN]: _RPC },\n [_Pay],\n [0]\n];\nexport var GetBucketRequestPaymentRequest$ = [3, n0, _GBRPR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketTaggingOutput$ = [3, n0, _GBTO,\n { [_xN]: _Tag },\n [_TS],\n [[() => TagSet, 0]], 1\n];\nexport var GetBucketTaggingRequest$ = [3, n0, _GBTR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketVersioningOutput$ = [3, n0, _GBVO,\n { [_xN]: _VC },\n [_S, _MFAD],\n [0, [0, { [_xN]: _MDf }]]\n];\nexport var GetBucketVersioningRequest$ = [3, n0, _GBVR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketWebsiteOutput$ = [3, n0, _GBWO,\n { [_xN]: _WC },\n [_RART, _IDn, _EDr, _RR],\n [() => RedirectAllRequestsTo$, () => IndexDocument$, () => ErrorDocument$, [() => RoutingRules, 0]]\n];\nexport var GetBucketWebsiteRequest$ = [3, n0, _GBWR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetObjectAclOutput$ = [3, n0, _GOAO,\n { [_xN]: _ACP },\n [_O, _G, _RC],\n [() => Owner$, [() => Grants, { [_xN]: _ACL }], [0, { [_hH]: _xarc }]]\n];\nexport var GetObjectAclRequest$ = [3, n0, _GOAR,\n 0,\n [_B, _K, _VI, _RP, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetObjectAttributesOutput$ = [3, n0, _GOAOe,\n { [_xN]: _GOARe },\n [_DM, _LM, _VI, _RC, _ETa, _C, _OP, _SC, _OS],\n [[2, { [_hH]: _xadm }], [4, { [_hH]: _LM_ }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }], 0, () => Checksum$, [() => GetObjectAttributesParts$, 0], 0, 1]\n];\nexport var GetObjectAttributesParts$ = [3, n0, _GOAP,\n 0,\n [_TPC, _PNM, _NPNM, _MP, _IT, _Pa],\n [[1, { [_xN]: _PC }], 0, 0, 1, 2, [() => PartsList, { [_xF]: 1, [_xN]: _Par }]]\n];\nexport var GetObjectAttributesRequest$ = [3, n0, _GOARet,\n 0,\n [_B, _K, _OA, _VI, _MP, _PNM, _SSECA, _SSECK, _SSECKMD, _RP, _EBO],\n [[0, 1], [0, 1], [64 | 0, { [_hH]: _xaoa }], [0, { [_hQ]: _vI }], [1, { [_hH]: _xamp }], [0, { [_hH]: _xapnm }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var GetObjectLegalHoldOutput$ = [3, n0, _GOLHO,\n 0,\n [_LH],\n [[() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }]]\n];\nexport var GetObjectLegalHoldRequest$ = [3, n0, _GOLHR,\n 0,\n [_B, _K, _VI, _RP, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetObjectLockConfigurationOutput$ = [3, n0, _GOLCO,\n 0,\n [_OLC],\n [[() => ObjectLockConfiguration$, 16]]\n];\nexport var GetObjectLockConfigurationRequest$ = [3, n0, _GOLCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetObjectOutput$ = [3, n0, _GOO,\n 0,\n [_Bo, _DM, _AR, _E, _Re, _LM, _CLo, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _MM, _VI, _CC, _CDo, _CEo, _CL, _CR, _CTo, _Ex, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS],\n [[() => StreamingBlob, 16], [2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CR_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]]\n];\nexport var GetObjectRequest$ = [3, n0, _GOR,\n 0,\n [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh],\n [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm }]], 2\n];\nexport var GetObjectRetentionOutput$ = [3, n0, _GORO,\n 0,\n [_Ret],\n [[() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }]]\n];\nexport var GetObjectRetentionRequest$ = [3, n0, _GORR,\n 0,\n [_B, _K, _VI, _RP, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetObjectTaggingOutput$ = [3, n0, _GOTO,\n { [_xN]: _Tag },\n [_TS, _VI],\n [[() => TagSet, 0], [0, { [_hH]: _xavi }]], 1\n];\nexport var GetObjectTaggingRequest$ = [3, n0, _GOTR,\n 0,\n [_B, _K, _VI, _EBO, _RP],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], 2\n];\nexport var GetObjectTorrentOutput$ = [3, n0, _GOTOe,\n 0,\n [_Bo, _RC],\n [[() => StreamingBlob, 16], [0, { [_hH]: _xarc }]]\n];\nexport var GetObjectTorrentRequest$ = [3, n0, _GOTRe,\n 0,\n [_B, _K, _RP, _EBO],\n [[0, 1], [0, 1], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetPublicAccessBlockOutput$ = [3, n0, _GPABO,\n 0,\n [_PABC],\n [[() => PublicAccessBlockConfiguration$, 16]]\n];\nexport var GetPublicAccessBlockRequest$ = [3, n0, _GPABR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GlacierJobParameters$ = [3, n0, _GJP,\n 0,\n [_Ti],\n [0], 1\n];\nexport var Grant$ = [3, n0, _Gr,\n 0,\n [_Gra, _Pe],\n [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0]\n];\nexport var Grantee$ = [3, n0, _Gra,\n 0,\n [_Ty, _DN, _EA, _ID, _URI],\n [[0, { [_xA]: 1, [_xN]: _xs }], 0, 0, 0, 0], 1\n];\nexport var HeadBucketOutput$ = [3, n0, _HBO,\n 0,\n [_BA, _BLT, _BLN, _BR, _APA],\n [[0, { [_hH]: _xaba }], [0, { [_hH]: _xablt }], [0, { [_hH]: _xabln }], [0, { [_hH]: _xabr }], [2, { [_hH]: _xaapa }]]\n];\nexport var HeadBucketRequest$ = [3, n0, _HBR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var HeadObjectOutput$ = [3, n0, _HOO,\n 0,\n [_DM, _AR, _E, _Re, _ASr, _LM, _CLo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _ETa, _MM, _VI, _CC, _CDo, _CEo, _CL, _CTo, _CR, _Ex, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS],\n [[2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [0, { [_hH]: _xaas }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [0, { [_hH]: _ETa }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _CR_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]]\n];\nexport var HeadObjectRequest$ = [3, n0, _HOR,\n 0,\n [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh],\n [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm }]], 2\n];\nexport var IndexDocument$ = [3, n0, _IDn,\n 0,\n [_Su],\n [0], 1\n];\nexport var Initiator$ = [3, n0, _In,\n 0,\n [_ID, _DN],\n [0, 0]\n];\nexport var InputSerialization$ = [3, n0, _IS,\n 0,\n [_CSV, _CTom, _JSON, _Parq],\n [() => CSVInput$, 0, () => JSONInput$, () => ParquetInput$]\n];\nexport var IntelligentTieringAndOperator$ = [3, n0, _ITAO,\n 0,\n [_P, _T],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]]\n];\nexport var IntelligentTieringConfiguration$ = [3, n0, _ITC,\n 0,\n [_I, _S, _Tie, _F],\n [0, 0, [() => TieringList, { [_xF]: 1, [_xN]: _Tier }], [() => IntelligentTieringFilter$, 0]], 3\n];\nexport var IntelligentTieringFilter$ = [3, n0, _ITF,\n 0,\n [_P, _Ta, _An],\n [0, () => Tag$, [() => IntelligentTieringAndOperator$, 0]]\n];\nexport var InventoryConfiguration$ = [3, n0, _IC,\n 0,\n [_Des, _IE, _I, _IOV, _Sc, _F, _OF],\n [[() => InventoryDestination$, 0], 2, 0, 0, () => InventorySchedule$, () => InventoryFilter$, [() => InventoryOptionalFields, 0]], 5\n];\nexport var InventoryDestination$ = [3, n0, _IDnv,\n 0,\n [_SBD],\n [[() => InventoryS3BucketDestination$, 0]], 1\n];\nexport var InventoryEncryption$ = [3, n0, _IEn,\n 0,\n [_SSES, _SSEKMS],\n [[() => SSES3$, { [_xN]: _SS }], [() => SSEKMS$, { [_xN]: _SK }]]\n];\nexport var InventoryFilter$ = [3, n0, _IF,\n 0,\n [_P],\n [0], 1\n];\nexport var InventoryS3BucketDestination$ = [3, n0, _ISBD,\n 0,\n [_B, _Fo, _AI, _P, _En],\n [0, 0, 0, 0, [() => InventoryEncryption$, 0]], 2\n];\nexport var InventorySchedule$ = [3, n0, _ISn,\n 0,\n [_Fr],\n [0], 1\n];\nexport var InventoryTableConfiguration$ = [3, n0, _ITCn,\n 0,\n [_CSo, _EC],\n [0, () => MetadataTableEncryptionConfiguration$], 1\n];\nexport var InventoryTableConfigurationResult$ = [3, n0, _ITCR,\n 0,\n [_CSo, _TSa, _Err, _TNa, _TA],\n [0, 0, () => ErrorDetails$, 0, 0], 1\n];\nexport var InventoryTableConfigurationUpdates$ = [3, n0, _ITCU,\n 0,\n [_CSo, _EC],\n [0, () => MetadataTableEncryptionConfiguration$], 1\n];\nexport var JournalTableConfiguration$ = [3, n0, _JTC,\n 0,\n [_REe, _EC],\n [() => RecordExpiration$, () => MetadataTableEncryptionConfiguration$], 1\n];\nexport var JournalTableConfigurationResult$ = [3, n0, _JTCR,\n 0,\n [_TSa, _TNa, _REe, _Err, _TA],\n [0, 0, () => RecordExpiration$, () => ErrorDetails$, 0], 3\n];\nexport var JournalTableConfigurationUpdates$ = [3, n0, _JTCU,\n 0,\n [_REe],\n [() => RecordExpiration$], 1\n];\nexport var JSONInput$ = [3, n0, _JSONI,\n 0,\n [_Ty],\n [0]\n];\nexport var JSONOutput$ = [3, n0, _JSONO,\n 0,\n [_RD],\n [0]\n];\nexport var LambdaFunctionConfiguration$ = [3, n0, _LFC,\n 0,\n [_LFA, _Ev, _I, _F],\n [[0, { [_xN]: _CF }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], 2\n];\nexport var LifecycleExpiration$ = [3, n0, _LEi,\n 0,\n [_Da, _D, _EODM],\n [5, 1, 2]\n];\nexport var LifecycleRule$ = [3, n0, _LR,\n 0,\n [_S, _E, _ID, _P, _F, _Tr, _NVT, _NVE, _AIMU],\n [0, () => LifecycleExpiration$, 0, 0, [() => LifecycleRuleFilter$, 0], [() => TransitionList, { [_xF]: 1, [_xN]: _Tra }], [() => NoncurrentVersionTransitionList, { [_xF]: 1, [_xN]: _NVTo }], () => NoncurrentVersionExpiration$, () => AbortIncompleteMultipartUpload$], 1\n];\nexport var LifecycleRuleAndOperator$ = [3, n0, _LRAO,\n 0,\n [_P, _T, _OSGT, _OSLT],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 1, 1]\n];\nexport var LifecycleRuleFilter$ = [3, n0, _LRF,\n 0,\n [_P, _Ta, _OSGT, _OSLT, _An],\n [0, () => Tag$, 1, 1, [() => LifecycleRuleAndOperator$, 0]]\n];\nexport var ListBucketAnalyticsConfigurationsOutput$ = [3, n0, _LBACO,\n { [_xN]: _LBACR },\n [_IT, _CTon, _NCT, _ACLn],\n [2, 0, 0, [() => AnalyticsConfigurationList, { [_xF]: 1, [_xN]: _ACn }]]\n];\nexport var ListBucketAnalyticsConfigurationsRequest$ = [3, n0, _LBACRi,\n 0,\n [_B, _CTon, _EBO],\n [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var ListBucketIntelligentTieringConfigurationsOutput$ = [3, n0, _LBITCO,\n 0,\n [_IT, _CTon, _NCT, _ITCL],\n [2, 0, 0, [() => IntelligentTieringConfigurationList, { [_xF]: 1, [_xN]: _ITC }]]\n];\nexport var ListBucketIntelligentTieringConfigurationsRequest$ = [3, n0, _LBITCR,\n 0,\n [_B, _CTon, _EBO],\n [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var ListBucketInventoryConfigurationsOutput$ = [3, n0, _LBICO,\n { [_xN]: _LICR },\n [_CTon, _ICL, _IT, _NCT],\n [0, [() => InventoryConfigurationList, { [_xF]: 1, [_xN]: _IC }], 2, 0]\n];\nexport var ListBucketInventoryConfigurationsRequest$ = [3, n0, _LBICR,\n 0,\n [_B, _CTon, _EBO],\n [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var ListBucketMetricsConfigurationsOutput$ = [3, n0, _LBMCO,\n { [_xN]: _LMCR },\n [_IT, _CTon, _NCT, _MCL],\n [2, 0, 0, [() => MetricsConfigurationList, { [_xF]: 1, [_xN]: _MCe }]]\n];\nexport var ListBucketMetricsConfigurationsRequest$ = [3, n0, _LBMCR,\n 0,\n [_B, _CTon, _EBO],\n [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var ListBucketsOutput$ = [3, n0, _LBO,\n { [_xN]: _LAMBR },\n [_Bu, _O, _CTon, _P],\n [[() => Buckets, 0], () => Owner$, 0, 0]\n];\nexport var ListBucketsRequest$ = [3, n0, _LBR,\n 0,\n [_MB, _CTon, _P, _BR],\n [[1, { [_hQ]: _mb }], [0, { [_hQ]: _ct }], [0, { [_hQ]: _p }], [0, { [_hQ]: _br }]]\n];\nexport var ListDirectoryBucketsOutput$ = [3, n0, _LDBO,\n { [_xN]: _LAMDBR },\n [_Bu, _CTon],\n [[() => Buckets, 0], 0]\n];\nexport var ListDirectoryBucketsRequest$ = [3, n0, _LDBR,\n 0,\n [_CTon, _MDB],\n [[0, { [_hQ]: _ct }], [1, { [_hQ]: _mdb }]]\n];\nexport var ListMultipartUploadsOutput$ = [3, n0, _LMUO,\n { [_xN]: _LMUR },\n [_B, _KM, _UIM, _NKM, _P, _Deli, _NUIM, _MUa, _IT, _U, _CPom, _ETn, _RC],\n [0, 0, 0, 0, 0, 0, 0, 1, 2, [() => MultipartUploadList, { [_xF]: 1, [_xN]: _Up }], [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]]\n];\nexport var ListMultipartUploadsRequest$ = [3, n0, _LMURi,\n 0,\n [_B, _Deli, _ETn, _KM, _MUa, _P, _UIM, _EBO, _RP],\n [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mu }], [0, { [_hQ]: _p }], [0, { [_hQ]: _uim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], 1\n];\nexport var ListObjectsOutput$ = [3, n0, _LOO,\n { [_xN]: _LBRi },\n [_IT, _Ma, _NM, _Con, _N, _P, _Deli, _MK, _CPom, _ETn, _RC],\n [2, 0, 0, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]]\n];\nexport var ListObjectsRequest$ = [3, n0, _LOR,\n 0,\n [_B, _Deli, _ETn, _Ma, _MK, _P, _RP, _EBO, _OOA],\n [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _m }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], 1\n];\nexport var ListObjectsV2Output$ = [3, n0, _LOVO,\n { [_xN]: _LBRi },\n [_IT, _Con, _N, _P, _Deli, _MK, _CPom, _ETn, _KC, _CTon, _NCT, _SA, _RC],\n [2, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, 1, 0, 0, 0, [0, { [_hH]: _xarc }]]\n];\nexport var ListObjectsV2Request$ = [3, n0, _LOVR,\n 0,\n [_B, _Deli, _ETn, _MK, _P, _CTon, _FO, _SA, _RP, _EBO, _OOA],\n [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _ct }], [2, { [_hQ]: _fo }], [0, { [_hQ]: _sa }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], 1\n];\nexport var ListObjectVersionsOutput$ = [3, n0, _LOVOi,\n { [_xN]: _LVR },\n [_IT, _KM, _VIM, _NKM, _NVIM, _Ve, _DMe, _N, _P, _Deli, _MK, _CPom, _ETn, _RC],\n [2, 0, 0, 0, 0, [() => ObjectVersionList, { [_xF]: 1, [_xN]: _Ver }], [() => DeleteMarkers, { [_xF]: 1, [_xN]: _DM }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]]\n];\nexport var ListObjectVersionsRequest$ = [3, n0, _LOVRi,\n 0,\n [_B, _Deli, _ETn, _KM, _MK, _P, _VIM, _EBO, _RP, _OOA],\n [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _vim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }], [64 | 0, { [_hH]: _xaooa }]], 1\n];\nexport var ListPartsOutput$ = [3, n0, _LPO,\n { [_xN]: _LPR },\n [_ADb, _ARI, _B, _K, _UI, _PNM, _NPNM, _MP, _IT, _Pa, _In, _O, _SC, _RC, _CA, _CT],\n [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], 0, 0, 0, 0, 0, 1, 2, [() => Parts, { [_xF]: 1, [_xN]: _Par }], () => Initiator$, () => Owner$, 0, [0, { [_hH]: _xarc }], 0, 0]\n];\nexport var ListPartsRequest$ = [3, n0, _LPRi,\n 0,\n [_B, _K, _UI, _MP, _PNM, _RP, _EBO, _SSECA, _SSECK, _SSECKMD],\n [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [1, { [_hQ]: _mp }], [0, { [_hQ]: _pnm }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], 3\n];\nexport var LocationInfo$ = [3, n0, _LI,\n 0,\n [_Ty, _N],\n [0, 0]\n];\nexport var LoggingEnabled$ = [3, n0, _LE,\n 0,\n [_TB, _TP, _TG, _TOKF],\n [0, 0, [() => TargetGrants, 0], [() => TargetObjectKeyFormat$, 0]], 2\n];\nexport var MetadataConfiguration$ = [3, n0, _MC,\n 0,\n [_JTC, _ITCn],\n [() => JournalTableConfiguration$, () => InventoryTableConfiguration$], 1\n];\nexport var MetadataConfigurationResult$ = [3, n0, _MCR,\n 0,\n [_DRes, _JTCR, _ITCR],\n [() => DestinationResult$, () => JournalTableConfigurationResult$, () => InventoryTableConfigurationResult$], 1\n];\nexport var MetadataEntry$ = [3, n0, _ME,\n 0,\n [_N, _V],\n [0, 0]\n];\nexport var MetadataTableConfiguration$ = [3, n0, _MTC,\n 0,\n [_STD],\n [() => S3TablesDestination$], 1\n];\nexport var MetadataTableConfigurationResult$ = [3, n0, _MTCR,\n 0,\n [_STDR],\n [() => S3TablesDestinationResult$], 1\n];\nexport var MetadataTableEncryptionConfiguration$ = [3, n0, _MTEC,\n 0,\n [_SAs, _KKA],\n [0, 0], 1\n];\nexport var Metrics$ = [3, n0, _Me,\n 0,\n [_S, _ETv],\n [0, () => ReplicationTimeValue$], 1\n];\nexport var MetricsAndOperator$ = [3, n0, _MAO,\n 0,\n [_P, _T, _APAc],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 0]\n];\nexport var MetricsConfiguration$ = [3, n0, _MCe,\n 0,\n [_I, _F],\n [0, [() => MetricsFilter$, 0]], 1\n];\nexport var MultipartUpload$ = [3, n0, _MU,\n 0,\n [_UI, _K, _Ini, _SC, _O, _In, _CA, _CT],\n [0, 0, 4, 0, () => Owner$, () => Initiator$, 0, 0]\n];\nexport var NoncurrentVersionExpiration$ = [3, n0, _NVE,\n 0,\n [_ND, _NNV],\n [1, 1]\n];\nexport var NoncurrentVersionTransition$ = [3, n0, _NVTo,\n 0,\n [_ND, _SC, _NNV],\n [1, 0, 1]\n];\nexport var NotificationConfiguration$ = [3, n0, _NC,\n 0,\n [_TCo, _QCu, _LFCa, _EBC],\n [[() => TopicConfigurationList, { [_xF]: 1, [_xN]: _TCop }], [() => QueueConfigurationList, { [_xF]: 1, [_xN]: _QCue }], [() => LambdaFunctionConfigurationList, { [_xF]: 1, [_xN]: _CFC }], () => EventBridgeConfiguration$]\n];\nexport var NotificationConfigurationFilter$ = [3, n0, _NCF,\n 0,\n [_K],\n [[() => S3KeyFilter$, { [_xN]: _SKe }]]\n];\nexport var _Object$ = [3, n0, _Obj,\n 0,\n [_K, _LM, _ETa, _CA, _CT, _Si, _SC, _O, _RSe],\n [0, 4, 0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, () => Owner$, () => RestoreStatus$]\n];\nexport var ObjectIdentifier$ = [3, n0, _OI,\n 0,\n [_K, _VI, _ETa, _LMT, _Si],\n [0, 0, 0, 6, 1], 1\n];\nexport var ObjectLockConfiguration$ = [3, n0, _OLC,\n 0,\n [_OLE, _Ru],\n [0, () => ObjectLockRule$]\n];\nexport var ObjectLockLegalHold$ = [3, n0, _OLLH,\n 0,\n [_S],\n [0]\n];\nexport var ObjectLockRetention$ = [3, n0, _OLR,\n 0,\n [_Mo, _RUD],\n [0, 5]\n];\nexport var ObjectLockRule$ = [3, n0, _OLRb,\n 0,\n [_DRe],\n [() => DefaultRetention$]\n];\nexport var ObjectPart$ = [3, n0, _OPb,\n 0,\n [_PN, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh],\n [1, 1, 0, 0, 0, 0, 0]\n];\nexport var ObjectVersion$ = [3, n0, _OV,\n 0,\n [_ETa, _CA, _CT, _Si, _SC, _K, _VI, _IL, _LM, _O, _RSe],\n [0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, 0, 0, 2, 4, () => Owner$, () => RestoreStatus$]\n];\nexport var OutputLocation$ = [3, n0, _OL,\n 0,\n [_S_],\n [[() => S3Location$, 0]]\n];\nexport var OutputSerialization$ = [3, n0, _OSu,\n 0,\n [_CSV, _JSON],\n [() => CSVOutput$, () => JSONOutput$]\n];\nexport var Owner$ = [3, n0, _O,\n 0,\n [_DN, _ID],\n [0, 0]\n];\nexport var OwnershipControls$ = [3, n0, _OC,\n 0,\n [_R],\n [[() => OwnershipControlsRules, { [_xF]: 1, [_xN]: _Ru }]], 1\n];\nexport var OwnershipControlsRule$ = [3, n0, _OCR,\n 0,\n [_OO],\n [0], 1\n];\nexport var ParquetInput$ = [3, n0, _PI,\n 0,\n [],\n []\n];\nexport var Part$ = [3, n0, _Par,\n 0,\n [_PN, _LM, _ETa, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh],\n [1, 4, 0, 1, 0, 0, 0, 0, 0]\n];\nexport var PartitionedPrefix$ = [3, n0, _PP,\n { [_xN]: _PP },\n [_PDS],\n [0]\n];\nexport var PolicyStatus$ = [3, n0, _PS,\n 0,\n [_IP],\n [[2, { [_xN]: _IP }]]\n];\nexport var Progress$ = [3, n0, _Pr,\n 0,\n [_BS, _BP, _BRy],\n [1, 1, 1]\n];\nexport var ProgressEvent$ = [3, n0, _PE,\n 0,\n [_Det],\n [[() => Progress$, { [_eP]: 1 }]]\n];\nexport var PublicAccessBlockConfiguration$ = [3, n0, _PABC,\n 0,\n [_BPA, _IPA, _BPP, _RPB],\n [[2, { [_xN]: _BPA }], [2, { [_xN]: _IPA }], [2, { [_xN]: _BPP }], [2, { [_xN]: _RPB }]]\n];\nexport var PutBucketAbacRequest$ = [3, n0, _PBAR,\n 0,\n [_B, _AS, _CMD, _CA, _EBO],\n [[0, 1], [() => AbacStatus$, { [_hP]: 1, [_xN]: _AS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketAccelerateConfigurationRequest$ = [3, n0, _PBACR,\n 0,\n [_B, _AC, _EBO, _CA],\n [[0, 1], [() => AccelerateConfiguration$, { [_hP]: 1, [_xN]: _AC }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], 2\n];\nexport var PutBucketAclRequest$ = [3, n0, _PBARu,\n 0,\n [_B, _ACL_, _ACP, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _EBO],\n [[0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var PutBucketAnalyticsConfigurationRequest$ = [3, n0, _PBACRu,\n 0,\n [_B, _I, _ACn, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [() => AnalyticsConfiguration$, { [_hP]: 1, [_xN]: _ACn }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var PutBucketCorsRequest$ = [3, n0, _PBCR,\n 0,\n [_B, _CORSC, _CMD, _CA, _EBO],\n [[0, 1], [() => CORSConfiguration$, { [_hP]: 1, [_xN]: _CORSC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketEncryptionRequest$ = [3, n0, _PBER,\n 0,\n [_B, _SSEC, _CMD, _CA, _EBO],\n [[0, 1], [() => ServerSideEncryptionConfiguration$, { [_hP]: 1, [_xN]: _SSEC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketIntelligentTieringConfigurationRequest$ = [3, n0, _PBITCR,\n 0,\n [_B, _I, _ITC, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [() => IntelligentTieringConfiguration$, { [_hP]: 1, [_xN]: _ITC }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var PutBucketInventoryConfigurationRequest$ = [3, n0, _PBICR,\n 0,\n [_B, _I, _IC, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [() => InventoryConfiguration$, { [_hP]: 1, [_xN]: _IC }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var PutBucketLifecycleConfigurationOutput$ = [3, n0, _PBLCO,\n 0,\n [_TDMOS],\n [[0, { [_hH]: _xatdmos }]]\n];\nexport var PutBucketLifecycleConfigurationRequest$ = [3, n0, _PBLCR,\n 0,\n [_B, _CA, _LCi, _EBO, _TDMOS],\n [[0, 1], [0, { [_hH]: _xasca }], [() => BucketLifecycleConfiguration$, { [_hP]: 1, [_xN]: _LCi }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xatdmos }]], 1\n];\nexport var PutBucketLoggingRequest$ = [3, n0, _PBLR,\n 0,\n [_B, _BLS, _CMD, _CA, _EBO],\n [[0, 1], [() => BucketLoggingStatus$, { [_hP]: 1, [_xN]: _BLS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketMetricsConfigurationRequest$ = [3, n0, _PBMCR,\n 0,\n [_B, _I, _MCe, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [() => MetricsConfiguration$, { [_hP]: 1, [_xN]: _MCe }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var PutBucketNotificationConfigurationRequest$ = [3, n0, _PBNCR,\n 0,\n [_B, _NC, _EBO, _SDV],\n [[0, 1], [() => NotificationConfiguration$, { [_hP]: 1, [_xN]: _NC }], [0, { [_hH]: _xaebo }], [2, { [_hH]: _xasdv }]], 2\n];\nexport var PutBucketOwnershipControlsRequest$ = [3, n0, _PBOCR,\n 0,\n [_B, _OC, _CMD, _EBO, _CA],\n [[0, 1], [() => OwnershipControls$, { [_hP]: 1, [_xN]: _OC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], 2\n];\nexport var PutBucketPolicyRequest$ = [3, n0, _PBPR,\n 0,\n [_B, _Po, _CMD, _CA, _CRSBA, _EBO],\n [[0, 1], [0, 16], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [2, { [_hH]: _xacrsba }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketReplicationRequest$ = [3, n0, _PBRR,\n 0,\n [_B, _RCe, _CMD, _CA, _To, _EBO],\n [[0, 1], [() => ReplicationConfiguration$, { [_hP]: 1, [_xN]: _RCe }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketRequestPaymentRequest$ = [3, n0, _PBRPR,\n 0,\n [_B, _RPC, _CMD, _CA, _EBO],\n [[0, 1], [() => RequestPaymentConfiguration$, { [_hP]: 1, [_xN]: _RPC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketTaggingRequest$ = [3, n0, _PBTR,\n 0,\n [_B, _Tag, _CMD, _CA, _EBO],\n [[0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketVersioningRequest$ = [3, n0, _PBVR,\n 0,\n [_B, _VC, _CMD, _CA, _MFA, _EBO],\n [[0, 1], [() => VersioningConfiguration$, { [_hP]: 1, [_xN]: _VC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketWebsiteRequest$ = [3, n0, _PBWR,\n 0,\n [_B, _WC, _CMD, _CA, _EBO],\n [[0, 1], [() => WebsiteConfiguration$, { [_hP]: 1, [_xN]: _WC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectAclOutput$ = [3, n0, _POAO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var PutObjectAclRequest$ = [3, n0, _POAR,\n 0,\n [_B, _K, _ACL_, _ACP, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _RP, _VI, _EBO],\n [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectLegalHoldOutput$ = [3, n0, _POLHO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var PutObjectLegalHoldRequest$ = [3, n0, _POLHR,\n 0,\n [_B, _K, _LH, _RP, _VI, _CMD, _CA, _EBO],\n [[0, 1], [0, 1], [() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectLockConfigurationOutput$ = [3, n0, _POLCO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var PutObjectLockConfigurationRequest$ = [3, n0, _POLCR,\n 0,\n [_B, _OLC, _RP, _To, _CMD, _CA, _EBO],\n [[0, 1], [() => ObjectLockConfiguration$, { [_hP]: 1, [_xN]: _OLC }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var PutObjectOutput$ = [3, n0, _POO,\n 0,\n [_E, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _SSE, _VI, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _Si, _RC],\n [[0, { [_hH]: _xae }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [1, { [_hH]: _xaos }], [0, { [_hH]: _xarc }]]\n];\nexport var PutObjectRequest$ = [3, n0, _POR,\n 0,\n [_B, _K, _ACL_, _Bo, _CC, _CDo, _CEo, _CL, _CLo, _CMD, _CTo, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _Ex, _IM, _INM, _GFC, _GR, _GRACP, _GWACP, _WOB, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO],\n [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => StreamingBlob, 16], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [1, { [_hH]: _xawob }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectRetentionOutput$ = [3, n0, _PORO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var PutObjectRetentionRequest$ = [3, n0, _PORR,\n 0,\n [_B, _K, _Ret, _RP, _VI, _BGR, _CMD, _CA, _EBO],\n [[0, 1], [0, 1], [() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectTaggingOutput$ = [3, n0, _POTO,\n 0,\n [_VI],\n [[0, { [_hH]: _xavi }]]\n];\nexport var PutObjectTaggingRequest$ = [3, n0, _POTR,\n 0,\n [_B, _K, _Tag, _VI, _CMD, _CA, _EBO, _RP],\n [[0, 1], [0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], 3\n];\nexport var PutPublicAccessBlockRequest$ = [3, n0, _PPABR,\n 0,\n [_B, _PABC, _CMD, _CA, _EBO],\n [[0, 1], [() => PublicAccessBlockConfiguration$, { [_hP]: 1, [_xN]: _PABC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var QueueConfiguration$ = [3, n0, _QCue,\n 0,\n [_QA, _Ev, _I, _F],\n [[0, { [_xN]: _Qu }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], 2\n];\nexport var RecordExpiration$ = [3, n0, _REe,\n 0,\n [_E, _D],\n [0, 1], 1\n];\nexport var RecordsEvent$ = [3, n0, _REec,\n 0,\n [_Payl],\n [[21, { [_eP]: 1 }]]\n];\nexport var Redirect$ = [3, n0, _Red,\n 0,\n [_HN, _HRC, _Pro, _RKPW, _RKW],\n [0, 0, 0, 0, 0]\n];\nexport var RedirectAllRequestsTo$ = [3, n0, _RART,\n 0,\n [_HN, _Pro],\n [0, 0], 1\n];\nexport var RenameObjectOutput$ = [3, n0, _ROO,\n 0,\n [],\n []\n];\nexport var RenameObjectRequest$ = [3, n0, _ROR,\n 0,\n [_B, _K, _RSen, _DIM, _DINM, _DIMS, _DIUS, _SIM, _SINM, _SIMS, _SIUS, _CTl],\n [[0, 1], [0, 1], [0, { [_hH]: _xars_ }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IMS_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _xarsim }], [0, { [_hH]: _xarsinm }], [6, { [_hH]: _xarsims }], [6, { [_hH]: _xarsius }], [0, { [_hH]: _xact_, [_iT]: 1 }]], 3\n];\nexport var ReplicaModifications$ = [3, n0, _RM,\n 0,\n [_S],\n [0], 1\n];\nexport var ReplicationConfiguration$ = [3, n0, _RCe,\n 0,\n [_Ro, _R],\n [0, [() => ReplicationRules, { [_xF]: 1, [_xN]: _Ru }]], 2\n];\nexport var ReplicationRule$ = [3, n0, _RRe,\n 0,\n [_S, _Des, _ID, _Pri, _P, _F, _SSC, _EOR, _DMR],\n [0, () => Destination$, 0, 1, 0, [() => ReplicationRuleFilter$, 0], () => SourceSelectionCriteria$, () => ExistingObjectReplication$, () => DeleteMarkerReplication$], 2\n];\nexport var ReplicationRuleAndOperator$ = [3, n0, _RRAO,\n 0,\n [_P, _T],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]]\n];\nexport var ReplicationRuleFilter$ = [3, n0, _RRF,\n 0,\n [_P, _Ta, _An],\n [0, () => Tag$, [() => ReplicationRuleAndOperator$, 0]]\n];\nexport var ReplicationTime$ = [3, n0, _RT,\n 0,\n [_S, _Tim],\n [0, () => ReplicationTimeValue$], 2\n];\nexport var ReplicationTimeValue$ = [3, n0, _RTV,\n 0,\n [_Mi],\n [1]\n];\nexport var RequestPaymentConfiguration$ = [3, n0, _RPC,\n 0,\n [_Pay],\n [0], 1\n];\nexport var RequestProgress$ = [3, n0, _RPe,\n 0,\n [_Ena],\n [2]\n];\nexport var RestoreObjectOutput$ = [3, n0, _ROOe,\n 0,\n [_RC, _ROP],\n [[0, { [_hH]: _xarc }], [0, { [_hH]: _xarop }]]\n];\nexport var RestoreObjectRequest$ = [3, n0, _RORe,\n 0,\n [_B, _K, _VI, _RRes, _RP, _CA, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [() => RestoreRequest$, { [_hP]: 1, [_xN]: _RRes }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var RestoreRequest$ = [3, n0, _RRes,\n 0,\n [_D, _GJP, _Ty, _Ti, _Desc, _SP, _OL],\n [1, () => GlacierJobParameters$, 0, 0, 0, () => SelectParameters$, [() => OutputLocation$, 0]]\n];\nexport var RestoreStatus$ = [3, n0, _RSe,\n 0,\n [_IRIP, _RED],\n [2, 4]\n];\nexport var RoutingRule$ = [3, n0, _RRo,\n 0,\n [_Red, _Co],\n [() => Redirect$, () => Condition$], 1\n];\nexport var S3KeyFilter$ = [3, n0, _SKF,\n 0,\n [_FRi],\n [[() => FilterRuleList, { [_xF]: 1, [_xN]: _FR }]]\n];\nexport var S3Location$ = [3, n0, _SL,\n 0,\n [_BNu, _P, _En, _CACL, _ACL, _Tag, _UM, _SC],\n [0, 0, [() => Encryption$, 0], 0, [() => Grants, 0], [() => Tagging$, 0], [() => UserMetadata, 0], 0], 2\n];\nexport var S3TablesDestination$ = [3, n0, _STD,\n 0,\n [_TBA, _TNa],\n [0, 0], 2\n];\nexport var S3TablesDestinationResult$ = [3, n0, _STDR,\n 0,\n [_TBA, _TNa, _TA, _TN],\n [0, 0, 0, 0], 4\n];\nexport var ScanRange$ = [3, n0, _SR,\n 0,\n [_St, _End],\n [1, 1]\n];\nexport var SelectObjectContentOutput$ = [3, n0, _SOCO,\n 0,\n [_Payl],\n [[() => SelectObjectContentEventStream$, 16]]\n];\nexport var SelectObjectContentRequest$ = [3, n0, _SOCR,\n 0,\n [_B, _K, _Exp, _ETx, _IS, _OSu, _SSECA, _SSECK, _SSECKMD, _RPe, _SR, _EBO],\n [[0, 1], [0, 1], 0, 0, () => InputSerialization$, () => OutputSerialization$, [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], () => RequestProgress$, () => ScanRange$, [0, { [_hH]: _xaebo }]], 6\n];\nexport var SelectParameters$ = [3, n0, _SP,\n 0,\n [_IS, _ETx, _Exp, _OSu],\n [() => InputSerialization$, 0, 0, () => OutputSerialization$], 4\n];\nexport var ServerSideEncryptionByDefault$ = [3, n0, _SSEBD,\n 0,\n [_SSEA, _KMSMKID],\n [0, [() => SSEKMSKeyId, 0]], 1\n];\nexport var ServerSideEncryptionConfiguration$ = [3, n0, _SSEC,\n 0,\n [_R],\n [[() => ServerSideEncryptionRules, { [_xF]: 1, [_xN]: _Ru }]], 1\n];\nexport var ServerSideEncryptionRule$ = [3, n0, _SSER,\n 0,\n [_ASSEBD, _BKE, _BET],\n [[() => ServerSideEncryptionByDefault$, 0], 2, [() => BlockedEncryptionTypes$, 0]]\n];\nexport var SessionCredentials$ = [3, n0, _SCe,\n 0,\n [_AKI, _SAK, _ST, _E],\n [[0, { [_xN]: _AKI }], [() => SessionCredentialValue, { [_xN]: _SAK }], [() => SessionCredentialValue, { [_xN]: _ST }], [4, { [_xN]: _E }]], 4\n];\nexport var SimplePrefix$ = [3, n0, _SPi,\n { [_xN]: _SPi },\n [],\n []\n];\nexport var SourceSelectionCriteria$ = [3, n0, _SSC,\n 0,\n [_SKEO, _RM],\n [() => SseKmsEncryptedObjects$, () => ReplicaModifications$]\n];\nexport var SSEKMS$ = [3, n0, _SSEKMS,\n { [_xN]: _SK },\n [_KI],\n [[() => SSEKMSKeyId, 0]], 1\n];\nexport var SseKmsEncryptedObjects$ = [3, n0, _SKEO,\n 0,\n [_S],\n [0], 1\n];\nexport var SSEKMSEncryption$ = [3, n0, _SSEKMSE,\n { [_xN]: _SK },\n [_KMSKA, _BKE],\n [[() => NonEmptyKmsKeyArnString, 0], 2], 1\n];\nexport var SSES3$ = [3, n0, _SSES,\n { [_xN]: _SS },\n [],\n []\n];\nexport var Stats$ = [3, n0, _Sta,\n 0,\n [_BS, _BP, _BRy],\n [1, 1, 1]\n];\nexport var StatsEvent$ = [3, n0, _SE,\n 0,\n [_Det],\n [[() => Stats$, { [_eP]: 1 }]]\n];\nexport var StorageClassAnalysis$ = [3, n0, _SCA,\n 0,\n [_DE],\n [() => StorageClassAnalysisDataExport$]\n];\nexport var StorageClassAnalysisDataExport$ = [3, n0, _SCADE,\n 0,\n [_OSV, _Des],\n [0, () => AnalyticsExportDestination$], 2\n];\nexport var Tag$ = [3, n0, _Ta,\n 0,\n [_K, _V],\n [0, 0], 2\n];\nexport var Tagging$ = [3, n0, _Tag,\n 0,\n [_TS],\n [[() => TagSet, 0]], 1\n];\nexport var TargetGrant$ = [3, n0, _TGa,\n 0,\n [_Gra, _Pe],\n [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0]\n];\nexport var TargetObjectKeyFormat$ = [3, n0, _TOKF,\n 0,\n [_SPi, _PP],\n [[() => SimplePrefix$, { [_xN]: _SPi }], [() => PartitionedPrefix$, { [_xN]: _PP }]]\n];\nexport var Tiering$ = [3, n0, _Tier,\n 0,\n [_D, _AT],\n [1, 0], 2\n];\nexport var TopicConfiguration$ = [3, n0, _TCop,\n 0,\n [_TAo, _Ev, _I, _F],\n [[0, { [_xN]: _Top }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], 2\n];\nexport var Transition$ = [3, n0, _Tra,\n 0,\n [_Da, _D, _SC],\n [5, 1, 0]\n];\nexport var UpdateBucketMetadataInventoryTableConfigurationRequest$ = [3, n0, _UBMITCR,\n 0,\n [_B, _ITCn, _CMD, _CA, _EBO],\n [[0, 1], [() => InventoryTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _ITCn }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var UpdateBucketMetadataJournalTableConfigurationRequest$ = [3, n0, _UBMJTCR,\n 0,\n [_B, _JTC, _CMD, _CA, _EBO],\n [[0, 1], [() => JournalTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _JTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var UpdateObjectEncryptionRequest$ = [3, n0, _UOER,\n 0,\n [_B, _K, _OE, _VI, _RP, _EBO, _CMD, _CA],\n [[0, 1], [0, 1], [() => ObjectEncryption$, 16], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }]], 3\n];\nexport var UpdateObjectEncryptionResponse$ = [3, n0, _UOERp,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var UploadPartCopyOutput$ = [3, n0, _UPCO,\n 0,\n [_CSVI, _CPR, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC],\n [[0, { [_hH]: _xacsvi }], [() => CopyPartResult$, 16], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]]\n];\nexport var UploadPartCopyRequest$ = [3, n0, _UPCR,\n 0,\n [_B, _CS, _K, _PN, _UI, _CSIM, _CSIMS, _CSINM, _CSIUS, _CSRo, _SSECA, _SSECK, _SSECKMD, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _EBO, _ESBO],\n [[0, 1], [0, { [_hH]: _xacs__ }], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [0, { [_hH]: _xacsr }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], 5\n];\nexport var UploadPartOutput$ = [3, n0, _UPO,\n 0,\n [_SSE, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC],\n [[0, { [_hH]: _xasse }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]]\n];\nexport var UploadPartRequest$ = [3, n0, _UPR,\n 0,\n [_B, _K, _PN, _UI, _Bo, _CLo, _CMD, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _SSECA, _SSECK, _SSECKMD, _RP, _EBO],\n [[0, 1], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [() => StreamingBlob, 16], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 4\n];\nexport var VersioningConfiguration$ = [3, n0, _VC,\n 0,\n [_MFAD, _S],\n [[0, { [_xN]: _MDf }], 0]\n];\nexport var WebsiteConfiguration$ = [3, n0, _WC,\n 0,\n [_EDr, _IDn, _RART, _RR],\n [() => ErrorDocument$, () => IndexDocument$, () => RedirectAllRequestsTo$, [() => RoutingRules, 0]]\n];\nexport var WriteGetObjectResponseRequest$ = [3, n0, _WGORR,\n 0,\n [_RReq, _RTe, _Bo, _SCt, _ECr, _EM, _AR, _CC, _CDo, _CEo, _CL, _CLo, _CR, _CTo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _DM, _ETa, _Ex, _E, _LM, _MM, _M, _OLM, _OLLHS, _OLRUD, _PC, _RS, _RC, _Re, _SSE, _SSECA, _SSEKMSKI, _SSECKMD, _SC, _TC, _VI, _BKE],\n [[0, { [_hL]: 1, [_hH]: _xarr }], [0, { [_hH]: _xart }], [() => StreamingBlob, 16], [1, { [_hH]: _xafs }], [0, { [_hH]: _xafec }], [0, { [_hH]: _xafem }], [0, { [_hH]: _xafhar }], [0, { [_hH]: _xafhCC }], [0, { [_hH]: _xafhCD }], [0, { [_hH]: _xafhCE }], [0, { [_hH]: _xafhCL }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xafhCR }], [0, { [_hH]: _xafhCT }], [0, { [_hH]: _xafhxacc }], [0, { [_hH]: _xafhxacc_ }], [0, { [_hH]: _xafhxacc__ }], [0, { [_hH]: _xafhxacs }], [0, { [_hH]: _xafhxacs_ }], [2, { [_hH]: _xafhxadm }], [0, { [_hH]: _xafhE }], [4, { [_hH]: _xafhE_ }], [0, { [_hH]: _xafhxae }], [4, { [_hH]: _xafhLM }], [1, { [_hH]: _xafhxamm }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xafhxaolm }], [0, { [_hH]: _xafhxaollh }], [5, { [_hH]: _xafhxaolrud }], [1, { [_hH]: _xafhxampc }], [0, { [_hH]: _xafhxars }], [0, { [_hH]: _xafhxarc }], [0, { [_hH]: _xafhxar }], [0, { [_hH]: _xafhxasse }], [0, { [_hH]: _xafhxasseca }], [() => SSEKMSKeyId, { [_hH]: _xafhxasseakki }], [0, { [_hH]: _xafhxasseckM }], [0, { [_hH]: _xafhxasc }], [1, { [_hH]: _xafhxatc }], [0, { [_hH]: _xafhxavi }], [2, { [_hH]: _xafhxassebke }]], 2\n];\nvar __Unit = \"unit\";\nvar AllowedHeaders = 64 | 0;\nvar AllowedMethods = 64 | 0;\nvar AllowedOrigins = 64 | 0;\nvar AnalyticsConfigurationList = [1, n0, _ACLn,\n 0, [() => AnalyticsConfiguration$,\n 0]\n];\nvar Buckets = [1, n0, _Bu,\n 0, [() => Bucket$,\n { [_xN]: _B }]\n];\nvar ChecksumAlgorithmList = 64 | 0;\nvar CommonPrefixList = [1, n0, _CPL,\n 0, () => CommonPrefix$\n];\nvar CompletedPartList = [1, n0, _CPLo,\n 0, () => CompletedPart$\n];\nvar CORSRules = [1, n0, _CORSR,\n 0, [() => CORSRule$,\n 0]\n];\nvar DeletedObjects = [1, n0, _DOe,\n 0, () => DeletedObject$\n];\nvar DeleteMarkers = [1, n0, _DMe,\n 0, () => DeleteMarkerEntry$\n];\nvar EncryptionTypeList = [1, n0, _ETL,\n 0, [0,\n { [_xN]: _ET }]\n];\nvar Errors = [1, n0, _Er,\n 0, () => _Error$\n];\nvar EventList = 64 | 0;\nvar ExposeHeaders = 64 | 0;\nvar FilterRuleList = [1, n0, _FRL,\n 0, () => FilterRule$\n];\nvar Grants = [1, n0, _G,\n 0, [() => Grant$,\n { [_xN]: _Gr }]\n];\nvar IntelligentTieringConfigurationList = [1, n0, _ITCL,\n 0, [() => IntelligentTieringConfiguration$,\n 0]\n];\nvar InventoryConfigurationList = [1, n0, _ICL,\n 0, [() => InventoryConfiguration$,\n 0]\n];\nvar InventoryOptionalFields = [1, n0, _IOF,\n 0, [0,\n { [_xN]: _Fi }]\n];\nvar LambdaFunctionConfigurationList = [1, n0, _LFCL,\n 0, [() => LambdaFunctionConfiguration$,\n 0]\n];\nvar LifecycleRules = [1, n0, _LRi,\n 0, [() => LifecycleRule$,\n 0]\n];\nvar MetricsConfigurationList = [1, n0, _MCL,\n 0, [() => MetricsConfiguration$,\n 0]\n];\nvar MultipartUploadList = [1, n0, _MUL,\n 0, () => MultipartUpload$\n];\nvar NoncurrentVersionTransitionList = [1, n0, _NVTL,\n 0, () => NoncurrentVersionTransition$\n];\nvar ObjectAttributesList = 64 | 0;\nvar ObjectIdentifierList = [1, n0, _OIL,\n 0, () => ObjectIdentifier$\n];\nvar ObjectList = [1, n0, _OLb,\n 0, [() => _Object$,\n 0]\n];\nvar ObjectVersionList = [1, n0, _OVL,\n 0, [() => ObjectVersion$,\n 0]\n];\nvar OptionalObjectAttributesList = 64 | 0;\nvar OwnershipControlsRules = [1, n0, _OCRw,\n 0, () => OwnershipControlsRule$\n];\nvar Parts = [1, n0, _Pa,\n 0, () => Part$\n];\nvar PartsList = [1, n0, _PL,\n 0, () => ObjectPart$\n];\nvar QueueConfigurationList = [1, n0, _QCL,\n 0, [() => QueueConfiguration$,\n 0]\n];\nvar ReplicationRules = [1, n0, _RRep,\n 0, [() => ReplicationRule$,\n 0]\n];\nvar RoutingRules = [1, n0, _RR,\n 0, [() => RoutingRule$,\n { [_xN]: _RRo }]\n];\nvar ServerSideEncryptionRules = [1, n0, _SSERe,\n 0, [() => ServerSideEncryptionRule$,\n 0]\n];\nvar TagSet = [1, n0, _TS,\n 0, [() => Tag$,\n { [_xN]: _Ta }]\n];\nvar TargetGrants = [1, n0, _TG,\n 0, [() => TargetGrant$,\n { [_xN]: _Gr }]\n];\nvar TieringList = [1, n0, _TL,\n 0, () => Tiering$\n];\nvar TopicConfigurationList = [1, n0, _TCL,\n 0, [() => TopicConfiguration$,\n 0]\n];\nvar TransitionList = [1, n0, _TLr,\n 0, () => Transition$\n];\nvar UserMetadata = [1, n0, _UM,\n 0, [() => MetadataEntry$,\n { [_xN]: _ME }]\n];\nvar Metadata = 128 | 0;\nexport var AnalyticsFilter$ = [4, n0, _AF,\n 0,\n [_P, _Ta, _An],\n [0, () => Tag$, [() => AnalyticsAndOperator$, 0]]\n];\nexport var MetricsFilter$ = [4, n0, _MF,\n 0,\n [_P, _Ta, _APAc, _An],\n [0, () => Tag$, 0, [() => MetricsAndOperator$, 0]]\n];\nexport var ObjectEncryption$ = [4, n0, _OE,\n 0,\n [_SSEKMS],\n [[() => SSEKMSEncryption$, { [_xN]: _SK }]]\n];\nexport var SelectObjectContentEventStream$ = [4, n0, _SOCES,\n { [_st]: 1 },\n [_Rec, _Sta, _Pr, _Cont, _End],\n [[() => RecordsEvent$, 0], [() => StatsEvent$, 0], [() => ProgressEvent$, 0], () => ContinuationEvent$, () => EndEvent$]\n];\nexport var AbortMultipartUpload$ = [9, n0, _AMU,\n { [_h]: [\"DELETE\", \"/{Key+}?x-id=AbortMultipartUpload\", 204] }, () => AbortMultipartUploadRequest$, () => AbortMultipartUploadOutput$\n];\nexport var CompleteMultipartUpload$ = [9, n0, _CMUo,\n { [_h]: [\"POST\", \"/{Key+}\", 200] }, () => CompleteMultipartUploadRequest$, () => CompleteMultipartUploadOutput$\n];\nexport var CopyObject$ = [9, n0, _CO,\n { [_h]: [\"PUT\", \"/{Key+}?x-id=CopyObject\", 200] }, () => CopyObjectRequest$, () => CopyObjectOutput$\n];\nexport var CreateBucket$ = [9, n0, _CB,\n { [_h]: [\"PUT\", \"/\", 200] }, () => CreateBucketRequest$, () => CreateBucketOutput$\n];\nexport var CreateBucketMetadataConfiguration$ = [9, n0, _CBMC,\n { [_hC]: \"-\", [_h]: [\"POST\", \"/?metadataConfiguration\", 200] }, () => CreateBucketMetadataConfigurationRequest$, () => __Unit\n];\nexport var CreateBucketMetadataTableConfiguration$ = [9, n0, _CBMTC,\n { [_hC]: \"-\", [_h]: [\"POST\", \"/?metadataTable\", 200] }, () => CreateBucketMetadataTableConfigurationRequest$, () => __Unit\n];\nexport var CreateMultipartUpload$ = [9, n0, _CMUr,\n { [_h]: [\"POST\", \"/{Key+}?uploads\", 200] }, () => CreateMultipartUploadRequest$, () => CreateMultipartUploadOutput$\n];\nexport var CreateSession$ = [9, n0, _CSr,\n { [_h]: [\"GET\", \"/?session\", 200] }, () => CreateSessionRequest$, () => CreateSessionOutput$\n];\nexport var DeleteBucket$ = [9, n0, _DB,\n { [_h]: [\"DELETE\", \"/\", 204] }, () => DeleteBucketRequest$, () => __Unit\n];\nexport var DeleteBucketAnalyticsConfiguration$ = [9, n0, _DBAC,\n { [_h]: [\"DELETE\", \"/?analytics\", 204] }, () => DeleteBucketAnalyticsConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketCors$ = [9, n0, _DBC,\n { [_h]: [\"DELETE\", \"/?cors\", 204] }, () => DeleteBucketCorsRequest$, () => __Unit\n];\nexport var DeleteBucketEncryption$ = [9, n0, _DBE,\n { [_h]: [\"DELETE\", \"/?encryption\", 204] }, () => DeleteBucketEncryptionRequest$, () => __Unit\n];\nexport var DeleteBucketIntelligentTieringConfiguration$ = [9, n0, _DBITC,\n { [_h]: [\"DELETE\", \"/?intelligent-tiering\", 204] }, () => DeleteBucketIntelligentTieringConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketInventoryConfiguration$ = [9, n0, _DBIC,\n { [_h]: [\"DELETE\", \"/?inventory\", 204] }, () => DeleteBucketInventoryConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketLifecycle$ = [9, n0, _DBL,\n { [_h]: [\"DELETE\", \"/?lifecycle\", 204] }, () => DeleteBucketLifecycleRequest$, () => __Unit\n];\nexport var DeleteBucketMetadataConfiguration$ = [9, n0, _DBMC,\n { [_h]: [\"DELETE\", \"/?metadataConfiguration\", 204] }, () => DeleteBucketMetadataConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketMetadataTableConfiguration$ = [9, n0, _DBMTC,\n { [_h]: [\"DELETE\", \"/?metadataTable\", 204] }, () => DeleteBucketMetadataTableConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketMetricsConfiguration$ = [9, n0, _DBMCe,\n { [_h]: [\"DELETE\", \"/?metrics\", 204] }, () => DeleteBucketMetricsConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketOwnershipControls$ = [9, n0, _DBOC,\n { [_h]: [\"DELETE\", \"/?ownershipControls\", 204] }, () => DeleteBucketOwnershipControlsRequest$, () => __Unit\n];\nexport var DeleteBucketPolicy$ = [9, n0, _DBP,\n { [_h]: [\"DELETE\", \"/?policy\", 204] }, () => DeleteBucketPolicyRequest$, () => __Unit\n];\nexport var DeleteBucketReplication$ = [9, n0, _DBRe,\n { [_h]: [\"DELETE\", \"/?replication\", 204] }, () => DeleteBucketReplicationRequest$, () => __Unit\n];\nexport var DeleteBucketTagging$ = [9, n0, _DBT,\n { [_h]: [\"DELETE\", \"/?tagging\", 204] }, () => DeleteBucketTaggingRequest$, () => __Unit\n];\nexport var DeleteBucketWebsite$ = [9, n0, _DBW,\n { [_h]: [\"DELETE\", \"/?website\", 204] }, () => DeleteBucketWebsiteRequest$, () => __Unit\n];\nexport var DeleteObject$ = [9, n0, _DOel,\n { [_h]: [\"DELETE\", \"/{Key+}?x-id=DeleteObject\", 204] }, () => DeleteObjectRequest$, () => DeleteObjectOutput$\n];\nexport var DeleteObjects$ = [9, n0, _DOele,\n { [_hC]: \"-\", [_h]: [\"POST\", \"/?delete\", 200] }, () => DeleteObjectsRequest$, () => DeleteObjectsOutput$\n];\nexport var DeleteObjectTagging$ = [9, n0, _DOT,\n { [_h]: [\"DELETE\", \"/{Key+}?tagging\", 204] }, () => DeleteObjectTaggingRequest$, () => DeleteObjectTaggingOutput$\n];\nexport var DeletePublicAccessBlock$ = [9, n0, _DPAB,\n { [_h]: [\"DELETE\", \"/?publicAccessBlock\", 204] }, () => DeletePublicAccessBlockRequest$, () => __Unit\n];\nexport var GetBucketAbac$ = [9, n0, _GBA,\n { [_h]: [\"GET\", \"/?abac\", 200] }, () => GetBucketAbacRequest$, () => GetBucketAbacOutput$\n];\nexport var GetBucketAccelerateConfiguration$ = [9, n0, _GBAC,\n { [_h]: [\"GET\", \"/?accelerate\", 200] }, () => GetBucketAccelerateConfigurationRequest$, () => GetBucketAccelerateConfigurationOutput$\n];\nexport var GetBucketAcl$ = [9, n0, _GBAe,\n { [_h]: [\"GET\", \"/?acl\", 200] }, () => GetBucketAclRequest$, () => GetBucketAclOutput$\n];\nexport var GetBucketAnalyticsConfiguration$ = [9, n0, _GBACe,\n { [_h]: [\"GET\", \"/?analytics&x-id=GetBucketAnalyticsConfiguration\", 200] }, () => GetBucketAnalyticsConfigurationRequest$, () => GetBucketAnalyticsConfigurationOutput$\n];\nexport var GetBucketCors$ = [9, n0, _GBC,\n { [_h]: [\"GET\", \"/?cors\", 200] }, () => GetBucketCorsRequest$, () => GetBucketCorsOutput$\n];\nexport var GetBucketEncryption$ = [9, n0, _GBE,\n { [_h]: [\"GET\", \"/?encryption\", 200] }, () => GetBucketEncryptionRequest$, () => GetBucketEncryptionOutput$\n];\nexport var GetBucketIntelligentTieringConfiguration$ = [9, n0, _GBITC,\n { [_h]: [\"GET\", \"/?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration\", 200] }, () => GetBucketIntelligentTieringConfigurationRequest$, () => GetBucketIntelligentTieringConfigurationOutput$\n];\nexport var GetBucketInventoryConfiguration$ = [9, n0, _GBIC,\n { [_h]: [\"GET\", \"/?inventory&x-id=GetBucketInventoryConfiguration\", 200] }, () => GetBucketInventoryConfigurationRequest$, () => GetBucketInventoryConfigurationOutput$\n];\nexport var GetBucketLifecycleConfiguration$ = [9, n0, _GBLC,\n { [_h]: [\"GET\", \"/?lifecycle\", 200] }, () => GetBucketLifecycleConfigurationRequest$, () => GetBucketLifecycleConfigurationOutput$\n];\nexport var GetBucketLocation$ = [9, n0, _GBL,\n { [_h]: [\"GET\", \"/?location\", 200] }, () => GetBucketLocationRequest$, () => GetBucketLocationOutput$\n];\nexport var GetBucketLogging$ = [9, n0, _GBLe,\n { [_h]: [\"GET\", \"/?logging\", 200] }, () => GetBucketLoggingRequest$, () => GetBucketLoggingOutput$\n];\nexport var GetBucketMetadataConfiguration$ = [9, n0, _GBMC,\n { [_h]: [\"GET\", \"/?metadataConfiguration\", 200] }, () => GetBucketMetadataConfigurationRequest$, () => GetBucketMetadataConfigurationOutput$\n];\nexport var GetBucketMetadataTableConfiguration$ = [9, n0, _GBMTC,\n { [_h]: [\"GET\", \"/?metadataTable\", 200] }, () => GetBucketMetadataTableConfigurationRequest$, () => GetBucketMetadataTableConfigurationOutput$\n];\nexport var GetBucketMetricsConfiguration$ = [9, n0, _GBMCe,\n { [_h]: [\"GET\", \"/?metrics&x-id=GetBucketMetricsConfiguration\", 200] }, () => GetBucketMetricsConfigurationRequest$, () => GetBucketMetricsConfigurationOutput$\n];\nexport var GetBucketNotificationConfiguration$ = [9, n0, _GBNC,\n { [_h]: [\"GET\", \"/?notification\", 200] }, () => GetBucketNotificationConfigurationRequest$, () => NotificationConfiguration$\n];\nexport var GetBucketOwnershipControls$ = [9, n0, _GBOC,\n { [_h]: [\"GET\", \"/?ownershipControls\", 200] }, () => GetBucketOwnershipControlsRequest$, () => GetBucketOwnershipControlsOutput$\n];\nexport var GetBucketPolicy$ = [9, n0, _GBP,\n { [_h]: [\"GET\", \"/?policy\", 200] }, () => GetBucketPolicyRequest$, () => GetBucketPolicyOutput$\n];\nexport var GetBucketPolicyStatus$ = [9, n0, _GBPS,\n { [_h]: [\"GET\", \"/?policyStatus\", 200] }, () => GetBucketPolicyStatusRequest$, () => GetBucketPolicyStatusOutput$\n];\nexport var GetBucketReplication$ = [9, n0, _GBR,\n { [_h]: [\"GET\", \"/?replication\", 200] }, () => GetBucketReplicationRequest$, () => GetBucketReplicationOutput$\n];\nexport var GetBucketRequestPayment$ = [9, n0, _GBRP,\n { [_h]: [\"GET\", \"/?requestPayment\", 200] }, () => GetBucketRequestPaymentRequest$, () => GetBucketRequestPaymentOutput$\n];\nexport var GetBucketTagging$ = [9, n0, _GBT,\n { [_h]: [\"GET\", \"/?tagging\", 200] }, () => GetBucketTaggingRequest$, () => GetBucketTaggingOutput$\n];\nexport var GetBucketVersioning$ = [9, n0, _GBV,\n { [_h]: [\"GET\", \"/?versioning\", 200] }, () => GetBucketVersioningRequest$, () => GetBucketVersioningOutput$\n];\nexport var GetBucketWebsite$ = [9, n0, _GBW,\n { [_h]: [\"GET\", \"/?website\", 200] }, () => GetBucketWebsiteRequest$, () => GetBucketWebsiteOutput$\n];\nexport var GetObject$ = [9, n0, _GO,\n { [_hC]: \"-\", [_h]: [\"GET\", \"/{Key+}?x-id=GetObject\", 200] }, () => GetObjectRequest$, () => GetObjectOutput$\n];\nexport var GetObjectAcl$ = [9, n0, _GOA,\n { [_h]: [\"GET\", \"/{Key+}?acl\", 200] }, () => GetObjectAclRequest$, () => GetObjectAclOutput$\n];\nexport var GetObjectAttributes$ = [9, n0, _GOAe,\n { [_h]: [\"GET\", \"/{Key+}?attributes\", 200] }, () => GetObjectAttributesRequest$, () => GetObjectAttributesOutput$\n];\nexport var GetObjectLegalHold$ = [9, n0, _GOLH,\n { [_h]: [\"GET\", \"/{Key+}?legal-hold\", 200] }, () => GetObjectLegalHoldRequest$, () => GetObjectLegalHoldOutput$\n];\nexport var GetObjectLockConfiguration$ = [9, n0, _GOLC,\n { [_h]: [\"GET\", \"/?object-lock\", 200] }, () => GetObjectLockConfigurationRequest$, () => GetObjectLockConfigurationOutput$\n];\nexport var GetObjectRetention$ = [9, n0, _GORe,\n { [_h]: [\"GET\", \"/{Key+}?retention\", 200] }, () => GetObjectRetentionRequest$, () => GetObjectRetentionOutput$\n];\nexport var GetObjectTagging$ = [9, n0, _GOT,\n { [_h]: [\"GET\", \"/{Key+}?tagging\", 200] }, () => GetObjectTaggingRequest$, () => GetObjectTaggingOutput$\n];\nexport var GetObjectTorrent$ = [9, n0, _GOTe,\n { [_h]: [\"GET\", \"/{Key+}?torrent\", 200] }, () => GetObjectTorrentRequest$, () => GetObjectTorrentOutput$\n];\nexport var GetPublicAccessBlock$ = [9, n0, _GPAB,\n { [_h]: [\"GET\", \"/?publicAccessBlock\", 200] }, () => GetPublicAccessBlockRequest$, () => GetPublicAccessBlockOutput$\n];\nexport var HeadBucket$ = [9, n0, _HB,\n { [_h]: [\"HEAD\", \"/\", 200] }, () => HeadBucketRequest$, () => HeadBucketOutput$\n];\nexport var HeadObject$ = [9, n0, _HO,\n { [_h]: [\"HEAD\", \"/{Key+}\", 200] }, () => HeadObjectRequest$, () => HeadObjectOutput$\n];\nexport var ListBucketAnalyticsConfigurations$ = [9, n0, _LBAC,\n { [_h]: [\"GET\", \"/?analytics&x-id=ListBucketAnalyticsConfigurations\", 200] }, () => ListBucketAnalyticsConfigurationsRequest$, () => ListBucketAnalyticsConfigurationsOutput$\n];\nexport var ListBucketIntelligentTieringConfigurations$ = [9, n0, _LBITC,\n { [_h]: [\"GET\", \"/?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations\", 200] }, () => ListBucketIntelligentTieringConfigurationsRequest$, () => ListBucketIntelligentTieringConfigurationsOutput$\n];\nexport var ListBucketInventoryConfigurations$ = [9, n0, _LBIC,\n { [_h]: [\"GET\", \"/?inventory&x-id=ListBucketInventoryConfigurations\", 200] }, () => ListBucketInventoryConfigurationsRequest$, () => ListBucketInventoryConfigurationsOutput$\n];\nexport var ListBucketMetricsConfigurations$ = [9, n0, _LBMC,\n { [_h]: [\"GET\", \"/?metrics&x-id=ListBucketMetricsConfigurations\", 200] }, () => ListBucketMetricsConfigurationsRequest$, () => ListBucketMetricsConfigurationsOutput$\n];\nexport var ListBuckets$ = [9, n0, _LB,\n { [_h]: [\"GET\", \"/?x-id=ListBuckets\", 200] }, () => ListBucketsRequest$, () => ListBucketsOutput$\n];\nexport var ListDirectoryBuckets$ = [9, n0, _LDB,\n { [_h]: [\"GET\", \"/?x-id=ListDirectoryBuckets\", 200] }, () => ListDirectoryBucketsRequest$, () => ListDirectoryBucketsOutput$\n];\nexport var ListMultipartUploads$ = [9, n0, _LMU,\n { [_h]: [\"GET\", \"/?uploads\", 200] }, () => ListMultipartUploadsRequest$, () => ListMultipartUploadsOutput$\n];\nexport var ListObjects$ = [9, n0, _LO,\n { [_h]: [\"GET\", \"/\", 200] }, () => ListObjectsRequest$, () => ListObjectsOutput$\n];\nexport var ListObjectsV2$ = [9, n0, _LOV,\n { [_h]: [\"GET\", \"/?list-type=2\", 200] }, () => ListObjectsV2Request$, () => ListObjectsV2Output$\n];\nexport var ListObjectVersions$ = [9, n0, _LOVi,\n { [_h]: [\"GET\", \"/?versions\", 200] }, () => ListObjectVersionsRequest$, () => ListObjectVersionsOutput$\n];\nexport var ListParts$ = [9, n0, _LP,\n { [_h]: [\"GET\", \"/{Key+}?x-id=ListParts\", 200] }, () => ListPartsRequest$, () => ListPartsOutput$\n];\nexport var PutBucketAbac$ = [9, n0, _PBA,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?abac\", 200] }, () => PutBucketAbacRequest$, () => __Unit\n];\nexport var PutBucketAccelerateConfiguration$ = [9, n0, _PBAC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?accelerate\", 200] }, () => PutBucketAccelerateConfigurationRequest$, () => __Unit\n];\nexport var PutBucketAcl$ = [9, n0, _PBAu,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?acl\", 200] }, () => PutBucketAclRequest$, () => __Unit\n];\nexport var PutBucketAnalyticsConfiguration$ = [9, n0, _PBACu,\n { [_h]: [\"PUT\", \"/?analytics\", 200] }, () => PutBucketAnalyticsConfigurationRequest$, () => __Unit\n];\nexport var PutBucketCors$ = [9, n0, _PBC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?cors\", 200] }, () => PutBucketCorsRequest$, () => __Unit\n];\nexport var PutBucketEncryption$ = [9, n0, _PBE,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?encryption\", 200] }, () => PutBucketEncryptionRequest$, () => __Unit\n];\nexport var PutBucketIntelligentTieringConfiguration$ = [9, n0, _PBITC,\n { [_h]: [\"PUT\", \"/?intelligent-tiering\", 200] }, () => PutBucketIntelligentTieringConfigurationRequest$, () => __Unit\n];\nexport var PutBucketInventoryConfiguration$ = [9, n0, _PBIC,\n { [_h]: [\"PUT\", \"/?inventory\", 200] }, () => PutBucketInventoryConfigurationRequest$, () => __Unit\n];\nexport var PutBucketLifecycleConfiguration$ = [9, n0, _PBLC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?lifecycle\", 200] }, () => PutBucketLifecycleConfigurationRequest$, () => PutBucketLifecycleConfigurationOutput$\n];\nexport var PutBucketLogging$ = [9, n0, _PBL,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?logging\", 200] }, () => PutBucketLoggingRequest$, () => __Unit\n];\nexport var PutBucketMetricsConfiguration$ = [9, n0, _PBMC,\n { [_h]: [\"PUT\", \"/?metrics\", 200] }, () => PutBucketMetricsConfigurationRequest$, () => __Unit\n];\nexport var PutBucketNotificationConfiguration$ = [9, n0, _PBNC,\n { [_h]: [\"PUT\", \"/?notification\", 200] }, () => PutBucketNotificationConfigurationRequest$, () => __Unit\n];\nexport var PutBucketOwnershipControls$ = [9, n0, _PBOC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?ownershipControls\", 200] }, () => PutBucketOwnershipControlsRequest$, () => __Unit\n];\nexport var PutBucketPolicy$ = [9, n0, _PBP,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?policy\", 200] }, () => PutBucketPolicyRequest$, () => __Unit\n];\nexport var PutBucketReplication$ = [9, n0, _PBR,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?replication\", 200] }, () => PutBucketReplicationRequest$, () => __Unit\n];\nexport var PutBucketRequestPayment$ = [9, n0, _PBRP,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?requestPayment\", 200] }, () => PutBucketRequestPaymentRequest$, () => __Unit\n];\nexport var PutBucketTagging$ = [9, n0, _PBT,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?tagging\", 200] }, () => PutBucketTaggingRequest$, () => __Unit\n];\nexport var PutBucketVersioning$ = [9, n0, _PBV,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?versioning\", 200] }, () => PutBucketVersioningRequest$, () => __Unit\n];\nexport var PutBucketWebsite$ = [9, n0, _PBW,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?website\", 200] }, () => PutBucketWebsiteRequest$, () => __Unit\n];\nexport var PutObject$ = [9, n0, _PO,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?x-id=PutObject\", 200] }, () => PutObjectRequest$, () => PutObjectOutput$\n];\nexport var PutObjectAcl$ = [9, n0, _POA,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?acl\", 200] }, () => PutObjectAclRequest$, () => PutObjectAclOutput$\n];\nexport var PutObjectLegalHold$ = [9, n0, _POLH,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?legal-hold\", 200] }, () => PutObjectLegalHoldRequest$, () => PutObjectLegalHoldOutput$\n];\nexport var PutObjectLockConfiguration$ = [9, n0, _POLC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?object-lock\", 200] }, () => PutObjectLockConfigurationRequest$, () => PutObjectLockConfigurationOutput$\n];\nexport var PutObjectRetention$ = [9, n0, _PORu,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?retention\", 200] }, () => PutObjectRetentionRequest$, () => PutObjectRetentionOutput$\n];\nexport var PutObjectTagging$ = [9, n0, _POT,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?tagging\", 200] }, () => PutObjectTaggingRequest$, () => PutObjectTaggingOutput$\n];\nexport var PutPublicAccessBlock$ = [9, n0, _PPAB,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?publicAccessBlock\", 200] }, () => PutPublicAccessBlockRequest$, () => __Unit\n];\nexport var RenameObject$ = [9, n0, _RO,\n { [_h]: [\"PUT\", \"/{Key+}?renameObject\", 200] }, () => RenameObjectRequest$, () => RenameObjectOutput$\n];\nexport var RestoreObject$ = [9, n0, _ROe,\n { [_hC]: \"-\", [_h]: [\"POST\", \"/{Key+}?restore\", 200] }, () => RestoreObjectRequest$, () => RestoreObjectOutput$\n];\nexport var SelectObjectContent$ = [9, n0, _SOC,\n { [_h]: [\"POST\", \"/{Key+}?select&select-type=2\", 200] }, () => SelectObjectContentRequest$, () => SelectObjectContentOutput$\n];\nexport var UpdateBucketMetadataInventoryTableConfiguration$ = [9, n0, _UBMITC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?metadataInventoryTable\", 200] }, () => UpdateBucketMetadataInventoryTableConfigurationRequest$, () => __Unit\n];\nexport var UpdateBucketMetadataJournalTableConfiguration$ = [9, n0, _UBMJTC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?metadataJournalTable\", 200] }, () => UpdateBucketMetadataJournalTableConfigurationRequest$, () => __Unit\n];\nexport var UpdateObjectEncryption$ = [9, n0, _UOE,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?encryption\", 200] }, () => UpdateObjectEncryptionRequest$, () => UpdateObjectEncryptionResponse$\n];\nexport var UploadPart$ = [9, n0, _UP,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?x-id=UploadPart\", 200] }, () => UploadPartRequest$, () => UploadPartOutput$\n];\nexport var UploadPartCopy$ = [9, n0, _UPC,\n { [_h]: [\"PUT\", \"/{Key+}?x-id=UploadPartCopy\", 200] }, () => UploadPartCopyRequest$, () => UploadPartCopyOutput$\n];\nexport var WriteGetObjectResponse$ = [9, n0, _WGOR,\n { [_en]: [\"{RequestRoute}.\"], [_h]: [\"POST\", \"/WriteGetObjectResponse\", 200] }, () => WriteGetObjectResponseRequest$, () => __Unit\n];\n", "import { S3ServiceException as __BaseException } from \"./S3ServiceException\";\nexport class NoSuchUpload extends __BaseException {\n name = \"NoSuchUpload\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NoSuchUpload\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NoSuchUpload.prototype);\n }\n}\nexport class AccessDenied extends __BaseException {\n name = \"AccessDenied\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"AccessDenied\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AccessDenied.prototype);\n }\n}\nexport class ObjectNotInActiveTierError extends __BaseException {\n name = \"ObjectNotInActiveTierError\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ObjectNotInActiveTierError\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ObjectNotInActiveTierError.prototype);\n }\n}\nexport class BucketAlreadyExists extends __BaseException {\n name = \"BucketAlreadyExists\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"BucketAlreadyExists\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, BucketAlreadyExists.prototype);\n }\n}\nexport class BucketAlreadyOwnedByYou extends __BaseException {\n name = \"BucketAlreadyOwnedByYou\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"BucketAlreadyOwnedByYou\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, BucketAlreadyOwnedByYou.prototype);\n }\n}\nexport class NoSuchBucket extends __BaseException {\n name = \"NoSuchBucket\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NoSuchBucket\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NoSuchBucket.prototype);\n }\n}\nexport class InvalidObjectState extends __BaseException {\n name = \"InvalidObjectState\";\n $fault = \"client\";\n StorageClass;\n AccessTier;\n constructor(opts) {\n super({\n name: \"InvalidObjectState\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidObjectState.prototype);\n this.StorageClass = opts.StorageClass;\n this.AccessTier = opts.AccessTier;\n }\n}\nexport class NoSuchKey extends __BaseException {\n name = \"NoSuchKey\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NoSuchKey\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NoSuchKey.prototype);\n }\n}\nexport class NotFound extends __BaseException {\n name = \"NotFound\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NotFound\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NotFound.prototype);\n }\n}\nexport class EncryptionTypeMismatch extends __BaseException {\n name = \"EncryptionTypeMismatch\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"EncryptionTypeMismatch\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, EncryptionTypeMismatch.prototype);\n }\n}\nexport class InvalidRequest extends __BaseException {\n name = \"InvalidRequest\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidRequest\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidRequest.prototype);\n }\n}\nexport class InvalidWriteOffset extends __BaseException {\n name = \"InvalidWriteOffset\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidWriteOffset\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidWriteOffset.prototype);\n }\n}\nexport class TooManyParts extends __BaseException {\n name = \"TooManyParts\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyParts\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyParts.prototype);\n }\n}\nexport class IdempotencyParameterMismatch extends __BaseException {\n name = \"IdempotencyParameterMismatch\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"IdempotencyParameterMismatch\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, IdempotencyParameterMismatch.prototype);\n }\n}\nexport class ObjectAlreadyInActiveTierError extends __BaseException {\n name = \"ObjectAlreadyInActiveTierError\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ObjectAlreadyInActiveTierError\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ObjectAlreadyInActiveTierError.prototype);\n }\n}\n", "import { ServiceException as __ServiceException, } from \"@smithy/smithy-client\";\nexport { __ServiceException };\nexport class S3ServiceException extends __ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, S3ServiceException.prototype);\n }\n}\n", "export function ssecMiddleware(options) {\n return (next) => async (args) => {\n const input = { ...args.input };\n const properties = [\n {\n target: \"SSECustomerKey\",\n hash: \"SSECustomerKeyMD5\",\n },\n {\n target: \"CopySourceSSECustomerKey\",\n hash: \"CopySourceSSECustomerKeyMD5\",\n },\n ];\n for (const prop of properties) {\n const value = input[prop.target];\n if (value) {\n let valueForHash;\n if (typeof value === \"string\") {\n if (isValidBase64EncodedSSECustomerKey(value, options)) {\n valueForHash = options.base64Decoder(value);\n }\n else {\n valueForHash = options.utf8Decoder(value);\n input[prop.target] = options.base64Encoder(valueForHash);\n }\n }\n else {\n valueForHash = ArrayBuffer.isView(value)\n ? new Uint8Array(value.buffer, value.byteOffset, value.byteLength)\n : new Uint8Array(value);\n input[prop.target] = options.base64Encoder(valueForHash);\n }\n const hash = new options.md5();\n hash.update(valueForHash);\n input[prop.hash] = options.base64Encoder(await hash.digest());\n }\n }\n return next({\n ...args,\n input,\n });\n };\n}\nexport const ssecMiddlewareOptions = {\n name: \"ssecMiddleware\",\n step: \"initialize\",\n tags: [\"SSE\"],\n override: true,\n};\nexport const getSsecPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.add(ssecMiddleware(config), ssecMiddlewareOptions);\n },\n});\nexport function isValidBase64EncodedSSECustomerKey(str, options) {\n const base64Regex = /^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;\n if (!base64Regex.test(str))\n return false;\n try {\n const decodedBytes = options.base64Decoder(str);\n return decodedBytes.length === 32;\n }\n catch {\n return false;\n }\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteObjects$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteObjectsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"DeleteObjects\", {})\n .n(\"S3Client\", \"DeleteObjectsCommand\")\n .sc(DeleteObjects$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getS3ExpiresMiddlewarePlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestChecksumRequired: false,\n requestValidationModeMember: 'ChecksumMode',\n 'responseAlgorithms': ['CRC64NVME', 'CRC32', 'CRC32C', 'SHA256', 'SHA1'],\n }),\n getSsecPlugin(config),\n getS3ExpiresMiddlewarePlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObject\", {})\n .n(\"S3Client\", \"GetObjectCommand\")\n .sc(GetObject$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getCheckContentLengthHeaderPlugin, getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: false,\n }),\n getCheckContentLengthHeaderPlugin(config),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObject\", {})\n .n(\"S3Client\", \"PutObjectCommand\")\n .sc(PutObject$)\n .build() {\n}\n", "import { formatUrl } from \"@aws-sdk/util-format-url\";\nimport { getEndpointFromInstructions } from \"@smithy/middleware-endpoint\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { S3RequestPresigner } from \"./presigner\";\nexport const getSignedUrl = async (client, command, options = {}) => {\n let s3Presigner;\n let region;\n if (typeof client.config.endpointProvider === \"function\") {\n const endpointV2 = await getEndpointFromInstructions(command.input, command.constructor, client.config);\n const authScheme = endpointV2.properties?.authSchemes?.[0];\n if (authScheme?.name === \"sigv4a\") {\n region = authScheme?.signingRegionSet?.join(\",\");\n }\n else {\n region = authScheme?.signingRegion;\n }\n s3Presigner = new S3RequestPresigner({\n ...client.config,\n signingName: authScheme?.signingName,\n region: async () => region,\n });\n }\n else {\n s3Presigner = new S3RequestPresigner(client.config);\n }\n const presignInterceptMiddleware = (next, context) => async (args) => {\n const { request } = args;\n if (!HttpRequest.isInstance(request)) {\n throw new Error(\"Request to be presigned is not an valid HTTP request.\");\n }\n delete request.headers[\"amz-sdk-invocation-id\"];\n delete request.headers[\"amz-sdk-request\"];\n delete request.headers[\"x-amz-user-agent\"];\n let presigned;\n const presignerOptions = {\n ...options,\n signingRegion: options.signingRegion ?? context[\"signing_region\"] ?? region,\n signingService: options.signingService ?? context[\"signing_service\"],\n };\n if (context.s3ExpressIdentity) {\n presigned = await s3Presigner.presignWithCredentials(request, context.s3ExpressIdentity, presignerOptions);\n }\n else {\n presigned = await s3Presigner.presign(request, presignerOptions);\n }\n return {\n response: {},\n output: {\n $metadata: { httpStatusCode: 200 },\n presigned,\n },\n };\n };\n const middlewareName = \"presignInterceptMiddleware\";\n const clientStack = client.middlewareStack.clone();\n clientStack.addRelativeTo(presignInterceptMiddleware, {\n name: middlewareName,\n relation: \"before\",\n toMiddleware: \"awsAuthMiddleware\",\n override: true,\n });\n const handler = command.resolveMiddleware(clientStack, client.config, {});\n const { output } = await handler({ input: command.input });\n const { presigned } = output;\n return formatUrl(presigned);\n};\n", "import { buildQueryString } from \"@smithy/querystring-builder\";\nexport function formatUrl(request) {\n const { port, query } = request;\n let { protocol, path, hostname } = request;\n if (protocol && protocol.slice(-1) !== \":\") {\n protocol += \":\";\n }\n if (port) {\n hostname += `:${port}`;\n }\n if (path && path.charAt(0) !== \"/\") {\n path = `/${path}`;\n }\n let queryString = query ? buildQueryString(query) : \"\";\n if (queryString && queryString[0] !== \"?\") {\n queryString = `?${queryString}`;\n }\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n let fragment = \"\";\n if (request.fragment) {\n fragment = `#${request.fragment}`;\n }\n return `${protocol}//${auth}${hostname}${path}${queryString}${fragment}`;\n}\n", "import { SignatureV4MultiRegion } from \"@aws-sdk/signature-v4-multi-region\";\nimport { SHA256_HEADER, UNSIGNED_PAYLOAD } from \"./constants\";\nexport class S3RequestPresigner {\n signer;\n constructor(options) {\n const resolvedOptions = {\n service: options.signingName || options.service || \"s3\",\n uriEscapePath: options.uriEscapePath || false,\n applyChecksum: options.applyChecksum || false,\n ...options,\n };\n this.signer = new SignatureV4MultiRegion(resolvedOptions);\n }\n presign(requestToSign, { unsignableHeaders = new Set(), hoistableHeaders = new Set(), unhoistableHeaders = new Set(), ...options } = {}) {\n this.prepareRequest(requestToSign, {\n unsignableHeaders,\n unhoistableHeaders,\n hoistableHeaders,\n });\n return this.signer.presign(requestToSign, {\n expiresIn: 900,\n unsignableHeaders,\n unhoistableHeaders,\n ...options,\n });\n }\n presignWithCredentials(requestToSign, credentials, { unsignableHeaders = new Set(), hoistableHeaders = new Set(), unhoistableHeaders = new Set(), ...options } = {}) {\n this.prepareRequest(requestToSign, {\n unsignableHeaders,\n unhoistableHeaders,\n hoistableHeaders,\n });\n return this.signer.presignWithCredentials(requestToSign, credentials, {\n expiresIn: 900,\n unsignableHeaders,\n unhoistableHeaders,\n ...options,\n });\n }\n prepareRequest(requestToSign, { unsignableHeaders = new Set(), unhoistableHeaders = new Set(), hoistableHeaders = new Set(), } = {}) {\n unsignableHeaders.add(\"content-type\");\n Object.keys(requestToSign.headers)\n .map((header) => header.toLowerCase())\n .filter((header) => header.startsWith(\"x-amz-server-side-encryption\"))\n .forEach((header) => {\n if (!hoistableHeaders.has(header)) {\n unhoistableHeaders.add(header);\n }\n });\n requestToSign.headers[SHA256_HEADER] = UNSIGNED_PAYLOAD;\n const currentHostHeader = requestToSign.headers.host;\n const port = requestToSign.port;\n const expectedHostHeader = `${requestToSign.hostname}${requestToSign.port != null ? \":\" + port : \"\"}`;\n if (!currentHostHeader || (currentHostHeader === requestToSign.hostname && requestToSign.port != null)) {\n requestToSign.headers.host = expectedHostHeader;\n }\n }\n}\n", "export const UNSIGNED_PAYLOAD = \"UNSIGNED-PAYLOAD\";\nexport const SHA256_HEADER = \"X-Amz-Content-Sha256\";\nexport const ALGORITHM_QUERY_PARAM = \"X-Amz-Algorithm\";\nexport const CREDENTIAL_QUERY_PARAM = \"X-Amz-Credential\";\nexport const AMZ_DATE_QUERY_PARAM = \"X-Amz-Date\";\nexport const SIGNED_HEADERS_QUERY_PARAM = \"X-Amz-SignedHeaders\";\nexport const EXPIRES_QUERY_PARAM = \"X-Amz-Expires\";\nexport const HOST_HEADER = \"host\";\nexport const ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256\";\n", "import { router, publicProcedure } from '@/src/trpc/trpc-index'\nimport {\n getSuspendedProductIds,\n getNextDeliveryDateWithCapacity,\n getStoresSummary,\n} from '@/src/dbService'\nimport { generateSignedUrlsFromS3Urls, generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport { getAllProducts as getAllProductsFromCache } from '@/src/stores/product-store'\nimport { getDashboardTags as getDashboardTagsFromCache } from '@/src/stores/product-tag-store'\n\n// Re-export with original name for backwards compatibility\nexport const getNextDeliveryDate = getNextDeliveryDateWithCapacity\n\nexport async function scaffoldProducts() {\n // Get all products from cache\n let products = await getAllProductsFromCache();\n products = products.filter(item => Boolean(item.id))\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { productInfo } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n // Get suspended product IDs to filter them out\n const suspendedProducts = await db\n .select({ id: productInfo.id })\n .from(productInfo)\n .where(eq(productInfo.isSuspended, true));\n */\n\n const suspendedProductIds = new Set(await getSuspendedProductIds());\n\n // Filter out suspended products\n products = products.filter(product => !suspendedProductIds.has(product.id));\n\n // Format products to match the expected response structure\n const formattedProducts = await Promise.all(\n products.map(async (product) => {\n const nextDeliveryDate = await getNextDeliveryDateWithCapacity(product.id);\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: parseFloat(product.price),\n marketPrice: product.marketPrice ? parseFloat(product.marketPrice) : null,\n unit: product.unitNotation,\n unitNotation: product.unitNotation,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n storeId: product.store?.id || null,\n isOutOfStock: product.isOutOfStock,\n isFlashAvailable: product.isFlashAvailable,\n nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null,\n images: product.images,\n flashPrice: product.flashPrice\n };\n })\n );\n\n return {\n products: formattedProducts,\n count: formattedProducts.length,\n };\n}\n\nexport const commonRouter = router({\n getDashboardTags: publicProcedure\n .query(async () => {\n // Get dashboard tags from cache\n const tags = await getDashboardTagsFromCache();\n\n return {\n tags: tags,\n };\n }),\n\n getAllProductsSummary: publicProcedure\n .query(async () => {\n const response = await scaffoldProducts();\n return response;\n }),\n\n /*\n // Old implementation - moved to common-trpc-index.ts:\n getStoresSummary: publicProcedure\n .query(async () => {\n const stores = await getStoresSummary();\n return { stores };\n }),\n\n healthCheck: publicProcedure\n .query(async () => {\n const result = await healthCheck();\n return result;\n }),\n */\n});\n", "import { initTRPC, TRPCError } from '@trpc/server';\nimport type { Context as HonoContext } from 'hono';\n\nexport interface Context {\n req: HonoContext['req'];\n user?: any;\n staffUser?: {\n id: number;\n name: string;\n } | null;\n}\n\nconst t = initTRPC.context().create();\n\nexport const middleware = t.middleware;\nexport const router = t.router;\nexport { TRPCError };\n\n// Global error logger middleware\nconst errorLoggerMiddleware = middleware(async ({ path, type, next, ctx }) => {\n const start = Date.now();\n\n try {\n const result = await next();\n const duration = Date.now() - start;\n\n // Log successful operations in development\n if (process.env.NODE_ENV === 'development') {\n console.log(`\u2705 ${type} ${path} - ${duration}ms`);\n }\n\n return result;\n } catch (error) {\n const duration = Date.now() - start;\n const err = error as any; // Type assertion for error object\n\n // Comprehensive error logging\n console.error('\uD83D\uDEA8 tRPC Error:', {\n timestamp: new Date().toISOString(),\n path,\n type,\n duration: `${duration}ms`,\n userId: ctx?.user?.userId || ctx?.staffUser?.id || 'anonymous',\n error: {\n name: err.name,\n message: err.message,\n code: err.code,\n stack: err.stack,\n },\n // Add SQL-specific details if available\n ...(err.code && { sqlCode: err.code }),\n ...(err.meta && { sqlMeta: err.meta }),\n ...(err.sql && { sql: err.sql }),\n });\n\n throw error; // Re-throw to maintain error flow\n }\n});\n\nexport const publicProcedure = t.procedure.use(errorLoggerMiddleware);\nexport const protectedProcedure = t.procedure.use(errorLoggerMiddleware).use(\n middleware(async ({ ctx, next }) => {\n\n if ((!ctx.user && !ctx.staffUser)) {\n throw new TRPCError({ code: 'UNAUTHORIZED' });\n }\n return next();\n })\n);\n\nexport const createCallerFactory = t.createCallerFactory;\nexport const createTRPCRouter = t.router;\n", "import { createFlatProxy, createRecursiveProxy, getErrorShape } from \"./getErrorShape-vC8mUXJD.mjs\";\nimport \"./codes-DagpWZLc.mjs\";\nimport { TRPCError, callProcedure, getTRPCErrorFromUnknown, isTrackedEnvelope, lazy, sse, tracked, transformTRPCResponse } from \"./tracked-Bjtgv3wJ.mjs\";\nimport { StandardSchemaV1Error, experimental_standaloneMiddleware, initTRPC } from \"./initTRPC-RoZMIBeA.mjs\";\n\nexport { StandardSchemaV1Error, TRPCError, callProcedure as callTRPCProcedure, createFlatProxy as createTRPCFlatProxy, createRecursiveProxy as createTRPCRecursiveProxy, lazy as experimental_lazy, experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware, getErrorShape, getTRPCErrorFromUnknown, getErrorShape as getTRPCErrorShape, initTRPC, isTrackedEnvelope, lazy, sse, tracked, transformTRPCResponse };", "import { TRPCError } from './error/TRPCError';\nimport type { ParseFn } from './parser';\nimport type { ProcedureType } from './procedure';\nimport type { GetRawInputFn, Overwrite, Simplify } from './types';\nimport { isObject } from './utils';\n\n/** @internal */\nexport const middlewareMarker = 'middlewareMarker' as 'middlewareMarker' & {\n __brand: 'middlewareMarker';\n};\ntype MiddlewareMarker = typeof middlewareMarker;\n\ninterface MiddlewareResultBase {\n /**\n * All middlewares should pass through their `next()`'s output.\n * Requiring this marker makes sure that can't be forgotten at compile-time.\n */\n readonly marker: MiddlewareMarker;\n}\n\ninterface MiddlewareOKResult<_TContextOverride> extends MiddlewareResultBase {\n ok: true;\n data: unknown;\n // this could be extended with `input`/`rawInput` later\n}\n\ninterface MiddlewareErrorResult<_TContextOverride>\n extends MiddlewareResultBase {\n ok: false;\n error: TRPCError;\n}\n\n/**\n * @internal\n */\nexport type MiddlewareResult<_TContextOverride> =\n | MiddlewareErrorResult<_TContextOverride>\n | MiddlewareOKResult<_TContextOverride>;\n\n/**\n * @internal\n */\nexport interface MiddlewareBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n> {\n /**\n * Create a new builder based on the current middleware builder\n */\n unstable_pipe<$ContextOverridesOut>(\n fn:\n | MiddlewareFunction<\n TContext,\n TMeta,\n TContextOverrides,\n $ContextOverridesOut,\n TInputOut\n >\n | MiddlewareBuilder<\n Overwrite,\n TMeta,\n $ContextOverridesOut,\n TInputOut\n >,\n ): MiddlewareBuilder<\n TContext,\n TMeta,\n Overwrite,\n TInputOut\n >;\n\n /**\n * List of middlewares within this middleware builder\n */\n _middlewares: MiddlewareFunction<\n TContext,\n TMeta,\n TContextOverrides,\n object,\n TInputOut\n >[];\n}\n\n/**\n * @internal\n */\nexport type MiddlewareFunction<\n TContext,\n TMeta,\n TContextOverridesIn,\n $ContextOverridesOut,\n TInputOut,\n> = {\n (opts: {\n ctx: Simplify>;\n type: ProcedureType;\n path: string;\n input: TInputOut;\n getRawInput: GetRawInputFn;\n meta: TMeta | undefined;\n signal: AbortSignal | undefined;\n /**\n * The index of this call in a batch request.\n */\n batchIndex: number;\n next: {\n (): Promise>;\n <$ContextOverride>(opts: {\n ctx?: $ContextOverride;\n input?: unknown;\n }): Promise>;\n (opts: {\n getRawInput: GetRawInputFn;\n }): Promise>;\n };\n }): Promise>;\n _type?: string | undefined;\n};\n\nexport type AnyMiddlewareFunction = MiddlewareFunction;\nexport type AnyMiddlewareBuilder = MiddlewareBuilder;\n/**\n * @internal\n */\nexport function createMiddlewareFactory<\n TContext,\n TMeta,\n TInputOut = unknown,\n>() {\n function createMiddlewareInner(\n middlewares: AnyMiddlewareFunction[],\n ): AnyMiddlewareBuilder {\n return {\n _middlewares: middlewares,\n unstable_pipe(middlewareBuilderOrFn) {\n const pipedMiddleware =\n '_middlewares' in middlewareBuilderOrFn\n ? middlewareBuilderOrFn._middlewares\n : [middlewareBuilderOrFn];\n\n return createMiddlewareInner([...middlewares, ...pipedMiddleware]);\n },\n };\n }\n\n function createMiddleware<$ContextOverrides>(\n fn: MiddlewareFunction<\n TContext,\n TMeta,\n object,\n $ContextOverrides,\n TInputOut\n >,\n ): MiddlewareBuilder {\n return createMiddlewareInner([fn]);\n }\n\n return createMiddleware;\n}\n\n/**\n * Create a standalone middleware\n * @see https://trpc.io/docs/v11/server/middlewares#experimental-standalone-middlewares\n * @deprecated use `.concat()` instead\n */\nexport const experimental_standaloneMiddleware = <\n TCtx extends {\n ctx?: object;\n meta?: object;\n input?: unknown;\n },\n>() => ({\n create: createMiddlewareFactory<\n TCtx extends { ctx: infer T extends object } ? T : any,\n TCtx extends { meta: infer T extends object } ? T : object,\n TCtx extends { input: infer T } ? T : unknown\n >(),\n});\n\n/**\n * @internal\n * Please note, `trpc-openapi` uses this function.\n */\nexport function createInputMiddleware(parse: ParseFn) {\n const inputMiddleware: AnyMiddlewareFunction =\n async function inputValidatorMiddleware(opts) {\n let parsedInput: ReturnType;\n\n const rawInput = await opts.getRawInput();\n try {\n parsedInput = await parse(rawInput);\n } catch (cause) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n cause,\n });\n }\n\n // Multiple input parsers\n const combinedInput =\n isObject(opts.input) && isObject(parsedInput)\n ? {\n ...opts.input,\n ...parsedInput,\n }\n : parsedInput;\n\n return opts.next({ input: combinedInput });\n };\n inputMiddleware._type = 'input';\n return inputMiddleware;\n}\n\n/**\n * @internal\n */\nexport function createOutputMiddleware(parse: ParseFn) {\n const outputMiddleware: AnyMiddlewareFunction =\n async function outputValidatorMiddleware({ next }) {\n const result = await next();\n if (!result.ok) {\n // pass through failures without validating\n return result;\n }\n try {\n const data = await parse(result.data);\n return {\n ...result,\n data,\n };\n } catch (cause) {\n throw new TRPCError({\n message: 'Output validation failed',\n code: 'INTERNAL_SERVER_ERROR',\n cause,\n });\n }\n };\n outputMiddleware._type = 'output';\n return outputMiddleware;\n}\n", "import type { StandardSchemaV1 } from \"./spec\";\n\n/** A schema error with useful information. */\n\nexport class StandardSchemaV1Error extends Error {\n /** The schema issues. */\n public readonly issues: ReadonlyArray;\n\n /**\n * Creates a schema error with useful information.\n *\n * @param issues The schema issues.\n */\n constructor(issues: ReadonlyArray) {\n super(issues[0]?.message);\n this.name = 'SchemaError';\n this.issues = issues;\n }\n}\n", "import { StandardSchemaV1Error } from '../vendor/standard-schema-v1/error';\nimport { type StandardSchemaV1 } from '../vendor/standard-schema-v1/spec';\n\n// zod / typeschema\nexport type ParserZodEsque = {\n _input: TInput;\n _output: TParsedInput;\n};\n\nexport type ParserValibotEsque = {\n schema: {\n _types?: {\n input: TInput;\n output: TParsedInput;\n };\n };\n};\n\nexport type ParserArkTypeEsque = {\n inferIn: TInput;\n infer: TParsedInput;\n};\n\nexport type ParserStandardSchemaEsque = StandardSchemaV1<\n TInput,\n TParsedInput\n>;\n\nexport type ParserMyZodEsque = {\n parse: (input: any) => TInput;\n};\n\nexport type ParserSuperstructEsque = {\n create: (input: unknown) => TInput;\n};\n\nexport type ParserCustomValidatorEsque = (\n input: unknown,\n) => Promise | TInput;\n\nexport type ParserYupEsque = {\n validateSync: (input: unknown) => TInput;\n};\n\nexport type ParserScaleEsque = {\n assert(value: unknown): asserts value is TInput;\n};\n\nexport type ParserWithoutInput =\n | ParserCustomValidatorEsque\n | ParserMyZodEsque\n | ParserScaleEsque\n | ParserSuperstructEsque\n | ParserYupEsque;\n\nexport type ParserWithInputOutput =\n | ParserZodEsque\n | ParserValibotEsque\n | ParserArkTypeEsque\n | ParserStandardSchemaEsque;\n\nexport type Parser = ParserWithInputOutput | ParserWithoutInput;\n\nexport type inferParser =\n TParser extends ParserStandardSchemaEsque\n ? {\n in: $TIn;\n out: $TOut;\n }\n : TParser extends ParserWithInputOutput\n ? {\n in: $TIn;\n out: $TOut;\n }\n : TParser extends ParserWithoutInput\n ? {\n in: $InOut;\n out: $InOut;\n }\n : never;\n\nexport type ParseFn = (value: unknown) => Promise | TType;\n\nexport function getParseFn(procedureParser: Parser): ParseFn {\n const parser = procedureParser as any;\n const isStandardSchema = '~standard' in parser;\n\n if (typeof parser === 'function' && typeof parser.assert === 'function') {\n // ParserArkTypeEsque - arktype schemas shouldn't be called as a function because they return a union type instead of throwing\n return parser.assert.bind(parser);\n }\n\n if (typeof parser === 'function' && !isStandardSchema) {\n // ParserValibotEsque (>= v0.31.0)\n // ParserCustomValidatorEsque - note the check for standard-schema conformance - some libraries like `effect` use function schemas which are *not* a \"parse\" function.\n return parser;\n }\n\n if (typeof parser.parseAsync === 'function') {\n // ParserZodEsque\n return parser.parseAsync.bind(parser);\n }\n\n if (typeof parser.parse === 'function') {\n // ParserZodEsque\n // ParserValibotEsque (< v0.13.0)\n return parser.parse.bind(parser);\n }\n\n if (typeof parser.validateSync === 'function') {\n // ParserYupEsque\n return parser.validateSync.bind(parser);\n }\n\n if (typeof parser.create === 'function') {\n // ParserSuperstructEsque\n return parser.create.bind(parser);\n }\n\n if (typeof parser.assert === 'function') {\n // ParserScaleEsque\n return (value) => {\n parser.assert(value);\n return value as TType;\n };\n }\n\n if (isStandardSchema) {\n // StandardSchemaEsque\n return async (value) => {\n const result = await parser['~standard'].validate(value);\n if (result.issues) {\n throw new StandardSchemaV1Error(result.issues);\n }\n return result.value;\n };\n }\n\n throw new Error('Could not find a validator fn');\n}\n", "function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.includes(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose.js\");\nfunction _objectWithoutProperties(e, t) {\n if (null == e) return {};\n var o,\n r,\n i = objectWithoutPropertiesLoose(e, t);\n if (Object.getOwnPropertySymbols) {\n var s = Object.getOwnPropertySymbols(e);\n for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n }\n return i;\n}\nmodule.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import type { inferObservableValue, Observable } from '../observable';\nimport { getTRPCErrorFromUnknown, TRPCError } from './error/TRPCError';\nimport type {\n AnyMiddlewareFunction,\n MiddlewareBuilder,\n MiddlewareFunction,\n MiddlewareResult,\n} from './middleware';\nimport {\n createInputMiddleware,\n createOutputMiddleware,\n middlewareMarker,\n} from './middleware';\nimport type { inferParser, Parser } from './parser';\nimport { getParseFn } from './parser';\nimport type {\n AnyMutationProcedure,\n AnyProcedure,\n AnyQueryProcedure,\n LegacyObservableSubscriptionProcedure,\n MutationProcedure,\n ProcedureType,\n QueryProcedure,\n SubscriptionProcedure,\n} from './procedure';\nimport type { inferTrackedOutput } from './stream/tracked';\nimport type {\n GetRawInputFn,\n MaybePromise,\n Overwrite,\n Simplify,\n TypeError,\n} from './types';\nimport type { UnsetMarker } from './utils';\nimport { mergeWithoutOverrides } from './utils';\n\ntype IntersectIfDefined = TType extends UnsetMarker\n ? TWith\n : TWith extends UnsetMarker\n ? TType\n : Simplify;\n\ntype DefaultValue = TValue extends UnsetMarker\n ? TFallback\n : TValue;\n\ntype inferAsyncIterable =\n TOutput extends AsyncIterable\n ? {\n yield: $Yield;\n return: $Return;\n next: $Next;\n }\n : never;\ntype inferSubscriptionOutput =\n TOutput extends AsyncIterable\n ? AsyncIterable<\n inferTrackedOutput['yield']>,\n inferAsyncIterable['return'],\n inferAsyncIterable['next']\n >\n : TypeError<'Subscription output could not be inferred'>;\n\nexport type CallerOverride = (opts: {\n args: unknown[];\n invoke: (opts: ProcedureCallOptions) => Promise;\n _def: AnyProcedure['_def'];\n}) => Promise;\ntype ProcedureBuilderDef = {\n procedure: true;\n inputs: Parser[];\n output?: Parser;\n meta?: TMeta;\n resolver?: ProcedureBuilderResolver;\n middlewares: AnyMiddlewareFunction[];\n /**\n * @deprecated use `type` instead\n */\n mutation?: boolean;\n /**\n * @deprecated use `type` instead\n */\n query?: boolean;\n /**\n * @deprecated use `type` instead\n */\n subscription?: boolean;\n type?: ProcedureType;\n caller?: CallerOverride;\n};\n\ntype AnyProcedureBuilderDef = ProcedureBuilderDef;\n\n/**\n * Procedure resolver options (what the `.query()`, `.mutation()`, and `.subscription()` functions receive)\n * @internal\n */\nexport interface ProcedureResolverOptions<\n TContext,\n _TMeta,\n TContextOverridesIn,\n TInputOut,\n> {\n ctx: Simplify>;\n input: TInputOut extends UnsetMarker ? undefined : TInputOut;\n /**\n * The AbortSignal of the request\n */\n signal: AbortSignal | undefined;\n /**\n * The path of the procedure\n */\n path: string;\n /**\n * The index of this call in a batch request.\n * Will be set when the procedure is called as part of a batch.\n */\n batchIndex?: number;\n}\n\n/**\n * A procedure resolver\n */\ntype ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputParserIn,\n $Output,\n> = (\n opts: ProcedureResolverOptions,\n) => MaybePromise<\n // If an output parser is defined, we need to return what the parser expects, otherwise we return the inferred type\n DefaultValue\n>;\n\ntype AnyResolver = ProcedureResolver;\nexport type AnyProcedureBuilder = ProcedureBuilder<\n any,\n any,\n any,\n any,\n any,\n any,\n any,\n any\n>;\n\n/**\n * Infer the context type from a procedure builder\n * Useful to create common helper functions for different procedures\n */\nexport type inferProcedureBuilderResolverOptions<\n TProcedureBuilder extends AnyProcedureBuilder,\n> =\n TProcedureBuilder extends ProcedureBuilder<\n infer TContext,\n infer TMeta,\n infer TContextOverrides,\n infer _TInputIn,\n infer TInputOut,\n infer _TOutputIn,\n infer _TOutputOut,\n infer _TCaller\n >\n ? ProcedureResolverOptions<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut extends UnsetMarker\n ? // if input is not set, we don't want to infer it as `undefined` since a procedure further down the chain might have set an input\n unknown\n : TInputOut extends object\n ? Simplify<\n TInputOut & {\n /**\n * Extra input params might have been added by a `.input()` further down the chain\n */\n [keyAddedByInputCallFurtherDown: string]: unknown;\n }\n >\n : TInputOut\n >\n : never;\n\nexport interface ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputIn,\n TInputOut,\n TOutputIn,\n TOutputOut,\n TCaller extends boolean,\n> {\n /**\n * Add an input parser to the procedure.\n * @see https://trpc.io/docs/v11/server/validators\n */\n input<$Parser extends Parser>(\n schema: TInputOut extends UnsetMarker\n ? $Parser\n : inferParser<$Parser>['out'] extends Record | undefined\n ? TInputOut extends Record | undefined\n ? undefined extends inferParser<$Parser>['out'] // if current is optional the previous must be too\n ? undefined extends TInputOut\n ? $Parser\n : TypeError<'Cannot chain an optional parser to a required parser'>\n : $Parser\n : TypeError<'All input parsers did not resolve to an object'>\n : TypeError<'All input parsers did not resolve to an object'>,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n IntersectIfDefined['in']>,\n IntersectIfDefined['out']>,\n TOutputIn,\n TOutputOut,\n TCaller\n >;\n /**\n * Add an output parser to the procedure.\n * @see https://trpc.io/docs/v11/server/validators\n */\n output<$Parser extends Parser>(\n schema: $Parser,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputIn,\n TInputOut,\n IntersectIfDefined['in']>,\n IntersectIfDefined['out']>,\n TCaller\n >;\n /**\n * Add a meta data to the procedure.\n * @see https://trpc.io/docs/v11/server/metadata\n */\n meta(\n meta: TMeta,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputIn,\n TInputOut,\n TOutputIn,\n TOutputOut,\n TCaller\n >;\n /**\n * Add a middleware to the procedure.\n * @see https://trpc.io/docs/v11/server/middlewares\n */\n use<$ContextOverridesOut>(\n fn:\n | MiddlewareBuilder<\n Overwrite,\n TMeta,\n $ContextOverridesOut,\n TInputOut\n >\n | MiddlewareFunction<\n TContext,\n TMeta,\n TContextOverrides,\n $ContextOverridesOut,\n TInputOut\n >,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n Overwrite,\n TInputIn,\n TInputOut,\n TOutputIn,\n TOutputOut,\n TCaller\n >;\n\n /**\n * @deprecated use {@link concat} instead\n */\n unstable_concat<\n $Context,\n $Meta,\n $ContextOverrides,\n $InputIn,\n $InputOut,\n $OutputIn,\n $OutputOut,\n >(\n builder: Overwrite extends $Context\n ? TMeta extends $Meta\n ? ProcedureBuilder<\n $Context,\n $Meta,\n $ContextOverrides,\n $InputIn,\n $InputOut,\n $OutputIn,\n $OutputOut,\n TCaller\n >\n : TypeError<'Meta mismatch'>\n : TypeError<'Context mismatch'>,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n Overwrite,\n IntersectIfDefined,\n IntersectIfDefined,\n IntersectIfDefined,\n IntersectIfDefined,\n TCaller\n >;\n\n /**\n * Combine two procedure builders\n */\n concat<\n $Context,\n $Meta,\n $ContextOverrides,\n $InputIn,\n $InputOut,\n $OutputIn,\n $OutputOut,\n >(\n builder: Overwrite extends $Context\n ? TMeta extends $Meta\n ? ProcedureBuilder<\n $Context,\n $Meta,\n $ContextOverrides,\n $InputIn,\n $InputOut,\n $OutputIn,\n $OutputOut,\n TCaller\n >\n : TypeError<'Meta mismatch'>\n : TypeError<'Context mismatch'>,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n Overwrite,\n IntersectIfDefined,\n IntersectIfDefined,\n IntersectIfDefined,\n IntersectIfDefined,\n TCaller\n >;\n /**\n * Query procedure\n * @see https://trpc.io/docs/v11/concepts#vocabulary\n */\n query<$Output>(\n resolver: ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputIn,\n $Output\n >,\n ): TCaller extends true\n ? (\n input: DefaultValue,\n ) => Promise>\n : QueryProcedure<{\n input: DefaultValue;\n output: DefaultValue;\n meta: TMeta;\n }>;\n\n /**\n * Mutation procedure\n * @see https://trpc.io/docs/v11/concepts#vocabulary\n */\n mutation<$Output>(\n resolver: ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputIn,\n $Output\n >,\n ): TCaller extends true\n ? (\n input: DefaultValue,\n ) => Promise>\n : MutationProcedure<{\n input: DefaultValue;\n output: DefaultValue;\n meta: TMeta;\n }>;\n\n /**\n * Subscription procedure\n * @see https://trpc.io/docs/v11/server/subscriptions\n */\n subscription<$Output extends AsyncIterable>(\n resolver: ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputIn,\n $Output\n >,\n ): TCaller extends true\n ? TypeError<'Not implemented'>\n : SubscriptionProcedure<{\n input: DefaultValue;\n output: inferSubscriptionOutput>;\n meta: TMeta;\n }>;\n /**\n * @deprecated Using subscriptions with an observable is deprecated. Use an async generator instead.\n * This feature will be removed in v12 of tRPC.\n * @see https://trpc.io/docs/v11/server/subscriptions\n */\n subscription<$Output extends Observable>(\n resolver: ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputIn,\n $Output\n >,\n ): TCaller extends true\n ? TypeError<'Not implemented'>\n : LegacyObservableSubscriptionProcedure<{\n input: DefaultValue;\n output: inferObservableValue>;\n meta: TMeta;\n }>;\n /**\n * Overrides the way a procedure is invoked\n * Do not use this unless you know what you're doing - this is an experimental API\n */\n experimental_caller(\n caller: CallerOverride,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputIn,\n TInputOut,\n TOutputIn,\n TOutputOut,\n true\n >;\n /**\n * @internal\n */\n _def: ProcedureBuilderDef;\n}\n\ntype ProcedureBuilderResolver = (\n opts: ProcedureResolverOptions,\n) => Promise;\n\nfunction createNewBuilder(\n def1: AnyProcedureBuilderDef,\n def2: Partial,\n): AnyProcedureBuilder {\n const { middlewares = [], inputs, meta, ...rest } = def2;\n\n // TODO: maybe have a fn here to warn about calls\n return createBuilder({\n ...mergeWithoutOverrides(def1, rest),\n inputs: [...def1.inputs, ...(inputs ?? [])],\n middlewares: [...def1.middlewares, ...middlewares],\n meta: def1.meta && meta ? { ...def1.meta, ...meta } : (meta ?? def1.meta),\n });\n}\n\nexport function createBuilder(\n initDef: Partial = {},\n): ProcedureBuilder<\n TContext,\n TMeta,\n object,\n UnsetMarker,\n UnsetMarker,\n UnsetMarker,\n UnsetMarker,\n false\n> {\n const _def: AnyProcedureBuilderDef = {\n procedure: true,\n inputs: [],\n middlewares: [],\n ...initDef,\n };\n\n const builder: AnyProcedureBuilder = {\n _def,\n input(input) {\n const parser = getParseFn(input as Parser);\n return createNewBuilder(_def, {\n inputs: [input as Parser],\n middlewares: [createInputMiddleware(parser)],\n });\n },\n output(output: Parser) {\n const parser = getParseFn(output);\n return createNewBuilder(_def, {\n output,\n middlewares: [createOutputMiddleware(parser)],\n });\n },\n meta(meta) {\n return createNewBuilder(_def, {\n meta,\n });\n },\n use(middlewareBuilderOrFn) {\n // Distinguish between a middleware builder and a middleware function\n const middlewares =\n '_middlewares' in middlewareBuilderOrFn\n ? middlewareBuilderOrFn._middlewares\n : [middlewareBuilderOrFn];\n\n return createNewBuilder(_def, {\n middlewares: middlewares,\n });\n },\n unstable_concat(builder) {\n return createNewBuilder(_def, (builder as AnyProcedureBuilder)._def);\n },\n concat(builder) {\n return createNewBuilder(_def, (builder as AnyProcedureBuilder)._def);\n },\n query(resolver) {\n return createResolver(\n { ..._def, type: 'query' },\n resolver,\n ) as AnyQueryProcedure;\n },\n mutation(resolver) {\n return createResolver(\n { ..._def, type: 'mutation' },\n resolver,\n ) as AnyMutationProcedure;\n },\n subscription(resolver: ProcedureResolver) {\n return createResolver({ ..._def, type: 'subscription' }, resolver) as any;\n },\n experimental_caller(caller) {\n return createNewBuilder(_def, {\n caller,\n }) as any;\n },\n };\n\n return builder;\n}\n\nfunction createResolver(\n _defIn: AnyProcedureBuilderDef & { type: ProcedureType },\n resolver: AnyResolver,\n) {\n const finalBuilder = createNewBuilder(_defIn, {\n resolver,\n middlewares: [\n async function resolveMiddleware(opts) {\n const data = await resolver(opts);\n return {\n marker: middlewareMarker,\n ok: true,\n data,\n ctx: opts.ctx,\n } as const;\n },\n ],\n });\n const _def: AnyProcedure['_def'] = {\n ...finalBuilder._def,\n type: _defIn.type,\n experimental_caller: Boolean(finalBuilder._def.caller),\n meta: finalBuilder._def.meta,\n $types: null as any,\n };\n\n const invoke = createProcedureCaller(finalBuilder._def);\n const callerOverride = finalBuilder._def.caller;\n if (!callerOverride) {\n return invoke;\n }\n const callerWrapper = async (...args: unknown[]) => {\n return await callerOverride({\n args,\n invoke,\n _def: _def,\n });\n };\n\n callerWrapper._def = _def;\n\n return callerWrapper;\n}\n\n/**\n * @internal\n */\nexport interface ProcedureCallOptions {\n ctx: TContext;\n getRawInput: GetRawInputFn;\n input?: unknown;\n path: string;\n type: ProcedureType;\n signal: AbortSignal | undefined;\n /**\n * The index of this call in a batch request.\n */\n batchIndex: number;\n}\n\nconst codeblock = `\nThis is a client-only function.\nIf you want to call this function on the server, see https://trpc.io/docs/v11/server/server-side-calls\n`.trim();\n\n// run the middlewares recursively with the resolver as the last one\nasync function callRecursive(\n index: number,\n _def: AnyProcedureBuilderDef,\n opts: ProcedureCallOptions,\n): Promise> {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const middleware = _def.middlewares[index]!;\n const result = await middleware({\n ...opts,\n meta: _def.meta,\n input: opts.input,\n next(_nextOpts?: any) {\n const nextOpts = _nextOpts as\n | {\n ctx?: Record;\n input?: unknown;\n getRawInput?: GetRawInputFn;\n }\n | undefined;\n\n return callRecursive(index + 1, _def, {\n ...opts,\n ctx: nextOpts?.ctx ? { ...opts.ctx, ...nextOpts.ctx } : opts.ctx,\n input: nextOpts && 'input' in nextOpts ? nextOpts.input : opts.input,\n getRawInput: nextOpts?.getRawInput ?? opts.getRawInput,\n });\n },\n });\n\n return result;\n } catch (cause) {\n return {\n ok: false,\n error: getTRPCErrorFromUnknown(cause),\n marker: middlewareMarker,\n };\n }\n}\n\nfunction createProcedureCaller(_def: AnyProcedureBuilderDef): AnyProcedure {\n async function procedure(opts: ProcedureCallOptions) {\n // is direct server-side call\n if (!opts || !('getRawInput' in opts)) {\n throw new Error(codeblock);\n }\n\n // there's always at least one \"next\" since we wrap this.resolver in a middleware\n const result = await callRecursive(0, _def, opts);\n\n if (!result) {\n throw new TRPCError({\n code: 'INTERNAL_SERVER_ERROR',\n message:\n 'No result from middlewares - did you forget to `return next()`?',\n });\n }\n if (!result.ok) {\n // re-throw original error\n throw result.error;\n }\n return result.data;\n }\n\n procedure._def = _def;\n procedure.procedure = true;\n procedure.meta = _def.meta;\n\n // FIXME typecast shouldn't be needed - fixittt\n return procedure as unknown as AnyProcedure;\n}\n", "import type { CombinedDataTransformer } from '../unstable-core-do-not-import';\nimport type { DefaultErrorShape, ErrorFormatter } from './error/formatter';\nimport type { JSONLProducerOptions } from './stream/jsonl';\nimport type { SSEStreamProducerOptions } from './stream/sse';\n\n/**\n * The initial generics that are used in the init function\n * @internal\n */\nexport interface RootTypes {\n ctx: object;\n meta: object;\n errorShape: DefaultErrorShape;\n transformer: boolean;\n}\n\n/**\n * The default check to see if we're in a server\n */\nexport const isServerDefault: boolean =\n typeof window === 'undefined' ||\n 'Deno' in window ||\n // eslint-disable-next-line @typescript-eslint/dot-notation\n globalThis.process?.env?.['NODE_ENV'] === 'test' ||\n !!globalThis.process?.env?.['JEST_WORKER_ID'] ||\n !!globalThis.process?.env?.['VITEST_WORKER_ID'];\n\n/**\n * The tRPC root config\n * @internal\n */\nexport interface RootConfig {\n /**\n * The types that are used in the config\n * @internal\n */\n $types: TTypes;\n /**\n * Use a data transformer\n * @see https://trpc.io/docs/v11/data-transformers\n */\n transformer: CombinedDataTransformer;\n /**\n * Use custom error formatting\n * @see https://trpc.io/docs/v11/error-formatting\n */\n errorFormatter: ErrorFormatter;\n /**\n * Allow `@trpc/server` to run in non-server environments\n * @warning **Use with caution**, this should likely mainly be used within testing.\n * @default false\n */\n allowOutsideOfServer: boolean;\n /**\n * Is this a server environment?\n * @warning **Use with caution**, this should likely mainly be used within testing.\n * @default typeof window === 'undefined' || 'Deno' in window || process.env.NODE_ENV === 'test'\n */\n isServer: boolean;\n /**\n * Is this development?\n * Will be used to decide if the API should return stack traces\n * @default process.env.NODE_ENV !== 'production'\n */\n isDev: boolean;\n\n defaultMeta?: TTypes['meta'] extends object ? TTypes['meta'] : never;\n\n /**\n * Options for server-sent events (SSE) subscriptions\n * @see https://trpc.io/docs/client/links/httpSubscriptionLink\n */\n sse?: {\n /**\n * Enable server-sent events (SSE) subscriptions\n * @default true\n */\n enabled?: boolean;\n } & Pick<\n SSEStreamProducerOptions,\n 'ping' | 'emitAndEndImmediately' | 'maxDurationMs' | 'client'\n >;\n\n /**\n * Options for batch stream\n * @see https://trpc.io/docs/client/links/httpBatchStreamLink\n */\n jsonl?: Pick;\n experimental?: {};\n}\n\n/**\n * @internal\n */\nexport type CreateRootTypes = TGenerics;\n\nexport type AnyRootTypes = CreateRootTypes<{\n ctx: any;\n meta: any;\n errorShape: any;\n transformer: any;\n}>;\n\ntype PartialIf = TCondition extends true\n ? Partial\n : TType;\n\n/**\n * Adds a `createContext` option with a given callback function\n * If context is the default value, then the `createContext` option is optional\n */\nexport type CreateContextCallback<\n TContext,\n TFunction extends (...args: any[]) => any,\n> = PartialIf<\n object extends TContext ? true : false,\n {\n /**\n * @see https://trpc.io/docs/v11/context\n **/\n createContext: TFunction;\n }\n>;\n", "import {\n defaultFormatter,\n type DefaultErrorShape,\n type ErrorFormatter,\n} from './error/formatter';\nimport type { MiddlewareBuilder, MiddlewareFunction } from './middleware';\nimport { createMiddlewareFactory } from './middleware';\nimport type { ProcedureBuilder } from './procedureBuilder';\nimport { createBuilder } from './procedureBuilder';\nimport type { AnyRootTypes, CreateRootTypes } from './rootConfig';\nimport { isServerDefault, type RootConfig } from './rootConfig';\nimport type {\n AnyRouter,\n MergeRouters,\n RouterBuilder,\n RouterCallerFactory,\n} from './router';\nimport {\n createCallerFactory,\n createRouterFactory,\n mergeRouters,\n} from './router';\nimport type { DataTransformerOptions } from './transformer';\nimport { defaultTransformer, getDataTransformer } from './transformer';\nimport type { Unwrap, ValidateShape } from './types';\nimport type { UnsetMarker } from './utils';\n\ntype inferErrorFormatterShape =\n TType extends ErrorFormatter ? TShape : DefaultErrorShape;\n/** @internal */\nexport interface RuntimeConfigOptions<\n TContext extends object,\n TMeta extends object,\n> extends Partial<\n Omit<\n RootConfig<{\n ctx: TContext;\n meta: TMeta;\n errorShape: any;\n transformer: any;\n }>,\n '$types' | 'transformer'\n >\n > {\n /**\n * Use a data transformer\n * @see https://trpc.io/docs/v11/data-transformers\n */\n transformer?: DataTransformerOptions;\n}\n\ntype ContextCallback = (...args: any[]) => object | Promise;\n\nexport interface TRPCRootObject<\n TContext extends object,\n TMeta extends object,\n TOptions extends RuntimeConfigOptions,\n $Root extends AnyRootTypes = {\n ctx: TContext;\n meta: TMeta;\n errorShape: undefined extends TOptions['errorFormatter']\n ? DefaultErrorShape\n : inferErrorFormatterShape;\n transformer: undefined extends TOptions['transformer'] ? false : true;\n },\n> {\n /**\n * Your router config\n * @internal\n */\n _config: RootConfig<$Root>;\n\n /**\n * Builder object for creating procedures\n * @see https://trpc.io/docs/v11/server/procedures\n */\n procedure: ProcedureBuilder<\n TContext,\n TMeta,\n object,\n UnsetMarker,\n UnsetMarker,\n UnsetMarker,\n UnsetMarker,\n false\n >;\n\n /**\n * Create reusable middlewares\n * @see https://trpc.io/docs/v11/server/middlewares\n */\n middleware: <$ContextOverrides>(\n fn: MiddlewareFunction,\n ) => MiddlewareBuilder;\n\n /**\n * Create a router\n * @see https://trpc.io/docs/v11/server/routers\n */\n router: RouterBuilder<$Root>;\n\n /**\n * Merge Routers\n * @see https://trpc.io/docs/v11/server/merging-routers\n */\n mergeRouters: (\n ...routerList: [...TRouters]\n ) => MergeRouters;\n\n /**\n * Create a server-side caller for a router\n * @see https://trpc.io/docs/v11/server/server-side-calls\n */\n createCallerFactory: RouterCallerFactory<$Root>;\n}\n\nclass TRPCBuilder {\n /**\n * Add a context shape as a generic to the root object\n * @see https://trpc.io/docs/v11/server/context\n */\n context() {\n return new TRPCBuilder<\n TNewContext extends ContextCallback ? Unwrap : TNewContext,\n TMeta\n >();\n }\n\n /**\n * Add a meta shape as a generic to the root object\n * @see https://trpc.io/docs/v11/quickstart\n */\n meta() {\n return new TRPCBuilder();\n }\n\n /**\n * Create the root object\n * @see https://trpc.io/docs/v11/server/routers#initialize-trpc\n */\n create>(\n opts?: ValidateShape>,\n ): TRPCRootObject {\n type $Root = CreateRootTypes<{\n ctx: TContext;\n meta: TMeta;\n errorShape: undefined extends TOptions['errorFormatter']\n ? DefaultErrorShape\n : inferErrorFormatterShape;\n transformer: undefined extends TOptions['transformer'] ? false : true;\n }>;\n\n const config: RootConfig<$Root> = {\n ...opts,\n transformer: getDataTransformer(opts?.transformer ?? defaultTransformer),\n isDev:\n opts?.isDev ??\n // eslint-disable-next-line @typescript-eslint/dot-notation\n globalThis.process?.env['NODE_ENV'] !== 'production',\n allowOutsideOfServer: opts?.allowOutsideOfServer ?? false,\n errorFormatter: opts?.errorFormatter ?? defaultFormatter,\n isServer: opts?.isServer ?? isServerDefault,\n /**\n * These are just types, they can't be used at runtime\n * @internal\n */\n $types: null as any,\n };\n\n {\n // Server check\n const isServer: boolean = opts?.isServer ?? isServerDefault;\n\n if (!isServer && opts?.allowOutsideOfServer !== true) {\n throw new Error(\n `You're trying to use @trpc/server in a non-server environment. This is not supported by default.`,\n );\n }\n }\n return {\n /**\n * Your router config\n * @internal\n */\n _config: config,\n /**\n * Builder object for creating procedures\n * @see https://trpc.io/docs/v11/server/procedures\n */\n procedure: createBuilder<$Root['ctx'], $Root['meta']>({\n meta: opts?.defaultMeta,\n }),\n /**\n * Create reusable middlewares\n * @see https://trpc.io/docs/v11/server/middlewares\n */\n middleware: createMiddlewareFactory<$Root['ctx'], $Root['meta']>(),\n /**\n * Create a router\n * @see https://trpc.io/docs/v11/server/routers\n */\n router: createRouterFactory<$Root>(config),\n /**\n * Merge Routers\n * @see https://trpc.io/docs/v11/server/merging-routers\n */\n mergeRouters,\n /**\n * Create a server-side caller for a router\n * @see https://trpc.io/docs/v11/server/server-side-calls\n */\n createCallerFactory: createCallerFactory<$Root>(),\n };\n }\n}\n\n/**\n * Builder to initialize the tRPC root object - use this exactly once per backend\n * @see https://trpc.io/docs/v11/quickstart\n */\nexport const initTRPC = new TRPCBuilder();\nexport type { TRPCBuilder };\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllProductsForCache,\n getAllStoresForCache,\n getAllDeliverySlotsForCache,\n getAllSpecialDealsForCache,\n getAllProductTagsForCache,\n getProductById as getProductByIdFromDb,\n type ProductBasicData,\n type StoreBasicData,\n type DeliverySlotData,\n type SpecialDealData,\n type ProductTagData,\n} from '@/src/dbService'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\n\n// Uniform Product Type (matches getProductDetails return)\ninterface Product {\n id: number\n name: string\n shortDescription: string | null\n longDescription: string | null\n price: string\n marketPrice: string | null\n unitNotation: string\n images: string[]\n isOutOfStock: boolean\n store: { id: number; name: string; description: string | null } | null\n incrementStep: number\n productQuantity: number\n isFlashAvailable: boolean\n flashPrice: string | null\n deliverySlots: Array<{ id: number; deliveryTime: Date; freezeTime: Date; isCapacityFull: boolean }>\n specialDeals: Array<{ quantity: string; price: string; validTill: Date }>\n productTags: string[]\n}\n\nexport async function initializeProducts(): Promise {\n try {\n console.log('Initializing product store in Redis...')\n\n // Fetch all products with full details (similar to productMega logic)\n const productsData = await getAllProductsForCache()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { productInfo, units } from '@/src/db/schema'\n\n const productsData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n longDescription: productInfo.longDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n storeId: productInfo.storeId,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n productQuantity: productInfo.productQuantity,\n isFlashAvailable: productInfo.isFlashAvailable,\n flashPrice: productInfo.flashPrice,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id));\n */\n\n // Fetch all stores\n const allStores = await getAllStoresForCache()\n const storeMap = new Map(allStores.map((s) => [s.id, s]))\n\n // Fetch all delivery slots (excluding full capacity slots)\n const allDeliverySlots = await getAllDeliverySlotsForCache()\n const deliverySlotsMap = new Map()\n for (const slot of allDeliverySlots) {\n if (!deliverySlotsMap.has(slot.productId))\n deliverySlotsMap.set(slot.productId, [])\n deliverySlotsMap.get(slot.productId)!.push(slot)\n }\n\n // Fetch all special deals\n const allSpecialDeals = await getAllSpecialDealsForCache()\n const specialDealsMap = new Map()\n for (const deal of allSpecialDeals) {\n if (!specialDealsMap.has(deal.productId))\n specialDealsMap.set(deal.productId, [])\n specialDealsMap.get(deal.productId)!.push(deal)\n }\n\n // Fetch all product tags\n const allProductTags = await getAllProductTagsForCache()\n const productTagsMap = new Map()\n for (const tag of allProductTags) {\n if (!productTagsMap.has(tag.productId))\n productTagsMap.set(tag.productId, [])\n productTagsMap.get(tag.productId)!.push(tag.tagName)\n }\n\n // Store each product in Redis\n // for (const product of productsData) {\n // const signedImages = scaffoldAssetUrl(\n // (product.images as string[]) || []\n // )\n // const store = product.storeId\n // ? storeMap.get(product.storeId) || null\n // : null\n // const deliverySlots = deliverySlotsMap.get(product.id) || []\n // const specialDeals = specialDealsMap.get(product.id) || []\n // const productTags = productTagsMap.get(product.id) || []\n //\n // const productObj: Product = {\n // id: product.id,\n // name: product.name,\n // shortDescription: product.shortDescription,\n // longDescription: product.longDescription,\n // price: product.price.toString(),\n // marketPrice: product.marketPrice?.toString() || null,\n // unitNotation: product.unitShortNotation,\n // images: signedImages,\n // isOutOfStock: product.isOutOfStock,\n // store: store\n // ? { id: store.id, name: store.name, description: store.description }\n // : null,\n // incrementStep: product.incrementStep,\n // productQuantity: product.productQuantity,\n // isFlashAvailable: product.isFlashAvailable,\n // flashPrice: product.flashPrice?.toString() || null,\n // deliverySlots: deliverySlots.map((s) => ({\n // id: s.id,\n // deliveryTime: s.deliveryTime,\n // freezeTime: s.freezeTime,\n // isCapacityFull: s.isCapacityFull,\n // })),\n // specialDeals: specialDeals.map((d) => ({\n // quantity: d.quantity.toString(),\n // price: d.price.toString(),\n // validTill: d.validTill,\n // })),\n // productTags: productTags,\n // }\n //\n // await redisClient.set(`product:${product.id}`, JSON.stringify(productObj))\n // }\n\n console.log('Product store initialized successfully')\n } catch (error) {\n console.error('Error initializing product store:', error)\n }\n}\n\nexport async function getProductById(id: number): Promise {\n try {\n // const key = `product:${id}`\n // const data = await redisClient.get(key)\n // if (!data) return null\n // return JSON.parse(data) as Product\n\n const product = await getProductByIdFromDb(id)\n if (!product) return null\n\n const signedImages = scaffoldAssetUrl(\n (product.images as string[]) || []\n )\n\n // Fetch store info\n const allStores = await getAllStoresForCache()\n const store = product.storeId\n ? allStores.find(s => s.id === product.storeId) || null\n : null\n\n // Fetch delivery slots for this product\n const allDeliverySlots = await getAllDeliverySlotsForCache()\n const productSlots = allDeliverySlots.filter(s => s.productId === id)\n\n // Fetch special deals for this product\n const allSpecialDeals = await getAllSpecialDealsForCache()\n const productDeals = allSpecialDeals.filter(d => d.productId === id)\n\n // Fetch product tags for this product\n const allProductTags = await getAllProductTagsForCache()\n const productTagNames = allProductTags\n .filter(t => t.productId === id)\n .map(t => t.tagName)\n\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n longDescription: product.longDescription,\n price: product.price.toString(),\n marketPrice: product.marketPrice?.toString() || null,\n unitNotation: product.unit.shortNotation,\n images: signedImages,\n isOutOfStock: product.isOutOfStock,\n store: store\n ? { id: store.id, name: store.name, description: store.description }\n : null,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n isFlashAvailable: product.isFlashAvailable,\n flashPrice: product.flashPrice?.toString() || null,\n deliverySlots: productSlots.map((s) => ({\n id: s.id,\n deliveryTime: s.deliveryTime,\n freezeTime: s.freezeTime,\n isCapacityFull: s.isCapacityFull,\n })),\n specialDeals: productDeals.map((d) => ({\n quantity: d.quantity.toString(),\n price: d.price.toString(),\n validTill: d.validTill,\n })),\n productTags: productTagNames,\n }\n } catch (error) {\n console.error(`Error getting product ${id}:`, error)\n return null\n }\n}\n\nexport async function getAllProducts(): Promise {\n try {\n // Get all keys matching the pattern \"product:*\"\n // const keys = await redisClient.KEYS('product:*')\n //\n // if (keys.length === 0) {\n // return []\n // }\n //\n // // Get all products using MGET for better performance\n // const productsData = await redisClient.MGET(keys)\n //\n // const products: Product[] = []\n // for (const productData of productsData) {\n // if (productData) {\n // products.push(JSON.parse(productData) as Product)\n // }\n // }\n //\n // return products\n\n const productsData = await getAllProductsForCache()\n\n const allStores = await getAllStoresForCache()\n const storeMap = new Map(allStores.map((s) => [s.id, s]))\n\n const allDeliverySlots = await getAllDeliverySlotsForCache()\n const deliverySlotsMap = new Map()\n for (const slot of allDeliverySlots) {\n if (!deliverySlotsMap.has(slot.productId))\n deliverySlotsMap.set(slot.productId, [])\n deliverySlotsMap.get(slot.productId)!.push(slot)\n }\n\n const allSpecialDeals = await getAllSpecialDealsForCache()\n const specialDealsMap = new Map()\n for (const deal of allSpecialDeals) {\n if (!specialDealsMap.has(deal.productId))\n specialDealsMap.set(deal.productId, [])\n specialDealsMap.get(deal.productId)!.push(deal)\n }\n\n const allProductTags = await getAllProductTagsForCache()\n const productTagsMap = new Map()\n for (const tag of allProductTags) {\n if (!productTagsMap.has(tag.productId))\n productTagsMap.set(tag.productId, [])\n productTagsMap.get(tag.productId)!.push(tag.tagName)\n }\n\n const products: Product[] = []\n for (const product of productsData) {\n const signedImages = scaffoldAssetUrl(\n (product.images as string[]) || []\n )\n const store = product.storeId\n ? storeMap.get(product.storeId) || null\n : null\n const deliverySlots = deliverySlotsMap.get(product.id) || []\n const specialDeals = specialDealsMap.get(product.id) || []\n const productTags = productTagsMap.get(product.id) || []\n\n products.push({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n longDescription: product.longDescription,\n price: product.price.toString(),\n marketPrice: product.marketPrice?.toString() || null,\n unitNotation: product.unitShortNotation,\n images: signedImages,\n isOutOfStock: product.isOutOfStock,\n store: store\n ? { id: store.id, name: store.name, description: store.description }\n : null,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n isFlashAvailable: product.isFlashAvailable,\n flashPrice: product.flashPrice?.toString() || null,\n deliverySlots: deliverySlots.map((s) => ({\n id: s.id,\n deliveryTime: s.deliveryTime,\n freezeTime: s.freezeTime,\n isCapacityFull: s.isCapacityFull,\n })),\n specialDeals: specialDeals.map((d) => ({\n quantity: d.quantity.toString(),\n price: d.price.toString(),\n validTill: d.validTill,\n })),\n productTags: productTags,\n })\n }\n\n return products\n } catch (error) {\n console.error('Error getting all products:', error)\n return []\n }\n}\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllTagsForCache,\n getAllTagProductMappings,\n getAllProductTags,\n getProductTagById as getProductTagByIdFromDb,\n type TagBasicData,\n type TagProductMapping,\n} from '@/src/dbService'\nimport { generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\n\n// Tag Type (matches getDashboardTags return)\ninterface Tag {\n id: number\n tagName: string\n tagDescription: string | null\n imageUrl: string | null\n isDashboardTag: boolean\n relatedStores: number[]\n productIds: number[]\n}\n\nasync function transformTagToStoreTag(tag: {\n id: number\n tagName: string\n tagDescription: string | null\n imageUrl: string | null\n isDashboardTag: boolean\n relatedStores: unknown\n products?: Array<{ productId: number }>\n}): Promise {\n const signedImageUrl = tag.imageUrl\n ? await generateSignedUrlFromS3Url(tag.imageUrl)\n : null\n\n return {\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription,\n imageUrl: signedImageUrl,\n isDashboardTag: tag.isDashboardTag,\n relatedStores: (tag.relatedStores as number[]) || [],\n productIds: tag.products ? tag.products.map(p => p.productId) : [],\n }\n}\n\nexport async function initializeProductTagStore(): Promise {\n try {\n console.log('Initializing product tag store in Redis...')\n\n // Fetch all tags\n const tagsData = await getAllTagsForCache()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { productTagInfo } from '@/src/db/schema'\n\n const tagsData = await db\n .select({\n id: productTagInfo.id,\n tagName: productTagInfo.tagName,\n tagDescription: productTagInfo.tagDescription,\n imageUrl: productTagInfo.imageUrl,\n isDashboardTag: productTagInfo.isDashboardTag,\n relatedStores: productTagInfo.relatedStores,\n })\n .from(productTagInfo);\n */\n\n // Fetch product IDs for each tag\n const productTagsData = await getAllTagProductMappings()\n\n /*\n // Old implementation - direct DB queries:\n import { productTags } from '@/src/db/schema'\n import { inArray } from 'drizzle-orm'\n\n const tagIds = tagsData.map(t => t.id);\n const productTagsData = await db\n .select({\n tagId: productTags.tagId,\n productId: productTags.productId,\n })\n .from(productTags)\n .where(inArray(productTags.tagId, tagIds));\n */\n\n // Group product IDs by tag\n const productIdsByTag = new Map()\n for (const pt of productTagsData) {\n if (!productIdsByTag.has(pt.tagId)) {\n productIdsByTag.set(pt.tagId, [])\n }\n productIdsByTag.get(pt.tagId)!.push(pt.productId)\n }\n\n // Store each tag in Redis\n // for (const tag of tagsData) {\n // const signedImageUrl = tag.imageUrl\n // ? await generateSignedUrlFromS3Url(tag.imageUrl)\n // : null\n //\n // const tagObj: Tag = {\n // id: tag.id,\n // tagName: tag.tagName,\n // tagDescription: tag.tagDescription,\n // imageUrl: signedImageUrl,\n // isDashboardTag: tag.isDashboardTag,\n // relatedStores: (tag.relatedStores as number[]) || [],\n // productIds: productIdsByTag.get(tag.id) || [],\n // }\n //\n // await redisClient.set(`tag:${tag.id}`, JSON.stringify(tagObj))\n // }\n\n console.log('Product tag store initialized successfully')\n } catch (error) {\n console.error('Error initializing product tag store:', error)\n }\n}\n\nexport async function getTagById(id: number): Promise {\n try {\n // const key = `tag:${id}`\n // const data = await redisClient.get(key)\n // if (!data) return null\n // return JSON.parse(data) as Tag\n\n const tag = await getProductTagByIdFromDb(id)\n if (!tag) return null\n\n return transformTagToStoreTag(tag)\n } catch (error) {\n console.error(`Error getting tag ${id}:`, error)\n return null\n }\n}\n\nexport async function getAllTags(): Promise {\n try {\n // Get all keys matching the pattern \"tag:*\"\n // const keys = await redisClient.KEYS('tag:*')\n //\n // if (keys.length === 0) {\n // return []\n // }\n //\n // // Get all tags using MGET for better performance\n // const tagsData = await redisClient.MGET(keys)\n //\n // const tags: Tag[] = []\n // for (const tagData of tagsData) {\n // if (tagData) {\n // tags.push(JSON.parse(tagData) as Tag)\n // }\n // }\n //\n // return tags\n\n const tags = await getAllProductTags()\n\n const result: Tag[] = []\n for (const tag of tags) {\n result.push(await transformTagToStoreTag(tag))\n }\n return result\n } catch (error) {\n console.error('Error getting all tags:', error)\n return []\n }\n}\n\nexport async function getDashboardTags(): Promise {\n try {\n // Get all keys matching the pattern \"tag:*\"\n // const keys = await redisClient.KEYS('tag:*')\n //\n // if (keys.length === 0) {\n // return []\n // }\n //\n // // Get all tags using MGET for better performance\n // const tagsData = await redisClient.MGET(keys)\n //\n // const dashboardTags: Tag[] = []\n // for (const tagData of tagsData) {\n // if (tagData) {\n // const tag = JSON.parse(tagData) as Tag\n // if (tag.isDashboardTag) {\n // dashboardTags.push(tag)\n // }\n // }\n // }\n //\n // return dashboardTags\n\n const tags = await getAllProductTags()\n\n const result: Tag[] = []\n for (const tag of tags) {\n if (tag.isDashboardTag) {\n result.push(await transformTagToStoreTag(tag))\n }\n }\n return result\n } catch (error) {\n console.error('Error getting dashboard tags:', error)\n return []\n }\n}\n\nexport async function getTagsByStoreId(storeId: number): Promise {\n try {\n // Get all keys matching the pattern \"tag:*\"\n // const keys = await redisClient.KEYS('tag:*')\n //\n // if (keys.length === 0) {\n // return []\n // }\n //\n // // Get all tags using MGET for better performance\n // const tagsData = await redisClient.MGET(keys)\n //\n // const storeTags: Tag[] = []\n // for (const tagData of tagsData) {\n // if (tagData) {\n // const tag = JSON.parse(tagData) as Tag\n // if (tag.relatedStores.includes(storeId)) {\n // storeTags.push(tag)\n // }\n // }\n // }\n //\n // return storeTags\n\n const tags = await getAllProductTags()\n\n const result: Tag[] = []\n for (const tag of tags) {\n const relatedStores = (tag.relatedStores as number[]) || []\n if (relatedStores.includes(storeId)) {\n result.push(await transformTagToStoreTag(tag))\n }\n }\n return result\n } catch (error) {\n console.error(`Error getting tags for store ${storeId}:`, error)\n return []\n }\n}\n", "import { Hono } from 'hono';\n\nconst router = new Hono();\n\nrouter.get('/', (c) => {\n return c.json({\n status: 'ok',\n message: 'Health check passed',\n timestamp: new Date().toISOString(),\n });\n});\n\nexport default router;\n", "import { Context, Next } from 'hono';\nimport { jwtVerify } from 'jose';\nimport { getStaffUserById, isUserSuspended } from '@/src/dbService';\nimport { ApiError } from '@/src/lib/api-error';\nimport { encodedJwtSecret } from '@/src/lib/env-exporter';\n\ninterface UserContext {\n userId: number;\n name?: string;\n email?: string;\n mobile?: string;\n}\n\ninterface StaffContext {\n id: number;\n name: string;\n}\n\nexport const authenticateUser = async (c: Context, next: Next) => {\n try {\n const authHeader = c.req.header('authorization');\n\n if (!authHeader?.startsWith('Bearer ')) {\n throw new ApiError('Authorization token required', 401);\n }\n\n const token = authHeader.substring(7);\n console.log(c.req.header)\n\n const { payload } = await jwtVerify(token, encodedJwtSecret);\n const decoded = payload as any;\n\n // Check if this is a staff token (has staffId)\n if (decoded.staffId) {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { staffUsers } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n const staff = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.id, decoded.staffId),\n });\n */\n\n // This is a staff token, verify staff exists\n const staff = await getStaffUserById(decoded.staffId);\n\n if (!staff) {\n throw new ApiError('Invalid staff token', 401);\n }\n\n c.set('staffUser', {\n id: staff.id,\n name: staff.name,\n });\n } else {\n // This is a regular user token\n c.set('user', decoded);\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { userDetails } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n const details = await db.query.userDetails.findFirst({\n where: eq(userDetails.userId, decoded.userId),\n });\n\n if (details?.isSuspended) {\n throw new ApiError('Account suspended', 403);\n }\n */\n\n // Check if user is suspended\n const suspended = await isUserSuspended(decoded.userId);\n\n if (suspended) {\n throw new ApiError('Account suspended', 403);\n }\n }\n\n await next();\n } catch (error) {\n throw error;\n }\n};\n", "import { router, publicProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport { adminRouter } from '@/src/trpc/apis/admin-apis/apis/admin-trpc-index'\nimport { userRouter } from '@/src/trpc/apis/user-apis/apis/user-trpc-index'\nimport { commonApiRouter } from '@/src/trpc/apis/common-apis/common-trpc-index'\nimport { scaffoldProducts } from './apis/common-apis/common';\nimport { scaffoldStores, scaffoldStoreWithProducts } from './apis/user-apis/apis/stores';\nimport { scaffoldSlotsWithProducts } from './apis/user-apis/apis/slots';\nimport { scaffoldEssentialConsts } from './apis/common-apis/common-trpc-index';\nimport { scaffoldBanners } from './apis/user-apis/apis/banners';\n\n// Create the main app router\nexport const appRouter = router({\n hello: publicProcedure\n .input(z.object({ name: z.string() }))\n .query(({ input }) => {\n return { greeting: `Hello ${input.name}!` };\n }),\n admin: adminRouter,\n user: userRouter,\n common: commonApiRouter,\n});\n\n\n// Export type definition of API\nexport type AppRouter = typeof appRouter;\n\nexport type AllProductsApiType = Awaited>;\nexport type StoresApiType = Awaited>;\nexport type SlotsApiType = Awaited>;\nexport type EssentialConstsApiType = Awaited>;\nexport type BannersApiType = Awaited>;\nexport type StoreWithProductsApiType = Awaited>;\n", "import * as z from \"./v4/classic/external.js\";\nexport * from \"./v4/classic/external.js\";\nexport { z };\nexport default z;\n", "export * as core from \"../core/index.js\";\nexport * from \"./schemas.js\";\nexport * from \"./checks.js\";\nexport * from \"./errors.js\";\nexport * from \"./parse.js\";\nexport * from \"./compat.js\";\n// zod-specified\nimport { config } from \"../core/index.js\";\nimport en from \"../locales/en.js\";\nconfig(en());\nexport { globalRegistry, registry, config, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, } from \"../core/index.js\";\nexport { toJSONSchema } from \"../core/json-schema-processors.js\";\nexport { fromJSONSchema } from \"./from-json-schema.js\";\nexport * as locales from \"../locales/index.js\";\n// iso\n// must be exported from top-level\n// https://github.com/colinhacks/zod/issues/4491\nexport { ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration } from \"./iso.js\";\nexport * as iso from \"./iso.js\";\nexport * as coerce from \"./coerce.js\";\n", "export * from \"./core.js\";\nexport * from \"./parse.js\";\nexport * from \"./errors.js\";\nexport * from \"./schemas.js\";\nexport * from \"./checks.js\";\nexport * from \"./versions.js\";\nexport * as util from \"./util.js\";\nexport * as regexes from \"./regexes.js\";\nexport * as locales from \"../locales/index.js\";\nexport * from \"./registries.js\";\nexport * from \"./doc.js\";\nexport * from \"./api.js\";\nexport * from \"./to-json-schema.js\";\nexport { toJSONSchema } from \"./json-schema-processors.js\";\nexport { JSONSchemaGenerator } from \"./json-schema-generator.js\";\nexport * as JSONSchema from \"./json-schema.js\";\n", "/** A special constant with type `never` */\nexport const NEVER = Object.freeze({\n status: \"aborted\",\n});\nexport /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, params) {\n function init(inst, def) {\n if (!inst._zod) {\n Object.defineProperty(inst, \"_zod\", {\n value: {\n def,\n constr: _,\n traits: new Set(),\n },\n enumerable: false,\n });\n }\n if (inst._zod.traits.has(name)) {\n return;\n }\n inst._zod.traits.add(name);\n initializer(inst, def);\n // support prototype modifications\n const proto = _.prototype;\n const keys = Object.keys(proto);\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i];\n if (!(k in inst)) {\n inst[k] = proto[k].bind(inst);\n }\n }\n }\n // doesn't work if Parent has a constructor with arguments\n const Parent = params?.Parent ?? Object;\n class Definition extends Parent {\n }\n Object.defineProperty(Definition, \"name\", { value: name });\n function _(def) {\n var _a;\n const inst = params?.Parent ? new Definition() : this;\n init(inst, def);\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n for (const fn of inst._zod.deferred) {\n fn();\n }\n return inst;\n }\n Object.defineProperty(_, \"init\", { value: init });\n Object.defineProperty(_, Symbol.hasInstance, {\n value: (inst) => {\n if (params?.Parent && inst instanceof params.Parent)\n return true;\n return inst?._zod?.traits?.has(name);\n },\n });\n Object.defineProperty(_, \"name\", { value: name });\n return _;\n}\n////////////////////////////// UTILITIES ///////////////////////////////////////\nexport const $brand = Symbol(\"zod_brand\");\nexport class $ZodAsyncError extends Error {\n constructor() {\n super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n }\n}\nexport class $ZodEncodeError extends Error {\n constructor(name) {\n super(`Encountered unidirectional transform during encode: ${name}`);\n this.name = \"ZodEncodeError\";\n }\n}\nexport const globalConfig = {};\nexport function config(newConfig) {\n if (newConfig)\n Object.assign(globalConfig, newConfig);\n return globalConfig;\n}\n", "import * as core from \"./core.js\";\nimport * as errors from \"./errors.js\";\nimport * as util from \"./util.js\";\nexport const _parse = (_Err) => (schema, value, _ctx, _params) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n if (result.issues.length) {\n const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, _params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parse = /* @__PURE__*/ _parse(errors.$ZodRealError);\nexport const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n if (result.issues.length) {\n const e = new (params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parseAsync = /* @__PURE__*/ _parseAsync(errors.$ZodRealError);\nexport const _safeParse = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n return result.issues.length\n ? {\n success: false,\n error: new (_Err ?? errors.$ZodError)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodRealError);\nexport const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n return result.issues.length\n ? {\n success: false,\n error: new _Err(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodRealError);\nexport const _encode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _parse(_Err)(schema, value, ctx);\n};\nexport const encode = /* @__PURE__*/ _encode(errors.$ZodRealError);\nexport const _decode = (_Err) => (schema, value, _ctx) => {\n return _parse(_Err)(schema, value, _ctx);\n};\nexport const decode = /* @__PURE__*/ _decode(errors.$ZodRealError);\nexport const _encodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _parseAsync(_Err)(schema, value, ctx);\n};\nexport const encodeAsync = /* @__PURE__*/ _encodeAsync(errors.$ZodRealError);\nexport const _decodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _parseAsync(_Err)(schema, value, _ctx);\n};\nexport const decodeAsync = /* @__PURE__*/ _decodeAsync(errors.$ZodRealError);\nexport const _safeEncode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _safeParse(_Err)(schema, value, ctx);\n};\nexport const safeEncode = /* @__PURE__*/ _safeEncode(errors.$ZodRealError);\nexport const _safeDecode = (_Err) => (schema, value, _ctx) => {\n return _safeParse(_Err)(schema, value, _ctx);\n};\nexport const safeDecode = /* @__PURE__*/ _safeDecode(errors.$ZodRealError);\nexport const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _safeParseAsync(_Err)(schema, value, ctx);\n};\nexport const safeEncodeAsync = /* @__PURE__*/ _safeEncodeAsync(errors.$ZodRealError);\nexport const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _safeParseAsync(_Err)(schema, value, _ctx);\n};\nexport const safeDecodeAsync = /* @__PURE__*/ _safeDecodeAsync(errors.$ZodRealError);\n", "import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n Object.defineProperty(inst, \"_zod\", {\n value: inst._zod,\n enumerable: false,\n });\n Object.defineProperty(inst, \"issues\", {\n value: def,\n enumerable: false,\n });\n inst.message = JSON.stringify(def, util.jsonStringifyReplacer, 2);\n Object.defineProperty(inst, \"toString\", {\n value: () => inst.message,\n enumerable: false,\n });\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, { Parent: Error });\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues });\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues });\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a, _b;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, issue.path));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_b = curr.items)[el] ?? (_b[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * \u2716 Expected number, received string at \"username\n * favoriteNumbers[0]\n * \u2716 Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n const segs = [];\n const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`\u2716 ${issue.message}`);\n if (issue.path?.length)\n lines.push(` \u2192 at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\\n\");\n}\n", "// functions\nexport function assertEqual(val) {\n return val;\n}\nexport function assertNotEqual(val) {\n return val;\n}\nexport function assertIs(_arg) { }\nexport function assertNever(_x) {\n throw new Error(\"Unexpected value in exhaustive check\");\n}\nexport function assert(_) { }\nexport function getEnumValues(entries) {\n const numericValues = Object.values(entries).filter((v) => typeof v === \"number\");\n const values = Object.entries(entries)\n .filter(([k, _]) => numericValues.indexOf(+k) === -1)\n .map(([_, v]) => v);\n return values;\n}\nexport function joinValues(array, separator = \"|\") {\n return array.map((val) => stringifyPrimitive(val)).join(separator);\n}\nexport function jsonStringifyReplacer(_, value) {\n if (typeof value === \"bigint\")\n return value.toString();\n return value;\n}\nexport function cached(getter) {\n const set = false;\n return {\n get value() {\n if (!set) {\n const value = getter();\n Object.defineProperty(this, \"value\", { value });\n return value;\n }\n throw new Error(\"cached value already set\");\n },\n };\n}\nexport function nullish(input) {\n return input === null || input === undefined;\n}\nexport function cleanRegex(source) {\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n return source.slice(start, end);\n}\nexport function floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepString = step.toString();\n let stepDecCount = (stepString.split(\".\")[1] || \"\").length;\n if (stepDecCount === 0 && /\\d?e-\\d?/.test(stepString)) {\n const match = stepString.match(/\\d?e-(\\d?)/);\n if (match?.[1]) {\n stepDecCount = Number.parseInt(match[1]);\n }\n }\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / 10 ** decCount;\n}\nconst EVALUATING = Symbol(\"evaluating\");\nexport function defineLazy(object, key, getter) {\n let value = undefined;\n Object.defineProperty(object, key, {\n get() {\n if (value === EVALUATING) {\n // Circular reference detected, return undefined to break the cycle\n return undefined;\n }\n if (value === undefined) {\n value = EVALUATING;\n value = getter();\n }\n return value;\n },\n set(v) {\n Object.defineProperty(object, key, {\n value: v,\n // configurable: true,\n });\n // object[key] = v;\n },\n configurable: true,\n });\n}\nexport function objectClone(obj) {\n return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));\n}\nexport function assignProp(target, prop, value) {\n Object.defineProperty(target, prop, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n}\nexport function mergeDefs(...defs) {\n const mergedDescriptors = {};\n for (const def of defs) {\n const descriptors = Object.getOwnPropertyDescriptors(def);\n Object.assign(mergedDescriptors, descriptors);\n }\n return Object.defineProperties({}, mergedDescriptors);\n}\nexport function cloneDef(schema) {\n return mergeDefs(schema._zod.def);\n}\nexport function getElementAtPath(obj, path) {\n if (!path)\n return obj;\n return path.reduce((acc, key) => acc?.[key], obj);\n}\nexport function promiseAllObject(promisesObj) {\n const keys = Object.keys(promisesObj);\n const promises = keys.map((key) => promisesObj[key]);\n return Promise.all(promises).then((results) => {\n const resolvedObj = {};\n for (let i = 0; i < keys.length; i++) {\n resolvedObj[keys[i]] = results[i];\n }\n return resolvedObj;\n });\n}\nexport function randomString(length = 10) {\n const chars = \"abcdefghijklmnopqrstuvwxyz\";\n let str = \"\";\n for (let i = 0; i < length; i++) {\n str += chars[Math.floor(Math.random() * chars.length)];\n }\n return str;\n}\nexport function esc(str) {\n return JSON.stringify(str);\n}\nexport function slugify(input) {\n return input\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/[\\s_-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\nexport const captureStackTrace = (\"captureStackTrace\" in Error ? Error.captureStackTrace : (..._args) => { });\nexport function isObject(data) {\n return typeof data === \"object\" && data !== null && !Array.isArray(data);\n}\nexport const allowsEval = cached(() => {\n // @ts-ignore\n if (typeof navigator !== \"undefined\" && navigator?.userAgent?.includes(\"Cloudflare\")) {\n return false;\n }\n try {\n const F = Function;\n new F(\"\");\n return true;\n }\n catch (_) {\n return false;\n }\n});\nexport function isPlainObject(o) {\n if (isObject(o) === false)\n return false;\n // modified constructor\n const ctor = o.constructor;\n if (ctor === undefined)\n return true;\n if (typeof ctor !== \"function\")\n return true;\n // modified prototype\n const prot = ctor.prototype;\n if (isObject(prot) === false)\n return false;\n // ctor doesn't have static `isPrototypeOf`\n if (Object.prototype.hasOwnProperty.call(prot, \"isPrototypeOf\") === false) {\n return false;\n }\n return true;\n}\nexport function shallowClone(o) {\n if (isPlainObject(o))\n return { ...o };\n if (Array.isArray(o))\n return [...o];\n return o;\n}\nexport function numKeys(data) {\n let keyCount = 0;\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n keyCount++;\n }\n }\n return keyCount;\n}\nexport const getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return \"undefined\";\n case \"string\":\n return \"string\";\n case \"number\":\n return Number.isNaN(data) ? \"nan\" : \"number\";\n case \"boolean\":\n return \"boolean\";\n case \"function\":\n return \"function\";\n case \"bigint\":\n return \"bigint\";\n case \"symbol\":\n return \"symbol\";\n case \"object\":\n if (Array.isArray(data)) {\n return \"array\";\n }\n if (data === null) {\n return \"null\";\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return \"promise\";\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return \"map\";\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return \"set\";\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return \"date\";\n }\n // @ts-ignore\n if (typeof File !== \"undefined\" && data instanceof File) {\n return \"file\";\n }\n return \"object\";\n default:\n throw new Error(`Unknown data type: ${t}`);\n }\n};\nexport const propertyKeyTypes = new Set([\"string\", \"number\", \"symbol\"]);\nexport const primitiveTypes = new Set([\"string\", \"number\", \"bigint\", \"boolean\", \"symbol\", \"undefined\"]);\nexport function escapeRegex(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n// zod-specific utils\nexport function clone(inst, def, params) {\n const cl = new inst._zod.constr(def ?? inst._zod.def);\n if (!def || params?.parent)\n cl._zod.parent = inst;\n return cl;\n}\nexport function normalizeParams(_params) {\n const params = _params;\n if (!params)\n return {};\n if (typeof params === \"string\")\n return { error: () => params };\n if (params?.message !== undefined) {\n if (params?.error !== undefined)\n throw new Error(\"Cannot specify both `message` and `error` params\");\n params.error = params.message;\n }\n delete params.message;\n if (typeof params.error === \"string\")\n return { ...params, error: () => params.error };\n return params;\n}\nexport function createTransparentProxy(getter) {\n let target;\n return new Proxy({}, {\n get(_, prop, receiver) {\n target ?? (target = getter());\n return Reflect.get(target, prop, receiver);\n },\n set(_, prop, value, receiver) {\n target ?? (target = getter());\n return Reflect.set(target, prop, value, receiver);\n },\n has(_, prop) {\n target ?? (target = getter());\n return Reflect.has(target, prop);\n },\n deleteProperty(_, prop) {\n target ?? (target = getter());\n return Reflect.deleteProperty(target, prop);\n },\n ownKeys(_) {\n target ?? (target = getter());\n return Reflect.ownKeys(target);\n },\n getOwnPropertyDescriptor(_, prop) {\n target ?? (target = getter());\n return Reflect.getOwnPropertyDescriptor(target, prop);\n },\n defineProperty(_, prop, descriptor) {\n target ?? (target = getter());\n return Reflect.defineProperty(target, prop, descriptor);\n },\n });\n}\nexport function stringifyPrimitive(value) {\n if (typeof value === \"bigint\")\n return value.toString() + \"n\";\n if (typeof value === \"string\")\n return `\"${value}\"`;\n return `${value}`;\n}\nexport function optionalKeys(shape) {\n return Object.keys(shape).filter((k) => {\n return shape[k]._zod.optin === \"optional\" && shape[k]._zod.optout === \"optional\";\n });\n}\nexport const NUMBER_FORMAT_RANGES = {\n safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],\n int32: [-2147483648, 2147483647],\n uint32: [0, 4294967295],\n float32: [-3.4028234663852886e38, 3.4028234663852886e38],\n float64: [-Number.MAX_VALUE, Number.MAX_VALUE],\n};\nexport const BIGINT_FORMAT_RANGES = {\n int64: [/* @__PURE__*/ BigInt(\"-9223372036854775808\"), /* @__PURE__*/ BigInt(\"9223372036854775807\")],\n uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt(\"18446744073709551615\")],\n};\nexport function pick(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".pick() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = {};\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n newShape[key] = currDef.shape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function omit(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".omit() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = { ...schema._zod.def.shape };\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n delete newShape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function extend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to extend: expected a plain object\");\n }\n const checks = schema._zod.def.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n // Only throw if new shape overlaps with existing shape\n // Use getOwnPropertyDescriptor to check key existence without accessing values\n const existingShape = schema._zod.def.shape;\n for (const key in shape) {\n if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {\n throw new Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\");\n }\n }\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function safeExtend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to safeExtend: expected a plain object\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function merge(a, b) {\n const def = mergeDefs(a._zod.def, {\n get shape() {\n const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n get catchall() {\n return b._zod.def.catchall;\n },\n checks: [], // delete existing checks\n });\n return clone(a, def);\n}\nexport function partial(Class, schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".partial() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in oldShape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n else {\n for (const key in oldShape) {\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function required(Class, schema, mask) {\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n else {\n for (const key in oldShape) {\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n });\n return clone(schema, def);\n}\n// invalid_type | too_big | too_small | invalid_format | not_multiple_of | unrecognized_keys | invalid_union | invalid_key | invalid_element | invalid_value | custom\nexport function aborted(x, startIndex = 0) {\n if (x.aborted === true)\n return true;\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue !== true) {\n return true;\n }\n }\n return false;\n}\nexport function prefixIssues(path, issues) {\n return issues.map((iss) => {\n var _a;\n (_a = iss).path ?? (_a.path = []);\n iss.path.unshift(path);\n return iss;\n });\n}\nexport function unwrapMessage(message) {\n return typeof message === \"string\" ? message : message?.message;\n}\nexport function finalizeIssue(iss, ctx, config) {\n const full = { ...iss, path: iss.path ?? [] };\n // for backwards compatibility\n if (!iss.message) {\n const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??\n unwrapMessage(ctx?.error?.(iss)) ??\n unwrapMessage(config.customError?.(iss)) ??\n unwrapMessage(config.localeError?.(iss)) ??\n \"Invalid input\";\n full.message = message;\n }\n // delete (full as any).def;\n delete full.inst;\n delete full.continue;\n if (!ctx?.reportInput) {\n delete full.input;\n }\n return full;\n}\nexport function getSizableOrigin(input) {\n if (input instanceof Set)\n return \"set\";\n if (input instanceof Map)\n return \"map\";\n // @ts-ignore\n if (input instanceof File)\n return \"file\";\n return \"unknown\";\n}\nexport function getLengthableOrigin(input) {\n if (Array.isArray(input))\n return \"array\";\n if (typeof input === \"string\")\n return \"string\";\n return \"unknown\";\n}\nexport function parsedType(data) {\n const t = typeof data;\n switch (t) {\n case \"number\": {\n return Number.isNaN(data) ? \"nan\" : \"number\";\n }\n case \"object\": {\n if (data === null) {\n return \"null\";\n }\n if (Array.isArray(data)) {\n return \"array\";\n }\n const obj = data;\n if (obj && Object.getPrototypeOf(obj) !== Object.prototype && \"constructor\" in obj && obj.constructor) {\n return obj.constructor.name;\n }\n }\n }\n return t;\n}\nexport function issue(...args) {\n const [iss, input, inst] = args;\n if (typeof iss === \"string\") {\n return {\n message: iss,\n code: \"custom\",\n input,\n inst,\n };\n }\n return { ...iss };\n}\nexport function cleanEnum(obj) {\n return Object.entries(obj)\n .filter(([k, _]) => {\n // return true if NaN, meaning it's not a number, thus a string key\n return Number.isNaN(Number.parseInt(k, 10));\n })\n .map((el) => el[1]);\n}\n// Codec utility functions\nexport function base64ToUint8Array(base64) {\n const binaryString = atob(base64);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n return bytes;\n}\nexport function uint8ArrayToBase64(bytes) {\n let binaryString = \"\";\n for (let i = 0; i < bytes.length; i++) {\n binaryString += String.fromCharCode(bytes[i]);\n }\n return btoa(binaryString);\n}\nexport function base64urlToUint8Array(base64url) {\n const base64 = base64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padding = \"=\".repeat((4 - (base64.length % 4)) % 4);\n return base64ToUint8Array(base64 + padding);\n}\nexport function uint8ArrayToBase64url(bytes) {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\nexport function hexToUint8Array(hex) {\n const cleanHex = hex.replace(/^0x/, \"\");\n if (cleanHex.length % 2 !== 0) {\n throw new Error(\"Invalid hex string length\");\n }\n const bytes = new Uint8Array(cleanHex.length / 2);\n for (let i = 0; i < cleanHex.length; i += 2) {\n bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);\n }\n return bytes;\n}\nexport function uint8ArrayToHex(bytes) {\n return Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n// instanceof\nexport class Class {\n constructor(..._args) { }\n}\n", "import * as checks from \"./checks.js\";\nimport * as core from \"./core.js\";\nimport { Doc } from \"./doc.js\";\nimport { parse, parseAsync, safeParse, safeParseAsync } from \"./parse.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nimport { version } from \"./versions.js\";\nexport const $ZodType = /*@__PURE__*/ core.$constructor(\"$ZodType\", (inst, def) => {\n var _a;\n inst ?? (inst = {});\n inst._zod.def = def; // set _def property\n inst._zod.bag = inst._zod.bag || {}; // initialize _bag object\n inst._zod.version = version;\n const checks = [...(inst._zod.def.checks ?? [])];\n // if inst is itself a checks.$ZodCheck, run it as a check\n if (inst._zod.traits.has(\"$ZodCheck\")) {\n checks.unshift(inst);\n }\n for (const ch of checks) {\n for (const fn of ch._zod.onattach) {\n fn(inst);\n }\n }\n if (checks.length === 0) {\n // deferred initializer\n // inst._zod.parse is not yet defined\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred?.push(() => {\n inst._zod.run = inst._zod.parse;\n });\n }\n else {\n const runChecks = (payload, checks, ctx) => {\n let isAborted = util.aborted(payload);\n let asyncResult;\n for (const ch of checks) {\n if (ch._zod.def.when) {\n const shouldRun = ch._zod.def.when(payload);\n if (!shouldRun)\n continue;\n }\n else if (isAborted) {\n continue;\n }\n const currLen = payload.issues.length;\n const _ = ch._zod.check(payload);\n if (_ instanceof Promise && ctx?.async === false) {\n throw new core.$ZodAsyncError();\n }\n if (asyncResult || _ instanceof Promise) {\n asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {\n await _;\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n return;\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n });\n }\n else {\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n continue;\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n }\n }\n if (asyncResult) {\n return asyncResult.then(() => {\n return payload;\n });\n }\n return payload;\n };\n const handleCanaryResult = (canary, payload, ctx) => {\n // abort if the canary is aborted\n if (util.aborted(canary)) {\n canary.aborted = true;\n return canary;\n }\n // run checks first, then\n const checkResult = runChecks(payload, checks, ctx);\n if (checkResult instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));\n }\n return inst._zod.parse(checkResult, ctx);\n };\n inst._zod.run = (payload, ctx) => {\n if (ctx.skipChecks) {\n return inst._zod.parse(payload, ctx);\n }\n if (ctx.direction === \"backward\") {\n // run canary\n // initial pass (no checks)\n const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });\n if (canary instanceof Promise) {\n return canary.then((canary) => {\n return handleCanaryResult(canary, payload, ctx);\n });\n }\n return handleCanaryResult(canary, payload, ctx);\n }\n // forward\n const result = inst._zod.parse(payload, ctx);\n if (result instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return result.then((result) => runChecks(result, checks, ctx));\n }\n return runChecks(result, checks, ctx);\n };\n }\n // Lazy initialize ~standard to avoid creating objects for every schema\n util.defineLazy(inst, \"~standard\", () => ({\n validate: (value) => {\n try {\n const r = safeParse(inst, value);\n return r.success ? { value: r.data } : { issues: r.error?.issues };\n }\n catch (_) {\n return safeParseAsync(inst, value).then((r) => (r.success ? { value: r.data } : { issues: r.error?.issues }));\n }\n },\n vendor: \"zod\",\n version: 1,\n }));\n});\nexport { clone } from \"./util.js\";\nexport const $ZodString = /*@__PURE__*/ core.$constructor(\"$ZodString\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? regexes.string(inst._zod.bag);\n inst._zod.parse = (payload, _) => {\n if (def.coerce)\n try {\n payload.value = String(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"string\")\n return payload;\n payload.issues.push({\n expected: \"string\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodStringFormat\", (inst, def) => {\n // check initialization must come first\n checks.$ZodCheckStringFormat.init(inst, def);\n $ZodString.init(inst, def);\n});\nexport const $ZodGUID = /*@__PURE__*/ core.$constructor(\"$ZodGUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.guid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodUUID = /*@__PURE__*/ core.$constructor(\"$ZodUUID\", (inst, def) => {\n if (def.version) {\n const versionMap = {\n v1: 1,\n v2: 2,\n v3: 3,\n v4: 4,\n v5: 5,\n v6: 6,\n v7: 7,\n v8: 8,\n };\n const v = versionMap[def.version];\n if (v === undefined)\n throw new Error(`Invalid UUID version: \"${def.version}\"`);\n def.pattern ?? (def.pattern = regexes.uuid(v));\n }\n else\n def.pattern ?? (def.pattern = regexes.uuid());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodEmail = /*@__PURE__*/ core.$constructor(\"$ZodEmail\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.email);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodURL = /*@__PURE__*/ core.$constructor(\"$ZodURL\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n try {\n // Trim whitespace from input\n const trimmed = payload.value.trim();\n // @ts-ignore\n const url = new URL(trimmed);\n if (def.hostname) {\n def.hostname.lastIndex = 0;\n if (!def.hostname.test(url.hostname)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid hostname\",\n pattern: def.hostname.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n }\n if (def.protocol) {\n def.protocol.lastIndex = 0;\n if (!def.protocol.test(url.protocol.endsWith(\":\") ? url.protocol.slice(0, -1) : url.protocol)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid protocol\",\n pattern: def.protocol.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n }\n // Set the output value based on normalize flag\n if (def.normalize) {\n // Use normalized URL\n payload.value = url.href;\n }\n else {\n // Preserve the original input (trimmed)\n payload.value = trimmed;\n }\n return;\n }\n catch (_) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodEmoji = /*@__PURE__*/ core.$constructor(\"$ZodEmoji\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.emoji());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodNanoID = /*@__PURE__*/ core.$constructor(\"$ZodNanoID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.nanoid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID = /*@__PURE__*/ core.$constructor(\"$ZodCUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID2 = /*@__PURE__*/ core.$constructor(\"$ZodCUID2\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid2);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodULID = /*@__PURE__*/ core.$constructor(\"$ZodULID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ulid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodXID = /*@__PURE__*/ core.$constructor(\"$ZodXID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.xid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodKSUID = /*@__PURE__*/ core.$constructor(\"$ZodKSUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ksuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODateTime = /*@__PURE__*/ core.$constructor(\"$ZodISODateTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.datetime(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODate = /*@__PURE__*/ core.$constructor(\"$ZodISODate\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.date);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISOTime = /*@__PURE__*/ core.$constructor(\"$ZodISOTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.time(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODuration = /*@__PURE__*/ core.$constructor(\"$ZodISODuration\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.duration);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodIPv4 = /*@__PURE__*/ core.$constructor(\"$ZodIPv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv4);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv4`;\n});\nexport const $ZodIPv6 = /*@__PURE__*/ core.$constructor(\"$ZodIPv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv6);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv6`;\n inst._zod.check = (payload) => {\n try {\n // @ts-ignore\n new URL(`http://[${payload.value}]`);\n // return;\n }\n catch {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"ipv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodMAC = /*@__PURE__*/ core.$constructor(\"$ZodMAC\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.mac(def.delimiter));\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `mac`;\n});\nexport const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv4);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n const parts = payload.value.split(\"/\");\n try {\n if (parts.length !== 2)\n throw new Error();\n const [address, prefix] = parts;\n if (!prefix)\n throw new Error();\n const prefixNum = Number(prefix);\n if (`${prefixNum}` !== prefix)\n throw new Error();\n if (prefixNum < 0 || prefixNum > 128)\n throw new Error();\n // @ts-ignore\n new URL(`http://[${address}]`);\n }\n catch {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"cidrv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64(data) {\n if (data === \"\")\n return true;\n if (data.length % 4 !== 0)\n return false;\n try {\n // @ts-ignore\n atob(data);\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodBase64 = /*@__PURE__*/ core.$constructor(\"$ZodBase64\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64\";\n inst._zod.check = (payload) => {\n if (isValidBase64(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64URL(data) {\n if (!regexes.base64url.test(data))\n return false;\n const base64 = data.replace(/[-_]/g, (c) => (c === \"-\" ? \"+\" : \"/\"));\n const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, \"=\");\n return isValidBase64(padded);\n}\nexport const $ZodBase64URL = /*@__PURE__*/ core.$constructor(\"$ZodBase64URL\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64url);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64url\";\n inst._zod.check = (payload) => {\n if (isValidBase64URL(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodE164 = /*@__PURE__*/ core.$constructor(\"$ZodE164\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.e164);\n $ZodStringFormat.init(inst, def);\n});\n////////////////////////////// ZodJWT //////////////////////////////\nexport function isValidJWT(token, algorithm = null) {\n try {\n const tokensParts = token.split(\".\");\n if (tokensParts.length !== 3)\n return false;\n const [header] = tokensParts;\n if (!header)\n return false;\n // @ts-ignore\n const parsedHeader = JSON.parse(atob(header));\n if (\"typ\" in parsedHeader && parsedHeader?.typ !== \"JWT\")\n return false;\n if (!parsedHeader.alg)\n return false;\n if (algorithm && (!(\"alg\" in parsedHeader) || parsedHeader.alg !== algorithm))\n return false;\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodJWT = /*@__PURE__*/ core.$constructor(\"$ZodJWT\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidJWT(payload.value, def.alg))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"jwt\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCustomStringFormat\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (def.fn(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodNumber = /*@__PURE__*/ core.$constructor(\"$ZodNumber\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Number(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"number\" && !Number.isNaN(input) && Number.isFinite(input)) {\n return payload;\n }\n const received = typeof input === \"number\"\n ? Number.isNaN(input)\n ? \"NaN\"\n : !Number.isFinite(input)\n ? \"Infinity\"\n : undefined\n : undefined;\n payload.issues.push({\n expected: \"number\",\n code: \"invalid_type\",\n input,\n inst,\n ...(received ? { received } : {}),\n });\n return payload;\n };\n});\nexport const $ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodNumberFormat\", (inst, def) => {\n checks.$ZodCheckNumberFormat.init(inst, def);\n $ZodNumber.init(inst, def); // no format checks\n});\nexport const $ZodBoolean = /*@__PURE__*/ core.$constructor(\"$ZodBoolean\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.boolean;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Boolean(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"boolean\")\n return payload;\n payload.issues.push({\n expected: \"boolean\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigInt = /*@__PURE__*/ core.$constructor(\"$ZodBigInt\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.bigint;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = BigInt(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"bigint\")\n return payload;\n payload.issues.push({\n expected: \"bigint\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodBigIntFormat\", (inst, def) => {\n checks.$ZodCheckBigIntFormat.init(inst, def);\n $ZodBigInt.init(inst, def); // no format checks\n});\nexport const $ZodSymbol = /*@__PURE__*/ core.$constructor(\"$ZodSymbol\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"symbol\")\n return payload;\n payload.issues.push({\n expected: \"symbol\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodUndefined = /*@__PURE__*/ core.$constructor(\"$ZodUndefined\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.undefined;\n inst._zod.values = new Set([undefined]);\n inst._zod.optin = \"optional\";\n inst._zod.optout = \"optional\";\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"undefined\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodNull = /*@__PURE__*/ core.$constructor(\"$ZodNull\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.null;\n inst._zod.values = new Set([null]);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (input === null)\n return payload;\n payload.issues.push({\n expected: \"null\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodAny = /*@__PURE__*/ core.$constructor(\"$ZodAny\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodUnknown = /*@__PURE__*/ core.$constructor(\"$ZodUnknown\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodNever = /*@__PURE__*/ core.$constructor(\"$ZodNever\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n payload.issues.push({\n expected: \"never\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodVoid = /*@__PURE__*/ core.$constructor(\"$ZodVoid\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"void\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodDate = /*@__PURE__*/ core.$constructor(\"$ZodDate\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce) {\n try {\n payload.value = new Date(payload.value);\n }\n catch (_err) { }\n }\n const input = payload.value;\n const isDate = input instanceof Date;\n const isValidDate = isDate && !Number.isNaN(input.getTime());\n if (isValidDate)\n return payload;\n payload.issues.push({\n expected: \"date\",\n code: \"invalid_type\",\n input,\n ...(isDate ? { received: \"Invalid Date\" } : {}),\n inst,\n });\n return payload;\n };\n});\nfunction handleArrayResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodArray = /*@__PURE__*/ core.$constructor(\"$ZodArray\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n expected: \"array\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = Array(input.length);\n const proms = [];\n for (let i = 0; i < input.length; i++) {\n const item = input[i];\n const result = def.element._zod.run({\n value: item,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleArrayResult(result, payload, i)));\n }\n else {\n handleArrayResult(result, payload, i);\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload; //handleArrayResultsAsync(parseResults, final);\n };\n});\nfunction handlePropertyResult(result, final, key, input, isOptionalOut) {\n if (result.issues.length) {\n // For optional-out schemas, ignore errors on absent keys\n if (isOptionalOut && !(key in input)) {\n return;\n }\n final.issues.push(...util.prefixIssues(key, result.issues));\n }\n if (result.value === undefined) {\n if (key in input) {\n final.value[key] = undefined;\n }\n }\n else {\n final.value[key] = result.value;\n }\n}\nfunction normalizeDef(def) {\n const keys = Object.keys(def.shape);\n for (const k of keys) {\n if (!def.shape?.[k]?._zod?.traits?.has(\"$ZodType\")) {\n throw new Error(`Invalid element at key \"${k}\": expected a Zod schema`);\n }\n }\n const okeys = util.optionalKeys(def.shape);\n return {\n ...def,\n keys,\n keySet: new Set(keys),\n numKeys: keys.length,\n optionalKeys: new Set(okeys),\n };\n}\nfunction handleCatchall(proms, input, payload, ctx, def, inst) {\n const unrecognized = [];\n // iterate over input keys\n const keySet = def.keySet;\n const _catchall = def.catchall._zod;\n const t = _catchall.def.type;\n const isOptionalOut = _catchall.optout === \"optional\";\n for (const key in input) {\n if (keySet.has(key))\n continue;\n if (t === \"never\") {\n unrecognized.push(key);\n continue;\n }\n const r = _catchall.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n }\n else {\n handlePropertyResult(r, payload, key, input, isOptionalOut);\n }\n }\n if (unrecognized.length) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n keys: unrecognized,\n input,\n inst,\n });\n }\n if (!proms.length)\n return payload;\n return Promise.all(proms).then(() => {\n return payload;\n });\n}\nexport const $ZodObject = /*@__PURE__*/ core.$constructor(\"$ZodObject\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodType.init(inst, def);\n // const sh = def.shape;\n const desc = Object.getOwnPropertyDescriptor(def, \"shape\");\n if (!desc?.get) {\n const sh = def.shape;\n Object.defineProperty(def, \"shape\", {\n get: () => {\n const newSh = { ...sh };\n Object.defineProperty(def, \"shape\", {\n value: newSh,\n });\n return newSh;\n },\n });\n }\n const _normalized = util.cached(() => normalizeDef(def));\n util.defineLazy(inst._zod, \"propValues\", () => {\n const shape = def.shape;\n const propValues = {};\n for (const key in shape) {\n const field = shape[key]._zod;\n if (field.values) {\n propValues[key] ?? (propValues[key] = new Set());\n for (const v of field.values)\n propValues[key].add(v);\n }\n }\n return propValues;\n });\n const isObject = util.isObject;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = {};\n const proms = [];\n const shape = value.shape;\n for (const key of value.keys) {\n const el = shape[key];\n const isOptionalOut = el._zod.optout === \"optional\";\n const r = el._zod.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n }\n else {\n handlePropertyResult(r, payload, key, input, isOptionalOut);\n }\n }\n if (!catchall) {\n return proms.length ? Promise.all(proms).then(() => payload) : payload;\n }\n return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);\n };\n});\nexport const $ZodObjectJIT = /*@__PURE__*/ core.$constructor(\"$ZodObjectJIT\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodObject.init(inst, def);\n const superParse = inst._zod.parse;\n const _normalized = util.cached(() => normalizeDef(def));\n const generateFastpass = (shape) => {\n const doc = new Doc([\"shape\", \"payload\", \"ctx\"]);\n const normalized = _normalized.value;\n const parseStr = (key) => {\n const k = util.esc(key);\n return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;\n };\n doc.write(`const input = payload.value;`);\n const ids = Object.create(null);\n let counter = 0;\n for (const key of normalized.keys) {\n ids[key] = `key_${counter++}`;\n }\n // A: preserve key order {\n doc.write(`const newResult = {};`);\n for (const key of normalized.keys) {\n const id = ids[key];\n const k = util.esc(key);\n const schema = shape[key];\n const isOptionalOut = schema?._zod?.optout === \"optional\";\n doc.write(`const ${id} = ${parseStr(key)};`);\n if (isOptionalOut) {\n // For optional-out schemas, ignore errors on absent keys\n doc.write(`\n if (${id}.issues.length) {\n if (${k} in input) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n }\n \n if (${id}.value === undefined) {\n if (${k} in input) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n \n `);\n }\n else {\n doc.write(`\n if (${id}.issues.length) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n \n if (${id}.value === undefined) {\n if (${k} in input) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n \n `);\n }\n }\n doc.write(`payload.value = newResult;`);\n doc.write(`return payload;`);\n const fn = doc.compile();\n return (payload, ctx) => fn(shape, payload, ctx);\n };\n let fastpass;\n const isObject = util.isObject;\n const jit = !core.globalConfig.jitless;\n const allowsEval = util.allowsEval;\n const fastEnabled = jit && allowsEval.value; // && !def.catchall;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {\n // always synchronous\n if (!fastpass)\n fastpass = generateFastpass(def.shape);\n payload = fastpass(payload, ctx);\n if (!catchall)\n return payload;\n return handleCatchall([], input, payload, ctx, value, inst);\n }\n return superParse(payload, ctx);\n };\n});\nfunction handleUnionResults(results, final, inst, ctx) {\n for (const result of results) {\n if (result.issues.length === 0) {\n final.value = result.value;\n return final;\n }\n }\n const nonaborted = results.filter((r) => !util.aborted(r));\n if (nonaborted.length === 1) {\n final.value = nonaborted[0].value;\n return nonaborted[0];\n }\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n return final;\n}\nexport const $ZodUnion = /*@__PURE__*/ core.$constructor(\"$ZodUnion\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.options.some((o) => o._zod.optin === \"optional\") ? \"optional\" : undefined);\n util.defineLazy(inst._zod, \"optout\", () => def.options.some((o) => o._zod.optout === \"optional\") ? \"optional\" : undefined);\n util.defineLazy(inst._zod, \"values\", () => {\n if (def.options.every((o) => o._zod.values)) {\n return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));\n }\n return undefined;\n });\n util.defineLazy(inst._zod, \"pattern\", () => {\n if (def.options.every((o) => o._zod.pattern)) {\n const patterns = def.options.map((o) => o._zod.pattern);\n return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join(\"|\")})$`);\n }\n return undefined;\n });\n const single = def.options.length === 1;\n const first = def.options[0]._zod.run;\n inst._zod.parse = (payload, ctx) => {\n if (single) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n if (result.issues.length === 0)\n return result;\n results.push(result);\n }\n }\n if (!async)\n return handleUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleUnionResults(results, payload, inst, ctx);\n });\n };\n});\nfunction handleExclusiveUnionResults(results, final, inst, ctx) {\n const successes = results.filter((r) => r.issues.length === 0);\n if (successes.length === 1) {\n final.value = successes[0].value;\n return final;\n }\n if (successes.length === 0) {\n // No matches - same as regular union\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n }\n else {\n // Multiple matches - exclusive union failure\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: [],\n inclusive: false,\n });\n }\n return final;\n}\nexport const $ZodXor = /*@__PURE__*/ core.$constructor(\"$ZodXor\", (inst, def) => {\n $ZodUnion.init(inst, def);\n def.inclusive = false;\n const single = def.options.length === 1;\n const first = def.options[0]._zod.run;\n inst._zod.parse = (payload, ctx) => {\n if (single) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n results.push(result);\n }\n }\n if (!async)\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n });\n };\n});\nexport const $ZodDiscriminatedUnion = \n/*@__PURE__*/\ncore.$constructor(\"$ZodDiscriminatedUnion\", (inst, def) => {\n def.inclusive = false;\n $ZodUnion.init(inst, def);\n const _super = inst._zod.parse;\n util.defineLazy(inst._zod, \"propValues\", () => {\n const propValues = {};\n for (const option of def.options) {\n const pv = option._zod.propValues;\n if (!pv || Object.keys(pv).length === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(option)}\"`);\n for (const [k, v] of Object.entries(pv)) {\n if (!propValues[k])\n propValues[k] = new Set();\n for (const val of v) {\n propValues[k].add(val);\n }\n }\n }\n return propValues;\n });\n const disc = util.cached(() => {\n const opts = def.options;\n const map = new Map();\n for (const o of opts) {\n const values = o._zod.propValues?.[def.discriminator];\n if (!values || values.size === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(o)}\"`);\n for (const v of values) {\n if (map.has(v)) {\n throw new Error(`Duplicate discriminator value \"${String(v)}\"`);\n }\n map.set(v, o);\n }\n }\n return map;\n });\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isObject(input)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"object\",\n input,\n inst,\n });\n return payload;\n }\n const opt = disc.value.get(input?.[def.discriminator]);\n if (opt) {\n return opt._zod.run(payload, ctx);\n }\n if (def.unionFallback) {\n return _super(payload, ctx);\n }\n // no matching discriminator\n payload.issues.push({\n code: \"invalid_union\",\n errors: [],\n note: \"No matching discriminator\",\n discriminator: def.discriminator,\n input,\n path: [def.discriminator],\n inst,\n });\n return payload;\n };\n});\nexport const $ZodIntersection = /*@__PURE__*/ core.$constructor(\"$ZodIntersection\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n const left = def.left._zod.run({ value: input, issues: [] }, ctx);\n const right = def.right._zod.run({ value: input, issues: [] }, ctx);\n const async = left instanceof Promise || right instanceof Promise;\n if (async) {\n return Promise.all([left, right]).then(([left, right]) => {\n return handleIntersectionResults(payload, left, right);\n });\n }\n return handleIntersectionResults(payload, left, right);\n };\n});\nfunction mergeValues(a, b) {\n // const aType = parse.t(a);\n // const bType = parse.t(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n if (a instanceof Date && b instanceof Date && +a === +b) {\n return { valid: true, data: a };\n }\n if (util.isPlainObject(a) && util.isPlainObject(b)) {\n const bKeys = Object.keys(b);\n const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [key, ...sharedValue.mergeErrorPath],\n };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) {\n return { valid: false, mergeErrorPath: [] };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [index, ...sharedValue.mergeErrorPath],\n };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n return { valid: false, mergeErrorPath: [] };\n}\nfunction handleIntersectionResults(result, left, right) {\n // Track which side(s) report each key as unrecognized\n const unrecKeys = new Map();\n let unrecIssue;\n for (const iss of left.issues) {\n if (iss.code === \"unrecognized_keys\") {\n unrecIssue ?? (unrecIssue = iss);\n for (const k of iss.keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k).l = true;\n }\n }\n else {\n result.issues.push(iss);\n }\n }\n for (const iss of right.issues) {\n if (iss.code === \"unrecognized_keys\") {\n for (const k of iss.keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k).r = true;\n }\n }\n else {\n result.issues.push(iss);\n }\n }\n // Report only keys unrecognized by BOTH sides\n const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);\n if (bothKeys.length && unrecIssue) {\n result.issues.push({ ...unrecIssue, keys: bothKeys });\n }\n if (util.aborted(result))\n return result;\n const merged = mergeValues(left.value, right.value);\n if (!merged.valid) {\n throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);\n }\n result.value = merged.data;\n return result;\n}\nexport const $ZodTuple = /*@__PURE__*/ core.$constructor(\"$ZodTuple\", (inst, def) => {\n $ZodType.init(inst, def);\n const items = def.items;\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n input,\n inst,\n expected: \"tuple\",\n code: \"invalid_type\",\n });\n return payload;\n }\n payload.value = [];\n const proms = [];\n const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== \"optional\");\n const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;\n if (!def.rest) {\n const tooBig = input.length > items.length;\n const tooSmall = input.length < optStart - 1;\n if (tooBig || tooSmall) {\n payload.issues.push({\n ...(tooBig\n ? { code: \"too_big\", maximum: items.length, inclusive: true }\n : { code: \"too_small\", minimum: items.length }),\n input,\n inst,\n origin: \"array\",\n });\n return payload;\n }\n }\n let i = -1;\n for (const item of items) {\n i++;\n if (i >= input.length)\n if (i >= optStart)\n continue;\n const result = item._zod.run({\n value: input[i],\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleTupleResult(result, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n if (def.rest) {\n const rest = input.slice(items.length);\n for (const el of rest) {\n i++;\n const result = def.rest._zod.run({\n value: el,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleTupleResult(result, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleTupleResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodRecord = /*@__PURE__*/ core.$constructor(\"$ZodRecord\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isPlainObject(input)) {\n payload.issues.push({\n expected: \"record\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n const values = def.keyType._zod.values;\n if (values) {\n payload.value = {};\n const recordKeys = new Set();\n for (const key of values) {\n if (typeof key === \"string\" || typeof key === \"number\" || typeof key === \"symbol\") {\n recordKeys.add(typeof key === \"number\" ? key.toString() : key);\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[key] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[key] = result.value;\n }\n }\n }\n let unrecognized;\n for (const key in input) {\n if (!recordKeys.has(key)) {\n unrecognized = unrecognized ?? [];\n unrecognized.push(key);\n }\n }\n if (unrecognized && unrecognized.length > 0) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n input,\n inst,\n keys: unrecognized,\n });\n }\n }\n else {\n payload.value = {};\n for (const key of Reflect.ownKeys(input)) {\n if (key === \"__proto__\")\n continue;\n let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n if (keyResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n // Numeric string fallback: if key is a numeric string and failed, retry with Number(key)\n // This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals\n const checkNumericKey = typeof key === \"string\" && regexes.number.test(key) && keyResult.issues.length;\n if (checkNumericKey) {\n const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);\n if (retryResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n if (retryResult.issues.length === 0) {\n keyResult = retryResult;\n }\n }\n if (keyResult.issues.length) {\n if (def.mode === \"loose\") {\n // Pass through unchanged\n payload.value[key] = input[key];\n }\n else {\n // Default \"strict\" behavior: error on invalid key\n payload.issues.push({\n code: \"invalid_key\",\n origin: \"record\",\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n input: key,\n path: [key],\n inst,\n });\n }\n continue;\n }\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[keyResult.value] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[keyResult.value] = result.value;\n }\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload;\n };\n});\nexport const $ZodMap = /*@__PURE__*/ core.$constructor(\"$ZodMap\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Map)) {\n payload.issues.push({\n expected: \"map\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n payload.value = new Map();\n for (const [key, value] of input) {\n const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);\n if (keyResult instanceof Promise || valueResult instanceof Promise) {\n proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }));\n }\n else {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {\n if (keyResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, keyResult.issues));\n }\n else {\n final.issues.push({\n code: \"invalid_key\",\n origin: \"map\",\n input,\n inst,\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n if (valueResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, valueResult.issues));\n }\n else {\n final.issues.push({\n origin: \"map\",\n code: \"invalid_element\",\n input,\n inst,\n key: key,\n issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n final.value.set(keyResult.value, valueResult.value);\n}\nexport const $ZodSet = /*@__PURE__*/ core.$constructor(\"$ZodSet\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Set)) {\n payload.issues.push({\n input,\n inst,\n expected: \"set\",\n code: \"invalid_type\",\n });\n return payload;\n }\n const proms = [];\n payload.value = new Set();\n for (const item of input) {\n const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleSetResult(result, payload)));\n }\n else\n handleSetResult(result, payload);\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleSetResult(result, final) {\n if (result.issues.length) {\n final.issues.push(...result.issues);\n }\n final.value.add(result.value);\n}\nexport const $ZodEnum = /*@__PURE__*/ core.$constructor(\"$ZodEnum\", (inst, def) => {\n $ZodType.init(inst, def);\n const values = util.getEnumValues(def.entries);\n const valuesSet = new Set(values);\n inst._zod.values = valuesSet;\n inst._zod.pattern = new RegExp(`^(${values\n .filter((k) => util.propertyKeyTypes.has(typeof k))\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o.toString()))\n .join(\"|\")})$`);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (valuesSet.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodLiteral = /*@__PURE__*/ core.$constructor(\"$ZodLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n if (def.values.length === 0) {\n throw new Error(\"Cannot create literal schema with no valid values\");\n }\n const values = new Set(def.values);\n inst._zod.values = values;\n inst._zod.pattern = new RegExp(`^(${def.values\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o)))\n .join(\"|\")})$`);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (values.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values: def.values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodFile = /*@__PURE__*/ core.$constructor(\"$ZodFile\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n // @ts-ignore\n if (input instanceof File)\n return payload;\n payload.issues.push({\n expected: \"file\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodTransform = /*@__PURE__*/ core.$constructor(\"$ZodTransform\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n const _out = def.transform(payload.value, payload);\n if (ctx.async) {\n const output = _out instanceof Promise ? _out : Promise.resolve(_out);\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n if (_out instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n payload.value = _out;\n return payload;\n };\n});\nfunction handleOptionalResult(result, input) {\n if (result.issues.length && input === undefined) {\n return { issues: [], value: undefined };\n }\n return result;\n}\nexport const $ZodOptional = /*@__PURE__*/ core.$constructor(\"$ZodOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n inst._zod.optout = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => {\n return def.innerType._zod.values ? new Set([...def.innerType._zod.values, undefined]) : undefined;\n });\n util.defineLazy(inst._zod, \"pattern\", () => {\n const pattern = def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n if (def.innerType._zod.optin === \"optional\") {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise)\n return result.then((r) => handleOptionalResult(r, payload.value));\n return handleOptionalResult(result, payload.value);\n }\n if (payload.value === undefined) {\n return payload;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodExactOptional = /*@__PURE__*/ core.$constructor(\"$ZodExactOptional\", (inst, def) => {\n // Call parent init - inherits optin/optout = \"optional\"\n $ZodOptional.init(inst, def);\n // Override values/pattern to NOT add undefined\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n util.defineLazy(inst._zod, \"pattern\", () => def.innerType._zod.pattern);\n // Override parse to just delegate (no undefined handling)\n inst._zod.parse = (payload, ctx) => {\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNullable = /*@__PURE__*/ core.$constructor(\"$ZodNullable\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n util.defineLazy(inst._zod, \"pattern\", () => {\n const pattern = def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;\n });\n util.defineLazy(inst._zod, \"values\", () => {\n return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n // Forward direction (decode): allow null to pass through\n if (payload.value === null)\n return payload;\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodDefault = /*@__PURE__*/ core.$constructor(\"$ZodDefault\", (inst, def) => {\n $ZodType.init(inst, def);\n // inst._zod.qin = \"true\";\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply defaults for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n /**\n * $ZodDefault returns the default value immediately in forward direction.\n * It doesn't pass the default value into the validator (\"prefault\"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a \"prefault\" for the pipe. */\n return payload;\n }\n // Forward direction: continue with default handling\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleDefaultResult(result, def));\n }\n return handleDefaultResult(result, def);\n };\n});\nfunction handleDefaultResult(payload, def) {\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return payload;\n}\nexport const $ZodPrefault = /*@__PURE__*/ core.$constructor(\"$ZodPrefault\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply prefault for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNonOptional = /*@__PURE__*/ core.$constructor(\"$ZodNonOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => {\n const v = def.innerType._zod.values;\n return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleNonOptionalResult(result, inst));\n }\n return handleNonOptionalResult(result, inst);\n };\n});\nfunction handleNonOptionalResult(payload, inst) {\n if (!payload.issues.length && payload.value === undefined) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: payload.value,\n inst,\n });\n }\n return payload;\n}\nexport const $ZodSuccess = /*@__PURE__*/ core.$constructor(\"$ZodSuccess\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(\"ZodSuccess\");\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.issues.length === 0;\n return payload;\n });\n }\n payload.value = result.issues.length === 0;\n return payload;\n };\n});\nexport const $ZodCatch = /*@__PURE__*/ core.$constructor(\"$ZodCatch\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply catch logic\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.value;\n if (result.issues.length) {\n payload.value = def.catchValue({\n ...payload,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n payload.issues = [];\n }\n return payload;\n });\n }\n payload.value = result.value;\n if (result.issues.length) {\n payload.value = def.catchValue({\n ...payload,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n payload.issues = [];\n }\n return payload;\n };\n});\nexport const $ZodNaN = /*@__PURE__*/ core.$constructor(\"$ZodNaN\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"number\" || !Number.isNaN(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"nan\",\n code: \"invalid_type\",\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodPipe = /*@__PURE__*/ core.$constructor(\"$ZodPipe\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => def.in._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n util.defineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handlePipeResult(right, def.in, ctx));\n }\n return handlePipeResult(right, def.in, ctx);\n }\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handlePipeResult(left, def.out, ctx));\n }\n return handlePipeResult(left, def.out, ctx);\n };\n});\nfunction handlePipeResult(left, next, ctx) {\n if (left.issues.length) {\n // prevent further checks\n left.aborted = true;\n return left;\n }\n return next._zod.run({ value: left.value, issues: left.issues }, ctx);\n}\nexport const $ZodCodec = /*@__PURE__*/ core.$constructor(\"$ZodCodec\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => def.in._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n util.defineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handleCodecAResult(left, def, ctx));\n }\n return handleCodecAResult(left, def, ctx);\n }\n else {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handleCodecAResult(right, def, ctx));\n }\n return handleCodecAResult(right, def, ctx);\n }\n };\n});\nfunction handleCodecAResult(result, def, ctx) {\n if (result.issues.length) {\n // prevent further checks\n result.aborted = true;\n return result;\n }\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const transformed = def.transform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));\n }\n return handleCodecTxResult(result, transformed, def.out, ctx);\n }\n else {\n const transformed = def.reverseTransform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));\n }\n return handleCodecTxResult(result, transformed, def.in, ctx);\n }\n}\nfunction handleCodecTxResult(left, value, nextSchema, ctx) {\n // Check if transform added any issues\n if (left.issues.length) {\n left.aborted = true;\n return left;\n }\n return nextSchema._zod.run({ value, issues: left.issues }, ctx);\n}\nexport const $ZodReadonly = /*@__PURE__*/ core.$constructor(\"$ZodReadonly\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"propValues\", () => def.innerType._zod.propValues);\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType?._zod?.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType?._zod?.optout);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then(handleReadonlyResult);\n }\n return handleReadonlyResult(result);\n };\n});\nfunction handleReadonlyResult(payload) {\n payload.value = Object.freeze(payload.value);\n return payload;\n}\nexport const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"$ZodTemplateLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n const regexParts = [];\n for (const part of def.parts) {\n if (typeof part === \"object\" && part !== null) {\n // is Zod schema\n if (!part._zod.pattern) {\n // if (!source)\n throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);\n }\n const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;\n if (!source)\n throw new Error(`Invalid template literal part: ${part._zod.traits}`);\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n regexParts.push(source.slice(start, end));\n }\n else if (part === null || util.primitiveTypes.has(typeof part)) {\n regexParts.push(util.escapeRegex(`${part}`));\n }\n else {\n throw new Error(`Invalid template literal part: ${part}`);\n }\n }\n inst._zod.pattern = new RegExp(`^${regexParts.join(\"\")}$`);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"string\") {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"string\",\n code: \"invalid_type\",\n });\n return payload;\n }\n inst._zod.pattern.lastIndex = 0;\n if (!inst._zod.pattern.test(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n code: \"invalid_format\",\n format: def.format ?? \"template_literal\",\n pattern: inst._zod.pattern.source,\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodFunction = /*@__PURE__*/ core.$constructor(\"$ZodFunction\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._def = def;\n inst._zod.def = def;\n inst.implement = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implement() must be called with a function\");\n }\n return function (...args) {\n const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;\n const result = Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return parse(inst._def.output, result);\n }\n return result;\n };\n };\n inst.implementAsync = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implementAsync() must be called with a function\");\n }\n return async function (...args) {\n const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;\n const result = await Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return await parseAsync(inst._def.output, result);\n }\n return result;\n };\n };\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"function\") {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"function\",\n input: payload.value,\n inst,\n });\n return payload;\n }\n // Check if output is a promise type to determine if we should use async implementation\n const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === \"promise\";\n if (hasPromiseOutput) {\n payload.value = inst.implementAsync(payload.value);\n }\n else {\n payload.value = inst.implement(payload.value);\n }\n return payload;\n };\n inst.input = (...args) => {\n const F = inst.constructor;\n if (Array.isArray(args[0])) {\n return new F({\n type: \"function\",\n input: new $ZodTuple({\n type: \"tuple\",\n items: args[0],\n rest: args[1],\n }),\n output: inst._def.output,\n });\n }\n return new F({\n type: \"function\",\n input: args[0],\n output: inst._def.output,\n });\n };\n inst.output = (output) => {\n const F = inst.constructor;\n return new F({\n type: \"function\",\n input: inst._def.input,\n output,\n });\n };\n return inst;\n});\nexport const $ZodPromise = /*@__PURE__*/ core.$constructor(\"$ZodPromise\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));\n };\n});\nexport const $ZodLazy = /*@__PURE__*/ core.$constructor(\"$ZodLazy\", (inst, def) => {\n $ZodType.init(inst, def);\n // let _innerType!: any;\n // util.defineLazy(def, \"getter\", () => {\n // if (!_innerType) {\n // _innerType = def.getter();\n // }\n // return () => _innerType;\n // });\n util.defineLazy(inst._zod, \"innerType\", () => def.getter());\n util.defineLazy(inst._zod, \"pattern\", () => inst._zod.innerType?._zod?.pattern);\n util.defineLazy(inst._zod, \"propValues\", () => inst._zod.innerType?._zod?.propValues);\n util.defineLazy(inst._zod, \"optin\", () => inst._zod.innerType?._zod?.optin ?? undefined);\n util.defineLazy(inst._zod, \"optout\", () => inst._zod.innerType?._zod?.optout ?? undefined);\n inst._zod.parse = (payload, ctx) => {\n const inner = inst._zod.innerType;\n return inner._zod.run(payload, ctx);\n };\n});\nexport const $ZodCustom = /*@__PURE__*/ core.$constructor(\"$ZodCustom\", (inst, def) => {\n checks.$ZodCheck.init(inst, def);\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _) => {\n return payload;\n };\n inst._zod.check = (payload) => {\n const input = payload.value;\n const r = def.fn(input);\n if (r instanceof Promise) {\n return r.then((r) => handleRefineResult(r, payload, input, inst));\n }\n handleRefineResult(r, payload, input, inst);\n return;\n };\n});\nfunction handleRefineResult(result, payload, input, inst) {\n if (!result) {\n const _iss = {\n code: \"custom\",\n input,\n inst, // incorporates params.error into issue reporting\n path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting\n continue: !inst._zod.def.abort,\n // params: inst._zod.def.params,\n };\n if (inst._zod.def.params)\n _iss.params = inst._zod.def.params;\n payload.issues.push(util.issue(_iss));\n }\n}\n", "// import { $ZodType } from \"./schemas.js\";\nimport * as core from \"./core.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nexport const $ZodCheck = /*@__PURE__*/ core.$constructor(\"$ZodCheck\", (inst, def) => {\n var _a;\n inst._zod ?? (inst._zod = {});\n inst._zod.def = def;\n (_a = inst._zod).onattach ?? (_a.onattach = []);\n});\nconst numericOriginMap = {\n number: \"number\",\n bigint: \"bigint\",\n object: \"date\",\n};\nexport const $ZodCheckLessThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckLessThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;\n if (def.value < curr) {\n if (def.inclusive)\n bag.maximum = def.value;\n else\n bag.exclusiveMaximum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckGreaterThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckGreaterThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;\n if (def.value > curr) {\n if (def.inclusive)\n bag.minimum = def.value;\n else\n bag.exclusiveMinimum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMultipleOf = \n/*@__PURE__*/ core.$constructor(\"$ZodCheckMultipleOf\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n var _a;\n (_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);\n });\n inst._zod.check = (payload) => {\n if (typeof payload.value !== typeof def.value)\n throw new Error(\"Cannot mix number and bigint in multiple_of check.\");\n const isMultiple = typeof payload.value === \"bigint\"\n ? payload.value % def.value === BigInt(0)\n : util.floatSafeRemainder(payload.value, def.value) === 0;\n if (isMultiple)\n return;\n payload.issues.push({\n origin: typeof payload.value,\n code: \"not_multiple_of\",\n divisor: def.value,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckNumberFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n def.format = def.format || \"float64\";\n const isInt = def.format?.includes(\"int\");\n const origin = isInt ? \"int\" : \"number\";\n const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n if (isInt)\n bag.pattern = regexes.integer;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (isInt) {\n if (!Number.isInteger(input)) {\n // invalid_format issue\n // payload.issues.push({\n // expected: def.format,\n // format: def.format,\n // code: \"invalid_format\",\n // input,\n // inst,\n // });\n // invalid_type issue\n payload.issues.push({\n expected: origin,\n format: def.format,\n code: \"invalid_type\",\n continue: false,\n input,\n inst,\n });\n return;\n // not_multiple_of issue\n // payload.issues.push({\n // code: \"not_multiple_of\",\n // origin: \"number\",\n // input,\n // inst,\n // divisor: 1,\n // });\n }\n if (!Number.isSafeInteger(input)) {\n if (input > 0) {\n // too_big\n payload.issues.push({\n input,\n code: \"too_big\",\n maximum: Number.MAX_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n else {\n // too_small\n payload.issues.push({\n input,\n code: \"too_small\",\n minimum: Number.MIN_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n return;\n }\n }\n if (input < minimum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_small\",\n minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckBigIntFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (input < minimum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_small\",\n minimum: minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckMaxSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size <= def.maximum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size >= def.minimum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckSizeEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckSizeEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.size;\n bag.maximum = def.size;\n bag.size = def.size;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size === def.size)\n return;\n const tooBig = size > def.size;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n ...(tooBig ? { code: \"too_big\", maximum: def.size } : { code: \"too_small\", minimum: def.size }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMaxLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length <= def.maximum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length >= def.minimum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckLengthEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.length;\n bag.maximum = def.length;\n bag.length = def.length;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length === def.length)\n return;\n const origin = util.getLengthableOrigin(input);\n const tooBig = length > def.length;\n payload.issues.push({\n origin,\n ...(tooBig ? { code: \"too_big\", maximum: def.length } : { code: \"too_small\", minimum: def.length }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckStringFormat\", (inst, def) => {\n var _a, _b;\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n if (def.pattern) {\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(def.pattern);\n }\n });\n if (def.pattern)\n (_a = inst._zod).check ?? (_a.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n ...(def.pattern ? { pattern: def.pattern.toString() } : {}),\n inst,\n continue: !def.abort,\n });\n });\n else\n (_b = inst._zod).check ?? (_b.check = () => { });\n});\nexport const $ZodCheckRegex = /*@__PURE__*/ core.$constructor(\"$ZodCheckRegex\", (inst, def) => {\n $ZodCheckStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"regex\",\n input: payload.value,\n pattern: def.pattern.toString(),\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLowerCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckLowerCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.lowercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckUpperCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckUpperCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.uppercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckIncludes = /*@__PURE__*/ core.$constructor(\"$ZodCheckIncludes\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const escapedRegex = util.escapeRegex(def.includes);\n const pattern = new RegExp(typeof def.position === \"number\" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);\n def.pattern = pattern;\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.includes(def.includes, def.position))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"includes\",\n includes: def.includes,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStartsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckStartsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.startsWith(def.prefix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"starts_with\",\n prefix: def.prefix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckEndsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckEndsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.endsWith(def.suffix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"ends_with\",\n suffix: def.suffix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n///////////////////////////////////\n///// $ZodCheckProperty /////\n///////////////////////////////////\nfunction handleCheckPropertyResult(result, payload, property) {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(property, result.issues));\n }\n}\nexport const $ZodCheckProperty = /*@__PURE__*/ core.$constructor(\"$ZodCheckProperty\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n const result = def.schema._zod.run({\n value: payload.value[def.property],\n issues: [],\n }, {});\n if (result instanceof Promise) {\n return result.then((result) => handleCheckPropertyResult(result, payload, def.property));\n }\n handleCheckPropertyResult(result, payload, def.property);\n return;\n };\n});\nexport const $ZodCheckMimeType = /*@__PURE__*/ core.$constructor(\"$ZodCheckMimeType\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const mimeSet = new Set(def.mime);\n inst._zod.onattach.push((inst) => {\n inst._zod.bag.mime = def.mime;\n });\n inst._zod.check = (payload) => {\n if (mimeSet.has(payload.value.type))\n return;\n payload.issues.push({\n code: \"invalid_value\",\n values: def.mime,\n input: payload.value.type,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckOverwrite = /*@__PURE__*/ core.$constructor(\"$ZodCheckOverwrite\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n payload.value = def.tx(payload.value);\n };\n});\n", "import * as util from \"./util.js\";\nexport const cuid = /^[cC][^\\s-]{8,}$/;\nexport const cuid2 = /^[0-9a-z]+$/;\nexport const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;\nexport const xid = /^[0-9a-vA-V]{20}$/;\nexport const ksuid = /^[A-Za-z0-9]{27}$/;\nexport const nanoid = /^[a-zA-Z0-9_-]{21}$/;\n/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */\nexport const duration = /^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;\n/** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */\nexport const extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */\nexport const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;\n/** Returns a regex for validating an RFC 9562/4122 UUID.\n *\n * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */\nexport const uuid = (version) => {\n if (!version)\n return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;\n return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);\n};\nexport const uuid4 = /*@__PURE__*/ uuid(4);\nexport const uuid6 = /*@__PURE__*/ uuid(6);\nexport const uuid7 = /*@__PURE__*/ uuid(7);\n/** Practical email validation */\nexport const email = /^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;\n/** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */\nexport const html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n/** The classic emailregex.com regex for RFC 5322-compliant emails */\nexport const rfc5322Email = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n/** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */\nexport const unicodeEmail = /^[^\\s@\"]{1,64}@[^\\s@]{1,255}$/u;\nexport const idnEmail = unicodeEmail;\nexport const browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emoji = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nexport function emoji() {\n return new RegExp(_emoji, \"u\");\n}\nexport const ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\nexport const ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;\nexport const mac = (delimiter) => {\n const escapedDelim = util.escapeRegex(delimiter ?? \":\");\n return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);\n};\nexport const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/;\nexport const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nexport const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;\nexport const base64url = /^[A-Za-z0-9_-]*$/;\n// based on https://stackoverflow.com/questions/106179/regular-expression-to-match-dns-hostname-or-ip-address\n// export const hostname: RegExp = /^([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+$/;\nexport const hostname = /^(?=.{1,253}\\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\\.?$/;\nexport const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/;\n// https://blog.stevenlevithan.com/archives/validate-phone-number#r4-3 (regex sans spaces)\n// E.164: leading digit must be 1-9; total digits (excluding '+') between 7-15\nexport const e164 = /^\\+[1-9]\\d{6,14}$/;\n// const dateSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\nconst dateSource = `(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))`;\nexport const date = /*@__PURE__*/ new RegExp(`^${dateSource}$`);\nfunction timeSource(args) {\n const hhmm = `(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;\n const regex = typeof args.precision === \"number\"\n ? args.precision === -1\n ? `${hhmm}`\n : args.precision === 0\n ? `${hhmm}:[0-5]\\\\d`\n : `${hhmm}:[0-5]\\\\d\\\\.\\\\d{${args.precision}}`\n : `${hhmm}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`;\n return regex;\n}\nexport function time(args) {\n return new RegExp(`^${timeSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nexport function datetime(args) {\n const time = timeSource({ precision: args.precision });\n const opts = [\"Z\"];\n if (args.local)\n opts.push(\"\");\n // if (args.offset) opts.push(`([+-]\\\\d{2}:\\\\d{2})`);\n if (args.offset)\n opts.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);\n const timeRegex = `${time}(?:${opts.join(\"|\")})`;\n return new RegExp(`^${dateSource}T(?:${timeRegex})$`);\n}\nexport const string = (params) => {\n const regex = params ? `[\\\\s\\\\S]{${params?.minimum ?? 0},${params?.maximum ?? \"\"}}` : `[\\\\s\\\\S]*`;\n return new RegExp(`^${regex}$`);\n};\nexport const bigint = /^-?\\d+n?$/;\nexport const integer = /^-?\\d+$/;\nexport const number = /^-?\\d+(?:\\.\\d+)?$/;\nexport const boolean = /^(?:true|false)$/i;\nconst _null = /^null$/i;\nexport { _null as null };\nconst _undefined = /^undefined$/i;\nexport { _undefined as undefined };\n// regex for string with no uppercase letters\nexport const lowercase = /^[^A-Z]*$/;\n// regex for string with no lowercase letters\nexport const uppercase = /^[^a-z]*$/;\n// regex for hexadecimal strings (any length)\nexport const hex = /^[0-9a-fA-F]*$/;\n// Hash regexes for different algorithms and encodings\n// Helper function to create base64 regex with exact length and padding\nfunction fixedBase64(bodyLength, padding) {\n return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);\n}\n// Helper function to create base64url regex with exact length (no padding)\nfunction fixedBase64url(length) {\n return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);\n}\n// MD5 (16 bytes): base64 = 24 chars total (22 + \"==\")\nexport const md5_hex = /^[0-9a-fA-F]{32}$/;\nexport const md5_base64 = /*@__PURE__*/ fixedBase64(22, \"==\");\nexport const md5_base64url = /*@__PURE__*/ fixedBase64url(22);\n// SHA1 (20 bytes): base64 = 28 chars total (27 + \"=\")\nexport const sha1_hex = /^[0-9a-fA-F]{40}$/;\nexport const sha1_base64 = /*@__PURE__*/ fixedBase64(27, \"=\");\nexport const sha1_base64url = /*@__PURE__*/ fixedBase64url(27);\n// SHA256 (32 bytes): base64 = 44 chars total (43 + \"=\")\nexport const sha256_hex = /^[0-9a-fA-F]{64}$/;\nexport const sha256_base64 = /*@__PURE__*/ fixedBase64(43, \"=\");\nexport const sha256_base64url = /*@__PURE__*/ fixedBase64url(43);\n// SHA384 (48 bytes): base64 = 64 chars total (no padding)\nexport const sha384_hex = /^[0-9a-fA-F]{96}$/;\nexport const sha384_base64 = /*@__PURE__*/ fixedBase64(64, \"\");\nexport const sha384_base64url = /*@__PURE__*/ fixedBase64url(64);\n// SHA512 (64 bytes): base64 = 88 chars total (86 + \"==\")\nexport const sha512_hex = /^[0-9a-fA-F]{128}$/;\nexport const sha512_base64 = /*@__PURE__*/ fixedBase64(86, \"==\");\nexport const sha512_base64url = /*@__PURE__*/ fixedBase64url(86);\n", "export class Doc {\n constructor(args = []) {\n this.content = [];\n this.indent = 0;\n if (this)\n this.args = args;\n }\n indented(fn) {\n this.indent += 1;\n fn(this);\n this.indent -= 1;\n }\n write(arg) {\n if (typeof arg === \"function\") {\n arg(this, { execution: \"sync\" });\n arg(this, { execution: \"async\" });\n return;\n }\n const content = arg;\n const lines = content.split(\"\\n\").filter((x) => x);\n const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));\n const dedented = lines.map((x) => x.slice(minIndent)).map((x) => \" \".repeat(this.indent * 2) + x);\n for (const line of dedented) {\n this.content.push(line);\n }\n }\n compile() {\n const F = Function;\n const args = this?.args;\n const content = this?.content ?? [``];\n const lines = [...content.map((x) => ` ${x}`)];\n // console.log(lines.join(\"\\n\"));\n return new F(...args, lines.join(\"\\n\"));\n }\n}\n", "export const version = {\n major: 4,\n minor: 3,\n patch: 6,\n};\n", "export { default as ar } from \"./ar.js\";\nexport { default as az } from \"./az.js\";\nexport { default as be } from \"./be.js\";\nexport { default as bg } from \"./bg.js\";\nexport { default as ca } from \"./ca.js\";\nexport { default as cs } from \"./cs.js\";\nexport { default as da } from \"./da.js\";\nexport { default as de } from \"./de.js\";\nexport { default as en } from \"./en.js\";\nexport { default as eo } from \"./eo.js\";\nexport { default as es } from \"./es.js\";\nexport { default as fa } from \"./fa.js\";\nexport { default as fi } from \"./fi.js\";\nexport { default as fr } from \"./fr.js\";\nexport { default as frCA } from \"./fr-CA.js\";\nexport { default as he } from \"./he.js\";\nexport { default as hu } from \"./hu.js\";\nexport { default as hy } from \"./hy.js\";\nexport { default as id } from \"./id.js\";\nexport { default as is } from \"./is.js\";\nexport { default as it } from \"./it.js\";\nexport { default as ja } from \"./ja.js\";\nexport { default as ka } from \"./ka.js\";\nexport { default as kh } from \"./kh.js\";\nexport { default as km } from \"./km.js\";\nexport { default as ko } from \"./ko.js\";\nexport { default as lt } from \"./lt.js\";\nexport { default as mk } from \"./mk.js\";\nexport { default as ms } from \"./ms.js\";\nexport { default as nl } from \"./nl.js\";\nexport { default as no } from \"./no.js\";\nexport { default as ota } from \"./ota.js\";\nexport { default as ps } from \"./ps.js\";\nexport { default as pl } from \"./pl.js\";\nexport { default as pt } from \"./pt.js\";\nexport { default as ru } from \"./ru.js\";\nexport { default as sl } from \"./sl.js\";\nexport { default as sv } from \"./sv.js\";\nexport { default as ta } from \"./ta.js\";\nexport { default as th } from \"./th.js\";\nexport { default as tr } from \"./tr.js\";\nexport { default as ua } from \"./ua.js\";\nexport { default as uk } from \"./uk.js\";\nexport { default as ur } from \"./ur.js\";\nexport { default as uz } from \"./uz.js\";\nexport { default as vi } from \"./vi.js\";\nexport { default as zhCN } from \"./zh-CN.js\";\nexport { default as zhTW } from \"./zh-TW.js\";\nexport { default as yo } from \"./yo.js\";\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u062D\u0631\u0641\", verb: \"\u0623\u0646 \u064A\u062D\u0648\u064A\" },\n file: { unit: \"\u0628\u0627\u064A\u062A\", verb: \"\u0623\u0646 \u064A\u062D\u0648\u064A\" },\n array: { unit: \"\u0639\u0646\u0635\u0631\", verb: \"\u0623\u0646 \u064A\u062D\u0648\u064A\" },\n set: { unit: \"\u0639\u0646\u0635\u0631\", verb: \"\u0623\u0646 \u064A\u062D\u0648\u064A\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0645\u062F\u062E\u0644\",\n email: \"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A\",\n url: \"\u0631\u0627\u0628\u0637\",\n emoji: \"\u0625\u064A\u0645\u0648\u062C\u064A\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO\",\n date: \"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO\",\n time: \"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO\",\n duration: \"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO\",\n ipv4: \"\u0639\u0646\u0648\u0627\u0646 IPv4\",\n ipv6: \"\u0639\u0646\u0648\u0627\u0646 IPv6\",\n cidrv4: \"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4\",\n cidrv6: \"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6\",\n base64: \"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded\",\n base64url: \"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded\",\n json_string: \"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON\",\n e164: \"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0645\u062F\u062E\u0644\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${issue.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`;\n }\n return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue.origin ?? \"\u0627\u0644\u0642\u064A\u0645\u0629\"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"\u0639\u0646\u0635\u0631\"}`;\n return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue.origin ?? \"\u0627\u0644\u0642\u064A\u0645\u0629\"} ${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 \"${issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`;\n }\n case \"not_multiple_of\":\n return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u0645\u0639\u0631\u0641${issue.keys.length > 1 ? \"\u0627\u062A\" : \"\"} \u063A\u0631\u064A\u0628${issue.keys.length > 1 ? \"\u0629\" : \"\"}: ${util.joinValues(issue.keys, \"\u060C \")}`;\n case \"invalid_key\":\n return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue.origin}`;\n case \"invalid_union\":\n return \"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\";\n case \"invalid_element\":\n return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue.origin}`;\n default:\n return \"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\";\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"simvol\", verb: \"olmal\u0131d\u0131r\" },\n file: { unit: \"bayt\", verb: \"olmal\u0131d\u0131r\" },\n array: { unit: \"element\", verb: \"olmal\u0131d\u0131r\" },\n set: { unit: \"element\", verb: \"olmal\u0131d\u0131r\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"email address\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datetime\",\n date: \"ISO date\",\n time: \"ISO time\",\n duration: \"ISO duration\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded string\",\n base64url: \"base64url-encoded string\",\n json_string: \"JSON string\",\n e164: \"E.164 number\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Yanl\u0131\u015F d\u0259y\u0259r: g\u00F6zl\u0259nil\u0259n instanceof ${issue.expected}, daxil olan ${received}`;\n }\n return `Yanl\u0131\u015F d\u0259y\u0259r: g\u00F6zl\u0259nil\u0259n ${expected}, daxil olan ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Yanl\u0131\u015F d\u0259y\u0259r: g\u00F6zl\u0259nil\u0259n ${util.stringifyPrimitive(issue.values[0])}`;\n return `Yanl\u0131\u015F se\u00E7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u00C7ox b\u00F6y\u00FCk: g\u00F6zl\u0259nil\u0259n ${issue.origin ?? \"d\u0259y\u0259r\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"element\"}`;\n return `\u00C7ox b\u00F6y\u00FCk: g\u00F6zl\u0259nil\u0259n ${issue.origin ?? \"d\u0259y\u0259r\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u00C7ox ki\u00E7ik: g\u00F6zl\u0259nil\u0259n ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n return `\u00C7ox ki\u00E7ik: g\u00F6zl\u0259nil\u0259n ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Yanl\u0131\u015F m\u0259tn: \"${_issue.prefix}\" il\u0259 ba\u015Flamal\u0131d\u0131r`;\n if (_issue.format === \"ends_with\")\n return `Yanl\u0131\u015F m\u0259tn: \"${_issue.suffix}\" il\u0259 bitm\u0259lidir`;\n if (_issue.format === \"includes\")\n return `Yanl\u0131\u015F m\u0259tn: \"${_issue.includes}\" daxil olmal\u0131d\u0131r`;\n if (_issue.format === \"regex\")\n return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`;\n return `Yanl\u0131\u015F ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Yanl\u0131\u015F \u0259d\u0259d: ${issue.divisor} il\u0259 b\u00F6l\u00FCn\u0259 bil\u0259n olmal\u0131d\u0131r`;\n case \"unrecognized_keys\":\n return `Tan\u0131nmayan a\u00E7ar${issue.keys.length > 1 ? \"lar\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} daxilind\u0259 yanl\u0131\u015F a\u00E7ar`;\n case \"invalid_union\":\n return \"Yanl\u0131\u015F d\u0259y\u0259r\";\n case \"invalid_element\":\n return `${issue.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;\n default:\n return `Yanl\u0131\u015F d\u0259y\u0259r`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nfunction getBelarusianPlural(count, one, few, many) {\n const absCount = Math.abs(count);\n const lastDigit = absCount % 10;\n const lastTwoDigits = absCount % 100;\n if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {\n return many;\n }\n if (lastDigit === 1) {\n return one;\n }\n if (lastDigit >= 2 && lastDigit <= 4) {\n return few;\n }\n return many;\n}\nconst error = () => {\n const Sizable = {\n string: {\n unit: {\n one: \"\u0441\u0456\u043C\u0432\u0430\u043B\",\n few: \"\u0441\u0456\u043C\u0432\u0430\u043B\u044B\",\n many: \"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E\",\n },\n verb: \"\u043C\u0435\u0446\u044C\",\n },\n array: {\n unit: {\n one: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\",\n few: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B\",\n many: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E\",\n },\n verb: \"\u043C\u0435\u0446\u044C\",\n },\n set: {\n unit: {\n one: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\",\n few: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B\",\n many: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E\",\n },\n verb: \"\u043C\u0435\u0446\u044C\",\n },\n file: {\n unit: {\n one: \"\u0431\u0430\u0439\u0442\",\n few: \"\u0431\u0430\u0439\u0442\u044B\",\n many: \"\u0431\u0430\u0439\u0442\u0430\u045E\",\n },\n verb: \"\u043C\u0435\u0446\u044C\",\n },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0443\u0432\u043E\u0434\",\n email: \"email \u0430\u0434\u0440\u0430\u0441\",\n url: \"URL\",\n emoji: \"\u044D\u043C\u043E\u0434\u0437\u0456\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441\",\n date: \"ISO \u0434\u0430\u0442\u0430\",\n time: \"ISO \u0447\u0430\u0441\",\n duration: \"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C\",\n ipv4: \"IPv4 \u0430\u0434\u0440\u0430\u0441\",\n ipv6: \"IPv6 \u0430\u0434\u0440\u0430\u0441\",\n cidrv4: \"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D\",\n cidrv6: \"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D\",\n base64: \"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64\",\n base64url: \"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url\",\n json_string: \"JSON \u0440\u0430\u0434\u043E\u043A\",\n e164: \"\u043D\u0443\u043C\u0430\u0440 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0443\u0432\u043E\u0434\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u043B\u0456\u043A\",\n array: \"\u043C\u0430\u0441\u0456\u045E\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${issue.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`;\n }\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const maxValue = Number(issue.maximum);\n const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435\"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue.maximum.toString()} ${unit}`;\n }\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435\"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const minValue = Number(issue.minimum);\n const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue.minimum.toString()} ${unit}`;\n }\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue.keys.length > 1 ? \"\u043A\u043B\u044E\u0447\u044B\" : \"\u043A\u043B\u044E\u0447\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434\";\n case \"invalid_element\":\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue.origin}`;\n default:\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0441\u0438\u043C\u0432\u043E\u043B\u0430\", verb: \"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\" },\n file: { unit: \"\u0431\u0430\u0439\u0442\u0430\", verb: \"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\" },\n array: { unit: \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430\", verb: \"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\" },\n set: { unit: \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430\", verb: \"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0432\u0445\u043E\u0434\",\n email: \"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441\",\n url: \"URL\",\n emoji: \"\u0435\u043C\u043E\u0434\u0436\u0438\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0432\u0440\u0435\u043C\u0435\",\n date: \"ISO \u0434\u0430\u0442\u0430\",\n time: \"ISO \u0432\u0440\u0435\u043C\u0435\",\n duration: \"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442\",\n ipv4: \"IPv4 \u0430\u0434\u0440\u0435\u0441\",\n ipv6: \"IPv6 \u0430\u0434\u0440\u0435\u0441\",\n cidrv4: \"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\",\n cidrv6: \"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\",\n base64: \"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437\",\n base64url: \"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437\",\n json_string: \"JSON \u043D\u0438\u0437\",\n e164: \"E.164 \u043D\u043E\u043C\u0435\u0440\",\n jwt: \"JWT\",\n template_literal: \"\u0432\u0445\u043E\u0434\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0447\u0438\u0441\u043B\u043E\",\n array: \"\u043C\u0430\u0441\u0438\u0432\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${issue.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`;\n }\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue.origin ?? \"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430\"}`;\n return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue.origin ?? \"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`;\n let invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D\";\n if (_issue.format === \"emoji\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E\";\n if (_issue.format === \"datetime\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E\";\n if (_issue.format === \"date\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430\";\n if (_issue.format === \"time\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E\";\n if (_issue.format === \"duration\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430\";\n return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue.keys.length > 1 ? \"\u0438\" : \"\"} \u043A\u043B\u044E\u0447${issue.keys.length > 1 ? \"\u043E\u0432\u0435\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434\";\n case \"invalid_element\":\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue.origin}`;\n default:\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"car\u00E0cters\", verb: \"contenir\" },\n file: { unit: \"bytes\", verb: \"contenir\" },\n array: { unit: \"elements\", verb: \"contenir\" },\n set: { unit: \"elements\", verb: \"contenir\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entrada\",\n email: \"adre\u00E7a electr\u00F2nica\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"data i hora ISO\",\n date: \"data ISO\",\n time: \"hora ISO\",\n duration: \"durada ISO\",\n ipv4: \"adre\u00E7a IPv4\",\n ipv6: \"adre\u00E7a IPv6\",\n cidrv4: \"rang IPv4\",\n cidrv6: \"rang IPv6\",\n base64: \"cadena codificada en base64\",\n base64url: \"cadena codificada en base64url\",\n json_string: \"cadena JSON\",\n e164: \"n\u00FAmero E.164\",\n jwt: \"JWT\",\n template_literal: \"entrada\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Tipus inv\u00E0lid: s'esperava instanceof ${issue.expected}, s'ha rebut ${received}`;\n }\n return `Tipus inv\u00E0lid: s'esperava ${expected}, s'ha rebut ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Valor inv\u00E0lid: s'esperava ${util.stringifyPrimitive(issue.values[0])}`;\n return `Opci\u00F3 inv\u00E0lida: s'esperava una de ${util.joinValues(issue.values, \" o \")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"com a m\u00E0xim\" : \"menys de\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Massa gran: s'esperava que ${issue.origin ?? \"el valor\"} contingu\u00E9s ${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"elements\"}`;\n return `Massa gran: s'esperava que ${issue.origin ?? \"el valor\"} fos ${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"com a m\u00EDnim\" : \"m\u00E9s de\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Massa petit: s'esperava que ${issue.origin} contingu\u00E9s ${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Massa petit: s'esperava que ${issue.origin} fos ${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Format inv\u00E0lid: ha de comen\u00E7ar amb \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Format inv\u00E0lid: ha d'acabar amb \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Format inv\u00E0lid: ha d'incloure \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Format inv\u00E0lid: ha de coincidir amb el patr\u00F3 ${_issue.pattern}`;\n return `Format inv\u00E0lid per a ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `N\u00FAmero inv\u00E0lid: ha de ser m\u00FAltiple de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Clau${issue.keys.length > 1 ? \"s\" : \"\"} no reconeguda${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Clau inv\u00E0lida a ${issue.origin}`;\n case \"invalid_union\":\n return \"Entrada inv\u00E0lida\"; // Could also be \"Tipus d'uni\u00F3 inv\u00E0lid\" but \"Entrada inv\u00E0lida\" is more general\n case \"invalid_element\":\n return `Element inv\u00E0lid a ${issue.origin}`;\n default:\n return `Entrada inv\u00E0lida`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"znak\u016F\", verb: \"m\u00EDt\" },\n file: { unit: \"bajt\u016F\", verb: \"m\u00EDt\" },\n array: { unit: \"prvk\u016F\", verb: \"m\u00EDt\" },\n set: { unit: \"prvk\u016F\", verb: \"m\u00EDt\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"regul\u00E1rn\u00ED v\u00FDraz\",\n email: \"e-mailov\u00E1 adresa\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"datum a \u010Das ve form\u00E1tu ISO\",\n date: \"datum ve form\u00E1tu ISO\",\n time: \"\u010Das ve form\u00E1tu ISO\",\n duration: \"doba trv\u00E1n\u00ED ISO\",\n ipv4: \"IPv4 adresa\",\n ipv6: \"IPv6 adresa\",\n cidrv4: \"rozsah IPv4\",\n cidrv6: \"rozsah IPv6\",\n base64: \"\u0159et\u011Bzec zak\u00F3dovan\u00FD ve form\u00E1tu base64\",\n base64url: \"\u0159et\u011Bzec zak\u00F3dovan\u00FD ve form\u00E1tu base64url\",\n json_string: \"\u0159et\u011Bzec ve form\u00E1tu JSON\",\n e164: \"\u010D\u00EDslo E.164\",\n jwt: \"JWT\",\n template_literal: \"vstup\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u010D\u00EDslo\",\n string: \"\u0159et\u011Bzec\",\n function: \"funkce\",\n array: \"pole\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Neplatn\u00FD vstup: o\u010Dek\u00E1v\u00E1no instanceof ${issue.expected}, obdr\u017Eeno ${received}`;\n }\n return `Neplatn\u00FD vstup: o\u010Dek\u00E1v\u00E1no ${expected}, obdr\u017Eeno ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Neplatn\u00FD vstup: o\u010Dek\u00E1v\u00E1no ${util.stringifyPrimitive(issue.values[0])}`;\n return `Neplatn\u00E1 mo\u017Enost: o\u010Dek\u00E1v\u00E1na jedna z hodnot ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Hodnota je p\u0159\u00EDli\u0161 velk\u00E1: ${issue.origin ?? \"hodnota\"} mus\u00ED m\u00EDt ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"prvk\u016F\"}`;\n }\n return `Hodnota je p\u0159\u00EDli\u0161 velk\u00E1: ${issue.origin ?? \"hodnota\"} mus\u00ED b\u00FDt ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Hodnota je p\u0159\u00EDli\u0161 mal\u00E1: ${issue.origin ?? \"hodnota\"} mus\u00ED m\u00EDt ${adj}${issue.minimum.toString()} ${sizing.unit ?? \"prvk\u016F\"}`;\n }\n return `Hodnota je p\u0159\u00EDli\u0161 mal\u00E1: ${issue.origin ?? \"hodnota\"} mus\u00ED b\u00FDt ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Neplatn\u00FD \u0159et\u011Bzec: mus\u00ED za\u010D\u00EDnat na \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Neplatn\u00FD \u0159et\u011Bzec: mus\u00ED kon\u010Dit na \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Neplatn\u00FD \u0159et\u011Bzec: mus\u00ED obsahovat \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Neplatn\u00FD \u0159et\u011Bzec: mus\u00ED odpov\u00EDdat vzoru ${_issue.pattern}`;\n return `Neplatn\u00FD form\u00E1t ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Neplatn\u00E9 \u010D\u00EDslo: mus\u00ED b\u00FDt n\u00E1sobkem ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Nezn\u00E1m\u00E9 kl\u00ED\u010De: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Neplatn\u00FD kl\u00ED\u010D v ${issue.origin}`;\n case \"invalid_union\":\n return \"Neplatn\u00FD vstup\";\n case \"invalid_element\":\n return `Neplatn\u00E1 hodnota v ${issue.origin}`;\n default:\n return `Neplatn\u00FD vstup`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"tegn\", verb: \"havde\" },\n file: { unit: \"bytes\", verb: \"havde\" },\n array: { unit: \"elementer\", verb: \"indeholdt\" },\n set: { unit: \"elementer\", verb: \"indeholdt\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"e-mailadresse\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO dato- og klokkesl\u00E6t\",\n date: \"ISO-dato\",\n time: \"ISO-klokkesl\u00E6t\",\n duration: \"ISO-varighed\",\n ipv4: \"IPv4-omr\u00E5de\",\n ipv6: \"IPv6-omr\u00E5de\",\n cidrv4: \"IPv4-spektrum\",\n cidrv6: \"IPv6-spektrum\",\n base64: \"base64-kodet streng\",\n base64url: \"base64url-kodet streng\",\n json_string: \"JSON-streng\",\n e164: \"E.164-nummer\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n string: \"streng\",\n number: \"tal\",\n boolean: \"boolean\",\n array: \"liste\",\n object: \"objekt\",\n set: \"s\u00E6t\",\n file: \"fil\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ugyldigt input: forventede instanceof ${issue.expected}, fik ${received}`;\n }\n return `Ugyldigt input: forventede ${expected}, fik ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ugyldig v\u00E6rdi: forventede ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ugyldigt valg: forventede en af f\u00F8lgende ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n if (sizing)\n return `For stor: forventede ${origin ?? \"value\"} ${sizing.verb} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"elementer\"}`;\n return `For stor: forventede ${origin ?? \"value\"} havde ${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n if (sizing) {\n return `For lille: forventede ${origin} ${sizing.verb} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `For lille: forventede ${origin} havde ${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Ugyldig streng: skal starte med \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Ugyldig streng: skal ende med \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Ugyldig streng: skal indeholde \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Ugyldig streng: skal matche m\u00F8nsteret ${_issue.pattern}`;\n return `Ugyldig ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ugyldigt tal: skal v\u00E6re deleligt med ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Ukendte n\u00F8gler\" : \"Ukendt n\u00F8gle\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ugyldig n\u00F8gle i ${issue.origin}`;\n case \"invalid_union\":\n return \"Ugyldigt input: matcher ingen af de tilladte typer\";\n case \"invalid_element\":\n return `Ugyldig v\u00E6rdi i ${issue.origin}`;\n default:\n return `Ugyldigt input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"Zeichen\", verb: \"zu haben\" },\n file: { unit: \"Bytes\", verb: \"zu haben\" },\n array: { unit: \"Elemente\", verb: \"zu haben\" },\n set: { unit: \"Elemente\", verb: \"zu haben\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"Eingabe\",\n email: \"E-Mail-Adresse\",\n url: \"URL\",\n emoji: \"Emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-Datum und -Uhrzeit\",\n date: \"ISO-Datum\",\n time: \"ISO-Uhrzeit\",\n duration: \"ISO-Dauer\",\n ipv4: \"IPv4-Adresse\",\n ipv6: \"IPv6-Adresse\",\n cidrv4: \"IPv4-Bereich\",\n cidrv6: \"IPv6-Bereich\",\n base64: \"Base64-codierter String\",\n base64url: \"Base64-URL-codierter String\",\n json_string: \"JSON-String\",\n e164: \"E.164-Nummer\",\n jwt: \"JWT\",\n template_literal: \"Eingabe\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"Zahl\",\n array: \"Array\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ung\u00FCltige Eingabe: erwartet instanceof ${issue.expected}, erhalten ${received}`;\n }\n return `Ung\u00FCltige Eingabe: erwartet ${expected}, erhalten ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ung\u00FCltige Eingabe: erwartet ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ung\u00FCltige Option: erwartet eine von ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Zu gro\u00DF: erwartet, dass ${issue.origin ?? \"Wert\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"Elemente\"} hat`;\n return `Zu gro\u00DF: erwartet, dass ${issue.origin ?? \"Wert\"} ${adj}${issue.maximum.toString()} ist`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Zu klein: erwartet, dass ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} hat`;\n }\n return `Zu klein: erwartet, dass ${issue.origin} ${adj}${issue.minimum.toString()} ist`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Ung\u00FCltiger String: muss mit \"${_issue.prefix}\" beginnen`;\n if (_issue.format === \"ends_with\")\n return `Ung\u00FCltiger String: muss mit \"${_issue.suffix}\" enden`;\n if (_issue.format === \"includes\")\n return `Ung\u00FCltiger String: muss \"${_issue.includes}\" enthalten`;\n if (_issue.format === \"regex\")\n return `Ung\u00FCltiger String: muss dem Muster ${_issue.pattern} entsprechen`;\n return `Ung\u00FCltig: ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ung\u00FCltige Zahl: muss ein Vielfaches von ${issue.divisor} sein`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Unbekannte Schl\u00FCssel\" : \"Unbekannter Schl\u00FCssel\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ung\u00FCltiger Schl\u00FCssel in ${issue.origin}`;\n case \"invalid_union\":\n return \"Ung\u00FCltige Eingabe\";\n case \"invalid_element\":\n return `Ung\u00FCltiger Wert in ${issue.origin}`;\n default:\n return `Ung\u00FCltige Eingabe`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"characters\", verb: \"to have\" },\n file: { unit: \"bytes\", verb: \"to have\" },\n array: { unit: \"items\", verb: \"to have\" },\n set: { unit: \"items\", verb: \"to have\" },\n map: { unit: \"entries\", verb: \"to have\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"email address\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datetime\",\n date: \"ISO date\",\n time: \"ISO time\",\n duration: \"ISO duration\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n mac: \"MAC address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded string\",\n base64url: \"base64url-encoded string\",\n json_string: \"JSON string\",\n e164: \"E.164 number\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n // type names: missing keys = do not translate (use raw value via ?? fallback)\n const TypeDictionary = {\n // Compatibility: \"nan\" -> \"NaN\" for display\n nan: \"NaN\",\n // All other type names omitted - they fall back to raw values via ?? operator\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n return `Invalid input: expected ${expected}, received ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;\n return `Invalid option: expected one of ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Too big: expected ${issue.origin ?? \"value\"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elements\"}`;\n return `Too big: expected ${issue.origin ?? \"value\"} to be ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Invalid string: must start with \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Invalid string: must end with \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Invalid string: must include \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Invalid string: must match pattern ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Invalid number: must be a multiple of ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Unrecognized key${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Invalid key in ${issue.origin}`;\n case \"invalid_union\":\n return \"Invalid input\";\n case \"invalid_element\":\n return `Invalid value in ${issue.origin}`;\n default:\n return `Invalid input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"karaktrojn\", verb: \"havi\" },\n file: { unit: \"bajtojn\", verb: \"havi\" },\n array: { unit: \"elementojn\", verb: \"havi\" },\n set: { unit: \"elementojn\", verb: \"havi\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"enigo\",\n email: \"retadreso\",\n url: \"URL\",\n emoji: \"emo\u011Dio\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-datotempo\",\n date: \"ISO-dato\",\n time: \"ISO-tempo\",\n duration: \"ISO-da\u016Dro\",\n ipv4: \"IPv4-adreso\",\n ipv6: \"IPv6-adreso\",\n cidrv4: \"IPv4-rango\",\n cidrv6: \"IPv6-rango\",\n base64: \"64-ume kodita karaktraro\",\n base64url: \"URL-64-ume kodita karaktraro\",\n json_string: \"JSON-karaktraro\",\n e164: \"E.164-nombro\",\n jwt: \"JWT\",\n template_literal: \"enigo\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"nombro\",\n array: \"tabelo\",\n null: \"senvalora\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Nevalida enigo: atendi\u011Dis instanceof ${issue.expected}, ricevi\u011Dis ${received}`;\n }\n return `Nevalida enigo: atendi\u011Dis ${expected}, ricevi\u011Dis ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Nevalida enigo: atendi\u011Dis ${util.stringifyPrimitive(issue.values[0])}`;\n return `Nevalida opcio: atendi\u011Dis unu el ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Tro granda: atendi\u011Dis ke ${issue.origin ?? \"valoro\"} havu ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementojn\"}`;\n return `Tro granda: atendi\u011Dis ke ${issue.origin ?? \"valoro\"} havu ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Tro malgranda: atendi\u011Dis ke ${issue.origin} havu ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Tro malgranda: atendi\u011Dis ke ${issue.origin} estu ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Nevalida karaktraro: devas komenci\u011Di per \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Nevalida karaktraro: devas fini\u011Di per \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Nevalida karaktraro: devas inkluzivi \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;\n return `Nevalida ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Nevalida nombro: devas esti oblo de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Nekonata${issue.keys.length > 1 ? \"j\" : \"\"} \u015Dlosilo${issue.keys.length > 1 ? \"j\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Nevalida \u015Dlosilo en ${issue.origin}`;\n case \"invalid_union\":\n return \"Nevalida enigo\";\n case \"invalid_element\":\n return `Nevalida valoro en ${issue.origin}`;\n default:\n return `Nevalida enigo`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caracteres\", verb: \"tener\" },\n file: { unit: \"bytes\", verb: \"tener\" },\n array: { unit: \"elementos\", verb: \"tener\" },\n set: { unit: \"elementos\", verb: \"tener\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entrada\",\n email: \"direcci\u00F3n de correo electr\u00F3nico\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"fecha y hora ISO\",\n date: \"fecha ISO\",\n time: \"hora ISO\",\n duration: \"duraci\u00F3n ISO\",\n ipv4: \"direcci\u00F3n IPv4\",\n ipv6: \"direcci\u00F3n IPv6\",\n cidrv4: \"rango IPv4\",\n cidrv6: \"rango IPv6\",\n base64: \"cadena codificada en base64\",\n base64url: \"URL codificada en base64\",\n json_string: \"cadena JSON\",\n e164: \"n\u00FAmero E.164\",\n jwt: \"JWT\",\n template_literal: \"entrada\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n string: \"texto\",\n number: \"n\u00FAmero\",\n boolean: \"booleano\",\n array: \"arreglo\",\n object: \"objeto\",\n set: \"conjunto\",\n file: \"archivo\",\n date: \"fecha\",\n bigint: \"n\u00FAmero grande\",\n symbol: \"s\u00EDmbolo\",\n undefined: \"indefinido\",\n null: \"nulo\",\n function: \"funci\u00F3n\",\n map: \"mapa\",\n record: \"registro\",\n tuple: \"tupla\",\n enum: \"enumeraci\u00F3n\",\n union: \"uni\u00F3n\",\n literal: \"literal\",\n promise: \"promesa\",\n void: \"vac\u00EDo\",\n never: \"nunca\",\n unknown: \"desconocido\",\n any: \"cualquiera\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Entrada inv\u00E1lida: se esperaba instanceof ${issue.expected}, recibido ${received}`;\n }\n return `Entrada inv\u00E1lida: se esperaba ${expected}, recibido ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entrada inv\u00E1lida: se esperaba ${util.stringifyPrimitive(issue.values[0])}`;\n return `Opci\u00F3n inv\u00E1lida: se esperaba una de ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n if (sizing)\n return `Demasiado grande: se esperaba que ${origin ?? \"valor\"} tuviera ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementos\"}`;\n return `Demasiado grande: se esperaba que ${origin ?? \"valor\"} fuera ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n if (sizing) {\n return `Demasiado peque\u00F1o: se esperaba que ${origin} tuviera ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Demasiado peque\u00F1o: se esperaba que ${origin} fuera ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Cadena inv\u00E1lida: debe comenzar con \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Cadena inv\u00E1lida: debe terminar en \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Cadena inv\u00E1lida: debe incluir \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Cadena inv\u00E1lida: debe coincidir con el patr\u00F3n ${_issue.pattern}`;\n return `Inv\u00E1lido ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `N\u00FAmero inv\u00E1lido: debe ser m\u00FAltiplo de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Llave${issue.keys.length > 1 ? \"s\" : \"\"} desconocida${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Llave inv\u00E1lida en ${TypeDictionary[issue.origin] ?? issue.origin}`;\n case \"invalid_union\":\n return \"Entrada inv\u00E1lida\";\n case \"invalid_element\":\n return `Valor inv\u00E1lido en ${TypeDictionary[issue.origin] ?? issue.origin}`;\n default:\n return `Entrada inv\u00E1lida`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631\", verb: \"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F\" },\n file: { unit: \"\u0628\u0627\u06CC\u062A\", verb: \"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F\" },\n array: { unit: \"\u0622\u06CC\u062A\u0645\", verb: \"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F\" },\n set: { unit: \"\u0622\u06CC\u062A\u0645\", verb: \"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0648\u0631\u0648\u062F\u06CC\",\n email: \"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644\",\n url: \"URL\",\n emoji: \"\u0627\u06CC\u0645\u0648\u062C\u06CC\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648\",\n date: \"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648\",\n time: \"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648\",\n duration: \"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648\",\n ipv4: \"IPv4 \u0622\u062F\u0631\u0633\",\n ipv6: \"IPv6 \u0622\u062F\u0631\u0633\",\n cidrv4: \"IPv4 \u062F\u0627\u0645\u0646\u0647\",\n cidrv6: \"IPv6 \u062F\u0627\u0645\u0646\u0647\",\n base64: \"base64-encoded \u0631\u0634\u062A\u0647\",\n base64url: \"base64url-encoded \u0631\u0634\u062A\u0647\",\n json_string: \"JSON \u0631\u0634\u062A\u0647\",\n e164: \"E.164 \u0639\u062F\u062F\",\n jwt: \"JWT\",\n template_literal: \"\u0648\u0631\u0648\u062F\u06CC\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0639\u062F\u062F\",\n array: \"\u0622\u0631\u0627\u06CC\u0647\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${issue.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;\n }\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1) {\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${util.stringifyPrimitive(issue.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`;\n }\n return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${util.joinValues(issue.values, \"|\")} \u0645\u06CC\u200C\u0628\u0648\u062F`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue.origin ?? \"\u0645\u0642\u062F\u0627\u0631\"} \u0628\u0627\u06CC\u062F ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0639\u0646\u0635\u0631\"} \u0628\u0627\u0634\u062F`;\n }\n return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue.origin ?? \"\u0645\u0642\u062F\u0627\u0631\"} \u0628\u0627\u06CC\u062F ${adj}${issue.maximum.toString()} \u0628\u0627\u0634\u062F`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue.origin} \u0628\u0627\u06CC\u062F ${adj}${issue.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`;\n }\n return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue.origin} \u0628\u0627\u06CC\u062F ${adj}${issue.minimum.toString()} \u0628\u0627\u0634\u062F`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \"${_issue.prefix}\" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`;\n }\n if (_issue.format === \"ends_with\") {\n return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \"${_issue.suffix}\" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`;\n }\n if (_issue.format === \"includes\") {\n return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 \"${_issue.includes}\" \u0628\u0627\u0634\u062F`;\n }\n if (_issue.format === \"regex\") {\n return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`;\n }\n return `${FormatDictionary[_issue.format] ?? issue.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;\n }\n case \"not_multiple_of\":\n return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue.divisor} \u0628\u0627\u0634\u062F`;\n case \"unrecognized_keys\":\n return `\u06A9\u0644\u06CC\u062F${issue.keys.length > 1 ? \"\u0647\u0627\u06CC\" : \"\"} \u0646\u0627\u0634\u0646\u0627\u0633: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue.origin}`;\n case \"invalid_union\":\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;\n case \"invalid_element\":\n return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue.origin}`;\n default:\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"merkki\u00E4\", subject: \"merkkijonon\" },\n file: { unit: \"tavua\", subject: \"tiedoston\" },\n array: { unit: \"alkiota\", subject: \"listan\" },\n set: { unit: \"alkiota\", subject: \"joukon\" },\n number: { unit: \"\", subject: \"luvun\" },\n bigint: { unit: \"\", subject: \"suuren kokonaisluvun\" },\n int: { unit: \"\", subject: \"kokonaisluvun\" },\n date: { unit: \"\", subject: \"p\u00E4iv\u00E4m\u00E4\u00E4r\u00E4n\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"s\u00E4\u00E4nn\u00F6llinen lauseke\",\n email: \"s\u00E4hk\u00F6postiosoite\",\n url: \"URL-osoite\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-aikaleima\",\n date: \"ISO-p\u00E4iv\u00E4m\u00E4\u00E4r\u00E4\",\n time: \"ISO-aika\",\n duration: \"ISO-kesto\",\n ipv4: \"IPv4-osoite\",\n ipv6: \"IPv6-osoite\",\n cidrv4: \"IPv4-alue\",\n cidrv6: \"IPv6-alue\",\n base64: \"base64-koodattu merkkijono\",\n base64url: \"base64url-koodattu merkkijono\",\n json_string: \"JSON-merkkijono\",\n e164: \"E.164-luku\",\n jwt: \"JWT\",\n template_literal: \"templaattimerkkijono\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Virheellinen tyyppi: odotettiin instanceof ${issue.expected}, oli ${received}`;\n }\n return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Virheellinen sy\u00F6te: t\u00E4ytyy olla ${util.stringifyPrimitive(issue.values[0])}`;\n return `Virheellinen valinta: t\u00E4ytyy olla yksi seuraavista: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Liian suuri: ${sizing.subject} t\u00E4ytyy olla ${adj}${issue.maximum.toString()} ${sizing.unit}`.trim();\n }\n return `Liian suuri: arvon t\u00E4ytyy olla ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Liian pieni: ${sizing.subject} t\u00E4ytyy olla ${adj}${issue.minimum.toString()} ${sizing.unit}`.trim();\n }\n return `Liian pieni: arvon t\u00E4ytyy olla ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Virheellinen sy\u00F6te: t\u00E4ytyy alkaa \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Virheellinen sy\u00F6te: t\u00E4ytyy loppua \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Virheellinen sy\u00F6te: t\u00E4ytyy sis\u00E4lt\u00E4\u00E4 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\") {\n return `Virheellinen sy\u00F6te: t\u00E4ytyy vastata s\u00E4\u00E4nn\u00F6llist\u00E4 lauseketta ${_issue.pattern}`;\n }\n return `Virheellinen ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Virheellinen luku: t\u00E4ytyy olla luvun ${issue.divisor} monikerta`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Tuntemattomat avaimet\" : \"Tuntematon avain\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return \"Virheellinen avain tietueessa\";\n case \"invalid_union\":\n return \"Virheellinen unioni\";\n case \"invalid_element\":\n return \"Virheellinen arvo joukossa\";\n default:\n return `Virheellinen sy\u00F6te`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caract\u00E8res\", verb: \"avoir\" },\n file: { unit: \"octets\", verb: \"avoir\" },\n array: { unit: \"\u00E9l\u00E9ments\", verb: \"avoir\" },\n set: { unit: \"\u00E9l\u00E9ments\", verb: \"avoir\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entr\u00E9e\",\n email: \"adresse e-mail\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"date et heure ISO\",\n date: \"date ISO\",\n time: \"heure ISO\",\n duration: \"dur\u00E9e ISO\",\n ipv4: \"adresse IPv4\",\n ipv6: \"adresse IPv6\",\n cidrv4: \"plage IPv4\",\n cidrv6: \"plage IPv6\",\n base64: \"cha\u00EEne encod\u00E9e en base64\",\n base64url: \"cha\u00EEne encod\u00E9e en base64url\",\n json_string: \"cha\u00EEne JSON\",\n e164: \"num\u00E9ro E.164\",\n jwt: \"JWT\",\n template_literal: \"entr\u00E9e\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"nombre\",\n array: \"tableau\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Entr\u00E9e invalide : instanceof ${issue.expected} attendu, ${received} re\u00E7u`;\n }\n return `Entr\u00E9e invalide : ${expected} attendu, ${received} re\u00E7u`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entr\u00E9e invalide : ${util.stringifyPrimitive(issue.values[0])} attendu`;\n return `Option invalide : une valeur parmi ${util.joinValues(issue.values, \"|\")} attendue`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Trop grand : ${issue.origin ?? \"valeur\"} doit ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u00E9l\u00E9ment(s)\"}`;\n return `Trop grand : ${issue.origin ?? \"valeur\"} doit \u00EAtre ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Trop petit : ${issue.origin} doit ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Trop petit : ${issue.origin} doit \u00EAtre ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Cha\u00EEne invalide : doit commencer par \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Cha\u00EEne invalide : doit se terminer par \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Cha\u00EEne invalide : doit inclure \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Cha\u00EEne invalide : doit correspondre au mod\u00E8le ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} invalide`;\n }\n case \"not_multiple_of\":\n return `Nombre invalide : doit \u00EAtre un multiple de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Cl\u00E9${issue.keys.length > 1 ? \"s\" : \"\"} non reconnue${issue.keys.length > 1 ? \"s\" : \"\"} : ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Cl\u00E9 invalide dans ${issue.origin}`;\n case \"invalid_union\":\n return \"Entr\u00E9e invalide\";\n case \"invalid_element\":\n return `Valeur invalide dans ${issue.origin}`;\n default:\n return `Entr\u00E9e invalide`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caract\u00E8res\", verb: \"avoir\" },\n file: { unit: \"octets\", verb: \"avoir\" },\n array: { unit: \"\u00E9l\u00E9ments\", verb: \"avoir\" },\n set: { unit: \"\u00E9l\u00E9ments\", verb: \"avoir\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entr\u00E9e\",\n email: \"adresse courriel\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"date-heure ISO\",\n date: \"date ISO\",\n time: \"heure ISO\",\n duration: \"dur\u00E9e ISO\",\n ipv4: \"adresse IPv4\",\n ipv6: \"adresse IPv6\",\n cidrv4: \"plage IPv4\",\n cidrv6: \"plage IPv6\",\n base64: \"cha\u00EEne encod\u00E9e en base64\",\n base64url: \"cha\u00EEne encod\u00E9e en base64url\",\n json_string: \"cha\u00EEne JSON\",\n e164: \"num\u00E9ro E.164\",\n jwt: \"JWT\",\n template_literal: \"entr\u00E9e\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Entr\u00E9e invalide : attendu instanceof ${issue.expected}, re\u00E7u ${received}`;\n }\n return `Entr\u00E9e invalide : attendu ${expected}, re\u00E7u ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entr\u00E9e invalide : attendu ${util.stringifyPrimitive(issue.values[0])}`;\n return `Option invalide : attendu l'une des valeurs suivantes ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"\u2264\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Trop grand : attendu que ${issue.origin ?? \"la valeur\"} ait ${adj}${issue.maximum.toString()} ${sizing.unit}`;\n return `Trop grand : attendu que ${issue.origin ?? \"la valeur\"} soit ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"\u2265\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Trop petit : attendu que ${issue.origin} ait ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Trop petit : attendu que ${issue.origin} soit ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Cha\u00EEne invalide : doit commencer par \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Cha\u00EEne invalide : doit se terminer par \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Cha\u00EEne invalide : doit inclure \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Cha\u00EEne invalide : doit correspondre au motif ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} invalide`;\n }\n case \"not_multiple_of\":\n return `Nombre invalide : doit \u00EAtre un multiple de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Cl\u00E9${issue.keys.length > 1 ? \"s\" : \"\"} non reconnue${issue.keys.length > 1 ? \"s\" : \"\"} : ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Cl\u00E9 invalide dans ${issue.origin}`;\n case \"invalid_union\":\n return \"Entr\u00E9e invalide\";\n case \"invalid_element\":\n return `Valeur invalide dans ${issue.origin}`;\n default:\n return `Entr\u00E9e invalide`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n // Hebrew labels + grammatical gender\n const TypeNames = {\n string: { label: \"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA\", gender: \"f\" },\n number: { label: \"\u05DE\u05E1\u05E4\u05E8\", gender: \"m\" },\n boolean: { label: \"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9\", gender: \"m\" },\n bigint: { label: \"BigInt\", gender: \"m\" },\n date: { label: \"\u05EA\u05D0\u05E8\u05D9\u05DA\", gender: \"m\" },\n array: { label: \"\u05DE\u05E2\u05E8\u05DA\", gender: \"m\" },\n object: { label: \"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8\", gender: \"m\" },\n null: { label: \"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)\", gender: \"m\" },\n undefined: { label: \"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)\", gender: \"m\" },\n symbol: { label: \"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)\", gender: \"m\" },\n function: { label: \"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4\", gender: \"f\" },\n map: { label: \"\u05DE\u05E4\u05D4 (Map)\", gender: \"f\" },\n set: { label: \"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)\", gender: \"f\" },\n file: { label: \"\u05E7\u05D5\u05D1\u05E5\", gender: \"m\" },\n promise: { label: \"Promise\", gender: \"m\" },\n NaN: { label: \"NaN\", gender: \"m\" },\n unknown: { label: \"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2\", gender: \"m\" },\n value: { label: \"\u05E2\u05E8\u05DA\", gender: \"m\" },\n };\n // Sizing units for size-related messages + localized origin labels\n const Sizable = {\n string: { unit: \"\u05EA\u05D5\u05D5\u05D9\u05DD\", shortLabel: \"\u05E7\u05E6\u05E8\", longLabel: \"\u05D0\u05E8\u05D5\u05DA\" },\n file: { unit: \"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD\", shortLabel: \"\u05E7\u05D8\u05DF\", longLabel: \"\u05D2\u05D3\u05D5\u05DC\" },\n array: { unit: \"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD\", shortLabel: \"\u05E7\u05D8\u05DF\", longLabel: \"\u05D2\u05D3\u05D5\u05DC\" },\n set: { unit: \"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD\", shortLabel: \"\u05E7\u05D8\u05DF\", longLabel: \"\u05D2\u05D3\u05D5\u05DC\" },\n number: { unit: \"\", shortLabel: \"\u05E7\u05D8\u05DF\", longLabel: \"\u05D2\u05D3\u05D5\u05DC\" }, // no unit\n };\n // Helpers \u2014 labels, articles, and verbs\n const typeEntry = (t) => (t ? TypeNames[t] : undefined);\n const typeLabel = (t) => {\n const e = typeEntry(t);\n if (e)\n return e.label;\n // fallback: show raw string if unknown\n return t ?? TypeNames.unknown.label;\n };\n const withDefinite = (t) => `\u05D4${typeLabel(t)}`;\n const verbFor = (t) => {\n const e = typeEntry(t);\n const gender = e?.gender ?? \"m\";\n return gender === \"f\" ? \"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA\" : \"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA\";\n };\n const getSizing = (origin) => {\n if (!origin)\n return null;\n return Sizable[origin] ?? null;\n };\n const FormatDictionary = {\n regex: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n email: { label: \"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC\", gender: \"f\" },\n url: { label: \"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA\", gender: \"f\" },\n emoji: { label: \"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9\", gender: \"m\" },\n uuid: { label: \"UUID\", gender: \"m\" },\n nanoid: { label: \"nanoid\", gender: \"m\" },\n guid: { label: \"GUID\", gender: \"m\" },\n cuid: { label: \"cuid\", gender: \"m\" },\n cuid2: { label: \"cuid2\", gender: \"m\" },\n ulid: { label: \"ULID\", gender: \"m\" },\n xid: { label: \"XID\", gender: \"m\" },\n ksuid: { label: \"KSUID\", gender: \"m\" },\n datetime: { label: \"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO\", gender: \"m\" },\n date: { label: \"\u05EA\u05D0\u05E8\u05D9\u05DA ISO\", gender: \"m\" },\n time: { label: \"\u05D6\u05DE\u05DF ISO\", gender: \"m\" },\n duration: { label: \"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO\", gender: \"m\" },\n ipv4: { label: \"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4\", gender: \"f\" },\n ipv6: { label: \"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6\", gender: \"f\" },\n cidrv4: { label: \"\u05D8\u05D5\u05D5\u05D7 IPv4\", gender: \"m\" },\n cidrv6: { label: \"\u05D8\u05D5\u05D5\u05D7 IPv6\", gender: \"m\" },\n base64: { label: \"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64\", gender: \"f\" },\n base64url: { label: \"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA\", gender: \"f\" },\n json_string: { label: \"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON\", gender: \"f\" },\n e164: { label: \"\u05DE\u05E1\u05E4\u05E8 E.164\", gender: \"m\" },\n jwt: { label: \"JWT\", gender: \"m\" },\n ends_with: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n includes: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n lowercase: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n starts_with: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n uppercase: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n // Expected type: show without definite article for clearer Hebrew\n const expectedKey = issue.expected;\n const expected = TypeDictionary[expectedKey ?? \"\"] ?? typeLabel(expectedKey);\n // Received: show localized label if known, otherwise constructor/raw\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`;\n }\n return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`;\n }\n case \"invalid_value\": {\n if (issue.values.length === 1) {\n return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${util.stringifyPrimitive(issue.values[0])}`;\n }\n // Join values with proper Hebrew formatting\n const stringified = issue.values.map((v) => util.stringifyPrimitive(v));\n if (issue.values.length === 2) {\n return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`;\n }\n // For 3+ values: \"a\", \"b\" \u05D0\u05D5 \"c\"\n const lastValue = stringified[stringified.length - 1];\n const restValues = stringified.slice(0, -1).join(\", \");\n return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`;\n }\n case \"too_big\": {\n const sizing = getSizing(issue.origin);\n const subject = withDefinite(issue.origin ?? \"value\");\n if (issue.origin === \"string\") {\n // Special handling for strings - more natural Hebrew\n return `${sizing?.longLabel ?? \"\u05D0\u05E8\u05D5\u05DA\"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue.maximum.toString()} ${sizing?.unit ?? \"\"} ${issue.inclusive ? \"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA\" : \"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8\"}`.trim();\n }\n if (issue.origin === \"number\") {\n // Natural Hebrew for numbers\n const comparison = issue.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue.maximum}`;\n return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`;\n }\n if (issue.origin === \"array\" || issue.origin === \"set\") {\n // Natural Hebrew for arrays and sets\n const verb = issue.origin === \"set\" ? \"\u05E6\u05E8\u05D9\u05DB\u05D4\" : \"\u05E6\u05E8\u05D9\u05DA\";\n const comparison = issue.inclusive\n ? `${issue.maximum} ${sizing?.unit ?? \"\"} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`\n : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue.maximum} ${sizing?.unit ?? \"\"}`;\n return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();\n }\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const be = verbFor(issue.origin ?? \"value\");\n if (sizing?.unit) {\n return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue.maximum.toString()} ${sizing.unit}`;\n }\n return `${sizing?.longLabel ?? \"\u05D2\u05D3\u05D5\u05DC\"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const sizing = getSizing(issue.origin);\n const subject = withDefinite(issue.origin ?? \"value\");\n if (issue.origin === \"string\") {\n // Special handling for strings - more natural Hebrew\n return `${sizing?.shortLabel ?? \"\u05E7\u05E6\u05E8\"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue.minimum.toString()} ${sizing?.unit ?? \"\"} ${issue.inclusive ? \"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8\" : \"\u05DC\u05E4\u05D7\u05D5\u05EA\"}`.trim();\n }\n if (issue.origin === \"number\") {\n // Natural Hebrew for numbers\n const comparison = issue.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue.minimum}`;\n return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`;\n }\n if (issue.origin === \"array\" || issue.origin === \"set\") {\n // Natural Hebrew for arrays and sets\n const verb = issue.origin === \"set\" ? \"\u05E6\u05E8\u05D9\u05DB\u05D4\" : \"\u05E6\u05E8\u05D9\u05DA\";\n // Special case for singular (minimum === 1)\n if (issue.minimum === 1 && issue.inclusive) {\n const singularPhrase = issue.origin === \"set\" ? \"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3\" : \"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3\";\n return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`;\n }\n const comparison = issue.inclusive\n ? `${issue.minimum} ${sizing?.unit ?? \"\"} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`\n : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue.minimum} ${sizing?.unit ?? \"\"}`;\n return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();\n }\n const adj = issue.inclusive ? \">=\" : \">\";\n const be = verbFor(issue.origin ?? \"value\");\n if (sizing?.unit) {\n return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `${sizing?.shortLabel ?? \"\u05E7\u05D8\u05DF\"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n // These apply to strings \u2014 use feminine grammar + \u05D4\u05F3 \u05D4\u05D9\u05D3\u05D9\u05E2\u05D4\n if (_issue.format === \"starts_with\")\n return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`;\n // Handle gender agreement for formats\n const nounEntry = FormatDictionary[_issue.format];\n const noun = nounEntry?.label ?? _issue.format;\n const gender = nounEntry?.gender ?? \"m\";\n const adjective = gender === \"f\" ? \"\u05EA\u05E7\u05D9\u05E0\u05D4\" : \"\u05EA\u05E7\u05D9\u05DF\";\n return `${noun} \u05DC\u05D0 ${adjective}`;\n }\n case \"not_multiple_of\":\n return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u05DE\u05E4\u05EA\u05D7${issue.keys.length > 1 ? \"\u05D5\u05EA\" : \"\"} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue.keys.length > 1 ? \"\u05D9\u05DD\" : \"\u05D4\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\": {\n return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`;\n }\n case \"invalid_union\":\n return \"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF\";\n case \"invalid_element\": {\n const place = withDefinite(issue.origin ?? \"array\");\n return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`;\n }\n default:\n return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"karakter\", verb: \"legyen\" },\n file: { unit: \"byte\", verb: \"legyen\" },\n array: { unit: \"elem\", verb: \"legyen\" },\n set: { unit: \"elem\", verb: \"legyen\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"bemenet\",\n email: \"email c\u00EDm\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO id\u0151b\u00E9lyeg\",\n date: \"ISO d\u00E1tum\",\n time: \"ISO id\u0151\",\n duration: \"ISO id\u0151intervallum\",\n ipv4: \"IPv4 c\u00EDm\",\n ipv6: \"IPv6 c\u00EDm\",\n cidrv4: \"IPv4 tartom\u00E1ny\",\n cidrv6: \"IPv6 tartom\u00E1ny\",\n base64: \"base64-k\u00F3dolt string\",\n base64url: \"base64url-k\u00F3dolt string\",\n json_string: \"JSON string\",\n e164: \"E.164 sz\u00E1m\",\n jwt: \"JWT\",\n template_literal: \"bemenet\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"sz\u00E1m\",\n array: \"t\u00F6mb\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u00C9rv\u00E9nytelen bemenet: a v\u00E1rt \u00E9rt\u00E9k instanceof ${issue.expected}, a kapott \u00E9rt\u00E9k ${received}`;\n }\n return `\u00C9rv\u00E9nytelen bemenet: a v\u00E1rt \u00E9rt\u00E9k ${expected}, a kapott \u00E9rt\u00E9k ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u00C9rv\u00E9nytelen bemenet: a v\u00E1rt \u00E9rt\u00E9k ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u00C9rv\u00E9nytelen opci\u00F3: valamelyik \u00E9rt\u00E9k v\u00E1rt ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `T\u00FAl nagy: ${issue.origin ?? \"\u00E9rt\u00E9k\"} m\u00E9rete t\u00FAl nagy ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elem\"}`;\n return `T\u00FAl nagy: a bemeneti \u00E9rt\u00E9k ${issue.origin ?? \"\u00E9rt\u00E9k\"} t\u00FAl nagy: ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `T\u00FAl kicsi: a bemeneti \u00E9rt\u00E9k ${issue.origin} m\u00E9rete t\u00FAl kicsi ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `T\u00FAl kicsi: a bemeneti \u00E9rt\u00E9k ${issue.origin} t\u00FAl kicsi ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u00C9rv\u00E9nytelen string: \"${_issue.prefix}\" \u00E9rt\u00E9kkel kell kezd\u0151dnie`;\n if (_issue.format === \"ends_with\")\n return `\u00C9rv\u00E9nytelen string: \"${_issue.suffix}\" \u00E9rt\u00E9kkel kell v\u00E9gz\u0151dnie`;\n if (_issue.format === \"includes\")\n return `\u00C9rv\u00E9nytelen string: \"${_issue.includes}\" \u00E9rt\u00E9ket kell tartalmaznia`;\n if (_issue.format === \"regex\")\n return `\u00C9rv\u00E9nytelen string: ${_issue.pattern} mint\u00E1nak kell megfelelnie`;\n return `\u00C9rv\u00E9nytelen ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u00C9rv\u00E9nytelen sz\u00E1m: ${issue.divisor} t\u00F6bbsz\u00F6r\u00F6s\u00E9nek kell lennie`;\n case \"unrecognized_keys\":\n return `Ismeretlen kulcs${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u00C9rv\u00E9nytelen kulcs ${issue.origin}`;\n case \"invalid_union\":\n return \"\u00C9rv\u00E9nytelen bemenet\";\n case \"invalid_element\":\n return `\u00C9rv\u00E9nytelen \u00E9rt\u00E9k: ${issue.origin}`;\n default:\n return `\u00C9rv\u00E9nytelen bemenet`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nfunction getArmenianPlural(count, one, many) {\n return Math.abs(count) === 1 ? one : many;\n}\nfunction withDefiniteArticle(word) {\n if (!word)\n return \"\";\n const vowels = [\"\u0561\", \"\u0565\", \"\u0568\", \"\u056B\", \"\u0578\", \"\u0578\u0582\", \"\u0585\"];\n const lastChar = word[word.length - 1];\n return word + (vowels.includes(lastChar) ? \"\u0576\" : \"\u0568\");\n}\nconst error = () => {\n const Sizable = {\n string: {\n unit: {\n one: \"\u0576\u0577\u0561\u0576\",\n many: \"\u0576\u0577\u0561\u0576\u0576\u0565\u0580\",\n },\n verb: \"\u0578\u0582\u0576\u0565\u0576\u0561\u056C\",\n },\n file: {\n unit: {\n one: \"\u0562\u0561\u0575\u0569\",\n many: \"\u0562\u0561\u0575\u0569\u0565\u0580\",\n },\n verb: \"\u0578\u0582\u0576\u0565\u0576\u0561\u056C\",\n },\n array: {\n unit: {\n one: \"\u057F\u0561\u0580\u0580\",\n many: \"\u057F\u0561\u0580\u0580\u0565\u0580\",\n },\n verb: \"\u0578\u0582\u0576\u0565\u0576\u0561\u056C\",\n },\n set: {\n unit: {\n one: \"\u057F\u0561\u0580\u0580\",\n many: \"\u057F\u0561\u0580\u0580\u0565\u0580\",\n },\n verb: \"\u0578\u0582\u0576\u0565\u0576\u0561\u056C\",\n },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0574\u0578\u0582\u057F\u0584\",\n email: \"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565\",\n url: \"URL\",\n emoji: \"\u0567\u0574\u0578\u057B\u056B\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574\",\n date: \"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E\",\n time: \"ISO \u056A\u0561\u0574\",\n duration: \"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576\",\n ipv4: \"IPv4 \u0570\u0561\u057D\u0581\u0565\",\n ipv6: \"IPv6 \u0570\u0561\u057D\u0581\u0565\",\n cidrv4: \"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584\",\n cidrv6: \"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584\",\n base64: \"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572\",\n base64url: \"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572\",\n json_string: \"JSON \u057F\u0578\u0572\",\n e164: \"E.164 \u0570\u0561\u0574\u0561\u0580\",\n jwt: \"JWT\",\n template_literal: \"\u0574\u0578\u0582\u057F\u0584\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0569\u056B\u057E\",\n array: \"\u0566\u0561\u0576\u0563\u057E\u0561\u056E\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${issue.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`;\n }\n return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${util.stringifyPrimitive(issue.values[1])}`;\n return `\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const maxValue = Number(issue.maximum);\n const unit = getArmenianPlural(maxValue, sizing.unit.one, sizing.unit.many);\n return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue.origin ?? \"\u0561\u0580\u056A\u0565\u0584\")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue.maximum.toString()} ${unit}`;\n }\n return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue.origin ?? \"\u0561\u0580\u056A\u0565\u0584\")} \u056C\u056B\u0576\u056B ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const minValue = Number(issue.minimum);\n const unit = getArmenianPlural(minValue, sizing.unit.one, sizing.unit.many);\n return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue.minimum.toString()} ${unit}`;\n }\n return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue.origin)} \u056C\u056B\u0576\u056B ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B \"${_issue.prefix}\"-\u0578\u057E`;\n if (_issue.format === \"ends_with\")\n return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B \"${_issue.suffix}\"-\u0578\u057E`;\n if (_issue.format === \"includes\")\n return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${_issue.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`;\n return `\u054D\u056D\u0561\u056C ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${issue.divisor}-\u056B`;\n case \"unrecognized_keys\":\n return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${issue.keys.length > 1 ? \"\u0576\u0565\u0580\" : \"\"}. ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${withDefiniteArticle(issue.origin)}-\u0578\u0582\u0574`;\n case \"invalid_union\":\n return \"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\";\n case \"invalid_element\":\n return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${withDefiniteArticle(issue.origin)}-\u0578\u0582\u0574`;\n default:\n return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"karakter\", verb: \"memiliki\" },\n file: { unit: \"byte\", verb: \"memiliki\" },\n array: { unit: \"item\", verb: \"memiliki\" },\n set: { unit: \"item\", verb: \"memiliki\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"alamat email\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"tanggal dan waktu format ISO\",\n date: \"tanggal format ISO\",\n time: \"jam format ISO\",\n duration: \"durasi format ISO\",\n ipv4: \"alamat IPv4\",\n ipv6: \"alamat IPv6\",\n cidrv4: \"rentang alamat IPv4\",\n cidrv6: \"rentang alamat IPv6\",\n base64: \"string dengan enkode base64\",\n base64url: \"string dengan enkode base64url\",\n json_string: \"string JSON\",\n e164: \"angka E.164\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Input tidak valid: diharapkan instanceof ${issue.expected}, diterima ${received}`;\n }\n return `Input tidak valid: diharapkan ${expected}, diterima ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Input tidak valid: diharapkan ${util.stringifyPrimitive(issue.values[0])}`;\n return `Pilihan tidak valid: diharapkan salah satu dari ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Terlalu besar: diharapkan ${issue.origin ?? \"value\"} memiliki ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elemen\"}`;\n return `Terlalu besar: diharapkan ${issue.origin ?? \"value\"} menjadi ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Terlalu kecil: diharapkan ${issue.origin} memiliki ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Terlalu kecil: diharapkan ${issue.origin} menjadi ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `String tidak valid: harus dimulai dengan \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `String tidak valid: harus berakhir dengan \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `String tidak valid: harus menyertakan \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `String tidak valid: harus sesuai pola ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} tidak valid`;\n }\n case \"not_multiple_of\":\n return `Angka tidak valid: harus kelipatan dari ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Kunci tidak dikenali ${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Kunci tidak valid di ${issue.origin}`;\n case \"invalid_union\":\n return \"Input tidak valid\";\n case \"invalid_element\":\n return `Nilai tidak valid di ${issue.origin}`;\n default:\n return `Input tidak valid`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"stafi\", verb: \"a\u00F0 hafa\" },\n file: { unit: \"b\u00E6ti\", verb: \"a\u00F0 hafa\" },\n array: { unit: \"hluti\", verb: \"a\u00F0 hafa\" },\n set: { unit: \"hluti\", verb: \"a\u00F0 hafa\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"gildi\",\n email: \"netfang\",\n url: \"vefsl\u00F3\u00F0\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO dagsetning og t\u00EDmi\",\n date: \"ISO dagsetning\",\n time: \"ISO t\u00EDmi\",\n duration: \"ISO t\u00EDmalengd\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded strengur\",\n base64url: \"base64url-encoded strengur\",\n json_string: \"JSON strengur\",\n e164: \"E.164 t\u00F6lugildi\",\n jwt: \"JWT\",\n template_literal: \"gildi\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"n\u00FAmer\",\n array: \"fylki\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Rangt gildi: \u00DE\u00FA sl\u00F3st inn ${received} \u00FEar sem \u00E1 a\u00F0 vera instanceof ${issue.expected}`;\n }\n return `Rangt gildi: \u00DE\u00FA sl\u00F3st inn ${received} \u00FEar sem \u00E1 a\u00F0 vera ${expected}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Rangt gildi: gert r\u00E1\u00F0 fyrir ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u00D3gilt val: m\u00E1 vera eitt af eftirfarandi ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Of st\u00F3rt: gert er r\u00E1\u00F0 fyrir a\u00F0 ${issue.origin ?? \"gildi\"} hafi ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"hluti\"}`;\n return `Of st\u00F3rt: gert er r\u00E1\u00F0 fyrir a\u00F0 ${issue.origin ?? \"gildi\"} s\u00E9 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Of l\u00EDti\u00F0: gert er r\u00E1\u00F0 fyrir a\u00F0 ${issue.origin} hafi ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Of l\u00EDti\u00F0: gert er r\u00E1\u00F0 fyrir a\u00F0 ${issue.origin} s\u00E9 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u00D3gildur strengur: ver\u00F0ur a\u00F0 byrja \u00E1 \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u00D3gildur strengur: ver\u00F0ur a\u00F0 enda \u00E1 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u00D3gildur strengur: ver\u00F0ur a\u00F0 innihalda \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u00D3gildur strengur: ver\u00F0ur a\u00F0 fylgja mynstri ${_issue.pattern}`;\n return `Rangt ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `R\u00F6ng tala: ver\u00F0ur a\u00F0 vera margfeldi af ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u00D3\u00FEekkt ${issue.keys.length > 1 ? \"ir lyklar\" : \"ur lykill\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Rangur lykill \u00ED ${issue.origin}`;\n case \"invalid_union\":\n return \"Rangt gildi\";\n case \"invalid_element\":\n return `Rangt gildi \u00ED ${issue.origin}`;\n default:\n return `Rangt gildi`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caratteri\", verb: \"avere\" },\n file: { unit: \"byte\", verb: \"avere\" },\n array: { unit: \"elementi\", verb: \"avere\" },\n set: { unit: \"elementi\", verb: \"avere\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"indirizzo email\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"data e ora ISO\",\n date: \"data ISO\",\n time: \"ora ISO\",\n duration: \"durata ISO\",\n ipv4: \"indirizzo IPv4\",\n ipv6: \"indirizzo IPv6\",\n cidrv4: \"intervallo IPv4\",\n cidrv6: \"intervallo IPv6\",\n base64: \"stringa codificata in base64\",\n base64url: \"URL codificata in base64\",\n json_string: \"stringa JSON\",\n e164: \"numero E.164\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"numero\",\n array: \"vettore\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Input non valido: atteso instanceof ${issue.expected}, ricevuto ${received}`;\n }\n return `Input non valido: atteso ${expected}, ricevuto ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Input non valido: atteso ${util.stringifyPrimitive(issue.values[0])}`;\n return `Opzione non valida: atteso uno tra ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Troppo grande: ${issue.origin ?? \"valore\"} deve avere ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementi\"}`;\n return `Troppo grande: ${issue.origin ?? \"valore\"} deve essere ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Troppo piccolo: ${issue.origin} deve avere ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Troppo piccolo: ${issue.origin} deve essere ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Stringa non valida: deve iniziare con \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Stringa non valida: deve terminare con \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Stringa non valida: deve includere \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Numero non valido: deve essere un multiplo di ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Chiav${issue.keys.length > 1 ? \"i\" : \"e\"} non riconosciut${issue.keys.length > 1 ? \"e\" : \"a\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Chiave non valida in ${issue.origin}`;\n case \"invalid_union\":\n return \"Input non valido\";\n case \"invalid_element\":\n return `Valore non valido in ${issue.origin}`;\n default:\n return `Input non valido`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u6587\u5B57\", verb: \"\u3067\u3042\u308B\" },\n file: { unit: \"\u30D0\u30A4\u30C8\", verb: \"\u3067\u3042\u308B\" },\n array: { unit: \"\u8981\u7D20\", verb: \"\u3067\u3042\u308B\" },\n set: { unit: \"\u8981\u7D20\", verb: \"\u3067\u3042\u308B\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u5165\u529B\u5024\",\n email: \"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\",\n url: \"URL\",\n emoji: \"\u7D75\u6587\u5B57\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO\u65E5\u6642\",\n date: \"ISO\u65E5\u4ED8\",\n time: \"ISO\u6642\u523B\",\n duration: \"ISO\u671F\u9593\",\n ipv4: \"IPv4\u30A2\u30C9\u30EC\u30B9\",\n ipv6: \"IPv6\u30A2\u30C9\u30EC\u30B9\",\n cidrv4: \"IPv4\u7BC4\u56F2\",\n cidrv6: \"IPv6\u7BC4\u56F2\",\n base64: \"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217\",\n base64url: \"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217\",\n json_string: \"JSON\u6587\u5B57\u5217\",\n e164: \"E.164\u756A\u53F7\",\n jwt: \"JWT\",\n template_literal: \"\u5165\u529B\u5024\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u6570\u5024\",\n array: \"\u914D\u5217\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u7121\u52B9\u306A\u5165\u529B: instanceof ${issue.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;\n }\n return `\u7121\u52B9\u306A\u5165\u529B: ${expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u7121\u52B9\u306A\u5165\u529B: ${util.stringifyPrimitive(issue.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`;\n return `\u7121\u52B9\u306A\u9078\u629E: ${util.joinValues(issue.values, \"\u3001\")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"\u4EE5\u4E0B\u3067\u3042\u308B\" : \"\u3088\u308A\u5C0F\u3055\u3044\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue.origin ?? \"\u5024\"}\u306F${issue.maximum.toString()}${sizing.unit ?? \"\u8981\u7D20\"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue.origin ?? \"\u5024\"}\u306F${issue.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"\u4EE5\u4E0A\u3067\u3042\u308B\" : \"\u3088\u308A\u5927\u304D\u3044\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue.origin}\u306F${issue.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue.origin}\u306F${issue.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \"${_issue.prefix}\"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n if (_issue.format === \"ends_with\")\n return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \"${_issue.suffix}\"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n if (_issue.format === \"includes\")\n return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \"${_issue.includes}\"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n if (_issue.format === \"regex\")\n return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n return `\u7121\u52B9\u306A${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u7121\u52B9\u306A\u6570\u5024: ${issue.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n case \"unrecognized_keys\":\n return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue.keys.length > 1 ? \"\u7FA4\" : \"\"}: ${util.joinValues(issue.keys, \"\u3001\")}`;\n case \"invalid_key\":\n return `${issue.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;\n case \"invalid_union\":\n return \"\u7121\u52B9\u306A\u5165\u529B\";\n case \"invalid_element\":\n return `${issue.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;\n default:\n return `\u7121\u52B9\u306A\u5165\u529B`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD\", verb: \"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1\" },\n file: { unit: \"\u10D1\u10D0\u10D8\u10E2\u10D8\", verb: \"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1\" },\n array: { unit: \"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8\", verb: \"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1\" },\n set: { unit: \"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8\", verb: \"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0\",\n email: \"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8\",\n url: \"URL\",\n emoji: \"\u10D4\u10DB\u10DD\u10EF\u10D8\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD\",\n date: \"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8\",\n time: \"\u10D3\u10E0\u10DD\",\n duration: \"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0\",\n ipv4: \"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8\",\n ipv6: \"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8\",\n cidrv4: \"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8\",\n cidrv6: \"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8\",\n base64: \"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8\",\n base64url: \"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8\",\n json_string: \"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8\",\n e164: \"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8\",\n jwt: \"JWT\",\n template_literal: \"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8\",\n string: \"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8\",\n boolean: \"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8\",\n function: \"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0\",\n array: \"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${issue.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`;\n }\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${util.joinValues(issue.values, \"|\")}-\u10D3\u10D0\u10DC`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue.origin ?? \"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0\"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit}`;\n return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue.origin ?? \"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0\"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \"${_issue.prefix}\"-\u10D8\u10D7`;\n }\n if (_issue.format === \"ends_with\")\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \"${_issue.suffix}\"-\u10D8\u10D7`;\n if (_issue.format === \"includes\")\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 \"${_issue.includes}\"-\u10E1`;\n if (_issue.format === \"regex\")\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;\n case \"unrecognized_keys\":\n return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue.keys.length > 1 ? \"\u10D4\u10D1\u10D8\" : \"\u10D8\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue.origin}-\u10E8\u10D8`;\n case \"invalid_union\":\n return \"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0\";\n case \"invalid_element\":\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue.origin}-\u10E8\u10D8`;\n default:\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import km from \"./km.js\";\n/** @deprecated Use `km` instead. */\nexport default function () {\n return km();\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A\", verb: \"\u1782\u17BD\u179A\u1798\u17B6\u1793\" },\n file: { unit: \"\u1794\u17C3\", verb: \"\u1782\u17BD\u179A\u1798\u17B6\u1793\" },\n array: { unit: \"\u1792\u17B6\u178F\u17BB\", verb: \"\u1782\u17BD\u179A\u1798\u17B6\u1793\" },\n set: { unit: \"\u1792\u17B6\u178F\u17BB\", verb: \"\u1782\u17BD\u179A\u1798\u17B6\u1793\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\",\n email: \"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B\",\n url: \"URL\",\n emoji: \"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO\",\n date: \"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO\",\n time: \"\u1798\u17C9\u17C4\u1784 ISO\",\n duration: \"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO\",\n ipv4: \"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4\",\n ipv6: \"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6\",\n cidrv4: \"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4\",\n cidrv6: \"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6\",\n base64: \"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64\",\n base64url: \"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url\",\n json_string: \"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON\",\n e164: \"\u179B\u17C1\u1781 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u179B\u17C1\u1781\",\n array: \"\u17A2\u17B6\u179A\u17C1 (Array)\",\n null: \"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${issue.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`;\n }\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue.origin ?? \"\u178F\u1798\u17D2\u179B\u17C3\"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"\u1792\u17B6\u178F\u17BB\"}`;\n return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue.origin ?? \"\u178F\u1798\u17D2\u179B\u17C3\"} ${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue.origin} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue.origin} ${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`;\n return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue.origin}`;\n case \"invalid_union\":\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`;\n case \"invalid_element\":\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue.origin}`;\n default:\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\uBB38\uC790\", verb: \"to have\" },\n file: { unit: \"\uBC14\uC774\uD2B8\", verb: \"to have\" },\n array: { unit: \"\uAC1C\", verb: \"to have\" },\n set: { unit: \"\uAC1C\", verb: \"to have\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\uC785\uB825\",\n email: \"\uC774\uBA54\uC77C \uC8FC\uC18C\",\n url: \"URL\",\n emoji: \"\uC774\uBAA8\uC9C0\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \uB0A0\uC9DC\uC2DC\uAC04\",\n date: \"ISO \uB0A0\uC9DC\",\n time: \"ISO \uC2DC\uAC04\",\n duration: \"ISO \uAE30\uAC04\",\n ipv4: \"IPv4 \uC8FC\uC18C\",\n ipv6: \"IPv6 \uC8FC\uC18C\",\n cidrv4: \"IPv4 \uBC94\uC704\",\n cidrv6: \"IPv6 \uBC94\uC704\",\n base64: \"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4\",\n base64url: \"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4\",\n json_string: \"JSON \uBB38\uC790\uC5F4\",\n e164: \"E.164 \uBC88\uD638\",\n jwt: \"JWT\",\n template_literal: \"\uC785\uB825\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${issue.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`;\n }\n return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${util.stringifyPrimitive(issue.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`;\n return `\uC798\uBABB\uB41C \uC635\uC158: ${util.joinValues(issue.values, \"\uB610\uB294 \")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"\uC774\uD558\" : \"\uBBF8\uB9CC\";\n const suffix = adj === \"\uBBF8\uB9CC\" ? \"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4\" : \"\uC5EC\uC57C \uD569\uB2C8\uB2E4\";\n const sizing = getSizing(issue.origin);\n const unit = sizing?.unit ?? \"\uC694\uC18C\";\n if (sizing)\n return `${issue.origin ?? \"\uAC12\"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue.maximum.toString()}${unit} ${adj}${suffix}`;\n return `${issue.origin ?? \"\uAC12\"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue.maximum.toString()} ${adj}${suffix}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"\uC774\uC0C1\" : \"\uCD08\uACFC\";\n const suffix = adj === \"\uC774\uC0C1\" ? \"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4\" : \"\uC5EC\uC57C \uD569\uB2C8\uB2E4\";\n const sizing = getSizing(issue.origin);\n const unit = sizing?.unit ?? \"\uC694\uC18C\";\n if (sizing) {\n return `${issue.origin ?? \"\uAC12\"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue.minimum.toString()}${unit} ${adj}${suffix}`;\n }\n return `${issue.origin ?? \"\uAC12\"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue.minimum.toString()} ${adj}${suffix}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \"${_issue.prefix}\"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`;\n }\n if (_issue.format === \"ends_with\")\n return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \"${_issue.suffix}\"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`;\n if (_issue.format === \"includes\")\n return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \"${_issue.includes}\"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`;\n if (_issue.format === \"regex\")\n return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`;\n return `\uC798\uBABB\uB41C ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;\n case \"unrecognized_keys\":\n return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\uC798\uBABB\uB41C \uD0A4: ${issue.origin}`;\n case \"invalid_union\":\n return `\uC798\uBABB\uB41C \uC785\uB825`;\n case \"invalid_element\":\n return `\uC798\uBABB\uB41C \uAC12: ${issue.origin}`;\n default:\n return `\uC798\uBABB\uB41C \uC785\uB825`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst capitalizeFirstCharacter = (text) => {\n return text.charAt(0).toUpperCase() + text.slice(1);\n};\nfunction getUnitTypeFromNumber(number) {\n const abs = Math.abs(number);\n const last = abs % 10;\n const last2 = abs % 100;\n if ((last2 >= 11 && last2 <= 19) || last === 0)\n return \"many\";\n if (last === 1)\n return \"one\";\n return \"few\";\n}\nconst error = () => {\n const Sizable = {\n string: {\n unit: {\n one: \"simbolis\",\n few: \"simboliai\",\n many: \"simboli\u0173\",\n },\n verb: {\n smaller: {\n inclusive: \"turi b\u016Bti ne ilgesn\u0117 kaip\",\n notInclusive: \"turi b\u016Bti trumpesn\u0117 kaip\",\n },\n bigger: {\n inclusive: \"turi b\u016Bti ne trumpesn\u0117 kaip\",\n notInclusive: \"turi b\u016Bti ilgesn\u0117 kaip\",\n },\n },\n },\n file: {\n unit: {\n one: \"baitas\",\n few: \"baitai\",\n many: \"bait\u0173\",\n },\n verb: {\n smaller: {\n inclusive: \"turi b\u016Bti ne didesnis kaip\",\n notInclusive: \"turi b\u016Bti ma\u017Eesnis kaip\",\n },\n bigger: {\n inclusive: \"turi b\u016Bti ne ma\u017Eesnis kaip\",\n notInclusive: \"turi b\u016Bti didesnis kaip\",\n },\n },\n },\n array: {\n unit: {\n one: \"element\u0105\",\n few: \"elementus\",\n many: \"element\u0173\",\n },\n verb: {\n smaller: {\n inclusive: \"turi tur\u0117ti ne daugiau kaip\",\n notInclusive: \"turi tur\u0117ti ma\u017Eiau kaip\",\n },\n bigger: {\n inclusive: \"turi tur\u0117ti ne ma\u017Eiau kaip\",\n notInclusive: \"turi tur\u0117ti daugiau kaip\",\n },\n },\n },\n set: {\n unit: {\n one: \"element\u0105\",\n few: \"elementus\",\n many: \"element\u0173\",\n },\n verb: {\n smaller: {\n inclusive: \"turi tur\u0117ti ne daugiau kaip\",\n notInclusive: \"turi tur\u0117ti ma\u017Eiau kaip\",\n },\n bigger: {\n inclusive: \"turi tur\u0117ti ne ma\u017Eiau kaip\",\n notInclusive: \"turi tur\u0117ti daugiau kaip\",\n },\n },\n },\n };\n function getSizing(origin, unitType, inclusive, targetShouldBe) {\n const result = Sizable[origin] ?? null;\n if (result === null)\n return result;\n return {\n unit: result.unit[unitType],\n verb: result.verb[targetShouldBe][inclusive ? \"inclusive\" : \"notInclusive\"],\n };\n }\n const FormatDictionary = {\n regex: \"\u012Fvestis\",\n email: \"el. pa\u0161to adresas\",\n url: \"URL\",\n emoji: \"jaustukas\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO data ir laikas\",\n date: \"ISO data\",\n time: \"ISO laikas\",\n duration: \"ISO trukm\u0117\",\n ipv4: \"IPv4 adresas\",\n ipv6: \"IPv6 adresas\",\n cidrv4: \"IPv4 tinklo prefiksas (CIDR)\",\n cidrv6: \"IPv6 tinklo prefiksas (CIDR)\",\n base64: \"base64 u\u017Ekoduota eilut\u0117\",\n base64url: \"base64url u\u017Ekoduota eilut\u0117\",\n json_string: \"JSON eilut\u0117\",\n e164: \"E.164 numeris\",\n jwt: \"JWT\",\n template_literal: \"\u012Fvestis\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"skai\u010Dius\",\n bigint: \"sveikasis skai\u010Dius\",\n string: \"eilut\u0117\",\n boolean: \"login\u0117 reik\u0161m\u0117\",\n undefined: \"neapibr\u0117\u017Eta reik\u0161m\u0117\",\n function: \"funkcija\",\n symbol: \"simbolis\",\n array: \"masyvas\",\n object: \"objektas\",\n null: \"nulin\u0117 reik\u0161m\u0117\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Gautas tipas ${received}, o tik\u0117tasi - instanceof ${issue.expected}`;\n }\n return `Gautas tipas ${received}, o tik\u0117tasi - ${expected}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Privalo b\u016Bti ${util.stringifyPrimitive(issue.values[0])}`;\n return `Privalo b\u016Bti vienas i\u0161 ${util.joinValues(issue.values, \"|\")} pasirinkim\u0173`;\n case \"too_big\": {\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n const sizing = getSizing(issue.origin, getUnitTypeFromNumber(Number(issue.maximum)), issue.inclusive ?? false, \"smaller\");\n if (sizing?.verb)\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} ${sizing.verb} ${issue.maximum.toString()} ${sizing.unit ?? \"element\u0173\"}`;\n const adj = issue.inclusive ? \"ne didesnis kaip\" : \"ma\u017Eesnis kaip\";\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} turi b\u016Bti ${adj} ${issue.maximum.toString()} ${sizing?.unit}`;\n }\n case \"too_small\": {\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n const sizing = getSizing(issue.origin, getUnitTypeFromNumber(Number(issue.minimum)), issue.inclusive ?? false, \"bigger\");\n if (sizing?.verb)\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} ${sizing.verb} ${issue.minimum.toString()} ${sizing.unit ?? \"element\u0173\"}`;\n const adj = issue.inclusive ? \"ne ma\u017Eesnis kaip\" : \"didesnis kaip\";\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} turi b\u016Bti ${adj} ${issue.minimum.toString()} ${sizing?.unit}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Eilut\u0117 privalo prasid\u0117ti \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Eilut\u0117 privalo pasibaigti \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Eilut\u0117 privalo \u012Ftraukti \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Eilut\u0117 privalo atitikti ${_issue.pattern}`;\n return `Neteisingas ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Skai\u010Dius privalo b\u016Bti ${issue.divisor} kartotinis.`;\n case \"unrecognized_keys\":\n return `Neatpa\u017Eint${issue.keys.length > 1 ? \"i\" : \"as\"} rakt${issue.keys.length > 1 ? \"ai\" : \"as\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return \"Rastas klaidingas raktas\";\n case \"invalid_union\":\n return \"Klaidinga \u012Fvestis\";\n case \"invalid_element\": {\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} turi klaiding\u0105 \u012Fvest\u012F`;\n }\n default:\n return \"Klaidinga \u012Fvestis\";\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0437\u043D\u0430\u0446\u0438\", verb: \"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442\" },\n file: { unit: \"\u0431\u0430\u0458\u0442\u0438\", verb: \"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442\" },\n array: { unit: \"\u0441\u0442\u0430\u0432\u043A\u0438\", verb: \"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442\" },\n set: { unit: \"\u0441\u0442\u0430\u0432\u043A\u0438\", verb: \"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0432\u043D\u0435\u0441\",\n email: \"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430\",\n url: \"URL\",\n emoji: \"\u0435\u043C\u043E\u045F\u0438\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435\",\n date: \"ISO \u0434\u0430\u0442\u0443\u043C\",\n time: \"ISO \u0432\u0440\u0435\u043C\u0435\",\n duration: \"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435\",\n ipv4: \"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430\",\n ipv6: \"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430\",\n cidrv4: \"IPv4 \u043E\u043F\u0441\u0435\u0433\",\n cidrv6: \"IPv6 \u043E\u043F\u0441\u0435\u0433\",\n base64: \"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430\",\n base64url: \"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430\",\n json_string: \"JSON \u043D\u0438\u0437\u0430\",\n e164: \"E.164 \u0431\u0440\u043E\u0458\",\n jwt: \"JWT\",\n template_literal: \"\u0432\u043D\u0435\u0441\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0431\u0440\u043E\u0458\",\n array: \"\u043D\u0438\u0437\u0430\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${issue.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`;\n }\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue.origin ?? \"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430\"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438\"}`;\n return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue.origin ?? \"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430\"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438\" : \"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue.origin}`;\n case \"invalid_union\":\n return \"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441\";\n case \"invalid_element\":\n return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue.origin}`;\n default:\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"aksara\", verb: \"mempunyai\" },\n file: { unit: \"bait\", verb: \"mempunyai\" },\n array: { unit: \"elemen\", verb: \"mempunyai\" },\n set: { unit: \"elemen\", verb: \"mempunyai\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"alamat e-mel\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"tarikh masa ISO\",\n date: \"tarikh ISO\",\n time: \"masa ISO\",\n duration: \"tempoh ISO\",\n ipv4: \"alamat IPv4\",\n ipv6: \"alamat IPv6\",\n cidrv4: \"julat IPv4\",\n cidrv6: \"julat IPv6\",\n base64: \"string dikodkan base64\",\n base64url: \"string dikodkan base64url\",\n json_string: \"string JSON\",\n e164: \"nombor E.164\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"nombor\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Input tidak sah: dijangka instanceof ${issue.expected}, diterima ${received}`;\n }\n return `Input tidak sah: dijangka ${expected}, diterima ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Input tidak sah: dijangka ${util.stringifyPrimitive(issue.values[0])}`;\n return `Pilihan tidak sah: dijangka salah satu daripada ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Terlalu besar: dijangka ${issue.origin ?? \"nilai\"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elemen\"}`;\n return `Terlalu besar: dijangka ${issue.origin ?? \"nilai\"} adalah ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Terlalu kecil: dijangka ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Terlalu kecil: dijangka ${issue.origin} adalah ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `String tidak sah: mesti bermula dengan \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `String tidak sah: mesti berakhir dengan \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `String tidak sah: mesti mengandungi \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} tidak sah`;\n }\n case \"not_multiple_of\":\n return `Nombor tidak sah: perlu gandaan ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Kunci tidak dikenali: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Kunci tidak sah dalam ${issue.origin}`;\n case \"invalid_union\":\n return \"Input tidak sah\";\n case \"invalid_element\":\n return `Nilai tidak sah dalam ${issue.origin}`;\n default:\n return `Input tidak sah`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"tekens\", verb: \"heeft\" },\n file: { unit: \"bytes\", verb: \"heeft\" },\n array: { unit: \"elementen\", verb: \"heeft\" },\n set: { unit: \"elementen\", verb: \"heeft\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"invoer\",\n email: \"emailadres\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datum en tijd\",\n date: \"ISO datum\",\n time: \"ISO tijd\",\n duration: \"ISO duur\",\n ipv4: \"IPv4-adres\",\n ipv6: \"IPv6-adres\",\n cidrv4: \"IPv4-bereik\",\n cidrv6: \"IPv6-bereik\",\n base64: \"base64-gecodeerde tekst\",\n base64url: \"base64 URL-gecodeerde tekst\",\n json_string: \"JSON string\",\n e164: \"E.164-nummer\",\n jwt: \"JWT\",\n template_literal: \"invoer\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"getal\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ongeldige invoer: verwacht instanceof ${issue.expected}, ontving ${received}`;\n }\n return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ongeldige invoer: verwacht ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ongeldige optie: verwacht \u00E9\u00E9n van ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n const longName = issue.origin === \"date\" ? \"laat\" : issue.origin === \"string\" ? \"lang\" : \"groot\";\n if (sizing)\n return `Te ${longName}: verwacht dat ${issue.origin ?? \"waarde\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementen\"} ${sizing.verb}`;\n return `Te ${longName}: verwacht dat ${issue.origin ?? \"waarde\"} ${adj}${issue.maximum.toString()} is`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n const shortName = issue.origin === \"date\" ? \"vroeg\" : issue.origin === \"string\" ? \"kort\" : \"klein\";\n if (sizing) {\n return `Te ${shortName}: verwacht dat ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} ${sizing.verb}`;\n }\n return `Te ${shortName}: verwacht dat ${issue.origin} ${adj}${issue.minimum.toString()} is`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Ongeldige tekst: moet met \"${_issue.prefix}\" beginnen`;\n }\n if (_issue.format === \"ends_with\")\n return `Ongeldige tekst: moet op \"${_issue.suffix}\" eindigen`;\n if (_issue.format === \"includes\")\n return `Ongeldige tekst: moet \"${_issue.includes}\" bevatten`;\n if (_issue.format === \"regex\")\n return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`;\n return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ongeldig getal: moet een veelvoud van ${issue.divisor} zijn`;\n case \"unrecognized_keys\":\n return `Onbekende key${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ongeldige key in ${issue.origin}`;\n case \"invalid_union\":\n return \"Ongeldige invoer\";\n case \"invalid_element\":\n return `Ongeldige waarde in ${issue.origin}`;\n default:\n return `Ongeldige invoer`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"tegn\", verb: \"\u00E5 ha\" },\n file: { unit: \"bytes\", verb: \"\u00E5 ha\" },\n array: { unit: \"elementer\", verb: \"\u00E5 inneholde\" },\n set: { unit: \"elementer\", verb: \"\u00E5 inneholde\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"e-postadresse\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO dato- og klokkeslett\",\n date: \"ISO-dato\",\n time: \"ISO-klokkeslett\",\n duration: \"ISO-varighet\",\n ipv4: \"IPv4-omr\u00E5de\",\n ipv6: \"IPv6-omr\u00E5de\",\n cidrv4: \"IPv4-spekter\",\n cidrv6: \"IPv6-spekter\",\n base64: \"base64-enkodet streng\",\n base64url: \"base64url-enkodet streng\",\n json_string: \"JSON-streng\",\n e164: \"E.164-nummer\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"tall\",\n array: \"liste\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ugyldig input: forventet instanceof ${issue.expected}, fikk ${received}`;\n }\n return `Ugyldig input: forventet ${expected}, fikk ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ugyldig verdi: forventet ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ugyldig valg: forventet en av ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `For stor(t): forventet ${issue.origin ?? \"value\"} til \u00E5 ha ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementer\"}`;\n return `For stor(t): forventet ${issue.origin ?? \"value\"} til \u00E5 ha ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `For lite(n): forventet ${issue.origin} til \u00E5 ha ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `For lite(n): forventet ${issue.origin} til \u00E5 ha ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Ugyldig streng: m\u00E5 starte med \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Ugyldig streng: m\u00E5 ende med \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Ugyldig streng: m\u00E5 inneholde \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Ugyldig streng: m\u00E5 matche m\u00F8nsteret ${_issue.pattern}`;\n return `Ugyldig ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ugyldig tall: m\u00E5 v\u00E6re et multiplum av ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Ukjente n\u00F8kler\" : \"Ukjent n\u00F8kkel\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ugyldig n\u00F8kkel i ${issue.origin}`;\n case \"invalid_union\":\n return \"Ugyldig input\";\n case \"invalid_element\":\n return `Ugyldig verdi i ${issue.origin}`;\n default:\n return `Ugyldig input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"harf\", verb: \"olmal\u0131d\u0131r\" },\n file: { unit: \"bayt\", verb: \"olmal\u0131d\u0131r\" },\n array: { unit: \"unsur\", verb: \"olmal\u0131d\u0131r\" },\n set: { unit: \"unsur\", verb: \"olmal\u0131d\u0131r\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"giren\",\n email: \"epostag\u00E2h\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO heng\u00E2m\u0131\",\n date: \"ISO tarihi\",\n time: \"ISO zaman\u0131\",\n duration: \"ISO m\u00FCddeti\",\n ipv4: \"IPv4 ni\u015F\u00E2n\u0131\",\n ipv6: \"IPv6 ni\u015F\u00E2n\u0131\",\n cidrv4: \"IPv4 menzili\",\n cidrv6: \"IPv6 menzili\",\n base64: \"base64-\u015Fifreli metin\",\n base64url: \"base64url-\u015Fifreli metin\",\n json_string: \"JSON metin\",\n e164: \"E.164 say\u0131s\u0131\",\n jwt: \"JWT\",\n template_literal: \"giren\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"numara\",\n array: \"saf\",\n null: \"gayb\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `F\u00E2sit giren: umulan instanceof ${issue.expected}, al\u0131nan ${received}`;\n }\n return `F\u00E2sit giren: umulan ${expected}, al\u0131nan ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `F\u00E2sit giren: umulan ${util.stringifyPrimitive(issue.values[0])}`;\n return `F\u00E2sit tercih: m\u00FBteberler ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Fazla b\u00FCy\u00FCk: ${issue.origin ?? \"value\"}, ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elements\"} sahip olmal\u0131yd\u0131.`;\n return `Fazla b\u00FCy\u00FCk: ${issue.origin ?? \"value\"}, ${adj}${issue.maximum.toString()} olmal\u0131yd\u0131.`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Fazla k\u00FC\u00E7\u00FCk: ${issue.origin}, ${adj}${issue.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`;\n }\n return `Fazla k\u00FC\u00E7\u00FCk: ${issue.origin}, ${adj}${issue.minimum.toString()} olmal\u0131yd\u0131.`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `F\u00E2sit metin: \"${_issue.prefix}\" ile ba\u015Flamal\u0131.`;\n if (_issue.format === \"ends_with\")\n return `F\u00E2sit metin: \"${_issue.suffix}\" ile bitmeli.`;\n if (_issue.format === \"includes\")\n return `F\u00E2sit metin: \"${_issue.includes}\" ihtiv\u00E2 etmeli.`;\n if (_issue.format === \"regex\")\n return `F\u00E2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`;\n return `F\u00E2sit ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `F\u00E2sit say\u0131: ${issue.divisor} kat\u0131 olmal\u0131yd\u0131.`;\n case \"unrecognized_keys\":\n return `Tan\u0131nmayan anahtar ${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} i\u00E7in tan\u0131nmayan anahtar var.`;\n case \"invalid_union\":\n return \"Giren tan\u0131namad\u0131.\";\n case \"invalid_element\":\n return `${issue.origin} i\u00E7in tan\u0131nmayan k\u0131ymet var.`;\n default:\n return `K\u0131ymet tan\u0131namad\u0131.`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u062A\u0648\u06A9\u064A\", verb: \"\u0648\u0644\u0631\u064A\" },\n file: { unit: \"\u0628\u0627\u06CC\u067C\u0633\", verb: \"\u0648\u0644\u0631\u064A\" },\n array: { unit: \"\u062A\u0648\u06A9\u064A\", verb: \"\u0648\u0644\u0631\u064A\" },\n set: { unit: \"\u062A\u0648\u06A9\u064A\", verb: \"\u0648\u0644\u0631\u064A\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0648\u0631\u0648\u062F\u064A\",\n email: \"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9\",\n url: \"\u06CC\u0648 \u0622\u0631 \u0627\u0644\",\n emoji: \"\u0627\u06CC\u0645\u0648\u062C\u064A\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A\",\n date: \"\u0646\u06D0\u067C\u0647\",\n time: \"\u0648\u062E\u062A\",\n duration: \"\u0645\u0648\u062F\u0647\",\n ipv4: \"\u062F IPv4 \u067E\u062A\u0647\",\n ipv6: \"\u062F IPv6 \u067E\u062A\u0647\",\n cidrv4: \"\u062F IPv4 \u0633\u0627\u062D\u0647\",\n cidrv6: \"\u062F IPv6 \u0633\u0627\u062D\u0647\",\n base64: \"base64-encoded \u0645\u062A\u0646\",\n base64url: \"base64url-encoded \u0645\u062A\u0646\",\n json_string: \"JSON \u0645\u062A\u0646\",\n e164: \"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647\",\n jwt: \"JWT\",\n template_literal: \"\u0648\u0631\u0648\u062F\u064A\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0639\u062F\u062F\",\n array: \"\u0627\u0631\u06D0\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${issue.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;\n }\n return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1) {\n return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${util.stringifyPrimitive(issue.values[0])} \u0648\u0627\u06CC`;\n }\n return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${util.joinValues(issue.values, \"|\")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue.origin ?? \"\u0627\u0631\u0632\u069A\u062A\"} \u0628\u0627\u06CC\u062F ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0639\u0646\u0635\u0631\u0648\u0646\u0647\"} \u0648\u0644\u0631\u064A`;\n }\n return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue.origin ?? \"\u0627\u0631\u0632\u069A\u062A\"} \u0628\u0627\u06CC\u062F ${adj}${issue.maximum.toString()} \u0648\u064A`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue.origin} \u0628\u0627\u06CC\u062F ${adj}${issue.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`;\n }\n return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue.origin} \u0628\u0627\u06CC\u062F ${adj}${issue.minimum.toString()} \u0648\u064A`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F \"${_issue.prefix}\" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`;\n }\n if (_issue.format === \"ends_with\") {\n return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F \"${_issue.suffix}\" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`;\n }\n if (_issue.format === \"includes\") {\n return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \"${_issue.includes}\" \u0648\u0644\u0631\u064A`;\n }\n if (_issue.format === \"regex\") {\n return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`;\n }\n return `${FormatDictionary[_issue.format] ?? issue.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`;\n }\n case \"not_multiple_of\":\n return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;\n case \"unrecognized_keys\":\n return `\u0646\u0627\u0633\u0645 ${issue.keys.length > 1 ? \"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647\" : \"\u06A9\u0644\u06CC\u0689\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue.origin} \u06A9\u06D0`;\n case \"invalid_union\":\n return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`;\n case \"invalid_element\":\n return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue.origin} \u06A9\u06D0`;\n default:\n return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"znak\u00F3w\", verb: \"mie\u0107\" },\n file: { unit: \"bajt\u00F3w\", verb: \"mie\u0107\" },\n array: { unit: \"element\u00F3w\", verb: \"mie\u0107\" },\n set: { unit: \"element\u00F3w\", verb: \"mie\u0107\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"wyra\u017Cenie\",\n email: \"adres email\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"data i godzina w formacie ISO\",\n date: \"data w formacie ISO\",\n time: \"godzina w formacie ISO\",\n duration: \"czas trwania ISO\",\n ipv4: \"adres IPv4\",\n ipv6: \"adres IPv6\",\n cidrv4: \"zakres IPv4\",\n cidrv6: \"zakres IPv6\",\n base64: \"ci\u0105g znak\u00F3w zakodowany w formacie base64\",\n base64url: \"ci\u0105g znak\u00F3w zakodowany w formacie base64url\",\n json_string: \"ci\u0105g znak\u00F3w w formacie JSON\",\n e164: \"liczba E.164\",\n jwt: \"JWT\",\n template_literal: \"wej\u015Bcie\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"liczba\",\n array: \"tablica\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${issue.expected}, otrzymano ${received}`;\n }\n return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${expected}, otrzymano ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${util.stringifyPrimitive(issue.values[0])}`;\n return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue.origin ?? \"warto\u015B\u0107\"} b\u0119dzie mie\u0107 ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"element\u00F3w\"}`;\n }\n return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue.origin ?? \"warto\u015B\u0107\"} b\u0119dzie wynosi\u0107 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue.origin ?? \"warto\u015B\u0107\"} b\u0119dzie mie\u0107 ${adj}${issue.minimum.toString()} ${sizing.unit ?? \"element\u00F3w\"}`;\n }\n return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue.origin ?? \"warto\u015B\u0107\"} b\u0119dzie wynosi\u0107 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Nieprawid\u0142owy ci\u0105g znak\u00F3w: musi zaczyna\u0107 si\u0119 od \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Nieprawid\u0142owy ci\u0105g znak\u00F3w: musi ko\u0144czy\u0107 si\u0119 na \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Nieprawid\u0142owy ci\u0105g znak\u00F3w: musi zawiera\u0107 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Nieprawid\u0142owy ci\u0105g znak\u00F3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`;\n return `Nieprawid\u0142ow(y/a/e) ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Nierozpoznane klucze${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Nieprawid\u0142owy klucz w ${issue.origin}`;\n case \"invalid_union\":\n return \"Nieprawid\u0142owe dane wej\u015Bciowe\";\n case \"invalid_element\":\n return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue.origin}`;\n default:\n return `Nieprawid\u0142owe dane wej\u015Bciowe`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caracteres\", verb: \"ter\" },\n file: { unit: \"bytes\", verb: \"ter\" },\n array: { unit: \"itens\", verb: \"ter\" },\n set: { unit: \"itens\", verb: \"ter\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"padr\u00E3o\",\n email: \"endere\u00E7o de e-mail\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"data e hora ISO\",\n date: \"data ISO\",\n time: \"hora ISO\",\n duration: \"dura\u00E7\u00E3o ISO\",\n ipv4: \"endere\u00E7o IPv4\",\n ipv6: \"endere\u00E7o IPv6\",\n cidrv4: \"faixa de IPv4\",\n cidrv6: \"faixa de IPv6\",\n base64: \"texto codificado em base64\",\n base64url: \"URL codificada em base64\",\n json_string: \"texto JSON\",\n e164: \"n\u00FAmero E.164\",\n jwt: \"JWT\",\n template_literal: \"entrada\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"n\u00FAmero\",\n null: \"nulo\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Tipo inv\u00E1lido: esperado instanceof ${issue.expected}, recebido ${received}`;\n }\n return `Tipo inv\u00E1lido: esperado ${expected}, recebido ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entrada inv\u00E1lida: esperado ${util.stringifyPrimitive(issue.values[0])}`;\n return `Op\u00E7\u00E3o inv\u00E1lida: esperada uma das ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Muito grande: esperado que ${issue.origin ?? \"valor\"} tivesse ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementos\"}`;\n return `Muito grande: esperado que ${issue.origin ?? \"valor\"} fosse ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Muito pequeno: esperado que ${issue.origin} tivesse ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Muito pequeno: esperado que ${issue.origin} fosse ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Texto inv\u00E1lido: deve come\u00E7ar com \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Texto inv\u00E1lido: deve terminar com \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Texto inv\u00E1lido: deve incluir \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Texto inv\u00E1lido: deve corresponder ao padr\u00E3o ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} inv\u00E1lido`;\n }\n case \"not_multiple_of\":\n return `N\u00FAmero inv\u00E1lido: deve ser m\u00FAltiplo de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Chave${issue.keys.length > 1 ? \"s\" : \"\"} desconhecida${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Chave inv\u00E1lida em ${issue.origin}`;\n case \"invalid_union\":\n return \"Entrada inv\u00E1lida\";\n case \"invalid_element\":\n return `Valor inv\u00E1lido em ${issue.origin}`;\n default:\n return `Campo inv\u00E1lido`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nfunction getRussianPlural(count, one, few, many) {\n const absCount = Math.abs(count);\n const lastDigit = absCount % 10;\n const lastTwoDigits = absCount % 100;\n if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {\n return many;\n }\n if (lastDigit === 1) {\n return one;\n }\n if (lastDigit >= 2 && lastDigit <= 4) {\n return few;\n }\n return many;\n}\nconst error = () => {\n const Sizable = {\n string: {\n unit: {\n one: \"\u0441\u0438\u043C\u0432\u043E\u043B\",\n few: \"\u0441\u0438\u043C\u0432\u043E\u043B\u0430\",\n many: \"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432\",\n },\n verb: \"\u0438\u043C\u0435\u0442\u044C\",\n },\n file: {\n unit: {\n one: \"\u0431\u0430\u0439\u0442\",\n few: \"\u0431\u0430\u0439\u0442\u0430\",\n many: \"\u0431\u0430\u0439\u0442\",\n },\n verb: \"\u0438\u043C\u0435\u0442\u044C\",\n },\n array: {\n unit: {\n one: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\",\n few: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\",\n many: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432\",\n },\n verb: \"\u0438\u043C\u0435\u0442\u044C\",\n },\n set: {\n unit: {\n one: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\",\n few: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\",\n many: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432\",\n },\n verb: \"\u0438\u043C\u0435\u0442\u044C\",\n },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0432\u0432\u043E\u0434\",\n email: \"email \u0430\u0434\u0440\u0435\u0441\",\n url: \"URL\",\n emoji: \"\u044D\u043C\u043E\u0434\u0437\u0438\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F\",\n date: \"ISO \u0434\u0430\u0442\u0430\",\n time: \"ISO \u0432\u0440\u0435\u043C\u044F\",\n duration: \"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C\",\n ipv4: \"IPv4 \u0430\u0434\u0440\u0435\u0441\",\n ipv6: \"IPv6 \u0430\u0434\u0440\u0435\u0441\",\n cidrv4: \"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\",\n cidrv6: \"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\",\n base64: \"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64\",\n base64url: \"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url\",\n json_string: \"JSON \u0441\u0442\u0440\u043E\u043A\u0430\",\n e164: \"\u043D\u043E\u043C\u0435\u0440 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0432\u0432\u043E\u0434\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0447\u0438\u0441\u043B\u043E\",\n array: \"\u043C\u0430\u0441\u0441\u0438\u0432\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${issue.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`;\n }\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const maxValue = Number(issue.maximum);\n const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);\n return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435\"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue.maximum.toString()} ${unit}`;\n }\n return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435\"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const minValue = Number(issue.minimum);\n const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);\n return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue.minimum.toString()} ${unit}`;\n }\n return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue.keys.length > 1 ? \"\u044B\u0435\" : \"\u044B\u0439\"} \u043A\u043B\u044E\u0447${issue.keys.length > 1 ? \"\u0438\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\";\n case \"invalid_element\":\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue.origin}`;\n default:\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"znakov\", verb: \"imeti\" },\n file: { unit: \"bajtov\", verb: \"imeti\" },\n array: { unit: \"elementov\", verb: \"imeti\" },\n set: { unit: \"elementov\", verb: \"imeti\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"vnos\",\n email: \"e-po\u0161tni naslov\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datum in \u010Das\",\n date: \"ISO datum\",\n time: \"ISO \u010Das\",\n duration: \"ISO trajanje\",\n ipv4: \"IPv4 naslov\",\n ipv6: \"IPv6 naslov\",\n cidrv4: \"obseg IPv4\",\n cidrv6: \"obseg IPv6\",\n base64: \"base64 kodiran niz\",\n base64url: \"base64url kodiran niz\",\n json_string: \"JSON niz\",\n e164: \"E.164 \u0161tevilka\",\n jwt: \"JWT\",\n template_literal: \"vnos\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0161tevilo\",\n array: \"tabela\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Neveljaven vnos: pri\u010Dakovano instanceof ${issue.expected}, prejeto ${received}`;\n }\n return `Neveljaven vnos: pri\u010Dakovano ${expected}, prejeto ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Neveljaven vnos: pri\u010Dakovano ${util.stringifyPrimitive(issue.values[0])}`;\n return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Preveliko: pri\u010Dakovano, da bo ${issue.origin ?? \"vrednost\"} imelo ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementov\"}`;\n return `Preveliko: pri\u010Dakovano, da bo ${issue.origin ?? \"vrednost\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Premajhno: pri\u010Dakovano, da bo ${issue.origin} imelo ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Premajhno: pri\u010Dakovano, da bo ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Neveljaven niz: mora se za\u010Deti z \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Neveljaven niz: mora se kon\u010Dati z \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Neveljaven niz: mora vsebovati \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`;\n return `Neveljaven ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Neprepoznan${issue.keys.length > 1 ? \"i klju\u010Di\" : \" klju\u010D\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Neveljaven klju\u010D v ${issue.origin}`;\n case \"invalid_union\":\n return \"Neveljaven vnos\";\n case \"invalid_element\":\n return `Neveljavna vrednost v ${issue.origin}`;\n default:\n return \"Neveljaven vnos\";\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"tecken\", verb: \"att ha\" },\n file: { unit: \"bytes\", verb: \"att ha\" },\n array: { unit: \"objekt\", verb: \"att inneh\u00E5lla\" },\n set: { unit: \"objekt\", verb: \"att inneh\u00E5lla\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"regulj\u00E4rt uttryck\",\n email: \"e-postadress\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-datum och tid\",\n date: \"ISO-datum\",\n time: \"ISO-tid\",\n duration: \"ISO-varaktighet\",\n ipv4: \"IPv4-intervall\",\n ipv6: \"IPv6-intervall\",\n cidrv4: \"IPv4-spektrum\",\n cidrv6: \"IPv6-spektrum\",\n base64: \"base64-kodad str\u00E4ng\",\n base64url: \"base64url-kodad str\u00E4ng\",\n json_string: \"JSON-str\u00E4ng\",\n e164: \"E.164-nummer\",\n jwt: \"JWT\",\n template_literal: \"mall-literal\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"antal\",\n array: \"lista\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ogiltig inmatning: f\u00F6rv\u00E4ntat instanceof ${issue.expected}, fick ${received}`;\n }\n return `Ogiltig inmatning: f\u00F6rv\u00E4ntat ${expected}, fick ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ogiltig inmatning: f\u00F6rv\u00E4ntat ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ogiltigt val: f\u00F6rv\u00E4ntade en av ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `F\u00F6r stor(t): f\u00F6rv\u00E4ntade ${issue.origin ?? \"v\u00E4rdet\"} att ha ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"element\"}`;\n }\n return `F\u00F6r stor(t): f\u00F6rv\u00E4ntat ${issue.origin ?? \"v\u00E4rdet\"} att ha ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `F\u00F6r lite(t): f\u00F6rv\u00E4ntade ${issue.origin ?? \"v\u00E4rdet\"} att ha ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `F\u00F6r lite(t): f\u00F6rv\u00E4ntade ${issue.origin ?? \"v\u00E4rdet\"} att ha ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Ogiltig str\u00E4ng: m\u00E5ste b\u00F6rja med \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Ogiltig str\u00E4ng: m\u00E5ste sluta med \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Ogiltig str\u00E4ng: m\u00E5ste inneh\u00E5lla \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Ogiltig str\u00E4ng: m\u00E5ste matcha m\u00F6nstret \"${_issue.pattern}\"`;\n return `Ogiltig(t) ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ogiltigt tal: m\u00E5ste vara en multipel av ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Ok\u00E4nda nycklar\" : \"Ok\u00E4nd nyckel\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ogiltig nyckel i ${issue.origin ?? \"v\u00E4rdet\"}`;\n case \"invalid_union\":\n return \"Ogiltig input\";\n case \"invalid_element\":\n return `Ogiltigt v\u00E4rde i ${issue.origin ?? \"v\u00E4rdet\"}`;\n default:\n return `Ogiltig input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD\", verb: \"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD\" },\n file: { unit: \"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD\", verb: \"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD\" },\n array: { unit: \"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD\", verb: \"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD\" },\n set: { unit: \"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD\", verb: \"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1\",\n email: \"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD\",\n date: \"ISO \u0BA4\u0BC7\u0BA4\u0BBF\",\n time: \"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD\",\n duration: \"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1\",\n ipv4: \"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF\",\n ipv6: \"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF\",\n cidrv4: \"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1\",\n cidrv6: \"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1\",\n base64: \"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD\",\n base64url: \"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD\",\n json_string: \"JSON \u0B9A\u0BB0\u0BAE\u0BCD\",\n e164: \"E.164 \u0B8E\u0BA3\u0BCD\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0B8E\u0BA3\u0BCD\",\n array: \"\u0B85\u0BA3\u0BBF\",\n null: \"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${issue.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`;\n }\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${util.joinValues(issue.values, \"|\")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue.origin ?? \"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD\"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n }\n return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue.origin ?? \"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1\"} ${adj}${issue.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; //\n }\n return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue.origin} ${adj}${issue.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: \"${_issue.prefix}\" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n if (_issue.format === \"ends_with\")\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: \"${_issue.suffix}\" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n if (_issue.format === \"includes\")\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: \"${_issue.includes}\" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n if (_issue.format === \"regex\")\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n case \"unrecognized_keys\":\n return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue.keys.length > 1 ? \"\u0B95\u0BB3\u0BCD\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;\n case \"invalid_union\":\n return \"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1\";\n case \"invalid_element\":\n return `${issue.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;\n default:\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\", verb: \"\u0E04\u0E27\u0E23\u0E21\u0E35\" },\n file: { unit: \"\u0E44\u0E1A\u0E15\u0E4C\", verb: \"\u0E04\u0E27\u0E23\u0E21\u0E35\" },\n array: { unit: \"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\", verb: \"\u0E04\u0E27\u0E23\u0E21\u0E35\" },\n set: { unit: \"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\", verb: \"\u0E04\u0E27\u0E23\u0E21\u0E35\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19\",\n email: \"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25\",\n url: \"URL\",\n emoji: \"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO\",\n date: \"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO\",\n time: \"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO\",\n duration: \"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO\",\n ipv4: \"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4\",\n ipv6: \"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6\",\n cidrv4: \"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4\",\n cidrv6: \"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6\",\n base64: \"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64\",\n base64url: \"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL\",\n json_string: \"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON\",\n e164: \"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)\",\n jwt: \"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT\",\n template_literal: \"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\",\n array: \"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)\",\n null: \"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;\n }\n return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19\" : \"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue.origin ?? \"\u0E04\u0E48\u0E32\"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\"}`;\n return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue.origin ?? \"\u0E04\u0E48\u0E32\"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22\" : \"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 \"${_issue.includes}\" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`;\n if (_issue.format === \"regex\")\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`;\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;\n case \"unrecognized_keys\":\n return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49\";\n case \"invalid_element\":\n return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue.origin}`;\n default:\n return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"karakter\", verb: \"olmal\u0131\" },\n file: { unit: \"bayt\", verb: \"olmal\u0131\" },\n array: { unit: \"\u00F6\u011Fe\", verb: \"olmal\u0131\" },\n set: { unit: \"\u00F6\u011Fe\", verb: \"olmal\u0131\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"girdi\",\n email: \"e-posta adresi\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO tarih ve saat\",\n date: \"ISO tarih\",\n time: \"ISO saat\",\n duration: \"ISO s\u00FCre\",\n ipv4: \"IPv4 adresi\",\n ipv6: \"IPv6 adresi\",\n cidrv4: \"IPv4 aral\u0131\u011F\u0131\",\n cidrv6: \"IPv6 aral\u0131\u011F\u0131\",\n base64: \"base64 ile \u015Fifrelenmi\u015F metin\",\n base64url: \"base64url ile \u015Fifrelenmi\u015F metin\",\n json_string: \"JSON dizesi\",\n e164: \"E.164 say\u0131s\u0131\",\n jwt: \"JWT\",\n template_literal: \"\u015Eablon dizesi\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ge\u00E7ersiz de\u011Fer: beklenen instanceof ${issue.expected}, al\u0131nan ${received}`;\n }\n return `Ge\u00E7ersiz de\u011Fer: beklenen ${expected}, al\u0131nan ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ge\u00E7ersiz de\u011Fer: beklenen ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ge\u00E7ersiz se\u00E7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u00C7ok b\u00FCy\u00FCk: beklenen ${issue.origin ?? \"de\u011Fer\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u00F6\u011Fe\"}`;\n return `\u00C7ok b\u00FCy\u00FCk: beklenen ${issue.origin ?? \"de\u011Fer\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u00C7ok k\u00FC\u00E7\u00FCk: beklenen ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n return `\u00C7ok k\u00FC\u00E7\u00FCk: beklenen ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Ge\u00E7ersiz metin: \"${_issue.prefix}\" ile ba\u015Flamal\u0131`;\n if (_issue.format === \"ends_with\")\n return `Ge\u00E7ersiz metin: \"${_issue.suffix}\" ile bitmeli`;\n if (_issue.format === \"includes\")\n return `Ge\u00E7ersiz metin: \"${_issue.includes}\" i\u00E7ermeli`;\n if (_issue.format === \"regex\")\n return `Ge\u00E7ersiz metin: ${_issue.pattern} desenine uymal\u0131`;\n return `Ge\u00E7ersiz ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ge\u00E7ersiz say\u0131: ${issue.divisor} ile tam b\u00F6l\u00FCnebilmeli`;\n case \"unrecognized_keys\":\n return `Tan\u0131nmayan anahtar${issue.keys.length > 1 ? \"lar\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} i\u00E7inde ge\u00E7ersiz anahtar`;\n case \"invalid_union\":\n return \"Ge\u00E7ersiz de\u011Fer\";\n case \"invalid_element\":\n return `${issue.origin} i\u00E7inde ge\u00E7ersiz de\u011Fer`;\n default:\n return `Ge\u00E7ersiz de\u011Fer`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import uk from \"./uk.js\";\n/** @deprecated Use `uk` instead. */\nexport default function () {\n return uk();\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432\", verb: \"\u043C\u0430\u0442\u0438\u043C\u0435\" },\n file: { unit: \"\u0431\u0430\u0439\u0442\u0456\u0432\", verb: \"\u043C\u0430\u0442\u0438\u043C\u0435\" },\n array: { unit: \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432\", verb: \"\u043C\u0430\u0442\u0438\u043C\u0435\" },\n set: { unit: \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432\", verb: \"\u043C\u0430\u0442\u0438\u043C\u0435\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456\",\n email: \"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438\",\n url: \"URL\",\n emoji: \"\u0435\u043C\u043E\u0434\u0437\u0456\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO\",\n date: \"\u0434\u0430\u0442\u0430 ISO\",\n time: \"\u0447\u0430\u0441 ISO\",\n duration: \"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO\",\n ipv4: \"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4\",\n ipv6: \"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6\",\n cidrv4: \"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4\",\n cidrv6: \"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6\",\n base64: \"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64\",\n base64url: \"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url\",\n json_string: \"\u0440\u044F\u0434\u043E\u043A JSON\",\n e164: \"\u043D\u043E\u043C\u0435\u0440 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0447\u0438\u0441\u043B\u043E\",\n array: \"\u043C\u0430\u0441\u0438\u0432\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${issue.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`;\n }\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F\"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432\"}`;\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F\"} \u0431\u0443\u0434\u0435 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue.origin} \u0431\u0443\u0434\u0435 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue.keys.length > 1 ? \"\u0456\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456\";\n case \"invalid_element\":\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue.origin}`;\n default:\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u062D\u0631\u0648\u0641\", verb: \"\u06C1\u0648\u0646\u0627\" },\n file: { unit: \"\u0628\u0627\u0626\u0679\u0633\", verb: \"\u06C1\u0648\u0646\u0627\" },\n array: { unit: \"\u0622\u0626\u0679\u0645\u0632\", verb: \"\u06C1\u0648\u0646\u0627\" },\n set: { unit: \"\u0622\u0626\u0679\u0645\u0632\", verb: \"\u06C1\u0648\u0646\u0627\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0627\u0646 \u067E\u0679\",\n email: \"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633\",\n url: \"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644\",\n emoji: \"\u0627\u06CC\u0645\u0648\u062C\u06CC\",\n uuid: \"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n uuidv4: \"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4\",\n uuidv6: \"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6\",\n nanoid: \"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n guid: \"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n cuid: \"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n cuid2: \"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2\",\n ulid: \"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC\",\n xid: \"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC\",\n ksuid: \"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n datetime: \"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645\",\n date: \"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E\",\n time: \"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A\",\n duration: \"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A\",\n ipv4: \"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633\",\n ipv6: \"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633\",\n cidrv4: \"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C\",\n cidrv6: \"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C\",\n base64: \"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF\",\n base64url: \"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF\",\n json_string: \"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF\",\n e164: \"\u0627\u06CC 164 \u0646\u0645\u0628\u0631\",\n jwt: \"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC\",\n template_literal: \"\u0627\u0646 \u067E\u0679\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0646\u0645\u0628\u0631\",\n array: \"\u0622\u0631\u06D2\",\n null: \"\u0646\u0644\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${issue.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;\n }\n return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${util.stringifyPrimitive(issue.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;\n return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${util.joinValues(issue.values, \"|\")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue.origin ?? \"\u0648\u06CC\u0644\u06CC\u0648\"} \u06A9\u06D2 ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0639\u0646\u0627\u0635\u0631\"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;\n return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue.origin ?? \"\u0648\u06CC\u0644\u06CC\u0648\"} \u06A9\u0627 ${adj}${issue.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue.origin} \u06A9\u06D2 ${adj}${issue.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;\n }\n return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue.origin} \u06A9\u0627 ${adj}${issue.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \"${_issue.prefix}\" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n }\n if (_issue.format === \"ends_with\")\n return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \"${_issue.suffix}\" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n if (_issue.format === \"includes\")\n return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \"${_issue.includes}\" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n if (_issue.format === \"regex\")\n return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n return `\u063A\u0644\u0637 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n case \"unrecognized_keys\":\n return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue.keys.length > 1 ? \"\u0632\" : \"\"}: ${util.joinValues(issue.keys, \"\u060C \")}`;\n case \"invalid_key\":\n return `${issue.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;\n case \"invalid_union\":\n return \"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679\";\n case \"invalid_element\":\n return `${issue.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;\n default:\n return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"belgi\", verb: \"bo\u2018lishi kerak\" },\n file: { unit: \"bayt\", verb: \"bo\u2018lishi kerak\" },\n array: { unit: \"element\", verb: \"bo\u2018lishi kerak\" },\n set: { unit: \"element\", verb: \"bo\u2018lishi kerak\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"kirish\",\n email: \"elektron pochta manzili\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO sana va vaqti\",\n date: \"ISO sana\",\n time: \"ISO vaqt\",\n duration: \"ISO davomiylik\",\n ipv4: \"IPv4 manzil\",\n ipv6: \"IPv6 manzil\",\n mac: \"MAC manzil\",\n cidrv4: \"IPv4 diapazon\",\n cidrv6: \"IPv6 diapazon\",\n base64: \"base64 kodlangan satr\",\n base64url: \"base64url kodlangan satr\",\n json_string: \"JSON satr\",\n e164: \"E.164 raqam\",\n jwt: \"JWT\",\n template_literal: \"kirish\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"raqam\",\n array: \"massiv\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Noto\u2018g\u2018ri kirish: kutilgan instanceof ${issue.expected}, qabul qilingan ${received}`;\n }\n return `Noto\u2018g\u2018ri kirish: kutilgan ${expected}, qabul qilingan ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Noto\u2018g\u2018ri kirish: kutilgan ${util.stringifyPrimitive(issue.values[0])}`;\n return `Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Juda katta: kutilgan ${issue.origin ?? \"qiymat\"} ${adj}${issue.maximum.toString()} ${sizing.unit} ${sizing.verb}`;\n return `Juda katta: kutilgan ${issue.origin ?? \"qiymat\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Juda kichik: kutilgan ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} ${sizing.verb}`;\n }\n return `Juda kichik: kutilgan ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Noto\u2018g\u2018ri satr: \"${_issue.prefix}\" bilan boshlanishi kerak`;\n if (_issue.format === \"ends_with\")\n return `Noto\u2018g\u2018ri satr: \"${_issue.suffix}\" bilan tugashi kerak`;\n if (_issue.format === \"includes\")\n return `Noto\u2018g\u2018ri satr: \"${_issue.includes}\" ni o\u2018z ichiga olishi kerak`;\n if (_issue.format === \"regex\")\n return `Noto\u2018g\u2018ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`;\n return `Noto\u2018g\u2018ri ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Noto\u2018g\u2018ri raqam: ${issue.divisor} ning karralisi bo\u2018lishi kerak`;\n case \"unrecognized_keys\":\n return `Noma\u2019lum kalit${issue.keys.length > 1 ? \"lar\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} dagi kalit noto\u2018g\u2018ri`;\n case \"invalid_union\":\n return \"Noto\u2018g\u2018ri kirish\";\n case \"invalid_element\":\n return `${issue.origin} da noto\u2018g\u2018ri qiymat`;\n default:\n return `Noto\u2018g\u2018ri kirish`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"k\u00FD t\u1EF1\", verb: \"c\u00F3\" },\n file: { unit: \"byte\", verb: \"c\u00F3\" },\n array: { unit: \"ph\u1EA7n t\u1EED\", verb: \"c\u00F3\" },\n set: { unit: \"ph\u1EA7n t\u1EED\", verb: \"c\u00F3\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0111\u1EA7u v\u00E0o\",\n email: \"\u0111\u1ECBa ch\u1EC9 email\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ng\u00E0y gi\u1EDD ISO\",\n date: \"ng\u00E0y ISO\",\n time: \"gi\u1EDD ISO\",\n duration: \"kho\u1EA3ng th\u1EDDi gian ISO\",\n ipv4: \"\u0111\u1ECBa ch\u1EC9 IPv4\",\n ipv6: \"\u0111\u1ECBa ch\u1EC9 IPv6\",\n cidrv4: \"d\u1EA3i IPv4\",\n cidrv6: \"d\u1EA3i IPv6\",\n base64: \"chu\u1ED7i m\u00E3 h\u00F3a base64\",\n base64url: \"chu\u1ED7i m\u00E3 h\u00F3a base64url\",\n json_string: \"chu\u1ED7i JSON\",\n e164: \"s\u1ED1 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0111\u1EA7u v\u00E0o\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"s\u1ED1\",\n array: \"m\u1EA3ng\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${issue.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`;\n }\n return `\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${util.stringifyPrimitive(issue.values[0])}`;\n return `T\u00F9y ch\u1ECDn kh\u00F4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\u00E1c gi\u00E1 tr\u1ECB ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Qu\u00E1 l\u1EDBn: mong \u0111\u1EE3i ${issue.origin ?? \"gi\u00E1 tr\u1ECB\"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"ph\u1EA7n t\u1EED\"}`;\n return `Qu\u00E1 l\u1EDBn: mong \u0111\u1EE3i ${issue.origin ?? \"gi\u00E1 tr\u1ECB\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Qu\u00E1 nh\u1ECF: mong \u0111\u1EE3i ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Qu\u00E1 nh\u1ECF: mong \u0111\u1EE3i ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Chu\u1ED7i kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Chu\u1ED7i kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\u00FAc b\u1EB1ng \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Chu\u1ED7i kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Chu\u1ED7i kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} kh\u00F4ng h\u1EE3p l\u1EC7`;\n }\n case \"not_multiple_of\":\n return `S\u1ED1 kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\u00E0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Kh\u00F3a kh\u00F4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Kh\u00F3a kh\u00F4ng h\u1EE3p l\u1EC7 trong ${issue.origin}`;\n case \"invalid_union\":\n return \"\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7\";\n case \"invalid_element\":\n return `Gi\u00E1 tr\u1ECB kh\u00F4ng h\u1EE3p l\u1EC7 trong ${issue.origin}`;\n default:\n return `\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u5B57\u7B26\", verb: \"\u5305\u542B\" },\n file: { unit: \"\u5B57\u8282\", verb: \"\u5305\u542B\" },\n array: { unit: \"\u9879\", verb: \"\u5305\u542B\" },\n set: { unit: \"\u9879\", verb: \"\u5305\u542B\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u8F93\u5165\",\n email: \"\u7535\u5B50\u90AE\u4EF6\",\n url: \"URL\",\n emoji: \"\u8868\u60C5\u7B26\u53F7\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO\u65E5\u671F\u65F6\u95F4\",\n date: \"ISO\u65E5\u671F\",\n time: \"ISO\u65F6\u95F4\",\n duration: \"ISO\u65F6\u957F\",\n ipv4: \"IPv4\u5730\u5740\",\n ipv6: \"IPv6\u5730\u5740\",\n cidrv4: \"IPv4\u7F51\u6BB5\",\n cidrv6: \"IPv6\u7F51\u6BB5\",\n base64: \"base64\u7F16\u7801\u5B57\u7B26\u4E32\",\n base64url: \"base64url\u7F16\u7801\u5B57\u7B26\u4E32\",\n json_string: \"JSON\u5B57\u7B26\u4E32\",\n e164: \"E.164\u53F7\u7801\",\n jwt: \"JWT\",\n template_literal: \"\u8F93\u5165\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u6570\u5B57\",\n array: \"\u6570\u7EC4\",\n null: \"\u7A7A\u503C(null)\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${issue.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`;\n }\n return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue.origin ?? \"\u503C\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u4E2A\u5143\u7D20\"}`;\n return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue.origin ?? \"\u503C\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 \"${_issue.prefix}\" \u5F00\u5934`;\n if (_issue.format === \"ends_with\")\n return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 \"${_issue.suffix}\" \u7ED3\u5C3E`;\n if (_issue.format === \"includes\")\n return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`;\n return `\u65E0\u6548${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue.divisor} \u7684\u500D\u6570`;\n case \"unrecognized_keys\":\n return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;\n case \"invalid_union\":\n return \"\u65E0\u6548\u8F93\u5165\";\n case \"invalid_element\":\n return `${issue.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;\n default:\n return `\u65E0\u6548\u8F93\u5165`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u5B57\u5143\", verb: \"\u64C1\u6709\" },\n file: { unit: \"\u4F4D\u5143\u7D44\", verb: \"\u64C1\u6709\" },\n array: { unit: \"\u9805\u76EE\", verb: \"\u64C1\u6709\" },\n set: { unit: \"\u9805\u76EE\", verb: \"\u64C1\u6709\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u8F38\u5165\",\n email: \"\u90F5\u4EF6\u5730\u5740\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u65E5\u671F\u6642\u9593\",\n date: \"ISO \u65E5\u671F\",\n time: \"ISO \u6642\u9593\",\n duration: \"ISO \u671F\u9593\",\n ipv4: \"IPv4 \u4F4D\u5740\",\n ipv6: \"IPv6 \u4F4D\u5740\",\n cidrv4: \"IPv4 \u7BC4\u570D\",\n cidrv6: \"IPv6 \u7BC4\u570D\",\n base64: \"base64 \u7DE8\u78BC\u5B57\u4E32\",\n base64url: \"base64url \u7DE8\u78BC\u5B57\u4E32\",\n json_string: \"JSON \u5B57\u4E32\",\n e164: \"E.164 \u6578\u503C\",\n jwt: \"JWT\",\n template_literal: \"\u8F38\u5165\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${issue.expected}\uFF0C\u4F46\u6536\u5230 ${received}`;\n }\n return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${expected}\uFF0C\u4F46\u6536\u5230 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue.origin ?? \"\u503C\"} \u61C9\u70BA ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u500B\u5143\u7D20\"}`;\n return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue.origin ?? \"\u503C\"} \u61C9\u70BA ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue.origin} \u61C9\u70BA ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue.origin} \u61C9\u70BA ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 \"${_issue.prefix}\" \u958B\u982D`;\n }\n if (_issue.format === \"ends_with\")\n return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 \"${_issue.suffix}\" \u7D50\u5C3E`;\n if (_issue.format === \"includes\")\n return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`;\n return `\u7121\u6548\u7684 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue.divisor} \u7684\u500D\u6578`;\n case \"unrecognized_keys\":\n return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue.keys.length > 1 ? \"\u5011\" : \"\"}\uFF1A${util.joinValues(issue.keys, \"\u3001\")}`;\n case \"invalid_key\":\n return `${issue.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;\n case \"invalid_union\":\n return \"\u7121\u6548\u7684\u8F38\u5165\u503C\";\n case \"invalid_element\":\n return `${issue.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;\n default:\n return `\u7121\u6548\u7684\u8F38\u5165\u503C`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u00E0mi\", verb: \"n\u00ED\" },\n file: { unit: \"bytes\", verb: \"n\u00ED\" },\n array: { unit: \"nkan\", verb: \"n\u00ED\" },\n set: { unit: \"nkan\", verb: \"n\u00ED\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u1EB9\u0300r\u1ECD \u00ECb\u00E1w\u1ECDl\u00E9\",\n email: \"\u00E0d\u00EDr\u1EB9\u0301s\u00EC \u00ECm\u1EB9\u0301l\u00EC\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u00E0k\u00F3k\u00F2 ISO\",\n date: \"\u1ECDj\u1ECD\u0301 ISO\",\n time: \"\u00E0k\u00F3k\u00F2 ISO\",\n duration: \"\u00E0k\u00F3k\u00F2 t\u00F3 p\u00E9 ISO\",\n ipv4: \"\u00E0d\u00EDr\u1EB9\u0301s\u00EC IPv4\",\n ipv6: \"\u00E0d\u00EDr\u1EB9\u0301s\u00EC IPv6\",\n cidrv4: \"\u00E0gb\u00E8gb\u00E8 IPv4\",\n cidrv6: \"\u00E0gb\u00E8gb\u00E8 IPv6\",\n base64: \"\u1ECD\u0300r\u1ECD\u0300 t\u00ED a k\u1ECD\u0301 n\u00ED base64\",\n base64url: \"\u1ECD\u0300r\u1ECD\u0300 base64url\",\n json_string: \"\u1ECD\u0300r\u1ECD\u0300 JSON\",\n e164: \"n\u1ECD\u0301mb\u00E0 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u1EB9\u0300r\u1ECD \u00ECb\u00E1w\u1ECDl\u00E9\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"n\u1ECD\u0301mb\u00E0\",\n array: \"akop\u1ECD\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e: a n\u00ED l\u00E1ti fi instanceof ${issue.expected}, \u00E0m\u1ECD\u0300 a r\u00ED ${received}`;\n }\n return `\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e: a n\u00ED l\u00E1ti fi ${expected}, \u00E0m\u1ECD\u0300 a r\u00ED ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e: a n\u00ED l\u00E1ti fi ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u00C0\u1E63\u00E0y\u00E0n a\u1E63\u00EC\u1E63e: yan \u1ECD\u0300kan l\u00E1ra ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `T\u00F3 p\u1ECD\u0300 j\u00F9: a n\u00ED l\u00E1ti j\u1EB9\u0301 p\u00E9 ${issue.origin ?? \"iye\"} ${sizing.verb} ${adj}${issue.maximum} ${sizing.unit}`;\n return `T\u00F3 p\u1ECD\u0300 j\u00F9: a n\u00ED l\u00E1ti j\u1EB9\u0301 ${adj}${issue.maximum}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `K\u00E9r\u00E9 ju: a n\u00ED l\u00E1ti j\u1EB9\u0301 p\u00E9 ${issue.origin} ${sizing.verb} ${adj}${issue.minimum} ${sizing.unit}`;\n return `K\u00E9r\u00E9 ju: a n\u00ED l\u00E1ti j\u1EB9\u0301 ${adj}${issue.minimum}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\u00FA \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\u00ED p\u1EB9\u0300l\u00FA \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\u00ED \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u00E1 \u00E0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`;\n return `A\u1E63\u00EC\u1E63e: ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `N\u1ECD\u0301mb\u00E0 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \u00E8y\u00E0 p\u00EDp\u00EDn ti ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `B\u1ECDt\u00ECn\u00EC \u00E0\u00ECm\u1ECD\u0300: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `B\u1ECDt\u00ECn\u00EC a\u1E63\u00EC\u1E63e n\u00EDn\u00FA ${issue.origin}`;\n case \"invalid_union\":\n return \"\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e\";\n case \"invalid_element\":\n return `Iye a\u1E63\u00EC\u1E63e n\u00EDn\u00FA ${issue.origin}`;\n default:\n return \"\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e\";\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "var _a;\nexport const $output = Symbol(\"ZodOutput\");\nexport const $input = Symbol(\"ZodInput\");\nexport class $ZodRegistry {\n constructor() {\n this._map = new WeakMap();\n this._idmap = new Map();\n }\n add(schema, ..._meta) {\n const meta = _meta[0];\n this._map.set(schema, meta);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.set(meta.id, schema);\n }\n return this;\n }\n clear() {\n this._map = new WeakMap();\n this._idmap = new Map();\n return this;\n }\n remove(schema) {\n const meta = this._map.get(schema);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.delete(meta.id);\n }\n this._map.delete(schema);\n return this;\n }\n get(schema) {\n // return this._map.get(schema) as any;\n // inherit metadata\n const p = schema._zod.parent;\n if (p) {\n const pm = { ...(this.get(p) ?? {}) };\n delete pm.id; // do not inherit id\n const f = { ...pm, ...this._map.get(schema) };\n return Object.keys(f).length ? f : undefined;\n }\n return this._map.get(schema);\n }\n has(schema) {\n return this._map.has(schema);\n }\n}\n// registries\nexport function registry() {\n return new $ZodRegistry();\n}\n(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());\nexport const globalRegistry = globalThis.__zod_globalRegistry;\n", "import * as checks from \"./checks.js\";\nimport * as registries from \"./registries.js\";\nimport * as schemas from \"./schemas.js\";\nimport * as util from \"./util.js\";\n// @__NO_SIDE_EFFECTS__\nexport function _string(Class, params) {\n return new Class({\n type: \"string\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedString(Class, params) {\n return new Class({\n type: \"string\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _email(Class, params) {\n return new Class({\n type: \"string\",\n format: \"email\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _guid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"guid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v4\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v6\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv7(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v7\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _emoji(Class, params) {\n return new Class({\n type: \"string\",\n format: \"emoji\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nanoid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"nanoid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid2(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid2\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ulid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ulid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _xid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"xid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ksuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ksuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mac(Class, params) {\n return new Class({\n type: \"string\",\n format: \"mac\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _e164(Class, params) {\n return new Class({\n type: \"string\",\n format: \"e164\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _jwt(Class, params) {\n return new Class({\n type: \"string\",\n format: \"jwt\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport const TimePrecision = {\n Any: null,\n Minute: -1,\n Second: 0,\n Millisecond: 3,\n Microsecond: 6,\n};\n// @__NO_SIDE_EFFECTS__\nexport function _isoDateTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"datetime\",\n check: \"string_format\",\n offset: false,\n local: false,\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDate(Class, params) {\n return new Class({\n type: \"string\",\n format: \"date\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"time\",\n check: \"string_format\",\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDuration(Class, params) {\n return new Class({\n type: \"string\",\n format: \"duration\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _number(Class, params) {\n return new Class({\n type: \"number\",\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedNumber(Class, params) {\n return new Class({\n type: \"number\",\n coerce: true,\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"safeint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float64(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"int32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"uint32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _boolean(Class, params) {\n return new Class({\n type: \"boolean\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBoolean(Class, params) {\n return new Class({\n type: \"boolean\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _bigint(Class, params) {\n return new Class({\n type: \"bigint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBigint(Class, params) {\n return new Class({\n type: \"bigint\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"int64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"uint64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _symbol(Class, params) {\n return new Class({\n type: \"symbol\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _undefined(Class, params) {\n return new Class({\n type: \"undefined\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _null(Class, params) {\n return new Class({\n type: \"null\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _any(Class) {\n return new Class({\n type: \"any\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _unknown(Class) {\n return new Class({\n type: \"unknown\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _never(Class, params) {\n return new Class({\n type: \"never\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _void(Class, params) {\n return new Class({\n type: \"void\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _date(Class, params) {\n return new Class({\n type: \"date\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedDate(Class, params) {\n return new Class({\n type: \"date\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nan(Class, params) {\n return new Class({\n type: \"nan\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lt(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lte(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.lte()` instead. */\n_lte as _max, };\n// @__NO_SIDE_EFFECTS__\nexport function _gt(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _gte(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.gte()` instead. */\n_gte as _min, };\n// @__NO_SIDE_EFFECTS__\nexport function _positive(params) {\n return _gt(0, params);\n}\n// negative\n// @__NO_SIDE_EFFECTS__\nexport function _negative(params) {\n return _lt(0, params);\n}\n// nonpositive\n// @__NO_SIDE_EFFECTS__\nexport function _nonpositive(params) {\n return _lte(0, params);\n}\n// nonnegative\n// @__NO_SIDE_EFFECTS__\nexport function _nonnegative(params) {\n return _gte(0, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function _multipleOf(value, params) {\n return new checks.$ZodCheckMultipleOf({\n check: \"multiple_of\",\n ...util.normalizeParams(params),\n value,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxSize(maximum, params) {\n return new checks.$ZodCheckMaxSize({\n check: \"max_size\",\n ...util.normalizeParams(params),\n maximum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minSize(minimum, params) {\n return new checks.$ZodCheckMinSize({\n check: \"min_size\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _size(size, params) {\n return new checks.$ZodCheckSizeEquals({\n check: \"size_equals\",\n ...util.normalizeParams(params),\n size,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxLength(maximum, params) {\n const ch = new checks.$ZodCheckMaxLength({\n check: \"max_length\",\n ...util.normalizeParams(params),\n maximum,\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minLength(minimum, params) {\n return new checks.$ZodCheckMinLength({\n check: \"min_length\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _length(length, params) {\n return new checks.$ZodCheckLengthEquals({\n check: \"length_equals\",\n ...util.normalizeParams(params),\n length,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _regex(pattern, params) {\n return new checks.$ZodCheckRegex({\n check: \"string_format\",\n format: \"regex\",\n ...util.normalizeParams(params),\n pattern,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lowercase(params) {\n return new checks.$ZodCheckLowerCase({\n check: \"string_format\",\n format: \"lowercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uppercase(params) {\n return new checks.$ZodCheckUpperCase({\n check: \"string_format\",\n format: \"uppercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _includes(includes, params) {\n return new checks.$ZodCheckIncludes({\n check: \"string_format\",\n format: \"includes\",\n ...util.normalizeParams(params),\n includes,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _startsWith(prefix, params) {\n return new checks.$ZodCheckStartsWith({\n check: \"string_format\",\n format: \"starts_with\",\n ...util.normalizeParams(params),\n prefix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _endsWith(suffix, params) {\n return new checks.$ZodCheckEndsWith({\n check: \"string_format\",\n format: \"ends_with\",\n ...util.normalizeParams(params),\n suffix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _property(property, schema, params) {\n return new checks.$ZodCheckProperty({\n check: \"property\",\n property,\n schema,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mime(types, params) {\n return new checks.$ZodCheckMimeType({\n check: \"mime_type\",\n mime: types,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _overwrite(tx) {\n return new checks.$ZodCheckOverwrite({\n check: \"overwrite\",\n tx,\n });\n}\n// normalize\n// @__NO_SIDE_EFFECTS__\nexport function _normalize(form) {\n return _overwrite((input) => input.normalize(form));\n}\n// trim\n// @__NO_SIDE_EFFECTS__\nexport function _trim() {\n return _overwrite((input) => input.trim());\n}\n// toLowerCase\n// @__NO_SIDE_EFFECTS__\nexport function _toLowerCase() {\n return _overwrite((input) => input.toLowerCase());\n}\n// toUpperCase\n// @__NO_SIDE_EFFECTS__\nexport function _toUpperCase() {\n return _overwrite((input) => input.toUpperCase());\n}\n// slugify\n// @__NO_SIDE_EFFECTS__\nexport function _slugify() {\n return _overwrite((input) => util.slugify(input));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _array(Class, element, params) {\n return new Class({\n type: \"array\",\n element,\n // get element() {\n // return element;\n // },\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _union(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n ...util.normalizeParams(params),\n });\n}\nexport function _xor(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _discriminatedUnion(Class, discriminator, options, params) {\n return new Class({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _intersection(Class, left, right) {\n return new Class({\n type: \"intersection\",\n left,\n right,\n });\n}\n// export function _tuple(\n// Class: util.SchemaClass,\n// items: [],\n// params?: string | $ZodTupleParams\n// ): schemas.$ZodTuple<[], null>;\n// @__NO_SIDE_EFFECTS__\nexport function _tuple(Class, items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof schemas.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new Class({\n type: \"tuple\",\n items,\n rest,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _record(Class, keyType, valueType, params) {\n return new Class({\n type: \"record\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _map(Class, keyType, valueType, params) {\n return new Class({\n type: \"map\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _set(Class, valueType, params) {\n return new Class({\n type: \"set\",\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _enum(Class, values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n // if (Array.isArray(values)) {\n // for (const value of values) {\n // entries[value] = value;\n // }\n // } else {\n // Object.assign(entries, values);\n // }\n // const entries: util.EnumLike = {};\n // for (const val of values) {\n // entries[val] = val;\n // }\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function _nativeEnum(Class, entries, params) {\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _literal(Class, value, params) {\n return new Class({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _file(Class, params) {\n return new Class({\n type: \"file\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _transform(Class, fn) {\n return new Class({\n type: \"transform\",\n transform: fn,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _optional(Class, innerType) {\n return new Class({\n type: \"optional\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nullable(Class, innerType) {\n return new Class({\n type: \"nullable\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _default(Class, innerType, defaultValue) {\n return new Class({\n type: \"default\",\n innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nonoptional(Class, innerType, params) {\n return new Class({\n type: \"nonoptional\",\n innerType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _success(Class, innerType) {\n return new Class({\n type: \"success\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _catch(Class, innerType, catchValue) {\n return new Class({\n type: \"catch\",\n innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _pipe(Class, in_, out) {\n return new Class({\n type: \"pipe\",\n in: in_,\n out,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _readonly(Class, innerType) {\n return new Class({\n type: \"readonly\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _templateLiteral(Class, parts, params) {\n return new Class({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lazy(Class, getter) {\n return new Class({\n type: \"lazy\",\n getter,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _promise(Class, innerType) {\n return new Class({\n type: \"promise\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _custom(Class, fn, _params) {\n const norm = util.normalizeParams(_params);\n norm.abort ?? (norm.abort = true); // default to abort:false\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...norm,\n });\n return schema;\n}\n// same as _custom but defaults to abort:false\n// @__NO_SIDE_EFFECTS__\nexport function _refine(Class, fn, _params) {\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...util.normalizeParams(_params),\n });\n return schema;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _superRefine(fn) {\n const ch = _check((payload) => {\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, ch._zod.def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n _issue.input ?? (_issue.input = payload.value);\n _issue.inst ?? (_issue.inst = ch);\n _issue.continue ?? (_issue.continue = !ch._zod.def.abort); // abort is always undefined, so this is always true...\n payload.issues.push(util.issue(_issue));\n }\n };\n return fn(payload.value, payload);\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _check(fn, params) {\n const ch = new checks.$ZodCheck({\n check: \"custom\",\n ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function describe(description) {\n const ch = new checks.$ZodCheck({ check: \"describe\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, description });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function meta(metadata) {\n const ch = new checks.$ZodCheck({ check: \"meta\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, ...metadata });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringbool(Classes, _params) {\n const params = util.normalizeParams(_params);\n let truthyArray = params.truthy ?? [\"true\", \"1\", \"yes\", \"on\", \"y\", \"enabled\"];\n let falsyArray = params.falsy ?? [\"false\", \"0\", \"no\", \"off\", \"n\", \"disabled\"];\n if (params.case !== \"sensitive\") {\n truthyArray = truthyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n falsyArray = falsyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n }\n const truthySet = new Set(truthyArray);\n const falsySet = new Set(falsyArray);\n const _Codec = Classes.Codec ?? schemas.$ZodCodec;\n const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;\n const _String = Classes.String ?? schemas.$ZodString;\n const stringSchema = new _String({ type: \"string\", error: params.error });\n const booleanSchema = new _Boolean({ type: \"boolean\", error: params.error });\n const codec = new _Codec({\n type: \"pipe\",\n in: stringSchema,\n out: booleanSchema,\n transform: ((input, payload) => {\n let data = input;\n if (params.case !== \"sensitive\")\n data = data.toLowerCase();\n if (truthySet.has(data)) {\n return true;\n }\n else if (falsySet.has(data)) {\n return false;\n }\n else {\n payload.issues.push({\n code: \"invalid_value\",\n expected: \"stringbool\",\n values: [...truthySet, ...falsySet],\n input: payload.value,\n inst: codec,\n continue: false,\n });\n return {};\n }\n }),\n reverseTransform: ((input, _payload) => {\n if (input === true) {\n return truthyArray[0] || \"true\";\n }\n else {\n return falsyArray[0] || \"false\";\n }\n }),\n error: params.error,\n });\n return codec;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringFormat(Class, format, fnOrRegex, _params = {}) {\n const params = util.normalizeParams(_params);\n const def = {\n ...util.normalizeParams(_params),\n check: \"string_format\",\n type: \"string\",\n format,\n fn: typeof fnOrRegex === \"function\" ? fnOrRegex : (val) => fnOrRegex.test(val),\n ...params,\n };\n if (fnOrRegex instanceof RegExp) {\n def.pattern = fnOrRegex;\n }\n const inst = new Class(def);\n return inst;\n}\n", "import { globalRegistry } from \"./registries.js\";\n// function initializeContext(inputs: JSONSchemaGeneratorParams): ToJSONSchemaContext {\n// return {\n// processor: inputs.processor,\n// metadataRegistry: inputs.metadata ?? globalRegistry,\n// target: inputs.target ?? \"draft-2020-12\",\n// unrepresentable: inputs.unrepresentable ?? \"throw\",\n// };\n// }\nexport function initializeContext(params) {\n // Normalize target: convert old non-hyphenated versions to hyphenated versions\n let target = params?.target ?? \"draft-2020-12\";\n if (target === \"draft-4\")\n target = \"draft-04\";\n if (target === \"draft-7\")\n target = \"draft-07\";\n return {\n processors: params.processors ?? {},\n metadataRegistry: params?.metadata ?? globalRegistry,\n target,\n unrepresentable: params?.unrepresentable ?? \"throw\",\n override: params?.override ?? (() => { }),\n io: params?.io ?? \"output\",\n counter: 0,\n seen: new Map(),\n cycles: params?.cycles ?? \"ref\",\n reused: params?.reused ?? \"inline\",\n external: params?.external ?? undefined,\n };\n}\nexport function process(schema, ctx, _params = { path: [], schemaPath: [] }) {\n var _a;\n const def = schema._zod.def;\n // check for schema in seens\n const seen = ctx.seen.get(schema);\n if (seen) {\n seen.count++;\n // check if cycle\n const isCycle = _params.schemaPath.includes(schema);\n if (isCycle) {\n seen.cycle = _params.path;\n }\n return seen.schema;\n }\n // initialize\n const result = { schema: {}, count: 1, cycle: undefined, path: _params.path };\n ctx.seen.set(schema, result);\n // custom method overrides default behavior\n const overrideSchema = schema._zod.toJSONSchema?.();\n if (overrideSchema) {\n result.schema = overrideSchema;\n }\n else {\n const params = {\n ..._params,\n schemaPath: [..._params.schemaPath, schema],\n path: _params.path,\n };\n if (schema._zod.processJSONSchema) {\n schema._zod.processJSONSchema(ctx, result.schema, params);\n }\n else {\n const _json = result.schema;\n const processor = ctx.processors[def.type];\n if (!processor) {\n throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);\n }\n processor(schema, ctx, _json, params);\n }\n const parent = schema._zod.parent;\n if (parent) {\n // Also set ref if processor didn't (for inheritance)\n if (!result.ref)\n result.ref = parent;\n process(parent, ctx, params);\n ctx.seen.get(parent).isParent = true;\n }\n }\n // metadata\n const meta = ctx.metadataRegistry.get(schema);\n if (meta)\n Object.assign(result.schema, meta);\n if (ctx.io === \"input\" && isTransforming(schema)) {\n // examples/defaults only apply to output type of pipe\n delete result.schema.examples;\n delete result.schema.default;\n }\n // set prefault as default\n if (ctx.io === \"input\" && result.schema._prefault)\n (_a = result.schema).default ?? (_a.default = result.schema._prefault);\n delete result.schema._prefault;\n // pulling fresh from ctx.seen in case it was overwritten\n const _result = ctx.seen.get(schema);\n return _result.schema;\n}\nexport function extractDefs(ctx, schema\n// params: EmitParams\n) {\n // iterate over seen map;\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // Track ids to detect duplicates across different schemas\n const idToSchema = new Map();\n for (const entry of ctx.seen.entries()) {\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n const existing = idToSchema.get(id);\n if (existing && existing !== entry[0]) {\n throw new Error(`Duplicate schema id \"${id}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);\n }\n idToSchema.set(id, entry[0]);\n }\n }\n // returns a ref to the schema\n // defId will be empty if the ref points to an external schema (or #)\n const makeURI = (entry) => {\n // comparing the seen objects because sometimes\n // multiple schemas map to the same seen object.\n // e.g. lazy\n // external is configured\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (ctx.external) {\n const externalId = ctx.external.registry.get(entry[0])?.id; // ?? \"__shared\";// `__schema${ctx.counter++}`;\n // check if schema is in the external registry\n const uriGenerator = ctx.external.uri ?? ((id) => id);\n if (externalId) {\n return { ref: uriGenerator(externalId) };\n }\n // otherwise, add to __shared\n const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;\n entry[1].defId = id; // set defId so it will be reused if needed\n return { defId: id, ref: `${uriGenerator(\"__shared\")}#/${defsSegment}/${id}` };\n }\n if (entry[1] === root) {\n return { ref: \"#\" };\n }\n // self-contained schema\n const uriPrefix = `#`;\n const defUriPrefix = `${uriPrefix}/${defsSegment}/`;\n const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;\n return { defId, ref: defUriPrefix + defId };\n };\n // stored cached version in `def` property\n // remove all properties, set $ref\n const extractToDef = (entry) => {\n // if the schema is already a reference, do not extract it\n if (entry[1].schema.$ref) {\n return;\n }\n const seen = entry[1];\n const { ref, defId } = makeURI(entry);\n seen.def = { ...seen.schema };\n // defId won't be set if the schema is a reference to an external schema\n // or if the schema is the root schema\n if (defId)\n seen.defId = defId;\n // wipe away all properties except $ref\n const schema = seen.schema;\n for (const key in schema) {\n delete schema[key];\n }\n schema.$ref = ref;\n };\n // throw on cycles\n // break cycles\n if (ctx.cycles === \"throw\") {\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.cycle) {\n throw new Error(\"Cycle detected: \" +\n `#/${seen.cycle?.join(\"/\")}/` +\n '\\n\\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.');\n }\n }\n }\n // extract schemas into $defs\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n // convert root schema to # $ref\n if (schema === entry[0]) {\n extractToDef(entry); // this has special handling for the root schema\n continue;\n }\n // extract schemas that are in the external registry\n if (ctx.external) {\n const ext = ctx.external.registry.get(entry[0])?.id;\n if (schema !== entry[0] && ext) {\n extractToDef(entry);\n continue;\n }\n }\n // extract schemas with `id` meta\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n extractToDef(entry);\n continue;\n }\n // break cycles\n if (seen.cycle) {\n // any\n extractToDef(entry);\n continue;\n }\n // extract reused schemas\n if (seen.count > 1) {\n if (ctx.reused === \"ref\") {\n extractToDef(entry);\n // biome-ignore lint:\n continue;\n }\n }\n }\n}\nexport function finalize(ctx, schema) {\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // flatten refs - inherit properties from parent schemas\n const flattenRef = (zodSchema) => {\n const seen = ctx.seen.get(zodSchema);\n // already processed\n if (seen.ref === null)\n return;\n const schema = seen.def ?? seen.schema;\n const _cached = { ...schema };\n const ref = seen.ref;\n seen.ref = null; // prevent infinite recursion\n if (ref) {\n flattenRef(ref);\n const refSeen = ctx.seen.get(ref);\n const refSchema = refSeen.schema;\n // merge referenced schema into current\n if (refSchema.$ref && (ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\")) {\n // older drafts can't combine $ref with other properties\n schema.allOf = schema.allOf ?? [];\n schema.allOf.push(refSchema);\n }\n else {\n Object.assign(schema, refSchema);\n }\n // restore child's own properties (child wins)\n Object.assign(schema, _cached);\n const isParentRef = zodSchema._zod.parent === ref;\n // For parent chain, child is a refinement - remove parent-only properties\n if (isParentRef) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (!(key in _cached)) {\n delete schema[key];\n }\n }\n }\n // When ref was extracted to $defs, remove properties that match the definition\n if (refSchema.$ref && refSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n // If parent was extracted (has $ref), propagate $ref to this schema\n // This handles cases like: readonly().meta({id}).describe()\n // where processor sets ref to innerType but parent should be referenced\n const parent = zodSchema._zod.parent;\n if (parent && parent !== ref) {\n // Ensure parent is processed first so its def has inherited properties\n flattenRef(parent);\n const parentSeen = ctx.seen.get(parent);\n if (parentSeen?.schema.$ref) {\n schema.$ref = parentSeen.schema.$ref;\n // De-duplicate with parent's definition\n if (parentSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n }\n // execute overrides\n ctx.override({\n zodSchema: zodSchema,\n jsonSchema: schema,\n path: seen.path ?? [],\n });\n };\n for (const entry of [...ctx.seen.entries()].reverse()) {\n flattenRef(entry[0]);\n }\n const result = {};\n if (ctx.target === \"draft-2020-12\") {\n result.$schema = \"https://json-schema.org/draft/2020-12/schema\";\n }\n else if (ctx.target === \"draft-07\") {\n result.$schema = \"http://json-schema.org/draft-07/schema#\";\n }\n else if (ctx.target === \"draft-04\") {\n result.$schema = \"http://json-schema.org/draft-04/schema#\";\n }\n else if (ctx.target === \"openapi-3.0\") {\n // OpenAPI 3.0 schema objects should not include a $schema property\n }\n else {\n // Arbitrary string values are allowed but won't have a $schema property set\n }\n if (ctx.external?.uri) {\n const id = ctx.external.registry.get(schema)?.id;\n if (!id)\n throw new Error(\"Schema is missing an `id` property\");\n result.$id = ctx.external.uri(id);\n }\n Object.assign(result, root.def ?? root.schema);\n // build defs object\n const defs = ctx.external?.defs ?? {};\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.def && seen.defId) {\n defs[seen.defId] = seen.def;\n }\n }\n // set definitions in result\n if (ctx.external) {\n }\n else {\n if (Object.keys(defs).length > 0) {\n if (ctx.target === \"draft-2020-12\") {\n result.$defs = defs;\n }\n else {\n result.definitions = defs;\n }\n }\n }\n try {\n // this \"finalizes\" this schema and ensures all cycles are removed\n // each call to finalize() is functionally independent\n // though the seen map is shared\n const finalized = JSON.parse(JSON.stringify(result));\n Object.defineProperty(finalized, \"~standard\", {\n value: {\n ...schema[\"~standard\"],\n jsonSchema: {\n input: createStandardJSONSchemaMethod(schema, \"input\", ctx.processors),\n output: createStandardJSONSchemaMethod(schema, \"output\", ctx.processors),\n },\n },\n enumerable: false,\n writable: false,\n });\n return finalized;\n }\n catch (_err) {\n throw new Error(\"Error converting schema to JSON.\");\n }\n}\nfunction isTransforming(_schema, _ctx) {\n const ctx = _ctx ?? { seen: new Set() };\n if (ctx.seen.has(_schema))\n return false;\n ctx.seen.add(_schema);\n const def = _schema._zod.def;\n if (def.type === \"transform\")\n return true;\n if (def.type === \"array\")\n return isTransforming(def.element, ctx);\n if (def.type === \"set\")\n return isTransforming(def.valueType, ctx);\n if (def.type === \"lazy\")\n return isTransforming(def.getter(), ctx);\n if (def.type === \"promise\" ||\n def.type === \"optional\" ||\n def.type === \"nonoptional\" ||\n def.type === \"nullable\" ||\n def.type === \"readonly\" ||\n def.type === \"default\" ||\n def.type === \"prefault\") {\n return isTransforming(def.innerType, ctx);\n }\n if (def.type === \"intersection\") {\n return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);\n }\n if (def.type === \"record\" || def.type === \"map\") {\n return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);\n }\n if (def.type === \"pipe\") {\n return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);\n }\n if (def.type === \"object\") {\n for (const key in def.shape) {\n if (isTransforming(def.shape[key], ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"union\") {\n for (const option of def.options) {\n if (isTransforming(option, ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"tuple\") {\n for (const item of def.items) {\n if (isTransforming(item, ctx))\n return true;\n }\n if (def.rest && isTransforming(def.rest, ctx))\n return true;\n return false;\n }\n return false;\n}\n/**\n * Creates a toJSONSchema method for a schema instance.\n * This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.\n */\nexport const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {\n const ctx = initializeContext({ ...params, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\nexport const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {\n const { libraryOptions, target } = params ?? {};\n const ctx = initializeContext({ ...(libraryOptions ?? {}), target, io, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\n", "import { extractDefs, finalize, initializeContext, process, } from \"./to-json-schema.js\";\nimport { getEnumValues } from \"./util.js\";\nconst formatMap = {\n guid: \"uuid\",\n url: \"uri\",\n datetime: \"date-time\",\n json_string: \"json-string\",\n regex: \"\", // do not set\n};\n// ==================== SIMPLE TYPE PROCESSORS ====================\nexport const stringProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n json.type = \"string\";\n const { minimum, maximum, format, patterns, contentEncoding } = schema._zod\n .bag;\n if (typeof minimum === \"number\")\n json.minLength = minimum;\n if (typeof maximum === \"number\")\n json.maxLength = maximum;\n // custom pattern overrides format\n if (format) {\n json.format = formatMap[format] ?? format;\n if (json.format === \"\")\n delete json.format; // empty format is not valid\n // JSON Schema format: \"time\" requires a full time with offset or Z\n // z.iso.time() does not include timezone information, so format: \"time\" should never be used\n if (format === \"time\") {\n delete json.format;\n }\n }\n if (contentEncoding)\n json.contentEncoding = contentEncoding;\n if (patterns && patterns.size > 0) {\n const regexes = [...patterns];\n if (regexes.length === 1)\n json.pattern = regexes[0].source;\n else if (regexes.length > 1) {\n json.allOf = [\n ...regexes.map((regex) => ({\n ...(ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\"\n ? { type: \"string\" }\n : {}),\n pattern: regex.source,\n })),\n ];\n }\n }\n};\nexport const numberProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;\n if (typeof format === \"string\" && format.includes(\"int\"))\n json.type = \"integer\";\n else\n json.type = \"number\";\n if (typeof exclusiveMinimum === \"number\") {\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.minimum = exclusiveMinimum;\n json.exclusiveMinimum = true;\n }\n else {\n json.exclusiveMinimum = exclusiveMinimum;\n }\n }\n if (typeof minimum === \"number\") {\n json.minimum = minimum;\n if (typeof exclusiveMinimum === \"number\" && ctx.target !== \"draft-04\") {\n if (exclusiveMinimum >= minimum)\n delete json.minimum;\n else\n delete json.exclusiveMinimum;\n }\n }\n if (typeof exclusiveMaximum === \"number\") {\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.maximum = exclusiveMaximum;\n json.exclusiveMaximum = true;\n }\n else {\n json.exclusiveMaximum = exclusiveMaximum;\n }\n }\n if (typeof maximum === \"number\") {\n json.maximum = maximum;\n if (typeof exclusiveMaximum === \"number\" && ctx.target !== \"draft-04\") {\n if (exclusiveMaximum <= maximum)\n delete json.maximum;\n else\n delete json.exclusiveMaximum;\n }\n }\n if (typeof multipleOf === \"number\")\n json.multipleOf = multipleOf;\n};\nexport const booleanProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const bigintProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"BigInt cannot be represented in JSON Schema\");\n }\n};\nexport const symbolProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Symbols cannot be represented in JSON Schema\");\n }\n};\nexport const nullProcessor = (_schema, ctx, json, _params) => {\n if (ctx.target === \"openapi-3.0\") {\n json.type = \"string\";\n json.nullable = true;\n json.enum = [null];\n }\n else {\n json.type = \"null\";\n }\n};\nexport const undefinedProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Undefined cannot be represented in JSON Schema\");\n }\n};\nexport const voidProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Void cannot be represented in JSON Schema\");\n }\n};\nexport const neverProcessor = (_schema, _ctx, json, _params) => {\n json.not = {};\n};\nexport const anyProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const unknownProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const dateProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Date cannot be represented in JSON Schema\");\n }\n};\nexport const enumProcessor = (schema, _ctx, json, _params) => {\n const def = schema._zod.def;\n const values = getEnumValues(def.entries);\n // Number enums can have both string and number values\n if (values.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (values.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n json.enum = values;\n};\nexport const literalProcessor = (schema, ctx, json, _params) => {\n const def = schema._zod.def;\n const vals = [];\n for (const val of def.values) {\n if (val === undefined) {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Literal `undefined` cannot be represented in JSON Schema\");\n }\n else {\n // do not add to vals\n }\n }\n else if (typeof val === \"bigint\") {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"BigInt literals cannot be represented in JSON Schema\");\n }\n else {\n vals.push(Number(val));\n }\n }\n else {\n vals.push(val);\n }\n }\n if (vals.length === 0) {\n // do nothing (an undefined literal was stripped)\n }\n else if (vals.length === 1) {\n const val = vals[0];\n json.type = val === null ? \"null\" : typeof val;\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.enum = [val];\n }\n else {\n json.const = val;\n }\n }\n else {\n if (vals.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (vals.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n if (vals.every((v) => typeof v === \"boolean\"))\n json.type = \"boolean\";\n if (vals.every((v) => v === null))\n json.type = \"null\";\n json.enum = vals;\n }\n};\nexport const nanProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"NaN cannot be represented in JSON Schema\");\n }\n};\nexport const templateLiteralProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const pattern = schema._zod.pattern;\n if (!pattern)\n throw new Error(\"Pattern not found in template literal\");\n _json.type = \"string\";\n _json.pattern = pattern.source;\n};\nexport const fileProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const file = {\n type: \"string\",\n format: \"binary\",\n contentEncoding: \"binary\",\n };\n const { minimum, maximum, mime } = schema._zod.bag;\n if (minimum !== undefined)\n file.minLength = minimum;\n if (maximum !== undefined)\n file.maxLength = maximum;\n if (mime) {\n if (mime.length === 1) {\n file.contentMediaType = mime[0];\n Object.assign(_json, file);\n }\n else {\n Object.assign(_json, file); // shared props at root\n _json.anyOf = mime.map((m) => ({ contentMediaType: m })); // only contentMediaType differs\n }\n }\n else {\n Object.assign(_json, file);\n }\n};\nexport const successProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const customProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Custom types cannot be represented in JSON Schema\");\n }\n};\nexport const functionProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Function types cannot be represented in JSON Schema\");\n }\n};\nexport const transformProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Transforms cannot be represented in JSON Schema\");\n }\n};\nexport const mapProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Map cannot be represented in JSON Schema\");\n }\n};\nexport const setProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Set cannot be represented in JSON Schema\");\n }\n};\n// ==================== COMPOSITE TYPE PROCESSORS ====================\nexport const arrayProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n json.type = \"array\";\n json.items = process(def.element, ctx, { ...params, path: [...params.path, \"items\"] });\n};\nexport const objectProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n json.properties = {};\n const shape = def.shape;\n for (const key in shape) {\n json.properties[key] = process(shape[key], ctx, {\n ...params,\n path: [...params.path, \"properties\", key],\n });\n }\n // required keys\n const allKeys = new Set(Object.keys(shape));\n const requiredKeys = new Set([...allKeys].filter((key) => {\n const v = def.shape[key]._zod;\n if (ctx.io === \"input\") {\n return v.optin === undefined;\n }\n else {\n return v.optout === undefined;\n }\n }));\n if (requiredKeys.size > 0) {\n json.required = Array.from(requiredKeys);\n }\n // catchall\n if (def.catchall?._zod.def.type === \"never\") {\n // strict\n json.additionalProperties = false;\n }\n else if (!def.catchall) {\n // regular\n if (ctx.io === \"output\")\n json.additionalProperties = false;\n }\n else if (def.catchall) {\n json.additionalProperties = process(def.catchall, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n};\nexport const unionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n // Exclusive unions (inclusive === false) use oneOf (exactly one match) instead of anyOf (one or more matches)\n // This includes both z.xor() and discriminated unions\n const isExclusive = def.inclusive === false;\n const options = def.options.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, isExclusive ? \"oneOf\" : \"anyOf\", i],\n }));\n if (isExclusive) {\n json.oneOf = options;\n }\n else {\n json.anyOf = options;\n }\n};\nexport const intersectionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const a = process(def.left, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 0],\n });\n const b = process(def.right, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 1],\n });\n const isSimpleIntersection = (val) => \"allOf\" in val && Object.keys(val).length === 1;\n const allOf = [\n ...(isSimpleIntersection(a) ? a.allOf : [a]),\n ...(isSimpleIntersection(b) ? b.allOf : [b]),\n ];\n json.allOf = allOf;\n};\nexport const tupleProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"array\";\n const prefixPath = ctx.target === \"draft-2020-12\" ? \"prefixItems\" : \"items\";\n const restPath = ctx.target === \"draft-2020-12\" ? \"items\" : ctx.target === \"openapi-3.0\" ? \"items\" : \"additionalItems\";\n const prefixItems = def.items.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, prefixPath, i],\n }));\n const rest = def.rest\n ? process(def.rest, ctx, {\n ...params,\n path: [...params.path, restPath, ...(ctx.target === \"openapi-3.0\" ? [def.items.length] : [])],\n })\n : null;\n if (ctx.target === \"draft-2020-12\") {\n json.prefixItems = prefixItems;\n if (rest) {\n json.items = rest;\n }\n }\n else if (ctx.target === \"openapi-3.0\") {\n json.items = {\n anyOf: prefixItems,\n };\n if (rest) {\n json.items.anyOf.push(rest);\n }\n json.minItems = prefixItems.length;\n if (!rest) {\n json.maxItems = prefixItems.length;\n }\n }\n else {\n json.items = prefixItems;\n if (rest) {\n json.additionalItems = rest;\n }\n }\n // length\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n};\nexport const recordProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n // For looseRecord with regex patterns, use patternProperties\n // This correctly represents \"only validate keys matching the pattern\" semantics\n // and composes well with allOf (intersections)\n const keyType = def.keyType;\n const keyBag = keyType._zod.bag;\n const patterns = keyBag?.patterns;\n if (def.mode === \"loose\" && patterns && patterns.size > 0) {\n // Use patternProperties for looseRecord with regex patterns\n const valueSchema = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"patternProperties\", \"*\"],\n });\n json.patternProperties = {};\n for (const pattern of patterns) {\n json.patternProperties[pattern.source] = valueSchema;\n }\n }\n else {\n // Default behavior: use propertyNames + additionalProperties\n if (ctx.target === \"draft-07\" || ctx.target === \"draft-2020-12\") {\n json.propertyNames = process(def.keyType, ctx, {\n ...params,\n path: [...params.path, \"propertyNames\"],\n });\n }\n json.additionalProperties = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n // Add required for keys with discrete values (enum, literal, etc.)\n const keyValues = keyType._zod.values;\n if (keyValues) {\n const validKeyValues = [...keyValues].filter((v) => typeof v === \"string\" || typeof v === \"number\");\n if (validKeyValues.length > 0) {\n json.required = validKeyValues;\n }\n }\n};\nexport const nullableProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const inner = process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n if (ctx.target === \"openapi-3.0\") {\n seen.ref = def.innerType;\n json.nullable = true;\n }\n else {\n json.anyOf = [inner, { type: \"null\" }];\n }\n};\nexport const nonoptionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const defaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.default = JSON.parse(JSON.stringify(def.defaultValue));\n};\nexport const prefaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n if (ctx.io === \"input\")\n json._prefault = JSON.parse(JSON.stringify(def.defaultValue));\n};\nexport const catchProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n let catchValue;\n try {\n catchValue = def.catchValue(undefined);\n }\n catch {\n throw new Error(\"Dynamic catch values are not supported in JSON Schema\");\n }\n json.default = catchValue;\n};\nexport const pipeProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n const innerType = ctx.io === \"input\" ? (def.in._zod.def.type === \"transform\" ? def.out : def.in) : def.out;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\nexport const readonlyProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.readOnly = true;\n};\nexport const promiseProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const optionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const lazyProcessor = (schema, ctx, _json, params) => {\n const innerType = schema._zod.innerType;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\n// ==================== ALL PROCESSORS ====================\nexport const allProcessors = {\n string: stringProcessor,\n number: numberProcessor,\n boolean: booleanProcessor,\n bigint: bigintProcessor,\n symbol: symbolProcessor,\n null: nullProcessor,\n undefined: undefinedProcessor,\n void: voidProcessor,\n never: neverProcessor,\n any: anyProcessor,\n unknown: unknownProcessor,\n date: dateProcessor,\n enum: enumProcessor,\n literal: literalProcessor,\n nan: nanProcessor,\n template_literal: templateLiteralProcessor,\n file: fileProcessor,\n success: successProcessor,\n custom: customProcessor,\n function: functionProcessor,\n transform: transformProcessor,\n map: mapProcessor,\n set: setProcessor,\n array: arrayProcessor,\n object: objectProcessor,\n union: unionProcessor,\n intersection: intersectionProcessor,\n tuple: tupleProcessor,\n record: recordProcessor,\n nullable: nullableProcessor,\n nonoptional: nonoptionalProcessor,\n default: defaultProcessor,\n prefault: prefaultProcessor,\n catch: catchProcessor,\n pipe: pipeProcessor,\n readonly: readonlyProcessor,\n promise: promiseProcessor,\n optional: optionalProcessor,\n lazy: lazyProcessor,\n};\nexport function toJSONSchema(input, params) {\n if (\"_idmap\" in input) {\n // Registry case\n const registry = input;\n const ctx = initializeContext({ ...params, processors: allProcessors });\n const defs = {};\n // First pass: process all schemas to build the seen map\n for (const entry of registry._idmap.entries()) {\n const [_, schema] = entry;\n process(schema, ctx);\n }\n const schemas = {};\n const external = {\n registry,\n uri: params?.uri,\n defs,\n };\n // Update the context with external configuration\n ctx.external = external;\n // Second pass: emit each schema\n for (const entry of registry._idmap.entries()) {\n const [key, schema] = entry;\n extractDefs(ctx, schema);\n schemas[key] = finalize(ctx, schema);\n }\n if (Object.keys(defs).length > 0) {\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n schemas.__shared = {\n [defsSegment]: defs,\n };\n }\n return { schemas };\n }\n // Single schema case\n const ctx = initializeContext({ ...params, processors: allProcessors });\n process(input, ctx);\n extractDefs(ctx, input);\n return finalize(ctx, input);\n}\n", "import { allProcessors } from \"./json-schema-processors.js\";\nimport { extractDefs, finalize, initializeContext, process, } from \"./to-json-schema.js\";\n/**\n * Legacy class-based interface for JSON Schema generation.\n * This class wraps the new functional implementation to provide backward compatibility.\n *\n * @deprecated Use the `toJSONSchema` function instead for new code.\n *\n * @example\n * ```typescript\n * // Legacy usage (still supported)\n * const gen = new JSONSchemaGenerator({ target: \"draft-07\" });\n * gen.process(schema);\n * const result = gen.emit(schema);\n *\n * // Preferred modern usage\n * const result = toJSONSchema(schema, { target: \"draft-07\" });\n * ```\n */\nexport class JSONSchemaGenerator {\n /** @deprecated Access via ctx instead */\n get metadataRegistry() {\n return this.ctx.metadataRegistry;\n }\n /** @deprecated Access via ctx instead */\n get target() {\n return this.ctx.target;\n }\n /** @deprecated Access via ctx instead */\n get unrepresentable() {\n return this.ctx.unrepresentable;\n }\n /** @deprecated Access via ctx instead */\n get override() {\n return this.ctx.override;\n }\n /** @deprecated Access via ctx instead */\n get io() {\n return this.ctx.io;\n }\n /** @deprecated Access via ctx instead */\n get counter() {\n return this.ctx.counter;\n }\n set counter(value) {\n this.ctx.counter = value;\n }\n /** @deprecated Access via ctx instead */\n get seen() {\n return this.ctx.seen;\n }\n constructor(params) {\n // Normalize target for internal context\n let normalizedTarget = params?.target ?? \"draft-2020-12\";\n if (normalizedTarget === \"draft-4\")\n normalizedTarget = \"draft-04\";\n if (normalizedTarget === \"draft-7\")\n normalizedTarget = \"draft-07\";\n this.ctx = initializeContext({\n processors: allProcessors,\n target: normalizedTarget,\n ...(params?.metadata && { metadata: params.metadata }),\n ...(params?.unrepresentable && { unrepresentable: params.unrepresentable }),\n ...(params?.override && { override: params.override }),\n ...(params?.io && { io: params.io }),\n });\n }\n /**\n * Process a schema to prepare it for JSON Schema generation.\n * This must be called before emit().\n */\n process(schema, _params = { path: [], schemaPath: [] }) {\n return process(schema, this.ctx, _params);\n }\n /**\n * Emit the final JSON Schema after processing.\n * Must call process() first.\n */\n emit(schema, _params) {\n // Apply emit params to the context\n if (_params) {\n if (_params.cycles)\n this.ctx.cycles = _params.cycles;\n if (_params.reused)\n this.ctx.reused = _params.reused;\n if (_params.external)\n this.ctx.external = _params.external;\n }\n extractDefs(this.ctx, schema);\n const result = finalize(this.ctx, schema);\n // Strip ~standard property to match old implementation's return type\n const { \"~standard\": _, ...plainResult } = result;\n return plainResult;\n }\n}\n", "export {};\n", "import * as core from \"../core/index.js\";\nimport { util } from \"../core/index.js\";\nimport * as processors from \"../core/json-schema-processors.js\";\nimport { createStandardJSONSchemaMethod, createToJSONSchemaMethod } from \"../core/to-json-schema.js\";\nimport * as checks from \"./checks.js\";\nimport * as iso from \"./iso.js\";\nimport * as parse from \"./parse.js\";\nexport const ZodType = /*@__PURE__*/ core.$constructor(\"ZodType\", (inst, def) => {\n core.$ZodType.init(inst, def);\n Object.assign(inst[\"~standard\"], {\n jsonSchema: {\n input: createStandardJSONSchemaMethod(inst, \"input\"),\n output: createStandardJSONSchemaMethod(inst, \"output\"),\n },\n });\n inst.toJSONSchema = createToJSONSchemaMethod(inst, {});\n inst.def = def;\n inst.type = def.type;\n Object.defineProperty(inst, \"_def\", { value: def });\n // base methods\n inst.check = (...checks) => {\n return inst.clone(util.mergeDefs(def, {\n checks: [\n ...(def.checks ?? []),\n ...checks.map((ch) => typeof ch === \"function\" ? { _zod: { check: ch, def: { check: \"custom\" }, onattach: [] } } : ch),\n ],\n }), {\n parent: true,\n });\n };\n inst.with = inst.check;\n inst.clone = (def, params) => core.clone(inst, def, params);\n inst.brand = () => inst;\n inst.register = ((reg, meta) => {\n reg.add(inst, meta);\n return inst;\n });\n // parsing\n inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });\n inst.safeParse = (data, params) => parse.safeParse(inst, data, params);\n inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });\n inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);\n inst.spa = inst.safeParseAsync;\n // encoding/decoding\n inst.encode = (data, params) => parse.encode(inst, data, params);\n inst.decode = (data, params) => parse.decode(inst, data, params);\n inst.encodeAsync = async (data, params) => parse.encodeAsync(inst, data, params);\n inst.decodeAsync = async (data, params) => parse.decodeAsync(inst, data, params);\n inst.safeEncode = (data, params) => parse.safeEncode(inst, data, params);\n inst.safeDecode = (data, params) => parse.safeDecode(inst, data, params);\n inst.safeEncodeAsync = async (data, params) => parse.safeEncodeAsync(inst, data, params);\n inst.safeDecodeAsync = async (data, params) => parse.safeDecodeAsync(inst, data, params);\n // refinements\n inst.refine = (check, params) => inst.check(refine(check, params));\n inst.superRefine = (refinement) => inst.check(superRefine(refinement));\n inst.overwrite = (fn) => inst.check(checks.overwrite(fn));\n // wrappers\n inst.optional = () => optional(inst);\n inst.exactOptional = () => exactOptional(inst);\n inst.nullable = () => nullable(inst);\n inst.nullish = () => optional(nullable(inst));\n inst.nonoptional = (params) => nonoptional(inst, params);\n inst.array = () => array(inst);\n inst.or = (arg) => union([inst, arg]);\n inst.and = (arg) => intersection(inst, arg);\n inst.transform = (tx) => pipe(inst, transform(tx));\n inst.default = (def) => _default(inst, def);\n inst.prefault = (def) => prefault(inst, def);\n // inst.coalesce = (def, params) => coalesce(inst, def, params);\n inst.catch = (params) => _catch(inst, params);\n inst.pipe = (target) => pipe(inst, target);\n inst.readonly = () => readonly(inst);\n // meta\n inst.describe = (description) => {\n const cl = inst.clone();\n core.globalRegistry.add(cl, { description });\n return cl;\n };\n Object.defineProperty(inst, \"description\", {\n get() {\n return core.globalRegistry.get(inst)?.description;\n },\n configurable: true,\n });\n inst.meta = (...args) => {\n if (args.length === 0) {\n return core.globalRegistry.get(inst);\n }\n const cl = inst.clone();\n core.globalRegistry.add(cl, args[0]);\n return cl;\n };\n // helpers\n inst.isOptional = () => inst.safeParse(undefined).success;\n inst.isNullable = () => inst.safeParse(null).success;\n inst.apply = (fn) => fn(inst);\n return inst;\n});\n/** @internal */\nexport const _ZodString = /*@__PURE__*/ core.$constructor(\"_ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.stringProcessor(inst, ctx, json, params);\n const bag = inst._zod.bag;\n inst.format = bag.format ?? null;\n inst.minLength = bag.minimum ?? null;\n inst.maxLength = bag.maximum ?? null;\n // validations\n inst.regex = (...args) => inst.check(checks.regex(...args));\n inst.includes = (...args) => inst.check(checks.includes(...args));\n inst.startsWith = (...args) => inst.check(checks.startsWith(...args));\n inst.endsWith = (...args) => inst.check(checks.endsWith(...args));\n inst.min = (...args) => inst.check(checks.minLength(...args));\n inst.max = (...args) => inst.check(checks.maxLength(...args));\n inst.length = (...args) => inst.check(checks.length(...args));\n inst.nonempty = (...args) => inst.check(checks.minLength(1, ...args));\n inst.lowercase = (params) => inst.check(checks.lowercase(params));\n inst.uppercase = (params) => inst.check(checks.uppercase(params));\n // transforms\n inst.trim = () => inst.check(checks.trim());\n inst.normalize = (...args) => inst.check(checks.normalize(...args));\n inst.toLowerCase = () => inst.check(checks.toLowerCase());\n inst.toUpperCase = () => inst.check(checks.toUpperCase());\n inst.slugify = () => inst.check(checks.slugify());\n});\nexport const ZodString = /*@__PURE__*/ core.$constructor(\"ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n _ZodString.init(inst, def);\n inst.email = (params) => inst.check(core._email(ZodEmail, params));\n inst.url = (params) => inst.check(core._url(ZodURL, params));\n inst.jwt = (params) => inst.check(core._jwt(ZodJWT, params));\n inst.emoji = (params) => inst.check(core._emoji(ZodEmoji, params));\n inst.guid = (params) => inst.check(core._guid(ZodGUID, params));\n inst.uuid = (params) => inst.check(core._uuid(ZodUUID, params));\n inst.uuidv4 = (params) => inst.check(core._uuidv4(ZodUUID, params));\n inst.uuidv6 = (params) => inst.check(core._uuidv6(ZodUUID, params));\n inst.uuidv7 = (params) => inst.check(core._uuidv7(ZodUUID, params));\n inst.nanoid = (params) => inst.check(core._nanoid(ZodNanoID, params));\n inst.guid = (params) => inst.check(core._guid(ZodGUID, params));\n inst.cuid = (params) => inst.check(core._cuid(ZodCUID, params));\n inst.cuid2 = (params) => inst.check(core._cuid2(ZodCUID2, params));\n inst.ulid = (params) => inst.check(core._ulid(ZodULID, params));\n inst.base64 = (params) => inst.check(core._base64(ZodBase64, params));\n inst.base64url = (params) => inst.check(core._base64url(ZodBase64URL, params));\n inst.xid = (params) => inst.check(core._xid(ZodXID, params));\n inst.ksuid = (params) => inst.check(core._ksuid(ZodKSUID, params));\n inst.ipv4 = (params) => inst.check(core._ipv4(ZodIPv4, params));\n inst.ipv6 = (params) => inst.check(core._ipv6(ZodIPv6, params));\n inst.cidrv4 = (params) => inst.check(core._cidrv4(ZodCIDRv4, params));\n inst.cidrv6 = (params) => inst.check(core._cidrv6(ZodCIDRv6, params));\n inst.e164 = (params) => inst.check(core._e164(ZodE164, params));\n // iso\n inst.datetime = (params) => inst.check(iso.datetime(params));\n inst.date = (params) => inst.check(iso.date(params));\n inst.time = (params) => inst.check(iso.time(params));\n inst.duration = (params) => inst.check(iso.duration(params));\n});\nexport function string(params) {\n return core._string(ZodString, params);\n}\nexport const ZodStringFormat = /*@__PURE__*/ core.$constructor(\"ZodStringFormat\", (inst, def) => {\n core.$ZodStringFormat.init(inst, def);\n _ZodString.init(inst, def);\n});\nexport const ZodEmail = /*@__PURE__*/ core.$constructor(\"ZodEmail\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmail.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function email(params) {\n return core._email(ZodEmail, params);\n}\nexport const ZodGUID = /*@__PURE__*/ core.$constructor(\"ZodGUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodGUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function guid(params) {\n return core._guid(ZodGUID, params);\n}\nexport const ZodUUID = /*@__PURE__*/ core.$constructor(\"ZodUUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodUUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function uuid(params) {\n return core._uuid(ZodUUID, params);\n}\nexport function uuidv4(params) {\n return core._uuidv4(ZodUUID, params);\n}\n// ZodUUIDv6\nexport function uuidv6(params) {\n return core._uuidv6(ZodUUID, params);\n}\n// ZodUUIDv7\nexport function uuidv7(params) {\n return core._uuidv7(ZodUUID, params);\n}\nexport const ZodURL = /*@__PURE__*/ core.$constructor(\"ZodURL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodURL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function url(params) {\n return core._url(ZodURL, params);\n}\nexport function httpUrl(params) {\n return core._url(ZodURL, {\n protocol: /^https?$/,\n hostname: core.regexes.domain,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEmoji = /*@__PURE__*/ core.$constructor(\"ZodEmoji\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmoji.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function emoji(params) {\n return core._emoji(ZodEmoji, params);\n}\nexport const ZodNanoID = /*@__PURE__*/ core.$constructor(\"ZodNanoID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodNanoID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function nanoid(params) {\n return core._nanoid(ZodNanoID, params);\n}\nexport const ZodCUID = /*@__PURE__*/ core.$constructor(\"ZodCUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cuid(params) {\n return core._cuid(ZodCUID, params);\n}\nexport const ZodCUID2 = /*@__PURE__*/ core.$constructor(\"ZodCUID2\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID2.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cuid2(params) {\n return core._cuid2(ZodCUID2, params);\n}\nexport const ZodULID = /*@__PURE__*/ core.$constructor(\"ZodULID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodULID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ulid(params) {\n return core._ulid(ZodULID, params);\n}\nexport const ZodXID = /*@__PURE__*/ core.$constructor(\"ZodXID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodXID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function xid(params) {\n return core._xid(ZodXID, params);\n}\nexport const ZodKSUID = /*@__PURE__*/ core.$constructor(\"ZodKSUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodKSUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ksuid(params) {\n return core._ksuid(ZodKSUID, params);\n}\nexport const ZodIPv4 = /*@__PURE__*/ core.$constructor(\"ZodIPv4\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv4(params) {\n return core._ipv4(ZodIPv4, params);\n}\nexport const ZodMAC = /*@__PURE__*/ core.$constructor(\"ZodMAC\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodMAC.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function mac(params) {\n return core._mac(ZodMAC, params);\n}\nexport const ZodIPv6 = /*@__PURE__*/ core.$constructor(\"ZodIPv6\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv6(params) {\n return core._ipv6(ZodIPv6, params);\n}\nexport const ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv4\", (inst, def) => {\n core.$ZodCIDRv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv4(params) {\n return core._cidrv4(ZodCIDRv4, params);\n}\nexport const ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv6\", (inst, def) => {\n core.$ZodCIDRv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv6(params) {\n return core._cidrv6(ZodCIDRv6, params);\n}\nexport const ZodBase64 = /*@__PURE__*/ core.$constructor(\"ZodBase64\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64(params) {\n return core._base64(ZodBase64, params);\n}\nexport const ZodBase64URL = /*@__PURE__*/ core.$constructor(\"ZodBase64URL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64URL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64url(params) {\n return core._base64url(ZodBase64URL, params);\n}\nexport const ZodE164 = /*@__PURE__*/ core.$constructor(\"ZodE164\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodE164.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function e164(params) {\n return core._e164(ZodE164, params);\n}\nexport const ZodJWT = /*@__PURE__*/ core.$constructor(\"ZodJWT\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodJWT.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function jwt(params) {\n return core._jwt(ZodJWT, params);\n}\nexport const ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"ZodCustomStringFormat\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCustomStringFormat.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function stringFormat(format, fnOrRegex, _params = {}) {\n return core._stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);\n}\nexport function hostname(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hostname\", core.regexes.hostname, _params);\n}\nexport function hex(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hex\", core.regexes.hex, _params);\n}\nexport function hash(alg, params) {\n const enc = params?.enc ?? \"hex\";\n const format = `${alg}_${enc}`;\n const regex = core.regexes[format];\n if (!regex)\n throw new Error(`Unrecognized hash format: ${format}`);\n return core._stringFormat(ZodCustomStringFormat, format, regex, params);\n}\nexport const ZodNumber = /*@__PURE__*/ core.$constructor(\"ZodNumber\", (inst, def) => {\n core.$ZodNumber.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.numberProcessor(inst, ctx, json, params);\n inst.gt = (value, params) => inst.check(checks.gt(value, params));\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.lt = (value, params) => inst.check(checks.lt(value, params));\n inst.lte = (value, params) => inst.check(checks.lte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n inst.int = (params) => inst.check(int(params));\n inst.safe = (params) => inst.check(int(params));\n inst.positive = (params) => inst.check(checks.gt(0, params));\n inst.nonnegative = (params) => inst.check(checks.gte(0, params));\n inst.negative = (params) => inst.check(checks.lt(0, params));\n inst.nonpositive = (params) => inst.check(checks.lte(0, params));\n inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));\n inst.step = (value, params) => inst.check(checks.multipleOf(value, params));\n // inst.finite = (params) => inst.check(core.finite(params));\n inst.finite = () => inst;\n const bag = inst._zod.bag;\n inst.minValue =\n Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;\n inst.maxValue =\n Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;\n inst.isInt = (bag.format ?? \"\").includes(\"int\") || Number.isSafeInteger(bag.multipleOf ?? 0.5);\n inst.isFinite = true;\n inst.format = bag.format ?? null;\n});\nexport function number(params) {\n return core._number(ZodNumber, params);\n}\nexport const ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"ZodNumberFormat\", (inst, def) => {\n core.$ZodNumberFormat.init(inst, def);\n ZodNumber.init(inst, def);\n});\nexport function int(params) {\n return core._int(ZodNumberFormat, params);\n}\nexport function float32(params) {\n return core._float32(ZodNumberFormat, params);\n}\nexport function float64(params) {\n return core._float64(ZodNumberFormat, params);\n}\nexport function int32(params) {\n return core._int32(ZodNumberFormat, params);\n}\nexport function uint32(params) {\n return core._uint32(ZodNumberFormat, params);\n}\nexport const ZodBoolean = /*@__PURE__*/ core.$constructor(\"ZodBoolean\", (inst, def) => {\n core.$ZodBoolean.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.booleanProcessor(inst, ctx, json, params);\n});\nexport function boolean(params) {\n return core._boolean(ZodBoolean, params);\n}\nexport const ZodBigInt = /*@__PURE__*/ core.$constructor(\"ZodBigInt\", (inst, def) => {\n core.$ZodBigInt.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.bigintProcessor(inst, ctx, json, params);\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.gt = (value, params) => inst.check(checks.gt(value, params));\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.lt = (value, params) => inst.check(checks.lt(value, params));\n inst.lte = (value, params) => inst.check(checks.lte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n inst.positive = (params) => inst.check(checks.gt(BigInt(0), params));\n inst.negative = (params) => inst.check(checks.lt(BigInt(0), params));\n inst.nonpositive = (params) => inst.check(checks.lte(BigInt(0), params));\n inst.nonnegative = (params) => inst.check(checks.gte(BigInt(0), params));\n inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));\n const bag = inst._zod.bag;\n inst.minValue = bag.minimum ?? null;\n inst.maxValue = bag.maximum ?? null;\n inst.format = bag.format ?? null;\n});\nexport function bigint(params) {\n return core._bigint(ZodBigInt, params);\n}\nexport const ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"ZodBigIntFormat\", (inst, def) => {\n core.$ZodBigIntFormat.init(inst, def);\n ZodBigInt.init(inst, def);\n});\n// int64\nexport function int64(params) {\n return core._int64(ZodBigIntFormat, params);\n}\n// uint64\nexport function uint64(params) {\n return core._uint64(ZodBigIntFormat, params);\n}\nexport const ZodSymbol = /*@__PURE__*/ core.$constructor(\"ZodSymbol\", (inst, def) => {\n core.$ZodSymbol.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.symbolProcessor(inst, ctx, json, params);\n});\nexport function symbol(params) {\n return core._symbol(ZodSymbol, params);\n}\nexport const ZodUndefined = /*@__PURE__*/ core.$constructor(\"ZodUndefined\", (inst, def) => {\n core.$ZodUndefined.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.undefinedProcessor(inst, ctx, json, params);\n});\nfunction _undefined(params) {\n return core._undefined(ZodUndefined, params);\n}\nexport { _undefined as undefined };\nexport const ZodNull = /*@__PURE__*/ core.$constructor(\"ZodNull\", (inst, def) => {\n core.$ZodNull.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullProcessor(inst, ctx, json, params);\n});\nfunction _null(params) {\n return core._null(ZodNull, params);\n}\nexport { _null as null };\nexport const ZodAny = /*@__PURE__*/ core.$constructor(\"ZodAny\", (inst, def) => {\n core.$ZodAny.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.anyProcessor(inst, ctx, json, params);\n});\nexport function any() {\n return core._any(ZodAny);\n}\nexport const ZodUnknown = /*@__PURE__*/ core.$constructor(\"ZodUnknown\", (inst, def) => {\n core.$ZodUnknown.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unknownProcessor(inst, ctx, json, params);\n});\nexport function unknown() {\n return core._unknown(ZodUnknown);\n}\nexport const ZodNever = /*@__PURE__*/ core.$constructor(\"ZodNever\", (inst, def) => {\n core.$ZodNever.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.neverProcessor(inst, ctx, json, params);\n});\nexport function never(params) {\n return core._never(ZodNever, params);\n}\nexport const ZodVoid = /*@__PURE__*/ core.$constructor(\"ZodVoid\", (inst, def) => {\n core.$ZodVoid.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.voidProcessor(inst, ctx, json, params);\n});\nfunction _void(params) {\n return core._void(ZodVoid, params);\n}\nexport { _void as void };\nexport const ZodDate = /*@__PURE__*/ core.$constructor(\"ZodDate\", (inst, def) => {\n core.$ZodDate.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.dateProcessor(inst, ctx, json, params);\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n const c = inst._zod.bag;\n inst.minDate = c.minimum ? new Date(c.minimum) : null;\n inst.maxDate = c.maximum ? new Date(c.maximum) : null;\n});\nexport function date(params) {\n return core._date(ZodDate, params);\n}\nexport const ZodArray = /*@__PURE__*/ core.$constructor(\"ZodArray\", (inst, def) => {\n core.$ZodArray.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.arrayProcessor(inst, ctx, json, params);\n inst.element = def.element;\n inst.min = (minLength, params) => inst.check(checks.minLength(minLength, params));\n inst.nonempty = (params) => inst.check(checks.minLength(1, params));\n inst.max = (maxLength, params) => inst.check(checks.maxLength(maxLength, params));\n inst.length = (len, params) => inst.check(checks.length(len, params));\n inst.unwrap = () => inst.element;\n});\nexport function array(element, params) {\n return core._array(ZodArray, element, params);\n}\n// .keyof\nexport function keyof(schema) {\n const shape = schema._zod.def.shape;\n return _enum(Object.keys(shape));\n}\nexport const ZodObject = /*@__PURE__*/ core.$constructor(\"ZodObject\", (inst, def) => {\n core.$ZodObjectJIT.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.objectProcessor(inst, ctx, json, params);\n util.defineLazy(inst, \"shape\", () => {\n return def.shape;\n });\n inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));\n inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall: catchall });\n inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });\n inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });\n inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });\n inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });\n inst.extend = (incoming) => {\n return util.extend(inst, incoming);\n };\n inst.safeExtend = (incoming) => {\n return util.safeExtend(inst, incoming);\n };\n inst.merge = (other) => util.merge(inst, other);\n inst.pick = (mask) => util.pick(inst, mask);\n inst.omit = (mask) => util.omit(inst, mask);\n inst.partial = (...args) => util.partial(ZodOptional, inst, args[0]);\n inst.required = (...args) => util.required(ZodNonOptional, inst, args[0]);\n});\nexport function object(shape, params) {\n const def = {\n type: \"object\",\n shape: shape ?? {},\n ...util.normalizeParams(params),\n };\n return new ZodObject(def);\n}\n// strictObject\nexport function strictObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: never(),\n ...util.normalizeParams(params),\n });\n}\n// looseObject\nexport function looseObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: unknown(),\n ...util.normalizeParams(params),\n });\n}\nexport const ZodUnion = /*@__PURE__*/ core.$constructor(\"ZodUnion\", (inst, def) => {\n core.$ZodUnion.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\nexport function union(options, params) {\n return new ZodUnion({\n type: \"union\",\n options: options,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodXor = /*@__PURE__*/ core.$constructor(\"ZodXor\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodXor.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\n/** Creates an exclusive union (XOR) where exactly one option must match.\n * Unlike regular unions that succeed when any option matches, xor fails if\n * zero or more than one option matches the input. */\nexport function xor(options, params) {\n return new ZodXor({\n type: \"union\",\n options: options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodDiscriminatedUnion = /*@__PURE__*/ core.$constructor(\"ZodDiscriminatedUnion\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodDiscriminatedUnion.init(inst, def);\n});\nexport function discriminatedUnion(discriminator, options, params) {\n // const [options, params] = args;\n return new ZodDiscriminatedUnion({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodIntersection = /*@__PURE__*/ core.$constructor(\"ZodIntersection\", (inst, def) => {\n core.$ZodIntersection.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.intersectionProcessor(inst, ctx, json, params);\n});\nexport function intersection(left, right) {\n return new ZodIntersection({\n type: \"intersection\",\n left: left,\n right: right,\n });\n}\nexport const ZodTuple = /*@__PURE__*/ core.$constructor(\"ZodTuple\", (inst, def) => {\n core.$ZodTuple.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.tupleProcessor(inst, ctx, json, params);\n inst.rest = (rest) => inst.clone({\n ...inst._zod.def,\n rest: rest,\n });\n});\nexport function tuple(items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof core.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new ZodTuple({\n type: \"tuple\",\n items: items,\n rest,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodRecord = /*@__PURE__*/ core.$constructor(\"ZodRecord\", (inst, def) => {\n core.$ZodRecord.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.recordProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n});\nexport function record(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\n// type alksjf = core.output;\nexport function partialRecord(keyType, valueType, params) {\n const k = core.clone(keyType);\n k._zod.values = undefined;\n return new ZodRecord({\n type: \"record\",\n keyType: k,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport function looseRecord(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n mode: \"loose\",\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMap = /*@__PURE__*/ core.$constructor(\"ZodMap\", (inst, def) => {\n core.$ZodMap.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.mapProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function map(keyType, valueType, params) {\n return new ZodMap({\n type: \"map\",\n keyType: keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSet = /*@__PURE__*/ core.$constructor(\"ZodSet\", (inst, def) => {\n core.$ZodSet.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.setProcessor(inst, ctx, json, params);\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function set(valueType, params) {\n return new ZodSet({\n type: \"set\",\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEnum = /*@__PURE__*/ core.$constructor(\"ZodEnum\", (inst, def) => {\n core.$ZodEnum.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.enumProcessor(inst, ctx, json, params);\n inst.enum = def.entries;\n inst.options = Object.values(def.entries);\n const keys = new Set(Object.keys(def.entries));\n inst.extract = (values, params) => {\n const newEntries = {};\n for (const value of values) {\n if (keys.has(value)) {\n newEntries[value] = def.entries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n inst.exclude = (values, params) => {\n const newEntries = { ...def.entries };\n for (const value of values) {\n if (keys.has(value)) {\n delete newEntries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n});\nfunction _enum(values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport { _enum as enum };\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function nativeEnum(entries, params) {\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLiteral = /*@__PURE__*/ core.$constructor(\"ZodLiteral\", (inst, def) => {\n core.$ZodLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.literalProcessor(inst, ctx, json, params);\n inst.values = new Set(def.values);\n Object.defineProperty(inst, \"value\", {\n get() {\n if (def.values.length > 1) {\n throw new Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");\n }\n return def.values[0];\n },\n });\n});\nexport function literal(value, params) {\n return new ZodLiteral({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\nexport const ZodFile = /*@__PURE__*/ core.$constructor(\"ZodFile\", (inst, def) => {\n core.$ZodFile.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.fileProcessor(inst, ctx, json, params);\n inst.min = (size, params) => inst.check(core._minSize(size, params));\n inst.max = (size, params) => inst.check(core._maxSize(size, params));\n inst.mime = (types, params) => inst.check(core._mime(Array.isArray(types) ? types : [types], params));\n});\nexport function file(params) {\n return core._file(ZodFile, params);\n}\nexport const ZodTransform = /*@__PURE__*/ core.$constructor(\"ZodTransform\", (inst, def) => {\n core.$ZodTransform.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.transformProcessor(inst, ctx, json, params);\n inst._zod.parse = (payload, _ctx) => {\n if (_ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n _issue.input ?? (_issue.input = payload.value);\n _issue.inst ?? (_issue.inst = inst);\n // _issue.continue ??= true;\n payload.issues.push(util.issue(_issue));\n }\n };\n const output = def.transform(payload.value, payload);\n if (output instanceof Promise) {\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n payload.value = output;\n return payload;\n };\n});\nexport function transform(fn) {\n return new ZodTransform({\n type: \"transform\",\n transform: fn,\n });\n}\nexport const ZodOptional = /*@__PURE__*/ core.$constructor(\"ZodOptional\", (inst, def) => {\n core.$ZodOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function optional(innerType) {\n return new ZodOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodExactOptional = /*@__PURE__*/ core.$constructor(\"ZodExactOptional\", (inst, def) => {\n core.$ZodExactOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function exactOptional(innerType) {\n return new ZodExactOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodNullable = /*@__PURE__*/ core.$constructor(\"ZodNullable\", (inst, def) => {\n core.$ZodNullable.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullableProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nullable(innerType) {\n return new ZodNullable({\n type: \"nullable\",\n innerType: innerType,\n });\n}\n// nullish\nexport function nullish(innerType) {\n return optional(nullable(innerType));\n}\nexport const ZodDefault = /*@__PURE__*/ core.$constructor(\"ZodDefault\", (inst, def) => {\n core.$ZodDefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.defaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeDefault = inst.unwrap;\n});\nexport function _default(innerType, defaultValue) {\n return new ZodDefault({\n type: \"default\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodPrefault = /*@__PURE__*/ core.$constructor(\"ZodPrefault\", (inst, def) => {\n core.$ZodPrefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.prefaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function prefault(innerType, defaultValue) {\n return new ZodPrefault({\n type: \"prefault\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodNonOptional = /*@__PURE__*/ core.$constructor(\"ZodNonOptional\", (inst, def) => {\n core.$ZodNonOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nonoptionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nonoptional(innerType, params) {\n return new ZodNonOptional({\n type: \"nonoptional\",\n innerType: innerType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSuccess = /*@__PURE__*/ core.$constructor(\"ZodSuccess\", (inst, def) => {\n core.$ZodSuccess.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.successProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function success(innerType) {\n return new ZodSuccess({\n type: \"success\",\n innerType: innerType,\n });\n}\nexport const ZodCatch = /*@__PURE__*/ core.$constructor(\"ZodCatch\", (inst, def) => {\n core.$ZodCatch.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.catchProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeCatch = inst.unwrap;\n});\nfunction _catch(innerType, catchValue) {\n return new ZodCatch({\n type: \"catch\",\n innerType: innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\nexport { _catch as catch };\nexport const ZodNaN = /*@__PURE__*/ core.$constructor(\"ZodNaN\", (inst, def) => {\n core.$ZodNaN.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nanProcessor(inst, ctx, json, params);\n});\nexport function nan(params) {\n return core._nan(ZodNaN, params);\n}\nexport const ZodPipe = /*@__PURE__*/ core.$constructor(\"ZodPipe\", (inst, def) => {\n core.$ZodPipe.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.pipeProcessor(inst, ctx, json, params);\n inst.in = def.in;\n inst.out = def.out;\n});\nexport function pipe(in_, out) {\n return new ZodPipe({\n type: \"pipe\",\n in: in_,\n out: out,\n // ...util.normalizeParams(params),\n });\n}\nexport const ZodCodec = /*@__PURE__*/ core.$constructor(\"ZodCodec\", (inst, def) => {\n ZodPipe.init(inst, def);\n core.$ZodCodec.init(inst, def);\n});\nexport function codec(in_, out, params) {\n return new ZodCodec({\n type: \"pipe\",\n in: in_,\n out: out,\n transform: params.decode,\n reverseTransform: params.encode,\n });\n}\nexport const ZodReadonly = /*@__PURE__*/ core.$constructor(\"ZodReadonly\", (inst, def) => {\n core.$ZodReadonly.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.readonlyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function readonly(innerType) {\n return new ZodReadonly({\n type: \"readonly\",\n innerType: innerType,\n });\n}\nexport const ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"ZodTemplateLiteral\", (inst, def) => {\n core.$ZodTemplateLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.templateLiteralProcessor(inst, ctx, json, params);\n});\nexport function templateLiteral(parts, params) {\n return new ZodTemplateLiteral({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLazy = /*@__PURE__*/ core.$constructor(\"ZodLazy\", (inst, def) => {\n core.$ZodLazy.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.lazyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.getter();\n});\nexport function lazy(getter) {\n return new ZodLazy({\n type: \"lazy\",\n getter: getter,\n });\n}\nexport const ZodPromise = /*@__PURE__*/ core.$constructor(\"ZodPromise\", (inst, def) => {\n core.$ZodPromise.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.promiseProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function promise(innerType) {\n return new ZodPromise({\n type: \"promise\",\n innerType: innerType,\n });\n}\nexport const ZodFunction = /*@__PURE__*/ core.$constructor(\"ZodFunction\", (inst, def) => {\n core.$ZodFunction.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.functionProcessor(inst, ctx, json, params);\n});\nexport function _function(params) {\n return new ZodFunction({\n type: \"function\",\n input: Array.isArray(params?.input) ? tuple(params?.input) : (params?.input ?? array(unknown())),\n output: params?.output ?? unknown(),\n });\n}\nexport { _function as function };\nexport const ZodCustom = /*@__PURE__*/ core.$constructor(\"ZodCustom\", (inst, def) => {\n core.$ZodCustom.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.customProcessor(inst, ctx, json, params);\n});\n// custom checks\nexport function check(fn) {\n const ch = new core.$ZodCheck({\n check: \"custom\",\n // ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\nexport function custom(fn, _params) {\n return core._custom(ZodCustom, fn ?? (() => true), _params);\n}\nexport function refine(fn, _params = {}) {\n return core._refine(ZodCustom, fn, _params);\n}\n// superRefine\nexport function superRefine(fn) {\n return core._superRefine(fn);\n}\n// Re-export describe and meta from core\nexport const describe = core.describe;\nexport const meta = core.meta;\nfunction _instanceof(cls, params = {}) {\n const inst = new ZodCustom({\n type: \"custom\",\n check: \"custom\",\n fn: (data) => data instanceof cls,\n abort: true,\n ...util.normalizeParams(params),\n });\n inst._zod.bag.Class = cls;\n // Override check to emit invalid_type instead of custom\n inst._zod.check = (payload) => {\n if (!(payload.value instanceof cls)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: cls.name,\n input: payload.value,\n inst,\n path: [...(inst._zod.def.path ?? [])],\n });\n }\n };\n return inst;\n}\nexport { _instanceof as instanceof };\n// stringbool\nexport const stringbool = (...args) => core._stringbool({\n Codec: ZodCodec,\n Boolean: ZodBoolean,\n String: ZodString,\n}, ...args);\nexport function json(params) {\n const jsonSchema = lazy(() => {\n return union([string(params), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);\n });\n return jsonSchema;\n}\n// preprocess\n// /** @deprecated Use `z.pipe()` and `z.transform()` instead. */\nexport function preprocess(fn, schema) {\n return pipe(transform(fn), schema);\n}\n", "export { _lt as lt, _lte as lte, _gt as gt, _gte as gte, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, _slugify as slugify, } from \"../core/index.js\";\n", "import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\nexport const ZodISODateTime = /*@__PURE__*/ core.$constructor(\"ZodISODateTime\", (inst, def) => {\n core.$ZodISODateTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function datetime(params) {\n return core._isoDateTime(ZodISODateTime, params);\n}\nexport const ZodISODate = /*@__PURE__*/ core.$constructor(\"ZodISODate\", (inst, def) => {\n core.$ZodISODate.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function date(params) {\n return core._isoDate(ZodISODate, params);\n}\nexport const ZodISOTime = /*@__PURE__*/ core.$constructor(\"ZodISOTime\", (inst, def) => {\n core.$ZodISOTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function time(params) {\n return core._isoTime(ZodISOTime, params);\n}\nexport const ZodISODuration = /*@__PURE__*/ core.$constructor(\"ZodISODuration\", (inst, def) => {\n core.$ZodISODuration.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function duration(params) {\n return core._isoDuration(ZodISODuration, params);\n}\n", "import * as core from \"../core/index.js\";\nimport { ZodRealError } from \"./errors.js\";\nexport const parse = /* @__PURE__ */ core._parse(ZodRealError);\nexport const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);\nexport const safeParse = /* @__PURE__ */ core._safeParse(ZodRealError);\nexport const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodRealError);\n// Codec functions\nexport const encode = /* @__PURE__ */ core._encode(ZodRealError);\nexport const decode = /* @__PURE__ */ core._decode(ZodRealError);\nexport const encodeAsync = /* @__PURE__ */ core._encodeAsync(ZodRealError);\nexport const decodeAsync = /* @__PURE__ */ core._decodeAsync(ZodRealError);\nexport const safeEncode = /* @__PURE__ */ core._safeEncode(ZodRealError);\nexport const safeDecode = /* @__PURE__ */ core._safeDecode(ZodRealError);\nexport const safeEncodeAsync = /* @__PURE__ */ core._safeEncodeAsync(ZodRealError);\nexport const safeDecodeAsync = /* @__PURE__ */ core._safeDecodeAsync(ZodRealError);\n", "import * as core from \"../core/index.js\";\nimport { $ZodError } from \"../core/index.js\";\nimport * as util from \"../core/util.js\";\nconst initializer = (inst, issues) => {\n $ZodError.init(inst, issues);\n inst.name = \"ZodError\";\n Object.defineProperties(inst, {\n format: {\n value: (mapper) => core.formatError(inst, mapper),\n // enumerable: false,\n },\n flatten: {\n value: (mapper) => core.flattenError(inst, mapper),\n // enumerable: false,\n },\n addIssue: {\n value: (issue) => {\n inst.issues.push(issue);\n inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);\n },\n // enumerable: false,\n },\n addIssues: {\n value: (issues) => {\n inst.issues.push(...issues);\n inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);\n },\n // enumerable: false,\n },\n isEmpty: {\n get() {\n return inst.issues.length === 0;\n },\n // enumerable: false,\n },\n });\n // Object.defineProperty(inst, \"isEmpty\", {\n // get() {\n // return inst.issues.length === 0;\n // },\n // });\n};\nexport const ZodError = core.$constructor(\"ZodError\", initializer);\nexport const ZodRealError = core.$constructor(\"ZodError\", initializer, {\n Parent: Error,\n});\n// /** @deprecated Use `z.core.$ZodErrorMapCtx` instead. */\n// export type ErrorMapCtx = core.$ZodErrorMapCtx;\n", "// Zod 3 compat layer\nimport * as core from \"../core/index.js\";\n/** @deprecated Use the raw string literal codes instead, e.g. \"invalid_type\". */\nexport const ZodIssueCode = {\n invalid_type: \"invalid_type\",\n too_big: \"too_big\",\n too_small: \"too_small\",\n invalid_format: \"invalid_format\",\n not_multiple_of: \"not_multiple_of\",\n unrecognized_keys: \"unrecognized_keys\",\n invalid_union: \"invalid_union\",\n invalid_key: \"invalid_key\",\n invalid_element: \"invalid_element\",\n invalid_value: \"invalid_value\",\n custom: \"custom\",\n};\nexport { $brand, config } from \"../core/index.js\";\n/** @deprecated Use `z.config(params)` instead. */\nexport function setErrorMap(map) {\n core.config({\n customError: map,\n });\n}\n/** @deprecated Use `z.config()` instead. */\nexport function getErrorMap() {\n return core.config().customError;\n}\n/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */\nexport var ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\n", "import { globalRegistry } from \"../core/registries.js\";\nimport * as _checks from \"./checks.js\";\nimport * as _iso from \"./iso.js\";\nimport * as _schemas from \"./schemas.js\";\n// Local z object to avoid circular dependency with ../index.js\nconst z = {\n ..._schemas,\n ..._checks,\n iso: _iso,\n};\n// Keys that are recognized and handled by the conversion logic\nconst RECOGNIZED_KEYS = new Set([\n // Schema identification\n \"$schema\",\n \"$ref\",\n \"$defs\",\n \"definitions\",\n // Core schema keywords\n \"$id\",\n \"id\",\n \"$comment\",\n \"$anchor\",\n \"$vocabulary\",\n \"$dynamicRef\",\n \"$dynamicAnchor\",\n // Type\n \"type\",\n \"enum\",\n \"const\",\n // Composition\n \"anyOf\",\n \"oneOf\",\n \"allOf\",\n \"not\",\n // Object\n \"properties\",\n \"required\",\n \"additionalProperties\",\n \"patternProperties\",\n \"propertyNames\",\n \"minProperties\",\n \"maxProperties\",\n // Array\n \"items\",\n \"prefixItems\",\n \"additionalItems\",\n \"minItems\",\n \"maxItems\",\n \"uniqueItems\",\n \"contains\",\n \"minContains\",\n \"maxContains\",\n // String\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"format\",\n // Number\n \"minimum\",\n \"maximum\",\n \"exclusiveMinimum\",\n \"exclusiveMaximum\",\n \"multipleOf\",\n // Already handled metadata\n \"description\",\n \"default\",\n // Content\n \"contentEncoding\",\n \"contentMediaType\",\n \"contentSchema\",\n // Unsupported (error-throwing)\n \"unevaluatedItems\",\n \"unevaluatedProperties\",\n \"if\",\n \"then\",\n \"else\",\n \"dependentSchemas\",\n \"dependentRequired\",\n // OpenAPI\n \"nullable\",\n \"readOnly\",\n]);\nfunction detectVersion(schema, defaultTarget) {\n const $schema = schema.$schema;\n if ($schema === \"https://json-schema.org/draft/2020-12/schema\") {\n return \"draft-2020-12\";\n }\n if ($schema === \"http://json-schema.org/draft-07/schema#\") {\n return \"draft-7\";\n }\n if ($schema === \"http://json-schema.org/draft-04/schema#\") {\n return \"draft-4\";\n }\n // Use defaultTarget if provided, otherwise default to draft-2020-12\n return defaultTarget ?? \"draft-2020-12\";\n}\nfunction resolveRef(ref, ctx) {\n if (!ref.startsWith(\"#\")) {\n throw new Error(\"External $ref is not supported, only local refs (#/...) are allowed\");\n }\n const path = ref.slice(1).split(\"/\").filter(Boolean);\n // Handle root reference \"#\"\n if (path.length === 0) {\n return ctx.rootSchema;\n }\n const defsKey = ctx.version === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (path[0] === defsKey) {\n const key = path[1];\n if (!key || !ctx.defs[key]) {\n throw new Error(`Reference not found: ${ref}`);\n }\n return ctx.defs[key];\n }\n throw new Error(`Reference not found: ${ref}`);\n}\nfunction convertBaseSchema(schema, ctx) {\n // Handle unsupported features\n if (schema.not !== undefined) {\n // Special case: { not: {} } represents never\n if (typeof schema.not === \"object\" && Object.keys(schema.not).length === 0) {\n return z.never();\n }\n throw new Error(\"not is not supported in Zod (except { not: {} } for never)\");\n }\n if (schema.unevaluatedItems !== undefined) {\n throw new Error(\"unevaluatedItems is not supported\");\n }\n if (schema.unevaluatedProperties !== undefined) {\n throw new Error(\"unevaluatedProperties is not supported\");\n }\n if (schema.if !== undefined || schema.then !== undefined || schema.else !== undefined) {\n throw new Error(\"Conditional schemas (if/then/else) are not supported\");\n }\n if (schema.dependentSchemas !== undefined || schema.dependentRequired !== undefined) {\n throw new Error(\"dependentSchemas and dependentRequired are not supported\");\n }\n // Handle $ref\n if (schema.$ref) {\n const refPath = schema.$ref;\n if (ctx.refs.has(refPath)) {\n return ctx.refs.get(refPath);\n }\n if (ctx.processing.has(refPath)) {\n // Circular reference - use lazy\n return z.lazy(() => {\n if (!ctx.refs.has(refPath)) {\n throw new Error(`Circular reference not resolved: ${refPath}`);\n }\n return ctx.refs.get(refPath);\n });\n }\n ctx.processing.add(refPath);\n const resolved = resolveRef(refPath, ctx);\n const zodSchema = convertSchema(resolved, ctx);\n ctx.refs.set(refPath, zodSchema);\n ctx.processing.delete(refPath);\n return zodSchema;\n }\n // Handle enum\n if (schema.enum !== undefined) {\n const enumValues = schema.enum;\n // Special case: OpenAPI 3.0 null representation { type: \"string\", nullable: true, enum: [null] }\n if (ctx.version === \"openapi-3.0\" &&\n schema.nullable === true &&\n enumValues.length === 1 &&\n enumValues[0] === null) {\n return z.null();\n }\n if (enumValues.length === 0) {\n return z.never();\n }\n if (enumValues.length === 1) {\n return z.literal(enumValues[0]);\n }\n // Check if all values are strings\n if (enumValues.every((v) => typeof v === \"string\")) {\n return z.enum(enumValues);\n }\n // Mixed types - use union of literals\n const literalSchemas = enumValues.map((v) => z.literal(v));\n if (literalSchemas.length < 2) {\n return literalSchemas[0];\n }\n return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);\n }\n // Handle const\n if (schema.const !== undefined) {\n return z.literal(schema.const);\n }\n // Handle type\n const type = schema.type;\n if (Array.isArray(type)) {\n // Expand type array into anyOf union\n const typeSchemas = type.map((t) => {\n const typeSchema = { ...schema, type: t };\n return convertBaseSchema(typeSchema, ctx);\n });\n if (typeSchemas.length === 0) {\n return z.never();\n }\n if (typeSchemas.length === 1) {\n return typeSchemas[0];\n }\n return z.union(typeSchemas);\n }\n if (!type) {\n // No type specified - empty schema (any)\n return z.any();\n }\n let zodSchema;\n switch (type) {\n case \"string\": {\n let stringSchema = z.string();\n // Apply format using .check() with Zod format functions\n if (schema.format) {\n const format = schema.format;\n // Map common formats to Zod check functions\n if (format === \"email\") {\n stringSchema = stringSchema.check(z.email());\n }\n else if (format === \"uri\" || format === \"uri-reference\") {\n stringSchema = stringSchema.check(z.url());\n }\n else if (format === \"uuid\" || format === \"guid\") {\n stringSchema = stringSchema.check(z.uuid());\n }\n else if (format === \"date-time\") {\n stringSchema = stringSchema.check(z.iso.datetime());\n }\n else if (format === \"date\") {\n stringSchema = stringSchema.check(z.iso.date());\n }\n else if (format === \"time\") {\n stringSchema = stringSchema.check(z.iso.time());\n }\n else if (format === \"duration\") {\n stringSchema = stringSchema.check(z.iso.duration());\n }\n else if (format === \"ipv4\") {\n stringSchema = stringSchema.check(z.ipv4());\n }\n else if (format === \"ipv6\") {\n stringSchema = stringSchema.check(z.ipv6());\n }\n else if (format === \"mac\") {\n stringSchema = stringSchema.check(z.mac());\n }\n else if (format === \"cidr\") {\n stringSchema = stringSchema.check(z.cidrv4());\n }\n else if (format === \"cidr-v6\") {\n stringSchema = stringSchema.check(z.cidrv6());\n }\n else if (format === \"base64\") {\n stringSchema = stringSchema.check(z.base64());\n }\n else if (format === \"base64url\") {\n stringSchema = stringSchema.check(z.base64url());\n }\n else if (format === \"e164\") {\n stringSchema = stringSchema.check(z.e164());\n }\n else if (format === \"jwt\") {\n stringSchema = stringSchema.check(z.jwt());\n }\n else if (format === \"emoji\") {\n stringSchema = stringSchema.check(z.emoji());\n }\n else if (format === \"nanoid\") {\n stringSchema = stringSchema.check(z.nanoid());\n }\n else if (format === \"cuid\") {\n stringSchema = stringSchema.check(z.cuid());\n }\n else if (format === \"cuid2\") {\n stringSchema = stringSchema.check(z.cuid2());\n }\n else if (format === \"ulid\") {\n stringSchema = stringSchema.check(z.ulid());\n }\n else if (format === \"xid\") {\n stringSchema = stringSchema.check(z.xid());\n }\n else if (format === \"ksuid\") {\n stringSchema = stringSchema.check(z.ksuid());\n }\n // Note: json-string format is not currently supported by Zod\n // Custom formats are ignored - keep as plain string\n }\n // Apply constraints\n if (typeof schema.minLength === \"number\") {\n stringSchema = stringSchema.min(schema.minLength);\n }\n if (typeof schema.maxLength === \"number\") {\n stringSchema = stringSchema.max(schema.maxLength);\n }\n if (schema.pattern) {\n // JSON Schema patterns are not implicitly anchored (match anywhere in string)\n stringSchema = stringSchema.regex(new RegExp(schema.pattern));\n }\n zodSchema = stringSchema;\n break;\n }\n case \"number\":\n case \"integer\": {\n let numberSchema = type === \"integer\" ? z.number().int() : z.number();\n // Apply constraints\n if (typeof schema.minimum === \"number\") {\n numberSchema = numberSchema.min(schema.minimum);\n }\n if (typeof schema.maximum === \"number\") {\n numberSchema = numberSchema.max(schema.maximum);\n }\n if (typeof schema.exclusiveMinimum === \"number\") {\n numberSchema = numberSchema.gt(schema.exclusiveMinimum);\n }\n else if (schema.exclusiveMinimum === true && typeof schema.minimum === \"number\") {\n numberSchema = numberSchema.gt(schema.minimum);\n }\n if (typeof schema.exclusiveMaximum === \"number\") {\n numberSchema = numberSchema.lt(schema.exclusiveMaximum);\n }\n else if (schema.exclusiveMaximum === true && typeof schema.maximum === \"number\") {\n numberSchema = numberSchema.lt(schema.maximum);\n }\n if (typeof schema.multipleOf === \"number\") {\n numberSchema = numberSchema.multipleOf(schema.multipleOf);\n }\n zodSchema = numberSchema;\n break;\n }\n case \"boolean\": {\n zodSchema = z.boolean();\n break;\n }\n case \"null\": {\n zodSchema = z.null();\n break;\n }\n case \"object\": {\n const shape = {};\n const properties = schema.properties || {};\n const requiredSet = new Set(schema.required || []);\n // Convert properties - mark optional ones\n for (const [key, propSchema] of Object.entries(properties)) {\n const propZodSchema = convertSchema(propSchema, ctx);\n // If not in required array, make it optional\n shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional();\n }\n // Handle propertyNames\n if (schema.propertyNames) {\n const keySchema = convertSchema(schema.propertyNames, ctx);\n const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === \"object\"\n ? convertSchema(schema.additionalProperties, ctx)\n : z.any();\n // Case A: No properties (pure record)\n if (Object.keys(shape).length === 0) {\n zodSchema = z.record(keySchema, valueSchema);\n break;\n }\n // Case B: With properties (intersection of object and looseRecord)\n const objectSchema = z.object(shape).passthrough();\n const recordSchema = z.looseRecord(keySchema, valueSchema);\n zodSchema = z.intersection(objectSchema, recordSchema);\n break;\n }\n // Handle patternProperties\n if (schema.patternProperties) {\n // patternProperties: keys matching pattern must satisfy corresponding schema\n // Use loose records so non-matching keys pass through\n const patternProps = schema.patternProperties;\n const patternKeys = Object.keys(patternProps);\n const looseRecords = [];\n for (const pattern of patternKeys) {\n const patternValue = convertSchema(patternProps[pattern], ctx);\n const keySchema = z.string().regex(new RegExp(pattern));\n looseRecords.push(z.looseRecord(keySchema, patternValue));\n }\n // Build intersection: object schema + all pattern property records\n const schemasToIntersect = [];\n if (Object.keys(shape).length > 0) {\n // Use passthrough so patternProperties can validate additional keys\n schemasToIntersect.push(z.object(shape).passthrough());\n }\n schemasToIntersect.push(...looseRecords);\n if (schemasToIntersect.length === 0) {\n zodSchema = z.object({}).passthrough();\n }\n else if (schemasToIntersect.length === 1) {\n zodSchema = schemasToIntersect[0];\n }\n else {\n // Chain intersections: (A & B) & C & D ...\n let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);\n for (let i = 2; i < schemasToIntersect.length; i++) {\n result = z.intersection(result, schemasToIntersect[i]);\n }\n zodSchema = result;\n }\n break;\n }\n // Handle additionalProperties\n // In JSON Schema, additionalProperties defaults to true (allow any extra properties)\n // In Zod, objects strip unknown keys by default, so we need to handle this explicitly\n const objectSchema = z.object(shape);\n if (schema.additionalProperties === false) {\n // Strict mode - no extra properties allowed\n zodSchema = objectSchema.strict();\n }\n else if (typeof schema.additionalProperties === \"object\") {\n // Extra properties must match the specified schema\n zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));\n }\n else {\n // additionalProperties is true or undefined - allow any extra properties (passthrough)\n zodSchema = objectSchema.passthrough();\n }\n break;\n }\n case \"array\": {\n // TODO: uniqueItems is not supported\n // TODO: contains/minContains/maxContains are not supported\n // Check if this is a tuple (prefixItems or items as array)\n const prefixItems = schema.prefixItems;\n const items = schema.items;\n if (prefixItems && Array.isArray(prefixItems)) {\n // Tuple with prefixItems (draft-2020-12)\n const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));\n const rest = items && typeof items === \"object\" && !Array.isArray(items)\n ? convertSchema(items, ctx)\n : undefined;\n if (rest) {\n zodSchema = z.tuple(tupleItems).rest(rest);\n }\n else {\n zodSchema = z.tuple(tupleItems);\n }\n // Apply minItems/maxItems constraints to tuples\n if (typeof schema.minItems === \"number\") {\n zodSchema = zodSchema.check(z.minLength(schema.minItems));\n }\n if (typeof schema.maxItems === \"number\") {\n zodSchema = zodSchema.check(z.maxLength(schema.maxItems));\n }\n }\n else if (Array.isArray(items)) {\n // Tuple with items array (draft-7)\n const tupleItems = items.map((item) => convertSchema(item, ctx));\n const rest = schema.additionalItems && typeof schema.additionalItems === \"object\"\n ? convertSchema(schema.additionalItems, ctx)\n : undefined; // additionalItems: false means no rest, handled by default tuple behavior\n if (rest) {\n zodSchema = z.tuple(tupleItems).rest(rest);\n }\n else {\n zodSchema = z.tuple(tupleItems);\n }\n // Apply minItems/maxItems constraints to tuples\n if (typeof schema.minItems === \"number\") {\n zodSchema = zodSchema.check(z.minLength(schema.minItems));\n }\n if (typeof schema.maxItems === \"number\") {\n zodSchema = zodSchema.check(z.maxLength(schema.maxItems));\n }\n }\n else if (items !== undefined) {\n // Regular array\n const element = convertSchema(items, ctx);\n let arraySchema = z.array(element);\n // Apply constraints\n if (typeof schema.minItems === \"number\") {\n arraySchema = arraySchema.min(schema.minItems);\n }\n if (typeof schema.maxItems === \"number\") {\n arraySchema = arraySchema.max(schema.maxItems);\n }\n zodSchema = arraySchema;\n }\n else {\n // No items specified - array of any\n zodSchema = z.array(z.any());\n }\n break;\n }\n default:\n throw new Error(`Unsupported type: ${type}`);\n }\n // Apply metadata\n if (schema.description) {\n zodSchema = zodSchema.describe(schema.description);\n }\n if (schema.default !== undefined) {\n zodSchema = zodSchema.default(schema.default);\n }\n return zodSchema;\n}\nfunction convertSchema(schema, ctx) {\n if (typeof schema === \"boolean\") {\n return schema ? z.any() : z.never();\n }\n // Convert base schema first (ignoring composition keywords)\n let baseSchema = convertBaseSchema(schema, ctx);\n const hasExplicitType = schema.type || schema.enum !== undefined || schema.const !== undefined;\n // Process composition keywords LAST (they can appear together)\n // Handle anyOf - wrap base schema with union\n if (schema.anyOf && Array.isArray(schema.anyOf)) {\n const options = schema.anyOf.map((s) => convertSchema(s, ctx));\n const anyOfUnion = z.union(options);\n baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion;\n }\n // Handle oneOf - exclusive union (exactly one must match)\n if (schema.oneOf && Array.isArray(schema.oneOf)) {\n const options = schema.oneOf.map((s) => convertSchema(s, ctx));\n const oneOfUnion = z.xor(options);\n baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion;\n }\n // Handle allOf - wrap base schema with intersection\n if (schema.allOf && Array.isArray(schema.allOf)) {\n if (schema.allOf.length === 0) {\n baseSchema = hasExplicitType ? baseSchema : z.any();\n }\n else {\n let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);\n const startIdx = hasExplicitType ? 0 : 1;\n for (let i = startIdx; i < schema.allOf.length; i++) {\n result = z.intersection(result, convertSchema(schema.allOf[i], ctx));\n }\n baseSchema = result;\n }\n }\n // Handle nullable (OpenAPI 3.0)\n if (schema.nullable === true && ctx.version === \"openapi-3.0\") {\n baseSchema = z.nullable(baseSchema);\n }\n // Handle readOnly\n if (schema.readOnly === true) {\n baseSchema = z.readonly(baseSchema);\n }\n // Collect metadata: core schema keywords and unrecognized keys\n const extraMeta = {};\n // Core schema keywords that should be captured as metadata\n const coreMetadataKeys = [\"$id\", \"id\", \"$comment\", \"$anchor\", \"$vocabulary\", \"$dynamicRef\", \"$dynamicAnchor\"];\n for (const key of coreMetadataKeys) {\n if (key in schema) {\n extraMeta[key] = schema[key];\n }\n }\n // Content keywords - store as metadata\n const contentMetadataKeys = [\"contentEncoding\", \"contentMediaType\", \"contentSchema\"];\n for (const key of contentMetadataKeys) {\n if (key in schema) {\n extraMeta[key] = schema[key];\n }\n }\n // Unrecognized keys (custom metadata)\n for (const key of Object.keys(schema)) {\n if (!RECOGNIZED_KEYS.has(key)) {\n extraMeta[key] = schema[key];\n }\n }\n if (Object.keys(extraMeta).length > 0) {\n ctx.registry.add(baseSchema, extraMeta);\n }\n return baseSchema;\n}\n/**\n * Converts a JSON Schema to a Zod schema. This function should be considered semi-experimental. It's behavior is liable to change. */\nexport function fromJSONSchema(schema, params) {\n // Handle boolean schemas\n if (typeof schema === \"boolean\") {\n return schema ? z.any() : z.never();\n }\n const version = detectVersion(schema, params?.defaultTarget);\n const defs = (schema.$defs || schema.definitions || {});\n const ctx = {\n version,\n defs,\n refs: new Map(),\n processing: new Set(),\n rootSchema: schema,\n registry: params?.registry ?? globalRegistry,\n };\n return convertSchema(schema, ctx);\n}\n", "import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\nexport function string(params) {\n return core._coercedString(schemas.ZodString, params);\n}\nexport function number(params) {\n return core._coercedNumber(schemas.ZodNumber, params);\n}\nexport function boolean(params) {\n return core._coercedBoolean(schemas.ZodBoolean, params);\n}\nexport function bigint(params) {\n return core._coercedBigint(schemas.ZodBigInt, params);\n}\nexport function date(params) {\n return core._coercedDate(schemas.ZodDate, params);\n}\n", "// import { router } from '@/src/trpc/trpc-index';\nimport { router } from '@/src/trpc/trpc-index'\nimport { complaintRouter } from '@/src/trpc/apis/admin-apis/apis/complaint'\nimport { couponRouter } from '@/src/trpc/apis/admin-apis/apis/coupon'\nimport { orderRouter } from '@/src/trpc/apis/admin-apis/apis/order'\nimport { vendorSnippetsRouter } from '@/src/trpc/apis/admin-apis/apis/vendor-snippets'\nimport { slotsRouter } from '@/src/trpc/apis/admin-apis/apis/slots'\nimport { productRouter } from '@/src/trpc/apis/admin-apis/apis/product'\nimport { staffUserRouter } from '@/src/trpc/apis/admin-apis/apis/staff-user'\nimport { storeRouter } from '@/src/trpc/apis/admin-apis/apis/store'\nimport { adminPaymentsRouter } from '@/src/trpc/apis/admin-apis/apis/payments'\nimport { bannerRouter } from '@/src/trpc/apis/admin-apis/apis/banner'\nimport { userRouter } from '@/src/trpc/apis/admin-apis/apis/user'\nimport { constRouter } from '@/src/trpc/apis/admin-apis/apis/const'\n\nexport const adminRouter = router({\n complaint: complaintRouter,\n coupon: couponRouter,\n order: orderRouter,\n vendorSnippets: vendorSnippetsRouter,\n slots: slotsRouter,\n product: productRouter,\n staffUser: staffUserRouter,\n store: storeRouter,\n payments: adminPaymentsRouter,\n banner: bannerRouter,\n user: userRouter,\n const: constRouter,\n});\n\nexport type AdminRouter = typeof adminRouter;\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport { generateSignedUrlsFromS3Urls } from '@/src/lib/s3-client'\nimport { getComplaints as getComplaintsFromDb, resolveComplaint as resolveComplaintInDb } from '@/src/dbService'\nimport type { ComplaintWithUser } from '@packages/shared'\n\nexport const complaintRouter = router({\n getAll: protectedProcedure\n .input(z.object({\n cursor: z.number().optional(),\n limit: z.number().default(20),\n }))\n .query(async ({ input }): Promise<{\n complaints: Array<{\n id: number;\n text: string;\n userId: number;\n userName: string | null;\n userMobile: string | null;\n orderId: number | null;\n status: string;\n createdAt: Date;\n images: string[];\n }>;\n nextCursor?: number;\n }> => {\n const { cursor, limit } = input;\n\n // Using dbService helper (new implementation)\n const { complaints: complaintsData, hasMore } = await getComplaintsFromDb(cursor, limit);\n\n /*\n // Old implementation - direct DB query:\n const { cursor, limit } = input;\n\n let whereCondition = cursor \n ? lt(complaints.id, cursor) \n : undefined;\n\n const complaintsData = await db\n .select({\n id: complaints.id,\n complaintBody: complaints.complaintBody,\n userId: complaints.userId,\n orderId: complaints.orderId,\n isResolved: complaints.isResolved,\n createdAt: complaints.createdAt,\n userName: users.name,\n userMobile: users.mobile,\n images: complaints.images,\n })\n .from(complaints)\n .leftJoin(users, eq(complaints.userId, users.id))\n .where(whereCondition)\n .orderBy(desc(complaints.id))\n .limit(limit + 1);\n\n const hasMore = complaintsData.length > limit;\n const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData;\n */\n\n const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData;\n\n const complaintsWithSignedImages = await Promise.all(\n complaintsToReturn.map(async (c: ComplaintWithUser) => {\n const signedImages = c.images\n ? await generateSignedUrlsFromS3Urls(c.images as string[])\n : [];\n\n return {\n id: c.id,\n text: c.complaintBody,\n userId: c.userId,\n userName: c.userName,\n userMobile: c.userMobile,\n orderId: c.orderId,\n status: c.isResolved ? 'resolved' : 'pending',\n createdAt: c.createdAt,\n images: signedImages,\n };\n })\n );\n\n return {\n complaints: complaintsWithSignedImages,\n nextCursor: hasMore\n ? complaintsToReturn[complaintsToReturn.length - 1].id\n : undefined,\n };\n }),\n\n resolve: protectedProcedure\n .input(z.object({ id: z.string(), response: z.string().optional() }))\n .mutation(async ({ input }): Promise<{ message: string }> => {\n // Using dbService helper (new implementation)\n await resolveComplaintInDb(parseInt(input.id), input.response);\n\n /*\n // Old implementation - direct DB query:\n await db\n .update(complaints)\n .set({ isResolved: true, response: input.response })\n .where(eq(complaints.id, parseInt(input.id)));\n */\n\n return { message: 'Complaint resolved successfully' };\n }),\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport dayjs from 'dayjs';\nimport {\n // Batch 1 - Non-transaction methods\n getAllCoupons as getAllCouponsFromDb,\n getCouponById as getCouponByIdFromDb,\n invalidateCoupon as invalidateCouponInDb,\n validateCoupon as validateCouponInDb,\n getReservedCoupons as getReservedCouponsFromDb,\n getUsersForCoupon as getUsersForCouponFromDb,\n // Batch 2 - Transaction methods\n createCouponWithRelations,\n updateCouponWithRelations,\n generateCancellationCoupon,\n createReservedCouponWithProducts,\n createCouponForUser,\n checkUsersExist,\n checkCouponExists,\n checkReservedCouponExists,\n getOrderWithUser,\n} from '@/src/dbService'\nimport type { Coupon, CouponValidationResult, UserMiniInfo } from '@packages/shared'\n\nconst createCouponBodySchema = z.object({\n couponCode: z.string().optional(),\n isUserBased: z.boolean().optional(),\n discountPercent: z.number().optional(),\n flatDiscount: z.number().optional(),\n minOrder: z.number().optional(),\n targetUser: z.number().optional(),\n productIds: z.array(z.number()).optional().nullable(),\n applicableUsers: z.array(z.number()).optional(),\n applicableProducts: z.array(z.number()).optional(),\n maxValue: z.number().optional(),\n isApplyForAll: z.boolean().optional(),\n validTill: z.string().optional(),\n maxLimitForUser: z.number().optional(),\n exclusiveApply: z.boolean().optional(),\n});\n\nconst validateCouponBodySchema = z.object({\n code: z.string(),\n userId: z.number(),\n orderAmount: z.number(),\n});\n\nexport const couponRouter = router({\n create: protectedProcedure\n .input(createCouponBodySchema)\n .mutation(async ({ input, ctx }): Promise => {\n const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableUsers, applicableProducts, maxValue, isApplyForAll, validTill, maxLimitForUser, exclusiveApply } = input;\n\n // Validation: ensure at least one discount type is provided\n if ((!discountPercent && !flatDiscount) || (discountPercent && flatDiscount)) {\n throw new Error(\"Either discountPercent or flatDiscount must be provided (but not both)\");\n }\n\n // If user-based, applicableUsers is required (unless it's apply for all)\n if (isUserBased && (!applicableUsers || applicableUsers.length === 0) && !isApplyForAll) {\n throw new Error(\"applicableUsers is required for user-based coupons (or set isApplyForAll to true)\");\n }\n\n // Cannot be both user-based and apply for all\n if (isUserBased && isApplyForAll) {\n throw new Error(\"Cannot be both user-based and apply for all users\");\n }\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n\n // Generate coupon code if not provided\n let finalCouponCode = couponCode;\n if (!finalCouponCode) {\n const timestamp = Date.now().toString().slice(-6);\n const random = Math.random().toString(36).substring(2, 8).toUpperCase();\n finalCouponCode = `MF${timestamp}${random}`;\n }\n\n // Using dbService helper (new implementation)\n const codeExists = await checkCouponExists(finalCouponCode);\n if (codeExists) {\n throw new Error(\"Coupon code already exists\");\n }\n\n // If applicableUsers is provided, verify users exist\n if (applicableUsers && applicableUsers.length > 0) {\n const usersExist = await checkUsersExist(applicableUsers);\n if (!usersExist) {\n throw new Error(\"Some applicable users not found\");\n }\n }\n\n const coupon = await createCouponWithRelations(\n {\n couponCode: finalCouponCode,\n isUserBased: isUserBased || false,\n discountPercent: discountPercent?.toString(),\n flatDiscount: flatDiscount?.toString(),\n minOrder: minOrder?.toString(),\n productIds: productIds || null,\n createdBy: staffUserId,\n maxValue: maxValue?.toString(),\n isApplyForAll: isApplyForAll || false,\n validTill: validTill ? dayjs(validTill).toDate() : undefined,\n maxLimitForUser,\n exclusiveApply: exclusiveApply || false,\n },\n applicableUsers,\n applicableProducts\n );\n\n /*\n // Old implementation - direct DB query with transaction:\n const result = await db.insert(coupons).values({\n couponCode: finalCouponCode,\n isUserBased: isUserBased || false,\n discountPercent: discountPercent?.toString(),\n flatDiscount: flatDiscount?.toString(),\n minOrder: minOrder?.toString(),\n productIds: productIds || null,\n createdBy: staffUserId,\n maxValue: maxValue?.toString(),\n isApplyForAll: isApplyForAll || false,\n validTill: validTill ? dayjs(validTill).toDate() : undefined,\n maxLimitForUser,\n exclusiveApply: exclusiveApply || false,\n }).returning();\n\n const coupon = result[0];\n\n // Insert applicable users\n if (applicableUsers && applicableUsers.length > 0) {\n await db.insert(couponApplicableUsers).values(\n applicableUsers.map(userId => ({\n couponId: coupon.id,\n userId,\n }))\n );\n }\n\n // Insert applicable products\n if (applicableProducts && applicableProducts.length > 0) {\n await db.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: coupon.id,\n productId,\n }))\n );\n }\n */\n\n return coupon;\n }),\n\n getAll: protectedProcedure\n .input(z.object({\n cursor: z.number().optional(),\n limit: z.number().default(50),\n search: z.string().optional(),\n }))\n .query(async ({ input }): Promise<{ coupons: any[]; nextCursor?: number }> => {\n const { cursor, limit, search } = input;\n \n const { coupons: couponsList, hasMore } = await getAllCouponsFromDb(cursor, limit, search);\n\n const nextCursor = hasMore ? couponsList[couponsList.length - 1].id : undefined;\n \n return { coupons: couponsList, nextCursor };\n }),\n\n getById: protectedProcedure\n .input(z.object({ id: z.number() }))\n .query(async ({ input }): Promise => {\n const couponId = input.id;\n\n const result = await getCouponByIdFromDb(couponId);\n\n if (!result) {\n throw new Error(\"Coupon not found\");\n }\n\n return {\n ...result,\n productIds: (result.productIds as number[]) || undefined,\n applicableUsers: result.applicableUsers.map((au: any) => au.user),\n applicableProducts: result.applicableProducts.map((ap: any) => ap.product),\n };\n }),\n\n update: protectedProcedure\n .input(z.object({\n id: z.number(),\n updates: createCouponBodySchema.extend({\n isInvalidated: z.boolean().optional(),\n }),\n }))\n .mutation(async ({ input }): Promise => {\n const { id, updates } = input;\n\n // Validation: ensure discount types are valid\n if (updates.discountPercent !== undefined && updates.flatDiscount !== undefined) {\n if (updates.discountPercent && updates.flatDiscount) {\n throw new Error(\"Cannot have both discountPercent and flatDiscount\");\n }\n }\n\n // Prepare update data\n const updateData: any = {};\n if (updates.couponCode !== undefined) updateData.couponCode = updates.couponCode;\n if (updates.isUserBased !== undefined) updateData.isUserBased = updates.isUserBased;\n if (updates.discountPercent !== undefined) updateData.discountPercent = updates.discountPercent?.toString();\n if (updates.flatDiscount !== undefined) updateData.flatDiscount = updates.flatDiscount?.toString();\n if (updates.minOrder !== undefined) updateData.minOrder = updates.minOrder?.toString();\n if (updates.maxValue !== undefined) updateData.maxValue = updates.maxValue?.toString();\n if (updates.isApplyForAll !== undefined) updateData.isApplyForAll = updates.isApplyForAll;\n if (updates.validTill !== undefined) updateData.validTill = updates.validTill ? dayjs(updates.validTill).toDate() : null;\n if (updates.maxLimitForUser !== undefined) updateData.maxLimitForUser = updates.maxLimitForUser;\n if (updates.exclusiveApply !== undefined) updateData.exclusiveApply = updates.exclusiveApply;\n if (updates.isInvalidated !== undefined) updateData.isInvalidated = updates.isInvalidated;\n if (updates.productIds !== undefined) updateData.productIds = updates.productIds;\n\n // Using dbService helper (new implementation)\n const coupon = await updateCouponWithRelations(\n id,\n updateData,\n updates.applicableUsers,\n updates.applicableProducts\n );\n\n /*\n // Old implementation - direct DB query:\n const result = await db.update(coupons)\n .set(updateData)\n .where(eq(coupons.id, id))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Coupon not found\");\n }\n\n // Update applicable users: delete existing and insert new\n if (updates.applicableUsers !== undefined) {\n await db.delete(couponApplicableUsers).where(eq(couponApplicableUsers.couponId, id));\n if (updates.applicableUsers.length > 0) {\n await db.insert(couponApplicableUsers).values(\n updates.applicableUsers.map(userId => ({\n couponId: id,\n userId,\n }))\n );\n }\n }\n\n // Update applicable products: delete existing and insert new\n if (updates.applicableProducts !== undefined) {\n await db.delete(couponApplicableProducts).where(eq(couponApplicableProducts.couponId, id));\n if (updates.applicableProducts.length > 0) {\n await db.insert(couponApplicableProducts).values(\n updates.applicableProducts.map(productId => ({\n couponId: id,\n productId,\n }))\n );\n }\n }\n */\n\n return coupon;\n }),\n\n delete: protectedProcedure\n .input(z.object({ id: z.number() }))\n .mutation(async ({ input }): Promise<{ message: string }> => {\n const { id } = input;\n\n await invalidateCouponInDb(id);\n\n return { message: \"Coupon invalidated successfully\" };\n }),\n\n validate: protectedProcedure\n .input(validateCouponBodySchema)\n .query(async ({ input }): Promise => {\n const { code, userId, orderAmount } = input;\n\n if (!code || typeof code !== 'string') {\n return { valid: false, message: \"Invalid coupon code\" };\n }\n\n const result = await validateCouponInDb(code, userId, orderAmount);\n\n return result;\n }),\n\n generateCancellationCoupon: protectedProcedure\n .input(\n z.object({\n orderId: z.number(),\n })\n )\n .mutation(async ({ input, ctx }): Promise => {\n const { orderId } = input;\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n\n // Using dbService helper (new implementation)\n const order = await getOrderWithUser(orderId);\n\n if (!order) {\n throw new Error(\"Order not found\");\n }\n\n if (!order.user) {\n throw new Error(\"User not found for this order\");\n }\n\n // Generate coupon code: first 3 letters of user name or mobile + orderId\n const userNamePrefix = (order.user.name || order.user.mobile || 'USR').substring(0, 3).toUpperCase();\n const couponCode = `${userNamePrefix}${orderId}`;\n\n // Check if coupon code already exists\n const codeExists = await checkCouponExists(couponCode);\n if (codeExists) {\n throw new Error(\"Coupon code already exists\");\n }\n\n // Get order total amount\n const orderAmount = parseFloat(order.totalAmount);\n\n const coupon = await generateCancellationCoupon(\n orderId,\n staffUserId,\n order.userId,\n orderAmount,\n couponCode\n );\n\n /*\n // Old implementation - direct DB query with transaction:\n const coupon = await db.transaction(async (tx) => {\n // Calculate expiry date (30 days from now)\n const expiryDate = new Date();\n expiryDate.setDate(expiryDate.getDate() + 30);\n\n // Create the coupon\n const result = await tx.insert(coupons).values({\n couponCode,\n isUserBased: true,\n flatDiscount: orderAmount.toString(),\n minOrder: orderAmount.toString(),\n maxValue: orderAmount.toString(),\n validTill: expiryDate,\n maxLimitForUser: 1,\n createdBy: staffUserId,\n isApplyForAll: false,\n }).returning();\n\n const coupon = result[0];\n\n // Insert applicable users\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId: order.userId,\n });\n\n // Update order_status with refund coupon ID\n await tx.update(orderStatus)\n .set({ refundCouponId: coupon.id })\n .where(eq(orderStatus.orderId, orderId));\n\n return coupon;\n });\n */\n\n return coupon;\n }),\n\n getReservedCoupons: protectedProcedure\n .input(z.object({\n cursor: z.number().optional(),\n limit: z.number().default(50),\n search: z.string().optional(),\n }))\n .query(async ({ input }): Promise<{ coupons: any[]; nextCursor?: number }> => {\n const { cursor, limit, search } = input;\n\n const { coupons: result, hasMore } = await getReservedCouponsFromDb(cursor, limit, search);\n\n const nextCursor = hasMore ? result[result.length - 1].id : undefined;\n\n return {\n coupons: result,\n nextCursor,\n };\n }),\n\n createReservedCoupon: protectedProcedure\n .input(createCouponBodySchema)\n .mutation(async ({ input, ctx }): Promise => {\n const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableProducts, maxValue, validTill, maxLimitForUser, exclusiveApply } = input;\n\n // Validation: ensure at least one discount type is provided\n if ((!discountPercent && !flatDiscount) || (discountPercent && flatDiscount)) {\n throw new Error(\"Either discountPercent or flatDiscount must be provided (but not both)\");\n }\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n\n // Generate secret code if not provided\n let secretCode = couponCode || `SECRET${Date.now().toString().slice(-6)}${Math.random().toString(36).substring(2, 8).toUpperCase()}`;\n\n // Using dbService helper (new implementation)\n const codeExists = await checkReservedCouponExists(secretCode);\n if (codeExists) {\n throw new Error(\"Secret code already exists\");\n }\n\n const coupon = await createReservedCouponWithProducts(\n {\n secretCode,\n couponCode: couponCode || `RESERVED${Date.now().toString().slice(-6)}`,\n discountPercent: discountPercent?.toString(),\n flatDiscount: flatDiscount?.toString(),\n minOrder: minOrder?.toString(),\n productIds,\n maxValue: maxValue?.toString(),\n validTill: validTill ? dayjs(validTill).toDate() : undefined,\n maxLimitForUser,\n exclusiveApply: exclusiveApply || false,\n createdBy: staffUserId,\n },\n applicableProducts\n );\n\n /*\n // Old implementation - direct DB query:\n const result = await db.insert(reservedCoupons).values({\n secretCode,\n couponCode: couponCode || RESERVED${Date.now().toString().slice(-6)},\n discountPercent: discountPercent?.toString(),\n flatDiscount: flatDiscount?.toString(),\n minOrder: minOrder?.toString(),\n productIds,\n maxValue: maxValue?.toString(),\n validTill: validTill ? dayjs(validTill).toDate() : undefined,\n maxLimitForUser,\n exclusiveApply: exclusiveApply || false,\n createdBy: staffUserId,\n }).returning();\n\n const coupon = result[0];\n\n // Insert applicable products if provided\n if (applicableProducts && applicableProducts.length > 0) {\n await db.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: coupon.id,\n productId,\n }))\n );\n }\n */\n\n return coupon;\n }),\n\n getUsersMiniInfo: protectedProcedure\n .input(z.object({\n search: z.string().optional(),\n limit: z.number().min(1).max(50).default(20),\n offset: z.number().min(0).default(0),\n }))\n .query(async ({ input }): Promise<{ users: UserMiniInfo[] }> => {\n const { search, limit, offset } = input;\n\n const result = await getUsersForCouponFromDb(search, limit, offset);\n\n return result;\n }),\n\n createCoupon: protectedProcedure\n .input(z.object({\n mobile: z.string().min(1, 'Mobile number is required'),\n }))\n .mutation(async ({ input, ctx }): Promise<{ success: boolean; coupon: any }> => {\n const { mobile } = input;\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n\n // Clean mobile number (remove non-digits)\n const cleanMobile = mobile.replace(/\\D/g, '');\n\n // Validate: exactly 10 digits\n if (cleanMobile.length !== 10) {\n throw new Error(\"Mobile number must be exactly 10 digits\");\n }\n\n // Generate unique coupon code\n const timestamp = Date.now().toString().slice(-6);\n const random = Math.random().toString(36).substring(2, 6).toUpperCase();\n const couponCode = `MF${cleanMobile.slice(-4)}${timestamp}${random}`;\n\n // Using dbService helper (new implementation)\n const codeExists = await checkCouponExists(couponCode);\n if (codeExists) {\n throw new Error(\"Generated coupon code already exists - please try again\");\n }\n\n const { coupon, user } = await createCouponForUser(cleanMobile, couponCode, staffUserId);\n\n /*\n // Old implementation - direct DB query with transaction:\n // Check if user exists, create if not\n let user = await db.query.users.findFirst({\n where: eq(users.mobile, cleanMobile),\n });\n\n if (!user) {\n const [newUser] = await db.insert(users).values({\n name: null,\n email: null,\n mobile: cleanMobile,\n }).returning();\n user = newUser;\n }\n\n // Create the coupon\n const [coupon] = await db.insert(coupons).values({\n couponCode,\n isUserBased: true,\n discountPercent: \"20\",\n minOrder: \"1000\",\n maxValue: \"500\",\n maxLimitForUser: 1,\n isApplyForAll: false,\n exclusiveApply: false,\n createdBy: staffUserId,\n validTill: dayjs().add(90, 'days').toDate(),\n }).returning();\n\n // Associate coupon with user\n await db.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId: user.id,\n });\n */\n\n return {\n success: true,\n coupon: {\n id: coupon.id,\n couponCode: coupon.couponCode,\n userId: user.id,\n userMobile: user.mobile,\n discountPercent: 20,\n minOrder: 1000,\n maxValue: 500,\n maxLimitForUser: 1,\n },\n };\n }),\n});\n", "import { router, protectedProcedure } from \"@/src/trpc/trpc-index\"\nimport { z } from \"zod\";\nimport { ApiError } from \"@/src/lib/api-error\"\nimport {\n sendOrderPackagedNotification,\n sendOrderDeliveredNotification,\n} from \"@/src/lib/notif-job\";\nimport { publishCancellation } from \"@/src/lib/post-order-handler\"\nimport { getMultipleUserNegativityScores } from \"@/src/stores/user-negativity-store\"\nimport {\n updateOrderNotes as updateOrderNotesInDb,\n getOrderDetails as getOrderDetailsInDb,\n updateOrderPackaged as updateOrderPackagedInDb,\n updateOrderDelivered as updateOrderDeliveredInDb,\n updateOrderItemPackaging as updateOrderItemPackagingInDb,\n removeDeliveryCharge as removeDeliveryChargeInDb,\n getSlotOrders as getSlotOrdersInDb,\n updateAddressCoords as updateAddressCoordsInDb,\n getAllOrders as getAllOrdersInDb,\n rebalanceSlots as rebalanceSlotsInDb,\n cancelOrder as cancelOrderInDb,\n deleteOrderById as deleteOrderByIdInDb,\n} from '@/src/dbService'\nimport type {\n AdminCancelOrderResult,\n AdminGetAllOrdersResult,\n AdminGetSlotOrdersResult,\n AdminOrderBasicResult,\n AdminOrderDetails,\n AdminOrderItemPackagingResult,\n AdminOrderMessageResult,\n AdminOrderRow,\n AdminOrderUpdateResult,\n AdminRebalanceSlotsResult,\n} from \"@packages/shared\"\n\nconst updateOrderNotesSchema = z.object({\n orderId: z.number(),\n adminNotes: z.string(),\n});\n\nconst getOrderDetailsSchema = z.object({\n orderId: z.number(),\n});\n\nconst updatePackagedSchema = z.object({\n orderId: z.string(),\n isPackaged: z.boolean(),\n});\n\nconst updateDeliveredSchema = z.object({\n orderId: z.string(),\n isDelivered: z.boolean(),\n});\n\nconst updateOrderItemPackagingSchema = z.object({\n orderItemId: z.number(),\n isPackaged: z.boolean().optional(),\n isPackageVerified: z.boolean().optional(),\n});\n\nconst getSlotOrdersSchema = z.object({\n slotId: z.string(),\n});\n\nconst getAllOrdersSchema = z.object({\n cursor: z.number().optional(),\n limit: z.number().default(20),\n slotId: z.number().optional().nullable(),\n packagedFilter: z\n .enum([\"all\", \"packaged\", \"not_packaged\"])\n .optional()\n .default(\"all\"),\n deliveredFilter: z\n .enum([\"all\", \"delivered\", \"not_delivered\"])\n .optional()\n .default(\"all\"),\n cancellationFilter: z\n .enum([\"all\", \"cancelled\", \"not_cancelled\"])\n .optional()\n .default(\"all\"),\n flashDeliveryFilter: z\n .enum([\"all\", \"flash\", \"regular\"])\n .optional()\n .default(\"all\"),\n});\n\nexport const orderRouter = router({\n updateNotes: protectedProcedure\n .input(updateOrderNotesSchema)\n .mutation(async ({ input }): Promise => {\n const { orderId, adminNotes } = input;\n\n const result = await updateOrderNotesInDb(orderId, adminNotes || null)\n\n /*\n // Old implementation - direct DB query:\n const result = await db\n .update(orders)\n .set({\n adminNotes: adminNotes || null,\n })\n .where(eq(orders.id, orderId))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Order not found\");\n }\n */\n\n if (!result) {\n throw new Error(\"Order not found\")\n }\n\n return result as AdminOrderRow;\n }),\n\n getOrderDetails: protectedProcedure\n .input(getOrderDetailsSchema)\n .query(async ({ input }): Promise => {\n const { orderId } = input;\n\n const orderDetails = await getOrderDetailsInDb(orderId)\n\n /*\n // Old implementation - direct DB queries:\n // Single optimized query with all relations\n const orderData = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n payment: true,\n paymentInfo: true,\n orderStatus: true,\n refunds: true,\n },\n });\n\n if (!orderData) {\n throw new Error(\"Order not found\");\n }\n\n // Get coupon usage for this specific order using new orderId field\n const couponUsageData = await db.query.couponUsage.findMany({\n where: eq(couponUsage.orderId, orderData.id),\n with: {\n coupon: true,\n },\n });\n\n let couponData = null;\n if (couponUsageData.length > 0) {\n // Calculate total discount from multiple coupons\n let totalDiscountAmount = 0;\n const orderTotal = parseFloat(orderData.totalAmount.toString());\n\n for (const usage of couponUsageData) {\n let discountAmount = 0;\n\n if (usage.coupon.discountPercent) {\n discountAmount =\n (orderTotal *\n parseFloat(usage.coupon.discountPercent.toString())) /\n 100;\n } else if (usage.coupon.flatDiscount) {\n discountAmount = parseFloat(usage.coupon.flatDiscount.toString());\n }\n\n // Apply max value limit if set\n if (\n usage.coupon.maxValue &&\n discountAmount > parseFloat(usage.coupon.maxValue.toString())\n ) {\n discountAmount = parseFloat(usage.coupon.maxValue.toString());\n }\n\n totalDiscountAmount += discountAmount;\n }\n\n couponData = {\n couponCode: couponUsageData\n .map((u) => u.coupon.couponCode)\n .join(\", \"),\n couponDescription: `${couponUsageData.length} coupons applied`,\n discountAmount: totalDiscountAmount,\n };\n }\n\n // Status determination from included relation\n const statusRecord = orderData.orderStatus?.[0];\n let status: \"pending\" | \"delivered\" | \"cancelled\" = \"pending\";\n if (statusRecord?.isCancelled) {\n status = \"cancelled\";\n } else if (statusRecord?.isDelivered) {\n status = \"delivered\";\n }\n\n // Always include refund data (will be null/undefined if not cancelled)\n const refund = orderData.refunds?.[0];\n\n return {\n id: orderData.id,\n readableId: orderData.id,\n userId: orderData.user.id,\n customerName: `${orderData.user.name}`,\n customerEmail: orderData.user.email,\n customerMobile: orderData.user.mobile,\n address: {\n name: orderData.address.name,\n line1: orderData.address.addressLine1,\n line2: orderData.address.addressLine2,\n city: orderData.address.city,\n state: orderData.address.state,\n pincode: orderData.address.pincode,\n phone: orderData.address.phone,\n },\n slotInfo: orderData.slot\n ? {\n time: orderData.slot.deliveryTime.toISOString(),\n sequence: orderData.slot.deliverySequence,\n }\n : null,\n isCod: orderData.isCod,\n isOnlinePayment: orderData.isOnlinePayment,\n totalAmount: parseFloat(orderData.totalAmount?.toString() || '0') - parseFloat(orderData.deliveryCharge?.toString() || '0'),\n deliveryCharge: parseFloat(orderData.deliveryCharge?.toString() || '0'),\n adminNotes: orderData.adminNotes,\n userNotes: orderData.userNotes,\n createdAt: orderData.createdAt,\n status,\n isPackaged: statusRecord?.isPackaged || false,\n isDelivered: statusRecord?.isDelivered || false,\n items: orderData.orderItems.map((item) => ({\n id: item.id,\n name: item.product.name,\n quantity: item.quantity,\n productSize: item.product.productQuantity,\n price: item.price,\n unit: item.product.unit?.shortNotation,\n amount:\n parseFloat(item.price.toString()) *\n parseFloat(item.quantity || \"0\"),\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n })),\n payment: orderData.payment\n ? {\n status: orderData.payment.status,\n gateway: orderData.payment.gateway,\n merchantOrderId: orderData.payment.merchantOrderId,\n }\n : null,\n paymentInfo: orderData.paymentInfo\n ? {\n status: orderData.paymentInfo.status,\n gateway: orderData.paymentInfo.gateway,\n merchantOrderId: orderData.paymentInfo.merchantOrderId,\n }\n : null,\n // Cancellation details (always included, null if not cancelled)\n cancelReason: statusRecord?.cancelReason || null,\n cancellationReviewed: statusRecord?.cancellationReviewed || false,\n isRefundDone: refund?.refundStatus === \"processed\" || false,\n refundStatus: refund?.refundStatus as RefundStatus,\n refundAmount: refund?.refundAmount\n ? parseFloat(refund.refundAmount.toString())\n : null,\n // Coupon information\n couponData: couponData,\n couponCode: couponData?.couponCode || null,\n couponDescription: couponData?.couponDescription || null,\n discountAmount: couponData?.discountAmount || null,\n orderStatus: statusRecord,\n refundRecord: refund,\n isFlashDelivery: orderData.isFlashDelivery,\n };\n */\n\n if (!orderDetails) {\n throw new Error('Order not found')\n }\n\n return orderDetails\n }),\n\n updatePackaged: protectedProcedure\n .input(updatePackagedSchema)\n .mutation(async ({ input }): Promise => {\n const { orderId, isPackaged } = input;\n\n const result = await updateOrderPackagedInDb(orderId, isPackaged)\n\n /*\n // Old implementation - direct DB queries:\n // Update all order items to the specified packaged state\n await db\n .update(orderItems)\n .set({ is_packaged: isPackaged })\n .where(eq(orderItems.orderId, parseInt(orderId)));\n\n // Also update the order status table for backward compatibility\n if (!isPackaged) {\n await db\n .update(orderStatus)\n .set({ isPackaged, isDelivered: false })\n .where(eq(orderStatus.orderId, parseInt(orderId)));\n } else {\n await db\n .update(orderStatus)\n .set({ isPackaged })\n .where(eq(orderStatus.orderId, parseInt(orderId)));\n }\n\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, parseInt(orderId)),\n });\n if (order) await sendOrderPackagedNotification(order.userId, orderId);\n\n return { success: true };\n */\n\n if (result.userId) await sendOrderPackagedNotification(result.userId, orderId)\n\n return { success: true, userId: result.userId }\n }),\n\n updateDelivered: protectedProcedure\n .input(updateDeliveredSchema)\n .mutation(async ({ input }): Promise => {\n const { orderId, isDelivered } = input;\n\n const result = await updateOrderDeliveredInDb(orderId, isDelivered)\n\n /*\n // Old implementation - direct DB queries:\n await db\n .update(orderStatus)\n .set({ isDelivered })\n .where(eq(orderStatus.orderId, parseInt(orderId)));\n\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, parseInt(orderId)),\n });\n if (order) await sendOrderDeliveredNotification(order.userId, orderId);\n\n return { success: true };\n */\n\n if (result.userId) await sendOrderDeliveredNotification(result.userId, orderId)\n\n return { success: true, userId: result.userId }\n }),\n\n updateOrderItemPackaging: protectedProcedure\n .input(updateOrderItemPackagingSchema)\n .mutation(async ({ input }): Promise => {\n const { orderItemId, isPackaged, isPackageVerified } = input;\n\n const result = await updateOrderItemPackagingInDb(orderItemId, isPackaged, isPackageVerified)\n\n /*\n // Old implementation - direct DB queries:\n // Validate that orderItem exists\n const orderItem = await db.query.orderItems.findFirst({\n where: eq(orderItems.id, orderItemId),\n });\n\n if (!orderItem) {\n throw new ApiError(\"Order item not found\", 404);\n }\n\n // Build update object with only provided fields\n const updateData: any = {};\n if (isPackaged !== undefined) {\n updateData.is_packaged = isPackaged;\n }\n if (isPackageVerified !== undefined) {\n updateData.is_package_verified = isPackageVerified;\n }\n\n // Update the order item\n await db\n .update(orderItems)\n .set(updateData)\n .where(eq(orderItems.id, orderItemId));\n\n return { success: true };\n */\n\n if (!result.updated) {\n throw new ApiError('Order item not found', 404)\n }\n\n return result\n }),\n\n removeDeliveryCharge: protectedProcedure\n .input(z.object({ orderId: z.number() }))\n .mutation(async ({ input }): Promise => {\n const { orderId } = input;\n\n const result = await removeDeliveryChargeInDb(orderId)\n\n /*\n // Old implementation - direct DB queries:\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n });\n\n if (!order) {\n throw new Error('Order not found');\n }\n\n const currentDeliveryCharge = parseFloat(order.deliveryCharge?.toString() || '0');\n const currentTotalAmount = parseFloat(order.totalAmount?.toString() || '0');\n const newTotalAmount = currentTotalAmount - currentDeliveryCharge;\n\n await db\n .update(orders)\n .set({ \n deliveryCharge: '0',\n totalAmount: newTotalAmount.toString()\n })\n .where(eq(orders.id, orderId));\n\n return { success: true, message: 'Delivery charge removed' };\n */\n\n if (!result) {\n throw new Error('Order not found')\n }\n\n return result\n }),\n\n getSlotOrders: protectedProcedure\n .input(getSlotOrdersSchema)\n .query(async ({ input }): Promise => {\n const { slotId } = input;\n\n const result = await getSlotOrdersInDb(slotId)\n\n /*\n // Old implementation - direct DB queries:\n const slotOrders = await db.query.orders.findMany({\n where: eq(orders.slotId, parseInt(slotId)),\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n },\n });\n\n const filteredOrders = slotOrders.filter((order) => {\n const statusRecord = order.orderStatus[0];\n return (\n order.isCod ||\n (statusRecord && statusRecord.paymentStatus === \"success\")\n );\n });\n\n const formattedOrders = filteredOrders.map((order) => {\n const statusRecord = order.orderStatus[0]; // assuming one status per order\n let status: \"pending\" | \"delivered\" | \"cancelled\" = \"pending\";\n if (statusRecord?.isCancelled) {\n status = \"cancelled\";\n } else if (statusRecord?.isDelivered) {\n status = \"delivered\";\n }\n\n const items = order.orderItems.map((item) => ({\n id: item.id,\n name: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n amount: parseFloat(item.quantity) * parseFloat(item.price.toString()),\n unit: item.product.unit?.shortNotation || \"\",\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n }));\n\n return {\n id: order.id,\n readableId: order.id,\n customerName: order.user.name,\n address: `${order.address.addressLine1}${\n order.address.addressLine2 ? `, ${order.address.addressLine2}` : \"\"\n }, ${order.address.city}, ${order.address.state} - ${\n order.address.pincode\n }, Phone: ${order.address.phone}`,\n addressId: order.addressId,\n latitude: order.address.adminLatitude ?? order.address.latitude,\n longitude: order.address.adminLongitude ?? order.address.longitude,\n totalAmount: parseFloat(order.totalAmount),\n items,\n deliveryTime: order.slot?.deliveryTime.toISOString() || null,\n status,\n isPackaged:\n order.orderItems.every((item) => item.is_packaged) || false,\n isDelivered: statusRecord?.isDelivered || false,\n isCod: order.isCod,\n paymentMode: order.isCod ? \"COD\" : \"Online\",\n paymentStatus: statusRecord?.paymentStatus || \"pending\",\n slotId: order.slotId,\n adminNotes: order.adminNotes,\n userNotes: order.userNotes,\n };\n });\n\n return { success: true, data: formattedOrders };\n */\n\n return result\n }),\n\n updateAddressCoords: protectedProcedure\n .input(\n z.object({\n addressId: z.number(),\n latitude: z.number(),\n longitude: z.number(),\n })\n )\n .mutation(async ({ input }): Promise => {\n const { addressId, latitude, longitude } = input;\n\n const result = await updateAddressCoordsInDb(addressId, latitude, longitude)\n\n /*\n // Old implementation - direct DB queries:\n const result = await db\n .update(addresses)\n .set({\n adminLatitude: latitude,\n adminLongitude: longitude,\n })\n .where(eq(addresses.id, addressId))\n .returning();\n\n if (result.length === 0) {\n throw new ApiError(\"Address not found\", 404);\n }\n\n return { success: true };\n */\n\n if (!result.success) {\n throw new ApiError('Address not found', 404)\n }\n\n return result\n }),\n\n getAll: protectedProcedure\n .input(getAllOrdersSchema)\n .query(async ({ input }): Promise => {\n try {\n const result = await getAllOrdersInDb(input)\n const userIds = [...new Set(result.orders.map((order) => order.userId))]\n const negativityScores = await getMultipleUserNegativityScores(userIds)\n\n const orders = result.orders.map((order) => {\n const { userId, userNegativityScore, ...rest } = order\n return {\n ...rest,\n userNegativityScore: negativityScores[userId] || 0,\n }\n })\n\n /*\n // Old implementation - direct DB queries:\n const {\n cursor,\n limit,\n slotId,\n packagedFilter,\n deliveredFilter,\n cancellationFilter,\n flashDeliveryFilter,\n } = input;\n\n let whereCondition: SQL | undefined = eq(orders.id, orders.id); // always true\n if (cursor) {\n whereCondition = and(whereCondition, lt(orders.id, cursor));\n }\n if (slotId) {\n whereCondition = and(whereCondition, eq(orders.slotId, slotId));\n }\n if (packagedFilter === \"packaged\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isPackaged, true)\n );\n } else if (packagedFilter === \"not_packaged\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isPackaged, false)\n );\n }\n if (deliveredFilter === \"delivered\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isDelivered, true)\n );\n } else if (deliveredFilter === \"not_delivered\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isDelivered, false)\n );\n }\n if (cancellationFilter === \"cancelled\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isCancelled, true)\n );\n } else if (cancellationFilter === \"not_cancelled\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isCancelled, false)\n );\n }\n if (flashDeliveryFilter === \"flash\") {\n whereCondition = and(\n whereCondition,\n eq(orders.isFlashDelivery, true)\n );\n } else if (flashDeliveryFilter === \"regular\") {\n whereCondition = and(\n whereCondition,\n eq(orders.isFlashDelivery, false)\n );\n }\n\n const allOrders = await db.query.orders.findMany({\n where: whereCondition,\n orderBy: desc(orders.createdAt),\n limit: limit + 1, // fetch one extra to check if there's more\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n },\n });\n\n const hasMore = allOrders.length > limit;\n const ordersToReturn = hasMore ? allOrders.slice(0, limit) : allOrders;\n\n const userIds = [...new Set(ordersToReturn.map(o => o.userId))];\n const negativityScores = await getMultipleUserNegativityScores(userIds);\n\n const filteredOrders = ordersToReturn.filter((order) => {\n const statusRecord = order.orderStatus[0];\n return (\n order.isCod ||\n (statusRecord && statusRecord.paymentStatus === \"success\")\n );\n });\n\n const formattedOrders = filteredOrders.map((order) => {\n const statusRecord = order.orderStatus[0];\n let status: \"pending\" | \"delivered\" | \"cancelled\" = \"pending\";\n if (statusRecord?.isCancelled) {\n status = \"cancelled\";\n } else if (statusRecord?.isDelivered) {\n status = \"delivered\";\n }\n\n const items = order.orderItems\n .map((item) => ({\n id: item.id,\n name: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n amount:\n parseFloat(item.quantity) * parseFloat(item.price.toString()),\n unit: item.product.unit?.shortNotation || \"\",\n productSize: item.product.productQuantity,\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n }))\n .sort((first, second) => first.id - second.id);\n dayjs.extend(utc);\n return {\n id: order.id,\n orderId: order.id.toString(),\n readableId: order.id,\n customerName: order.user.name,\n customerMobile: order.user.mobile,\n address: `${order.address.addressLine1}${\n order.address.addressLine2\n ? `, ${order.address.addressLine2}`\n : \"\"\n }, ${order.address.city}, ${order.address.state} - ${\n order.address.pincode\n }, Phone: ${order.address.phone}`,\n addressId: order.addressId,\n latitude: order.address.adminLatitude ?? order.address.latitude,\n longitude: order.address.adminLongitude ?? order.address.longitude,\n totalAmount: parseFloat(order.totalAmount),\n deliveryCharge: parseFloat(order.deliveryCharge || \"0\"),\n items,\n createdAt: order.createdAt,\n // deliveryTime: order.slot ? dayjs.utc(order.slot.deliveryTime).format('ddd, MMM D \u2022 h:mm A') : 'Not scheduled',\n deliveryTime: order.slot?.deliveryTime.toISOString() || null,\n status,\n isPackaged:\n order.orderItems.every((item) => item.is_packaged) || false,\n isDelivered: statusRecord?.isDelivered || false,\n isCod: order.isCod,\n isFlashDelivery: order.isFlashDelivery,\n userNotes: order.userNotes,\n adminNotes: order.adminNotes,\n userNegativityScore: negativityScores[order.userId] || 0,\n };\n });\n \n return {\n orders: formattedOrders,\n nextCursor: hasMore\n ? ordersToReturn[ordersToReturn.length - 1].id\n : undefined,\n };\n */\n\n return {\n orders,\n nextCursor: result.nextCursor,\n }\n } catch (e) {\n console.log({ e });\n }\n }),\n\n rebalanceSlots: protectedProcedure\n .input(z.object({ slotIds: z.array(z.number()).min(1).max(50) }))\n .mutation(async ({ input }): Promise => {\n const slotIds = input.slotIds;\n\n const result = await rebalanceSlotsInDb(slotIds)\n\n /*\n // Old implementation - direct DB queries:\n const ordersList = await db.query.orders.findMany({\n where: inArray(orders.slotId, slotIds),\n with: {\n orderItems: {\n with: {\n product: true\n }\n },\n couponUsages: {\n with: {\n coupon: true\n }\n },\n }\n });\n\n const processedOrdersData = ordersList.map((order) => {\n\n let newTotal = order.orderItems.reduce((acc,item) => {\n const latestPrice = +item.product.price;\n const amount = (latestPrice * Number(item.quantity));\n return acc+amount;\n },0)\n\n order.orderItems.forEach(item => {\n item.price = item.product.price;\n item.discountedPrice = item.product.price\n })\n\n const coupon = order.couponUsages[0]?.coupon;\n\n let discount = 0;\n if(coupon && !coupon.isInvalidated && (!coupon.validTill || new Date(coupon.validTill) > new Date())) {\n const proportion = Number(order.orderGroupProportion || 1);\n if(coupon.discountPercent) {\n const maxDiscount = Number(coupon.maxValue || Infinity) * proportion;\n discount = Math.min((newTotal * parseFloat(coupon.discountPercent)) / 100, maxDiscount);\n }\n else {\n discount = Number(coupon.flatDiscount) * proportion;\n }\n }\n newTotal -= discount\n\n const { couponUsages, orderItems: orderItemsRaw, ...rest} = order;\n const updatedOrderItems = orderItemsRaw.map(item => {\n const { product, ...rawOrderItem } = item;\n return rawOrderItem;\n })\n return {order: rest, updatedOrderItems, newTotal }\n })\n\n const updatedOrderIds: number[] = [];\n await db.transaction(async (tx) => {\n for (const { order, updatedOrderItems, newTotal } of processedOrdersData) {\n await tx.update(orders).set({ totalAmount: newTotal.toString() }).where(eq(orders.id, order.id));\n updatedOrderIds.push(order.id);\n\n for (const item of updatedOrderItems) {\n await tx.update(orderItems).set({\n price: item.price,\n discountedPrice: item.discountedPrice\n }).where(eq(orderItems.id, item.id));\n }\n }\n });\n\n return { success: true, updatedOrders: updatedOrderIds, message: `Rebalanced ${updatedOrderIds.length} orders.` };\n */\n\n return result\n }),\n\n cancelOrder: protectedProcedure\n .input(z.object({\n orderId: z.number(),\n reason: z.string().min(1, \"Cancellation reason is required\"),\n }))\n .mutation(async ({ input }): Promise => {\n const { orderId, reason } = input;\n\n const result = await cancelOrderInDb(orderId, reason)\n\n /*\n // Old implementation - direct DB queries:\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n orderStatus: true,\n },\n });\n\n if (!order) {\n throw new ApiError(\"Order not found\", 404);\n }\n\n const status = order.orderStatus[0];\n if (!status) {\n throw new ApiError(\"Order status not found\", 400);\n }\n\n if (status.isCancelled) {\n throw new ApiError(\"Order is already cancelled\", 400);\n }\n\n if (status.isDelivered) {\n throw new ApiError(\"Cannot cancel delivered order\", 400);\n }\n\n const result = await db.transaction(async (tx) => {\n await tx\n .update(orderStatus)\n .set({\n isCancelled: true,\n isCancelledByAdmin: true,\n cancelReason: reason,\n cancellationAdminNotes: reason,\n cancellationReviewed: true,\n cancellationReviewedAt: new Date(),\n })\n .where(eq(orderStatus.id, status.id));\n\n const refundStatus = order.isCod ? \"na\" : \"pending\";\n\n await tx.insert(refunds).values({\n orderId: order.id,\n refundStatus,\n });\n\n return { orderId: order.id, userId: order.userId };\n });\n\n // Publish to Redis for Telegram notification\n await publishCancellation(result.orderId, 'admin', reason);\n\n return { success: true, message: \"Order cancelled successfully\" };\n */\n\n if (!result.success) {\n if (result.error === 'order_not_found') {\n throw new ApiError(result.message, 404)\n }\n if (result.error === 'status_not_found') {\n throw new ApiError(result.message, 400)\n }\n if (result.error === 'already_cancelled') {\n throw new ApiError(result.message, 400)\n }\n if (result.error === 'already_delivered') {\n throw new ApiError(result.message, 400)\n }\n\n throw new ApiError(result.message, 400)\n }\n\n if (result.orderId) {\n await publishCancellation(result.orderId, 'admin', reason)\n }\n\n return { success: true, message: result.message }\n }),\n});\n\n// {\"id\": \"order_Rhh00qJNdjUp8o\", \"notes\": {\"retry\": \"true\", \"customerOrderId\": \"14\"}, \"amount\": 21000, \"entity\": \"order\", \"status\": \"created\", \"receipt\": \"order_14_retry\", \"attempts\": 0, \"currency\": \"INR\", \"offer_id\": null, \"signature\": \"6df20655021f1d6841340f2a2ef2ef9378cb3d43495ab09e85f08aea1a851583\", \"amount_due\": 21000, \"created_at\": 1763575791, \"payment_id\": \"pay_Rhh15cLL28YM7j\", \"amount_paid\": 0}\n\nexport async function deleteOrderById(orderId: number): Promise {\n await deleteOrderByIdInDb(orderId)\n\n /*\n // Old implementation - direct DB queries:\n await db.transaction(async (tx) => {\n await tx.delete(orderItems).where(eq(orderItems.orderId, orderId));\n await tx.delete(orderStatus).where(eq(orderStatus.orderId, orderId));\n await tx.delete(payments).where(eq(payments.orderId, orderId));\n await tx.delete(refunds).where(eq(refunds.orderId, orderId));\n await tx.delete(couponUsage).where(eq(couponUsage.orderId, orderId));\n await tx.delete(complaints).where(eq(complaints.orderId, orderId));\n await tx.delete(orders).where(eq(orders.id, orderId));\n });\n */\n}\n", "import { Queue, Worker } from 'bullmq';\nimport { Expo } from 'expo-server-sdk';\nimport { redisUrl } from '@/src/lib/env-exporter'\n// import { db } from '@/src/db/db_index'\nimport { generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport {\n NOTIFS_QUEUE,\n ORDER_PLACED_MESSAGE,\n PAYMENT_FAILED_MESSAGE,\n ORDER_PACKAGED_MESSAGE,\n ORDER_OUT_FOR_DELIVERY_MESSAGE,\n ORDER_DELIVERED_MESSAGE,\n ORDER_CANCELLED_MESSAGE,\n REFUND_INITIATED_MESSAGE\n} from '@/src/lib/const-strings';\n\nexport const notificationQueue = new Queue(NOTIFS_QUEUE, {\n connection: { url: redisUrl },\n defaultJobOptions: {\n removeOnComplete: true,\n removeOnFail: 10,\n attempts: 3,\n },\n});\n\nexport const notificationWorker = new Worker(NOTIFS_QUEUE, async (job) => {\n if (!job) return;\n \n const { name, data } = job;\n console.log(`Processing notification job ${job.id} - ${name}`);\n \n if (name === 'send-admin-notification') {\n await sendAdminNotification(data);\n } else if (name === 'send-notification') {\n // Handle legacy notification type\n console.log('Legacy notification job - not implemented yet');\n }\n}, {\n connection: { url: redisUrl },\n concurrency: 5,\n});\n\nasync function sendAdminNotification(data: {\n token: string;\n title: string;\n body: string;\n imageUrl: string | null;\n}) {\n const { token, title, body, imageUrl } = data;\n \n // Validate Expo push token\n if (!Expo.isExpoPushToken(token)) {\n console.error(`Invalid Expo push token: ${token}`);\n return;\n }\n \n // Generate signed URL for image if provided\n const signedImageUrl = imageUrl ? await generateSignedUrlFromS3Url(imageUrl) : null;\n \n // Send notification\n const expo = new Expo();\n const message = {\n to: token,\n sound: 'default',\n title,\n body,\n data: { imageUrl },\n ...(signedImageUrl ? {\n attachments: [\n {\n url: signedImageUrl,\n contentType: 'image/jpeg',\n }\n ]\n } : {}),\n };\n \n try {\n const [ticket] = await expo.sendPushNotificationsAsync([message]);\n console.log(`Notification sent:`, ticket);\n } catch (error) {\n console.error(`Failed to send notification:`, error);\n throw error;\n }\n}\n\nnotificationWorker.on('completed', (job) => {\n if (job) console.log(`Notification job ${job.id} completed`);\n});\nnotificationWorker.on('failed', (job, err) => {\n if (job) console.error(`Notification job ${job.id} failed:`, err);\n});\n\nexport async function scheduleNotification(userId: number, payload: any, options?: { delay?: number; priority?: number }) {\n const jobData = { userId, ...payload };\n await notificationQueue.add('send-notification', jobData, options);\n}\n\n// Utility methods for specific notification events\nexport async function sendOrderPlacedNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Order Placed',\n body: ORDER_PLACED_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendPaymentFailedNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Payment Failed',\n body: PAYMENT_FAILED_MESSAGE,\n type: 'payment',\n orderId\n });\n}\n\nexport async function sendOrderPackagedNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Order Packaged',\n body: ORDER_PACKAGED_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendOrderOutForDeliveryNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Out for Delivery',\n body: ORDER_OUT_FOR_DELIVERY_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendOrderDeliveredNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Order Delivered',\n body: ORDER_DELIVERED_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendOrderCancelledNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Order Cancelled',\n body: ORDER_CANCELLED_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendRefundInitiatedNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Refund Initiated',\n body: REFUND_INITIATED_MESSAGE,\n type: 'refund',\n orderId\n });\n}\n\nprocess.on('SIGTERM', async () => {\n await notificationQueue.close();\n await notificationWorker.close();\n});\n", null, null, null, null, null, "import { notImplemented, notImplementedClass } from \"../_internal/utils.mjs\";\nexport const ChildProcess = /* @__PURE__ */ notImplementedClass(\"child_process.ChildProcess\");\nexport const _forkChild = /* @__PURE__ */ notImplemented(\"child_process.ChildProcess\");\nexport const exec = /* @__PURE__ */ notImplemented(\"child_process.exec\");\nexport const execFile = /* @__PURE__ */ notImplemented(\"child_process.execFile\");\nexport const execFileSync = /* @__PURE__ */ notImplemented(\"child_process.execFileSync\");\nexport const execSync = /* @__PURE__ */ notImplemented(\"child_process.execSyn\");\nexport const fork = /* @__PURE__ */ notImplemented(\"child_process.fork\");\nexport const spawn = /* @__PURE__ */ notImplemented(\"child_process.spawn\");\nexport const spawnSync = /* @__PURE__ */ notImplemented(\"child_process.spawnSync\");\nexport default {\n\tChildProcess,\n\t_forkChild,\n\texec,\n\texecFile,\n\texecFileSync,\n\texecSync,\n\tfork,\n\tspawn,\n\tspawnSync\n};\n", "import { BroadcastChannel } from \"./internal/worker_threads/broadcast-channel.mjs\";\nimport { MessageChannel } from \"./internal/worker_threads/message-channel.mjs\";\nimport { MessagePort } from \"./internal/worker_threads/message-port.mjs\";\nimport { Worker } from \"./internal/worker_threads/worker.mjs\";\nimport { notImplemented } from \"../_internal/utils.mjs\";\nexport { BroadcastChannel } from \"./internal/worker_threads/broadcast-channel.mjs\";\nexport { MessageChannel } from \"./internal/worker_threads/message-channel.mjs\";\nexport { MessagePort } from \"./internal/worker_threads/message-port.mjs\";\nexport { Worker } from \"./internal/worker_threads/worker.mjs\";\nconst _environmentData = new Map();\nexport const getEnvironmentData = function getEnvironmentData(key) {\n\treturn _environmentData.get(key);\n};\nexport const setEnvironmentData = function setEnvironmentData(key, value) {\n\t_environmentData.set(key, value);\n};\nexport const isMainThread = true;\nexport const isMarkedAsUntransferable = () => false;\nexport const markAsUntransferable = function markAsUntransferable(value) {\n\t// noop\n};\nexport const markAsUncloneable = () => {\n\t// noop\n};\nexport const moveMessagePortToContext = () => new MessagePort();\nexport const parentPort = null;\nexport const receiveMessageOnPort = () => undefined;\nexport const SHARE_ENV = /* @__PURE__ */ Symbol.for(\"nodejs.worker_threads.SHARE_ENV\");\nexport const resourceLimits = {};\nexport const threadId = 0;\nexport const workerData = null;\n// https://nodejs.org/api/worker_threads.html#workerpostmessagetothreadthreadid-value-transferlist-timeout\nexport const postMessageToThread = /* @__PURE__ */ notImplemented(\"worker_threads.postMessageToThread\");\nexport const isInternalThread = false;\nexport default {\n\tBroadcastChannel,\n\tMessageChannel,\n\tMessagePort,\n\tWorker,\n\tSHARE_ENV,\n\tgetEnvironmentData,\n\tisMainThread,\n\tisMarkedAsUntransferable,\n\tmarkAsUntransferable,\n\tmarkAsUncloneable,\n\tmoveMessagePortToContext,\n\tparentPort,\n\treceiveMessageOnPort,\n\tresourceLimits,\n\tsetEnvironmentData,\n\tpostMessageToThread,\n\tthreadId,\n\tworkerData,\n\tisInternalThread\n};\n", "import { EventEmitter } from \"node:events\";\nimport { Readable } from \"node:stream\";\nexport class Worker extends EventEmitter {\n\tstdin = null;\n\tstdout = new Readable();\n\tstderr = new Readable();\n\tthreadId = 0;\n\tperformance = { eventLoopUtilization: () => ({\n\t\tidle: 0,\n\t\tactive: 0,\n\t\tutilization: 0\n\t}) };\n\tpostMessage(_value, _transferList) {}\n\tpostMessageToThread(_threadId, _value, _transferList, _timeout) {\n\t\treturn Promise.resolve();\n\t}\n\tref() {}\n\tunref() {}\n\tterminate() {\n\t\treturn Promise.resolve(0);\n\t}\n\tgetHeapSnapshot() {\n\t\treturn Promise.resolve(new Readable());\n\t}\n}\n", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';", "// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n// find the complete implementation of crypto (msCrypto) on IE11.\nvar getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto);\nvar rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\nexport default function rng() {\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n\n return getRandomValues(rnds8);\n}", "/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n\n return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join('');\n}\n\nexport default bytesToUuid;", "import rng from './rng.js';\nimport bytesToUuid from './bytesToUuid.js';\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof options == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nexport default v4;", null, null, null, "export { Packr, Encoder, addExtension, pack, encode, NEVER, ALWAYS, DECIMAL_ROUND, DECIMAL_FIT, REUSE_BUFFER_MODE, RESET_BUFFER_MODE, RESERVE_START_SPACE } from './pack.js'\nexport { Unpackr, Decoder, C1, unpack, unpackMultiple, decode, FLOAT32_OPTIONS, clearSource, roundFloat32, isNativeAccelerationEnabled } from './unpack.js'\nexport { decodeIter, encodeIter } from './iterators.js'\nexport const useRecords = false\nexport const mapsAsObjects = true\n", "import { Unpackr, mult10, C1Type, typedArrays, addExtension as unpackAddExtension } from './unpack.js'\nlet textEncoder\ntry {\n\ttextEncoder = new TextEncoder()\n} catch (error) {}\nlet extensions, extensionClasses\nconst hasNodeBuffer = typeof Buffer !== 'undefined'\nconst ByteArrayAllocate = hasNodeBuffer ?\n\tfunction(length) { return Buffer.allocUnsafeSlow(length) } : Uint8Array\nconst ByteArray = hasNodeBuffer ? Buffer : Uint8Array\nconst MAX_BUFFER_SIZE = hasNodeBuffer ? 0x100000000 : 0x7fd00000\nlet target, keysTarget\nlet targetView\nlet position = 0\nlet safeEnd\nlet bundledStrings = null\nlet writeStructSlots\nconst MAX_BUNDLE_SIZE = 0x5500 // maximum characters such that the encoded bytes fits in 16 bits.\nconst hasNonLatin = /[\\u0080-\\uFFFF]/\nexport const RECORD_SYMBOL = Symbol('record-id')\nexport class Packr extends Unpackr {\n\tconstructor(options) {\n\t\tsuper(options)\n\t\tthis.offset = 0\n\t\tlet typeBuffer\n\t\tlet start\n\t\tlet hasSharedUpdate\n\t\tlet structures\n\t\tlet referenceMap\n\t\tlet encodeUtf8 = ByteArray.prototype.utf8Write ? function(string, position) {\n\t\t\treturn target.utf8Write(string, position, target.byteLength - position)\n\t\t} : (textEncoder && textEncoder.encodeInto) ?\n\t\t\tfunction(string, position) {\n\t\t\t\treturn textEncoder.encodeInto(string, target.subarray(position)).written\n\t\t\t} : false\n\n\t\tlet packr = this\n\t\tif (!options)\n\t\t\toptions = {}\n\t\tlet isSequential = options && options.sequential\n\t\tlet hasSharedStructures = options.structures || options.saveStructures\n\t\tlet maxSharedStructures = options.maxSharedStructures\n\t\tif (maxSharedStructures == null)\n\t\t\tmaxSharedStructures = hasSharedStructures ? 32 : 0\n\t\tif (maxSharedStructures > 8160)\n\t\t\tthrow new Error('Maximum maxSharedStructure is 8160')\n\t\tif (options.structuredClone && options.moreTypes == undefined) {\n\t\t\tthis.moreTypes = true\n\t\t}\n\t\tlet maxOwnStructures = options.maxOwnStructures\n\t\tif (maxOwnStructures == null)\n\t\t\tmaxOwnStructures = hasSharedStructures ? 32 : 64\n\t\tif (!this.structures && options.useRecords != false)\n\t\t\tthis.structures = []\n\t\t// two byte record ids for shared structures\n\t\tlet useTwoByteRecords = maxSharedStructures > 32 || (maxOwnStructures + maxSharedStructures > 64)\n\t\tlet sharedLimitId = maxSharedStructures + 0x40\n\t\tlet maxStructureId = maxSharedStructures + maxOwnStructures + 0x40\n\t\tif (maxStructureId > 8256) {\n\t\t\tthrow new Error('Maximum maxSharedStructure + maxOwnStructure is 8192')\n\t\t}\n\t\tlet recordIdsToRemove = []\n\t\tlet transitionsCount = 0\n\t\tlet serializationsSinceTransitionRebuild = 0\n\n\t\tthis.pack = this.encode = function(value, encodeOptions) {\n\t\t\tif (!target) {\n\t\t\t\ttarget = new ByteArrayAllocate(8192)\n\t\t\t\ttargetView = target.dataView || (target.dataView = new DataView(target.buffer, 0, 8192))\n\t\t\t\tposition = 0\n\t\t\t}\n\t\t\tsafeEnd = target.length - 10\n\t\t\tif (safeEnd - position < 0x800) {\n\t\t\t\t// don't start too close to the end,\n\t\t\t\ttarget = new ByteArrayAllocate(target.length)\n\t\t\t\ttargetView = target.dataView || (target.dataView = new DataView(target.buffer, 0, target.length))\n\t\t\t\tsafeEnd = target.length - 10\n\t\t\t\tposition = 0\n\t\t\t} else\n\t\t\t\tposition = (position + 7) & 0x7ffffff8 // Word align to make any future copying of this buffer faster\n\t\t\tstart = position\n\t\t\tif (encodeOptions & RESERVE_START_SPACE) position += (encodeOptions & 0xff)\n\t\t\treferenceMap = packr.structuredClone ? new Map() : null\n\t\t\tif (packr.bundleStrings && typeof value !== 'string') {\n\t\t\t\tbundledStrings = []\n\t\t\t\tbundledStrings.size = Infinity // force a new bundle start on first string\n\t\t\t} else\n\t\t\t\tbundledStrings = null\n\t\t\tstructures = packr.structures\n\t\t\tif (structures) {\n\t\t\t\tif (structures.uninitialized)\n\t\t\t\t\tstructures = packr._mergeStructures(packr.getStructures())\n\t\t\t\tlet sharedLength = structures.sharedLength || 0\n\t\t\t\tif (sharedLength > maxSharedStructures) {\n\t\t\t\t\t//if (maxSharedStructures <= 32 && structures.sharedLength > 32) // TODO: could support this, but would need to update the limit ids\n\t\t\t\t\tthrow new Error('Shared structures is larger than maximum shared structures, try increasing maxSharedStructures to ' + structures.sharedLength)\n\t\t\t\t}\n\t\t\t\tif (!structures.transitions) {\n\t\t\t\t\t// rebuild our structure transitions\n\t\t\t\t\tstructures.transitions = Object.create(null)\n\t\t\t\t\tfor (let i = 0; i < sharedLength; i++) {\n\t\t\t\t\t\tlet keys = structures[i]\n\t\t\t\t\t\tif (!keys)\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\tlet nextTransition, transition = structures.transitions\n\t\t\t\t\t\tfor (let j = 0, l = keys.length; j < l; j++) {\n\t\t\t\t\t\t\tlet key = keys[j]\n\t\t\t\t\t\t\tnextTransition = transition[key]\n\t\t\t\t\t\t\tif (!nextTransition) {\n\t\t\t\t\t\t\t\tnextTransition = transition[key] = Object.create(null)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttransition = nextTransition\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttransition[RECORD_SYMBOL] = i + 0x40\n\t\t\t\t\t}\n\t\t\t\t\tthis.lastNamedStructuresLength = sharedLength\n\t\t\t\t}\n\t\t\t\tif (!isSequential) {\n\t\t\t\t\tstructures.nextId = sharedLength + 0x40\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (hasSharedUpdate)\n\t\t\t\thasSharedUpdate = false\n\t\t\tlet encodingError;\n\t\t\ttry {\n\t\t\t\tif (packr.randomAccessStructure && value && value.constructor && value.constructor === Object)\n\t\t\t\t\twriteStruct(value);\n\t\t\t\telse\n\t\t\t\t\tpack(value)\n\t\t\t\tlet lastBundle = bundledStrings;\n\t\t\t\tif (bundledStrings)\n\t\t\t\t\twriteBundles(start, pack, 0)\n\t\t\t\tif (referenceMap && referenceMap.idsToInsert) {\n\t\t\t\t\tlet idsToInsert = referenceMap.idsToInsert.sort((a, b) => a.offset > b.offset ? 1 : -1);\n\t\t\t\t\tlet i = idsToInsert.length;\n\t\t\t\t\tlet incrementPosition = -1;\n\t\t\t\t\twhile (lastBundle && i > 0) {\n\t\t\t\t\t\tlet insertionPoint = idsToInsert[--i].offset + start;\n\t\t\t\t\t\tif (insertionPoint < (lastBundle.stringsPosition + start) && incrementPosition === -1)\n\t\t\t\t\t\t\tincrementPosition = 0;\n\t\t\t\t\t\tif (insertionPoint > (lastBundle.position + start)) {\n\t\t\t\t\t\t\tif (incrementPosition >= 0)\n\t\t\t\t\t\t\t\tincrementPosition += 6;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (incrementPosition >= 0) {\n\t\t\t\t\t\t\t\t// update the bundle reference now\n\t\t\t\t\t\t\t\ttargetView.setUint32(lastBundle.position + start,\n\t\t\t\t\t\t\t\t\ttargetView.getUint32(lastBundle.position + start) + incrementPosition)\n\t\t\t\t\t\t\t\tincrementPosition = -1; // reset\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlastBundle = lastBundle.previous;\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (incrementPosition >= 0 && lastBundle) {\n\t\t\t\t\t\t// update the bundle reference now\n\t\t\t\t\t\ttargetView.setUint32(lastBundle.position + start,\n\t\t\t\t\t\t\ttargetView.getUint32(lastBundle.position + start) + incrementPosition)\n\t\t\t\t\t}\n\t\t\t\t\tposition += idsToInsert.length * 6;\n\t\t\t\t\tif (position > safeEnd)\n\t\t\t\t\t\tmakeRoom(position)\n\t\t\t\t\tpackr.offset = position\n\t\t\t\t\tlet serialized = insertIds(target.subarray(start, position), idsToInsert)\n\t\t\t\t\treferenceMap = null\n\t\t\t\t\treturn serialized\n\t\t\t\t}\n\t\t\t\tpackr.offset = position // update the offset so next serialization doesn't write over our buffer, but can continue writing to same buffer sequentially\n\t\t\t\tif (encodeOptions & REUSE_BUFFER_MODE) {\n\t\t\t\t\ttarget.start = start\n\t\t\t\t\ttarget.end = position\n\t\t\t\t\treturn target\n\t\t\t\t}\n\t\t\t\treturn target.subarray(start, position) // position can change if we call pack again in saveStructures, so we get the buffer now\n\t\t\t} catch(error) {\n\t\t\t\tencodingError = error;\n\t\t\t\tthrow error;\n\t\t\t} finally {\n\t\t\t\tif (structures) {\n\t\t\t\t\tresetStructures();\n\t\t\t\t\tif (hasSharedUpdate && packr.saveStructures) {\n\t\t\t\t\t\tlet sharedLength = structures.sharedLength || 0\n\t\t\t\t\t\t// we can't rely on start/end with REUSE_BUFFER_MODE since they will (probably) change when we save\n\t\t\t\t\t\tlet returnBuffer = target.subarray(start, position)\n\t\t\t\t\t\tlet newSharedData = prepareStructures(structures, packr);\n\t\t\t\t\t\tif (!encodingError) { // TODO: If there is an encoding error, should make the structures as uninitialized so they get rebuilt next time\n\t\t\t\t\t\t\tif (packr.saveStructures(newSharedData, newSharedData.isCompatible) === false) {\n\t\t\t\t\t\t\t\t// get updated structures and try again if the update failed\n\t\t\t\t\t\t\t\treturn packr.pack(value, encodeOptions)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpackr.lastNamedStructuresLength = sharedLength\n\t\t\t\t\t\t\t// don't keep large buffers around\n\t\t\t\t\t\t\tif (target.length > 0x40000000) target = null\n\t\t\t\t\t\t\treturn returnBuffer\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// don't keep large buffers around, they take too much memory and cause problems (limit at 1GB)\n\t\t\t\tif (target.length > 0x40000000) target = null\n\t\t\t\tif (encodeOptions & RESET_BUFFER_MODE)\n\t\t\t\t\tposition = start\n\t\t\t}\n\t\t}\n\t\tconst resetStructures = () => {\n\t\t\tif (serializationsSinceTransitionRebuild < 10)\n\t\t\t\tserializationsSinceTransitionRebuild++\n\t\t\tlet sharedLength = structures.sharedLength || 0\n\t\t\tif (structures.length > sharedLength && !isSequential)\n\t\t\t\tstructures.length = sharedLength\n\t\t\tif (transitionsCount > 10000) {\n\t\t\t\t// force a rebuild occasionally after a lot of transitions so it can get cleaned up\n\t\t\t\tstructures.transitions = null\n\t\t\t\tserializationsSinceTransitionRebuild = 0\n\t\t\t\ttransitionsCount = 0\n\t\t\t\tif (recordIdsToRemove.length > 0)\n\t\t\t\t\trecordIdsToRemove = []\n\t\t\t} else if (recordIdsToRemove.length > 0 && !isSequential) {\n\t\t\t\tfor (let i = 0, l = recordIdsToRemove.length; i < l; i++) {\n\t\t\t\t\trecordIdsToRemove[i][RECORD_SYMBOL] = 0\n\t\t\t\t}\n\t\t\t\trecordIdsToRemove = []\n\t\t\t}\n\t\t}\n\t\tconst packArray = (value) => {\n\t\t\tvar length = value.length\n\t\t\tif (length < 0x10) {\n\t\t\t\ttarget[position++] = 0x90 | length\n\t\t\t} else if (length < 0x10000) {\n\t\t\t\ttarget[position++] = 0xdc\n\t\t\t\ttarget[position++] = length >> 8\n\t\t\t\ttarget[position++] = length & 0xff\n\t\t\t} else {\n\t\t\t\ttarget[position++] = 0xdd\n\t\t\t\ttargetView.setUint32(position, length)\n\t\t\t\tposition += 4\n\t\t\t}\n\t\t\tfor (let i = 0; i < length; i++) {\n\t\t\t\tpack(value[i])\n\t\t\t}\n\t\t}\n\t\tconst pack = (value) => {\n\t\t\tif (position > safeEnd)\n\t\t\t\ttarget = makeRoom(position)\n\n\t\t\tvar type = typeof value\n\t\t\tvar length\n\t\t\tif (type === 'string') {\n\t\t\t\tlet strLength = value.length\n\t\t\t\tif (bundledStrings && strLength >= 4 && strLength < 0x1000) {\n\t\t\t\t\tif ((bundledStrings.size += strLength) > MAX_BUNDLE_SIZE) {\n\t\t\t\t\t\tlet extStart\n\t\t\t\t\t\tlet maxBytes = (bundledStrings[0] ? bundledStrings[0].length * 3 + bundledStrings[1].length : 0) + 10\n\t\t\t\t\t\tif (position + maxBytes > safeEnd)\n\t\t\t\t\t\t\ttarget = makeRoom(position + maxBytes)\n\t\t\t\t\t\tlet lastBundle\n\t\t\t\t\t\tif (bundledStrings.position) { // here we use the 0x62 extension to write the last bundle and reserve space for the reference pointer to the next/current bundle\n\t\t\t\t\t\t\tlastBundle = bundledStrings\n\t\t\t\t\t\t\ttarget[position] = 0xc8 // ext 16\n\t\t\t\t\t\t\tposition += 3 // reserve for the writing bundle size\n\t\t\t\t\t\t\ttarget[position++] = 0x62 // 'b'\n\t\t\t\t\t\t\textStart = position - start\n\t\t\t\t\t\t\tposition += 4 // reserve for writing bundle reference\n\t\t\t\t\t\t\twriteBundles(start, pack, 0) // write the last bundles\n\t\t\t\t\t\t\ttargetView.setUint16(extStart + start - 3, position - start - extStart)\n\t\t\t\t\t\t} else { // here we use the 0x62 extension just to reserve the space for the reference pointer to the bundle (will be updated once the bundle is written)\n\t\t\t\t\t\t\ttarget[position++] = 0xd6 // fixext 4\n\t\t\t\t\t\t\ttarget[position++] = 0x62 // 'b'\n\t\t\t\t\t\t\textStart = position - start\n\t\t\t\t\t\t\tposition += 4 // reserve for writing bundle reference\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbundledStrings = ['', ''] // create new ones\n\t\t\t\t\t\tbundledStrings.previous = lastBundle;\n\t\t\t\t\t\tbundledStrings.size = 0\n\t\t\t\t\t\tbundledStrings.position = extStart\n\t\t\t\t\t}\n\t\t\t\t\tlet twoByte = hasNonLatin.test(value)\n\t\t\t\t\tbundledStrings[twoByte ? 0 : 1] += value\n\t\t\t\t\ttarget[position++] = 0xc1\n\t\t\t\t\tpack(twoByte ? -strLength : strLength);\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tlet headerSize\n\t\t\t\t// first we estimate the header size, so we can write to the correct location\n\t\t\t\tif (strLength < 0x20) {\n\t\t\t\t\theaderSize = 1\n\t\t\t\t} else if (strLength < 0x100) {\n\t\t\t\t\theaderSize = 2\n\t\t\t\t} else if (strLength < 0x10000) {\n\t\t\t\t\theaderSize = 3\n\t\t\t\t} else {\n\t\t\t\t\theaderSize = 5\n\t\t\t\t}\n\t\t\t\tlet maxBytes = strLength * 3\n\t\t\t\tif (position + maxBytes > safeEnd)\n\t\t\t\t\ttarget = makeRoom(position + maxBytes)\n\n\t\t\t\tif (strLength < 0x40 || !encodeUtf8) {\n\t\t\t\t\tlet i, c1, c2, strPosition = position + headerSize\n\t\t\t\t\tfor (i = 0; i < strLength; i++) {\n\t\t\t\t\t\tc1 = value.charCodeAt(i)\n\t\t\t\t\t\tif (c1 < 0x80) {\n\t\t\t\t\t\t\ttarget[strPosition++] = c1\n\t\t\t\t\t\t} else if (c1 < 0x800) {\n\t\t\t\t\t\t\ttarget[strPosition++] = c1 >> 6 | 0xc0\n\t\t\t\t\t\t\ttarget[strPosition++] = c1 & 0x3f | 0x80\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t(c1 & 0xfc00) === 0xd800 &&\n\t\t\t\t\t\t\t((c2 = value.charCodeAt(i + 1)) & 0xfc00) === 0xdc00\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tc1 = 0x10000 + ((c1 & 0x03ff) << 10) + (c2 & 0x03ff)\n\t\t\t\t\t\t\ti++\n\t\t\t\t\t\t\ttarget[strPosition++] = c1 >> 18 | 0xf0\n\t\t\t\t\t\t\ttarget[strPosition++] = c1 >> 12 & 0x3f | 0x80\n\t\t\t\t\t\t\ttarget[strPosition++] = c1 >> 6 & 0x3f | 0x80\n\t\t\t\t\t\t\ttarget[strPosition++] = c1 & 0x3f | 0x80\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttarget[strPosition++] = c1 >> 12 | 0xe0\n\t\t\t\t\t\t\ttarget[strPosition++] = c1 >> 6 & 0x3f | 0x80\n\t\t\t\t\t\t\ttarget[strPosition++] = c1 & 0x3f | 0x80\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlength = strPosition - position - headerSize\n\t\t\t\t} else {\n\t\t\t\t\tlength = encodeUtf8(value, position + headerSize)\n\t\t\t\t}\n\n\t\t\t\tif (length < 0x20) {\n\t\t\t\t\ttarget[position++] = 0xa0 | length\n\t\t\t\t} else if (length < 0x100) {\n\t\t\t\t\tif (headerSize < 2) {\n\t\t\t\t\t\ttarget.copyWithin(position + 2, position + 1, position + 1 + length)\n\t\t\t\t\t}\n\t\t\t\t\ttarget[position++] = 0xd9\n\t\t\t\t\ttarget[position++] = length\n\t\t\t\t} else if (length < 0x10000) {\n\t\t\t\t\tif (headerSize < 3) {\n\t\t\t\t\t\ttarget.copyWithin(position + 3, position + 2, position + 2 + length)\n\t\t\t\t\t}\n\t\t\t\t\ttarget[position++] = 0xda\n\t\t\t\t\ttarget[position++] = length >> 8\n\t\t\t\t\ttarget[position++] = length & 0xff\n\t\t\t\t} else {\n\t\t\t\t\tif (headerSize < 5) {\n\t\t\t\t\t\ttarget.copyWithin(position + 5, position + 3, position + 3 + length)\n\t\t\t\t\t}\n\t\t\t\t\ttarget[position++] = 0xdb\n\t\t\t\t\ttargetView.setUint32(position, length)\n\t\t\t\t\tposition += 4\n\t\t\t\t}\n\t\t\t\tposition += length\n\t\t\t} else if (type === 'number') {\n\t\t\t\tif (value >>> 0 === value) {// positive integer, 32-bit or less\n\t\t\t\t\t// positive uint\n\t\t\t\t\tif (value < 0x20 || (value < 0x80 && this.useRecords === false) || (value < 0x40 && !this.randomAccessStructure)) {\n\t\t\t\t\t\ttarget[position++] = value\n\t\t\t\t\t} else if (value < 0x100) {\n\t\t\t\t\t\ttarget[position++] = 0xcc\n\t\t\t\t\t\ttarget[position++] = value\n\t\t\t\t\t} else if (value < 0x10000) {\n\t\t\t\t\t\ttarget[position++] = 0xcd\n\t\t\t\t\t\ttarget[position++] = value >> 8\n\t\t\t\t\t\ttarget[position++] = value & 0xff\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget[position++] = 0xce\n\t\t\t\t\t\ttargetView.setUint32(position, value)\n\t\t\t\t\t\tposition += 4\n\t\t\t\t\t}\n\t\t\t\t} else if (value >> 0 === value) { // negative integer\n\t\t\t\t\tif (value >= -0x20) {\n\t\t\t\t\t\ttarget[position++] = 0x100 + value\n\t\t\t\t\t} else if (value >= -0x80) {\n\t\t\t\t\t\ttarget[position++] = 0xd0\n\t\t\t\t\t\ttarget[position++] = value + 0x100\n\t\t\t\t\t} else if (value >= -0x8000) {\n\t\t\t\t\t\ttarget[position++] = 0xd1\n\t\t\t\t\t\ttargetView.setInt16(position, value)\n\t\t\t\t\t\tposition += 2\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget[position++] = 0xd2\n\t\t\t\t\t\ttargetView.setInt32(position, value)\n\t\t\t\t\t\tposition += 4\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlet useFloat32\n\t\t\t\t\tif ((useFloat32 = this.useFloat32) > 0 && value < 0x100000000 && value >= -0x80000000) {\n\t\t\t\t\t\ttarget[position++] = 0xca\n\t\t\t\t\t\ttargetView.setFloat32(position, value)\n\t\t\t\t\t\tlet xShifted\n\t\t\t\t\t\tif (useFloat32 < 4 ||\n\t\t\t\t\t\t\t\t// this checks for rounding of numbers that were encoded in 32-bit float to nearest significant decimal digit that could be preserved\n\t\t\t\t\t\t\t\t((xShifted = value * mult10[((target[position] & 0x7f) << 1) | (target[position + 1] >> 7)]) >> 0) === xShifted) {\n\t\t\t\t\t\t\tposition += 4\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tposition-- // move back into position for writing a double\n\t\t\t\t\t}\n\t\t\t\t\ttarget[position++] = 0xcb\n\t\t\t\t\ttargetView.setFloat64(position, value)\n\t\t\t\t\tposition += 8\n\t\t\t\t}\n\t\t\t} else if (type === 'object' || type === 'function') {\n\t\t\t\tif (!value)\n\t\t\t\t\ttarget[position++] = 0xc0\n\t\t\t\telse {\n\t\t\t\t\tif (referenceMap) {\n\t\t\t\t\t\tlet referee = referenceMap.get(value)\n\t\t\t\t\t\tif (referee) {\n\t\t\t\t\t\t\tif (!referee.id) {\n\t\t\t\t\t\t\t\tlet idsToInsert = referenceMap.idsToInsert || (referenceMap.idsToInsert = [])\n\t\t\t\t\t\t\t\treferee.id = idsToInsert.push(referee)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttarget[position++] = 0xd6 // fixext 4\n\t\t\t\t\t\t\ttarget[position++] = 0x70 // \"p\" for pointer\n\t\t\t\t\t\t\ttargetView.setUint32(position, referee.id)\n\t\t\t\t\t\t\tposition += 4\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\treferenceMap.set(value, { offset: position - start })\n\t\t\t\t\t}\n\t\t\t\t\tlet constructor = value.constructor\n\t\t\t\t\tif (constructor === Object) {\n\t\t\t\t\t\twriteObject(value)\n\t\t\t\t\t} else if (constructor === Array) {\n\t\t\t\t\t\tpackArray(value)\n\t\t\t\t\t} else if (constructor === Map) {\n\t\t\t\t\t\tif (this.mapAsEmptyObject) target[position++] = 0x80\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tlength = value.size\n\t\t\t\t\t\t\tif (length < 0x10) {\n\t\t\t\t\t\t\t\ttarget[position++] = 0x80 | length\n\t\t\t\t\t\t\t} else if (length < 0x10000) {\n\t\t\t\t\t\t\t\ttarget[position++] = 0xde\n\t\t\t\t\t\t\t\ttarget[position++] = length >> 8\n\t\t\t\t\t\t\t\ttarget[position++] = length & 0xff\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttarget[position++] = 0xdf\n\t\t\t\t\t\t\t\ttargetView.setUint32(position, length)\n\t\t\t\t\t\t\t\tposition += 4\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor (let [key, entryValue] of value) {\n\t\t\t\t\t\t\t\tpack(key)\n\t\t\t\t\t\t\t\tpack(entryValue)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let i = 0, l = extensions.length; i < l; i++) {\n\t\t\t\t\t\t\tlet extensionClass = extensionClasses[i]\n\t\t\t\t\t\t\tif (value instanceof extensionClass) {\n\t\t\t\t\t\t\t\tlet extension = extensions[i]\n\t\t\t\t\t\t\t\tif (extension.write) {\n\t\t\t\t\t\t\t\t\tif (extension.type) {\n\t\t\t\t\t\t\t\t\t\ttarget[position++] = 0xd4 // one byte \"tag\" extension\n\t\t\t\t\t\t\t\t\t\ttarget[position++] = extension.type\n\t\t\t\t\t\t\t\t\t\ttarget[position++] = 0\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tlet writeResult = extension.write.call(this, value)\n\t\t\t\t\t\t\t\t\tif (writeResult === value) { // avoid infinite recursion\n\t\t\t\t\t\t\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\t\t\t\t\t\t\tpackArray(value)\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\twriteObject(value)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tpack(writeResult)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tlet currentTarget = target\n\t\t\t\t\t\t\t\tlet currentTargetView = targetView\n\t\t\t\t\t\t\t\tlet currentPosition = position\n\t\t\t\t\t\t\t\ttarget = null\n\t\t\t\t\t\t\t\tlet result\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tresult = extension.pack.call(this, value, (size) => {\n\t\t\t\t\t\t\t\t\t\t// restore target and use it\n\t\t\t\t\t\t\t\t\t\ttarget = currentTarget\n\t\t\t\t\t\t\t\t\t\tcurrentTarget = null\n\t\t\t\t\t\t\t\t\t\tposition += size\n\t\t\t\t\t\t\t\t\t\tif (position > safeEnd)\n\t\t\t\t\t\t\t\t\t\t\tmakeRoom(position)\n\t\t\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t\t\ttarget, targetView, position: position - size\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}, pack)\n\t\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\t\t// restore current target information (unless already restored)\n\t\t\t\t\t\t\t\t\tif (currentTarget) {\n\t\t\t\t\t\t\t\t\t\ttarget = currentTarget\n\t\t\t\t\t\t\t\t\t\ttargetView = currentTargetView\n\t\t\t\t\t\t\t\t\t\tposition = currentPosition\n\t\t\t\t\t\t\t\t\t\tsafeEnd = target.length - 10\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (result) {\n\t\t\t\t\t\t\t\t\tif (result.length + position > safeEnd)\n\t\t\t\t\t\t\t\t\t\tmakeRoom(result.length + position)\n\t\t\t\t\t\t\t\t\tposition = writeExtensionData(result, target, position, extension.type)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// check isArray after extensions, because extensions can extend Array\n\t\t\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\t\t\tpackArray(value)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// use this as an alternate mechanism for expressing how to serialize\n\t\t\t\t\t\t\tif (value.toJSON) {\n\t\t\t\t\t\t\t\tconst json = value.toJSON()\n\t\t\t\t\t\t\t\t// if for some reason value.toJSON returns itself it'll loop forever\n\t\t\t\t\t\t\t\tif (json !== value)\n\t\t\t\t\t\t\t\t\treturn pack(json)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// if there is a writeFunction, use it, otherwise just encode as undefined\n\t\t\t\t\t\t\tif (type === 'function')\n\t\t\t\t\t\t\t\treturn pack(this.writeFunction && this.writeFunction(value));\n\n\t\t\t\t\t\t\t// no extension found, write as plain object\n\t\t\t\t\t\t\twriteObject(value)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (type === 'boolean') {\n\t\t\t\ttarget[position++] = value ? 0xc3 : 0xc2\n\t\t\t} else if (type === 'bigint') {\n\t\t\t\tif (value < 0x8000000000000000 && value >= -0x8000000000000000) {\n\t\t\t\t\t// use a signed int as long as it fits\n\t\t\t\t\ttarget[position++] = 0xd3\n\t\t\t\t\ttargetView.setBigInt64(position, value)\n\t\t\t\t} else if (value < 0x10000000000000000 && value > 0) {\n\t\t\t\t\t// if we can fit an unsigned int, use that\n\t\t\t\t\ttarget[position++] = 0xcf\n\t\t\t\t\ttargetView.setBigUint64(position, value)\n\t\t\t\t} else {\n\t\t\t\t\t// overflow\n\t\t\t\t\tif (this.largeBigIntToFloat) {\n\t\t\t\t\t\ttarget[position++] = 0xcb\n\t\t\t\t\t\ttargetView.setFloat64(position, Number(value))\n\t\t\t\t\t} else if (this.largeBigIntToString) {\n\t\t\t\t\t\treturn pack(value.toString());\n\t\t\t\t\t} else if (this.useBigIntExtension || this.moreTypes) {\n\t\t\t\t\t\tlet empty = value < 0 ? BigInt(-1) : BigInt(0)\n\n\t\t\t\t\t\tlet array\n\t\t\t\t\t\tif (value >> BigInt(0x10000) === empty) {\n\t\t\t\t\t\t\tlet mask = BigInt(0x10000000000000000) - BigInt(1) // literal would overflow\n\t\t\t\t\t\t\tlet chunks = []\n\t\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\t\tchunks.push(value & mask)\n\t\t\t\t\t\t\t\tif ((value >> BigInt(63)) === empty) break\n\t\t\t\t\t\t\t\tvalue >>= BigInt(64)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tarray = new Uint8Array(new BigUint64Array(chunks).buffer)\n\t\t\t\t\t\t\tarray.reverse()\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlet invert = value < 0\n\t\t\t\t\t\t\tlet string = (invert ? ~value : value).toString(16)\n\t\t\t\t\t\t\tif (string.length % 2) {\n\t\t\t\t\t\t\t\tstring = '0' + string\n\t\t\t\t\t\t\t} else if (parseInt(string.charAt(0), 16) >= 8) {\n\t\t\t\t\t\t\t\tstring = '00' + string\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (hasNodeBuffer) {\n\t\t\t\t\t\t\t\tarray = Buffer.from(string, 'hex')\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tarray = new Uint8Array(string.length / 2)\n\t\t\t\t\t\t\t\tfor (let i = 0; i < array.length; i++) {\n\t\t\t\t\t\t\t\t\tarray[i] = parseInt(string.slice(i * 2, i * 2 + 2), 16)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (invert) {\n\t\t\t\t\t\t\t\tfor (let i = 0; i < array.length; i++) array[i] = ~array[i]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (array.length + position > safeEnd)\n\t\t\t\t\t\t\tmakeRoom(array.length + position)\n\t\t\t\t\t\tposition = writeExtensionData(array, target, position, 0x42)\n\t\t\t\t\t\treturn\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new RangeError(value + ' was too large to fit in MessagePack 64-bit integer format, use' +\n\t\t\t\t\t\t\t' useBigIntExtension, or set largeBigIntToFloat to convert to float-64, or set' +\n\t\t\t\t\t\t\t' largeBigIntToString to convert to string')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tposition += 8\n\t\t\t} else if (type === 'undefined') {\n\t\t\t\tif (this.encodeUndefinedAsNil)\n\t\t\t\t\ttarget[position++] = 0xc0\n\t\t\t\telse {\n\t\t\t\t\ttarget[position++] = 0xd4 // a number of implementations use fixext1 with type 0, data 0 to denote undefined, so we follow suite\n\t\t\t\t\ttarget[position++] = 0\n\t\t\t\t\ttarget[position++] = 0\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error('Unknown type: ' + type)\n\t\t\t}\n\t\t}\n\n\t\tconst writePlainObject = (this.variableMapSize || this.coercibleKeyAsNumber || this.skipValues) ? (object) => {\n\t\t\t// this method is slightly slower, but generates \"preferred serialization\" (optimally small for smaller objects)\n\t\t\tlet keys;\n\t\t\tif (this.skipValues) {\n\t\t\t\tkeys = [];\n\t\t\t\tfor (let key in object) {\n\t\t\t\t\tif ((typeof object.hasOwnProperty !== 'function' || object.hasOwnProperty(key)) &&\n\t\t\t\t\t\t!this.skipValues.includes(object[key]))\n\t\t\t\t\t\tkeys.push(key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tkeys = Object.keys(object)\n\t\t\t}\n\t\t\tlet length = keys.length\n\t\t\tif (length < 0x10) {\n\t\t\t\ttarget[position++] = 0x80 | length\n\t\t\t} else if (length < 0x10000) {\n\t\t\t\ttarget[position++] = 0xde\n\t\t\t\ttarget[position++] = length >> 8\n\t\t\t\ttarget[position++] = length & 0xff\n\t\t\t} else {\n\t\t\t\ttarget[position++] = 0xdf\n\t\t\t\ttargetView.setUint32(position, length)\n\t\t\t\tposition += 4\n\t\t\t}\n\t\t\tlet key\n\t\t\tif (this.coercibleKeyAsNumber) {\n\t\t\t\tfor (let i = 0; i < length; i++) {\n\t\t\t\t\tkey = keys[i]\n\t\t\t\t\tlet num = Number(key)\n\t\t\t\t\tpack(isNaN(num) ? key : num)\n\t\t\t\t\tpack(object[key])\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfor (let i = 0; i < length; i++) {\n\t\t\t\t\tpack(key = keys[i])\n\t\t\t\t\tpack(object[key])\n\t\t\t\t}\n\t\t\t}\n\t\t} :\n\t\t(object) => {\n\t\t\ttarget[position++] = 0xde // always using map 16, so we can preallocate and set the length afterwards\n\t\t\tlet objectOffset = position - start\n\t\t\tposition += 2\n\t\t\tlet size = 0\n\t\t\tfor (let key in object) {\n\t\t\t\tif (typeof object.hasOwnProperty !== 'function' || object.hasOwnProperty(key)) {\n\t\t\t\t\tpack(key)\n\t\t\t\t\tpack(object[key])\n\t\t\t\t\tsize++\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (size > 0xffff) {\n\t\t\t\tthrow new Error('Object is too large to serialize with fast 16-bit map size,' +\n\t\t\t\t' use the \"variableMapSize\" option to serialize this object');\n\t\t\t}\n\t\t\ttarget[objectOffset++ + start] = size >> 8\n\t\t\ttarget[objectOffset + start] = size & 0xff\n\t\t}\n\n\t\tconst writeRecord = this.useRecords === false ? writePlainObject :\n\t\t(options.progressiveRecords && !useTwoByteRecords) ? // this is about 2% faster for highly stable structures, since it only requires one for-in loop (but much more expensive when new structure needs to be written)\n\t\t(object) => {\n\t\t\tlet nextTransition, transition = structures.transitions || (structures.transitions = Object.create(null))\n\t\t\tlet objectOffset = position++ - start\n\t\t\tlet wroteKeys\n\t\t\tfor (let key in object) {\n\t\t\t\tif (typeof object.hasOwnProperty !== 'function' || object.hasOwnProperty(key)) {\n\t\t\t\t\tnextTransition = transition[key]\n\t\t\t\t\tif (nextTransition)\n\t\t\t\t\t\ttransition = nextTransition\n\t\t\t\t\telse {\n\t\t\t\t\t\t// record doesn't exist, create full new record and insert it\n\t\t\t\t\t\tlet keys = Object.keys(object)\n\t\t\t\t\t\tlet lastTransition = transition\n\t\t\t\t\t\ttransition = structures.transitions\n\t\t\t\t\t\tlet newTransitions = 0\n\t\t\t\t\t\tfor (let i = 0, l = keys.length; i < l; i++) {\n\t\t\t\t\t\t\tlet key = keys[i]\n\t\t\t\t\t\t\tnextTransition = transition[key]\n\t\t\t\t\t\t\tif (!nextTransition) {\n\t\t\t\t\t\t\t\tnextTransition = transition[key] = Object.create(null)\n\t\t\t\t\t\t\t\tnewTransitions++\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttransition = nextTransition\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (objectOffset + start + 1 == position) {\n\t\t\t\t\t\t\t// first key, so we don't need to insert, we can just write record directly\n\t\t\t\t\t\t\tposition--\n\t\t\t\t\t\t\tnewRecord(transition, keys, newTransitions)\n\t\t\t\t\t\t} else // otherwise we need to insert the record, moving existing data after the record\n\t\t\t\t\t\t\tinsertNewRecord(transition, keys, objectOffset, newTransitions)\n\t\t\t\t\t\twroteKeys = true\n\t\t\t\t\t\ttransition = lastTransition[key]\n\t\t\t\t\t}\n\t\t\t\t\tpack(object[key])\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!wroteKeys) {\n\t\t\t\tlet recordId = transition[RECORD_SYMBOL]\n\t\t\t\tif (recordId)\n\t\t\t\t\ttarget[objectOffset + start] = recordId\n\t\t\t\telse\n\t\t\t\t\tinsertNewRecord(transition, Object.keys(object), objectOffset, 0)\n\t\t\t}\n\t\t} :\n\t\t(object) => {\n\t\t\tlet nextTransition, transition = structures.transitions || (structures.transitions = Object.create(null))\n\t\t\tlet newTransitions = 0\n\t\t\tfor (let key in object) if (typeof object.hasOwnProperty !== 'function' || object.hasOwnProperty(key)) {\n\t\t\t\tnextTransition = transition[key]\n\t\t\t\tif (!nextTransition) {\n\t\t\t\t\tnextTransition = transition[key] = Object.create(null)\n\t\t\t\t\tnewTransitions++\n\t\t\t\t}\n\t\t\t\ttransition = nextTransition\n\t\t\t}\n\t\t\tlet recordId = transition[RECORD_SYMBOL]\n\t\t\tif (recordId) {\n\t\t\t\tif (recordId >= 0x60 && useTwoByteRecords) {\n\t\t\t\t\ttarget[position++] = ((recordId -= 0x60) & 0x1f) + 0x60\n\t\t\t\t\ttarget[position++] = recordId >> 5\n\t\t\t\t} else\n\t\t\t\t\ttarget[position++] = recordId\n\t\t\t} else {\n\t\t\t\tnewRecord(transition, transition.__keys__ || Object.keys(object), newTransitions)\n\t\t\t}\n\t\t\t// now write the values\n\t\t\tfor (let key in object)\n\t\t\t\tif (typeof object.hasOwnProperty !== 'function' || object.hasOwnProperty(key)) {\n\t\t\t\t\tpack(object[key])\n\t\t\t\t}\n\t\t}\n\n\t\t// create reference to useRecords if useRecords is a function\n\t\tconst checkUseRecords = typeof this.useRecords == 'function' && this.useRecords;\n\n\t\tconst writeObject = checkUseRecords ? (object) => {\n\t\t\tcheckUseRecords(object) ? writeRecord(object) : writePlainObject(object)\n\t\t} : writeRecord\n\n\t\tconst makeRoom = (end) => {\n\t\t\tlet newSize\n\t\t\tif (end > 0x1000000) {\n\t\t\t\t// special handling for really large buffers\n\t\t\t\tif ((end - start) > MAX_BUFFER_SIZE)\n\t\t\t\t\tthrow new Error('Packed buffer would be larger than maximum buffer size')\n\t\t\t\tnewSize = Math.min(MAX_BUFFER_SIZE,\n\t\t\t\t\tMath.round(Math.max((end - start) * (end > 0x4000000 ? 1.25 : 2), 0x400000) / 0x1000) * 0x1000)\n\t\t\t} else // faster handling for smaller buffers\n\t\t\t\tnewSize = ((Math.max((end - start) << 2, target.length - 1) >> 12) + 1) << 12\n\t\t\tlet newBuffer = new ByteArrayAllocate(newSize)\n\t\t\ttargetView = newBuffer.dataView || (newBuffer.dataView = new DataView(newBuffer.buffer, 0, newSize))\n\t\t\tend = Math.min(end, target.length)\n\t\t\tif (target.copy)\n\t\t\t\ttarget.copy(newBuffer, 0, start, end)\n\t\t\telse\n\t\t\t\tnewBuffer.set(target.slice(start, end))\n\t\t\tposition -= start\n\t\t\tstart = 0\n\t\t\tsafeEnd = newBuffer.length - 10\n\t\t\treturn target = newBuffer\n\t\t}\n\t\tconst newRecord = (transition, keys, newTransitions) => {\n\t\t\tlet recordId = structures.nextId\n\t\t\tif (!recordId)\n\t\t\t\trecordId = 0x40\n\t\t\tif (recordId < sharedLimitId && this.shouldShareStructure && !this.shouldShareStructure(keys)) {\n\t\t\t\trecordId = structures.nextOwnId\n\t\t\t\tif (!(recordId < maxStructureId))\n\t\t\t\t\trecordId = sharedLimitId\n\t\t\t\tstructures.nextOwnId = recordId + 1\n\t\t\t} else {\n\t\t\t\tif (recordId >= maxStructureId)// cycle back around\n\t\t\t\t\trecordId = sharedLimitId\n\t\t\t\tstructures.nextId = recordId + 1\n\t\t\t}\n\t\t\tlet highByte = keys.highByte = recordId >= 0x60 && useTwoByteRecords ? (recordId - 0x60) >> 5 : -1\n\t\t\ttransition[RECORD_SYMBOL] = recordId\n\t\t\ttransition.__keys__ = keys\n\t\t\tstructures[recordId - 0x40] = keys\n\n\t\t\tif (recordId < sharedLimitId) {\n\t\t\t\tkeys.isShared = true\n\t\t\t\tstructures.sharedLength = recordId - 0x3f\n\t\t\t\thasSharedUpdate = true\n\t\t\t\tif (highByte >= 0) {\n\t\t\t\t\ttarget[position++] = (recordId & 0x1f) + 0x60\n\t\t\t\t\ttarget[position++] = highByte\n\t\t\t\t} else {\n\t\t\t\t\ttarget[position++] = recordId\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (highByte >= 0) {\n\t\t\t\t\ttarget[position++] = 0xd5 // fixext 2\n\t\t\t\t\ttarget[position++] = 0x72 // \"r\" record defintion extension type\n\t\t\t\t\ttarget[position++] = (recordId & 0x1f) + 0x60\n\t\t\t\t\ttarget[position++] = highByte\n\t\t\t\t} else {\n\t\t\t\t\ttarget[position++] = 0xd4 // fixext 1\n\t\t\t\t\ttarget[position++] = 0x72 // \"r\" record defintion extension type\n\t\t\t\t\ttarget[position++] = recordId\n\t\t\t\t}\n\n\t\t\t\tif (newTransitions)\n\t\t\t\t\ttransitionsCount += serializationsSinceTransitionRebuild * newTransitions\n\t\t\t\t// record the removal of the id, we can maintain our shared structure\n\t\t\t\tif (recordIdsToRemove.length >= maxOwnStructures)\n\t\t\t\t\trecordIdsToRemove.shift()[RECORD_SYMBOL] = 0 // we are cycling back through, and have to remove old ones\n\t\t\t\trecordIdsToRemove.push(transition)\n\t\t\t\tpack(keys)\n\t\t\t}\n\t\t}\n\t\tconst insertNewRecord = (transition, keys, insertionOffset, newTransitions) => {\n\t\t\tlet mainTarget = target\n\t\t\tlet mainPosition = position\n\t\t\tlet mainSafeEnd = safeEnd\n\t\t\tlet mainStart = start\n\t\t\ttarget = keysTarget\n\t\t\tposition = 0\n\t\t\tstart = 0\n\t\t\tif (!target)\n\t\t\t\tkeysTarget = target = new ByteArrayAllocate(8192)\n\t\t\tsafeEnd = target.length - 10\n\t\t\tnewRecord(transition, keys, newTransitions)\n\t\t\tkeysTarget = target\n\t\t\tlet keysPosition = position\n\t\t\ttarget = mainTarget\n\t\t\tposition = mainPosition\n\t\t\tsafeEnd = mainSafeEnd\n\t\t\tstart = mainStart\n\t\t\tif (keysPosition > 1) {\n\t\t\t\tlet newEnd = position + keysPosition - 1\n\t\t\t\tif (newEnd > safeEnd)\n\t\t\t\t\tmakeRoom(newEnd)\n\t\t\t\tlet insertionPosition = insertionOffset + start\n\t\t\t\ttarget.copyWithin(insertionPosition + keysPosition, insertionPosition + 1, position)\n\t\t\t\ttarget.set(keysTarget.slice(0, keysPosition), insertionPosition)\n\t\t\t\tposition = newEnd\n\t\t\t} else {\n\t\t\t\ttarget[insertionOffset + start] = keysTarget[0]\n\t\t\t}\n\t\t}\n\t\tconst writeStruct = (object) => {\n\t\t\tlet newPosition = writeStructSlots(object, target, start, position, structures, makeRoom, (value, newPosition, notifySharedUpdate) => {\n\t\t\t\tif (notifySharedUpdate)\n\t\t\t\t\treturn hasSharedUpdate = true;\n\t\t\t\tposition = newPosition;\n\t\t\t\tlet startTarget = target;\n\t\t\t\tpack(value);\n\t\t\t\tresetStructures();\n\t\t\t\tif (startTarget !== target) {\n\t\t\t\t\treturn { position, targetView, target }; // indicate the buffer was re-allocated\n\t\t\t\t}\n\t\t\t\treturn position;\n\t\t\t}, this);\n\t\t\tif (newPosition === 0) // bail and go to a msgpack object\n\t\t\t\treturn writeObject(object);\n\t\t\tposition = newPosition;\n\t\t}\n\t}\n\tuseBuffer(buffer) {\n\t\t// this means we are finished using our own buffer and we can write over it safely\n\t\ttarget = buffer\n\t\ttarget.dataView || (target.dataView = new DataView(target.buffer, target.byteOffset, target.byteLength))\n\t\ttargetView = target.dataView;\n\t\tposition = 0\n\t}\n\tset position (value) {\n\t\tposition = value;\n\t}\n\tget position() {\n\t\treturn position;\n\t}\n\tclearSharedData() {\n\t\tif (this.structures)\n\t\t\tthis.structures = []\n\t\tif (this.typedStructs)\n\t\t\tthis.typedStructs = []\n\t}\n}\n\nextensionClasses = [ Date, Set, Error, RegExp, ArrayBuffer, Object.getPrototypeOf(Uint8Array.prototype).constructor /*TypedArray*/, DataView, C1Type ]\nextensions = [{\n\tpack(date, allocateForWrite, pack) {\n\t\tlet seconds = date.getTime() / 1000\n\t\tif ((this.useTimestamp32 || date.getMilliseconds() === 0) && seconds >= 0 && seconds < 0x100000000) {\n\t\t\t// Timestamp 32\n\t\t\tlet { target, targetView, position} = allocateForWrite(6)\n\t\t\ttarget[position++] = 0xd6\n\t\t\ttarget[position++] = 0xff\n\t\t\ttargetView.setUint32(position, seconds)\n\t\t} else if (seconds > 0 && seconds < 0x100000000) {\n\t\t\t// Timestamp 64\n\t\t\tlet { target, targetView, position} = allocateForWrite(10)\n\t\t\ttarget[position++] = 0xd7\n\t\t\ttarget[position++] = 0xff\n\t\t\ttargetView.setUint32(position, date.getMilliseconds() * 4000000 + ((seconds / 1000 / 0x100000000) >> 0))\n\t\t\ttargetView.setUint32(position + 4, seconds)\n\t\t} else if (isNaN(seconds)) {\n\t\t\tif (this.onInvalidDate) {\n\t\t\t\tallocateForWrite(0)\n\t\t\t\treturn pack(this.onInvalidDate())\n\t\t\t}\n\t\t\t// Intentionally invalid timestamp\n\t\t\tlet { target, targetView, position} = allocateForWrite(3)\n\t\t\ttarget[position++] = 0xd4\n\t\t\ttarget[position++] = 0xff\n\t\t\ttarget[position++] = 0xff\n\t\t} else {\n\t\t\t// Timestamp 96\n\t\t\tlet { target, targetView, position} = allocateForWrite(15)\n\t\t\ttarget[position++] = 0xc7\n\t\t\ttarget[position++] = 12\n\t\t\ttarget[position++] = 0xff\n\t\t\ttargetView.setUint32(position, date.getMilliseconds() * 1000000)\n\t\t\ttargetView.setBigInt64(position + 4, BigInt(Math.floor(seconds)))\n\t\t}\n\t}\n}, {\n\tpack(set, allocateForWrite, pack) {\n\t\tif (this.setAsEmptyObject) {\n\t\t\tallocateForWrite(0);\n\t\t\treturn pack({})\n\t\t}\n\t\tlet array = Array.from(set)\n\t\tlet { target, position} = allocateForWrite(this.moreTypes ? 3 : 0)\n\t\tif (this.moreTypes) {\n\t\t\ttarget[position++] = 0xd4\n\t\t\ttarget[position++] = 0x73 // 's' for Set\n\t\t\ttarget[position++] = 0\n\t\t}\n\t\tpack(array)\n\t}\n}, {\n\tpack(error, allocateForWrite, pack) {\n\t\tlet { target, position} = allocateForWrite(this.moreTypes ? 3 : 0)\n\t\tif (this.moreTypes) {\n\t\t\ttarget[position++] = 0xd4\n\t\t\ttarget[position++] = 0x65 // 'e' for error\n\t\t\ttarget[position++] = 0\n\t\t}\n\t\tpack([ error.name, error.message, error.cause ])\n\t}\n}, {\n\tpack(regex, allocateForWrite, pack) {\n\t\tlet { target, position} = allocateForWrite(this.moreTypes ? 3 : 0)\n\t\tif (this.moreTypes) {\n\t\t\ttarget[position++] = 0xd4\n\t\t\ttarget[position++] = 0x78 // 'x' for regeXp\n\t\t\ttarget[position++] = 0\n\t\t}\n\t\tpack([ regex.source, regex.flags ])\n\t}\n}, {\n\tpack(arrayBuffer, allocateForWrite) {\n\t\tif (this.moreTypes)\n\t\t\twriteExtBuffer(arrayBuffer, 0x10, allocateForWrite)\n\t\telse\n\t\t\twriteBuffer(hasNodeBuffer ? Buffer.from(arrayBuffer) : new Uint8Array(arrayBuffer), allocateForWrite)\n\t}\n}, {\n\tpack(typedArray, allocateForWrite) {\n\t\tlet constructor = typedArray.constructor\n\t\tif (constructor !== ByteArray && this.moreTypes)\n\t\t\twriteExtBuffer(typedArray, typedArrays.indexOf(constructor.name), allocateForWrite)\n\t\telse\n\t\t\twriteBuffer(typedArray, allocateForWrite)\n\t}\n}, {\n\tpack(arrayBuffer, allocateForWrite) {\n\t\tif (this.moreTypes)\n\t\t\twriteExtBuffer(arrayBuffer, 0x11, allocateForWrite)\n\t\telse\n\t\t\twriteBuffer(hasNodeBuffer ? Buffer.from(arrayBuffer) : new Uint8Array(arrayBuffer), allocateForWrite)\n\t}\n}, {\n\tpack(c1, allocateForWrite) { // specific 0xC1 object\n\t\tlet { target, position} = allocateForWrite(1)\n\t\ttarget[position] = 0xc1\n\t}\n}]\n\nfunction writeExtBuffer(typedArray, type, allocateForWrite, encode) {\n\tlet length = typedArray.byteLength\n\tif (length + 1 < 0x100) {\n\t\tvar { target, position } = allocateForWrite(4 + length)\n\t\ttarget[position++] = 0xc7\n\t\ttarget[position++] = length + 1\n\t} else if (length + 1 < 0x10000) {\n\t\tvar { target, position } = allocateForWrite(5 + length)\n\t\ttarget[position++] = 0xc8\n\t\ttarget[position++] = (length + 1) >> 8\n\t\ttarget[position++] = (length + 1) & 0xff\n\t} else {\n\t\tvar { target, position, targetView } = allocateForWrite(7 + length)\n\t\ttarget[position++] = 0xc9\n\t\ttargetView.setUint32(position, length + 1) // plus one for the type byte\n\t\tposition += 4\n\t}\n\ttarget[position++] = 0x74 // \"t\" for typed array\n\ttarget[position++] = type\n\tif (!typedArray.buffer) typedArray = new Uint8Array(typedArray)\n\ttarget.set(new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength), position)\n}\nfunction writeBuffer(buffer, allocateForWrite) {\n\tlet length = buffer.byteLength\n\tvar target, position\n\tif (length < 0x100) {\n\t\tvar { target, position } = allocateForWrite(length + 2)\n\t\ttarget[position++] = 0xc4\n\t\ttarget[position++] = length\n\t} else if (length < 0x10000) {\n\t\tvar { target, position } = allocateForWrite(length + 3)\n\t\ttarget[position++] = 0xc5\n\t\ttarget[position++] = length >> 8\n\t\ttarget[position++] = length & 0xff\n\t} else {\n\t\tvar { target, position, targetView } = allocateForWrite(length + 5)\n\t\ttarget[position++] = 0xc6\n\t\ttargetView.setUint32(position, length)\n\t\tposition += 4\n\t}\n\ttarget.set(buffer, position)\n}\n\nfunction writeExtensionData(result, target, position, type) {\n\tlet length = result.length\n\tswitch (length) {\n\t\tcase 1:\n\t\t\ttarget[position++] = 0xd4\n\t\t\tbreak\n\t\tcase 2:\n\t\t\ttarget[position++] = 0xd5\n\t\t\tbreak\n\t\tcase 4:\n\t\t\ttarget[position++] = 0xd6\n\t\t\tbreak\n\t\tcase 8:\n\t\t\ttarget[position++] = 0xd7\n\t\t\tbreak\n\t\tcase 16:\n\t\t\ttarget[position++] = 0xd8\n\t\t\tbreak\n\t\tdefault:\n\t\t\tif (length < 0x100) {\n\t\t\t\ttarget[position++] = 0xc7\n\t\t\t\ttarget[position++] = length\n\t\t\t} else if (length < 0x10000) {\n\t\t\t\ttarget[position++] = 0xc8\n\t\t\t\ttarget[position++] = length >> 8\n\t\t\t\ttarget[position++] = length & 0xff\n\t\t\t} else {\n\t\t\t\ttarget[position++] = 0xc9\n\t\t\t\ttarget[position++] = length >> 24\n\t\t\t\ttarget[position++] = (length >> 16) & 0xff\n\t\t\t\ttarget[position++] = (length >> 8) & 0xff\n\t\t\t\ttarget[position++] = length & 0xff\n\t\t\t}\n\t}\n\ttarget[position++] = type\n\ttarget.set(result, position)\n\tposition += length\n\treturn position\n}\n\nfunction insertIds(serialized, idsToInsert) {\n\t// insert the ids that need to be referenced for structured clones\n\tlet nextId\n\tlet distanceToMove = idsToInsert.length * 6\n\tlet lastEnd = serialized.length - distanceToMove\n\twhile (nextId = idsToInsert.pop()) {\n\t\tlet offset = nextId.offset\n\t\tlet id = nextId.id\n\t\tserialized.copyWithin(offset + distanceToMove, offset, lastEnd)\n\t\tdistanceToMove -= 6\n\t\tlet position = offset + distanceToMove\n\t\tserialized[position++] = 0xd6\n\t\tserialized[position++] = 0x69 // 'i'\n\t\tserialized[position++] = id >> 24\n\t\tserialized[position++] = (id >> 16) & 0xff\n\t\tserialized[position++] = (id >> 8) & 0xff\n\t\tserialized[position++] = id & 0xff\n\t\tlastEnd = offset\n\t}\n\treturn serialized\n}\n\nfunction writeBundles(start, pack, incrementPosition) {\n\tif (bundledStrings.length > 0) {\n\t\ttargetView.setUint32(bundledStrings.position + start, position + incrementPosition - bundledStrings.position - start)\n\t\tbundledStrings.stringsPosition = position - start;\n\t\tlet writeStrings = bundledStrings\n\t\tbundledStrings = null\n\t\tpack(writeStrings[0])\n\t\tpack(writeStrings[1])\n\t}\n}\n\nexport function addExtension(extension) {\n\tif (extension.Class) {\n\t\tif (!extension.pack && !extension.write)\n\t\t\tthrow new Error('Extension has no pack or write function')\n\t\tif (extension.pack && !extension.type)\n\t\t\tthrow new Error('Extension has no type (numeric code to identify the extension)')\n\t\textensionClasses.unshift(extension.Class)\n\t\textensions.unshift(extension)\n\t}\n\tunpackAddExtension(extension)\n}\nfunction prepareStructures(structures, packr) {\n\tstructures.isCompatible = (existingStructures) => {\n\t\tlet compatible = !existingStructures || ((packr.lastNamedStructuresLength || 0) === existingStructures.length)\n\t\tif (!compatible) // we want to merge these existing structures immediately since we already have it and we are in the right transaction\n\t\t\tpackr._mergeStructures(existingStructures);\n\t\treturn compatible;\n\t}\n\treturn structures\n}\nexport function setWriteStructSlots(writeSlots, makeStructures) {\n\twriteStructSlots = writeSlots;\n\tprepareStructures = makeStructures;\n}\n\nlet defaultPackr = new Packr({ useRecords: false })\nexport const pack = defaultPackr.pack\nexport const encode = defaultPackr.pack\nexport const Encoder = Packr\nexport { FLOAT32_OPTIONS } from './unpack.js'\nimport { FLOAT32_OPTIONS } from './unpack.js'\nexport const { NEVER, ALWAYS, DECIMAL_ROUND, DECIMAL_FIT } = FLOAT32_OPTIONS\nexport const REUSE_BUFFER_MODE = 512\nexport const RESET_BUFFER_MODE = 1024\nexport const RESERVE_START_SPACE = 2048\n", "var decoder\ntry {\n\tdecoder = new TextDecoder()\n} catch(error) {}\nvar src\nvar srcEnd\nvar position = 0\nvar alreadySet\nconst EMPTY_ARRAY = []\nvar strings = EMPTY_ARRAY\nvar stringPosition = 0\nvar currentUnpackr = {}\nvar currentStructures\nvar srcString\nvar srcStringStart = 0\nvar srcStringEnd = 0\nvar bundledStrings\nvar referenceMap\nvar currentExtensions = []\nvar dataView\nvar defaultOptions = {\n\tuseRecords: false,\n\tmapsAsObjects: true\n}\nexport class C1Type {}\nexport const C1 = new C1Type()\nC1.name = 'MessagePack 0xC1'\nvar sequentialMode = false\nvar inlineObjectReadThreshold = 2\nvar readStruct, onLoadedStructures, onSaveState\nvar BlockedFunction // we use search and replace to change the next call to BlockedFunction to avoid CSP issues for\n// no-eval build\ntry {\n\tnew Function('')\n} catch(error) {\n\t// if eval variants are not supported, do not create inline object readers ever\n\tinlineObjectReadThreshold = Infinity\n}\n\nexport class Unpackr {\n\tconstructor(options) {\n\t\tif (options) {\n\t\t\tif (options.useRecords === false && options.mapsAsObjects === undefined)\n\t\t\t\toptions.mapsAsObjects = true\n\t\t\tif (options.sequential && options.trusted !== false) {\n\t\t\t\toptions.trusted = true;\n\t\t\t\tif (!options.structures && options.useRecords != false) {\n\t\t\t\t\toptions.structures = []\n\t\t\t\t\tif (!options.maxSharedStructures)\n\t\t\t\t\t\toptions.maxSharedStructures = 0\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (options.structures)\n\t\t\t\toptions.structures.sharedLength = options.structures.length\n\t\t\telse if (options.getStructures) {\n\t\t\t\t(options.structures = []).uninitialized = true // this is what we use to denote an uninitialized structures\n\t\t\t\toptions.structures.sharedLength = 0\n\t\t\t}\n\t\t\tif (options.int64AsNumber) {\n\t\t\t\toptions.int64AsType = 'number'\n\t\t\t}\n\t\t}\n\t\tObject.assign(this, options)\n\t}\n\tunpack(source, options) {\n\t\tif (src) {\n\t\t\t// re-entrant execution, save the state and restore it after we do this unpack\n\t\t\treturn saveState(() => {\n\t\t\t\tclearSource()\n\t\t\t\treturn this ? this.unpack(source, options) : Unpackr.prototype.unpack.call(defaultOptions, source, options)\n\t\t\t})\n\t\t}\n\t\tif (!source.buffer && source.constructor === ArrayBuffer)\n\t\t\tsource = typeof Buffer !== 'undefined' ? Buffer.from(source) : new Uint8Array(source);\n\t\tif (typeof options === 'object') {\n\t\t\tsrcEnd = options.end || source.length\n\t\t\tposition = options.start || 0\n\t\t} else {\n\t\t\tposition = 0\n\t\t\tsrcEnd = options > -1 ? options : source.length\n\t\t}\n\t\tstringPosition = 0\n\t\tsrcStringEnd = 0\n\t\tsrcString = null\n\t\tstrings = EMPTY_ARRAY\n\t\tbundledStrings = null\n\t\tsrc = source\n\t\t// this provides cached access to the data view for a buffer if it is getting reused, which is a recommend\n\t\t// technique for getting data from a database where it can be copied into an existing buffer instead of creating\n\t\t// new ones\n\t\ttry {\n\t\t\tdataView = source.dataView || (source.dataView = new DataView(source.buffer, source.byteOffset, source.byteLength))\n\t\t} catch(error) {\n\t\t\t// if it doesn't have a buffer, maybe it is the wrong type of object\n\t\t\tsrc = null\n\t\t\tif (source instanceof Uint8Array)\n\t\t\t\tthrow error\n\t\t\tthrow new Error('Source must be a Uint8Array or Buffer but was a ' + ((source && typeof source == 'object') ? source.constructor.name : typeof source))\n\t\t}\n\t\tif (this instanceof Unpackr) {\n\t\t\tcurrentUnpackr = this\n\t\t\tif (this.structures) {\n\t\t\t\tcurrentStructures = this.structures\n\t\t\t\treturn checkedRead(options)\n\t\t\t} else if (!currentStructures || currentStructures.length > 0) {\n\t\t\t\tcurrentStructures = []\n\t\t\t}\n\t\t} else {\n\t\t\tcurrentUnpackr = defaultOptions\n\t\t\tif (!currentStructures || currentStructures.length > 0)\n\t\t\t\tcurrentStructures = []\n\t\t}\n\t\treturn checkedRead(options)\n\t}\n\tunpackMultiple(source, forEach) {\n\t\tlet values, lastPosition = 0\n\t\ttry {\n\t\t\tsequentialMode = true\n\t\t\tlet size = source.length\n\t\t\tlet value = this ? this.unpack(source, size) : defaultUnpackr.unpack(source, size)\n\t\t\tif (forEach) {\n\t\t\t\tif (forEach(value, lastPosition, position) === false) return;\n\t\t\t\twhile(position < size) {\n\t\t\t\t\tlastPosition = position\n\t\t\t\t\tif (forEach(checkedRead(), lastPosition, position) === false) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalues = [ value ]\n\t\t\t\twhile(position < size) {\n\t\t\t\t\tlastPosition = position\n\t\t\t\t\tvalues.push(checkedRead())\n\t\t\t\t}\n\t\t\t\treturn values\n\t\t\t}\n\t\t} catch(error) {\n\t\t\terror.lastPosition = lastPosition\n\t\t\terror.values = values\n\t\t\tthrow error\n\t\t} finally {\n\t\t\tsequentialMode = false\n\t\t\tclearSource()\n\t\t}\n\t}\n\t_mergeStructures(loadedStructures, existingStructures) {\n\t\tif (onLoadedStructures)\n\t\t\tloadedStructures = onLoadedStructures.call(this, loadedStructures);\n\t\tloadedStructures = loadedStructures || []\n\t\tif (Object.isFrozen(loadedStructures))\n\t\t\tloadedStructures = loadedStructures.map(structure => structure.slice(0))\n\t\tfor (let i = 0, l = loadedStructures.length; i < l; i++) {\n\t\t\tlet structure = loadedStructures[i]\n\t\t\tif (structure) {\n\t\t\t\tstructure.isShared = true\n\t\t\t\tif (i >= 32)\n\t\t\t\t\tstructure.highByte = (i - 32) >> 5\n\t\t\t}\n\t\t}\n\t\tloadedStructures.sharedLength = loadedStructures.length\n\t\tfor (let id in existingStructures || []) {\n\t\t\tif (id >= 0) {\n\t\t\t\tlet structure = loadedStructures[id]\n\t\t\t\tlet existing = existingStructures[id]\n\t\t\t\tif (existing) {\n\t\t\t\t\tif (structure)\n\t\t\t\t\t\t(loadedStructures.restoreStructures || (loadedStructures.restoreStructures = []))[id] = structure\n\t\t\t\t\tloadedStructures[id] = existing\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this.structures = loadedStructures\n\t}\n\tdecode(source, options) {\n\t\treturn this.unpack(source, options)\n\t}\n}\nexport function getPosition() {\n\treturn position\n}\nexport function checkedRead(options) {\n\ttry {\n\t\tif (!currentUnpackr.trusted && !sequentialMode) {\n\t\t\tlet sharedLength = currentStructures.sharedLength || 0\n\t\t\tif (sharedLength < currentStructures.length)\n\t\t\t\tcurrentStructures.length = sharedLength\n\t\t}\n\t\tlet result\n\t\tif (currentUnpackr.randomAccessStructure && src[position] < 0x40 && src[position] >= 0x20 && readStruct) {\n\t\t\tresult = readStruct(src, position, srcEnd, currentUnpackr)\n\t\t\tsrc = null // dispose of this so that recursive unpack calls don't save state\n\t\t\tif (!(options && options.lazy) && result)\n\t\t\t\tresult = result.toJSON()\n\t\t\tposition = srcEnd\n\t\t} else\n\t\t\tresult = read()\n\t\tif (bundledStrings) { // bundled strings to skip past\n\t\t\tposition = bundledStrings.postBundlePosition\n\t\t\tbundledStrings = null\n\t\t}\n\t\tif (sequentialMode)\n\t\t\t// we only need to restore the structures if there was an error, but if we completed a read,\n\t\t\t// we can clear this out and keep the structures we read\n\t\t\tcurrentStructures.restoreStructures = null\n\n\t\tif (position == srcEnd) {\n\t\t\t// finished reading this source, cleanup references\n\t\t\tif (currentStructures && currentStructures.restoreStructures)\n\t\t\t\trestoreStructures()\n\t\t\tcurrentStructures = null\n\t\t\tsrc = null\n\t\t\tif (referenceMap)\n\t\t\t\treferenceMap = null\n\t\t} else if (position > srcEnd) {\n\t\t\t// over read\n\t\t\tthrow new Error('Unexpected end of MessagePack data')\n\t\t} else if (!sequentialMode) {\n\t\t\tlet jsonView;\n\t\t\ttry {\n\t\t\t\tjsonView = JSON.stringify(result, (_, value) => typeof value === \"bigint\" ? `${value}n` : value).slice(0, 100)\n\t\t\t} catch(error) {\n\t\t\t\tjsonView = '(JSON view not available ' + error + ')'\n\t\t\t}\n\t\t\tthrow new Error('Data read, but end of buffer not reached ' + jsonView)\n\t\t}\n\t\t// else more to read, but we are reading sequentially, so don't clear source yet\n\t\treturn result\n\t} catch(error) {\n\t\tif (currentStructures && currentStructures.restoreStructures)\n\t\t\trestoreStructures()\n\t\tclearSource()\n\t\tif (error instanceof RangeError || error.message.startsWith('Unexpected end of buffer') || position > srcEnd) {\n\t\t\terror.incomplete = true\n\t\t}\n\t\tthrow error\n\t}\n}\n\nfunction restoreStructures() {\n\tfor (let id in currentStructures.restoreStructures) {\n\t\tcurrentStructures[id] = currentStructures.restoreStructures[id]\n\t}\n\tcurrentStructures.restoreStructures = null\n}\n\nexport function read() {\n\tlet token = src[position++]\n\tif (token < 0xa0) {\n\t\tif (token < 0x80) {\n\t\t\tif (token < 0x40)\n\t\t\t\treturn token\n\t\t\telse {\n\t\t\t\tlet structure = currentStructures[token & 0x3f] ||\n\t\t\t\t\tcurrentUnpackr.getStructures && loadStructures()[token & 0x3f]\n\t\t\t\tif (structure) {\n\t\t\t\t\tif (!structure.read) {\n\t\t\t\t\t\tstructure.read = createStructureReader(structure, token & 0x3f)\n\t\t\t\t\t}\n\t\t\t\t\treturn structure.read()\n\t\t\t\t} else\n\t\t\t\t\treturn token\n\t\t\t}\n\t\t} else if (token < 0x90) {\n\t\t\t// map\n\t\t\ttoken -= 0x80\n\t\t\tif (currentUnpackr.mapsAsObjects) {\n\t\t\t\tlet object = {}\n\t\t\t\tfor (let i = 0; i < token; i++) {\n\t\t\t\t\tlet key = readKey()\n\t\t\t\t\tif (key === '__proto__')\n\t\t\t\t\t\tkey = '__proto_'\n\t\t\t\t\tobject[key] = read()\n\t\t\t\t}\n\t\t\t\treturn object\n\t\t\t} else {\n\t\t\t\tlet map = new Map()\n\t\t\t\tfor (let i = 0; i < token; i++) {\n\t\t\t\t\tmap.set(read(), read())\n\t\t\t\t}\n\t\t\t\treturn map\n\t\t\t}\n\t\t} else {\n\t\t\ttoken -= 0x90\n\t\t\tlet array = new Array(token)\n\t\t\tfor (let i = 0; i < token; i++) {\n\t\t\t\tarray[i] = read()\n\t\t\t}\n\t\t\tif (currentUnpackr.freezeData)\n\t\t\t\treturn Object.freeze(array)\n\t\t\treturn array\n\t\t}\n\t} else if (token < 0xc0) {\n\t\t// fixstr\n\t\tlet length = token - 0xa0\n\t\tif (srcStringEnd >= position) {\n\t\t\treturn srcString.slice(position - srcStringStart, (position += length) - srcStringStart)\n\t\t}\n\t\tif (srcStringEnd == 0 && srcEnd < 140) {\n\t\t\t// for small blocks, avoiding the overhead of the extract call is helpful\n\t\t\tlet string = length < 16 ? shortStringInJS(length) : longStringInJS(length)\n\t\t\tif (string != null)\n\t\t\t\treturn string\n\t\t}\n\t\treturn readFixedString(length)\n\t} else {\n\t\tlet value\n\t\tswitch (token) {\n\t\t\tcase 0xc0: return null\n\t\t\tcase 0xc1:\n\t\t\t\tif (bundledStrings) {\n\t\t\t\t\tvalue = read() // followed by the length of the string in characters (not bytes!)\n\t\t\t\t\tif (value > 0)\n\t\t\t\t\t\treturn bundledStrings[1].slice(bundledStrings.position1, bundledStrings.position1 += value)\n\t\t\t\t\telse\n\t\t\t\t\t\treturn bundledStrings[0].slice(bundledStrings.position0, bundledStrings.position0 -= value)\n\t\t\t\t}\n\t\t\t\treturn C1; // \"never-used\", return special object to denote that\n\t\t\tcase 0xc2: return false\n\t\t\tcase 0xc3: return true\n\t\t\tcase 0xc4:\n\t\t\t\t// bin 8\n\t\t\t\tvalue = src[position++]\n\t\t\t\tif (value === undefined)\n\t\t\t\t\tthrow new Error('Unexpected end of buffer')\n\t\t\t\treturn readBin(value)\n\t\t\tcase 0xc5:\n\t\t\t\t// bin 16\n\t\t\t\tvalue = dataView.getUint16(position)\n\t\t\t\tposition += 2\n\t\t\t\treturn readBin(value)\n\t\t\tcase 0xc6:\n\t\t\t\t// bin 32\n\t\t\t\tvalue = dataView.getUint32(position)\n\t\t\t\tposition += 4\n\t\t\t\treturn readBin(value)\n\t\t\tcase 0xc7:\n\t\t\t\t// ext 8\n\t\t\t\treturn readExt(src[position++])\n\t\t\tcase 0xc8:\n\t\t\t\t// ext 16\n\t\t\t\tvalue = dataView.getUint16(position)\n\t\t\t\tposition += 2\n\t\t\t\treturn readExt(value)\n\t\t\tcase 0xc9:\n\t\t\t\t// ext 32\n\t\t\t\tvalue = dataView.getUint32(position)\n\t\t\t\tposition += 4\n\t\t\t\treturn readExt(value)\n\t\t\tcase 0xca:\n\t\t\t\tvalue = dataView.getFloat32(position)\n\t\t\t\tif (currentUnpackr.useFloat32 > 2) {\n\t\t\t\t\t// this does rounding of numbers that were encoded in 32-bit float to nearest significant decimal digit that could be preserved\n\t\t\t\t\tlet multiplier = mult10[((src[position] & 0x7f) << 1) | (src[position + 1] >> 7)]\n\t\t\t\t\tposition += 4\n\t\t\t\t\treturn ((multiplier * value + (value > 0 ? 0.5 : -0.5)) >> 0) / multiplier\n\t\t\t\t}\n\t\t\t\tposition += 4\n\t\t\t\treturn value\n\t\t\tcase 0xcb:\n\t\t\t\tvalue = dataView.getFloat64(position)\n\t\t\t\tposition += 8\n\t\t\t\treturn value\n\t\t\t// uint handlers\n\t\t\tcase 0xcc:\n\t\t\t\treturn src[position++]\n\t\t\tcase 0xcd:\n\t\t\t\tvalue = dataView.getUint16(position)\n\t\t\t\tposition += 2\n\t\t\t\treturn value\n\t\t\tcase 0xce:\n\t\t\t\tvalue = dataView.getUint32(position)\n\t\t\t\tposition += 4\n\t\t\t\treturn value\n\t\t\tcase 0xcf:\n\t\t\t\tif (currentUnpackr.int64AsType === 'number') {\n\t\t\t\t\tvalue = dataView.getUint32(position) * 0x100000000\n\t\t\t\t\tvalue += dataView.getUint32(position + 4)\n\t\t\t\t} else if (currentUnpackr.int64AsType === 'string') {\n\t\t\t\t\tvalue = dataView.getBigUint64(position).toString()\n\t\t\t\t} else if (currentUnpackr.int64AsType === 'auto') {\n\t\t\t\t\tvalue = dataView.getBigUint64(position)\n\t\t\t\t\tif (value<=BigInt(2)<=BigInt(-2)<= position) {\n\t\t\t\t\treturn srcString.slice(position - srcStringStart, (position += value) - srcStringStart)\n\t\t\t\t}\n\t\t\t\treturn readString8(value)\n\t\t\tcase 0xda:\n\t\t\t// str 16\n\t\t\t\tvalue = dataView.getUint16(position)\n\t\t\t\tposition += 2\n\t\t\t\tif (srcStringEnd >= position) {\n\t\t\t\t\treturn srcString.slice(position - srcStringStart, (position += value) - srcStringStart)\n\t\t\t\t}\n\t\t\t\treturn readString16(value)\n\t\t\tcase 0xdb:\n\t\t\t// str 32\n\t\t\t\tvalue = dataView.getUint32(position)\n\t\t\t\tposition += 4\n\t\t\t\tif (srcStringEnd >= position) {\n\t\t\t\t\treturn srcString.slice(position - srcStringStart, (position += value) - srcStringStart)\n\t\t\t\t}\n\t\t\t\treturn readString32(value)\n\t\t\tcase 0xdc:\n\t\t\t// array 16\n\t\t\t\tvalue = dataView.getUint16(position)\n\t\t\t\tposition += 2\n\t\t\t\treturn readArray(value)\n\t\t\tcase 0xdd:\n\t\t\t// array 32\n\t\t\t\tvalue = dataView.getUint32(position)\n\t\t\t\tposition += 4\n\t\t\t\treturn readArray(value)\n\t\t\tcase 0xde:\n\t\t\t// map 16\n\t\t\t\tvalue = dataView.getUint16(position)\n\t\t\t\tposition += 2\n\t\t\t\treturn readMap(value)\n\t\t\tcase 0xdf:\n\t\t\t// map 32\n\t\t\t\tvalue = dataView.getUint32(position)\n\t\t\t\tposition += 4\n\t\t\t\treturn readMap(value)\n\t\t\tdefault: // negative int\n\t\t\t\tif (token >= 0xe0)\n\t\t\t\t\treturn token - 0x100\n\t\t\t\tif (token === undefined) {\n\t\t\t\t\tlet error = new Error('Unexpected end of MessagePack data')\n\t\t\t\t\terror.incomplete = true\n\t\t\t\t\tthrow error\n\t\t\t\t}\n\t\t\t\tthrow new Error('Unknown MessagePack token ' + token)\n\n\t\t}\n\t}\n}\nconst validName = /^[a-zA-Z_$][a-zA-Z\\d_$]*$/\nfunction createStructureReader(structure, firstId) {\n\tfunction readObject() {\n\t\t// This initial function is quick to instantiate, but runs slower. After several iterations pay the cost to build the faster function\n\t\tif (readObject.count++ > inlineObjectReadThreshold) {\n\t\t\tlet readObject = structure.read = (new Function('r', 'return function(){return ' + (currentUnpackr.freezeData ? 'Object.freeze' : '') +\n\t\t\t\t'({' + structure.map(key => key === '__proto__' ? '__proto_:r()' : validName.test(key) ? key + ':r()' : ('[' + JSON.stringify(key) + ']:r()')).join(',') + '})}'))(read)\n\t\t\tif (structure.highByte === 0)\n\t\t\t\tstructure.read = createSecondByteReader(firstId, structure.read)\n\t\t\treturn readObject() // second byte is already read, if there is one so immediately read object\n\t\t}\n\t\tlet object = {}\n\t\tfor (let i = 0, l = structure.length; i < l; i++) {\n\t\t\tlet key = structure[i]\n\t\t\tif (key === '__proto__')\n\t\t\t\tkey = '__proto_'\n\t\t\tobject[key] = read()\n\t\t}\n\t\tif (currentUnpackr.freezeData)\n\t\t\treturn Object.freeze(object);\n\t\treturn object\n\t}\n\treadObject.count = 0\n\tif (structure.highByte === 0) {\n\t\treturn createSecondByteReader(firstId, readObject)\n\t}\n\treturn readObject\n}\n\nconst createSecondByteReader = (firstId, read0) => {\n\treturn function() {\n\t\tlet highByte = src[position++]\n\t\tif (highByte === 0)\n\t\t\treturn read0()\n\t\tlet id = firstId < 32 ? -(firstId + (highByte << 5)) : firstId + (highByte << 5)\n\t\tlet structure = currentStructures[id] || loadStructures()[id]\n\t\tif (!structure) {\n\t\t\tthrow new Error('Record id is not defined for ' + id)\n\t\t}\n\t\tif (!structure.read)\n\t\t\tstructure.read = createStructureReader(structure, firstId)\n\t\treturn structure.read()\n\t}\n}\n\nexport function loadStructures() {\n\tlet loadedStructures = saveState(() => {\n\t\t// save the state in case getStructures modifies our buffer\n\t\tsrc = null\n\t\treturn currentUnpackr.getStructures()\n\t})\n\treturn currentStructures = currentUnpackr._mergeStructures(loadedStructures, currentStructures)\n}\n\nvar readFixedString = readStringJS\nvar readString8 = readStringJS\nvar readString16 = readStringJS\nvar readString32 = readStringJS\nexport let isNativeAccelerationEnabled = false\n\nexport function setExtractor(extractStrings) {\n\tisNativeAccelerationEnabled = true\n\treadFixedString = readString(1)\n\treadString8 = readString(2)\n\treadString16 = readString(3)\n\treadString32 = readString(5)\n\tfunction readString(headerLength) {\n\t\treturn function readString(length) {\n\t\t\tlet string = strings[stringPosition++]\n\t\t\tif (string == null) {\n\t\t\t\tif (bundledStrings)\n\t\t\t\t\treturn readStringJS(length)\n\t\t\t\tlet byteOffset = src.byteOffset\n\t\t\t\tlet extraction = extractStrings(position - headerLength + byteOffset, srcEnd + byteOffset, src.buffer)\n\t\t\t\tif (typeof extraction == 'string') {\n\t\t\t\t\tstring = extraction\n\t\t\t\t\tstrings = EMPTY_ARRAY\n\t\t\t\t} else {\n\t\t\t\t\tstrings = extraction\n\t\t\t\t\tstringPosition = 1\n\t\t\t\t\tsrcStringEnd = 1 // even if a utf-8 string was decoded, must indicate we are in the midst of extracted strings and can't skip strings\n\t\t\t\t\tstring = strings[0]\n\t\t\t\t\tif (string === undefined)\n\t\t\t\t\t\tthrow new Error('Unexpected end of buffer')\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet srcStringLength = string.length\n\t\t\tif (srcStringLength <= length) {\n\t\t\t\tposition += length\n\t\t\t\treturn string\n\t\t\t}\n\t\t\tsrcString = string\n\t\t\tsrcStringStart = position\n\t\t\tsrcStringEnd = position + srcStringLength\n\t\t\tposition += length\n\t\t\treturn string.slice(0, length) // we know we just want the beginning\n\t\t}\n\t}\n}\nfunction readStringJS(length) {\n\tlet result\n\tif (length < 16) {\n\t\tif (result = shortStringInJS(length))\n\t\t\treturn result\n\t}\n\tif (length > 64 && decoder)\n\t\treturn decoder.decode(src.subarray(position, position += length))\n\tconst end = position + length\n\tconst units = []\n\tresult = ''\n\twhile (position < end) {\n\t\tconst byte1 = src[position++]\n\t\tif ((byte1 & 0x80) === 0) {\n\t\t\t// 1 byte\n\t\t\tunits.push(byte1)\n\t\t} else if ((byte1 & 0xe0) === 0xc0) {\n\t\t\t// 2 bytes\n\t\t\tconst byte2 = src[position++] & 0x3f\n\t\t\tunits.push(((byte1 & 0x1f) << 6) | byte2)\n\t\t} else if ((byte1 & 0xf0) === 0xe0) {\n\t\t\t// 3 bytes\n\t\t\tconst byte2 = src[position++] & 0x3f\n\t\t\tconst byte3 = src[position++] & 0x3f\n\t\t\tunits.push(((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3)\n\t\t} else if ((byte1 & 0xf8) === 0xf0) {\n\t\t\t// 4 bytes\n\t\t\tconst byte2 = src[position++] & 0x3f\n\t\t\tconst byte3 = src[position++] & 0x3f\n\t\t\tconst byte4 = src[position++] & 0x3f\n\t\t\tlet unit = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4\n\t\t\tif (unit > 0xffff) {\n\t\t\t\tunit -= 0x10000\n\t\t\t\tunits.push(((unit >>> 10) & 0x3ff) | 0xd800)\n\t\t\t\tunit = 0xdc00 | (unit & 0x3ff)\n\t\t\t}\n\t\t\tunits.push(unit)\n\t\t} else {\n\t\t\tunits.push(byte1)\n\t\t}\n\n\t\tif (units.length >= 0x1000) {\n\t\t\tresult += fromCharCode.apply(String, units)\n\t\t\tunits.length = 0\n\t\t}\n\t}\n\n\tif (units.length > 0) {\n\t\tresult += fromCharCode.apply(String, units)\n\t}\n\n\treturn result\n}\nexport function readString(source, start, length) {\n\tlet existingSrc = src;\n\tsrc = source;\n\tposition = start;\n\ttry {\n\t\treturn readStringJS(length);\n\t} finally {\n\t\tsrc = existingSrc;\n\t}\n}\n\nfunction readArray(length) {\n\tlet array = new Array(length)\n\tfor (let i = 0; i < length; i++) {\n\t\tarray[i] = read()\n\t}\n\tif (currentUnpackr.freezeData)\n\t\treturn Object.freeze(array)\n\treturn array\n}\n\nfunction readMap(length) {\n\tif (currentUnpackr.mapsAsObjects) {\n\t\tlet object = {}\n\t\tfor (let i = 0; i < length; i++) {\n\t\t\tlet key = readKey()\n\t\t\tif (key === '__proto__')\n\t\t\t\tkey = '__proto_';\n\t\t\tobject[key] = read()\n\t\t}\n\t\treturn object\n\t} else {\n\t\tlet map = new Map()\n\t\tfor (let i = 0; i < length; i++) {\n\t\t\tmap.set(read(), read())\n\t\t}\n\t\treturn map\n\t}\n}\n\nvar fromCharCode = String.fromCharCode\nfunction longStringInJS(length) {\n\tlet start = position\n\tlet bytes = new Array(length)\n\tfor (let i = 0; i < length; i++) {\n\t\tconst byte = src[position++];\n\t\tif ((byte & 0x80) > 0) {\n\t\t\t\tposition = start\n\t\t\t\treturn\n\t\t\t}\n\t\t\tbytes[i] = byte\n\t\t}\n\t\treturn fromCharCode.apply(String, bytes)\n}\nfunction shortStringInJS(length) {\n\tif (length < 4) {\n\t\tif (length < 2) {\n\t\t\tif (length === 0)\n\t\t\t\treturn ''\n\t\t\telse {\n\t\t\t\tlet a = src[position++]\n\t\t\t\tif ((a & 0x80) > 1) {\n\t\t\t\t\tposition -= 1\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\treturn fromCharCode(a)\n\t\t\t}\n\t\t} else {\n\t\t\tlet a = src[position++]\n\t\t\tlet b = src[position++]\n\t\t\tif ((a & 0x80) > 0 || (b & 0x80) > 0) {\n\t\t\t\tposition -= 2\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (length < 3)\n\t\t\t\treturn fromCharCode(a, b)\n\t\t\tlet c = src[position++]\n\t\t\tif ((c & 0x80) > 0) {\n\t\t\t\tposition -= 3\n\t\t\t\treturn\n\t\t\t}\n\t\t\treturn fromCharCode(a, b, c)\n\t\t}\n\t} else {\n\t\tlet a = src[position++]\n\t\tlet b = src[position++]\n\t\tlet c = src[position++]\n\t\tlet d = src[position++]\n\t\tif ((a & 0x80) > 0 || (b & 0x80) > 0 || (c & 0x80) > 0 || (d & 0x80) > 0) {\n\t\t\tposition -= 4\n\t\t\treturn\n\t\t}\n\t\tif (length < 6) {\n\t\t\tif (length === 4)\n\t\t\t\treturn fromCharCode(a, b, c, d)\n\t\t\telse {\n\t\t\t\tlet e = src[position++]\n\t\t\t\tif ((e & 0x80) > 0) {\n\t\t\t\t\tposition -= 5\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\treturn fromCharCode(a, b, c, d, e)\n\t\t\t}\n\t\t} else if (length < 8) {\n\t\t\tlet e = src[position++]\n\t\t\tlet f = src[position++]\n\t\t\tif ((e & 0x80) > 0 || (f & 0x80) > 0) {\n\t\t\t\tposition -= 6\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (length < 7)\n\t\t\t\treturn fromCharCode(a, b, c, d, e, f)\n\t\t\tlet g = src[position++]\n\t\t\tif ((g & 0x80) > 0) {\n\t\t\t\tposition -= 7\n\t\t\t\treturn\n\t\t\t}\n\t\t\treturn fromCharCode(a, b, c, d, e, f, g)\n\t\t} else {\n\t\t\tlet e = src[position++]\n\t\t\tlet f = src[position++]\n\t\t\tlet g = src[position++]\n\t\t\tlet h = src[position++]\n\t\t\tif ((e & 0x80) > 0 || (f & 0x80) > 0 || (g & 0x80) > 0 || (h & 0x80) > 0) {\n\t\t\t\tposition -= 8\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (length < 10) {\n\t\t\t\tif (length === 8)\n\t\t\t\t\treturn fromCharCode(a, b, c, d, e, f, g, h)\n\t\t\t\telse {\n\t\t\t\t\tlet i = src[position++]\n\t\t\t\t\tif ((i & 0x80) > 0) {\n\t\t\t\t\t\tposition -= 9\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\treturn fromCharCode(a, b, c, d, e, f, g, h, i)\n\t\t\t\t}\n\t\t\t} else if (length < 12) {\n\t\t\t\tlet i = src[position++]\n\t\t\t\tlet j = src[position++]\n\t\t\t\tif ((i & 0x80) > 0 || (j & 0x80) > 0) {\n\t\t\t\t\tposition -= 10\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (length < 11)\n\t\t\t\t\treturn fromCharCode(a, b, c, d, e, f, g, h, i, j)\n\t\t\t\tlet k = src[position++]\n\t\t\t\tif ((k & 0x80) > 0) {\n\t\t\t\t\tposition -= 11\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\treturn fromCharCode(a, b, c, d, e, f, g, h, i, j, k)\n\t\t\t} else {\n\t\t\t\tlet i = src[position++]\n\t\t\t\tlet j = src[position++]\n\t\t\t\tlet k = src[position++]\n\t\t\t\tlet l = src[position++]\n\t\t\t\tif ((i & 0x80) > 0 || (j & 0x80) > 0 || (k & 0x80) > 0 || (l & 0x80) > 0) {\n\t\t\t\t\tposition -= 12\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (length < 14) {\n\t\t\t\t\tif (length === 12)\n\t\t\t\t\t\treturn fromCharCode(a, b, c, d, e, f, g, h, i, j, k, l)\n\t\t\t\t\telse {\n\t\t\t\t\t\tlet m = src[position++]\n\t\t\t\t\t\tif ((m & 0x80) > 0) {\n\t\t\t\t\t\t\tposition -= 13\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn fromCharCode(a, b, c, d, e, f, g, h, i, j, k, l, m)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlet m = src[position++]\n\t\t\t\t\tlet n = src[position++]\n\t\t\t\t\tif ((m & 0x80) > 0 || (n & 0x80) > 0) {\n\t\t\t\t\t\tposition -= 14\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tif (length < 15)\n\t\t\t\t\t\treturn fromCharCode(a, b, c, d, e, f, g, h, i, j, k, l, m, n)\n\t\t\t\t\tlet o = src[position++]\n\t\t\t\t\tif ((o & 0x80) > 0) {\n\t\t\t\t\t\tposition -= 15\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\treturn fromCharCode(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction readOnlyJSString() {\n\tlet token = src[position++]\n\tlet length\n\tif (token < 0xc0) {\n\t\t// fixstr\n\t\tlength = token - 0xa0\n\t} else {\n\t\tswitch(token) {\n\t\t\tcase 0xd9:\n\t\t\t// str 8\n\t\t\t\tlength = src[position++]\n\t\t\t\tbreak\n\t\t\tcase 0xda:\n\t\t\t// str 16\n\t\t\t\tlength = dataView.getUint16(position)\n\t\t\t\tposition += 2\n\t\t\t\tbreak\n\t\t\tcase 0xdb:\n\t\t\t// str 32\n\t\t\t\tlength = dataView.getUint32(position)\n\t\t\t\tposition += 4\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tthrow new Error('Expected string')\n\t\t}\n\t}\n\treturn readStringJS(length)\n}\n\n\nfunction readBin(length) {\n\treturn currentUnpackr.copyBuffers ?\n\t\t// specifically use the copying slice (not the node one)\n\t\tUint8Array.prototype.slice.call(src, position, position += length) :\n\t\tsrc.subarray(position, position += length)\n}\nfunction readExt(length) {\n\tlet type = src[position++]\n\tif (currentExtensions[type]) {\n\t\tlet end\n\t\treturn currentExtensions[type](src.subarray(position, end = (position += length)), (readPosition) => {\n\t\t\tposition = readPosition;\n\t\t\ttry {\n\t\t\t\treturn read();\n\t\t\t} finally {\n\t\t\t\tposition = end;\n\t\t\t}\n\t\t})\n\t}\n\telse\n\t\tthrow new Error('Unknown extension type ' + type)\n}\n\nvar keyCache = new Array(4096)\nfunction readKey() {\n\tlet length = src[position++]\n\tif (length >= 0xa0 && length < 0xc0) {\n\t\t// fixstr, potentially use key cache\n\t\tlength = length - 0xa0\n\t\tif (srcStringEnd >= position) // if it has been extracted, must use it (and faster anyway)\n\t\t\treturn srcString.slice(position - srcStringStart, (position += length) - srcStringStart)\n\t\telse if (!(srcStringEnd == 0 && srcEnd < 180))\n\t\t\treturn readFixedString(length)\n\t} else { // not cacheable, go back and do a standard read\n\t\tposition--\n\t\treturn asSafeString(read())\n\t}\n\tlet key = ((length << 5) ^ (length > 1 ? dataView.getUint16(position) : length > 0 ? src[position] : 0)) & 0xfff\n\tlet entry = keyCache[key]\n\tlet checkPosition = position\n\tlet end = position + length - 3\n\tlet chunk\n\tlet i = 0\n\tif (entry && entry.bytes == length) {\n\t\twhile (checkPosition < end) {\n\t\t\tchunk = dataView.getUint32(checkPosition)\n\t\t\tif (chunk != entry[i++]) {\n\t\t\t\tcheckPosition = 0x70000000\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcheckPosition += 4\n\t\t}\n\t\tend += 3\n\t\twhile (checkPosition < end) {\n\t\t\tchunk = src[checkPosition++]\n\t\t\tif (chunk != entry[i++]) {\n\t\t\t\tcheckPosition = 0x70000000\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif (checkPosition === end) {\n\t\t\tposition = checkPosition\n\t\t\treturn entry.string\n\t\t}\n\t\tend -= 3\n\t\tcheckPosition = position\n\t}\n\tentry = []\n\tkeyCache[key] = entry\n\tentry.bytes = length\n\twhile (checkPosition < end) {\n\t\tchunk = dataView.getUint32(checkPosition)\n\t\tentry.push(chunk)\n\t\tcheckPosition += 4\n\t}\n\tend += 3\n\twhile (checkPosition < end) {\n\t\tchunk = src[checkPosition++]\n\t\tentry.push(chunk)\n\t}\n\t// for small blocks, avoiding the overhead of the extract call is helpful\n\tlet string = length < 16 ? shortStringInJS(length) : longStringInJS(length)\n\tif (string != null)\n\t\treturn entry.string = string\n\treturn entry.string = readFixedString(length)\n}\n\nfunction asSafeString(property) {\n\t// protect against expensive (DoS) string conversions\n\tif (typeof property === 'string') return property;\n\tif (typeof property === 'number' || typeof property === 'boolean' || typeof property === 'bigint') return property.toString();\n\tif (property == null) return property + '';\n\tif (currentUnpackr.allowArraysInMapKeys && Array.isArray(property) && property.flat().every(item => ['string', 'number', 'boolean', 'bigint'].includes(typeof item))) {\n\t\treturn property.flat().toString();\n\t}\n\tthrow new Error(`Invalid property type for record: ${typeof property}`);\n}\n// the registration of the record definition extension (as \"r\")\nconst recordDefinition = (id, highByte) => {\n\tlet structure = read().map(asSafeString) // ensure that all keys are strings and\n\t// that the array is mutable\n\tlet firstByte = id\n\tif (highByte !== undefined) {\n\t\tid = id < 32 ? -((highByte << 5) + id) : ((highByte << 5) + id)\n\t\tstructure.highByte = highByte\n\t}\n\tlet existingStructure = currentStructures[id]\n\t// If it is a shared structure, we need to restore any changes after reading.\n\t// Also in sequential mode, we may get incomplete reads and thus errors, and we need to restore\n\t// to the state prior to an incomplete read in order to properly resume.\n\tif (existingStructure && (existingStructure.isShared || sequentialMode)) {\n\t\t(currentStructures.restoreStructures || (currentStructures.restoreStructures = []))[id] = existingStructure\n\t}\n\tcurrentStructures[id] = structure\n\tstructure.read = createStructureReader(structure, firstByte)\n\treturn structure.read()\n}\ncurrentExtensions[0] = () => {} // notepack defines extension 0 to mean undefined, so use that as the default here\ncurrentExtensions[0].noBuffer = true\n\ncurrentExtensions[0x42] = data => {\n\tlet headLength = (data.byteLength % 8) || 8\n\tlet head = BigInt(data[0] & 0x80 ? data[0] - 0x100 : data[0])\n\tfor (let i = 1; i < headLength; i++) {\n\t\thead <<= BigInt(8)\n\t\thead += BigInt(data[i])\n\t}\n\tif (data.byteLength !== headLength) {\n\t\tlet view = new DataView(data.buffer, data.byteOffset, data.byteLength)\n\t\tlet decode = (start, end) => {\n\t\t\tlet length = end - start\n\t\t\tif (length <= 40) {\n\t\t\t\tlet out = view.getBigUint64(start)\n\t\t\t\tfor (let i = start + 8; i < end; i += 8) {\n\t\t\t\t\tout <<= BigInt(64n)\n\t\t\t\t\tout |= view.getBigUint64(i)\n\t\t\t\t}\n\t\t\t\treturn out\n\t\t\t}\n\t\t\t// if (length === 8) return view.getBigUint64(start)\n\t\t\tlet middle = start + (length >> 4 << 3)\n\t\t\tlet left = decode(start, middle)\n\t\t\tlet right = decode(middle, end)\n\t\t\treturn (left << BigInt((end - middle) * 8)) | right\n\t\t}\n\t\thead = (head << BigInt((view.byteLength - headLength) * 8)) | decode(headLength, view.byteLength)\n\t}\n\treturn head\n}\n\nlet errors = {\n\tError, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError, AggregateError: typeof AggregateError === 'function' ? AggregateError : null,\n}\ncurrentExtensions[0x65] = () => {\n\tlet data = read()\n\tif (!errors[data[0]]) {\n\t\tlet error = Error(data[1], { cause: data[2] })\n\t\terror.name = data[0]\n\t\treturn error\n\t}\n\treturn errors[data[0]](data[1], { cause: data[2] })\n}\n\ncurrentExtensions[0x69] = (data) => {\n\t// id extension (for structured clones)\n\tif (currentUnpackr.structuredClone === false) throw new Error('Structured clone extension is disabled')\n\tlet id = dataView.getUint32(position - 4)\n\tif (!referenceMap)\n\t\treferenceMap = new Map()\n\tlet token = src[position]\n\tlet target\n\t// TODO: handle any other types that can cycle and make the code more robust if there are other extensions\n\tif (token >= 0x90 && token < 0xa0 || token == 0xdc || token == 0xdd)\n\t\ttarget = []\n\telse if (token >= 0x80 && token < 0x90 || token == 0xde || token == 0xdf)\n\t\ttarget = new Map()\n\telse if ((token >= 0xc7 && token <= 0xc9 || token >= 0xd4 && token <= 0xd8) && src[position + 1] === 0x73)\n\t\ttarget = new Set()\n\telse\n\t\ttarget = {}\n\n\tlet refEntry = { target } // a placeholder object\n\treferenceMap.set(id, refEntry)\n\tlet targetProperties = read() // read the next value as the target object to id\n\tif (!refEntry.used) {\n\t\t// no cycle, can just use the returned read object\n\t\treturn refEntry.target = targetProperties // replace the placeholder with the real one\n\t} else {\n\t\t// there is a cycle, so we have to assign properties to original target\n\t\tObject.assign(target, targetProperties)\n\t}\n\n\t// copy over map/set entries if we're able to\n\tif (target instanceof Map)\n\t\tfor (let [k, v] of targetProperties.entries()) target.set(k, v)\n\tif (target instanceof Set)\n\t\tfor (let i of Array.from(targetProperties)) target.add(i)\n\treturn target\n}\n\ncurrentExtensions[0x70] = (data) => {\n\t// pointer extension (for structured clones)\n\tif (currentUnpackr.structuredClone === false) throw new Error('Structured clone extension is disabled')\n\tlet id = dataView.getUint32(position - 4)\n\tlet refEntry = referenceMap.get(id)\n\trefEntry.used = true\n\treturn refEntry.target\n}\n\ncurrentExtensions[0x73] = () => new Set(read())\n\nexport const typedArrays = ['Int8','Uint8','Uint8Clamped','Int16','Uint16','Int32','Uint32','Float32','Float64','BigInt64','BigUint64'].map(type => type + 'Array')\n\nlet glbl = typeof globalThis === 'object' ? globalThis : window;\ncurrentExtensions[0x74] = (data) => {\n\tlet typeCode = data[0]\n\t// we always have to slice to get a new ArrayBuffer that is aligned\n\tlet buffer = Uint8Array.prototype.slice.call(data, 1).buffer\n\n\tlet typedArrayName = typedArrays[typeCode]\n\tif (!typedArrayName) {\n\t\tif (typeCode === 16) return buffer\n\t\tif (typeCode === 17) return new DataView(buffer)\n\t\tthrow new Error('Could not find typed array for code ' + typeCode)\n\t}\n\treturn new glbl[typedArrayName](buffer)\n}\ncurrentExtensions[0x78] = () => {\n\tlet data = read()\n\treturn new RegExp(data[0], data[1])\n}\nconst TEMP_BUNDLE = []\ncurrentExtensions[0x62] = (data) => {\n\tlet dataSize = (data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3]\n\tlet dataPosition = position\n\tposition += dataSize - data.length\n\tbundledStrings = TEMP_BUNDLE\n\tbundledStrings = [readOnlyJSString(), readOnlyJSString()]\n\tbundledStrings.position0 = 0\n\tbundledStrings.position1 = 0\n\tbundledStrings.postBundlePosition = position\n\tposition = dataPosition\n\treturn read()\n}\n\ncurrentExtensions[0xff] = (data) => {\n\t// 32-bit date extension\n\tif (data.length == 4)\n\t\treturn new Date((data[0] * 0x1000000 + (data[1] << 16) + (data[2] << 8) + data[3]) * 1000)\n\telse if (data.length == 8)\n\t\treturn new Date(\n\t\t\t((data[0] << 22) + (data[1] << 14) + (data[2] << 6) + (data[3] >> 2)) / 1000000 +\n\t\t\t((data[3] & 0x3) * 0x100000000 + data[4] * 0x1000000 + (data[5] << 16) + (data[6] << 8) + data[7]) * 1000)\n\telse if (data.length == 12)\n\t\treturn new Date(\n\t\t\t((data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3]) / 1000000 +\n\t\t\t(((data[4] & 0x80) ? -0x1000000000000 : 0) + data[6] * 0x10000000000 + data[7] * 0x100000000 + data[8] * 0x1000000 + (data[9] << 16) + (data[10] << 8) + data[11]) * 1000)\n\telse\n\t\treturn new Date('invalid')\n}\n// registration of bulk record definition?\n// currentExtensions[0x52] = () =>\n\nfunction saveState(callback) {\n\tif (onSaveState)\n\t\tonSaveState();\n\tlet savedSrcEnd = srcEnd\n\tlet savedPosition = position\n\tlet savedStringPosition = stringPosition\n\tlet savedSrcStringStart = srcStringStart\n\tlet savedSrcStringEnd = srcStringEnd\n\tlet savedSrcString = srcString\n\tlet savedStrings = strings\n\tlet savedReferenceMap = referenceMap\n\tlet savedBundledStrings = bundledStrings\n\n\t// TODO: We may need to revisit this if we do more external calls to user code (since it could be slow)\n\tlet savedSrc = new Uint8Array(src.slice(0, srcEnd)) // we copy the data in case it changes while external data is processed\n\tlet savedStructures = currentStructures\n\tlet savedStructuresContents = currentStructures.slice(0, currentStructures.length)\n\tlet savedPackr = currentUnpackr\n\tlet savedSequentialMode = sequentialMode\n\tlet value = callback()\n\tsrcEnd = savedSrcEnd\n\tposition = savedPosition\n\tstringPosition = savedStringPosition\n\tsrcStringStart = savedSrcStringStart\n\tsrcStringEnd = savedSrcStringEnd\n\tsrcString = savedSrcString\n\tstrings = savedStrings\n\treferenceMap = savedReferenceMap\n\tbundledStrings = savedBundledStrings\n\tsrc = savedSrc\n\tsequentialMode = savedSequentialMode\n\tcurrentStructures = savedStructures\n\tcurrentStructures.splice(0, currentStructures.length, ...savedStructuresContents)\n\tcurrentUnpackr = savedPackr\n\tdataView = new DataView(src.buffer, src.byteOffset, src.byteLength)\n\treturn value\n}\nexport function clearSource() {\n\tsrc = null\n\treferenceMap = null\n\tcurrentStructures = null\n}\n\nexport function addExtension(extension) {\n\tif (extension.unpack)\n\t\tcurrentExtensions[extension.type] = extension.unpack\n\telse\n\t\tcurrentExtensions[extension.type] = extension\n}\n\nexport const mult10 = new Array(147) // this is a table matching binary exponents to the multiplier to determine significant digit rounding\nfor (let i = 0; i < 256; i++) {\n\tmult10[i] = +('1e' + Math.floor(45.15 - i * 0.30103))\n}\nexport const Decoder = Unpackr\nvar defaultUnpackr = new Unpackr({ useRecords: false })\nexport const unpack = defaultUnpackr.unpack\nexport const unpackMultiple = defaultUnpackr.unpackMultiple\nexport const decode = defaultUnpackr.unpack\nexport const FLOAT32_OPTIONS = {\n\tNEVER: 0,\n\tALWAYS: 1,\n\tDECIMAL_ROUND: 3,\n\tDECIMAL_FIT: 4\n}\nlet f32Array = new Float32Array(1)\nlet u8Array = new Uint8Array(f32Array.buffer, 0, 4)\nexport function roundFloat32(float32Number) {\n\tf32Array[0] = float32Number\n\tlet multiplier = mult10[((u8Array[3] & 0x7f) << 1) | (u8Array[2] >> 7)]\n\treturn ((multiplier * float32Number + (float32Number > 0 ? 0.5 : -0.5)) >> 0) / multiplier\n}\nexport function setReadStruct(updatedReadStruct, loadedStructs, saveState) {\n\treadStruct = updatedReadStruct;\n\tonLoadedStructures = loadedStructs;\n\tonSaveState = saveState;\n}\n", "import { Packr } from './pack.js'\nimport { Unpackr } from './unpack.js'\n\n/**\n * Given an Iterable first argument, returns an Iterable where each value is packed as a Buffer\n * If the argument is only Async Iterable, the return value will be an Async Iterable.\n * @param {Iterable|Iterator|AsyncIterable|AsyncIterator} objectIterator - iterable source, like a Readable object stream, an array, Set, or custom object\n * @param {options} [options] - msgpackr pack options\n * @returns {IterableIterator|Promise.}\n */\nexport function packIter (objectIterator, options = {}) {\n if (!objectIterator || typeof objectIterator !== 'object') {\n throw new Error('first argument must be an Iterable, Async Iterable, or a Promise for an Async Iterable')\n } else if (typeof objectIterator[Symbol.iterator] === 'function') {\n return packIterSync(objectIterator, options)\n } else if (typeof objectIterator.then === 'function' || typeof objectIterator[Symbol.asyncIterator] === 'function') {\n return packIterAsync(objectIterator, options)\n } else {\n throw new Error('first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a Promise')\n }\n}\n\nfunction * packIterSync (objectIterator, options) {\n const packr = new Packr(options)\n for (const value of objectIterator) {\n yield packr.pack(value)\n }\n}\n\nasync function * packIterAsync (objectIterator, options) {\n const packr = new Packr(options)\n for await (const value of objectIterator) {\n yield packr.pack(value)\n }\n}\n\n/**\n * Given an Iterable/Iterator input which yields buffers, returns an IterableIterator which yields sync decoded objects\n * Or, given an Async Iterable/Iterator which yields promises resolving in buffers, returns an AsyncIterableIterator.\n * @param {Iterable|Iterator|AsyncIterable|AsyncIterableIterator} bufferIterator\n * @param {object} [options] - unpackr options\n * @returns {IterableIterator|Promise. {\n let yields\n // if there's incomplete data from previous chunk, concatinate and try again\n if (incomplete) {\n chunk = Buffer.concat([incomplete, chunk])\n incomplete = undefined\n }\n\n try {\n yields = unpackr.unpackMultiple(chunk)\n } catch (err) {\n if (err.incomplete) {\n incomplete = chunk.slice(err.lastPosition)\n yields = err.values\n } else {\n throw err\n }\n }\n return yields\n }\n\n if (typeof bufferIterator[Symbol.iterator] === 'function') {\n return (function * iter () {\n for (const value of bufferIterator) {\n yield * parser(value)\n }\n })()\n } else if (typeof bufferIterator[Symbol.asyncIterator] === 'function') {\n return (async function * iter () {\n for await (const value of bufferIterator) {\n yield * parser(value)\n }\n })()\n }\n}\nexport const decodeIter = unpackIter\nexport const encodeIter = packIter", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "export {};\n//# sourceMappingURL=advanced-options.js.map", "export {};\n//# sourceMappingURL=backoff-options.js.map", "export {};\n//# sourceMappingURL=base-job-options.js.map", "export {};\n//# sourceMappingURL=child-message.js.map", "export {};\n//# sourceMappingURL=connection.js.map", "export {};\n//# sourceMappingURL=flow-job.js.map", "export {};\n//# sourceMappingURL=ioredis-events.js.map", "export {};\n//# sourceMappingURL=job-json.js.map", "export {};\n//# sourceMappingURL=job-scheduler-json.js.map", "export {};\n//# sourceMappingURL=lock-manager-worker-context.js.map", "export {};\n//# sourceMappingURL=metrics-options.js.map", "export {};\n//# sourceMappingURL=metrics.js.map", "export {};\n//# sourceMappingURL=minimal-job.js.map", "export {};\n//# sourceMappingURL=minimal-queue.js.map", "export {};\n//# sourceMappingURL=parent-message.js.map", "export {};\n//# sourceMappingURL=parent.js.map", "export {};\n//# sourceMappingURL=parent-options.js.map", "export {};\n//# sourceMappingURL=queue-meta.js.map", null, "export {};\n//# sourceMappingURL=rate-limiter-options.js.map", "export {};\n//# sourceMappingURL=redis-options.js.map", "export {};\n//# sourceMappingURL=redis-streams.js.map", "export {};\n//# sourceMappingURL=repeatable-job.js.map", "export {};\n//# sourceMappingURL=repeatable-options.js.map", "export {};\n//# sourceMappingURL=repeat-options.js.map", "export {};\n//# sourceMappingURL=retry-options.js.map", "export {};\n//# sourceMappingURL=script-queue-context.js.map", "export {};\n//# sourceMappingURL=sandboxed-job-processor.js.map", "export {};\n//# sourceMappingURL=sandboxed-job.js.map", "export {};\n//# sourceMappingURL=sandboxed-options.js.map", "export {};\n//# sourceMappingURL=worker-options.js.map", "export {};\n//# sourceMappingURL=telemetry.js.map", "export {};\n//# sourceMappingURL=receiver.js.map", null, "export {};\n//# sourceMappingURL=backoff-strategy.js.map", "export {};\n//# sourceMappingURL=database-type.js.map", "export {};\n//# sourceMappingURL=deduplication-options.js.map", "export {};\n//# sourceMappingURL=finished-status.js.map", "export {};\n//# sourceMappingURL=job-json-sandbox.js.map", "export {};\n//# sourceMappingURL=job-options.js.map", "export {};\n//# sourceMappingURL=job-scheduler-template-options.js.map", "export {};\n//# sourceMappingURL=job-type.js.map", "export {};\n//# sourceMappingURL=job-progress.js.map", "export {};\n//# sourceMappingURL=repeat-strategy.js.map", "export {};\n//# sourceMappingURL=keep-jobs.js.map", "export {};\n//# sourceMappingURL=processor.js.map", "/**\n * This file contains constants that are used throughout the application\n * to avoid hardcoding strings in multiple places\n */\n\n// User role and designation constants\nexport const READABLE_ORDER_ID_KEY = 'readableOrderId';\n\n// Queue constants\nexport const NOTIFS_QUEUE = 'notifications';\nexport const OTP_COMMENT_NAME='otp-comment'\n\n// Notification message constants\nexport const ORDER_PLACED_MESSAGE = 'Your order has been placed successfully!';\nexport const PAYMENT_FAILED_MESSAGE = 'Payment failed. Please try again.';\nexport const ORDER_PACKAGED_MESSAGE = 'Your order has been packaged and is ready for delivery.';\nexport const ORDER_OUT_FOR_DELIVERY_MESSAGE = 'Your order is out for delivery.';\nexport const ORDER_DELIVERED_MESSAGE = 'Your order has been delivered.';\nexport const ORDER_CANCELLED_MESSAGE = 'Your order has been cancelled.';\nexport const REFUND_INITIATED_MESSAGE = 'Refund has been initiated for your order.';\nexport const WELCOME_MESSAGE = 'Welcome to Farm2Door! Thank you for joining us.';\n\nexport const REFUND_STATUS = {\n PENDING: 'none',\n NOT_APPLICABLE: 'na',\n PROCESSING: 'initiated',\n SUCCESS: 'success',\n};", "import {\n getOrdersByIdsWithFullData,\n getOrderByIdWithFullData,\n} from '@/src/dbService'\nimport redisClient from '@/src/lib/redis-client'\nimport { sendTelegramMessage } from '@/src/lib/telegram-service'\n\nconst ORDER_CHANNEL = 'orders:placed';\nconst CANCELLED_CHANNEL = 'orders:cancelled';\n\ninterface OrderIdMessage {\n orderIds: number[];\n}\n\ninterface CancellationMessage {\n orderId: number;\n cancelledBy: 'user' | 'admin';\n reason: string;\n cancelledAt: string;\n}\n\nconst formatDateTime = (dateStr: string | null | undefined): string => {\n if (!dateStr) return 'N/A';\n return new Date(dateStr).toLocaleString('en-IN', {\n dateStyle: 'medium',\n timeStyle: 'short',\n timeZone: 'Asia/Kolkata',\n });\n};\n\nconst formatOrderMessageWithFullData = (ordersData: any[]): string => {\n let message = '\uD83D\uDED2 New Order Placed\\n\\n';\n\n ordersData.forEach((order, index) => {\n message += `Order ${order.id}\\n`;\n\n message += '\uD83D\uDCE6 Items:\\n';\n order.orderItems?.forEach((item: any) => {\n message += ` \u2022 ${item.product?.name || 'Unknown'} x${item.quantity}\\n`;\n });\n\n message += `\\n\uD83D\uDCB0 Total: \u20B9${order.totalAmount}\\n`;\n\n message += `\uD83D\uDE9A Delivery: ${\n order.isFlashDelivery ? 'Flash Delivery' : formatDateTime(order.slot?.deliveryTime)\n }\\n`;\n\n message += `\\n\uD83D\uDCCD Address:\\n`;\n message += ` ${order.address?.name || 'N/A'}\\n`;\n message += ` ${order.address?.addressLine1 || ''}\\n`;\n if (order.address?.addressLine2) {\n message += ` ${order.address.addressLine2}\\n`;\n }\n message += ` ${order.address?.city || ''}, ${order.address?.state || ''} - ${order.address?.pincode || ''}\\n`;\n if (order.address?.phone) {\n message += ` \uD83D\uDCDE ${order.address.phone}\\n`;\n }\n\n if (index < ordersData.length - 1) {\n message += '\\n---\\n\\n';\n }\n });\n\n return message;\n};\n\nconst formatCancellationMessage = (orderData: any, cancellationData: CancellationMessage): string => {\n const message = `\u274C Order Cancelled\n\nOrder #${orderData.id}\n\n\uD83D\uDC64 Name: ${orderData.address?.name || 'N/A'}\n\uD83D\uDCDE Phone: ${orderData.address?.phone || 'N/A'}\n\n\uD83D\uDCE6 Items:\n${orderData.orderItems?.map((item: any) => ` \u2022 ${item.product?.name || 'Unknown'} x${item.quantity}`).join('\\n') || ' N/A'}\n\n\uD83D\uDCB0 Total: \u20B9${orderData.totalAmount}\n\uD83D\uDCB3 Refund: ${orderData.refundStatus === 'na' ? 'N/A (COD)' : orderData.refundStatus || 'Pending'}\n\n\u2753 Reason: ${cancellationData.reason}\n\uD83D\uDC64 Cancelled by: ${cancellationData.cancelledBy === 'admin' ? 'Admin' : 'User'}\n\u23F0 Time: ${formatDateTime(cancellationData.cancelledAt)}\n`;\n\n return message;\n};\n\n/**\n * Start the post order handler\n * Subscribes to the orders:placed channel and sends to Telegram\n */\nexport const startOrderHandler = async (): Promise => {\n try {\n console.log('Starting post order handler...');\n\n await redisClient.subscribe(ORDER_CHANNEL, async (message: string) => {\n try {\n const { orderIds }: OrderIdMessage = JSON.parse(message);\n console.log('New order received, sending to Telegram...');\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { orders } from '@/src/db/schema'\n import { inArray } from 'drizzle-orm';\n\n const ordersData = await db.query.orders.findMany({\n where: inArray(orders.id, orderIds),\n with: {\n address: true,\n orderItems: { with: { product: true } },\n slot: true,\n },\n });\n */\n\n const ordersData = await getOrdersByIdsWithFullData(orderIds);\n\n const telegramMessage = formatOrderMessageWithFullData(ordersData);\n await sendTelegramMessage(telegramMessage);\n } catch (error) {\n console.error('Failed to process order message:', error);\n await sendTelegramMessage(`\u26A0\uFE0F Error parsing order: ${message}`);\n }\n });\n\n console.log('Post order handler started successfully');\n } catch (error) {\n console.error('Failed to start post order handler:', error);\n throw error;\n }\n};\n\n/**\n * Stop the post order handler\n */\nexport const stopOrderHandler = async (): Promise => {\n try {\n await redisClient.unsubscribe(ORDER_CHANNEL);\n console.log('Post order handler stopped');\n } catch (error) {\n console.error('Error stopping post order handler:', error);\n }\n};\n\nexport const startCancellationHandler = async (): Promise => {\n try {\n console.log('Starting cancellation handler...');\n\n await redisClient.subscribe(CANCELLED_CHANNEL, async (message: string) => {\n try {\n const cancellationData: CancellationMessage = JSON.parse(message);\n console.log('Order cancellation received, sending to Telegram...');\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { orders } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n const orderData = await db.query.orders.findFirst({\n where: eq(orders.id, cancellationData.orderId),\n with: {\n address: true,\n orderItems: { with: { product: true } },\n refunds: true,\n },\n });\n */\n\n const orderData = await getOrderByIdWithFullData(cancellationData.orderId);\n\n if (!orderData) {\n console.error('Order not found for cancellation:', cancellationData.orderId);\n await sendTelegramMessage(`\u26A0\uFE0F Order ${cancellationData.orderId} was cancelled but could not be found in database`);\n return;\n }\n\n const refundStatus = orderData.refunds?.[0]?.refundStatus || 'pending';\n\n const telegramMessage = formatCancellationMessage({ ...orderData, refundStatus }, cancellationData);\n await sendTelegramMessage(telegramMessage);\n } catch (error) {\n console.error('Failed to process cancellation message:', error);\n await sendTelegramMessage(`\u26A0\uFE0F Error processing cancellation: ${message}`);\n }\n });\n\n console.log('Cancellation handler started successfully');\n } catch (error) {\n console.error('Failed to start cancellation handler:', error);\n throw error;\n }\n};\n\nexport const stopCancellationHandler = async (): Promise => {\n try {\n await redisClient.unsubscribe(CANCELLED_CHANNEL);\n console.log('Cancellation handler stopped');\n } catch (error) {\n console.error('Error stopping cancellation handler:', error);\n }\n};\n\nexport const publishOrder = async (orderDetails: OrderIdMessage): Promise => {\n try {\n const message = JSON.stringify(orderDetails);\n await redisClient.publish(ORDER_CHANNEL, message);\n return true;\n } catch (error) {\n console.error('Failed to publish order:', error);\n return false;\n }\n};\n\nexport const publishFormattedOrder = async (\n createdOrders: any[],\n ordersBySlot: Map\n): Promise => {\n try {\n const orderIds = createdOrders.map(order => order.id);\n return await publishOrder({ orderIds });\n } catch (error) {\n console.error('Failed to format and publish order:', error);\n return false;\n }\n};\n\nexport const publishCancellation = async (\n orderId: number,\n cancelledBy: 'user' | 'admin',\n reason: string\n): Promise => {\n try {\n const message: CancellationMessage = {\n orderId,\n cancelledBy,\n reason,\n cancelledAt: new Date().toISOString(),\n };\n await redisClient.publish(CANCELLED_CHANNEL, JSON.stringify(message));\n console.log('Cancellation published to Redis:', orderId);\n return true;\n } catch (error) {\n console.error('Failed to publish cancellation:', error);\n return false;\n }\n};\n", "// import { createClient, RedisClientType } from 'redis';\nimport { redisUrl } from '@/src/lib/env-exporter'\n\nconst createClient = (args:any) => {}\nclass RedisClient {\n // private client: RedisClientType;\n // private subscriberClient: RedisClientType | null = null;\n // private isConnected: boolean = false;\n //\n private client: any;\n private subscriberrlient: any;\n private isConnected: any = false;\n\n\n constructor() {\n this.client = createClient({\n url: redisUrl,\n });\n\n // this.client.on('error', (err) => {\n // console.error('Redis Client Error:', err);\n // });\n //\n // this.client.on('connect', () => {\n // console.log('Redis Client Connected');\n // this.isConnected = true;\n // });\n //\n // this.client.on('disconnect', () => {\n // console.log('Redis Client Disconnected');\n // this.isConnected = false;\n // });\n //\n // this.client.on('ready', () => {\n // console.log('Redis Client Ready');\n // });\n //\n // this.client.on('reconnecting', () => {\n // console.log('Redis Client Reconnecting');\n // });\n\n // Connect immediately (fire and forget)\n // this.client.connect().catch((err) => {\n // console.error('Failed to connect Redis:', err);\n // });\n }\n\n async set(key: string, value: string, ttlSeconds?: number): Promise {\n if (ttlSeconds) {\n return await this.client.setEx(key, ttlSeconds, value);\n } else {\n return await this.client.set(key, value);\n }\n }\n\n async get(key: string): Promise {\n return await this.client.get(key);\n }\n\n async exists(key: string): Promise {\n const result = await this.client.exists(key);\n return result === 1;\n }\n\n async delete(key: string): Promise {\n return await this.client.del(key);\n }\n\n async lPush(key: string, value: string): Promise {\n return await this.client.lPush(key, value);\n }\n\n async KEYS(pattern: string): Promise {\n return await this.client.KEYS(pattern);\n }\n\n async MGET(keys: string[]): Promise<(string | null)[]> {\n return await this.client.MGET(keys);\n }\n\n // Publish message to a channel\n async publish(channel: string, message: string): Promise {\n return await this.client.publish(channel, message);\n }\n\n // Subscribe to a channel with callback\n async subscribe(channel: string, callback: (message: string) => void): Promise {\n // if (!this.subscriberClient) {\n // this.subscriberClient = createClient({\n // url: redisUrl,\n // });\n //\n // this.subscriberClient.on('error', (err) => {\n // console.error('Redis Subscriber Error:', err);\n // });\n //\n // this.subscriberClient.on('connect', () => {\n // console.log('Redis Subscriber Connected');\n // });\n //\n // await this.subscriberClient.connect();\n // }\n //\n // await this.subscriberClient.subscribe(channel, callback);\n console.log(`Subscribed to channel: ${channel}`);\n }\n\n // Unsubscribe from a channel\n async unsubscribe(channel: string): Promise {\n // if (this.subscriberClient) {\n // await this.subscriberClient.unsubscribe(channel);\n // console.log(`Unsubscribed from channel: ${channel}`);\n // }\n }\n\n disconnect(): void {\n // if (this.isConnected) {\n // this.client.disconnect();\n // }\n // if (this.subscriberClient) {\n // this.subscriberClient.disconnect();\n // }\n }\n\n get isClientConnected(): boolean {\n return this.isConnected;\n }\n}\n\nconst redisClient = new RedisClient();\n\nexport default redisClient;\nexport { RedisClient };\n", "import axios from 'axios';\nimport { isDevMode, telegramBotToken, telegramChatIds } from '@/src/lib/env-exporter'\n\nconst BOT_TOKEN = telegramBotToken;\nconst CHAT_IDS = telegramChatIds;\nconst TELEGRAM_API_URL = `https://api.telegram.org/bot${BOT_TOKEN}`;\n\n/**\n * Send a message to Telegram bot\n * @param message The message text to send\n * @returns Promise indicating success, failure, or null if dev mode\n */\nexport const sendTelegramMessage = async (message: string): Promise => {\n if (isDevMode) {\n return null;\n }\n try {\n const results = await Promise.all(\n CHAT_IDS.map(async (chatId) => {\n try {\n const response = await axios.post(`${TELEGRAM_API_URL}/sendMessage`, {\n chat_id: chatId,\n text: message,\n parse_mode: 'HTML',\n });\n\n if (response.data && response.data.ok) {\n console.log(`Telegram message sent successfully to ${chatId}`);\n return true;\n } else {\n console.error(`Telegram API error for ${chatId}:`, response.data);\n return false;\n }\n } catch (error) {\n console.error(`Failed to send Telegram message to ${chatId}:`, error);\n return false;\n }\n })\n ); \n\n console.log('sent telegram message successfully')\n \n\n // Return true if at least one message was sent successfully\n return results.some((result) => result);\n } catch (error) {\n console.error('Failed to send Telegram message:', error);\n return false;\n }\n};\n", "import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig,\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig,\n};\n", "'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport { VERSION } from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from './core/AxiosHeaders.js';\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, { allOwnKeys: true });\n\n // Copy context to instance\n utils.extend(instance, context, null, { allOwnKeys: true });\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = (thing) => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios;\n", "'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst { toString } = Object.prototype;\nconst { getPrototypeOf } = Object;\nconst { iterator, toStringTag } = Symbol;\n\nconst kindOf = ((cache) => (thing) => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type;\n};\n\nconst typeOfTest = (type) => (thing) => typeof thing === type;\n\n/**\n * Determine if a value is a non-null object\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst { isArray } = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return (\n val !== null &&\n !isUndefined(val) &&\n val.constructor !== null &&\n !isUndefined(val.constructor) &&\n isFunction(val.constructor.isBuffer) &&\n val.constructor.isBuffer(val)\n );\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n result = ArrayBuffer.isView(val);\n } else {\n result = val && val.buffer && isArrayBuffer(val.buffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = (thing) => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (\n (prototype === null ||\n prototype === Object.prototype ||\n Object.getPrototypeOf(prototype) === null) &&\n !(toStringTag in val) &&\n !(iterator in val)\n );\n};\n\n/**\n * Determine if a value is an empty object (safely handles Buffers)\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an empty object, otherwise false\n */\nconst isEmptyObject = (val) => {\n // Early return for non-objects or Buffers to prevent RangeError\n if (!isObject(val) || isBuffer(val)) {\n return false;\n }\n\n try {\n return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;\n } catch (e) {\n // Fallback for any other objects that might cause RangeError with Object.keys()\n return false;\n }\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a React Native Blob\n * React Native \"blob\": an object with a `uri` attribute. Optionally, it can\n * also have a `name` and `type` attribute to specify filename and content type\n *\n * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71\n * \n * @param {*} value The value to test\n * \n * @returns {boolean} True if value is a React Native Blob, otherwise false\n */\nconst isReactNativeBlob = (value) => {\n return !!(value && typeof value.uri !== 'undefined');\n}\n\n/**\n * Determine if environment is React Native\n * ReactNative `FormData` has a non-standard `getParts()` method\n * \n * @param {*} formData The formData to test\n * \n * @returns {boolean} True if environment is React Native, otherwise false\n */\nconst isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction getGlobal() {\n if (typeof globalThis !== 'undefined') return globalThis;\n if (typeof self !== 'undefined') return self;\n if (typeof window !== 'undefined') return window;\n if (typeof global !== 'undefined') return global;\n return {};\n}\n\nconst G = getGlobal();\nconst FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;\n\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (FormDataCtor && thing instanceof FormDataCtor) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n );\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = [\n 'ReadableStream',\n 'Request',\n 'Response',\n 'Headers',\n].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => {\n return str.trim ? str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n};\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, { allOwnKeys = false } = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Buffer check\n if (isBuffer(obj)) {\n return;\n }\n\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\n/**\n * Finds a key in an object, case-insensitive, returning the actual key name.\n * Returns null if the object is a Buffer or if no match is found.\n *\n * @param {Object} obj - The object to search.\n * @param {string} key - The key to find (case-insensitive).\n * @returns {?string} The actual key name if found, otherwise null.\n */\nfunction findKey(obj, key) {\n if (isBuffer(obj)) {\n return null;\n }\n\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== 'undefined') return globalThis;\n return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * const result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};\n const result = {};\n const assignValue = (val, key) => {\n // Skip dangerous property names to prevent prototype pollution\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return;\n }\n\n const targetKey = (caseless && findKey(result, key)) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else if (!skipUndefined || !isUndefined(val)) {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, { allOwnKeys } = {}) => {\n forEach(\n b,\n (val, key) => {\n if (thisArg && isFunction(val)) {\n Object.defineProperty(a, key, {\n value: bind(val, thisArg),\n writable: true,\n enumerable: true,\n configurable: true,\n });\n } else {\n Object.defineProperty(a, key, {\n value: val,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n },\n { allOwnKeys }\n );\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xfeff) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n Object.defineProperty(constructor.prototype, 'constructor', {\n value: constructor,\n writable: true,\n enumerable: false,\n configurable: true,\n });\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype,\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = ((TypedArray) => {\n // eslint-disable-next-line func-names\n return (thing) => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[iterator];\n\n const _iterator = generator.call(obj);\n\n let result;\n\n while ((result = _iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = (str) => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g, function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n });\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (\n ({ hasOwnProperty }) =>\n (obj, prop) =>\n hasOwnProperty.call(obj, prop)\n)(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error(\"Can not rewrite read-only method '\" + name + \"'\");\n };\n }\n });\n};\n\n/**\n * Converts an array or a delimited string into an object set with values as keys and true as values.\n * Useful for fast membership checks.\n *\n * @param {Array|string} arrayOrString - The array or string to convert.\n * @param {string} delimiter - The delimiter to use if input is a string.\n * @returns {Object} An object with keys from the array or string, values set to true.\n */\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach((value) => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite((value = +value)) ? value : defaultValue;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(\n thing &&\n isFunction(thing.append) &&\n thing[toStringTag] === 'FormData' &&\n thing[iterator]\n );\n}\n\n/**\n * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.\n *\n * @param {Object} obj - The object to convert.\n * @returns {Object} The JSON-compatible object.\n */\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n //Buffer check\n if (isBuffer(source)) {\n return source;\n }\n\n if (!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\n/**\n * Determines if a value is an async function.\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is an async function, otherwise false.\n */\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\n/**\n * Determines if a value is thenable (has then and catch methods).\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is thenable, otherwise false.\n */\nconst isThenable = (thing) =>\n thing &&\n (isObject(thing) || isFunction(thing)) &&\n isFunction(thing.then) &&\n isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\n/**\n * Provides a cross-platform setImmediate implementation.\n * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.\n *\n * @param {boolean} setImmediateSupported - Whether setImmediate is supported.\n * @param {boolean} postMessageSupported - Whether postMessage is supported.\n * @returns {Function} A function to schedule a callback asynchronously.\n */\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported\n ? ((token, callbacks) => {\n _global.addEventListener(\n 'message',\n ({ source, data }) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n },\n false\n );\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, '*');\n };\n })(`axios@${Math.random()}`, [])\n : (cb) => setTimeout(cb);\n})(typeof setImmediate === 'function', isFunction(_global.postMessage));\n\n/**\n * Schedules a microtask or asynchronous callback as soon as possible.\n * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.\n *\n * @type {Function}\n */\nconst asap =\n typeof queueMicrotask !== 'undefined'\n ? queueMicrotask.bind(_global)\n : (typeof process !== 'undefined' && process.nextTick) || _setImmediate;\n\n// *********************\n\nconst isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isEmptyObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isReactNativeBlob,\n isReactNative,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap,\n isIterable,\n};\n", "'use strict';\n\n/**\n * Create a bound version of a function with a specified `this` context\n *\n * @param {Function} fn - The function to bind\n * @param {*} thisArg - The value to be passed as the `this` parameter\n * @returns {Function} A new function that will call the original function with the specified `this` context\n */\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n", "'use strict';\n\nimport utils from '../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\nimport transitionalDefaults from '../defaults/transitional.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig || {};\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager(),\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n try {\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n } catch (e) {\n // ignore the case where \"stack\" is an un-writable property\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const { transitional, paramsSerializer, headers } = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(\n transitional,\n {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean),\n legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),\n },\n false\n );\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer,\n };\n } else {\n validator.assertOptions(\n paramsSerializer,\n {\n encode: validators.function,\n serialize: validators.function,\n },\n true\n );\n }\n }\n\n // Set config.allowAbsoluteUrls\n if (config.allowAbsoluteUrls !== undefined) {\n // do nothing\n } else if (this.defaults.allowAbsoluteUrls !== undefined) {\n config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n } else {\n config.allowAbsoluteUrls = true;\n }\n\n validator.assertOptions(\n config,\n {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken'),\n },\n true\n );\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(headers.common, headers[config.method]);\n\n headers &&\n utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {\n delete headers[method];\n });\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n const transitional = config.transitional || transitionalDefaults;\n const legacyInterceptorReqResOrdering =\n transitional && transitional.legacyInterceptorReqResOrdering;\n\n if (legacyInterceptorReqResOrdering) {\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n } else {\n requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n }\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift(...requestInterceptorChain);\n chain.push(...responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function (url, config) {\n return this.request(\n mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data,\n })\n );\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(\n mergeConfig(config || {}, {\n method,\n headers: isForm\n ? {\n 'Content-Type': 'multipart/form-data',\n }\n : {},\n url,\n data,\n })\n );\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val)\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',')\n .replace(/%20/g, '+');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n if (!params) {\n return url;\n }\n\n const _encode = (options && options.encode) || encode;\n\n const _options = utils.isFunction(options)\n ? {\n serialize: options,\n }\n : options;\n\n const serializeFn = _options && _options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, _options);\n } else {\n serializedParams = utils.isURLSearchParams(params)\n ? params.toString()\n : new AxiosURLSearchParams(params, _options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf('#');\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n", "'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00',\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder\n ? function (value) {\n return encoder.call(this, value, encode);\n }\n : encode;\n\n return this._pairs\n .map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '')\n .join('&');\n};\n\nexport default AxiosURLSearchParams;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path\n .concat(key)\n .map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n })\n .join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(\n options,\n {\n metaTokens: true,\n dots: false,\n indexes: false,\n },\n false,\n function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n }\n );\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (utils.isBoolean(value)) {\n return value.toString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (utils.isReactNative(formData) && utils.isReactNativeBlob(value)) {\n formData.append(renderKey(path, key, dots), convertValue(value));\n return false;\n }\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value)))\n ) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) &&\n formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true\n ? renderKey([key], index, dots)\n : indexes === null\n ? key\n : key + '[]',\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable,\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result =\n !(utils.isUndefined(el) || el === null) &&\n visitor.call(formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers);\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n", "'use strict';\n\nimport utils from '../utils.js';\n\nclass AxiosError extends Error {\n static from(error, code, config, request, response, customProps) {\n const axiosError = new AxiosError(error.message, code || error.code, config, request, response);\n axiosError.cause = error;\n axiosError.name = error.name;\n\n // Preserve status from the original error if not already set from response\n if (error.status != null && axiosError.status == null) {\n axiosError.status = error.status;\n }\n\n customProps && Object.assign(axiosError, customProps);\n return axiosError;\n }\n\n /**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\n constructor(message, code, config, request, response) {\n super(message);\n \n // Make message enumerable to maintain backward compatibility\n // The native Error constructor sets message as non-enumerable,\n // but axios < v1.13.3 had it as enumerable\n Object.defineProperty(this, 'message', {\n value: message,\n enumerable: true,\n writable: true,\n configurable: true\n });\n \n this.name = 'AxiosError';\n this.isAxiosError = true;\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status;\n }\n }\n\n toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.status,\n };\n }\n}\n\n// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.\nAxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';\nAxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';\nAxiosError.ECONNABORTED = 'ECONNABORTED';\nAxiosError.ETIMEDOUT = 'ETIMEDOUT';\nAxiosError.ERR_NETWORK = 'ERR_NETWORK';\nAxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';\nAxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';\nAxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';\nAxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';\nAxiosError.ERR_CANCELED = 'ERR_CANCELED';\nAxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';\nAxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';\n\nexport default AxiosError;\n", "// eslint-disable-next-line strict\nexport default null;\n", "'use strict';\n\nimport utils from '../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n * @param {Object} options The options for the interceptor, synchronous and runWhen\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null,\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {void}\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n", "'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from '../adapters/adapters.js';\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(config, config.transformRequest);\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);\n\n return adapter(config).then(\n function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(config, config.transformResponse, response);\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n },\n function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n }\n );\n}\n", "'use strict';\n\nimport utils from '../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [\n function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if (\n (isFileList = utils.isFileList(data)) ||\n contentType.indexOf('multipart/form-data') > -1\n ) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? { 'files[]': data } : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n },\n ],\n\n transformResponse: [\n function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (\n data &&\n utils.isString(data) &&\n ((forcedJSONParsing && !this.responseType) || JSONRequested)\n ) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data, this.parseReviver);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n },\n ],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob,\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': undefined,\n },\n },\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n", "'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false,\n legacyInterceptorReqResOrdering: true,\n};\n", "'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), {\n visitor: function (value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n },\n ...options,\n });\n}\n", "import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform,\n};\n", "import URLSearchParams from './classes/URLSearchParams.js';\nimport FormData from './classes/FormData.js';\nimport Blob from './classes/Blob.js';\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob,\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],\n};\n", "'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n", "'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n", "'use strict';\n\nexport default typeof Blob !== 'undefined' ? Blob : null;\n", "const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = (typeof navigator === 'object' && navigator) || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv =\n hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = (hasBrowserEnv && window.location.href) || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin,\n};\n", "'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map((match) => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header\n .trim()\n .toLowerCase()\n .replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach((methodName) => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function (arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true,\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if (\n !key ||\n self[key] === undefined ||\n _rewrite === true ||\n (_rewrite === undefined && self[key] !== false)\n ) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isObject(header) && utils.isIterable(header)) {\n let obj = {},\n dest,\n key;\n for (const entry of header) {\n if (!utils.isArray(entry)) {\n throw TypeError('Object iterator must return a key-value pair');\n }\n\n obj[(key = entry[0])] = (dest = obj[key])\n ? utils.isArray(dest)\n ? [...dest, entry[1]]\n : [dest, entry[1]]\n : entry[1];\n }\n\n setHeaders(obj, valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(\n key &&\n this[key] !== undefined &&\n (!matcher || matchHeaderValue(this, this[key], key, matcher))\n );\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null &&\n value !== false &&\n (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON())\n .map(([header, value]) => header + ': ' + value)\n .join('\\n');\n }\n\n getSetCookie() {\n return this.get('set-cookie') || [];\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals =\n (this[$internals] =\n this[$internals] =\n {\n accessors: {},\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor([\n 'Content-Type',\n 'Content-Length',\n 'Accept',\n 'Accept-Encoding',\n 'User-Agent',\n 'Authorization',\n]);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n },\n };\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n", "'use strict';\n\nimport utils from '../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age',\n 'authorization',\n 'content-length',\n 'content-type',\n 'etag',\n 'expires',\n 'from',\n 'host',\n 'if-modified-since',\n 'if-unmodified-since',\n 'last-modified',\n 'location',\n 'max-forwards',\n 'proxy-authorization',\n 'referer',\n 'retry-after',\n 'user-agent',\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default (rawHeaders) => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders &&\n rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n", "'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n", "'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\n\nclass CanceledError extends AxiosError {\n /**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\n constructor(message, config, request) {\n super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n this.__CANCEL__ = true;\n }\n}\n\nexport default CanceledError;\n", "import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport * as fetchAdapter from './fetch.js';\nimport AxiosError from '../core/AxiosError.js';\n\n/**\n * Known adapters mapping.\n * Provides environment-specific adapters for Axios:\n * - `http` for Node.js\n * - `xhr` for browsers\n * - `fetch` for fetch API-based requests\n *\n * @type {Object}\n */\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: {\n get: fetchAdapter.getFetch,\n },\n};\n\n// Assign adapter names for easier debugging and identification\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', { value });\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', { value });\n }\n});\n\n/**\n * Render a rejection reason string for unknown or unsupported adapters\n *\n * @param {string} reason\n * @returns {string}\n */\nconst renderReason = (reason) => `- ${reason}`;\n\n/**\n * Check if the adapter is resolved (function, null, or false)\n *\n * @param {Function|null|false} adapter\n * @returns {boolean}\n */\nconst isResolvedHandle = (adapter) =>\n utils.isFunction(adapter) || adapter === null || adapter === false;\n\n/**\n * Get the first suitable adapter from the provided list.\n * Tries each adapter in order until a supported one is found.\n * Throws an AxiosError if no adapter is suitable.\n *\n * @param {Array|string|Function} adapters - Adapter(s) by name or function.\n * @param {Object} config - Axios request configuration\n * @throws {AxiosError} If no suitable adapter is available\n * @returns {Function} The resolved adapter function\n */\nfunction getAdapter(adapters, config) {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const { length } = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n const reasons = Object.entries(rejectedReasons).map(\n ([id, state]) =>\n `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length\n ? reasons.length > 1\n ? 'since :\\n' + reasons.map(renderReason).join('\\n')\n : ' ' + renderReason(reasons[0])\n : 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n}\n\n/**\n * Exports Axios adapters and utility to resolve an adapter\n */\nexport default {\n /**\n * Resolve an adapter from a list of adapter names or functions.\n * @type {Function}\n */\n getAdapter,\n\n /**\n * Exposes all known adapters\n * @type {Object}\n */\n adapters: knownAdapters,\n};\n", "import utils from '../utils.js';\nimport settle from '../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport { progressEventReducer } from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported &&\n function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let { responseType, onUploadProgress, onDownloadProgress } = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData =\n !responseType || responseType === 'text' || responseType === 'json'\n ? request.responseText\n : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request,\n };\n\n settle(\n function _resolve(value) {\n resolve(value);\n done();\n },\n function _reject(err) {\n reject(err);\n done();\n },\n response\n );\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (\n request.status === 0 &&\n !(request.responseURL && request.responseURL.indexOf('file:') === 0)\n ) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError(event) {\n // Browsers deliver a ProgressEvent in XHR onerror\n // (message may be empty; when present, surface it)\n // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event\n const msg = event && event.message ? event.message : 'Network Error';\n const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);\n // attach the underlying event for consumers who want details\n err.event = event || null;\n reject(err);\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout\n ? 'timeout of ' + _config.timeout + 'ms exceeded'\n : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(\n new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request\n )\n );\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = (cancel) => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted\n ? onCanceled()\n : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(\n new AxiosError(\n 'Unsupported protocol ' + protocol + ':',\n AxiosError.ERR_BAD_REQUEST,\n config\n )\n );\n return;\n }\n\n // Send the request\n request.send(requestData || null);\n });\n };\n", "'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(\n new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][\n Math.floor(response.status / 100) - 4\n ],\n response.config,\n response.request,\n response\n )\n );\n }\n}\n", "'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return (match && match[1]) || '';\n}\n", "import speedometer from './speedometer.js';\nimport throttle from './throttle.js';\nimport utils from '../utils.js';\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle((e) => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? loaded / total : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true,\n };\n\n listener(data);\n }, freq);\n};\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [\n (loaded) =>\n throttled[0]({\n lengthComputable,\n total,\n loaded,\n }),\n throttled[1],\n ];\n};\n\nexport const asyncDecorator =\n (fn) =>\n (...args) =>\n utils.asap(() => fn(...args));\n", "'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round((bytesCount * 1000) / passed) : undefined;\n };\n}\n\nexport default speedometer;\n", "/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn(...args);\n };\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if (passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs);\n }, threshold - passed);\n }\n }\n };\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n", "import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport isURLSameOrigin from './isURLSameOrigin.js';\nimport cookies from './cookies.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport mergeConfig from '../core/mergeConfig.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport buildURL from './buildURL.js';\n\nexport default (config) => {\n const newConfig = mergeConfig({}, config);\n\n let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(\n buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),\n config.params,\n config.paramsSerializer\n );\n\n // HTTP basic authentication\n if (auth) {\n headers.set(\n 'Authorization',\n 'Basic ' +\n btoa(\n (auth.username || '') +\n ':' +\n (auth.password ? unescape(encodeURIComponent(auth.password)) : '')\n )\n );\n }\n\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // browser handles it\n } else if (utils.isFunction(data.getHeaders)) {\n // Node.js FormData (like form-data package)\n const formHeaders = data.getHeaders();\n // Only set safe headers to avoid overwriting security headers\n const allowedHeaders = ['content-type', 'content-length'];\n Object.entries(formHeaders).forEach(([key, val]) => {\n if (allowedHeaders.includes(key.toLowerCase())) {\n headers.set(key, val);\n }\n });\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n};\n", "import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n })(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n )\n : () => true;\n", "import utils from '../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n ? // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure, sameSite) {\n if (typeof document === 'undefined') return;\n\n const cookie = [`${name}=${encodeURIComponent(value)}`];\n\n if (utils.isNumber(expires)) {\n cookie.push(`expires=${new Date(expires).toUTCString()}`);\n }\n if (utils.isString(path)) {\n cookie.push(`path=${path}`);\n }\n if (utils.isString(domain)) {\n cookie.push(`domain=${domain}`);\n }\n if (secure === true) {\n cookie.push('secure');\n }\n if (utils.isString(sameSite)) {\n cookie.push(`SameSite=${sameSite}`);\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n if (typeof document === 'undefined') return null;\n const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));\n return match ? decodeURIComponent(match[1]) : null;\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000, '/');\n },\n }\n : // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {},\n };\n", "'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n", "'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n if (typeof url !== 'string') {\n return false;\n }\n\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n", "'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst headersToObject = (thing) => (thing instanceof AxiosHeaders ? { ...thing } : thing);\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({ caseless }, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(a, b, prop, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b, prop) =>\n mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),\n };\n\n utils.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {\n if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;\n const merge = utils.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n", "import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport composeSignals from '../helpers/composeSignals.js';\nimport { trackStream } from '../helpers/trackStream.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {\n progressEventReducer,\n progressEventDecorator,\n asyncDecorator,\n} from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\nimport settle from '../core/settle.js';\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst { isFunction } = utils;\n\nconst globalFetchAPI = (({ Request, Response }) => ({\n Request,\n Response,\n}))(utils.global);\n\nconst { ReadableStream, TextEncoder } = utils.global;\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false;\n }\n};\n\nconst factory = (env) => {\n env = utils.merge.call(\n {\n skipUndefined: true,\n },\n globalFetchAPI,\n env\n );\n\n const { fetch: envFetch, Request, Response } = env;\n const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';\n const isRequestSupported = isFunction(Request);\n const isResponseSupported = isFunction(Response);\n\n if (!isFetchSupported) {\n return false;\n }\n\n const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);\n\n const encodeText =\n isFetchSupported &&\n (typeof TextEncoder === 'function'\n ? (\n (encoder) => (str) =>\n encoder.encode(str)\n )(new TextEncoder())\n : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));\n\n const supportsRequestStream =\n isRequestSupported &&\n isReadableStreamSupported &&\n test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n });\n\n const supportsResponseStream =\n isResponseSupported &&\n isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n const resolvers = {\n stream: supportsResponseStream && ((res) => res.body),\n };\n\n isFetchSupported &&\n (() => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {\n !resolvers[type] &&\n (resolvers[type] = (res, config) => {\n let method = res && res[type];\n\n if (method) {\n return method.call(res);\n }\n\n throw new AxiosError(\n `Response type '${type}' is not supported`,\n AxiosError.ERR_NOT_SUPPORT,\n config\n );\n });\n });\n })();\n\n const getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if (utils.isBlob(body)) {\n return body.size;\n }\n\n if (utils.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if (utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if (utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if (utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n };\n\n const resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n };\n\n return async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions,\n } = resolveConfig(config);\n\n let _fetch = envFetch || fetch;\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals(\n [signal, cancelToken && cancelToken.toAbortSignal()],\n timeout\n );\n\n let request = null;\n\n const unsubscribe =\n composedSignal &&\n composedSignal.unsubscribe &&\n (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress &&\n supportsRequestStream &&\n method !== 'get' &&\n method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: 'half',\n });\n\n let contentTypeHeader;\n\n if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader);\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;\n\n const resolvedOptions = {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: 'half',\n credentials: isCredentialsSupported ? withCredentials : undefined,\n };\n\n request = isRequestSupported && new Request(url, resolvedOptions);\n\n let response = await (isRequestSupported\n ? _fetch(request, fetchOptions)\n : _fetch(url, resolvedOptions));\n\n const isStreamResponse =\n supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach((prop) => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] =\n (onDownloadProgress &&\n progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n )) ||\n [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](\n response,\n config\n );\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request,\n });\n });\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError(\n 'Network Error',\n AxiosError.ERR_NETWORK,\n config,\n request,\n err && err.response\n ),\n {\n cause: err.cause || err,\n }\n );\n }\n\n throw AxiosError.from(err, err && err.code, config, request, err && err.response);\n }\n };\n};\n\nconst seedCache = new Map();\n\nexport const getFetch = (config) => {\n let env = (config && config.env) || {};\n const { fetch, Request, Response } = env;\n const seeds = [Request, Response, fetch];\n\n let len = seeds.length,\n i = len,\n seed,\n target,\n map = seedCache;\n\n while (i--) {\n seed = seeds[i];\n target = map.get(seed);\n\n target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));\n\n map = target;\n }\n\n return target;\n};\n\nconst adapter = getFetch();\n\nexport default adapter;\n", "import CanceledError from '../cancel/CanceledError.js';\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n const { length } = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(\n err instanceof AxiosError\n ? err\n : new CanceledError(err instanceof Error ? err.message : err)\n );\n }\n };\n\n let timer =\n timeout &&\n setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));\n }, timeout);\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach((signal) => {\n signal.unsubscribe\n ? signal.unsubscribe(onabort)\n : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n };\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const { signal } = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n }\n};\n\nexport default composeSignals;\n", "export const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n};\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n};\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n};\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n };\n\n return new ReadableStream(\n {\n async pull(controller) {\n try {\n const { done, value } = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = (bytes += len);\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n },\n },\n {\n highWaterMark: 2,\n }\n );\n};\n", "'use strict';\n\nimport { VERSION } from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return (\n '[Axios v' +\n VERSION +\n \"] Transitional option '\" +\n opt +\n \"'\" +\n desc +\n (message ? '. ' + message : '')\n );\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError(\n 'option ' + opt + ' must be ' + result,\n AxiosError.ERR_BAD_OPTION_VALUE\n );\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators,\n};\n", "export const VERSION = \"1.13.6\";", "'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then((cancel) => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = (onfulfilled) => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise((resolve) => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel,\n };\n }\n}\n\nexport default CancelToken;\n", "'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * const args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n", "'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && payload.isAxiosError === true;\n}\n", "const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n WebServerIsDown: 521,\n ConnectionTimedOut: 522,\n OriginIsUnreachable: 523,\n TimeoutOccurred: 524,\n SslHandshakeFailed: 525,\n InvalidSslCertificate: 526,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllUserNegativityScores as getAllUserNegativityScoresFromDb,\n getUserNegativityScore as getUserNegativityScoreFromDb,\n type UserNegativityData,\n} from '@/src/dbService'\n\nexport async function initializeUserNegativityStore(): Promise {\n try {\n console.log('Initializing user negativity store in Redis...')\n\n const results = await getAllUserNegativityScoresFromDb()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { userIncidents } from '@/src/db/schema'\n import { sum } from 'drizzle-orm'\n\n const results = await db\n .select({\n userId: userIncidents.userId,\n totalNegativityScore: sum(userIncidents.negativityScore).mapWith(Number),\n })\n .from(userIncidents)\n .groupBy(userIncidents.userId);\n */\n\n // for (const { userId, totalNegativityScore } of results) {\n // await redisClient.set(\n // `user:negativity:${userId}`,\n // totalNegativityScore.toString()\n // )\n // }\n\n console.log(`User negativity store initialized for ${results.length} users`)\n } catch (error) {\n console.error('Error initializing user negativity store:', error)\n throw error\n }\n}\n\nexport async function getUserNegativity(userId: number): Promise {\n try {\n // const key = `user:negativity:${userId}`\n // const data = await redisClient.get(key)\n //\n // if (!data) {\n // return 0\n // }\n //\n // return parseInt(data, 10)\n\n return await getUserNegativityScoreFromDb(userId)\n } catch (error) {\n console.error(`Error getting negativity score for user ${userId}:`, error)\n return 0\n }\n}\n\nexport async function getAllUserNegativityScores(): Promise> {\n try {\n // const keys = await redisClient.KEYS('user:negativity:*')\n //\n // if (keys.length === 0) return {}\n //\n // const values = await redisClient.MGET(keys)\n //\n // const result: Record = {}\n // for (let i = 0; i < keys.length; i++) {\n // const key = keys[i]\n // const value = values[i]\n //\n // const match = key.match(/user:negativity:(\\d+)/)\n // if (match && value) {\n // const userId = parseInt(match[1], 10)\n // result[userId] = parseInt(value, 10)\n // }\n // }\n //\n // return result\n\n const results = await getAllUserNegativityScoresFromDb()\n\n const result: Record = {}\n for (const { userId, totalNegativityScore } of results) {\n result[userId] = totalNegativityScore\n }\n return result\n } catch (error) {\n console.error('Error getting all user negativity scores:', error)\n return {}\n }\n}\n\nexport async function getMultipleUserNegativityScores(\n userIds: number[]\n): Promise> {\n try {\n if (userIds.length === 0) return {}\n\n // const keys = userIds.map((id) => `user:negativity:${id}`)\n //\n // const values = await redisClient.MGET(keys)\n //\n // const result: Record = {}\n // for (let i = 0; i < userIds.length; i++) {\n // const value = values[i]\n // if (value) {\n // result[userIds[i]] = parseInt(value, 10)\n // } else {\n // result[userIds[i]] = 0\n // }\n // }\n //\n // return result\n\n const result: Record = {}\n for (const userId of userIds) {\n result[userId] = await getUserNegativityScoreFromDb(userId)\n }\n return result\n } catch (error) {\n console.error('Error getting multiple user negativity scores:', error)\n return {}\n }\n}\n\nexport async function recomputeUserNegativityScore(userId: number): Promise {\n try {\n const totalScore = await getUserNegativityScoreFromDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { userIncidents } from '@/src/db/schema'\n import { eq, sum } from 'drizzle-orm'\n\n const [result] = await db\n .select({\n totalNegativityScore: sum(userIncidents.negativityScore).mapWith(Number),\n })\n .from(userIncidents)\n .where(eq(userIncidents.userId, userId))\n .limit(1);\n\n const totalScore = result?.totalNegativityScore || 0;\n */\n\n // const key = `user:negativity:${userId}`\n // await redisClient.set(key, totalScore.toString())\n } catch (error) {\n console.error(`Error recomputing negativity score for user ${userId}:`, error)\n throw error\n }\n}\n", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport dayjs from 'dayjs'\nimport { appUrl } from '@/src/lib/env-exporter'\nimport {\n checkVendorSnippetExists as checkVendorSnippetExistsInDb,\n getVendorSnippetById as getVendorSnippetByIdInDb,\n getVendorSnippetByCode as getVendorSnippetByCodeInDb,\n getAllVendorSnippets as getAllVendorSnippetsInDb,\n createVendorSnippet as createVendorSnippetInDb,\n updateVendorSnippet as updateVendorSnippetInDb,\n deleteVendorSnippet as deleteVendorSnippetInDb,\n getProductsByIds as getProductsByIdsInDb,\n getVendorSlotById as getVendorSlotByIdInDb,\n getVendorOrdersBySlotId as getVendorOrdersBySlotIdInDb,\n getVendorOrders as getVendorOrdersInDb,\n updateVendorOrderItemPackaging as updateVendorOrderItemPackagingInDb,\n getSlotsAfterDate as getSlotsAfterDateInDb,\n} from '@/src/dbService'\nimport type {\n AdminVendorSnippet,\n AdminVendorSnippetWithProducts,\n AdminVendorSnippetWithSlot,\n AdminVendorSnippetDeleteResult,\n AdminVendorSnippetOrdersResult,\n AdminVendorSnippetOrdersWithSlotResult,\n AdminVendorOrderSummary,\n AdminUpcomingSlotsResult,\n AdminVendorUpdatePackagingResult,\n} from '@packages/shared'\n\nconst createSnippetSchema = z.object({\n snippetCode: z.string().min(1, \"Snippet code is required\"),\n slotId: z.number().optional(),\n productIds: z.array(z.number().int().positive()).min(1, \"At least one product is required\"),\n validTill: z.string().optional(),\n isPermanent: z.boolean().default(false)\n});\n\nconst updateSnippetSchema = z.object({\n id: z.number().int().positive(),\n updates: createSnippetSchema.partial().extend({\n snippetCode: z.string().min(1).optional(),\n productIds: z.array(z.number().int().positive()).optional(),\n isPermanent: z.boolean().default(false)\n }),\n});\n\nexport const vendorSnippetsRouter = router({\n create: protectedProcedure\n .input(createSnippetSchema)\n .mutation(async ({ input, ctx }): Promise => {\n const { snippetCode, slotId, productIds, validTill, isPermanent } = input;\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n \n if(slotId) {\n const slot = await getVendorSlotByIdInDb(slotId)\n if (!slot) {\n throw new Error(\"Invalid slot ID\")\n }\n }\n\n const products = await getProductsByIdsInDb(productIds)\n if (products.length !== productIds.length) {\n throw new Error(\"One or more invalid product IDs\")\n }\n\n const existingSnippet = await checkVendorSnippetExistsInDb(snippetCode)\n if (existingSnippet) {\n throw new Error(\"Snippet code already exists\")\n }\n\n const result = await createVendorSnippetInDb({\n snippetCode,\n slotId,\n productIds,\n isPermanent,\n validTill: validTill ? new Date(validTill) : undefined,\n })\n\n /*\n // Old implementation - direct DB queries:\n // Validate slot exists\n if(slotId) {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n });\n if (!slot) {\n throw new Error(\"Invalid slot ID\");\n }\n }\n\n // Validate products exist\n const products = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, productIds),\n });\n if (products.length !== productIds.length) {\n throw new Error(\"One or more invalid product IDs\");\n }\n\n // Check if snippet code already exists\n const existingSnippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n });\n if (existingSnippet) {\n throw new Error(\"Snippet code already exists\");\n }\n\n const result = await db.insert(vendorSnippets).values({\n snippetCode,\n slotId,\n productIds,\n isPermanent,\n validTill: validTill ? new Date(validTill) : undefined,\n }).returning();\n\n return result[0];\n */\n\n return result\n }),\n\n getAll: protectedProcedure\n .query(async (): Promise => {\n console.log('from the vendor snipptes methods')\n\n try {\n const result = await getAllVendorSnippetsInDb()\n\n const snippetsWithProducts = await Promise.all(\n result.map(async (snippet) => {\n const products = await getProductsByIdsInDb(snippet.productIds)\n\n return {\n ...snippet,\n accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`,\n products,\n }\n })\n )\n\n /*\n // Old implementation - direct DB queries:\n const result = await db.query.vendorSnippets.findMany({\n with: {\n slot: true,\n },\n orderBy: (vendorSnippets, { desc }) => [desc(vendorSnippets.createdAt)],\n });\n\n const snippetsWithProducts = await Promise.all(\n result.map(async (snippet) => {\n const products = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n columns: { id: true, name: true },\n });\n\n return {\n ...snippet,\n accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`,\n products: products.map(p => ({ id: p.id, name: p.name })),\n };\n })\n );\n\n return snippetsWithProducts;\n */\n\n return snippetsWithProducts\n }\n catch(e) {\n console.log(e)\n }\n return []\n }),\n\n getById: protectedProcedure\n .input(z.object({ id: z.number().int().positive() }))\n .query(async ({ input }): Promise => {\n const { id } = input;\n\n const result = await getVendorSnippetByIdInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const result = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.id, id),\n with: {\n slot: true,\n },\n });\n\n if (!result) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n return result;\n */\n\n if (!result) {\n throw new Error('Vendor snippet not found')\n }\n\n return result\n }),\n\n update: protectedProcedure\n .input(updateSnippetSchema)\n .mutation(async ({ input }): Promise => {\n const { id, updates } = input;\n \n const existingSnippet = await getVendorSnippetByIdInDb(id)\n if (!existingSnippet) {\n throw new Error('Vendor snippet not found')\n }\n\n if (updates.slotId) {\n const slot = await getVendorSlotByIdInDb(updates.slotId)\n if (!slot) {\n throw new Error('Invalid slot ID')\n }\n }\n\n if (updates.productIds) {\n const products = await getProductsByIdsInDb(updates.productIds)\n if (products.length !== updates.productIds.length) {\n throw new Error('One or more invalid product IDs')\n }\n }\n\n if (updates.snippetCode && updates.snippetCode !== existingSnippet.snippetCode) {\n const duplicateSnippet = await checkVendorSnippetExistsInDb(updates.snippetCode)\n if (duplicateSnippet) {\n throw new Error('Snippet code already exists')\n }\n }\n\n const updateData = {\n ...updates,\n validTill: updates.validTill !== undefined\n ? (updates.validTill ? new Date(updates.validTill) : null)\n : undefined,\n }\n\n const result = await updateVendorSnippetInDb(id, updateData)\n\n /*\n // Old implementation - direct DB queries:\n const existingSnippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.id, id),\n });\n if (!existingSnippet) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n // Validate slot if being updated\n if (updates.slotId) {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, updates.slotId),\n });\n if (!slot) {\n throw new Error(\"Invalid slot ID\");\n }\n }\n\n // Validate products if being updated\n if (updates.productIds) {\n const products = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, updates.productIds),\n });\n if (products.length !== updates.productIds.length) {\n throw new Error(\"One or more invalid product IDs\");\n }\n }\n\n // Check snippet code uniqueness if being updated\n if (updates.snippetCode && updates.snippetCode !== existingSnippet.snippetCode) {\n const duplicateSnippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, updates.snippetCode),\n });\n if (duplicateSnippet) {\n throw new Error(\"Snippet code already exists\");\n }\n }\n\n const updateData: any = { ...updates };\n if (updates.validTill !== undefined) {\n updateData.validTill = updates.validTill ? new Date(updates.validTill) : null;\n }\n\n const result = await db.update(vendorSnippets)\n .set(updateData)\n .where(eq(vendorSnippets.id, id))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Failed to update vendor snippet\");\n }\n\n return result[0];\n */\n\n if (!result) {\n throw new Error('Failed to update vendor snippet')\n }\n\n return result\n }),\n\n delete: protectedProcedure\n .input(z.object({ id: z.number().int().positive() }))\n .mutation(async ({ input }): Promise => {\n const { id } = input;\n\n const result = await deleteVendorSnippetInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const result = await db.delete(vendorSnippets)\n .where(eq(vendorSnippets.id, id))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n return { message: \"Vendor snippet deleted successfully\" };\n */\n\n if (!result) {\n throw new Error('Vendor snippet not found')\n }\n\n return { message: 'Vendor snippet deleted successfully' }\n }),\n\n getOrdersBySnippet: publicProcedure\n .input(z.object({\n snippetCode: z.string().min(1, \"Snippet code is required\")\n }))\n .query(async ({ input }): Promise => {\n const { snippetCode } = input;\n\n const snippet = await getVendorSnippetByCodeInDb(snippetCode)\n\n /*\n // Old implementation - direct DB queries:\n // Find the snippet\n const snippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n });\n\n if (!snippet) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n // Check if snippet is still valid\n if (snippet.validTill && new Date(snippet.validTill) < new Date()) {\n throw new Error(\"Vendor snippet has expired\");\n }\n\n // Query orders that match the snippet criteria\n const matchingOrders = await db.query.orders.findMany({\n where: eq(orders.slotId, snippet.slotId!),\n with: {\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n user: true,\n slot: true,\n },\n orderBy: (orders, { desc }) => [desc(orders.createdAt)],\n });\n */\n\n if (!snippet) {\n throw new Error('Vendor snippet not found')\n }\n\n if (snippet.validTill && new Date(snippet.validTill) < new Date()) {\n throw new Error('Vendor snippet has expired')\n }\n\n if (!snippet.slotId) {\n throw new Error('Vendor snippet not associated with a slot')\n }\n\n const matchingOrders = await getVendorOrdersBySlotIdInDb(snippet.slotId)\n\n // Filter orders that contain at least one of the snippet's products\n const filteredOrders = matchingOrders.filter(order => {\n const status = order.orderStatus;\n if (status[0].isCancelled) return false;\n const orderProductIds = order.orderItems.map(item => item.productId);\n return snippet.productIds.some(productId => orderProductIds.includes(productId));\n });\n\n // Format the response\n const formattedOrders = filteredOrders.map(order => {\n // Filter orderItems to only include products attached to the snippet\n const attachedOrderItems = order.orderItems.filter(item =>\n snippet.productIds.includes(item.productId)\n );\n\n const products = attachedOrderItems.map(item => ({\n orderItemId: item.id,\n productId: item.productId,\n productName: item.product.name,\n quantity: parseFloat(item.quantity),\n productSize: item.product.productQuantity,\n price: parseFloat((item.price ?? 0).toString()),\n unit: item.product.unit?.shortNotation || 'unit',\n subtotal: parseFloat((item.price ?? 0).toString()) * parseFloat(item.quantity),\n is_packaged: item.is_packaged,\n is_package_verified: item.is_package_verified,\n }));\n\n const orderTotal = products.reduce((sum, p) => sum + p.subtotal, 0);\n\n return {\n orderId: `ORD${order.id}`,\n orderDate: order.createdAt.toISOString(),\n customerName: order.user.name || '',\n totalAmount: orderTotal,\n slotInfo: order.slot ? {\n time: order.slot.deliveryTime.toISOString(),\n sequence: order.slot.deliverySequence,\n } : null,\n products,\n matchedProducts: snippet.productIds, // All snippet products are considered matched\n snippetCode: snippet.snippetCode,\n };\n });\n\n return {\n success: true,\n data: formattedOrders,\n snippet: {\n id: snippet.id,\n snippetCode: snippet.snippetCode,\n slotId: snippet.slotId,\n productIds: snippet.productIds,\n validTill: snippet.validTill?.toISOString(),\n createdAt: snippet.createdAt.toISOString(),\n isPermanent: snippet.isPermanent,\n },\n }\n }),\n\n getVendorOrders: protectedProcedure\n .query(async (): Promise => {\n const vendorOrders = await getVendorOrdersInDb()\n\n /*\n // Old implementation - direct DB queries:\n const vendorOrders = await db.query.orders.findMany({\n with: {\n user: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n },\n orderBy: (orders, { desc }) => [desc(orders.createdAt)],\n });\n */\n\n return vendorOrders.map(order => ({\n id: order.id,\n status: 'pending',\n orderDate: order.createdAt.toISOString(),\n totalQuantity: order.orderItems.reduce((sum, item) => sum + parseFloat(item.quantity || '0'), 0),\n products: order.orderItems.map(item => ({\n name: item.product.name,\n quantity: parseFloat(item.quantity || '0'),\n unit: item.product.unit?.shortNotation || 'unit',\n })),\n }))\n }),\n\n getUpcomingSlots: publicProcedure\n .query(async (): Promise => {\n const threeHoursAgo = dayjs().subtract(3, 'hour').toDate();\n const slots = await getSlotsAfterDateInDb(threeHoursAgo)\n\n /*\n // Old implementation - direct DB queries:\n const slots = await db.query.deliverySlotInfo.findMany({\n where: and(\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, threeHoursAgo)\n ),\n orderBy: asc(deliverySlotInfo.deliveryTime),\n });\n */\n\n return {\n success: true,\n data: slots.map(slot => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime.toISOString(),\n freezeTime: slot.freezeTime.toISOString(),\n deliverySequence: slot.deliverySequence,\n })),\n }\n }),\n\n getOrdersBySnippetAndSlot: publicProcedure\n .input(z.object({\n snippetCode: z.string().min(1, \"Snippet code is required\"),\n slotId: z.number().int().positive(\"Valid slot ID is required\"),\n }))\n .query(async ({ input }): Promise => {\n const { snippetCode, slotId } = input;\n\n const snippet = await getVendorSnippetByCodeInDb(snippetCode)\n const slot = await getVendorSlotByIdInDb(slotId)\n\n /*\n // Old implementation - direct DB queries:\n // Find the snippet\n const snippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n });\n\n if (!snippet) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n // Find the slot\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n });\n\n if (!slot) {\n throw new Error(\"Slot not found\");\n }\n \n // Query orders that match the slot and snippet criteria\n const matchingOrders = await db.query.orders.findMany({\n where: eq(orders.slotId, slotId),\n with: {\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n user: true,\n slot: true,\n },\n orderBy: (orders, { desc }) => [desc(orders.createdAt)],\n });\n */\n\n if (!snippet) {\n throw new Error('Vendor snippet not found')\n }\n\n if (!slot) {\n throw new Error('Slot not found')\n }\n\n const matchingOrders = await getVendorOrdersBySlotIdInDb(slotId)\n\n // Filter orders that contain at least one of the snippet's products\n const filteredOrders = matchingOrders.filter(order => {\n const status = order.orderStatus;\n if (status[0]?.isCancelled) return false;\n const orderProductIds = order.orderItems.map(item => item.productId);\n return snippet.productIds.some(productId => orderProductIds.includes(productId));\n });\n\n // Format the response\n const formattedOrders = filteredOrders.map(order => {\n // Filter orderItems to only include products attached to the snippet\n const attachedOrderItems = order.orderItems.filter(item =>\n snippet.productIds.includes(item.productId)\n );\n\n const products = attachedOrderItems.map(item => ({\n orderItemId: item.id,\n productId: item.productId,\n productName: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat((item.price ?? 0).toString()),\n unit: item.product.unit?.shortNotation || 'unit',\n subtotal: parseFloat((item.price ?? 0).toString()) * parseFloat(item.quantity),\n productSize: item.product.productQuantity,\n is_packaged: item.is_packaged,\n is_package_verified: item.is_package_verified,\n }));\n\n const orderTotal = products.reduce((sum, p) => sum + p.subtotal, 0);\n\n return {\n orderId: `ORD${order.id}`,\n orderDate: order.createdAt.toISOString(),\n customerName: order.user.name || '',\n totalAmount: orderTotal,\n slotInfo: order.slot ? {\n time: order.slot.deliveryTime.toISOString(),\n sequence: order.slot.deliverySequence,\n } : null,\n products,\n matchedProducts: snippet.productIds,\n snippetCode: snippet.snippetCode,\n };\n });\n\n return {\n success: true,\n data: formattedOrders,\n snippet: {\n id: snippet.id,\n snippetCode: snippet.snippetCode,\n slotId: snippet.slotId,\n productIds: snippet.productIds,\n validTill: snippet.validTill?.toISOString(),\n createdAt: snippet.createdAt.toISOString(),\n isPermanent: snippet.isPermanent,\n },\n selectedSlot: {\n id: slot.id,\n deliveryTime: slot.deliveryTime.toISOString(),\n freezeTime: slot.freezeTime.toISOString(),\n deliverySequence: slot.deliverySequence,\n },\n }\n }),\n\n updateOrderItemPackaging: publicProcedure\n .input(z.object({\n orderItemId: z.number().int().positive(\"Valid order item ID required\"),\n is_packaged: z.boolean()\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const { orderItemId, is_packaged } = input;\n\n // Get staff user ID from auth middleware\n // const staffUserId = ctx.staffUser?.id;\n // if (!staffUserId) {\n // throw new Error(\"Unauthorized\");\n // }\n\n const result = await updateVendorOrderItemPackagingInDb(orderItemId, is_packaged)\n\n /*\n // Old implementation - direct DB queries:\n // Check if order item exists and get related data\n const orderItem = await db.query.orderItems.findFirst({\n where: eq(orderItems.id, orderItemId),\n with: {\n order: {\n with: {\n slot: true\n }\n }\n }\n });\n\n if (!orderItem) {\n throw new Error(\"Order item not found\");\n }\n\n // Check if this order item belongs to a slot that has vendor snippets\n // This ensures only order items from vendor-accessible orders can be updated\n if (!orderItem.order.slotId) {\n throw new Error(\"Order item not associated with a vendor slot\");\n }\n\n const snippetExists = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.slotId, orderItem.order.slotId),\n });\n\n if (!snippetExists) {\n throw new Error(\"No vendor snippet found for this order's slot\");\n }\n\n // Update the is_packaged field\n const result = await db.update(orderItems)\n .set({ is_packaged })\n .where(eq(orderItems.id, orderItemId))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Failed to update packaging status\");\n }\n\n return {\n success: true,\n orderItemId,\n is_packaged\n };\n */\n\n if (!result.success) {\n throw new Error(result.message)\n }\n\n return result\n }),\n});\n", "import { router, protectedProcedure } from \"@/src/trpc/trpc-index\"\nimport { TRPCError } from \"@trpc/server\";\nimport { z } from \"zod\";\nimport { ApiError } from \"@/src/lib/api-error\"\nimport { appUrl } from \"@/src/lib/env-exporter\"\n// import redisClient from \"@/src/lib/redis-client\"\n// import { getSlotSequenceKey } from \"@/src/lib/redisKeyGetters\"\nimport { scheduleStoreInitialization } from '@/src/stores/store-initializer'\nimport {\n getActiveSlotsWithProducts as getActiveSlotsWithProductsInDb,\n getActiveSlots as getActiveSlotsInDb,\n getSlotsAfterDate as getSlotsAfterDateInDb,\n getSlotByIdWithRelations as getSlotByIdWithRelationsInDb,\n createSlotWithRelations as createSlotWithRelationsInDb,\n updateSlotWithRelations as updateSlotWithRelationsInDb,\n deleteSlotById as deleteSlotByIdInDb,\n updateSlotCapacity as updateSlotCapacityInDb,\n getSlotDeliverySequence as getSlotDeliverySequenceInDb,\n updateSlotDeliverySequence as updateSlotDeliverySequenceInDb,\n updateSlotProducts as updateSlotProductsInDb,\n getSlotsProductIds as getSlotsProductIdsInDb,\n} from '@/src/dbService'\nimport type {\n AdminDeliverySequenceResult,\n AdminSlotResult,\n AdminSlotsResult,\n AdminSlotsListResult,\n AdminSlotCreateResult,\n AdminSlotUpdateResult,\n AdminSlotDeleteResult,\n AdminUpdateDeliverySequenceResult,\n AdminUpdateSlotCapacityResult,\n AdminSlotsProductIdsResult,\n AdminUpdateSlotProductsResult,\n} from '@packages/shared'\n\n\ninterface CachedDeliverySequence {\n [userId: string]: number[];\n}\n\nconst cachedSequenceSchema = z.record(z.string(), z.array(z.number()));\n\nconst createSlotSchema = z.object({\n deliveryTime: z.string(),\n freezeTime: z.string(),\n isActive: z.boolean().optional(),\n productIds: z.array(z.number()).optional(),\n vendorSnippets: z.array(z.object({\n name: z.string().min(1),\n productIds: z.array(z.number().int().positive()).min(1),\n validTill: z.string().optional(),\n })).optional(),\n groupIds: z.array(z.number()).optional(),\n});\n\nconst getSlotByIdSchema = z.object({\n id: z.number(),\n});\n\nconst updateSlotSchema = z.object({\n id: z.number(),\n deliveryTime: z.string(),\n freezeTime: z.string(),\n isActive: z.boolean().optional(),\n productIds: z.array(z.number()).optional(),\n vendorSnippets: z.array(z.object({\n name: z.string().min(1),\n productIds: z.array(z.number().int().positive()).min(1),\n validTill: z.string().optional(),\n })).optional(),\n groupIds: z.array(z.number()).optional(),\n});\n\nconst deleteSlotSchema = z.object({\n id: z.number(),\n});\n\nconst getDeliverySequenceSchema = z.object({\n id: z.string(),\n});\n\nconst updateDeliverySequenceSchema = z.object({\n id: z.number(),\n // deliverySequence: z.array(z.number()),\n deliverySequence: z.any(),\n});\n\nexport const slotsRouter = router({\n // Exact replica of GET /av/slots\n getAll: protectedProcedure.query(async ({ ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const slots = await getActiveSlotsWithProductsInDb()\n\n /*\n // Old implementation - direct DB queries:\n const slots = await db.query.deliverySlotInfo\n .findMany({\n where: eq(deliverySlotInfo.isActive, true),\n orderBy: desc(deliverySlotInfo.deliveryTime),\n with: {\n productSlots: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n },\n })\n .then((slots) =>\n slots.map((slot) => ({\n ...slot,\n deliverySequence: slot.deliverySequence as number[],\n products: slot.productSlots.map((ps) => ps.product),\n }))\n );\n */\n\n return {\n slots,\n count: slots.length,\n }\n }),\n\n // Exact replica of POST /av/products/slots/product-ids\n getSlotsProductIds: protectedProcedure\n .input(z.object({ slotIds: z.array(z.number()) }))\n .query(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { slotIds } = input;\n\n if (!Array.isArray(slotIds)) {\n throw new TRPCError({\n code: \"BAD_REQUEST\",\n message: \"slotIds must be an array\",\n });\n }\n\n const result = await getSlotsProductIdsInDb(slotIds)\n\n /*\n // Old implementation - direct DB queries:\n if (slotIds.length === 0) {\n return {};\n }\n\n // Fetch all associations for the requested slots\n const associations = await db.query.productSlots.findMany({\n where: inArray(productSlots.slotId, slotIds),\n columns: {\n slotId: true,\n productId: true,\n },\n });\n\n // Group by slotId\n const result = associations.reduce((acc, assoc) => {\n if (!acc[assoc.slotId]) {\n acc[assoc.slotId] = [];\n }\n acc[assoc.slotId].push(assoc.productId);\n return acc;\n }, {} as Record);\n\n // Ensure all requested slots have entries (even if empty)\n slotIds.forEach((slotId) => {\n if (!result[slotId]) {\n result[slotId] = [];\n }\n });\n\n return result;\n */\n\n return result\n }),\n\n // Exact replica of PUT /av/products/slots/:slotId/products\n updateSlotProducts: protectedProcedure\n .input(\n z.object({\n slotId: z.number(),\n productIds: z.array(z.number()),\n })\n )\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { slotId, productIds } = input;\n\n if (!Array.isArray(productIds)) {\n throw new TRPCError({\n code: \"BAD_REQUEST\",\n message: \"productIds must be an array\",\n });\n }\n\n const result = await updateSlotProductsInDb(String(slotId), productIds.map(String))\n\n /*\n // Old implementation - direct DB queries:\n // Get current associations\n const currentAssociations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, slotId),\n columns: {\n productId: true,\n },\n });\n\n const currentProductIds = currentAssociations.map(\n (assoc) => assoc.productId\n );\n const newProductIds = productIds;\n\n // Find products to add and remove\n const productsToAdd = newProductIds.filter(\n (id) => !currentProductIds.includes(id)\n );\n const productsToRemove = currentProductIds.filter(\n (id) => !newProductIds.includes(id)\n );\n\n // Remove associations for products that are no longer selected\n if (productsToRemove.length > 0) {\n await db\n .delete(productSlots)\n .where(\n and(\n eq(productSlots.slotId, slotId),\n inArray(productSlots.productId, productsToRemove)\n )\n );\n }\n\n // Add associations for newly selected products\n if (productsToAdd.length > 0) {\n const newAssociations = productsToAdd.map((productId) => ({\n productId,\n slotId,\n }));\n\n await db.insert(productSlots).values(newAssociations);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: \"Slot products updated successfully\",\n added: productsToAdd.length,\n removed: productsToRemove.length,\n };\n */\n\n scheduleStoreInitialization()\n\n return {\n message: result.message,\n added: result.added,\n removed: result.removed,\n }\n }),\n\n createSlot: protectedProcedure\n .input(createSlotSchema)\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input;\n\n // Validate required fields\n if (!deliveryTime || !freezeTime) {\n throw new ApiError(\"Delivery time and orders close time are required\", 400);\n }\n\n const result = await createSlotWithRelationsInDb({\n deliveryTime,\n freezeTime,\n isActive,\n productIds,\n vendorSnippets: snippets,\n groupIds,\n })\n\n /*\n // Old implementation - direct DB queries:\n const result = await db.transaction(async (tx) => {\n // Create slot\n const [newSlot] = await tx\n .insert(deliverySlotInfo)\n .values({\n deliveryTime: new Date(deliveryTime),\n freezeTime: new Date(freezeTime),\n isActive: isActive !== undefined ? isActive : true,\n groupIds: groupIds !== undefined ? groupIds : [],\n })\n .returning();\n\n // Insert product associations if provided\n if (productIds && productIds.length > 0) {\n const associations = productIds.map((productId) => ({\n productId,\n slotId: newSlot.id,\n }));\n await tx.insert(productSlots).values(associations);\n }\n\n // Create vendor snippets if provided\n let createdSnippets: any[] = [];\n if (snippets && snippets.length > 0) {\n for (const snippet of snippets) {\n // Validate products exist\n const products = await tx.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n });\n if (products.length !== snippet.productIds.length) {\n throw new ApiError(`One or more invalid product IDs in snippet \"${snippet.name}\"`, 400);\n }\n\n // Check if snippet name already exists\n const existingSnippet = await tx.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippet.name),\n });\n if (existingSnippet) {\n throw new ApiError(`Snippet name \"${snippet.name}\" already exists`, 400);\n }\n\n const [createdSnippet] = await tx.insert(vendorSnippets).values({\n snippetCode: snippet.name,\n slotId: newSlot.id,\n productIds: snippet.productIds,\n validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,\n }).returning();\n\n createdSnippets.push(createdSnippet);\n }\n }\n\n return {\n slot: newSlot,\n createdSnippets,\n message: \"Slot created successfully\",\n };\n });\n */\n\n // Reinitialize stores to reflect changes (outside transaction)\n scheduleStoreInitialization()\n\n return result\n }),\n\n getSlots: protectedProcedure.query(async ({ ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const slots = await getActiveSlotsInDb()\n\n /*\n // Old implementation - direct DB queries:\n const slots = await db.query.deliverySlotInfo.findMany({\n where: eq(deliverySlotInfo.isActive, true),\n });\n */\n\n return {\n slots,\n count: slots.length,\n }\n }),\n\n getSlotById: protectedProcedure\n .input(getSlotByIdSchema)\n .query(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { id } = input;\n\n const slot = await getSlotByIdWithRelationsInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, id),\n with: {\n productSlots: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n vendorSnippets: true,\n },\n });\n */\n\n if (!slot) {\n throw new ApiError('Slot not found', 404)\n }\n\n return {\n slot: {\n ...slot,\n vendorSnippets: slot.vendorSnippets.map(snippet => ({\n ...snippet,\n accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`,\n })),\n },\n }\n }),\n\n updateSlot: protectedProcedure\n .input(updateSlotSchema)\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n try{\n const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input;\n\n if (!deliveryTime || !freezeTime) {\n throw new ApiError(\"Delivery time and orders close time are required\", 400);\n }\n\n const result = await updateSlotWithRelationsInDb({\n id,\n deliveryTime,\n freezeTime,\n isActive,\n productIds,\n vendorSnippets: snippets,\n groupIds,\n })\n\n /*\n // Old implementation - direct DB queries:\n // Filter groupIds to only include valid (existing) groups\n let validGroupIds = groupIds;\n if (groupIds && groupIds.length > 0) {\n const existingGroups = await db.query.productGroupInfo.findMany({\n where: inArray(productGroupInfo.id, groupIds),\n columns: { id: true },\n });\n validGroupIds = existingGroups.map(g => g.id);\n }\n\n const result = await db.transaction(async (tx) => {\n const [updatedSlot] = await tx\n .update(deliverySlotInfo)\n .set({\n deliveryTime: new Date(deliveryTime),\n freezeTime: new Date(freezeTime),\n isActive: isActive !== undefined ? isActive : true,\n groupIds: validGroupIds !== undefined ? validGroupIds : [],\n })\n .where(eq(deliverySlotInfo.id, id))\n .returning();\n\n if (!updatedSlot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n\n // Update product associations\n if (productIds !== undefined) {\n // Delete existing associations\n await tx.delete(productSlots).where(eq(productSlots.slotId, id));\n\n // Insert new associations\n if (productIds.length > 0) {\n const associations = productIds.map((productId) => ({\n productId,\n slotId: id,\n }));\n await tx.insert(productSlots).values(associations);\n }\n }\n\n // Create vendor snippets if provided\n let createdSnippets: any[] = [];\n if (snippets && snippets.length > 0) {\n for (const snippet of snippets) {\n // Validate products exist\n const products = await tx.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n });\n if (products.length !== snippet.productIds.length) {\n throw new ApiError(`One or more invalid product IDs in snippet \"${snippet.name}\"`, 400);\n }\n\n // Check if snippet name already exists\n const existingSnippet = await tx.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippet.name),\n });\n if (existingSnippet) {\n throw new ApiError(`Snippet name \"${snippet.name}\" already exists`, 400);\n }\n \n const [createdSnippet] = await tx.insert(vendorSnippets).values({\n snippetCode: snippet.name,\n slotId: id,\n productIds: snippet.productIds,\n validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,\n\n }).returning();\n\n createdSnippets.push(createdSnippet);\n }\n }\n\n return {\n slot: updatedSlot,\n createdSnippets,\n message: \"Slot updated successfully\",\n };\n });\n */\n\n if (!result) {\n throw new ApiError('Slot not found', 404)\n }\n\n // Reinitialize stores to reflect changes (outside transaction)\n scheduleStoreInitialization()\n\n return result\n }\n catch(e) {\n console.log(e)\n throw new ApiError(\"Unable to Update Slot\");\n }\n }),\n\n deleteSlot: protectedProcedure\n .input(deleteSlotSchema)\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { id } = input;\n\n const deletedSlot = await deleteSlotByIdInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const [deletedSlot] = await db\n .update(deliverySlotInfo)\n .set({ isActive: false })\n .where(eq(deliverySlotInfo.id, id))\n .returning();\n\n if (!deletedSlot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n */\n\n if (!deletedSlot) {\n throw new ApiError('Slot not found', 404)\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: 'Slot deleted successfully',\n }\n }),\n\n getDeliverySequence: protectedProcedure\n .input(getDeliverySequenceSchema)\n .query(async ({ input, ctx }): Promise => {\n\n const { id } = input;\n const slotId = parseInt(id);\n // const cacheKey = getSlotSequenceKey(slotId);\n\n // try {\n // const cached = await redisClient.get(cacheKey);\n // if (cached) {\n // const parsed = JSON.parse(cached);\n // const validated = cachedSequenceSchema.parse(parsed);\n // console.log('sending cached response')\n // \n // return { deliverySequence: validated };\n // }\n // } catch (error) {\n // console.warn('Redis cache read/validation failed, falling back to DB:', error);\n // // Continue to DB fallback\n // }\n\n // Fallback to DB\n const slot = await getSlotDeliverySequenceInDb(slotId)\n\n /*\n // Old implementation - direct DB queries:\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n });\n\n if (!slot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n\n const sequence = cachedSequenceSchema.parse(slot.deliverySequence || {});\n */\n\n if (!slot) {\n throw new ApiError('Slot not found', 404)\n }\n\n const sequence = (slot.deliverySequence || {}) as CachedDeliverySequence;\n\n // Cache the validated result\n // try {\n // const validated = cachedSequenceSchema.parse(sequence);\n // await redisClient.set(cacheKey, JSON.stringify(validated), 3600);\n // } catch (cacheError) {\n // console.warn('Redis cache write failed:', cacheError);\n // }\n\n return { deliverySequence: sequence }\n }),\n\n updateDeliverySequence: protectedProcedure\n .input(updateDeliverySequenceSchema)\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { id, deliverySequence } = input;\n\n const updatedSlot = await updateSlotDeliverySequenceInDb(id, deliverySequence)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedSlot] = await db\n .update(deliverySlotInfo)\n .set({ deliverySequence })\n .where(eq(deliverySlotInfo.id, id))\n .returning({\n id: deliverySlotInfo.id,\n deliverySequence: deliverySlotInfo.deliverySequence,\n });\n\n if (!updatedSlot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n */\n\n if (!updatedSlot) {\n throw new ApiError('Slot not found', 404)\n }\n\n // Cache the updated sequence\n // const cacheKey = getSlotSequenceKey(id);\n // try {\n // const validated = cachedSequenceSchema.parse(deliverySequence);\n // await redisClient.set(cacheKey, JSON.stringify(validated), 3600);\n // } catch (cacheError) {\n // console.warn('Redis cache write failed:', cacheError);\n // }\n\n return {\n slot: updatedSlot,\n message: 'Delivery sequence updated successfully',\n }\n }),\n\n updateSlotCapacity: protectedProcedure\n .input(z.object({\n slotId: z.number(),\n isCapacityFull: z.boolean(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { slotId, isCapacityFull } = input;\n\n const result = await updateSlotCapacityInDb(slotId, isCapacityFull)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedSlot] = await db\n .update(deliverySlotInfo)\n .set({ isCapacityFull })\n .where(eq(deliverySlotInfo.id, slotId))\n .returning();\n\n if (!updatedSlot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n success: true,\n slot: updatedSlot,\n message: `Slot ${isCapacityFull ? 'marked as full capacity' : 'capacity reset'}`,\n };\n */\n\n if (!result) {\n throw new ApiError('Slot not found', 404)\n }\n\n scheduleStoreInitialization()\n\n return result\n }),\n});\n", "import roleManager from '@/src/lib/roles-manager'\nimport { computeConstants } from '@/src/lib/const-store'\nimport { initializeProducts } from '@/src/stores/product-store'\nimport { initializeProductTagStore } from '@/src/stores/product-tag-store'\nimport { initializeSlotStore } from '@/src/stores/slot-store'\nimport { initializeBannerStore } from '@/src/stores/banner-store'\nimport { createAllCacheFiles } from '@/src/lib/cloud_cache'\n\nconst STORE_INIT_DELAY_MS = 3 * 60 * 1000\nlet storeInitializationTimeout: NodeJS.Timeout | null = null\n\n/**\n * Initialize all application stores\n * This function handles initialization of:\n * - Role Manager (fetches and caches all roles)\n * - Const Store (syncs constants from DB to Redis)\n * - Product Store (caches all products in Redis)\n * - Product Tag Store (caches all product tags in Redis)\n * - Slot Store (caches all delivery slots with products in Redis)\n * - Banner Store (caches all banners in Redis)\n */\nexport const initializeAllStores = async (): Promise => {\n try {\n console.log('Starting application stores initialization...');\n\n await Promise.all([\n roleManager.fetchRoles(),\n computeConstants(),\n initializeProducts(),\n initializeProductTagStore(),\n initializeSlotStore(),\n initializeBannerStore(),\n ]);\n\n console.log('All application stores initialized successfully');\n\n // Regenerate all cache files (fire-and-forget)\n createAllCacheFiles().catch(error => {\n console.error('Failed to regenerate cache files during store initialization:', error)\n })\n } catch (error) {\n console.error('Application stores initialization failed:', error);\n throw error;\n }\n};\n\nexport const scheduleStoreInitialization = (): void => {\n if (storeInitializationTimeout) {\n clearTimeout(storeInitializationTimeout)\n storeInitializationTimeout = null\n }\n\n storeInitializationTimeout = setTimeout(() => {\n storeInitializationTimeout = null\n initializeAllStores().catch(error => {\n console.error('Scheduled store initialization failed:', error)\n })\n }, STORE_INIT_DELAY_MS)\n}\n", "/**\n * Constants for role names to avoid hardcoding and typos\n */\nexport const ROLE_NAMES = {\n ADMIN: 'admin',\n GENERAL_USER: 'gen_user',\n HOSPITAL_ADMIN: 'hospital_admin',\n DOCTOR: 'doctor',\n RECEPTIONIST: 'receptionist'\n};\n\nexport const defaultRole = ROLE_NAMES.GENERAL_USER;\n\n/**\n * RoleManager class to handle caching and retrieving role information\n * Provides methods to fetch roles from DB and cache them for quick access\n */\nclass RoleManager {\n private roles: Map = new Map();\n private rolesByName: Map = new Map();\n private isInitialized: boolean = false;\n\n constructor() {\n // Singleton instance\n }\n\n /**\n * Fetch all roles from the database and cache them\n * This should be called during application startup\n */\n public async fetchRoles(): Promise {\n try {\n // const roles = await db.query.roleInfoTable.findMany();\n \n // // Clear existing maps before adding new data\n // this.roles.clear();\n // this.rolesByName.clear();\n \n // // Cache roles by ID and by name for quick lookup\n // roles.forEach(role => {\n // this.roles.set(role.id, role);\n // this.rolesByName.set(role.name, role);\n // });\n \n // this.isInitialized = true;\n // console.log(`[RoleManager] Cached ${roles.length} roles`);\n } catch (error) {\n console.error('[RoleManager] Error fetching roles:', error);\n throw error;\n }\n }\n\n /**\n * Get all roles from cache\n * If not initialized, fetches roles from DB first\n */\n public async getRoles(): Promise<{ id: number; name: string; description: string | null }[]> {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n return Array.from(this.roles.values());\n }\n\n /**\n * Get role by ID\n * @param id Role ID\n */\n public async getRoleById(id: number): Promise<{ id: number; name: string; description: string | null } | undefined> {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n return this.roles.get(id);\n }\n\n /**\n * Get role by name\n * @param name Role name\n */\n public async getRoleByName(name: string): Promise<{ id: number; name: string; description: string | null } | undefined> {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n return this.rolesByName.get(name);\n }\n\n /**\n * Check if a role exists by name\n * @param name Role name\n */\n public async roleExists(name: string): Promise {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n return this.rolesByName.has(name);\n }\n\n /**\n * Get business roles (roles that are not 'admin' or 'gen_user')\n */\n public async getBusinessRoles(): Promise<{ id: number; name: string; description: string | null }[]> {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n \n return Array.from(this.roles.values()).filter(\n role => role.name !== ROLE_NAMES.ADMIN && role.name !== ROLE_NAMES.GENERAL_USER\n );\n }\n\n /**\n * Force refresh the roles cache\n */\n public async refreshRoles(): Promise {\n await this.fetchRoles();\n }\n}\n\n// Create a singleton instance\nconst roleManager = new RoleManager();\n\n// Export the singleton instance\nexport default roleManager;\n", "import { getAllKeyValStore } from '@/src/dbService'\n// import redisClient from '@/src/lib/redis-client'\nimport { CONST_KEYS, CONST_KEYS_ARRAY, type ConstKey } from '@/src/lib/const-keys'\n\n// const CONST_REDIS_PREFIX = 'const:';\n\nexport const computeConstants = async (): Promise => {\n try {\n console.log('Computing constants from database...');\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { keyValStore } from '@/src/db/schema'\n\n const constants = await db.select().from(keyValStore);\n */\n\n const constants = await getAllKeyValStore();\n\n // for (const constant of constants) {\n // const redisKey = `${CONST_REDIS_PREFIX}${constant.key}`;\n // const value = JSON.stringify(constant.value);\n // await redisClient.set(redisKey, value);\n // }\n\n console.log(`Computed ${constants.length} constants from DB`);\n } catch (error) {\n console.error('Failed to compute constants:', error);\n throw error;\n }\n};\n\nexport const getConstant = async (key: string): Promise => {\n // const redisKey = `${CONST_REDIS_PREFIX}${key}`;\n // const value = await redisClient.get(redisKey);\n //\n // if (!value) {\n // return null;\n // }\n //\n // try {\n // return JSON.parse(value) as T;\n // } catch {\n // return value as unknown as T;\n // }\n\n const constants = await getAllKeyValStore();\n const entry = constants.find(c => c.key === key);\n\n if (!entry) {\n return null;\n }\n\n return entry.value as T;\n};\n\nexport const getConstants = async (keys: string[]): Promise> => {\n // const redisKeys = keys.map(key => `${CONST_REDIS_PREFIX}${key}`);\n // const values = await redisClient.MGET(redisKeys);\n //\n // const result: Record = {};\n // keys.forEach((key, index) => {\n // const value = values[index];\n // if (!value) {\n // result[key] = null;\n // } else {\n // try {\n // result[key] = JSON.parse(value) as T;\n // } catch {\n // result[key] = value as unknown as T;\n // }\n // }\n // });\n //\n // return result;\n\n const constants = await getAllKeyValStore();\n const constantsMap = new Map(constants.map(c => [c.key, c.value]));\n\n const result: Record = {};\n for (const key of keys) {\n const value = constantsMap.get(key);\n result[key] = (value !== undefined ? value : null) as T | null;\n }\n\n return result;\n};\n\nexport const getAllConstValues = async (): Promise> => {\n // const result: Record = {};\n //\n // for (const key of CONST_KEYS_ARRAY) {\n // result[key] = await getConstant(key);\n // }\n //\n // return result as Record;\n\n const constants = await getAllKeyValStore();\n const constantsMap = new Map(constants.map(c => [c.key, c.value]));\n\n const result: Record = {};\n for (const key of CONST_KEYS_ARRAY) {\n result[key] = constantsMap.get(key) ?? null;\n }\n\n return result as Record;\n};\n\nexport { CONST_KEYS, CONST_KEYS_ARRAY };\n", "export const CONST_KEYS = {\n minRegularOrderValue: 'minRegularOrderValue',\n freeDeliveryThreshold: 'freeDeliveryThreshold',\n deliveryCharge: 'deliveryCharge',\n flashFreeDeliveryThreshold: 'flashFreeDeliveryThreshold',\n flashDeliveryCharge: 'flashDeliveryCharge',\n platformFeePercent: 'platformFeePercent',\n taxRate: 'taxRate',\n tester: 'tester',\n minOrderAmountForCoupon: 'minOrderAmountForCoupon',\n maxCouponDiscount: 'maxCouponDiscount',\n flashDeliverySlotId: 'flashDeliverySlotId',\n readableOrderId: 'readableOrderId',\n versionNum: 'versionNum',\n playStoreUrl: 'playStoreUrl',\n appStoreUrl: 'appStoreUrl',\n popularItems: 'popularItems',\n allItemsOrder: 'allItemsOrder',\n isFlashDeliveryEnabled: 'isFlashDeliveryEnabled',\n supportMobile: 'supportMobile',\n supportEmail: 'supportEmail',\n} as const;\n\nexport const CONST_LABELS: Record = {\n minRegularOrderValue: 'Minimum Regular Order Value',\n freeDeliveryThreshold: 'Free Delivery Threshold',\n deliveryCharge: 'Delivery Charge',\n flashFreeDeliveryThreshold: 'Flash Free Delivery Threshold',\n flashDeliveryCharge: 'Flash Delivery Charge',\n platformFeePercent: 'Platform Fee Percent',\n taxRate: 'Tax Rate',\n tester: 'Tester',\n minOrderAmountForCoupon: 'Minimum Order Amount for Coupon',\n maxCouponDiscount: 'Maximum Coupon Discount',\n flashDeliverySlotId: 'Flash Delivery Slot ID',\n readableOrderId: 'Readable Order ID',\n versionNum: 'Version Number',\n playStoreUrl: 'Play Store URL',\n appStoreUrl: 'App Store URL',\n popularItems: 'Popular Items',\n allItemsOrder: 'All Items Order',\n isFlashDeliveryEnabled: 'Enable Flash Delivery',\n supportMobile: 'Support Mobile',\n supportEmail: 'Support Email',\n};\n\nexport type ConstKey = (typeof CONST_KEYS)[keyof typeof CONST_KEYS];\n\nexport const CONST_KEYS_ARRAY = Object.values(CONST_KEYS) as ConstKey[];\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllSlotsWithProductsForCache,\n type SlotWithProductsData,\n} from '@/src/dbService'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport dayjs from 'dayjs'\n\n// Define the structure for slot with products\ninterface SlotWithProducts {\n id: number\n deliveryTime: Date\n freezeTime: Date\n isActive: boolean\n isCapacityFull: boolean\n products: Array<{\n id: number\n name: string\n shortDescription: string | null\n productQuantity: number\n price: string\n marketPrice: string | null\n unit: string | null\n images: string[]\n isOutOfStock: boolean\n storeId: number | null\n nextDeliveryDate: Date\n }>\n}\n\ninterface SlotInfo {\n id: number\n deliveryTime: Date\n freezeTime: Date\n isCapacityFull: boolean\n}\n\nasync function transformSlotToStoreSlot(slot: SlotWithProductsData): Promise {\n return {\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isCapacityFull: slot.isCapacityFull,\n products: slot.productSlots.map((productSlot) => ({\n id: productSlot.product.id,\n name: productSlot.product.name,\n productQuantity: productSlot.product.productQuantity,\n shortDescription: productSlot.product.shortDescription,\n price: productSlot.product.price.toString(),\n marketPrice: productSlot.product.marketPrice?.toString() || null,\n unit: productSlot.product.unit?.shortNotation || null,\n images: scaffoldAssetUrl(\n (productSlot.product.images as string[]) || []\n ),\n isOutOfStock: productSlot.product.isOutOfStock,\n storeId: productSlot.product.storeId,\n nextDeliveryDate: slot.deliveryTime,\n })),\n }\n}\n\nfunction extractSlotInfo(slot: SlotWithProductsData): SlotInfo {\n return {\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isCapacityFull: slot.isCapacityFull,\n }\n}\n\nasync function fetchAllTransformedSlots(): Promise {\n const slots = await getAllSlotsWithProductsForCache()\n return Promise.all(slots.map(transformSlotToStoreSlot))\n}\n\nexport async function initializeSlotStore(): Promise {\n try {\n console.log('Initializing slot store in Redis...')\n\n // Fetch active delivery slots with future delivery times\n const slots = await getAllSlotsWithProductsForCache()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { deliverySlotInfo } from '@/src/db/schema'\n import { eq, gt, and, asc } from 'drizzle-orm'\n\n const now = new Date();\n const slots = await db.query.deliverySlotInfo.findMany({\n where: and(\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, now),\n ),\n with: {\n productSlots: {\n with: {\n product: {\n with: {\n unit: true,\n store: true,\n },\n },\n },\n },\n },\n orderBy: asc(deliverySlotInfo.deliveryTime),\n });\n */\n\n // Transform data for storage\n const slotsWithProducts = await Promise.all(\n slots.map(async (slot) => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isCapacityFull: slot.isCapacityFull,\n products: await Promise.all(\n slot.productSlots.map(async (productSlot) => ({\n id: productSlot.product.id,\n name: productSlot.product.name,\n productQuantity: productSlot.product.productQuantity,\n shortDescription: productSlot.product.shortDescription,\n price: productSlot.product.price.toString(),\n marketPrice: productSlot.product.marketPrice?.toString() || null,\n unit: productSlot.product.unit?.shortNotation || null,\n images: scaffoldAssetUrl(\n (productSlot.product.images as string[]) || []\n ),\n isOutOfStock: productSlot.product.isOutOfStock,\n storeId: productSlot.product.storeId,\n nextDeliveryDate: slot.deliveryTime,\n }))\n ),\n }))\n )\n\n // Store each slot in Redis with key pattern \"slot:{id}\"\n // for (const slot of slotsWithProducts) {\n // await redisClient.set(`slot:${slot.id}`, JSON.stringify(slot))\n // }\n\n // Build and store product-slots map\n // Group slots by productId\n const productSlotsMap: Record = {}\n\n for (const slot of slotsWithProducts) {\n for (const product of slot.products) {\n if (!productSlotsMap[product.id]) {\n productSlotsMap[product.id] = []\n }\n productSlotsMap[product.id].push({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isCapacityFull: slot.isCapacityFull,\n })\n }\n }\n\n // Store each product's slots in Redis with key pattern \"product:{id}:slots\"\n // for (const [productId, slotInfos] of Object.entries(productSlotsMap)) {\n // await redisClient.set(\n // `product:${productId}:slots`,\n // JSON.stringify(slotInfos)\n // )\n // }\n\n console.log('Slot store initialized successfully')\n } catch (error) {\n console.error('Error initializing slot store:', error)\n }\n}\n\nexport async function getSlotById(slotId: number): Promise {\n try {\n // const key = `slot:${slotId}`\n // const data = await redisClient.get(key)\n // if (!data) return null\n // return JSON.parse(data) as SlotWithProducts\n\n const slots = await getAllSlotsWithProductsForCache()\n const slot = slots.find(s => s.id === slotId)\n if (!slot) return null\n\n return transformSlotToStoreSlot(slot)\n } catch (error) {\n console.error(`Error getting slot ${slotId}:`, error)\n return null\n }\n}\n\nexport async function getAllSlots(): Promise {\n try {\n // Get all keys matching the pattern \"slot:*\"\n // const keys = await redisClient.KEYS('slot:*')\n //\n // if (keys.length === 0) return []\n //\n // // Get all slots using MGET for better performance\n // const slotsData = await redisClient.MGET(keys)\n //\n // const slots: SlotWithProducts[] = []\n // for (const slotData of slotsData) {\n // if (slotData) {\n // slots.push(JSON.parse(slotData) as SlotWithProducts)\n // }\n // }\n //\n // return slots\n\n return fetchAllTransformedSlots()\n } catch (error) {\n console.error('Error getting all slots:', error)\n return []\n }\n}\n\nexport async function getProductSlots(productId: number): Promise {\n try {\n // const key = `product:${productId}:slots`\n // const data = await redisClient.get(key)\n // if (!data) return []\n // return JSON.parse(data) as SlotInfo[]\n\n const slots = await getAllSlotsWithProductsForCache()\n const productSlots: SlotInfo[] = []\n\n for (const slot of slots) {\n const hasProduct = slot.productSlots.some(ps => ps.product.id === productId)\n if (hasProduct) {\n productSlots.push(extractSlotInfo(slot))\n }\n }\n\n return productSlots\n } catch (error) {\n console.error(`Error getting slots for product ${productId}:`, error)\n return []\n }\n}\n\nexport async function getAllProductsSlots(): Promise> {\n try {\n // Get all keys matching the pattern \"product:*:slots\"\n // const keys = await redisClient.KEYS('product:*:slots')\n //\n // if (keys.length === 0) return {}\n //\n // // Get all product slots using MGET for better performance\n // const productsData = await redisClient.MGET(keys)\n //\n // const result: Record = {}\n // for (const key of keys) {\n // // Extract productId from key \"product:{id}:slots\"\n // const match = key.match(/product:(\\d+):slots/)\n // if (match) {\n // const productId = parseInt(match[1], 10)\n // const dataIndex = keys.indexOf(key)\n // if (productsData[dataIndex]) {\n // result[productId] = JSON.parse(productsData[dataIndex]) as SlotInfo[]\n // }\n // }\n // }\n //\n // return result\n\n const slots = await getAllSlotsWithProductsForCache()\n const result: Record = {}\n\n for (const slot of slots) {\n const slotInfo = extractSlotInfo(slot)\n for (const productSlot of slot.productSlots) {\n const productId = productSlot.product.id\n if (!result[productId]) {\n result[productId] = []\n }\n result[productId].push(slotInfo)\n }\n }\n\n return result\n } catch (error) {\n console.error('Error getting all products slots:', error)\n return {}\n }\n}\n\nexport async function getMultipleProductsSlots(\n productIds: number[]\n): Promise> {\n try {\n if (productIds.length === 0) return {}\n\n // Build keys for all productIds\n // const keys = productIds.map((id) => `product:${id}:slots`)\n //\n // // Use MGET for batch retrieval\n // const productsData = await redisClient.MGET(keys)\n //\n // const result: Record = {}\n // for (let i = 0; i < productIds.length; i++) {\n // const data = productsData[i]\n // if (data) {\n // const slots = JSON.parse(data) as SlotInfo[]\n // // Filter out slots that are at full capacity\n // result[productIds[i]] = slots.filter((slot) => !slot.isCapacityFull)\n // }\n // }\n //\n // return result\n\n const slots = await getAllSlotsWithProductsForCache()\n const productIdSet = new Set(productIds)\n const result: Record = {}\n\n for (const productId of productIds) {\n result[productId] = []\n }\n\n for (const slot of slots) {\n const slotInfo = extractSlotInfo(slot)\n for (const productSlot of slot.productSlots) {\n const pid = productSlot.product.id\n if (productIdSet.has(pid) && !slot.isCapacityFull) {\n result[pid].push(slotInfo)\n }\n }\n }\n\n return result\n } catch (error) {\n console.error('Error getting products slots:', error)\n return {}\n }\n}\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllBannersForCache,\n getBanners,\n getBannerById as getBannerByIdFromDb,\n type BannerData,\n} from '@/src/dbService'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\n\n// Banner Type (matches getBanners return)\ninterface Banner {\n id: number\n name: string\n imageUrl: string | null\n serialNum: number | null\n productIds: number[] | null\n createdAt: Date\n}\n\nexport async function initializeBannerStore(): Promise {\n try {\n console.log('Initializing banner store in Redis...')\n\n const banners = await getAllBannersForCache()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { homeBanners } from '@/src/db/schema'\n import { isNotNull, asc } from 'drizzle-orm'\n\n const banners = await db.query.homeBanners.findMany({\n where: isNotNull(homeBanners.serialNum),\n orderBy: asc(homeBanners.serialNum),\n });\n */\n\n // Store each banner in Redis\n // for (const banner of banners) {\n // const signedImageUrl = banner.imageUrl\n // ? scaffoldAssetUrl(banner.imageUrl)\n // : banner.imageUrl\n //\n // const bannerObj: Banner = {\n // id: banner.id,\n // name: banner.name,\n // imageUrl: signedImageUrl,\n // serialNum: banner.serialNum,\n // productIds: banner.productIds,\n // createdAt: banner.createdAt,\n // }\n //\n // await redisClient.set(`banner:${banner.id}`, JSON.stringify(bannerObj))\n // }\n\n console.log('Banner store initialized successfully')\n } catch (error) {\n console.error('Error initializing banner store:', error)\n }\n}\n\nexport async function getBannerById(id: number): Promise {\n try {\n // const key = `banner:${id}`\n // const data = await redisClient.get(key)\n // if (!data) return null\n // return JSON.parse(data) as Banner\n\n const banner = await getBannerByIdFromDb(id)\n if (!banner) return null\n\n const signedImageUrl = banner.imageUrl\n ? scaffoldAssetUrl(banner.imageUrl)\n : banner.imageUrl\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: signedImageUrl,\n serialNum: banner.serialNum,\n productIds: banner.productIds,\n createdAt: banner.createdAt,\n }\n } catch (error) {\n console.error(`Error getting banner ${id}:`, error)\n return null\n }\n}\n\nexport async function getAllBanners(): Promise {\n try {\n // Get all keys matching the pattern \"banner:*\"\n // const keys = await redisClient.KEYS('banner:*')\n //\n // if (keys.length === 0) return []\n //\n // // Get all banners using MGET for better performance\n // const bannersData = await redisClient.MGET(keys)\n //\n // const banners: Banner[] = []\n // for (const bannerData of bannersData) {\n // if (bannerData) {\n // banners.push(JSON.parse(bannerData) as Banner)\n // }\n // }\n //\n // // Sort by serialNum to maintain the same order as the original query\n // banners.sort((a, b) => (a.serialNum || 0) - (b.serialNum || 0))\n //\n // return banners\n\n const banners = await getBanners()\n\n return banners.map((banner) => {\n const signedImageUrl = banner.imageUrl\n ? scaffoldAssetUrl(banner.imageUrl)\n : banner.imageUrl\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: signedImageUrl,\n serialNum: banner.serialNum,\n productIds: banner.productIds,\n createdAt: banner.createdAt,\n }\n })\n } catch (error) {\n console.error('Error getting all banners:', error)\n return []\n }\n}\n", "import axios from 'axios'\nimport { scaffoldProducts } from '@/src/trpc/apis/common-apis/common'\nimport { scaffoldEssentialConsts } from '@/src/trpc/apis/common-apis/common-trpc-index'\nimport { scaffoldStores } from '@/src/trpc/apis/user-apis/apis/stores'\nimport { scaffoldSlotsWithProducts } from '@/src/trpc/apis/user-apis/apis/slots'\nimport { scaffoldBanners } from '@/src/trpc/apis/user-apis/apis/banners'\nimport { scaffoldStoreWithProducts } from '@/src/trpc/apis/user-apis/apis/stores'\nimport { getStoresSummary } from '@/src/dbService'\nimport { imageUploadS3 } from '@/src/lib/s3-client'\nimport { apiCacheKey, cloudflareApiToken, cloudflareZoneId, assetsDomain } from '@/src/lib/env-exporter'\nimport { CACHE_FILENAMES } from '@packages/shared'\nimport { retryWithExponentialBackoff } from '@/src/lib/retry'\n\nfunction constructCacheUrl(path: string): string {\n return `${assetsDomain}${apiCacheKey}/${path}`\n}\n\nexport async function createProductsFile(): Promise {\n // Get products data from the API method\n const productsData = await scaffoldProducts()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(productsData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.products}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.products)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createEssentialConstsFile(): Promise {\n // Get essential consts data from the API method\n const essentialConstsData = await scaffoldEssentialConsts()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(essentialConstsData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.essentialConsts}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.essentialConsts)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createStoresFile(): Promise {\n // Get stores data from the API method\n const storesData = await scaffoldStores()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(storesData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.stores}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.stores)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createSlotsFile(): Promise {\n // Get slots data from the API method\n const slotsData = await scaffoldSlotsWithProducts()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(slotsData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.slots}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.slots)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createBannersFile(): Promise {\n // Get banners data from the API method\n const bannersData = await scaffoldBanners()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(bannersData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.banners}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.banners)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createStoreFile(storeId: number): Promise {\n // Get store data from the API method\n const storeData = await scaffoldStoreWithProducts(storeId)\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(storeData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/stores/${storeId}.json`)\n\n // Purge cache with retry\n const url = constructCacheUrl(`stores/${storeId}.json`)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createAllStoresFiles(): Promise {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { storeInfo } from '@/src/db/schema'\n\n const stores = await db.select({ id: storeInfo.id }).from(storeInfo)\n */\n\n // Fetch all store IDs from database using helper\n const stores = await getStoresSummary()\n\n // Create cache files for all stores and collect URLs\n const results: string[] = []\n const urls: string[] = []\n\n for (const store of stores) {\n const s3Key = await createStoreFile(store.id)\n results.push(s3Key)\n urls.push(constructCacheUrl(`stores/${store.id}.json`))\n }\n\n console.log(`Created ${results.length} store cache files`)\n\n // Purge all store caches in one batch with retry\n try {\n await retryWithExponentialBackoff(() => clearUrlCache(urls))\n console.log(`Cache purged for ${urls.length} store files`)\n } catch (error) {\n console.error(`Failed to purge cache for store files after 3 retries. URLs: ${urls.join(', ')}`, error)\n }\n\n return results\n}\n\nexport interface CreateAllCacheFilesResult {\n products: string\n essentialConsts: string\n stores: string\n slots: string\n banners: string\n individualStores: string[]\n}\n\nexport async function createAllCacheFiles(): Promise {\n console.log('Starting creation of all cache files...')\n\n // Create all global cache files in parallel\n const [\n productsKey,\n essentialConstsKey,\n storesKey,\n slotsKey,\n bannersKey,\n individualStoreKeys,\n ] = await Promise.all([\n createProductsFileInternal(),\n createEssentialConstsFileInternal(),\n createStoresFileInternal(),\n createSlotsFileInternal(),\n createBannersFileInternal(),\n createAllStoresFilesInternal(),\n ])\n\n // Collect all URLs for batch cache purge\n const urls = [\n constructCacheUrl(CACHE_FILENAMES.products),\n constructCacheUrl(CACHE_FILENAMES.essentialConsts),\n constructCacheUrl(CACHE_FILENAMES.stores),\n constructCacheUrl(CACHE_FILENAMES.slots),\n constructCacheUrl(CACHE_FILENAMES.banners),\n ...individualStoreKeys.map((_, index) => constructCacheUrl(`stores/${index + 1}.json`)),\n ]\n\n // Purge all caches in one batch with retry\n try {\n await retryWithExponentialBackoff(() => clearUrlCache(urls))\n console.log(`Cache purged for all ${urls.length} files`)\n } catch (error) {\n console.error(`Failed to purge cache for all files after 3 retries`, error)\n }\n\n console.log('All cache files created successfully')\n\n return {\n products: productsKey,\n essentialConsts: essentialConstsKey,\n stores: storesKey,\n slots: slotsKey,\n banners: bannersKey,\n individualStores: individualStoreKeys,\n }\n}\n\n// Internal versions that skip cache purging (for batch operations)\nasync function createProductsFileInternal(): Promise {\n const productsData = await scaffoldProducts()\n const jsonContent = JSON.stringify(productsData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.products}`)\n}\n\nasync function createEssentialConstsFileInternal(): Promise {\n const essentialConstsData = await scaffoldEssentialConsts()\n const jsonContent = JSON.stringify(essentialConstsData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.essentialConsts}`)\n}\n\nasync function createStoresFileInternal(): Promise {\n const storesData = await scaffoldStores()\n const jsonContent = JSON.stringify(storesData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.stores}`)\n}\n\nasync function createSlotsFileInternal(): Promise {\n const slotsData = await scaffoldSlotsWithProducts()\n const jsonContent = JSON.stringify(slotsData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.slots}`)\n}\n\nasync function createBannersFileInternal(): Promise {\n const bannersData = await scaffoldBanners()\n const jsonContent = JSON.stringify(bannersData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.banners}`)\n}\n\nasync function createAllStoresFilesInternal(): Promise {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { storeInfo } from '@/src/db/schema'\n\n const stores = await db.select({ id: storeInfo.id }).from(storeInfo)\n */\n\n const stores = await getStoresSummary()\n const results: string[] = []\n\n for (const store of stores) {\n const storeData = await scaffoldStoreWithProducts(store.id)\n const jsonContent = JSON.stringify(storeData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/stores/${store.id}.json`)\n results.push(s3Key)\n }\n\n console.log(`Created ${results.length} store cache files`)\n return results\n}\n\nexport async function clearUrlCache(urls: string[]): Promise<{ success: boolean; errors?: string[] }> {\n if (!cloudflareApiToken || !cloudflareZoneId) {\n console.warn('Cloudflare credentials not configured, skipping cache clear')\n return { success: false, errors: ['Cloudflare credentials not configured'] }\n }\n\n try {\n const response = await axios.post(\n `https://api.cloudflare.com/client/v4/zones/${cloudflareZoneId}/purge_cache`,\n { files: urls },\n {\n headers: {\n 'Authorization': `Bearer ${cloudflareApiToken}`,\n 'Content-Type': 'application/json',\n },\n }\n )\n\n const result = response.data as { success: boolean; errors?: { message: string }[] }\n\n if (!result.success) {\n const errorMessages = result.errors?.map(e => e.message) || ['Unknown error']\n console.error(`Cloudflare cache purge failed for URLs: ${urls.join(', ')}`, errorMessages)\n return { success: false, errors: errorMessages }\n }\n\n console.log(`Successfully purged ${urls.length} URLs from Cloudflare cache: ${urls.join(', ')}`)\n return { success: true }\n } catch (error) {\n console.log(error)\n const errorMessage = error instanceof Error ? error.message : 'Unknown error'\n console.error(`Error clearing Cloudflare cache for URLs: ${urls.join(', ')}`, errorMessage)\n return { success: false, errors: [errorMessage] }\n }\n}\n\nexport async function clearAllCache(): Promise<{ success: boolean; errors?: string[] }> {\n if (!cloudflareApiToken || !cloudflareZoneId) {\n console.warn('Cloudflare credentials not configured, skipping cache clear')\n return { success: false, errors: ['Cloudflare credentials not configured'] }\n }\n\n try {\n const response = await axios.post(\n `https://api.cloudflare.com/client/v4/zones/${cloudflareZoneId}/purge_cache`,\n { purge_everything: true },\n {\n headers: {\n 'Authorization': `Bearer ${cloudflareApiToken}`,\n 'Content-Type': 'application/json',\n },\n }\n )\n\n const result = response.data as { success: boolean; errors?: { message: string }[] }\n\n if (!result.success) {\n const errorMessages = result.errors?.map(e => e.message) || ['Unknown error']\n console.error('Cloudflare cache purge failed:', errorMessages)\n return { success: false, errors: errorMessages }\n }\n\n console.log('Successfully purged all cache from Cloudflare')\n return { success: true }\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error'\n console.error('Error clearing Cloudflare cache:', errorMessage)\n return { success: false, errors: [errorMessage] }\n }\n}\n", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { commonRouter } from '@/src/trpc/apis/common-apis/common'\nimport {\n getStoresSummary,\n healthCheck,\n} from '@/src/dbService'\nimport type { StoresSummaryResponse } from '@packages/shared'\nimport * as turf from '@turf/turf';\nimport { z } from 'zod';\nimport { mbnrGeoJson } from '@/src/lib/mbnr-geojson'\nimport { generateUploadUrl } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getAllConstValues } from '@/src/lib/const-store'\nimport { CONST_KEYS } from '@/src/lib/const-keys'\nimport { assetsDomain, apiCacheKey } from '@/src/lib/env-exporter'\n\nconst polygon = turf.polygon(mbnrGeoJson.features[0].geometry.coordinates);\n\nexport async function scaffoldEssentialConsts() {\n const consts = await getAllConstValues();\n\n return {\n freeDeliveryThreshold: consts[CONST_KEYS.freeDeliveryThreshold] ?? 200,\n deliveryCharge: consts[CONST_KEYS.deliveryCharge] ?? 0,\n flashFreeDeliveryThreshold: consts[CONST_KEYS.flashFreeDeliveryThreshold] ?? 500,\n flashDeliveryCharge: consts[CONST_KEYS.flashDeliveryCharge] ?? 69,\n popularItems: consts[CONST_KEYS.popularItems] ?? '5,3,2,4,1',\n versionNum: consts[CONST_KEYS.versionNum] ?? '1.1.0',\n playStoreUrl: consts[CONST_KEYS.playStoreUrl] ?? 'https://play.google.com/store/apps/details?id=in.freshyo.app',\n appStoreUrl: consts[CONST_KEYS.appStoreUrl] ?? 'https://apps.apple.com/in/app/freshyo/id6756889077',\n webViewHtml: null,\n isWebviewClosable: true,\n isFlashDeliveryEnabled: consts[CONST_KEYS.isFlashDeliveryEnabled] ?? true,\n supportMobile: consts[CONST_KEYS.supportMobile] ?? '',\n supportEmail: consts[CONST_KEYS.supportEmail] ?? '',\n assetsDomain,\n apiCacheKey,\n };\n}\n\nexport const commonApiRouter = router({\n product: commonRouter,\n\n getStoresSummary: publicProcedure\n .query(async (): Promise => {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { storeInfo } from '@/src/db/schema'\n\n const stores = await db.query.storeInfo.findMany({\n columns: {\n id: true,\n name: true,\n description: true,\n },\n });\n */\n\n const stores = await getStoresSummary();\n\n return {\n stores,\n };\n }),\n\n checkLocationInPolygon: publicProcedure\n .input(z.object({\n lat: z.number().min(-90).max(90),\n lng: z.number().min(-180).max(180),\n }))\n .query(({ input }) => {\n try {\n const { lat, lng } = input;\n const point = turf.point([lng, lat]); // GeoJSON: [longitude, latitude]\n const isInside = turf.booleanPointInPolygon(point, polygon);\n return { isInside };\n } catch (error) {\n throw new Error('Invalid coordinates or polygon data');\n }\n }),\n\n generateUploadUrls: protectedProcedure\n .input(z.object({\n contextString: z.enum(['review', 'review_response', 'product_info', 'notification', 'store', 'complaint', 'profile', 'tags']),\n mimeTypes: z.array(z.string()),\n }))\n .mutation(async ({ input }): Promise<{ uploadUrls: string[] }> => {\n const { contextString, mimeTypes } = input;\n\n const uploadUrls: string[] = [];\n const keys: string[] = [];\n\n for (const mimeType of mimeTypes) {\n // Generate key based on context and mime type\n let folder: string;\n if (contextString === 'review') {\n folder = 'review-images';\n } else if (contextString === 'product_info') {\n folder = 'product-images';\n } else if (contextString === 'store') {\n folder = 'store-images';\n } else if (contextString === 'review_response') {\n folder = 'review-response-images';\n } else if (contextString === 'complaint') {\n folder = 'complaint-images';\n } else if (contextString === 'profile') {\n folder = 'profile-images';\n } else if (contextString === 'tags') {\n folder = 'tags';\n } else {\n folder = '';\n }\n\n const extension = mimeType === 'image/jpeg' ? '.jpg' :\n mimeType === 'image/png' ? '.png' :\n mimeType === 'image/gif' ? '.gif' : '.jpg';\n const key = `${folder}/${Date.now()}${extension}`;\n\n try {\n const uploadUrl = await generateUploadUrl(key, mimeType);\n uploadUrls.push(uploadUrl);\n keys.push(key);\n\n } catch (error) {\n console.error('Error generating upload URL:', error);\n throw new ApiError('Failed to generate upload URL', 500);\n }\n }\n return { uploadUrls };\n }),\n\n healthCheck: publicProcedure\n .query(async () => {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { keyValStore, productInfo } from '@/src/db/schema'\n\n // Test DB connection by selecting product names\n // await db.select({ name: productInfo.name }).from(productInfo).limit(1);\n await db.select({ key: keyValStore.key }).from(keyValStore).limit(1);\n */\n\n const result = await healthCheck();\n return result;\n }),\n\n essentialConsts: publicProcedure\n .query(async () => {\n const response = await scaffoldEssentialConsts();\n return response;\n }),\n});\n\nexport type CommonApiRouter = typeof commonApiRouter;\n", "import {\n BBox,\n Feature,\n FeatureCollection,\n Geometry,\n GeometryCollection,\n GeometryObject,\n LineString,\n MultiLineString,\n MultiPoint,\n MultiPolygon,\n Point,\n Polygon,\n Position,\n GeoJsonProperties,\n} from \"geojson\";\n\nimport { Id } from \"./lib/geojson.js\";\nexport * from \"./lib/geojson.js\";\n\n/**\n * @module helpers\n */\n\n// TurfJS Combined Types\nexport type Coord = Feature | Point | Position;\n\n/**\n * Linear measurement units.\n *\n * ⚠️ Warning. Be aware of the implications of using radian or degree units to\n * measure distance. The distance represented by a degree of longitude *varies*\n * depending on latitude.\n *\n * See https://www.thoughtco.com/degree-of-latitude-and-longitude-distance-4070616\n * for an illustration of this behaviour.\n *\n * @typedef\n */\nexport type Units =\n | \"meters\"\n | \"metres\"\n | \"millimeters\"\n | \"millimetres\"\n | \"centimeters\"\n | \"centimetres\"\n | \"kilometers\"\n | \"kilometres\"\n | \"miles\"\n | \"nauticalmiles\"\n | \"inches\"\n | \"yards\"\n | \"feet\"\n | \"radians\"\n | \"degrees\";\n\n/**\n * Area measurement units.\n *\n * @typedef\n */\nexport type AreaUnits =\n | Exclude\n | \"acres\"\n | \"hectares\";\n\n/**\n * Grid types.\n *\n * @typedef\n */\nexport type Grid = \"point\" | \"square\" | \"hex\" | \"triangle\";\n\n/**\n * Shorthand corner identifiers.\n *\n * @typedef\n */\nexport type Corners = \"sw\" | \"se\" | \"nw\" | \"ne\" | \"center\" | \"centroid\";\n\n/**\n * Geometries made up of lines i.e. lines and polygons.\n *\n * @typedef\n */\nexport type Lines = LineString | MultiLineString | Polygon | MultiPolygon;\n\n/**\n * Convenience type for all possible GeoJSON.\n *\n * @typedef\n */\nexport type AllGeoJSON =\n | Feature\n | FeatureCollection\n | Geometry\n | GeometryCollection;\n\n/**\n * The Earth radius in meters. Used by Turf modules that model the Earth as a sphere. The {@link https://en.wikipedia.org/wiki/Earth_radius#Arithmetic_mean_radius mean radius} was selected because it is {@link https://rosettacode.org/wiki/Haversine_formula#:~:text=This%20value%20is%20recommended recommended } by the Haversine formula (used by turf/distance) to reduce error.\n *\n * @constant\n */\nexport const earthRadius = 6371008.8;\n\n/**\n * Unit of measurement factors based on earthRadius.\n *\n * Keys are the name of the unit, values are the number of that unit in a single radian\n *\n * @constant\n */\nexport const factors: Record = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: 360 / (2 * Math.PI),\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n\n/**\n\n * Area of measurement factors based on 1 square meter.\n *\n * @constant\n */\nexport const areaFactors: Record = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n nauticalmiles: 2.9155334959812285e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @function\n * @param {GeometryObject} geometry input geometry\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature<\n G extends GeometryObject = Geometry,\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n geom: G | null,\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n const feat: any = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @function\n * @param {(\"Point\" | \"LineString\" | \"Polygon\" | \"MultiPoint\" | \"MultiLineString\" | \"MultiPolygon\")} type Geometry Type\n * @param {Array} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry<\n T extends\n | \"Point\"\n | \"LineString\"\n | \"Polygon\"\n | \"MultiPoint\"\n | \"MultiLineString\"\n | \"MultiPolygon\",\n>(\n type: T,\n coordinates: any[],\n _options: Record = {}\n): Extract {\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry as Extract;\n case \"LineString\":\n return lineString(coordinates).geometry as Extract;\n case \"Polygon\":\n return polygon(coordinates).geometry as Extract;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry as Extract;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry as Extract<\n Geometry,\n { type: T }\n >;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry as Extract<\n Geometry,\n { type: T }\n >;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @function\n * @param {Position} coordinates longitude, latitude position (each in decimal degrees)\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point

(\n coordinates: Position,\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n\n const geom: Point = {\n type: \"Point\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @function\n * @param {Position[]} coordinates an array of Points\n * @param {GeoJsonProperties} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {Id} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points

(\n coordinates: Position[],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection {\n return featureCollection(\n coordinates.map((coords) => {\n return point(coords, properties);\n }),\n options\n );\n}\n\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @function\n * @param {Position[][]} coordinates an array of LinearRings\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon

(\n coordinates: Position[][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n for (const ring of coordinates) {\n if (ring.length < 4) {\n throw new Error(\n \"Each LinearRing of a Polygon must have 4 or more Positions.\"\n );\n }\n\n if (ring[ring.length - 1].length !== ring[0].length) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n\n for (let j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n const geom: Polygon = {\n type: \"Polygon\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @function\n * @param {Position[][][]} coordinates an array of Polygon coordinates\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons

(\n coordinates: Position[][][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection {\n return featureCollection(\n coordinates.map((coords) => {\n return polygon(coords, properties);\n }),\n options\n );\n}\n\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @function\n * @param {Position[]} coordinates an array of Positions\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString

(\n coordinates: Position[],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n const geom: LineString = {\n type: \"LineString\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @function\n * @param {Position[][]} coordinates an array of LinearRings\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {Id} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings

(\n coordinates: Position[][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection {\n return featureCollection(\n coordinates.map((coords) => {\n return lineString(coords, properties);\n }),\n options\n );\n}\n\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @function\n * @param {Array>} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection<\n G extends GeometryObject = Geometry,\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n features: Array>,\n options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection {\n const fc: any = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n\n/**\n * Creates a {@link Feature}<{@link MultiLineString}> based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Position[][]} coordinates an array of LineStrings\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString<\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n coordinates: Position[][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n const geom: MultiLineString = {\n type: \"MultiLineString\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Feature}<{@link MultiPoint}> based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Position[]} coordinates an array of Positions\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint

(\n coordinates: Position[],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n const geom: MultiPoint = {\n type: \"MultiPoint\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Feature}<{@link MultiPolygon}> based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Position[][][]} coordinates an array of Polygons\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon

(\n coordinates: Position[][][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n const geom: MultiPolygon = {\n type: \"MultiPolygon\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a Feature based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Array} geometries an array of GeoJSON Geometries\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection<\n G extends\n | Point\n | LineString\n | Polygon\n | MultiPoint\n | MultiLineString\n | MultiPolygon,\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n geometries: Array,\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature, P> {\n const geom: GeometryCollection = {\n type: \"GeometryCollection\",\n geometries,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Round number to precision\n *\n * @function\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num: number, precision = 0): number {\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n const multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @function\n * @param {number} radians in radians across the sphere\n * @param {Units} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(\n radians: number,\n units: Units = \"kilometers\"\n): number {\n const factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @function\n * @param {number} distance in real units\n * @param {Units} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(\n distance: number,\n units: Units = \"kilometers\"\n): number {\n const factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @function\n * @param {number} distance in real units\n * @param {Units} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance: number, units?: Units): number {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @function\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing: number): number {\n let angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n\n/**\n * Converts any azimuth angle from the north line direction (positive clockwise)\n * and returns an angle between -180 and +180 degrees (positive clockwise), 0 being the north line\n *\n * @function\n * @param {number} angle between 0 and 360 degrees\n * @returns {number} bearing between -180 and +180 degrees\n */\nexport function azimuthToBearing(angle: number): number {\n // Ignore full revolutions (multiples of 360)\n angle = angle % 360;\n\n if (angle > 180) {\n return angle - 360;\n } else if (angle < -180) {\n return angle + 360;\n }\n\n return angle;\n}\n\n/**\n * Converts an angle in radians to degrees\n *\n * @function\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians: number): number {\n // % (2 * Math.PI) radians in case someone passes value > 2π\n const normalisedRadians = radians % (2 * Math.PI);\n return (normalisedRadians * 180) / Math.PI;\n}\n\n/**\n * Converts an angle in degrees to radians\n *\n * @function\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees: number): number {\n // % 360 degrees in case someone passes value > 360\n const normalisedDegrees = degrees % 360;\n return (normalisedDegrees * Math.PI) / 180;\n}\n\n/**\n * Converts a length from one unit to another.\n *\n * @function\n * @param {number} length Length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] Input length unit\n * @param {Units} [finalUnit=\"kilometers\"] Returned length unit\n * @returns {number} The converted length\n */\nexport function convertLength(\n length: number,\n originalUnit: Units = \"kilometers\",\n finalUnit: Units = \"kilometers\"\n): number {\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n\n/**\n * Converts an area from one unit to another.\n *\n * @function\n * @param {number} area Area to be converted\n * @param {AreaUnits} [originalUnit=\"meters\"] Input area unit\n * @param {AreaUnits} [finalUnit=\"kilometers\"] Returned area unit\n * @returns {number} The converted length\n */\nexport function convertArea(\n area: number,\n originalUnit: AreaUnits = \"meters\",\n finalUnit: AreaUnits = \"kilometers\"\n): number {\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n\n const startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n\n const finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n\n return (area / startFactor) * finalFactor;\n}\n\n/**\n * isNumber\n *\n * @function\n * @param {any} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num: any): boolean {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n\n/**\n * isObject\n *\n * @function\n * @param {any} input variable to validate\n * @returns {boolean} true/false, including false for Arrays and Functions\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input: any): boolean {\n return input !== null && typeof input === \"object\" && !Array.isArray(input);\n}\n\n/**\n * Validate BBox\n *\n * @private\n * @param {any} bbox BBox to validate\n * @returns {void}\n * @throws {Error} if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox: any): void {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach((num) => {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n\n/**\n * Validate Id\n *\n * @private\n * @param {any} id Id to validate\n * @returns {void}\n * @throws {Error} if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id: any): void {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n", "import {\n Feature,\n FeatureCollection,\n Geometry,\n LineString,\n MultiPoint,\n MultiLineString,\n MultiPolygon,\n Point,\n Polygon,\n} from \"geojson\";\nimport { isNumber } from \"@turf/helpers\";\n\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @function\n * @param {Array|Geometry|Feature} coord GeoJSON Point or an Array of numbers\n * @returns {Array} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nfunction getCoord(coord: Feature | Point | number[]): number[] {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n\n if (!Array.isArray(coord)) {\n if (\n coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\"\n ) {\n return [...coord.geometry.coordinates];\n }\n if (coord.type === \"Point\") {\n return [...coord.coordinates];\n }\n }\n if (\n Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])\n ) {\n return [...coord];\n }\n\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @function\n * @param {Array|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nfunction getCoords<\n G extends\n | Point\n | LineString\n | Polygon\n | MultiPoint\n | MultiLineString\n | MultiPolygon,\n>(coords: any[] | Feature | G): any[] {\n if (Array.isArray(coords)) {\n return coords;\n }\n\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n } else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n\n throw new Error(\n \"coords must be GeoJSON Feature, Geometry Object or an Array\"\n );\n}\n\n/**\n * Checks if coordinates contains a number\n *\n * @function\n * @param {Array} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nfunction containsNumber(coordinates: any[]): boolean {\n if (\n coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])\n ) {\n return true;\n }\n\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @function\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction geojsonType(value: any, type: string, name: string): void {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n\n if (!value || value.type !== type) {\n throw new Error(\n \"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type\n );\n }\n}\n\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @function\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nfunction featureOf(feature: Feature, type: string, name: string): void {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\n \"Invalid input to \" + name + \", Feature with geometry required\"\n );\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\n \"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type\n );\n }\n}\n\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @function\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction collectionOf(\n featureCollection: FeatureCollection,\n type: string,\n name: string\n) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\n \"Invalid input to \" + name + \", FeatureCollection required\"\n );\n }\n for (const feature of featureCollection.features) {\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\n \"Invalid input to \" + name + \", Feature with geometry required\"\n );\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\n \"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type\n );\n }\n }\n}\n\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nfunction getGeom(geojson: Feature | G): G {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nfunction getType(\n geojson: Feature | FeatureCollection | Geometry,\n _name?: string\n): string {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n\nexport {\n getCoord,\n getCoords,\n containsNumber,\n geojsonType,\n featureOf,\n collectionOf,\n getGeom,\n getType,\n};\n// No default export!\n", "import { orient2d } from 'robust-predicates';\n\nfunction pointInPolygon(p, polygon) {\n var i;\n var ii;\n var k = 0;\n var f;\n var u1;\n var v1;\n var u2;\n var v2;\n var currentP;\n var nextP;\n\n var x = p[0];\n var y = p[1];\n\n var numContours = polygon.length;\n for (i = 0; i < numContours; i++) {\n ii = 0;\n var contour = polygon[i];\n var contourLen = contour.length - 1;\n\n currentP = contour[0];\n if (currentP[0] !== contour[contourLen][0] &&\n currentP[1] !== contour[contourLen][1]) {\n throw new Error('First and last coordinates in a ring must be the same')\n }\n\n u1 = currentP[0] - x;\n v1 = currentP[1] - y;\n\n for (ii; ii < contourLen; ii++) {\n nextP = contour[ii + 1];\n\n u2 = nextP[0] - x;\n v2 = nextP[1] - y;\n\n if (v1 === 0 && v2 === 0) {\n if ((u2 <= 0 && u1 >= 0) || (u1 <= 0 && u2 >= 0)) { return 0 }\n } else if ((v2 >= 0 && v1 <= 0) || (v2 <= 0 && v1 >= 0)) {\n f = orient2d(u1, u2, v1, v2, 0, 0);\n if (f === 0) { return 0 }\n if ((f > 0 && v2 > 0 && v1 <= 0) || (f < 0 && v2 <= 0 && v1 > 0)) { k++; }\n }\n currentP = nextP;\n v1 = v2;\n u1 = u2;\n }\n }\n\n if (k % 2 === 0) { return false }\n return true\n}\n\nexport { pointInPolygon as default };\n", "\nexport {orient2d, orient2dfast} from './esm/orient2d.js';\nexport {orient3d, orient3dfast} from './esm/orient3d.js';\nexport {incircle, incirclefast} from './esm/incircle.js';\nexport {insphere, inspherefast} from './esm/insphere.js';\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum} from './util.js';\n\nconst ccwerrboundA = (3 + 16 * epsilon) * epsilon;\nconst ccwerrboundB = (2 + 12 * epsilon) * epsilon;\nconst ccwerrboundC = (9 + 64 * epsilon) * epsilon * epsilon;\n\nconst B = vec(4);\nconst C1 = vec(8);\nconst C2 = vec(12);\nconst D = vec(16);\nconst u = vec(4);\n\nfunction orient2dadapt(ax, ay, bx, by, cx, cy, detsum) {\n let acxtail, acytail, bcxtail, bcytail;\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n const acx = ax - cx;\n const bcx = bx - cx;\n const acy = ay - cy;\n const bcy = by - cy;\n\n s1 = acx * bcy;\n c = splitter * acx;\n ahi = c - (c - acx);\n alo = acx - ahi;\n c = splitter * bcy;\n bhi = c - (c - bcy);\n blo = bcy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acy * bcx;\n c = splitter * acy;\n ahi = c - (c - acy);\n alo = acy - ahi;\n c = splitter * bcx;\n bhi = c - (c - bcx);\n blo = bcx - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n B[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n B[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n B[2] = _j - (u3 - bvirt) + (_i - bvirt);\n B[3] = u3;\n\n let det = estimate(4, B);\n let errbound = ccwerrboundB * detsum;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - acx;\n acxtail = ax - (acx + bvirt) + (bvirt - cx);\n bvirt = bx - bcx;\n bcxtail = bx - (bcx + bvirt) + (bvirt - cx);\n bvirt = ay - acy;\n acytail = ay - (acy + bvirt) + (bvirt - cy);\n bvirt = by - bcy;\n bcytail = by - (bcy + bvirt) + (bvirt - cy);\n\n if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) {\n return det;\n }\n\n errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det);\n det += (acx * bcytail + bcy * acxtail) - (acy * bcxtail + bcx * acytail);\n if (det >= errbound || -det >= errbound) return det;\n\n s1 = acxtail * bcy;\n c = splitter * acxtail;\n ahi = c - (c - acxtail);\n alo = acxtail - ahi;\n c = splitter * bcy;\n bhi = c - (c - bcy);\n blo = bcy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acytail * bcx;\n c = splitter * acytail;\n ahi = c - (c - acytail);\n alo = acytail - ahi;\n c = splitter * bcx;\n bhi = c - (c - bcx);\n blo = bcx - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const C1len = sum(4, B, 4, u, C1);\n\n s1 = acx * bcytail;\n c = splitter * acx;\n ahi = c - (c - acx);\n alo = acx - ahi;\n c = splitter * bcytail;\n bhi = c - (c - bcytail);\n blo = bcytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acy * bcxtail;\n c = splitter * acy;\n ahi = c - (c - acy);\n alo = acy - ahi;\n c = splitter * bcxtail;\n bhi = c - (c - bcxtail);\n blo = bcxtail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const C2len = sum(C1len, C1, 4, u, C2);\n\n s1 = acxtail * bcytail;\n c = splitter * acxtail;\n ahi = c - (c - acxtail);\n alo = acxtail - ahi;\n c = splitter * bcytail;\n bhi = c - (c - bcytail);\n blo = bcytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acytail * bcxtail;\n c = splitter * acytail;\n ahi = c - (c - acytail);\n alo = acytail - ahi;\n c = splitter * bcxtail;\n bhi = c - (c - bcxtail);\n blo = bcxtail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const Dlen = sum(C2len, C2, 4, u, D);\n\n return D[Dlen - 1];\n}\n\nexport function orient2d(ax, ay, bx, by, cx, cy) {\n const detleft = (ay - cy) * (bx - cx);\n const detright = (ax - cx) * (by - cy);\n const det = detleft - detright;\n\n const detsum = Math.abs(detleft + detright);\n if (Math.abs(det) >= ccwerrboundA * detsum) return det;\n\n return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum);\n}\n\nexport function orient2dfast(ax, ay, bx, by, cx, cy) {\n return (ay - cy) * (bx - cx) - (ax - cx) * (by - cy);\n}\n", "export const epsilon = 1.1102230246251565e-16;\nexport const splitter = 134217729;\nexport const resulterrbound = (3 + 8 * epsilon) * epsilon;\n\n// fast_expansion_sum_zeroelim routine from oritinal code\nexport function sum(elen, e, flen, f, h) {\n let Q, Qnew, hh, bvirt;\n let enow = e[0];\n let fnow = f[0];\n let eindex = 0;\n let findex = 0;\n if ((fnow > enow) === (fnow > -enow)) {\n Q = enow;\n enow = e[++eindex];\n } else {\n Q = fnow;\n fnow = f[++findex];\n }\n let hindex = 0;\n if (eindex < elen && findex < flen) {\n if ((fnow > enow) === (fnow > -enow)) {\n Qnew = enow + Q;\n hh = Q - (Qnew - enow);\n enow = e[++eindex];\n } else {\n Qnew = fnow + Q;\n hh = Q - (Qnew - fnow);\n fnow = f[++findex];\n }\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n while (eindex < elen && findex < flen) {\n if ((fnow > enow) === (fnow > -enow)) {\n Qnew = Q + enow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (enow - bvirt);\n enow = e[++eindex];\n } else {\n Qnew = Q + fnow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n fnow = f[++findex];\n }\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n }\n while (eindex < elen) {\n Qnew = Q + enow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (enow - bvirt);\n enow = e[++eindex];\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n while (findex < flen) {\n Qnew = Q + fnow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n fnow = f[++findex];\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n if (Q !== 0 || hindex === 0) {\n h[hindex++] = Q;\n }\n return hindex;\n}\n\nexport function sum_three(alen, a, blen, b, clen, c, tmp, out) {\n return sum(sum(alen, a, blen, b, tmp), tmp, clen, c, out);\n}\n\n// scale_expansion_zeroelim routine from oritinal code\nexport function scale(elen, e, b, h) {\n let Q, sum, hh, product1, product0;\n let bvirt, c, ahi, alo, bhi, blo;\n\n c = splitter * b;\n bhi = c - (c - b);\n blo = b - bhi;\n let enow = e[0];\n Q = enow * b;\n c = splitter * enow;\n ahi = c - (c - enow);\n alo = enow - ahi;\n hh = alo * blo - (Q - ahi * bhi - alo * bhi - ahi * blo);\n let hindex = 0;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n for (let i = 1; i < elen; i++) {\n enow = e[i];\n product1 = enow * b;\n c = splitter * enow;\n ahi = c - (c - enow);\n alo = enow - ahi;\n product0 = alo * blo - (product1 - ahi * bhi - alo * bhi - ahi * blo);\n sum = Q + product0;\n bvirt = sum - Q;\n hh = Q - (sum - bvirt) + (product0 - bvirt);\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n Q = product1 + sum;\n hh = sum - (Q - product1);\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n if (Q !== 0 || hindex === 0) {\n h[hindex++] = Q;\n }\n return hindex;\n}\n\nexport function negate(elen, e) {\n for (let i = 0; i < elen; i++) e[i] = -e[i];\n return elen;\n}\n\nexport function estimate(elen, e) {\n let Q = e[0];\n for (let i = 1; i < elen; i++) Q += e[i];\n return Q;\n}\n\nexport function vec(n) {\n return new Float64Array(n);\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum, scale} from './util.js';\n\nconst o3derrboundA = (7 + 56 * epsilon) * epsilon;\nconst o3derrboundB = (3 + 28 * epsilon) * epsilon;\nconst o3derrboundC = (26 + 288 * epsilon) * epsilon * epsilon;\n\nconst bc = vec(4);\nconst ca = vec(4);\nconst ab = vec(4);\nconst at_b = vec(4);\nconst at_c = vec(4);\nconst bt_c = vec(4);\nconst bt_a = vec(4);\nconst ct_a = vec(4);\nconst ct_b = vec(4);\nconst bct = vec(8);\nconst cat = vec(8);\nconst abt = vec(8);\nconst u = vec(4);\n\nconst _8 = vec(8);\nconst _8b = vec(8);\nconst _16 = vec(8);\nconst _12 = vec(12);\n\nlet fin = vec(192);\nlet fin2 = vec(192);\n\nfunction finadd(finlen, alen, a) {\n finlen = sum(finlen, fin, alen, a, fin2);\n const tmp = fin; fin = fin2; fin2 = tmp;\n return finlen;\n}\n\nfunction tailinit(xtail, ytail, ax, ay, bx, by, a, b) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3, negate;\n if (xtail === 0) {\n if (ytail === 0) {\n a[0] = 0;\n b[0] = 0;\n return 1;\n } else {\n negate = -ytail;\n s1 = negate * ax;\n c = splitter * negate;\n ahi = c - (c - negate);\n alo = negate - ahi;\n c = splitter * ax;\n bhi = c - (c - ax);\n blo = ax - bhi;\n a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n a[1] = s1;\n s1 = ytail * bx;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * bx;\n bhi = c - (c - bx);\n blo = bx - bhi;\n b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n b[1] = s1;\n return 2;\n }\n } else {\n if (ytail === 0) {\n s1 = xtail * ay;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n a[1] = s1;\n negate = -xtail;\n s1 = negate * by;\n c = splitter * negate;\n ahi = c - (c - negate);\n alo = negate - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n b[1] = s1;\n return 2;\n } else {\n s1 = xtail * ay;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ytail * ax;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * ax;\n bhi = c - (c - ax);\n blo = ax - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n a[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n a[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n a[2] = _j - (u3 - bvirt) + (_i - bvirt);\n a[3] = u3;\n s1 = ytail * bx;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * bx;\n bhi = c - (c - bx);\n blo = bx - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = xtail * by;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n b[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n b[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n b[2] = _j - (u3 - bvirt) + (_i - bvirt);\n b[3] = u3;\n return 4;\n }\n }\n}\n\nfunction tailadd(finlen, a, b, k, z) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, u3;\n s1 = a * b;\n c = splitter * a;\n ahi = c - (c - a);\n alo = a - ahi;\n c = splitter * b;\n bhi = c - (c - b);\n blo = b - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n c = splitter * k;\n bhi = c - (c - k);\n blo = k - bhi;\n _i = s0 * k;\n c = splitter * s0;\n ahi = c - (c - s0);\n alo = s0 - ahi;\n u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n _j = s1 * k;\n c = splitter * s1;\n ahi = c - (c - s1);\n alo = s1 - ahi;\n _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n _k = _i + _0;\n bvirt = _k - _i;\n u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n u3 = _j + _k;\n u[2] = _k - (u3 - _j);\n u[3] = u3;\n finlen = finadd(finlen, 4, u);\n if (z !== 0) {\n c = splitter * z;\n bhi = c - (c - z);\n blo = z - bhi;\n _i = s0 * z;\n c = splitter * s0;\n ahi = c - (c - s0);\n alo = s0 - ahi;\n u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n _j = s1 * z;\n c = splitter * s1;\n ahi = c - (c - s1);\n alo = s1 - ahi;\n _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n _k = _i + _0;\n bvirt = _k - _i;\n u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n u3 = _j + _k;\n u[2] = _k - (u3 - _j);\n u[3] = u3;\n finlen = finadd(finlen, 4, u);\n }\n return finlen;\n}\n\nfunction orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent) {\n let finlen;\n let adxtail, bdxtail, cdxtail;\n let adytail, bdytail, cdytail;\n let adztail, bdztail, cdztail;\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3;\n\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n s1 = bdx * cdy;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * bdy;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cdx * ady;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * cdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ca[3] = u3;\n s1 = adx * bdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * ady;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n\n finlen = sum(\n sum(\n scale(4, bc, adz, _8), _8,\n scale(4, ca, bdz, _8b), _8b, _16), _16,\n scale(4, ab, cdz, _8), _8, fin);\n\n let det = estimate(finlen, fin);\n let errbound = o3derrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - adx;\n adxtail = ax - (adx + bvirt) + (bvirt - dx);\n bvirt = bx - bdx;\n bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n bvirt = cx - cdx;\n cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n bvirt = ay - ady;\n adytail = ay - (ady + bvirt) + (bvirt - dy);\n bvirt = by - bdy;\n bdytail = by - (bdy + bvirt) + (bvirt - dy);\n bvirt = cy - cdy;\n cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n bvirt = az - adz;\n adztail = az - (adz + bvirt) + (bvirt - dz);\n bvirt = bz - bdz;\n bdztail = bz - (bdz + bvirt) + (bvirt - dz);\n bvirt = cz - cdz;\n cdztail = cz - (cdz + bvirt) + (bvirt - dz);\n\n if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 &&\n adytail === 0 && bdytail === 0 && cdytail === 0 &&\n adztail === 0 && bdztail === 0 && cdztail === 0) {\n return det;\n }\n\n errbound = o3derrboundC * permanent + resulterrbound * Math.abs(det);\n det +=\n adz * (bdx * cdytail + cdy * bdxtail - (bdy * cdxtail + cdx * bdytail)) + adztail * (bdx * cdy - bdy * cdx) +\n bdz * (cdx * adytail + ady * cdxtail - (cdy * adxtail + adx * cdytail)) + bdztail * (cdx * ady - cdy * adx) +\n cdz * (adx * bdytail + bdy * adxtail - (ady * bdxtail + bdx * adytail)) + cdztail * (adx * bdy - ady * bdx);\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n const at_len = tailinit(adxtail, adytail, bdx, bdy, cdx, cdy, at_b, at_c);\n const bt_len = tailinit(bdxtail, bdytail, cdx, cdy, adx, ady, bt_c, bt_a);\n const ct_len = tailinit(cdxtail, cdytail, adx, ady, bdx, bdy, ct_a, ct_b);\n\n const bctlen = sum(bt_len, bt_c, ct_len, ct_b, bct);\n finlen = finadd(finlen, scale(bctlen, bct, adz, _16), _16);\n\n const catlen = sum(ct_len, ct_a, at_len, at_c, cat);\n finlen = finadd(finlen, scale(catlen, cat, bdz, _16), _16);\n\n const abtlen = sum(at_len, at_b, bt_len, bt_a, abt);\n finlen = finadd(finlen, scale(abtlen, abt, cdz, _16), _16);\n\n if (adztail !== 0) {\n finlen = finadd(finlen, scale(4, bc, adztail, _12), _12);\n finlen = finadd(finlen, scale(bctlen, bct, adztail, _16), _16);\n }\n if (bdztail !== 0) {\n finlen = finadd(finlen, scale(4, ca, bdztail, _12), _12);\n finlen = finadd(finlen, scale(catlen, cat, bdztail, _16), _16);\n }\n if (cdztail !== 0) {\n finlen = finadd(finlen, scale(4, ab, cdztail, _12), _12);\n finlen = finadd(finlen, scale(abtlen, abt, cdztail, _16), _16);\n }\n\n if (adxtail !== 0) {\n if (bdytail !== 0) {\n finlen = tailadd(finlen, adxtail, bdytail, cdz, cdztail);\n }\n if (cdytail !== 0) {\n finlen = tailadd(finlen, -adxtail, cdytail, bdz, bdztail);\n }\n }\n if (bdxtail !== 0) {\n if (cdytail !== 0) {\n finlen = tailadd(finlen, bdxtail, cdytail, adz, adztail);\n }\n if (adytail !== 0) {\n finlen = tailadd(finlen, -bdxtail, adytail, cdz, cdztail);\n }\n }\n if (cdxtail !== 0) {\n if (adytail !== 0) {\n finlen = tailadd(finlen, cdxtail, adytail, bdz, bdztail);\n }\n if (bdytail !== 0) {\n finlen = tailadd(finlen, -cdxtail, bdytail, adz, adztail);\n }\n }\n\n return fin[finlen - 1];\n}\n\nexport function orient3d(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n const bdxcdy = bdx * cdy;\n const cdxbdy = cdx * bdy;\n\n const cdxady = cdx * ady;\n const adxcdy = adx * cdy;\n\n const adxbdy = adx * bdy;\n const bdxady = bdx * ady;\n\n const det =\n adz * (bdxcdy - cdxbdy) +\n bdz * (cdxady - adxcdy) +\n cdz * (adxbdy - bdxady);\n\n const permanent =\n (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * Math.abs(adz) +\n (Math.abs(cdxady) + Math.abs(adxcdy)) * Math.abs(bdz) +\n (Math.abs(adxbdy) + Math.abs(bdxady)) * Math.abs(cdz);\n\n const errbound = o3derrboundA * permanent;\n if (det > errbound || -det > errbound) {\n return det;\n }\n\n return orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent);\n}\n\nexport function orient3dfast(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n return adx * (bdy * cdz - bdz * cdy) +\n bdx * (cdy * adz - cdz * ady) +\n cdx * (ady * bdz - adz * bdy);\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum, sum_three, scale} from './util.js';\n\nconst iccerrboundA = (10 + 96 * epsilon) * epsilon;\nconst iccerrboundB = (4 + 48 * epsilon) * epsilon;\nconst iccerrboundC = (44 + 576 * epsilon) * epsilon * epsilon;\n\nconst bc = vec(4);\nconst ca = vec(4);\nconst ab = vec(4);\nconst aa = vec(4);\nconst bb = vec(4);\nconst cc = vec(4);\nconst u = vec(4);\nconst v = vec(4);\nconst axtbc = vec(8);\nconst aytbc = vec(8);\nconst bxtca = vec(8);\nconst bytca = vec(8);\nconst cxtab = vec(8);\nconst cytab = vec(8);\nconst abt = vec(8);\nconst bct = vec(8);\nconst cat = vec(8);\nconst abtt = vec(4);\nconst bctt = vec(4);\nconst catt = vec(4);\n\nconst _8 = vec(8);\nconst _16 = vec(16);\nconst _16b = vec(16);\nconst _16c = vec(16);\nconst _32 = vec(32);\nconst _32b = vec(32);\nconst _48 = vec(48);\nconst _64 = vec(64);\n\nlet fin = vec(1152);\nlet fin2 = vec(1152);\n\nfunction finadd(finlen, a, alen) {\n finlen = sum(finlen, fin, a, alen, fin2);\n const tmp = fin; fin = fin2; fin2 = tmp;\n return finlen;\n}\n\nfunction incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent) {\n let finlen;\n let adxtail, bdxtail, cdxtail, adytail, bdytail, cdytail;\n let axtbclen, aytbclen, bxtcalen, bytcalen, cxtablen, cytablen;\n let abtlen, bctlen, catlen;\n let abttlen, bcttlen, cattlen;\n let n1, n0;\n\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n\n s1 = bdx * cdy;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * bdy;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cdx * ady;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * cdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ca[3] = u3;\n s1 = adx * bdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * ady;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n\n finlen = sum(\n sum(\n sum(\n scale(scale(4, bc, adx, _8), _8, adx, _16), _16,\n scale(scale(4, bc, ady, _8), _8, ady, _16b), _16b, _32), _32,\n sum(\n scale(scale(4, ca, bdx, _8), _8, bdx, _16), _16,\n scale(scale(4, ca, bdy, _8), _8, bdy, _16b), _16b, _32b), _32b, _64), _64,\n sum(\n scale(scale(4, ab, cdx, _8), _8, cdx, _16), _16,\n scale(scale(4, ab, cdy, _8), _8, cdy, _16b), _16b, _32), _32, fin);\n\n let det = estimate(finlen, fin);\n let errbound = iccerrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - adx;\n adxtail = ax - (adx + bvirt) + (bvirt - dx);\n bvirt = ay - ady;\n adytail = ay - (ady + bvirt) + (bvirt - dy);\n bvirt = bx - bdx;\n bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n bvirt = by - bdy;\n bdytail = by - (bdy + bvirt) + (bvirt - dy);\n bvirt = cx - cdx;\n cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n bvirt = cy - cdy;\n cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 && adytail === 0 && bdytail === 0 && cdytail === 0) {\n return det;\n }\n\n errbound = iccerrboundC * permanent + resulterrbound * Math.abs(det);\n det += ((adx * adx + ady * ady) * ((bdx * cdytail + cdy * bdxtail) - (bdy * cdxtail + cdx * bdytail)) +\n 2 * (adx * adxtail + ady * adytail) * (bdx * cdy - bdy * cdx)) +\n ((bdx * bdx + bdy * bdy) * ((cdx * adytail + ady * cdxtail) - (cdy * adxtail + adx * cdytail)) +\n 2 * (bdx * bdxtail + bdy * bdytail) * (cdx * ady - cdy * adx)) +\n ((cdx * cdx + cdy * cdy) * ((adx * bdytail + bdy * adxtail) - (ady * bdxtail + bdx * adytail)) +\n 2 * (cdx * cdxtail + cdy * cdytail) * (adx * bdy - ady * bdx));\n\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n s1 = adx * adx;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = ady * ady;\n c = splitter * ady;\n ahi = c - (c - ady);\n alo = ady - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n aa[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n aa[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n aa[2] = _j - (u3 - bvirt) + (_i - bvirt);\n aa[3] = u3;\n }\n if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n s1 = bdx * bdx;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = bdy * bdy;\n c = splitter * bdy;\n ahi = c - (c - bdy);\n alo = bdy - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n bb[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n bb[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bb[3] = u3;\n }\n if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n s1 = cdx * cdx;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = cdy * cdy;\n c = splitter * cdy;\n ahi = c - (c - cdy);\n alo = cdy - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n cc[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n cc[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n cc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n cc[3] = u3;\n }\n\n if (adxtail !== 0) {\n axtbclen = scale(4, bc, adxtail, axtbc);\n finlen = finadd(finlen, sum_three(\n scale(axtbclen, axtbc, 2 * adx, _16), _16,\n scale(scale(4, cc, adxtail, _8), _8, bdy, _16b), _16b,\n scale(scale(4, bb, adxtail, _8), _8, -cdy, _16c), _16c, _32, _48), _48);\n }\n if (adytail !== 0) {\n aytbclen = scale(4, bc, adytail, aytbc);\n finlen = finadd(finlen, sum_three(\n scale(aytbclen, aytbc, 2 * ady, _16), _16,\n scale(scale(4, bb, adytail, _8), _8, cdx, _16b), _16b,\n scale(scale(4, cc, adytail, _8), _8, -bdx, _16c), _16c, _32, _48), _48);\n }\n if (bdxtail !== 0) {\n bxtcalen = scale(4, ca, bdxtail, bxtca);\n finlen = finadd(finlen, sum_three(\n scale(bxtcalen, bxtca, 2 * bdx, _16), _16,\n scale(scale(4, aa, bdxtail, _8), _8, cdy, _16b), _16b,\n scale(scale(4, cc, bdxtail, _8), _8, -ady, _16c), _16c, _32, _48), _48);\n }\n if (bdytail !== 0) {\n bytcalen = scale(4, ca, bdytail, bytca);\n finlen = finadd(finlen, sum_three(\n scale(bytcalen, bytca, 2 * bdy, _16), _16,\n scale(scale(4, cc, bdytail, _8), _8, adx, _16b), _16b,\n scale(scale(4, aa, bdytail, _8), _8, -cdx, _16c), _16c, _32, _48), _48);\n }\n if (cdxtail !== 0) {\n cxtablen = scale(4, ab, cdxtail, cxtab);\n finlen = finadd(finlen, sum_three(\n scale(cxtablen, cxtab, 2 * cdx, _16), _16,\n scale(scale(4, bb, cdxtail, _8), _8, ady, _16b), _16b,\n scale(scale(4, aa, cdxtail, _8), _8, -bdy, _16c), _16c, _32, _48), _48);\n }\n if (cdytail !== 0) {\n cytablen = scale(4, ab, cdytail, cytab);\n finlen = finadd(finlen, sum_three(\n scale(cytablen, cytab, 2 * cdy, _16), _16,\n scale(scale(4, aa, cdytail, _8), _8, bdx, _16b), _16b,\n scale(scale(4, bb, cdytail, _8), _8, -adx, _16c), _16c, _32, _48), _48);\n }\n\n if (adxtail !== 0 || adytail !== 0) {\n if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n s1 = bdxtail * cdy;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * cdytail;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n s1 = cdxtail * -bdy;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * -bdy;\n bhi = c - (c - -bdy);\n blo = -bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * -bdytail;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * -bdytail;\n bhi = c - (c - -bdytail);\n blo = -bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n bctlen = sum(4, u, 4, v, bct);\n s1 = bdxtail * cdytail;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdxtail * bdytail;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bctt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bctt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bctt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bctt[3] = u3;\n bcttlen = 4;\n } else {\n bct[0] = 0;\n bctlen = 1;\n bctt[0] = 0;\n bcttlen = 1;\n }\n if (adxtail !== 0) {\n const len = scale(bctlen, bct, adxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(axtbclen, axtbc, adxtail, _16), _16,\n scale(len, _16c, 2 * adx, _32), _32, _48), _48);\n\n const len2 = scale(bcttlen, bctt, adxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * adx, _16), _16,\n scale(len2, _8, adxtail, _16b), _16b,\n scale(len, _16c, adxtail, _32), _32, _32b, _64), _64);\n\n if (bdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, cc, adxtail, _8), _8, bdytail, _16), _16);\n }\n if (cdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, bb, -adxtail, _8), _8, cdytail, _16), _16);\n }\n }\n if (adytail !== 0) {\n const len = scale(bctlen, bct, adytail, _16c);\n finlen = finadd(finlen, sum(\n scale(aytbclen, aytbc, adytail, _16), _16,\n scale(len, _16c, 2 * ady, _32), _32, _48), _48);\n\n const len2 = scale(bcttlen, bctt, adytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * ady, _16), _16,\n scale(len2, _8, adytail, _16b), _16b,\n scale(len, _16c, adytail, _32), _32, _32b, _64), _64);\n }\n }\n if (bdxtail !== 0 || bdytail !== 0) {\n if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n s1 = cdxtail * ady;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * adytail;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n n1 = -cdy;\n n0 = -cdytail;\n s1 = adxtail * n1;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * n1;\n bhi = c - (c - n1);\n blo = n1 - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * n0;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * n0;\n bhi = c - (c - n0);\n blo = n0 - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n catlen = sum(4, u, 4, v, cat);\n s1 = cdxtail * adytail;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adxtail * cdytail;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n catt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n catt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n catt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n catt[3] = u3;\n cattlen = 4;\n } else {\n cat[0] = 0;\n catlen = 1;\n catt[0] = 0;\n cattlen = 1;\n }\n if (bdxtail !== 0) {\n const len = scale(catlen, cat, bdxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(bxtcalen, bxtca, bdxtail, _16), _16,\n scale(len, _16c, 2 * bdx, _32), _32, _48), _48);\n\n const len2 = scale(cattlen, catt, bdxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * bdx, _16), _16,\n scale(len2, _8, bdxtail, _16b), _16b,\n scale(len, _16c, bdxtail, _32), _32, _32b, _64), _64);\n\n if (cdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, aa, bdxtail, _8), _8, cdytail, _16), _16);\n }\n if (adytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, cc, -bdxtail, _8), _8, adytail, _16), _16);\n }\n }\n if (bdytail !== 0) {\n const len = scale(catlen, cat, bdytail, _16c);\n finlen = finadd(finlen, sum(\n scale(bytcalen, bytca, bdytail, _16), _16,\n scale(len, _16c, 2 * bdy, _32), _32, _48), _48);\n\n const len2 = scale(cattlen, catt, bdytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * bdy, _16), _16,\n scale(len2, _8, bdytail, _16b), _16b,\n scale(len, _16c, bdytail, _32), _32, _32b, _64), _64);\n }\n }\n if (cdxtail !== 0 || cdytail !== 0) {\n if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n s1 = adxtail * bdy;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * bdytail;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n n1 = -ady;\n n0 = -adytail;\n s1 = bdxtail * n1;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * n1;\n bhi = c - (c - n1);\n blo = n1 - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * n0;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * n0;\n bhi = c - (c - n0);\n blo = n0 - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n abtlen = sum(4, u, 4, v, abt);\n s1 = adxtail * bdytail;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdxtail * adytail;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n abtt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n abtt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n abtt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n abtt[3] = u3;\n abttlen = 4;\n } else {\n abt[0] = 0;\n abtlen = 1;\n abtt[0] = 0;\n abttlen = 1;\n }\n if (cdxtail !== 0) {\n const len = scale(abtlen, abt, cdxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(cxtablen, cxtab, cdxtail, _16), _16,\n scale(len, _16c, 2 * cdx, _32), _32, _48), _48);\n\n const len2 = scale(abttlen, abtt, cdxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * cdx, _16), _16,\n scale(len2, _8, cdxtail, _16b), _16b,\n scale(len, _16c, cdxtail, _32), _32, _32b, _64), _64);\n\n if (adytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, bb, cdxtail, _8), _8, adytail, _16), _16);\n }\n if (bdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, aa, -cdxtail, _8), _8, bdytail, _16), _16);\n }\n }\n if (cdytail !== 0) {\n const len = scale(abtlen, abt, cdytail, _16c);\n finlen = finadd(finlen, sum(\n scale(cytablen, cytab, cdytail, _16), _16,\n scale(len, _16c, 2 * cdy, _32), _32, _48), _48);\n\n const len2 = scale(abttlen, abtt, cdytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * cdy, _16), _16,\n scale(len2, _8, cdytail, _16b), _16b,\n scale(len, _16c, cdytail, _32), _32, _32b, _64), _64);\n }\n }\n\n return fin[finlen - 1];\n}\n\nexport function incircle(ax, ay, bx, by, cx, cy, dx, dy) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n\n const bdxcdy = bdx * cdy;\n const cdxbdy = cdx * bdy;\n const alift = adx * adx + ady * ady;\n\n const cdxady = cdx * ady;\n const adxcdy = adx * cdy;\n const blift = bdx * bdx + bdy * bdy;\n\n const adxbdy = adx * bdy;\n const bdxady = bdx * ady;\n const clift = cdx * cdx + cdy * cdy;\n\n const det =\n alift * (bdxcdy - cdxbdy) +\n blift * (cdxady - adxcdy) +\n clift * (adxbdy - bdxady);\n\n const permanent =\n (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * alift +\n (Math.abs(cdxady) + Math.abs(adxcdy)) * blift +\n (Math.abs(adxbdy) + Math.abs(bdxady)) * clift;\n\n const errbound = iccerrboundA * permanent;\n\n if (det > errbound || -det > errbound) {\n return det;\n }\n return incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent);\n}\n\nexport function incirclefast(ax, ay, bx, by, cx, cy, dx, dy) {\n const adx = ax - dx;\n const ady = ay - dy;\n const bdx = bx - dx;\n const bdy = by - dy;\n const cdx = cx - dx;\n const cdy = cy - dy;\n\n const abdet = adx * bdy - bdx * ady;\n const bcdet = bdx * cdy - cdx * bdy;\n const cadet = cdx * ady - adx * cdy;\n const alift = adx * adx + ady * ady;\n const blift = bdx * bdx + bdy * bdy;\n const clift = cdx * cdx + cdy * cdy;\n\n return alift * bcdet + blift * cadet + clift * abdet;\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum, sum_three, scale, negate} from './util.js';\n\nconst isperrboundA = (16 + 224 * epsilon) * epsilon;\nconst isperrboundB = (5 + 72 * epsilon) * epsilon;\nconst isperrboundC = (71 + 1408 * epsilon) * epsilon * epsilon;\n\nconst ab = vec(4);\nconst bc = vec(4);\nconst cd = vec(4);\nconst de = vec(4);\nconst ea = vec(4);\nconst ac = vec(4);\nconst bd = vec(4);\nconst ce = vec(4);\nconst da = vec(4);\nconst eb = vec(4);\n\nconst abc = vec(24);\nconst bcd = vec(24);\nconst cde = vec(24);\nconst dea = vec(24);\nconst eab = vec(24);\nconst abd = vec(24);\nconst bce = vec(24);\nconst cda = vec(24);\nconst deb = vec(24);\nconst eac = vec(24);\n\nconst adet = vec(1152);\nconst bdet = vec(1152);\nconst cdet = vec(1152);\nconst ddet = vec(1152);\nconst edet = vec(1152);\nconst abdet = vec(2304);\nconst cddet = vec(2304);\nconst cdedet = vec(3456);\nconst deter = vec(5760);\n\nconst _8 = vec(8);\nconst _8b = vec(8);\nconst _8c = vec(8);\nconst _16 = vec(16);\nconst _24 = vec(24);\nconst _48 = vec(48);\nconst _48b = vec(48);\nconst _96 = vec(96);\nconst _192 = vec(192);\nconst _384x = vec(384);\nconst _384y = vec(384);\nconst _384z = vec(384);\nconst _768 = vec(768);\n\nfunction sum_three_scale(a, b, c, az, bz, cz, out) {\n return sum_three(\n scale(4, a, az, _8), _8,\n scale(4, b, bz, _8b), _8b,\n scale(4, c, cz, _8c), _8c, _16, out);\n}\n\nfunction liftexact(alen, a, blen, b, clen, c, dlen, d, x, y, z, out) {\n const len = sum(\n sum(alen, a, blen, b, _48), _48,\n negate(sum(clen, c, dlen, d, _48b), _48b), _48b, _96);\n\n return sum_three(\n scale(scale(len, _96, x, _192), _192, x, _384x), _384x,\n scale(scale(len, _96, y, _192), _192, y, _384y), _384y,\n scale(scale(len, _96, z, _192), _192, z, _384z), _384z, _768, out);\n}\n\nfunction insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n s1 = ax * by;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bx * ay;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n s1 = bx * cy;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cx * by;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cx * dy;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dx * cy;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n cd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n cd[3] = u3;\n s1 = dx * ey;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ex * dy;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n de[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n de[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n de[2] = _j - (u3 - bvirt) + (_i - bvirt);\n de[3] = u3;\n s1 = ex * ay;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ax * ey;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ea[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ea[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ea[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ea[3] = u3;\n s1 = ax * cy;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cx * ay;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ac[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ac[3] = u3;\n s1 = bx * dy;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dx * by;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bd[3] = u3;\n s1 = cx * ey;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ex * cy;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ce[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ce[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ce[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ce[3] = u3;\n s1 = dx * ay;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ax * dy;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n da[2] = _j - (u3 - bvirt) + (_i - bvirt);\n da[3] = u3;\n s1 = ex * by;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bx * ey;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n eb[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n eb[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n eb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n eb[3] = u3;\n\n const abclen = sum_three_scale(ab, bc, ac, cz, az, -bz, abc);\n const bcdlen = sum_three_scale(bc, cd, bd, dz, bz, -cz, bcd);\n const cdelen = sum_three_scale(cd, de, ce, ez, cz, -dz, cde);\n const dealen = sum_three_scale(de, ea, da, az, dz, -ez, dea);\n const eablen = sum_three_scale(ea, ab, eb, bz, ez, -az, eab);\n const abdlen = sum_three_scale(ab, bd, da, dz, az, bz, abd);\n const bcelen = sum_three_scale(bc, ce, eb, ez, bz, cz, bce);\n const cdalen = sum_three_scale(cd, da, ac, az, cz, dz, cda);\n const deblen = sum_three_scale(de, eb, bd, bz, dz, ez, deb);\n const eaclen = sum_three_scale(ea, ac, ce, cz, ez, az, eac);\n\n const deterlen = sum_three(\n liftexact(cdelen, cde, bcelen, bce, deblen, deb, bcdlen, bcd, ax, ay, az, adet), adet,\n liftexact(dealen, dea, cdalen, cda, eaclen, eac, cdelen, cde, bx, by, bz, bdet), bdet,\n sum_three(\n liftexact(eablen, eab, deblen, deb, abdlen, abd, dealen, dea, cx, cy, cz, cdet), cdet,\n liftexact(abclen, abc, eaclen, eac, bcelen, bce, eablen, eab, dx, dy, dz, ddet), ddet,\n liftexact(bcdlen, bcd, abdlen, abd, cdalen, cda, abclen, abc, ex, ey, ez, edet), edet, cddet, cdedet), cdedet, abdet, deter);\n\n return deter[deterlen - 1];\n}\n\nconst xdet = vec(96);\nconst ydet = vec(96);\nconst zdet = vec(96);\nconst fin = vec(1152);\n\nfunction liftadapt(a, b, c, az, bz, cz, x, y, z, out) {\n const len = sum_three_scale(a, b, c, az, bz, cz, _24);\n return sum_three(\n scale(scale(len, _24, x, _48), _48, x, xdet), xdet,\n scale(scale(len, _24, y, _48), _48, y, ydet), ydet,\n scale(scale(len, _24, z, _48), _48, z, zdet), zdet, _192, out);\n}\n\nfunction insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent) {\n let ab3, bc3, cd3, da3, ac3, bd3;\n\n let aextail, bextail, cextail, dextail;\n let aeytail, beytail, ceytail, deytail;\n let aeztail, beztail, ceztail, deztail;\n\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0;\n\n const aex = ax - ex;\n const bex = bx - ex;\n const cex = cx - ex;\n const dex = dx - ex;\n const aey = ay - ey;\n const bey = by - ey;\n const cey = cy - ey;\n const dey = dy - ey;\n const aez = az - ez;\n const bez = bz - ez;\n const cez = cz - ez;\n const dez = dz - ez;\n\n s1 = aex * bey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bex * aey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n ab3 = _j + _i;\n bvirt = ab3 - _j;\n ab[2] = _j - (ab3 - bvirt) + (_i - bvirt);\n ab[3] = ab3;\n s1 = bex * cey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cex * bey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n bc3 = _j + _i;\n bvirt = bc3 - _j;\n bc[2] = _j - (bc3 - bvirt) + (_i - bvirt);\n bc[3] = bc3;\n s1 = cex * dey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dex * cey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n cd3 = _j + _i;\n bvirt = cd3 - _j;\n cd[2] = _j - (cd3 - bvirt) + (_i - bvirt);\n cd[3] = cd3;\n s1 = dex * aey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = aex * dey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n da3 = _j + _i;\n bvirt = da3 - _j;\n da[2] = _j - (da3 - bvirt) + (_i - bvirt);\n da[3] = da3;\n s1 = aex * cey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cex * aey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n ac3 = _j + _i;\n bvirt = ac3 - _j;\n ac[2] = _j - (ac3 - bvirt) + (_i - bvirt);\n ac[3] = ac3;\n s1 = bex * dey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dex * bey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n bd3 = _j + _i;\n bvirt = bd3 - _j;\n bd[2] = _j - (bd3 - bvirt) + (_i - bvirt);\n bd[3] = bd3;\n\n const finlen = sum(\n sum(\n negate(liftadapt(bc, cd, bd, dez, bez, -cez, aex, aey, aez, adet), adet), adet,\n liftadapt(cd, da, ac, aez, cez, dez, bex, bey, bez, bdet), bdet, abdet), abdet,\n sum(\n negate(liftadapt(da, ab, bd, bez, dez, aez, cex, cey, cez, cdet), cdet), cdet,\n liftadapt(ab, bc, ac, cez, aez, -bez, dex, dey, dez, ddet), ddet, cddet), cddet, fin);\n\n let det = estimate(finlen, fin);\n let errbound = isperrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - aex;\n aextail = ax - (aex + bvirt) + (bvirt - ex);\n bvirt = ay - aey;\n aeytail = ay - (aey + bvirt) + (bvirt - ey);\n bvirt = az - aez;\n aeztail = az - (aez + bvirt) + (bvirt - ez);\n bvirt = bx - bex;\n bextail = bx - (bex + bvirt) + (bvirt - ex);\n bvirt = by - bey;\n beytail = by - (bey + bvirt) + (bvirt - ey);\n bvirt = bz - bez;\n beztail = bz - (bez + bvirt) + (bvirt - ez);\n bvirt = cx - cex;\n cextail = cx - (cex + bvirt) + (bvirt - ex);\n bvirt = cy - cey;\n ceytail = cy - (cey + bvirt) + (bvirt - ey);\n bvirt = cz - cez;\n ceztail = cz - (cez + bvirt) + (bvirt - ez);\n bvirt = dx - dex;\n dextail = dx - (dex + bvirt) + (bvirt - ex);\n bvirt = dy - dey;\n deytail = dy - (dey + bvirt) + (bvirt - ey);\n bvirt = dz - dez;\n deztail = dz - (dez + bvirt) + (bvirt - ez);\n if (aextail === 0 && aeytail === 0 && aeztail === 0 &&\n bextail === 0 && beytail === 0 && beztail === 0 &&\n cextail === 0 && ceytail === 0 && ceztail === 0 &&\n dextail === 0 && deytail === 0 && deztail === 0) {\n return det;\n }\n\n errbound = isperrboundC * permanent + resulterrbound * Math.abs(det);\n\n const abeps = (aex * beytail + bey * aextail) - (aey * bextail + bex * aeytail);\n const bceps = (bex * ceytail + cey * bextail) - (bey * cextail + cex * beytail);\n const cdeps = (cex * deytail + dey * cextail) - (cey * dextail + dex * ceytail);\n const daeps = (dex * aeytail + aey * dextail) - (dey * aextail + aex * deytail);\n const aceps = (aex * ceytail + cey * aextail) - (aey * cextail + cex * aeytail);\n const bdeps = (bex * deytail + dey * bextail) - (bey * dextail + dex * beytail);\n det +=\n (((bex * bex + bey * bey + bez * bez) * ((cez * daeps + dez * aceps + aez * cdeps) +\n (ceztail * da3 + deztail * ac3 + aeztail * cd3)) + (dex * dex + dey * dey + dez * dez) *\n ((aez * bceps - bez * aceps + cez * abeps) + (aeztail * bc3 - beztail * ac3 + ceztail * ab3))) -\n ((aex * aex + aey * aey + aez * aez) * ((bez * cdeps - cez * bdeps + dez * bceps) +\n (beztail * cd3 - ceztail * bd3 + deztail * bc3)) + (cex * cex + cey * cey + cez * cez) *\n ((dez * abeps + aez * bdeps + bez * daeps) + (deztail * ab3 + aeztail * bd3 + beztail * da3)))) +\n 2 * (((bex * bextail + bey * beytail + bez * beztail) * (cez * da3 + dez * ac3 + aez * cd3) +\n (dex * dextail + dey * deytail + dez * deztail) * (aez * bc3 - bez * ac3 + cez * ab3)) -\n ((aex * aextail + aey * aeytail + aez * aeztail) * (bez * cd3 - cez * bd3 + dez * bc3) +\n (cex * cextail + cey * ceytail + cez * ceztail) * (dez * ab3 + aez * bd3 + bez * da3)));\n\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n return insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez);\n}\n\nexport function insphere(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n const aex = ax - ex;\n const bex = bx - ex;\n const cex = cx - ex;\n const dex = dx - ex;\n const aey = ay - ey;\n const bey = by - ey;\n const cey = cy - ey;\n const dey = dy - ey;\n const aez = az - ez;\n const bez = bz - ez;\n const cez = cz - ez;\n const dez = dz - ez;\n\n const aexbey = aex * bey;\n const bexaey = bex * aey;\n const ab = aexbey - bexaey;\n const bexcey = bex * cey;\n const cexbey = cex * bey;\n const bc = bexcey - cexbey;\n const cexdey = cex * dey;\n const dexcey = dex * cey;\n const cd = cexdey - dexcey;\n const dexaey = dex * aey;\n const aexdey = aex * dey;\n const da = dexaey - aexdey;\n const aexcey = aex * cey;\n const cexaey = cex * aey;\n const ac = aexcey - cexaey;\n const bexdey = bex * dey;\n const dexbey = dex * bey;\n const bd = bexdey - dexbey;\n\n const alift = aex * aex + aey * aey + aez * aez;\n const blift = bex * bex + bey * bey + bez * bez;\n const clift = cex * cex + cey * cey + cez * cez;\n const dlift = dex * dex + dey * dey + dez * dez;\n\n const det =\n (clift * (dez * ab + aez * bd + bez * da) - dlift * (aez * bc - bez * ac + cez * ab)) +\n (alift * (bez * cd - cez * bd + dez * bc) - blift * (cez * da + dez * ac + aez * cd));\n\n const aezplus = Math.abs(aez);\n const bezplus = Math.abs(bez);\n const cezplus = Math.abs(cez);\n const dezplus = Math.abs(dez);\n const aexbeyplus = Math.abs(aexbey) + Math.abs(bexaey);\n const bexceyplus = Math.abs(bexcey) + Math.abs(cexbey);\n const cexdeyplus = Math.abs(cexdey) + Math.abs(dexcey);\n const dexaeyplus = Math.abs(dexaey) + Math.abs(aexdey);\n const aexceyplus = Math.abs(aexcey) + Math.abs(cexaey);\n const bexdeyplus = Math.abs(bexdey) + Math.abs(dexbey);\n const permanent =\n (cexdeyplus * bezplus + bexdeyplus * cezplus + bexceyplus * dezplus) * alift +\n (dexaeyplus * cezplus + aexceyplus * dezplus + cexdeyplus * aezplus) * blift +\n (aexbeyplus * dezplus + bexdeyplus * aezplus + dexaeyplus * bezplus) * clift +\n (bexceyplus * aezplus + aexceyplus * bezplus + aexbeyplus * cezplus) * dlift;\n\n const errbound = isperrboundA * permanent;\n if (det > errbound || -det > errbound) {\n return det;\n }\n return -insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent);\n}\n\nexport function inspherefast(pax, pay, paz, pbx, pby, pbz, pcx, pcy, pcz, pdx, pdy, pdz, pex, pey, pez) {\n const aex = pax - pex;\n const bex = pbx - pex;\n const cex = pcx - pex;\n const dex = pdx - pex;\n const aey = pay - pey;\n const bey = pby - pey;\n const cey = pcy - pey;\n const dey = pdy - pey;\n const aez = paz - pez;\n const bez = pbz - pez;\n const cez = pcz - pez;\n const dez = pdz - pez;\n\n const ab = aex * bey - bex * aey;\n const bc = bex * cey - cex * bey;\n const cd = cex * dey - dex * cey;\n const da = dex * aey - aex * dey;\n const ac = aex * cey - cex * aey;\n const bd = bex * dey - dex * bey;\n\n const abc = aez * bc - bez * ac + cez * ab;\n const bcd = bez * cd - cez * bd + dez * bc;\n const cda = cez * da + dez * ac + aez * cd;\n const dab = dez * ab + aez * bd + bez * da;\n\n const alift = aex * aex + aey * aey + aez * aez;\n const blift = bex * bex + bey * bey + bez * bez;\n const clift = cex * cex + cey * cey + cez * cez;\n const dlift = dex * dex + dey * dey + dez * dez;\n\n return (clift * dab - dlift * abc) + (alift * bcd - blift * cda);\n}\n", "import pip from \"point-in-polygon-hao\";\nimport {\n BBox,\n Feature,\n MultiPolygon,\n Polygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { Coord } from \"@turf/helpers\";\nimport { getCoord, getGeom } from \"@turf/invariant\";\n\n// http://en.wikipedia.org/wiki/Even%E2%80%93odd_rule\n// modified from: https://github.com/substack/point-in-polygon/blob/master/index.js\n// which was modified from http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html\n/**\n * Takes a {@link Point} and a {@link Polygon} or {@link MultiPolygon} and determines if the point\n * resides inside the polygon. The polygon can be convex or concave. The function accounts for holes.\n *\n * @function\n * @param {Coord} point input point\n * @param {Feature} polygon input polygon or multipolygon\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.ignoreBoundary=false] True if polygon boundary should be ignored when determining if\n * the point is inside the polygon otherwise false.\n * @returns {boolean} `true` if the Point is inside the Polygon; `false` if the Point is not inside the Polygon\n * @example\n * var pt = turf.point([-77, 44]);\n * var poly = turf.polygon([[\n * [-81, 41],\n * [-81, 47],\n * [-72, 47],\n * [-72, 41],\n * [-81, 41]\n * ]]);\n *\n * turf.booleanPointInPolygon(pt, poly);\n * //= true\n */\nfunction booleanPointInPolygon<\n G extends Polygon | MultiPolygon,\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n point: Coord,\n polygon: Feature | G,\n options: {\n ignoreBoundary?: boolean;\n } = {}\n) {\n // validation\n if (!point) {\n throw new Error(\"point is required\");\n }\n if (!polygon) {\n throw new Error(\"polygon is required\");\n }\n\n const pt = getCoord(point);\n const geom = getGeom(polygon);\n const type = geom.type;\n const bbox = polygon.bbox;\n let polys: any[] = geom.coordinates;\n\n // Quick elimination if point is not inside bbox\n if (bbox && inBBox(pt, bbox) === false) {\n return false;\n }\n\n if (type === \"Polygon\") {\n polys = [polys];\n }\n let result = false;\n for (var i = 0; i < polys.length; ++i) {\n const polyResult = pip(pt, polys[i]);\n if (polyResult === 0) return options.ignoreBoundary ? false : true;\n else if (polyResult) result = true;\n }\n\n return result;\n}\n\n/**\n * inBBox\n *\n * @private\n * @param {Position} pt point [x,y]\n * @param {BBox} bbox BBox [west, south, east, north]\n * @returns {boolean} true/false if point is inside BBox\n */\nfunction inBBox(pt: number[], bbox: BBox) {\n return (\n bbox[0] <= pt[0] && bbox[1] <= pt[1] && bbox[2] >= pt[0] && bbox[3] >= pt[1]\n );\n}\n\nexport { booleanPointInPolygon };\nexport default booleanPointInPolygon;\n", "export const mbnrGeoJson = {\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"properties\": {},\n \"geometry\": {\n \"coordinates\": [\n [\n [\n 78.0540565157155,\n 16.750355644371382\n ],\n [\n 78.02147549424018,\n 16.72066473405593\n ],\n [\n 78.03026125246384,\n 16.71696749930787\n ],\n [\n 78.0438058450269,\n 16.72191442229257\n ],\n [\n 78.01378723066603,\n 16.729427120762438\n ],\n [\n 78.01192390645633,\n 16.767270033080678\n ],\n [\n 77.98897480599248,\n 16.78383139678816\n ],\n [\n 77.98650506846502,\n 16.779477610410623\n ],\n [\n 77.99211289459566,\n 16.764294442899583\n ],\n [\n 77.9917733766166,\n 16.760247911187193\n ],\n [\n 77.9871626670851,\n 16.762487176781022\n ],\n [\n 77.98216269568468,\n 16.762520539253813\n ],\n [\n 77.9728079653313,\n 16.75895746646411\n ],\n [\n 77.97076993211158,\n 16.749241850772236\n ],\n [\n 77.97290869571145,\n 16.714289841456335\n ],\n [\n 77.98673742913684,\n 16.716189282573396\n ],\n [\n 78.00286970994557,\n 16.718191131206893\n ],\n [\n 78.02757966423519,\n 16.720603921728966\n ],\n [\n 78.01653780770818,\n 16.73184590223127\n ],\n [\n 78.0064695230268,\n 16.760236966033375\n ],\n [\n 78.0148831108591,\n 16.760801801995825\n ],\n [\n 78.01488756695255,\n 16.75827980335133\n ],\n [\n 78.0244311364159,\n 16.744778942163208\n ],\n [\n 78.03342267256608,\n 16.760773251410058\n ],\n [\n 78.05078586709863,\n 16.763902127913653\n ],\n [\n 78.0540565157155,\n 16.750355644371382\n ]\n ]\n ],\n \"type\": \"Polygon\"\n }\n }\n ]\n};", "import { router, publicProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getTagsByStoreId } from '@/src/stores/product-tag-store'\nimport {\n getUserStoreSummaries as getUserStoreSummariesInDb,\n getUserStoreDetail as getUserStoreDetailInDb,\n} from '@/src/dbService'\nimport type {\n UserStoresResponse,\n UserStoreDetail,\n UserStoreSummary,\n} from '@packages/shared'\n\nexport async function scaffoldStores(): Promise {\n const storesData = await getUserStoreSummariesInDb()\n\n /*\n // Old implementation - direct DB queries:\n const storesData = await db\n .select({\n id: storeInfo.id,\n name: storeInfo.name,\n description: storeInfo.description,\n imageUrl: storeInfo.imageUrl,\n productCount: sql`count(${productInfo.id})`.as('productCount'),\n })\n .from(storeInfo)\n .leftJoin(\n productInfo,\n and(eq(productInfo.storeId, storeInfo.id), eq(productInfo.isSuspended, false))\n )\n .groupBy(storeInfo.id);\n */\n\n const storesWithDetails: UserStoreSummary[] = storesData.map((store) => {\n const signedImageUrl = store.imageUrl ? scaffoldAssetUrl(store.imageUrl) : null\n const sampleProducts = store.sampleProducts.map((product) => ({\n id: product.id,\n name: product.name,\n signedImageUrl: product.images && product.images.length > 0\n ? scaffoldAssetUrl(product.images[0])\n : null,\n }))\n\n return {\n id: store.id,\n name: store.name,\n description: store.description,\n signedImageUrl,\n productCount: store.productCount,\n sampleProducts,\n }\n })\n\n return {\n stores: storesWithDetails,\n }\n}\n\nexport async function scaffoldStoreWithProducts(storeId: number): Promise {\n const storeDetail = await getUserStoreDetailInDb(storeId)\n\n /*\n // Old implementation - direct DB queries:\n const storeData = await db.query.storeInfo.findFirst({\n where: eq(storeInfo.id, storeId),\n columns: {\n id: true,\n name: true,\n description: true,\n imageUrl: true,\n },\n });\n\n if (!storeData) {\n throw new ApiError('Store not found', 404);\n }\n\n const signedImageUrl = storeData.imageUrl ? scaffoldAssetUrl(storeData.imageUrl) : null;\n\n const productsData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n incrementStep: productInfo.incrementStep,\n unitShortNotation: units.shortNotation,\n unitNotation: units.shortNotation,\n productQuantity: productInfo.productQuantity,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(and(eq(productInfo.storeId, storeId), eq(productInfo.isSuspended, false)));\n\n const productsWithSignedUrls = await Promise.all(\n productsData.map(async (product) => ({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n marketPrice: product.marketPrice,\n incrementStep: product.incrementStep,\n unit: product.unitShortNotation,\n unitNotation: product.unitNotation,\n images: scaffoldAssetUrl((product.images as string[]) || []),\n isOutOfStock: product.isOutOfStock,\n productQuantity: product.productQuantity\n }))\n );\n\n const tags = await getTagsByStoreId(storeId);\n\n return {\n store: {\n id: storeData.id,\n name: storeData.name,\n description: storeData.description,\n signedImageUrl,\n },\n products: productsWithSignedUrls,\n tags: tags.map(tag => ({\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription,\n imageUrl: tag.imageUrl,\n productIds: tag.productIds,\n })),\n };\n */\n\n if (!storeDetail) {\n throw new ApiError('Store not found', 404)\n }\n\n const signedImageUrl = storeDetail.store.imageUrl\n ? scaffoldAssetUrl(storeDetail.store.imageUrl)\n : null\n\n const productsWithSignedUrls = storeDetail.products.map((product) => ({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n marketPrice: product.marketPrice,\n incrementStep: product.incrementStep,\n unit: product.unit,\n unitNotation: product.unitNotation,\n images: scaffoldAssetUrl(product.images || []),\n isOutOfStock: product.isOutOfStock,\n productQuantity: product.productQuantity,\n }))\n\n const tags = await getTagsByStoreId(storeId)\n\n return {\n store: {\n id: storeDetail.store.id,\n name: storeDetail.store.name,\n description: storeDetail.store.description,\n signedImageUrl,\n },\n products: productsWithSignedUrls,\n tags: tags.map(tag => ({\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription,\n imageUrl: tag.imageUrl,\n productIds: tag.productIds,\n })),\n }\n}\n\nexport const storesRouter = router({\n getStores: publicProcedure\n .query(async (): Promise => {\n const response = await scaffoldStores();\n return response;\n }),\n\n getStoreWithProducts: publicProcedure\n .input(z.object({\n storeId: z.number(),\n }))\n .query(async ({ input }): Promise => {\n const { storeId } = input;\n const response = await scaffoldStoreWithProducts(storeId);\n return response;\n }),\n});\n", "import { router, publicProcedure } from \"@/src/trpc/trpc-index\"\nimport { z } from \"zod\"\nimport { getAllSlots as getAllSlotsFromCache, getSlotById as getSlotByIdFromCache } from \"@/src/stores/slot-store\"\nimport dayjs from 'dayjs'\nimport { getUserActiveSlotsList as getUserActiveSlotsListInDb, getUserProductAvailability as getUserProductAvailabilityInDb } from '@/src/dbService'\nimport type { UserSlotData, UserSlotsListResponse, UserSlotsWithProductsResponse } from '@packages/shared'\n\n// Helper method to get formatted slot data by ID\nasync function getSlotData(slotId: number) {\n const slot = await getSlotByIdFromCache(slotId);\n\n if (!slot) {\n return null;\n }\n\n const currentTime = new Date();\n if (dayjs(slot.freezeTime).isBefore(currentTime)) {\n return null;\n }\n\n return {\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n slotId: slot.id,\n products: slot.products.filter((product) => !product.isOutOfStock),\n };\n}\n\nexport async function scaffoldSlotsWithProducts(): Promise {\n const allSlots = await getAllSlotsFromCache();\n const currentTime = new Date();\n const validSlots = allSlots\n .filter((slot) => {\n return dayjs(slot.freezeTime).isAfter(currentTime) &&\n dayjs(slot.deliveryTime).isAfter(currentTime) &&\n !slot.isCapacityFull;\n })\n .sort((a, b) => dayjs(a.deliveryTime).valueOf() - dayjs(b.deliveryTime).valueOf());\n\n const productAvailability = await getUserProductAvailabilityInDb()\n\n /*\n // Old implementation - direct DB query:\n const allProducts = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n isOutOfStock: productInfo.isOutOfStock,\n isFlashAvailable: productInfo.isFlashAvailable,\n })\n .from(productInfo)\n .where(eq(productInfo.isSuspended, false));\n\n const productAvailability = allProducts.map(product => ({\n id: product.id,\n name: product.name,\n isOutOfStock: product.isOutOfStock,\n isFlashAvailable: product.isFlashAvailable,\n }));\n */\n\n return {\n slots: validSlots,\n productAvailability,\n count: validSlots.length,\n };\n}\n\nexport const slotsRouter = router({\n getSlots: publicProcedure.query(async (): Promise => {\n const slots = await getUserActiveSlotsListInDb()\n\n /*\n // Old implementation - direct DB query:\n const slots = await db.query.deliverySlotInfo.findMany({\n where: eq(deliverySlotInfo.isActive, true),\n });\n */\n\n return {\n slots,\n count: slots.length,\n }\n }),\n\n getSlotsWithProducts: publicProcedure.query(async (): Promise => {\n const response = await scaffoldSlotsWithProducts();\n return response;\n }),\n\n getSlotById: publicProcedure\n .input(z.object({ slotId: z.number() }))\n .query(async ({ input }): Promise => {\n return await getSlotData(input.slotId);\n }),\n});\n", "import { publicProcedure, router } from '@/src/trpc/trpc-index'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport { getUserActiveBanners as getUserActiveBannersInDb } from '@/src/dbService'\nimport type { UserBannersResponse } from '@packages/shared'\n\nexport async function scaffoldBanners(): Promise {\n const banners = await getUserActiveBannersInDb()\n\n /*\n // Old implementation - direct DB queries:\n const banners = await db.query.homeBanners.findMany({\n where: isNotNull(homeBanners.serialNum), // Only show assigned banners\n orderBy: asc(homeBanners.serialNum), // Order by slot number 1-4\n });\n */\n\n const bannersWithSignedUrls = banners.map((banner) => ({\n ...banner,\n imageUrl: banner.imageUrl ? scaffoldAssetUrl(banner.imageUrl) : banner.imageUrl,\n }))\n\n return {\n banners: bannersWithSignedUrls,\n }\n}\n\nexport const bannerRouter = router({\n getBanners: publicProcedure\n .query(async () => {\n const response = await scaffoldBanners();\n return response;\n }),\n});\n", "export const CACHE_FILENAMES = {\n products: 'products.json',\n stores: 'stores.json',\n slots: 'slots.json',\n essentialConsts: 'essential-consts.json',\n banners: 'banners.json',\n} as const\n\nexport type CacheFilename = typeof CACHE_FILENAMES[keyof typeof CACHE_FILENAMES]\n\n// Re-export all types from the types folder\nexport * from './types'\n", "// Central types export file\n// Re-export all types from the types folder\n\nexport type * from './admin';\nexport type * from './user';\nexport type * from './store.types';\n", "export async function retryWithExponentialBackoff(\n fn: () => Promise,\n maxRetries: number = 3,\n delayMs: number = 1000\n): Promise {\n let lastError: Error | undefined\n \n for (let attempt = 1; attempt <= maxRetries; attempt++) {\n try {\n return await fn()\n } catch (error) {\n lastError = error instanceof Error ? error : new Error(String(error))\n \n if (attempt < maxRetries) {\n console.log(`Attempt ${attempt} failed, retrying in ${delayMs}ms...`)\n await new Promise(resolve => setTimeout(resolve, delayMs))\n delayMs *= 2\n }\n }\n }\n \n throw lastError\n}", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport { generateSignedUrlsFromS3Urls, generateSignedUrlFromS3Url, claimUploadUrl, extractKeyFromPresignedUrl, deleteImageUtil } from '@/src/lib/s3-client'\nimport { scheduleStoreInitialization } from '@/src/stores/store-initializer'\nimport {\n getAllProducts as getAllProductsInDb,\n getProductById as getProductByIdInDb,\n deleteProduct as deleteProductInDb,\n toggleProductOutOfStock as toggleProductOutOfStockInDb,\n updateSlotProducts as updateSlotProductsInDb,\n getSlotProductIds as getSlotProductIdsInDb,\n getSlotsProductIds as getSlotsProductIdsInDb,\n getProductReviews as getProductReviewsInDb,\n respondToReview as respondToReviewInDb,\n getAllProductGroups as getAllProductGroupsInDb,\n createProductGroup as createProductGroupInDb,\n updateProductGroup as updateProductGroupInDb,\n deleteProductGroup as deleteProductGroupInDb,\n updateProductPrices as updateProductPricesInDb,\n checkProductExistsByName,\n checkUnitExists,\n createProduct as createProductInDb,\n createSpecialDealsForProduct,\n replaceProductTags,\n getProductImagesById,\n updateProduct as updateProductInDb,\n updateProductDeals,\n checkProductTagExistsByName,\n createProductTag as createProductTagInDb,\n updateProductTag as updateProductTagInDb,\n deleteProductTag as deleteProductTagInDb,\n getAllProductTagInfos as getAllProductTagInfosInDb,\n getProductTagInfoById as getProductTagInfoByIdInDb,\n} from '@/src/dbService'\nimport type {\n AdminProduct,\n AdminSpecialDeal,\n AdminProductGroupsResult,\n AdminProductGroupResponse,\n AdminProductReviewsResult,\n AdminProductReviewResponse,\n AdminProductListResponse,\n AdminProductResponse,\n AdminDeleteProductResult,\n AdminToggleOutOfStockResult,\n AdminUpdateSlotProductsResult,\n AdminSlotProductIdsResult,\n AdminSlotsProductIdsResult,\n AdminUpdateProductPricesResult,\n} from '@packages/shared'\n\n\nexport const productRouter = router({\n getProducts: protectedProcedure\n .query(async (): Promise => {\n const products = await getAllProductsInDb()\n\n /*\n // Old implementation - direct DB query:\n const products = await db.query.productInfo.findMany({\n orderBy: productInfo.name,\n with: {\n unit: true,\n store: true,\n },\n });\n */\n\n const productsWithSignedUrls = await Promise.all(\n products.map(async (product) => ({\n ...product,\n images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),\n }))\n )\n\n return {\n products: productsWithSignedUrls,\n count: productsWithSignedUrls.length,\n }\n }),\n\n getProductById: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .query(async ({ input }): Promise => {\n const { id } = input;\n\n const product = await getProductByIdInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, id),\n with: {\n unit: true,\n },\n });\n\n if (!product) {\n throw new ApiError(\"Product not found\", 404);\n }\n\n // Fetch special deals for this product\n const deals = await db.query.specialDeals.findMany({\n where: eq(specialDeals.productId, id),\n orderBy: specialDeals.quantity,\n });\n\n // Fetch associated tags for this product\n const productTagsData = await db.query.productTags.findMany({\n where: eq(productTags.productId, id),\n with: {\n tag: true,\n },\n });\n\n // Generate signed URLs for product images\n const productWithSignedUrls = {\n ...product,\n images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),\n deals,\n tags: productTagsData.map(pt => pt.tag),\n };\n\n return {\n product: productWithSignedUrls,\n };\n */\n\n if (!product) {\n throw new ApiError('Product not found', 404)\n }\n\n const productWithSignedUrls = {\n ...product,\n images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),\n }\n\n return {\n product: productWithSignedUrls,\n }\n }),\n\n deleteProduct: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .mutation(async ({ input }): Promise => {\n const { id } = input;\n\n const deletedProduct = await deleteProductInDb(id)\n\n /*\n // Old implementation - direct DB query:\n const [deletedProduct] = await db\n .delete(productInfo)\n .where(eq(productInfo.id, id))\n .returning();\n\n if (!deletedProduct) {\n throw new ApiError(\"Product not found\", 404);\n }\n */\n\n if (!deletedProduct) {\n throw new ApiError('Product not found', 404)\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: 'Product deleted successfully',\n }\n }),\n\n toggleOutOfStock: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .mutation(async ({ input }): Promise => {\n const { id } = input;\n\n const updatedProduct = await toggleProductOutOfStockInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, id),\n });\n\n if (!product) {\n throw new ApiError(\"Product not found\", 404);\n }\n\n const [updatedProduct] = await db\n .update(productInfo)\n .set({\n isOutOfStock: !product.isOutOfStock,\n })\n .where(eq(productInfo.id, id))\n .returning();\n */\n\n if (!updatedProduct) {\n throw new ApiError('Product not found', 404)\n }\n\n scheduleStoreInitialization()\n\n return {\n product: updatedProduct,\n message: `Product marked as ${updatedProduct.isOutOfStock ? 'out of stock' : 'in stock'}`,\n }\n }),\n\n createProduct: protectedProcedure\n .input(z.object({\n name: z.string().min(1, 'Name is required'),\n shortDescription: z.string().optional(),\n longDescription: z.string().optional(),\n unitId: z.number().min(1, 'Unit is required'),\n storeId: z.number().min(1, 'Store is required'),\n price: z.number().positive('Price must be positive'),\n marketPrice: z.number().optional(),\n incrementStep: z.number().optional().default(1),\n productQuantity: z.number().optional().default(1),\n isSuspended: z.boolean().optional().default(false),\n isFlashAvailable: z.boolean().optional().default(false),\n flashPrice: z.number().optional(),\n uploadUrls: z.array(z.string()).optional().default([]),\n deals: z.array(z.object({\n quantity: z.number(),\n price: z.number(),\n validTill: z.string(),\n })).optional(),\n tagIds: z.array(z.number()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise<{ product: AdminProduct; deals: AdminSpecialDeal[]; message: string }> => {\n const { name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, uploadUrls, deals, tagIds } = input\n\n const existingProduct = await checkProductExistsByName(name.trim())\n if (existingProduct) {\n throw new ApiError('A product with this name already exists', 400)\n }\n\n const unitExists = await checkUnitExists(unitId)\n if (!unitExists) {\n throw new ApiError('Invalid unit ID', 400)\n }\n\n const imageKeys = uploadUrls.map(url => extractKeyFromPresignedUrl(url))\n\n const newProduct = await createProductInDb({\n name,\n shortDescription,\n longDescription,\n unitId,\n storeId,\n price: price.toString(),\n marketPrice: marketPrice?.toString(),\n incrementStep,\n productQuantity,\n isSuspended,\n isFlashAvailable,\n flashPrice: flashPrice?.toString(),\n images: imageKeys,\n })\n\n let createdDeals: AdminSpecialDeal[] = []\n if (deals && deals.length > 0) {\n createdDeals = await createSpecialDealsForProduct(newProduct.id, deals)\n }\n\n if (tagIds.length > 0) {\n await replaceProductTags(newProduct.id, tagIds)\n }\n\n if (uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)))\n }\n\n scheduleStoreInitialization()\n\n return {\n product: newProduct,\n deals: createdDeals,\n message: 'Product created successfully',\n }\n }),\n\n updateProduct: protectedProcedure\n .input(z.object({\n id: z.number(),\n name: z.string().min(1, 'Name is required'),\n shortDescription: z.string().optional(),\n longDescription: z.string().optional(),\n unitId: z.number().min(1, 'Unit is required'),\n storeId: z.number().min(1, 'Store is required'),\n price: z.number().positive('Price must be positive'),\n marketPrice: z.number().optional(),\n incrementStep: z.number().optional().default(1),\n productQuantity: z.number().optional().default(1),\n isSuspended: z.boolean().optional().default(false),\n isFlashAvailable: z.boolean().optional().default(false),\n flashPrice: z.number().nullable().optional(),\n uploadUrls: z.array(z.string()).optional().default([]),\n imagesToDelete: z.array(z.string()).optional().default([]),\n deals: z.array(z.object({\n quantity: z.number(),\n price: z.number(),\n validTill: z.string(),\n })).optional(),\n tagIds: z.array(z.number()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise<{ product: AdminProduct; message: string }> => {\n const { id, name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, uploadUrls, imagesToDelete, deals, tagIds } = input\n\n const unitExists = await checkUnitExists(unitId)\n if (!unitExists) {\n throw new ApiError('Invalid unit ID', 400)\n }\n\n const currentImages = await getProductImagesById(id)\n if (!currentImages) {\n throw new ApiError('Product not found', 404)\n }\n\n let updatedImages = currentImages || []\n if (imagesToDelete.length > 0) {\n const imagesToRemove = updatedImages.filter(img => imagesToDelete.includes(img))\n await deleteImageUtil({ keys: imagesToRemove })\n updatedImages = updatedImages.filter(img => !imagesToRemove.includes(img))\n }\n\n const newImageKeys = uploadUrls.map(url => extractKeyFromPresignedUrl(url))\n const finalImages = [...updatedImages, ...newImageKeys]\n\n const updatedProduct = await updateProductInDb(id, {\n name,\n shortDescription,\n longDescription,\n unitId,\n storeId,\n price: price.toString(),\n marketPrice: marketPrice?.toString(),\n incrementStep,\n productQuantity,\n isSuspended,\n isFlashAvailable,\n flashPrice: flashPrice?.toString() ?? null,\n images: finalImages,\n })\n\n if (!updatedProduct) {\n throw new ApiError('Product not found', 404)\n }\n\n if (deals && deals.length > 0) {\n await updateProductDeals(id, deals)\n }\n\n if (tagIds.length > 0) {\n await replaceProductTags(id, tagIds)\n }\n\n if (uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)))\n }\n\n scheduleStoreInitialization()\n\n return {\n product: updatedProduct,\n message: 'Product updated successfully',\n }\n }),\n\n updateSlotProducts: protectedProcedure\n .input(z.object({\n slotId: z.string(),\n productIds: z.array(z.string()),\n }))\n .mutation(async ({ input }): Promise => {\n const { slotId, productIds } = input;\n\n if (!Array.isArray(productIds)) {\n throw new ApiError(\"productIds must be an array\", 400);\n }\n\n const result = await updateSlotProductsInDb(slotId, productIds)\n\n /*\n // Old implementation - direct DB queries:\n // Get current associations\n const currentAssociations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, parseInt(slotId)),\n columns: {\n productId: true,\n },\n });\n\n const currentProductIds = currentAssociations.map(assoc => assoc.productId);\n const newProductIds = productIds.map((id: string) => parseInt(id));\n\n // Find products to add and remove\n const productsToAdd = newProductIds.filter(id => !currentProductIds.includes(id));\n const productsToRemove = currentProductIds.filter(id => !newProductIds.includes(id));\n\n // Remove associations for products that are no longer selected\n if (productsToRemove.length > 0) {\n await db.delete(productSlots).where(\n and(\n eq(productSlots.slotId, parseInt(slotId)),\n inArray(productSlots.productId, productsToRemove)\n )\n );\n }\n\n // Add associations for newly selected products\n if (productsToAdd.length > 0) {\n const newAssociations = productsToAdd.map(productId => ({\n productId,\n slotId: parseInt(slotId),\n }));\n\n await db.insert(productSlots).values(newAssociations);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: \"Slot products updated successfully\",\n added: productsToAdd.length,\n removed: productsToRemove.length,\n };\n */\n\n scheduleStoreInitialization()\n\n return {\n message: 'Slot products updated successfully',\n added: result.added,\n removed: result.removed,\n }\n }),\n\n getSlotProductIds: protectedProcedure\n .input(z.object({\n slotId: z.string(),\n }))\n .query(async ({ input }): Promise => {\n const { slotId } = input;\n\n const productIds = await getSlotProductIdsInDb(slotId)\n\n /*\n // Old implementation - direct DB queries:\n const associations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, parseInt(slotId)),\n columns: {\n productId: true,\n },\n });\n\n const productIds = associations.map(assoc => assoc.productId);\n\n return {\n productIds,\n };\n */\n\n return {\n productIds,\n }\n }),\n\n getSlotsProductIds: protectedProcedure\n .input(z.object({\n slotIds: z.array(z.number()),\n }))\n .query(async ({ input }): Promise => {\n const { slotIds } = input;\n\n if (!Array.isArray(slotIds)) {\n throw new ApiError(\"slotIds must be an array\", 400);\n }\n\n const result = await getSlotsProductIdsInDb(slotIds)\n\n /*\n // Old implementation - direct DB queries:\n if (slotIds.length === 0) {\n return {};\n }\n\n // Fetch all associations for the requested slots\n const associations = await db.query.productSlots.findMany({\n where: inArray(productSlots.slotId, slotIds),\n columns: {\n slotId: true,\n productId: true,\n },\n });\n\n // Group by slotId\n const result = associations.reduce((acc, assoc) => {\n if (!acc[assoc.slotId]) {\n acc[assoc.slotId] = [];\n }\n acc[assoc.slotId].push(assoc.productId);\n return acc;\n }, {} as Record);\n\n // Ensure all requested slots have entries (even if empty)\n slotIds.forEach(slotId => {\n if (!result[slotId]) {\n result[slotId] = [];\n }\n });\n\n return result;\n */\n\n return result\n }),\n\n getProductReviews: protectedProcedure\n .input(z.object({\n productId: z.number().int().positive(),\n limit: z.number().int().min(1).max(50).optional().default(10),\n offset: z.number().int().min(0).optional().default(0),\n }))\n .query(async ({ input }): Promise => {\n const { productId, limit, offset } = input;\n\n const { reviews, totalCount } = await getProductReviewsInDb(productId, limit, offset)\n\n /*\n // Old implementation - direct DB queries:\n const reviews = await db\n .select({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n adminResponse: productReviews.adminResponse,\n adminResponseImages: productReviews.adminResponseImages,\n userName: users.name,\n })\n .from(productReviews)\n .innerJoin(users, eq(productReviews.userId, users.id))\n .where(eq(productReviews.productId, productId))\n .orderBy(desc(productReviews.reviewTime))\n .limit(limit)\n .offset(offset);\n\n // Generate signed URLs for images\n const reviewsWithSignedUrls = await Promise.all(\n reviews.map(async (review) => ({\n ...review,\n signedImageUrls: await generateSignedUrlsFromS3Urls((review.imageUrls as string[]) || []),\n signedAdminImageUrls: await generateSignedUrlsFromS3Urls((review.adminResponseImages as string[]) || []),\n }))\n );\n\n // Check if more reviews exist\n const totalCountResult = await db\n .select({ count: sql`count(*)` })\n .from(productReviews)\n .where(eq(productReviews.productId, productId));\n\n const totalCount = Number(totalCountResult[0].count);\n const hasMore = offset + limit < totalCount;\n\n return { reviews: reviewsWithSignedUrls, hasMore };\n */\n\n const reviewsWithSignedUrls = await Promise.all(\n reviews.map(async (review) => ({\n ...review,\n signedImageUrls: await generateSignedUrlsFromS3Urls((review.imageUrls as string[]) || []),\n signedAdminImageUrls: await generateSignedUrlsFromS3Urls((review.adminResponseImages as string[]) || []),\n }))\n )\n\n const hasMore = offset + limit < totalCount\n\n return { reviews: reviewsWithSignedUrls, hasMore }\n }),\n\n respondToReview: protectedProcedure\n .input(z.object({\n reviewId: z.number().int().positive(),\n adminResponse: z.string().optional(),\n adminResponseImages: z.array(z.string()).optional().default([]),\n uploadUrls: z.array(z.string()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise => {\n const { reviewId, adminResponse, adminResponseImages, uploadUrls } = input;\n\n const updatedReview = await respondToReviewInDb(reviewId, adminResponse, adminResponseImages)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedReview] = await db\n .update(productReviews)\n .set({\n adminResponse,\n adminResponseImages,\n })\n .where(eq(productReviews.id, reviewId))\n .returning();\n\n if (!updatedReview) {\n throw new ApiError('Review not found', 404);\n }\n\n // Claim upload URLs\n if (uploadUrls && uploadUrls.length > 0) {\n // const { claimUploadUrl } = await import('@/src/lib/s3-client');\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)));\n }\n\n return { success: true, review: updatedReview };\n */\n\n if (!updatedReview) {\n throw new ApiError('Review not found', 404)\n }\n\n if (uploadUrls && uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)))\n }\n\n return { success: true, review: updatedReview }\n }),\n\n getGroups: protectedProcedure\n .query(async (): Promise => {\n const groups = await getAllProductGroupsInDb()\n\n /*\n // Old implementation - direct DB queries:\n const groups = await db.query.productGroupInfo.findMany({\n with: {\n memberships: {\n with: {\n product: true,\n },\n },\n },\n orderBy: desc(productGroupInfo.createdAt),\n });\n */\n\n return {\n groups: groups.map(group => ({\n ...group,\n products: group.memberships.map((m: any) => ({\n ...(m.product as AdminProduct),\n images: (m.product.images as string[]) || null,\n })),\n productCount: group.memberships.length,\n })),\n }\n }),\n\n createGroup: protectedProcedure\n .input(z.object({\n group_name: z.string().min(1),\n description: z.string().optional(),\n product_ids: z.array(z.number()).default([]),\n }))\n .mutation(async ({ input }): Promise => {\n const { group_name, description, product_ids } = input;\n\n const newGroup = await createProductGroupInDb(group_name, description, product_ids)\n\n /*\n // Old implementation - direct DB queries:\n const [newGroup] = await db\n .insert(productGroupInfo)\n .values({\n groupName: group_name,\n description,\n })\n .returning();\n\n if (product_ids.length > 0) {\n const memberships = product_ids.map(productId => ({\n productId,\n groupId: newGroup.id,\n }));\n\n await db.insert(productGroupMembership).values(memberships);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n group: newGroup,\n message: 'Group created successfully',\n };\n */\n\n scheduleStoreInitialization()\n\n return {\n group: newGroup,\n message: 'Group created successfully',\n }\n }),\n\n updateGroup: protectedProcedure\n .input(z.object({\n id: z.number(),\n group_name: z.string().optional(),\n description: z.string().optional(),\n product_ids: z.array(z.number()).optional(),\n }))\n .mutation(async ({ input }): Promise => {\n const { id, group_name, description, product_ids } = input;\n\n const updatedGroup = await updateProductGroupInDb(id, group_name, description, product_ids)\n\n /*\n // Old implementation - direct DB queries:\n const updateData: any = {};\n if (group_name !== undefined) updateData.groupName = group_name;\n if (description !== undefined) updateData.description = description;\n\n const [updatedGroup] = await db\n .update(productGroupInfo)\n .set(updateData)\n .where(eq(productGroupInfo.id, id))\n .returning();\n\n if (!updatedGroup) {\n throw new ApiError('Group not found', 404);\n }\n\n if (product_ids !== undefined) {\n // Delete existing memberships\n await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id));\n\n // Insert new memberships\n if (product_ids.length > 0) {\n const memberships = product_ids.map(productId => ({\n productId,\n groupId: id,\n }));\n\n await db.insert(productGroupMembership).values(memberships);\n }\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n group: updatedGroup,\n message: 'Group updated successfully',\n };\n */\n\n if (!updatedGroup) {\n throw new ApiError('Group not found', 404)\n }\n\n scheduleStoreInitialization()\n\n return {\n group: updatedGroup,\n message: 'Group updated successfully',\n }\n }),\n\n deleteGroup: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .mutation(async ({ input }): Promise => {\n const { id } = input;\n\n const deletedGroup = await deleteProductGroupInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n // Delete memberships first\n await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id));\n\n // Delete group\n const [deletedGroup] = await db\n .delete(productGroupInfo)\n .where(eq(productGroupInfo.id, id))\n .returning();\n\n if (!deletedGroup) {\n throw new ApiError('Group not found', 404);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: 'Group deleted successfully',\n };\n */\n\n if (!deletedGroup) {\n throw new ApiError('Group not found', 404)\n }\n\n scheduleStoreInitialization()\n\n return {\n message: 'Group deleted successfully',\n }\n }),\n\n updateProductPrices: protectedProcedure\n .input(z.object({\n updates: z.array(z.object({\n productId: z.number(),\n price: z.number().optional(),\n marketPrice: z.number().nullable().optional(),\n flashPrice: z.number().nullable().optional(),\n isFlashAvailable: z.boolean().optional(),\n })),\n }))\n .mutation(async ({ input }): Promise => {\n const { updates } = input;\n\n if (updates.length === 0) {\n throw new ApiError('No updates provided', 400)\n }\n\n const result = await updateProductPricesInDb(updates)\n\n /*\n // Old implementation - direct DB queries:\n if (updates.length === 0) {\n throw new ApiError('No updates provided', 400);\n }\n\n // Validate that all productIds exist\n const productIds = updates.map(u => u.productId);\n const existingProducts = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, productIds),\n columns: { id: true },\n });\n\n const existingIds = new Set(existingProducts.map(p => p.id));\n const invalidIds = productIds.filter(id => !existingIds.has(id));\n\n if (invalidIds.length > 0) {\n throw new ApiError(`Invalid product IDs: ${invalidIds.join(', ')}`, 400);\n }\n\n // Perform batch update\n const updatePromises = updates.map(async (update) => {\n const { productId, price, marketPrice, flashPrice, isFlashAvailable } = update;\n const updateData: any = {};\n if (price !== undefined) updateData.price = price;\n if (marketPrice !== undefined) updateData.marketPrice = marketPrice;\n if (flashPrice !== undefined) updateData.flashPrice = flashPrice;\n if (isFlashAvailable !== undefined) updateData.isFlashAvailable = isFlashAvailable;\n\n return db\n .update(productInfo)\n .set(updateData)\n .where(eq(productInfo.id, productId));\n });\n\n await Promise.all(updatePromises);\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: `Updated prices for ${updates.length} product(s)`,\n updatedCount: updates.length,\n };\n */\n\n if (result.invalidIds.length > 0) {\n throw new ApiError(`Invalid product IDs: ${result.invalidIds.join(', ')}`, 400)\n }\n\n scheduleStoreInitialization()\n\n return {\n message: `Updated prices for ${result.updatedCount} product(s)`,\n updatedCount: result.updatedCount,\n }\n }),\n\n getProductTags: protectedProcedure\n .query(async (): Promise<{ tags: Array<{ id: number; tagName: string; tagDescription: string | null; imageUrl: string | null; isDashboardTag: boolean; relatedStores: unknown; createdAt: Date }>; message: string }> => {\n const tags = await getAllProductTagInfosInDb()\n\n const tagsWithSignedUrls = await Promise.all(\n tags.map(async (tag) => ({\n ...tag,\n imageUrl: tag.imageUrl ? await generateSignedUrlFromS3Url(tag.imageUrl) : null,\n }))\n )\n\n return {\n tags: tagsWithSignedUrls,\n message: 'Tags retrieved successfully',\n }\n }),\n\n getProductTagById: protectedProcedure\n .input(z.object({ id: z.number() }))\n .query(async ({ input }): Promise<{ tag: { id: number; tagName: string; tagDescription: string | null; imageUrl: string | null; isDashboardTag: boolean; relatedStores: unknown; createdAt: Date }; message: string }> => {\n const tag = await getProductTagInfoByIdInDb(input.id)\n\n if (!tag) {\n throw new ApiError('Tag not found', 404)\n }\n\n const tagWithSignedUrl = {\n ...tag,\n imageUrl: tag.imageUrl ? await generateSignedUrlFromS3Url(tag.imageUrl) : null,\n }\n\n return {\n tag: tagWithSignedUrl,\n message: 'Tag retrieved successfully',\n }\n }),\n\n createProductTag: protectedProcedure\n .input(z.object({\n tagName: z.string().min(1, 'Tag name is required'),\n tagDescription: z.string().optional(),\n imageUrl: z.string().optional().nullable(),\n isDashboardTag: z.boolean().optional().default(false),\n relatedStores: z.array(z.number()).optional().default([]),\n uploadUrls: z.array(z.string()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise<{ tag: { id: number; tagName: string; tagDescription: string | null; imageUrl: string | null; isDashboardTag: boolean; relatedStores: unknown; createdAt: Date }; message: string }> => {\n const { tagName, tagDescription, imageUrl, isDashboardTag, relatedStores, uploadUrls } = input\n\n const existingTag = await checkProductTagExistsByName(tagName.trim())\n if (existingTag) {\n throw new ApiError('A tag with this name already exists', 400)\n }\n\n const createdTag = await createProductTagInDb({\n tagName: tagName.trim(),\n tagDescription,\n imageUrl: imageUrl ?? null,\n isDashboardTag,\n relatedStores,\n })\n\n if (uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map((url) => claimUploadUrl(url)))\n }\n\n scheduleStoreInitialization()\n\n const { products, ...createdTagInfo } = createdTag\n\n return {\n tag: {\n ...createdTagInfo,\n imageUrl: createdTagInfo.imageUrl ? await generateSignedUrlFromS3Url(createdTagInfo.imageUrl) : null,\n },\n message: 'Tag created successfully',\n }\n }),\n\n updateProductTag: protectedProcedure\n .input(z.object({\n id: z.number(),\n tagName: z.string().min(1).optional(),\n tagDescription: z.string().optional().nullable(),\n imageUrl: z.string().optional().nullable(),\n isDashboardTag: z.boolean().optional(),\n relatedStores: z.array(z.number()).optional(),\n uploadUrls: z.array(z.string()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise<{ tag: { id: number; tagName: string; tagDescription: string | null; imageUrl: string | null; isDashboardTag: boolean; relatedStores: unknown; createdAt: Date }; message: string }> => {\n const { id, tagName, tagDescription, imageUrl, isDashboardTag, relatedStores, uploadUrls } = input\n\n const currentTag = await getProductTagInfoByIdInDb(id)\n\n if (!currentTag) {\n throw new ApiError('Tag not found', 404)\n }\n\n if (imageUrl !== undefined && imageUrl !== currentTag.imageUrl) {\n if (currentTag.imageUrl) {\n await deleteImageUtil({ keys: [currentTag.imageUrl] })\n }\n }\n\n const updatedTag = await updateProductTagInDb(id, {\n tagName: tagName?.trim(),\n tagDescription: tagDescription ?? undefined,\n imageUrl: imageUrl ?? undefined,\n isDashboardTag,\n relatedStores,\n })\n\n if (uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map((url) => claimUploadUrl(url)))\n }\n\n scheduleStoreInitialization()\n\n const { products, ...updatedTagInfo } = updatedTag\n\n return {\n tag: {\n ...updatedTagInfo,\n imageUrl: updatedTagInfo.imageUrl ? await generateSignedUrlFromS3Url(updatedTagInfo.imageUrl) : null,\n },\n message: 'Tag updated successfully',\n }\n }),\n\n deleteProductTag: protectedProcedure\n .input(z.object({ id: z.number() }))\n .mutation(async ({ input }): Promise<{ message: string }> => {\n const tag = await getProductTagInfoByIdInDb(input.id)\n\n if (!tag) {\n throw new ApiError('Tag not found', 404)\n }\n\n if (tag.imageUrl) {\n await deleteImageUtil({ keys: [tag.imageUrl] })\n }\n\n await deleteProductTagInDb(input.id)\n\n scheduleStoreInitialization()\n\n return { message: 'Tag deleted successfully' }\n }),\n });\n", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport bcrypt from 'bcryptjs';\nimport { SignJWT } from 'jose';\nimport { encodedJwtSecret } from '@/src/lib/env-exporter';\nimport { ApiError } from '@/src/lib/api-error'\nimport {\n getStaffUserByName,\n getAllStaff,\n getAllUsers,\n getUserWithDetails,\n upsertUserSuspension,\n checkStaffUserExists,\n checkStaffRoleExists,\n createStaffUser,\n getAllRoles,\n} from '@/src/dbService'\nimport type { StaffUser, StaffRole } from '@packages/shared'\n\nexport const staffUserRouter = router({\n login: publicProcedure\n .input(z.object({\n name: z.string(),\n password: z.string(),\n }))\n .mutation(async ({ input }) => {\n const { name, password } = input;\n\n if (!name || !password) {\n throw new ApiError('Name and password are required', 400);\n }\n\n const staff = await getStaffUserByName(name);\n\n if (!staff) {\n throw new ApiError('Invalid credentials', 401);\n }\n\n const isPasswordValid = await bcrypt.compare(password, staff.password);\n if (!isPasswordValid) {\n throw new ApiError('Invalid credentials', 401);\n }\n\n const token = await new SignJWT({ staffId: staff.id, name: staff.name })\n .setProtectedHeader({ alg: 'HS256' })\n .setExpirationTime('30d')\n .sign(encodedJwtSecret);\n\n return {\n message: 'Login successful',\n token,\n staff: { id: staff.id, name: staff.name },\n };\n }),\n\n getStaff: protectedProcedure\n .query(async ({ ctx }) => {\n const staff = await getAllStaff();\n\n // Transform the data to include role and permissions in a cleaner format\n const transformedStaff = staff.map((user) => ({\n id: user.id,\n name: user.name,\n role: user.role ? {\n id: user.role.id,\n name: user.role.roleName,\n } : null,\n permissions: user.role?.rolePermissions.map((rp: any) => ({\n id: rp.permission.id,\n name: rp.permission.permissionName,\n })) || [],\n }));\n\n return {\n staff: transformedStaff,\n };\n }),\n\n getUsers: protectedProcedure\n .input(z.object({\n cursor: z.number().optional(),\n limit: z.number().default(20),\n search: z.string().optional(),\n }))\n .query(async ({ input }) => {\n const { cursor, limit, search } = input;\n\n const { users: usersToReturn, hasMore } = await getAllUsers(cursor, limit, search);\n\n const formattedUsers = usersToReturn.map((user: any) => ({\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n image: user.userDetails?.profileImage || null,\n }));\n\n return {\n users: formattedUsers,\n nextCursor: hasMore ? usersToReturn[usersToReturn.length - 1].id : undefined,\n };\n }),\n\n getUserDetails: protectedProcedure\n .input(z.object({ userId: z.number() }))\n .query(async ({ input }) => {\n const { userId } = input;\n\n const user = await getUserWithDetails(userId);\n\n if (!user) {\n throw new ApiError(\"User not found\", 404);\n }\n\n const lastOrder = user.orders[0];\n\n return {\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n addedOn: user.createdAt,\n lastOrdered: lastOrder?.createdAt || null,\n isSuspended: user.userDetails?.isSuspended || false,\n };\n }),\n\n updateUserSuspension: protectedProcedure\n .input(z.object({ userId: z.number(), isSuspended: z.boolean() }))\n .mutation(async ({ input }) => {\n const { userId, isSuspended } = input;\n\n await upsertUserSuspension(userId, isSuspended);\n\n return { success: true };\n }),\n\n createStaffUser: protectedProcedure\n .input(z.object({\n name: z.string().min(1, 'Name is required'),\n password: z.string().min(6, 'Password must be at least 6 characters'),\n roleId: z.number().int().positive('Role is required'),\n }))\n .mutation(async ({ input, ctx }) => {\n const { name, password, roleId } = input;\n\n // Check if staff user already exists\n const existingUser = await checkStaffUserExists(name);\n\n if (existingUser) {\n throw new ApiError('Staff user with this name already exists', 409);\n }\n\n // Check if role exists\n const roleExists = await checkStaffRoleExists(roleId);\n\n if (!roleExists) {\n throw new ApiError('Invalid role selected', 400);\n }\n\n // Hash password\n const hashedPassword = await bcrypt.hash(password, 12);\n\n // Create staff user\n const newUser = await createStaffUser(name, hashedPassword, roleId);\n\n return { success: true, user: { id: newUser.id, name: newUser.name } };\n }),\n\n getRoles: protectedProcedure\n .query(async ({ ctx }) => {\n const roles = await getAllRoles();\n\n return {\n roles: roles.map((role: any) => ({\n id: role.id,\n name: role.roleName,\n })),\n };\n }),\n});\n", "/*\n Copyright (c) 2012 Nevins Bartolomeo \n Copyright (c) 2012 Shane Girish \n Copyright (c) 2025 Daniel Wirtz \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n 3. The name of the author may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// The Node.js crypto module is used as a fallback for the Web Crypto API. When\n// building for the browser, inclusion of the crypto module should be disabled,\n// which the package hints at in its package.json for bundlers that support it.\nimport nodeCrypto from \"crypto\";\n\n/**\n * The random implementation to use as a fallback.\n * @type {?function(number):!Array.}\n * @inner\n */\nvar randomFallback = null;\n\n/**\n * Generates cryptographically secure random bytes.\n * @function\n * @param {number} len Bytes length\n * @returns {!Array.} Random bytes\n * @throws {Error} If no random implementation is available\n * @inner\n */\nfunction randomBytes(len) {\n // Web Crypto API. Globally available in the browser and in Node.js >=23.\n try {\n return crypto.getRandomValues(new Uint8Array(len));\n } catch {}\n // Node.js crypto module for non-browser environments.\n try {\n return nodeCrypto.randomBytes(len);\n } catch {}\n // Custom fallback specified with `setRandomFallback`.\n if (!randomFallback) {\n throw Error(\n \"Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative\",\n );\n }\n return randomFallback(len);\n}\n\n/**\n * Sets the pseudo random number generator to use as a fallback if neither node's `crypto` module nor the Web Crypto\n * API is available. Please note: It is highly important that the PRNG used is cryptographically secure and that it\n * is seeded properly!\n * @param {?function(number):!Array.} random Function taking the number of bytes to generate as its\n * sole argument, returning the corresponding array of cryptographically secure random byte values.\n * @see http://nodejs.org/api/crypto.html\n * @see http://www.w3.org/TR/WebCryptoAPI/\n */\nexport function setRandomFallback(random) {\n randomFallback = random;\n}\n\n/**\n * Synchronously generates a salt.\n * @param {number=} rounds Number of rounds to use, defaults to 10 if omitted\n * @param {number=} seed_length Not supported.\n * @returns {string} Resulting salt\n * @throws {Error} If a random fallback is required but not set\n */\nexport function genSaltSync(rounds, seed_length) {\n rounds = rounds || GENSALT_DEFAULT_LOG2_ROUNDS;\n if (typeof rounds !== \"number\")\n throw Error(\n \"Illegal arguments: \" + typeof rounds + \", \" + typeof seed_length,\n );\n if (rounds < 4) rounds = 4;\n else if (rounds > 31) rounds = 31;\n var salt = [];\n salt.push(\"$2b$\");\n if (rounds < 10) salt.push(\"0\");\n salt.push(rounds.toString());\n salt.push(\"$\");\n salt.push(base64_encode(randomBytes(BCRYPT_SALT_LEN), BCRYPT_SALT_LEN)); // May throw\n return salt.join(\"\");\n}\n\n/**\n * Asynchronously generates a salt.\n * @param {(number|function(Error, string=))=} rounds Number of rounds to use, defaults to 10 if omitted\n * @param {(number|function(Error, string=))=} seed_length Not supported.\n * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting salt\n * @returns {!Promise} If `callback` has been omitted\n * @throws {Error} If `callback` is present but not a function\n */\nexport function genSalt(rounds, seed_length, callback) {\n if (typeof seed_length === \"function\")\n (callback = seed_length), (seed_length = undefined); // Not supported.\n if (typeof rounds === \"function\") (callback = rounds), (rounds = undefined);\n if (typeof rounds === \"undefined\") rounds = GENSALT_DEFAULT_LOG2_ROUNDS;\n else if (typeof rounds !== \"number\")\n throw Error(\"illegal arguments: \" + typeof rounds);\n\n function _async(callback) {\n nextTick(function () {\n // Pretty thin, but salting is fast enough\n try {\n callback(null, genSaltSync(rounds));\n } catch (err) {\n callback(err);\n }\n });\n }\n\n if (callback) {\n if (typeof callback !== \"function\")\n throw Error(\"Illegal callback: \" + typeof callback);\n _async(callback);\n } else\n return new Promise(function (resolve, reject) {\n _async(function (err, res) {\n if (err) {\n reject(err);\n return;\n }\n resolve(res);\n });\n });\n}\n\n/**\n * Synchronously generates a hash for the given password.\n * @param {string} password Password to hash\n * @param {(number|string)=} salt Salt length to generate or salt to use, default to 10\n * @returns {string} Resulting hash\n */\nexport function hashSync(password, salt) {\n if (typeof salt === \"undefined\") salt = GENSALT_DEFAULT_LOG2_ROUNDS;\n if (typeof salt === \"number\") salt = genSaltSync(salt);\n if (typeof password !== \"string\" || typeof salt !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof password + \", \" + typeof salt);\n return _hash(password, salt);\n}\n\n/**\n * Asynchronously generates a hash for the given password.\n * @param {string} password Password to hash\n * @param {number|string} salt Salt length to generate or salt to use\n * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting hash\n * @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed\n * (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.\n * @returns {!Promise} If `callback` has been omitted\n * @throws {Error} If `callback` is present but not a function\n */\nexport function hash(password, salt, callback, progressCallback) {\n function _async(callback) {\n if (typeof password === \"string\" && typeof salt === \"number\")\n genSalt(salt, function (err, salt) {\n _hash(password, salt, callback, progressCallback);\n });\n else if (typeof password === \"string\" && typeof salt === \"string\")\n _hash(password, salt, callback, progressCallback);\n else\n nextTick(\n callback.bind(\n this,\n Error(\"Illegal arguments: \" + typeof password + \", \" + typeof salt),\n ),\n );\n }\n\n if (callback) {\n if (typeof callback !== \"function\")\n throw Error(\"Illegal callback: \" + typeof callback);\n _async(callback);\n } else\n return new Promise(function (resolve, reject) {\n _async(function (err, res) {\n if (err) {\n reject(err);\n return;\n }\n resolve(res);\n });\n });\n}\n\n/**\n * Compares two strings of the same length in constant time.\n * @param {string} known Must be of the correct length\n * @param {string} unknown Must be the same length as `known`\n * @returns {boolean}\n * @inner\n */\nfunction safeStringCompare(known, unknown) {\n var diff = known.length ^ unknown.length;\n for (var i = 0; i < known.length; ++i) {\n diff |= known.charCodeAt(i) ^ unknown.charCodeAt(i);\n }\n return diff === 0;\n}\n\n/**\n * Synchronously tests a password against a hash.\n * @param {string} password Password to compare\n * @param {string} hash Hash to test against\n * @returns {boolean} true if matching, otherwise false\n * @throws {Error} If an argument is illegal\n */\nexport function compareSync(password, hash) {\n if (typeof password !== \"string\" || typeof hash !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof password + \", \" + typeof hash);\n if (hash.length !== 60) return false;\n return safeStringCompare(\n hashSync(password, hash.substring(0, hash.length - 31)),\n hash,\n );\n}\n\n/**\n * Asynchronously tests a password against a hash.\n * @param {string} password Password to compare\n * @param {string} hashValue Hash to test against\n * @param {function(Error, boolean)=} callback Callback receiving the error, if any, otherwise the result\n * @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed\n * (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.\n * @returns {!Promise} If `callback` has been omitted\n * @throws {Error} If `callback` is present but not a function\n */\nexport function compare(password, hashValue, callback, progressCallback) {\n function _async(callback) {\n if (typeof password !== \"string\" || typeof hashValue !== \"string\") {\n nextTick(\n callback.bind(\n this,\n Error(\n \"Illegal arguments: \" + typeof password + \", \" + typeof hashValue,\n ),\n ),\n );\n return;\n }\n if (hashValue.length !== 60) {\n nextTick(callback.bind(this, null, false));\n return;\n }\n hash(\n password,\n hashValue.substring(0, 29),\n function (err, comp) {\n if (err) callback(err);\n else callback(null, safeStringCompare(comp, hashValue));\n },\n progressCallback,\n );\n }\n\n if (callback) {\n if (typeof callback !== \"function\")\n throw Error(\"Illegal callback: \" + typeof callback);\n _async(callback);\n } else\n return new Promise(function (resolve, reject) {\n _async(function (err, res) {\n if (err) {\n reject(err);\n return;\n }\n resolve(res);\n });\n });\n}\n\n/**\n * Gets the number of rounds used to encrypt the specified hash.\n * @param {string} hash Hash to extract the used number of rounds from\n * @returns {number} Number of rounds used\n * @throws {Error} If `hash` is not a string\n */\nexport function getRounds(hash) {\n if (typeof hash !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof hash);\n return parseInt(hash.split(\"$\")[2], 10);\n}\n\n/**\n * Gets the salt portion from a hash. Does not validate the hash.\n * @param {string} hash Hash to extract the salt from\n * @returns {string} Extracted salt part\n * @throws {Error} If `hash` is not a string or otherwise invalid\n */\nexport function getSalt(hash) {\n if (typeof hash !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof hash);\n if (hash.length !== 60)\n throw Error(\"Illegal hash length: \" + hash.length + \" != 60\");\n return hash.substring(0, 29);\n}\n\n/**\n * Tests if a password will be truncated when hashed, that is its length is\n * greater than 72 bytes when converted to UTF-8.\n * @param {string} password The password to test\n * @returns {boolean} `true` if truncated, otherwise `false`\n */\nexport function truncates(password) {\n if (typeof password !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof password);\n return utf8Length(password) > 72;\n}\n\n/**\n * Continues with the callback after yielding to the event loop.\n * @function\n * @param {function(...[*])} callback Callback to execute\n * @inner\n */\nvar nextTick =\n typeof setImmediate === \"function\"\n ? setImmediate\n : typeof scheduler === \"object\" && typeof scheduler.postTask === \"function\"\n ? scheduler.postTask.bind(scheduler)\n : setTimeout;\n\n/** Calculates the byte length of a string encoded as UTF8. */\nfunction utf8Length(string) {\n var len = 0,\n c = 0;\n for (var i = 0; i < string.length; ++i) {\n c = string.charCodeAt(i);\n if (c < 128) len += 1;\n else if (c < 2048) len += 2;\n else if (\n (c & 0xfc00) === 0xd800 &&\n (string.charCodeAt(i + 1) & 0xfc00) === 0xdc00\n ) {\n ++i;\n len += 4;\n } else len += 3;\n }\n return len;\n}\n\n/** Converts a string to an array of UTF8 bytes. */\nfunction utf8Array(string) {\n var offset = 0,\n c1,\n c2;\n var buffer = new Array(utf8Length(string));\n for (var i = 0, k = string.length; i < k; ++i) {\n c1 = string.charCodeAt(i);\n if (c1 < 128) {\n buffer[offset++] = c1;\n } else if (c1 < 2048) {\n buffer[offset++] = (c1 >> 6) | 192;\n buffer[offset++] = (c1 & 63) | 128;\n } else if (\n (c1 & 0xfc00) === 0xd800 &&\n ((c2 = string.charCodeAt(i + 1)) & 0xfc00) === 0xdc00\n ) {\n c1 = 0x10000 + ((c1 & 0x03ff) << 10) + (c2 & 0x03ff);\n ++i;\n buffer[offset++] = (c1 >> 18) | 240;\n buffer[offset++] = ((c1 >> 12) & 63) | 128;\n buffer[offset++] = ((c1 >> 6) & 63) | 128;\n buffer[offset++] = (c1 & 63) | 128;\n } else {\n buffer[offset++] = (c1 >> 12) | 224;\n buffer[offset++] = ((c1 >> 6) & 63) | 128;\n buffer[offset++] = (c1 & 63) | 128;\n }\n }\n return buffer;\n}\n\n// A base64 implementation for the bcrypt algorithm. This is partly non-standard.\n\n/**\n * bcrypt's own non-standard base64 dictionary.\n * @type {!Array.}\n * @const\n * @inner\n **/\nvar BASE64_CODE =\n \"./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\".split(\"\");\n\n/**\n * @type {!Array.}\n * @const\n * @inner\n **/\nvar BASE64_INDEX = [\n -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,\n -1, -1, -1, -1, -1, -1, -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, 28,\n 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,\n 48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1,\n];\n\n/**\n * Encodes a byte array to base64 with up to len bytes of input.\n * @param {!Array.} b Byte array\n * @param {number} len Maximum input length\n * @returns {string}\n * @inner\n */\nfunction base64_encode(b, len) {\n var off = 0,\n rs = [],\n c1,\n c2;\n if (len <= 0 || len > b.length) throw Error(\"Illegal len: \" + len);\n while (off < len) {\n c1 = b[off++] & 0xff;\n rs.push(BASE64_CODE[(c1 >> 2) & 0x3f]);\n c1 = (c1 & 0x03) << 4;\n if (off >= len) {\n rs.push(BASE64_CODE[c1 & 0x3f]);\n break;\n }\n c2 = b[off++] & 0xff;\n c1 |= (c2 >> 4) & 0x0f;\n rs.push(BASE64_CODE[c1 & 0x3f]);\n c1 = (c2 & 0x0f) << 2;\n if (off >= len) {\n rs.push(BASE64_CODE[c1 & 0x3f]);\n break;\n }\n c2 = b[off++] & 0xff;\n c1 |= (c2 >> 6) & 0x03;\n rs.push(BASE64_CODE[c1 & 0x3f]);\n rs.push(BASE64_CODE[c2 & 0x3f]);\n }\n return rs.join(\"\");\n}\n\n/**\n * Decodes a base64 encoded string to up to len bytes of output.\n * @param {string} s String to decode\n * @param {number} len Maximum output length\n * @returns {!Array.}\n * @inner\n */\nfunction base64_decode(s, len) {\n var off = 0,\n slen = s.length,\n olen = 0,\n rs = [],\n c1,\n c2,\n c3,\n c4,\n o,\n code;\n if (len <= 0) throw Error(\"Illegal len: \" + len);\n while (off < slen - 1 && olen < len) {\n code = s.charCodeAt(off++);\n c1 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;\n code = s.charCodeAt(off++);\n c2 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;\n if (c1 == -1 || c2 == -1) break;\n o = (c1 << 2) >>> 0;\n o |= (c2 & 0x30) >> 4;\n rs.push(String.fromCharCode(o));\n if (++olen >= len || off >= slen) break;\n code = s.charCodeAt(off++);\n c3 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;\n if (c3 == -1) break;\n o = ((c2 & 0x0f) << 4) >>> 0;\n o |= (c3 & 0x3c) >> 2;\n rs.push(String.fromCharCode(o));\n if (++olen >= len || off >= slen) break;\n code = s.charCodeAt(off++);\n c4 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;\n o = ((c3 & 0x03) << 6) >>> 0;\n o |= c4;\n rs.push(String.fromCharCode(o));\n ++olen;\n }\n var res = [];\n for (off = 0; off < olen; off++) res.push(rs[off].charCodeAt(0));\n return res;\n}\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar BCRYPT_SALT_LEN = 16;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar GENSALT_DEFAULT_LOG2_ROUNDS = 10;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar BLOWFISH_NUM_ROUNDS = 16;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar MAX_EXECUTION_TIME = 100;\n\n/**\n * @type {Array.}\n * @const\n * @inner\n */\nvar P_ORIG = [\n 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, 0x299f31d0,\n 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,\n 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, 0x9216d5d9, 0x8979fb1b,\n];\n\n/**\n * @type {Array.}\n * @const\n * @inner\n */\nvar S_ORIG = [\n 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, 0xb8e1afed, 0x6a267e96,\n 0xba7c9045, 0xf12c7f99, 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16,\n 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, 0x0d95748f, 0x728eb658,\n 0x718bcd58, 0x82154aee, 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,\n 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, 0x8e79dcb0, 0x603a180e,\n 0x6c9e0e8b, 0xb01e8a3e, 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,\n 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, 0x55ca396a, 0x2aab10b6,\n 0xb4cc5c34, 0x1141e8ce, 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,\n 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, 0xafd6ba33, 0x6c24cf5c,\n 0x7a325381, 0x28958677, 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,\n 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, 0xef845d5d, 0xe98575b1,\n 0xdc262302, 0xeb651b88, 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,\n 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, 0x21c66842, 0xf6e96c9a,\n 0x670c9c61, 0xabd388f0, 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3,\n 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, 0xa1f1651d, 0x39af0176,\n 0x66ca593e, 0x82430e88, 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,\n 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, 0x4ed3aa62, 0x363f7706,\n 0x1bfedf72, 0x429b023d, 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,\n 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, 0xe3fe501a, 0xb6794c3b,\n 0x976ce0bd, 0x04c006ba, 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,\n 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, 0x6dfc511f, 0x9b30952c,\n 0xcc814544, 0xaf5ebd09, 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3,\n 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, 0x5579c0bd, 0x1a60320a,\n 0xd6a100c6, 0x402c7279, 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,\n 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, 0x323db5fa, 0xfd238760,\n 0x53317b48, 0x3e00df82, 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db,\n 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, 0x695b27b0, 0xbbca58c8,\n 0xe1ffa35d, 0xb8f011a0, 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b,\n 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, 0xe1ddf2da, 0xa4cb7e33,\n 0x62fb1341, 0xcee4c6e8, 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,\n 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, 0xd08ed1d0, 0xafc725e0,\n 0x8e3c5b2f, 0x8e7594b7, 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c,\n 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, 0x2f2f2218, 0xbe0e1777,\n 0xea752dfe, 0x8b021fa1, 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299,\n 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, 0x165fa266, 0x80957705,\n 0x93cc7314, 0x211a1477, 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,\n 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, 0x00250e2d, 0x2071b35e,\n 0x226800bb, 0x57b8e0af, 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa,\n 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, 0x83260376, 0x6295cfa9,\n 0x11c81968, 0x4e734a41, 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,\n 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, 0x08ba6fb5, 0x571be91f,\n 0xf296ec6b, 0x2a0dd915, 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664,\n 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a, 0x4b7a70e9, 0xb5b32944,\n 0xdb75092e, 0xc4192623, 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266,\n 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, 0x193602a5, 0x75094c29,\n 0xa0591340, 0xe4183a3e, 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6,\n 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, 0x4cdd2086, 0x8470eb26,\n 0x6382e9c6, 0x021ecc5e, 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1,\n 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, 0x3e07841c, 0x7fdeae5c,\n 0x8e7d44ec, 0x5716f2b8, 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff,\n 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, 0xd19113f9, 0x7ca92ff6,\n 0x94324773, 0x22f54701, 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7,\n 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, 0xe238cd99, 0x3bea0e2f,\n 0x3280bba1, 0x183eb331, 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf,\n 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, 0xde9a771f, 0xd9930810,\n 0xb38bae12, 0xdccf3f2e, 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87,\n 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, 0xec7aec3a, 0xdb851dfa,\n 0x63094366, 0xc464c3d2, 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16,\n 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, 0x71dff89e, 0x10314e55,\n 0x81ac77d6, 0x5f11199b, 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,\n 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, 0x86e34570, 0xeae96fb1,\n 0x860e5e0a, 0x5a3e2ab3, 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f,\n 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, 0xc6150eba, 0x94e2ea78,\n 0xa5fc3c53, 0x1e0a2df4, 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960,\n 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, 0xe3bc4595, 0xa67bc883,\n 0xb17f37d1, 0x018cff28, 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802,\n 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, 0x1521b628, 0x29076170,\n 0xecdd4775, 0x619f1510, 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf,\n 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, 0xeecc86bc, 0x60622ca7,\n 0x9cab5cab, 0xb2f3846e, 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50,\n 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, 0x9b540b19, 0x875fa099,\n 0x95f7997e, 0x623d7da8, 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281,\n 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, 0x57f584a5, 0x1b227263,\n 0x9b83c3ff, 0x1ac24696, 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128,\n 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, 0x5d4a14d9, 0xe864b7e3,\n 0x42105d14, 0x203e13e0, 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0,\n 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, 0xd81e799e, 0x86854dc7,\n 0xe44b476a, 0x3d816250, 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3,\n 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, 0x095bbf00, 0xad19489d,\n 0x1462b174, 0x23820e00, 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061,\n 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, 0x7cde3759, 0xcbee7460,\n 0x4085f2a7, 0xce77326e, 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735,\n 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, 0x9e447a2e, 0xc3453484,\n 0xfdd56705, 0x0e1e9ec9, 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340,\n 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, 0x153e21e7, 0x8fb03d4a,\n 0xe6e39f2b, 0xdb83adf7, 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934,\n 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, 0xd4082471, 0x3320f46a,\n 0x43b7d4b7, 0x500061af, 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840,\n 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, 0xbfbc09ec, 0x03bd9785,\n 0x7fac6dd0, 0x31cb8504, 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,\n 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, 0x68dc1462, 0xd7486900,\n 0x680ec0a4, 0x27a18dee, 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6,\n 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, 0x20fe9e35, 0xd9f385b9,\n 0xee39d7ab, 0x3b124e8b, 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2,\n 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, 0xfb0af54e, 0xd8feb397,\n 0x454056ac, 0xba489527, 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b,\n 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, 0xa62a4a56, 0x3f3125f9,\n 0x5ef47e1c, 0x9029317c, 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3,\n 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, 0x07f9c9ee, 0x41041f0f,\n 0x404779a4, 0x5d886e17, 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564,\n 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, 0x0e12b4c2, 0x02e1329e,\n 0xaf664fd1, 0xcad18115, 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922,\n 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, 0xd0127845, 0x95b794fd,\n 0x647d0862, 0xe7ccf5f0, 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e,\n 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, 0xa812dc60, 0xa1ebddf8,\n 0x991be14c, 0xdb6e6b0d, 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804,\n 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, 0x667b9ffb, 0xcedb7d9c,\n 0xa091cf0b, 0xd9155ea3, 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb,\n 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, 0x6842ada7, 0xc66a2b3b,\n 0x12754ccc, 0x782ef11c, 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350,\n 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, 0x44421659, 0x0a121386,\n 0xd90cec6e, 0xd5abea2a, 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe,\n 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, 0xd1fd8346, 0xf6381fb0,\n 0x7745ae04, 0xd736fccc, 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f,\n 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, 0x4e58f48f, 0xf2ddfda2,\n 0xf474ef38, 0x8789bdc2, 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9,\n 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, 0x466e598e, 0x20b45770,\n 0x8cd55591, 0xc902de4c, 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e,\n 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, 0xe85a1f02, 0x09f0be8c,\n 0x4a99a025, 0x1d6efe10, 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,\n 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, 0x50115e01, 0xa70683fa,\n 0xa002b5c4, 0x0de6d027, 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5,\n 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, 0x11e69ed7, 0x2338ea63,\n 0x53c2dd94, 0xc2c21634, 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76,\n 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, 0x86e3725f, 0x724d9db9,\n 0x1ac15bb4, 0xd39eb8fc, 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4,\n 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, 0x6fd5c7e7, 0x56e14ec4,\n 0x362abfce, 0xddc6c837, 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0,\n 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, 0x5cb0679e, 0x4fa33742,\n 0xd3822740, 0x99bc9bbe, 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,\n 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, 0x5748ab2f, 0xbc946e79,\n 0xc6a376d2, 0x6549c2c8, 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,\n 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, 0xa1fad5f0, 0x6a2d519a,\n 0x63ef8ce2, 0x9a86ee22, 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4,\n 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, 0x2826a2f9, 0xa73a3ae1,\n 0x4ba99586, 0xef5562e9, 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59,\n 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, 0xe990fd5a, 0x9e34d797,\n 0x2cf0b7d9, 0x022b8b51, 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28,\n 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, 0xe029ac71, 0xe019a5e6,\n 0x47b0acfd, 0xed93fa9b, 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,\n 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, 0x15056dd4, 0x88f46dba,\n 0x03a16125, 0x0564f0bd, 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a,\n 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, 0x7533d928, 0xb155fdf5,\n 0x03563482, 0x8aba3cbb, 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,\n 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, 0xea7a90c2, 0xfb3e7bce,\n 0x5121ce64, 0x774fbe32, 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680,\n 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, 0xb39a460a, 0x6445c0dd,\n 0x586cdecf, 0x1c20c8ae, 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb,\n 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, 0x72eacea8, 0xfa6484bb,\n 0x8d6612ae, 0xbf3c6f47, 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,\n 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, 0x4040cb08, 0x4eb4e2cc,\n 0x34d2466a, 0x0115af84, 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048,\n 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, 0x611560b1, 0xe7933fdc,\n 0xbb3a792b, 0x344525bd, 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9,\n 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, 0x1a908749, 0xd44fbd9a,\n 0xd0dadecb, 0xd50ada38, 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,\n 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, 0xbf97222c, 0x15e6fc2a,\n 0x0f91fc71, 0x9b941525, 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1,\n 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, 0xe0ec6e0e, 0x1698db3b,\n 0x4c98a0be, 0x3278e964, 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,\n 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, 0xdf359f8d, 0x9b992f2e,\n 0xe60b6f47, 0x0fe3f11d, 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f,\n 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, 0xf523f357, 0xa6327623,\n 0x93a83531, 0x56cccd02, 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc,\n 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, 0xe6c6c7bd, 0x327a140a,\n 0x45e1d006, 0xc3f27b9a, 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6,\n 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, 0x53113ec0, 0x1640e3d3,\n 0x38abbd60, 0x2547adf0, 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,\n 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, 0x1948c25c, 0x02fb8a8c,\n 0x01c36ae4, 0xd6ebe1f9, 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,\n 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6,\n];\n\n/**\n * @type {Array.}\n * @const\n * @inner\n */\nvar C_ORIG = [\n 0x4f727068, 0x65616e42, 0x65686f6c, 0x64657253, 0x63727944, 0x6f756274,\n];\n\n/**\n * @param {Array.} lr\n * @param {number} off\n * @param {Array.} P\n * @param {Array.} S\n * @returns {Array.}\n * @inner\n */\nfunction _encipher(lr, off, P, S) {\n // This is our bottleneck: 1714/1905 ticks / 90% - see profile.txt\n var n,\n l = lr[off],\n r = lr[off + 1];\n\n l ^= P[0];\n\n /*\n for (var i=0, k=BLOWFISH_NUM_ROUNDS-2; i<=k;)\n // Feistel substitution on left word\n n = S[l >>> 24],\n n += S[0x100 | ((l >> 16) & 0xff)],\n n ^= S[0x200 | ((l >> 8) & 0xff)],\n n += S[0x300 | (l & 0xff)],\n r ^= n ^ P[++i],\n // Feistel substitution on right word\n n = S[r >>> 24],\n n += S[0x100 | ((r >> 16) & 0xff)],\n n ^= S[0x200 | ((r >> 8) & 0xff)],\n n += S[0x300 | (r & 0xff)],\n l ^= n ^ P[++i];\n */\n\n //The following is an unrolled version of the above loop.\n //Iteration 0\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[1];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[2];\n //Iteration 1\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[3];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[4];\n //Iteration 2\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[5];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[6];\n //Iteration 3\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[7];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[8];\n //Iteration 4\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[9];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[10];\n //Iteration 5\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[11];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[12];\n //Iteration 6\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[13];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[14];\n //Iteration 7\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[15];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[16];\n\n lr[off] = r ^ P[BLOWFISH_NUM_ROUNDS + 1];\n lr[off + 1] = l;\n return lr;\n}\n\n/**\n * @param {Array.} data\n * @param {number} offp\n * @returns {{key: number, offp: number}}\n * @inner\n */\nfunction _streamtoword(data, offp) {\n for (var i = 0, word = 0; i < 4; ++i)\n (word = (word << 8) | (data[offp] & 0xff)),\n (offp = (offp + 1) % data.length);\n return { key: word, offp: offp };\n}\n\n/**\n * @param {Array.} key\n * @param {Array.} P\n * @param {Array.} S\n * @inner\n */\nfunction _key(key, P, S) {\n var offset = 0,\n lr = [0, 0],\n plen = P.length,\n slen = S.length,\n sw;\n for (var i = 0; i < plen; i++)\n (sw = _streamtoword(key, offset)),\n (offset = sw.offp),\n (P[i] = P[i] ^ sw.key);\n for (i = 0; i < plen; i += 2)\n (lr = _encipher(lr, 0, P, S)), (P[i] = lr[0]), (P[i + 1] = lr[1]);\n for (i = 0; i < slen; i += 2)\n (lr = _encipher(lr, 0, P, S)), (S[i] = lr[0]), (S[i + 1] = lr[1]);\n}\n\n/**\n * Expensive key schedule Blowfish.\n * @param {Array.} data\n * @param {Array.} key\n * @param {Array.} P\n * @param {Array.} S\n * @inner\n */\nfunction _ekskey(data, key, P, S) {\n var offp = 0,\n lr = [0, 0],\n plen = P.length,\n slen = S.length,\n sw;\n for (var i = 0; i < plen; i++)\n (sw = _streamtoword(key, offp)), (offp = sw.offp), (P[i] = P[i] ^ sw.key);\n offp = 0;\n for (i = 0; i < plen; i += 2)\n (sw = _streamtoword(data, offp)),\n (offp = sw.offp),\n (lr[0] ^= sw.key),\n (sw = _streamtoword(data, offp)),\n (offp = sw.offp),\n (lr[1] ^= sw.key),\n (lr = _encipher(lr, 0, P, S)),\n (P[i] = lr[0]),\n (P[i + 1] = lr[1]);\n for (i = 0; i < slen; i += 2)\n (sw = _streamtoword(data, offp)),\n (offp = sw.offp),\n (lr[0] ^= sw.key),\n (sw = _streamtoword(data, offp)),\n (offp = sw.offp),\n (lr[1] ^= sw.key),\n (lr = _encipher(lr, 0, P, S)),\n (S[i] = lr[0]),\n (S[i + 1] = lr[1]);\n}\n\n/**\n * Internaly crypts a string.\n * @param {Array.} b Bytes to crypt\n * @param {Array.} salt Salt bytes to use\n * @param {number} rounds Number of rounds\n * @param {function(Error, Array.=)=} callback Callback receiving the error, if any, and the resulting bytes. If\n * omitted, the operation will be performed synchronously.\n * @param {function(number)=} progressCallback Callback called with the current progress\n * @returns {!Array.|undefined} Resulting bytes if callback has been omitted, otherwise `undefined`\n * @inner\n */\nfunction _crypt(b, salt, rounds, callback, progressCallback) {\n var cdata = C_ORIG.slice(),\n clen = cdata.length,\n err;\n\n // Validate\n if (rounds < 4 || rounds > 31) {\n err = Error(\"Illegal number of rounds (4-31): \" + rounds);\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n if (salt.length !== BCRYPT_SALT_LEN) {\n err = Error(\n \"Illegal salt length: \" + salt.length + \" != \" + BCRYPT_SALT_LEN,\n );\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n rounds = (1 << rounds) >>> 0;\n\n var P,\n S,\n i = 0,\n j;\n\n //Use typed arrays when available - huge speedup!\n if (typeof Int32Array === \"function\") {\n P = new Int32Array(P_ORIG);\n S = new Int32Array(S_ORIG);\n } else {\n P = P_ORIG.slice();\n S = S_ORIG.slice();\n }\n\n _ekskey(salt, b, P, S);\n\n /**\n * Calcualtes the next round.\n * @returns {Array.|undefined} Resulting array if callback has been omitted, otherwise `undefined`\n * @inner\n */\n function next() {\n if (progressCallback) progressCallback(i / rounds);\n if (i < rounds) {\n var start = Date.now();\n for (; i < rounds; ) {\n i = i + 1;\n _key(b, P, S);\n _key(salt, P, S);\n if (Date.now() - start > MAX_EXECUTION_TIME) break;\n }\n } else {\n for (i = 0; i < 64; i++)\n for (j = 0; j < clen >> 1; j++) _encipher(cdata, j << 1, P, S);\n var ret = [];\n for (i = 0; i < clen; i++)\n ret.push(((cdata[i] >> 24) & 0xff) >>> 0),\n ret.push(((cdata[i] >> 16) & 0xff) >>> 0),\n ret.push(((cdata[i] >> 8) & 0xff) >>> 0),\n ret.push((cdata[i] & 0xff) >>> 0);\n if (callback) {\n callback(null, ret);\n return;\n } else return ret;\n }\n if (callback) nextTick(next);\n }\n\n // Async\n if (typeof callback !== \"undefined\") {\n next();\n\n // Sync\n } else {\n var res;\n while (true) if (typeof (res = next()) !== \"undefined\") return res || [];\n }\n}\n\n/**\n * Internally hashes a password.\n * @param {string} password Password to hash\n * @param {?string} salt Salt to use, actually never null\n * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting hash. If omitted,\n * hashing is performed synchronously.\n * @param {function(number)=} progressCallback Callback called with the current progress\n * @returns {string|undefined} Resulting hash if callback has been omitted, otherwise `undefined`\n * @inner\n */\nfunction _hash(password, salt, callback, progressCallback) {\n var err;\n if (typeof password !== \"string\" || typeof salt !== \"string\") {\n err = Error(\"Invalid string / salt: Not a string\");\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n\n // Validate the salt\n var minor, offset;\n if (salt.charAt(0) !== \"$\" || salt.charAt(1) !== \"2\") {\n err = Error(\"Invalid salt version: \" + salt.substring(0, 2));\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n if (salt.charAt(2) === \"$\") (minor = String.fromCharCode(0)), (offset = 3);\n else {\n minor = salt.charAt(2);\n if (\n (minor !== \"a\" && minor !== \"b\" && minor !== \"y\") ||\n salt.charAt(3) !== \"$\"\n ) {\n err = Error(\"Invalid salt revision: \" + salt.substring(2, 4));\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n offset = 4;\n }\n\n // Extract number of rounds\n if (salt.charAt(offset + 2) > \"$\") {\n err = Error(\"Missing salt rounds\");\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n var r1 = parseInt(salt.substring(offset, offset + 1), 10) * 10,\n r2 = parseInt(salt.substring(offset + 1, offset + 2), 10),\n rounds = r1 + r2,\n real_salt = salt.substring(offset + 3, offset + 25);\n password += minor >= \"a\" ? \"\\x00\" : \"\";\n\n var passwordb = utf8Array(password),\n saltb = base64_decode(real_salt, BCRYPT_SALT_LEN);\n\n /**\n * Finishes hashing.\n * @param {Array.} bytes Byte array\n * @returns {string}\n * @inner\n */\n function finish(bytes) {\n var res = [];\n res.push(\"$2\");\n if (minor >= \"a\") res.push(minor);\n res.push(\"$\");\n if (rounds < 10) res.push(\"0\");\n res.push(rounds.toString());\n res.push(\"$\");\n res.push(base64_encode(saltb, saltb.length));\n res.push(base64_encode(bytes, C_ORIG.length * 4 - 1));\n return res.join(\"\");\n }\n\n // Sync\n if (typeof callback == \"undefined\")\n return finish(_crypt(passwordb, saltb, rounds));\n // Async\n else {\n _crypt(\n passwordb,\n saltb,\n rounds,\n function (err, bytes) {\n if (err) callback(err, null);\n else callback(null, finish(bytes));\n },\n progressCallback,\n );\n }\n}\n\n/**\n * Encodes a byte array to base64 with up to len bytes of input, using the custom bcrypt alphabet.\n * @function\n * @param {!Array.} bytes Byte array\n * @param {number} length Maximum input length\n * @returns {string}\n */\nexport function encodeBase64(bytes, length) {\n return base64_encode(bytes, length);\n}\n\n/**\n * Decodes a base64 encoded string to up to len bytes of output, using the custom bcrypt alphabet.\n * @function\n * @param {string} string String to decode\n * @param {number} length Maximum output length\n * @returns {!Array.}\n */\nexport function decodeBase64(string, length) {\n return base64_decode(string, length);\n}\n\nexport default {\n setRandomFallback,\n genSaltSync,\n genSalt,\n hashSync,\n hash,\n compareSync,\n compare,\n getRounds,\n getSalt,\n truncates,\n encodeBase64,\n decodeBase64,\n};\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport { ApiError } from '@/src/lib/api-error'\nimport { extractKeyFromPresignedUrl, deleteImageUtil, generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport { scheduleStoreInitialization } from '@/src/stores/store-initializer'\nimport {\n getAllStores as getAllStoresFromDb,\n getStoreById as getStoreByIdFromDb,\n createStore as createStoreInDb,\n updateStore as updateStoreInDb,\n deleteStore as deleteStoreFromDb,\n} from '@/src/dbService'\nimport type { Store } from '@packages/shared'\n\nexport const storeRouter = router({\n getStores: protectedProcedure\n .query(async ({ ctx }): Promise<{ stores: any[]; count: number }> => {\n const stores = await getAllStoresFromDb();\n\n await Promise.all(stores.map(async store => {\n if(store.imageUrl)\n store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl)\n })).catch((e) => {\n throw new ApiError(\"Unable to find store image urls\")\n })\n\n return {\n stores,\n count: stores.length,\n };\n }),\n\n getStoreById: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .query(async ({ input, ctx }): Promise<{ store: any }> => {\n const { id } = input;\n\n const store = await getStoreByIdFromDb(id);\n\n if (!store) {\n throw new ApiError(\"Store not found\", 404);\n }\n store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl);\n return {\n store,\n };\n }),\n\n createStore: protectedProcedure\n .input(z.object({\n name: z.string().min(1, \"Name is required\"),\n description: z.string().optional(),\n imageUrl: z.string().optional(),\n owner: z.number().min(1, \"Owner is required\"),\n products: z.array(z.number()).optional(),\n }))\n .mutation(async ({ input, ctx }): Promise<{ store: Store; message: string }> => {\n const { name, description, imageUrl, owner, products } = input;\n\n const imageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : undefined;\n\n const newStore = await createStoreInDb(\n {\n name,\n description,\n imageUrl: imageKey,\n owner,\n },\n products\n );\n\n /*\n // Old implementation - direct DB query:\n const [newStore] = await db\n .insert(storeInfo)\n .values({\n name,\n description,\n imageUrl: imageKey,\n owner,\n })\n .returning();\n\n // Assign selected products to this store\n if (products && products.length > 0) {\n await db\n .update(productInfo)\n .set({ storeId: newStore.id })\n .where(inArray(productInfo.id, products));\n }\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n store: newStore,\n message: \"Store created successfully\",\n };\n }),\n\n updateStore: protectedProcedure\n .input(z.object({\n id: z.number(),\n name: z.string().min(1, \"Name is required\"),\n description: z.string().optional(),\n imageUrl: z.string().optional(),\n owner: z.number().min(1, \"Owner is required\"),\n products: z.array(z.number()).optional(),\n }))\n .mutation(async ({ input, ctx }): Promise<{ store: Store; message: string }> => {\n const { id, name, description, imageUrl, owner, products } = input;\n\n const existingStore = await getStoreByIdFromDb(id);\n\n if (!existingStore) {\n throw new ApiError(\"Store not found\", 404);\n }\n\n const oldImageKey = existingStore.imageUrl;\n const newImageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : oldImageKey;\n\n // Delete old image only if:\n // 1. New image provided and keys are different, OR\n // 2. No new image but old exists (clearing the image)\n if (oldImageKey && (\n (newImageKey && newImageKey !== oldImageKey) ||\n (!newImageKey)\n )) {\n try {\n await deleteImageUtil({keys: [oldImageKey]});\n } catch (error) {\n console.error('Failed to delete old image:', error);\n // Continue with update even if deletion fails\n }\n }\n\n const updatedStore = await updateStoreInDb(\n id,\n {\n name,\n description,\n imageUrl: newImageKey,\n owner,\n },\n products\n );\n\n /*\n // Old implementation - direct DB query:\n const [updatedStore] = await db\n .update(storeInfo)\n .set({\n name,\n description,\n imageUrl: newImageKey,\n owner,\n })\n .where(eq(storeInfo.id, id))\n .returning();\n\n if (!updatedStore) {\n throw new ApiError(\"Store not found\", 404);\n }\n\n // Update products if provided\n if (products) {\n // First, set storeId to null for products not in the list but currently assigned to this store\n await db\n .update(productInfo)\n .set({ storeId: null })\n .where(eq(productInfo.storeId, id));\n\n // Then, assign the selected products to this store\n if (products.length > 0) {\n await db\n .update(productInfo)\n .set({ storeId: id })\n .where(inArray(productInfo.id, products));\n }\n }\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n store: updatedStore,\n message: \"Store updated successfully\",\n };\n }),\n\n deleteStore: protectedProcedure\n .input(z.object({\n storeId: z.number(),\n }))\n .mutation(async ({ input, ctx }): Promise<{ message: string }> => {\n const { storeId } = input;\n\n const result = await deleteStoreFromDb(storeId);\n\n /*\n // Old implementation - direct DB query with transaction:\n const result = await db.transaction(async (tx) => {\n // First, update all products of this store to set storeId to null\n await tx\n .update(productInfo)\n .set({ storeId: null })\n .where(eq(productInfo.storeId, storeId));\n\n // Then delete the store\n const [deletedStore] = await tx\n .delete(storeInfo)\n .where(eq(storeInfo.id, storeId))\n .returning();\n\n if (!deletedStore) {\n throw new ApiError(\"Store not found\", 404);\n }\n\n return {\n message: \"Store deleted successfully\",\n };\n });\n */\n\n // Reinitialize stores to reflect changes (outside transaction)\n scheduleStoreInitialization()\n\n return result;\n }),\n});\n", "import { router, protectedProcedure } from \"@/src/trpc/trpc-index\"\nimport { z } from \"zod\";\n\nconst initiateRefundSchema = z\n .object({\n orderId: z.number(),\n refundPercent: z.number().min(0).max(100).optional(),\n refundAmount: z.number().min(0).optional(),\n })\n .refine(\n (data) => {\n const hasPercent = data.refundPercent !== undefined;\n const hasAmount = data.refundAmount !== undefined;\n return (hasPercent && !hasAmount) || (!hasPercent && hasAmount);\n },\n {\n message:\n \"Provide either refundPercent or refundAmount, not both or neither\",\n }\n );\n\nexport const adminPaymentsRouter = router({\n initiateRefund: protectedProcedure\n .input(initiateRefundSchema)\n .mutation(async ({ input }) => {\n return {}\n }),\n});\n", "import { z } from 'zod';\nimport { protectedProcedure, router } from '@/src/trpc/trpc-index'\nimport { extractKeyFromPresignedUrl, generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error';\nimport { scheduleStoreInitialization } from '@/src/stores/store-initializer'\nimport {\n getBanners as getBannersFromDb,\n getBannerById as getBannerByIdFromDb,\n createBanner as createBannerInDb,\n updateBanner as updateBannerInDb,\n deleteBanner as deleteBannerFromDb,\n} from '@/src/dbService'\nimport type { Banner } from '@packages/shared'\n\n\nexport const bannerRouter = router({\n // Get all banners\n getBanners: protectedProcedure\n .query(async (): Promise<{ banners: Banner[] }> => {\n try {\n\n // Using dbService helper (new implementation)\n const banners = await getBannersFromDb();\n\n \n // Old implementation - direct DB query:\n // const banners = await db.query.homeBanners.findMany({\n // orderBy: desc(homeBanners.createdAt), // Order by creation date instead\n // Removed product relationship since we now use productIds array\n // });\n \n\n // Convert S3 keys to signed URLs for client\n const bannersWithSignedUrls = await Promise.all(\n banners.map(async (banner) => {\n try {\n return {\n ...banner,\n imageUrl: banner.imageUrl ? await generateSignedUrlFromS3Url(banner.imageUrl) : banner.imageUrl,\n // Ensure productIds is always an array\n productIds: banner.productIds || [],\n };\n } catch (error) {\n console.error(`Failed to generate signed URL for banner ${banner.id}:`, error);\n return {\n ...banner,\n imageUrl: banner.imageUrl, // Keep original on error\n // Ensure productIds is always an array\n productIds: banner.productIds || [],\n };\n }\n })\n );\n\n return {\n banners: bannersWithSignedUrls,\n };\n }\n catch(e:any) {\n console.log(e)\n \n throw new ApiError(e.message);\n }\n }),\n\n // Get single banner by ID\n getBanner: protectedProcedure\n .input(z.object({ id: z.number() }))\n .query(async ({ input }): Promise => {\n // Using dbService helper (new implementation)\n const banner = await getBannerByIdFromDb(input.id);\n \n /*\n // Old implementation - direct DB query:\n const banner = await db.query.homeBanners.findFirst({\n where: eq(homeBanners.id, input.id),\n // Removed product relationship since we now use productIds array\n });\n */\n\n if (banner) {\n try {\n // Convert S3 key to signed URL for client\n if (banner.imageUrl) {\n banner.imageUrl = await generateSignedUrlFromS3Url(banner.imageUrl);\n }\n } catch (error) {\n console.error(`Failed to generate signed URL for banner ${banner.id}:`, error);\n // Keep original imageUrl on error\n }\n\n // Ensure productIds is always an array (handle migration compatibility)\n if (!banner.productIds) {\n banner.productIds = [];\n }\n }\n\n return banner;\n }),\n\n // Create new banner\n createBanner: protectedProcedure\n .input(z.object({\n name: z.string().min(1),\n imageUrl: z.string().url(),\n description: z.string().optional(),\n productIds: z.array(z.number()).optional(),\n redirectUrl: z.string().url().optional(),\n // serialNum removed completely\n }))\n .mutation(async ({ input }): Promise => {\n try {\n // Using dbService helper (new implementation)\n const imageUrl = extractKeyFromPresignedUrl(input.imageUrl)\n const banner = await createBannerInDb({\n name: input.name,\n imageUrl: imageUrl,\n description: input.description ?? null,\n productIds: input.productIds || [],\n redirectUrl: input.redirectUrl ?? null,\n serialNum: 999, // Default value, not used\n isActive: false, // Default to inactive\n });\n\n /*\n // Old implementation - direct DB query:\n const imageUrl = extractKeyFromPresignedUrl(input.imageUrl)\n const [banner] = await db.insert(homeBanners).values({\n name: input.name,\n imageUrl: imageUrl,\n description: input.description,\n productIds: input.productIds || [],\n redirectUrl: input.redirectUrl,\n serialNum: 999, // Default value, not used\n isActive: false, // Default to inactive\n }).returning();\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return banner;\n } catch (error) {\n console.error('Error creating banner:', error);\n throw error; // Re-throw to maintain tRPC error handling\n }\n }),\n\n // Update banner\n updateBanner: protectedProcedure\n .input(z.object({\n id: z.number(),\n name: z.string().min(1).optional(),\n imageUrl: z.string().url().optional(),\n description: z.string().optional(),\n productIds: z.array(z.number()).optional(),\n redirectUrl: z.string().url().optional(),\n serialNum: z.number().nullable().optional(),\n isActive: z.boolean().optional(),\n }))\n .mutation(async ({ input }): Promise => {\n try {\n // Using dbService helper (new implementation)\n const { id, ...updateData } = input;\n\n // Extract S3 key from presigned URL if imageUrl is provided\n const processedData = {\n ...updateData,\n ...(updateData.imageUrl && {\n imageUrl: extractKeyFromPresignedUrl(updateData.imageUrl)\n }),\n };\n\n // Handle serialNum null case\n if ('serialNum' in processedData && processedData.serialNum === null) {\n processedData.serialNum = null;\n }\n\n const banner = await updateBannerInDb(id, processedData);\n\n /*\n // Old implementation - direct DB query:\n const { id, ...updateData } = input;\n const incomingProductIds = input.productIds;\n // Extract S3 key from presigned URL if imageUrl is provided\n const processedData = {\n ...updateData,\n ...(updateData.imageUrl && {\n imageUrl: extractKeyFromPresignedUrl(updateData.imageUrl)\n }),\n };\n\n // Handle serialNum null case\n const finalData: any = { ...processedData };\n if ('serialNum' in finalData && finalData.serialNum === null) {\n // Set to null explicitly\n finalData.serialNum = null;\n }\n\n const [banner] = await db.update(homeBanners)\n .set({ ...finalData, lastUpdated: new Date(), })\n .where(eq(homeBanners.id, id))\n .returning();\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return banner;\n } catch (error) {\n console.error('Error updating banner:', error);\n throw error;\n }\n }),\n\n // Delete banner\n deleteBanner: protectedProcedure\n .input(z.object({ id: z.number() }))\n .mutation(async ({ input }): Promise<{ success: true }> => {\n // Using dbService helper (new implementation)\n await deleteBannerFromDb(input.id);\n\n /*\n // Old implementation - direct DB query:\n await db.delete(homeBanners).where(eq(homeBanners.id, input.id));\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return { success: true };\n }),\n});\n", "import { protectedProcedure } from '@/src/trpc/trpc-index';\nimport { z } from 'zod';\nimport { ApiError } from '@/src/lib/api-error';\nimport { notificationQueue } from '@/src/lib/notif-job';\nimport { recomputeUserNegativityScore } from '@/src/stores/user-negativity-store';\nimport {\n createUserByMobile,\n getUserByMobile,\n getUnresolvedComplaintsCount,\n getAllUsersWithFilters,\n getOrderCountsByUserIds,\n getLastOrdersByUserIds,\n getSuspensionStatusesByUserIds,\n getUserBasicInfo,\n getUserSuspensionStatus,\n getUserOrders,\n getOrderStatusesByOrderIds,\n getItemCountsByOrderIds,\n upsertUserSuspension,\n searchUsers,\n getAllNotifCreds,\n getAllUnloggedTokens,\n getNotifTokensByUserIds,\n getUserIncidentsWithRelations,\n createUserIncident,\n} from '@/src/dbService';\n\nexport const userRouter = {\n createUserByMobile: protectedProcedure\n .input(z.object({\n mobile: z.string().min(1, 'Mobile number is required'),\n }))\n .mutation(async ({ input }) => {\n // Clean mobile number (remove non-digits)\n const cleanMobile = input.mobile.replace(/\\D/g, '');\n\n // Validate: exactly 10 digits\n if (cleanMobile.length !== 10) {\n throw new ApiError('Mobile number must be exactly 10 digits', 400);\n }\n\n // Check if user already exists\n const existingUser = await getUserByMobile(cleanMobile);\n\n if (existingUser) {\n throw new ApiError('User with this mobile number already exists', 409);\n }\n\n const newUser = await createUserByMobile(cleanMobile);\n\n return {\n success: true,\n data: newUser,\n };\n }),\n\n getEssentials: protectedProcedure\n .query(async () => {\n const count = await getUnresolvedComplaintsCount();\n \n return {\n unresolvedComplaints: count,\n };\n }),\n\n getAllUsers: protectedProcedure\n .input(z.object({\n limit: z.number().min(1).max(100).default(50),\n cursor: z.number().optional(),\n search: z.string().optional(),\n }))\n .query(async ({ input }) => {\n const { limit, cursor, search } = input;\n \n const { users: usersToReturn, hasMore } = await getAllUsersWithFilters(limit, cursor, search);\n\n // Get order stats for each user\n const userIds = usersToReturn.map((u: any) => u.id);\n \n const orderCounts = await getOrderCountsByUserIds(userIds);\n const lastOrders = await getLastOrdersByUserIds(userIds);\n const suspensionStatuses = await getSuspensionStatusesByUserIds(userIds);\n \n // Create lookup maps\n const orderCountMap = new Map(orderCounts.map(o => [o.userId, o.totalOrders]));\n const lastOrderMap = new Map(lastOrders.map(o => [o.userId, o.lastOrderDate]));\n const suspensionMap = new Map(suspensionStatuses.map(s => [s.userId, s.isSuspended]));\n\n // Combine data\n const usersWithStats = usersToReturn.map((user: any) => ({\n ...user,\n totalOrders: orderCountMap.get(user.id) || 0,\n lastOrderDate: lastOrderMap.get(user.id) || null,\n isSuspended: suspensionMap.get(user.id) ?? false,\n }));\n\n // Get next cursor\n const nextCursor = hasMore ? usersToReturn[usersToReturn.length - 1].id : undefined;\n\n return {\n users: usersWithStats,\n nextCursor,\n hasMore,\n };\n }),\n\n getUserDetails: protectedProcedure\n .input(z.object({\n userId: z.number(),\n }))\n .query(async ({ input }) => {\n const { userId } = input;\n\n // Get user info\n const user = await getUserBasicInfo(userId);\n\n if (!user) {\n throw new ApiError('User not found', 404);\n }\n\n // Get user suspension status\n const isSuspended = await getUserSuspensionStatus(userId);\n\n // Get all orders for this user\n const userOrders = await getUserOrders(userId);\n\n // Get order status for each order\n const orderIds = userOrders.map((o: any) => o.id);\n const orderStatuses = await getOrderStatusesByOrderIds(orderIds);\n\n // Get item counts for each order\n const itemCounts = await getItemCountsByOrderIds(orderIds);\n\n // Create lookup maps\n const statusMap = new Map(orderStatuses.map(s => [s.orderId, s]));\n const itemCountMap = new Map(itemCounts.map(c => [c.orderId, c.itemCount]));\n\n // Determine status string\n const getStatus = (status: { isDelivered: boolean; isCancelled: boolean } | undefined) => {\n if (!status) return 'pending';\n if (status.isCancelled) return 'cancelled';\n if (status.isDelivered) return 'delivered';\n return 'pending';\n };\n\n // Combine data\n const ordersWithDetails = userOrders.map((order: any) => {\n const status = statusMap.get(order.id);\n return {\n id: order.id,\n readableId: order.readableId,\n totalAmount: order.totalAmount,\n createdAt: order.createdAt,\n isFlashDelivery: order.isFlashDelivery,\n status: getStatus(status),\n itemCount: itemCountMap.get(order.id) || 0,\n };\n });\n\n return {\n user: {\n ...user,\n isSuspended,\n },\n orders: ordersWithDetails,\n };\n }),\n\n updateUserSuspension: protectedProcedure\n .input(z.object({\n userId: z.number(),\n isSuspended: z.boolean(),\n }))\n .mutation(async ({ input }) => {\n const { userId, isSuspended } = input;\n\n await upsertUserSuspension(userId, isSuspended);\n\n return {\n success: true,\n message: `User ${isSuspended ? 'suspended' : 'unsuspended'} successfully`,\n };\n }),\n\n getUsersForNotification: protectedProcedure\n .input(z.object({\n search: z.string().optional(),\n }))\n .query(async ({ input }) => {\n const { search } = input;\n\n const usersList = await searchUsers(search);\n\n // Get eligible users (have notif_creds entry)\n const eligibleUsers = await getAllNotifCreds();\n\n const eligibleSet = new Set(eligibleUsers.map(u => u.userId));\n\n return {\n users: usersList.map((user: any) => ({\n id: user.id,\n name: user.name,\n mobile: user.mobile,\n isEligibleForNotif: eligibleSet.has(user.id),\n })),\n };\n }),\n\n sendNotification: protectedProcedure\n .input(z.object({\n userIds: z.array(z.number()).default([]),\n title: z.string().min(1, 'Title is required'),\n text: z.string().min(1, 'Message is required'),\n imageUrl: z.string().optional(),\n }))\n .mutation(async ({ input }) => {\n const { userIds, title, text, imageUrl } = input;\n\n let tokens: string[] = [];\n\n if (userIds.length === 0) {\n // Send to all users - get tokens from both logged-in and unlogged users\n const loggedInTokens = await getAllNotifCreds();\n const unloggedTokens = await getAllUnloggedTokens();\n \n tokens = [\n ...loggedInTokens.map(t => t.token),\n ...unloggedTokens.map(t => t.token)\n ];\n } else {\n // Send to specific users - get their tokens\n const userTokens = await getNotifTokensByUserIds(userIds);\n tokens = userTokens.map(t => t.token);\n }\n\n // Queue one job per token\n let queuedCount = 0;\n for (const token of tokens) {\n try {\n await notificationQueue.add('send-admin-notification', {\n token,\n title,\n body: text,\n imageUrl: imageUrl || null,\n }, {\n attempts: 3,\n backoff: {\n type: 'exponential',\n delay: 2000,\n },\n });\n queuedCount++;\n } catch (error) {\n console.error(`Failed to queue notification for token:`, error);\n }\n }\n\n return {\n success: true,\n message: `Notification queued for ${queuedCount} users`,\n };\n }),\n\n getUserIncidents: protectedProcedure\n .input(z.object({\n userId: z.number(),\n }))\n .query(async ({ input }) => {\n const { userId } = input;\n\n const incidents = await getUserIncidentsWithRelations(userId);\n\n return {\n incidents: incidents.map((incident: any) => ({\n id: incident.id,\n userId: incident.userId,\n orderId: incident.orderId,\n dateAdded: incident.dateAdded,\n adminComment: incident.adminComment,\n addedBy: incident.addedBy?.name || 'Unknown',\n negativityScore: incident.negativityScore,\n orderStatus: incident.order?.orderStatus?.[0]?.isCancelled ? 'cancelled' : 'active',\n })),\n };\n }),\n\n addUserIncident: protectedProcedure\n .input(z.object({\n userId: z.number(),\n orderId: z.number().optional(),\n adminComment: z.string().optional(),\n negativityScore: z.number().optional(),\n }))\n .mutation(async ({ input, ctx }) => {\n const { userId, orderId, adminComment, negativityScore } = input;\n \n const adminUserId = ctx.staffUser?.id;\n \n if (!adminUserId) {\n throw new ApiError('Admin user not authenticated', 401);\n }\n\n const incident = await createUserIncident(\n userId,\n orderId,\n adminComment,\n adminUserId,\n negativityScore\n );\n\n recomputeUserNegativityScore(userId);\n\n return {\n success: true,\n data: incident,\n };\n }),\n};\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport { computeConstants } from '@/src/lib/const-store'\nimport { CONST_KEYS } from '@/src/lib/const-keys'\nimport { getAllConstants as getAllConstantsFromDb, upsertConstants as upsertConstantsInDb } from '@/src/dbService'\nimport type { Constant, ConstantUpdateResult } from '@packages/shared'\n\nexport const constRouter = router({\n getConstants: protectedProcedure\n .query(async (): Promise => {\n // Using dbService helper (new implementation)\n const constants = await getAllConstantsFromDb();\n\n /*\n // Old implementation - direct DB query:\n const constants = await db.select().from(keyValStore);\n\n const resp = constants.map(c => ({\n key: c.key,\n value: c.value,\n }));\n */\n \n return constants;\n }),\n\n updateConstants: protectedProcedure\n .input(z.object({\n constants: z.array(z.object({\n key: z.string(),\n value: z.any(),\n })),\n }))\n .mutation(async ({ input }): Promise => {\n const { constants } = input;\n\n const validKeys = Object.values(CONST_KEYS) as string[];\n const invalidKeys = constants\n .filter(c => !validKeys.includes(c.key))\n .map(c => c.key);\n\n if (invalidKeys.length > 0) {\n throw new Error(`Invalid constant keys: ${invalidKeys.join(', ')}`);\n }\n\n // Using dbService helper (new implementation)\n await upsertConstantsInDb(constants);\n\n /*\n // Old implementation - direct DB query:\n await db.transaction(async (tx) => {\n for (const { key, value } of constants) {\n await tx.insert(keyValStore)\n .values({ key, value })\n .onConflictDoUpdate({\n target: keyValStore.key,\n set: { value },\n });\n }\n });\n */\n\n // Refresh all constants in Redis after database update\n await computeConstants();\n\n return {\n success: true,\n updatedCount: constants.length,\n keys: constants.map(c => c.key),\n };\n }),\n});\n", "import { router } from '@/src/trpc/trpc-index';\nimport { addressRouter } from '@/src/trpc/apis/user-apis/apis/address';\nimport { authRouter } from '@/src/trpc/apis/user-apis/apis/auth';\nimport { bannerRouter } from '@/src/trpc/apis/user-apis/apis/banners';\nimport { cartRouter } from '@/src/trpc/apis/user-apis/apis/cart';\nimport { complaintRouter } from '@/src/trpc/apis/user-apis/apis/complaint';\nimport { orderRouter } from '@/src/trpc/apis/user-apis/apis/order';\nimport { productRouter } from '@/src/trpc/apis/user-apis/apis/product';\nimport { slotsRouter } from '@/src/trpc/apis/user-apis/apis/slots';\nimport { userRouter as userDataRouter } from '@/src/trpc/apis/user-apis/apis/user';\nimport { userCouponRouter } from '@/src/trpc/apis/user-apis/apis/coupon';\nimport { paymentRouter } from '@/src/trpc/apis/user-apis/apis/payments';\nimport { storesRouter } from '@/src/trpc/apis/user-apis/apis/stores';\nimport { fileUploadRouter } from '@/src/trpc/apis/user-apis/apis/file-upload';\nimport { tagsRouter } from '@/src/trpc/apis/user-apis/apis/tags';\n\nexport const userRouter = router({\n address: addressRouter,\n auth: authRouter,\n banner: bannerRouter,\n cart: cartRouter,\n complaint: complaintRouter,\n order: orderRouter,\n product: productRouter,\n slots: slotsRouter,\n user: userDataRouter,\n coupon: userCouponRouter,\n payment: paymentRouter,\n stores: storesRouter,\n fileUpload: fileUploadRouter,\n tags: tagsRouter,\n});\n\nexport type UserRouter = typeof userRouter;\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { extractCoordsFromRedirectUrl } from '@/src/lib/license-util'\nimport {\n getUserDefaultAddress as getDefaultAddressInDb,\n getUserAddresses as getUserAddressesInDb,\n getUserAddressById as getUserAddressByIdInDb,\n clearUserDefaultAddress as clearDefaultAddressInDb,\n createUserAddress as createUserAddressInDb,\n updateUserAddress as updateUserAddressInDb,\n deleteUserAddress as deleteUserAddressInDb,\n hasOngoingOrdersForAddress as hasOngoingOrdersForAddressInDb,\n} from '@/src/dbService'\nimport type {\n UserAddressResponse,\n UserAddressesResponse,\n UserAddressDeleteResponse,\n} from '@packages/shared'\n\nexport const addressRouter = router({\n getDefaultAddress: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n const defaultAddress = await getDefaultAddressInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const [defaultAddress] = await db\n .select()\n .from(addresses)\n .where(and(eq(addresses.userId, userId), eq(addresses.isDefault, true)))\n .limit(1);\n */\n\n return { success: true, data: defaultAddress }\n }),\n\n getUserAddresses: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n const userAddresses = await getUserAddressesInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const userAddresses = await db.select().from(addresses).where(eq(addresses.userId, userId));\n */\n\n return { success: true, data: userAddresses }\n }),\n\n createAddress: protectedProcedure\n .input(z.object({\n name: z.string().min(1, 'Name is required'),\n phone: z.string().min(1, 'Phone is required'),\n addressLine1: z.string().min(1, 'Address line 1 is required'),\n addressLine2: z.string().optional(),\n city: z.string().min(1, 'City is required'),\n state: z.string().min(1, 'State is required'),\n pincode: z.string().min(1, 'Pincode is required'),\n isDefault: z.boolean().optional(),\n latitude: z.number().optional(),\n longitude: z.number().optional(),\n googleMapsUrl: z.string().optional(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { name, phone, addressLine1, addressLine2, city, state, pincode, isDefault, googleMapsUrl } = input;\n\n let { latitude, longitude } = input;\n\n if (googleMapsUrl && latitude === undefined && longitude === undefined) {\n const coords = await extractCoordsFromRedirectUrl(googleMapsUrl);\n if (coords) {\n latitude = Number(coords.latitude);\n longitude = Number(coords.longitude);\n }\n }\n\n // Validate required fields\n if (!name || !phone || !addressLine1 || !city || !state || !pincode) {\n throw new Error('Missing required fields');\n }\n\n // If setting as default, unset other defaults\n if (isDefault) {\n await clearDefaultAddressInDb(userId)\n }\n\n const newAddress = await createUserAddressInDb({\n userId,\n name,\n phone,\n addressLine1,\n addressLine2,\n city,\n state,\n pincode,\n isDefault: isDefault || false,\n latitude,\n longitude,\n googleMapsUrl,\n })\n\n /*\n // Old implementation - direct DB queries:\n if (isDefault) {\n await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId));\n }\n\n const [newAddress] = await db.insert(addresses).values({\n userId,\n name,\n phone,\n addressLine1,\n addressLine2,\n city,\n state,\n pincode,\n isDefault: isDefault || false,\n latitude,\n longitude,\n googleMapsUrl,\n }).returning();\n */\n\n return { success: true, data: newAddress }\n }),\n\n updateAddress: protectedProcedure\n .input(z.object({\n id: z.number().int().positive(),\n name: z.string().min(1, 'Name is required'),\n phone: z.string().min(1, 'Phone is required'),\n addressLine1: z.string().min(1, 'Address line 1 is required'),\n addressLine2: z.string().optional(),\n city: z.string().min(1, 'City is required'),\n state: z.string().min(1, 'State is required'),\n pincode: z.string().min(1, 'Pincode is required'),\n isDefault: z.boolean().optional(),\n latitude: z.number().optional(),\n longitude: z.number().optional(),\n googleMapsUrl: z.string().optional(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { id, name, phone, addressLine1, addressLine2, city, state, pincode, isDefault, googleMapsUrl } = input;\n\n let { latitude, longitude } = input;\n\n if (googleMapsUrl && latitude === undefined && longitude === undefined) {\n const coords = await extractCoordsFromRedirectUrl(googleMapsUrl);\n if (coords) {\n latitude = Number(coords.latitude);\n longitude = Number(coords.longitude);\n }\n }\n\n // Check if address exists and belongs to user\n const existingAddress = await getUserAddressByIdInDb(userId, id)\n if (!existingAddress) {\n throw new Error('Address not found')\n }\n\n // If setting as default, unset other defaults\n if (isDefault) {\n await clearDefaultAddressInDb(userId)\n }\n\n const updatedAddress = await updateUserAddressInDb({\n userId,\n addressId: id,\n name,\n phone,\n addressLine1,\n addressLine2,\n city,\n state,\n pincode,\n isDefault: isDefault || false,\n googleMapsUrl,\n latitude,\n longitude,\n })\n\n /*\n // Old implementation - direct DB queries:\n if (isDefault) {\n await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId));\n }\n\n const updateData: any = {\n name,\n phone,\n addressLine1,\n addressLine2,\n city,\n state,\n pincode,\n isDefault: isDefault || false,\n googleMapsUrl,\n };\n\n if (latitude !== undefined) {\n updateData.latitude = latitude;\n }\n if (longitude !== undefined) {\n updateData.longitude = longitude;\n }\n\n const [updatedAddress] = await db.update(addresses).set(updateData).where(and(eq(addresses.id, id), eq(addresses.userId, userId))).returning();\n */\n\n return { success: true, data: updatedAddress }\n }),\n\n deleteAddress: protectedProcedure\n .input(z.object({\n id: z.number().int().positive(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { id } = input;\n\n const existingAddress = await getUserAddressByIdInDb(userId, id)\n if (!existingAddress) {\n throw new Error('Address not found or does not belong to user')\n }\n\n const hasOngoingOrders = await hasOngoingOrdersForAddressInDb(id)\n if (hasOngoingOrders) {\n throw new Error('Address is attached to an ongoing order. Please cancel the order first.')\n }\n\n if (existingAddress.isDefault) {\n throw new Error('Cannot delete default address. Please set another address as default first.')\n }\n\n const deleted = await deleteUserAddressInDb(userId, id)\n\n /*\n // Old implementation - direct DB queries:\n const existingAddress = await db.select().from(addresses).where(and(eq(addresses.id, id), eq(addresses.userId, userId))).limit(1);\n if (existingAddress.length === 0) {\n throw new Error('Address not found or does not belong to user');\n }\n\n const ongoingOrders = await db.select({\n order: orders,\n status: orderStatus,\n slot: deliverySlotInfo\n })\n .from(orders)\n .innerJoin(orderStatus, eq(orders.id, orderStatus.orderId))\n .innerJoin(deliverySlotInfo, eq(orders.slotId, deliverySlotInfo.id))\n .where(and(\n eq(orders.addressId, id),\n eq(orderStatus.isCancelled, false),\n gte(deliverySlotInfo.deliveryTime, new Date())\n ))\n .limit(1);\n\n if (ongoingOrders.length > 0) {\n throw new Error('Address is attached to an ongoing order. Please cancel the order first.');\n }\n\n if (existingAddress[0].isDefault) {\n throw new Error('Cannot delete default address. Please set another address as default first.');\n }\n\n await db.delete(addresses).where(and(eq(addresses.id, id), eq(addresses.userId, userId)));\n */\n\n if (!deleted) {\n throw new Error('Address not found or does not belong to user')\n }\n\n return { success: true, message: 'Address deleted successfully' }\n }),\n});\n", "import axios from 'axios';\n\nexport async function extractCoordsFromRedirectUrl(url: string): Promise<{ latitude: string; longitude: string } | null> {\n try {\n await axios.get(url, { maxRedirects: 0 });\n return null;\n } catch (error: any) {\n if (error.response?.status === 302 || error.response?.status === 301) {\n const redirectUrl = error.response.headers.location;\n const coordsMatch = redirectUrl.match(/!3d([-\\d.]+)!4d([-\\d.]+)/);\n if (coordsMatch) {\n return {\n latitude: coordsMatch[1],\n longitude: coordsMatch[2],\n };\n }\n }\n return null;\n }\n}\n", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport bcrypt from 'bcryptjs'\nimport { SignJWT } from 'jose';\nimport { generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error'\nimport { encodedJwtSecret } from '@/src/lib/env-exporter'\nimport { sendOtp, verifyOtpUtil, getOtpCreds } from '@/src/lib/otp-utils'\nimport {\n getUserAuthByEmail as getUserAuthByEmailInDb,\n getUserAuthByMobile as getUserAuthByMobileInDb,\n getUserAuthById as getUserAuthByIdInDb,\n getUserAuthCreds as getUserAuthCredsInDb,\n getUserAuthDetails as getUserAuthDetailsInDb,\n createUserAuthWithMobile as createUserAuthWithMobileInDb,\n upsertUserAuthPassword as upsertUserAuthPasswordInDb,\n deleteUserAuthAccount as deleteUserAuthAccountInDb,\n createUserWithProfile as createUserWithProfileInDb,\n updateUserProfile as updateUserProfileInDb,\n getUserDetailsByUserId as getUserDetailsByUserIdInDb,\n} from '@/src/dbService'\nimport type {\n UserAuthResult,\n UserAuthResponse,\n UserOtpVerifyResponse,\n UserPasswordUpdateResponse,\n UserProfileResponse,\n UserDeleteAccountResponse,\n} from '@packages/shared'\n\ninterface LoginRequest {\n identifier: string;\n password: string;\n}\n\ninterface RegisterRequest {\n name: string;\n email: string;\n mobile: string;\n password: string;\n profileImageUrl?: string | null;\n}\n\nconst generateToken = async (userId: number): Promise => {\n return await new SignJWT({ userId })\n .setProtectedHeader({ alg: 'HS256' })\n .setExpirationTime('7d')\n .sign(encodedJwtSecret);\n};\n\n\n\nexport const authRouter = router({\n login: publicProcedure\n .input(z.object({\n identifier: z.string().min(1, 'Email/mobile is required'),\n password: z.string().min(1, 'Password is required'),\n }))\n .mutation(async ({ input }): Promise => {\n const { identifier, password }: LoginRequest = input;\n\n if (!identifier || !password) {\n throw new ApiError('Email/mobile and password are required', 400);\n }\n\n // Find user by email or mobile\n const user = await getUserAuthByEmailInDb(identifier.toLowerCase())\n let foundUser = user || null\n\n if (!foundUser) {\n // Try mobile if email didn't work\n const userByMobile = await getUserAuthByMobileInDb(identifier)\n foundUser = userByMobile || null\n }\n\n if (!foundUser) {\n throw new ApiError('Invalid credentials', 401);\n }\n\n // Get user credentials\n const userCredentials = await getUserAuthCredsInDb(foundUser.id)\n\n if (!userCredentials) {\n throw new ApiError('Account setup incomplete. Please contact support.', 401);\n }\n\n // Get user details for profile image\n const userDetail = await getUserAuthDetailsInDb(foundUser.id)\n\n // Generate signed URL for profile image if it exists\n const profileImageSignedUrl = userDetail?.profileImage\n ? await generateSignedUrlFromS3Url(userDetail.profileImage)\n : null;\n\n // Verify password\n const isPasswordValid = await bcrypt.compare(password, userCredentials.userPassword);\n if (!isPasswordValid) {\n throw new ApiError('Invalid credentials', 401);\n }\n\n const token = await generateToken(foundUser.id);\n\n const response: UserAuthResponse = {\n token,\n user: {\n id: foundUser.id,\n name: foundUser.name,\n email: foundUser.email,\n mobile: foundUser.mobile,\n createdAt: foundUser.createdAt.toISOString(),\n profileImage: profileImageSignedUrl,\n bio: userDetail?.bio || null,\n dateOfBirth: userDetail?.dateOfBirth\n ? new Date(userDetail.dateOfBirth as any).toISOString()\n : null,\n gender: userDetail?.gender || null,\n occupation: userDetail?.occupation || null,\n },\n };\n\n return {\n success: true,\n data: response,\n }\n }),\n\n register: publicProcedure\n .input(z.object({\n name: z.string().min(1, 'Name is required'),\n email: z.string().email('Invalid email format'),\n mobile: z.string().min(1, 'Mobile is required'),\n password: z.string().min(1, 'Password is required'),\n profileImageUrl: z.string().nullable().optional(),\n }))\n .mutation(async ({ input }): Promise => {\n const { name, email, mobile, password, profileImageUrl }: RegisterRequest = input;\n\n if (!name || !email || !mobile || !password) {\n throw new ApiError('All fields are required', 400);\n }\n\n // Validate email format\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!emailRegex.test(email)) {\n throw new ApiError('Invalid email format', 400);\n }\n\n // Validate mobile format (Indian mobile numbers)\n const cleanMobile = mobile.replace(/\\D/g, '');\n if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) {\n throw new ApiError('Invalid mobile number', 400);\n }\n\n // Check if email already exists\n const existingEmail = await getUserAuthByEmailInDb(email.toLowerCase())\n\n if (existingEmail) {\n throw new ApiError('Email already registered', 409);\n }\n\n // Check if mobile already exists\n const existingMobile = await getUserAuthByMobileInDb(cleanMobile)\n\n if (existingMobile) {\n throw new ApiError('Mobile number already registered', 409);\n }\n\n // Hash password\n const hashedPassword = await bcrypt.hash(password, 12);\n\n // Create user and credentials in a transaction\n const newUser = await createUserWithProfileInDb({\n name: name.trim(),\n email: email.toLowerCase().trim(),\n mobile: cleanMobile,\n hashedPassword,\n profileImage: profileImageUrl ?? null,\n })\n\n const token = await generateToken(newUser.id);\n\n const profileImageSignedUrl = profileImageUrl\n ? await generateSignedUrlFromS3Url(profileImageUrl)\n : null\n\n const response: UserAuthResponse = {\n token,\n user: {\n id: newUser.id,\n name: newUser.name,\n email: newUser.email,\n mobile: newUser.mobile,\n createdAt: newUser.createdAt.toISOString(),\n profileImage: profileImageSignedUrl,\n },\n };\n\n return {\n success: true,\n data: response,\n }\n }),\n\n sendOtp: publicProcedure\n .input(z.object({\n mobile: z.string(),\n }))\n .mutation(async ({ input }) => {\n \n return await sendOtp(input.mobile);\n }),\n\n verifyOtp: publicProcedure\n .input(z.object({\n mobile: z.string(),\n otp: z.string(),\n }))\n .mutation(async ({ input }): Promise => {\n const verificationId = getOtpCreds(input.mobile);\n if (!verificationId) {\n throw new ApiError(\"OTP not sent or expired\", 400);\n }\n const isVerified = await verifyOtpUtil(input.mobile, input.otp, verificationId);\n\n if (!isVerified) {\n throw new ApiError(\"Invalid OTP\", 400);\n }\n\n // Find user\n let user = await getUserAuthByMobileInDb(input.mobile)\n\n // If user doesn't exist, create one\n if (!user) {\n user = await createUserAuthWithMobileInDb(input.mobile)\n }\n\n // Generate JWT\n const token = await generateToken(user.id);\n\n return {\n success: true,\n token,\n user: {\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n createdAt: user.createdAt.toISOString(),\n profileImage: null,\n },\n }\n }),\n\n updatePassword: protectedProcedure\n .input(z.object({\n password: z.string().min(6, 'Password must be at least 6 characters'),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const hashedPassword = await bcrypt.hash(input.password, 10);\n\n // Insert if not exists, then update if exists\n await upsertUserAuthPasswordInDb(userId, hashedPassword)\n\n /*\n // Old implementation - direct DB queries:\n try {\n await db.insert(userCreds).values({\n userId: userId,\n userPassword: hashedPassword,\n });\n } catch (error: any) {\n if (error.code === '23505') {\n await db.update(userCreds).set({\n userPassword: hashedPassword,\n }).where(eq(userCreds.userId, userId));\n } else {\n throw error;\n }\n }\n */\n\n return { success: true, message: 'Password updated successfully' }\n }),\n\n updateProfile: protectedProcedure\n .input(z.object({\n name: z.string().min(1).optional(),\n email: z.string().email('Invalid email format').optional(),\n mobile: z.string().min(1).optional(),\n password: z.string().min(6, 'Password must be at least 6 characters').optional(),\n bio: z.string().optional().nullable(),\n dateOfBirth: z.string().optional().nullable(),\n gender: z.string().optional().nullable(),\n occupation: z.string().optional().nullable(),\n profileImageUrl: z.string().optional().nullable(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const { name, email, mobile, password, bio, dateOfBirth, gender, occupation, profileImageUrl } = input\n\n if (email) {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!emailRegex.test(email)) {\n throw new ApiError('Invalid email format', 400);\n }\n }\n\n if (mobile) {\n const cleanMobile = mobile.replace(/\\D/g, '');\n if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) {\n throw new ApiError('Invalid mobile number', 400);\n }\n }\n\n if (email) {\n const existingEmail = await getUserAuthByEmailInDb(email.toLowerCase())\n if (existingEmail && existingEmail.id !== userId) {\n throw new ApiError('Email already registered', 409)\n }\n }\n\n if (mobile) {\n const cleanMobile = mobile.replace(/\\D/g, '')\n const existingMobile = await getUserAuthByMobileInDb(cleanMobile)\n if (existingMobile && existingMobile.id !== userId) {\n throw new ApiError('Mobile number already registered', 409)\n }\n }\n\n let hashedPassword: string | undefined;\n if (password) {\n hashedPassword = await bcrypt.hash(password, 12)\n }\n\n const updatedUser = await updateUserProfileInDb(userId, {\n name: name?.trim(),\n email: email?.toLowerCase().trim(),\n mobile: mobile?.replace(/\\D/g, ''),\n hashedPassword,\n profileImage: profileImageUrl ?? undefined,\n bio: bio ?? undefined,\n dateOfBirth: dateOfBirth ? new Date(dateOfBirth) : undefined,\n gender: gender ?? undefined,\n occupation: occupation ?? undefined,\n })\n\n const userDetail = await getUserDetailsByUserIdInDb(userId)\n const profileImageSignedUrl = userDetail?.profileImage\n ? await generateSignedUrlFromS3Url(userDetail.profileImage)\n : null\n\n const authHeader = ctx.req.header('authorization');\n const token = authHeader?.replace('Bearer ', '') || ''\n\n const response: UserAuthResponse = {\n token,\n user: {\n id: updatedUser.id,\n name: updatedUser.name,\n email: updatedUser.email,\n mobile: updatedUser.mobile,\n createdAt: updatedUser.createdAt?.toISOString?.() || new Date().toISOString(),\n profileImage: profileImageSignedUrl,\n bio: userDetail?.bio || null,\n dateOfBirth: userDetail?.dateOfBirth\n ? new Date(userDetail.dateOfBirth as any).toISOString()\n : null,\n gender: userDetail?.gender || null,\n occupation: userDetail?.occupation || null,\n },\n }\n\n return {\n success: true,\n data: response,\n }\n }),\n\n getProfile: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const user = await getUserAuthByIdInDb(userId)\n\n if (!user) {\n throw new ApiError('User not found', 404);\n }\n\n return {\n success: true,\n data: {\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n },\n }\n }),\n\n deleteAccount: protectedProcedure\n .input(z.object({\n mobile: z.string().min(10, 'Mobile number is required'),\n }))\n .mutation(async ({ ctx, input }): Promise => {\n const userId = ctx.user.userId;\n const { mobile } = input;\n \n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n // Double-check: verify user exists and is the authenticated user\n const existingUser = await getUserAuthByIdInDb(userId)\n\n if (!existingUser) {\n throw new ApiError('User not found', 404);\n }\n\n // Additional verification: ensure we're not deleting someone else's data\n // The JWT token should already ensure this, but double-checking\n if (existingUser.id !== userId) {\n throw new ApiError('Unauthorized: Cannot delete another user\\'s account', 403);\n }\n\n // Verify mobile number matches user's registered mobile\n const cleanInputMobile = mobile.replace(/\\D/g, '');\n const cleanUserMobile = existingUser.mobile?.replace(/\\D/g, '');\n\n if (cleanInputMobile !== cleanUserMobile) {\n throw new ApiError('Mobile number does not match your registered number', 400);\n }\n\n // Use transaction for atomic deletion\n await deleteUserAuthAccountInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n await db.transaction(async (tx) => {\n await tx.delete(notifCreds).where(eq(notifCreds.userId, userId));\n await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.userId, userId));\n await tx.delete(couponUsage).where(eq(couponUsage.userId, userId));\n await tx.delete(complaints).where(eq(complaints.userId, userId));\n await tx.delete(cartItems).where(eq(cartItems.userId, userId));\n await tx.delete(notifications).where(eq(notifications.userId, userId));\n await tx.delete(productReviews).where(eq(productReviews.userId, userId));\n await tx.update(reservedCoupons)\n .set({ redeemedBy: null })\n .where(eq(reservedCoupons.redeemedBy, userId));\n\n const userOrders = await tx\n .select({ id: orders.id })\n .from(orders)\n .where(eq(orders.userId, userId));\n\n for (const order of userOrders) {\n await tx.delete(orderItems).where(eq(orderItems.orderId, order.id));\n await tx.delete(orderStatus).where(eq(orderStatus.orderId, order.id));\n await tx.delete(payments).where(eq(payments.orderId, order.id));\n await tx.delete(refunds).where(eq(refunds.orderId, order.id));\n await tx.delete(couponUsage).where(eq(couponUsage.orderId, order.id));\n await tx.delete(complaints).where(eq(complaints.orderId, order.id));\n }\n\n await tx.delete(orders).where(eq(orders.userId, userId));\n await tx.delete(addresses).where(eq(addresses.userId, userId));\n await tx.delete(userDetails).where(eq(userDetails.userId, userId));\n await tx.delete(userCreds).where(eq(userCreds.userId, userId));\n await tx.delete(users).where(eq(users.id, userId));\n });\n */\n\n return { success: true, message: 'Account deleted successfully' }\n }),\n});\n", "import { ApiError } from '@/src/lib/api-error'\nimport { otpSenderAuthToken } from '@/src/lib/env-exporter'\n\nconst otpStore = new Map();\n\nconst setOtpCreds = (phone: string, verificationId: string) => {\n otpStore.set(phone, verificationId);\n};\n\nexport function getOtpCreds(mobile: string) {\n const authKey = otpStore.get(mobile);\n\n return authKey || null;\n}\n\nexport const sendOtp = async (phone: string) => {\n if (!phone) {\n throw new ApiError(\"Phone number is required\", 400);\n }\n const reqUrl = `https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=${phone}&timeout=300`;\n const resp = await fetch(reqUrl, {\n headers: {\n authToken: otpSenderAuthToken,\n },\n method: \"POST\",\n });\n const data = await resp.json();\n\n if (data.message === \"SUCCESS\") {\n setOtpCreds(phone, data.data.verificationId);\n return { success: true, message: \"OTP sent successfully\", verificationId: data.data.verificationId };\n }\n if (data.message === \"REQUEST_ALREADY_EXISTS\") {\n return { success: true, message: \"OTP already sent. Last OTP is still valid\" };\n }\n\n throw new ApiError(\"Error while sending OTP. Please try again\", 500);\n};\n\nexport async function verifyOtpUtil(mobile: string, otp: string, verifId: string):Promise {\n const reqUrl = `https://cpaas.messagecentral.com/verification/v3/validateOtp?&verificationId=${verifId}&code=${otp}`;\n const resp = await fetch(reqUrl, {\n method: \"GET\",\n headers: {\n authToken: otpSenderAuthToken,\n },\n });\n\n const rawData = await resp.json();\n if (rawData.data?.verificationStatus === \"VERIFICATION_COMPLETED\") {\n // delete the verificationId from the local storage\n return true;\n }\n return false;\n}", "import { router, protectedProcedure, publicProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport { getMultipleProductsSlots } from '@/src/stores/slot-store'\nimport {\n getUserCartItemsWithProducts as getUserCartItemsWithProductsInDb,\n getUserProductById as getUserProductByIdInDb,\n getUserCartItemByUserProduct as getUserCartItemByUserProductInDb,\n incrementUserCartItemQuantity as incrementUserCartItemQuantityInDb,\n insertUserCartItem as insertUserCartItemInDb,\n updateUserCartItemQuantity as updateUserCartItemQuantityInDb,\n deleteUserCartItem as deleteUserCartItemInDb,\n clearUserCart as clearUserCartInDb,\n} from '@/src/dbService'\nimport type { UserCartResponse } from '@packages/shared'\n\nconst getCartData = async (userId: number): Promise => {\n const cartItemsWithProducts = await getUserCartItemsWithProductsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const cartItemsWithProducts = await db\n .select({\n cartId: cartItems.id,\n productId: productInfo.id,\n productName: productInfo.name,\n productPrice: productInfo.price,\n productImages: productInfo.images,\n productQuantity: productInfo.productQuantity,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n quantity: cartItems.quantity,\n addedAt: cartItems.addedAt,\n })\n .from(cartItems)\n .innerJoin(productInfo, eq(cartItems.productId, productInfo.id))\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(eq(cartItems.userId, userId));\n */\n\n const cartWithSignedUrls = cartItemsWithProducts.map((item) => ({\n ...item,\n product: {\n ...item.product,\n images: scaffoldAssetUrl(item.product.images || []),\n },\n }))\n\n const totalAmount = cartWithSignedUrls.reduce((sum, item) => sum + item.subtotal, 0)\n\n return {\n items: cartWithSignedUrls,\n totalItems: cartWithSignedUrls.length,\n totalAmount,\n }\n}\n\nexport const cartRouter = router({\n getCart: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n return await getCartData(userId);\n }),\n\n addToCart: protectedProcedure\n .input(z.object({\n productId: z.number().int().positive(),\n quantity: z.number().int().positive(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { productId, quantity } = input;\n\n // Validate input\n if (!productId || !quantity || quantity <= 0) {\n throw new ApiError(\"Product ID and positive quantity required\", 400);\n }\n\n // Check if product exists\n const product = await getUserProductByIdInDb(productId)\n\n if (!product) {\n throw new ApiError('Product not found', 404)\n }\n\n const existingItem = await getUserCartItemByUserProductInDb(userId, productId)\n\n if (existingItem) {\n await incrementUserCartItemQuantityInDb(existingItem.id, quantity)\n } else {\n await insertUserCartItemInDb(userId, productId, quantity)\n }\n\n /*\n // Old implementation - direct DB queries:\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n });\n\n if (!product) {\n throw new ApiError(\"Product not found\", 404);\n }\n\n const existingItem = await db.query.cartItems.findFirst({\n where: and(eq(cartItems.userId, userId), eq(cartItems.productId, productId)),\n });\n\n if (existingItem) {\n await db.update(cartItems)\n .set({\n quantity: sql`${cartItems.quantity} + ${quantity}`,\n })\n .where(eq(cartItems.id, existingItem.id));\n } else {\n await db.insert(cartItems).values({\n userId,\n productId,\n quantity: quantity.toString(),\n });\n }\n */\n\n // Return updated cart\n return await getCartData(userId)\n }),\n\n updateCartItem: protectedProcedure\n .input(z.object({\n itemId: z.number().int().positive(),\n quantity: z.number().int().min(0),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { itemId, quantity } = input;\n\n if (!quantity || quantity <= 0) {\n throw new ApiError(\"Positive quantity required\", 400);\n }\n\n const updated = await updateUserCartItemQuantityInDb(userId, itemId, quantity)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedItem] = await db.update(cartItems)\n .set({ quantity: quantity.toString() })\n .where(and(\n eq(cartItems.id, itemId),\n eq(cartItems.userId, userId)\n ))\n .returning();\n\n if (!updatedItem) {\n throw new ApiError(\"Cart item not found\", 404);\n }\n */\n\n if (!updated) {\n throw new ApiError('Cart item not found', 404)\n }\n\n // Return updated cart\n return await getCartData(userId)\n }),\n\n removeFromCart: protectedProcedure\n .input(z.object({\n itemId: z.number().int().positive(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { itemId } = input;\n\n const deleted = await deleteUserCartItemInDb(userId, itemId)\n\n /*\n // Old implementation - direct DB queries:\n const [deletedItem] = await db.delete(cartItems)\n .where(and(\n eq(cartItems.id, itemId),\n eq(cartItems.userId, userId)\n ))\n .returning();\n\n if (!deletedItem) {\n throw new ApiError(\"Cart item not found\", 404);\n }\n */\n\n if (!deleted) {\n throw new ApiError('Cart item not found', 404)\n }\n\n // Return updated cart\n return await getCartData(userId)\n }),\n\n clearCart: protectedProcedure\n .mutation(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n await clearUserCartInDb(userId)\n\n /*\n // Old implementation - direct DB query:\n await db.delete(cartItems).where(eq(cartItems.userId, userId));\n */\n\n return {\n items: [],\n totalItems: 0,\n totalAmount: 0,\n message: \"Cart cleared successfully\",\n }\n }),\n\n // Original DB-based getCartSlots (commented out)\n // getCartSlots: publicProcedure\n // .input(z.object({\n // productIds: z.array(z.number().int().positive())\n // }))\n // .query(async ({ input }) => {\n // const { productIds } = input;\n //\n // if (productIds.length === 0) {\n // return {};\n // }\n //\n // // Get slots for these products where freeze time is after current time\n // const slotsData = await db\n // .select({\n // productId: productSlots.productId,\n // slotId: deliverySlotInfo.id,\n // deliveryTime: deliverySlotInfo.deliveryTime,\n // freezeTime: deliverySlotInfo.freezeTime,\n // isActive: deliverySlotInfo.isActive,\n // })\n // .from(productSlots)\n // .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n // .where(and(\n // inArray(productSlots.productId, productIds),\n // gt(deliverySlotInfo.freezeTime, sql`NOW()`),\n // eq(deliverySlotInfo.isActive, true)\n // ));\n //\n // // Group by productId\n // const result: Record = {};\n // slotsData.forEach(slot => {\n // if (!result[slot.productId]) {\n // result[slot.productId] = [];\n // }\n // result[slot.productId].push({\n // id: slot.slotId,\n // deliveryTime: slot.deliveryTime,\n // freezeTime: slot.freezeTime,\n // });\n // });\n //\n // return result;\n // }),\n\n // Cache-based getCartSlots\n getCartSlots: publicProcedure\n .input(z.object({\n productIds: z.array(z.number().int().positive())\n }))\n .query(async ({ input }) => {\n const { productIds } = input;\n\n if (productIds.length === 0) {\n return {};\n }\n\n return await getMultipleProductsSlots(productIds);\n }),\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport {\n getUserComplaints as getUserComplaintsInDb,\n createUserComplaint as createUserComplaintInDb,\n} from '@/src/dbService'\nimport type { UserComplaintsResponse, UserRaiseComplaintResponse } from '@packages/shared'\n\nexport const complaintRouter = router({\n getAll: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n const userComplaints = await getUserComplaintsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const userComplaints = await db\n .select({\n id: complaints.id,\n complaintBody: complaints.complaintBody,\n response: complaints.response,\n isResolved: complaints.isResolved,\n createdAt: complaints.createdAt,\n orderId: complaints.orderId,\n })\n .from(complaints)\n .where(eq(complaints.userId, userId))\n .orderBy(complaints.createdAt);\n\n return {\n complaints: userComplaints.map(c => ({\n id: c.id,\n complaintBody: c.complaintBody,\n response: c.response,\n isResolved: c.isResolved,\n createdAt: c.createdAt,\n orderId: c.orderId,\n })),\n };\n */\n\n return {\n complaints: userComplaints,\n }\n }),\n\n raise: protectedProcedure\n .input(z.object({\n orderId: z.string().optional(),\n complaintBody: z.string().min(1, 'Complaint body is required'),\n imageUrls: z.array(z.string()).optional(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { orderId, complaintBody, imageUrls } = input;\n\n let orderIdNum: number | null = null;\n\n if (orderId) {\n const readableIdMatch = orderId.match(/^ORD(\\d+)$/);\n if (readableIdMatch) {\n orderIdNum = parseInt(readableIdMatch[1]);\n }\n }\n\n await createUserComplaintInDb(\n userId,\n orderIdNum,\n complaintBody.trim(),\n imageUrls && imageUrls.length > 0 ? imageUrls : null\n )\n\n /*\n // Old implementation - direct DB query:\n await db.insert(complaints).values({\n userId,\n orderId: orderIdNum,\n complaintBody: complaintBody.trim(),\n });\n */\n\n return { success: true, message: 'Complaint raised successfully' }\n }),\n});\n", "import { router, protectedProcedure } from \"@/src/trpc/trpc-index\";\nimport { z } from \"zod\";\nimport {\n applyDiscountToUserOrder,\n cancelUserOrderTransaction,\n checkUserSuspended,\n db,\n deleteUserCartItemsForOrder,\n getOrderProductById,\n getUserAddressByIdAndUser,\n getUserCouponUsageForOrder,\n getUserOrderBasic,\n getUserOrderByIdWithRelations,\n getUserOrderCount,\n getUserOrdersWithRelations,\n getUserProductIdsFromOrders,\n getUserProductsForRecentOrders,\n getUserRecentlyDeliveredOrderIds,\n getUserSlotCapacityStatus,\n orders,\n orderItems,\n orderStatus,\n placeUserOrderTransaction,\n recordUserCouponUsage,\n updateUserOrderNotes,\n validateAndGetUserCoupon,\n} from \"@/src/dbService\";\nimport { getNextDeliveryDate } from \"@/src/trpc/apis/common-apis/common\";\nimport { scaffoldAssetUrl } from \"@/src/lib/s3-client\";\nimport { ApiError } from \"@/src/lib/api-error\";\nimport {\n sendOrderPlacedNotification,\n sendOrderCancelledNotification,\n} from \"@/src/lib/notif-job\";\nimport { CONST_KEYS, getConstant, getConstants } from \"@/src/lib/const-store\";\nimport { publishFormattedOrder, publishCancellation } from \"@/src/lib/post-order-handler\";\nimport { getSlotById } from \"@/src/stores/slot-store\";\nimport type {\n UserOrdersResponse,\n UserOrderDetail,\n UserCancelOrderResponse,\n UserUpdateNotesResponse,\n UserRecentProductsResponse,\n} from \"@/src/dbService\";\n\nconst placeOrderUtil = async (params: {\n userId: number;\n selectedItems: Array<{\n productId: number;\n quantity: number;\n slotId: number | null;\n }>;\n addressId: number;\n paymentMethod: \"online\" | \"cod\";\n couponId?: number;\n userNotes?: string;\n isFlash?: boolean;\n}) => {\n const {\n userId,\n selectedItems,\n addressId,\n paymentMethod,\n couponId,\n userNotes,\n } = params;\n\n const constants = await getConstants([\n CONST_KEYS.minRegularOrderValue,\n CONST_KEYS.deliveryCharge,\n CONST_KEYS.flashFreeDeliveryThreshold,\n CONST_KEYS.flashDeliveryCharge,\n ]);\n\n const isFlashDelivery = params.isFlash;\n const minOrderValue = (isFlashDelivery ? constants[CONST_KEYS.flashFreeDeliveryThreshold] : constants[CONST_KEYS.minRegularOrderValue]) || 0;\n const deliveryCharge = (isFlashDelivery ? constants[CONST_KEYS.flashDeliveryCharge] : constants[CONST_KEYS.deliveryCharge]) || 0;\n\n const orderGroupId = `${Date.now()}-${userId}`;\n\n const address = await getUserAddressByIdAndUser(addressId, userId);\n if (!address) {\n throw new ApiError(\"Invalid address\", 400);\n }\n\n const ordersBySlot = new Map<\n number | null,\n Array<{\n productId: number;\n quantity: number;\n slotId: number | null;\n product: Awaited>;\n }>\n >();\n\n for (const item of selectedItems) {\n const product = await getOrderProductById(item.productId);\n if (!product) {\n throw new ApiError(`Product ${item.productId} not found`, 400);\n }\n\n if (!ordersBySlot.has(item.slotId)) {\n ordersBySlot.set(item.slotId, []);\n }\n ordersBySlot.get(item.slotId)!.push({ ...item, product });\n }\n\n if (params.isFlash) {\n for (const item of selectedItems) {\n const product = await getOrderProductById(item.productId);\n if (!product?.isFlashAvailable) {\n throw new ApiError(`Product ${item.productId} is not available for flash delivery`, 400);\n }\n }\n }\n\n let totalAmount = 0;\n for (const [slotId, items] of ordersBySlot) {\n const orderTotal = items.reduce(\n (sum, item) => {\n if (!item.product) return sum\n const basePrice = params.isFlash\n ? (item.product.flashPrice ?? item.product.price)\n : item.product.price\n const itemPrice = parseFloat((basePrice ?? 0).toString())\n return sum + itemPrice * item.quantity;\n },\n 0\n );\n totalAmount += orderTotal;\n }\n\n const appliedCoupon = await validateAndGetUserCoupon(couponId, userId, totalAmount);\n\n const expectedDeliveryCharge =\n totalAmount < minOrderValue ? deliveryCharge : 0;\n\n const totalWithDelivery = totalAmount + expectedDeliveryCharge;\n\n type OrderData = {\n order: Omit;\n orderItems: Omit[];\n orderStatus: Omit;\n };\n\n const ordersData: OrderData[] = [];\n let isFirstOrder = true;\n\n for (const [slotId, items] of ordersBySlot) {\n const subOrderTotal = items.reduce(\n (sum, item) => {\n if (!item.product) return sum\n const basePrice = params.isFlash\n ? (item.product.flashPrice ?? item.product.price)\n : item.product.price\n const itemPrice = parseFloat((basePrice ?? 0).toString())\n return sum + itemPrice * item.quantity;\n },\n 0\n );\n const subOrderTotalWithDelivery = subOrderTotal + expectedDeliveryCharge;\n\n const orderGroupProportion = subOrderTotal / totalAmount;\n const orderTotalAmount = isFirstOrder ? subOrderTotalWithDelivery : subOrderTotal;\n\n const { finalOrderTotal: finalOrderAmount } = applyDiscountToUserOrder(\n orderTotalAmount,\n appliedCoupon,\n orderGroupProportion\n );\n\n const order: Omit = {\n userId,\n addressId,\n slotId: params.isFlash ? null : slotId,\n isCod: paymentMethod === \"cod\",\n isOnlinePayment: paymentMethod === \"online\",\n paymentInfoId: null,\n totalAmount: finalOrderAmount.toString(),\n deliveryCharge: isFirstOrder ? expectedDeliveryCharge.toString() : \"0\",\n readableId: -1,\n userNotes: userNotes || null,\n orderGroupId,\n orderGroupProportion: orderGroupProportion.toString(),\n isFlashDelivery: params.isFlash,\n };\n\n const validItems = items.filter(\n (item): item is typeof item & { product: NonNullable } =>\n item.product !== null && item.product !== undefined\n )\n const orderItemsData: Omit[] = validItems.map(\n (item) => {\n const basePrice = params.isFlash\n ? (item.product.flashPrice ?? item.product.price)\n : item.product.price\n const priceString = (basePrice ?? 0).toString()\n\n return {\n orderId: 0,\n productId: item.productId,\n quantity: item.quantity.toString(),\n price: priceString,\n discountedPrice: priceString,\n }\n }\n );\n\n const orderStatusData: Omit = {\n userId,\n orderId: 0,\n paymentStatus: paymentMethod === \"cod\" ? \"cod\" : \"pending\",\n };\n\n ordersData.push({ order, orderItems: orderItemsData, orderStatus: orderStatusData });\n isFirstOrder = false;\n }\n\n const createdOrders = await placeUserOrderTransaction({\n userId,\n ordersData,\n paymentMethod,\n totalWithDelivery,\n });\n\n await deleteUserCartItemsForOrder(\n userId,\n selectedItems.map((item) => item.productId)\n );\n\n if (appliedCoupon && createdOrders.length > 0) {\n await recordUserCouponUsage(\n userId,\n appliedCoupon.id,\n createdOrders[0].id\n );\n }\n\n for (const order of createdOrders) {\n sendOrderPlacedNotification(userId, order.id.toString());\n }\n\n await publishFormattedOrder(createdOrders, ordersBySlot);\n\n return { success: true, data: createdOrders };\n};\n\nexport const orderRouter = router({\n placeOrder: protectedProcedure\n .input(\n z.object({\n selectedItems: z.array(\n z.object({\n productId: z.number().int().positive(),\n quantity: z.number().int().positive(),\n slotId: z.union([z.number().int(), z.null()]),\n })\n ),\n addressId: z.number().int().positive(),\n paymentMethod: z.enum([\"online\", \"cod\"]),\n couponId: z.number().int().positive().optional(),\n userNotes: z.string().optional(),\n isFlashDelivery: z.boolean().optional().default(false),\n })\n )\n .mutation(async ({ input, ctx }) => {\n const userId = ctx.user.userId;\n\n const isSuspended = await checkUserSuspended(userId);\n if (isSuspended) {\n throw new ApiError(\"Unable to place order\", 403);\n }\n\n const {\n selectedItems,\n addressId,\n paymentMethod,\n couponId,\n userNotes,\n isFlashDelivery,\n } = input;\n\n if (isFlashDelivery) {\n const isFlashDeliveryEnabled = await getConstant(CONST_KEYS.isFlashDeliveryEnabled);\n if (!isFlashDeliveryEnabled) {\n throw new ApiError(\"Flash delivery is currently unavailable. Please opt for scheduled delivery.\", 403);\n }\n }\n\n if (!isFlashDelivery) {\n const slotIds = [...new Set(selectedItems.filter(i => i.slotId !== null).map(i => i.slotId as number))];\n for (const slotId of slotIds) {\n const isCapacityFull = await getUserSlotCapacityStatus(slotId);\n if (isCapacityFull) {\n throw new ApiError(\"Selected delivery slot is at full capacity. Please choose another slot.\", 403);\n }\n }\n }\n\n let processedItems = selectedItems;\n\n if (isFlashDelivery) {\n processedItems = selectedItems.map(item => ({\n ...item,\n slotId: null as any,\n }));\n }\n\n return await placeOrderUtil({\n userId,\n selectedItems: processedItems,\n addressId,\n paymentMethod,\n couponId,\n userNotes,\n isFlash: isFlashDelivery,\n });\n }),\n\n getOrders: protectedProcedure\n .input(\n z\n .object({\n page: z.number().min(1).default(1),\n pageSize: z.number().min(1).max(50).default(10),\n })\n .optional()\n )\n .query(async ({ input, ctx }): Promise => {\n const { page = 1, pageSize = 10 } = input || {};\n const userId = ctx.user.userId;\n const offset = (page - 1) * pageSize;\n\n const totalCount = await getUserOrderCount(userId);\n const userOrders = await getUserOrdersWithRelations(userId, offset, pageSize);\n\n const mappedOrders = await Promise.all(\n userOrders.map(async (order) => {\n const status = order.orderStatus[0];\n const refund = order.refunds[0];\n\n type DeliveryStatus = \"cancelled\" | \"success\" | \"pending\" | \"packaged\";\n type OrderStatus = \"cancelled\" | \"success\";\n\n let deliveryStatus: DeliveryStatus;\n let orderStatus: OrderStatus;\n\n const allItemsPackaged = order.orderItems.every(\n (item) => item.is_packaged\n );\n\n if (status?.isCancelled) {\n deliveryStatus = \"cancelled\";\n orderStatus = \"cancelled\";\n } else if (status?.isDelivered) {\n deliveryStatus = \"success\";\n orderStatus = \"success\";\n } else if (allItemsPackaged) {\n deliveryStatus = \"packaged\";\n orderStatus = \"success\";\n } else {\n deliveryStatus = \"pending\";\n orderStatus = \"success\";\n }\n\n const paymentMode = order.isCod ? \"CoD\" : \"Online\";\n const paymentStatus = status?.paymentStatus || \"pending\";\n const refundStatus = refund?.refundStatus || \"none\";\n const refundAmount = refund?.refundAmount\n ? parseFloat(refund.refundAmount.toString())\n : null;\n\n const items = await Promise.all(\n order.orderItems.map(async (item) => {\n const signedImages = item.product.images\n ? scaffoldAssetUrl(\n item.product.images as string[]\n )\n : [];\n return {\n productName: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n discountedPrice: parseFloat(\n item.discountedPrice?.toString() || item.price.toString()\n ),\n amount:\n parseFloat(item.price.toString()) * parseFloat(item.quantity),\n image: signedImages[0] || null,\n };\n })\n );\n\n return {\n id: order.id,\n orderId: `ORD${order.id}`,\n orderDate: order.createdAt.toISOString(),\n deliveryStatus,\n deliveryDate: order.slot?.deliveryTime.toISOString(),\n orderStatus,\n cancelReason: status?.cancelReason || null,\n paymentMode,\n totalAmount: Number(order.totalAmount),\n deliveryCharge: Number(order.deliveryCharge),\n paymentStatus,\n refundStatus,\n refundAmount,\n userNotes: order.userNotes || null,\n items,\n isFlashDelivery: order.isFlashDelivery,\n createdAt: order.createdAt.toISOString(),\n };\n })\n );\n\n return {\n success: true,\n data: mappedOrders,\n pagination: {\n page,\n pageSize,\n totalCount,\n totalPages: Math.ceil(totalCount / pageSize),\n },\n };\n }),\n\n getOrderById: protectedProcedure\n .input(z.object({ orderId: z.string() }))\n .query(async ({ input, ctx }): Promise => {\n const { orderId } = input;\n const userId = ctx.user.userId;\n\n const order = await getUserOrderByIdWithRelations(parseInt(orderId), userId);\n\n if (!order) {\n throw new Error(\"Order not found\");\n }\n\n const couponUsageData = await getUserCouponUsageForOrder(order.id);\n\n let couponData = null;\n if (couponUsageData.length > 0) {\n let totalDiscountAmount = 0;\n const orderTotal = parseFloat(order.totalAmount.toString());\n\n for (const usage of couponUsageData) {\n let discountAmount = 0;\n\n if (usage.coupon.discountPercent) {\n discountAmount =\n (orderTotal *\n parseFloat(usage.coupon.discountPercent.toString())) /\n 100;\n } else if (usage.coupon.flatDiscount) {\n discountAmount = parseFloat(usage.coupon.flatDiscount.toString());\n }\n\n if (\n usage.coupon.maxValue &&\n discountAmount > parseFloat(usage.coupon.maxValue.toString())\n ) {\n discountAmount = parseFloat(usage.coupon.maxValue.toString());\n }\n\n totalDiscountAmount += discountAmount;\n }\n\n couponData = {\n couponCode: couponUsageData\n .map((u) => u.coupon.couponCode)\n .join(\", \"),\n couponDescription: `${couponUsageData.length} coupons applied`,\n discountAmount: totalDiscountAmount,\n };\n }\n\n const status = order.orderStatus[0];\n const refund = order.refunds[0];\n\n type DeliveryStatus = \"cancelled\" | \"success\" | \"pending\" | \"packaged\";\n type OrderStatus = \"cancelled\" | \"success\";\n\n let deliveryStatus: DeliveryStatus;\n let orderStatusResult: OrderStatus;\n\n const allItemsPackaged = order.orderItems.every(\n (item) => item.is_packaged\n );\n\n if (status?.isCancelled) {\n deliveryStatus = \"cancelled\";\n orderStatusResult = \"cancelled\";\n } else if (status?.isDelivered) {\n deliveryStatus = \"success\";\n orderStatusResult = \"success\";\n } else if (allItemsPackaged) {\n deliveryStatus = \"packaged\";\n orderStatusResult = \"success\";\n } else {\n deliveryStatus = \"pending\";\n orderStatusResult = \"success\";\n }\n\n const paymentMode = order.isCod ? \"CoD\" : \"Online\";\n const paymentStatus = status?.paymentStatus || \"pending\";\n const refundStatus = refund?.refundStatus || \"none\";\n const refundAmount = refund?.refundAmount\n ? parseFloat(refund.refundAmount.toString())\n : null;\n\n const items = await Promise.all(\n order.orderItems.map(async (item) => {\n const signedImages = item.product.images\n ? scaffoldAssetUrl(\n item.product.images as string[]\n )\n : [];\n return {\n productName: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n discountedPrice: parseFloat(\n item.discountedPrice?.toString() || item.price.toString()\n ),\n amount:\n parseFloat(item.price.toString()) * parseFloat(item.quantity),\n image: signedImages[0] || null,\n };\n })\n );\n\n return {\n id: order.id,\n orderId: `ORD${order.id}`,\n orderDate: order.createdAt.toISOString(),\n deliveryStatus,\n deliveryDate: order.slot?.deliveryTime.toISOString(),\n orderStatus: orderStatusResult,\n cancellationStatus: orderStatusResult,\n cancelReason: status?.cancelReason || null,\n paymentMode,\n paymentStatus,\n refundStatus,\n refundAmount,\n userNotes: order.userNotes || null,\n items,\n couponCode: couponData?.couponCode || null,\n couponDescription: couponData?.couponDescription || null,\n discountAmount: couponData?.discountAmount || null,\n orderAmount: parseFloat(order.totalAmount.toString()),\n isFlashDelivery: order.isFlashDelivery,\n createdAt: order.createdAt.toISOString(),\n totalAmount: parseFloat(order.totalAmount.toString()),\n deliveryCharge: parseFloat(order.deliveryCharge.toString()),\n };\n }),\n\n cancelOrder: protectedProcedure\n .input(\n z.object({\n id: z.number(),\n reason: z.string().min(1, \"Cancellation reason is required\"),\n })\n )\n .mutation(async ({ input, ctx }): Promise => {\n try {\n const userId = ctx.user.userId;\n const { id, reason } = input;\n\n const order = await getUserOrderBasic(id);\n\n if (!order) {\n console.error(\"Order not found:\", id);\n throw new ApiError(\"Order not found\", 404);\n }\n\n if (order.userId !== userId) {\n console.error(\"Order does not belong to user:\", {\n orderId: id,\n orderUserId: order.userId,\n requestUserId: userId,\n });\n\n throw new ApiError(\"Order not found\", 404);\n }\n\n const status = order.orderStatus[0];\n if (!status) {\n console.error(\"Order status not found for order:\", id);\n throw new ApiError(\"Order status not found\", 400);\n }\n\n if (status.isCancelled) {\n console.error(\"Order is already cancelled:\", id);\n throw new ApiError(\"Order is already cancelled\", 400);\n }\n\n if (status.isDelivered) {\n console.error(\"Cannot cancel delivered order:\", id);\n throw new ApiError(\"Cannot cancel delivered order\", 400);\n }\n\n await cancelUserOrderTransaction(id, status.id, reason, order.isCod);\n\n await sendOrderCancelledNotification(userId, id.toString());\n\n await publishCancellation(id, 'user', reason);\n\n return { success: true, message: \"Order cancelled successfully\" };\n } catch (e) {\n console.log(e);\n throw new ApiError(\"failed to cancel order\");\n }\n }),\n\n updateUserNotes: protectedProcedure\n .input(\n z.object({\n id: z.number(),\n userNotes: z.string(),\n })\n )\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { id, userNotes } = input;\n\n const order = await getUserOrderBasic(id);\n\n if (!order) {\n console.error(\"Order not found:\", id);\n throw new ApiError(\"Order not found\", 404);\n }\n\n if (order.userId !== userId) {\n console.error(\"Order does not belong to user:\", {\n orderId: id,\n orderUserId: order.userId,\n requestUserId: userId,\n });\n throw new ApiError(\"Order not found\", 404);\n }\n\n const status = order.orderStatus[0];\n if (!status) {\n console.error(\"Order status not found for order:\", id);\n throw new ApiError(\"Order status not found\", 400);\n }\n\n if (status.isDelivered) {\n console.error(\"Cannot update notes for delivered order:\", id);\n throw new ApiError(\"Cannot update notes for delivered order\", 400);\n }\n\n if (status.isCancelled) {\n console.error(\"Cannot update notes for cancelled order:\", id);\n throw new ApiError(\"Cannot update notes for cancelled order\", 400);\n }\n\n await updateUserOrderNotes(id, userNotes);\n\n return { success: true, message: \"Notes updated successfully\" };\n }),\n\n getRecentlyOrderedProducts: protectedProcedure\n .input(\n z\n .object({\n limit: z.number().min(1).max(50).default(20),\n })\n .optional()\n )\n .query(async ({ input, ctx }): Promise => {\n const { limit = 20 } = input || {};\n const userId = ctx.user.userId;\n\n const thirtyDaysAgo = new Date();\n thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30);\n\n const recentOrderIds = await getUserRecentlyDeliveredOrderIds(userId, 10, thirtyDaysAgo);\n\n if (recentOrderIds.length === 0) {\n return { success: true, products: [] };\n }\n\n const productIds = await getUserProductIdsFromOrders(recentOrderIds);\n\n if (productIds.length === 0) {\n return { success: true, products: [] };\n }\n\n const productsWithUnits = await getUserProductsForRecentOrders(productIds, limit);\n\n const formattedProducts = await Promise.all(\n productsWithUnits.map(async (product) => {\n const nextDeliveryDate = await getNextDeliveryDate(product.id);\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n unit: product.unitShortNotation,\n incrementStep: product.incrementStep,\n isOutOfStock: product.isOutOfStock,\n nextDeliveryDate: nextDeliveryDate\n ? nextDeliveryDate.toISOString()\n : null,\n images: scaffoldAssetUrl(\n (product.images as string[]) || []\n ),\n };\n })\n );\n\n return {\n success: true,\n products: formattedProducts,\n };\n }),\n});\n", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { claimUploadUrl, extractKeyFromPresignedUrl, scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getProductById as getProductByIdFromCache, getAllProducts as getAllProductsFromCache } from '@/src/stores/product-store'\nimport dayjs from 'dayjs'\nimport {\n getUserProductDetailById as getUserProductDetailByIdInDb,\n getUserProductReviews as getUserProductReviewsInDb,\n getUserProductByIdBasic as getUserProductByIdBasicInDb,\n createUserProductReview as createUserProductReviewInDb,\n} from '@/src/dbService'\nimport type {\n UserProductDetail,\n UserProductDetailData,\n UserProductReviewsResponse,\n UserCreateReviewResponse,\n UserProductReviewWithSignedUrls,\n} from '@packages/shared'\n\nconst signProductImages = (product: UserProductDetailData): UserProductDetail => ({\n ...product,\n images: scaffoldAssetUrl(product.images || []),\n})\n\nexport const productRouter = router({\n getProductDetails: publicProcedure\n .input(z.object({\n id: z.string().regex(/^\\d+$/, 'Invalid product ID'),\n }))\n .query(async ({ input }): Promise => {\n const { id } = input;\n const productId = parseInt(id);\n\n if (isNaN(productId)) {\n throw new Error('Invalid product ID');\n }\n\n console.log('from the api to get product details')\n\n// First, try to get the product from Redis cache\n const cachedProduct = await getProductByIdFromCache(productId);\n \n if (cachedProduct) {\n // Filter delivery slots to only include those with future freeze times and not at full capacity\n const currentTime = new Date();\n const filteredSlots = cachedProduct.deliverySlots.filter(slot => \n dayjs(slot.freezeTime).isAfter(currentTime) && !slot.isCapacityFull\n );\n \n return {\n ...cachedProduct,\n deliverySlots: filteredSlots\n };\n }\n\n // If not in cache, fetch from database (fallback)\n const productData = await getUserProductDetailByIdInDb(productId)\n\n /*\n // Old implementation - direct DB queries:\n const productData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n longDescription: productInfo.longDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n storeId: productInfo.storeId,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n productQuantity: productInfo.productQuantity,\n isFlashAvailable: productInfo.isFlashAvailable,\n flashPrice: productInfo.flashPrice,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(eq(productInfo.id, productId))\n .limit(1);\n */\n\n if (!productData) {\n throw new Error('Product not found')\n }\n\n return signProductImages(productData)\n }),\n\n getProductReviews: publicProcedure\n .input(z.object({\n productId: z.number().int().positive(),\n limit: z.number().int().min(1).max(50).optional().default(10),\n offset: z.number().int().min(0).optional().default(0),\n }))\n .query(async ({ input }): Promise => {\n const { productId, limit, offset } = input;\n\n const { reviews, totalCount } = await getUserProductReviewsInDb(productId, limit, offset)\n\n /*\n // Old implementation - direct DB queries:\n const reviews = await db\n .select({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n userName: users.name,\n })\n .from(productReviews)\n .innerJoin(users, eq(productReviews.userId, users.id))\n .where(eq(productReviews.productId, productId))\n .orderBy(desc(productReviews.reviewTime))\n .limit(limit)\n .offset(offset);\n\n const totalCountResult = await db\n .select({ count: sql`count(*)` })\n .from(productReviews)\n .where(eq(productReviews.productId, productId));\n\n const totalCount = Number(totalCountResult[0].count);\n const hasMore = offset + limit < totalCount;\n */\n\n const reviewsWithSignedUrls: UserProductReviewWithSignedUrls[] = reviews.map((review) => ({\n ...review,\n signedImageUrls: scaffoldAssetUrl(review.imageUrls || []),\n }))\n\n const hasMore = offset + limit < totalCount\n\n return { reviews: reviewsWithSignedUrls, hasMore }\n }),\n\n createReview: protectedProcedure\n .input(z.object({\n productId: z.number().int().positive(),\n reviewBody: z.string().min(1, 'Review body is required'),\n ratings: z.number().int().min(1).max(5),\n imageUrls: z.array(z.string()).optional().default([]),\n uploadUrls: z.array(z.string()).optional().default([]),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const { productId, reviewBody, ratings, imageUrls, uploadUrls } = input;\n const userId = ctx.user.userId;\n\n const product = await getUserProductByIdBasicInDb(productId)\n if (!product) {\n throw new ApiError('Product not found', 404)\n }\n\n const imageKeys = uploadUrls.map(item => extractKeyFromPresignedUrl(item))\n const newReview = await createUserProductReviewInDb(userId, productId, reviewBody, ratings, imageKeys)\n\n /*\n // Old implementation - direct DB queries:\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n });\n if (!product) {\n throw new ApiError('Product not found', 404);\n }\n\n const [newReview] = await db.insert(productReviews).values({\n userId,\n productId,\n reviewBody,\n ratings,\n imageUrls: uploadUrls.map(item => extractKeyFromPresignedUrl(item)),\n }).returning();\n */\n\n // Claim upload URLs\n if (uploadUrls && uploadUrls.length > 0) {\n try {\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)));\n } catch (error) {\n console.error('Error claiming upload URLs:', error);\n // Don't fail the review creation\n }\n }\n\n return { success: true, review: newReview }\n }),\n\n \n getAllProductsSummary: publicProcedure\n .query(async (): Promise => {\n // Get all products from cache\n const allCachedProducts = await getAllProductsFromCache();\n\n // Transform the cached products to match the expected summary format\n // (with empty deliverySlots and specialDeals arrays for summary view)\n const transformedProducts: UserProductDetail[] = allCachedProducts.map(product => ({\n ...product,\n images: product.images || [],\n deliverySlots: [],\n specialDeals: [],\n }))\n\n return transformedProducts\n }),\n\n});\n", "import { router, protectedProcedure, publicProcedure } from '@/src/trpc/trpc-index'\nimport { SignJWT } from 'jose'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport { encodedJwtSecret } from '@/src/lib/env-exporter'\nimport { generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport {\n getUserProfileById as getUserProfileByIdInDb,\n getUserProfileDetailById as getUserProfileDetailByIdInDb,\n getUserWithCreds as getUserWithCredsInDb,\n upsertUserNotifCred as upsertUserNotifCredInDb,\n deleteUserUnloggedToken as deleteUserUnloggedTokenInDb,\n getUserUnloggedToken as getUserUnloggedTokenInDb,\n upsertUserUnloggedToken as upsertUserUnloggedTokenInDb,\n} from '@/src/dbService'\nimport type {\n UserSelfDataResponse,\n UserProfileCompleteResponse,\n UserSavePushTokenResponse,\n} from '@packages/shared'\n\nconst generateToken = async (userId: number): Promise => {\n return await new SignJWT({ userId })\n .setProtectedHeader({ alg: 'HS256' })\n .setExpirationTime('7d')\n .sign(encodedJwtSecret);\n};\n\nexport const userRouter = router({\n getSelfData: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const user = await getUserProfileByIdInDb(userId)\n\n if (!user) {\n throw new ApiError('User not found', 404);\n }\n\n // Get user details for profile image\n const userDetail = await getUserProfileDetailByIdInDb(userId)\n\n // Generate signed URL for profile image if it exists\n const profileImageSignedUrl = userDetail?.profileImage\n ? await generateSignedUrlFromS3Url(userDetail.profileImage)\n : null;\n\n return {\n success: true,\n data: {\n user: {\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n profileImage: profileImageSignedUrl,\n bio: userDetail?.bio || null,\n dateOfBirth: userDetail?.dateOfBirth\n ? new Date(userDetail.dateOfBirth as any).toISOString()\n : null,\n gender: userDetail?.gender || null,\n occupation: userDetail?.occupation || null,\n },\n },\n }\n }),\n\n checkProfileComplete: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const result = await getUserWithCredsInDb(userId)\n\n if (!result) {\n throw new ApiError('User not found', 404)\n }\n\n return {\n isComplete: !!(result.user.name && result.user.email && result.creds),\n };\n }),\n\n savePushToken: publicProcedure\n .input(z.object({ token: z.string() }))\n .mutation(async ({ input, ctx }): Promise => {\n const { token } = input;\n const userId = ctx.user?.userId;\n\n if (userId) {\n // AUTHENTICATED USER\n // Check if token exists in notif_creds for this user\n await upsertUserNotifCredInDb(userId, token)\n await deleteUserUnloggedTokenInDb(token)\n\n } else {\n // UNAUTHENTICATED USER\n // Save/update in unlogged_user_tokens\n const existing = await getUserUnloggedTokenInDb(token)\n if (existing) {\n await upsertUserUnloggedTokenInDb(token)\n } else {\n await upsertUserUnloggedTokenInDb(token)\n }\n }\n\n return { success: true }\n }),\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport {\n getUserActiveCouponsWithRelations as getUserActiveCouponsWithRelationsInDb,\n getUserAllCouponsWithRelations as getUserAllCouponsWithRelationsInDb,\n getUserReservedCouponByCode as getUserReservedCouponByCodeInDb,\n redeemUserReservedCoupon as redeemUserReservedCouponInDb,\n} from '@/src/dbService'\nimport type {\n UserCouponDisplay,\n UserEligibleCouponsResponse,\n UserMyCouponsResponse,\n UserRedeemCouponResponse,\n} from '@packages/shared'\n\nconst generateCouponDescription = (coupon: { discountPercent?: string | null; flatDiscount?: string | null; minOrder?: string | null; maxValue?: string | null }): string => {\n let desc = '';\n\n if (coupon.discountPercent) {\n desc += `${coupon.discountPercent}% off`;\n } else if (coupon.flatDiscount) {\n desc += `\u20B9${coupon.flatDiscount} off`;\n }\n\n if (coupon.minOrder) {\n desc += ` on orders above \u20B9${coupon.minOrder}`;\n }\n\n if (coupon.maxValue) {\n desc += ` (max discount \u20B9${coupon.maxValue})`;\n }\n\n return desc;\n};\n\nexport const userCouponRouter = router({\n getEligible: protectedProcedure\n .query(async ({ ctx }): Promise => {\n try {\n\n const userId = ctx.user.userId;\n \n const allCoupons = await getUserActiveCouponsWithRelationsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const allCoupons = await db.query.coupons.findMany({\n where: and(\n eq(coupons.isInvalidated, false),\n or(\n isNull(coupons.validTill),\n gt(coupons.validTill, new Date())\n )\n ),\n with: {\n usages: {\n where: eq(couponUsage.userId, userId)\n },\n applicableUsers: {\n with: {\n user: true\n }\n },\n applicableProducts: {\n with: {\n product: true\n }\n },\n }\n });\n */\n\n // Filter to only coupons applicable to current user\n const applicableCoupons = allCoupons.filter(coupon => {\n if(!coupon.isUserBased) return true;\n const applicableUsers = coupon.applicableUsers || [];\n return applicableUsers.some(au => au.userId === userId);\n });\n\n return { success: true, data: applicableCoupons };\n }\n catch(e) {\n console.log(e)\n throw new ApiError(\"Unable to get coupons\")\n }\n }),\n\n getProductCoupons: protectedProcedure\n .input(z.object({ productId: z.number().int().positive() }))\n .query(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { productId } = input;\n\n // Get all active, non-expired coupons\n const allCoupons = await getUserActiveCouponsWithRelationsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const allCoupons = await db.query.coupons.findMany({\n where: and(\n eq(coupons.isInvalidated, false),\n or(\n isNull(coupons.validTill),\n gt(coupons.validTill, new Date())\n )\n ),\n with: {\n usages: {\n where: eq(couponUsage.userId, userId)\n },\n applicableUsers: {\n with: {\n user: true\n }\n },\n applicableProducts: {\n with: {\n product: true\n }\n },\n }\n });\n */\n\n // Filter to only coupons applicable to current user and product\n const applicableCoupons = allCoupons.filter(coupon => {\n const applicableUsers = coupon.applicableUsers || [];\n const userApplicable = !coupon.isUserBased || applicableUsers.some(au => au.userId === userId);\n\n const applicableProducts = coupon.applicableProducts || [];\n const productApplicable = applicableProducts.length === 0 || applicableProducts.some(ap => ap.productId === productId);\n\n return userApplicable && productApplicable;\n });\n\n return { success: true, data: applicableCoupons };\n }),\n\n getMyCoupons: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n const allCoupons = await getUserAllCouponsWithRelationsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const allCoupons = await db.query.coupons.findMany({\n with: {\n usages: {\n where: eq(couponUsage.userId, userId)\n },\n applicableUsers: {\n with: {\n user: true\n }\n }\n }\n });\n */\n\n // Filter coupons in JS: not invalidated, applicable to user, and not expired\n const applicableCoupons = allCoupons.filter(coupon => {\n const isNotInvalidated = !coupon.isInvalidated;\n const applicableUsers = coupon.applicableUsers || [];\n const isApplicable = coupon.isApplyForAll || applicableUsers.some(au => au.userId === userId);\n const isNotExpired = !coupon.validTill || new Date(coupon.validTill) > new Date();\n return isNotInvalidated && isApplicable && isNotExpired;\n });\n\n // Categorize coupons\n const personalCoupons: UserCouponDisplay[] = [];\n const generalCoupons: UserCouponDisplay[] = [];\n\n applicableCoupons.forEach(coupon => {\n const usageCount = coupon.usages.length;\n const isExpired = false; // Already filtered out expired coupons\n const isUsedUp = Boolean(coupon.maxLimitForUser && usageCount >= coupon.maxLimitForUser);\n\n const couponDisplay: UserCouponDisplay = {\n id: coupon.id,\n code: coupon.couponCode,\n discountType: coupon.discountPercent ? 'percentage' : 'flat',\n discountValue: parseFloat(coupon.discountPercent || coupon.flatDiscount || '0'),\n maxValue: coupon.maxValue ? parseFloat(coupon.maxValue) : undefined,\n minOrder: coupon.minOrder ? parseFloat(coupon.minOrder) : undefined,\n description: generateCouponDescription(coupon),\n validTill: coupon.validTill ? new Date(coupon.validTill) : undefined,\n usageCount,\n maxLimitForUser: coupon.maxLimitForUser ? parseInt(coupon.maxLimitForUser.toString()) : undefined,\n isExpired,\n isUsedUp,\n };\n\n if ((coupon.applicableUsers || []).some(au => au.userId === userId) && !coupon.isApplyForAll) {\n // Personal coupon\n personalCoupons.push(couponDisplay);\n } else if (coupon.isApplyForAll) {\n // General coupon\n generalCoupons.push(couponDisplay);\n }\n });\n\n return {\n success: true,\n data: {\n personal: personalCoupons,\n general: generalCoupons,\n }\n };\n }),\n\n redeemReservedCoupon: protectedProcedure\n .input(z.object({ secretCode: z.string() }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { secretCode } = input;\n\n const reservedCoupon = await getUserReservedCouponByCodeInDb(secretCode)\n\n /*\n // Old implementation - direct DB queries:\n const reservedCoupon = await db.query.reservedCoupons.findFirst({\n where: and(\n eq(reservedCoupons.secretCode, secretCode.toUpperCase()),\n eq(reservedCoupons.isRedeemed, false)\n ),\n });\n */\n\n if (!reservedCoupon) {\n throw new ApiError(\"Invalid or already redeemed coupon code\", 400);\n }\n\n // Check if already redeemed by this user (in case of multiple attempts)\n if (reservedCoupon.redeemedBy === userId) {\n throw new ApiError(\"You have already redeemed this coupon\", 400);\n }\n\n const couponResult = await redeemUserReservedCouponInDb(userId, reservedCoupon)\n\n /*\n // Old implementation - direct DB queries:\n const couponResult = await db.transaction(async (tx) => {\n const couponInsert = await tx.insert(coupons).values({\n couponCode: reservedCoupon.couponCode,\n isUserBased: true,\n discountPercent: reservedCoupon.discountPercent,\n flatDiscount: reservedCoupon.flatDiscount,\n minOrder: reservedCoupon.minOrder,\n productIds: reservedCoupon.productIds,\n maxValue: reservedCoupon.maxValue,\n isApplyForAll: false,\n validTill: reservedCoupon.validTill,\n maxLimitForUser: reservedCoupon.maxLimitForUser,\n exclusiveApply: reservedCoupon.exclusiveApply,\n createdBy: reservedCoupon.createdBy,\n }).returning();\n\n const coupon = couponInsert[0];\n\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId,\n });\n\n await tx.update(reservedCoupons).set({\n isRedeemed: true,\n redeemedBy: userId,\n redeemedAt: new Date(),\n }).where(eq(reservedCoupons.id, reservedCoupon.id));\n\n return coupon;\n });\n */\n\n return { success: true, coupon: couponResult };\n }),\n});\n", "\nimport { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport crypto from 'crypto'\nimport { razorpayId, razorpaySecret } from \"@/src/lib/env-exporter\"\nimport { RazorpayPaymentService } from \"@/src/lib/payments-utils\"\nimport {\n getUserPaymentOrderById as getUserPaymentOrderByIdInDb,\n getUserPaymentByOrderId as getUserPaymentByOrderIdInDb,\n getUserPaymentByMerchantOrderId as getUserPaymentByMerchantOrderIdInDb,\n updateUserPaymentSuccess as updateUserPaymentSuccessInDb,\n updateUserOrderPaymentStatus as updateUserOrderPaymentStatusInDb,\n markUserPaymentFailed as markUserPaymentFailedInDb,\n} from '@/src/dbService'\nimport type {\n UserPaymentOrderResponse,\n UserPaymentVerifyResponse,\n UserPaymentFailResponse,\n} from '@packages/shared'\n\n\n\n\nexport const paymentRouter = router({\n createRazorpayOrder: protectedProcedure //either create a new payment order or return the existing one\n .input(z.object({\n orderId: z.string(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { orderId } = input;\n\n const order = await getUserPaymentOrderByIdInDb(parseInt(orderId))\n\n /*\n // Old implementation - direct DB queries:\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, parseInt(orderId)),\n });\n */\n\n if (!order) {\n throw new ApiError(\"Order not found\", 404)\n }\n\n if (order.userId !== userId) {\n throw new ApiError(\"Order does not belong to user\", 403)\n }\n\n // Check for existing pending payment\n const existingPayment = await getUserPaymentByOrderIdInDb(parseInt(orderId))\n\n /*\n // Old implementation - direct DB queries:\n const existingPayment = await db.query.payments.findFirst({\n where: eq(payments.orderId, parseInt(orderId)),\n });\n */\n\n if (existingPayment && existingPayment.status === 'pending') {\n return {\n razorpayOrderId: existingPayment.merchantOrderId,\n key: razorpayId,\n };\n }\n\n // Create Razorpay order and insert payment record\n if (order.totalAmount === null) {\n throw new ApiError('Order total is missing', 400)\n }\n const razorpayOrder = await RazorpayPaymentService.createOrder(parseInt(orderId), order.totalAmount);\n await RazorpayPaymentService.insertPaymentRecord(parseInt(orderId), razorpayOrder);\n\n return {\n razorpayOrderId: 0,\n key: razorpayId,\n }\n }),\n\n\n\n verifyPayment: protectedProcedure\n .input(z.object({\n razorpay_payment_id: z.string(),\n razorpay_order_id: z.string(),\n razorpay_signature: z.string(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const { razorpay_payment_id, razorpay_order_id, razorpay_signature } = input;\n\n // Verify signature\n const expectedSignature = crypto\n .createHmac('sha256', razorpaySecret)\n .update(razorpay_order_id + '|' + razorpay_payment_id)\n .digest('hex');\n\n if (expectedSignature !== razorpay_signature) {\n throw new ApiError(\"Invalid payment signature\", 400);\n }\n\n // Get current payment record\n const currentPayment = await getUserPaymentByMerchantOrderIdInDb(razorpay_order_id)\n\n /*\n // Old implementation - direct DB queries:\n const currentPayment = await db.query.payments.findFirst({\n where: eq(payments.merchantOrderId, razorpay_order_id),\n });\n */\n\n if (!currentPayment) {\n throw new ApiError(\"Payment record not found\", 404);\n }\n\n // Update payment status and payload\n const updatedPayload = {\n ...((currentPayment.payload as any) || {}),\n payment_id: razorpay_payment_id,\n signature: razorpay_signature,\n };\n\n const updatedPayment = await updateUserPaymentSuccessInDb(razorpay_order_id, updatedPayload)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedPayment] = await db\n .update(payments)\n .set({\n status: 'success',\n payload: updatedPayload,\n })\n .where(eq(payments.merchantOrderId, razorpay_order_id))\n .returning();\n\n await db\n .update(orderStatus)\n .set({\n paymentStatus: 'success',\n })\n .where(eq(orderStatus.orderId, updatedPayment.orderId));\n */\n\n if (!updatedPayment) {\n throw new ApiError(\"Payment record not found\", 404)\n }\n\n await updateUserOrderPaymentStatusInDb(updatedPayment.orderId, 'success')\n\n return {\n success: true,\n message: \"Payment verified successfully\",\n }\n }),\n\n markPaymentFailed: protectedProcedure\n .input(z.object({\n merchantOrderId: z.string(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { merchantOrderId } = input;\n\n // Find payment by merchantOrderId\n const payment = await getUserPaymentByMerchantOrderIdInDb(merchantOrderId)\n\n /*\n // Old implementation - direct DB queries:\n const payment = await db.query.payments.findFirst({\n where: eq(payments.merchantOrderId, merchantOrderId),\n });\n */\n\n if (!payment) {\n throw new ApiError(\"Payment not found\", 404);\n }\n\n // Check if payment belongs to user's order\n const order = await getUserPaymentOrderByIdInDb(payment.orderId)\n\n /*\n // Old implementation - direct DB queries:\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, payment.orderId),\n });\n */\n\n if (!order || order.userId !== userId) {\n throw new ApiError(\"Payment does not belong to user\", 403);\n }\n\n // Update payment status to failed\n await markUserPaymentFailedInDb(payment.id)\n\n /*\n // Old implementation - direct DB queries:\n await db\n .update(payments)\n .set({ status: 'failed' })\n .where(eq(payments.id, payment.id));\n */\n\n return {\n success: true,\n message: \"Payment marked as failed\",\n }\n }),\n\n});\n", "// import Razorpay from \"razorpay\";\nimport { razorpayId, razorpaySecret } from \"@/src/lib/env-exporter\"\n\nexport class RazorpayPaymentService {\n // private static instance = new Razorpay({\n // key_id: razorpayId,\n // key_secret: razorpaySecret,\n // });\n //\n static async createOrder(orderId: number, amount: string) {\n // Create Razorpay order\n // const razorpayOrder = await this.instance.orders.create({\n // amount: parseFloat(amount) * 100, // Convert to paisa\n // currency: 'INR',\n // receipt: `order_${orderId}`,\n // notes: {\n // customerOrderId: orderId.toString(),\n // },\n // });\n //\n // return razorpayOrder;\n }\n\n static async insertPaymentRecord(orderId: number, razorpayOrder: any, tx?: unknown) {\n // Use transaction if provided, otherwise use db\n // const dbInstance = tx || db;\n //\n // // Insert payment record\n // const [payment] = await dbInstance\n // .insert(payments)\n // .values({\n // status: 'pending',\n // gateway: 'razorpay',\n // orderId,\n // token: orderId.toString(),\n // merchantOrderId: razorpayOrder.id,\n // payload: razorpayOrder,\n // })\n // .returning();\n //\n // return payment;\n }\n\n static async initiateRefund(paymentId: string, amount: number) {\n // const refund = await this.instance.payments.refund(paymentId, {\n // amount,\n // });\n // return refund;\n }\n\n static async fetchRefund(refundId: string) {\n // const refund = await this.instance.refunds.fetch(refundId);\n // return refund;\n }\n}\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index';\nimport { z } from 'zod';\nimport { generateUploadUrl } from '@/src/lib/s3-client';\nimport { ApiError } from '@/src/lib/api-error';\n\nexport const fileUploadRouter = router({\n generateUploadUrls: protectedProcedure\n .input(z.object({\n contextString: z.enum(['review', 'product_info', 'notification', 'complaint', 'profile', 'tags']),\n mimeTypes: z.array(z.string()),\n }))\n .mutation(async ({ input }): Promise<{ uploadUrls: string[] }> => {\n const { contextString, mimeTypes } = input;\n\n const uploadUrls: string[] = [];\n const keys: string[] = [];\n\n for (const mimeType of mimeTypes) {\n // Generate key based on context and mime type\n let folder: string;\n if (contextString === 'review') {\n folder = 'review-images';\n } else if(contextString === 'product_info') {\n folder = 'product-images';\n }\n // else if(contextString === 'review_response') {\n // folder = 'review-response-images'\n // } \n else if(contextString === 'notification') {\n folder = 'notification-images'\n } else if (contextString === 'complaint') {\n folder = 'complaint-images'\n } else if (contextString === 'profile') {\n folder = 'profile-images'\n } else if (contextString === 'tags') {\n folder = 'tags'\n } else {\n folder = '';\n }\n\n const extension = mimeType === 'image/jpeg' ? '.jpg' :\n mimeType === 'image/png' ? '.png' :\n mimeType === 'image/gif' ? '.gif' : '.jpg';\n const key = `${folder}/${Date.now()}${extension}`;\n\n try {\n const uploadUrl = await generateUploadUrl(key, mimeType);\n uploadUrls.push(uploadUrl);\n keys.push(key);\n \n } catch (error) {\n console.error('Error generating upload URL:', error);\n throw new ApiError('Failed to generate upload URL', 500);\n }\n }\n \n return { uploadUrls };\n }),\n});\n\nexport type FileUploadRouter = typeof fileUploadRouter;\n", "import { router, publicProcedure } from '@/src/trpc/trpc-index';\nimport { z } from 'zod';\nimport { getTagsByStoreId } from '@/src/stores/product-tag-store';\nimport { ApiError } from '@/src/lib/api-error';\n\nexport const tagsRouter = router({\n getTagsByStore: publicProcedure\n .input(z.object({\n storeId: z.number(),\n }))\n .query(async ({ input }) => {\n const { storeId } = input;\n\n // Get tags from cache that are related to this store\n const tags = await getTagsByStoreId(storeId);\n \n\n return {\n tags: tags.map(tag => ({\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription,\n imageUrl: tag.imageUrl,\n productIds: tag.productIds,\n })),\n };\n }),\n});\n", "import type { Middleware } from \"./common\";\n\nconst drainBody: Middleware = async (request, env, _ctx, middlewareCtx) => {\n\ttry {\n\t\treturn await middlewareCtx.next(request, env);\n\t} finally {\n\t\ttry {\n\t\t\tif (request.body !== null && !request.bodyUsed) {\n\t\t\t\tconst reader = request.body.getReader();\n\t\t\t\twhile (!(await reader.read()).done) {}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(\"Failed to drain the unused request body.\", e);\n\t\t}\n\t}\n};\n\nexport default drainBody;\n", "import type { Middleware } from \"./common\";\n\ninterface JsonError {\n\tmessage?: string;\n\tname?: string;\n\tstack?: string;\n\tcause?: JsonError;\n}\n\nfunction reduceError(e: any): JsonError {\n\treturn {\n\t\tname: e?.name,\n\t\tmessage: e?.message ?? String(e),\n\t\tstack: e?.stack,\n\t\tcause: e?.cause === undefined ? undefined : reduceError(e.cause),\n\t};\n}\n\n// See comment in `bundle.ts` for details on why this is needed\nconst jsonError: Middleware = async (request, env, _ctx, middlewareCtx) => {\n\ttry {\n\t\treturn await middlewareCtx.next(request, env);\n\t} catch (e: any) {\n\t\tconst error = reduceError(e);\n\t\treturn Response.json(error, {\n\t\t\tstatus: 500,\n\t\t\theaders: { \"MF-Experimental-Error-Stack\": \"true\" },\n\t\t});\n\t}\n};\n\nexport default jsonError;\n", "export type Awaitable = T | Promise;\n// TODO: allow dispatching more events?\nexport type Dispatcher = (\n\ttype: \"scheduled\",\n\tinit: { cron?: string }\n) => Awaitable;\n\nexport type IncomingRequest = Request<\n\tunknown,\n\tIncomingRequestCfProperties\n>;\n\nexport interface MiddlewareContext {\n\tdispatch: Dispatcher;\n\tnext(request: IncomingRequest, env: any): Awaitable;\n}\n\nexport type Middleware = (\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tmiddlewareCtx: MiddlewareContext\n) => Awaitable;\n\nconst __facade_middleware__: Middleware[] = [];\n\n// The register functions allow for the insertion of one or many middleware,\n// We register internal middleware first in the stack, but have no way of controlling\n// the order that addMiddleware is run in service workers so need an internal function.\nexport function __facade_register__(...args: (Middleware | Middleware[])[]) {\n\t__facade_middleware__.push(...args.flat());\n}\nexport function __facade_registerInternal__(\n\t...args: (Middleware | Middleware[])[]\n) {\n\t__facade_middleware__.unshift(...args.flat());\n}\n\nfunction __facade_invokeChain__(\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tdispatch: Dispatcher,\n\tmiddlewareChain: Middleware[]\n): Awaitable {\n\tconst [head, ...tail] = middlewareChain;\n\tconst middlewareCtx: MiddlewareContext = {\n\t\tdispatch,\n\t\tnext(newRequest, newEnv) {\n\t\t\treturn __facade_invokeChain__(newRequest, newEnv, ctx, dispatch, tail);\n\t\t},\n\t};\n\treturn head(request, env, ctx, middlewareCtx);\n}\n\nexport function __facade_invoke__(\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tdispatch: Dispatcher,\n\tfinalMiddleware: Middleware\n): Awaitable {\n\treturn __facade_invokeChain__(request, env, ctx, dispatch, [\n\t\t...__facade_middleware__,\n\t\tfinalMiddleware,\n\t]);\n}\n"], + "mappings": ";;;;;;;;;;;;;;;;;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,MACX,UAAU;AAAA,MACV,UAAU;AAAA,MACV,UAAU;AAAA,MACV,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,MACV,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,SAAS;AAAA;AAAA,MAET,UAAU;AAAA,MACV,eAAe;AAAA,MACf,WAAW;AAAA,MACX,gBAAgB;AAAA,MAChB,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,kBAAkB;AAAA,MAClB,oBAAoB;AAAA,MACpB,qBAAqB;AAAA,MACrB,QAAQ;AAAA,MACR,mBAAmB;AAAA,MACnB,YAAY;AAAA,MACZ,6BAA6B;AAAA,MAC7B,4BAA4B;AAAA,MAC5B,gBAAgB;AAAA,MAChB,cAAc;AAAA,MACd,eAAe;AAAA,MACf,kBAAkB;AAAA,MAClB,WAAW;AAAA,MACX,QAAQ;AAAA,MACR,iBAAiB;AAAA,IAClB;AAAA;AAAA;;;AC7OA,IAEM,eACO,kBACP,gBACA,cAMS,MAAM,UAAU,UAE7B,UACA,WACA,eACA,aACA,SACA,cACA,UACA,iBACA,mBACA,oBACA,cACA,OACA,gBACA,eACA,iBACA,kBACA,WACA,OACA,4BACA,2BACA,eACA,OACA,aACA,6BACA,MACA,MACA,OACAC,SACA,iBACA,SACA,SACA,OACA,QACA,WACA,mBACA,UACA,KACA,WACA,YACA,QACA,QACA,MACA,aACA,KACA,YACA,UACA,UACA,UACA,cACA,wBACA,SACA,SACA,QACA,WACA,iBACA,QACA,qCACAC,SACA,YACA,MACA,eACA,WACA,aACA,YACA,aACA,gBACA,UACA,KACA,IACA,MACA,WACA,YACA,KACA,MACA,iBACA,qBACA,cACA,YACA,KACA,SACA,oBACA,gBACA,QACA,eACA,MACA,SACA,SACA,QACA,WACA,iBACA,sBACA,QACA,qCACA,mBACA,QACA,OACA,QACA,kBACA,OACA,kBACA,OACA,OACA,QACA,SACA,UAEI,UA8GC;AArOP,IAAAC,gB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;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,QACE;AACJ,IAAM,WAAW;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,MAEA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAAD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;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,kBAAgB,oBAAoB,mCAAK;AAC1C,WAAW,OAAO,wCAAU,YAAY;AACvC,kBAAgB,qBAAqB,mCAAK;AAC3C;AACA,IAAO,kCAAQ;", + "names": ["init_performance", "init_performance", "PerformanceMark", "init_performance", "init_performance", "desc", "init_performance", "init_performance", "clear", "count", "countReset", "createTask", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "profile", "profileEnd", "table", "time", "timeEnd", "timeLog", "timeStamp", "trace", "warn", "init_console", "init_performance", "init_console", "init_performance", "hrtime", "init_performance", "init_performance", "dir", "env", "count", "init_performance", "init_performance", "init_performance", "cwd", "assert", "hrtime", "init_process", "init_performance", "init_process", "init_performance", "init_performance", "init_performance", "message", "config", "init_performance", "table", "init_performance", "init_performance", "table", "config", "init_performance", "init_performance", "config", "table", "init_performance", "table", "init_performance", "value", "startFrom", "array", "init_performance", "init_performance", "ref", "config", "table", "actions", "v", "init_performance", "table", "config", "init_performance", "sql", "version", "init_performance", "init_performance", "version", "otel", "rawTracer", "init_performance", "strings", "param", "init_performance", "config", "decoder", "encoder", "sql", "raw", "join", "placeholder", "name", "SQL", "result", "path", "decoder", "table", "init_utils", "init_performance", "init_table", "init_performance", "init_performance", "init_table", "table", "v", "max", "init_performance", "init_performance", "init_performance", "relations", "primaryKey", "table", "config", "decoder", "init_performance", "table", "init_performance", "target", "init_performance", "config", "init_performance", "ForeignKeyBuilder", "ForeignKey", "init_foreign_keys", "init_performance", "config", "table", "uniqueKeyName", "table", "UniqueConstraintBuilder", "UniqueOnConstraintBuilder", "UniqueConstraint", "init_unique_constraint", "init_performance", "init_common", "init_performance", "init_foreign_keys", "init_unique_constraint", "ref", "config", "table", "actions", "ForeignKeyBuilder", "uniqueKeyName", "config", "init_performance", "init_utils", "init_common", "table", "config", "init_performance", "init_utils", "init_common", "table", "config", "init_performance", "init_utils", "init_common", "table", "config", "init_performance", "init_utils", "init_common", "table", "init_performance", "init_common", "table", "config", "init_performance", "init_utils", "init_common", "table", "init_performance", "name", "InlineForeignKeys", "table", "init_table", "init_performance", "init_performance", "table", "init_performance", "table", "config", "config", "PrimaryKeyBuilder", "PrimaryKey", "init_primary_keys", "init_performance", "init_table", "table", "table", "init_utils", "init_performance", "init_table", "init_performance", "init_table", "init_utils", "table", "init_performance", "table", "init_performance", "message", "count", "init_performance", "init_performance", "init_performance", "init_sql", "init_performance", "init_performance", "init_common", "init_performance", "init_performance", "init_sql", "init_table", "init_utils", "config", "table", "set", "select", "sql", "joinOn", "field", "init_performance", "init_select", "init_performance", "init_utils", "config", "table", "on", "join", "init_query_builder", "init_performance", "init_select", "self", "init_performance", "init_table", "init_utils", "init_query_builder", "table", "config", "init_performance", "init_performance", "init_table", "init_utils", "table", "set", "on", "join", "init_performance", "init_query_builder", "init_select", "init_performance", "init_performance", "table", "config", "init_performance", "init_performance", "self", "table", "config", "sql", "encoder", "init_performance", "_key", "init_alias", "init_performance", "init_performance", "cache", "sql", "init_subquery", "init_performance", "init_performance", "init_utils", "init_query_builder", "init_table", "config", "init_performance", "init_alias", "init_foreign_keys", "init_primary_keys", "init_subquery", "init_table", "init_unique_constraint", "init_utils", "init_performance", "init_performance", "init_sql", "init_utils", "init_performance", "t", "init_performance", "init_performance", "init_performance", "init_performance", "module", "init_performance", "t", "u", "e", "n", "r", "v", "i", "s", "D", "a", "M", "m", "f", "l", "$", "y", "g", "o", "d", "c", "h", "module", "init_performance", "_global", "module", "init_performance", "flags", "exists", "args", "keys", "module", "init_performance", "init_performance", "target", "tryCatch", "require_built", "init_performance", "promise", "libDefault", "module", "init_performance", "libDefault", "module", "init_performance", "module", "init_performance", "assert", "message", "AbortError", "module", "init_performance", "assert", "message", "AbortError", "module", "init_performance", "Errors", "module", "init_performance", "toUTF8Array", "generate", "init_performance", "init_performance", "init_promises", "init_performance", "ReadStream", "WriteStream", "init_performance", "error", "access", "appendFile", "chown", "chmod", "copyFile", "cp", "lchown", "lchmod", "link", "lstat", "lutimes", "mkdir", "mkdtemp", "realpath", "open", "opendir", "readdir", "readFile", "readlink", "rename", "rm", "rmdir", "stat", "symlink", "truncate", "unlink", "utimes", "writeFile", "statfs", "exists", "watch", "glob", "init_performance", "init_fs", "init_performance", "init_promises", "ReadStream", "WriteStream", "access", "appendFile", "chmod", "chown", "copyFile", "cp", "exists", "glob", "lchmod", "lchown", "link", "lstat", "lutimes", "mkdir", "mkdtemp", "open", "opendir", "readFile", "readdir", "readlink", "realpath", "rename", "rm", "rmdir", "stat", "statfs", "symlink", "truncate", "unlink", "utimes", "watch", "writeFile", "module", "init_performance", "init_fs", "libDefault", "module", "init_performance", "libDefault", "module", "init_performance", "module", "init_performance", "hasOwnProperty", "isArray", "object", "eq", "isObject", "array", "isFunction", "isObjectLike", "tag", "defaults", "require_lodash", "module", "init_performance", "hasOwnProperty", "isFunction", "isObjectLike", "tag", "isObject", "require_lodash", "init_performance", "defaults", "noop", "module", "init_performance", "parse", "match", "module", "init_performance", "env", "coerce", "hash", "debug", "self", "match", "extend", "v", "require_browser", "module", "init_performance", "match", "error", "v", "init_performance", "v", "init_performance", "require_utils", "init_performance", "array", "timeout", "run", "map", "error", "url", "profile", "init_performance", "duration", "init_performance", "Command", "map", "promise", "transform", "init_performance", "message", "libDefault", "module", "init_performance", "init_performance", "init_performance", "pipeline", "libDefault", "module", "init_performance", "init_performance", "init_performance", "init_performance", "target", "position", "error", "init_performance", "exec", "promise", "init_performance", "libDefault", "module", "init_performance", "init_performance", "libDefault", "module", "init_performance", "require_util", "init_performance", "record", "init_performance", "debug", "channel", "init_performance", "debug", "error", "module", "init_performance", "array", "count", "clear", "isEmpty", "toArray", "src", "log2", "init_performance", "debug", "init_performance", "debug", "error", "init_performance", "debug", "error", "delay", "sum", "array", "init_performance", "debug", "Cluster", "error", "epoch", "callback", "handlers", "_a", "j", "target", "err", "hostname", "self", "group", "record", "config", "delay", "libDefault", "module", "init_performance", "init_performance", "debug", "info", "init_performance", "init_performance", "init_performance", "debug", "promise", "channel", "init_performance", "debug", "info", "error", "err", "noop", "_a", "init_performance", "init_performance", "message", "init_performance", "libDefault", "module", "init_performance", "libDefault", "module", "init_performance", "module", "init_performance", "Buffer", "decoder", "errors", "number", "sign", "string", "array", "module", "init_performance", "init_performance", "set", "channel", "init_performance", "debug", "channel", "count", "message", "error", "init_performance", "debug", "self", "_a", "info", "close", "errorHandler", "error", "channel", "init_performance", "init_performance", "debug", "promise", "err", "_a", "db", "error", "info", "require_built", "module", "init_performance", "module", "init_performance", "require_debug", "module", "init_performance", "debug", "module", "init_performance", "debug", "src", "t", "max", "module", "init_performance", "module", "init_performance", "numeric", "module", "init_performance", "debug", "t", "version", "release", "match", "module", "init_performance", "parse", "version", "module", "init_performance", "parse", "valid", "version", "v", "module", "init_performance", "parse", "version", "module", "init_performance", "version", "release", "module", "init_performance", "parse", "version2", "module", "init_performance", "module", "init_performance", "module", "init_performance", "module", "init_performance", "parse", "version", "module", "init_performance", "compare", "module", "init_performance", "compare", "module", "init_performance", "compare", "module", "init_performance", "module", "init_performance", "module", "init_performance", "module", "init_performance", "compare", "gt", "module", "init_performance", "compare", "lt", "module", "init_performance", "compare", "eq", "module", "init_performance", "compare", "module", "init_performance", "compare", "gte", "module", "init_performance", "compare", "lte", "module", "init_performance", "eq", "gt", "gte", "lt", "lte", "module", "init_performance", "parse", "t", "coerce", "version", "match", "module", "init_performance", "module", "init_performance", "cached", "cache", "t", "debug", "version", "z", "set", "module", "init_performance", "debug", "t", "version", "module", "init_performance", "version", "module", "init_performance", "module", "init_performance", "versions", "max", "v", "module", "init_performance", "versions", "v", "module", "init_performance", "gt", "require_valid", "module", "init_performance", "module", "init_performance", "gt", "lt", "lte", "gte", "version", "module", "init_performance", "version", "module", "init_performance", "version", "module", "init_performance", "module", "init_performance", "compare", "versions", "set", "v", "version", "max", "module", "init_performance", "compare", "gt", "lt", "eq", "require_semver", "module", "init_performance", "parse", "valid", "compare", "gt", "lt", "eq", "gte", "lte", "coerce", "LuxonError", "Error", "InvalidDateTimeError", "constructor", "reason", "toMessage", "InvalidIntervalError", "InvalidDurationError", "ConflictingSpecificationError", "InvalidUnitError", "unit", "InvalidArgumentError", "ZoneIsAbstractError", "n", "s", "l", "DATE_SHORT", "year", "month", "day", "DATE_MED", "DATE_MED_WITH_WEEKDAY", "weekday", "DATE_FULL", "DATE_HUGE", "TIME_SIMPLE", "hour", "minute", "TIME_WITH_SECONDS", "second", "TIME_WITH_SHORT_OFFSET", "timeZoneName", "TIME_WITH_LONG_OFFSET", "TIME_24_SIMPLE", "hourCycle", "TIME_24_WITH_SECONDS", "TIME_24_WITH_SHORT_OFFSET", "TIME_24_WITH_LONG_OFFSET", "DATETIME_SHORT", "DATETIME_SHORT_WITH_SECONDS", "DATETIME_MED", "DATETIME_MED_WITH_SECONDS", "DATETIME_MED_WITH_WEEKDAY", "DATETIME_FULL", "DATETIME_FULL_WITH_SECONDS", "DATETIME_HUGE", "DATETIME_HUGE_WITH_SECONDS", "Zone", "type", "name", "ianaName", "isUniversal", "offsetName", "ts", "opts", "formatOffset", "format", "offset", "equals", "otherZone", "isValid", "singleton", "SystemZone", "instance", "Intl", "DateTimeFormat", "resolvedOptions", "timeZone", "locale", "parseZoneInfo", "Date", "getTimezoneOffset", "dtfCache", "Map", "makeDTF", "zoneName", "dtf", "get", "undefined", "hour12", "era", "set", "typeToPos", "hackyOffset", "date", "formatted", "replace", "parsed", "exec", "fMonth", "fDay", "fYear", "fadOrBc", "fHour", "fMinute", "fSecond", "partsOffset", "formatToParts", "filled", "i", "length", "value", "pos", "isUndefined", "parseInt", "ianaZoneCache", "IANAZone", "create", "zone", "resetCache", "clear", "isValidSpecifier", "isValidZone", "e", "valid", "NaN", "isNaN", "adOrBc", "Math", "abs", "adjustedHour", "asUTC", "objToLocalTS", "millisecond", "asTS", "over", "intlLFCache", "getCachedLF", "locString", "key", "JSON", "stringify", "ListFormat", "intlDTCache", "getCachedDTF", "intlNumCache", "getCachedINF", "inf", "NumberFormat", "intlRelCache", "getCachedRTF", "base", "cacheKeyOpts", "RelativeTimeFormat", "sysLocaleCache", "systemLocale", "intlResolvedOptionsCache", "getCachedIntResolvedOptions", "weekInfoCache", "getCachedWeekInfo", "data", "Locale", "getWeekInfo", "weekInfo", "fallbackWeekSettings", "parseLocaleString", "localeStr", "xIndex", "indexOf", "substring", "uIndex", "options", "selectedStr", "smaller", "numberingSystem", "calendar", "intlConfigString", "outputCalendar", "includes", "mapMonths", "f", "ms", "dt", "DateTime", "utc", "push", "mapWeekdays", "listStuff", "loc", "englishFn", "intlFn", "mode", "listingMode", "supportsFastNumbers", "startsWith", "PolyNumberFormatter", "intl", "forceSimple", "padTo", "floor", "otherOpts", "Object", "keys", "intlOpts", "useGrouping", "minimumIntegerDigits", "fixed", "roundTo", "padStart", "PolyDateFormatter", "originalZone", "z", "gmtOffset", "offsetZ", "setZone", "plus", "minutes", "map", "join", "toJSDate", "parts", "part", "PolyRelFormatter", "isEnglish", "style", "hasRelative", "rtf", "count", "English", "numeric", "firstDay", "minimalDays", "weekend", "fromOpts", "weekSettings", "defaultToEN", "specifiedLocale", "Settings", "defaultLocale", "localeR", "numberingSystemR", "defaultNumberingSystem", "outputCalendarR", "defaultOutputCalendar", "weekSettingsR", "validateWeekSettings", "defaultWeekSettings", "fromObject", "numbering", "parsedLocale", "parsedNumberingSystem", "parsedOutputCalendar", "weekdaysCache", "standalone", "monthsCache", "meridiemCache", "eraCache", "fastNumbersCached", "fastNumbers", "isActuallyEn", "hasNoWeirdness", "clone", "alts", "getOwnPropertyNames", "redefaultToEN", "redefaultToSystem", "months", "monthSpecialCase", "formatStr", "mapper", "extract", "dtFormatter", "weekdays", "meridiems", "eras", "field", "df", "results", "matching", "find", "m", "toLowerCase", "numberFormatter", "relFormatter", "listFormatter", "getWeekSettings", "hasLocaleWeekInfo", "getStartOfWeek", "getMinDaysInFirstWeek", "getWeekendDays", "other", "toString", "FixedOffsetZone", "utcInstance", "parseSpecifier", "r", "match", "signedOffset", "InvalidZone", "normalizeZone", "input", "defaultZone", "isString", "lowered", "isNumber", "numberingSystems", "arab", "arabext", "bali", "beng", "deva", "fullwide", "gujr", "hanidec", "khmr", "knda", "laoo", "limb", "mlym", "mong", "mymr", "orya", "tamldec", "telu", "thai", "tibt", "latn", "numberingSystemsUTF16", "hanidecChars", "split", "parseDigits", "str", "code", "charCodeAt", "search", "min", "max", "digitRegexCache", "resetDigitRegexCache", "digitRegex", "append", "ns", "appendCache", "regex", "RegExp", "now", "twoDigitCutoffYear", "throwOnInvalid", "cutoffYear", "t", "resetCaches", "Invalid", "explanation", "nonLeapLadder", "leapLadder", "unitOutOfRange", "dayOfWeek", "d", "UTC", "setUTCFullYear", "getUTCFullYear", "js", "getUTCDay", "computeOrdinal", "isLeapYear", "uncomputeOrdinal", "ordinal", "table", "month0", "findIndex", "isoWeekdayToLocal", "isoWeekday", "startOfWeek", "gregorianToWeek", "gregObj", "minDaysInFirstWeek", "weekNumber", "weekYear", "weeksInWeekYear", "timeObject", "weekToGregorian", "weekData", "weekdayOfJan4", "yearInDays", "daysInYear", "gregorianToOrdinal", "gregData", "ordinalToGregorian", "ordinalData", "usesLocalWeekValues", "obj", "hasLocaleWeekData", "localWeekday", "localWeekNumber", "localWeekYear", "hasIsoWeekData", "hasInvalidWeekData", "validYear", "isInteger", "validWeek", "integerBetween", "validWeekday", "hasInvalidOrdinalData", "validOrdinal", "hasInvalidGregorianData", "validMonth", "validDay", "daysInMonth", "hasInvalidTimeData", "validHour", "validMinute", "validSecond", "validMillisecond", "o", "isDate", "prototype", "call", "maybeArray", "thing", "Array", "isArray", "bestBy", "arr", "by", "compare", "reduce", "best", "next", "pair", "pick", "a", "k", "hasOwnProperty", "prop", "settings", "some", "v", "from", "bottom", "top", "floorMod", "x", "isNeg", "padded", "parseInteger", "string", "parseFloating", "parseFloat", "parseMillis", "fraction", "number", "digits", "rounding", "factor", "ceil", "trunc", "round", "RangeError", "modMonth", "modYear", "firstWeekOffset", "fwdlw", "weekOffset", "weekOffsetNext", "untruncateYear", "offsetFormat", "modified", "offHourStr", "offMinuteStr", "offHour", "Number", "offMin", "offMinSigned", "is", "asNumber", "numericValue", "isFinite", "normalizeObject", "normalizer", "normalized", "u", "hours", "sign", "monthsLong", "monthsShort", "monthsNarrow", "weekdaysLong", "weekdaysShort", "weekdaysNarrow", "erasLong", "erasShort", "erasNarrow", "meridiemForDateTime", "weekdayForDateTime", "monthForDateTime", "eraForDateTime", "formatRelativeTime", "narrow", "units", "years", "quarters", "weeks", "days", "seconds", "lastable", "isDay", "isInPast", "fmtValue", "singular", "lilUnits", "fmtUnit", "stringifyTokens", "splits", "tokenToString", "token", "literal", "val", "macroTokenToFormatOpts", "D", "Formats", "DD", "DDD", "DDDD", "tt", "ttt", "tttt", "T", "TT", "TTT", "TTTT", "ff", "fff", "ffff", "F", "FF", "FFF", "FFFF", "Formatter", "parseFormat", "fmt", "current", "currentFull", "bracketed", "c", "charAt", "test", "formatOpts", "systemLoc", "formatWithSystemDefault", "formatDateTime", "formatDateTimeParts", "formatInterval", "interval", "start", "formatRange", "end", "num", "p", "signDisplay", "formatDateTimeFromString", "knownEnglish", "useDateTimeFormatter", "isOffsetFixed", "allowZ", "meridiem", "maybeMacro", "slice", "quarter", "formatDurationFromString", "dur", "invertLargest", "signMode", "tokenToField", "lildur", "info", "mapped", "inversionFactor", "isNegativeDuration", "largestUnit", "tokens", "realTokens", "found", "concat", "collapsed", "shiftTo", "filter", "durationInfo", "values", "ianaRegex", "combineRegexes", "regexes", "full", "source", "combineExtractors", "extractors", "mergedVals", "mergedZone", "cursor", "ex", "parse", "patterns", "extractor", "simpleParse", "ret", "offsetRegex", "isoExtendedZone", "isoTimeBaseRegex", "isoTimeRegex", "isoTimeExtensionRegex", "isoYmdRegex", "isoWeekRegex", "isoOrdinalRegex", "extractISOWeekData", "extractISOOrdinalData", "sqlYmdRegex", "sqlTimeRegex", "sqlTimeExtensionRegex", "int", "fallback", "extractISOYmd", "item", "extractISOTime", "milliseconds", "extractISOOffset", "local", "fullOffset", "extractIANAZone", "isoTimeOnly", "isoDuration", "extractISODuration", "yearStr", "monthStr", "weekStr", "dayStr", "hourStr", "minuteStr", "secondStr", "millisecondsStr", "hasNegativePrefix", "negativeSeconds", "maybeNegate", "force", "obsOffsets", "GMT", "EDT", "EST", "CDT", "CST", "MDT", "MST", "PDT", "PST", "fromStrings", "weekdayStr", "result", "rfc2822", "extractRFC2822", "obsOffset", "milOffset", "preprocessRFC2822", "trim", "rfc1123", "rfc850", "ascii", "extractRFC1123Or850", "extractASCII", "isoYmdWithTimeExtensionRegex", "isoWeekWithTimeExtensionRegex", "isoOrdinalWithTimeExtensionRegex", "isoTimeCombinedRegex", "extractISOYmdTimeAndOffset", "extractISOWeekTimeAndOffset", "extractISOOrdinalDateAndTime", "extractISOTimeAndOffset", "parseISODate", "parseRFC2822Date", "parseHTTPDate", "parseISODuration", "extractISOTimeOnly", "parseISOTimeOnly", "sqlYmdWithTimeExtensionRegex", "sqlTimeCombinedRegex", "extractISOTimeOffsetAndIANAZone", "parseSQL", "INVALID", "lowOrderMatrix", "casualMatrix", "daysInYearAccurate", "daysInMonthAccurate", "accurateMatrix", "orderedUnits", "reverseUnits", "reverse", "conf", "conversionAccuracy", "matrix", "Duration", "durationToMillis", "vals", "_vals$milliseconds", "sum", "normalizeValues", "reduceRight", "previous", "previousVal", "conv", "rollUp", "removeZeroes", "newVals", "entries", "config", "accurate", "invalid", "isLuxonDuration", "fromMillis", "normalizeUnit", "fromDurationLike", "durationLike", "isDuration", "fromISO", "text", "fromISOTime", "week", "toFormat", "fmtOpts", "toHuman", "showZeros", "unitDisplay", "listStyle", "toObject", "toISO", "toISOTime", "millis", "toMillis", "suppressMilliseconds", "suppressSeconds", "includePrefix", "includeOffset", "dateTime", "toJSON", "Symbol", "for", "invalidReason", "valueOf", "duration", "minus", "negate", "mapUnits", "fn", "mixed", "reconfigure", "as", "normalize", "rescale", "shiftToAll", "built", "accumulated", "lastUnit", "own", "ak", "negated", "removeZeros", "invalidExplanation", "eq", "v1", "v2", "validateStartEnd", "Interval", "isLuxonInterval", "fromDateTimes", "builtStart", "friendlyDateTime", "builtEnd", "validateError", "after", "before", "startIsValid", "endIsValid", "isInterval", "lastDateTime", "toDuration", "startOf", "useLocaleWeeks", "diff", "hasSame", "isEmpty", "isAfter", "isBefore", "contains", "splitAt", "dateTimes", "sorted", "sort", "b", "added", "splitBy", "idx", "divideEqually", "numberOfParts", "overlaps", "abutsStart", "abutsEnd", "engulfs", "intersection", "union", "merge", "intervals", "final", "sofar", "xor", "currentCount", "ends", "time", "flattened", "difference", "toLocaleString", "toISODate", "dateFormat", "separator", "mapEndpoints", "mapFn", "Info", "hasDST", "proto", "isValidIANAZone", "locObj", "getMinimumDaysInFirstWeek", "getWeekendWeekdays", "monthsFormat", "weekdaysFormat", "features", "relative", "localeWeek", "dayDiff", "earlier", "later", "utcDayStart", "toUTC", "keepLocalTime", "highOrderDiffs", "differs", "lowestOrder", "highWater", "differ", "remainingMillis", "lowerOrderUnits", "MISSING_FTP", "intUnit", "post", "deser", "NBSP", "String", "fromCharCode", "spaceOrNBSP", "spaceOrNBSPRegExp", "fixListRegex", "stripInsensitivities", "oneOf", "strings", "startIndex", "groups", "h", "simple", "escapeToken", "unitForToken", "one", "two", "three", "four", "six", "oneOrTwo", "oneToThree", "oneToSix", "oneToNine", "twoToFour", "fourToSix", "unitate", "partTypeStyleToTokenVal", "short", "long", "dayperiod", "dayPeriod", "hour24", "tokenForPart", "resolvedOpts", "isSpace", "actualType", "buildRegex", "re", "handlers", "matches", "all", "matchIndex", "dateTimeFromMatches", "toField", "specificOffset", "Z", "q", "M", "G", "y", "S", "dummyDateTimeCache", "getDummyDateTime", "maybeExpandMacroToken", "formatOptsToTokens", "expandMacroTokens", "TokenParser", "disqualifyingUnit", "regexString", "explainFromTokens", "rawMatches", "parser", "parseFromTokens", "formatter", "MAX_DATE", "unsupportedZone", "possiblyCachedWeekData", "possiblyCachedLocalWeekData", "localWeekData", "inst", "old", "fixOffset", "localTS", "tz", "utcGuess", "o2", "o3", "tsToObj", "getUTCMonth", "getUTCDate", "getUTCHours", "getUTCMinutes", "getUTCSeconds", "getUTCMilliseconds", "objToTS", "adjustTime", "oPre", "millisToAdd", "parseDataToDateTime", "parsedZone", "interpretationZone", "toTechFormat", "extended", "precision", "longFormat", "extendedZone", "showSeconds", "defaultUnitValues", "defaultWeekUnitValues", "defaultOrdinalUnitValues", "orderedWeekUnits", "orderedOrdinalUnits", "weeknumber", "weeksnumber", "weeknumbers", "weekyear", "weekyears", "normalizeUnitWithLocalWeeks", "guessOffsetForZone", "zoneOffsetTs", "offsetGuess", "zoneOffsetGuessCache", "quickDT", "offsetProvis", "diffRelative", "calendary", "lastOpts", "argList", "args", "unchanged", "ot", "_zone", "isLuxonDateTime", "arguments", "fromJSDate", "zoneToUse", "fromSeconds", "tsNow", "containsOrdinal", "containsGregorYear", "containsGregorMD", "containsGregor", "definiteWeekDef", "useWeekData", "defaultValues", "objNow", "foundFirst", "higherOrderInvalid", "gregorian", "tsFinal", "offsetFinal", "fromRFC2822", "fromHTTP", "fromFormat", "localeToUse", "fromString", "fromSQL", "isDateTime", "parseFormatForOpts", "localeOpts", "tokenList", "expandFormat", "expanded", "isWeekend", "monthShort", "monthLong", "weekdayShort", "weekdayLong", "offsetNameShort", "offsetNameLong", "isInDST", "getPossibleOffsets", "dayMs", "minuteMs", "oEarlier", "oLater", "o1", "ts1", "ts2", "c1", "c2", "isInLeapYear", "weeksInLocalWeekYear", "resolvedLocaleOptions", "toLocal", "keepCalendarTime", "newTS", "asObj", "setLocale", "settingWeekStuff", "normalizedUnit", "endOf", "toLocaleParts", "ext", "toISOWeekDate", "toRFC2822", "toHTTP", "toSQLDate", "toSQLTime", "includeZone", "includeOffsetSpace", "toSQL", "toSeconds", "toUnixInteger", "toBSON", "includeConfig", "otherDateTime", "durOpts", "otherIsLater", "diffed", "diffNow", "until", "inputMs", "adjustedToZone", "toRelative", "padding", "toRelativeCalendar", "every", "fromFormatExplain", "fromStringExplain", "buildFormatParser", "fromFormatParser", "formatParser", "dateTimeish", "VERSION", "module", "init_performance", "module", "init_performance", "module", "init_performance", "max", "module", "init_performance", "match", "i", "c", "value", "max", "count", "exists", "date", "parse", "self", "expression", "options", "val", "atoms", "field", "values", "require_parser", "module", "init_performance", "parseExpression", "AbortController", "Headers", "Request", "Response", "fetch", "init_performance", "module", "init_performance", "libDefault", "module", "init_performance", "libDefault", "module", "init_performance", "module", "init_performance", "count", "run", "error", "map", "module", "init_performance", "module", "init_performance", "self", "error", "message", "count", "init_performance", "original", "require_retry", "module", "init_performance", "module", "init_performance", "number", "module", "Expo", "url", "message", "json", "text", "error", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "middleware", "context", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "all", "init_performance", "path", "routePath", "match", "decoder", "url", "path", "v", "url", "path", "raw", "text", "target", "init_performance", "context", "v", "content", "v2", "text", "object", "init_performance", "init_performance", "path", "handlers", "clone", "url", "env", "context", "init_performance", "init_performance", "init_performance", "path", "path2", "init_performance", "context", "init_performance", "path", "path", "handlers", "map", "middleware", "path2", "init_performance", "init_performance", "init_performance", "path", "router", "init_performance", "init_performance", "init_performance", "Node", "_Node", "path", "v", "Node", "path", "Hono", "init_performance", "defaults", "origin", "set", "init_performance", "init_performance", "process", "navigator", "v", "time", "log", "path", "logger2", "url", "obj1: TType", "newObj: TType", "value: unknown", "fn: unknown", "fn: () => TValue", "it: T", "signals: AbortSignal[]", "ac", "TRPC_ERROR_CODES_BY_NUMBER: InvertKeyValue<\n typeof TRPC_ERROR_CODES_BY_KEY\n>", "retryableRpcCodes: TRPC_ERROR_CODE_NUMBER[]", "obj: object", "callback: ProxyCallback", "path: readonly string[]", "memo: Record", "path", "memo", "JSONRPC2_TO_HTTP_CODE: Record<\n keyof typeof TRPC_ERROR_CODES_BY_KEY,\n number\n>", "code: keyof typeof TRPC_ERROR_CODES_BY_KEY", "json: TRPCResponse | TRPCResponse[]", "json", "error: TRPCError", "error", "_typeof", "module", "o", "toPrimitive", "t", "toPropertyKey", "r", "opts: {\n config: RootConfig;\n error: TRPCError;\n type: ProcedureType | 'unknown';\n path: string | undefined;\n input: unknown;\n ctx: TRoot['ctx'] | undefined;\n}", "path", "config", "shape: DefaultErrorShape", "defaultFormatter: ErrorFormatter", "cause: unknown", "opts: {\n message?: string;\n code: TRPC_ERROR_CODE_KEY;\n cause?: unknown;\n }", "message", "transformer: DataTransformerOptions", "defaultTransformer: CombinedDataTransformer", "config: RootConfig", "item: TResponseItem", "config", "itemOrItems: TResponse", "once", "fn: () => T", "result: T | typeof uncalled", "input: unknown", "value: unknown", "config: RootConfig", "input: TInput", "v", "procedures: Record", "lazy: Record>", "opts: {\n ref: Lazy;\n path: readonly string[];\n key: string;\n aggregate: RouterRecord;\n }", "once", "router", "lazy", "from: CreateRouterOptions", "path: readonly string[]", "aggregate: RouterRecord", "path", "record", "_def: AnyRouter['_def']", "config", "router: BuiltRouter", "procedureOrRouter: ValueOf", "router: Pick, '_def'>", "path: string", "key", "router: Pick, '_def'>", "router", "path", "ctx: Context | undefined", "record", "value: unknown", "x: unknown", "observable: Observable", "signal: AbortSignal", "unsub: Unsubscribable | null", "error", "observable", "iterator: AsyncIterator", "iterator", "parsed: unknown", "_key", "str: string", "headers: Headers", "t", "fn: () => Promise", "promise: Promise | null", "value: TReturn | typeof sym", "_promise", "promise", "jsonContentTypeHandler: ContentTypeHandler", "inputs: unknown", "result: InputRecord", "acc: InputRecord", "path", "import_objectSpread2$1", "type: ProcedureType | 'unknown'", "info: TRPCRequestInfo", "info", "formDataContentTypeHandler: ContentTypeHandler", "octetStreamContentTypeHandler: ContentTypeHandler", "req: Request", "handler", "opts: GetRequestInfoOptions", "error: unknown", "error", "message", "isObject", "o: unknown", "Unpromise", "arg: Promise | PromiseLike | PromiseExecutor", "promise: Promise", "unsubscribe: () => void", "onfulfilled?:\n | ((value: T) => TResult1 | PromiseLike)\n | null", "onrejected?:\n | ((reason: any) => TResult2 | PromiseLike)\n | null", "onrejected?:\n | ((reason: any) => TResult | PromiseLike)\n | null", "onfinally?: (() => void) | null", "promise: PromiseLike", "cached", "value: T | PromiseLike", "values: Iterable>", "promises: readonly TPromise[]", "promise: TPromise", "resolve!: PromiseWithResolvers[\"resolve\"]", "reject!: PromiseWithResolvers[\"reject\"]", "arr: readonly T[]", "member: T", "member", "index: number", "member: unknown", "thing: T", "dispose: () => void", "dispose: () => Promise", "ms: number", "timer: ReturnType | null", "r", "e", "n", "o", "module", "OverloadYield", "_awaitAsyncGenerator", "_wrapAsyncGenerator", "u", "settle", "iterable: AsyncIterable", "iterator", "_x", "_x2", "iterable: AsyncIterable", "opts: {\n count: number;\n gracePeriodMs: number;\n }", "result: null | IteratorResult | typeof disposablePromiseTimerResult", "count", "resolve: (value: TValue) => void", "reject: (error: unknown) => void", "iterable: AsyncIterable", "onResult: (result: ManagedIteratorResult) => void", "state: 'idle' | 'pending' | 'done'", "iterables: AsyncIterable[]", "buffer: Array<\n [\n iterator: ManagedIterator,\n result: Exclude<\n ManagedIteratorResult,\n { status: 'return' }\n >,\n ]\n >", "iterable: AsyncIterable", "errors: unknown[]", "errors", "iterable: AsyncIterable", "iterable: AsyncIterable", "pingIntervalMs: number", "result:\n | null\n | IteratorResult\n | typeof disposablePromiseTimerResult", "_asyncIterator", "AsyncFromSyncIterator", "value: unknown", "path: (string | number)[]", "opts: JSONLProducerOptions", "callback: (idx: ChunkIndex) => AsyncIterable", "iterable", "promise: Promise", "encode", "iterable: AsyncIterable", "encodeAsync", "newObj: Record", "asyncValues: ChunkDefinition[]", "newHead: Head", "iterable: AsyncIterable", "_asyncGeneratorDelegate", "t", "e", "n", "module", "opts: SSEStreamProducerOptions", "ping: Required", "client: SSEClientOptions", "iterable: AsyncIterable", "value: null | TIteratorValue", "chunk: null | SSEvent", "error", "controller: TransformStreamDefaultController", "err: TRPCError", "signal: AbortSignal", "TYPE_ACCEPTED_METHOD_MAP: Record", "TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE: Record<\n ProcedureType,\n HTTPMethods[]\n>", "initOpts: {\n ctx: inferRouterContext | undefined;\n info: TRPCRequestInfo | undefined;\n responseMeta?: HTTPBaseHandlerOptions['responseMeta'];\n untransformedJSON:\n | TRPCResponse>\n | TRPCResponse>[]\n | null;\n errors: TRPCError[];\n headers: Headers;\n}", "info", "errors", "meta", "v", "cause: unknown", "errorOpts: {\n opts: Pick<\n ResolveHTTPRequestOptions,\n 'onError' | 'req' | 'router'\n >;\n ctx: inferRouterContext | undefined;\n type: ProcedureType | 'unknown';\n path?: string;\n input?: unknown;\n }", "router", "error", "v: unknown", "opts: ResolveHTTPRequestOptions", "config", "url", "infoTuple: ResultTuple", "ctxManager: ContextManager", "result: ResultTuple<$Context> | undefined", "data: unknown", "res: TRPCResponse>", "headResponse", "iterable: AsyncIterable", "import_objectSpread2", "path", "responseBody: ReadableStream", "results: RPCResult[]", "path: string", "path", "opts: FetchHandlerRequestOptions", "createContext: ResolveHTTPRequestOptionsContextFn", "import_objectSpread2", "url", "meta", "v", "init_performance", "path", "t", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_utils", "builtQuery", "config", "logger", "cache", "config", "logger", "db", "init_performance", "init_performance", "init_performance", "init_performance", "minOrderValue", "init_performance", "record", "u", "updateData", "init_performance", "tag", "tag", "tag", "group", "updateData", "updateData", "init_performance", "getStringArray", "group", "init_performance", "init_performance", "init_performance", "count", "init_performance", "mapVendorSnippet", "mapDeliverySlot", "init_performance", "init_performance", "init_performance", "getStringArray", "getProductById", "init_performance", "init_performance", "getStringArray", "init_performance", "getStringArray", "getProductReviews", "getProductById", "init_performance", "init_performance", "init_performance", "email", "getUserByMobile", "error", "init_performance", "init_performance", "getUserById", "init_performance", "getProductById", "updateOrderNotes", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "string", "init_performance", "encode", "init_performance", "hash", "init_performance", "init_performance", "message", "message", "init_performance", "init_performance", "init_performance", "isObject", "init_performance", "hash", "init_performance", "init_performance", "cached", "hash", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "isObject", "extensions", "init_performance", "init_performance", "date", "isObject", "max", "jwt", "init_performance", "init_performance", "extensions", "encode", "init_performance", "init_performance", "message", "init_performance", "error", "Hono", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "ChecksumAlgorithm", "ChecksumLocation", "init_performance", "init_performance", "context", "feature", "init_performance", "context", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "encoder", "transform", "error", "init_performance", "init_performance", "logger", "size", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "url", "hostname", "init_performance", "init_performance", "ref", "ns", "v", "z", "init_performance", "v", "registry", "init_performance", "init_performance", "logger", "message", "logger", "match", "year", "day", "time", "init_performance", "setFeature", "context", "feature", "init_performance", "init_performance", "init_performance", "hash", "init_performance", "init_performance", "init_performance", "init_performance", "position", "HEADER_VALUE_TYPE", "number", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "value", "serialized", "init_performance", "time", "hash", "path", "hash", "promise", "init_performance", "init_performance", "debug", "middleware", "entry", "context", "init_performance", "init_performance", "object", "member", "logger", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "hasHeader", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "t", "t", "v", "init_performance", "init_performance", "init_performance", "init_performance", "fromUtf8", "init_performance", "init_performance", "fromUtf8", "init_performance", "init_performance", "init_performance", "a_lookUpTable", "init_performance", "AwsCrc32c", "Crc32c", "init_performance", "init_performance", "table", "init_performance", "init_performance", "init_performance", "AwsCrc32", "Crc32", "lookupTable", "lookupTable", "init_performance", "config", "init_performance", "hash", "config", "context", "hasHeader", "init_performance", "init_performance", "config", "context", "init_performance", "init_performance", "init_performance", "number", "init_performance", "init_performance", "config", "logger", "error", "config", "context", "config", "init_performance", "context", "message", "init_performance", "config", "context", "init_performance", "init_performance", "init_performance", "init_performance", "config", "context", "init_performance", "init_performance", "init_performance", "config", "hostname", "path", "init_performance", "init_performance", "context", "init_performance", "config", "context", "setFeature", "init_performance", "init_performance", "config", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "hash", "config", "init_performance", "Command", "config", "init_performance", "Command", "config", "init_performance", "Command", "config", "init_performance", "init_performance", "path", "hostname", "init_performance", "init_performance", "UNSIGNED_PAYLOAD", "SHA256_HEADER", "SHA256_HEADER", "UNSIGNED_PAYLOAD", "context", "presigned", "error", "domain", "s3Url", "url", "error", "u", "init_performance", "init_performance", "init_performance", "middlewares: AnyMiddlewareFunction[]", "fn: MiddlewareFunction<\n TContext,\n TMeta,\n object,\n $ContextOverrides,\n TInputOut\n >", "parse: ParseFn", "inputMiddleware: AnyMiddlewareFunction", "parsedInput: ReturnType", "parse", "parse: ParseFn", "outputMiddleware: AnyMiddlewareFunction", "issues: ReadonlyArray", "procedureParser: Parser", "t", "module", "_objectWithoutProperties", "def1: AnyProcedureBuilderDef", "def2: Partial", "meta", "import_objectSpread2$1", "initDef: Partial", "_def: AnyProcedureBuilderDef", "builder: AnyProcedureBuilder", "output: Parser", "builder", "resolver: ProcedureResolver", "_defIn: AnyProcedureBuilderDef & { type: ProcedureType }", "resolver: AnyResolver", "_def: AnyProcedure['_def']", "index: number", "opts: ProcedureCallOptions", "middleware", "_nextOpts?: any", "opts: ProcedureCallOptions", "isServerDefault: boolean", "TRPCBuilder", "opts?: ValidateShape>", "config: RootConfig<$Root>", "isServer: boolean", "config", "router", "path", "duration", "error", "createCallerFactory", "init_performance", "tag", "error", "getProductById", "productSlots", "t", "getAllProducts", "specialDeals", "productTags", "init_performance", "tag", "error", "tag", "error", "getAllProducts", "router", "error", "router", "Hono", "router", "Hono", "commonRouter", "router", "Hono", "init_performance", "router", "Hono", "init_performance", "error", "router", "Hono", "init_performance", "init_performance", "_default", "base64", "base64url", "bigint", "boolean", "_catch", "check", "cidrv4", "cidrv6", "config", "core_exports", "cuid", "cuid2", "date", "decode", "decodeAsync", "describe", "e164", "email", "emoji", "encode", "encodeAsync", "_enum", "guid", "hex", "hostname", "ipv4", "ipv6", "ksuid", "lazy", "mac", "meta", "nanoid", "_null", "nullish", "number", "parse", "parseAsync", "safeDecode", "safeDecodeAsync", "safeEncode", "safeEncodeAsync", "safeParse", "safeParseAsync", "string", "ulid", "_undefined", "union", "uuid", "_void", "xid", "init_performance", "core_exports", "_emoji", "_null", "_undefined", "config", "decode", "encode", "process", "version", "init_performance", "init_performance", "initializer", "_a", "config", "init_performance", "init_performance", "assert", "isObject", "isPlainObject", "merge", "init_performance", "_x", "assert", "v", "array", "set", "match", "object", "target", "path", "chars", "isObject", "isPlainObject", "t", "merge", "Class", "_a", "message", "config", "base64", "base64url", "hex", "error", "issue", "path", "_a", "_Err", "config", "encode", "decode", "init_performance", "init_performance", "bigint", "domain", "integer", "time", "init_performance", "version", "domain", "time", "bigint", "integer", "_a", "origin", "inst", "integer", "result", "init_performance", "content", "init_performance", "version", "_a", "version", "checks", "checkResult", "canary", "result", "_", "v", "url", "time", "base64", "bigint", "isDate", "t", "r", "desc", "isObject", "allowsEval", "config", "results", "map", "left", "right", "isPlainObject", "keyResult", "valueResult", "output", "init_performance", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "count", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "t", "origin", "issue", "v", "init_performance", "error", "origin", "issue", "init_performance", "count", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "text", "number", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "count", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "error", "origin", "issue", "init_performance", "meta", "init_performance", "Class", "_emoji", "_undefined", "_null", "Class", "v", "issue", "codec", "init_performance", "target", "process", "_a", "meta", "id", "ref", "schema", "init_performance", "json", "v", "file", "process", "registry", "ctx", "init_performance", "process", "init_performance", "schemas_exports", "_default", "base64", "base64url", "bigint", "boolean", "_catch", "check", "cidrv4", "cidrv6", "cuid", "cuid2", "date", "describe", "e164", "email", "emoji", "_enum", "guid", "hex", "hostname", "ipv4", "ipv6", "ksuid", "lazy", "mac", "meta", "nanoid", "_null", "nullish", "number", "string", "ulid", "_undefined", "union", "uuid", "_void", "xid", "init_performance", "checks_exports", "init_performance", "date", "datetime", "duration", "time", "init_performance", "datetime", "date", "time", "duration", "init_performance", "init_performance", "initializer", "issue", "issues", "parse", "parseAsync", "safeParse", "safeParseAsync", "encode", "decode", "encodeAsync", "decodeAsync", "safeEncode", "safeDecode", "safeEncodeAsync", "safeDecodeAsync", "def", "meta", "parse", "safeParse", "parseAsync", "safeParseAsync", "encode", "decode", "encodeAsync", "decodeAsync", "safeEncode", "safeDecode", "safeEncodeAsync", "safeDecodeAsync", "check", "union", "_default", "_catch", "target", "json", "_emoji", "datetime", "date", "time", "duration", "string", "email", "guid", "uuid", "emoji", "nanoid", "cuid", "cuid2", "ulid", "xid", "ksuid", "ipv4", "mac", "ipv6", "cidrv4", "cidrv6", "base64", "base64url", "e164", "hostname", "hex", "number", "boolean", "bigint", "_undefined", "json", "_null", "json", "_void", "json", "date", "_enum", "union", "v", "json", "issue", "output", "nullish", "_default", "_catch", "json", "lazy", "json", "check", "describe", "meta", "lazy", "union", "string", "number", "boolean", "_null", "init_performance", "map", "config", "ZodFirstPartyTypeKind", "init_performance", "schemas_exports", "checks_exports", "ref", "path", "zodSchema", "v", "t", "objectSchema", "version", "bigint", "boolean", "date", "number", "string", "init_performance", "string", "number", "boolean", "bigint", "date", "config", "init_performance", "init_performance", "router", "init_performance", "router", "dayjs", "updateData", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "Node", "promise", "_a", "init_performance", "delay", "init_performance", "init_performance", "init_performance", "init_performance", "EventEmitter", "EventEmitter", "init_performance", "init_performance", "ChildCommand", "init_performance", "ErrorCode", "init_performance", "ParentCommand", "init_performance", "MetricsTime", "init_performance", "TelemetryAttributes", "MetricNames", "SpanKind", "EventEmitter", "EventEmitter", "execArgv", "exitCode", "init_performance", "init_performance", "init_performance", "import_utils", "count", "error", "version", "trace", "tracer", "ChildStatus", "init_performance", "init_performance", "message", "init_performance", "message", "init_performance", "message", "init_performance", "message", "init_performance", "message", "init_performance", "EventEmitter", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "decoder", "error", "error", "forEach", "read", "error", "object", "map", "array", "string", "readObject", "decoder", "units", "array", "read", "object", "map", "string", "decode", "error", "target", "v", "decode", "error", "position", "bundledStrings", "referenceMap", "string", "pack", "maxBytes", "json", "array", "object", "key", "newPosition", "date", "target", "targetView", "set", "encode", "encode", "NEVER", "init_performance", "init_performance", "version", "pack", "version", "pause", "src", "duration", "target", "_a", "_c", "_d", "_e", "asc", "delay", "set", "count", "error", "raw", "logger", "_a", "json", "duration", "delay", "set", "_c", "_d", "_e", "_h", "init_performance", "import_ioredis", "import_utils", "EventEmitter", "init_performance", "init_performance", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "init_performance", "content", "EventEmitter", "version", "_a", "url", "IORedis", "error", "init_performance", "EventEmitter", "EventEmitter", "error", "err", "trace", "_a", "delay", "asc", "init_performance", "import_node_abort_controller", "_a", "tracked", "init_performance", "count", "max", "duration", "sum", "_a", "config", "asc", "meta", "point", "init_performance", "import_cron_parser", "_a", "delay", "asc", "_a", "_d", "_c", "version", "max", "duration", "_e", "asc", "count", "init_performance", "process", "exitCode", "signal", "_a", "_c", "_d", "_e", "error", "init_performance", "init_fs", "URL", "path", "import_node_abort_controller", "Worker", "URL", "dirname", "error", "_a", "duration", "delay", "job", "_key", "member", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "ClientType", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "Worker", "title", "message", "error", "init_performance", "init_performance", "channel", "message", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "cache", "isFunction", "isArrayBuffer", "isObject", "isPlainObject", "prototype", "isReadableStream", "_key", "context", "merge", "extend", "content", "filter", "position", "toCamelCase", "hasOwnProperty", "define", "noop", "target", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "error", "config", "message", "init_performance", "path", "encode", "match", "toString", "encoder", "_encode", "encode", "url", "_encode", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "path", "init_performance", "match", "path", "target", "encoder", "isFormData", "isFileList", "transitional", "init_performance", "init_performance", "match", "context", "filter", "self", "target", "prototype", "config", "context", "transform", "init_performance", "init_performance", "message", "config", "init_performance", "init_performance", "init_performance", "validateStatus", "init_performance", "url", "match", "init_performance", "init_performance", "init_performance", "flush", "init_performance", "init_performance", "origin", "url", "init_performance", "path", "domain", "match", "init_performance", "init_performance", "url", "init_performance", "init_performance", "config2", "config", "target", "merge", "config", "config", "transitional", "init_performance", "init_performance", "aborted", "signal", "init_performance", "iterator", "done", "isFunction", "Request", "Response", "ReadableStream", "TextEncoder", "env", "encoder", "config", "url", "flush", "fetch", "target", "map", "adapter", "config", "config", "adapter", "init_performance", "init_performance", "version", "message", "desc", "validators", "config", "transitional", "promise", "error", "url", "init_performance", "promise", "message", "config", "abort", "init_performance", "init_performance", "init_performance", "context", "Axios", "AxiosError", "CanceledError", "isCancel", "CancelToken", "VERSION", "all", "isAxiosError", "spread", "toFormData", "AxiosHeaders", "HttpStatusCode", "getAdapter", "mergeConfig", "message", "error", "init_performance", "error", "router", "orders", "init_performance", "import_dayjs", "router", "updateData", "sum", "dayjs", "init_performance", "init_performance", "init_performance", "error", "init_performance", "init_performance", "error", "init_performance", "error", "pid", "error", "init_performance", "error", "init_performance", "init_performance", "isNumber", "isNumber", "init_performance", "init_performance", "init_performance", "init_performance", "C1", "_i", "t1", "t0", "u3", "init_performance", "u", "init_performance", "bc", "ca", "ab", "u", "abt", "bct", "cat", "_8", "_16", "fin", "fin2", "init_performance", "ab", "bc", "_8", "_8b", "_16", "_48", "fin", "polygon", "u2", "point", "polygon", "init_performance", "polygon", "router", "point", "error", "init_performance", "tag", "router", "init_performance", "import_dayjs", "dayjs", "router", "init_performance", "router", "init_performance", "init_performance", "init_performance", "error", "path", "error", "error", "slotsRouter", "router", "init_performance", "router", "url", "group", "tag", "init_performance", "init_performance", "callback", "nextTick", "hash", "salt", "unknown", "string", "off", "err", "encodeBase64", "decodeBase64", "router", "init_performance", "router", "error", "init_performance", "router", "init_performance", "bannerRouter", "router", "error", "updateData", "init_performance", "count", "u", "title", "text", "t", "error", "init_performance", "router", "router", "slotsRouter", "bannerRouter", "init_performance", "init_performance", "init_performance", "url", "error", "router", "init_performance", "init_performance", "router", "getUserByMobile", "email", "init_performance", "sum", "router", "getProductById", "init_performance", "complaintRouter", "router", "init_performance", "minOrderValue", "deliveryCharge", "getProductById", "sum", "orderRouter", "router", "orderStatus", "u", "updateOrderNotes", "init_performance", "import_dayjs", "productRouter", "router", "getProductById", "dayjs", "getProductReviews", "url", "error", "getAllProducts", "init_performance", "userRouter", "router", "getUserById", "init_performance", "desc", "router", "init_performance", "crypto", "init_performance", "router", "crypto", "init_performance", "router", "error", "init_performance", "router", "tag", "userRouter", "router", "complaintRouter", "orderRouter", "productRouter", "router", "userRouter", "Hono", "error", "path", "message", "env", "init_performance", "env", "init_performance", "env", "error", "init_performance", "env", "middleware", "env"] +} diff --git a/apps/backend/.wrangler/tmp/dev-RJsRQO/worker.js b/apps/backend/.wrangler/tmp/dev-RJsRQO/worker.js new file mode 100644 index 0000000..2f26f71 --- /dev/null +++ b/apps/backend/.wrangler/tmp/dev-RJsRQO/worker.js @@ -0,0 +1,77826 @@ +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 __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __commonJS = (cb2, mod) => function __require() { + return mod || (0, cb2[__getOwnPropNames(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all3) => { + for (var name in all3) + __defProp(target, name, { get: all3[name], enumerable: true }); +}; +var __copyProps = (to, from, except2, desc2) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except2) + __defProp(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.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 __publicField = (obj, key, value) => { + __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); + return value; +}; + +// .wrangler/tmp/bundle-vljdhV/strip-cf-connecting-ip-header.js +function stripCfConnectingIPHeader(input, init) { + const request = new Request(input, init); + request.headers.delete("CF-Connecting-IP"); + return request; +} +var init_strip_cf_connecting_ip_header = __esm({ + ".wrangler/tmp/bundle-vljdhV/strip-cf-connecting-ip-header.js"() { + "use strict"; + __name(stripCfConnectingIPHeader, "stripCfConnectingIPHeader"); + globalThis.fetch = new Proxy(globalThis.fetch, { + apply(target, thisArg, argArray) { + return Reflect.apply(target, thisArg, [ + stripCfConnectingIPHeader.apply(null, argArray) + ]); + } + }); + } +}); + +// ../../node_modules/unenv/dist/runtime/_internal/utils.mjs +function createNotImplementedError(name) { + return new Error(`[unenv] ${name} is not implemented yet!`); +} +function notImplemented(name) { + const fn = /* @__PURE__ */ __name(() => { + throw createNotImplementedError(name); + }, "fn"); + return Object.assign(fn, { __unenv__: true }); +} +function notImplementedClass(name) { + return class { + __unenv__ = true; + constructor() { + throw new Error(`[unenv] ${name} is not implemented yet!`); + } + }; +} +var init_utils = __esm({ + "../../node_modules/unenv/dist/runtime/_internal/utils.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(createNotImplementedError, "createNotImplementedError"); + __name(notImplemented, "notImplemented"); + __name(notImplementedClass, "notImplementedClass"); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/perf_hooks/performance.mjs +var _timeOrigin, _performanceNow, nodeTiming, PerformanceEntry, PerformanceMark, PerformanceMeasure, PerformanceResourceTiming, PerformanceObserverEntryList, Performance, PerformanceObserver, performance; +var init_performance = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/perf_hooks/performance.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils(); + _timeOrigin = globalThis.performance?.timeOrigin ?? Date.now(); + _performanceNow = globalThis.performance?.now ? globalThis.performance.now.bind(globalThis.performance) : () => Date.now() - _timeOrigin; + nodeTiming = { + name: "node", + entryType: "node", + startTime: 0, + duration: 0, + nodeStart: 0, + v8Start: 0, + bootstrapComplete: 0, + environment: 0, + loopStart: 0, + loopExit: 0, + idleTime: 0, + uvMetricsInfo: { + loopCount: 0, + events: 0, + eventsWaiting: 0 + }, + detail: void 0, + toJSON() { + return this; + } + }; + PerformanceEntry = class { + __unenv__ = true; + detail; + entryType = "event"; + name; + startTime; + constructor(name, options) { + this.name = name; + this.startTime = options?.startTime || _performanceNow(); + this.detail = options?.detail; + } + get duration() { + return _performanceNow() - this.startTime; + } + toJSON() { + return { + name: this.name, + entryType: this.entryType, + startTime: this.startTime, + duration: this.duration, + detail: this.detail + }; + } + }; + __name(PerformanceEntry, "PerformanceEntry"); + PerformanceMark = /* @__PURE__ */ __name(class PerformanceMark2 extends PerformanceEntry { + entryType = "mark"; + constructor() { + super(...arguments); + } + get duration() { + return 0; + } + }, "PerformanceMark"); + PerformanceMeasure = class extends PerformanceEntry { + entryType = "measure"; + }; + __name(PerformanceMeasure, "PerformanceMeasure"); + PerformanceResourceTiming = class extends PerformanceEntry { + entryType = "resource"; + serverTiming = []; + connectEnd = 0; + connectStart = 0; + decodedBodySize = 0; + domainLookupEnd = 0; + domainLookupStart = 0; + encodedBodySize = 0; + fetchStart = 0; + initiatorType = ""; + name = ""; + nextHopProtocol = ""; + redirectEnd = 0; + redirectStart = 0; + requestStart = 0; + responseEnd = 0; + responseStart = 0; + secureConnectionStart = 0; + startTime = 0; + transferSize = 0; + workerStart = 0; + responseStatus = 0; + }; + __name(PerformanceResourceTiming, "PerformanceResourceTiming"); + PerformanceObserverEntryList = class { + __unenv__ = true; + getEntries() { + return []; + } + getEntriesByName(_name, _type) { + return []; + } + getEntriesByType(type) { + return []; + } + }; + __name(PerformanceObserverEntryList, "PerformanceObserverEntryList"); + Performance = class { + __unenv__ = true; + timeOrigin = _timeOrigin; + eventCounts = /* @__PURE__ */ new Map(); + _entries = []; + _resourceTimingBufferSize = 0; + navigation = void 0; + timing = void 0; + timerify(_fn, _options) { + throw createNotImplementedError("Performance.timerify"); + } + get nodeTiming() { + return nodeTiming; + } + eventLoopUtilization() { + return {}; + } + markResourceTiming() { + return new PerformanceResourceTiming(""); + } + onresourcetimingbufferfull = null; + now() { + if (this.timeOrigin === _timeOrigin) { + return _performanceNow(); + } + return Date.now() - this.timeOrigin; + } + clearMarks(markName) { + this._entries = markName ? this._entries.filter((e2) => e2.name !== markName) : this._entries.filter((e2) => e2.entryType !== "mark"); + } + clearMeasures(measureName) { + this._entries = measureName ? this._entries.filter((e2) => e2.name !== measureName) : this._entries.filter((e2) => e2.entryType !== "measure"); + } + clearResourceTimings() { + this._entries = this._entries.filter((e2) => e2.entryType !== "resource" || e2.entryType !== "navigation"); + } + getEntries() { + return this._entries; + } + getEntriesByName(name, type) { + return this._entries.filter((e2) => e2.name === name && (!type || e2.entryType === type)); + } + getEntriesByType(type) { + return this._entries.filter((e2) => e2.entryType === type); + } + mark(name, options) { + const entry = new PerformanceMark(name, options); + this._entries.push(entry); + return entry; + } + measure(measureName, startOrMeasureOptions, endMark) { + let start; + let end; + if (typeof startOrMeasureOptions === "string") { + start = this.getEntriesByName(startOrMeasureOptions, "mark")[0]?.startTime; + end = this.getEntriesByName(endMark, "mark")[0]?.startTime; + } else { + start = Number.parseFloat(startOrMeasureOptions?.start) || this.now(); + end = Number.parseFloat(startOrMeasureOptions?.end) || this.now(); + } + const entry = new PerformanceMeasure(measureName, { + startTime: start, + detail: { + start, + end + } + }); + this._entries.push(entry); + return entry; + } + setResourceTimingBufferSize(maxSize) { + this._resourceTimingBufferSize = maxSize; + } + addEventListener(type, listener, options) { + throw createNotImplementedError("Performance.addEventListener"); + } + removeEventListener(type, listener, options) { + throw createNotImplementedError("Performance.removeEventListener"); + } + dispatchEvent(event) { + throw createNotImplementedError("Performance.dispatchEvent"); + } + toJSON() { + return this; + } + }; + __name(Performance, "Performance"); + PerformanceObserver = class { + __unenv__ = true; + _callback = null; + constructor(callback) { + this._callback = callback; + } + takeRecords() { + return []; + } + disconnect() { + throw createNotImplementedError("PerformanceObserver.disconnect"); + } + observe(options) { + throw createNotImplementedError("PerformanceObserver.observe"); + } + bind(fn) { + return fn; + } + runInAsyncScope(fn, thisArg, ...args) { + return fn.call(thisArg, ...args); + } + asyncId() { + return 0; + } + triggerAsyncId() { + return 0; + } + emitDestroy() { + return this; + } + }; + __name(PerformanceObserver, "PerformanceObserver"); + __publicField(PerformanceObserver, "supportedEntryTypes", []); + performance = globalThis.performance && "addEventListener" in globalThis.performance ? globalThis.performance : new Performance(); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/perf_hooks.mjs +var init_perf_hooks = __esm({ + "../../node_modules/unenv/dist/runtime/node/perf_hooks.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_performance(); + } +}); + +// ../../node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs +var init_performance2 = __esm({ + "../../node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs"() { + init_perf_hooks(); + globalThis.performance = performance; + globalThis.Performance = Performance; + globalThis.PerformanceEntry = PerformanceEntry; + globalThis.PerformanceMark = PerformanceMark; + globalThis.PerformanceMeasure = PerformanceMeasure; + globalThis.PerformanceObserver = PerformanceObserver; + globalThis.PerformanceObserverEntryList = PerformanceObserverEntryList; + globalThis.PerformanceResourceTiming = PerformanceResourceTiming; + } +}); + +// ../../node_modules/unenv/dist/runtime/mock/noop.mjs +var noop_default; +var init_noop = __esm({ + "../../node_modules/unenv/dist/runtime/mock/noop.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + noop_default = Object.assign(() => { + }, { __unenv__: true }); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/console.mjs +import { Writable } from "node:stream"; +var _console, _ignoreErrors, _stderr, _stdout, log, info, trace, debug, table, error, warn, createTask, clear, count, countReset, dir, dirxml, group, groupEnd, groupCollapsed, profile, profileEnd, time, timeEnd, timeLog, timeStamp, Console, _times, _stdoutErrorHandler, _stderrErrorHandler; +var init_console = __esm({ + "../../node_modules/unenv/dist/runtime/node/console.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_noop(); + init_utils(); + _console = globalThis.console; + _ignoreErrors = true; + _stderr = new Writable(); + _stdout = new Writable(); + log = _console?.log ?? noop_default; + info = _console?.info ?? log; + trace = _console?.trace ?? info; + debug = _console?.debug ?? log; + table = _console?.table ?? log; + error = _console?.error ?? log; + warn = _console?.warn ?? error; + createTask = _console?.createTask ?? /* @__PURE__ */ notImplemented("console.createTask"); + clear = _console?.clear ?? noop_default; + count = _console?.count ?? noop_default; + countReset = _console?.countReset ?? noop_default; + dir = _console?.dir ?? noop_default; + dirxml = _console?.dirxml ?? noop_default; + group = _console?.group ?? noop_default; + groupEnd = _console?.groupEnd ?? noop_default; + groupCollapsed = _console?.groupCollapsed ?? noop_default; + profile = _console?.profile ?? noop_default; + profileEnd = _console?.profileEnd ?? noop_default; + time = _console?.time ?? noop_default; + timeEnd = _console?.timeEnd ?? noop_default; + timeLog = _console?.timeLog ?? noop_default; + timeStamp = _console?.timeStamp ?? noop_default; + Console = _console?.Console ?? /* @__PURE__ */ notImplementedClass("console.Console"); + _times = /* @__PURE__ */ new Map(); + _stdoutErrorHandler = noop_default; + _stderrErrorHandler = noop_default; + } +}); + +// ../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs +var workerdConsole, assert, clear2, context, count2, countReset2, createTask2, debug2, dir2, dirxml2, error2, group2, groupCollapsed2, groupEnd2, info2, log2, profile2, profileEnd2, table2, time2, timeEnd2, timeLog2, timeStamp2, trace2, warn2, console_default; +var init_console2 = __esm({ + "../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_console(); + workerdConsole = globalThis["console"]; + ({ + assert, + clear: clear2, + context: ( + // @ts-expect-error undocumented public API + context + ), + count: count2, + countReset: countReset2, + createTask: ( + // @ts-expect-error undocumented public API + createTask2 + ), + debug: debug2, + dir: dir2, + dirxml: dirxml2, + error: error2, + group: group2, + groupCollapsed: groupCollapsed2, + groupEnd: groupEnd2, + info: info2, + log: log2, + profile: profile2, + profileEnd: profileEnd2, + table: table2, + time: time2, + timeEnd: timeEnd2, + timeLog: timeLog2, + timeStamp: timeStamp2, + trace: trace2, + warn: warn2 + } = workerdConsole); + Object.assign(workerdConsole, { + Console, + _ignoreErrors, + _stderr, + _stderrErrorHandler, + _stdout, + _stdoutErrorHandler, + _times + }); + console_default = workerdConsole; + } +}); + +// ../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-console +var init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console = __esm({ + "../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-console"() { + init_console2(); + globalThis.console = console_default; + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/process/hrtime.mjs +var hrtime; +var init_hrtime = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/process/hrtime.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + hrtime = /* @__PURE__ */ Object.assign(/* @__PURE__ */ __name(function hrtime2(startTime) { + const now = Date.now(); + const seconds = Math.trunc(now / 1e3); + const nanos = now % 1e3 * 1e6; + if (startTime) { + let diffSeconds = seconds - startTime[0]; + let diffNanos = nanos - startTime[0]; + if (diffNanos < 0) { + diffSeconds = diffSeconds - 1; + diffNanos = 1e9 + diffNanos; + } + return [diffSeconds, diffNanos]; + } + return [seconds, nanos]; + }, "hrtime"), { bigint: /* @__PURE__ */ __name(function bigint() { + return BigInt(Date.now() * 1e6); + }, "bigint") }); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/tty/read-stream.mjs +import { Socket } from "node:net"; +var ReadStream; +var init_read_stream = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/tty/read-stream.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ReadStream = class extends Socket { + fd; + constructor(fd) { + super(); + this.fd = fd; + } + isRaw = false; + setRawMode(mode) { + this.isRaw = mode; + return this; + } + isTTY = false; + }; + __name(ReadStream, "ReadStream"); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/tty/write-stream.mjs +import { Socket as Socket2 } from "node:net"; +var WriteStream; +var init_write_stream = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/tty/write-stream.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + WriteStream = class extends Socket2 { + fd; + constructor(fd) { + super(); + this.fd = fd; + } + clearLine(dir3, callback) { + callback && callback(); + return false; + } + clearScreenDown(callback) { + callback && callback(); + return false; + } + cursorTo(x2, y2, callback) { + callback && typeof callback === "function" && callback(); + return false; + } + moveCursor(dx, dy, callback) { + callback && callback(); + return false; + } + getColorDepth(env2) { + return 1; + } + hasColors(count4, env2) { + return false; + } + getWindowSize() { + return [this.columns, this.rows]; + } + columns = 80; + rows = 24; + isTTY = false; + }; + __name(WriteStream, "WriteStream"); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/tty.mjs +var init_tty = __esm({ + "../../node_modules/unenv/dist/runtime/node/tty.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_read_stream(); + init_write_stream(); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/process/process.mjs +import { EventEmitter } from "node:events"; +var Process; +var init_process = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/process/process.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tty(); + init_utils(); + Process = class extends EventEmitter { + env; + hrtime; + nextTick; + constructor(impl) { + super(); + this.env = impl.env; + this.hrtime = impl.hrtime; + this.nextTick = impl.nextTick; + for (const prop of [...Object.getOwnPropertyNames(Process.prototype), ...Object.getOwnPropertyNames(EventEmitter.prototype)]) { + const value = this[prop]; + if (typeof value === "function") { + this[prop] = value.bind(this); + } + } + } + emitWarning(warning, type, code) { + console.warn(`${code ? `[${code}] ` : ""}${type ? `${type}: ` : ""}${warning}`); + } + emit(...args) { + return super.emit(...args); + } + listeners(eventName) { + return super.listeners(eventName); + } + #stdin; + #stdout; + #stderr; + get stdin() { + return this.#stdin ??= new ReadStream(0); + } + get stdout() { + return this.#stdout ??= new WriteStream(1); + } + get stderr() { + return this.#stderr ??= new WriteStream(2); + } + #cwd = "/"; + chdir(cwd2) { + this.#cwd = cwd2; + } + cwd() { + return this.#cwd; + } + arch = ""; + platform = ""; + argv = []; + argv0 = ""; + execArgv = []; + execPath = ""; + title = ""; + pid = 200; + ppid = 100; + get version() { + return ""; + } + get versions() { + return {}; + } + get allowedNodeEnvironmentFlags() { + return /* @__PURE__ */ new Set(); + } + get sourceMapsEnabled() { + return false; + } + get debugPort() { + return 0; + } + get throwDeprecation() { + return false; + } + get traceDeprecation() { + return false; + } + get features() { + return {}; + } + get release() { + return {}; + } + get connected() { + return false; + } + get config() { + return {}; + } + get moduleLoadList() { + return []; + } + constrainedMemory() { + return 0; + } + availableMemory() { + return 0; + } + uptime() { + return 0; + } + resourceUsage() { + return {}; + } + ref() { + } + unref() { + } + umask() { + throw createNotImplementedError("process.umask"); + } + getBuiltinModule() { + return void 0; + } + getActiveResourcesInfo() { + throw createNotImplementedError("process.getActiveResourcesInfo"); + } + exit() { + throw createNotImplementedError("process.exit"); + } + reallyExit() { + throw createNotImplementedError("process.reallyExit"); + } + kill() { + throw createNotImplementedError("process.kill"); + } + abort() { + throw createNotImplementedError("process.abort"); + } + dlopen() { + throw createNotImplementedError("process.dlopen"); + } + setSourceMapsEnabled() { + throw createNotImplementedError("process.setSourceMapsEnabled"); + } + loadEnvFile() { + throw createNotImplementedError("process.loadEnvFile"); + } + disconnect() { + throw createNotImplementedError("process.disconnect"); + } + cpuUsage() { + throw createNotImplementedError("process.cpuUsage"); + } + setUncaughtExceptionCaptureCallback() { + throw createNotImplementedError("process.setUncaughtExceptionCaptureCallback"); + } + hasUncaughtExceptionCaptureCallback() { + throw createNotImplementedError("process.hasUncaughtExceptionCaptureCallback"); + } + initgroups() { + throw createNotImplementedError("process.initgroups"); + } + openStdin() { + throw createNotImplementedError("process.openStdin"); + } + assert() { + throw createNotImplementedError("process.assert"); + } + binding() { + throw createNotImplementedError("process.binding"); + } + permission = { has: /* @__PURE__ */ notImplemented("process.permission.has") }; + report = { + directory: "", + filename: "", + signal: "SIGUSR2", + compact: false, + reportOnFatalError: false, + reportOnSignal: false, + reportOnUncaughtException: false, + getReport: /* @__PURE__ */ notImplemented("process.report.getReport"), + writeReport: /* @__PURE__ */ notImplemented("process.report.writeReport") + }; + finalization = { + register: /* @__PURE__ */ notImplemented("process.finalization.register"), + unregister: /* @__PURE__ */ notImplemented("process.finalization.unregister"), + registerBeforeExit: /* @__PURE__ */ notImplemented("process.finalization.registerBeforeExit") + }; + memoryUsage = Object.assign(() => ({ + arrayBuffers: 0, + rss: 0, + external: 0, + heapTotal: 0, + heapUsed: 0 + }), { rss: () => 0 }); + mainModule = void 0; + domain = void 0; + send = void 0; + exitCode = void 0; + channel = void 0; + getegid = void 0; + geteuid = void 0; + getgid = void 0; + getgroups = void 0; + getuid = void 0; + setegid = void 0; + seteuid = void 0; + setgid = void 0; + setgroups = void 0; + setuid = void 0; + _events = void 0; + _eventsCount = void 0; + _exiting = void 0; + _maxListeners = void 0; + _debugEnd = void 0; + _debugProcess = void 0; + _fatalException = void 0; + _getActiveHandles = void 0; + _getActiveRequests = void 0; + _kill = void 0; + _preload_modules = void 0; + _rawDebug = void 0; + _startProfilerIdleNotifier = void 0; + _stopProfilerIdleNotifier = void 0; + _tickCallback = void 0; + _disconnect = void 0; + _handleQueue = void 0; + _pendingMessage = void 0; + _channel = void 0; + _send = void 0; + _linkedBinding = void 0; + }; + __name(Process, "Process"); + } +}); + +// ../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs +var globalProcess, getBuiltinModule, exit, platform, nextTick, unenvProcess, abort, addListener, allowedNodeEnvironmentFlags, hasUncaughtExceptionCaptureCallback, setUncaughtExceptionCaptureCallback, loadEnvFile, sourceMapsEnabled, arch, argv, argv0, chdir, config, connected, constrainedMemory, availableMemory, cpuUsage, cwd, debugPort, dlopen, disconnect, emit, emitWarning, env, eventNames, execArgv, execPath, finalization, features, getActiveResourcesInfo, getMaxListeners, hrtime3, kill, listeners, listenerCount, memoryUsage, on, off, once, pid, ppid, prependListener, prependOnceListener, rawListeners, release, removeAllListeners, removeListener, report, resourceUsage, setMaxListeners, setSourceMapsEnabled, stderr, stdin, stdout, title, throwDeprecation, traceDeprecation, umask, uptime, version, versions, domain, initgroups, moduleLoadList, reallyExit, openStdin, assert2, binding, send, exitCode, channel, getegid, geteuid, getgid, getgroups, getuid, setegid, seteuid, setgid, setgroups, setuid, permission, mainModule, _events, _eventsCount, _exiting, _maxListeners, _debugEnd, _debugProcess, _fatalException, _getActiveHandles, _getActiveRequests, _kill, _preload_modules, _rawDebug, _startProfilerIdleNotifier, _stopProfilerIdleNotifier, _tickCallback, _disconnect, _handleQueue, _pendingMessage, _channel, _send, _linkedBinding, _process, process_default; +var init_process2 = __esm({ + "../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_hrtime(); + init_process(); + globalProcess = globalThis["process"]; + getBuiltinModule = globalProcess.getBuiltinModule; + ({ exit, platform, nextTick } = getBuiltinModule( + "node:process" + )); + unenvProcess = new Process({ + env: globalProcess.env, + hrtime, + nextTick + }); + ({ + abort, + addListener, + allowedNodeEnvironmentFlags, + hasUncaughtExceptionCaptureCallback, + setUncaughtExceptionCaptureCallback, + loadEnvFile, + sourceMapsEnabled, + arch, + argv, + argv0, + chdir, + config, + connected, + constrainedMemory, + availableMemory, + cpuUsage, + cwd, + debugPort, + dlopen, + disconnect, + emit, + emitWarning, + env, + eventNames, + execArgv, + execPath, + finalization, + features, + getActiveResourcesInfo, + getMaxListeners, + hrtime: hrtime3, + kill, + listeners, + listenerCount, + memoryUsage, + on, + off, + once, + pid, + ppid, + prependListener, + prependOnceListener, + rawListeners, + release, + removeAllListeners, + removeListener, + report, + resourceUsage, + setMaxListeners, + setSourceMapsEnabled, + stderr, + stdin, + stdout, + title, + throwDeprecation, + traceDeprecation, + umask, + uptime, + version, + versions, + domain, + initgroups, + moduleLoadList, + reallyExit, + openStdin, + assert: assert2, + binding, + send, + exitCode, + channel, + getegid, + geteuid, + getgid, + getgroups, + getuid, + setegid, + seteuid, + setgid, + setgroups, + setuid, + permission, + mainModule, + _events, + _eventsCount, + _exiting, + _maxListeners, + _debugEnd, + _debugProcess, + _fatalException, + _getActiveHandles, + _getActiveRequests, + _kill, + _preload_modules, + _rawDebug, + _startProfilerIdleNotifier, + _stopProfilerIdleNotifier, + _tickCallback, + _disconnect, + _handleQueue, + _pendingMessage, + _channel, + _send, + _linkedBinding + } = unenvProcess); + _process = { + abort, + addListener, + allowedNodeEnvironmentFlags, + hasUncaughtExceptionCaptureCallback, + setUncaughtExceptionCaptureCallback, + loadEnvFile, + sourceMapsEnabled, + arch, + argv, + argv0, + chdir, + config, + connected, + constrainedMemory, + availableMemory, + cpuUsage, + cwd, + debugPort, + dlopen, + disconnect, + emit, + emitWarning, + env, + eventNames, + execArgv, + execPath, + exit, + finalization, + features, + getBuiltinModule, + getActiveResourcesInfo, + getMaxListeners, + hrtime: hrtime3, + kill, + listeners, + listenerCount, + memoryUsage, + nextTick, + on, + off, + once, + pid, + platform, + ppid, + prependListener, + prependOnceListener, + rawListeners, + release, + removeAllListeners, + removeListener, + report, + resourceUsage, + setMaxListeners, + setSourceMapsEnabled, + stderr, + stdin, + stdout, + title, + throwDeprecation, + traceDeprecation, + umask, + uptime, + version, + versions, + // @ts-expect-error old API + domain, + initgroups, + moduleLoadList, + reallyExit, + openStdin, + assert: assert2, + binding, + send, + exitCode, + channel, + getegid, + geteuid, + getgid, + getgroups, + getuid, + setegid, + seteuid, + setgid, + setgroups, + setuid, + permission, + mainModule, + _events, + _eventsCount, + _exiting, + _maxListeners, + _debugEnd, + _debugProcess, + _fatalException, + _getActiveHandles, + _getActiveRequests, + _kill, + _preload_modules, + _rawDebug, + _startProfilerIdleNotifier, + _stopProfilerIdleNotifier, + _tickCallback, + _disconnect, + _handleQueue, + _pendingMessage, + _channel, + _send, + _linkedBinding + }; + process_default = _process; + } +}); + +// ../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-process +var init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process = __esm({ + "../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-process"() { + init_process2(); + globalThis.process = process_default; + } +}); + +// wrangler-modules-watch:wrangler:modules-watch +var init_wrangler_modules_watch = __esm({ + "wrangler-modules-watch:wrangler:modules-watch"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/wrangler/templates/modules-watch-stub.js +var init_modules_watch_stub = __esm({ + "../../node_modules/wrangler/templates/modules-watch-stub.js"() { + init_wrangler_modules_watch(); + } +}); + +// ../../node_modules/hono/dist/compose.js +var compose; +var init_compose = __esm({ + "../../node_modules/hono/dist/compose.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + compose = /* @__PURE__ */ __name((middleware2, onError, onNotFound) => { + return (context2, next) => { + let index = -1; + return dispatch(0); + async function dispatch(i2) { + if (i2 <= index) { + throw new Error("next() called multiple times"); + } + index = i2; + let res; + let isError = false; + let handler; + if (middleware2[i2]) { + handler = middleware2[i2][0][0]; + context2.req.routeIndex = i2; + } else { + handler = i2 === middleware2.length && next || void 0; + } + if (handler) { + try { + res = await handler(context2, () => dispatch(i2 + 1)); + } catch (err) { + if (err instanceof Error && onError) { + context2.error = err; + res = await onError(err, context2); + isError = true; + } else { + throw err; + } + } + } else { + if (context2.finalized === false && onNotFound) { + res = await onNotFound(context2); + } + } + if (res && (context2.finalized === false || isError)) { + context2.res = res; + } + return context2; + } + __name(dispatch, "dispatch"); + }; + }, "compose"); + } +}); + +// ../../node_modules/hono/dist/http-exception.js +var init_http_exception = __esm({ + "../../node_modules/hono/dist/http-exception.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/hono/dist/request/constants.js +var GET_MATCH_RESULT; +var init_constants = __esm({ + "../../node_modules/hono/dist/request/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + GET_MATCH_RESULT = /* @__PURE__ */ Symbol(); + } +}); + +// ../../node_modules/hono/dist/utils/body.js +async function parseFormData(request, options) { + const formData = await request.formData(); + if (formData) { + return convertFormDataToBodyData(formData, options); + } + return {}; +} +function convertFormDataToBodyData(formData, options) { + const form = /* @__PURE__ */ Object.create(null); + formData.forEach((value, key) => { + const shouldParseAllValues = options.all || key.endsWith("[]"); + if (!shouldParseAllValues) { + form[key] = value; + } else { + handleParsingAllValues(form, key, value); + } + }); + if (options.dot) { + Object.entries(form).forEach(([key, value]) => { + const shouldParseDotValues = key.includes("."); + if (shouldParseDotValues) { + handleParsingNestedValues(form, key, value); + delete form[key]; + } + }); + } + return form; +} +var parseBody, handleParsingAllValues, handleParsingNestedValues; +var init_body = __esm({ + "../../node_modules/hono/dist/utils/body.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_request(); + parseBody = /* @__PURE__ */ __name(async (request, options = /* @__PURE__ */ Object.create(null)) => { + const { all: all3 = false, dot = false } = options; + const headers = request instanceof HonoRequest ? request.raw.headers : request.headers; + const contentType = headers.get("Content-Type"); + if (contentType?.startsWith("multipart/form-data") || contentType?.startsWith("application/x-www-form-urlencoded")) { + return parseFormData(request, { all: all3, dot }); + } + return {}; + }, "parseBody"); + __name(parseFormData, "parseFormData"); + __name(convertFormDataToBodyData, "convertFormDataToBodyData"); + handleParsingAllValues = /* @__PURE__ */ __name((form, key, value) => { + if (form[key] !== void 0) { + if (Array.isArray(form[key])) { + ; + form[key].push(value); + } else { + form[key] = [form[key], value]; + } + } else { + if (!key.endsWith("[]")) { + form[key] = value; + } else { + form[key] = [value]; + } + } + }, "handleParsingAllValues"); + handleParsingNestedValues = /* @__PURE__ */ __name((form, key, value) => { + if (/(?:^|\.)__proto__\./.test(key)) { + return; + } + let nestedForm = form; + const keys = key.split("."); + keys.forEach((key2, index) => { + if (index === keys.length - 1) { + nestedForm[key2] = value; + } else { + if (!nestedForm[key2] || typeof nestedForm[key2] !== "object" || Array.isArray(nestedForm[key2]) || nestedForm[key2] instanceof File) { + nestedForm[key2] = /* @__PURE__ */ Object.create(null); + } + nestedForm = nestedForm[key2]; + } + }); + }, "handleParsingNestedValues"); + } +}); + +// ../../node_modules/hono/dist/utils/url.js +var splitPath, splitRoutingPath, extractGroupsFromPath, replaceGroupMarks, patternCache, getPattern, tryDecode, tryDecodeURI, getPath, getPathNoStrict, mergePath, checkOptionalParameter, _decodeURI, _getQueryParam, getQueryParam, getQueryParams, decodeURIComponent_; +var init_url = __esm({ + "../../node_modules/hono/dist/utils/url.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + splitPath = /* @__PURE__ */ __name((path) => { + const paths = path.split("/"); + if (paths[0] === "") { + paths.shift(); + } + return paths; + }, "splitPath"); + splitRoutingPath = /* @__PURE__ */ __name((routePath2) => { + const { groups, path } = extractGroupsFromPath(routePath2); + const paths = splitPath(path); + return replaceGroupMarks(paths, groups); + }, "splitRoutingPath"); + extractGroupsFromPath = /* @__PURE__ */ __name((path) => { + const groups = []; + path = path.replace(/\{[^}]+\}/g, (match2, index) => { + const mark = `@${index}`; + groups.push([mark, match2]); + return mark; + }); + return { groups, path }; + }, "extractGroupsFromPath"); + replaceGroupMarks = /* @__PURE__ */ __name((paths, groups) => { + for (let i2 = groups.length - 1; i2 >= 0; i2--) { + const [mark] = groups[i2]; + for (let j2 = paths.length - 1; j2 >= 0; j2--) { + if (paths[j2].includes(mark)) { + paths[j2] = paths[j2].replace(mark, groups[i2][1]); + break; + } + } + } + return paths; + }, "replaceGroupMarks"); + patternCache = {}; + getPattern = /* @__PURE__ */ __name((label, next) => { + if (label === "*") { + return "*"; + } + const match2 = label.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/); + if (match2) { + const cacheKey = `${label}#${next}`; + if (!patternCache[cacheKey]) { + if (match2[2]) { + patternCache[cacheKey] = next && next[0] !== ":" && next[0] !== "*" ? [cacheKey, match2[1], new RegExp(`^${match2[2]}(?=/${next})`)] : [label, match2[1], new RegExp(`^${match2[2]}$`)]; + } else { + patternCache[cacheKey] = [label, match2[1], true]; + } + } + return patternCache[cacheKey]; + } + return null; + }, "getPattern"); + tryDecode = /* @__PURE__ */ __name((str, decoder2) => { + try { + return decoder2(str); + } catch { + return str.replace(/(?:%[0-9A-Fa-f]{2})+/g, (match2) => { + try { + return decoder2(match2); + } catch { + return match2; + } + }); + } + }, "tryDecode"); + tryDecodeURI = /* @__PURE__ */ __name((str) => tryDecode(str, decodeURI), "tryDecodeURI"); + getPath = /* @__PURE__ */ __name((request) => { + const url2 = request.url; + const start = url2.indexOf("/", url2.indexOf(":") + 4); + let i2 = start; + for (; i2 < url2.length; i2++) { + const charCode = url2.charCodeAt(i2); + if (charCode === 37) { + const queryIndex = url2.indexOf("?", i2); + const hashIndex = url2.indexOf("#", i2); + const end = queryIndex === -1 ? hashIndex === -1 ? void 0 : hashIndex : hashIndex === -1 ? queryIndex : Math.min(queryIndex, hashIndex); + const path = url2.slice(start, end); + return tryDecodeURI(path.includes("%25") ? path.replace(/%25/g, "%2525") : path); + } else if (charCode === 63 || charCode === 35) { + break; + } + } + return url2.slice(start, i2); + }, "getPath"); + getPathNoStrict = /* @__PURE__ */ __name((request) => { + const result = getPath(request); + return result.length > 1 && result.at(-1) === "/" ? result.slice(0, -1) : result; + }, "getPathNoStrict"); + mergePath = /* @__PURE__ */ __name((base, sub, ...rest) => { + if (rest.length) { + sub = mergePath(sub, ...rest); + } + return `${base?.[0] === "/" ? "" : "/"}${base}${sub === "/" ? "" : `${base?.at(-1) === "/" ? "" : "/"}${sub?.[0] === "/" ? sub.slice(1) : sub}`}`; + }, "mergePath"); + checkOptionalParameter = /* @__PURE__ */ __name((path) => { + if (path.charCodeAt(path.length - 1) !== 63 || !path.includes(":")) { + return null; + } + const segments = path.split("/"); + const results = []; + let basePath = ""; + segments.forEach((segment) => { + if (segment !== "" && !/\:/.test(segment)) { + basePath += "/" + segment; + } else if (/\:/.test(segment)) { + if (/\?/.test(segment)) { + if (results.length === 0 && basePath === "") { + results.push("/"); + } else { + results.push(basePath); + } + const optionalSegment = segment.replace("?", ""); + basePath += "/" + optionalSegment; + results.push(basePath); + } else { + basePath += "/" + segment; + } + } + }); + return results.filter((v3, i2, a2) => a2.indexOf(v3) === i2); + }, "checkOptionalParameter"); + _decodeURI = /* @__PURE__ */ __name((value) => { + if (!/[%+]/.test(value)) { + return value; + } + if (value.indexOf("+") !== -1) { + value = value.replace(/\+/g, " "); + } + return value.indexOf("%") !== -1 ? tryDecode(value, decodeURIComponent_) : value; + }, "_decodeURI"); + _getQueryParam = /* @__PURE__ */ __name((url2, key, multiple) => { + let encoded; + if (!multiple && key && !/[%+]/.test(key)) { + let keyIndex2 = url2.indexOf("?", 8); + if (keyIndex2 === -1) { + return void 0; + } + if (!url2.startsWith(key, keyIndex2 + 1)) { + keyIndex2 = url2.indexOf(`&${key}`, keyIndex2 + 1); + } + while (keyIndex2 !== -1) { + const trailingKeyCode = url2.charCodeAt(keyIndex2 + key.length + 1); + if (trailingKeyCode === 61) { + const valueIndex = keyIndex2 + key.length + 2; + const endIndex = url2.indexOf("&", valueIndex); + return _decodeURI(url2.slice(valueIndex, endIndex === -1 ? void 0 : endIndex)); + } else if (trailingKeyCode == 38 || isNaN(trailingKeyCode)) { + return ""; + } + keyIndex2 = url2.indexOf(`&${key}`, keyIndex2 + 1); + } + encoded = /[%+]/.test(url2); + if (!encoded) { + return void 0; + } + } + const results = {}; + encoded ??= /[%+]/.test(url2); + let keyIndex = url2.indexOf("?", 8); + while (keyIndex !== -1) { + const nextKeyIndex = url2.indexOf("&", keyIndex + 1); + let valueIndex = url2.indexOf("=", keyIndex); + if (valueIndex > nextKeyIndex && nextKeyIndex !== -1) { + valueIndex = -1; + } + let name = url2.slice( + keyIndex + 1, + valueIndex === -1 ? nextKeyIndex === -1 ? void 0 : nextKeyIndex : valueIndex + ); + if (encoded) { + name = _decodeURI(name); + } + keyIndex = nextKeyIndex; + if (name === "") { + continue; + } + let value; + if (valueIndex === -1) { + value = ""; + } else { + value = url2.slice(valueIndex + 1, nextKeyIndex === -1 ? void 0 : nextKeyIndex); + if (encoded) { + value = _decodeURI(value); + } + } + if (multiple) { + if (!(results[name] && Array.isArray(results[name]))) { + results[name] = []; + } + ; + results[name].push(value); + } else { + results[name] ??= value; + } + } + return key ? results[key] : results; + }, "_getQueryParam"); + getQueryParam = _getQueryParam; + getQueryParams = /* @__PURE__ */ __name((url2, key) => { + return _getQueryParam(url2, key, true); + }, "getQueryParams"); + decodeURIComponent_ = decodeURIComponent; + } +}); + +// ../../node_modules/hono/dist/request.js +var tryDecodeURIComponent, HonoRequest; +var init_request = __esm({ + "../../node_modules/hono/dist/request.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_http_exception(); + init_constants(); + init_body(); + init_url(); + tryDecodeURIComponent = /* @__PURE__ */ __name((str) => tryDecode(str, decodeURIComponent_), "tryDecodeURIComponent"); + HonoRequest = /* @__PURE__ */ __name(class { + /** + * `.raw` can get the raw Request object. + * + * @see {@link https://hono.dev/docs/api/request#raw} + * + * @example + * ```ts + * // For Cloudflare Workers + * app.post('/', async (c) => { + * const metadata = c.req.raw.cf?.hostMetadata? + * ... + * }) + * ``` + */ + raw; + #validatedData; + // Short name of validatedData + #matchResult; + routeIndex = 0; + /** + * `.path` can get the pathname of the request. + * + * @see {@link https://hono.dev/docs/api/request#path} + * + * @example + * ```ts + * app.get('/about/me', (c) => { + * const pathname = c.req.path // `/about/me` + * }) + * ``` + */ + path; + bodyCache = {}; + constructor(request, path = "/", matchResult = [[]]) { + this.raw = request; + this.path = path; + this.#matchResult = matchResult; + this.#validatedData = {}; + } + param(key) { + return key ? this.#getDecodedParam(key) : this.#getAllDecodedParams(); + } + #getDecodedParam(key) { + const paramKey = this.#matchResult[0][this.routeIndex][1][key]; + const param = this.#getParamValue(paramKey); + return param && /\%/.test(param) ? tryDecodeURIComponent(param) : param; + } + #getAllDecodedParams() { + const decoded = {}; + const keys = Object.keys(this.#matchResult[0][this.routeIndex][1]); + for (const key of keys) { + const value = this.#getParamValue(this.#matchResult[0][this.routeIndex][1][key]); + if (value !== void 0) { + decoded[key] = /\%/.test(value) ? tryDecodeURIComponent(value) : value; + } + } + return decoded; + } + #getParamValue(paramKey) { + return this.#matchResult[1] ? this.#matchResult[1][paramKey] : paramKey; + } + query(key) { + return getQueryParam(this.url, key); + } + queries(key) { + return getQueryParams(this.url, key); + } + header(name) { + if (name) { + return this.raw.headers.get(name) ?? void 0; + } + const headerData = {}; + this.raw.headers.forEach((value, key) => { + headerData[key] = value; + }); + return headerData; + } + async parseBody(options) { + return parseBody(this, options); + } + #cachedBody = (key) => { + const { bodyCache, raw: raw2 } = this; + const cachedBody = bodyCache[key]; + if (cachedBody) { + return cachedBody; + } + const anyCachedKey = Object.keys(bodyCache)[0]; + if (anyCachedKey) { + return bodyCache[anyCachedKey].then((body) => { + if (anyCachedKey === "json") { + body = JSON.stringify(body); + } + return new Response(body)[key](); + }); + } + return bodyCache[key] = raw2[key](); + }; + /** + * `.json()` can parse Request body of type `application/json` + * + * @see {@link https://hono.dev/docs/api/request#json} + * + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.json() + * }) + * ``` + */ + json() { + return this.#cachedBody("text").then((text2) => JSON.parse(text2)); + } + /** + * `.text()` can parse Request body of type `text/plain` + * + * @see {@link https://hono.dev/docs/api/request#text} + * + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.text() + * }) + * ``` + */ + text() { + return this.#cachedBody("text"); + } + /** + * `.arrayBuffer()` parse Request body as an `ArrayBuffer` + * + * @see {@link https://hono.dev/docs/api/request#arraybuffer} + * + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.arrayBuffer() + * }) + * ``` + */ + arrayBuffer() { + return this.#cachedBody("arrayBuffer"); + } + /** + * Parses the request body as a `Blob`. + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.blob(); + * }); + * ``` + * @see https://hono.dev/docs/api/request#blob + */ + blob() { + return this.#cachedBody("blob"); + } + /** + * Parses the request body as `FormData`. + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.formData(); + * }); + * ``` + * @see https://hono.dev/docs/api/request#formdata + */ + formData() { + return this.#cachedBody("formData"); + } + /** + * Adds validated data to the request. + * + * @param target - The target of the validation. + * @param data - The validated data to add. + */ + addValidatedData(target, data) { + this.#validatedData[target] = data; + } + valid(target) { + return this.#validatedData[target]; + } + /** + * `.url()` can get the request url strings. + * + * @see {@link https://hono.dev/docs/api/request#url} + * + * @example + * ```ts + * app.get('/about/me', (c) => { + * const url = c.req.url // `http://localhost:8787/about/me` + * ... + * }) + * ``` + */ + get url() { + return this.raw.url; + } + /** + * `.method()` can get the method name of the request. + * + * @see {@link https://hono.dev/docs/api/request#method} + * + * @example + * ```ts + * app.get('/about/me', (c) => { + * const method = c.req.method // `GET` + * }) + * ``` + */ + get method() { + return this.raw.method; + } + get [GET_MATCH_RESULT]() { + return this.#matchResult; + } + /** + * `.matchedRoutes()` can return a matched route in the handler + * + * @deprecated + * + * Use matchedRoutes helper defined in "hono/route" instead. + * + * @see {@link https://hono.dev/docs/api/request#matchedroutes} + * + * @example + * ```ts + * app.use('*', async function logger(c, next) { + * await next() + * c.req.matchedRoutes.forEach(({ handler, method, path }, i) => { + * const name = handler.name || (handler.length < 2 ? '[handler]' : '[middleware]') + * console.log( + * method, + * ' ', + * path, + * ' '.repeat(Math.max(10 - path.length, 0)), + * name, + * i === c.req.routeIndex ? '<- respond from here' : '' + * ) + * }) + * }) + * ``` + */ + get matchedRoutes() { + return this.#matchResult[0].map(([[, route]]) => route); + } + /** + * `routePath()` can retrieve the path registered within the handler + * + * @deprecated + * + * Use routePath helper defined in "hono/route" instead. + * + * @see {@link https://hono.dev/docs/api/request#routepath} + * + * @example + * ```ts + * app.get('/posts/:id', (c) => { + * return c.json({ path: c.req.routePath }) + * }) + * ``` + */ + get routePath() { + return this.#matchResult[0].map(([[, route]]) => route)[this.routeIndex].path; + } + }, "HonoRequest"); + } +}); + +// ../../node_modules/hono/dist/utils/html.js +var HtmlEscapedCallbackPhase, raw, resolveCallback; +var init_html = __esm({ + "../../node_modules/hono/dist/utils/html.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + HtmlEscapedCallbackPhase = { + Stringify: 1, + BeforeStream: 2, + Stream: 3 + }; + raw = /* @__PURE__ */ __name((value, callbacks) => { + const escapedString = new String(value); + escapedString.isEscaped = true; + escapedString.callbacks = callbacks; + return escapedString; + }, "raw"); + resolveCallback = /* @__PURE__ */ __name(async (str, phase, preserveCallbacks, context2, buffer) => { + if (typeof str === "object" && !(str instanceof String)) { + if (!(str instanceof Promise)) { + str = str.toString(); + } + if (str instanceof Promise) { + str = await str; + } + } + const callbacks = str.callbacks; + if (!callbacks?.length) { + return Promise.resolve(str); + } + if (buffer) { + buffer[0] += str; + } else { + buffer = [str]; + } + const resStr = Promise.all(callbacks.map((c2) => c2({ phase, buffer, context: context2 }))).then( + (res) => Promise.all( + res.filter(Boolean).map((str2) => resolveCallback(str2, phase, false, context2, buffer)) + ).then(() => buffer[0]) + ); + if (preserveCallbacks) { + return raw(await resStr, callbacks); + } else { + return resStr; + } + }, "resolveCallback"); + } +}); + +// ../../node_modules/hono/dist/context.js +var TEXT_PLAIN, setDefaultContentType, createResponseInstance, Context; +var init_context = __esm({ + "../../node_modules/hono/dist/context.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_request(); + init_html(); + TEXT_PLAIN = "text/plain; charset=UTF-8"; + setDefaultContentType = /* @__PURE__ */ __name((contentType, headers) => { + return { + "Content-Type": contentType, + ...headers + }; + }, "setDefaultContentType"); + createResponseInstance = /* @__PURE__ */ __name((body, init) => new Response(body, init), "createResponseInstance"); + Context = /* @__PURE__ */ __name(class { + #rawRequest; + #req; + /** + * `.env` can get bindings (environment variables, secrets, KV namespaces, D1 database, R2 bucket etc.) in Cloudflare Workers. + * + * @see {@link https://hono.dev/docs/api/context#env} + * + * @example + * ```ts + * // Environment object for Cloudflare Workers + * app.get('*', async c => { + * const counter = c.env.COUNTER + * }) + * ``` + */ + env = {}; + #var; + finalized = false; + /** + * `.error` can get the error object from the middleware if the Handler throws an error. + * + * @see {@link https://hono.dev/docs/api/context#error} + * + * @example + * ```ts + * app.use('*', async (c, next) => { + * await next() + * if (c.error) { + * // do something... + * } + * }) + * ``` + */ + error; + #status; + #executionCtx; + #res; + #layout; + #renderer; + #notFoundHandler; + #preparedHeaders; + #matchResult; + #path; + /** + * Creates an instance of the Context class. + * + * @param req - The Request object. + * @param options - Optional configuration options for the context. + */ + constructor(req, options) { + this.#rawRequest = req; + if (options) { + this.#executionCtx = options.executionCtx; + this.env = options.env; + this.#notFoundHandler = options.notFoundHandler; + this.#path = options.path; + this.#matchResult = options.matchResult; + } + } + /** + * `.req` is the instance of {@link HonoRequest}. + */ + get req() { + this.#req ??= new HonoRequest(this.#rawRequest, this.#path, this.#matchResult); + return this.#req; + } + /** + * @see {@link https://hono.dev/docs/api/context#event} + * The FetchEvent associated with the current request. + * + * @throws Will throw an error if the context does not have a FetchEvent. + */ + get event() { + if (this.#executionCtx && "respondWith" in this.#executionCtx) { + return this.#executionCtx; + } else { + throw Error("This context has no FetchEvent"); + } + } + /** + * @see {@link https://hono.dev/docs/api/context#executionctx} + * The ExecutionContext associated with the current request. + * + * @throws Will throw an error if the context does not have an ExecutionContext. + */ + get executionCtx() { + if (this.#executionCtx) { + return this.#executionCtx; + } else { + throw Error("This context has no ExecutionContext"); + } + } + /** + * @see {@link https://hono.dev/docs/api/context#res} + * The Response object for the current request. + */ + get res() { + return this.#res ||= createResponseInstance(null, { + headers: this.#preparedHeaders ??= new Headers() + }); + } + /** + * Sets the Response object for the current request. + * + * @param _res - The Response object to set. + */ + set res(_res) { + if (this.#res && _res) { + _res = createResponseInstance(_res.body, _res); + for (const [k2, v3] of this.#res.headers.entries()) { + if (k2 === "content-type") { + continue; + } + if (k2 === "set-cookie") { + const cookies = this.#res.headers.getSetCookie(); + _res.headers.delete("set-cookie"); + for (const cookie of cookies) { + _res.headers.append("set-cookie", cookie); + } + } else { + _res.headers.set(k2, v3); + } + } + } + this.#res = _res; + this.finalized = true; + } + /** + * `.render()` can create a response within a layout. + * + * @see {@link https://hono.dev/docs/api/context#render-setrenderer} + * + * @example + * ```ts + * app.get('/', (c) => { + * return c.render('Hello!') + * }) + * ``` + */ + render = (...args) => { + this.#renderer ??= (content) => this.html(content); + return this.#renderer(...args); + }; + /** + * Sets the layout for the response. + * + * @param layout - The layout to set. + * @returns The layout function. + */ + setLayout = (layout) => this.#layout = layout; + /** + * Gets the current layout for the response. + * + * @returns The current layout function. + */ + getLayout = () => this.#layout; + /** + * `.setRenderer()` can set the layout in the custom middleware. + * + * @see {@link https://hono.dev/docs/api/context#render-setrenderer} + * + * @example + * ```tsx + * app.use('*', async (c, next) => { + * c.setRenderer((content) => { + * return c.html( + * + * + *

{content}

+ * + * + * ) + * }) + * await next() + * }) + * ``` + */ + setRenderer = (renderer) => { + this.#renderer = renderer; + }; + /** + * `.header()` can set headers. + * + * @see {@link https://hono.dev/docs/api/context#header} + * + * @example + * ```ts + * app.get('/welcome', (c) => { + * // Set headers + * c.header('X-Message', 'Hello!') + * c.header('Content-Type', 'text/plain') + * + * return c.body('Thank you for coming') + * }) + * ``` + */ + header = (name, value, options) => { + if (this.finalized) { + this.#res = createResponseInstance(this.#res.body, this.#res); + } + const headers = this.#res ? this.#res.headers : this.#preparedHeaders ??= new Headers(); + if (value === void 0) { + headers.delete(name); + } else if (options?.append) { + headers.append(name, value); + } else { + headers.set(name, value); + } + }; + status = (status) => { + this.#status = status; + }; + /** + * `.set()` can set the value specified by the key. + * + * @see {@link https://hono.dev/docs/api/context#set-get} + * + * @example + * ```ts + * app.use('*', async (c, next) => { + * c.set('message', 'Hono is hot!!') + * await next() + * }) + * ``` + */ + set = (key, value) => { + this.#var ??= /* @__PURE__ */ new Map(); + this.#var.set(key, value); + }; + /** + * `.get()` can use the value specified by the key. + * + * @see {@link https://hono.dev/docs/api/context#set-get} + * + * @example + * ```ts + * app.get('/', (c) => { + * const message = c.get('message') + * return c.text(`The message is "${message}"`) + * }) + * ``` + */ + get = (key) => { + return this.#var ? this.#var.get(key) : void 0; + }; + /** + * `.var` can access the value of a variable. + * + * @see {@link https://hono.dev/docs/api/context#var} + * + * @example + * ```ts + * const result = c.var.client.oneMethod() + * ``` + */ + // c.var.propName is a read-only + get var() { + if (!this.#var) { + return {}; + } + return Object.fromEntries(this.#var); + } + #newResponse(data, arg, headers) { + const responseHeaders = this.#res ? new Headers(this.#res.headers) : this.#preparedHeaders ?? new Headers(); + if (typeof arg === "object" && "headers" in arg) { + const argHeaders = arg.headers instanceof Headers ? arg.headers : new Headers(arg.headers); + for (const [key, value] of argHeaders) { + if (key.toLowerCase() === "set-cookie") { + responseHeaders.append(key, value); + } else { + responseHeaders.set(key, value); + } + } + } + if (headers) { + for (const [k2, v3] of Object.entries(headers)) { + if (typeof v3 === "string") { + responseHeaders.set(k2, v3); + } else { + responseHeaders.delete(k2); + for (const v22 of v3) { + responseHeaders.append(k2, v22); + } + } + } + } + const status = typeof arg === "number" ? arg : arg?.status ?? this.#status; + return createResponseInstance(data, { status, headers: responseHeaders }); + } + newResponse = (...args) => this.#newResponse(...args); + /** + * `.body()` can return the HTTP response. + * You can set headers with `.header()` and set HTTP status code with `.status`. + * This can also be set in `.text()`, `.json()` and so on. + * + * @see {@link https://hono.dev/docs/api/context#body} + * + * @example + * ```ts + * app.get('/welcome', (c) => { + * // Set headers + * c.header('X-Message', 'Hello!') + * c.header('Content-Type', 'text/plain') + * // Set HTTP status code + * c.status(201) + * + * // Return the response body + * return c.body('Thank you for coming') + * }) + * ``` + */ + body = (data, arg, headers) => this.#newResponse(data, arg, headers); + /** + * `.text()` can render text as `Content-Type:text/plain`. + * + * @see {@link https://hono.dev/docs/api/context#text} + * + * @example + * ```ts + * app.get('/say', (c) => { + * return c.text('Hello!') + * }) + * ``` + */ + text = (text2, arg, headers) => { + return !this.#preparedHeaders && !this.#status && !arg && !headers && !this.finalized ? new Response(text2) : this.#newResponse( + text2, + arg, + setDefaultContentType(TEXT_PLAIN, headers) + ); + }; + /** + * `.json()` can render JSON as `Content-Type:application/json`. + * + * @see {@link https://hono.dev/docs/api/context#json} + * + * @example + * ```ts + * app.get('/api', (c) => { + * return c.json({ message: 'Hello!' }) + * }) + * ``` + */ + json = (object2, arg, headers) => { + return this.#newResponse( + JSON.stringify(object2), + arg, + setDefaultContentType("application/json", headers) + ); + }; + html = (html, arg, headers) => { + const res = /* @__PURE__ */ __name((html2) => this.#newResponse(html2, arg, setDefaultContentType("text/html; charset=UTF-8", headers)), "res"); + return typeof html === "object" ? resolveCallback(html, HtmlEscapedCallbackPhase.Stringify, false, {}).then(res) : res(html); + }; + /** + * `.redirect()` can Redirect, default status code is 302. + * + * @see {@link https://hono.dev/docs/api/context#redirect} + * + * @example + * ```ts + * app.get('/redirect', (c) => { + * return c.redirect('/') + * }) + * app.get('/redirect-permanently', (c) => { + * return c.redirect('/', 301) + * }) + * ``` + */ + redirect = (location, status) => { + const locationString = String(location); + this.header( + "Location", + // Multibyes should be encoded + // eslint-disable-next-line no-control-regex + !/[^\x00-\xFF]/.test(locationString) ? locationString : encodeURI(locationString) + ); + return this.newResponse(null, status ?? 302); + }; + /** + * `.notFound()` can return the Not Found Response. + * + * @see {@link https://hono.dev/docs/api/context#notfound} + * + * @example + * ```ts + * app.get('/notfound', (c) => { + * return c.notFound() + * }) + * ``` + */ + notFound = () => { + this.#notFoundHandler ??= () => createResponseInstance(); + return this.#notFoundHandler(this); + }; + }, "Context"); + } +}); + +// ../../node_modules/hono/dist/router.js +var METHOD_NAME_ALL, METHOD_NAME_ALL_LOWERCASE, METHODS, MESSAGE_MATCHER_IS_ALREADY_BUILT, UnsupportedPathError; +var init_router = __esm({ + "../../node_modules/hono/dist/router.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + METHOD_NAME_ALL = "ALL"; + METHOD_NAME_ALL_LOWERCASE = "all"; + METHODS = ["get", "post", "put", "delete", "options", "patch"]; + MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is already built."; + UnsupportedPathError = /* @__PURE__ */ __name(class extends Error { + }, "UnsupportedPathError"); + } +}); + +// ../../node_modules/hono/dist/utils/constants.js +var COMPOSED_HANDLER; +var init_constants2 = __esm({ + "../../node_modules/hono/dist/utils/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + COMPOSED_HANDLER = "__COMPOSED_HANDLER"; + } +}); + +// ../../node_modules/hono/dist/hono-base.js +var notFoundHandler, errorHandler, Hono; +var init_hono_base = __esm({ + "../../node_modules/hono/dist/hono-base.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_compose(); + init_context(); + init_router(); + init_constants2(); + init_url(); + notFoundHandler = /* @__PURE__ */ __name((c2) => { + return c2.text("404 Not Found", 404); + }, "notFoundHandler"); + errorHandler = /* @__PURE__ */ __name((err, c2) => { + if ("getResponse" in err) { + const res = err.getResponse(); + return c2.newResponse(res.body, res); + } + console.error(err); + return c2.text("Internal Server Error", 500); + }, "errorHandler"); + Hono = /* @__PURE__ */ __name(class _Hono { + get; + post; + put; + delete; + options; + patch; + all; + on; + use; + /* + This class is like an abstract class and does not have a router. + To use it, inherit the class and implement router in the constructor. + */ + router; + getPath; + // Cannot use `#` because it requires visibility at JavaScript runtime. + _basePath = "/"; + #path = "/"; + routes = []; + constructor(options = {}) { + const allMethods = [...METHODS, METHOD_NAME_ALL_LOWERCASE]; + allMethods.forEach((method) => { + this[method] = (args1, ...args) => { + if (typeof args1 === "string") { + this.#path = args1; + } else { + this.#addRoute(method, this.#path, args1); + } + args.forEach((handler) => { + this.#addRoute(method, this.#path, handler); + }); + return this; + }; + }); + this.on = (method, path, ...handlers2) => { + for (const p2 of [path].flat()) { + this.#path = p2; + for (const m2 of [method].flat()) { + handlers2.map((handler) => { + this.#addRoute(m2.toUpperCase(), this.#path, handler); + }); + } + } + return this; + }; + this.use = (arg1, ...handlers2) => { + if (typeof arg1 === "string") { + this.#path = arg1; + } else { + this.#path = "*"; + handlers2.unshift(arg1); + } + handlers2.forEach((handler) => { + this.#addRoute(METHOD_NAME_ALL, this.#path, handler); + }); + return this; + }; + const { strict, ...optionsWithoutStrict } = options; + Object.assign(this, optionsWithoutStrict); + this.getPath = strict ?? true ? options.getPath ?? getPath : getPathNoStrict; + } + #clone() { + const clone2 = new _Hono({ + router: this.router, + getPath: this.getPath + }); + clone2.errorHandler = this.errorHandler; + clone2.#notFoundHandler = this.#notFoundHandler; + clone2.routes = this.routes; + return clone2; + } + #notFoundHandler = notFoundHandler; + // Cannot use `#` because it requires visibility at JavaScript runtime. + errorHandler = errorHandler; + /** + * `.route()` allows grouping other Hono instance in routes. + * + * @see {@link https://hono.dev/docs/api/routing#grouping} + * + * @param {string} path - base Path + * @param {Hono} app - other Hono instance + * @returns {Hono} routed Hono instance + * + * @example + * ```ts + * const app = new Hono() + * const app2 = new Hono() + * + * app2.get("/user", (c) => c.text("user")) + * app.route("/api", app2) // GET /api/user + * ``` + */ + route(path, app) { + const subApp = this.basePath(path); + app.routes.map((r2) => { + let handler; + if (app.errorHandler === errorHandler) { + handler = r2.handler; + } else { + handler = /* @__PURE__ */ __name(async (c2, next) => (await compose([], app.errorHandler)(c2, () => r2.handler(c2, next))).res, "handler"); + handler[COMPOSED_HANDLER] = r2.handler; + } + subApp.#addRoute(r2.method, r2.path, handler); + }); + return this; + } + /** + * `.basePath()` allows base paths to be specified. + * + * @see {@link https://hono.dev/docs/api/routing#base-path} + * + * @param {string} path - base Path + * @returns {Hono} changed Hono instance + * + * @example + * ```ts + * const api = new Hono().basePath('/api') + * ``` + */ + basePath(path) { + const subApp = this.#clone(); + subApp._basePath = mergePath(this._basePath, path); + return subApp; + } + /** + * `.onError()` handles an error and returns a customized Response. + * + * @see {@link https://hono.dev/docs/api/hono#error-handling} + * + * @param {ErrorHandler} handler - request Handler for error + * @returns {Hono} changed Hono instance + * + * @example + * ```ts + * app.onError((err, c) => { + * console.error(`${err}`) + * return c.text('Custom Error Message', 500) + * }) + * ``` + */ + onError = (handler) => { + this.errorHandler = handler; + return this; + }; + /** + * `.notFound()` allows you to customize a Not Found Response. + * + * @see {@link https://hono.dev/docs/api/hono#not-found} + * + * @param {NotFoundHandler} handler - request handler for not-found + * @returns {Hono} changed Hono instance + * + * @example + * ```ts + * app.notFound((c) => { + * return c.text('Custom 404 Message', 404) + * }) + * ``` + */ + notFound = (handler) => { + this.#notFoundHandler = handler; + return this; + }; + /** + * `.mount()` allows you to mount applications built with other frameworks into your Hono application. + * + * @see {@link https://hono.dev/docs/api/hono#mount} + * + * @param {string} path - base Path + * @param {Function} applicationHandler - other Request Handler + * @param {MountOptions} [options] - options of `.mount()` + * @returns {Hono} mounted Hono instance + * + * @example + * ```ts + * import { Router as IttyRouter } from 'itty-router' + * import { Hono } from 'hono' + * // Create itty-router application + * const ittyRouter = IttyRouter() + * // GET /itty-router/hello + * ittyRouter.get('/hello', () => new Response('Hello from itty-router')) + * + * const app = new Hono() + * app.mount('/itty-router', ittyRouter.handle) + * ``` + * + * @example + * ```ts + * const app = new Hono() + * // Send the request to another application without modification. + * app.mount('/app', anotherApp, { + * replaceRequest: (req) => req, + * }) + * ``` + */ + mount(path, applicationHandler, options) { + let replaceRequest; + let optionHandler; + if (options) { + if (typeof options === "function") { + optionHandler = options; + } else { + optionHandler = options.optionHandler; + if (options.replaceRequest === false) { + replaceRequest = /* @__PURE__ */ __name((request) => request, "replaceRequest"); + } else { + replaceRequest = options.replaceRequest; + } + } + } + const getOptions = optionHandler ? (c2) => { + const options2 = optionHandler(c2); + return Array.isArray(options2) ? options2 : [options2]; + } : (c2) => { + let executionContext = void 0; + try { + executionContext = c2.executionCtx; + } catch { + } + return [c2.env, executionContext]; + }; + replaceRequest ||= (() => { + const mergedPath = mergePath(this._basePath, path); + const pathPrefixLength = mergedPath === "/" ? 0 : mergedPath.length; + return (request) => { + const url2 = new URL(request.url); + url2.pathname = url2.pathname.slice(pathPrefixLength) || "/"; + return new Request(url2, request); + }; + })(); + const handler = /* @__PURE__ */ __name(async (c2, next) => { + const res = await applicationHandler(replaceRequest(c2.req.raw), ...getOptions(c2)); + if (res) { + return res; + } + await next(); + }, "handler"); + this.#addRoute(METHOD_NAME_ALL, mergePath(path, "*"), handler); + return this; + } + #addRoute(method, path, handler) { + method = method.toUpperCase(); + path = mergePath(this._basePath, path); + const r2 = { basePath: this._basePath, path, method, handler }; + this.router.add(method, path, [handler, r2]); + this.routes.push(r2); + } + #handleError(err, c2) { + if (err instanceof Error) { + return this.errorHandler(err, c2); + } + throw err; + } + #dispatch(request, executionCtx, env2, method) { + if (method === "HEAD") { + return (async () => new Response(null, await this.#dispatch(request, executionCtx, env2, "GET")))(); + } + const path = this.getPath(request, { env: env2 }); + const matchResult = this.router.match(method, path); + const c2 = new Context(request, { + path, + matchResult, + env: env2, + executionCtx, + notFoundHandler: this.#notFoundHandler + }); + if (matchResult[0].length === 1) { + let res; + try { + res = matchResult[0][0][0][0](c2, async () => { + c2.res = await this.#notFoundHandler(c2); + }); + } catch (err) { + return this.#handleError(err, c2); + } + return res instanceof Promise ? res.then( + (resolved) => resolved || (c2.finalized ? c2.res : this.#notFoundHandler(c2)) + ).catch((err) => this.#handleError(err, c2)) : res ?? this.#notFoundHandler(c2); + } + const composed = compose(matchResult[0], this.errorHandler, this.#notFoundHandler); + return (async () => { + try { + const context2 = await composed(c2); + if (!context2.finalized) { + throw new Error( + "Context is not finalized. Did you forget to return a Response object or `await next()`?" + ); + } + return context2.res; + } catch (err) { + return this.#handleError(err, c2); + } + })(); + } + /** + * `.fetch()` will be entry point of your app. + * + * @see {@link https://hono.dev/docs/api/hono#fetch} + * + * @param {Request} request - request Object of request + * @param {Env} Env - env Object + * @param {ExecutionContext} - context of execution + * @returns {Response | Promise} response of request + * + */ + fetch = (request, ...rest) => { + return this.#dispatch(request, rest[1], rest[0], request.method); + }; + /** + * `.request()` is a useful method for testing. + * You can pass a URL or pathname to send a GET request. + * app will return a Response object. + * ```ts + * test('GET /hello is ok', async () => { + * const res = await app.request('/hello') + * expect(res.status).toBe(200) + * }) + * ``` + * @see https://hono.dev/docs/api/hono#request + */ + request = (input, requestInit, Env, executionCtx) => { + if (input instanceof Request) { + return this.fetch(requestInit ? new Request(input, requestInit) : input, Env, executionCtx); + } + input = input.toString(); + return this.fetch( + new Request( + /^https?:\/\//.test(input) ? input : `http://localhost${mergePath("/", input)}`, + requestInit + ), + Env, + executionCtx + ); + }; + /** + * `.fire()` automatically adds a global fetch event listener. + * This can be useful for environments that adhere to the Service Worker API, such as non-ES module Cloudflare Workers. + * @deprecated + * Use `fire` from `hono/service-worker` instead. + * ```ts + * import { Hono } from 'hono' + * import { fire } from 'hono/service-worker' + * + * const app = new Hono() + * // ... + * fire(app) + * ``` + * @see https://hono.dev/docs/api/hono#fire + * @see https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API + * @see https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/ + */ + fire = () => { + addEventListener("fetch", (event) => { + event.respondWith(this.#dispatch(event.request, event, void 0, event.request.method)); + }); + }; + }, "_Hono"); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/matcher.js +function match(method, path) { + const matchers = this.buildAllMatchers(); + const match2 = /* @__PURE__ */ __name((method2, path2) => { + const matcher = matchers[method2] || matchers[METHOD_NAME_ALL]; + const staticMatch = matcher[2][path2]; + if (staticMatch) { + return staticMatch; + } + const match3 = path2.match(matcher[0]); + if (!match3) { + return [[], emptyParam]; + } + const index = match3.indexOf("", 1); + return [matcher[1][index], match3]; + }, "match2"); + this.match = match2; + return match2(method, path); +} +var emptyParam; +var init_matcher = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/matcher.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router(); + emptyParam = []; + __name(match, "match"); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/node.js +function compareKey(a2, b2) { + if (a2.length === 1) { + return b2.length === 1 ? a2 < b2 ? -1 : 1 : -1; + } + if (b2.length === 1) { + return 1; + } + if (a2 === ONLY_WILDCARD_REG_EXP_STR || a2 === TAIL_WILDCARD_REG_EXP_STR) { + return 1; + } else if (b2 === ONLY_WILDCARD_REG_EXP_STR || b2 === TAIL_WILDCARD_REG_EXP_STR) { + return -1; + } + if (a2 === LABEL_REG_EXP_STR) { + return 1; + } else if (b2 === LABEL_REG_EXP_STR) { + return -1; + } + return a2.length === b2.length ? a2 < b2 ? -1 : 1 : b2.length - a2.length; +} +var LABEL_REG_EXP_STR, ONLY_WILDCARD_REG_EXP_STR, TAIL_WILDCARD_REG_EXP_STR, PATH_ERROR, regExpMetaChars, Node2; +var init_node = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/node.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + LABEL_REG_EXP_STR = "[^/]+"; + ONLY_WILDCARD_REG_EXP_STR = ".*"; + TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)"; + PATH_ERROR = /* @__PURE__ */ Symbol(); + regExpMetaChars = new Set(".\\+*[^]$()"); + __name(compareKey, "compareKey"); + Node2 = /* @__PURE__ */ __name(class _Node { + #index; + #varIndex; + #children = /* @__PURE__ */ Object.create(null); + insert(tokens, index, paramMap, context2, pathErrorCheckOnly) { + if (tokens.length === 0) { + if (this.#index !== void 0) { + throw PATH_ERROR; + } + if (pathErrorCheckOnly) { + return; + } + this.#index = index; + return; + } + const [token, ...restTokens] = tokens; + const pattern = token === "*" ? restTokens.length === 0 ? ["", "", ONLY_WILDCARD_REG_EXP_STR] : ["", "", LABEL_REG_EXP_STR] : token === "/*" ? ["", "", TAIL_WILDCARD_REG_EXP_STR] : token.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/); + let node; + if (pattern) { + const name = pattern[1]; + let regexpStr = pattern[2] || LABEL_REG_EXP_STR; + if (name && pattern[2]) { + if (regexpStr === ".*") { + throw PATH_ERROR; + } + regexpStr = regexpStr.replace(/^\((?!\?:)(?=[^)]+\)$)/, "(?:"); + if (/\((?!\?:)/.test(regexpStr)) { + throw PATH_ERROR; + } + } + node = this.#children[regexpStr]; + if (!node) { + if (Object.keys(this.#children).some( + (k2) => k2 !== ONLY_WILDCARD_REG_EXP_STR && k2 !== TAIL_WILDCARD_REG_EXP_STR + )) { + throw PATH_ERROR; + } + if (pathErrorCheckOnly) { + return; + } + node = this.#children[regexpStr] = new _Node(); + if (name !== "") { + node.#varIndex = context2.varIndex++; + } + } + if (!pathErrorCheckOnly && name !== "") { + paramMap.push([name, node.#varIndex]); + } + } else { + node = this.#children[token]; + if (!node) { + if (Object.keys(this.#children).some( + (k2) => k2.length > 1 && k2 !== ONLY_WILDCARD_REG_EXP_STR && k2 !== TAIL_WILDCARD_REG_EXP_STR + )) { + throw PATH_ERROR; + } + if (pathErrorCheckOnly) { + return; + } + node = this.#children[token] = new _Node(); + } + } + node.insert(restTokens, index, paramMap, context2, pathErrorCheckOnly); + } + buildRegExpStr() { + const childKeys = Object.keys(this.#children).sort(compareKey); + const strList = childKeys.map((k2) => { + const c2 = this.#children[k2]; + return (typeof c2.#varIndex === "number" ? `(${k2})@${c2.#varIndex}` : regExpMetaChars.has(k2) ? `\\${k2}` : k2) + c2.buildRegExpStr(); + }); + if (typeof this.#index === "number") { + strList.unshift(`#${this.#index}`); + } + if (strList.length === 0) { + return ""; + } + if (strList.length === 1) { + return strList[0]; + } + return "(?:" + strList.join("|") + ")"; + } + }, "_Node"); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/trie.js +var Trie; +var init_trie = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/trie.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_node(); + Trie = /* @__PURE__ */ __name(class { + #context = { varIndex: 0 }; + #root = new Node2(); + insert(path, index, pathErrorCheckOnly) { + const paramAssoc = []; + const groups = []; + for (let i2 = 0; ; ) { + let replaced = false; + path = path.replace(/\{[^}]+\}/g, (m2) => { + const mark = `@\\${i2}`; + groups[i2] = [mark, m2]; + i2++; + replaced = true; + return mark; + }); + if (!replaced) { + break; + } + } + const tokens = path.match(/(?::[^\/]+)|(?:\/\*$)|./g) || []; + for (let i2 = groups.length - 1; i2 >= 0; i2--) { + const [mark] = groups[i2]; + for (let j2 = tokens.length - 1; j2 >= 0; j2--) { + if (tokens[j2].indexOf(mark) !== -1) { + tokens[j2] = tokens[j2].replace(mark, groups[i2][1]); + break; + } + } + } + this.#root.insert(tokens, index, paramAssoc, this.#context, pathErrorCheckOnly); + return paramAssoc; + } + buildRegExp() { + let regexp = this.#root.buildRegExpStr(); + if (regexp === "") { + return [/^$/, [], []]; + } + let captureIndex = 0; + const indexReplacementMap = []; + const paramReplacementMap = []; + regexp = regexp.replace(/#(\d+)|@(\d+)|\.\*\$/g, (_, handlerIndex, paramIndex) => { + if (handlerIndex !== void 0) { + indexReplacementMap[++captureIndex] = Number(handlerIndex); + return "$()"; + } + if (paramIndex !== void 0) { + paramReplacementMap[Number(paramIndex)] = ++captureIndex; + return ""; + } + return ""; + }); + return [new RegExp(`^${regexp}`), indexReplacementMap, paramReplacementMap]; + } + }, "Trie"); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/router.js +function buildWildcardRegExp(path) { + return wildcardRegExpCache[path] ??= new RegExp( + path === "*" ? "" : `^${path.replace( + /\/\*$|([.\\+*[^\]$()])/g, + (_, metaChar) => metaChar ? `\\${metaChar}` : "(?:|/.*)" + )}$` + ); +} +function clearWildcardRegExpCache() { + wildcardRegExpCache = /* @__PURE__ */ Object.create(null); +} +function buildMatcherFromPreprocessedRoutes(routes) { + const trie = new Trie(); + const handlerData = []; + if (routes.length === 0) { + return nullMatcher; + } + const routesWithStaticPathFlag = routes.map( + (route) => [!/\*|\/:/.test(route[0]), ...route] + ).sort( + ([isStaticA, pathA], [isStaticB, pathB]) => isStaticA ? 1 : isStaticB ? -1 : pathA.length - pathB.length + ); + const staticMap = /* @__PURE__ */ Object.create(null); + for (let i2 = 0, j2 = -1, len = routesWithStaticPathFlag.length; i2 < len; i2++) { + const [pathErrorCheckOnly, path, handlers2] = routesWithStaticPathFlag[i2]; + if (pathErrorCheckOnly) { + staticMap[path] = [handlers2.map(([h2]) => [h2, /* @__PURE__ */ Object.create(null)]), emptyParam]; + } else { + j2++; + } + let paramAssoc; + try { + paramAssoc = trie.insert(path, j2, pathErrorCheckOnly); + } catch (e2) { + throw e2 === PATH_ERROR ? new UnsupportedPathError(path) : e2; + } + if (pathErrorCheckOnly) { + continue; + } + handlerData[j2] = handlers2.map(([h2, paramCount]) => { + const paramIndexMap = /* @__PURE__ */ Object.create(null); + paramCount -= 1; + for (; paramCount >= 0; paramCount--) { + const [key, value] = paramAssoc[paramCount]; + paramIndexMap[key] = value; + } + return [h2, paramIndexMap]; + }); + } + const [regexp, indexReplacementMap, paramReplacementMap] = trie.buildRegExp(); + for (let i2 = 0, len = handlerData.length; i2 < len; i2++) { + for (let j2 = 0, len2 = handlerData[i2].length; j2 < len2; j2++) { + const map2 = handlerData[i2][j2]?.[1]; + if (!map2) { + continue; + } + const keys = Object.keys(map2); + for (let k2 = 0, len3 = keys.length; k2 < len3; k2++) { + map2[keys[k2]] = paramReplacementMap[map2[keys[k2]]]; + } + } + } + const handlerMap = []; + for (const i2 in indexReplacementMap) { + handlerMap[i2] = handlerData[indexReplacementMap[i2]]; + } + return [regexp, handlerMap, staticMap]; +} +function findMiddleware(middleware2, path) { + if (!middleware2) { + return void 0; + } + for (const k2 of Object.keys(middleware2).sort((a2, b2) => b2.length - a2.length)) { + if (buildWildcardRegExp(k2).test(path)) { + return [...middleware2[k2]]; + } + } + return void 0; +} +var nullMatcher, wildcardRegExpCache, RegExpRouter; +var init_router2 = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/router.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router(); + init_url(); + init_matcher(); + init_node(); + init_trie(); + nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)]; + wildcardRegExpCache = /* @__PURE__ */ Object.create(null); + __name(buildWildcardRegExp, "buildWildcardRegExp"); + __name(clearWildcardRegExpCache, "clearWildcardRegExpCache"); + __name(buildMatcherFromPreprocessedRoutes, "buildMatcherFromPreprocessedRoutes"); + __name(findMiddleware, "findMiddleware"); + RegExpRouter = /* @__PURE__ */ __name(class { + name = "RegExpRouter"; + #middleware; + #routes; + constructor() { + this.#middleware = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) }; + this.#routes = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) }; + } + add(method, path, handler) { + const middleware2 = this.#middleware; + const routes = this.#routes; + if (!middleware2 || !routes) { + throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT); + } + if (!middleware2[method]) { + ; + [middleware2, routes].forEach((handlerMap) => { + handlerMap[method] = /* @__PURE__ */ Object.create(null); + Object.keys(handlerMap[METHOD_NAME_ALL]).forEach((p2) => { + handlerMap[method][p2] = [...handlerMap[METHOD_NAME_ALL][p2]]; + }); + }); + } + if (path === "/*") { + path = "*"; + } + const paramCount = (path.match(/\/:/g) || []).length; + if (/\*$/.test(path)) { + const re = buildWildcardRegExp(path); + if (method === METHOD_NAME_ALL) { + Object.keys(middleware2).forEach((m2) => { + middleware2[m2][path] ||= findMiddleware(middleware2[m2], path) || findMiddleware(middleware2[METHOD_NAME_ALL], path) || []; + }); + } else { + middleware2[method][path] ||= findMiddleware(middleware2[method], path) || findMiddleware(middleware2[METHOD_NAME_ALL], path) || []; + } + Object.keys(middleware2).forEach((m2) => { + if (method === METHOD_NAME_ALL || method === m2) { + Object.keys(middleware2[m2]).forEach((p2) => { + re.test(p2) && middleware2[m2][p2].push([handler, paramCount]); + }); + } + }); + Object.keys(routes).forEach((m2) => { + if (method === METHOD_NAME_ALL || method === m2) { + Object.keys(routes[m2]).forEach( + (p2) => re.test(p2) && routes[m2][p2].push([handler, paramCount]) + ); + } + }); + return; + } + const paths = checkOptionalParameter(path) || [path]; + for (let i2 = 0, len = paths.length; i2 < len; i2++) { + const path2 = paths[i2]; + Object.keys(routes).forEach((m2) => { + if (method === METHOD_NAME_ALL || method === m2) { + routes[m2][path2] ||= [ + ...findMiddleware(middleware2[m2], path2) || findMiddleware(middleware2[METHOD_NAME_ALL], path2) || [] + ]; + routes[m2][path2].push([handler, paramCount - len + i2 + 1]); + } + }); + } + } + match = match; + buildAllMatchers() { + const matchers = /* @__PURE__ */ Object.create(null); + Object.keys(this.#routes).concat(Object.keys(this.#middleware)).forEach((method) => { + matchers[method] ||= this.#buildMatcher(method); + }); + this.#middleware = this.#routes = void 0; + clearWildcardRegExpCache(); + return matchers; + } + #buildMatcher(method) { + const routes = []; + let hasOwnRoute = method === METHOD_NAME_ALL; + [this.#middleware, this.#routes].forEach((r2) => { + const ownRoute = r2[method] ? Object.keys(r2[method]).map((path) => [path, r2[method][path]]) : []; + if (ownRoute.length !== 0) { + hasOwnRoute ||= true; + routes.push(...ownRoute); + } else if (method !== METHOD_NAME_ALL) { + routes.push( + ...Object.keys(r2[METHOD_NAME_ALL]).map((path) => [path, r2[METHOD_NAME_ALL][path]]) + ); + } + }); + if (!hasOwnRoute) { + return null; + } else { + return buildMatcherFromPreprocessedRoutes(routes); + } + } + }, "RegExpRouter"); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/prepared-router.js +var init_prepared_router = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/prepared-router.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router(); + init_matcher(); + init_router2(); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/index.js +var init_reg_exp_router = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router2(); + init_prepared_router(); + } +}); + +// ../../node_modules/hono/dist/router/smart-router/router.js +var SmartRouter; +var init_router3 = __esm({ + "../../node_modules/hono/dist/router/smart-router/router.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router(); + SmartRouter = /* @__PURE__ */ __name(class { + name = "SmartRouter"; + #routers = []; + #routes = []; + constructor(init) { + this.#routers = init.routers; + } + add(method, path, handler) { + if (!this.#routes) { + throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT); + } + this.#routes.push([method, path, handler]); + } + match(method, path) { + if (!this.#routes) { + throw new Error("Fatal error"); + } + const routers = this.#routers; + const routes = this.#routes; + const len = routers.length; + let i2 = 0; + let res; + for (; i2 < len; i2++) { + const router8 = routers[i2]; + try { + for (let i22 = 0, len2 = routes.length; i22 < len2; i22++) { + router8.add(...routes[i22]); + } + res = router8.match(method, path); + } catch (e2) { + if (e2 instanceof UnsupportedPathError) { + continue; + } + throw e2; + } + this.match = router8.match.bind(router8); + this.#routers = [router8]; + this.#routes = void 0; + break; + } + if (i2 === len) { + throw new Error("Fatal error"); + } + this.name = `SmartRouter + ${this.activeRouter.name}`; + return res; + } + get activeRouter() { + if (this.#routes || this.#routers.length !== 1) { + throw new Error("No active router has been determined yet."); + } + return this.#routers[0]; + } + }, "SmartRouter"); + } +}); + +// ../../node_modules/hono/dist/router/smart-router/index.js +var init_smart_router = __esm({ + "../../node_modules/hono/dist/router/smart-router/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router3(); + } +}); + +// ../../node_modules/hono/dist/router/trie-router/node.js +var emptyParams, hasChildren, Node3; +var init_node2 = __esm({ + "../../node_modules/hono/dist/router/trie-router/node.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router(); + init_url(); + emptyParams = /* @__PURE__ */ Object.create(null); + hasChildren = /* @__PURE__ */ __name((children) => { + for (const _ in children) { + return true; + } + return false; + }, "hasChildren"); + Node3 = /* @__PURE__ */ __name(class _Node2 { + #methods; + #children; + #patterns; + #order = 0; + #params = emptyParams; + constructor(method, handler, children) { + this.#children = children || /* @__PURE__ */ Object.create(null); + this.#methods = []; + if (method && handler) { + const m2 = /* @__PURE__ */ Object.create(null); + m2[method] = { handler, possibleKeys: [], score: 0 }; + this.#methods = [m2]; + } + this.#patterns = []; + } + insert(method, path, handler) { + this.#order = ++this.#order; + let curNode = this; + const parts = splitRoutingPath(path); + const possibleKeys = []; + for (let i2 = 0, len = parts.length; i2 < len; i2++) { + const p2 = parts[i2]; + const nextP = parts[i2 + 1]; + const pattern = getPattern(p2, nextP); + const key = Array.isArray(pattern) ? pattern[0] : p2; + if (key in curNode.#children) { + curNode = curNode.#children[key]; + if (pattern) { + possibleKeys.push(pattern[1]); + } + continue; + } + curNode.#children[key] = new _Node2(); + if (pattern) { + curNode.#patterns.push(pattern); + possibleKeys.push(pattern[1]); + } + curNode = curNode.#children[key]; + } + curNode.#methods.push({ + [method]: { + handler, + possibleKeys: possibleKeys.filter((v3, i2, a2) => a2.indexOf(v3) === i2), + score: this.#order + } + }); + return curNode; + } + #pushHandlerSets(handlerSets, node, method, nodeParams, params) { + for (let i2 = 0, len = node.#methods.length; i2 < len; i2++) { + const m2 = node.#methods[i2]; + const handlerSet = m2[method] || m2[METHOD_NAME_ALL]; + const processedSet = {}; + if (handlerSet !== void 0) { + handlerSet.params = /* @__PURE__ */ Object.create(null); + handlerSets.push(handlerSet); + if (nodeParams !== emptyParams || params && params !== emptyParams) { + for (let i22 = 0, len2 = handlerSet.possibleKeys.length; i22 < len2; i22++) { + const key = handlerSet.possibleKeys[i22]; + const processed = processedSet[handlerSet.score]; + handlerSet.params[key] = params?.[key] && !processed ? params[key] : nodeParams[key] ?? params?.[key]; + processedSet[handlerSet.score] = true; + } + } + } + } + } + search(method, path) { + const handlerSets = []; + this.#params = emptyParams; + const curNode = this; + let curNodes = [curNode]; + const parts = splitPath(path); + const curNodesQueue = []; + const len = parts.length; + let partOffsets = null; + for (let i2 = 0; i2 < len; i2++) { + const part = parts[i2]; + const isLast = i2 === len - 1; + const tempNodes = []; + for (let j2 = 0, len2 = curNodes.length; j2 < len2; j2++) { + const node = curNodes[j2]; + const nextNode = node.#children[part]; + if (nextNode) { + nextNode.#params = node.#params; + if (isLast) { + if (nextNode.#children["*"]) { + this.#pushHandlerSets(handlerSets, nextNode.#children["*"], method, node.#params); + } + this.#pushHandlerSets(handlerSets, nextNode, method, node.#params); + } else { + tempNodes.push(nextNode); + } + } + for (let k2 = 0, len3 = node.#patterns.length; k2 < len3; k2++) { + const pattern = node.#patterns[k2]; + const params = node.#params === emptyParams ? {} : { ...node.#params }; + if (pattern === "*") { + const astNode = node.#children["*"]; + if (astNode) { + this.#pushHandlerSets(handlerSets, astNode, method, node.#params); + astNode.#params = params; + tempNodes.push(astNode); + } + continue; + } + const [key, name, matcher] = pattern; + if (!part && !(matcher instanceof RegExp)) { + continue; + } + const child = node.#children[key]; + if (matcher instanceof RegExp) { + if (partOffsets === null) { + partOffsets = new Array(len); + let offset = path[0] === "/" ? 1 : 0; + for (let p2 = 0; p2 < len; p2++) { + partOffsets[p2] = offset; + offset += parts[p2].length + 1; + } + } + const restPathString = path.substring(partOffsets[i2]); + const m2 = matcher.exec(restPathString); + if (m2) { + params[name] = m2[0]; + this.#pushHandlerSets(handlerSets, child, method, node.#params, params); + if (hasChildren(child.#children)) { + child.#params = params; + const componentCount = m2[0].match(/\//)?.length ?? 0; + const targetCurNodes = curNodesQueue[componentCount] ||= []; + targetCurNodes.push(child); + } + continue; + } + } + if (matcher === true || matcher.test(part)) { + params[name] = part; + if (isLast) { + this.#pushHandlerSets(handlerSets, child, method, params, node.#params); + if (child.#children["*"]) { + this.#pushHandlerSets( + handlerSets, + child.#children["*"], + method, + params, + node.#params + ); + } + } else { + child.#params = params; + tempNodes.push(child); + } + } + } + } + const shifted = curNodesQueue.shift(); + curNodes = shifted ? tempNodes.concat(shifted) : tempNodes; + } + if (handlerSets.length > 1) { + handlerSets.sort((a2, b2) => { + return a2.score - b2.score; + }); + } + return [handlerSets.map(({ handler, params }) => [handler, params])]; + } + }, "_Node"); + } +}); + +// ../../node_modules/hono/dist/router/trie-router/router.js +var TrieRouter; +var init_router4 = __esm({ + "../../node_modules/hono/dist/router/trie-router/router.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_url(); + init_node2(); + TrieRouter = /* @__PURE__ */ __name(class { + name = "TrieRouter"; + #node; + constructor() { + this.#node = new Node3(); + } + add(method, path, handler) { + const results = checkOptionalParameter(path); + if (results) { + for (let i2 = 0, len = results.length; i2 < len; i2++) { + this.#node.insert(method, results[i2], handler); + } + return; + } + this.#node.insert(method, path, handler); + } + match(method, path) { + return this.#node.search(method, path); + } + }, "TrieRouter"); + } +}); + +// ../../node_modules/hono/dist/router/trie-router/index.js +var init_trie_router = __esm({ + "../../node_modules/hono/dist/router/trie-router/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router4(); + } +}); + +// ../../node_modules/hono/dist/hono.js +var Hono2; +var init_hono = __esm({ + "../../node_modules/hono/dist/hono.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_hono_base(); + init_reg_exp_router(); + init_smart_router(); + init_trie_router(); + Hono2 = /* @__PURE__ */ __name(class extends Hono { + /** + * Creates an instance of the Hono class. + * + * @param options - Optional configuration options for the Hono instance. + */ + constructor(options = {}) { + super(options); + this.router = options.router ?? new SmartRouter({ + routers: [new RegExpRouter(), new TrieRouter()] + }); + } + }, "Hono"); + } +}); + +// ../../node_modules/hono/dist/index.js +var init_dist = __esm({ + "../../node_modules/hono/dist/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_hono(); + } +}); + +// ../../node_modules/hono/dist/middleware/cors/index.js +var cors; +var init_cors = __esm({ + "../../node_modules/hono/dist/middleware/cors/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + cors = /* @__PURE__ */ __name((options) => { + const defaults2 = { + origin: "*", + allowMethods: ["GET", "HEAD", "PUT", "POST", "DELETE", "PATCH"], + allowHeaders: [], + exposeHeaders: [] + }; + const opts = { + ...defaults2, + ...options + }; + const findAllowOrigin = ((optsOrigin) => { + if (typeof optsOrigin === "string") { + if (optsOrigin === "*") { + if (opts.credentials) { + return (origin2) => origin2 || null; + } + return () => optsOrigin; + } else { + return (origin2) => optsOrigin === origin2 ? origin2 : null; + } + } else if (typeof optsOrigin === "function") { + return optsOrigin; + } else { + return (origin2) => optsOrigin.includes(origin2) ? origin2 : null; + } + })(opts.origin); + const findAllowMethods = ((optsAllowMethods) => { + if (typeof optsAllowMethods === "function") { + return optsAllowMethods; + } else if (Array.isArray(optsAllowMethods)) { + return () => optsAllowMethods; + } else { + return () => []; + } + })(opts.allowMethods); + return /* @__PURE__ */ __name(async function cors2(c2, next) { + function set2(key, value) { + c2.res.headers.set(key, value); + } + __name(set2, "set"); + const allowOrigin = await findAllowOrigin(c2.req.header("origin") || "", c2); + if (allowOrigin) { + set2("Access-Control-Allow-Origin", allowOrigin); + } + if (opts.credentials) { + set2("Access-Control-Allow-Credentials", "true"); + } + if (opts.exposeHeaders?.length) { + set2("Access-Control-Expose-Headers", opts.exposeHeaders.join(",")); + } + if (c2.req.method === "OPTIONS") { + if (opts.origin !== "*" || opts.credentials) { + set2("Vary", "Origin"); + } + if (opts.maxAge != null) { + set2("Access-Control-Max-Age", opts.maxAge.toString()); + } + const allowMethods = await findAllowMethods(c2.req.header("origin") || "", c2); + if (allowMethods.length) { + set2("Access-Control-Allow-Methods", allowMethods.join(",")); + } + let headers = opts.allowHeaders; + if (!headers?.length) { + const requestHeaders = c2.req.header("Access-Control-Request-Headers"); + if (requestHeaders) { + headers = requestHeaders.split(/\s*,\s*/); + } + } + if (headers?.length) { + set2("Access-Control-Allow-Headers", headers.join(",")); + c2.res.headers.append("Vary", "Access-Control-Request-Headers"); + } + c2.res.headers.delete("Content-Length"); + c2.res.headers.delete("Content-Type"); + return new Response(null, { + headers: c2.res.headers, + status: 204, + statusText: "No Content" + }); + } + await next(); + if (opts.origin !== "*" || opts.credentials) { + c2.header("Vary", "Origin", { append: true }); + } + }, "cors2"); + }, "cors"); + } +}); + +// ../../node_modules/hono/dist/utils/color.js +function getColorEnabled() { + const { process: process3, Deno } = globalThis; + const isNoColor = typeof Deno?.noColor === "boolean" ? Deno.noColor : process3 !== void 0 ? ( + // eslint-disable-next-line no-unsafe-optional-chaining + "NO_COLOR" in process3?.env + ) : false; + return !isNoColor; +} +async function getColorEnabledAsync() { + const { navigator: navigator2 } = globalThis; + const cfWorkers = "cloudflare:workers"; + const isNoColor = navigator2 !== void 0 && navigator2.userAgent === "Cloudflare-Workers" ? await (async () => { + try { + return "NO_COLOR" in ((await import(cfWorkers)).env ?? {}); + } catch { + return false; + } + })() : !getColorEnabled(); + return !isNoColor; +} +var init_color = __esm({ + "../../node_modules/hono/dist/utils/color.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(getColorEnabled, "getColorEnabled"); + __name(getColorEnabledAsync, "getColorEnabledAsync"); + } +}); + +// ../../node_modules/hono/dist/middleware/logger/index.js +async function log3(fn, prefix, method, path, status = 0, elapsed) { + const out = prefix === "<--" ? `${prefix} ${method} ${path}` : `${prefix} ${method} ${path} ${await colorStatus(status)} ${elapsed}`; + fn(out); +} +var humanize, time3, colorStatus, logger; +var init_logger = __esm({ + "../../node_modules/hono/dist/middleware/logger/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_color(); + humanize = /* @__PURE__ */ __name((times) => { + const [delimiter, separator] = [",", "."]; + const orderTimes = times.map((v3) => v3.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1" + delimiter)); + return orderTimes.join(separator); + }, "humanize"); + time3 = /* @__PURE__ */ __name((start) => { + const delta = Date.now() - start; + return humanize([delta < 1e3 ? delta + "ms" : Math.round(delta / 1e3) + "s"]); + }, "time"); + colorStatus = /* @__PURE__ */ __name(async (status) => { + const colorEnabled = await getColorEnabledAsync(); + if (colorEnabled) { + switch (status / 100 | 0) { + case 5: + return `\x1B[31m${status}\x1B[0m`; + case 4: + return `\x1B[33m${status}\x1B[0m`; + case 3: + return `\x1B[36m${status}\x1B[0m`; + case 2: + return `\x1B[32m${status}\x1B[0m`; + } + } + return `${status}`; + }, "colorStatus"); + __name(log3, "log"); + logger = /* @__PURE__ */ __name((fn = console.log) => { + return /* @__PURE__ */ __name(async function logger22(c2, next) { + const { method, url: url2 } = c2.req; + const path = url2.slice(url2.indexOf("/", 8)); + await log3(fn, "<--", method, path); + const start = Date.now(); + await next(); + await log3(fn, "-->", method, path, c2.res.status, time3(start)); + }, "logger2"); + }, "logger"); + } +}); + +// ../../node_modules/@trpc/server/dist/codes-DagpWZLc.mjs +function mergeWithoutOverrides(obj1, ...objs) { + const newObj = Object.assign(emptyObject(), obj1); + for (const overrides of objs) + for (const key in overrides) { + if (key in newObj && newObj[key] !== overrides[key]) + throw new Error(`Duplicate key ${key}`); + newObj[key] = overrides[key]; + } + return newObj; +} +function isObject(value) { + return !!value && !Array.isArray(value) && typeof value === "object"; +} +function isFunction(fn) { + return typeof fn === "function"; +} +function emptyObject() { + return /* @__PURE__ */ Object.create(null); +} +function isAsyncIterable(value) { + return asyncIteratorsSupported && isObject(value) && Symbol.asyncIterator in value; +} +function identity(it) { + return it; +} +function abortSignalsAnyPonyfill(signals) { + if (typeof AbortSignal.any === "function") + return AbortSignal.any(signals); + const ac3 = new AbortController(); + for (const signal of signals) { + if (signal.aborted) { + trigger(); + break; + } + signal.addEventListener("abort", trigger, { once: true }); + } + return ac3.signal; + function trigger() { + ac3.abort(); + for (const signal of signals) + signal.removeEventListener("abort", trigger); + } + __name(trigger, "trigger"); +} +var asyncIteratorsSupported, run, TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER, retryableRpcCodes; +var init_codes_DagpWZLc = __esm({ + "../../node_modules/@trpc/server/dist/codes-DagpWZLc.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(mergeWithoutOverrides, "mergeWithoutOverrides"); + __name(isObject, "isObject"); + __name(isFunction, "isFunction"); + __name(emptyObject, "emptyObject"); + asyncIteratorsSupported = typeof Symbol === "function" && !!Symbol.asyncIterator; + __name(isAsyncIterable, "isAsyncIterable"); + run = /* @__PURE__ */ __name((fn) => fn(), "run"); + __name(identity, "identity"); + __name(abortSignalsAnyPonyfill, "abortSignalsAnyPonyfill"); + TRPC_ERROR_CODES_BY_KEY = { + PARSE_ERROR: -32700, + BAD_REQUEST: -32600, + INTERNAL_SERVER_ERROR: -32603, + NOT_IMPLEMENTED: -32603, + BAD_GATEWAY: -32603, + SERVICE_UNAVAILABLE: -32603, + GATEWAY_TIMEOUT: -32603, + UNAUTHORIZED: -32001, + PAYMENT_REQUIRED: -32002, + FORBIDDEN: -32003, + NOT_FOUND: -32004, + METHOD_NOT_SUPPORTED: -32005, + TIMEOUT: -32008, + CONFLICT: -32009, + PRECONDITION_FAILED: -32012, + PAYLOAD_TOO_LARGE: -32013, + UNSUPPORTED_MEDIA_TYPE: -32015, + UNPROCESSABLE_CONTENT: -32022, + PRECONDITION_REQUIRED: -32028, + TOO_MANY_REQUESTS: -32029, + CLIENT_CLOSED_REQUEST: -32099 + }; + TRPC_ERROR_CODES_BY_NUMBER = { + [-32700]: "PARSE_ERROR", + [-32600]: "BAD_REQUEST", + [-32603]: "INTERNAL_SERVER_ERROR", + [-32001]: "UNAUTHORIZED", + [-32002]: "PAYMENT_REQUIRED", + [-32003]: "FORBIDDEN", + [-32004]: "NOT_FOUND", + [-32005]: "METHOD_NOT_SUPPORTED", + [-32008]: "TIMEOUT", + [-32009]: "CONFLICT", + [-32012]: "PRECONDITION_FAILED", + [-32013]: "PAYLOAD_TOO_LARGE", + [-32015]: "UNSUPPORTED_MEDIA_TYPE", + [-32022]: "UNPROCESSABLE_CONTENT", + [-32028]: "PRECONDITION_REQUIRED", + [-32029]: "TOO_MANY_REQUESTS", + [-32099]: "CLIENT_CLOSED_REQUEST" + }; + retryableRpcCodes = [ + TRPC_ERROR_CODES_BY_KEY.BAD_GATEWAY, + TRPC_ERROR_CODES_BY_KEY.SERVICE_UNAVAILABLE, + TRPC_ERROR_CODES_BY_KEY.GATEWAY_TIMEOUT, + TRPC_ERROR_CODES_BY_KEY.INTERNAL_SERVER_ERROR + ]; + } +}); + +// ../../node_modules/@trpc/server/dist/getErrorShape-vC8mUXJD.mjs +function createInnerProxy(callback, path, memo2) { + var _memo$cacheKey; + const cacheKey = path.join("."); + (_memo$cacheKey = memo2[cacheKey]) !== null && _memo$cacheKey !== void 0 || (memo2[cacheKey] = new Proxy(noop, { + get(_obj, key) { + if (typeof key !== "string" || key === "then") + return void 0; + return createInnerProxy(callback, [...path, key], memo2); + }, + apply(_1, _2, args) { + const lastOfPath = path[path.length - 1]; + let opts = { + args, + path + }; + if (lastOfPath === "call") + opts = { + args: args.length >= 2 ? [args[1]] : [], + path: path.slice(0, -1) + }; + else if (lastOfPath === "apply") + opts = { + args: args.length >= 2 ? args[1] : [], + path: path.slice(0, -1) + }; + freezeIfAvailable(opts.args); + freezeIfAvailable(opts.path); + return callback(opts); + } + })); + return memo2[cacheKey]; +} +function getStatusCodeFromKey(code) { + var _JSONRPC2_TO_HTTP_COD; + return (_JSONRPC2_TO_HTTP_COD = JSONRPC2_TO_HTTP_CODE[code]) !== null && _JSONRPC2_TO_HTTP_COD !== void 0 ? _JSONRPC2_TO_HTTP_COD : 500; +} +function getHTTPStatusCode(json2) { + const arr = Array.isArray(json2) ? json2 : [json2]; + const httpStatuses = new Set(arr.map((res) => { + if ("error" in res && isObject(res.error.data)) { + var _res$error$data; + if (typeof ((_res$error$data = res.error.data) === null || _res$error$data === void 0 ? void 0 : _res$error$data["httpStatus"]) === "number") + return res.error.data["httpStatus"]; + const code = TRPC_ERROR_CODES_BY_NUMBER[res.error.code]; + return getStatusCodeFromKey(code); + } + return 200; + })); + if (httpStatuses.size !== 1) + return 207; + const httpStatus = httpStatuses.values().next().value; + return httpStatus; +} +function getHTTPStatusCodeFromError(error50) { + return getStatusCodeFromKey(error50.code); +} +function getErrorShape(opts) { + const { path, error: error50, config: config3 } = opts; + const { code } = opts.error; + const shape = { + message: error50.message, + code: TRPC_ERROR_CODES_BY_KEY[code], + data: { + code, + httpStatus: getHTTPStatusCodeFromError(error50) + } + }; + if (config3.isDev && typeof opts.error.stack === "string") + shape.data.stack = opts.error.stack; + if (typeof path === "string") + shape.data.path = path; + return config3.errorFormatter((0, import_objectSpread2.default)((0, import_objectSpread2.default)({}, opts), {}, { shape })); +} +var __create2, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __getProtoOf2, __hasOwnProp2, __commonJS2, __copyProps2, __toESM2, noop, freezeIfAvailable, createRecursiveProxy, JSONRPC2_TO_HTTP_CODE, require_typeof, require_toPrimitive, require_toPropertyKey, require_defineProperty, require_objectSpread2, import_objectSpread2; +var init_getErrorShape_vC8mUXJD = __esm({ + "../../node_modules/@trpc/server/dist/getErrorShape-vC8mUXJD.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_codes_DagpWZLc(); + __create2 = Object.create; + __defProp2 = Object.defineProperty; + __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + __getOwnPropNames2 = Object.getOwnPropertyNames; + __getProtoOf2 = Object.getPrototypeOf; + __hasOwnProp2 = Object.prototype.hasOwnProperty; + __commonJS2 = /* @__PURE__ */ __name((cb2, mod) => function() { + return mod || (0, cb2[__getOwnPropNames2(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + }, "__commonJS"); + __copyProps2 = /* @__PURE__ */ __name((to, from, except2, desc2) => { + if (from && typeof from === "object" || typeof from === "function") + for (var keys = __getOwnPropNames2(from), i2 = 0, n2 = keys.length, key; i2 < n2; i2++) { + key = keys[i2]; + if (!__hasOwnProp2.call(to, key) && key !== except2) + __defProp2(to, key, { + get: ((k2) => from[k2]).bind(null, key), + enumerable: !(desc2 = __getOwnPropDesc2(from, key)) || desc2.enumerable + }); + } + return to; + }, "__copyProps"); + __toESM2 = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { + value: mod, + enumerable: true + }) : target, mod)), "__toESM"); + noop = /* @__PURE__ */ __name(() => { + }, "noop"); + freezeIfAvailable = /* @__PURE__ */ __name((obj) => { + if (Object.freeze) + Object.freeze(obj); + }, "freezeIfAvailable"); + __name(createInnerProxy, "createInnerProxy"); + createRecursiveProxy = /* @__PURE__ */ __name((callback) => createInnerProxy(callback, [], emptyObject()), "createRecursiveProxy"); + JSONRPC2_TO_HTTP_CODE = { + PARSE_ERROR: 400, + BAD_REQUEST: 400, + UNAUTHORIZED: 401, + PAYMENT_REQUIRED: 402, + FORBIDDEN: 403, + NOT_FOUND: 404, + METHOD_NOT_SUPPORTED: 405, + TIMEOUT: 408, + CONFLICT: 409, + PRECONDITION_FAILED: 412, + PAYLOAD_TOO_LARGE: 413, + UNSUPPORTED_MEDIA_TYPE: 415, + UNPROCESSABLE_CONTENT: 422, + PRECONDITION_REQUIRED: 428, + TOO_MANY_REQUESTS: 429, + CLIENT_CLOSED_REQUEST: 499, + INTERNAL_SERVER_ERROR: 500, + NOT_IMPLEMENTED: 501, + BAD_GATEWAY: 502, + SERVICE_UNAVAILABLE: 503, + GATEWAY_TIMEOUT: 504 + }; + __name(getStatusCodeFromKey, "getStatusCodeFromKey"); + __name(getHTTPStatusCode, "getHTTPStatusCode"); + __name(getHTTPStatusCodeFromError, "getHTTPStatusCodeFromError"); + require_typeof = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(exports, module) { + function _typeof$2(o2) { + "@babel/helpers - typeof"; + return module.exports = _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) { + return typeof o$1; + } : function(o$1) { + return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1; + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof$2(o2); + } + __name(_typeof$2, "_typeof$2"); + module.exports = _typeof$2, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_toPrimitive = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(exports, module) { + var _typeof$1 = require_typeof()["default"]; + function toPrimitive$1(t9, r2) { + if ("object" != _typeof$1(t9) || !t9) + return t9; + var e2 = t9[Symbol.toPrimitive]; + if (void 0 !== e2) { + var i2 = e2.call(t9, r2 || "default"); + if ("object" != _typeof$1(i2)) + return i2; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r2 ? String : Number)(t9); + } + __name(toPrimitive$1, "toPrimitive$1"); + module.exports = toPrimitive$1, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_toPropertyKey = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(exports, module) { + var _typeof = require_typeof()["default"]; + var toPrimitive = require_toPrimitive(); + function toPropertyKey$1(t9) { + var i2 = toPrimitive(t9, "string"); + return "symbol" == _typeof(i2) ? i2 : i2 + ""; + } + __name(toPropertyKey$1, "toPropertyKey$1"); + module.exports = toPropertyKey$1, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_defineProperty = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(exports, module) { + var toPropertyKey = require_toPropertyKey(); + function _defineProperty(e2, r2, t9) { + return (r2 = toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, { + value: t9, + enumerable: true, + configurable: true, + writable: true + }) : e2[r2] = t9, e2; + } + __name(_defineProperty, "_defineProperty"); + module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_objectSpread2 = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(exports, module) { + var defineProperty = require_defineProperty(); + function ownKeys(e2, r2) { + var t9 = Object.keys(e2); + if (Object.getOwnPropertySymbols) { + var o2 = Object.getOwnPropertySymbols(e2); + r2 && (o2 = o2.filter(function(r$1) { + return Object.getOwnPropertyDescriptor(e2, r$1).enumerable; + })), t9.push.apply(t9, o2); + } + return t9; + } + __name(ownKeys, "ownKeys"); + function _objectSpread2(e2) { + for (var r2 = 1; r2 < arguments.length; r2++) { + var t9 = null != arguments[r2] ? arguments[r2] : {}; + r2 % 2 ? ownKeys(Object(t9), true).forEach(function(r$1) { + defineProperty(e2, r$1, t9[r$1]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t9)) : ownKeys(Object(t9)).forEach(function(r$1) { + Object.defineProperty(e2, r$1, Object.getOwnPropertyDescriptor(t9, r$1)); + }); + } + return e2; + } + __name(_objectSpread2, "_objectSpread2"); + module.exports = _objectSpread2, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + import_objectSpread2 = __toESM2(require_objectSpread2(), 1); + __name(getErrorShape, "getErrorShape"); + } +}); + +// ../../node_modules/@trpc/server/dist/tracked-Bjtgv3wJ.mjs +function getCauseFromUnknown(cause) { + if (cause instanceof Error) + return cause; + const type = typeof cause; + if (type === "undefined" || type === "function" || cause === null) + return void 0; + if (type !== "object") + return new Error(String(cause)); + if (isObject(cause)) + return Object.assign(new UnknownCauseError(), cause); + return void 0; +} +function getTRPCErrorFromUnknown(cause) { + if (cause instanceof TRPCError) + return cause; + if (cause instanceof Error && cause.name === "TRPCError") + return cause; + const trpcError = new TRPCError({ + code: "INTERNAL_SERVER_ERROR", + cause + }); + if (cause instanceof Error && cause.stack) + trpcError.stack = cause.stack; + return trpcError; +} +function getDataTransformer(transformer) { + if ("input" in transformer) + return transformer; + return { + input: transformer, + output: transformer + }; +} +function transformTRPCResponseItem(config3, item) { + if ("error" in item) + return (0, import_objectSpread2$1.default)((0, import_objectSpread2$1.default)({}, item), {}, { error: config3.transformer.output.serialize(item.error) }); + if ("data" in item.result) + return (0, import_objectSpread2$1.default)((0, import_objectSpread2$1.default)({}, item), {}, { result: (0, import_objectSpread2$1.default)((0, import_objectSpread2$1.default)({}, item.result), {}, { data: config3.transformer.output.serialize(item.result.data) }) }); + return item; +} +function transformTRPCResponse(config3, itemOrItems) { + return Array.isArray(itemOrItems) ? itemOrItems.map((item) => transformTRPCResponseItem(config3, item)) : transformTRPCResponseItem(config3, itemOrItems); +} +function once2(fn) { + const uncalled = Symbol(); + let result = uncalled; + return () => { + if (result === uncalled) + result = fn(); + return result; + }; +} +function isLazy(input) { + return typeof input === "function" && lazyMarker in input; +} +function isRouter(value) { + return isObject(value) && isObject(value["_def"]) && "router" in value["_def"]; +} +function createRouterFactory(config3) { + function createRouterInner(input) { + const reservedWordsUsed = new Set(Object.keys(input).filter((v3) => reservedWords.includes(v3))); + if (reservedWordsUsed.size > 0) + throw new Error("Reserved words used in `router({})` call: " + Array.from(reservedWordsUsed).join(", ")); + const procedures = emptyObject(); + const lazy$1 = emptyObject(); + function createLazyLoader(opts) { + return { + ref: opts.ref, + load: once2(async () => { + const router$1 = await opts.ref(); + const lazyPath = [...opts.path, opts.key]; + const lazyKey = lazyPath.join("."); + opts.aggregate[opts.key] = step(router$1._def.record, lazyPath); + delete lazy$1[lazyKey]; + for (const [nestedKey, nestedItem] of Object.entries(router$1._def.lazy)) { + const nestedRouterKey = [...lazyPath, nestedKey].join("."); + lazy$1[nestedRouterKey] = createLazyLoader({ + ref: nestedItem.ref, + path: lazyPath, + key: nestedKey, + aggregate: opts.aggregate[opts.key] + }); + } + }) + }; + } + __name(createLazyLoader, "createLazyLoader"); + function step(from, path = []) { + const aggregate = emptyObject(); + for (const [key, item] of Object.entries(from !== null && from !== void 0 ? from : {})) { + if (isLazy(item)) { + lazy$1[[...path, key].join(".")] = createLazyLoader({ + path, + ref: item, + key, + aggregate + }); + continue; + } + if (isRouter(item)) { + aggregate[key] = step(item._def.record, [...path, key]); + continue; + } + if (!isProcedure(item)) { + aggregate[key] = step(item, [...path, key]); + continue; + } + const newPath = [...path, key].join("."); + if (procedures[newPath]) + throw new Error(`Duplicate key: ${newPath}`); + procedures[newPath] = item; + aggregate[key] = item; + } + return aggregate; + } + __name(step, "step"); + const record2 = step(input); + const _def = (0, import_objectSpread22.default)((0, import_objectSpread22.default)({ + _config: config3, + router: true, + procedures, + lazy: lazy$1 + }, emptyRouter), {}, { record: record2 }); + const router8 = (0, import_objectSpread22.default)((0, import_objectSpread22.default)({}, record2), {}, { + _def, + createCaller: createCallerFactory()({ _def }) + }); + return router8; + } + __name(createRouterInner, "createRouterInner"); + return createRouterInner; +} +function isProcedure(procedureOrRouter) { + return typeof procedureOrRouter === "function"; +} +async function getProcedureAtPath(router8, path) { + const { _def } = router8; + let procedure = _def.procedures[path]; + while (!procedure) { + const key = Object.keys(_def.lazy).find((key$1) => path.startsWith(key$1)); + if (!key) + return null; + const lazyRouter = _def.lazy[key]; + await lazyRouter.load(); + procedure = _def.procedures[path]; + } + return procedure; +} +function createCallerFactory() { + return /* @__PURE__ */ __name(function createCallerInner(router8) { + const { _def } = router8; + return /* @__PURE__ */ __name(function createCaller(ctxOrCallback, opts) { + return createRecursiveProxy(async (innerOpts) => { + const { path, args } = innerOpts; + const fullPath = path.join("."); + if (path.length === 1 && path[0] === "_def") + return _def; + const procedure = await getProcedureAtPath(router8, fullPath); + let ctx = void 0; + try { + if (!procedure) + throw new TRPCError({ + code: "NOT_FOUND", + message: `No procedure found on path "${path}"` + }); + ctx = isFunction(ctxOrCallback) ? await Promise.resolve(ctxOrCallback()) : ctxOrCallback; + return await procedure({ + path: fullPath, + getRawInput: async () => args[0], + ctx, + type: procedure._def.type, + signal: opts === null || opts === void 0 ? void 0 : opts.signal, + batchIndex: 0 + }); + } catch (cause) { + var _opts$onError, _procedure$_def$type; + opts === null || opts === void 0 || (_opts$onError = opts.onError) === null || _opts$onError === void 0 || _opts$onError.call(opts, { + ctx, + error: getTRPCErrorFromUnknown(cause), + input: args[0], + path: fullPath, + type: (_procedure$_def$type = procedure === null || procedure === void 0 ? void 0 : procedure._def.type) !== null && _procedure$_def$type !== void 0 ? _procedure$_def$type : "unknown" + }); + throw cause; + } + }); + }, "createCaller"); + }, "createCallerInner"); +} +function mergeRouters(...routerList) { + var _routerList$, _routerList$2; + const record2 = mergeWithoutOverrides({}, ...routerList.map((r2) => r2._def.record)); + const errorFormatter = routerList.reduce((currentErrorFormatter, nextRouter) => { + if (nextRouter._def._config.errorFormatter && nextRouter._def._config.errorFormatter !== defaultFormatter) { + if (currentErrorFormatter !== defaultFormatter && currentErrorFormatter !== nextRouter._def._config.errorFormatter) + throw new Error("You seem to have several error formatters"); + return nextRouter._def._config.errorFormatter; + } + return currentErrorFormatter; + }, defaultFormatter); + const transformer = routerList.reduce((prev, current) => { + if (current._def._config.transformer && current._def._config.transformer !== defaultTransformer) { + if (prev !== defaultTransformer && prev !== current._def._config.transformer) + throw new Error("You seem to have several transformers"); + return current._def._config.transformer; + } + return prev; + }, defaultTransformer); + const router8 = createRouterFactory({ + errorFormatter, + transformer, + isDev: routerList.every((r2) => r2._def._config.isDev), + allowOutsideOfServer: routerList.every((r2) => r2._def._config.allowOutsideOfServer), + isServer: routerList.every((r2) => r2._def._config.isServer), + $types: (_routerList$ = routerList[0]) === null || _routerList$ === void 0 ? void 0 : _routerList$._def._config.$types, + sse: (_routerList$2 = routerList[0]) === null || _routerList$2 === void 0 ? void 0 : _routerList$2._def._config.sse + })(record2); + return router8; +} +function isTrackedEnvelope(value) { + return Array.isArray(value) && value[2] === trackedSymbol; +} +var defaultFormatter, import_defineProperty, UnknownCauseError, TRPCError, import_objectSpread2$1, defaultTransformer, import_objectSpread22, lazyMarker, emptyRouter, reservedWords, trackedSymbol; +var init_tracked_Bjtgv3wJ = __esm({ + "../../node_modules/@trpc/server/dist/tracked-Bjtgv3wJ.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getErrorShape_vC8mUXJD(); + init_codes_DagpWZLc(); + defaultFormatter = /* @__PURE__ */ __name(({ shape }) => { + return shape; + }, "defaultFormatter"); + import_defineProperty = __toESM2(require_defineProperty(), 1); + UnknownCauseError = /* @__PURE__ */ __name(class extends Error { + }, "UnknownCauseError"); + __name(getCauseFromUnknown, "getCauseFromUnknown"); + __name(getTRPCErrorFromUnknown, "getTRPCErrorFromUnknown"); + TRPCError = /* @__PURE__ */ __name(class extends Error { + constructor(opts) { + var _ref, _opts$message, _this$cause; + const cause = getCauseFromUnknown(opts.cause); + const message2 = (_ref = (_opts$message = opts.message) !== null && _opts$message !== void 0 ? _opts$message : cause === null || cause === void 0 ? void 0 : cause.message) !== null && _ref !== void 0 ? _ref : opts.code; + super(message2, { cause }); + (0, import_defineProperty.default)(this, "cause", void 0); + (0, import_defineProperty.default)(this, "code", void 0); + this.code = opts.code; + this.name = "TRPCError"; + (_this$cause = this.cause) !== null && _this$cause !== void 0 || (this.cause = cause); + } + }, "TRPCError"); + import_objectSpread2$1 = __toESM2(require_objectSpread2(), 1); + __name(getDataTransformer, "getDataTransformer"); + defaultTransformer = { + input: { + serialize: (obj) => obj, + deserialize: (obj) => obj + }, + output: { + serialize: (obj) => obj, + deserialize: (obj) => obj + } + }; + __name(transformTRPCResponseItem, "transformTRPCResponseItem"); + __name(transformTRPCResponse, "transformTRPCResponse"); + import_objectSpread22 = __toESM2(require_objectSpread2(), 1); + lazyMarker = "lazyMarker"; + __name(once2, "once"); + __name(isLazy, "isLazy"); + __name(isRouter, "isRouter"); + emptyRouter = { + _ctx: null, + _errorShape: null, + _meta: null, + queries: {}, + mutations: {}, + subscriptions: {}, + errorFormatter: defaultFormatter, + transformer: defaultTransformer + }; + reservedWords = [ + "then", + "call", + "apply" + ]; + __name(createRouterFactory, "createRouterFactory"); + __name(isProcedure, "isProcedure"); + __name(getProcedureAtPath, "getProcedureAtPath"); + __name(createCallerFactory, "createCallerFactory"); + __name(mergeRouters, "mergeRouters"); + trackedSymbol = Symbol(); + __name(isTrackedEnvelope, "isTrackedEnvelope"); + } +}); + +// ../../node_modules/@trpc/server/dist/observable-UMO3vUa_.mjs +function isObservable(x2) { + return typeof x2 === "object" && x2 !== null && "subscribe" in x2; +} +function observableToReadableStream(observable$1, signal) { + let unsub = null; + const onAbort = /* @__PURE__ */ __name(() => { + unsub === null || unsub === void 0 || unsub.unsubscribe(); + unsub = null; + signal.removeEventListener("abort", onAbort); + }, "onAbort"); + return new ReadableStream({ + start(controller) { + unsub = observable$1.subscribe({ + next(data) { + controller.enqueue({ + ok: true, + value: data + }); + }, + error(error50) { + controller.enqueue({ + ok: false, + error: error50 + }); + controller.close(); + }, + complete() { + controller.close(); + } + }); + if (signal.aborted) + onAbort(); + else + signal.addEventListener("abort", onAbort, { once: true }); + }, + cancel() { + onAbort(); + } + }); +} +function observableToAsyncIterable(observable$1, signal) { + const stream = observableToReadableStream(observable$1, signal); + const reader = stream.getReader(); + const iterator2 = { + async next() { + const value = await reader.read(); + if (value.done) + return { + value: void 0, + done: true + }; + const { value: result } = value; + if (!result.ok) + throw result.error; + return { + value: result.value, + done: false + }; + }, + async return() { + await reader.cancel(); + return { + value: void 0, + done: true + }; + } + }; + return { [Symbol.asyncIterator]() { + return iterator2; + } }; +} +var init_observable_UMO3vUa = __esm({ + "../../node_modules/@trpc/server/dist/observable-UMO3vUa_.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(isObservable, "isObservable"); + __name(observableToReadableStream, "observableToReadableStream"); + __name(observableToAsyncIterable, "observableToAsyncIterable"); + } +}); + +// ../../node_modules/@trpc/server/dist/resolveResponse-CHqBlAgR.mjs +function parseConnectionParamsFromUnknown(parsed) { + try { + if (parsed === null) + return null; + if (!isObject(parsed)) + throw new Error("Expected object"); + const nonStringValues = Object.entries(parsed).filter(([_key2, value]) => typeof value !== "string"); + if (nonStringValues.length > 0) + throw new Error(`Expected connectionParams to be string values. Got ${nonStringValues.map(([key, value]) => `${key}: ${typeof value}`).join(", ")}`); + return parsed; + } catch (cause) { + throw new TRPCError({ + code: "PARSE_ERROR", + message: "Invalid connection params shape", + cause + }); + } +} +function parseConnectionParamsFromString(str) { + let parsed; + try { + parsed = JSON.parse(str); + } catch (cause) { + throw new TRPCError({ + code: "PARSE_ERROR", + message: "Not JSON-parsable query params", + cause + }); + } + return parseConnectionParamsFromUnknown(parsed); +} +function getAcceptHeader(headers) { + var _ref, _headers$get; + return (_ref = headers.get("trpc-accept")) !== null && _ref !== void 0 ? _ref : ((_headers$get = headers.get("accept")) === null || _headers$get === void 0 ? void 0 : _headers$get.split(",").some((t9) => t9.trim() === "application/jsonl")) ? "application/jsonl" : null; +} +function memo(fn) { + let promise2 = null; + const sym = Symbol.for("@trpc/server/http/memo"); + let value = sym; + return { + read: async () => { + var _promise2; + if (value !== sym) + return value; + (_promise2 = promise2) !== null && _promise2 !== void 0 || (promise2 = fn().catch((cause) => { + if (cause instanceof TRPCError) + throw cause; + throw new TRPCError({ + code: "BAD_REQUEST", + message: cause instanceof Error ? cause.message : "Invalid input", + cause + }); + })); + value = await promise2; + promise2 = null; + return value; + }, + result: () => { + return value !== sym ? value : void 0; + } + }; +} +function getContentTypeHandler(req) { + const handler = handlers.find((handler$1) => handler$1.isMatch(req)); + if (handler) + return handler; + if (!handler && req.method === "GET") + return jsonContentTypeHandler; + throw new TRPCError({ + code: "UNSUPPORTED_MEDIA_TYPE", + message: req.headers.has("content-type") ? `Unsupported content-type "${req.headers.get("content-type")}` : "Missing content-type header" + }); +} +async function getRequestInfo(opts) { + const handler = getContentTypeHandler(opts.req); + return await handler.parse(opts); +} +function isAbortError(error50) { + return isObject(error50) && error50["name"] === "AbortError"; +} +function throwAbortError(message2 = "AbortError") { + throw new DOMException(message2, "AbortError"); +} +function isObject$1(o2) { + return Object.prototype.toString.call(o2) === "[object Object]"; +} +function isPlainObject(o2) { + var ctor, prot; + if (isObject$1(o2) === false) + return false; + ctor = o2.constructor; + if (ctor === void 0) + return true; + prot = ctor.prototype; + if (isObject$1(prot) === false) + return false; + if (prot.hasOwnProperty("isPrototypeOf") === false) + return false; + return true; +} +function resolveSelfTuple(promise2) { + return Unpromise.proxy(promise2).then(() => [promise2]); +} +function withResolvers() { + let resolve; + let reject; + const promise2 = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + return { + promise: promise2, + resolve, + reject + }; +} +function listWithMember(arr, member2) { + return [...arr, member2]; +} +function listWithoutIndex(arr, index) { + return [...arr.slice(0, index), ...arr.slice(index + 1)]; +} +function listWithoutMember(arr, member2) { + const index = arr.indexOf(member2); + if (index !== -1) + return listWithoutIndex(arr, index); + return arr; +} +function makeResource(thing, dispose) { + const it = thing; + const existing = it[Symbol.dispose]; + it[Symbol.dispose] = () => { + dispose(); + existing === null || existing === void 0 || existing(); + }; + return it; +} +function makeAsyncResource(thing, dispose) { + const it = thing; + const existing = it[Symbol.asyncDispose]; + it[Symbol.asyncDispose] = async () => { + await dispose(); + await (existing === null || existing === void 0 ? void 0 : existing()); + }; + return it; +} +function timerResource(ms) { + let timer = null; + return makeResource({ start() { + if (timer) + throw new Error("Timer already started"); + const promise2 = new Promise((resolve) => { + timer = setTimeout(() => resolve(disposablePromiseTimerResult), ms); + }); + return promise2; + } }, () => { + if (timer) + clearTimeout(timer); + }); +} +function iteratorResource(iterable) { + const iterator2 = iterable[Symbol.asyncIterator](); + if (iterator2[Symbol.asyncDispose]) + return iterator2; + return makeAsyncResource(iterator2, async () => { + var _iterator$return; + await ((_iterator$return = iterator2.return) === null || _iterator$return === void 0 ? void 0 : _iterator$return.call(iterator2)); + }); +} +function takeWithGrace(_x2, _x22) { + return _takeWithGrace.apply(this, arguments); +} +function _takeWithGrace() { + _takeWithGrace = (0, import_wrapAsyncGenerator$5.default)(function* (iterable, opts) { + try { + var _usingCtx$1 = (0, import_usingCtx$4.default)(); + const iterator2 = _usingCtx$1.a(iteratorResource(iterable)); + let result; + const timer = _usingCtx$1.u(timerResource(opts.gracePeriodMs)); + let count4 = opts.count; + let timerPromise = new Promise(() => { + }); + while (true) { + result = yield (0, import_awaitAsyncGenerator$4.default)(Unpromise.race([iterator2.next(), timerPromise])); + if (result === disposablePromiseTimerResult) + throwAbortError(); + if (result.done) + return result.value; + yield result.value; + if (--count4 === 0) + timerPromise = timer.start(); + result = null; + } + } catch (_) { + _usingCtx$1.e = _; + } finally { + yield (0, import_awaitAsyncGenerator$4.default)(_usingCtx$1.d()); + } + }); + return _takeWithGrace.apply(this, arguments); +} +function createDeferred() { + let resolve; + let reject; + const promise2 = new Promise((res, rej) => { + resolve = res; + reject = rej; + }); + return { + promise: promise2, + resolve, + reject + }; +} +function createManagedIterator(iterable, onResult) { + const iterator2 = iterable[Symbol.asyncIterator](); + let state = "idle"; + function cleanup() { + state = "done"; + onResult = /* @__PURE__ */ __name(() => { + }, "onResult"); + } + __name(cleanup, "cleanup"); + function pull() { + if (state !== "idle") + return; + state = "pending"; + const next = iterator2.next(); + next.then((result) => { + if (result.done) { + state = "done"; + onResult({ + status: "return", + value: result.value + }); + cleanup(); + return; + } + state = "idle"; + onResult({ + status: "yield", + value: result.value + }); + }).catch((cause) => { + onResult({ + status: "error", + error: cause + }); + cleanup(); + }); + } + __name(pull, "pull"); + return { + pull, + destroy: async () => { + var _iterator$return; + cleanup(); + await ((_iterator$return = iterator2.return) === null || _iterator$return === void 0 ? void 0 : _iterator$return.call(iterator2)); + } + }; +} +function mergeAsyncIterables() { + let state = "idle"; + let flushSignal = createDeferred(); + const iterables = []; + const iterators = /* @__PURE__ */ new Set(); + const buffer = []; + function initIterable(iterable) { + if (state !== "pending") + return; + const iterator2 = createManagedIterator(iterable, (result) => { + if (state !== "pending") + return; + switch (result.status) { + case "yield": + buffer.push([iterator2, result]); + break; + case "return": + iterators.delete(iterator2); + break; + case "error": + buffer.push([iterator2, result]); + iterators.delete(iterator2); + break; + } + flushSignal.resolve(); + }); + iterators.add(iterator2); + iterator2.pull(); + } + __name(initIterable, "initIterable"); + return { + add(iterable) { + switch (state) { + case "idle": + iterables.push(iterable); + break; + case "pending": + initIterable(iterable); + break; + case "done": + break; + } + }, + [Symbol.asyncIterator]() { + return (0, import_wrapAsyncGenerator$4.default)(function* () { + try { + var _usingCtx$1 = (0, import_usingCtx$3.default)(); + if (state !== "idle") + throw new Error("Cannot iterate twice"); + state = "pending"; + const _finally = _usingCtx$1.a(makeAsyncResource({}, async () => { + state = "done"; + const errors = []; + await Promise.all(Array.from(iterators.values()).map(async (it) => { + try { + await it.destroy(); + } catch (cause) { + errors.push(cause); + } + })); + buffer.length = 0; + iterators.clear(); + flushSignal.resolve(); + if (errors.length > 0) + throw new AggregateError(errors); + })); + while (iterables.length > 0) + initIterable(iterables.shift()); + while (iterators.size > 0) { + yield (0, import_awaitAsyncGenerator$3.default)(flushSignal.promise); + while (buffer.length > 0) { + const [iterator2, result] = buffer.shift(); + switch (result.status) { + case "yield": + yield result.value; + iterator2.pull(); + break; + case "error": + throw result.error; + } + } + flushSignal = createDeferred(); + } + } catch (_) { + _usingCtx$1.e = _; + } finally { + yield (0, import_awaitAsyncGenerator$3.default)(_usingCtx$1.d()); + } + })(); + } + }; +} +function readableStreamFrom(iterable) { + const iterator2 = iterable[Symbol.asyncIterator](); + return new ReadableStream({ + async cancel() { + var _iterator$return; + await ((_iterator$return = iterator2.return) === null || _iterator$return === void 0 ? void 0 : _iterator$return.call(iterator2)); + }, + async pull(controller) { + const result = await iterator2.next(); + if (result.done) { + controller.close(); + return; + } + controller.enqueue(result.value); + } + }); +} +function withPing(_x2, _x22) { + return _withPing.apply(this, arguments); +} +function _withPing() { + _withPing = (0, import_wrapAsyncGenerator$3.default)(function* (iterable, pingIntervalMs) { + try { + var _usingCtx$1 = (0, import_usingCtx$2.default)(); + const iterator2 = _usingCtx$1.a(iteratorResource(iterable)); + let result; + let nextPromise = iterator2.next(); + while (true) + try { + var _usingCtx3 = (0, import_usingCtx$2.default)(); + const pingPromise = _usingCtx3.u(timerResource(pingIntervalMs)); + result = yield (0, import_awaitAsyncGenerator$2.default)(Unpromise.race([nextPromise, pingPromise.start()])); + if (result === disposablePromiseTimerResult) { + yield PING_SYM; + continue; + } + if (result.done) + return result.value; + nextPromise = iterator2.next(); + yield result.value; + result = null; + } catch (_) { + _usingCtx3.e = _; + } finally { + _usingCtx3.d(); + } + } catch (_) { + _usingCtx$1.e = _; + } finally { + yield (0, import_awaitAsyncGenerator$2.default)(_usingCtx$1.d()); + } + }); + return _withPing.apply(this, arguments); +} +function isPromise(value) { + return (isObject(value) || isFunction(value)) && typeof (value === null || value === void 0 ? void 0 : value["then"]) === "function" && typeof (value === null || value === void 0 ? void 0 : value["catch"]) === "function"; +} +function createBatchStreamProducer(_x3) { + return _createBatchStreamProducer.apply(this, arguments); +} +function _createBatchStreamProducer() { + _createBatchStreamProducer = (0, import_wrapAsyncGenerator$2.default)(function* (opts) { + const { data } = opts; + let counter = 0; + const placeholder = 0; + const mergedIterables = mergeAsyncIterables(); + function registerAsync(callback) { + const idx = counter++; + const iterable$1 = callback(idx); + mergedIterables.add(iterable$1); + return idx; + } + __name(registerAsync, "registerAsync"); + function encodePromise(promise2, path) { + return registerAsync(/* @__PURE__ */ function() { + var _ref = (0, import_wrapAsyncGenerator$2.default)(function* (idx) { + const error50 = checkMaxDepth(path); + if (error50) { + promise2.catch((cause) => { + var _opts$onError; + (_opts$onError = opts.onError) === null || _opts$onError === void 0 || _opts$onError.call(opts, { + error: cause, + path + }); + }); + promise2 = Promise.reject(error50); + } + try { + const next = yield (0, import_awaitAsyncGenerator$1.default)(promise2); + yield [ + idx, + PROMISE_STATUS_FULFILLED, + encode7(next, path) + ]; + } catch (cause) { + var _opts$onError2, _opts$formatError; + (_opts$onError2 = opts.onError) === null || _opts$onError2 === void 0 || _opts$onError2.call(opts, { + error: cause, + path + }); + yield [ + idx, + PROMISE_STATUS_REJECTED, + (_opts$formatError = opts.formatError) === null || _opts$formatError === void 0 ? void 0 : _opts$formatError.call(opts, { + error: cause, + path + }) + ]; + } + }); + return function(_x2) { + return _ref.apply(this, arguments); + }; + }()); + } + __name(encodePromise, "encodePromise"); + function encodeAsyncIterable(iterable$1, path) { + return registerAsync(/* @__PURE__ */ function() { + var _ref2 = (0, import_wrapAsyncGenerator$2.default)(function* (idx) { + try { + var _usingCtx$1 = (0, import_usingCtx$1.default)(); + const error50 = checkMaxDepth(path); + if (error50) + throw error50; + const iterator2 = _usingCtx$1.a(iteratorResource(iterable$1)); + try { + while (true) { + const next = yield (0, import_awaitAsyncGenerator$1.default)(iterator2.next()); + if (next.done) { + yield [ + idx, + ASYNC_ITERABLE_STATUS_RETURN, + encode7(next.value, path) + ]; + break; + } + yield [ + idx, + ASYNC_ITERABLE_STATUS_YIELD, + encode7(next.value, path) + ]; + } + } catch (cause) { + var _opts$onError3, _opts$formatError2; + (_opts$onError3 = opts.onError) === null || _opts$onError3 === void 0 || _opts$onError3.call(opts, { + error: cause, + path + }); + yield [ + idx, + ASYNC_ITERABLE_STATUS_ERROR, + (_opts$formatError2 = opts.formatError) === null || _opts$formatError2 === void 0 ? void 0 : _opts$formatError2.call(opts, { + error: cause, + path + }) + ]; + } + } catch (_) { + _usingCtx$1.e = _; + } finally { + yield (0, import_awaitAsyncGenerator$1.default)(_usingCtx$1.d()); + } + }); + return function(_x2) { + return _ref2.apply(this, arguments); + }; + }()); + } + __name(encodeAsyncIterable, "encodeAsyncIterable"); + function checkMaxDepth(path) { + if (opts.maxDepth && path.length > opts.maxDepth) + return new MaxDepthError(path); + return null; + } + __name(checkMaxDepth, "checkMaxDepth"); + function encodeAsync3(value, path) { + if (isPromise(value)) + return [CHUNK_VALUE_TYPE_PROMISE, encodePromise(value, path)]; + if (isAsyncIterable(value)) { + if (opts.maxDepth && path.length >= opts.maxDepth) + throw new Error("Max depth reached"); + return [CHUNK_VALUE_TYPE_ASYNC_ITERABLE, encodeAsyncIterable(value, path)]; + } + return null; + } + __name(encodeAsync3, "encodeAsync"); + function encode7(value, path) { + if (value === void 0) + return [[]]; + const reg = encodeAsync3(value, path); + if (reg) + return [[placeholder], [null, ...reg]]; + if (!isPlainObject(value)) + return [[value]]; + const newObj = emptyObject(); + const asyncValues = []; + for (const [key, item] of Object.entries(value)) { + const transformed = encodeAsync3(item, [...path, key]); + if (!transformed) { + newObj[key] = item; + continue; + } + newObj[key] = placeholder; + asyncValues.push([key, ...transformed]); + } + return [[newObj], ...asyncValues]; + } + __name(encode7, "encode"); + const newHead = emptyObject(); + for (const [key, item] of Object.entries(data)) + newHead[key] = encode7(item, [key]); + yield newHead; + let iterable = mergedIterables; + if (opts.pingMs) + iterable = withPing(mergedIterables, opts.pingMs); + var _iteratorAbruptCompletion = false; + var _didIteratorError = false; + var _iteratorError; + try { + for (var _iterator = (0, import_asyncIterator$1.default)(iterable), _step; _iteratorAbruptCompletion = !(_step = yield (0, import_awaitAsyncGenerator$1.default)(_iterator.next())).done; _iteratorAbruptCompletion = false) { + const value = _step.value; + yield value; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (_iteratorAbruptCompletion && _iterator.return != null) + yield (0, import_awaitAsyncGenerator$1.default)(_iterator.return()); + } finally { + if (_didIteratorError) + throw _iteratorError; + } + } + }); + return _createBatchStreamProducer.apply(this, arguments); +} +function jsonlStreamProducer(opts) { + let stream = readableStreamFrom(createBatchStreamProducer(opts)); + const { serialize } = opts; + if (serialize) + stream = stream.pipeThrough(new TransformStream({ transform(chunk, controller) { + if (chunk === PING_SYM) + controller.enqueue(PING_SYM); + else + controller.enqueue(serialize(chunk)); + } })); + return stream.pipeThrough(new TransformStream({ transform(chunk, controller) { + if (chunk === PING_SYM) + controller.enqueue(" "); + else + controller.enqueue(JSON.stringify(chunk) + "\n"); + } })).pipeThrough(new TextEncoderStream()); +} +function sseStreamProducer(opts) { + var _opts$ping$enabled, _opts$ping, _opts$ping$intervalMs, _opts$ping2, _opts$client; + const { serialize = identity } = opts; + const ping = { + enabled: (_opts$ping$enabled = (_opts$ping = opts.ping) === null || _opts$ping === void 0 ? void 0 : _opts$ping.enabled) !== null && _opts$ping$enabled !== void 0 ? _opts$ping$enabled : false, + intervalMs: (_opts$ping$intervalMs = (_opts$ping2 = opts.ping) === null || _opts$ping2 === void 0 ? void 0 : _opts$ping2.intervalMs) !== null && _opts$ping$intervalMs !== void 0 ? _opts$ping$intervalMs : 1e3 + }; + const client = (_opts$client = opts.client) !== null && _opts$client !== void 0 ? _opts$client : {}; + if (ping.enabled && client.reconnectAfterInactivityMs && ping.intervalMs > client.reconnectAfterInactivityMs) + throw new Error(`Ping interval must be less than client reconnect interval to prevent unnecessary reconnection - ping.intervalMs: ${ping.intervalMs} client.reconnectAfterInactivityMs: ${client.reconnectAfterInactivityMs}`); + function generator() { + return _generator.apply(this, arguments); + } + __name(generator, "generator"); + function _generator() { + _generator = (0, import_wrapAsyncGenerator$1.default)(function* () { + yield { + event: CONNECTED_EVENT, + data: JSON.stringify(client) + }; + let iterable = opts.data; + if (opts.emitAndEndImmediately) + iterable = takeWithGrace(iterable, { + count: 1, + gracePeriodMs: 1 + }); + if (ping.enabled && ping.intervalMs !== Infinity && ping.intervalMs > 0) + iterable = withPing(iterable, ping.intervalMs); + let value; + let chunk; + var _iteratorAbruptCompletion = false; + var _didIteratorError = false; + var _iteratorError; + try { + for (var _iterator = (0, import_asyncIterator.default)(iterable), _step; _iteratorAbruptCompletion = !(_step = yield (0, import_awaitAsyncGenerator.default)(_iterator.next())).done; _iteratorAbruptCompletion = false) { + value = _step.value; + { + if (value === PING_SYM) { + yield { + event: PING_EVENT, + data: "" + }; + continue; + } + chunk = isTrackedEnvelope(value) ? { + id: value[0], + data: value[1] + } : { data: value }; + chunk.data = JSON.stringify(serialize(chunk.data)); + yield chunk; + value = null; + chunk = null; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (_iteratorAbruptCompletion && _iterator.return != null) + yield (0, import_awaitAsyncGenerator.default)(_iterator.return()); + } finally { + if (_didIteratorError) + throw _iteratorError; + } + } + }); + return _generator.apply(this, arguments); + } + __name(_generator, "_generator"); + function generatorWithErrorHandling() { + return _generatorWithErrorHandling.apply(this, arguments); + } + __name(generatorWithErrorHandling, "generatorWithErrorHandling"); + function _generatorWithErrorHandling() { + _generatorWithErrorHandling = (0, import_wrapAsyncGenerator$1.default)(function* () { + try { + yield* (0, import_asyncGeneratorDelegate.default)((0, import_asyncIterator.default)(generator())); + yield { + event: RETURN_EVENT, + data: "" + }; + } catch (cause) { + var _opts$formatError, _opts$formatError2; + if (isAbortError(cause)) + return; + const error50 = getTRPCErrorFromUnknown(cause); + const data = (_opts$formatError = (_opts$formatError2 = opts.formatError) === null || _opts$formatError2 === void 0 ? void 0 : _opts$formatError2.call(opts, { error: error50 })) !== null && _opts$formatError !== void 0 ? _opts$formatError : null; + yield { + event: SERIALIZED_ERROR_EVENT, + data: JSON.stringify(serialize(data)) + }; + } + }); + return _generatorWithErrorHandling.apply(this, arguments); + } + __name(_generatorWithErrorHandling, "_generatorWithErrorHandling"); + const stream = readableStreamFrom(generatorWithErrorHandling()); + return stream.pipeThrough(new TransformStream({ transform(chunk, controller) { + if ("event" in chunk) + controller.enqueue(`event: ${chunk.event} +`); + if ("data" in chunk) + controller.enqueue(`data: ${chunk.data} +`); + if ("id" in chunk) + controller.enqueue(`id: ${chunk.id} +`); + if ("comment" in chunk) + controller.enqueue(`: ${chunk.comment} +`); + controller.enqueue("\n\n"); + } })).pipeThrough(new TextEncoderStream()); +} +function errorToAsyncIterable(err) { + return run((0, import_wrapAsyncGenerator.default)(function* () { + throw err; + })); +} +function combinedAbortController(signal) { + const controller = new AbortController(); + const combinedSignal = abortSignalsAnyPonyfill([signal, controller.signal]); + return { + signal: combinedSignal, + controller + }; +} +function initResponse(initOpts) { + var _responseMeta, _info$calls$find$proc, _info$calls$find; + const { ctx, info: info3, responseMeta, untransformedJSON, errors = [], headers } = initOpts; + let status = untransformedJSON ? getHTTPStatusCode(untransformedJSON) : 200; + const eagerGeneration = !untransformedJSON; + const data = eagerGeneration ? [] : Array.isArray(untransformedJSON) ? untransformedJSON : [untransformedJSON]; + const meta3 = (_responseMeta = responseMeta === null || responseMeta === void 0 ? void 0 : responseMeta({ + ctx, + info: info3, + paths: info3 === null || info3 === void 0 ? void 0 : info3.calls.map((call) => call.path), + data, + errors, + eagerGeneration, + type: (_info$calls$find$proc = info3 === null || info3 === void 0 || (_info$calls$find = info3.calls.find((call) => { + var _call$procedure; + return (_call$procedure = call.procedure) === null || _call$procedure === void 0 ? void 0 : _call$procedure._def.type; + })) === null || _info$calls$find === void 0 || (_info$calls$find = _info$calls$find.procedure) === null || _info$calls$find === void 0 ? void 0 : _info$calls$find._def.type) !== null && _info$calls$find$proc !== void 0 ? _info$calls$find$proc : "unknown" + })) !== null && _responseMeta !== void 0 ? _responseMeta : {}; + if (meta3.headers) { + if (meta3.headers instanceof Headers) + for (const [key, value] of meta3.headers.entries()) + headers.append(key, value); + else + for (const [key, value] of Object.entries(meta3.headers)) + if (Array.isArray(value)) + for (const v3 of value) + headers.append(key, v3); + else if (typeof value === "string") + headers.set(key, value); + } + if (meta3.status) + status = meta3.status; + return { status }; +} +function caughtErrorToData(cause, errorOpts) { + const { router: router8, req, onError } = errorOpts.opts; + const error50 = getTRPCErrorFromUnknown(cause); + onError === null || onError === void 0 || onError({ + error: error50, + path: errorOpts.path, + input: errorOpts.input, + ctx: errorOpts.ctx, + type: errorOpts.type, + req + }); + const untransformedJSON = { error: getErrorShape({ + config: router8._def._config, + error: error50, + type: errorOpts.type, + path: errorOpts.path, + input: errorOpts.input, + ctx: errorOpts.ctx + }) }; + const transformedJSON = transformTRPCResponse(router8._def._config, untransformedJSON); + const body = JSON.stringify(transformedJSON); + return { + error: error50, + untransformedJSON, + body + }; +} +function isDataStream(v3) { + if (!isObject(v3)) + return false; + if (isAsyncIterable(v3)) + return true; + return Object.values(v3).some(isPromise) || Object.values(v3).some(isAsyncIterable); +} +async function resolveResponse(opts) { + var _ref, _opts$allowBatching, _opts$batching, _opts$allowMethodOver, _config$sse$enabled, _config$sse; + const { router: router8, req } = opts; + const headers = new Headers([["vary", "trpc-accept, accept"]]); + const config3 = router8._def._config; + const url2 = new URL(req.url); + if (req.method === "HEAD") + return new Response(null, { status: 204 }); + const allowBatching = (_ref = (_opts$allowBatching = opts.allowBatching) !== null && _opts$allowBatching !== void 0 ? _opts$allowBatching : (_opts$batching = opts.batching) === null || _opts$batching === void 0 ? void 0 : _opts$batching.enabled) !== null && _ref !== void 0 ? _ref : true; + const allowMethodOverride = ((_opts$allowMethodOver = opts.allowMethodOverride) !== null && _opts$allowMethodOver !== void 0 ? _opts$allowMethodOver : false) && req.method === "POST"; + const infoTuple = await run(async () => { + try { + return [void 0, await getRequestInfo({ + req, + path: decodeURIComponent(opts.path), + router: router8, + searchParams: url2.searchParams, + headers: opts.req.headers, + url: url2 + })]; + } catch (cause) { + return [getTRPCErrorFromUnknown(cause), void 0]; + } + }); + const ctxManager = run(() => { + let result = void 0; + return { + valueOrUndefined: () => { + if (!result) + return void 0; + return result[1]; + }, + value: () => { + const [err, ctx] = result; + if (err) + throw err; + return ctx; + }, + create: async (info3) => { + if (result) + throw new Error("This should only be called once - report a bug in tRPC"); + try { + const ctx = await opts.createContext({ info: info3 }); + result = [void 0, ctx]; + } catch (cause) { + result = [getTRPCErrorFromUnknown(cause), void 0]; + } + } + }; + }); + const methodMapper = allowMethodOverride ? TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE : TYPE_ACCEPTED_METHOD_MAP; + const isStreamCall = getAcceptHeader(req.headers) === "application/jsonl"; + const experimentalSSE = (_config$sse$enabled = (_config$sse = config3.sse) === null || _config$sse === void 0 ? void 0 : _config$sse.enabled) !== null && _config$sse$enabled !== void 0 ? _config$sse$enabled : true; + try { + const [infoError, info3] = infoTuple; + if (infoError) + throw infoError; + if (info3.isBatchCall && !allowBatching) + throw new TRPCError({ + code: "BAD_REQUEST", + message: `Batching is not enabled on the server` + }); + if (isStreamCall && !info3.isBatchCall) + throw new TRPCError({ + message: `Streaming requests must be batched (you can do a batch of 1)`, + code: "BAD_REQUEST" + }); + await ctxManager.create(info3); + const rpcCalls = info3.calls.map(async (call) => { + const proc = call.procedure; + const combinedAbort = combinedAbortController(opts.req.signal); + try { + if (opts.error) + throw opts.error; + if (!proc) + throw new TRPCError({ + code: "NOT_FOUND", + message: `No procedure found on path "${call.path}"` + }); + if (!methodMapper[proc._def.type].includes(req.method)) + throw new TRPCError({ + code: "METHOD_NOT_SUPPORTED", + message: `Unsupported ${req.method}-request to ${proc._def.type} procedure at path "${call.path}"` + }); + if (proc._def.type === "subscription") { + var _config$sse2; + if (info3.isBatchCall) + throw new TRPCError({ + code: "BAD_REQUEST", + message: `Cannot batch subscription calls` + }); + if ((_config$sse2 = config3.sse) === null || _config$sse2 === void 0 ? void 0 : _config$sse2.maxDurationMs) { + let cleanup = function() { + clearTimeout(timer); + combinedAbort.signal.removeEventListener("abort", cleanup); + combinedAbort.controller.abort(); + }; + __name(cleanup, "cleanup"); + const timer = setTimeout(cleanup, config3.sse.maxDurationMs); + combinedAbort.signal.addEventListener("abort", cleanup); + } + } + const data = await proc({ + path: call.path, + getRawInput: call.getRawInput, + ctx: ctxManager.value(), + type: proc._def.type, + signal: combinedAbort.signal, + batchIndex: call.batchIndex + }); + return [void 0, { + data, + signal: proc._def.type === "subscription" ? combinedAbort.signal : void 0 + }]; + } catch (cause) { + var _opts$onError, _call$procedure$_def$, _call$procedure2; + const error50 = getTRPCErrorFromUnknown(cause); + const input = call.result(); + (_opts$onError = opts.onError) === null || _opts$onError === void 0 || _opts$onError.call(opts, { + error: error50, + path: call.path, + input, + ctx: ctxManager.valueOrUndefined(), + type: (_call$procedure$_def$ = (_call$procedure2 = call.procedure) === null || _call$procedure2 === void 0 ? void 0 : _call$procedure2._def.type) !== null && _call$procedure$_def$ !== void 0 ? _call$procedure$_def$ : "unknown", + req: opts.req + }); + return [error50, void 0]; + } + }); + if (!info3.isBatchCall) { + const [call] = info3.calls; + const [error50, result] = await rpcCalls[0]; + switch (info3.type) { + case "unknown": + case "mutation": + case "query": { + headers.set("content-type", "application/json"); + if (isDataStream(result === null || result === void 0 ? void 0 : result.data)) + throw new TRPCError({ + code: "UNSUPPORTED_MEDIA_TYPE", + message: "Cannot use stream-like response in non-streaming request - use httpBatchStreamLink" + }); + const res = error50 ? { error: getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error50, + input: call.result(), + path: call.path, + type: info3.type + }) } : { result: { data: result.data } }; + const headResponse$1 = initResponse({ + ctx: ctxManager.valueOrUndefined(), + info: info3, + responseMeta: opts.responseMeta, + errors: error50 ? [error50] : [], + headers, + untransformedJSON: [res] + }); + return new Response(JSON.stringify(transformTRPCResponse(config3, res)), { + status: headResponse$1.status, + headers + }); + } + case "subscription": { + const iterable = run(() => { + if (error50) + return errorToAsyncIterable(error50); + if (!experimentalSSE) + return errorToAsyncIterable(new TRPCError({ + code: "METHOD_NOT_SUPPORTED", + message: 'Missing experimental flag "sseSubscriptions"' + })); + if (!isObservable(result.data) && !isAsyncIterable(result.data)) + return errorToAsyncIterable(new TRPCError({ + message: `Subscription ${call.path} did not return an observable or a AsyncGenerator`, + code: "INTERNAL_SERVER_ERROR" + })); + const dataAsIterable = isObservable(result.data) ? observableToAsyncIterable(result.data, opts.req.signal) : result.data; + return dataAsIterable; + }); + const stream = sseStreamProducer((0, import_objectSpread23.default)((0, import_objectSpread23.default)({}, config3.sse), {}, { + data: iterable, + serialize: (v3) => config3.transformer.output.serialize(v3), + formatError(errorOpts) { + var _call$procedure$_def$2, _call$procedure3, _opts$onError2; + const error$1 = getTRPCErrorFromUnknown(errorOpts.error); + const input = call === null || call === void 0 ? void 0 : call.result(); + const path = call === null || call === void 0 ? void 0 : call.path; + const type = (_call$procedure$_def$2 = call === null || call === void 0 || (_call$procedure3 = call.procedure) === null || _call$procedure3 === void 0 ? void 0 : _call$procedure3._def.type) !== null && _call$procedure$_def$2 !== void 0 ? _call$procedure$_def$2 : "unknown"; + (_opts$onError2 = opts.onError) === null || _opts$onError2 === void 0 || _opts$onError2.call(opts, { + error: error$1, + path, + input, + ctx: ctxManager.valueOrUndefined(), + req: opts.req, + type + }); + const shape = getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error$1, + input, + path, + type + }); + return shape; + } + })); + for (const [key, value] of Object.entries(sseHeaders)) + headers.set(key, value); + const headResponse$1 = initResponse({ + ctx: ctxManager.valueOrUndefined(), + info: info3, + responseMeta: opts.responseMeta, + errors: [], + headers, + untransformedJSON: null + }); + const abortSignal = result === null || result === void 0 ? void 0 : result.signal; + let responseBody = stream; + if (abortSignal) { + const reader = stream.getReader(); + const onAbort = /* @__PURE__ */ __name(() => void reader.cancel(), "onAbort"); + if (abortSignal.aborted) + onAbort(); + else + abortSignal.addEventListener("abort", onAbort, { once: true }); + responseBody = new ReadableStream({ + async pull(controller) { + const chunk = await reader.read(); + if (chunk.done) { + abortSignal.removeEventListener("abort", onAbort); + controller.close(); + } else + controller.enqueue(chunk.value); + }, + cancel() { + abortSignal.removeEventListener("abort", onAbort); + return reader.cancel(); + } + }); + } + return new Response(responseBody, { + headers, + status: headResponse$1.status + }); + } + } + } + if (info3.accept === "application/jsonl") { + headers.set("content-type", "application/json"); + headers.set("transfer-encoding", "chunked"); + const headResponse$1 = initResponse({ + ctx: ctxManager.valueOrUndefined(), + info: info3, + responseMeta: opts.responseMeta, + errors: [], + headers, + untransformedJSON: null + }); + const stream = jsonlStreamProducer((0, import_objectSpread23.default)((0, import_objectSpread23.default)({}, config3.jsonl), {}, { + maxDepth: Infinity, + data: rpcCalls.map(async (res) => { + const [error50, result] = await res; + const call = info3.calls[0]; + if (error50) { + var _procedure$_def$type, _procedure; + return { error: getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error50, + input: call.result(), + path: call.path, + type: (_procedure$_def$type = (_procedure = call.procedure) === null || _procedure === void 0 ? void 0 : _procedure._def.type) !== null && _procedure$_def$type !== void 0 ? _procedure$_def$type : "unknown" + }) }; + } + const iterable = isObservable(result.data) ? observableToAsyncIterable(result.data, opts.req.signal) : Promise.resolve(result.data); + return { result: Promise.resolve({ data: iterable }) }; + }), + serialize: (data) => config3.transformer.output.serialize(data), + onError: (cause) => { + var _opts$onError3, _info$type; + (_opts$onError3 = opts.onError) === null || _opts$onError3 === void 0 || _opts$onError3.call(opts, { + error: getTRPCErrorFromUnknown(cause), + path: void 0, + input: void 0, + ctx: ctxManager.valueOrUndefined(), + req: opts.req, + type: (_info$type = info3 === null || info3 === void 0 ? void 0 : info3.type) !== null && _info$type !== void 0 ? _info$type : "unknown" + }); + }, + formatError(errorOpts) { + var _call$procedure$_def$3, _call$procedure4; + const call = info3 === null || info3 === void 0 ? void 0 : info3.calls[errorOpts.path[0]]; + const error50 = getTRPCErrorFromUnknown(errorOpts.error); + const input = call === null || call === void 0 ? void 0 : call.result(); + const path = call === null || call === void 0 ? void 0 : call.path; + const type = (_call$procedure$_def$3 = call === null || call === void 0 || (_call$procedure4 = call.procedure) === null || _call$procedure4 === void 0 ? void 0 : _call$procedure4._def.type) !== null && _call$procedure$_def$3 !== void 0 ? _call$procedure$_def$3 : "unknown"; + const shape = getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error50, + input, + path, + type + }); + return shape; + } + })); + return new Response(stream, { + headers, + status: headResponse$1.status + }); + } + headers.set("content-type", "application/json"); + const results = (await Promise.all(rpcCalls)).map((res) => { + const [error50, result] = res; + if (error50) + return res; + if (isDataStream(result.data)) + return [new TRPCError({ + code: "UNSUPPORTED_MEDIA_TYPE", + message: "Cannot use stream-like response in non-streaming request - use httpBatchStreamLink" + }), void 0]; + return res; + }); + const resultAsRPCResponse = results.map(([error50, result], index) => { + const call = info3.calls[index]; + if (error50) { + var _call$procedure$_def$4, _call$procedure5; + return { error: getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error50, + input: call.result(), + path: call.path, + type: (_call$procedure$_def$4 = (_call$procedure5 = call.procedure) === null || _call$procedure5 === void 0 ? void 0 : _call$procedure5._def.type) !== null && _call$procedure$_def$4 !== void 0 ? _call$procedure$_def$4 : "unknown" + }) }; + } + return { result: { data: result.data } }; + }); + const errors = results.map(([error50]) => error50).filter(Boolean); + const headResponse = initResponse({ + ctx: ctxManager.valueOrUndefined(), + info: info3, + responseMeta: opts.responseMeta, + untransformedJSON: resultAsRPCResponse, + errors, + headers + }); + return new Response(JSON.stringify(transformTRPCResponse(config3, resultAsRPCResponse)), { + status: headResponse.status, + headers + }); + } catch (cause) { + var _info$type2; + const [_infoError, info3] = infoTuple; + const ctx = ctxManager.valueOrUndefined(); + const { error: error50, untransformedJSON, body } = caughtErrorToData(cause, { + opts, + ctx: ctxManager.valueOrUndefined(), + type: (_info$type2 = info3 === null || info3 === void 0 ? void 0 : info3.type) !== null && _info$type2 !== void 0 ? _info$type2 : "unknown" + }); + const headResponse = initResponse({ + ctx, + info: info3, + responseMeta: opts.responseMeta, + untransformedJSON, + errors: [error50], + headers + }); + return new Response(body, { + status: headResponse.status, + headers + }); + } +} +var import_objectSpread2$12, jsonContentTypeHandler, formDataContentTypeHandler, octetStreamContentTypeHandler, handlers, import_defineProperty2, _Symbol$toStringTag, subscribableCache, NOOP, Unpromise, _Symbol, _Symbol$dispose, _Symbol2, _Symbol2$asyncDispose, disposablePromiseTimerResult, require_usingCtx, require_OverloadYield, require_awaitAsyncGenerator, require_wrapAsyncGenerator, import_usingCtx$4, import_awaitAsyncGenerator$4, import_wrapAsyncGenerator$5, import_usingCtx$3, import_awaitAsyncGenerator$3, import_wrapAsyncGenerator$4, import_usingCtx$2, import_awaitAsyncGenerator$2, import_wrapAsyncGenerator$3, PING_SYM, require_asyncIterator, import_awaitAsyncGenerator$1, import_wrapAsyncGenerator$2, import_usingCtx$1, import_asyncIterator$1, CHUNK_VALUE_TYPE_PROMISE, CHUNK_VALUE_TYPE_ASYNC_ITERABLE, PROMISE_STATUS_FULFILLED, PROMISE_STATUS_REJECTED, ASYNC_ITERABLE_STATUS_RETURN, ASYNC_ITERABLE_STATUS_YIELD, ASYNC_ITERABLE_STATUS_ERROR, MaxDepthError, require_asyncGeneratorDelegate, import_asyncIterator, import_awaitAsyncGenerator, import_wrapAsyncGenerator$1, import_asyncGeneratorDelegate, import_usingCtx, PING_EVENT, SERIALIZED_ERROR_EVENT, CONNECTED_EVENT, RETURN_EVENT, sseHeaders, import_wrapAsyncGenerator, import_objectSpread23, TYPE_ACCEPTED_METHOD_MAP, TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE; +var init_resolveResponse_CHqBlAgR = __esm({ + "../../node_modules/@trpc/server/dist/resolveResponse-CHqBlAgR.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getErrorShape_vC8mUXJD(); + init_codes_DagpWZLc(); + init_tracked_Bjtgv3wJ(); + init_observable_UMO3vUa(); + __name(parseConnectionParamsFromUnknown, "parseConnectionParamsFromUnknown"); + __name(parseConnectionParamsFromString, "parseConnectionParamsFromString"); + import_objectSpread2$12 = __toESM2(require_objectSpread2(), 1); + __name(getAcceptHeader, "getAcceptHeader"); + __name(memo, "memo"); + jsonContentTypeHandler = { + isMatch(req) { + var _req$headers$get; + return !!((_req$headers$get = req.headers.get("content-type")) === null || _req$headers$get === void 0 ? void 0 : _req$headers$get.startsWith("application/json")); + }, + async parse(opts) { + var _types$values$next$va; + const { req } = opts; + const isBatchCall = opts.searchParams.get("batch") === "1"; + const paths = isBatchCall ? opts.path.split(",") : [opts.path]; + const getInputs = memo(async () => { + let inputs = void 0; + if (req.method === "GET") { + const queryInput = opts.searchParams.get("input"); + if (queryInput) + inputs = JSON.parse(queryInput); + } else + inputs = await req.json(); + if (inputs === void 0) + return emptyObject(); + if (!isBatchCall) { + const result = emptyObject(); + result[0] = opts.router._def._config.transformer.input.deserialize(inputs); + return result; + } + if (!isObject(inputs)) + throw new TRPCError({ + code: "BAD_REQUEST", + message: '"input" needs to be an object when doing a batch call' + }); + const acc = emptyObject(); + for (const index of paths.keys()) { + const input = inputs[index]; + if (input !== void 0) + acc[index] = opts.router._def._config.transformer.input.deserialize(input); + } + return acc; + }); + const calls = await Promise.all(paths.map(async (path, index) => { + const procedure = await getProcedureAtPath(opts.router, path); + return { + batchIndex: index, + path, + procedure, + getRawInput: async () => { + const inputs = await getInputs.read(); + let input = inputs[index]; + if ((procedure === null || procedure === void 0 ? void 0 : procedure._def.type) === "subscription") { + var _ref2, _opts$headers$get; + const lastEventId = (_ref2 = (_opts$headers$get = opts.headers.get("last-event-id")) !== null && _opts$headers$get !== void 0 ? _opts$headers$get : opts.searchParams.get("lastEventId")) !== null && _ref2 !== void 0 ? _ref2 : opts.searchParams.get("Last-Event-Id"); + if (lastEventId) + if (isObject(input)) + input = (0, import_objectSpread2$12.default)((0, import_objectSpread2$12.default)({}, input), {}, { lastEventId }); + else { + var _input; + (_input = input) !== null && _input !== void 0 || (input = { lastEventId }); + } + } + return input; + }, + result: () => { + var _getInputs$result; + return (_getInputs$result = getInputs.result()) === null || _getInputs$result === void 0 ? void 0 : _getInputs$result[index]; + } + }; + })); + const types = new Set(calls.map((call) => { + var _call$procedure; + return (_call$procedure = call.procedure) === null || _call$procedure === void 0 ? void 0 : _call$procedure._def.type; + }).filter(Boolean)); + if (types.size > 1) + throw new TRPCError({ + code: "BAD_REQUEST", + message: `Cannot mix procedure types in call: ${Array.from(types).join(", ")}` + }); + const type = (_types$values$next$va = types.values().next().value) !== null && _types$values$next$va !== void 0 ? _types$values$next$va : "unknown"; + const connectionParamsStr = opts.searchParams.get("connectionParams"); + const info3 = { + isBatchCall, + accept: getAcceptHeader(req.headers), + calls, + type, + connectionParams: connectionParamsStr === null ? null : parseConnectionParamsFromString(connectionParamsStr), + signal: req.signal, + url: opts.url + }; + return info3; + } + }; + formDataContentTypeHandler = { + isMatch(req) { + var _req$headers$get2; + return !!((_req$headers$get2 = req.headers.get("content-type")) === null || _req$headers$get2 === void 0 ? void 0 : _req$headers$get2.startsWith("multipart/form-data")); + }, + async parse(opts) { + const { req } = opts; + if (req.method !== "POST") + throw new TRPCError({ + code: "METHOD_NOT_SUPPORTED", + message: "Only POST requests are supported for multipart/form-data requests" + }); + const getInputs = memo(async () => { + const fd = await req.formData(); + return fd; + }); + const procedure = await getProcedureAtPath(opts.router, opts.path); + return { + accept: null, + calls: [{ + batchIndex: 0, + path: opts.path, + getRawInput: getInputs.read, + result: getInputs.result, + procedure + }], + isBatchCall: false, + type: "mutation", + connectionParams: null, + signal: req.signal, + url: opts.url + }; + } + }; + octetStreamContentTypeHandler = { + isMatch(req) { + var _req$headers$get3; + return !!((_req$headers$get3 = req.headers.get("content-type")) === null || _req$headers$get3 === void 0 ? void 0 : _req$headers$get3.startsWith("application/octet-stream")); + }, + async parse(opts) { + const { req } = opts; + if (req.method !== "POST") + throw new TRPCError({ + code: "METHOD_NOT_SUPPORTED", + message: "Only POST requests are supported for application/octet-stream requests" + }); + const getInputs = memo(async () => { + return req.body; + }); + return { + calls: [{ + batchIndex: 0, + path: opts.path, + getRawInput: getInputs.read, + result: getInputs.result, + procedure: await getProcedureAtPath(opts.router, opts.path) + }], + isBatchCall: false, + accept: null, + type: "mutation", + connectionParams: null, + signal: req.signal, + url: opts.url + }; + } + }; + handlers = [ + jsonContentTypeHandler, + formDataContentTypeHandler, + octetStreamContentTypeHandler + ]; + __name(getContentTypeHandler, "getContentTypeHandler"); + __name(getRequestInfo, "getRequestInfo"); + __name(isAbortError, "isAbortError"); + __name(throwAbortError, "throwAbortError"); + __name(isObject$1, "isObject$1"); + __name(isPlainObject, "isPlainObject"); + import_defineProperty2 = __toESM2(require_defineProperty(), 1); + subscribableCache = /* @__PURE__ */ new WeakMap(); + NOOP = /* @__PURE__ */ __name(() => { + }, "NOOP"); + _Symbol$toStringTag = Symbol.toStringTag; + Unpromise = /* @__PURE__ */ __name(class Unpromise2 { + constructor(arg) { + (0, import_defineProperty2.default)(this, "promise", void 0); + (0, import_defineProperty2.default)(this, "subscribers", []); + (0, import_defineProperty2.default)(this, "settlement", null); + (0, import_defineProperty2.default)(this, _Symbol$toStringTag, "Unpromise"); + if (typeof arg === "function") + this.promise = new Promise(arg); + else + this.promise = arg; + const thenReturn = this.promise.then((value) => { + const { subscribers } = this; + this.subscribers = null; + this.settlement = { + status: "fulfilled", + value + }; + subscribers === null || subscribers === void 0 || subscribers.forEach(({ resolve }) => { + resolve(value); + }); + }); + if ("catch" in thenReturn) + thenReturn.catch((reason) => { + const { subscribers } = this; + this.subscribers = null; + this.settlement = { + status: "rejected", + reason + }; + subscribers === null || subscribers === void 0 || subscribers.forEach(({ reject }) => { + reject(reason); + }); + }); + } + /** Create a promise that mitigates uncontrolled subscription to a long-lived + * Promise via .then() and .catch() - otherwise a source of memory leaks. + * + * The returned promise has an `unsubscribe()` method which can be called when + * the Promise is no longer being tracked by application logic, and which + * ensures that there is no reference chain from the original promise to the + * new one, and therefore no memory leak. + * + * If original promise has not yet settled, this adds a new unique promise + * that listens to then/catch events, along with an `unsubscribe()` method to + * detach it. + * + * If original promise has settled, then creates a new Promise.resolve() or + * Promise.reject() and provided unsubscribe is a noop. + * + * If you call `unsubscribe()` before the returned Promise has settled, it + * will never settle. + */ + subscribe() { + let promise2; + let unsubscribe; + const { settlement } = this; + if (settlement === null) { + if (this.subscribers === null) + throw new Error("Unpromise settled but still has subscribers"); + const subscriber = withResolvers(); + this.subscribers = listWithMember(this.subscribers, subscriber); + promise2 = subscriber.promise; + unsubscribe = /* @__PURE__ */ __name(() => { + if (this.subscribers !== null) + this.subscribers = listWithoutMember(this.subscribers, subscriber); + }, "unsubscribe"); + } else { + const { status } = settlement; + if (status === "fulfilled") + promise2 = Promise.resolve(settlement.value); + else + promise2 = Promise.reject(settlement.reason); + unsubscribe = NOOP; + } + return Object.assign(promise2, { unsubscribe }); + } + /** STANDARD PROMISE METHODS (but returning a SubscribedPromise) */ + then(onfulfilled, onrejected) { + const subscribed = this.subscribe(); + const { unsubscribe } = subscribed; + return Object.assign(subscribed.then(onfulfilled, onrejected), { unsubscribe }); + } + catch(onrejected) { + const subscribed = this.subscribe(); + const { unsubscribe } = subscribed; + return Object.assign(subscribed.catch(onrejected), { unsubscribe }); + } + finally(onfinally) { + const subscribed = this.subscribe(); + const { unsubscribe } = subscribed; + return Object.assign(subscribed.finally(onfinally), { unsubscribe }); + } + /** Unpromise STATIC METHODS */ + /** Create or Retrieve the proxy Unpromise (a re-used Unpromise for the VM lifetime + * of the provided Promise reference) */ + static proxy(promise2) { + const cached2 = Unpromise2.getSubscribablePromise(promise2); + return typeof cached2 !== "undefined" ? cached2 : Unpromise2.createSubscribablePromise(promise2); + } + /** Create and store an Unpromise keyed by an original Promise. */ + static createSubscribablePromise(promise2) { + const created = new Unpromise2(promise2); + subscribableCache.set(promise2, created); + subscribableCache.set(created, created); + return created; + } + /** Retrieve a previously-created Unpromise keyed by an original Promise. */ + static getSubscribablePromise(promise2) { + return subscribableCache.get(promise2); + } + /** Promise STATIC METHODS */ + /** Lookup the Unpromise for this promise, and derive a SubscribedPromise from + * it (that can be later unsubscribed to eliminate Memory leaks) */ + static resolve(value) { + const promise2 = typeof value === "object" && value !== null && "then" in value && typeof value.then === "function" ? value : Promise.resolve(value); + return Unpromise2.proxy(promise2).subscribe(); + } + static async any(values) { + const valuesArray = Array.isArray(values) ? values : [...values]; + const subscribedPromises = valuesArray.map(Unpromise2.resolve); + try { + return await Promise.any(subscribedPromises); + } finally { + subscribedPromises.forEach(({ unsubscribe }) => { + unsubscribe(); + }); + } + } + static async race(values) { + const valuesArray = Array.isArray(values) ? values : [...values]; + const subscribedPromises = valuesArray.map(Unpromise2.resolve); + try { + return await Promise.race(subscribedPromises); + } finally { + subscribedPromises.forEach(({ unsubscribe }) => { + unsubscribe(); + }); + } + } + /** Create a race of SubscribedPromises that will fulfil to a single winning + * Promise (in a 1-Tuple). Eliminates memory leaks from long-lived promises + * accumulating .then() and .catch() subscribers. Allows simple logic to + * consume the result, like... + * ```ts + * const [ winner ] = await Unpromise.race([ promiseA, promiseB ]); + * if(winner === promiseB){ + * const result = await promiseB; + * // do the thing + * } + * ``` + * */ + static async raceReferences(promises) { + const selfPromises = promises.map(resolveSelfTuple); + try { + return await Promise.race(selfPromises); + } finally { + for (const promise2 of selfPromises) + promise2.unsubscribe(); + } + } + }, "Unpromise"); + __name(resolveSelfTuple, "resolveSelfTuple"); + __name(withResolvers, "withResolvers"); + __name(listWithMember, "listWithMember"); + __name(listWithoutIndex, "listWithoutIndex"); + __name(listWithoutMember, "listWithoutMember"); + (_Symbol$dispose = (_Symbol = Symbol).dispose) !== null && _Symbol$dispose !== void 0 || (_Symbol.dispose = Symbol()); + (_Symbol2$asyncDispose = (_Symbol2 = Symbol).asyncDispose) !== null && _Symbol2$asyncDispose !== void 0 || (_Symbol2.asyncDispose = Symbol()); + __name(makeResource, "makeResource"); + __name(makeAsyncResource, "makeAsyncResource"); + disposablePromiseTimerResult = Symbol(); + __name(timerResource, "timerResource"); + require_usingCtx = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) { + function _usingCtx() { + var r2 = "function" == typeof SuppressedError ? SuppressedError : function(r$1, e$1) { + var n$1 = Error(); + return n$1.name = "SuppressedError", n$1.error = r$1, n$1.suppressed = e$1, n$1; + }, e2 = {}, n2 = []; + function using(r$1, e$1) { + if (null != e$1) { + if (Object(e$1) !== e$1) + throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); + if (r$1) + var o2 = e$1[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")]; + if (void 0 === o2 && (o2 = e$1[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r$1)) + var t9 = o2; + if ("function" != typeof o2) + throw new TypeError("Object is not disposable."); + t9 && (o2 = /* @__PURE__ */ __name(function o$1() { + try { + t9.call(e$1); + } catch (r$2) { + return Promise.reject(r$2); + } + }, "o$1")), n2.push({ + v: e$1, + d: o2, + a: r$1 + }); + } else + r$1 && n2.push({ + d: e$1, + a: r$1 + }); + return e$1; + } + __name(using, "using"); + return { + e: e2, + u: using.bind(null, false), + a: using.bind(null, true), + d: /* @__PURE__ */ __name(function d2() { + var o2, t9 = this.e, s2 = 0; + function next() { + for (; o2 = n2.pop(); ) + try { + if (!o2.a && 1 === s2) + return s2 = 0, n2.push(o2), Promise.resolve().then(next); + if (o2.d) { + var r$1 = o2.d.call(o2.v); + if (o2.a) + return s2 |= 2, Promise.resolve(r$1).then(next, err); + } else + s2 |= 1; + } catch (r$2) { + return err(r$2); + } + if (1 === s2) + return t9 !== e2 ? Promise.reject(t9) : Promise.resolve(); + if (t9 !== e2) + throw t9; + } + __name(next, "next"); + function err(n$1) { + return t9 = t9 !== e2 ? new r2(n$1, t9) : n$1, next(); + } + __name(err, "err"); + return next(); + }, "d") + }; + } + __name(_usingCtx, "_usingCtx"); + module.exports = _usingCtx, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_OverloadYield = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(exports, module) { + function _OverloadYield(e2, d2) { + this.v = e2, this.k = d2; + } + __name(_OverloadYield, "_OverloadYield"); + module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_awaitAsyncGenerator = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(exports, module) { + var OverloadYield$2 = require_OverloadYield(); + function _awaitAsyncGenerator$5(e2) { + return new OverloadYield$2(e2, 0); + } + __name(_awaitAsyncGenerator$5, "_awaitAsyncGenerator$5"); + module.exports = _awaitAsyncGenerator$5, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_wrapAsyncGenerator = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(exports, module) { + var OverloadYield$1 = require_OverloadYield(); + function _wrapAsyncGenerator$6(e2) { + return function() { + return new AsyncGenerator(e2.apply(this, arguments)); + }; + } + __name(_wrapAsyncGenerator$6, "_wrapAsyncGenerator$6"); + function AsyncGenerator(e2) { + var r2, t9; + function resume(r$1, t$1) { + try { + var n2 = e2[r$1](t$1), o2 = n2.value, u5 = o2 instanceof OverloadYield$1; + Promise.resolve(u5 ? o2.v : o2).then(function(t$2) { + if (u5) { + var i2 = "return" === r$1 ? "return" : "next"; + if (!o2.k || t$2.done) + return resume(i2, t$2); + t$2 = e2[i2](t$2).value; + } + settle2(n2.done ? "return" : "normal", t$2); + }, function(e$1) { + resume("throw", e$1); + }); + } catch (e$1) { + settle2("throw", e$1); + } + } + __name(resume, "resume"); + function settle2(e$1, n2) { + switch (e$1) { + case "return": + r2.resolve({ + value: n2, + done: true + }); + break; + case "throw": + r2.reject(n2); + break; + default: + r2.resolve({ + value: n2, + done: false + }); + } + (r2 = r2.next) ? resume(r2.key, r2.arg) : t9 = null; + } + __name(settle2, "settle"); + this._invoke = function(e$1, n2) { + return new Promise(function(o2, u5) { + var i2 = { + key: e$1, + arg: n2, + resolve: o2, + reject: u5, + next: null + }; + t9 ? t9 = t9.next = i2 : (r2 = t9 = i2, resume(e$1, n2)); + }); + }, "function" != typeof e2["return"] && (this["return"] = void 0); + } + __name(AsyncGenerator, "AsyncGenerator"); + AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function() { + return this; + }, AsyncGenerator.prototype.next = function(e2) { + return this._invoke("next", e2); + }, AsyncGenerator.prototype["throw"] = function(e2) { + return this._invoke("throw", e2); + }, AsyncGenerator.prototype["return"] = function(e2) { + return this._invoke("return", e2); + }; + module.exports = _wrapAsyncGenerator$6, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + import_usingCtx$4 = __toESM2(require_usingCtx(), 1); + import_awaitAsyncGenerator$4 = __toESM2(require_awaitAsyncGenerator(), 1); + import_wrapAsyncGenerator$5 = __toESM2(require_wrapAsyncGenerator(), 1); + __name(iteratorResource, "iteratorResource"); + __name(takeWithGrace, "takeWithGrace"); + __name(_takeWithGrace, "_takeWithGrace"); + __name(createDeferred, "createDeferred"); + import_usingCtx$3 = __toESM2(require_usingCtx(), 1); + import_awaitAsyncGenerator$3 = __toESM2(require_awaitAsyncGenerator(), 1); + import_wrapAsyncGenerator$4 = __toESM2(require_wrapAsyncGenerator(), 1); + __name(createManagedIterator, "createManagedIterator"); + __name(mergeAsyncIterables, "mergeAsyncIterables"); + __name(readableStreamFrom, "readableStreamFrom"); + import_usingCtx$2 = __toESM2(require_usingCtx(), 1); + import_awaitAsyncGenerator$2 = __toESM2(require_awaitAsyncGenerator(), 1); + import_wrapAsyncGenerator$3 = __toESM2(require_wrapAsyncGenerator(), 1); + PING_SYM = Symbol("ping"); + __name(withPing, "withPing"); + __name(_withPing, "_withPing"); + require_asyncIterator = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(exports, module) { + function _asyncIterator$2(r2) { + var n2, t9, o2, e2 = 2; + for ("undefined" != typeof Symbol && (t9 = Symbol.asyncIterator, o2 = Symbol.iterator); e2--; ) { + if (t9 && null != (n2 = r2[t9])) + return n2.call(r2); + if (o2 && null != (n2 = r2[o2])) + return new AsyncFromSyncIterator(n2.call(r2)); + t9 = "@@asyncIterator", o2 = "@@iterator"; + } + throw new TypeError("Object is not async iterable"); + } + __name(_asyncIterator$2, "_asyncIterator$2"); + function AsyncFromSyncIterator(r2) { + function AsyncFromSyncIteratorContinuation(r$1) { + if (Object(r$1) !== r$1) + return Promise.reject(new TypeError(r$1 + " is not an object.")); + var n2 = r$1.done; + return Promise.resolve(r$1.value).then(function(r$2) { + return { + value: r$2, + done: n2 + }; + }); + } + __name(AsyncFromSyncIteratorContinuation, "AsyncFromSyncIteratorContinuation"); + return AsyncFromSyncIterator = /* @__PURE__ */ __name(function AsyncFromSyncIterator$1(r$1) { + this.s = r$1, this.n = r$1.next; + }, "AsyncFromSyncIterator$1"), AsyncFromSyncIterator.prototype = { + s: null, + n: null, + next: /* @__PURE__ */ __name(function next() { + return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); + }, "next"), + "return": /* @__PURE__ */ __name(function _return(r$1) { + var n2 = this.s["return"]; + return void 0 === n2 ? Promise.resolve({ + value: r$1, + done: true + }) : AsyncFromSyncIteratorContinuation(n2.apply(this.s, arguments)); + }, "_return"), + "throw": /* @__PURE__ */ __name(function _throw(r$1) { + var n2 = this.s["return"]; + return void 0 === n2 ? Promise.reject(r$1) : AsyncFromSyncIteratorContinuation(n2.apply(this.s, arguments)); + }, "_throw") + }, new AsyncFromSyncIterator(r2); + } + __name(AsyncFromSyncIterator, "AsyncFromSyncIterator"); + module.exports = _asyncIterator$2, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + import_awaitAsyncGenerator$1 = __toESM2(require_awaitAsyncGenerator(), 1); + import_wrapAsyncGenerator$2 = __toESM2(require_wrapAsyncGenerator(), 1); + import_usingCtx$1 = __toESM2(require_usingCtx(), 1); + import_asyncIterator$1 = __toESM2(require_asyncIterator(), 1); + CHUNK_VALUE_TYPE_PROMISE = 0; + CHUNK_VALUE_TYPE_ASYNC_ITERABLE = 1; + PROMISE_STATUS_FULFILLED = 0; + PROMISE_STATUS_REJECTED = 1; + ASYNC_ITERABLE_STATUS_RETURN = 0; + ASYNC_ITERABLE_STATUS_YIELD = 1; + ASYNC_ITERABLE_STATUS_ERROR = 2; + __name(isPromise, "isPromise"); + MaxDepthError = /* @__PURE__ */ __name(class extends Error { + constructor(path) { + super("Max depth reached at path: " + path.join(".")); + this.path = path; + } + }, "MaxDepthError"); + __name(createBatchStreamProducer, "createBatchStreamProducer"); + __name(_createBatchStreamProducer, "_createBatchStreamProducer"); + __name(jsonlStreamProducer, "jsonlStreamProducer"); + require_asyncGeneratorDelegate = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js"(exports, module) { + var OverloadYield = require_OverloadYield(); + function _asyncGeneratorDelegate$1(t9) { + var e2 = {}, n2 = false; + function pump(e$1, r2) { + return n2 = true, r2 = new Promise(function(n$1) { + n$1(t9[e$1](r2)); + }), { + done: false, + value: new OverloadYield(r2, 1) + }; + } + __name(pump, "pump"); + return e2["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function() { + return this; + }, e2.next = function(t$1) { + return n2 ? (n2 = false, t$1) : pump("next", t$1); + }, "function" == typeof t9["throw"] && (e2["throw"] = function(t$1) { + if (n2) + throw n2 = false, t$1; + return pump("throw", t$1); + }), "function" == typeof t9["return"] && (e2["return"] = function(t$1) { + return n2 ? (n2 = false, t$1) : pump("return", t$1); + }), e2; + } + __name(_asyncGeneratorDelegate$1, "_asyncGeneratorDelegate$1"); + module.exports = _asyncGeneratorDelegate$1, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + import_asyncIterator = __toESM2(require_asyncIterator(), 1); + import_awaitAsyncGenerator = __toESM2(require_awaitAsyncGenerator(), 1); + import_wrapAsyncGenerator$1 = __toESM2(require_wrapAsyncGenerator(), 1); + import_asyncGeneratorDelegate = __toESM2(require_asyncGeneratorDelegate(), 1); + import_usingCtx = __toESM2(require_usingCtx(), 1); + PING_EVENT = "ping"; + SERIALIZED_ERROR_EVENT = "serialized-error"; + CONNECTED_EVENT = "connected"; + RETURN_EVENT = "return"; + __name(sseStreamProducer, "sseStreamProducer"); + sseHeaders = { + "Content-Type": "text/event-stream", + "Cache-Control": "no-cache, no-transform", + "X-Accel-Buffering": "no", + Connection: "keep-alive" + }; + import_wrapAsyncGenerator = __toESM2(require_wrapAsyncGenerator(), 1); + import_objectSpread23 = __toESM2(require_objectSpread2(), 1); + __name(errorToAsyncIterable, "errorToAsyncIterable"); + __name(combinedAbortController, "combinedAbortController"); + TYPE_ACCEPTED_METHOD_MAP = { + mutation: ["POST"], + query: ["GET"], + subscription: ["GET"] + }; + TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE = { + mutation: ["POST"], + query: ["GET", "POST"], + subscription: ["GET", "POST"] + }; + __name(initResponse, "initResponse"); + __name(caughtErrorToData, "caughtErrorToData"); + __name(isDataStream, "isDataStream"); + __name(resolveResponse, "resolveResponse"); + } +}); + +// ../../node_modules/@trpc/server/dist/adapters/fetch/index.mjs +async function fetchRequestHandler(opts) { + const resHeaders = new Headers(); + const createContext = /* @__PURE__ */ __name(async (innerOpts) => { + var _opts$createContext; + return (_opts$createContext = opts.createContext) === null || _opts$createContext === void 0 ? void 0 : _opts$createContext.call(opts, (0, import_objectSpread24.default)({ + req: opts.req, + resHeaders + }, innerOpts)); + }, "createContext"); + const url2 = new URL(opts.req.url); + const pathname = trimSlashes(url2.pathname); + const endpoint = trimSlashes(opts.endpoint); + const path = trimSlashes(pathname.slice(endpoint.length)); + return await resolveResponse((0, import_objectSpread24.default)((0, import_objectSpread24.default)({}, opts), {}, { + req: opts.req, + createContext, + path, + error: null, + onError(o2) { + var _opts$onError; + opts === null || opts === void 0 || (_opts$onError = opts.onError) === null || _opts$onError === void 0 || _opts$onError.call(opts, (0, import_objectSpread24.default)((0, import_objectSpread24.default)({}, o2), {}, { req: opts.req })); + }, + responseMeta(data) { + var _opts$responseMeta; + const meta3 = (_opts$responseMeta = opts.responseMeta) === null || _opts$responseMeta === void 0 ? void 0 : _opts$responseMeta.call(opts, data); + if (meta3 === null || meta3 === void 0 ? void 0 : meta3.headers) { + if (meta3.headers instanceof Headers) + for (const [key, value] of meta3.headers.entries()) + resHeaders.append(key, value); + else + for (const [key, value] of Object.entries(meta3.headers)) + if (Array.isArray(value)) + for (const v3 of value) + resHeaders.append(key, v3); + else if (typeof value === "string") + resHeaders.set(key, value); + } + return { + headers: resHeaders, + status: meta3 === null || meta3 === void 0 ? void 0 : meta3.status + }; + } + })); +} +var import_objectSpread24, trimSlashes; +var init_fetch = __esm({ + "../../node_modules/@trpc/server/dist/adapters/fetch/index.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getErrorShape_vC8mUXJD(); + init_resolveResponse_CHqBlAgR(); + import_objectSpread24 = __toESM2(require_objectSpread2(), 1); + trimSlashes = /* @__PURE__ */ __name((path) => { + path = path.startsWith("/") ? path.slice(1) : path; + path = path.endsWith("/") ? path.slice(0, -1) : path; + return path; + }, "trimSlashes"); + __name(fetchRequestHandler, "fetchRequestHandler"); + } +}); + +// ../../node_modules/hono/dist/helper/route/index.js +var matchedRoutes, routePath; +var init_route = __esm({ + "../../node_modules/hono/dist/helper/route/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants(); + init_url(); + matchedRoutes = /* @__PURE__ */ __name((c2) => ( + // @ts-expect-error c.req[GET_MATCH_RESULT] is not typed + c2.req[GET_MATCH_RESULT][0].map(([[, route]]) => route) + ), "matchedRoutes"); + routePath = /* @__PURE__ */ __name((c2, index) => matchedRoutes(c2).at(index ?? c2.req.routeIndex)?.path ?? "", "routePath"); + } +}); + +// ../../node_modules/@hono/trpc-server/dist/index.js +var trpcServer; +var init_dist2 = __esm({ + "../../node_modules/@hono/trpc-server/dist/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fetch(); + init_route(); + trpcServer = /* @__PURE__ */ __name(({ endpoint, createContext, ...rest }) => { + const bodyProps = /* @__PURE__ */ new Set([ + "arrayBuffer", + "blob", + "formData", + "json", + "text" + ]); + return async (c2) => { + const canWithBody = c2.req.method === "GET" || c2.req.method === "HEAD"; + let resolvedEndpoint = endpoint; + if (!endpoint) { + const path = routePath(c2); + if (path) + resolvedEndpoint = path.replace(/\/\*+$/, "") || "/trpc"; + else + resolvedEndpoint = "/trpc"; + } + return await fetchRequestHandler({ + ...rest, + createContext: async (opts) => ({ + ...createContext ? await createContext(opts, c2) : {}, + env: c2.env + }), + endpoint: resolvedEndpoint, + req: canWithBody ? c2.req.raw : new Proxy(c2.req.raw, { get(t9, p2, _r) { + if (bodyProps.has(p2)) + return () => c2.req[p2](); + return Reflect.get(t9, p2, t9); + } }) + }); + }; + }, "trpcServer"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/entity.js +function is(value, type) { + if (!value || typeof value !== "object") { + return false; + } + if (value instanceof type) { + return true; + } + if (!Object.prototype.hasOwnProperty.call(type, entityKind)) { + throw new Error( + `Class "${type.name ?? ""}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.` + ); + } + let cls = Object.getPrototypeOf(value).constructor; + if (cls) { + while (cls) { + if (entityKind in cls && cls[entityKind] === type[entityKind]) { + return true; + } + cls = Object.getPrototypeOf(cls); + } + } + return false; +} +var entityKind, hasOwnEntityKind; +var init_entity = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/entity.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + entityKind = Symbol.for("drizzle:entityKind"); + hasOwnEntityKind = Symbol.for("drizzle:hasOwnEntityKind"); + __name(is, "is"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/logger.js +var _a, ConsoleLogWriter, _a2, DefaultLogger, _a3, NoopLogger; +var init_logger2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/logger.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + ConsoleLogWriter = class { + write(message2) { + console.log(message2); + } + }; + __name(ConsoleLogWriter, "ConsoleLogWriter"); + _a = entityKind; + __publicField(ConsoleLogWriter, _a, "ConsoleLogWriter"); + DefaultLogger = class { + writer; + constructor(config3) { + this.writer = config3?.writer ?? new ConsoleLogWriter(); + } + logQuery(query, params) { + const stringifiedParams = params.map((p2) => { + try { + return JSON.stringify(p2); + } catch { + return String(p2); + } + }); + const paramsStr = stringifiedParams.length ? ` -- params: [${stringifiedParams.join(", ")}]` : ""; + this.writer.write(`Query: ${query}${paramsStr}`); + } + }; + __name(DefaultLogger, "DefaultLogger"); + _a2 = entityKind; + __publicField(DefaultLogger, _a2, "DefaultLogger"); + NoopLogger = class { + logQuery() { + } + }; + __name(NoopLogger, "NoopLogger"); + _a3 = entityKind; + __publicField(NoopLogger, _a3, "NoopLogger"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/table.utils.js +var TableName; +var init_table_utils = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/table.utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + TableName = Symbol.for("drizzle:Name"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/table.js +function getTableName(table3) { + return table3[TableName]; +} +function getTableUniqueName(table3) { + return `${table3[Schema] ?? "public"}.${table3[TableName]}`; +} +var Schema, Columns, ExtraConfigColumns, OriginalName, BaseName, IsAlias, ExtraConfigBuilder, IsDrizzleTable, _a4, Table; +var init_table = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/table.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + Schema = Symbol.for("drizzle:Schema"); + Columns = Symbol.for("drizzle:Columns"); + ExtraConfigColumns = Symbol.for("drizzle:ExtraConfigColumns"); + OriginalName = Symbol.for("drizzle:OriginalName"); + BaseName = Symbol.for("drizzle:BaseName"); + IsAlias = Symbol.for("drizzle:IsAlias"); + ExtraConfigBuilder = Symbol.for("drizzle:ExtraConfigBuilder"); + IsDrizzleTable = Symbol.for("drizzle:IsDrizzleTable"); + Table = class { + /** + * @internal + * Can be changed if the table is aliased. + */ + [(_a4 = entityKind, TableName)]; + /** + * @internal + * Used to store the original name of the table, before any aliasing. + */ + [OriginalName]; + /** @internal */ + [Schema]; + /** @internal */ + [Columns]; + /** @internal */ + [ExtraConfigColumns]; + /** + * @internal + * Used to store the table name before the transformation via the `tableCreator` functions. + */ + [BaseName]; + /** @internal */ + [IsAlias] = false; + /** @internal */ + [IsDrizzleTable] = true; + /** @internal */ + [ExtraConfigBuilder] = void 0; + constructor(name, schema, baseName) { + this[TableName] = this[OriginalName] = name; + this[Schema] = schema; + this[BaseName] = baseName; + } + }; + __name(Table, "Table"); + __publicField(Table, _a4, "Table"); + /** @internal */ + __publicField(Table, "Symbol", { + Name: TableName, + Schema, + OriginalName, + Columns, + ExtraConfigColumns, + BaseName, + IsAlias, + ExtraConfigBuilder + }); + __name(getTableName, "getTableName"); + __name(getTableUniqueName, "getTableUniqueName"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/column.js +var _a5, Column; +var init_column = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/column.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + Column = class { + constructor(table3, config3) { + this.table = table3; + this.config = config3; + this.name = config3.name; + this.keyAsName = config3.keyAsName; + this.notNull = config3.notNull; + this.default = config3.default; + this.defaultFn = config3.defaultFn; + this.onUpdateFn = config3.onUpdateFn; + this.hasDefault = config3.hasDefault; + this.primary = config3.primaryKey; + this.isUnique = config3.isUnique; + this.uniqueName = config3.uniqueName; + this.uniqueType = config3.uniqueType; + this.dataType = config3.dataType; + this.columnType = config3.columnType; + this.generated = config3.generated; + this.generatedIdentity = config3.generatedIdentity; + } + name; + keyAsName; + primary; + notNull; + default; + defaultFn; + onUpdateFn; + hasDefault; + isUnique; + uniqueName; + uniqueType; + dataType; + columnType; + enumValues = void 0; + generated = void 0; + generatedIdentity = void 0; + config; + mapFromDriverValue(value) { + return value; + } + mapToDriverValue(value) { + return value; + } + // ** @internal */ + shouldDisableInsert() { + return this.config.generated !== void 0 && this.config.generated.type !== "byDefault"; + } + }; + __name(Column, "Column"); + _a5 = entityKind; + __publicField(Column, _a5, "Column"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/column-builder.js +var _a6, ColumnBuilder; +var init_column_builder = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/column-builder.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + ColumnBuilder = class { + config; + constructor(name, dataType, columnType) { + this.config = { + name, + keyAsName: name === "", + notNull: false, + default: void 0, + hasDefault: false, + primaryKey: false, + isUnique: false, + uniqueName: void 0, + uniqueType: void 0, + dataType, + columnType, + generated: void 0 + }; + } + /** + * Changes the data type of the column. Commonly used with `json` columns. Also, useful for branded types. + * + * @example + * ```ts + * const users = pgTable('users', { + * id: integer('id').$type().primaryKey(), + * details: json('details').$type().notNull(), + * }); + * ``` + */ + $type() { + return this; + } + /** + * Adds a `not null` clause to the column definition. + * + * Affects the `select` model of the table - columns *without* `not null` will be nullable on select. + */ + notNull() { + this.config.notNull = true; + return this; + } + /** + * Adds a `default ` clause to the column definition. + * + * Affects the `insert` model of the table - columns *with* `default` are optional on insert. + * + * If you need to set a dynamic default value, use {@link $defaultFn} instead. + */ + default(value) { + this.config.default = value; + this.config.hasDefault = true; + return this; + } + /** + * Adds a dynamic default value to the column. + * The function will be called when the row is inserted, and the returned value will be used as the column value. + * + * **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`. + */ + $defaultFn(fn) { + this.config.defaultFn = fn; + this.config.hasDefault = true; + return this; + } + /** + * Alias for {@link $defaultFn}. + */ + $default = this.$defaultFn; + /** + * Adds a dynamic update value to the column. + * The function will be called when the row is updated, and the returned value will be used as the column value if none is provided. + * If no `default` (or `$defaultFn`) value is provided, the function will be called when the row is inserted as well, and the returned value will be used as the column value. + * + * **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`. + */ + $onUpdateFn(fn) { + this.config.onUpdateFn = fn; + this.config.hasDefault = true; + return this; + } + /** + * Alias for {@link $onUpdateFn}. + */ + $onUpdate = this.$onUpdateFn; + /** + * Adds a `primary key` clause to the column definition. This implicitly makes the column `not null`. + * + * In SQLite, `integer primary key` implicitly makes the column auto-incrementing. + */ + primaryKey() { + this.config.primaryKey = true; + this.config.notNull = true; + return this; + } + /** @internal Sets the name of the column to the key within the table definition if a name was not given. */ + setName(name) { + if (this.config.name !== "") + return; + this.config.name = name; + } + }; + __name(ColumnBuilder, "ColumnBuilder"); + _a6 = entityKind; + __publicField(ColumnBuilder, _a6, "ColumnBuilder"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/foreign-keys.js +var _a7, ForeignKeyBuilder, _a8, ForeignKey; +var init_foreign_keys = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/foreign-keys.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + ForeignKeyBuilder = class { + /** @internal */ + reference; + /** @internal */ + _onUpdate = "no action"; + /** @internal */ + _onDelete = "no action"; + constructor(config3, actions) { + this.reference = () => { + const { name, columns, foreignColumns } = config3(); + return { name, columns, foreignTable: foreignColumns[0].table, foreignColumns }; + }; + if (actions) { + this._onUpdate = actions.onUpdate; + this._onDelete = actions.onDelete; + } + } + onUpdate(action) { + this._onUpdate = action === void 0 ? "no action" : action; + return this; + } + onDelete(action) { + this._onDelete = action === void 0 ? "no action" : action; + return this; + } + /** @internal */ + build(table3) { + return new ForeignKey(table3, this); + } + }; + __name(ForeignKeyBuilder, "ForeignKeyBuilder"); + _a7 = entityKind; + __publicField(ForeignKeyBuilder, _a7, "PgForeignKeyBuilder"); + ForeignKey = class { + constructor(table3, builder) { + this.table = table3; + this.reference = builder.reference; + this.onUpdate = builder._onUpdate; + this.onDelete = builder._onDelete; + } + reference; + onUpdate; + onDelete; + getName() { + const { name, columns, foreignColumns } = this.reference(); + const columnNames = columns.map((column) => column.name); + const foreignColumnNames = foreignColumns.map((column) => column.name); + const chunks = [ + this.table[TableName], + ...columnNames, + foreignColumns[0].table[TableName], + ...foreignColumnNames + ]; + return name ?? `${chunks.join("_")}_fk`; + } + }; + __name(ForeignKey, "ForeignKey"); + _a8 = entityKind; + __publicField(ForeignKey, _a8, "PgForeignKey"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/tracing-utils.js +function iife(fn, ...args) { + return fn(...args); +} +var init_tracing_utils = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/tracing-utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(iife, "iife"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/unique-constraint.js +function uniqueKeyName(table3, columns) { + return `${table3[TableName]}_${columns.join("_")}_unique`; +} +var _a9, UniqueConstraintBuilder, _a10, UniqueOnConstraintBuilder, _a11, UniqueConstraint; +var init_unique_constraint = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/unique-constraint.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + __name(uniqueKeyName, "uniqueKeyName"); + UniqueConstraintBuilder = class { + constructor(columns, name) { + this.name = name; + this.columns = columns; + } + /** @internal */ + columns; + /** @internal */ + nullsNotDistinctConfig = false; + nullsNotDistinct() { + this.nullsNotDistinctConfig = true; + return this; + } + /** @internal */ + build(table3) { + return new UniqueConstraint(table3, this.columns, this.nullsNotDistinctConfig, this.name); + } + }; + __name(UniqueConstraintBuilder, "UniqueConstraintBuilder"); + _a9 = entityKind; + __publicField(UniqueConstraintBuilder, _a9, "PgUniqueConstraintBuilder"); + UniqueOnConstraintBuilder = class { + /** @internal */ + name; + constructor(name) { + this.name = name; + } + on(...columns) { + return new UniqueConstraintBuilder(columns, this.name); + } + }; + __name(UniqueOnConstraintBuilder, "UniqueOnConstraintBuilder"); + _a10 = entityKind; + __publicField(UniqueOnConstraintBuilder, _a10, "PgUniqueOnConstraintBuilder"); + UniqueConstraint = class { + constructor(table3, columns, nullsNotDistinct, name) { + this.table = table3; + this.columns = columns; + this.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name)); + this.nullsNotDistinct = nullsNotDistinct; + } + columns; + name; + nullsNotDistinct = false; + getName() { + return this.name; + } + }; + __name(UniqueConstraint, "UniqueConstraint"); + _a11 = entityKind; + __publicField(UniqueConstraint, _a11, "PgUniqueConstraint"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/utils/array.js +function parsePgArrayValue(arrayString, startFrom, inQuotes) { + for (let i2 = startFrom; i2 < arrayString.length; i2++) { + const char = arrayString[i2]; + if (char === "\\") { + i2++; + continue; + } + if (char === '"') { + return [arrayString.slice(startFrom, i2).replace(/\\/g, ""), i2 + 1]; + } + if (inQuotes) { + continue; + } + if (char === "," || char === "}") { + return [arrayString.slice(startFrom, i2).replace(/\\/g, ""), i2]; + } + } + return [arrayString.slice(startFrom).replace(/\\/g, ""), arrayString.length]; +} +function parsePgNestedArray(arrayString, startFrom = 0) { + const result = []; + let i2 = startFrom; + let lastCharIsComma = false; + while (i2 < arrayString.length) { + const char = arrayString[i2]; + if (char === ",") { + if (lastCharIsComma || i2 === startFrom) { + result.push(""); + } + lastCharIsComma = true; + i2++; + continue; + } + lastCharIsComma = false; + if (char === "\\") { + i2 += 2; + continue; + } + if (char === '"') { + const [value2, startFrom2] = parsePgArrayValue(arrayString, i2 + 1, true); + result.push(value2); + i2 = startFrom2; + continue; + } + if (char === "}") { + return [result, i2 + 1]; + } + if (char === "{") { + const [value2, startFrom2] = parsePgNestedArray(arrayString, i2 + 1); + result.push(value2); + i2 = startFrom2; + continue; + } + const [value, newStartFrom] = parsePgArrayValue(arrayString, i2, false); + result.push(value); + i2 = newStartFrom; + } + return [result, i2]; +} +function parsePgArray(arrayString) { + const [result] = parsePgNestedArray(arrayString, 1); + return result; +} +function makePgArray(array2) { + return `{${array2.map((item) => { + if (Array.isArray(item)) { + return makePgArray(item); + } + if (typeof item === "string") { + return `"${item.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`; + } + return `${item}`; + }).join(",")}}`; +} +var init_array = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/utils/array.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(parsePgArrayValue, "parsePgArrayValue"); + __name(parsePgNestedArray, "parsePgNestedArray"); + __name(parsePgArray, "parsePgArray"); + __name(makePgArray, "makePgArray"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/columns/common.js +var _a12, PgColumnBuilder, _a13, PgColumn, _a14, ExtraConfigColumn, _a15, IndexedColumn, _a16, PgArrayBuilder, _a17, _PgArray, PgArray; +var init_common = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/columns/common.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column_builder(); + init_column(); + init_entity(); + init_foreign_keys(); + init_tracing_utils(); + init_unique_constraint(); + init_array(); + PgColumnBuilder = class extends ColumnBuilder { + foreignKeyConfigs = []; + array(size) { + return new PgArrayBuilder(this.config.name, this, size); + } + references(ref, actions = {}) { + this.foreignKeyConfigs.push({ ref, actions }); + return this; + } + unique(name, config3) { + this.config.isUnique = true; + this.config.uniqueName = name; + this.config.uniqueType = config3?.nulls; + return this; + } + generatedAlwaysAs(as2) { + this.config.generated = { + as: as2, + type: "always", + mode: "stored" + }; + return this; + } + /** @internal */ + buildForeignKeys(column, table3) { + return this.foreignKeyConfigs.map(({ ref, actions }) => { + return iife( + (ref2, actions2) => { + const builder = new ForeignKeyBuilder(() => { + const foreignColumn = ref2(); + return { columns: [column], foreignColumns: [foreignColumn] }; + }); + if (actions2.onUpdate) { + builder.onUpdate(actions2.onUpdate); + } + if (actions2.onDelete) { + builder.onDelete(actions2.onDelete); + } + return builder.build(table3); + }, + ref, + actions + ); + }); + } + /** @internal */ + buildExtraConfigColumn(table3) { + return new ExtraConfigColumn(table3, this.config); + } + }; + __name(PgColumnBuilder, "PgColumnBuilder"); + _a12 = entityKind; + __publicField(PgColumnBuilder, _a12, "PgColumnBuilder"); + PgColumn = class extends Column { + constructor(table3, config3) { + if (!config3.uniqueName) { + config3.uniqueName = uniqueKeyName(table3, [config3.name]); + } + super(table3, config3); + this.table = table3; + } + }; + __name(PgColumn, "PgColumn"); + _a13 = entityKind; + __publicField(PgColumn, _a13, "PgColumn"); + ExtraConfigColumn = class extends PgColumn { + getSQLType() { + return this.getSQLType(); + } + indexConfig = { + order: this.config.order ?? "asc", + nulls: this.config.nulls ?? "last", + opClass: this.config.opClass + }; + defaultConfig = { + order: "asc", + nulls: "last", + opClass: void 0 + }; + asc() { + this.indexConfig.order = "asc"; + return this; + } + desc() { + this.indexConfig.order = "desc"; + return this; + } + nullsFirst() { + this.indexConfig.nulls = "first"; + return this; + } + nullsLast() { + this.indexConfig.nulls = "last"; + return this; + } + /** + * ### PostgreSQL documentation quote + * + * > An operator class with optional parameters can be specified for each column of an index. + * The operator class identifies the operators to be used by the index for that column. + * For example, a B-tree index on four-byte integers would use the int4_ops class; + * this operator class includes comparison functions for four-byte integers. + * In practice the default operator class for the column's data type is usually sufficient. + * The main point of having operator classes is that for some data types, there could be more than one meaningful ordering. + * For example, we might want to sort a complex-number data type either by absolute value or by real part. + * We could do this by defining two operator classes for the data type and then selecting the proper class when creating an index. + * More information about operator classes check: + * + * ### Useful links + * https://www.postgresql.org/docs/current/sql-createindex.html + * + * https://www.postgresql.org/docs/current/indexes-opclass.html + * + * https://www.postgresql.org/docs/current/xindex.html + * + * ### Additional types + * If you have the `pg_vector` extension installed in your database, you can use the + * `vector_l2_ops`, `vector_ip_ops`, `vector_cosine_ops`, `vector_l1_ops`, `bit_hamming_ops`, `bit_jaccard_ops`, `halfvec_l2_ops`, `sparsevec_l2_ops` options, which are predefined types. + * + * **You can always specify any string you want in the operator class, in case Drizzle doesn't have it natively in its types** + * + * @param opClass + * @returns + */ + op(opClass) { + this.indexConfig.opClass = opClass; + return this; + } + }; + __name(ExtraConfigColumn, "ExtraConfigColumn"); + _a14 = entityKind; + __publicField(ExtraConfigColumn, _a14, "ExtraConfigColumn"); + IndexedColumn = class { + constructor(name, keyAsName, type, indexConfig) { + this.name = name; + this.keyAsName = keyAsName; + this.type = type; + this.indexConfig = indexConfig; + } + name; + keyAsName; + type; + indexConfig; + }; + __name(IndexedColumn, "IndexedColumn"); + _a15 = entityKind; + __publicField(IndexedColumn, _a15, "IndexedColumn"); + PgArrayBuilder = class extends PgColumnBuilder { + constructor(name, baseBuilder, size) { + super(name, "array", "PgArray"); + this.config.baseBuilder = baseBuilder; + this.config.size = size; + } + /** @internal */ + build(table3) { + const baseColumn = this.config.baseBuilder.build(table3); + return new PgArray( + table3, + this.config, + baseColumn + ); + } + }; + __name(PgArrayBuilder, "PgArrayBuilder"); + _a16 = entityKind; + __publicField(PgArrayBuilder, _a16, "PgArrayBuilder"); + _PgArray = class extends PgColumn { + constructor(table3, config3, baseColumn, range2) { + super(table3, config3); + this.baseColumn = baseColumn; + this.range = range2; + this.size = config3.size; + } + size; + getSQLType() { + return `${this.baseColumn.getSQLType()}[${typeof this.size === "number" ? this.size : ""}]`; + } + mapFromDriverValue(value) { + if (typeof value === "string") { + value = parsePgArray(value); + } + return value.map((v3) => this.baseColumn.mapFromDriverValue(v3)); + } + mapToDriverValue(value, isNestedArray = false) { + const a2 = value.map( + (v3) => v3 === null ? null : is(this.baseColumn, _PgArray) ? this.baseColumn.mapToDriverValue(v3, true) : this.baseColumn.mapToDriverValue(v3) + ); + if (isNestedArray) + return a2; + return makePgArray(a2); + } + }; + PgArray = _PgArray; + __name(PgArray, "PgArray"); + _a17 = entityKind; + __publicField(PgArray, _a17, "PgArray"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/columns/enum.js +function isPgEnum(obj) { + return !!obj && typeof obj === "function" && isPgEnumSym in obj && obj[isPgEnumSym] === true; +} +var _a18, PgEnumObjectColumnBuilder, _a19, PgEnumObjectColumn, isPgEnumSym, _a20, PgEnumColumnBuilder, _a21, PgEnumColumn; +var init_enum = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/columns/enum.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_common(); + PgEnumObjectColumnBuilder = class extends PgColumnBuilder { + constructor(name, enumInstance) { + super(name, "string", "PgEnumObjectColumn"); + this.config.enum = enumInstance; + } + /** @internal */ + build(table3) { + return new PgEnumObjectColumn( + table3, + this.config + ); + } + }; + __name(PgEnumObjectColumnBuilder, "PgEnumObjectColumnBuilder"); + _a18 = entityKind; + __publicField(PgEnumObjectColumnBuilder, _a18, "PgEnumObjectColumnBuilder"); + PgEnumObjectColumn = class extends PgColumn { + enum; + enumValues = this.config.enum.enumValues; + constructor(table3, config3) { + super(table3, config3); + this.enum = config3.enum; + } + getSQLType() { + return this.enum.enumName; + } + }; + __name(PgEnumObjectColumn, "PgEnumObjectColumn"); + _a19 = entityKind; + __publicField(PgEnumObjectColumn, _a19, "PgEnumObjectColumn"); + isPgEnumSym = Symbol.for("drizzle:isPgEnum"); + __name(isPgEnum, "isPgEnum"); + PgEnumColumnBuilder = class extends PgColumnBuilder { + constructor(name, enumInstance) { + super(name, "string", "PgEnumColumn"); + this.config.enum = enumInstance; + } + /** @internal */ + build(table3) { + return new PgEnumColumn( + table3, + this.config + ); + } + }; + __name(PgEnumColumnBuilder, "PgEnumColumnBuilder"); + _a20 = entityKind; + __publicField(PgEnumColumnBuilder, _a20, "PgEnumColumnBuilder"); + PgEnumColumn = class extends PgColumn { + enum = this.config.enum; + enumValues = this.config.enum.enumValues; + constructor(table3, config3) { + super(table3, config3); + this.enum = config3.enum; + } + getSQLType() { + return this.enum.enumName; + } + }; + __name(PgEnumColumn, "PgEnumColumn"); + _a21 = entityKind; + __publicField(PgEnumColumn, _a21, "PgEnumColumn"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/subquery.js +var _a22, Subquery, _a23, WithSubquery; +var init_subquery = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/subquery.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + Subquery = class { + constructor(sql2, fields, alias, isWith = false, usedTables = []) { + this._ = { + brand: "Subquery", + sql: sql2, + selectedFields: fields, + alias, + isWith, + usedTables + }; + } + // getSQL(): SQL { + // return new SQL([this]); + // } + }; + __name(Subquery, "Subquery"); + _a22 = entityKind; + __publicField(Subquery, _a22, "Subquery"); + WithSubquery = class extends Subquery { + }; + __name(WithSubquery, "WithSubquery"); + _a23 = entityKind; + __publicField(WithSubquery, _a23, "WithSubquery"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/version.js +var version2; +var init_version = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/version.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + version2 = "0.44.7"; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/tracing.js +var otel, rawTracer, tracer; +var init_tracing = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/tracing.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tracing_utils(); + init_version(); + tracer = { + startActiveSpan(name, fn) { + if (!otel) { + return fn(); + } + if (!rawTracer) { + rawTracer = otel.trace.getTracer("drizzle-orm", version2); + } + return iife( + (otel2, rawTracer2) => rawTracer2.startActiveSpan( + name, + (span) => { + try { + return fn(span); + } catch (e2) { + span.setStatus({ + code: otel2.SpanStatusCode.ERROR, + message: e2 instanceof Error ? e2.message : "Unknown error" + // eslint-disable-line no-instanceof/no-instanceof + }); + throw e2; + } finally { + span.end(); + } + } + ), + otel, + rawTracer + ); + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/view-common.js +var ViewBaseConfig; +var init_view_common = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/view-common.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/sql.js +function isSQLWrapper(value) { + return value !== null && value !== void 0 && typeof value.getSQL === "function"; +} +function mergeQueries(queries) { + const result = { sql: "", params: [] }; + for (const query of queries) { + result.sql += query.sql; + result.params.push(...query.params); + if (query.typings?.length) { + if (!result.typings) { + result.typings = []; + } + result.typings.push(...query.typings); + } + } + return result; +} +function isDriverValueEncoder(value) { + return typeof value === "object" && value !== null && "mapToDriverValue" in value && typeof value.mapToDriverValue === "function"; +} +function sql(strings, ...params) { + const queryChunks = []; + if (params.length > 0 || strings.length > 0 && strings[0] !== "") { + queryChunks.push(new StringChunk(strings[0])); + } + for (const [paramIndex, param2] of params.entries()) { + queryChunks.push(param2, new StringChunk(strings[paramIndex + 1])); + } + return new SQL(queryChunks); +} +function fillPlaceholders(params, values) { + return params.map((p2) => { + if (is(p2, Placeholder)) { + if (!(p2.name in values)) { + throw new Error(`No value for placeholder "${p2.name}" was provided`); + } + return values[p2.name]; + } + if (is(p2, Param) && is(p2.value, Placeholder)) { + if (!(p2.value.name in values)) { + throw new Error(`No value for placeholder "${p2.value.name}" was provided`); + } + return p2.encoder.mapToDriverValue(values[p2.value.name]); + } + return p2; + }); +} +var _a24, FakePrimitiveParam, _a25, StringChunk, _a26, _SQL, SQL, _a27, Name, noopDecoder, noopEncoder, noopMapper, _a28, Param, _a29, Placeholder, IsDrizzleView, _a30, View; +var init_sql = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/sql.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_enum(); + init_subquery(); + init_tracing(); + init_view_common(); + init_column(); + init_table(); + FakePrimitiveParam = class { + }; + __name(FakePrimitiveParam, "FakePrimitiveParam"); + _a24 = entityKind; + __publicField(FakePrimitiveParam, _a24, "FakePrimitiveParam"); + __name(isSQLWrapper, "isSQLWrapper"); + __name(mergeQueries, "mergeQueries"); + StringChunk = class { + value; + constructor(value) { + this.value = Array.isArray(value) ? value : [value]; + } + getSQL() { + return new SQL([this]); + } + }; + __name(StringChunk, "StringChunk"); + _a25 = entityKind; + __publicField(StringChunk, _a25, "StringChunk"); + _SQL = class { + constructor(queryChunks) { + this.queryChunks = queryChunks; + for (const chunk of queryChunks) { + if (is(chunk, Table)) { + const schemaName = chunk[Table.Symbol.Schema]; + this.usedTables.push( + schemaName === void 0 ? chunk[Table.Symbol.Name] : schemaName + "." + chunk[Table.Symbol.Name] + ); + } + } + } + /** @internal */ + decoder = noopDecoder; + shouldInlineParams = false; + /** @internal */ + usedTables = []; + append(query) { + this.queryChunks.push(...query.queryChunks); + return this; + } + toQuery(config3) { + return tracer.startActiveSpan("drizzle.buildSQL", (span) => { + const query = this.buildQueryFromSourceParams(this.queryChunks, config3); + span?.setAttributes({ + "drizzle.query.text": query.sql, + "drizzle.query.params": JSON.stringify(query.params) + }); + return query; + }); + } + buildQueryFromSourceParams(chunks, _config) { + const config3 = Object.assign({}, _config, { + inlineParams: _config.inlineParams || this.shouldInlineParams, + paramStartIndex: _config.paramStartIndex || { value: 0 } + }); + const { + casing, + escapeName, + escapeParam, + prepareTyping, + inlineParams, + paramStartIndex + } = config3; + return mergeQueries(chunks.map((chunk) => { + if (is(chunk, StringChunk)) { + return { sql: chunk.value.join(""), params: [] }; + } + if (is(chunk, Name)) { + return { sql: escapeName(chunk.value), params: [] }; + } + if (chunk === void 0) { + return { sql: "", params: [] }; + } + if (Array.isArray(chunk)) { + const result = [new StringChunk("(")]; + for (const [i2, p2] of chunk.entries()) { + result.push(p2); + if (i2 < chunk.length - 1) { + result.push(new StringChunk(", ")); + } + } + result.push(new StringChunk(")")); + return this.buildQueryFromSourceParams(result, config3); + } + if (is(chunk, _SQL)) { + return this.buildQueryFromSourceParams(chunk.queryChunks, { + ...config3, + inlineParams: inlineParams || chunk.shouldInlineParams + }); + } + if (is(chunk, Table)) { + const schemaName = chunk[Table.Symbol.Schema]; + const tableName = chunk[Table.Symbol.Name]; + return { + sql: schemaName === void 0 || chunk[IsAlias] ? escapeName(tableName) : escapeName(schemaName) + "." + escapeName(tableName), + params: [] + }; + } + if (is(chunk, Column)) { + const columnName = casing.getColumnCasing(chunk); + if (_config.invokeSource === "indexes") { + return { sql: escapeName(columnName), params: [] }; + } + const schemaName = chunk.table[Table.Symbol.Schema]; + return { + sql: chunk.table[IsAlias] || schemaName === void 0 ? escapeName(chunk.table[Table.Symbol.Name]) + "." + escapeName(columnName) : escapeName(schemaName) + "." + escapeName(chunk.table[Table.Symbol.Name]) + "." + escapeName(columnName), + params: [] + }; + } + if (is(chunk, View)) { + const schemaName = chunk[ViewBaseConfig].schema; + const viewName = chunk[ViewBaseConfig].name; + return { + sql: schemaName === void 0 || chunk[ViewBaseConfig].isAlias ? escapeName(viewName) : escapeName(schemaName) + "." + escapeName(viewName), + params: [] + }; + } + if (is(chunk, Param)) { + if (is(chunk.value, Placeholder)) { + return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] }; + } + const mappedValue = chunk.value === null ? null : chunk.encoder.mapToDriverValue(chunk.value); + if (is(mappedValue, _SQL)) { + return this.buildQueryFromSourceParams([mappedValue], config3); + } + if (inlineParams) { + return { sql: this.mapInlineParam(mappedValue, config3), params: [] }; + } + let typings = ["none"]; + if (prepareTyping) { + typings = [prepareTyping(chunk.encoder)]; + } + return { sql: escapeParam(paramStartIndex.value++, mappedValue), params: [mappedValue], typings }; + } + if (is(chunk, Placeholder)) { + return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] }; + } + if (is(chunk, _SQL.Aliased) && chunk.fieldAlias !== void 0) { + return { sql: escapeName(chunk.fieldAlias), params: [] }; + } + if (is(chunk, Subquery)) { + if (chunk._.isWith) { + return { sql: escapeName(chunk._.alias), params: [] }; + } + return this.buildQueryFromSourceParams([ + new StringChunk("("), + chunk._.sql, + new StringChunk(") "), + new Name(chunk._.alias) + ], config3); + } + if (isPgEnum(chunk)) { + if (chunk.schema) { + return { sql: escapeName(chunk.schema) + "." + escapeName(chunk.enumName), params: [] }; + } + return { sql: escapeName(chunk.enumName), params: [] }; + } + if (isSQLWrapper(chunk)) { + if (chunk.shouldOmitSQLParens?.()) { + return this.buildQueryFromSourceParams([chunk.getSQL()], config3); + } + return this.buildQueryFromSourceParams([ + new StringChunk("("), + chunk.getSQL(), + new StringChunk(")") + ], config3); + } + if (inlineParams) { + return { sql: this.mapInlineParam(chunk, config3), params: [] }; + } + return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] }; + })); + } + mapInlineParam(chunk, { escapeString }) { + if (chunk === null) { + return "null"; + } + if (typeof chunk === "number" || typeof chunk === "boolean") { + return chunk.toString(); + } + if (typeof chunk === "string") { + return escapeString(chunk); + } + if (typeof chunk === "object") { + const mappedValueAsString = chunk.toString(); + if (mappedValueAsString === "[object Object]") { + return escapeString(JSON.stringify(chunk)); + } + return escapeString(mappedValueAsString); + } + throw new Error("Unexpected param value: " + chunk); + } + getSQL() { + return this; + } + as(alias) { + if (alias === void 0) { + return this; + } + return new _SQL.Aliased(this, alias); + } + mapWith(decoder2) { + this.decoder = typeof decoder2 === "function" ? { mapFromDriverValue: decoder2 } : decoder2; + return this; + } + inlineParams() { + this.shouldInlineParams = true; + return this; + } + /** + * This method is used to conditionally include a part of the query. + * + * @param condition - Condition to check + * @returns itself if the condition is `true`, otherwise `undefined` + */ + if(condition) { + return condition ? this : void 0; + } + }; + SQL = _SQL; + __name(SQL, "SQL"); + _a26 = entityKind; + __publicField(SQL, _a26, "SQL"); + Name = class { + constructor(value) { + this.value = value; + } + brand; + getSQL() { + return new SQL([this]); + } + }; + __name(Name, "Name"); + _a27 = entityKind; + __publicField(Name, _a27, "Name"); + __name(isDriverValueEncoder, "isDriverValueEncoder"); + noopDecoder = { + mapFromDriverValue: (value) => value + }; + noopEncoder = { + mapToDriverValue: (value) => value + }; + noopMapper = { + ...noopDecoder, + ...noopEncoder + }; + Param = class { + /** + * @param value - Parameter value + * @param encoder - Encoder to convert the value to a driver parameter + */ + constructor(value, encoder2 = noopEncoder) { + this.value = value; + this.encoder = encoder2; + } + brand; + getSQL() { + return new SQL([this]); + } + }; + __name(Param, "Param"); + _a28 = entityKind; + __publicField(Param, _a28, "Param"); + __name(sql, "sql"); + ((sql2) => { + function empty() { + return new SQL([]); + } + __name(empty, "empty"); + sql2.empty = empty; + function fromList(list) { + return new SQL(list); + } + __name(fromList, "fromList"); + sql2.fromList = fromList; + function raw2(str) { + return new SQL([new StringChunk(str)]); + } + __name(raw2, "raw"); + sql2.raw = raw2; + function join(chunks, separator) { + const result = []; + for (const [i2, chunk] of chunks.entries()) { + if (i2 > 0 && separator !== void 0) { + result.push(separator); + } + result.push(chunk); + } + return new SQL(result); + } + __name(join, "join"); + sql2.join = join; + function identifier(value) { + return new Name(value); + } + __name(identifier, "identifier"); + sql2.identifier = identifier; + function placeholder2(name2) { + return new Placeholder(name2); + } + __name(placeholder2, "placeholder2"); + sql2.placeholder = placeholder2; + function param2(value, encoder2) { + return new Param(value, encoder2); + } + __name(param2, "param2"); + sql2.param = param2; + })(sql || (sql = {})); + ((SQL22) => { + class Aliased { + constructor(sql2, fieldAlias) { + this.sql = sql2; + this.fieldAlias = fieldAlias; + } + static [entityKind] = "SQL.Aliased"; + /** @internal */ + isSelectionField = false; + getSQL() { + return this.sql; + } + /** @internal */ + clone() { + return new Aliased(this.sql, this.fieldAlias); + } + } + __name(Aliased, "Aliased"); + SQL22.Aliased = Aliased; + })(SQL || (SQL = {})); + Placeholder = class { + constructor(name2) { + this.name = name2; + } + getSQL() { + return new SQL([this]); + } + }; + __name(Placeholder, "Placeholder"); + _a29 = entityKind; + __publicField(Placeholder, _a29, "Placeholder"); + __name(fillPlaceholders, "fillPlaceholders"); + IsDrizzleView = Symbol.for("drizzle:IsDrizzleView"); + View = class { + /** @internal */ + [(_a30 = entityKind, ViewBaseConfig)]; + /** @internal */ + [IsDrizzleView] = true; + constructor({ name: name2, schema, selectedFields, query }) { + this[ViewBaseConfig] = { + name: name2, + originalName: name2, + schema, + selectedFields, + query, + isExisting: !query, + isAlias: false + }; + } + getSQL() { + return new SQL([this]); + } + }; + __name(View, "View"); + __publicField(View, _a30, "View"); + Column.prototype.getSQL = function() { + return new SQL([this]); + }; + Table.prototype.getSQL = function() { + return new SQL([this]); + }; + Subquery.prototype.getSQL = function() { + return new SQL([this]); + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/utils.js +function mapResultRow(columns, row, joinsNotNullableMap) { + const nullifyMap = {}; + const result = columns.reduce( + (result2, { path, field }, columnIndex) => { + let decoder2; + if (is(field, Column)) { + decoder2 = field; + } else if (is(field, SQL)) { + decoder2 = field.decoder; + } else { + decoder2 = field.sql.decoder; + } + let node = result2; + for (const [pathChunkIndex, pathChunk] of path.entries()) { + if (pathChunkIndex < path.length - 1) { + if (!(pathChunk in node)) { + node[pathChunk] = {}; + } + node = node[pathChunk]; + } else { + const rawValue = row[columnIndex]; + const value = node[pathChunk] = rawValue === null ? null : decoder2.mapFromDriverValue(rawValue); + if (joinsNotNullableMap && is(field, Column) && path.length === 2) { + const objectName = path[0]; + if (!(objectName in nullifyMap)) { + nullifyMap[objectName] = value === null ? getTableName(field.table) : false; + } else if (typeof nullifyMap[objectName] === "string" && nullifyMap[objectName] !== getTableName(field.table)) { + nullifyMap[objectName] = false; + } + } + } + } + return result2; + }, + {} + ); + if (joinsNotNullableMap && Object.keys(nullifyMap).length > 0) { + for (const [objectName, tableName] of Object.entries(nullifyMap)) { + if (typeof tableName === "string" && !joinsNotNullableMap[tableName]) { + result[objectName] = null; + } + } + } + return result; +} +function orderSelectedFields(fields, pathPrefix) { + return Object.entries(fields).reduce((result, [name, field]) => { + if (typeof name !== "string") { + return result; + } + const newPath = pathPrefix ? [...pathPrefix, name] : [name]; + if (is(field, Column) || is(field, SQL) || is(field, SQL.Aliased)) { + result.push({ path: newPath, field }); + } else if (is(field, Table)) { + result.push(...orderSelectedFields(field[Table.Symbol.Columns], newPath)); + } else { + result.push(...orderSelectedFields(field, newPath)); + } + return result; + }, []); +} +function haveSameKeys(left, right) { + const leftKeys = Object.keys(left); + const rightKeys = Object.keys(right); + if (leftKeys.length !== rightKeys.length) { + return false; + } + for (const [index, key] of leftKeys.entries()) { + if (key !== rightKeys[index]) { + return false; + } + } + return true; +} +function mapUpdateSet(table3, values) { + const entries = Object.entries(values).filter(([, value]) => value !== void 0).map(([key, value]) => { + if (is(value, SQL) || is(value, Column)) { + return [key, value]; + } else { + return [key, new Param(value, table3[Table.Symbol.Columns][key])]; + } + }); + if (entries.length === 0) { + throw new Error("No values to set"); + } + return Object.fromEntries(entries); +} +function applyMixins(baseClass, extendedClasses) { + for (const extendedClass of extendedClasses) { + for (const name of Object.getOwnPropertyNames(extendedClass.prototype)) { + if (name === "constructor") + continue; + Object.defineProperty( + baseClass.prototype, + name, + Object.getOwnPropertyDescriptor(extendedClass.prototype, name) || /* @__PURE__ */ Object.create(null) + ); + } + } +} +function getTableColumns(table3) { + return table3[Table.Symbol.Columns]; +} +function getTableLikeName(table3) { + return is(table3, Subquery) ? table3._.alias : is(table3, View) ? table3[ViewBaseConfig].name : is(table3, SQL) ? void 0 : table3[Table.Symbol.IsAlias] ? table3[Table.Symbol.Name] : table3[Table.Symbol.BaseName]; +} +function getColumnNameAndConfig(a2, b2) { + return { + name: typeof a2 === "string" && a2.length > 0 ? a2 : "", + config: typeof a2 === "object" ? a2 : b2 + }; +} +var textDecoder; +var init_utils2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column(); + init_entity(); + init_sql(); + init_subquery(); + init_table(); + init_view_common(); + __name(mapResultRow, "mapResultRow"); + __name(orderSelectedFields, "orderSelectedFields"); + __name(haveSameKeys, "haveSameKeys"); + __name(mapUpdateSet, "mapUpdateSet"); + __name(applyMixins, "applyMixins"); + __name(getTableColumns, "getTableColumns"); + __name(getTableLikeName, "getTableLikeName"); + __name(getColumnNameAndConfig, "getColumnNameAndConfig"); + textDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/table.js +var InlineForeignKeys, EnableRLS, _a31, PgTable; +var init_table2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/table.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table(); + InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys"); + EnableRLS = Symbol.for("drizzle:EnableRLS"); + PgTable = class extends Table { + /**@internal */ + [(_a31 = entityKind, InlineForeignKeys)] = []; + /** @internal */ + [EnableRLS] = false; + /** @internal */ + [Table.Symbol.ExtraConfigBuilder] = void 0; + /** @internal */ + [Table.Symbol.ExtraConfigColumns] = {}; + }; + __name(PgTable, "PgTable"); + __publicField(PgTable, _a31, "PgTable"); + /** @internal */ + __publicField(PgTable, "Symbol", Object.assign({}, Table.Symbol, { + InlineForeignKeys, + EnableRLS + })); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/primary-keys.js +var _a32, PrimaryKeyBuilder, _a33, PrimaryKey; +var init_primary_keys = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/primary-keys.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table2(); + PrimaryKeyBuilder = class { + /** @internal */ + columns; + /** @internal */ + name; + constructor(columns, name) { + this.columns = columns; + this.name = name; + } + /** @internal */ + build(table3) { + return new PrimaryKey(table3, this.columns, this.name); + } + }; + __name(PrimaryKeyBuilder, "PrimaryKeyBuilder"); + _a32 = entityKind; + __publicField(PrimaryKeyBuilder, _a32, "PgPrimaryKeyBuilder"); + PrimaryKey = class { + constructor(table3, columns, name) { + this.table = table3; + this.columns = columns; + this.name = name; + } + columns; + name; + getName() { + return this.name ?? `${this.table[PgTable.Symbol.Name]}_${this.columns.map((column) => column.name).join("_")}_pk`; + } + }; + __name(PrimaryKey, "PrimaryKey"); + _a33 = entityKind; + __publicField(PrimaryKey, _a33, "PgPrimaryKey"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/conditions.js +function bindIfParam(value, column) { + if (isDriverValueEncoder(column) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column) && !is(value, Table) && !is(value, View)) { + return new Param(value, column); + } + return value; +} +function and(...unfilteredConditions) { + const conditions = unfilteredConditions.filter( + (c2) => c2 !== void 0 + ); + if (conditions.length === 0) { + return void 0; + } + if (conditions.length === 1) { + return new SQL(conditions); + } + return new SQL([ + new StringChunk("("), + sql.join(conditions, new StringChunk(" and ")), + new StringChunk(")") + ]); +} +function or(...unfilteredConditions) { + const conditions = unfilteredConditions.filter( + (c2) => c2 !== void 0 + ); + if (conditions.length === 0) { + return void 0; + } + if (conditions.length === 1) { + return new SQL(conditions); + } + return new SQL([ + new StringChunk("("), + sql.join(conditions, new StringChunk(" or ")), + new StringChunk(")") + ]); +} +function not(condition) { + return sql`not ${condition}`; +} +function inArray(column, values) { + if (Array.isArray(values)) { + if (values.length === 0) { + return sql`false`; + } + return sql`${column} in ${values.map((v3) => bindIfParam(v3, column))}`; + } + return sql`${column} in ${bindIfParam(values, column)}`; +} +function notInArray(column, values) { + if (Array.isArray(values)) { + if (values.length === 0) { + return sql`true`; + } + return sql`${column} not in ${values.map((v3) => bindIfParam(v3, column))}`; + } + return sql`${column} not in ${bindIfParam(values, column)}`; +} +function isNull(value) { + return sql`${value} is null`; +} +function isNotNull(value) { + return sql`${value} is not null`; +} +function exists(subquery) { + return sql`exists ${subquery}`; +} +function notExists(subquery) { + return sql`not exists ${subquery}`; +} +function between(column, min, max2) { + return sql`${column} between ${bindIfParam(min, column)} and ${bindIfParam( + max2, + column + )}`; +} +function notBetween(column, min, max2) { + return sql`${column} not between ${bindIfParam( + min, + column + )} and ${bindIfParam(max2, column)}`; +} +function like(column, value) { + return sql`${column} like ${value}`; +} +function notLike(column, value) { + return sql`${column} not like ${value}`; +} +function ilike(column, value) { + return sql`${column} ilike ${value}`; +} +function notIlike(column, value) { + return sql`${column} not ilike ${value}`; +} +var eq, ne, gt, gte, lt, lte; +var init_conditions = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/conditions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column(); + init_entity(); + init_table(); + init_sql(); + __name(bindIfParam, "bindIfParam"); + eq = /* @__PURE__ */ __name((left, right) => { + return sql`${left} = ${bindIfParam(right, left)}`; + }, "eq"); + ne = /* @__PURE__ */ __name((left, right) => { + return sql`${left} <> ${bindIfParam(right, left)}`; + }, "ne"); + __name(and, "and"); + __name(or, "or"); + __name(not, "not"); + gt = /* @__PURE__ */ __name((left, right) => { + return sql`${left} > ${bindIfParam(right, left)}`; + }, "gt"); + gte = /* @__PURE__ */ __name((left, right) => { + return sql`${left} >= ${bindIfParam(right, left)}`; + }, "gte"); + lt = /* @__PURE__ */ __name((left, right) => { + return sql`${left} < ${bindIfParam(right, left)}`; + }, "lt"); + lte = /* @__PURE__ */ __name((left, right) => { + return sql`${left} <= ${bindIfParam(right, left)}`; + }, "lte"); + __name(inArray, "inArray"); + __name(notInArray, "notInArray"); + __name(isNull, "isNull"); + __name(isNotNull, "isNotNull"); + __name(exists, "exists"); + __name(notExists, "notExists"); + __name(between, "between"); + __name(notBetween, "notBetween"); + __name(like, "like"); + __name(notLike, "notLike"); + __name(ilike, "ilike"); + __name(notIlike, "notIlike"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/select.js +function asc(column) { + return sql`${column} asc`; +} +function desc(column) { + return sql`${column} desc`; +} +var init_select = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/select.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sql(); + __name(asc, "asc"); + __name(desc, "desc"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/index.js +var init_expressions = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_conditions(); + init_select(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/relations.js +function getOperators() { + return { + and, + between, + eq, + exists, + gt, + gte, + ilike, + inArray, + isNull, + isNotNull, + like, + lt, + lte, + ne, + not, + notBetween, + notExists, + notLike, + notIlike, + notInArray, + or, + sql + }; +} +function getOrderByOperators() { + return { + sql, + asc, + desc + }; +} +function extractTablesRelationalConfig(schema, configHelpers) { + if (Object.keys(schema).length === 1 && "default" in schema && !is(schema["default"], Table)) { + schema = schema["default"]; + } + const tableNamesMap = {}; + const relationsBuffer = {}; + const tablesConfig = {}; + for (const [key, value] of Object.entries(schema)) { + if (is(value, Table)) { + const dbName = getTableUniqueName(value); + const bufferedRelations = relationsBuffer[dbName]; + tableNamesMap[dbName] = key; + tablesConfig[key] = { + tsName: key, + dbName: value[Table.Symbol.Name], + schema: value[Table.Symbol.Schema], + columns: value[Table.Symbol.Columns], + relations: bufferedRelations?.relations ?? {}, + primaryKey: bufferedRelations?.primaryKey ?? [] + }; + for (const column of Object.values( + value[Table.Symbol.Columns] + )) { + if (column.primary) { + tablesConfig[key].primaryKey.push(column); + } + } + const extraConfig = value[Table.Symbol.ExtraConfigBuilder]?.(value[Table.Symbol.ExtraConfigColumns]); + if (extraConfig) { + for (const configEntry of Object.values(extraConfig)) { + if (is(configEntry, PrimaryKeyBuilder)) { + tablesConfig[key].primaryKey.push(...configEntry.columns); + } + } + } + } else if (is(value, Relations)) { + const dbName = getTableUniqueName(value.table); + const tableName = tableNamesMap[dbName]; + const relations2 = value.config( + configHelpers(value.table) + ); + let primaryKey2; + for (const [relationName, relation] of Object.entries(relations2)) { + if (tableName) { + const tableConfig = tablesConfig[tableName]; + tableConfig.relations[relationName] = relation; + if (primaryKey2) { + tableConfig.primaryKey.push(...primaryKey2); + } + } else { + if (!(dbName in relationsBuffer)) { + relationsBuffer[dbName] = { + relations: {}, + primaryKey: primaryKey2 + }; + } + relationsBuffer[dbName].relations[relationName] = relation; + } + } + } + } + return { tables: tablesConfig, tableNamesMap }; +} +function relations(table3, relations2) { + return new Relations( + table3, + (helpers) => Object.fromEntries( + Object.entries(relations2(helpers)).map(([key, value]) => [ + key, + value.withFieldName(key) + ]) + ) + ); +} +function createOne(sourceTable) { + return /* @__PURE__ */ __name(function one(table3, config3) { + return new One( + sourceTable, + table3, + config3, + config3?.fields.reduce((res, f2) => res && f2.notNull, true) ?? false + ); + }, "one"); +} +function createMany(sourceTable) { + return /* @__PURE__ */ __name(function many(referencedTable, config3) { + return new Many(sourceTable, referencedTable, config3); + }, "many"); +} +function normalizeRelation(schema, tableNamesMap, relation) { + if (is(relation, One) && relation.config) { + return { + fields: relation.config.fields, + references: relation.config.references + }; + } + const referencedTableTsName = tableNamesMap[getTableUniqueName(relation.referencedTable)]; + if (!referencedTableTsName) { + throw new Error( + `Table "${relation.referencedTable[Table.Symbol.Name]}" not found in schema` + ); + } + const referencedTableConfig = schema[referencedTableTsName]; + if (!referencedTableConfig) { + throw new Error(`Table "${referencedTableTsName}" not found in schema`); + } + const sourceTable = relation.sourceTable; + const sourceTableTsName = tableNamesMap[getTableUniqueName(sourceTable)]; + if (!sourceTableTsName) { + throw new Error( + `Table "${sourceTable[Table.Symbol.Name]}" not found in schema` + ); + } + const reverseRelations = []; + for (const referencedTableRelation of Object.values( + referencedTableConfig.relations + )) { + if (relation.relationName && relation !== referencedTableRelation && referencedTableRelation.relationName === relation.relationName || !relation.relationName && referencedTableRelation.referencedTable === relation.sourceTable) { + reverseRelations.push(referencedTableRelation); + } + } + if (reverseRelations.length > 1) { + throw relation.relationName ? new Error( + `There are multiple relations with name "${relation.relationName}" in table "${referencedTableTsName}"` + ) : new Error( + `There are multiple relations between "${referencedTableTsName}" and "${relation.sourceTable[Table.Symbol.Name]}". Please specify relation name` + ); + } + if (reverseRelations[0] && is(reverseRelations[0], One) && reverseRelations[0].config) { + return { + fields: reverseRelations[0].config.references, + references: reverseRelations[0].config.fields + }; + } + throw new Error( + `There is not enough information to infer relation "${sourceTableTsName}.${relation.fieldName}"` + ); +} +function createTableRelationsHelpers(sourceTable) { + return { + one: createOne(sourceTable), + many: createMany(sourceTable) + }; +} +function mapRelationalRow(tablesConfig, tableConfig, row, buildQueryResultSelection, mapColumnValue = (value) => value) { + const result = {}; + for (const [ + selectionItemIndex, + selectionItem + ] of buildQueryResultSelection.entries()) { + if (selectionItem.isJson) { + const relation = tableConfig.relations[selectionItem.tsKey]; + const rawSubRows = row[selectionItemIndex]; + const subRows = typeof rawSubRows === "string" ? JSON.parse(rawSubRows) : rawSubRows; + result[selectionItem.tsKey] = is(relation, One) ? subRows && mapRelationalRow( + tablesConfig, + tablesConfig[selectionItem.relationTableTsKey], + subRows, + selectionItem.selection, + mapColumnValue + ) : subRows.map( + (subRow) => mapRelationalRow( + tablesConfig, + tablesConfig[selectionItem.relationTableTsKey], + subRow, + selectionItem.selection, + mapColumnValue + ) + ); + } else { + const value = mapColumnValue(row[selectionItemIndex]); + const field = selectionItem.field; + let decoder2; + if (is(field, Column)) { + decoder2 = field; + } else if (is(field, SQL)) { + decoder2 = field.decoder; + } else { + decoder2 = field.sql.decoder; + } + result[selectionItem.tsKey] = value === null ? null : decoder2.mapFromDriverValue(value); + } + } + return result; +} +var _a34, Relation, _a35, Relations, _a36, _One, One, _a37, _Many, Many; +var init_relations = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/relations.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_table(); + init_column(); + init_entity(); + init_primary_keys(); + init_expressions(); + init_sql(); + Relation = class { + constructor(sourceTable, referencedTable, relationName) { + this.sourceTable = sourceTable; + this.referencedTable = referencedTable; + this.relationName = relationName; + this.referencedTableName = referencedTable[Table.Symbol.Name]; + } + referencedTableName; + fieldName; + }; + __name(Relation, "Relation"); + _a34 = entityKind; + __publicField(Relation, _a34, "Relation"); + Relations = class { + constructor(table3, config3) { + this.table = table3; + this.config = config3; + } + }; + __name(Relations, "Relations"); + _a35 = entityKind; + __publicField(Relations, _a35, "Relations"); + _One = class extends Relation { + constructor(sourceTable, referencedTable, config3, isNullable) { + super(sourceTable, referencedTable, config3?.relationName); + this.config = config3; + this.isNullable = isNullable; + } + withFieldName(fieldName) { + const relation = new _One( + this.sourceTable, + this.referencedTable, + this.config, + this.isNullable + ); + relation.fieldName = fieldName; + return relation; + } + }; + One = _One; + __name(One, "One"); + _a36 = entityKind; + __publicField(One, _a36, "One"); + _Many = class extends Relation { + constructor(sourceTable, referencedTable, config3) { + super(sourceTable, referencedTable, config3?.relationName); + this.config = config3; + } + withFieldName(fieldName) { + const relation = new _Many( + this.sourceTable, + this.referencedTable, + this.config + ); + relation.fieldName = fieldName; + return relation; + } + }; + Many = _Many; + __name(Many, "Many"); + _a37 = entityKind; + __publicField(Many, _a37, "Many"); + __name(getOperators, "getOperators"); + __name(getOrderByOperators, "getOrderByOperators"); + __name(extractTablesRelationalConfig, "extractTablesRelationalConfig"); + __name(relations, "relations"); + __name(createOne, "createOne"); + __name(createMany, "createMany"); + __name(normalizeRelation, "normalizeRelation"); + __name(createTableRelationsHelpers, "createTableRelationsHelpers"); + __name(mapRelationalRow, "mapRelationalRow"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/alias.js +function aliasedTable(table3, tableAlias) { + return new Proxy(table3, new TableAliasProxyHandler(tableAlias, false)); +} +function aliasedTableColumn(column, tableAlias) { + return new Proxy( + column, + new ColumnAliasProxyHandler(new Proxy(column.table, new TableAliasProxyHandler(tableAlias, false))) + ); +} +function mapColumnsInAliasedSQLToAlias(query, alias) { + return new SQL.Aliased(mapColumnsInSQLToAlias(query.sql, alias), query.fieldAlias); +} +function mapColumnsInSQLToAlias(query, alias) { + return sql.join(query.queryChunks.map((c2) => { + if (is(c2, Column)) { + return aliasedTableColumn(c2, alias); + } + if (is(c2, SQL)) { + return mapColumnsInSQLToAlias(c2, alias); + } + if (is(c2, SQL.Aliased)) { + return mapColumnsInAliasedSQLToAlias(c2, alias); + } + return c2; + })); +} +var _a38, ColumnAliasProxyHandler, _a39, TableAliasProxyHandler, _a40, RelationTableAliasProxyHandler; +var init_alias = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/alias.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column(); + init_entity(); + init_sql(); + init_table(); + init_view_common(); + ColumnAliasProxyHandler = class { + constructor(table3) { + this.table = table3; + } + get(columnObj, prop) { + if (prop === "table") { + return this.table; + } + return columnObj[prop]; + } + }; + __name(ColumnAliasProxyHandler, "ColumnAliasProxyHandler"); + _a38 = entityKind; + __publicField(ColumnAliasProxyHandler, _a38, "ColumnAliasProxyHandler"); + TableAliasProxyHandler = class { + constructor(alias, replaceOriginalName) { + this.alias = alias; + this.replaceOriginalName = replaceOriginalName; + } + get(target, prop) { + if (prop === Table.Symbol.IsAlias) { + return true; + } + if (prop === Table.Symbol.Name) { + return this.alias; + } + if (this.replaceOriginalName && prop === Table.Symbol.OriginalName) { + return this.alias; + } + if (prop === ViewBaseConfig) { + return { + ...target[ViewBaseConfig], + name: this.alias, + isAlias: true + }; + } + if (prop === Table.Symbol.Columns) { + const columns = target[Table.Symbol.Columns]; + if (!columns) { + return columns; + } + const proxiedColumns = {}; + Object.keys(columns).map((key) => { + proxiedColumns[key] = new Proxy( + columns[key], + new ColumnAliasProxyHandler(new Proxy(target, this)) + ); + }); + return proxiedColumns; + } + const value = target[prop]; + if (is(value, Column)) { + return new Proxy(value, new ColumnAliasProxyHandler(new Proxy(target, this))); + } + return value; + } + }; + __name(TableAliasProxyHandler, "TableAliasProxyHandler"); + _a39 = entityKind; + __publicField(TableAliasProxyHandler, _a39, "TableAliasProxyHandler"); + RelationTableAliasProxyHandler = class { + constructor(alias) { + this.alias = alias; + } + get(target, prop) { + if (prop === "sourceTable") { + return aliasedTable(target.sourceTable, this.alias); + } + return target[prop]; + } + }; + __name(RelationTableAliasProxyHandler, "RelationTableAliasProxyHandler"); + _a40 = entityKind; + __publicField(RelationTableAliasProxyHandler, _a40, "RelationTableAliasProxyHandler"); + __name(aliasedTable, "aliasedTable"); + __name(aliasedTableColumn, "aliasedTableColumn"); + __name(mapColumnsInAliasedSQLToAlias, "mapColumnsInAliasedSQLToAlias"); + __name(mapColumnsInSQLToAlias, "mapColumnsInSQLToAlias"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/selection-proxy.js +var _a41, _SelectionProxyHandler, SelectionProxyHandler; +var init_selection_proxy = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/selection-proxy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_alias(); + init_column(); + init_entity(); + init_sql(); + init_subquery(); + init_view_common(); + _SelectionProxyHandler = class { + config; + constructor(config3) { + this.config = { ...config3 }; + } + get(subquery, prop) { + if (prop === "_") { + return { + ...subquery["_"], + selectedFields: new Proxy( + subquery._.selectedFields, + this + ) + }; + } + if (prop === ViewBaseConfig) { + return { + ...subquery[ViewBaseConfig], + selectedFields: new Proxy( + subquery[ViewBaseConfig].selectedFields, + this + ) + }; + } + if (typeof prop === "symbol") { + return subquery[prop]; + } + const columns = is(subquery, Subquery) ? subquery._.selectedFields : is(subquery, View) ? subquery[ViewBaseConfig].selectedFields : subquery; + const value = columns[prop]; + if (is(value, SQL.Aliased)) { + if (this.config.sqlAliasedBehavior === "sql" && !value.isSelectionField) { + return value.sql; + } + const newValue = value.clone(); + newValue.isSelectionField = true; + return newValue; + } + if (is(value, SQL)) { + if (this.config.sqlBehavior === "sql") { + return value; + } + throw new Error( + `You tried to reference "${prop}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.` + ); + } + if (is(value, Column)) { + if (this.config.alias) { + return new Proxy( + value, + new ColumnAliasProxyHandler( + new Proxy( + value.table, + new TableAliasProxyHandler(this.config.alias, this.config.replaceOriginalName ?? false) + ) + ) + ); + } + return value; + } + if (typeof value !== "object" || value === null) { + return value; + } + return new Proxy(value, new _SelectionProxyHandler(this.config)); + } + }; + SelectionProxyHandler = _SelectionProxyHandler; + __name(SelectionProxyHandler, "SelectionProxyHandler"); + _a41 = entityKind; + __publicField(SelectionProxyHandler, _a41, "SelectionProxyHandler"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/query-promise.js +var _a42, QueryPromise; +var init_query_promise = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/query-promise.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + QueryPromise = class { + [(_a42 = entityKind, Symbol.toStringTag)] = "QueryPromise"; + catch(onRejected) { + return this.then(void 0, onRejected); + } + finally(onFinally) { + return this.then( + (value) => { + onFinally?.(); + return value; + }, + (reason) => { + onFinally?.(); + throw reason; + } + ); + } + then(onFulfilled, onRejected) { + return this.execute().then(onFulfilled, onRejected); + } + }; + __name(QueryPromise, "QueryPromise"); + __publicField(QueryPromise, _a42, "QueryPromise"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/foreign-keys.js +var _a43, ForeignKeyBuilder2, _a44, ForeignKey2; +var init_foreign_keys2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/foreign-keys.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + ForeignKeyBuilder2 = class { + /** @internal */ + reference; + /** @internal */ + _onUpdate; + /** @internal */ + _onDelete; + constructor(config3, actions) { + this.reference = () => { + const { name, columns, foreignColumns } = config3(); + return { name, columns, foreignTable: foreignColumns[0].table, foreignColumns }; + }; + if (actions) { + this._onUpdate = actions.onUpdate; + this._onDelete = actions.onDelete; + } + } + onUpdate(action) { + this._onUpdate = action; + return this; + } + onDelete(action) { + this._onDelete = action; + return this; + } + /** @internal */ + build(table3) { + return new ForeignKey2(table3, this); + } + }; + __name(ForeignKeyBuilder2, "ForeignKeyBuilder"); + _a43 = entityKind; + __publicField(ForeignKeyBuilder2, _a43, "SQLiteForeignKeyBuilder"); + ForeignKey2 = class { + constructor(table3, builder) { + this.table = table3; + this.reference = builder.reference; + this.onUpdate = builder._onUpdate; + this.onDelete = builder._onDelete; + } + reference; + onUpdate; + onDelete; + getName() { + const { name, columns, foreignColumns } = this.reference(); + const columnNames = columns.map((column) => column.name); + const foreignColumnNames = foreignColumns.map((column) => column.name); + const chunks = [ + this.table[TableName], + ...columnNames, + foreignColumns[0].table[TableName], + ...foreignColumnNames + ]; + return name ?? `${chunks.join("_")}_fk`; + } + }; + __name(ForeignKey2, "ForeignKey"); + _a44 = entityKind; + __publicField(ForeignKey2, _a44, "SQLiteForeignKey"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/unique-constraint.js +function uniqueKeyName2(table3, columns) { + return `${table3[TableName]}_${columns.join("_")}_unique`; +} +var _a45, UniqueConstraintBuilder2, _a46, UniqueOnConstraintBuilder2, _a47, UniqueConstraint2; +var init_unique_constraint2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/unique-constraint.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + __name(uniqueKeyName2, "uniqueKeyName"); + UniqueConstraintBuilder2 = class { + constructor(columns, name) { + this.name = name; + this.columns = columns; + } + /** @internal */ + columns; + /** @internal */ + build(table3) { + return new UniqueConstraint2(table3, this.columns, this.name); + } + }; + __name(UniqueConstraintBuilder2, "UniqueConstraintBuilder"); + _a45 = entityKind; + __publicField(UniqueConstraintBuilder2, _a45, "SQLiteUniqueConstraintBuilder"); + UniqueOnConstraintBuilder2 = class { + /** @internal */ + name; + constructor(name) { + this.name = name; + } + on(...columns) { + return new UniqueConstraintBuilder2(columns, this.name); + } + }; + __name(UniqueOnConstraintBuilder2, "UniqueOnConstraintBuilder"); + _a46 = entityKind; + __publicField(UniqueOnConstraintBuilder2, _a46, "SQLiteUniqueOnConstraintBuilder"); + UniqueConstraint2 = class { + constructor(table3, columns, name) { + this.table = table3; + this.columns = columns; + this.name = name ?? uniqueKeyName2(this.table, this.columns.map((column) => column.name)); + } + columns; + name; + getName() { + return this.name; + } + }; + __name(UniqueConstraint2, "UniqueConstraint"); + _a47 = entityKind; + __publicField(UniqueConstraint2, _a47, "SQLiteUniqueConstraint"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/common.js +var _a48, SQLiteColumnBuilder, _a49, SQLiteColumn; +var init_common2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/common.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column_builder(); + init_column(); + init_entity(); + init_foreign_keys2(); + init_unique_constraint2(); + SQLiteColumnBuilder = class extends ColumnBuilder { + foreignKeyConfigs = []; + references(ref, actions = {}) { + this.foreignKeyConfigs.push({ ref, actions }); + return this; + } + unique(name) { + this.config.isUnique = true; + this.config.uniqueName = name; + return this; + } + generatedAlwaysAs(as2, config3) { + this.config.generated = { + as: as2, + type: "always", + mode: config3?.mode ?? "virtual" + }; + return this; + } + /** @internal */ + buildForeignKeys(column, table3) { + return this.foreignKeyConfigs.map(({ ref, actions }) => { + return ((ref2, actions2) => { + const builder = new ForeignKeyBuilder2(() => { + const foreignColumn = ref2(); + return { columns: [column], foreignColumns: [foreignColumn] }; + }); + if (actions2.onUpdate) { + builder.onUpdate(actions2.onUpdate); + } + if (actions2.onDelete) { + builder.onDelete(actions2.onDelete); + } + return builder.build(table3); + })(ref, actions); + }); + } + }; + __name(SQLiteColumnBuilder, "SQLiteColumnBuilder"); + _a48 = entityKind; + __publicField(SQLiteColumnBuilder, _a48, "SQLiteColumnBuilder"); + SQLiteColumn = class extends Column { + constructor(table3, config3) { + if (!config3.uniqueName) { + config3.uniqueName = uniqueKeyName2(table3, [config3.name]); + } + super(table3, config3); + this.table = table3; + } + }; + __name(SQLiteColumn, "SQLiteColumn"); + _a49 = entityKind; + __publicField(SQLiteColumn, _a49, "SQLiteColumn"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/blob.js +function blob(a2, b2) { + const { name, config: config3 } = getColumnNameAndConfig(a2, b2); + if (config3?.mode === "json") { + return new SQLiteBlobJsonBuilder(name); + } + if (config3?.mode === "bigint") { + return new SQLiteBigIntBuilder(name); + } + return new SQLiteBlobBufferBuilder(name); +} +var _a50, SQLiteBigIntBuilder, _a51, SQLiteBigInt, _a52, SQLiteBlobJsonBuilder, _a53, SQLiteBlobJson, _a54, SQLiteBlobBufferBuilder, _a55, SQLiteBlobBuffer; +var init_blob = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/blob.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_utils2(); + init_common2(); + SQLiteBigIntBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "bigint", "SQLiteBigInt"); + } + /** @internal */ + build(table3) { + return new SQLiteBigInt(table3, this.config); + } + }; + __name(SQLiteBigIntBuilder, "SQLiteBigIntBuilder"); + _a50 = entityKind; + __publicField(SQLiteBigIntBuilder, _a50, "SQLiteBigIntBuilder"); + SQLiteBigInt = class extends SQLiteColumn { + getSQLType() { + return "blob"; + } + mapFromDriverValue(value) { + if (typeof Buffer !== "undefined" && Buffer.from) { + const buf = Buffer.isBuffer(value) ? value : value instanceof ArrayBuffer ? Buffer.from(value) : value.buffer ? Buffer.from(value.buffer, value.byteOffset, value.byteLength) : Buffer.from(value); + return BigInt(buf.toString("utf8")); + } + return BigInt(textDecoder.decode(value)); + } + mapToDriverValue(value) { + return Buffer.from(value.toString()); + } + }; + __name(SQLiteBigInt, "SQLiteBigInt"); + _a51 = entityKind; + __publicField(SQLiteBigInt, _a51, "SQLiteBigInt"); + SQLiteBlobJsonBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "json", "SQLiteBlobJson"); + } + /** @internal */ + build(table3) { + return new SQLiteBlobJson( + table3, + this.config + ); + } + }; + __name(SQLiteBlobJsonBuilder, "SQLiteBlobJsonBuilder"); + _a52 = entityKind; + __publicField(SQLiteBlobJsonBuilder, _a52, "SQLiteBlobJsonBuilder"); + SQLiteBlobJson = class extends SQLiteColumn { + getSQLType() { + return "blob"; + } + mapFromDriverValue(value) { + if (typeof Buffer !== "undefined" && Buffer.from) { + const buf = Buffer.isBuffer(value) ? value : value instanceof ArrayBuffer ? Buffer.from(value) : value.buffer ? Buffer.from(value.buffer, value.byteOffset, value.byteLength) : Buffer.from(value); + return JSON.parse(buf.toString("utf8")); + } + return JSON.parse(textDecoder.decode(value)); + } + mapToDriverValue(value) { + return Buffer.from(JSON.stringify(value)); + } + }; + __name(SQLiteBlobJson, "SQLiteBlobJson"); + _a53 = entityKind; + __publicField(SQLiteBlobJson, _a53, "SQLiteBlobJson"); + SQLiteBlobBufferBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "buffer", "SQLiteBlobBuffer"); + } + /** @internal */ + build(table3) { + return new SQLiteBlobBuffer(table3, this.config); + } + }; + __name(SQLiteBlobBufferBuilder, "SQLiteBlobBufferBuilder"); + _a54 = entityKind; + __publicField(SQLiteBlobBufferBuilder, _a54, "SQLiteBlobBufferBuilder"); + SQLiteBlobBuffer = class extends SQLiteColumn { + mapFromDriverValue(value) { + if (Buffer.isBuffer(value)) { + return value; + } + return Buffer.from(value); + } + getSQLType() { + return "blob"; + } + }; + __name(SQLiteBlobBuffer, "SQLiteBlobBuffer"); + _a55 = entityKind; + __publicField(SQLiteBlobBuffer, _a55, "SQLiteBlobBuffer"); + __name(blob, "blob"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/custom.js +function customType(customTypeParams) { + return (a2, b2) => { + const { name, config: config3 } = getColumnNameAndConfig(a2, b2); + return new SQLiteCustomColumnBuilder( + name, + config3, + customTypeParams + ); + }; +} +var _a56, SQLiteCustomColumnBuilder, _a57, SQLiteCustomColumn; +var init_custom = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/custom.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_utils2(); + init_common2(); + SQLiteCustomColumnBuilder = class extends SQLiteColumnBuilder { + constructor(name, fieldConfig, customTypeParams) { + super(name, "custom", "SQLiteCustomColumn"); + this.config.fieldConfig = fieldConfig; + this.config.customTypeParams = customTypeParams; + } + /** @internal */ + build(table3) { + return new SQLiteCustomColumn( + table3, + this.config + ); + } + }; + __name(SQLiteCustomColumnBuilder, "SQLiteCustomColumnBuilder"); + _a56 = entityKind; + __publicField(SQLiteCustomColumnBuilder, _a56, "SQLiteCustomColumnBuilder"); + SQLiteCustomColumn = class extends SQLiteColumn { + sqlName; + mapTo; + mapFrom; + constructor(table3, config3) { + super(table3, config3); + this.sqlName = config3.customTypeParams.dataType(config3.fieldConfig); + this.mapTo = config3.customTypeParams.toDriver; + this.mapFrom = config3.customTypeParams.fromDriver; + } + getSQLType() { + return this.sqlName; + } + mapFromDriverValue(value) { + return typeof this.mapFrom === "function" ? this.mapFrom(value) : value; + } + mapToDriverValue(value) { + return typeof this.mapTo === "function" ? this.mapTo(value) : value; + } + }; + __name(SQLiteCustomColumn, "SQLiteCustomColumn"); + _a57 = entityKind; + __publicField(SQLiteCustomColumn, _a57, "SQLiteCustomColumn"); + __name(customType, "customType"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/integer.js +function integer(a2, b2) { + const { name, config: config3 } = getColumnNameAndConfig(a2, b2); + if (config3?.mode === "timestamp" || config3?.mode === "timestamp_ms") { + return new SQLiteTimestampBuilder(name, config3.mode); + } + if (config3?.mode === "boolean") { + return new SQLiteBooleanBuilder(name, config3.mode); + } + return new SQLiteIntegerBuilder(name); +} +var _a58, SQLiteBaseIntegerBuilder, _a59, SQLiteBaseInteger, _a60, SQLiteIntegerBuilder, _a61, SQLiteInteger, _a62, SQLiteTimestampBuilder, _a63, SQLiteTimestamp, _a64, SQLiteBooleanBuilder, _a65, SQLiteBoolean; +var init_integer = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/integer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_sql(); + init_utils2(); + init_common2(); + SQLiteBaseIntegerBuilder = class extends SQLiteColumnBuilder { + constructor(name, dataType, columnType) { + super(name, dataType, columnType); + this.config.autoIncrement = false; + } + primaryKey(config3) { + if (config3?.autoIncrement) { + this.config.autoIncrement = true; + } + this.config.hasDefault = true; + return super.primaryKey(); + } + }; + __name(SQLiteBaseIntegerBuilder, "SQLiteBaseIntegerBuilder"); + _a58 = entityKind; + __publicField(SQLiteBaseIntegerBuilder, _a58, "SQLiteBaseIntegerBuilder"); + SQLiteBaseInteger = class extends SQLiteColumn { + autoIncrement = this.config.autoIncrement; + getSQLType() { + return "integer"; + } + }; + __name(SQLiteBaseInteger, "SQLiteBaseInteger"); + _a59 = entityKind; + __publicField(SQLiteBaseInteger, _a59, "SQLiteBaseInteger"); + SQLiteIntegerBuilder = class extends SQLiteBaseIntegerBuilder { + constructor(name) { + super(name, "number", "SQLiteInteger"); + } + build(table3) { + return new SQLiteInteger( + table3, + this.config + ); + } + }; + __name(SQLiteIntegerBuilder, "SQLiteIntegerBuilder"); + _a60 = entityKind; + __publicField(SQLiteIntegerBuilder, _a60, "SQLiteIntegerBuilder"); + SQLiteInteger = class extends SQLiteBaseInteger { + }; + __name(SQLiteInteger, "SQLiteInteger"); + _a61 = entityKind; + __publicField(SQLiteInteger, _a61, "SQLiteInteger"); + SQLiteTimestampBuilder = class extends SQLiteBaseIntegerBuilder { + constructor(name, mode) { + super(name, "date", "SQLiteTimestamp"); + this.config.mode = mode; + } + /** + * @deprecated Use `default()` with your own expression instead. + * + * Adds `DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer))` to the column, which is the current epoch timestamp in milliseconds. + */ + defaultNow() { + return this.default(sql`(cast((julianday('now') - 2440587.5)*86400000 as integer))`); + } + build(table3) { + return new SQLiteTimestamp( + table3, + this.config + ); + } + }; + __name(SQLiteTimestampBuilder, "SQLiteTimestampBuilder"); + _a62 = entityKind; + __publicField(SQLiteTimestampBuilder, _a62, "SQLiteTimestampBuilder"); + SQLiteTimestamp = class extends SQLiteBaseInteger { + mode = this.config.mode; + mapFromDriverValue(value) { + if (this.config.mode === "timestamp") { + return new Date(value * 1e3); + } + return new Date(value); + } + mapToDriverValue(value) { + const unix = value.getTime(); + if (this.config.mode === "timestamp") { + return Math.floor(unix / 1e3); + } + return unix; + } + }; + __name(SQLiteTimestamp, "SQLiteTimestamp"); + _a63 = entityKind; + __publicField(SQLiteTimestamp, _a63, "SQLiteTimestamp"); + SQLiteBooleanBuilder = class extends SQLiteBaseIntegerBuilder { + constructor(name, mode) { + super(name, "boolean", "SQLiteBoolean"); + this.config.mode = mode; + } + build(table3) { + return new SQLiteBoolean( + table3, + this.config + ); + } + }; + __name(SQLiteBooleanBuilder, "SQLiteBooleanBuilder"); + _a64 = entityKind; + __publicField(SQLiteBooleanBuilder, _a64, "SQLiteBooleanBuilder"); + SQLiteBoolean = class extends SQLiteBaseInteger { + mode = this.config.mode; + mapFromDriverValue(value) { + return Number(value) === 1; + } + mapToDriverValue(value) { + return value ? 1 : 0; + } + }; + __name(SQLiteBoolean, "SQLiteBoolean"); + _a65 = entityKind; + __publicField(SQLiteBoolean, _a65, "SQLiteBoolean"); + __name(integer, "integer"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/numeric.js +function numeric(a2, b2) { + const { name, config: config3 } = getColumnNameAndConfig(a2, b2); + const mode = config3?.mode; + return mode === "number" ? new SQLiteNumericNumberBuilder(name) : mode === "bigint" ? new SQLiteNumericBigIntBuilder(name) : new SQLiteNumericBuilder(name); +} +var _a66, SQLiteNumericBuilder, _a67, SQLiteNumeric, _a68, SQLiteNumericNumberBuilder, _a69, SQLiteNumericNumber, _a70, SQLiteNumericBigIntBuilder, _a71, SQLiteNumericBigInt; +var init_numeric = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/numeric.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_utils2(); + init_common2(); + SQLiteNumericBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "string", "SQLiteNumeric"); + } + /** @internal */ + build(table3) { + return new SQLiteNumeric( + table3, + this.config + ); + } + }; + __name(SQLiteNumericBuilder, "SQLiteNumericBuilder"); + _a66 = entityKind; + __publicField(SQLiteNumericBuilder, _a66, "SQLiteNumericBuilder"); + SQLiteNumeric = class extends SQLiteColumn { + mapFromDriverValue(value) { + if (typeof value === "string") + return value; + return String(value); + } + getSQLType() { + return "numeric"; + } + }; + __name(SQLiteNumeric, "SQLiteNumeric"); + _a67 = entityKind; + __publicField(SQLiteNumeric, _a67, "SQLiteNumeric"); + SQLiteNumericNumberBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "number", "SQLiteNumericNumber"); + } + /** @internal */ + build(table3) { + return new SQLiteNumericNumber( + table3, + this.config + ); + } + }; + __name(SQLiteNumericNumberBuilder, "SQLiteNumericNumberBuilder"); + _a68 = entityKind; + __publicField(SQLiteNumericNumberBuilder, _a68, "SQLiteNumericNumberBuilder"); + SQLiteNumericNumber = class extends SQLiteColumn { + mapFromDriverValue(value) { + if (typeof value === "number") + return value; + return Number(value); + } + mapToDriverValue = String; + getSQLType() { + return "numeric"; + } + }; + __name(SQLiteNumericNumber, "SQLiteNumericNumber"); + _a69 = entityKind; + __publicField(SQLiteNumericNumber, _a69, "SQLiteNumericNumber"); + SQLiteNumericBigIntBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "bigint", "SQLiteNumericBigInt"); + } + /** @internal */ + build(table3) { + return new SQLiteNumericBigInt( + table3, + this.config + ); + } + }; + __name(SQLiteNumericBigIntBuilder, "SQLiteNumericBigIntBuilder"); + _a70 = entityKind; + __publicField(SQLiteNumericBigIntBuilder, _a70, "SQLiteNumericBigIntBuilder"); + SQLiteNumericBigInt = class extends SQLiteColumn { + mapFromDriverValue = BigInt; + mapToDriverValue = String; + getSQLType() { + return "numeric"; + } + }; + __name(SQLiteNumericBigInt, "SQLiteNumericBigInt"); + _a71 = entityKind; + __publicField(SQLiteNumericBigInt, _a71, "SQLiteNumericBigInt"); + __name(numeric, "numeric"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/real.js +function real(name) { + return new SQLiteRealBuilder(name ?? ""); +} +var _a72, SQLiteRealBuilder, _a73, SQLiteReal; +var init_real = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/real.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_common2(); + SQLiteRealBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "number", "SQLiteReal"); + } + /** @internal */ + build(table3) { + return new SQLiteReal(table3, this.config); + } + }; + __name(SQLiteRealBuilder, "SQLiteRealBuilder"); + _a72 = entityKind; + __publicField(SQLiteRealBuilder, _a72, "SQLiteRealBuilder"); + SQLiteReal = class extends SQLiteColumn { + getSQLType() { + return "real"; + } + }; + __name(SQLiteReal, "SQLiteReal"); + _a73 = entityKind; + __publicField(SQLiteReal, _a73, "SQLiteReal"); + __name(real, "real"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/text.js +function text(a2, b2 = {}) { + const { name, config: config3 } = getColumnNameAndConfig(a2, b2); + if (config3.mode === "json") { + return new SQLiteTextJsonBuilder(name); + } + return new SQLiteTextBuilder(name, config3); +} +var _a74, SQLiteTextBuilder, _a75, SQLiteText, _a76, SQLiteTextJsonBuilder, _a77, SQLiteTextJson; +var init_text = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/text.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_utils2(); + init_common2(); + SQLiteTextBuilder = class extends SQLiteColumnBuilder { + constructor(name, config3) { + super(name, "string", "SQLiteText"); + this.config.enumValues = config3.enum; + this.config.length = config3.length; + } + /** @internal */ + build(table3) { + return new SQLiteText( + table3, + this.config + ); + } + }; + __name(SQLiteTextBuilder, "SQLiteTextBuilder"); + _a74 = entityKind; + __publicField(SQLiteTextBuilder, _a74, "SQLiteTextBuilder"); + SQLiteText = class extends SQLiteColumn { + enumValues = this.config.enumValues; + length = this.config.length; + constructor(table3, config3) { + super(table3, config3); + } + getSQLType() { + return `text${this.config.length ? `(${this.config.length})` : ""}`; + } + }; + __name(SQLiteText, "SQLiteText"); + _a75 = entityKind; + __publicField(SQLiteText, _a75, "SQLiteText"); + SQLiteTextJsonBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "json", "SQLiteTextJson"); + } + /** @internal */ + build(table3) { + return new SQLiteTextJson( + table3, + this.config + ); + } + }; + __name(SQLiteTextJsonBuilder, "SQLiteTextJsonBuilder"); + _a76 = entityKind; + __publicField(SQLiteTextJsonBuilder, _a76, "SQLiteTextJsonBuilder"); + SQLiteTextJson = class extends SQLiteColumn { + getSQLType() { + return "text"; + } + mapFromDriverValue(value) { + return JSON.parse(value); + } + mapToDriverValue(value) { + return JSON.stringify(value); + } + }; + __name(SQLiteTextJson, "SQLiteTextJson"); + _a77 = entityKind; + __publicField(SQLiteTextJson, _a77, "SQLiteTextJson"); + __name(text, "text"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/all.js +function getSQLiteColumnBuilders() { + return { + blob, + customType, + integer, + numeric, + real, + text + }; +} +var init_all = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/all.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_blob(); + init_custom(); + init_integer(); + init_numeric(); + init_real(); + init_text(); + __name(getSQLiteColumnBuilders, "getSQLiteColumnBuilders"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/table.js +function sqliteTableBase(name, columns, extraConfig, schema, baseName = name) { + const rawTable = new SQLiteTable(name, schema, baseName); + const parsedColumns = typeof columns === "function" ? columns(getSQLiteColumnBuilders()) : columns; + const builtColumns = Object.fromEntries( + Object.entries(parsedColumns).map(([name2, colBuilderBase]) => { + const colBuilder = colBuilderBase; + colBuilder.setName(name2); + const column = colBuilder.build(rawTable); + rawTable[InlineForeignKeys2].push(...colBuilder.buildForeignKeys(column, rawTable)); + return [name2, column]; + }) + ); + const table3 = Object.assign(rawTable, builtColumns); + table3[Table.Symbol.Columns] = builtColumns; + table3[Table.Symbol.ExtraConfigColumns] = builtColumns; + if (extraConfig) { + table3[SQLiteTable.Symbol.ExtraConfigBuilder] = extraConfig; + } + return table3; +} +var InlineForeignKeys2, _a78, SQLiteTable, sqliteTable; +var init_table3 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/table.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table(); + init_all(); + InlineForeignKeys2 = Symbol.for("drizzle:SQLiteInlineForeignKeys"); + SQLiteTable = class extends Table { + /** @internal */ + [(_a78 = entityKind, Table.Symbol.Columns)]; + /** @internal */ + [InlineForeignKeys2] = []; + /** @internal */ + [Table.Symbol.ExtraConfigBuilder] = void 0; + }; + __name(SQLiteTable, "SQLiteTable"); + __publicField(SQLiteTable, _a78, "SQLiteTable"); + /** @internal */ + __publicField(SQLiteTable, "Symbol", Object.assign({}, Table.Symbol, { + InlineForeignKeys: InlineForeignKeys2 + })); + __name(sqliteTableBase, "sqliteTableBase"); + sqliteTable = /* @__PURE__ */ __name((name, columns, extraConfig) => { + return sqliteTableBase(name, columns, extraConfig); + }, "sqliteTable"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/checks.js +function check(name, value) { + return new CheckBuilder(name, value); +} +var _a79, CheckBuilder, _a80, Check; +var init_checks = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/checks.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + CheckBuilder = class { + constructor(name, value) { + this.name = name; + this.value = value; + } + brand; + build(table3) { + return new Check(table3, this); + } + }; + __name(CheckBuilder, "CheckBuilder"); + _a79 = entityKind; + __publicField(CheckBuilder, _a79, "SQLiteCheckBuilder"); + Check = class { + constructor(table3, builder) { + this.table = table3; + this.name = builder.name; + this.value = builder.value; + } + name; + value; + }; + __name(Check, "Check"); + _a80 = entityKind; + __publicField(Check, _a80, "SQLiteCheck"); + __name(check, "check"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/indexes.js +function uniqueIndex(name) { + return new IndexBuilderOn(name, true); +} +var _a81, IndexBuilderOn, _a82, IndexBuilder, _a83, Index; +var init_indexes = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/indexes.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + IndexBuilderOn = class { + constructor(name, unique) { + this.name = name; + this.unique = unique; + } + on(...columns) { + return new IndexBuilder(this.name, columns, this.unique); + } + }; + __name(IndexBuilderOn, "IndexBuilderOn"); + _a81 = entityKind; + __publicField(IndexBuilderOn, _a81, "SQLiteIndexBuilderOn"); + IndexBuilder = class { + /** @internal */ + config; + constructor(name, columns, unique) { + this.config = { + name, + columns, + unique, + where: void 0 + }; + } + /** + * Condition for partial index. + */ + where(condition) { + this.config.where = condition; + return this; + } + /** @internal */ + build(table3) { + return new Index(this.config, table3); + } + }; + __name(IndexBuilder, "IndexBuilder"); + _a82 = entityKind; + __publicField(IndexBuilder, _a82, "SQLiteIndexBuilder"); + Index = class { + config; + constructor(config3, table3) { + this.config = { ...config3, table: table3 }; + } + }; + __name(Index, "Index"); + _a83 = entityKind; + __publicField(Index, _a83, "SQLiteIndex"); + __name(uniqueIndex, "uniqueIndex"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/primary-keys.js +function primaryKey(...config3) { + if (config3[0].columns) { + return new PrimaryKeyBuilder2(config3[0].columns, config3[0].name); + } + return new PrimaryKeyBuilder2(config3); +} +var _a84, PrimaryKeyBuilder2, _a85, PrimaryKey2; +var init_primary_keys2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/primary-keys.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table3(); + __name(primaryKey, "primaryKey"); + PrimaryKeyBuilder2 = class { + /** @internal */ + columns; + /** @internal */ + name; + constructor(columns, name) { + this.columns = columns; + this.name = name; + } + /** @internal */ + build(table3) { + return new PrimaryKey2(table3, this.columns, this.name); + } + }; + __name(PrimaryKeyBuilder2, "PrimaryKeyBuilder"); + _a84 = entityKind; + __publicField(PrimaryKeyBuilder2, _a84, "SQLitePrimaryKeyBuilder"); + PrimaryKey2 = class { + constructor(table3, columns, name) { + this.table = table3; + this.columns = columns; + this.name = name; + } + columns; + name; + getName() { + return this.name ?? `${this.table[SQLiteTable.Symbol.Name]}_${this.columns.map((column) => column.name).join("_")}_pk`; + } + }; + __name(PrimaryKey2, "PrimaryKey"); + _a85 = entityKind; + __publicField(PrimaryKey2, _a85, "SQLitePrimaryKey"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/utils.js +function extractUsedTable(table3) { + if (is(table3, SQLiteTable)) { + return [`${table3[Table.Symbol.BaseName]}`]; + } + if (is(table3, Subquery)) { + return table3._.usedTables ?? []; + } + if (is(table3, SQL)) { + return table3.usedTables ?? []; + } + return []; +} +var init_utils3 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_sql(); + init_subquery(); + init_table(); + init_table3(); + __name(extractUsedTable, "extractUsedTable"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/delete.js +var _a86, SQLiteDeleteBase; +var init_delete = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/delete.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + init_selection_proxy(); + init_table3(); + init_table(); + init_utils2(); + init_utils3(); + SQLiteDeleteBase = class extends QueryPromise { + constructor(table3, session, dialect, withList) { + super(); + this.table = table3; + this.session = session; + this.dialect = dialect; + this.config = { table: table3, withList }; + } + /** @internal */ + config; + /** + * Adds a `where` clause to the query. + * + * Calling this method will delete only those rows that fulfill a specified condition. + * + * See docs: {@link https://orm.drizzle.team/docs/delete} + * + * @param where the `where` clause. + * + * @example + * You can use conditional operators and `sql function` to filter the rows to be deleted. + * + * ```ts + * // Delete all cars with green color + * db.delete(cars).where(eq(cars.color, 'green')); + * // or + * db.delete(cars).where(sql`${cars.color} = 'green'`) + * ``` + * + * You can logically combine conditional operators with `and()` and `or()` operators: + * + * ```ts + * // Delete all BMW cars with a green color + * db.delete(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW'))); + * + * // Delete all cars with the green or blue color + * db.delete(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue'))); + * ``` + */ + where(where) { + this.config.where = where; + return this; + } + orderBy(...columns) { + if (typeof columns[0] === "function") { + const orderBy = columns[0]( + new Proxy( + this.config.table[Table.Symbol.Columns], + new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" }) + ) + ); + const orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy]; + this.config.orderBy = orderByArray; + } else { + const orderByArray = columns; + this.config.orderBy = orderByArray; + } + return this; + } + limit(limit) { + this.config.limit = limit; + return this; + } + returning(fields = this.table[SQLiteTable.Symbol.Columns]) { + this.config.returning = orderSelectedFields(fields); + return this; + } + /** @internal */ + getSQL() { + return this.dialect.buildDeleteQuery(this.config); + } + toSQL() { + const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL()); + return rest; + } + /** @internal */ + _prepare(isOneTimeQuery = true) { + return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + this.dialect.sqlToQuery(this.getSQL()), + this.config.returning, + this.config.returning ? "all" : "run", + true, + void 0, + { + type: "delete", + tables: extractUsedTable(this.config.table) + } + ); + } + prepare() { + return this._prepare(false); + } + run = (placeholderValues) => { + return this._prepare().run(placeholderValues); + }; + all = (placeholderValues) => { + return this._prepare().all(placeholderValues); + }; + get = (placeholderValues) => { + return this._prepare().get(placeholderValues); + }; + values = (placeholderValues) => { + return this._prepare().values(placeholderValues); + }; + async execute(placeholderValues) { + return this._prepare().execute(placeholderValues); + } + $dynamic() { + return this; + } + }; + __name(SQLiteDeleteBase, "SQLiteDeleteBase"); + _a86 = entityKind; + __publicField(SQLiteDeleteBase, _a86, "SQLiteDelete"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/casing.js +function toSnakeCase(input) { + const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? []; + return words.map((word) => word.toLowerCase()).join("_"); +} +function toCamelCase(input) { + const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? []; + return words.reduce((acc, word, i2) => { + const formattedWord = i2 === 0 ? word.toLowerCase() : `${word[0].toUpperCase()}${word.slice(1)}`; + return acc + formattedWord; + }, ""); +} +function noopCase(input) { + return input; +} +var _a87, CasingCache; +var init_casing = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/casing.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table(); + __name(toSnakeCase, "toSnakeCase"); + __name(toCamelCase, "toCamelCase"); + __name(noopCase, "noopCase"); + CasingCache = class { + /** @internal */ + cache = {}; + cachedTables = {}; + convert; + constructor(casing) { + this.convert = casing === "snake_case" ? toSnakeCase : casing === "camelCase" ? toCamelCase : noopCase; + } + getColumnCasing(column) { + if (!column.keyAsName) + return column.name; + const schema = column.table[Table.Symbol.Schema] ?? "public"; + const tableName = column.table[Table.Symbol.OriginalName]; + const key = `${schema}.${tableName}.${column.name}`; + if (!this.cache[key]) { + this.cacheTable(column.table); + } + return this.cache[key]; + } + cacheTable(table3) { + const schema = table3[Table.Symbol.Schema] ?? "public"; + const tableName = table3[Table.Symbol.OriginalName]; + const tableKey = `${schema}.${tableName}`; + if (!this.cachedTables[tableKey]) { + for (const column of Object.values(table3[Table.Symbol.Columns])) { + const columnKey = `${tableKey}.${column.name}`; + this.cache[columnKey] = this.convert(column.name); + } + this.cachedTables[tableKey] = true; + } + } + clearCache() { + this.cache = {}; + this.cachedTables = {}; + } + }; + __name(CasingCache, "CasingCache"); + _a87 = entityKind; + __publicField(CasingCache, _a87, "CasingCache"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/errors.js +var _a88, DrizzleError, DrizzleQueryError, _a89, TransactionRollbackError; +var init_errors = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/errors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + DrizzleError = class extends Error { + constructor({ message: message2, cause }) { + super(message2); + this.name = "DrizzleError"; + this.cause = cause; + } + }; + __name(DrizzleError, "DrizzleError"); + _a88 = entityKind; + __publicField(DrizzleError, _a88, "DrizzleError"); + DrizzleQueryError = class extends Error { + constructor(query, params, cause) { + super(`Failed query: ${query} +params: ${params}`); + this.query = query; + this.params = params; + this.cause = cause; + Error.captureStackTrace(this, DrizzleQueryError); + if (cause) + this.cause = cause; + } + }; + __name(DrizzleQueryError, "DrizzleQueryError"); + TransactionRollbackError = class extends DrizzleError { + constructor() { + super({ message: "Rollback" }); + } + }; + __name(TransactionRollbackError, "TransactionRollbackError"); + _a89 = entityKind; + __publicField(TransactionRollbackError, _a89, "TransactionRollbackError"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/aggregate.js +function count3(expression) { + return sql`count(${expression || sql.raw("*")})`.mapWith(Number); +} +function max(expression) { + return sql`max(${expression})`.mapWith(is(expression, Column) ? expression : String); +} +var init_aggregate = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/aggregate.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column(); + init_entity(); + init_sql(); + __name(count3, "count"); + __name(max, "max"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/vector.js +var init_vector = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/vector.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/index.js +var init_functions = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_aggregate(); + init_vector(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/index.js +var init_sql2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_expressions(); + init_functions(); + init_sql(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/index.js +var init_columns = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_blob(); + init_common2(); + init_custom(); + init_integer(); + init_numeric(); + init_real(); + init_text(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/view-base.js +var _a90, SQLiteViewBase; +var init_view_base = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/view-base.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_sql(); + SQLiteViewBase = class extends View { + }; + __name(SQLiteViewBase, "SQLiteViewBase"); + _a90 = entityKind; + __publicField(SQLiteViewBase, _a90, "SQLiteViewBase"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/dialect.js +var _a91, SQLiteDialect, _a92, SQLiteSyncDialect, _a93, SQLiteAsyncDialect; +var init_dialect = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/dialect.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_alias(); + init_casing(); + init_column(); + init_entity(); + init_errors(); + init_relations(); + init_sql2(); + init_sql(); + init_columns(); + init_table3(); + init_subquery(); + init_table(); + init_utils2(); + init_view_common(); + init_view_base(); + SQLiteDialect = class { + /** @internal */ + casing; + constructor(config3) { + this.casing = new CasingCache(config3?.casing); + } + escapeName(name) { + return `"${name}"`; + } + escapeParam(_num) { + return "?"; + } + escapeString(str) { + return `'${str.replace(/'/g, "''")}'`; + } + buildWithCTE(queries) { + if (!queries?.length) + return void 0; + const withSqlChunks = [sql`with `]; + for (const [i2, w2] of queries.entries()) { + withSqlChunks.push(sql`${sql.identifier(w2._.alias)} as (${w2._.sql})`); + if (i2 < queries.length - 1) { + withSqlChunks.push(sql`, `); + } + } + withSqlChunks.push(sql` `); + return sql.join(withSqlChunks); + } + buildDeleteQuery({ table: table3, where, returning, withList, limit, orderBy }) { + const withSql = this.buildWithCTE(withList); + const returningSql = returning ? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}` : void 0; + const whereSql = where ? sql` where ${where}` : void 0; + const orderBySql = this.buildOrderBy(orderBy); + const limitSql = this.buildLimit(limit); + return sql`${withSql}delete from ${table3}${whereSql}${returningSql}${orderBySql}${limitSql}`; + } + buildUpdateSet(table3, set2) { + const tableColumns = table3[Table.Symbol.Columns]; + const columnNames = Object.keys(tableColumns).filter( + (colName) => set2[colName] !== void 0 || tableColumns[colName]?.onUpdateFn !== void 0 + ); + const setSize = columnNames.length; + return sql.join(columnNames.flatMap((colName, i2) => { + const col = tableColumns[colName]; + const value = set2[colName] ?? sql.param(col.onUpdateFn(), col); + const res = sql`${sql.identifier(this.casing.getColumnCasing(col))} = ${value}`; + if (i2 < setSize - 1) { + return [res, sql.raw(", ")]; + } + return [res]; + })); + } + buildUpdateQuery({ table: table3, set: set2, where, returning, withList, joins, from, limit, orderBy }) { + const withSql = this.buildWithCTE(withList); + const setSql = this.buildUpdateSet(table3, set2); + const fromSql = from && sql.join([sql.raw(" from "), this.buildFromTable(from)]); + const joinsSql = this.buildJoins(joins); + const returningSql = returning ? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}` : void 0; + const whereSql = where ? sql` where ${where}` : void 0; + const orderBySql = this.buildOrderBy(orderBy); + const limitSql = this.buildLimit(limit); + return sql`${withSql}update ${table3} set ${setSql}${fromSql}${joinsSql}${whereSql}${returningSql}${orderBySql}${limitSql}`; + } + /** + * Builds selection SQL with provided fields/expressions + * + * Examples: + * + * `select from` + * + * `insert ... returning ` + * + * If `isSingleTable` is true, then columns won't be prefixed with table name + */ + buildSelection(fields, { isSingleTable = false } = {}) { + const columnsLen = fields.length; + const chunks = fields.flatMap(({ field }, i2) => { + const chunk = []; + if (is(field, SQL.Aliased) && field.isSelectionField) { + chunk.push(sql.identifier(field.fieldAlias)); + } else if (is(field, SQL.Aliased) || is(field, SQL)) { + const query = is(field, SQL.Aliased) ? field.sql : field; + if (isSingleTable) { + chunk.push( + new SQL( + query.queryChunks.map((c2) => { + if (is(c2, Column)) { + return sql.identifier(this.casing.getColumnCasing(c2)); + } + return c2; + }) + ) + ); + } else { + chunk.push(query); + } + if (is(field, SQL.Aliased)) { + chunk.push(sql` as ${sql.identifier(field.fieldAlias)}`); + } + } else if (is(field, Column)) { + const tableName = field.table[Table.Symbol.Name]; + if (field.columnType === "SQLiteNumericBigInt") { + if (isSingleTable) { + chunk.push(sql`cast(${sql.identifier(this.casing.getColumnCasing(field))} as text)`); + } else { + chunk.push( + sql`cast(${sql.identifier(tableName)}.${sql.identifier(this.casing.getColumnCasing(field))} as text)` + ); + } + } else { + if (isSingleTable) { + chunk.push(sql.identifier(this.casing.getColumnCasing(field))); + } else { + chunk.push(sql`${sql.identifier(tableName)}.${sql.identifier(this.casing.getColumnCasing(field))}`); + } + } + } + if (i2 < columnsLen - 1) { + chunk.push(sql`, `); + } + return chunk; + }); + return sql.join(chunks); + } + buildJoins(joins) { + if (!joins || joins.length === 0) { + return void 0; + } + const joinsArray = []; + if (joins) { + for (const [index, joinMeta] of joins.entries()) { + if (index === 0) { + joinsArray.push(sql` `); + } + const table3 = joinMeta.table; + const onSql = joinMeta.on ? sql` on ${joinMeta.on}` : void 0; + if (is(table3, SQLiteTable)) { + const tableName = table3[SQLiteTable.Symbol.Name]; + const tableSchema = table3[SQLiteTable.Symbol.Schema]; + const origTableName = table3[SQLiteTable.Symbol.OriginalName]; + const alias = tableName === origTableName ? void 0 : joinMeta.alias; + joinsArray.push( + sql`${sql.raw(joinMeta.joinType)} join ${tableSchema ? sql`${sql.identifier(tableSchema)}.` : void 0}${sql.identifier(origTableName)}${alias && sql` ${sql.identifier(alias)}`}${onSql}` + ); + } else { + joinsArray.push( + sql`${sql.raw(joinMeta.joinType)} join ${table3}${onSql}` + ); + } + if (index < joins.length - 1) { + joinsArray.push(sql` `); + } + } + } + return sql.join(joinsArray); + } + buildLimit(limit) { + return typeof limit === "object" || typeof limit === "number" && limit >= 0 ? sql` limit ${limit}` : void 0; + } + buildOrderBy(orderBy) { + const orderByList = []; + if (orderBy) { + for (const [index, orderByValue] of orderBy.entries()) { + orderByList.push(orderByValue); + if (index < orderBy.length - 1) { + orderByList.push(sql`, `); + } + } + } + return orderByList.length > 0 ? sql` order by ${sql.join(orderByList)}` : void 0; + } + buildFromTable(table3) { + if (is(table3, Table) && table3[Table.Symbol.IsAlias]) { + return sql`${sql`${sql.identifier(table3[Table.Symbol.Schema] ?? "")}.`.if(table3[Table.Symbol.Schema])}${sql.identifier(table3[Table.Symbol.OriginalName])} ${sql.identifier(table3[Table.Symbol.Name])}`; + } + return table3; + } + buildSelectQuery({ + withList, + fields, + fieldsFlat, + where, + having, + table: table3, + joins, + orderBy, + groupBy, + limit, + offset, + distinct, + setOperators + }) { + const fieldsList = fieldsFlat ?? orderSelectedFields(fields); + for (const f2 of fieldsList) { + if (is(f2.field, Column) && getTableName(f2.field.table) !== (is(table3, Subquery) ? table3._.alias : is(table3, SQLiteViewBase) ? table3[ViewBaseConfig].name : is(table3, SQL) ? void 0 : getTableName(table3)) && !((table22) => joins?.some( + ({ alias }) => alias === (table22[Table.Symbol.IsAlias] ? getTableName(table22) : table22[Table.Symbol.BaseName]) + ))(f2.field.table)) { + const tableName = getTableName(f2.field.table); + throw new Error( + `Your "${f2.path.join("->")}" field references a column "${tableName}"."${f2.field.name}", but the table "${tableName}" is not part of the query! Did you forget to join it?` + ); + } + } + const isSingleTable = !joins || joins.length === 0; + const withSql = this.buildWithCTE(withList); + const distinctSql = distinct ? sql` distinct` : void 0; + const selection = this.buildSelection(fieldsList, { isSingleTable }); + const tableSql = this.buildFromTable(table3); + const joinsSql = this.buildJoins(joins); + const whereSql = where ? sql` where ${where}` : void 0; + const havingSql = having ? sql` having ${having}` : void 0; + const groupByList = []; + if (groupBy) { + for (const [index, groupByValue] of groupBy.entries()) { + groupByList.push(groupByValue); + if (index < groupBy.length - 1) { + groupByList.push(sql`, `); + } + } + } + const groupBySql = groupByList.length > 0 ? sql` group by ${sql.join(groupByList)}` : void 0; + const orderBySql = this.buildOrderBy(orderBy); + const limitSql = this.buildLimit(limit); + const offsetSql = offset ? sql` offset ${offset}` : void 0; + const finalQuery = sql`${withSql}select${distinctSql} ${selection} from ${tableSql}${joinsSql}${whereSql}${groupBySql}${havingSql}${orderBySql}${limitSql}${offsetSql}`; + if (setOperators.length > 0) { + return this.buildSetOperations(finalQuery, setOperators); + } + return finalQuery; + } + buildSetOperations(leftSelect, setOperators) { + const [setOperator, ...rest] = setOperators; + if (!setOperator) { + throw new Error("Cannot pass undefined values to any set operator"); + } + if (rest.length === 0) { + return this.buildSetOperationQuery({ leftSelect, setOperator }); + } + return this.buildSetOperations( + this.buildSetOperationQuery({ leftSelect, setOperator }), + rest + ); + } + buildSetOperationQuery({ + leftSelect, + setOperator: { type, isAll, rightSelect, limit, orderBy, offset } + }) { + const leftChunk = sql`${leftSelect.getSQL()} `; + const rightChunk = sql`${rightSelect.getSQL()}`; + let orderBySql; + if (orderBy && orderBy.length > 0) { + const orderByValues = []; + for (const singleOrderBy of orderBy) { + if (is(singleOrderBy, SQLiteColumn)) { + orderByValues.push(sql.identifier(singleOrderBy.name)); + } else if (is(singleOrderBy, SQL)) { + for (let i2 = 0; i2 < singleOrderBy.queryChunks.length; i2++) { + const chunk = singleOrderBy.queryChunks[i2]; + if (is(chunk, SQLiteColumn)) { + singleOrderBy.queryChunks[i2] = sql.identifier(this.casing.getColumnCasing(chunk)); + } + } + orderByValues.push(sql`${singleOrderBy}`); + } else { + orderByValues.push(sql`${singleOrderBy}`); + } + } + orderBySql = sql` order by ${sql.join(orderByValues, sql`, `)}`; + } + const limitSql = typeof limit === "object" || typeof limit === "number" && limit >= 0 ? sql` limit ${limit}` : void 0; + const operatorChunk = sql.raw(`${type} ${isAll ? "all " : ""}`); + const offsetSql = offset ? sql` offset ${offset}` : void 0; + return sql`${leftChunk}${operatorChunk}${rightChunk}${orderBySql}${limitSql}${offsetSql}`; + } + buildInsertQuery({ table: table3, values: valuesOrSelect, onConflict, returning, withList, select }) { + const valuesSqlList = []; + const columns = table3[Table.Symbol.Columns]; + const colEntries = Object.entries(columns).filter( + ([_, col]) => !col.shouldDisableInsert() + ); + const insertOrder = colEntries.map(([, column]) => sql.identifier(this.casing.getColumnCasing(column))); + if (select) { + const select2 = valuesOrSelect; + if (is(select2, SQL)) { + valuesSqlList.push(select2); + } else { + valuesSqlList.push(select2.getSQL()); + } + } else { + const values = valuesOrSelect; + valuesSqlList.push(sql.raw("values ")); + for (const [valueIndex, value] of values.entries()) { + const valueList = []; + for (const [fieldName, col] of colEntries) { + const colValue = value[fieldName]; + if (colValue === void 0 || is(colValue, Param) && colValue.value === void 0) { + let defaultValue; + if (col.default !== null && col.default !== void 0) { + defaultValue = is(col.default, SQL) ? col.default : sql.param(col.default, col); + } else if (col.defaultFn !== void 0) { + const defaultFnResult = col.defaultFn(); + defaultValue = is(defaultFnResult, SQL) ? defaultFnResult : sql.param(defaultFnResult, col); + } else if (!col.default && col.onUpdateFn !== void 0) { + const onUpdateFnResult = col.onUpdateFn(); + defaultValue = is(onUpdateFnResult, SQL) ? onUpdateFnResult : sql.param(onUpdateFnResult, col); + } else { + defaultValue = sql`null`; + } + valueList.push(defaultValue); + } else { + valueList.push(colValue); + } + } + valuesSqlList.push(valueList); + if (valueIndex < values.length - 1) { + valuesSqlList.push(sql`, `); + } + } + } + const withSql = this.buildWithCTE(withList); + const valuesSql = sql.join(valuesSqlList); + const returningSql = returning ? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}` : void 0; + const onConflictSql = onConflict?.length ? sql.join(onConflict) : void 0; + return sql`${withSql}insert into ${table3} ${insertOrder} ${valuesSql}${onConflictSql}${returningSql}`; + } + sqlToQuery(sql2, invokeSource) { + return sql2.toQuery({ + casing: this.casing, + escapeName: this.escapeName, + escapeParam: this.escapeParam, + escapeString: this.escapeString, + invokeSource + }); + } + buildRelationalQuery({ + fullSchema, + schema, + tableNamesMap, + table: table3, + tableConfig, + queryConfig: config3, + tableAlias, + nestedQueryRelation, + joinOn + }) { + let selection = []; + let limit, offset, orderBy = [], where; + const joins = []; + if (config3 === true) { + const selectionEntries = Object.entries(tableConfig.columns); + selection = selectionEntries.map(([key, value]) => ({ + dbKey: value.name, + tsKey: key, + field: aliasedTableColumn(value, tableAlias), + relationTableTsKey: void 0, + isJson: false, + selection: [] + })); + } else { + const aliasedColumns = Object.fromEntries( + Object.entries(tableConfig.columns).map(([key, value]) => [key, aliasedTableColumn(value, tableAlias)]) + ); + if (config3.where) { + const whereSql = typeof config3.where === "function" ? config3.where(aliasedColumns, getOperators()) : config3.where; + where = whereSql && mapColumnsInSQLToAlias(whereSql, tableAlias); + } + const fieldsSelection = []; + let selectedColumns = []; + if (config3.columns) { + let isIncludeMode = false; + for (const [field, value] of Object.entries(config3.columns)) { + if (value === void 0) { + continue; + } + if (field in tableConfig.columns) { + if (!isIncludeMode && value === true) { + isIncludeMode = true; + } + selectedColumns.push(field); + } + } + if (selectedColumns.length > 0) { + selectedColumns = isIncludeMode ? selectedColumns.filter((c2) => config3.columns?.[c2] === true) : Object.keys(tableConfig.columns).filter((key) => !selectedColumns.includes(key)); + } + } else { + selectedColumns = Object.keys(tableConfig.columns); + } + for (const field of selectedColumns) { + const column = tableConfig.columns[field]; + fieldsSelection.push({ tsKey: field, value: column }); + } + let selectedRelations = []; + if (config3.with) { + selectedRelations = Object.entries(config3.with).filter((entry) => !!entry[1]).map(([tsKey, queryConfig]) => ({ tsKey, queryConfig, relation: tableConfig.relations[tsKey] })); + } + let extras; + if (config3.extras) { + extras = typeof config3.extras === "function" ? config3.extras(aliasedColumns, { sql }) : config3.extras; + for (const [tsKey, value] of Object.entries(extras)) { + fieldsSelection.push({ + tsKey, + value: mapColumnsInAliasedSQLToAlias(value, tableAlias) + }); + } + } + for (const { tsKey, value } of fieldsSelection) { + selection.push({ + dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name, + tsKey, + field: is(value, Column) ? aliasedTableColumn(value, tableAlias) : value, + relationTableTsKey: void 0, + isJson: false, + selection: [] + }); + } + let orderByOrig = typeof config3.orderBy === "function" ? config3.orderBy(aliasedColumns, getOrderByOperators()) : config3.orderBy ?? []; + if (!Array.isArray(orderByOrig)) { + orderByOrig = [orderByOrig]; + } + orderBy = orderByOrig.map((orderByValue) => { + if (is(orderByValue, Column)) { + return aliasedTableColumn(orderByValue, tableAlias); + } + return mapColumnsInSQLToAlias(orderByValue, tableAlias); + }); + limit = config3.limit; + offset = config3.offset; + for (const { + tsKey: selectedRelationTsKey, + queryConfig: selectedRelationConfigValue, + relation + } of selectedRelations) { + const normalizedRelation = normalizeRelation(schema, tableNamesMap, relation); + const relationTableName = getTableUniqueName(relation.referencedTable); + const relationTableTsName = tableNamesMap[relationTableName]; + const relationTableAlias = `${tableAlias}_${selectedRelationTsKey}`; + const joinOn2 = and( + ...normalizedRelation.fields.map( + (field2, i2) => eq( + aliasedTableColumn(normalizedRelation.references[i2], relationTableAlias), + aliasedTableColumn(field2, tableAlias) + ) + ) + ); + const builtRelation = this.buildRelationalQuery({ + fullSchema, + schema, + tableNamesMap, + table: fullSchema[relationTableTsName], + tableConfig: schema[relationTableTsName], + queryConfig: is(relation, One) ? selectedRelationConfigValue === true ? { limit: 1 } : { ...selectedRelationConfigValue, limit: 1 } : selectedRelationConfigValue, + tableAlias: relationTableAlias, + joinOn: joinOn2, + nestedQueryRelation: relation + }); + const field = sql`(${builtRelation.sql})`.as(selectedRelationTsKey); + selection.push({ + dbKey: selectedRelationTsKey, + tsKey: selectedRelationTsKey, + field, + relationTableTsKey: relationTableTsName, + isJson: true, + selection: builtRelation.selection + }); + } + } + if (selection.length === 0) { + throw new DrizzleError({ + message: `No fields selected for table "${tableConfig.tsName}" ("${tableAlias}"). You need to have at least one item in "columns", "with" or "extras". If you need to select all columns, omit the "columns" key or set it to undefined.` + }); + } + let result; + where = and(joinOn, where); + if (nestedQueryRelation) { + let field = sql`json_array(${sql.join( + selection.map( + ({ field: field2 }) => is(field2, SQLiteColumn) ? sql.identifier(this.casing.getColumnCasing(field2)) : is(field2, SQL.Aliased) ? field2.sql : field2 + ), + sql`, ` + )})`; + if (is(nestedQueryRelation, Many)) { + field = sql`coalesce(json_group_array(${field}), json_array())`; + } + const nestedSelection = [{ + dbKey: "data", + tsKey: "data", + field: field.as("data"), + isJson: true, + relationTableTsKey: tableConfig.tsName, + selection + }]; + const needsSubquery = limit !== void 0 || offset !== void 0 || orderBy.length > 0; + if (needsSubquery) { + result = this.buildSelectQuery({ + table: aliasedTable(table3, tableAlias), + fields: {}, + fieldsFlat: [ + { + path: [], + field: sql.raw("*") + } + ], + where, + limit, + offset, + orderBy, + setOperators: [] + }); + where = void 0; + limit = void 0; + offset = void 0; + orderBy = void 0; + } else { + result = aliasedTable(table3, tableAlias); + } + result = this.buildSelectQuery({ + table: is(result, SQLiteTable) ? result : new Subquery(result, {}, tableAlias), + fields: {}, + fieldsFlat: nestedSelection.map(({ field: field2 }) => ({ + path: [], + field: is(field2, Column) ? aliasedTableColumn(field2, tableAlias) : field2 + })), + joins, + where, + limit, + offset, + orderBy, + setOperators: [] + }); + } else { + result = this.buildSelectQuery({ + table: aliasedTable(table3, tableAlias), + fields: {}, + fieldsFlat: selection.map(({ field }) => ({ + path: [], + field: is(field, Column) ? aliasedTableColumn(field, tableAlias) : field + })), + joins, + where, + limit, + offset, + orderBy, + setOperators: [] + }); + } + return { + tableTsKey: tableConfig.tsName, + sql: result, + selection + }; + } + }; + __name(SQLiteDialect, "SQLiteDialect"); + _a91 = entityKind; + __publicField(SQLiteDialect, _a91, "SQLiteDialect"); + SQLiteSyncDialect = class extends SQLiteDialect { + migrate(migrations, session, config3) { + const migrationsTable = config3 === void 0 ? "__drizzle_migrations" : typeof config3 === "string" ? "__drizzle_migrations" : config3.migrationsTable ?? "__drizzle_migrations"; + const migrationTableCreate = sql` + CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} ( + id SERIAL PRIMARY KEY, + hash text NOT NULL, + created_at numeric + ) + `; + session.run(migrationTableCreate); + const dbMigrations = session.values( + sql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1` + ); + const lastDbMigration = dbMigrations[0] ?? void 0; + session.run(sql`BEGIN`); + try { + for (const migration of migrations) { + if (!lastDbMigration || Number(lastDbMigration[2]) < migration.folderMillis) { + for (const stmt of migration.sql) { + session.run(sql.raw(stmt)); + } + session.run( + sql`INSERT INTO ${sql.identifier(migrationsTable)} ("hash", "created_at") VALUES(${migration.hash}, ${migration.folderMillis})` + ); + } + } + session.run(sql`COMMIT`); + } catch (e2) { + session.run(sql`ROLLBACK`); + throw e2; + } + } + }; + __name(SQLiteSyncDialect, "SQLiteSyncDialect"); + _a92 = entityKind; + __publicField(SQLiteSyncDialect, _a92, "SQLiteSyncDialect"); + SQLiteAsyncDialect = class extends SQLiteDialect { + async migrate(migrations, session, config3) { + const migrationsTable = config3 === void 0 ? "__drizzle_migrations" : typeof config3 === "string" ? "__drizzle_migrations" : config3.migrationsTable ?? "__drizzle_migrations"; + const migrationTableCreate = sql` + CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} ( + id SERIAL PRIMARY KEY, + hash text NOT NULL, + created_at numeric + ) + `; + await session.run(migrationTableCreate); + const dbMigrations = await session.values( + sql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1` + ); + const lastDbMigration = dbMigrations[0] ?? void 0; + await session.transaction(async (tx) => { + for (const migration of migrations) { + if (!lastDbMigration || Number(lastDbMigration[2]) < migration.folderMillis) { + for (const stmt of migration.sql) { + await tx.run(sql.raw(stmt)); + } + await tx.run( + sql`INSERT INTO ${sql.identifier(migrationsTable)} ("hash", "created_at") VALUES(${migration.hash}, ${migration.folderMillis})` + ); + } + } + }); + } + }; + __name(SQLiteAsyncDialect, "SQLiteAsyncDialect"); + _a93 = entityKind; + __publicField(SQLiteAsyncDialect, _a93, "SQLiteAsyncDialect"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/query-builders/query-builder.js +var _a94, TypedQueryBuilder; +var init_query_builder = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/query-builders/query-builder.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + TypedQueryBuilder = class { + /** @internal */ + getSelectedFields() { + return this._.selectedFields; + } + }; + __name(TypedQueryBuilder, "TypedQueryBuilder"); + _a94 = entityKind; + __publicField(TypedQueryBuilder, _a94, "TypedQueryBuilder"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.js +function createSetOperator(type, isAll) { + return (leftSelect, rightSelect, ...restSelects) => { + const setOperators = [rightSelect, ...restSelects].map((select) => ({ + type, + isAll, + rightSelect: select + })); + for (const setOperator of setOperators) { + if (!haveSameKeys(leftSelect.getSelectedFields(), setOperator.rightSelect.getSelectedFields())) { + throw new Error( + "Set operator error (union / intersect / except): selected fields are not the same or are in a different order" + ); + } + } + return leftSelect.addSetOperators(setOperators); + }; +} +var _a95, SQLiteSelectBuilder, _a96, SQLiteSelectQueryBuilderBase, _a97, SQLiteSelectBase, getSQLiteSetOperators, union, unionAll, intersect, except; +var init_select2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_builder(); + init_query_promise(); + init_selection_proxy(); + init_sql(); + init_subquery(); + init_table(); + init_utils2(); + init_view_common(); + init_utils3(); + init_view_base(); + SQLiteSelectBuilder = class { + fields; + session; + dialect; + withList; + distinct; + constructor(config3) { + this.fields = config3.fields; + this.session = config3.session; + this.dialect = config3.dialect; + this.withList = config3.withList; + this.distinct = config3.distinct; + } + from(source) { + const isPartialSelect = !!this.fields; + let fields; + if (this.fields) { + fields = this.fields; + } else if (is(source, Subquery)) { + fields = Object.fromEntries( + Object.keys(source._.selectedFields).map((key) => [key, source[key]]) + ); + } else if (is(source, SQLiteViewBase)) { + fields = source[ViewBaseConfig].selectedFields; + } else if (is(source, SQL)) { + fields = {}; + } else { + fields = getTableColumns(source); + } + return new SQLiteSelectBase({ + table: source, + fields, + isPartialSelect, + session: this.session, + dialect: this.dialect, + withList: this.withList, + distinct: this.distinct + }); + } + }; + __name(SQLiteSelectBuilder, "SQLiteSelectBuilder"); + _a95 = entityKind; + __publicField(SQLiteSelectBuilder, _a95, "SQLiteSelectBuilder"); + SQLiteSelectQueryBuilderBase = class extends TypedQueryBuilder { + _; + /** @internal */ + config; + joinsNotNullableMap; + tableName; + isPartialSelect; + session; + dialect; + cacheConfig = void 0; + usedTables = /* @__PURE__ */ new Set(); + constructor({ table: table3, fields, isPartialSelect, session, dialect, withList, distinct }) { + super(); + this.config = { + withList, + table: table3, + fields: { ...fields }, + distinct, + setOperators: [] + }; + this.isPartialSelect = isPartialSelect; + this.session = session; + this.dialect = dialect; + this._ = { + selectedFields: fields, + config: this.config + }; + this.tableName = getTableLikeName(table3); + this.joinsNotNullableMap = typeof this.tableName === "string" ? { [this.tableName]: true } : {}; + for (const item of extractUsedTable(table3)) + this.usedTables.add(item); + } + /** @internal */ + getUsedTables() { + return [...this.usedTables]; + } + createJoin(joinType) { + return (table3, on2) => { + const baseTableName = this.tableName; + const tableName = getTableLikeName(table3); + for (const item of extractUsedTable(table3)) + this.usedTables.add(item); + if (typeof tableName === "string" && this.config.joins?.some((join) => join.alias === tableName)) { + throw new Error(`Alias "${tableName}" is already used in this query`); + } + if (!this.isPartialSelect) { + if (Object.keys(this.joinsNotNullableMap).length === 1 && typeof baseTableName === "string") { + this.config.fields = { + [baseTableName]: this.config.fields + }; + } + if (typeof tableName === "string" && !is(table3, SQL)) { + const selection = is(table3, Subquery) ? table3._.selectedFields : is(table3, View) ? table3[ViewBaseConfig].selectedFields : table3[Table.Symbol.Columns]; + this.config.fields[tableName] = selection; + } + } + if (typeof on2 === "function") { + on2 = on2( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ) + ); + } + if (!this.config.joins) { + this.config.joins = []; + } + this.config.joins.push({ on: on2, table: table3, joinType, alias: tableName }); + if (typeof tableName === "string") { + switch (joinType) { + case "left": { + this.joinsNotNullableMap[tableName] = false; + break; + } + case "right": { + this.joinsNotNullableMap = Object.fromEntries( + Object.entries(this.joinsNotNullableMap).map(([key]) => [key, false]) + ); + this.joinsNotNullableMap[tableName] = true; + break; + } + case "cross": + case "inner": { + this.joinsNotNullableMap[tableName] = true; + break; + } + case "full": { + this.joinsNotNullableMap = Object.fromEntries( + Object.entries(this.joinsNotNullableMap).map(([key]) => [key, false]) + ); + this.joinsNotNullableMap[tableName] = false; + break; + } + } + } + return this; + }; + } + /** + * Executes a `left join` operation by adding another table to the current query. + * + * Calling this method associates each row of the table with the corresponding row from the joined table, if a match is found. If no matching row exists, it sets all columns of the joined table to null. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#left-join} + * + * @param table the table to join. + * @param on the `on` clause. + * + * @example + * + * ```ts + * // Select all users and their pets + * const usersWithPets: { user: User; pets: Pet | null; }[] = await db.select() + * .from(users) + * .leftJoin(pets, eq(users.id, pets.ownerId)) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number; petId: number | null; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .leftJoin(pets, eq(users.id, pets.ownerId)) + * ``` + */ + leftJoin = this.createJoin("left"); + /** + * Executes a `right join` operation by adding another table to the current query. + * + * Calling this method associates each row of the joined table with the corresponding row from the main table, if a match is found. If no matching row exists, it sets all columns of the main table to null. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#right-join} + * + * @param table the table to join. + * @param on the `on` clause. + * + * @example + * + * ```ts + * // Select all users and their pets + * const usersWithPets: { user: User | null; pets: Pet; }[] = await db.select() + * .from(users) + * .rightJoin(pets, eq(users.id, pets.ownerId)) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number | null; petId: number; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .rightJoin(pets, eq(users.id, pets.ownerId)) + * ``` + */ + rightJoin = this.createJoin("right"); + /** + * Executes an `inner join` operation, creating a new table by combining rows from two tables that have matching values. + * + * Calling this method retrieves rows that have corresponding entries in both joined tables. Rows without matching entries in either table are excluded, resulting in a table that includes only matching pairs. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#inner-join} + * + * @param table the table to join. + * @param on the `on` clause. + * + * @example + * + * ```ts + * // Select all users and their pets + * const usersWithPets: { user: User; pets: Pet; }[] = await db.select() + * .from(users) + * .innerJoin(pets, eq(users.id, pets.ownerId)) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number; petId: number; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .innerJoin(pets, eq(users.id, pets.ownerId)) + * ``` + */ + innerJoin = this.createJoin("inner"); + /** + * Executes a `full join` operation by combining rows from two tables into a new table. + * + * Calling this method retrieves all rows from both main and joined tables, merging rows with matching values and filling in `null` for non-matching columns. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#full-join} + * + * @param table the table to join. + * @param on the `on` clause. + * + * @example + * + * ```ts + * // Select all users and their pets + * const usersWithPets: { user: User | null; pets: Pet | null; }[] = await db.select() + * .from(users) + * .fullJoin(pets, eq(users.id, pets.ownerId)) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number | null; petId: number | null; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .fullJoin(pets, eq(users.id, pets.ownerId)) + * ``` + */ + fullJoin = this.createJoin("full"); + /** + * Executes a `cross join` operation by combining rows from two tables into a new table. + * + * Calling this method retrieves all rows from both main and joined tables, merging all rows from each table. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#cross-join} + * + * @param table the table to join. + * + * @example + * + * ```ts + * // Select all users, each user with every pet + * const usersWithPets: { user: User; pets: Pet; }[] = await db.select() + * .from(users) + * .crossJoin(pets) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number; petId: number; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .crossJoin(pets) + * ``` + */ + crossJoin = this.createJoin("cross"); + createSetOperator(type, isAll) { + return (rightSelection) => { + const rightSelect = typeof rightSelection === "function" ? rightSelection(getSQLiteSetOperators()) : rightSelection; + if (!haveSameKeys(this.getSelectedFields(), rightSelect.getSelectedFields())) { + throw new Error( + "Set operator error (union / intersect / except): selected fields are not the same or are in a different order" + ); + } + this.config.setOperators.push({ type, isAll, rightSelect }); + return this; + }; + } + /** + * Adds `union` set operator to the query. + * + * Calling this method will combine the result sets of the `select` statements and remove any duplicate rows that appear across them. + * + * See docs: {@link https://orm.drizzle.team/docs/set-operations#union} + * + * @example + * + * ```ts + * // Select all unique names from customers and users tables + * await db.select({ name: users.name }) + * .from(users) + * .union( + * db.select({ name: customers.name }).from(customers) + * ); + * // or + * import { union } from 'drizzle-orm/sqlite-core' + * + * await union( + * db.select({ name: users.name }).from(users), + * db.select({ name: customers.name }).from(customers) + * ); + * ``` + */ + union = this.createSetOperator("union", false); + /** + * Adds `union all` set operator to the query. + * + * Calling this method will combine the result-set of the `select` statements and keep all duplicate rows that appear across them. + * + * See docs: {@link https://orm.drizzle.team/docs/set-operations#union-all} + * + * @example + * + * ```ts + * // Select all transaction ids from both online and in-store sales + * await db.select({ transaction: onlineSales.transactionId }) + * .from(onlineSales) + * .unionAll( + * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales) + * ); + * // or + * import { unionAll } from 'drizzle-orm/sqlite-core' + * + * await unionAll( + * db.select({ transaction: onlineSales.transactionId }).from(onlineSales), + * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales) + * ); + * ``` + */ + unionAll = this.createSetOperator("union", true); + /** + * Adds `intersect` set operator to the query. + * + * Calling this method will retain only the rows that are present in both result sets and eliminate duplicates. + * + * See docs: {@link https://orm.drizzle.team/docs/set-operations#intersect} + * + * @example + * + * ```ts + * // Select course names that are offered in both departments A and B + * await db.select({ courseName: depA.courseName }) + * .from(depA) + * .intersect( + * db.select({ courseName: depB.courseName }).from(depB) + * ); + * // or + * import { intersect } from 'drizzle-orm/sqlite-core' + * + * await intersect( + * db.select({ courseName: depA.courseName }).from(depA), + * db.select({ courseName: depB.courseName }).from(depB) + * ); + * ``` + */ + intersect = this.createSetOperator("intersect", false); + /** + * Adds `except` set operator to the query. + * + * Calling this method will retrieve all unique rows from the left query, except for the rows that are present in the result set of the right query. + * + * See docs: {@link https://orm.drizzle.team/docs/set-operations#except} + * + * @example + * + * ```ts + * // Select all courses offered in department A but not in department B + * await db.select({ courseName: depA.courseName }) + * .from(depA) + * .except( + * db.select({ courseName: depB.courseName }).from(depB) + * ); + * // or + * import { except } from 'drizzle-orm/sqlite-core' + * + * await except( + * db.select({ courseName: depA.courseName }).from(depA), + * db.select({ courseName: depB.courseName }).from(depB) + * ); + * ``` + */ + except = this.createSetOperator("except", false); + /** @internal */ + addSetOperators(setOperators) { + this.config.setOperators.push(...setOperators); + return this; + } + /** + * Adds a `where` clause to the query. + * + * Calling this method will select only those rows that fulfill a specified condition. + * + * See docs: {@link https://orm.drizzle.team/docs/select#filtering} + * + * @param where the `where` clause. + * + * @example + * You can use conditional operators and `sql function` to filter the rows to be selected. + * + * ```ts + * // Select all cars with green color + * await db.select().from(cars).where(eq(cars.color, 'green')); + * // or + * await db.select().from(cars).where(sql`${cars.color} = 'green'`) + * ``` + * + * You can logically combine conditional operators with `and()` and `or()` operators: + * + * ```ts + * // Select all BMW cars with a green color + * await db.select().from(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW'))); + * + * // Select all cars with the green or blue color + * await db.select().from(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue'))); + * ``` + */ + where(where) { + if (typeof where === "function") { + where = where( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ) + ); + } + this.config.where = where; + return this; + } + /** + * Adds a `having` clause to the query. + * + * Calling this method will select only those rows that fulfill a specified condition. It is typically used with aggregate functions to filter the aggregated data based on a specified condition. + * + * See docs: {@link https://orm.drizzle.team/docs/select#aggregations} + * + * @param having the `having` clause. + * + * @example + * + * ```ts + * // Select all brands with more than one car + * await db.select({ + * brand: cars.brand, + * count: sql`cast(count(${cars.id}) as int)`, + * }) + * .from(cars) + * .groupBy(cars.brand) + * .having(({ count }) => gt(count, 1)); + * ``` + */ + having(having) { + if (typeof having === "function") { + having = having( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ) + ); + } + this.config.having = having; + return this; + } + groupBy(...columns) { + if (typeof columns[0] === "function") { + const groupBy = columns[0]( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" }) + ) + ); + this.config.groupBy = Array.isArray(groupBy) ? groupBy : [groupBy]; + } else { + this.config.groupBy = columns; + } + return this; + } + orderBy(...columns) { + if (typeof columns[0] === "function") { + const orderBy = columns[0]( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" }) + ) + ); + const orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy]; + if (this.config.setOperators.length > 0) { + this.config.setOperators.at(-1).orderBy = orderByArray; + } else { + this.config.orderBy = orderByArray; + } + } else { + const orderByArray = columns; + if (this.config.setOperators.length > 0) { + this.config.setOperators.at(-1).orderBy = orderByArray; + } else { + this.config.orderBy = orderByArray; + } + } + return this; + } + /** + * Adds a `limit` clause to the query. + * + * Calling this method will set the maximum number of rows that will be returned by this query. + * + * See docs: {@link https://orm.drizzle.team/docs/select#limit--offset} + * + * @param limit the `limit` clause. + * + * @example + * + * ```ts + * // Get the first 10 people from this query. + * await db.select().from(people).limit(10); + * ``` + */ + limit(limit) { + if (this.config.setOperators.length > 0) { + this.config.setOperators.at(-1).limit = limit; + } else { + this.config.limit = limit; + } + return this; + } + /** + * Adds an `offset` clause to the query. + * + * Calling this method will skip a number of rows when returning results from this query. + * + * See docs: {@link https://orm.drizzle.team/docs/select#limit--offset} + * + * @param offset the `offset` clause. + * + * @example + * + * ```ts + * // Get the 10th-20th people from this query. + * await db.select().from(people).offset(10).limit(10); + * ``` + */ + offset(offset) { + if (this.config.setOperators.length > 0) { + this.config.setOperators.at(-1).offset = offset; + } else { + this.config.offset = offset; + } + return this; + } + /** @internal */ + getSQL() { + return this.dialect.buildSelectQuery(this.config); + } + toSQL() { + const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL()); + return rest; + } + as(alias) { + const usedTables = []; + usedTables.push(...extractUsedTable(this.config.table)); + if (this.config.joins) { + for (const it of this.config.joins) + usedTables.push(...extractUsedTable(it.table)); + } + return new Proxy( + new Subquery(this.getSQL(), this.config.fields, alias, false, [...new Set(usedTables)]), + new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" }) + ); + } + /** @internal */ + getSelectedFields() { + return new Proxy( + this.config.fields, + new SelectionProxyHandler({ alias: this.tableName, sqlAliasedBehavior: "alias", sqlBehavior: "error" }) + ); + } + $dynamic() { + return this; + } + }; + __name(SQLiteSelectQueryBuilderBase, "SQLiteSelectQueryBuilderBase"); + _a96 = entityKind; + __publicField(SQLiteSelectQueryBuilderBase, _a96, "SQLiteSelectQueryBuilder"); + SQLiteSelectBase = class extends SQLiteSelectQueryBuilderBase { + /** @internal */ + _prepare(isOneTimeQuery = true) { + if (!this.session) { + throw new Error("Cannot execute a query on a query builder. Please use a database instance instead."); + } + const fieldsList = orderSelectedFields(this.config.fields); + const query = this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + this.dialect.sqlToQuery(this.getSQL()), + fieldsList, + "all", + true, + void 0, + { + type: "select", + tables: [...this.usedTables] + }, + this.cacheConfig + ); + query.joinsNotNullableMap = this.joinsNotNullableMap; + return query; + } + $withCache(config3) { + this.cacheConfig = config3 === void 0 ? { config: {}, enable: true, autoInvalidate: true } : config3 === false ? { enable: false } : { enable: true, autoInvalidate: true, ...config3 }; + return this; + } + prepare() { + return this._prepare(false); + } + run = (placeholderValues) => { + return this._prepare().run(placeholderValues); + }; + all = (placeholderValues) => { + return this._prepare().all(placeholderValues); + }; + get = (placeholderValues) => { + return this._prepare().get(placeholderValues); + }; + values = (placeholderValues) => { + return this._prepare().values(placeholderValues); + }; + async execute() { + return this.all(); + } + }; + __name(SQLiteSelectBase, "SQLiteSelectBase"); + _a97 = entityKind; + __publicField(SQLiteSelectBase, _a97, "SQLiteSelect"); + applyMixins(SQLiteSelectBase, [QueryPromise]); + __name(createSetOperator, "createSetOperator"); + getSQLiteSetOperators = /* @__PURE__ */ __name(() => ({ + union, + unionAll, + intersect, + except + }), "getSQLiteSetOperators"); + union = createSetOperator("union", false); + unionAll = createSetOperator("union", true); + intersect = createSetOperator("intersect", false); + except = createSetOperator("except", false); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/query-builder.js +var _a98, QueryBuilder; +var init_query_builder2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/query-builder.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_selection_proxy(); + init_dialect(); + init_subquery(); + init_select2(); + QueryBuilder = class { + dialect; + dialectConfig; + constructor(dialect) { + this.dialect = is(dialect, SQLiteDialect) ? dialect : void 0; + this.dialectConfig = is(dialect, SQLiteDialect) ? void 0 : dialect; + } + $with = (alias, selection) => { + const queryBuilder = this; + const as2 = /* @__PURE__ */ __name((qb) => { + if (typeof qb === "function") { + qb = qb(queryBuilder); + } + return new Proxy( + new WithSubquery( + qb.getSQL(), + selection ?? ("getSelectedFields" in qb ? qb.getSelectedFields() ?? {} : {}), + alias, + true + ), + new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" }) + ); + }, "as"); + return { as: as2 }; + }; + with(...queries) { + const self2 = this; + function select(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: void 0, + dialect: self2.getDialect(), + withList: queries + }); + } + __name(select, "select"); + function selectDistinct(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: void 0, + dialect: self2.getDialect(), + withList: queries, + distinct: true + }); + } + __name(selectDistinct, "selectDistinct"); + return { select, selectDistinct }; + } + select(fields) { + return new SQLiteSelectBuilder({ fields: fields ?? void 0, session: void 0, dialect: this.getDialect() }); + } + selectDistinct(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: void 0, + dialect: this.getDialect(), + distinct: true + }); + } + // Lazy load dialect to avoid circular dependency + getDialect() { + if (!this.dialect) { + this.dialect = new SQLiteSyncDialect(this.dialectConfig); + } + return this.dialect; + } + }; + __name(QueryBuilder, "QueryBuilder"); + _a98 = entityKind; + __publicField(QueryBuilder, _a98, "SQLiteQueryBuilder"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js +var _a99, SQLiteInsertBuilder, _a100, SQLiteInsertBase; +var init_insert = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + init_sql(); + init_table3(); + init_table(); + init_utils2(); + init_utils3(); + init_query_builder2(); + SQLiteInsertBuilder = class { + constructor(table3, session, dialect, withList) { + this.table = table3; + this.session = session; + this.dialect = dialect; + this.withList = withList; + } + values(values) { + values = Array.isArray(values) ? values : [values]; + if (values.length === 0) { + throw new Error("values() must be called with at least one value"); + } + const mappedValues = values.map((entry) => { + const result = {}; + const cols = this.table[Table.Symbol.Columns]; + for (const colKey of Object.keys(entry)) { + const colValue = entry[colKey]; + result[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]); + } + return result; + }); + return new SQLiteInsertBase(this.table, mappedValues, this.session, this.dialect, this.withList); + } + select(selectQuery) { + const select = typeof selectQuery === "function" ? selectQuery(new QueryBuilder()) : selectQuery; + if (!is(select, SQL) && !haveSameKeys(this.table[Columns], select._.selectedFields)) { + throw new Error( + "Insert select error: selected fields are not the same or are in a different order compared to the table definition" + ); + } + return new SQLiteInsertBase(this.table, select, this.session, this.dialect, this.withList, true); + } + }; + __name(SQLiteInsertBuilder, "SQLiteInsertBuilder"); + _a99 = entityKind; + __publicField(SQLiteInsertBuilder, _a99, "SQLiteInsertBuilder"); + SQLiteInsertBase = class extends QueryPromise { + constructor(table3, values, session, dialect, withList, select) { + super(); + this.session = session; + this.dialect = dialect; + this.config = { table: table3, values, withList, select }; + } + /** @internal */ + config; + returning(fields = this.config.table[SQLiteTable.Symbol.Columns]) { + this.config.returning = orderSelectedFields(fields); + return this; + } + /** + * Adds an `on conflict do nothing` clause to the query. + * + * Calling this method simply avoids inserting a row as its alternative action. + * + * See docs: {@link https://orm.drizzle.team/docs/insert#on-conflict-do-nothing} + * + * @param config The `target` and `where` clauses. + * + * @example + * ```ts + * // Insert one row and cancel the insert if there's a conflict + * await db.insert(cars) + * .values({ id: 1, brand: 'BMW' }) + * .onConflictDoNothing(); + * + * // Explicitly specify conflict target + * await db.insert(cars) + * .values({ id: 1, brand: 'BMW' }) + * .onConflictDoNothing({ target: cars.id }); + * ``` + */ + onConflictDoNothing(config3 = {}) { + if (!this.config.onConflict) + this.config.onConflict = []; + if (config3.target === void 0) { + this.config.onConflict.push(sql` on conflict do nothing`); + } else { + const targetSql = Array.isArray(config3.target) ? sql`${config3.target}` : sql`${[config3.target]}`; + const whereSql = config3.where ? sql` where ${config3.where}` : sql``; + this.config.onConflict.push(sql` on conflict ${targetSql} do nothing${whereSql}`); + } + return this; + } + /** + * Adds an `on conflict do update` clause to the query. + * + * Calling this method will update the existing row that conflicts with the row proposed for insertion as its alternative action. + * + * See docs: {@link https://orm.drizzle.team/docs/insert#upserts-and-conflicts} + * + * @param config The `target`, `set` and `where` clauses. + * + * @example + * ```ts + * // Update the row if there's a conflict + * await db.insert(cars) + * .values({ id: 1, brand: 'BMW' }) + * .onConflictDoUpdate({ + * target: cars.id, + * set: { brand: 'Porsche' } + * }); + * + * // Upsert with 'where' clause + * await db.insert(cars) + * .values({ id: 1, brand: 'BMW' }) + * .onConflictDoUpdate({ + * target: cars.id, + * set: { brand: 'newBMW' }, + * where: sql`${cars.createdAt} > '2023-01-01'::date`, + * }); + * ``` + */ + onConflictDoUpdate(config3) { + if (config3.where && (config3.targetWhere || config3.setWhere)) { + throw new Error( + 'You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.' + ); + } + if (!this.config.onConflict) + this.config.onConflict = []; + const whereSql = config3.where ? sql` where ${config3.where}` : void 0; + const targetWhereSql = config3.targetWhere ? sql` where ${config3.targetWhere}` : void 0; + const setWhereSql = config3.setWhere ? sql` where ${config3.setWhere}` : void 0; + const targetSql = Array.isArray(config3.target) ? sql`${config3.target}` : sql`${[config3.target]}`; + const setSql = this.dialect.buildUpdateSet(this.config.table, mapUpdateSet(this.config.table, config3.set)); + this.config.onConflict.push( + sql` on conflict ${targetSql}${targetWhereSql} do update set ${setSql}${whereSql}${setWhereSql}` + ); + return this; + } + /** @internal */ + getSQL() { + return this.dialect.buildInsertQuery(this.config); + } + toSQL() { + const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL()); + return rest; + } + /** @internal */ + _prepare(isOneTimeQuery = true) { + return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + this.dialect.sqlToQuery(this.getSQL()), + this.config.returning, + this.config.returning ? "all" : "run", + true, + void 0, + { + type: "insert", + tables: extractUsedTable(this.config.table) + } + ); + } + prepare() { + return this._prepare(false); + } + run = (placeholderValues) => { + return this._prepare().run(placeholderValues); + }; + all = (placeholderValues) => { + return this._prepare().all(placeholderValues); + }; + get = (placeholderValues) => { + return this._prepare().get(placeholderValues); + }; + values = (placeholderValues) => { + return this._prepare().values(placeholderValues); + }; + async execute() { + return this.config.returning ? this.all() : this.run(); + } + $dynamic() { + return this; + } + }; + __name(SQLiteInsertBase, "SQLiteInsertBase"); + _a100 = entityKind; + __publicField(SQLiteInsertBase, _a100, "SQLiteInsert"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.types.js +var init_select_types = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/update.js +var _a101, SQLiteUpdateBuilder, _a102, SQLiteUpdateBase; +var init_update = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/update.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + init_selection_proxy(); + init_table3(); + init_subquery(); + init_table(); + init_utils2(); + init_view_common(); + init_utils3(); + init_view_base(); + SQLiteUpdateBuilder = class { + constructor(table3, session, dialect, withList) { + this.table = table3; + this.session = session; + this.dialect = dialect; + this.withList = withList; + } + set(values) { + return new SQLiteUpdateBase( + this.table, + mapUpdateSet(this.table, values), + this.session, + this.dialect, + this.withList + ); + } + }; + __name(SQLiteUpdateBuilder, "SQLiteUpdateBuilder"); + _a101 = entityKind; + __publicField(SQLiteUpdateBuilder, _a101, "SQLiteUpdateBuilder"); + SQLiteUpdateBase = class extends QueryPromise { + constructor(table3, set2, session, dialect, withList) { + super(); + this.session = session; + this.dialect = dialect; + this.config = { set: set2, table: table3, withList, joins: [] }; + } + /** @internal */ + config; + from(source) { + this.config.from = source; + return this; + } + createJoin(joinType) { + return (table3, on2) => { + const tableName = getTableLikeName(table3); + if (typeof tableName === "string" && this.config.joins.some((join) => join.alias === tableName)) { + throw new Error(`Alias "${tableName}" is already used in this query`); + } + if (typeof on2 === "function") { + const from = this.config.from ? is(table3, SQLiteTable) ? table3[Table.Symbol.Columns] : is(table3, Subquery) ? table3._.selectedFields : is(table3, SQLiteViewBase) ? table3[ViewBaseConfig].selectedFields : void 0 : void 0; + on2 = on2( + new Proxy( + this.config.table[Table.Symbol.Columns], + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ), + from && new Proxy( + from, + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ) + ); + } + this.config.joins.push({ on: on2, table: table3, joinType, alias: tableName }); + return this; + }; + } + leftJoin = this.createJoin("left"); + rightJoin = this.createJoin("right"); + innerJoin = this.createJoin("inner"); + fullJoin = this.createJoin("full"); + /** + * Adds a 'where' clause to the query. + * + * Calling this method will update only those rows that fulfill a specified condition. + * + * See docs: {@link https://orm.drizzle.team/docs/update} + * + * @param where the 'where' clause. + * + * @example + * You can use conditional operators and `sql function` to filter the rows to be updated. + * + * ```ts + * // Update all cars with green color + * db.update(cars).set({ color: 'red' }) + * .where(eq(cars.color, 'green')); + * // or + * db.update(cars).set({ color: 'red' }) + * .where(sql`${cars.color} = 'green'`) + * ``` + * + * You can logically combine conditional operators with `and()` and `or()` operators: + * + * ```ts + * // Update all BMW cars with a green color + * db.update(cars).set({ color: 'red' }) + * .where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW'))); + * + * // Update all cars with the green or blue color + * db.update(cars).set({ color: 'red' }) + * .where(or(eq(cars.color, 'green'), eq(cars.color, 'blue'))); + * ``` + */ + where(where) { + this.config.where = where; + return this; + } + orderBy(...columns) { + if (typeof columns[0] === "function") { + const orderBy = columns[0]( + new Proxy( + this.config.table[Table.Symbol.Columns], + new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" }) + ) + ); + const orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy]; + this.config.orderBy = orderByArray; + } else { + const orderByArray = columns; + this.config.orderBy = orderByArray; + } + return this; + } + limit(limit) { + this.config.limit = limit; + return this; + } + returning(fields = this.config.table[SQLiteTable.Symbol.Columns]) { + this.config.returning = orderSelectedFields(fields); + return this; + } + /** @internal */ + getSQL() { + return this.dialect.buildUpdateQuery(this.config); + } + toSQL() { + const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL()); + return rest; + } + /** @internal */ + _prepare(isOneTimeQuery = true) { + return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + this.dialect.sqlToQuery(this.getSQL()), + this.config.returning, + this.config.returning ? "all" : "run", + true, + void 0, + { + type: "insert", + tables: extractUsedTable(this.config.table) + } + ); + } + prepare() { + return this._prepare(false); + } + run = (placeholderValues) => { + return this._prepare().run(placeholderValues); + }; + all = (placeholderValues) => { + return this._prepare().all(placeholderValues); + }; + get = (placeholderValues) => { + return this._prepare().get(placeholderValues); + }; + values = (placeholderValues) => { + return this._prepare().values(placeholderValues); + }; + async execute() { + return this.config.returning ? this.all() : this.run(); + } + $dynamic() { + return this; + } + }; + __name(SQLiteUpdateBase, "SQLiteUpdateBase"); + _a102 = entityKind; + __publicField(SQLiteUpdateBase, _a102, "SQLiteUpdate"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/index.js +var init_query_builders = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_delete(); + init_insert(); + init_query_builder2(); + init_select2(); + init_select_types(); + init_update(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/count.js +var _a103, _SQLiteCountBuilder, SQLiteCountBuilder; +var init_count = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/count.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_sql(); + _SQLiteCountBuilder = class extends SQL { + constructor(params) { + super(_SQLiteCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks); + this.params = params; + this.session = params.session; + this.sql = _SQLiteCountBuilder.buildCount( + params.source, + params.filters + ); + } + sql; + [(_a103 = entityKind, Symbol.toStringTag)] = "SQLiteCountBuilderAsync"; + session; + static buildEmbeddedCount(source, filters) { + return sql`(select count(*) from ${source}${sql.raw(" where ").if(filters)}${filters})`; + } + static buildCount(source, filters) { + return sql`select count(*) from ${source}${sql.raw(" where ").if(filters)}${filters}`; + } + then(onfulfilled, onrejected) { + return Promise.resolve(this.session.count(this.sql)).then( + onfulfilled, + onrejected + ); + } + catch(onRejected) { + return this.then(void 0, onRejected); + } + finally(onFinally) { + return this.then( + (value) => { + onFinally?.(); + return value; + }, + (reason) => { + onFinally?.(); + throw reason; + } + ); + } + }; + SQLiteCountBuilder = _SQLiteCountBuilder; + __name(SQLiteCountBuilder, "SQLiteCountBuilder"); + __publicField(SQLiteCountBuilder, _a103, "SQLiteCountBuilderAsync"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/query.js +var _a104, RelationalQueryBuilder, _a105, SQLiteRelationalQuery, _a106, SQLiteSyncRelationalQuery; +var init_query = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/query.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + init_relations(); + RelationalQueryBuilder = class { + constructor(mode, fullSchema, schema, tableNamesMap, table3, tableConfig, dialect, session) { + this.mode = mode; + this.fullSchema = fullSchema; + this.schema = schema; + this.tableNamesMap = tableNamesMap; + this.table = table3; + this.tableConfig = tableConfig; + this.dialect = dialect; + this.session = session; + } + findMany(config3) { + return this.mode === "sync" ? new SQLiteSyncRelationalQuery( + this.fullSchema, + this.schema, + this.tableNamesMap, + this.table, + this.tableConfig, + this.dialect, + this.session, + config3 ? config3 : {}, + "many" + ) : new SQLiteRelationalQuery( + this.fullSchema, + this.schema, + this.tableNamesMap, + this.table, + this.tableConfig, + this.dialect, + this.session, + config3 ? config3 : {}, + "many" + ); + } + findFirst(config3) { + return this.mode === "sync" ? new SQLiteSyncRelationalQuery( + this.fullSchema, + this.schema, + this.tableNamesMap, + this.table, + this.tableConfig, + this.dialect, + this.session, + config3 ? { ...config3, limit: 1 } : { limit: 1 }, + "first" + ) : new SQLiteRelationalQuery( + this.fullSchema, + this.schema, + this.tableNamesMap, + this.table, + this.tableConfig, + this.dialect, + this.session, + config3 ? { ...config3, limit: 1 } : { limit: 1 }, + "first" + ); + } + }; + __name(RelationalQueryBuilder, "RelationalQueryBuilder"); + _a104 = entityKind; + __publicField(RelationalQueryBuilder, _a104, "SQLiteAsyncRelationalQueryBuilder"); + SQLiteRelationalQuery = class extends QueryPromise { + constructor(fullSchema, schema, tableNamesMap, table3, tableConfig, dialect, session, config3, mode) { + super(); + this.fullSchema = fullSchema; + this.schema = schema; + this.tableNamesMap = tableNamesMap; + this.table = table3; + this.tableConfig = tableConfig; + this.dialect = dialect; + this.session = session; + this.config = config3; + this.mode = mode; + } + /** @internal */ + mode; + /** @internal */ + getSQL() { + return this.dialect.buildRelationalQuery({ + fullSchema: this.fullSchema, + schema: this.schema, + tableNamesMap: this.tableNamesMap, + table: this.table, + tableConfig: this.tableConfig, + queryConfig: this.config, + tableAlias: this.tableConfig.tsName + }).sql; + } + /** @internal */ + _prepare(isOneTimeQuery = false) { + const { query, builtQuery } = this._toSQL(); + return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + builtQuery, + void 0, + this.mode === "first" ? "get" : "all", + true, + (rawRows, mapColumnValue) => { + const rows = rawRows.map( + (row) => mapRelationalRow(this.schema, this.tableConfig, row, query.selection, mapColumnValue) + ); + if (this.mode === "first") { + return rows[0]; + } + return rows; + } + ); + } + prepare() { + return this._prepare(false); + } + _toSQL() { + const query = this.dialect.buildRelationalQuery({ + fullSchema: this.fullSchema, + schema: this.schema, + tableNamesMap: this.tableNamesMap, + table: this.table, + tableConfig: this.tableConfig, + queryConfig: this.config, + tableAlias: this.tableConfig.tsName + }); + const builtQuery = this.dialect.sqlToQuery(query.sql); + return { query, builtQuery }; + } + toSQL() { + return this._toSQL().builtQuery; + } + /** @internal */ + executeRaw() { + if (this.mode === "first") { + return this._prepare(false).get(); + } + return this._prepare(false).all(); + } + async execute() { + return this.executeRaw(); + } + }; + __name(SQLiteRelationalQuery, "SQLiteRelationalQuery"); + _a105 = entityKind; + __publicField(SQLiteRelationalQuery, _a105, "SQLiteAsyncRelationalQuery"); + SQLiteSyncRelationalQuery = class extends SQLiteRelationalQuery { + sync() { + return this.executeRaw(); + } + }; + __name(SQLiteSyncRelationalQuery, "SQLiteSyncRelationalQuery"); + _a106 = entityKind; + __publicField(SQLiteSyncRelationalQuery, _a106, "SQLiteSyncRelationalQuery"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/raw.js +var _a107, SQLiteRaw; +var init_raw = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/raw.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + SQLiteRaw = class extends QueryPromise { + constructor(execute, getSQL, action, dialect, mapBatchResult) { + super(); + this.execute = execute; + this.getSQL = getSQL; + this.dialect = dialect; + this.mapBatchResult = mapBatchResult; + this.config = { action }; + } + /** @internal */ + config; + getQuery() { + return { ...this.dialect.sqlToQuery(this.getSQL()), method: this.config.action }; + } + mapResult(result, isFromBatch) { + return isFromBatch ? this.mapBatchResult(result) : result; + } + _prepare() { + return this; + } + /** @internal */ + isResponseInArrayMode() { + return false; + } + }; + __name(SQLiteRaw, "SQLiteRaw"); + _a107 = entityKind; + __publicField(SQLiteRaw, _a107, "SQLiteRaw"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/db.js +var _a108, BaseSQLiteDatabase; +var init_db = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/db.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_selection_proxy(); + init_sql(); + init_query_builders(); + init_subquery(); + init_count(); + init_query(); + init_raw(); + BaseSQLiteDatabase = class { + constructor(resultKind, dialect, session, schema) { + this.resultKind = resultKind; + this.dialect = dialect; + this.session = session; + this._ = schema ? { + schema: schema.schema, + fullSchema: schema.fullSchema, + tableNamesMap: schema.tableNamesMap + } : { + schema: void 0, + fullSchema: {}, + tableNamesMap: {} + }; + this.query = {}; + const query = this.query; + if (this._.schema) { + for (const [tableName, columns] of Object.entries(this._.schema)) { + query[tableName] = new RelationalQueryBuilder( + resultKind, + schema.fullSchema, + this._.schema, + this._.tableNamesMap, + schema.fullSchema[tableName], + columns, + dialect, + session + ); + } + } + this.$cache = { invalidate: async (_params) => { + } }; + } + query; + /** + * Creates a subquery that defines a temporary named result set as a CTE. + * + * It is useful for breaking down complex queries into simpler parts and for reusing the result set in subsequent parts of the query. + * + * See docs: {@link https://orm.drizzle.team/docs/select#with-clause} + * + * @param alias The alias for the subquery. + * + * Failure to provide an alias will result in a DrizzleTypeError, preventing the subquery from being referenced in other queries. + * + * @example + * + * ```ts + * // Create a subquery with alias 'sq' and use it in the select query + * const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42))); + * + * const result = await db.with(sq).select().from(sq); + * ``` + * + * To select arbitrary SQL values as fields in a CTE and reference them in other CTEs or in the main query, you need to add aliases to them: + * + * ```ts + * // Select an arbitrary SQL value as a field in a CTE and reference it in the main query + * const sq = db.$with('sq').as(db.select({ + * name: sql`upper(${users.name})`.as('name'), + * }) + * .from(users)); + * + * const result = await db.with(sq).select({ name: sq.name }).from(sq); + * ``` + */ + $with = (alias, selection) => { + const self2 = this; + const as2 = /* @__PURE__ */ __name((qb) => { + if (typeof qb === "function") { + qb = qb(new QueryBuilder(self2.dialect)); + } + return new Proxy( + new WithSubquery( + qb.getSQL(), + selection ?? ("getSelectedFields" in qb ? qb.getSelectedFields() ?? {} : {}), + alias, + true + ), + new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" }) + ); + }, "as"); + return { as: as2 }; + }; + $count(source, filters) { + return new SQLiteCountBuilder({ source, filters, session: this.session }); + } + /** + * Incorporates a previously defined CTE (using `$with`) into the main query. + * + * This method allows the main query to reference a temporary named result set. + * + * See docs: {@link https://orm.drizzle.team/docs/select#with-clause} + * + * @param queries The CTEs to incorporate into the main query. + * + * @example + * + * ```ts + * // Define a subquery 'sq' as a CTE using $with + * const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42))); + * + * // Incorporate the CTE 'sq' into the main query and select from it + * const result = await db.with(sq).select().from(sq); + * ``` + */ + with(...queries) { + const self2 = this; + function select(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: self2.session, + dialect: self2.dialect, + withList: queries + }); + } + __name(select, "select"); + function selectDistinct(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: self2.session, + dialect: self2.dialect, + withList: queries, + distinct: true + }); + } + __name(selectDistinct, "selectDistinct"); + function update(table3) { + return new SQLiteUpdateBuilder(table3, self2.session, self2.dialect, queries); + } + __name(update, "update"); + function insert(into) { + return new SQLiteInsertBuilder(into, self2.session, self2.dialect, queries); + } + __name(insert, "insert"); + function delete_(from) { + return new SQLiteDeleteBase(from, self2.session, self2.dialect, queries); + } + __name(delete_, "delete_"); + return { select, selectDistinct, update, insert, delete: delete_ }; + } + select(fields) { + return new SQLiteSelectBuilder({ fields: fields ?? void 0, session: this.session, dialect: this.dialect }); + } + selectDistinct(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: this.session, + dialect: this.dialect, + distinct: true + }); + } + /** + * Creates an update query. + * + * Calling this method without `.where()` clause will update all rows in a table. The `.where()` clause specifies which rows should be updated. + * + * Use `.set()` method to specify which values to update. + * + * See docs: {@link https://orm.drizzle.team/docs/update} + * + * @param table The table to update. + * + * @example + * + * ```ts + * // Update all rows in the 'cars' table + * await db.update(cars).set({ color: 'red' }); + * + * // Update rows with filters and conditions + * await db.update(cars).set({ color: 'red' }).where(eq(cars.brand, 'BMW')); + * + * // Update with returning clause + * const updatedCar: Car[] = await db.update(cars) + * .set({ color: 'red' }) + * .where(eq(cars.id, 1)) + * .returning(); + * ``` + */ + update(table3) { + return new SQLiteUpdateBuilder(table3, this.session, this.dialect); + } + $cache; + /** + * Creates an insert query. + * + * Calling this method will create new rows in a table. Use `.values()` method to specify which values to insert. + * + * See docs: {@link https://orm.drizzle.team/docs/insert} + * + * @param table The table to insert into. + * + * @example + * + * ```ts + * // Insert one row + * await db.insert(cars).values({ brand: 'BMW' }); + * + * // Insert multiple rows + * await db.insert(cars).values([{ brand: 'BMW' }, { brand: 'Porsche' }]); + * + * // Insert with returning clause + * const insertedCar: Car[] = await db.insert(cars) + * .values({ brand: 'BMW' }) + * .returning(); + * ``` + */ + insert(into) { + return new SQLiteInsertBuilder(into, this.session, this.dialect); + } + /** + * Creates a delete query. + * + * Calling this method without `.where()` clause will delete all rows in a table. The `.where()` clause specifies which rows should be deleted. + * + * See docs: {@link https://orm.drizzle.team/docs/delete} + * + * @param table The table to delete from. + * + * @example + * + * ```ts + * // Delete all rows in the 'cars' table + * await db.delete(cars); + * + * // Delete rows with filters and conditions + * await db.delete(cars).where(eq(cars.color, 'green')); + * + * // Delete with returning clause + * const deletedCar: Car[] = await db.delete(cars) + * .where(eq(cars.id, 1)) + * .returning(); + * ``` + */ + delete(from) { + return new SQLiteDeleteBase(from, this.session, this.dialect); + } + run(query) { + const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL(); + if (this.resultKind === "async") { + return new SQLiteRaw( + async () => this.session.run(sequel), + () => sequel, + "run", + this.dialect, + this.session.extractRawRunValueFromBatchResult.bind(this.session) + ); + } + return this.session.run(sequel); + } + all(query) { + const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL(); + if (this.resultKind === "async") { + return new SQLiteRaw( + async () => this.session.all(sequel), + () => sequel, + "all", + this.dialect, + this.session.extractRawAllValueFromBatchResult.bind(this.session) + ); + } + return this.session.all(sequel); + } + get(query) { + const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL(); + if (this.resultKind === "async") { + return new SQLiteRaw( + async () => this.session.get(sequel), + () => sequel, + "get", + this.dialect, + this.session.extractRawGetValueFromBatchResult.bind(this.session) + ); + } + return this.session.get(sequel); + } + values(query) { + const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL(); + if (this.resultKind === "async") { + return new SQLiteRaw( + async () => this.session.values(sequel), + () => sequel, + "values", + this.dialect, + this.session.extractRawValuesValueFromBatchResult.bind(this.session) + ); + } + return this.session.values(sequel); + } + transaction(transaction, config3) { + return this.session.transaction(transaction, config3); + } + }; + __name(BaseSQLiteDatabase, "BaseSQLiteDatabase"); + _a108 = entityKind; + __publicField(BaseSQLiteDatabase, _a108, "BaseSQLiteDatabase"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/cache/core/cache.js +async function hashQuery(sql2, params) { + const dataToHash = `${sql2}-${JSON.stringify(params)}`; + const encoder2 = new TextEncoder(); + const data = encoder2.encode(dataToHash); + const hashBuffer = await crypto.subtle.digest("SHA-256", data); + const hashArray = [...new Uint8Array(hashBuffer)]; + const hashHex = hashArray.map((b2) => b2.toString(16).padStart(2, "0")).join(""); + return hashHex; +} +var _a109, Cache, _a110, NoopCache; +var init_cache = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/cache/core/cache.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + Cache = class { + }; + __name(Cache, "Cache"); + _a109 = entityKind; + __publicField(Cache, _a109, "Cache"); + NoopCache = class extends Cache { + strategy() { + return "all"; + } + async get(_key2) { + return void 0; + } + async put(_hashedQuery, _response, _tables, _config) { + } + async onMutate(_params) { + } + }; + __name(NoopCache, "NoopCache"); + _a110 = entityKind; + __publicField(NoopCache, _a110, "NoopCache"); + __name(hashQuery, "hashQuery"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/cache/core/index.js +var init_core = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/cache/core/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_cache(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/alias.js +var init_alias2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/alias.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/session.js +var _a111, ExecuteResultSync, _a112, SQLitePreparedQuery, _a113, SQLiteSession, _a114, SQLiteTransaction; +var init_session = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/session.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_cache(); + init_entity(); + init_errors(); + init_query_promise(); + init_db(); + ExecuteResultSync = class extends QueryPromise { + constructor(resultCb) { + super(); + this.resultCb = resultCb; + } + async execute() { + return this.resultCb(); + } + sync() { + return this.resultCb(); + } + }; + __name(ExecuteResultSync, "ExecuteResultSync"); + _a111 = entityKind; + __publicField(ExecuteResultSync, _a111, "ExecuteResultSync"); + SQLitePreparedQuery = class { + constructor(mode, executeMethod, query, cache3, queryMetadata, cacheConfig) { + this.mode = mode; + this.executeMethod = executeMethod; + this.query = query; + this.cache = cache3; + this.queryMetadata = queryMetadata; + this.cacheConfig = cacheConfig; + if (cache3 && cache3.strategy() === "all" && cacheConfig === void 0) { + this.cacheConfig = { enable: true, autoInvalidate: true }; + } + if (!this.cacheConfig?.enable) { + this.cacheConfig = void 0; + } + } + /** @internal */ + joinsNotNullableMap; + /** @internal */ + async queryWithCache(queryString, params, query) { + if (this.cache === void 0 || is(this.cache, NoopCache) || this.queryMetadata === void 0) { + try { + return await query(); + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + } + if (this.cacheConfig && !this.cacheConfig.enable) { + try { + return await query(); + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + } + if ((this.queryMetadata.type === "insert" || this.queryMetadata.type === "update" || this.queryMetadata.type === "delete") && this.queryMetadata.tables.length > 0) { + try { + const [res] = await Promise.all([ + query(), + this.cache.onMutate({ tables: this.queryMetadata.tables }) + ]); + return res; + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + } + if (!this.cacheConfig) { + try { + return await query(); + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + } + if (this.queryMetadata.type === "select") { + const fromCache = await this.cache.get( + this.cacheConfig.tag ?? await hashQuery(queryString, params), + this.queryMetadata.tables, + this.cacheConfig.tag !== void 0, + this.cacheConfig.autoInvalidate + ); + if (fromCache === void 0) { + let result; + try { + result = await query(); + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + await this.cache.put( + this.cacheConfig.tag ?? await hashQuery(queryString, params), + result, + // make sure we send tables that were used in a query only if user wants to invalidate it on each write + this.cacheConfig.autoInvalidate ? this.queryMetadata.tables : [], + this.cacheConfig.tag !== void 0, + this.cacheConfig.config + ); + return result; + } + return fromCache; + } + try { + return await query(); + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + } + getQuery() { + return this.query; + } + mapRunResult(result, _isFromBatch) { + return result; + } + mapAllResult(_result, _isFromBatch) { + throw new Error("Not implemented"); + } + mapGetResult(_result, _isFromBatch) { + throw new Error("Not implemented"); + } + execute(placeholderValues) { + if (this.mode === "async") { + return this[this.executeMethod](placeholderValues); + } + return new ExecuteResultSync(() => this[this.executeMethod](placeholderValues)); + } + mapResult(response, isFromBatch) { + switch (this.executeMethod) { + case "run": { + return this.mapRunResult(response, isFromBatch); + } + case "all": { + return this.mapAllResult(response, isFromBatch); + } + case "get": { + return this.mapGetResult(response, isFromBatch); + } + } + } + }; + __name(SQLitePreparedQuery, "SQLitePreparedQuery"); + _a112 = entityKind; + __publicField(SQLitePreparedQuery, _a112, "PreparedQuery"); + SQLiteSession = class { + constructor(dialect) { + this.dialect = dialect; + } + prepareOneTimeQuery(query, fields, executeMethod, isResponseInArrayMode, customResultMapper, queryMetadata, cacheConfig) { + return this.prepareQuery( + query, + fields, + executeMethod, + isResponseInArrayMode, + customResultMapper, + queryMetadata, + cacheConfig + ); + } + run(query) { + const staticQuery = this.dialect.sqlToQuery(query); + try { + return this.prepareOneTimeQuery(staticQuery, void 0, "run", false).run(); + } catch (err) { + throw new DrizzleError({ cause: err, message: `Failed to run the query '${staticQuery.sql}'` }); + } + } + /** @internal */ + extractRawRunValueFromBatchResult(result) { + return result; + } + all(query) { + return this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), void 0, "run", false).all(); + } + /** @internal */ + extractRawAllValueFromBatchResult(_result) { + throw new Error("Not implemented"); + } + get(query) { + return this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), void 0, "run", false).get(); + } + /** @internal */ + extractRawGetValueFromBatchResult(_result) { + throw new Error("Not implemented"); + } + values(query) { + return this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), void 0, "run", false).values(); + } + async count(sql2) { + const result = await this.values(sql2); + return result[0][0]; + } + /** @internal */ + extractRawValuesValueFromBatchResult(_result) { + throw new Error("Not implemented"); + } + }; + __name(SQLiteSession, "SQLiteSession"); + _a113 = entityKind; + __publicField(SQLiteSession, _a113, "SQLiteSession"); + SQLiteTransaction = class extends BaseSQLiteDatabase { + constructor(resultType, dialect, session, schema, nestedIndex = 0) { + super(resultType, dialect, session, schema); + this.schema = schema; + this.nestedIndex = nestedIndex; + } + rollback() { + throw new TransactionRollbackError(); + } + }; + __name(SQLiteTransaction, "SQLiteTransaction"); + _a114 = entityKind; + __publicField(SQLiteTransaction, _a114, "SQLiteTransaction"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/subquery.js +var init_subquery2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/subquery.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/view.js +var _a115, ViewBuilderCore, _a116, ViewBuilder, _a117, ManualViewBuilder, _a118, SQLiteView; +var init_view = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/view.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_selection_proxy(); + init_utils2(); + init_query_builder2(); + init_table3(); + init_view_base(); + ViewBuilderCore = class { + constructor(name) { + this.name = name; + } + config = {}; + }; + __name(ViewBuilderCore, "ViewBuilderCore"); + _a115 = entityKind; + __publicField(ViewBuilderCore, _a115, "SQLiteViewBuilderCore"); + ViewBuilder = class extends ViewBuilderCore { + as(qb) { + if (typeof qb === "function") { + qb = qb(new QueryBuilder()); + } + const selectionProxy = new SelectionProxyHandler({ + alias: this.name, + sqlBehavior: "error", + sqlAliasedBehavior: "alias", + replaceOriginalName: true + }); + const aliasedSelectedFields = qb.getSelectedFields(); + return new Proxy( + new SQLiteView({ + // sqliteConfig: this.config, + config: { + name: this.name, + schema: void 0, + selectedFields: aliasedSelectedFields, + query: qb.getSQL().inlineParams() + } + }), + selectionProxy + ); + } + }; + __name(ViewBuilder, "ViewBuilder"); + _a116 = entityKind; + __publicField(ViewBuilder, _a116, "SQLiteViewBuilder"); + ManualViewBuilder = class extends ViewBuilderCore { + columns; + constructor(name, columns) { + super(name); + this.columns = getTableColumns(sqliteTable(name, columns)); + } + existing() { + return new Proxy( + new SQLiteView({ + config: { + name: this.name, + schema: void 0, + selectedFields: this.columns, + query: void 0 + } + }), + new SelectionProxyHandler({ + alias: this.name, + sqlBehavior: "error", + sqlAliasedBehavior: "alias", + replaceOriginalName: true + }) + ); + } + as(query) { + return new Proxy( + new SQLiteView({ + config: { + name: this.name, + schema: void 0, + selectedFields: this.columns, + query: query.inlineParams() + } + }), + new SelectionProxyHandler({ + alias: this.name, + sqlBehavior: "error", + sqlAliasedBehavior: "alias", + replaceOriginalName: true + }) + ); + } + }; + __name(ManualViewBuilder, "ManualViewBuilder"); + _a117 = entityKind; + __publicField(ManualViewBuilder, _a117, "SQLiteManualViewBuilder"); + SQLiteView = class extends SQLiteViewBase { + constructor({ config: config3 }) { + super(config3); + } + }; + __name(SQLiteView, "SQLiteView"); + _a118 = entityKind; + __publicField(SQLiteView, _a118, "SQLiteView"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/index.js +var init_sqlite_core = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_alias2(); + init_checks(); + init_columns(); + init_db(); + init_dialect(); + init_foreign_keys2(); + init_indexes(); + init_primary_keys2(); + init_query_builders(); + init_session(); + init_subquery2(); + init_table3(); + init_unique_constraint2(); + init_utils3(); + init_view(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/session.js +function d1ToRawMapping(results) { + const rows = []; + for (const row of results) { + const entry = Object.keys(row).map((k2) => row[k2]); + rows.push(entry); + } + return rows; +} +var _a119, SQLiteD1Session, _a120, _D1Transaction, D1Transaction, _a121, D1PreparedQuery; +var init_session2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/session.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core(); + init_entity(); + init_logger2(); + init_sql(); + init_sqlite_core(); + init_session(); + init_utils2(); + SQLiteD1Session = class extends SQLiteSession { + constructor(client, dialect, schema, options = {}) { + super(dialect); + this.client = client; + this.schema = schema; + this.options = options; + this.logger = options.logger ?? new NoopLogger(); + this.cache = options.cache ?? new NoopCache(); + } + logger; + cache; + prepareQuery(query, fields, executeMethod, isResponseInArrayMode, customResultMapper, queryMetadata, cacheConfig) { + const stmt = this.client.prepare(query.sql); + return new D1PreparedQuery( + stmt, + query, + this.logger, + this.cache, + queryMetadata, + cacheConfig, + fields, + executeMethod, + isResponseInArrayMode, + customResultMapper + ); + } + async batch(queries) { + const preparedQueries = []; + const builtQueries = []; + for (const query of queries) { + const preparedQuery = query._prepare(); + const builtQuery = preparedQuery.getQuery(); + preparedQueries.push(preparedQuery); + if (builtQuery.params.length > 0) { + builtQueries.push(preparedQuery.stmt.bind(...builtQuery.params)); + } else { + const builtQuery2 = preparedQuery.getQuery(); + builtQueries.push( + this.client.prepare(builtQuery2.sql).bind(...builtQuery2.params) + ); + } + } + const batchResults = await this.client.batch(builtQueries); + return batchResults.map((result, i2) => preparedQueries[i2].mapResult(result, true)); + } + extractRawAllValueFromBatchResult(result) { + return result.results; + } + extractRawGetValueFromBatchResult(result) { + return result.results[0]; + } + extractRawValuesValueFromBatchResult(result) { + return d1ToRawMapping(result.results); + } + async transaction(transaction, config3) { + const tx = new D1Transaction("async", this.dialect, this, this.schema); + await this.run(sql.raw(`begin${config3?.behavior ? " " + config3.behavior : ""}`)); + try { + const result = await transaction(tx); + await this.run(sql`commit`); + return result; + } catch (err) { + await this.run(sql`rollback`); + throw err; + } + } + }; + __name(SQLiteD1Session, "SQLiteD1Session"); + _a119 = entityKind; + __publicField(SQLiteD1Session, _a119, "SQLiteD1Session"); + _D1Transaction = class extends SQLiteTransaction { + async transaction(transaction) { + const savepointName = `sp${this.nestedIndex}`; + const tx = new _D1Transaction("async", this.dialect, this.session, this.schema, this.nestedIndex + 1); + await this.session.run(sql.raw(`savepoint ${savepointName}`)); + try { + const result = await transaction(tx); + await this.session.run(sql.raw(`release savepoint ${savepointName}`)); + return result; + } catch (err) { + await this.session.run(sql.raw(`rollback to savepoint ${savepointName}`)); + throw err; + } + } + }; + D1Transaction = _D1Transaction; + __name(D1Transaction, "D1Transaction"); + _a120 = entityKind; + __publicField(D1Transaction, _a120, "D1Transaction"); + __name(d1ToRawMapping, "d1ToRawMapping"); + D1PreparedQuery = class extends SQLitePreparedQuery { + constructor(stmt, query, logger3, cache3, queryMetadata, cacheConfig, fields, executeMethod, _isResponseInArrayMode, customResultMapper) { + super("async", executeMethod, query, cache3, queryMetadata, cacheConfig); + this.logger = logger3; + this._isResponseInArrayMode = _isResponseInArrayMode; + this.customResultMapper = customResultMapper; + this.fields = fields; + this.stmt = stmt; + } + /** @internal */ + customResultMapper; + /** @internal */ + fields; + /** @internal */ + stmt; + async run(placeholderValues) { + const params = fillPlaceholders(this.query.params, placeholderValues ?? {}); + this.logger.logQuery(this.query.sql, params); + return await this.queryWithCache(this.query.sql, params, async () => { + return this.stmt.bind(...params).run(); + }); + } + async all(placeholderValues) { + const { fields, query, logger: logger3, stmt, customResultMapper } = this; + if (!fields && !customResultMapper) { + const params = fillPlaceholders(query.params, placeholderValues ?? {}); + logger3.logQuery(query.sql, params); + return await this.queryWithCache(query.sql, params, async () => { + return stmt.bind(...params).all().then(({ results }) => this.mapAllResult(results)); + }); + } + const rows = await this.values(placeholderValues); + return this.mapAllResult(rows); + } + mapAllResult(rows, isFromBatch) { + if (isFromBatch) { + rows = d1ToRawMapping(rows.results); + } + if (!this.fields && !this.customResultMapper) { + return rows; + } + if (this.customResultMapper) { + return this.customResultMapper(rows); + } + return rows.map((row) => mapResultRow(this.fields, row, this.joinsNotNullableMap)); + } + async get(placeholderValues) { + const { fields, joinsNotNullableMap, query, logger: logger3, stmt, customResultMapper } = this; + if (!fields && !customResultMapper) { + const params = fillPlaceholders(query.params, placeholderValues ?? {}); + logger3.logQuery(query.sql, params); + return await this.queryWithCache(query.sql, params, async () => { + return stmt.bind(...params).all().then(({ results }) => results[0]); + }); + } + const rows = await this.values(placeholderValues); + if (!rows[0]) { + return void 0; + } + if (customResultMapper) { + return customResultMapper(rows); + } + return mapResultRow(fields, rows[0], joinsNotNullableMap); + } + mapGetResult(result, isFromBatch) { + if (isFromBatch) { + result = d1ToRawMapping(result.results)[0]; + } + if (!this.fields && !this.customResultMapper) { + return result; + } + if (this.customResultMapper) { + return this.customResultMapper([result]); + } + return mapResultRow(this.fields, result, this.joinsNotNullableMap); + } + async values(placeholderValues) { + const params = fillPlaceholders(this.query.params, placeholderValues ?? {}); + this.logger.logQuery(this.query.sql, params); + return await this.queryWithCache(this.query.sql, params, async () => { + return this.stmt.bind(...params).raw(); + }); + } + /** @internal */ + isResponseInArrayMode() { + return this._isResponseInArrayMode; + } + }; + __name(D1PreparedQuery, "D1PreparedQuery"); + _a121 = entityKind; + __publicField(D1PreparedQuery, _a121, "D1PreparedQuery"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/driver.js +function drizzle(client, config3 = {}) { + const dialect = new SQLiteAsyncDialect({ casing: config3.casing }); + let logger3; + if (config3.logger === true) { + logger3 = new DefaultLogger(); + } else if (config3.logger !== false) { + logger3 = config3.logger; + } + let schema; + if (config3.schema) { + const tablesConfig = extractTablesRelationalConfig( + config3.schema, + createTableRelationsHelpers + ); + schema = { + fullSchema: config3.schema, + schema: tablesConfig.tables, + tableNamesMap: tablesConfig.tableNamesMap + }; + } + const session = new SQLiteD1Session(client, dialect, schema, { logger: logger3, cache: config3.cache }); + const db3 = new DrizzleD1Database("async", dialect, session, schema); + db3.$client = client; + db3.$cache = config3.cache; + if (db3.$cache) { + db3.$cache["invalidate"] = config3.cache?.onMutate; + } + return db3; +} +var _a122, DrizzleD1Database; +var init_driver = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/driver.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_logger2(); + init_relations(); + init_db(); + init_dialect(); + init_session2(); + DrizzleD1Database = class extends BaseSQLiteDatabase { + async batch(batch) { + return this.session.batch(batch); + } + }; + __name(DrizzleD1Database, "DrizzleD1Database"); + _a122 = entityKind; + __publicField(DrizzleD1Database, _a122, "D1Database"); + __name(drizzle, "drizzle"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/index.js +var init_d1 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_driver(); + init_session2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/operations.js +var init_operations = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/operations.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/index.js +var init_drizzle_orm = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_alias(); + init_column_builder(); + init_column(); + init_entity(); + init_errors(); + init_logger2(); + init_operations(); + init_query_promise(); + init_relations(); + init_sql2(); + init_subquery(); + init_table(); + init_utils2(); + init_view_common(); + } +}); + +// ../../packages/db_helper_sqlite/src/db/schema.ts +var schema_exports = {}; +__export(schema_exports, { + addressAreas: () => addressAreas, + addressAreasRelations: () => addressAreasRelations, + addressZones: () => addressZones, + addressZonesRelations: () => addressZonesRelations, + addresses: () => addresses, + addressesRelations: () => addressesRelations, + cartItems: () => cartItems, + cartItemsRelations: () => cartItemsRelations, + complaints: () => complaints, + complaintsRelations: () => complaintsRelations, + couponApplicableProducts: () => couponApplicableProducts, + couponApplicableProductsRelations: () => couponApplicableProductsRelations, + couponApplicableUsers: () => couponApplicableUsers, + couponApplicableUsersRelations: () => couponApplicableUsersRelations, + couponUsage: () => couponUsage, + couponUsageRelations: () => couponUsageRelations, + coupons: () => coupons, + couponsRelations: () => couponsRelations, + deliverySlotInfo: () => deliverySlotInfo, + deliverySlotInfoRelations: () => deliverySlotInfoRelations, + homeBanners: () => homeBanners, + homeBannersRelations: () => homeBannersRelations, + keyValStore: () => keyValStore, + notifCreds: () => notifCreds, + notifCredsRelations: () => notifCredsRelations, + notifications: () => notifications, + notificationsRelations: () => notificationsRelations, + orderItems: () => orderItems, + orderItemsRelations: () => orderItemsRelations, + orderStatus: () => orderStatus, + orderStatusRelations: () => orderStatusRelations, + orders: () => orders, + ordersRelations: () => ordersRelations, + paymentInfoRelations: () => paymentInfoRelations, + paymentInfoTable: () => paymentInfoTable, + paymentStatusEnum: () => paymentStatusEnum, + payments: () => payments, + paymentsRelations: () => paymentsRelations, + productCategories: () => productCategories, + productCategoriesRelations: () => productCategoriesRelations, + productGroupInfo: () => productGroupInfo, + productGroupInfoRelations: () => productGroupInfoRelations, + productGroupMembership: () => productGroupMembership, + productGroupMembershipRelations: () => productGroupMembershipRelations, + productInfo: () => productInfo, + productInfoRelations: () => productInfoRelations, + productReviews: () => productReviews, + productReviewsRelations: () => productReviewsRelations, + productSlots: () => productSlots, + productSlotsRelations: () => productSlotsRelations, + productTagInfo: () => productTagInfo, + productTagInfoRelations: () => productTagInfoRelations, + productTags: () => productTags, + productTagsRelations: () => productTagsRelations, + refunds: () => refunds, + refundsRelations: () => refundsRelations, + reservedCoupons: () => reservedCoupons, + reservedCouponsRelations: () => reservedCouponsRelations, + specialDeals: () => specialDeals, + specialDealsRelations: () => specialDealsRelations, + staffPermissionEnum: () => staffPermissionEnum, + staffPermissions: () => staffPermissions, + staffPermissionsRelations: () => staffPermissionsRelations, + staffRoleEnum: () => staffRoleEnum, + staffRolePermissions: () => staffRolePermissions, + staffRolePermissionsRelations: () => staffRolePermissionsRelations, + staffRoles: () => staffRoles, + staffRolesRelations: () => staffRolesRelations, + staffUsers: () => staffUsers, + staffUsersRelations: () => staffUsersRelations, + storeInfo: () => storeInfo, + storeInfoRelations: () => storeInfoRelations, + units: () => units, + unitsRelations: () => unitsRelations, + unloggedUserTokens: () => unloggedUserTokens, + uploadStatusEnum: () => uploadStatusEnum, + uploadUrlStatus: () => uploadUrlStatus, + userCreds: () => userCreds, + userCredsRelations: () => userCredsRelations, + userDetails: () => userDetails, + userDetailsRelations: () => userDetailsRelations, + userIncidents: () => userIncidents, + userIncidentsRelations: () => userIncidentsRelations, + userNotifications: () => userNotifications, + userNotificationsRelations: () => userNotificationsRelations, + users: () => users, + usersRelations: () => usersRelations, + vendorSnippets: () => vendorSnippets, + vendorSnippetsRelations: () => vendorSnippetsRelations +}); +var jsonText, numericText, staffRoleValues, staffPermissionValues, uploadStatusValues, paymentStatusValues, staffRoleEnum, staffPermissionEnum, uploadStatusEnum, paymentStatusEnum, users, userDetails, userCreds, addressZones, addressAreas, addresses, staffRoles, staffPermissions, staffRolePermissions, staffUsers, storeInfo, units, productInfo, productGroupInfo, productGroupMembership, homeBanners, productReviews, uploadUrlStatus, productTagInfo, productTags, deliverySlotInfo, vendorSnippets, productSlots, specialDeals, paymentInfoTable, orders, orderItems, orderStatus, payments, refunds, keyValStore, notifications, productCategories, cartItems, complaints, coupons, couponUsage, couponApplicableUsers, couponApplicableProducts, userIncidents, reservedCoupons, notifCreds, unloggedUserTokens, userNotifications, usersRelations, userCredsRelations, staffUsersRelations, addressesRelations, unitsRelations, productInfoRelations, productTagInfoRelations, productTagsRelations, deliverySlotInfoRelations, productSlotsRelations, specialDealsRelations, ordersRelations, orderItemsRelations, orderStatusRelations, paymentInfoRelations, paymentsRelations, refundsRelations, notificationsRelations, productCategoriesRelations, cartItemsRelations, complaintsRelations, couponsRelations, couponUsageRelations, userDetailsRelations, notifCredsRelations, userNotificationsRelations, storeInfoRelations, couponApplicableUsersRelations, couponApplicableProductsRelations, reservedCouponsRelations, productReviewsRelations, addressZonesRelations, addressAreasRelations, productGroupInfoRelations, productGroupMembershipRelations, homeBannersRelations, staffRolesRelations, staffPermissionsRelations, staffRolePermissionsRelations, userIncidentsRelations, vendorSnippetsRelations; +var init_schema = __esm({ + "../../packages/db_helper_sqlite/src/db/schema.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sqlite_core(); + init_drizzle_orm(); + jsonText = /* @__PURE__ */ __name((name) => customType({ + dataType() { + return "text"; + }, + toDriver(value) { + if (value === void 0 || value === null) + return null; + return JSON.stringify(value); + }, + fromDriver(value) { + if (value === null || value === void 0) + return null; + try { + return JSON.parse(String(value)); + } catch { + return null; + } + } + })(name), "jsonText"); + numericText = /* @__PURE__ */ __name((name) => customType({ + dataType() { + return "text"; + }, + toDriver(value) { + if (value === void 0 || value === null) + return null; + return String(value); + }, + fromDriver(value) { + if (value === null || value === void 0) + return null; + return String(value); + } + })(name), "numericText"); + staffRoleValues = ["super_admin", "admin", "marketer", "delivery_staff"]; + staffPermissionValues = ["crud_product", "make_coupon", "crud_staff_users"]; + uploadStatusValues = ["pending", "claimed"]; + paymentStatusValues = ["pending", "success", "cod", "failed"]; + staffRoleEnum = /* @__PURE__ */ __name((name) => text(name, { enum: staffRoleValues }), "staffRoleEnum"); + staffPermissionEnum = /* @__PURE__ */ __name((name) => text(name, { enum: staffPermissionValues }), "staffPermissionEnum"); + uploadStatusEnum = /* @__PURE__ */ __name((name) => text(name, { enum: uploadStatusValues }), "uploadStatusEnum"); + paymentStatusEnum = /* @__PURE__ */ __name((name) => text(name, { enum: paymentStatusValues }), "paymentStatusEnum"); + users = sqliteTable("users", { + id: integer().primaryKey({ autoIncrement: true }), + name: text(), + email: text(), + mobile: text(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_email: uniqueIndex("unique_email").on(t9.email) + })); + userDetails = sqliteTable("user_details", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id).unique(), + bio: text("bio"), + dateOfBirth: integer("date_of_birth", { mode: "timestamp" }), + gender: text("gender"), + occupation: text("occupation"), + profileImage: text("profile_image"), + isSuspended: integer("is_suspended", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + updatedAt: integer("updated_at", { mode: "timestamp" }).notNull().defaultNow() + }); + userCreds = sqliteTable("user_creds", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + userPassword: text("user_password").notNull(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + addressZones = sqliteTable("address_zones", { + id: integer().primaryKey({ autoIncrement: true }), + zoneName: text("zone_name").notNull(), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow() + }); + addressAreas = sqliteTable("address_areas", { + id: integer().primaryKey({ autoIncrement: true }), + placeName: text("place_name").notNull(), + zoneId: integer("zone_id").references(() => addressZones.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + addresses = sqliteTable("addresses", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + name: text("name").notNull(), + phone: text("phone").notNull(), + addressLine1: text("address_line1").notNull(), + addressLine2: text("address_line2"), + city: text("city").notNull(), + state: text("state").notNull(), + pincode: text("pincode").notNull(), + isDefault: integer("is_default", { mode: "boolean" }).notNull().default(false), + latitude: real("latitude"), + longitude: real("longitude"), + googleMapsUrl: text("google_maps_url"), + adminLatitude: real("admin_latitude"), + adminLongitude: real("admin_longitude"), + zoneId: integer("zone_id").references(() => addressZones.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + staffRoles = sqliteTable("staff_roles", { + id: integer().primaryKey({ autoIncrement: true }), + roleName: staffRoleEnum("role_name").notNull(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_role_name: uniqueIndex("unique_role_name").on(t9.roleName) + })); + staffPermissions = sqliteTable("staff_permissions", { + id: integer().primaryKey({ autoIncrement: true }), + permissionName: staffPermissionEnum("permission_name").notNull(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_permission_name: uniqueIndex("unique_permission_name").on(t9.permissionName) + })); + staffRolePermissions = sqliteTable("staff_role_permissions", { + id: integer().primaryKey({ autoIncrement: true }), + staffRoleId: integer("staff_role_id").notNull().references(() => staffRoles.id), + staffPermissionId: integer("staff_permission_id").notNull().references(() => staffPermissions.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_role_permission: uniqueIndex("unique_role_permission").on(t9.staffRoleId, t9.staffPermissionId) + })); + staffUsers = sqliteTable("staff_users", { + id: integer().primaryKey({ autoIncrement: true }), + name: text().notNull(), + password: text().notNull(), + staffRoleId: integer("staff_role_id").references(() => staffRoles.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + storeInfo = sqliteTable("store_info", { + id: integer().primaryKey({ autoIncrement: true }), + name: text().notNull(), + description: text(), + imageUrl: text("image_url"), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + owner: integer("owner").notNull().references(() => staffUsers.id) + }); + units = sqliteTable("units", { + id: integer().primaryKey({ autoIncrement: true }), + shortNotation: text("short_notation").notNull(), + fullName: text("full_name").notNull() + }, (t9) => ({ + unq_short_notation: uniqueIndex("unique_short_notation").on(t9.shortNotation) + })); + productInfo = sqliteTable("product_info", { + id: integer().primaryKey({ autoIncrement: true }), + name: text().notNull(), + shortDescription: text("short_description"), + longDescription: text("long_description"), + unitId: integer("unit_id").notNull().references(() => units.id), + price: numericText("price").notNull(), + marketPrice: numericText("market_price"), + images: jsonText("images"), + isOutOfStock: integer("is_out_of_stock", { mode: "boolean" }).notNull().default(false), + isSuspended: integer("is_suspended", { mode: "boolean" }).notNull().default(false), + isFlashAvailable: integer("is_flash_available", { mode: "boolean" }).notNull().default(false), + flashPrice: numericText("flash_price"), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + incrementStep: real("increment_step").notNull().default(1), + productQuantity: real("product_quantity").notNull().default(1), + storeId: integer("store_id").references(() => storeInfo.id) + }); + productGroupInfo = sqliteTable("product_group_info", { + id: integer().primaryKey({ autoIncrement: true }), + groupName: text("group_name").notNull(), + description: text(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + productGroupMembership = sqliteTable("product_group_membership", { + productId: integer("product_id").notNull().references(() => productInfo.id), + groupId: integer("group_id").notNull().references(() => productGroupInfo.id), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + pk: primaryKey({ columns: [t9.productId, t9.groupId], name: "product_group_membership_pk" }) + })); + homeBanners = sqliteTable("home_banners", { + id: integer().primaryKey({ autoIncrement: true }), + name: text("name").notNull(), + imageUrl: text("image_url").notNull(), + description: text("description"), + productIds: jsonText("product_ids"), + redirectUrl: text("redirect_url"), + serialNum: integer("serial_num"), + isActive: integer("is_active", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + lastUpdated: integer("last_updated", { mode: "timestamp" }).notNull().defaultNow() + }); + productReviews = sqliteTable("product_reviews", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + productId: integer("product_id").notNull().references(() => productInfo.id), + reviewBody: text("review_body").notNull(), + imageUrls: jsonText("image_urls").$defaultFn(() => []), + reviewTime: integer("review_time", { mode: "timestamp" }).notNull().defaultNow(), + ratings: real("ratings").notNull(), + adminResponse: text("admin_response"), + adminResponseImages: jsonText("admin_response_images").$defaultFn(() => []) + }, (t9) => ({ + ratingCheck: check("rating_check", sql`${t9.ratings} >= 1 AND ${t9.ratings} <= 5`) + })); + uploadUrlStatus = sqliteTable("upload_url_status", { + id: integer().primaryKey({ autoIncrement: true }), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + key: text("key").notNull(), + status: uploadStatusEnum("status").notNull().default("pending") + }); + productTagInfo = sqliteTable("product_tag_info", { + id: integer().primaryKey({ autoIncrement: true }), + tagName: text("tag_name").notNull().unique(), + tagDescription: text("tag_description"), + imageUrl: text("image_url"), + isDashboardTag: integer("is_dashboard_tag", { mode: "boolean" }).notNull().default(false), + relatedStores: jsonText("related_stores").$defaultFn(() => []), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + productTags = sqliteTable("product_tags", { + id: integer().primaryKey({ autoIncrement: true }), + productId: integer("product_id").notNull().references(() => productInfo.id), + tagId: integer("tag_id").notNull().references(() => productTagInfo.id), + assignedAt: integer("assigned_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_product_tag: uniqueIndex("unique_product_tag").on(t9.productId, t9.tagId) + })); + deliverySlotInfo = sqliteTable("delivery_slot_info", { + id: integer().primaryKey({ autoIncrement: true }), + deliveryTime: integer("delivery_time", { mode: "timestamp" }).notNull(), + freezeTime: integer("freeze_time", { mode: "timestamp" }).notNull(), + isActive: integer("is_active", { mode: "boolean" }).notNull().default(true), + isFlash: integer("is_flash", { mode: "boolean" }).notNull().default(false), + isCapacityFull: integer("is_capacity_full", { mode: "boolean" }).notNull().default(false), + deliverySequence: jsonText("delivery_sequence").$defaultFn(() => ({})), + groupIds: jsonText("group_ids").$defaultFn(() => []) + }); + vendorSnippets = sqliteTable("vendor_snippets", { + id: integer().primaryKey({ autoIncrement: true }), + snippetCode: text("snippet_code").notNull().unique(), + slotId: integer("slot_id").references(() => deliverySlotInfo.id), + isPermanent: integer("is_permanent", { mode: "boolean" }).notNull().default(false), + productIds: jsonText("product_ids").notNull(), + validTill: integer("valid_till", { mode: "timestamp" }), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + productSlots = sqliteTable("product_slots", { + productId: integer("product_id").notNull().references(() => productInfo.id), + slotId: integer("slot_id").notNull().references(() => deliverySlotInfo.id) + }, (t9) => ({ + pk: primaryKey({ columns: [t9.productId, t9.slotId], name: "product_slot_pk" }) + })); + specialDeals = sqliteTable("special_deals", { + id: integer().primaryKey({ autoIncrement: true }), + productId: integer("product_id").notNull().references(() => productInfo.id), + quantity: numericText("quantity").notNull(), + price: numericText("price").notNull(), + validTill: integer("valid_till", { mode: "timestamp" }).notNull() + }); + paymentInfoTable = sqliteTable("payment_info", { + id: integer().primaryKey({ autoIncrement: true }), + status: text().notNull(), + gateway: text().notNull(), + orderId: text("order_id"), + token: text("token"), + merchantOrderId: text("merchant_order_id").notNull().unique(), + payload: jsonText("payload") + }); + orders = sqliteTable("orders", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + addressId: integer("address_id").notNull().references(() => addresses.id), + slotId: integer("slot_id").references(() => deliverySlotInfo.id), + isCod: integer("is_cod", { mode: "boolean" }).notNull().default(false), + isOnlinePayment: integer("is_online_payment", { mode: "boolean" }).notNull().default(false), + paymentInfoId: integer("payment_info_id").references(() => paymentInfoTable.id), + totalAmount: numericText("total_amount").notNull(), + deliveryCharge: numericText("delivery_charge").notNull().default("0"), + readableId: integer("readable_id").notNull(), + adminNotes: text("admin_notes"), + userNotes: text("user_notes"), + orderGroupId: text("order_group_id"), + orderGroupProportion: numericText("order_group_proportion"), + isFlashDelivery: integer("is_flash_delivery", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + orderItems = sqliteTable("order_items", { + id: integer().primaryKey({ autoIncrement: true }), + orderId: integer("order_id").notNull().references(() => orders.id), + productId: integer("product_id").notNull().references(() => productInfo.id), + quantity: text("quantity").notNull(), + price: numericText("price").notNull(), + discountedPrice: numericText("discounted_price"), + is_packaged: integer("is_packaged", { mode: "boolean" }).notNull().default(false), + is_package_verified: integer("is_package_verified", { mode: "boolean" }).notNull().default(false) + }); + orderStatus = sqliteTable("order_status", { + id: integer().primaryKey({ autoIncrement: true }), + orderTime: integer("order_time", { mode: "timestamp" }).notNull().defaultNow(), + userId: integer("user_id").notNull().references(() => users.id), + orderId: integer("order_id").notNull().references(() => orders.id), + isPackaged: integer("is_packaged", { mode: "boolean" }).notNull().default(false), + isDelivered: integer("is_delivered", { mode: "boolean" }).notNull().default(false), + isCancelled: integer("is_cancelled", { mode: "boolean" }).notNull().default(false), + cancelReason: text("cancel_reason"), + isCancelledByAdmin: integer("is_cancelled_by_admin", { mode: "boolean" }), + paymentStatus: paymentStatusEnum("payment_state").notNull().default("pending"), + cancellationUserNotes: text("cancellation_user_notes"), + cancellationAdminNotes: text("cancellation_admin_notes"), + cancellationReviewed: integer("cancellation_reviewed", { mode: "boolean" }).notNull().default(false), + cancellationReviewedAt: integer("cancellation_reviewed_at", { mode: "timestamp" }), + refundCouponId: integer("refund_coupon_id").references(() => coupons.id) + }); + payments = sqliteTable("payments", { + id: integer().primaryKey({ autoIncrement: true }), + status: text().notNull(), + gateway: text().notNull(), + orderId: integer("order_id").notNull().references(() => orders.id), + token: text("token"), + merchantOrderId: text("merchant_order_id").notNull().unique(), + payload: jsonText("payload") + }); + refunds = sqliteTable("refunds", { + id: integer().primaryKey({ autoIncrement: true }), + orderId: integer("order_id").notNull().references(() => orders.id), + refundAmount: numericText("refund_amount"), + refundStatus: text("refund_status").default("none"), + merchantRefundId: text("merchant_refund_id"), + refundProcessedAt: integer("refund_processed_at", { mode: "timestamp" }), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + keyValStore = sqliteTable("key_val_store", { + key: text("key").primaryKey(), + value: jsonText("value") + }); + notifications = sqliteTable("notifications", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + title: text().notNull(), + body: text().notNull(), + type: text(), + isRead: integer("is_read", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + productCategories = sqliteTable("product_categories", { + id: integer().primaryKey({ autoIncrement: true }), + name: text().notNull(), + description: text() + }); + cartItems = sqliteTable("cart_items", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + productId: integer("product_id").notNull().references(() => productInfo.id), + quantity: numericText("quantity").notNull(), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_user_product: uniqueIndex("unique_user_product").on(t9.userId, t9.productId) + })); + complaints = sqliteTable("complaints", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + orderId: integer("order_id").references(() => orders.id), + complaintBody: text("complaint_body").notNull(), + images: jsonText("images"), + response: text("response"), + isResolved: integer("is_resolved", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + coupons = sqliteTable("coupons", { + id: integer().primaryKey({ autoIncrement: true }), + couponCode: text("coupon_code").notNull().unique(), + isUserBased: integer("is_user_based", { mode: "boolean" }).notNull().default(false), + discountPercent: numericText("discount_percent"), + flatDiscount: numericText("flat_discount"), + minOrder: numericText("min_order"), + productIds: jsonText("product_ids"), + createdBy: integer("created_by").notNull().references(() => staffUsers.id), + maxValue: numericText("max_value"), + isApplyForAll: integer("is_apply_for_all", { mode: "boolean" }).notNull().default(false), + validTill: integer("valid_till", { mode: "timestamp" }), + maxLimitForUser: integer("max_limit_for_user"), + isInvalidated: integer("is_invalidated", { mode: "boolean" }).notNull().default(false), + exclusiveApply: integer("exclusive_apply", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + couponUsage = sqliteTable("coupon_usage", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + couponId: integer("coupon_id").notNull().references(() => coupons.id), + orderId: integer("order_id").references(() => orders.id), + orderItemId: integer("order_item_id").references(() => orderItems.id), + usedAt: integer("used_at", { mode: "timestamp" }).notNull().defaultNow() + }); + couponApplicableUsers = sqliteTable("coupon_applicable_users", { + id: integer().primaryKey({ autoIncrement: true }), + couponId: integer("coupon_id").notNull().references(() => coupons.id), + userId: integer("user_id").notNull().references(() => users.id) + }, (t9) => ({ + unq_coupon_user: uniqueIndex("unique_coupon_user").on(t9.couponId, t9.userId) + })); + couponApplicableProducts = sqliteTable("coupon_applicable_products", { + id: integer().primaryKey({ autoIncrement: true }), + couponId: integer("coupon_id").notNull().references(() => coupons.id), + productId: integer("product_id").notNull().references(() => productInfo.id) + }, (t9) => ({ + unq_coupon_product: uniqueIndex("unique_coupon_product").on(t9.couponId, t9.productId) + })); + userIncidents = sqliteTable("user_incidents", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + orderId: integer("order_id").references(() => orders.id), + dateAdded: integer("date_added", { mode: "timestamp" }).notNull().defaultNow(), + adminComment: text("admin_comment"), + addedBy: integer("added_by").references(() => staffUsers.id), + negativityScore: integer("negativity_score") + }); + reservedCoupons = sqliteTable("reserved_coupons", { + id: integer().primaryKey({ autoIncrement: true }), + secretCode: text("secret_code").notNull().unique(), + couponCode: text("coupon_code").notNull(), + discountPercent: numericText("discount_percent"), + flatDiscount: numericText("flat_discount"), + minOrder: numericText("min_order"), + productIds: jsonText("product_ids"), + maxValue: numericText("max_value"), + validTill: integer("valid_till", { mode: "timestamp" }), + maxLimitForUser: integer("max_limit_for_user"), + exclusiveApply: integer("exclusive_apply", { mode: "boolean" }).notNull().default(false), + isRedeemed: integer("is_redeemed", { mode: "boolean" }).notNull().default(false), + redeemedBy: integer("redeemed_by").references(() => users.id), + redeemedAt: integer("redeemed_at", { mode: "timestamp" }), + createdBy: integer("created_by").notNull().references(() => staffUsers.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + notifCreds = sqliteTable("notif_creds", { + id: integer().primaryKey({ autoIncrement: true }), + token: text().notNull().unique(), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow(), + userId: integer("user_id").notNull().references(() => users.id), + lastVerified: integer("last_verified", { mode: "timestamp" }) + }); + unloggedUserTokens = sqliteTable("unlogged_user_tokens", { + id: integer().primaryKey({ autoIncrement: true }), + token: text().notNull().unique(), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow(), + lastVerified: integer("last_verified", { mode: "timestamp" }) + }); + userNotifications = sqliteTable("user_notifications", { + id: integer().primaryKey({ autoIncrement: true }), + title: text("title").notNull(), + imageUrl: text("image_url"), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + body: text("body").notNull(), + applicableUsers: jsonText("applicable_users") + }); + usersRelations = relations(users, ({ many, one }) => ({ + addresses: many(addresses), + orders: many(orders), + notifications: many(notifications), + cartItems: many(cartItems), + userCreds: one(userCreds), + coupons: many(coupons), + couponUsages: many(couponUsage), + applicableCoupons: many(couponApplicableUsers), + userDetails: one(userDetails), + notifCreds: many(notifCreds), + userIncidents: many(userIncidents) + })); + userCredsRelations = relations(userCreds, ({ one }) => ({ + user: one(users, { fields: [userCreds.userId], references: [users.id] }) + })); + staffUsersRelations = relations(staffUsers, ({ one, many }) => ({ + role: one(staffRoles, { fields: [staffUsers.staffRoleId], references: [staffRoles.id] }), + coupons: many(coupons), + stores: many(storeInfo) + })); + addressesRelations = relations(addresses, ({ one, many }) => ({ + user: one(users, { fields: [addresses.userId], references: [users.id] }), + orders: many(orders), + zone: one(addressZones, { fields: [addresses.zoneId], references: [addressZones.id] }) + })); + unitsRelations = relations(units, ({ many }) => ({ + products: many(productInfo) + })); + productInfoRelations = relations(productInfo, ({ one, many }) => ({ + unit: one(units, { fields: [productInfo.unitId], references: [units.id] }), + store: one(storeInfo, { fields: [productInfo.storeId], references: [storeInfo.id] }), + productSlots: many(productSlots), + specialDeals: many(specialDeals), + orderItems: many(orderItems), + cartItems: many(cartItems), + tags: many(productTags), + applicableCoupons: many(couponApplicableProducts), + reviews: many(productReviews), + groups: many(productGroupMembership) + })); + productTagInfoRelations = relations(productTagInfo, ({ many }) => ({ + products: many(productTags) + })); + productTagsRelations = relations(productTags, ({ one }) => ({ + product: one(productInfo, { fields: [productTags.productId], references: [productInfo.id] }), + tag: one(productTagInfo, { fields: [productTags.tagId], references: [productTagInfo.id] }) + })); + deliverySlotInfoRelations = relations(deliverySlotInfo, ({ many }) => ({ + productSlots: many(productSlots), + orders: many(orders), + vendorSnippets: many(vendorSnippets) + })); + productSlotsRelations = relations(productSlots, ({ one }) => ({ + product: one(productInfo, { fields: [productSlots.productId], references: [productInfo.id] }), + slot: one(deliverySlotInfo, { fields: [productSlots.slotId], references: [deliverySlotInfo.id] }) + })); + specialDealsRelations = relations(specialDeals, ({ one }) => ({ + product: one(productInfo, { fields: [specialDeals.productId], references: [productInfo.id] }) + })); + ordersRelations = relations(orders, ({ one, many }) => ({ + user: one(users, { fields: [orders.userId], references: [users.id] }), + address: one(addresses, { fields: [orders.addressId], references: [addresses.id] }), + slot: one(deliverySlotInfo, { fields: [orders.slotId], references: [deliverySlotInfo.id] }), + orderItems: many(orderItems), + payment: one(payments), + paymentInfo: one(paymentInfoTable, { fields: [orders.paymentInfoId], references: [paymentInfoTable.id] }), + orderStatus: many(orderStatus), + refunds: many(refunds), + couponUsages: many(couponUsage), + userIncidents: many(userIncidents) + })); + orderItemsRelations = relations(orderItems, ({ one }) => ({ + order: one(orders, { fields: [orderItems.orderId], references: [orders.id] }), + product: one(productInfo, { fields: [orderItems.productId], references: [productInfo.id] }) + })); + orderStatusRelations = relations(orderStatus, ({ one }) => ({ + order: one(orders, { fields: [orderStatus.orderId], references: [orders.id] }), + user: one(users, { fields: [orderStatus.userId], references: [users.id] }), + refundCoupon: one(coupons, { fields: [orderStatus.refundCouponId], references: [coupons.id] }) + })); + paymentInfoRelations = relations(paymentInfoTable, ({ one }) => ({ + order: one(orders, { fields: [paymentInfoTable.id], references: [orders.paymentInfoId] }) + })); + paymentsRelations = relations(payments, ({ one }) => ({ + order: one(orders, { fields: [payments.orderId], references: [orders.id] }) + })); + refundsRelations = relations(refunds, ({ one }) => ({ + order: one(orders, { fields: [refunds.orderId], references: [orders.id] }) + })); + notificationsRelations = relations(notifications, ({ one }) => ({ + user: one(users, { fields: [notifications.userId], references: [users.id] }) + })); + productCategoriesRelations = relations(productCategories, ({}) => ({})); + cartItemsRelations = relations(cartItems, ({ one }) => ({ + user: one(users, { fields: [cartItems.userId], references: [users.id] }), + product: one(productInfo, { fields: [cartItems.productId], references: [productInfo.id] }) + })); + complaintsRelations = relations(complaints, ({ one }) => ({ + user: one(users, { fields: [complaints.userId], references: [users.id] }), + order: one(orders, { fields: [complaints.orderId], references: [orders.id] }) + })); + couponsRelations = relations(coupons, ({ one, many }) => ({ + creator: one(staffUsers, { fields: [coupons.createdBy], references: [staffUsers.id] }), + usages: many(couponUsage), + applicableUsers: many(couponApplicableUsers), + applicableProducts: many(couponApplicableProducts) + })); + couponUsageRelations = relations(couponUsage, ({ one }) => ({ + user: one(users, { fields: [couponUsage.userId], references: [users.id] }), + coupon: one(coupons, { fields: [couponUsage.couponId], references: [coupons.id] }), + order: one(orders, { fields: [couponUsage.orderId], references: [orders.id] }), + orderItem: one(orderItems, { fields: [couponUsage.orderItemId], references: [orderItems.id] }) + })); + userDetailsRelations = relations(userDetails, ({ one }) => ({ + user: one(users, { fields: [userDetails.userId], references: [users.id] }) + })); + notifCredsRelations = relations(notifCreds, ({ one }) => ({ + user: one(users, { fields: [notifCreds.userId], references: [users.id] }) + })); + userNotificationsRelations = relations(userNotifications, ({}) => ({ + // No relations needed for now + })); + storeInfoRelations = relations(storeInfo, ({ one, many }) => ({ + owner: one(staffUsers, { fields: [storeInfo.owner], references: [staffUsers.id] }), + products: many(productInfo) + })); + couponApplicableUsersRelations = relations(couponApplicableUsers, ({ one }) => ({ + coupon: one(coupons, { fields: [couponApplicableUsers.couponId], references: [coupons.id] }), + user: one(users, { fields: [couponApplicableUsers.userId], references: [users.id] }) + })); + couponApplicableProductsRelations = relations(couponApplicableProducts, ({ one }) => ({ + coupon: one(coupons, { fields: [couponApplicableProducts.couponId], references: [coupons.id] }), + product: one(productInfo, { fields: [couponApplicableProducts.productId], references: [productInfo.id] }) + })); + reservedCouponsRelations = relations(reservedCoupons, ({ one }) => ({ + redeemedUser: one(users, { fields: [reservedCoupons.redeemedBy], references: [users.id] }), + creator: one(staffUsers, { fields: [reservedCoupons.createdBy], references: [staffUsers.id] }) + })); + productReviewsRelations = relations(productReviews, ({ one }) => ({ + user: one(users, { fields: [productReviews.userId], references: [users.id] }), + product: one(productInfo, { fields: [productReviews.productId], references: [productInfo.id] }) + })); + addressZonesRelations = relations(addressZones, ({ many }) => ({ + addresses: many(addresses), + areas: many(addressAreas) + })); + addressAreasRelations = relations(addressAreas, ({ one }) => ({ + zone: one(addressZones, { fields: [addressAreas.zoneId], references: [addressZones.id] }) + })); + productGroupInfoRelations = relations(productGroupInfo, ({ many }) => ({ + memberships: many(productGroupMembership) + })); + productGroupMembershipRelations = relations(productGroupMembership, ({ one }) => ({ + product: one(productInfo, { fields: [productGroupMembership.productId], references: [productInfo.id] }), + group: one(productGroupInfo, { fields: [productGroupMembership.groupId], references: [productGroupInfo.id] }) + })); + homeBannersRelations = relations(homeBanners, ({}) => ({ + // Relations for productIds array would be more complex, skipping for now + })); + staffRolesRelations = relations(staffRoles, ({ many }) => ({ + staffUsers: many(staffUsers), + rolePermissions: many(staffRolePermissions) + })); + staffPermissionsRelations = relations(staffPermissions, ({ many }) => ({ + rolePermissions: many(staffRolePermissions) + })); + staffRolePermissionsRelations = relations(staffRolePermissions, ({ one }) => ({ + role: one(staffRoles, { fields: [staffRolePermissions.staffRoleId], references: [staffRoles.id] }), + permission: one(staffPermissions, { fields: [staffRolePermissions.staffPermissionId], references: [staffPermissions.id] }) + })); + userIncidentsRelations = relations(userIncidents, ({ one }) => ({ + user: one(users, { fields: [userIncidents.userId], references: [users.id] }), + order: one(orders, { fields: [userIncidents.orderId], references: [orders.id] }), + addedBy: one(staffUsers, { fields: [userIncidents.addedBy], references: [staffUsers.id] }) + })); + vendorSnippetsRelations = relations(vendorSnippets, ({ one }) => ({ + slot: one(deliverySlotInfo, { fields: [vendorSnippets.slotId], references: [deliverySlotInfo.id] }) + })); + } +}); + +// ../../packages/db_helper_sqlite/src/db/db_index.ts +function initDb(database) { + const base = drizzle(database, { schema: schema_exports }); + dbInstance = Object.assign(base, { + transaction: async (handler) => { + return handler(base); + } + }); +} +var dbInstance, db; +var init_db_index = __esm({ + "../../packages/db_helper_sqlite/src/db/db_index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_d1(); + init_schema(); + dbInstance = null; + __name(initDb, "initDb"); + db = new Proxy({}, { + get(_target, prop) { + if (!dbInstance) { + throw new Error("D1 database not initialized. Call initDb(env.DB) before using db helpers."); + } + return dbInstance[prop]; + } + }); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/banner.ts +async function getBanners() { + const banners = await db.query.homeBanners.findMany({ + orderBy: desc(homeBanners.createdAt) + }); + return banners.map((banner) => ({ + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description, + productIds: banner.productIds || [], + redirectUrl: banner.redirectUrl, + serialNum: banner.serialNum, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + })); +} +async function getBannerById(id) { + const banner = await db.query.homeBanners.findFirst({ + where: eq(homeBanners.id, id) + }); + if (!banner) + return null; + return { + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description, + productIds: banner.productIds || [], + redirectUrl: banner.redirectUrl, + serialNum: banner.serialNum, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + }; +} +async function createBanner(input) { + const [banner] = await db.insert(homeBanners).values({ + name: input.name, + imageUrl: input.imageUrl, + description: input.description, + productIds: input.productIds || [], + redirectUrl: input.redirectUrl, + serialNum: input.serialNum, + isActive: input.isActive + }).returning(); + return { + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description, + productIds: banner.productIds || [], + redirectUrl: banner.redirectUrl, + serialNum: banner.serialNum, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + }; +} +async function updateBanner(id, input) { + const [banner] = await db.update(homeBanners).set({ + ...input, + lastUpdated: /* @__PURE__ */ new Date() + }).where(eq(homeBanners.id, id)).returning(); + return { + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description, + productIds: banner.productIds || [], + redirectUrl: banner.redirectUrl, + serialNum: banner.serialNum, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + }; +} +async function deleteBanner(id) { + await db.delete(homeBanners).where(eq(homeBanners.id, id)); +} +var init_banner = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/banner.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getBanners, "getBanners"); + __name(getBannerById, "getBannerById"); + __name(createBanner, "createBanner"); + __name(updateBanner, "updateBanner"); + __name(deleteBanner, "deleteBanner"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/complaint.ts +async function getComplaints(cursor, limit = 20) { + const whereCondition = cursor ? lt(complaints.id, cursor) : void 0; + const complaintsData = await db.select({ + id: complaints.id, + complaintBody: complaints.complaintBody, + userId: complaints.userId, + orderId: complaints.orderId, + isResolved: complaints.isResolved, + response: complaints.response, + createdAt: complaints.createdAt, + images: complaints.images, + userName: users.name, + userMobile: users.mobile + }).from(complaints).leftJoin(users, eq(complaints.userId, users.id)).where(whereCondition).orderBy(desc(complaints.id)).limit(limit + 1); + const hasMore = complaintsData.length > limit; + const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData; + return { + complaints: complaintsToReturn.map((c2) => ({ + id: c2.id, + complaintBody: c2.complaintBody, + userId: c2.userId, + orderId: c2.orderId, + isResolved: c2.isResolved, + response: c2.response, + createdAt: c2.createdAt, + images: c2.images, + userName: c2.userName, + userMobile: c2.userMobile + })), + hasMore + }; +} +async function resolveComplaint(id, response) { + await db.update(complaints).set({ isResolved: true, response }).where(eq(complaints.id, id)); +} +var init_complaint = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/complaint.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getComplaints, "getComplaints"); + __name(resolveComplaint, "resolveComplaint"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/const.ts +async function getAllConstants() { + const constants2 = await db.select().from(keyValStore); + return constants2.map((c2) => ({ + key: c2.key, + value: c2.value + })); +} +async function upsertConstants(constants2) { + await db.transaction(async (tx) => { + for (const { key, value } of constants2) { + await tx.insert(keyValStore).values({ key, value }).onConflictDoUpdate({ + target: keyValStore.key, + set: { value } + }); + } + }); +} +var init_const = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/const.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + __name(getAllConstants, "getAllConstants"); + __name(upsertConstants, "upsertConstants"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/coupon.ts +async function getAllCoupons(cursor, limit = 50, search) { + let whereCondition = void 0; + const conditions = []; + if (cursor) { + conditions.push(lt(coupons.id, cursor)); + } + if (search && search.trim()) { + conditions.push(like(coupons.couponCode, `%${search}%`)); + } + if (conditions.length > 0) { + whereCondition = and(...conditions); + } + const result = await db.query.coupons.findMany({ + where: whereCondition, + with: { + creator: true, + applicableUsers: { + with: { + user: true + } + }, + applicableProducts: { + with: { + product: true + } + } + }, + orderBy: desc(coupons.createdAt), + limit: limit + 1 + }); + const hasMore = result.length > limit; + const couponsList = hasMore ? result.slice(0, limit) : result; + return { coupons: couponsList, hasMore }; +} +async function getCouponById(id) { + return await db.query.coupons.findFirst({ + where: eq(coupons.id, id), + with: { + creator: true, + applicableUsers: { + with: { + user: true + } + }, + applicableProducts: { + with: { + product: true + } + } + } + }); +} +async function createCouponWithRelations(input, applicableUsers, applicableProducts) { + return await db.transaction(async (tx) => { + const [coupon] = await tx.insert(coupons).values({ + couponCode: input.couponCode, + isUserBased: input.isUserBased, + discountPercent: input.discountPercent, + flatDiscount: input.flatDiscount, + minOrder: input.minOrder, + productIds: input.productIds, + createdBy: input.createdBy, + maxValue: input.maxValue, + isApplyForAll: input.isApplyForAll, + validTill: input.validTill, + maxLimitForUser: input.maxLimitForUser, + exclusiveApply: input.exclusiveApply + }).returning(); + if (applicableUsers && applicableUsers.length > 0) { + await tx.insert(couponApplicableUsers).values( + applicableUsers.map((userId) => ({ + couponId: coupon.id, + userId + })) + ); + } + if (applicableProducts && applicableProducts.length > 0) { + await tx.insert(couponApplicableProducts).values( + applicableProducts.map((productId) => ({ + couponId: coupon.id, + productId + })) + ); + } + return coupon; + }); +} +async function updateCouponWithRelations(id, input, applicableUsers, applicableProducts) { + return await db.transaction(async (tx) => { + const [coupon] = await tx.update(coupons).set({ + ...input + }).where(eq(coupons.id, id)).returning(); + if (applicableUsers !== void 0) { + await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.couponId, id)); + if (applicableUsers.length > 0) { + await tx.insert(couponApplicableUsers).values( + applicableUsers.map((userId) => ({ + couponId: id, + userId + })) + ); + } + } + if (applicableProducts !== void 0) { + await tx.delete(couponApplicableProducts).where(eq(couponApplicableProducts.couponId, id)); + if (applicableProducts.length > 0) { + await tx.insert(couponApplicableProducts).values( + applicableProducts.map((productId) => ({ + couponId: id, + productId + })) + ); + } + } + return coupon; + }); +} +async function invalidateCoupon(id) { + const result = await db.update(coupons).set({ isInvalidated: true }).where(eq(coupons.id, id)).returning(); + return result[0]; +} +async function validateCoupon(code, userId, orderAmount) { + const coupon = await db.query.coupons.findFirst({ + where: and( + eq(coupons.couponCode, code.toUpperCase()), + eq(coupons.isInvalidated, false) + ) + }); + if (!coupon) { + return { valid: false, message: "Coupon not found or invalidated" }; + } + if (coupon.validTill && new Date(coupon.validTill) < /* @__PURE__ */ new Date()) { + return { valid: false, message: "Coupon has expired" }; + } + if (!coupon.isApplyForAll && !coupon.isUserBased) { + return { valid: false, message: "Coupon is not available for use" }; + } + const minOrderValue2 = coupon.minOrder ? parseFloat(coupon.minOrder) : 0; + if (minOrderValue2 > 0 && orderAmount < minOrderValue2) { + return { valid: false, message: `Minimum order amount is ${minOrderValue2}` }; + } + let discountAmount = 0; + if (coupon.discountPercent) { + const percent = parseFloat(coupon.discountPercent); + discountAmount = orderAmount * percent / 100; + } else if (coupon.flatDiscount) { + discountAmount = parseFloat(coupon.flatDiscount); + } + const maxValueLimit = coupon.maxValue ? parseFloat(coupon.maxValue) : 0; + if (maxValueLimit > 0 && discountAmount > maxValueLimit) { + discountAmount = maxValueLimit; + } + return { + valid: true, + discountAmount, + coupon: { + id: coupon.id, + discountPercent: coupon.discountPercent, + flatDiscount: coupon.flatDiscount, + maxValue: coupon.maxValue + } + }; +} +async function getReservedCoupons(cursor, limit = 50, search) { + let whereCondition = void 0; + const conditions = []; + if (cursor) { + conditions.push(lt(reservedCoupons.id, cursor)); + } + if (search && search.trim()) { + conditions.push(or( + like(reservedCoupons.secretCode, `%${search}%`), + like(reservedCoupons.couponCode, `%${search}%`) + )); + } + if (conditions.length > 0) { + whereCondition = and(...conditions); + } + const result = await db.query.reservedCoupons.findMany({ + where: whereCondition, + with: { + redeemedUser: true, + creator: true + }, + orderBy: desc(reservedCoupons.createdAt), + limit: limit + 1 + }); + const hasMore = result.length > limit; + const couponsList = hasMore ? result.slice(0, limit) : result; + return { coupons: couponsList, hasMore }; +} +async function createReservedCouponWithProducts(input, applicableProducts) { + return await db.transaction(async (tx) => { + const [coupon] = await tx.insert(reservedCoupons).values({ + secretCode: input.secretCode, + couponCode: input.couponCode, + discountPercent: input.discountPercent, + flatDiscount: input.flatDiscount, + minOrder: input.minOrder, + productIds: input.productIds, + maxValue: input.maxValue, + validTill: input.validTill, + maxLimitForUser: input.maxLimitForUser, + exclusiveApply: input.exclusiveApply, + createdBy: input.createdBy + }).returning(); + if (applicableProducts && applicableProducts.length > 0) { + await tx.insert(couponApplicableProducts).values( + applicableProducts.map((productId) => ({ + couponId: coupon.id, + productId + })) + ); + } + return coupon; + }); +} +async function checkUsersExist(userIds) { + const existingUsers = await db.query.users.findMany({ + where: inArray(users.id, userIds), + columns: { id: true } + }); + return existingUsers.length === userIds.length; +} +async function checkCouponExists(couponCode) { + const existing = await db.query.coupons.findFirst({ + where: eq(coupons.couponCode, couponCode) + }); + return !!existing; +} +async function checkReservedCouponExists(secretCode) { + const existing = await db.query.reservedCoupons.findFirst({ + where: eq(reservedCoupons.secretCode, secretCode) + }); + return !!existing; +} +async function generateCancellationCoupon(orderId, staffUserId, userId, orderAmount, couponCode) { + return await db.transaction(async (tx) => { + const expiryDate = /* @__PURE__ */ new Date(); + expiryDate.setDate(expiryDate.getDate() + 30); + const [coupon] = await tx.insert(coupons).values({ + couponCode, + isUserBased: true, + flatDiscount: orderAmount.toString(), + minOrder: orderAmount.toString(), + maxValue: orderAmount.toString(), + validTill: expiryDate, + maxLimitForUser: 1, + createdBy: staffUserId, + isApplyForAll: false + }).returning(); + await tx.insert(couponApplicableUsers).values({ + couponId: coupon.id, + userId + }); + await tx.update(orderStatus).set({ refundCouponId: coupon.id }).where(eq(orderStatus.orderId, orderId)); + return coupon; + }); +} +async function getOrderWithUser(orderId) { + return await db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + user: true + } + }); +} +async function createCouponForUser(mobile, couponCode, staffUserId) { + return await db.transaction(async (tx) => { + let user = await tx.query.users.findFirst({ + where: eq(users.mobile, mobile) + }); + if (!user) { + const [newUser] = await tx.insert(users).values({ + name: null, + email: null, + mobile + }).returning(); + user = newUser; + } + const [coupon] = await tx.insert(coupons).values({ + couponCode, + isUserBased: true, + discountPercent: "20", + minOrder: "1000", + maxValue: "500", + maxLimitForUser: 1, + isApplyForAll: false, + exclusiveApply: false, + createdBy: staffUserId, + validTill: new Date(Date.now() + 90 * 24 * 60 * 60 * 1e3) + }).returning(); + await tx.insert(couponApplicableUsers).values({ + couponId: coupon.id, + userId: user.id + }); + return { + coupon, + user: { + id: user.id, + mobile: user.mobile, + name: user.name + } + }; + }); +} +async function getUsersForCoupon(search, limit = 20, offset = 0) { + let whereCondition = void 0; + if (search && search.trim()) { + whereCondition = or( + like(users.name, `%${search}%`), + like(users.mobile, `%${search}%`) + ); + } + const userList = await db.query.users.findMany({ + where: whereCondition, + columns: { + id: true, + name: true, + mobile: true + }, + limit, + offset, + orderBy: asc(users.name) + }); + return { + users: userList.map((user) => ({ + id: user.id, + name: user.name || "Unknown", + mobile: user.mobile + })) + }; +} +var init_coupon = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/coupon.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getAllCoupons, "getAllCoupons"); + __name(getCouponById, "getCouponById"); + __name(createCouponWithRelations, "createCouponWithRelations"); + __name(updateCouponWithRelations, "updateCouponWithRelations"); + __name(invalidateCoupon, "invalidateCoupon"); + __name(validateCoupon, "validateCoupon"); + __name(getReservedCoupons, "getReservedCoupons"); + __name(createReservedCouponWithProducts, "createReservedCouponWithProducts"); + __name(checkUsersExist, "checkUsersExist"); + __name(checkCouponExists, "checkCouponExists"); + __name(checkReservedCouponExists, "checkReservedCouponExists"); + __name(generateCancellationCoupon, "generateCancellationCoupon"); + __name(getOrderWithUser, "getOrderWithUser"); + __name(createCouponForUser, "createCouponForUser"); + __name(getUsersForCoupon, "getUsersForCoupon"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/order.ts +async function updateOrderNotes(orderId, adminNotes) { + const [result] = await db.update(orders).set({ adminNotes }).where(eq(orders.id, orderId)).returning(); + return result || null; +} +async function updateOrderPackaged(orderId, isPackaged) { + const orderIdNumber = parseInt(orderId); + await db.update(orderItems).set({ is_packaged: isPackaged }).where(eq(orderItems.orderId, orderIdNumber)); + if (!isPackaged) { + await db.update(orderStatus).set({ isPackaged, isDelivered: false }).where(eq(orderStatus.orderId, orderIdNumber)); + } else { + await db.update(orderStatus).set({ isPackaged }).where(eq(orderStatus.orderId, orderIdNumber)); + } + const order = await db.query.orders.findFirst({ + where: eq(orders.id, orderIdNumber) + }); + return { success: true, userId: order?.userId ?? null }; +} +async function updateOrderDelivered(orderId, isDelivered) { + const orderIdNumber = parseInt(orderId); + await db.update(orderStatus).set({ isDelivered }).where(eq(orderStatus.orderId, orderIdNumber)); + const order = await db.query.orders.findFirst({ + where: eq(orders.id, orderIdNumber) + }); + return { success: true, userId: order?.userId ?? null }; +} +async function getOrderDetails(orderId) { + const orderData = await db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + user: true, + address: true, + slot: true, + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + }, + payment: true, + paymentInfo: true, + orderStatus: true, + refunds: true + } + }); + if (!orderData) { + return null; + } + const couponUsageData = await db.query.couponUsage.findMany({ + where: eq(couponUsage.orderId, orderData.id), + with: { + coupon: true + } + }); + let couponData = null; + if (couponUsageData.length > 0) { + let totalDiscountAmount = 0; + const orderTotal = parseFloat((orderData.totalAmount ?? "0").toString()); + for (const usage of couponUsageData) { + let discountAmount = 0; + if (usage.coupon.discountPercent) { + discountAmount = orderTotal * parseFloat(usage.coupon.discountPercent.toString()) / 100; + } else if (usage.coupon.flatDiscount) { + discountAmount = parseFloat(usage.coupon.flatDiscount.toString()); + } + if (usage.coupon.maxValue && discountAmount > parseFloat(usage.coupon.maxValue.toString())) { + discountAmount = parseFloat(usage.coupon.maxValue.toString()); + } + totalDiscountAmount += discountAmount; + } + couponData = { + couponCode: couponUsageData.map((u5) => u5.coupon.couponCode).join(", "), + couponDescription: `${couponUsageData.length} coupons applied`, + discountAmount: totalDiscountAmount + }; + } + const statusRecord = orderData.orderStatus?.[0]; + const orderStatusRecord = statusRecord ? mapOrderStatusRecord(statusRecord) : null; + let status = "pending"; + if (orderStatusRecord?.isCancelled) { + status = "cancelled"; + } else if (orderStatusRecord?.isDelivered) { + status = "delivered"; + } + const refund = orderData.refunds?.[0]; + const refundStatus = refund?.refundStatus && isRefundStatus(refund.refundStatus) ? refund.refundStatus : null; + const refundRecord = refund ? { + id: refund.id, + orderId: refund.orderId, + refundAmount: refund.refundAmount, + refundStatus, + merchantRefundId: refund.merchantRefundId, + refundProcessedAt: refund.refundProcessedAt, + createdAt: refund.createdAt + } : null; + return { + id: orderData.id, + readableId: orderData.id, + userId: orderData.user.id, + customerName: `${orderData.user.name}`, + customerEmail: orderData.user.email, + customerMobile: orderData.user.mobile, + address: { + name: orderData.address.name, + line1: orderData.address.addressLine1, + line2: orderData.address.addressLine2, + city: orderData.address.city, + state: orderData.address.state, + pincode: orderData.address.pincode, + phone: orderData.address.phone + }, + slotInfo: orderData.slot ? { + time: orderData.slot.deliveryTime.toISOString(), + sequence: orderData.slot.deliverySequence + } : null, + isCod: orderData.isCod, + isOnlinePayment: orderData.isOnlinePayment, + totalAmount: parseFloat(orderData.totalAmount?.toString() || "0") - parseFloat(orderData.deliveryCharge?.toString() || "0"), + deliveryCharge: parseFloat(orderData.deliveryCharge?.toString() || "0"), + adminNotes: orderData.adminNotes, + userNotes: orderData.userNotes, + createdAt: orderData.createdAt, + status, + isPackaged: orderStatusRecord?.isPackaged || false, + isDelivered: orderStatusRecord?.isDelivered || false, + items: orderData.orderItems.map((item) => ({ + id: item.id, + name: item.product.name, + quantity: item.quantity, + productSize: item.product.productQuantity, + price: item.price, + unit: item.product.unit?.shortNotation, + amount: parseFloat(item.price.toString()) * parseFloat(item.quantity || "0"), + isPackaged: item.is_packaged, + isPackageVerified: item.is_package_verified + })), + payment: orderData.payment ? { + status: orderData.payment.status, + gateway: orderData.payment.gateway, + merchantOrderId: orderData.payment.merchantOrderId + } : null, + paymentInfo: orderData.paymentInfo ? { + status: orderData.paymentInfo.status, + gateway: orderData.paymentInfo.gateway, + merchantOrderId: orderData.paymentInfo.merchantOrderId + } : null, + cancelReason: orderStatusRecord?.cancelReason || null, + cancellationReviewed: orderStatusRecord?.cancellationReviewed || false, + isRefundDone: refundStatus === "processed" || false, + refundStatus, + refundAmount: refund?.refundAmount ? parseFloat(refund.refundAmount.toString()) : null, + couponData, + couponCode: couponData?.couponCode || null, + couponDescription: couponData?.couponDescription || null, + discountAmount: couponData?.discountAmount || null, + orderStatus: orderStatusRecord, + refundRecord, + isFlashDelivery: orderData.isFlashDelivery + }; +} +async function updateOrderItemPackaging(orderItemId, isPackaged, isPackageVerified) { + const orderItem = await db.query.orderItems.findFirst({ + where: eq(orderItems.id, orderItemId) + }); + if (!orderItem) { + return { success: false, updated: false }; + } + const updateData = {}; + if (isPackaged !== void 0) { + updateData.is_packaged = isPackaged; + } + if (isPackageVerified !== void 0) { + updateData.is_package_verified = isPackageVerified; + } + await db.update(orderItems).set(updateData).where(eq(orderItems.id, orderItemId)); + return { success: true, updated: true }; +} +async function removeDeliveryCharge(orderId) { + const order = await db.query.orders.findFirst({ + where: eq(orders.id, orderId) + }); + if (!order) { + return null; + } + const currentDeliveryCharge = parseFloat(order.deliveryCharge?.toString() || "0"); + const currentTotalAmount = parseFloat(order.totalAmount?.toString() || "0"); + const newTotalAmount = currentTotalAmount - currentDeliveryCharge; + await db.update(orders).set({ + deliveryCharge: "0", + totalAmount: newTotalAmount.toString() + }).where(eq(orders.id, orderId)); + return { success: true, message: "Delivery charge removed" }; +} +async function getSlotOrders(slotId) { + const slotOrders = await db.query.orders.findMany({ + where: eq(orders.slotId, parseInt(slotId)), + with: { + user: true, + address: true, + slot: true, + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + }, + orderStatus: true + } + }); + const filteredOrders = slotOrders.filter((order) => { + const statusRecord = order.orderStatus[0]; + return order.isCod || statusRecord && statusRecord.paymentStatus === "success"; + }); + const formattedOrders = filteredOrders.map((order) => { + const statusRecord = order.orderStatus[0]; + let status = "pending"; + if (statusRecord?.isCancelled) { + status = "cancelled"; + } else if (statusRecord?.isDelivered) { + status = "delivered"; + } + const items = order.orderItems.map((item) => ({ + id: item.id, + name: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat(item.price.toString()), + amount: parseFloat(item.quantity) * parseFloat(item.price.toString()), + unit: item.product.unit?.shortNotation || "", + isPackaged: item.is_packaged, + isPackageVerified: item.is_package_verified + })); + const paymentMode = order.isCod ? "COD" : "Online"; + return { + id: order.id, + readableId: order.id, + customerName: order.user.name || order.user.mobile + "", + address: `${order.address.addressLine1}${order.address.addressLine2 ? `, ${order.address.addressLine2}` : ""}, ${order.address.city}, ${order.address.state} - ${order.address.pincode}, Phone: ${order.address.phone}`, + addressId: order.addressId, + latitude: order.address.adminLatitude ?? order.address.latitude, + longitude: order.address.adminLongitude ?? order.address.longitude, + totalAmount: parseFloat(order.totalAmount), + items, + deliveryTime: order.slot?.deliveryTime.toISOString() || null, + status, + isPackaged: order.orderItems.every((item) => item.is_packaged) || false, + isDelivered: statusRecord?.isDelivered || false, + isCod: order.isCod, + paymentMode, + paymentStatus: isPaymentStatus(statusRecord?.paymentStatus || "pending") ? statusRecord?.paymentStatus || "pending" : "pending", + slotId: order.slotId, + adminNotes: order.adminNotes, + userNotes: order.userNotes + }; + }); + return { success: true, data: formattedOrders }; +} +async function updateAddressCoords(addressId, latitude, longitude) { + const result = await db.update(addresses).set({ + adminLatitude: latitude, + adminLongitude: longitude + }).where(eq(addresses.id, addressId)).returning(); + return { success: result.length > 0 }; +} +async function getAllOrders(input) { + const { + cursor, + limit, + slotId, + packagedFilter, + deliveredFilter, + cancellationFilter, + flashDeliveryFilter + } = input; + let whereCondition = eq(orders.id, orders.id); + if (cursor) { + whereCondition = and(whereCondition, lt(orders.id, cursor)); + } + if (slotId) { + whereCondition = and(whereCondition, eq(orders.slotId, slotId)); + } + if (packagedFilter === "packaged") { + whereCondition = and(whereCondition, eq(orderStatus.isPackaged, true)); + } else if (packagedFilter === "not_packaged") { + whereCondition = and(whereCondition, eq(orderStatus.isPackaged, false)); + } + if (deliveredFilter === "delivered") { + whereCondition = and(whereCondition, eq(orderStatus.isDelivered, true)); + } else if (deliveredFilter === "not_delivered") { + whereCondition = and(whereCondition, eq(orderStatus.isDelivered, false)); + } + if (cancellationFilter === "cancelled") { + whereCondition = and(whereCondition, eq(orderStatus.isCancelled, true)); + } else if (cancellationFilter === "not_cancelled") { + whereCondition = and(whereCondition, eq(orderStatus.isCancelled, false)); + } + if (flashDeliveryFilter === "flash") { + whereCondition = and(whereCondition, eq(orders.isFlashDelivery, true)); + } else if (flashDeliveryFilter === "regular") { + whereCondition = and(whereCondition, eq(orders.isFlashDelivery, false)); + } + const allOrders = await db.query.orders.findMany({ + where: whereCondition, + orderBy: desc(orders.createdAt), + limit: limit + 1, + with: { + user: true, + address: true, + slot: true, + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + }, + orderStatus: true + } + }); + const hasMore = allOrders.length > limit; + const ordersToReturn = hasMore ? allOrders.slice(0, limit) : allOrders; + const filteredOrders = ordersToReturn.filter((order) => { + const statusRecord = order.orderStatus[0]; + return order.isCod || statusRecord && statusRecord.paymentStatus === "success"; + }); + const formattedOrders = filteredOrders.map((order) => { + const statusRecord = order.orderStatus[0]; + let status = "pending"; + if (statusRecord?.isCancelled) { + status = "cancelled"; + } else if (statusRecord?.isDelivered) { + status = "delivered"; + } + const items = order.orderItems.map((item) => ({ + id: item.id, + name: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat(item.price.toString()), + amount: parseFloat(item.quantity) * parseFloat(item.price.toString()), + unit: item.product.unit?.shortNotation || "", + productSize: item.product.productQuantity, + isPackaged: item.is_packaged, + isPackageVerified: item.is_package_verified + })).sort((first, second) => first.id - second.id); + return { + id: order.id, + orderId: order.id.toString(), + readableId: order.id, + customerName: order.user.name || order.user.mobile + "", + customerMobile: order.user.mobile, + address: `${order.address.addressLine1}${order.address.addressLine2 ? `, ${order.address.addressLine2}` : ""}, ${order.address.city}, ${order.address.state} - ${order.address.pincode}, Phone: ${order.address.phone}`, + addressId: order.addressId, + latitude: order.address.adminLatitude ?? order.address.latitude, + longitude: order.address.adminLongitude ?? order.address.longitude, + totalAmount: parseFloat(order.totalAmount), + deliveryCharge: parseFloat(order.deliveryCharge || "0"), + items, + createdAt: order.createdAt, + deliveryTime: order.slot?.deliveryTime.toISOString() || null, + status, + isPackaged: order.orderItems.every((item) => item.is_packaged) || false, + isDelivered: statusRecord?.isDelivered || false, + isCod: order.isCod, + isFlashDelivery: order.isFlashDelivery, + userNotes: order.userNotes, + adminNotes: order.adminNotes, + userNegativityScore: 0, + userId: order.userId + }; + }); + return { + orders: formattedOrders, + nextCursor: hasMore ? ordersToReturn[ordersToReturn.length - 1].id : void 0 + }; +} +async function rebalanceSlots(slotIds) { + const ordersList = await db.query.orders.findMany({ + where: inArray(orders.slotId, slotIds), + with: { + orderItems: { + with: { + product: true + } + }, + couponUsages: { + with: { + coupon: true + } + } + } + }); + const processedOrdersData = ordersList.map((order) => { + let newTotal = order.orderItems.reduce((acc, item) => { + const latestPrice = +item.product.price; + const amount = latestPrice * Number(item.quantity); + return acc + amount; + }, 0); + order.orderItems.forEach((item) => { + item.price = item.product.price; + item.discountedPrice = item.product.price; + }); + const coupon = order.couponUsages[0]?.coupon; + let discount = 0; + if (coupon && !coupon.isInvalidated && (!coupon.validTill || new Date(coupon.validTill) > /* @__PURE__ */ new Date())) { + const proportion = Number(order.orderGroupProportion || 1); + if (coupon.discountPercent) { + const maxDiscount = Number(coupon.maxValue || Infinity) * proportion; + discount = Math.min(newTotal * parseFloat(coupon.discountPercent) / 100, maxDiscount); + } else { + discount = Number(coupon.flatDiscount) * proportion; + } + } + newTotal -= discount; + const { couponUsages, orderItems: orderItemsRaw, ...rest } = order; + const updatedOrderItems = orderItemsRaw.map((item) => { + const { product, ...rawOrderItem } = item; + return rawOrderItem; + }); + return { order: rest, updatedOrderItems, newTotal }; + }); + const updatedOrderIds = []; + await db.transaction(async (tx) => { + for (const { order, updatedOrderItems, newTotal } of processedOrdersData) { + await tx.update(orders).set({ totalAmount: newTotal.toString() }).where(eq(orders.id, order.id)); + updatedOrderIds.push(order.id); + for (const item of updatedOrderItems) { + await tx.update(orderItems).set({ + price: item.price, + discountedPrice: item.discountedPrice + }).where(eq(orderItems.id, item.id)); + } + } + }); + return { + success: true, + updatedOrders: updatedOrderIds, + message: `Rebalanced ${updatedOrderIds.length} orders.` + }; +} +async function cancelOrder(orderId, reason) { + const order = await db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + orderStatus: true + } + }); + if (!order) { + return { success: false, message: "Order not found", error: "order_not_found" }; + } + const status = order.orderStatus[0]; + if (!status) { + return { success: false, message: "Order status not found", error: "status_not_found" }; + } + if (status.isCancelled) { + return { success: false, message: "Order is already cancelled", error: "already_cancelled" }; + } + if (status.isDelivered) { + return { success: false, message: "Cannot cancel delivered order", error: "already_delivered" }; + } + const result = await db.transaction(async (tx) => { + await tx.update(orderStatus).set({ + isCancelled: true, + isCancelledByAdmin: true, + cancelReason: reason, + cancellationAdminNotes: reason, + cancellationReviewed: true, + cancellationReviewedAt: /* @__PURE__ */ new Date() + }).where(eq(orderStatus.id, status.id)); + const refundStatus = order.isCod ? "na" : "pending"; + await tx.insert(refunds).values({ + orderId: order.id, + refundStatus + }); + return { orderId: order.id, userId: order.userId }; + }); + return { + success: true, + message: "Order cancelled successfully", + orderId: result.orderId, + userId: result.userId + }; +} +async function deleteOrderById(orderId) { + await db.transaction(async (tx) => { + await tx.delete(orderItems).where(eq(orderItems.orderId, orderId)); + await tx.delete(orderStatus).where(eq(orderStatus.orderId, orderId)); + await tx.delete(payments).where(eq(payments.orderId, orderId)); + await tx.delete(refunds).where(eq(refunds.orderId, orderId)); + await tx.delete(couponUsage).where(eq(couponUsage.orderId, orderId)); + await tx.delete(complaints).where(eq(complaints.orderId, orderId)); + await tx.delete(orders).where(eq(orders.id, orderId)); + }); +} +var isPaymentStatus, isRefundStatus, mapOrderStatusRecord; +var init_order = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/order.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + isPaymentStatus = /* @__PURE__ */ __name((value) => value === "pending" || value === "success" || value === "cod" || value === "failed", "isPaymentStatus"); + isRefundStatus = /* @__PURE__ */ __name((value) => value === "success" || value === "pending" || value === "failed" || value === "none" || value === "na" || value === "processed", "isRefundStatus"); + mapOrderStatusRecord = /* @__PURE__ */ __name((record2) => ({ + id: record2.id, + orderTime: record2.orderTime, + userId: record2.userId, + orderId: record2.orderId, + isPackaged: record2.isPackaged, + isDelivered: record2.isDelivered, + isCancelled: record2.isCancelled, + cancelReason: record2.cancelReason ?? null, + isCancelledByAdmin: record2.isCancelledByAdmin ?? null, + paymentStatus: isPaymentStatus(record2.paymentStatus) ? record2.paymentStatus : "pending", + cancellationUserNotes: record2.cancellationUserNotes ?? null, + cancellationAdminNotes: record2.cancellationAdminNotes ?? null, + cancellationReviewed: record2.cancellationReviewed, + cancellationReviewedAt: record2.cancellationReviewedAt ?? null, + refundCouponId: record2.refundCouponId ?? null + }), "mapOrderStatusRecord"); + __name(updateOrderNotes, "updateOrderNotes"); + __name(updateOrderPackaged, "updateOrderPackaged"); + __name(updateOrderDelivered, "updateOrderDelivered"); + __name(getOrderDetails, "getOrderDetails"); + __name(updateOrderItemPackaging, "updateOrderItemPackaging"); + __name(removeDeliveryCharge, "removeDeliveryCharge"); + __name(getSlotOrders, "getSlotOrders"); + __name(updateAddressCoords, "updateAddressCoords"); + __name(getAllOrders, "getAllOrders"); + __name(rebalanceSlots, "rebalanceSlots"); + __name(cancelOrder, "cancelOrder"); + __name(deleteOrderById, "deleteOrderById"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/product.ts +async function getAllProducts() { + const products = await db.query.productInfo.findMany({ + orderBy: productInfo.name, + with: { + unit: true, + store: true + } + }); + return products.map((product) => ({ + ...mapProduct(product), + unit: mapUnit(product.unit), + store: product.store ? mapStore(product.store) : null + })); +} +async function getProductById(id) { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.id, id), + with: { + unit: true + } + }); + if (!product) { + return null; + } + const deals = await db.query.specialDeals.findMany({ + where: eq(specialDeals.productId, id), + orderBy: specialDeals.quantity + }); + const productTagsData = await db.query.productTags.findMany({ + where: eq(productTags.productId, id), + with: { + tag: true + } + }); + return { + ...mapProduct(product), + unit: mapUnit(product.unit), + deals: deals.map(mapSpecialDeal), + tags: productTagsData.map((tag2) => mapTagInfo(tag2.tag)) + }; +} +async function deleteProduct(id) { + const [deletedProduct] = await db.delete(productInfo).where(eq(productInfo.id, id)).returning(); + if (!deletedProduct) { + return null; + } + return mapProduct(deletedProduct); +} +async function createProduct(input) { + const [product] = await db.insert(productInfo).values(input).returning(); + return mapProduct(product); +} +async function updateProduct(id, updates) { + const [product] = await db.update(productInfo).set(updates).where(eq(productInfo.id, id)).returning(); + if (!product) { + return null; + } + return mapProduct(product); +} +async function toggleProductOutOfStock(id) { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.id, id) + }); + if (!product) { + return null; + } + const [updatedProduct] = await db.update(productInfo).set({ + isOutOfStock: !product.isOutOfStock + }).where(eq(productInfo.id, id)).returning(); + if (!updatedProduct) { + return null; + } + return mapProduct(updatedProduct); +} +async function updateSlotProducts(slotId, productIds) { + const currentAssociations = await db.query.productSlots.findMany({ + where: eq(productSlots.slotId, parseInt(slotId)), + columns: { + productId: true + } + }); + const currentProductIds = currentAssociations.map((assoc) => assoc.productId); + const newProductIds = productIds.map((id) => parseInt(id)); + const productsToAdd = newProductIds.filter((id) => !currentProductIds.includes(id)); + const productsToRemove = currentProductIds.filter((id) => !newProductIds.includes(id)); + if (productsToRemove.length > 0) { + await db.delete(productSlots).where( + and( + eq(productSlots.slotId, parseInt(slotId)), + inArray(productSlots.productId, productsToRemove) + ) + ); + } + if (productsToAdd.length > 0) { + const newAssociations = productsToAdd.map((productId) => ({ + productId, + slotId: parseInt(slotId) + })); + await db.insert(productSlots).values(newAssociations); + } + return { + message: "Slot products updated successfully", + added: productsToAdd.length, + removed: productsToRemove.length + }; +} +async function getSlotProductIds(slotId) { + const associations = await db.query.productSlots.findMany({ + where: eq(productSlots.slotId, parseInt(slotId)), + columns: { + productId: true + } + }); + return associations.map((assoc) => assoc.productId); +} +async function getAllUnits() { + const allUnits = await db.query.units.findMany({ + orderBy: units.shortNotation + }); + return allUnits.map(mapUnit); +} +async function getAllProductTags() { + const tags = await db.query.productTagInfo.findMany({ + with: { + products: { + with: { + product: true + } + } + } + }); + return tags.map((tag2) => ({ + ...mapTagInfo(tag2), + products: tag2.products.map((assignment) => ({ + productId: assignment.productId, + tagId: assignment.tagId, + assignedAt: assignment.assignedAt, + product: mapProduct(assignment.product) + })) + })); +} +async function getAllProductTagInfos() { + const tags = await db.query.productTagInfo.findMany({ + orderBy: productTagInfo.tagName + }); + return tags.map(mapTagInfo); +} +async function getProductTagInfoById(tagId) { + const tag2 = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.id, tagId) + }); + if (!tag2) { + return null; + } + return mapTagInfo(tag2); +} +async function createProductTag(input) { + const [tag2] = await db.insert(productTagInfo).values({ + tagName: input.tagName, + tagDescription: input.tagDescription || null, + imageUrl: input.imageUrl || null, + isDashboardTag: input.isDashboardTag || false, + relatedStores: input.relatedStores || [] + }).returning(); + return { + ...mapTagInfo(tag2), + products: [] + }; +} +async function getProductTagById(tagId) { + const tag2 = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.id, tagId), + with: { + products: { + with: { + product: true + } + } + } + }); + if (!tag2) { + return null; + } + return { + ...mapTagInfo(tag2), + products: tag2.products.map((assignment) => ({ + productId: assignment.productId, + tagId: assignment.tagId, + assignedAt: assignment.assignedAt, + product: mapProduct(assignment.product) + })) + }; +} +async function updateProductTag(tagId, input) { + const [tag2] = await db.update(productTagInfo).set({ + ...input.tagName !== void 0 && { tagName: input.tagName }, + ...input.tagDescription !== void 0 && { tagDescription: input.tagDescription }, + ...input.imageUrl !== void 0 && { imageUrl: input.imageUrl }, + ...input.isDashboardTag !== void 0 && { isDashboardTag: input.isDashboardTag }, + ...input.relatedStores !== void 0 && { relatedStores: input.relatedStores } + }).where(eq(productTagInfo.id, tagId)).returning(); + const fullTag = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.id, tagId), + with: { + products: { + with: { + product: true + } + } + } + }); + return { + ...mapTagInfo(tag2), + products: fullTag?.products.map((assignment) => ({ + productId: assignment.productId, + tagId: assignment.tagId, + assignedAt: assignment.assignedAt, + product: mapProduct(assignment.product) + })) || [] + }; +} +async function deleteProductTag(tagId) { + await db.delete(productTagInfo).where(eq(productTagInfo.id, tagId)); +} +async function checkProductTagExistsByName(tagName) { + const tag2 = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.tagName, tagName) + }); + return !!tag2; +} +async function getSlotsProductIds(slotIds) { + if (slotIds.length === 0) { + return {}; + } + const associations = await db.query.productSlots.findMany({ + where: inArray(productSlots.slotId, slotIds), + columns: { + slotId: true, + productId: true + } + }); + const result = {}; + for (const assoc of associations) { + if (!result[assoc.slotId]) { + result[assoc.slotId] = []; + } + result[assoc.slotId].push(assoc.productId); + } + slotIds.forEach((slotId) => { + if (!result[slotId]) { + result[slotId] = []; + } + }); + return result; +} +async function getProductReviews(productId, limit, offset) { + const reviews = await db.select({ + id: productReviews.id, + reviewBody: productReviews.reviewBody, + ratings: productReviews.ratings, + imageUrls: productReviews.imageUrls, + reviewTime: productReviews.reviewTime, + adminResponse: productReviews.adminResponse, + adminResponseImages: productReviews.adminResponseImages, + userName: users.name + }).from(productReviews).innerJoin(users, eq(productReviews.userId, users.id)).where(eq(productReviews.productId, productId)).orderBy(desc(productReviews.reviewTime)).limit(limit).offset(offset); + const totalCountResult = await db.select({ count: sql`count(*)` }).from(productReviews).where(eq(productReviews.productId, productId)); + const totalCount = Number(totalCountResult[0].count); + const mappedReviews = reviews.map((review) => ({ + id: review.id, + reviewBody: review.reviewBody, + ratings: review.ratings, + imageUrls: review.imageUrls, + reviewTime: review.reviewTime, + adminResponse: review.adminResponse ?? null, + adminResponseImages: review.adminResponseImages, + userName: review.userName ?? null + })); + return { + reviews: mappedReviews, + totalCount + }; +} +async function respondToReview(reviewId, adminResponse, adminResponseImages) { + const [updatedReview] = await db.update(productReviews).set({ + adminResponse, + adminResponseImages + }).where(eq(productReviews.id, reviewId)).returning(); + if (!updatedReview) { + return null; + } + return { + id: updatedReview.id, + reviewBody: updatedReview.reviewBody, + ratings: updatedReview.ratings, + imageUrls: updatedReview.imageUrls, + reviewTime: updatedReview.reviewTime, + adminResponse: updatedReview.adminResponse ?? null, + adminResponseImages: updatedReview.adminResponseImages, + userName: null + }; +} +async function getAllProductGroups() { + const groups = await db.query.productGroupInfo.findMany({ + with: { + memberships: { + with: { + product: true + } + } + }, + orderBy: desc(productGroupInfo.createdAt) + }); + return groups.map((group6) => ({ + id: group6.id, + groupName: group6.groupName, + description: group6.description ?? null, + createdAt: group6.createdAt, + products: group6.memberships.map((membership) => mapProduct(membership.product)), + productCount: group6.memberships.length, + memberships: group6.memberships + })); +} +async function createProductGroup(groupName, description, productIds) { + const [newGroup] = await db.insert(productGroupInfo).values({ + groupName, + description + }).returning(); + if (productIds.length > 0) { + const memberships = productIds.map((productId) => ({ + productId, + groupId: newGroup.id + })); + await db.insert(productGroupMembership).values(memberships); + } + return { + id: newGroup.id, + groupName: newGroup.groupName, + description: newGroup.description ?? null, + createdAt: newGroup.createdAt + }; +} +async function updateProductGroup(id, groupName, description, productIds) { + const updateData = {}; + if (groupName !== void 0) + updateData.groupName = groupName; + if (description !== void 0) + updateData.description = description; + const [updatedGroup] = await db.update(productGroupInfo).set(updateData).where(eq(productGroupInfo.id, id)).returning(); + if (!updatedGroup) { + return null; + } + if (productIds !== void 0) { + await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id)); + if (productIds.length > 0) { + const memberships = productIds.map((productId) => ({ + productId, + groupId: id + })); + await db.insert(productGroupMembership).values(memberships); + } + } + return { + id: updatedGroup.id, + groupName: updatedGroup.groupName, + description: updatedGroup.description ?? null, + createdAt: updatedGroup.createdAt + }; +} +async function deleteProductGroup(id) { + await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id)); + const [deletedGroup] = await db.delete(productGroupInfo).where(eq(productGroupInfo.id, id)).returning(); + if (!deletedGroup) { + return null; + } + return { + id: deletedGroup.id, + groupName: deletedGroup.groupName, + description: deletedGroup.description ?? null, + createdAt: deletedGroup.createdAt + }; +} +async function addProductToGroup(groupId, productId) { + await db.insert(productGroupMembership).values({ groupId, productId }); +} +async function removeProductFromGroup(groupId, productId) { + await db.delete(productGroupMembership).where(and( + eq(productGroupMembership.groupId, groupId), + eq(productGroupMembership.productId, productId) + )); +} +async function updateProductPrices(updates) { + if (updates.length === 0) { + return { updatedCount: 0, invalidIds: [] }; + } + const productIds = updates.map((update) => update.productId); + const existingProducts = await db.query.productInfo.findMany({ + where: inArray(productInfo.id, productIds), + columns: { id: true } + }); + const existingIds = new Set(existingProducts.map((product) => product.id)); + const invalidIds = productIds.filter((id) => !existingIds.has(id)); + if (invalidIds.length > 0) { + return { updatedCount: 0, invalidIds }; + } + const updatePromises = updates.map((update) => { + const { productId, price, marketPrice, flashPrice, isFlashAvailable } = update; + const updateData = {}; + if (price !== void 0) + updateData.price = price.toString(); + if (marketPrice !== void 0) + updateData.marketPrice = marketPrice === null ? null : marketPrice.toString(); + if (flashPrice !== void 0) + updateData.flashPrice = flashPrice === null ? null : flashPrice.toString(); + if (isFlashAvailable !== void 0) + updateData.isFlashAvailable = isFlashAvailable; + return db.update(productInfo).set(updateData).where(eq(productInfo.id, productId)); + }); + await Promise.all(updatePromises); + return { updatedCount: updates.length, invalidIds: [] }; +} +async function checkProductExistsByName(name) { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.name, name), + columns: { id: true } + }); + return !!product; +} +async function checkUnitExists(unitId) { + const unit = await db.query.units.findFirst({ + where: eq(units.id, unitId), + columns: { id: true } + }); + return !!unit; +} +async function getProductImagesById(productId) { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId), + columns: { images: true } + }); + if (!product) { + return null; + } + return getStringArray(product.images) || []; +} +async function createSpecialDealsForProduct(productId, deals) { + if (deals.length === 0) { + return []; + } + const dealInserts = deals.map((deal) => ({ + productId, + quantity: deal.quantity.toString(), + price: deal.price.toString(), + validTill: new Date(deal.validTill) + })); + const createdDeals = await db.insert(specialDeals).values(dealInserts).returning(); + return createdDeals.map(mapSpecialDeal); +} +async function updateProductDeals(productId, deals) { + if (deals.length === 0) { + await db.delete(specialDeals).where(eq(specialDeals.productId, productId)); + return; + } + const existingDeals = await db.query.specialDeals.findMany({ + where: eq(specialDeals.productId, productId) + }); + const existingDealsMap = new Map( + existingDeals.map((deal) => [`${deal.quantity}-${deal.price}`, deal]) + ); + const newDealsMap = new Map( + deals.map((deal) => [`${deal.quantity}-${deal.price}`, deal]) + ); + const dealsToAdd = deals.filter((deal) => { + const key = `${deal.quantity}-${deal.price}`; + return !existingDealsMap.has(key); + }); + const dealsToRemove = existingDeals.filter((deal) => { + const key = `${deal.quantity}-${deal.price}`; + return !newDealsMap.has(key); + }); + const dealsToUpdate = deals.filter((deal) => { + const key = `${deal.quantity}-${deal.price}`; + const existing = existingDealsMap.get(key); + const nextValidTill = deal.validTill instanceof Date ? deal.validTill.toISOString().split("T")[0] : String(deal.validTill); + return existing && existing.validTill.toISOString().split("T")[0] !== nextValidTill; + }); + if (dealsToRemove.length > 0) { + await db.delete(specialDeals).where( + inArray(specialDeals.id, dealsToRemove.map((deal) => deal.id)) + ); + } + if (dealsToAdd.length > 0) { + const dealInserts = dealsToAdd.map((deal) => ({ + productId, + quantity: deal.quantity.toString(), + price: deal.price.toString(), + validTill: new Date(deal.validTill) + })); + await db.insert(specialDeals).values(dealInserts); + } + for (const deal of dealsToUpdate) { + const key = `${deal.quantity}-${deal.price}`; + const existingDeal = existingDealsMap.get(key); + if (existingDeal) { + await db.update(specialDeals).set({ validTill: new Date(deal.validTill) }).where(eq(specialDeals.id, existingDeal.id)); + } + } +} +async function replaceProductTags(productId, tagIds) { + await db.delete(productTags).where(eq(productTags.productId, productId)); + if (tagIds.length === 0) { + return; + } + const tagAssociations = tagIds.map((tagId) => ({ + productId, + tagId + })); + await db.insert(productTags).values(tagAssociations); +} +var getStringArray, mapUnit, mapStore, mapProduct, mapSpecialDeal, mapTagInfo; +var init_product = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/product.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + getStringArray = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return null; + return value.map((item) => String(item)); + }, "getStringArray"); + mapUnit = /* @__PURE__ */ __name((unit) => ({ + id: unit.id, + shortNotation: unit.shortNotation, + fullName: unit.fullName + }), "mapUnit"); + mapStore = /* @__PURE__ */ __name((store) => ({ + id: store.id, + name: store.name, + description: store.description, + imageUrl: store.imageUrl, + owner: store.owner, + createdAt: store.createdAt + // updatedAt: store.createdAt, + }), "mapStore"); + mapProduct = /* @__PURE__ */ __name((product) => ({ + id: product.id, + name: product.name, + shortDescription: product.shortDescription ?? null, + longDescription: product.longDescription ?? null, + unitId: product.unitId, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null, + images: getStringArray(product.images), + imageKeys: getStringArray(product.images), + isOutOfStock: product.isOutOfStock, + isSuspended: product.isSuspended, + isFlashAvailable: product.isFlashAvailable, + flashPrice: product.flashPrice ? String(product.flashPrice) : null, + createdAt: product.createdAt, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + storeId: product.storeId + }), "mapProduct"); + mapSpecialDeal = /* @__PURE__ */ __name((deal) => ({ + id: deal.id, + productId: deal.productId, + quantity: String(deal.quantity ?? "0"), + price: String(deal.price ?? "0"), + validTill: deal.validTill + }), "mapSpecialDeal"); + mapTagInfo = /* @__PURE__ */ __name((tag2) => ({ + id: tag2.id, + tagName: tag2.tagName, + tagDescription: tag2.tagDescription ?? null, + imageUrl: tag2.imageUrl ?? null, + isDashboardTag: tag2.isDashboardTag, + relatedStores: tag2.relatedStores, + createdAt: tag2.createdAt + }), "mapTagInfo"); + __name(getAllProducts, "getAllProducts"); + __name(getProductById, "getProductById"); + __name(deleteProduct, "deleteProduct"); + __name(createProduct, "createProduct"); + __name(updateProduct, "updateProduct"); + __name(toggleProductOutOfStock, "toggleProductOutOfStock"); + __name(updateSlotProducts, "updateSlotProducts"); + __name(getSlotProductIds, "getSlotProductIds"); + __name(getAllUnits, "getAllUnits"); + __name(getAllProductTags, "getAllProductTags"); + __name(getAllProductTagInfos, "getAllProductTagInfos"); + __name(getProductTagInfoById, "getProductTagInfoById"); + __name(createProductTag, "createProductTag"); + __name(getProductTagById, "getProductTagById"); + __name(updateProductTag, "updateProductTag"); + __name(deleteProductTag, "deleteProductTag"); + __name(checkProductTagExistsByName, "checkProductTagExistsByName"); + __name(getSlotsProductIds, "getSlotsProductIds"); + __name(getProductReviews, "getProductReviews"); + __name(respondToReview, "respondToReview"); + __name(getAllProductGroups, "getAllProductGroups"); + __name(createProductGroup, "createProductGroup"); + __name(updateProductGroup, "updateProductGroup"); + __name(deleteProductGroup, "deleteProductGroup"); + __name(addProductToGroup, "addProductToGroup"); + __name(removeProductFromGroup, "removeProductFromGroup"); + __name(updateProductPrices, "updateProductPrices"); + __name(checkProductExistsByName, "checkProductExistsByName"); + __name(checkUnitExists, "checkUnitExists"); + __name(getProductImagesById, "getProductImagesById"); + __name(createSpecialDealsForProduct, "createSpecialDealsForProduct"); + __name(updateProductDeals, "updateProductDeals"); + __name(replaceProductTags, "replaceProductTags"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/slots.ts +async function getActiveSlotsWithProducts() { + const slots = await db.query.deliverySlotInfo.findMany({ + where: eq(deliverySlotInfo.isActive, true), + orderBy: desc(deliverySlotInfo.deliveryTime), + with: { + productSlots: { + with: { + product: { + columns: { + id: true, + name: true, + images: true + } + } + } + } + } + }); + return slots.map((slot) => ({ + ...mapDeliverySlot(slot), + deliverySequence: getNumberArray(slot.deliverySequence), + products: slot.productSlots.map((ps) => mapSlotProductSummary(ps.product)) + })); +} +async function getActiveSlots() { + const slots = await db.query.deliverySlotInfo.findMany({ + where: eq(deliverySlotInfo.isActive, true) + }); + return slots.map(mapDeliverySlot); +} +async function getSlotsAfterDate(afterDate) { + const slots = await db.query.deliverySlotInfo.findMany({ + where: and( + eq(deliverySlotInfo.isActive, true), + gt(deliverySlotInfo.deliveryTime, afterDate) + ), + orderBy: asc(deliverySlotInfo.deliveryTime) + }); + return slots.map(mapDeliverySlot); +} +async function getSlotByIdWithRelations(id) { + const slot = await db.query.deliverySlotInfo.findFirst({ + where: eq(deliverySlotInfo.id, id), + with: { + productSlots: { + with: { + product: { + columns: { + id: true, + name: true, + images: true + } + } + } + }, + vendorSnippets: true + } + }); + if (!slot) { + return null; + } + return { + ...mapDeliverySlot(slot), + deliverySequence: getNumberArray(slot.deliverySequence), + groupIds: getNumberArray(slot.groupIds), + products: slot.productSlots.map((ps) => mapSlotProductSummary(ps.product)), + vendorSnippets: slot.vendorSnippets.map(mapVendorSnippet) + }; +} +async function createSlotWithRelations(input) { + const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input; + const result = await db.transaction(async (tx) => { + const [newSlot] = await tx.insert(deliverySlotInfo).values({ + deliveryTime: new Date(deliveryTime), + freezeTime: new Date(freezeTime), + isActive: isActive !== void 0 ? isActive : true, + groupIds: groupIds !== void 0 ? groupIds : [] + }).returning(); + if (productIds && productIds.length > 0) { + const associations = productIds.map((productId) => ({ + productId, + slotId: newSlot.id + })); + await tx.insert(productSlots).values(associations); + } + let createdSnippets = []; + if (snippets && snippets.length > 0) { + for (const snippet of snippets) { + const products = await tx.query.productInfo.findMany({ + where: inArray(productInfo.id, snippet.productIds) + }); + if (products.length !== snippet.productIds.length) { + throw new Error(`One or more invalid product IDs in snippet "${snippet.name}"`); + } + const existingSnippet = await tx.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.snippetCode, snippet.name) + }); + if (existingSnippet) { + throw new Error(`Snippet name "${snippet.name}" already exists`); + } + const [createdSnippet] = await tx.insert(vendorSnippets).values({ + snippetCode: snippet.name, + slotId: newSlot.id, + productIds: snippet.productIds, + validTill: snippet.validTill ? new Date(snippet.validTill) : void 0 + }).returning(); + createdSnippets.push(mapVendorSnippet(createdSnippet)); + } + } + return { + slot: mapDeliverySlot(newSlot), + createdSnippets, + message: "Slot created successfully" + }; + }); + return result; +} +async function updateSlotWithRelations(input) { + const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input; + let validGroupIds = groupIds; + if (groupIds && groupIds.length > 0) { + const existingGroups = await db.query.productGroupInfo.findMany({ + where: inArray(productGroupInfo.id, groupIds), + columns: { id: true } + }); + validGroupIds = existingGroups.map((group6) => group6.id); + } + const result = await db.transaction(async (tx) => { + const [updatedSlot] = await tx.update(deliverySlotInfo).set({ + deliveryTime: new Date(deliveryTime), + freezeTime: new Date(freezeTime), + isActive: isActive !== void 0 ? isActive : true, + groupIds: validGroupIds !== void 0 ? validGroupIds : [] + }).where(eq(deliverySlotInfo.id, id)).returning(); + if (!updatedSlot) { + return null; + } + if (productIds !== void 0) { + await tx.delete(productSlots).where(eq(productSlots.slotId, id)); + if (productIds.length > 0) { + const associations = productIds.map((productId) => ({ + productId, + slotId: id + })); + await tx.insert(productSlots).values(associations); + } + } + let createdSnippets = []; + if (snippets && snippets.length > 0) { + for (const snippet of snippets) { + const products = await tx.query.productInfo.findMany({ + where: inArray(productInfo.id, snippet.productIds) + }); + if (products.length !== snippet.productIds.length) { + throw new Error(`One or more invalid product IDs in snippet "${snippet.name}"`); + } + const existingSnippet = await tx.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.snippetCode, snippet.name) + }); + if (existingSnippet) { + throw new Error(`Snippet name "${snippet.name}" already exists`); + } + const [createdSnippet] = await tx.insert(vendorSnippets).values({ + snippetCode: snippet.name, + slotId: id, + productIds: snippet.productIds, + validTill: snippet.validTill ? new Date(snippet.validTill) : void 0 + }).returning(); + createdSnippets.push(mapVendorSnippet(createdSnippet)); + } + } + return { + slot: mapDeliverySlot(updatedSlot), + createdSnippets, + message: "Slot updated successfully" + }; + }); + return result; +} +async function deleteSlotById(id) { + const [deletedSlot] = await db.update(deliverySlotInfo).set({ isActive: false }).where(eq(deliverySlotInfo.id, id)).returning(); + if (!deletedSlot) { + return null; + } + return mapDeliverySlot(deletedSlot); +} +async function getSlotDeliverySequence(slotId) { + const slot = await db.query.deliverySlotInfo.findFirst({ + where: eq(deliverySlotInfo.id, slotId) + }); + if (!slot) { + return null; + } + return mapDeliverySlot(slot); +} +async function updateSlotDeliverySequence(slotId, sequence) { + const [updatedSlot] = await db.update(deliverySlotInfo).set({ deliverySequence: sequence }).where(eq(deliverySlotInfo.id, slotId)).returning({ + id: deliverySlotInfo.id, + deliverySequence: deliverySlotInfo.deliverySequence + }); + return updatedSlot || null; +} +async function updateSlotCapacity(slotId, isCapacityFull) { + const [updatedSlot] = await db.update(deliverySlotInfo).set({ isCapacityFull }).where(eq(deliverySlotInfo.id, slotId)).returning(); + if (!updatedSlot) { + return null; + } + return { + success: true, + slot: mapDeliverySlot(updatedSlot), + message: `Slot ${isCapacityFull ? "marked as full capacity" : "capacity reset"}` + }; +} +var getStringArray2, getNumberArray, mapDeliverySlot, mapSlotProductSummary, mapVendorSnippet; +var init_slots = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/slots.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + getStringArray2 = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return null; + return value.map((item) => String(item)); + }, "getStringArray"); + getNumberArray = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return []; + return value.map((item) => Number(item)); + }, "getNumberArray"); + mapDeliverySlot = /* @__PURE__ */ __name((slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isFlash: slot.isFlash, + isCapacityFull: slot.isCapacityFull, + deliverySequence: slot.deliverySequence, + groupIds: slot.groupIds + }), "mapDeliverySlot"); + mapSlotProductSummary = /* @__PURE__ */ __name((product) => ({ + id: product.id, + name: product.name, + images: getStringArray2(product.images) + }), "mapSlotProductSummary"); + mapVendorSnippet = /* @__PURE__ */ __name((snippet) => ({ + id: snippet.id, + snippetCode: snippet.snippetCode, + slotId: snippet.slotId ?? null, + productIds: snippet.productIds || [], + isPermanent: snippet.isPermanent, + validTill: snippet.validTill ?? null, + createdAt: snippet.createdAt + }), "mapVendorSnippet"); + __name(getActiveSlotsWithProducts, "getActiveSlotsWithProducts"); + __name(getActiveSlots, "getActiveSlots"); + __name(getSlotsAfterDate, "getSlotsAfterDate"); + __name(getSlotByIdWithRelations, "getSlotByIdWithRelations"); + __name(createSlotWithRelations, "createSlotWithRelations"); + __name(updateSlotWithRelations, "updateSlotWithRelations"); + __name(deleteSlotById, "deleteSlotById"); + __name(getSlotDeliverySequence, "getSlotDeliverySequence"); + __name(updateSlotDeliverySequence, "updateSlotDeliverySequence"); + __name(updateSlotCapacity, "updateSlotCapacity"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/staff-user.ts +async function getStaffUserByName(name) { + const staff = await db.query.staffUsers.findFirst({ + where: eq(staffUsers.name, name) + }); + return staff || null; +} +async function getStaffUserById(staffId) { + const staff = await db.query.staffUsers.findFirst({ + where: eq(staffUsers.id, staffId) + }); + return staff || null; +} +async function getAllStaff() { + const staff = await db.query.staffUsers.findMany({ + columns: { + id: true, + name: true + }, + with: { + role: { + with: { + rolePermissions: { + with: { + permission: true + } + } + } + } + } + }); + return staff; +} +async function getAllUsers(cursor, limit = 20, search) { + let whereCondition = void 0; + if (search) { + whereCondition = or( + like(users.name, `%${search}%`), + like(users.email, `%${search}%`), + like(users.mobile, `%${search}%`) + ); + } + if (cursor) { + const cursorCondition = lt(users.id, cursor); + whereCondition = whereCondition ? and(whereCondition, cursorCondition) : cursorCondition; + } + const allUsers = await db.query.users.findMany({ + where: whereCondition, + with: { + userDetails: true + }, + orderBy: desc(users.id), + limit: limit + 1 + }); + const hasMore = allUsers.length > limit; + const usersToReturn = hasMore ? allUsers.slice(0, limit) : allUsers; + return { users: usersToReturn, hasMore }; +} +async function getUserWithDetails(userId) { + const user = await db.query.users.findFirst({ + where: eq(users.id, userId), + with: { + userDetails: true, + orders: { + orderBy: desc(orders.createdAt), + limit: 1 + } + } + }); + return user || null; +} +async function updateUserSuspensionStatus(userId, isSuspended) { + await db.insert(userDetails).values({ userId, isSuspended }).onConflictDoUpdate({ + target: userDetails.userId, + set: { isSuspended } + }); +} +async function checkStaffUserExists(name) { + const existingUser = await db.query.staffUsers.findFirst({ + where: eq(staffUsers.name, name) + }); + return !!existingUser; +} +async function checkStaffRoleExists(roleId) { + const role = await db.query.staffRoles.findFirst({ + where: eq(staffRoles.id, roleId) + }); + return !!role; +} +async function createStaffUser(name, password, roleId) { + const [newUser] = await db.insert(staffUsers).values({ + name: name.trim(), + password, + staffRoleId: roleId + }).returning(); + return { + id: newUser.id, + name: newUser.name, + password: newUser.password, + staffRoleId: newUser.staffRoleId, + createdAt: newUser.createdAt + }; +} +async function getAllRoles() { + const roles = await db.query.staffRoles.findMany({ + columns: { + id: true, + roleName: true + } + }); + return roles; +} +var init_staff_user = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/staff-user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getStaffUserByName, "getStaffUserByName"); + __name(getStaffUserById, "getStaffUserById"); + __name(getAllStaff, "getAllStaff"); + __name(getAllUsers, "getAllUsers"); + __name(getUserWithDetails, "getUserWithDetails"); + __name(updateUserSuspensionStatus, "updateUserSuspensionStatus"); + __name(checkStaffUserExists, "checkStaffUserExists"); + __name(checkStaffRoleExists, "checkStaffRoleExists"); + __name(createStaffUser, "createStaffUser"); + __name(getAllRoles, "getAllRoles"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/store.ts +async function getAllStores() { + const stores = await db.query.storeInfo.findMany({ + with: { + owner: true + } + }); + return stores; +} +async function getStoreById(id) { + const store = await db.query.storeInfo.findFirst({ + where: eq(storeInfo.id, id), + with: { + owner: true + } + }); + return store || null; +} +async function createStore(input, products) { + const [newStore] = await db.insert(storeInfo).values({ + name: input.name, + description: input.description, + imageUrl: input.imageUrl, + owner: input.owner + }).returning(); + if (products && products.length > 0) { + await db.update(productInfo).set({ storeId: newStore.id }).where(inArray(productInfo.id, products)); + } + return { + id: newStore.id, + name: newStore.name, + description: newStore.description, + imageUrl: newStore.imageUrl, + owner: newStore.owner, + createdAt: newStore.createdAt + // updatedAt: newStore.updatedAt, + }; +} +async function updateStore(id, input, products) { + const [updatedStore] = await db.update(storeInfo).set({ + ...input + // updatedAt: new Date(), + }).where(eq(storeInfo.id, id)).returning(); + if (!updatedStore) { + throw new Error("Store not found"); + } + if (products !== void 0) { + await db.update(productInfo).set({ storeId: null }).where(eq(productInfo.storeId, id)); + if (products.length > 0) { + await db.update(productInfo).set({ storeId: id }).where(inArray(productInfo.id, products)); + } + } + return { + id: updatedStore.id, + name: updatedStore.name, + description: updatedStore.description, + imageUrl: updatedStore.imageUrl, + owner: updatedStore.owner, + createdAt: updatedStore.createdAt + // updatedAt: updatedStore.updatedAt, + }; +} +async function deleteStore(id) { + return await db.transaction(async (tx) => { + await tx.update(productInfo).set({ storeId: null }).where(eq(productInfo.storeId, id)); + const [deletedStore] = await tx.delete(storeInfo).where(eq(storeInfo.id, id)).returning(); + if (!deletedStore) { + throw new Error("Store not found"); + } + return { + message: "Store deleted successfully" + }; + }); +} +var init_store = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getAllStores, "getAllStores"); + __name(getStoreById, "getStoreById"); + __name(createStore, "createStore"); + __name(updateStore, "updateStore"); + __name(deleteStore, "deleteStore"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/user.ts +async function createUserByMobile(mobile) { + const [newUser] = await db.insert(users).values({ + name: null, + email: null, + mobile + }).returning(); + return newUser; +} +async function getUserByMobile(mobile) { + const [existingUser] = await db.select().from(users).where(eq(users.mobile, mobile)).limit(1); + return existingUser || null; +} +async function getUnresolvedComplaintsCount() { + const result = await db.select({ count: count3(complaints.id) }).from(complaints).where(eq(complaints.isResolved, false)); + return result[0]?.count || 0; +} +async function getAllUsersWithFilters(limit, cursor, search) { + const whereConditions = []; + if (search && search.trim()) { + whereConditions.push(sql`${users.mobile} LIKE ${`%${search.trim()}%`}`); + } + if (cursor) { + whereConditions.push(sql`${users.id} > ${cursor}`); + } + const usersList = await db.select({ + id: users.id, + name: users.name, + mobile: users.mobile, + createdAt: users.createdAt + }).from(users).where(whereConditions.length > 0 ? sql.join(whereConditions, sql` AND `) : void 0).orderBy(asc(users.id)).limit(limit + 1); + const hasMore = usersList.length > limit; + const usersToReturn = hasMore ? usersList.slice(0, limit) : usersList; + return { users: usersToReturn, hasMore }; +} +async function getOrderCountsByUserIds(userIds) { + if (userIds.length === 0) + return []; + return await db.select({ + userId: orders.userId, + totalOrders: count3(orders.id) + }).from(orders).where(sql`${orders.userId} IN (${sql.join(userIds, sql`, `)})`).groupBy(orders.userId); +} +async function getLastOrdersByUserIds(userIds) { + if (userIds.length === 0) + return []; + return await db.select({ + userId: orders.userId, + lastOrderDate: max(orders.createdAt) + }).from(orders).where(sql`${orders.userId} IN (${sql.join(userIds, sql`, `)})`).groupBy(orders.userId); +} +async function getSuspensionStatusesByUserIds(userIds) { + if (userIds.length === 0) + return []; + return await db.select({ + userId: userDetails.userId, + isSuspended: userDetails.isSuspended + }).from(userDetails).where(sql`${userDetails.userId} IN (${sql.join(userIds, sql`, `)})`); +} +async function getUserBasicInfo(userId) { + const user = await db.select({ + id: users.id, + name: users.name, + mobile: users.mobile, + createdAt: users.createdAt + }).from(users).where(eq(users.id, userId)).limit(1); + return user[0] || null; +} +async function getUserSuspensionStatus(userId) { + const userDetail = await db.select({ + isSuspended: userDetails.isSuspended + }).from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + return userDetail[0]?.isSuspended ?? false; +} +async function getUserOrders(userId) { + return await db.select({ + id: orders.id, + readableId: orders.readableId, + totalAmount: orders.totalAmount, + createdAt: orders.createdAt, + isFlashDelivery: orders.isFlashDelivery + }).from(orders).where(eq(orders.userId, userId)).orderBy(desc(orders.createdAt)); +} +async function getOrderStatusesByOrderIds(orderIds) { + if (orderIds.length === 0) + return []; + return await db.select({ + orderId: orderStatus.orderId, + isDelivered: orderStatus.isDelivered, + isCancelled: orderStatus.isCancelled + }).from(orderStatus).where(sql`${orderStatus.orderId} IN (${sql.join(orderIds, sql`, `)})`); +} +async function getItemCountsByOrderIds(orderIds) { + if (orderIds.length === 0) + return []; + return await db.select({ + orderId: orderItems.orderId, + itemCount: count3(orderItems.id) + }).from(orderItems).where(sql`${orderItems.orderId} IN (${sql.join(orderIds, sql`, `)})`).groupBy(orderItems.orderId); +} +async function upsertUserSuspension(userId, isSuspended) { + const existingDetail = await db.select({ id: userDetails.id }).from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + if (existingDetail.length > 0) { + await db.update(userDetails).set({ isSuspended }).where(eq(userDetails.userId, userId)); + } else { + await db.insert(userDetails).values({ + userId, + isSuspended + }); + } +} +async function searchUsers(search) { + if (search && search.trim()) { + return await db.select({ + id: users.id, + name: users.name, + mobile: users.mobile + }).from(users).where(sql`${users.mobile} LIKE ${`%${search.trim()}%`} OR ${users.name} LIKE ${`%${search.trim()}%`}`); + } else { + return await db.select({ + id: users.id, + name: users.name, + mobile: users.mobile + }).from(users); + } +} +async function getAllNotifCreds() { + return await db.select({ userId: notifCreds.userId, token: notifCreds.token }).from(notifCreds); +} +async function getAllUnloggedTokens() { + return await db.select({ token: unloggedUserTokens.token }).from(unloggedUserTokens); +} +async function getNotifTokensByUserIds(userIds) { + return await db.select({ token: notifCreds.token }).from(notifCreds).where(inArray(notifCreds.userId, userIds)); +} +async function getUserIncidentsWithRelations(userId) { + return await db.query.userIncidents.findMany({ + where: eq(userIncidents.userId, userId), + with: { + order: { + with: { + orderStatus: true + } + }, + addedBy: true + }, + orderBy: desc(userIncidents.dateAdded) + }); +} +async function createUserIncident(userId, orderId, adminComment, adminUserId, negativityScore) { + const [incident] = await db.insert(userIncidents).values({ + userId, + orderId, + adminComment, + addedBy: adminUserId, + negativityScore + }).returning(); + return incident; +} +var init_user = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(createUserByMobile, "createUserByMobile"); + __name(getUserByMobile, "getUserByMobile"); + __name(getUnresolvedComplaintsCount, "getUnresolvedComplaintsCount"); + __name(getAllUsersWithFilters, "getAllUsersWithFilters"); + __name(getOrderCountsByUserIds, "getOrderCountsByUserIds"); + __name(getLastOrdersByUserIds, "getLastOrdersByUserIds"); + __name(getSuspensionStatusesByUserIds, "getSuspensionStatusesByUserIds"); + __name(getUserBasicInfo, "getUserBasicInfo"); + __name(getUserSuspensionStatus, "getUserSuspensionStatus"); + __name(getUserOrders, "getUserOrders"); + __name(getOrderStatusesByOrderIds, "getOrderStatusesByOrderIds"); + __name(getItemCountsByOrderIds, "getItemCountsByOrderIds"); + __name(upsertUserSuspension, "upsertUserSuspension"); + __name(searchUsers, "searchUsers"); + __name(getAllNotifCreds, "getAllNotifCreds"); + __name(getAllUnloggedTokens, "getAllUnloggedTokens"); + __name(getNotifTokensByUserIds, "getNotifTokensByUserIds"); + __name(getUserIncidentsWithRelations, "getUserIncidentsWithRelations"); + __name(createUserIncident, "createUserIncident"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/vendor-snippets.ts +async function checkVendorSnippetExists(snippetCode) { + const existingSnippet = await db.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.snippetCode, snippetCode) + }); + return !!existingSnippet; +} +async function getVendorSnippetById(id) { + const snippet = await db.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.id, id), + with: { + slot: true + } + }); + if (!snippet) { + return null; + } + return { + ...mapVendorSnippet2(snippet), + slot: snippet.slot ? mapDeliverySlot2(snippet.slot) : null + }; +} +async function getVendorSnippetByCode(snippetCode) { + const snippet = await db.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.snippetCode, snippetCode) + }); + return snippet ? mapVendorSnippet2(snippet) : null; +} +async function getAllVendorSnippets() { + const snippets = await db.query.vendorSnippets.findMany({ + with: { + slot: true + }, + orderBy: desc(vendorSnippets.createdAt) + }); + return snippets.map((snippet) => ({ + ...mapVendorSnippet2(snippet), + slot: snippet.slot ? mapDeliverySlot2(snippet.slot) : null + })); +} +async function createVendorSnippet(input) { + const [result] = await db.insert(vendorSnippets).values({ + snippetCode: input.snippetCode, + slotId: input.slotId, + productIds: input.productIds, + isPermanent: input.isPermanent, + validTill: input.validTill + }).returning(); + return mapVendorSnippet2(result); +} +async function updateVendorSnippet(id, updates) { + const [result] = await db.update(vendorSnippets).set(updates).where(eq(vendorSnippets.id, id)).returning(); + return result ? mapVendorSnippet2(result) : null; +} +async function deleteVendorSnippet(id) { + const [result] = await db.delete(vendorSnippets).where(eq(vendorSnippets.id, id)).returning(); + return result ? mapVendorSnippet2(result) : null; +} +async function getProductsByIds(productIds) { + const products = await db.query.productInfo.findMany({ + where: inArray(productInfo.id, productIds), + columns: { id: true, name: true } + }); + const prods = products.map(mapProductSummary); + return prods; +} +async function getVendorSlotById(slotId) { + const slot = await db.query.deliverySlotInfo.findFirst({ + where: eq(deliverySlotInfo.id, slotId) + }); + return slot ? mapDeliverySlot2(slot) : null; +} +async function getVendorOrdersBySlotId(slotId) { + return await db.query.orders.findMany({ + where: eq(orders.slotId, slotId), + with: { + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + }, + orderStatus: true, + user: true, + slot: true + }, + orderBy: desc(orders.createdAt) + }); +} +async function getVendorOrders() { + return await db.query.orders.findMany({ + with: { + user: true, + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + } + }, + orderBy: desc(orders.createdAt) + }); +} +async function getOrderItemsByOrderIds(orderIds) { + return await db.query.orderItems.findMany({ + where: inArray(orderItems.orderId, orderIds), + with: { + product: { + with: { + unit: true + } + } + } + }); +} +async function getOrderStatusByOrderIds(orderIds) { + return await db.query.orderStatus.findMany({ + where: inArray(orderStatus.orderId, orderIds) + }); +} +async function updateVendorOrderItemPackaging(orderItemId, isPackaged) { + const orderItem = await db.query.orderItems.findFirst({ + where: eq(orderItems.id, orderItemId), + with: { + order: { + with: { + slot: true + } + } + } + }); + if (!orderItem) { + return { success: false, message: "Order item not found" }; + } + if (!orderItem.order.slotId) { + return { success: false, message: "Order item not associated with a vendor slot" }; + } + const snippetExists = await db.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.slotId, orderItem.order.slotId) + }); + if (!snippetExists) { + return { success: false, message: "No vendor snippet found for this order's slot" }; + } + const [updatedItem] = await db.update(orderItems).set({ + is_packaged: isPackaged + }).where(eq(orderItems.id, orderItemId)).returning({ id: orderItems.id }); + if (!updatedItem) { + return { success: false, message: "Failed to update packaging status" }; + } + return { success: true, orderItemId, is_packaged: isPackaged }; +} +var mapVendorSnippet2, mapDeliverySlot2, mapProductSummary; +var init_vendor_snippets = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/vendor-snippets.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + mapVendorSnippet2 = /* @__PURE__ */ __name((snippet) => ({ + id: snippet.id, + snippetCode: snippet.snippetCode, + slotId: snippet.slotId ?? null, + productIds: snippet.productIds || [], + isPermanent: snippet.isPermanent, + validTill: snippet.validTill ?? null, + createdAt: snippet.createdAt + }), "mapVendorSnippet"); + mapDeliverySlot2 = /* @__PURE__ */ __name((slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isFlash: slot.isFlash, + isCapacityFull: slot.isCapacityFull, + deliverySequence: slot.deliverySequence, + groupIds: slot.groupIds + }), "mapDeliverySlot"); + mapProductSummary = /* @__PURE__ */ __name((product) => ({ + id: product.id, + name: product.name + }), "mapProductSummary"); + __name(checkVendorSnippetExists, "checkVendorSnippetExists"); + __name(getVendorSnippetById, "getVendorSnippetById"); + __name(getVendorSnippetByCode, "getVendorSnippetByCode"); + __name(getAllVendorSnippets, "getAllVendorSnippets"); + __name(createVendorSnippet, "createVendorSnippet"); + __name(updateVendorSnippet, "updateVendorSnippet"); + __name(deleteVendorSnippet, "deleteVendorSnippet"); + __name(getProductsByIds, "getProductsByIds"); + __name(getVendorSlotById, "getVendorSlotById"); + __name(getVendorOrdersBySlotId, "getVendorOrdersBySlotId"); + __name(getVendorOrders, "getVendorOrders"); + __name(getOrderItemsByOrderIds, "getOrderItemsByOrderIds"); + __name(getOrderStatusByOrderIds, "getOrderStatusByOrderIds"); + __name(updateVendorOrderItemPackaging, "updateVendorOrderItemPackaging"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/address.ts +async function getDefaultAddress(userId) { + const [defaultAddress] = await db.select().from(addresses).where(and(eq(addresses.userId, userId), eq(addresses.isDefault, true))).limit(1); + return defaultAddress ? mapUserAddress(defaultAddress) : null; +} +async function getUserAddresses(userId) { + const userAddresses = await db.select().from(addresses).where(eq(addresses.userId, userId)); + return userAddresses.map(mapUserAddress); +} +async function getUserAddressById(userId, addressId) { + const [address] = await db.select().from(addresses).where(and(eq(addresses.id, addressId), eq(addresses.userId, userId))).limit(1); + return address ? mapUserAddress(address) : null; +} +async function clearDefaultAddress(userId) { + await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId)); +} +async function createUserAddress(input) { + const [newAddress] = await db.insert(addresses).values({ + userId: input.userId, + name: input.name, + phone: input.phone, + addressLine1: input.addressLine1, + addressLine2: input.addressLine2, + city: input.city, + state: input.state, + pincode: input.pincode, + isDefault: input.isDefault, + latitude: input.latitude, + longitude: input.longitude, + googleMapsUrl: input.googleMapsUrl + }).returning(); + return mapUserAddress(newAddress); +} +async function updateUserAddress(input) { + const [updatedAddress] = await db.update(addresses).set({ + name: input.name, + phone: input.phone, + addressLine1: input.addressLine1, + addressLine2: input.addressLine2, + city: input.city, + state: input.state, + pincode: input.pincode, + isDefault: input.isDefault, + googleMapsUrl: input.googleMapsUrl, + latitude: input.latitude, + longitude: input.longitude + }).where(and(eq(addresses.id, input.addressId), eq(addresses.userId, input.userId))).returning(); + return updatedAddress ? mapUserAddress(updatedAddress) : null; +} +async function deleteUserAddress(userId, addressId) { + const [deleted] = await db.delete(addresses).where(and(eq(addresses.id, addressId), eq(addresses.userId, userId))).returning({ id: addresses.id }); + return !!deleted; +} +async function hasOngoingOrdersForAddress(addressId) { + const ongoingOrders = await db.select({ + orderId: orders.id + }).from(orders).innerJoin(orderStatus, eq(orders.id, orderStatus.orderId)).innerJoin(deliverySlotInfo, eq(orders.slotId, deliverySlotInfo.id)).where(and( + eq(orders.addressId, addressId), + eq(orderStatus.isCancelled, false), + gte(deliverySlotInfo.deliveryTime, /* @__PURE__ */ new Date()) + )).limit(1); + return ongoingOrders.length > 0; +} +var mapUserAddress; +var init_address = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/address.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + mapUserAddress = /* @__PURE__ */ __name((address) => ({ + id: address.id, + userId: address.userId, + name: address.name, + phone: address.phone, + addressLine1: address.addressLine1, + addressLine2: address.addressLine2 ?? null, + city: address.city, + state: address.state, + pincode: address.pincode, + isDefault: address.isDefault, + latitude: address.latitude ?? null, + longitude: address.longitude ?? null, + googleMapsUrl: address.googleMapsUrl ?? null, + adminLatitude: address.adminLatitude ?? null, + adminLongitude: address.adminLongitude ?? null, + zoneId: address.zoneId ?? null, + createdAt: address.createdAt + }), "mapUserAddress"); + __name(getDefaultAddress, "getDefaultAddress"); + __name(getUserAddresses, "getUserAddresses"); + __name(getUserAddressById, "getUserAddressById"); + __name(clearDefaultAddress, "clearDefaultAddress"); + __name(createUserAddress, "createUserAddress"); + __name(updateUserAddress, "updateUserAddress"); + __name(deleteUserAddress, "deleteUserAddress"); + __name(hasOngoingOrdersForAddress, "hasOngoingOrdersForAddress"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/banners.ts +async function getActiveBanners() { + const banners = await db.query.homeBanners.findMany({ + where: isNotNull(homeBanners.serialNum), + orderBy: asc(homeBanners.serialNum) + }); + return banners.map(mapBanner); +} +var mapBanner; +var init_banners = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/banners.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + mapBanner = /* @__PURE__ */ __name((banner) => ({ + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description ?? null, + productIds: banner.productIds ?? null, + redirectUrl: banner.redirectUrl ?? null, + serialNum: banner.serialNum ?? null, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + }), "mapBanner"); + __name(getActiveBanners, "getActiveBanners"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/cart.ts +async function getCartItemsWithProducts(userId) { + const cartItemsWithProducts = await db.select({ + cartId: cartItems.id, + productId: productInfo.id, + productName: productInfo.name, + productPrice: productInfo.price, + productImages: productInfo.images, + productQuantity: productInfo.productQuantity, + isOutOfStock: productInfo.isOutOfStock, + unitShortNotation: units.shortNotation, + quantity: cartItems.quantity, + addedAt: cartItems.addedAt + }).from(cartItems).innerJoin(productInfo, eq(cartItems.productId, productInfo.id)).innerJoin(units, eq(productInfo.unitId, units.id)).where(eq(cartItems.userId, userId)); + return cartItemsWithProducts.map((item) => { + const priceValue = item.productPrice ?? "0"; + const quantityValue = item.quantity ?? "0"; + return { + id: item.cartId, + productId: item.productId, + quantity: parseFloat(quantityValue), + addedAt: item.addedAt, + product: { + id: item.productId, + name: item.productName, + price: priceValue.toString(), + productQuantity: item.productQuantity, + unit: item.unitShortNotation, + isOutOfStock: item.isOutOfStock, + images: getStringArray3(item.productImages) + }, + subtotal: parseFloat(priceValue.toString()) * parseFloat(quantityValue) + }; + }); +} +async function getProductById2(productId) { + return db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId) + }); +} +async function getCartItemByUserProduct(userId, productId) { + return db.query.cartItems.findFirst({ + where: and(eq(cartItems.userId, userId), eq(cartItems.productId, productId)) + }); +} +async function incrementCartItemQuantity(itemId, quantity) { + await db.update(cartItems).set({ + quantity: sql`${cartItems.quantity} + ${quantity}` + }).where(eq(cartItems.id, itemId)); +} +async function insertCartItem(userId, productId, quantity) { + await db.insert(cartItems).values({ + userId, + productId, + quantity: quantity.toString() + }); +} +async function updateCartItemQuantity(userId, itemId, quantity) { + const [updatedItem] = await db.update(cartItems).set({ quantity: quantity.toString() }).where(and(eq(cartItems.id, itemId), eq(cartItems.userId, userId))).returning({ id: cartItems.id }); + return !!updatedItem; +} +async function deleteCartItem(userId, itemId) { + const [deletedItem] = await db.delete(cartItems).where(and(eq(cartItems.id, itemId), eq(cartItems.userId, userId))).returning({ id: cartItems.id }); + return !!deletedItem; +} +async function clearUserCart(userId) { + await db.delete(cartItems).where(eq(cartItems.userId, userId)); +} +var getStringArray3; +var init_cart = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/cart.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + getStringArray3 = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return []; + return value.map((item) => String(item)); + }, "getStringArray"); + __name(getCartItemsWithProducts, "getCartItemsWithProducts"); + __name(getProductById2, "getProductById"); + __name(getCartItemByUserProduct, "getCartItemByUserProduct"); + __name(incrementCartItemQuantity, "incrementCartItemQuantity"); + __name(insertCartItem, "insertCartItem"); + __name(updateCartItemQuantity, "updateCartItemQuantity"); + __name(deleteCartItem, "deleteCartItem"); + __name(clearUserCart, "clearUserCart"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/complaint.ts +async function getUserComplaints(userId) { + const userComplaints = await db.select({ + id: complaints.id, + complaintBody: complaints.complaintBody, + response: complaints.response, + isResolved: complaints.isResolved, + createdAt: complaints.createdAt, + orderId: complaints.orderId + }).from(complaints).where(eq(complaints.userId, userId)).orderBy(asc(complaints.createdAt)); + return userComplaints.map((complaint) => ({ + id: complaint.id, + complaintBody: complaint.complaintBody, + response: complaint.response ?? null, + isResolved: complaint.isResolved, + createdAt: complaint.createdAt, + orderId: complaint.orderId ?? null + })); +} +async function createComplaint(userId, orderId, complaintBody, images) { + await db.insert(complaints).values({ + userId, + orderId, + complaintBody, + images: images || null + }); +} +var init_complaint2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/complaint.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getUserComplaints, "getUserComplaints"); + __name(createComplaint, "createComplaint"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/stores.ts +async function getStoreSummaries() { + const storesData = await db.select({ + id: storeInfo.id, + name: storeInfo.name, + description: storeInfo.description, + imageUrl: storeInfo.imageUrl, + productCount: sql`count(${productInfo.id})`.as("productCount") + }).from(storeInfo).leftJoin( + productInfo, + and(eq(productInfo.storeId, storeInfo.id), eq(productInfo.isSuspended, false)) + ).groupBy(storeInfo.id); + const storesWithDetails = await Promise.all( + storesData.map(async (store) => { + const sampleProducts = await db.select({ + id: productInfo.id, + name: productInfo.name, + images: productInfo.images + }).from(productInfo).where(and(eq(productInfo.storeId, store.id), eq(productInfo.isSuspended, false))).limit(3); + return { + id: store.id, + name: store.name, + description: store.description ?? null, + imageUrl: store.imageUrl ?? null, + productCount: store.productCount || 0, + sampleProducts: sampleProducts.map((product) => ({ + id: product.id, + name: product.name, + images: getStringArray4(product.images) + })) + }; + }) + ); + return storesWithDetails; +} +async function getStoreDetail(storeId) { + const storeData = await db.query.storeInfo.findFirst({ + where: eq(storeInfo.id, storeId), + columns: { + id: true, + name: true, + description: true, + imageUrl: true + } + }); + if (!storeData) { + return null; + } + const productsData = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + price: productInfo.price, + marketPrice: productInfo.marketPrice, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + incrementStep: productInfo.incrementStep, + unitShortNotation: units.shortNotation, + productQuantity: productInfo.productQuantity + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)).where(and(eq(productInfo.storeId, storeId), eq(productInfo.isSuspended, false))); + const products = productsData.map((product) => ({ + id: product.id, + name: product.name, + shortDescription: product.shortDescription ?? null, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null, + incrementStep: product.incrementStep, + unit: product.unitShortNotation, + unitNotation: product.unitShortNotation, + images: getStringArray4(product.images), + isOutOfStock: product.isOutOfStock, + productQuantity: product.productQuantity + })); + return { + store: { + id: storeData.id, + name: storeData.name, + description: storeData.description ?? null, + imageUrl: storeData.imageUrl ?? null + }, + products + }; +} +async function getStoresSummary() { + return db.query.storeInfo.findMany({ + columns: { + id: true, + name: true, + description: true + } + }); +} +var getStringArray4; +var init_stores = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/stores.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + getStringArray4 = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return null; + return value.map((item) => String(item)); + }, "getStringArray"); + __name(getStoreSummaries, "getStoreSummaries"); + __name(getStoreDetail, "getStoreDetail"); + __name(getStoresSummary, "getStoresSummary"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/product.ts +async function getProductDetailById(productId) { + const productData = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + longDescription: productInfo.longDescription, + price: productInfo.price, + marketPrice: productInfo.marketPrice, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + storeId: productInfo.storeId, + unitShortNotation: units.shortNotation, + incrementStep: productInfo.incrementStep, + productQuantity: productInfo.productQuantity, + isFlashAvailable: productInfo.isFlashAvailable, + flashPrice: productInfo.flashPrice + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)).where(eq(productInfo.id, productId)).limit(1); + if (productData.length === 0) { + return null; + } + const product = productData[0]; + const storeData = product.storeId ? await db.query.storeInfo.findFirst({ + where: eq(storeInfo.id, product.storeId), + columns: { id: true, name: true, description: true } + }) : null; + const deliverySlotsData = await db.select({ + id: deliverySlotInfo.id, + deliveryTime: deliverySlotInfo.deliveryTime, + freezeTime: deliverySlotInfo.freezeTime + }).from(productSlots).innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id)).where( + and( + eq(productSlots.productId, productId), + eq(deliverySlotInfo.isActive, true), + eq(deliverySlotInfo.isCapacityFull, false), + gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`), + gt(deliverySlotInfo.freezeTime, sql`CURRENT_TIMESTAMP`) + ) + ).orderBy(deliverySlotInfo.deliveryTime); + const specialDealsData = await db.select({ + quantity: specialDeals.quantity, + price: specialDeals.price, + validTill: specialDeals.validTill + }).from(specialDeals).where( + and( + eq(specialDeals.productId, productId), + gt(specialDeals.validTill, sql`CURRENT_TIMESTAMP`) + ) + ).orderBy(specialDeals.quantity); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription ?? null, + longDescription: product.longDescription ?? null, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null, + unitNotation: product.unitShortNotation, + images: getStringArray5(product.images), + isOutOfStock: product.isOutOfStock, + store: storeData ? { + id: storeData.id, + name: storeData.name, + description: storeData.description ?? null + } : null, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + isFlashAvailable: product.isFlashAvailable, + flashPrice: product.flashPrice?.toString() || null, + deliverySlots: deliverySlotsData, + specialDeals: specialDealsData.map((deal) => ({ + quantity: String(deal.quantity ?? "0"), + price: String(deal.price ?? "0"), + validTill: deal.validTill + })) + }; +} +async function getProductReviews2(productId, limit, offset) { + const reviews = await db.select({ + id: productReviews.id, + reviewBody: productReviews.reviewBody, + ratings: productReviews.ratings, + imageUrls: productReviews.imageUrls, + reviewTime: productReviews.reviewTime, + userName: users.name + }).from(productReviews).innerJoin(users, eq(productReviews.userId, users.id)).where(eq(productReviews.productId, productId)).orderBy(desc(productReviews.reviewTime)).limit(limit).offset(offset); + const totalCountResult = await db.select({ count: sql`count(*)` }).from(productReviews).where(eq(productReviews.productId, productId)); + const totalCount = Number(totalCountResult[0].count); + const mappedReviews = reviews.map((review) => ({ + id: review.id, + reviewBody: review.reviewBody, + ratings: review.ratings, + imageUrls: getStringArray5(review.imageUrls), + reviewTime: review.reviewTime, + userName: review.userName ?? null + })); + return { + reviews: mappedReviews, + totalCount + }; +} +async function getProductById3(productId) { + return db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId) + }); +} +async function createProductReview(userId, productId, reviewBody, ratings, imageUrls) { + const [newReview] = await db.insert(productReviews).values({ + userId, + productId, + reviewBody, + ratings, + imageUrls + }).returning({ + id: productReviews.id, + reviewBody: productReviews.reviewBody, + ratings: productReviews.ratings, + imageUrls: productReviews.imageUrls, + reviewTime: productReviews.reviewTime + }); + return { + id: newReview.id, + reviewBody: newReview.reviewBody, + ratings: newReview.ratings, + imageUrls: getStringArray5(newReview.imageUrls), + reviewTime: newReview.reviewTime, + userName: null + }; +} +async function getAllProductsWithUnits(tagId) { + let productIds = null; + if (tagId) { + const taggedProducts = await db.select({ productId: productTags.productId }).from(productTags).where(eq(productTags.tagId, tagId)); + productIds = taggedProducts.map((tp) => tp.productId); + } + let whereCondition = void 0; + if (productIds && productIds.length > 0) { + whereCondition = inArray(productInfo.id, productIds); + } + const results = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + price: productInfo.price, + marketPrice: productInfo.marketPrice, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + unitShortNotation: units.shortNotation, + productQuantity: productInfo.productQuantity + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)).where(whereCondition); + return results.map((product) => ({ + ...product, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null + })); +} +async function getSuspendedProductIds() { + const suspendedProducts = await db.select({ id: productInfo.id }).from(productInfo).where(eq(productInfo.isSuspended, true)); + return suspendedProducts.map((sp) => sp.id); +} +async function getNextDeliveryDateWithCapacity(productId) { + const result = await db.select({ deliveryTime: deliverySlotInfo.deliveryTime }).from(productSlots).innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id)).where( + and( + eq(productSlots.productId, productId), + eq(deliverySlotInfo.isActive, true), + eq(deliverySlotInfo.isCapacityFull, false), + gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`) + ) + ).orderBy(deliverySlotInfo.deliveryTime).limit(1); + return result[0]?.deliveryTime || null; +} +var getStringArray5; +var init_product2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/product.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + getStringArray5 = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return null; + return value.map((item) => String(item)); + }, "getStringArray"); + __name(getProductDetailById, "getProductDetailById"); + __name(getProductReviews2, "getProductReviews"); + __name(getProductById3, "getProductById"); + __name(createProductReview, "createProductReview"); + __name(getAllProductsWithUnits, "getAllProductsWithUnits"); + __name(getSuspendedProductIds, "getSuspendedProductIds"); + __name(getNextDeliveryDateWithCapacity, "getNextDeliveryDateWithCapacity"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/slots.ts +async function getActiveSlotsList() { + const slots = await db.query.deliverySlotInfo.findMany({ + where: eq(deliverySlotInfo.isActive, true), + orderBy: asc(deliverySlotInfo.deliveryTime) + }); + return slots.map(mapSlot); +} +async function getProductAvailability() { + const products = await db.select({ + id: productInfo.id, + name: productInfo.name, + isOutOfStock: productInfo.isOutOfStock, + isFlashAvailable: productInfo.isFlashAvailable + }).from(productInfo).where(eq(productInfo.isSuspended, false)); + return products.map((product) => ({ + id: product.id, + name: product.name, + isOutOfStock: product.isOutOfStock, + isFlashAvailable: product.isFlashAvailable + })); +} +var mapSlot; +var init_slots2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/slots.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + mapSlot = /* @__PURE__ */ __name((slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isFlash: slot.isFlash, + isCapacityFull: slot.isCapacityFull, + deliverySequence: slot.deliverySequence, + groupIds: slot.groupIds + }), "mapSlot"); + __name(getActiveSlotsList, "getActiveSlotsList"); + __name(getProductAvailability, "getProductAvailability"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/payments.ts +async function getOrderById(orderId) { + return db.query.orders.findFirst({ + where: eq(orders.id, orderId) + }); +} +async function getPaymentByOrderId(orderId) { + return db.query.payments.findFirst({ + where: eq(payments.orderId, orderId) + }); +} +async function getPaymentByMerchantOrderId(merchantOrderId) { + return db.query.payments.findFirst({ + where: eq(payments.merchantOrderId, merchantOrderId) + }); +} +async function updatePaymentSuccess(merchantOrderId, payload) { + const [updatedPayment] = await db.update(payments).set({ + status: "success", + payload + }).where(eq(payments.merchantOrderId, merchantOrderId)).returning({ + id: payments.id, + orderId: payments.orderId + }); + return updatedPayment || null; +} +async function updateOrderPaymentStatus(orderId, status) { + await db.update(orderStatus).set({ paymentStatus: status }).where(eq(orderStatus.orderId, orderId)); +} +async function markPaymentFailed(paymentId) { + await db.update(payments).set({ status: "failed" }).where(eq(payments.id, paymentId)); +} +var init_payments = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/payments.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getOrderById, "getOrderById"); + __name(getPaymentByOrderId, "getPaymentByOrderId"); + __name(getPaymentByMerchantOrderId, "getPaymentByMerchantOrderId"); + __name(updatePaymentSuccess, "updatePaymentSuccess"); + __name(updateOrderPaymentStatus, "updateOrderPaymentStatus"); + __name(markPaymentFailed, "markPaymentFailed"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/auth.ts +async function getUserByEmail(email3) { + const [user] = await db.select().from(users).where(eq(users.email, email3)).limit(1); + return user || null; +} +async function getUserByMobile2(mobile) { + const [user] = await db.select().from(users).where(eq(users.mobile, mobile)).limit(1); + return user || null; +} +async function getUserById(userId) { + const [user] = await db.select().from(users).where(eq(users.id, userId)).limit(1); + return user || null; +} +async function getUserCreds(userId) { + const [creds] = await db.select().from(userCreds).where(eq(userCreds.userId, userId)).limit(1); + return creds || null; +} +async function getUserDetails(userId) { + const [details] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + return details || null; +} +async function isUserSuspended(userId) { + const details = await getUserDetails(userId); + return details?.isSuspended ?? false; +} +async function createUserWithProfile(input) { + return db.transaction(async (tx) => { + const [user] = await tx.insert(users).values({ + name: input.name, + email: input.email, + mobile: input.mobile + }).returning(); + await tx.insert(userCreds).values({ + userId: user.id, + userPassword: input.hashedPassword + }); + await tx.insert(userDetails).values({ + userId: user.id, + profileImage: input.profileImage || null + }); + return user; + }); +} +async function getUserDetailsByUserId(userId) { + const [details] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + return details || null; +} +async function updateUserProfile(userId, data) { + return db.transaction(async (tx) => { + const userUpdate = {}; + if (data.name !== void 0) + userUpdate.name = data.name; + if (data.email !== void 0) + userUpdate.email = data.email; + if (data.mobile !== void 0) + userUpdate.mobile = data.mobile; + if (Object.keys(userUpdate).length > 0) { + await tx.update(users).set(userUpdate).where(eq(users.id, userId)); + } + if (data.hashedPassword) { + await tx.update(userCreds).set({ + userPassword: data.hashedPassword + }).where(eq(userCreds.userId, userId)); + } + const detailsUpdate = {}; + if (data.bio !== void 0) + detailsUpdate.bio = data.bio; + if (data.dateOfBirth !== void 0) + detailsUpdate.dateOfBirth = data.dateOfBirth; + if (data.gender !== void 0) + detailsUpdate.gender = data.gender; + if (data.occupation !== void 0) + detailsUpdate.occupation = data.occupation; + if (data.profileImage !== void 0) + detailsUpdate.profileImage = data.profileImage; + detailsUpdate.updatedAt = /* @__PURE__ */ new Date(); + const [existingDetails] = await tx.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + if (existingDetails) { + await tx.update(userDetails).set(detailsUpdate).where(eq(userDetails.userId, userId)); + } else { + await tx.insert(userDetails).values({ + userId, + ...detailsUpdate, + createdAt: /* @__PURE__ */ new Date() + }); + } + const [user] = await tx.select().from(users).where(eq(users.id, userId)).limit(1); + return user; + }); +} +async function createUserWithCreds(input) { + return db.transaction(async (tx) => { + const [user] = await tx.insert(users).values({ + name: input.name, + email: input.email, + mobile: input.mobile + }).returning(); + await tx.insert(userCreds).values({ + userId: user.id, + userPassword: input.hashedPassword + }); + return user; + }); +} +async function createUserWithMobile(mobile) { + const [user] = await db.insert(users).values({ + name: null, + email: null, + mobile + }).returning(); + return user; +} +async function upsertUserPassword(userId, hashedPassword) { + try { + await db.insert(userCreds).values({ + userId, + userPassword: hashedPassword + }); + return; + } catch (error50) { + if (error50.code === "23505") { + await db.update(userCreds).set({ + userPassword: hashedPassword + }).where(eq(userCreds.userId, userId)); + return; + } + throw error50; + } +} +async function deleteUserAccount(userId) { + await db.transaction(async (tx) => { + await tx.delete(notifCreds).where(eq(notifCreds.userId, userId)); + await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.userId, userId)); + await tx.delete(couponUsage).where(eq(couponUsage.userId, userId)); + await tx.delete(complaints).where(eq(complaints.userId, userId)); + await tx.delete(cartItems).where(eq(cartItems.userId, userId)); + await tx.delete(notifications).where(eq(notifications.userId, userId)); + await tx.delete(productReviews).where(eq(productReviews.userId, userId)); + await tx.update(reservedCoupons).set({ redeemedBy: null }).where(eq(reservedCoupons.redeemedBy, userId)); + const userOrders = await tx.select({ id: orders.id }).from(orders).where(eq(orders.userId, userId)); + for (const order of userOrders) { + await tx.delete(orderItems).where(eq(orderItems.orderId, order.id)); + await tx.delete(orderStatus).where(eq(orderStatus.orderId, order.id)); + await tx.delete(payments).where(eq(payments.orderId, order.id)); + await tx.delete(refunds).where(eq(refunds.orderId, order.id)); + await tx.delete(couponUsage).where(eq(couponUsage.orderId, order.id)); + await tx.delete(complaints).where(eq(complaints.orderId, order.id)); + } + await tx.delete(orders).where(eq(orders.userId, userId)); + await tx.delete(addresses).where(eq(addresses.userId, userId)); + await tx.delete(userDetails).where(eq(userDetails.userId, userId)); + await tx.delete(userCreds).where(eq(userCreds.userId, userId)); + await tx.delete(users).where(eq(users.id, userId)); + }); +} +var init_auth = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/auth.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getUserByEmail, "getUserByEmail"); + __name(getUserByMobile2, "getUserByMobile"); + __name(getUserById, "getUserById"); + __name(getUserCreds, "getUserCreds"); + __name(getUserDetails, "getUserDetails"); + __name(isUserSuspended, "isUserSuspended"); + __name(createUserWithProfile, "createUserWithProfile"); + __name(getUserDetailsByUserId, "getUserDetailsByUserId"); + __name(updateUserProfile, "updateUserProfile"); + __name(createUserWithCreds, "createUserWithCreds"); + __name(createUserWithMobile, "createUserWithMobile"); + __name(upsertUserPassword, "upsertUserPassword"); + __name(deleteUserAccount, "deleteUserAccount"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/coupon.ts +async function getActiveCouponsWithRelations(userId) { + const allCoupons = await db.query.coupons.findMany({ + where: and( + eq(coupons.isInvalidated, false), + or( + isNull(coupons.validTill), + gt(coupons.validTill, /* @__PURE__ */ new Date()) + ) + ), + with: { + usages: { + where: eq(couponUsage.userId, userId) + }, + applicableUsers: true, + applicableProducts: true + } + }); + return allCoupons.map(mapCouponWithRelations); +} +async function getAllCouponsWithRelations(userId) { + const allCoupons = await db.query.coupons.findMany({ + with: { + usages: { + where: eq(couponUsage.userId, userId) + }, + applicableUsers: true, + applicableProducts: true + } + }); + return allCoupons.map(mapCouponWithRelations); +} +async function getReservedCouponByCode(secretCode) { + const reserved = await db.query.reservedCoupons.findFirst({ + where: and( + eq(reservedCoupons.secretCode, secretCode.toUpperCase()), + eq(reservedCoupons.isRedeemed, false) + ) + }); + return reserved || null; +} +async function redeemReservedCoupon(userId, reservedCoupon) { + const couponResult = await db.transaction(async (tx) => { + const [coupon] = await tx.insert(coupons).values({ + couponCode: reservedCoupon.couponCode, + isUserBased: true, + discountPercent: reservedCoupon.discountPercent, + flatDiscount: reservedCoupon.flatDiscount, + minOrder: reservedCoupon.minOrder, + productIds: reservedCoupon.productIds, + maxValue: reservedCoupon.maxValue, + isApplyForAll: false, + validTill: reservedCoupon.validTill, + maxLimitForUser: reservedCoupon.maxLimitForUser, + exclusiveApply: reservedCoupon.exclusiveApply, + createdBy: reservedCoupon.createdBy + }).returning(); + await tx.insert(couponApplicableUsers).values({ + couponId: coupon.id, + userId + }); + await tx.update(reservedCoupons).set({ + isRedeemed: true, + redeemedBy: userId, + redeemedAt: /* @__PURE__ */ new Date() + }).where(eq(reservedCoupons.id, reservedCoupon.id)); + return coupon; + }); + return mapCoupon(couponResult); +} +var mapCoupon, mapUsage, mapApplicableUser, mapApplicableProduct, mapCouponWithRelations; +var init_coupon2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/coupon.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + mapCoupon = /* @__PURE__ */ __name((coupon) => ({ + id: coupon.id, + couponCode: coupon.couponCode, + isUserBased: coupon.isUserBased, + discountPercent: coupon.discountPercent ? coupon.discountPercent.toString() : null, + flatDiscount: coupon.flatDiscount ? coupon.flatDiscount.toString() : null, + minOrder: coupon.minOrder ? coupon.minOrder.toString() : null, + productIds: coupon.productIds, + maxValue: coupon.maxValue ? coupon.maxValue.toString() : null, + isApplyForAll: coupon.isApplyForAll, + validTill: coupon.validTill ?? null, + maxLimitForUser: coupon.maxLimitForUser ?? null, + isInvalidated: coupon.isInvalidated, + exclusiveApply: coupon.exclusiveApply, + createdAt: coupon.createdAt + }), "mapCoupon"); + mapUsage = /* @__PURE__ */ __name((usage) => ({ + id: usage.id, + userId: usage.userId, + couponId: usage.couponId, + orderId: usage.orderId ?? null, + orderItemId: usage.orderItemId ?? null, + usedAt: usage.usedAt + }), "mapUsage"); + mapApplicableUser = /* @__PURE__ */ __name((applicable) => ({ + id: applicable.id, + couponId: applicable.couponId, + userId: applicable.userId + }), "mapApplicableUser"); + mapApplicableProduct = /* @__PURE__ */ __name((applicable) => ({ + id: applicable.id, + couponId: applicable.couponId, + productId: applicable.productId + }), "mapApplicableProduct"); + mapCouponWithRelations = /* @__PURE__ */ __name((coupon) => ({ + ...mapCoupon(coupon), + usages: coupon.usages.map(mapUsage), + applicableUsers: coupon.applicableUsers.map(mapApplicableUser), + applicableProducts: coupon.applicableProducts.map(mapApplicableProduct) + }), "mapCouponWithRelations"); + __name(getActiveCouponsWithRelations, "getActiveCouponsWithRelations"); + __name(getAllCouponsWithRelations, "getAllCouponsWithRelations"); + __name(getReservedCouponByCode, "getReservedCouponByCode"); + __name(redeemReservedCoupon, "redeemReservedCoupon"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/user.ts +async function getUserById2(userId) { + const [user] = await db.select().from(users).where(eq(users.id, userId)).limit(1); + return user || null; +} +async function getUserDetailByUserId(userId) { + const [detail] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + return detail || null; +} +async function getUserWithCreds(userId) { + const result = await db.select().from(users).leftJoin(userCreds, eq(users.id, userCreds.userId)).where(eq(users.id, userId)).limit(1); + if (result.length === 0) + return null; + return { + user: result[0].users, + creds: result[0].user_creds + }; +} +async function getNotifCred(userId, token) { + return db.query.notifCreds.findFirst({ + where: and(eq(notifCreds.userId, userId), eq(notifCreds.token, token)) + }); +} +async function upsertNotifCred(userId, token) { + const existing = await getNotifCred(userId, token); + if (existing) { + await db.update(notifCreds).set({ lastVerified: /* @__PURE__ */ new Date() }).where(eq(notifCreds.id, existing.id)); + return; + } + await db.insert(notifCreds).values({ + userId, + token, + lastVerified: /* @__PURE__ */ new Date() + }); +} +async function deleteUnloggedToken(token) { + await db.delete(unloggedUserTokens).where(eq(unloggedUserTokens.token, token)); +} +async function getUnloggedToken(token) { + return db.query.unloggedUserTokens.findFirst({ + where: eq(unloggedUserTokens.token, token) + }); +} +async function upsertUnloggedToken(token) { + const existing = await getUnloggedToken(token); + if (existing) { + await db.update(unloggedUserTokens).set({ lastVerified: /* @__PURE__ */ new Date() }).where(eq(unloggedUserTokens.id, existing.id)); + return; + } + await db.insert(unloggedUserTokens).values({ + token, + lastVerified: /* @__PURE__ */ new Date() + }); +} +var init_user2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getUserById2, "getUserById"); + __name(getUserDetailByUserId, "getUserDetailByUserId"); + __name(getUserWithCreds, "getUserWithCreds"); + __name(getNotifCred, "getNotifCred"); + __name(upsertNotifCred, "upsertNotifCred"); + __name(deleteUnloggedToken, "deleteUnloggedToken"); + __name(getUnloggedToken, "getUnloggedToken"); + __name(upsertUnloggedToken, "upsertUnloggedToken"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/order.ts +async function validateAndGetCoupon(couponId, userId, totalAmount) { + if (!couponId) + return null; + const coupon = await db.query.coupons.findFirst({ + where: eq(coupons.id, couponId), + with: { + usages: { where: eq(couponUsage.userId, userId) } + } + }); + if (!coupon) + throw new Error("Invalid coupon"); + if (coupon.isInvalidated) + throw new Error("Coupon is no longer valid"); + if (coupon.validTill && new Date(coupon.validTill) < /* @__PURE__ */ new Date()) + throw new Error("Coupon has expired"); + if (coupon.maxLimitForUser && coupon.usages.length >= coupon.maxLimitForUser) + throw new Error("Coupon usage limit exceeded"); + if (coupon.minOrder && parseFloat(coupon.minOrder.toString()) > totalAmount) + throw new Error("Order amount does not meet coupon minimum requirement"); + return coupon; +} +function applyDiscountToOrder(orderTotal, appliedCoupon, proportion) { + let finalOrderTotal = orderTotal; + if (appliedCoupon) { + if (appliedCoupon.discountPercent) { + const discount = Math.min( + orderTotal * parseFloat(appliedCoupon.discountPercent.toString()) / 100, + appliedCoupon.maxValue ? parseFloat(appliedCoupon.maxValue.toString()) * proportion : Infinity + ); + finalOrderTotal -= discount; + } else if (appliedCoupon.flatDiscount) { + const discount = Math.min( + parseFloat(appliedCoupon.flatDiscount.toString()) * proportion, + appliedCoupon.maxValue ? parseFloat(appliedCoupon.maxValue.toString()) * proportion : finalOrderTotal + ); + finalOrderTotal -= discount; + } + } + return { finalOrderTotal, orderGroupProportion: proportion }; +} +async function getAddressByIdAndUser(addressId, userId) { + return db.query.addresses.findFirst({ + where: and(eq(addresses.userId, userId), eq(addresses.id, addressId)) + }); +} +async function getProductById4(productId) { + return db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId) + }); +} +async function checkUserSuspended(userId) { + const userDetail = await db.query.userDetails.findFirst({ + where: eq(userDetails.userId, userId) + }); + return userDetail?.isSuspended ?? false; +} +async function getSlotCapacityStatus(slotId) { + const slot = await db.query.deliverySlotInfo.findFirst({ + where: eq(deliverySlotInfo.id, slotId), + columns: { + isCapacityFull: true + } + }); + return slot?.isCapacityFull ?? false; +} +async function placeOrderTransaction(params) { + const { userId, ordersData, paymentMethod } = params; + return db.transaction(async (tx) => { + let sharedPaymentInfoId = null; + if (paymentMethod === "online") { + const [paymentInfo] = await tx.insert(paymentInfoTable).values({ + status: "pending", + gateway: "razorpay", + merchantOrderId: `multi_order_${Date.now()}` + }).returning(); + sharedPaymentInfoId = paymentInfo.id; + } + const ordersToInsert = ordersData.map((od) => ({ + ...od.order, + paymentInfoId: sharedPaymentInfoId + })); + const insertedOrders = await tx.insert(orders).values(ordersToInsert).returning(); + const allOrderItems = []; + const allOrderStatuses = []; + insertedOrders.forEach((order, index) => { + const od = ordersData[index]; + od.orderItems.forEach((item) => { + allOrderItems.push({ ...item, orderId: order.id }); + }); + allOrderStatuses.push({ + ...od.orderStatus, + orderId: order.id + }); + }); + await tx.insert(orderItems).values(allOrderItems); + await tx.insert(orderStatus).values(allOrderStatuses); + return insertedOrders; + }); +} +async function deleteCartItemsForOrder(userId, productIds) { + await db.delete(cartItems).where( + and( + eq(cartItems.userId, userId), + inArray(cartItems.productId, productIds) + ) + ); +} +async function recordCouponUsage(userId, couponId, orderId) { + await db.insert(couponUsage).values({ + userId, + couponId, + orderId, + orderItemId: null, + usedAt: /* @__PURE__ */ new Date() + }); +} +async function getOrdersWithRelations(userId, offset, pageSize) { + return db.query.orders.findMany({ + where: eq(orders.userId, userId), + with: { + orderItems: { + with: { + product: { + columns: { + id: true, + name: true, + images: true + } + } + } + }, + slot: { + columns: { + deliveryTime: true + } + }, + paymentInfo: { + columns: { + id: true, + status: true + } + }, + orderStatus: { + columns: { + id: true, + isCancelled: true, + isDelivered: true, + paymentStatus: true, + cancelReason: true + } + }, + refunds: { + columns: { + refundStatus: true, + refundAmount: true + } + } + }, + orderBy: [desc(orders.createdAt)], + limit: pageSize, + offset + }); +} +async function getOrderCount(userId) { + const result = await db.select({ count: sql`count(*)` }).from(orders).where(eq(orders.userId, userId)); + return Number(result[0]?.count ?? 0); +} +async function getOrderByIdWithRelations(orderId, userId) { + const order = await db.query.orders.findFirst({ + where: and(eq(orders.id, orderId), eq(orders.userId, userId)), + with: { + orderItems: { + with: { + product: { + columns: { + id: true, + name: true, + images: true + } + } + } + }, + slot: { + columns: { + deliveryTime: true + } + }, + paymentInfo: { + columns: { + id: true, + status: true + } + }, + orderStatus: { + columns: { + id: true, + isCancelled: true, + isDelivered: true, + paymentStatus: true, + cancelReason: true + }, + with: { + refundCoupon: { + columns: { + id: true, + couponCode: true + } + } + } + }, + refunds: { + columns: { + refundStatus: true, + refundAmount: true + } + } + } + }); + return order; +} +async function getCouponUsageForOrder(orderId) { + return db.query.couponUsage.findMany({ + where: eq(couponUsage.orderId, orderId), + with: { + coupon: { + columns: { + id: true, + couponCode: true, + discountPercent: true, + flatDiscount: true, + maxValue: true + } + } + } + }); +} +async function getOrderBasic(orderId) { + return db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + orderStatus: { + columns: { + id: true, + isCancelled: true, + isDelivered: true + } + } + } + }); +} +async function cancelOrderTransaction(orderId, statusId, reason, isCod) { + await db.transaction(async (tx) => { + await tx.update(orderStatus).set({ + isCancelled: true, + cancelReason: reason, + cancellationUserNotes: reason, + cancellationReviewed: false + }).where(eq(orderStatus.id, statusId)); + const refundStatus = isCod ? "na" : "pending"; + await tx.insert(refunds).values({ + orderId, + refundStatus + }); + }); +} +async function updateOrderNotes2(orderId, userNotes) { + await db.update(orders).set({ + userNotes: userNotes || null + }).where(eq(orders.id, orderId)); +} +async function getRecentlyDeliveredOrderIds(userId, limit, since) { + const recentOrders = await db.select({ id: orders.id }).from(orders).innerJoin(orderStatus, eq(orders.id, orderStatus.orderId)).where( + and( + eq(orders.userId, userId), + eq(orderStatus.isDelivered, true), + gte(orders.createdAt, since) + ) + ).orderBy(desc(orders.createdAt)).limit(limit); + return recentOrders.map((order) => order.id); +} +async function getProductIdsFromOrders(orderIds) { + const orderItemsResult = await db.select({ productId: orderItems.productId }).from(orderItems).where(inArray(orderItems.orderId, orderIds)); + return [...new Set(orderItemsResult.map((item) => item.productId))]; +} +async function getProductsForRecentOrders(productIds, limit) { + const results = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + price: productInfo.price, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + unitShortNotation: units.shortNotation, + incrementStep: productInfo.incrementStep + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)).where( + and( + inArray(productInfo.id, productIds), + eq(productInfo.isSuspended, false) + ) + ).orderBy(desc(productInfo.createdAt)).limit(limit); + return results.map((product) => ({ + ...product, + price: String(product.price ?? "0") + })); +} +async function getOrdersByIdsWithFullData(orderIds) { + return db.query.orders.findMany({ + where: inArray(orders.id, orderIds), + with: { + address: { + columns: { + name: true, + addressLine1: true, + addressLine2: true, + city: true, + state: true, + pincode: true, + phone: true + } + }, + orderItems: { + with: { + product: { + columns: { + name: true + } + } + } + }, + slot: { + columns: { + deliveryTime: true + } + } + } + }); +} +async function getOrderByIdWithFullData(orderId) { + return db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + address: { + columns: { + name: true, + addressLine1: true, + addressLine2: true, + city: true, + state: true, + pincode: true, + phone: true + } + }, + orderItems: { + with: { + product: { + columns: { + name: true + } + } + } + }, + slot: { + columns: { + deliveryTime: true + } + }, + refunds: { + columns: { + refundStatus: true + } + } + } + }); +} +var init_order2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/order.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(validateAndGetCoupon, "validateAndGetCoupon"); + __name(applyDiscountToOrder, "applyDiscountToOrder"); + __name(getAddressByIdAndUser, "getAddressByIdAndUser"); + __name(getProductById4, "getProductById"); + __name(checkUserSuspended, "checkUserSuspended"); + __name(getSlotCapacityStatus, "getSlotCapacityStatus"); + __name(placeOrderTransaction, "placeOrderTransaction"); + __name(deleteCartItemsForOrder, "deleteCartItemsForOrder"); + __name(recordCouponUsage, "recordCouponUsage"); + __name(getOrdersWithRelations, "getOrdersWithRelations"); + __name(getOrderCount, "getOrderCount"); + __name(getOrderByIdWithRelations, "getOrderByIdWithRelations"); + __name(getCouponUsageForOrder, "getCouponUsageForOrder"); + __name(getOrderBasic, "getOrderBasic"); + __name(cancelOrderTransaction, "cancelOrderTransaction"); + __name(updateOrderNotes2, "updateOrderNotes"); + __name(getRecentlyDeliveredOrderIds, "getRecentlyDeliveredOrderIds"); + __name(getProductIdsFromOrders, "getProductIdsFromOrders"); + __name(getProductsForRecentOrders, "getProductsForRecentOrders"); + __name(getOrdersByIdsWithFullData, "getOrdersByIdsWithFullData"); + __name(getOrderByIdWithFullData, "getOrderByIdWithFullData"); + } +}); + +// ../../packages/db_helper_sqlite/src/stores/store-helpers.ts +async function getAllBannersForCache() { + return db.query.homeBanners.findMany({ + where: isNotNull(homeBanners.serialNum), + orderBy: asc(homeBanners.serialNum) + }); +} +async function getAllProductsForCache() { + const results = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + longDescription: productInfo.longDescription, + price: productInfo.price, + marketPrice: productInfo.marketPrice, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + storeId: productInfo.storeId, + unitShortNotation: units.shortNotation, + incrementStep: productInfo.incrementStep, + productQuantity: productInfo.productQuantity, + isFlashAvailable: productInfo.isFlashAvailable, + flashPrice: productInfo.flashPrice + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)); + return results.map((product) => ({ + ...product, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null, + flashPrice: product.flashPrice ? String(product.flashPrice) : null + })); +} +async function getAllStoresForCache() { + return db.query.storeInfo.findMany({ + columns: { id: true, name: true, description: true } + }); +} +async function getAllDeliverySlotsForCache() { + return db.select({ + productId: productSlots.productId, + id: deliverySlotInfo.id, + deliveryTime: deliverySlotInfo.deliveryTime, + freezeTime: deliverySlotInfo.freezeTime, + isCapacityFull: deliverySlotInfo.isCapacityFull + }).from(productSlots).innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id)).where( + and( + eq(deliverySlotInfo.isActive, true), + eq(deliverySlotInfo.isCapacityFull, false), + gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`) + ) + ); +} +async function getAllSpecialDealsForCache() { + const results = await db.select({ + productId: specialDeals.productId, + quantity: specialDeals.quantity, + price: specialDeals.price, + validTill: specialDeals.validTill + }).from(specialDeals).where(gt(specialDeals.validTill, sql`CURRENT_TIMESTAMP`)); + return results.map((deal) => ({ + ...deal, + quantity: String(deal.quantity ?? "0"), + price: String(deal.price ?? "0") + })); +} +async function getAllProductTagsForCache() { + return db.select({ + productId: productTags.productId, + tagName: productTagInfo.tagName + }).from(productTags).innerJoin(productTagInfo, eq(productTags.tagId, productTagInfo.id)); +} +async function getAllTagsForCache() { + return db.select({ + id: productTagInfo.id, + tagName: productTagInfo.tagName, + tagDescription: productTagInfo.tagDescription, + imageUrl: productTagInfo.imageUrl, + isDashboardTag: productTagInfo.isDashboardTag, + relatedStores: productTagInfo.relatedStores + }).from(productTagInfo); +} +async function getAllTagProductMappings() { + return db.select({ + tagId: productTags.tagId, + productId: productTags.productId + }).from(productTags); +} +async function getAllSlotsWithProductsForCache() { + const now = /* @__PURE__ */ new Date(); + return db.query.deliverySlotInfo.findMany({ + where: and( + eq(deliverySlotInfo.isActive, true), + gt(deliverySlotInfo.deliveryTime, now) + ), + with: { + productSlots: { + with: { + product: { + with: { + unit: true, + store: true + } + } + } + } + }, + orderBy: asc(deliverySlotInfo.deliveryTime) + }); +} +async function getAllUserNegativityScores() { + const results = await db.select({ + userId: userIncidents.userId, + totalNegativityScore: sql`sum(${userIncidents.negativityScore})` + }).from(userIncidents).groupBy(userIncidents.userId); + return results.map((result) => ({ + userId: result.userId, + totalNegativityScore: Number(result.totalNegativityScore ?? 0) + })); +} +async function getUserNegativityScore(userId) { + const [result] = await db.select({ + totalNegativityScore: sql`sum(${userIncidents.negativityScore})` + }).from(userIncidents).where(eq(userIncidents.userId, userId)).limit(1); + return Number(result?.totalNegativityScore ?? 0); +} +var init_store_helpers = __esm({ + "../../packages/db_helper_sqlite/src/stores/store-helpers.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getAllBannersForCache, "getAllBannersForCache"); + __name(getAllProductsForCache, "getAllProductsForCache"); + __name(getAllStoresForCache, "getAllStoresForCache"); + __name(getAllDeliverySlotsForCache, "getAllDeliverySlotsForCache"); + __name(getAllSpecialDealsForCache, "getAllSpecialDealsForCache"); + __name(getAllProductTagsForCache, "getAllProductTagsForCache"); + __name(getAllTagsForCache, "getAllTagsForCache"); + __name(getAllTagProductMappings, "getAllTagProductMappings"); + __name(getAllSlotsWithProductsForCache, "getAllSlotsWithProductsForCache"); + __name(getAllUserNegativityScores, "getAllUserNegativityScores"); + __name(getUserNegativityScore, "getUserNegativityScore"); + } +}); + +// ../../packages/db_helper_sqlite/src/lib/automated-jobs.ts +async function toggleFlashDeliveryForItems(isAvailable, productIds) { + await db.update(productInfo).set({ isFlashAvailable: isAvailable }).where(inArray(productInfo.id, productIds)); +} +async function toggleKeyVal(key, value) { + await db.update(keyValStore).set({ value }).where(eq(keyValStore.key, key)); +} +async function getAllKeyValStore() { + return db.select().from(keyValStore); +} +var init_automated_jobs = __esm({ + "../../packages/db_helper_sqlite/src/lib/automated-jobs.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(toggleFlashDeliveryForItems, "toggleFlashDeliveryForItems"); + __name(toggleKeyVal, "toggleKeyVal"); + __name(getAllKeyValStore, "getAllKeyValStore"); + } +}); + +// ../../packages/db_helper_sqlite/src/lib/health-check.ts +async function healthCheck() { + try { + await db.select({ key: keyValStore.key }).from(keyValStore).limit(1); + return { status: "ok" }; + } catch { + await db.select({ name: productInfo.name }).from(productInfo).limit(1); + return { status: "ok" }; + } +} +var init_health_check = __esm({ + "../../packages/db_helper_sqlite/src/lib/health-check.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + __name(healthCheck, "healthCheck"); + } +}); + +// ../../packages/db_helper_sqlite/src/lib/delete-orders.ts +async function deleteOrdersWithRelations(orderIds) { + if (orderIds.length === 0) { + return; + } + await db.delete(couponUsage).where(inArray(couponUsage.orderId, orderIds)); + await db.delete(complaints).where(inArray(complaints.orderId, orderIds)); + await db.delete(refunds).where(inArray(refunds.orderId, orderIds)); + await db.delete(payments).where(inArray(payments.orderId, orderIds)); + await db.delete(orderStatus).where(inArray(orderStatus.orderId, orderIds)); + await db.delete(orderItems).where(inArray(orderItems.orderId, orderIds)); + await db.delete(orders).where(inArray(orders.id, orderIds)); +} +var init_delete_orders = __esm({ + "../../packages/db_helper_sqlite/src/lib/delete-orders.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(deleteOrdersWithRelations, "deleteOrdersWithRelations"); + } +}); + +// ../../packages/db_helper_sqlite/src/helper_methods/upload-url.ts +async function createUploadUrlStatus(key) { + await db.insert(uploadUrlStatus).values({ + key, + status: "pending" + }); +} +async function claimUploadUrlStatus(key) { + const result = await db.update(uploadUrlStatus).set({ status: "claimed" }).where(and(eq(uploadUrlStatus.key, key), eq(uploadUrlStatus.status, "pending"))).returning(); + return result.length > 0; +} +var init_upload_url = __esm({ + "../../packages/db_helper_sqlite/src/helper_methods/upload-url.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_drizzle_orm(); + init_db_index(); + init_schema(); + __name(createUploadUrlStatus, "createUploadUrlStatus"); + __name(claimUploadUrlStatus, "claimUploadUrlStatus"); + } +}); + +// ../../packages/db_helper_sqlite/src/lib/seed.ts +async function seedUnits(unitsToSeed) { + for (const unit of unitsToSeed) { + const { units: unitsTable } = await Promise.resolve().then(() => (init_schema(), schema_exports)); + const existingUnit = await db.query.units.findFirst({ + where: eq(unitsTable.shortNotation, unit.shortNotation) + }); + if (!existingUnit) { + await db.insert(unitsTable).values(unit); + } + } +} +async function seedStaffRoles(rolesToSeed) { + for (const roleName of rolesToSeed) { + const { staffRoles: staffRoles2 } = await Promise.resolve().then(() => (init_schema(), schema_exports)); + const existingRole = await db.query.staffRoles.findFirst({ + where: eq(staffRoles2.roleName, roleName) + }); + if (!existingRole) { + await db.insert(staffRoles2).values({ roleName }); + } + } +} +async function seedStaffPermissions(permissionsToSeed) { + for (const permissionName of permissionsToSeed) { + const { staffPermissions: staffPermissions2 } = await Promise.resolve().then(() => (init_schema(), schema_exports)); + const existingPermission = await db.query.staffPermissions.findFirst({ + where: eq(staffPermissions2.permissionName, permissionName) + }); + if (!existingPermission) { + await db.insert(staffPermissions2).values({ permissionName }); + } + } +} +async function seedRolePermissions(assignments) { + await db.transaction(async (tx) => { + const { staffRoles: staffRoles2, staffPermissions: staffPermissions2, staffRolePermissions: staffRolePermissions2 } = await Promise.resolve().then(() => (init_schema(), schema_exports)); + for (const assignment of assignments) { + const role = await tx.query.staffRoles.findFirst({ + where: eq(staffRoles2.roleName, assignment.roleName) + }); + const permission2 = await tx.query.staffPermissions.findFirst({ + where: eq(staffPermissions2.permissionName, assignment.permissionName) + }); + if (role && permission2) { + const existing = await tx.query.staffRolePermissions.findFirst({ + where: and( + eq(staffRolePermissions2.staffRoleId, role.id), + eq(staffRolePermissions2.staffPermissionId, permission2.id) + ) + }); + if (!existing) { + await tx.insert(staffRolePermissions2).values({ + staffRoleId: role.id, + staffPermissionId: permission2.id + }); + } + } + } + }); +} +async function seedKeyValStore(constantsToSeed) { + for (const constant of constantsToSeed) { + const { keyValStore: keyValStore2 } = await Promise.resolve().then(() => (init_schema(), schema_exports)); + const existing = await db.query.keyValStore.findFirst({ + where: eq(keyValStore2.key, constant.key) + }); + if (!existing) { + await db.insert(keyValStore2).values({ + key: constant.key, + value: constant.value + }); + } + } +} +var init_seed = __esm({ + "../../packages/db_helper_sqlite/src/lib/seed.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_drizzle_orm(); + __name(seedUnits, "seedUnits"); + __name(seedStaffRoles, "seedStaffRoles"); + __name(seedStaffPermissions, "seedStaffPermissions"); + __name(seedRolePermissions, "seedRolePermissions"); + __name(seedKeyValStore, "seedKeyValStore"); + } +}); + +// ../../packages/db_helper_sqlite/index.ts +var init_db_helper_sqlite = __esm({ + "../../packages/db_helper_sqlite/index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_schema(); + init_banner(); + init_complaint(); + init_const(); + init_coupon(); + init_order(); + init_product(); + init_slots(); + init_staff_user(); + init_store(); + init_user(); + init_vendor_snippets(); + init_address(); + init_banners(); + init_cart(); + init_complaint2(); + init_stores(); + init_product2(); + init_slots2(); + init_payments(); + init_auth(); + init_coupon2(); + init_user2(); + init_order2(); + init_store_helpers(); + init_automated_jobs(); + init_health_check(); + init_product2(); + init_stores(); + init_delete_orders(); + init_upload_url(); + init_seed(); + } +}); + +// src/sqliteImporter.ts +var init_sqliteImporter = __esm({ + "src/sqliteImporter.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_helper_sqlite(); + init_db_helper_sqlite(); + init_db_helper_sqlite(); + } +}); + +// src/dbService.ts +var dbService_exports = {}; +__export(dbService_exports, { + addProductToGroup: () => addProductToGroup, + addressAreas: () => addressAreas, + addressAreasRelations: () => addressAreasRelations, + addressZones: () => addressZones, + addressZonesRelations: () => addressZonesRelations, + addresses: () => addresses, + addressesRelations: () => addressesRelations, + applyDiscountToUserOrder: () => applyDiscountToOrder, + cancelOrder: () => cancelOrder, + cancelUserOrderTransaction: () => cancelOrderTransaction, + cartItems: () => cartItems, + cartItemsRelations: () => cartItemsRelations, + checkCouponExists: () => checkCouponExists, + checkProductExistsByName: () => checkProductExistsByName, + checkProductTagExistsByName: () => checkProductTagExistsByName, + checkReservedCouponExists: () => checkReservedCouponExists, + checkStaffRoleExists: () => checkStaffRoleExists, + checkStaffUserExists: () => checkStaffUserExists, + checkUnitExists: () => checkUnitExists, + checkUserSuspended: () => checkUserSuspended, + checkUsersExist: () => checkUsersExist, + checkVendorSnippetExists: () => checkVendorSnippetExists, + claimUploadUrlStatus: () => claimUploadUrlStatus, + clearUserCart: () => clearUserCart, + clearUserDefaultAddress: () => clearDefaultAddress, + complaints: () => complaints, + complaintsRelations: () => complaintsRelations, + couponApplicableProducts: () => couponApplicableProducts, + couponApplicableProductsRelations: () => couponApplicableProductsRelations, + couponApplicableUsers: () => couponApplicableUsers, + couponApplicableUsersRelations: () => couponApplicableUsersRelations, + couponUsage: () => couponUsage, + couponUsageRelations: () => couponUsageRelations, + coupons: () => coupons, + couponsRelations: () => couponsRelations, + createBanner: () => createBanner, + createCouponForUser: () => createCouponForUser, + createCouponWithRelations: () => createCouponWithRelations, + createProduct: () => createProduct, + createProductGroup: () => createProductGroup, + createProductTag: () => createProductTag, + createReservedCouponWithProducts: () => createReservedCouponWithProducts, + createSlotWithRelations: () => createSlotWithRelations, + createSpecialDealsForProduct: () => createSpecialDealsForProduct, + createStaffUser: () => createStaffUser, + createStore: () => createStore, + createUploadUrlStatus: () => createUploadUrlStatus, + createUserAddress: () => createUserAddress, + createUserAuthWithCreds: () => createUserWithCreds, + createUserAuthWithMobile: () => createUserWithMobile, + createUserByMobile: () => createUserByMobile, + createUserComplaint: () => createComplaint, + createUserIncident: () => createUserIncident, + createUserProductReview: () => createProductReview, + createUserWithProfile: () => createUserWithProfile, + createVendorSnippet: () => createVendorSnippet, + db: () => db, + deleteBanner: () => deleteBanner, + deleteOrderById: () => deleteOrderById, + deleteOrdersWithRelations: () => deleteOrdersWithRelations, + deleteProduct: () => deleteProduct, + deleteProductGroup: () => deleteProductGroup, + deleteProductTag: () => deleteProductTag, + deleteSlotById: () => deleteSlotById, + deleteStore: () => deleteStore, + deleteUserAddress: () => deleteUserAddress, + deleteUserAuthAccount: () => deleteUserAccount, + deleteUserCartItem: () => deleteCartItem, + deleteUserCartItemsForOrder: () => deleteCartItemsForOrder, + deleteUserUnloggedToken: () => deleteUnloggedToken, + deleteVendorSnippet: () => deleteVendorSnippet, + deliverySlotInfo: () => deliverySlotInfo, + deliverySlotInfoRelations: () => deliverySlotInfoRelations, + generateCancellationCoupon: () => generateCancellationCoupon, + getActiveSlots: () => getActiveSlots, + getActiveSlotsWithProducts: () => getActiveSlotsWithProducts, + getAllBannersForCache: () => getAllBannersForCache, + getAllConstants: () => getAllConstants, + getAllCoupons: () => getAllCoupons, + getAllDeliverySlotsForCache: () => getAllDeliverySlotsForCache, + getAllKeyValStore: () => getAllKeyValStore, + getAllNotifCreds: () => getAllNotifCreds, + getAllOrders: () => getAllOrders, + getAllProductGroups: () => getAllProductGroups, + getAllProductTagInfos: () => getAllProductTagInfos, + getAllProductTags: () => getAllProductTags, + getAllProductTagsForCache: () => getAllProductTagsForCache, + getAllProducts: () => getAllProducts, + getAllProductsForCache: () => getAllProductsForCache, + getAllProductsWithUnits: () => getAllProductsWithUnits, + getAllRoles: () => getAllRoles, + getAllSlotsWithProductsForCache: () => getAllSlotsWithProductsForCache, + getAllSpecialDealsForCache: () => getAllSpecialDealsForCache, + getAllStaff: () => getAllStaff, + getAllStores: () => getAllStores, + getAllStoresForCache: () => getAllStoresForCache, + getAllTagProductMappings: () => getAllTagProductMappings, + getAllTagsForCache: () => getAllTagsForCache, + getAllUnits: () => getAllUnits, + getAllUnloggedTokens: () => getAllUnloggedTokens, + getAllUserNegativityScores: () => getAllUserNegativityScores, + getAllUsers: () => getAllUsers, + getAllUsersWithFilters: () => getAllUsersWithFilters, + getAllVendorSnippets: () => getAllVendorSnippets, + getBannerById: () => getBannerById, + getBanners: () => getBanners, + getComplaints: () => getComplaints, + getCouponById: () => getCouponById, + getItemCountsByOrderIds: () => getItemCountsByOrderIds, + getLastOrdersByUserIds: () => getLastOrdersByUserIds, + getNextDeliveryDateWithCapacity: () => getNextDeliveryDateWithCapacity, + getNotifTokensByUserIds: () => getNotifTokensByUserIds, + getOrderByIdWithFullData: () => getOrderByIdWithFullData, + getOrderCountsByUserIds: () => getOrderCountsByUserIds, + getOrderDetails: () => getOrderDetails, + getOrderDetailsWrapper: () => getOrderDetailsWrapper, + getOrderItemsByOrderIds: () => getOrderItemsByOrderIds, + getOrderProductById: () => getProductById4, + getOrderStatusByOrderIds: () => getOrderStatusByOrderIds, + getOrderStatusesByOrderIds: () => getOrderStatusesByOrderIds, + getOrderWithUser: () => getOrderWithUser, + getOrdersByIdsWithFullData: () => getOrdersByIdsWithFullData, + getProductById: () => getProductById, + getProductImagesById: () => getProductImagesById, + getProductReviews: () => getProductReviews, + getProductTagById: () => getProductTagById, + getProductTagInfoById: () => getProductTagInfoById, + getProductsByIds: () => getProductsByIds, + getReservedCoupons: () => getReservedCoupons, + getSlotByIdWithRelations: () => getSlotByIdWithRelations, + getSlotDeliverySequence: () => getSlotDeliverySequence, + getSlotOrders: () => getSlotOrders, + getSlotProductIds: () => getSlotProductIds, + getSlotsAfterDate: () => getSlotsAfterDate, + getSlotsProductIds: () => getSlotsProductIds, + getStaffUserById: () => getStaffUserById, + getStaffUserByName: () => getStaffUserByName, + getStoreById: () => getStoreById, + getStoresSummary: () => getStoresSummary, + getSuspendedProductIds: () => getSuspendedProductIds, + getSuspensionStatusesByUserIds: () => getSuspensionStatusesByUserIds, + getUnresolvedComplaintsCount: () => getUnresolvedComplaintsCount, + getUserActiveBanners: () => getActiveBanners, + getUserActiveCouponsWithRelations: () => getActiveCouponsWithRelations, + getUserActiveSlotsList: () => getActiveSlotsList, + getUserAddressById: () => getUserAddressById, + getUserAddressByIdAndUser: () => getAddressByIdAndUser, + getUserAddresses: () => getUserAddresses, + getUserAllCouponsWithRelations: () => getAllCouponsWithRelations, + getUserAuthByEmail: () => getUserByEmail, + getUserAuthById: () => getUserById, + getUserAuthByMobile: () => getUserByMobile2, + getUserAuthCreds: () => getUserCreds, + getUserAuthDetails: () => getUserDetails, + getUserBasicInfo: () => getUserBasicInfo, + getUserByMobile: () => getUserByMobile, + getUserCartItemByUserProduct: () => getCartItemByUserProduct, + getUserCartItemsWithProducts: () => getCartItemsWithProducts, + getUserComplaints: () => getUserComplaints, + getUserCouponUsageForOrder: () => getCouponUsageForOrder, + getUserDefaultAddress: () => getDefaultAddress, + getUserDetailsByUserId: () => getUserDetailsByUserId, + getUserIncidentsWithRelations: () => getUserIncidentsWithRelations, + getUserNegativityScore: () => getUserNegativityScore, + getUserNotifCred: () => getNotifCred, + getUserOrderBasic: () => getOrderBasic, + getUserOrderByIdWithRelations: () => getOrderByIdWithRelations, + getUserOrderCount: () => getOrderCount, + getUserOrders: () => getUserOrders, + getUserOrdersWithRelations: () => getOrdersWithRelations, + getUserPaymentByMerchantOrderId: () => getPaymentByMerchantOrderId, + getUserPaymentByOrderId: () => getPaymentByOrderId, + getUserPaymentOrderById: () => getOrderById, + getUserProductAvailability: () => getProductAvailability, + getUserProductById: () => getProductById2, + getUserProductByIdBasic: () => getProductById3, + getUserProductDetailById: () => getProductDetailById, + getUserProductIdsFromOrders: () => getProductIdsFromOrders, + getUserProductReviews: () => getProductReviews2, + getUserProductsForRecentOrders: () => getProductsForRecentOrders, + getUserProfileById: () => getUserById2, + getUserProfileDetailById: () => getUserDetailByUserId, + getUserRecentlyDeliveredOrderIds: () => getRecentlyDeliveredOrderIds, + getUserReservedCouponByCode: () => getReservedCouponByCode, + getUserSlotCapacityStatus: () => getSlotCapacityStatus, + getUserStoreDetail: () => getStoreDetail, + getUserStoreSummaries: () => getStoreSummaries, + getUserSuspensionStatus: () => getUserSuspensionStatus, + getUserUnloggedToken: () => getUnloggedToken, + getUserWithCreds: () => getUserWithCreds, + getUserWithDetails: () => getUserWithDetails, + getUsersForCoupon: () => getUsersForCoupon, + getVendorOrders: () => getVendorOrders, + getVendorOrdersBySlotId: () => getVendorOrdersBySlotId, + getVendorSlotById: () => getVendorSlotById, + getVendorSnippetByCode: () => getVendorSnippetByCode, + getVendorSnippetById: () => getVendorSnippetById, + hasOngoingOrdersForAddress: () => hasOngoingOrdersForAddress, + healthCheck: () => healthCheck, + homeBanners: () => homeBanners, + homeBannersRelations: () => homeBannersRelations, + incrementUserCartItemQuantity: () => incrementCartItemQuantity, + initDb: () => initDb, + insertUserCartItem: () => insertCartItem, + invalidateCoupon: () => invalidateCoupon, + isUserSuspended: () => isUserSuspended, + keyValStore: () => keyValStore, + markUserPaymentFailed: () => markPaymentFailed, + notifCreds: () => notifCreds, + notifCredsRelations: () => notifCredsRelations, + notifications: () => notifications, + notificationsRelations: () => notificationsRelations, + orderItems: () => orderItems, + orderItemsRelations: () => orderItemsRelations, + orderStatus: () => orderStatus, + orderStatusRelations: () => orderStatusRelations, + orders: () => orders, + ordersRelations: () => ordersRelations, + paymentInfoRelations: () => paymentInfoRelations, + paymentInfoTable: () => paymentInfoTable, + paymentStatusEnum: () => paymentStatusEnum, + payments: () => payments, + paymentsRelations: () => paymentsRelations, + placeUserOrderTransaction: () => placeOrderTransaction, + productCategories: () => productCategories, + productCategoriesRelations: () => productCategoriesRelations, + productGroupInfo: () => productGroupInfo, + productGroupInfoRelations: () => productGroupInfoRelations, + productGroupMembership: () => productGroupMembership, + productGroupMembershipRelations: () => productGroupMembershipRelations, + productInfo: () => productInfo, + productInfoRelations: () => productInfoRelations, + productReviews: () => productReviews, + productReviewsRelations: () => productReviewsRelations, + productSlots: () => productSlots, + productSlotsRelations: () => productSlotsRelations, + productTagInfo: () => productTagInfo, + productTagInfoRelations: () => productTagInfoRelations, + productTags: () => productTags, + productTagsRelations: () => productTagsRelations, + rebalanceSlots: () => rebalanceSlots, + recordUserCouponUsage: () => recordCouponUsage, + redeemUserReservedCoupon: () => redeemReservedCoupon, + refunds: () => refunds, + refundsRelations: () => refundsRelations, + removeDeliveryCharge: () => removeDeliveryCharge, + removeProductFromGroup: () => removeProductFromGroup, + replaceProductTags: () => replaceProductTags, + reservedCoupons: () => reservedCoupons, + reservedCouponsRelations: () => reservedCouponsRelations, + resolveComplaint: () => resolveComplaint, + respondToReview: () => respondToReview, + searchUsers: () => searchUsers, + seedKeyValStore: () => seedKeyValStore, + seedRolePermissions: () => seedRolePermissions, + seedStaffPermissions: () => seedStaffPermissions, + seedStaffRoles: () => seedStaffRoles, + seedUnits: () => seedUnits, + specialDeals: () => specialDeals, + specialDealsRelations: () => specialDealsRelations, + staffPermissionEnum: () => staffPermissionEnum, + staffPermissions: () => staffPermissions, + staffPermissionsRelations: () => staffPermissionsRelations, + staffRoleEnum: () => staffRoleEnum, + staffRolePermissions: () => staffRolePermissions, + staffRolePermissionsRelations: () => staffRolePermissionsRelations, + staffRoles: () => staffRoles, + staffRolesRelations: () => staffRolesRelations, + staffUsers: () => staffUsers, + staffUsersRelations: () => staffUsersRelations, + storeInfo: () => storeInfo, + storeInfoRelations: () => storeInfoRelations, + toggleFlashDeliveryForItems: () => toggleFlashDeliveryForItems, + toggleKeyVal: () => toggleKeyVal, + toggleProductOutOfStock: () => toggleProductOutOfStock, + units: () => units, + unitsRelations: () => unitsRelations, + unloggedUserTokens: () => unloggedUserTokens, + updateAddressCoords: () => updateAddressCoords, + updateBanner: () => updateBanner, + updateCouponWithRelations: () => updateCouponWithRelations, + updateOrderDelivered: () => updateOrderDelivered, + updateOrderItemPackaging: () => updateOrderItemPackaging, + updateOrderNotes: () => updateOrderNotes, + updateOrderPackaged: () => updateOrderPackaged, + updateProduct: () => updateProduct, + updateProductDeals: () => updateProductDeals, + updateProductGroup: () => updateProductGroup, + updateProductPrices: () => updateProductPrices, + updateProductTag: () => updateProductTag, + updateSlotCapacity: () => updateSlotCapacity, + updateSlotDeliverySequence: () => updateSlotDeliverySequence, + updateSlotProducts: () => updateSlotProducts, + updateSlotWithRelations: () => updateSlotWithRelations, + updateStore: () => updateStore, + updateUserAddress: () => updateUserAddress, + updateUserCartItemQuantity: () => updateCartItemQuantity, + updateUserOrderNotes: () => updateOrderNotes2, + updateUserOrderPaymentStatus: () => updateOrderPaymentStatus, + updateUserPaymentSuccess: () => updatePaymentSuccess, + updateUserProfile: () => updateUserProfile, + updateUserSuspensionStatus: () => updateUserSuspensionStatus, + updateVendorOrderItemPackaging: () => updateVendorOrderItemPackaging, + updateVendorSnippet: () => updateVendorSnippet, + uploadStatusEnum: () => uploadStatusEnum, + uploadUrlStatus: () => uploadUrlStatus, + upsertConstants: () => upsertConstants, + upsertUserAuthPassword: () => upsertUserPassword, + upsertUserNotifCred: () => upsertNotifCred, + upsertUserSuspension: () => upsertUserSuspension, + upsertUserUnloggedToken: () => upsertUnloggedToken, + userCreds: () => userCreds, + userCredsRelations: () => userCredsRelations, + userDetails: () => userDetails, + userDetailsRelations: () => userDetailsRelations, + userIncidents: () => userIncidents, + userIncidentsRelations: () => userIncidentsRelations, + userNotifications: () => userNotifications, + userNotificationsRelations: () => userNotificationsRelations, + users: () => users, + usersRelations: () => usersRelations, + validateAndGetUserCoupon: () => validateAndGetCoupon, + validateCoupon: () => validateCoupon, + vendorSnippets: () => vendorSnippets, + vendorSnippetsRelations: () => vendorSnippetsRelations +}); +async function getOrderDetailsWrapper(orderId) { + return getOrderDetails(orderId); +} +var init_dbService = __esm({ + "src/dbService.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sqliteImporter(); + init_sqliteImporter(); + __name(getOrderDetailsWrapper, "getOrderDetailsWrapper"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/buffer_utils.js +function concat(...buffers) { + const size = buffers.reduce((acc, { length }) => acc + length, 0); + const buf = new Uint8Array(size); + let i2 = 0; + for (const buffer of buffers) { + buf.set(buffer, i2); + i2 += buffer.length; + } + return buf; +} +function encode(string4) { + const bytes = new Uint8Array(string4.length); + for (let i2 = 0; i2 < string4.length; i2++) { + const code = string4.charCodeAt(i2); + if (code > 127) { + throw new TypeError("non-ASCII string encountered in encode()"); + } + bytes[i2] = code; + } + return bytes; +} +var encoder, decoder, MAX_INT32; +var init_buffer_utils = __esm({ + "../../node_modules/jose/dist/webapi/lib/buffer_utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + encoder = new TextEncoder(); + decoder = new TextDecoder(); + MAX_INT32 = 2 ** 32; + __name(concat, "concat"); + __name(encode, "encode"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/base64.js +function encodeBase64(input) { + if (Uint8Array.prototype.toBase64) { + return input.toBase64(); + } + const CHUNK_SIZE = 32768; + const arr = []; + for (let i2 = 0; i2 < input.length; i2 += CHUNK_SIZE) { + arr.push(String.fromCharCode.apply(null, input.subarray(i2, i2 + CHUNK_SIZE))); + } + return btoa(arr.join("")); +} +function decodeBase64(encoded) { + if (Uint8Array.fromBase64) { + return Uint8Array.fromBase64(encoded); + } + const binary = atob(encoded); + const bytes = new Uint8Array(binary.length); + for (let i2 = 0; i2 < binary.length; i2++) { + bytes[i2] = binary.charCodeAt(i2); + } + return bytes; +} +var init_base64 = __esm({ + "../../node_modules/jose/dist/webapi/lib/base64.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(encodeBase64, "encodeBase64"); + __name(decodeBase64, "decodeBase64"); + } +}); + +// ../../node_modules/jose/dist/webapi/util/base64url.js +function decode(input) { + if (Uint8Array.fromBase64) { + return Uint8Array.fromBase64(typeof input === "string" ? input : decoder.decode(input), { + alphabet: "base64url" + }); + } + let encoded = input; + if (encoded instanceof Uint8Array) { + encoded = decoder.decode(encoded); + } + encoded = encoded.replace(/-/g, "+").replace(/_/g, "/"); + try { + return decodeBase64(encoded); + } catch { + throw new TypeError("The input to be decoded is not correctly encoded."); + } +} +function encode2(input) { + let unencoded = input; + if (typeof unencoded === "string") { + unencoded = encoder.encode(unencoded); + } + if (Uint8Array.prototype.toBase64) { + return unencoded.toBase64({ alphabet: "base64url", omitPadding: true }); + } + return encodeBase64(unencoded).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); +} +var init_base64url = __esm({ + "../../node_modules/jose/dist/webapi/util/base64url.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_buffer_utils(); + init_base64(); + __name(decode, "decode"); + __name(encode2, "encode"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/crypto_key.js +function getHashLength(hash4) { + return parseInt(hash4.name.slice(4), 10); +} +function checkHashLength(algorithm, expected) { + const actual = getHashLength(algorithm.hash); + if (actual !== expected) + throw unusable(`SHA-${expected}`, "algorithm.hash"); +} +function getNamedCurve(alg) { + switch (alg) { + case "ES256": + return "P-256"; + case "ES384": + return "P-384"; + case "ES512": + return "P-521"; + default: + throw new Error("unreachable"); + } +} +function checkUsage(key, usage) { + if (usage && !key.usages.includes(usage)) { + throw new TypeError(`CryptoKey does not support this operation, its usages must include ${usage}.`); + } +} +function checkSigCryptoKey(key, alg, usage) { + switch (alg) { + case "HS256": + case "HS384": + case "HS512": { + if (!isAlgorithm(key.algorithm, "HMAC")) + throw unusable("HMAC"); + checkHashLength(key.algorithm, parseInt(alg.slice(2), 10)); + break; + } + case "RS256": + case "RS384": + case "RS512": { + if (!isAlgorithm(key.algorithm, "RSASSA-PKCS1-v1_5")) + throw unusable("RSASSA-PKCS1-v1_5"); + checkHashLength(key.algorithm, parseInt(alg.slice(2), 10)); + break; + } + case "PS256": + case "PS384": + case "PS512": { + if (!isAlgorithm(key.algorithm, "RSA-PSS")) + throw unusable("RSA-PSS"); + checkHashLength(key.algorithm, parseInt(alg.slice(2), 10)); + break; + } + case "Ed25519": + case "EdDSA": { + if (!isAlgorithm(key.algorithm, "Ed25519")) + throw unusable("Ed25519"); + break; + } + case "ML-DSA-44": + case "ML-DSA-65": + case "ML-DSA-87": { + if (!isAlgorithm(key.algorithm, alg)) + throw unusable(alg); + break; + } + case "ES256": + case "ES384": + case "ES512": { + if (!isAlgorithm(key.algorithm, "ECDSA")) + throw unusable("ECDSA"); + const expected = getNamedCurve(alg); + const actual = key.algorithm.namedCurve; + if (actual !== expected) + throw unusable(expected, "algorithm.namedCurve"); + break; + } + default: + throw new TypeError("CryptoKey does not support this operation"); + } + checkUsage(key, usage); +} +var unusable, isAlgorithm; +var init_crypto_key = __esm({ + "../../node_modules/jose/dist/webapi/lib/crypto_key.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + unusable = /* @__PURE__ */ __name((name, prop = "algorithm.name") => new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`), "unusable"); + isAlgorithm = /* @__PURE__ */ __name((algorithm, name) => algorithm.name === name, "isAlgorithm"); + __name(getHashLength, "getHashLength"); + __name(checkHashLength, "checkHashLength"); + __name(getNamedCurve, "getNamedCurve"); + __name(checkUsage, "checkUsage"); + __name(checkSigCryptoKey, "checkSigCryptoKey"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/invalid_key_input.js +function message(msg, actual, ...types) { + types = types.filter(Boolean); + 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 (actual == null) { + msg += ` Received ${actual}`; + } else if (typeof actual === "function" && actual.name) { + msg += ` Received function ${actual.name}`; + } else if (typeof actual === "object" && actual != null) { + if (actual.constructor?.name) { + msg += ` Received an instance of ${actual.constructor.name}`; + } + } + return msg; +} +var invalidKeyInput, withAlg; +var init_invalid_key_input = __esm({ + "../../node_modules/jose/dist/webapi/lib/invalid_key_input.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(message, "message"); + invalidKeyInput = /* @__PURE__ */ __name((actual, ...types) => message("Key must be ", actual, ...types), "invalidKeyInput"); + withAlg = /* @__PURE__ */ __name((alg, actual, ...types) => message(`Key for the ${alg} algorithm must be `, actual, ...types), "withAlg"); + } +}); + +// ../../node_modules/jose/dist/webapi/util/errors.js +var JOSEError, JWTClaimValidationFailed, JWTExpired, JOSEAlgNotAllowed, JOSENotSupported, JWSInvalid, JWTInvalid, JWKSMultipleMatchingKeys, JWSSignatureVerificationFailed; +var init_errors2 = __esm({ + "../../node_modules/jose/dist/webapi/util/errors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + JOSEError = class extends Error { + code = "ERR_JOSE_GENERIC"; + constructor(message2, options) { + super(message2, options); + this.name = this.constructor.name; + Error.captureStackTrace?.(this, this.constructor); + } + }; + __name(JOSEError, "JOSEError"); + __publicField(JOSEError, "code", "ERR_JOSE_GENERIC"); + JWTClaimValidationFailed = class extends JOSEError { + code = "ERR_JWT_CLAIM_VALIDATION_FAILED"; + claim; + reason; + payload; + constructor(message2, payload, claim = "unspecified", reason = "unspecified") { + super(message2, { cause: { claim, reason, payload } }); + this.claim = claim; + this.reason = reason; + this.payload = payload; + } + }; + __name(JWTClaimValidationFailed, "JWTClaimValidationFailed"); + __publicField(JWTClaimValidationFailed, "code", "ERR_JWT_CLAIM_VALIDATION_FAILED"); + JWTExpired = class extends JOSEError { + code = "ERR_JWT_EXPIRED"; + claim; + reason; + payload; + constructor(message2, payload, claim = "unspecified", reason = "unspecified") { + super(message2, { cause: { claim, reason, payload } }); + this.claim = claim; + this.reason = reason; + this.payload = payload; + } + }; + __name(JWTExpired, "JWTExpired"); + __publicField(JWTExpired, "code", "ERR_JWT_EXPIRED"); + JOSEAlgNotAllowed = class extends JOSEError { + code = "ERR_JOSE_ALG_NOT_ALLOWED"; + }; + __name(JOSEAlgNotAllowed, "JOSEAlgNotAllowed"); + __publicField(JOSEAlgNotAllowed, "code", "ERR_JOSE_ALG_NOT_ALLOWED"); + JOSENotSupported = class extends JOSEError { + code = "ERR_JOSE_NOT_SUPPORTED"; + }; + __name(JOSENotSupported, "JOSENotSupported"); + __publicField(JOSENotSupported, "code", "ERR_JOSE_NOT_SUPPORTED"); + JWSInvalid = class extends JOSEError { + code = "ERR_JWS_INVALID"; + }; + __name(JWSInvalid, "JWSInvalid"); + __publicField(JWSInvalid, "code", "ERR_JWS_INVALID"); + JWTInvalid = class extends JOSEError { + code = "ERR_JWT_INVALID"; + }; + __name(JWTInvalid, "JWTInvalid"); + __publicField(JWTInvalid, "code", "ERR_JWT_INVALID"); + JWKSMultipleMatchingKeys = class extends JOSEError { + [Symbol.asyncIterator]; + code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS"; + constructor(message2 = "multiple matching keys found in the JSON Web Key Set", options) { + super(message2, options); + } + }; + __name(JWKSMultipleMatchingKeys, "JWKSMultipleMatchingKeys"); + __publicField(JWKSMultipleMatchingKeys, "code", "ERR_JWKS_MULTIPLE_MATCHING_KEYS"); + JWSSignatureVerificationFailed = class extends JOSEError { + code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED"; + constructor(message2 = "signature verification failed", options) { + super(message2, options); + } + }; + __name(JWSSignatureVerificationFailed, "JWSSignatureVerificationFailed"); + __publicField(JWSSignatureVerificationFailed, "code", "ERR_JWS_SIGNATURE_VERIFICATION_FAILED"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/is_key_like.js +var isCryptoKey, isKeyObject, isKeyLike; +var init_is_key_like = __esm({ + "../../node_modules/jose/dist/webapi/lib/is_key_like.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isCryptoKey = /* @__PURE__ */ __name((key) => { + if (key?.[Symbol.toStringTag] === "CryptoKey") + return true; + try { + return key instanceof CryptoKey; + } catch { + return false; + } + }, "isCryptoKey"); + isKeyObject = /* @__PURE__ */ __name((key) => key?.[Symbol.toStringTag] === "KeyObject", "isKeyObject"); + isKeyLike = /* @__PURE__ */ __name((key) => isCryptoKey(key) || isKeyObject(key), "isKeyLike"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/helpers.js +function assertNotSet(value, name) { + if (value) { + throw new TypeError(`${name} can only be called once`); + } +} +function decodeBase64url(value, label, ErrorClass) { + try { + return decode(value); + } catch { + throw new ErrorClass(`Failed to base64url decode the ${label}`); + } +} +var unprotected; +var init_helpers = __esm({ + "../../node_modules/jose/dist/webapi/lib/helpers.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_base64url(); + unprotected = Symbol(); + __name(assertNotSet, "assertNotSet"); + __name(decodeBase64url, "decodeBase64url"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/type_checks.js +function isObject2(input) { + if (!isObjectLike(input) || Object.prototype.toString.call(input) !== "[object Object]") { + return false; + } + if (Object.getPrototypeOf(input) === null) { + return true; + } + let proto = input; + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto); + } + return Object.getPrototypeOf(input) === proto; +} +function isDisjoint(...headers) { + const sources = headers.filter(Boolean); + if (sources.length === 0 || sources.length === 1) { + return true; + } + let acc; + for (const header of sources) { + const parameters = Object.keys(header); + if (!acc || acc.size === 0) { + acc = new Set(parameters); + continue; + } + for (const parameter of parameters) { + if (acc.has(parameter)) { + return false; + } + acc.add(parameter); + } + } + return true; +} +var isObjectLike, isJWK, isPrivateJWK, isPublicJWK, isSecretJWK; +var init_type_checks = __esm({ + "../../node_modules/jose/dist/webapi/lib/type_checks.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isObjectLike = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null, "isObjectLike"); + __name(isObject2, "isObject"); + __name(isDisjoint, "isDisjoint"); + isJWK = /* @__PURE__ */ __name((key) => isObject2(key) && typeof key.kty === "string", "isJWK"); + isPrivateJWK = /* @__PURE__ */ __name((key) => key.kty !== "oct" && (key.kty === "AKP" && typeof key.priv === "string" || typeof key.d === "string"), "isPrivateJWK"); + isPublicJWK = /* @__PURE__ */ __name((key) => key.kty !== "oct" && key.d === void 0 && key.priv === void 0, "isPublicJWK"); + isSecretJWK = /* @__PURE__ */ __name((key) => key.kty === "oct" && typeof key.k === "string", "isSecretJWK"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/signing.js +function checkKeyLength(alg, key) { + if (alg.startsWith("RS") || alg.startsWith("PS")) { + const { modulusLength } = key.algorithm; + if (typeof modulusLength !== "number" || modulusLength < 2048) { + throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`); + } + } +} +function subtleAlgorithm(alg, algorithm) { + const hash4 = `SHA-${alg.slice(-3)}`; + switch (alg) { + case "HS256": + case "HS384": + case "HS512": + return { hash: hash4, name: "HMAC" }; + case "PS256": + case "PS384": + case "PS512": + return { hash: hash4, name: "RSA-PSS", saltLength: parseInt(alg.slice(-3), 10) >> 3 }; + case "RS256": + case "RS384": + case "RS512": + return { hash: hash4, name: "RSASSA-PKCS1-v1_5" }; + case "ES256": + case "ES384": + case "ES512": + return { hash: hash4, name: "ECDSA", namedCurve: algorithm.namedCurve }; + case "Ed25519": + case "EdDSA": + return { name: "Ed25519" }; + case "ML-DSA-44": + case "ML-DSA-65": + case "ML-DSA-87": + return { name: alg }; + default: + throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); + } +} +async function getSigKey(alg, key, usage) { + if (key instanceof Uint8Array) { + if (!alg.startsWith("HS")) { + throw new TypeError(invalidKeyInput(key, "CryptoKey", "KeyObject", "JSON Web Key")); + } + return crypto.subtle.importKey("raw", key, { hash: `SHA-${alg.slice(-3)}`, name: "HMAC" }, false, [usage]); + } + checkSigCryptoKey(key, alg, usage); + return key; +} +async function sign(alg, key, data) { + const cryptoKey = await getSigKey(alg, key, "sign"); + checkKeyLength(alg, cryptoKey); + const signature = await crypto.subtle.sign(subtleAlgorithm(alg, cryptoKey.algorithm), cryptoKey, data); + return new Uint8Array(signature); +} +async function verify(alg, key, signature, data) { + const cryptoKey = await getSigKey(alg, key, "verify"); + checkKeyLength(alg, cryptoKey); + const algorithm = subtleAlgorithm(alg, cryptoKey.algorithm); + try { + return await crypto.subtle.verify(algorithm, cryptoKey, signature, data); + } catch { + return false; + } +} +var init_signing = __esm({ + "../../node_modules/jose/dist/webapi/lib/signing.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_errors2(); + init_crypto_key(); + init_invalid_key_input(); + __name(checkKeyLength, "checkKeyLength"); + __name(subtleAlgorithm, "subtleAlgorithm"); + __name(getSigKey, "getSigKey"); + __name(sign, "sign"); + __name(verify, "verify"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/jwk_to_key.js +function subtleMapping(jwk) { + let algorithm; + let keyUsages; + switch (jwk.kty) { + case "AKP": { + switch (jwk.alg) { + case "ML-DSA-44": + case "ML-DSA-65": + case "ML-DSA-87": + algorithm = { name: jwk.alg }; + keyUsages = jwk.priv ? ["sign"] : ["verify"]; + break; + default: + throw new JOSENotSupported(unsupportedAlg); + } + break; + } + case "RSA": { + switch (jwk.alg) { + case "PS256": + case "PS384": + case "PS512": + algorithm = { name: "RSA-PSS", hash: `SHA-${jwk.alg.slice(-3)}` }; + keyUsages = jwk.d ? ["sign"] : ["verify"]; + break; + case "RS256": + case "RS384": + case "RS512": + algorithm = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${jwk.alg.slice(-3)}` }; + keyUsages = jwk.d ? ["sign"] : ["verify"]; + break; + case "RSA-OAEP": + case "RSA-OAEP-256": + case "RSA-OAEP-384": + case "RSA-OAEP-512": + algorithm = { + name: "RSA-OAEP", + hash: `SHA-${parseInt(jwk.alg.slice(-3), 10) || 1}` + }; + keyUsages = jwk.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"]; + break; + default: + throw new JOSENotSupported(unsupportedAlg); + } + break; + } + case "EC": { + switch (jwk.alg) { + case "ES256": + case "ES384": + case "ES512": + algorithm = { + name: "ECDSA", + namedCurve: { ES256: "P-256", ES384: "P-384", ES512: "P-521" }[jwk.alg] + }; + keyUsages = jwk.d ? ["sign"] : ["verify"]; + break; + case "ECDH-ES": + case "ECDH-ES+A128KW": + case "ECDH-ES+A192KW": + case "ECDH-ES+A256KW": + algorithm = { name: "ECDH", namedCurve: jwk.crv }; + keyUsages = jwk.d ? ["deriveBits"] : []; + break; + default: + throw new JOSENotSupported(unsupportedAlg); + } + break; + } + case "OKP": { + switch (jwk.alg) { + case "Ed25519": + case "EdDSA": + algorithm = { name: "Ed25519" }; + keyUsages = jwk.d ? ["sign"] : ["verify"]; + break; + case "ECDH-ES": + case "ECDH-ES+A128KW": + case "ECDH-ES+A192KW": + case "ECDH-ES+A256KW": + algorithm = { name: jwk.crv }; + keyUsages = jwk.d ? ["deriveBits"] : []; + break; + default: + throw new JOSENotSupported(unsupportedAlg); + } + break; + } + default: + throw new JOSENotSupported('Invalid or unsupported JWK "kty" (Key Type) Parameter value'); + } + return { algorithm, keyUsages }; +} +async function jwkToKey(jwk) { + if (!jwk.alg) { + throw new TypeError('"alg" argument is required when "jwk.alg" is not present'); + } + const { algorithm, keyUsages } = subtleMapping(jwk); + const keyData = { ...jwk }; + if (keyData.kty !== "AKP") { + delete keyData.alg; + } + delete keyData.use; + return crypto.subtle.importKey("jwk", keyData, algorithm, jwk.ext ?? (jwk.d || jwk.priv ? false : true), jwk.key_ops ?? keyUsages); +} +var unsupportedAlg; +var init_jwk_to_key = __esm({ + "../../node_modules/jose/dist/webapi/lib/jwk_to_key.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_errors2(); + unsupportedAlg = 'Invalid or unsupported JWK "alg" (Algorithm) Parameter value'; + __name(subtleMapping, "subtleMapping"); + __name(jwkToKey, "jwkToKey"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/normalize_key.js +async function normalizeKey(key, alg) { + if (key instanceof Uint8Array) { + return key; + } + if (isCryptoKey(key)) { + return key; + } + if (isKeyObject(key)) { + if (key.type === "secret") { + return key.export(); + } + if ("toCryptoKey" in key && typeof key.toCryptoKey === "function") { + try { + return handleKeyObject(key, alg); + } catch (err) { + if (err instanceof TypeError) { + throw err; + } + } + } + let jwk = key.export({ format: "jwk" }); + return handleJWK(key, jwk, alg); + } + if (isJWK(key)) { + if (key.k) { + return decode(key.k); + } + return handleJWK(key, key, alg, true); + } + throw new Error("unreachable"); +} +var unusableForAlg, cache, handleJWK, handleKeyObject; +var init_normalize_key = __esm({ + "../../node_modules/jose/dist/webapi/lib/normalize_key.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_type_checks(); + init_base64url(); + init_jwk_to_key(); + init_is_key_like(); + unusableForAlg = "given KeyObject instance cannot be used for this algorithm"; + handleJWK = /* @__PURE__ */ __name(async (key, jwk, alg, freeze = false) => { + cache ||= /* @__PURE__ */ new WeakMap(); + let cached2 = cache.get(key); + if (cached2?.[alg]) { + return cached2[alg]; + } + const cryptoKey = await jwkToKey({ ...jwk, alg }); + if (freeze) + Object.freeze(key); + if (!cached2) { + cache.set(key, { [alg]: cryptoKey }); + } else { + cached2[alg] = cryptoKey; + } + return cryptoKey; + }, "handleJWK"); + handleKeyObject = /* @__PURE__ */ __name((keyObject, alg) => { + cache ||= /* @__PURE__ */ new WeakMap(); + let cached2 = cache.get(keyObject); + if (cached2?.[alg]) { + return cached2[alg]; + } + const isPublic = keyObject.type === "public"; + const extractable = isPublic ? true : false; + let cryptoKey; + if (keyObject.asymmetricKeyType === "x25519") { + switch (alg) { + case "ECDH-ES": + case "ECDH-ES+A128KW": + case "ECDH-ES+A192KW": + case "ECDH-ES+A256KW": + break; + default: + throw new TypeError(unusableForAlg); + } + cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, isPublic ? [] : ["deriveBits"]); + } + if (keyObject.asymmetricKeyType === "ed25519") { + if (alg !== "EdDSA" && alg !== "Ed25519") { + throw new TypeError(unusableForAlg); + } + cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [ + isPublic ? "verify" : "sign" + ]); + } + switch (keyObject.asymmetricKeyType) { + case "ml-dsa-44": + case "ml-dsa-65": + case "ml-dsa-87": { + if (alg !== keyObject.asymmetricKeyType.toUpperCase()) { + throw new TypeError(unusableForAlg); + } + cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [ + isPublic ? "verify" : "sign" + ]); + } + } + if (keyObject.asymmetricKeyType === "rsa") { + let hash4; + switch (alg) { + case "RSA-OAEP": + hash4 = "SHA-1"; + break; + case "RS256": + case "PS256": + case "RSA-OAEP-256": + hash4 = "SHA-256"; + break; + case "RS384": + case "PS384": + case "RSA-OAEP-384": + hash4 = "SHA-384"; + break; + case "RS512": + case "PS512": + case "RSA-OAEP-512": + hash4 = "SHA-512"; + break; + default: + throw new TypeError(unusableForAlg); + } + if (alg.startsWith("RSA-OAEP")) { + return keyObject.toCryptoKey({ + name: "RSA-OAEP", + hash: hash4 + }, extractable, isPublic ? ["encrypt"] : ["decrypt"]); + } + cryptoKey = keyObject.toCryptoKey({ + name: alg.startsWith("PS") ? "RSA-PSS" : "RSASSA-PKCS1-v1_5", + hash: hash4 + }, extractable, [isPublic ? "verify" : "sign"]); + } + if (keyObject.asymmetricKeyType === "ec") { + const nist = /* @__PURE__ */ new Map([ + ["prime256v1", "P-256"], + ["secp384r1", "P-384"], + ["secp521r1", "P-521"] + ]); + const namedCurve = nist.get(keyObject.asymmetricKeyDetails?.namedCurve); + if (!namedCurve) { + throw new TypeError(unusableForAlg); + } + const expectedCurve = { ES256: "P-256", ES384: "P-384", ES512: "P-521" }; + if (expectedCurve[alg] && namedCurve === expectedCurve[alg]) { + cryptoKey = keyObject.toCryptoKey({ + name: "ECDSA", + namedCurve + }, extractable, [isPublic ? "verify" : "sign"]); + } + if (alg.startsWith("ECDH-ES")) { + cryptoKey = keyObject.toCryptoKey({ + name: "ECDH", + namedCurve + }, extractable, isPublic ? [] : ["deriveBits"]); + } + } + if (!cryptoKey) { + throw new TypeError(unusableForAlg); + } + if (!cached2) { + cache.set(keyObject, { [alg]: cryptoKey }); + } else { + cached2[alg] = cryptoKey; + } + return cryptoKey; + }, "handleKeyObject"); + __name(normalizeKey, "normalizeKey"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/validate_crit.js +function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) { + if (joseHeader.crit !== void 0 && protectedHeader?.crit === void 0) { + throw new Err('"crit" (Critical) Header Parameter MUST be integrity protected'); + } + if (!protectedHeader || protectedHeader.crit === void 0) { + return /* @__PURE__ */ new Set(); + } + if (!Array.isArray(protectedHeader.crit) || protectedHeader.crit.length === 0 || protectedHeader.crit.some((input) => typeof input !== "string" || input.length === 0)) { + throw new Err('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present'); + } + let recognized; + if (recognizedOption !== void 0) { + recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]); + } else { + recognized = recognizedDefault; + } + for (const parameter of protectedHeader.crit) { + if (!recognized.has(parameter)) { + throw new JOSENotSupported(`Extension Header Parameter "${parameter}" is not recognized`); + } + if (joseHeader[parameter] === void 0) { + throw new Err(`Extension Header Parameter "${parameter}" is missing`); + } + if (recognized.get(parameter) && protectedHeader[parameter] === void 0) { + throw new Err(`Extension Header Parameter "${parameter}" MUST be integrity protected`); + } + } + return new Set(protectedHeader.crit); +} +var init_validate_crit = __esm({ + "../../node_modules/jose/dist/webapi/lib/validate_crit.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_errors2(); + __name(validateCrit, "validateCrit"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/validate_algorithms.js +function validateAlgorithms(option, algorithms) { + if (algorithms !== void 0 && (!Array.isArray(algorithms) || algorithms.some((s2) => typeof s2 !== "string"))) { + throw new TypeError(`"${option}" option must be an array of strings`); + } + if (!algorithms) { + return void 0; + } + return new Set(algorithms); +} +var init_validate_algorithms = __esm({ + "../../node_modules/jose/dist/webapi/lib/validate_algorithms.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(validateAlgorithms, "validateAlgorithms"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/check_key_type.js +function checkKeyType(alg, key, usage) { + switch (alg.substring(0, 2)) { + case "A1": + case "A2": + case "di": + case "HS": + case "PB": + symmetricTypeCheck(alg, key, usage); + break; + default: + asymmetricTypeCheck(alg, key, usage); + } +} +var tag, jwkMatchesOp, symmetricTypeCheck, asymmetricTypeCheck; +var init_check_key_type = __esm({ + "../../node_modules/jose/dist/webapi/lib/check_key_type.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_invalid_key_input(); + init_is_key_like(); + init_type_checks(); + tag = /* @__PURE__ */ __name((key) => key?.[Symbol.toStringTag], "tag"); + jwkMatchesOp = /* @__PURE__ */ __name((alg, key, usage) => { + if (key.use !== void 0) { + let expected; + switch (usage) { + case "sign": + case "verify": + expected = "sig"; + break; + case "encrypt": + case "decrypt": + expected = "enc"; + break; + } + if (key.use !== expected) { + throw new TypeError(`Invalid key for this operation, its "use" must be "${expected}" when present`); + } + } + if (key.alg !== void 0 && key.alg !== alg) { + throw new TypeError(`Invalid key for this operation, its "alg" must be "${alg}" when present`); + } + if (Array.isArray(key.key_ops)) { + let expectedKeyOp; + switch (true) { + case (usage === "sign" || usage === "verify"): + case alg === "dir": + case alg.includes("CBC-HS"): + expectedKeyOp = usage; + break; + case alg.startsWith("PBES2"): + expectedKeyOp = "deriveBits"; + break; + case /^A\d{3}(?:GCM)?(?:KW)?$/.test(alg): + if (!alg.includes("GCM") && alg.endsWith("KW")) { + expectedKeyOp = usage === "encrypt" ? "wrapKey" : "unwrapKey"; + } else { + expectedKeyOp = usage; + } + break; + case (usage === "encrypt" && alg.startsWith("RSA")): + expectedKeyOp = "wrapKey"; + break; + case usage === "decrypt": + expectedKeyOp = alg.startsWith("RSA") ? "unwrapKey" : "deriveBits"; + break; + } + if (expectedKeyOp && key.key_ops?.includes?.(expectedKeyOp) === false) { + throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${expectedKeyOp}" when present`); + } + } + return true; + }, "jwkMatchesOp"); + symmetricTypeCheck = /* @__PURE__ */ __name((alg, key, usage) => { + if (key instanceof Uint8Array) + return; + if (isJWK(key)) { + if (isSecretJWK(key) && jwkMatchesOp(alg, key, usage)) + return; + throw new TypeError(`JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present`); + } + if (!isKeyLike(key)) { + throw new TypeError(withAlg(alg, key, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array")); + } + if (key.type !== "secret") { + throw new TypeError(`${tag(key)} instances for symmetric algorithms must be of type "secret"`); + } + }, "symmetricTypeCheck"); + asymmetricTypeCheck = /* @__PURE__ */ __name((alg, key, usage) => { + if (isJWK(key)) { + switch (usage) { + case "decrypt": + case "sign": + if (isPrivateJWK(key) && jwkMatchesOp(alg, key, usage)) + return; + throw new TypeError(`JSON Web Key for this operation must be a private JWK`); + case "encrypt": + case "verify": + if (isPublicJWK(key) && jwkMatchesOp(alg, key, usage)) + return; + throw new TypeError(`JSON Web Key for this operation must be a public JWK`); + } + } + if (!isKeyLike(key)) { + throw new TypeError(withAlg(alg, key, "CryptoKey", "KeyObject", "JSON Web Key")); + } + if (key.type === "secret") { + throw new TypeError(`${tag(key)} instances for asymmetric algorithms must not be of type "secret"`); + } + if (key.type === "public") { + switch (usage) { + case "sign": + throw new TypeError(`${tag(key)} instances for asymmetric algorithm signing must be of type "private"`); + case "decrypt": + throw new TypeError(`${tag(key)} instances for asymmetric algorithm decryption must be of type "private"`); + } + } + if (key.type === "private") { + switch (usage) { + case "verify": + throw new TypeError(`${tag(key)} instances for asymmetric algorithm verifying must be of type "public"`); + case "encrypt": + throw new TypeError(`${tag(key)} instances for asymmetric algorithm encryption must be of type "public"`); + } + } + }, "asymmetricTypeCheck"); + __name(checkKeyType, "checkKeyType"); + } +}); + +// ../../node_modules/jose/dist/webapi/jws/flattened/verify.js +async function flattenedVerify(jws, key, options) { + if (!isObject2(jws)) { + throw new JWSInvalid("Flattened JWS must be an object"); + } + if (jws.protected === void 0 && jws.header === void 0) { + throw new JWSInvalid('Flattened JWS must have either of the "protected" or "header" members'); + } + if (jws.protected !== void 0 && typeof jws.protected !== "string") { + throw new JWSInvalid("JWS Protected Header incorrect type"); + } + if (jws.payload === void 0) { + throw new JWSInvalid("JWS Payload missing"); + } + if (typeof jws.signature !== "string") { + throw new JWSInvalid("JWS Signature missing or incorrect type"); + } + if (jws.header !== void 0 && !isObject2(jws.header)) { + throw new JWSInvalid("JWS Unprotected Header incorrect type"); + } + let parsedProt = {}; + if (jws.protected) { + try { + const protectedHeader = decode(jws.protected); + parsedProt = JSON.parse(decoder.decode(protectedHeader)); + } catch { + throw new JWSInvalid("JWS Protected Header is invalid"); + } + } + if (!isDisjoint(parsedProt, jws.header)) { + throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint"); + } + const joseHeader = { + ...parsedProt, + ...jws.header + }; + const extensions = validateCrit(JWSInvalid, /* @__PURE__ */ new Map([["b64", true]]), options?.crit, parsedProt, joseHeader); + let b64 = true; + if (extensions.has("b64")) { + b64 = parsedProt.b64; + if (typeof b64 !== "boolean") { + throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean'); + } + } + const { alg } = joseHeader; + if (typeof alg !== "string" || !alg) { + throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid'); + } + const algorithms = options && validateAlgorithms("algorithms", options.algorithms); + if (algorithms && !algorithms.has(alg)) { + throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter value not allowed'); + } + if (b64) { + if (typeof jws.payload !== "string") { + throw new JWSInvalid("JWS Payload must be a string"); + } + } else if (typeof jws.payload !== "string" && !(jws.payload instanceof Uint8Array)) { + throw new JWSInvalid("JWS Payload must be a string or an Uint8Array instance"); + } + let resolvedKey = false; + if (typeof key === "function") { + key = await key(parsedProt, jws); + resolvedKey = true; + } + checkKeyType(alg, key, "verify"); + const data = concat(jws.protected !== void 0 ? encode(jws.protected) : new Uint8Array(), encode("."), typeof jws.payload === "string" ? b64 ? encode(jws.payload) : encoder.encode(jws.payload) : jws.payload); + const signature = decodeBase64url(jws.signature, "signature", JWSInvalid); + const k2 = await normalizeKey(key, alg); + const verified = await verify(alg, k2, signature, data); + if (!verified) { + throw new JWSSignatureVerificationFailed(); + } + let payload; + if (b64) { + payload = decodeBase64url(jws.payload, "payload", JWSInvalid); + } else if (typeof jws.payload === "string") { + payload = encoder.encode(jws.payload); + } else { + payload = jws.payload; + } + const result = { payload }; + if (jws.protected !== void 0) { + result.protectedHeader = parsedProt; + } + if (jws.header !== void 0) { + result.unprotectedHeader = jws.header; + } + if (resolvedKey) { + return { ...result, key: k2 }; + } + return result; +} +var init_verify = __esm({ + "../../node_modules/jose/dist/webapi/jws/flattened/verify.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_base64url(); + init_signing(); + init_errors2(); + init_buffer_utils(); + init_helpers(); + init_type_checks(); + init_type_checks(); + init_check_key_type(); + init_validate_crit(); + init_validate_algorithms(); + init_normalize_key(); + __name(flattenedVerify, "flattenedVerify"); + } +}); + +// ../../node_modules/jose/dist/webapi/jws/compact/verify.js +async function compactVerify(jws, key, options) { + if (jws instanceof Uint8Array) { + jws = decoder.decode(jws); + } + if (typeof jws !== "string") { + throw new JWSInvalid("Compact JWS must be a string or Uint8Array"); + } + const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split("."); + if (length !== 3) { + throw new JWSInvalid("Invalid Compact JWS"); + } + const verified = await flattenedVerify({ payload, protected: protectedHeader, signature }, key, options); + const result = { payload: verified.payload, protectedHeader: verified.protectedHeader }; + if (typeof key === "function") { + return { ...result, key: verified.key }; + } + return result; +} +var init_verify2 = __esm({ + "../../node_modules/jose/dist/webapi/jws/compact/verify.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_verify(); + init_errors2(); + init_buffer_utils(); + __name(compactVerify, "compactVerify"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/jwt_claims_set.js +function secs(str) { + const matched = REGEX.exec(str); + if (!matched || matched[4] && matched[1]) { + throw new TypeError("Invalid time period format"); + } + const value = parseFloat(matched[2]); + const unit = matched[3].toLowerCase(); + let numericDate; + switch (unit) { + case "sec": + case "secs": + case "second": + case "seconds": + case "s": + numericDate = Math.round(value); + break; + case "minute": + case "minutes": + case "min": + case "mins": + case "m": + numericDate = Math.round(value * minute); + break; + case "hour": + case "hours": + case "hr": + case "hrs": + case "h": + numericDate = Math.round(value * hour); + break; + case "day": + case "days": + case "d": + numericDate = Math.round(value * day); + break; + case "week": + case "weeks": + case "w": + numericDate = Math.round(value * week); + break; + default: + numericDate = Math.round(value * year); + break; + } + if (matched[1] === "-" || matched[4] === "ago") { + return -numericDate; + } + return numericDate; +} +function validateInput(label, input) { + if (!Number.isFinite(input)) { + throw new TypeError(`Invalid ${label} input`); + } + return input; +} +function validateClaimsSet(protectedHeader, encodedPayload, options = {}) { + let payload; + try { + payload = JSON.parse(decoder.decode(encodedPayload)); + } catch { + } + if (!isObject2(payload)) { + throw new JWTInvalid("JWT Claims Set must be a top-level JSON object"); + } + const { typ } = options; + if (typ && (typeof protectedHeader.typ !== "string" || normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) { + throw new JWTClaimValidationFailed('unexpected "typ" JWT header value', payload, "typ", "check_failed"); + } + const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options; + const presenceCheck = [...requiredClaims]; + if (maxTokenAge !== void 0) + presenceCheck.push("iat"); + if (audience !== void 0) + presenceCheck.push("aud"); + if (subject !== void 0) + presenceCheck.push("sub"); + if (issuer !== void 0) + presenceCheck.push("iss"); + for (const claim of new Set(presenceCheck.reverse())) { + if (!(claim in payload)) { + throw new JWTClaimValidationFailed(`missing required "${claim}" claim`, payload, claim, "missing"); + } + } + if (issuer && !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) { + throw new JWTClaimValidationFailed('unexpected "iss" claim value', payload, "iss", "check_failed"); + } + if (subject && payload.sub !== subject) { + throw new JWTClaimValidationFailed('unexpected "sub" claim value', payload, "sub", "check_failed"); + } + if (audience && !checkAudiencePresence(payload.aud, typeof audience === "string" ? [audience] : audience)) { + throw new JWTClaimValidationFailed('unexpected "aud" claim value', payload, "aud", "check_failed"); + } + let tolerance; + switch (typeof options.clockTolerance) { + case "string": + tolerance = secs(options.clockTolerance); + break; + case "number": + tolerance = options.clockTolerance; + break; + case "undefined": + tolerance = 0; + break; + default: + throw new TypeError("Invalid clockTolerance option type"); + } + const { currentDate } = options; + const now = epoch(currentDate || /* @__PURE__ */ new Date()); + if ((payload.iat !== void 0 || maxTokenAge) && typeof payload.iat !== "number") { + throw new JWTClaimValidationFailed('"iat" claim must be a number', payload, "iat", "invalid"); + } + if (payload.nbf !== void 0) { + if (typeof payload.nbf !== "number") { + throw new JWTClaimValidationFailed('"nbf" claim must be a number', payload, "nbf", "invalid"); + } + if (payload.nbf > now + tolerance) { + throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed', payload, "nbf", "check_failed"); + } + } + if (payload.exp !== void 0) { + if (typeof payload.exp !== "number") { + throw new JWTClaimValidationFailed('"exp" claim must be a number', payload, "exp", "invalid"); + } + if (payload.exp <= now - tolerance) { + throw new JWTExpired('"exp" claim timestamp check failed', payload, "exp", "check_failed"); + } + } + if (maxTokenAge) { + const age = now - payload.iat; + const max2 = typeof maxTokenAge === "number" ? maxTokenAge : secs(maxTokenAge); + if (age - tolerance > max2) { + throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)', payload, "iat", "check_failed"); + } + if (age < 0 - tolerance) { + throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)', payload, "iat", "check_failed"); + } + } + return payload; +} +var epoch, minute, hour, day, week, year, REGEX, normalizeTyp, checkAudiencePresence, JWTClaimsBuilder; +var init_jwt_claims_set = __esm({ + "../../node_modules/jose/dist/webapi/lib/jwt_claims_set.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_errors2(); + init_buffer_utils(); + init_type_checks(); + epoch = /* @__PURE__ */ __name((date6) => Math.floor(date6.getTime() / 1e3), "epoch"); + minute = 60; + hour = minute * 60; + day = hour * 24; + week = day * 7; + year = day * 365.25; + REGEX = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i; + __name(secs, "secs"); + __name(validateInput, "validateInput"); + normalizeTyp = /* @__PURE__ */ __name((value) => { + if (value.includes("/")) { + return value.toLowerCase(); + } + return `application/${value.toLowerCase()}`; + }, "normalizeTyp"); + checkAudiencePresence = /* @__PURE__ */ __name((audPayload, audOption) => { + if (typeof audPayload === "string") { + return audOption.includes(audPayload); + } + if (Array.isArray(audPayload)) { + return audOption.some(Set.prototype.has.bind(new Set(audPayload))); + } + return false; + }, "checkAudiencePresence"); + __name(validateClaimsSet, "validateClaimsSet"); + JWTClaimsBuilder = class { + #payload; + constructor(payload) { + if (!isObject2(payload)) { + throw new TypeError("JWT Claims Set MUST be an object"); + } + this.#payload = structuredClone(payload); + } + data() { + return encoder.encode(JSON.stringify(this.#payload)); + } + get iss() { + return this.#payload.iss; + } + set iss(value) { + this.#payload.iss = value; + } + get sub() { + return this.#payload.sub; + } + set sub(value) { + this.#payload.sub = value; + } + get aud() { + return this.#payload.aud; + } + set aud(value) { + this.#payload.aud = value; + } + set jti(value) { + this.#payload.jti = value; + } + set nbf(value) { + if (typeof value === "number") { + this.#payload.nbf = validateInput("setNotBefore", value); + } else if (value instanceof Date) { + this.#payload.nbf = validateInput("setNotBefore", epoch(value)); + } else { + this.#payload.nbf = epoch(/* @__PURE__ */ new Date()) + secs(value); + } + } + set exp(value) { + if (typeof value === "number") { + this.#payload.exp = validateInput("setExpirationTime", value); + } else if (value instanceof Date) { + this.#payload.exp = validateInput("setExpirationTime", epoch(value)); + } else { + this.#payload.exp = epoch(/* @__PURE__ */ new Date()) + secs(value); + } + } + set iat(value) { + if (value === void 0) { + this.#payload.iat = epoch(/* @__PURE__ */ new Date()); + } else if (value instanceof Date) { + this.#payload.iat = validateInput("setIssuedAt", epoch(value)); + } else if (typeof value === "string") { + this.#payload.iat = validateInput("setIssuedAt", epoch(/* @__PURE__ */ new Date()) + secs(value)); + } else { + this.#payload.iat = validateInput("setIssuedAt", value); + } + } + }; + __name(JWTClaimsBuilder, "JWTClaimsBuilder"); + } +}); + +// ../../node_modules/jose/dist/webapi/jwt/verify.js +async function jwtVerify(jwt2, key, options) { + const verified = await compactVerify(jwt2, key, options); + if (verified.protectedHeader.crit?.includes("b64") && verified.protectedHeader.b64 === false) { + throw new JWTInvalid("JWTs MUST NOT use unencoded payload"); + } + const payload = validateClaimsSet(verified.protectedHeader, verified.payload, options); + const result = { payload, protectedHeader: verified.protectedHeader }; + if (typeof key === "function") { + return { ...result, key: verified.key }; + } + return result; +} +var init_verify3 = __esm({ + "../../node_modules/jose/dist/webapi/jwt/verify.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_verify2(); + init_jwt_claims_set(); + init_errors2(); + __name(jwtVerify, "jwtVerify"); + } +}); + +// ../../node_modules/jose/dist/webapi/jws/flattened/sign.js +var FlattenedSign; +var init_sign = __esm({ + "../../node_modules/jose/dist/webapi/jws/flattened/sign.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_base64url(); + init_signing(); + init_type_checks(); + init_errors2(); + init_buffer_utils(); + init_check_key_type(); + init_validate_crit(); + init_normalize_key(); + init_helpers(); + FlattenedSign = class { + #payload; + #protectedHeader; + #unprotectedHeader; + constructor(payload) { + if (!(payload instanceof Uint8Array)) { + throw new TypeError("payload must be an instance of Uint8Array"); + } + this.#payload = payload; + } + setProtectedHeader(protectedHeader) { + assertNotSet(this.#protectedHeader, "setProtectedHeader"); + this.#protectedHeader = protectedHeader; + return this; + } + setUnprotectedHeader(unprotectedHeader) { + assertNotSet(this.#unprotectedHeader, "setUnprotectedHeader"); + this.#unprotectedHeader = unprotectedHeader; + return this; + } + async sign(key, options) { + if (!this.#protectedHeader && !this.#unprotectedHeader) { + throw new JWSInvalid("either setProtectedHeader or setUnprotectedHeader must be called before #sign()"); + } + if (!isDisjoint(this.#protectedHeader, this.#unprotectedHeader)) { + throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint"); + } + const joseHeader = { + ...this.#protectedHeader, + ...this.#unprotectedHeader + }; + const extensions = validateCrit(JWSInvalid, /* @__PURE__ */ new Map([["b64", true]]), options?.crit, this.#protectedHeader, joseHeader); + let b64 = true; + if (extensions.has("b64")) { + b64 = this.#protectedHeader.b64; + if (typeof b64 !== "boolean") { + throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean'); + } + } + const { alg } = joseHeader; + if (typeof alg !== "string" || !alg) { + throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid'); + } + checkKeyType(alg, key, "sign"); + let payloadS; + let payloadB; + if (b64) { + payloadS = encode2(this.#payload); + payloadB = encode(payloadS); + } else { + payloadB = this.#payload; + payloadS = ""; + } + let protectedHeaderString; + let protectedHeaderBytes; + if (this.#protectedHeader) { + protectedHeaderString = encode2(JSON.stringify(this.#protectedHeader)); + protectedHeaderBytes = encode(protectedHeaderString); + } else { + protectedHeaderString = ""; + protectedHeaderBytes = new Uint8Array(); + } + const data = concat(protectedHeaderBytes, encode("."), payloadB); + const k2 = await normalizeKey(key, alg); + const signature = await sign(alg, k2, data); + const jws = { + signature: encode2(signature), + payload: payloadS + }; + if (this.#unprotectedHeader) { + jws.header = this.#unprotectedHeader; + } + if (this.#protectedHeader) { + jws.protected = protectedHeaderString; + } + return jws; + } + }; + __name(FlattenedSign, "FlattenedSign"); + } +}); + +// ../../node_modules/jose/dist/webapi/jws/compact/sign.js +var CompactSign; +var init_sign2 = __esm({ + "../../node_modules/jose/dist/webapi/jws/compact/sign.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sign(); + CompactSign = class { + #flattened; + constructor(payload) { + this.#flattened = new FlattenedSign(payload); + } + setProtectedHeader(protectedHeader) { + this.#flattened.setProtectedHeader(protectedHeader); + return this; + } + async sign(key, options) { + const jws = await this.#flattened.sign(key, options); + if (jws.payload === void 0) { + throw new TypeError("use the flattened module for creating JWS with b64: false"); + } + return `${jws.protected}.${jws.payload}.${jws.signature}`; + } + }; + __name(CompactSign, "CompactSign"); + } +}); + +// ../../node_modules/jose/dist/webapi/jwt/sign.js +var SignJWT; +var init_sign3 = __esm({ + "../../node_modules/jose/dist/webapi/jwt/sign.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sign2(); + init_errors2(); + init_jwt_claims_set(); + SignJWT = class { + #protectedHeader; + #jwt; + constructor(payload = {}) { + this.#jwt = new JWTClaimsBuilder(payload); + } + setIssuer(issuer) { + this.#jwt.iss = issuer; + return this; + } + setSubject(subject) { + this.#jwt.sub = subject; + return this; + } + setAudience(audience) { + this.#jwt.aud = audience; + return this; + } + setJti(jwtId) { + this.#jwt.jti = jwtId; + return this; + } + setNotBefore(input) { + this.#jwt.nbf = input; + return this; + } + setExpirationTime(input) { + this.#jwt.exp = input; + return this; + } + setIssuedAt(input) { + this.#jwt.iat = input; + return this; + } + setProtectedHeader(protectedHeader) { + this.#protectedHeader = protectedHeader; + return this; + } + async sign(key, options) { + const sig = new CompactSign(this.#jwt.data()); + sig.setProtectedHeader(this.#protectedHeader); + if (Array.isArray(this.#protectedHeader?.crit) && this.#protectedHeader.crit.includes("b64") && this.#protectedHeader.b64 === false) { + throw new JWTInvalid("JWTs MUST NOT use unencoded payload"); + } + return sig.sign(key, options); + } + }; + __name(SignJWT, "SignJWT"); + } +}); + +// ../../node_modules/jose/dist/webapi/index.js +var init_webapi = __esm({ + "../../node_modules/jose/dist/webapi/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_verify3(); + init_sign3(); + } +}); + +// src/lib/api-error.ts +var ApiError; +var init_api_error = __esm({ + "src/lib/api-error.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ApiError = class extends Error { + statusCode; + details; + constructor(message2, statusCode = 500, details) { + console.log(message2); + super(message2); + this.name = "ApiError"; + this.statusCode = statusCode; + this.details = details; + } + }; + __name(ApiError, "ApiError"); + } +}); + +// src/lib/env-exporter.ts +var getRuntimeEnv, runtimeEnv, appUrl, jwtSecret, getEncodedJwtSecret, s3AccessKeyId, s3SecretAccessKey, s3BucketName, s3Region, assetsDomain, apiCacheKey, cloudflareApiToken, cloudflareZoneId, s3Url, redisUrl, expoAccessToken, phonePeBaseUrl, phonePeClientId, phonePeClientVersion, phonePeClientSecret, phonePeMerchantId, razorpayId, razorpaySecret, otpSenderAuthToken, minOrderValue, deliveryCharge, telegramBotToken, telegramChatIds, isDevMode; +var init_env_exporter = __esm({ + "src/lib/env-exporter.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getRuntimeEnv = /* @__PURE__ */ __name(() => globalThis.ENV || globalThis.process?.env || {}, "getRuntimeEnv"); + runtimeEnv = getRuntimeEnv(); + appUrl = runtimeEnv.APP_URL; + jwtSecret = runtimeEnv.JWT_SECRET; + getEncodedJwtSecret = /* @__PURE__ */ __name(() => { + const env2 = getRuntimeEnv(); + const secret = env2.JWT_SECRET || ""; + return new TextEncoder().encode(secret); + }, "getEncodedJwtSecret"); + s3AccessKeyId = runtimeEnv.S3_ACCESS_KEY_ID; + s3SecretAccessKey = runtimeEnv.S3_SECRET_ACCESS_KEY; + s3BucketName = runtimeEnv.S3_BUCKET_NAME; + s3Region = runtimeEnv.S3_REGION; + assetsDomain = runtimeEnv.ASSETS_DOMAIN; + apiCacheKey = runtimeEnv.API_CACHE_KEY; + cloudflareApiToken = runtimeEnv.CLOUDFLARE_API_TOKEN; + cloudflareZoneId = runtimeEnv.CLOUDFLARE_ZONE_ID; + s3Url = runtimeEnv.S3_URL; + redisUrl = runtimeEnv.REDIS_URL; + expoAccessToken = runtimeEnv.EXPO_ACCESS_TOKEN; + phonePeBaseUrl = runtimeEnv.PHONE_PE_BASE_URL; + phonePeClientId = runtimeEnv.PHONE_PE_CLIENT_ID; + phonePeClientVersion = Number(runtimeEnv.PHONE_PE_CLIENT_VERSION); + phonePeClientSecret = runtimeEnv.PHONE_PE_CLIENT_SECRET; + phonePeMerchantId = runtimeEnv.PHONE_PE_MERCHANT_ID; + razorpayId = runtimeEnv.RAZORPAY_KEY; + razorpaySecret = runtimeEnv.RAZORPAY_SECRET; + otpSenderAuthToken = runtimeEnv.OTP_SENDER_AUTH_TOKEN; + minOrderValue = Number(runtimeEnv.MIN_ORDER_VALUE); + deliveryCharge = Number(runtimeEnv.DELIVERY_CHARGE); + telegramBotToken = runtimeEnv.TELEGRAM_BOT_TOKEN; + telegramChatIds = runtimeEnv.TELEGRAM_CHAT_IDS?.split(",").map((id) => id.trim()) || []; + isDevMode = runtimeEnv.ENV_MODE === "dev"; + } +}); + +// src/middleware/staff-auth.ts +var verifyStaffToken, authenticateStaff; +var init_staff_auth = __esm({ + "src/middleware/staff-auth.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_webapi(); + init_dbService(); + init_api_error(); + init_env_exporter(); + verifyStaffToken = /* @__PURE__ */ __name(async (token) => { + try { + const { payload } = await jwtVerify(token, getEncodedJwtSecret()); + return payload; + } catch (error50) { + throw new ApiError("Access denied. Invalid auth credentials", 401); + } + }, "verifyStaffToken"); + authenticateStaff = /* @__PURE__ */ __name(async (c2, next) => { + try { + const authHeader = c2.req.header("authorization"); + if (!authHeader || !authHeader.startsWith("Bearer ")) { + throw new ApiError("Staff authentication required", 401); + } + const token = authHeader.split(" ")[1]; + if (!token) { + throw new ApiError("Staff authentication token missing", 401); + } + const decoded = await verifyStaffToken(token); + if (!decoded.staffId) { + throw new ApiError("Invalid staff token format", 401); + } + const staff = await getStaffUserById(decoded.staffId); + if (!staff) { + throw new ApiError("Staff user not found", 401); + } + c2.set("staffUser", { + id: staff.id, + name: staff.name + }); + await next(); + } catch (error50) { + throw error50; + } + }, "authenticateStaff"); + } +}); + +// src/apis/admin-apis/apis/av-router.ts +var router, avRouter, av_router_default; +var init_av_router = __esm({ + "src/apis/admin-apis/apis/av-router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_staff_auth(); + router = new Hono2(); + router.use("*", authenticateStaff); + avRouter = router; + av_router_default = avRouter; + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js +var getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig; +var init_httpExtensionConfiguration = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + setHttpHandler(handler) { + runtimeConfig.httpHandler = handler; + }, + httpHandler() { + return runtimeConfig.httpHandler; + }, + updateHttpClientConfig(key, value) { + runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); + }, + httpHandlerConfigs() { + return runtimeConfig.httpHandler.httpHandlerConfigs(); + } + }; + }, "getHttpHandlerExtensionConfiguration"); + resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => { + return { + httpHandler: httpHandlerExtensionConfiguration.httpHandler() + }; + }, "resolveHttpHandlerRuntimeConfig"); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/extensions/index.js +var init_extensions = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/extensions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpExtensionConfiguration(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/abort.js +var init_abort = __esm({ + "../../node_modules/@smithy/types/dist-es/abort.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/auth.js +var HttpAuthLocation; +var init_auth2 = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/auth.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(HttpAuthLocation2) { + HttpAuthLocation2["HEADER"] = "header"; + HttpAuthLocation2["QUERY"] = "query"; + })(HttpAuthLocation || (HttpAuthLocation = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js +var HttpApiKeyAuthLocation; +var init_HttpApiKeyAuth = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(HttpApiKeyAuthLocation2) { + HttpApiKeyAuthLocation2["HEADER"] = "header"; + HttpApiKeyAuthLocation2["QUERY"] = "query"; + })(HttpApiKeyAuthLocation || (HttpApiKeyAuthLocation = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js +var init_HttpAuthScheme = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js +var init_HttpAuthSchemeProvider = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/HttpSigner.js +var init_HttpSigner = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/HttpSigner.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js +var init_IdentityProviderConfig = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/index.js +var init_auth3 = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_auth2(); + init_HttpApiKeyAuth(); + init_HttpAuthScheme(); + init_HttpAuthSchemeProvider(); + init_HttpSigner(); + init_IdentityProviderConfig(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js +var init_blob_payload_input_types = __esm({ + "../../node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/checksum.js +var init_checksum = __esm({ + "../../node_modules/@smithy/types/dist-es/checksum.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/client.js +var init_client = __esm({ + "../../node_modules/@smithy/types/dist-es/client.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/command.js +var init_command = __esm({ + "../../node_modules/@smithy/types/dist-es/command.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/connection/config.js +var init_config = __esm({ + "../../node_modules/@smithy/types/dist-es/connection/config.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/connection/manager.js +var init_manager = __esm({ + "../../node_modules/@smithy/types/dist-es/connection/manager.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/connection/pool.js +var init_pool = __esm({ + "../../node_modules/@smithy/types/dist-es/connection/pool.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/connection/index.js +var init_connection = __esm({ + "../../node_modules/@smithy/types/dist-es/connection/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_config(); + init_manager(); + init_pool(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/crypto.js +var init_crypto = __esm({ + "../../node_modules/@smithy/types/dist-es/crypto.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/encode.js +var init_encode = __esm({ + "../../node_modules/@smithy/types/dist-es/encode.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoint.js +var EndpointURLScheme; +var init_endpoint = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoint.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(EndpointURLScheme2) { + EndpointURLScheme2["HTTP"] = "http"; + EndpointURLScheme2["HTTPS"] = "https"; + })(EndpointURLScheme || (EndpointURLScheme = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js +var init_EndpointRuleObject = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js +var init_ErrorRuleObject = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js +var init_RuleSetObject = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/shared.js +var init_shared = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/shared.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js +var init_TreeRuleObject = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/index.js +var init_endpoints = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EndpointRuleObject(); + init_ErrorRuleObject(); + init_RuleSetObject(); + init_shared(); + init_TreeRuleObject(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/eventStream.js +var init_eventStream = __esm({ + "../../node_modules/@smithy/types/dist-es/eventStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/extensions/checksum.js +var AlgorithmId; +var init_checksum2 = __esm({ + "../../node_modules/@smithy/types/dist-es/extensions/checksum.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(AlgorithmId2) { + AlgorithmId2["MD5"] = "md5"; + AlgorithmId2["CRC32"] = "crc32"; + AlgorithmId2["CRC32C"] = "crc32c"; + AlgorithmId2["SHA1"] = "sha1"; + AlgorithmId2["SHA256"] = "sha256"; + })(AlgorithmId || (AlgorithmId = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js +var init_defaultClientConfiguration = __esm({ + "../../node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js +var init_defaultExtensionConfiguration = __esm({ + "../../node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/extensions/index.js +var init_extensions2 = __esm({ + "../../node_modules/@smithy/types/dist-es/extensions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_defaultClientConfiguration(); + init_defaultExtensionConfiguration(); + init_checksum2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/feature-ids.js +var init_feature_ids = __esm({ + "../../node_modules/@smithy/types/dist-es/feature-ids.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/http.js +var FieldPosition; +var init_http = __esm({ + "../../node_modules/@smithy/types/dist-es/http.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(FieldPosition2) { + FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER"; + FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER"; + })(FieldPosition || (FieldPosition = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js +var init_httpHandlerInitialization = __esm({ + "../../node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js +var init_apiKeyIdentity = __esm({ + "../../node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js +var init_awsCredentialIdentity = __esm({ + "../../node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/identity/identity.js +var init_identity = __esm({ + "../../node_modules/@smithy/types/dist-es/identity/identity.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/identity/tokenIdentity.js +var init_tokenIdentity = __esm({ + "../../node_modules/@smithy/types/dist-es/identity/tokenIdentity.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/identity/index.js +var init_identity2 = __esm({ + "../../node_modules/@smithy/types/dist-es/identity/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_apiKeyIdentity(); + init_awsCredentialIdentity(); + init_identity(); + init_tokenIdentity(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/logger.js +var init_logger3 = __esm({ + "../../node_modules/@smithy/types/dist-es/logger.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/middleware.js +var SMITHY_CONTEXT_KEY; +var init_middleware = __esm({ + "../../node_modules/@smithy/types/dist-es/middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SMITHY_CONTEXT_KEY = "__smithy_context"; + } +}); + +// ../../node_modules/@smithy/types/dist-es/pagination.js +var init_pagination = __esm({ + "../../node_modules/@smithy/types/dist-es/pagination.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/profile.js +var IniSectionType; +var init_profile = __esm({ + "../../node_modules/@smithy/types/dist-es/profile.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(IniSectionType2) { + IniSectionType2["PROFILE"] = "profile"; + IniSectionType2["SSO_SESSION"] = "sso-session"; + IniSectionType2["SERVICES"] = "services"; + })(IniSectionType || (IniSectionType = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/response.js +var init_response = __esm({ + "../../node_modules/@smithy/types/dist-es/response.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/retry.js +var init_retry = __esm({ + "../../node_modules/@smithy/types/dist-es/retry.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/schema/schema.js +var init_schema2 = __esm({ + "../../node_modules/@smithy/types/dist-es/schema/schema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/schema/traits.js +var init_traits = __esm({ + "../../node_modules/@smithy/types/dist-es/schema/traits.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/schema/schema-deprecated.js +var init_schema_deprecated = __esm({ + "../../node_modules/@smithy/types/dist-es/schema/schema-deprecated.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/schema/sentinels.js +var init_sentinels = __esm({ + "../../node_modules/@smithy/types/dist-es/schema/sentinels.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/schema/static-schemas.js +var init_static_schemas = __esm({ + "../../node_modules/@smithy/types/dist-es/schema/static-schemas.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/serde.js +var init_serde = __esm({ + "../../node_modules/@smithy/types/dist-es/serde.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/shapes.js +var init_shapes = __esm({ + "../../node_modules/@smithy/types/dist-es/shapes.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/signature.js +var init_signature = __esm({ + "../../node_modules/@smithy/types/dist-es/signature.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/stream.js +var init_stream = __esm({ + "../../node_modules/@smithy/types/dist-es/stream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js +var init_streaming_blob_common_types = __esm({ + "../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js +var init_streaming_blob_payload_input_types = __esm({ + "../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js +var init_streaming_blob_payload_output_types = __esm({ + "../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/transfer.js +var RequestHandlerProtocol; +var init_transfer = __esm({ + "../../node_modules/@smithy/types/dist-es/transfer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(RequestHandlerProtocol2) { + RequestHandlerProtocol2["HTTP_0_9"] = "http/0.9"; + RequestHandlerProtocol2["HTTP_1_0"] = "http/1.0"; + RequestHandlerProtocol2["TDS_8_0"] = "tds/8.0"; + })(RequestHandlerProtocol || (RequestHandlerProtocol = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js +var init_client_payload_blob_type_narrow = __esm({ + "../../node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/transform/mutable.js +var init_mutable = __esm({ + "../../node_modules/@smithy/types/dist-es/transform/mutable.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/transform/no-undefined.js +var init_no_undefined = __esm({ + "../../node_modules/@smithy/types/dist-es/transform/no-undefined.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/transform/type-transform.js +var init_type_transform = __esm({ + "../../node_modules/@smithy/types/dist-es/transform/type-transform.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/uri.js +var init_uri = __esm({ + "../../node_modules/@smithy/types/dist-es/uri.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/util.js +var init_util = __esm({ + "../../node_modules/@smithy/types/dist-es/util.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/waiter.js +var init_waiter = __esm({ + "../../node_modules/@smithy/types/dist-es/waiter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/index.js +var init_dist_es = __esm({ + "../../node_modules/@smithy/types/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_abort(); + init_auth3(); + init_blob_payload_input_types(); + init_checksum(); + init_client(); + init_command(); + init_connection(); + init_crypto(); + init_encode(); + init_endpoint(); + init_endpoints(); + init_eventStream(); + init_extensions2(); + init_feature_ids(); + init_http(); + init_httpHandlerInitialization(); + init_identity2(); + init_logger3(); + init_middleware(); + init_pagination(); + init_profile(); + init_response(); + init_retry(); + init_schema2(); + init_traits(); + init_schema_deprecated(); + init_sentinels(); + init_static_schemas(); + init_serde(); + init_shapes(); + init_signature(); + init_stream(); + init_streaming_blob_common_types(); + init_streaming_blob_payload_input_types(); + init_streaming_blob_payload_output_types(); + init_transfer(); + init_client_payload_blob_type_narrow(); + init_mutable(); + init_no_undefined(); + init_type_transform(); + init_uri(); + init_util(); + init_waiter(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/Field.js +var init_Field = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/Field.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/Fields.js +var init_Fields = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/Fields.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/httpHandler.js +var init_httpHandler = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/httpHandler.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/httpRequest.js +function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; + }, {}); +} +var HttpRequest; +var init_httpRequest = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/httpRequest.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + HttpRequest = class { + method; + protocol; + hostname; + port; + path; + query; + headers; + username; + password; + fragment; + body; + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; + this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; + } + static clone(request) { + const cloned = new HttpRequest({ + ...request, + headers: { ...request.headers } + }); + if (cloned.query) { + cloned.query = cloneQuery(cloned.query); + } + return cloned; + } + static isInstance(request) { + if (!request) { + return false; + } + const req = request; + return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; + } + clone() { + return HttpRequest.clone(this); + } + }; + __name(HttpRequest, "HttpRequest"); + __name(cloneQuery, "cloneQuery"); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/httpResponse.js +var HttpResponse; +var init_httpResponse = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/httpResponse.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + HttpResponse = class { + statusCode; + reason; + headers; + body; + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; + } + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + } + }; + __name(HttpResponse, "HttpResponse"); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/isValidHostname.js +var init_isValidHostname = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/isValidHostname.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/types.js +var init_types = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/index.js +var init_dist_es2 = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_extensions(); + init_Field(); + init_Fields(); + init_httpHandler(); + init_httpRequest(); + init_httpResponse(); + init_isValidHostname(); + init_types(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-expect-continue/dist-es/index.js +function addExpectContinueMiddleware(options) { + return (next) => async (args) => { + const { request } = args; + if (options.expectContinueHeader !== false && HttpRequest.isInstance(request) && request.body && options.runtime === "node" && options.requestHandler?.constructor?.name !== "FetchHttpHandler") { + let sendHeader = true; + if (typeof options.expectContinueHeader === "number") { + try { + const bodyLength = Number(request.headers?.["content-length"]) ?? options.bodyLengthChecker?.(request.body) ?? Infinity; + sendHeader = bodyLength >= options.expectContinueHeader; + } catch (e2) { + } + } else { + sendHeader = !!options.expectContinueHeader; + } + if (sendHeader) { + request.headers.Expect = "100-continue"; + } + } + return next({ + ...args, + request + }); + }; +} +var addExpectContinueMiddlewareOptions, getAddExpectContinuePlugin; +var init_dist_es3 = __esm({ + "../../node_modules/@aws-sdk/middleware-expect-continue/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + __name(addExpectContinueMiddleware, "addExpectContinueMiddleware"); + addExpectContinueMiddlewareOptions = { + step: "build", + tags: ["SET_EXPECT_HEADER", "EXPECT_HEADER"], + name: "addExpectContinueMiddleware", + override: true + }; + getAddExpectContinuePlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(addExpectContinueMiddleware(options), addExpectContinueMiddlewareOptions); + } + }), "getAddExpectContinuePlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/constants.js +var RequestChecksumCalculation, DEFAULT_REQUEST_CHECKSUM_CALCULATION, ResponseChecksumValidation, DEFAULT_RESPONSE_CHECKSUM_VALIDATION, ChecksumAlgorithm, ChecksumLocation, DEFAULT_CHECKSUM_ALGORITHM; +var init_constants3 = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + RequestChecksumCalculation = { + WHEN_SUPPORTED: "WHEN_SUPPORTED", + WHEN_REQUIRED: "WHEN_REQUIRED" + }; + DEFAULT_REQUEST_CHECKSUM_CALCULATION = RequestChecksumCalculation.WHEN_SUPPORTED; + ResponseChecksumValidation = { + WHEN_SUPPORTED: "WHEN_SUPPORTED", + WHEN_REQUIRED: "WHEN_REQUIRED" + }; + DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.WHEN_SUPPORTED; + (function(ChecksumAlgorithm2) { + ChecksumAlgorithm2["MD5"] = "MD5"; + ChecksumAlgorithm2["CRC32"] = "CRC32"; + ChecksumAlgorithm2["CRC32C"] = "CRC32C"; + ChecksumAlgorithm2["CRC64NVME"] = "CRC64NVME"; + ChecksumAlgorithm2["SHA1"] = "SHA1"; + ChecksumAlgorithm2["SHA256"] = "SHA256"; + })(ChecksumAlgorithm || (ChecksumAlgorithm = {})); + (function(ChecksumLocation2) { + ChecksumLocation2["HEADER"] = "header"; + ChecksumLocation2["TRAILER"] = "trailer"; + })(ChecksumLocation || (ChecksumLocation = {})); + DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.CRC32; + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS.js +var init_NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS.js +var init_NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js +var init_emitWarningIfUnsupportedVersion = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js +function setCredentialFeature(credentials, feature2, value) { + if (!credentials.$source) { + credentials.$source = {}; + } + credentials.$source[feature2] = value; + return credentials; +} +var init_setCredentialFeature = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(setCredentialFeature, "setCredentialFeature"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js +function setFeature(context2, feature2, value) { + if (!context2.__aws_sdk_context) { + context2.__aws_sdk_context = { + features: {} + }; + } else if (!context2.__aws_sdk_context.features) { + context2.__aws_sdk_context.features = {}; + } + context2.__aws_sdk_context.features[feature2] = value; +} +var init_setFeature = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(setFeature, "setFeature"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js +var init_setTokenFeature = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +var init_client2 = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/client/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_emitWarningIfUnsupportedVersion(); + init_setCredentialFeature(); + init_setFeature(); + init_setTokenFeature(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js +var getDateHeader; +var init_getDateHeader = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + getDateHeader = /* @__PURE__ */ __name((response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0, "getDateHeader"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js +var getSkewCorrectedDate; +var init_getSkewCorrectedDate = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getSkewCorrectedDate = /* @__PURE__ */ __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), "getSkewCorrectedDate"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js +var isClockSkewed; +var init_isClockSkewed = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getSkewCorrectedDate(); + isClockSkewed = /* @__PURE__ */ __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5, "isClockSkewed"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +var getUpdatedSystemClockOffset; +var init_getUpdatedSystemClockOffset = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_isClockSkewed(); + getUpdatedSystemClockOffset = /* @__PURE__ */ __name((clockTime, currentSystemClockOffset) => { + const clockTimeInMs = Date.parse(clockTime); + if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { + return clockTimeInMs - Date.now(); + } + return currentSystemClockOffset; + }, "getUpdatedSystemClockOffset"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js +var init_utils4 = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getDateHeader(); + init_getSkewCorrectedDate(); + init_getUpdatedSystemClockOffset(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +var throwSigningPropertyError, validateSigningProperties, AwsSdkSigV4Signer; +var init_AwsSdkSigV4Signer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_utils4(); + throwSigningPropertyError = /* @__PURE__ */ __name((name, property) => { + if (!property) { + throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); + } + return property; + }, "throwSigningPropertyError"); + validateSigningProperties = /* @__PURE__ */ __name(async (signingProperties) => { + const context2 = throwSigningPropertyError("context", signingProperties.context); + const config3 = throwSigningPropertyError("config", signingProperties.config); + const authScheme = context2.endpointV2?.properties?.authSchemes?.[0]; + const signerFunction = throwSigningPropertyError("signer", config3.signer); + const signer = await signerFunction(authScheme); + const signingRegion = signingProperties?.signingRegion; + const signingRegionSet = signingProperties?.signingRegionSet; + const signingName = signingProperties?.signingName; + return { + config: config3, + signer, + signingRegion, + signingRegionSet, + signingName + }; + }, "validateSigningProperties"); + AwsSdkSigV4Signer = class { + async sign(httpRequest, identity2, signingProperties) { + if (!HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const validatedProps = await validateSigningProperties(signingProperties); + const { config: config3, signer } = validatedProps; + let { signingRegion, signingName } = validatedProps; + const handlerExecutionContext = signingProperties.context; + if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) { + const [first, second] = handlerExecutionContext.authSchemes; + if (first?.name === "sigv4a" && second?.name === "sigv4") { + signingRegion = second?.signingRegion ?? signingRegion; + signingName = second?.signingName ?? signingName; + } + } + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config3.systemClockOffset), + signingRegion, + signingService: signingName + }); + return signedRequest; + } + errorHandler(signingProperties) { + return (error50) => { + const serverTime = error50.ServerTime ?? getDateHeader(error50.$response); + if (serverTime) { + const config3 = throwSigningPropertyError("config", signingProperties.config); + const initialSystemClockOffset = config3.systemClockOffset; + config3.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config3.systemClockOffset); + const clockSkewCorrected = config3.systemClockOffset !== initialSystemClockOffset; + if (clockSkewCorrected && error50.$metadata) { + error50.$metadata.clockSkewCorrected = true; + } + } + throw error50; + }; + } + successHandler(httpResponse, signingProperties) { + const dateHeader = getDateHeader(httpResponse); + if (dateHeader) { + const config3 = throwSigningPropertyError("config", signingProperties.config); + config3.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config3.systemClockOffset); + } + } + }; + __name(AwsSdkSigV4Signer, "AwsSdkSigV4Signer"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js +var AwsSdkSigV4ASigner; +var init_AwsSdkSigV4ASigner = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_utils4(); + init_AwsSdkSigV4Signer(); + AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer { + async sign(httpRequest, identity2, signingProperties) { + if (!HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const { config: config3, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties); + const configResolvedSigningRegionSet = await config3.sigv4aSigningRegionSet?.(); + const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(","); + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config3.systemClockOffset), + signingRegion: multiRegionOverride, + signingService: signingName + }); + return signedRequest; + } + }; + __name(AwsSdkSigV4ASigner, "AwsSdkSigV4ASigner"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js +var init_getBearerTokenEnvKey = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +var init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/getSmithyContext.js +var init_getSmithyContext = __esm({ + "../../node_modules/@smithy/core/dist-es/getSmithyContext.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js +var getSmithyContext; +var init_getSmithyContext2 = __esm({ + "../../node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es(); + getSmithyContext = /* @__PURE__ */ __name((context2) => context2[SMITHY_CONTEXT_KEY] || (context2[SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); + } +}); + +// ../../node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js +var normalizeProvider; +var init_normalizeProvider = __esm({ + "../../node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + normalizeProvider = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }, "normalizeProvider"); + } +}); + +// ../../node_modules/@smithy/util-middleware/dist-es/index.js +var init_dist_es4 = __esm({ + "../../node_modules/@smithy/util-middleware/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getSmithyContext2(); + init_normalizeProvider(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js +var resolveAuthOptions; +var init_resolveAuthOptions = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + resolveAuthOptions = /* @__PURE__ */ __name((candidateAuthOptions, authSchemePreference) => { + if (!authSchemePreference || authSchemePreference.length === 0) { + return candidateAuthOptions; + } + const preferredAuthOptions = []; + for (const preferredSchemeName of authSchemePreference) { + for (const candidateAuthOption of candidateAuthOptions) { + const candidateAuthSchemeName = candidateAuthOption.schemeId.split("#")[1]; + if (candidateAuthSchemeName === preferredSchemeName) { + preferredAuthOptions.push(candidateAuthOption); + } + } + } + for (const candidateAuthOption of candidateAuthOptions) { + if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) { + preferredAuthOptions.push(candidateAuthOption); + } + } + return preferredAuthOptions; + }, "resolveAuthOptions"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +function convertHttpAuthSchemesToMap(httpAuthSchemes) { + const map2 = /* @__PURE__ */ new Map(); + for (const scheme of httpAuthSchemes) { + map2.set(scheme.schemeId, scheme); + } + return map2; +} +var httpAuthSchemeMiddleware; +var init_httpAuthSchemeMiddleware = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es4(); + init_resolveAuthOptions(); + __name(convertHttpAuthSchemesToMap, "convertHttpAuthSchemesToMap"); + httpAuthSchemeMiddleware = /* @__PURE__ */ __name((config3, mwOptions) => (next, context2) => async (args) => { + const options = config3.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config3, context2, args.input)); + const authSchemePreference = config3.authSchemePreference ? await config3.authSchemePreference() : []; + const resolvedOptions = resolveAuthOptions(options, authSchemePreference); + const authSchemes = convertHttpAuthSchemesToMap(config3.httpAuthSchemes); + const smithyContext = getSmithyContext(context2); + const failureReasons = []; + for (const option of resolvedOptions) { + const scheme = authSchemes.get(option.schemeId); + if (!scheme) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`); + continue; + } + const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config3)); + if (!identityProvider) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); + continue; + } + const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config3, context2) || {}; + option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties); + option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties); + smithyContext.selectedHttpAuthScheme = { + httpAuthOption: option, + identity: await identityProvider(option.identityProperties), + signer: scheme.signer + }; + break; + } + if (!smithyContext.selectedHttpAuthScheme) { + throw new Error(failureReasons.join("\n")); + } + return next(args); + }, "httpAuthSchemeMiddleware"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +var httpAuthSchemeEndpointRuleSetMiddlewareOptions, getHttpAuthSchemeEndpointRuleSetPlugin; +var init_getHttpAuthSchemeEndpointRuleSetPlugin = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpAuthSchemeMiddleware(); + httpAuthSchemeEndpointRuleSetMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: "endpointV2Middleware" + }; + getHttpAuthSchemeEndpointRuleSetPlugin = /* @__PURE__ */ __name((config3, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config3, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), httpAuthSchemeEndpointRuleSetMiddlewareOptions); + } + }), "getHttpAuthSchemeEndpointRuleSetPlugin"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +var init_getHttpAuthSchemePlugin = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js +var init_middleware_http_auth_scheme = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpAuthSchemeMiddleware(); + init_getHttpAuthSchemeEndpointRuleSetPlugin(); + init_getHttpAuthSchemePlugin(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js +var defaultErrorHandler, defaultSuccessHandler, httpSigningMiddleware; +var init_httpSigningMiddleware = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es4(); + defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error50) => { + throw error50; + }, "defaultErrorHandler"); + defaultSuccessHandler = /* @__PURE__ */ __name((httpResponse, signingProperties) => { + }, "defaultSuccessHandler"); + httpSigningMiddleware = /* @__PURE__ */ __name((config3) => (next, context2) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + const smithyContext = getSmithyContext(context2); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + } + const { httpAuthOption: { signingProperties = {} }, identity: identity2, signer } = scheme; + const output = await next({ + ...args, + request: await signer.sign(args.request, identity2, signingProperties) + }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); + (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); + return output; + }, "httpSigningMiddleware"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js +var httpSigningMiddlewareOptions, getHttpSigningPlugin; +var init_getHttpSigningMiddleware = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpSigningMiddleware(); + httpSigningMiddlewareOptions = { + step: "finalizeRequest", + tags: ["HTTP_SIGNING"], + name: "httpSigningMiddleware", + aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], + override: true, + relation: "after", + toMiddleware: "retryMiddleware" + }; + getHttpSigningPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpSigningMiddleware(config3), httpSigningMiddlewareOptions); + } + }), "getHttpSigningPlugin"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-signing/index.js +var init_middleware_http_signing = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-signing/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpSigningMiddleware(); + init_getHttpSigningMiddleware(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/normalizeProvider.js +var normalizeProvider2; +var init_normalizeProvider2 = __esm({ + "../../node_modules/@smithy/core/dist-es/normalizeProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + normalizeProvider2 = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }, "normalizeProvider"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/pagination/createPaginator.js +function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { + return /* @__PURE__ */ __name(async function* paginateOperation(config3, input, ...additionalArguments) { + const _input = input; + let token = config3.startingToken ?? _input[inputTokenName]; + let hasNext = true; + let page; + while (hasNext) { + _input[inputTokenName] = token; + if (pageSizeTokenName) { + _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config3.pageSize; + } + if (config3.client instanceof ClientCtor) { + page = await makePagedClientRequest(CommandCtor, config3.client, input, config3.withCommand, ...additionalArguments); + } else { + throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`); + } + yield page; + const prevToken = token; + token = get(page, outputTokenName); + hasNext = !!(token && (!config3.stopOnSameToken || token !== prevToken)); + } + return void 0; + }, "paginateOperation"); +} +var makePagedClientRequest, get; +var init_createPaginator = __esm({ + "../../node_modules/@smithy/core/dist-es/pagination/createPaginator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + makePagedClientRequest = /* @__PURE__ */ __name(async (CommandCtor, client, input, withCommand = (_) => _, ...args) => { + let command = new CommandCtor(input); + command = withCommand(command) ?? command; + return await client.send(command, ...args); + }, "makePagedClientRequest"); + __name(createPaginator, "createPaginator"); + get = /* @__PURE__ */ __name((fromObject, path) => { + let cursor = fromObject; + const pathComponents = path.split("."); + for (const step of pathComponents) { + if (!cursor || typeof cursor !== "object") { + return void 0; + } + cursor = cursor[step]; + } + return cursor; + }, "get"); + } +}); + +// ../../node_modules/@smithy/util-base64/dist-es/constants.browser.js +var chars, alphabetByEncoding, alphabetByValue, bitsPerLetter, bitsPerByte, maxLetterValue; +var init_constants_browser = __esm({ + "../../node_modules/@smithy/util-base64/dist-es/constants.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`; + alphabetByEncoding = Object.entries(chars).reduce((acc, [i2, c2]) => { + acc[c2] = Number(i2); + return acc; + }, {}); + alphabetByValue = chars.split(""); + bitsPerLetter = 6; + bitsPerByte = 8; + maxLetterValue = 63; + } +}); + +// ../../node_modules/@smithy/util-base64/dist-es/fromBase64.browser.js +var fromBase64; +var init_fromBase64_browser = __esm({ + "../../node_modules/@smithy/util-base64/dist-es/fromBase64.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants_browser(); + fromBase64 = /* @__PURE__ */ __name((input) => { + let totalByteLength = input.length / 4 * 3; + if (input.slice(-2) === "==") { + totalByteLength -= 2; + } else if (input.slice(-1) === "=") { + totalByteLength--; + } + const out = new ArrayBuffer(totalByteLength); + const dataView = new DataView(out); + for (let i2 = 0; i2 < input.length; i2 += 4) { + let bits = 0; + let bitLength = 0; + for (let j2 = i2, limit = i2 + 3; j2 <= limit; j2++) { + if (input[j2] !== "=") { + if (!(input[j2] in alphabetByEncoding)) { + throw new TypeError(`Invalid character ${input[j2]} in base64 string.`); + } + bits |= alphabetByEncoding[input[j2]] << (limit - j2) * bitsPerLetter; + bitLength += bitsPerLetter; + } else { + bits >>= bitsPerLetter; + } + } + const chunkOffset = i2 / 4 * 3; + bits >>= bitLength % bitsPerByte; + const byteLength = Math.floor(bitLength / bitsPerByte); + for (let k2 = 0; k2 < byteLength; k2++) { + const offset = (byteLength - k2 - 1) * bitsPerByte; + dataView.setUint8(chunkOffset + k2, (bits & 255 << offset) >> offset); + } + } + return new Uint8Array(out); + }, "fromBase64"); + } +}); + +// ../../node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js +var fromUtf8; +var init_fromUtf8_browser = __esm({ + "../../node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fromUtf8 = /* @__PURE__ */ __name((input) => new TextEncoder().encode(input), "fromUtf8"); + } +}); + +// ../../node_modules/@smithy/util-utf8/dist-es/toUint8Array.js +var toUint8Array; +var init_toUint8Array = __esm({ + "../../node_modules/@smithy/util-utf8/dist-es/toUint8Array.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser(); + toUint8Array = /* @__PURE__ */ __name((data) => { + if (typeof data === "string") { + return fromUtf8(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); + }, "toUint8Array"); + } +}); + +// ../../node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +var toUtf8; +var init_toUtf8_browser = __esm({ + "../../node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + toUtf8 = /* @__PURE__ */ __name((input) => { + if (typeof input === "string") { + return input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); + } + return new TextDecoder("utf-8").decode(input); + }, "toUtf8"); + } +}); + +// ../../node_modules/@smithy/util-utf8/dist-es/index.js +var init_dist_es5 = __esm({ + "../../node_modules/@smithy/util-utf8/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser(); + init_toUint8Array(); + init_toUtf8_browser(); + } +}); + +// ../../node_modules/@smithy/util-base64/dist-es/toBase64.browser.js +function toBase64(_input) { + let input; + if (typeof _input === "string") { + input = fromUtf8(_input); + } else { + input = _input; + } + const isArrayLike = typeof input === "object" && typeof input.length === "number"; + const isUint8Array = typeof input === "object" && typeof input.byteOffset === "number" && typeof input.byteLength === "number"; + if (!isArrayLike && !isUint8Array) { + throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); + } + let str = ""; + for (let i2 = 0; i2 < input.length; i2 += 3) { + let bits = 0; + let bitLength = 0; + for (let j2 = i2, limit = Math.min(i2 + 3, input.length); j2 < limit; j2++) { + bits |= input[j2] << (limit - j2 - 1) * bitsPerByte; + bitLength += bitsPerByte; + } + const bitClusterCount = Math.ceil(bitLength / bitsPerLetter); + bits <<= bitClusterCount * bitsPerLetter - bitLength; + for (let k2 = 1; k2 <= bitClusterCount; k2++) { + const offset = (bitClusterCount - k2) * bitsPerLetter; + str += alphabetByValue[(bits & maxLetterValue << offset) >> offset]; + } + str += "==".slice(0, 4 - bitClusterCount); + } + return str; +} +var init_toBase64_browser = __esm({ + "../../node_modules/@smithy/util-base64/dist-es/toBase64.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es5(); + init_constants_browser(); + __name(toBase64, "toBase64"); + } +}); + +// ../../node_modules/@smithy/util-base64/dist-es/index.js +var init_dist_es6 = __esm({ + "../../node_modules/@smithy/util-base64/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromBase64_browser(); + init_toBase64_browser(); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js +var Uint8ArrayBlobAdapter; +var init_Uint8ArrayBlobAdapter = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es6(); + init_dist_es5(); + Uint8ArrayBlobAdapter = class extends Uint8Array { + static fromString(source, encoding = "utf-8") { + if (typeof source === "string") { + if (encoding === "base64") { + return Uint8ArrayBlobAdapter.mutate(fromBase64(source)); + } + return Uint8ArrayBlobAdapter.mutate(fromUtf8(source)); + } + throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); + } + static mutate(source) { + Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype); + return source; + } + transformToString(encoding = "utf-8") { + if (encoding === "base64") { + return toBase64(this); + } + return toUtf8(this); + } + }; + __name(Uint8ArrayBlobAdapter, "Uint8ArrayBlobAdapter"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/checksum/ChecksumStream.browser.js +var ReadableStreamRef, ChecksumStream; +var init_ChecksumStream_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/checksum/ChecksumStream.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() { + }; + ChecksumStream = class extends ReadableStreamRef { + }; + __name(ChecksumStream, "ChecksumStream"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/stream-type-check.js +var isReadableStream; +var init_stream_type_check = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/stream-type-check.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isReadableStream = /* @__PURE__ */ __name((stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream), "isReadableStream"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/checksum/createChecksumStream.browser.js +var createChecksumStream; +var init_createChecksumStream_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/checksum/createChecksumStream.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es6(); + init_stream_type_check(); + init_ChecksumStream_browser(); + createChecksumStream = /* @__PURE__ */ __name(({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => { + if (!isReadableStream(source)) { + throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); + } + const encoder2 = base64Encoder ?? toBase64; + if (typeof TransformStream !== "function") { + throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream."); + } + const transform2 = new TransformStream({ + start() { + }, + async transform(chunk, controller) { + checksum.update(chunk); + controller.enqueue(chunk); + }, + async flush(controller) { + const digest = await checksum.digest(); + const received = encoder2(digest); + if (expectedChecksum !== received) { + const error50 = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}" in response header "${checksumSourceLocation}".`); + controller.error(error50); + } else { + controller.terminate(); + } + } + }); + source.pipeThrough(transform2); + const readable = transform2.readable; + Object.setPrototypeOf(readable, ChecksumStream.prototype); + return readable; + }, "createChecksumStream"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/ByteArrayCollector.js +var ByteArrayCollector; +var init_ByteArrayCollector = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/ByteArrayCollector.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ByteArrayCollector = class { + allocByteArray; + byteLength = 0; + byteArrays = []; + constructor(allocByteArray) { + this.allocByteArray = allocByteArray; + } + push(byteArray) { + this.byteArrays.push(byteArray); + this.byteLength += byteArray.byteLength; + } + flush() { + if (this.byteArrays.length === 1) { + const bytes = this.byteArrays[0]; + this.reset(); + return bytes; + } + const aggregation = this.allocByteArray(this.byteLength); + let cursor = 0; + for (let i2 = 0; i2 < this.byteArrays.length; ++i2) { + const bytes = this.byteArrays[i2]; + aggregation.set(bytes, cursor); + cursor += bytes.byteLength; + } + this.reset(); + return aggregation; + } + reset() { + this.byteArrays = []; + this.byteLength = 0; + } + }; + __name(ByteArrayCollector, "ByteArrayCollector"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/createBufferedReadableStream.js +function createBufferedReadableStream(upstream, size, logger3) { + const reader = upstream.getReader(); + let streamBufferingLoggedWarning = false; + let bytesSeen = 0; + const buffers = ["", new ByteArrayCollector((size2) => new Uint8Array(size2))]; + let mode = -1; + const pull = /* @__PURE__ */ __name(async (controller) => { + const { value, done } = await reader.read(); + const chunk = value; + if (done) { + if (mode !== -1) { + const remainder = flush(buffers, mode); + if (sizeOf(remainder) > 0) { + controller.enqueue(remainder); + } + } + controller.close(); + } else { + const chunkMode = modeOf(chunk, false); + if (mode !== chunkMode) { + if (mode >= 0) { + controller.enqueue(flush(buffers, mode)); + } + mode = chunkMode; + } + if (mode === -1) { + controller.enqueue(chunk); + return; + } + const chunkSize = sizeOf(chunk); + bytesSeen += chunkSize; + const bufferSize = sizeOf(buffers[mode]); + if (chunkSize >= size && bufferSize === 0) { + controller.enqueue(chunk); + } else { + const newSize = merge(buffers, mode, chunk); + if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { + streamBufferingLoggedWarning = true; + logger3?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); + } + if (newSize >= size) { + controller.enqueue(flush(buffers, mode)); + } else { + await pull(controller); + } + } + } + }, "pull"); + return new ReadableStream({ + pull + }); +} +function merge(buffers, mode, chunk) { + switch (mode) { + case 0: + buffers[0] += chunk; + return sizeOf(buffers[0]); + case 1: + case 2: + buffers[mode].push(chunk); + return sizeOf(buffers[mode]); + } +} +function flush(buffers, mode) { + switch (mode) { + case 0: + const s2 = buffers[0]; + buffers[0] = ""; + return s2; + case 1: + case 2: + return buffers[mode].flush(); + } + throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`); +} +function sizeOf(chunk) { + return chunk?.byteLength ?? chunk?.length ?? 0; +} +function modeOf(chunk, allowBuffer = true) { + if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) { + return 2; + } + if (chunk instanceof Uint8Array) { + return 1; + } + if (typeof chunk === "string") { + return 0; + } + return -1; +} +var createBufferedReadable; +var init_createBufferedReadableStream = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/createBufferedReadableStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_ByteArrayCollector(); + __name(createBufferedReadableStream, "createBufferedReadableStream"); + createBufferedReadable = createBufferedReadableStream; + __name(merge, "merge"); + __name(flush, "flush"); + __name(sizeOf, "sizeOf"); + __name(modeOf, "modeOf"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/getAwsChunkedEncodingStream.browser.js +var getAwsChunkedEncodingStream; +var init_getAwsChunkedEncodingStream_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/getAwsChunkedEncodingStream.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getAwsChunkedEncodingStream = /* @__PURE__ */ __name((readableStream, options) => { + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== void 0 && bodyLengthChecker !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0; + const reader = readableStream.getReader(); + return new ReadableStream({ + async pull(controller) { + const { value, done } = await reader.read(); + if (done) { + controller.enqueue(`0\r +`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + controller.enqueue(`${checksumLocationName}:${checksum}\r +`); + controller.enqueue(`\r +`); + } + controller.close(); + } else { + controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\r +${value}\r +`); + } + } + }); + }, "getAwsChunkedEncodingStream"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/headStream.browser.js +async function headStream(stream, bytes) { + let byteLengthCounter = 0; + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + byteLengthCounter += value?.byteLength ?? 0; + } + if (byteLengthCounter >= bytes) { + break; + } + isDone = done; + } + reader.releaseLock(); + const collected = new Uint8Array(Math.min(bytes, byteLengthCounter)); + let offset = 0; + for (const chunk of chunks) { + if (chunk.byteLength > collected.byteLength - offset) { + collected.set(chunk.subarray(0, collected.byteLength - offset), offset); + break; + } else { + collected.set(chunk, offset); + } + offset += chunk.length; + } + return collected; +} +var init_headStream_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/headStream.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(headStream, "headStream"); + } +}); + +// ../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri.js +var escapeUri, hexEncode; +var init_escape_uri = __esm({ + "../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + escapeUri = /* @__PURE__ */ __name((uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode), "escapeUri"); + hexEncode = /* @__PURE__ */ __name((c2) => `%${c2.charCodeAt(0).toString(16).toUpperCase()}`, "hexEncode"); + } +}); + +// ../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri-path.js +var init_escape_uri_path = __esm({ + "../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri-path.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-uri-escape/dist-es/index.js +var init_dist_es7 = __esm({ + "../../node_modules/@smithy/util-uri-escape/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_escape_uri(); + init_escape_uri_path(); + } +}); + +// ../../node_modules/@smithy/querystring-builder/dist-es/index.js +function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = escapeUri(key); + if (Array.isArray(value)) { + for (let i2 = 0, iLen = value.length; i2 < iLen; i2++) { + parts.push(`${key}=${escapeUri(value[i2])}`); + } + } else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${escapeUri(value)}`; + } + parts.push(qsEntry); + } + } + return parts.join("&"); +} +var init_dist_es8 = __esm({ + "../../node_modules/@smithy/querystring-builder/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es7(); + __name(buildQueryString, "buildQueryString"); + } +}); + +// ../../node_modules/@smithy/fetch-http-handler/dist-es/create-request.js +function createRequest(url2, requestOptions) { + return new Request(url2, requestOptions); +} +var init_create_request = __esm({ + "../../node_modules/@smithy/fetch-http-handler/dist-es/create-request.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(createRequest, "createRequest"); + } +}); + +// ../../node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js +function requestTimeout(timeoutInMs = 0) { + return new Promise((resolve, reject) => { + if (timeoutInMs) { + setTimeout(() => { + const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); + timeoutError.name = "TimeoutError"; + reject(timeoutError); + }, timeoutInMs); + } + }); +} +var init_request_timeout = __esm({ + "../../node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(requestTimeout, "requestTimeout"); + } +}); + +// ../../node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +function buildAbortError(abortSignal) { + const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : void 0; + if (reason) { + if (reason instanceof Error) { + const abortError3 = new Error("Request aborted"); + abortError3.name = "AbortError"; + abortError3.cause = reason; + return abortError3; + } + const abortError2 = new Error(String(reason)); + abortError2.name = "AbortError"; + return abortError2; + } + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + return abortError; +} +var keepAliveSupport, FetchHttpHandler; +var init_fetch_http_handler = __esm({ + "../../node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es8(); + init_create_request(); + init_request_timeout(); + keepAliveSupport = { + supported: void 0 + }; + FetchHttpHandler = class { + config; + configProvider; + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new FetchHttpHandler(instanceOrOptions); + } + constructor(options) { + if (typeof options === "function") { + this.configProvider = options().then((opts) => opts || {}); + } else { + this.config = options ?? {}; + this.configProvider = Promise.resolve(this.config); + } + if (keepAliveSupport.supported === void 0) { + keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]")); + } + } + destroy() { + } + async handle(request, { abortSignal, requestTimeout: requestTimeout2 } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + const requestTimeoutInMs = requestTimeout2 ?? this.config.requestTimeout; + const keepAlive = this.config.keepAlive === true; + const credentials = this.config.credentials; + if (abortSignal?.aborted) { + const abortError = buildAbortError(abortSignal); + return Promise.reject(abortError); + } + let path = request.path; + const queryString = buildQueryString(request.query || {}); + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + const { port, method } = request; + const url2 = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`; + const body = method === "GET" || method === "HEAD" ? void 0 : request.body; + const requestOptions = { + body, + headers: new Headers(request.headers), + method, + credentials + }; + if (this.config?.cache) { + requestOptions.cache = this.config.cache; + } + if (body) { + requestOptions.duplex = "half"; + } + if (typeof AbortController !== "undefined") { + requestOptions.signal = abortSignal; + } + if (keepAliveSupport.supported) { + requestOptions.keepalive = keepAlive; + } + if (typeof this.config.requestInit === "function") { + Object.assign(requestOptions, this.config.requestInit(request)); + } + let removeSignalEventListener = /* @__PURE__ */ __name(() => { + }, "removeSignalEventListener"); + const fetchRequest = createRequest(url2, requestOptions); + const raceOfPromises = [ + fetch(fetchRequest).then((response) => { + const fetchHeaders = response.headers; + const transformedHeaders = {}; + for (const pair of fetchHeaders.entries()) { + transformedHeaders[pair[0]] = pair[1]; + } + const hasReadableStream = response.body != void 0; + if (!hasReadableStream) { + return response.blob().then((body2) => ({ + response: new HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: body2 + }) + })); + } + return { + response: new HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: response.body + }) + }; + }), + requestTimeout(requestTimeoutInMs) + ]; + if (abortSignal) { + raceOfPromises.push(new Promise((resolve, reject) => { + const onAbort = /* @__PURE__ */ __name(() => { + const abortError = buildAbortError(abortSignal); + reject(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener("abort", onAbort), "removeSignalEventListener"); + } else { + abortSignal.onabort = onAbort; + } + })); + } + return Promise.race(raceOfPromises).finally(removeSignalEventListener); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config3) => { + config3[key] = value; + return config3; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + }; + __name(FetchHttpHandler, "FetchHttpHandler"); + __name(buildAbortError, "buildAbortError"); + } +}); + +// ../../node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js +async function collectBlob(blob2) { + const base643 = await readToBase64(blob2); + const arrayBuffer = fromBase64(base643); + return new Uint8Array(arrayBuffer); +} +async function collectStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; +} +function readToBase64(blob2) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onloadend = () => { + if (reader.readyState !== 2) { + return reject(new Error("Reader aborted too early")); + } + const result = reader.result ?? ""; + const commaIndex = result.indexOf(","); + const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; + resolve(result.substring(dataOffset)); + }; + reader.onabort = () => reject(new Error("Read aborted")); + reader.onerror = () => reject(reader.error); + reader.readAsDataURL(blob2); + }); +} +var streamCollector; +var init_stream_collector = __esm({ + "../../node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es6(); + streamCollector = /* @__PURE__ */ __name(async (stream) => { + if (typeof Blob === "function" && stream instanceof Blob || stream.constructor?.name === "Blob") { + if (Blob.prototype.arrayBuffer !== void 0) { + return new Uint8Array(await stream.arrayBuffer()); + } + return collectBlob(stream); + } + return collectStream(stream); + }, "streamCollector"); + __name(collectBlob, "collectBlob"); + __name(collectStream, "collectStream"); + __name(readToBase64, "readToBase64"); + } +}); + +// ../../node_modules/@smithy/fetch-http-handler/dist-es/index.js +var init_dist_es9 = __esm({ + "../../node_modules/@smithy/fetch-http-handler/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fetch_http_handler(); + init_stream_collector(); + } +}); + +// ../../node_modules/@smithy/util-hex-encoding/dist-es/index.js +function fromHex(encoded) { + if (encoded.length % 2 !== 0) { + throw new Error("Hex encoded strings must have an even number length"); + } + const out = new Uint8Array(encoded.length / 2); + for (let i2 = 0; i2 < encoded.length; i2 += 2) { + const encodedByte = encoded.slice(i2, i2 + 2).toLowerCase(); + if (encodedByte in HEX_TO_SHORT) { + out[i2 / 2] = HEX_TO_SHORT[encodedByte]; + } else { + throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + } + } + return out; +} +function toHex(bytes) { + let out = ""; + for (let i2 = 0; i2 < bytes.byteLength; i2++) { + out += SHORT_TO_HEX[bytes[i2]]; + } + return out; +} +var SHORT_TO_HEX, HEX_TO_SHORT; +var init_dist_es10 = __esm({ + "../../node_modules/@smithy/util-hex-encoding/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SHORT_TO_HEX = {}; + HEX_TO_SHORT = {}; + for (let i2 = 0; i2 < 256; i2++) { + let encodedByte = i2.toString(16).toLowerCase(); + if (encodedByte.length === 1) { + encodedByte = `0${encodedByte}`; + } + SHORT_TO_HEX[i2] = encodedByte; + HEX_TO_SHORT[encodedByte] = i2; + } + __name(fromHex, "fromHex"); + __name(toHex, "toHex"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.browser.js +var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED, sdkStreamMixin, isBlobInstance; +var init_sdk_stream_mixin_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es9(); + init_dist_es6(); + init_dist_es10(); + init_dist_es5(); + init_stream_type_check(); + ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; + sdkStreamMixin = /* @__PURE__ */ __name((stream) => { + if (!isBlobInstance(stream) && !isReadableStream(stream)) { + const name = stream?.__proto__?.constructor?.name || stream; + throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); + } + let transformed = false; + const transformToByteArray = /* @__PURE__ */ __name(async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await streamCollector(stream); + }, "transformToByteArray"); + const blobToWebStream = /* @__PURE__ */ __name((blob2) => { + if (typeof blob2.stream !== "function") { + throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body"); + } + return blob2.stream(); + }, "blobToWebStream"); + return Object.assign(stream, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === "base64") { + return toBase64(buf); + } else if (encoding === "hex") { + return toHex(buf); + } else if (encoding === void 0 || encoding === "utf8" || encoding === "utf-8") { + return toUtf8(buf); + } else if (typeof TextDecoder === "function") { + return new TextDecoder(encoding).decode(buf); + } else { + throw new Error("TextDecoder is not available, please make sure polyfill is provided."); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + if (isBlobInstance(stream)) { + return blobToWebStream(stream); + } else if (isReadableStream(stream)) { + return stream; + } else { + throw new Error(`Cannot transform payload to web stream, got ${stream}`); + } + } + }); + }, "sdkStreamMixin"); + isBlobInstance = /* @__PURE__ */ __name((stream) => typeof Blob === "function" && stream instanceof Blob, "isBlobInstance"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/splitStream.browser.js +async function splitStream(stream) { + if (typeof stream.stream === "function") { + stream = stream.stream(); + } + const readableStream = stream; + return readableStream.tee(); +} +var init_splitStream_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/splitStream.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(splitStream, "splitStream"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/index.js +var init_dist_es11 = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Uint8ArrayBlobAdapter(); + init_ChecksumStream_browser(); + init_createChecksumStream_browser(); + init_createBufferedReadableStream(); + init_getAwsChunkedEncodingStream_browser(); + init_headStream_browser(); + init_sdk_stream_mixin_browser(); + init_splitStream_browser(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js +var collectBody; +var init_collect_stream_body = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es11(); + collectBody = /* @__PURE__ */ __name(async (streamBody = new Uint8Array(), context2) => { + if (streamBody instanceof Uint8Array) { + return Uint8ArrayBlobAdapter.mutate(streamBody); + } + if (!streamBody) { + return Uint8ArrayBlobAdapter.mutate(new Uint8Array()); + } + const fromContext = context2.streamCollector(streamBody); + return Uint8ArrayBlobAdapter.mutate(await fromContext); + }, "collectBody"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js +function extendedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c2) { + return "%" + c2.charCodeAt(0).toString(16).toUpperCase(); + }); +} +var init_extended_encode_uri_component = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(extendedEncodeURIComponent, "extendedEncodeURIComponent"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/deref.js +var deref; +var init_deref = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/deref.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + deref = /* @__PURE__ */ __name((schemaRef) => { + if (typeof schemaRef === "function") { + return schemaRef(); + } + return schemaRef; + }, "deref"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js +var operation; +var init_operation = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + operation = /* @__PURE__ */ __name((namespace, name, traits, input, output) => ({ + name, + namespace, + traits, + input, + output + }), "operation"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +var schemaDeserializationMiddleware, findHeader; +var init_schemaDeserializationMiddleware = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es4(); + init_operation(); + schemaDeserializationMiddleware = /* @__PURE__ */ __name((config3) => (next, context2) => async (args) => { + const { response } = await next(args); + const { operationSchema } = getSmithyContext(context2); + const [, ns, n2, t9, i2, o2] = operationSchema ?? []; + try { + const parsed = await config3.protocol.deserializeResponse(operation(ns, n2, t9, i2, o2), { + ...config3, + ...context2 + }, response); + return { + response, + output: parsed + }; + } catch (error50) { + Object.defineProperty(error50, "$response", { + value: response, + enumerable: false, + writable: false, + configurable: false + }); + if (!("$metadata" in error50)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + try { + error50.message += "\n " + hint; + } catch (e2) { + if (!context2.logger || context2.logger?.constructor?.name === "NoOpLogger") { + console.warn(hint); + } else { + context2.logger?.warn?.(hint); + } + } + if (typeof error50.$responseBodyText !== "undefined") { + if (error50.$response) { + error50.$response.body = error50.$responseBodyText; + } + } + try { + if (HttpResponse.isInstance(response)) { + const { headers = {} } = response; + const headerEntries = Object.entries(headers); + error50.$metadata = { + httpStatusCode: response.statusCode, + requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), + extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), + cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries) + }; + } + } catch (e2) { + } + } + throw error50; + } + }, "schemaDeserializationMiddleware"); + findHeader = /* @__PURE__ */ __name((pattern, headers) => { + return (headers.find(([k2]) => { + return k2.match(pattern); + }) || [void 0, void 0])[1]; + }, "findHeader"); + } +}); + +// ../../node_modules/@smithy/querystring-parser/dist-es/index.js +function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } else if (Array.isArray(query[key])) { + query[key].push(value); + } else { + query[key] = [query[key], value]; + } + } + } + return query; +} +var init_dist_es12 = __esm({ + "../../node_modules/@smithy/querystring-parser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(parseQueryString, "parseQueryString"); + } +}); + +// ../../node_modules/@smithy/url-parser/dist-es/index.js +var parseUrl; +var init_dist_es13 = __esm({ + "../../node_modules/@smithy/url-parser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es12(); + parseUrl = /* @__PURE__ */ __name((url2) => { + if (typeof url2 === "string") { + return parseUrl(new URL(url2)); + } + const { hostname: hostname3, pathname, port, protocol, search } = url2; + let query; + if (search) { + query = parseQueryString(search); + } + return { + hostname: hostname3, + port: port ? parseInt(port) : void 0, + protocol, + path: pathname, + query + }; + }, "parseUrl"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js +var toEndpointV1; +var init_toEndpointV1 = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es13(); + toEndpointV1 = /* @__PURE__ */ __name((endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + const v1Endpoint = parseUrl(endpoint.url); + if (endpoint.headers) { + v1Endpoint.headers = {}; + for (const [name, values] of Object.entries(endpoint.headers)) { + v1Endpoint.headers[name.toLowerCase()] = values.join(", "); + } + } + return v1Endpoint; + } + return endpoint; + } + return parseUrl(endpoint); + }, "toEndpointV1"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/endpoints/index.js +var init_endpoints2 = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/endpoints/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_toEndpointV1(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +var schemaSerializationMiddleware; +var init_schemaSerializationMiddleware = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_endpoints2(); + init_dist_es4(); + init_operation(); + schemaSerializationMiddleware = /* @__PURE__ */ __name((config3) => (next, context2) => async (args) => { + const { operationSchema } = getSmithyContext(context2); + const [, ns, n2, t9, i2, o2] = operationSchema ?? []; + const endpoint = context2.endpointV2 ? async () => toEndpointV1(context2.endpointV2) : config3.endpoint; + const request = await config3.protocol.serializeRequest(operation(ns, n2, t9, i2, o2), args.input, { + ...config3, + ...context2, + endpoint + }); + return next({ + ...args, + request + }); + }, "schemaSerializationMiddleware"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js +function getSchemaSerdePlugin(config3) { + return { + applyToStack: (commandStack) => { + commandStack.add(schemaSerializationMiddleware(config3), serializerMiddlewareOption); + commandStack.add(schemaDeserializationMiddleware(config3), deserializerMiddlewareOption); + config3.protocol.setSerdeContext(config3); + } + }; +} +var deserializerMiddlewareOption, serializerMiddlewareOption; +var init_getSchemaSerdePlugin = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schemaDeserializationMiddleware(); + init_schemaSerializationMiddleware(); + deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true + }; + serializerMiddlewareOption = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true + }; + __name(getSchemaSerdePlugin, "getSchemaSerdePlugin"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js +var Schema2; +var init_Schema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Schema2 = class { + name; + namespace; + traits; + static assign(instance, values) { + const schema = Object.assign(instance, values); + return schema; + } + static [Symbol.hasInstance](lhs) { + const isPrototype = this.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const list = lhs; + return list.symbol === this.symbol; + } + return isPrototype; + } + getName() { + return this.namespace + "#" + this.name; + } + }; + __name(Schema2, "Schema"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js +var _ListSchema, ListSchema; +var init_ListSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Schema(); + _ListSchema = class extends Schema2 { + name; + traits; + valueSchema; + symbol = _ListSchema.symbol; + }; + ListSchema = _ListSchema; + __name(ListSchema, "ListSchema"); + __publicField(ListSchema, "symbol", Symbol.for("@smithy/lis")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js +var _MapSchema, MapSchema; +var init_MapSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Schema(); + _MapSchema = class extends Schema2 { + name; + traits; + keySchema; + valueSchema; + symbol = _MapSchema.symbol; + }; + MapSchema = _MapSchema; + __name(MapSchema, "MapSchema"); + __publicField(MapSchema, "symbol", Symbol.for("@smithy/map")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js +var _OperationSchema, OperationSchema; +var init_OperationSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Schema(); + _OperationSchema = class extends Schema2 { + name; + traits; + input; + output; + symbol = _OperationSchema.symbol; + }; + OperationSchema = _OperationSchema; + __name(OperationSchema, "OperationSchema"); + __publicField(OperationSchema, "symbol", Symbol.for("@smithy/ope")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js +var _StructureSchema, StructureSchema; +var init_StructureSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Schema(); + _StructureSchema = class extends Schema2 { + name; + traits; + memberNames; + memberList; + symbol = _StructureSchema.symbol; + }; + StructureSchema = _StructureSchema; + __name(StructureSchema, "StructureSchema"); + __publicField(StructureSchema, "symbol", Symbol.for("@smithy/str")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js +var _ErrorSchema, ErrorSchema; +var init_ErrorSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_StructureSchema(); + _ErrorSchema = class extends StructureSchema { + ctor; + symbol = _ErrorSchema.symbol; + }; + ErrorSchema = _ErrorSchema; + __name(ErrorSchema, "ErrorSchema"); + __publicField(ErrorSchema, "symbol", Symbol.for("@smithy/err")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +function translateTraits(indicator) { + if (typeof indicator === "object") { + return indicator; + } + indicator = indicator | 0; + if (traitsCache[indicator]) { + return traitsCache[indicator]; + } + const traits = {}; + let i2 = 0; + for (const trait of [ + "httpLabel", + "idempotent", + "idempotencyToken", + "sensitive", + "httpPayload", + "httpResponseCode", + "httpQueryParams" + ]) { + if ((indicator >> i2++ & 1) === 1) { + traits[trait] = 1; + } + } + return traitsCache[indicator] = traits; +} +var traitsCache; +var init_translateTraits = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + traitsCache = []; + __name(translateTraits, "translateTraits"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +function member(memberSchema, memberName) { + if (memberSchema instanceof NormalizedSchema) { + return Object.assign(memberSchema, { + memberName, + _isMemberSchema: true + }); + } + const internalCtorAccess = NormalizedSchema; + return new internalCtorAccess(memberSchema, memberName); +} +var anno, simpleSchemaCacheN, simpleSchemaCacheS, _NormalizedSchema, NormalizedSchema, isMemberSchema, isStaticSchema; +var init_NormalizedSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_deref(); + init_translateTraits(); + anno = { + it: Symbol.for("@smithy/nor-struct-it"), + ns: Symbol.for("@smithy/ns") + }; + simpleSchemaCacheN = []; + simpleSchemaCacheS = {}; + _NormalizedSchema = class { + ref; + memberName; + symbol = _NormalizedSchema.symbol; + name; + schema; + _isMemberSchema; + traits; + memberTraits; + normalizedTraits; + constructor(ref, memberName) { + this.ref = ref; + this.memberName = memberName; + const traitStack = []; + let _ref = ref; + let schema = ref; + this._isMemberSchema = false; + while (isMemberSchema(_ref)) { + traitStack.push(_ref[1]); + _ref = _ref[0]; + schema = deref(_ref); + this._isMemberSchema = true; + } + if (traitStack.length > 0) { + this.memberTraits = {}; + for (let i2 = traitStack.length - 1; i2 >= 0; --i2) { + const traitSet = traitStack[i2]; + Object.assign(this.memberTraits, translateTraits(traitSet)); + } + } else { + this.memberTraits = 0; + } + if (schema instanceof _NormalizedSchema) { + const computedMemberTraits = this.memberTraits; + Object.assign(this, schema); + this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits()); + this.normalizedTraits = void 0; + this.memberName = memberName ?? schema.memberName; + return; + } + this.schema = deref(schema); + if (isStaticSchema(this.schema)) { + this.name = `${this.schema[1]}#${this.schema[2]}`; + this.traits = this.schema[3]; + } else { + this.name = this.memberName ?? String(schema); + this.traits = 0; + } + if (this._isMemberSchema && !memberName) { + throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`); + } + } + static [Symbol.hasInstance](lhs) { + const isPrototype = this.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const ns = lhs; + return ns.symbol === this.symbol; + } + return isPrototype; + } + static of(ref) { + const keyAble = typeof ref === "function" || typeof ref === "object" && ref !== null; + if (typeof ref === "number") { + if (simpleSchemaCacheN[ref]) { + return simpleSchemaCacheN[ref]; + } + } else if (typeof ref === "string") { + if (simpleSchemaCacheS[ref]) { + return simpleSchemaCacheS[ref]; + } + } else if (keyAble) { + if (ref[anno.ns]) { + return ref[anno.ns]; + } + } + const sc = deref(ref); + if (sc instanceof _NormalizedSchema) { + return sc; + } + if (isMemberSchema(sc)) { + const [ns2, traits] = sc; + if (ns2 instanceof _NormalizedSchema) { + Object.assign(ns2.getMergedTraits(), translateTraits(traits)); + return ns2; + } + throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`); + } + const ns = new _NormalizedSchema(sc); + if (keyAble) { + return ref[anno.ns] = ns; + } + if (typeof sc === "string") { + return simpleSchemaCacheS[sc] = ns; + } + if (typeof sc === "number") { + return simpleSchemaCacheN[sc] = ns; + } + return ns; + } + getSchema() { + const sc = this.schema; + if (Array.isArray(sc) && sc[0] === 0) { + return sc[4]; + } + return sc; + } + getName(withNamespace = false) { + const { name } = this; + const short = !withNamespace && name && name.includes("#"); + return short ? name.split("#")[1] : name || void 0; + } + getMemberName() { + return this.memberName; + } + isMemberSchema() { + return this._isMemberSchema; + } + isListSchema() { + const sc = this.getSchema(); + return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1; + } + isMapSchema() { + const sc = this.getSchema(); + return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2; + } + isStructSchema() { + const sc = this.getSchema(); + if (typeof sc !== "object") { + return false; + } + const id = sc[0]; + return id === 3 || id === -3 || id === 4; + } + isUnionSchema() { + const sc = this.getSchema(); + if (typeof sc !== "object") { + return false; + } + return sc[0] === 4; + } + isBlobSchema() { + const sc = this.getSchema(); + return sc === 21 || sc === 42; + } + isTimestampSchema() { + const sc = this.getSchema(); + return typeof sc === "number" && sc >= 4 && sc <= 7; + } + isUnitSchema() { + return this.getSchema() === "unit"; + } + isDocumentSchema() { + return this.getSchema() === 15; + } + isStringSchema() { + return this.getSchema() === 0; + } + isBooleanSchema() { + return this.getSchema() === 2; + } + isNumericSchema() { + return this.getSchema() === 1; + } + isBigIntegerSchema() { + return this.getSchema() === 17; + } + isBigDecimalSchema() { + return this.getSchema() === 19; + } + isStreaming() { + const { streaming } = this.getMergedTraits(); + return !!streaming || this.getSchema() === 42; + } + isIdempotencyToken() { + return !!this.getMergedTraits().idempotencyToken; + } + getMergedTraits() { + return this.normalizedTraits ?? (this.normalizedTraits = { + ...this.getOwnTraits(), + ...this.getMemberTraits() + }); + } + getMemberTraits() { + return translateTraits(this.memberTraits); + } + getOwnTraits() { + return translateTraits(this.traits); + } + getKeySchema() { + const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()]; + if (!isDoc && !isMap) { + throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`); + } + const schema = this.getSchema(); + const memberSchema = isDoc ? 15 : schema[4] ?? 0; + return member([memberSchema, 0], "key"); + } + getValueSchema() { + const sc = this.getSchema(); + const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()]; + const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap || isList) ? sc[3 + sc[0]] : isDoc ? 15 : void 0; + if (memberSchema != null) { + return member([memberSchema, 0], isMap ? "value" : "member"); + } + throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`); + } + getMemberSchema(memberName) { + const struct = this.getSchema(); + if (this.isStructSchema() && struct[4].includes(memberName)) { + const i2 = struct[4].indexOf(memberName); + const memberSchema = struct[5][i2]; + return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName); + } + if (this.isDocumentSchema()) { + return member([15, 0], memberName); + } + throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`); + } + getMemberSchemas() { + const buffer = {}; + try { + for (const [k2, v3] of this.structIterator()) { + buffer[k2] = v3; + } + } catch (ignored) { + } + return buffer; + } + getEventStreamMember() { + if (this.isStructSchema()) { + for (const [memberName, memberSchema] of this.structIterator()) { + if (memberSchema.isStreaming() && memberSchema.isStructSchema()) { + return memberName; + } + } + } + return ""; + } + *structIterator() { + if (this.isUnitSchema()) { + return; + } + if (!this.isStructSchema()) { + throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); + } + const struct = this.getSchema(); + const z3 = struct[4].length; + let it = struct[anno.it]; + if (it && z3 === it.length) { + yield* it; + return; + } + it = Array(z3); + for (let i2 = 0; i2 < z3; ++i2) { + const k2 = struct[4][i2]; + const v3 = member([struct[5][i2], 0], k2); + yield it[i2] = [k2, v3]; + } + struct[anno.it] = it; + } + }; + NormalizedSchema = _NormalizedSchema; + __name(NormalizedSchema, "NormalizedSchema"); + __publicField(NormalizedSchema, "symbol", Symbol.for("@smithy/nor")); + __name(member, "member"); + isMemberSchema = /* @__PURE__ */ __name((sc) => Array.isArray(sc) && sc.length === 2, "isMemberSchema"); + isStaticSchema = /* @__PURE__ */ __name((sc) => Array.isArray(sc) && sc.length >= 5, "isStaticSchema"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js +var _SimpleSchema, SimpleSchema; +var init_SimpleSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Schema(); + _SimpleSchema = class extends Schema2 { + name; + schemaRef; + traits; + symbol = _SimpleSchema.symbol; + }; + SimpleSchema = _SimpleSchema; + __name(SimpleSchema, "SimpleSchema"); + __publicField(SimpleSchema, "symbol", Symbol.for("@smithy/sim")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js +var init_sentinels2 = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +var _TypeRegistry, TypeRegistry; +var init_TypeRegistry = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + _TypeRegistry = class { + namespace; + schemas; + exceptions; + constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) { + this.namespace = namespace; + this.schemas = schemas; + this.exceptions = exceptions; + } + static for(namespace) { + if (!_TypeRegistry.registries.has(namespace)) { + _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace)); + } + return _TypeRegistry.registries.get(namespace); + } + copyFrom(other) { + const { schemas, exceptions } = this; + for (const [k2, v3] of other.schemas) { + if (!schemas.has(k2)) { + schemas.set(k2, v3); + } + } + for (const [k2, v3] of other.exceptions) { + if (!exceptions.has(k2)) { + exceptions.set(k2, v3); + } + } + } + register(shapeId, schema) { + const qualifiedName = this.normalizeShapeId(shapeId); + for (const r2 of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) { + r2.schemas.set(qualifiedName, schema); + } + } + getSchema(shapeId) { + const id = this.normalizeShapeId(shapeId); + if (!this.schemas.has(id)) { + throw new Error(`@smithy/core/schema - schema not found for ${id}`); + } + return this.schemas.get(id); + } + registerError(es, ctor) { + const $error = es; + const ns = $error[1]; + for (const r2 of [this, _TypeRegistry.for(ns)]) { + r2.schemas.set(ns + "#" + $error[2], $error); + r2.exceptions.set($error, ctor); + } + } + getErrorCtor(es) { + const $error = es; + if (this.exceptions.has($error)) { + return this.exceptions.get($error); + } + const registry2 = _TypeRegistry.for($error[1]); + return registry2.exceptions.get($error); + } + getBaseException() { + for (const exceptionKey of this.exceptions.keys()) { + if (Array.isArray(exceptionKey)) { + const [, ns, name] = exceptionKey; + const id = ns + "#" + name; + if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) { + return exceptionKey; + } + } + } + return void 0; + } + find(predicate) { + return [...this.schemas.values()].find(predicate); + } + clear() { + this.schemas.clear(); + this.exceptions.clear(); + } + normalizeShapeId(shapeId) { + if (shapeId.includes("#")) { + return shapeId; + } + return this.namespace + "#" + shapeId; + } + }; + TypeRegistry = _TypeRegistry; + __name(TypeRegistry, "TypeRegistry"); + __publicField(TypeRegistry, "registries", /* @__PURE__ */ new Map()); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/index.js +var init_schema3 = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_deref(); + init_getSchemaSerdePlugin(); + init_ListSchema(); + init_MapSchema(); + init_OperationSchema(); + init_operation(); + init_ErrorSchema(); + init_NormalizedSchema(); + init_Schema(); + init_SimpleSchema(); + init_StructureSchema(); + init_sentinels2(); + init_translateTraits(); + init_TypeRegistry(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js +var init_copyDocumentWithTransform = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +var expectNumber, MAX_FLOAT, expectFloat32, expectLong, expectShort, expectByte, expectSizedInt, castInt, strictParseFloat32, NUMBER_REGEX, parseNumber, strictParseShort, strictParseByte, stackTraceWarning, logger2; +var init_parse_utils = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + expectNumber = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "string") { + const parsed = parseFloat(value); + if (!Number.isNaN(parsed)) { + if (String(parsed) !== String(value)) { + logger2.warn(stackTraceWarning(`Expected number but observed string: ${value}`)); + } + return parsed; + } + } + if (typeof value === "number") { + return value; + } + throw new TypeError(`Expected number, got ${typeof value}: ${value}`); + }, "expectNumber"); + MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); + expectFloat32 = /* @__PURE__ */ __name((value) => { + const expected = expectNumber(value); + if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { + if (Math.abs(expected) > MAX_FLOAT) { + throw new TypeError(`Expected 32-bit float, got ${value}`); + } + } + return expected; + }, "expectFloat32"); + expectLong = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (Number.isInteger(value) && !Number.isNaN(value)) { + return value; + } + throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); + }, "expectLong"); + expectShort = /* @__PURE__ */ __name((value) => expectSizedInt(value, 16), "expectShort"); + expectByte = /* @__PURE__ */ __name((value) => expectSizedInt(value, 8), "expectByte"); + expectSizedInt = /* @__PURE__ */ __name((value, size) => { + const expected = expectLong(value); + if (expected !== void 0 && castInt(expected, size) !== expected) { + throw new TypeError(`Expected ${size}-bit integer, got ${value}`); + } + return expected; + }, "expectSizedInt"); + castInt = /* @__PURE__ */ __name((value, size) => { + switch (size) { + case 32: + return Int32Array.of(value)[0]; + case 16: + return Int16Array.of(value)[0]; + case 8: + return Int8Array.of(value)[0]; + } + }, "castInt"); + strictParseFloat32 = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return expectFloat32(parseNumber(value)); + } + return expectFloat32(value); + }, "strictParseFloat32"); + NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; + parseNumber = /* @__PURE__ */ __name((value) => { + const matches = value.match(NUMBER_REGEX); + if (matches === null || matches[0].length !== value.length) { + throw new TypeError(`Expected real number, got implicit NaN`); + } + return parseFloat(value); + }, "parseNumber"); + strictParseShort = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectShort(parseNumber(value)); + } + return expectShort(value); + }, "strictParseShort"); + strictParseByte = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectByte(parseNumber(value)); + } + return expectByte(value); + }, "strictParseByte"); + stackTraceWarning = /* @__PURE__ */ __name((message2) => { + return String(new TypeError(message2).stack || message2).split("\n").slice(0, 5).filter((s2) => !s2.includes("stackTraceWarning")).join("\n"); + }, "stackTraceWarning"); + logger2 = { + warn: console.warn + }; + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js +function dateToUtcString(date6) { + const year3 = date6.getUTCFullYear(); + const month = date6.getUTCMonth(); + const dayOfWeek = date6.getUTCDay(); + const dayOfMonthInt = date6.getUTCDate(); + const hoursInt = date6.getUTCHours(); + const minutesInt = date6.getUTCMinutes(); + const secondsInt = date6.getUTCSeconds(); + const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`; + const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`; + const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`; + const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`; + return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year3} ${hoursString}:${minutesString}:${secondsString} GMT`; +} +var DAYS, MONTHS, RFC3339, RFC3339_WITH_OFFSET, IMF_FIXDATE, RFC_850_DATE, ASC_TIME, parseRfc7231DateTime, buildDate, parseTwoDigitYear, FIFTY_YEARS_IN_MILLIS, adjustRfc850Year, parseMonthByShortName, DAYS_IN_MONTH, validateDayOfMonth, isLeapYear, parseDateValue, parseMilliseconds, stripLeadingZeroes; +var init_date_utils = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_parse_utils(); + DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; + MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + __name(dateToUtcString, "dateToUtcString"); + RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); + RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/); + IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); + RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); + ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/); + parseRfc7231DateTime = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-7231 date-times must be expressed as strings"); + } + let match2 = IMF_FIXDATE.exec(value); + if (match2) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match2; + return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + match2 = RFC_850_DATE.exec(value); + if (match2) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match2; + return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { + hours, + minutes, + seconds, + fractionalMilliseconds + })); + } + match2 = ASC_TIME.exec(value); + if (match2) { + const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match2; + return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + throw new TypeError("Invalid RFC-7231 date-time value"); + }, "parseRfc7231DateTime"); + buildDate = /* @__PURE__ */ __name((year3, month, day2, time7) => { + const adjustedMonth = month - 1; + validateDayOfMonth(year3, adjustedMonth, day2); + return new Date(Date.UTC(year3, adjustedMonth, day2, parseDateValue(time7.hours, "hour", 0, 23), parseDateValue(time7.minutes, "minute", 0, 59), parseDateValue(time7.seconds, "seconds", 0, 60), parseMilliseconds(time7.fractionalMilliseconds))); + }, "buildDate"); + parseTwoDigitYear = /* @__PURE__ */ __name((value) => { + const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear(); + const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value)); + if (valueInThisCentury < thisYear) { + return valueInThisCentury + 100; + } + return valueInThisCentury; + }, "parseTwoDigitYear"); + FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3; + adjustRfc850Year = /* @__PURE__ */ __name((input) => { + if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) { + return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds())); + } + return input; + }, "adjustRfc850Year"); + parseMonthByShortName = /* @__PURE__ */ __name((value) => { + const monthIdx = MONTHS.indexOf(value); + if (monthIdx < 0) { + throw new TypeError(`Invalid month: ${value}`); + } + return monthIdx + 1; + }, "parseMonthByShortName"); + DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + validateDayOfMonth = /* @__PURE__ */ __name((year3, month, day2) => { + let maxDays = DAYS_IN_MONTH[month]; + if (month === 1 && isLeapYear(year3)) { + maxDays = 29; + } + if (day2 > maxDays) { + throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year3}: ${day2}`); + } + }, "validateDayOfMonth"); + isLeapYear = /* @__PURE__ */ __name((year3) => { + return year3 % 4 === 0 && (year3 % 100 !== 0 || year3 % 400 === 0); + }, "isLeapYear"); + parseDateValue = /* @__PURE__ */ __name((value, type, lower, upper) => { + const dateVal = strictParseByte(stripLeadingZeroes(value)); + if (dateVal < lower || dateVal > upper) { + throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`); + } + return dateVal; + }, "parseDateValue"); + parseMilliseconds = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return 0; + } + return strictParseFloat32("0." + value) * 1e3; + }, "parseMilliseconds"); + stripLeadingZeroes = /* @__PURE__ */ __name((value) => { + let idx = 0; + while (idx < value.length - 1 && value.charAt(idx) === "0") { + idx++; + } + if (idx === 0) { + return value; + } + return value.slice(idx); + }, "stripLeadingZeroes"); + } +}); + +// ../../node_modules/@smithy/uuid/dist-es/randomUUID.browser.js +var randomUUID; +var init_randomUUID_browser = __esm({ + "../../node_modules/@smithy/uuid/dist-es/randomUUID.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto); + } +}); + +// ../../node_modules/@smithy/uuid/dist-es/v4.js +var decimalToHex, v4; +var init_v4 = __esm({ + "../../node_modules/@smithy/uuid/dist-es/v4.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_randomUUID_browser(); + decimalToHex = Array.from({ length: 256 }, (_, i2) => i2.toString(16).padStart(2, "0")); + v4 = /* @__PURE__ */ __name(() => { + if (randomUUID) { + return randomUUID(); + } + const rnds = new Uint8Array(16); + crypto.getRandomValues(rnds); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + return decimalToHex[rnds[0]] + decimalToHex[rnds[1]] + decimalToHex[rnds[2]] + decimalToHex[rnds[3]] + "-" + decimalToHex[rnds[4]] + decimalToHex[rnds[5]] + "-" + decimalToHex[rnds[6]] + decimalToHex[rnds[7]] + "-" + decimalToHex[rnds[8]] + decimalToHex[rnds[9]] + "-" + decimalToHex[rnds[10]] + decimalToHex[rnds[11]] + decimalToHex[rnds[12]] + decimalToHex[rnds[13]] + decimalToHex[rnds[14]] + decimalToHex[rnds[15]]; + }, "v4"); + } +}); + +// ../../node_modules/@smithy/uuid/dist-es/index.js +var init_dist_es14 = __esm({ + "../../node_modules/@smithy/uuid/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_v4(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/generateIdempotencyToken.js +var init_generateIdempotencyToken = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/generateIdempotencyToken.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es14(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js +var LazyJsonString; +var init_lazy_json = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + LazyJsonString = /* @__PURE__ */ __name(function LazyJsonString2(val) { + const str = Object.assign(new String(val), { + deserializeJSON() { + return JSON.parse(String(val)); + }, + toString() { + return String(val); + }, + toJSON() { + return String(val); + } + }); + return str; + }, "LazyJsonString"); + LazyJsonString.from = (object2) => { + if (object2 && typeof object2 === "object" && (object2 instanceof LazyJsonString || "deserializeJSON" in object2)) { + return object2; + } else if (typeof object2 === "string" || Object.getPrototypeOf(object2) === String.prototype) { + return LazyJsonString(String(object2)); + } + return LazyJsonString(JSON.stringify(object2)); + }; + LazyJsonString.fromObject = LazyJsonString.from; + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js +function quoteHeader(part) { + if (part.includes(",") || part.includes('"')) { + part = `"${part.replace(/"/g, '\\"')}"`; + } + return part; +} +var init_quote_header = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(quoteHeader, "quoteHeader"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js +function range(v3, min, max2) { + const _v = Number(v3); + if (_v < min || _v > max2) { + throw new Error(`Value ${_v} out of range [${min}, ${max2}]`); + } +} +var ddd, mmm, time4, date, year2, RFC3339_WITH_OFFSET2, IMF_FIXDATE2, RFC_850_DATE2, ASC_TIME2, months, _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime; +var init_schema_date_utils = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`; + mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`; + time4 = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`; + date = `(\\d?\\d)`; + year2 = `(\\d{4})`; + RFC3339_WITH_OFFSET2 = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/); + IMF_FIXDATE2 = new RegExp(`^${ddd}, ${date} ${mmm} ${year2} ${time4} GMT$`); + RFC_850_DATE2 = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time4} GMT$`); + ASC_TIME2 = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time4} ${year2}$`); + months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + _parseEpochTimestamp = /* @__PURE__ */ __name((value) => { + if (value == null) { + return void 0; + } + let num = NaN; + if (typeof value === "number") { + num = value; + } else if (typeof value === "string") { + if (!/^-?\d*\.?\d+$/.test(value)) { + throw new TypeError(`parseEpochTimestamp - numeric string invalid.`); + } + num = Number.parseFloat(value); + } else if (typeof value === "object" && value.tag === 1) { + num = value.value; + } + if (isNaN(num) || Math.abs(num) === Infinity) { + throw new TypeError("Epoch timestamps must be valid finite numbers."); + } + return new Date(Math.round(num * 1e3)); + }, "_parseEpochTimestamp"); + _parseRfc3339DateTimeWithOffset = /* @__PURE__ */ __name((value) => { + if (value == null) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC3339 timestamps must be strings"); + } + const matches = RFC3339_WITH_OFFSET2.exec(value); + if (!matches) { + throw new TypeError(`Invalid RFC3339 timestamp format ${value}`); + } + const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches; + range(monthStr, 1, 12); + range(dayStr, 1, 31); + range(hours, 0, 23); + range(minutes, 0, 59); + range(seconds, 0, 60); + const date6 = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1e3) : 0)); + date6.setUTCFullYear(Number(yearStr)); + if (offsetStr.toUpperCase() != "Z") { + const [, sign3, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [void 0, "+", 0, 0]; + const scalar = sign3 === "-" ? 1 : -1; + date6.setTime(date6.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1e3 + Number(offsetM) * 60 * 1e3)); + } + return date6; + }, "_parseRfc3339DateTimeWithOffset"); + _parseRfc7231DateTime = /* @__PURE__ */ __name((value) => { + if (value == null) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC7231 timestamps must be strings."); + } + let day2; + let month; + let year3; + let hour2; + let minute2; + let second; + let fraction; + let matches; + if (matches = IMF_FIXDATE2.exec(value)) { + [, day2, month, year3, hour2, minute2, second, fraction] = matches; + } else if (matches = RFC_850_DATE2.exec(value)) { + [, day2, month, year3, hour2, minute2, second, fraction] = matches; + year3 = (Number(year3) + 1900).toString(); + } else if (matches = ASC_TIME2.exec(value)) { + [, month, day2, hour2, minute2, second, fraction, year3] = matches; + } + if (year3 && second) { + const timestamp = Date.UTC(Number(year3), months.indexOf(month), Number(day2), Number(hour2), Number(minute2), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1e3) : 0); + range(day2, 1, 31); + range(hour2, 0, 23); + range(minute2, 0, 59); + range(second, 0, 60); + const date6 = new Date(timestamp); + date6.setUTCFullYear(Number(year3)); + return date6; + } + throw new TypeError(`Invalid RFC7231 date-time value ${value}.`); + }, "_parseRfc7231DateTime"); + __name(range, "range"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/split-every.js +function splitEvery(value, delimiter, numDelimiters) { + if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { + throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); + } + const segments = value.split(delimiter); + if (numDelimiters === 1) { + return segments; + } + const compoundSegments = []; + let currentSegment = ""; + for (let i2 = 0; i2 < segments.length; i2++) { + if (currentSegment === "") { + currentSegment = segments[i2]; + } else { + currentSegment += delimiter + segments[i2]; + } + if ((i2 + 1) % numDelimiters === 0) { + compoundSegments.push(currentSegment); + currentSegment = ""; + } + } + if (currentSegment !== "") { + compoundSegments.push(currentSegment); + } + return compoundSegments; +} +var init_split_every = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/split-every.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(splitEvery, "splitEvery"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js +var splitHeader; +var init_split_header = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + splitHeader = /* @__PURE__ */ __name((value) => { + const z3 = value.length; + const values = []; + let withinQuotes = false; + let prevChar = void 0; + let anchor = 0; + for (let i2 = 0; i2 < z3; ++i2) { + const char = value[i2]; + switch (char) { + case `"`: + if (prevChar !== "\\") { + withinQuotes = !withinQuotes; + } + break; + case ",": + if (!withinQuotes) { + values.push(value.slice(anchor, i2)); + anchor = i2 + 1; + } + break; + default: + } + prevChar = char; + } + values.push(value.slice(anchor)); + return values.map((v3) => { + v3 = v3.trim(); + const z4 = v3.length; + if (z4 < 2) { + return v3; + } + if (v3[0] === `"` && v3[z4 - 1] === `"`) { + v3 = v3.slice(1, z4 - 1); + } + return v3.replace(/\\"/g, '"'); + }); + }, "splitHeader"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +var format, NumericValue; +var init_NumericValue = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + format = /^-?\d*(\.\d+)?$/; + NumericValue = class { + string; + type; + constructor(string4, type) { + this.string = string4; + this.type = type; + if (!format.test(string4)) { + throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`); + } + } + toString() { + return this.string; + } + static [Symbol.hasInstance](object2) { + if (!object2 || typeof object2 !== "object") { + return false; + } + const _nv = object2; + return NumericValue.prototype.isPrototypeOf(object2) || _nv.type === "bigDecimal" && format.test(_nv.string); + } + }; + __name(NumericValue, "NumericValue"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/index.js +var init_serde2 = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_copyDocumentWithTransform(); + init_date_utils(); + init_generateIdempotencyToken(); + init_lazy_json(); + init_parse_utils(); + init_quote_header(); + init_schema_date_utils(); + init_split_every(); + init_split_header(); + init_NumericValue(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js +var SerdeContext; +var init_SerdeContext = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SerdeContext = class { + serdeContext; + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + }; + __name(SerdeContext, "SerdeContext"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +var EventStreamSerde; +var init_EventStreamSerde = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es5(); + EventStreamSerde = class { + marshaller; + serializer; + deserializer; + serdeContext; + defaultContentType; + constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType }) { + this.marshaller = marshaller; + this.serializer = serializer; + this.deserializer = deserializer; + this.serdeContext = serdeContext; + this.defaultContentType = defaultContentType; + } + async serializeEventStream({ eventStream, requestSchema, initialRequest }) { + const marshaller = this.marshaller; + const eventStreamMember = requestSchema.getEventStreamMember(); + const unionSchema = requestSchema.getMemberSchema(eventStreamMember); + const serializer = this.serializer; + const defaultContentType = this.defaultContentType; + const initialRequestMarker = Symbol("initialRequestMarker"); + const eventStreamIterable = { + async *[Symbol.asyncIterator]() { + if (initialRequest) { + const headers = { + ":event-type": { type: "string", value: "initial-request" }, + ":message-type": { type: "string", value: "event" }, + ":content-type": { type: "string", value: defaultContentType } + }; + serializer.write(requestSchema, initialRequest); + const body = serializer.flush(); + yield { + [initialRequestMarker]: true, + headers, + body + }; + } + for await (const page of eventStream) { + yield page; + } + } + }; + return marshaller.serialize(eventStreamIterable, (event) => { + if (event[initialRequestMarker]) { + return { + headers: event.headers, + body: event.body + }; + } + const unionMember = Object.keys(event).find((key) => { + return key !== "__type"; + }) ?? ""; + const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event); + const headers = { + ":event-type": { type: "string", value: eventType }, + ":message-type": { type: "string", value: "event" }, + ":content-type": { type: "string", value: explicitPayloadContentType ?? defaultContentType }, + ...additionalHeaders + }; + return { + headers, + body + }; + }); + } + async deserializeEventStream({ response, responseSchema, initialResponseContainer }) { + const marshaller = this.marshaller; + const eventStreamMember = responseSchema.getEventStreamMember(); + const unionSchema = responseSchema.getMemberSchema(eventStreamMember); + const memberSchemas = unionSchema.getMemberSchemas(); + const initialResponseMarker = Symbol("initialResponseMarker"); + const asyncIterable = marshaller.deserialize(response.body, async (event) => { + const unionMember = Object.keys(event).find((key) => { + return key !== "__type"; + }) ?? ""; + const body = event[unionMember].body; + if (unionMember === "initial-response") { + const dataObject = await this.deserializer.read(responseSchema, body); + delete dataObject[eventStreamMember]; + return { + [initialResponseMarker]: true, + ...dataObject + }; + } else if (unionMember in memberSchemas) { + const eventStreamSchema = memberSchemas[unionMember]; + if (eventStreamSchema.isStructSchema()) { + const out = {}; + let hasBindings = false; + for (const [name, member2] of eventStreamSchema.structIterator()) { + const { eventHeader, eventPayload } = member2.getMergedTraits(); + hasBindings = hasBindings || Boolean(eventHeader || eventPayload); + if (eventPayload) { + if (member2.isBlobSchema()) { + out[name] = body; + } else if (member2.isStringSchema()) { + out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body); + } else if (member2.isStructSchema()) { + out[name] = await this.deserializer.read(member2, body); + } + } else if (eventHeader) { + const value = event[unionMember].headers[name]?.value; + if (value != null) { + if (member2.isNumericSchema()) { + if (value && typeof value === "object" && "bytes" in value) { + out[name] = BigInt(value.toString()); + } else { + out[name] = Number(value); + } + } else { + out[name] = value; + } + } + } + } + if (hasBindings) { + return { + [unionMember]: out + }; + } + if (body.byteLength === 0) { + return { + [unionMember]: {} + }; + } + } + return { + [unionMember]: await this.deserializer.read(eventStreamSchema, body) + }; + } else { + return { + $unknown: event + }; + } + }); + const asyncIterator = asyncIterable[Symbol.asyncIterator](); + const firstEvent = await asyncIterator.next(); + if (firstEvent.done) { + return asyncIterable; + } + if (firstEvent.value?.[initialResponseMarker]) { + if (!responseSchema) { + throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given."); + } + for (const [key, value] of Object.entries(firstEvent.value)) { + initialResponseContainer[key] = value; + } + } + return { + async *[Symbol.asyncIterator]() { + if (!firstEvent?.value?.[initialResponseMarker]) { + yield firstEvent.value; + } + while (true) { + const { done, value } = await asyncIterator.next(); + if (done) { + break; + } + yield value; + } + } + }; + } + writeEventBody(unionMember, unionSchema, event) { + const serializer = this.serializer; + let eventType = unionMember; + let explicitPayloadMember = null; + let explicitPayloadContentType; + const isKnownSchema = (() => { + const struct = unionSchema.getSchema(); + return struct[4].includes(unionMember); + })(); + const additionalHeaders = {}; + if (!isKnownSchema) { + const [type, value] = event[unionMember]; + eventType = type; + serializer.write(15, value); + } else { + const eventSchema = unionSchema.getMemberSchema(unionMember); + if (eventSchema.isStructSchema()) { + for (const [memberName, memberSchema] of eventSchema.structIterator()) { + const { eventHeader, eventPayload } = memberSchema.getMergedTraits(); + if (eventPayload) { + explicitPayloadMember = memberName; + } else if (eventHeader) { + const value = event[unionMember][memberName]; + let type = "binary"; + if (memberSchema.isNumericSchema()) { + if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) { + type = "integer"; + } else { + type = "long"; + } + } else if (memberSchema.isTimestampSchema()) { + type = "timestamp"; + } else if (memberSchema.isStringSchema()) { + type = "string"; + } else if (memberSchema.isBooleanSchema()) { + type = "boolean"; + } + if (value != null) { + additionalHeaders[memberName] = { + type, + value + }; + delete event[unionMember][memberName]; + } + } + } + if (explicitPayloadMember !== null) { + const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember); + if (payloadSchema.isBlobSchema()) { + explicitPayloadContentType = "application/octet-stream"; + } else if (payloadSchema.isStringSchema()) { + explicitPayloadContentType = "text/plain"; + } + serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]); + } else { + serializer.write(eventSchema, event[unionMember]); + } + } else if (eventSchema.isUnitSchema()) { + serializer.write(eventSchema, {}); + } else { + throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union."); + } + } + const messageSerialization = serializer.flush() ?? new Uint8Array(); + const body = typeof messageSerialization === "string" ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization) : messageSerialization; + return { + body, + eventType, + explicitPayloadContentType, + additionalHeaders + }; + } + }; + __name(EventStreamSerde, "EventStreamSerde"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/event-streams/index.js +var event_streams_exports = {}; +__export(event_streams_exports, { + EventStreamSerde: () => EventStreamSerde +}); +var init_event_streams = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/event-streams/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamSerde(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +var HttpProtocol; +var init_HttpProtocol = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_dist_es2(); + init_SerdeContext(); + HttpProtocol = class extends SerdeContext { + options; + compositeErrorRegistry; + constructor(options) { + super(); + this.options = options; + this.compositeErrorRegistry = TypeRegistry.for(options.defaultNamespace); + for (const etr of options.errorTypeRegistries ?? []) { + this.compositeErrorRegistry.copyFrom(etr); + } + } + getRequestType() { + return HttpRequest; + } + getResponseType() { + return HttpResponse; + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + this.serializer.setSerdeContext(serdeContext); + this.deserializer.setSerdeContext(serdeContext); + if (this.getPayloadCodec()) { + this.getPayloadCodec().setSerdeContext(serdeContext); + } + } + updateServiceEndpoint(request, endpoint) { + if ("url" in endpoint) { + request.protocol = endpoint.url.protocol; + request.hostname = endpoint.url.hostname; + request.port = endpoint.url.port ? Number(endpoint.url.port) : void 0; + request.path = endpoint.url.pathname; + request.fragment = endpoint.url.hash || void 0; + request.username = endpoint.url.username || void 0; + request.password = endpoint.url.password || void 0; + if (!request.query) { + request.query = {}; + } + for (const [k2, v3] of endpoint.url.searchParams.entries()) { + request.query[k2] = v3; + } + if (endpoint.headers) { + for (const [name, values] of Object.entries(endpoint.headers)) { + request.headers[name] = values.join(", "); + } + } + return request; + } else { + request.protocol = endpoint.protocol; + request.hostname = endpoint.hostname; + request.port = endpoint.port ? Number(endpoint.port) : void 0; + request.path = endpoint.path; + request.query = { + ...endpoint.query + }; + if (endpoint.headers) { + for (const [name, value] of Object.entries(endpoint.headers)) { + request.headers[name] = value; + } + } + return request; + } + } + setHostPrefix(request, operationSchema, input) { + if (this.serdeContext?.disableHostPrefix) { + return; + } + const inputNs = NormalizedSchema.of(operationSchema.input); + const opTraits = translateTraits(operationSchema.traits ?? {}); + if (opTraits.endpoint) { + let hostPrefix = opTraits.endpoint?.[0]; + if (typeof hostPrefix === "string") { + const hostLabelInputs = [...inputNs.structIterator()].filter(([, member2]) => member2.getMergedTraits().hostLabel); + for (const [name] of hostLabelInputs) { + const replacement = input[name]; + if (typeof replacement !== "string") { + throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`); + } + hostPrefix = hostPrefix.replace(`{${name}}`, replacement); + } + request.hostname = hostPrefix + request.hostname; + } + } + } + deserializeMetadata(output) { + return { + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }; + } + async serializeEventStream({ eventStream, requestSchema, initialRequest }) { + const eventStreamSerde = await this.loadEventStreamCapability(); + return eventStreamSerde.serializeEventStream({ + eventStream, + requestSchema, + initialRequest + }); + } + async deserializeEventStream({ response, responseSchema, initialResponseContainer }) { + const eventStreamSerde = await this.loadEventStreamCapability(); + return eventStreamSerde.deserializeEventStream({ + response, + responseSchema, + initialResponseContainer + }); + } + async loadEventStreamCapability() { + const { EventStreamSerde: EventStreamSerde2 } = await Promise.resolve().then(() => (init_event_streams(), event_streams_exports)); + return new EventStreamSerde2({ + marshaller: this.getEventStreamMarshaller(), + serializer: this.serializer, + deserializer: this.deserializer, + serdeContext: this.serdeContext, + defaultContentType: this.getDefaultContentType() + }); + } + getDefaultContentType() { + throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`); + } + async deserializeHttpMessage(schema, context2, response, arg4, arg5) { + return []; + } + getEventStreamMarshaller() { + const context2 = this.serdeContext; + if (!context2.eventStreamMarshaller) { + throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext."); + } + return context2.eventStreamMarshaller; + } + }; + __name(HttpProtocol, "HttpProtocol"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +var HttpBindingProtocol; +var init_HttpBindingProtocol = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_serde2(); + init_dist_es2(); + init_dist_es11(); + init_collect_stream_body(); + init_extended_encode_uri_component(); + init_HttpProtocol(); + HttpBindingProtocol = class extends HttpProtocol { + async serializeRequest(operationSchema, _input, context2) { + const input = { + ..._input ?? {} + }; + const serializer = this.serializer; + const query = {}; + const headers = {}; + const endpoint = await context2.endpoint(); + const ns = NormalizedSchema.of(operationSchema?.input); + const payloadMemberNames = []; + const payloadMemberSchemas = []; + let hasNonHttpBindingMember = false; + let payload; + const request = new HttpRequest({ + protocol: "", + hostname: "", + port: void 0, + path: "", + fragment: void 0, + query, + headers, + body: void 0 + }); + if (endpoint) { + this.updateServiceEndpoint(request, endpoint); + this.setHostPrefix(request, operationSchema, input); + const opTraits = translateTraits(operationSchema.traits); + if (opTraits.http) { + request.method = opTraits.http[0]; + const [path, search] = opTraits.http[1].split("?"); + if (request.path == "/") { + request.path = path; + } else { + request.path += path; + } + const traitSearchParams = new URLSearchParams(search ?? ""); + Object.assign(query, Object.fromEntries(traitSearchParams)); + } + } + for (const [memberName, memberNs] of ns.structIterator()) { + const memberTraits = memberNs.getMergedTraits() ?? {}; + const inputMemberValue = input[memberName]; + if (inputMemberValue == null && !memberNs.isIdempotencyToken()) { + if (memberTraits.httpLabel) { + if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) { + throw new Error(`No value provided for input HTTP label: ${memberName}.`); + } + } + continue; + } + if (memberTraits.httpPayload) { + const isStreaming2 = memberNs.isStreaming(); + if (isStreaming2) { + const isEventStream = memberNs.isStructSchema(); + if (isEventStream) { + if (input[memberName]) { + payload = await this.serializeEventStream({ + eventStream: input[memberName], + requestSchema: ns + }); + } + } else { + payload = inputMemberValue; + } + } else { + serializer.write(memberNs, inputMemberValue); + payload = serializer.flush(); + } + delete input[memberName]; + } else if (memberTraits.httpLabel) { + serializer.write(memberNs, inputMemberValue); + const replacement = serializer.flush(); + if (request.path.includes(`{${memberName}+}`)) { + request.path = request.path.replace(`{${memberName}+}`, replacement.split("/").map(extendedEncodeURIComponent).join("/")); + } else if (request.path.includes(`{${memberName}}`)) { + request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement)); + } + delete input[memberName]; + } else if (memberTraits.httpHeader) { + serializer.write(memberNs, inputMemberValue); + headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush()); + delete input[memberName]; + } else if (typeof memberTraits.httpPrefixHeaders === "string") { + for (const [key, val] of Object.entries(inputMemberValue)) { + const amalgam = memberTraits.httpPrefixHeaders + key; + serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val); + headers[amalgam.toLowerCase()] = serializer.flush(); + } + delete input[memberName]; + } else if (memberTraits.httpQuery || memberTraits.httpQueryParams) { + this.serializeQuery(memberNs, inputMemberValue, query); + delete input[memberName]; + } else { + hasNonHttpBindingMember = true; + payloadMemberNames.push(memberName); + payloadMemberSchemas.push(memberNs); + } + } + if (hasNonHttpBindingMember && input) { + const [namespace, name] = (ns.getName(true) ?? "#Unknown").split("#"); + const requiredMembers = ns.getSchema()[6]; + const payloadSchema = [ + 3, + namespace, + name, + ns.getMergedTraits(), + payloadMemberNames, + payloadMemberSchemas, + void 0 + ]; + if (requiredMembers) { + payloadSchema[6] = requiredMembers; + } else { + payloadSchema.pop(); + } + serializer.write(payloadSchema, input); + payload = serializer.flush(); + } + request.headers = headers; + request.query = query; + request.body = payload; + return request; + } + serializeQuery(ns, data, query) { + const serializer = this.serializer; + const traits = ns.getMergedTraits(); + if (traits.httpQueryParams) { + for (const [key, val] of Object.entries(data)) { + if (!(key in query)) { + const valueSchema = ns.getValueSchema(); + Object.assign(valueSchema.getMergedTraits(), { + ...traits, + httpQuery: key, + httpQueryParams: void 0 + }); + this.serializeQuery(valueSchema, val, query); + } + } + return; + } + if (ns.isListSchema()) { + const sparse = !!ns.getMergedTraits().sparse; + const buffer = []; + for (const item of data) { + serializer.write([ns.getValueSchema(), traits], item); + const serializable = serializer.flush(); + if (sparse || serializable !== void 0) { + buffer.push(serializable); + } + } + query[traits.httpQuery] = buffer; + } else { + serializer.write([ns, traits], data); + query[traits.httpQuery] = serializer.flush(); + } + } + async deserializeResponse(operationSchema, context2, response) { + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(operationSchema.output); + const dataObject = {}; + if (response.statusCode >= 300) { + const bytes = await collectBody(response.body, context2); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(15, bytes)); + } + await this.handleError(operationSchema, context2, response, dataObject, this.deserializeMetadata(response)); + throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw."); + } + for (const header in response.headers) { + const value = response.headers[header]; + delete response.headers[header]; + response.headers[header.toLowerCase()] = value; + } + const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context2, response, dataObject); + if (nonHttpBindingMembers.length) { + const bytes = await collectBody(response.body, context2); + if (bytes.byteLength > 0) { + const dataFromBody = await deserializer.read(ns, bytes); + for (const member2 of nonHttpBindingMembers) { + if (dataFromBody[member2] != null) { + dataObject[member2] = dataFromBody[member2]; + } + } + } + } else if (nonHttpBindingMembers.discardResponseBody) { + await collectBody(response.body, context2); + } + dataObject.$metadata = this.deserializeMetadata(response); + return dataObject; + } + async deserializeHttpMessage(schema, context2, response, arg4, arg5) { + let dataObject; + if (arg4 instanceof Set) { + dataObject = arg5; + } else { + dataObject = arg4; + } + let discardResponseBody = true; + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(schema); + const nonHttpBindingMembers = []; + for (const [memberName, memberSchema] of ns.structIterator()) { + const memberTraits = memberSchema.getMemberTraits(); + if (memberTraits.httpPayload) { + discardResponseBody = false; + const isStreaming2 = memberSchema.isStreaming(); + if (isStreaming2) { + const isEventStream = memberSchema.isStructSchema(); + if (isEventStream) { + dataObject[memberName] = await this.deserializeEventStream({ + response, + responseSchema: ns + }); + } else { + dataObject[memberName] = sdkStreamMixin(response.body); + } + } else if (response.body) { + const bytes = await collectBody(response.body, context2); + if (bytes.byteLength > 0) { + dataObject[memberName] = await deserializer.read(memberSchema, bytes); + } + } + } else if (memberTraits.httpHeader) { + const key = String(memberTraits.httpHeader).toLowerCase(); + const value = response.headers[key]; + if (null != value) { + if (memberSchema.isListSchema()) { + const headerListValueSchema = memberSchema.getValueSchema(); + headerListValueSchema.getMergedTraits().httpHeader = key; + let sections; + if (headerListValueSchema.isTimestampSchema() && headerListValueSchema.getSchema() === 4) { + sections = splitEvery(value, ",", 2); + } else { + sections = splitHeader(value); + } + const list = []; + for (const section of sections) { + list.push(await deserializer.read(headerListValueSchema, section.trim())); + } + dataObject[memberName] = list; + } else { + dataObject[memberName] = await deserializer.read(memberSchema, value); + } + } + } else if (memberTraits.httpPrefixHeaders !== void 0) { + dataObject[memberName] = {}; + for (const [header, value] of Object.entries(response.headers)) { + if (header.startsWith(memberTraits.httpPrefixHeaders)) { + const valueSchema = memberSchema.getValueSchema(); + valueSchema.getMergedTraits().httpHeader = header; + dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value); + } + } + } else if (memberTraits.httpResponseCode) { + dataObject[memberName] = response.statusCode; + } else { + nonHttpBindingMembers.push(memberName); + } + } + nonHttpBindingMembers.discardResponseBody = discardResponseBody; + return nonHttpBindingMembers; + } + }; + __name(HttpBindingProtocol, "HttpBindingProtocol"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +var init_RpcProtocol = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js +var init_resolve_path = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js +var init_requestBuilder = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js +function determineTimestampFormat(ns, settings) { + if (settings.timestampFormat.useTrait) { + if (ns.isTimestampSchema() && (ns.getSchema() === 5 || ns.getSchema() === 6 || ns.getSchema() === 7)) { + return ns.getSchema(); + } + } + const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits(); + const bindingFormat = settings.httpBindings ? typeof httpPrefixHeaders === "string" || Boolean(httpHeader) ? 6 : Boolean(httpQuery) || Boolean(httpLabel) ? 5 : void 0 : void 0; + return bindingFormat ?? settings.timestampFormat.default; +} +var init_determineTimestampFormat = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(determineTimestampFormat, "determineTimestampFormat"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +var FromStringShapeDeserializer; +var init_FromStringShapeDeserializer = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_serde2(); + init_dist_es6(); + init_dist_es5(); + init_SerdeContext(); + init_determineTimestampFormat(); + FromStringShapeDeserializer = class extends SerdeContext { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + read(_schema, data) { + const ns = NormalizedSchema.of(_schema); + if (ns.isListSchema()) { + return splitHeader(data).map((item) => this.read(ns.getValueSchema(), item)); + } + if (ns.isBlobSchema()) { + return (this.serdeContext?.base64Decoder ?? fromBase64)(data); + } + if (ns.isTimestampSchema()) { + const format2 = determineTimestampFormat(ns, this.settings); + switch (format2) { + case 5: + return _parseRfc3339DateTimeWithOffset(data); + case 6: + return _parseRfc7231DateTime(data); + case 7: + return _parseEpochTimestamp(data); + default: + console.warn("Missing timestamp format, parsing value with Date constructor:", data); + return new Date(data); + } + } + if (ns.isStringSchema()) { + const mediaType = ns.getMergedTraits().mediaType; + let intermediateValue = data; + if (mediaType) { + if (ns.getMergedTraits().httpHeader) { + intermediateValue = this.base64ToUtf8(intermediateValue); + } + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + intermediateValue = LazyJsonString.from(intermediateValue); + } + return intermediateValue; + } + } + if (ns.isNumericSchema()) { + return Number(data); + } + if (ns.isBigIntegerSchema()) { + return BigInt(data); + } + if (ns.isBigDecimalSchema()) { + return new NumericValue(data, "bigDecimal"); + } + if (ns.isBooleanSchema()) { + return String(data).toLowerCase() === "true"; + } + return data; + } + base64ToUtf8(base64String) { + return (this.serdeContext?.utf8Encoder ?? toUtf8)((this.serdeContext?.base64Decoder ?? fromBase64)(base64String)); + } + }; + __name(FromStringShapeDeserializer, "FromStringShapeDeserializer"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js +var HttpInterceptingShapeDeserializer; +var init_HttpInterceptingShapeDeserializer = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_dist_es5(); + init_SerdeContext(); + init_FromStringShapeDeserializer(); + HttpInterceptingShapeDeserializer = class extends SerdeContext { + codecDeserializer; + stringDeserializer; + constructor(codecDeserializer, codecSettings) { + super(); + this.codecDeserializer = codecDeserializer; + this.stringDeserializer = new FromStringShapeDeserializer(codecSettings); + } + setSerdeContext(serdeContext) { + this.stringDeserializer.setSerdeContext(serdeContext); + this.codecDeserializer.setSerdeContext(serdeContext); + this.serdeContext = serdeContext; + } + read(schema, data) { + const ns = NormalizedSchema.of(schema); + const traits = ns.getMergedTraits(); + const toString3 = this.serdeContext?.utf8Encoder ?? toUtf8; + if (traits.httpHeader || traits.httpResponseCode) { + return this.stringDeserializer.read(ns, toString3(data)); + } + if (traits.httpPayload) { + if (ns.isBlobSchema()) { + const toBytes = this.serdeContext?.utf8Decoder ?? fromUtf8; + if (typeof data === "string") { + return toBytes(data); + } + return data; + } else if (ns.isStringSchema()) { + if ("byteLength" in data) { + return toString3(data); + } + return data; + } + } + return this.codecDeserializer.read(ns, data); + } + }; + __name(HttpInterceptingShapeDeserializer, "HttpInterceptingShapeDeserializer"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +var ToStringShapeSerializer; +var init_ToStringShapeSerializer = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_serde2(); + init_dist_es6(); + init_SerdeContext(); + init_determineTimestampFormat(); + ToStringShapeSerializer = class extends SerdeContext { + settings; + stringBuffer = ""; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + switch (typeof value) { + case "object": + if (value === null) { + this.stringBuffer = "null"; + return; + } + if (ns.isTimestampSchema()) { + if (!(value instanceof Date)) { + throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`); + } + const format2 = determineTimestampFormat(ns, this.settings); + switch (format2) { + case 5: + this.stringBuffer = value.toISOString().replace(".000Z", "Z"); + break; + case 6: + this.stringBuffer = dateToUtcString(value); + break; + case 7: + this.stringBuffer = String(value.getTime() / 1e3); + break; + default: + console.warn("Missing timestamp format, using epoch seconds", value); + this.stringBuffer = String(value.getTime() / 1e3); + } + return; + } + if (ns.isBlobSchema() && "byteLength" in value) { + this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(value); + return; + } + if (ns.isListSchema() && Array.isArray(value)) { + let buffer = ""; + for (const item of value) { + this.write([ns.getValueSchema(), ns.getMergedTraits()], item); + const headerItem = this.flush(); + const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : quoteHeader(headerItem); + if (buffer !== "") { + buffer += ", "; + } + buffer += serialized; + } + this.stringBuffer = buffer; + return; + } + this.stringBuffer = JSON.stringify(value, null, 2); + break; + case "string": + const mediaType = ns.getMergedTraits().mediaType; + let intermediateValue = value; + if (mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + intermediateValue = LazyJsonString.from(intermediateValue); + } + if (ns.getMergedTraits().httpHeader) { + this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(intermediateValue.toString()); + return; + } + } + this.stringBuffer = value; + break; + default: + if (ns.isIdempotencyToken()) { + this.stringBuffer = v4(); + } else { + this.stringBuffer = String(value); + } + } + } + flush() { + const buffer = this.stringBuffer; + this.stringBuffer = ""; + return buffer; + } + }; + __name(ToStringShapeSerializer, "ToStringShapeSerializer"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js +var HttpInterceptingShapeSerializer; +var init_HttpInterceptingShapeSerializer = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_ToStringShapeSerializer(); + HttpInterceptingShapeSerializer = class { + codecSerializer; + stringSerializer; + buffer; + constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) { + this.codecSerializer = codecSerializer; + this.stringSerializer = stringSerializer; + } + setSerdeContext(serdeContext) { + this.codecSerializer.setSerdeContext(serdeContext); + this.stringSerializer.setSerdeContext(serdeContext); + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + const traits = ns.getMergedTraits(); + if (traits.httpHeader || traits.httpLabel || traits.httpQuery) { + this.stringSerializer.write(ns, value); + this.buffer = this.stringSerializer.flush(); + return; + } + return this.codecSerializer.write(ns, value); + } + flush() { + if (this.buffer !== void 0) { + const buffer = this.buffer; + this.buffer = void 0; + return buffer; + } + return this.codecSerializer.flush(); + } + }; + __name(HttpInterceptingShapeSerializer, "HttpInterceptingShapeSerializer"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/index.js +var init_protocols = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_collect_stream_body(); + init_extended_encode_uri_component(); + init_HttpBindingProtocol(); + init_HttpProtocol(); + init_RpcProtocol(); + init_requestBuilder(); + init_resolve_path(); + init_FromStringShapeDeserializer(); + init_HttpInterceptingShapeDeserializer(); + init_HttpInterceptingShapeSerializer(); + init_ToStringShapeSerializer(); + init_determineTimestampFormat(); + init_SerdeContext(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js +var init_requestBuilder2 = __esm({ + "../../node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/setFeature.js +function setFeature2(context2, feature2, value) { + if (!context2.__smithy_context) { + context2.__smithy_context = { + features: {} + }; + } else if (!context2.__smithy_context.features) { + context2.__smithy_context.features = {}; + } + context2.__smithy_context.features[feature2] = value; +} +var init_setFeature2 = __esm({ + "../../node_modules/@smithy/core/dist-es/setFeature.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(setFeature2, "setFeature"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +var DefaultIdentityProviderConfig; +var init_DefaultIdentityProviderConfig = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + DefaultIdentityProviderConfig = class { + authSchemes = /* @__PURE__ */ new Map(); + constructor(config3) { + for (const [key, value] of Object.entries(config3)) { + if (value !== void 0) { + this.authSchemes.set(key, value); + } + } + } + getIdentityProvider(schemeId) { + return this.authSchemes.get(schemeId); + } + }; + __name(DefaultIdentityProviderConfig, "DefaultIdentityProviderConfig"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +var init_httpApiKeyAuth = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +var init_httpBearerAuth = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js +var init_noAuth = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js +var init_httpAuthSchemes = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpApiKeyAuth(); + init_httpBearerAuth(); + init_noAuth(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js +var createIsIdentityExpiredFunction, EXPIRATION_MS, isIdentityExpired, doesIdentityRequireRefresh, memoizeIdentityProvider; +var init_memoizeIdentityProvider = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + createIsIdentityExpiredFunction = /* @__PURE__ */ __name((expirationMs) => /* @__PURE__ */ __name(function isIdentityExpired2(identity2) { + return doesIdentityRequireRefresh(identity2) && identity2.expiration.getTime() - Date.now() < expirationMs; + }, "isIdentityExpired"), "createIsIdentityExpiredFunction"); + EXPIRATION_MS = 3e5; + isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); + doesIdentityRequireRefresh = /* @__PURE__ */ __name((identity2) => identity2.expiration !== void 0, "doesIdentityRequireRefresh"); + memoizeIdentityProvider = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { + if (provider === void 0) { + return void 0; + } + const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider; + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = /* @__PURE__ */ __name(async (options) => { + if (!pending) { + pending = normalizedProvider(options); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; + } + return resolved; + }, "coalesceProvider"); + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(options); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(options); + } + if (isConstant) { + return resolved; + } + if (!requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(options); + return resolved; + } + return resolved; + }; + }, "memoizeIdentityProvider"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js +var init_util_identity_and_auth = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_DefaultIdentityProviderConfig(); + init_httpAuthSchemes(); + init_memoizeIdentityProvider(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/index.js +var init_dist_es15 = __esm({ + "../../node_modules/@smithy/core/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getSmithyContext(); + init_middleware_http_auth_scheme(); + init_middleware_http_signing(); + init_normalizeProvider2(); + init_createPaginator(); + init_requestBuilder2(); + init_setFeature2(); + init_util_identity_and_auth(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/ProviderError.js +var init_ProviderError = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/ProviderError.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js +var init_CredentialsProviderError = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/TokenProviderError.js +var init_TokenProviderError = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/TokenProviderError.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/chain.js +var init_chain = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/chain.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/fromStatic.js +var init_fromStatic = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/fromStatic.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/memoize.js +var memoize; +var init_memoize = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/memoize.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = /* @__PURE__ */ __name(async () => { + if (!pending) { + pending = provider(); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; + } + return resolved; + }, "coalesceProvider"); + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + if (isConstant) { + return resolved; + } + if (requiresRefresh && !requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(); + return resolved; + } + return resolved; + }; + }, "memoize"); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/index.js +var init_dist_es16 = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_CredentialsProviderError(); + init_ProviderError(); + init_TokenProviderError(); + init_chain(); + init_fromStatic(); + init_memoize(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js +var resolveAwsSdkSigV4AConfig; +var init_resolveAwsSdkSigV4AConfig = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + resolveAwsSdkSigV4AConfig = /* @__PURE__ */ __name((config3) => { + config3.sigv4aSigningRegionSet = normalizeProvider2(config3.sigv4aSigningRegionSet); + return config3; + }, "resolveAwsSdkSigV4AConfig"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/constants.js +var ALGORITHM_QUERY_PARAM, CREDENTIAL_QUERY_PARAM, AMZ_DATE_QUERY_PARAM, SIGNED_HEADERS_QUERY_PARAM, EXPIRES_QUERY_PARAM, SIGNATURE_QUERY_PARAM, TOKEN_QUERY_PARAM, AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER, GENERATED_HEADERS, SIGNATURE_HEADER, SHA256_HEADER, TOKEN_HEADER, ALWAYS_UNSIGNABLE_HEADERS, PROXY_HEADER_PATTERN, SEC_HEADER_PATTERN, ALGORITHM_IDENTIFIER, EVENT_ALGORITHM_IDENTIFIER, UNSIGNED_PAYLOAD, MAX_CACHE_SIZE, KEY_TYPE_IDENTIFIER, MAX_PRESIGNED_TTL; +var init_constants4 = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; + CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; + AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; + SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; + EXPIRES_QUERY_PARAM = "X-Amz-Expires"; + SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; + TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; + AUTH_HEADER = "authorization"; + AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); + DATE_HEADER = "date"; + GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; + SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); + SHA256_HEADER = "x-amz-content-sha256"; + TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); + ALWAYS_UNSIGNABLE_HEADERS = { + authorization: true, + "cache-control": true, + connection: true, + expect: true, + from: true, + "keep-alive": true, + "max-forwards": true, + pragma: true, + referer: true, + te: true, + trailer: true, + "transfer-encoding": true, + upgrade: true, + "user-agent": true, + "x-amzn-trace-id": true + }; + PROXY_HEADER_PATTERN = /^proxy-/; + SEC_HEADER_PATTERN = /^sec-/; + ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; + EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; + UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; + MAX_CACHE_SIZE = 50; + KEY_TYPE_IDENTIFIER = "aws4_request"; + MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js +var signingKeyCache, cacheQueue, createScope, getSigningKey, hmac; +var init_credentialDerivation = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + init_dist_es5(); + init_constants4(); + signingKeyCache = {}; + cacheQueue = []; + createScope = /* @__PURE__ */ __name((shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, "createScope"); + getSigningKey = /* @__PURE__ */ __name(async (sha256Constructor, credentials, shortDate, region, service) => { + const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); + const cacheKey = `${shortDate}:${region}:${service}:${toHex(credsHash)}:${credentials.sessionToken}`; + if (cacheKey in signingKeyCache) { + return signingKeyCache[cacheKey]; + } + cacheQueue.push(cacheKey); + while (cacheQueue.length > MAX_CACHE_SIZE) { + delete signingKeyCache[cacheQueue.shift()]; + } + let key = `AWS4${credentials.secretAccessKey}`; + for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { + key = await hmac(sha256Constructor, key, signable); + } + return signingKeyCache[cacheKey] = key; + }, "getSigningKey"); + hmac = /* @__PURE__ */ __name((ctor, secret, data) => { + const hash4 = new ctor(secret); + hash4.update(toUint8Array(data)); + return hash4.digest(); + }, "hmac"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +var getCanonicalHeaders; +var init_getCanonicalHeaders = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants4(); + getCanonicalHeaders = /* @__PURE__ */ __name(({ headers }, unsignableHeaders, signableHeaders) => { + const canonical = {}; + for (const headerName of Object.keys(headers).sort()) { + if (headers[headerName] == void 0) { + continue; + } + const canonicalHeaderName = headerName.toLowerCase(); + if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) { + if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) { + continue; + } + } + canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); + } + return canonical; + }, "getCanonicalHeaders"); + } +}); + +// ../../node_modules/@smithy/is-array-buffer/dist-es/index.js +var isArrayBuffer; +var init_dist_es17 = __esm({ + "../../node_modules/@smithy/is-array-buffer/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +var getPayloadHash; +var init_getPayloadHash = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es17(); + init_dist_es10(); + init_dist_es5(); + init_constants4(); + getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => { + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase() === SHA256_HEADER) { + return headers[headerName]; + } + } + if (body == void 0) { + return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + } else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer(body)) { + const hashCtor = new hashConstructor(); + hashCtor.update(toUint8Array(body)); + return toHex(await hashCtor.digest()); + } + return UNSIGNED_PAYLOAD; + }, "getPayloadHash"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +function negate(bytes) { + for (let i2 = 0; i2 < 8; i2++) { + bytes[i2] ^= 255; + } + for (let i2 = 7; i2 > -1; i2--) { + bytes[i2]++; + if (bytes[i2] !== 0) + break; + } +} +var HeaderFormatter, HEADER_VALUE_TYPE, UUID_PATTERN, Int64; +var init_HeaderFormatter = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + init_dist_es5(); + HeaderFormatter = class { + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([header.value ? 0 : 1]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8(0, 3); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8(0, 4); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8(0, 6); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8(0, 7); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set(fromHex(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } + }; + __name(HeaderFormatter, "HeaderFormatter"); + (function(HEADER_VALUE_TYPE3) { + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["boolTrue"] = 0] = "boolTrue"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["boolFalse"] = 1] = "boolFalse"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["byte"] = 2] = "byte"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["short"] = 3] = "short"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["integer"] = 4] = "integer"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["long"] = 5] = "long"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["byteArray"] = 6] = "byteArray"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["string"] = 7] = "string"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["timestamp"] = 8] = "timestamp"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["uuid"] = 9] = "uuid"; + })(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {})); + UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; + Int64 = class { + bytes; + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static fromNumber(number4) { + if (number4 > 9223372036854776e3 || number4 < -9223372036854776e3) { + throw new Error(`${number4} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i2 = 7, remaining = Math.abs(Math.round(number4)); i2 > -1 && remaining > 0; i2--, remaining /= 256) { + bytes[i2] = remaining; + } + if (number4 < 0) { + negate(bytes); + } + return new Int64(bytes); + } + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate(bytes); + } + return parseInt(toHex(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } + }; + __name(Int64, "Int64"); + __name(negate, "negate"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/headerUtil.js +var hasHeader; +var init_headerUtil = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/headerUtil.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + hasHeader = /* @__PURE__ */ __name((soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; + }, "hasHeader"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +var moveHeadersToQuery; +var init_moveHeadersToQuery = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + moveHeadersToQuery = /* @__PURE__ */ __name((request, options = {}) => { + const { headers, query = {} } = HttpRequest.clone(request); + for (const name of Object.keys(headers)) { + const lname = name.toLowerCase(); + if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) { + query[name] = headers[name]; + delete headers[name]; + } + } + return { + ...request, + headers, + query + }; + }, "moveHeadersToQuery"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +var prepareRequest; +var init_prepareRequest = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/prepareRequest.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_constants4(); + prepareRequest = /* @__PURE__ */ __name((request) => { + request = HttpRequest.clone(request); + for (const headerName of Object.keys(request.headers)) { + if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { + delete request.headers[headerName]; + } + } + return request; + }, "prepareRequest"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +var getCanonicalQuery; +var init_getCanonicalQuery = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es7(); + init_constants4(); + getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => { + const keys = []; + const serialized = {}; + for (const key of Object.keys(query)) { + if (key.toLowerCase() === SIGNATURE_HEADER) { + continue; + } + const encodedKey = escapeUri(key); + keys.push(encodedKey); + const value = query[key]; + if (typeof value === "string") { + serialized[encodedKey] = `${encodedKey}=${escapeUri(value)}`; + } else if (Array.isArray(value)) { + serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${escapeUri(value2)}`]), []).sort().join("&"); + } + } + return keys.sort().map((key) => serialized[key]).filter((serialized2) => serialized2).join("&"); + }, "getCanonicalQuery"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/utilDate.js +var iso8601, toDate; +var init_utilDate = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/utilDate.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + iso8601 = /* @__PURE__ */ __name((time7) => toDate(time7).toISOString().replace(/\.\d{3}Z$/, "Z"), "iso8601"); + toDate = /* @__PURE__ */ __name((time7) => { + if (typeof time7 === "number") { + return new Date(time7 * 1e3); + } + if (typeof time7 === "string") { + if (Number(time7)) { + return new Date(Number(time7) * 1e3); + } + return new Date(time7); + } + return time7; + }, "toDate"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +var SignatureV4Base; +var init_SignatureV4Base = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + init_dist_es4(); + init_dist_es7(); + init_dist_es5(); + init_getCanonicalQuery(); + init_utilDate(); + SignatureV4Base = class { + service; + regionProvider; + credentialProvider; + sha256; + uriEscapePath; + applyChecksum; + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) { + this.service = service; + this.sha256 = sha256; + this.uriEscapePath = uriEscapePath; + this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; + this.regionProvider = normalizeProvider(region); + this.credentialProvider = normalizeProvider(credentials); + } + createCanonicalRequest(request, canonicalHeaders, payloadHash) { + const sortedHeaders = Object.keys(canonicalHeaders).sort(); + return `${request.method} +${this.getCanonicalPath(request)} +${getCanonicalQuery(request)} +${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")} + +${sortedHeaders.join(";")} +${payloadHash}`; + } + async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) { + const hash4 = new this.sha256(); + hash4.update(toUint8Array(canonicalRequest)); + const hashedRequest = await hash4.digest(); + return `${algorithmIdentifier} +${longDate} +${credentialScope} +${toHex(hashedRequest)}`; + } + getCanonicalPath({ path }) { + if (this.uriEscapePath) { + const normalizedPathSegments = []; + for (const pathSegment of path.split("/")) { + if (pathSegment?.length === 0) + continue; + if (pathSegment === ".") + continue; + if (pathSegment === "..") { + normalizedPathSegments.pop(); + } else { + normalizedPathSegments.push(pathSegment); + } + } + const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`; + const doubleEncoded = escapeUri(normalizedPath); + return doubleEncoded.replace(/%2F/g, "/"); + } + return path; + } + validateResolvedCredentials(credentials) { + if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") { + throw new Error("Resolved credential object is not valid"); + } + } + formatDate(now) { + const longDate = iso8601(now).replace(/[\-:]/g, ""); + return { + longDate, + shortDate: longDate.slice(0, 8) + }; + } + getCanonicalHeaderList(headers) { + return Object.keys(headers).sort().join(";"); + } + }; + __name(SignatureV4Base, "SignatureV4Base"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/SignatureV4.js +var SignatureV4; +var init_SignatureV4 = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/SignatureV4.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + init_dist_es5(); + init_constants4(); + init_credentialDerivation(); + init_getCanonicalHeaders(); + init_getPayloadHash(); + init_HeaderFormatter(); + init_headerUtil(); + init_moveHeadersToQuery(); + init_prepareRequest(); + init_SignatureV4Base(); + SignatureV4 = class extends SignatureV4Base { + headerFormatter = new HeaderFormatter(); + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) { + super({ + applyChecksum, + credentials, + region, + service, + sha256, + uriEscapePath + }); + } + async presign(originalRequest, options = {}) { + const { signingDate = /* @__PURE__ */ new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService } = options; + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { longDate, shortDate } = this.formatDate(signingDate); + if (expiresIn > MAX_PRESIGNED_TTL) { + return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future"); + } + const scope = createScope(shortDate, region, signingService ?? this.service); + const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders }); + if (credentials.sessionToken) { + request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken; + } + request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER; + request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; + request.query[AMZ_DATE_QUERY_PARAM] = longDate; + request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10); + const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders); + request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256))); + return request; + } + async sign(toSign, options) { + if (typeof toSign === "string") { + return this.signString(toSign, options); + } else if (toSign.headers && toSign.payload) { + return this.signEvent(toSign, options); + } else if (toSign.message) { + return this.signMessage(toSign, options); + } else { + return this.signRequest(toSign, options); + } + } + async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) { + const region = signingRegion ?? await this.regionProvider(); + const { shortDate, longDate } = this.formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256); + const hash4 = new this.sha256(); + hash4.update(headers); + const hashedHeaders = toHex(await hash4.digest()); + const stringToSign = [ + EVENT_ALGORITHM_IDENTIFIER, + longDate, + scope, + priorSignature, + hashedHeaders, + hashedPayload + ].join("\n"); + return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); + } + async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) { + const promise2 = this.signEvent({ + headers: this.headerFormatter.format(signableMessage.message.headers), + payload: signableMessage.message.body + }, { + signingDate, + signingRegion, + signingService, + priorSignature: signableMessage.priorSignature + }); + return promise2.then((signature) => { + return { message: signableMessage.message, signature }; + }); + } + async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { shortDate } = this.formatDate(signingDate); + const hash4 = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); + hash4.update(toUint8Array(stringToSign)); + return toHex(await hash4.digest()); + } + async signRequest(requestToSign, { signingDate = /* @__PURE__ */ new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const request = prepareRequest(requestToSign); + const { longDate, shortDate } = this.formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + request.headers[AMZ_DATE_HEADER] = longDate; + if (credentials.sessionToken) { + request.headers[TOKEN_HEADER] = credentials.sessionToken; + } + const payloadHash = await getPayloadHash(request, this.sha256); + if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) { + request.headers[SHA256_HEADER] = payloadHash; + } + const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash)); + request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`; + return request; + } + async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { + const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER); + const hash4 = new this.sha256(await keyPromise); + hash4.update(toUint8Array(stringToSign)); + return toHex(await hash4.digest()); + } + getSigningKey(credentials, region, shortDate, service) { + return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); + } + }; + __name(SignatureV4, "SignatureV4"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/signature-v4a-container.js +var signatureV4aContainer; +var init_signature_v4a_container = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/signature-v4a-container.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + signatureV4aContainer = { + SignatureV4a: null + }; + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/index.js +var init_dist_es18 = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_SignatureV4(); + init_constants4(); + init_credentialDerivation(); + init_signature_v4a_container(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js +function normalizeCredentialProvider(config3, { credentials, credentialDefaultProvider }) { + let credentialsProvider; + if (credentials) { + if (!credentials?.memoized) { + credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh); + } else { + credentialsProvider = credentials; + } + } else { + if (credentialDefaultProvider) { + credentialsProvider = normalizeProvider2(credentialDefaultProvider(Object.assign({}, config3, { + parentClientConfig: config3 + }))); + } else { + credentialsProvider = /* @__PURE__ */ __name(async () => { + throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured."); + }, "credentialsProvider"); + } + } + credentialsProvider.memoized = true; + return credentialsProvider; +} +function bindCallerConfig(config3, credentialsProvider) { + if (credentialsProvider.configBound) { + return credentialsProvider; + } + const fn = /* @__PURE__ */ __name(async (options) => credentialsProvider({ ...options, callerClientConfig: config3 }), "fn"); + fn.memoized = credentialsProvider.memoized; + fn.configBound = true; + return fn; +} +var resolveAwsSdkSigV4Config; +var init_resolveAwsSdkSigV4Config = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_client2(); + init_dist_es15(); + init_dist_es18(); + resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config3) => { + let inputCredentials = config3.credentials; + let isUserSupplied = !!config3.credentials; + let resolvedCredentials = void 0; + Object.defineProperty(config3, "credentials", { + set(credentials) { + if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) { + isUserSupplied = true; + } + inputCredentials = credentials; + const memoizedProvider = normalizeCredentialProvider(config3, { + credentials: inputCredentials, + credentialDefaultProvider: config3.credentialDefaultProvider + }); + const boundProvider = bindCallerConfig(config3, memoizedProvider); + if (isUserSupplied && !boundProvider.attributed) { + const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null; + resolvedCredentials = /* @__PURE__ */ __name(async (options) => { + const creds = await boundProvider(options); + const attributedCreds = creds; + if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) { + return setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e"); + } + return attributedCreds; + }, "resolvedCredentials"); + resolvedCredentials.memoized = boundProvider.memoized; + resolvedCredentials.configBound = boundProvider.configBound; + resolvedCredentials.attributed = true; + } else { + resolvedCredentials = boundProvider; + } + }, + get() { + return resolvedCredentials; + }, + enumerable: true, + configurable: true + }); + config3.credentials = inputCredentials; + const { signingEscapePath = true, systemClockOffset = config3.systemClockOffset || 0, sha256 } = config3; + let signer; + if (config3.signer) { + signer = normalizeProvider2(config3.signer); + } else if (config3.regionInfoProvider) { + signer = /* @__PURE__ */ __name(() => normalizeProvider2(config3.region)().then(async (region) => [ + await config3.regionInfoProvider(region, { + useFipsEndpoint: await config3.useFipsEndpoint(), + useDualstackEndpoint: await config3.useDualstackEndpoint() + }) || {}, + region + ]).then(([regionInfo, region]) => { + const { signingRegion, signingService } = regionInfo; + config3.signingRegion = config3.signingRegion || signingRegion || region; + config3.signingName = config3.signingName || signingService || config3.serviceId; + const params = { + ...config3, + credentials: config3.credentials, + region: config3.signingRegion, + service: config3.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config3.signerConstructor || SignatureV4; + return new SignerCtor(params); + }), "signer"); + } else { + signer = /* @__PURE__ */ __name(async (authScheme) => { + authScheme = Object.assign({}, { + name: "sigv4", + signingName: config3.signingName || config3.defaultSigningName, + signingRegion: await normalizeProvider2(config3.region)(), + properties: {} + }, authScheme); + const signingRegion = authScheme.signingRegion; + const signingService = authScheme.signingName; + config3.signingRegion = config3.signingRegion || signingRegion; + config3.signingName = config3.signingName || signingService || config3.serviceId; + const params = { + ...config3, + credentials: config3.credentials, + region: config3.signingRegion, + service: config3.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config3.signerConstructor || SignatureV4; + return new SignerCtor(params); + }, "signer"); + } + const resolvedConfig = Object.assign(config3, { + systemClockOffset, + signingEscapePath, + signer + }); + return resolvedConfig; + }, "resolveAwsSdkSigV4Config"); + __name(normalizeCredentialProvider, "normalizeCredentialProvider"); + __name(bindCallerConfig, "bindCallerConfig"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js +var init_aws_sdk = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AwsSdkSigV4Signer(); + init_AwsSdkSigV4ASigner(); + init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS(); + init_resolveAwsSdkSigV4AConfig(); + init_resolveAwsSdkSigV4Config(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js +var init_httpAuthSchemes2 = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_aws_sdk(); + init_getBearerTokenEnvKey(); + } +}); + +// ../../node_modules/@smithy/util-body-length-browser/dist-es/calculateBodyLength.js +var TEXT_ENCODER, calculateBodyLength; +var init_calculateBodyLength = __esm({ + "../../node_modules/@smithy/util-body-length-browser/dist-es/calculateBodyLength.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + TEXT_ENCODER = typeof TextEncoder == "function" ? new TextEncoder() : null; + calculateBodyLength = /* @__PURE__ */ __name((body) => { + if (typeof body === "string") { + if (TEXT_ENCODER) { + return TEXT_ENCODER.encode(body).byteLength; + } + let len = body.length; + for (let i2 = len - 1; i2 >= 0; i2--) { + const code = body.charCodeAt(i2); + if (code > 127 && code <= 2047) + len++; + else if (code > 2047 && code <= 65535) + len += 2; + if (code >= 56320 && code <= 57343) + i2--; + } + return len; + } else if (typeof body.byteLength === "number") { + return body.byteLength; + } else if (typeof body.size === "number") { + return body.size; + } + throw new Error(`Body Length computation failed for ${body}`); + }, "calculateBodyLength"); + } +}); + +// ../../node_modules/@smithy/util-body-length-browser/dist-es/index.js +var init_dist_es19 = __esm({ + "../../node_modules/@smithy/util-body-length-browser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_calculateBodyLength(); + } +}); + +// ../../node_modules/@smithy/middleware-stack/dist-es/MiddlewareStack.js +var getAllAliases, getMiddlewareNameWithAliases, constructStack, stepWeights, priorityWeights; +var init_MiddlewareStack = __esm({ + "../../node_modules/@smithy/middleware-stack/dist-es/MiddlewareStack.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getAllAliases = /* @__PURE__ */ __name((name, aliases) => { + const _aliases = []; + if (name) { + _aliases.push(name); + } + if (aliases) { + for (const alias of aliases) { + _aliases.push(alias); + } + } + return _aliases; + }, "getAllAliases"); + getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => { + return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; + }, "getMiddlewareNameWithAliases"); + constructStack = /* @__PURE__ */ __name(() => { + let absoluteEntries = []; + let relativeEntries = []; + let identifyOnResolve = false; + const entriesNameSet = /* @__PURE__ */ new Set(); + const sort = /* @__PURE__ */ __name((entries) => entries.sort((a2, b2) => stepWeights[b2.step] - stepWeights[a2.step] || priorityWeights[b2.priority || "normal"] - priorityWeights[a2.priority || "normal"]), "sort"); + const removeByName = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + const aliases = getAllAliases(entry.name, entry.aliases); + if (aliases.includes(toRemove)) { + isRemoved = true; + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByName"); + const removeByReference = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + if (entry.middleware === toRemove) { + isRemoved = true; + for (const alias of getAllAliases(entry.name, entry.aliases)) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByReference"); + const cloneTo = /* @__PURE__ */ __name((toStack) => { + absoluteEntries.forEach((entry) => { + toStack.add(entry.middleware, { ...entry }); + }); + relativeEntries.forEach((entry) => { + toStack.addRelativeTo(entry.middleware, { ...entry }); + }); + toStack.identifyOnResolve?.(stack.identifyOnResolve()); + return toStack; + }, "cloneTo"); + const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => { + const expandedMiddlewareList = []; + from.before.forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + expandedMiddlewareList.push(from); + from.after.reverse().forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + return expandedMiddlewareList; + }, "expandRelativeMiddlewareList"); + const getMiddlewareList = /* @__PURE__ */ __name((debug3 = false) => { + const normalizedAbsoluteEntries = []; + const normalizedRelativeEntries = []; + const normalizedEntriesNameMap = {}; + absoluteEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedAbsoluteEntries.push(normalizedEntry); + }); + relativeEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedRelativeEntries.push(normalizedEntry); + }); + normalizedRelativeEntries.forEach((entry) => { + if (entry.toMiddleware) { + const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; + if (toMiddleware === void 0) { + if (debug3) { + return; + } + throw new Error(`${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`); + } + if (entry.relation === "after") { + toMiddleware.after.push(entry); + } + if (entry.relation === "before") { + toMiddleware.before.push(entry); + } + } + }); + const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => { + wholeList.push(...expandedMiddlewareList); + return wholeList; + }, []); + return mainChain; + }, "getMiddlewareList"); + const stack = { + add: (middleware2, options = {}) => { + const { name, override, aliases: _aliases } = options; + const entry = { + step: "initialize", + priority: "normal", + middleware: middleware2, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = absoluteEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a2) => a2 === alias)); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = absoluteEntries[toOverrideIndex]; + if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ${entry.priority} priority in ${entry.step} step.`); + } + absoluteEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + absoluteEntries.push(entry); + }, + addRelativeTo: (middleware2, options) => { + const { name, override, aliases: _aliases } = options; + const entry = { + middleware: middleware2, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = relativeEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a2) => a2 === alias)); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = relativeEntries[toOverrideIndex]; + if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.`); + } + relativeEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + relativeEntries.push(entry); + }, + clone: () => cloneTo(constructStack()), + use: (plugin) => { + plugin.applyToStack(stack); + }, + remove: (toRemove) => { + if (typeof toRemove === "string") + return removeByName(toRemove); + else + return removeByReference(toRemove); + }, + removeByTag: (toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + const { tags, name, aliases: _aliases } = entry; + if (tags && tags.includes(toRemove)) { + const aliases = getAllAliases(name, _aliases); + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + isRemoved = true; + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, + concat: (from) => { + const cloned = cloneTo(constructStack()); + cloned.use(from); + cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false)); + return cloned; + }, + applyToStack: cloneTo, + identify: () => { + return getMiddlewareList(true).map((mw) => { + const step = mw.step ?? mw.relation + " " + mw.toMiddleware; + return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; + }); + }, + identifyOnResolve(toggle) { + if (typeof toggle === "boolean") + identifyOnResolve = toggle; + return identifyOnResolve; + }, + resolve: (handler, context2) => { + for (const middleware2 of getMiddlewareList().map((entry) => entry.middleware).reverse()) { + handler = middleware2(handler, context2); + } + if (identifyOnResolve) { + console.log(stack.identify()); + } + return handler; + } + }; + return stack; + }, "constructStack"); + stepWeights = { + initialize: 5, + serialize: 4, + build: 3, + finalizeRequest: 2, + deserialize: 1 + }; + priorityWeights = { + high: 3, + normal: 2, + low: 1 + }; + } +}); + +// ../../node_modules/@smithy/middleware-stack/dist-es/index.js +var init_dist_es20 = __esm({ + "../../node_modules/@smithy/middleware-stack/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_MiddlewareStack(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/client.js +var Client; +var init_client3 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/client.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es20(); + Client = class { + config; + middlewareStack = constructStack(); + initConfig; + handlers; + constructor(config3) { + this.config = config3; + const { protocol, protocolSettings } = config3; + if (protocolSettings) { + if (typeof protocol === "function") { + config3.protocol = new protocol(protocolSettings); + } + } + } + send(command, optionsOrCb, cb2) { + const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0; + const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb2; + const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true; + let handler; + if (useHandlerCache) { + if (!this.handlers) { + this.handlers = /* @__PURE__ */ new WeakMap(); + } + const handlers2 = this.handlers; + if (handlers2.has(command.constructor)) { + handler = handlers2.get(command.constructor); + } else { + handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + handlers2.set(command.constructor, handler); + } + } else { + delete this.handlers; + handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + } + if (callback) { + handler(command).then((result) => callback(null, result.output), (err) => callback(err)).catch(() => { + }); + } else { + return handler(command).then((result) => result.output); + } + } + destroy() { + this.config?.requestHandler?.destroy?.(); + delete this.handlers; + } + }; + __name(Client, "Client"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js +var init_collect_stream_body2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/schemaLogFilter.js +function schemaLogFilter(schema, data) { + if (data == null) { + return data; + } + const ns = NormalizedSchema.of(schema); + if (ns.getMergedTraits().sensitive) { + return SENSITIVE_STRING; + } + if (ns.isListSchema()) { + const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING; + } + } else if (ns.isMapSchema()) { + const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING; + } + } else if (ns.isStructSchema() && typeof data === "object") { + const object2 = data; + const newObject = {}; + for (const [member2, memberNs] of ns.structIterator()) { + if (object2[member2] != null) { + newObject[member2] = schemaLogFilter(memberNs, object2[member2]); + } + } + return newObject; + } + return data; +} +var SENSITIVE_STRING; +var init_schemaLogFilter = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/schemaLogFilter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + SENSITIVE_STRING = "***SensitiveInformation***"; + __name(schemaLogFilter, "schemaLogFilter"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/command.js +var Command, ClassBuilder; +var init_command2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/command.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es20(); + init_dist_es(); + init_schemaLogFilter(); + Command = class { + middlewareStack = constructStack(); + schema; + static classBuilder() { + return new ClassBuilder(); + } + resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) { + for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { + this.middlewareStack.use(mw); + } + const stack = clientStack.concat(this.middlewareStack); + const { logger: logger3 } = configuration; + const handlerExecutionContext = { + logger: logger3, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + commandInstance: this, + ...smithyContext + }, + ...additionalContext + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + }; + __name(Command, "Command"); + ClassBuilder = class { + _init = () => { + }; + _ep = {}; + _middlewareFn = () => []; + _commandName = ""; + _clientName = ""; + _additionalContext = {}; + _smithyContext = {}; + _inputFilterSensitiveLog = void 0; + _outputFilterSensitiveLog = void 0; + _serializer = null; + _deserializer = null; + _operationSchema; + init(cb2) { + this._init = cb2; + } + ep(endpointParameterInstructions) { + this._ep = endpointParameterInstructions; + return this; + } + m(middlewareSupplier) { + this._middlewareFn = middlewareSupplier; + return this; + } + s(service, operation2, smithyContext = {}) { + this._smithyContext = { + service, + operation: operation2, + ...smithyContext + }; + return this; + } + c(additionalContext = {}) { + this._additionalContext = additionalContext; + return this; + } + n(clientName, commandName) { + this._clientName = clientName; + this._commandName = commandName; + return this; + } + f(inputFilter = (_) => _, outputFilter = (_) => _) { + this._inputFilterSensitiveLog = inputFilter; + this._outputFilterSensitiveLog = outputFilter; + return this; + } + ser(serializer) { + this._serializer = serializer; + return this; + } + de(deserializer) { + this._deserializer = deserializer; + return this; + } + sc(operation2) { + this._operationSchema = operation2; + this._smithyContext.operationSchema = operation2; + return this; + } + build() { + const closure = this; + let CommandRef; + return CommandRef = /* @__PURE__ */ __name(class extends Command { + input; + static getEndpointParameterInstructions() { + return closure._ep; + } + constructor(...[input]) { + super(); + this.input = input ?? {}; + closure._init(this); + this.schema = closure._operationSchema; + } + resolveMiddleware(stack, configuration, options) { + const op = closure._operationSchema; + const input = op?.[4] ?? op?.input; + const output = op?.[5] ?? op?.output; + return this.resolveMiddlewareWithContext(stack, configuration, options, { + CommandCtor: CommandRef, + middlewareFn: closure._middlewareFn, + clientName: closure._clientName, + commandName: closure._commandName, + inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_) => _), + outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_) => _), + smithyContext: closure._smithyContext, + additionalContext: closure._additionalContext + }); + } + serialize = closure._serializer; + deserialize = closure._deserializer; + }, "CommandRef"); + } + }; + __name(ClassBuilder, "ClassBuilder"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/constants.js +var init_constants5 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js +var createAggregatedClient; +var init_create_aggregated_client = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + createAggregatedClient = /* @__PURE__ */ __name((commands2, Client2, options) => { + for (const [command, CommandCtor] of Object.entries(commands2)) { + const methodImpl = /* @__PURE__ */ __name(async function(args, optionsOrCb, cb2) { + const command2 = new CommandCtor(args); + if (typeof optionsOrCb === "function") { + this.send(command2, optionsOrCb); + } else if (typeof cb2 === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expected http options but got ${typeof optionsOrCb}`); + this.send(command2, optionsOrCb || {}, cb2); + } else { + return this.send(command2, optionsOrCb); + } + }, "methodImpl"); + const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); + Client2.prototype[methodName] = methodImpl; + } + const { paginators: paginators2 = {}, waiters: waiters2 = {} } = options ?? {}; + for (const [paginatorName, paginatorFn] of Object.entries(paginators2)) { + if (Client2.prototype[paginatorName] === void 0) { + Client2.prototype[paginatorName] = function(commandInput = {}, paginationConfiguration, ...rest) { + return paginatorFn({ + ...paginationConfiguration, + client: this + }, commandInput, ...rest); + }; + } + } + for (const [waiterName, waiterFn] of Object.entries(waiters2)) { + if (Client2.prototype[waiterName] === void 0) { + Client2.prototype[waiterName] = async function(commandInput = {}, waiterConfiguration, ...rest) { + let config3 = waiterConfiguration; + if (typeof waiterConfiguration === "number") { + config3 = { + maxWaitTime: waiterConfiguration + }; + } + return waiterFn({ + ...config3, + client: this + }, commandInput, ...rest); + }; + } + } + }, "createAggregatedClient"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/exceptions.js +var ServiceException, decorateServiceException; +var init_exceptions = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/exceptions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ServiceException = class extends Error { + $fault; + $response; + $retryable; + $metadata; + constructor(options) { + super(options.message); + Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype); + this.name = options.name; + this.$fault = options.$fault; + this.$metadata = options.$metadata; + } + static isInstance(value) { + if (!value) + return false; + const candidate = value; + return ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server"); + } + static [Symbol.hasInstance](instance) { + if (!instance) + return false; + const candidate = instance; + if (this === ServiceException) { + return ServiceException.isInstance(instance); + } + if (ServiceException.isInstance(instance)) { + if (candidate.name && this.name) { + return this.prototype.isPrototypeOf(instance) || candidate.name === this.name; + } + return this.prototype.isPrototypeOf(instance); + } + return false; + } + }; + __name(ServiceException, "ServiceException"); + decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => { + Object.entries(additions).filter(([, v3]) => v3 !== void 0).forEach(([k2, v3]) => { + if (exception[k2] == void 0 || exception[k2] === "") { + exception[k2] = v3; + } + }); + const message2 = exception.message || exception.Message || "UnknownError"; + exception.message = message2; + delete exception.Message; + return exception; + }, "decorateServiceException"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/default-error-handler.js +var init_default_error_handler = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/default-error-handler.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/defaults-mode.js +var loadConfigsForDefaultMode; +var init_defaults_mode = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/defaults-mode.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + loadConfigsForDefaultMode = /* @__PURE__ */ __name((mode) => { + switch (mode) { + case "standard": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "in-region": + return { + retryMode: "standard", + connectionTimeout: 1100 + }; + case "cross-region": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "mobile": + return { + retryMode: "standard", + connectionTimeout: 3e4 + }; + default: + return {}; + } + }, "loadConfigsForDefaultMode"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js +var init_emitWarningIfUnsupportedVersion2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js +var init_extended_encode_uri_component2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js +var knownAlgorithms, getChecksumConfiguration, resolveChecksumRuntimeConfig; +var init_checksum3 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es(); + knownAlgorithms = Object.values(AlgorithmId); + getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const checksumAlgorithms = []; + for (const id in AlgorithmId) { + const algorithmId = AlgorithmId[id]; + if (runtimeConfig[algorithmId] === void 0) { + continue; + } + checksumAlgorithms.push({ + algorithmId: () => algorithmId, + checksumConstructor: () => runtimeConfig[algorithmId] + }); + } + for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) { + checksumAlgorithms.push({ + algorithmId: () => id, + checksumConstructor: () => ChecksumCtor + }); + } + return { + addChecksumAlgorithm(algo) { + runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {}; + const id = algo.algorithmId(); + const ctor = algo.checksumConstructor(); + if (knownAlgorithms.includes(id)) { + runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor; + } else { + runtimeConfig.checksumAlgorithms[id] = ctor; + } + checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return checksumAlgorithms; + } + }; + }, "getChecksumConfiguration"); + resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + const id = checksumAlgorithm.algorithmId(); + if (knownAlgorithms.includes(id)) { + runtimeConfig[id] = checksumAlgorithm.checksumConstructor(); + } + }); + return runtimeConfig; + }, "resolveChecksumRuntimeConfig"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/extensions/retry.js +var getRetryConfiguration, resolveRetryRuntimeConfig; +var init_retry2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/extensions/retry.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + setRetryStrategy(retryStrategy) { + runtimeConfig.retryStrategy = retryStrategy; + }, + retryStrategy() { + return runtimeConfig.retryStrategy; + } + }; + }, "getRetryConfiguration"); + resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => { + const runtimeConfig = {}; + runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); + return runtimeConfig; + }, "resolveRetryRuntimeConfig"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js +var getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig; +var init_defaultExtensionConfiguration2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_checksum3(); + init_retry2(); + getDefaultExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig)); + }, "getDefaultExtensionConfiguration"); + resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config3) => { + return Object.assign(resolveChecksumRuntimeConfig(config3), resolveRetryRuntimeConfig(config3)); + }, "resolveDefaultRuntimeConfig"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/extensions/index.js +var init_extensions3 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/extensions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_defaultExtensionConfiguration2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/get-array-if-single-item.js +var init_get_array_if_single_item = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/get-array-if-single-item.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/get-value-from-text-node.js +var getValueFromTextNode; +var init_get_value_from_text_node = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/get-value-from-text-node.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getValueFromTextNode = /* @__PURE__ */ __name((obj) => { + const textNodeName = "#text"; + for (const key in obj) { + if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) { + obj[key] = obj[key][textNodeName]; + } else if (typeof obj[key] === "object" && obj[key] !== null) { + obj[key] = getValueFromTextNode(obj[key]); + } + } + return obj; + }, "getValueFromTextNode"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/is-serializable-header-value.js +var init_is_serializable_header_value = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/is-serializable-header-value.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js +var NoOpLogger; +var init_NoOpLogger = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + NoOpLogger = class { + trace() { + } + debug() { + } + info() { + } + warn() { + } + error() { + } + }; + __name(NoOpLogger, "NoOpLogger"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/object-mapping.js +var init_object_mapping = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/object-mapping.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/resolve-path.js +var init_resolve_path2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/resolve-path.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/ser-utils.js +var init_ser_utils = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/ser-utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/serde-json.js +var init_serde_json = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/serde-json.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/index.js +var init_dist_es21 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_client3(); + init_collect_stream_body2(); + init_command2(); + init_constants5(); + init_create_aggregated_client(); + init_default_error_handler(); + init_defaults_mode(); + init_emitWarningIfUnsupportedVersion2(); + init_exceptions(); + init_extended_encode_uri_component2(); + init_extensions3(); + init_get_array_if_single_item(); + init_get_value_from_text_node(); + init_is_serializable_header_value(); + init_NoOpLogger(); + init_object_mapping(); + init_resolve_path2(); + init_ser_utils(); + init_serde_json(); + init_serde2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js +var ProtocolLib; +var init_ProtocolLib = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_dist_es21(); + ProtocolLib = class { + queryCompat; + constructor(queryCompat = false) { + this.queryCompat = queryCompat; + } + resolveRestContentType(defaultContentType, inputSchema) { + const members = inputSchema.getMemberSchemas(); + const httpPayloadMember = Object.values(members).find((m2) => { + return !!m2.getMergedTraits().httpPayload; + }); + if (httpPayloadMember) { + const mediaType = httpPayloadMember.getMergedTraits().mediaType; + if (mediaType) { + return mediaType; + } else if (httpPayloadMember.isStringSchema()) { + return "text/plain"; + } else if (httpPayloadMember.isBlobSchema()) { + return "application/octet-stream"; + } else { + return defaultContentType; + } + } else if (!inputSchema.isUnitSchema()) { + const hasBody = Object.values(members).find((m2) => { + const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m2.getMergedTraits(); + const noPrefixHeaders = httpPrefixHeaders === void 0; + return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders; + }); + if (hasBody) { + return defaultContentType; + } + } + } + async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) { + let namespace = defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + const errorMetadata = { + $metadata: metadata, + $fault: response.statusCode < 500 ? "client" : "server" + }; + const registry2 = TypeRegistry.for(namespace); + try { + const errorSchema = getErrorSchema?.(registry2, errorName) ?? registry2.getSchema(errorIdentifier); + return { errorSchema, errorMetadata }; + } catch (e2) { + dataObject.message = dataObject.message ?? dataObject.Message ?? "UnknownError"; + const synthetic = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace); + const baseExceptionSchema = synthetic.getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error; + throw this.decorateServiceException(Object.assign(new ErrorCtor({ name: errorName }), errorMetadata), dataObject); + } + throw this.decorateServiceException(Object.assign(new Error(errorName), errorMetadata), dataObject); + } + } + decorateServiceException(exception, additions = {}) { + if (this.queryCompat) { + const msg = exception.Message ?? additions.Message; + const error50 = decorateServiceException(exception, additions); + if (msg) { + error50.message = msg; + } + error50.Error = { + ...error50.Error, + Type: error50.Error?.Type, + Code: error50.Error?.Code, + Message: error50.Error?.message ?? error50.Error?.Message ?? msg + }; + const reqId = error50.$metadata.requestId; + if (reqId) { + error50.RequestId = reqId; + } + return error50; + } + return decorateServiceException(exception, additions); + } + setQueryCompatError(output, response) { + const queryErrorHeader = response.headers?.["x-amzn-query-error"]; + if (output !== void 0 && queryErrorHeader != null) { + const [Code, Type] = queryErrorHeader.split(";"); + const entries = Object.entries(output); + const Error2 = { + Code, + Type + }; + Object.assign(output, Error2); + for (const [k2, v3] of entries) { + Error2[k2 === "message" ? "Message" : k2] = v3; + } + delete Error2.__type; + output.Error = Error2; + } + } + queryCompatOutput(queryCompatErrorData, errorData) { + if (queryCompatErrorData.Error) { + errorData.Error = queryCompatErrorData.Error; + } + if (queryCompatErrorData.Type) { + errorData.Type = queryCompatErrorData.Type; + } + if (queryCompatErrorData.Code) { + errorData.Code = queryCompatErrorData.Code; + } + } + findQueryCompatibleError(registry2, errorName) { + try { + return registry2.getSchema(errorName); + } catch (e2) { + return registry2.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName); + } + } + }; + __name(ProtocolLib, "ProtocolLib"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js +var init_AwsSmithyRpcV2CborProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js +var init_coercing_serializers = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js +var SerdeContextConfig; +var init_ConfigurableSerdeContext = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SerdeContextConfig = class { + serdeContext; + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + }; + __name(SerdeContextConfig, "SerdeContextConfig"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js +var UnionSerde; +var init_UnionSerde = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + UnionSerde = class { + from; + to; + keys; + constructor(from, to) { + this.from = from; + this.to = to; + this.keys = new Set(Object.keys(this.from).filter((k2) => k2 !== "__type")); + } + mark(key) { + this.keys.delete(key); + } + hasUnknown() { + return this.keys.size === 1 && Object.keys(this.to).length === 0; + } + writeUnknown() { + if (this.hasUnknown()) { + const k2 = this.keys.values().next().value; + const v3 = this.from[k2]; + this.to.$unknown = [k2, v3]; + } + } + }; + __name(UnionSerde, "UnionSerde"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +var init_parseJsonBody = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +var init_JsonShapeDeserializer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +var init_JsonShapeSerializer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js +var init_JsonCodec = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +var init_AwsJsonRpcProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js +var init_AwsJson1_0Protocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js +var init_AwsJson1_1Protocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +var init_AwsRestJsonProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js +var init_awsExpectUnion = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/escape-attribute.js +function escapeAttribute(value) { + return value.replace(/&/g, "&").replace(/
/g, ">").replace(/"/g, """); +} +var init_escape_attribute = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/escape-attribute.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(escapeAttribute, "escapeAttribute"); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/escape-element.js +function escapeElement(value) { + return value.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">").replace(/\r/g, " ").replace(/\n/g, " ").replace(/\u0085/g, "…").replace(/\u2028/, "
"); +} +var init_escape_element = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/escape-element.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(escapeElement, "escapeElement"); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/XmlText.js +var XmlText; +var init_XmlText = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/XmlText.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_escape_element(); + XmlText = class { + value; + constructor(value) { + this.value = value; + } + toString() { + return escapeElement("" + this.value); + } + }; + __name(XmlText, "XmlText"); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/XmlNode.js +var XmlNode; +var init_XmlNode = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/XmlNode.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_escape_attribute(); + init_XmlText(); + XmlNode = class { + name; + children; + attributes = {}; + static of(name, childText, withName) { + const node = new XmlNode(name); + if (childText !== void 0) { + node.addChildNode(new XmlText(childText)); + } + if (withName !== void 0) { + node.withName(withName); + } + return node; + } + constructor(name, children = []) { + this.name = name; + this.children = children; + } + withName(name) { + this.name = name; + return this; + } + addAttribute(name, value) { + this.attributes[name] = value; + return this; + } + addChildNode(child) { + this.children.push(child); + return this; + } + removeAttribute(name) { + delete this.attributes[name]; + return this; + } + n(name) { + this.name = name; + return this; + } + c(child) { + this.children.push(child); + return this; + } + a(name, value) { + if (value != null) { + this.attributes[name] = value; + } + return this; + } + cc(input, field, withName = field) { + if (input[field] != null) { + const node = XmlNode.of(field, input[field]).withName(withName); + this.c(node); + } + } + l(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + nodes.map((node) => { + node.withName(memberName); + this.c(node); + }); + } + } + lc(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + const containerNode = new XmlNode(memberName); + nodes.map((node) => { + containerNode.c(node); + }); + this.c(containerNode); + } + } + toString() { + const hasChildren2 = Boolean(this.children.length); + let xmlText = `<${this.name}`; + const attributes = this.attributes; + for (const attributeName of Object.keys(attributes)) { + const attribute = attributes[attributeName]; + if (attribute != null) { + xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`; + } + } + return xmlText += !hasChildren2 ? "/>" : `>${this.children.map((c2) => c2.toString()).join("")}`; + } + }; + __name(XmlNode, "XmlNode"); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.browser.js +function parseXML(xmlString) { + if (!parser) { + parser = new DOMParser(); + } + const xmlDocument = parser.parseFromString(xmlString, "application/xml"); + if (xmlDocument.getElementsByTagName("parsererror").length > 0) { + throw new Error("DOMParser XML parsing error."); + } + const xmlToObj = /* @__PURE__ */ __name((node) => { + if (node.nodeType === Node.TEXT_NODE) { + if (node.textContent?.trim()) { + return node.textContent; + } + } + if (node.nodeType === Node.ELEMENT_NODE) { + const element = node; + if (element.attributes.length === 0 && element.childNodes.length === 0) { + return ""; + } + const obj = {}; + const attributes = Array.from(element.attributes); + for (const attr of attributes) { + obj[`${attr.name}`] = attr.value; + } + const childNodes = Array.from(element.childNodes); + for (const child of childNodes) { + const childResult = xmlToObj(child); + if (childResult != null) { + const childName = child.nodeName; + if (childNodes.length === 1 && attributes.length === 0 && childName === "#text") { + return childResult; + } + if (obj[childName]) { + if (Array.isArray(obj[childName])) { + obj[childName].push(childResult); + } else { + obj[childName] = [obj[childName], childResult]; + } + } else { + obj[childName] = childResult; + } + } else if (childNodes.length === 1 && attributes.length === 0) { + return element.textContent; + } + } + return obj; + } + return null; + }, "xmlToObj"); + return { + [xmlDocument.documentElement.nodeName]: xmlToObj(xmlDocument.documentElement) + }; +} +var parser; +var init_xml_parser_browser = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(parseXML, "parseXML"); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/index.js +var init_dist_es22 = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_XmlNode(); + init_XmlText(); + init_xml_parser_browser(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js +var XmlShapeDeserializer; +var init_XmlShapeDeserializer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es22(); + init_protocols(); + init_schema3(); + init_dist_es21(); + init_dist_es5(); + init_ConfigurableSerdeContext(); + init_UnionSerde(); + XmlShapeDeserializer = class extends SerdeContextConfig { + settings; + stringDeserializer; + constructor(settings) { + super(); + this.settings = settings; + this.stringDeserializer = new FromStringShapeDeserializer(settings); + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + this.stringDeserializer.setSerdeContext(serdeContext); + } + read(schema, bytes, key) { + const ns = NormalizedSchema.of(schema); + const memberSchemas = ns.getMemberSchemas(); + const isEventPayload = ns.isStructSchema() && ns.isMemberSchema() && !!Object.values(memberSchemas).find((memberNs) => { + return !!memberNs.getMemberTraits().eventPayload; + }); + if (isEventPayload) { + const output = {}; + const memberName = Object.keys(memberSchemas)[0]; + const eventMemberSchema = memberSchemas[memberName]; + if (eventMemberSchema.isBlobSchema()) { + output[memberName] = bytes; + } else { + output[memberName] = this.read(memberSchemas[memberName], bytes); + } + return output; + } + const xmlString = (this.serdeContext?.utf8Encoder ?? toUtf8)(bytes); + const parsedObject = this.parseXml(xmlString); + return this.readSchema(schema, key ? parsedObject[key] : parsedObject); + } + readSchema(_schema, value) { + const ns = NormalizedSchema.of(_schema); + if (ns.isUnitSchema()) { + return; + } + const traits = ns.getMergedTraits(); + if (ns.isListSchema() && !Array.isArray(value)) { + return this.readSchema(ns, [value]); + } + if (value == null) { + return value; + } + if (typeof value === "object") { + const flat = !!traits.xmlFlattened; + if (ns.isListSchema()) { + const listValue = ns.getValueSchema(); + const buffer2 = []; + const sourceKey = listValue.getMergedTraits().xmlName ?? "member"; + const source = flat ? value : (value[0] ?? value)[sourceKey]; + if (source == null) { + return buffer2; + } + const sourceArray = Array.isArray(source) ? source : [source]; + for (const v3 of sourceArray) { + buffer2.push(this.readSchema(listValue, v3)); + } + return buffer2; + } + const buffer = {}; + if (ns.isMapSchema()) { + const keyNs = ns.getKeySchema(); + const memberNs = ns.getValueSchema(); + let entries; + if (flat) { + entries = Array.isArray(value) ? value : [value]; + } else { + entries = Array.isArray(value.entry) ? value.entry : [value.entry]; + } + const keyProperty = keyNs.getMergedTraits().xmlName ?? "key"; + const valueProperty = memberNs.getMergedTraits().xmlName ?? "value"; + for (const entry of entries) { + const key = entry[keyProperty]; + const value2 = entry[valueProperty]; + buffer[key] = this.readSchema(memberNs, value2); + } + return buffer; + } + if (ns.isStructSchema()) { + const union3 = ns.isUnionSchema(); + let unionSerde; + if (union3) { + unionSerde = new UnionSerde(value, buffer); + } + for (const [memberName, memberSchema] of ns.structIterator()) { + const memberTraits = memberSchema.getMergedTraits(); + const xmlObjectKey = !memberTraits.httpPayload ? memberSchema.getMemberTraits().xmlName ?? memberName : memberTraits.xmlName ?? memberSchema.getName(); + if (union3) { + unionSerde.mark(xmlObjectKey); + } + if (value[xmlObjectKey] != null) { + buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]); + } + } + if (union3) { + unionSerde.writeUnknown(); + } + return buffer; + } + if (ns.isDocumentSchema()) { + return value; + } + throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`); + } + if (ns.isListSchema()) { + return []; + } + if (ns.isMapSchema() || ns.isStructSchema()) { + return {}; + } + return this.stringDeserializer.read(ns, value); + } + parseXml(xml) { + if (xml.length) { + let parsedObj; + try { + parsedObj = parseXML(xml); + } catch (e2) { + if (e2 && typeof e2 === "object") { + Object.defineProperty(e2, "$responseBodyText", { + value: xml + }); + } + throw e2; + } + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; + } + return getValueFromTextNode(parsedObjToReturn); + } + return {}; + } + }; + __name(XmlShapeDeserializer, "XmlShapeDeserializer"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +var init_QueryShapeSerializer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +var init_AwsQueryProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js +var init_AwsEc2QueryProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QuerySerializerSettings.js +var init_QuerySerializerSettings = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QuerySerializerSettings.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js +var loadRestXmlErrorCode; +var init_parseXmlBody = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + loadRestXmlErrorCode = /* @__PURE__ */ __name((output, data) => { + if (data?.Error?.Code !== void 0) { + return data.Error.Code; + } + if (data?.Code !== void 0) { + return data.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } + }, "loadRestXmlErrorCode"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +var XmlShapeSerializer; +var init_XmlShapeSerializer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es22(); + init_protocols(); + init_schema3(); + init_serde2(); + init_dist_es21(); + init_dist_es6(); + init_ConfigurableSerdeContext(); + XmlShapeSerializer = class extends SerdeContextConfig { + settings; + stringBuffer; + byteBuffer; + buffer; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + if (ns.isStringSchema() && typeof value === "string") { + this.stringBuffer = value; + } else if (ns.isBlobSchema()) { + this.byteBuffer = "byteLength" in value ? value : (this.serdeContext?.base64Decoder ?? fromBase64)(value); + } else { + this.buffer = this.writeStruct(ns, value, void 0); + const traits = ns.getMergedTraits(); + if (traits.httpPayload && !traits.xmlName) { + this.buffer.withName(ns.getName()); + } + } + } + flush() { + if (this.byteBuffer !== void 0) { + const bytes = this.byteBuffer; + delete this.byteBuffer; + return bytes; + } + if (this.stringBuffer !== void 0) { + const str = this.stringBuffer; + delete this.stringBuffer; + return str; + } + const buffer = this.buffer; + if (this.settings.xmlNamespace) { + if (!buffer?.attributes?.["xmlns"]) { + buffer.addAttribute("xmlns", this.settings.xmlNamespace); + } + } + delete this.buffer; + return buffer.toString(); + } + writeStruct(ns, value, parentXmlns) { + const traits = ns.getMergedTraits(); + const name = ns.isMemberSchema() && !traits.httpPayload ? ns.getMemberTraits().xmlName ?? ns.getMemberName() : traits.xmlName ?? ns.getName(); + if (!name || !ns.isStructSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${ns.getName(true)}.`); + } + const structXmlNode = XmlNode.of(name); + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); + for (const [memberName, memberSchema] of ns.structIterator()) { + const val = value[memberName]; + if (val != null || memberSchema.isIdempotencyToken()) { + if (memberSchema.getMergedTraits().xmlAttribute) { + structXmlNode.addAttribute(memberSchema.getMergedTraits().xmlName ?? memberName, this.writeSimple(memberSchema, val)); + continue; + } + if (memberSchema.isListSchema()) { + this.writeList(memberSchema, val, structXmlNode, xmlns); + } else if (memberSchema.isMapSchema()) { + this.writeMap(memberSchema, val, structXmlNode, xmlns); + } else if (memberSchema.isStructSchema()) { + structXmlNode.addChildNode(this.writeStruct(memberSchema, val, xmlns)); + } else { + const memberNode = XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName()); + this.writeSimpleInto(memberSchema, val, memberNode, xmlns); + structXmlNode.addChildNode(memberNode); + } + } + } + const { $unknown } = value; + if ($unknown && ns.isUnionSchema() && Array.isArray($unknown) && Object.keys(value).length === 1) { + const [k2, v3] = $unknown; + const node = XmlNode.of(k2); + if (typeof v3 !== "string") { + if (value instanceof XmlNode || value instanceof XmlText) { + structXmlNode.addChildNode(value); + } else { + throw new Error(`@aws-sdk - $unknown union member in XML requires value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`); + } + } + this.writeSimpleInto(0, v3, node, xmlns); + structXmlNode.addChildNode(node); + } + if (xmlns) { + structXmlNode.addAttribute(xmlnsAttr, xmlns); + } + return structXmlNode; + } + writeList(listMember, array2, container, parentXmlns) { + if (!listMember.isMemberSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${listMember.getName(true)}`); + } + const listTraits = listMember.getMergedTraits(); + const listValueSchema = listMember.getValueSchema(); + const listValueTraits = listValueSchema.getMergedTraits(); + const sparse = !!listValueTraits.sparse; + const flat = !!listTraits.xmlFlattened; + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(listMember, parentXmlns); + const writeItem = /* @__PURE__ */ __name((container2, value) => { + if (listValueSchema.isListSchema()) { + this.writeList(listValueSchema, Array.isArray(value) ? value : [value], container2, xmlns); + } else if (listValueSchema.isMapSchema()) { + this.writeMap(listValueSchema, value, container2, xmlns); + } else if (listValueSchema.isStructSchema()) { + const struct = this.writeStruct(listValueSchema, value, xmlns); + container2.addChildNode(struct.withName(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member")); + } else { + const listItemNode = XmlNode.of(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member"); + this.writeSimpleInto(listValueSchema, value, listItemNode, xmlns); + container2.addChildNode(listItemNode); + } + }, "writeItem"); + if (flat) { + for (const value of array2) { + if (sparse || value != null) { + writeItem(container, value); + } + } + } else { + const listNode = XmlNode.of(listTraits.xmlName ?? listMember.getMemberName()); + if (xmlns) { + listNode.addAttribute(xmlnsAttr, xmlns); + } + for (const value of array2) { + if (sparse || value != null) { + writeItem(listNode, value); + } + } + container.addChildNode(listNode); + } + } + writeMap(mapMember, map2, container, parentXmlns, containerIsMap = false) { + if (!mapMember.isMemberSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}`); + } + const mapTraits = mapMember.getMergedTraits(); + const mapKeySchema = mapMember.getKeySchema(); + const mapKeyTraits = mapKeySchema.getMergedTraits(); + const keyTag = mapKeyTraits.xmlName ?? "key"; + const mapValueSchema = mapMember.getValueSchema(); + const mapValueTraits = mapValueSchema.getMergedTraits(); + const valueTag = mapValueTraits.xmlName ?? "value"; + const sparse = !!mapValueTraits.sparse; + const flat = !!mapTraits.xmlFlattened; + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(mapMember, parentXmlns); + const addKeyValue = /* @__PURE__ */ __name((entry, key, val) => { + const keyNode = XmlNode.of(keyTag, key); + const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns); + if (keyXmlns) { + keyNode.addAttribute(keyXmlnsAttr, keyXmlns); + } + entry.addChildNode(keyNode); + let valueNode = XmlNode.of(valueTag); + if (mapValueSchema.isListSchema()) { + this.writeList(mapValueSchema, val, valueNode, xmlns); + } else if (mapValueSchema.isMapSchema()) { + this.writeMap(mapValueSchema, val, valueNode, xmlns, true); + } else if (mapValueSchema.isStructSchema()) { + valueNode = this.writeStruct(mapValueSchema, val, xmlns); + } else { + this.writeSimpleInto(mapValueSchema, val, valueNode, xmlns); + } + entry.addChildNode(valueNode); + }, "addKeyValue"); + if (flat) { + for (const [key, val] of Object.entries(map2)) { + if (sparse || val != null) { + const entry = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); + addKeyValue(entry, key, val); + container.addChildNode(entry); + } + } + } else { + let mapNode; + if (!containerIsMap) { + mapNode = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); + if (xmlns) { + mapNode.addAttribute(xmlnsAttr, xmlns); + } + container.addChildNode(mapNode); + } + for (const [key, val] of Object.entries(map2)) { + if (sparse || val != null) { + const entry = XmlNode.of("entry"); + addKeyValue(entry, key, val); + (containerIsMap ? container : mapNode).addChildNode(entry); + } + } + } + } + writeSimple(_schema, value) { + if (null === value) { + throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value."); + } + const ns = NormalizedSchema.of(_schema); + let nodeContents = null; + if (value && typeof value === "object") { + if (ns.isBlobSchema()) { + nodeContents = (this.serdeContext?.base64Encoder ?? toBase64)(value); + } else if (ns.isTimestampSchema() && value instanceof Date) { + const format2 = determineTimestampFormat(ns, this.settings); + switch (format2) { + case 5: + nodeContents = value.toISOString().replace(".000Z", "Z"); + break; + case 6: + nodeContents = dateToUtcString(value); + break; + case 7: + nodeContents = String(value.getTime() / 1e3); + break; + default: + console.warn("Missing timestamp format, using http date", value); + nodeContents = dateToUtcString(value); + break; + } + } else if (ns.isBigDecimalSchema() && value) { + if (value instanceof NumericValue) { + return value.string; + } + return String(value); + } else if (ns.isMapSchema() || ns.isListSchema()) { + throw new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead."); + } else { + throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${ns.getName(true)}`); + } + } + if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) { + nodeContents = String(value); + } + if (ns.isStringSchema()) { + if (value === void 0 && ns.isIdempotencyToken()) { + nodeContents = v4(); + } else { + nodeContents = String(value); + } + } + if (nodeContents === null) { + throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`); + } + return nodeContents; + } + writeSimpleInto(_schema, value, into, parentXmlns) { + const nodeContents = this.writeSimple(_schema, value); + const ns = NormalizedSchema.of(_schema); + const content = new XmlText(nodeContents); + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); + if (xmlns) { + into.addAttribute(xmlnsAttr, xmlns); + } + into.addChildNode(content); + } + getXmlnsAttribute(ns, parentXmlns) { + const traits = ns.getMergedTraits(); + const [prefix, xmlns] = traits.xmlNamespace ?? []; + if (xmlns && xmlns !== parentXmlns) { + return [prefix ? `xmlns:${prefix}` : "xmlns", xmlns]; + } + return [void 0, void 0]; + } + }; + __name(XmlShapeSerializer, "XmlShapeSerializer"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js +var XmlCodec; +var init_XmlCodec = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_ConfigurableSerdeContext(); + init_XmlShapeDeserializer(); + init_XmlShapeSerializer(); + XmlCodec = class extends SerdeContextConfig { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + createSerializer() { + const serializer = new XmlShapeSerializer(this.settings); + serializer.setSerdeContext(this.serdeContext); + return serializer; + } + createDeserializer() { + const deserializer = new XmlShapeDeserializer(this.settings); + deserializer.setSerdeContext(this.serdeContext); + return deserializer; + } + }; + __name(XmlCodec, "XmlCodec"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +var AwsRestXmlProtocol; +var init_AwsRestXmlProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_protocols(); + init_schema3(); + init_ProtocolLib(); + init_parseXmlBody(); + init_XmlCodec(); + AwsRestXmlProtocol = class extends HttpBindingProtocol { + codec; + serializer; + deserializer; + mixin = new ProtocolLib(); + constructor(options) { + super(options); + const settings = { + timestampFormat: { + useTrait: true, + default: 5 + }, + httpBindings: true, + xmlNamespace: options.xmlNamespace, + serviceNamespace: options.defaultNamespace + }; + this.codec = new XmlCodec(settings); + this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); + this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings); + } + getPayloadCodec() { + return this.codec; + } + getShapeId() { + return "aws.protocols#restXml"; + } + async serializeRequest(operationSchema, input, context2) { + const request = await super.serializeRequest(operationSchema, input, context2); + const inputSchema = NormalizedSchema.of(operationSchema.input); + if (!request.headers["content-type"]) { + const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema); + if (contentType) { + request.headers["content-type"] = contentType; + } + } + if (typeof request.body === "string" && request.headers["content-type"] === this.getDefaultContentType() && !request.body.startsWith("' + request.body; + } + return request; + } + async deserializeResponse(operationSchema, context2, response) { + return super.deserializeResponse(operationSchema, context2, response); + } + async handleError(operationSchema, context2, response, dataObject, metadata) { + const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown"; + if (dataObject.Error && typeof dataObject.Error === "object") { + for (const key of Object.keys(dataObject.Error)) { + dataObject[key] = dataObject.Error[key]; + if (key.toLowerCase() === "message") { + dataObject.message = dataObject.Error[key]; + } + } + } + if (dataObject.RequestId && !metadata.requestId) { + metadata.requestId = dataObject.RequestId; + } + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); + const ns = NormalizedSchema.of(errorSchema); + const message2 = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown"; + const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; + const exception = new ErrorCtor(message2); + await this.deserializeHttpMessage(errorSchema, context2, response, dataObject); + const output = {}; + for (const [name, member2] of ns.structIterator()) { + const target = member2.getMergedTraits().xmlName ?? name; + const value = dataObject.Error?.[target] ?? dataObject[target]; + output[name] = this.codec.createDeserializer().readSchema(member2, value); + } + throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, { + $fault: ns.getMergedTraits().error, + message: message2 + }, output), dataObject); + } + getDefaultContentType() { + return "application/xml"; + } + hasUnstructuredPayloadBinding(ns) { + for (const [, member2] of ns.structIterator()) { + if (member2.getMergedTraits().httpPayload) { + return !(member2.isStructSchema() || member2.isMapSchema() || member2.isListSchema()); + } + } + return false; + } + }; + __name(AwsRestXmlProtocol, "AwsRestXmlProtocol"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +var init_protocols2 = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AwsSmithyRpcV2CborProtocol(); + init_coercing_serializers(); + init_AwsJson1_0Protocol(); + init_AwsJson1_1Protocol(); + init_AwsJsonRpcProtocol(); + init_AwsRestJsonProtocol(); + init_JsonCodec(); + init_JsonShapeDeserializer(); + init_JsonShapeSerializer(); + init_awsExpectUnion(); + init_parseJsonBody(); + init_AwsEc2QueryProtocol(); + init_AwsQueryProtocol(); + init_QuerySerializerSettings(); + init_QueryShapeSerializer(); + init_AwsRestXmlProtocol(); + init_XmlCodec(); + init_XmlShapeDeserializer(); + init_XmlShapeSerializer(); + init_parseXmlBody(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/index.js +var init_dist_es23 = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_client2(); + init_httpAuthSchemes2(); + init_protocols2(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmForRequest.js +var getChecksumAlgorithmForRequest; +var init_getChecksumAlgorithmForRequest = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmForRequest.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants3(); + getChecksumAlgorithmForRequest = /* @__PURE__ */ __name((input, { requestChecksumRequired, requestAlgorithmMember, requestChecksumCalculation }) => { + if (!requestAlgorithmMember) { + return requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired ? DEFAULT_CHECKSUM_ALGORITHM : void 0; + } + if (!input[requestAlgorithmMember]) { + return void 0; + } + const checksumAlgorithm = input[requestAlgorithmMember]; + return checksumAlgorithm; + }, "getChecksumAlgorithmForRequest"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumLocationName.js +var getChecksumLocationName; +var init_getChecksumLocationName = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumLocationName.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants3(); + getChecksumLocationName = /* @__PURE__ */ __name((algorithm) => algorithm === ChecksumAlgorithm.MD5 ? "content-md5" : `x-amz-checksum-${algorithm.toLowerCase()}`, "getChecksumLocationName"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeader.js +var hasHeader2; +var init_hasHeader = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeader.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + hasHeader2 = /* @__PURE__ */ __name((header, headers) => { + const soughtHeader = header.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; + }, "hasHeader"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeaderWithPrefix.js +var hasHeaderWithPrefix; +var init_hasHeaderWithPrefix = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeaderWithPrefix.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + hasHeaderWithPrefix = /* @__PURE__ */ __name((headerPrefix, headers) => { + const soughtHeaderPrefix = headerPrefix.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase().startsWith(soughtHeaderPrefix)) { + return true; + } + } + return false; + }, "hasHeaderWithPrefix"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isStreaming.js +var isStreaming; +var init_isStreaming = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isStreaming.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es17(); + isStreaming = /* @__PURE__ */ __name((body) => body !== void 0 && typeof body !== "string" && !ArrayBuffer.isView(body) && !isArrayBuffer(body), "isStreaming"); + } +}); + +// ../../node_modules/tslib/tslib.es6.mjs +function __awaiter(thisArg, _arguments, P2, generator) { + function adopt(value) { + return value instanceof P2 ? value : new P2(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P2 || (P2 = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e2) { + reject(e2); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e2) { + reject(e2); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t9[0] & 1) + throw t9[1]; + return t9[1]; + }, trys: [], ops: [] }, f2, y2, t9, g2 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g2.next = verb(0), g2["throw"] = verb(1), g2["return"] = verb(2), typeof Symbol === "function" && (g2[Symbol.iterator] = function() { + return this; + }), g2; + function verb(n2) { + return function(v3) { + return step([n2, v3]); + }; + } + __name(verb, "verb"); + function step(op) { + if (f2) + throw new TypeError("Generator is already executing."); + while (g2 && (g2 = 0, op[0] && (_ = 0)), _) + try { + if (f2 = 1, y2 && (t9 = op[0] & 2 ? y2["return"] : op[0] ? y2["throw"] || ((t9 = y2["return"]) && t9.call(y2), 0) : y2.next) && !(t9 = t9.call(y2, op[1])).done) + return t9; + if (y2 = 0, t9) + op = [op[0] & 2, t9.value]; + switch (op[0]) { + case 0: + case 1: + t9 = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y2 = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t9 = _.trys, t9 = t9.length > 0 && t9[t9.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t9 || op[1] > t9[0] && op[1] < t9[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t9[1]) { + _.label = t9[1]; + t9 = op; + break; + } + if (t9 && _.label < t9[2]) { + _.label = t9[2]; + _.ops.push(op); + break; + } + if (t9[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e2) { + op = [6, e2]; + y2 = 0; + } finally { + f2 = t9 = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + __name(step, "step"); +} +function __values(o2) { + var s2 = typeof Symbol === "function" && Symbol.iterator, m2 = s2 && o2[s2], i2 = 0; + if (m2) + return m2.call(o2); + if (o2 && typeof o2.length === "number") + return { + next: function() { + if (o2 && i2 >= o2.length) + o2 = void 0; + return { value: o2 && o2[i2++], done: !o2 }; + } + }; + throw new TypeError(s2 ? "Object is not iterable." : "Symbol.iterator is not defined."); +} +var init_tslib_es6 = __esm({ + "../../node_modules/tslib/tslib.es6.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(__awaiter, "__awaiter"); + __name(__generator, "__generator"); + __name(__values, "__values"); + } +}); + +// ../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js +var fromUtf82; +var init_fromUtf8_browser2 = __esm({ + "../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fromUtf82 = /* @__PURE__ */ __name((input) => new TextEncoder().encode(input), "fromUtf8"); + } +}); + +// ../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js +var init_toUint8Array2 = __esm({ + "../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser2(); + } +}); + +// ../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +var init_toUtf8_browser2 = __esm({ + "../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/index.js +var init_dist_es24 = __esm({ + "../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser2(); + init_toUint8Array2(); + init_toUtf8_browser2(); + } +}); + +// ../../node_modules/@aws-crypto/util/build/module/convertToBuffer.js +function convertToBuffer(data) { + if (data instanceof Uint8Array) + return data; + if (typeof data === "string") { + return fromUtf83(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); +} +var fromUtf83; +var init_convertToBuffer = __esm({ + "../../node_modules/@aws-crypto/util/build/module/convertToBuffer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es24(); + fromUtf83 = typeof Buffer !== "undefined" && Buffer.from ? function(input) { + return Buffer.from(input, "utf8"); + } : fromUtf82; + __name(convertToBuffer, "convertToBuffer"); + } +}); + +// ../../node_modules/@aws-crypto/util/build/module/isEmptyData.js +function isEmptyData(data) { + if (typeof data === "string") { + return data.length === 0; + } + return data.byteLength === 0; +} +var init_isEmptyData = __esm({ + "../../node_modules/@aws-crypto/util/build/module/isEmptyData.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(isEmptyData, "isEmptyData"); + } +}); + +// ../../node_modules/@aws-crypto/util/build/module/numToUint8.js +function numToUint8(num) { + return new Uint8Array([ + (num & 4278190080) >> 24, + (num & 16711680) >> 16, + (num & 65280) >> 8, + num & 255 + ]); +} +var init_numToUint8 = __esm({ + "../../node_modules/@aws-crypto/util/build/module/numToUint8.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(numToUint8, "numToUint8"); + } +}); + +// ../../node_modules/@aws-crypto/util/build/module/uint32ArrayFrom.js +function uint32ArrayFrom(a_lookUpTable2) { + if (!Uint32Array.from) { + var return_array = new Uint32Array(a_lookUpTable2.length); + var a_index = 0; + while (a_index < a_lookUpTable2.length) { + return_array[a_index] = a_lookUpTable2[a_index]; + a_index += 1; + } + return return_array; + } + return Uint32Array.from(a_lookUpTable2); +} +var init_uint32ArrayFrom = __esm({ + "../../node_modules/@aws-crypto/util/build/module/uint32ArrayFrom.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(uint32ArrayFrom, "uint32ArrayFrom"); + } +}); + +// ../../node_modules/@aws-crypto/util/build/module/index.js +var init_module = __esm({ + "../../node_modules/@aws-crypto/util/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_convertToBuffer(); + init_isEmptyData(); + init_numToUint8(); + init_uint32ArrayFrom(); + } +}); + +// ../../node_modules/@aws-crypto/crc32c/build/module/aws_crc32c.js +var AwsCrc32c; +var init_aws_crc32c = __esm({ + "../../node_modules/@aws-crypto/crc32c/build/module/aws_crc32c.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tslib_es6(); + init_module(); + init_module2(); + AwsCrc32c = /** @class */ + function() { + function AwsCrc32c2() { + this.crc32c = new Crc32c(); + } + __name(AwsCrc32c2, "AwsCrc32c"); + AwsCrc32c2.prototype.update = function(toHash) { + if (isEmptyData(toHash)) + return; + this.crc32c.update(convertToBuffer(toHash)); + }; + AwsCrc32c2.prototype.digest = function() { + return __awaiter(this, void 0, void 0, function() { + return __generator(this, function(_a124) { + return [2, numToUint8(this.crc32c.digest())]; + }); + }); + }; + AwsCrc32c2.prototype.reset = function() { + this.crc32c = new Crc32c(); + }; + return AwsCrc32c2; + }(); + } +}); + +// ../../node_modules/@aws-crypto/crc32c/build/module/index.js +var Crc32c, a_lookupTable, lookupTable; +var init_module2 = __esm({ + "../../node_modules/@aws-crypto/crc32c/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tslib_es6(); + init_module(); + init_aws_crc32c(); + Crc32c = /** @class */ + function() { + function Crc32c2() { + this.checksum = 4294967295; + } + __name(Crc32c2, "Crc32c"); + Crc32c2.prototype.update = function(data) { + var e_1, _a124; + try { + for (var data_1 = __values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { + var byte = data_1_1.value; + this.checksum = this.checksum >>> 8 ^ lookupTable[(this.checksum ^ byte) & 255]; + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (data_1_1 && !data_1_1.done && (_a124 = data_1.return)) + _a124.call(data_1); + } finally { + if (e_1) + throw e_1.error; + } + } + return this; + }; + Crc32c2.prototype.digest = function() { + return (this.checksum ^ 4294967295) >>> 0; + }; + return Crc32c2; + }(); + a_lookupTable = [ + 0, + 4067132163, + 3778769143, + 324072436, + 3348797215, + 904991772, + 648144872, + 3570033899, + 2329499855, + 2024987596, + 1809983544, + 2575936315, + 1296289744, + 3207089363, + 2893594407, + 1578318884, + 274646895, + 3795141740, + 4049975192, + 51262619, + 3619967088, + 632279923, + 922689671, + 3298075524, + 2592579488, + 1760304291, + 2075979607, + 2312596564, + 1562183871, + 2943781820, + 3156637768, + 1313733451, + 549293790, + 3537243613, + 3246849577, + 871202090, + 3878099393, + 357341890, + 102525238, + 4101499445, + 2858735121, + 1477399826, + 1264559846, + 3107202533, + 1845379342, + 2677391885, + 2361733625, + 2125378298, + 820201905, + 3263744690, + 3520608582, + 598981189, + 4151959214, + 85089709, + 373468761, + 3827903834, + 3124367742, + 1213305469, + 1526817161, + 2842354314, + 2107672161, + 2412447074, + 2627466902, + 1861252501, + 1098587580, + 3004210879, + 2688576843, + 1378610760, + 2262928035, + 1955203488, + 1742404180, + 2511436119, + 3416409459, + 969524848, + 714683780, + 3639785095, + 205050476, + 4266873199, + 3976438427, + 526918040, + 1361435347, + 2739821008, + 2954799652, + 1114974503, + 2529119692, + 1691668175, + 2005155131, + 2247081528, + 3690758684, + 697762079, + 986182379, + 3366744552, + 476452099, + 3993867776, + 4250756596, + 255256311, + 1640403810, + 2477592673, + 2164122517, + 1922457750, + 2791048317, + 1412925310, + 1197962378, + 3037525897, + 3944729517, + 427051182, + 170179418, + 4165941337, + 746937522, + 3740196785, + 3451792453, + 1070968646, + 1905808397, + 2213795598, + 2426610938, + 1657317369, + 3053634322, + 1147748369, + 1463399397, + 2773627110, + 4215344322, + 153784257, + 444234805, + 3893493558, + 1021025245, + 3467647198, + 3722505002, + 797665321, + 2197175160, + 1889384571, + 1674398607, + 2443626636, + 1164749927, + 3070701412, + 2757221520, + 1446797203, + 137323447, + 4198817972, + 3910406976, + 461344835, + 3484808360, + 1037989803, + 781091935, + 3705997148, + 2460548119, + 1623424788, + 1939049696, + 2180517859, + 1429367560, + 2807687179, + 3020495871, + 1180866812, + 410100952, + 3927582683, + 4182430767, + 186734380, + 3756733383, + 763408580, + 1053836080, + 3434856499, + 2722870694, + 1344288421, + 1131464017, + 2971354706, + 1708204729, + 2545590714, + 2229949006, + 1988219213, + 680717673, + 3673779818, + 3383336350, + 1002577565, + 4010310262, + 493091189, + 238226049, + 4233660802, + 2987750089, + 1082061258, + 1395524158, + 2705686845, + 1972364758, + 2279892693, + 2494862625, + 1725896226, + 952904198, + 3399985413, + 3656866545, + 731699698, + 4283874585, + 222117402, + 510512622, + 3959836397, + 3280807620, + 837199303, + 582374963, + 3504198960, + 68661723, + 4135334616, + 3844915500, + 390545967, + 1230274059, + 3141532936, + 2825850620, + 1510247935, + 2395924756, + 2091215383, + 1878366691, + 2644384480, + 3553878443, + 565732008, + 854102364, + 3229815391, + 340358836, + 3861050807, + 4117890627, + 119113024, + 1493875044, + 2875275879, + 3090270611, + 1247431312, + 2660249211, + 1828433272, + 2141937292, + 2378227087, + 3811616794, + 291187481, + 34330861, + 4032846830, + 615137029, + 3603020806, + 3314634738, + 939183345, + 1776939221, + 2609017814, + 2295496738, + 2058945313, + 2926798794, + 1545135305, + 1330124605, + 3173225534, + 4084100981, + 17165430, + 307568514, + 3762199681, + 888469610, + 3332340585, + 3587147933, + 665062302, + 2042050490, + 2346497209, + 2559330125, + 1793573966, + 3190661285, + 1279665062, + 1595330642, + 2910671697 + ]; + lookupTable = uint32ArrayFrom(a_lookupTable); + } +}); + +// ../../node_modules/@aws-sdk/crc64-nvme/dist-es/Crc64Nvme.js +var generateCRC64NVMETable, CRC64_NVME_REVERSED_TABLE, t0, t1, t2, t3, t4, t5, t6, t7, ensureTablesInitialized, Crc64Nvme; +var init_Crc64Nvme = __esm({ + "../../node_modules/@aws-sdk/crc64-nvme/dist-es/Crc64Nvme.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + generateCRC64NVMETable = /* @__PURE__ */ __name(() => { + const sliceLength = 8; + const tables = new Array(sliceLength); + for (let slice = 0; slice < sliceLength; slice++) { + const table3 = new Array(512); + for (let i2 = 0; i2 < 256; i2++) { + let crc = BigInt(i2); + for (let j2 = 0; j2 < 8 * (slice + 1); j2++) { + if (crc & 1n) { + crc = crc >> 1n ^ 0x9a6c9329ac4bc9b5n; + } else { + crc = crc >> 1n; + } + } + table3[i2 * 2] = Number(crc >> 32n & 0xffffffffn); + table3[i2 * 2 + 1] = Number(crc & 0xffffffffn); + } + tables[slice] = new Uint32Array(table3); + } + return tables; + }, "generateCRC64NVMETable"); + ensureTablesInitialized = /* @__PURE__ */ __name(() => { + if (!CRC64_NVME_REVERSED_TABLE) { + CRC64_NVME_REVERSED_TABLE = generateCRC64NVMETable(); + [t0, t1, t2, t3, t4, t5, t6, t7] = CRC64_NVME_REVERSED_TABLE; + } + }, "ensureTablesInitialized"); + Crc64Nvme = class { + c1 = 0; + c2 = 0; + constructor() { + ensureTablesInitialized(); + this.reset(); + } + update(data) { + const len = data.length; + let i2 = 0; + let crc1 = this.c1; + let crc2 = this.c2; + while (i2 + 8 <= len) { + const idx0 = ((crc2 ^ data[i2++]) & 255) << 1; + const idx1 = ((crc2 >>> 8 ^ data[i2++]) & 255) << 1; + const idx2 = ((crc2 >>> 16 ^ data[i2++]) & 255) << 1; + const idx3 = ((crc2 >>> 24 ^ data[i2++]) & 255) << 1; + const idx4 = ((crc1 ^ data[i2++]) & 255) << 1; + const idx5 = ((crc1 >>> 8 ^ data[i2++]) & 255) << 1; + const idx6 = ((crc1 >>> 16 ^ data[i2++]) & 255) << 1; + const idx7 = ((crc1 >>> 24 ^ data[i2++]) & 255) << 1; + crc1 = t7[idx0] ^ t6[idx1] ^ t5[idx2] ^ t4[idx3] ^ t3[idx4] ^ t2[idx5] ^ t1[idx6] ^ t0[idx7]; + crc2 = t7[idx0 + 1] ^ t6[idx1 + 1] ^ t5[idx2 + 1] ^ t4[idx3 + 1] ^ t3[idx4 + 1] ^ t2[idx5 + 1] ^ t1[idx6 + 1] ^ t0[idx7 + 1]; + } + while (i2 < len) { + const idx = ((crc2 ^ data[i2]) & 255) << 1; + crc2 = (crc2 >>> 8 | (crc1 & 255) << 24) >>> 0; + crc1 = crc1 >>> 8 ^ t0[idx]; + crc2 ^= t0[idx + 1]; + i2++; + } + this.c1 = crc1; + this.c2 = crc2; + } + async digest() { + const c1 = this.c1 ^ 4294967295; + const c2 = this.c2 ^ 4294967295; + return new Uint8Array([ + c1 >>> 24, + c1 >>> 16 & 255, + c1 >>> 8 & 255, + c1 & 255, + c2 >>> 24, + c2 >>> 16 & 255, + c2 >>> 8 & 255, + c2 & 255 + ]); + } + reset() { + this.c1 = 4294967295; + this.c2 = 4294967295; + } + }; + __name(Crc64Nvme, "Crc64Nvme"); + } +}); + +// ../../node_modules/@aws-sdk/crc64-nvme/dist-es/crc64-nvme-crt-container.js +var crc64NvmeCrtContainer; +var init_crc64_nvme_crt_container = __esm({ + "../../node_modules/@aws-sdk/crc64-nvme/dist-es/crc64-nvme-crt-container.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + crc64NvmeCrtContainer = { + CrtCrc64Nvme: null + }; + } +}); + +// ../../node_modules/@aws-sdk/crc64-nvme/dist-es/index.js +var init_dist_es25 = __esm({ + "../../node_modules/@aws-sdk/crc64-nvme/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Crc64Nvme(); + init_crc64_nvme_crt_container(); + } +}); + +// ../../node_modules/@aws-crypto/crc32/build/module/aws_crc32.js +var AwsCrc32; +var init_aws_crc32 = __esm({ + "../../node_modules/@aws-crypto/crc32/build/module/aws_crc32.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tslib_es6(); + init_module(); + init_module3(); + AwsCrc32 = /** @class */ + function() { + function AwsCrc322() { + this.crc32 = new Crc32(); + } + __name(AwsCrc322, "AwsCrc32"); + AwsCrc322.prototype.update = function(toHash) { + if (isEmptyData(toHash)) + return; + this.crc32.update(convertToBuffer(toHash)); + }; + AwsCrc322.prototype.digest = function() { + return __awaiter(this, void 0, void 0, function() { + return __generator(this, function(_a124) { + return [2, numToUint8(this.crc32.digest())]; + }); + }); + }; + AwsCrc322.prototype.reset = function() { + this.crc32 = new Crc32(); + }; + return AwsCrc322; + }(); + } +}); + +// ../../node_modules/@aws-crypto/crc32/build/module/index.js +var Crc32, a_lookUpTable, lookupTable2; +var init_module3 = __esm({ + "../../node_modules/@aws-crypto/crc32/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tslib_es6(); + init_module(); + init_aws_crc32(); + Crc32 = /** @class */ + function() { + function Crc322() { + this.checksum = 4294967295; + } + __name(Crc322, "Crc32"); + Crc322.prototype.update = function(data) { + var e_1, _a124; + try { + for (var data_1 = __values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { + var byte = data_1_1.value; + this.checksum = this.checksum >>> 8 ^ lookupTable2[(this.checksum ^ byte) & 255]; + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (data_1_1 && !data_1_1.done && (_a124 = data_1.return)) + _a124.call(data_1); + } finally { + if (e_1) + throw e_1.error; + } + } + return this; + }; + Crc322.prototype.digest = function() { + return (this.checksum ^ 4294967295) >>> 0; + }; + return Crc322; + }(); + a_lookUpTable = [ + 0, + 1996959894, + 3993919788, + 2567524794, + 124634137, + 1886057615, + 3915621685, + 2657392035, + 249268274, + 2044508324, + 3772115230, + 2547177864, + 162941995, + 2125561021, + 3887607047, + 2428444049, + 498536548, + 1789927666, + 4089016648, + 2227061214, + 450548861, + 1843258603, + 4107580753, + 2211677639, + 325883990, + 1684777152, + 4251122042, + 2321926636, + 335633487, + 1661365465, + 4195302755, + 2366115317, + 997073096, + 1281953886, + 3579855332, + 2724688242, + 1006888145, + 1258607687, + 3524101629, + 2768942443, + 901097722, + 1119000684, + 3686517206, + 2898065728, + 853044451, + 1172266101, + 3705015759, + 2882616665, + 651767980, + 1373503546, + 3369554304, + 3218104598, + 565507253, + 1454621731, + 3485111705, + 3099436303, + 671266974, + 1594198024, + 3322730930, + 2970347812, + 795835527, + 1483230225, + 3244367275, + 3060149565, + 1994146192, + 31158534, + 2563907772, + 4023717930, + 1907459465, + 112637215, + 2680153253, + 3904427059, + 2013776290, + 251722036, + 2517215374, + 3775830040, + 2137656763, + 141376813, + 2439277719, + 3865271297, + 1802195444, + 476864866, + 2238001368, + 4066508878, + 1812370925, + 453092731, + 2181625025, + 4111451223, + 1706088902, + 314042704, + 2344532202, + 4240017532, + 1658658271, + 366619977, + 2362670323, + 4224994405, + 1303535960, + 984961486, + 2747007092, + 3569037538, + 1256170817, + 1037604311, + 2765210733, + 3554079995, + 1131014506, + 879679996, + 2909243462, + 3663771856, + 1141124467, + 855842277, + 2852801631, + 3708648649, + 1342533948, + 654459306, + 3188396048, + 3373015174, + 1466479909, + 544179635, + 3110523913, + 3462522015, + 1591671054, + 702138776, + 2966460450, + 3352799412, + 1504918807, + 783551873, + 3082640443, + 3233442989, + 3988292384, + 2596254646, + 62317068, + 1957810842, + 3939845945, + 2647816111, + 81470997, + 1943803523, + 3814918930, + 2489596804, + 225274430, + 2053790376, + 3826175755, + 2466906013, + 167816743, + 2097651377, + 4027552580, + 2265490386, + 503444072, + 1762050814, + 4150417245, + 2154129355, + 426522225, + 1852507879, + 4275313526, + 2312317920, + 282753626, + 1742555852, + 4189708143, + 2394877945, + 397917763, + 1622183637, + 3604390888, + 2714866558, + 953729732, + 1340076626, + 3518719985, + 2797360999, + 1068828381, + 1219638859, + 3624741850, + 2936675148, + 906185462, + 1090812512, + 3747672003, + 2825379669, + 829329135, + 1181335161, + 3412177804, + 3160834842, + 628085408, + 1382605366, + 3423369109, + 3138078467, + 570562233, + 1426400815, + 3317316542, + 2998733608, + 733239954, + 1555261956, + 3268935591, + 3050360625, + 752459403, + 1541320221, + 2607071920, + 3965973030, + 1969922972, + 40735498, + 2617837225, + 3943577151, + 1913087877, + 83908371, + 2512341634, + 3803740692, + 2075208622, + 213261112, + 2463272603, + 3855990285, + 2094854071, + 198958881, + 2262029012, + 4057260610, + 1759359992, + 534414190, + 2176718541, + 4139329115, + 1873836001, + 414664567, + 2282248934, + 4279200368, + 1711684554, + 285281116, + 2405801727, + 4167216745, + 1634467795, + 376229701, + 2685067896, + 3608007406, + 1308918612, + 956543938, + 2808555105, + 3495958263, + 1231636301, + 1047427035, + 2932959818, + 3654703836, + 1088359270, + 936918e3, + 2847714899, + 3736837829, + 1202900863, + 817233897, + 3183342108, + 3401237130, + 1404277552, + 615818150, + 3134207493, + 3453421203, + 1423857449, + 601450431, + 3009837614, + 3294710456, + 1567103746, + 711928724, + 3020668471, + 3272380065, + 1510334235, + 755167117 + ]; + lookupTable2 = uint32ArrayFrom(a_lookUpTable); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getCrc32ChecksumAlgorithmFunction.browser.js +var getCrc32ChecksumAlgorithmFunction; +var init_getCrc32ChecksumAlgorithmFunction_browser = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getCrc32ChecksumAlgorithmFunction.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_module3(); + getCrc32ChecksumAlgorithmFunction = /* @__PURE__ */ __name(() => AwsCrc32, "getCrc32ChecksumAlgorithmFunction"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/types.js +var CLIENT_SUPPORTED_ALGORITHMS, PRIORITY_ORDER_ALGORITHMS; +var init_types2 = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants3(); + CLIENT_SUPPORTED_ALGORITHMS = [ + ChecksumAlgorithm.CRC32, + ChecksumAlgorithm.CRC32C, + ChecksumAlgorithm.CRC64NVME, + ChecksumAlgorithm.SHA1, + ChecksumAlgorithm.SHA256 + ]; + PRIORITY_ORDER_ALGORITHMS = [ + ChecksumAlgorithm.SHA256, + ChecksumAlgorithm.SHA1, + ChecksumAlgorithm.CRC32, + ChecksumAlgorithm.CRC32C, + ChecksumAlgorithm.CRC64NVME + ]; + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/selectChecksumAlgorithmFunction.js +var selectChecksumAlgorithmFunction; +var init_selectChecksumAlgorithmFunction = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/selectChecksumAlgorithmFunction.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_module2(); + init_dist_es25(); + init_constants3(); + init_getCrc32ChecksumAlgorithmFunction_browser(); + init_types2(); + selectChecksumAlgorithmFunction = /* @__PURE__ */ __name((checksumAlgorithm, config3) => { + const { checksumAlgorithms = {} } = config3; + switch (checksumAlgorithm) { + case ChecksumAlgorithm.MD5: + return checksumAlgorithms?.MD5 ?? config3.md5; + case ChecksumAlgorithm.CRC32: + return checksumAlgorithms?.CRC32 ?? getCrc32ChecksumAlgorithmFunction(); + case ChecksumAlgorithm.CRC32C: + return checksumAlgorithms?.CRC32C ?? AwsCrc32c; + case ChecksumAlgorithm.CRC64NVME: + if (typeof crc64NvmeCrtContainer.CrtCrc64Nvme !== "function") { + return checksumAlgorithms?.CRC64NVME ?? Crc64Nvme; + } + return checksumAlgorithms?.CRC64NVME ?? crc64NvmeCrtContainer.CrtCrc64Nvme; + case ChecksumAlgorithm.SHA1: + return checksumAlgorithms?.SHA1 ?? config3.sha1; + case ChecksumAlgorithm.SHA256: + return checksumAlgorithms?.SHA256 ?? config3.sha256; + default: + if (checksumAlgorithms?.[checksumAlgorithm]) { + return checksumAlgorithms[checksumAlgorithm]; + } + throw new Error(`The checksum algorithm "${checksumAlgorithm}" is not supported by the client. Select one of ${CLIENT_SUPPORTED_ALGORITHMS}, or provide an implementation to the client constructor checksums field.`); + } + }, "selectChecksumAlgorithmFunction"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/stringHasher.js +var stringHasher; +var init_stringHasher = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/stringHasher.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es5(); + stringHasher = /* @__PURE__ */ __name((checksumAlgorithmFn, body) => { + const hash4 = new checksumAlgorithmFn(); + hash4.update(toUint8Array(body || "")); + return hash4.digest(); + }, "stringHasher"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsMiddleware.js +var flexibleChecksumsMiddlewareOptions, flexibleChecksumsMiddleware; +var init_flexibleChecksumsMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_dist_es2(); + init_dist_es11(); + init_constants3(); + init_getChecksumAlgorithmForRequest(); + init_getChecksumLocationName(); + init_hasHeader(); + init_hasHeaderWithPrefix(); + init_isStreaming(); + init_selectChecksumAlgorithmFunction(); + init_stringHasher(); + flexibleChecksumsMiddlewareOptions = { + name: "flexibleChecksumsMiddleware", + step: "build", + tags: ["BODY_CHECKSUM"], + override: true + }; + flexibleChecksumsMiddleware = /* @__PURE__ */ __name((config3, middlewareConfig) => (next, context2) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + if (hasHeaderWithPrefix("x-amz-checksum-", args.request.headers)) { + return next(args); + } + const { request, input } = args; + const { body: requestBody, headers } = request; + const { base64Encoder, streamHasher } = config3; + const { requestChecksumRequired, requestAlgorithmMember } = middlewareConfig; + const requestChecksumCalculation = await config3.requestChecksumCalculation(); + const requestAlgorithmMemberName = requestAlgorithmMember?.name; + const requestAlgorithmMemberHttpHeader = requestAlgorithmMember?.httpHeader; + if (requestAlgorithmMemberName && !input[requestAlgorithmMemberName]) { + if (requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired) { + input[requestAlgorithmMemberName] = DEFAULT_CHECKSUM_ALGORITHM; + if (requestAlgorithmMemberHttpHeader) { + headers[requestAlgorithmMemberHttpHeader] = DEFAULT_CHECKSUM_ALGORITHM; + } + } + } + const checksumAlgorithm = getChecksumAlgorithmForRequest(input, { + requestChecksumRequired, + requestAlgorithmMember: requestAlgorithmMember?.name, + requestChecksumCalculation + }); + let updatedBody = requestBody; + let updatedHeaders = headers; + if (checksumAlgorithm) { + switch (checksumAlgorithm) { + case ChecksumAlgorithm.CRC32: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_CRC32", "U"); + break; + case ChecksumAlgorithm.CRC32C: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_CRC32C", "V"); + break; + case ChecksumAlgorithm.CRC64NVME: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_CRC64", "W"); + break; + case ChecksumAlgorithm.SHA1: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_SHA1", "X"); + break; + case ChecksumAlgorithm.SHA256: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_SHA256", "Y"); + break; + } + const checksumLocationName = getChecksumLocationName(checksumAlgorithm); + const checksumAlgorithmFn = selectChecksumAlgorithmFunction(checksumAlgorithm, config3); + if (isStreaming(requestBody)) { + const { getAwsChunkedEncodingStream: getAwsChunkedEncodingStream2, bodyLengthChecker } = config3; + updatedBody = getAwsChunkedEncodingStream2(typeof config3.requestStreamBufferSize === "number" && config3.requestStreamBufferSize >= 8 * 1024 ? createBufferedReadable(requestBody, config3.requestStreamBufferSize, context2.logger) : requestBody, { + base64Encoder, + bodyLengthChecker, + checksumLocationName, + checksumAlgorithmFn, + streamHasher + }); + updatedHeaders = { + ...headers, + "content-encoding": headers["content-encoding"] ? `${headers["content-encoding"]},aws-chunked` : "aws-chunked", + "transfer-encoding": "chunked", + "x-amz-decoded-content-length": headers["content-length"], + "x-amz-content-sha256": "STREAMING-UNSIGNED-PAYLOAD-TRAILER", + "x-amz-trailer": checksumLocationName + }; + delete updatedHeaders["content-length"]; + } else if (!hasHeader2(checksumLocationName, headers)) { + const rawChecksum = await stringHasher(checksumAlgorithmFn, requestBody); + updatedHeaders = { + ...headers, + [checksumLocationName]: base64Encoder(rawChecksum) + }; + } + } + try { + const result = await next({ + ...args, + request: { + ...request, + headers: updatedHeaders, + body: updatedBody + } + }); + return result; + } catch (e2) { + if (e2 instanceof Error && e2.name === "InvalidChunkSizeError") { + try { + if (!e2.message.endsWith(".")) { + e2.message += "."; + } + e2.message += " Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."; + } catch (ignored) { + } + } + throw e2; + } + }, "flexibleChecksumsMiddleware"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsInputMiddleware.js +var flexibleChecksumsInputMiddlewareOptions, flexibleChecksumsInputMiddleware; +var init_flexibleChecksumsInputMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsInputMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_constants3(); + flexibleChecksumsInputMiddlewareOptions = { + name: "flexibleChecksumsInputMiddleware", + toMiddleware: "serializerMiddleware", + relation: "before", + tags: ["BODY_CHECKSUM"], + override: true + }; + flexibleChecksumsInputMiddleware = /* @__PURE__ */ __name((config3, middlewareConfig) => (next, context2) => async (args) => { + const input = args.input; + const { requestValidationModeMember } = middlewareConfig; + const requestChecksumCalculation = await config3.requestChecksumCalculation(); + const responseChecksumValidation = await config3.responseChecksumValidation(); + switch (requestChecksumCalculation) { + case RequestChecksumCalculation.WHEN_REQUIRED: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED", "a"); + break; + case RequestChecksumCalculation.WHEN_SUPPORTED: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED", "Z"); + break; + } + switch (responseChecksumValidation) { + case ResponseChecksumValidation.WHEN_REQUIRED: + setFeature(context2, "FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED", "c"); + break; + case ResponseChecksumValidation.WHEN_SUPPORTED: + setFeature(context2, "FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED", "b"); + break; + } + if (requestValidationModeMember && !input[requestValidationModeMember]) { + if (responseChecksumValidation === ResponseChecksumValidation.WHEN_SUPPORTED) { + input[requestValidationModeMember] = "ENABLED"; + } + } + return next(args); + }, "flexibleChecksumsInputMiddleware"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmListForResponse.js +var getChecksumAlgorithmListForResponse; +var init_getChecksumAlgorithmListForResponse = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmListForResponse.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types2(); + getChecksumAlgorithmListForResponse = /* @__PURE__ */ __name((responseAlgorithms = []) => { + const validChecksumAlgorithms = []; + for (const algorithm of PRIORITY_ORDER_ALGORITHMS) { + if (!responseAlgorithms.includes(algorithm) || !CLIENT_SUPPORTED_ALGORITHMS.includes(algorithm)) { + continue; + } + validChecksumAlgorithms.push(algorithm); + } + return validChecksumAlgorithms; + }, "getChecksumAlgorithmListForResponse"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isChecksumWithPartNumber.js +var isChecksumWithPartNumber; +var init_isChecksumWithPartNumber = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isChecksumWithPartNumber.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isChecksumWithPartNumber = /* @__PURE__ */ __name((checksum) => { + const lastHyphenIndex = checksum.lastIndexOf("-"); + if (lastHyphenIndex !== -1) { + const numberPart = checksum.slice(lastHyphenIndex + 1); + if (!numberPart.startsWith("0")) { + const number4 = parseInt(numberPart, 10); + if (!isNaN(number4) && number4 >= 1 && number4 <= 1e4) { + return true; + } + } + } + return false; + }, "isChecksumWithPartNumber"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksum.js +var getChecksum; +var init_getChecksum = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksum.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_stringHasher(); + getChecksum = /* @__PURE__ */ __name(async (body, { checksumAlgorithmFn, base64Encoder }) => base64Encoder(await stringHasher(checksumAlgorithmFn, body)), "getChecksum"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/validateChecksumFromResponse.js +var validateChecksumFromResponse; +var init_validateChecksumFromResponse = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/validateChecksumFromResponse.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es11(); + init_constants3(); + init_getChecksum(); + init_getChecksumAlgorithmListForResponse(); + init_getChecksumLocationName(); + init_isStreaming(); + init_selectChecksumAlgorithmFunction(); + validateChecksumFromResponse = /* @__PURE__ */ __name(async (response, { config: config3, responseAlgorithms, logger: logger3 }) => { + const checksumAlgorithms = getChecksumAlgorithmListForResponse(responseAlgorithms); + const { body: responseBody, headers: responseHeaders } = response; + for (const algorithm of checksumAlgorithms) { + const responseHeader = getChecksumLocationName(algorithm); + const checksumFromResponse = responseHeaders[responseHeader]; + if (checksumFromResponse) { + let checksumAlgorithmFn; + try { + checksumAlgorithmFn = selectChecksumAlgorithmFunction(algorithm, config3); + } catch (error50) { + if (algorithm === ChecksumAlgorithm.CRC64NVME) { + logger3?.warn(`Skipping ${ChecksumAlgorithm.CRC64NVME} checksum validation: ${error50.message}`); + continue; + } + throw error50; + } + const { base64Encoder } = config3; + if (isStreaming(responseBody)) { + response.body = createChecksumStream({ + expectedChecksum: checksumFromResponse, + checksumSourceLocation: responseHeader, + checksum: new checksumAlgorithmFn(), + source: responseBody, + base64Encoder + }); + return; + } + const checksum = await getChecksum(responseBody, { checksumAlgorithmFn, base64Encoder }); + if (checksum === checksumFromResponse) { + break; + } + throw new Error(`Checksum mismatch: expected "${checksum}" but received "${checksumFromResponse}" in response header "${responseHeader}".`); + } + } + }, "validateChecksumFromResponse"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsResponseMiddleware.js +var flexibleChecksumsResponseMiddlewareOptions, flexibleChecksumsResponseMiddleware; +var init_flexibleChecksumsResponseMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsResponseMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_getChecksumAlgorithmListForResponse(); + init_getChecksumLocationName(); + init_isChecksumWithPartNumber(); + init_validateChecksumFromResponse(); + flexibleChecksumsResponseMiddlewareOptions = { + name: "flexibleChecksumsResponseMiddleware", + toMiddleware: "deserializerMiddleware", + relation: "after", + tags: ["BODY_CHECKSUM"], + override: true + }; + flexibleChecksumsResponseMiddleware = /* @__PURE__ */ __name((config3, middlewareConfig) => (next, context2) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + const input = args.input; + const result = await next(args); + const response = result.response; + const { requestValidationModeMember, responseAlgorithms } = middlewareConfig; + if (requestValidationModeMember && input[requestValidationModeMember] === "ENABLED") { + const { clientName, commandName } = context2; + const isS3WholeObjectMultipartGetResponseChecksum = clientName === "S3Client" && commandName === "GetObjectCommand" && getChecksumAlgorithmListForResponse(responseAlgorithms).every((algorithm) => { + const responseHeader = getChecksumLocationName(algorithm); + const checksumFromResponse = response.headers[responseHeader]; + return !checksumFromResponse || isChecksumWithPartNumber(checksumFromResponse); + }); + if (isS3WholeObjectMultipartGetResponseChecksum) { + return result; + } + await validateChecksumFromResponse(response, { + config: config3, + responseAlgorithms, + logger: context2.logger + }); + } + return result; + }, "flexibleChecksumsResponseMiddleware"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getFlexibleChecksumsPlugin.js +var getFlexibleChecksumsPlugin; +var init_getFlexibleChecksumsPlugin = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getFlexibleChecksumsPlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_flexibleChecksumsInputMiddleware(); + init_flexibleChecksumsMiddleware(); + init_flexibleChecksumsResponseMiddleware(); + getFlexibleChecksumsPlugin = /* @__PURE__ */ __name((config3, middlewareConfig) => ({ + applyToStack: (clientStack) => { + clientStack.add(flexibleChecksumsMiddleware(config3, middlewareConfig), flexibleChecksumsMiddlewareOptions); + clientStack.addRelativeTo(flexibleChecksumsInputMiddleware(config3, middlewareConfig), flexibleChecksumsInputMiddlewareOptions); + clientStack.addRelativeTo(flexibleChecksumsResponseMiddleware(config3, middlewareConfig), flexibleChecksumsResponseMiddlewareOptions); + } + }), "getFlexibleChecksumsPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/resolveFlexibleChecksumsConfig.js +var resolveFlexibleChecksumsConfig; +var init_resolveFlexibleChecksumsConfig = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/resolveFlexibleChecksumsConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es4(); + init_constants3(); + resolveFlexibleChecksumsConfig = /* @__PURE__ */ __name((input) => { + const { requestChecksumCalculation, responseChecksumValidation, requestStreamBufferSize } = input; + return Object.assign(input, { + requestChecksumCalculation: normalizeProvider(requestChecksumCalculation ?? DEFAULT_REQUEST_CHECKSUM_CALCULATION), + responseChecksumValidation: normalizeProvider(responseChecksumValidation ?? DEFAULT_RESPONSE_CHECKSUM_VALIDATION), + requestStreamBufferSize: Number(requestStreamBufferSize ?? 0), + checksumAlgorithms: input.checksumAlgorithms ?? {} + }); + }, "resolveFlexibleChecksumsConfig"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/index.js +var init_dist_es26 = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS(); + init_NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS(); + init_constants3(); + init_flexibleChecksumsMiddleware(); + init_getFlexibleChecksumsPlugin(); + init_resolveFlexibleChecksumsConfig(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-host-header/dist-es/index.js +function resolveHostHeaderConfig(input) { + return input; +} +var hostHeaderMiddleware, hostHeaderMiddlewareOptions, getHostHeaderPlugin; +var init_dist_es27 = __esm({ + "../../node_modules/@aws-sdk/middleware-host-header/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + __name(resolveHostHeaderConfig, "resolveHostHeaderConfig"); + hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { + if (!HttpRequest.isInstance(args.request)) + return next(args); + const { request } = args; + const { handlerProtocol = "" } = options.requestHandler.metadata || {}; + if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { + delete request.headers["host"]; + request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : ""); + } else if (!request.headers["host"]) { + let host = request.hostname; + if (request.port != null) + host += `:${request.port}`; + request.headers["host"] = host; + } + return next(args); + }, "hostHeaderMiddleware"); + hostHeaderMiddlewareOptions = { + name: "hostHeaderMiddleware", + step: "build", + priority: "low", + tags: ["HOST"], + override: true + }; + getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); + } + }), "getHostHeaderPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js +var loggerMiddleware, loggerMiddlewareOptions, getLoggerPlugin; +var init_loggerMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + loggerMiddleware = /* @__PURE__ */ __name(() => (next, context2) => async (args) => { + try { + const response = await next(args); + const { clientName, commandName, logger: logger3, dynamoDbDocumentClientOptions = {} } = context2; + const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context2.inputFilterSensitiveLog; + const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context2.outputFilterSensitiveLog; + const { $metadata, ...outputWithoutMetadata } = response.output; + logger3?.info?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + output: outputFilterSensitiveLog(outputWithoutMetadata), + metadata: $metadata + }); + return response; + } catch (error50) { + const { clientName, commandName, logger: logger3, dynamoDbDocumentClientOptions = {} } = context2; + const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context2.inputFilterSensitiveLog; + logger3?.error?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + error: error50, + metadata: error50.$metadata + }); + throw error50; + } + }, "loggerMiddleware"); + loggerMiddlewareOptions = { + name: "loggerMiddleware", + tags: ["LOGGER"], + step: "initialize", + override: true + }; + getLoggerPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); + } + }), "getLoggerPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-logger/dist-es/index.js +var init_dist_es28 = __esm({ + "../../node_modules/@aws-sdk/middleware-logger/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_loggerMiddleware(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/configuration.js +var recursionDetectionMiddlewareOptions; +var init_configuration = __esm({ + "../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/configuration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + recursionDetectionMiddlewareOptions = { + step: "build", + tags: ["RECURSION_DETECTION"], + name: "recursionDetectionMiddleware", + override: true, + priority: "low" + }; + } +}); + +// ../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/recursionDetectionMiddleware.browser.js +var recursionDetectionMiddleware; +var init_recursionDetectionMiddleware_browser = __esm({ + "../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/recursionDetectionMiddleware.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + recursionDetectionMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => next(args), "recursionDetectionMiddleware"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/getRecursionDetectionPlugin.js +var getRecursionDetectionPlugin; +var init_getRecursionDetectionPlugin = __esm({ + "../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/getRecursionDetectionPlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_configuration(); + init_recursionDetectionMiddleware_browser(); + getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions); + } + }), "getRecursionDetectionPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/index.js +var init_dist_es29 = __esm({ + "../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getRecursionDetectionPlugin(); + init_recursionDetectionMiddleware_browser(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/check-content-length-header.js +function checkContentLengthHeader() { + return (next, context2) => async (args) => { + const { request } = args; + if (HttpRequest.isInstance(request)) { + if (!(CONTENT_LENGTH_HEADER in request.headers) && !(DECODED_CONTENT_LENGTH_HEADER in request.headers)) { + const message2 = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`; + if (typeof context2?.logger?.warn === "function" && !(context2.logger instanceof NoOpLogger)) { + context2.logger.warn(message2); + } else { + console.warn(message2); + } + } + } + return next({ ...args }); + }; +} +var CONTENT_LENGTH_HEADER, DECODED_CONTENT_LENGTH_HEADER, checkContentLengthHeaderMiddlewareOptions, getCheckContentLengthHeaderPlugin; +var init_check_content_length_header = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/check-content-length-header.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es21(); + CONTENT_LENGTH_HEADER = "content-length"; + DECODED_CONTENT_LENGTH_HEADER = "x-amz-decoded-content-length"; + __name(checkContentLengthHeader, "checkContentLengthHeader"); + checkContentLengthHeaderMiddlewareOptions = { + step: "finalizeRequest", + tags: ["CHECK_CONTENT_LENGTH_HEADER"], + name: "getCheckContentLengthHeaderPlugin", + override: true + }; + getCheckContentLengthHeaderPlugin = /* @__PURE__ */ __name((unused) => ({ + applyToStack: (clientStack) => { + clientStack.add(checkContentLengthHeader(), checkContentLengthHeaderMiddlewareOptions); + } + }), "getCheckContentLengthHeaderPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-endpoint-middleware.js +var regionRedirectEndpointMiddleware, regionRedirectEndpointMiddlewareOptions; +var init_region_redirect_endpoint_middleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-endpoint-middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + regionRedirectEndpointMiddleware = /* @__PURE__ */ __name((config3) => { + return (next, context2) => async (args) => { + const originalRegion = await config3.region(); + const regionProviderRef = config3.region; + let unlock = /* @__PURE__ */ __name(() => { + }, "unlock"); + if (context2.__s3RegionRedirect) { + Object.defineProperty(config3, "region", { + writable: false, + value: async () => { + return context2.__s3RegionRedirect; + } + }); + unlock = /* @__PURE__ */ __name(() => Object.defineProperty(config3, "region", { + writable: true, + value: regionProviderRef + }), "unlock"); + } + try { + const result = await next(args); + if (context2.__s3RegionRedirect) { + unlock(); + const region = await config3.region(); + if (originalRegion !== region) { + throw new Error("Region was not restored following S3 region redirect."); + } + } + return result; + } catch (e2) { + unlock(); + throw e2; + } + }; + }, "regionRedirectEndpointMiddleware"); + regionRedirectEndpointMiddlewareOptions = { + tags: ["REGION_REDIRECT", "S3"], + name: "regionRedirectEndpointMiddleware", + override: true, + relation: "before", + toMiddleware: "endpointV2Middleware" + }; + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-middleware.js +function regionRedirectMiddleware(clientConfig) { + return (next, context2) => async (args) => { + try { + return await next(args); + } catch (err) { + if (clientConfig.followRegionRedirects) { + const statusCode = err?.$metadata?.httpStatusCode; + const isHeadBucket = context2.commandName === "HeadBucketCommand"; + const bucketRegionHeader = err?.$response?.headers?.["x-amz-bucket-region"]; + if (bucketRegionHeader) { + if (statusCode === 301 || statusCode === 400 && (err?.name === "IllegalLocationConstraintException" || isHeadBucket)) { + try { + const actualRegion = bucketRegionHeader; + context2.logger?.debug(`Redirecting from ${await clientConfig.region()} to ${actualRegion}`); + context2.__s3RegionRedirect = actualRegion; + } catch (e2) { + throw new Error("Region redirect failed: " + e2); + } + return next(args); + } + } + } + throw err; + } + }; +} +var regionRedirectMiddlewareOptions, getRegionRedirectMiddlewarePlugin; +var init_region_redirect_middleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_region_redirect_endpoint_middleware(); + __name(regionRedirectMiddleware, "regionRedirectMiddleware"); + regionRedirectMiddlewareOptions = { + step: "initialize", + tags: ["REGION_REDIRECT", "S3"], + name: "regionRedirectMiddleware", + override: true + }; + getRegionRedirectMiddlewarePlugin = /* @__PURE__ */ __name((clientConfig) => ({ + applyToStack: (clientStack) => { + clientStack.add(regionRedirectMiddleware(clientConfig), regionRedirectMiddlewareOptions); + clientStack.addRelativeTo(regionRedirectEndpointMiddleware(clientConfig), regionRedirectEndpointMiddlewareOptions); + } + }), "getRegionRedirectMiddlewarePlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-expires-middleware.js +var s3ExpiresMiddleware, s3ExpiresMiddlewareOptions, getS3ExpiresMiddlewarePlugin; +var init_s3_expires_middleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-expires-middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es21(); + s3ExpiresMiddleware = /* @__PURE__ */ __name((config3) => { + return (next, context2) => async (args) => { + const result = await next(args); + const { response } = result; + if (HttpResponse.isInstance(response)) { + if (response.headers.expires) { + response.headers.expiresstring = response.headers.expires; + try { + parseRfc7231DateTime(response.headers.expires); + } catch (e2) { + context2.logger?.warn(`AWS SDK Warning for ${context2.clientName}::${context2.commandName} response parsing (${response.headers.expires}): ${e2}`); + delete response.headers.expires; + } + } + } + return result; + }; + }, "s3ExpiresMiddleware"); + s3ExpiresMiddlewareOptions = { + tags: ["S3"], + name: "s3ExpiresMiddleware", + override: true, + relation: "after", + toMiddleware: "deserializerMiddleware" + }; + getS3ExpiresMiddlewarePlugin = /* @__PURE__ */ __name((clientConfig) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(s3ExpiresMiddleware(clientConfig), s3ExpiresMiddlewareOptions); + } + }), "getS3ExpiresMiddlewarePlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCache.js +var _S3ExpressIdentityCache, S3ExpressIdentityCache; +var init_S3ExpressIdentityCache = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCache.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + _S3ExpressIdentityCache = class { + data; + lastPurgeTime = Date.now(); + constructor(data = {}) { + this.data = data; + } + get(key) { + const entry = this.data[key]; + if (!entry) { + return; + } + return entry; + } + set(key, entry) { + this.data[key] = entry; + return entry; + } + delete(key) { + delete this.data[key]; + } + async purgeExpired() { + const now = Date.now(); + if (this.lastPurgeTime + _S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS > now) { + return; + } + for (const key in this.data) { + const entry = this.data[key]; + if (!entry.isRefreshing) { + const credential = await entry.identity; + if (credential.expiration) { + if (credential.expiration.getTime() < now) { + delete this.data[key]; + } + } + } + } + } + }; + S3ExpressIdentityCache = _S3ExpressIdentityCache; + __name(S3ExpressIdentityCache, "S3ExpressIdentityCache"); + __publicField(S3ExpressIdentityCache, "EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS", 3e4); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCacheEntry.js +var S3ExpressIdentityCacheEntry; +var init_S3ExpressIdentityCacheEntry = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCacheEntry.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + S3ExpressIdentityCacheEntry = class { + _identity; + isRefreshing; + accessed; + constructor(_identity, isRefreshing = false, accessed = Date.now()) { + this._identity = _identity; + this.isRefreshing = isRefreshing; + this.accessed = accessed; + } + get identity() { + this.accessed = Date.now(); + return this._identity; + } + }; + __name(S3ExpressIdentityCacheEntry, "S3ExpressIdentityCacheEntry"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityProviderImpl.js +var _S3ExpressIdentityProviderImpl, S3ExpressIdentityProviderImpl; +var init_S3ExpressIdentityProviderImpl = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityProviderImpl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_S3ExpressIdentityCache(); + init_S3ExpressIdentityCacheEntry(); + _S3ExpressIdentityProviderImpl = class { + createSessionFn; + cache; + constructor(createSessionFn, cache3 = new S3ExpressIdentityCache()) { + this.createSessionFn = createSessionFn; + this.cache = cache3; + } + async getS3ExpressIdentity(awsIdentity, identityProperties) { + const key = identityProperties.Bucket; + const { cache: cache3 } = this; + const entry = cache3.get(key); + if (entry) { + return entry.identity.then((identity2) => { + const isExpired = (identity2.expiration?.getTime() ?? 0) < Date.now(); + if (isExpired) { + return cache3.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity; + } + const isExpiringSoon = (identity2.expiration?.getTime() ?? 0) < Date.now() + _S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS; + if (isExpiringSoon && !entry.isRefreshing) { + entry.isRefreshing = true; + this.getIdentity(key).then((id) => { + cache3.set(key, new S3ExpressIdentityCacheEntry(Promise.resolve(id))); + }); + } + return identity2; + }); + } + return cache3.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity; + } + async getIdentity(key) { + await this.cache.purgeExpired().catch((error50) => { + console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n" + error50); + }); + const session = await this.createSessionFn(key); + if (!session.Credentials?.AccessKeyId || !session.Credentials?.SecretAccessKey) { + throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey."); + } + const identity2 = { + accessKeyId: session.Credentials.AccessKeyId, + secretAccessKey: session.Credentials.SecretAccessKey, + sessionToken: session.Credentials.SessionToken, + expiration: session.Credentials.Expiration ? new Date(session.Credentials.Expiration) : void 0 + }; + return identity2; + } + }; + S3ExpressIdentityProviderImpl = _S3ExpressIdentityProviderImpl; + __name(S3ExpressIdentityProviderImpl, "S3ExpressIdentityProviderImpl"); + __publicField(S3ExpressIdentityProviderImpl, "REFRESH_WINDOW_MS", 6e4); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/constants.js +var S3_EXPRESS_BUCKET_TYPE, S3_EXPRESS_BACKEND, S3_EXPRESS_AUTH_SCHEME, SESSION_TOKEN_QUERY_PARAM, SESSION_TOKEN_HEADER; +var init_constants6 = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + S3_EXPRESS_BUCKET_TYPE = "Directory"; + S3_EXPRESS_BACKEND = "S3Express"; + S3_EXPRESS_AUTH_SCHEME = "sigv4-s3express"; + SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token"; + SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/SignatureV4S3Express.js +function getCredentialsWithoutSessionToken(credentials) { + const credentialsWithoutSessionToken = { + accessKeyId: credentials.accessKeyId, + secretAccessKey: credentials.secretAccessKey, + expiration: credentials.expiration + }; + return credentialsWithoutSessionToken; +} +function setSingleOverride(privateAccess, credentialsWithoutSessionToken) { + const id = setTimeout(() => { + throw new Error("SignatureV4S3Express credential override was created but not called."); + }, 10); + const currentCredentialProvider = privateAccess.credentialProvider; + const overrideCredentialsProviderOnce = /* @__PURE__ */ __name(() => { + clearTimeout(id); + privateAccess.credentialProvider = currentCredentialProvider; + return Promise.resolve(credentialsWithoutSessionToken); + }, "overrideCredentialsProviderOnce"); + privateAccess.credentialProvider = overrideCredentialsProviderOnce; +} +var SignatureV4S3Express; +var init_SignatureV4S3Express = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/SignatureV4S3Express.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es18(); + init_constants6(); + SignatureV4S3Express = class extends SignatureV4 { + async signWithCredentials(requestToSign, credentials, options) { + const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); + requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken; + const privateAccess = this; + setSingleOverride(privateAccess, credentialsWithoutSessionToken); + return privateAccess.signRequest(requestToSign, options ?? {}); + } + async presignWithCredentials(requestToSign, credentials, options) { + const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); + delete requestToSign.headers[SESSION_TOKEN_HEADER]; + requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; + requestToSign.query = requestToSign.query ?? {}; + requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; + const privateAccess = this; + setSingleOverride(privateAccess, credentialsWithoutSessionToken); + return this.presign(requestToSign, options); + } + }; + __name(SignatureV4S3Express, "SignatureV4S3Express"); + __name(getCredentialsWithoutSessionToken, "getCredentialsWithoutSessionToken"); + __name(setSingleOverride, "setSingleOverride"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressMiddleware.js +var s3ExpressMiddleware, s3ExpressMiddlewareOptions, getS3ExpressPlugin; +var init_s3ExpressMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_dist_es2(); + init_constants6(); + s3ExpressMiddleware = /* @__PURE__ */ __name((options) => { + return (next, context2) => async (args) => { + if (context2.endpointV2) { + const endpoint = context2.endpointV2; + const isS3ExpressAuth = endpoint.properties?.authSchemes?.[0]?.name === S3_EXPRESS_AUTH_SCHEME; + const isS3ExpressBucket = endpoint.properties?.backend === S3_EXPRESS_BACKEND || endpoint.properties?.bucketType === S3_EXPRESS_BUCKET_TYPE; + if (isS3ExpressBucket) { + setFeature(context2, "S3_EXPRESS_BUCKET", "J"); + context2.isS3ExpressBucket = true; + } + if (isS3ExpressAuth) { + const requestBucket = args.input.Bucket; + if (requestBucket) { + const s3ExpressIdentity = await options.s3ExpressIdentityProvider.getS3ExpressIdentity(await options.credentials(), { + Bucket: requestBucket + }); + context2.s3ExpressIdentity = s3ExpressIdentity; + if (HttpRequest.isInstance(args.request) && s3ExpressIdentity.sessionToken) { + args.request.headers[SESSION_TOKEN_HEADER] = s3ExpressIdentity.sessionToken; + } + } + } + } + return next(args); + }; + }, "s3ExpressMiddleware"); + s3ExpressMiddlewareOptions = { + name: "s3ExpressMiddleware", + step: "build", + tags: ["S3", "S3_EXPRESS"], + override: true + }; + getS3ExpressPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(s3ExpressMiddleware(options), s3ExpressMiddlewareOptions); + } + }), "getS3ExpressPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/signS3Express.js +var signS3Express; +var init_signS3Express = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/signS3Express.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + signS3Express = /* @__PURE__ */ __name(async (s3ExpressIdentity, signingOptions, request, sigV4MultiRegionSigner) => { + const signedRequest = await sigV4MultiRegionSigner.signWithCredentials(request, s3ExpressIdentity, {}); + if (signedRequest.headers["X-Amz-Security-Token"] || signedRequest.headers["x-amz-security-token"]) { + throw new Error("X-Amz-Security-Token must not be set for s3-express requests."); + } + return signedRequest; + }, "signS3Express"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressHttpSigningMiddleware.js +var defaultErrorHandler2, defaultSuccessHandler2, s3ExpressHttpSigningMiddleware, getS3ExpressHttpSigningPlugin; +var init_s3ExpressHttpSigningMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressHttpSigningMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_dist_es2(); + init_dist_es4(); + init_signS3Express(); + defaultErrorHandler2 = /* @__PURE__ */ __name((signingProperties) => (error50) => { + throw error50; + }, "defaultErrorHandler"); + defaultSuccessHandler2 = /* @__PURE__ */ __name((httpResponse, signingProperties) => { + }, "defaultSuccessHandler"); + s3ExpressHttpSigningMiddleware = /* @__PURE__ */ __name((config3) => (next, context2) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + const smithyContext = getSmithyContext(context2); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + } + const { httpAuthOption: { signingProperties = {} }, identity: identity2, signer } = scheme; + let request; + if (context2.s3ExpressIdentity) { + request = await signS3Express(context2.s3ExpressIdentity, signingProperties, args.request, await config3.signer()); + } else { + request = await signer.sign(args.request, identity2, signingProperties); + } + const output = await next({ + ...args, + request + }).catch((signer.errorHandler || defaultErrorHandler2)(signingProperties)); + (signer.successHandler || defaultSuccessHandler2)(output.response, signingProperties); + return output; + }, "s3ExpressHttpSigningMiddleware"); + getS3ExpressHttpSigningPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(s3ExpressHttpSigningMiddleware(config3), httpSigningMiddlewareOptions); + } + }), "getS3ExpressHttpSigningPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/index.js +var init_s3_express = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_S3ExpressIdentityProviderImpl(); + init_SignatureV4S3Express(); + init_s3ExpressMiddleware(); + init_s3ExpressHttpSigningMiddleware(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3Configuration.js +var resolveS3Config; +var init_s3Configuration = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3Configuration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_s3_express(); + resolveS3Config = /* @__PURE__ */ __name((input, { session }) => { + const [s3ClientProvider, CreateSessionCommandCtor] = session; + const { forcePathStyle, useAccelerateEndpoint, disableMultiregionAccessPoints, followRegionRedirects, s3ExpressIdentityProvider, bucketEndpoint, expectContinueHeader } = input; + return Object.assign(input, { + forcePathStyle: forcePathStyle ?? false, + useAccelerateEndpoint: useAccelerateEndpoint ?? false, + disableMultiregionAccessPoints: disableMultiregionAccessPoints ?? false, + followRegionRedirects: followRegionRedirects ?? false, + s3ExpressIdentityProvider: s3ExpressIdentityProvider ?? new S3ExpressIdentityProviderImpl(async (key) => s3ClientProvider().send(new CreateSessionCommandCtor({ + Bucket: key + }))), + bucketEndpoint: bucketEndpoint ?? false, + expectContinueHeader: expectContinueHeader ?? 2097152 + }); + }, "resolveS3Config"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js +var THROW_IF_EMPTY_BODY, MAX_BYTES_TO_INSPECT, throw200ExceptionsMiddleware, collectBody2, throw200ExceptionsMiddlewareOptions, getThrow200ExceptionsPlugin; +var init_throw_200_exceptions = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es11(); + THROW_IF_EMPTY_BODY = { + CopyObjectCommand: true, + UploadPartCopyCommand: true, + CompleteMultipartUploadCommand: true + }; + MAX_BYTES_TO_INSPECT = 3e3; + throw200ExceptionsMiddleware = /* @__PURE__ */ __name((config3) => (next, context2) => async (args) => { + const result = await next(args); + const { response } = result; + if (!HttpResponse.isInstance(response)) { + return result; + } + const { statusCode, body: sourceBody } = response; + if (statusCode < 200 || statusCode >= 300) { + return result; + } + const isSplittableStream = typeof sourceBody?.stream === "function" || typeof sourceBody?.pipe === "function" || typeof sourceBody?.tee === "function"; + if (!isSplittableStream) { + return result; + } + let bodyCopy = sourceBody; + let body = sourceBody; + if (sourceBody && typeof sourceBody === "object" && !(sourceBody instanceof Uint8Array)) { + [bodyCopy, body] = await splitStream(sourceBody); + } + response.body = body; + const bodyBytes = await collectBody2(bodyCopy, { + streamCollector: async (stream) => { + return headStream(stream, MAX_BYTES_TO_INSPECT); + } + }); + if (typeof bodyCopy?.destroy === "function") { + bodyCopy.destroy(); + } + const bodyStringTail = config3.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16)); + if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context2.commandName]) { + const err = new Error("S3 aborted request"); + err.name = "InternalError"; + throw err; + } + if (bodyStringTail && bodyStringTail.endsWith("")) { + response.statusCode = 400; + } + return result; + }, "throw200ExceptionsMiddleware"); + collectBody2 = /* @__PURE__ */ __name((streamBody = new Uint8Array(), context2) => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context2.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); + }, "collectBody"); + throw200ExceptionsMiddlewareOptions = { + relation: "after", + toMiddleware: "deserializerMiddleware", + tags: ["THROW_200_EXCEPTIONS", "S3"], + name: "throw200ExceptionsMiddleware", + override: true + }; + getThrow200ExceptionsPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(throw200ExceptionsMiddleware(config3), throw200ExceptionsMiddlewareOptions); + } + }), "getThrow200ExceptionsPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/util-arn-parser/dist-es/index.js +var validate; +var init_dist_es30 = __esm({ + "../../node_modules/@aws-sdk/util-arn-parser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + validate = /* @__PURE__ */ __name((str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6, "validate"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/bucket-endpoint-middleware.js +function bucketEndpointMiddleware(options) { + return (next, context2) => async (args) => { + if (options.bucketEndpoint) { + const endpoint = context2.endpointV2; + if (endpoint) { + const bucket = args.input.Bucket; + if (typeof bucket === "string") { + try { + const bucketEndpointUrl = new URL(bucket); + context2.endpointV2 = { + ...endpoint, + url: bucketEndpointUrl + }; + } catch (e2) { + const warning = `@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${bucket} could not be parsed as URL.`; + if (context2.logger?.constructor?.name === "NoOpLogger") { + console.warn(warning); + } else { + context2.logger?.warn?.(warning); + } + throw e2; + } + } + } + } + return next(args); + }; +} +var bucketEndpointMiddlewareOptions; +var init_bucket_endpoint_middleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/bucket-endpoint-middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(bucketEndpointMiddleware, "bucketEndpointMiddleware"); + bucketEndpointMiddlewareOptions = { + name: "bucketEndpointMiddleware", + override: true, + relation: "after", + toMiddleware: "endpointV2Middleware" + }; + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/validate-bucket-name.js +function validateBucketNameMiddleware({ bucketEndpoint }) { + return (next) => async (args) => { + const { input: { Bucket } } = args; + if (!bucketEndpoint && typeof Bucket === "string" && !validate(Bucket) && Bucket.indexOf("/") >= 0) { + const err = new Error(`Bucket name shouldn't contain '/', received '${Bucket}'`); + err.name = "InvalidBucketName"; + throw err; + } + return next({ ...args }); + }; +} +var validateBucketNameMiddlewareOptions, getValidateBucketNamePlugin; +var init_validate_bucket_name = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/validate-bucket-name.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es30(); + init_bucket_endpoint_middleware(); + __name(validateBucketNameMiddleware, "validateBucketNameMiddleware"); + validateBucketNameMiddlewareOptions = { + step: "initialize", + tags: ["VALIDATE_BUCKET_NAME"], + name: "validateBucketNameMiddleware", + override: true + }; + getValidateBucketNamePlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(validateBucketNameMiddleware(options), validateBucketNameMiddlewareOptions); + clientStack.addRelativeTo(bucketEndpointMiddleware(options), bucketEndpointMiddlewareOptions); + } + }), "getValidateBucketNamePlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/index.js +var init_dist_es31 = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_check_content_length_header(); + init_region_redirect_endpoint_middleware(); + init_region_redirect_middleware(); + init_s3_expires_middleware(); + init_s3_express(); + init_s3Configuration(); + init_throw_200_exceptions(); + init_validate_bucket_name(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js +function isValidUserAgentAppId(appId) { + if (appId === void 0) { + return true; + } + return typeof appId === "string" && appId.length <= 50; +} +function resolveUserAgentConfig(input) { + const normalizedAppIdProvider = normalizeProvider2(input.userAgentAppId ?? DEFAULT_UA_APP_ID); + const { customUserAgent } = input; + return Object.assign(input, { + customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent, + userAgentAppId: async () => { + const appId = await normalizedAppIdProvider(); + if (!isValidUserAgentAppId(appId)) { + const logger3 = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger; + if (typeof appId !== "string") { + logger3?.warn("userAgentAppId must be a string or undefined."); + } else if (appId.length > 50) { + logger3?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters."); + } + } + return appId; + } + }); +} +var DEFAULT_UA_APP_ID; +var init_configurations = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + DEFAULT_UA_APP_ID = void 0; + __name(isValidUserAgentAppId, "isValidUserAgentAppId"); + __name(resolveUserAgentConfig, "resolveUserAgentConfig"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/cache/EndpointCache.js +var EndpointCache; +var init_EndpointCache = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/cache/EndpointCache.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + EndpointCache = class { + capacity; + data = /* @__PURE__ */ new Map(); + parameters = []; + constructor({ size, params }) { + this.capacity = size ?? 50; + if (params) { + this.parameters = params; + } + } + get(endpointParams, resolver) { + const key = this.hash(endpointParams); + if (key === false) { + return resolver(); + } + if (!this.data.has(key)) { + if (this.data.size > this.capacity + 10) { + const keys = this.data.keys(); + let i2 = 0; + while (true) { + const { value, done } = keys.next(); + this.data.delete(value); + if (done || ++i2 > 10) { + break; + } + } + } + this.data.set(key, resolver()); + } + return this.data.get(key); + } + size() { + return this.data.size; + } + hash(endpointParams) { + let buffer = ""; + const { parameters } = this; + if (parameters.length === 0) { + return false; + } + for (const param of parameters) { + const val = String(endpointParams[param] ?? ""); + if (val.includes("|;")) { + return false; + } + buffer += val + "|;"; + } + return buffer; + } + }; + __name(EndpointCache, "EndpointCache"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/isIpAddress.js +var IP_V4_REGEX, isIpAddress; +var init_isIpAddress = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/isIpAddress.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`); + isIpAddress = /* @__PURE__ */ __name((value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"), "isIpAddress"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/isValidHostLabel.js +var VALID_HOST_LABEL_REGEX, isValidHostLabel; +var init_isValidHostLabel = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/isValidHostLabel.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); + isValidHostLabel = /* @__PURE__ */ __name((value, allowSubDomains = false) => { + if (!allowSubDomains) { + return VALID_HOST_LABEL_REGEX.test(value); + } + const labels = value.split("."); + for (const label of labels) { + if (!isValidHostLabel(label)) { + return false; + } + } + return true; + }, "isValidHostLabel"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/customEndpointFunctions.js +var customEndpointFunctions; +var init_customEndpointFunctions = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/customEndpointFunctions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + customEndpointFunctions = {}; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/debug/debugId.js +var debugId; +var init_debugId = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/debug/debugId.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + debugId = "endpoints"; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/debug/toDebugString.js +function toDebugString(input) { + if (typeof input !== "object" || input == null) { + return input; + } + if ("ref" in input) { + return `$${toDebugString(input.ref)}`; + } + if ("fn" in input) { + return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; + } + return JSON.stringify(input, null, 2); +} +var init_toDebugString = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/debug/toDebugString.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(toDebugString, "toDebugString"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/debug/index.js +var init_debug = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/debug/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_debugId(); + init_toDebugString(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointError.js +var EndpointError; +var init_EndpointError = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointError.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + EndpointError = class extends Error { + constructor(message2) { + super(message2); + this.name = "EndpointError"; + } + }; + __name(EndpointError, "EndpointError"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointFunctions.js +var init_EndpointFunctions = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointFunctions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointRuleObject.js +var init_EndpointRuleObject2 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/ErrorRuleObject.js +var init_ErrorRuleObject2 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/ErrorRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/RuleSetObject.js +var init_RuleSetObject2 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/RuleSetObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/TreeRuleObject.js +var init_TreeRuleObject2 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/TreeRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/shared.js +var init_shared2 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/shared.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/index.js +var init_types3 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EndpointError(); + init_EndpointFunctions(); + init_EndpointRuleObject2(); + init_ErrorRuleObject2(); + init_RuleSetObject2(); + init_TreeRuleObject2(); + init_shared2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/booleanEquals.js +var booleanEquals; +var init_booleanEquals = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/booleanEquals.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + booleanEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "booleanEquals"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js +var getAttrPathList; +var init_getAttrPathList = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + getAttrPathList = /* @__PURE__ */ __name((path) => { + const parts = path.split("."); + const pathList = []; + for (const part of parts) { + const squareBracketIndex = part.indexOf("["); + if (squareBracketIndex !== -1) { + if (part.indexOf("]") !== part.length - 1) { + throw new EndpointError(`Path: '${path}' does not end with ']'`); + } + const arrayIndex = part.slice(squareBracketIndex + 1, -1); + if (Number.isNaN(parseInt(arrayIndex))) { + throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`); + } + if (squareBracketIndex !== 0) { + pathList.push(part.slice(0, squareBracketIndex)); + } + pathList.push(arrayIndex); + } else { + pathList.push(part); + } + } + return pathList; + }, "getAttrPathList"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js +var getAttr; +var init_getAttr = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_getAttrPathList(); + getAttr = /* @__PURE__ */ __name((value, path) => getAttrPathList(path).reduce((acc, index) => { + if (typeof acc !== "object") { + throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`); + } else if (Array.isArray(acc)) { + return acc[parseInt(index)]; + } + return acc[index]; + }, value), "getAttr"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/isSet.js +var isSet; +var init_isSet = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/isSet.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isSet = /* @__PURE__ */ __name((value) => value != null, "isSet"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/not.js +var not2; +var init_not = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/not.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + not2 = /* @__PURE__ */ __name((value) => !value, "not"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/parseURL.js +var DEFAULT_PORTS, parseURL; +var init_parseURL = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/parseURL.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es(); + init_isIpAddress(); + DEFAULT_PORTS = { + [EndpointURLScheme.HTTP]: 80, + [EndpointURLScheme.HTTPS]: 443 + }; + parseURL = /* @__PURE__ */ __name((value) => { + const whatwgURL = (() => { + try { + if (value instanceof URL) { + return value; + } + if (typeof value === "object" && "hostname" in value) { + const { hostname: hostname4, port, protocol: protocol2 = "", path = "", query = {} } = value; + const url2 = new URL(`${protocol2}//${hostname4}${port ? `:${port}` : ""}${path}`); + url2.search = Object.entries(query).map(([k2, v3]) => `${k2}=${v3}`).join("&"); + return url2; + } + return new URL(value); + } catch (error50) { + return null; + } + })(); + if (!whatwgURL) { + console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); + return null; + } + const urlString = whatwgURL.href; + const { host, hostname: hostname3, pathname, protocol, search } = whatwgURL; + if (search) { + return null; + } + const scheme = protocol.slice(0, -1); + if (!Object.values(EndpointURLScheme).includes(scheme)) { + return null; + } + const isIp = isIpAddress(hostname3); + const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`); + const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`; + return { + scheme, + authority, + path: pathname, + normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, + isIp + }; + }, "parseURL"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/stringEquals.js +var stringEquals; +var init_stringEquals = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/stringEquals.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + stringEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "stringEquals"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/substring.js +var substring; +var init_substring = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/substring.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + substring = /* @__PURE__ */ __name((input, start, stop, reverse) => { + if (start >= stop || input.length < stop || /[^\u0000-\u007f]/.test(input)) { + return null; + } + if (!reverse) { + return input.substring(start, stop); + } + return input.substring(input.length - stop, input.length - start); + }, "substring"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/uriEncode.js +var uriEncode; +var init_uriEncode = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/uriEncode.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + uriEncode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/[!*'()]/g, (c2) => `%${c2.charCodeAt(0).toString(16).toUpperCase()}`), "uriEncode"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/index.js +var init_lib = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_booleanEquals(); + init_getAttr(); + init_isSet(); + init_isValidHostLabel(); + init_not(); + init_parseURL(); + init_stringEquals(); + init_substring(); + init_uriEncode(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js +var endpointFunctions; +var init_endpointFunctions = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_lib(); + endpointFunctions = { + booleanEquals, + getAttr, + isSet, + isValidHostLabel, + not: not2, + parseURL, + stringEquals, + substring, + uriEncode + }; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js +var evaluateTemplate; +var init_evaluateTemplate = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_lib(); + evaluateTemplate = /* @__PURE__ */ __name((template, options) => { + const evaluatedTemplateArr = []; + const templateContext = { + ...options.endpointParams, + ...options.referenceRecord + }; + let currentIndex = 0; + while (currentIndex < template.length) { + const openingBraceIndex = template.indexOf("{", currentIndex); + if (openingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(currentIndex)); + break; + } + evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); + const closingBraceIndex = template.indexOf("}", openingBraceIndex); + if (closingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(openingBraceIndex)); + break; + } + if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { + evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); + currentIndex = closingBraceIndex + 2; + } + const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); + if (parameterName.includes("#")) { + const [refName, attrName] = parameterName.split("#"); + evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName)); + } else { + evaluatedTemplateArr.push(templateContext[parameterName]); + } + currentIndex = closingBraceIndex + 1; + } + return evaluatedTemplateArr.join(""); + }, "evaluateTemplate"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js +var getReferenceValue; +var init_getReferenceValue = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getReferenceValue = /* @__PURE__ */ __name(({ ref }, options) => { + const referenceRecord = { + ...options.endpointParams, + ...options.referenceRecord + }; + return referenceRecord[ref]; + }, "getReferenceValue"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js +var evaluateExpression, callFunction, group3; +var init_evaluateExpression = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_customEndpointFunctions(); + init_endpointFunctions(); + init_evaluateTemplate(); + init_getReferenceValue(); + evaluateExpression = /* @__PURE__ */ __name((obj, keyName, options) => { + if (typeof obj === "string") { + return evaluateTemplate(obj, options); + } else if (obj["fn"]) { + return group3.callFunction(obj, options); + } else if (obj["ref"]) { + return getReferenceValue(obj, options); + } + throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`); + }, "evaluateExpression"); + callFunction = /* @__PURE__ */ __name(({ fn, argv: argv2 }, options) => { + const evaluatedArgs = argv2.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : group3.evaluateExpression(arg, "arg", options)); + const fnSegments = fn.split("."); + if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) { + return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs); + } + return endpointFunctions[fn](...evaluatedArgs); + }, "callFunction"); + group3 = { + evaluateExpression, + callFunction + }; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/callFunction.js +var init_callFunction = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/callFunction.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_evaluateExpression(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js +var evaluateCondition; +var init_evaluateCondition = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_debug(); + init_types3(); + init_callFunction(); + evaluateCondition = /* @__PURE__ */ __name(({ assign, ...fnArgs }, options) => { + if (assign && assign in options.referenceRecord) { + throw new EndpointError(`'${assign}' is already defined in Reference Record.`); + } + const value = callFunction(fnArgs, options); + options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`); + return { + result: value === "" ? true : !!value, + ...assign != null && { toAssign: { name: assign, value } } + }; + }, "evaluateCondition"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js +var evaluateConditions; +var init_evaluateConditions = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_debug(); + init_evaluateCondition(); + evaluateConditions = /* @__PURE__ */ __name((conditions = [], options) => { + const conditionsReferenceRecord = {}; + for (const condition of conditions) { + const { result, toAssign } = evaluateCondition(condition, { + ...options, + referenceRecord: { + ...options.referenceRecord, + ...conditionsReferenceRecord + } + }); + if (!result) { + return { result }; + } + if (toAssign) { + conditionsReferenceRecord[toAssign.name] = toAssign.value; + options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`); + } + } + return { result: true, referenceRecord: conditionsReferenceRecord }; + }, "evaluateConditions"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js +var getEndpointHeaders; +var init_getEndpointHeaders = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_evaluateExpression(); + getEndpointHeaders = /* @__PURE__ */ __name((headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({ + ...acc, + [headerKey]: headerVal.map((headerValEntry) => { + const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options); + if (typeof processedExpr !== "string") { + throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`); + } + return processedExpr; + }) + }), {}), "getEndpointHeaders"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js +var getEndpointProperties, getEndpointProperty, group4; +var init_getEndpointProperties = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_evaluateTemplate(); + getEndpointProperties = /* @__PURE__ */ __name((properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({ + ...acc, + [propertyKey]: group4.getEndpointProperty(propertyVal, options) + }), {}), "getEndpointProperties"); + getEndpointProperty = /* @__PURE__ */ __name((property, options) => { + if (Array.isArray(property)) { + return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); + } + switch (typeof property) { + case "string": + return evaluateTemplate(property, options); + case "object": + if (property === null) { + throw new EndpointError(`Unexpected endpoint property: ${property}`); + } + return group4.getEndpointProperties(property, options); + case "boolean": + return property; + default: + throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`); + } + }, "getEndpointProperty"); + group4 = { + getEndpointProperty, + getEndpointProperties + }; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointUrl.js +var getEndpointUrl; +var init_getEndpointUrl = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointUrl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_evaluateExpression(); + getEndpointUrl = /* @__PURE__ */ __name((endpointUrl, options) => { + const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); + if (typeof expression === "string") { + try { + return new URL(expression); + } catch (error50) { + console.error(`Failed to construct URL with ${expression}`, error50); + throw error50; + } + } + throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`); + }, "getEndpointUrl"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js +var evaluateEndpointRule; +var init_evaluateEndpointRule = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_debug(); + init_evaluateConditions(); + init_getEndpointHeaders(); + init_getEndpointProperties(); + init_getEndpointUrl(); + evaluateEndpointRule = /* @__PURE__ */ __name((endpointRule, options) => { + const { conditions, endpoint } = endpointRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + const endpointRuleOptions = { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }; + const { url: url2, properties, headers } = endpoint; + options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`); + return { + ...headers != void 0 && { + headers: getEndpointHeaders(headers, endpointRuleOptions) + }, + ...properties != void 0 && { + properties: getEndpointProperties(properties, endpointRuleOptions) + }, + url: getEndpointUrl(url2, endpointRuleOptions) + }; + }, "evaluateEndpointRule"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js +var evaluateErrorRule; +var init_evaluateErrorRule = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_evaluateConditions(); + init_evaluateExpression(); + evaluateErrorRule = /* @__PURE__ */ __name((errorRule, options) => { + const { conditions, error: error50 } = errorRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + throw new EndpointError(evaluateExpression(error50, "Error", { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + })); + }, "evaluateErrorRule"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js +var evaluateRules, evaluateTreeRule, group5; +var init_evaluateRules = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_evaluateConditions(); + init_evaluateEndpointRule(); + init_evaluateErrorRule(); + evaluateRules = /* @__PURE__ */ __name((rules, options) => { + for (const rule of rules) { + if (rule.type === "endpoint") { + const endpointOrUndefined = evaluateEndpointRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else if (rule.type === "error") { + evaluateErrorRule(rule, options); + } else if (rule.type === "tree") { + const endpointOrUndefined = group5.evaluateTreeRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else { + throw new EndpointError(`Unknown endpoint rule: ${rule}`); + } + } + throw new EndpointError(`Rules evaluation failed`); + }, "evaluateRules"); + evaluateTreeRule = /* @__PURE__ */ __name((treeRule, options) => { + const { conditions, rules } = treeRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + return group5.evaluateRules(rules, { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }); + }, "evaluateTreeRule"); + group5 = { + evaluateRules, + evaluateTreeRule + }; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/index.js +var init_utils5 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_customEndpointFunctions(); + init_evaluateRules(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js +var resolveEndpoint; +var init_resolveEndpoint = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_debug(); + init_types3(); + init_utils5(); + resolveEndpoint = /* @__PURE__ */ __name((ruleSetObject, options) => { + const { endpointParams, logger: logger3 } = options; + const { parameters, rules } = ruleSetObject; + options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`); + const paramsWithDefault = Object.entries(parameters).filter(([, v3]) => v3.default != null).map(([k2, v3]) => [k2, v3.default]); + if (paramsWithDefault.length > 0) { + for (const [paramKey, paramDefaultValue] of paramsWithDefault) { + endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue; + } + } + const requiredParams = Object.entries(parameters).filter(([, v3]) => v3.required).map(([k2]) => k2); + for (const requiredParam of requiredParams) { + if (endpointParams[requiredParam] == null) { + throw new EndpointError(`Missing required parameter: '${requiredParam}'`); + } + } + const endpoint = evaluateRules(rules, { endpointParams, logger: logger3, referenceRecord: {} }); + options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`); + return endpoint; + }, "resolveEndpoint"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/index.js +var init_dist_es32 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EndpointCache(); + init_isIpAddress(); + init_isValidHostLabel(); + init_customEndpointFunctions(); + init_resolveEndpoint(); + init_types3(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js +var init_isIpAddress2 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es32(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js +var isVirtualHostableS3Bucket; +var init_isVirtualHostableS3Bucket = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es32(); + init_isIpAddress2(); + isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; + } + if (!isValidHostLabel(value)) { + return false; + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if (isIpAddress(value)) { + return false; + } + return true; + }, "isVirtualHostableS3Bucket"); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js +var ARN_DELIMITER, RESOURCE_DELIMITER, parseArn; +var init_parseArn = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ARN_DELIMITER = ":"; + RESOURCE_DELIMITER = "/"; + parseArn = /* @__PURE__ */ __name((value) => { + const segments = value.split(ARN_DELIMITER); + if (segments.length < 6) + return null; + const [arn, partition2, service, region, accountId, ...resourcePath] = segments; + if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") + return null; + const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); + return { + partition: partition2, + service, + region, + accountId, + resourceId + }; + }, "parseArn"); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json +var partitions_default; +var init_partitions = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json"() { + partitions_default = { + partitions: [{ + id: "aws", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-east-1", + name: "aws", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", + regions: { + "af-south-1": { + description: "Africa (Cape Town)" + }, + "ap-east-1": { + description: "Asia Pacific (Hong Kong)" + }, + "ap-east-2": { + description: "Asia Pacific (Taipei)" + }, + "ap-northeast-1": { + description: "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + description: "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + description: "Asia Pacific (Osaka)" + }, + "ap-south-1": { + description: "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + description: "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + description: "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + description: "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + description: "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + description: "Asia Pacific (Melbourne)" + }, + "ap-southeast-5": { + description: "Asia Pacific (Malaysia)" + }, + "ap-southeast-6": { + description: "Asia Pacific (New Zealand)" + }, + "ap-southeast-7": { + description: "Asia Pacific (Thailand)" + }, + "aws-global": { + description: "aws global region" + }, + "ca-central-1": { + description: "Canada (Central)" + }, + "ca-west-1": { + description: "Canada West (Calgary)" + }, + "eu-central-1": { + description: "Europe (Frankfurt)" + }, + "eu-central-2": { + description: "Europe (Zurich)" + }, + "eu-north-1": { + description: "Europe (Stockholm)" + }, + "eu-south-1": { + description: "Europe (Milan)" + }, + "eu-south-2": { + description: "Europe (Spain)" + }, + "eu-west-1": { + description: "Europe (Ireland)" + }, + "eu-west-2": { + description: "Europe (London)" + }, + "eu-west-3": { + description: "Europe (Paris)" + }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, + "me-central-1": { + description: "Middle East (UAE)" + }, + "me-south-1": { + description: "Middle East (Bahrain)" + }, + "mx-central-1": { + description: "Mexico (Central)" + }, + "sa-east-1": { + description: "South America (Sao Paulo)" + }, + "us-east-1": { + description: "US East (N. Virginia)" + }, + "us-east-2": { + description: "US East (Ohio)" + }, + "us-west-1": { + description: "US West (N. California)" + }, + "us-west-2": { + description: "US West (Oregon)" + } + } + }, { + id: "aws-cn", + outputs: { + dnsSuffix: "amazonaws.com.cn", + dualStackDnsSuffix: "api.amazonwebservices.com.cn", + implicitGlobalRegion: "cn-northwest-1", + name: "aws-cn", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^cn\\-\\w+\\-\\d+$", + regions: { + "aws-cn-global": { + description: "aws-cn global region" + }, + "cn-north-1": { + description: "China (Beijing)" + }, + "cn-northwest-1": { + description: "China (Ningxia)" + } + } + }, { + id: "aws-eusc", + outputs: { + dnsSuffix: "amazonaws.eu", + dualStackDnsSuffix: "api.amazonwebservices.eu", + implicitGlobalRegion: "eusc-de-east-1", + name: "aws-eusc", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", + regions: { + "eusc-de-east-1": { + description: "AWS European Sovereign Cloud (Germany)" + } + } + }, { + id: "aws-iso", + outputs: { + dnsSuffix: "c2s.ic.gov", + dualStackDnsSuffix: "api.aws.ic.gov", + implicitGlobalRegion: "us-iso-east-1", + name: "aws-iso", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + regions: { + "aws-iso-global": { + description: "aws-iso global region" + }, + "us-iso-east-1": { + description: "US ISO East" + }, + "us-iso-west-1": { + description: "US ISO WEST" + } + } + }, { + id: "aws-iso-b", + outputs: { + dnsSuffix: "sc2s.sgov.gov", + dualStackDnsSuffix: "api.aws.scloud", + implicitGlobalRegion: "us-isob-east-1", + name: "aws-iso-b", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + regions: { + "aws-iso-b-global": { + description: "aws-iso-b global region" + }, + "us-isob-east-1": { + description: "US ISOB East (Ohio)" + }, + "us-isob-west-1": { + description: "US ISOB West" + } + } + }, { + id: "aws-iso-e", + outputs: { + dnsSuffix: "cloud.adc-e.uk", + dualStackDnsSuffix: "api.cloud-aws.adc-e.uk", + implicitGlobalRegion: "eu-isoe-west-1", + name: "aws-iso-e", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + regions: { + "aws-iso-e-global": { + description: "aws-iso-e global region" + }, + "eu-isoe-west-1": { + description: "EU ISOE West" + } + } + }, { + id: "aws-iso-f", + outputs: { + dnsSuffix: "csp.hci.ic.gov", + dualStackDnsSuffix: "api.aws.hci.ic.gov", + implicitGlobalRegion: "us-isof-south-1", + name: "aws-iso-f", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + regions: { + "aws-iso-f-global": { + description: "aws-iso-f global region" + }, + "us-isof-east-1": { + description: "US ISOF EAST" + }, + "us-isof-south-1": { + description: "US ISOF SOUTH" + } + } + }, { + id: "aws-us-gov", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-gov-west-1", + name: "aws-us-gov", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + regions: { + "aws-us-gov-global": { + description: "aws-us-gov global region" + }, + "us-gov-east-1": { + description: "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + description: "AWS GovCloud (US-West)" + } + } + }], + version: "1.1" + }; + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js +var selectedPartitionsInfo, selectedUserAgentPrefix, partition, getUserAgentPrefix; +var init_partition = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_partitions(); + selectedPartitionsInfo = partitions_default; + selectedUserAgentPrefix = ""; + partition = /* @__PURE__ */ __name((value) => { + const { partitions } = selectedPartitionsInfo; + for (const partition2 of partitions) { + const { regions, outputs } = partition2; + for (const [region, regionData] of Object.entries(regions)) { + if (region === value) { + return { + ...outputs, + ...regionData + }; + } + } + } + for (const partition2 of partitions) { + const { regionRegex, outputs } = partition2; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs + }; + } + } + const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws"); + if (!DEFAULT_PARTITION) { + throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist."); + } + return { + ...DEFAULT_PARTITION.outputs + }; + }, "partition"); + getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, "getUserAgentPrefix"); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/aws.js +var awsEndpointFunctions; +var init_aws = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/aws.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es32(); + init_isVirtualHostableS3Bucket(); + init_parseArn(); + init_partition(); + awsEndpointFunctions = { + isVirtualHostableS3Bucket, + parseArn, + partition + }; + customEndpointFunctions.aws = awsEndpointFunctions; + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveDefaultAwsRegionalEndpointsConfig.js +var init_resolveDefaultAwsRegionalEndpointsConfig = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveDefaultAwsRegionalEndpointsConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js +var init_resolveEndpoint2 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js +var init_EndpointError2 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js +var init_EndpointRuleObject3 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js +var init_ErrorRuleObject3 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js +var init_RuleSetObject3 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js +var init_TreeRuleObject3 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js +var init_shared3 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js +var init_types4 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EndpointError2(); + init_EndpointRuleObject3(); + init_ErrorRuleObject3(); + init_RuleSetObject3(); + init_TreeRuleObject3(); + init_shared3(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/index.js +var init_dist_es33 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_aws(); + init_partition(); + init_isIpAddress2(); + init_resolveDefaultAwsRegionalEndpointsConfig(); + init_resolveEndpoint2(); + init_types4(); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/config.js +var RETRY_MODES, DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE; +var init_config2 = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/config.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(RETRY_MODES2) { + RETRY_MODES2["STANDARD"] = "standard"; + RETRY_MODES2["ADAPTIVE"] = "adaptive"; + })(RETRY_MODES || (RETRY_MODES = {})); + DEFAULT_MAX_ATTEMPTS = 3; + DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD; + } +}); + +// ../../node_modules/@smithy/service-error-classification/dist-es/constants.js +var THROTTLING_ERROR_CODES, TRANSIENT_ERROR_CODES, TRANSIENT_ERROR_STATUS_CODES, NODEJS_TIMEOUT_ERROR_CODES, NODEJS_NETWORK_ERROR_CODES; +var init_constants7 = __esm({ + "../../node_modules/@smithy/service-error-classification/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException" + ]; + TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; + TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; + NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; + NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"]; + } +}); + +// ../../node_modules/@smithy/service-error-classification/dist-es/index.js +var isRetryableByTrait, isClockSkewCorrectedError, isBrowserNetworkError, isThrottlingError, isTransientError, isServerError; +var init_dist_es34 = __esm({ + "../../node_modules/@smithy/service-error-classification/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants7(); + isRetryableByTrait = /* @__PURE__ */ __name((error50) => error50?.$retryable !== void 0, "isRetryableByTrait"); + isClockSkewCorrectedError = /* @__PURE__ */ __name((error50) => error50.$metadata?.clockSkewCorrected, "isClockSkewCorrectedError"); + isBrowserNetworkError = /* @__PURE__ */ __name((error50) => { + const errorMessages = /* @__PURE__ */ new Set([ + "Failed to fetch", + "NetworkError when attempting to fetch resource", + "The Internet connection appears to be offline", + "Load failed", + "Network request failed" + ]); + const isValid = error50 && error50 instanceof TypeError; + if (!isValid) { + return false; + } + return errorMessages.has(error50.message); + }, "isBrowserNetworkError"); + isThrottlingError = /* @__PURE__ */ __name((error50) => error50.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error50.name) || error50.$retryable?.throttling == true, "isThrottlingError"); + isTransientError = /* @__PURE__ */ __name((error50, depth = 0) => isRetryableByTrait(error50) || isClockSkewCorrectedError(error50) || TRANSIENT_ERROR_CODES.includes(error50.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error50?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error50?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error50.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error50) || error50.cause !== void 0 && depth <= 10 && isTransientError(error50.cause, depth + 1), "isTransientError"); + isServerError = /* @__PURE__ */ __name((error50) => { + if (error50.$metadata?.httpStatusCode !== void 0) { + const statusCode = error50.$metadata.httpStatusCode; + if (500 <= statusCode && statusCode <= 599 && !isTransientError(error50)) { + return true; + } + return false; + } + return false; + }, "isServerError"); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js +var _DefaultRateLimiter, DefaultRateLimiter; +var init_DefaultRateLimiter = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es34(); + _DefaultRateLimiter = class { + beta; + minCapacity; + minFillRate; + scaleConstant; + smooth; + currentCapacity = 0; + enabled = false; + lastMaxRate = 0; + measuredTxRate = 0; + requestCount = 0; + fillRate; + lastThrottleTime; + lastTimestamp = 0; + lastTxRateBucket; + maxCapacity; + timeWindow = 0; + constructor(options) { + this.beta = options?.beta ?? 0.7; + this.minCapacity = options?.minCapacity ?? 1; + this.minFillRate = options?.minFillRate ?? 0.5; + this.scaleConstant = options?.scaleConstant ?? 0.4; + this.smooth = options?.smooth ?? 0.8; + const currentTimeInSeconds = this.getCurrentTimeInSeconds(); + this.lastThrottleTime = currentTimeInSeconds; + this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); + this.fillRate = this.minFillRate; + this.maxCapacity = this.minCapacity; + } + getCurrentTimeInSeconds() { + return Date.now() / 1e3; + } + async getSendToken() { + return this.acquireTokenBucket(1); + } + async acquireTokenBucket(amount) { + if (!this.enabled) { + return; + } + this.refillTokenBucket(); + if (amount > this.currentCapacity) { + const delay = (amount - this.currentCapacity) / this.fillRate * 1e3; + await new Promise((resolve) => _DefaultRateLimiter.setTimeoutFn(resolve, delay)); + } + this.currentCapacity = this.currentCapacity - amount; + } + refillTokenBucket() { + const timestamp = this.getCurrentTimeInSeconds(); + if (!this.lastTimestamp) { + this.lastTimestamp = timestamp; + return; + } + const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; + this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount); + this.lastTimestamp = timestamp; + } + updateClientSendingRate(response) { + let calculatedRate; + this.updateMeasuredRate(); + if (isThrottlingError(response)) { + const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); + this.lastMaxRate = rateToUse; + this.calculateTimeWindow(); + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + calculatedRate = this.cubicThrottle(rateToUse); + this.enableTokenBucket(); + } else { + this.calculateTimeWindow(); + calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); + } + const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); + this.updateTokenBucketRate(newRate); + } + calculateTimeWindow() { + this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3)); + } + cubicThrottle(rateToUse) { + return this.getPrecise(rateToUse * this.beta); + } + cubicSuccess(timestamp) { + return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate); + } + enableTokenBucket() { + this.enabled = true; + } + updateTokenBucketRate(newRate) { + this.refillTokenBucket(); + this.fillRate = Math.max(newRate, this.minFillRate); + this.maxCapacity = Math.max(newRate, this.minCapacity); + this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity); + } + updateMeasuredRate() { + const t9 = this.getCurrentTimeInSeconds(); + const timeBucket = Math.floor(t9 * 2) / 2; + this.requestCount++; + if (timeBucket > this.lastTxRateBucket) { + const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); + this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); + this.requestCount = 0; + this.lastTxRateBucket = timeBucket; + } + } + getPrecise(num) { + return parseFloat(num.toFixed(8)); + } + }; + DefaultRateLimiter = _DefaultRateLimiter; + __name(DefaultRateLimiter, "DefaultRateLimiter"); + __publicField(DefaultRateLimiter, "setTimeoutFn", setTimeout); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/constants.js +var DEFAULT_RETRY_DELAY_BASE, MAXIMUM_RETRY_DELAY, THROTTLING_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, RETRY_COST, TIMEOUT_RETRY_COST, NO_RETRY_INCREMENT, INVOCATION_ID_HEADER, REQUEST_HEADER; +var init_constants8 = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + DEFAULT_RETRY_DELAY_BASE = 100; + MAXIMUM_RETRY_DELAY = 20 * 1e3; + THROTTLING_RETRY_DELAY_BASE = 500; + INITIAL_RETRY_TOKENS = 500; + RETRY_COST = 5; + TIMEOUT_RETRY_COST = 10; + NO_RETRY_INCREMENT = 1; + INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; + REQUEST_HEADER = "amz-sdk-request"; + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/defaultRetryBackoffStrategy.js +var getDefaultRetryBackoffStrategy; +var init_defaultRetryBackoffStrategy = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/defaultRetryBackoffStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants8(); + getDefaultRetryBackoffStrategy = /* @__PURE__ */ __name(() => { + let delayBase = DEFAULT_RETRY_DELAY_BASE; + const computeNextBackoffDelay = /* @__PURE__ */ __name((attempts) => { + return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); + }, "computeNextBackoffDelay"); + const setDelayBase = /* @__PURE__ */ __name((delay) => { + delayBase = delay; + }, "setDelayBase"); + return { + computeNextBackoffDelay, + setDelayBase + }; + }, "getDefaultRetryBackoffStrategy"); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/defaultRetryToken.js +var createDefaultRetryToken; +var init_defaultRetryToken = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/defaultRetryToken.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants8(); + createDefaultRetryToken = /* @__PURE__ */ __name(({ retryDelay, retryCount, retryCost }) => { + const getRetryCount = /* @__PURE__ */ __name(() => retryCount, "getRetryCount"); + const getRetryDelay = /* @__PURE__ */ __name(() => Math.min(MAXIMUM_RETRY_DELAY, retryDelay), "getRetryDelay"); + const getRetryCost = /* @__PURE__ */ __name(() => retryCost, "getRetryCost"); + return { + getRetryCount, + getRetryDelay, + getRetryCost + }; + }, "createDefaultRetryToken"); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js +var StandardRetryStrategy; +var init_StandardRetryStrategy = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_config2(); + init_constants8(); + init_defaultRetryBackoffStrategy(); + init_defaultRetryToken(); + StandardRetryStrategy = class { + maxAttempts; + mode = RETRY_MODES.STANDARD; + capacity = INITIAL_RETRY_TOKENS; + retryBackoffStrategy = getDefaultRetryBackoffStrategy(); + maxAttemptsProvider; + constructor(maxAttempts) { + this.maxAttempts = maxAttempts; + this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts; + } + async acquireInitialRetryToken(retryTokenScope) { + return createDefaultRetryToken({ + retryDelay: DEFAULT_RETRY_DELAY_BASE, + retryCount: 0 + }); + } + async refreshRetryTokenForRetry(token, errorInfo) { + const maxAttempts = await this.getMaxAttempts(); + if (this.shouldRetry(token, errorInfo, maxAttempts)) { + const errorType = errorInfo.errorType; + this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE); + const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); + const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType; + const capacityCost = this.getCapacityCost(errorType); + this.capacity -= capacityCost; + return createDefaultRetryToken({ + retryDelay, + retryCount: token.getRetryCount() + 1, + retryCost: capacityCost + }); + } + throw new Error("No retry token available"); + } + recordSuccess(token) { + this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); + } + getCapacity() { + return this.capacity; + } + async getMaxAttempts() { + try { + return await this.maxAttemptsProvider(); + } catch (error50) { + console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); + return DEFAULT_MAX_ATTEMPTS; + } + } + shouldRetry(tokenToRenew, errorInfo, maxAttempts) { + const attempts = tokenToRenew.getRetryCount() + 1; + return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType); + } + getCapacityCost(errorType) { + return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST; + } + isRetryableError(errorType) { + return errorType === "THROTTLING" || errorType === "TRANSIENT"; + } + }; + __name(StandardRetryStrategy, "StandardRetryStrategy"); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js +var AdaptiveRetryStrategy; +var init_AdaptiveRetryStrategy = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_config2(); + init_DefaultRateLimiter(); + init_StandardRetryStrategy(); + AdaptiveRetryStrategy = class { + maxAttemptsProvider; + rateLimiter; + standardRetryStrategy; + mode = RETRY_MODES.ADAPTIVE; + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + const { rateLimiter } = options ?? {}; + this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); + this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider); + } + async acquireInitialRetryToken(retryTokenScope) { + await this.rateLimiter.getSendToken(); + return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + this.rateLimiter.updateClientSendingRate(errorInfo); + return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + } + recordSuccess(token) { + this.rateLimiter.updateClientSendingRate({}); + this.standardRetryStrategy.recordSuccess(token); + } + }; + __name(AdaptiveRetryStrategy, "AdaptiveRetryStrategy"); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js +var init_ConfiguredRetryStrategy = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/types.js +var init_types5 = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/index.js +var init_dist_es35 = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AdaptiveRetryStrategy(); + init_ConfiguredRetryStrategy(); + init_DefaultRateLimiter(); + init_StandardRetryStrategy(); + init_config2(); + init_constants8(); + init_types5(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js +async function checkFeatures(context2, config3, args) { + const request = args.request; + if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") { + setFeature(context2, "PROTOCOL_RPC_V2_CBOR", "M"); + } + if (typeof config3.retryStrategy === "function") { + const retryStrategy = await config3.retryStrategy(); + if (typeof retryStrategy.mode === "string") { + switch (retryStrategy.mode) { + case RETRY_MODES.ADAPTIVE: + setFeature(context2, "RETRY_MODE_ADAPTIVE", "F"); + break; + case RETRY_MODES.STANDARD: + setFeature(context2, "RETRY_MODE_STANDARD", "E"); + break; + } + } + } + if (typeof config3.accountIdEndpointMode === "function") { + const endpointV2 = context2.endpointV2; + if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) { + setFeature(context2, "ACCOUNT_ID_ENDPOINT", "O"); + } + switch (await config3.accountIdEndpointMode?.()) { + case "disabled": + setFeature(context2, "ACCOUNT_ID_MODE_DISABLED", "Q"); + break; + case "preferred": + setFeature(context2, "ACCOUNT_ID_MODE_PREFERRED", "P"); + break; + case "required": + setFeature(context2, "ACCOUNT_ID_MODE_REQUIRED", "R"); + break; + } + } + const identity2 = context2.__smithy_context?.selectedHttpAuthScheme?.identity; + if (identity2?.$source) { + const credentials = identity2; + if (credentials.accountId) { + setFeature(context2, "RESOLVED_ACCOUNT_ID", "T"); + } + for (const [key, value] of Object.entries(credentials.$source ?? {})) { + setFeature(context2, key, value); + } + } +} +var ACCOUNT_ID_ENDPOINT_REGEX; +var init_check_features = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_dist_es35(); + ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/; + __name(checkFeatures, "checkFeatures"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js +var USER_AGENT, X_AMZ_USER_AGENT, SPACE, UA_NAME_SEPARATOR, UA_NAME_ESCAPE_REGEX, UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR; +var init_constants9 = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + USER_AGENT = "user-agent"; + X_AMZ_USER_AGENT = "x-amz-user-agent"; + SPACE = " "; + UA_NAME_SEPARATOR = "/"; + UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w]/g; + UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w#]/g; + UA_ESCAPE_CHAR = "-"; + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/encode-features.js +function encodeFeatures(features2) { + let buffer = ""; + for (const key in features2) { + const val = features2[key]; + if (buffer.length + val.length + 1 <= BYTE_LIMIT) { + if (buffer.length) { + buffer += "," + val; + } else { + buffer += val; + } + continue; + } + break; + } + return buffer; +} +var BYTE_LIMIT; +var init_encode_features = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/encode-features.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + BYTE_LIMIT = 1024; + __name(encodeFeatures, "encodeFeatures"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js +var userAgentMiddleware, escapeUserAgent, getUserAgentMiddlewareOptions, getUserAgentPlugin; +var init_user_agent_middleware = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es33(); + init_dist_es2(); + init_check_features(); + init_constants9(); + init_encode_features(); + userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context2) => async (args) => { + const { request } = args; + if (!HttpRequest.isInstance(request)) { + return next(args); + } + const { headers } = request; + const userAgent = context2?.userAgent?.map(escapeUserAgent) || []; + const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); + await checkFeatures(context2, options, args); + const awsContext = context2; + defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context2.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`); + const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || []; + const appId = await options.userAgentAppId(); + if (appId) { + defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`])); + } + const prefix = getUserAgentPrefix(); + const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE); + const normalUAValue = [ + ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), + ...customUserAgent + ].join(SPACE); + if (options.runtime !== "browser") { + if (normalUAValue) { + headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue; + } + headers[USER_AGENT] = sdkUserAgentValue; + } else { + headers[X_AMZ_USER_AGENT] = sdkUserAgentValue; + } + return next({ + ...args, + request + }); + }, "userAgentMiddleware"); + escapeUserAgent = /* @__PURE__ */ __name((userAgentPair) => { + const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR); + const version4 = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR); + const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR); + const prefix = name.substring(0, prefixSeparatorIndex); + let uaName = name.substring(prefixSeparatorIndex + 1); + if (prefix === "api") { + uaName = uaName.toLowerCase(); + } + return [prefix, uaName, version4].filter((item) => item && item.length > 0).reduce((acc, item, index) => { + switch (index) { + case 0: + return item; + case 1: + return `${acc}/${item}`; + default: + return `${acc}#${item}`; + } + }, ""); + }, "escapeUserAgent"); + getUserAgentMiddlewareOptions = { + name: "getUserAgentMiddleware", + step: "build", + priority: "low", + tags: ["SET_USER_AGENT", "USER_AGENT"], + override: true + }; + getUserAgentPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.add(userAgentMiddleware(config3), getUserAgentMiddlewareOptions); + } + }), "getUserAgentPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/index.js +var init_dist_es36 = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_configurations(); + init_user_agent_middleware(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js +var DEFAULT_USE_DUALSTACK_ENDPOINT; +var init_NodeUseDualstackEndpointConfigOptions = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + DEFAULT_USE_DUALSTACK_ENDPOINT = false; + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseFipsEndpointConfigOptions.js +var DEFAULT_USE_FIPS_ENDPOINT; +var init_NodeUseFipsEndpointConfigOptions = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseFipsEndpointConfigOptions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + DEFAULT_USE_FIPS_ENDPOINT = false; + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveCustomEndpointsConfig.js +var init_resolveCustomEndpointsConfig = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveCustomEndpointsConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveEndpointsConfig.js +var init_resolveEndpointsConfig = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveEndpointsConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/index.js +var init_endpointsConfig = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_NodeUseDualstackEndpointConfigOptions(); + init_NodeUseFipsEndpointConfigOptions(); + init_resolveCustomEndpointsConfig(); + init_resolveEndpointsConfig(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/config.js +var init_config3 = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/config.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/checkRegion.js +var validRegions, checkRegion; +var init_checkRegion = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/checkRegion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es32(); + validRegions = /* @__PURE__ */ new Set(); + checkRegion = /* @__PURE__ */ __name((region, check3 = isValidHostLabel) => { + if (!validRegions.has(region) && !check3(region)) { + if (region === "*") { + console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`); + } else { + throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`); + } + } else { + validRegions.add(region); + } + }, "checkRegion"); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/isFipsRegion.js +var isFipsRegion; +var init_isFipsRegion = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/isFipsRegion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/getRealRegion.js +var getRealRegion; +var init_getRealRegion = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/getRealRegion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_isFipsRegion(); + getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/resolveRegionConfig.js +var resolveRegionConfig; +var init_resolveRegionConfig = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/resolveRegionConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_checkRegion(); + init_getRealRegion(); + init_isFipsRegion(); + resolveRegionConfig = /* @__PURE__ */ __name((input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); + } + return Object.assign(input, { + region: async () => { + const providedRegion = typeof region === "function" ? await region() : region; + const realRegion = getRealRegion(providedRegion); + checkRegion(realRegion); + return realRegion; + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + } + }); + }, "resolveRegionConfig"); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/index.js +var init_regionConfig = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_config3(); + init_resolveRegionConfig(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionInfo/PartitionHash.js +var init_PartitionHash = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionInfo/PartitionHash.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionInfo/RegionHash.js +var init_RegionHash = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionInfo/RegionHash.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionInfo/getRegionInfo.js +var init_getRegionInfo = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionInfo/getRegionInfo.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionInfo/index.js +var init_regionInfo = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionInfo/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_PartitionHash(); + init_RegionHash(); + init_getRegionInfo(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/index.js +var init_dist_es37 = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_endpointsConfig(); + init_regionConfig(); + init_regionInfo(); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/EventStreamSerdeConfig.js +var resolveEventStreamSerdeConfig; +var init_EventStreamSerdeConfig = __esm({ + "../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/EventStreamSerdeConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + resolveEventStreamSerdeConfig = /* @__PURE__ */ __name((input) => Object.assign(input, { + eventStreamMarshaller: input.eventStreamSerdeProvider(input) + }), "resolveEventStreamSerdeConfig"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/index.js +var init_dist_es38 = __esm({ + "../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamSerdeConfig(); + } +}); + +// ../../node_modules/@smithy/middleware-content-length/dist-es/index.js +function contentLengthMiddleware(bodyLengthChecker) { + return (next) => async (args) => { + const request = args.request; + if (HttpRequest.isInstance(request)) { + const { body, headers } = request; + if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER2) === -1) { + try { + const length = bodyLengthChecker(body); + request.headers = { + ...request.headers, + [CONTENT_LENGTH_HEADER2]: String(length) + }; + } catch (error50) { + } + } + } + return next({ + ...args, + request + }); + }; +} +var CONTENT_LENGTH_HEADER2, contentLengthMiddlewareOptions, getContentLengthPlugin; +var init_dist_es39 = __esm({ + "../../node_modules/@smithy/middleware-content-length/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + CONTENT_LENGTH_HEADER2 = "content-length"; + __name(contentLengthMiddleware, "contentLengthMiddleware"); + contentLengthMiddlewareOptions = { + step: "build", + tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], + name: "contentLengthMiddleware", + override: true + }; + getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); + } + }), "getContentLengthPlugin"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/s3.js +var resolveParamsForS3, DOMAIN_PATTERN, IP_ADDRESS_PATTERN, DOTS_PATTERN, isDnsCompatibleBucketName, isArnBucketName; +var init_s3 = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/s3.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { + const bucket = endpointParams?.Bucket || ""; + if (typeof endpointParams.Bucket === "string") { + endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); + } + if (isArnBucketName(bucket)) { + if (endpointParams.ForcePathStyle === true) { + throw new Error("Path-style addressing cannot be used with ARN buckets"); + } + } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { + endpointParams.ForcePathStyle = true; + } + if (endpointParams.DisableMultiRegionAccessPoints) { + endpointParams.disableMultiRegionAccessPoints = true; + endpointParams.DisableMRAP = true; + } + return endpointParams; + }, "resolveParamsForS3"); + DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; + IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; + DOTS_PATTERN = /\.\./; + isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); + isArnBucketName = /* @__PURE__ */ __name((bucketName) => { + const [arn, partition2, service, , , bucket] = bucketName.split(":"); + const isArn = arn === "arn" && bucketName.split(":").length >= 6; + const isValidArn = Boolean(isArn && partition2 && service && bucket); + if (isArn && !isValidArn) { + throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); + } + return isValidArn; + }, "isArnBucketName"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/index.js +var init_service_customizations = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_s3(); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js +var createConfigValueProvider; +var init_createConfigValueProvider = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config3, isClientContextParam = false) => { + const configProvider = /* @__PURE__ */ __name(async () => { + let configValue; + if (isClientContextParam) { + const clientContextParams = config3.clientContextParams; + const nestedValue = clientContextParams?.[configKey]; + configValue = nestedValue ?? config3[configKey] ?? config3[canonicalEndpointParamKey]; + } else { + configValue = config3[configKey] ?? config3[canonicalEndpointParamKey]; + } + if (typeof configValue === "function") { + return configValue(); + } + return configValue; + }, "configProvider"); + if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { + return async () => { + const credentials = typeof config3.credentials === "function" ? await config3.credentials() : config3.credentials; + const configValue = credentials?.credentialScope ?? credentials?.CredentialScope; + return configValue; + }; + } + if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") { + return async () => { + const credentials = typeof config3.credentials === "function" ? await config3.credentials() : config3.credentials; + const configValue = credentials?.accountId ?? credentials?.AccountId; + return configValue; + }; + } + if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { + return async () => { + if (config3.isCustomEndpoint === false) { + return void 0; + } + const endpoint = await configProvider(); + if (endpoint && typeof endpoint === "object") { + if ("url" in endpoint) { + return endpoint.url.href; + } + if ("hostname" in endpoint) { + const { protocol, hostname: hostname3, port, path } = endpoint; + return `${protocol}//${hostname3}${port ? ":" + port : ""}${path}`; + } + } + return endpoint; + }; + } + return configProvider; + }, "createConfigValueProvider"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.browser.js +var getEndpointFromConfig; +var init_getEndpointFromConfig_browser = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getEndpointFromConfig = /* @__PURE__ */ __name(async (serviceId) => void 0, "getEndpointFromConfig"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js +var toEndpointV12; +var init_toEndpointV12 = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es13(); + toEndpointV12 = /* @__PURE__ */ __name((endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + const v1Endpoint = parseUrl(endpoint.url); + if (endpoint.headers) { + v1Endpoint.headers = {}; + for (const [name, values] of Object.entries(endpoint.headers)) { + v1Endpoint.headers[name.toLowerCase()] = values.join(", "); + } + } + return v1Endpoint; + } + return endpoint; + } + return parseUrl(endpoint); + }, "toEndpointV1"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js +var getEndpointFromInstructions, resolveParams; +var init_getEndpointFromInstructions = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_service_customizations(); + init_createConfigValueProvider(); + init_getEndpointFromConfig_browser(); + init_toEndpointV12(); + getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context2) => { + if (!clientConfig.isCustomEndpoint) { + let endpointFromConfig; + if (clientConfig.serviceConfiguredEndpoint) { + endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); + } else { + endpointFromConfig = await getEndpointFromConfig(clientConfig.serviceId); + } + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve(toEndpointV12(endpointFromConfig)); + clientConfig.isCustomEndpoint = true; + } + } + const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); + if (typeof clientConfig.endpointProvider !== "function") { + throw new Error("config.endpointProvider is not set."); + } + const endpoint = clientConfig.endpointProvider(endpointParams, context2); + if (clientConfig.isCustomEndpoint && clientConfig.endpoint) { + const customEndpoint = await clientConfig.endpoint(); + if (customEndpoint?.headers) { + endpoint.headers ??= {}; + for (const [name, value] of Object.entries(customEndpoint.headers)) { + endpoint.headers[name] = Array.isArray(value) ? value : [value]; + } + } + } + return endpoint; + }, "getEndpointFromInstructions"); + resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => { + const endpointParams = {}; + const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {}; + for (const [name, instruction] of Object.entries(instructions)) { + switch (instruction.type) { + case "staticContextParams": + endpointParams[name] = instruction.value; + break; + case "contextParams": + endpointParams[name] = commandInput[instruction.name]; + break; + case "clientContextParams": + case "builtInParams": + endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")(); + break; + case "operationContextParams": + endpointParams[name] = instruction.get(commandInput); + break; + default: + throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); + } + } + if (Object.keys(instructions).length === 0) { + Object.assign(endpointParams, clientConfig); + } + if (String(clientConfig.serviceId).toLowerCase() === "s3") { + await resolveParamsForS3(endpointParams); + } + return endpointParams; + }, "resolveParams"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/index.js +var init_adaptors = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getEndpointFromInstructions(); + init_toEndpointV12(); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js +var endpointMiddleware; +var init_endpointMiddleware = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_dist_es4(); + init_getEndpointFromInstructions(); + endpointMiddleware = /* @__PURE__ */ __name(({ config: config3, instructions }) => { + return (next, context2) => async (args) => { + if (config3.isCustomEndpoint) { + setFeature2(context2, "ENDPOINT_OVERRIDE", "N"); + } + const endpoint = await getEndpointFromInstructions(args.input, { + getEndpointParameterInstructions() { + return instructions; + } + }, { ...config3 }, context2); + context2.endpointV2 = endpoint; + context2.authSchemes = endpoint.properties?.authSchemes; + const authScheme = context2.authSchemes?.[0]; + if (authScheme) { + context2["signing_region"] = authScheme.signingRegion; + context2["signing_service"] = authScheme.signingName; + const smithyContext = getSmithyContext(context2); + const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption; + if (httpAuthOption) { + httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, { + signing_region: authScheme.signingRegion, + signingRegion: authScheme.signingRegion, + signing_service: authScheme.signingName, + signingName: authScheme.signingName, + signingRegionSet: authScheme.signingRegionSet + }, authScheme.properties); + } + } + return next({ + ...args + }); + }; + }, "endpointMiddleware"); + } +}); + +// ../../node_modules/@smithy/middleware-serde/dist-es/deserializerMiddleware.js +var init_deserializerMiddleware = __esm({ + "../../node_modules/@smithy/middleware-serde/dist-es/deserializerMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js +var init_serializerMiddleware = __esm({ + "../../node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-serde/dist-es/serdePlugin.js +var serializerMiddlewareOption2; +var init_serdePlugin = __esm({ + "../../node_modules/@smithy/middleware-serde/dist-es/serdePlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + serializerMiddlewareOption2 = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true + }; + } +}); + +// ../../node_modules/@smithy/middleware-serde/dist-es/index.js +var init_dist_es40 = __esm({ + "../../node_modules/@smithy/middleware-serde/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_deserializerMiddleware(); + init_serdePlugin(); + init_serializerMiddleware(); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js +var endpointMiddlewareOptions, getEndpointPlugin; +var init_getEndpointPlugin = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es40(); + init_endpointMiddleware(); + endpointMiddlewareOptions = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: serializerMiddlewareOption2.name + }; + getEndpointPlugin = /* @__PURE__ */ __name((config3, instructions) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(endpointMiddleware({ + config: config3, + instructions + }), endpointMiddlewareOptions); + } + }), "getEndpointPlugin"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js +var resolveEndpointConfig; +var init_resolveEndpointConfig = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es4(); + init_getEndpointFromConfig_browser(); + init_toEndpointV12(); + resolveEndpointConfig = /* @__PURE__ */ __name((input) => { + const tls = input.tls ?? true; + const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input; + const customEndpointProvider = endpoint != null ? async () => toEndpointV12(await normalizeProvider(endpoint)()) : void 0; + const isCustomEndpoint = !!endpoint; + const resolvedConfig = Object.assign(input, { + endpoint: customEndpointProvider, + tls, + isCustomEndpoint, + useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false), + useFipsEndpoint: normalizeProvider(useFipsEndpoint ?? false) + }); + let configuredEndpointPromise = void 0; + resolvedConfig.serviceConfiguredEndpoint = async () => { + if (input.serviceId && !configuredEndpointPromise) { + configuredEndpointPromise = getEndpointFromConfig(input.serviceId); + } + return configuredEndpointPromise; + }; + return resolvedConfig; + }, "resolveEndpointConfig"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointRequiredConfig.js +var init_resolveEndpointRequiredConfig = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointRequiredConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/types.js +var init_types6 = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/index.js +var init_dist_es41 = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_adaptors(); + init_endpointMiddleware(); + init_getEndpointPlugin(); + init_resolveEndpointConfig(); + init_resolveEndpointRequiredConfig(); + init_types6(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/delayDecider.js +var init_delayDecider = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/delayDecider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/retryDecider.js +var init_retryDecider = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/retryDecider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/util.js +var asSdkError; +var init_util2 = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/util.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + asSdkError = /* @__PURE__ */ __name((error50) => { + if (error50 instanceof Error) + return error50; + if (error50 instanceof Object) + return Object.assign(new Error(), error50); + if (typeof error50 === "string") + return new Error(error50); + return new Error(`AWS SDK error wrapper for ${error50}`); + }, "asSdkError"); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/StandardRetryStrategy.js +var init_StandardRetryStrategy2 = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/StandardRetryStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/AdaptiveRetryStrategy.js +var init_AdaptiveRetryStrategy2 = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/AdaptiveRetryStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/configurations.js +var resolveRetryConfig; +var init_configurations2 = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/configurations.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es4(); + init_dist_es35(); + resolveRetryConfig = /* @__PURE__ */ __name((input) => { + const { retryStrategy, retryMode } = input; + const maxAttempts = normalizeProvider(input.maxAttempts ?? DEFAULT_MAX_ATTEMPTS); + let controller = retryStrategy ? Promise.resolve(retryStrategy) : void 0; + const getDefault = /* @__PURE__ */ __name(async () => await normalizeProvider(retryMode)() === RETRY_MODES.ADAPTIVE ? new AdaptiveRetryStrategy(maxAttempts) : new StandardRetryStrategy(maxAttempts), "getDefault"); + return Object.assign(input, { + maxAttempts, + retryStrategy: () => controller ??= getDefault() + }); + }, "resolveRetryConfig"); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/omitRetryHeadersMiddleware.js +var init_omitRetryHeadersMiddleware = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/omitRetryHeadersMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/isStreamingPayload/isStreamingPayload.browser.js +var isStreamingPayload; +var init_isStreamingPayload_browser = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/isStreamingPayload/isStreamingPayload.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isStreamingPayload = /* @__PURE__ */ __name((request) => request?.body instanceof ReadableStream, "isStreamingPayload"); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js +var retryMiddleware, isRetryStrategyV2, getRetryErrorInfo, getRetryErrorType, retryMiddlewareOptions, getRetryPlugin, getRetryAfterHint; +var init_retryMiddleware = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es34(); + init_dist_es21(); + init_dist_es35(); + init_dist_es14(); + init_isStreamingPayload_browser(); + init_util2(); + retryMiddleware = /* @__PURE__ */ __name((options) => (next, context2) => async (args) => { + let retryStrategy = await options.retryStrategy(); + const maxAttempts = await options.maxAttempts(); + if (isRetryStrategyV2(retryStrategy)) { + retryStrategy = retryStrategy; + let retryToken = await retryStrategy.acquireInitialRetryToken(context2["partition_id"]); + let lastError = new Error(); + let attempts = 0; + let totalRetryDelay = 0; + const { request } = args; + const isRequest2 = HttpRequest.isInstance(request); + if (isRequest2) { + request.headers[INVOCATION_ID_HEADER] = v4(); + } + while (true) { + try { + if (isRequest2) { + request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + const { response, output } = await next(args); + retryStrategy.recordSuccess(retryToken); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalRetryDelay; + return { response, output }; + } catch (e2) { + const retryErrorInfo = getRetryErrorInfo(e2); + lastError = asSdkError(e2); + if (isRequest2 && isStreamingPayload(request)) { + (context2.logger instanceof NoOpLogger ? console : context2.logger)?.warn("An error was encountered in a non-retryable streaming request."); + throw lastError; + } + try { + retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); + } catch (refreshError) { + if (!lastError.$metadata) { + lastError.$metadata = {}; + } + lastError.$metadata.attempts = attempts + 1; + lastError.$metadata.totalRetryDelay = totalRetryDelay; + throw lastError; + } + attempts = retryToken.getRetryCount(); + const delay = retryToken.getRetryDelay(); + totalRetryDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); + } + } + } else { + retryStrategy = retryStrategy; + if (retryStrategy?.mode) + context2.userAgent = [...context2.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]]; + return retryStrategy.retry(next, args); + } + }, "retryMiddleware"); + isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined", "isRetryStrategyV2"); + getRetryErrorInfo = /* @__PURE__ */ __name((error50) => { + const errorInfo = { + error: error50, + errorType: getRetryErrorType(error50) + }; + const retryAfterHint = getRetryAfterHint(error50.$response); + if (retryAfterHint) { + errorInfo.retryAfterHint = retryAfterHint; + } + return errorInfo; + }, "getRetryErrorInfo"); + getRetryErrorType = /* @__PURE__ */ __name((error50) => { + if (isThrottlingError(error50)) + return "THROTTLING"; + if (isTransientError(error50)) + return "TRANSIENT"; + if (isServerError(error50)) + return "SERVER_ERROR"; + return "CLIENT_ERROR"; + }, "getRetryErrorType"); + retryMiddlewareOptions = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", + override: true + }; + getRetryPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(retryMiddleware(options), retryMiddlewareOptions); + } + }), "getRetryPlugin"); + getRetryAfterHint = /* @__PURE__ */ __name((response) => { + if (!HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return new Date(retryAfterSeconds * 1e3); + const retryAfterDate = new Date(retryAfter); + return retryAfterDate; + }, "getRetryAfterHint"); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/index.js +var init_dist_es42 = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AdaptiveRetryStrategy2(); + init_StandardRetryStrategy2(); + init_configurations2(); + init_delayDecider(); + init_omitRetryHeadersMiddleware(); + init_retryDecider(); + init_retryMiddleware(); + } +}); + +// ../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/signature-v4-crt-container.js +var signatureV4CrtContainer; +var init_signature_v4_crt_container = __esm({ + "../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/signature-v4-crt-container.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + signatureV4CrtContainer = { + CrtSignerV4: null + }; + } +}); + +// ../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4MultiRegion.js +var SignatureV4MultiRegion; +var init_SignatureV4MultiRegion = __esm({ + "../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4MultiRegion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es18(); + init_signature_v4_crt_container(); + SignatureV4MultiRegion = class { + sigv4aSigner; + sigv4Signer; + signerOptions; + static sigv4aDependency() { + if (typeof signatureV4CrtContainer.CrtSignerV4 === "function") { + return "crt"; + } else if (typeof signatureV4aContainer.SignatureV4a === "function") { + return "js"; + } + return "none"; + } + constructor(options) { + this.sigv4Signer = new SignatureV4S3Express(options); + this.signerOptions = options; + } + async sign(requestToSign, options = {}) { + if (options.signingRegion === "*") { + return this.getSigv4aSigner().sign(requestToSign, options); + } + return this.sigv4Signer.sign(requestToSign, options); + } + async signWithCredentials(requestToSign, credentials, options = {}) { + if (options.signingRegion === "*") { + const signer = this.getSigv4aSigner(); + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + if (CrtSignerV4 && signer instanceof CrtSignerV4) { + return signer.signWithCredentials(requestToSign, credentials, options); + } else { + throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`); + } + } + return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options); + } + async presign(originalRequest, options = {}) { + if (options.signingRegion === "*") { + const signer = this.getSigv4aSigner(); + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + if (CrtSignerV4 && signer instanceof CrtSignerV4) { + return signer.presign(originalRequest, options); + } else { + throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`); + } + } + return this.sigv4Signer.presign(originalRequest, options); + } + async presignWithCredentials(originalRequest, credentials, options = {}) { + if (options.signingRegion === "*") { + throw new Error("Method presignWithCredentials is not supported for [signingRegion=*]."); + } + return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options); + } + getSigv4aSigner() { + if (!this.sigv4aSigner) { + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + const JsSigV4aSigner = signatureV4aContainer.SignatureV4a; + if (this.signerOptions.runtime === "node") { + if (!CrtSignerV4 && !JsSigV4aSigner) { + throw new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"); + } + if (CrtSignerV4 && typeof CrtSignerV4 === "function") { + this.sigv4aSigner = new CrtSignerV4({ + ...this.signerOptions, + signingAlgorithm: 1 + }); + } else if (JsSigV4aSigner && typeof JsSigV4aSigner === "function") { + this.sigv4aSigner = new JsSigV4aSigner({ + ...this.signerOptions + }); + } else { + throw new Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"); + } + } else { + if (!JsSigV4aSigner || typeof JsSigV4aSigner !== "function") { + throw new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a"); + } + this.sigv4aSigner = new JsSigV4aSigner({ + ...this.signerOptions + }); + } + } + return this.sigv4aSigner; + } + }; + __name(SignatureV4MultiRegion, "SignatureV4MultiRegion"); + } +}); + +// ../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/index.js +var init_dist_es43 = __esm({ + "../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_SignatureV4MultiRegion(); + init_signature_v4_crt_container(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/ruleset.js +var cs, ct, cu, cv, cw, cx, cy, cz, cA, cB, cC, cD, cE, cF, cG, cH, cI, 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, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV, bW, bX, bY, bZ, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, cr, _data, ruleSet; +var init_ruleset = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/ruleset.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + cs = "required"; + ct = "type"; + cu = "rules"; + cv = "conditions"; + cw = "fn"; + cx = "argv"; + cy = "ref"; + cz = "assign"; + cA = "url"; + cB = "properties"; + cC = "backend"; + cD = "authSchemes"; + cE = "disableDoubleEncoding"; + cF = "signingName"; + cG = "signingRegion"; + cH = "headers"; + cI = "signingRegionSet"; + a = 6; + b = false; + c = true; + d = "isSet"; + e = "booleanEquals"; + f = "error"; + g = "aws.partition"; + h = "stringEquals"; + i = "getAttr"; + j = "name"; + k = "substring"; + l = "bucketSuffix"; + m = "parseURL"; + n = "endpoint"; + o = "tree"; + p = "aws.isVirtualHostableS3Bucket"; + q = "{url#scheme}://{Bucket}.{url#authority}{url#path}"; + r = "not"; + s = "accessPointSuffix"; + t = "{url#scheme}://{url#authority}{url#path}"; + u = "hardwareType"; + v = "regionPrefix"; + w = "bucketAliasSuffix"; + x = "outpostId"; + y = "isValidHostLabel"; + z = "sigv4a"; + A = "s3-outposts"; + B = "s3"; + C = "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}"; + D = "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}"; + E = "https://{Bucket}.s3.{partitionResult#dnsSuffix}"; + F = "aws.parseArn"; + G = "bucketArn"; + H = "arnType"; + I = ""; + J = "s3-object-lambda"; + K = "accesspoint"; + L = "accessPointName"; + M = "{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}"; + N = "mrapPartition"; + O = "outpostType"; + P = "arnPrefix"; + Q = "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}"; + R = "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}"; + S = "https://s3.{partitionResult#dnsSuffix}"; + T = { [cs]: false, [ct]: "string" }; + U = { [cs]: true, "default": false, [ct]: "boolean" }; + V = { [cs]: false, [ct]: "boolean" }; + W = { [cw]: e, [cx]: [{ [cy]: "Accelerate" }, true] }; + X = { [cw]: e, [cx]: [{ [cy]: "UseFIPS" }, true] }; + Y = { [cw]: e, [cx]: [{ [cy]: "UseDualStack" }, true] }; + Z = { [cw]: d, [cx]: [{ [cy]: "Endpoint" }] }; + aa = { [cw]: g, [cx]: [{ [cy]: "Region" }], [cz]: "partitionResult" }; + ab = { [cw]: h, [cx]: [{ [cw]: i, [cx]: [{ [cy]: "partitionResult" }, j] }, "aws-cn"] }; + ac = { [cw]: d, [cx]: [{ [cy]: "Bucket" }] }; + ad = { [cy]: "Bucket" }; + ae = { [cv]: [W], [f]: "S3Express does not support S3 Accelerate.", [ct]: f }; + af = { [cv]: [Z, { [cw]: m, [cx]: [{ [cy]: "Endpoint" }], [cz]: "url" }], [cu]: [{ [cv]: [{ [cw]: d, [cx]: [{ [cy]: "DisableS3ExpressSessionAuth" }] }, { [cw]: e, [cx]: [{ [cy]: "DisableS3ExpressSessionAuth" }, true] }], [cu]: [{ [cv]: [{ [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: "url" }, "isIp"] }, true] }], [cu]: [{ [cv]: [{ [cw]: "uriEncode", [cx]: [ad], [cz]: "uri_encoded_bucket" }], [cu]: [{ [n]: { [cA]: "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: p, [cx]: [ad, false] }], [cu]: [{ [n]: { [cA]: q, [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }], [ct]: o }, { [f]: "S3Express bucket name is not a valid virtual hostable name.", [ct]: f }], [ct]: o }, { [cv]: [{ [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: "url" }, "isIp"] }, true] }], [cu]: [{ [cv]: [{ [cw]: "uriEncode", [cx]: [ad], [cz]: "uri_encoded_bucket" }], [cu]: [{ [n]: { [cA]: "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: p, [cx]: [ad, false] }], [cu]: [{ [n]: { [cA]: q, [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }], [ct]: o }, { [f]: "S3Express bucket name is not a valid virtual hostable name.", [ct]: f }], [ct]: o }; + ag = { [cw]: m, [cx]: [{ [cy]: "Endpoint" }], [cz]: "url" }; + ah = { [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: "url" }, "isIp"] }, true] }; + ai = { [cy]: "url" }; + aj = { [cw]: "uriEncode", [cx]: [ad], [cz]: "uri_encoded_bucket" }; + ak = { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: "s3express", [cG]: "{Region}" }] }; + al = {}; + am = { [cw]: p, [cx]: [ad, false] }; + an = { [f]: "S3Express bucket name is not a valid virtual hostable name.", [ct]: f }; + ao = { [cw]: d, [cx]: [{ [cy]: "UseS3ExpressControlEndpoint" }] }; + ap = { [cw]: e, [cx]: [{ [cy]: "UseS3ExpressControlEndpoint" }, true] }; + aq = { [cw]: r, [cx]: [Z] }; + ar = { [cw]: e, [cx]: [{ [cy]: "UseDualStack" }, false] }; + as = { [cw]: e, [cx]: [{ [cy]: "UseFIPS" }, false] }; + at = { [f]: "Unrecognized S3Express bucket name format.", [ct]: f }; + au = { [cw]: r, [cx]: [ac] }; + av = { [cy]: u }; + aw = { [cv]: [aq], [f]: "Expected a endpoint to be specified but no endpoint was found", [ct]: f }; + ax = { [cD]: [{ [cE]: true, [j]: z, [cF]: A, [cI]: ["*"] }, { [cE]: true, [j]: "sigv4", [cF]: A, [cG]: "{Region}" }] }; + ay = { [cw]: e, [cx]: [{ [cy]: "ForcePathStyle" }, false] }; + az = { [cy]: "ForcePathStyle" }; + aA = { [cw]: e, [cx]: [{ [cy]: "Accelerate" }, false] }; + aB = { [cw]: h, [cx]: [{ [cy]: "Region" }, "aws-global"] }; + aC = { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: B, [cG]: "us-east-1" }] }; + aD = { [cw]: r, [cx]: [aB] }; + aE = { [cw]: e, [cx]: [{ [cy]: "UseGlobalEndpoint" }, true] }; + aF = { [cA]: "https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: B, [cG]: "{Region}" }] }, [cH]: {} }; + aG = { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: B, [cG]: "{Region}" }] }; + aH = { [cw]: e, [cx]: [{ [cy]: "UseGlobalEndpoint" }, false] }; + aI = { [cA]: "https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + aJ = { [cA]: "https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + aK = { [cA]: "https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + aL = { [cw]: e, [cx]: [{ [cw]: i, [cx]: [ai, "isIp"] }, false] }; + aM = { [cA]: C, [cB]: aG, [cH]: {} }; + aN = { [cA]: q, [cB]: aG, [cH]: {} }; + aO = { [n]: aN, [ct]: n }; + aP = { [cA]: D, [cB]: aG, [cH]: {} }; + aQ = { [cA]: "https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + aR = { [f]: "Invalid region: region was not a valid DNS name.", [ct]: f }; + aS = { [cy]: G }; + aT = { [cy]: H }; + aU = { [cw]: i, [cx]: [aS, "service"] }; + aV = { [cy]: L }; + aW = { [cv]: [Y], [f]: "S3 Object Lambda does not support Dual-stack", [ct]: f }; + aX = { [cv]: [W], [f]: "S3 Object Lambda does not support S3 Accelerate", [ct]: f }; + aY = { [cv]: [{ [cw]: d, [cx]: [{ [cy]: "DisableAccessPoints" }] }, { [cw]: e, [cx]: [{ [cy]: "DisableAccessPoints" }, true] }], [f]: "Access points are not supported for this operation", [ct]: f }; + aZ = { [cv]: [{ [cw]: d, [cx]: [{ [cy]: "UseArnRegion" }] }, { [cw]: e, [cx]: [{ [cy]: "UseArnRegion" }, false] }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [aS, "region"] }, "{Region}"] }] }], [f]: "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`", [ct]: f }; + ba = { [cw]: i, [cx]: [{ [cy]: "bucketPartition" }, j] }; + bb = { [cw]: i, [cx]: [aS, "accountId"] }; + bc = { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: J, [cG]: "{bucketArn#region}" }] }; + bd = { [f]: "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`", [ct]: f }; + be = { [f]: "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`", [ct]: f }; + bf = { [f]: "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)", [ct]: f }; + bg = { [f]: "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`", [ct]: f }; + bh = { [f]: "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.", [ct]: f }; + bi = { [f]: "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided", [ct]: f }; + bj = { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: B, [cG]: "{bucketArn#region}" }] }; + bk = { [cD]: [{ [cE]: true, [j]: z, [cF]: A, [cI]: ["*"] }, { [cE]: true, [j]: "sigv4", [cF]: A, [cG]: "{bucketArn#region}" }] }; + bl = { [cw]: F, [cx]: [ad] }; + bm = { [cA]: "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aG, [cH]: {} }; + bn = { [cA]: "https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aG, [cH]: {} }; + bo = { [cA]: "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aG, [cH]: {} }; + bp = { [cA]: Q, [cB]: aG, [cH]: {} }; + bq = { [cA]: "https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aG, [cH]: {} }; + br = { [cy]: "UseObjectLambdaEndpoint" }; + bs = { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: J, [cG]: "{Region}" }] }; + bt = { [cA]: "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + bu = { [cA]: "https://s3-fips.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + bv = { [cA]: "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + bw = { [cA]: t, [cB]: aG, [cH]: {} }; + bx = { [cA]: "https://s3.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + by = [{ [cy]: "Region" }]; + bz = [{ [cy]: "Endpoint" }]; + bA = [ad]; + bB = [W]; + bC = [Z, ag]; + bD = [{ [cw]: d, [cx]: [{ [cy]: "DisableS3ExpressSessionAuth" }] }, { [cw]: e, [cx]: [{ [cy]: "DisableS3ExpressSessionAuth" }, true] }]; + bE = [aj]; + bF = [am]; + bG = [aa]; + bH = [X, Y]; + bI = [X, ar]; + bJ = [as, Y]; + bK = [as, ar]; + bL = [{ [cw]: k, [cx]: [ad, 6, 14, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 14, 16, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bM = [{ [cv]: [X, Y], [n]: { [cA]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bI, [n]: { [cA]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bJ, [n]: { [cA]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bK, [n]: { [cA]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: {} }, [ct]: n }]; + bN = [{ [cw]: k, [cx]: [ad, 6, 15, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 15, 17, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bO = [{ [cw]: k, [cx]: [ad, 6, 19, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 19, 21, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bP = [{ [cw]: k, [cx]: [ad, 6, 20, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 20, 22, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bQ = [{ [cw]: k, [cx]: [ad, 6, 26, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 26, 28, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bR = [{ [cv]: [X, Y], [n]: { [cA]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }, { [cv]: bI, [n]: { [cA]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }, { [cv]: bJ, [n]: { [cA]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }, { [cv]: bK, [n]: { [cA]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }]; + bS = [ad, 0, 7, true]; + bT = [{ [cw]: k, [cx]: [ad, 7, 15, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 15, 17, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bU = [{ [cw]: k, [cx]: [ad, 7, 16, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 16, 18, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bV = [{ [cw]: k, [cx]: [ad, 7, 20, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 20, 22, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bW = [{ [cw]: k, [cx]: [ad, 7, 21, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 21, 23, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bX = [{ [cw]: k, [cx]: [ad, 7, 27, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 27, 29, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bY = [ac]; + bZ = [{ [cw]: y, [cx]: [{ [cy]: x }, false] }]; + ca = [{ [cw]: h, [cx]: [{ [cy]: v }, "beta"] }]; + cb = ["*"]; + cc = [{ [cw]: y, [cx]: [{ [cy]: "Region" }, false] }]; + cd = [{ [cw]: h, [cx]: [{ [cy]: "Region" }, "us-east-1"] }]; + ce = [{ [cw]: h, [cx]: [aT, K] }]; + cf = [{ [cw]: i, [cx]: [aS, "resourceId[1]"], [cz]: L }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [aV, I] }] }]; + cg = [aS, "resourceId[1]"]; + ch = [Y]; + ci = [{ [cw]: r, [cx]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [aS, "region"] }, I] }] }]; + cj = [{ [cw]: r, [cx]: [{ [cw]: d, [cx]: [{ [cw]: i, [cx]: [aS, "resourceId[2]"] }] }] }]; + ck = [aS, "resourceId[2]"]; + cl = [{ [cw]: g, [cx]: [{ [cw]: i, [cx]: [aS, "region"] }], [cz]: "bucketPartition" }]; + cm = [{ [cw]: h, [cx]: [ba, { [cw]: i, [cx]: [{ [cy]: "partitionResult" }, j] }] }]; + cn = [{ [cw]: y, [cx]: [{ [cw]: i, [cx]: [aS, "region"] }, true] }]; + co = [{ [cw]: y, [cx]: [bb, false] }]; + cp = [{ [cw]: y, [cx]: [aV, false] }]; + cq = [X]; + cr = [{ [cw]: y, [cx]: [{ [cy]: "Region" }, true] }]; + _data = { version: "1.0", parameters: { Bucket: T, Region: T, UseFIPS: U, UseDualStack: U, Endpoint: T, ForcePathStyle: U, Accelerate: U, UseGlobalEndpoint: U, UseObjectLambdaEndpoint: V, Key: T, Prefix: T, CopySource: T, DisableAccessPoints: V, DisableMultiRegionAccessPoints: U, UseArnRegion: V, UseS3ExpressControlEndpoint: V, DisableS3ExpressSessionAuth: V }, [cu]: [{ [cv]: [{ [cw]: d, [cx]: by }], [cu]: [{ [cv]: [W, X], error: "Accelerate cannot be used with FIPS", [ct]: f }, { [cv]: [Y, Z], error: "Cannot set dual-stack in combination with a custom endpoint.", [ct]: f }, { [cv]: [Z, X], error: "A custom endpoint cannot be combined with FIPS", [ct]: f }, { [cv]: [Z, W], error: "A custom endpoint cannot be combined with S3 Accelerate", [ct]: f }, { [cv]: [X, aa, ab], error: "Partition does not support FIPS", [ct]: f }, { [cv]: [ac, { [cw]: k, [cx]: [ad, 0, a, c], [cz]: l }, { [cw]: h, [cx]: [{ [cy]: l }, "--x-s3"] }], [cu]: [ae, af, { [cv]: [ao, ap], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [aj, aq], [cu]: [{ [cv]: bH, endpoint: { [cA]: "https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: "https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: "https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: ak, [cH]: al }, [ct]: n }], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: bF, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bD, [cu]: [{ [cv]: bL, [cu]: bM, [ct]: o }, { [cv]: bN, [cu]: bM, [ct]: o }, { [cv]: bO, [cu]: bM, [ct]: o }, { [cv]: bP, [cu]: bM, [ct]: o }, { [cv]: bQ, [cu]: bM, [ct]: o }, at], [ct]: o }, { [cv]: bL, [cu]: bR, [ct]: o }, { [cv]: bN, [cu]: bR, [ct]: o }, { [cv]: bO, [cu]: bR, [ct]: o }, { [cv]: bP, [cu]: bR, [ct]: o }, { [cv]: bQ, [cu]: bR, [ct]: o }, at], [ct]: o }], [ct]: o }, an], [ct]: o }, { [cv]: [ac, { [cw]: k, [cx]: bS, [cz]: s }, { [cw]: h, [cx]: [{ [cy]: s }, "--xa-s3"] }], [cu]: [ae, af, { [cv]: bF, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bD, [cu]: [{ [cv]: bT, [cu]: bM, [ct]: o }, { [cv]: bU, [cu]: bM, [ct]: o }, { [cv]: bV, [cu]: bM, [ct]: o }, { [cv]: bW, [cu]: bM, [ct]: o }, { [cv]: bX, [cu]: bM, [ct]: o }, at], [ct]: o }, { [cv]: bT, [cu]: bR, [ct]: o }, { [cv]: bU, [cu]: bR, [ct]: o }, { [cv]: bV, [cu]: bR, [ct]: o }, { [cv]: bW, [cu]: bR, [ct]: o }, { [cv]: bX, [cu]: bR, [ct]: o }, at], [ct]: o }], [ct]: o }, an], [ct]: o }, { [cv]: [au, ao, ap], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bC, endpoint: { [cA]: t, [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bH, endpoint: { [cA]: "https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: "https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: "https://s3express-control.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: al }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [ac, { [cw]: k, [cx]: [ad, 49, 50, c], [cz]: u }, { [cw]: k, [cx]: [ad, 8, 12, c], [cz]: v }, { [cw]: k, [cx]: bS, [cz]: w }, { [cw]: k, [cx]: [ad, 32, 49, c], [cz]: x }, { [cw]: g, [cx]: by, [cz]: "regionPartition" }, { [cw]: h, [cx]: [{ [cy]: w }, "--op-s3"] }], [cu]: [{ [cv]: bZ, [cu]: [{ [cv]: bF, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [av, "e"] }], [cu]: [{ [cv]: ca, [cu]: [aw, { [cv]: bC, endpoint: { [cA]: "https://{Bucket}.ec2.{url#authority}", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { endpoint: { [cA]: "https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { [cv]: [{ [cw]: h, [cx]: [av, "o"] }], [cu]: [{ [cv]: ca, [cu]: [aw, { [cv]: bC, endpoint: { [cA]: "https://{Bucket}.op-{outpostId}.{url#authority}", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { endpoint: { [cA]: "https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { error: 'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"', [ct]: f }], [ct]: o }, { error: "Invalid Outposts Bucket alias - it must be a valid bucket name.", [ct]: f }], [ct]: o }, { error: "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.", [ct]: f }], [ct]: o }, { [cv]: bY, [cu]: [{ [cv]: [Z, { [cw]: r, [cx]: [{ [cw]: d, [cx]: [{ [cw]: m, [cx]: bz }] }] }], error: "Custom endpoint `{Endpoint}` was not a valid URI", [ct]: f }, { [cv]: [ay, am], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cc, [cu]: [{ [cv]: [W, ab], error: "S3 Accelerate cannot be used in this region", [ct]: f }, { [cv]: [Y, X, aA, aq, aB], endpoint: { [cA]: "https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, X, aA, aq, aD, aE], [cu]: [{ endpoint: aF, [ct]: n }], [ct]: o }, { [cv]: [Y, X, aA, aq, aD, aH], endpoint: aF, [ct]: n }, { [cv]: [ar, X, aA, aq, aB], endpoint: { [cA]: "https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, X, aA, aq, aD, aE], [cu]: [{ endpoint: aI, [ct]: n }], [ct]: o }, { [cv]: [ar, X, aA, aq, aD, aH], endpoint: aI, [ct]: n }, { [cv]: [Y, as, W, aq, aB], endpoint: { [cA]: "https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, as, W, aq, aD, aE], [cu]: [{ endpoint: aJ, [ct]: n }], [ct]: o }, { [cv]: [Y, as, W, aq, aD, aH], endpoint: aJ, [ct]: n }, { [cv]: [Y, as, aA, aq, aB], endpoint: { [cA]: "https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, as, aA, aq, aD, aE], [cu]: [{ endpoint: aK, [ct]: n }], [ct]: o }, { [cv]: [Y, as, aA, aq, aD, aH], endpoint: aK, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, ah, aB], endpoint: { [cA]: C, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, aL, aB], endpoint: { [cA]: q, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, ah, aD, aE], [cu]: [{ [cv]: cd, endpoint: aM, [ct]: n }, { endpoint: aM, [ct]: n }], [ct]: o }, { [cv]: [ar, as, aA, Z, ag, aL, aD, aE], [cu]: [{ [cv]: cd, endpoint: aN, [ct]: n }, aO], [ct]: o }, { [cv]: [ar, as, aA, Z, ag, ah, aD, aH], endpoint: aM, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, aL, aD, aH], endpoint: aN, [ct]: n }, { [cv]: [ar, as, W, aq, aB], endpoint: { [cA]: D, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, W, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: aP, [ct]: n }, { endpoint: aP, [ct]: n }], [ct]: o }, { [cv]: [ar, as, W, aq, aD, aH], endpoint: aP, [ct]: n }, { [cv]: [ar, as, aA, aq, aB], endpoint: { [cA]: E, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: E, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: aQ, [ct]: n }], [ct]: o }, { [cv]: [ar, as, aA, aq, aD, aH], endpoint: aQ, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [Z, ag, { [cw]: h, [cx]: [{ [cw]: i, [cx]: [ai, "scheme"] }, "http"] }, { [cw]: p, [cx]: [ad, c] }, ay, as, ar, aA], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cc, [cu]: [aO], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [ay, { [cw]: F, [cx]: bA, [cz]: G }], [cu]: [{ [cv]: [{ [cw]: i, [cx]: [aS, "resourceId[0]"], [cz]: H }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [aT, I] }] }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [aU, J] }], [cu]: [{ [cv]: ce, [cu]: [{ [cv]: cf, [cu]: [aW, aX, { [cv]: ci, [cu]: [aY, { [cv]: cj, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cm, [cu]: [{ [cv]: cn, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [bb, I] }], error: "Invalid ARN: Missing account id", [ct]: f }, { [cv]: co, [cu]: [{ [cv]: cp, [cu]: [{ [cv]: bC, endpoint: { [cA]: M, [cB]: bc, [cH]: al }, [ct]: n }, { [cv]: cq, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bc, [cH]: al }, [ct]: n }, { endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bc, [cH]: al }, [ct]: n }], [ct]: o }, bd], [ct]: o }, be], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, bh], [ct]: o }, { error: "Invalid ARN: bucket ARN is missing a region", [ct]: f }], [ct]: o }, bi], [ct]: o }, { error: "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`", [ct]: f }], [ct]: o }, { [cv]: ce, [cu]: [{ [cv]: cf, [cu]: [{ [cv]: ci, [cu]: [{ [cv]: ce, [cu]: [{ [cv]: ci, [cu]: [aY, { [cv]: cj, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [ba, "{partitionResult#name}"] }], [cu]: [{ [cv]: cn, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [aU, B] }], [cu]: [{ [cv]: co, [cu]: [{ [cv]: cp, [cu]: [{ [cv]: bB, error: "Access Points do not support S3 Accelerate", [ct]: f }, { [cv]: bH, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: [as, ar, Z, ag], endpoint: { [cA]: M, [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bj, [cH]: al }, [ct]: n }], [ct]: o }, bd], [ct]: o }, be], [ct]: o }, { error: "Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}", [ct]: f }], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, bh], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: y, [cx]: [aV, c] }], [cu]: [{ [cv]: ch, error: "S3 MRAP does not support dual-stack", [ct]: f }, { [cv]: cq, error: "S3 MRAP does not support FIPS", [ct]: f }, { [cv]: bB, error: "S3 MRAP does not support S3 Accelerate", [ct]: f }, { [cv]: [{ [cw]: e, [cx]: [{ [cy]: "DisableMultiRegionAccessPoints" }, c] }], error: "Invalid configuration: Multi-Region Access Point ARNs are disabled.", [ct]: f }, { [cv]: [{ [cw]: g, [cx]: by, [cz]: N }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [{ [cy]: N }, j] }, { [cw]: i, [cx]: [aS, "partition"] }] }], [cu]: [{ endpoint: { [cA]: "https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}", [cB]: { [cD]: [{ [cE]: c, name: z, [cF]: B, [cI]: cb }] }, [cH]: al }, [ct]: n }], [ct]: o }, { error: "Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`", [ct]: f }], [ct]: o }], [ct]: o }, { error: "Invalid Access Point Name", [ct]: f }], [ct]: o }, bi], [ct]: o }, { [cv]: [{ [cw]: h, [cx]: [aU, A] }], [cu]: [{ [cv]: ch, error: "S3 Outposts does not support Dual-stack", [ct]: f }, { [cv]: cq, error: "S3 Outposts does not support FIPS", [ct]: f }, { [cv]: bB, error: "S3 Outposts does not support S3 Accelerate", [ct]: f }, { [cv]: [{ [cw]: d, [cx]: [{ [cw]: i, [cx]: [aS, "resourceId[4]"] }] }], error: "Invalid Arn: Outpost Access Point ARN contains sub resources", [ct]: f }, { [cv]: [{ [cw]: i, [cx]: cg, [cz]: x }], [cu]: [{ [cv]: bZ, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cm, [cu]: [{ [cv]: cn, [cu]: [{ [cv]: co, [cu]: [{ [cv]: [{ [cw]: i, [cx]: ck, [cz]: O }], [cu]: [{ [cv]: [{ [cw]: i, [cx]: [aS, "resourceId[3]"], [cz]: L }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [{ [cy]: O }, K] }], [cu]: [{ [cv]: bC, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}", [cB]: bk, [cH]: al }, [ct]: n }, { endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bk, [cH]: al }, [ct]: n }], [ct]: o }, { error: "Expected an outpost type `accesspoint`, found {outpostType}", [ct]: f }], [ct]: o }, { error: "Invalid ARN: expected an access point name", [ct]: f }], [ct]: o }, { error: "Invalid ARN: Expected a 4-component resource", [ct]: f }], [ct]: o }, be], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, { error: "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`", [ct]: f }], [ct]: o }, { error: "Invalid ARN: The Outpost Id was not set", [ct]: f }], [ct]: o }, { error: "Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})", [ct]: f }], [ct]: o }, { error: "Invalid ARN: No ARN type specified", [ct]: f }], [ct]: o }, { [cv]: [{ [cw]: k, [cx]: [ad, 0, 4, b], [cz]: P }, { [cw]: h, [cx]: [{ [cy]: P }, "arn:"] }, { [cw]: r, [cx]: [{ [cw]: d, [cx]: [bl] }] }], error: "Invalid ARN: `{Bucket}` was not a valid ARN", [ct]: f }, { [cv]: [{ [cw]: e, [cx]: [az, c] }, bl], error: "Path-style addressing cannot be used with ARN buckets", [ct]: f }, { [cv]: bE, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [aA], [cu]: [{ [cv]: [Y, aq, X, aB], endpoint: { [cA]: "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, aq, X, aD, aE], [cu]: [{ endpoint: bm, [ct]: n }], [ct]: o }, { [cv]: [Y, aq, X, aD, aH], endpoint: bm, [ct]: n }, { [cv]: [ar, aq, X, aB], endpoint: { [cA]: "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, aq, X, aD, aE], [cu]: [{ endpoint: bn, [ct]: n }], [ct]: o }, { [cv]: [ar, aq, X, aD, aH], endpoint: bn, [ct]: n }, { [cv]: [Y, aq, as, aB], endpoint: { [cA]: "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, aq, as, aD, aE], [cu]: [{ endpoint: bo, [ct]: n }], [ct]: o }, { [cv]: [Y, aq, as, aD, aH], endpoint: bo, [ct]: n }, { [cv]: [ar, Z, ag, as, aB], endpoint: { [cA]: Q, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, Z, ag, as, aD, aE], [cu]: [{ [cv]: cd, endpoint: bp, [ct]: n }, { endpoint: bp, [ct]: n }], [ct]: o }, { [cv]: [ar, Z, ag, as, aD, aH], endpoint: bp, [ct]: n }, { [cv]: [ar, aq, as, aB], endpoint: { [cA]: R, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, aq, as, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: R, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: bq, [ct]: n }], [ct]: o }, { [cv]: [ar, aq, as, aD, aH], endpoint: bq, [ct]: n }], [ct]: o }, { error: "Path-style addressing cannot be used with S3 Accelerate", [ct]: f }], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: d, [cx]: [br] }, { [cw]: e, [cx]: [br, c] }], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cr, [cu]: [aW, aX, { [cv]: bC, endpoint: { [cA]: t, [cB]: bs, [cH]: al }, [ct]: n }, { [cv]: cq, endpoint: { [cA]: "https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}", [cB]: bs, [cH]: al }, [ct]: n }, { endpoint: { [cA]: "https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}", [cB]: bs, [cH]: al }, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [au], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cr, [cu]: [{ [cv]: [X, Y, aq, aB], endpoint: { [cA]: "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [X, Y, aq, aD, aE], [cu]: [{ endpoint: bt, [ct]: n }], [ct]: o }, { [cv]: [X, Y, aq, aD, aH], endpoint: bt, [ct]: n }, { [cv]: [X, ar, aq, aB], endpoint: { [cA]: "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [X, ar, aq, aD, aE], [cu]: [{ endpoint: bu, [ct]: n }], [ct]: o }, { [cv]: [X, ar, aq, aD, aH], endpoint: bu, [ct]: n }, { [cv]: [as, Y, aq, aB], endpoint: { [cA]: "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, Y, aq, aD, aE], [cu]: [{ endpoint: bv, [ct]: n }], [ct]: o }, { [cv]: [as, Y, aq, aD, aH], endpoint: bv, [ct]: n }, { [cv]: [as, ar, Z, ag, aB], endpoint: { [cA]: t, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, ar, Z, ag, aD, aE], [cu]: [{ [cv]: cd, endpoint: bw, [ct]: n }, { endpoint: bw, [ct]: n }], [ct]: o }, { [cv]: [as, ar, Z, ag, aD, aH], endpoint: bw, [ct]: n }, { [cv]: [as, ar, aq, aB], endpoint: { [cA]: S, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, ar, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: S, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: bx, [ct]: n }], [ct]: o }, { [cv]: [as, ar, aq, aD, aH], endpoint: bx, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }], [ct]: o }, { error: "A region must be set when sending requests to S3.", [ct]: f }] }; + ruleSet = _data; + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/endpointResolver.js +var cache2, defaultEndpointResolver; +var init_endpointResolver = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/endpointResolver.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es33(); + init_dist_es32(); + init_ruleset(); + cache2 = new EndpointCache({ + size: 50, + params: [ + "Accelerate", + "Bucket", + "DisableAccessPoints", + "DisableMultiRegionAccessPoints", + "DisableS3ExpressSessionAuth", + "Endpoint", + "ForcePathStyle", + "Region", + "UseArnRegion", + "UseDualStack", + "UseFIPS", + "UseGlobalEndpoint", + "UseObjectLambdaEndpoint", + "UseS3ExpressControlEndpoint" + ] + }); + defaultEndpointResolver = /* @__PURE__ */ __name((endpointParams, context2 = {}) => { + return cache2.get(endpointParams, () => resolveEndpoint(ruleSet, { + endpointParams, + logger: context2.logger + })); + }, "defaultEndpointResolver"); + customEndpointFunctions.aws = awsEndpointFunctions; + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthSchemeProvider.js +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "s3", + region: authParameters.region + }, + propertiesExtractor: (config3, context2) => ({ + signingProperties: { + config: config3, + context: context2 + } + }) + }; +} +function createAwsAuthSigv4aHttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4a", + signingProperties: { + name: "s3", + region: authParameters.region + }, + propertiesExtractor: (config3, context2) => ({ + signingProperties: { + config: config3, + context: context2 + } + }) + }; +} +var createEndpointRuleSetHttpAuthSchemeParametersProvider, _defaultS3HttpAuthSchemeParametersProvider, defaultS3HttpAuthSchemeParametersProvider, createEndpointRuleSetHttpAuthSchemeProvider, _defaultS3HttpAuthSchemeProvider, defaultS3HttpAuthSchemeProvider, resolveHttpAuthSchemeConfig; +var init_httpAuthSchemeProvider = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthSchemeProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_dist_es43(); + init_dist_es41(); + init_dist_es4(); + init_endpointResolver(); + createEndpointRuleSetHttpAuthSchemeParametersProvider = /* @__PURE__ */ __name((defaultHttpAuthSchemeParametersProvider) => async (config3, context2, input) => { + if (!input) { + throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`"); + } + const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config3, context2, input); + const instructionsFn = getSmithyContext(context2)?.commandInstance?.constructor?.getEndpointParameterInstructions; + if (!instructionsFn) { + throw new Error(`getEndpointParameterInstructions() is not defined on '${context2.commandName}'`); + } + const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config3); + return Object.assign(defaultParameters, endpointParameters); + }, "createEndpointRuleSetHttpAuthSchemeParametersProvider"); + _defaultS3HttpAuthSchemeParametersProvider = /* @__PURE__ */ __name(async (config3, context2, input) => { + return { + operation: getSmithyContext(context2).operation, + region: await normalizeProvider(config3.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }, "_defaultS3HttpAuthSchemeParametersProvider"); + defaultS3HttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultS3HttpAuthSchemeParametersProvider); + __name(createAwsAuthSigv4HttpAuthOption, "createAwsAuthSigv4HttpAuthOption"); + __name(createAwsAuthSigv4aHttpAuthOption, "createAwsAuthSigv4aHttpAuthOption"); + createEndpointRuleSetHttpAuthSchemeProvider = /* @__PURE__ */ __name((defaultEndpointResolver2, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => { + const endpointRuleSetHttpAuthSchemeProvider = /* @__PURE__ */ __name((authParameters) => { + const endpoint = defaultEndpointResolver2(authParameters); + const authSchemes = endpoint.properties?.authSchemes; + if (!authSchemes) { + return defaultHttpAuthSchemeResolver(authParameters); + } + const options = []; + for (const scheme of authSchemes) { + const { name: resolvedName, properties = {}, ...rest } = scheme; + const name = resolvedName.toLowerCase(); + if (resolvedName !== name) { + console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`); + } + let schemeId; + if (name === "sigv4a") { + schemeId = "aws.auth#sigv4a"; + const sigv4Present = authSchemes.find((s2) => { + const name2 = s2.name.toLowerCase(); + return name2 !== "sigv4a" && name2.startsWith("sigv4"); + }); + if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) { + continue; + } + } else if (name.startsWith("sigv4")) { + schemeId = "aws.auth#sigv4"; + } else { + throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`); + } + const createOption = createHttpAuthOptionFunctions[schemeId]; + if (!createOption) { + throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`); + } + const option = createOption(authParameters); + option.schemeId = schemeId; + option.signingProperties = { ...option.signingProperties || {}, ...rest, ...properties }; + options.push(option); + } + return options; + }, "endpointRuleSetHttpAuthSchemeProvider"); + return endpointRuleSetHttpAuthSchemeProvider; + }, "createEndpointRuleSetHttpAuthSchemeProvider"); + _defaultS3HttpAuthSchemeProvider = /* @__PURE__ */ __name((authParameters) => { + const options = []; + switch (authParameters.operation) { + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + options.push(createAwsAuthSigv4aHttpAuthOption(authParameters)); + } + } + return options; + }, "_defaultS3HttpAuthSchemeProvider"); + defaultS3HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultS3HttpAuthSchemeProvider, { + "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption, + "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption + }); + resolveHttpAuthSchemeConfig = /* @__PURE__ */ __name((config3) => { + const config_0 = resolveAwsSdkSigV4Config(config3); + const config_1 = resolveAwsSdkSigV4AConfig(config_0); + return Object.assign(config_1, { + authSchemePreference: normalizeProvider(config3.authSchemePreference ?? []) + }); + }, "resolveHttpAuthSchemeConfig"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js +var resolveClientEndpointParameters, commonParams; +var init_EndpointParameters = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { + return Object.assign(options, { + useFipsEndpoint: options.useFipsEndpoint ?? false, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + forcePathStyle: options.forcePathStyle ?? false, + useAccelerateEndpoint: options.useAccelerateEndpoint ?? false, + useGlobalEndpoint: options.useGlobalEndpoint ?? false, + disableMultiregionAccessPoints: options.disableMultiregionAccessPoints ?? false, + defaultSigningName: "s3", + clientContextParams: options.clientContextParams ?? {} + }); + }, "resolveClientEndpointParameters"); + commonParams = { + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js +var S3ServiceException; +var init_S3ServiceException = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es21(); + S3ServiceException = class extends ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, S3ServiceException.prototype); + } + }; + __name(S3ServiceException, "S3ServiceException"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/errors.js +var NoSuchUpload, AccessDenied, ObjectNotInActiveTierError, BucketAlreadyExists, BucketAlreadyOwnedByYou, NoSuchBucket, InvalidObjectState, NoSuchKey, NotFound, EncryptionTypeMismatch, InvalidRequest, InvalidWriteOffset, TooManyParts, IdempotencyParameterMismatch, ObjectAlreadyInActiveTierError; +var init_errors3 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/models/errors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_S3ServiceException(); + NoSuchUpload = class extends S3ServiceException { + name = "NoSuchUpload"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoSuchUpload", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NoSuchUpload.prototype); + } + }; + __name(NoSuchUpload, "NoSuchUpload"); + AccessDenied = class extends S3ServiceException { + name = "AccessDenied"; + $fault = "client"; + constructor(opts) { + super({ + name: "AccessDenied", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AccessDenied.prototype); + } + }; + __name(AccessDenied, "AccessDenied"); + ObjectNotInActiveTierError = class extends S3ServiceException { + name = "ObjectNotInActiveTierError"; + $fault = "client"; + constructor(opts) { + super({ + name: "ObjectNotInActiveTierError", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ObjectNotInActiveTierError.prototype); + } + }; + __name(ObjectNotInActiveTierError, "ObjectNotInActiveTierError"); + BucketAlreadyExists = class extends S3ServiceException { + name = "BucketAlreadyExists"; + $fault = "client"; + constructor(opts) { + super({ + name: "BucketAlreadyExists", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, BucketAlreadyExists.prototype); + } + }; + __name(BucketAlreadyExists, "BucketAlreadyExists"); + BucketAlreadyOwnedByYou = class extends S3ServiceException { + name = "BucketAlreadyOwnedByYou"; + $fault = "client"; + constructor(opts) { + super({ + name: "BucketAlreadyOwnedByYou", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, BucketAlreadyOwnedByYou.prototype); + } + }; + __name(BucketAlreadyOwnedByYou, "BucketAlreadyOwnedByYou"); + NoSuchBucket = class extends S3ServiceException { + name = "NoSuchBucket"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoSuchBucket", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NoSuchBucket.prototype); + } + }; + __name(NoSuchBucket, "NoSuchBucket"); + InvalidObjectState = class extends S3ServiceException { + name = "InvalidObjectState"; + $fault = "client"; + StorageClass; + AccessTier; + constructor(opts) { + super({ + name: "InvalidObjectState", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidObjectState.prototype); + this.StorageClass = opts.StorageClass; + this.AccessTier = opts.AccessTier; + } + }; + __name(InvalidObjectState, "InvalidObjectState"); + NoSuchKey = class extends S3ServiceException { + name = "NoSuchKey"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoSuchKey", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NoSuchKey.prototype); + } + }; + __name(NoSuchKey, "NoSuchKey"); + NotFound = class extends S3ServiceException { + name = "NotFound"; + $fault = "client"; + constructor(opts) { + super({ + name: "NotFound", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NotFound.prototype); + } + }; + __name(NotFound, "NotFound"); + EncryptionTypeMismatch = class extends S3ServiceException { + name = "EncryptionTypeMismatch"; + $fault = "client"; + constructor(opts) { + super({ + name: "EncryptionTypeMismatch", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, EncryptionTypeMismatch.prototype); + } + }; + __name(EncryptionTypeMismatch, "EncryptionTypeMismatch"); + InvalidRequest = class extends S3ServiceException { + name = "InvalidRequest"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidRequest", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidRequest.prototype); + } + }; + __name(InvalidRequest, "InvalidRequest"); + InvalidWriteOffset = class extends S3ServiceException { + name = "InvalidWriteOffset"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidWriteOffset", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidWriteOffset.prototype); + } + }; + __name(InvalidWriteOffset, "InvalidWriteOffset"); + TooManyParts = class extends S3ServiceException { + name = "TooManyParts"; + $fault = "client"; + constructor(opts) { + super({ + name: "TooManyParts", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, TooManyParts.prototype); + } + }; + __name(TooManyParts, "TooManyParts"); + IdempotencyParameterMismatch = class extends S3ServiceException { + name = "IdempotencyParameterMismatch"; + $fault = "client"; + constructor(opts) { + super({ + name: "IdempotencyParameterMismatch", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, IdempotencyParameterMismatch.prototype); + } + }; + __name(IdempotencyParameterMismatch, "IdempotencyParameterMismatch"); + ObjectAlreadyInActiveTierError = class extends S3ServiceException { + name = "ObjectAlreadyInActiveTierError"; + $fault = "client"; + constructor(opts) { + super({ + name: "ObjectAlreadyInActiveTierError", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ObjectAlreadyInActiveTierError.prototype); + } + }; + __name(ObjectAlreadyInActiveTierError, "ObjectAlreadyInActiveTierError"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js +var _A, _AAO, _AC, _ACL, _ACL_, _ACLn, _ACP, _ACT, _ACn, _AD, _ADb, _AED, _AF, _AH, _AHl, _AI, _AIMU, _AKI, _AM, _AMU, _AMUO, _AMUR, _AMl, _AO, _AOl, _APA, _APAc, _AQRD, _AR, _ARI, _AS, _ASBD, _ASSEBD, _ASr, _AT, _An, _B, _BA, _BAE, _BAI, _BAOBY, _BET, _BGR, _BI, _BKE, _BLC, _BLN, _BLS, _BLT, _BN, _BNu, _BP, _BPA, _BPP, _BR, _BRy, _BS, _Bo, _Bu, _C, _CA, _CACL, _CB, _CBC, _CBMC, _CBMCR, _CBMTC, _CBMTCR, _CBO, _CBR, _CC, _CCRC, _CCRCC, _CCRCNVME, _CC_, _CD, _CD_, _CDo, _CE, _CE_, _CEo, _CF, _CFC, _CL, _CL_, _CL__, _CLo, _CM, _CMD, _CMU, _CMUO, _CMUOr, _CMUR, _CMURo, _CMURr, _CMUo, _CMUr, _CMh, _CO, _COO, _COR, _CORSC, _CORSR, _CORSRu, _CORo, _CP, _CPL, _CPLo, _CPR, _CPo, _CPom, _CR, _CRSBA, _CR_, _CS, _CSHA, _CSHAh, _CSIM, _CSIMS, _CSINM, _CSIUS, _CSO, _CSR, _CSRo, _CSRr, _CSSSECA, _CSSSECK, _CSSSECKMD, _CSV, _CSVI, _CSVIn, _CSVO, _CSo, _CSr, _CT, _CT_, _CTl, _CTo, _CTom, _CTon, _Co, _Cod, _Com, _Con, _Cont, _Cr, _D, _DAI, _DB, _DBAC, _DBACR, _DBC, _DBCR, _DBE, _DBER, _DBIC, _DBICR, _DBITC, _DBITCR, _DBL, _DBLR, _DBMC, _DBMCR, _DBMCRe, _DBMCe, _DBMTC, _DBMTCR, _DBOC, _DBOCR, _DBP, _DBPR, _DBR, _DBRR, _DBRe, _DBT, _DBTR, _DBW, _DBWR, _DE, _DIM, _DIMS, _DINM, _DIUS, _DM, _DME, _DMR, _DMVI, _DMe, _DN, _DO, _DOO, _DOOe, _DOR, _DORe, _DOT, _DOTO, _DOTR, _DOe, _DOel, _DOele, _DPAB, _DPABR, _DR, _DRe, _DRel, _DRes, _Da, _De, _Del, _Deli, _Des, _Desc, _Det, _E, _EA, _EBC, _EBO, _EC, _ECr, _ED, _EDr, _EE, _EH, _EHx, _EM, _EODM, _EOR, _ES, _ESBO, _ET, _ETL, _ETM, _ETa, _ETn, _ETv, _ETx, _En, _Ena, _End, _Er, _Err, _Ev, _Eve, _Ex, _Exp, _F, _FD, _FHI, _FO, _FR, _FRL, _FRi, _Fi, _Fo, _Fr, _G, _GBA, _GBAC, _GBACO, _GBACOe, _GBACR, _GBACRe, _GBACe, _GBAO, _GBAOe, _GBAR, _GBARe, _GBAe, _GBC, _GBCO, _GBCR, _GBE, _GBEO, _GBER, _GBIC, _GBICO, _GBICR, _GBITC, _GBITCO, _GBITCR, _GBL, _GBLC, _GBLCO, _GBLCR, _GBLO, _GBLOe, _GBLR, _GBLRe, _GBLe, _GBMC, _GBMCO, _GBMCOe, _GBMCR, _GBMCRe, _GBMCRet, _GBMCe, _GBMTC, _GBMTCO, _GBMTCR, _GBMTCRe, _GBNC, _GBNCR, _GBOC, _GBOCO, _GBOCR, _GBP, _GBPO, _GBPR, _GBPS, _GBPSO, _GBPSR, _GBR, _GBRO, _GBRP, _GBRPO, _GBRPR, _GBRR, _GBT, _GBTO, _GBTR, _GBV, _GBVO, _GBVR, _GBW, _GBWO, _GBWR, _GFC, _GJP, _GO, _GOA, _GOAO, _GOAOe, _GOAP, _GOAR, _GOARe, _GOARet, _GOAe, _GOLC, _GOLCO, _GOLCR, _GOLH, _GOLHO, _GOLHR, _GOO, _GOR, _GORO, _GORR, _GORe, _GOT, _GOTO, _GOTOe, _GOTR, _GOTRe, _GOTe, _GPAB, _GPABO, _GPABR, _GR, _GRACP, _GW, _GWACP, _Gr, _Gra, _HB, _HBO, _HBR, _HECRE, _HN, _HO, _HOO, _HOR, _HRC, _I, _IC, _ICL, _ID, _IDn, _IDnv, _IE, _IEn, _IF, _IL, _IM, _IMIT, _IMLMT, _IMS, _IMS_, _IMSf, _IMUR, _IM_, _INM, _INM_, _IOF, _IOS, _IOV, _IP, _IPA, _IPM, _IR, _IRIP, _IS, _ISBD, _ISn, _IT, _ITAO, _ITC, _ITCL, _ITCR, _ITCU, _ITCn, _ITF, _IUS, _IUS_, _IWO, _In, _Ini, _JSON, _JSONI, _JSONO, _JTC, _JTCR, _JTCU, _K, _KC, _KI, _KKA, _KM, _KMSC, _KMSKA, _KMSKI, _KMSMKID, _KPE, _L, _LAMBR, _LAMDBR, _LB, _LBAC, _LBACO, _LBACR, _LBACRi, _LBIC, _LBICO, _LBICR, _LBITC, _LBITCO, _LBITCR, _LBMC, _LBMCO, _LBMCR, _LBO, _LBR, _LBRi, _LC, _LCi, _LDB, _LDBO, _LDBR, _LE, _LEi, _LFA, _LFC, _LFCL, _LFCa, _LH, _LI, _LICR, _LM, _LMCR, _LMT, _LMU, _LMUO, _LMUR, _LMURi, _LM_, _LO, _LOO, _LOR, _LOV, _LOVO, _LOVOi, _LOVR, _LOVRi, _LOVi, _LP, _LPO, _LPR, _LPRi, _LR, _LRAO, _LRF, _LRi, _LVR, _M, _MAO, _MAS, _MB, _MC, _MCL, _MCR, _MCe, _MD, _MDB, _MDf, _ME, _MF, _MFA, _MFAD, _MK, _MM, _MOS, _MP, _MTC, _MTCR, _MTEC, _MU, _MUL, _MUa, _Ma, _Me, _Mes, _Mi, _Mo, _N, _NC, _NCF, _NCT, _ND, _NEKKAS, _NF, _NKM, _NM, _NNV, _NPNM, _NSB, _NSK, _NSU, _NUIM, _NVE, _NVIM, _NVT, _NVTL, _NVTo, _O, _OA, _OAIATE, _OC, _OCR, _OCRw, _OE, _OF, _OI, _OIL, _OL, _OLC, _OLE, _OLEFB, _OLLH, _OLLHS, _OLM, _OLR, _OLRUD, _OLRb, _OLb, _ONIATE, _OO, _OOA, _OP, _OPb, _OS, _OSGT, _OSLT, _OSV, _OSu, _OV, _OVL, _Ob, _Obj, _P, _PABC, _PBA, _PBAC, _PBACR, _PBACRu, _PBACu, _PBAR, _PBARu, _PBAu, _PBC, _PBCR, _PBE, _PBER, _PBIC, _PBICR, _PBITC, _PBITCR, _PBL, _PBLC, _PBLCO, _PBLCR, _PBLR, _PBMC, _PBMCR, _PBNC, _PBNCR, _PBOC, _PBOCR, _PBP, _PBPR, _PBR, _PBRP, _PBRPR, _PBRR, _PBT, _PBTR, _PBV, _PBVR, _PBW, _PBWR, _PC, _PDS, _PE, _PI, _PL, _PN, _PNM, _PO, _POA, _POAO, _POAR, _POLC, _POLCO, _POLCR, _POLH, _POLHO, _POLHR, _POO, _POR, _PORO, _PORR, _PORu, _POT, _POTO, _POTR, _PP, _PPAB, _PPABR, _PS, _Pa, _Par, _Parq, _Pay, _Payl, _Pe, _Po, _Pr, _Pri, _Pro, _Q, _QA, _QC, _QCL, _QCu, _QCue, _QEC, _QF, _Qu, _R, _RART, _RC, _RCC, _RCD, _RCE, _RCL, _RCT, _RCe, _RD, _RE, _RED, _REe, _REec, _RKKID, _RKPW, _RKW, _RM, _RO, _ROO, _ROOe, _ROP, _ROR, _RORe, _ROe, _RP, _RPB, _RPC, _RPe, _RR, _RRAO, _RRF, _RRe, _RRep, _RReq, _RRes, _RRo, _RS, _RSe, _RSen, _RT, _RTV, _RTe, _RUD, _Ra, _Re, _Rec, _Red, _Ret, _Ro, _Ru, _S, _SA, _SAK, _SAs, _SB, _SBD, _SC, _SCA, _SCADE, _SCV, _SCe, _SCt, _SDV, _SE, _SIM, _SIMS, _SINM, _SIUS, _SK, _SKEO, _SKF, _SKe, _SL, _SM, _SOC, _SOCES, _SOCO, _SOCR, _SP, _SPi, _SR, _SS, _SSC, _SSE, _SSEA, _SSEBD, _SSEC, _SSECA, _SSECK, _SSECKMD, _SSEKMS, _SSEKMSE, _SSEKMSEC, _SSEKMSKI, _SSER, _SSERe, _SSES, _ST, _STD, _STDR, _S_, _Sc, _Si, _St, _Sta, _Su, _T, _TA, _TAo, _TB, _TBA, _TBT, _TC, _TCL, _TCo, _TCop, _TD, _TDMOS, _TG, _TGa, _TL, _TLr, _TMP, _TN, _TNa, _TOKF, _TP, _TPC, _TS, _TSa, _Ta, _Tag, _Ti, _Tie, _Tier, _Tim, _To, _Top, _Tr, _Tra, _Ty, _U, _UBMITC, _UBMITCR, _UBMJTC, _UBMJTCR, _UI, _UIM, _UM, _UOE, _UOER, _UOERp, _UP, _UPC, _UPCO, _UPCR, _UPO, _UPR, _URI, _Up, _V, _VC, _VI, _VIM, _Ve, _Ver, _WC, _WGOR, _WGORR, _WOB, _WRL, _Y, _ar, _br, _c, _ct, _d, _e, _eP, _en, _et, _fo, _h, _hC, _hE, _hH, _hL, _hP, _hPH, _hQ, _hi, _i, _iT, _km, _m, _mb, _mdb, _mk, _mp, _mu, _p, _pN, _pnm, _rcc, _rcd, _rce, _rcl, _rct, _re, _s, _sa, _st, _uI, _uim, _vI, _vim, _x, _xA, _xF, _xN, _xNm, _xaa, _xaad, _xaapa, _xaari, _xaas, _xaba, _xabgr, _xabln, _xablt, _xabn, _xabole, _xabolt, _xabr, _xaca, _xacc, _xacc_, _xacc__, _xacm, _xacrsba, _xacs, _xacs_, _xacs__, _xacsim, _xacsims, _xacsinm, _xacsius, _xacsm, _xacsr, _xacssseca, _xacssseck, _xacssseckM, _xacsvi, _xact, _xact_, _xadm, _xae, _xaebo, _xafec, _xafem, _xafhCC, _xafhCD, _xafhCE, _xafhCL, _xafhCR, _xafhCT, _xafhE, _xafhE_, _xafhLM, _xafhar, _xafhxacc, _xafhxacc_, _xafhxacc__, _xafhxacs, _xafhxacs_, _xafhxadm, _xafhxae, _xafhxamm, _xafhxampc, _xafhxaollh, _xafhxaolm, _xafhxaolrud, _xafhxar, _xafhxarc, _xafhxars, _xafhxasc, _xafhxasse, _xafhxasseakki, _xafhxassebke, _xafhxasseca, _xafhxasseckM, _xafhxatc, _xafhxavi, _xafs, _xagfc, _xagr, _xagra, _xagw, _xagwa, _xaimit, _xaimlmt, _xaims, _xam, _xam_, _xamd, _xamm, _xamos, _xamp, _xampc, _xaoa, _xaollh, _xaolm, _xaolrud, _xaoo, _xaooa, _xaos, _xapnm, _xar, _xarc, _xarop, _xarp, _xarr, _xars, _xars_, _xarsim, _xarsims, _xarsinm, _xarsius, _xart, _xasc, _xasca, _xasdv, _xasebo, _xasse, _xasseakki, _xassebke, _xassec, _xasseca, _xasseck, _xasseckM, _xat, _xatc, _xatd, _xatdmos, _xavi, _xawob, _xawrl, _xs, n0, _s_registry, S3ServiceException$, n0_registry, AccessDenied$, BucketAlreadyExists$, BucketAlreadyOwnedByYou$, EncryptionTypeMismatch$, IdempotencyParameterMismatch$, InvalidObjectState$, InvalidRequest$, InvalidWriteOffset$, NoSuchBucket$, NoSuchKey$, NoSuchUpload$, NotFound$, ObjectAlreadyInActiveTierError$, ObjectNotInActiveTierError$, TooManyParts$, errorTypeRegistries, CopySourceSSECustomerKey, NonEmptyKmsKeyArnString, SessionCredentialValue, SSECustomerKey, SSEKMSEncryptionContext, SSEKMSKeyId, StreamingBlob, AbacStatus$, AbortIncompleteMultipartUpload$, AbortMultipartUploadOutput$, AbortMultipartUploadRequest$, AccelerateConfiguration$, AccessControlPolicy$, AccessControlTranslation$, AnalyticsAndOperator$, AnalyticsConfiguration$, AnalyticsExportDestination$, AnalyticsS3BucketDestination$, BlockedEncryptionTypes$, Bucket$, BucketInfo$, BucketLifecycleConfiguration$, BucketLoggingStatus$, Checksum$, CommonPrefix$, CompletedMultipartUpload$, CompletedPart$, CompleteMultipartUploadOutput$, CompleteMultipartUploadRequest$, Condition$, ContinuationEvent$, CopyObjectOutput$, CopyObjectRequest$, CopyObjectResult$, CopyPartResult$, CORSConfiguration$, CORSRule$, CreateBucketConfiguration$, CreateBucketMetadataConfigurationRequest$, CreateBucketMetadataTableConfigurationRequest$, CreateBucketOutput$, CreateBucketRequest$, CreateMultipartUploadOutput$, CreateMultipartUploadRequest$, CreateSessionOutput$, CreateSessionRequest$, CSVInput$, CSVOutput$, DefaultRetention$, Delete$, DeleteBucketAnalyticsConfigurationRequest$, DeleteBucketCorsRequest$, DeleteBucketEncryptionRequest$, DeleteBucketIntelligentTieringConfigurationRequest$, DeleteBucketInventoryConfigurationRequest$, DeleteBucketLifecycleRequest$, DeleteBucketMetadataConfigurationRequest$, DeleteBucketMetadataTableConfigurationRequest$, DeleteBucketMetricsConfigurationRequest$, DeleteBucketOwnershipControlsRequest$, DeleteBucketPolicyRequest$, DeleteBucketReplicationRequest$, DeleteBucketRequest$, DeleteBucketTaggingRequest$, DeleteBucketWebsiteRequest$, DeletedObject$, DeleteMarkerEntry$, DeleteMarkerReplication$, DeleteObjectOutput$, DeleteObjectRequest$, DeleteObjectsOutput$, DeleteObjectsRequest$, DeleteObjectTaggingOutput$, DeleteObjectTaggingRequest$, DeletePublicAccessBlockRequest$, Destination$, DestinationResult$, Encryption$, EncryptionConfiguration$, EndEvent$, _Error$, ErrorDetails$, ErrorDocument$, EventBridgeConfiguration$, ExistingObjectReplication$, FilterRule$, GetBucketAbacOutput$, GetBucketAbacRequest$, GetBucketAccelerateConfigurationOutput$, GetBucketAccelerateConfigurationRequest$, GetBucketAclOutput$, GetBucketAclRequest$, GetBucketAnalyticsConfigurationOutput$, GetBucketAnalyticsConfigurationRequest$, GetBucketCorsOutput$, GetBucketCorsRequest$, GetBucketEncryptionOutput$, GetBucketEncryptionRequest$, GetBucketIntelligentTieringConfigurationOutput$, GetBucketIntelligentTieringConfigurationRequest$, GetBucketInventoryConfigurationOutput$, GetBucketInventoryConfigurationRequest$, GetBucketLifecycleConfigurationOutput$, GetBucketLifecycleConfigurationRequest$, GetBucketLocationOutput$, GetBucketLocationRequest$, GetBucketLoggingOutput$, GetBucketLoggingRequest$, GetBucketMetadataConfigurationOutput$, GetBucketMetadataConfigurationRequest$, GetBucketMetadataConfigurationResult$, GetBucketMetadataTableConfigurationOutput$, GetBucketMetadataTableConfigurationRequest$, GetBucketMetadataTableConfigurationResult$, GetBucketMetricsConfigurationOutput$, GetBucketMetricsConfigurationRequest$, GetBucketNotificationConfigurationRequest$, GetBucketOwnershipControlsOutput$, GetBucketOwnershipControlsRequest$, GetBucketPolicyOutput$, GetBucketPolicyRequest$, GetBucketPolicyStatusOutput$, GetBucketPolicyStatusRequest$, GetBucketReplicationOutput$, GetBucketReplicationRequest$, GetBucketRequestPaymentOutput$, GetBucketRequestPaymentRequest$, GetBucketTaggingOutput$, GetBucketTaggingRequest$, GetBucketVersioningOutput$, GetBucketVersioningRequest$, GetBucketWebsiteOutput$, GetBucketWebsiteRequest$, GetObjectAclOutput$, GetObjectAclRequest$, GetObjectAttributesOutput$, GetObjectAttributesParts$, GetObjectAttributesRequest$, GetObjectLegalHoldOutput$, GetObjectLegalHoldRequest$, GetObjectLockConfigurationOutput$, GetObjectLockConfigurationRequest$, GetObjectOutput$, GetObjectRequest$, GetObjectRetentionOutput$, GetObjectRetentionRequest$, GetObjectTaggingOutput$, GetObjectTaggingRequest$, GetObjectTorrentOutput$, GetObjectTorrentRequest$, GetPublicAccessBlockOutput$, GetPublicAccessBlockRequest$, GlacierJobParameters$, Grant$, Grantee$, HeadBucketOutput$, HeadBucketRequest$, HeadObjectOutput$, HeadObjectRequest$, IndexDocument$, Initiator$, InputSerialization$, IntelligentTieringAndOperator$, IntelligentTieringConfiguration$, IntelligentTieringFilter$, InventoryConfiguration$, InventoryDestination$, InventoryEncryption$, InventoryFilter$, InventoryS3BucketDestination$, InventorySchedule$, InventoryTableConfiguration$, InventoryTableConfigurationResult$, InventoryTableConfigurationUpdates$, JournalTableConfiguration$, JournalTableConfigurationResult$, JournalTableConfigurationUpdates$, JSONInput$, JSONOutput$, LambdaFunctionConfiguration$, LifecycleExpiration$, LifecycleRule$, LifecycleRuleAndOperator$, LifecycleRuleFilter$, ListBucketAnalyticsConfigurationsOutput$, ListBucketAnalyticsConfigurationsRequest$, ListBucketIntelligentTieringConfigurationsOutput$, ListBucketIntelligentTieringConfigurationsRequest$, ListBucketInventoryConfigurationsOutput$, ListBucketInventoryConfigurationsRequest$, ListBucketMetricsConfigurationsOutput$, ListBucketMetricsConfigurationsRequest$, ListBucketsOutput$, ListBucketsRequest$, ListDirectoryBucketsOutput$, ListDirectoryBucketsRequest$, ListMultipartUploadsOutput$, ListMultipartUploadsRequest$, ListObjectsOutput$, ListObjectsRequest$, ListObjectsV2Output$, ListObjectsV2Request$, ListObjectVersionsOutput$, ListObjectVersionsRequest$, ListPartsOutput$, ListPartsRequest$, LocationInfo$, LoggingEnabled$, MetadataConfiguration$, MetadataConfigurationResult$, MetadataEntry$, MetadataTableConfiguration$, MetadataTableConfigurationResult$, MetadataTableEncryptionConfiguration$, Metrics$, MetricsAndOperator$, MetricsConfiguration$, MultipartUpload$, NoncurrentVersionExpiration$, NoncurrentVersionTransition$, NotificationConfiguration$, NotificationConfigurationFilter$, _Object$, ObjectIdentifier$, ObjectLockConfiguration$, ObjectLockLegalHold$, ObjectLockRetention$, ObjectLockRule$, ObjectPart$, ObjectVersion$, OutputLocation$, OutputSerialization$, Owner$, OwnershipControls$, OwnershipControlsRule$, ParquetInput$, Part$, PartitionedPrefix$, PolicyStatus$, Progress$, ProgressEvent$, PublicAccessBlockConfiguration$, PutBucketAbacRequest$, PutBucketAccelerateConfigurationRequest$, PutBucketAclRequest$, PutBucketAnalyticsConfigurationRequest$, PutBucketCorsRequest$, PutBucketEncryptionRequest$, PutBucketIntelligentTieringConfigurationRequest$, PutBucketInventoryConfigurationRequest$, PutBucketLifecycleConfigurationOutput$, PutBucketLifecycleConfigurationRequest$, PutBucketLoggingRequest$, PutBucketMetricsConfigurationRequest$, PutBucketNotificationConfigurationRequest$, PutBucketOwnershipControlsRequest$, PutBucketPolicyRequest$, PutBucketReplicationRequest$, PutBucketRequestPaymentRequest$, PutBucketTaggingRequest$, PutBucketVersioningRequest$, PutBucketWebsiteRequest$, PutObjectAclOutput$, PutObjectAclRequest$, PutObjectLegalHoldOutput$, PutObjectLegalHoldRequest$, PutObjectLockConfigurationOutput$, PutObjectLockConfigurationRequest$, PutObjectOutput$, PutObjectRequest$, PutObjectRetentionOutput$, PutObjectRetentionRequest$, PutObjectTaggingOutput$, PutObjectTaggingRequest$, PutPublicAccessBlockRequest$, QueueConfiguration$, RecordExpiration$, RecordsEvent$, Redirect$, RedirectAllRequestsTo$, RenameObjectOutput$, RenameObjectRequest$, ReplicaModifications$, ReplicationConfiguration$, ReplicationRule$, ReplicationRuleAndOperator$, ReplicationRuleFilter$, ReplicationTime$, ReplicationTimeValue$, RequestPaymentConfiguration$, RequestProgress$, RestoreObjectOutput$, RestoreObjectRequest$, RestoreRequest$, RestoreStatus$, RoutingRule$, S3KeyFilter$, S3Location$, S3TablesDestination$, S3TablesDestinationResult$, ScanRange$, SelectObjectContentOutput$, SelectObjectContentRequest$, SelectParameters$, ServerSideEncryptionByDefault$, ServerSideEncryptionConfiguration$, ServerSideEncryptionRule$, SessionCredentials$, SimplePrefix$, SourceSelectionCriteria$, SSEKMS$, SseKmsEncryptedObjects$, SSEKMSEncryption$, SSES3$, Stats$, StatsEvent$, StorageClassAnalysis$, StorageClassAnalysisDataExport$, Tag$, Tagging$, TargetGrant$, TargetObjectKeyFormat$, Tiering$, TopicConfiguration$, Transition$, UpdateBucketMetadataInventoryTableConfigurationRequest$, UpdateBucketMetadataJournalTableConfigurationRequest$, UpdateObjectEncryptionRequest$, UpdateObjectEncryptionResponse$, UploadPartCopyOutput$, UploadPartCopyRequest$, UploadPartOutput$, UploadPartRequest$, VersioningConfiguration$, WebsiteConfiguration$, WriteGetObjectResponseRequest$, __Unit, AllowedHeaders, AllowedMethods, AllowedOrigins, AnalyticsConfigurationList, Buckets, ChecksumAlgorithmList, CommonPrefixList, CompletedPartList, CORSRules, DeletedObjects, DeleteMarkers, EncryptionTypeList, Errors, EventList, ExposeHeaders, FilterRuleList, Grants, IntelligentTieringConfigurationList, InventoryConfigurationList, InventoryOptionalFields, LambdaFunctionConfigurationList, LifecycleRules, MetricsConfigurationList, MultipartUploadList, NoncurrentVersionTransitionList, ObjectAttributesList, ObjectIdentifierList, ObjectList, ObjectVersionList, OptionalObjectAttributesList, OwnershipControlsRules, Parts, PartsList, QueueConfigurationList, ReplicationRules, RoutingRules, ServerSideEncryptionRules, TagSet, TargetGrants, TieringList, TopicConfigurationList, TransitionList, UserMetadata, Metadata, AnalyticsFilter$, MetricsFilter$, ObjectEncryption$, SelectObjectContentEventStream$, AbortMultipartUpload$, CompleteMultipartUpload$, CopyObject$, CreateBucket$, CreateBucketMetadataConfiguration$, CreateBucketMetadataTableConfiguration$, CreateMultipartUpload$, CreateSession$, DeleteBucket$, DeleteBucketAnalyticsConfiguration$, DeleteBucketCors$, DeleteBucketEncryption$, DeleteBucketIntelligentTieringConfiguration$, DeleteBucketInventoryConfiguration$, DeleteBucketLifecycle$, DeleteBucketMetadataConfiguration$, DeleteBucketMetadataTableConfiguration$, DeleteBucketMetricsConfiguration$, DeleteBucketOwnershipControls$, DeleteBucketPolicy$, DeleteBucketReplication$, DeleteBucketTagging$, DeleteBucketWebsite$, DeleteObject$, DeleteObjects$, DeleteObjectTagging$, DeletePublicAccessBlock$, GetBucketAbac$, GetBucketAccelerateConfiguration$, GetBucketAcl$, GetBucketAnalyticsConfiguration$, GetBucketCors$, GetBucketEncryption$, GetBucketIntelligentTieringConfiguration$, GetBucketInventoryConfiguration$, GetBucketLifecycleConfiguration$, GetBucketLocation$, GetBucketLogging$, GetBucketMetadataConfiguration$, GetBucketMetadataTableConfiguration$, GetBucketMetricsConfiguration$, GetBucketNotificationConfiguration$, GetBucketOwnershipControls$, GetBucketPolicy$, GetBucketPolicyStatus$, GetBucketReplication$, GetBucketRequestPayment$, GetBucketTagging$, GetBucketVersioning$, GetBucketWebsite$, GetObject$, GetObjectAcl$, GetObjectAttributes$, GetObjectLegalHold$, GetObjectLockConfiguration$, GetObjectRetention$, GetObjectTagging$, GetObjectTorrent$, GetPublicAccessBlock$, HeadBucket$, HeadObject$, ListBucketAnalyticsConfigurations$, ListBucketIntelligentTieringConfigurations$, ListBucketInventoryConfigurations$, ListBucketMetricsConfigurations$, ListBuckets$, ListDirectoryBuckets$, ListMultipartUploads$, ListObjects$, ListObjectsV2$, ListObjectVersions$, ListParts$, PutBucketAbac$, PutBucketAccelerateConfiguration$, PutBucketAcl$, PutBucketAnalyticsConfiguration$, PutBucketCors$, PutBucketEncryption$, PutBucketIntelligentTieringConfiguration$, PutBucketInventoryConfiguration$, PutBucketLifecycleConfiguration$, PutBucketLogging$, PutBucketMetricsConfiguration$, PutBucketNotificationConfiguration$, PutBucketOwnershipControls$, PutBucketPolicy$, PutBucketReplication$, PutBucketRequestPayment$, PutBucketTagging$, PutBucketVersioning$, PutBucketWebsite$, PutObject$, PutObjectAcl$, PutObjectLegalHold$, PutObjectLockConfiguration$, PutObjectRetention$, PutObjectTagging$, PutPublicAccessBlock$, RenameObject$, RestoreObject$, SelectObjectContent$, UpdateBucketMetadataInventoryTableConfiguration$, UpdateBucketMetadataJournalTableConfiguration$, UpdateObjectEncryption$, UploadPart$, UploadPartCopy$, WriteGetObjectResponse$; +var init_schemas_0 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_errors3(); + init_S3ServiceException(); + _A = "Account"; + _AAO = "AnalyticsAndOperator"; + _AC = "AccelerateConfiguration"; + _ACL = "AccessControlList"; + _ACL_ = "ACL"; + _ACLn = "AnalyticsConfigurationList"; + _ACP = "AccessControlPolicy"; + _ACT = "AccessControlTranslation"; + _ACn = "AnalyticsConfiguration"; + _AD = "AccessDenied"; + _ADb = "AbortDate"; + _AED = "AnalyticsExportDestination"; + _AF = "AnalyticsFilter"; + _AH = "AllowedHeaders"; + _AHl = "AllowedHeader"; + _AI = "AccountId"; + _AIMU = "AbortIncompleteMultipartUpload"; + _AKI = "AccessKeyId"; + _AM = "AllowedMethods"; + _AMU = "AbortMultipartUpload"; + _AMUO = "AbortMultipartUploadOutput"; + _AMUR = "AbortMultipartUploadRequest"; + _AMl = "AllowedMethod"; + _AO = "AllowedOrigins"; + _AOl = "AllowedOrigin"; + _APA = "AccessPointAlias"; + _APAc = "AccessPointArn"; + _AQRD = "AllowQuotedRecordDelimiter"; + _AR = "AcceptRanges"; + _ARI = "AbortRuleId"; + _AS = "AbacStatus"; + _ASBD = "AnalyticsS3BucketDestination"; + _ASSEBD = "ApplyServerSideEncryptionByDefault"; + _ASr = "ArchiveStatus"; + _AT = "AccessTier"; + _An = "And"; + _B = "Bucket"; + _BA = "BucketArn"; + _BAE = "BucketAlreadyExists"; + _BAI = "BucketAccountId"; + _BAOBY = "BucketAlreadyOwnedByYou"; + _BET = "BlockedEncryptionTypes"; + _BGR = "BypassGovernanceRetention"; + _BI = "BucketInfo"; + _BKE = "BucketKeyEnabled"; + _BLC = "BucketLifecycleConfiguration"; + _BLN = "BucketLocationName"; + _BLS = "BucketLoggingStatus"; + _BLT = "BucketLocationType"; + _BN = "BucketNamespace"; + _BNu = "BucketName"; + _BP = "BytesProcessed"; + _BPA = "BlockPublicAcls"; + _BPP = "BlockPublicPolicy"; + _BR = "BucketRegion"; + _BRy = "BytesReturned"; + _BS = "BytesScanned"; + _Bo = "Body"; + _Bu = "Buckets"; + _C = "Checksum"; + _CA = "ChecksumAlgorithm"; + _CACL = "CannedACL"; + _CB = "CreateBucket"; + _CBC = "CreateBucketConfiguration"; + _CBMC = "CreateBucketMetadataConfiguration"; + _CBMCR = "CreateBucketMetadataConfigurationRequest"; + _CBMTC = "CreateBucketMetadataTableConfiguration"; + _CBMTCR = "CreateBucketMetadataTableConfigurationRequest"; + _CBO = "CreateBucketOutput"; + _CBR = "CreateBucketRequest"; + _CC = "CacheControl"; + _CCRC = "ChecksumCRC32"; + _CCRCC = "ChecksumCRC32C"; + _CCRCNVME = "ChecksumCRC64NVME"; + _CC_ = "Cache-Control"; + _CD = "CreationDate"; + _CD_ = "Content-Disposition"; + _CDo = "ContentDisposition"; + _CE = "ContinuationEvent"; + _CE_ = "Content-Encoding"; + _CEo = "ContentEncoding"; + _CF = "CloudFunction"; + _CFC = "CloudFunctionConfiguration"; + _CL = "ContentLanguage"; + _CL_ = "Content-Language"; + _CL__ = "Content-Length"; + _CLo = "ContentLength"; + _CM = "Content-MD5"; + _CMD = "ContentMD5"; + _CMU = "CompletedMultipartUpload"; + _CMUO = "CompleteMultipartUploadOutput"; + _CMUOr = "CreateMultipartUploadOutput"; + _CMUR = "CompleteMultipartUploadResult"; + _CMURo = "CompleteMultipartUploadRequest"; + _CMURr = "CreateMultipartUploadRequest"; + _CMUo = "CompleteMultipartUpload"; + _CMUr = "CreateMultipartUpload"; + _CMh = "ChecksumMode"; + _CO = "CopyObject"; + _COO = "CopyObjectOutput"; + _COR = "CopyObjectResult"; + _CORSC = "CORSConfiguration"; + _CORSR = "CORSRules"; + _CORSRu = "CORSRule"; + _CORo = "CopyObjectRequest"; + _CP = "CommonPrefix"; + _CPL = "CommonPrefixList"; + _CPLo = "CompletedPartList"; + _CPR = "CopyPartResult"; + _CPo = "CompletedPart"; + _CPom = "CommonPrefixes"; + _CR = "ContentRange"; + _CRSBA = "ConfirmRemoveSelfBucketAccess"; + _CR_ = "Content-Range"; + _CS = "CopySource"; + _CSHA = "ChecksumSHA1"; + _CSHAh = "ChecksumSHA256"; + _CSIM = "CopySourceIfMatch"; + _CSIMS = "CopySourceIfModifiedSince"; + _CSINM = "CopySourceIfNoneMatch"; + _CSIUS = "CopySourceIfUnmodifiedSince"; + _CSO = "CreateSessionOutput"; + _CSR = "CreateSessionResult"; + _CSRo = "CopySourceRange"; + _CSRr = "CreateSessionRequest"; + _CSSSECA = "CopySourceSSECustomerAlgorithm"; + _CSSSECK = "CopySourceSSECustomerKey"; + _CSSSECKMD = "CopySourceSSECustomerKeyMD5"; + _CSV = "CSV"; + _CSVI = "CopySourceVersionId"; + _CSVIn = "CSVInput"; + _CSVO = "CSVOutput"; + _CSo = "ConfigurationState"; + _CSr = "CreateSession"; + _CT = "ChecksumType"; + _CT_ = "Content-Type"; + _CTl = "ClientToken"; + _CTo = "ContentType"; + _CTom = "CompressionType"; + _CTon = "ContinuationToken"; + _Co = "Condition"; + _Cod = "Code"; + _Com = "Comments"; + _Con = "Contents"; + _Cont = "Cont"; + _Cr = "Credentials"; + _D = "Days"; + _DAI = "DaysAfterInitiation"; + _DB = "DeleteBucket"; + _DBAC = "DeleteBucketAnalyticsConfiguration"; + _DBACR = "DeleteBucketAnalyticsConfigurationRequest"; + _DBC = "DeleteBucketCors"; + _DBCR = "DeleteBucketCorsRequest"; + _DBE = "DeleteBucketEncryption"; + _DBER = "DeleteBucketEncryptionRequest"; + _DBIC = "DeleteBucketInventoryConfiguration"; + _DBICR = "DeleteBucketInventoryConfigurationRequest"; + _DBITC = "DeleteBucketIntelligentTieringConfiguration"; + _DBITCR = "DeleteBucketIntelligentTieringConfigurationRequest"; + _DBL = "DeleteBucketLifecycle"; + _DBLR = "DeleteBucketLifecycleRequest"; + _DBMC = "DeleteBucketMetadataConfiguration"; + _DBMCR = "DeleteBucketMetadataConfigurationRequest"; + _DBMCRe = "DeleteBucketMetricsConfigurationRequest"; + _DBMCe = "DeleteBucketMetricsConfiguration"; + _DBMTC = "DeleteBucketMetadataTableConfiguration"; + _DBMTCR = "DeleteBucketMetadataTableConfigurationRequest"; + _DBOC = "DeleteBucketOwnershipControls"; + _DBOCR = "DeleteBucketOwnershipControlsRequest"; + _DBP = "DeleteBucketPolicy"; + _DBPR = "DeleteBucketPolicyRequest"; + _DBR = "DeleteBucketRequest"; + _DBRR = "DeleteBucketReplicationRequest"; + _DBRe = "DeleteBucketReplication"; + _DBT = "DeleteBucketTagging"; + _DBTR = "DeleteBucketTaggingRequest"; + _DBW = "DeleteBucketWebsite"; + _DBWR = "DeleteBucketWebsiteRequest"; + _DE = "DataExport"; + _DIM = "DestinationIfMatch"; + _DIMS = "DestinationIfModifiedSince"; + _DINM = "DestinationIfNoneMatch"; + _DIUS = "DestinationIfUnmodifiedSince"; + _DM = "DeleteMarker"; + _DME = "DeleteMarkerEntry"; + _DMR = "DeleteMarkerReplication"; + _DMVI = "DeleteMarkerVersionId"; + _DMe = "DeleteMarkers"; + _DN = "DisplayName"; + _DO = "DeletedObject"; + _DOO = "DeleteObjectOutput"; + _DOOe = "DeleteObjectsOutput"; + _DOR = "DeleteObjectRequest"; + _DORe = "DeleteObjectsRequest"; + _DOT = "DeleteObjectTagging"; + _DOTO = "DeleteObjectTaggingOutput"; + _DOTR = "DeleteObjectTaggingRequest"; + _DOe = "DeletedObjects"; + _DOel = "DeleteObject"; + _DOele = "DeleteObjects"; + _DPAB = "DeletePublicAccessBlock"; + _DPABR = "DeletePublicAccessBlockRequest"; + _DR = "DataRedundancy"; + _DRe = "DefaultRetention"; + _DRel = "DeleteResult"; + _DRes = "DestinationResult"; + _Da = "Date"; + _De = "Delete"; + _Del = "Deleted"; + _Deli = "Delimiter"; + _Des = "Destination"; + _Desc = "Description"; + _Det = "Details"; + _E = "Expiration"; + _EA = "EmailAddress"; + _EBC = "EventBridgeConfiguration"; + _EBO = "ExpectedBucketOwner"; + _EC = "EncryptionConfiguration"; + _ECr = "ErrorCode"; + _ED = "ErrorDetails"; + _EDr = "ErrorDocument"; + _EE = "EndEvent"; + _EH = "ExposeHeaders"; + _EHx = "ExposeHeader"; + _EM = "ErrorMessage"; + _EODM = "ExpiredObjectDeleteMarker"; + _EOR = "ExistingObjectReplication"; + _ES = "ExpiresString"; + _ESBO = "ExpectedSourceBucketOwner"; + _ET = "EncryptionType"; + _ETL = "EncryptionTypeList"; + _ETM = "EncryptionTypeMismatch"; + _ETa = "ETag"; + _ETn = "EncodingType"; + _ETv = "EventThreshold"; + _ETx = "ExpressionType"; + _En = "Encryption"; + _Ena = "Enabled"; + _End = "End"; + _Er = "Errors"; + _Err = "Error"; + _Ev = "Events"; + _Eve = "Event"; + _Ex = "Expires"; + _Exp = "Expression"; + _F = "Filter"; + _FD = "FieldDelimiter"; + _FHI = "FileHeaderInfo"; + _FO = "FetchOwner"; + _FR = "FilterRule"; + _FRL = "FilterRuleList"; + _FRi = "FilterRules"; + _Fi = "Field"; + _Fo = "Format"; + _Fr = "Frequency"; + _G = "Grants"; + _GBA = "GetBucketAbac"; + _GBAC = "GetBucketAccelerateConfiguration"; + _GBACO = "GetBucketAccelerateConfigurationOutput"; + _GBACOe = "GetBucketAnalyticsConfigurationOutput"; + _GBACR = "GetBucketAccelerateConfigurationRequest"; + _GBACRe = "GetBucketAnalyticsConfigurationRequest"; + _GBACe = "GetBucketAnalyticsConfiguration"; + _GBAO = "GetBucketAbacOutput"; + _GBAOe = "GetBucketAclOutput"; + _GBAR = "GetBucketAbacRequest"; + _GBARe = "GetBucketAclRequest"; + _GBAe = "GetBucketAcl"; + _GBC = "GetBucketCors"; + _GBCO = "GetBucketCorsOutput"; + _GBCR = "GetBucketCorsRequest"; + _GBE = "GetBucketEncryption"; + _GBEO = "GetBucketEncryptionOutput"; + _GBER = "GetBucketEncryptionRequest"; + _GBIC = "GetBucketInventoryConfiguration"; + _GBICO = "GetBucketInventoryConfigurationOutput"; + _GBICR = "GetBucketInventoryConfigurationRequest"; + _GBITC = "GetBucketIntelligentTieringConfiguration"; + _GBITCO = "GetBucketIntelligentTieringConfigurationOutput"; + _GBITCR = "GetBucketIntelligentTieringConfigurationRequest"; + _GBL = "GetBucketLocation"; + _GBLC = "GetBucketLifecycleConfiguration"; + _GBLCO = "GetBucketLifecycleConfigurationOutput"; + _GBLCR = "GetBucketLifecycleConfigurationRequest"; + _GBLO = "GetBucketLocationOutput"; + _GBLOe = "GetBucketLoggingOutput"; + _GBLR = "GetBucketLocationRequest"; + _GBLRe = "GetBucketLoggingRequest"; + _GBLe = "GetBucketLogging"; + _GBMC = "GetBucketMetadataConfiguration"; + _GBMCO = "GetBucketMetadataConfigurationOutput"; + _GBMCOe = "GetBucketMetricsConfigurationOutput"; + _GBMCR = "GetBucketMetadataConfigurationResult"; + _GBMCRe = "GetBucketMetadataConfigurationRequest"; + _GBMCRet = "GetBucketMetricsConfigurationRequest"; + _GBMCe = "GetBucketMetricsConfiguration"; + _GBMTC = "GetBucketMetadataTableConfiguration"; + _GBMTCO = "GetBucketMetadataTableConfigurationOutput"; + _GBMTCR = "GetBucketMetadataTableConfigurationResult"; + _GBMTCRe = "GetBucketMetadataTableConfigurationRequest"; + _GBNC = "GetBucketNotificationConfiguration"; + _GBNCR = "GetBucketNotificationConfigurationRequest"; + _GBOC = "GetBucketOwnershipControls"; + _GBOCO = "GetBucketOwnershipControlsOutput"; + _GBOCR = "GetBucketOwnershipControlsRequest"; + _GBP = "GetBucketPolicy"; + _GBPO = "GetBucketPolicyOutput"; + _GBPR = "GetBucketPolicyRequest"; + _GBPS = "GetBucketPolicyStatus"; + _GBPSO = "GetBucketPolicyStatusOutput"; + _GBPSR = "GetBucketPolicyStatusRequest"; + _GBR = "GetBucketReplication"; + _GBRO = "GetBucketReplicationOutput"; + _GBRP = "GetBucketRequestPayment"; + _GBRPO = "GetBucketRequestPaymentOutput"; + _GBRPR = "GetBucketRequestPaymentRequest"; + _GBRR = "GetBucketReplicationRequest"; + _GBT = "GetBucketTagging"; + _GBTO = "GetBucketTaggingOutput"; + _GBTR = "GetBucketTaggingRequest"; + _GBV = "GetBucketVersioning"; + _GBVO = "GetBucketVersioningOutput"; + _GBVR = "GetBucketVersioningRequest"; + _GBW = "GetBucketWebsite"; + _GBWO = "GetBucketWebsiteOutput"; + _GBWR = "GetBucketWebsiteRequest"; + _GFC = "GrantFullControl"; + _GJP = "GlacierJobParameters"; + _GO = "GetObject"; + _GOA = "GetObjectAcl"; + _GOAO = "GetObjectAclOutput"; + _GOAOe = "GetObjectAttributesOutput"; + _GOAP = "GetObjectAttributesParts"; + _GOAR = "GetObjectAclRequest"; + _GOARe = "GetObjectAttributesResponse"; + _GOARet = "GetObjectAttributesRequest"; + _GOAe = "GetObjectAttributes"; + _GOLC = "GetObjectLockConfiguration"; + _GOLCO = "GetObjectLockConfigurationOutput"; + _GOLCR = "GetObjectLockConfigurationRequest"; + _GOLH = "GetObjectLegalHold"; + _GOLHO = "GetObjectLegalHoldOutput"; + _GOLHR = "GetObjectLegalHoldRequest"; + _GOO = "GetObjectOutput"; + _GOR = "GetObjectRequest"; + _GORO = "GetObjectRetentionOutput"; + _GORR = "GetObjectRetentionRequest"; + _GORe = "GetObjectRetention"; + _GOT = "GetObjectTagging"; + _GOTO = "GetObjectTaggingOutput"; + _GOTOe = "GetObjectTorrentOutput"; + _GOTR = "GetObjectTaggingRequest"; + _GOTRe = "GetObjectTorrentRequest"; + _GOTe = "GetObjectTorrent"; + _GPAB = "GetPublicAccessBlock"; + _GPABO = "GetPublicAccessBlockOutput"; + _GPABR = "GetPublicAccessBlockRequest"; + _GR = "GrantRead"; + _GRACP = "GrantReadACP"; + _GW = "GrantWrite"; + _GWACP = "GrantWriteACP"; + _Gr = "Grant"; + _Gra = "Grantee"; + _HB = "HeadBucket"; + _HBO = "HeadBucketOutput"; + _HBR = "HeadBucketRequest"; + _HECRE = "HttpErrorCodeReturnedEquals"; + _HN = "HostName"; + _HO = "HeadObject"; + _HOO = "HeadObjectOutput"; + _HOR = "HeadObjectRequest"; + _HRC = "HttpRedirectCode"; + _I = "Id"; + _IC = "InventoryConfiguration"; + _ICL = "InventoryConfigurationList"; + _ID = "ID"; + _IDn = "IndexDocument"; + _IDnv = "InventoryDestination"; + _IE = "IsEnabled"; + _IEn = "InventoryEncryption"; + _IF = "InventoryFilter"; + _IL = "IsLatest"; + _IM = "IfMatch"; + _IMIT = "IfMatchInitiatedTime"; + _IMLMT = "IfMatchLastModifiedTime"; + _IMS = "IfMatchSize"; + _IMS_ = "If-Modified-Since"; + _IMSf = "IfModifiedSince"; + _IMUR = "InitiateMultipartUploadResult"; + _IM_ = "If-Match"; + _INM = "IfNoneMatch"; + _INM_ = "If-None-Match"; + _IOF = "InventoryOptionalFields"; + _IOS = "InvalidObjectState"; + _IOV = "IncludedObjectVersions"; + _IP = "IsPublic"; + _IPA = "IgnorePublicAcls"; + _IPM = "IdempotencyParameterMismatch"; + _IR = "InvalidRequest"; + _IRIP = "IsRestoreInProgress"; + _IS = "InputSerialization"; + _ISBD = "InventoryS3BucketDestination"; + _ISn = "InventorySchedule"; + _IT = "IsTruncated"; + _ITAO = "IntelligentTieringAndOperator"; + _ITC = "IntelligentTieringConfiguration"; + _ITCL = "IntelligentTieringConfigurationList"; + _ITCR = "InventoryTableConfigurationResult"; + _ITCU = "InventoryTableConfigurationUpdates"; + _ITCn = "InventoryTableConfiguration"; + _ITF = "IntelligentTieringFilter"; + _IUS = "IfUnmodifiedSince"; + _IUS_ = "If-Unmodified-Since"; + _IWO = "InvalidWriteOffset"; + _In = "Initiator"; + _Ini = "Initiated"; + _JSON = "JSON"; + _JSONI = "JSONInput"; + _JSONO = "JSONOutput"; + _JTC = "JournalTableConfiguration"; + _JTCR = "JournalTableConfigurationResult"; + _JTCU = "JournalTableConfigurationUpdates"; + _K = "Key"; + _KC = "KeyCount"; + _KI = "KeyId"; + _KKA = "KmsKeyArn"; + _KM = "KeyMarker"; + _KMSC = "KMSContext"; + _KMSKA = "KMSKeyArn"; + _KMSKI = "KMSKeyId"; + _KMSMKID = "KMSMasterKeyID"; + _KPE = "KeyPrefixEquals"; + _L = "Location"; + _LAMBR = "ListAllMyBucketsResult"; + _LAMDBR = "ListAllMyDirectoryBucketsResult"; + _LB = "ListBuckets"; + _LBAC = "ListBucketAnalyticsConfigurations"; + _LBACO = "ListBucketAnalyticsConfigurationsOutput"; + _LBACR = "ListBucketAnalyticsConfigurationResult"; + _LBACRi = "ListBucketAnalyticsConfigurationsRequest"; + _LBIC = "ListBucketInventoryConfigurations"; + _LBICO = "ListBucketInventoryConfigurationsOutput"; + _LBICR = "ListBucketInventoryConfigurationsRequest"; + _LBITC = "ListBucketIntelligentTieringConfigurations"; + _LBITCO = "ListBucketIntelligentTieringConfigurationsOutput"; + _LBITCR = "ListBucketIntelligentTieringConfigurationsRequest"; + _LBMC = "ListBucketMetricsConfigurations"; + _LBMCO = "ListBucketMetricsConfigurationsOutput"; + _LBMCR = "ListBucketMetricsConfigurationsRequest"; + _LBO = "ListBucketsOutput"; + _LBR = "ListBucketsRequest"; + _LBRi = "ListBucketResult"; + _LC = "LocationConstraint"; + _LCi = "LifecycleConfiguration"; + _LDB = "ListDirectoryBuckets"; + _LDBO = "ListDirectoryBucketsOutput"; + _LDBR = "ListDirectoryBucketsRequest"; + _LE = "LoggingEnabled"; + _LEi = "LifecycleExpiration"; + _LFA = "LambdaFunctionArn"; + _LFC = "LambdaFunctionConfiguration"; + _LFCL = "LambdaFunctionConfigurationList"; + _LFCa = "LambdaFunctionConfigurations"; + _LH = "LegalHold"; + _LI = "LocationInfo"; + _LICR = "ListInventoryConfigurationsResult"; + _LM = "LastModified"; + _LMCR = "ListMetricsConfigurationsResult"; + _LMT = "LastModifiedTime"; + _LMU = "ListMultipartUploads"; + _LMUO = "ListMultipartUploadsOutput"; + _LMUR = "ListMultipartUploadsResult"; + _LMURi = "ListMultipartUploadsRequest"; + _LM_ = "Last-Modified"; + _LO = "ListObjects"; + _LOO = "ListObjectsOutput"; + _LOR = "ListObjectsRequest"; + _LOV = "ListObjectsV2"; + _LOVO = "ListObjectsV2Output"; + _LOVOi = "ListObjectVersionsOutput"; + _LOVR = "ListObjectsV2Request"; + _LOVRi = "ListObjectVersionsRequest"; + _LOVi = "ListObjectVersions"; + _LP = "ListParts"; + _LPO = "ListPartsOutput"; + _LPR = "ListPartsResult"; + _LPRi = "ListPartsRequest"; + _LR = "LifecycleRule"; + _LRAO = "LifecycleRuleAndOperator"; + _LRF = "LifecycleRuleFilter"; + _LRi = "LifecycleRules"; + _LVR = "ListVersionsResult"; + _M = "Metadata"; + _MAO = "MetricsAndOperator"; + _MAS = "MaxAgeSeconds"; + _MB = "MaxBuckets"; + _MC = "MetadataConfiguration"; + _MCL = "MetricsConfigurationList"; + _MCR = "MetadataConfigurationResult"; + _MCe = "MetricsConfiguration"; + _MD = "MetadataDirective"; + _MDB = "MaxDirectoryBuckets"; + _MDf = "MfaDelete"; + _ME = "MetadataEntry"; + _MF = "MetricsFilter"; + _MFA = "MFA"; + _MFAD = "MFADelete"; + _MK = "MaxKeys"; + _MM = "MissingMeta"; + _MOS = "MpuObjectSize"; + _MP = "MaxParts"; + _MTC = "MetadataTableConfiguration"; + _MTCR = "MetadataTableConfigurationResult"; + _MTEC = "MetadataTableEncryptionConfiguration"; + _MU = "MultipartUpload"; + _MUL = "MultipartUploadList"; + _MUa = "MaxUploads"; + _Ma = "Marker"; + _Me = "Metrics"; + _Mes = "Message"; + _Mi = "Minutes"; + _Mo = "Mode"; + _N = "Name"; + _NC = "NotificationConfiguration"; + _NCF = "NotificationConfigurationFilter"; + _NCT = "NextContinuationToken"; + _ND = "NoncurrentDays"; + _NEKKAS = "NonEmptyKmsKeyArnString"; + _NF = "NotFound"; + _NKM = "NextKeyMarker"; + _NM = "NextMarker"; + _NNV = "NewerNoncurrentVersions"; + _NPNM = "NextPartNumberMarker"; + _NSB = "NoSuchBucket"; + _NSK = "NoSuchKey"; + _NSU = "NoSuchUpload"; + _NUIM = "NextUploadIdMarker"; + _NVE = "NoncurrentVersionExpiration"; + _NVIM = "NextVersionIdMarker"; + _NVT = "NoncurrentVersionTransitions"; + _NVTL = "NoncurrentVersionTransitionList"; + _NVTo = "NoncurrentVersionTransition"; + _O = "Owner"; + _OA = "ObjectAttributes"; + _OAIATE = "ObjectAlreadyInActiveTierError"; + _OC = "OwnershipControls"; + _OCR = "OwnershipControlsRule"; + _OCRw = "OwnershipControlsRules"; + _OE = "ObjectEncryption"; + _OF = "OptionalFields"; + _OI = "ObjectIdentifier"; + _OIL = "ObjectIdentifierList"; + _OL = "OutputLocation"; + _OLC = "ObjectLockConfiguration"; + _OLE = "ObjectLockEnabled"; + _OLEFB = "ObjectLockEnabledForBucket"; + _OLLH = "ObjectLockLegalHold"; + _OLLHS = "ObjectLockLegalHoldStatus"; + _OLM = "ObjectLockMode"; + _OLR = "ObjectLockRetention"; + _OLRUD = "ObjectLockRetainUntilDate"; + _OLRb = "ObjectLockRule"; + _OLb = "ObjectList"; + _ONIATE = "ObjectNotInActiveTierError"; + _OO = "ObjectOwnership"; + _OOA = "OptionalObjectAttributes"; + _OP = "ObjectParts"; + _OPb = "ObjectPart"; + _OS = "ObjectSize"; + _OSGT = "ObjectSizeGreaterThan"; + _OSLT = "ObjectSizeLessThan"; + _OSV = "OutputSchemaVersion"; + _OSu = "OutputSerialization"; + _OV = "ObjectVersion"; + _OVL = "ObjectVersionList"; + _Ob = "Objects"; + _Obj = "Object"; + _P = "Prefix"; + _PABC = "PublicAccessBlockConfiguration"; + _PBA = "PutBucketAbac"; + _PBAC = "PutBucketAccelerateConfiguration"; + _PBACR = "PutBucketAccelerateConfigurationRequest"; + _PBACRu = "PutBucketAnalyticsConfigurationRequest"; + _PBACu = "PutBucketAnalyticsConfiguration"; + _PBAR = "PutBucketAbacRequest"; + _PBARu = "PutBucketAclRequest"; + _PBAu = "PutBucketAcl"; + _PBC = "PutBucketCors"; + _PBCR = "PutBucketCorsRequest"; + _PBE = "PutBucketEncryption"; + _PBER = "PutBucketEncryptionRequest"; + _PBIC = "PutBucketInventoryConfiguration"; + _PBICR = "PutBucketInventoryConfigurationRequest"; + _PBITC = "PutBucketIntelligentTieringConfiguration"; + _PBITCR = "PutBucketIntelligentTieringConfigurationRequest"; + _PBL = "PutBucketLogging"; + _PBLC = "PutBucketLifecycleConfiguration"; + _PBLCO = "PutBucketLifecycleConfigurationOutput"; + _PBLCR = "PutBucketLifecycleConfigurationRequest"; + _PBLR = "PutBucketLoggingRequest"; + _PBMC = "PutBucketMetricsConfiguration"; + _PBMCR = "PutBucketMetricsConfigurationRequest"; + _PBNC = "PutBucketNotificationConfiguration"; + _PBNCR = "PutBucketNotificationConfigurationRequest"; + _PBOC = "PutBucketOwnershipControls"; + _PBOCR = "PutBucketOwnershipControlsRequest"; + _PBP = "PutBucketPolicy"; + _PBPR = "PutBucketPolicyRequest"; + _PBR = "PutBucketReplication"; + _PBRP = "PutBucketRequestPayment"; + _PBRPR = "PutBucketRequestPaymentRequest"; + _PBRR = "PutBucketReplicationRequest"; + _PBT = "PutBucketTagging"; + _PBTR = "PutBucketTaggingRequest"; + _PBV = "PutBucketVersioning"; + _PBVR = "PutBucketVersioningRequest"; + _PBW = "PutBucketWebsite"; + _PBWR = "PutBucketWebsiteRequest"; + _PC = "PartsCount"; + _PDS = "PartitionDateSource"; + _PE = "ProgressEvent"; + _PI = "ParquetInput"; + _PL = "PartsList"; + _PN = "PartNumber"; + _PNM = "PartNumberMarker"; + _PO = "PutObject"; + _POA = "PutObjectAcl"; + _POAO = "PutObjectAclOutput"; + _POAR = "PutObjectAclRequest"; + _POLC = "PutObjectLockConfiguration"; + _POLCO = "PutObjectLockConfigurationOutput"; + _POLCR = "PutObjectLockConfigurationRequest"; + _POLH = "PutObjectLegalHold"; + _POLHO = "PutObjectLegalHoldOutput"; + _POLHR = "PutObjectLegalHoldRequest"; + _POO = "PutObjectOutput"; + _POR = "PutObjectRequest"; + _PORO = "PutObjectRetentionOutput"; + _PORR = "PutObjectRetentionRequest"; + _PORu = "PutObjectRetention"; + _POT = "PutObjectTagging"; + _POTO = "PutObjectTaggingOutput"; + _POTR = "PutObjectTaggingRequest"; + _PP = "PartitionedPrefix"; + _PPAB = "PutPublicAccessBlock"; + _PPABR = "PutPublicAccessBlockRequest"; + _PS = "PolicyStatus"; + _Pa = "Parts"; + _Par = "Part"; + _Parq = "Parquet"; + _Pay = "Payer"; + _Payl = "Payload"; + _Pe = "Permission"; + _Po = "Policy"; + _Pr = "Progress"; + _Pri = "Priority"; + _Pro = "Protocol"; + _Q = "Quiet"; + _QA = "QueueArn"; + _QC = "QuoteCharacter"; + _QCL = "QueueConfigurationList"; + _QCu = "QueueConfigurations"; + _QCue = "QueueConfiguration"; + _QEC = "QuoteEscapeCharacter"; + _QF = "QuoteFields"; + _Qu = "Queue"; + _R = "Rules"; + _RART = "RedirectAllRequestsTo"; + _RC = "RequestCharged"; + _RCC = "ResponseCacheControl"; + _RCD = "ResponseContentDisposition"; + _RCE = "ResponseContentEncoding"; + _RCL = "ResponseContentLanguage"; + _RCT = "ResponseContentType"; + _RCe = "ReplicationConfiguration"; + _RD = "RecordDelimiter"; + _RE = "ResponseExpires"; + _RED = "RestoreExpiryDate"; + _REe = "RecordExpiration"; + _REec = "RecordsEvent"; + _RKKID = "ReplicaKmsKeyID"; + _RKPW = "ReplaceKeyPrefixWith"; + _RKW = "ReplaceKeyWith"; + _RM = "ReplicaModifications"; + _RO = "RenameObject"; + _ROO = "RenameObjectOutput"; + _ROOe = "RestoreObjectOutput"; + _ROP = "RestoreOutputPath"; + _ROR = "RenameObjectRequest"; + _RORe = "RestoreObjectRequest"; + _ROe = "RestoreObject"; + _RP = "RequestPayer"; + _RPB = "RestrictPublicBuckets"; + _RPC = "RequestPaymentConfiguration"; + _RPe = "RequestProgress"; + _RR = "RoutingRules"; + _RRAO = "ReplicationRuleAndOperator"; + _RRF = "ReplicationRuleFilter"; + _RRe = "ReplicationRule"; + _RRep = "ReplicationRules"; + _RReq = "RequestRoute"; + _RRes = "RestoreRequest"; + _RRo = "RoutingRule"; + _RS = "ReplicationStatus"; + _RSe = "RestoreStatus"; + _RSen = "RenameSource"; + _RT = "ReplicationTime"; + _RTV = "ReplicationTimeValue"; + _RTe = "RequestToken"; + _RUD = "RetainUntilDate"; + _Ra = "Range"; + _Re = "Restore"; + _Rec = "Records"; + _Red = "Redirect"; + _Ret = "Retention"; + _Ro = "Role"; + _Ru = "Rule"; + _S = "Status"; + _SA = "StartAfter"; + _SAK = "SecretAccessKey"; + _SAs = "SseAlgorithm"; + _SB = "StreamingBlob"; + _SBD = "S3BucketDestination"; + _SC = "StorageClass"; + _SCA = "StorageClassAnalysis"; + _SCADE = "StorageClassAnalysisDataExport"; + _SCV = "SessionCredentialValue"; + _SCe = "SessionCredentials"; + _SCt = "StatusCode"; + _SDV = "SkipDestinationValidation"; + _SE = "StatsEvent"; + _SIM = "SourceIfMatch"; + _SIMS = "SourceIfModifiedSince"; + _SINM = "SourceIfNoneMatch"; + _SIUS = "SourceIfUnmodifiedSince"; + _SK = "SSE-KMS"; + _SKEO = "SseKmsEncryptedObjects"; + _SKF = "S3KeyFilter"; + _SKe = "S3Key"; + _SL = "S3Location"; + _SM = "SessionMode"; + _SOC = "SelectObjectContent"; + _SOCES = "SelectObjectContentEventStream"; + _SOCO = "SelectObjectContentOutput"; + _SOCR = "SelectObjectContentRequest"; + _SP = "SelectParameters"; + _SPi = "SimplePrefix"; + _SR = "ScanRange"; + _SS = "SSE-S3"; + _SSC = "SourceSelectionCriteria"; + _SSE = "ServerSideEncryption"; + _SSEA = "SSEAlgorithm"; + _SSEBD = "ServerSideEncryptionByDefault"; + _SSEC = "ServerSideEncryptionConfiguration"; + _SSECA = "SSECustomerAlgorithm"; + _SSECK = "SSECustomerKey"; + _SSECKMD = "SSECustomerKeyMD5"; + _SSEKMS = "SSEKMS"; + _SSEKMSE = "SSEKMSEncryption"; + _SSEKMSEC = "SSEKMSEncryptionContext"; + _SSEKMSKI = "SSEKMSKeyId"; + _SSER = "ServerSideEncryptionRule"; + _SSERe = "ServerSideEncryptionRules"; + _SSES = "SSES3"; + _ST = "SessionToken"; + _STD = "S3TablesDestination"; + _STDR = "S3TablesDestinationResult"; + _S_ = "S3"; + _Sc = "Schedule"; + _Si = "Size"; + _St = "Start"; + _Sta = "Stats"; + _Su = "Suffix"; + _T = "Tags"; + _TA = "TableArn"; + _TAo = "TopicArn"; + _TB = "TargetBucket"; + _TBA = "TableBucketArn"; + _TBT = "TableBucketType"; + _TC = "TagCount"; + _TCL = "TopicConfigurationList"; + _TCo = "TopicConfigurations"; + _TCop = "TopicConfiguration"; + _TD = "TaggingDirective"; + _TDMOS = "TransitionDefaultMinimumObjectSize"; + _TG = "TargetGrants"; + _TGa = "TargetGrant"; + _TL = "TieringList"; + _TLr = "TransitionList"; + _TMP = "TooManyParts"; + _TN = "TableNamespace"; + _TNa = "TableName"; + _TOKF = "TargetObjectKeyFormat"; + _TP = "TargetPrefix"; + _TPC = "TotalPartsCount"; + _TS = "TagSet"; + _TSa = "TableStatus"; + _Ta = "Tag"; + _Tag = "Tagging"; + _Ti = "Tier"; + _Tie = "Tierings"; + _Tier = "Tiering"; + _Tim = "Time"; + _To = "Token"; + _Top = "Topic"; + _Tr = "Transitions"; + _Tra = "Transition"; + _Ty = "Type"; + _U = "Uploads"; + _UBMITC = "UpdateBucketMetadataInventoryTableConfiguration"; + _UBMITCR = "UpdateBucketMetadataInventoryTableConfigurationRequest"; + _UBMJTC = "UpdateBucketMetadataJournalTableConfiguration"; + _UBMJTCR = "UpdateBucketMetadataJournalTableConfigurationRequest"; + _UI = "UploadId"; + _UIM = "UploadIdMarker"; + _UM = "UserMetadata"; + _UOE = "UpdateObjectEncryption"; + _UOER = "UpdateObjectEncryptionRequest"; + _UOERp = "UpdateObjectEncryptionResponse"; + _UP = "UploadPart"; + _UPC = "UploadPartCopy"; + _UPCO = "UploadPartCopyOutput"; + _UPCR = "UploadPartCopyRequest"; + _UPO = "UploadPartOutput"; + _UPR = "UploadPartRequest"; + _URI = "URI"; + _Up = "Upload"; + _V = "Value"; + _VC = "VersioningConfiguration"; + _VI = "VersionId"; + _VIM = "VersionIdMarker"; + _Ve = "Versions"; + _Ver = "Version"; + _WC = "WebsiteConfiguration"; + _WGOR = "WriteGetObjectResponse"; + _WGORR = "WriteGetObjectResponseRequest"; + _WOB = "WriteOffsetBytes"; + _WRL = "WebsiteRedirectLocation"; + _Y = "Years"; + _ar = "accept-ranges"; + _br = "bucket-region"; + _c = "client"; + _ct = "continuation-token"; + _d = "delimiter"; + _e = "error"; + _eP = "eventPayload"; + _en = "endpoint"; + _et = "encoding-type"; + _fo = "fetch-owner"; + _h = "http"; + _hC = "httpChecksum"; + _hE = "httpError"; + _hH = "httpHeader"; + _hL = "hostLabel"; + _hP = "httpPayload"; + _hPH = "httpPrefixHeaders"; + _hQ = "httpQuery"; + _hi = "http://www.w3.org/2001/XMLSchema-instance"; + _i = "id"; + _iT = "idempotencyToken"; + _km = "key-marker"; + _m = "marker"; + _mb = "max-buckets"; + _mdb = "max-directory-buckets"; + _mk = "max-keys"; + _mp = "max-parts"; + _mu = "max-uploads"; + _p = "prefix"; + _pN = "partNumber"; + _pnm = "part-number-marker"; + _rcc = "response-cache-control"; + _rcd = "response-content-disposition"; + _rce = "response-content-encoding"; + _rcl = "response-content-language"; + _rct = "response-content-type"; + _re = "response-expires"; + _s = "smithy.ts.sdk.synthetic.com.amazonaws.s3"; + _sa = "start-after"; + _st = "streaming"; + _uI = "uploadId"; + _uim = "upload-id-marker"; + _vI = "versionId"; + _vim = "version-id-marker"; + _x = "xsi"; + _xA = "xmlAttribute"; + _xF = "xmlFlattened"; + _xN = "xmlName"; + _xNm = "xmlNamespace"; + _xaa = "x-amz-acl"; + _xaad = "x-amz-abort-date"; + _xaapa = "x-amz-access-point-alias"; + _xaari = "x-amz-abort-rule-id"; + _xaas = "x-amz-archive-status"; + _xaba = "x-amz-bucket-arn"; + _xabgr = "x-amz-bypass-governance-retention"; + _xabln = "x-amz-bucket-location-name"; + _xablt = "x-amz-bucket-location-type"; + _xabn = "x-amz-bucket-namespace"; + _xabole = "x-amz-bucket-object-lock-enabled"; + _xabolt = "x-amz-bucket-object-lock-token"; + _xabr = "x-amz-bucket-region"; + _xaca = "x-amz-checksum-algorithm"; + _xacc = "x-amz-checksum-crc32"; + _xacc_ = "x-amz-checksum-crc32c"; + _xacc__ = "x-amz-checksum-crc64nvme"; + _xacm = "x-amz-checksum-mode"; + _xacrsba = "x-amz-confirm-remove-self-bucket-access"; + _xacs = "x-amz-checksum-sha1"; + _xacs_ = "x-amz-checksum-sha256"; + _xacs__ = "x-amz-copy-source"; + _xacsim = "x-amz-copy-source-if-match"; + _xacsims = "x-amz-copy-source-if-modified-since"; + _xacsinm = "x-amz-copy-source-if-none-match"; + _xacsius = "x-amz-copy-source-if-unmodified-since"; + _xacsm = "x-amz-create-session-mode"; + _xacsr = "x-amz-copy-source-range"; + _xacssseca = "x-amz-copy-source-server-side-encryption-customer-algorithm"; + _xacssseck = "x-amz-copy-source-server-side-encryption-customer-key"; + _xacssseckM = "x-amz-copy-source-server-side-encryption-customer-key-MD5"; + _xacsvi = "x-amz-copy-source-version-id"; + _xact = "x-amz-checksum-type"; + _xact_ = "x-amz-client-token"; + _xadm = "x-amz-delete-marker"; + _xae = "x-amz-expiration"; + _xaebo = "x-amz-expected-bucket-owner"; + _xafec = "x-amz-fwd-error-code"; + _xafem = "x-amz-fwd-error-message"; + _xafhCC = "x-amz-fwd-header-Cache-Control"; + _xafhCD = "x-amz-fwd-header-Content-Disposition"; + _xafhCE = "x-amz-fwd-header-Content-Encoding"; + _xafhCL = "x-amz-fwd-header-Content-Language"; + _xafhCR = "x-amz-fwd-header-Content-Range"; + _xafhCT = "x-amz-fwd-header-Content-Type"; + _xafhE = "x-amz-fwd-header-ETag"; + _xafhE_ = "x-amz-fwd-header-Expires"; + _xafhLM = "x-amz-fwd-header-Last-Modified"; + _xafhar = "x-amz-fwd-header-accept-ranges"; + _xafhxacc = "x-amz-fwd-header-x-amz-checksum-crc32"; + _xafhxacc_ = "x-amz-fwd-header-x-amz-checksum-crc32c"; + _xafhxacc__ = "x-amz-fwd-header-x-amz-checksum-crc64nvme"; + _xafhxacs = "x-amz-fwd-header-x-amz-checksum-sha1"; + _xafhxacs_ = "x-amz-fwd-header-x-amz-checksum-sha256"; + _xafhxadm = "x-amz-fwd-header-x-amz-delete-marker"; + _xafhxae = "x-amz-fwd-header-x-amz-expiration"; + _xafhxamm = "x-amz-fwd-header-x-amz-missing-meta"; + _xafhxampc = "x-amz-fwd-header-x-amz-mp-parts-count"; + _xafhxaollh = "x-amz-fwd-header-x-amz-object-lock-legal-hold"; + _xafhxaolm = "x-amz-fwd-header-x-amz-object-lock-mode"; + _xafhxaolrud = "x-amz-fwd-header-x-amz-object-lock-retain-until-date"; + _xafhxar = "x-amz-fwd-header-x-amz-restore"; + _xafhxarc = "x-amz-fwd-header-x-amz-request-charged"; + _xafhxars = "x-amz-fwd-header-x-amz-replication-status"; + _xafhxasc = "x-amz-fwd-header-x-amz-storage-class"; + _xafhxasse = "x-amz-fwd-header-x-amz-server-side-encryption"; + _xafhxasseakki = "x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"; + _xafhxassebke = "x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"; + _xafhxasseca = "x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"; + _xafhxasseckM = "x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5"; + _xafhxatc = "x-amz-fwd-header-x-amz-tagging-count"; + _xafhxavi = "x-amz-fwd-header-x-amz-version-id"; + _xafs = "x-amz-fwd-status"; + _xagfc = "x-amz-grant-full-control"; + _xagr = "x-amz-grant-read"; + _xagra = "x-amz-grant-read-acp"; + _xagw = "x-amz-grant-write"; + _xagwa = "x-amz-grant-write-acp"; + _xaimit = "x-amz-if-match-initiated-time"; + _xaimlmt = "x-amz-if-match-last-modified-time"; + _xaims = "x-amz-if-match-size"; + _xam = "x-amz-meta-"; + _xam_ = "x-amz-mfa"; + _xamd = "x-amz-metadata-directive"; + _xamm = "x-amz-missing-meta"; + _xamos = "x-amz-mp-object-size"; + _xamp = "x-amz-max-parts"; + _xampc = "x-amz-mp-parts-count"; + _xaoa = "x-amz-object-attributes"; + _xaollh = "x-amz-object-lock-legal-hold"; + _xaolm = "x-amz-object-lock-mode"; + _xaolrud = "x-amz-object-lock-retain-until-date"; + _xaoo = "x-amz-object-ownership"; + _xaooa = "x-amz-optional-object-attributes"; + _xaos = "x-amz-object-size"; + _xapnm = "x-amz-part-number-marker"; + _xar = "x-amz-restore"; + _xarc = "x-amz-request-charged"; + _xarop = "x-amz-restore-output-path"; + _xarp = "x-amz-request-payer"; + _xarr = "x-amz-request-route"; + _xars = "x-amz-replication-status"; + _xars_ = "x-amz-rename-source"; + _xarsim = "x-amz-rename-source-if-match"; + _xarsims = "x-amz-rename-source-if-modified-since"; + _xarsinm = "x-amz-rename-source-if-none-match"; + _xarsius = "x-amz-rename-source-if-unmodified-since"; + _xart = "x-amz-request-token"; + _xasc = "x-amz-storage-class"; + _xasca = "x-amz-sdk-checksum-algorithm"; + _xasdv = "x-amz-skip-destination-validation"; + _xasebo = "x-amz-source-expected-bucket-owner"; + _xasse = "x-amz-server-side-encryption"; + _xasseakki = "x-amz-server-side-encryption-aws-kms-key-id"; + _xassebke = "x-amz-server-side-encryption-bucket-key-enabled"; + _xassec = "x-amz-server-side-encryption-context"; + _xasseca = "x-amz-server-side-encryption-customer-algorithm"; + _xasseck = "x-amz-server-side-encryption-customer-key"; + _xasseckM = "x-amz-server-side-encryption-customer-key-MD5"; + _xat = "x-amz-tagging"; + _xatc = "x-amz-tagging-count"; + _xatd = "x-amz-tagging-directive"; + _xatdmos = "x-amz-transition-default-minimum-object-size"; + _xavi = "x-amz-version-id"; + _xawob = "x-amz-write-offset-bytes"; + _xawrl = "x-amz-website-redirect-location"; + _xs = "xsi:type"; + n0 = "com.amazonaws.s3"; + _s_registry = TypeRegistry.for(_s); + S3ServiceException$ = [-3, _s, "S3ServiceException", 0, [], []]; + _s_registry.registerError(S3ServiceException$, S3ServiceException); + n0_registry = TypeRegistry.for(n0); + AccessDenied$ = [ + -3, + n0, + _AD, + { [_e]: _c, [_hE]: 403 }, + [], + [] + ]; + n0_registry.registerError(AccessDenied$, AccessDenied); + BucketAlreadyExists$ = [ + -3, + n0, + _BAE, + { [_e]: _c, [_hE]: 409 }, + [], + [] + ]; + n0_registry.registerError(BucketAlreadyExists$, BucketAlreadyExists); + BucketAlreadyOwnedByYou$ = [ + -3, + n0, + _BAOBY, + { [_e]: _c, [_hE]: 409 }, + [], + [] + ]; + n0_registry.registerError(BucketAlreadyOwnedByYou$, BucketAlreadyOwnedByYou); + EncryptionTypeMismatch$ = [ + -3, + n0, + _ETM, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(EncryptionTypeMismatch$, EncryptionTypeMismatch); + IdempotencyParameterMismatch$ = [ + -3, + n0, + _IPM, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(IdempotencyParameterMismatch$, IdempotencyParameterMismatch); + InvalidObjectState$ = [ + -3, + n0, + _IOS, + { [_e]: _c, [_hE]: 403 }, + [_SC, _AT], + [0, 0] + ]; + n0_registry.registerError(InvalidObjectState$, InvalidObjectState); + InvalidRequest$ = [ + -3, + n0, + _IR, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(InvalidRequest$, InvalidRequest); + InvalidWriteOffset$ = [ + -3, + n0, + _IWO, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(InvalidWriteOffset$, InvalidWriteOffset); + NoSuchBucket$ = [ + -3, + n0, + _NSB, + { [_e]: _c, [_hE]: 404 }, + [], + [] + ]; + n0_registry.registerError(NoSuchBucket$, NoSuchBucket); + NoSuchKey$ = [ + -3, + n0, + _NSK, + { [_e]: _c, [_hE]: 404 }, + [], + [] + ]; + n0_registry.registerError(NoSuchKey$, NoSuchKey); + NoSuchUpload$ = [ + -3, + n0, + _NSU, + { [_e]: _c, [_hE]: 404 }, + [], + [] + ]; + n0_registry.registerError(NoSuchUpload$, NoSuchUpload); + NotFound$ = [ + -3, + n0, + _NF, + { [_e]: _c }, + [], + [] + ]; + n0_registry.registerError(NotFound$, NotFound); + ObjectAlreadyInActiveTierError$ = [ + -3, + n0, + _OAIATE, + { [_e]: _c, [_hE]: 403 }, + [], + [] + ]; + n0_registry.registerError(ObjectAlreadyInActiveTierError$, ObjectAlreadyInActiveTierError); + ObjectNotInActiveTierError$ = [ + -3, + n0, + _ONIATE, + { [_e]: _c, [_hE]: 403 }, + [], + [] + ]; + n0_registry.registerError(ObjectNotInActiveTierError$, ObjectNotInActiveTierError); + TooManyParts$ = [ + -3, + n0, + _TMP, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(TooManyParts$, TooManyParts); + errorTypeRegistries = [ + _s_registry, + n0_registry + ]; + CopySourceSSECustomerKey = [0, n0, _CSSSECK, 8, 0]; + NonEmptyKmsKeyArnString = [0, n0, _NEKKAS, 8, 0]; + SessionCredentialValue = [0, n0, _SCV, 8, 0]; + SSECustomerKey = [0, n0, _SSECK, 8, 0]; + SSEKMSEncryptionContext = [0, n0, _SSEKMSEC, 8, 0]; + SSEKMSKeyId = [0, n0, _SSEKMSKI, 8, 0]; + StreamingBlob = [0, n0, _SB, { [_st]: 1 }, 42]; + AbacStatus$ = [ + 3, + n0, + _AS, + 0, + [_S], + [0] + ]; + AbortIncompleteMultipartUpload$ = [ + 3, + n0, + _AIMU, + 0, + [_DAI], + [1] + ]; + AbortMultipartUploadOutput$ = [ + 3, + n0, + _AMUO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + AbortMultipartUploadRequest$ = [ + 3, + n0, + _AMUR, + 0, + [_B, _K, _UI, _RP, _EBO, _IMIT], + [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [6, { [_hH]: _xaimit }]], + 3 + ]; + AccelerateConfiguration$ = [ + 3, + n0, + _AC, + 0, + [_S], + [0] + ]; + AccessControlPolicy$ = [ + 3, + n0, + _ACP, + 0, + [_G, _O], + [[() => Grants, { [_xN]: _ACL }], () => Owner$] + ]; + AccessControlTranslation$ = [ + 3, + n0, + _ACT, + 0, + [_O], + [0], + 1 + ]; + AnalyticsAndOperator$ = [ + 3, + n0, + _AAO, + 0, + [_P, _T], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]] + ]; + AnalyticsConfiguration$ = [ + 3, + n0, + _ACn, + 0, + [_I, _SCA, _F], + [0, () => StorageClassAnalysis$, [() => AnalyticsFilter$, 0]], + 2 + ]; + AnalyticsExportDestination$ = [ + 3, + n0, + _AED, + 0, + [_SBD], + [() => AnalyticsS3BucketDestination$], + 1 + ]; + AnalyticsS3BucketDestination$ = [ + 3, + n0, + _ASBD, + 0, + [_Fo, _B, _BAI, _P], + [0, 0, 0, 0], + 2 + ]; + BlockedEncryptionTypes$ = [ + 3, + n0, + _BET, + 0, + [_ET], + [[() => EncryptionTypeList, { [_xF]: 1 }]] + ]; + Bucket$ = [ + 3, + n0, + _B, + 0, + [_N, _CD, _BR, _BA], + [0, 4, 0, 0] + ]; + BucketInfo$ = [ + 3, + n0, + _BI, + 0, + [_DR, _Ty], + [0, 0] + ]; + BucketLifecycleConfiguration$ = [ + 3, + n0, + _BLC, + 0, + [_R], + [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Ru }]], + 1 + ]; + BucketLoggingStatus$ = [ + 3, + n0, + _BLS, + 0, + [_LE], + [[() => LoggingEnabled$, 0]] + ]; + Checksum$ = [ + 3, + n0, + _C, + 0, + [_CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT], + [0, 0, 0, 0, 0, 0] + ]; + CommonPrefix$ = [ + 3, + n0, + _CP, + 0, + [_P], + [0] + ]; + CompletedMultipartUpload$ = [ + 3, + n0, + _CMU, + 0, + [_Pa], + [[() => CompletedPartList, { [_xF]: 1, [_xN]: _Par }]] + ]; + CompletedPart$ = [ + 3, + n0, + _CPo, + 0, + [_ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _PN], + [0, 0, 0, 0, 0, 0, 1] + ]; + CompleteMultipartUploadOutput$ = [ + 3, + n0, + _CMUO, + { [_xN]: _CMUR }, + [_L, _B, _K, _E, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _SSE, _VI, _SSEKMSKI, _BKE, _RC], + [0, 0, 0, [0, { [_hH]: _xae }], 0, 0, 0, 0, 0, 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] + ]; + CompleteMultipartUploadRequest$ = [ + 3, + n0, + _CMURo, + 0, + [_B, _K, _UI, _MU, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _MOS, _RP, _EBO, _IM, _INM, _SSECA, _SSECK, _SSECKMD], + [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [() => CompletedMultipartUpload$, { [_hP]: 1, [_xN]: _CMUo }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamos }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], + 3 + ]; + Condition$ = [ + 3, + n0, + _Co, + 0, + [_HECRE, _KPE], + [0, 0] + ]; + ContinuationEvent$ = [ + 3, + n0, + _CE, + 0, + [], + [] + ]; + CopyObjectOutput$ = [ + 3, + n0, + _COO, + 0, + [_COR, _E, _CSVI, _VI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC], + [[() => CopyObjectResult$, 16], [0, { [_hH]: _xae }], [0, { [_hH]: _xacsvi }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] + ]; + CopyObjectRequest$ = [ + 3, + n0, + _CORo, + 0, + [_B, _CS, _K, _ACL_, _CC, _CA, _CDo, _CEo, _CL, _CTo, _CSIM, _CSIMS, _CSINM, _CSIUS, _Ex, _GFC, _GR, _GRACP, _GWACP, _IM, _INM, _M, _MD, _TD, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _ESBO], + [[0, 1], [0, { [_hH]: _xacs__ }], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _xaca }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [4, { [_hH]: _Ex }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xamd }], [0, { [_hH]: _xatd }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], + 3 + ]; + CopyObjectResult$ = [ + 3, + n0, + _COR, + 0, + [_ETa, _LM, _CT, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh], + [0, 4, 0, 0, 0, 0, 0, 0] + ]; + CopyPartResult$ = [ + 3, + n0, + _CPR, + 0, + [_ETa, _LM, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh], + [0, 4, 0, 0, 0, 0, 0] + ]; + CORSConfiguration$ = [ + 3, + n0, + _CORSC, + 0, + [_CORSR], + [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]], + 1 + ]; + CORSRule$ = [ + 3, + n0, + _CORSRu, + 0, + [_AM, _AO, _ID, _AH, _EH, _MAS], + [[64 | 0, { [_xF]: 1, [_xN]: _AMl }], [64 | 0, { [_xF]: 1, [_xN]: _AOl }], 0, [64 | 0, { [_xF]: 1, [_xN]: _AHl }], [64 | 0, { [_xF]: 1, [_xN]: _EHx }], 1], + 2 + ]; + CreateBucketConfiguration$ = [ + 3, + n0, + _CBC, + 0, + [_LC, _L, _B, _T], + [0, () => LocationInfo$, () => BucketInfo$, [() => TagSet, 0]] + ]; + CreateBucketMetadataConfigurationRequest$ = [ + 3, + n0, + _CBMCR, + 0, + [_B, _MC, _CMD, _CA, _EBO], + [[0, 1], [() => MetadataConfiguration$, { [_hP]: 1, [_xN]: _MC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + CreateBucketMetadataTableConfigurationRequest$ = [ + 3, + n0, + _CBMTCR, + 0, + [_B, _MTC, _CMD, _CA, _EBO], + [[0, 1], [() => MetadataTableConfiguration$, { [_hP]: 1, [_xN]: _MTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + CreateBucketOutput$ = [ + 3, + n0, + _CBO, + 0, + [_L, _BA], + [[0, { [_hH]: _L }], [0, { [_hH]: _xaba }]] + ]; + CreateBucketRequest$ = [ + 3, + n0, + _CBR, + 0, + [_B, _ACL_, _CBC, _GFC, _GR, _GRACP, _GW, _GWACP, _OLEFB, _OO, _BN], + [[0, 1], [0, { [_hH]: _xaa }], [() => CreateBucketConfiguration$, { [_hP]: 1, [_xN]: _CBC }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [2, { [_hH]: _xabole }], [0, { [_hH]: _xaoo }], [0, { [_hH]: _xabn }]], + 1 + ]; + CreateMultipartUploadOutput$ = [ + 3, + n0, + _CMUOr, + { [_xN]: _IMUR }, + [_ADb, _ARI, _B, _K, _UI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC, _CA, _CT], + [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], [0, { [_xN]: _B }], 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]] + ]; + CreateMultipartUploadRequest$ = [ + 3, + n0, + _CMURr, + 0, + [_B, _K, _ACL_, _CC, _CDo, _CEo, _CL, _CTo, _Ex, _GFC, _GR, _GRACP, _GWACP, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _CA, _CT], + [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]], + 2 + ]; + CreateSessionOutput$ = [ + 3, + n0, + _CSO, + { [_xN]: _CSR }, + [_Cr, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE], + [[() => SessionCredentials$, { [_xN]: _Cr }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], + 1 + ]; + CreateSessionRequest$ = [ + 3, + n0, + _CSRr, + 0, + [_B, _SM, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE], + [[0, 1], [0, { [_hH]: _xacsm }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], + 1 + ]; + CSVInput$ = [ + 3, + n0, + _CSVIn, + 0, + [_FHI, _Com, _QEC, _RD, _FD, _QC, _AQRD], + [0, 0, 0, 0, 0, 0, 2] + ]; + CSVOutput$ = [ + 3, + n0, + _CSVO, + 0, + [_QF, _QEC, _RD, _FD, _QC], + [0, 0, 0, 0, 0] + ]; + DefaultRetention$ = [ + 3, + n0, + _DRe, + 0, + [_Mo, _D, _Y], + [0, 1, 1] + ]; + Delete$ = [ + 3, + n0, + _De, + 0, + [_Ob, _Q], + [[() => ObjectIdentifierList, { [_xF]: 1, [_xN]: _Obj }], 2], + 1 + ]; + DeleteBucketAnalyticsConfigurationRequest$ = [ + 3, + n0, + _DBACR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + DeleteBucketCorsRequest$ = [ + 3, + n0, + _DBCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketEncryptionRequest$ = [ + 3, + n0, + _DBER, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketIntelligentTieringConfigurationRequest$ = [ + 3, + n0, + _DBITCR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + DeleteBucketInventoryConfigurationRequest$ = [ + 3, + n0, + _DBICR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + DeleteBucketLifecycleRequest$ = [ + 3, + n0, + _DBLR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketMetadataConfigurationRequest$ = [ + 3, + n0, + _DBMCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketMetadataTableConfigurationRequest$ = [ + 3, + n0, + _DBMTCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketMetricsConfigurationRequest$ = [ + 3, + n0, + _DBMCRe, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + DeleteBucketOwnershipControlsRequest$ = [ + 3, + n0, + _DBOCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketPolicyRequest$ = [ + 3, + n0, + _DBPR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketReplicationRequest$ = [ + 3, + n0, + _DBRR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketRequest$ = [ + 3, + n0, + _DBR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketTaggingRequest$ = [ + 3, + n0, + _DBTR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketWebsiteRequest$ = [ + 3, + n0, + _DBWR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeletedObject$ = [ + 3, + n0, + _DO, + 0, + [_K, _VI, _DM, _DMVI], + [0, 0, 2, 0] + ]; + DeleteMarkerEntry$ = [ + 3, + n0, + _DME, + 0, + [_O, _K, _VI, _IL, _LM], + [() => Owner$, 0, 0, 2, 4] + ]; + DeleteMarkerReplication$ = [ + 3, + n0, + _DMR, + 0, + [_S], + [0] + ]; + DeleteObjectOutput$ = [ + 3, + n0, + _DOO, + 0, + [_DM, _VI, _RC], + [[2, { [_hH]: _xadm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }]] + ]; + DeleteObjectRequest$ = [ + 3, + n0, + _DOR, + 0, + [_B, _K, _MFA, _VI, _RP, _BGR, _EBO, _IM, _IMLMT, _IMS], + [[0, 1], [0, 1], [0, { [_hH]: _xam_ }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [6, { [_hH]: _xaimlmt }], [1, { [_hH]: _xaims }]], + 2 + ]; + DeleteObjectsOutput$ = [ + 3, + n0, + _DOOe, + { [_xN]: _DRel }, + [_Del, _RC, _Er], + [[() => DeletedObjects, { [_xF]: 1 }], [0, { [_hH]: _xarc }], [() => Errors, { [_xF]: 1, [_xN]: _Err }]] + ]; + DeleteObjectsRequest$ = [ + 3, + n0, + _DORe, + 0, + [_B, _De, _MFA, _RP, _BGR, _EBO, _CA], + [[0, 1], [() => Delete$, { [_hP]: 1, [_xN]: _De }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], + 2 + ]; + DeleteObjectTaggingOutput$ = [ + 3, + n0, + _DOTO, + 0, + [_VI], + [[0, { [_hH]: _xavi }]] + ]; + DeleteObjectTaggingRequest$ = [ + 3, + n0, + _DOTR, + 0, + [_B, _K, _VI, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], + 2 + ]; + DeletePublicAccessBlockRequest$ = [ + 3, + n0, + _DPABR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + Destination$ = [ + 3, + n0, + _Des, + 0, + [_B, _A, _SC, _ACT, _EC, _RT, _Me], + [0, 0, 0, () => AccessControlTranslation$, () => EncryptionConfiguration$, () => ReplicationTime$, () => Metrics$], + 1 + ]; + DestinationResult$ = [ + 3, + n0, + _DRes, + 0, + [_TBT, _TBA, _TN], + [0, 0, 0] + ]; + Encryption$ = [ + 3, + n0, + _En, + 0, + [_ET, _KMSKI, _KMSC], + [0, [() => SSEKMSKeyId, 0], 0], + 1 + ]; + EncryptionConfiguration$ = [ + 3, + n0, + _EC, + 0, + [_RKKID], + [0] + ]; + EndEvent$ = [ + 3, + n0, + _EE, + 0, + [], + [] + ]; + _Error$ = [ + 3, + n0, + _Err, + 0, + [_K, _VI, _Cod, _Mes], + [0, 0, 0, 0] + ]; + ErrorDetails$ = [ + 3, + n0, + _ED, + 0, + [_ECr, _EM], + [0, 0] + ]; + ErrorDocument$ = [ + 3, + n0, + _EDr, + 0, + [_K], + [0], + 1 + ]; + EventBridgeConfiguration$ = [ + 3, + n0, + _EBC, + 0, + [], + [] + ]; + ExistingObjectReplication$ = [ + 3, + n0, + _EOR, + 0, + [_S], + [0], + 1 + ]; + FilterRule$ = [ + 3, + n0, + _FR, + 0, + [_N, _V], + [0, 0] + ]; + GetBucketAbacOutput$ = [ + 3, + n0, + _GBAO, + 0, + [_AS], + [[() => AbacStatus$, 16]] + ]; + GetBucketAbacRequest$ = [ + 3, + n0, + _GBAR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketAccelerateConfigurationOutput$ = [ + 3, + n0, + _GBACO, + { [_xN]: _AC }, + [_S, _RC], + [0, [0, { [_hH]: _xarc }]] + ]; + GetBucketAccelerateConfigurationRequest$ = [ + 3, + n0, + _GBACR, + 0, + [_B, _EBO, _RP], + [[0, 1], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 1 + ]; + GetBucketAclOutput$ = [ + 3, + n0, + _GBAOe, + { [_xN]: _ACP }, + [_O, _G], + [() => Owner$, [() => Grants, { [_xN]: _ACL }]] + ]; + GetBucketAclRequest$ = [ + 3, + n0, + _GBARe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketAnalyticsConfigurationOutput$ = [ + 3, + n0, + _GBACOe, + 0, + [_ACn], + [[() => AnalyticsConfiguration$, 16]] + ]; + GetBucketAnalyticsConfigurationRequest$ = [ + 3, + n0, + _GBACRe, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetBucketCorsOutput$ = [ + 3, + n0, + _GBCO, + { [_xN]: _CORSC }, + [_CORSR], + [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]] + ]; + GetBucketCorsRequest$ = [ + 3, + n0, + _GBCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketEncryptionOutput$ = [ + 3, + n0, + _GBEO, + 0, + [_SSEC], + [[() => ServerSideEncryptionConfiguration$, 16]] + ]; + GetBucketEncryptionRequest$ = [ + 3, + n0, + _GBER, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketIntelligentTieringConfigurationOutput$ = [ + 3, + n0, + _GBITCO, + 0, + [_ITC], + [[() => IntelligentTieringConfiguration$, 16]] + ]; + GetBucketIntelligentTieringConfigurationRequest$ = [ + 3, + n0, + _GBITCR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetBucketInventoryConfigurationOutput$ = [ + 3, + n0, + _GBICO, + 0, + [_IC], + [[() => InventoryConfiguration$, 16]] + ]; + GetBucketInventoryConfigurationRequest$ = [ + 3, + n0, + _GBICR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetBucketLifecycleConfigurationOutput$ = [ + 3, + n0, + _GBLCO, + { [_xN]: _LCi }, + [_R, _TDMOS], + [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Ru }], [0, { [_hH]: _xatdmos }]] + ]; + GetBucketLifecycleConfigurationRequest$ = [ + 3, + n0, + _GBLCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketLocationOutput$ = [ + 3, + n0, + _GBLO, + { [_xN]: _LC }, + [_LC], + [0] + ]; + GetBucketLocationRequest$ = [ + 3, + n0, + _GBLR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketLoggingOutput$ = [ + 3, + n0, + _GBLOe, + { [_xN]: _BLS }, + [_LE], + [[() => LoggingEnabled$, 0]] + ]; + GetBucketLoggingRequest$ = [ + 3, + n0, + _GBLRe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketMetadataConfigurationOutput$ = [ + 3, + n0, + _GBMCO, + 0, + [_GBMCR], + [[() => GetBucketMetadataConfigurationResult$, 16]] + ]; + GetBucketMetadataConfigurationRequest$ = [ + 3, + n0, + _GBMCRe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketMetadataConfigurationResult$ = [ + 3, + n0, + _GBMCR, + 0, + [_MCR], + [() => MetadataConfigurationResult$], + 1 + ]; + GetBucketMetadataTableConfigurationOutput$ = [ + 3, + n0, + _GBMTCO, + 0, + [_GBMTCR], + [[() => GetBucketMetadataTableConfigurationResult$, 16]] + ]; + GetBucketMetadataTableConfigurationRequest$ = [ + 3, + n0, + _GBMTCRe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketMetadataTableConfigurationResult$ = [ + 3, + n0, + _GBMTCR, + 0, + [_MTCR, _S, _Err], + [() => MetadataTableConfigurationResult$, 0, () => ErrorDetails$], + 2 + ]; + GetBucketMetricsConfigurationOutput$ = [ + 3, + n0, + _GBMCOe, + 0, + [_MCe], + [[() => MetricsConfiguration$, 16]] + ]; + GetBucketMetricsConfigurationRequest$ = [ + 3, + n0, + _GBMCRet, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetBucketNotificationConfigurationRequest$ = [ + 3, + n0, + _GBNCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketOwnershipControlsOutput$ = [ + 3, + n0, + _GBOCO, + 0, + [_OC], + [[() => OwnershipControls$, 16]] + ]; + GetBucketOwnershipControlsRequest$ = [ + 3, + n0, + _GBOCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketPolicyOutput$ = [ + 3, + n0, + _GBPO, + 0, + [_Po], + [[0, 16]] + ]; + GetBucketPolicyRequest$ = [ + 3, + n0, + _GBPR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketPolicyStatusOutput$ = [ + 3, + n0, + _GBPSO, + 0, + [_PS], + [[() => PolicyStatus$, 16]] + ]; + GetBucketPolicyStatusRequest$ = [ + 3, + n0, + _GBPSR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketReplicationOutput$ = [ + 3, + n0, + _GBRO, + 0, + [_RCe], + [[() => ReplicationConfiguration$, 16]] + ]; + GetBucketReplicationRequest$ = [ + 3, + n0, + _GBRR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketRequestPaymentOutput$ = [ + 3, + n0, + _GBRPO, + { [_xN]: _RPC }, + [_Pay], + [0] + ]; + GetBucketRequestPaymentRequest$ = [ + 3, + n0, + _GBRPR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketTaggingOutput$ = [ + 3, + n0, + _GBTO, + { [_xN]: _Tag }, + [_TS], + [[() => TagSet, 0]], + 1 + ]; + GetBucketTaggingRequest$ = [ + 3, + n0, + _GBTR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketVersioningOutput$ = [ + 3, + n0, + _GBVO, + { [_xN]: _VC }, + [_S, _MFAD], + [0, [0, { [_xN]: _MDf }]] + ]; + GetBucketVersioningRequest$ = [ + 3, + n0, + _GBVR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketWebsiteOutput$ = [ + 3, + n0, + _GBWO, + { [_xN]: _WC }, + [_RART, _IDn, _EDr, _RR], + [() => RedirectAllRequestsTo$, () => IndexDocument$, () => ErrorDocument$, [() => RoutingRules, 0]] + ]; + GetBucketWebsiteRequest$ = [ + 3, + n0, + _GBWR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetObjectAclOutput$ = [ + 3, + n0, + _GOAO, + { [_xN]: _ACP }, + [_O, _G, _RC], + [() => Owner$, [() => Grants, { [_xN]: _ACL }], [0, { [_hH]: _xarc }]] + ]; + GetObjectAclRequest$ = [ + 3, + n0, + _GOAR, + 0, + [_B, _K, _VI, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetObjectAttributesOutput$ = [ + 3, + n0, + _GOAOe, + { [_xN]: _GOARe }, + [_DM, _LM, _VI, _RC, _ETa, _C, _OP, _SC, _OS], + [[2, { [_hH]: _xadm }], [4, { [_hH]: _LM_ }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }], 0, () => Checksum$, [() => GetObjectAttributesParts$, 0], 0, 1] + ]; + GetObjectAttributesParts$ = [ + 3, + n0, + _GOAP, + 0, + [_TPC, _PNM, _NPNM, _MP, _IT, _Pa], + [[1, { [_xN]: _PC }], 0, 0, 1, 2, [() => PartsList, { [_xF]: 1, [_xN]: _Par }]] + ]; + GetObjectAttributesRequest$ = [ + 3, + n0, + _GOARet, + 0, + [_B, _K, _OA, _VI, _MP, _PNM, _SSECA, _SSECK, _SSECKMD, _RP, _EBO], + [[0, 1], [0, 1], [64 | 0, { [_hH]: _xaoa }], [0, { [_hQ]: _vI }], [1, { [_hH]: _xamp }], [0, { [_hH]: _xapnm }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 3 + ]; + GetObjectLegalHoldOutput$ = [ + 3, + n0, + _GOLHO, + 0, + [_LH], + [[() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }]] + ]; + GetObjectLegalHoldRequest$ = [ + 3, + n0, + _GOLHR, + 0, + [_B, _K, _VI, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetObjectLockConfigurationOutput$ = [ + 3, + n0, + _GOLCO, + 0, + [_OLC], + [[() => ObjectLockConfiguration$, 16]] + ]; + GetObjectLockConfigurationRequest$ = [ + 3, + n0, + _GOLCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetObjectOutput$ = [ + 3, + n0, + _GOO, + 0, + [_Bo, _DM, _AR, _E, _Re, _LM, _CLo, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _MM, _VI, _CC, _CDo, _CEo, _CL, _CR, _CTo, _Ex, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS], + [[() => StreamingBlob, 16], [2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CR_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]] + ]; + GetObjectRequest$ = [ + 3, + n0, + _GOR, + 0, + [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh], + [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm }]], + 2 + ]; + GetObjectRetentionOutput$ = [ + 3, + n0, + _GORO, + 0, + [_Ret], + [[() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }]] + ]; + GetObjectRetentionRequest$ = [ + 3, + n0, + _GORR, + 0, + [_B, _K, _VI, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetObjectTaggingOutput$ = [ + 3, + n0, + _GOTO, + { [_xN]: _Tag }, + [_TS, _VI], + [[() => TagSet, 0], [0, { [_hH]: _xavi }]], + 1 + ]; + GetObjectTaggingRequest$ = [ + 3, + n0, + _GOTR, + 0, + [_B, _K, _VI, _EBO, _RP], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 2 + ]; + GetObjectTorrentOutput$ = [ + 3, + n0, + _GOTOe, + 0, + [_Bo, _RC], + [[() => StreamingBlob, 16], [0, { [_hH]: _xarc }]] + ]; + GetObjectTorrentRequest$ = [ + 3, + n0, + _GOTRe, + 0, + [_B, _K, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetPublicAccessBlockOutput$ = [ + 3, + n0, + _GPABO, + 0, + [_PABC], + [[() => PublicAccessBlockConfiguration$, 16]] + ]; + GetPublicAccessBlockRequest$ = [ + 3, + n0, + _GPABR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GlacierJobParameters$ = [ + 3, + n0, + _GJP, + 0, + [_Ti], + [0], + 1 + ]; + Grant$ = [ + 3, + n0, + _Gr, + 0, + [_Gra, _Pe], + [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0] + ]; + Grantee$ = [ + 3, + n0, + _Gra, + 0, + [_Ty, _DN, _EA, _ID, _URI], + [[0, { [_xA]: 1, [_xN]: _xs }], 0, 0, 0, 0], + 1 + ]; + HeadBucketOutput$ = [ + 3, + n0, + _HBO, + 0, + [_BA, _BLT, _BLN, _BR, _APA], + [[0, { [_hH]: _xaba }], [0, { [_hH]: _xablt }], [0, { [_hH]: _xabln }], [0, { [_hH]: _xabr }], [2, { [_hH]: _xaapa }]] + ]; + HeadBucketRequest$ = [ + 3, + n0, + _HBR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + HeadObjectOutput$ = [ + 3, + n0, + _HOO, + 0, + [_DM, _AR, _E, _Re, _ASr, _LM, _CLo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _ETa, _MM, _VI, _CC, _CDo, _CEo, _CL, _CTo, _CR, _Ex, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS], + [[2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [0, { [_hH]: _xaas }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [0, { [_hH]: _ETa }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _CR_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]] + ]; + HeadObjectRequest$ = [ + 3, + n0, + _HOR, + 0, + [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh], + [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm }]], + 2 + ]; + IndexDocument$ = [ + 3, + n0, + _IDn, + 0, + [_Su], + [0], + 1 + ]; + Initiator$ = [ + 3, + n0, + _In, + 0, + [_ID, _DN], + [0, 0] + ]; + InputSerialization$ = [ + 3, + n0, + _IS, + 0, + [_CSV, _CTom, _JSON, _Parq], + [() => CSVInput$, 0, () => JSONInput$, () => ParquetInput$] + ]; + IntelligentTieringAndOperator$ = [ + 3, + n0, + _ITAO, + 0, + [_P, _T], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]] + ]; + IntelligentTieringConfiguration$ = [ + 3, + n0, + _ITC, + 0, + [_I, _S, _Tie, _F], + [0, 0, [() => TieringList, { [_xF]: 1, [_xN]: _Tier }], [() => IntelligentTieringFilter$, 0]], + 3 + ]; + IntelligentTieringFilter$ = [ + 3, + n0, + _ITF, + 0, + [_P, _Ta, _An], + [0, () => Tag$, [() => IntelligentTieringAndOperator$, 0]] + ]; + InventoryConfiguration$ = [ + 3, + n0, + _IC, + 0, + [_Des, _IE, _I, _IOV, _Sc, _F, _OF], + [[() => InventoryDestination$, 0], 2, 0, 0, () => InventorySchedule$, () => InventoryFilter$, [() => InventoryOptionalFields, 0]], + 5 + ]; + InventoryDestination$ = [ + 3, + n0, + _IDnv, + 0, + [_SBD], + [[() => InventoryS3BucketDestination$, 0]], + 1 + ]; + InventoryEncryption$ = [ + 3, + n0, + _IEn, + 0, + [_SSES, _SSEKMS], + [[() => SSES3$, { [_xN]: _SS }], [() => SSEKMS$, { [_xN]: _SK }]] + ]; + InventoryFilter$ = [ + 3, + n0, + _IF, + 0, + [_P], + [0], + 1 + ]; + InventoryS3BucketDestination$ = [ + 3, + n0, + _ISBD, + 0, + [_B, _Fo, _AI, _P, _En], + [0, 0, 0, 0, [() => InventoryEncryption$, 0]], + 2 + ]; + InventorySchedule$ = [ + 3, + n0, + _ISn, + 0, + [_Fr], + [0], + 1 + ]; + InventoryTableConfiguration$ = [ + 3, + n0, + _ITCn, + 0, + [_CSo, _EC], + [0, () => MetadataTableEncryptionConfiguration$], + 1 + ]; + InventoryTableConfigurationResult$ = [ + 3, + n0, + _ITCR, + 0, + [_CSo, _TSa, _Err, _TNa, _TA], + [0, 0, () => ErrorDetails$, 0, 0], + 1 + ]; + InventoryTableConfigurationUpdates$ = [ + 3, + n0, + _ITCU, + 0, + [_CSo, _EC], + [0, () => MetadataTableEncryptionConfiguration$], + 1 + ]; + JournalTableConfiguration$ = [ + 3, + n0, + _JTC, + 0, + [_REe, _EC], + [() => RecordExpiration$, () => MetadataTableEncryptionConfiguration$], + 1 + ]; + JournalTableConfigurationResult$ = [ + 3, + n0, + _JTCR, + 0, + [_TSa, _TNa, _REe, _Err, _TA], + [0, 0, () => RecordExpiration$, () => ErrorDetails$, 0], + 3 + ]; + JournalTableConfigurationUpdates$ = [ + 3, + n0, + _JTCU, + 0, + [_REe], + [() => RecordExpiration$], + 1 + ]; + JSONInput$ = [ + 3, + n0, + _JSONI, + 0, + [_Ty], + [0] + ]; + JSONOutput$ = [ + 3, + n0, + _JSONO, + 0, + [_RD], + [0] + ]; + LambdaFunctionConfiguration$ = [ + 3, + n0, + _LFC, + 0, + [_LFA, _Ev, _I, _F], + [[0, { [_xN]: _CF }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], + 2 + ]; + LifecycleExpiration$ = [ + 3, + n0, + _LEi, + 0, + [_Da, _D, _EODM], + [5, 1, 2] + ]; + LifecycleRule$ = [ + 3, + n0, + _LR, + 0, + [_S, _E, _ID, _P, _F, _Tr, _NVT, _NVE, _AIMU], + [0, () => LifecycleExpiration$, 0, 0, [() => LifecycleRuleFilter$, 0], [() => TransitionList, { [_xF]: 1, [_xN]: _Tra }], [() => NoncurrentVersionTransitionList, { [_xF]: 1, [_xN]: _NVTo }], () => NoncurrentVersionExpiration$, () => AbortIncompleteMultipartUpload$], + 1 + ]; + LifecycleRuleAndOperator$ = [ + 3, + n0, + _LRAO, + 0, + [_P, _T, _OSGT, _OSLT], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 1, 1] + ]; + LifecycleRuleFilter$ = [ + 3, + n0, + _LRF, + 0, + [_P, _Ta, _OSGT, _OSLT, _An], + [0, () => Tag$, 1, 1, [() => LifecycleRuleAndOperator$, 0]] + ]; + ListBucketAnalyticsConfigurationsOutput$ = [ + 3, + n0, + _LBACO, + { [_xN]: _LBACR }, + [_IT, _CTon, _NCT, _ACLn], + [2, 0, 0, [() => AnalyticsConfigurationList, { [_xF]: 1, [_xN]: _ACn }]] + ]; + ListBucketAnalyticsConfigurationsRequest$ = [ + 3, + n0, + _LBACRi, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 + ]; + ListBucketIntelligentTieringConfigurationsOutput$ = [ + 3, + n0, + _LBITCO, + 0, + [_IT, _CTon, _NCT, _ITCL], + [2, 0, 0, [() => IntelligentTieringConfigurationList, { [_xF]: 1, [_xN]: _ITC }]] + ]; + ListBucketIntelligentTieringConfigurationsRequest$ = [ + 3, + n0, + _LBITCR, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 + ]; + ListBucketInventoryConfigurationsOutput$ = [ + 3, + n0, + _LBICO, + { [_xN]: _LICR }, + [_CTon, _ICL, _IT, _NCT], + [0, [() => InventoryConfigurationList, { [_xF]: 1, [_xN]: _IC }], 2, 0] + ]; + ListBucketInventoryConfigurationsRequest$ = [ + 3, + n0, + _LBICR, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 + ]; + ListBucketMetricsConfigurationsOutput$ = [ + 3, + n0, + _LBMCO, + { [_xN]: _LMCR }, + [_IT, _CTon, _NCT, _MCL], + [2, 0, 0, [() => MetricsConfigurationList, { [_xF]: 1, [_xN]: _MCe }]] + ]; + ListBucketMetricsConfigurationsRequest$ = [ + 3, + n0, + _LBMCR, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 + ]; + ListBucketsOutput$ = [ + 3, + n0, + _LBO, + { [_xN]: _LAMBR }, + [_Bu, _O, _CTon, _P], + [[() => Buckets, 0], () => Owner$, 0, 0] + ]; + ListBucketsRequest$ = [ + 3, + n0, + _LBR, + 0, + [_MB, _CTon, _P, _BR], + [[1, { [_hQ]: _mb }], [0, { [_hQ]: _ct }], [0, { [_hQ]: _p }], [0, { [_hQ]: _br }]] + ]; + ListDirectoryBucketsOutput$ = [ + 3, + n0, + _LDBO, + { [_xN]: _LAMDBR }, + [_Bu, _CTon], + [[() => Buckets, 0], 0] + ]; + ListDirectoryBucketsRequest$ = [ + 3, + n0, + _LDBR, + 0, + [_CTon, _MDB], + [[0, { [_hQ]: _ct }], [1, { [_hQ]: _mdb }]] + ]; + ListMultipartUploadsOutput$ = [ + 3, + n0, + _LMUO, + { [_xN]: _LMUR }, + [_B, _KM, _UIM, _NKM, _P, _Deli, _NUIM, _MUa, _IT, _U, _CPom, _ETn, _RC], + [0, 0, 0, 0, 0, 0, 0, 1, 2, [() => MultipartUploadList, { [_xF]: 1, [_xN]: _Up }], [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]] + ]; + ListMultipartUploadsRequest$ = [ + 3, + n0, + _LMURi, + 0, + [_B, _Deli, _ETn, _KM, _MUa, _P, _UIM, _EBO, _RP], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mu }], [0, { [_hQ]: _p }], [0, { [_hQ]: _uim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 1 + ]; + ListObjectsOutput$ = [ + 3, + n0, + _LOO, + { [_xN]: _LBRi }, + [_IT, _Ma, _NM, _Con, _N, _P, _Deli, _MK, _CPom, _ETn, _RC], + [2, 0, 0, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]] + ]; + ListObjectsRequest$ = [ + 3, + n0, + _LOR, + 0, + [_B, _Deli, _ETn, _Ma, _MK, _P, _RP, _EBO, _OOA], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _m }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], + 1 + ]; + ListObjectsV2Output$ = [ + 3, + n0, + _LOVO, + { [_xN]: _LBRi }, + [_IT, _Con, _N, _P, _Deli, _MK, _CPom, _ETn, _KC, _CTon, _NCT, _SA, _RC], + [2, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, 1, 0, 0, 0, [0, { [_hH]: _xarc }]] + ]; + ListObjectsV2Request$ = [ + 3, + n0, + _LOVR, + 0, + [_B, _Deli, _ETn, _MK, _P, _CTon, _FO, _SA, _RP, _EBO, _OOA], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _ct }], [2, { [_hQ]: _fo }], [0, { [_hQ]: _sa }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], + 1 + ]; + ListObjectVersionsOutput$ = [ + 3, + n0, + _LOVOi, + { [_xN]: _LVR }, + [_IT, _KM, _VIM, _NKM, _NVIM, _Ve, _DMe, _N, _P, _Deli, _MK, _CPom, _ETn, _RC], + [2, 0, 0, 0, 0, [() => ObjectVersionList, { [_xF]: 1, [_xN]: _Ver }], [() => DeleteMarkers, { [_xF]: 1, [_xN]: _DM }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]] + ]; + ListObjectVersionsRequest$ = [ + 3, + n0, + _LOVRi, + 0, + [_B, _Deli, _ETn, _KM, _MK, _P, _VIM, _EBO, _RP, _OOA], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _vim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }], [64 | 0, { [_hH]: _xaooa }]], + 1 + ]; + ListPartsOutput$ = [ + 3, + n0, + _LPO, + { [_xN]: _LPR }, + [_ADb, _ARI, _B, _K, _UI, _PNM, _NPNM, _MP, _IT, _Pa, _In, _O, _SC, _RC, _CA, _CT], + [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], 0, 0, 0, 0, 0, 1, 2, [() => Parts, { [_xF]: 1, [_xN]: _Par }], () => Initiator$, () => Owner$, 0, [0, { [_hH]: _xarc }], 0, 0] + ]; + ListPartsRequest$ = [ + 3, + n0, + _LPRi, + 0, + [_B, _K, _UI, _MP, _PNM, _RP, _EBO, _SSECA, _SSECK, _SSECKMD], + [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [1, { [_hQ]: _mp }], [0, { [_hQ]: _pnm }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], + 3 + ]; + LocationInfo$ = [ + 3, + n0, + _LI, + 0, + [_Ty, _N], + [0, 0] + ]; + LoggingEnabled$ = [ + 3, + n0, + _LE, + 0, + [_TB, _TP, _TG, _TOKF], + [0, 0, [() => TargetGrants, 0], [() => TargetObjectKeyFormat$, 0]], + 2 + ]; + MetadataConfiguration$ = [ + 3, + n0, + _MC, + 0, + [_JTC, _ITCn], + [() => JournalTableConfiguration$, () => InventoryTableConfiguration$], + 1 + ]; + MetadataConfigurationResult$ = [ + 3, + n0, + _MCR, + 0, + [_DRes, _JTCR, _ITCR], + [() => DestinationResult$, () => JournalTableConfigurationResult$, () => InventoryTableConfigurationResult$], + 1 + ]; + MetadataEntry$ = [ + 3, + n0, + _ME, + 0, + [_N, _V], + [0, 0] + ]; + MetadataTableConfiguration$ = [ + 3, + n0, + _MTC, + 0, + [_STD], + [() => S3TablesDestination$], + 1 + ]; + MetadataTableConfigurationResult$ = [ + 3, + n0, + _MTCR, + 0, + [_STDR], + [() => S3TablesDestinationResult$], + 1 + ]; + MetadataTableEncryptionConfiguration$ = [ + 3, + n0, + _MTEC, + 0, + [_SAs, _KKA], + [0, 0], + 1 + ]; + Metrics$ = [ + 3, + n0, + _Me, + 0, + [_S, _ETv], + [0, () => ReplicationTimeValue$], + 1 + ]; + MetricsAndOperator$ = [ + 3, + n0, + _MAO, + 0, + [_P, _T, _APAc], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 0] + ]; + MetricsConfiguration$ = [ + 3, + n0, + _MCe, + 0, + [_I, _F], + [0, [() => MetricsFilter$, 0]], + 1 + ]; + MultipartUpload$ = [ + 3, + n0, + _MU, + 0, + [_UI, _K, _Ini, _SC, _O, _In, _CA, _CT], + [0, 0, 4, 0, () => Owner$, () => Initiator$, 0, 0] + ]; + NoncurrentVersionExpiration$ = [ + 3, + n0, + _NVE, + 0, + [_ND, _NNV], + [1, 1] + ]; + NoncurrentVersionTransition$ = [ + 3, + n0, + _NVTo, + 0, + [_ND, _SC, _NNV], + [1, 0, 1] + ]; + NotificationConfiguration$ = [ + 3, + n0, + _NC, + 0, + [_TCo, _QCu, _LFCa, _EBC], + [[() => TopicConfigurationList, { [_xF]: 1, [_xN]: _TCop }], [() => QueueConfigurationList, { [_xF]: 1, [_xN]: _QCue }], [() => LambdaFunctionConfigurationList, { [_xF]: 1, [_xN]: _CFC }], () => EventBridgeConfiguration$] + ]; + NotificationConfigurationFilter$ = [ + 3, + n0, + _NCF, + 0, + [_K], + [[() => S3KeyFilter$, { [_xN]: _SKe }]] + ]; + _Object$ = [ + 3, + n0, + _Obj, + 0, + [_K, _LM, _ETa, _CA, _CT, _Si, _SC, _O, _RSe], + [0, 4, 0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, () => Owner$, () => RestoreStatus$] + ]; + ObjectIdentifier$ = [ + 3, + n0, + _OI, + 0, + [_K, _VI, _ETa, _LMT, _Si], + [0, 0, 0, 6, 1], + 1 + ]; + ObjectLockConfiguration$ = [ + 3, + n0, + _OLC, + 0, + [_OLE, _Ru], + [0, () => ObjectLockRule$] + ]; + ObjectLockLegalHold$ = [ + 3, + n0, + _OLLH, + 0, + [_S], + [0] + ]; + ObjectLockRetention$ = [ + 3, + n0, + _OLR, + 0, + [_Mo, _RUD], + [0, 5] + ]; + ObjectLockRule$ = [ + 3, + n0, + _OLRb, + 0, + [_DRe], + [() => DefaultRetention$] + ]; + ObjectPart$ = [ + 3, + n0, + _OPb, + 0, + [_PN, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh], + [1, 1, 0, 0, 0, 0, 0] + ]; + ObjectVersion$ = [ + 3, + n0, + _OV, + 0, + [_ETa, _CA, _CT, _Si, _SC, _K, _VI, _IL, _LM, _O, _RSe], + [0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, 0, 0, 2, 4, () => Owner$, () => RestoreStatus$] + ]; + OutputLocation$ = [ + 3, + n0, + _OL, + 0, + [_S_], + [[() => S3Location$, 0]] + ]; + OutputSerialization$ = [ + 3, + n0, + _OSu, + 0, + [_CSV, _JSON], + [() => CSVOutput$, () => JSONOutput$] + ]; + Owner$ = [ + 3, + n0, + _O, + 0, + [_DN, _ID], + [0, 0] + ]; + OwnershipControls$ = [ + 3, + n0, + _OC, + 0, + [_R], + [[() => OwnershipControlsRules, { [_xF]: 1, [_xN]: _Ru }]], + 1 + ]; + OwnershipControlsRule$ = [ + 3, + n0, + _OCR, + 0, + [_OO], + [0], + 1 + ]; + ParquetInput$ = [ + 3, + n0, + _PI, + 0, + [], + [] + ]; + Part$ = [ + 3, + n0, + _Par, + 0, + [_PN, _LM, _ETa, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh], + [1, 4, 0, 1, 0, 0, 0, 0, 0] + ]; + PartitionedPrefix$ = [ + 3, + n0, + _PP, + { [_xN]: _PP }, + [_PDS], + [0] + ]; + PolicyStatus$ = [ + 3, + n0, + _PS, + 0, + [_IP], + [[2, { [_xN]: _IP }]] + ]; + Progress$ = [ + 3, + n0, + _Pr, + 0, + [_BS, _BP, _BRy], + [1, 1, 1] + ]; + ProgressEvent$ = [ + 3, + n0, + _PE, + 0, + [_Det], + [[() => Progress$, { [_eP]: 1 }]] + ]; + PublicAccessBlockConfiguration$ = [ + 3, + n0, + _PABC, + 0, + [_BPA, _IPA, _BPP, _RPB], + [[2, { [_xN]: _BPA }], [2, { [_xN]: _IPA }], [2, { [_xN]: _BPP }], [2, { [_xN]: _RPB }]] + ]; + PutBucketAbacRequest$ = [ + 3, + n0, + _PBAR, + 0, + [_B, _AS, _CMD, _CA, _EBO], + [[0, 1], [() => AbacStatus$, { [_hP]: 1, [_xN]: _AS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketAccelerateConfigurationRequest$ = [ + 3, + n0, + _PBACR, + 0, + [_B, _AC, _EBO, _CA], + [[0, 1], [() => AccelerateConfiguration$, { [_hP]: 1, [_xN]: _AC }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], + 2 + ]; + PutBucketAclRequest$ = [ + 3, + n0, + _PBARu, + 0, + [_B, _ACL_, _ACP, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _EBO], + [[0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xaebo }]], + 1 + ]; + PutBucketAnalyticsConfigurationRequest$ = [ + 3, + n0, + _PBACRu, + 0, + [_B, _I, _ACn, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => AnalyticsConfiguration$, { [_hP]: 1, [_xN]: _ACn }], [0, { [_hH]: _xaebo }]], + 3 + ]; + PutBucketCorsRequest$ = [ + 3, + n0, + _PBCR, + 0, + [_B, _CORSC, _CMD, _CA, _EBO], + [[0, 1], [() => CORSConfiguration$, { [_hP]: 1, [_xN]: _CORSC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketEncryptionRequest$ = [ + 3, + n0, + _PBER, + 0, + [_B, _SSEC, _CMD, _CA, _EBO], + [[0, 1], [() => ServerSideEncryptionConfiguration$, { [_hP]: 1, [_xN]: _SSEC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketIntelligentTieringConfigurationRequest$ = [ + 3, + n0, + _PBITCR, + 0, + [_B, _I, _ITC, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => IntelligentTieringConfiguration$, { [_hP]: 1, [_xN]: _ITC }], [0, { [_hH]: _xaebo }]], + 3 + ]; + PutBucketInventoryConfigurationRequest$ = [ + 3, + n0, + _PBICR, + 0, + [_B, _I, _IC, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => InventoryConfiguration$, { [_hP]: 1, [_xN]: _IC }], [0, { [_hH]: _xaebo }]], + 3 + ]; + PutBucketLifecycleConfigurationOutput$ = [ + 3, + n0, + _PBLCO, + 0, + [_TDMOS], + [[0, { [_hH]: _xatdmos }]] + ]; + PutBucketLifecycleConfigurationRequest$ = [ + 3, + n0, + _PBLCR, + 0, + [_B, _CA, _LCi, _EBO, _TDMOS], + [[0, 1], [0, { [_hH]: _xasca }], [() => BucketLifecycleConfiguration$, { [_hP]: 1, [_xN]: _LCi }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xatdmos }]], + 1 + ]; + PutBucketLoggingRequest$ = [ + 3, + n0, + _PBLR, + 0, + [_B, _BLS, _CMD, _CA, _EBO], + [[0, 1], [() => BucketLoggingStatus$, { [_hP]: 1, [_xN]: _BLS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketMetricsConfigurationRequest$ = [ + 3, + n0, + _PBMCR, + 0, + [_B, _I, _MCe, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => MetricsConfiguration$, { [_hP]: 1, [_xN]: _MCe }], [0, { [_hH]: _xaebo }]], + 3 + ]; + PutBucketNotificationConfigurationRequest$ = [ + 3, + n0, + _PBNCR, + 0, + [_B, _NC, _EBO, _SDV], + [[0, 1], [() => NotificationConfiguration$, { [_hP]: 1, [_xN]: _NC }], [0, { [_hH]: _xaebo }], [2, { [_hH]: _xasdv }]], + 2 + ]; + PutBucketOwnershipControlsRequest$ = [ + 3, + n0, + _PBOCR, + 0, + [_B, _OC, _CMD, _EBO, _CA], + [[0, 1], [() => OwnershipControls$, { [_hP]: 1, [_xN]: _OC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], + 2 + ]; + PutBucketPolicyRequest$ = [ + 3, + n0, + _PBPR, + 0, + [_B, _Po, _CMD, _CA, _CRSBA, _EBO], + [[0, 1], [0, 16], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [2, { [_hH]: _xacrsba }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketReplicationRequest$ = [ + 3, + n0, + _PBRR, + 0, + [_B, _RCe, _CMD, _CA, _To, _EBO], + [[0, 1], [() => ReplicationConfiguration$, { [_hP]: 1, [_xN]: _RCe }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketRequestPaymentRequest$ = [ + 3, + n0, + _PBRPR, + 0, + [_B, _RPC, _CMD, _CA, _EBO], + [[0, 1], [() => RequestPaymentConfiguration$, { [_hP]: 1, [_xN]: _RPC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketTaggingRequest$ = [ + 3, + n0, + _PBTR, + 0, + [_B, _Tag, _CMD, _CA, _EBO], + [[0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketVersioningRequest$ = [ + 3, + n0, + _PBVR, + 0, + [_B, _VC, _CMD, _CA, _MFA, _EBO], + [[0, 1], [() => VersioningConfiguration$, { [_hP]: 1, [_xN]: _VC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketWebsiteRequest$ = [ + 3, + n0, + _PBWR, + 0, + [_B, _WC, _CMD, _CA, _EBO], + [[0, 1], [() => WebsiteConfiguration$, { [_hP]: 1, [_xN]: _WC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutObjectAclOutput$ = [ + 3, + n0, + _POAO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + PutObjectAclRequest$ = [ + 3, + n0, + _POAR, + 0, + [_B, _K, _ACL_, _ACP, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _RP, _VI, _EBO], + [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutObjectLegalHoldOutput$ = [ + 3, + n0, + _POLHO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + PutObjectLegalHoldRequest$ = [ + 3, + n0, + _POLHR, + 0, + [_B, _K, _LH, _RP, _VI, _CMD, _CA, _EBO], + [[0, 1], [0, 1], [() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutObjectLockConfigurationOutput$ = [ + 3, + n0, + _POLCO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + PutObjectLockConfigurationRequest$ = [ + 3, + n0, + _POLCR, + 0, + [_B, _OLC, _RP, _To, _CMD, _CA, _EBO], + [[0, 1], [() => ObjectLockConfiguration$, { [_hP]: 1, [_xN]: _OLC }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 1 + ]; + PutObjectOutput$ = [ + 3, + n0, + _POO, + 0, + [_E, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _SSE, _VI, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _Si, _RC], + [[0, { [_hH]: _xae }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [1, { [_hH]: _xaos }], [0, { [_hH]: _xarc }]] + ]; + PutObjectRequest$ = [ + 3, + n0, + _POR, + 0, + [_B, _K, _ACL_, _Bo, _CC, _CDo, _CEo, _CL, _CLo, _CMD, _CTo, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _Ex, _IM, _INM, _GFC, _GR, _GRACP, _GWACP, _WOB, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO], + [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => StreamingBlob, 16], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [1, { [_hH]: _xawob }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutObjectRetentionOutput$ = [ + 3, + n0, + _PORO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + PutObjectRetentionRequest$ = [ + 3, + n0, + _PORR, + 0, + [_B, _K, _Ret, _RP, _VI, _BGR, _CMD, _CA, _EBO], + [[0, 1], [0, 1], [() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutObjectTaggingOutput$ = [ + 3, + n0, + _POTO, + 0, + [_VI], + [[0, { [_hH]: _xavi }]] + ]; + PutObjectTaggingRequest$ = [ + 3, + n0, + _POTR, + 0, + [_B, _K, _Tag, _VI, _CMD, _CA, _EBO, _RP], + [[0, 1], [0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 3 + ]; + PutPublicAccessBlockRequest$ = [ + 3, + n0, + _PPABR, + 0, + [_B, _PABC, _CMD, _CA, _EBO], + [[0, 1], [() => PublicAccessBlockConfiguration$, { [_hP]: 1, [_xN]: _PABC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + QueueConfiguration$ = [ + 3, + n0, + _QCue, + 0, + [_QA, _Ev, _I, _F], + [[0, { [_xN]: _Qu }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], + 2 + ]; + RecordExpiration$ = [ + 3, + n0, + _REe, + 0, + [_E, _D], + [0, 1], + 1 + ]; + RecordsEvent$ = [ + 3, + n0, + _REec, + 0, + [_Payl], + [[21, { [_eP]: 1 }]] + ]; + Redirect$ = [ + 3, + n0, + _Red, + 0, + [_HN, _HRC, _Pro, _RKPW, _RKW], + [0, 0, 0, 0, 0] + ]; + RedirectAllRequestsTo$ = [ + 3, + n0, + _RART, + 0, + [_HN, _Pro], + [0, 0], + 1 + ]; + RenameObjectOutput$ = [ + 3, + n0, + _ROO, + 0, + [], + [] + ]; + RenameObjectRequest$ = [ + 3, + n0, + _ROR, + 0, + [_B, _K, _RSen, _DIM, _DINM, _DIMS, _DIUS, _SIM, _SINM, _SIMS, _SIUS, _CTl], + [[0, 1], [0, 1], [0, { [_hH]: _xars_ }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IMS_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _xarsim }], [0, { [_hH]: _xarsinm }], [6, { [_hH]: _xarsims }], [6, { [_hH]: _xarsius }], [0, { [_hH]: _xact_, [_iT]: 1 }]], + 3 + ]; + ReplicaModifications$ = [ + 3, + n0, + _RM, + 0, + [_S], + [0], + 1 + ]; + ReplicationConfiguration$ = [ + 3, + n0, + _RCe, + 0, + [_Ro, _R], + [0, [() => ReplicationRules, { [_xF]: 1, [_xN]: _Ru }]], + 2 + ]; + ReplicationRule$ = [ + 3, + n0, + _RRe, + 0, + [_S, _Des, _ID, _Pri, _P, _F, _SSC, _EOR, _DMR], + [0, () => Destination$, 0, 1, 0, [() => ReplicationRuleFilter$, 0], () => SourceSelectionCriteria$, () => ExistingObjectReplication$, () => DeleteMarkerReplication$], + 2 + ]; + ReplicationRuleAndOperator$ = [ + 3, + n0, + _RRAO, + 0, + [_P, _T], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]] + ]; + ReplicationRuleFilter$ = [ + 3, + n0, + _RRF, + 0, + [_P, _Ta, _An], + [0, () => Tag$, [() => ReplicationRuleAndOperator$, 0]] + ]; + ReplicationTime$ = [ + 3, + n0, + _RT, + 0, + [_S, _Tim], + [0, () => ReplicationTimeValue$], + 2 + ]; + ReplicationTimeValue$ = [ + 3, + n0, + _RTV, + 0, + [_Mi], + [1] + ]; + RequestPaymentConfiguration$ = [ + 3, + n0, + _RPC, + 0, + [_Pay], + [0], + 1 + ]; + RequestProgress$ = [ + 3, + n0, + _RPe, + 0, + [_Ena], + [2] + ]; + RestoreObjectOutput$ = [ + 3, + n0, + _ROOe, + 0, + [_RC, _ROP], + [[0, { [_hH]: _xarc }], [0, { [_hH]: _xarop }]] + ]; + RestoreObjectRequest$ = [ + 3, + n0, + _RORe, + 0, + [_B, _K, _VI, _RRes, _RP, _CA, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [() => RestoreRequest$, { [_hP]: 1, [_xN]: _RRes }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + RestoreRequest$ = [ + 3, + n0, + _RRes, + 0, + [_D, _GJP, _Ty, _Ti, _Desc, _SP, _OL], + [1, () => GlacierJobParameters$, 0, 0, 0, () => SelectParameters$, [() => OutputLocation$, 0]] + ]; + RestoreStatus$ = [ + 3, + n0, + _RSe, + 0, + [_IRIP, _RED], + [2, 4] + ]; + RoutingRule$ = [ + 3, + n0, + _RRo, + 0, + [_Red, _Co], + [() => Redirect$, () => Condition$], + 1 + ]; + S3KeyFilter$ = [ + 3, + n0, + _SKF, + 0, + [_FRi], + [[() => FilterRuleList, { [_xF]: 1, [_xN]: _FR }]] + ]; + S3Location$ = [ + 3, + n0, + _SL, + 0, + [_BNu, _P, _En, _CACL, _ACL, _Tag, _UM, _SC], + [0, 0, [() => Encryption$, 0], 0, [() => Grants, 0], [() => Tagging$, 0], [() => UserMetadata, 0], 0], + 2 + ]; + S3TablesDestination$ = [ + 3, + n0, + _STD, + 0, + [_TBA, _TNa], + [0, 0], + 2 + ]; + S3TablesDestinationResult$ = [ + 3, + n0, + _STDR, + 0, + [_TBA, _TNa, _TA, _TN], + [0, 0, 0, 0], + 4 + ]; + ScanRange$ = [ + 3, + n0, + _SR, + 0, + [_St, _End], + [1, 1] + ]; + SelectObjectContentOutput$ = [ + 3, + n0, + _SOCO, + 0, + [_Payl], + [[() => SelectObjectContentEventStream$, 16]] + ]; + SelectObjectContentRequest$ = [ + 3, + n0, + _SOCR, + 0, + [_B, _K, _Exp, _ETx, _IS, _OSu, _SSECA, _SSECK, _SSECKMD, _RPe, _SR, _EBO], + [[0, 1], [0, 1], 0, 0, () => InputSerialization$, () => OutputSerialization$, [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], () => RequestProgress$, () => ScanRange$, [0, { [_hH]: _xaebo }]], + 6 + ]; + SelectParameters$ = [ + 3, + n0, + _SP, + 0, + [_IS, _ETx, _Exp, _OSu], + [() => InputSerialization$, 0, 0, () => OutputSerialization$], + 4 + ]; + ServerSideEncryptionByDefault$ = [ + 3, + n0, + _SSEBD, + 0, + [_SSEA, _KMSMKID], + [0, [() => SSEKMSKeyId, 0]], + 1 + ]; + ServerSideEncryptionConfiguration$ = [ + 3, + n0, + _SSEC, + 0, + [_R], + [[() => ServerSideEncryptionRules, { [_xF]: 1, [_xN]: _Ru }]], + 1 + ]; + ServerSideEncryptionRule$ = [ + 3, + n0, + _SSER, + 0, + [_ASSEBD, _BKE, _BET], + [[() => ServerSideEncryptionByDefault$, 0], 2, [() => BlockedEncryptionTypes$, 0]] + ]; + SessionCredentials$ = [ + 3, + n0, + _SCe, + 0, + [_AKI, _SAK, _ST, _E], + [[0, { [_xN]: _AKI }], [() => SessionCredentialValue, { [_xN]: _SAK }], [() => SessionCredentialValue, { [_xN]: _ST }], [4, { [_xN]: _E }]], + 4 + ]; + SimplePrefix$ = [ + 3, + n0, + _SPi, + { [_xN]: _SPi }, + [], + [] + ]; + SourceSelectionCriteria$ = [ + 3, + n0, + _SSC, + 0, + [_SKEO, _RM], + [() => SseKmsEncryptedObjects$, () => ReplicaModifications$] + ]; + SSEKMS$ = [ + 3, + n0, + _SSEKMS, + { [_xN]: _SK }, + [_KI], + [[() => SSEKMSKeyId, 0]], + 1 + ]; + SseKmsEncryptedObjects$ = [ + 3, + n0, + _SKEO, + 0, + [_S], + [0], + 1 + ]; + SSEKMSEncryption$ = [ + 3, + n0, + _SSEKMSE, + { [_xN]: _SK }, + [_KMSKA, _BKE], + [[() => NonEmptyKmsKeyArnString, 0], 2], + 1 + ]; + SSES3$ = [ + 3, + n0, + _SSES, + { [_xN]: _SS }, + [], + [] + ]; + Stats$ = [ + 3, + n0, + _Sta, + 0, + [_BS, _BP, _BRy], + [1, 1, 1] + ]; + StatsEvent$ = [ + 3, + n0, + _SE, + 0, + [_Det], + [[() => Stats$, { [_eP]: 1 }]] + ]; + StorageClassAnalysis$ = [ + 3, + n0, + _SCA, + 0, + [_DE], + [() => StorageClassAnalysisDataExport$] + ]; + StorageClassAnalysisDataExport$ = [ + 3, + n0, + _SCADE, + 0, + [_OSV, _Des], + [0, () => AnalyticsExportDestination$], + 2 + ]; + Tag$ = [ + 3, + n0, + _Ta, + 0, + [_K, _V], + [0, 0], + 2 + ]; + Tagging$ = [ + 3, + n0, + _Tag, + 0, + [_TS], + [[() => TagSet, 0]], + 1 + ]; + TargetGrant$ = [ + 3, + n0, + _TGa, + 0, + [_Gra, _Pe], + [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0] + ]; + TargetObjectKeyFormat$ = [ + 3, + n0, + _TOKF, + 0, + [_SPi, _PP], + [[() => SimplePrefix$, { [_xN]: _SPi }], [() => PartitionedPrefix$, { [_xN]: _PP }]] + ]; + Tiering$ = [ + 3, + n0, + _Tier, + 0, + [_D, _AT], + [1, 0], + 2 + ]; + TopicConfiguration$ = [ + 3, + n0, + _TCop, + 0, + [_TAo, _Ev, _I, _F], + [[0, { [_xN]: _Top }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], + 2 + ]; + Transition$ = [ + 3, + n0, + _Tra, + 0, + [_Da, _D, _SC], + [5, 1, 0] + ]; + UpdateBucketMetadataInventoryTableConfigurationRequest$ = [ + 3, + n0, + _UBMITCR, + 0, + [_B, _ITCn, _CMD, _CA, _EBO], + [[0, 1], [() => InventoryTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _ITCn }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + UpdateBucketMetadataJournalTableConfigurationRequest$ = [ + 3, + n0, + _UBMJTCR, + 0, + [_B, _JTC, _CMD, _CA, _EBO], + [[0, 1], [() => JournalTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _JTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + UpdateObjectEncryptionRequest$ = [ + 3, + n0, + _UOER, + 0, + [_B, _K, _OE, _VI, _RP, _EBO, _CMD, _CA], + [[0, 1], [0, 1], [() => ObjectEncryption$, 16], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }]], + 3 + ]; + UpdateObjectEncryptionResponse$ = [ + 3, + n0, + _UOERp, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + UploadPartCopyOutput$ = [ + 3, + n0, + _UPCO, + 0, + [_CSVI, _CPR, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC], + [[0, { [_hH]: _xacsvi }], [() => CopyPartResult$, 16], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] + ]; + UploadPartCopyRequest$ = [ + 3, + n0, + _UPCR, + 0, + [_B, _CS, _K, _PN, _UI, _CSIM, _CSIMS, _CSINM, _CSIUS, _CSRo, _SSECA, _SSECK, _SSECKMD, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _EBO, _ESBO], + [[0, 1], [0, { [_hH]: _xacs__ }], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [0, { [_hH]: _xacsr }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], + 5 + ]; + UploadPartOutput$ = [ + 3, + n0, + _UPO, + 0, + [_SSE, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC], + [[0, { [_hH]: _xasse }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] + ]; + UploadPartRequest$ = [ + 3, + n0, + _UPR, + 0, + [_B, _K, _PN, _UI, _Bo, _CLo, _CMD, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _SSECA, _SSECK, _SSECKMD, _RP, _EBO], + [[0, 1], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [() => StreamingBlob, 16], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 4 + ]; + VersioningConfiguration$ = [ + 3, + n0, + _VC, + 0, + [_MFAD, _S], + [[0, { [_xN]: _MDf }], 0] + ]; + WebsiteConfiguration$ = [ + 3, + n0, + _WC, + 0, + [_EDr, _IDn, _RART, _RR], + [() => ErrorDocument$, () => IndexDocument$, () => RedirectAllRequestsTo$, [() => RoutingRules, 0]] + ]; + WriteGetObjectResponseRequest$ = [ + 3, + n0, + _WGORR, + 0, + [_RReq, _RTe, _Bo, _SCt, _ECr, _EM, _AR, _CC, _CDo, _CEo, _CL, _CLo, _CR, _CTo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _DM, _ETa, _Ex, _E, _LM, _MM, _M, _OLM, _OLLHS, _OLRUD, _PC, _RS, _RC, _Re, _SSE, _SSECA, _SSEKMSKI, _SSECKMD, _SC, _TC, _VI, _BKE], + [[0, { [_hL]: 1, [_hH]: _xarr }], [0, { [_hH]: _xart }], [() => StreamingBlob, 16], [1, { [_hH]: _xafs }], [0, { [_hH]: _xafec }], [0, { [_hH]: _xafem }], [0, { [_hH]: _xafhar }], [0, { [_hH]: _xafhCC }], [0, { [_hH]: _xafhCD }], [0, { [_hH]: _xafhCE }], [0, { [_hH]: _xafhCL }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xafhCR }], [0, { [_hH]: _xafhCT }], [0, { [_hH]: _xafhxacc }], [0, { [_hH]: _xafhxacc_ }], [0, { [_hH]: _xafhxacc__ }], [0, { [_hH]: _xafhxacs }], [0, { [_hH]: _xafhxacs_ }], [2, { [_hH]: _xafhxadm }], [0, { [_hH]: _xafhE }], [4, { [_hH]: _xafhE_ }], [0, { [_hH]: _xafhxae }], [4, { [_hH]: _xafhLM }], [1, { [_hH]: _xafhxamm }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xafhxaolm }], [0, { [_hH]: _xafhxaollh }], [5, { [_hH]: _xafhxaolrud }], [1, { [_hH]: _xafhxampc }], [0, { [_hH]: _xafhxars }], [0, { [_hH]: _xafhxarc }], [0, { [_hH]: _xafhxar }], [0, { [_hH]: _xafhxasse }], [0, { [_hH]: _xafhxasseca }], [() => SSEKMSKeyId, { [_hH]: _xafhxasseakki }], [0, { [_hH]: _xafhxasseckM }], [0, { [_hH]: _xafhxasc }], [1, { [_hH]: _xafhxatc }], [0, { [_hH]: _xafhxavi }], [2, { [_hH]: _xafhxassebke }]], + 2 + ]; + __Unit = "unit"; + AllowedHeaders = 64 | 0; + AllowedMethods = 64 | 0; + AllowedOrigins = 64 | 0; + AnalyticsConfigurationList = [ + 1, + n0, + _ACLn, + 0, + [ + () => AnalyticsConfiguration$, + 0 + ] + ]; + Buckets = [ + 1, + n0, + _Bu, + 0, + [ + () => Bucket$, + { [_xN]: _B } + ] + ]; + ChecksumAlgorithmList = 64 | 0; + CommonPrefixList = [ + 1, + n0, + _CPL, + 0, + () => CommonPrefix$ + ]; + CompletedPartList = [ + 1, + n0, + _CPLo, + 0, + () => CompletedPart$ + ]; + CORSRules = [ + 1, + n0, + _CORSR, + 0, + [ + () => CORSRule$, + 0 + ] + ]; + DeletedObjects = [ + 1, + n0, + _DOe, + 0, + () => DeletedObject$ + ]; + DeleteMarkers = [ + 1, + n0, + _DMe, + 0, + () => DeleteMarkerEntry$ + ]; + EncryptionTypeList = [ + 1, + n0, + _ETL, + 0, + [ + 0, + { [_xN]: _ET } + ] + ]; + Errors = [ + 1, + n0, + _Er, + 0, + () => _Error$ + ]; + EventList = 64 | 0; + ExposeHeaders = 64 | 0; + FilterRuleList = [ + 1, + n0, + _FRL, + 0, + () => FilterRule$ + ]; + Grants = [ + 1, + n0, + _G, + 0, + [ + () => Grant$, + { [_xN]: _Gr } + ] + ]; + IntelligentTieringConfigurationList = [ + 1, + n0, + _ITCL, + 0, + [ + () => IntelligentTieringConfiguration$, + 0 + ] + ]; + InventoryConfigurationList = [ + 1, + n0, + _ICL, + 0, + [ + () => InventoryConfiguration$, + 0 + ] + ]; + InventoryOptionalFields = [ + 1, + n0, + _IOF, + 0, + [ + 0, + { [_xN]: _Fi } + ] + ]; + LambdaFunctionConfigurationList = [ + 1, + n0, + _LFCL, + 0, + [ + () => LambdaFunctionConfiguration$, + 0 + ] + ]; + LifecycleRules = [ + 1, + n0, + _LRi, + 0, + [ + () => LifecycleRule$, + 0 + ] + ]; + MetricsConfigurationList = [ + 1, + n0, + _MCL, + 0, + [ + () => MetricsConfiguration$, + 0 + ] + ]; + MultipartUploadList = [ + 1, + n0, + _MUL, + 0, + () => MultipartUpload$ + ]; + NoncurrentVersionTransitionList = [ + 1, + n0, + _NVTL, + 0, + () => NoncurrentVersionTransition$ + ]; + ObjectAttributesList = 64 | 0; + ObjectIdentifierList = [ + 1, + n0, + _OIL, + 0, + () => ObjectIdentifier$ + ]; + ObjectList = [ + 1, + n0, + _OLb, + 0, + [ + () => _Object$, + 0 + ] + ]; + ObjectVersionList = [ + 1, + n0, + _OVL, + 0, + [ + () => ObjectVersion$, + 0 + ] + ]; + OptionalObjectAttributesList = 64 | 0; + OwnershipControlsRules = [ + 1, + n0, + _OCRw, + 0, + () => OwnershipControlsRule$ + ]; + Parts = [ + 1, + n0, + _Pa, + 0, + () => Part$ + ]; + PartsList = [ + 1, + n0, + _PL, + 0, + () => ObjectPart$ + ]; + QueueConfigurationList = [ + 1, + n0, + _QCL, + 0, + [ + () => QueueConfiguration$, + 0 + ] + ]; + ReplicationRules = [ + 1, + n0, + _RRep, + 0, + [ + () => ReplicationRule$, + 0 + ] + ]; + RoutingRules = [ + 1, + n0, + _RR, + 0, + [ + () => RoutingRule$, + { [_xN]: _RRo } + ] + ]; + ServerSideEncryptionRules = [ + 1, + n0, + _SSERe, + 0, + [ + () => ServerSideEncryptionRule$, + 0 + ] + ]; + TagSet = [ + 1, + n0, + _TS, + 0, + [ + () => Tag$, + { [_xN]: _Ta } + ] + ]; + TargetGrants = [ + 1, + n0, + _TG, + 0, + [ + () => TargetGrant$, + { [_xN]: _Gr } + ] + ]; + TieringList = [ + 1, + n0, + _TL, + 0, + () => Tiering$ + ]; + TopicConfigurationList = [ + 1, + n0, + _TCL, + 0, + [ + () => TopicConfiguration$, + 0 + ] + ]; + TransitionList = [ + 1, + n0, + _TLr, + 0, + () => Transition$ + ]; + UserMetadata = [ + 1, + n0, + _UM, + 0, + [ + () => MetadataEntry$, + { [_xN]: _ME } + ] + ]; + Metadata = 128 | 0; + AnalyticsFilter$ = [ + 4, + n0, + _AF, + 0, + [_P, _Ta, _An], + [0, () => Tag$, [() => AnalyticsAndOperator$, 0]] + ]; + MetricsFilter$ = [ + 4, + n0, + _MF, + 0, + [_P, _Ta, _APAc, _An], + [0, () => Tag$, 0, [() => MetricsAndOperator$, 0]] + ]; + ObjectEncryption$ = [ + 4, + n0, + _OE, + 0, + [_SSEKMS], + [[() => SSEKMSEncryption$, { [_xN]: _SK }]] + ]; + SelectObjectContentEventStream$ = [ + 4, + n0, + _SOCES, + { [_st]: 1 }, + [_Rec, _Sta, _Pr, _Cont, _End], + [[() => RecordsEvent$, 0], [() => StatsEvent$, 0], [() => ProgressEvent$, 0], () => ContinuationEvent$, () => EndEvent$] + ]; + AbortMultipartUpload$ = [ + 9, + n0, + _AMU, + { [_h]: ["DELETE", "/{Key+}?x-id=AbortMultipartUpload", 204] }, + () => AbortMultipartUploadRequest$, + () => AbortMultipartUploadOutput$ + ]; + CompleteMultipartUpload$ = [ + 9, + n0, + _CMUo, + { [_h]: ["POST", "/{Key+}", 200] }, + () => CompleteMultipartUploadRequest$, + () => CompleteMultipartUploadOutput$ + ]; + CopyObject$ = [ + 9, + n0, + _CO, + { [_h]: ["PUT", "/{Key+}?x-id=CopyObject", 200] }, + () => CopyObjectRequest$, + () => CopyObjectOutput$ + ]; + CreateBucket$ = [ + 9, + n0, + _CB, + { [_h]: ["PUT", "/", 200] }, + () => CreateBucketRequest$, + () => CreateBucketOutput$ + ]; + CreateBucketMetadataConfiguration$ = [ + 9, + n0, + _CBMC, + { [_hC]: "-", [_h]: ["POST", "/?metadataConfiguration", 200] }, + () => CreateBucketMetadataConfigurationRequest$, + () => __Unit + ]; + CreateBucketMetadataTableConfiguration$ = [ + 9, + n0, + _CBMTC, + { [_hC]: "-", [_h]: ["POST", "/?metadataTable", 200] }, + () => CreateBucketMetadataTableConfigurationRequest$, + () => __Unit + ]; + CreateMultipartUpload$ = [ + 9, + n0, + _CMUr, + { [_h]: ["POST", "/{Key+}?uploads", 200] }, + () => CreateMultipartUploadRequest$, + () => CreateMultipartUploadOutput$ + ]; + CreateSession$ = [ + 9, + n0, + _CSr, + { [_h]: ["GET", "/?session", 200] }, + () => CreateSessionRequest$, + () => CreateSessionOutput$ + ]; + DeleteBucket$ = [ + 9, + n0, + _DB, + { [_h]: ["DELETE", "/", 204] }, + () => DeleteBucketRequest$, + () => __Unit + ]; + DeleteBucketAnalyticsConfiguration$ = [ + 9, + n0, + _DBAC, + { [_h]: ["DELETE", "/?analytics", 204] }, + () => DeleteBucketAnalyticsConfigurationRequest$, + () => __Unit + ]; + DeleteBucketCors$ = [ + 9, + n0, + _DBC, + { [_h]: ["DELETE", "/?cors", 204] }, + () => DeleteBucketCorsRequest$, + () => __Unit + ]; + DeleteBucketEncryption$ = [ + 9, + n0, + _DBE, + { [_h]: ["DELETE", "/?encryption", 204] }, + () => DeleteBucketEncryptionRequest$, + () => __Unit + ]; + DeleteBucketIntelligentTieringConfiguration$ = [ + 9, + n0, + _DBITC, + { [_h]: ["DELETE", "/?intelligent-tiering", 204] }, + () => DeleteBucketIntelligentTieringConfigurationRequest$, + () => __Unit + ]; + DeleteBucketInventoryConfiguration$ = [ + 9, + n0, + _DBIC, + { [_h]: ["DELETE", "/?inventory", 204] }, + () => DeleteBucketInventoryConfigurationRequest$, + () => __Unit + ]; + DeleteBucketLifecycle$ = [ + 9, + n0, + _DBL, + { [_h]: ["DELETE", "/?lifecycle", 204] }, + () => DeleteBucketLifecycleRequest$, + () => __Unit + ]; + DeleteBucketMetadataConfiguration$ = [ + 9, + n0, + _DBMC, + { [_h]: ["DELETE", "/?metadataConfiguration", 204] }, + () => DeleteBucketMetadataConfigurationRequest$, + () => __Unit + ]; + DeleteBucketMetadataTableConfiguration$ = [ + 9, + n0, + _DBMTC, + { [_h]: ["DELETE", "/?metadataTable", 204] }, + () => DeleteBucketMetadataTableConfigurationRequest$, + () => __Unit + ]; + DeleteBucketMetricsConfiguration$ = [ + 9, + n0, + _DBMCe, + { [_h]: ["DELETE", "/?metrics", 204] }, + () => DeleteBucketMetricsConfigurationRequest$, + () => __Unit + ]; + DeleteBucketOwnershipControls$ = [ + 9, + n0, + _DBOC, + { [_h]: ["DELETE", "/?ownershipControls", 204] }, + () => DeleteBucketOwnershipControlsRequest$, + () => __Unit + ]; + DeleteBucketPolicy$ = [ + 9, + n0, + _DBP, + { [_h]: ["DELETE", "/?policy", 204] }, + () => DeleteBucketPolicyRequest$, + () => __Unit + ]; + DeleteBucketReplication$ = [ + 9, + n0, + _DBRe, + { [_h]: ["DELETE", "/?replication", 204] }, + () => DeleteBucketReplicationRequest$, + () => __Unit + ]; + DeleteBucketTagging$ = [ + 9, + n0, + _DBT, + { [_h]: ["DELETE", "/?tagging", 204] }, + () => DeleteBucketTaggingRequest$, + () => __Unit + ]; + DeleteBucketWebsite$ = [ + 9, + n0, + _DBW, + { [_h]: ["DELETE", "/?website", 204] }, + () => DeleteBucketWebsiteRequest$, + () => __Unit + ]; + DeleteObject$ = [ + 9, + n0, + _DOel, + { [_h]: ["DELETE", "/{Key+}?x-id=DeleteObject", 204] }, + () => DeleteObjectRequest$, + () => DeleteObjectOutput$ + ]; + DeleteObjects$ = [ + 9, + n0, + _DOele, + { [_hC]: "-", [_h]: ["POST", "/?delete", 200] }, + () => DeleteObjectsRequest$, + () => DeleteObjectsOutput$ + ]; + DeleteObjectTagging$ = [ + 9, + n0, + _DOT, + { [_h]: ["DELETE", "/{Key+}?tagging", 204] }, + () => DeleteObjectTaggingRequest$, + () => DeleteObjectTaggingOutput$ + ]; + DeletePublicAccessBlock$ = [ + 9, + n0, + _DPAB, + { [_h]: ["DELETE", "/?publicAccessBlock", 204] }, + () => DeletePublicAccessBlockRequest$, + () => __Unit + ]; + GetBucketAbac$ = [ + 9, + n0, + _GBA, + { [_h]: ["GET", "/?abac", 200] }, + () => GetBucketAbacRequest$, + () => GetBucketAbacOutput$ + ]; + GetBucketAccelerateConfiguration$ = [ + 9, + n0, + _GBAC, + { [_h]: ["GET", "/?accelerate", 200] }, + () => GetBucketAccelerateConfigurationRequest$, + () => GetBucketAccelerateConfigurationOutput$ + ]; + GetBucketAcl$ = [ + 9, + n0, + _GBAe, + { [_h]: ["GET", "/?acl", 200] }, + () => GetBucketAclRequest$, + () => GetBucketAclOutput$ + ]; + GetBucketAnalyticsConfiguration$ = [ + 9, + n0, + _GBACe, + { [_h]: ["GET", "/?analytics&x-id=GetBucketAnalyticsConfiguration", 200] }, + () => GetBucketAnalyticsConfigurationRequest$, + () => GetBucketAnalyticsConfigurationOutput$ + ]; + GetBucketCors$ = [ + 9, + n0, + _GBC, + { [_h]: ["GET", "/?cors", 200] }, + () => GetBucketCorsRequest$, + () => GetBucketCorsOutput$ + ]; + GetBucketEncryption$ = [ + 9, + n0, + _GBE, + { [_h]: ["GET", "/?encryption", 200] }, + () => GetBucketEncryptionRequest$, + () => GetBucketEncryptionOutput$ + ]; + GetBucketIntelligentTieringConfiguration$ = [ + 9, + n0, + _GBITC, + { [_h]: ["GET", "/?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", 200] }, + () => GetBucketIntelligentTieringConfigurationRequest$, + () => GetBucketIntelligentTieringConfigurationOutput$ + ]; + GetBucketInventoryConfiguration$ = [ + 9, + n0, + _GBIC, + { [_h]: ["GET", "/?inventory&x-id=GetBucketInventoryConfiguration", 200] }, + () => GetBucketInventoryConfigurationRequest$, + () => GetBucketInventoryConfigurationOutput$ + ]; + GetBucketLifecycleConfiguration$ = [ + 9, + n0, + _GBLC, + { [_h]: ["GET", "/?lifecycle", 200] }, + () => GetBucketLifecycleConfigurationRequest$, + () => GetBucketLifecycleConfigurationOutput$ + ]; + GetBucketLocation$ = [ + 9, + n0, + _GBL, + { [_h]: ["GET", "/?location", 200] }, + () => GetBucketLocationRequest$, + () => GetBucketLocationOutput$ + ]; + GetBucketLogging$ = [ + 9, + n0, + _GBLe, + { [_h]: ["GET", "/?logging", 200] }, + () => GetBucketLoggingRequest$, + () => GetBucketLoggingOutput$ + ]; + GetBucketMetadataConfiguration$ = [ + 9, + n0, + _GBMC, + { [_h]: ["GET", "/?metadataConfiguration", 200] }, + () => GetBucketMetadataConfigurationRequest$, + () => GetBucketMetadataConfigurationOutput$ + ]; + GetBucketMetadataTableConfiguration$ = [ + 9, + n0, + _GBMTC, + { [_h]: ["GET", "/?metadataTable", 200] }, + () => GetBucketMetadataTableConfigurationRequest$, + () => GetBucketMetadataTableConfigurationOutput$ + ]; + GetBucketMetricsConfiguration$ = [ + 9, + n0, + _GBMCe, + { [_h]: ["GET", "/?metrics&x-id=GetBucketMetricsConfiguration", 200] }, + () => GetBucketMetricsConfigurationRequest$, + () => GetBucketMetricsConfigurationOutput$ + ]; + GetBucketNotificationConfiguration$ = [ + 9, + n0, + _GBNC, + { [_h]: ["GET", "/?notification", 200] }, + () => GetBucketNotificationConfigurationRequest$, + () => NotificationConfiguration$ + ]; + GetBucketOwnershipControls$ = [ + 9, + n0, + _GBOC, + { [_h]: ["GET", "/?ownershipControls", 200] }, + () => GetBucketOwnershipControlsRequest$, + () => GetBucketOwnershipControlsOutput$ + ]; + GetBucketPolicy$ = [ + 9, + n0, + _GBP, + { [_h]: ["GET", "/?policy", 200] }, + () => GetBucketPolicyRequest$, + () => GetBucketPolicyOutput$ + ]; + GetBucketPolicyStatus$ = [ + 9, + n0, + _GBPS, + { [_h]: ["GET", "/?policyStatus", 200] }, + () => GetBucketPolicyStatusRequest$, + () => GetBucketPolicyStatusOutput$ + ]; + GetBucketReplication$ = [ + 9, + n0, + _GBR, + { [_h]: ["GET", "/?replication", 200] }, + () => GetBucketReplicationRequest$, + () => GetBucketReplicationOutput$ + ]; + GetBucketRequestPayment$ = [ + 9, + n0, + _GBRP, + { [_h]: ["GET", "/?requestPayment", 200] }, + () => GetBucketRequestPaymentRequest$, + () => GetBucketRequestPaymentOutput$ + ]; + GetBucketTagging$ = [ + 9, + n0, + _GBT, + { [_h]: ["GET", "/?tagging", 200] }, + () => GetBucketTaggingRequest$, + () => GetBucketTaggingOutput$ + ]; + GetBucketVersioning$ = [ + 9, + n0, + _GBV, + { [_h]: ["GET", "/?versioning", 200] }, + () => GetBucketVersioningRequest$, + () => GetBucketVersioningOutput$ + ]; + GetBucketWebsite$ = [ + 9, + n0, + _GBW, + { [_h]: ["GET", "/?website", 200] }, + () => GetBucketWebsiteRequest$, + () => GetBucketWebsiteOutput$ + ]; + GetObject$ = [ + 9, + n0, + _GO, + { [_hC]: "-", [_h]: ["GET", "/{Key+}?x-id=GetObject", 200] }, + () => GetObjectRequest$, + () => GetObjectOutput$ + ]; + GetObjectAcl$ = [ + 9, + n0, + _GOA, + { [_h]: ["GET", "/{Key+}?acl", 200] }, + () => GetObjectAclRequest$, + () => GetObjectAclOutput$ + ]; + GetObjectAttributes$ = [ + 9, + n0, + _GOAe, + { [_h]: ["GET", "/{Key+}?attributes", 200] }, + () => GetObjectAttributesRequest$, + () => GetObjectAttributesOutput$ + ]; + GetObjectLegalHold$ = [ + 9, + n0, + _GOLH, + { [_h]: ["GET", "/{Key+}?legal-hold", 200] }, + () => GetObjectLegalHoldRequest$, + () => GetObjectLegalHoldOutput$ + ]; + GetObjectLockConfiguration$ = [ + 9, + n0, + _GOLC, + { [_h]: ["GET", "/?object-lock", 200] }, + () => GetObjectLockConfigurationRequest$, + () => GetObjectLockConfigurationOutput$ + ]; + GetObjectRetention$ = [ + 9, + n0, + _GORe, + { [_h]: ["GET", "/{Key+}?retention", 200] }, + () => GetObjectRetentionRequest$, + () => GetObjectRetentionOutput$ + ]; + GetObjectTagging$ = [ + 9, + n0, + _GOT, + { [_h]: ["GET", "/{Key+}?tagging", 200] }, + () => GetObjectTaggingRequest$, + () => GetObjectTaggingOutput$ + ]; + GetObjectTorrent$ = [ + 9, + n0, + _GOTe, + { [_h]: ["GET", "/{Key+}?torrent", 200] }, + () => GetObjectTorrentRequest$, + () => GetObjectTorrentOutput$ + ]; + GetPublicAccessBlock$ = [ + 9, + n0, + _GPAB, + { [_h]: ["GET", "/?publicAccessBlock", 200] }, + () => GetPublicAccessBlockRequest$, + () => GetPublicAccessBlockOutput$ + ]; + HeadBucket$ = [ + 9, + n0, + _HB, + { [_h]: ["HEAD", "/", 200] }, + () => HeadBucketRequest$, + () => HeadBucketOutput$ + ]; + HeadObject$ = [ + 9, + n0, + _HO, + { [_h]: ["HEAD", "/{Key+}", 200] }, + () => HeadObjectRequest$, + () => HeadObjectOutput$ + ]; + ListBucketAnalyticsConfigurations$ = [ + 9, + n0, + _LBAC, + { [_h]: ["GET", "/?analytics&x-id=ListBucketAnalyticsConfigurations", 200] }, + () => ListBucketAnalyticsConfigurationsRequest$, + () => ListBucketAnalyticsConfigurationsOutput$ + ]; + ListBucketIntelligentTieringConfigurations$ = [ + 9, + n0, + _LBITC, + { [_h]: ["GET", "/?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", 200] }, + () => ListBucketIntelligentTieringConfigurationsRequest$, + () => ListBucketIntelligentTieringConfigurationsOutput$ + ]; + ListBucketInventoryConfigurations$ = [ + 9, + n0, + _LBIC, + { [_h]: ["GET", "/?inventory&x-id=ListBucketInventoryConfigurations", 200] }, + () => ListBucketInventoryConfigurationsRequest$, + () => ListBucketInventoryConfigurationsOutput$ + ]; + ListBucketMetricsConfigurations$ = [ + 9, + n0, + _LBMC, + { [_h]: ["GET", "/?metrics&x-id=ListBucketMetricsConfigurations", 200] }, + () => ListBucketMetricsConfigurationsRequest$, + () => ListBucketMetricsConfigurationsOutput$ + ]; + ListBuckets$ = [ + 9, + n0, + _LB, + { [_h]: ["GET", "/?x-id=ListBuckets", 200] }, + () => ListBucketsRequest$, + () => ListBucketsOutput$ + ]; + ListDirectoryBuckets$ = [ + 9, + n0, + _LDB, + { [_h]: ["GET", "/?x-id=ListDirectoryBuckets", 200] }, + () => ListDirectoryBucketsRequest$, + () => ListDirectoryBucketsOutput$ + ]; + ListMultipartUploads$ = [ + 9, + n0, + _LMU, + { [_h]: ["GET", "/?uploads", 200] }, + () => ListMultipartUploadsRequest$, + () => ListMultipartUploadsOutput$ + ]; + ListObjects$ = [ + 9, + n0, + _LO, + { [_h]: ["GET", "/", 200] }, + () => ListObjectsRequest$, + () => ListObjectsOutput$ + ]; + ListObjectsV2$ = [ + 9, + n0, + _LOV, + { [_h]: ["GET", "/?list-type=2", 200] }, + () => ListObjectsV2Request$, + () => ListObjectsV2Output$ + ]; + ListObjectVersions$ = [ + 9, + n0, + _LOVi, + { [_h]: ["GET", "/?versions", 200] }, + () => ListObjectVersionsRequest$, + () => ListObjectVersionsOutput$ + ]; + ListParts$ = [ + 9, + n0, + _LP, + { [_h]: ["GET", "/{Key+}?x-id=ListParts", 200] }, + () => ListPartsRequest$, + () => ListPartsOutput$ + ]; + PutBucketAbac$ = [ + 9, + n0, + _PBA, + { [_hC]: "-", [_h]: ["PUT", "/?abac", 200] }, + () => PutBucketAbacRequest$, + () => __Unit + ]; + PutBucketAccelerateConfiguration$ = [ + 9, + n0, + _PBAC, + { [_hC]: "-", [_h]: ["PUT", "/?accelerate", 200] }, + () => PutBucketAccelerateConfigurationRequest$, + () => __Unit + ]; + PutBucketAcl$ = [ + 9, + n0, + _PBAu, + { [_hC]: "-", [_h]: ["PUT", "/?acl", 200] }, + () => PutBucketAclRequest$, + () => __Unit + ]; + PutBucketAnalyticsConfiguration$ = [ + 9, + n0, + _PBACu, + { [_h]: ["PUT", "/?analytics", 200] }, + () => PutBucketAnalyticsConfigurationRequest$, + () => __Unit + ]; + PutBucketCors$ = [ + 9, + n0, + _PBC, + { [_hC]: "-", [_h]: ["PUT", "/?cors", 200] }, + () => PutBucketCorsRequest$, + () => __Unit + ]; + PutBucketEncryption$ = [ + 9, + n0, + _PBE, + { [_hC]: "-", [_h]: ["PUT", "/?encryption", 200] }, + () => PutBucketEncryptionRequest$, + () => __Unit + ]; + PutBucketIntelligentTieringConfiguration$ = [ + 9, + n0, + _PBITC, + { [_h]: ["PUT", "/?intelligent-tiering", 200] }, + () => PutBucketIntelligentTieringConfigurationRequest$, + () => __Unit + ]; + PutBucketInventoryConfiguration$ = [ + 9, + n0, + _PBIC, + { [_h]: ["PUT", "/?inventory", 200] }, + () => PutBucketInventoryConfigurationRequest$, + () => __Unit + ]; + PutBucketLifecycleConfiguration$ = [ + 9, + n0, + _PBLC, + { [_hC]: "-", [_h]: ["PUT", "/?lifecycle", 200] }, + () => PutBucketLifecycleConfigurationRequest$, + () => PutBucketLifecycleConfigurationOutput$ + ]; + PutBucketLogging$ = [ + 9, + n0, + _PBL, + { [_hC]: "-", [_h]: ["PUT", "/?logging", 200] }, + () => PutBucketLoggingRequest$, + () => __Unit + ]; + PutBucketMetricsConfiguration$ = [ + 9, + n0, + _PBMC, + { [_h]: ["PUT", "/?metrics", 200] }, + () => PutBucketMetricsConfigurationRequest$, + () => __Unit + ]; + PutBucketNotificationConfiguration$ = [ + 9, + n0, + _PBNC, + { [_h]: ["PUT", "/?notification", 200] }, + () => PutBucketNotificationConfigurationRequest$, + () => __Unit + ]; + PutBucketOwnershipControls$ = [ + 9, + n0, + _PBOC, + { [_hC]: "-", [_h]: ["PUT", "/?ownershipControls", 200] }, + () => PutBucketOwnershipControlsRequest$, + () => __Unit + ]; + PutBucketPolicy$ = [ + 9, + n0, + _PBP, + { [_hC]: "-", [_h]: ["PUT", "/?policy", 200] }, + () => PutBucketPolicyRequest$, + () => __Unit + ]; + PutBucketReplication$ = [ + 9, + n0, + _PBR, + { [_hC]: "-", [_h]: ["PUT", "/?replication", 200] }, + () => PutBucketReplicationRequest$, + () => __Unit + ]; + PutBucketRequestPayment$ = [ + 9, + n0, + _PBRP, + { [_hC]: "-", [_h]: ["PUT", "/?requestPayment", 200] }, + () => PutBucketRequestPaymentRequest$, + () => __Unit + ]; + PutBucketTagging$ = [ + 9, + n0, + _PBT, + { [_hC]: "-", [_h]: ["PUT", "/?tagging", 200] }, + () => PutBucketTaggingRequest$, + () => __Unit + ]; + PutBucketVersioning$ = [ + 9, + n0, + _PBV, + { [_hC]: "-", [_h]: ["PUT", "/?versioning", 200] }, + () => PutBucketVersioningRequest$, + () => __Unit + ]; + PutBucketWebsite$ = [ + 9, + n0, + _PBW, + { [_hC]: "-", [_h]: ["PUT", "/?website", 200] }, + () => PutBucketWebsiteRequest$, + () => __Unit + ]; + PutObject$ = [ + 9, + n0, + _PO, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?x-id=PutObject", 200] }, + () => PutObjectRequest$, + () => PutObjectOutput$ + ]; + PutObjectAcl$ = [ + 9, + n0, + _POA, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?acl", 200] }, + () => PutObjectAclRequest$, + () => PutObjectAclOutput$ + ]; + PutObjectLegalHold$ = [ + 9, + n0, + _POLH, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?legal-hold", 200] }, + () => PutObjectLegalHoldRequest$, + () => PutObjectLegalHoldOutput$ + ]; + PutObjectLockConfiguration$ = [ + 9, + n0, + _POLC, + { [_hC]: "-", [_h]: ["PUT", "/?object-lock", 200] }, + () => PutObjectLockConfigurationRequest$, + () => PutObjectLockConfigurationOutput$ + ]; + PutObjectRetention$ = [ + 9, + n0, + _PORu, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?retention", 200] }, + () => PutObjectRetentionRequest$, + () => PutObjectRetentionOutput$ + ]; + PutObjectTagging$ = [ + 9, + n0, + _POT, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?tagging", 200] }, + () => PutObjectTaggingRequest$, + () => PutObjectTaggingOutput$ + ]; + PutPublicAccessBlock$ = [ + 9, + n0, + _PPAB, + { [_hC]: "-", [_h]: ["PUT", "/?publicAccessBlock", 200] }, + () => PutPublicAccessBlockRequest$, + () => __Unit + ]; + RenameObject$ = [ + 9, + n0, + _RO, + { [_h]: ["PUT", "/{Key+}?renameObject", 200] }, + () => RenameObjectRequest$, + () => RenameObjectOutput$ + ]; + RestoreObject$ = [ + 9, + n0, + _ROe, + { [_hC]: "-", [_h]: ["POST", "/{Key+}?restore", 200] }, + () => RestoreObjectRequest$, + () => RestoreObjectOutput$ + ]; + SelectObjectContent$ = [ + 9, + n0, + _SOC, + { [_h]: ["POST", "/{Key+}?select&select-type=2", 200] }, + () => SelectObjectContentRequest$, + () => SelectObjectContentOutput$ + ]; + UpdateBucketMetadataInventoryTableConfiguration$ = [ + 9, + n0, + _UBMITC, + { [_hC]: "-", [_h]: ["PUT", "/?metadataInventoryTable", 200] }, + () => UpdateBucketMetadataInventoryTableConfigurationRequest$, + () => __Unit + ]; + UpdateBucketMetadataJournalTableConfiguration$ = [ + 9, + n0, + _UBMJTC, + { [_hC]: "-", [_h]: ["PUT", "/?metadataJournalTable", 200] }, + () => UpdateBucketMetadataJournalTableConfigurationRequest$, + () => __Unit + ]; + UpdateObjectEncryption$ = [ + 9, + n0, + _UOE, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?encryption", 200] }, + () => UpdateObjectEncryptionRequest$, + () => UpdateObjectEncryptionResponse$ + ]; + UploadPart$ = [ + 9, + n0, + _UP, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?x-id=UploadPart", 200] }, + () => UploadPartRequest$, + () => UploadPartOutput$ + ]; + UploadPartCopy$ = [ + 9, + n0, + _UPC, + { [_h]: ["PUT", "/{Key+}?x-id=UploadPartCopy", 200] }, + () => UploadPartCopyRequest$, + () => UploadPartCopyOutput$ + ]; + WriteGetObjectResponse$ = [ + 9, + n0, + _WGOR, + { [_en]: ["{RequestRoute}."], [_h]: ["POST", "/WriteGetObjectResponse", 200] }, + () => WriteGetObjectResponseRequest$, + () => __Unit + ]; + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateSessionCommand.js +var CreateSessionCommand; +var init_CreateSessionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateSessionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CreateSessionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "CreateSession", {}).n("S3Client", "CreateSessionCommand").sc(CreateSession$).build() { + }; + __name(CreateSessionCommand, "CreateSessionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/package.json +var package_default; +var init_package = __esm({ + "../../node_modules/@aws-sdk/client-s3/package.json"() { + package_default = { + name: "@aws-sdk/client-s3", + description: "AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native", + version: "3.1009.0", + scripts: { + build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs", + "build:cjs": "node ../../scripts/compilation/inline client-s3", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"', + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo s3", + test: "yarn g:vitest run", + "test:browser": "node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.mts", + "test:browser:watch": "node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.mts", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts && yarn test:browser", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", + "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs", + "test:integration": "yarn g:vitest run -c vitest.config.integ.mts", + "test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts", + "test:watch": "yarn g:vitest watch" + }, + main: "./dist-cjs/index.js", + types: "./dist-types/index.d.ts", + module: "./dist-es/index.js", + sideEffects: false, + dependencies: { + "@aws-crypto/sha1-browser": "5.2.0", + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "^3.973.20", + "@aws-sdk/credential-provider-node": "^3.972.21", + "@aws-sdk/middleware-bucket-endpoint": "^3.972.8", + "@aws-sdk/middleware-expect-continue": "^3.972.8", + "@aws-sdk/middleware-flexible-checksums": "^3.973.6", + "@aws-sdk/middleware-host-header": "^3.972.8", + "@aws-sdk/middleware-location-constraint": "^3.972.8", + "@aws-sdk/middleware-logger": "^3.972.8", + "@aws-sdk/middleware-recursion-detection": "^3.972.8", + "@aws-sdk/middleware-sdk-s3": "^3.972.20", + "@aws-sdk/middleware-ssec": "^3.972.8", + "@aws-sdk/middleware-user-agent": "^3.972.21", + "@aws-sdk/region-config-resolver": "^3.972.8", + "@aws-sdk/signature-v4-multi-region": "^3.996.8", + "@aws-sdk/types": "^3.973.6", + "@aws-sdk/util-endpoints": "^3.996.5", + "@aws-sdk/util-user-agent-browser": "^3.972.8", + "@aws-sdk/util-user-agent-node": "^3.973.7", + "@smithy/config-resolver": "^4.4.11", + "@smithy/core": "^3.23.11", + "@smithy/eventstream-serde-browser": "^4.2.12", + "@smithy/eventstream-serde-config-resolver": "^4.3.12", + "@smithy/eventstream-serde-node": "^4.2.12", + "@smithy/fetch-http-handler": "^5.3.15", + "@smithy/hash-blob-browser": "^4.2.13", + "@smithy/hash-node": "^4.2.12", + "@smithy/hash-stream-node": "^4.2.12", + "@smithy/invalid-dependency": "^4.2.12", + "@smithy/md5-js": "^4.2.12", + "@smithy/middleware-content-length": "^4.2.12", + "@smithy/middleware-endpoint": "^4.4.25", + "@smithy/middleware-retry": "^4.4.42", + "@smithy/middleware-serde": "^4.2.14", + "@smithy/middleware-stack": "^4.2.12", + "@smithy/node-config-provider": "^4.3.12", + "@smithy/node-http-handler": "^4.4.16", + "@smithy/protocol-http": "^5.3.12", + "@smithy/smithy-client": "^4.12.5", + "@smithy/types": "^4.13.1", + "@smithy/url-parser": "^4.2.12", + "@smithy/util-base64": "^4.3.2", + "@smithy/util-body-length-browser": "^4.2.2", + "@smithy/util-body-length-node": "^4.2.3", + "@smithy/util-defaults-mode-browser": "^4.3.41", + "@smithy/util-defaults-mode-node": "^4.2.44", + "@smithy/util-endpoints": "^3.3.3", + "@smithy/util-middleware": "^4.2.12", + "@smithy/util-retry": "^4.2.12", + "@smithy/util-stream": "^4.5.19", + "@smithy/util-utf8": "^4.2.2", + "@smithy/util-waiter": "^4.2.13", + tslib: "^2.6.2" + }, + devDependencies: { + "@aws-sdk/signature-v4-crt": "3.1009.0", + "@smithy/snapshot-testing": "^2.0.2", + "@tsconfig/node20": "20.1.8", + "@types/node": "^20.14.8", + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + premove: "4.0.0", + typescript: "~5.8.3", + vitest: "^4.0.17" + }, + engines: { + node: ">=20.0.0" + }, + typesVersions: { + "<4.5": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + files: [ + "dist-*/**" + ], + author: { + name: "AWS SDK for JavaScript Team", + url: "https://aws.amazon.com/javascript/" + }, + license: "Apache-2.0", + browser: { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "clients/client-s3" + } + }; + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js +var fromUtf84; +var init_fromUtf8_browser3 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fromUtf84 = /* @__PURE__ */ __name((input) => new TextEncoder().encode(input), "fromUtf8"); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js +var init_toUint8Array3 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser3(); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +var init_toUtf8_browser3 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/index.js +var init_dist_es44 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser3(); + init_toUint8Array3(); + init_toUtf8_browser3(); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/build/module/isEmptyData.js +function isEmptyData2(data) { + if (typeof data === "string") { + return data.length === 0; + } + return data.byteLength === 0; +} +var init_isEmptyData2 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/build/module/isEmptyData.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(isEmptyData2, "isEmptyData"); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/build/module/constants.js +var SHA_1_HASH, SHA_1_HMAC_ALGO, EMPTY_DATA_SHA_1; +var init_constants10 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/build/module/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SHA_1_HASH = { name: "SHA-1" }; + SHA_1_HMAC_ALGO = { + name: "HMAC", + hash: SHA_1_HASH + }; + EMPTY_DATA_SHA_1 = new Uint8Array([ + 218, + 57, + 163, + 238, + 94, + 107, + 75, + 13, + 50, + 85, + 191, + 239, + 149, + 96, + 24, + 144, + 175, + 216, + 7, + 9 + ]); + } +}); + +// ../../node_modules/@aws-sdk/util-locate-window/dist-es/index.js +function locateWindow() { + if (typeof window !== "undefined") { + return window; + } else if (typeof self !== "undefined") { + return self; + } + return fallbackWindow; +} +var fallbackWindow; +var init_dist_es45 = __esm({ + "../../node_modules/@aws-sdk/util-locate-window/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fallbackWindow = {}; + __name(locateWindow, "locateWindow"); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/build/module/webCryptoSha1.js +function convertToBuffer2(data) { + if (typeof data === "string") { + return fromUtf84(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); +} +var Sha1; +var init_webCryptoSha1 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/build/module/webCryptoSha1.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es44(); + init_isEmptyData2(); + init_constants10(); + init_dist_es45(); + Sha1 = /** @class */ + function() { + function Sha13(secret) { + this.toHash = new Uint8Array(0); + if (secret !== void 0) { + this.key = new Promise(function(resolve, reject) { + locateWindow().crypto.subtle.importKey("raw", convertToBuffer2(secret), SHA_1_HMAC_ALGO, false, ["sign"]).then(resolve, reject); + }); + this.key.catch(function() { + }); + } + } + __name(Sha13, "Sha1"); + Sha13.prototype.update = function(data) { + if (isEmptyData2(data)) { + return; + } + var update = convertToBuffer2(data); + var typedArray = new Uint8Array(this.toHash.byteLength + update.byteLength); + typedArray.set(this.toHash, 0); + typedArray.set(update, this.toHash.byteLength); + this.toHash = typedArray; + }; + Sha13.prototype.digest = function() { + var _this = this; + if (this.key) { + return this.key.then(function(key) { + return locateWindow().crypto.subtle.sign(SHA_1_HMAC_ALGO, key, _this.toHash).then(function(data) { + return new Uint8Array(data); + }); + }); + } + if (isEmptyData2(this.toHash)) { + return Promise.resolve(EMPTY_DATA_SHA_1); + } + return Promise.resolve().then(function() { + return locateWindow().crypto.subtle.digest(SHA_1_HASH, _this.toHash); + }).then(function(data) { + return Promise.resolve(new Uint8Array(data)); + }); + }; + Sha13.prototype.reset = function() { + this.toHash = new Uint8Array(0); + }; + return Sha13; + }(); + __name(convertToBuffer2, "convertToBuffer"); + } +}); + +// ../../node_modules/@aws-crypto/supports-web-crypto/build/module/supportsWebCrypto.js +function supportsWebCrypto(window2) { + if (supportsSecureRandom(window2) && typeof window2.crypto.subtle === "object") { + var subtle3 = window2.crypto.subtle; + return supportsSubtleCrypto(subtle3); + } + return false; +} +function supportsSecureRandom(window2) { + if (typeof window2 === "object" && typeof window2.crypto === "object") { + var getRandomValues2 = window2.crypto.getRandomValues; + return typeof getRandomValues2 === "function"; + } + return false; +} +function supportsSubtleCrypto(subtle3) { + return subtle3 && subtleCryptoMethods.every(function(methodName) { + return typeof subtle3[methodName] === "function"; + }); +} +var subtleCryptoMethods; +var init_supportsWebCrypto = __esm({ + "../../node_modules/@aws-crypto/supports-web-crypto/build/module/supportsWebCrypto.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + subtleCryptoMethods = [ + "decrypt", + "digest", + "encrypt", + "exportKey", + "generateKey", + "importKey", + "sign", + "verify" + ]; + __name(supportsWebCrypto, "supportsWebCrypto"); + __name(supportsSecureRandom, "supportsSecureRandom"); + __name(supportsSubtleCrypto, "supportsSubtleCrypto"); + } +}); + +// ../../node_modules/@aws-crypto/supports-web-crypto/build/module/index.js +var init_module4 = __esm({ + "../../node_modules/@aws-crypto/supports-web-crypto/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_supportsWebCrypto(); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/build/module/crossPlatformSha1.js +var Sha12; +var init_crossPlatformSha1 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/build/module/crossPlatformSha1.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_webCryptoSha1(); + init_module4(); + init_dist_es45(); + init_module(); + Sha12 = /** @class */ + function() { + function Sha13(secret) { + if (supportsWebCrypto(locateWindow())) { + this.hash = new Sha1(secret); + } else { + throw new Error("SHA1 not supported"); + } + } + __name(Sha13, "Sha1"); + Sha13.prototype.update = function(data, encoding) { + this.hash.update(convertToBuffer(data)); + }; + Sha13.prototype.digest = function() { + return this.hash.digest(); + }; + Sha13.prototype.reset = function() { + this.hash.reset(); + }; + return Sha13; + }(); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/build/module/index.js +var init_module5 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_crossPlatformSha1(); + init_webCryptoSha1(); + } +}); + +// ../../node_modules/@aws-crypto/sha256-browser/build/module/constants.js +var SHA_256_HASH, SHA_256_HMAC_ALGO, EMPTY_DATA_SHA_256; +var init_constants11 = __esm({ + "../../node_modules/@aws-crypto/sha256-browser/build/module/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SHA_256_HASH = { name: "SHA-256" }; + SHA_256_HMAC_ALGO = { + name: "HMAC", + hash: SHA_256_HASH + }; + EMPTY_DATA_SHA_256 = new Uint8Array([ + 227, + 176, + 196, + 66, + 152, + 252, + 28, + 20, + 154, + 251, + 244, + 200, + 153, + 111, + 185, + 36, + 39, + 174, + 65, + 228, + 100, + 155, + 147, + 76, + 164, + 149, + 153, + 27, + 120, + 82, + 184, + 85 + ]); + } +}); + +// ../../node_modules/@aws-crypto/sha256-browser/build/module/webCryptoSha256.js +var Sha256; +var init_webCryptoSha256 = __esm({ + "../../node_modules/@aws-crypto/sha256-browser/build/module/webCryptoSha256.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_module(); + init_constants11(); + init_dist_es45(); + Sha256 = /** @class */ + function() { + function Sha2564(secret) { + this.toHash = new Uint8Array(0); + this.secret = secret; + this.reset(); + } + __name(Sha2564, "Sha256"); + Sha2564.prototype.update = function(data) { + if (isEmptyData(data)) { + return; + } + var update = convertToBuffer(data); + var typedArray = new Uint8Array(this.toHash.byteLength + update.byteLength); + typedArray.set(this.toHash, 0); + typedArray.set(update, this.toHash.byteLength); + this.toHash = typedArray; + }; + Sha2564.prototype.digest = function() { + var _this = this; + if (this.key) { + return this.key.then(function(key) { + return locateWindow().crypto.subtle.sign(SHA_256_HMAC_ALGO, key, _this.toHash).then(function(data) { + return new Uint8Array(data); + }); + }); + } + if (isEmptyData(this.toHash)) { + return Promise.resolve(EMPTY_DATA_SHA_256); + } + return Promise.resolve().then(function() { + return locateWindow().crypto.subtle.digest(SHA_256_HASH, _this.toHash); + }).then(function(data) { + return Promise.resolve(new Uint8Array(data)); + }); + }; + Sha2564.prototype.reset = function() { + var _this = this; + this.toHash = new Uint8Array(0); + if (this.secret && this.secret !== void 0) { + this.key = new Promise(function(resolve, reject) { + locateWindow().crypto.subtle.importKey("raw", convertToBuffer(_this.secret), SHA_256_HMAC_ALGO, false, ["sign"]).then(resolve, reject); + }); + this.key.catch(function() { + }); + } + }; + return Sha2564; + }(); + } +}); + +// ../../node_modules/@aws-crypto/sha256-js/build/module/constants.js +var BLOCK_SIZE, DIGEST_LENGTH, KEY, INIT, MAX_HASHABLE_LENGTH; +var init_constants12 = __esm({ + "../../node_modules/@aws-crypto/sha256-js/build/module/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + BLOCK_SIZE = 64; + DIGEST_LENGTH = 32; + KEY = new Uint32Array([ + 1116352408, + 1899447441, + 3049323471, + 3921009573, + 961987163, + 1508970993, + 2453635748, + 2870763221, + 3624381080, + 310598401, + 607225278, + 1426881987, + 1925078388, + 2162078206, + 2614888103, + 3248222580, + 3835390401, + 4022224774, + 264347078, + 604807628, + 770255983, + 1249150122, + 1555081692, + 1996064986, + 2554220882, + 2821834349, + 2952996808, + 3210313671, + 3336571891, + 3584528711, + 113926993, + 338241895, + 666307205, + 773529912, + 1294757372, + 1396182291, + 1695183700, + 1986661051, + 2177026350, + 2456956037, + 2730485921, + 2820302411, + 3259730800, + 3345764771, + 3516065817, + 3600352804, + 4094571909, + 275423344, + 430227734, + 506948616, + 659060556, + 883997877, + 958139571, + 1322822218, + 1537002063, + 1747873779, + 1955562222, + 2024104815, + 2227730452, + 2361852424, + 2428436474, + 2756734187, + 3204031479, + 3329325298 + ]); + INIT = [ + 1779033703, + 3144134277, + 1013904242, + 2773480762, + 1359893119, + 2600822924, + 528734635, + 1541459225 + ]; + MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1; + } +}); + +// ../../node_modules/@aws-crypto/sha256-js/build/module/RawSha256.js +var RawSha256; +var init_RawSha256 = __esm({ + "../../node_modules/@aws-crypto/sha256-js/build/module/RawSha256.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants12(); + RawSha256 = /** @class */ + function() { + function RawSha2562() { + this.state = Int32Array.from(INIT); + this.temp = new Int32Array(64); + this.buffer = new Uint8Array(64); + this.bufferLength = 0; + this.bytesHashed = 0; + this.finished = false; + } + __name(RawSha2562, "RawSha256"); + RawSha2562.prototype.update = function(data) { + if (this.finished) { + throw new Error("Attempted to update an already finished hash."); + } + var position = 0; + var byteLength = data.byteLength; + this.bytesHashed += byteLength; + if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) { + throw new Error("Cannot hash more than 2^53 - 1 bits"); + } + while (byteLength > 0) { + this.buffer[this.bufferLength++] = data[position++]; + byteLength--; + if (this.bufferLength === BLOCK_SIZE) { + this.hashBuffer(); + this.bufferLength = 0; + } + } + }; + RawSha2562.prototype.digest = function() { + if (!this.finished) { + var bitsHashed = this.bytesHashed * 8; + var bufferView = new DataView(this.buffer.buffer, this.buffer.byteOffset, this.buffer.byteLength); + var undecoratedLength = this.bufferLength; + bufferView.setUint8(this.bufferLength++, 128); + if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) { + for (var i2 = this.bufferLength; i2 < BLOCK_SIZE; i2++) { + bufferView.setUint8(i2, 0); + } + this.hashBuffer(); + this.bufferLength = 0; + } + for (var i2 = this.bufferLength; i2 < BLOCK_SIZE - 8; i2++) { + bufferView.setUint8(i2, 0); + } + bufferView.setUint32(BLOCK_SIZE - 8, Math.floor(bitsHashed / 4294967296), true); + bufferView.setUint32(BLOCK_SIZE - 4, bitsHashed); + this.hashBuffer(); + this.finished = true; + } + var out = new Uint8Array(DIGEST_LENGTH); + for (var i2 = 0; i2 < 8; i2++) { + out[i2 * 4] = this.state[i2] >>> 24 & 255; + out[i2 * 4 + 1] = this.state[i2] >>> 16 & 255; + out[i2 * 4 + 2] = this.state[i2] >>> 8 & 255; + out[i2 * 4 + 3] = this.state[i2] >>> 0 & 255; + } + return out; + }; + RawSha2562.prototype.hashBuffer = function() { + var _a124 = this, buffer = _a124.buffer, state = _a124.state; + var state0 = state[0], state1 = state[1], state2 = state[2], state3 = state[3], state4 = state[4], state5 = state[5], state6 = state[6], state7 = state[7]; + for (var i2 = 0; i2 < BLOCK_SIZE; i2++) { + if (i2 < 16) { + this.temp[i2] = (buffer[i2 * 4] & 255) << 24 | (buffer[i2 * 4 + 1] & 255) << 16 | (buffer[i2 * 4 + 2] & 255) << 8 | buffer[i2 * 4 + 3] & 255; + } else { + var u5 = this.temp[i2 - 2]; + var t1_1 = (u5 >>> 17 | u5 << 15) ^ (u5 >>> 19 | u5 << 13) ^ u5 >>> 10; + u5 = this.temp[i2 - 15]; + var t2_1 = (u5 >>> 7 | u5 << 25) ^ (u5 >>> 18 | u5 << 14) ^ u5 >>> 3; + this.temp[i2] = (t1_1 + this.temp[i2 - 7] | 0) + (t2_1 + this.temp[i2 - 16] | 0); + } + var t12 = (((state4 >>> 6 | state4 << 26) ^ (state4 >>> 11 | state4 << 21) ^ (state4 >>> 25 | state4 << 7)) + (state4 & state5 ^ ~state4 & state6) | 0) + (state7 + (KEY[i2] + this.temp[i2] | 0) | 0) | 0; + var t22 = ((state0 >>> 2 | state0 << 30) ^ (state0 >>> 13 | state0 << 19) ^ (state0 >>> 22 | state0 << 10)) + (state0 & state1 ^ state0 & state2 ^ state1 & state2) | 0; + state7 = state6; + state6 = state5; + state5 = state4; + state4 = state3 + t12 | 0; + state3 = state2; + state2 = state1; + state1 = state0; + state0 = t12 + t22 | 0; + } + state[0] += state0; + state[1] += state1; + state[2] += state2; + state[3] += state3; + state[4] += state4; + state[5] += state5; + state[6] += state6; + state[7] += state7; + }; + return RawSha2562; + }(); + } +}); + +// ../../node_modules/@aws-crypto/sha256-js/build/module/jsSha256.js +function bufferFromSecret(secret) { + var input = convertToBuffer(secret); + if (input.byteLength > BLOCK_SIZE) { + var bufferHash = new RawSha256(); + bufferHash.update(input); + input = bufferHash.digest(); + } + var buffer = new Uint8Array(BLOCK_SIZE); + buffer.set(input); + return buffer; +} +var Sha2562; +var init_jsSha256 = __esm({ + "../../node_modules/@aws-crypto/sha256-js/build/module/jsSha256.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tslib_es6(); + init_constants12(); + init_RawSha256(); + init_module(); + Sha2562 = /** @class */ + function() { + function Sha2564(secret) { + this.secret = secret; + this.hash = new RawSha256(); + this.reset(); + } + __name(Sha2564, "Sha256"); + Sha2564.prototype.update = function(toHash) { + if (isEmptyData(toHash) || this.error) { + return; + } + try { + this.hash.update(convertToBuffer(toHash)); + } catch (e2) { + this.error = e2; + } + }; + Sha2564.prototype.digestSync = function() { + if (this.error) { + throw this.error; + } + if (this.outer) { + if (!this.outer.finished) { + this.outer.update(this.hash.digest()); + } + return this.outer.digest(); + } + return this.hash.digest(); + }; + Sha2564.prototype.digest = function() { + return __awaiter(this, void 0, void 0, function() { + return __generator(this, function(_a124) { + return [2, this.digestSync()]; + }); + }); + }; + Sha2564.prototype.reset = function() { + this.hash = new RawSha256(); + if (this.secret) { + this.outer = new RawSha256(); + var inner = bufferFromSecret(this.secret); + var outer = new Uint8Array(BLOCK_SIZE); + outer.set(inner); + for (var i2 = 0; i2 < BLOCK_SIZE; i2++) { + inner[i2] ^= 54; + outer[i2] ^= 92; + } + this.hash.update(inner); + this.outer.update(outer); + for (var i2 = 0; i2 < inner.byteLength; i2++) { + inner[i2] = 0; + } + } + }; + return Sha2564; + }(); + __name(bufferFromSecret, "bufferFromSecret"); + } +}); + +// ../../node_modules/@aws-crypto/sha256-js/build/module/index.js +var init_module6 = __esm({ + "../../node_modules/@aws-crypto/sha256-js/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_jsSha256(); + } +}); + +// ../../node_modules/@aws-crypto/sha256-browser/build/module/crossPlatformSha256.js +var Sha2563; +var init_crossPlatformSha256 = __esm({ + "../../node_modules/@aws-crypto/sha256-browser/build/module/crossPlatformSha256.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_webCryptoSha256(); + init_module6(); + init_module4(); + init_dist_es45(); + init_module(); + Sha2563 = /** @class */ + function() { + function Sha2564(secret) { + if (supportsWebCrypto(locateWindow())) { + this.hash = new Sha256(secret); + } else { + this.hash = new Sha2562(secret); + } + } + __name(Sha2564, "Sha256"); + Sha2564.prototype.update = function(data, encoding) { + this.hash.update(convertToBuffer(data)); + }; + Sha2564.prototype.digest = function() { + return this.hash.digest(); + }; + Sha2564.prototype.reset = function() { + this.hash.reset(); + }; + return Sha2564; + }(); + } +}); + +// ../../node_modules/@aws-crypto/sha256-browser/build/module/index.js +var init_module7 = __esm({ + "../../node_modules/@aws-crypto/sha256-browser/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_crossPlatformSha256(); + init_webCryptoSha256(); + } +}); + +// ../../node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js +var createDefaultUserAgentProvider, fallback; +var init_dist_es46 = __esm({ + "../../node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + createDefaultUserAgentProvider = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => async (config3) => { + const navigator2 = typeof window !== "undefined" ? window.navigator : void 0; + const uaString = navigator2?.userAgent ?? ""; + const osName = navigator2?.userAgentData?.platform ?? fallback.os(uaString) ?? "other"; + const osVersion = void 0; + const brands = navigator2?.userAgentData?.brands ?? []; + const brand = brands[brands.length - 1]; + const browserName = brand?.brand ?? fallback.browser(uaString) ?? "unknown"; + const browserVersion = brand?.version ?? "unknown"; + const sections = [ + ["aws-sdk-js", clientVersion], + ["ua", "2.1"], + [`os/${osName}`, osVersion], + ["lang/js"], + ["md/browser", `${browserName}_${browserVersion}`] + ]; + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); + } + const appId = await config3?.userAgentAppId?.(); + if (appId) { + sections.push([`app/${appId}`]); + } + return sections; + }, "createDefaultUserAgentProvider"); + fallback = { + os(ua) { + if (/iPhone|iPad|iPod/.test(ua)) + return "iOS"; + if (/Macintosh|Mac OS X/.test(ua)) + return "macOS"; + if (/Windows NT/.test(ua)) + return "Windows"; + if (/Android/.test(ua)) + return "Android"; + if (/Linux/.test(ua)) + return "Linux"; + return void 0; + }, + browser(ua) { + if (/EdgiOS|EdgA|Edg\//.test(ua)) + return "Microsoft Edge"; + if (/Firefox\//.test(ua)) + return "Firefox"; + if (/Chrome\//.test(ua)) + return "Chrome"; + if (/Safari\//.test(ua)) + return "Safari"; + return void 0; + } + }; + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/Int64.js +function negate2(bytes) { + for (let i2 = 0; i2 < 8; i2++) { + bytes[i2] ^= 255; + } + for (let i2 = 7; i2 > -1; i2--) { + bytes[i2]++; + if (bytes[i2] !== 0) + break; + } +} +var Int642; +var init_Int64 = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/Int64.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + Int642 = class { + bytes; + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static fromNumber(number4) { + if (number4 > 9223372036854776e3 || number4 < -9223372036854776e3) { + throw new Error(`${number4} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i2 = 7, remaining = Math.abs(Math.round(number4)); i2 > -1 && remaining > 0; i2--, remaining /= 256) { + bytes[i2] = remaining; + } + if (number4 < 0) { + negate2(bytes); + } + return new Int642(bytes); + } + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate2(bytes); + } + return parseInt(toHex(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } + }; + __name(Int642, "Int64"); + __name(negate2, "negate"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/HeaderMarshaller.js +var HeaderMarshaller, HEADER_VALUE_TYPE2, BOOLEAN_TAG, BYTE_TAG, SHORT_TAG, INT_TAG, LONG_TAG, BINARY_TAG, STRING_TAG, TIMESTAMP_TAG, UUID_TAG, UUID_PATTERN2; +var init_HeaderMarshaller = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/HeaderMarshaller.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + init_Int64(); + HeaderMarshaller = class { + toUtf8; + fromUtf8; + constructor(toUtf82, fromUtf85) { + this.toUtf8 = toUtf82; + this.fromUtf8 = fromUtf85; + } + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = this.fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([header.value ? 0 : 1]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8(0, 3); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8(0, 4); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8(0, 6); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = this.fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8(0, 7); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int642.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN2.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set(fromHex(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } + parse(headers) { + const out = {}; + let position = 0; + while (position < headers.byteLength) { + const nameLength = headers.getUint8(position++); + const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength)); + position += nameLength; + switch (headers.getUint8(position++)) { + case 0: + out[name] = { + type: BOOLEAN_TAG, + value: true + }; + break; + case 1: + out[name] = { + type: BOOLEAN_TAG, + value: false + }; + break; + case 2: + out[name] = { + type: BYTE_TAG, + value: headers.getInt8(position++) + }; + break; + case 3: + out[name] = { + type: SHORT_TAG, + value: headers.getInt16(position, false) + }; + position += 2; + break; + case 4: + out[name] = { + type: INT_TAG, + value: headers.getInt32(position, false) + }; + position += 4; + break; + case 5: + out[name] = { + type: LONG_TAG, + value: new Int642(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)) + }; + position += 8; + break; + case 6: + const binaryLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: BINARY_TAG, + value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength) + }; + position += binaryLength; + break; + case 7: + const stringLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: STRING_TAG, + value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)) + }; + position += stringLength; + break; + case 8: + out[name] = { + type: TIMESTAMP_TAG, + value: new Date(new Int642(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()) + }; + position += 8; + break; + case 9: + const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16); + position += 16; + out[name] = { + type: UUID_TAG, + value: `${toHex(uuidBytes.subarray(0, 4))}-${toHex(uuidBytes.subarray(4, 6))}-${toHex(uuidBytes.subarray(6, 8))}-${toHex(uuidBytes.subarray(8, 10))}-${toHex(uuidBytes.subarray(10))}` + }; + break; + default: + throw new Error(`Unrecognized header type tag`); + } + } + return out; + } + }; + __name(HeaderMarshaller, "HeaderMarshaller"); + (function(HEADER_VALUE_TYPE3) { + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["boolTrue"] = 0] = "boolTrue"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["boolFalse"] = 1] = "boolFalse"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["byte"] = 2] = "byte"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["short"] = 3] = "short"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["integer"] = 4] = "integer"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["long"] = 5] = "long"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["byteArray"] = 6] = "byteArray"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["string"] = 7] = "string"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["timestamp"] = 8] = "timestamp"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["uuid"] = 9] = "uuid"; + })(HEADER_VALUE_TYPE2 || (HEADER_VALUE_TYPE2 = {})); + BOOLEAN_TAG = "boolean"; + BYTE_TAG = "byte"; + SHORT_TAG = "short"; + INT_TAG = "integer"; + LONG_TAG = "long"; + BINARY_TAG = "binary"; + STRING_TAG = "string"; + TIMESTAMP_TAG = "timestamp"; + UUID_TAG = "uuid"; + UUID_PATTERN2 = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/splitMessage.js +function splitMessage({ byteLength, byteOffset, buffer }) { + if (byteLength < MINIMUM_MESSAGE_LENGTH) { + throw new Error("Provided message too short to accommodate event stream message overhead"); + } + const view = new DataView(buffer, byteOffset, byteLength); + const messageLength = view.getUint32(0, false); + if (byteLength !== messageLength) { + throw new Error("Reported message length does not match received message length"); + } + const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false); + const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false); + const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false); + const checksummer = new Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH)); + if (expectedPreludeChecksum !== checksummer.digest()) { + throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`); + } + checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH))); + if (expectedMessageChecksum !== checksummer.digest()) { + throw new Error(`The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`); + } + return { + headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength), + body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)) + }; +} +var PRELUDE_MEMBER_LENGTH, PRELUDE_LENGTH, CHECKSUM_LENGTH, MINIMUM_MESSAGE_LENGTH; +var init_splitMessage = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/splitMessage.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_module3(); + PRELUDE_MEMBER_LENGTH = 4; + PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; + CHECKSUM_LENGTH = 4; + MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; + __name(splitMessage, "splitMessage"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/EventStreamCodec.js +var EventStreamCodec; +var init_EventStreamCodec = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/EventStreamCodec.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_module3(); + init_HeaderMarshaller(); + init_splitMessage(); + EventStreamCodec = class { + headerMarshaller; + messageBuffer; + isEndOfStream; + constructor(toUtf82, fromUtf85) { + this.headerMarshaller = new HeaderMarshaller(toUtf82, fromUtf85); + this.messageBuffer = []; + this.isEndOfStream = false; + } + feed(message2) { + this.messageBuffer.push(this.decode(message2)); + } + endOfStream() { + this.isEndOfStream = true; + } + getMessage() { + const message2 = this.messageBuffer.pop(); + const isEndOfStream = this.isEndOfStream; + return { + getMessage() { + return message2; + }, + isEndOfStream() { + return isEndOfStream; + } + }; + } + getAvailableMessages() { + const messages = this.messageBuffer; + this.messageBuffer = []; + const isEndOfStream = this.isEndOfStream; + return { + getMessages() { + return messages; + }, + isEndOfStream() { + return isEndOfStream; + } + }; + } + encode({ headers: rawHeaders, body }) { + const headers = this.headerMarshaller.format(rawHeaders); + const length = headers.byteLength + body.byteLength + 16; + const out = new Uint8Array(length); + const view = new DataView(out.buffer, out.byteOffset, out.byteLength); + const checksum = new Crc32(); + view.setUint32(0, length, false); + view.setUint32(4, headers.byteLength, false); + view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false); + out.set(headers, 12); + out.set(body, headers.byteLength + 12); + view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false); + return out; + } + decode(message2) { + const { headers, body } = splitMessage(message2); + return { headers: this.headerMarshaller.parse(headers), body }; + } + formatHeaders(rawHeaders) { + return this.headerMarshaller.format(rawHeaders); + } + }; + __name(EventStreamCodec, "EventStreamCodec"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/Message.js +var init_Message = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/Message.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/MessageDecoderStream.js +var MessageDecoderStream; +var init_MessageDecoderStream = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/MessageDecoderStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + MessageDecoderStream = class { + options; + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const bytes of this.options.inputStream) { + const decoded = this.options.decoder.decode(bytes); + yield decoded; + } + } + }; + __name(MessageDecoderStream, "MessageDecoderStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/MessageEncoderStream.js +var MessageEncoderStream; +var init_MessageEncoderStream = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/MessageEncoderStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + MessageEncoderStream = class { + options; + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const msg of this.options.messageStream) { + const encoded = this.options.encoder.encode(msg); + yield encoded; + } + if (this.options.includeEndFrame) { + yield new Uint8Array(0); + } + } + }; + __name(MessageEncoderStream, "MessageEncoderStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageDecoderStream.js +var SmithyMessageDecoderStream; +var init_SmithyMessageDecoderStream = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageDecoderStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SmithyMessageDecoderStream = class { + options; + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const message2 of this.options.messageStream) { + const deserialized = await this.options.deserializer(message2); + if (deserialized === void 0) + continue; + yield deserialized; + } + } + }; + __name(SmithyMessageDecoderStream, "SmithyMessageDecoderStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageEncoderStream.js +var SmithyMessageEncoderStream; +var init_SmithyMessageEncoderStream = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageEncoderStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SmithyMessageEncoderStream = class { + options; + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const chunk of this.options.inputStream) { + const payloadBuf = this.options.serializer(chunk); + yield payloadBuf; + } + } + }; + __name(SmithyMessageEncoderStream, "SmithyMessageEncoderStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/index.js +var init_dist_es47 = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamCodec(); + init_HeaderMarshaller(); + init_Int64(); + init_Message(); + init_MessageDecoderStream(); + init_MessageEncoderStream(); + init_SmithyMessageDecoderStream(); + init_SmithyMessageEncoderStream(); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-universal/dist-es/getChunkedStream.js +function getChunkedStream(source) { + let currentMessageTotalLength = 0; + let currentMessagePendingLength = 0; + let currentMessage = null; + let messageLengthBuffer = null; + const allocateMessage = /* @__PURE__ */ __name((size) => { + if (typeof size !== "number") { + throw new Error("Attempted to allocate an event message where size was not a number: " + size); + } + currentMessageTotalLength = size; + currentMessagePendingLength = 4; + currentMessage = new Uint8Array(size); + const currentMessageView = new DataView(currentMessage.buffer); + currentMessageView.setUint32(0, size, false); + }, "allocateMessage"); + const iterator2 = /* @__PURE__ */ __name(async function* () { + const sourceIterator = source[Symbol.asyncIterator](); + while (true) { + const { value, done } = await sourceIterator.next(); + if (done) { + if (!currentMessageTotalLength) { + return; + } else if (currentMessageTotalLength === currentMessagePendingLength) { + yield currentMessage; + } else { + throw new Error("Truncated event message received."); + } + return; + } + const chunkLength = value.length; + let currentOffset = 0; + while (currentOffset < chunkLength) { + if (!currentMessage) { + const bytesRemaining = chunkLength - currentOffset; + if (!messageLengthBuffer) { + messageLengthBuffer = new Uint8Array(4); + } + const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining); + messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength); + currentMessagePendingLength += numBytesForTotal; + currentOffset += numBytesForTotal; + if (currentMessagePendingLength < 4) { + break; + } + allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false)); + messageLengthBuffer = null; + } + const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset); + currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength); + currentMessagePendingLength += numBytesToWrite; + currentOffset += numBytesToWrite; + if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) { + yield currentMessage; + currentMessage = null; + currentMessageTotalLength = 0; + currentMessagePendingLength = 0; + } + } + } + }, "iterator"); + return { + [Symbol.asyncIterator]: iterator2 + }; +} +var init_getChunkedStream = __esm({ + "../../node_modules/@smithy/eventstream-serde-universal/dist-es/getChunkedStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(getChunkedStream, "getChunkedStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-universal/dist-es/getUnmarshalledStream.js +function getMessageUnmarshaller(deserializer, toUtf82) { + return async function(message2) { + const { value: messageType } = message2.headers[":message-type"]; + if (messageType === "error") { + const unmodeledError = new Error(message2.headers[":error-message"].value || "UnknownError"); + unmodeledError.name = message2.headers[":error-code"].value; + throw unmodeledError; + } else if (messageType === "exception") { + const code = message2.headers[":exception-type"].value; + const exception = { [code]: message2 }; + const deserializedException = await deserializer(exception); + if (deserializedException.$unknown) { + const error50 = new Error(toUtf82(message2.body)); + error50.name = code; + throw error50; + } + throw deserializedException[code]; + } else if (messageType === "event") { + const event = { + [message2.headers[":event-type"].value]: message2 + }; + const deserialized = await deserializer(event); + if (deserialized.$unknown) + return; + return deserialized; + } else { + throw Error(`Unrecognizable event type: ${message2.headers[":event-type"].value}`); + } + }; +} +var init_getUnmarshalledStream = __esm({ + "../../node_modules/@smithy/eventstream-serde-universal/dist-es/getUnmarshalledStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(getMessageUnmarshaller, "getMessageUnmarshaller"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-universal/dist-es/EventStreamMarshaller.js +var EventStreamMarshaller; +var init_EventStreamMarshaller = __esm({ + "../../node_modules/@smithy/eventstream-serde-universal/dist-es/EventStreamMarshaller.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es47(); + init_getChunkedStream(); + init_getUnmarshalledStream(); + EventStreamMarshaller = class { + eventStreamCodec; + utfEncoder; + constructor({ utf8Encoder, utf8Decoder }) { + this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder); + this.utfEncoder = utf8Encoder; + } + deserialize(body, deserializer) { + const inputStream = getChunkedStream(body); + return new SmithyMessageDecoderStream({ + messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }), + deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder) + }); + } + serialize(inputStream, serializer) { + return new MessageEncoderStream({ + messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }), + encoder: this.eventStreamCodec, + includeEndFrame: true + }); + } + }; + __name(EventStreamMarshaller, "EventStreamMarshaller"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-universal/dist-es/provider.js +var init_provider = __esm({ + "../../node_modules/@smithy/eventstream-serde-universal/dist-es/provider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-universal/dist-es/index.js +var init_dist_es48 = __esm({ + "../../node_modules/@smithy/eventstream-serde-universal/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamMarshaller(); + init_provider(); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-browser/dist-es/utils.js +var readableStreamtoIterable, iterableToReadableStream; +var init_utils6 = __esm({ + "../../node_modules/@smithy/eventstream-serde-browser/dist-es/utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + readableStreamtoIterable = /* @__PURE__ */ __name((readableStream) => ({ + [Symbol.asyncIterator]: async function* () { + const reader = readableStream.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) + return; + yield value; + } + } finally { + reader.releaseLock(); + } + } + }), "readableStreamtoIterable"); + iterableToReadableStream = /* @__PURE__ */ __name((asyncIterable) => { + const iterator2 = asyncIterable[Symbol.asyncIterator](); + return new ReadableStream({ + async pull(controller) { + const { done, value } = await iterator2.next(); + if (done) { + return controller.close(); + } + controller.enqueue(value); + } + }); + }, "iterableToReadableStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-browser/dist-es/EventStreamMarshaller.js +var EventStreamMarshaller2, isReadableStream2; +var init_EventStreamMarshaller2 = __esm({ + "../../node_modules/@smithy/eventstream-serde-browser/dist-es/EventStreamMarshaller.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es48(); + init_utils6(); + EventStreamMarshaller2 = class { + universalMarshaller; + constructor({ utf8Encoder, utf8Decoder }) { + this.universalMarshaller = new EventStreamMarshaller({ + utf8Decoder, + utf8Encoder + }); + } + deserialize(body, deserializer) { + const bodyIterable = isReadableStream2(body) ? readableStreamtoIterable(body) : body; + return this.universalMarshaller.deserialize(bodyIterable, deserializer); + } + serialize(input, serializer) { + const serialziedIterable = this.universalMarshaller.serialize(input, serializer); + return typeof ReadableStream === "function" ? iterableToReadableStream(serialziedIterable) : serialziedIterable; + } + }; + __name(EventStreamMarshaller2, "EventStreamMarshaller"); + isReadableStream2 = /* @__PURE__ */ __name((body) => typeof ReadableStream === "function" && body instanceof ReadableStream, "isReadableStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-browser/dist-es/provider.js +var eventStreamSerdeProvider; +var init_provider2 = __esm({ + "../../node_modules/@smithy/eventstream-serde-browser/dist-es/provider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamMarshaller2(); + eventStreamSerdeProvider = /* @__PURE__ */ __name((options) => new EventStreamMarshaller2(options), "eventStreamSerdeProvider"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-browser/dist-es/index.js +var init_dist_es49 = __esm({ + "../../node_modules/@smithy/eventstream-serde-browser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamMarshaller2(); + init_provider2(); + init_utils6(); + } +}); + +// ../../node_modules/@smithy/chunked-blob-reader/dist-es/index.js +async function blobReader(blob2, onChunk, chunkSize = 1024 * 1024) { + const size = blob2.size; + let totalBytesRead = 0; + while (totalBytesRead < size) { + const slice = blob2.slice(totalBytesRead, Math.min(size, totalBytesRead + chunkSize)); + onChunk(new Uint8Array(await slice.arrayBuffer())); + totalBytesRead += slice.size; + } +} +var init_dist_es50 = __esm({ + "../../node_modules/@smithy/chunked-blob-reader/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(blobReader, "blobReader"); + } +}); + +// ../../node_modules/@smithy/hash-blob-browser/dist-es/index.js +var blobHasher; +var init_dist_es51 = __esm({ + "../../node_modules/@smithy/hash-blob-browser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es50(); + blobHasher = /* @__PURE__ */ __name(async function blobHasher2(hashCtor, blob2) { + const hash4 = new hashCtor(); + await blobReader(blob2, (chunk) => { + hash4.update(chunk); + }); + return hash4.digest(); + }, "blobHasher"); + } +}); + +// ../../node_modules/@smithy/invalid-dependency/dist-es/invalidFunction.js +var init_invalidFunction = __esm({ + "../../node_modules/@smithy/invalid-dependency/dist-es/invalidFunction.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/invalid-dependency/dist-es/invalidProvider.js +var invalidProvider; +var init_invalidProvider = __esm({ + "../../node_modules/@smithy/invalid-dependency/dist-es/invalidProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + invalidProvider = /* @__PURE__ */ __name((message2) => () => Promise.reject(message2), "invalidProvider"); + } +}); + +// ../../node_modules/@smithy/invalid-dependency/dist-es/index.js +var init_dist_es52 = __esm({ + "../../node_modules/@smithy/invalid-dependency/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_invalidFunction(); + init_invalidProvider(); + } +}); + +// ../../node_modules/@smithy/md5-js/dist-es/constants.js +var BLOCK_SIZE2, DIGEST_LENGTH2, INIT2; +var init_constants13 = __esm({ + "../../node_modules/@smithy/md5-js/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + BLOCK_SIZE2 = 64; + DIGEST_LENGTH2 = 16; + INIT2 = [1732584193, 4023233417, 2562383102, 271733878]; + } +}); + +// ../../node_modules/@smithy/md5-js/dist-es/index.js +function cmn(q2, a2, b2, x2, s2, t9) { + a2 = (a2 + q2 & 4294967295) + (x2 + t9 & 4294967295) & 4294967295; + return (a2 << s2 | a2 >>> 32 - s2) + b2 & 4294967295; +} +function ff(a2, b2, c2, d2, x2, s2, t9) { + return cmn(b2 & c2 | ~b2 & d2, a2, b2, x2, s2, t9); +} +function gg(a2, b2, c2, d2, x2, s2, t9) { + return cmn(b2 & d2 | c2 & ~d2, a2, b2, x2, s2, t9); +} +function hh(a2, b2, c2, d2, x2, s2, t9) { + return cmn(b2 ^ c2 ^ d2, a2, b2, x2, s2, t9); +} +function ii(a2, b2, c2, d2, x2, s2, t9) { + return cmn(c2 ^ (b2 | ~d2), a2, b2, x2, s2, t9); +} +function isEmptyData3(data) { + if (typeof data === "string") { + return data.length === 0; + } + return data.byteLength === 0; +} +function convertToBuffer3(data) { + if (typeof data === "string") { + return fromUtf8(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); +} +var Md5; +var init_dist_es53 = __esm({ + "../../node_modules/@smithy/md5-js/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es5(); + init_constants13(); + Md5 = class { + state; + buffer; + bufferLength; + bytesHashed; + finished; + constructor() { + this.reset(); + } + update(sourceData) { + if (isEmptyData3(sourceData)) { + return; + } else if (this.finished) { + throw new Error("Attempted to update an already finished hash."); + } + const data = convertToBuffer3(sourceData); + let position = 0; + let { byteLength } = data; + this.bytesHashed += byteLength; + while (byteLength > 0) { + this.buffer.setUint8(this.bufferLength++, data[position++]); + byteLength--; + if (this.bufferLength === BLOCK_SIZE2) { + this.hashBuffer(); + this.bufferLength = 0; + } + } + } + async digest() { + if (!this.finished) { + const { buffer, bufferLength: undecoratedLength, bytesHashed } = this; + const bitsHashed = bytesHashed * 8; + buffer.setUint8(this.bufferLength++, 128); + if (undecoratedLength % BLOCK_SIZE2 >= BLOCK_SIZE2 - 8) { + for (let i2 = this.bufferLength; i2 < BLOCK_SIZE2; i2++) { + buffer.setUint8(i2, 0); + } + this.hashBuffer(); + this.bufferLength = 0; + } + for (let i2 = this.bufferLength; i2 < BLOCK_SIZE2 - 8; i2++) { + buffer.setUint8(i2, 0); + } + buffer.setUint32(BLOCK_SIZE2 - 8, bitsHashed >>> 0, true); + buffer.setUint32(BLOCK_SIZE2 - 4, Math.floor(bitsHashed / 4294967296), true); + this.hashBuffer(); + this.finished = true; + } + const out = new DataView(new ArrayBuffer(DIGEST_LENGTH2)); + for (let i2 = 0; i2 < 4; i2++) { + out.setUint32(i2 * 4, this.state[i2], true); + } + return new Uint8Array(out.buffer, out.byteOffset, out.byteLength); + } + hashBuffer() { + const { buffer, state } = this; + let a2 = state[0], b2 = state[1], c2 = state[2], d2 = state[3]; + a2 = ff(a2, b2, c2, d2, buffer.getUint32(0, true), 7, 3614090360); + d2 = ff(d2, a2, b2, c2, buffer.getUint32(4, true), 12, 3905402710); + c2 = ff(c2, d2, a2, b2, buffer.getUint32(8, true), 17, 606105819); + b2 = ff(b2, c2, d2, a2, buffer.getUint32(12, true), 22, 3250441966); + a2 = ff(a2, b2, c2, d2, buffer.getUint32(16, true), 7, 4118548399); + d2 = ff(d2, a2, b2, c2, buffer.getUint32(20, true), 12, 1200080426); + c2 = ff(c2, d2, a2, b2, buffer.getUint32(24, true), 17, 2821735955); + b2 = ff(b2, c2, d2, a2, buffer.getUint32(28, true), 22, 4249261313); + a2 = ff(a2, b2, c2, d2, buffer.getUint32(32, true), 7, 1770035416); + d2 = ff(d2, a2, b2, c2, buffer.getUint32(36, true), 12, 2336552879); + c2 = ff(c2, d2, a2, b2, buffer.getUint32(40, true), 17, 4294925233); + b2 = ff(b2, c2, d2, a2, buffer.getUint32(44, true), 22, 2304563134); + a2 = ff(a2, b2, c2, d2, buffer.getUint32(48, true), 7, 1804603682); + d2 = ff(d2, a2, b2, c2, buffer.getUint32(52, true), 12, 4254626195); + c2 = ff(c2, d2, a2, b2, buffer.getUint32(56, true), 17, 2792965006); + b2 = ff(b2, c2, d2, a2, buffer.getUint32(60, true), 22, 1236535329); + a2 = gg(a2, b2, c2, d2, buffer.getUint32(4, true), 5, 4129170786); + d2 = gg(d2, a2, b2, c2, buffer.getUint32(24, true), 9, 3225465664); + c2 = gg(c2, d2, a2, b2, buffer.getUint32(44, true), 14, 643717713); + b2 = gg(b2, c2, d2, a2, buffer.getUint32(0, true), 20, 3921069994); + a2 = gg(a2, b2, c2, d2, buffer.getUint32(20, true), 5, 3593408605); + d2 = gg(d2, a2, b2, c2, buffer.getUint32(40, true), 9, 38016083); + c2 = gg(c2, d2, a2, b2, buffer.getUint32(60, true), 14, 3634488961); + b2 = gg(b2, c2, d2, a2, buffer.getUint32(16, true), 20, 3889429448); + a2 = gg(a2, b2, c2, d2, buffer.getUint32(36, true), 5, 568446438); + d2 = gg(d2, a2, b2, c2, buffer.getUint32(56, true), 9, 3275163606); + c2 = gg(c2, d2, a2, b2, buffer.getUint32(12, true), 14, 4107603335); + b2 = gg(b2, c2, d2, a2, buffer.getUint32(32, true), 20, 1163531501); + a2 = gg(a2, b2, c2, d2, buffer.getUint32(52, true), 5, 2850285829); + d2 = gg(d2, a2, b2, c2, buffer.getUint32(8, true), 9, 4243563512); + c2 = gg(c2, d2, a2, b2, buffer.getUint32(28, true), 14, 1735328473); + b2 = gg(b2, c2, d2, a2, buffer.getUint32(48, true), 20, 2368359562); + a2 = hh(a2, b2, c2, d2, buffer.getUint32(20, true), 4, 4294588738); + d2 = hh(d2, a2, b2, c2, buffer.getUint32(32, true), 11, 2272392833); + c2 = hh(c2, d2, a2, b2, buffer.getUint32(44, true), 16, 1839030562); + b2 = hh(b2, c2, d2, a2, buffer.getUint32(56, true), 23, 4259657740); + a2 = hh(a2, b2, c2, d2, buffer.getUint32(4, true), 4, 2763975236); + d2 = hh(d2, a2, b2, c2, buffer.getUint32(16, true), 11, 1272893353); + c2 = hh(c2, d2, a2, b2, buffer.getUint32(28, true), 16, 4139469664); + b2 = hh(b2, c2, d2, a2, buffer.getUint32(40, true), 23, 3200236656); + a2 = hh(a2, b2, c2, d2, buffer.getUint32(52, true), 4, 681279174); + d2 = hh(d2, a2, b2, c2, buffer.getUint32(0, true), 11, 3936430074); + c2 = hh(c2, d2, a2, b2, buffer.getUint32(12, true), 16, 3572445317); + b2 = hh(b2, c2, d2, a2, buffer.getUint32(24, true), 23, 76029189); + a2 = hh(a2, b2, c2, d2, buffer.getUint32(36, true), 4, 3654602809); + d2 = hh(d2, a2, b2, c2, buffer.getUint32(48, true), 11, 3873151461); + c2 = hh(c2, d2, a2, b2, buffer.getUint32(60, true), 16, 530742520); + b2 = hh(b2, c2, d2, a2, buffer.getUint32(8, true), 23, 3299628645); + a2 = ii(a2, b2, c2, d2, buffer.getUint32(0, true), 6, 4096336452); + d2 = ii(d2, a2, b2, c2, buffer.getUint32(28, true), 10, 1126891415); + c2 = ii(c2, d2, a2, b2, buffer.getUint32(56, true), 15, 2878612391); + b2 = ii(b2, c2, d2, a2, buffer.getUint32(20, true), 21, 4237533241); + a2 = ii(a2, b2, c2, d2, buffer.getUint32(48, true), 6, 1700485571); + d2 = ii(d2, a2, b2, c2, buffer.getUint32(12, true), 10, 2399980690); + c2 = ii(c2, d2, a2, b2, buffer.getUint32(40, true), 15, 4293915773); + b2 = ii(b2, c2, d2, a2, buffer.getUint32(4, true), 21, 2240044497); + a2 = ii(a2, b2, c2, d2, buffer.getUint32(32, true), 6, 1873313359); + d2 = ii(d2, a2, b2, c2, buffer.getUint32(60, true), 10, 4264355552); + c2 = ii(c2, d2, a2, b2, buffer.getUint32(24, true), 15, 2734768916); + b2 = ii(b2, c2, d2, a2, buffer.getUint32(52, true), 21, 1309151649); + a2 = ii(a2, b2, c2, d2, buffer.getUint32(16, true), 6, 4149444226); + d2 = ii(d2, a2, b2, c2, buffer.getUint32(44, true), 10, 3174756917); + c2 = ii(c2, d2, a2, b2, buffer.getUint32(8, true), 15, 718787259); + b2 = ii(b2, c2, d2, a2, buffer.getUint32(36, true), 21, 3951481745); + state[0] = a2 + state[0] & 4294967295; + state[1] = b2 + state[1] & 4294967295; + state[2] = c2 + state[2] & 4294967295; + state[3] = d2 + state[3] & 4294967295; + } + reset() { + this.state = Uint32Array.from(INIT2); + this.buffer = new DataView(new ArrayBuffer(BLOCK_SIZE2)); + this.bufferLength = 0; + this.bytesHashed = 0; + this.finished = false; + } + }; + __name(Md5, "Md5"); + __name(cmn, "cmn"); + __name(ff, "ff"); + __name(gg, "gg"); + __name(hh, "hh"); + __name(ii, "ii"); + __name(isEmptyData3, "isEmptyData"); + __name(convertToBuffer3, "convertToBuffer"); + } +}); + +// ../../node_modules/@smithy/util-defaults-mode-browser/dist-es/constants.js +var DEFAULTS_MODE_OPTIONS; +var init_constants14 = __esm({ + "../../node_modules/@smithy/util-defaults-mode-browser/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; + } +}); + +// ../../node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js +var resolveDefaultsModeConfig, useMobileConfiguration; +var init_resolveDefaultsModeConfig = __esm({ + "../../node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es16(); + init_constants14(); + resolveDefaultsModeConfig = /* @__PURE__ */ __name(({ defaultsMode } = {}) => memoize(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode?.toLowerCase()) { + case "auto": + return Promise.resolve(useMobileConfiguration() ? "mobile" : "standard"); + case "mobile": + case "in-region": + case "cross-region": + case "standard": + case "legacy": + return Promise.resolve(mode?.toLocaleLowerCase()); + case void 0: + return Promise.resolve("legacy"); + default: + throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`); + } + }), "resolveDefaultsModeConfig"); + useMobileConfiguration = /* @__PURE__ */ __name(() => { + const navigator2 = window?.navigator; + if (navigator2?.connection) { + const { effectiveType, rtt, downlink } = navigator2?.connection; + const slow = typeof effectiveType === "string" && effectiveType !== "4g" || Number(rtt) > 100 || Number(downlink) < 10; + if (slow) { + return true; + } + } + return navigator2?.userAgentData?.mobile || typeof navigator2?.maxTouchPoints === "number" && navigator2?.maxTouchPoints > 1; + }, "useMobileConfiguration"); + } +}); + +// ../../node_modules/@smithy/util-defaults-mode-browser/dist-es/index.js +var init_dist_es54 = __esm({ + "../../node_modules/@smithy/util-defaults-mode-browser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_resolveDefaultsModeConfig(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.shared.js +var getRuntimeConfig; +var init_runtimeConfig_shared = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.shared.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_protocols2(); + init_dist_es43(); + init_dist_es21(); + init_dist_es13(); + init_dist_es6(); + init_dist_es11(); + init_dist_es5(); + init_httpAuthSchemeProvider(); + init_endpointResolver(); + init_schemas_0(); + getRuntimeConfig = /* @__PURE__ */ __name((config3) => { + return { + apiVersion: "2006-03-01", + base64Decoder: config3?.base64Decoder ?? fromBase64, + base64Encoder: config3?.base64Encoder ?? toBase64, + disableHostPrefix: config3?.disableHostPrefix ?? false, + endpointProvider: config3?.endpointProvider ?? defaultEndpointResolver, + extensions: config3?.extensions ?? [], + getAwsChunkedEncodingStream: config3?.getAwsChunkedEncodingStream ?? getAwsChunkedEncodingStream, + httpAuthSchemeProvider: config3?.httpAuthSchemeProvider ?? defaultS3HttpAuthSchemeProvider, + httpAuthSchemes: config3?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer() + }, + { + schemeId: "aws.auth#sigv4a", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"), + signer: new AwsSdkSigV4ASigner() + } + ], + logger: config3?.logger ?? new NoOpLogger(), + protocol: config3?.protocol ?? AwsRestXmlProtocol, + protocolSettings: config3?.protocolSettings ?? { + defaultNamespace: "com.amazonaws.s3", + errorTypeRegistries, + xmlNamespace: "http://s3.amazonaws.com/doc/2006-03-01/", + version: "2006-03-01", + serviceTarget: "AmazonS3" + }, + sdkStreamMixin: config3?.sdkStreamMixin ?? sdkStreamMixin, + serviceId: config3?.serviceId ?? "S3", + signerConstructor: config3?.signerConstructor ?? SignatureV4MultiRegion, + signingEscapePath: config3?.signingEscapePath ?? false, + urlParser: config3?.urlParser ?? parseUrl, + useArnRegion: config3?.useArnRegion ?? void 0, + utf8Decoder: config3?.utf8Decoder ?? fromUtf8, + utf8Encoder: config3?.utf8Encoder ?? toUtf8 + }; + }, "getRuntimeConfig"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.browser.js +var getRuntimeConfig2; +var init_runtimeConfig_browser = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_package(); + init_module5(); + init_module7(); + init_dist_es46(); + init_dist_es37(); + init_dist_es49(); + init_dist_es9(); + init_dist_es51(); + init_dist_es52(); + init_dist_es53(); + init_dist_es21(); + init_dist_es19(); + init_dist_es54(); + init_dist_es35(); + init_runtimeConfig_shared(); + getRuntimeConfig2 = /* @__PURE__ */ __name((config3) => { + const defaultsMode = resolveDefaultsModeConfig(config3); + const defaultConfigProvider = /* @__PURE__ */ __name(() => defaultsMode().then(loadConfigsForDefaultMode), "defaultConfigProvider"); + const clientSharedValues = getRuntimeConfig(config3); + return { + ...clientSharedValues, + ...config3, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config3?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: config3?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: config3?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), + eventStreamSerdeProvider: config3?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, + maxAttempts: config3?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + md5: config3?.md5 ?? Md5, + region: config3?.region ?? invalidProvider("Region is missing"), + requestHandler: FetchHttpHandler.create(config3?.requestHandler ?? defaultConfigProvider), + retryMode: config3?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), + sha1: config3?.sha1 ?? Sha12, + sha256: config3?.sha256 ?? Sha2563, + streamCollector: config3?.streamCollector ?? streamCollector, + streamHasher: config3?.streamHasher ?? blobHasher, + useDualstackEndpoint: config3?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config3?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)) + }; + }, "getRuntimeConfig"); + } +}); + +// ../../node_modules/@aws-sdk/region-config-resolver/dist-es/extensions/index.js +var getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration; +var init_extensions4 = __esm({ + "../../node_modules/@aws-sdk/region-config-resolver/dist-es/extensions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + setRegion(region) { + runtimeConfig.region = region; + }, + region() { + return runtimeConfig.region; + } + }; + }, "getAwsRegionExtensionConfiguration"); + resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => { + return { + region: awsRegionExtensionConfiguration.region() + }; + }, "resolveAwsRegionExtensionConfiguration"); + } +}); + +// ../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/awsRegionConfig.js +var init_awsRegionConfig = __esm({ + "../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/awsRegionConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/stsRegionDefaultResolver.browser.js +var init_stsRegionDefaultResolver_browser = __esm({ + "../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/stsRegionDefaultResolver.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/region-config-resolver/dist-es/index.js +var init_dist_es55 = __esm({ + "../../node_modules/@aws-sdk/region-config-resolver/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_extensions4(); + init_awsRegionConfig(); + init_stsRegionDefaultResolver_browser(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthExtensionConfiguration.js +var getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig; +var init_httpAuthExtensionConfiguration = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthExtensionConfiguration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; + }, "getHttpAuthExtensionConfiguration"); + resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config3) => { + return { + httpAuthSchemes: config3.httpAuthSchemes(), + httpAuthSchemeProvider: config3.httpAuthSchemeProvider(), + credentials: config3.credentials() + }; + }, "resolveHttpAuthRuntimeConfig"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/runtimeExtensions.js +var resolveRuntimeExtensions; +var init_runtimeExtensions = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/runtimeExtensions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es55(); + init_dist_es2(); + init_dist_es21(); + init_httpAuthExtensionConfiguration(); + resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); + }, "resolveRuntimeExtensions"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/S3Client.js +var S3Client; +var init_S3Client = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/S3Client.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es3(); + init_dist_es26(); + init_dist_es27(); + init_dist_es28(); + init_dist_es29(); + init_dist_es31(); + init_dist_es36(); + init_dist_es37(); + init_dist_es15(); + init_schema3(); + init_dist_es38(); + init_dist_es39(); + init_dist_es41(); + init_dist_es42(); + init_dist_es21(); + init_httpAuthSchemeProvider(); + init_CreateSessionCommand(); + init_EndpointParameters(); + init_runtimeConfig_browser(); + init_runtimeExtensions(); + S3Client = class extends Client { + config; + constructor(...[configuration]) { + const _config_0 = getRuntimeConfig2(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveUserAgentConfig(_config_1); + const _config_3 = resolveFlexibleChecksumsConfig(_config_2); + const _config_4 = resolveRetryConfig(_config_3); + const _config_5 = resolveRegionConfig(_config_4); + const _config_6 = resolveHostHeaderConfig(_config_5); + const _config_7 = resolveEndpointConfig(_config_6); + const _config_8 = resolveEventStreamSerdeConfig(_config_7); + const _config_9 = resolveHttpAuthSchemeConfig(_config_8); + const _config_10 = resolveS3Config(_config_9, { session: [() => this, CreateSessionCommand] }); + const _config_11 = resolveRuntimeExtensions(_config_10, configuration?.extensions || []); + this.config = _config_11; + this.middlewareStack.use(getSchemaSerdePlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: defaultS3HttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config3) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config3.credentials, + "aws.auth#sigv4a": config3.credentials + }) + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + this.middlewareStack.use(getValidateBucketNamePlugin(this.config)); + this.middlewareStack.use(getAddExpectContinuePlugin(this.config)); + this.middlewareStack.use(getRegionRedirectMiddlewarePlugin(this.config)); + this.middlewareStack.use(getS3ExpressPlugin(this.config)); + this.middlewareStack.use(getS3ExpressHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } + }; + __name(S3Client, "S3Client"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/AbortMultipartUploadCommand.js +var AbortMultipartUploadCommand; +var init_AbortMultipartUploadCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/AbortMultipartUploadCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + AbortMultipartUploadCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "AbortMultipartUpload", {}).n("S3Client", "AbortMultipartUploadCommand").sc(AbortMultipartUpload$).build() { + }; + __name(AbortMultipartUploadCommand, "AbortMultipartUploadCommand"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-ssec/dist-es/index.js +function ssecMiddleware(options) { + return (next) => async (args) => { + const input = { ...args.input }; + const properties = [ + { + target: "SSECustomerKey", + hash: "SSECustomerKeyMD5" + }, + { + target: "CopySourceSSECustomerKey", + hash: "CopySourceSSECustomerKeyMD5" + } + ]; + for (const prop of properties) { + const value = input[prop.target]; + if (value) { + let valueForHash; + if (typeof value === "string") { + if (isValidBase64EncodedSSECustomerKey(value, options)) { + valueForHash = options.base64Decoder(value); + } else { + valueForHash = options.utf8Decoder(value); + input[prop.target] = options.base64Encoder(valueForHash); + } + } else { + valueForHash = ArrayBuffer.isView(value) ? new Uint8Array(value.buffer, value.byteOffset, value.byteLength) : new Uint8Array(value); + input[prop.target] = options.base64Encoder(valueForHash); + } + const hash4 = new options.md5(); + hash4.update(valueForHash); + input[prop.hash] = options.base64Encoder(await hash4.digest()); + } + } + return next({ + ...args, + input + }); + }; +} +function isValidBase64EncodedSSECustomerKey(str, options) { + const base64Regex = /^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/; + if (!base64Regex.test(str)) + return false; + try { + const decodedBytes = options.base64Decoder(str); + return decodedBytes.length === 32; + } catch { + return false; + } +} +var ssecMiddlewareOptions, getSsecPlugin; +var init_dist_es56 = __esm({ + "../../node_modules/@aws-sdk/middleware-ssec/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(ssecMiddleware, "ssecMiddleware"); + ssecMiddlewareOptions = { + name: "ssecMiddleware", + step: "initialize", + tags: ["SSE"], + override: true + }; + getSsecPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.add(ssecMiddleware(config3), ssecMiddlewareOptions); + } + }), "getSsecPlugin"); + __name(isValidBase64EncodedSSECustomerKey, "isValidBase64EncodedSSECustomerKey"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CompleteMultipartUploadCommand.js +var CompleteMultipartUploadCommand; +var init_CompleteMultipartUploadCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CompleteMultipartUploadCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CompleteMultipartUploadCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "CompleteMultipartUpload", {}).n("S3Client", "CompleteMultipartUploadCommand").sc(CompleteMultipartUpload$).build() { + }; + __name(CompleteMultipartUploadCommand, "CompleteMultipartUploadCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CopyObjectCommand.js +var CopyObjectCommand; +var init_CopyObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CopyObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CopyObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" }, + CopySource: { type: "contextParams", name: "CopySource" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "CopyObject", {}).n("S3Client", "CopyObjectCommand").sc(CopyObject$).build() { + }; + __name(CopyObjectCommand, "CopyObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-location-constraint/dist-es/index.js +function locationConstraintMiddleware(options) { + return (next) => async (args) => { + const { CreateBucketConfiguration } = args.input; + const region = await options.region(); + if (!CreateBucketConfiguration?.LocationConstraint && !CreateBucketConfiguration?.Location) { + if (region !== "us-east-1") { + args.input.CreateBucketConfiguration = args.input.CreateBucketConfiguration ?? {}; + args.input.CreateBucketConfiguration.LocationConstraint = region; + } + } + return next(args); + }; +} +var locationConstraintMiddlewareOptions, getLocationConstraintPlugin; +var init_dist_es57 = __esm({ + "../../node_modules/@aws-sdk/middleware-location-constraint/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(locationConstraintMiddleware, "locationConstraintMiddleware"); + locationConstraintMiddlewareOptions = { + step: "initialize", + tags: ["LOCATION_CONSTRAINT", "CREATE_BUCKET_CONFIGURATION"], + name: "locationConstraintMiddleware", + override: true + }; + getLocationConstraintPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.add(locationConstraintMiddleware(config3), locationConstraintMiddlewareOptions); + } + }), "getLocationConstraintPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketCommand.js +var CreateBucketCommand; +var init_CreateBucketCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es57(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CreateBucketCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + DisableAccessPoints: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getLocationConstraintPlugin(config3) + ]; + }).s("AmazonS3", "CreateBucket", {}).n("S3Client", "CreateBucketCommand").sc(CreateBucket$).build() { + }; + __name(CreateBucketCommand, "CreateBucketCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataConfigurationCommand.js +var CreateBucketMetadataConfigurationCommand; +var init_CreateBucketMetadataConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CreateBucketMetadataConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "CreateBucketMetadataConfiguration", {}).n("S3Client", "CreateBucketMetadataConfigurationCommand").sc(CreateBucketMetadataConfiguration$).build() { + }; + __name(CreateBucketMetadataConfigurationCommand, "CreateBucketMetadataConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataTableConfigurationCommand.js +var CreateBucketMetadataTableConfigurationCommand; +var init_CreateBucketMetadataTableConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataTableConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CreateBucketMetadataTableConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "CreateBucketMetadataTableConfiguration", {}).n("S3Client", "CreateBucketMetadataTableConfigurationCommand").sc(CreateBucketMetadataTableConfiguration$).build() { + }; + __name(CreateBucketMetadataTableConfigurationCommand, "CreateBucketMetadataTableConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateMultipartUploadCommand.js +var CreateMultipartUploadCommand; +var init_CreateMultipartUploadCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateMultipartUploadCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CreateMultipartUploadCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "CreateMultipartUpload", {}).n("S3Client", "CreateMultipartUploadCommand").sc(CreateMultipartUpload$).build() { + }; + __name(CreateMultipartUploadCommand, "CreateMultipartUploadCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketAnalyticsConfigurationCommand.js +var DeleteBucketAnalyticsConfigurationCommand; +var init_DeleteBucketAnalyticsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketAnalyticsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketAnalyticsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketAnalyticsConfiguration", {}).n("S3Client", "DeleteBucketAnalyticsConfigurationCommand").sc(DeleteBucketAnalyticsConfiguration$).build() { + }; + __name(DeleteBucketAnalyticsConfigurationCommand, "DeleteBucketAnalyticsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCommand.js +var DeleteBucketCommand; +var init_DeleteBucketCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucket", {}).n("S3Client", "DeleteBucketCommand").sc(DeleteBucket$).build() { + }; + __name(DeleteBucketCommand, "DeleteBucketCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCorsCommand.js +var DeleteBucketCorsCommand; +var init_DeleteBucketCorsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCorsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketCorsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketCors", {}).n("S3Client", "DeleteBucketCorsCommand").sc(DeleteBucketCors$).build() { + }; + __name(DeleteBucketCorsCommand, "DeleteBucketCorsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketEncryptionCommand.js +var DeleteBucketEncryptionCommand; +var init_DeleteBucketEncryptionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketEncryptionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketEncryptionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketEncryption", {}).n("S3Client", "DeleteBucketEncryptionCommand").sc(DeleteBucketEncryption$).build() { + }; + __name(DeleteBucketEncryptionCommand, "DeleteBucketEncryptionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketIntelligentTieringConfigurationCommand.js +var DeleteBucketIntelligentTieringConfigurationCommand; +var init_DeleteBucketIntelligentTieringConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketIntelligentTieringConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketIntelligentTieringConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketIntelligentTieringConfiguration", {}).n("S3Client", "DeleteBucketIntelligentTieringConfigurationCommand").sc(DeleteBucketIntelligentTieringConfiguration$).build() { + }; + __name(DeleteBucketIntelligentTieringConfigurationCommand, "DeleteBucketIntelligentTieringConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketInventoryConfigurationCommand.js +var DeleteBucketInventoryConfigurationCommand; +var init_DeleteBucketInventoryConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketInventoryConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketInventoryConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketInventoryConfiguration", {}).n("S3Client", "DeleteBucketInventoryConfigurationCommand").sc(DeleteBucketInventoryConfiguration$).build() { + }; + __name(DeleteBucketInventoryConfigurationCommand, "DeleteBucketInventoryConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketLifecycleCommand.js +var DeleteBucketLifecycleCommand; +var init_DeleteBucketLifecycleCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketLifecycleCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketLifecycleCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketLifecycle", {}).n("S3Client", "DeleteBucketLifecycleCommand").sc(DeleteBucketLifecycle$).build() { + }; + __name(DeleteBucketLifecycleCommand, "DeleteBucketLifecycleCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataConfigurationCommand.js +var DeleteBucketMetadataConfigurationCommand; +var init_DeleteBucketMetadataConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketMetadataConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketMetadataConfiguration", {}).n("S3Client", "DeleteBucketMetadataConfigurationCommand").sc(DeleteBucketMetadataConfiguration$).build() { + }; + __name(DeleteBucketMetadataConfigurationCommand, "DeleteBucketMetadataConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataTableConfigurationCommand.js +var DeleteBucketMetadataTableConfigurationCommand; +var init_DeleteBucketMetadataTableConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataTableConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketMetadataTableConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketMetadataTableConfiguration", {}).n("S3Client", "DeleteBucketMetadataTableConfigurationCommand").sc(DeleteBucketMetadataTableConfiguration$).build() { + }; + __name(DeleteBucketMetadataTableConfigurationCommand, "DeleteBucketMetadataTableConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetricsConfigurationCommand.js +var DeleteBucketMetricsConfigurationCommand; +var init_DeleteBucketMetricsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetricsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketMetricsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketMetricsConfiguration", {}).n("S3Client", "DeleteBucketMetricsConfigurationCommand").sc(DeleteBucketMetricsConfiguration$).build() { + }; + __name(DeleteBucketMetricsConfigurationCommand, "DeleteBucketMetricsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketOwnershipControlsCommand.js +var DeleteBucketOwnershipControlsCommand; +var init_DeleteBucketOwnershipControlsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketOwnershipControlsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketOwnershipControlsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketOwnershipControls", {}).n("S3Client", "DeleteBucketOwnershipControlsCommand").sc(DeleteBucketOwnershipControls$).build() { + }; + __name(DeleteBucketOwnershipControlsCommand, "DeleteBucketOwnershipControlsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketPolicyCommand.js +var DeleteBucketPolicyCommand; +var init_DeleteBucketPolicyCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketPolicyCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketPolicyCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketPolicy", {}).n("S3Client", "DeleteBucketPolicyCommand").sc(DeleteBucketPolicy$).build() { + }; + __name(DeleteBucketPolicyCommand, "DeleteBucketPolicyCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketReplicationCommand.js +var DeleteBucketReplicationCommand; +var init_DeleteBucketReplicationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketReplicationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketReplicationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketReplication", {}).n("S3Client", "DeleteBucketReplicationCommand").sc(DeleteBucketReplication$).build() { + }; + __name(DeleteBucketReplicationCommand, "DeleteBucketReplicationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketTaggingCommand.js +var DeleteBucketTaggingCommand; +var init_DeleteBucketTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketTagging", {}).n("S3Client", "DeleteBucketTaggingCommand").sc(DeleteBucketTagging$).build() { + }; + __name(DeleteBucketTaggingCommand, "DeleteBucketTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketWebsiteCommand.js +var DeleteBucketWebsiteCommand; +var init_DeleteBucketWebsiteCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketWebsiteCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketWebsiteCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketWebsite", {}).n("S3Client", "DeleteBucketWebsiteCommand").sc(DeleteBucketWebsite$).build() { + }; + __name(DeleteBucketWebsiteCommand, "DeleteBucketWebsiteCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectCommand.js +var DeleteObjectCommand; +var init_DeleteObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "DeleteObject", {}).n("S3Client", "DeleteObjectCommand").sc(DeleteObject$).build() { + }; + __name(DeleteObjectCommand, "DeleteObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectsCommand.js +var DeleteObjectsCommand; +var init_DeleteObjectsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteObjectsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "DeleteObjects", {}).n("S3Client", "DeleteObjectsCommand").sc(DeleteObjects$).build() { + }; + __name(DeleteObjectsCommand, "DeleteObjectsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectTaggingCommand.js +var DeleteObjectTaggingCommand; +var init_DeleteObjectTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteObjectTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "DeleteObjectTagging", {}).n("S3Client", "DeleteObjectTaggingCommand").sc(DeleteObjectTagging$).build() { + }; + __name(DeleteObjectTaggingCommand, "DeleteObjectTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeletePublicAccessBlockCommand.js +var DeletePublicAccessBlockCommand; +var init_DeletePublicAccessBlockCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeletePublicAccessBlockCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeletePublicAccessBlockCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeletePublicAccessBlock", {}).n("S3Client", "DeletePublicAccessBlockCommand").sc(DeletePublicAccessBlock$).build() { + }; + __name(DeletePublicAccessBlockCommand, "DeletePublicAccessBlockCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAbacCommand.js +var GetBucketAbacCommand; +var init_GetBucketAbacCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAbacCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketAbacCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketAbac", {}).n("S3Client", "GetBucketAbacCommand").sc(GetBucketAbac$).build() { + }; + __name(GetBucketAbacCommand, "GetBucketAbacCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAccelerateConfigurationCommand.js +var GetBucketAccelerateConfigurationCommand; +var init_GetBucketAccelerateConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAccelerateConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketAccelerateConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketAccelerateConfiguration", {}).n("S3Client", "GetBucketAccelerateConfigurationCommand").sc(GetBucketAccelerateConfiguration$).build() { + }; + __name(GetBucketAccelerateConfigurationCommand, "GetBucketAccelerateConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAclCommand.js +var GetBucketAclCommand; +var init_GetBucketAclCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAclCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketAclCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketAcl", {}).n("S3Client", "GetBucketAclCommand").sc(GetBucketAcl$).build() { + }; + __name(GetBucketAclCommand, "GetBucketAclCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAnalyticsConfigurationCommand.js +var GetBucketAnalyticsConfigurationCommand; +var init_GetBucketAnalyticsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAnalyticsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketAnalyticsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketAnalyticsConfiguration", {}).n("S3Client", "GetBucketAnalyticsConfigurationCommand").sc(GetBucketAnalyticsConfiguration$).build() { + }; + __name(GetBucketAnalyticsConfigurationCommand, "GetBucketAnalyticsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketCorsCommand.js +var GetBucketCorsCommand; +var init_GetBucketCorsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketCorsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketCorsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketCors", {}).n("S3Client", "GetBucketCorsCommand").sc(GetBucketCors$).build() { + }; + __name(GetBucketCorsCommand, "GetBucketCorsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketEncryptionCommand.js +var GetBucketEncryptionCommand; +var init_GetBucketEncryptionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketEncryptionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketEncryptionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketEncryption", {}).n("S3Client", "GetBucketEncryptionCommand").sc(GetBucketEncryption$).build() { + }; + __name(GetBucketEncryptionCommand, "GetBucketEncryptionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketIntelligentTieringConfigurationCommand.js +var GetBucketIntelligentTieringConfigurationCommand; +var init_GetBucketIntelligentTieringConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketIntelligentTieringConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketIntelligentTieringConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketIntelligentTieringConfiguration", {}).n("S3Client", "GetBucketIntelligentTieringConfigurationCommand").sc(GetBucketIntelligentTieringConfiguration$).build() { + }; + __name(GetBucketIntelligentTieringConfigurationCommand, "GetBucketIntelligentTieringConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketInventoryConfigurationCommand.js +var GetBucketInventoryConfigurationCommand; +var init_GetBucketInventoryConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketInventoryConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketInventoryConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketInventoryConfiguration", {}).n("S3Client", "GetBucketInventoryConfigurationCommand").sc(GetBucketInventoryConfiguration$).build() { + }; + __name(GetBucketInventoryConfigurationCommand, "GetBucketInventoryConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLifecycleConfigurationCommand.js +var GetBucketLifecycleConfigurationCommand; +var init_GetBucketLifecycleConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLifecycleConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketLifecycleConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketLifecycleConfiguration", {}).n("S3Client", "GetBucketLifecycleConfigurationCommand").sc(GetBucketLifecycleConfiguration$).build() { + }; + __name(GetBucketLifecycleConfigurationCommand, "GetBucketLifecycleConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLocationCommand.js +var GetBucketLocationCommand; +var init_GetBucketLocationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLocationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketLocationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketLocation", {}).n("S3Client", "GetBucketLocationCommand").sc(GetBucketLocation$).build() { + }; + __name(GetBucketLocationCommand, "GetBucketLocationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLoggingCommand.js +var GetBucketLoggingCommand; +var init_GetBucketLoggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLoggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketLoggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketLogging", {}).n("S3Client", "GetBucketLoggingCommand").sc(GetBucketLogging$).build() { + }; + __name(GetBucketLoggingCommand, "GetBucketLoggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataConfigurationCommand.js +var GetBucketMetadataConfigurationCommand; +var init_GetBucketMetadataConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketMetadataConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketMetadataConfiguration", {}).n("S3Client", "GetBucketMetadataConfigurationCommand").sc(GetBucketMetadataConfiguration$).build() { + }; + __name(GetBucketMetadataConfigurationCommand, "GetBucketMetadataConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataTableConfigurationCommand.js +var GetBucketMetadataTableConfigurationCommand; +var init_GetBucketMetadataTableConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataTableConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketMetadataTableConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketMetadataTableConfiguration", {}).n("S3Client", "GetBucketMetadataTableConfigurationCommand").sc(GetBucketMetadataTableConfiguration$).build() { + }; + __name(GetBucketMetadataTableConfigurationCommand, "GetBucketMetadataTableConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetricsConfigurationCommand.js +var GetBucketMetricsConfigurationCommand; +var init_GetBucketMetricsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetricsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketMetricsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketMetricsConfiguration", {}).n("S3Client", "GetBucketMetricsConfigurationCommand").sc(GetBucketMetricsConfiguration$).build() { + }; + __name(GetBucketMetricsConfigurationCommand, "GetBucketMetricsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketNotificationConfigurationCommand.js +var GetBucketNotificationConfigurationCommand; +var init_GetBucketNotificationConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketNotificationConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketNotificationConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketNotificationConfiguration", {}).n("S3Client", "GetBucketNotificationConfigurationCommand").sc(GetBucketNotificationConfiguration$).build() { + }; + __name(GetBucketNotificationConfigurationCommand, "GetBucketNotificationConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketOwnershipControlsCommand.js +var GetBucketOwnershipControlsCommand; +var init_GetBucketOwnershipControlsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketOwnershipControlsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketOwnershipControlsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketOwnershipControls", {}).n("S3Client", "GetBucketOwnershipControlsCommand").sc(GetBucketOwnershipControls$).build() { + }; + __name(GetBucketOwnershipControlsCommand, "GetBucketOwnershipControlsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyCommand.js +var GetBucketPolicyCommand; +var init_GetBucketPolicyCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketPolicyCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketPolicy", {}).n("S3Client", "GetBucketPolicyCommand").sc(GetBucketPolicy$).build() { + }; + __name(GetBucketPolicyCommand, "GetBucketPolicyCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyStatusCommand.js +var GetBucketPolicyStatusCommand; +var init_GetBucketPolicyStatusCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyStatusCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketPolicyStatusCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketPolicyStatus", {}).n("S3Client", "GetBucketPolicyStatusCommand").sc(GetBucketPolicyStatus$).build() { + }; + __name(GetBucketPolicyStatusCommand, "GetBucketPolicyStatusCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketReplicationCommand.js +var GetBucketReplicationCommand; +var init_GetBucketReplicationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketReplicationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketReplicationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketReplication", {}).n("S3Client", "GetBucketReplicationCommand").sc(GetBucketReplication$).build() { + }; + __name(GetBucketReplicationCommand, "GetBucketReplicationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketRequestPaymentCommand.js +var GetBucketRequestPaymentCommand; +var init_GetBucketRequestPaymentCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketRequestPaymentCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketRequestPaymentCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketRequestPayment", {}).n("S3Client", "GetBucketRequestPaymentCommand").sc(GetBucketRequestPayment$).build() { + }; + __name(GetBucketRequestPaymentCommand, "GetBucketRequestPaymentCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketTaggingCommand.js +var GetBucketTaggingCommand; +var init_GetBucketTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketTagging", {}).n("S3Client", "GetBucketTaggingCommand").sc(GetBucketTagging$).build() { + }; + __name(GetBucketTaggingCommand, "GetBucketTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketVersioningCommand.js +var GetBucketVersioningCommand; +var init_GetBucketVersioningCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketVersioningCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketVersioningCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketVersioning", {}).n("S3Client", "GetBucketVersioningCommand").sc(GetBucketVersioning$).build() { + }; + __name(GetBucketVersioningCommand, "GetBucketVersioningCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketWebsiteCommand.js +var GetBucketWebsiteCommand; +var init_GetBucketWebsiteCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketWebsiteCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketWebsiteCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketWebsite", {}).n("S3Client", "GetBucketWebsiteCommand").sc(GetBucketWebsite$).build() { + }; + __name(GetBucketWebsiteCommand, "GetBucketWebsiteCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAclCommand.js +var GetObjectAclCommand; +var init_GetObjectAclCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAclCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectAclCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectAcl", {}).n("S3Client", "GetObjectAclCommand").sc(GetObjectAcl$).build() { + }; + __name(GetObjectAclCommand, "GetObjectAclCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAttributesCommand.js +var GetObjectAttributesCommand; +var init_GetObjectAttributesCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAttributesCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectAttributesCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectAttributes", {}).n("S3Client", "GetObjectAttributesCommand").sc(GetObjectAttributes$).build() { + }; + __name(GetObjectAttributesCommand, "GetObjectAttributesCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectCommand.js +var GetObjectCommand; +var init_GetObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestChecksumRequired: false, + requestValidationModeMember: "ChecksumMode", + "responseAlgorithms": ["CRC64NVME", "CRC32", "CRC32C", "SHA256", "SHA1"] + }), + getSsecPlugin(config3), + getS3ExpiresMiddlewarePlugin(config3) + ]; + }).s("AmazonS3", "GetObject", {}).n("S3Client", "GetObjectCommand").sc(GetObject$).build() { + }; + __name(GetObjectCommand, "GetObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLegalHoldCommand.js +var GetObjectLegalHoldCommand; +var init_GetObjectLegalHoldCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLegalHoldCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectLegalHoldCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectLegalHold", {}).n("S3Client", "GetObjectLegalHoldCommand").sc(GetObjectLegalHold$).build() { + }; + __name(GetObjectLegalHoldCommand, "GetObjectLegalHoldCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLockConfigurationCommand.js +var GetObjectLockConfigurationCommand; +var init_GetObjectLockConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLockConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectLockConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectLockConfiguration", {}).n("S3Client", "GetObjectLockConfigurationCommand").sc(GetObjectLockConfiguration$).build() { + }; + __name(GetObjectLockConfigurationCommand, "GetObjectLockConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectRetentionCommand.js +var GetObjectRetentionCommand; +var init_GetObjectRetentionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectRetentionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectRetentionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectRetention", {}).n("S3Client", "GetObjectRetentionCommand").sc(GetObjectRetention$).build() { + }; + __name(GetObjectRetentionCommand, "GetObjectRetentionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTaggingCommand.js +var GetObjectTaggingCommand; +var init_GetObjectTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectTagging", {}).n("S3Client", "GetObjectTaggingCommand").sc(GetObjectTagging$).build() { + }; + __name(GetObjectTaggingCommand, "GetObjectTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTorrentCommand.js +var GetObjectTorrentCommand; +var init_GetObjectTorrentCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTorrentCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectTorrentCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "GetObjectTorrent", {}).n("S3Client", "GetObjectTorrentCommand").sc(GetObjectTorrent$).build() { + }; + __name(GetObjectTorrentCommand, "GetObjectTorrentCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetPublicAccessBlockCommand.js +var GetPublicAccessBlockCommand; +var init_GetPublicAccessBlockCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetPublicAccessBlockCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetPublicAccessBlockCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetPublicAccessBlock", {}).n("S3Client", "GetPublicAccessBlockCommand").sc(GetPublicAccessBlock$).build() { + }; + __name(GetPublicAccessBlockCommand, "GetPublicAccessBlockCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadBucketCommand.js +var HeadBucketCommand; +var init_HeadBucketCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadBucketCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + HeadBucketCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "HeadBucket", {}).n("S3Client", "HeadBucketCommand").sc(HeadBucket$).build() { + }; + __name(HeadBucketCommand, "HeadBucketCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadObjectCommand.js +var HeadObjectCommand; +var init_HeadObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + HeadObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3), + getS3ExpiresMiddlewarePlugin(config3) + ]; + }).s("AmazonS3", "HeadObject", {}).n("S3Client", "HeadObjectCommand").sc(HeadObject$).build() { + }; + __name(HeadObjectCommand, "HeadObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketAnalyticsConfigurationsCommand.js +var ListBucketAnalyticsConfigurationsCommand; +var init_ListBucketAnalyticsConfigurationsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketAnalyticsConfigurationsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListBucketAnalyticsConfigurationsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListBucketAnalyticsConfigurations", {}).n("S3Client", "ListBucketAnalyticsConfigurationsCommand").sc(ListBucketAnalyticsConfigurations$).build() { + }; + __name(ListBucketAnalyticsConfigurationsCommand, "ListBucketAnalyticsConfigurationsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketIntelligentTieringConfigurationsCommand.js +var ListBucketIntelligentTieringConfigurationsCommand; +var init_ListBucketIntelligentTieringConfigurationsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketIntelligentTieringConfigurationsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListBucketIntelligentTieringConfigurationsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListBucketIntelligentTieringConfigurations", {}).n("S3Client", "ListBucketIntelligentTieringConfigurationsCommand").sc(ListBucketIntelligentTieringConfigurations$).build() { + }; + __name(ListBucketIntelligentTieringConfigurationsCommand, "ListBucketIntelligentTieringConfigurationsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketInventoryConfigurationsCommand.js +var ListBucketInventoryConfigurationsCommand; +var init_ListBucketInventoryConfigurationsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketInventoryConfigurationsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListBucketInventoryConfigurationsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListBucketInventoryConfigurations", {}).n("S3Client", "ListBucketInventoryConfigurationsCommand").sc(ListBucketInventoryConfigurations$).build() { + }; + __name(ListBucketInventoryConfigurationsCommand, "ListBucketInventoryConfigurationsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketMetricsConfigurationsCommand.js +var ListBucketMetricsConfigurationsCommand; +var init_ListBucketMetricsConfigurationsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketMetricsConfigurationsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListBucketMetricsConfigurationsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListBucketMetricsConfigurations", {}).n("S3Client", "ListBucketMetricsConfigurationsCommand").sc(ListBucketMetricsConfigurations$).build() { + }; + __name(ListBucketMetricsConfigurationsCommand, "ListBucketMetricsConfigurationsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketsCommand.js +var ListBucketsCommand; +var init_ListBucketsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListBucketsCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListBuckets", {}).n("S3Client", "ListBucketsCommand").sc(ListBuckets$).build() { + }; + __name(ListBucketsCommand, "ListBucketsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListDirectoryBucketsCommand.js +var ListDirectoryBucketsCommand; +var init_ListDirectoryBucketsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListDirectoryBucketsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListDirectoryBucketsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListDirectoryBuckets", {}).n("S3Client", "ListDirectoryBucketsCommand").sc(ListDirectoryBuckets$).build() { + }; + __name(ListDirectoryBucketsCommand, "ListDirectoryBucketsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListMultipartUploadsCommand.js +var ListMultipartUploadsCommand; +var init_ListMultipartUploadsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListMultipartUploadsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListMultipartUploadsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListMultipartUploads", {}).n("S3Client", "ListMultipartUploadsCommand").sc(ListMultipartUploads$).build() { + }; + __name(ListMultipartUploadsCommand, "ListMultipartUploadsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsCommand.js +var ListObjectsCommand; +var init_ListObjectsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListObjectsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListObjects", {}).n("S3Client", "ListObjectsCommand").sc(ListObjects$).build() { + }; + __name(ListObjectsCommand, "ListObjectsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsV2Command.js +var ListObjectsV2Command; +var init_ListObjectsV2Command = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsV2Command.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListObjectsV2Command = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListObjectsV2", {}).n("S3Client", "ListObjectsV2Command").sc(ListObjectsV2$).build() { + }; + __name(ListObjectsV2Command, "ListObjectsV2Command"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectVersionsCommand.js +var ListObjectVersionsCommand; +var init_ListObjectVersionsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectVersionsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListObjectVersionsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListObjectVersions", {}).n("S3Client", "ListObjectVersionsCommand").sc(ListObjectVersions$).build() { + }; + __name(ListObjectVersionsCommand, "ListObjectVersionsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListPartsCommand.js +var ListPartsCommand; +var init_ListPartsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListPartsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListPartsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "ListParts", {}).n("S3Client", "ListPartsCommand").sc(ListParts$).build() { + }; + __name(ListPartsCommand, "ListPartsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAbacCommand.js +var PutBucketAbacCommand; +var init_PutBucketAbacCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAbacCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketAbacCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: false + }) + ]; + }).s("AmazonS3", "PutBucketAbac", {}).n("S3Client", "PutBucketAbacCommand").sc(PutBucketAbac$).build() { + }; + __name(PutBucketAbacCommand, "PutBucketAbacCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAccelerateConfigurationCommand.js +var PutBucketAccelerateConfigurationCommand; +var init_PutBucketAccelerateConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAccelerateConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketAccelerateConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: false + }) + ]; + }).s("AmazonS3", "PutBucketAccelerateConfiguration", {}).n("S3Client", "PutBucketAccelerateConfigurationCommand").sc(PutBucketAccelerateConfiguration$).build() { + }; + __name(PutBucketAccelerateConfigurationCommand, "PutBucketAccelerateConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAclCommand.js +var PutBucketAclCommand; +var init_PutBucketAclCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAclCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketAclCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketAcl", {}).n("S3Client", "PutBucketAclCommand").sc(PutBucketAcl$).build() { + }; + __name(PutBucketAclCommand, "PutBucketAclCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAnalyticsConfigurationCommand.js +var PutBucketAnalyticsConfigurationCommand; +var init_PutBucketAnalyticsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAnalyticsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketAnalyticsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "PutBucketAnalyticsConfiguration", {}).n("S3Client", "PutBucketAnalyticsConfigurationCommand").sc(PutBucketAnalyticsConfiguration$).build() { + }; + __name(PutBucketAnalyticsConfigurationCommand, "PutBucketAnalyticsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketCorsCommand.js +var PutBucketCorsCommand; +var init_PutBucketCorsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketCorsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketCorsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketCors", {}).n("S3Client", "PutBucketCorsCommand").sc(PutBucketCors$).build() { + }; + __name(PutBucketCorsCommand, "PutBucketCorsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketEncryptionCommand.js +var PutBucketEncryptionCommand; +var init_PutBucketEncryptionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketEncryptionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketEncryptionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketEncryption", {}).n("S3Client", "PutBucketEncryptionCommand").sc(PutBucketEncryption$).build() { + }; + __name(PutBucketEncryptionCommand, "PutBucketEncryptionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketIntelligentTieringConfigurationCommand.js +var PutBucketIntelligentTieringConfigurationCommand; +var init_PutBucketIntelligentTieringConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketIntelligentTieringConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketIntelligentTieringConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "PutBucketIntelligentTieringConfiguration", {}).n("S3Client", "PutBucketIntelligentTieringConfigurationCommand").sc(PutBucketIntelligentTieringConfiguration$).build() { + }; + __name(PutBucketIntelligentTieringConfigurationCommand, "PutBucketIntelligentTieringConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketInventoryConfigurationCommand.js +var PutBucketInventoryConfigurationCommand; +var init_PutBucketInventoryConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketInventoryConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketInventoryConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "PutBucketInventoryConfiguration", {}).n("S3Client", "PutBucketInventoryConfigurationCommand").sc(PutBucketInventoryConfiguration$).build() { + }; + __name(PutBucketInventoryConfigurationCommand, "PutBucketInventoryConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLifecycleConfigurationCommand.js +var PutBucketLifecycleConfigurationCommand; +var init_PutBucketLifecycleConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLifecycleConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketLifecycleConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutBucketLifecycleConfiguration", {}).n("S3Client", "PutBucketLifecycleConfigurationCommand").sc(PutBucketLifecycleConfiguration$).build() { + }; + __name(PutBucketLifecycleConfigurationCommand, "PutBucketLifecycleConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLoggingCommand.js +var PutBucketLoggingCommand; +var init_PutBucketLoggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLoggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketLoggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketLogging", {}).n("S3Client", "PutBucketLoggingCommand").sc(PutBucketLogging$).build() { + }; + __name(PutBucketLoggingCommand, "PutBucketLoggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketMetricsConfigurationCommand.js +var PutBucketMetricsConfigurationCommand; +var init_PutBucketMetricsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketMetricsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketMetricsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "PutBucketMetricsConfiguration", {}).n("S3Client", "PutBucketMetricsConfigurationCommand").sc(PutBucketMetricsConfiguration$).build() { + }; + __name(PutBucketMetricsConfigurationCommand, "PutBucketMetricsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketNotificationConfigurationCommand.js +var PutBucketNotificationConfigurationCommand; +var init_PutBucketNotificationConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketNotificationConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketNotificationConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "PutBucketNotificationConfiguration", {}).n("S3Client", "PutBucketNotificationConfigurationCommand").sc(PutBucketNotificationConfiguration$).build() { + }; + __name(PutBucketNotificationConfigurationCommand, "PutBucketNotificationConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketOwnershipControlsCommand.js +var PutBucketOwnershipControlsCommand; +var init_PutBucketOwnershipControlsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketOwnershipControlsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketOwnershipControlsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketOwnershipControls", {}).n("S3Client", "PutBucketOwnershipControlsCommand").sc(PutBucketOwnershipControls$).build() { + }; + __name(PutBucketOwnershipControlsCommand, "PutBucketOwnershipControlsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketPolicyCommand.js +var PutBucketPolicyCommand; +var init_PutBucketPolicyCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketPolicyCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketPolicyCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketPolicy", {}).n("S3Client", "PutBucketPolicyCommand").sc(PutBucketPolicy$).build() { + }; + __name(PutBucketPolicyCommand, "PutBucketPolicyCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketReplicationCommand.js +var PutBucketReplicationCommand; +var init_PutBucketReplicationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketReplicationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketReplicationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketReplication", {}).n("S3Client", "PutBucketReplicationCommand").sc(PutBucketReplication$).build() { + }; + __name(PutBucketReplicationCommand, "PutBucketReplicationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketRequestPaymentCommand.js +var PutBucketRequestPaymentCommand; +var init_PutBucketRequestPaymentCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketRequestPaymentCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketRequestPaymentCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketRequestPayment", {}).n("S3Client", "PutBucketRequestPaymentCommand").sc(PutBucketRequestPayment$).build() { + }; + __name(PutBucketRequestPaymentCommand, "PutBucketRequestPaymentCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketTaggingCommand.js +var PutBucketTaggingCommand; +var init_PutBucketTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketTagging", {}).n("S3Client", "PutBucketTaggingCommand").sc(PutBucketTagging$).build() { + }; + __name(PutBucketTaggingCommand, "PutBucketTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketVersioningCommand.js +var PutBucketVersioningCommand; +var init_PutBucketVersioningCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketVersioningCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketVersioningCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketVersioning", {}).n("S3Client", "PutBucketVersioningCommand").sc(PutBucketVersioning$).build() { + }; + __name(PutBucketVersioningCommand, "PutBucketVersioningCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketWebsiteCommand.js +var PutBucketWebsiteCommand; +var init_PutBucketWebsiteCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketWebsiteCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketWebsiteCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketWebsite", {}).n("S3Client", "PutBucketWebsiteCommand").sc(PutBucketWebsite$).build() { + }; + __name(PutBucketWebsiteCommand, "PutBucketWebsiteCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectAclCommand.js +var PutObjectAclCommand; +var init_PutObjectAclCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectAclCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectAclCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutObjectAcl", {}).n("S3Client", "PutObjectAclCommand").sc(PutObjectAcl$).build() { + }; + __name(PutObjectAclCommand, "PutObjectAclCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectCommand.js +var PutObjectCommand; +var init_PutObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: false + }), + getCheckContentLengthHeaderPlugin(config3), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "PutObject", {}).n("S3Client", "PutObjectCommand").sc(PutObject$).build() { + }; + __name(PutObjectCommand, "PutObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLegalHoldCommand.js +var PutObjectLegalHoldCommand; +var init_PutObjectLegalHoldCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLegalHoldCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectLegalHoldCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutObjectLegalHold", {}).n("S3Client", "PutObjectLegalHoldCommand").sc(PutObjectLegalHold$).build() { + }; + __name(PutObjectLegalHoldCommand, "PutObjectLegalHoldCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLockConfigurationCommand.js +var PutObjectLockConfigurationCommand; +var init_PutObjectLockConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLockConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectLockConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutObjectLockConfiguration", {}).n("S3Client", "PutObjectLockConfigurationCommand").sc(PutObjectLockConfiguration$).build() { + }; + __name(PutObjectLockConfigurationCommand, "PutObjectLockConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectRetentionCommand.js +var PutObjectRetentionCommand; +var init_PutObjectRetentionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectRetentionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectRetentionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutObjectRetention", {}).n("S3Client", "PutObjectRetentionCommand").sc(PutObjectRetention$).build() { + }; + __name(PutObjectRetentionCommand, "PutObjectRetentionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectTaggingCommand.js +var PutObjectTaggingCommand; +var init_PutObjectTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutObjectTagging", {}).n("S3Client", "PutObjectTaggingCommand").sc(PutObjectTagging$).build() { + }; + __name(PutObjectTaggingCommand, "PutObjectTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutPublicAccessBlockCommand.js +var PutPublicAccessBlockCommand; +var init_PutPublicAccessBlockCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutPublicAccessBlockCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutPublicAccessBlockCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutPublicAccessBlock", {}).n("S3Client", "PutPublicAccessBlockCommand").sc(PutPublicAccessBlock$).build() { + }; + __name(PutPublicAccessBlockCommand, "PutPublicAccessBlockCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/RenameObjectCommand.js +var RenameObjectCommand; +var init_RenameObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/RenameObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + RenameObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "RenameObject", {}).n("S3Client", "RenameObjectCommand").sc(RenameObject$).build() { + }; + __name(RenameObjectCommand, "RenameObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/RestoreObjectCommand.js +var RestoreObjectCommand; +var init_RestoreObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/RestoreObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + RestoreObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: false + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "RestoreObject", {}).n("S3Client", "RestoreObjectCommand").sc(RestoreObject$).build() { + }; + __name(RestoreObjectCommand, "RestoreObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/SelectObjectContentCommand.js +var SelectObjectContentCommand; +var init_SelectObjectContentCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/SelectObjectContentCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + SelectObjectContentCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "SelectObjectContent", { + eventStream: { + output: true + } + }).n("S3Client", "SelectObjectContentCommand").sc(SelectObjectContent$).build() { + }; + __name(SelectObjectContentCommand, "SelectObjectContentCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataInventoryTableConfigurationCommand.js +var UpdateBucketMetadataInventoryTableConfigurationCommand; +var init_UpdateBucketMetadataInventoryTableConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataInventoryTableConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + UpdateBucketMetadataInventoryTableConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "UpdateBucketMetadataInventoryTableConfiguration", {}).n("S3Client", "UpdateBucketMetadataInventoryTableConfigurationCommand").sc(UpdateBucketMetadataInventoryTableConfiguration$).build() { + }; + __name(UpdateBucketMetadataInventoryTableConfigurationCommand, "UpdateBucketMetadataInventoryTableConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataJournalTableConfigurationCommand.js +var UpdateBucketMetadataJournalTableConfigurationCommand; +var init_UpdateBucketMetadataJournalTableConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataJournalTableConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + UpdateBucketMetadataJournalTableConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "UpdateBucketMetadataJournalTableConfiguration", {}).n("S3Client", "UpdateBucketMetadataJournalTableConfigurationCommand").sc(UpdateBucketMetadataJournalTableConfiguration$).build() { + }; + __name(UpdateBucketMetadataJournalTableConfigurationCommand, "UpdateBucketMetadataJournalTableConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateObjectEncryptionCommand.js +var UpdateObjectEncryptionCommand; +var init_UpdateObjectEncryptionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateObjectEncryptionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + UpdateObjectEncryptionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "UpdateObjectEncryption", {}).n("S3Client", "UpdateObjectEncryptionCommand").sc(UpdateObjectEncryption$).build() { + }; + __name(UpdateObjectEncryptionCommand, "UpdateObjectEncryptionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCommand.js +var UploadPartCommand; +var init_UploadPartCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + UploadPartCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: false + }), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "UploadPart", {}).n("S3Client", "UploadPartCommand").sc(UploadPart$).build() { + }; + __name(UploadPartCommand, "UploadPartCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCopyCommand.js +var UploadPartCopyCommand; +var init_UploadPartCopyCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCopyCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + UploadPartCopyCommand = class extends Command.classBuilder().ep({ + ...commonParams, + DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "UploadPartCopy", {}).n("S3Client", "UploadPartCopyCommand").sc(UploadPartCopy$).build() { + }; + __name(UploadPartCopyCommand, "UploadPartCopyCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/WriteGetObjectResponseCommand.js +var WriteGetObjectResponseCommand; +var init_WriteGetObjectResponseCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/WriteGetObjectResponseCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + WriteGetObjectResponseCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseObjectLambdaEndpoint: { type: "staticContextParams", value: true } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "WriteGetObjectResponse", {}).n("S3Client", "WriteGetObjectResponseCommand").sc(WriteGetObjectResponse$).build() { + }; + __name(WriteGetObjectResponseCommand, "WriteGetObjectResponseCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListBucketsPaginator.js +var paginateListBuckets; +var init_ListBucketsPaginator = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListBucketsPaginator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_ListBucketsCommand(); + init_S3Client(); + paginateListBuckets = createPaginator(S3Client, ListBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxBuckets"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListDirectoryBucketsPaginator.js +var paginateListDirectoryBuckets; +var init_ListDirectoryBucketsPaginator = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListDirectoryBucketsPaginator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_ListDirectoryBucketsCommand(); + init_S3Client(); + paginateListDirectoryBuckets = createPaginator(S3Client, ListDirectoryBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxDirectoryBuckets"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListObjectsV2Paginator.js +var paginateListObjectsV2; +var init_ListObjectsV2Paginator = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListObjectsV2Paginator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_ListObjectsV2Command(); + init_S3Client(); + paginateListObjectsV2 = createPaginator(S3Client, ListObjectsV2Command, "ContinuationToken", "NextContinuationToken", "MaxKeys"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListPartsPaginator.js +var paginateListParts; +var init_ListPartsPaginator = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListPartsPaginator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_ListPartsCommand(); + init_S3Client(); + paginateListParts = createPaginator(S3Client, ListPartsCommand, "PartNumberMarker", "NextPartNumberMarker", "MaxParts"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/circularReplacer.js +var getCircularReplacer; +var init_circularReplacer = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/circularReplacer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getCircularReplacer = /* @__PURE__ */ __name(() => { + const seen = /* @__PURE__ */ new WeakSet(); + return (key, value) => { + if (typeof value === "object" && value !== null) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }; + }, "getCircularReplacer"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/utils/sleep.js +var sleep; +var init_sleep = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/utils/sleep.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + sleep = /* @__PURE__ */ __name((seconds) => { + return new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); + }, "sleep"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/waiter.js +var waiterServiceDefaults, WaiterState, checkExceptions; +var init_waiter2 = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/waiter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_circularReplacer(); + waiterServiceDefaults = { + minDelay: 2, + maxDelay: 120 + }; + (function(WaiterState2) { + WaiterState2["ABORTED"] = "ABORTED"; + WaiterState2["FAILURE"] = "FAILURE"; + WaiterState2["SUCCESS"] = "SUCCESS"; + WaiterState2["RETRY"] = "RETRY"; + WaiterState2["TIMEOUT"] = "TIMEOUT"; + })(WaiterState || (WaiterState = {})); + checkExceptions = /* @__PURE__ */ __name((result) => { + if (result.state === WaiterState.ABORTED) { + const abortError = new Error(`${JSON.stringify({ + ...result, + reason: "Request was aborted" + }, getCircularReplacer())}`); + abortError.name = "AbortError"; + throw abortError; + } else if (result.state === WaiterState.TIMEOUT) { + const timeoutError = new Error(`${JSON.stringify({ + ...result, + reason: "Waiter has timed out" + }, getCircularReplacer())}`); + timeoutError.name = "TimeoutError"; + throw timeoutError; + } else if (result.state !== WaiterState.SUCCESS) { + throw new Error(`${JSON.stringify(result, getCircularReplacer())}`); + } + return result; + }, "checkExceptions"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/poller.js +var exponentialBackoffWithJitter, randomInRange, runPolling, createMessageFromResponse; +var init_poller = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/poller.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_circularReplacer(); + init_sleep(); + init_waiter2(); + exponentialBackoffWithJitter = /* @__PURE__ */ __name((minDelay, maxDelay, attemptCeiling, attempt) => { + if (attempt > attemptCeiling) + return maxDelay; + const delay = minDelay * 2 ** (attempt - 1); + return randomInRange(minDelay, delay); + }, "exponentialBackoffWithJitter"); + randomInRange = /* @__PURE__ */ __name((min, max2) => min + Math.random() * (max2 - min), "randomInRange"); + runPolling = /* @__PURE__ */ __name(async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => { + const observedResponses = {}; + const { state, reason } = await acceptorChecks(client, input); + if (reason) { + const message2 = createMessageFromResponse(reason); + observedResponses[message2] |= 0; + observedResponses[message2] += 1; + } + if (state !== WaiterState.RETRY) { + return { state, reason, observedResponses }; + } + let currentAttempt = 1; + const waitUntil = Date.now() + maxWaitTime * 1e3; + const attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1; + while (true) { + if (abortController?.signal?.aborted || abortSignal?.aborted) { + const message2 = "AbortController signal aborted."; + observedResponses[message2] |= 0; + observedResponses[message2] += 1; + return { state: WaiterState.ABORTED, observedResponses }; + } + const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt); + if (Date.now() + delay * 1e3 > waitUntil) { + return { state: WaiterState.TIMEOUT, observedResponses }; + } + await sleep(delay); + const { state: state2, reason: reason2 } = await acceptorChecks(client, input); + if (reason2) { + const message2 = createMessageFromResponse(reason2); + observedResponses[message2] |= 0; + observedResponses[message2] += 1; + } + if (state2 !== WaiterState.RETRY) { + return { state: state2, reason: reason2, observedResponses }; + } + currentAttempt += 1; + } + }, "runPolling"); + createMessageFromResponse = /* @__PURE__ */ __name((reason) => { + if (reason?.$responseBodyText) { + return `Deserialization error for body: ${reason.$responseBodyText}`; + } + if (reason?.$metadata?.httpStatusCode) { + if (reason.$response || reason.message) { + return `${reason.$response?.statusCode ?? reason.$metadata.httpStatusCode ?? "Unknown"}: ${reason.message}`; + } + return `${reason.$metadata.httpStatusCode}: OK`; + } + return String(reason?.message ?? JSON.stringify(reason, getCircularReplacer()) ?? "Unknown"); + }, "createMessageFromResponse"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/utils/validate.js +var validateWaiterOptions; +var init_validate = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/utils/validate.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + validateWaiterOptions = /* @__PURE__ */ __name((options) => { + if (options.maxWaitTime <= 0) { + throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`); + } else if (options.minDelay <= 0) { + throw new Error(`WaiterConfiguration.minDelay must be greater than 0`); + } else if (options.maxDelay <= 0) { + throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`); + } else if (options.maxWaitTime <= options.minDelay) { + throw new Error(`WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`); + } else if (options.maxDelay < options.minDelay) { + throw new Error(`WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`); + } + }, "validateWaiterOptions"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/utils/index.js +var init_utils7 = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/utils/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sleep(); + init_validate(); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/createWaiter.js +var abortTimeout, createWaiter; +var init_createWaiter = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/createWaiter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_poller(); + init_utils7(); + init_waiter2(); + abortTimeout = /* @__PURE__ */ __name((abortSignal) => { + let onAbort; + const promise2 = new Promise((resolve) => { + onAbort = /* @__PURE__ */ __name(() => resolve({ state: WaiterState.ABORTED }), "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + abortSignal.addEventListener("abort", onAbort); + } else { + abortSignal.onabort = onAbort; + } + }); + return { + clearListener() { + if (typeof abortSignal.removeEventListener === "function") { + abortSignal.removeEventListener("abort", onAbort); + } + }, + aborted: promise2 + }; + }, "abortTimeout"); + createWaiter = /* @__PURE__ */ __name(async (options, input, acceptorChecks) => { + const params = { + ...waiterServiceDefaults, + ...options + }; + validateWaiterOptions(params); + const exitConditions = [runPolling(params, input, acceptorChecks)]; + const finalize2 = []; + if (options.abortSignal) { + const { aborted: aborted2, clearListener } = abortTimeout(options.abortSignal); + finalize2.push(clearListener); + exitConditions.push(aborted2); + } + if (options.abortController?.signal) { + const { aborted: aborted2, clearListener } = abortTimeout(options.abortController.signal); + finalize2.push(clearListener); + exitConditions.push(aborted2); + } + return Promise.race(exitConditions).then((result) => { + for (const fn of finalize2) { + fn(); + } + return result; + }); + }, "createWaiter"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/index.js +var init_dist_es58 = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_createWaiter(); + init_waiter2(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketExists.js +var checkState, waitUntilBucketExists; +var init_waitForBucketExists = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketExists.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es58(); + init_HeadBucketCommand(); + checkState = /* @__PURE__ */ __name(async (client, input) => { + let reason; + try { + let result = await client.send(new HeadBucketCommand(input)); + reason = result; + return { state: WaiterState.SUCCESS, reason }; + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "NotFound") { + return { state: WaiterState.RETRY, reason }; + } + } + return { state: WaiterState.RETRY, reason }; + }, "checkState"); + waitUntilBucketExists = /* @__PURE__ */ __name(async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); + }, "waitUntilBucketExists"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketNotExists.js +var checkState2, waitUntilBucketNotExists; +var init_waitForBucketNotExists = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketNotExists.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es58(); + init_HeadBucketCommand(); + checkState2 = /* @__PURE__ */ __name(async (client, input) => { + let reason; + try { + let result = await client.send(new HeadBucketCommand(input)); + reason = result; + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "NotFound") { + return { state: WaiterState.SUCCESS, reason }; + } + } + return { state: WaiterState.RETRY, reason }; + }, "checkState"); + waitUntilBucketNotExists = /* @__PURE__ */ __name(async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState2); + return checkExceptions(result); + }, "waitUntilBucketNotExists"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectExists.js +var checkState3, waitUntilObjectExists; +var init_waitForObjectExists = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectExists.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es58(); + init_HeadObjectCommand(); + checkState3 = /* @__PURE__ */ __name(async (client, input) => { + let reason; + try { + let result = await client.send(new HeadObjectCommand(input)); + reason = result; + return { state: WaiterState.SUCCESS, reason }; + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "NotFound") { + return { state: WaiterState.RETRY, reason }; + } + } + return { state: WaiterState.RETRY, reason }; + }, "checkState"); + waitUntilObjectExists = /* @__PURE__ */ __name(async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState3); + return checkExceptions(result); + }, "waitUntilObjectExists"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectNotExists.js +var checkState4, waitUntilObjectNotExists; +var init_waitForObjectNotExists = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectNotExists.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es58(); + init_HeadObjectCommand(); + checkState4 = /* @__PURE__ */ __name(async (client, input) => { + let reason; + try { + let result = await client.send(new HeadObjectCommand(input)); + reason = result; + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "NotFound") { + return { state: WaiterState.SUCCESS, reason }; + } + } + return { state: WaiterState.RETRY, reason }; + }, "checkState"); + waitUntilObjectNotExists = /* @__PURE__ */ __name(async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState4); + return checkExceptions(result); + }, "waitUntilObjectNotExists"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/S3.js +var commands, paginators, waiters, S3; +var init_S3 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/S3.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es21(); + init_AbortMultipartUploadCommand(); + init_CompleteMultipartUploadCommand(); + init_CopyObjectCommand(); + init_CreateBucketCommand(); + init_CreateBucketMetadataConfigurationCommand(); + init_CreateBucketMetadataTableConfigurationCommand(); + init_CreateMultipartUploadCommand(); + init_CreateSessionCommand(); + init_DeleteBucketAnalyticsConfigurationCommand(); + init_DeleteBucketCommand(); + init_DeleteBucketCorsCommand(); + init_DeleteBucketEncryptionCommand(); + init_DeleteBucketIntelligentTieringConfigurationCommand(); + init_DeleteBucketInventoryConfigurationCommand(); + init_DeleteBucketLifecycleCommand(); + init_DeleteBucketMetadataConfigurationCommand(); + init_DeleteBucketMetadataTableConfigurationCommand(); + init_DeleteBucketMetricsConfigurationCommand(); + init_DeleteBucketOwnershipControlsCommand(); + init_DeleteBucketPolicyCommand(); + init_DeleteBucketReplicationCommand(); + init_DeleteBucketTaggingCommand(); + init_DeleteBucketWebsiteCommand(); + init_DeleteObjectCommand(); + init_DeleteObjectsCommand(); + init_DeleteObjectTaggingCommand(); + init_DeletePublicAccessBlockCommand(); + init_GetBucketAbacCommand(); + init_GetBucketAccelerateConfigurationCommand(); + init_GetBucketAclCommand(); + init_GetBucketAnalyticsConfigurationCommand(); + init_GetBucketCorsCommand(); + init_GetBucketEncryptionCommand(); + init_GetBucketIntelligentTieringConfigurationCommand(); + init_GetBucketInventoryConfigurationCommand(); + init_GetBucketLifecycleConfigurationCommand(); + init_GetBucketLocationCommand(); + init_GetBucketLoggingCommand(); + init_GetBucketMetadataConfigurationCommand(); + init_GetBucketMetadataTableConfigurationCommand(); + init_GetBucketMetricsConfigurationCommand(); + init_GetBucketNotificationConfigurationCommand(); + init_GetBucketOwnershipControlsCommand(); + init_GetBucketPolicyCommand(); + init_GetBucketPolicyStatusCommand(); + init_GetBucketReplicationCommand(); + init_GetBucketRequestPaymentCommand(); + init_GetBucketTaggingCommand(); + init_GetBucketVersioningCommand(); + init_GetBucketWebsiteCommand(); + init_GetObjectAclCommand(); + init_GetObjectAttributesCommand(); + init_GetObjectCommand(); + init_GetObjectLegalHoldCommand(); + init_GetObjectLockConfigurationCommand(); + init_GetObjectRetentionCommand(); + init_GetObjectTaggingCommand(); + init_GetObjectTorrentCommand(); + init_GetPublicAccessBlockCommand(); + init_HeadBucketCommand(); + init_HeadObjectCommand(); + init_ListBucketAnalyticsConfigurationsCommand(); + init_ListBucketIntelligentTieringConfigurationsCommand(); + init_ListBucketInventoryConfigurationsCommand(); + init_ListBucketMetricsConfigurationsCommand(); + init_ListBucketsCommand(); + init_ListDirectoryBucketsCommand(); + init_ListMultipartUploadsCommand(); + init_ListObjectsCommand(); + init_ListObjectsV2Command(); + init_ListObjectVersionsCommand(); + init_ListPartsCommand(); + init_PutBucketAbacCommand(); + init_PutBucketAccelerateConfigurationCommand(); + init_PutBucketAclCommand(); + init_PutBucketAnalyticsConfigurationCommand(); + init_PutBucketCorsCommand(); + init_PutBucketEncryptionCommand(); + init_PutBucketIntelligentTieringConfigurationCommand(); + init_PutBucketInventoryConfigurationCommand(); + init_PutBucketLifecycleConfigurationCommand(); + init_PutBucketLoggingCommand(); + init_PutBucketMetricsConfigurationCommand(); + init_PutBucketNotificationConfigurationCommand(); + init_PutBucketOwnershipControlsCommand(); + init_PutBucketPolicyCommand(); + init_PutBucketReplicationCommand(); + init_PutBucketRequestPaymentCommand(); + init_PutBucketTaggingCommand(); + init_PutBucketVersioningCommand(); + init_PutBucketWebsiteCommand(); + init_PutObjectAclCommand(); + init_PutObjectCommand(); + init_PutObjectLegalHoldCommand(); + init_PutObjectLockConfigurationCommand(); + init_PutObjectRetentionCommand(); + init_PutObjectTaggingCommand(); + init_PutPublicAccessBlockCommand(); + init_RenameObjectCommand(); + init_RestoreObjectCommand(); + init_SelectObjectContentCommand(); + init_UpdateBucketMetadataInventoryTableConfigurationCommand(); + init_UpdateBucketMetadataJournalTableConfigurationCommand(); + init_UpdateObjectEncryptionCommand(); + init_UploadPartCommand(); + init_UploadPartCopyCommand(); + init_WriteGetObjectResponseCommand(); + init_ListBucketsPaginator(); + init_ListDirectoryBucketsPaginator(); + init_ListObjectsV2Paginator(); + init_ListPartsPaginator(); + init_S3Client(); + init_waitForBucketExists(); + init_waitForBucketNotExists(); + init_waitForObjectExists(); + init_waitForObjectNotExists(); + commands = { + AbortMultipartUploadCommand, + CompleteMultipartUploadCommand, + CopyObjectCommand, + CreateBucketCommand, + CreateBucketMetadataConfigurationCommand, + CreateBucketMetadataTableConfigurationCommand, + CreateMultipartUploadCommand, + CreateSessionCommand, + DeleteBucketCommand, + DeleteBucketAnalyticsConfigurationCommand, + DeleteBucketCorsCommand, + DeleteBucketEncryptionCommand, + DeleteBucketIntelligentTieringConfigurationCommand, + DeleteBucketInventoryConfigurationCommand, + DeleteBucketLifecycleCommand, + DeleteBucketMetadataConfigurationCommand, + DeleteBucketMetadataTableConfigurationCommand, + DeleteBucketMetricsConfigurationCommand, + DeleteBucketOwnershipControlsCommand, + DeleteBucketPolicyCommand, + DeleteBucketReplicationCommand, + DeleteBucketTaggingCommand, + DeleteBucketWebsiteCommand, + DeleteObjectCommand, + DeleteObjectsCommand, + DeleteObjectTaggingCommand, + DeletePublicAccessBlockCommand, + GetBucketAbacCommand, + GetBucketAccelerateConfigurationCommand, + GetBucketAclCommand, + GetBucketAnalyticsConfigurationCommand, + GetBucketCorsCommand, + GetBucketEncryptionCommand, + GetBucketIntelligentTieringConfigurationCommand, + GetBucketInventoryConfigurationCommand, + GetBucketLifecycleConfigurationCommand, + GetBucketLocationCommand, + GetBucketLoggingCommand, + GetBucketMetadataConfigurationCommand, + GetBucketMetadataTableConfigurationCommand, + GetBucketMetricsConfigurationCommand, + GetBucketNotificationConfigurationCommand, + GetBucketOwnershipControlsCommand, + GetBucketPolicyCommand, + GetBucketPolicyStatusCommand, + GetBucketReplicationCommand, + GetBucketRequestPaymentCommand, + GetBucketTaggingCommand, + GetBucketVersioningCommand, + GetBucketWebsiteCommand, + GetObjectCommand, + GetObjectAclCommand, + GetObjectAttributesCommand, + GetObjectLegalHoldCommand, + GetObjectLockConfigurationCommand, + GetObjectRetentionCommand, + GetObjectTaggingCommand, + GetObjectTorrentCommand, + GetPublicAccessBlockCommand, + HeadBucketCommand, + HeadObjectCommand, + ListBucketAnalyticsConfigurationsCommand, + ListBucketIntelligentTieringConfigurationsCommand, + ListBucketInventoryConfigurationsCommand, + ListBucketMetricsConfigurationsCommand, + ListBucketsCommand, + ListDirectoryBucketsCommand, + ListMultipartUploadsCommand, + ListObjectsCommand, + ListObjectsV2Command, + ListObjectVersionsCommand, + ListPartsCommand, + PutBucketAbacCommand, + PutBucketAccelerateConfigurationCommand, + PutBucketAclCommand, + PutBucketAnalyticsConfigurationCommand, + PutBucketCorsCommand, + PutBucketEncryptionCommand, + PutBucketIntelligentTieringConfigurationCommand, + PutBucketInventoryConfigurationCommand, + PutBucketLifecycleConfigurationCommand, + PutBucketLoggingCommand, + PutBucketMetricsConfigurationCommand, + PutBucketNotificationConfigurationCommand, + PutBucketOwnershipControlsCommand, + PutBucketPolicyCommand, + PutBucketReplicationCommand, + PutBucketRequestPaymentCommand, + PutBucketTaggingCommand, + PutBucketVersioningCommand, + PutBucketWebsiteCommand, + PutObjectCommand, + PutObjectAclCommand, + PutObjectLegalHoldCommand, + PutObjectLockConfigurationCommand, + PutObjectRetentionCommand, + PutObjectTaggingCommand, + PutPublicAccessBlockCommand, + RenameObjectCommand, + RestoreObjectCommand, + SelectObjectContentCommand, + UpdateBucketMetadataInventoryTableConfigurationCommand, + UpdateBucketMetadataJournalTableConfigurationCommand, + UpdateObjectEncryptionCommand, + UploadPartCommand, + UploadPartCopyCommand, + WriteGetObjectResponseCommand + }; + paginators = { + paginateListBuckets, + paginateListDirectoryBuckets, + paginateListObjectsV2, + paginateListParts + }; + waiters = { + waitUntilBucketExists, + waitUntilBucketNotExists, + waitUntilObjectExists, + waitUntilObjectNotExists + }; + S3 = class extends S3Client { + }; + __name(S3, "S3"); + createAggregatedClient(commands, S3, { paginators, waiters }); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/index.js +var init_commands = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AbortMultipartUploadCommand(); + init_CompleteMultipartUploadCommand(); + init_CopyObjectCommand(); + init_CreateBucketCommand(); + init_CreateBucketMetadataConfigurationCommand(); + init_CreateBucketMetadataTableConfigurationCommand(); + init_CreateMultipartUploadCommand(); + init_CreateSessionCommand(); + init_DeleteBucketAnalyticsConfigurationCommand(); + init_DeleteBucketCommand(); + init_DeleteBucketCorsCommand(); + init_DeleteBucketEncryptionCommand(); + init_DeleteBucketIntelligentTieringConfigurationCommand(); + init_DeleteBucketInventoryConfigurationCommand(); + init_DeleteBucketLifecycleCommand(); + init_DeleteBucketMetadataConfigurationCommand(); + init_DeleteBucketMetadataTableConfigurationCommand(); + init_DeleteBucketMetricsConfigurationCommand(); + init_DeleteBucketOwnershipControlsCommand(); + init_DeleteBucketPolicyCommand(); + init_DeleteBucketReplicationCommand(); + init_DeleteBucketTaggingCommand(); + init_DeleteBucketWebsiteCommand(); + init_DeleteObjectCommand(); + init_DeleteObjectTaggingCommand(); + init_DeleteObjectsCommand(); + init_DeletePublicAccessBlockCommand(); + init_GetBucketAbacCommand(); + init_GetBucketAccelerateConfigurationCommand(); + init_GetBucketAclCommand(); + init_GetBucketAnalyticsConfigurationCommand(); + init_GetBucketCorsCommand(); + init_GetBucketEncryptionCommand(); + init_GetBucketIntelligentTieringConfigurationCommand(); + init_GetBucketInventoryConfigurationCommand(); + init_GetBucketLifecycleConfigurationCommand(); + init_GetBucketLocationCommand(); + init_GetBucketLoggingCommand(); + init_GetBucketMetadataConfigurationCommand(); + init_GetBucketMetadataTableConfigurationCommand(); + init_GetBucketMetricsConfigurationCommand(); + init_GetBucketNotificationConfigurationCommand(); + init_GetBucketOwnershipControlsCommand(); + init_GetBucketPolicyCommand(); + init_GetBucketPolicyStatusCommand(); + init_GetBucketReplicationCommand(); + init_GetBucketRequestPaymentCommand(); + init_GetBucketTaggingCommand(); + init_GetBucketVersioningCommand(); + init_GetBucketWebsiteCommand(); + init_GetObjectAclCommand(); + init_GetObjectAttributesCommand(); + init_GetObjectCommand(); + init_GetObjectLegalHoldCommand(); + init_GetObjectLockConfigurationCommand(); + init_GetObjectRetentionCommand(); + init_GetObjectTaggingCommand(); + init_GetObjectTorrentCommand(); + init_GetPublicAccessBlockCommand(); + init_HeadBucketCommand(); + init_HeadObjectCommand(); + init_ListBucketAnalyticsConfigurationsCommand(); + init_ListBucketIntelligentTieringConfigurationsCommand(); + init_ListBucketInventoryConfigurationsCommand(); + init_ListBucketMetricsConfigurationsCommand(); + init_ListBucketsCommand(); + init_ListDirectoryBucketsCommand(); + init_ListMultipartUploadsCommand(); + init_ListObjectVersionsCommand(); + init_ListObjectsCommand(); + init_ListObjectsV2Command(); + init_ListPartsCommand(); + init_PutBucketAbacCommand(); + init_PutBucketAccelerateConfigurationCommand(); + init_PutBucketAclCommand(); + init_PutBucketAnalyticsConfigurationCommand(); + init_PutBucketCorsCommand(); + init_PutBucketEncryptionCommand(); + init_PutBucketIntelligentTieringConfigurationCommand(); + init_PutBucketInventoryConfigurationCommand(); + init_PutBucketLifecycleConfigurationCommand(); + init_PutBucketLoggingCommand(); + init_PutBucketMetricsConfigurationCommand(); + init_PutBucketNotificationConfigurationCommand(); + init_PutBucketOwnershipControlsCommand(); + init_PutBucketPolicyCommand(); + init_PutBucketReplicationCommand(); + init_PutBucketRequestPaymentCommand(); + init_PutBucketTaggingCommand(); + init_PutBucketVersioningCommand(); + init_PutBucketWebsiteCommand(); + init_PutObjectAclCommand(); + init_PutObjectCommand(); + init_PutObjectLegalHoldCommand(); + init_PutObjectLockConfigurationCommand(); + init_PutObjectRetentionCommand(); + init_PutObjectTaggingCommand(); + init_PutPublicAccessBlockCommand(); + init_RenameObjectCommand(); + init_RestoreObjectCommand(); + init_SelectObjectContentCommand(); + init_UpdateBucketMetadataInventoryTableConfigurationCommand(); + init_UpdateBucketMetadataJournalTableConfigurationCommand(); + init_UpdateObjectEncryptionCommand(); + init_UploadPartCommand(); + init_UploadPartCopyCommand(); + init_WriteGetObjectResponseCommand(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/Interfaces.js +var init_Interfaces = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/Interfaces.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/index.js +var init_pagination2 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Interfaces(); + init_ListBucketsPaginator(); + init_ListDirectoryBucketsPaginator(); + init_ListObjectsV2Paginator(); + init_ListPartsPaginator(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/waiters/index.js +var init_waiters = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/waiters/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_waitForBucketExists(); + init_waitForBucketNotExists(); + init_waitForObjectExists(); + init_waitForObjectNotExists(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/enums.js +var init_enums = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/models/enums.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/models_0.js +var init_models_0 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/models/models_0.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/models_1.js +var init_models_1 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/models/models_1.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/index.js +var init_dist_es59 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_S3Client(); + init_S3(); + init_commands(); + init_schemas_0(); + init_pagination2(); + init_waiters(); + init_enums(); + init_errors3(); + init_models_0(); + init_models_1(); + } +}); + +// ../../node_modules/@aws-sdk/util-format-url/dist-es/index.js +function formatUrl(request) { + const { port, query } = request; + let { protocol, path, hostname: hostname3 } = request; + if (protocol && protocol.slice(-1) !== ":") { + protocol += ":"; + } + if (port) { + hostname3 += `:${port}`; + } + if (path && path.charAt(0) !== "/") { + path = `/${path}`; + } + let queryString = query ? buildQueryString(query) : ""; + if (queryString && queryString[0] !== "?") { + queryString = `?${queryString}`; + } + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + let fragment = ""; + if (request.fragment) { + fragment = `#${request.fragment}`; + } + return `${protocol}//${auth}${hostname3}${path}${queryString}${fragment}`; +} +var init_dist_es60 = __esm({ + "../../node_modules/@aws-sdk/util-format-url/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es8(); + __name(formatUrl, "formatUrl"); + } +}); + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/constants.js +var UNSIGNED_PAYLOAD2, SHA256_HEADER2; +var init_constants15 = __esm({ + "../../node_modules/@aws-sdk/s3-request-presigner/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + UNSIGNED_PAYLOAD2 = "UNSIGNED-PAYLOAD"; + SHA256_HEADER2 = "X-Amz-Content-Sha256"; + } +}); + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/presigner.js +var S3RequestPresigner; +var init_presigner = __esm({ + "../../node_modules/@aws-sdk/s3-request-presigner/dist-es/presigner.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es43(); + init_constants15(); + S3RequestPresigner = class { + signer; + constructor(options) { + const resolvedOptions = { + service: options.signingName || options.service || "s3", + uriEscapePath: options.uriEscapePath || false, + applyChecksum: options.applyChecksum || false, + ...options + }; + this.signer = new SignatureV4MultiRegion(resolvedOptions); + } + presign(requestToSign, { unsignableHeaders = /* @__PURE__ */ new Set(), hoistableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), ...options } = {}) { + this.prepareRequest(requestToSign, { + unsignableHeaders, + unhoistableHeaders, + hoistableHeaders + }); + return this.signer.presign(requestToSign, { + expiresIn: 900, + unsignableHeaders, + unhoistableHeaders, + ...options + }); + } + presignWithCredentials(requestToSign, credentials, { unsignableHeaders = /* @__PURE__ */ new Set(), hoistableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), ...options } = {}) { + this.prepareRequest(requestToSign, { + unsignableHeaders, + unhoistableHeaders, + hoistableHeaders + }); + return this.signer.presignWithCredentials(requestToSign, credentials, { + expiresIn: 900, + unsignableHeaders, + unhoistableHeaders, + ...options + }); + } + prepareRequest(requestToSign, { unsignableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), hoistableHeaders = /* @__PURE__ */ new Set() } = {}) { + unsignableHeaders.add("content-type"); + Object.keys(requestToSign.headers).map((header) => header.toLowerCase()).filter((header) => header.startsWith("x-amz-server-side-encryption")).forEach((header) => { + if (!hoistableHeaders.has(header)) { + unhoistableHeaders.add(header); + } + }); + requestToSign.headers[SHA256_HEADER2] = UNSIGNED_PAYLOAD2; + const currentHostHeader = requestToSign.headers.host; + const port = requestToSign.port; + const expectedHostHeader = `${requestToSign.hostname}${requestToSign.port != null ? ":" + port : ""}`; + if (!currentHostHeader || currentHostHeader === requestToSign.hostname && requestToSign.port != null) { + requestToSign.headers.host = expectedHostHeader; + } + } + }; + __name(S3RequestPresigner, "S3RequestPresigner"); + } +}); + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/getSignedUrl.js +var getSignedUrl; +var init_getSignedUrl = __esm({ + "../../node_modules/@aws-sdk/s3-request-presigner/dist-es/getSignedUrl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es60(); + init_dist_es41(); + init_dist_es2(); + init_presigner(); + getSignedUrl = /* @__PURE__ */ __name(async (client, command, options = {}) => { + let s3Presigner; + let region; + if (typeof client.config.endpointProvider === "function") { + const endpointV2 = await getEndpointFromInstructions(command.input, command.constructor, client.config); + const authScheme = endpointV2.properties?.authSchemes?.[0]; + if (authScheme?.name === "sigv4a") { + region = authScheme?.signingRegionSet?.join(","); + } else { + region = authScheme?.signingRegion; + } + s3Presigner = new S3RequestPresigner({ + ...client.config, + signingName: authScheme?.signingName, + region: async () => region + }); + } else { + s3Presigner = new S3RequestPresigner(client.config); + } + const presignInterceptMiddleware = /* @__PURE__ */ __name((next, context2) => async (args) => { + const { request } = args; + if (!HttpRequest.isInstance(request)) { + throw new Error("Request to be presigned is not an valid HTTP request."); + } + delete request.headers["amz-sdk-invocation-id"]; + delete request.headers["amz-sdk-request"]; + delete request.headers["x-amz-user-agent"]; + let presigned2; + const presignerOptions = { + ...options, + signingRegion: options.signingRegion ?? context2["signing_region"] ?? region, + signingService: options.signingService ?? context2["signing_service"] + }; + if (context2.s3ExpressIdentity) { + presigned2 = await s3Presigner.presignWithCredentials(request, context2.s3ExpressIdentity, presignerOptions); + } else { + presigned2 = await s3Presigner.presign(request, presignerOptions); + } + return { + response: {}, + output: { + $metadata: { httpStatusCode: 200 }, + presigned: presigned2 + } + }; + }, "presignInterceptMiddleware"); + const middlewareName = "presignInterceptMiddleware"; + const clientStack = client.middlewareStack.clone(); + clientStack.addRelativeTo(presignInterceptMiddleware, { + name: middlewareName, + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true + }); + const handler = command.resolveMiddleware(clientStack, client.config, {}); + const { output } = await handler({ input: command.input }); + const { presigned } = output; + return formatUrl(presigned); + }, "getSignedUrl"); + } +}); + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/index.js +var init_dist_es61 = __esm({ + "../../node_modules/@aws-sdk/s3-request-presigner/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getSignedUrl(); + init_presigner(); + } +}); + +// src/lib/s3-client.ts +async function deleteImageUtil({ bucket = s3BucketName, keys }) { + if (keys.length === 0) { + return true; + } + try { + const deleteParams = { + Bucket: bucket, + Delete: { + Objects: keys.map((key) => ({ Key: key })), + Quiet: false + } + }; + const deleteCommand = new DeleteObjectsCommand(deleteParams); + await s3Client.send(deleteCommand); + return true; + } catch (error50) { + console.error("Error deleting image:", error50); + throw new Error("Failed to delete image"); + return false; + } +} +function scaffoldAssetUrl(input) { + if (Array.isArray(input)) { + return input.map((key) => scaffoldAssetUrl(key)); + } + if (!input) { + return ""; + } + const normalizedKey = input.replace(/^\/+/, ""); + const domain3 = assetsDomain.endsWith("/") ? assetsDomain.slice(0, -1) : assetsDomain; + return `${domain3}/${normalizedKey}`; +} +async function generateSignedUrlFromS3Url(s3UrlRaw, expiresIn = 259200) { + if (!s3UrlRaw) { + return ""; + } + const s3Url2 = s3UrlRaw; + try { + const command = new GetObjectCommand({ + Bucket: s3BucketName, + Key: s3Url2 + }); + const signedUrl = await getSignedUrl(s3Client, command, { expiresIn }); + return signedUrl; + } catch (error50) { + console.error("Error generating signed URL:", error50); + throw new Error("Failed to generate signed URL"); + } +} +async function generateSignedUrlsFromS3Urls(s3Urls, expiresIn = 259200) { + if (!s3Urls || !s3Urls.length) { + return []; + } + try { + const signedUrls = await Promise.all( + s3Urls.map((url2) => generateSignedUrlFromS3Url(url2, expiresIn).catch(() => "")) + ); + return signedUrls; + } catch (error50) { + console.error("Error generating multiple signed URLs:", error50); + return s3Urls.map(() => ""); + } +} +async function generateUploadUrl(key, mimeType, expiresIn = 180) { + try { + await createUploadUrlStatus(key); + const command = new PutObjectCommand({ + Bucket: s3BucketName, + Key: key, + ContentType: mimeType + }); + const signedUrl = await getSignedUrl(s3Client, command, { expiresIn }); + return signedUrl; + } catch (error50) { + console.error("Error generating upload URL:", error50); + throw new Error("Failed to generate upload URL"); + } +} +function extractKeyFromPresignedUrl(url2) { + const u5 = new URL(url2); + const rawKey = u5.pathname.replace(/^\/+/, ""); + const decodedKey = decodeURIComponent(rawKey); + const parts = decodedKey.split("/"); + parts.shift(); + return parts.join("/"); +} +async function claimUploadUrl(url2) { + try { + const semiKey = extractKeyFromPresignedUrl(url2); + const updated = await claimUploadUrlStatus(semiKey); + if (!updated) { + throw new Error("Upload URL not found or already claimed"); + } + } catch (error50) { + console.error("Error claiming upload URL:", error50); + throw new Error("Failed to claim upload URL"); + } +} +var s3Client, imageUploadS3; +var init_s3_client = __esm({ + "src/lib/s3-client.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es59(); + init_dist_es61(); + init_dbService(); + init_env_exporter(); + s3Client = new S3Client({ + region: s3Region, + endpoint: s3Url, + forcePathStyle: true, + credentials: { + accessKeyId: s3AccessKeyId, + secretAccessKey: s3SecretAccessKey + } + }); + imageUploadS3 = /* @__PURE__ */ __name(async (body, type, key) => { + const command = new PutObjectCommand({ + Bucket: s3BucketName, + Key: key, + Body: body, + ContentType: type + }); + const resp = await s3Client.send(command); + const imageUrl = `${key}`; + return imageUrl; + }, "imageUploadS3"); + __name(deleteImageUtil, "deleteImageUtil"); + __name(scaffoldAssetUrl, "scaffoldAssetUrl"); + __name(generateSignedUrlFromS3Url, "generateSignedUrlFromS3Url"); + __name(generateSignedUrlsFromS3Urls, "generateSignedUrlsFromS3Urls"); + __name(generateUploadUrl, "generateUploadUrl"); + __name(extractKeyFromPresignedUrl, "extractKeyFromPresignedUrl"); + __name(claimUploadUrl, "claimUploadUrl"); + } +}); + +// ../../node_modules/@trpc/server/dist/initTRPC-RoZMIBeA.mjs +function createMiddlewareFactory() { + function createMiddlewareInner(middlewares) { + return { + _middlewares: middlewares, + unstable_pipe(middlewareBuilderOrFn) { + const pipedMiddleware = "_middlewares" in middlewareBuilderOrFn ? middlewareBuilderOrFn._middlewares : [middlewareBuilderOrFn]; + return createMiddlewareInner([...middlewares, ...pipedMiddleware]); + } + }; + } + __name(createMiddlewareInner, "createMiddlewareInner"); + function createMiddleware(fn) { + return createMiddlewareInner([fn]); + } + __name(createMiddleware, "createMiddleware"); + return createMiddleware; +} +function createInputMiddleware(parse3) { + const inputMiddleware = /* @__PURE__ */ __name(async function inputValidatorMiddleware(opts) { + let parsedInput; + const rawInput = await opts.getRawInput(); + try { + parsedInput = await parse3(rawInput); + } catch (cause) { + throw new TRPCError({ + code: "BAD_REQUEST", + cause + }); + } + const combinedInput = isObject(opts.input) && isObject(parsedInput) ? (0, import_objectSpread2$2.default)((0, import_objectSpread2$2.default)({}, opts.input), parsedInput) : parsedInput; + return opts.next({ input: combinedInput }); + }, "inputValidatorMiddleware"); + inputMiddleware._type = "input"; + return inputMiddleware; +} +function createOutputMiddleware(parse3) { + const outputMiddleware = /* @__PURE__ */ __name(async function outputValidatorMiddleware({ next }) { + const result = await next(); + if (!result.ok) + return result; + try { + const data = await parse3(result.data); + return (0, import_objectSpread2$2.default)((0, import_objectSpread2$2.default)({}, result), {}, { data }); + } catch (cause) { + throw new TRPCError({ + message: "Output validation failed", + code: "INTERNAL_SERVER_ERROR", + cause + }); + } + }, "outputValidatorMiddleware"); + outputMiddleware._type = "output"; + return outputMiddleware; +} +function getParseFn(procedureParser) { + const parser2 = procedureParser; + const isStandardSchema = "~standard" in parser2; + if (typeof parser2 === "function" && typeof parser2.assert === "function") + return parser2.assert.bind(parser2); + if (typeof parser2 === "function" && !isStandardSchema) + return parser2; + if (typeof parser2.parseAsync === "function") + return parser2.parseAsync.bind(parser2); + if (typeof parser2.parse === "function") + return parser2.parse.bind(parser2); + if (typeof parser2.validateSync === "function") + return parser2.validateSync.bind(parser2); + if (typeof parser2.create === "function") + return parser2.create.bind(parser2); + if (typeof parser2.assert === "function") + return (value) => { + parser2.assert(value); + return value; + }; + if (isStandardSchema) + return async (value) => { + const result = await parser2["~standard"].validate(value); + if (result.issues) + throw new StandardSchemaV1Error(result.issues); + return result.value; + }; + throw new Error("Could not find a validator fn"); +} +function createNewBuilder(def1, def2) { + const { middlewares = [], inputs, meta: meta3 } = def2, rest = (0, import_objectWithoutProperties.default)(def2, _excluded); + return createBuilder((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, mergeWithoutOverrides(def1, rest)), {}, { + inputs: [...def1.inputs, ...inputs !== null && inputs !== void 0 ? inputs : []], + middlewares: [...def1.middlewares, ...middlewares], + meta: def1.meta && meta3 ? (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, def1.meta), meta3) : meta3 !== null && meta3 !== void 0 ? meta3 : def1.meta + })); +} +function createBuilder(initDef = {}) { + const _def = (0, import_objectSpread2$13.default)({ + procedure: true, + inputs: [], + middlewares: [] + }, initDef); + const builder = { + _def, + input(input) { + const parser2 = getParseFn(input); + return createNewBuilder(_def, { + inputs: [input], + middlewares: [createInputMiddleware(parser2)] + }); + }, + output(output) { + const parser2 = getParseFn(output); + return createNewBuilder(_def, { + output, + middlewares: [createOutputMiddleware(parser2)] + }); + }, + meta(meta3) { + return createNewBuilder(_def, { meta: meta3 }); + }, + use(middlewareBuilderOrFn) { + const middlewares = "_middlewares" in middlewareBuilderOrFn ? middlewareBuilderOrFn._middlewares : [middlewareBuilderOrFn]; + return createNewBuilder(_def, { middlewares }); + }, + unstable_concat(builder$1) { + return createNewBuilder(_def, builder$1._def); + }, + concat(builder$1) { + return createNewBuilder(_def, builder$1._def); + }, + query(resolver) { + return createResolver((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, _def), {}, { type: "query" }), resolver); + }, + mutation(resolver) { + return createResolver((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, _def), {}, { type: "mutation" }), resolver); + }, + subscription(resolver) { + return createResolver((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, _def), {}, { type: "subscription" }), resolver); + }, + experimental_caller(caller) { + return createNewBuilder(_def, { caller }); + } + }; + return builder; +} +function createResolver(_defIn, resolver) { + const finalBuilder = createNewBuilder(_defIn, { + resolver, + middlewares: [/* @__PURE__ */ __name(async function resolveMiddleware(opts) { + const data = await resolver(opts); + return { + marker: middlewareMarker, + ok: true, + data, + ctx: opts.ctx + }; + }, "resolveMiddleware")] + }); + const _def = (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, finalBuilder._def), {}, { + type: _defIn.type, + experimental_caller: Boolean(finalBuilder._def.caller), + meta: finalBuilder._def.meta, + $types: null + }); + const invoke = createProcedureCaller(finalBuilder._def); + const callerOverride = finalBuilder._def.caller; + if (!callerOverride) + return invoke; + const callerWrapper = /* @__PURE__ */ __name(async (...args) => { + return await callerOverride({ + args, + invoke, + _def + }); + }, "callerWrapper"); + callerWrapper._def = _def; + return callerWrapper; +} +async function callRecursive(index, _def, opts) { + try { + const middleware2 = _def.middlewares[index]; + const result = await middleware2((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, opts), {}, { + meta: _def.meta, + input: opts.input, + next(_nextOpts) { + var _nextOpts$getRawInput; + const nextOpts = _nextOpts; + return callRecursive(index + 1, _def, (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, opts), {}, { + ctx: (nextOpts === null || nextOpts === void 0 ? void 0 : nextOpts.ctx) ? (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, opts.ctx), nextOpts.ctx) : opts.ctx, + input: nextOpts && "input" in nextOpts ? nextOpts.input : opts.input, + getRawInput: (_nextOpts$getRawInput = nextOpts === null || nextOpts === void 0 ? void 0 : nextOpts.getRawInput) !== null && _nextOpts$getRawInput !== void 0 ? _nextOpts$getRawInput : opts.getRawInput + })); + } + })); + return result; + } catch (cause) { + return { + ok: false, + error: getTRPCErrorFromUnknown(cause), + marker: middlewareMarker + }; + } +} +function createProcedureCaller(_def) { + async function procedure(opts) { + if (!opts || !("getRawInput" in opts)) + throw new Error(codeblock); + const result = await callRecursive(0, _def, opts); + if (!result) + throw new TRPCError({ + code: "INTERNAL_SERVER_ERROR", + message: "No result from middlewares - did you forget to `return next()`?" + }); + if (!result.ok) + throw result.error; + return result.data; + } + __name(procedure, "procedure"); + procedure._def = _def; + procedure.procedure = true; + procedure.meta = _def.meta; + return procedure; +} +var import_objectSpread2$2, middlewareMarker, import_defineProperty3, StandardSchemaV1Error, require_objectWithoutPropertiesLoose, require_objectWithoutProperties, import_objectWithoutProperties, import_objectSpread2$13, _excluded, codeblock, _globalThis$process, _globalThis$process2, _globalThis$process3, isServerDefault, import_objectSpread25, TRPCBuilder, initTRPC; +var init_initTRPC_RoZMIBeA = __esm({ + "../../node_modules/@trpc/server/dist/initTRPC-RoZMIBeA.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getErrorShape_vC8mUXJD(); + init_codes_DagpWZLc(); + init_tracked_Bjtgv3wJ(); + import_objectSpread2$2 = __toESM2(require_objectSpread2(), 1); + middlewareMarker = "middlewareMarker"; + __name(createMiddlewareFactory, "createMiddlewareFactory"); + __name(createInputMiddleware, "createInputMiddleware"); + __name(createOutputMiddleware, "createOutputMiddleware"); + import_defineProperty3 = __toESM2(require_defineProperty(), 1); + StandardSchemaV1Error = /* @__PURE__ */ __name(class extends Error { + /** + * Creates a schema error with useful information. + * + * @param issues The schema issues. + */ + constructor(issues) { + var _issues$; + super((_issues$ = issues[0]) === null || _issues$ === void 0 ? void 0 : _issues$.message); + (0, import_defineProperty3.default)(this, "issues", void 0); + this.name = "SchemaError"; + this.issues = issues; + } + }, "StandardSchemaV1Error"); + __name(getParseFn, "getParseFn"); + require_objectWithoutPropertiesLoose = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(exports, module) { + function _objectWithoutPropertiesLoose(r2, e2) { + if (null == r2) + return {}; + var t9 = {}; + for (var n2 in r2) + if ({}.hasOwnProperty.call(r2, n2)) { + if (e2.includes(n2)) + continue; + t9[n2] = r2[n2]; + } + return t9; + } + __name(_objectWithoutPropertiesLoose, "_objectWithoutPropertiesLoose"); + module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_objectWithoutProperties = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(exports, module) { + var objectWithoutPropertiesLoose = require_objectWithoutPropertiesLoose(); + function _objectWithoutProperties$1(e2, t9) { + if (null == e2) + return {}; + var o2, r2, i2 = objectWithoutPropertiesLoose(e2, t9); + if (Object.getOwnPropertySymbols) { + var s2 = Object.getOwnPropertySymbols(e2); + for (r2 = 0; r2 < s2.length; r2++) + o2 = s2[r2], t9.includes(o2) || {}.propertyIsEnumerable.call(e2, o2) && (i2[o2] = e2[o2]); + } + return i2; + } + __name(_objectWithoutProperties$1, "_objectWithoutProperties$1"); + module.exports = _objectWithoutProperties$1, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + import_objectWithoutProperties = __toESM2(require_objectWithoutProperties(), 1); + import_objectSpread2$13 = __toESM2(require_objectSpread2(), 1); + _excluded = [ + "middlewares", + "inputs", + "meta" + ]; + __name(createNewBuilder, "createNewBuilder"); + __name(createBuilder, "createBuilder"); + __name(createResolver, "createResolver"); + codeblock = ` +This is a client-only function. +If you want to call this function on the server, see https://trpc.io/docs/v11/server/server-side-calls +`.trim(); + __name(callRecursive, "callRecursive"); + __name(createProcedureCaller, "createProcedureCaller"); + isServerDefault = typeof window === "undefined" || "Deno" in window || ((_globalThis$process = globalThis.process) === null || _globalThis$process === void 0 || (_globalThis$process = _globalThis$process.env) === null || _globalThis$process === void 0 ? void 0 : _globalThis$process["NODE_ENV"]) === "test" || !!((_globalThis$process2 = globalThis.process) === null || _globalThis$process2 === void 0 || (_globalThis$process2 = _globalThis$process2.env) === null || _globalThis$process2 === void 0 ? void 0 : _globalThis$process2["JEST_WORKER_ID"]) || !!((_globalThis$process3 = globalThis.process) === null || _globalThis$process3 === void 0 || (_globalThis$process3 = _globalThis$process3.env) === null || _globalThis$process3 === void 0 ? void 0 : _globalThis$process3["VITEST_WORKER_ID"]); + import_objectSpread25 = __toESM2(require_objectSpread2(), 1); + TRPCBuilder = /* @__PURE__ */ __name(class TRPCBuilder2 { + /** + * Add a context shape as a generic to the root object + * @see https://trpc.io/docs/v11/server/context + */ + context() { + return new TRPCBuilder2(); + } + /** + * Add a meta shape as a generic to the root object + * @see https://trpc.io/docs/v11/quickstart + */ + meta() { + return new TRPCBuilder2(); + } + /** + * Create the root object + * @see https://trpc.io/docs/v11/server/routers#initialize-trpc + */ + create(opts) { + var _opts$transformer, _opts$isDev, _globalThis$process$1, _opts$allowOutsideOfS, _opts$errorFormatter, _opts$isServer; + const config3 = (0, import_objectSpread25.default)((0, import_objectSpread25.default)({}, opts), {}, { + transformer: getDataTransformer((_opts$transformer = opts === null || opts === void 0 ? void 0 : opts.transformer) !== null && _opts$transformer !== void 0 ? _opts$transformer : defaultTransformer), + isDev: (_opts$isDev = opts === null || opts === void 0 ? void 0 : opts.isDev) !== null && _opts$isDev !== void 0 ? _opts$isDev : ((_globalThis$process$1 = globalThis.process) === null || _globalThis$process$1 === void 0 ? void 0 : _globalThis$process$1.env["NODE_ENV"]) !== "production", + allowOutsideOfServer: (_opts$allowOutsideOfS = opts === null || opts === void 0 ? void 0 : opts.allowOutsideOfServer) !== null && _opts$allowOutsideOfS !== void 0 ? _opts$allowOutsideOfS : false, + errorFormatter: (_opts$errorFormatter = opts === null || opts === void 0 ? void 0 : opts.errorFormatter) !== null && _opts$errorFormatter !== void 0 ? _opts$errorFormatter : defaultFormatter, + isServer: (_opts$isServer = opts === null || opts === void 0 ? void 0 : opts.isServer) !== null && _opts$isServer !== void 0 ? _opts$isServer : isServerDefault, + $types: null + }); + { + var _opts$isServer2; + const isServer = (_opts$isServer2 = opts === null || opts === void 0 ? void 0 : opts.isServer) !== null && _opts$isServer2 !== void 0 ? _opts$isServer2 : isServerDefault; + if (!isServer && (opts === null || opts === void 0 ? void 0 : opts.allowOutsideOfServer) !== true) + throw new Error(`You're trying to use @trpc/server in a non-server environment. This is not supported by default.`); + } + return { + _config: config3, + procedure: createBuilder({ meta: opts === null || opts === void 0 ? void 0 : opts.defaultMeta }), + middleware: createMiddlewareFactory(), + router: createRouterFactory(config3), + mergeRouters, + createCallerFactory: createCallerFactory() + }; + } + }, "TRPCBuilder"); + initTRPC = new TRPCBuilder(); + } +}); + +// ../../node_modules/@trpc/server/dist/index.mjs +var init_dist3 = __esm({ + "../../node_modules/@trpc/server/dist/index.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tracked_Bjtgv3wJ(); + init_initTRPC_RoZMIBeA(); + } +}); + +// src/trpc/trpc-index.ts +var t8, middleware, router2, errorLoggerMiddleware, publicProcedure, protectedProcedure, createCallerFactory2, createTRPCRouter; +var init_trpc_index = __esm({ + "src/trpc/trpc-index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist3(); + t8 = initTRPC.context().create(); + middleware = t8.middleware; + router2 = t8.router; + errorLoggerMiddleware = middleware(async ({ path, type, next, ctx }) => { + const start = Date.now(); + try { + const result = await next(); + const duration3 = Date.now() - start; + if (false) { + console.log(`\u2705 ${type} ${path} - ${duration3}ms`); + } + return result; + } catch (error50) { + const duration3 = Date.now() - start; + const err = error50; + console.error("\u{1F6A8} tRPC Error:", { + timestamp: (/* @__PURE__ */ new Date()).toISOString(), + path, + type, + duration: `${duration3}ms`, + userId: ctx?.user?.userId || ctx?.staffUser?.id || "anonymous", + error: { + name: err.name, + message: err.message, + code: err.code, + stack: err.stack + }, + // Add SQL-specific details if available + ...err.code && { sqlCode: err.code }, + ...err.meta && { sqlMeta: err.meta }, + ...err.sql && { sql: err.sql } + }); + throw error50; + } + }); + publicProcedure = t8.procedure.use(errorLoggerMiddleware); + protectedProcedure = t8.procedure.use(errorLoggerMiddleware).use( + middleware(async ({ ctx, next }) => { + if (!ctx.user && !ctx.staffUser) { + throw new TRPCError({ code: "UNAUTHORIZED" }); + } + return next(); + }) + ); + createCallerFactory2 = t8.createCallerFactory; + createTRPCRouter = t8.router; + } +}); + +// src/stores/product-store.ts +async function initializeProducts() { + try { + console.log("Initializing product store in Redis..."); + const productsData = await getAllProductsForCache(); + const allStores = await getAllStoresForCache(); + const storeMap = new Map(allStores.map((s2) => [s2.id, s2])); + const allDeliverySlots = await getAllDeliverySlotsForCache(); + const deliverySlotsMap = /* @__PURE__ */ new Map(); + for (const slot of allDeliverySlots) { + if (!deliverySlotsMap.has(slot.productId)) + deliverySlotsMap.set(slot.productId, []); + deliverySlotsMap.get(slot.productId).push(slot); + } + const allSpecialDeals = await getAllSpecialDealsForCache(); + const specialDealsMap = /* @__PURE__ */ new Map(); + for (const deal of allSpecialDeals) { + if (!specialDealsMap.has(deal.productId)) + specialDealsMap.set(deal.productId, []); + specialDealsMap.get(deal.productId).push(deal); + } + const allProductTags = await getAllProductTagsForCache(); + const productTagsMap = /* @__PURE__ */ new Map(); + for (const tag2 of allProductTags) { + if (!productTagsMap.has(tag2.productId)) + productTagsMap.set(tag2.productId, []); + productTagsMap.get(tag2.productId).push(tag2.tagName); + } + console.log("Product store initialized successfully"); + } catch (error50) { + console.error("Error initializing product store:", error50); + } +} +async function getProductById5(id) { + try { + const product = await getProductById(id); + if (!product) + return null; + const signedImages = scaffoldAssetUrl( + product.images || [] + ); + const allStores = await getAllStoresForCache(); + const store = product.storeId ? allStores.find((s2) => s2.id === product.storeId) || null : null; + const allDeliverySlots = await getAllDeliverySlotsForCache(); + const productSlots2 = allDeliverySlots.filter((s2) => s2.productId === id); + const allSpecialDeals = await getAllSpecialDealsForCache(); + const productDeals = allSpecialDeals.filter((d2) => d2.productId === id); + const allProductTags = await getAllProductTagsForCache(); + const productTagNames = allProductTags.filter((t9) => t9.productId === id).map((t9) => t9.tagName); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + longDescription: product.longDescription, + price: product.price.toString(), + marketPrice: product.marketPrice?.toString() || null, + unitNotation: product.unit.shortNotation, + images: signedImages, + isOutOfStock: product.isOutOfStock, + store: store ? { id: store.id, name: store.name, description: store.description } : null, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + isFlashAvailable: product.isFlashAvailable, + flashPrice: product.flashPrice?.toString() || null, + deliverySlots: productSlots2.map((s2) => ({ + id: s2.id, + deliveryTime: s2.deliveryTime, + freezeTime: s2.freezeTime, + isCapacityFull: s2.isCapacityFull + })), + specialDeals: productDeals.map((d2) => ({ + quantity: d2.quantity.toString(), + price: d2.price.toString(), + validTill: d2.validTill + })), + productTags: productTagNames + }; + } catch (error50) { + console.error(`Error getting product ${id}:`, error50); + return null; + } +} +async function getAllProducts2() { + try { + const productsData = await getAllProductsForCache(); + const allStores = await getAllStoresForCache(); + const storeMap = new Map(allStores.map((s2) => [s2.id, s2])); + const allDeliverySlots = await getAllDeliverySlotsForCache(); + const deliverySlotsMap = /* @__PURE__ */ new Map(); + for (const slot of allDeliverySlots) { + if (!deliverySlotsMap.has(slot.productId)) + deliverySlotsMap.set(slot.productId, []); + deliverySlotsMap.get(slot.productId).push(slot); + } + const allSpecialDeals = await getAllSpecialDealsForCache(); + const specialDealsMap = /* @__PURE__ */ new Map(); + for (const deal of allSpecialDeals) { + if (!specialDealsMap.has(deal.productId)) + specialDealsMap.set(deal.productId, []); + specialDealsMap.get(deal.productId).push(deal); + } + const allProductTags = await getAllProductTagsForCache(); + const productTagsMap = /* @__PURE__ */ new Map(); + for (const tag2 of allProductTags) { + if (!productTagsMap.has(tag2.productId)) + productTagsMap.set(tag2.productId, []); + productTagsMap.get(tag2.productId).push(tag2.tagName); + } + const products = []; + for (const product of productsData) { + const signedImages = scaffoldAssetUrl( + product.images || [] + ); + const store = product.storeId ? storeMap.get(product.storeId) || null : null; + const deliverySlots = deliverySlotsMap.get(product.id) || []; + const specialDeals2 = specialDealsMap.get(product.id) || []; + const productTags2 = productTagsMap.get(product.id) || []; + products.push({ + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + longDescription: product.longDescription, + price: product.price.toString(), + marketPrice: product.marketPrice?.toString() || null, + unitNotation: product.unitShortNotation, + images: signedImages, + isOutOfStock: product.isOutOfStock, + store: store ? { id: store.id, name: store.name, description: store.description } : null, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + isFlashAvailable: product.isFlashAvailable, + flashPrice: product.flashPrice?.toString() || null, + deliverySlots: deliverySlots.map((s2) => ({ + id: s2.id, + deliveryTime: s2.deliveryTime, + freezeTime: s2.freezeTime, + isCapacityFull: s2.isCapacityFull + })), + specialDeals: specialDeals2.map((d2) => ({ + quantity: d2.quantity.toString(), + price: d2.price.toString(), + validTill: d2.validTill + })), + productTags: productTags2 + }); + } + return products; + } catch (error50) { + console.error("Error getting all products:", error50); + return []; + } +} +var init_product_store = __esm({ + "src/stores/product-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_s3_client(); + __name(initializeProducts, "initializeProducts"); + __name(getProductById5, "getProductById"); + __name(getAllProducts2, "getAllProducts"); + } +}); + +// src/stores/product-tag-store.ts +async function transformTagToStoreTag(tag2) { + const signedImageUrl = tag2.imageUrl ? await generateSignedUrlFromS3Url(tag2.imageUrl) : null; + return { + id: tag2.id, + tagName: tag2.tagName, + tagDescription: tag2.tagDescription, + imageUrl: signedImageUrl, + isDashboardTag: tag2.isDashboardTag, + relatedStores: tag2.relatedStores || [], + productIds: tag2.products ? tag2.products.map((p2) => p2.productId) : [] + }; +} +async function initializeProductTagStore() { + try { + console.log("Initializing product tag store in Redis..."); + const tagsData = await getAllTagsForCache(); + const productTagsData = await getAllTagProductMappings(); + const productIdsByTag = /* @__PURE__ */ new Map(); + for (const pt of productTagsData) { + if (!productIdsByTag.has(pt.tagId)) { + productIdsByTag.set(pt.tagId, []); + } + productIdsByTag.get(pt.tagId).push(pt.productId); + } + console.log("Product tag store initialized successfully"); + } catch (error50) { + console.error("Error initializing product tag store:", error50); + } +} +async function getDashboardTags() { + try { + const tags = await getAllProductTags(); + const result = []; + for (const tag2 of tags) { + if (tag2.isDashboardTag) { + result.push(await transformTagToStoreTag(tag2)); + } + } + return result; + } catch (error50) { + console.error("Error getting dashboard tags:", error50); + return []; + } +} +async function getTagsByStoreId(storeId) { + try { + const tags = await getAllProductTags(); + const result = []; + for (const tag2 of tags) { + const relatedStores = tag2.relatedStores || []; + if (relatedStores.includes(storeId)) { + result.push(await transformTagToStoreTag(tag2)); + } + } + return result; + } catch (error50) { + console.error(`Error getting tags for store ${storeId}:`, error50); + return []; + } +} +var init_product_tag_store = __esm({ + "src/stores/product-tag-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_s3_client(); + __name(transformTagToStoreTag, "transformTagToStoreTag"); + __name(initializeProductTagStore, "initializeProductTagStore"); + __name(getDashboardTags, "getDashboardTags"); + __name(getTagsByStoreId, "getTagsByStoreId"); + } +}); + +// src/trpc/apis/common-apis/common.ts +async function scaffoldProducts() { + let products = await getAllProducts2(); + products = products.filter((item) => Boolean(item.id)); + const suspendedProductIds = new Set(await getSuspendedProductIds()); + products = products.filter((product) => !suspendedProductIds.has(product.id)); + const formattedProducts = await Promise.all( + products.map(async (product) => { + const nextDeliveryDate = await getNextDeliveryDateWithCapacity(product.id); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + price: parseFloat(product.price), + marketPrice: product.marketPrice ? parseFloat(product.marketPrice) : null, + unit: product.unitNotation, + unitNotation: product.unitNotation, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + storeId: product.store?.id || null, + isOutOfStock: product.isOutOfStock, + isFlashAvailable: product.isFlashAvailable, + nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null, + images: product.images, + flashPrice: product.flashPrice + }; + }) + ); + return { + products: formattedProducts, + count: formattedProducts.length + }; +} +var getNextDeliveryDate, commonRouter; +var init_common3 = __esm({ + "src/trpc/apis/common-apis/common.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_dbService(); + init_product_store(); + init_product_tag_store(); + getNextDeliveryDate = getNextDeliveryDateWithCapacity; + __name(scaffoldProducts, "scaffoldProducts"); + commonRouter = router2({ + getDashboardTags: publicProcedure.query(async () => { + const tags = await getDashboardTags(); + return { + tags + }; + }), + getAllProductsSummary: publicProcedure.query(async () => { + const response = await scaffoldProducts(); + return response; + }) + /* + // Old implementation - moved to common-trpc-index.ts: + getStoresSummary: publicProcedure + .query(async () => { + const stores = await getStoresSummary(); + return { stores }; + }), + + healthCheck: publicProcedure + .query(async () => { + const result = await healthCheck(); + return result; + }), + */ + }); + } +}); + +// src/apis/common-apis/apis/common-product.controller.ts +var getAllProductsSummary; +var init_common_product_controller = __esm({ + "src/apis/common-apis/apis/common-product.controller.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_s3_client(); + init_common3(); + init_dbService(); + getAllProductsSummary = /* @__PURE__ */ __name(async (c2) => { + try { + const tagId = c2.req.query("tagId"); + const tagIdNum = tagId ? parseInt(tagId) : void 0; + if (tagIdNum) { + const products = await getAllProductsWithUnits(tagIdNum); + if (products.length === 0) { + return c2.json({ + products: [], + count: 0 + }, 200); + } + } + const productsWithUnits = await getAllProductsWithUnits(tagIdNum); + const formattedProducts = await Promise.all( + productsWithUnits.map(async (product) => { + const nextDeliveryDate = await getNextDeliveryDate(product.id); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + price: product.price, + marketPrice: product.marketPrice, + unit: product.unitShortNotation, + productQuantity: product.productQuantity, + isOutOfStock: product.isOutOfStock, + nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null, + images: scaffoldAssetUrl(product.images || []) + }; + }) + ); + return c2.json({ + products: formattedProducts, + count: formattedProducts.length + }, 200); + } catch (error50) { + console.error("Get products summary error:", error50); + return c2.json({ error: "Failed to fetch products summary" }, 500); + } + }, "getAllProductsSummary"); + } +}); + +// src/apis/common-apis/apis/common-product.router.ts +var router3, commonProductsRouter, common_product_router_default; +var init_common_product_router = __esm({ + "src/apis/common-apis/apis/common-product.router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_common_product_controller(); + router3 = new Hono2(); + router3.get("/summary", getAllProductsSummary); + commonProductsRouter = router3; + common_product_router_default = commonProductsRouter; + } +}); + +// src/apis/common-apis/apis/common.router.ts +var router4, commonRouter2, common_router_default; +var init_common_router = __esm({ + "src/apis/common-apis/apis/common.router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_common_product_router(); + router4 = new Hono2(); + router4.route("/products", common_product_router_default); + commonRouter2 = router4; + common_router_default = commonRouter2; + } +}); + +// src/v1-router.ts +var router5, v1Router, v1_router_default; +var init_v1_router = __esm({ + "src/v1-router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_av_router(); + init_common_router(); + router5 = new Hono2(); + router5.route("/av", av_router_default); + router5.route("/cm", common_router_default); + v1Router = router5; + v1_router_default = v1Router; + } +}); + +// src/test-controller.ts +var router6, test_controller_default; +var init_test_controller = __esm({ + "src/test-controller.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + router6 = new Hono2(); + router6.get("/", (c2) => { + return c2.json({ + status: "ok", + message: "Health check passed", + timestamp: (/* @__PURE__ */ new Date()).toISOString() + }); + }); + test_controller_default = router6; + } +}); + +// src/middleware/auth.middleware.ts +var authenticateUser; +var init_auth_middleware = __esm({ + "src/middleware/auth.middleware.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_webapi(); + init_dbService(); + init_api_error(); + init_env_exporter(); + authenticateUser = /* @__PURE__ */ __name(async (c2, next) => { + try { + const authHeader = c2.req.header("authorization"); + if (!authHeader?.startsWith("Bearer ")) { + throw new ApiError("Authorization token required", 401); + } + const token = authHeader.substring(7); + console.log(c2.req.header); + const { payload } = await jwtVerify(token, getEncodedJwtSecret()); + const decoded = payload; + if (decoded.staffId) { + const staff = await getStaffUserById(decoded.staffId); + if (!staff) { + throw new ApiError("Invalid staff token", 401); + } + c2.set("staffUser", { + id: staff.id, + name: staff.name + }); + } else { + c2.set("user", decoded); + const suspended = await isUserSuspended(decoded.userId); + if (suspended) { + throw new ApiError("Account suspended", 403); + } + } + await next(); + } catch (error50) { + throw error50; + } + }, "authenticateUser"); + } +}); + +// src/main-router.ts +var router7, mainRouter, main_router_default; +var init_main_router = __esm({ + "src/main-router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_v1_router(); + init_test_controller(); + init_auth_middleware(); + router7 = new Hono2(); + router7.get("/health", (c2) => { + return c2.json({ + status: "OK", + timestamp: (/* @__PURE__ */ new Date()).toISOString(), + uptime: process.uptime(), + message: "Hello world" + }); + }); + router7.get("/seed", (c2) => { + return c2.json({ + status: "OK", + timestamp: (/* @__PURE__ */ new Date()).toISOString(), + uptime: process.uptime() + }); + }); + router7.use("*", authenticateUser); + router7.route("/v1", v1_router_default); + router7.route("/test", test_controller_default); + mainRouter = router7; + main_router_default = mainRouter; + } +}); + +// ../../node_modules/zod/v4/core/core.js +function $constructor(name, initializer3, params) { + function init(inst, def) { + if (!inst._zod) { + Object.defineProperty(inst, "_zod", { + value: { + def, + constr: _, + traits: /* @__PURE__ */ new Set() + }, + enumerable: false + }); + } + if (inst._zod.traits.has(name)) { + return; + } + inst._zod.traits.add(name); + initializer3(inst, def); + const proto = _.prototype; + const keys = Object.keys(proto); + for (let i2 = 0; i2 < keys.length; i2++) { + const k2 = keys[i2]; + if (!(k2 in inst)) { + inst[k2] = proto[k2].bind(inst); + } + } + } + __name(init, "init"); + const Parent = params?.Parent ?? Object; + class Definition extends Parent { + } + __name(Definition, "Definition"); + Object.defineProperty(Definition, "name", { value: name }); + function _(def) { + var _a124; + const inst = params?.Parent ? new Definition() : this; + init(inst, def); + (_a124 = inst._zod).deferred ?? (_a124.deferred = []); + for (const fn of inst._zod.deferred) { + fn(); + } + return inst; + } + __name(_, "_"); + Object.defineProperty(_, "init", { value: init }); + Object.defineProperty(_, Symbol.hasInstance, { + value: (inst) => { + if (params?.Parent && inst instanceof params.Parent) + return true; + return inst?._zod?.traits?.has(name); + } + }); + Object.defineProperty(_, "name", { value: name }); + return _; +} +function config2(newConfig) { + if (newConfig) + Object.assign(globalConfig, newConfig); + return globalConfig; +} +var NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig; +var init_core2 = __esm({ + "../../node_modules/zod/v4/core/core.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + NEVER = Object.freeze({ + status: "aborted" + }); + __name($constructor, "$constructor"); + $brand = Symbol("zod_brand"); + $ZodAsyncError = class extends Error { + constructor() { + super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); + } + }; + __name($ZodAsyncError, "$ZodAsyncError"); + $ZodEncodeError = class extends Error { + constructor(name) { + super(`Encountered unidirectional transform during encode: ${name}`); + this.name = "ZodEncodeError"; + } + }; + __name($ZodEncodeError, "$ZodEncodeError"); + globalConfig = {}; + __name(config2, "config"); + } +}); + +// ../../node_modules/zod/v4/core/util.js +var util_exports = {}; +__export(util_exports, { + BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES, + Class: () => Class, + NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES, + aborted: () => aborted, + allowsEval: () => allowsEval, + assert: () => assert3, + assertEqual: () => assertEqual, + assertIs: () => assertIs, + assertNever: () => assertNever, + assertNotEqual: () => assertNotEqual, + assignProp: () => assignProp, + base64ToUint8Array: () => base64ToUint8Array, + base64urlToUint8Array: () => base64urlToUint8Array, + cached: () => cached, + captureStackTrace: () => captureStackTrace, + cleanEnum: () => cleanEnum, + cleanRegex: () => cleanRegex, + clone: () => clone, + cloneDef: () => cloneDef, + createTransparentProxy: () => createTransparentProxy, + defineLazy: () => defineLazy, + esc: () => esc, + escapeRegex: () => escapeRegex, + extend: () => extend, + finalizeIssue: () => finalizeIssue, + floatSafeRemainder: () => floatSafeRemainder, + getElementAtPath: () => getElementAtPath, + getEnumValues: () => getEnumValues, + getLengthableOrigin: () => getLengthableOrigin, + getParsedType: () => getParsedType, + getSizableOrigin: () => getSizableOrigin, + hexToUint8Array: () => hexToUint8Array, + isObject: () => isObject3, + isPlainObject: () => isPlainObject2, + issue: () => issue, + joinValues: () => joinValues, + jsonStringifyReplacer: () => jsonStringifyReplacer, + merge: () => merge2, + mergeDefs: () => mergeDefs, + normalizeParams: () => normalizeParams, + nullish: () => nullish, + numKeys: () => numKeys, + objectClone: () => objectClone, + omit: () => omit, + optionalKeys: () => optionalKeys, + parsedType: () => parsedType, + partial: () => partial, + pick: () => pick, + prefixIssues: () => prefixIssues, + primitiveTypes: () => primitiveTypes, + promiseAllObject: () => promiseAllObject, + propertyKeyTypes: () => propertyKeyTypes, + randomString: () => randomString, + required: () => required, + safeExtend: () => safeExtend, + shallowClone: () => shallowClone, + slugify: () => slugify, + stringifyPrimitive: () => stringifyPrimitive, + uint8ArrayToBase64: () => uint8ArrayToBase64, + uint8ArrayToBase64url: () => uint8ArrayToBase64url, + uint8ArrayToHex: () => uint8ArrayToHex, + unwrapMessage: () => unwrapMessage +}); +function assertEqual(val) { + return val; +} +function assertNotEqual(val) { + return val; +} +function assertIs(_arg) { +} +function assertNever(_x2) { + throw new Error("Unexpected value in exhaustive check"); +} +function assert3(_) { +} +function getEnumValues(entries) { + const numericValues = Object.values(entries).filter((v3) => typeof v3 === "number"); + const values = Object.entries(entries).filter(([k2, _]) => numericValues.indexOf(+k2) === -1).map(([_, v3]) => v3); + return values; +} +function joinValues(array2, separator = "|") { + return array2.map((val) => stringifyPrimitive(val)).join(separator); +} +function jsonStringifyReplacer(_, value) { + if (typeof value === "bigint") + return value.toString(); + return value; +} +function cached(getter) { + const set2 = false; + return { + get value() { + if (!set2) { + const value = getter(); + Object.defineProperty(this, "value", { value }); + return value; + } + throw new Error("cached value already set"); + } + }; +} +function nullish(input) { + return input === null || input === void 0; +} +function cleanRegex(source) { + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + return source.slice(start, end); +} +function floatSafeRemainder(val, step) { + const valDecCount = (val.toString().split(".")[1] || "").length; + const stepString = step.toString(); + let stepDecCount = (stepString.split(".")[1] || "").length; + if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) { + const match2 = stepString.match(/\d?e-(\d?)/); + if (match2?.[1]) { + stepDecCount = Number.parseInt(match2[1]); + } + } + const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; + const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); + const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); + return valInt % stepInt / 10 ** decCount; +} +function defineLazy(object2, key, getter) { + let value = void 0; + Object.defineProperty(object2, key, { + get() { + if (value === EVALUATING) { + return void 0; + } + if (value === void 0) { + value = EVALUATING; + value = getter(); + } + return value; + }, + set(v3) { + Object.defineProperty(object2, key, { + value: v3 + // configurable: true, + }); + }, + configurable: true + }); +} +function objectClone(obj) { + return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj)); +} +function assignProp(target, prop, value) { + Object.defineProperty(target, prop, { + value, + writable: true, + enumerable: true, + configurable: true + }); +} +function mergeDefs(...defs) { + const mergedDescriptors = {}; + for (const def of defs) { + const descriptors = Object.getOwnPropertyDescriptors(def); + Object.assign(mergedDescriptors, descriptors); + } + return Object.defineProperties({}, mergedDescriptors); +} +function cloneDef(schema) { + return mergeDefs(schema._zod.def); +} +function getElementAtPath(obj, path) { + if (!path) + return obj; + return path.reduce((acc, key) => acc?.[key], obj); +} +function promiseAllObject(promisesObj) { + const keys = Object.keys(promisesObj); + const promises = keys.map((key) => promisesObj[key]); + return Promise.all(promises).then((results) => { + const resolvedObj = {}; + for (let i2 = 0; i2 < keys.length; i2++) { + resolvedObj[keys[i2]] = results[i2]; + } + return resolvedObj; + }); +} +function randomString(length = 10) { + const chars2 = "abcdefghijklmnopqrstuvwxyz"; + let str = ""; + for (let i2 = 0; i2 < length; i2++) { + str += chars2[Math.floor(Math.random() * chars2.length)]; + } + return str; +} +function esc(str) { + return JSON.stringify(str); +} +function slugify(input) { + return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, ""); +} +function isObject3(data) { + return typeof data === "object" && data !== null && !Array.isArray(data); +} +function isPlainObject2(o2) { + if (isObject3(o2) === false) + return false; + const ctor = o2.constructor; + if (ctor === void 0) + return true; + if (typeof ctor !== "function") + return true; + const prot = ctor.prototype; + if (isObject3(prot) === false) + return false; + if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) { + return false; + } + return true; +} +function shallowClone(o2) { + if (isPlainObject2(o2)) + return { ...o2 }; + if (Array.isArray(o2)) + return [...o2]; + return o2; +} +function numKeys(data) { + let keyCount = 0; + for (const key in data) { + if (Object.prototype.hasOwnProperty.call(data, key)) { + keyCount++; + } + } + return keyCount; +} +function escapeRegex(str) { + return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); +} +function clone(inst, def, params) { + const cl2 = new inst._zod.constr(def ?? inst._zod.def); + if (!def || params?.parent) + cl2._zod.parent = inst; + return cl2; +} +function normalizeParams(_params) { + const params = _params; + if (!params) + return {}; + if (typeof params === "string") + return { error: () => params }; + if (params?.message !== void 0) { + if (params?.error !== void 0) + throw new Error("Cannot specify both `message` and `error` params"); + params.error = params.message; + } + delete params.message; + if (typeof params.error === "string") + return { ...params, error: () => params.error }; + return params; +} +function createTransparentProxy(getter) { + let target; + return new Proxy({}, { + get(_, prop, receiver) { + target ?? (target = getter()); + return Reflect.get(target, prop, receiver); + }, + set(_, prop, value, receiver) { + target ?? (target = getter()); + return Reflect.set(target, prop, value, receiver); + }, + has(_, prop) { + target ?? (target = getter()); + return Reflect.has(target, prop); + }, + deleteProperty(_, prop) { + target ?? (target = getter()); + return Reflect.deleteProperty(target, prop); + }, + ownKeys(_) { + target ?? (target = getter()); + return Reflect.ownKeys(target); + }, + getOwnPropertyDescriptor(_, prop) { + target ?? (target = getter()); + return Reflect.getOwnPropertyDescriptor(target, prop); + }, + defineProperty(_, prop, descriptor) { + target ?? (target = getter()); + return Reflect.defineProperty(target, prop, descriptor); + } + }); +} +function stringifyPrimitive(value) { + if (typeof value === "bigint") + return value.toString() + "n"; + if (typeof value === "string") + return `"${value}"`; + return `${value}`; +} +function optionalKeys(shape) { + return Object.keys(shape).filter((k2) => { + return shape[k2]._zod.optin === "optional" && shape[k2]._zod.optout === "optional"; + }); +} +function pick(schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".pick() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const newShape = {}; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + newShape[key] = currDef.shape[key]; + } + assignProp(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone(schema, def); +} +function omit(schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".omit() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const newShape = { ...schema._zod.def.shape }; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + delete newShape[key]; + } + assignProp(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone(schema, def); +} +function extend(schema, shape) { + if (!isPlainObject2(shape)) { + throw new Error("Invalid input to extend: expected a plain object"); + } + const checks = schema._zod.def.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + const existingShape = schema._zod.def.shape; + for (const key in shape) { + if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) { + throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead."); + } + } + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + } + }); + return clone(schema, def); +} +function safeExtend(schema, shape) { + if (!isPlainObject2(shape)) { + throw new Error("Invalid input to safeExtend: expected a plain object"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + } + }); + return clone(schema, def); +} +function merge2(a2, b2) { + const def = mergeDefs(a2._zod.def, { + get shape() { + const _shape = { ...a2._zod.def.shape, ...b2._zod.def.shape }; + assignProp(this, "shape", _shape); + return _shape; + }, + get catchall() { + return b2._zod.def.catchall; + }, + checks: [] + // delete existing checks + }); + return clone(a2, def); +} +function partial(Class2, schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".partial() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const oldShape = schema._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in oldShape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = Class2 ? new Class2({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; + } + } else { + for (const key in oldShape) { + shape[key] = Class2 ? new Class2({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; + } + } + assignProp(this, "shape", shape); + return shape; + }, + checks: [] + }); + return clone(schema, def); +} +function required(Class2, schema, mask) { + const def = mergeDefs(schema._zod.def, { + get shape() { + const oldShape = schema._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = new Class2({ + type: "nonoptional", + innerType: oldShape[key] + }); + } + } else { + for (const key in oldShape) { + shape[key] = new Class2({ + type: "nonoptional", + innerType: oldShape[key] + }); + } + } + assignProp(this, "shape", shape); + return shape; + } + }); + return clone(schema, def); +} +function aborted(x2, startIndex = 0) { + if (x2.aborted === true) + return true; + for (let i2 = startIndex; i2 < x2.issues.length; i2++) { + if (x2.issues[i2]?.continue !== true) { + return true; + } + } + return false; +} +function prefixIssues(path, issues) { + return issues.map((iss) => { + var _a124; + (_a124 = iss).path ?? (_a124.path = []); + iss.path.unshift(path); + return iss; + }); +} +function unwrapMessage(message2) { + return typeof message2 === "string" ? message2 : message2?.message; +} +function finalizeIssue(iss, ctx, config3) { + const full = { ...iss, path: iss.path ?? [] }; + if (!iss.message) { + const message2 = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config3.customError?.(iss)) ?? unwrapMessage(config3.localeError?.(iss)) ?? "Invalid input"; + full.message = message2; + } + delete full.inst; + delete full.continue; + if (!ctx?.reportInput) { + delete full.input; + } + return full; +} +function getSizableOrigin(input) { + if (input instanceof Set) + return "set"; + if (input instanceof Map) + return "map"; + if (input instanceof File) + return "file"; + return "unknown"; +} +function getLengthableOrigin(input) { + if (Array.isArray(input)) + return "array"; + if (typeof input === "string") + return "string"; + return "unknown"; +} +function parsedType(data) { + const t9 = typeof data; + switch (t9) { + case "number": { + return Number.isNaN(data) ? "nan" : "number"; + } + case "object": { + if (data === null) { + return "null"; + } + if (Array.isArray(data)) { + return "array"; + } + const obj = data; + if (obj && Object.getPrototypeOf(obj) !== Object.prototype && "constructor" in obj && obj.constructor) { + return obj.constructor.name; + } + } + } + return t9; +} +function issue(...args) { + const [iss, input, inst] = args; + if (typeof iss === "string") { + return { + message: iss, + code: "custom", + input, + inst + }; + } + return { ...iss }; +} +function cleanEnum(obj) { + return Object.entries(obj).filter(([k2, _]) => { + return Number.isNaN(Number.parseInt(k2, 10)); + }).map((el) => el[1]); +} +function base64ToUint8Array(base643) { + const binaryString = atob(base643); + const bytes = new Uint8Array(binaryString.length); + for (let i2 = 0; i2 < binaryString.length; i2++) { + bytes[i2] = binaryString.charCodeAt(i2); + } + return bytes; +} +function uint8ArrayToBase64(bytes) { + let binaryString = ""; + for (let i2 = 0; i2 < bytes.length; i2++) { + binaryString += String.fromCharCode(bytes[i2]); + } + return btoa(binaryString); +} +function base64urlToUint8Array(base64url3) { + const base643 = base64url3.replace(/-/g, "+").replace(/_/g, "/"); + const padding = "=".repeat((4 - base643.length % 4) % 4); + return base64ToUint8Array(base643 + padding); +} +function uint8ArrayToBase64url(bytes) { + return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); +} +function hexToUint8Array(hex3) { + const cleanHex = hex3.replace(/^0x/, ""); + if (cleanHex.length % 2 !== 0) { + throw new Error("Invalid hex string length"); + } + const bytes = new Uint8Array(cleanHex.length / 2); + for (let i2 = 0; i2 < cleanHex.length; i2 += 2) { + bytes[i2 / 2] = Number.parseInt(cleanHex.slice(i2, i2 + 2), 16); + } + return bytes; +} +function uint8ArrayToHex(bytes) { + return Array.from(bytes).map((b2) => b2.toString(16).padStart(2, "0")).join(""); +} +var EVALUATING, captureStackTrace, allowsEval, getParsedType, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, Class; +var init_util3 = __esm({ + "../../node_modules/zod/v4/core/util.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(assertEqual, "assertEqual"); + __name(assertNotEqual, "assertNotEqual"); + __name(assertIs, "assertIs"); + __name(assertNever, "assertNever"); + __name(assert3, "assert"); + __name(getEnumValues, "getEnumValues"); + __name(joinValues, "joinValues"); + __name(jsonStringifyReplacer, "jsonStringifyReplacer"); + __name(cached, "cached"); + __name(nullish, "nullish"); + __name(cleanRegex, "cleanRegex"); + __name(floatSafeRemainder, "floatSafeRemainder"); + EVALUATING = Symbol("evaluating"); + __name(defineLazy, "defineLazy"); + __name(objectClone, "objectClone"); + __name(assignProp, "assignProp"); + __name(mergeDefs, "mergeDefs"); + __name(cloneDef, "cloneDef"); + __name(getElementAtPath, "getElementAtPath"); + __name(promiseAllObject, "promiseAllObject"); + __name(randomString, "randomString"); + __name(esc, "esc"); + __name(slugify, "slugify"); + captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => { + }; + __name(isObject3, "isObject"); + allowsEval = cached(() => { + if (typeof navigator !== "undefined" && "Cloudflare-Workers"?.includes("Cloudflare")) { + return false; + } + try { + const F2 = Function; + new F2(""); + return true; + } catch (_) { + return false; + } + }); + __name(isPlainObject2, "isPlainObject"); + __name(shallowClone, "shallowClone"); + __name(numKeys, "numKeys"); + getParsedType = /* @__PURE__ */ __name((data) => { + const t9 = typeof data; + switch (t9) { + case "undefined": + return "undefined"; + case "string": + return "string"; + case "number": + return Number.isNaN(data) ? "nan" : "number"; + case "boolean": + return "boolean"; + case "function": + return "function"; + case "bigint": + return "bigint"; + case "symbol": + return "symbol"; + case "object": + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { + return "promise"; + } + if (typeof Map !== "undefined" && data instanceof Map) { + return "map"; + } + if (typeof Set !== "undefined" && data instanceof Set) { + return "set"; + } + if (typeof Date !== "undefined" && data instanceof Date) { + return "date"; + } + if (typeof File !== "undefined" && data instanceof File) { + return "file"; + } + return "object"; + default: + throw new Error(`Unknown data type: ${t9}`); + } + }, "getParsedType"); + propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]); + primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]); + __name(escapeRegex, "escapeRegex"); + __name(clone, "clone"); + __name(normalizeParams, "normalizeParams"); + __name(createTransparentProxy, "createTransparentProxy"); + __name(stringifyPrimitive, "stringifyPrimitive"); + __name(optionalKeys, "optionalKeys"); + NUMBER_FORMAT_RANGES = { + safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], + int32: [-2147483648, 2147483647], + uint32: [0, 4294967295], + float32: [-34028234663852886e22, 34028234663852886e22], + float64: [-Number.MAX_VALUE, Number.MAX_VALUE] + }; + BIGINT_FORMAT_RANGES = { + int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")], + uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")] + }; + __name(pick, "pick"); + __name(omit, "omit"); + __name(extend, "extend"); + __name(safeExtend, "safeExtend"); + __name(merge2, "merge"); + __name(partial, "partial"); + __name(required, "required"); + __name(aborted, "aborted"); + __name(prefixIssues, "prefixIssues"); + __name(unwrapMessage, "unwrapMessage"); + __name(finalizeIssue, "finalizeIssue"); + __name(getSizableOrigin, "getSizableOrigin"); + __name(getLengthableOrigin, "getLengthableOrigin"); + __name(parsedType, "parsedType"); + __name(issue, "issue"); + __name(cleanEnum, "cleanEnum"); + __name(base64ToUint8Array, "base64ToUint8Array"); + __name(uint8ArrayToBase64, "uint8ArrayToBase64"); + __name(base64urlToUint8Array, "base64urlToUint8Array"); + __name(uint8ArrayToBase64url, "uint8ArrayToBase64url"); + __name(hexToUint8Array, "hexToUint8Array"); + __name(uint8ArrayToHex, "uint8ArrayToHex"); + Class = class { + constructor(..._args) { + } + }; + __name(Class, "Class"); + } +}); + +// ../../node_modules/zod/v4/core/errors.js +function flattenError(error50, mapper = (issue2) => issue2.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of error50.issues) { + if (sub.path.length > 0) { + fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; + fieldErrors[sub.path[0]].push(mapper(sub)); + } else { + formErrors.push(mapper(sub)); + } + } + return { formErrors, fieldErrors }; +} +function formatError(error50, mapper = (issue2) => issue2.message) { + const fieldErrors = { _errors: [] }; + const processError = /* @__PURE__ */ __name((error51) => { + for (const issue2 of error51.issues) { + if (issue2.code === "invalid_union" && issue2.errors.length) { + issue2.errors.map((issues) => processError({ issues })); + } else if (issue2.code === "invalid_key") { + processError({ issues: issue2.issues }); + } else if (issue2.code === "invalid_element") { + processError({ issues: issue2.issues }); + } else if (issue2.path.length === 0) { + fieldErrors._errors.push(mapper(issue2)); + } else { + let curr = fieldErrors; + let i2 = 0; + while (i2 < issue2.path.length) { + const el = issue2.path[i2]; + const terminal = i2 === issue2.path.length - 1; + if (!terminal) { + curr[el] = curr[el] || { _errors: [] }; + } else { + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue2)); + } + curr = curr[el]; + i2++; + } + } + } + }, "processError"); + processError(error50); + return fieldErrors; +} +function treeifyError(error50, mapper = (issue2) => issue2.message) { + const result = { errors: [] }; + const processError = /* @__PURE__ */ __name((error51, path = []) => { + var _a124, _b; + for (const issue2 of error51.issues) { + if (issue2.code === "invalid_union" && issue2.errors.length) { + issue2.errors.map((issues) => processError({ issues }, issue2.path)); + } else if (issue2.code === "invalid_key") { + processError({ issues: issue2.issues }, issue2.path); + } else if (issue2.code === "invalid_element") { + processError({ issues: issue2.issues }, issue2.path); + } else { + const fullpath = [...path, ...issue2.path]; + if (fullpath.length === 0) { + result.errors.push(mapper(issue2)); + continue; + } + let curr = result; + let i2 = 0; + while (i2 < fullpath.length) { + const el = fullpath[i2]; + const terminal = i2 === fullpath.length - 1; + if (typeof el === "string") { + curr.properties ?? (curr.properties = {}); + (_a124 = curr.properties)[el] ?? (_a124[el] = { errors: [] }); + curr = curr.properties[el]; + } else { + curr.items ?? (curr.items = []); + (_b = curr.items)[el] ?? (_b[el] = { errors: [] }); + curr = curr.items[el]; + } + if (terminal) { + curr.errors.push(mapper(issue2)); + } + i2++; + } + } + } + }, "processError"); + processError(error50); + return result; +} +function toDotPath(_path) { + const segs = []; + const path = _path.map((seg) => typeof seg === "object" ? seg.key : seg); + for (const seg of path) { + if (typeof seg === "number") + segs.push(`[${seg}]`); + else if (typeof seg === "symbol") + segs.push(`[${JSON.stringify(String(seg))}]`); + else if (/[^\w$]/.test(seg)) + segs.push(`[${JSON.stringify(seg)}]`); + else { + if (segs.length) + segs.push("."); + segs.push(seg); + } + } + return segs.join(""); +} +function prettifyError(error50) { + const lines = []; + const issues = [...error50.issues].sort((a2, b2) => (a2.path ?? []).length - (b2.path ?? []).length); + for (const issue2 of issues) { + lines.push(`\u2716 ${issue2.message}`); + if (issue2.path?.length) + lines.push(` \u2192 at ${toDotPath(issue2.path)}`); + } + return lines.join("\n"); +} +var initializer, $ZodError, $ZodRealError; +var init_errors4 = __esm({ + "../../node_modules/zod/v4/core/errors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core2(); + init_util3(); + initializer = /* @__PURE__ */ __name((inst, def) => { + inst.name = "$ZodError"; + Object.defineProperty(inst, "_zod", { + value: inst._zod, + enumerable: false + }); + Object.defineProperty(inst, "issues", { + value: def, + enumerable: false + }); + inst.message = JSON.stringify(def, jsonStringifyReplacer, 2); + Object.defineProperty(inst, "toString", { + value: () => inst.message, + enumerable: false + }); + }, "initializer"); + $ZodError = $constructor("$ZodError", initializer); + $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error }); + __name(flattenError, "flattenError"); + __name(formatError, "formatError"); + __name(treeifyError, "treeifyError"); + __name(toDotPath, "toDotPath"); + __name(prettifyError, "prettifyError"); + } +}); + +// ../../node_modules/zod/v4/core/parse.js +var _parse, parse, _parseAsync, parseAsync, _safeParse, safeParse, _safeParseAsync, safeParseAsync, _encode, encode3, _decode, decode2, _encodeAsync, encodeAsync, _decodeAsync, decodeAsync, _safeEncode, safeEncode, _safeDecode, safeDecode, _safeEncodeAsync, safeEncodeAsync, _safeDecodeAsync, safeDecodeAsync; +var init_parse = __esm({ + "../../node_modules/zod/v4/core/parse.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core2(); + init_errors4(); + init_util3(); + _parse = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx, _params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; + const result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) { + throw new $ZodAsyncError(); + } + if (result.issues.length) { + const e2 = new (_params?.Err ?? _Err2)(result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))); + captureStackTrace(e2, _params?.callee); + throw e2; + } + return result.value; + }, "_parse"); + parse = /* @__PURE__ */ _parse($ZodRealError); + _parseAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx, params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + if (result.issues.length) { + const e2 = new (params?.Err ?? _Err2)(result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))); + captureStackTrace(e2, params?.callee); + throw e2; + } + return result.value; + }, "_parseAsync"); + parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError); + _safeParse = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + const ctx = _ctx ? { ..._ctx, async: false } : { async: false }; + const result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) { + throw new $ZodAsyncError(); + } + return result.issues.length ? { + success: false, + error: new (_Err2 ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))) + } : { success: true, data: result.value }; + }, "_safeParse"); + safeParse = /* @__PURE__ */ _safeParse($ZodRealError); + _safeParseAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + return result.issues.length ? { + success: false, + error: new _Err2(result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))) + } : { success: true, data: result.value }; + }, "_safeParseAsync"); + safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError); + _encode = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parse(_Err2)(schema, value, ctx); + }, "_encode"); + encode3 = /* @__PURE__ */ _encode($ZodRealError); + _decode = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + return _parse(_Err2)(schema, value, _ctx); + }, "_decode"); + decode2 = /* @__PURE__ */ _decode($ZodRealError); + _encodeAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parseAsync(_Err2)(schema, value, ctx); + }, "_encodeAsync"); + encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError); + _decodeAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + return _parseAsync(_Err2)(schema, value, _ctx); + }, "_decodeAsync"); + decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError); + _safeEncode = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParse(_Err2)(schema, value, ctx); + }, "_safeEncode"); + safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError); + _safeDecode = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + return _safeParse(_Err2)(schema, value, _ctx); + }, "_safeDecode"); + safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError); + _safeEncodeAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParseAsync(_Err2)(schema, value, ctx); + }, "_safeEncodeAsync"); + safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError); + _safeDecodeAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + return _safeParseAsync(_Err2)(schema, value, _ctx); + }, "_safeDecodeAsync"); + safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError); + } +}); + +// ../../node_modules/zod/v4/core/regexes.js +var regexes_exports = {}; +__export(regexes_exports, { + base64: () => base64, + base64url: () => base64url, + bigint: () => bigint2, + boolean: () => boolean, + browserEmail: () => browserEmail, + cidrv4: () => cidrv4, + cidrv6: () => cidrv6, + cuid: () => cuid, + cuid2: () => cuid2, + date: () => date2, + datetime: () => datetime, + domain: () => domain2, + duration: () => duration, + e164: () => e164, + email: () => email, + emoji: () => emoji, + extendedDuration: () => extendedDuration, + guid: () => guid, + hex: () => hex, + hostname: () => hostname, + html5Email: () => html5Email, + idnEmail: () => idnEmail, + integer: () => integer2, + ipv4: () => ipv4, + ipv6: () => ipv6, + ksuid: () => ksuid, + lowercase: () => lowercase, + mac: () => mac, + md5_base64: () => md5_base64, + md5_base64url: () => md5_base64url, + md5_hex: () => md5_hex, + nanoid: () => nanoid, + null: () => _null, + number: () => number, + rfc5322Email: () => rfc5322Email, + sha1_base64: () => sha1_base64, + sha1_base64url: () => sha1_base64url, + sha1_hex: () => sha1_hex, + sha256_base64: () => sha256_base64, + sha256_base64url: () => sha256_base64url, + sha256_hex: () => sha256_hex, + sha384_base64: () => sha384_base64, + sha384_base64url: () => sha384_base64url, + sha384_hex: () => sha384_hex, + sha512_base64: () => sha512_base64, + sha512_base64url: () => sha512_base64url, + sha512_hex: () => sha512_hex, + string: () => string, + time: () => time5, + ulid: () => ulid, + undefined: () => _undefined, + unicodeEmail: () => unicodeEmail, + uppercase: () => uppercase, + uuid: () => uuid, + uuid4: () => uuid4, + uuid6: () => uuid6, + uuid7: () => uuid7, + xid: () => xid +}); +function emoji() { + return new RegExp(_emoji, "u"); +} +function timeSource(args) { + const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`; + const regex = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`; + return regex; +} +function time5(args) { + return new RegExp(`^${timeSource(args)}$`); +} +function datetime(args) { + const time7 = timeSource({ precision: args.precision }); + const opts = ["Z"]; + if (args.local) + opts.push(""); + if (args.offset) + opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`); + const timeRegex = `${time7}(?:${opts.join("|")})`; + return new RegExp(`^${dateSource}T(?:${timeRegex})$`); +} +function fixedBase64(bodyLength, padding) { + return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`); +} +function fixedBase64url(length) { + return new RegExp(`^[A-Za-z0-9_-]{${length}}$`); +} +var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji, ipv4, ipv6, mac, cidrv4, cidrv6, base64, base64url, hostname, domain2, e164, dateSource, date2, string, bigint2, integer2, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url; +var init_regexes = __esm({ + "../../node_modules/zod/v4/core/regexes.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + cuid = /^[cC][^\s-]{8,}$/; + cuid2 = /^[0-9a-z]+$/; + ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; + xid = /^[0-9a-vA-V]{20}$/; + ksuid = /^[A-Za-z0-9]{27}$/; + nanoid = /^[a-zA-Z0-9_-]{21}$/; + duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; + extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; + guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; + uuid = /* @__PURE__ */ __name((version4) => { + if (!version4) + return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; + return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version4}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); + }, "uuid"); + uuid4 = /* @__PURE__ */ uuid(4); + uuid6 = /* @__PURE__ */ uuid(6); + uuid7 = /* @__PURE__ */ uuid(7); + email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; + html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; + rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u; + idnEmail = unicodeEmail; + browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; + _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; + __name(emoji, "emoji"); + ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; + ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/; + mac = /* @__PURE__ */ __name((delimiter) => { + const escapedDelim = escapeRegex(delimiter ?? ":"); + return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`); + }, "mac"); + cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; + cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; + base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; + base64url = /^[A-Za-z0-9_-]*$/; + hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/; + domain2 = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/; + e164 = /^\+[1-9]\d{6,14}$/; + dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; + date2 = /* @__PURE__ */ new RegExp(`^${dateSource}$`); + __name(timeSource, "timeSource"); + __name(time5, "time"); + __name(datetime, "datetime"); + string = /* @__PURE__ */ __name((params) => { + const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; + return new RegExp(`^${regex}$`); + }, "string"); + bigint2 = /^-?\d+n?$/; + integer2 = /^-?\d+$/; + number = /^-?\d+(?:\.\d+)?$/; + boolean = /^(?:true|false)$/i; + _null = /^null$/i; + _undefined = /^undefined$/i; + lowercase = /^[^A-Z]*$/; + uppercase = /^[^a-z]*$/; + hex = /^[0-9a-fA-F]*$/; + __name(fixedBase64, "fixedBase64"); + __name(fixedBase64url, "fixedBase64url"); + md5_hex = /^[0-9a-fA-F]{32}$/; + md5_base64 = /* @__PURE__ */ fixedBase64(22, "=="); + md5_base64url = /* @__PURE__ */ fixedBase64url(22); + sha1_hex = /^[0-9a-fA-F]{40}$/; + sha1_base64 = /* @__PURE__ */ fixedBase64(27, "="); + sha1_base64url = /* @__PURE__ */ fixedBase64url(27); + sha256_hex = /^[0-9a-fA-F]{64}$/; + sha256_base64 = /* @__PURE__ */ fixedBase64(43, "="); + sha256_base64url = /* @__PURE__ */ fixedBase64url(43); + sha384_hex = /^[0-9a-fA-F]{96}$/; + sha384_base64 = /* @__PURE__ */ fixedBase64(64, ""); + sha384_base64url = /* @__PURE__ */ fixedBase64url(64); + sha512_hex = /^[0-9a-fA-F]{128}$/; + sha512_base64 = /* @__PURE__ */ fixedBase64(86, "=="); + sha512_base64url = /* @__PURE__ */ fixedBase64url(86); + } +}); + +// ../../node_modules/zod/v4/core/checks.js +function handleCheckPropertyResult(result, payload, property) { + if (result.issues.length) { + payload.issues.push(...prefixIssues(property, result.issues)); + } +} +var $ZodCheck, numericOriginMap, $ZodCheckLessThan, $ZodCheckGreaterThan, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckBigIntFormat, $ZodCheckMaxSize, $ZodCheckMinSize, $ZodCheckSizeEquals, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckLengthEquals, $ZodCheckStringFormat, $ZodCheckRegex, $ZodCheckLowerCase, $ZodCheckUpperCase, $ZodCheckIncludes, $ZodCheckStartsWith, $ZodCheckEndsWith, $ZodCheckProperty, $ZodCheckMimeType, $ZodCheckOverwrite; +var init_checks2 = __esm({ + "../../node_modules/zod/v4/core/checks.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core2(); + init_regexes(); + init_util3(); + $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { + var _a124; + inst._zod ?? (inst._zod = {}); + inst._zod.def = def; + (_a124 = inst._zod).onattach ?? (_a124.onattach = []); + }); + numericOriginMap = { + number: "number", + bigint: "bigint", + object: "date" + }; + $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => { + $ZodCheck.init(inst, def); + const origin2 = numericOriginMap[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; + if (def.value < curr) { + if (def.inclusive) + bag.maximum = def.value; + else + bag.exclusiveMaximum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value <= def.value : payload.value < def.value) { + return; + } + payload.issues.push({ + origin: origin2, + code: "too_big", + maximum: typeof def.value === "object" ? def.value.getTime() : def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => { + $ZodCheck.init(inst, def); + const origin2 = numericOriginMap[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; + if (def.value > curr) { + if (def.inclusive) + bag.minimum = def.value; + else + bag.exclusiveMinimum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value >= def.value : payload.value > def.value) { + return; + } + payload.issues.push({ + origin: origin2, + code: "too_small", + minimum: typeof def.value === "object" ? def.value.getTime() : def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.onattach.push((inst2) => { + var _a124; + (_a124 = inst2._zod.bag).multipleOf ?? (_a124.multipleOf = def.value); + }); + inst._zod.check = (payload) => { + if (typeof payload.value !== typeof def.value) + throw new Error("Cannot mix number and bigint in multiple_of check."); + const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0; + if (isMultiple) + return; + payload.issues.push({ + origin: typeof payload.value, + code: "not_multiple_of", + divisor: def.value, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => { + $ZodCheck.init(inst, def); + def.format = def.format || "float64"; + const isInt = def.format?.includes("int"); + const origin2 = isInt ? "int" : "number"; + const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + if (isInt) + bag.pattern = integer2; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (isInt) { + if (!Number.isInteger(input)) { + payload.issues.push({ + expected: origin2, + format: def.format, + code: "invalid_type", + continue: false, + input, + inst + }); + return; + } + if (!Number.isSafeInteger(input)) { + if (input > 0) { + payload.issues.push({ + input, + code: "too_big", + maximum: Number.MAX_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin: origin2, + inclusive: true, + continue: !def.abort + }); + } else { + payload.issues.push({ + input, + code: "too_small", + minimum: Number.MIN_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin: origin2, + inclusive: true, + continue: !def.abort + }); + } + return; + } + } + if (input < minimum) { + payload.issues.push({ + origin: "number", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "number", + input, + code: "too_big", + maximum, + inclusive: true, + inst, + continue: !def.abort + }); + } + }; + }); + $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat", (inst, def) => { + $ZodCheck.init(inst, def); + const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (input < minimum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_big", + maximum, + inclusive: true, + inst, + continue: !def.abort + }); + } + }; + }); + $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size <= def.maximum) + return; + payload.issues.push({ + origin: getSizableOrigin(input), + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size >= def.minimum) + return; + payload.issues.push({ + origin: getSizableOrigin(input), + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.size; + bag.maximum = def.size; + bag.size = def.size; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size === def.size) + return; + const tooBig = size > def.size; + payload.issues.push({ + origin: getSizableOrigin(input), + ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length <= def.maximum) + return; + const origin2 = getLengthableOrigin(input); + payload.issues.push({ + origin: origin2, + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length >= def.minimum) + return; + const origin2 = getLengthableOrigin(input); + payload.issues.push({ + origin: origin2, + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.length; + bag.maximum = def.length; + bag.length = def.length; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length === def.length) + return; + const origin2 = getLengthableOrigin(input); + const tooBig = length > def.length; + payload.issues.push({ + origin: origin2, + ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => { + var _a124, _b; + $ZodCheck.init(inst, def); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + if (def.pattern) { + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(def.pattern); + } + }); + if (def.pattern) + (_a124 = inst._zod).check ?? (_a124.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: def.format, + input: payload.value, + ...def.pattern ? { pattern: def.pattern.toString() } : {}, + inst, + continue: !def.abort + }); + }); + else + (_b = inst._zod).check ?? (_b.check = () => { + }); + }); + $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => { + $ZodCheckStringFormat.init(inst, def); + inst._zod.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "regex", + input: payload.value, + pattern: def.pattern.toString(), + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => { + def.pattern ?? (def.pattern = lowercase); + $ZodCheckStringFormat.init(inst, def); + }); + $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => { + def.pattern ?? (def.pattern = uppercase); + $ZodCheckStringFormat.init(inst, def); + }); + $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => { + $ZodCheck.init(inst, def); + const escapedRegex = escapeRegex(def.includes); + const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex); + def.pattern = pattern; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.includes(def.includes, def.position)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "includes", + includes: def.includes, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => { + $ZodCheck.init(inst, def); + const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.startsWith(def.prefix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "starts_with", + prefix: def.prefix, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => { + $ZodCheck.init(inst, def); + const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.endsWith(def.suffix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "ends_with", + suffix: def.suffix, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + __name(handleCheckPropertyResult, "handleCheckPropertyResult"); + $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.check = (payload) => { + const result = def.schema._zod.run({ + value: payload.value[def.property], + issues: [] + }, {}); + if (result instanceof Promise) { + return result.then((result2) => handleCheckPropertyResult(result2, payload, def.property)); + } + handleCheckPropertyResult(result, payload, def.property); + return; + }; + }); + $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => { + $ZodCheck.init(inst, def); + const mimeSet = new Set(def.mime); + inst._zod.onattach.push((inst2) => { + inst2._zod.bag.mime = def.mime; + }); + inst._zod.check = (payload) => { + if (mimeSet.has(payload.value.type)) + return; + payload.issues.push({ + code: "invalid_value", + values: def.mime, + input: payload.value.type, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.check = (payload) => { + payload.value = def.tx(payload.value); + }; + }); + } +}); + +// ../../node_modules/zod/v4/core/doc.js +var Doc; +var init_doc = __esm({ + "../../node_modules/zod/v4/core/doc.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Doc = class { + constructor(args = []) { + this.content = []; + this.indent = 0; + if (this) + this.args = args; + } + indented(fn) { + this.indent += 1; + fn(this); + this.indent -= 1; + } + write(arg) { + if (typeof arg === "function") { + arg(this, { execution: "sync" }); + arg(this, { execution: "async" }); + return; + } + const content = arg; + const lines = content.split("\n").filter((x2) => x2); + const minIndent = Math.min(...lines.map((x2) => x2.length - x2.trimStart().length)); + const dedented = lines.map((x2) => x2.slice(minIndent)).map((x2) => " ".repeat(this.indent * 2) + x2); + for (const line of dedented) { + this.content.push(line); + } + } + compile() { + const F2 = Function; + const args = this?.args; + const content = this?.content ?? [``]; + const lines = [...content.map((x2) => ` ${x2}`)]; + return new F2(...args, lines.join("\n")); + } + }; + __name(Doc, "Doc"); + } +}); + +// ../../node_modules/zod/v4/core/versions.js +var version3; +var init_versions = __esm({ + "../../node_modules/zod/v4/core/versions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + version3 = { + major: 4, + minor: 3, + patch: 6 + }; + } +}); + +// ../../node_modules/zod/v4/core/schemas.js +function isValidBase64(data) { + if (data === "") + return true; + if (data.length % 4 !== 0) + return false; + try { + atob(data); + return true; + } catch { + return false; + } +} +function isValidBase64URL(data) { + if (!base64url.test(data)) + return false; + const base643 = data.replace(/[-_]/g, (c2) => c2 === "-" ? "+" : "/"); + const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "="); + return isValidBase64(padded); +} +function isValidJWT(token, algorithm = null) { + try { + const tokensParts = token.split("."); + if (tokensParts.length !== 3) + return false; + const [header] = tokensParts; + if (!header) + return false; + const parsedHeader = JSON.parse(atob(header)); + if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") + return false; + if (!parsedHeader.alg) + return false; + if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) + return false; + return true; + } catch { + return false; + } +} +function handleArrayResult(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues(index, result.issues)); + } + final.value[index] = result.value; +} +function handlePropertyResult(result, final, key, input, isOptionalOut) { + if (result.issues.length) { + if (isOptionalOut && !(key in input)) { + return; + } + final.issues.push(...prefixIssues(key, result.issues)); + } + if (result.value === void 0) { + if (key in input) { + final.value[key] = void 0; + } + } else { + final.value[key] = result.value; + } +} +function normalizeDef(def) { + const keys = Object.keys(def.shape); + for (const k2 of keys) { + if (!def.shape?.[k2]?._zod?.traits?.has("$ZodType")) { + throw new Error(`Invalid element at key "${k2}": expected a Zod schema`); + } + } + const okeys = optionalKeys(def.shape); + return { + ...def, + keys, + keySet: new Set(keys), + numKeys: keys.length, + optionalKeys: new Set(okeys) + }; +} +function handleCatchall(proms, input, payload, ctx, def, inst) { + const unrecognized = []; + const keySet = def.keySet; + const _catchall = def.catchall._zod; + const t9 = _catchall.def.type; + const isOptionalOut = _catchall.optout === "optional"; + for (const key in input) { + if (keySet.has(key)) + continue; + if (t9 === "never") { + unrecognized.push(key); + continue; + } + const r2 = _catchall.run({ value: input[key], issues: [] }, ctx); + if (r2 instanceof Promise) { + proms.push(r2.then((r3) => handlePropertyResult(r3, payload, key, input, isOptionalOut))); + } else { + handlePropertyResult(r2, payload, key, input, isOptionalOut); + } + } + if (unrecognized.length) { + payload.issues.push({ + code: "unrecognized_keys", + keys: unrecognized, + input, + inst + }); + } + if (!proms.length) + return payload; + return Promise.all(proms).then(() => { + return payload; + }); +} +function handleUnionResults(results, final, inst, ctx) { + for (const result of results) { + if (result.issues.length === 0) { + final.value = result.value; + return final; + } + } + const nonaborted = results.filter((r2) => !aborted(r2)); + if (nonaborted.length === 1) { + final.value = nonaborted[0].value; + return nonaborted[0]; + } + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))) + }); + return final; +} +function handleExclusiveUnionResults(results, final, inst, ctx) { + const successes = results.filter((r2) => r2.issues.length === 0); + if (successes.length === 1) { + final.value = successes[0].value; + return final; + } + if (successes.length === 0) { + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))) + }); + } else { + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: [], + inclusive: false + }); + } + return final; +} +function mergeValues(a2, b2) { + if (a2 === b2) { + return { valid: true, data: a2 }; + } + if (a2 instanceof Date && b2 instanceof Date && +a2 === +b2) { + return { valid: true, data: a2 }; + } + if (isPlainObject2(a2) && isPlainObject2(b2)) { + const bKeys = Object.keys(b2); + const sharedKeys = Object.keys(a2).filter((key) => bKeys.indexOf(key) !== -1); + const newObj = { ...a2, ...b2 }; + for (const key of sharedKeys) { + const sharedValue = mergeValues(a2[key], b2[key]); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [key, ...sharedValue.mergeErrorPath] + }; + } + newObj[key] = sharedValue.data; + } + return { valid: true, data: newObj }; + } + if (Array.isArray(a2) && Array.isArray(b2)) { + if (a2.length !== b2.length) { + return { valid: false, mergeErrorPath: [] }; + } + const newArray = []; + for (let index = 0; index < a2.length; index++) { + const itemA = a2[index]; + const itemB = b2[index]; + const sharedValue = mergeValues(itemA, itemB); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [index, ...sharedValue.mergeErrorPath] + }; + } + newArray.push(sharedValue.data); + } + return { valid: true, data: newArray }; + } + return { valid: false, mergeErrorPath: [] }; +} +function handleIntersectionResults(result, left, right) { + const unrecKeys = /* @__PURE__ */ new Map(); + let unrecIssue; + for (const iss of left.issues) { + if (iss.code === "unrecognized_keys") { + unrecIssue ?? (unrecIssue = iss); + for (const k2 of iss.keys) { + if (!unrecKeys.has(k2)) + unrecKeys.set(k2, {}); + unrecKeys.get(k2).l = true; + } + } else { + result.issues.push(iss); + } + } + for (const iss of right.issues) { + if (iss.code === "unrecognized_keys") { + for (const k2 of iss.keys) { + if (!unrecKeys.has(k2)) + unrecKeys.set(k2, {}); + unrecKeys.get(k2).r = true; + } + } else { + result.issues.push(iss); + } + } + const bothKeys = [...unrecKeys].filter(([, f2]) => f2.l && f2.r).map(([k2]) => k2); + if (bothKeys.length && unrecIssue) { + result.issues.push({ ...unrecIssue, keys: bothKeys }); + } + if (aborted(result)) + return result; + const merged = mergeValues(left.value, right.value); + if (!merged.valid) { + throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`); + } + result.value = merged.data; + return result; +} +function handleTupleResult(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues(index, result.issues)); + } + final.value[index] = result.value; +} +function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) { + if (keyResult.issues.length) { + if (propertyKeyTypes.has(typeof key)) { + final.issues.push(...prefixIssues(key, keyResult.issues)); + } else { + final.issues.push({ + code: "invalid_key", + origin: "map", + input, + inst, + issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config2())) + }); + } + } + if (valueResult.issues.length) { + if (propertyKeyTypes.has(typeof key)) { + final.issues.push(...prefixIssues(key, valueResult.issues)); + } else { + final.issues.push({ + origin: "map", + code: "invalid_element", + input, + inst, + key, + issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config2())) + }); + } + } + final.value.set(keyResult.value, valueResult.value); +} +function handleSetResult(result, final) { + if (result.issues.length) { + final.issues.push(...result.issues); + } + final.value.add(result.value); +} +function handleOptionalResult(result, input) { + if (result.issues.length && input === void 0) { + return { issues: [], value: void 0 }; + } + return result; +} +function handleDefaultResult(payload, def) { + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return payload; +} +function handleNonOptionalResult(payload, inst) { + if (!payload.issues.length && payload.value === void 0) { + payload.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: payload.value, + inst + }); + } + return payload; +} +function handlePipeResult(left, next, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return next._zod.run({ value: left.value, issues: left.issues }, ctx); +} +function handleCodecAResult(result, def, ctx) { + if (result.issues.length) { + result.aborted = true; + return result; + } + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const transformed = def.transform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx)); + } + return handleCodecTxResult(result, transformed, def.out, ctx); + } else { + const transformed = def.reverseTransform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx)); + } + return handleCodecTxResult(result, transformed, def.in, ctx); + } +} +function handleCodecTxResult(left, value, nextSchema, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return nextSchema._zod.run({ value, issues: left.issues }, ctx); +} +function handleReadonlyResult(payload) { + payload.value = Object.freeze(payload.value); + return payload; +} +function handleRefineResult(result, payload, input, inst) { + if (!result) { + const _iss = { + code: "custom", + input, + inst, + // incorporates params.error into issue reporting + path: [...inst._zod.def.path ?? []], + // incorporates params.error into issue reporting + continue: !inst._zod.def.abort + // params: inst._zod.def.params, + }; + if (inst._zod.def.params) + _iss.params = inst._zod.def.params; + payload.issues.push(issue(_iss)); + } +} +var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom; +var init_schemas = __esm({ + "../../node_modules/zod/v4/core/schemas.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_checks2(); + init_core2(); + init_doc(); + init_parse(); + init_regexes(); + init_util3(); + init_versions(); + init_util3(); + $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { + var _a124; + inst ?? (inst = {}); + inst._zod.def = def; + inst._zod.bag = inst._zod.bag || {}; + inst._zod.version = version3; + const checks = [...inst._zod.def.checks ?? []]; + if (inst._zod.traits.has("$ZodCheck")) { + checks.unshift(inst); + } + for (const ch2 of checks) { + for (const fn of ch2._zod.onattach) { + fn(inst); + } + } + if (checks.length === 0) { + (_a124 = inst._zod).deferred ?? (_a124.deferred = []); + inst._zod.deferred?.push(() => { + inst._zod.run = inst._zod.parse; + }); + } else { + const runChecks = /* @__PURE__ */ __name((payload, checks2, ctx) => { + let isAborted = aborted(payload); + let asyncResult; + for (const ch2 of checks2) { + if (ch2._zod.def.when) { + const shouldRun = ch2._zod.def.when(payload); + if (!shouldRun) + continue; + } else if (isAborted) { + continue; + } + const currLen = payload.issues.length; + const _ = ch2._zod.check(payload); + if (_ instanceof Promise && ctx?.async === false) { + throw new $ZodAsyncError(); + } + if (asyncResult || _ instanceof Promise) { + asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { + await _; + const nextLen = payload.issues.length; + if (nextLen === currLen) + return; + if (!isAborted) + isAborted = aborted(payload, currLen); + }); + } else { + const nextLen = payload.issues.length; + if (nextLen === currLen) + continue; + if (!isAborted) + isAborted = aborted(payload, currLen); + } + } + if (asyncResult) { + return asyncResult.then(() => { + return payload; + }); + } + return payload; + }, "runChecks"); + const handleCanaryResult = /* @__PURE__ */ __name((canary, payload, ctx) => { + if (aborted(canary)) { + canary.aborted = true; + return canary; + } + const checkResult = runChecks(payload, checks, ctx); + if (checkResult instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx)); + } + return inst._zod.parse(checkResult, ctx); + }, "handleCanaryResult"); + inst._zod.run = (payload, ctx) => { + if (ctx.skipChecks) { + return inst._zod.parse(payload, ctx); + } + if (ctx.direction === "backward") { + const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true }); + if (canary instanceof Promise) { + return canary.then((canary2) => { + return handleCanaryResult(canary2, payload, ctx); + }); + } + return handleCanaryResult(canary, payload, ctx); + } + const result = inst._zod.parse(payload, ctx); + if (result instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return result.then((result2) => runChecks(result2, checks, ctx)); + } + return runChecks(result, checks, ctx); + }; + } + defineLazy(inst, "~standard", () => ({ + validate: (value) => { + try { + const r2 = safeParse(inst, value); + return r2.success ? { value: r2.data } : { issues: r2.error?.issues }; + } catch (_) { + return safeParseAsync(inst, value).then((r2) => r2.success ? { value: r2.data } : { issues: r2.error?.issues }); + } + }, + vendor: "zod", + version: 1 + })); + }); + $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag); + inst._zod.parse = (payload, _) => { + if (def.coerce) + try { + payload.value = String(payload.value); + } catch (_2) { + } + if (typeof payload.value === "string") + return payload; + payload.issues.push({ + expected: "string", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; + }); + $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => { + $ZodCheckStringFormat.init(inst, def); + $ZodString.init(inst, def); + }); + $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => { + def.pattern ?? (def.pattern = guid); + $ZodStringFormat.init(inst, def); + }); + $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => { + if (def.version) { + const versionMap = { + v1: 1, + v2: 2, + v3: 3, + v4: 4, + v5: 5, + v6: 6, + v7: 7, + v8: 8 + }; + const v3 = versionMap[def.version]; + if (v3 === void 0) + throw new Error(`Invalid UUID version: "${def.version}"`); + def.pattern ?? (def.pattern = uuid(v3)); + } else + def.pattern ?? (def.pattern = uuid()); + $ZodStringFormat.init(inst, def); + }); + $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => { + def.pattern ?? (def.pattern = email); + $ZodStringFormat.init(inst, def); + }); + $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + try { + const trimmed = payload.value.trim(); + const url2 = new URL(trimmed); + if (def.hostname) { + def.hostname.lastIndex = 0; + if (!def.hostname.test(url2.hostname)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid hostname", + pattern: def.hostname.source, + input: payload.value, + inst, + continue: !def.abort + }); + } + } + if (def.protocol) { + def.protocol.lastIndex = 0; + if (!def.protocol.test(url2.protocol.endsWith(":") ? url2.protocol.slice(0, -1) : url2.protocol)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid protocol", + pattern: def.protocol.source, + input: payload.value, + inst, + continue: !def.abort + }); + } + } + if (def.normalize) { + payload.value = url2.href; + } else { + payload.value = trimmed; + } + return; + } catch (_) { + payload.issues.push({ + code: "invalid_format", + format: "url", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; + }); + $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => { + def.pattern ?? (def.pattern = emoji()); + $ZodStringFormat.init(inst, def); + }); + $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => { + def.pattern ?? (def.pattern = nanoid); + $ZodStringFormat.init(inst, def); + }); + $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => { + def.pattern ?? (def.pattern = cuid); + $ZodStringFormat.init(inst, def); + }); + $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => { + def.pattern ?? (def.pattern = cuid2); + $ZodStringFormat.init(inst, def); + }); + $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => { + def.pattern ?? (def.pattern = ulid); + $ZodStringFormat.init(inst, def); + }); + $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => { + def.pattern ?? (def.pattern = xid); + $ZodStringFormat.init(inst, def); + }); + $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => { + def.pattern ?? (def.pattern = ksuid); + $ZodStringFormat.init(inst, def); + }); + $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => { + def.pattern ?? (def.pattern = datetime(def)); + $ZodStringFormat.init(inst, def); + }); + $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => { + def.pattern ?? (def.pattern = date2); + $ZodStringFormat.init(inst, def); + }); + $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => { + def.pattern ?? (def.pattern = time5(def)); + $ZodStringFormat.init(inst, def); + }); + $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => { + def.pattern ?? (def.pattern = duration); + $ZodStringFormat.init(inst, def); + }); + $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => { + def.pattern ?? (def.pattern = ipv4); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `ipv4`; + }); + $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => { + def.pattern ?? (def.pattern = ipv6); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `ipv6`; + inst._zod.check = (payload) => { + try { + new URL(`http://[${payload.value}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "ipv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; + }); + $ZodMAC = /* @__PURE__ */ $constructor("$ZodMAC", (inst, def) => { + def.pattern ?? (def.pattern = mac(def.delimiter)); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `mac`; + }); + $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => { + def.pattern ?? (def.pattern = cidrv4); + $ZodStringFormat.init(inst, def); + }); + $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => { + def.pattern ?? (def.pattern = cidrv6); + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + const parts = payload.value.split("/"); + try { + if (parts.length !== 2) + throw new Error(); + const [address, prefix] = parts; + if (!prefix) + throw new Error(); + const prefixNum = Number(prefix); + if (`${prefixNum}` !== prefix) + throw new Error(); + if (prefixNum < 0 || prefixNum > 128) + throw new Error(); + new URL(`http://[${address}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "cidrv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; + }); + __name(isValidBase64, "isValidBase64"); + $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => { + def.pattern ?? (def.pattern = base64); + $ZodStringFormat.init(inst, def); + inst._zod.bag.contentEncoding = "base64"; + inst._zod.check = (payload) => { + if (isValidBase64(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64", + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + __name(isValidBase64URL, "isValidBase64URL"); + $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => { + def.pattern ?? (def.pattern = base64url); + $ZodStringFormat.init(inst, def); + inst._zod.bag.contentEncoding = "base64url"; + inst._zod.check = (payload) => { + if (isValidBase64URL(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64url", + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => { + def.pattern ?? (def.pattern = e164); + $ZodStringFormat.init(inst, def); + }); + __name(isValidJWT, "isValidJWT"); + $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + if (isValidJWT(payload.value, def.alg)) + return; + payload.issues.push({ + code: "invalid_format", + format: "jwt", + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + if (def.fn(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: def.format, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = inst._zod.bag.pattern ?? number; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Number(payload.value); + } catch (_) { + } + const input = payload.value; + if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) { + return payload; + } + const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0; + payload.issues.push({ + expected: "number", + code: "invalid_type", + input, + inst, + ...received ? { received } : {} + }); + return payload; + }; + }); + $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst, def) => { + $ZodCheckNumberFormat.init(inst, def); + $ZodNumber.init(inst, def); + }); + $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = boolean; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Boolean(payload.value); + } catch (_) { + } + const input = payload.value; + if (typeof input === "boolean") + return payload; + payload.issues.push({ + expected: "boolean", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = bigint2; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = BigInt(payload.value); + } catch (_) { + } + if (typeof payload.value === "bigint") + return payload; + payload.issues.push({ + expected: "bigint", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; + }); + $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, def) => { + $ZodCheckBigIntFormat.init(inst, def); + $ZodBigInt.init(inst, def); + }); + $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "symbol") + return payload; + payload.issues.push({ + expected: "symbol", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = _undefined; + inst._zod.values = /* @__PURE__ */ new Set([void 0]); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "undefined", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = _null; + inst._zod.values = /* @__PURE__ */ new Set([null]); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input === null) + return payload; + payload.issues.push({ + expected: "null", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload) => payload; + }); + $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload) => payload; + }); + $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + payload.issues.push({ + expected: "never", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; + }); + $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "void", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) { + try { + payload.value = new Date(payload.value); + } catch (_err) { + } + } + const input = payload.value; + const isDate2 = input instanceof Date; + const isValidDate = isDate2 && !Number.isNaN(input.getTime()); + if (isValidDate) + return payload; + payload.issues.push({ + expected: "date", + code: "invalid_type", + input, + ...isDate2 ? { received: "Invalid Date" } : {}, + inst + }); + return payload; + }; + }); + __name(handleArrayResult, "handleArrayResult"); + $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + expected: "array", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = Array(input.length); + const proms = []; + for (let i2 = 0; i2 < input.length; i2++) { + const item = input[i2]; + const result = def.element._zod.run({ + value: item, + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleArrayResult(result2, payload, i2))); + } else { + handleArrayResult(result, payload, i2); + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; + }); + __name(handlePropertyResult, "handlePropertyResult"); + __name(normalizeDef, "normalizeDef"); + __name(handleCatchall, "handleCatchall"); + $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => { + $ZodType.init(inst, def); + const desc2 = Object.getOwnPropertyDescriptor(def, "shape"); + if (!desc2?.get) { + const sh = def.shape; + Object.defineProperty(def, "shape", { + get: () => { + const newSh = { ...sh }; + Object.defineProperty(def, "shape", { + value: newSh + }); + return newSh; + } + }); + } + const _normalized = cached(() => normalizeDef(def)); + defineLazy(inst._zod, "propValues", () => { + const shape = def.shape; + const propValues = {}; + for (const key in shape) { + const field = shape[key]._zod; + if (field.values) { + propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set()); + for (const v3 of field.values) + propValues[key].add(v3); + } + } + return propValues; + }); + const isObject5 = isObject3; + const catchall = def.catchall; + let value; + inst._zod.parse = (payload, ctx) => { + value ?? (value = _normalized.value); + const input = payload.value; + if (!isObject5(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = {}; + const proms = []; + const shape = value.shape; + for (const key of value.keys) { + const el = shape[key]; + const isOptionalOut = el._zod.optout === "optional"; + const r2 = el._zod.run({ value: input[key], issues: [] }, ctx); + if (r2 instanceof Promise) { + proms.push(r2.then((r3) => handlePropertyResult(r3, payload, key, input, isOptionalOut))); + } else { + handlePropertyResult(r2, payload, key, input, isOptionalOut); + } + } + if (!catchall) { + return proms.length ? Promise.all(proms).then(() => payload) : payload; + } + return handleCatchall(proms, input, payload, ctx, _normalized.value, inst); + }; + }); + $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => { + $ZodObject.init(inst, def); + const superParse = inst._zod.parse; + const _normalized = cached(() => normalizeDef(def)); + const generateFastpass = /* @__PURE__ */ __name((shape) => { + const doc = new Doc(["shape", "payload", "ctx"]); + const normalized = _normalized.value; + const parseStr = /* @__PURE__ */ __name((key) => { + const k2 = esc(key); + return `shape[${k2}]._zod.run({ value: input[${k2}], issues: [] }, ctx)`; + }, "parseStr"); + doc.write(`const input = payload.value;`); + const ids = /* @__PURE__ */ Object.create(null); + let counter = 0; + for (const key of normalized.keys) { + ids[key] = `key_${counter++}`; + } + doc.write(`const newResult = {};`); + for (const key of normalized.keys) { + const id = ids[key]; + const k2 = esc(key); + const schema = shape[key]; + const isOptionalOut = schema?._zod?.optout === "optional"; + doc.write(`const ${id} = ${parseStr(key)};`); + if (isOptionalOut) { + doc.write(` + if (${id}.issues.length) { + if (${k2} in input) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k2}, ...iss.path] : [${k2}] + }))); + } + } + + if (${id}.value === undefined) { + if (${k2} in input) { + newResult[${k2}] = undefined; + } + } else { + newResult[${k2}] = ${id}.value; + } + + `); + } else { + doc.write(` + if (${id}.issues.length) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k2}, ...iss.path] : [${k2}] + }))); + } + + if (${id}.value === undefined) { + if (${k2} in input) { + newResult[${k2}] = undefined; + } + } else { + newResult[${k2}] = ${id}.value; + } + + `); + } + } + doc.write(`payload.value = newResult;`); + doc.write(`return payload;`); + const fn = doc.compile(); + return (payload, ctx) => fn(shape, payload, ctx); + }, "generateFastpass"); + let fastpass; + const isObject5 = isObject3; + const jit = !globalConfig.jitless; + const allowsEval2 = allowsEval; + const fastEnabled = jit && allowsEval2.value; + const catchall = def.catchall; + let value; + inst._zod.parse = (payload, ctx) => { + value ?? (value = _normalized.value); + const input = payload.value; + if (!isObject5(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) { + if (!fastpass) + fastpass = generateFastpass(def.shape); + payload = fastpass(payload, ctx); + if (!catchall) + return payload; + return handleCatchall([], input, payload, ctx, value, inst); + } + return superParse(payload, ctx); + }; + }); + __name(handleUnionResults, "handleUnionResults"); + $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.options.some((o2) => o2._zod.optin === "optional") ? "optional" : void 0); + defineLazy(inst._zod, "optout", () => def.options.some((o2) => o2._zod.optout === "optional") ? "optional" : void 0); + defineLazy(inst._zod, "values", () => { + if (def.options.every((o2) => o2._zod.values)) { + return new Set(def.options.flatMap((option) => Array.from(option._zod.values))); + } + return void 0; + }); + defineLazy(inst._zod, "pattern", () => { + if (def.options.every((o2) => o2._zod.pattern)) { + const patterns = def.options.map((o2) => o2._zod.pattern); + return new RegExp(`^(${patterns.map((p2) => cleanRegex(p2.source)).join("|")})$`); + } + return void 0; + }); + const single = def.options.length === 1; + const first = def.options[0]._zod.run; + inst._zod.parse = (payload, ctx) => { + if (single) { + return first(payload, ctx); + } + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + if (result.issues.length === 0) + return result; + results.push(result); + } + } + if (!async) + return handleUnionResults(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleUnionResults(results2, payload, inst, ctx); + }); + }; + }); + __name(handleExclusiveUnionResults, "handleExclusiveUnionResults"); + $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => { + $ZodUnion.init(inst, def); + def.inclusive = false; + const single = def.options.length === 1; + const first = def.options[0]._zod.run; + inst._zod.parse = (payload, ctx) => { + if (single) { + return first(payload, ctx); + } + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + results.push(result); + } + } + if (!async) + return handleExclusiveUnionResults(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleExclusiveUnionResults(results2, payload, inst, ctx); + }); + }; + }); + $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => { + def.inclusive = false; + $ZodUnion.init(inst, def); + const _super = inst._zod.parse; + defineLazy(inst._zod, "propValues", () => { + const propValues = {}; + for (const option of def.options) { + const pv = option._zod.propValues; + if (!pv || Object.keys(pv).length === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`); + for (const [k2, v3] of Object.entries(pv)) { + if (!propValues[k2]) + propValues[k2] = /* @__PURE__ */ new Set(); + for (const val of v3) { + propValues[k2].add(val); + } + } + } + return propValues; + }); + const disc = cached(() => { + const opts = def.options; + const map2 = /* @__PURE__ */ new Map(); + for (const o2 of opts) { + const values = o2._zod.propValues?.[def.discriminator]; + if (!values || values.size === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o2)}"`); + for (const v3 of values) { + if (map2.has(v3)) { + throw new Error(`Duplicate discriminator value "${String(v3)}"`); + } + map2.set(v3, o2); + } + } + return map2; + }); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isObject3(input)) { + payload.issues.push({ + code: "invalid_type", + expected: "object", + input, + inst + }); + return payload; + } + const opt = disc.value.get(input?.[def.discriminator]); + if (opt) { + return opt._zod.run(payload, ctx); + } + if (def.unionFallback) { + return _super(payload, ctx); + } + payload.issues.push({ + code: "invalid_union", + errors: [], + note: "No matching discriminator", + discriminator: def.discriminator, + input, + path: [def.discriminator], + inst + }); + return payload; + }; + }); + $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + const left = def.left._zod.run({ value: input, issues: [] }, ctx); + const right = def.right._zod.run({ value: input, issues: [] }, ctx); + const async = left instanceof Promise || right instanceof Promise; + if (async) { + return Promise.all([left, right]).then(([left2, right2]) => { + return handleIntersectionResults(payload, left2, right2); + }); + } + return handleIntersectionResults(payload, left, right); + }; + }); + __name(mergeValues, "mergeValues"); + __name(handleIntersectionResults, "handleIntersectionResults"); + $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => { + $ZodType.init(inst, def); + const items = def.items; + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + input, + inst, + expected: "tuple", + code: "invalid_type" + }); + return payload; + } + payload.value = []; + const proms = []; + const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional"); + const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex; + if (!def.rest) { + const tooBig = input.length > items.length; + const tooSmall = input.length < optStart - 1; + if (tooBig || tooSmall) { + payload.issues.push({ + ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length }, + input, + inst, + origin: "array" + }); + return payload; + } + } + let i2 = -1; + for (const item of items) { + i2++; + if (i2 >= input.length) { + if (i2 >= optStart) + continue; + } + const result = item._zod.run({ + value: input[i2], + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleTupleResult(result2, payload, i2))); + } else { + handleTupleResult(result, payload, i2); + } + } + if (def.rest) { + const rest = input.slice(items.length); + for (const el of rest) { + i2++; + const result = def.rest._zod.run({ + value: el, + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleTupleResult(result2, payload, i2))); + } else { + handleTupleResult(result, payload, i2); + } + } + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; + }); + __name(handleTupleResult, "handleTupleResult"); + $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isPlainObject2(input)) { + payload.issues.push({ + expected: "record", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + const values = def.keyType._zod.values; + if (values) { + payload.value = {}; + const recordKeys = /* @__PURE__ */ new Set(); + for (const key of values) { + if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") { + recordKeys.add(typeof key === "number" ? key.toString() : key); + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues(key, result2.issues)); + } + payload.value[key] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues(key, result.issues)); + } + payload.value[key] = result.value; + } + } + } + let unrecognized; + for (const key in input) { + if (!recordKeys.has(key)) { + unrecognized = unrecognized ?? []; + unrecognized.push(key); + } + } + if (unrecognized && unrecognized.length > 0) { + payload.issues.push({ + code: "unrecognized_keys", + input, + inst, + keys: unrecognized + }); + } + } else { + payload.value = {}; + for (const key of Reflect.ownKeys(input)) { + if (key === "__proto__") + continue; + let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + if (keyResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + const checkNumericKey = typeof key === "string" && number.test(key) && keyResult.issues.length; + if (checkNumericKey) { + const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx); + if (retryResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + if (retryResult.issues.length === 0) { + keyResult = retryResult; + } + } + if (keyResult.issues.length) { + if (def.mode === "loose") { + payload.value[key] = input[key]; + } else { + payload.issues.push({ + code: "invalid_key", + origin: "record", + issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config2())), + input: key, + path: [key], + inst + }); + } + continue; + } + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues(key, result2.issues)); + } + payload.value[keyResult.value] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues(key, result.issues)); + } + payload.value[keyResult.value] = result.value; + } + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; + }); + $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Map)) { + payload.issues.push({ + expected: "map", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Map(); + for (const [key, value] of input) { + const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx); + if (keyResult instanceof Promise || valueResult instanceof Promise) { + proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => { + handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx); + })); + } else { + handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx); + } + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; + }); + __name(handleMapResult, "handleMapResult"); + $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Set)) { + payload.issues.push({ + input, + inst, + expected: "set", + code: "invalid_type" + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Set(); + for (const item of input) { + const result = def.valueType._zod.run({ value: item, issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleSetResult(result2, payload))); + } else + handleSetResult(result, payload); + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; + }); + __name(handleSetResult, "handleSetResult"); + $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => { + $ZodType.init(inst, def); + const values = getEnumValues(def.entries); + const valuesSet = new Set(values); + inst._zod.values = valuesSet; + inst._zod.pattern = new RegExp(`^(${values.filter((k2) => propertyKeyTypes.has(typeof k2)).map((o2) => typeof o2 === "string" ? escapeRegex(o2) : o2.toString()).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (valuesSet.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values, + input, + inst + }); + return payload; + }; + }); + $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => { + $ZodType.init(inst, def); + if (def.values.length === 0) { + throw new Error("Cannot create literal schema with no valid values"); + } + const values = new Set(def.values); + inst._zod.values = values; + inst._zod.pattern = new RegExp(`^(${def.values.map((o2) => typeof o2 === "string" ? escapeRegex(o2) : o2 ? escapeRegex(o2.toString()) : String(o2)).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (values.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values: def.values, + input, + inst + }); + return payload; + }; + }); + $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input instanceof File) + return payload; + payload.issues.push({ + expected: "file", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } + const _out = def.transform(payload.value, payload); + if (ctx.async) { + const output = _out instanceof Promise ? _out : Promise.resolve(_out); + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + if (_out instanceof Promise) { + throw new $ZodAsyncError(); + } + payload.value = _out; + return payload; + }; + }); + __name(handleOptionalResult, "handleOptionalResult"); + $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + defineLazy(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0; + }); + defineLazy(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (def.innerType._zod.optin === "optional") { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) + return result.then((r2) => handleOptionalResult(r2, payload.value)); + return handleOptionalResult(result, payload.value); + } + if (payload.value === void 0) { + return payload; + } + return def.innerType._zod.run(payload, ctx); + }; + }); + $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (inst, def) => { + $ZodOptional.init(inst, def); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern); + inst._zod.parse = (payload, ctx) => { + return def.innerType._zod.run(payload, ctx); + }; + }); + $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0; + }); + defineLazy(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (payload.value === null) + return payload; + return def.innerType._zod.run(payload, ctx); + }; + }); + $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + return payload; + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleDefaultResult(result2, def)); + } + return handleDefaultResult(result, def); + }; + }); + __name(handleDefaultResult, "handleDefaultResult"); + $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return def.innerType._zod.run(payload, ctx); + }; + }); + $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => { + const v3 = def.innerType._zod.values; + return v3 ? new Set([...v3].filter((x2) => x2 !== void 0)) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleNonOptionalResult(result2, inst)); + } + return handleNonOptionalResult(result, inst); + }; + }); + __name(handleNonOptionalResult, "handleNonOptionalResult"); + $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError("ZodSuccess"); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.issues.length === 0; + return payload; + }); + } + payload.value = result.issues.length === 0; + return payload; + }; + }); + $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.value; + if (result2.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config2())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }); + } + payload.value = result.value; + if (result.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config2())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }; + }); + $ZodNaN = /* @__PURE__ */ $constructor("$ZodNaN", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + expected: "nan", + code: "invalid_type" + }); + return payload; + } + return payload; + }; + }); + $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => def.in._zod.values); + defineLazy(inst._zod, "optin", () => def.in._zod.optin); + defineLazy(inst._zod, "optout", () => def.out._zod.optout); + defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handlePipeResult(right2, def.in, ctx)); + } + return handlePipeResult(right, def.in, ctx); + } + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handlePipeResult(left2, def.out, ctx)); + } + return handlePipeResult(left, def.out, ctx); + }; + }); + __name(handlePipeResult, "handlePipeResult"); + $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => def.in._zod.values); + defineLazy(inst._zod, "optin", () => def.in._zod.optin); + defineLazy(inst._zod, "optout", () => def.out._zod.optout); + defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handleCodecAResult(left2, def, ctx)); + } + return handleCodecAResult(left, def, ctx); + } else { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handleCodecAResult(right2, def, ctx)); + } + return handleCodecAResult(right, def, ctx); + } + }; + }); + __name(handleCodecAResult, "handleCodecAResult"); + __name(handleCodecTxResult, "handleCodecTxResult"); + $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin); + defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then(handleReadonlyResult); + } + return handleReadonlyResult(result); + }; + }); + __name(handleReadonlyResult, "handleReadonlyResult"); + $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (inst, def) => { + $ZodType.init(inst, def); + const regexParts = []; + for (const part of def.parts) { + if (typeof part === "object" && part !== null) { + if (!part._zod.pattern) { + throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`); + } + const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern; + if (!source) + throw new Error(`Invalid template literal part: ${part._zod.traits}`); + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + regexParts.push(source.slice(start, end)); + } else if (part === null || primitiveTypes.has(typeof part)) { + regexParts.push(escapeRegex(`${part}`)); + } else { + throw new Error(`Invalid template literal part: ${part}`); + } + } + inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "string") { + payload.issues.push({ + input: payload.value, + inst, + expected: "string", + code: "invalid_type" + }); + return payload; + } + inst._zod.pattern.lastIndex = 0; + if (!inst._zod.pattern.test(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + code: "invalid_format", + format: def.format ?? "template_literal", + pattern: inst._zod.pattern.source + }); + return payload; + } + return payload; + }; + }); + $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => { + $ZodType.init(inst, def); + inst._def = def; + inst._zod.def = def; + inst.implement = (func) => { + if (typeof func !== "function") { + throw new Error("implement() must be called with a function"); + } + return function(...args) { + const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args; + const result = Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return parse(inst._def.output, result); + } + return result; + }; + }; + inst.implementAsync = (func) => { + if (typeof func !== "function") { + throw new Error("implementAsync() must be called with a function"); + } + return async function(...args) { + const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args; + const result = await Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return await parseAsync(inst._def.output, result); + } + return result; + }; + }; + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "function") { + payload.issues.push({ + code: "invalid_type", + expected: "function", + input: payload.value, + inst + }); + return payload; + } + const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise"; + if (hasPromiseOutput) { + payload.value = inst.implementAsync(payload.value); + } else { + payload.value = inst.implement(payload.value); + } + return payload; + }; + inst.input = (...args) => { + const F2 = inst.constructor; + if (Array.isArray(args[0])) { + return new F2({ + type: "function", + input: new $ZodTuple({ + type: "tuple", + items: args[0], + rest: args[1] + }), + output: inst._def.output + }); + } + return new F2({ + type: "function", + input: args[0], + output: inst._def.output + }); + }; + inst.output = (output) => { + const F2 = inst.constructor; + return new F2({ + type: "function", + input: inst._def.input, + output + }); + }; + return inst; + }); + $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx)); + }; + }); + $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "innerType", () => def.getter()); + defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern); + defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues); + defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0); + defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0); + inst._zod.parse = (payload, ctx) => { + const inner = inst._zod.innerType; + return inner._zod.run(payload, ctx); + }; + }); + $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => { + $ZodCheck.init(inst, def); + $ZodType.init(inst, def); + inst._zod.parse = (payload, _) => { + return payload; + }; + inst._zod.check = (payload) => { + const input = payload.value; + const r2 = def.fn(input); + if (r2 instanceof Promise) { + return r2.then((r3) => handleRefineResult(r3, payload, input, inst)); + } + handleRefineResult(r2, payload, input, inst); + return; + }; + }); + __name(handleRefineResult, "handleRefineResult"); + } +}); + +// ../../node_modules/zod/v4/locales/ar.js +function ar_default() { + return { + localeError: error3() + }; +} +var error3; +var init_ar = __esm({ + "../../node_modules/zod/v4/locales/ar.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error3 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + file: { unit: "\u0628\u0627\u064A\u062A", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + array: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + set: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0645\u062F\u062E\u0644", + email: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A", + url: "\u0631\u0627\u0628\u0637", + emoji: "\u0625\u064A\u0645\u0648\u062C\u064A", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + date: "\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + time: "\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + duration: "\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + ipv4: "\u0639\u0646\u0648\u0627\u0646 IPv4", + ipv6: "\u0639\u0646\u0648\u0627\u0646 IPv6", + cidrv4: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4", + cidrv6: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6", + base64: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded", + base64url: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded", + json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON", + e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164", + jwt: "JWT", + template_literal: "\u0645\u062F\u062E\u0644" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${issue2.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; + } + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`; + return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue2.prefix}"`; + if (_issue.format === "ends_with") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`; + } + case "not_multiple_of": + return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue2.divisor}`; + case "unrecognized_keys": + return `\u0645\u0639\u0631\u0641${issue2.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue2.keys.length > 1 ? "\u0629" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; + case "invalid_key": + return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; + case "invalid_union": + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; + case "invalid_element": + return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; + default: + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; + } + }; + }, "error"); + __name(ar_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/az.js +function az_default() { + return { + localeError: error4() + }; +} +var error4; +var init_az = __esm({ + "../../node_modules/zod/v4/locales/az.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error4 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "element", verb: "olmal\u0131d\u0131r" }, + set: { unit: "element", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${issue2.expected}, daxil olan ${received}`; + } + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${expected}, daxil olan ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive(issue2.values[0])}`; + return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`; + if (_issue.format === "ends_with") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.suffix}" il\u0259 bitm\u0259lidir`; + if (_issue.format === "includes") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.includes}" daxil olmal\u0131d\u0131r`; + if (_issue.format === "regex") + return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`; + return `Yanl\u0131\u015F ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Yanl\u0131\u015F \u0259d\u0259d: ${issue2.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; + case "unrecognized_keys": + return `Tan\u0131nmayan a\xE7ar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; + case "invalid_union": + return "Yanl\u0131\u015F d\u0259y\u0259r"; + case "invalid_element": + return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; + default: + return `Yanl\u0131\u015F d\u0259y\u0259r`; + } + }; + }, "error"); + __name(az_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/be.js +function getBelarusianPlural(count4, one, few, many) { + const absCount = Math.abs(count4); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; + } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; +} +function be_default() { + return { + localeError: error5() + }; +} +var error5; +var init_be = __esm({ + "../../node_modules/zod/v4/locales/be.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + __name(getBelarusianPlural, "getBelarusianPlural"); + error5 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0456\u043C\u0432\u0430\u043B", + few: "\u0441\u0456\u043C\u0432\u0430\u043B\u044B", + many: "\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u044B", + many: "\u0431\u0430\u0439\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0443\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0430\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0447\u0430\u0441", + duration: "ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0430\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0430\u0441", + cidrv4: "IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + base64: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64", + base64url: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url", + json_string: "JSON \u0440\u0430\u0434\u043E\u043A", + e164: "\u043D\u0443\u043C\u0430\u0440 E.164", + jwt: "JWT", + template_literal: "\u0443\u0432\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u043B\u0456\u043A", + array: "\u043C\u0430\u0441\u0456\u045E" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${issue2.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; + } + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const maxValue = Number(issue2.maximum); + const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.maximum.toString()} ${unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const minValue = Number(issue2.minimum); + const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.minimum.toString()} ${unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue2.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"; + case "invalid_element": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue2.origin}`; + default: + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`; + } + }; + }, "error"); + __name(be_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/bg.js +function bg_default() { + return { + localeError: error6() + }; +} +var error6; +var init_bg = __esm({ + "../../node_modules/zod/v4/locales/bg.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error6 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0432\u0445\u043E\u0434", + email: "\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u0435\u043C\u043E\u0434\u0436\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + base64url: "base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + json_string: "JSON \u043D\u0438\u0437", + e164: "E.164 \u043D\u043E\u043C\u0435\u0440", + jwt: "JWT", + template_literal: "\u0432\u0445\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0438\u0432" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; + } + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`; + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`; + let invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D"; + if (_issue.format === "emoji") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "datetime") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "date") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + if (_issue.format === "time") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "duration") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue2.keys.length > 1 ? "\u0438" : ""} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u043E\u0432\u0435" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"; + case "invalid_element": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue2.origin}`; + default: + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`; + } + }; + }, "error"); + __name(bg_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ca.js +function ca_default() { + return { + localeError: error7() + }; +} +var error7; +var init_ca = __esm({ + "../../node_modules/zod/v4/locales/ca.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error7 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "car\xE0cters", verb: "contenir" }, + file: { unit: "bytes", verb: "contenir" }, + array: { unit: "elements", verb: "contenir" }, + set: { unit: "elements", verb: "contenir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "entrada", + email: "adre\xE7a electr\xF2nica", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "durada ISO", + ipv4: "adre\xE7a IPv4", + ipv6: "adre\xE7a IPv6", + cidrv4: "rang IPv4", + cidrv6: "rang IPv6", + base64: "cadena codificada en base64", + base64url: "cadena codificada en base64url", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Tipus inv\xE0lid: s'esperava instanceof ${issue2.expected}, s'ha rebut ${received}`; + } + return `Tipus inv\xE0lid: s'esperava ${expected}, s'ha rebut ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive(issue2.values[0])}`; + return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues(issue2.values, " o ")}`; + case "too_big": { + const adj = issue2.inclusive ? "com a m\xE0xim" : "menys de"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} contingu\xE9s ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} fos ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "com a m\xEDnim" : "m\xE9s de"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Massa petit: s'esperava que ${issue2.origin} contingu\xE9s ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Massa petit: s'esperava que ${issue2.origin} fos ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Format inv\xE0lid: ha d'acabar amb "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Format inv\xE0lid: ha d'incloure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${_issue.pattern}`; + return `Format inv\xE0lid per a ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Clau${issue2.keys.length > 1 ? "s" : ""} no reconeguda${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Clau inv\xE0lida a ${issue2.origin}`; + case "invalid_union": + return "Entrada inv\xE0lida"; + case "invalid_element": + return `Element inv\xE0lid a ${issue2.origin}`; + default: + return `Entrada inv\xE0lida`; + } + }; + }, "error"); + __name(ca_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/cs.js +function cs_default() { + return { + localeError: error8() + }; +} +var error8; +var init_cs = __esm({ + "../../node_modules/zod/v4/locales/cs.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error8 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "znak\u016F", verb: "m\xEDt" }, + file: { unit: "bajt\u016F", verb: "m\xEDt" }, + array: { unit: "prvk\u016F", verb: "m\xEDt" }, + set: { unit: "prvk\u016F", verb: "m\xEDt" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "regul\xE1rn\xED v\xFDraz", + email: "e-mailov\xE1 adresa", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "datum a \u010Das ve form\xE1tu ISO", + date: "datum ve form\xE1tu ISO", + time: "\u010Das ve form\xE1tu ISO", + duration: "doba trv\xE1n\xED ISO", + ipv4: "IPv4 adresa", + ipv6: "IPv6 adresa", + cidrv4: "rozsah IPv4", + cidrv6: "rozsah IPv6", + base64: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64", + base64url: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url", + json_string: "\u0159et\u011Bzec ve form\xE1tu JSON", + e164: "\u010D\xEDslo E.164", + jwt: "JWT", + template_literal: "vstup" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u010D\xEDslo", + string: "\u0159et\u011Bzec", + function: "funkce", + array: "pole" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${issue2.expected}, obdr\u017Eeno ${received}`; + } + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${expected}, obdr\u017Eeno ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive(issue2.values[0])}`; + return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${_issue.pattern}`; + return `Neplatn\xFD form\xE1t ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue2.divisor}`; + case "unrecognized_keys": + return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Neplatn\xFD kl\xED\u010D v ${issue2.origin}`; + case "invalid_union": + return "Neplatn\xFD vstup"; + case "invalid_element": + return `Neplatn\xE1 hodnota v ${issue2.origin}`; + default: + return `Neplatn\xFD vstup`; + } + }; + }, "error"); + __name(cs_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/da.js +function da_default() { + return { + localeError: error9() + }; +} +var error9; +var init_da = __esm({ + "../../node_modules/zod/v4/locales/da.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error9 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "tegn", verb: "havde" }, + file: { unit: "bytes", verb: "havde" }, + array: { unit: "elementer", verb: "indeholdt" }, + set: { unit: "elementer", verb: "indeholdt" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "e-mailadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkesl\xE6t", + date: "ISO-dato", + time: "ISO-klokkesl\xE6t", + duration: "ISO-varighed", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodet streng", + base64url: "base64url-kodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + string: "streng", + number: "tal", + boolean: "boolean", + array: "liste", + object: "objekt", + set: "s\xE6t", + file: "fil" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ugyldigt input: forventede instanceof ${issue2.expected}, fik ${received}`; + } + return `Ugyldigt input: forventede ${expected}, fik ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ugyldig v\xE6rdi: forventede ${stringifyPrimitive(issue2.values[0])}`; + return `Ugyldigt valg: forventede en af f\xF8lgende ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + if (sizing) + return `For stor: forventede ${origin2 ?? "value"} ${sizing.verb} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor: forventede ${origin2 ?? "value"} havde ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + if (sizing) { + return `For lille: forventede ${origin2} ${sizing.verb} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `For lille: forventede ${origin2} havde ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ugyldig streng: skal starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: skal ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: skal indeholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: skal matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ugyldigt tal: skal v\xE6re deleligt med ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ukendte n\xF8gler" : "Ukendt n\xF8gle"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8gle i ${issue2.origin}`; + case "invalid_union": + return "Ugyldigt input: matcher ingen af de tilladte typer"; + case "invalid_element": + return `Ugyldig v\xE6rdi i ${issue2.origin}`; + default: + return `Ugyldigt input`; + } + }; + }, "error"); + __name(da_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/de.js +function de_default() { + return { + localeError: error10() + }; +} +var error10; +var init_de = __esm({ + "../../node_modules/zod/v4/locales/de.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error10 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "Zeichen", verb: "zu haben" }, + file: { unit: "Bytes", verb: "zu haben" }, + array: { unit: "Elemente", verb: "zu haben" }, + set: { unit: "Elemente", verb: "zu haben" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "Eingabe", + email: "E-Mail-Adresse", + url: "URL", + emoji: "Emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-Datum und -Uhrzeit", + date: "ISO-Datum", + time: "ISO-Uhrzeit", + duration: "ISO-Dauer", + ipv4: "IPv4-Adresse", + ipv6: "IPv6-Adresse", + cidrv4: "IPv4-Bereich", + cidrv6: "IPv6-Bereich", + base64: "Base64-codierter String", + base64url: "Base64-URL-codierter String", + json_string: "JSON-String", + e164: "E.164-Nummer", + jwt: "JWT", + template_literal: "Eingabe" + }; + const TypeDictionary = { + nan: "NaN", + number: "Zahl", + array: "Array" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ung\xFCltige Eingabe: erwartet instanceof ${issue2.expected}, erhalten ${received}`; + } + return `Ung\xFCltige Eingabe: erwartet ${expected}, erhalten ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive(issue2.values[0])}`; + return `Ung\xFCltige Option: erwartet eine von ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; + return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ist`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} hat`; + } + return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ist`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`; + if (_issue.format === "ends_with") + return `Ung\xFCltiger String: muss mit "${_issue.suffix}" enden`; + if (_issue.format === "includes") + return `Ung\xFCltiger String: muss "${_issue.includes}" enthalten`; + if (_issue.format === "regex") + return `Ung\xFCltiger String: muss dem Muster ${_issue.pattern} entsprechen`; + return `Ung\xFCltig: ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue2.divisor} sein`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ung\xFCltiger Schl\xFCssel in ${issue2.origin}`; + case "invalid_union": + return "Ung\xFCltige Eingabe"; + case "invalid_element": + return `Ung\xFCltiger Wert in ${issue2.origin}`; + default: + return `Ung\xFCltige Eingabe`; + } + }; + }, "error"); + __name(de_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/en.js +function en_default() { + return { + localeError: error11() + }; +} +var error11; +var init_en = __esm({ + "../../node_modules/zod/v4/locales/en.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error11 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "characters", verb: "to have" }, + file: { unit: "bytes", verb: "to have" }, + array: { unit: "items", verb: "to have" }, + set: { unit: "items", verb: "to have" }, + map: { unit: "entries", verb: "to have" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + mac: "MAC address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + // Compatibility: "nan" -> "NaN" for display + nan: "NaN" + // All other type names omitted - they fall back to raw values via ?? operator + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + return `Invalid input: expected ${expected}, received ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; + return `Invalid option: expected one of ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Too big: expected ${issue2.origin ?? "value"} to have ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Too big: expected ${issue2.origin ?? "value"} to be ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Too small: expected ${issue2.origin} to have ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Too small: expected ${issue2.origin} to be ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Invalid string: must start with "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Invalid string: must end with "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Invalid string: must include "${_issue.includes}"`; + if (_issue.format === "regex") + return `Invalid string: must match pattern ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Invalid number: must be a multiple of ${issue2.divisor}`; + case "unrecognized_keys": + return `Unrecognized key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Invalid key in ${issue2.origin}`; + case "invalid_union": + return "Invalid input"; + case "invalid_element": + return `Invalid value in ${issue2.origin}`; + default: + return `Invalid input`; + } + }; + }, "error"); + __name(en_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/eo.js +function eo_default() { + return { + localeError: error12() + }; +} +var error12; +var init_eo = __esm({ + "../../node_modules/zod/v4/locales/eo.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error12 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "karaktrojn", verb: "havi" }, + file: { unit: "bajtojn", verb: "havi" }, + array: { unit: "elementojn", verb: "havi" }, + set: { unit: "elementojn", verb: "havi" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "enigo", + email: "retadreso", + url: "URL", + emoji: "emo\u011Dio", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datotempo", + date: "ISO-dato", + time: "ISO-tempo", + duration: "ISO-da\u016Dro", + ipv4: "IPv4-adreso", + ipv6: "IPv6-adreso", + cidrv4: "IPv4-rango", + cidrv6: "IPv6-rango", + base64: "64-ume kodita karaktraro", + base64url: "URL-64-ume kodita karaktraro", + json_string: "JSON-karaktraro", + e164: "E.164-nombro", + jwt: "JWT", + template_literal: "enigo" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombro", + array: "tabelo", + null: "senvalora" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Nevalida enigo: atendi\u011Dis instanceof ${issue2.expected}, ricevi\u011Dis ${received}`; + } + return `Nevalida enigo: atendi\u011Dis ${expected}, ricevi\u011Dis ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive(issue2.values[0])}`; + return `Nevalida opcio: atendi\u011Dis unu el ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementojn"}`; + return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} havu ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} estu ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nevalida karaktraro: devas fini\u011Di per "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`; + return `Nevalida ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Nevalida nombro: devas esti oblo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Nekonata${issue2.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue2.keys.length > 1 ? "j" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Nevalida \u015Dlosilo en ${issue2.origin}`; + case "invalid_union": + return "Nevalida enigo"; + case "invalid_element": + return `Nevalida valoro en ${issue2.origin}`; + default: + return `Nevalida enigo`; + } + }; + }, "error"); + __name(eo_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/es.js +function es_default() { + return { + localeError: error13() + }; +} +var error13; +var init_es = __esm({ + "../../node_modules/zod/v4/locales/es.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error13 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caracteres", verb: "tener" }, + file: { unit: "bytes", verb: "tener" }, + array: { unit: "elementos", verb: "tener" }, + set: { unit: "elementos", verb: "tener" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "entrada", + email: "direcci\xF3n de correo electr\xF3nico", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "fecha y hora ISO", + date: "fecha ISO", + time: "hora ISO", + duration: "duraci\xF3n ISO", + ipv4: "direcci\xF3n IPv4", + ipv6: "direcci\xF3n IPv6", + cidrv4: "rango IPv4", + cidrv6: "rango IPv6", + base64: "cadena codificada en base64", + base64url: "URL codificada en base64", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN", + string: "texto", + number: "n\xFAmero", + boolean: "booleano", + array: "arreglo", + object: "objeto", + set: "conjunto", + file: "archivo", + date: "fecha", + bigint: "n\xFAmero grande", + symbol: "s\xEDmbolo", + undefined: "indefinido", + null: "nulo", + function: "funci\xF3n", + map: "mapa", + record: "registro", + tuple: "tupla", + enum: "enumeraci\xF3n", + union: "uni\xF3n", + literal: "literal", + promise: "promesa", + void: "vac\xEDo", + never: "nunca", + unknown: "desconocido", + any: "cualquiera" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Entrada inv\xE1lida: se esperaba instanceof ${issue2.expected}, recibido ${received}`; + } + return `Entrada inv\xE1lida: se esperaba ${expected}, recibido ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive(issue2.values[0])}`; + return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + if (sizing) + return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} tuviera ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} fuera ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + if (sizing) { + return `Demasiado peque\xF1o: se esperaba que ${origin2} tuviera ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Demasiado peque\xF1o: se esperaba que ${origin2} fuera ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cadena inv\xE1lida: debe terminar en "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cadena inv\xE1lida: debe incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${_issue.pattern}`; + return `Inv\xE1lido ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Llave${issue2.keys.length > 1 ? "s" : ""} desconocida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Llave inv\xE1lida en ${TypeDictionary[issue2.origin] ?? issue2.origin}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido en ${TypeDictionary[issue2.origin] ?? issue2.origin}`; + default: + return `Entrada inv\xE1lida`; + } + }; + }, "error"); + __name(es_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/fa.js +function fa_default() { + return { + localeError: error14() + }; +} +var error14; +var init_fa = __esm({ + "../../node_modules/zod/v4/locales/fa.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error14 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + array: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + set: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0648\u0631\u0648\u062F\u06CC", + email: "\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644", + url: "URL", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + date: "\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648", + time: "\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + duration: "\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + ipv4: "IPv4 \u0622\u062F\u0631\u0633", + ipv6: "IPv6 \u0622\u062F\u0631\u0633", + cidrv4: "IPv4 \u062F\u0627\u0645\u0646\u0647", + cidrv6: "IPv6 \u062F\u0627\u0645\u0646\u0647", + base64: "base64-encoded \u0631\u0634\u062A\u0647", + base64url: "base64url-encoded \u0631\u0634\u062A\u0647", + json_string: "JSON \u0631\u0634\u062A\u0647", + e164: "E.164 \u0639\u062F\u062F", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u06CC" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0639\u062F\u062F", + array: "\u0622\u0631\u0627\u06CC\u0647" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${issue2.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + } + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + } + case "invalid_value": + if (issue2.values.length === 1) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive(issue2.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`; + } + return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues(issue2.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0628\u0627\u0634\u062F`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0628\u0627\u0634\u062F`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`; + } + if (_issue.format === "ends_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`; + } + if (_issue.format === "includes") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${_issue.includes}" \u0628\u0627\u0634\u062F`; + } + if (_issue.format === "regex") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`; + } + return `${FormatDictionary[_issue.format] ?? issue2.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + } + case "not_multiple_of": + return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue2.divisor} \u0628\u0627\u0634\u062F`; + case "unrecognized_keys": + return `\u06A9\u0644\u06CC\u062F${issue2.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue2.origin}`; + case "invalid_union": + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + case "invalid_element": + return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue2.origin}`; + default: + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + } + }; + }, "error"); + __name(fa_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/fi.js +function fi_default() { + return { + localeError: error15() + }; +} +var error15; +var init_fi = __esm({ + "../../node_modules/zod/v4/locales/fi.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error15 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "merkki\xE4", subject: "merkkijonon" }, + file: { unit: "tavua", subject: "tiedoston" }, + array: { unit: "alkiota", subject: "listan" }, + set: { unit: "alkiota", subject: "joukon" }, + number: { unit: "", subject: "luvun" }, + bigint: { unit: "", subject: "suuren kokonaisluvun" }, + int: { unit: "", subject: "kokonaisluvun" }, + date: { unit: "", subject: "p\xE4iv\xE4m\xE4\xE4r\xE4n" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "s\xE4\xE4nn\xF6llinen lauseke", + email: "s\xE4hk\xF6postiosoite", + url: "URL-osoite", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-aikaleima", + date: "ISO-p\xE4iv\xE4m\xE4\xE4r\xE4", + time: "ISO-aika", + duration: "ISO-kesto", + ipv4: "IPv4-osoite", + ipv6: "IPv6-osoite", + cidrv4: "IPv4-alue", + cidrv6: "IPv6-alue", + base64: "base64-koodattu merkkijono", + base64url: "base64url-koodattu merkkijono", + json_string: "JSON-merkkijono", + e164: "E.164-luku", + jwt: "JWT", + template_literal: "templaattimerkkijono" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Virheellinen tyyppi: odotettiin instanceof ${issue2.expected}, oli ${received}`; + } + return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive(issue2.values[0])}`; + return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.maximum.toString()} ${sizing.unit}`.trim(); + } + return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.minimum.toString()} ${sizing.unit}`.trim(); + } + return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Virheellinen sy\xF6te: t\xE4ytyy loppua "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${_issue.includes}"`; + if (_issue.format === "regex") { + return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`; + } + return `Virheellinen ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Virheellinen luku: t\xE4ytyy olla luvun ${issue2.divisor} monikerta`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return "Virheellinen avain tietueessa"; + case "invalid_union": + return "Virheellinen unioni"; + case "invalid_element": + return "Virheellinen arvo joukossa"; + default: + return `Virheellinen sy\xF6te`; + } + }; + }, "error"); + __name(fi_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/fr.js +function fr_default() { + return { + localeError: error16() + }; +} +var error16; +var init_fr = __esm({ + "../../node_modules/zod/v4/locales/fr.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error16 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "entr\xE9e", + email: "adresse e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date et heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombre", + array: "tableau" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Entr\xE9e invalide : instanceof ${issue2.expected} attendu, ${received} re\xE7u`; + } + return `Entr\xE9e invalide : ${expected} attendu, ${received} re\xE7u`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Entr\xE9e invalide : ${stringifyPrimitive(issue2.values[0])} attendu`; + return `Option invalide : une valeur parmi ${joinValues(issue2.values, "|")} attendue`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; + return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue2.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue2.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; + }, "error"); + __name(fr_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/fr-CA.js +function fr_CA_default() { + return { + localeError: error17() + }; +} +var error17; +var init_fr_CA = __esm({ + "../../node_modules/zod/v4/locales/fr-CA.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error17 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "entr\xE9e", + email: "adresse courriel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date-heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Entr\xE9e invalide : attendu instanceof ${issue2.expected}, re\xE7u ${received}`; + } + return `Entr\xE9e invalide : attendu ${expected}, re\xE7u ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Entr\xE9e invalide : attendu ${stringifyPrimitive(issue2.values[0])}`; + return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "\u2264" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} ait ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} soit ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u2265" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Trop petit : attendu que ${issue2.origin} ait ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : attendu que ${issue2.origin} soit ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue2.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue2.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; + }, "error"); + __name(fr_CA_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/he.js +function he_default() { + return { + localeError: error18() + }; +} +var error18; +var init_he = __esm({ + "../../node_modules/zod/v4/locales/he.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error18 = /* @__PURE__ */ __name(() => { + const TypeNames = { + string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" }, + number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" }, + boolean: { label: "\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9", gender: "m" }, + bigint: { label: "BigInt", gender: "m" }, + date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA", gender: "m" }, + array: { label: "\u05DE\u05E2\u05E8\u05DA", gender: "m" }, + object: { label: "\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8", gender: "m" }, + null: { label: "\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)", gender: "m" }, + undefined: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)", gender: "m" }, + symbol: { label: "\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)", gender: "m" }, + function: { label: "\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4", gender: "f" }, + map: { label: "\u05DE\u05E4\u05D4 (Map)", gender: "f" }, + set: { label: "\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)", gender: "f" }, + file: { label: "\u05E7\u05D5\u05D1\u05E5", gender: "m" }, + promise: { label: "Promise", gender: "m" }, + NaN: { label: "NaN", gender: "m" }, + unknown: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2", gender: "m" }, + value: { label: "\u05E2\u05E8\u05DA", gender: "m" } + }; + const Sizable = { + string: { unit: "\u05EA\u05D5\u05D5\u05D9\u05DD", shortLabel: "\u05E7\u05E6\u05E8", longLabel: "\u05D0\u05E8\u05D5\u05DA" }, + file: { unit: "\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" } + // no unit + }; + const typeEntry = /* @__PURE__ */ __name((t9) => t9 ? TypeNames[t9] : void 0, "typeEntry"); + const typeLabel = /* @__PURE__ */ __name((t9) => { + const e2 = typeEntry(t9); + if (e2) + return e2.label; + return t9 ?? TypeNames.unknown.label; + }, "typeLabel"); + const withDefinite = /* @__PURE__ */ __name((t9) => `\u05D4${typeLabel(t9)}`, "withDefinite"); + const verbFor = /* @__PURE__ */ __name((t9) => { + const e2 = typeEntry(t9); + const gender = e2?.gender ?? "m"; + return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"; + }, "verbFor"); + const getSizing = /* @__PURE__ */ __name((origin2) => { + if (!origin2) + return null; + return Sizable[origin2] ?? null; + }, "getSizing"); + const FormatDictionary = { + regex: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + email: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC", gender: "f" }, + url: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA", gender: "f" }, + emoji: { label: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9", gender: "m" }, + uuid: { label: "UUID", gender: "m" }, + nanoid: { label: "nanoid", gender: "m" }, + guid: { label: "GUID", gender: "m" }, + cuid: { label: "cuid", gender: "m" }, + cuid2: { label: "cuid2", gender: "m" }, + ulid: { label: "ULID", gender: "m" }, + xid: { label: "XID", gender: "m" }, + ksuid: { label: "KSUID", gender: "m" }, + datetime: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO", gender: "m" }, + date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA ISO", gender: "m" }, + time: { label: "\u05D6\u05DE\u05DF ISO", gender: "m" }, + duration: { label: "\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO", gender: "m" }, + ipv4: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv4", gender: "f" }, + ipv6: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv6", gender: "f" }, + cidrv4: { label: "\u05D8\u05D5\u05D5\u05D7 IPv4", gender: "m" }, + cidrv6: { label: "\u05D8\u05D5\u05D5\u05D7 IPv6", gender: "m" }, + base64: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64", gender: "f" }, + base64url: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA", gender: "f" }, + json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" }, + e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" }, + jwt: { label: "JWT", gender: "m" }, + ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + includes: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + lowercase: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + starts_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + uppercase: { label: "\u05E7\u05DC\u05D8", gender: "m" } + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expectedKey = issue2.expected; + const expected = TypeDictionary[expectedKey ?? ""] ?? typeLabel(expectedKey); + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue2.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; + } + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; + } + case "invalid_value": { + if (issue2.values.length === 1) { + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${stringifyPrimitive(issue2.values[0])}`; + } + const stringified = issue2.values.map((v3) => stringifyPrimitive(v3)); + if (issue2.values.length === 2) { + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`; + } + const lastValue = stringified[stringified.length - 1]; + const restValues = stringified.slice(0, -1).join(", "); + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`; + } + case "too_big": { + const sizing = getSizing(issue2.origin); + const subject = withDefinite(issue2.origin ?? "value"); + if (issue2.origin === "string") { + return `${sizing?.longLabel ?? "\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.maximum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA" : "\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim(); + } + if (issue2.origin === "number") { + const comparison = issue2.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue2.maximum}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; + } + if (issue2.origin === "array" || issue2.origin === "set") { + const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; + const comparison = issue2.inclusive ? `${issue2.maximum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA` : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue2.maximum} ${sizing?.unit ?? ""}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); + } + const adj = issue2.inclusive ? "<=" : "<"; + const be2 = verbFor(issue2.origin ?? "value"); + if (sizing?.unit) { + return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + } + return `${sizing?.longLabel ?? "\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const sizing = getSizing(issue2.origin); + const subject = withDefinite(issue2.origin ?? "value"); + if (issue2.origin === "string") { + return `${sizing?.shortLabel ?? "\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.minimum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8" : "\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim(); + } + if (issue2.origin === "number") { + const comparison = issue2.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue2.minimum}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; + } + if (issue2.origin === "array" || issue2.origin === "set") { + const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; + if (issue2.minimum === 1 && issue2.inclusive) { + const singularPhrase = issue2.origin === "set" ? "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3" : "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3"; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`; + } + const comparison = issue2.inclusive ? `${issue2.minimum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8` : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue2.minimum} ${sizing?.unit ?? ""}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); + } + const adj = issue2.inclusive ? ">=" : ">"; + const be2 = verbFor(issue2.origin ?? "value"); + if (sizing?.unit) { + return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `${sizing?.shortLabel ?? "\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`; + const nounEntry = FormatDictionary[_issue.format]; + const noun = nounEntry?.label ?? _issue.format; + const gender = nounEntry?.gender ?? "m"; + const adjective = gender === "f" ? "\u05EA\u05E7\u05D9\u05E0\u05D4" : "\u05EA\u05E7\u05D9\u05DF"; + return `${noun} \u05DC\u05D0 ${adjective}`; + } + case "not_multiple_of": + return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue2.divisor}`; + case "unrecognized_keys": + return `\u05DE\u05E4\u05EA\u05D7${issue2.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue2.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": { + return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`; + } + case "invalid_union": + return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"; + case "invalid_element": { + const place = withDefinite(issue2.origin ?? "array"); + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`; + } + default: + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; + } + }; + }, "error"); + __name(he_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/hu.js +function hu_default() { + return { + localeError: error19() + }; +} +var error19; +var init_hu = __esm({ + "../../node_modules/zod/v4/locales/hu.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error19 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "karakter", verb: "legyen" }, + file: { unit: "byte", verb: "legyen" }, + array: { unit: "elem", verb: "legyen" }, + set: { unit: "elem", verb: "legyen" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "bemenet", + email: "email c\xEDm", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO id\u0151b\xE9lyeg", + date: "ISO d\xE1tum", + time: "ISO id\u0151", + duration: "ISO id\u0151intervallum", + ipv4: "IPv4 c\xEDm", + ipv6: "IPv6 c\xEDm", + cidrv4: "IPv4 tartom\xE1ny", + cidrv6: "IPv6 tartom\xE1ny", + base64: "base64-k\xF3dolt string", + base64url: "base64url-k\xF3dolt string", + json_string: "JSON string", + e164: "E.164 sz\xE1m", + jwt: "JWT", + template_literal: "bemenet" + }; + const TypeDictionary = { + nan: "NaN", + number: "sz\xE1m", + array: "t\xF6mb" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`; + } + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`; + return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`; + return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`; + if (_issue.format === "ends_with") + return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`; + if (_issue.format === "includes") + return `\xC9rv\xE9nytelen string: "${_issue.includes}" \xE9rt\xE9ket kell tartalmaznia`; + if (_issue.format === "regex") + return `\xC9rv\xE9nytelen string: ${_issue.pattern} mint\xE1nak kell megfelelnie`; + return `\xC9rv\xE9nytelen ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\xC9rv\xE9nytelen sz\xE1m: ${issue2.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; + case "unrecognized_keys": + return `Ismeretlen kulcs${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\xC9rv\xE9nytelen kulcs ${issue2.origin}`; + case "invalid_union": + return "\xC9rv\xE9nytelen bemenet"; + case "invalid_element": + return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue2.origin}`; + default: + return `\xC9rv\xE9nytelen bemenet`; + } + }; + }, "error"); + __name(hu_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/hy.js +function getArmenianPlural(count4, one, many) { + return Math.abs(count4) === 1 ? one : many; +} +function withDefiniteArticle(word) { + if (!word) + return ""; + const vowels = ["\u0561", "\u0565", "\u0568", "\u056B", "\u0578", "\u0578\u0582", "\u0585"]; + const lastChar = word[word.length - 1]; + return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568"); +} +function hy_default() { + return { + localeError: error20() + }; +} +var error20; +var init_hy = __esm({ + "../../node_modules/zod/v4/locales/hy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + __name(getArmenianPlural, "getArmenianPlural"); + __name(withDefiniteArticle, "withDefiniteArticle"); + error20 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { + unit: { + one: "\u0576\u0577\u0561\u0576", + many: "\u0576\u0577\u0561\u0576\u0576\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + file: { + unit: { + one: "\u0562\u0561\u0575\u0569", + many: "\u0562\u0561\u0575\u0569\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + array: { + unit: { + one: "\u057F\u0561\u0580\u0580", + many: "\u057F\u0561\u0580\u0580\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + set: { + unit: { + one: "\u057F\u0561\u0580\u0580", + many: "\u057F\u0561\u0580\u0580\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0574\u0578\u0582\u057F\u0584", + email: "\u0567\u056C. \u0570\u0561\u057D\u0581\u0565", + url: "URL", + emoji: "\u0567\u0574\u0578\u057B\u056B", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574", + date: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E", + time: "ISO \u056A\u0561\u0574", + duration: "ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576", + ipv4: "IPv4 \u0570\u0561\u057D\u0581\u0565", + ipv6: "IPv6 \u0570\u0561\u057D\u0581\u0565", + cidrv4: "IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", + cidrv6: "IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", + base64: "base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", + base64url: "base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", + json_string: "JSON \u057F\u0578\u0572", + e164: "E.164 \u0570\u0561\u0574\u0561\u0580", + jwt: "JWT", + template_literal: "\u0574\u0578\u0582\u057F\u0584" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0569\u056B\u057E", + array: "\u0566\u0561\u0576\u0563\u057E\u0561\u056E" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${issue2.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; + } + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${stringifyPrimitive(issue2.values[1])}`; + return `\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const maxValue = Number(issue2.maximum); + const unit = getArmenianPlural(maxValue, sizing.unit.one, sizing.unit.many); + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue2.maximum.toString()} ${unit}`; + } + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const minValue = Number(issue2.minimum); + const unit = getArmenianPlural(minValue, sizing.unit.one, sizing.unit.many); + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue2.minimum.toString()} ${unit}`; + } + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin)} \u056C\u056B\u0576\u056B ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${_issue.prefix}"-\u0578\u057E`; + if (_issue.format === "ends_with") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${_issue.suffix}"-\u0578\u057E`; + if (_issue.format === "includes") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${_issue.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`; + return `\u054D\u056D\u0561\u056C ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${issue2.divisor}-\u056B`; + case "unrecognized_keys": + return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${issue2.keys.length > 1 ? "\u0576\u0565\u0580" : ""}. ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${withDefiniteArticle(issue2.origin)}-\u0578\u0582\u0574`; + case "invalid_union": + return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"; + case "invalid_element": + return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${withDefiniteArticle(issue2.origin)}-\u0578\u0582\u0574`; + default: + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574`; + } + }; + }, "error"); + __name(hy_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/id.js +function id_default() { + return { + localeError: error21() + }; +} +var error21; +var init_id = __esm({ + "../../node_modules/zod/v4/locales/id.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error21 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "karakter", verb: "memiliki" }, + file: { unit: "byte", verb: "memiliki" }, + array: { unit: "item", verb: "memiliki" }, + set: { unit: "item", verb: "memiliki" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "alamat email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tanggal dan waktu format ISO", + date: "tanggal format ISO", + time: "jam format ISO", + duration: "durasi format ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "rentang alamat IPv4", + cidrv6: "rentang alamat IPv6", + base64: "string dengan enkode base64", + base64url: "string dengan enkode base64url", + json_string: "string JSON", + e164: "angka E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Input tidak valid: diharapkan instanceof ${issue2.expected}, diterima ${received}`; + } + return `Input tidak valid: diharapkan ${expected}, diterima ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Input tidak valid: diharapkan ${stringifyPrimitive(issue2.values[0])}`; + return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} memiliki ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} menjadi ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Terlalu kecil: diharapkan ${issue2.origin} memiliki ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: diharapkan ${issue2.origin} menjadi ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak valid: harus menyertakan "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak valid: harus sesuai pola ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} tidak valid`; + } + case "not_multiple_of": + return `Angka tidak valid: harus kelipatan dari ${issue2.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak valid di ${issue2.origin}`; + case "invalid_union": + return "Input tidak valid"; + case "invalid_element": + return `Nilai tidak valid di ${issue2.origin}`; + default: + return `Input tidak valid`; + } + }; + }, "error"); + __name(id_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/is.js +function is_default() { + return { + localeError: error22() + }; +} +var error22; +var init_is = __esm({ + "../../node_modules/zod/v4/locales/is.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error22 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "stafi", verb: "a\xF0 hafa" }, + file: { unit: "b\xE6ti", verb: "a\xF0 hafa" }, + array: { unit: "hluti", verb: "a\xF0 hafa" }, + set: { unit: "hluti", verb: "a\xF0 hafa" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "gildi", + email: "netfang", + url: "vefsl\xF3\xF0", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dagsetning og t\xEDmi", + date: "ISO dagsetning", + time: "ISO t\xEDmi", + duration: "ISO t\xEDmalengd", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded strengur", + base64url: "base64url-encoded strengur", + json_string: "JSON strengur", + e164: "E.164 t\xF6lugildi", + jwt: "JWT", + template_literal: "gildi" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\xFAmer", + array: "fylki" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera instanceof ${issue2.expected}`; + } + return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera ${expected}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Rangt gildi: gert r\xE1\xF0 fyrir ${stringifyPrimitive(issue2.values[0])}`; + return `\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin ?? "gildi"} hafi ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "hluti"}`; + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin ?? "gildi"} s\xE9 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin} hafi ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin} s\xE9 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${_issue.includes}"`; + if (_issue.format === "regex") + return `\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${_issue.pattern}`; + return `Rangt ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${issue2.divisor}`; + case "unrecognized_keys": + return `\xD3\xFEekkt ${issue2.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Rangur lykill \xED ${issue2.origin}`; + case "invalid_union": + return "Rangt gildi"; + case "invalid_element": + return `Rangt gildi \xED ${issue2.origin}`; + default: + return `Rangt gildi`; + } + }; + }, "error"); + __name(is_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/it.js +function it_default() { + return { + localeError: error23() + }; +} +var error23; +var init_it = __esm({ + "../../node_modules/zod/v4/locales/it.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error23 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caratteri", verb: "avere" }, + file: { unit: "byte", verb: "avere" }, + array: { unit: "elementi", verb: "avere" }, + set: { unit: "elementi", verb: "avere" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "indirizzo email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e ora ISO", + date: "data ISO", + time: "ora ISO", + duration: "durata ISO", + ipv4: "indirizzo IPv4", + ipv6: "indirizzo IPv6", + cidrv4: "intervallo IPv4", + cidrv6: "intervallo IPv6", + base64: "stringa codificata in base64", + base64url: "URL codificata in base64", + json_string: "stringa JSON", + e164: "numero E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "numero", + array: "vettore" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Input non valido: atteso instanceof ${issue2.expected}, ricevuto ${received}`; + } + return `Input non valido: atteso ${expected}, ricevuto ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Input non valido: atteso ${stringifyPrimitive(issue2.values[0])}`; + return `Opzione non valida: atteso uno tra ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Troppo grande: ${issue2.origin ?? "valore"} deve avere ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementi"}`; + return `Troppo grande: ${issue2.origin ?? "valore"} deve essere ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Troppo piccolo: ${issue2.origin} deve avere ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Troppo piccolo: ${issue2.origin} deve essere ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Stringa non valida: deve iniziare con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Stringa non valida: deve terminare con "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Stringa non valida: deve includere "${_issue.includes}"`; + if (_issue.format === "regex") + return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`; + case "unrecognized_keys": + return `Chiav${issue2.keys.length > 1 ? "i" : "e"} non riconosciut${issue2.keys.length > 1 ? "e" : "a"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Chiave non valida in ${issue2.origin}`; + case "invalid_union": + return "Input non valido"; + case "invalid_element": + return `Valore non valido in ${issue2.origin}`; + default: + return `Input non valido`; + } + }; + }, "error"); + __name(it_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ja.js +function ja_default() { + return { + localeError: error24() + }; +} +var error24; +var init_ja = __esm({ + "../../node_modules/zod/v4/locales/ja.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error24 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, + file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" }, + array: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" }, + set: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u5165\u529B\u5024", + email: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9", + url: "URL", + emoji: "\u7D75\u6587\u5B57", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u6642", + date: "ISO\u65E5\u4ED8", + time: "ISO\u6642\u523B", + duration: "ISO\u671F\u9593", + ipv4: "IPv4\u30A2\u30C9\u30EC\u30B9", + ipv6: "IPv6\u30A2\u30C9\u30EC\u30B9", + cidrv4: "IPv4\u7BC4\u56F2", + cidrv6: "IPv6\u7BC4\u56F2", + base64: "base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + base64url: "base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + json_string: "JSON\u6587\u5B57\u5217", + e164: "E.164\u756A\u53F7", + jwt: "JWT", + template_literal: "\u5165\u529B\u5024" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u6570\u5024", + array: "\u914D\u5217" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u7121\u52B9\u306A\u5165\u529B: instanceof ${issue2.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + } + return `\u7121\u52B9\u306A\u5165\u529B: ${expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive(issue2.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; + return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues(issue2.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "too_big": { + const adj = issue2.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "ends_with") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "includes") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "regex") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u7121\u52B9\u306A${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u7121\u52B9\u306A\u6570\u5024: ${issue2.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "unrecognized_keys": + return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue2.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue2.keys, "\u3001")}`; + case "invalid_key": + return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; + case "invalid_union": + return "\u7121\u52B9\u306A\u5165\u529B"; + case "invalid_element": + return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; + default: + return `\u7121\u52B9\u306A\u5165\u529B`; + } + }; + }, "error"); + __name(ja_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ka.js +function ka_default() { + return { + localeError: error25() + }; +} +var error25; +var init_ka = __esm({ + "../../node_modules/zod/v4/locales/ka.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error25 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + array: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + set: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0", + email: "\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + url: "URL", + emoji: "\u10D4\u10DB\u10DD\u10EF\u10D8", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD", + date: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8", + time: "\u10D3\u10E0\u10DD", + duration: "\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0", + ipv4: "IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8", + jwt: "JWT", + template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8", + string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8", + function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0", + array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${issue2.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; + } + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${stringifyPrimitive(issue2.values[0])}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${joinValues(issue2.values, "|")}-\u10D3\u10D0\u10DC`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`; + } + if (_issue.format === "ends_with") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`; + if (_issue.format === "includes") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`; + if (_issue.format === "regex") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue2.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`; + case "unrecognized_keys": + return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue2.keys.length > 1 ? "\u10D4\u10D1\u10D8" : "\u10D8"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue2.origin}-\u10E8\u10D8`; + case "invalid_union": + return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"; + case "invalid_element": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue2.origin}-\u10E8\u10D8`; + default: + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`; + } + }; + }, "error"); + __name(ka_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/km.js +function km_default() { + return { + localeError: error26() + }; +} +var error26; +var init_km = __esm({ + "../../node_modules/zod/v4/locales/km.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error26 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + array: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + set: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B", + email: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B", + url: "URL", + emoji: "\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO", + date: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO", + time: "\u1798\u17C9\u17C4\u1784 ISO", + duration: "\u179A\u1799\u17C8\u1796\u17C1\u179B ISO", + ipv4: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + ipv6: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + cidrv4: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + cidrv6: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + base64: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64", + base64url: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url", + json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON", + e164: "\u179B\u17C1\u1781 E.164", + jwt: "JWT", + template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u179B\u17C1\u1781", + array: "\u17A2\u17B6\u179A\u17C1 (Array)", + null: "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${issue2.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; + } + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive(issue2.values[0])}`; + return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`; + return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue2.divisor}`; + case "unrecognized_keys": + return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`; + case "invalid_union": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; + case "invalid_element": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`; + default: + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; + } + }; + }, "error"); + __name(km_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/kh.js +function kh_default() { + return km_default(); +} +var init_kh = __esm({ + "../../node_modules/zod/v4/locales/kh.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_km(); + __name(kh_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ko.js +function ko_default() { + return { + localeError: error27() + }; +} +var error27; +var init_ko = __esm({ + "../../node_modules/zod/v4/locales/ko.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error27 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\uBB38\uC790", verb: "to have" }, + file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" }, + array: { unit: "\uAC1C", verb: "to have" }, + set: { unit: "\uAC1C", verb: "to have" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\uC785\uB825", + email: "\uC774\uBA54\uC77C \uC8FC\uC18C", + url: "URL", + emoji: "\uC774\uBAA8\uC9C0", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \uB0A0\uC9DC\uC2DC\uAC04", + date: "ISO \uB0A0\uC9DC", + time: "ISO \uC2DC\uAC04", + duration: "ISO \uAE30\uAC04", + ipv4: "IPv4 \uC8FC\uC18C", + ipv6: "IPv6 \uC8FC\uC18C", + cidrv4: "IPv4 \uBC94\uC704", + cidrv6: "IPv6 \uBC94\uC704", + base64: "base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + base64url: "base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + json_string: "JSON \uBB38\uC790\uC5F4", + e164: "E.164 \uBC88\uD638", + jwt: "JWT", + template_literal: "\uC785\uB825" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${issue2.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; + } + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive(issue2.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues(issue2.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "too_big": { + const adj = issue2.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; + const suffix = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue2.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()}${unit} ${adj}${suffix}`; + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()} ${adj}${suffix}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; + const suffix = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue2.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) { + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()}${unit} ${adj}${suffix}`; + } + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()} ${adj}${suffix}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`; + } + if (_issue.format === "ends_with") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "includes") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "regex") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue2.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "unrecognized_keys": + return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\uC798\uBABB\uB41C \uD0A4: ${issue2.origin}`; + case "invalid_union": + return `\uC798\uBABB\uB41C \uC785\uB825`; + case "invalid_element": + return `\uC798\uBABB\uB41C \uAC12: ${issue2.origin}`; + default: + return `\uC798\uBABB\uB41C \uC785\uB825`; + } + }; + }, "error"); + __name(ko_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/lt.js +function getUnitTypeFromNumber(number4) { + const abs = Math.abs(number4); + const last = abs % 10; + const last2 = abs % 100; + if (last2 >= 11 && last2 <= 19 || last === 0) + return "many"; + if (last === 1) + return "one"; + return "few"; +} +function lt_default() { + return { + localeError: error28() + }; +} +var capitalizeFirstCharacter, error28; +var init_lt = __esm({ + "../../node_modules/zod/v4/locales/lt.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + capitalizeFirstCharacter = /* @__PURE__ */ __name((text2) => { + return text2.charAt(0).toUpperCase() + text2.slice(1); + }, "capitalizeFirstCharacter"); + __name(getUnitTypeFromNumber, "getUnitTypeFromNumber"); + error28 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { + unit: { + one: "simbolis", + few: "simboliai", + many: "simboli\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne ilgesn\u0117 kaip", + notInclusive: "turi b\u016Bti trumpesn\u0117 kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne trumpesn\u0117 kaip", + notInclusive: "turi b\u016Bti ilgesn\u0117 kaip" + } + } + }, + file: { + unit: { + one: "baitas", + few: "baitai", + many: "bait\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne didesnis kaip", + notInclusive: "turi b\u016Bti ma\u017Eesnis kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne ma\u017Eesnis kaip", + notInclusive: "turi b\u016Bti didesnis kaip" + } + } + }, + array: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } + } + }, + set: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } + } + } + }; + function getSizing(origin2, unitType, inclusive, targetShouldBe) { + const result = Sizable[origin2] ?? null; + if (result === null) + return result; + return { + unit: result.unit[unitType], + verb: result.verb[targetShouldBe][inclusive ? "inclusive" : "notInclusive"] + }; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u012Fvestis", + email: "el. pa\u0161to adresas", + url: "URL", + emoji: "jaustukas", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO data ir laikas", + date: "ISO data", + time: "ISO laikas", + duration: "ISO trukm\u0117", + ipv4: "IPv4 adresas", + ipv6: "IPv6 adresas", + cidrv4: "IPv4 tinklo prefiksas (CIDR)", + cidrv6: "IPv6 tinklo prefiksas (CIDR)", + base64: "base64 u\u017Ekoduota eilut\u0117", + base64url: "base64url u\u017Ekoduota eilut\u0117", + json_string: "JSON eilut\u0117", + e164: "E.164 numeris", + jwt: "JWT", + template_literal: "\u012Fvestis" + }; + const TypeDictionary = { + nan: "NaN", + number: "skai\u010Dius", + bigint: "sveikasis skai\u010Dius", + string: "eilut\u0117", + boolean: "login\u0117 reik\u0161m\u0117", + undefined: "neapibr\u0117\u017Eta reik\u0161m\u0117", + function: "funkcija", + symbol: "simbolis", + array: "masyvas", + object: "objektas", + null: "nulin\u0117 reik\u0161m\u0117" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Gautas tipas ${received}, o tik\u0117tasi - instanceof ${issue2.expected}`; + } + return `Gautas tipas ${received}, o tik\u0117tasi - ${expected}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Privalo b\u016Bti ${stringifyPrimitive(issue2.values[0])}`; + return `Privalo b\u016Bti vienas i\u0161 ${joinValues(issue2.values, "|")} pasirinkim\u0173`; + case "too_big": { + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.maximum)), issue2.inclusive ?? false, "smaller"); + if (sizing?.verb) + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.maximum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue2.inclusive ? "ne didesnis kaip" : "ma\u017Eesnis kaip"; + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.maximum.toString()} ${sizing?.unit}`; + } + case "too_small": { + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.minimum)), issue2.inclusive ?? false, "bigger"); + if (sizing?.verb) + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.minimum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue2.inclusive ? "ne ma\u017Eesnis kaip" : "didesnis kaip"; + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.minimum.toString()} ${sizing?.unit}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Eilut\u0117 privalo prasid\u0117ti "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Eilut\u0117 privalo pasibaigti "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Eilut\u0117 privalo \u012Ftraukti "${_issue.includes}"`; + if (_issue.format === "regex") + return `Eilut\u0117 privalo atitikti ${_issue.pattern}`; + return `Neteisingas ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Skai\u010Dius privalo b\u016Bti ${issue2.divisor} kartotinis.`; + case "unrecognized_keys": + return `Neatpa\u017Eint${issue2.keys.length > 1 ? "i" : "as"} rakt${issue2.keys.length > 1 ? "ai" : "as"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return "Rastas klaidingas raktas"; + case "invalid_union": + return "Klaidinga \u012Fvestis"; + case "invalid_element": { + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`; + } + default: + return "Klaidinga \u012Fvestis"; + } + }; + }, "error"); + __name(lt_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/mk.js +function mk_default() { + return { + localeError: error29() + }; +} +var error29; +var init_mk = __esm({ + "../../node_modules/zod/v4/locales/mk.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error29 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + array: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + set: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0432\u043D\u0435\u0441", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430", + url: "URL", + emoji: "\u0435\u043C\u043E\u045F\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0443\u043C", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441\u0430", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441\u0430", + cidrv4: "IPv4 \u043E\u043F\u0441\u0435\u0433", + cidrv6: "IPv6 \u043E\u043F\u0441\u0435\u0433", + base64: "base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + base64url: "base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + json_string: "JSON \u043D\u0438\u0437\u0430", + e164: "E.164 \u0431\u0440\u043E\u0458", + jwt: "JWT", + template_literal: "\u0432\u043D\u0435\u0441" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0431\u0440\u043E\u0458", + array: "\u043D\u0438\u0437\u0430" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${issue2.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; + } + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; + return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue2.origin}`; + case "invalid_union": + return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"; + case "invalid_element": + return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue2.origin}`; + default: + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`; + } + }; + }, "error"); + __name(mk_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ms.js +function ms_default() { + return { + localeError: error30() + }; +} +var error30; +var init_ms = __esm({ + "../../node_modules/zod/v4/locales/ms.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error30 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "aksara", verb: "mempunyai" }, + file: { unit: "bait", verb: "mempunyai" }, + array: { unit: "elemen", verb: "mempunyai" }, + set: { unit: "elemen", verb: "mempunyai" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "alamat e-mel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tarikh masa ISO", + date: "tarikh ISO", + time: "masa ISO", + duration: "tempoh ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "julat IPv4", + cidrv6: "julat IPv6", + base64: "string dikodkan base64", + base64url: "string dikodkan base64url", + json_string: "string JSON", + e164: "nombor E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombor" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Input tidak sah: dijangka instanceof ${issue2.expected}, diterima ${received}`; + } + return `Input tidak sah: dijangka ${expected}, diterima ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Input tidak sah: dijangka ${stringifyPrimitive(issue2.values[0])}`; + return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} adalah ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Terlalu kecil: dijangka ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: dijangka ${issue2.origin} adalah ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak sah: mesti mengandungi "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} tidak sah`; + } + case "not_multiple_of": + return `Nombor tidak sah: perlu gandaan ${issue2.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak sah dalam ${issue2.origin}`; + case "invalid_union": + return "Input tidak sah"; + case "invalid_element": + return `Nilai tidak sah dalam ${issue2.origin}`; + default: + return `Input tidak sah`; + } + }; + }, "error"); + __name(ms_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/nl.js +function nl_default() { + return { + localeError: error31() + }; +} +var error31; +var init_nl = __esm({ + "../../node_modules/zod/v4/locales/nl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error31 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "tekens", verb: "heeft" }, + file: { unit: "bytes", verb: "heeft" }, + array: { unit: "elementen", verb: "heeft" }, + set: { unit: "elementen", verb: "heeft" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "invoer", + email: "emailadres", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum en tijd", + date: "ISO datum", + time: "ISO tijd", + duration: "ISO duur", + ipv4: "IPv4-adres", + ipv6: "IPv6-adres", + cidrv4: "IPv4-bereik", + cidrv6: "IPv6-bereik", + base64: "base64-gecodeerde tekst", + base64url: "base64 URL-gecodeerde tekst", + json_string: "JSON string", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "invoer" + }; + const TypeDictionary = { + nan: "NaN", + number: "getal" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ongeldige invoer: verwacht instanceof ${issue2.expected}, ontving ${received}`; + } + return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue2.values[0])}`; + return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + const longName = issue2.origin === "date" ? "laat" : issue2.origin === "string" ? "lang" : "groot"; + if (sizing) + return `Te ${longName}: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementen"} ${sizing.verb}`; + return `Te ${longName}: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} is`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + const shortName = issue2.origin === "date" ? "vroeg" : issue2.origin === "string" ? "kort" : "klein"; + if (sizing) { + return `Te ${shortName}: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} ${sizing.verb}`; + } + return `Te ${shortName}: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} is`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`; + } + if (_issue.format === "ends_with") + return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`; + if (_issue.format === "includes") + return `Ongeldige tekst: moet "${_issue.includes}" bevatten`; + if (_issue.format === "regex") + return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`; + return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ongeldig getal: moet een veelvoud van ${issue2.divisor} zijn`; + case "unrecognized_keys": + return `Onbekende key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ongeldige key in ${issue2.origin}`; + case "invalid_union": + return "Ongeldige invoer"; + case "invalid_element": + return `Ongeldige waarde in ${issue2.origin}`; + default: + return `Ongeldige invoer`; + } + }; + }, "error"); + __name(nl_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/no.js +function no_default() { + return { + localeError: error32() + }; +} +var error32; +var init_no = __esm({ + "../../node_modules/zod/v4/locales/no.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error32 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "tegn", verb: "\xE5 ha" }, + file: { unit: "bytes", verb: "\xE5 ha" }, + array: { unit: "elementer", verb: "\xE5 inneholde" }, + set: { unit: "elementer", verb: "\xE5 inneholde" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "e-postadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkeslett", + date: "ISO-dato", + time: "ISO-klokkeslett", + duration: "ISO-varighet", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spekter", + cidrv6: "IPv6-spekter", + base64: "base64-enkodet streng", + base64url: "base64url-enkodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "tall", + array: "liste" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ugyldig input: forventet instanceof ${issue2.expected}, fikk ${received}`; + } + return `Ugyldig input: forventet ${expected}, fikk ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ugyldig verdi: forventet ${stringifyPrimitive(issue2.values[0])}`; + return `Ugyldig valg: forventet en av ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: m\xE5 ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8kkel i ${issue2.origin}`; + case "invalid_union": + return "Ugyldig input"; + case "invalid_element": + return `Ugyldig verdi i ${issue2.origin}`; + default: + return `Ugyldig input`; + } + }; + }, "error"); + __name(no_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ota.js +function ota_default() { + return { + localeError: error33() + }; +} +var error33; +var init_ota = __esm({ + "../../node_modules/zod/v4/locales/ota.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error33 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "unsur", verb: "olmal\u0131d\u0131r" }, + set: { unit: "unsur", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "giren", + email: "epostag\xE2h", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO heng\xE2m\u0131", + date: "ISO tarihi", + time: "ISO zaman\u0131", + duration: "ISO m\xFCddeti", + ipv4: "IPv4 ni\u015F\xE2n\u0131", + ipv6: "IPv6 ni\u015F\xE2n\u0131", + cidrv4: "IPv4 menzili", + cidrv6: "IPv6 menzili", + base64: "base64-\u015Fifreli metin", + base64url: "base64url-\u015Fifreli metin", + json_string: "JSON metin", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "giren" + }; + const TypeDictionary = { + nan: "NaN", + number: "numara", + array: "saf", + null: "gayb" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `F\xE2sit giren: umulan instanceof ${issue2.expected}, al\u0131nan ${received}`; + } + return `F\xE2sit giren: umulan ${expected}, al\u0131nan ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `F\xE2sit giren: umulan ${stringifyPrimitive(issue2.values[0])}`; + return `F\xE2sit tercih: m\xFBteberler ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; + return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} olmal\u0131yd\u0131.`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; + } + return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} olmal\u0131yd\u0131.`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`; + if (_issue.format === "ends_with") + return `F\xE2sit metin: "${_issue.suffix}" ile bitmeli.`; + if (_issue.format === "includes") + return `F\xE2sit metin: "${_issue.includes}" ihtiv\xE2 etmeli.`; + if (_issue.format === "regex") + return `F\xE2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`; + return `F\xE2sit ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `F\xE2sit say\u0131: ${issue2.divisor} kat\u0131 olmal\u0131yd\u0131.`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} i\xE7in tan\u0131nmayan anahtar var.`; + case "invalid_union": + return "Giren tan\u0131namad\u0131."; + case "invalid_element": + return `${issue2.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; + default: + return `K\u0131ymet tan\u0131namad\u0131.`; + } + }; + }, "error"); + __name(ota_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ps.js +function ps_default() { + return { + localeError: error34() + }; +} +var error34; +var init_ps = __esm({ + "../../node_modules/zod/v4/locales/ps.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error34 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" }, + array: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + set: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0648\u0631\u0648\u062F\u064A", + email: "\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u0644", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u064A", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A", + date: "\u0646\u06D0\u067C\u0647", + time: "\u0648\u062E\u062A", + duration: "\u0645\u0648\u062F\u0647", + ipv4: "\u062F IPv4 \u067E\u062A\u0647", + ipv6: "\u062F IPv6 \u067E\u062A\u0647", + cidrv4: "\u062F IPv4 \u0633\u0627\u062D\u0647", + cidrv6: "\u062F IPv6 \u0633\u0627\u062D\u0647", + base64: "base64-encoded \u0645\u062A\u0646", + base64url: "base64url-encoded \u0645\u062A\u0646", + json_string: "JSON \u0645\u062A\u0646", + e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u064A" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0639\u062F\u062F", + array: "\u0627\u0631\u06D0" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${issue2.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + } + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + } + case "invalid_value": + if (issue2.values.length === 1) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive(issue2.values[0])} \u0648\u0627\u06CC`; + } + return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues(issue2.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0648\u064A`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0648\u064A`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`; + } + if (_issue.format === "ends_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`; + } + if (_issue.format === "includes") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${_issue.includes}" \u0648\u0644\u0631\u064A`; + } + if (_issue.format === "regex") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`; + } + return `${FormatDictionary[_issue.format] ?? issue2.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; + } + case "not_multiple_of": + return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue2.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; + case "unrecognized_keys": + return `\u0646\u0627\u0633\u0645 ${issue2.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; + case "invalid_union": + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + case "invalid_element": + return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; + default: + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + } + }; + }, "error"); + __name(ps_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/pl.js +function pl_default() { + return { + localeError: error35() + }; +} +var error35; +var init_pl = __esm({ + "../../node_modules/zod/v4/locales/pl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error35 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "znak\xF3w", verb: "mie\u0107" }, + file: { unit: "bajt\xF3w", verb: "mie\u0107" }, + array: { unit: "element\xF3w", verb: "mie\u0107" }, + set: { unit: "element\xF3w", verb: "mie\u0107" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "wyra\u017Cenie", + email: "adres email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i godzina w formacie ISO", + date: "data w formacie ISO", + time: "godzina w formacie ISO", + duration: "czas trwania ISO", + ipv4: "adres IPv4", + ipv6: "adres IPv6", + cidrv4: "zakres IPv4", + cidrv6: "zakres IPv6", + base64: "ci\u0105g znak\xF3w zakodowany w formacie base64", + base64url: "ci\u0105g znak\xF3w zakodowany w formacie base64url", + json_string: "ci\u0105g znak\xF3w w formacie JSON", + e164: "liczba E.164", + jwt: "JWT", + template_literal: "wej\u015Bcie" + }; + const TypeDictionary = { + nan: "NaN", + number: "liczba", + array: "tablica" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${issue2.expected}, otrzymano ${received}`; + } + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${expected}, otrzymano ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive(issue2.values[0])}`; + return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`; + return `Nieprawid\u0142ow(y/a/e) ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue2.divisor}`; + case "unrecognized_keys": + return `Nierozpoznane klucze${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Nieprawid\u0142owy klucz w ${issue2.origin}`; + case "invalid_union": + return "Nieprawid\u0142owe dane wej\u015Bciowe"; + case "invalid_element": + return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue2.origin}`; + default: + return `Nieprawid\u0142owe dane wej\u015Bciowe`; + } + }; + }, "error"); + __name(pl_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/pt.js +function pt_default() { + return { + localeError: error36() + }; +} +var error36; +var init_pt = __esm({ + "../../node_modules/zod/v4/locales/pt.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error36 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caracteres", verb: "ter" }, + file: { unit: "bytes", verb: "ter" }, + array: { unit: "itens", verb: "ter" }, + set: { unit: "itens", verb: "ter" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "padr\xE3o", + email: "endere\xE7o de e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "dura\xE7\xE3o ISO", + ipv4: "endere\xE7o IPv4", + ipv6: "endere\xE7o IPv6", + cidrv4: "faixa de IPv4", + cidrv6: "faixa de IPv6", + base64: "texto codificado em base64", + base64url: "URL codificada em base64", + json_string: "texto JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\xFAmero", + null: "nulo" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Tipo inv\xE1lido: esperado instanceof ${issue2.expected}, recebido ${received}`; + } + return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue2.values[0])}`; + return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} inv\xE1lido`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Chave inv\xE1lida em ${issue2.origin}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido em ${issue2.origin}`; + default: + return `Campo inv\xE1lido`; + } + }; + }, "error"); + __name(pt_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ru.js +function getRussianPlural(count4, one, few, many) { + const absCount = Math.abs(count4); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; + } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; +} +function ru_default() { + return { + localeError: error37() + }; +} +var error37; +var init_ru = __esm({ + "../../node_modules/zod/v4/locales/ru.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + __name(getRussianPlural, "getRussianPlural"); + error37 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0438\u043C\u0432\u043E\u043B", + few: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", + many: "\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u0430", + many: "\u0431\u0430\u0439\u0442" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0432\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u044F", + duration: "ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64", + base64url: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url", + json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0432\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0441\u0438\u0432" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; + } + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const maxValue = Number(issue2.maximum); + const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.maximum.toString()} ${unit}`; + } + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const minValue = Number(issue2.minimum); + const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.minimum.toString()} ${unit}`; + } + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue2.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0438" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"; + case "invalid_element": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue2.origin}`; + default: + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`; + } + }; + }, "error"); + __name(ru_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/sl.js +function sl_default() { + return { + localeError: error38() + }; +} +var error38; +var init_sl = __esm({ + "../../node_modules/zod/v4/locales/sl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error38 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "znakov", verb: "imeti" }, + file: { unit: "bajtov", verb: "imeti" }, + array: { unit: "elementov", verb: "imeti" }, + set: { unit: "elementov", verb: "imeti" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "vnos", + email: "e-po\u0161tni naslov", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum in \u010Das", + date: "ISO datum", + time: "ISO \u010Das", + duration: "ISO trajanje", + ipv4: "IPv4 naslov", + ipv6: "IPv6 naslov", + cidrv4: "obseg IPv4", + cidrv6: "obseg IPv6", + base64: "base64 kodiran niz", + base64url: "base64url kodiran niz", + json_string: "JSON niz", + e164: "E.164 \u0161tevilka", + jwt: "JWT", + template_literal: "vnos" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0161tevilo", + array: "tabela" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Neveljaven vnos: pri\u010Dakovano instanceof ${issue2.expected}, prejeto ${received}`; + } + return `Neveljaven vnos: pri\u010Dakovano ${expected}, prejeto ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive(issue2.values[0])}`; + return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} imelo ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementov"}`; + return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} imelo ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Neveljaven niz: mora se kon\u010Dati z "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neveljaven niz: mora vsebovati "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`; + return `Neveljaven ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue2.divisor}`; + case "unrecognized_keys": + return `Neprepoznan${issue2.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Neveljaven klju\u010D v ${issue2.origin}`; + case "invalid_union": + return "Neveljaven vnos"; + case "invalid_element": + return `Neveljavna vrednost v ${issue2.origin}`; + default: + return "Neveljaven vnos"; + } + }; + }, "error"); + __name(sl_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/sv.js +function sv_default() { + return { + localeError: error39() + }; +} +var error39; +var init_sv = __esm({ + "../../node_modules/zod/v4/locales/sv.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error39 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "tecken", verb: "att ha" }, + file: { unit: "bytes", verb: "att ha" }, + array: { unit: "objekt", verb: "att inneh\xE5lla" }, + set: { unit: "objekt", verb: "att inneh\xE5lla" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "regulj\xE4rt uttryck", + email: "e-postadress", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datum och tid", + date: "ISO-datum", + time: "ISO-tid", + duration: "ISO-varaktighet", + ipv4: "IPv4-intervall", + ipv6: "IPv6-intervall", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodad str\xE4ng", + base64url: "base64url-kodad str\xE4ng", + json_string: "JSON-str\xE4ng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "mall-literal" + }; + const TypeDictionary = { + nan: "NaN", + number: "antal", + array: "lista" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${issue2.expected}, fick ${received}`; + } + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${expected}, fick ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive(issue2.values[0])}`; + return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; + } + return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Ogiltig str\xE4ng: m\xE5ste sluta med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${_issue.pattern}"`; + return `Ogiltig(t) ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ogiltig nyckel i ${issue2.origin ?? "v\xE4rdet"}`; + case "invalid_union": + return "Ogiltig input"; + case "invalid_element": + return `Ogiltigt v\xE4rde i ${issue2.origin ?? "v\xE4rdet"}`; + default: + return `Ogiltig input`; + } + }; + }, "error"); + __name(sv_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ta.js +function ta_default() { + return { + localeError: error40() + }; +} +var error40; +var init_ta = __esm({ + "../../node_modules/zod/v4/locales/ta.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error40 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + array: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + set: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1", + email: "\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + date: "ISO \u0BA4\u0BC7\u0BA4\u0BBF", + time: "ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + duration: "ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1", + ipv4: "IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + ipv6: "IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + cidrv4: "IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + cidrv6: "IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + base64: "base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + base64url: "base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD", + e164: "E.164 \u0B8E\u0BA3\u0BCD", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0B8E\u0BA3\u0BCD", + array: "\u0B85\u0BA3\u0BBF", + null: "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${issue2.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; + } + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues(issue2.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "ends_with") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "includes") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "regex") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue2.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + case "unrecognized_keys": + return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue2.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`; + case "invalid_union": + return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"; + case "invalid_element": + return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`; + default: + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`; + } + }; + }, "error"); + __name(ta_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/th.js +function th_default() { + return { + localeError: error41() + }; +} +var error41; +var init_th = __esm({ + "../../node_modules/zod/v4/locales/th.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error41 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19", + email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25", + url: "URL", + emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO", + time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4", + ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6", + cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4", + cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6", + base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64", + base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL", + json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON", + e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)", + jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT", + template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02", + array: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)", + null: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue2.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; + } + return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${_issue.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`; + if (_issue.format === "regex") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`; + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue2.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`; + case "unrecognized_keys": + return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; + case "invalid_union": + return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49"; + case "invalid_element": + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; + default: + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`; + } + }; + }, "error"); + __name(th_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/tr.js +function tr_default() { + return { + localeError: error42() + }; +} +var error42; +var init_tr = __esm({ + "../../node_modules/zod/v4/locales/tr.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error42 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "karakter", verb: "olmal\u0131" }, + file: { unit: "bayt", verb: "olmal\u0131" }, + array: { unit: "\xF6\u011Fe", verb: "olmal\u0131" }, + set: { unit: "\xF6\u011Fe", verb: "olmal\u0131" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "girdi", + email: "e-posta adresi", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO tarih ve saat", + date: "ISO tarih", + time: "ISO saat", + duration: "ISO s\xFCre", + ipv4: "IPv4 adresi", + ipv6: "IPv6 adresi", + cidrv4: "IPv4 aral\u0131\u011F\u0131", + cidrv6: "IPv6 aral\u0131\u011F\u0131", + base64: "base64 ile \u015Fifrelenmi\u015F metin", + base64url: "base64url ile \u015Fifrelenmi\u015F metin", + json_string: "JSON dizesi", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "\u015Eablon dizesi" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ge\xE7ersiz de\u011Fer: beklenen instanceof ${issue2.expected}, al\u0131nan ${received}`; + } + return `Ge\xE7ersiz de\u011Fer: beklenen ${expected}, al\u0131nan ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive(issue2.values[0])}`; + return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; + return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`; + if (_issue.format === "ends_with") + return `Ge\xE7ersiz metin: "${_issue.suffix}" ile bitmeli`; + if (_issue.format === "includes") + return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`; + if (_issue.format === "regex") + return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`; + return `Ge\xE7ersiz ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ge\xE7ersiz say\u0131: ${issue2.divisor} ile tam b\xF6l\xFCnebilmeli`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} i\xE7inde ge\xE7ersiz anahtar`; + case "invalid_union": + return "Ge\xE7ersiz de\u011Fer"; + case "invalid_element": + return `${issue2.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; + default: + return `Ge\xE7ersiz de\u011Fer`; + } + }; + }, "error"); + __name(tr_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/uk.js +function uk_default() { + return { + localeError: error43() + }; +} +var error43; +var init_uk = __esm({ + "../../node_modules/zod/v4/locales/uk.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error43 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438", + url: "URL", + emoji: "\u0435\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO", + date: "\u0434\u0430\u0442\u0430 ISO", + time: "\u0447\u0430\u0441 ISO", + duration: "\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO", + ipv4: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv4", + ipv6: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv6", + cidrv4: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4", + cidrv6: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6", + base64: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64", + base64url: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url", + json_string: "\u0440\u044F\u0434\u043E\u043A JSON", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0438\u0432" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${issue2.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; + } + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} \u0431\u0443\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0456" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"; + case "invalid_element": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue2.origin}`; + default: + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`; + } + }; + }, "error"); + __name(uk_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ua.js +function ua_default() { + return uk_default(); +} +var init_ua = __esm({ + "../../node_modules/zod/v4/locales/ua.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_uk(); + __name(ua_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ur.js +function ur_default() { + return { + localeError: error44() + }; +} +var error44; +var init_ur = __esm({ + "../../node_modules/zod/v4/locales/ur.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error44 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, + file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" }, + array: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" }, + set: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0627\u0646 \u067E\u0679", + email: "\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + uuidv4: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4", + uuidv6: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6", + nanoid: "\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC", + guid: "\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid2: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2", + ulid: "\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC", + xid: "\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC", + ksuid: "\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + datetime: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645", + date: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E", + time: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A", + duration: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A", + ipv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633", + ipv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633", + cidrv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C", + cidrv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C", + base64: "\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + base64url: "\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF", + e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631", + jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC", + template_literal: "\u0627\u0646 \u067E\u0679" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0646\u0645\u0628\u0631", + array: "\u0622\u0631\u06D2", + null: "\u0646\u0644" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${issue2.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + } + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive(issue2.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues(issue2.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue2.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u06D2 ${adj}${issue2.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + } + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u0627 ${adj}${issue2.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + } + if (_issue.format === "ends_with") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "includes") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "regex") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + return `\u063A\u0644\u0637 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue2.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + case "unrecognized_keys": + return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue2.keys.length > 1 ? "\u0632" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; + case "invalid_key": + return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; + case "invalid_union": + return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"; + case "invalid_element": + return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; + default: + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`; + } + }; + }, "error"); + __name(ur_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/uz.js +function uz_default() { + return { + localeError: error45() + }; +} +var error45; +var init_uz = __esm({ + "../../node_modules/zod/v4/locales/uz.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error45 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "belgi", verb: "bo\u2018lishi kerak" }, + file: { unit: "bayt", verb: "bo\u2018lishi kerak" }, + array: { unit: "element", verb: "bo\u2018lishi kerak" }, + set: { unit: "element", verb: "bo\u2018lishi kerak" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "kirish", + email: "elektron pochta manzili", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO sana va vaqti", + date: "ISO sana", + time: "ISO vaqt", + duration: "ISO davomiylik", + ipv4: "IPv4 manzil", + ipv6: "IPv6 manzil", + mac: "MAC manzil", + cidrv4: "IPv4 diapazon", + cidrv6: "IPv6 diapazon", + base64: "base64 kodlangan satr", + base64url: "base64url kodlangan satr", + json_string: "JSON satr", + e164: "E.164 raqam", + jwt: "JWT", + template_literal: "kirish" + }; + const TypeDictionary = { + nan: "NaN", + number: "raqam", + array: "massiv" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Noto\u2018g\u2018ri kirish: kutilgan instanceof ${issue2.expected}, qabul qilingan ${received}`; + } + return `Noto\u2018g\u2018ri kirish: kutilgan ${expected}, qabul qilingan ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Noto\u2018g\u2018ri kirish: kutilgan ${stringifyPrimitive(issue2.values[0])}`; + return `Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Juda katta: kutilgan ${issue2.origin ?? "qiymat"} ${adj}${issue2.maximum.toString()} ${sizing.unit} ${sizing.verb}`; + return `Juda katta: kutilgan ${issue2.origin ?? "qiymat"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Juda kichik: kutilgan ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} ${sizing.verb}`; + } + return `Juda kichik: kutilgan ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Noto\u2018g\u2018ri satr: "${_issue.prefix}" bilan boshlanishi kerak`; + if (_issue.format === "ends_with") + return `Noto\u2018g\u2018ri satr: "${_issue.suffix}" bilan tugashi kerak`; + if (_issue.format === "includes") + return `Noto\u2018g\u2018ri satr: "${_issue.includes}" ni o\u2018z ichiga olishi kerak`; + if (_issue.format === "regex") + return `Noto\u2018g\u2018ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`; + return `Noto\u2018g\u2018ri ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Noto\u2018g\u2018ri raqam: ${issue2.divisor} ning karralisi bo\u2018lishi kerak`; + case "unrecognized_keys": + return `Noma\u2019lum kalit${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} dagi kalit noto\u2018g\u2018ri`; + case "invalid_union": + return "Noto\u2018g\u2018ri kirish"; + case "invalid_element": + return `${issue2.origin} da noto\u2018g\u2018ri qiymat`; + default: + return `Noto\u2018g\u2018ri kirish`; + } + }; + }, "error"); + __name(uz_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/vi.js +function vi_default() { + return { + localeError: error46() + }; +} +var error46; +var init_vi = __esm({ + "../../node_modules/zod/v4/locales/vi.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error46 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, + file: { unit: "byte", verb: "c\xF3" }, + array: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" }, + set: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0111\u1EA7u v\xE0o", + email: "\u0111\u1ECBa ch\u1EC9 email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ng\xE0y gi\u1EDD ISO", + date: "ng\xE0y ISO", + time: "gi\u1EDD ISO", + duration: "kho\u1EA3ng th\u1EDDi gian ISO", + ipv4: "\u0111\u1ECBa ch\u1EC9 IPv4", + ipv6: "\u0111\u1ECBa ch\u1EC9 IPv6", + cidrv4: "d\u1EA3i IPv4", + cidrv6: "d\u1EA3i IPv6", + base64: "chu\u1ED7i m\xE3 h\xF3a base64", + base64url: "chu\u1ED7i m\xE3 h\xF3a base64url", + json_string: "chu\u1ED7i JSON", + e164: "s\u1ED1 E.164", + jwt: "JWT", + template_literal: "\u0111\u1EA7u v\xE0o" + }; + const TypeDictionary = { + nan: "NaN", + number: "s\u1ED1", + array: "m\u1EA3ng" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${issue2.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; + } + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive(issue2.values[0])}`; + return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${_issue.includes}"`; + if (_issue.format === "regex") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} kh\xF4ng h\u1EE3p l\u1EC7`; + } + case "not_multiple_of": + return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue2.divisor}`; + case "unrecognized_keys": + return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; + case "invalid_union": + return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"; + case "invalid_element": + return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; + default: + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`; + } + }; + }, "error"); + __name(vi_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/zh-CN.js +function zh_CN_default() { + return { + localeError: error47() + }; +} +var error47; +var init_zh_CN = __esm({ + "../../node_modules/zod/v4/locales/zh-CN.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error47 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, + file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" }, + array: { unit: "\u9879", verb: "\u5305\u542B" }, + set: { unit: "\u9879", verb: "\u5305\u542B" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u8F93\u5165", + email: "\u7535\u5B50\u90AE\u4EF6", + url: "URL", + emoji: "\u8868\u60C5\u7B26\u53F7", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u671F\u65F6\u95F4", + date: "ISO\u65E5\u671F", + time: "ISO\u65F6\u95F4", + duration: "ISO\u65F6\u957F", + ipv4: "IPv4\u5730\u5740", + ipv6: "IPv6\u5730\u5740", + cidrv4: "IPv4\u7F51\u6BB5", + cidrv6: "IPv6\u7F51\u6BB5", + base64: "base64\u7F16\u7801\u5B57\u7B26\u4E32", + base64url: "base64url\u7F16\u7801\u5B57\u7B26\u4E32", + json_string: "JSON\u5B57\u7B26\u4E32", + e164: "E.164\u53F7\u7801", + jwt: "JWT", + template_literal: "\u8F93\u5165" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u6570\u5B57", + array: "\u6570\u7EC4", + null: "\u7A7A\u503C(null)" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${issue2.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; + } + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive(issue2.values[0])}`; + return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`; + if (_issue.format === "ends_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.suffix}" \u7ED3\u5C3E`; + if (_issue.format === "includes") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`; + return `\u65E0\u6548${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue2.divisor} \u7684\u500D\u6570`; + case "unrecognized_keys": + return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; + case "invalid_union": + return "\u65E0\u6548\u8F93\u5165"; + case "invalid_element": + return `${issue2.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; + default: + return `\u65E0\u6548\u8F93\u5165`; + } + }; + }, "error"); + __name(zh_CN_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/zh-TW.js +function zh_TW_default() { + return { + localeError: error48() + }; +} +var error48; +var init_zh_TW = __esm({ + "../../node_modules/zod/v4/locales/zh-TW.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error48 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, + file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" }, + array: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" }, + set: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u8F38\u5165", + email: "\u90F5\u4EF6\u5730\u5740", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u65E5\u671F\u6642\u9593", + date: "ISO \u65E5\u671F", + time: "ISO \u6642\u9593", + duration: "ISO \u671F\u9593", + ipv4: "IPv4 \u4F4D\u5740", + ipv6: "IPv6 \u4F4D\u5740", + cidrv4: "IPv4 \u7BC4\u570D", + cidrv6: "IPv6 \u7BC4\u570D", + base64: "base64 \u7DE8\u78BC\u5B57\u4E32", + base64url: "base64url \u7DE8\u78BC\u5B57\u4E32", + json_string: "JSON \u5B57\u4E32", + e164: "E.164 \u6578\u503C", + jwt: "JWT", + template_literal: "\u8F38\u5165" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${issue2.expected}\uFF0C\u4F46\u6536\u5230 ${received}`; + } + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${expected}\uFF0C\u4F46\u6536\u5230 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive(issue2.values[0])}`; + return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`; + } + if (_issue.format === "ends_with") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.suffix}" \u7D50\u5C3E`; + if (_issue.format === "includes") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`; + return `\u7121\u6548\u7684 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue2.divisor} \u7684\u500D\u6578`; + case "unrecognized_keys": + return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue2.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues(issue2.keys, "\u3001")}`; + case "invalid_key": + return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; + case "invalid_union": + return "\u7121\u6548\u7684\u8F38\u5165\u503C"; + case "invalid_element": + return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; + default: + return `\u7121\u6548\u7684\u8F38\u5165\u503C`; + } + }; + }, "error"); + __name(zh_TW_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/yo.js +function yo_default() { + return { + localeError: error49() + }; +} +var error49; +var init_yo = __esm({ + "../../node_modules/zod/v4/locales/yo.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error49 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\xE0mi", verb: "n\xED" }, + file: { unit: "bytes", verb: "n\xED" }, + array: { unit: "nkan", verb: "n\xED" }, + set: { unit: "nkan", verb: "n\xED" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9", + email: "\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\xE0k\xF3k\xF2 ISO", + date: "\u1ECDj\u1ECD\u0301 ISO", + time: "\xE0k\xF3k\xF2 ISO", + duration: "\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO", + ipv4: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv4", + ipv6: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv6", + cidrv4: "\xE0gb\xE8gb\xE8 IPv4", + cidrv6: "\xE0gb\xE8gb\xE8 IPv6", + base64: "\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64", + base64url: "\u1ECD\u0300r\u1ECD\u0300 base64url", + json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON", + e164: "n\u1ECD\u0301mb\xE0 E.164", + jwt: "JWT", + template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\u1ECD\u0301mb\xE0", + array: "akop\u1ECD" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${issue2.expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; + } + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${stringifyPrimitive(issue2.values[0])}`; + return `\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue2.origin ?? "iye"} ${sizing.verb} ${adj}${issue2.maximum} ${sizing.unit}`; + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue2.maximum}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum} ${sizing.unit}`; + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue2.minimum}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`; + return `A\u1E63\xEC\u1E63e: ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${issue2.divisor}`; + case "unrecognized_keys": + return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue2.origin}`; + case "invalid_union": + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + case "invalid_element": + return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue2.origin}`; + default: + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + } + }; + }, "error"); + __name(yo_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/index.js +var locales_exports = {}; +__export(locales_exports, { + ar: () => ar_default, + az: () => az_default, + be: () => be_default, + bg: () => bg_default, + ca: () => ca_default, + cs: () => cs_default, + da: () => da_default, + de: () => de_default, + en: () => en_default, + eo: () => eo_default, + es: () => es_default, + fa: () => fa_default, + fi: () => fi_default, + fr: () => fr_default, + frCA: () => fr_CA_default, + he: () => he_default, + hu: () => hu_default, + hy: () => hy_default, + id: () => id_default, + is: () => is_default, + it: () => it_default, + ja: () => ja_default, + ka: () => ka_default, + kh: () => kh_default, + km: () => km_default, + ko: () => ko_default, + lt: () => lt_default, + mk: () => mk_default, + ms: () => ms_default, + nl: () => nl_default, + no: () => no_default, + ota: () => ota_default, + pl: () => pl_default, + ps: () => ps_default, + pt: () => pt_default, + ru: () => ru_default, + sl: () => sl_default, + sv: () => sv_default, + ta: () => ta_default, + th: () => th_default, + tr: () => tr_default, + ua: () => ua_default, + uk: () => uk_default, + ur: () => ur_default, + uz: () => uz_default, + vi: () => vi_default, + yo: () => yo_default, + zhCN: () => zh_CN_default, + zhTW: () => zh_TW_default +}); +var init_locales = __esm({ + "../../node_modules/zod/v4/locales/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_ar(); + init_az(); + init_be(); + init_bg(); + init_ca(); + init_cs(); + init_da(); + init_de(); + init_en(); + init_eo(); + init_es(); + init_fa(); + init_fi(); + init_fr(); + init_fr_CA(); + init_he(); + init_hu(); + init_hy(); + init_id(); + init_is(); + init_it(); + init_ja(); + init_ka(); + init_kh(); + init_km(); + init_ko(); + init_lt(); + init_mk(); + init_ms(); + init_nl(); + init_no(); + init_ota(); + init_ps(); + init_pl(); + init_pt(); + init_ru(); + init_sl(); + init_sv(); + init_ta(); + init_th(); + init_tr(); + init_ua(); + init_uk(); + init_ur(); + init_uz(); + init_vi(); + init_zh_CN(); + init_zh_TW(); + init_yo(); + } +}); + +// ../../node_modules/zod/v4/core/registries.js +function registry() { + return new $ZodRegistry(); +} +var _a123, $output, $input, $ZodRegistry, globalRegistry; +var init_registries = __esm({ + "../../node_modules/zod/v4/core/registries.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + $output = Symbol("ZodOutput"); + $input = Symbol("ZodInput"); + $ZodRegistry = class { + constructor() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + } + add(schema, ..._meta) { + const meta3 = _meta[0]; + this._map.set(schema, meta3); + if (meta3 && typeof meta3 === "object" && "id" in meta3) { + this._idmap.set(meta3.id, schema); + } + return this; + } + clear() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + return this; + } + remove(schema) { + const meta3 = this._map.get(schema); + if (meta3 && typeof meta3 === "object" && "id" in meta3) { + this._idmap.delete(meta3.id); + } + this._map.delete(schema); + return this; + } + get(schema) { + const p2 = schema._zod.parent; + if (p2) { + const pm = { ...this.get(p2) ?? {} }; + delete pm.id; + const f2 = { ...pm, ...this._map.get(schema) }; + return Object.keys(f2).length ? f2 : void 0; + } + return this._map.get(schema); + } + has(schema) { + return this._map.has(schema); + } + }; + __name($ZodRegistry, "$ZodRegistry"); + __name(registry, "registry"); + (_a123 = globalThis).__zod_globalRegistry ?? (_a123.__zod_globalRegistry = registry()); + globalRegistry = globalThis.__zod_globalRegistry; + } +}); + +// ../../node_modules/zod/v4/core/api.js +function _string(Class2, params) { + return new Class2({ + type: "string", + ...normalizeParams(params) + }); +} +function _coercedString(Class2, params) { + return new Class2({ + type: "string", + coerce: true, + ...normalizeParams(params) + }); +} +function _email(Class2, params) { + return new Class2({ + type: "string", + format: "email", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _guid(Class2, params) { + return new Class2({ + type: "string", + format: "guid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _uuid(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _uuidv4(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v4", + ...normalizeParams(params) + }); +} +function _uuidv6(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v6", + ...normalizeParams(params) + }); +} +function _uuidv7(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v7", + ...normalizeParams(params) + }); +} +function _url(Class2, params) { + return new Class2({ + type: "string", + format: "url", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _emoji2(Class2, params) { + return new Class2({ + type: "string", + format: "emoji", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _nanoid(Class2, params) { + return new Class2({ + type: "string", + format: "nanoid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cuid(Class2, params) { + return new Class2({ + type: "string", + format: "cuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cuid2(Class2, params) { + return new Class2({ + type: "string", + format: "cuid2", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ulid(Class2, params) { + return new Class2({ + type: "string", + format: "ulid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _xid(Class2, params) { + return new Class2({ + type: "string", + format: "xid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ksuid(Class2, params) { + return new Class2({ + type: "string", + format: "ksuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ipv4(Class2, params) { + return new Class2({ + type: "string", + format: "ipv4", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ipv6(Class2, params) { + return new Class2({ + type: "string", + format: "ipv6", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _mac(Class2, params) { + return new Class2({ + type: "string", + format: "mac", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cidrv4(Class2, params) { + return new Class2({ + type: "string", + format: "cidrv4", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cidrv6(Class2, params) { + return new Class2({ + type: "string", + format: "cidrv6", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _base64(Class2, params) { + return new Class2({ + type: "string", + format: "base64", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _base64url(Class2, params) { + return new Class2({ + type: "string", + format: "base64url", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _e164(Class2, params) { + return new Class2({ + type: "string", + format: "e164", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _jwt(Class2, params) { + return new Class2({ + type: "string", + format: "jwt", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _isoDateTime(Class2, params) { + return new Class2({ + type: "string", + format: "datetime", + check: "string_format", + offset: false, + local: false, + precision: null, + ...normalizeParams(params) + }); +} +function _isoDate(Class2, params) { + return new Class2({ + type: "string", + format: "date", + check: "string_format", + ...normalizeParams(params) + }); +} +function _isoTime(Class2, params) { + return new Class2({ + type: "string", + format: "time", + check: "string_format", + precision: null, + ...normalizeParams(params) + }); +} +function _isoDuration(Class2, params) { + return new Class2({ + type: "string", + format: "duration", + check: "string_format", + ...normalizeParams(params) + }); +} +function _number(Class2, params) { + return new Class2({ + type: "number", + checks: [], + ...normalizeParams(params) + }); +} +function _coercedNumber(Class2, params) { + return new Class2({ + type: "number", + coerce: true, + checks: [], + ...normalizeParams(params) + }); +} +function _int(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "safeint", + ...normalizeParams(params) + }); +} +function _float32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "float32", + ...normalizeParams(params) + }); +} +function _float64(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "float64", + ...normalizeParams(params) + }); +} +function _int32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "int32", + ...normalizeParams(params) + }); +} +function _uint32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "uint32", + ...normalizeParams(params) + }); +} +function _boolean(Class2, params) { + return new Class2({ + type: "boolean", + ...normalizeParams(params) + }); +} +function _coercedBoolean(Class2, params) { + return new Class2({ + type: "boolean", + coerce: true, + ...normalizeParams(params) + }); +} +function _bigint(Class2, params) { + return new Class2({ + type: "bigint", + ...normalizeParams(params) + }); +} +function _coercedBigint(Class2, params) { + return new Class2({ + type: "bigint", + coerce: true, + ...normalizeParams(params) + }); +} +function _int64(Class2, params) { + return new Class2({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "int64", + ...normalizeParams(params) + }); +} +function _uint64(Class2, params) { + return new Class2({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "uint64", + ...normalizeParams(params) + }); +} +function _symbol(Class2, params) { + return new Class2({ + type: "symbol", + ...normalizeParams(params) + }); +} +function _undefined2(Class2, params) { + return new Class2({ + type: "undefined", + ...normalizeParams(params) + }); +} +function _null2(Class2, params) { + return new Class2({ + type: "null", + ...normalizeParams(params) + }); +} +function _any(Class2) { + return new Class2({ + type: "any" + }); +} +function _unknown(Class2) { + return new Class2({ + type: "unknown" + }); +} +function _never(Class2, params) { + return new Class2({ + type: "never", + ...normalizeParams(params) + }); +} +function _void(Class2, params) { + return new Class2({ + type: "void", + ...normalizeParams(params) + }); +} +function _date(Class2, params) { + return new Class2({ + type: "date", + ...normalizeParams(params) + }); +} +function _coercedDate(Class2, params) { + return new Class2({ + type: "date", + coerce: true, + ...normalizeParams(params) + }); +} +function _nan(Class2, params) { + return new Class2({ + type: "nan", + ...normalizeParams(params) + }); +} +function _lt(value, params) { + return new $ZodCheckLessThan({ + check: "less_than", + ...normalizeParams(params), + value, + inclusive: false + }); +} +function _lte(value, params) { + return new $ZodCheckLessThan({ + check: "less_than", + ...normalizeParams(params), + value, + inclusive: true + }); +} +function _gt(value, params) { + return new $ZodCheckGreaterThan({ + check: "greater_than", + ...normalizeParams(params), + value, + inclusive: false + }); +} +function _gte(value, params) { + return new $ZodCheckGreaterThan({ + check: "greater_than", + ...normalizeParams(params), + value, + inclusive: true + }); +} +function _positive(params) { + return _gt(0, params); +} +function _negative(params) { + return _lt(0, params); +} +function _nonpositive(params) { + return _lte(0, params); +} +function _nonnegative(params) { + return _gte(0, params); +} +function _multipleOf(value, params) { + return new $ZodCheckMultipleOf({ + check: "multiple_of", + ...normalizeParams(params), + value + }); +} +function _maxSize(maximum, params) { + return new $ZodCheckMaxSize({ + check: "max_size", + ...normalizeParams(params), + maximum + }); +} +function _minSize(minimum, params) { + return new $ZodCheckMinSize({ + check: "min_size", + ...normalizeParams(params), + minimum + }); +} +function _size(size, params) { + return new $ZodCheckSizeEquals({ + check: "size_equals", + ...normalizeParams(params), + size + }); +} +function _maxLength(maximum, params) { + const ch2 = new $ZodCheckMaxLength({ + check: "max_length", + ...normalizeParams(params), + maximum + }); + return ch2; +} +function _minLength(minimum, params) { + return new $ZodCheckMinLength({ + check: "min_length", + ...normalizeParams(params), + minimum + }); +} +function _length(length, params) { + return new $ZodCheckLengthEquals({ + check: "length_equals", + ...normalizeParams(params), + length + }); +} +function _regex(pattern, params) { + return new $ZodCheckRegex({ + check: "string_format", + format: "regex", + ...normalizeParams(params), + pattern + }); +} +function _lowercase(params) { + return new $ZodCheckLowerCase({ + check: "string_format", + format: "lowercase", + ...normalizeParams(params) + }); +} +function _uppercase(params) { + return new $ZodCheckUpperCase({ + check: "string_format", + format: "uppercase", + ...normalizeParams(params) + }); +} +function _includes(includes, params) { + return new $ZodCheckIncludes({ + check: "string_format", + format: "includes", + ...normalizeParams(params), + includes + }); +} +function _startsWith(prefix, params) { + return new $ZodCheckStartsWith({ + check: "string_format", + format: "starts_with", + ...normalizeParams(params), + prefix + }); +} +function _endsWith(suffix, params) { + return new $ZodCheckEndsWith({ + check: "string_format", + format: "ends_with", + ...normalizeParams(params), + suffix + }); +} +function _property(property, schema, params) { + return new $ZodCheckProperty({ + check: "property", + property, + schema, + ...normalizeParams(params) + }); +} +function _mime(types, params) { + return new $ZodCheckMimeType({ + check: "mime_type", + mime: types, + ...normalizeParams(params) + }); +} +function _overwrite(tx) { + return new $ZodCheckOverwrite({ + check: "overwrite", + tx + }); +} +function _normalize(form) { + return _overwrite((input) => input.normalize(form)); +} +function _trim() { + return _overwrite((input) => input.trim()); +} +function _toLowerCase() { + return _overwrite((input) => input.toLowerCase()); +} +function _toUpperCase() { + return _overwrite((input) => input.toUpperCase()); +} +function _slugify() { + return _overwrite((input) => slugify(input)); +} +function _array(Class2, element, params) { + return new Class2({ + type: "array", + element, + // get element() { + // return element; + // }, + ...normalizeParams(params) + }); +} +function _union(Class2, options, params) { + return new Class2({ + type: "union", + options, + ...normalizeParams(params) + }); +} +function _xor(Class2, options, params) { + return new Class2({ + type: "union", + options, + inclusive: false, + ...normalizeParams(params) + }); +} +function _discriminatedUnion(Class2, discriminator, options, params) { + return new Class2({ + type: "union", + options, + discriminator, + ...normalizeParams(params) + }); +} +function _intersection(Class2, left, right) { + return new Class2({ + type: "intersection", + left, + right + }); +} +function _tuple(Class2, items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new Class2({ + type: "tuple", + items, + rest, + ...normalizeParams(params) + }); +} +function _record(Class2, keyType, valueType, params) { + return new Class2({ + type: "record", + keyType, + valueType, + ...normalizeParams(params) + }); +} +function _map(Class2, keyType, valueType, params) { + return new Class2({ + type: "map", + keyType, + valueType, + ...normalizeParams(params) + }); +} +function _set(Class2, valueType, params) { + return new Class2({ + type: "set", + valueType, + ...normalizeParams(params) + }); +} +function _enum(Class2, values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v3) => [v3, v3])) : values; + return new Class2({ + type: "enum", + entries, + ...normalizeParams(params) + }); +} +function _nativeEnum(Class2, entries, params) { + return new Class2({ + type: "enum", + entries, + ...normalizeParams(params) + }); +} +function _literal(Class2, value, params) { + return new Class2({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...normalizeParams(params) + }); +} +function _file(Class2, params) { + return new Class2({ + type: "file", + ...normalizeParams(params) + }); +} +function _transform(Class2, fn) { + return new Class2({ + type: "transform", + transform: fn + }); +} +function _optional(Class2, innerType) { + return new Class2({ + type: "optional", + innerType + }); +} +function _nullable(Class2, innerType) { + return new Class2({ + type: "nullable", + innerType + }); +} +function _default(Class2, innerType, defaultValue) { + return new Class2({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue); + } + }); +} +function _nonoptional(Class2, innerType, params) { + return new Class2({ + type: "nonoptional", + innerType, + ...normalizeParams(params) + }); +} +function _success(Class2, innerType) { + return new Class2({ + type: "success", + innerType + }); +} +function _catch(Class2, innerType, catchValue) { + return new Class2({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +function _pipe(Class2, in_, out) { + return new Class2({ + type: "pipe", + in: in_, + out + }); +} +function _readonly(Class2, innerType) { + return new Class2({ + type: "readonly", + innerType + }); +} +function _templateLiteral(Class2, parts, params) { + return new Class2({ + type: "template_literal", + parts, + ...normalizeParams(params) + }); +} +function _lazy(Class2, getter) { + return new Class2({ + type: "lazy", + getter + }); +} +function _promise(Class2, innerType) { + return new Class2({ + type: "promise", + innerType + }); +} +function _custom(Class2, fn, _params) { + const norm = normalizeParams(_params); + norm.abort ?? (norm.abort = true); + const schema = new Class2({ + type: "custom", + check: "custom", + fn, + ...norm + }); + return schema; +} +function _refine(Class2, fn, _params) { + const schema = new Class2({ + type: "custom", + check: "custom", + fn, + ...normalizeParams(_params) + }); + return schema; +} +function _superRefine(fn) { + const ch2 = _check((payload) => { + payload.addIssue = (issue2) => { + if (typeof issue2 === "string") { + payload.issues.push(issue(issue2, payload.value, ch2._zod.def)); + } else { + const _issue = issue2; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = ch2); + _issue.continue ?? (_issue.continue = !ch2._zod.def.abort); + payload.issues.push(issue(_issue)); + } + }; + return fn(payload.value, payload); + }); + return ch2; +} +function _check(fn, params) { + const ch2 = new $ZodCheck({ + check: "custom", + ...normalizeParams(params) + }); + ch2._zod.check = fn; + return ch2; +} +function describe(description) { + const ch2 = new $ZodCheck({ check: "describe" }); + ch2._zod.onattach = [ + (inst) => { + const existing = globalRegistry.get(inst) ?? {}; + globalRegistry.add(inst, { ...existing, description }); + } + ]; + ch2._zod.check = () => { + }; + return ch2; +} +function meta(metadata) { + const ch2 = new $ZodCheck({ check: "meta" }); + ch2._zod.onattach = [ + (inst) => { + const existing = globalRegistry.get(inst) ?? {}; + globalRegistry.add(inst, { ...existing, ...metadata }); + } + ]; + ch2._zod.check = () => { + }; + return ch2; +} +function _stringbool(Classes, _params) { + const params = normalizeParams(_params); + let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"]; + let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"]; + if (params.case !== "sensitive") { + truthyArray = truthyArray.map((v3) => typeof v3 === "string" ? v3.toLowerCase() : v3); + falsyArray = falsyArray.map((v3) => typeof v3 === "string" ? v3.toLowerCase() : v3); + } + const truthySet = new Set(truthyArray); + const falsySet = new Set(falsyArray); + const _Codec = Classes.Codec ?? $ZodCodec; + const _Boolean = Classes.Boolean ?? $ZodBoolean; + const _String = Classes.String ?? $ZodString; + const stringSchema = new _String({ type: "string", error: params.error }); + const booleanSchema = new _Boolean({ type: "boolean", error: params.error }); + const codec2 = new _Codec({ + type: "pipe", + in: stringSchema, + out: booleanSchema, + transform: (input, payload) => { + let data = input; + if (params.case !== "sensitive") + data = data.toLowerCase(); + if (truthySet.has(data)) { + return true; + } else if (falsySet.has(data)) { + return false; + } else { + payload.issues.push({ + code: "invalid_value", + expected: "stringbool", + values: [...truthySet, ...falsySet], + input: payload.value, + inst: codec2, + continue: false + }); + return {}; + } + }, + reverseTransform: (input, _payload) => { + if (input === true) { + return truthyArray[0] || "true"; + } else { + return falsyArray[0] || "false"; + } + }, + error: params.error + }); + return codec2; +} +function _stringFormat(Class2, format2, fnOrRegex, _params = {}) { + const params = normalizeParams(_params); + const def = { + ...normalizeParams(_params), + check: "string_format", + type: "string", + format: format2, + fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val), + ...params + }; + if (fnOrRegex instanceof RegExp) { + def.pattern = fnOrRegex; + } + const inst = new Class2(def); + return inst; +} +var TimePrecision; +var init_api = __esm({ + "../../node_modules/zod/v4/core/api.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_checks2(); + init_registries(); + init_schemas(); + init_util3(); + __name(_string, "_string"); + __name(_coercedString, "_coercedString"); + __name(_email, "_email"); + __name(_guid, "_guid"); + __name(_uuid, "_uuid"); + __name(_uuidv4, "_uuidv4"); + __name(_uuidv6, "_uuidv6"); + __name(_uuidv7, "_uuidv7"); + __name(_url, "_url"); + __name(_emoji2, "_emoji"); + __name(_nanoid, "_nanoid"); + __name(_cuid, "_cuid"); + __name(_cuid2, "_cuid2"); + __name(_ulid, "_ulid"); + __name(_xid, "_xid"); + __name(_ksuid, "_ksuid"); + __name(_ipv4, "_ipv4"); + __name(_ipv6, "_ipv6"); + __name(_mac, "_mac"); + __name(_cidrv4, "_cidrv4"); + __name(_cidrv6, "_cidrv6"); + __name(_base64, "_base64"); + __name(_base64url, "_base64url"); + __name(_e164, "_e164"); + __name(_jwt, "_jwt"); + TimePrecision = { + Any: null, + Minute: -1, + Second: 0, + Millisecond: 3, + Microsecond: 6 + }; + __name(_isoDateTime, "_isoDateTime"); + __name(_isoDate, "_isoDate"); + __name(_isoTime, "_isoTime"); + __name(_isoDuration, "_isoDuration"); + __name(_number, "_number"); + __name(_coercedNumber, "_coercedNumber"); + __name(_int, "_int"); + __name(_float32, "_float32"); + __name(_float64, "_float64"); + __name(_int32, "_int32"); + __name(_uint32, "_uint32"); + __name(_boolean, "_boolean"); + __name(_coercedBoolean, "_coercedBoolean"); + __name(_bigint, "_bigint"); + __name(_coercedBigint, "_coercedBigint"); + __name(_int64, "_int64"); + __name(_uint64, "_uint64"); + __name(_symbol, "_symbol"); + __name(_undefined2, "_undefined"); + __name(_null2, "_null"); + __name(_any, "_any"); + __name(_unknown, "_unknown"); + __name(_never, "_never"); + __name(_void, "_void"); + __name(_date, "_date"); + __name(_coercedDate, "_coercedDate"); + __name(_nan, "_nan"); + __name(_lt, "_lt"); + __name(_lte, "_lte"); + __name(_gt, "_gt"); + __name(_gte, "_gte"); + __name(_positive, "_positive"); + __name(_negative, "_negative"); + __name(_nonpositive, "_nonpositive"); + __name(_nonnegative, "_nonnegative"); + __name(_multipleOf, "_multipleOf"); + __name(_maxSize, "_maxSize"); + __name(_minSize, "_minSize"); + __name(_size, "_size"); + __name(_maxLength, "_maxLength"); + __name(_minLength, "_minLength"); + __name(_length, "_length"); + __name(_regex, "_regex"); + __name(_lowercase, "_lowercase"); + __name(_uppercase, "_uppercase"); + __name(_includes, "_includes"); + __name(_startsWith, "_startsWith"); + __name(_endsWith, "_endsWith"); + __name(_property, "_property"); + __name(_mime, "_mime"); + __name(_overwrite, "_overwrite"); + __name(_normalize, "_normalize"); + __name(_trim, "_trim"); + __name(_toLowerCase, "_toLowerCase"); + __name(_toUpperCase, "_toUpperCase"); + __name(_slugify, "_slugify"); + __name(_array, "_array"); + __name(_union, "_union"); + __name(_xor, "_xor"); + __name(_discriminatedUnion, "_discriminatedUnion"); + __name(_intersection, "_intersection"); + __name(_tuple, "_tuple"); + __name(_record, "_record"); + __name(_map, "_map"); + __name(_set, "_set"); + __name(_enum, "_enum"); + __name(_nativeEnum, "_nativeEnum"); + __name(_literal, "_literal"); + __name(_file, "_file"); + __name(_transform, "_transform"); + __name(_optional, "_optional"); + __name(_nullable, "_nullable"); + __name(_default, "_default"); + __name(_nonoptional, "_nonoptional"); + __name(_success, "_success"); + __name(_catch, "_catch"); + __name(_pipe, "_pipe"); + __name(_readonly, "_readonly"); + __name(_templateLiteral, "_templateLiteral"); + __name(_lazy, "_lazy"); + __name(_promise, "_promise"); + __name(_custom, "_custom"); + __name(_refine, "_refine"); + __name(_superRefine, "_superRefine"); + __name(_check, "_check"); + __name(describe, "describe"); + __name(meta, "meta"); + __name(_stringbool, "_stringbool"); + __name(_stringFormat, "_stringFormat"); + } +}); + +// ../../node_modules/zod/v4/core/to-json-schema.js +function initializeContext(params) { + let target = params?.target ?? "draft-2020-12"; + if (target === "draft-4") + target = "draft-04"; + if (target === "draft-7") + target = "draft-07"; + return { + processors: params.processors ?? {}, + metadataRegistry: params?.metadata ?? globalRegistry, + target, + unrepresentable: params?.unrepresentable ?? "throw", + override: params?.override ?? (() => { + }), + io: params?.io ?? "output", + counter: 0, + seen: /* @__PURE__ */ new Map(), + cycles: params?.cycles ?? "ref", + reused: params?.reused ?? "inline", + external: params?.external ?? void 0 + }; +} +function process2(schema, ctx, _params = { path: [], schemaPath: [] }) { + var _a124; + const def = schema._zod.def; + const seen = ctx.seen.get(schema); + if (seen) { + seen.count++; + const isCycle = _params.schemaPath.includes(schema); + if (isCycle) { + seen.cycle = _params.path; + } + return seen.schema; + } + const result = { schema: {}, count: 1, cycle: void 0, path: _params.path }; + ctx.seen.set(schema, result); + const overrideSchema = schema._zod.toJSONSchema?.(); + if (overrideSchema) { + result.schema = overrideSchema; + } else { + const params = { + ..._params, + schemaPath: [..._params.schemaPath, schema], + path: _params.path + }; + if (schema._zod.processJSONSchema) { + schema._zod.processJSONSchema(ctx, result.schema, params); + } else { + const _json = result.schema; + const processor = ctx.processors[def.type]; + if (!processor) { + throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`); + } + processor(schema, ctx, _json, params); + } + const parent = schema._zod.parent; + if (parent) { + if (!result.ref) + result.ref = parent; + process2(parent, ctx, params); + ctx.seen.get(parent).isParent = true; + } + } + const meta3 = ctx.metadataRegistry.get(schema); + if (meta3) + Object.assign(result.schema, meta3); + if (ctx.io === "input" && isTransforming(schema)) { + delete result.schema.examples; + delete result.schema.default; + } + if (ctx.io === "input" && result.schema._prefault) + (_a124 = result.schema).default ?? (_a124.default = result.schema._prefault); + delete result.schema._prefault; + const _result = ctx.seen.get(schema); + return _result.schema; +} +function extractDefs(ctx, schema) { + const root = ctx.seen.get(schema); + if (!root) + throw new Error("Unprocessed schema. This is a bug in Zod."); + const idToSchema = /* @__PURE__ */ new Map(); + for (const entry of ctx.seen.entries()) { + const id = ctx.metadataRegistry.get(entry[0])?.id; + if (id) { + const existing = idToSchema.get(id); + if (existing && existing !== entry[0]) { + throw new Error(`Duplicate schema id "${id}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`); + } + idToSchema.set(id, entry[0]); + } + } + const makeURI = /* @__PURE__ */ __name((entry) => { + const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions"; + if (ctx.external) { + const externalId = ctx.external.registry.get(entry[0])?.id; + const uriGenerator = ctx.external.uri ?? ((id2) => id2); + if (externalId) { + return { ref: uriGenerator(externalId) }; + } + const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`; + entry[1].defId = id; + return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` }; + } + if (entry[1] === root) { + return { ref: "#" }; + } + const uriPrefix = `#`; + const defUriPrefix = `${uriPrefix}/${defsSegment}/`; + const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`; + return { defId, ref: defUriPrefix + defId }; + }, "makeURI"); + const extractToDef = /* @__PURE__ */ __name((entry) => { + if (entry[1].schema.$ref) { + return; + } + const seen = entry[1]; + const { ref, defId } = makeURI(entry); + seen.def = { ...seen.schema }; + if (defId) + seen.defId = defId; + const schema2 = seen.schema; + for (const key in schema2) { + delete schema2[key]; + } + schema2.$ref = ref; + }, "extractToDef"); + if (ctx.cycles === "throw") { + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (seen.cycle) { + throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); + } + } + } + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (schema === entry[0]) { + extractToDef(entry); + continue; + } + if (ctx.external) { + const ext = ctx.external.registry.get(entry[0])?.id; + if (schema !== entry[0] && ext) { + extractToDef(entry); + continue; + } + } + const id = ctx.metadataRegistry.get(entry[0])?.id; + if (id) { + extractToDef(entry); + continue; + } + if (seen.cycle) { + extractToDef(entry); + continue; + } + if (seen.count > 1) { + if (ctx.reused === "ref") { + extractToDef(entry); + continue; + } + } + } +} +function finalize(ctx, schema) { + const root = ctx.seen.get(schema); + if (!root) + throw new Error("Unprocessed schema. This is a bug in Zod."); + const flattenRef = /* @__PURE__ */ __name((zodSchema) => { + const seen = ctx.seen.get(zodSchema); + if (seen.ref === null) + return; + const schema2 = seen.def ?? seen.schema; + const _cached = { ...schema2 }; + const ref = seen.ref; + seen.ref = null; + if (ref) { + flattenRef(ref); + const refSeen = ctx.seen.get(ref); + const refSchema = refSeen.schema; + if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) { + schema2.allOf = schema2.allOf ?? []; + schema2.allOf.push(refSchema); + } else { + Object.assign(schema2, refSchema); + } + Object.assign(schema2, _cached); + const isParentRef = zodSchema._zod.parent === ref; + if (isParentRef) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (!(key in _cached)) { + delete schema2[key]; + } + } + } + if (refSchema.$ref && refSeen.def) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (key in refSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(refSeen.def[key])) { + delete schema2[key]; + } + } + } + } + const parent = zodSchema._zod.parent; + if (parent && parent !== ref) { + flattenRef(parent); + const parentSeen = ctx.seen.get(parent); + if (parentSeen?.schema.$ref) { + schema2.$ref = parentSeen.schema.$ref; + if (parentSeen.def) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (key in parentSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(parentSeen.def[key])) { + delete schema2[key]; + } + } + } + } + } + ctx.override({ + zodSchema, + jsonSchema: schema2, + path: seen.path ?? [] + }); + }, "flattenRef"); + for (const entry of [...ctx.seen.entries()].reverse()) { + flattenRef(entry[0]); + } + const result = {}; + if (ctx.target === "draft-2020-12") { + result.$schema = "https://json-schema.org/draft/2020-12/schema"; + } else if (ctx.target === "draft-07") { + result.$schema = "http://json-schema.org/draft-07/schema#"; + } else if (ctx.target === "draft-04") { + result.$schema = "http://json-schema.org/draft-04/schema#"; + } else if (ctx.target === "openapi-3.0") { + } else { + } + if (ctx.external?.uri) { + const id = ctx.external.registry.get(schema)?.id; + if (!id) + throw new Error("Schema is missing an `id` property"); + result.$id = ctx.external.uri(id); + } + Object.assign(result, root.def ?? root.schema); + const defs = ctx.external?.defs ?? {}; + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (seen.def && seen.defId) { + defs[seen.defId] = seen.def; + } + } + if (ctx.external) { + } else { + if (Object.keys(defs).length > 0) { + if (ctx.target === "draft-2020-12") { + result.$defs = defs; + } else { + result.definitions = defs; + } + } + } + try { + const finalized = JSON.parse(JSON.stringify(result)); + Object.defineProperty(finalized, "~standard", { + value: { + ...schema["~standard"], + jsonSchema: { + input: createStandardJSONSchemaMethod(schema, "input", ctx.processors), + output: createStandardJSONSchemaMethod(schema, "output", ctx.processors) + } + }, + enumerable: false, + writable: false + }); + return finalized; + } catch (_err) { + throw new Error("Error converting schema to JSON."); + } +} +function isTransforming(_schema, _ctx) { + const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() }; + if (ctx.seen.has(_schema)) + return false; + ctx.seen.add(_schema); + const def = _schema._zod.def; + if (def.type === "transform") + return true; + if (def.type === "array") + return isTransforming(def.element, ctx); + if (def.type === "set") + return isTransforming(def.valueType, ctx); + if (def.type === "lazy") + return isTransforming(def.getter(), ctx); + if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") { + return isTransforming(def.innerType, ctx); + } + if (def.type === "intersection") { + return isTransforming(def.left, ctx) || isTransforming(def.right, ctx); + } + if (def.type === "record" || def.type === "map") { + return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx); + } + if (def.type === "pipe") { + return isTransforming(def.in, ctx) || isTransforming(def.out, ctx); + } + if (def.type === "object") { + for (const key in def.shape) { + if (isTransforming(def.shape[key], ctx)) + return true; + } + return false; + } + if (def.type === "union") { + for (const option of def.options) { + if (isTransforming(option, ctx)) + return true; + } + return false; + } + if (def.type === "tuple") { + for (const item of def.items) { + if (isTransforming(item, ctx)) + return true; + } + if (def.rest && isTransforming(def.rest, ctx)) + return true; + return false; + } + return false; +} +var createToJSONSchemaMethod, createStandardJSONSchemaMethod; +var init_to_json_schema = __esm({ + "../../node_modules/zod/v4/core/to-json-schema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_registries(); + __name(initializeContext, "initializeContext"); + __name(process2, "process"); + __name(extractDefs, "extractDefs"); + __name(finalize, "finalize"); + __name(isTransforming, "isTransforming"); + createToJSONSchemaMethod = /* @__PURE__ */ __name((schema, processors = {}) => (params) => { + const ctx = initializeContext({ ...params, processors }); + process2(schema, ctx); + extractDefs(ctx, schema); + return finalize(ctx, schema); + }, "createToJSONSchemaMethod"); + createStandardJSONSchemaMethod = /* @__PURE__ */ __name((schema, io, processors = {}) => (params) => { + const { libraryOptions, target } = params ?? {}; + const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors }); + process2(schema, ctx); + extractDefs(ctx, schema); + return finalize(ctx, schema); + }, "createStandardJSONSchemaMethod"); + } +}); + +// ../../node_modules/zod/v4/core/json-schema-processors.js +function toJSONSchema(input, params) { + if ("_idmap" in input) { + const registry2 = input; + const ctx2 = initializeContext({ ...params, processors: allProcessors }); + const defs = {}; + for (const entry of registry2._idmap.entries()) { + const [_, schema] = entry; + process2(schema, ctx2); + } + const schemas = {}; + const external = { + registry: registry2, + uri: params?.uri, + defs + }; + ctx2.external = external; + for (const entry of registry2._idmap.entries()) { + const [key, schema] = entry; + extractDefs(ctx2, schema); + schemas[key] = finalize(ctx2, schema); + } + if (Object.keys(defs).length > 0) { + const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions"; + schemas.__shared = { + [defsSegment]: defs + }; + } + return { schemas }; + } + const ctx = initializeContext({ ...params, processors: allProcessors }); + process2(input, ctx); + extractDefs(ctx, input); + return finalize(ctx, input); +} +var formatMap, stringProcessor, numberProcessor, booleanProcessor, bigintProcessor, symbolProcessor, nullProcessor, undefinedProcessor, voidProcessor, neverProcessor, anyProcessor, unknownProcessor, dateProcessor, enumProcessor, literalProcessor, nanProcessor, templateLiteralProcessor, fileProcessor, successProcessor, customProcessor, functionProcessor, transformProcessor, mapProcessor, setProcessor, arrayProcessor, objectProcessor, unionProcessor, intersectionProcessor, tupleProcessor, recordProcessor, nullableProcessor, nonoptionalProcessor, defaultProcessor, prefaultProcessor, catchProcessor, pipeProcessor, readonlyProcessor, promiseProcessor, optionalProcessor, lazyProcessor, allProcessors; +var init_json_schema_processors = __esm({ + "../../node_modules/zod/v4/core/json-schema-processors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_to_json_schema(); + init_util3(); + formatMap = { + guid: "uuid", + url: "uri", + datetime: "date-time", + json_string: "json-string", + regex: "" + // do not set + }; + stringProcessor = /* @__PURE__ */ __name((schema, ctx, _json, _params) => { + const json2 = _json; + json2.type = "string"; + const { minimum, maximum, format: format2, patterns, contentEncoding } = schema._zod.bag; + if (typeof minimum === "number") + json2.minLength = minimum; + if (typeof maximum === "number") + json2.maxLength = maximum; + if (format2) { + json2.format = formatMap[format2] ?? format2; + if (json2.format === "") + delete json2.format; + if (format2 === "time") { + delete json2.format; + } + } + if (contentEncoding) + json2.contentEncoding = contentEncoding; + if (patterns && patterns.size > 0) { + const regexes = [...patterns]; + if (regexes.length === 1) + json2.pattern = regexes[0].source; + else if (regexes.length > 1) { + json2.allOf = [ + ...regexes.map((regex) => ({ + ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {}, + pattern: regex.source + })) + ]; + } + } + }, "stringProcessor"); + numberProcessor = /* @__PURE__ */ __name((schema, ctx, _json, _params) => { + const json2 = _json; + const { minimum, maximum, format: format2, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag; + if (typeof format2 === "string" && format2.includes("int")) + json2.type = "integer"; + else + json2.type = "number"; + if (typeof exclusiveMinimum === "number") { + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json2.minimum = exclusiveMinimum; + json2.exclusiveMinimum = true; + } else { + json2.exclusiveMinimum = exclusiveMinimum; + } + } + if (typeof minimum === "number") { + json2.minimum = minimum; + if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") { + if (exclusiveMinimum >= minimum) + delete json2.minimum; + else + delete json2.exclusiveMinimum; + } + } + if (typeof exclusiveMaximum === "number") { + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json2.maximum = exclusiveMaximum; + json2.exclusiveMaximum = true; + } else { + json2.exclusiveMaximum = exclusiveMaximum; + } + } + if (typeof maximum === "number") { + json2.maximum = maximum; + if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") { + if (exclusiveMaximum <= maximum) + delete json2.maximum; + else + delete json2.exclusiveMaximum; + } + } + if (typeof multipleOf === "number") + json2.multipleOf = multipleOf; + }, "numberProcessor"); + booleanProcessor = /* @__PURE__ */ __name((_schema, _ctx, json2, _params) => { + json2.type = "boolean"; + }, "booleanProcessor"); + bigintProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("BigInt cannot be represented in JSON Schema"); + } + }, "bigintProcessor"); + symbolProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Symbols cannot be represented in JSON Schema"); + } + }, "symbolProcessor"); + nullProcessor = /* @__PURE__ */ __name((_schema, ctx, json2, _params) => { + if (ctx.target === "openapi-3.0") { + json2.type = "string"; + json2.nullable = true; + json2.enum = [null]; + } else { + json2.type = "null"; + } + }, "nullProcessor"); + undefinedProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Undefined cannot be represented in JSON Schema"); + } + }, "undefinedProcessor"); + voidProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Void cannot be represented in JSON Schema"); + } + }, "voidProcessor"); + neverProcessor = /* @__PURE__ */ __name((_schema, _ctx, json2, _params) => { + json2.not = {}; + }, "neverProcessor"); + anyProcessor = /* @__PURE__ */ __name((_schema, _ctx, _json, _params) => { + }, "anyProcessor"); + unknownProcessor = /* @__PURE__ */ __name((_schema, _ctx, _json, _params) => { + }, "unknownProcessor"); + dateProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Date cannot be represented in JSON Schema"); + } + }, "dateProcessor"); + enumProcessor = /* @__PURE__ */ __name((schema, _ctx, json2, _params) => { + const def = schema._zod.def; + const values = getEnumValues(def.entries); + if (values.every((v3) => typeof v3 === "number")) + json2.type = "number"; + if (values.every((v3) => typeof v3 === "string")) + json2.type = "string"; + json2.enum = values; + }, "enumProcessor"); + literalProcessor = /* @__PURE__ */ __name((schema, ctx, json2, _params) => { + const def = schema._zod.def; + const vals = []; + for (const val of def.values) { + if (val === void 0) { + if (ctx.unrepresentable === "throw") { + throw new Error("Literal `undefined` cannot be represented in JSON Schema"); + } else { + } + } else if (typeof val === "bigint") { + if (ctx.unrepresentable === "throw") { + throw new Error("BigInt literals cannot be represented in JSON Schema"); + } else { + vals.push(Number(val)); + } + } else { + vals.push(val); + } + } + if (vals.length === 0) { + } else if (vals.length === 1) { + const val = vals[0]; + json2.type = val === null ? "null" : typeof val; + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json2.enum = [val]; + } else { + json2.const = val; + } + } else { + if (vals.every((v3) => typeof v3 === "number")) + json2.type = "number"; + if (vals.every((v3) => typeof v3 === "string")) + json2.type = "string"; + if (vals.every((v3) => typeof v3 === "boolean")) + json2.type = "boolean"; + if (vals.every((v3) => v3 === null)) + json2.type = "null"; + json2.enum = vals; + } + }, "literalProcessor"); + nanProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("NaN cannot be represented in JSON Schema"); + } + }, "nanProcessor"); + templateLiteralProcessor = /* @__PURE__ */ __name((schema, _ctx, json2, _params) => { + const _json = json2; + const pattern = schema._zod.pattern; + if (!pattern) + throw new Error("Pattern not found in template literal"); + _json.type = "string"; + _json.pattern = pattern.source; + }, "templateLiteralProcessor"); + fileProcessor = /* @__PURE__ */ __name((schema, _ctx, json2, _params) => { + const _json = json2; + const file2 = { + type: "string", + format: "binary", + contentEncoding: "binary" + }; + const { minimum, maximum, mime } = schema._zod.bag; + if (minimum !== void 0) + file2.minLength = minimum; + if (maximum !== void 0) + file2.maxLength = maximum; + if (mime) { + if (mime.length === 1) { + file2.contentMediaType = mime[0]; + Object.assign(_json, file2); + } else { + Object.assign(_json, file2); + _json.anyOf = mime.map((m2) => ({ contentMediaType: m2 })); + } + } else { + Object.assign(_json, file2); + } + }, "fileProcessor"); + successProcessor = /* @__PURE__ */ __name((_schema, _ctx, json2, _params) => { + json2.type = "boolean"; + }, "successProcessor"); + customProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Custom types cannot be represented in JSON Schema"); + } + }, "customProcessor"); + functionProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Function types cannot be represented in JSON Schema"); + } + }, "functionProcessor"); + transformProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Transforms cannot be represented in JSON Schema"); + } + }, "transformProcessor"); + mapProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Map cannot be represented in JSON Schema"); + } + }, "mapProcessor"); + setProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Set cannot be represented in JSON Schema"); + } + }, "setProcessor"); + arrayProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const json2 = _json; + const def = schema._zod.def; + const { minimum, maximum } = schema._zod.bag; + if (typeof minimum === "number") + json2.minItems = minimum; + if (typeof maximum === "number") + json2.maxItems = maximum; + json2.type = "array"; + json2.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] }); + }, "arrayProcessor"); + objectProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const json2 = _json; + const def = schema._zod.def; + json2.type = "object"; + json2.properties = {}; + const shape = def.shape; + for (const key in shape) { + json2.properties[key] = process2(shape[key], ctx, { + ...params, + path: [...params.path, "properties", key] + }); + } + const allKeys = new Set(Object.keys(shape)); + const requiredKeys = new Set([...allKeys].filter((key) => { + const v3 = def.shape[key]._zod; + if (ctx.io === "input") { + return v3.optin === void 0; + } else { + return v3.optout === void 0; + } + })); + if (requiredKeys.size > 0) { + json2.required = Array.from(requiredKeys); + } + if (def.catchall?._zod.def.type === "never") { + json2.additionalProperties = false; + } else if (!def.catchall) { + if (ctx.io === "output") + json2.additionalProperties = false; + } else if (def.catchall) { + json2.additionalProperties = process2(def.catchall, ctx, { + ...params, + path: [...params.path, "additionalProperties"] + }); + } + }, "objectProcessor"); + unionProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + const isExclusive = def.inclusive === false; + const options = def.options.map((x2, i2) => process2(x2, ctx, { + ...params, + path: [...params.path, isExclusive ? "oneOf" : "anyOf", i2] + })); + if (isExclusive) { + json2.oneOf = options; + } else { + json2.anyOf = options; + } + }, "unionProcessor"); + intersectionProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + const a2 = process2(def.left, ctx, { + ...params, + path: [...params.path, "allOf", 0] + }); + const b2 = process2(def.right, ctx, { + ...params, + path: [...params.path, "allOf", 1] + }); + const isSimpleIntersection = /* @__PURE__ */ __name((val) => "allOf" in val && Object.keys(val).length === 1, "isSimpleIntersection"); + const allOf = [ + ...isSimpleIntersection(a2) ? a2.allOf : [a2], + ...isSimpleIntersection(b2) ? b2.allOf : [b2] + ]; + json2.allOf = allOf; + }, "intersectionProcessor"); + tupleProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const json2 = _json; + const def = schema._zod.def; + json2.type = "array"; + const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items"; + const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems"; + const prefixItems = def.items.map((x2, i2) => process2(x2, ctx, { + ...params, + path: [...params.path, prefixPath, i2] + })); + const rest = def.rest ? process2(def.rest, ctx, { + ...params, + path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []] + }) : null; + if (ctx.target === "draft-2020-12") { + json2.prefixItems = prefixItems; + if (rest) { + json2.items = rest; + } + } else if (ctx.target === "openapi-3.0") { + json2.items = { + anyOf: prefixItems + }; + if (rest) { + json2.items.anyOf.push(rest); + } + json2.minItems = prefixItems.length; + if (!rest) { + json2.maxItems = prefixItems.length; + } + } else { + json2.items = prefixItems; + if (rest) { + json2.additionalItems = rest; + } + } + const { minimum, maximum } = schema._zod.bag; + if (typeof minimum === "number") + json2.minItems = minimum; + if (typeof maximum === "number") + json2.maxItems = maximum; + }, "tupleProcessor"); + recordProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const json2 = _json; + const def = schema._zod.def; + json2.type = "object"; + const keyType = def.keyType; + const keyBag = keyType._zod.bag; + const patterns = keyBag?.patterns; + if (def.mode === "loose" && patterns && patterns.size > 0) { + const valueSchema = process2(def.valueType, ctx, { + ...params, + path: [...params.path, "patternProperties", "*"] + }); + json2.patternProperties = {}; + for (const pattern of patterns) { + json2.patternProperties[pattern.source] = valueSchema; + } + } else { + if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") { + json2.propertyNames = process2(def.keyType, ctx, { + ...params, + path: [...params.path, "propertyNames"] + }); + } + json2.additionalProperties = process2(def.valueType, ctx, { + ...params, + path: [...params.path, "additionalProperties"] + }); + } + const keyValues = keyType._zod.values; + if (keyValues) { + const validKeyValues = [...keyValues].filter((v3) => typeof v3 === "string" || typeof v3 === "number"); + if (validKeyValues.length > 0) { + json2.required = validKeyValues; + } + } + }, "recordProcessor"); + nullableProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + const inner = process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + if (ctx.target === "openapi-3.0") { + seen.ref = def.innerType; + json2.nullable = true; + } else { + json2.anyOf = [inner, { type: "null" }]; + } + }, "nullableProcessor"); + nonoptionalProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + }, "nonoptionalProcessor"); + defaultProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + json2.default = JSON.parse(JSON.stringify(def.defaultValue)); + }, "defaultProcessor"); + prefaultProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + if (ctx.io === "input") + json2._prefault = JSON.parse(JSON.stringify(def.defaultValue)); + }, "prefaultProcessor"); + catchProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + let catchValue; + try { + catchValue = def.catchValue(void 0); + } catch { + throw new Error("Dynamic catch values are not supported in JSON Schema"); + } + json2.default = catchValue; + }, "catchProcessor"); + pipeProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const def = schema._zod.def; + const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out; + process2(innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = innerType; + }, "pipeProcessor"); + readonlyProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + json2.readOnly = true; + }, "readonlyProcessor"); + promiseProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + }, "promiseProcessor"); + optionalProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + }, "optionalProcessor"); + lazyProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const innerType = schema._zod.innerType; + process2(innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = innerType; + }, "lazyProcessor"); + allProcessors = { + string: stringProcessor, + number: numberProcessor, + boolean: booleanProcessor, + bigint: bigintProcessor, + symbol: symbolProcessor, + null: nullProcessor, + undefined: undefinedProcessor, + void: voidProcessor, + never: neverProcessor, + any: anyProcessor, + unknown: unknownProcessor, + date: dateProcessor, + enum: enumProcessor, + literal: literalProcessor, + nan: nanProcessor, + template_literal: templateLiteralProcessor, + file: fileProcessor, + success: successProcessor, + custom: customProcessor, + function: functionProcessor, + transform: transformProcessor, + map: mapProcessor, + set: setProcessor, + array: arrayProcessor, + object: objectProcessor, + union: unionProcessor, + intersection: intersectionProcessor, + tuple: tupleProcessor, + record: recordProcessor, + nullable: nullableProcessor, + nonoptional: nonoptionalProcessor, + default: defaultProcessor, + prefault: prefaultProcessor, + catch: catchProcessor, + pipe: pipeProcessor, + readonly: readonlyProcessor, + promise: promiseProcessor, + optional: optionalProcessor, + lazy: lazyProcessor + }; + __name(toJSONSchema, "toJSONSchema"); + } +}); + +// ../../node_modules/zod/v4/core/json-schema-generator.js +var JSONSchemaGenerator; +var init_json_schema_generator = __esm({ + "../../node_modules/zod/v4/core/json-schema-generator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_json_schema_processors(); + init_to_json_schema(); + JSONSchemaGenerator = class { + /** @deprecated Access via ctx instead */ + get metadataRegistry() { + return this.ctx.metadataRegistry; + } + /** @deprecated Access via ctx instead */ + get target() { + return this.ctx.target; + } + /** @deprecated Access via ctx instead */ + get unrepresentable() { + return this.ctx.unrepresentable; + } + /** @deprecated Access via ctx instead */ + get override() { + return this.ctx.override; + } + /** @deprecated Access via ctx instead */ + get io() { + return this.ctx.io; + } + /** @deprecated Access via ctx instead */ + get counter() { + return this.ctx.counter; + } + set counter(value) { + this.ctx.counter = value; + } + /** @deprecated Access via ctx instead */ + get seen() { + return this.ctx.seen; + } + constructor(params) { + let normalizedTarget = params?.target ?? "draft-2020-12"; + if (normalizedTarget === "draft-4") + normalizedTarget = "draft-04"; + if (normalizedTarget === "draft-7") + normalizedTarget = "draft-07"; + this.ctx = initializeContext({ + processors: allProcessors, + target: normalizedTarget, + ...params?.metadata && { metadata: params.metadata }, + ...params?.unrepresentable && { unrepresentable: params.unrepresentable }, + ...params?.override && { override: params.override }, + ...params?.io && { io: params.io } + }); + } + /** + * Process a schema to prepare it for JSON Schema generation. + * This must be called before emit(). + */ + process(schema, _params = { path: [], schemaPath: [] }) { + return process2(schema, this.ctx, _params); + } + /** + * Emit the final JSON Schema after processing. + * Must call process() first. + */ + emit(schema, _params) { + if (_params) { + if (_params.cycles) + this.ctx.cycles = _params.cycles; + if (_params.reused) + this.ctx.reused = _params.reused; + if (_params.external) + this.ctx.external = _params.external; + } + extractDefs(this.ctx, schema); + const result = finalize(this.ctx, schema); + const { "~standard": _, ...plainResult } = result; + return plainResult; + } + }; + __name(JSONSchemaGenerator, "JSONSchemaGenerator"); + } +}); + +// ../../node_modules/zod/v4/core/json-schema.js +var json_schema_exports = {}; +var init_json_schema = __esm({ + "../../node_modules/zod/v4/core/json-schema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/zod/v4/core/index.js +var core_exports2 = {}; +__export(core_exports2, { + $ZodAny: () => $ZodAny, + $ZodArray: () => $ZodArray, + $ZodAsyncError: () => $ZodAsyncError, + $ZodBase64: () => $ZodBase64, + $ZodBase64URL: () => $ZodBase64URL, + $ZodBigInt: () => $ZodBigInt, + $ZodBigIntFormat: () => $ZodBigIntFormat, + $ZodBoolean: () => $ZodBoolean, + $ZodCIDRv4: () => $ZodCIDRv4, + $ZodCIDRv6: () => $ZodCIDRv6, + $ZodCUID: () => $ZodCUID, + $ZodCUID2: () => $ZodCUID2, + $ZodCatch: () => $ZodCatch, + $ZodCheck: () => $ZodCheck, + $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat, + $ZodCheckEndsWith: () => $ZodCheckEndsWith, + $ZodCheckGreaterThan: () => $ZodCheckGreaterThan, + $ZodCheckIncludes: () => $ZodCheckIncludes, + $ZodCheckLengthEquals: () => $ZodCheckLengthEquals, + $ZodCheckLessThan: () => $ZodCheckLessThan, + $ZodCheckLowerCase: () => $ZodCheckLowerCase, + $ZodCheckMaxLength: () => $ZodCheckMaxLength, + $ZodCheckMaxSize: () => $ZodCheckMaxSize, + $ZodCheckMimeType: () => $ZodCheckMimeType, + $ZodCheckMinLength: () => $ZodCheckMinLength, + $ZodCheckMinSize: () => $ZodCheckMinSize, + $ZodCheckMultipleOf: () => $ZodCheckMultipleOf, + $ZodCheckNumberFormat: () => $ZodCheckNumberFormat, + $ZodCheckOverwrite: () => $ZodCheckOverwrite, + $ZodCheckProperty: () => $ZodCheckProperty, + $ZodCheckRegex: () => $ZodCheckRegex, + $ZodCheckSizeEquals: () => $ZodCheckSizeEquals, + $ZodCheckStartsWith: () => $ZodCheckStartsWith, + $ZodCheckStringFormat: () => $ZodCheckStringFormat, + $ZodCheckUpperCase: () => $ZodCheckUpperCase, + $ZodCodec: () => $ZodCodec, + $ZodCustom: () => $ZodCustom, + $ZodCustomStringFormat: () => $ZodCustomStringFormat, + $ZodDate: () => $ZodDate, + $ZodDefault: () => $ZodDefault, + $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion, + $ZodE164: () => $ZodE164, + $ZodEmail: () => $ZodEmail, + $ZodEmoji: () => $ZodEmoji, + $ZodEncodeError: () => $ZodEncodeError, + $ZodEnum: () => $ZodEnum, + $ZodError: () => $ZodError, + $ZodExactOptional: () => $ZodExactOptional, + $ZodFile: () => $ZodFile, + $ZodFunction: () => $ZodFunction, + $ZodGUID: () => $ZodGUID, + $ZodIPv4: () => $ZodIPv4, + $ZodIPv6: () => $ZodIPv6, + $ZodISODate: () => $ZodISODate, + $ZodISODateTime: () => $ZodISODateTime, + $ZodISODuration: () => $ZodISODuration, + $ZodISOTime: () => $ZodISOTime, + $ZodIntersection: () => $ZodIntersection, + $ZodJWT: () => $ZodJWT, + $ZodKSUID: () => $ZodKSUID, + $ZodLazy: () => $ZodLazy, + $ZodLiteral: () => $ZodLiteral, + $ZodMAC: () => $ZodMAC, + $ZodMap: () => $ZodMap, + $ZodNaN: () => $ZodNaN, + $ZodNanoID: () => $ZodNanoID, + $ZodNever: () => $ZodNever, + $ZodNonOptional: () => $ZodNonOptional, + $ZodNull: () => $ZodNull, + $ZodNullable: () => $ZodNullable, + $ZodNumber: () => $ZodNumber, + $ZodNumberFormat: () => $ZodNumberFormat, + $ZodObject: () => $ZodObject, + $ZodObjectJIT: () => $ZodObjectJIT, + $ZodOptional: () => $ZodOptional, + $ZodPipe: () => $ZodPipe, + $ZodPrefault: () => $ZodPrefault, + $ZodPromise: () => $ZodPromise, + $ZodReadonly: () => $ZodReadonly, + $ZodRealError: () => $ZodRealError, + $ZodRecord: () => $ZodRecord, + $ZodRegistry: () => $ZodRegistry, + $ZodSet: () => $ZodSet, + $ZodString: () => $ZodString, + $ZodStringFormat: () => $ZodStringFormat, + $ZodSuccess: () => $ZodSuccess, + $ZodSymbol: () => $ZodSymbol, + $ZodTemplateLiteral: () => $ZodTemplateLiteral, + $ZodTransform: () => $ZodTransform, + $ZodTuple: () => $ZodTuple, + $ZodType: () => $ZodType, + $ZodULID: () => $ZodULID, + $ZodURL: () => $ZodURL, + $ZodUUID: () => $ZodUUID, + $ZodUndefined: () => $ZodUndefined, + $ZodUnion: () => $ZodUnion, + $ZodUnknown: () => $ZodUnknown, + $ZodVoid: () => $ZodVoid, + $ZodXID: () => $ZodXID, + $ZodXor: () => $ZodXor, + $brand: () => $brand, + $constructor: () => $constructor, + $input: () => $input, + $output: () => $output, + Doc: () => Doc, + JSONSchema: () => json_schema_exports, + JSONSchemaGenerator: () => JSONSchemaGenerator, + NEVER: () => NEVER, + TimePrecision: () => TimePrecision, + _any: () => _any, + _array: () => _array, + _base64: () => _base64, + _base64url: () => _base64url, + _bigint: () => _bigint, + _boolean: () => _boolean, + _catch: () => _catch, + _check: () => _check, + _cidrv4: () => _cidrv4, + _cidrv6: () => _cidrv6, + _coercedBigint: () => _coercedBigint, + _coercedBoolean: () => _coercedBoolean, + _coercedDate: () => _coercedDate, + _coercedNumber: () => _coercedNumber, + _coercedString: () => _coercedString, + _cuid: () => _cuid, + _cuid2: () => _cuid2, + _custom: () => _custom, + _date: () => _date, + _decode: () => _decode, + _decodeAsync: () => _decodeAsync, + _default: () => _default, + _discriminatedUnion: () => _discriminatedUnion, + _e164: () => _e164, + _email: () => _email, + _emoji: () => _emoji2, + _encode: () => _encode, + _encodeAsync: () => _encodeAsync, + _endsWith: () => _endsWith, + _enum: () => _enum, + _file: () => _file, + _float32: () => _float32, + _float64: () => _float64, + _gt: () => _gt, + _gte: () => _gte, + _guid: () => _guid, + _includes: () => _includes, + _int: () => _int, + _int32: () => _int32, + _int64: () => _int64, + _intersection: () => _intersection, + _ipv4: () => _ipv4, + _ipv6: () => _ipv6, + _isoDate: () => _isoDate, + _isoDateTime: () => _isoDateTime, + _isoDuration: () => _isoDuration, + _isoTime: () => _isoTime, + _jwt: () => _jwt, + _ksuid: () => _ksuid, + _lazy: () => _lazy, + _length: () => _length, + _literal: () => _literal, + _lowercase: () => _lowercase, + _lt: () => _lt, + _lte: () => _lte, + _mac: () => _mac, + _map: () => _map, + _max: () => _lte, + _maxLength: () => _maxLength, + _maxSize: () => _maxSize, + _mime: () => _mime, + _min: () => _gte, + _minLength: () => _minLength, + _minSize: () => _minSize, + _multipleOf: () => _multipleOf, + _nan: () => _nan, + _nanoid: () => _nanoid, + _nativeEnum: () => _nativeEnum, + _negative: () => _negative, + _never: () => _never, + _nonnegative: () => _nonnegative, + _nonoptional: () => _nonoptional, + _nonpositive: () => _nonpositive, + _normalize: () => _normalize, + _null: () => _null2, + _nullable: () => _nullable, + _number: () => _number, + _optional: () => _optional, + _overwrite: () => _overwrite, + _parse: () => _parse, + _parseAsync: () => _parseAsync, + _pipe: () => _pipe, + _positive: () => _positive, + _promise: () => _promise, + _property: () => _property, + _readonly: () => _readonly, + _record: () => _record, + _refine: () => _refine, + _regex: () => _regex, + _safeDecode: () => _safeDecode, + _safeDecodeAsync: () => _safeDecodeAsync, + _safeEncode: () => _safeEncode, + _safeEncodeAsync: () => _safeEncodeAsync, + _safeParse: () => _safeParse, + _safeParseAsync: () => _safeParseAsync, + _set: () => _set, + _size: () => _size, + _slugify: () => _slugify, + _startsWith: () => _startsWith, + _string: () => _string, + _stringFormat: () => _stringFormat, + _stringbool: () => _stringbool, + _success: () => _success, + _superRefine: () => _superRefine, + _symbol: () => _symbol, + _templateLiteral: () => _templateLiteral, + _toLowerCase: () => _toLowerCase, + _toUpperCase: () => _toUpperCase, + _transform: () => _transform, + _trim: () => _trim, + _tuple: () => _tuple, + _uint32: () => _uint32, + _uint64: () => _uint64, + _ulid: () => _ulid, + _undefined: () => _undefined2, + _union: () => _union, + _unknown: () => _unknown, + _uppercase: () => _uppercase, + _url: () => _url, + _uuid: () => _uuid, + _uuidv4: () => _uuidv4, + _uuidv6: () => _uuidv6, + _uuidv7: () => _uuidv7, + _void: () => _void, + _xid: () => _xid, + _xor: () => _xor, + clone: () => clone, + config: () => config2, + createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod, + createToJSONSchemaMethod: () => createToJSONSchemaMethod, + decode: () => decode2, + decodeAsync: () => decodeAsync, + describe: () => describe, + encode: () => encode3, + encodeAsync: () => encodeAsync, + extractDefs: () => extractDefs, + finalize: () => finalize, + flattenError: () => flattenError, + formatError: () => formatError, + globalConfig: () => globalConfig, + globalRegistry: () => globalRegistry, + initializeContext: () => initializeContext, + isValidBase64: () => isValidBase64, + isValidBase64URL: () => isValidBase64URL, + isValidJWT: () => isValidJWT, + locales: () => locales_exports, + meta: () => meta, + parse: () => parse, + parseAsync: () => parseAsync, + prettifyError: () => prettifyError, + process: () => process2, + regexes: () => regexes_exports, + registry: () => registry, + safeDecode: () => safeDecode, + safeDecodeAsync: () => safeDecodeAsync, + safeEncode: () => safeEncode, + safeEncodeAsync: () => safeEncodeAsync, + safeParse: () => safeParse, + safeParseAsync: () => safeParseAsync, + toDotPath: () => toDotPath, + toJSONSchema: () => toJSONSchema, + treeifyError: () => treeifyError, + util: () => util_exports, + version: () => version3 +}); +var init_core3 = __esm({ + "../../node_modules/zod/v4/core/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core2(); + init_parse(); + init_errors4(); + init_schemas(); + init_checks2(); + init_versions(); + init_util3(); + init_regexes(); + init_locales(); + init_registries(); + init_doc(); + init_api(); + init_to_json_schema(); + init_json_schema_processors(); + init_json_schema_generator(); + init_json_schema(); + } +}); + +// ../../node_modules/zod/v4/classic/checks.js +var checks_exports2 = {}; +__export(checks_exports2, { + endsWith: () => _endsWith, + gt: () => _gt, + gte: () => _gte, + includes: () => _includes, + length: () => _length, + lowercase: () => _lowercase, + lt: () => _lt, + lte: () => _lte, + maxLength: () => _maxLength, + maxSize: () => _maxSize, + mime: () => _mime, + minLength: () => _minLength, + minSize: () => _minSize, + multipleOf: () => _multipleOf, + negative: () => _negative, + nonnegative: () => _nonnegative, + nonpositive: () => _nonpositive, + normalize: () => _normalize, + overwrite: () => _overwrite, + positive: () => _positive, + property: () => _property, + regex: () => _regex, + size: () => _size, + slugify: () => _slugify, + startsWith: () => _startsWith, + toLowerCase: () => _toLowerCase, + toUpperCase: () => _toUpperCase, + trim: () => _trim, + uppercase: () => _uppercase +}); +var init_checks3 = __esm({ + "../../node_modules/zod/v4/classic/checks.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + } +}); + +// ../../node_modules/zod/v4/classic/iso.js +var iso_exports = {}; +__export(iso_exports, { + ZodISODate: () => ZodISODate, + ZodISODateTime: () => ZodISODateTime, + ZodISODuration: () => ZodISODuration, + ZodISOTime: () => ZodISOTime, + date: () => date3, + datetime: () => datetime2, + duration: () => duration2, + time: () => time6 +}); +function datetime2(params) { + return _isoDateTime(ZodISODateTime, params); +} +function date3(params) { + return _isoDate(ZodISODate, params); +} +function time6(params) { + return _isoTime(ZodISOTime, params); +} +function duration2(params) { + return _isoDuration(ZodISODuration, params); +} +var ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration; +var init_iso = __esm({ + "../../node_modules/zod/v4/classic/iso.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_schemas2(); + ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => { + $ZodISODateTime.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(datetime2, "datetime"); + ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => { + $ZodISODate.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(date3, "date"); + ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => { + $ZodISOTime.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(time6, "time"); + ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => { + $ZodISODuration.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(duration2, "duration"); + } +}); + +// ../../node_modules/zod/v4/classic/errors.js +var initializer2, ZodError, ZodRealError; +var init_errors5 = __esm({ + "../../node_modules/zod/v4/classic/errors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_core3(); + init_util3(); + initializer2 = /* @__PURE__ */ __name((inst, issues) => { + $ZodError.init(inst, issues); + inst.name = "ZodError"; + Object.defineProperties(inst, { + format: { + value: (mapper) => formatError(inst, mapper) + // enumerable: false, + }, + flatten: { + value: (mapper) => flattenError(inst, mapper) + // enumerable: false, + }, + addIssue: { + value: (issue2) => { + inst.issues.push(issue2); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2); + } + // enumerable: false, + }, + addIssues: { + value: (issues2) => { + inst.issues.push(...issues2); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2); + } + // enumerable: false, + }, + isEmpty: { + get() { + return inst.issues.length === 0; + } + // enumerable: false, + } + }); + }, "initializer"); + ZodError = $constructor("ZodError", initializer2); + ZodRealError = $constructor("ZodError", initializer2, { + Parent: Error + }); + } +}); + +// ../../node_modules/zod/v4/classic/parse.js +var parse2, parseAsync2, safeParse2, safeParseAsync2, encode4, decode3, encodeAsync2, decodeAsync2, safeEncode2, safeDecode2, safeEncodeAsync2, safeDecodeAsync2; +var init_parse2 = __esm({ + "../../node_modules/zod/v4/classic/parse.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_errors5(); + parse2 = /* @__PURE__ */ _parse(ZodRealError); + parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError); + safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError); + safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError); + encode4 = /* @__PURE__ */ _encode(ZodRealError); + decode3 = /* @__PURE__ */ _decode(ZodRealError); + encodeAsync2 = /* @__PURE__ */ _encodeAsync(ZodRealError); + decodeAsync2 = /* @__PURE__ */ _decodeAsync(ZodRealError); + safeEncode2 = /* @__PURE__ */ _safeEncode(ZodRealError); + safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError); + safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError); + safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError); + } +}); + +// ../../node_modules/zod/v4/classic/schemas.js +var schemas_exports2 = {}; +__export(schemas_exports2, { + ZodAny: () => ZodAny, + ZodArray: () => ZodArray, + ZodBase64: () => ZodBase64, + ZodBase64URL: () => ZodBase64URL, + ZodBigInt: () => ZodBigInt, + ZodBigIntFormat: () => ZodBigIntFormat, + ZodBoolean: () => ZodBoolean, + ZodCIDRv4: () => ZodCIDRv4, + ZodCIDRv6: () => ZodCIDRv6, + ZodCUID: () => ZodCUID, + ZodCUID2: () => ZodCUID2, + ZodCatch: () => ZodCatch, + ZodCodec: () => ZodCodec, + ZodCustom: () => ZodCustom, + ZodCustomStringFormat: () => ZodCustomStringFormat, + ZodDate: () => ZodDate, + ZodDefault: () => ZodDefault, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, + ZodE164: () => ZodE164, + ZodEmail: () => ZodEmail, + ZodEmoji: () => ZodEmoji, + ZodEnum: () => ZodEnum, + ZodExactOptional: () => ZodExactOptional, + ZodFile: () => ZodFile, + ZodFunction: () => ZodFunction, + ZodGUID: () => ZodGUID, + ZodIPv4: () => ZodIPv4, + ZodIPv6: () => ZodIPv6, + ZodIntersection: () => ZodIntersection, + ZodJWT: () => ZodJWT, + ZodKSUID: () => ZodKSUID, + ZodLazy: () => ZodLazy, + ZodLiteral: () => ZodLiteral, + ZodMAC: () => ZodMAC, + ZodMap: () => ZodMap, + ZodNaN: () => ZodNaN, + ZodNanoID: () => ZodNanoID, + ZodNever: () => ZodNever, + ZodNonOptional: () => ZodNonOptional, + ZodNull: () => ZodNull, + ZodNullable: () => ZodNullable, + ZodNumber: () => ZodNumber, + ZodNumberFormat: () => ZodNumberFormat, + ZodObject: () => ZodObject, + ZodOptional: () => ZodOptional, + ZodPipe: () => ZodPipe, + ZodPrefault: () => ZodPrefault, + ZodPromise: () => ZodPromise, + ZodReadonly: () => ZodReadonly, + ZodRecord: () => ZodRecord, + ZodSet: () => ZodSet, + ZodString: () => ZodString, + ZodStringFormat: () => ZodStringFormat, + ZodSuccess: () => ZodSuccess, + ZodSymbol: () => ZodSymbol, + ZodTemplateLiteral: () => ZodTemplateLiteral, + ZodTransform: () => ZodTransform, + ZodTuple: () => ZodTuple, + ZodType: () => ZodType, + ZodULID: () => ZodULID, + ZodURL: () => ZodURL, + ZodUUID: () => ZodUUID, + ZodUndefined: () => ZodUndefined, + ZodUnion: () => ZodUnion, + ZodUnknown: () => ZodUnknown, + ZodVoid: () => ZodVoid, + ZodXID: () => ZodXID, + ZodXor: () => ZodXor, + _ZodString: () => _ZodString, + _default: () => _default2, + _function: () => _function, + any: () => any, + array: () => array, + base64: () => base642, + base64url: () => base64url2, + bigint: () => bigint3, + boolean: () => boolean2, + catch: () => _catch2, + check: () => check2, + cidrv4: () => cidrv42, + cidrv6: () => cidrv62, + codec: () => codec, + cuid: () => cuid3, + cuid2: () => cuid22, + custom: () => custom, + date: () => date4, + describe: () => describe2, + discriminatedUnion: () => discriminatedUnion, + e164: () => e1642, + email: () => email2, + emoji: () => emoji2, + enum: () => _enum2, + exactOptional: () => exactOptional, + file: () => file, + float32: () => float32, + float64: () => float64, + function: () => _function, + guid: () => guid2, + hash: () => hash, + hex: () => hex2, + hostname: () => hostname2, + httpUrl: () => httpUrl, + instanceof: () => _instanceof, + int: () => int, + int32: () => int32, + int64: () => int64, + intersection: () => intersection, + ipv4: () => ipv42, + ipv6: () => ipv62, + json: () => json, + jwt: () => jwt, + keyof: () => keyof, + ksuid: () => ksuid2, + lazy: () => lazy2, + literal: () => literal, + looseObject: () => looseObject, + looseRecord: () => looseRecord, + mac: () => mac2, + map: () => map, + meta: () => meta2, + nan: () => nan, + nanoid: () => nanoid2, + nativeEnum: () => nativeEnum, + never: () => never, + nonoptional: () => nonoptional, + null: () => _null3, + nullable: () => nullable, + nullish: () => nullish2, + number: () => number2, + object: () => object, + optional: () => optional, + partialRecord: () => partialRecord, + pipe: () => pipe, + prefault: () => prefault, + preprocess: () => preprocess, + promise: () => promise, + readonly: () => readonly, + record: () => record, + refine: () => refine, + set: () => set, + strictObject: () => strictObject, + string: () => string2, + stringFormat: () => stringFormat, + stringbool: () => stringbool, + success: () => success, + superRefine: () => superRefine, + symbol: () => symbol, + templateLiteral: () => templateLiteral, + transform: () => transform, + tuple: () => tuple, + uint32: () => uint32, + uint64: () => uint64, + ulid: () => ulid2, + undefined: () => _undefined3, + union: () => union2, + unknown: () => unknown, + url: () => url, + uuid: () => uuid2, + uuidv4: () => uuidv4, + uuidv6: () => uuidv6, + uuidv7: () => uuidv7, + void: () => _void2, + xid: () => xid2, + xor: () => xor +}); +function string2(params) { + return _string(ZodString, params); +} +function email2(params) { + return _email(ZodEmail, params); +} +function guid2(params) { + return _guid(ZodGUID, params); +} +function uuid2(params) { + return _uuid(ZodUUID, params); +} +function uuidv4(params) { + return _uuidv4(ZodUUID, params); +} +function uuidv6(params) { + return _uuidv6(ZodUUID, params); +} +function uuidv7(params) { + return _uuidv7(ZodUUID, params); +} +function url(params) { + return _url(ZodURL, params); +} +function httpUrl(params) { + return _url(ZodURL, { + protocol: /^https?$/, + hostname: regexes_exports.domain, + ...util_exports.normalizeParams(params) + }); +} +function emoji2(params) { + return _emoji2(ZodEmoji, params); +} +function nanoid2(params) { + return _nanoid(ZodNanoID, params); +} +function cuid3(params) { + return _cuid(ZodCUID, params); +} +function cuid22(params) { + return _cuid2(ZodCUID2, params); +} +function ulid2(params) { + return _ulid(ZodULID, params); +} +function xid2(params) { + return _xid(ZodXID, params); +} +function ksuid2(params) { + return _ksuid(ZodKSUID, params); +} +function ipv42(params) { + return _ipv4(ZodIPv4, params); +} +function mac2(params) { + return _mac(ZodMAC, params); +} +function ipv62(params) { + return _ipv6(ZodIPv6, params); +} +function cidrv42(params) { + return _cidrv4(ZodCIDRv4, params); +} +function cidrv62(params) { + return _cidrv6(ZodCIDRv6, params); +} +function base642(params) { + return _base64(ZodBase64, params); +} +function base64url2(params) { + return _base64url(ZodBase64URL, params); +} +function e1642(params) { + return _e164(ZodE164, params); +} +function jwt(params) { + return _jwt(ZodJWT, params); +} +function stringFormat(format2, fnOrRegex, _params = {}) { + return _stringFormat(ZodCustomStringFormat, format2, fnOrRegex, _params); +} +function hostname2(_params) { + return _stringFormat(ZodCustomStringFormat, "hostname", regexes_exports.hostname, _params); +} +function hex2(_params) { + return _stringFormat(ZodCustomStringFormat, "hex", regexes_exports.hex, _params); +} +function hash(alg, params) { + const enc = params?.enc ?? "hex"; + const format2 = `${alg}_${enc}`; + const regex = regexes_exports[format2]; + if (!regex) + throw new Error(`Unrecognized hash format: ${format2}`); + return _stringFormat(ZodCustomStringFormat, format2, regex, params); +} +function number2(params) { + return _number(ZodNumber, params); +} +function int(params) { + return _int(ZodNumberFormat, params); +} +function float32(params) { + return _float32(ZodNumberFormat, params); +} +function float64(params) { + return _float64(ZodNumberFormat, params); +} +function int32(params) { + return _int32(ZodNumberFormat, params); +} +function uint32(params) { + return _uint32(ZodNumberFormat, params); +} +function boolean2(params) { + return _boolean(ZodBoolean, params); +} +function bigint3(params) { + return _bigint(ZodBigInt, params); +} +function int64(params) { + return _int64(ZodBigIntFormat, params); +} +function uint64(params) { + return _uint64(ZodBigIntFormat, params); +} +function symbol(params) { + return _symbol(ZodSymbol, params); +} +function _undefined3(params) { + return _undefined2(ZodUndefined, params); +} +function _null3(params) { + return _null2(ZodNull, params); +} +function any() { + return _any(ZodAny); +} +function unknown() { + return _unknown(ZodUnknown); +} +function never(params) { + return _never(ZodNever, params); +} +function _void2(params) { + return _void(ZodVoid, params); +} +function date4(params) { + return _date(ZodDate, params); +} +function array(element, params) { + return _array(ZodArray, element, params); +} +function keyof(schema) { + const shape = schema._zod.def.shape; + return _enum2(Object.keys(shape)); +} +function object(shape, params) { + const def = { + type: "object", + shape: shape ?? {}, + ...util_exports.normalizeParams(params) + }; + return new ZodObject(def); +} +function strictObject(shape, params) { + return new ZodObject({ + type: "object", + shape, + catchall: never(), + ...util_exports.normalizeParams(params) + }); +} +function looseObject(shape, params) { + return new ZodObject({ + type: "object", + shape, + catchall: unknown(), + ...util_exports.normalizeParams(params) + }); +} +function union2(options, params) { + return new ZodUnion({ + type: "union", + options, + ...util_exports.normalizeParams(params) + }); +} +function xor(options, params) { + return new ZodXor({ + type: "union", + options, + inclusive: false, + ...util_exports.normalizeParams(params) + }); +} +function discriminatedUnion(discriminator, options, params) { + return new ZodDiscriminatedUnion({ + type: "union", + options, + discriminator, + ...util_exports.normalizeParams(params) + }); +} +function intersection(left, right) { + return new ZodIntersection({ + type: "intersection", + left, + right + }); +} +function tuple(items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new ZodTuple({ + type: "tuple", + items, + rest, + ...util_exports.normalizeParams(params) + }); +} +function record(keyType, valueType, params) { + return new ZodRecord({ + type: "record", + keyType, + valueType, + ...util_exports.normalizeParams(params) + }); +} +function partialRecord(keyType, valueType, params) { + const k2 = clone(keyType); + k2._zod.values = void 0; + return new ZodRecord({ + type: "record", + keyType: k2, + valueType, + ...util_exports.normalizeParams(params) + }); +} +function looseRecord(keyType, valueType, params) { + return new ZodRecord({ + type: "record", + keyType, + valueType, + mode: "loose", + ...util_exports.normalizeParams(params) + }); +} +function map(keyType, valueType, params) { + return new ZodMap({ + type: "map", + keyType, + valueType, + ...util_exports.normalizeParams(params) + }); +} +function set(valueType, params) { + return new ZodSet({ + type: "set", + valueType, + ...util_exports.normalizeParams(params) + }); +} +function _enum2(values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v3) => [v3, v3])) : values; + return new ZodEnum({ + type: "enum", + entries, + ...util_exports.normalizeParams(params) + }); +} +function nativeEnum(entries, params) { + return new ZodEnum({ + type: "enum", + entries, + ...util_exports.normalizeParams(params) + }); +} +function literal(value, params) { + return new ZodLiteral({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...util_exports.normalizeParams(params) + }); +} +function file(params) { + return _file(ZodFile, params); +} +function transform(fn) { + return new ZodTransform({ + type: "transform", + transform: fn + }); +} +function optional(innerType) { + return new ZodOptional({ + type: "optional", + innerType + }); +} +function exactOptional(innerType) { + return new ZodExactOptional({ + type: "optional", + innerType + }); +} +function nullable(innerType) { + return new ZodNullable({ + type: "nullable", + innerType + }); +} +function nullish2(innerType) { + return optional(nullable(innerType)); +} +function _default2(innerType, defaultValue) { + return new ZodDefault({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); + } + }); +} +function prefault(innerType, defaultValue) { + return new ZodPrefault({ + type: "prefault", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); + } + }); +} +function nonoptional(innerType, params) { + return new ZodNonOptional({ + type: "nonoptional", + innerType, + ...util_exports.normalizeParams(params) + }); +} +function success(innerType) { + return new ZodSuccess({ + type: "success", + innerType + }); +} +function _catch2(innerType, catchValue) { + return new ZodCatch({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +function nan(params) { + return _nan(ZodNaN, params); +} +function pipe(in_, out) { + return new ZodPipe({ + type: "pipe", + in: in_, + out + // ...util.normalizeParams(params), + }); +} +function codec(in_, out, params) { + return new ZodCodec({ + type: "pipe", + in: in_, + out, + transform: params.decode, + reverseTransform: params.encode + }); +} +function readonly(innerType) { + return new ZodReadonly({ + type: "readonly", + innerType + }); +} +function templateLiteral(parts, params) { + return new ZodTemplateLiteral({ + type: "template_literal", + parts, + ...util_exports.normalizeParams(params) + }); +} +function lazy2(getter) { + return new ZodLazy({ + type: "lazy", + getter + }); +} +function promise(innerType) { + return new ZodPromise({ + type: "promise", + innerType + }); +} +function _function(params) { + return new ZodFunction({ + type: "function", + input: Array.isArray(params?.input) ? tuple(params?.input) : params?.input ?? array(unknown()), + output: params?.output ?? unknown() + }); +} +function check2(fn) { + const ch2 = new $ZodCheck({ + check: "custom" + // ...util.normalizeParams(params), + }); + ch2._zod.check = fn; + return ch2; +} +function custom(fn, _params) { + return _custom(ZodCustom, fn ?? (() => true), _params); +} +function refine(fn, _params = {}) { + return _refine(ZodCustom, fn, _params); +} +function superRefine(fn) { + return _superRefine(fn); +} +function _instanceof(cls, params = {}) { + const inst = new ZodCustom({ + type: "custom", + check: "custom", + fn: (data) => data instanceof cls, + abort: true, + ...util_exports.normalizeParams(params) + }); + inst._zod.bag.Class = cls; + inst._zod.check = (payload) => { + if (!(payload.value instanceof cls)) { + payload.issues.push({ + code: "invalid_type", + expected: cls.name, + input: payload.value, + inst, + path: [...inst._zod.def.path ?? []] + }); + } + }; + return inst; +} +function json(params) { + const jsonSchema = lazy2(() => { + return union2([string2(params), number2(), boolean2(), _null3(), array(jsonSchema), record(string2(), jsonSchema)]); + }); + return jsonSchema; +} +function preprocess(fn, schema) { + return pipe(transform(fn), schema); +} +var ZodType, _ZodString, ZodString, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber, ZodNumberFormat, ZodBoolean, ZodBigInt, ZodBigIntFormat, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodDate, ZodArray, ZodObject, ZodUnion, ZodXor, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodEnum, ZodLiteral, ZodFile, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch, ZodNaN, ZodPipe, ZodCodec, ZodReadonly, ZodTemplateLiteral, ZodLazy, ZodPromise, ZodFunction, ZodCustom, describe2, meta2, stringbool; +var init_schemas2 = __esm({ + "../../node_modules/zod/v4/classic/schemas.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_core3(); + init_json_schema_processors(); + init_to_json_schema(); + init_checks3(); + init_iso(); + init_parse2(); + ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => { + $ZodType.init(inst, def); + Object.assign(inst["~standard"], { + jsonSchema: { + input: createStandardJSONSchemaMethod(inst, "input"), + output: createStandardJSONSchemaMethod(inst, "output") + } + }); + inst.toJSONSchema = createToJSONSchemaMethod(inst, {}); + inst.def = def; + inst.type = def.type; + Object.defineProperty(inst, "_def", { value: def }); + inst.check = (...checks) => { + return inst.clone(util_exports.mergeDefs(def, { + checks: [ + ...def.checks ?? [], + ...checks.map((ch2) => typeof ch2 === "function" ? { _zod: { check: ch2, def: { check: "custom" }, onattach: [] } } : ch2) + ] + }), { + parent: true + }); + }; + inst.with = inst.check; + inst.clone = (def2, params) => clone(inst, def2, params); + inst.brand = () => inst; + inst.register = (reg, meta3) => { + reg.add(inst, meta3); + return inst; + }; + inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse }); + inst.safeParse = (data, params) => safeParse2(inst, data, params); + inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync }); + inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params); + inst.spa = inst.safeParseAsync; + inst.encode = (data, params) => encode4(inst, data, params); + inst.decode = (data, params) => decode3(inst, data, params); + inst.encodeAsync = async (data, params) => encodeAsync2(inst, data, params); + inst.decodeAsync = async (data, params) => decodeAsync2(inst, data, params); + inst.safeEncode = (data, params) => safeEncode2(inst, data, params); + inst.safeDecode = (data, params) => safeDecode2(inst, data, params); + inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params); + inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params); + inst.refine = (check3, params) => inst.check(refine(check3, params)); + inst.superRefine = (refinement) => inst.check(superRefine(refinement)); + inst.overwrite = (fn) => inst.check(_overwrite(fn)); + inst.optional = () => optional(inst); + inst.exactOptional = () => exactOptional(inst); + inst.nullable = () => nullable(inst); + inst.nullish = () => optional(nullable(inst)); + inst.nonoptional = (params) => nonoptional(inst, params); + inst.array = () => array(inst); + inst.or = (arg) => union2([inst, arg]); + inst.and = (arg) => intersection(inst, arg); + inst.transform = (tx) => pipe(inst, transform(tx)); + inst.default = (def2) => _default2(inst, def2); + inst.prefault = (def2) => prefault(inst, def2); + inst.catch = (params) => _catch2(inst, params); + inst.pipe = (target) => pipe(inst, target); + inst.readonly = () => readonly(inst); + inst.describe = (description) => { + const cl2 = inst.clone(); + globalRegistry.add(cl2, { description }); + return cl2; + }; + Object.defineProperty(inst, "description", { + get() { + return globalRegistry.get(inst)?.description; + }, + configurable: true + }); + inst.meta = (...args) => { + if (args.length === 0) { + return globalRegistry.get(inst); + } + const cl2 = inst.clone(); + globalRegistry.add(cl2, args[0]); + return cl2; + }; + inst.isOptional = () => inst.safeParse(void 0).success; + inst.isNullable = () => inst.safeParse(null).success; + inst.apply = (fn) => fn(inst); + return inst; + }); + _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => { + $ZodString.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => stringProcessor(inst, ctx, json2, params); + const bag = inst._zod.bag; + inst.format = bag.format ?? null; + inst.minLength = bag.minimum ?? null; + inst.maxLength = bag.maximum ?? null; + inst.regex = (...args) => inst.check(_regex(...args)); + inst.includes = (...args) => inst.check(_includes(...args)); + inst.startsWith = (...args) => inst.check(_startsWith(...args)); + inst.endsWith = (...args) => inst.check(_endsWith(...args)); + inst.min = (...args) => inst.check(_minLength(...args)); + inst.max = (...args) => inst.check(_maxLength(...args)); + inst.length = (...args) => inst.check(_length(...args)); + inst.nonempty = (...args) => inst.check(_minLength(1, ...args)); + inst.lowercase = (params) => inst.check(_lowercase(params)); + inst.uppercase = (params) => inst.check(_uppercase(params)); + inst.trim = () => inst.check(_trim()); + inst.normalize = (...args) => inst.check(_normalize(...args)); + inst.toLowerCase = () => inst.check(_toLowerCase()); + inst.toUpperCase = () => inst.check(_toUpperCase()); + inst.slugify = () => inst.check(_slugify()); + }); + ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => { + $ZodString.init(inst, def); + _ZodString.init(inst, def); + inst.email = (params) => inst.check(_email(ZodEmail, params)); + inst.url = (params) => inst.check(_url(ZodURL, params)); + inst.jwt = (params) => inst.check(_jwt(ZodJWT, params)); + inst.emoji = (params) => inst.check(_emoji2(ZodEmoji, params)); + inst.guid = (params) => inst.check(_guid(ZodGUID, params)); + inst.uuid = (params) => inst.check(_uuid(ZodUUID, params)); + inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params)); + inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params)); + inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params)); + inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params)); + inst.guid = (params) => inst.check(_guid(ZodGUID, params)); + inst.cuid = (params) => inst.check(_cuid(ZodCUID, params)); + inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params)); + inst.ulid = (params) => inst.check(_ulid(ZodULID, params)); + inst.base64 = (params) => inst.check(_base64(ZodBase64, params)); + inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params)); + inst.xid = (params) => inst.check(_xid(ZodXID, params)); + inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params)); + inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params)); + inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params)); + inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params)); + inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params)); + inst.e164 = (params) => inst.check(_e164(ZodE164, params)); + inst.datetime = (params) => inst.check(datetime2(params)); + inst.date = (params) => inst.check(date3(params)); + inst.time = (params) => inst.check(time6(params)); + inst.duration = (params) => inst.check(duration2(params)); + }); + __name(string2, "string"); + ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => { + $ZodStringFormat.init(inst, def); + _ZodString.init(inst, def); + }); + ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => { + $ZodEmail.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(email2, "email"); + ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => { + $ZodGUID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(guid2, "guid"); + ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => { + $ZodUUID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(uuid2, "uuid"); + __name(uuidv4, "uuidv4"); + __name(uuidv6, "uuidv6"); + __name(uuidv7, "uuidv7"); + ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => { + $ZodURL.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(url, "url"); + __name(httpUrl, "httpUrl"); + ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => { + $ZodEmoji.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(emoji2, "emoji"); + ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => { + $ZodNanoID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(nanoid2, "nanoid"); + ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => { + $ZodCUID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(cuid3, "cuid"); + ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => { + $ZodCUID2.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(cuid22, "cuid2"); + ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => { + $ZodULID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(ulid2, "ulid"); + ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => { + $ZodXID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(xid2, "xid"); + ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => { + $ZodKSUID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(ksuid2, "ksuid"); + ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => { + $ZodIPv4.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(ipv42, "ipv4"); + ZodMAC = /* @__PURE__ */ $constructor("ZodMAC", (inst, def) => { + $ZodMAC.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(mac2, "mac"); + ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => { + $ZodIPv6.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(ipv62, "ipv6"); + ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => { + $ZodCIDRv4.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(cidrv42, "cidrv4"); + ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => { + $ZodCIDRv6.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(cidrv62, "cidrv6"); + ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => { + $ZodBase64.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(base642, "base64"); + ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => { + $ZodBase64URL.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(base64url2, "base64url"); + ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => { + $ZodE164.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(e1642, "e164"); + ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => { + $ZodJWT.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(jwt, "jwt"); + ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => { + $ZodCustomStringFormat.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(stringFormat, "stringFormat"); + __name(hostname2, "hostname"); + __name(hex2, "hex"); + __name(hash, "hash"); + ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => { + $ZodNumber.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params); + inst.gt = (value, params) => inst.check(_gt(value, params)); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.lt = (value, params) => inst.check(_lt(value, params)); + inst.lte = (value, params) => inst.check(_lte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + inst.int = (params) => inst.check(int(params)); + inst.safe = (params) => inst.check(int(params)); + inst.positive = (params) => inst.check(_gt(0, params)); + inst.nonnegative = (params) => inst.check(_gte(0, params)); + inst.negative = (params) => inst.check(_lt(0, params)); + inst.nonpositive = (params) => inst.check(_lte(0, params)); + inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); + inst.step = (value, params) => inst.check(_multipleOf(value, params)); + inst.finite = () => inst; + const bag = inst._zod.bag; + inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null; + inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null; + inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5); + inst.isFinite = true; + inst.format = bag.format ?? null; + }); + __name(number2, "number"); + ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => { + $ZodNumberFormat.init(inst, def); + ZodNumber.init(inst, def); + }); + __name(int, "int"); + __name(float32, "float32"); + __name(float64, "float64"); + __name(int32, "int32"); + __name(uint32, "uint32"); + ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => { + $ZodBoolean.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => booleanProcessor(inst, ctx, json2, params); + }); + __name(boolean2, "boolean"); + ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => { + $ZodBigInt.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => bigintProcessor(inst, ctx, json2, params); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.gt = (value, params) => inst.check(_gt(value, params)); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.lt = (value, params) => inst.check(_lt(value, params)); + inst.lte = (value, params) => inst.check(_lte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + inst.positive = (params) => inst.check(_gt(BigInt(0), params)); + inst.negative = (params) => inst.check(_lt(BigInt(0), params)); + inst.nonpositive = (params) => inst.check(_lte(BigInt(0), params)); + inst.nonnegative = (params) => inst.check(_gte(BigInt(0), params)); + inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); + const bag = inst._zod.bag; + inst.minValue = bag.minimum ?? null; + inst.maxValue = bag.maximum ?? null; + inst.format = bag.format ?? null; + }); + __name(bigint3, "bigint"); + ZodBigIntFormat = /* @__PURE__ */ $constructor("ZodBigIntFormat", (inst, def) => { + $ZodBigIntFormat.init(inst, def); + ZodBigInt.init(inst, def); + }); + __name(int64, "int64"); + __name(uint64, "uint64"); + ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => { + $ZodSymbol.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => symbolProcessor(inst, ctx, json2, params); + }); + __name(symbol, "symbol"); + ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => { + $ZodUndefined.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => undefinedProcessor(inst, ctx, json2, params); + }); + __name(_undefined3, "_undefined"); + ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => { + $ZodNull.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => nullProcessor(inst, ctx, json2, params); + }); + __name(_null3, "_null"); + ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => { + $ZodAny.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => anyProcessor(inst, ctx, json2, params); + }); + __name(any, "any"); + ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => { + $ZodUnknown.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => unknownProcessor(inst, ctx, json2, params); + }); + __name(unknown, "unknown"); + ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => { + $ZodNever.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => neverProcessor(inst, ctx, json2, params); + }); + __name(never, "never"); + ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => { + $ZodVoid.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => voidProcessor(inst, ctx, json2, params); + }); + __name(_void2, "_void"); + ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => { + $ZodDate.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => dateProcessor(inst, ctx, json2, params); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + const c2 = inst._zod.bag; + inst.minDate = c2.minimum ? new Date(c2.minimum) : null; + inst.maxDate = c2.maximum ? new Date(c2.maximum) : null; + }); + __name(date4, "date"); + ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => { + $ZodArray.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params); + inst.element = def.element; + inst.min = (minLength, params) => inst.check(_minLength(minLength, params)); + inst.nonempty = (params) => inst.check(_minLength(1, params)); + inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params)); + inst.length = (len, params) => inst.check(_length(len, params)); + inst.unwrap = () => inst.element; + }); + __name(array, "array"); + __name(keyof, "keyof"); + ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => { + $ZodObjectJIT.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => objectProcessor(inst, ctx, json2, params); + util_exports.defineLazy(inst, "shape", () => { + return def.shape; + }); + inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape)); + inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall }); + inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); + inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); + inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() }); + inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 }); + inst.extend = (incoming) => { + return util_exports.extend(inst, incoming); + }; + inst.safeExtend = (incoming) => { + return util_exports.safeExtend(inst, incoming); + }; + inst.merge = (other) => util_exports.merge(inst, other); + inst.pick = (mask) => util_exports.pick(inst, mask); + inst.omit = (mask) => util_exports.omit(inst, mask); + inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]); + inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]); + }); + __name(object, "object"); + __name(strictObject, "strictObject"); + __name(looseObject, "looseObject"); + ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => { + $ZodUnion.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor(inst, ctx, json2, params); + inst.options = def.options; + }); + __name(union2, "union"); + ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => { + ZodUnion.init(inst, def); + $ZodXor.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor(inst, ctx, json2, params); + inst.options = def.options; + }); + __name(xor, "xor"); + ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => { + ZodUnion.init(inst, def); + $ZodDiscriminatedUnion.init(inst, def); + }); + __name(discriminatedUnion, "discriminatedUnion"); + ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => { + $ZodIntersection.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => intersectionProcessor(inst, ctx, json2, params); + }); + __name(intersection, "intersection"); + ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => { + $ZodTuple.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => tupleProcessor(inst, ctx, json2, params); + inst.rest = (rest) => inst.clone({ + ...inst._zod.def, + rest + }); + }); + __name(tuple, "tuple"); + ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => { + $ZodRecord.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => recordProcessor(inst, ctx, json2, params); + inst.keyType = def.keyType; + inst.valueType = def.valueType; + }); + __name(record, "record"); + __name(partialRecord, "partialRecord"); + __name(looseRecord, "looseRecord"); + ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => { + $ZodMap.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => mapProcessor(inst, ctx, json2, params); + inst.keyType = def.keyType; + inst.valueType = def.valueType; + inst.min = (...args) => inst.check(_minSize(...args)); + inst.nonempty = (params) => inst.check(_minSize(1, params)); + inst.max = (...args) => inst.check(_maxSize(...args)); + inst.size = (...args) => inst.check(_size(...args)); + }); + __name(map, "map"); + ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => { + $ZodSet.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => setProcessor(inst, ctx, json2, params); + inst.min = (...args) => inst.check(_minSize(...args)); + inst.nonempty = (params) => inst.check(_minSize(1, params)); + inst.max = (...args) => inst.check(_maxSize(...args)); + inst.size = (...args) => inst.check(_size(...args)); + }); + __name(set, "set"); + ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => { + $ZodEnum.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => enumProcessor(inst, ctx, json2, params); + inst.enum = def.entries; + inst.options = Object.values(def.entries); + const keys = new Set(Object.keys(def.entries)); + inst.extract = (values, params) => { + const newEntries = {}; + for (const value of values) { + if (keys.has(value)) { + newEntries[value] = def.entries[value]; + } else + throw new Error(`Key ${value} not found in enum`); + } + return new ZodEnum({ + ...def, + checks: [], + ...util_exports.normalizeParams(params), + entries: newEntries + }); + }; + inst.exclude = (values, params) => { + const newEntries = { ...def.entries }; + for (const value of values) { + if (keys.has(value)) { + delete newEntries[value]; + } else + throw new Error(`Key ${value} not found in enum`); + } + return new ZodEnum({ + ...def, + checks: [], + ...util_exports.normalizeParams(params), + entries: newEntries + }); + }; + }); + __name(_enum2, "_enum"); + __name(nativeEnum, "nativeEnum"); + ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => { + $ZodLiteral.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => literalProcessor(inst, ctx, json2, params); + inst.values = new Set(def.values); + Object.defineProperty(inst, "value", { + get() { + if (def.values.length > 1) { + throw new Error("This schema contains multiple valid literal values. Use `.values` instead."); + } + return def.values[0]; + } + }); + }); + __name(literal, "literal"); + ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => { + $ZodFile.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => fileProcessor(inst, ctx, json2, params); + inst.min = (size, params) => inst.check(_minSize(size, params)); + inst.max = (size, params) => inst.check(_maxSize(size, params)); + inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params)); + }); + __name(file, "file"); + ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => { + $ZodTransform.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => transformProcessor(inst, ctx, json2, params); + inst._zod.parse = (payload, _ctx) => { + if (_ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } + payload.addIssue = (issue2) => { + if (typeof issue2 === "string") { + payload.issues.push(util_exports.issue(issue2, payload.value, def)); + } else { + const _issue = issue2; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = inst); + payload.issues.push(util_exports.issue(_issue)); + } + }; + const output = def.transform(payload.value, payload); + if (output instanceof Promise) { + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + payload.value = output; + return payload; + }; + }); + __name(transform, "transform"); + ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => { + $ZodOptional.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => optionalProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(optional, "optional"); + ZodExactOptional = /* @__PURE__ */ $constructor("ZodExactOptional", (inst, def) => { + $ZodExactOptional.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => optionalProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(exactOptional, "exactOptional"); + ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => { + $ZodNullable.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => nullableProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(nullable, "nullable"); + __name(nullish2, "nullish"); + ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => { + $ZodDefault.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => defaultProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeDefault = inst.unwrap; + }); + __name(_default2, "_default"); + ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => { + $ZodPrefault.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => prefaultProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(prefault, "prefault"); + ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => { + $ZodNonOptional.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => nonoptionalProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(nonoptional, "nonoptional"); + ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => { + $ZodSuccess.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => successProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(success, "success"); + ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => { + $ZodCatch.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => catchProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeCatch = inst.unwrap; + }); + __name(_catch2, "_catch"); + ZodNaN = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => { + $ZodNaN.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => nanProcessor(inst, ctx, json2, params); + }); + __name(nan, "nan"); + ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => { + $ZodPipe.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => pipeProcessor(inst, ctx, json2, params); + inst.in = def.in; + inst.out = def.out; + }); + __name(pipe, "pipe"); + ZodCodec = /* @__PURE__ */ $constructor("ZodCodec", (inst, def) => { + ZodPipe.init(inst, def); + $ZodCodec.init(inst, def); + }); + __name(codec, "codec"); + ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => { + $ZodReadonly.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => readonlyProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(readonly, "readonly"); + ZodTemplateLiteral = /* @__PURE__ */ $constructor("ZodTemplateLiteral", (inst, def) => { + $ZodTemplateLiteral.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => templateLiteralProcessor(inst, ctx, json2, params); + }); + __name(templateLiteral, "templateLiteral"); + ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => { + $ZodLazy.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => lazyProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.getter(); + }); + __name(lazy2, "lazy"); + ZodPromise = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => { + $ZodPromise.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => promiseProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(promise, "promise"); + ZodFunction = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => { + $ZodFunction.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => functionProcessor(inst, ctx, json2, params); + }); + __name(_function, "_function"); + ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => { + $ZodCustom.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => customProcessor(inst, ctx, json2, params); + }); + __name(check2, "check"); + __name(custom, "custom"); + __name(refine, "refine"); + __name(superRefine, "superRefine"); + describe2 = describe; + meta2 = meta; + __name(_instanceof, "_instanceof"); + stringbool = /* @__PURE__ */ __name((...args) => _stringbool({ + Codec: ZodCodec, + Boolean: ZodBoolean, + String: ZodString + }, ...args), "stringbool"); + __name(json, "json"); + __name(preprocess, "preprocess"); + } +}); + +// ../../node_modules/zod/v4/classic/compat.js +function setErrorMap(map2) { + config2({ + customError: map2 + }); +} +function getErrorMap() { + return config2().customError; +} +var ZodIssueCode, ZodFirstPartyTypeKind; +var init_compat = __esm({ + "../../node_modules/zod/v4/classic/compat.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_core3(); + ZodIssueCode = { + invalid_type: "invalid_type", + too_big: "too_big", + too_small: "too_small", + invalid_format: "invalid_format", + not_multiple_of: "not_multiple_of", + unrecognized_keys: "unrecognized_keys", + invalid_union: "invalid_union", + invalid_key: "invalid_key", + invalid_element: "invalid_element", + invalid_value: "invalid_value", + custom: "custom" + }; + __name(setErrorMap, "setErrorMap"); + __name(getErrorMap, "getErrorMap"); + (function(ZodFirstPartyTypeKind2) { + })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {})); + } +}); + +// ../../node_modules/zod/v4/classic/from-json-schema.js +function detectVersion(schema, defaultTarget) { + const $schema = schema.$schema; + if ($schema === "https://json-schema.org/draft/2020-12/schema") { + return "draft-2020-12"; + } + if ($schema === "http://json-schema.org/draft-07/schema#") { + return "draft-7"; + } + if ($schema === "http://json-schema.org/draft-04/schema#") { + return "draft-4"; + } + return defaultTarget ?? "draft-2020-12"; +} +function resolveRef(ref, ctx) { + if (!ref.startsWith("#")) { + throw new Error("External $ref is not supported, only local refs (#/...) are allowed"); + } + const path = ref.slice(1).split("/").filter(Boolean); + if (path.length === 0) { + return ctx.rootSchema; + } + const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions"; + if (path[0] === defsKey) { + const key = path[1]; + if (!key || !ctx.defs[key]) { + throw new Error(`Reference not found: ${ref}`); + } + return ctx.defs[key]; + } + throw new Error(`Reference not found: ${ref}`); +} +function convertBaseSchema(schema, ctx) { + if (schema.not !== void 0) { + if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) { + return z2.never(); + } + throw new Error("not is not supported in Zod (except { not: {} } for never)"); + } + if (schema.unevaluatedItems !== void 0) { + throw new Error("unevaluatedItems is not supported"); + } + if (schema.unevaluatedProperties !== void 0) { + throw new Error("unevaluatedProperties is not supported"); + } + if (schema.if !== void 0 || schema.then !== void 0 || schema.else !== void 0) { + throw new Error("Conditional schemas (if/then/else) are not supported"); + } + if (schema.dependentSchemas !== void 0 || schema.dependentRequired !== void 0) { + throw new Error("dependentSchemas and dependentRequired are not supported"); + } + if (schema.$ref) { + const refPath = schema.$ref; + if (ctx.refs.has(refPath)) { + return ctx.refs.get(refPath); + } + if (ctx.processing.has(refPath)) { + return z2.lazy(() => { + if (!ctx.refs.has(refPath)) { + throw new Error(`Circular reference not resolved: ${refPath}`); + } + return ctx.refs.get(refPath); + }); + } + ctx.processing.add(refPath); + const resolved = resolveRef(refPath, ctx); + const zodSchema2 = convertSchema(resolved, ctx); + ctx.refs.set(refPath, zodSchema2); + ctx.processing.delete(refPath); + return zodSchema2; + } + if (schema.enum !== void 0) { + const enumValues = schema.enum; + if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) { + return z2.null(); + } + if (enumValues.length === 0) { + return z2.never(); + } + if (enumValues.length === 1) { + return z2.literal(enumValues[0]); + } + if (enumValues.every((v3) => typeof v3 === "string")) { + return z2.enum(enumValues); + } + const literalSchemas = enumValues.map((v3) => z2.literal(v3)); + if (literalSchemas.length < 2) { + return literalSchemas[0]; + } + return z2.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]); + } + if (schema.const !== void 0) { + return z2.literal(schema.const); + } + const type = schema.type; + if (Array.isArray(type)) { + const typeSchemas = type.map((t9) => { + const typeSchema = { ...schema, type: t9 }; + return convertBaseSchema(typeSchema, ctx); + }); + if (typeSchemas.length === 0) { + return z2.never(); + } + if (typeSchemas.length === 1) { + return typeSchemas[0]; + } + return z2.union(typeSchemas); + } + if (!type) { + return z2.any(); + } + let zodSchema; + switch (type) { + case "string": { + let stringSchema = z2.string(); + if (schema.format) { + const format2 = schema.format; + if (format2 === "email") { + stringSchema = stringSchema.check(z2.email()); + } else if (format2 === "uri" || format2 === "uri-reference") { + stringSchema = stringSchema.check(z2.url()); + } else if (format2 === "uuid" || format2 === "guid") { + stringSchema = stringSchema.check(z2.uuid()); + } else if (format2 === "date-time") { + stringSchema = stringSchema.check(z2.iso.datetime()); + } else if (format2 === "date") { + stringSchema = stringSchema.check(z2.iso.date()); + } else if (format2 === "time") { + stringSchema = stringSchema.check(z2.iso.time()); + } else if (format2 === "duration") { + stringSchema = stringSchema.check(z2.iso.duration()); + } else if (format2 === "ipv4") { + stringSchema = stringSchema.check(z2.ipv4()); + } else if (format2 === "ipv6") { + stringSchema = stringSchema.check(z2.ipv6()); + } else if (format2 === "mac") { + stringSchema = stringSchema.check(z2.mac()); + } else if (format2 === "cidr") { + stringSchema = stringSchema.check(z2.cidrv4()); + } else if (format2 === "cidr-v6") { + stringSchema = stringSchema.check(z2.cidrv6()); + } else if (format2 === "base64") { + stringSchema = stringSchema.check(z2.base64()); + } else if (format2 === "base64url") { + stringSchema = stringSchema.check(z2.base64url()); + } else if (format2 === "e164") { + stringSchema = stringSchema.check(z2.e164()); + } else if (format2 === "jwt") { + stringSchema = stringSchema.check(z2.jwt()); + } else if (format2 === "emoji") { + stringSchema = stringSchema.check(z2.emoji()); + } else if (format2 === "nanoid") { + stringSchema = stringSchema.check(z2.nanoid()); + } else if (format2 === "cuid") { + stringSchema = stringSchema.check(z2.cuid()); + } else if (format2 === "cuid2") { + stringSchema = stringSchema.check(z2.cuid2()); + } else if (format2 === "ulid") { + stringSchema = stringSchema.check(z2.ulid()); + } else if (format2 === "xid") { + stringSchema = stringSchema.check(z2.xid()); + } else if (format2 === "ksuid") { + stringSchema = stringSchema.check(z2.ksuid()); + } + } + if (typeof schema.minLength === "number") { + stringSchema = stringSchema.min(schema.minLength); + } + if (typeof schema.maxLength === "number") { + stringSchema = stringSchema.max(schema.maxLength); + } + if (schema.pattern) { + stringSchema = stringSchema.regex(new RegExp(schema.pattern)); + } + zodSchema = stringSchema; + break; + } + case "number": + case "integer": { + let numberSchema = type === "integer" ? z2.number().int() : z2.number(); + if (typeof schema.minimum === "number") { + numberSchema = numberSchema.min(schema.minimum); + } + if (typeof schema.maximum === "number") { + numberSchema = numberSchema.max(schema.maximum); + } + if (typeof schema.exclusiveMinimum === "number") { + numberSchema = numberSchema.gt(schema.exclusiveMinimum); + } else if (schema.exclusiveMinimum === true && typeof schema.minimum === "number") { + numberSchema = numberSchema.gt(schema.minimum); + } + if (typeof schema.exclusiveMaximum === "number") { + numberSchema = numberSchema.lt(schema.exclusiveMaximum); + } else if (schema.exclusiveMaximum === true && typeof schema.maximum === "number") { + numberSchema = numberSchema.lt(schema.maximum); + } + if (typeof schema.multipleOf === "number") { + numberSchema = numberSchema.multipleOf(schema.multipleOf); + } + zodSchema = numberSchema; + break; + } + case "boolean": { + zodSchema = z2.boolean(); + break; + } + case "null": { + zodSchema = z2.null(); + break; + } + case "object": { + const shape = {}; + const properties = schema.properties || {}; + const requiredSet = new Set(schema.required || []); + for (const [key, propSchema] of Object.entries(properties)) { + const propZodSchema = convertSchema(propSchema, ctx); + shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional(); + } + if (schema.propertyNames) { + const keySchema = convertSchema(schema.propertyNames, ctx); + const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z2.any(); + if (Object.keys(shape).length === 0) { + zodSchema = z2.record(keySchema, valueSchema); + break; + } + const objectSchema2 = z2.object(shape).passthrough(); + const recordSchema = z2.looseRecord(keySchema, valueSchema); + zodSchema = z2.intersection(objectSchema2, recordSchema); + break; + } + if (schema.patternProperties) { + const patternProps = schema.patternProperties; + const patternKeys = Object.keys(patternProps); + const looseRecords = []; + for (const pattern of patternKeys) { + const patternValue = convertSchema(patternProps[pattern], ctx); + const keySchema = z2.string().regex(new RegExp(pattern)); + looseRecords.push(z2.looseRecord(keySchema, patternValue)); + } + const schemasToIntersect = []; + if (Object.keys(shape).length > 0) { + schemasToIntersect.push(z2.object(shape).passthrough()); + } + schemasToIntersect.push(...looseRecords); + if (schemasToIntersect.length === 0) { + zodSchema = z2.object({}).passthrough(); + } else if (schemasToIntersect.length === 1) { + zodSchema = schemasToIntersect[0]; + } else { + let result = z2.intersection(schemasToIntersect[0], schemasToIntersect[1]); + for (let i2 = 2; i2 < schemasToIntersect.length; i2++) { + result = z2.intersection(result, schemasToIntersect[i2]); + } + zodSchema = result; + } + break; + } + const objectSchema = z2.object(shape); + if (schema.additionalProperties === false) { + zodSchema = objectSchema.strict(); + } else if (typeof schema.additionalProperties === "object") { + zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx)); + } else { + zodSchema = objectSchema.passthrough(); + } + break; + } + case "array": { + const prefixItems = schema.prefixItems; + const items = schema.items; + if (prefixItems && Array.isArray(prefixItems)) { + const tupleItems = prefixItems.map((item) => convertSchema(item, ctx)); + const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0; + if (rest) { + zodSchema = z2.tuple(tupleItems).rest(rest); + } else { + zodSchema = z2.tuple(tupleItems); + } + if (typeof schema.minItems === "number") { + zodSchema = zodSchema.check(z2.minLength(schema.minItems)); + } + if (typeof schema.maxItems === "number") { + zodSchema = zodSchema.check(z2.maxLength(schema.maxItems)); + } + } else if (Array.isArray(items)) { + const tupleItems = items.map((item) => convertSchema(item, ctx)); + const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0; + if (rest) { + zodSchema = z2.tuple(tupleItems).rest(rest); + } else { + zodSchema = z2.tuple(tupleItems); + } + if (typeof schema.minItems === "number") { + zodSchema = zodSchema.check(z2.minLength(schema.minItems)); + } + if (typeof schema.maxItems === "number") { + zodSchema = zodSchema.check(z2.maxLength(schema.maxItems)); + } + } else if (items !== void 0) { + const element = convertSchema(items, ctx); + let arraySchema = z2.array(element); + if (typeof schema.minItems === "number") { + arraySchema = arraySchema.min(schema.minItems); + } + if (typeof schema.maxItems === "number") { + arraySchema = arraySchema.max(schema.maxItems); + } + zodSchema = arraySchema; + } else { + zodSchema = z2.array(z2.any()); + } + break; + } + default: + throw new Error(`Unsupported type: ${type}`); + } + if (schema.description) { + zodSchema = zodSchema.describe(schema.description); + } + if (schema.default !== void 0) { + zodSchema = zodSchema.default(schema.default); + } + return zodSchema; +} +function convertSchema(schema, ctx) { + if (typeof schema === "boolean") { + return schema ? z2.any() : z2.never(); + } + let baseSchema = convertBaseSchema(schema, ctx); + const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0; + if (schema.anyOf && Array.isArray(schema.anyOf)) { + const options = schema.anyOf.map((s2) => convertSchema(s2, ctx)); + const anyOfUnion = z2.union(options); + baseSchema = hasExplicitType ? z2.intersection(baseSchema, anyOfUnion) : anyOfUnion; + } + if (schema.oneOf && Array.isArray(schema.oneOf)) { + const options = schema.oneOf.map((s2) => convertSchema(s2, ctx)); + const oneOfUnion = z2.xor(options); + baseSchema = hasExplicitType ? z2.intersection(baseSchema, oneOfUnion) : oneOfUnion; + } + if (schema.allOf && Array.isArray(schema.allOf)) { + if (schema.allOf.length === 0) { + baseSchema = hasExplicitType ? baseSchema : z2.any(); + } else { + let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx); + const startIdx = hasExplicitType ? 0 : 1; + for (let i2 = startIdx; i2 < schema.allOf.length; i2++) { + result = z2.intersection(result, convertSchema(schema.allOf[i2], ctx)); + } + baseSchema = result; + } + } + if (schema.nullable === true && ctx.version === "openapi-3.0") { + baseSchema = z2.nullable(baseSchema); + } + if (schema.readOnly === true) { + baseSchema = z2.readonly(baseSchema); + } + const extraMeta = {}; + const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"]; + for (const key of coreMetadataKeys) { + if (key in schema) { + extraMeta[key] = schema[key]; + } + } + const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"]; + for (const key of contentMetadataKeys) { + if (key in schema) { + extraMeta[key] = schema[key]; + } + } + for (const key of Object.keys(schema)) { + if (!RECOGNIZED_KEYS.has(key)) { + extraMeta[key] = schema[key]; + } + } + if (Object.keys(extraMeta).length > 0) { + ctx.registry.add(baseSchema, extraMeta); + } + return baseSchema; +} +function fromJSONSchema(schema, params) { + if (typeof schema === "boolean") { + return schema ? z2.any() : z2.never(); + } + const version4 = detectVersion(schema, params?.defaultTarget); + const defs = schema.$defs || schema.definitions || {}; + const ctx = { + version: version4, + defs, + refs: /* @__PURE__ */ new Map(), + processing: /* @__PURE__ */ new Set(), + rootSchema: schema, + registry: params?.registry ?? globalRegistry + }; + return convertSchema(schema, ctx); +} +var z2, RECOGNIZED_KEYS; +var init_from_json_schema = __esm({ + "../../node_modules/zod/v4/classic/from-json-schema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_registries(); + init_checks3(); + init_iso(); + init_schemas2(); + z2 = { + ...schemas_exports2, + ...checks_exports2, + iso: iso_exports + }; + RECOGNIZED_KEYS = /* @__PURE__ */ new Set([ + // Schema identification + "$schema", + "$ref", + "$defs", + "definitions", + // Core schema keywords + "$id", + "id", + "$comment", + "$anchor", + "$vocabulary", + "$dynamicRef", + "$dynamicAnchor", + // Type + "type", + "enum", + "const", + // Composition + "anyOf", + "oneOf", + "allOf", + "not", + // Object + "properties", + "required", + "additionalProperties", + "patternProperties", + "propertyNames", + "minProperties", + "maxProperties", + // Array + "items", + "prefixItems", + "additionalItems", + "minItems", + "maxItems", + "uniqueItems", + "contains", + "minContains", + "maxContains", + // String + "minLength", + "maxLength", + "pattern", + "format", + // Number + "minimum", + "maximum", + "exclusiveMinimum", + "exclusiveMaximum", + "multipleOf", + // Already handled metadata + "description", + "default", + // Content + "contentEncoding", + "contentMediaType", + "contentSchema", + // Unsupported (error-throwing) + "unevaluatedItems", + "unevaluatedProperties", + "if", + "then", + "else", + "dependentSchemas", + "dependentRequired", + // OpenAPI + "nullable", + "readOnly" + ]); + __name(detectVersion, "detectVersion"); + __name(resolveRef, "resolveRef"); + __name(convertBaseSchema, "convertBaseSchema"); + __name(convertSchema, "convertSchema"); + __name(fromJSONSchema, "fromJSONSchema"); + } +}); + +// ../../node_modules/zod/v4/classic/coerce.js +var coerce_exports = {}; +__export(coerce_exports, { + bigint: () => bigint4, + boolean: () => boolean3, + date: () => date5, + number: () => number3, + string: () => string3 +}); +function string3(params) { + return _coercedString(ZodString, params); +} +function number3(params) { + return _coercedNumber(ZodNumber, params); +} +function boolean3(params) { + return _coercedBoolean(ZodBoolean, params); +} +function bigint4(params) { + return _coercedBigint(ZodBigInt, params); +} +function date5(params) { + return _coercedDate(ZodDate, params); +} +var init_coerce = __esm({ + "../../node_modules/zod/v4/classic/coerce.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_schemas2(); + __name(string3, "string"); + __name(number3, "number"); + __name(boolean3, "boolean"); + __name(bigint4, "bigint"); + __name(date5, "date"); + } +}); + +// ../../node_modules/zod/v4/classic/external.js +var external_exports = {}; +__export(external_exports, { + $brand: () => $brand, + $input: () => $input, + $output: () => $output, + NEVER: () => NEVER, + TimePrecision: () => TimePrecision, + ZodAny: () => ZodAny, + ZodArray: () => ZodArray, + ZodBase64: () => ZodBase64, + ZodBase64URL: () => ZodBase64URL, + ZodBigInt: () => ZodBigInt, + ZodBigIntFormat: () => ZodBigIntFormat, + ZodBoolean: () => ZodBoolean, + ZodCIDRv4: () => ZodCIDRv4, + ZodCIDRv6: () => ZodCIDRv6, + ZodCUID: () => ZodCUID, + ZodCUID2: () => ZodCUID2, + ZodCatch: () => ZodCatch, + ZodCodec: () => ZodCodec, + ZodCustom: () => ZodCustom, + ZodCustomStringFormat: () => ZodCustomStringFormat, + ZodDate: () => ZodDate, + ZodDefault: () => ZodDefault, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, + ZodE164: () => ZodE164, + ZodEmail: () => ZodEmail, + ZodEmoji: () => ZodEmoji, + ZodEnum: () => ZodEnum, + ZodError: () => ZodError, + ZodExactOptional: () => ZodExactOptional, + ZodFile: () => ZodFile, + ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind, + ZodFunction: () => ZodFunction, + ZodGUID: () => ZodGUID, + ZodIPv4: () => ZodIPv4, + ZodIPv6: () => ZodIPv6, + ZodISODate: () => ZodISODate, + ZodISODateTime: () => ZodISODateTime, + ZodISODuration: () => ZodISODuration, + ZodISOTime: () => ZodISOTime, + ZodIntersection: () => ZodIntersection, + ZodIssueCode: () => ZodIssueCode, + ZodJWT: () => ZodJWT, + ZodKSUID: () => ZodKSUID, + ZodLazy: () => ZodLazy, + ZodLiteral: () => ZodLiteral, + ZodMAC: () => ZodMAC, + ZodMap: () => ZodMap, + ZodNaN: () => ZodNaN, + ZodNanoID: () => ZodNanoID, + ZodNever: () => ZodNever, + ZodNonOptional: () => ZodNonOptional, + ZodNull: () => ZodNull, + ZodNullable: () => ZodNullable, + ZodNumber: () => ZodNumber, + ZodNumberFormat: () => ZodNumberFormat, + ZodObject: () => ZodObject, + ZodOptional: () => ZodOptional, + ZodPipe: () => ZodPipe, + ZodPrefault: () => ZodPrefault, + ZodPromise: () => ZodPromise, + ZodReadonly: () => ZodReadonly, + ZodRealError: () => ZodRealError, + ZodRecord: () => ZodRecord, + ZodSet: () => ZodSet, + ZodString: () => ZodString, + ZodStringFormat: () => ZodStringFormat, + ZodSuccess: () => ZodSuccess, + ZodSymbol: () => ZodSymbol, + ZodTemplateLiteral: () => ZodTemplateLiteral, + ZodTransform: () => ZodTransform, + ZodTuple: () => ZodTuple, + ZodType: () => ZodType, + ZodULID: () => ZodULID, + ZodURL: () => ZodURL, + ZodUUID: () => ZodUUID, + ZodUndefined: () => ZodUndefined, + ZodUnion: () => ZodUnion, + ZodUnknown: () => ZodUnknown, + ZodVoid: () => ZodVoid, + ZodXID: () => ZodXID, + ZodXor: () => ZodXor, + _ZodString: () => _ZodString, + _default: () => _default2, + _function: () => _function, + any: () => any, + array: () => array, + base64: () => base642, + base64url: () => base64url2, + bigint: () => bigint3, + boolean: () => boolean2, + catch: () => _catch2, + check: () => check2, + cidrv4: () => cidrv42, + cidrv6: () => cidrv62, + clone: () => clone, + codec: () => codec, + coerce: () => coerce_exports, + config: () => config2, + core: () => core_exports2, + cuid: () => cuid3, + cuid2: () => cuid22, + custom: () => custom, + date: () => date4, + decode: () => decode3, + decodeAsync: () => decodeAsync2, + describe: () => describe2, + discriminatedUnion: () => discriminatedUnion, + e164: () => e1642, + email: () => email2, + emoji: () => emoji2, + encode: () => encode4, + encodeAsync: () => encodeAsync2, + endsWith: () => _endsWith, + enum: () => _enum2, + exactOptional: () => exactOptional, + file: () => file, + flattenError: () => flattenError, + float32: () => float32, + float64: () => float64, + formatError: () => formatError, + fromJSONSchema: () => fromJSONSchema, + function: () => _function, + getErrorMap: () => getErrorMap, + globalRegistry: () => globalRegistry, + gt: () => _gt, + gte: () => _gte, + guid: () => guid2, + hash: () => hash, + hex: () => hex2, + hostname: () => hostname2, + httpUrl: () => httpUrl, + includes: () => _includes, + instanceof: () => _instanceof, + int: () => int, + int32: () => int32, + int64: () => int64, + intersection: () => intersection, + ipv4: () => ipv42, + ipv6: () => ipv62, + iso: () => iso_exports, + json: () => json, + jwt: () => jwt, + keyof: () => keyof, + ksuid: () => ksuid2, + lazy: () => lazy2, + length: () => _length, + literal: () => literal, + locales: () => locales_exports, + looseObject: () => looseObject, + looseRecord: () => looseRecord, + lowercase: () => _lowercase, + lt: () => _lt, + lte: () => _lte, + mac: () => mac2, + map: () => map, + maxLength: () => _maxLength, + maxSize: () => _maxSize, + meta: () => meta2, + mime: () => _mime, + minLength: () => _minLength, + minSize: () => _minSize, + multipleOf: () => _multipleOf, + nan: () => nan, + nanoid: () => nanoid2, + nativeEnum: () => nativeEnum, + negative: () => _negative, + never: () => never, + nonnegative: () => _nonnegative, + nonoptional: () => nonoptional, + nonpositive: () => _nonpositive, + normalize: () => _normalize, + null: () => _null3, + nullable: () => nullable, + nullish: () => nullish2, + number: () => number2, + object: () => object, + optional: () => optional, + overwrite: () => _overwrite, + parse: () => parse2, + parseAsync: () => parseAsync2, + partialRecord: () => partialRecord, + pipe: () => pipe, + positive: () => _positive, + prefault: () => prefault, + preprocess: () => preprocess, + prettifyError: () => prettifyError, + promise: () => promise, + property: () => _property, + readonly: () => readonly, + record: () => record, + refine: () => refine, + regex: () => _regex, + regexes: () => regexes_exports, + registry: () => registry, + safeDecode: () => safeDecode2, + safeDecodeAsync: () => safeDecodeAsync2, + safeEncode: () => safeEncode2, + safeEncodeAsync: () => safeEncodeAsync2, + safeParse: () => safeParse2, + safeParseAsync: () => safeParseAsync2, + set: () => set, + setErrorMap: () => setErrorMap, + size: () => _size, + slugify: () => _slugify, + startsWith: () => _startsWith, + strictObject: () => strictObject, + string: () => string2, + stringFormat: () => stringFormat, + stringbool: () => stringbool, + success: () => success, + superRefine: () => superRefine, + symbol: () => symbol, + templateLiteral: () => templateLiteral, + toJSONSchema: () => toJSONSchema, + toLowerCase: () => _toLowerCase, + toUpperCase: () => _toUpperCase, + transform: () => transform, + treeifyError: () => treeifyError, + trim: () => _trim, + tuple: () => tuple, + uint32: () => uint32, + uint64: () => uint64, + ulid: () => ulid2, + undefined: () => _undefined3, + union: () => union2, + unknown: () => unknown, + uppercase: () => _uppercase, + url: () => url, + util: () => util_exports, + uuid: () => uuid2, + uuidv4: () => uuidv4, + uuidv6: () => uuidv6, + uuidv7: () => uuidv7, + void: () => _void2, + xid: () => xid2, + xor: () => xor +}); +var init_external = __esm({ + "../../node_modules/zod/v4/classic/external.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_schemas2(); + init_checks3(); + init_errors5(); + init_parse2(); + init_compat(); + init_core3(); + init_en(); + init_core3(); + init_json_schema_processors(); + init_from_json_schema(); + init_locales(); + init_iso(); + init_iso(); + init_coerce(); + config2(en_default()); + } +}); + +// ../../node_modules/zod/index.js +var init_zod = __esm({ + "../../node_modules/zod/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_external(); + init_external(); + } +}); + +// src/trpc/apis/admin-apis/apis/complaint.ts +var complaintRouter; +var init_complaint3 = __esm({ + "src/trpc/apis/admin-apis/apis/complaint.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_s3_client(); + init_dbService(); + complaintRouter = router2({ + getAll: protectedProcedure.input(external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(20) + })).query(async ({ input }) => { + const { cursor, limit } = input; + const { complaints: complaintsData, hasMore } = await getComplaints(cursor, limit); + const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData; + const complaintsWithSignedImages = await Promise.all( + complaintsToReturn.map(async (c2) => { + const signedImages = c2.images ? await generateSignedUrlsFromS3Urls(c2.images) : []; + return { + id: c2.id, + text: c2.complaintBody, + userId: c2.userId, + userName: c2.userName, + userMobile: c2.userMobile, + orderId: c2.orderId, + status: c2.isResolved ? "resolved" : "pending", + createdAt: c2.createdAt, + images: signedImages + }; + }) + ); + return { + complaints: complaintsWithSignedImages, + nextCursor: hasMore ? complaintsToReturn[complaintsToReturn.length - 1].id : void 0 + }; + }), + resolve: protectedProcedure.input(external_exports.object({ id: external_exports.string(), response: external_exports.string().optional() })).mutation(async ({ input }) => { + await resolveComplaint(parseInt(input.id), input.response); + return { message: "Complaint resolved successfully" }; + }) + }); + } +}); + +// ../../node_modules/dayjs/dayjs.min.js +var require_dayjs_min = __commonJS({ + "../../node_modules/dayjs/dayjs.min.js"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + !function(t9, e2) { + "object" == typeof exports && "undefined" != typeof module ? module.exports = e2() : "function" == typeof define && define.amd ? define(e2) : (t9 = "undefined" != typeof globalThis ? globalThis : t9 || self).dayjs = e2(); + }(exports, function() { + "use strict"; + var t9 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i2 = "second", s2 = "minute", u5 = "hour", a2 = "day", o2 = "week", c2 = "month", f2 = "quarter", h2 = "year", d2 = "date", l2 = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y2 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M2 = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t10) { + var e3 = ["th", "st", "nd", "rd"], n3 = t10 % 100; + return "[" + t10 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]"; + } }, m2 = /* @__PURE__ */ __name(function(t10, e3, n3) { + var r3 = String(t10); + return !r3 || r3.length >= e3 ? t10 : "" + Array(e3 + 1 - r3.length).join(n3) + t10; + }, "m"), v3 = { s: m2, z: function(t10) { + var e3 = -t10.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i3 = n3 % 60; + return (e3 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i3, 2, "0"); + }, m: /* @__PURE__ */ __name(function t10(e3, n3) { + if (e3.date() < n3.date()) + return -t10(n3, e3); + var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i3 = e3.clone().add(r3, c2), s3 = n3 - i3 < 0, u6 = e3.clone().add(r3 + (s3 ? -1 : 1), c2); + return +(-(r3 + (n3 - i3) / (s3 ? i3 - u6 : u6 - i3)) || 0); + }, "t"), a: function(t10) { + return t10 < 0 ? Math.ceil(t10) || 0 : Math.floor(t10); + }, p: function(t10) { + return { M: c2, y: h2, w: o2, d: a2, D: d2, h: u5, m: s2, s: i2, ms: r2, Q: f2 }[t10] || String(t10 || "").toLowerCase().replace(/s$/, ""); + }, u: function(t10) { + return void 0 === t10; + } }, g2 = "en", D3 = {}; + D3[g2] = M2; + var p2 = "$isDayjsObject", S2 = /* @__PURE__ */ __name(function(t10) { + return t10 instanceof _ || !(!t10 || !t10[p2]); + }, "S"), w2 = /* @__PURE__ */ __name(function t10(e3, n3, r3) { + var i3; + if (!e3) + return g2; + if ("string" == typeof e3) { + var s3 = e3.toLowerCase(); + D3[s3] && (i3 = s3), n3 && (D3[s3] = n3, i3 = s3); + var u6 = e3.split("-"); + if (!i3 && u6.length > 1) + return t10(u6[0]); + } else { + var a3 = e3.name; + D3[a3] = e3, i3 = a3; + } + return !r3 && i3 && (g2 = i3), i3 || !r3 && g2; + }, "t"), O2 = /* @__PURE__ */ __name(function(t10, e3) { + if (S2(t10)) + return t10.clone(); + var n3 = "object" == typeof e3 ? e3 : {}; + return n3.date = t10, n3.args = arguments, new _(n3); + }, "O"), b2 = v3; + b2.l = w2, b2.i = S2, b2.w = function(t10, e3) { + return O2(t10, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset }); + }; + var _ = function() { + function M3(t10) { + this.$L = w2(t10.locale, null, true), this.parse(t10), this.$x = this.$x || t10.x || {}, this[p2] = true; + } + __name(M3, "M"); + var m3 = M3.prototype; + return m3.parse = function(t10) { + this.$d = function(t11) { + var e3 = t11.date, n3 = t11.utc; + if (null === e3) + return /* @__PURE__ */ new Date(NaN); + if (b2.u(e3)) + return /* @__PURE__ */ new Date(); + if (e3 instanceof Date) + return new Date(e3); + if ("string" == typeof e3 && !/Z$/i.test(e3)) { + var r3 = e3.match($); + if (r3) { + var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3); + return n3 ? new Date(Date.UTC(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3); + } + } + return new Date(e3); + }(t10), this.init(); + }, m3.init = function() { + var t10 = this.$d; + this.$y = t10.getFullYear(), this.$M = t10.getMonth(), this.$D = t10.getDate(), this.$W = t10.getDay(), this.$H = t10.getHours(), this.$m = t10.getMinutes(), this.$s = t10.getSeconds(), this.$ms = t10.getMilliseconds(); + }, m3.$utils = function() { + return b2; + }, m3.isValid = function() { + return !(this.$d.toString() === l2); + }, m3.isSame = function(t10, e3) { + var n3 = O2(t10); + return this.startOf(e3) <= n3 && n3 <= this.endOf(e3); + }, m3.isAfter = function(t10, e3) { + return O2(t10) < this.startOf(e3); + }, m3.isBefore = function(t10, e3) { + return this.endOf(e3) < O2(t10); + }, m3.$g = function(t10, e3, n3) { + return b2.u(t10) ? this[e3] : this.set(n3, t10); + }, m3.unix = function() { + return Math.floor(this.valueOf() / 1e3); + }, m3.valueOf = function() { + return this.$d.getTime(); + }, m3.startOf = function(t10, e3) { + var n3 = this, r3 = !!b2.u(e3) || e3, f3 = b2.p(t10), l3 = /* @__PURE__ */ __name(function(t11, e4) { + var i3 = b2.w(n3.$u ? Date.UTC(n3.$y, e4, t11) : new Date(n3.$y, e4, t11), n3); + return r3 ? i3 : i3.endOf(a2); + }, "l"), $2 = /* @__PURE__ */ __name(function(t11, e4) { + return b2.w(n3.toDate()[t11].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3); + }, "$"), y3 = this.$W, M4 = this.$M, m4 = this.$D, v5 = "set" + (this.$u ? "UTC" : ""); + switch (f3) { + case h2: + return r3 ? l3(1, 0) : l3(31, 11); + case c2: + return r3 ? l3(1, M4) : l3(0, M4 + 1); + case o2: + var g3 = this.$locale().weekStart || 0, D4 = (y3 < g3 ? y3 + 7 : y3) - g3; + return l3(r3 ? m4 - D4 : m4 + (6 - D4), M4); + case a2: + case d2: + return $2(v5 + "Hours", 0); + case u5: + return $2(v5 + "Minutes", 1); + case s2: + return $2(v5 + "Seconds", 2); + case i2: + return $2(v5 + "Milliseconds", 3); + default: + return this.clone(); + } + }, m3.endOf = function(t10) { + return this.startOf(t10, false); + }, m3.$set = function(t10, e3) { + var n3, o3 = b2.p(t10), f3 = "set" + (this.$u ? "UTC" : ""), l3 = (n3 = {}, n3[a2] = f3 + "Date", n3[d2] = f3 + "Date", n3[c2] = f3 + "Month", n3[h2] = f3 + "FullYear", n3[u5] = f3 + "Hours", n3[s2] = f3 + "Minutes", n3[i2] = f3 + "Seconds", n3[r2] = f3 + "Milliseconds", n3)[o3], $2 = o3 === a2 ? this.$D + (e3 - this.$W) : e3; + if (o3 === c2 || o3 === h2) { + var y3 = this.clone().set(d2, 1); + y3.$d[l3]($2), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d; + } else + l3 && this.$d[l3]($2); + return this.init(), this; + }, m3.set = function(t10, e3) { + return this.clone().$set(t10, e3); + }, m3.get = function(t10) { + return this[b2.p(t10)](); + }, m3.add = function(r3, f3) { + var d3, l3 = this; + r3 = Number(r3); + var $2 = b2.p(f3), y3 = /* @__PURE__ */ __name(function(t10) { + var e3 = O2(l3); + return b2.w(e3.date(e3.date() + Math.round(t10 * r3)), l3); + }, "y"); + if ($2 === c2) + return this.set(c2, this.$M + r3); + if ($2 === h2) + return this.set(h2, this.$y + r3); + if ($2 === a2) + return y3(1); + if ($2 === o2) + return y3(7); + var M4 = (d3 = {}, d3[s2] = e2, d3[u5] = n2, d3[i2] = t9, d3)[$2] || 1, m4 = this.$d.getTime() + r3 * M4; + return b2.w(m4, this); + }, m3.subtract = function(t10, e3) { + return this.add(-1 * t10, e3); + }, m3.format = function(t10) { + var e3 = this, n3 = this.$locale(); + if (!this.isValid()) + return n3.invalidDate || l2; + var r3 = t10 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b2.z(this), s3 = this.$H, u6 = this.$m, a3 = this.$M, o3 = n3.weekdays, c3 = n3.months, f3 = n3.meridiem, h3 = /* @__PURE__ */ __name(function(t11, n4, i4, s4) { + return t11 && (t11[n4] || t11(e3, r3)) || i4[n4].slice(0, s4); + }, "h"), d3 = /* @__PURE__ */ __name(function(t11) { + return b2.s(s3 % 12 || 12, t11, "0"); + }, "d"), $2 = f3 || function(t11, e4, n4) { + var r4 = t11 < 12 ? "AM" : "PM"; + return n4 ? r4.toLowerCase() : r4; + }; + return r3.replace(y2, function(t11, r4) { + return r4 || function(t12) { + switch (t12) { + case "YY": + return String(e3.$y).slice(-2); + case "YYYY": + return b2.s(e3.$y, 4, "0"); + case "M": + return a3 + 1; + case "MM": + return b2.s(a3 + 1, 2, "0"); + case "MMM": + return h3(n3.monthsShort, a3, c3, 3); + case "MMMM": + return h3(c3, a3); + case "D": + return e3.$D; + case "DD": + return b2.s(e3.$D, 2, "0"); + case "d": + return String(e3.$W); + case "dd": + return h3(n3.weekdaysMin, e3.$W, o3, 2); + case "ddd": + return h3(n3.weekdaysShort, e3.$W, o3, 3); + case "dddd": + return o3[e3.$W]; + case "H": + return String(s3); + case "HH": + return b2.s(s3, 2, "0"); + case "h": + return d3(1); + case "hh": + return d3(2); + case "a": + return $2(s3, u6, true); + case "A": + return $2(s3, u6, false); + case "m": + return String(u6); + case "mm": + return b2.s(u6, 2, "0"); + case "s": + return String(e3.$s); + case "ss": + return b2.s(e3.$s, 2, "0"); + case "SSS": + return b2.s(e3.$ms, 3, "0"); + case "Z": + return i3; + } + return null; + }(t11) || i3.replace(":", ""); + }); + }, m3.utcOffset = function() { + return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); + }, m3.diff = function(r3, d3, l3) { + var $2, y3 = this, M4 = b2.p(d3), m4 = O2(r3), v5 = (m4.utcOffset() - this.utcOffset()) * e2, g3 = this - m4, D4 = /* @__PURE__ */ __name(function() { + return b2.m(y3, m4); + }, "D"); + switch (M4) { + case h2: + $2 = D4() / 12; + break; + case c2: + $2 = D4(); + break; + case f2: + $2 = D4() / 3; + break; + case o2: + $2 = (g3 - v5) / 6048e5; + break; + case a2: + $2 = (g3 - v5) / 864e5; + break; + case u5: + $2 = g3 / n2; + break; + case s2: + $2 = g3 / e2; + break; + case i2: + $2 = g3 / t9; + break; + default: + $2 = g3; + } + return l3 ? $2 : b2.a($2); + }, m3.daysInMonth = function() { + return this.endOf(c2).$D; + }, m3.$locale = function() { + return D3[this.$L]; + }, m3.locale = function(t10, e3) { + if (!t10) + return this.$L; + var n3 = this.clone(), r3 = w2(t10, e3, true); + return r3 && (n3.$L = r3), n3; + }, m3.clone = function() { + return b2.w(this.$d, this); + }, m3.toDate = function() { + return new Date(this.valueOf()); + }, m3.toJSON = function() { + return this.isValid() ? this.toISOString() : null; + }, m3.toISOString = function() { + return this.$d.toISOString(); + }, m3.toString = function() { + return this.$d.toUTCString(); + }, M3; + }(), k2 = _.prototype; + return O2.prototype = k2, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u5], ["$W", a2], ["$M", c2], ["$y", h2], ["$D", d2]].forEach(function(t10) { + k2[t10[1]] = function(e3) { + return this.$g(e3, t10[0], t10[1]); + }; + }), O2.extend = function(t10, e3) { + return t10.$i || (t10(e3, _, O2), t10.$i = true), O2; + }, O2.locale = w2, O2.isDayjs = S2, O2.unix = function(t10) { + return O2(1e3 * t10); + }, O2.en = D3[g2], O2.Ls = D3, O2.p = {}, O2; + }); + } +}); + +// src/trpc/apis/admin-apis/apis/coupon.ts +var import_dayjs, createCouponBodySchema, validateCouponBodySchema, couponRouter; +var init_coupon3 = __esm({ + "src/trpc/apis/admin-apis/apis/coupon.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + import_dayjs = __toESM(require_dayjs_min()); + init_dbService(); + createCouponBodySchema = external_exports.object({ + couponCode: external_exports.string().optional(), + isUserBased: external_exports.boolean().optional(), + discountPercent: external_exports.number().optional(), + flatDiscount: external_exports.number().optional(), + minOrder: external_exports.number().optional(), + targetUser: external_exports.number().optional(), + productIds: external_exports.array(external_exports.number()).optional().nullable(), + applicableUsers: external_exports.array(external_exports.number()).optional(), + applicableProducts: external_exports.array(external_exports.number()).optional(), + maxValue: external_exports.number().optional(), + isApplyForAll: external_exports.boolean().optional(), + validTill: external_exports.string().optional(), + maxLimitForUser: external_exports.number().optional(), + exclusiveApply: external_exports.boolean().optional() + }); + validateCouponBodySchema = external_exports.object({ + code: external_exports.string(), + userId: external_exports.number(), + orderAmount: external_exports.number() + }); + couponRouter = router2({ + create: protectedProcedure.input(createCouponBodySchema).mutation(async ({ input, ctx }) => { + const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableUsers, applicableProducts, maxValue, isApplyForAll, validTill, maxLimitForUser, exclusiveApply } = input; + if (!discountPercent && !flatDiscount || discountPercent && flatDiscount) { + throw new Error("Either discountPercent or flatDiscount must be provided (but not both)"); + } + if (isUserBased && (!applicableUsers || applicableUsers.length === 0) && !isApplyForAll) { + throw new Error("applicableUsers is required for user-based coupons (or set isApplyForAll to true)"); + } + if (isUserBased && isApplyForAll) { + throw new Error("Cannot be both user-based and apply for all users"); + } + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + let finalCouponCode = couponCode; + if (!finalCouponCode) { + const timestamp = Date.now().toString().slice(-6); + const random = Math.random().toString(36).substring(2, 8).toUpperCase(); + finalCouponCode = `MF${timestamp}${random}`; + } + const codeExists = await checkCouponExists(finalCouponCode); + if (codeExists) { + throw new Error("Coupon code already exists"); + } + if (applicableUsers && applicableUsers.length > 0) { + const usersExist = await checkUsersExist(applicableUsers); + if (!usersExist) { + throw new Error("Some applicable users not found"); + } + } + const coupon = await createCouponWithRelations( + { + couponCode: finalCouponCode, + isUserBased: isUserBased || false, + discountPercent: discountPercent?.toString(), + flatDiscount: flatDiscount?.toString(), + minOrder: minOrder?.toString(), + productIds: productIds || null, + createdBy: staffUserId, + maxValue: maxValue?.toString(), + isApplyForAll: isApplyForAll || false, + validTill: validTill ? (0, import_dayjs.default)(validTill).toDate() : void 0, + maxLimitForUser, + exclusiveApply: exclusiveApply || false + }, + applicableUsers, + applicableProducts + ); + return coupon; + }), + getAll: protectedProcedure.input(external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(50), + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { cursor, limit, search } = input; + const { coupons: couponsList, hasMore } = await getAllCoupons(cursor, limit, search); + const nextCursor = hasMore ? couponsList[couponsList.length - 1].id : void 0; + return { coupons: couponsList, nextCursor }; + }), + getById: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).query(async ({ input }) => { + const couponId = input.id; + const result = await getCouponById(couponId); + if (!result) { + throw new Error("Coupon not found"); + } + return { + ...result, + productIds: result.productIds || void 0, + applicableUsers: result.applicableUsers.map((au2) => au2.user), + applicableProducts: result.applicableProducts.map((ap2) => ap2.product) + }; + }), + update: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + updates: createCouponBodySchema.extend({ + isInvalidated: external_exports.boolean().optional() + }) + })).mutation(async ({ input }) => { + const { id, updates } = input; + if (updates.discountPercent !== void 0 && updates.flatDiscount !== void 0) { + if (updates.discountPercent && updates.flatDiscount) { + throw new Error("Cannot have both discountPercent and flatDiscount"); + } + } + const updateData = {}; + if (updates.couponCode !== void 0) + updateData.couponCode = updates.couponCode; + if (updates.isUserBased !== void 0) + updateData.isUserBased = updates.isUserBased; + if (updates.discountPercent !== void 0) + updateData.discountPercent = updates.discountPercent?.toString(); + if (updates.flatDiscount !== void 0) + updateData.flatDiscount = updates.flatDiscount?.toString(); + if (updates.minOrder !== void 0) + updateData.minOrder = updates.minOrder?.toString(); + if (updates.maxValue !== void 0) + updateData.maxValue = updates.maxValue?.toString(); + if (updates.isApplyForAll !== void 0) + updateData.isApplyForAll = updates.isApplyForAll; + if (updates.validTill !== void 0) + updateData.validTill = updates.validTill ? (0, import_dayjs.default)(updates.validTill).toDate() : null; + if (updates.maxLimitForUser !== void 0) + updateData.maxLimitForUser = updates.maxLimitForUser; + if (updates.exclusiveApply !== void 0) + updateData.exclusiveApply = updates.exclusiveApply; + if (updates.isInvalidated !== void 0) + updateData.isInvalidated = updates.isInvalidated; + if (updates.productIds !== void 0) + updateData.productIds = updates.productIds; + const coupon = await updateCouponWithRelations( + id, + updateData, + updates.applicableUsers, + updates.applicableProducts + ); + return coupon; + }), + delete: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).mutation(async ({ input }) => { + const { id } = input; + await invalidateCoupon(id); + return { message: "Coupon invalidated successfully" }; + }), + validate: protectedProcedure.input(validateCouponBodySchema).query(async ({ input }) => { + const { code, userId, orderAmount } = input; + if (!code || typeof code !== "string") { + return { valid: false, message: "Invalid coupon code" }; + } + const result = await validateCoupon(code, userId, orderAmount); + return result; + }), + generateCancellationCoupon: protectedProcedure.input( + external_exports.object({ + orderId: external_exports.number() + }) + ).mutation(async ({ input, ctx }) => { + const { orderId } = input; + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + const order = await getOrderWithUser(orderId); + if (!order) { + throw new Error("Order not found"); + } + if (!order.user) { + throw new Error("User not found for this order"); + } + const userNamePrefix = (order.user.name || order.user.mobile || "USR").substring(0, 3).toUpperCase(); + const couponCode = `${userNamePrefix}${orderId}`; + const codeExists = await checkCouponExists(couponCode); + if (codeExists) { + throw new Error("Coupon code already exists"); + } + const orderAmount = parseFloat(order.totalAmount); + const coupon = await generateCancellationCoupon( + orderId, + staffUserId, + order.userId, + orderAmount, + couponCode + ); + return coupon; + }), + getReservedCoupons: protectedProcedure.input(external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(50), + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { cursor, limit, search } = input; + const { coupons: result, hasMore } = await getReservedCoupons(cursor, limit, search); + const nextCursor = hasMore ? result[result.length - 1].id : void 0; + return { + coupons: result, + nextCursor + }; + }), + createReservedCoupon: protectedProcedure.input(createCouponBodySchema).mutation(async ({ input, ctx }) => { + const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableProducts, maxValue, validTill, maxLimitForUser, exclusiveApply } = input; + if (!discountPercent && !flatDiscount || discountPercent && flatDiscount) { + throw new Error("Either discountPercent or flatDiscount must be provided (but not both)"); + } + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + let secretCode = couponCode || `SECRET${Date.now().toString().slice(-6)}${Math.random().toString(36).substring(2, 8).toUpperCase()}`; + const codeExists = await checkReservedCouponExists(secretCode); + if (codeExists) { + throw new Error("Secret code already exists"); + } + const coupon = await createReservedCouponWithProducts( + { + secretCode, + couponCode: couponCode || `RESERVED${Date.now().toString().slice(-6)}`, + discountPercent: discountPercent?.toString(), + flatDiscount: flatDiscount?.toString(), + minOrder: minOrder?.toString(), + productIds, + maxValue: maxValue?.toString(), + validTill: validTill ? (0, import_dayjs.default)(validTill).toDate() : void 0, + maxLimitForUser, + exclusiveApply: exclusiveApply || false, + createdBy: staffUserId + }, + applicableProducts + ); + return coupon; + }), + getUsersMiniInfo: protectedProcedure.input(external_exports.object({ + search: external_exports.string().optional(), + limit: external_exports.number().min(1).max(50).default(20), + offset: external_exports.number().min(0).default(0) + })).query(async ({ input }) => { + const { search, limit, offset } = input; + const result = await getUsersForCoupon(search, limit, offset); + return result; + }), + createCoupon: protectedProcedure.input(external_exports.object({ + mobile: external_exports.string().min(1, "Mobile number is required") + })).mutation(async ({ input, ctx }) => { + const { mobile } = input; + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + const cleanMobile = mobile.replace(/\D/g, ""); + if (cleanMobile.length !== 10) { + throw new Error("Mobile number must be exactly 10 digits"); + } + const timestamp = Date.now().toString().slice(-6); + const random = Math.random().toString(36).substring(2, 6).toUpperCase(); + const couponCode = `MF${cleanMobile.slice(-4)}${timestamp}${random}`; + const codeExists = await checkCouponExists(couponCode); + if (codeExists) { + throw new Error("Generated coupon code already exists - please try again"); + } + const { coupon, user } = await createCouponForUser(cleanMobile, couponCode, staffUserId); + return { + success: true, + coupon: { + id: coupon.id, + couponCode: coupon.couponCode, + userId: user.id, + userMobile: user.mobile, + discountPercent: 20, + minOrder: 1e3, + maxValue: 500, + maxLimitForUser: 1 + } + }; + }) + }); + } +}); + +// ../../node_modules/unenv/dist/runtime/npm/node-fetch.mjs +var node_fetch_exports = {}; +__export(node_fetch_exports, { + AbortController: () => AbortController2, + AbortError: () => AbortError, + FetchError: () => FetchError, + Headers: () => Headers2, + Request: () => Request2, + Response: () => Response2, + default: () => node_fetch_default, + fetch: () => fetch2, + isRedirect: () => isRedirect +}); +var fetch2, Headers2, Request2, Response2, AbortController2, FetchError, AbortError, redirectStatus, isRedirect, node_fetch_default; +var init_node_fetch = __esm({ + "../../node_modules/unenv/dist/runtime/npm/node-fetch.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fetch2 = /* @__PURE__ */ __name((...args) => globalThis.fetch(...args), "fetch"); + Headers2 = globalThis.Headers; + Request2 = globalThis.Request; + Response2 = globalThis.Response; + AbortController2 = globalThis.AbortController; + FetchError = Error; + AbortError = Error; + redirectStatus = /* @__PURE__ */ new Set([ + 301, + 302, + 303, + 307, + 308 + ]); + isRedirect = /* @__PURE__ */ __name((code) => redirectStatus.has(code), "isRedirect"); + fetch2.Promise = globalThis.Promise; + fetch2.isRedirect = isRedirect; + node_fetch_default = fetch2; + } +}); + +// required-unenv-alias:node-fetch +var require_node_fetch = __commonJS({ + "required-unenv-alias:node-fetch"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_node_fetch(); + module.exports = Object.entries(node_fetch_exports).filter(([k2]) => k2 !== "default").reduce( + (cjs, [k2, value]) => Object.defineProperty(cjs, k2, { value, enumerable: true }), + "default" in node_fetch_exports ? node_fetch_default : {} + ); + } +}); + +// node-built-in-modules:node:assert +import libDefault from "node:assert"; +var require_node_assert = __commonJS({ + "node-built-in-modules:node:assert"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module.exports = libDefault; + } +}); + +// node-built-in-modules:node:zlib +import libDefault2 from "node:zlib"; +var require_node_zlib = __commonJS({ + "node-built-in-modules:node:zlib"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module.exports = libDefault2; + } +}); + +// ../../node_modules/promise-limit/index.js +var require_promise_limit = __commonJS({ + "../../node_modules/promise-limit/index.js"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + function limiter(count4) { + var outstanding = 0; + var jobs = []; + function remove() { + outstanding--; + if (outstanding < count4) { + dequeue(); + } + } + __name(remove, "remove"); + function dequeue() { + var job = jobs.shift(); + semaphore.queue = jobs.length; + if (job) { + run2(job.fn).then(job.resolve).catch(job.reject); + } + } + __name(dequeue, "dequeue"); + function queue(fn) { + return new Promise(function(resolve, reject) { + jobs.push({ fn, resolve, reject }); + semaphore.queue = jobs.length; + }); + } + __name(queue, "queue"); + function run2(fn) { + outstanding++; + try { + return Promise.resolve(fn()).then(function(result) { + remove(); + return result; + }, function(error50) { + remove(); + throw error50; + }); + } catch (err) { + remove(); + return Promise.reject(err); + } + } + __name(run2, "run"); + var semaphore = /* @__PURE__ */ __name(function(fn) { + if (outstanding >= count4) { + return queue(fn); + } else { + return run2(fn); + } + }, "semaphore"); + return semaphore; + } + __name(limiter, "limiter"); + function map2(items, mapper) { + var failed = false; + var limit = this; + return Promise.all(items.map(function() { + var args = arguments; + return limit(function() { + if (!failed) { + return mapper.apply(void 0, args).catch(function(e2) { + failed = true; + throw e2; + }); + } + }); + })); + } + __name(map2, "map"); + function addExtras(fn) { + fn.queue = 0; + fn.map = map2; + return fn; + } + __name(addExtras, "addExtras"); + module.exports = function(count4) { + if (count4) { + return addExtras(limiter(count4)); + } else { + return addExtras(function(fn) { + return fn(); + }); + } + }; + } +}); + +// ../../node_modules/err-code/index.js +var require_err_code = __commonJS({ + "../../node_modules/err-code/index.js"(exports, module) { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + function assign(obj, props) { + for (const key in props) { + Object.defineProperty(obj, key, { + value: props[key], + enumerable: true, + configurable: true + }); + } + return obj; + } + __name(assign, "assign"); + function createError(err, code, props) { + if (!err || typeof err === "string") { + throw new TypeError("Please pass an Error to err-code"); + } + if (!props) { + props = {}; + } + if (typeof code === "object") { + props = code; + code = void 0; + } + if (code != null) { + props.code = code; + } + try { + return assign(err, props); + } catch (_) { + props.message = err.message; + props.stack = err.stack; + const ErrClass = /* @__PURE__ */ __name(function() { + }, "ErrClass"); + ErrClass.prototype = Object.create(Object.getPrototypeOf(err)); + return assign(new ErrClass(), props); + } + } + __name(createError, "createError"); + module.exports = createError; + } +}); + +// ../../node_modules/retry/lib/retry_operation.js +var require_retry_operation = __commonJS({ + "../../node_modules/retry/lib/retry_operation.js"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + function RetryOperation(timeouts, options) { + if (typeof options === "boolean") { + options = { forever: options }; + } + this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)); + this._timeouts = timeouts; + this._options = options || {}; + this._maxRetryTime = options && options.maxRetryTime || Infinity; + this._fn = null; + this._errors = []; + this._attempts = 1; + this._operationTimeout = null; + this._operationTimeoutCb = null; + this._timeout = null; + this._operationStart = null; + if (this._options.forever) { + this._cachedTimeouts = this._timeouts.slice(0); + } + } + __name(RetryOperation, "RetryOperation"); + module.exports = RetryOperation; + RetryOperation.prototype.reset = function() { + this._attempts = 1; + this._timeouts = this._originalTimeouts; + }; + RetryOperation.prototype.stop = function() { + if (this._timeout) { + clearTimeout(this._timeout); + } + this._timeouts = []; + this._cachedTimeouts = null; + }; + RetryOperation.prototype.retry = function(err) { + if (this._timeout) { + clearTimeout(this._timeout); + } + if (!err) { + return false; + } + var currentTime = (/* @__PURE__ */ new Date()).getTime(); + if (err && currentTime - this._operationStart >= this._maxRetryTime) { + this._errors.unshift(new Error("RetryOperation timeout occurred")); + return false; + } + this._errors.push(err); + var timeout = this._timeouts.shift(); + if (timeout === void 0) { + if (this._cachedTimeouts) { + this._errors.splice(this._errors.length - 1, this._errors.length); + this._timeouts = this._cachedTimeouts.slice(0); + timeout = this._timeouts.shift(); + } else { + return false; + } + } + var self2 = this; + var timer = setTimeout(function() { + self2._attempts++; + if (self2._operationTimeoutCb) { + self2._timeout = setTimeout(function() { + self2._operationTimeoutCb(self2._attempts); + }, self2._operationTimeout); + if (self2._options.unref) { + self2._timeout.unref(); + } + } + self2._fn(self2._attempts); + }, timeout); + if (this._options.unref) { + timer.unref(); + } + return true; + }; + RetryOperation.prototype.attempt = function(fn, timeoutOps) { + this._fn = fn; + if (timeoutOps) { + if (timeoutOps.timeout) { + this._operationTimeout = timeoutOps.timeout; + } + if (timeoutOps.cb) { + this._operationTimeoutCb = timeoutOps.cb; + } + } + var self2 = this; + if (this._operationTimeoutCb) { + this._timeout = setTimeout(function() { + self2._operationTimeoutCb(); + }, self2._operationTimeout); + } + this._operationStart = (/* @__PURE__ */ new Date()).getTime(); + this._fn(this._attempts); + }; + RetryOperation.prototype.try = function(fn) { + console.log("Using RetryOperation.try() is deprecated"); + this.attempt(fn); + }; + RetryOperation.prototype.start = function(fn) { + console.log("Using RetryOperation.start() is deprecated"); + this.attempt(fn); + }; + RetryOperation.prototype.start = RetryOperation.prototype.try; + RetryOperation.prototype.errors = function() { + return this._errors; + }; + RetryOperation.prototype.attempts = function() { + return this._attempts; + }; + RetryOperation.prototype.mainError = function() { + if (this._errors.length === 0) { + return null; + } + var counts = {}; + var mainError = null; + var mainErrorCount = 0; + for (var i2 = 0; i2 < this._errors.length; i2++) { + var error50 = this._errors[i2]; + var message2 = error50.message; + var count4 = (counts[message2] || 0) + 1; + counts[message2] = count4; + if (count4 >= mainErrorCount) { + mainError = error50; + mainErrorCount = count4; + } + } + return mainError; + }; + } +}); + +// ../../node_modules/retry/lib/retry.js +var require_retry = __commonJS({ + "../../node_modules/retry/lib/retry.js"(exports) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var RetryOperation = require_retry_operation(); + exports.operation = function(options) { + var timeouts = exports.timeouts(options); + return new RetryOperation(timeouts, { + forever: options && options.forever, + unref: options && options.unref, + maxRetryTime: options && options.maxRetryTime + }); + }; + exports.timeouts = function(options) { + if (options instanceof Array) { + return [].concat(options); + } + var opts = { + retries: 10, + factor: 2, + minTimeout: 1 * 1e3, + maxTimeout: Infinity, + randomize: false + }; + for (var key in options) { + opts[key] = options[key]; + } + if (opts.minTimeout > opts.maxTimeout) { + throw new Error("minTimeout is greater than maxTimeout"); + } + var timeouts = []; + for (var i2 = 0; i2 < opts.retries; i2++) { + timeouts.push(this.createTimeout(i2, opts)); + } + if (options && options.forever && !timeouts.length) { + timeouts.push(this.createTimeout(i2, opts)); + } + timeouts.sort(function(a2, b2) { + return a2 - b2; + }); + return timeouts; + }; + exports.createTimeout = function(attempt, opts) { + var random = opts.randomize ? Math.random() + 1 : 1; + var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt)); + timeout = Math.min(timeout, opts.maxTimeout); + return timeout; + }; + exports.wrap = function(obj, options, methods) { + if (options instanceof Array) { + methods = options; + options = null; + } + if (!methods) { + methods = []; + for (var key in obj) { + if (typeof obj[key] === "function") { + methods.push(key); + } + } + } + for (var i2 = 0; i2 < methods.length; i2++) { + var method = methods[i2]; + var original = obj[method]; + obj[method] = (/* @__PURE__ */ __name(function retryWrapper(original2) { + var op = exports.operation(options); + var args = Array.prototype.slice.call(arguments, 1); + var callback = args.pop(); + args.push(function(err) { + if (op.retry(err)) { + return; + } + if (err) { + arguments[0] = op.mainError(); + } + callback.apply(this, arguments); + }); + op.attempt(function() { + original2.apply(obj, args); + }); + }, "retryWrapper")).bind(obj, original); + obj[method].options = options; + } + }; + } +}); + +// ../../node_modules/retry/index.js +var require_retry2 = __commonJS({ + "../../node_modules/retry/index.js"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module.exports = require_retry(); + } +}); + +// ../../node_modules/promise-retry/index.js +var require_promise_retry = __commonJS({ + "../../node_modules/promise-retry/index.js"(exports, module) { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var errcode = require_err_code(); + var retry = require_retry2(); + var hasOwn = Object.prototype.hasOwnProperty; + function isRetryError(err) { + return err && err.code === "EPROMISERETRY" && hasOwn.call(err, "retried"); + } + __name(isRetryError, "isRetryError"); + function promiseRetry(fn, options) { + var temp; + var operation2; + if (typeof fn === "object" && typeof options === "function") { + temp = options; + options = fn; + fn = temp; + } + operation2 = retry.operation(options); + return new Promise(function(resolve, reject) { + operation2.attempt(function(number4) { + Promise.resolve().then(function() { + return fn(function(err) { + if (isRetryError(err)) { + err = err.retried; + } + throw errcode(new Error("Retrying"), "EPROMISERETRY", { retried: err }); + }, number4); + }).then(resolve, function(err) { + if (isRetryError(err)) { + err = err.retried; + if (operation2.retry(err || new Error())) { + return; + } + } + reject(err); + }); + }); + }); + } + __name(promiseRetry, "promiseRetry"); + module.exports = promiseRetry; + } +}); + +// node_modules/expo-server-sdk/build/ExpoClientValues.js +var require_ExpoClientValues = __commonJS({ + "node_modules/expo-server-sdk/build/ExpoClientValues.js"(exports) { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.requestRetryMinTimeout = exports.defaultConcurrentRequestLimit = exports.pushNotificationReceiptChunkLimit = exports.pushNotificationChunkLimit = exports.getReceiptsApiUrl = exports.sendApiUrl = void 0; + var baseUrl = process.env["EXPO_BASE_URL"] || "https://exp.host"; + exports.sendApiUrl = `${baseUrl}/--/api/v2/push/send`; + exports.getReceiptsApiUrl = `${baseUrl}/--/api/v2/push/getReceipts`; + exports.pushNotificationChunkLimit = 100; + exports.pushNotificationReceiptChunkLimit = 300; + exports.defaultConcurrentRequestLimit = 6; + exports.requestRetryMinTimeout = 1e3; + } +}); + +// node_modules/expo-server-sdk/package.json +var require_package = __commonJS({ + "node_modules/expo-server-sdk/package.json"(exports, module) { + module.exports = { + name: "expo-server-sdk", + version: "4.0.0", + description: "Server-side library for working with Expo using Node.js", + main: "build/ExpoClient.js", + types: "build/ExpoClient.d.ts", + files: [ + "build" + ], + engines: { + node: ">=20" + }, + scripts: { + build: "yarn prepack", + lint: "eslint", + prepack: "tsc --project tsconfig.build.json", + test: "jest", + tsc: "tsc", + watch: "tsc --watch" + }, + jest: { + coverageDirectory: "/../coverage", + coverageThreshold: { + global: { + branches: 100, + functions: 100, + lines: 100, + statements: 0 + } + }, + preset: "ts-jest", + rootDir: "src", + testEnvironment: "node" + }, + repository: { + type: "git", + url: "git+https://github.com/expo/expo-server-sdk-node.git" + }, + keywords: [ + "expo", + "push-notifications" + ], + author: "support@expo.dev", + license: "MIT", + bugs: { + url: "https://github.com/expo/expo-server-sdk-node/issues" + }, + homepage: "https://github.com/expo/expo-server-sdk-node#readme", + dependencies: { + "node-fetch": "^2.6.0", + "promise-limit": "^2.7.0", + "promise-retry": "^2.0.1" + }, + devDependencies: { + "@tsconfig/node20": "20.1.6", + "@tsconfig/strictest": "2.0.5", + "@types/node": "22.17.2", + "@types/node-fetch": "2.6.12", + "@types/promise-retry": "1.1.6", + eslint: "9.33.0", + "eslint-config-universe": "15.0.3", + jest: "29.7.0", + jiti: "2.4.2", + msw: "2.10.5", + prettier: "3.6.2", + "ts-jest": "29.4.1", + typescript: "5.9.2" + }, + packageManager: "yarn@4.9.2" + }; + } +}); + +// node_modules/expo-server-sdk/build/ExpoClient.js +var require_ExpoClient = __commonJS({ + "node_modules/expo-server-sdk/build/ExpoClient.js"(exports) { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) { + if (k22 === void 0) + k22 = k2; + var desc2 = Object.getOwnPropertyDescriptor(m2, k2); + if (!desc2 || ("get" in desc2 ? !m2.__esModule : desc2.writable || desc2.configurable)) { + desc2 = { enumerable: true, get: function() { + return m2[k2]; + } }; + } + Object.defineProperty(o2, k22, desc2); + } : function(o2, m2, k2, k22) { + if (k22 === void 0) + k22 = k2; + o2[k22] = m2[k2]; + }); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o2, v3) { + Object.defineProperty(o2, "default", { enumerable: true, value: v3 }); + } : function(o2, v3) { + o2["default"] = v3; + }); + var __importStar = exports && exports.__importStar || function() { + var ownKeys = /* @__PURE__ */ __name(function(o2) { + ownKeys = Object.getOwnPropertyNames || function(o3) { + var ar2 = []; + for (var k2 in o3) + if (Object.prototype.hasOwnProperty.call(o3, k2)) + ar2[ar2.length] = k2; + return ar2; + }; + return ownKeys(o2); + }, "ownKeys"); + return function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k2 = ownKeys(mod), i2 = 0; i2 < k2.length; i2++) + if (k2[i2] !== "default") + __createBinding(result, mod, k2[i2]); + } + __setModuleDefault(result, mod); + return result; + }; + }(); + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Expo = void 0; + var node_fetch_1 = __importStar(require_node_fetch()); + var node_assert_1 = __importDefault(require_node_assert()); + var node_zlib_1 = require_node_zlib(); + var promise_limit_1 = __importDefault(require_promise_limit()); + var promise_retry_1 = __importDefault(require_promise_retry()); + var ExpoClientValues_1 = require_ExpoClientValues(); + var _Expo = class { + httpAgent; + limitConcurrentRequests; + accessToken; + useFcmV1; + retryMinTimeout; + constructor(options = {}) { + this.httpAgent = options.httpAgent; + this.limitConcurrentRequests = (0, promise_limit_1.default)(options.maxConcurrentRequests ?? ExpoClientValues_1.defaultConcurrentRequestLimit); + this.retryMinTimeout = options.retryMinTimeout ?? ExpoClientValues_1.requestRetryMinTimeout; + this.accessToken = options.accessToken; + this.useFcmV1 = options.useFcmV1; + } + /** + * Returns `true` if the token is an Expo push token + */ + static isExpoPushToken(token) { + return typeof token === "string" && ((token.startsWith("ExponentPushToken[") || token.startsWith("ExpoPushToken[")) && token.endsWith("]") || /^[a-z\d]{8}-[a-z\d]{4}-[a-z\d]{4}-[a-z\d]{4}-[a-z\d]{12}$/i.test(token)); + } + /** + * Sends the given messages to their recipients via push notifications and returns an array of + * push tickets. Each ticket corresponds to the message at its respective index (the nth receipt + * is for the nth message) and contains a receipt ID. Later, after Expo attempts to deliver the + * messages to the underlying push notification services, the receipts with those IDs will be + * available for a period of time (approximately a day). + * + * There is a limit on the number of push notifications you can send at once. Use + * `chunkPushNotifications` to divide an array of push notification messages into appropriately + * sized chunks. + */ + async sendPushNotificationsAsync(messages) { + const url2 = new URL(ExpoClientValues_1.sendApiUrl); + if (this.useFcmV1 === false) { + url2.searchParams.append("useFcmV1", String(this.useFcmV1)); + } + const actualMessagesCount = _Expo._getActualMessageCount(messages); + const data = await this.limitConcurrentRequests(async () => { + return await (0, promise_retry_1.default)(async (retry) => { + try { + return await this.requestAsync(url2.toString(), { + httpMethod: "post", + body: messages, + shouldCompress(body) { + return body.length > 1024; + } + }); + } catch (e2) { + if (e2.statusCode === 429) { + return retry(e2); + } + throw e2; + } + }, { + retries: 2, + factor: 2, + minTimeout: this.retryMinTimeout + }); + }); + if (!Array.isArray(data) || data.length !== actualMessagesCount) { + const apiError = new Error(`Expected Expo to respond with ${actualMessagesCount} ${actualMessagesCount === 1 ? "ticket" : "tickets"} but got ${data.length}`); + apiError["data"] = data; + throw apiError; + } + return data; + } + async getPushNotificationReceiptsAsync(receiptIds) { + const data = await this.requestAsync(ExpoClientValues_1.getReceiptsApiUrl, { + httpMethod: "post", + body: { ids: receiptIds }, + shouldCompress(body) { + return body.length > 1024; + } + }); + if (!data || typeof data !== "object" || Array.isArray(data)) { + const apiError = new Error(`Expected Expo to respond with a map from receipt IDs to receipts but received data of another type`); + apiError["data"] = data; + throw apiError; + } + return data; + } + chunkPushNotifications(messages) { + const chunks = []; + let chunk = []; + let chunkMessagesCount = 0; + for (const message2 of messages) { + if (Array.isArray(message2.to)) { + let partialTo = []; + for (const recipient of message2.to) { + partialTo.push(recipient); + chunkMessagesCount++; + if (chunkMessagesCount >= ExpoClientValues_1.pushNotificationChunkLimit) { + chunk.push({ ...message2, to: partialTo }); + chunks.push(chunk); + chunk = []; + chunkMessagesCount = 0; + partialTo = []; + } + } + if (partialTo.length) { + chunk.push({ ...message2, to: partialTo }); + } + } else { + chunk.push(message2); + chunkMessagesCount++; + } + if (chunkMessagesCount >= ExpoClientValues_1.pushNotificationChunkLimit) { + chunks.push(chunk); + chunk = []; + chunkMessagesCount = 0; + } + } + if (chunkMessagesCount) { + chunks.push(chunk); + } + return chunks; + } + chunkPushNotificationReceiptIds(receiptIds) { + return this.chunkItems(receiptIds, ExpoClientValues_1.pushNotificationReceiptChunkLimit); + } + chunkItems(items, chunkSize) { + const chunks = []; + let chunk = []; + for (const item of items) { + chunk.push(item); + if (chunk.length >= chunkSize) { + chunks.push(chunk); + chunk = []; + } + } + if (chunk.length) { + chunks.push(chunk); + } + return chunks; + } + async requestAsync(url2, options) { + let requestBody; + const sdkVersion = require_package().version; + const requestHeaders = new node_fetch_1.Headers({ + Accept: "application/json", + "Accept-Encoding": "gzip, deflate", + "User-Agent": `expo-server-sdk-node/${sdkVersion}` + }); + if (this.accessToken) { + requestHeaders.set("Authorization", `Bearer ${this.accessToken}`); + } + if (options.body != null) { + const json2 = JSON.stringify(options.body); + (0, node_assert_1.default)(json2 != null, `JSON request body must not be null`); + if (options.shouldCompress(json2)) { + requestBody = (0, node_zlib_1.gzipSync)(Buffer.from(json2)); + requestHeaders.set("Content-Encoding", "gzip"); + } else { + requestBody = json2; + } + requestHeaders.set("Content-Type", "application/json"); + } + const response = await (0, node_fetch_1.default)(url2, { + method: options.httpMethod, + body: requestBody, + headers: requestHeaders, + agent: this.httpAgent + }); + if (response.status !== 200) { + const apiError = await this.parseErrorResponseAsync(response); + throw apiError; + } + const textBody = await response.text(); + let result; + try { + result = JSON.parse(textBody); + } catch { + const apiError = await this.getTextResponseErrorAsync(response, textBody); + throw apiError; + } + if (result.errors) { + const apiError = this.getErrorFromResult(response, result); + throw apiError; + } + return result.data; + } + async parseErrorResponseAsync(response) { + const textBody = await response.text(); + let result; + try { + result = JSON.parse(textBody); + } catch { + return await this.getTextResponseErrorAsync(response, textBody); + } + if (!result.errors || !Array.isArray(result.errors) || !result.errors.length) { + const apiError = await this.getTextResponseErrorAsync(response, textBody); + apiError["errorData"] = result; + return apiError; + } + return this.getErrorFromResult(response, result); + } + async getTextResponseErrorAsync(response, text2) { + const apiError = new Error(`Expo responded with an error with status code ${response.status}: ` + text2); + apiError["statusCode"] = response.status; + apiError["errorText"] = text2; + return apiError; + } + /** + * Returns an error for the first API error in the result, with an optional `others` field that + * contains any other errors. + */ + getErrorFromResult(response, result) { + const noErrorsMessage = `Expected at least one error from Expo`; + (0, node_assert_1.default)(result.errors, noErrorsMessage); + const [errorData, ...otherErrorData] = result.errors; + node_assert_1.default.ok(errorData, noErrorsMessage); + const error50 = this.getErrorFromResultError(errorData); + if (otherErrorData.length) { + error50["others"] = otherErrorData.map((data) => this.getErrorFromResultError(data)); + } + error50["statusCode"] = response.status; + return error50; + } + /** + * Returns an error for a single API error + */ + getErrorFromResultError(errorData) { + const error50 = new Error(errorData.message); + error50["code"] = errorData.code; + if (errorData.details != null) { + error50["details"] = errorData.details; + } + if (errorData.stack != null) { + error50["serverStack"] = errorData.stack; + } + return error50; + } + static _getActualMessageCount(messages) { + return messages.reduce((total, message2) => { + if (Array.isArray(message2.to)) { + total += message2.to.length; + } else { + total++; + } + return total; + }, 0); + } + }; + var Expo2 = _Expo; + __name(Expo2, "Expo"); + __publicField(Expo2, "pushNotificationChunkSizeLimit", ExpoClientValues_1.pushNotificationChunkLimit); + __publicField(Expo2, "pushNotificationReceiptChunkSizeLimit", ExpoClientValues_1.pushNotificationReceiptChunkLimit); + exports.Expo = Expo2; + exports.default = Expo2; + } +}); + +// src/lib/const-strings.ts +var ORDER_PLACED_MESSAGE, ORDER_PACKAGED_MESSAGE, ORDER_DELIVERED_MESSAGE, ORDER_CANCELLED_MESSAGE; +var init_const_strings = __esm({ + "src/lib/const-strings.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ORDER_PLACED_MESSAGE = "Your order has been placed successfully!"; + ORDER_PACKAGED_MESSAGE = "Your order has been packaged and is ready for delivery."; + ORDER_DELIVERED_MESSAGE = "Your order has been delivered."; + ORDER_CANCELLED_MESSAGE = "Your order has been cancelled."; + } +}); + +// src/lib/notif-job.ts +async function scheduleNotification(userId, payload, options) { + const jobData = { userId, ...payload }; + await notificationQueue.add("send-notification", jobData, options); +} +async function sendOrderPlacedNotification(userId, orderId) { + await scheduleNotification(userId, { + title: "Order Placed", + body: ORDER_PLACED_MESSAGE, + type: "order", + orderId + }); +} +async function sendOrderPackagedNotification(userId, orderId) { + await scheduleNotification(userId, { + title: "Order Packaged", + body: ORDER_PACKAGED_MESSAGE, + type: "order", + orderId + }); +} +async function sendOrderDeliveredNotification(userId, orderId) { + await scheduleNotification(userId, { + title: "Order Delivered", + body: ORDER_DELIVERED_MESSAGE, + type: "order", + orderId + }); +} +async function sendOrderCancelledNotification(userId, orderId) { + await scheduleNotification(userId, { + title: "Order Cancelled", + body: ORDER_CANCELLED_MESSAGE, + type: "order", + orderId + }); +} +var import_expo_server_sdk, notificationQueue; +var init_notif_job = __esm({ + "src/lib/notif-job.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + import_expo_server_sdk = __toESM(require_ExpoClient()); + init_s3_client(); + init_const_strings(); + notificationQueue = {}; + __name(scheduleNotification, "scheduleNotification"); + __name(sendOrderPlacedNotification, "sendOrderPlacedNotification"); + __name(sendOrderPackagedNotification, "sendOrderPackagedNotification"); + __name(sendOrderDeliveredNotification, "sendOrderDeliveredNotification"); + __name(sendOrderCancelledNotification, "sendOrderCancelledNotification"); + } +}); + +// src/lib/redis-client.ts +var createClient, RedisClient, redisClient, redis_client_default; +var init_redis_client = __esm({ + "src/lib/redis-client.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_env_exporter(); + createClient = /* @__PURE__ */ __name((args) => { + }, "createClient"); + RedisClient = class { + // private client: RedisClientType; + // private subscriberClient: RedisClientType | null = null; + // private isConnected: boolean = false; + // + client; + subscriberrlient; + isConnected = false; + constructor() { + this.client = createClient({ + url: redisUrl + }); + } + async set(key, value, ttlSeconds) { + if (ttlSeconds) { + return await this.client.setEx(key, ttlSeconds, value); + } else { + return await this.client.set(key, value); + } + } + async get(key) { + return await this.client.get(key); + } + async exists(key) { + const result = await this.client.exists(key); + return result === 1; + } + async delete(key) { + return await this.client.del(key); + } + async lPush(key, value) { + return await this.client.lPush(key, value); + } + async KEYS(pattern) { + return await this.client.KEYS(pattern); + } + async MGET(keys) { + return await this.client.MGET(keys); + } + // Publish message to a channel + async publish(channel2, message2) { + return await this.client.publish(channel2, message2); + } + // Subscribe to a channel with callback + async subscribe(channel2, callback) { + console.log(`Subscribed to channel: ${channel2}`); + } + // Unsubscribe from a channel + async unsubscribe(channel2) { + } + disconnect() { + } + get isClientConnected() { + return this.isConnected; + } + }; + __name(RedisClient, "RedisClient"); + redisClient = new RedisClient(); + redis_client_default = redisClient; + } +}); + +// ../../node_modules/axios/lib/helpers/bind.js +function bind(fn, thisArg) { + return /* @__PURE__ */ __name(function wrap() { + return fn.apply(thisArg, arguments); + }, "wrap"); +} +var init_bind = __esm({ + "../../node_modules/axios/lib/helpers/bind.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(bind, "bind"); + } +}); + +// ../../node_modules/axios/lib/utils.js +function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction2(val.constructor.isBuffer) && val.constructor.isBuffer(val); +} +function isArrayBufferView(val) { + let result; + if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) { + result = ArrayBuffer.isView(val); + } else { + result = val && val.buffer && isArrayBuffer2(val.buffer); + } + return result; +} +function getGlobal() { + if (typeof globalThis !== "undefined") + return globalThis; + if (typeof self !== "undefined") + return self; + if (typeof window !== "undefined") + return window; + if (typeof global !== "undefined") + return global; + return {}; +} +function forEach(obj, fn, { allOwnKeys = false } = {}) { + if (obj === null || typeof obj === "undefined") { + return; + } + let i2; + let l2; + if (typeof obj !== "object") { + obj = [obj]; + } + if (isArray(obj)) { + for (i2 = 0, l2 = obj.length; i2 < l2; i2++) { + fn.call(null, obj[i2], i2, obj); + } + } else { + if (isBuffer(obj)) { + return; + } + const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); + const len = keys.length; + let key; + for (i2 = 0; i2 < len; i2++) { + key = keys[i2]; + fn.call(null, obj[key], key, obj); + } + } +} +function findKey(obj, key) { + if (isBuffer(obj)) { + return null; + } + key = key.toLowerCase(); + const keys = Object.keys(obj); + let i2 = keys.length; + let _key2; + while (i2-- > 0) { + _key2 = keys[i2]; + if (key === _key2.toLowerCase()) { + return _key2; + } + } + return null; +} +function merge3() { + const { caseless, skipUndefined } = isContextDefined(this) && this || {}; + const result = {}; + const assignValue = /* @__PURE__ */ __name((val, key) => { + if (key === "__proto__" || key === "constructor" || key === "prototype") { + return; + } + const targetKey = caseless && findKey(result, key) || key; + if (isPlainObject3(result[targetKey]) && isPlainObject3(val)) { + result[targetKey] = merge3(result[targetKey], val); + } else if (isPlainObject3(val)) { + result[targetKey] = merge3({}, val); + } else if (isArray(val)) { + result[targetKey] = val.slice(); + } else if (!skipUndefined || !isUndefined(val)) { + result[targetKey] = val; + } + }, "assignValue"); + for (let i2 = 0, l2 = arguments.length; i2 < l2; i2++) { + arguments[i2] && forEach(arguments[i2], assignValue); + } + return result; +} +function isSpecCompliantForm(thing) { + return !!(thing && isFunction2(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]); +} +var toString, getPrototypeOf, iterator, toStringTag, kindOf, kindOfTest, typeOfTest, isArray, isUndefined, isArrayBuffer2, isString, isFunction2, isNumber, isObject4, isBoolean, isPlainObject3, isEmptyObject, isDate, isFile, isReactNativeBlob, isReactNative, isBlob, isFileList, isStream, G2, FormDataCtor, isFormData, isURLSearchParams, isReadableStream3, isRequest, isResponse, isHeaders, trim, _global, isContextDefined, extend2, stripBOM, inherits, toFlatObject, endsWith, toArray, isTypedArray, forEachEntry, matchAll, isHTMLForm, toCamelCase2, hasOwnProperty, isRegExp, reduceDescriptors, freezeMethods, toObjectSet, noop2, toFiniteNumber, toJSONObject, isAsyncFn, isThenable, _setImmediate, asap, isIterable, utils_default; +var init_utils8 = __esm({ + "../../node_modules/axios/lib/utils.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_bind(); + ({ toString } = Object.prototype); + ({ getPrototypeOf } = Object); + ({ iterator, toStringTag } = Symbol); + kindOf = ((cache3) => (thing) => { + const str = toString.call(thing); + return cache3[str] || (cache3[str] = str.slice(8, -1).toLowerCase()); + })(/* @__PURE__ */ Object.create(null)); + kindOfTest = /* @__PURE__ */ __name((type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type; + }, "kindOfTest"); + typeOfTest = /* @__PURE__ */ __name((type) => (thing) => typeof thing === type, "typeOfTest"); + ({ isArray } = Array); + isUndefined = typeOfTest("undefined"); + __name(isBuffer, "isBuffer"); + isArrayBuffer2 = kindOfTest("ArrayBuffer"); + __name(isArrayBufferView, "isArrayBufferView"); + isString = typeOfTest("string"); + isFunction2 = typeOfTest("function"); + isNumber = typeOfTest("number"); + isObject4 = /* @__PURE__ */ __name((thing) => thing !== null && typeof thing === "object", "isObject"); + isBoolean = /* @__PURE__ */ __name((thing) => thing === true || thing === false, "isBoolean"); + isPlainObject3 = /* @__PURE__ */ __name((val) => { + if (kindOf(val) !== "object") { + return false; + } + const prototype2 = getPrototypeOf(val); + return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val); + }, "isPlainObject"); + isEmptyObject = /* @__PURE__ */ __name((val) => { + if (!isObject4(val) || isBuffer(val)) { + return false; + } + try { + return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype; + } catch (e2) { + return false; + } + }, "isEmptyObject"); + isDate = kindOfTest("Date"); + isFile = kindOfTest("File"); + isReactNativeBlob = /* @__PURE__ */ __name((value) => { + return !!(value && typeof value.uri !== "undefined"); + }, "isReactNativeBlob"); + isReactNative = /* @__PURE__ */ __name((formData) => formData && typeof formData.getParts !== "undefined", "isReactNative"); + isBlob = kindOfTest("Blob"); + isFileList = kindOfTest("FileList"); + isStream = /* @__PURE__ */ __name((val) => isObject4(val) && isFunction2(val.pipe), "isStream"); + __name(getGlobal, "getGlobal"); + G2 = getGlobal(); + FormDataCtor = typeof G2.FormData !== "undefined" ? G2.FormData : void 0; + isFormData = /* @__PURE__ */ __name((thing) => { + let kind; + return thing && (FormDataCtor && thing instanceof FormDataCtor || isFunction2(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance + kind === "object" && isFunction2(thing.toString) && thing.toString() === "[object FormData]")); + }, "isFormData"); + isURLSearchParams = kindOfTest("URLSearchParams"); + [isReadableStream3, isRequest, isResponse, isHeaders] = [ + "ReadableStream", + "Request", + "Response", + "Headers" + ].map(kindOfTest); + trim = /* @__PURE__ */ __name((str) => { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); + }, "trim"); + __name(forEach, "forEach"); + __name(findKey, "findKey"); + _global = (() => { + if (typeof globalThis !== "undefined") + return globalThis; + return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global; + })(); + isContextDefined = /* @__PURE__ */ __name((context2) => !isUndefined(context2) && context2 !== _global, "isContextDefined"); + __name(merge3, "merge"); + extend2 = /* @__PURE__ */ __name((a2, b2, thisArg, { allOwnKeys } = {}) => { + forEach( + b2, + (val, key) => { + if (thisArg && isFunction2(val)) { + Object.defineProperty(a2, key, { + value: bind(val, thisArg), + writable: true, + enumerable: true, + configurable: true + }); + } else { + Object.defineProperty(a2, key, { + value: val, + writable: true, + enumerable: true, + configurable: true + }); + } + }, + { allOwnKeys } + ); + return a2; + }, "extend"); + stripBOM = /* @__PURE__ */ __name((content) => { + if (content.charCodeAt(0) === 65279) { + content = content.slice(1); + } + return content; + }, "stripBOM"); + inherits = /* @__PURE__ */ __name((constructor, superConstructor, props, descriptors) => { + constructor.prototype = Object.create(superConstructor.prototype, descriptors); + Object.defineProperty(constructor.prototype, "constructor", { + value: constructor, + writable: true, + enumerable: false, + configurable: true + }); + Object.defineProperty(constructor, "super", { + value: superConstructor.prototype + }); + props && Object.assign(constructor.prototype, props); + }, "inherits"); + toFlatObject = /* @__PURE__ */ __name((sourceObj, destObj, filter2, propFilter) => { + let props; + let i2; + let prop; + const merged = {}; + destObj = destObj || {}; + if (sourceObj == null) + return destObj; + do { + props = Object.getOwnPropertyNames(sourceObj); + i2 = props.length; + while (i2-- > 0) { + prop = props[i2]; + if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; + } + } + sourceObj = filter2 !== false && getPrototypeOf(sourceObj); + } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype); + return destObj; + }, "toFlatObject"); + endsWith = /* @__PURE__ */ __name((str, searchString, position) => { + str = String(str); + if (position === void 0 || position > str.length) { + position = str.length; + } + position -= searchString.length; + const lastIndex = str.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; + }, "endsWith"); + toArray = /* @__PURE__ */ __name((thing) => { + if (!thing) + return null; + if (isArray(thing)) + return thing; + let i2 = thing.length; + if (!isNumber(i2)) + return null; + const arr = new Array(i2); + while (i2-- > 0) { + arr[i2] = thing[i2]; + } + return arr; + }, "toArray"); + isTypedArray = ((TypedArray) => { + return (thing) => { + return TypedArray && thing instanceof TypedArray; + }; + })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array)); + forEachEntry = /* @__PURE__ */ __name((obj, fn) => { + const generator = obj && obj[iterator]; + const _iterator = generator.call(obj); + let result; + while ((result = _iterator.next()) && !result.done) { + const pair = result.value; + fn.call(obj, pair[0], pair[1]); + } + }, "forEachEntry"); + matchAll = /* @__PURE__ */ __name((regExp, str) => { + let matches; + const arr = []; + while ((matches = regExp.exec(str)) !== null) { + arr.push(matches); + } + return arr; + }, "matchAll"); + isHTMLForm = kindOfTest("HTMLFormElement"); + toCamelCase2 = /* @__PURE__ */ __name((str) => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, /* @__PURE__ */ __name(function replacer(m2, p1, p2) { + return p1.toUpperCase() + p2; + }, "replacer")); + }, "toCamelCase"); + hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype); + isRegExp = kindOfTest("RegExp"); + reduceDescriptors = /* @__PURE__ */ __name((obj, reducer) => { + const descriptors = Object.getOwnPropertyDescriptors(obj); + const reducedDescriptors = {}; + forEach(descriptors, (descriptor, name) => { + let ret; + if ((ret = reducer(descriptor, name, obj)) !== false) { + reducedDescriptors[name] = ret || descriptor; + } + }); + Object.defineProperties(obj, reducedDescriptors); + }, "reduceDescriptors"); + freezeMethods = /* @__PURE__ */ __name((obj) => { + reduceDescriptors(obj, (descriptor, name) => { + if (isFunction2(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) { + return false; + } + const value = obj[name]; + if (!isFunction2(value)) + return; + descriptor.enumerable = false; + if ("writable" in descriptor) { + descriptor.writable = false; + return; + } + if (!descriptor.set) { + descriptor.set = () => { + throw Error("Can not rewrite read-only method '" + name + "'"); + }; + } + }); + }, "freezeMethods"); + toObjectSet = /* @__PURE__ */ __name((arrayOrString, delimiter) => { + const obj = {}; + const define2 = /* @__PURE__ */ __name((arr) => { + arr.forEach((value) => { + obj[value] = true; + }); + }, "define"); + isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter)); + return obj; + }, "toObjectSet"); + noop2 = /* @__PURE__ */ __name(() => { + }, "noop"); + toFiniteNumber = /* @__PURE__ */ __name((value, defaultValue) => { + return value != null && Number.isFinite(value = +value) ? value : defaultValue; + }, "toFiniteNumber"); + __name(isSpecCompliantForm, "isSpecCompliantForm"); + toJSONObject = /* @__PURE__ */ __name((obj) => { + const stack = new Array(10); + const visit = /* @__PURE__ */ __name((source, i2) => { + if (isObject4(source)) { + if (stack.indexOf(source) >= 0) { + return; + } + if (isBuffer(source)) { + return source; + } + if (!("toJSON" in source)) { + stack[i2] = source; + const target = isArray(source) ? [] : {}; + forEach(source, (value, key) => { + const reducedValue = visit(value, i2 + 1); + !isUndefined(reducedValue) && (target[key] = reducedValue); + }); + stack[i2] = void 0; + return target; + } + } + return source; + }, "visit"); + return visit(obj, 0); + }, "toJSONObject"); + isAsyncFn = kindOfTest("AsyncFunction"); + isThenable = /* @__PURE__ */ __name((thing) => thing && (isObject4(thing) || isFunction2(thing)) && isFunction2(thing.then) && isFunction2(thing.catch), "isThenable"); + _setImmediate = ((setImmediateSupported, postMessageSupported) => { + if (setImmediateSupported) { + return setImmediate; + } + return postMessageSupported ? ((token, callbacks) => { + _global.addEventListener( + "message", + ({ source, data }) => { + if (source === _global && data === token) { + callbacks.length && callbacks.shift()(); + } + }, + false + ); + return (cb2) => { + callbacks.push(cb2); + _global.postMessage(token, "*"); + }; + })(`axios@${Math.random()}`, []) : (cb2) => setTimeout(cb2); + })(typeof setImmediate === "function", isFunction2(_global.postMessage)); + asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate; + isIterable = /* @__PURE__ */ __name((thing) => thing != null && isFunction2(thing[iterator]), "isIterable"); + utils_default = { + isArray, + isArrayBuffer: isArrayBuffer2, + isBuffer, + isFormData, + isArrayBufferView, + isString, + isNumber, + isBoolean, + isObject: isObject4, + isPlainObject: isPlainObject3, + isEmptyObject, + isReadableStream: isReadableStream3, + isRequest, + isResponse, + isHeaders, + isUndefined, + isDate, + isFile, + isReactNativeBlob, + isReactNative, + isBlob, + isRegExp, + isFunction: isFunction2, + isStream, + isURLSearchParams, + isTypedArray, + isFileList, + forEach, + merge: merge3, + extend: extend2, + trim, + stripBOM, + inherits, + toFlatObject, + kindOf, + kindOfTest, + endsWith, + toArray, + forEachEntry, + matchAll, + isHTMLForm, + hasOwnProperty, + hasOwnProp: hasOwnProperty, + // an alias to avoid ESLint no-prototype-builtins detection + reduceDescriptors, + freezeMethods, + toObjectSet, + toCamelCase: toCamelCase2, + noop: noop2, + toFiniteNumber, + findKey, + global: _global, + isContextDefined, + isSpecCompliantForm, + toJSONObject, + isAsyncFn, + isThenable, + setImmediate: _setImmediate, + asap, + isIterable + }; + } +}); + +// ../../node_modules/axios/lib/core/AxiosError.js +var AxiosError, AxiosError_default; +var init_AxiosError = __esm({ + "../../node_modules/axios/lib/core/AxiosError.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + AxiosError = class extends Error { + static from(error50, code, config3, request, response, customProps) { + const axiosError = new AxiosError(error50.message, code || error50.code, config3, request, response); + axiosError.cause = error50; + axiosError.name = error50.name; + if (error50.status != null && axiosError.status == null) { + axiosError.status = error50.status; + } + customProps && Object.assign(axiosError, customProps); + return axiosError; + } + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ + constructor(message2, code, config3, request, response) { + super(message2); + Object.defineProperty(this, "message", { + value: message2, + enumerable: true, + writable: true, + configurable: true + }); + this.name = "AxiosError"; + this.isAxiosError = true; + code && (this.code = code); + config3 && (this.config = config3); + request && (this.request = request); + if (response) { + this.response = response; + this.status = response.status; + } + } + toJSON() { + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: utils_default.toJSONObject(this.config), + code: this.code, + status: this.status + }; + } + }; + __name(AxiosError, "AxiosError"); + AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE"; + AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION"; + AxiosError.ECONNABORTED = "ECONNABORTED"; + AxiosError.ETIMEDOUT = "ETIMEDOUT"; + AxiosError.ERR_NETWORK = "ERR_NETWORK"; + AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS"; + AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED"; + AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE"; + AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST"; + AxiosError.ERR_CANCELED = "ERR_CANCELED"; + AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT"; + AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL"; + AxiosError_default = AxiosError; + } +}); + +// ../../node_modules/axios/lib/helpers/null.js +var null_default; +var init_null = __esm({ + "../../node_modules/axios/lib/helpers/null.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + null_default = null; + } +}); + +// ../../node_modules/axios/lib/helpers/toFormData.js +function isVisitable(thing) { + return utils_default.isPlainObject(thing) || utils_default.isArray(thing); +} +function removeBrackets(key) { + return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key; +} +function renderKey(path, key, dots) { + if (!path) + return key; + return path.concat(key).map(/* @__PURE__ */ __name(function each(token, i2) { + token = removeBrackets(token); + return !dots && i2 ? "[" + token + "]" : token; + }, "each")).join(dots ? "." : ""); +} +function isFlatArray(arr) { + return utils_default.isArray(arr) && !arr.some(isVisitable); +} +function toFormData(obj, formData, options) { + if (!utils_default.isObject(obj)) { + throw new TypeError("target must be an object"); + } + formData = formData || new (null_default || FormData)(); + options = utils_default.toFlatObject( + options, + { + metaTokens: true, + dots: false, + indexes: false + }, + false, + /* @__PURE__ */ __name(function defined(option, source) { + return !utils_default.isUndefined(source[option]); + }, "defined") + ); + const metaTokens = options.metaTokens; + const visitor = options.visitor || defaultVisitor; + const dots = options.dots; + const indexes = options.indexes; + const _Blob = options.Blob || typeof Blob !== "undefined" && Blob; + const useBlob = _Blob && utils_default.isSpecCompliantForm(formData); + if (!utils_default.isFunction(visitor)) { + throw new TypeError("visitor must be a function"); + } + function convertValue(value) { + if (value === null) + return ""; + if (utils_default.isDate(value)) { + return value.toISOString(); + } + if (utils_default.isBoolean(value)) { + return value.toString(); + } + if (!useBlob && utils_default.isBlob(value)) { + throw new AxiosError_default("Blob is not supported. Use a Buffer instead."); + } + if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) { + return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value); + } + return value; + } + __name(convertValue, "convertValue"); + function defaultVisitor(value, key, path) { + let arr = value; + if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) { + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + if (value && !path && typeof value === "object") { + if (utils_default.endsWith(key, "{}")) { + key = metaTokens ? key : key.slice(0, -2); + value = JSON.stringify(value); + } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) { + key = removeBrackets(key); + arr.forEach(/* @__PURE__ */ __name(function each(el, index) { + !(utils_default.isUndefined(el) || el === null) && formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", + convertValue(el) + ); + }, "each")); + return false; + } + } + if (isVisitable(value)) { + return true; + } + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + __name(defaultVisitor, "defaultVisitor"); + const stack = []; + const exposedHelpers = Object.assign(predicates, { + defaultVisitor, + convertValue, + isVisitable + }); + function build(value, path) { + if (utils_default.isUndefined(value)) + return; + if (stack.indexOf(value) !== -1) { + throw Error("Circular reference detected in " + path.join(".")); + } + stack.push(value); + utils_default.forEach(value, /* @__PURE__ */ __name(function each(el, key) { + const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers); + if (result === true) { + build(el, path ? path.concat(key) : [key]); + } + }, "each")); + stack.pop(); + } + __name(build, "build"); + if (!utils_default.isObject(obj)) { + throw new TypeError("data must be an object"); + } + build(obj); + return formData; +} +var predicates, toFormData_default; +var init_toFormData = __esm({ + "../../node_modules/axios/lib/helpers/toFormData.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_AxiosError(); + init_null(); + __name(isVisitable, "isVisitable"); + __name(removeBrackets, "removeBrackets"); + __name(renderKey, "renderKey"); + __name(isFlatArray, "isFlatArray"); + predicates = utils_default.toFlatObject(utils_default, {}, null, /* @__PURE__ */ __name(function filter(prop) { + return /^is[A-Z]/.test(prop); + }, "filter")); + __name(toFormData, "toFormData"); + toFormData_default = toFormData; + } +}); + +// ../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js +function encode5(str) { + const charMap = { + "!": "%21", + "'": "%27", + "(": "%28", + ")": "%29", + "~": "%7E", + "%20": "+", + "%00": "\0" + }; + return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, /* @__PURE__ */ __name(function replacer(match2) { + return charMap[match2]; + }, "replacer")); +} +function AxiosURLSearchParams(params, options) { + this._pairs = []; + params && toFormData_default(params, this, options); +} +var prototype, AxiosURLSearchParams_default; +var init_AxiosURLSearchParams = __esm({ + "../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_toFormData(); + __name(encode5, "encode"); + __name(AxiosURLSearchParams, "AxiosURLSearchParams"); + prototype = AxiosURLSearchParams.prototype; + prototype.append = /* @__PURE__ */ __name(function append(name, value) { + this._pairs.push([name, value]); + }, "append"); + prototype.toString = /* @__PURE__ */ __name(function toString2(encoder2) { + const _encode2 = encoder2 ? function(value) { + return encoder2.call(this, value, encode5); + } : encode5; + return this._pairs.map(/* @__PURE__ */ __name(function each(pair) { + return _encode2(pair[0]) + "=" + _encode2(pair[1]); + }, "each"), "").join("&"); + }, "toString"); + AxiosURLSearchParams_default = AxiosURLSearchParams; + } +}); + +// ../../node_modules/axios/lib/helpers/buildURL.js +function encode6(val) { + return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+"); +} +function buildURL(url2, params, options) { + if (!params) { + return url2; + } + const _encode2 = options && options.encode || encode6; + const _options = utils_default.isFunction(options) ? { + serialize: options + } : options; + const serializeFn = _options && _options.serialize; + let serializedParams; + if (serializeFn) { + serializedParams = serializeFn(params, _options); + } else { + serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, _options).toString(_encode2); + } + if (serializedParams) { + const hashmarkIndex = url2.indexOf("#"); + if (hashmarkIndex !== -1) { + url2 = url2.slice(0, hashmarkIndex); + } + url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams; + } + return url2; +} +var init_buildURL = __esm({ + "../../node_modules/axios/lib/helpers/buildURL.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_AxiosURLSearchParams(); + __name(encode6, "encode"); + __name(buildURL, "buildURL"); + } +}); + +// ../../node_modules/axios/lib/core/InterceptorManager.js +var InterceptorManager, InterceptorManager_default; +var init_InterceptorManager = __esm({ + "../../node_modules/axios/lib/core/InterceptorManager.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + InterceptorManager = class { + constructor() { + this.handlers = []; + } + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * @param {Object} options The options for the interceptor, synchronous and runWhen + * + * @return {Number} An ID used to remove interceptor later + */ + use(fulfilled, rejected, options) { + this.handlers.push({ + fulfilled, + rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null + }); + return this.handlers.length - 1; + } + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {void} + */ + eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } + } + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + clear() { + if (this.handlers) { + this.handlers = []; + } + } + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + forEach(fn) { + utils_default.forEach(this.handlers, /* @__PURE__ */ __name(function forEachHandler(h2) { + if (h2 !== null) { + fn(h2); + } + }, "forEachHandler")); + } + }; + __name(InterceptorManager, "InterceptorManager"); + InterceptorManager_default = InterceptorManager; + } +}); + +// ../../node_modules/axios/lib/defaults/transitional.js +var transitional_default; +var init_transitional = __esm({ + "../../node_modules/axios/lib/defaults/transitional.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + transitional_default = { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false, + legacyInterceptorReqResOrdering: true + }; + } +}); + +// ../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +var URLSearchParams_default; +var init_URLSearchParams = __esm({ + "../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AxiosURLSearchParams(); + URLSearchParams_default = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams_default; + } +}); + +// ../../node_modules/axios/lib/platform/browser/classes/FormData.js +var FormData_default; +var init_FormData = __esm({ + "../../node_modules/axios/lib/platform/browser/classes/FormData.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + FormData_default = typeof FormData !== "undefined" ? FormData : null; + } +}); + +// ../../node_modules/axios/lib/platform/browser/classes/Blob.js +var Blob_default; +var init_Blob = __esm({ + "../../node_modules/axios/lib/platform/browser/classes/Blob.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Blob_default = typeof Blob !== "undefined" ? Blob : null; + } +}); + +// ../../node_modules/axios/lib/platform/browser/index.js +var browser_default; +var init_browser = __esm({ + "../../node_modules/axios/lib/platform/browser/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_URLSearchParams(); + init_FormData(); + init_Blob(); + browser_default = { + isBrowser: true, + classes: { + URLSearchParams: URLSearchParams_default, + FormData: FormData_default, + Blob: Blob_default + }, + protocols: ["http", "https", "file", "blob", "url", "data"] + }; + } +}); + +// ../../node_modules/axios/lib/platform/common/utils.js +var utils_exports = {}; +__export(utils_exports, { + hasBrowserEnv: () => hasBrowserEnv, + hasStandardBrowserEnv: () => hasStandardBrowserEnv, + hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv, + navigator: () => _navigator, + origin: () => origin +}); +var hasBrowserEnv, _navigator, hasStandardBrowserEnv, hasStandardBrowserWebWorkerEnv, origin; +var init_utils9 = __esm({ + "../../node_modules/axios/lib/platform/common/utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined"; + _navigator = typeof navigator === "object" && navigator || void 0; + hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0); + hasStandardBrowserWebWorkerEnv = (() => { + return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && typeof self.importScripts === "function"; + })(); + origin = hasBrowserEnv && window.location.href || "http://localhost"; + } +}); + +// ../../node_modules/axios/lib/platform/index.js +var platform_default; +var init_platform = __esm({ + "../../node_modules/axios/lib/platform/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_browser(); + init_utils9(); + platform_default = { + ...utils_exports, + ...browser_default + }; + } +}); + +// ../../node_modules/axios/lib/helpers/toURLEncodedForm.js +function toURLEncodedForm(data, options) { + return toFormData_default(data, new platform_default.classes.URLSearchParams(), { + visitor: function(value, key, path, helpers) { + if (platform_default.isNode && utils_default.isBuffer(value)) { + this.append(key, value.toString("base64")); + return false; + } + return helpers.defaultVisitor.apply(this, arguments); + }, + ...options + }); +} +var init_toURLEncodedForm = __esm({ + "../../node_modules/axios/lib/helpers/toURLEncodedForm.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_toFormData(); + init_platform(); + __name(toURLEncodedForm, "toURLEncodedForm"); + } +}); + +// ../../node_modules/axios/lib/helpers/formDataToJSON.js +function parsePropPath(name) { + return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match2) => { + return match2[0] === "[]" ? "" : match2[1] || match2[0]; + }); +} +function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i2; + const len = keys.length; + let key; + for (i2 = 0; i2 < len; i2++) { + key = keys[i2]; + obj[key] = arr[key]; + } + return obj; +} +function formDataToJSON(formData) { + function buildPath(path, value, target, index) { + let name = path[index++]; + if (name === "__proto__") + return true; + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path.length; + name = !name && utils_default.isArray(target) ? target.length : name; + if (isLast) { + if (utils_default.hasOwnProp(target, name)) { + target[name] = [target[name], value]; + } else { + target[name] = value; + } + return !isNumericKey; + } + if (!target[name] || !utils_default.isObject(target[name])) { + target[name] = []; + } + const result = buildPath(path, value, target[name], index); + if (result && utils_default.isArray(target[name])) { + target[name] = arrayToObject(target[name]); + } + return !isNumericKey; + } + __name(buildPath, "buildPath"); + if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) { + const obj = {}; + utils_default.forEachEntry(formData, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); + return obj; + } + return null; +} +var formDataToJSON_default; +var init_formDataToJSON = __esm({ + "../../node_modules/axios/lib/helpers/formDataToJSON.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + __name(parsePropPath, "parsePropPath"); + __name(arrayToObject, "arrayToObject"); + __name(formDataToJSON, "formDataToJSON"); + formDataToJSON_default = formDataToJSON; + } +}); + +// ../../node_modules/axios/lib/defaults/index.js +function stringifySafely(rawValue, parser2, encoder2) { + if (utils_default.isString(rawValue)) { + try { + (parser2 || JSON.parse)(rawValue); + return utils_default.trim(rawValue); + } catch (e2) { + if (e2.name !== "SyntaxError") { + throw e2; + } + } + } + return (encoder2 || JSON.stringify)(rawValue); +} +var defaults, defaults_default; +var init_defaults = __esm({ + "../../node_modules/axios/lib/defaults/index.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_AxiosError(); + init_transitional(); + init_toFormData(); + init_toURLEncodedForm(); + init_platform(); + init_formDataToJSON(); + __name(stringifySafely, "stringifySafely"); + defaults = { + transitional: transitional_default, + adapter: ["xhr", "http", "fetch"], + transformRequest: [ + /* @__PURE__ */ __name(function transformRequest(data, headers) { + const contentType = headers.getContentType() || ""; + const hasJSONContentType = contentType.indexOf("application/json") > -1; + const isObjectPayload = utils_default.isObject(data); + if (isObjectPayload && utils_default.isHTMLForm(data)) { + data = new FormData(data); + } + const isFormData2 = utils_default.isFormData(data); + if (isFormData2) { + return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data; + } + if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) { + return data; + } + if (utils_default.isArrayBufferView(data)) { + return data.buffer; + } + if (utils_default.isURLSearchParams(data)) { + headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false); + return data.toString(); + } + let isFileList2; + if (isObjectPayload) { + if (contentType.indexOf("application/x-www-form-urlencoded") > -1) { + return toURLEncodedForm(data, this.formSerializer).toString(); + } + if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) { + const _FormData = this.env && this.env.FormData; + return toFormData_default( + isFileList2 ? { "files[]": data } : data, + _FormData && new _FormData(), + this.formSerializer + ); + } + } + if (isObjectPayload || hasJSONContentType) { + headers.setContentType("application/json", false); + return stringifySafely(data); + } + return data; + }, "transformRequest") + ], + transformResponse: [ + /* @__PURE__ */ __name(function transformResponse(data) { + const transitional2 = this.transitional || defaults.transitional; + const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing; + const JSONRequested = this.responseType === "json"; + if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) { + return data; + } + if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) { + const silentJSONParsing = transitional2 && transitional2.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; + try { + return JSON.parse(data, this.parseReviver); + } catch (e2) { + if (strictJSONParsing) { + if (e2.name === "SyntaxError") { + throw AxiosError_default.from(e2, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response); + } + throw e2; + } + } + } + return data; + }, "transformResponse") + ], + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + xsrfCookieName: "XSRF-TOKEN", + xsrfHeaderName: "X-XSRF-TOKEN", + maxContentLength: -1, + maxBodyLength: -1, + env: { + FormData: platform_default.classes.FormData, + Blob: platform_default.classes.Blob + }, + validateStatus: /* @__PURE__ */ __name(function validateStatus(status) { + return status >= 200 && status < 300; + }, "validateStatus"), + headers: { + common: { + Accept: "application/json, text/plain, */*", + "Content-Type": void 0 + } + } + }; + utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => { + defaults.headers[method] = {}; + }); + defaults_default = defaults; + } +}); + +// ../../node_modules/axios/lib/helpers/parseHeaders.js +var ignoreDuplicateOf, parseHeaders_default; +var init_parseHeaders = __esm({ + "../../node_modules/axios/lib/helpers/parseHeaders.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + ignoreDuplicateOf = utils_default.toObjectSet([ + "age", + "authorization", + "content-length", + "content-type", + "etag", + "expires", + "from", + "host", + "if-modified-since", + "if-unmodified-since", + "last-modified", + "location", + "max-forwards", + "proxy-authorization", + "referer", + "retry-after", + "user-agent" + ]); + parseHeaders_default = /* @__PURE__ */ __name((rawHeaders) => { + const parsed = {}; + let key; + let val; + let i2; + rawHeaders && rawHeaders.split("\n").forEach(/* @__PURE__ */ __name(function parser2(line) { + i2 = line.indexOf(":"); + key = line.substring(0, i2).trim().toLowerCase(); + val = line.substring(i2 + 1).trim(); + if (!key || parsed[key] && ignoreDuplicateOf[key]) { + return; + } + if (key === "set-cookie") { + if (parsed[key]) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = parsed[key] ? parsed[key] + ", " + val : val; + } + }, "parser")); + return parsed; + }, "default"); + } +}); + +// ../../node_modules/axios/lib/core/AxiosHeaders.js +function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); +} +function normalizeValue(value) { + if (value === false || value == null) { + return value; + } + return utils_default.isArray(value) ? value.map(normalizeValue) : String(value); +} +function parseTokens(str) { + const tokens = /* @__PURE__ */ Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match2; + while (match2 = tokensRE.exec(str)) { + tokens[match2[1]] = match2[2]; + } + return tokens; +} +function matchHeaderValue(context2, value, header, filter2, isHeaderNameFilter) { + if (utils_default.isFunction(filter2)) { + return filter2.call(this, value, header); + } + if (isHeaderNameFilter) { + value = header; + } + if (!utils_default.isString(value)) + return; + if (utils_default.isString(filter2)) { + return value.indexOf(filter2) !== -1; + } + if (utils_default.isRegExp(filter2)) { + return filter2.test(value); + } +} +function formatHeader(header) { + return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w2, char, str) => { + return char.toUpperCase() + str; + }); +} +function buildAccessors(obj, header) { + const accessorName = utils_default.toCamelCase(" " + header); + ["get", "set", "has"].forEach((methodName) => { + Object.defineProperty(obj, methodName + accessorName, { + value: function(arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true + }); + }); +} +var $internals, isValidHeaderName, AxiosHeaders, AxiosHeaders_default; +var init_AxiosHeaders = __esm({ + "../../node_modules/axios/lib/core/AxiosHeaders.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_parseHeaders(); + $internals = Symbol("internals"); + __name(normalizeHeader, "normalizeHeader"); + __name(normalizeValue, "normalizeValue"); + __name(parseTokens, "parseTokens"); + isValidHeaderName = /* @__PURE__ */ __name((str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()), "isValidHeaderName"); + __name(matchHeaderValue, "matchHeaderValue"); + __name(formatHeader, "formatHeader"); + __name(buildAccessors, "buildAccessors"); + AxiosHeaders = class { + constructor(headers) { + headers && this.set(headers); + } + set(header, valueOrRewrite, rewrite) { + const self2 = this; + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); + if (!lHeader) { + throw new Error("header name must be a non-empty string"); + } + const key = utils_default.findKey(self2, lHeader); + if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) { + self2[key || _header] = normalizeValue(_value); + } + } + __name(setHeader, "setHeader"); + const setHeaders = /* @__PURE__ */ __name((headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)), "setHeaders"); + if (utils_default.isPlainObject(header) || header instanceof this.constructor) { + setHeaders(header, valueOrRewrite); + } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + setHeaders(parseHeaders_default(header), valueOrRewrite); + } else if (utils_default.isObject(header) && utils_default.isIterable(header)) { + let obj = {}, dest, key; + for (const entry of header) { + if (!utils_default.isArray(entry)) { + throw TypeError("Object iterator must return a key-value pair"); + } + obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1]; + } + setHeaders(obj, valueOrRewrite); + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); + } + return this; + } + get(header, parser2) { + header = normalizeHeader(header); + if (header) { + const key = utils_default.findKey(this, header); + if (key) { + const value = this[key]; + if (!parser2) { + return value; + } + if (parser2 === true) { + return parseTokens(value); + } + if (utils_default.isFunction(parser2)) { + return parser2.call(this, value, key); + } + if (utils_default.isRegExp(parser2)) { + return parser2.exec(value); + } + throw new TypeError("parser must be boolean|regexp|function"); + } + } + } + has(header, matcher) { + header = normalizeHeader(header); + if (header) { + const key = utils_default.findKey(this, header); + return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher))); + } + return false; + } + delete(header, matcher) { + const self2 = this; + let deleted = false; + function deleteHeader(_header) { + _header = normalizeHeader(_header); + if (_header) { + const key = utils_default.findKey(self2, _header); + if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) { + delete self2[key]; + deleted = true; + } + } + } + __name(deleteHeader, "deleteHeader"); + if (utils_default.isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); + } + return deleted; + } + clear(matcher) { + const keys = Object.keys(this); + let i2 = keys.length; + let deleted = false; + while (i2--) { + const key = keys[i2]; + if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; + } + } + return deleted; + } + normalize(format2) { + const self2 = this; + const headers = {}; + utils_default.forEach(this, (value, header) => { + const key = utils_default.findKey(headers, header); + if (key) { + self2[key] = normalizeValue(value); + delete self2[header]; + return; + } + const normalized = format2 ? formatHeader(header) : String(header).trim(); + if (normalized !== header) { + delete self2[header]; + } + self2[normalized] = normalizeValue(value); + headers[normalized] = true; + }); + return this; + } + concat(...targets) { + return this.constructor.concat(this, ...targets); + } + toJSON(asStrings) { + const obj = /* @__PURE__ */ Object.create(null); + utils_default.forEach(this, (value, header) => { + value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value); + }); + return obj; + } + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + toString() { + return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n"); + } + getSetCookie() { + return this.get("set-cookie") || []; + } + get [Symbol.toStringTag]() { + return "AxiosHeaders"; + } + static from(thing) { + return thing instanceof this ? thing : new this(thing); + } + static concat(first, ...targets) { + const computed = new this(first); + targets.forEach((target) => computed.set(target)); + return computed; + } + static accessor(header) { + const internals = this[$internals] = this[$internals] = { + accessors: {} + }; + const accessors = internals.accessors; + const prototype2 = this.prototype; + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); + if (!accessors[lHeader]) { + buildAccessors(prototype2, _header); + accessors[lHeader] = true; + } + } + __name(defineAccessor, "defineAccessor"); + utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + return this; + } + }; + __name(AxiosHeaders, "AxiosHeaders"); + AxiosHeaders.accessor([ + "Content-Type", + "Content-Length", + "Accept", + "Accept-Encoding", + "User-Agent", + "Authorization" + ]); + utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); + return { + get: () => value, + set(headerValue) { + this[mapped] = headerValue; + } + }; + }); + utils_default.freezeMethods(AxiosHeaders); + AxiosHeaders_default = AxiosHeaders; + } +}); + +// ../../node_modules/axios/lib/core/transformData.js +function transformData(fns, response) { + const config3 = this || defaults_default; + const context2 = response || config3; + const headers = AxiosHeaders_default.from(context2.headers); + let data = context2.data; + utils_default.forEach(fns, /* @__PURE__ */ __name(function transform2(fn) { + data = fn.call(config3, data, headers.normalize(), response ? response.status : void 0); + }, "transform")); + headers.normalize(); + return data; +} +var init_transformData = __esm({ + "../../node_modules/axios/lib/core/transformData.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_defaults(); + init_AxiosHeaders(); + __name(transformData, "transformData"); + } +}); + +// ../../node_modules/axios/lib/cancel/isCancel.js +function isCancel(value) { + return !!(value && value.__CANCEL__); +} +var init_isCancel = __esm({ + "../../node_modules/axios/lib/cancel/isCancel.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(isCancel, "isCancel"); + } +}); + +// ../../node_modules/axios/lib/cancel/CanceledError.js +var CanceledError, CanceledError_default; +var init_CanceledError = __esm({ + "../../node_modules/axios/lib/cancel/CanceledError.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AxiosError(); + CanceledError = class extends AxiosError_default { + /** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ + constructor(message2, config3, request) { + super(message2 == null ? "canceled" : message2, AxiosError_default.ERR_CANCELED, config3, request); + this.name = "CanceledError"; + this.__CANCEL__ = true; + } + }; + __name(CanceledError, "CanceledError"); + CanceledError_default = CanceledError; + } +}); + +// ../../node_modules/axios/lib/core/settle.js +function settle(resolve, reject, response) { + const validateStatus2 = response.config.validateStatus; + if (!response.status || !validateStatus2 || validateStatus2(response.status)) { + resolve(response); + } else { + reject( + new AxiosError_default( + "Request failed with status code " + response.status, + [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], + response.config, + response.request, + response + ) + ); + } +} +var init_settle = __esm({ + "../../node_modules/axios/lib/core/settle.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AxiosError(); + __name(settle, "settle"); + } +}); + +// ../../node_modules/axios/lib/helpers/parseProtocol.js +function parseProtocol(url2) { + const match2 = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2); + return match2 && match2[1] || ""; +} +var init_parseProtocol = __esm({ + "../../node_modules/axios/lib/helpers/parseProtocol.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(parseProtocol, "parseProtocol"); + } +}); + +// ../../node_modules/axios/lib/helpers/speedometer.js +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; + min = min !== void 0 ? min : 1e3; + return /* @__PURE__ */ __name(function push(chunkLength) { + const now = Date.now(); + const startedAt = timestamps[tail]; + if (!firstSampleTS) { + firstSampleTS = now; + } + bytes[head] = chunkLength; + timestamps[head] = now; + let i2 = tail; + let bytesCount = 0; + while (i2 !== head) { + bytesCount += bytes[i2++]; + i2 = i2 % samplesCount; + } + head = (head + 1) % samplesCount; + if (head === tail) { + tail = (tail + 1) % samplesCount; + } + if (now - firstSampleTS < min) { + return; + } + const passed = startedAt && now - startedAt; + return passed ? Math.round(bytesCount * 1e3 / passed) : void 0; + }, "push"); +} +var speedometer_default; +var init_speedometer = __esm({ + "../../node_modules/axios/lib/helpers/speedometer.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(speedometer, "speedometer"); + speedometer_default = speedometer; + } +}); + +// ../../node_modules/axios/lib/helpers/throttle.js +function throttle(fn, freq) { + let timestamp = 0; + let threshold = 1e3 / freq; + let lastArgs; + let timer; + const invoke = /* @__PURE__ */ __name((args, now = Date.now()) => { + timestamp = now; + lastArgs = null; + if (timer) { + clearTimeout(timer); + timer = null; + } + fn(...args); + }, "invoke"); + const throttled = /* @__PURE__ */ __name((...args) => { + const now = Date.now(); + const passed = now - timestamp; + if (passed >= threshold) { + invoke(args, now); + } else { + lastArgs = args; + if (!timer) { + timer = setTimeout(() => { + timer = null; + invoke(lastArgs); + }, threshold - passed); + } + } + }, "throttled"); + const flush2 = /* @__PURE__ */ __name(() => lastArgs && invoke(lastArgs), "flush"); + return [throttled, flush2]; +} +var throttle_default; +var init_throttle = __esm({ + "../../node_modules/axios/lib/helpers/throttle.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(throttle, "throttle"); + throttle_default = throttle; + } +}); + +// ../../node_modules/axios/lib/helpers/progressEventReducer.js +var progressEventReducer, progressEventDecorator, asyncDecorator; +var init_progressEventReducer = __esm({ + "../../node_modules/axios/lib/helpers/progressEventReducer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_speedometer(); + init_throttle(); + init_utils8(); + progressEventReducer = /* @__PURE__ */ __name((listener, isDownloadStream, freq = 3) => { + let bytesNotified = 0; + const _speedometer = speedometer_default(50, 250); + return throttle_default((e2) => { + const loaded = e2.loaded; + const total = e2.lengthComputable ? e2.total : void 0; + const progressBytes = loaded - bytesNotified; + const rate = _speedometer(progressBytes); + const inRange = loaded <= total; + bytesNotified = loaded; + const data = { + loaded, + total, + progress: total ? loaded / total : void 0, + bytes: progressBytes, + rate: rate ? rate : void 0, + estimated: rate && total && inRange ? (total - loaded) / rate : void 0, + event: e2, + lengthComputable: total != null, + [isDownloadStream ? "download" : "upload"]: true + }; + listener(data); + }, freq); + }, "progressEventReducer"); + progressEventDecorator = /* @__PURE__ */ __name((total, throttled) => { + const lengthComputable = total != null; + return [ + (loaded) => throttled[0]({ + lengthComputable, + total, + loaded + }), + throttled[1] + ]; + }, "progressEventDecorator"); + asyncDecorator = /* @__PURE__ */ __name((fn) => (...args) => utils_default.asap(() => fn(...args)), "asyncDecorator"); + } +}); + +// ../../node_modules/axios/lib/helpers/isURLSameOrigin.js +var isURLSameOrigin_default; +var init_isURLSameOrigin = __esm({ + "../../node_modules/axios/lib/helpers/isURLSameOrigin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_platform(); + isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((origin2, isMSIE) => (url2) => { + url2 = new URL(url2, platform_default.origin); + return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port); + })( + new URL(platform_default.origin), + platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent) + ) : () => true; + } +}); + +// ../../node_modules/axios/lib/helpers/cookies.js +var cookies_default; +var init_cookies = __esm({ + "../../node_modules/axios/lib/helpers/cookies.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_platform(); + cookies_default = platform_default.hasStandardBrowserEnv ? ( + // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain3, secure, sameSite) { + if (typeof document === "undefined") + return; + const cookie = [`${name}=${encodeURIComponent(value)}`]; + if (utils_default.isNumber(expires)) { + cookie.push(`expires=${new Date(expires).toUTCString()}`); + } + if (utils_default.isString(path)) { + cookie.push(`path=${path}`); + } + if (utils_default.isString(domain3)) { + cookie.push(`domain=${domain3}`); + } + if (secure === true) { + cookie.push("secure"); + } + if (utils_default.isString(sameSite)) { + cookie.push(`SameSite=${sameSite}`); + } + document.cookie = cookie.join("; "); + }, + read(name) { + if (typeof document === "undefined") + return null; + const match2 = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)")); + return match2 ? decodeURIComponent(match2[1]) : null; + }, + remove(name) { + this.write(name, "", Date.now() - 864e5, "/"); + } + } + ) : ( + // Non-standard browser env (web workers, react-native) lack needed support. + { + write() { + }, + read() { + return null; + }, + remove() { + } + } + ); + } +}); + +// ../../node_modules/axios/lib/helpers/isAbsoluteURL.js +function isAbsoluteURL(url2) { + if (typeof url2 !== "string") { + return false; + } + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2); +} +var init_isAbsoluteURL = __esm({ + "../../node_modules/axios/lib/helpers/isAbsoluteURL.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(isAbsoluteURL, "isAbsoluteURL"); + } +}); + +// ../../node_modules/axios/lib/helpers/combineURLs.js +function combineURLs(baseURL, relativeURL) { + return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL; +} +var init_combineURLs = __esm({ + "../../node_modules/axios/lib/helpers/combineURLs.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(combineURLs, "combineURLs"); + } +}); + +// ../../node_modules/axios/lib/core/buildFullPath.js +function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { + let isRelativeUrl = !isAbsoluteURL(requestedURL); + if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { + return combineURLs(baseURL, requestedURL); + } + return requestedURL; +} +var init_buildFullPath = __esm({ + "../../node_modules/axios/lib/core/buildFullPath.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_isAbsoluteURL(); + init_combineURLs(); + __name(buildFullPath, "buildFullPath"); + } +}); + +// ../../node_modules/axios/lib/core/mergeConfig.js +function mergeConfig(config1, config22) { + config22 = config22 || {}; + const config3 = {}; + function getMergedValue(target, source, prop, caseless) { + if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) { + return utils_default.merge.call({ caseless }, target, source); + } else if (utils_default.isPlainObject(source)) { + return utils_default.merge({}, source); + } else if (utils_default.isArray(source)) { + return source.slice(); + } + return source; + } + __name(getMergedValue, "getMergedValue"); + function mergeDeepProperties(a2, b2, prop, caseless) { + if (!utils_default.isUndefined(b2)) { + return getMergedValue(a2, b2, prop, caseless); + } else if (!utils_default.isUndefined(a2)) { + return getMergedValue(void 0, a2, prop, caseless); + } + } + __name(mergeDeepProperties, "mergeDeepProperties"); + function valueFromConfig2(a2, b2) { + if (!utils_default.isUndefined(b2)) { + return getMergedValue(void 0, b2); + } + } + __name(valueFromConfig2, "valueFromConfig2"); + function defaultToConfig2(a2, b2) { + if (!utils_default.isUndefined(b2)) { + return getMergedValue(void 0, b2); + } else if (!utils_default.isUndefined(a2)) { + return getMergedValue(void 0, a2); + } + } + __name(defaultToConfig2, "defaultToConfig2"); + function mergeDirectKeys(a2, b2, prop) { + if (prop in config22) { + return getMergedValue(a2, b2); + } else if (prop in config1) { + return getMergedValue(void 0, a2); + } + } + __name(mergeDirectKeys, "mergeDirectKeys"); + const mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + withXSRFToken: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: (a2, b2, prop) => mergeDeepProperties(headersToObject(a2), headersToObject(b2), prop, true) + }; + utils_default.forEach(Object.keys({ ...config1, ...config22 }), /* @__PURE__ */ __name(function computeConfigValue(prop) { + if (prop === "__proto__" || prop === "constructor" || prop === "prototype") + return; + const merge4 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; + const configValue = merge4(config1[prop], config22[prop], prop); + utils_default.isUndefined(configValue) && merge4 !== mergeDirectKeys || (config3[prop] = configValue); + }, "computeConfigValue")); + return config3; +} +var headersToObject; +var init_mergeConfig = __esm({ + "../../node_modules/axios/lib/core/mergeConfig.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_AxiosHeaders(); + headersToObject = /* @__PURE__ */ __name((thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing, "headersToObject"); + __name(mergeConfig, "mergeConfig"); + } +}); + +// ../../node_modules/axios/lib/helpers/resolveConfig.js +var resolveConfig_default; +var init_resolveConfig = __esm({ + "../../node_modules/axios/lib/helpers/resolveConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_platform(); + init_utils8(); + init_isURLSameOrigin(); + init_cookies(); + init_buildFullPath(); + init_mergeConfig(); + init_AxiosHeaders(); + init_buildURL(); + resolveConfig_default = /* @__PURE__ */ __name((config3) => { + const newConfig = mergeConfig({}, config3); + let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig; + newConfig.headers = headers = AxiosHeaders_default.from(headers); + newConfig.url = buildURL( + buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), + config3.params, + config3.paramsSerializer + ); + if (auth) { + headers.set( + "Authorization", + "Basic " + btoa( + (auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "") + ) + ); + } + if (utils_default.isFormData(data)) { + if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) { + headers.setContentType(void 0); + } else if (utils_default.isFunction(data.getHeaders)) { + const formHeaders = data.getHeaders(); + const allowedHeaders = ["content-type", "content-length"]; + Object.entries(formHeaders).forEach(([key, val]) => { + if (allowedHeaders.includes(key.toLowerCase())) { + headers.set(key, val); + } + }); + } + } + if (platform_default.hasStandardBrowserEnv) { + withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); + if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) { + const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName); + if (xsrfValue) { + headers.set(xsrfHeaderName, xsrfValue); + } + } + } + return newConfig; + }, "default"); + } +}); + +// ../../node_modules/axios/lib/adapters/xhr.js +var isXHRAdapterSupported, xhr_default; +var init_xhr = __esm({ + "../../node_modules/axios/lib/adapters/xhr.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_settle(); + init_transitional(); + init_AxiosError(); + init_CanceledError(); + init_parseProtocol(); + init_platform(); + init_AxiosHeaders(); + init_progressEventReducer(); + init_resolveConfig(); + isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined"; + xhr_default = isXHRAdapterSupported && function(config3) { + return new Promise(/* @__PURE__ */ __name(function dispatchXhrRequest(resolve, reject) { + const _config = resolveConfig_default(config3); + let requestData = _config.data; + const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize(); + let { responseType, onUploadProgress, onDownloadProgress } = _config; + let onCanceled; + let uploadThrottled, downloadThrottled; + let flushUpload, flushDownload; + function done() { + flushUpload && flushUpload(); + flushDownload && flushDownload(); + _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); + _config.signal && _config.signal.removeEventListener("abort", onCanceled); + } + __name(done, "done"); + let request = new XMLHttpRequest(); + request.open(_config.method.toUpperCase(), _config.url, true); + request.timeout = _config.timeout; + function onloadend() { + if (!request) { + return; + } + const responseHeaders = AxiosHeaders_default.from( + "getAllResponseHeaders" in request && request.getAllResponseHeaders() + ); + const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response; + const response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config: config3, + request + }; + settle( + /* @__PURE__ */ __name(function _resolve(value) { + resolve(value); + done(); + }, "_resolve"), + /* @__PURE__ */ __name(function _reject(err) { + reject(err); + done(); + }, "_reject"), + response + ); + request = null; + } + __name(onloadend, "onloadend"); + if ("onloadend" in request) { + request.onloadend = onloadend; + } else { + request.onreadystatechange = /* @__PURE__ */ __name(function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) { + return; + } + setTimeout(onloadend); + }, "handleLoad"); + } + request.onabort = /* @__PURE__ */ __name(function handleAbort() { + if (!request) { + return; + } + reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config3, request)); + request = null; + }, "handleAbort"); + request.onerror = /* @__PURE__ */ __name(function handleError(event) { + const msg = event && event.message ? event.message : "Network Error"; + const err = new AxiosError_default(msg, AxiosError_default.ERR_NETWORK, config3, request); + err.event = event || null; + reject(err); + request = null; + }, "handleError"); + request.ontimeout = /* @__PURE__ */ __name(function handleTimeout() { + let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded"; + const transitional2 = _config.transitional || transitional_default; + if (_config.timeoutErrorMessage) { + timeoutErrorMessage = _config.timeoutErrorMessage; + } + reject( + new AxiosError_default( + timeoutErrorMessage, + transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, + config3, + request + ) + ); + request = null; + }, "handleTimeout"); + requestData === void 0 && requestHeaders.setContentType(null); + if ("setRequestHeader" in request) { + utils_default.forEach(requestHeaders.toJSON(), /* @__PURE__ */ __name(function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + }, "setRequestHeader")); + } + if (!utils_default.isUndefined(_config.withCredentials)) { + request.withCredentials = !!_config.withCredentials; + } + if (responseType && responseType !== "json") { + request.responseType = _config.responseType; + } + if (onDownloadProgress) { + [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true); + request.addEventListener("progress", downloadThrottled); + } + if (onUploadProgress && request.upload) { + [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress); + request.upload.addEventListener("progress", uploadThrottled); + request.upload.addEventListener("loadend", flushUpload); + } + if (_config.cancelToken || _config.signal) { + onCanceled = /* @__PURE__ */ __name((cancel) => { + if (!request) { + return; + } + reject(!cancel || cancel.type ? new CanceledError_default(null, config3, request) : cancel); + request.abort(); + request = null; + }, "onCanceled"); + _config.cancelToken && _config.cancelToken.subscribe(onCanceled); + if (_config.signal) { + _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled); + } + } + const protocol = parseProtocol(_config.url); + if (protocol && platform_default.protocols.indexOf(protocol) === -1) { + reject( + new AxiosError_default( + "Unsupported protocol " + protocol + ":", + AxiosError_default.ERR_BAD_REQUEST, + config3 + ) + ); + return; + } + request.send(requestData || null); + }, "dispatchXhrRequest")); + }; + } +}); + +// ../../node_modules/axios/lib/helpers/composeSignals.js +var composeSignals, composeSignals_default; +var init_composeSignals = __esm({ + "../../node_modules/axios/lib/helpers/composeSignals.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_CanceledError(); + init_AxiosError(); + init_utils8(); + composeSignals = /* @__PURE__ */ __name((signals, timeout) => { + const { length } = signals = signals ? signals.filter(Boolean) : []; + if (timeout || length) { + let controller = new AbortController(); + let aborted2; + const onabort = /* @__PURE__ */ __name(function(reason) { + if (!aborted2) { + aborted2 = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort( + err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err) + ); + } + }, "onabort"); + let timer = timeout && setTimeout(() => { + timer = null; + onabort(new AxiosError_default(`timeout of ${timeout}ms exceeded`, AxiosError_default.ETIMEDOUT)); + }, timeout); + const unsubscribe = /* @__PURE__ */ __name(() => { + if (signals) { + timer && clearTimeout(timer); + timer = null; + signals.forEach((signal2) => { + signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort); + }); + signals = null; + } + }, "unsubscribe"); + signals.forEach((signal2) => signal2.addEventListener("abort", onabort)); + const { signal } = controller; + signal.unsubscribe = () => utils_default.asap(unsubscribe); + return signal; + } + }, "composeSignals"); + composeSignals_default = composeSignals; + } +}); + +// ../../node_modules/axios/lib/helpers/trackStream.js +var streamChunk, readBytes, readStream, trackStream; +var init_trackStream = __esm({ + "../../node_modules/axios/lib/helpers/trackStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + streamChunk = /* @__PURE__ */ __name(function* (chunk, chunkSize) { + let len = chunk.byteLength; + if (!chunkSize || len < chunkSize) { + yield chunk; + return; + } + let pos = 0; + let end; + while (pos < len) { + end = pos + chunkSize; + yield chunk.slice(pos, end); + pos = end; + } + }, "streamChunk"); + readBytes = /* @__PURE__ */ __name(async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) { + yield* streamChunk(chunk, chunkSize); + } + }, "readBytes"); + readStream = /* @__PURE__ */ __name(async function* (stream) { + if (stream[Symbol.asyncIterator]) { + yield* stream; + return; + } + const reader = stream.getReader(); + try { + for (; ; ) { + const { done, value } = await reader.read(); + if (done) { + break; + } + yield value; + } + } finally { + await reader.cancel(); + } + }, "readStream"); + trackStream = /* @__PURE__ */ __name((stream, chunkSize, onProgress, onFinish) => { + const iterator2 = readBytes(stream, chunkSize); + let bytes = 0; + let done; + let _onFinish = /* @__PURE__ */ __name((e2) => { + if (!done) { + done = true; + onFinish && onFinish(e2); + } + }, "_onFinish"); + return new ReadableStream( + { + async pull(controller) { + try { + const { done: done2, value } = await iterator2.next(); + if (done2) { + _onFinish(); + controller.close(); + return; + } + let len = value.byteLength; + if (onProgress) { + let loadedBytes = bytes += len; + onProgress(loadedBytes); + } + controller.enqueue(new Uint8Array(value)); + } catch (err) { + _onFinish(err); + throw err; + } + }, + cancel(reason) { + _onFinish(reason); + return iterator2.return(); + } + }, + { + highWaterMark: 2 + } + ); + }, "trackStream"); + } +}); + +// ../../node_modules/axios/lib/adapters/fetch.js +var DEFAULT_CHUNK_SIZE, isFunction3, globalFetchAPI, ReadableStream2, TextEncoder2, test, factory, seedCache, getFetch, adapter; +var init_fetch2 = __esm({ + "../../node_modules/axios/lib/adapters/fetch.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_platform(); + init_utils8(); + init_AxiosError(); + init_composeSignals(); + init_trackStream(); + init_AxiosHeaders(); + init_progressEventReducer(); + init_resolveConfig(); + init_settle(); + DEFAULT_CHUNK_SIZE = 64 * 1024; + ({ isFunction: isFunction3 } = utils_default); + globalFetchAPI = (({ Request: Request3, Response: Response3 }) => ({ + Request: Request3, + Response: Response3 + }))(utils_default.global); + ({ ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = utils_default.global); + test = /* @__PURE__ */ __name((fn, ...args) => { + try { + return !!fn(...args); + } catch (e2) { + return false; + } + }, "test"); + factory = /* @__PURE__ */ __name((env2) => { + env2 = utils_default.merge.call( + { + skipUndefined: true + }, + globalFetchAPI, + env2 + ); + const { fetch: envFetch, Request: Request3, Response: Response3 } = env2; + const isFetchSupported = envFetch ? isFunction3(envFetch) : typeof fetch === "function"; + const isRequestSupported = isFunction3(Request3); + const isResponseSupported = isFunction3(Response3); + if (!isFetchSupported) { + return false; + } + const isReadableStreamSupported = isFetchSupported && isFunction3(ReadableStream2); + const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? ((encoder2) => (str) => encoder2.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request3(str).arrayBuffer())); + const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => { + let duplexAccessed = false; + const hasContentType = new Request3(platform_default.origin, { + body: new ReadableStream2(), + method: "POST", + get duplex() { + duplexAccessed = true; + return "half"; + } + }).headers.has("Content-Type"); + return duplexAccessed && !hasContentType; + }); + const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response3("").body)); + const resolvers = { + stream: supportsResponseStream && ((res) => res.body) + }; + isFetchSupported && (() => { + ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => { + !resolvers[type] && (resolvers[type] = (res, config3) => { + let method = res && res[type]; + if (method) { + return method.call(res); + } + throw new AxiosError_default( + `Response type '${type}' is not supported`, + AxiosError_default.ERR_NOT_SUPPORT, + config3 + ); + }); + }); + })(); + const getBodyLength = /* @__PURE__ */ __name(async (body) => { + if (body == null) { + return 0; + } + if (utils_default.isBlob(body)) { + return body.size; + } + if (utils_default.isSpecCompliantForm(body)) { + const _request = new Request3(platform_default.origin, { + method: "POST", + body + }); + return (await _request.arrayBuffer()).byteLength; + } + if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) { + return body.byteLength; + } + if (utils_default.isURLSearchParams(body)) { + body = body + ""; + } + if (utils_default.isString(body)) { + return (await encodeText(body)).byteLength; + } + }, "getBodyLength"); + const resolveBodyLength = /* @__PURE__ */ __name(async (headers, body) => { + const length = utils_default.toFiniteNumber(headers.getContentLength()); + return length == null ? getBodyLength(body) : length; + }, "resolveBodyLength"); + return async (config3) => { + let { + url: url2, + method, + data, + signal, + cancelToken, + timeout, + onDownloadProgress, + onUploadProgress, + responseType, + headers, + withCredentials = "same-origin", + fetchOptions + } = resolveConfig_default(config3); + let _fetch = envFetch || fetch; + responseType = responseType ? (responseType + "").toLowerCase() : "text"; + let composedSignal = composeSignals_default( + [signal, cancelToken && cancelToken.toAbortSignal()], + timeout + ); + let request = null; + const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { + composedSignal.unsubscribe(); + }); + let requestContentLength; + try { + if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) { + let _request = new Request3(url2, { + method: "POST", + body: data, + duplex: "half" + }); + let contentTypeHeader; + if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) { + headers.setContentType(contentTypeHeader); + } + if (_request.body) { + const [onProgress, flush2] = progressEventDecorator( + requestContentLength, + progressEventReducer(asyncDecorator(onUploadProgress)) + ); + data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush2); + } + } + if (!utils_default.isString(withCredentials)) { + withCredentials = withCredentials ? "include" : "omit"; + } + const isCredentialsSupported = isRequestSupported && "credentials" in Request3.prototype; + const resolvedOptions = { + ...fetchOptions, + signal: composedSignal, + method: method.toUpperCase(), + headers: headers.normalize().toJSON(), + body: data, + duplex: "half", + credentials: isCredentialsSupported ? withCredentials : void 0 + }; + request = isRequestSupported && new Request3(url2, resolvedOptions); + let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions)); + const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response"); + if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) { + const options = {}; + ["status", "statusText", "headers"].forEach((prop) => { + options[prop] = response[prop]; + }); + const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length")); + const [onProgress, flush2] = onDownloadProgress && progressEventDecorator( + responseContentLength, + progressEventReducer(asyncDecorator(onDownloadProgress), true) + ) || []; + response = new Response3( + trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { + flush2 && flush2(); + unsubscribe && unsubscribe(); + }), + options + ); + } + responseType = responseType || "text"; + let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"]( + response, + config3 + ); + !isStreamResponse && unsubscribe && unsubscribe(); + return await new Promise((resolve, reject) => { + settle(resolve, reject, { + data: responseData, + headers: AxiosHeaders_default.from(response.headers), + status: response.status, + statusText: response.statusText, + config: config3, + request + }); + }); + } catch (err) { + unsubscribe && unsubscribe(); + if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) { + throw Object.assign( + new AxiosError_default( + "Network Error", + AxiosError_default.ERR_NETWORK, + config3, + request, + err && err.response + ), + { + cause: err.cause || err + } + ); + } + throw AxiosError_default.from(err, err && err.code, config3, request, err && err.response); + } + }; + }, "factory"); + seedCache = /* @__PURE__ */ new Map(); + getFetch = /* @__PURE__ */ __name((config3) => { + let env2 = config3 && config3.env || {}; + const { fetch: fetch3, Request: Request3, Response: Response3 } = env2; + const seeds = [Request3, Response3, fetch3]; + let len = seeds.length, i2 = len, seed, target, map2 = seedCache; + while (i2--) { + seed = seeds[i2]; + target = map2.get(seed); + target === void 0 && map2.set(seed, target = i2 ? /* @__PURE__ */ new Map() : factory(env2)); + map2 = target; + } + return target; + }, "getFetch"); + adapter = getFetch(); + } +}); + +// ../../node_modules/axios/lib/adapters/adapters.js +function getAdapter(adapters, config3) { + adapters = utils_default.isArray(adapters) ? adapters : [adapters]; + const { length } = adapters; + let nameOrAdapter; + let adapter2; + const rejectedReasons = {}; + for (let i2 = 0; i2 < length; i2++) { + nameOrAdapter = adapters[i2]; + let id; + adapter2 = nameOrAdapter; + if (!isResolvedHandle(nameOrAdapter)) { + adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + if (adapter2 === void 0) { + throw new AxiosError_default(`Unknown adapter '${id}'`); + } + } + if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config3)))) { + break; + } + rejectedReasons[id || "#" + i2] = adapter2; + } + if (!adapter2) { + const reasons = Object.entries(rejectedReasons).map( + ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build") + ); + let s2 = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"; + throw new AxiosError_default( + `There is no suitable adapter to dispatch the request ` + s2, + "ERR_NOT_SUPPORT" + ); + } + return adapter2; +} +var knownAdapters, renderReason, isResolvedHandle, adapters_default; +var init_adapters = __esm({ + "../../node_modules/axios/lib/adapters/adapters.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_null(); + init_xhr(); + init_fetch2(); + init_AxiosError(); + knownAdapters = { + http: null_default, + xhr: xhr_default, + fetch: { + get: getFetch + } + }; + utils_default.forEach(knownAdapters, (fn, value) => { + if (fn) { + try { + Object.defineProperty(fn, "name", { value }); + } catch (e2) { + } + Object.defineProperty(fn, "adapterName", { value }); + } + }); + renderReason = /* @__PURE__ */ __name((reason) => `- ${reason}`, "renderReason"); + isResolvedHandle = /* @__PURE__ */ __name((adapter2) => utils_default.isFunction(adapter2) || adapter2 === null || adapter2 === false, "isResolvedHandle"); + __name(getAdapter, "getAdapter"); + adapters_default = { + /** + * Resolve an adapter from a list of adapter names or functions. + * @type {Function} + */ + getAdapter, + /** + * Exposes all known adapters + * @type {Object} + */ + adapters: knownAdapters + }; + } +}); + +// ../../node_modules/axios/lib/core/dispatchRequest.js +function throwIfCancellationRequested(config3) { + if (config3.cancelToken) { + config3.cancelToken.throwIfRequested(); + } + if (config3.signal && config3.signal.aborted) { + throw new CanceledError_default(null, config3); + } +} +function dispatchRequest(config3) { + throwIfCancellationRequested(config3); + config3.headers = AxiosHeaders_default.from(config3.headers); + config3.data = transformData.call(config3, config3.transformRequest); + if (["post", "put", "patch"].indexOf(config3.method) !== -1) { + config3.headers.setContentType("application/x-www-form-urlencoded", false); + } + const adapter2 = adapters_default.getAdapter(config3.adapter || defaults_default.adapter, config3); + return adapter2(config3).then( + /* @__PURE__ */ __name(function onAdapterResolution(response) { + throwIfCancellationRequested(config3); + response.data = transformData.call(config3, config3.transformResponse, response); + response.headers = AxiosHeaders_default.from(response.headers); + return response; + }, "onAdapterResolution"), + /* @__PURE__ */ __name(function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config3); + if (reason && reason.response) { + reason.response.data = transformData.call( + config3, + config3.transformResponse, + reason.response + ); + reason.response.headers = AxiosHeaders_default.from(reason.response.headers); + } + } + return Promise.reject(reason); + }, "onAdapterRejection") + ); +} +var init_dispatchRequest = __esm({ + "../../node_modules/axios/lib/core/dispatchRequest.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_transformData(); + init_isCancel(); + init_defaults(); + init_CanceledError(); + init_AxiosHeaders(); + init_adapters(); + __name(throwIfCancellationRequested, "throwIfCancellationRequested"); + __name(dispatchRequest, "dispatchRequest"); + } +}); + +// ../../node_modules/axios/lib/env/data.js +var VERSION; +var init_data = __esm({ + "../../node_modules/axios/lib/env/data.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + VERSION = "1.13.6"; + } +}); + +// ../../node_modules/axios/lib/helpers/validator.js +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== "object") { + throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE); + } + const keys = Object.keys(options); + let i2 = keys.length; + while (i2-- > 0) { + const opt = keys[i2]; + const validator = schema[opt]; + if (validator) { + const value = options[opt]; + const result = value === void 0 || validator(value, opt, options); + if (result !== true) { + throw new AxiosError_default( + "option " + opt + " must be " + result, + AxiosError_default.ERR_BAD_OPTION_VALUE + ); + } + continue; + } + if (allowUnknown !== true) { + throw new AxiosError_default("Unknown option " + opt, AxiosError_default.ERR_BAD_OPTION); + } + } +} +var validators, deprecatedWarnings, validator_default; +var init_validator = __esm({ + "../../node_modules/axios/lib/helpers/validator.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_data(); + init_AxiosError(); + validators = {}; + ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i2) => { + validators[type] = /* @__PURE__ */ __name(function validator(thing) { + return typeof thing === type || "a" + (i2 < 1 ? "n " : " ") + type; + }, "validator"); + }); + deprecatedWarnings = {}; + validators.transitional = /* @__PURE__ */ __name(function transitional(validator, version4, message2) { + function formatMessage(opt, desc2) { + return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc2 + (message2 ? ". " + message2 : ""); + } + __name(formatMessage, "formatMessage"); + return (value, opt, opts) => { + if (validator === false) { + throw new AxiosError_default( + formatMessage(opt, " has been removed" + (version4 ? " in " + version4 : "")), + AxiosError_default.ERR_DEPRECATED + ); + } + if (version4 && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + console.warn( + formatMessage( + opt, + " has been deprecated since v" + version4 + " and will be removed in the near future" + ) + ); + } + return validator ? validator(value, opt, opts) : true; + }; + }, "transitional"); + validators.spelling = /* @__PURE__ */ __name(function spelling(correctSpelling) { + return (value, opt) => { + console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); + return true; + }; + }, "spelling"); + __name(assertOptions, "assertOptions"); + validator_default = { + assertOptions, + validators + }; + } +}); + +// ../../node_modules/axios/lib/core/Axios.js +var validators2, Axios, Axios_default; +var init_Axios = __esm({ + "../../node_modules/axios/lib/core/Axios.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_buildURL(); + init_InterceptorManager(); + init_dispatchRequest(); + init_mergeConfig(); + init_buildFullPath(); + init_validator(); + init_AxiosHeaders(); + init_transitional(); + validators2 = validator_default.validators; + Axios = class { + constructor(instanceConfig) { + this.defaults = instanceConfig || {}; + this.interceptors = { + request: new InterceptorManager_default(), + response: new InterceptorManager_default() + }; + } + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ + async request(configOrUrl, config3) { + try { + return await this._request(configOrUrl, config3); + } catch (err) { + if (err instanceof Error) { + let dummy = {}; + Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error(); + const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : ""; + try { + if (!err.stack) { + err.stack = stack; + } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) { + err.stack += "\n" + stack; + } + } catch (e2) { + } + } + throw err; + } + } + _request(configOrUrl, config3) { + if (typeof configOrUrl === "string") { + config3 = config3 || {}; + config3.url = configOrUrl; + } else { + config3 = configOrUrl || {}; + } + config3 = mergeConfig(this.defaults, config3); + const { transitional: transitional2, paramsSerializer, headers } = config3; + if (transitional2 !== void 0) { + validator_default.assertOptions( + transitional2, + { + silentJSONParsing: validators2.transitional(validators2.boolean), + forcedJSONParsing: validators2.transitional(validators2.boolean), + clarifyTimeoutError: validators2.transitional(validators2.boolean), + legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean) + }, + false + ); + } + if (paramsSerializer != null) { + if (utils_default.isFunction(paramsSerializer)) { + config3.paramsSerializer = { + serialize: paramsSerializer + }; + } else { + validator_default.assertOptions( + paramsSerializer, + { + encode: validators2.function, + serialize: validators2.function + }, + true + ); + } + } + if (config3.allowAbsoluteUrls !== void 0) { + } else if (this.defaults.allowAbsoluteUrls !== void 0) { + config3.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; + } else { + config3.allowAbsoluteUrls = true; + } + validator_default.assertOptions( + config3, + { + baseUrl: validators2.spelling("baseURL"), + withXsrfToken: validators2.spelling("withXSRFToken") + }, + true + ); + config3.method = (config3.method || this.defaults.method || "get").toLowerCase(); + let contextHeaders = headers && utils_default.merge(headers.common, headers[config3.method]); + headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => { + delete headers[method]; + }); + config3.headers = AxiosHeaders_default.concat(contextHeaders, headers); + const requestInterceptorChain = []; + let synchronousRequestInterceptors = true; + this.interceptors.request.forEach(/* @__PURE__ */ __name(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config3) === false) { + return; + } + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + const transitional3 = config3.transitional || transitional_default; + const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering; + if (legacyInterceptorReqResOrdering) { + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + } else { + requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + } + }, "unshiftRequestInterceptors")); + const responseInterceptorChain = []; + this.interceptors.response.forEach(/* @__PURE__ */ __name(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }, "pushResponseInterceptors")); + let promise2; + let i2 = 0; + let len; + if (!synchronousRequestInterceptors) { + const chain = [dispatchRequest.bind(this), void 0]; + chain.unshift(...requestInterceptorChain); + chain.push(...responseInterceptorChain); + len = chain.length; + promise2 = Promise.resolve(config3); + while (i2 < len) { + promise2 = promise2.then(chain[i2++], chain[i2++]); + } + return promise2; + } + len = requestInterceptorChain.length; + let newConfig = config3; + while (i2 < len) { + const onFulfilled = requestInterceptorChain[i2++]; + const onRejected = requestInterceptorChain[i2++]; + try { + newConfig = onFulfilled(newConfig); + } catch (error50) { + onRejected.call(this, error50); + break; + } + } + try { + promise2 = dispatchRequest.call(this, newConfig); + } catch (error50) { + return Promise.reject(error50); + } + i2 = 0; + len = responseInterceptorChain.length; + while (i2 < len) { + promise2 = promise2.then(responseInterceptorChain[i2++], responseInterceptorChain[i2++]); + } + return promise2; + } + getUri(config3) { + config3 = mergeConfig(this.defaults, config3); + const fullPath = buildFullPath(config3.baseURL, config3.url, config3.allowAbsoluteUrls); + return buildURL(fullPath, config3.params, config3.paramsSerializer); + } + }; + __name(Axios, "Axios"); + utils_default.forEach(["delete", "get", "head", "options"], /* @__PURE__ */ __name(function forEachMethodNoData(method) { + Axios.prototype[method] = function(url2, config3) { + return this.request( + mergeConfig(config3 || {}, { + method, + url: url2, + data: (config3 || {}).data + }) + ); + }; + }, "forEachMethodNoData")); + utils_default.forEach(["post", "put", "patch"], /* @__PURE__ */ __name(function forEachMethodWithData(method) { + function generateHTTPMethod(isForm) { + return /* @__PURE__ */ __name(function httpMethod(url2, data, config3) { + return this.request( + mergeConfig(config3 || {}, { + method, + headers: isForm ? { + "Content-Type": "multipart/form-data" + } : {}, + url: url2, + data + }) + ); + }, "httpMethod"); + } + __name(generateHTTPMethod, "generateHTTPMethod"); + Axios.prototype[method] = generateHTTPMethod(); + Axios.prototype[method + "Form"] = generateHTTPMethod(true); + }, "forEachMethodWithData")); + Axios_default = Axios; + } +}); + +// ../../node_modules/axios/lib/cancel/CancelToken.js +var CancelToken, CancelToken_default; +var init_CancelToken = __esm({ + "../../node_modules/axios/lib/cancel/CancelToken.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_CanceledError(); + CancelToken = class { + constructor(executor) { + if (typeof executor !== "function") { + throw new TypeError("executor must be a function."); + } + let resolvePromise; + this.promise = new Promise(/* @__PURE__ */ __name(function promiseExecutor(resolve) { + resolvePromise = resolve; + }, "promiseExecutor")); + const token = this; + this.promise.then((cancel) => { + if (!token._listeners) + return; + let i2 = token._listeners.length; + while (i2-- > 0) { + token._listeners[i2](cancel); + } + token._listeners = null; + }); + this.promise.then = (onfulfilled) => { + let _resolve; + const promise2 = new Promise((resolve) => { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + promise2.cancel = /* @__PURE__ */ __name(function reject() { + token.unsubscribe(_resolve); + }, "reject"); + return promise2; + }; + executor(/* @__PURE__ */ __name(function cancel(message2, config3, request) { + if (token.reason) { + return; + } + token.reason = new CanceledError_default(message2, config3, request); + resolvePromise(token.reason); + }, "cancel")); + } + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + throwIfRequested() { + if (this.reason) { + throw this.reason; + } + } + /** + * Subscribe to the cancel signal + */ + subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; + } + } + /** + * Unsubscribe from the cancel signal + */ + unsubscribe(listener) { + if (!this._listeners) { + return; + } + const index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } + } + toAbortSignal() { + const controller = new AbortController(); + const abort2 = /* @__PURE__ */ __name((err) => { + controller.abort(err); + }, "abort"); + this.subscribe(abort2); + controller.signal.unsubscribe = () => this.unsubscribe(abort2); + return controller.signal; + } + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + static source() { + let cancel; + const token = new CancelToken(/* @__PURE__ */ __name(function executor(c2) { + cancel = c2; + }, "executor")); + return { + token, + cancel + }; + } + }; + __name(CancelToken, "CancelToken"); + CancelToken_default = CancelToken; + } +}); + +// ../../node_modules/axios/lib/helpers/spread.js +function spread(callback) { + return /* @__PURE__ */ __name(function wrap(arr) { + return callback.apply(null, arr); + }, "wrap"); +} +var init_spread = __esm({ + "../../node_modules/axios/lib/helpers/spread.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(spread, "spread"); + } +}); + +// ../../node_modules/axios/lib/helpers/isAxiosError.js +function isAxiosError(payload) { + return utils_default.isObject(payload) && payload.isAxiosError === true; +} +var init_isAxiosError = __esm({ + "../../node_modules/axios/lib/helpers/isAxiosError.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + __name(isAxiosError, "isAxiosError"); + } +}); + +// ../../node_modules/axios/lib/helpers/HttpStatusCode.js +var HttpStatusCode, HttpStatusCode_default; +var init_HttpStatusCode = __esm({ + "../../node_modules/axios/lib/helpers/HttpStatusCode.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + HttpStatusCode = { + Continue: 100, + SwitchingProtocols: 101, + Processing: 102, + EarlyHints: 103, + Ok: 200, + Created: 201, + Accepted: 202, + NonAuthoritativeInformation: 203, + NoContent: 204, + ResetContent: 205, + PartialContent: 206, + MultiStatus: 207, + AlreadyReported: 208, + ImUsed: 226, + MultipleChoices: 300, + MovedPermanently: 301, + Found: 302, + SeeOther: 303, + NotModified: 304, + UseProxy: 305, + Unused: 306, + TemporaryRedirect: 307, + PermanentRedirect: 308, + BadRequest: 400, + Unauthorized: 401, + PaymentRequired: 402, + Forbidden: 403, + NotFound: 404, + MethodNotAllowed: 405, + NotAcceptable: 406, + ProxyAuthenticationRequired: 407, + RequestTimeout: 408, + Conflict: 409, + Gone: 410, + LengthRequired: 411, + PreconditionFailed: 412, + PayloadTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + UnprocessableEntity: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, + WebServerIsDown: 521, + ConnectionTimedOut: 522, + OriginIsUnreachable: 523, + TimeoutOccurred: 524, + SslHandshakeFailed: 525, + InvalidSslCertificate: 526 + }; + Object.entries(HttpStatusCode).forEach(([key, value]) => { + HttpStatusCode[value] = key; + }); + HttpStatusCode_default = HttpStatusCode; + } +}); + +// ../../node_modules/axios/lib/axios.js +function createInstance(defaultConfig) { + const context2 = new Axios_default(defaultConfig); + const instance = bind(Axios_default.prototype.request, context2); + utils_default.extend(instance, Axios_default.prototype, context2, { allOwnKeys: true }); + utils_default.extend(instance, context2, null, { allOwnKeys: true }); + instance.create = /* @__PURE__ */ __name(function create(instanceConfig) { + return createInstance(mergeConfig(defaultConfig, instanceConfig)); + }, "create"); + return instance; +} +var axios, axios_default; +var init_axios = __esm({ + "../../node_modules/axios/lib/axios.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_bind(); + init_Axios(); + init_mergeConfig(); + init_defaults(); + init_formDataToJSON(); + init_CanceledError(); + init_CancelToken(); + init_isCancel(); + init_data(); + init_toFormData(); + init_AxiosError(); + init_spread(); + init_isAxiosError(); + init_AxiosHeaders(); + init_adapters(); + init_HttpStatusCode(); + __name(createInstance, "createInstance"); + axios = createInstance(defaults_default); + axios.Axios = Axios_default; + axios.CanceledError = CanceledError_default; + axios.CancelToken = CancelToken_default; + axios.isCancel = isCancel; + axios.VERSION = VERSION; + axios.toFormData = toFormData_default; + axios.AxiosError = AxiosError_default; + axios.Cancel = axios.CanceledError; + axios.all = /* @__PURE__ */ __name(function all(promises) { + return Promise.all(promises); + }, "all"); + axios.spread = spread; + axios.isAxiosError = isAxiosError; + axios.mergeConfig = mergeConfig; + axios.AxiosHeaders = AxiosHeaders_default; + axios.formToJSON = (thing) => formDataToJSON_default(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing); + axios.getAdapter = adapters_default.getAdapter; + axios.HttpStatusCode = HttpStatusCode_default; + axios.default = axios; + axios_default = axios; + } +}); + +// ../../node_modules/axios/index.js +var Axios2, AxiosError2, CanceledError2, isCancel2, CancelToken2, VERSION2, all2, Cancel, isAxiosError2, spread2, toFormData2, AxiosHeaders2, HttpStatusCode2, formToJSON, getAdapter2, mergeConfig2; +var init_axios2 = __esm({ + "../../node_modules/axios/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_axios(); + ({ + Axios: Axios2, + AxiosError: AxiosError2, + CanceledError: CanceledError2, + isCancel: isCancel2, + CancelToken: CancelToken2, + VERSION: VERSION2, + all: all2, + Cancel, + isAxiosError: isAxiosError2, + spread: spread2, + toFormData: toFormData2, + AxiosHeaders: AxiosHeaders2, + HttpStatusCode: HttpStatusCode2, + formToJSON, + getAdapter: getAdapter2, + mergeConfig: mergeConfig2 + } = axios_default); + } +}); + +// src/lib/telegram-service.ts +var BOT_TOKEN, TELEGRAM_API_URL; +var init_telegram_service = __esm({ + "src/lib/telegram-service.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_env_exporter(); + BOT_TOKEN = telegramBotToken; + TELEGRAM_API_URL = `https://api.telegram.org/bot${BOT_TOKEN}`; + } +}); + +// src/lib/post-order-handler.ts +var ORDER_CHANNEL, CANCELLED_CHANNEL, publishOrder, publishFormattedOrder, publishCancellation; +var init_post_order_handler = __esm({ + "src/lib/post-order-handler.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_redis_client(); + init_telegram_service(); + ORDER_CHANNEL = "orders:placed"; + CANCELLED_CHANNEL = "orders:cancelled"; + publishOrder = /* @__PURE__ */ __name(async (orderDetails) => { + try { + const message2 = JSON.stringify(orderDetails); + await redis_client_default.publish(ORDER_CHANNEL, message2); + return true; + } catch (error50) { + console.error("Failed to publish order:", error50); + return false; + } + }, "publishOrder"); + publishFormattedOrder = /* @__PURE__ */ __name(async (createdOrders, ordersBySlot) => { + try { + const orderIds = createdOrders.map((order) => order.id); + return await publishOrder({ orderIds }); + } catch (error50) { + console.error("Failed to format and publish order:", error50); + return false; + } + }, "publishFormattedOrder"); + publishCancellation = /* @__PURE__ */ __name(async (orderId, cancelledBy, reason) => { + try { + const message2 = { + orderId, + cancelledBy, + reason, + cancelledAt: (/* @__PURE__ */ new Date()).toISOString() + }; + await redis_client_default.publish(CANCELLED_CHANNEL, JSON.stringify(message2)); + console.log("Cancellation published to Redis:", orderId); + return true; + } catch (error50) { + console.error("Failed to publish cancellation:", error50); + return false; + } + }, "publishCancellation"); + } +}); + +// src/stores/user-negativity-store.ts +async function getMultipleUserNegativityScores(userIds) { + try { + if (userIds.length === 0) + return {}; + const result = {}; + for (const userId of userIds) { + result[userId] = await getUserNegativityScore(userId); + } + return result; + } catch (error50) { + console.error("Error getting multiple user negativity scores:", error50); + return {}; + } +} +async function recomputeUserNegativityScore(userId) { + try { + const totalScore = await getUserNegativityScore(userId); + } catch (error50) { + console.error(`Error recomputing negativity score for user ${userId}:`, error50); + throw error50; + } +} +var init_user_negativity_store = __esm({ + "src/stores/user-negativity-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + __name(getMultipleUserNegativityScores, "getMultipleUserNegativityScores"); + __name(recomputeUserNegativityScore, "recomputeUserNegativityScore"); + } +}); + +// src/trpc/apis/admin-apis/apis/order.ts +var updateOrderNotesSchema, getOrderDetailsSchema, updatePackagedSchema, updateDeliveredSchema, updateOrderItemPackagingSchema, getSlotOrdersSchema, getAllOrdersSchema, orderRouter; +var init_order3 = __esm({ + "src/trpc/apis/admin-apis/apis/order.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_notif_job(); + init_post_order_handler(); + init_user_negativity_store(); + init_dbService(); + updateOrderNotesSchema = external_exports.object({ + orderId: external_exports.number(), + adminNotes: external_exports.string() + }); + getOrderDetailsSchema = external_exports.object({ + orderId: external_exports.number() + }); + updatePackagedSchema = external_exports.object({ + orderId: external_exports.string(), + isPackaged: external_exports.boolean() + }); + updateDeliveredSchema = external_exports.object({ + orderId: external_exports.string(), + isDelivered: external_exports.boolean() + }); + updateOrderItemPackagingSchema = external_exports.object({ + orderItemId: external_exports.number(), + isPackaged: external_exports.boolean().optional(), + isPackageVerified: external_exports.boolean().optional() + }); + getSlotOrdersSchema = external_exports.object({ + slotId: external_exports.string() + }); + getAllOrdersSchema = external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(20), + slotId: external_exports.number().optional().nullable(), + packagedFilter: external_exports.enum(["all", "packaged", "not_packaged"]).optional().default("all"), + deliveredFilter: external_exports.enum(["all", "delivered", "not_delivered"]).optional().default("all"), + cancellationFilter: external_exports.enum(["all", "cancelled", "not_cancelled"]).optional().default("all"), + flashDeliveryFilter: external_exports.enum(["all", "flash", "regular"]).optional().default("all") + }); + orderRouter = router2({ + updateNotes: protectedProcedure.input(updateOrderNotesSchema).mutation(async ({ input }) => { + const { orderId, adminNotes } = input; + const result = await updateOrderNotes(orderId, adminNotes || null); + if (!result) { + throw new Error("Order not found"); + } + return result; + }), + getOrderDetails: protectedProcedure.input(getOrderDetailsSchema).query(async ({ input }) => { + const { orderId } = input; + const orderDetails = await getOrderDetails(orderId); + if (!orderDetails) { + throw new Error("Order not found"); + } + return orderDetails; + }), + updatePackaged: protectedProcedure.input(updatePackagedSchema).mutation(async ({ input }) => { + const { orderId, isPackaged } = input; + const result = await updateOrderPackaged(orderId, isPackaged); + if (result.userId) + await sendOrderPackagedNotification(result.userId, orderId); + return { success: true, userId: result.userId }; + }), + updateDelivered: protectedProcedure.input(updateDeliveredSchema).mutation(async ({ input }) => { + const { orderId, isDelivered } = input; + const result = await updateOrderDelivered(orderId, isDelivered); + if (result.userId) + await sendOrderDeliveredNotification(result.userId, orderId); + return { success: true, userId: result.userId }; + }), + updateOrderItemPackaging: protectedProcedure.input(updateOrderItemPackagingSchema).mutation(async ({ input }) => { + const { orderItemId, isPackaged, isPackageVerified } = input; + const result = await updateOrderItemPackaging(orderItemId, isPackaged, isPackageVerified); + if (!result.updated) { + throw new ApiError("Order item not found", 404); + } + return result; + }), + removeDeliveryCharge: protectedProcedure.input(external_exports.object({ orderId: external_exports.number() })).mutation(async ({ input }) => { + const { orderId } = input; + const result = await removeDeliveryCharge(orderId); + if (!result) { + throw new Error("Order not found"); + } + return result; + }), + getSlotOrders: protectedProcedure.input(getSlotOrdersSchema).query(async ({ input }) => { + const { slotId } = input; + const result = await getSlotOrders(slotId); + return result; + }), + updateAddressCoords: protectedProcedure.input( + external_exports.object({ + addressId: external_exports.number(), + latitude: external_exports.number(), + longitude: external_exports.number() + }) + ).mutation(async ({ input }) => { + const { addressId, latitude, longitude } = input; + const result = await updateAddressCoords(addressId, latitude, longitude); + if (!result.success) { + throw new ApiError("Address not found", 404); + } + return result; + }), + getAll: protectedProcedure.input(getAllOrdersSchema).query(async ({ input }) => { + try { + const result = await getAllOrders(input); + const userIds = [...new Set(result.orders.map((order) => order.userId))]; + const negativityScores = await getMultipleUserNegativityScores(userIds); + const orders3 = result.orders.map((order) => { + const { userId, userNegativityScore, ...rest } = order; + return { + ...rest, + userNegativityScore: negativityScores[userId] || 0 + }; + }); + return { + orders: orders3, + nextCursor: result.nextCursor + }; + } catch (e2) { + console.log({ e: e2 }); + } + }), + rebalanceSlots: protectedProcedure.input(external_exports.object({ slotIds: external_exports.array(external_exports.number()).min(1).max(50) })).mutation(async ({ input }) => { + const slotIds = input.slotIds; + const result = await rebalanceSlots(slotIds); + return result; + }), + cancelOrder: protectedProcedure.input(external_exports.object({ + orderId: external_exports.number(), + reason: external_exports.string().min(1, "Cancellation reason is required") + })).mutation(async ({ input }) => { + const { orderId, reason } = input; + const result = await cancelOrder(orderId, reason); + if (!result.success) { + if (result.error === "order_not_found") { + throw new ApiError(result.message, 404); + } + if (result.error === "status_not_found") { + throw new ApiError(result.message, 400); + } + if (result.error === "already_cancelled") { + throw new ApiError(result.message, 400); + } + if (result.error === "already_delivered") { + throw new ApiError(result.message, 400); + } + throw new ApiError(result.message, 400); + } + if (result.orderId) { + await publishCancellation(result.orderId, "admin", reason); + } + return { success: true, message: result.message }; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/vendor-snippets.ts +var import_dayjs2, createSnippetSchema, updateSnippetSchema, vendorSnippetsRouter; +var init_vendor_snippets2 = __esm({ + "src/trpc/apis/admin-apis/apis/vendor-snippets.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + import_dayjs2 = __toESM(require_dayjs_min()); + init_env_exporter(); + init_dbService(); + createSnippetSchema = external_exports.object({ + snippetCode: external_exports.string().min(1, "Snippet code is required"), + slotId: external_exports.number().optional(), + productIds: external_exports.array(external_exports.number().int().positive()).min(1, "At least one product is required"), + validTill: external_exports.string().optional(), + isPermanent: external_exports.boolean().default(false) + }); + updateSnippetSchema = external_exports.object({ + id: external_exports.number().int().positive(), + updates: createSnippetSchema.partial().extend({ + snippetCode: external_exports.string().min(1).optional(), + productIds: external_exports.array(external_exports.number().int().positive()).optional(), + isPermanent: external_exports.boolean().default(false) + }) + }); + vendorSnippetsRouter = router2({ + create: protectedProcedure.input(createSnippetSchema).mutation(async ({ input, ctx }) => { + const { snippetCode, slotId, productIds, validTill, isPermanent } = input; + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + if (slotId) { + const slot = await getVendorSlotById(slotId); + if (!slot) { + throw new Error("Invalid slot ID"); + } + } + const products = await getProductsByIds(productIds); + if (products.length !== productIds.length) { + throw new Error("One or more invalid product IDs"); + } + const existingSnippet = await checkVendorSnippetExists(snippetCode); + if (existingSnippet) { + throw new Error("Snippet code already exists"); + } + const result = await createVendorSnippet({ + snippetCode, + slotId, + productIds, + isPermanent, + validTill: validTill ? new Date(validTill) : void 0 + }); + return result; + }), + getAll: protectedProcedure.query(async () => { + console.log("from the vendor snipptes methods"); + try { + const result = await getAllVendorSnippets(); + const snippetsWithProducts = await Promise.all( + result.map(async (snippet) => { + const products = await getProductsByIds(snippet.productIds); + return { + ...snippet, + accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`, + products + }; + }) + ); + return snippetsWithProducts; + } catch (e2) { + console.log(e2); + } + return []; + }), + getById: protectedProcedure.input(external_exports.object({ id: external_exports.number().int().positive() })).query(async ({ input }) => { + const { id } = input; + const result = await getVendorSnippetById(id); + if (!result) { + throw new Error("Vendor snippet not found"); + } + return result; + }), + update: protectedProcedure.input(updateSnippetSchema).mutation(async ({ input }) => { + const { id, updates } = input; + const existingSnippet = await getVendorSnippetById(id); + if (!existingSnippet) { + throw new Error("Vendor snippet not found"); + } + if (updates.slotId) { + const slot = await getVendorSlotById(updates.slotId); + if (!slot) { + throw new Error("Invalid slot ID"); + } + } + if (updates.productIds) { + const products = await getProductsByIds(updates.productIds); + if (products.length !== updates.productIds.length) { + throw new Error("One or more invalid product IDs"); + } + } + if (updates.snippetCode && updates.snippetCode !== existingSnippet.snippetCode) { + const duplicateSnippet = await checkVendorSnippetExists(updates.snippetCode); + if (duplicateSnippet) { + throw new Error("Snippet code already exists"); + } + } + const updateData = { + ...updates, + validTill: updates.validTill !== void 0 ? updates.validTill ? new Date(updates.validTill) : null : void 0 + }; + const result = await updateVendorSnippet(id, updateData); + if (!result) { + throw new Error("Failed to update vendor snippet"); + } + return result; + }), + delete: protectedProcedure.input(external_exports.object({ id: external_exports.number().int().positive() })).mutation(async ({ input }) => { + const { id } = input; + const result = await deleteVendorSnippet(id); + if (!result) { + throw new Error("Vendor snippet not found"); + } + return { message: "Vendor snippet deleted successfully" }; + }), + getOrdersBySnippet: publicProcedure.input(external_exports.object({ + snippetCode: external_exports.string().min(1, "Snippet code is required") + })).query(async ({ input }) => { + const { snippetCode } = input; + const snippet = await getVendorSnippetByCode(snippetCode); + if (!snippet) { + throw new Error("Vendor snippet not found"); + } + if (snippet.validTill && new Date(snippet.validTill) < /* @__PURE__ */ new Date()) { + throw new Error("Vendor snippet has expired"); + } + if (!snippet.slotId) { + throw new Error("Vendor snippet not associated with a slot"); + } + const matchingOrders = await getVendorOrdersBySlotId(snippet.slotId); + const filteredOrders = matchingOrders.filter((order) => { + const status = order.orderStatus; + if (status[0].isCancelled) + return false; + const orderProductIds = order.orderItems.map((item) => item.productId); + return snippet.productIds.some((productId) => orderProductIds.includes(productId)); + }); + const formattedOrders = filteredOrders.map((order) => { + const attachedOrderItems = order.orderItems.filter( + (item) => snippet.productIds.includes(item.productId) + ); + const products = attachedOrderItems.map((item) => ({ + orderItemId: item.id, + productId: item.productId, + productName: item.product.name, + quantity: parseFloat(item.quantity), + productSize: item.product.productQuantity, + price: parseFloat((item.price ?? 0).toString()), + unit: item.product.unit?.shortNotation || "unit", + subtotal: parseFloat((item.price ?? 0).toString()) * parseFloat(item.quantity), + is_packaged: item.is_packaged, + is_package_verified: item.is_package_verified + })); + const orderTotal = products.reduce((sum2, p2) => sum2 + p2.subtotal, 0); + return { + orderId: `ORD${order.id}`, + orderDate: order.createdAt.toISOString(), + customerName: order.user.name || "", + totalAmount: orderTotal, + slotInfo: order.slot ? { + time: order.slot.deliveryTime.toISOString(), + sequence: order.slot.deliverySequence + } : null, + products, + matchedProducts: snippet.productIds, + // All snippet products are considered matched + snippetCode: snippet.snippetCode + }; + }); + return { + success: true, + data: formattedOrders, + snippet: { + id: snippet.id, + snippetCode: snippet.snippetCode, + slotId: snippet.slotId, + productIds: snippet.productIds, + validTill: snippet.validTill?.toISOString(), + createdAt: snippet.createdAt.toISOString(), + isPermanent: snippet.isPermanent + } + }; + }), + getVendorOrders: protectedProcedure.query(async () => { + const vendorOrders = await getVendorOrders(); + return vendorOrders.map((order) => ({ + id: order.id, + status: "pending", + orderDate: order.createdAt.toISOString(), + totalQuantity: order.orderItems.reduce((sum2, item) => sum2 + parseFloat(item.quantity || "0"), 0), + products: order.orderItems.map((item) => ({ + name: item.product.name, + quantity: parseFloat(item.quantity || "0"), + unit: item.product.unit?.shortNotation || "unit" + })) + })); + }), + getUpcomingSlots: publicProcedure.query(async () => { + const threeHoursAgo = (0, import_dayjs2.default)().subtract(3, "hour").toDate(); + const slots = await getSlotsAfterDate(threeHoursAgo); + return { + success: true, + data: slots.map((slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime.toISOString(), + freezeTime: slot.freezeTime.toISOString(), + deliverySequence: slot.deliverySequence + })) + }; + }), + getOrdersBySnippetAndSlot: publicProcedure.input(external_exports.object({ + snippetCode: external_exports.string().min(1, "Snippet code is required"), + slotId: external_exports.number().int().positive("Valid slot ID is required") + })).query(async ({ input }) => { + const { snippetCode, slotId } = input; + const snippet = await getVendorSnippetByCode(snippetCode); + const slot = await getVendorSlotById(slotId); + if (!snippet) { + throw new Error("Vendor snippet not found"); + } + if (!slot) { + throw new Error("Slot not found"); + } + const matchingOrders = await getVendorOrdersBySlotId(slotId); + const filteredOrders = matchingOrders.filter((order) => { + const status = order.orderStatus; + if (status[0]?.isCancelled) + return false; + const orderProductIds = order.orderItems.map((item) => item.productId); + return snippet.productIds.some((productId) => orderProductIds.includes(productId)); + }); + const formattedOrders = filteredOrders.map((order) => { + const attachedOrderItems = order.orderItems.filter( + (item) => snippet.productIds.includes(item.productId) + ); + const products = attachedOrderItems.map((item) => ({ + orderItemId: item.id, + productId: item.productId, + productName: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat((item.price ?? 0).toString()), + unit: item.product.unit?.shortNotation || "unit", + subtotal: parseFloat((item.price ?? 0).toString()) * parseFloat(item.quantity), + productSize: item.product.productQuantity, + is_packaged: item.is_packaged, + is_package_verified: item.is_package_verified + })); + const orderTotal = products.reduce((sum2, p2) => sum2 + p2.subtotal, 0); + return { + orderId: `ORD${order.id}`, + orderDate: order.createdAt.toISOString(), + customerName: order.user.name || "", + totalAmount: orderTotal, + slotInfo: order.slot ? { + time: order.slot.deliveryTime.toISOString(), + sequence: order.slot.deliverySequence + } : null, + products, + matchedProducts: snippet.productIds, + snippetCode: snippet.snippetCode + }; + }); + return { + success: true, + data: formattedOrders, + snippet: { + id: snippet.id, + snippetCode: snippet.snippetCode, + slotId: snippet.slotId, + productIds: snippet.productIds, + validTill: snippet.validTill?.toISOString(), + createdAt: snippet.createdAt.toISOString(), + isPermanent: snippet.isPermanent + }, + selectedSlot: { + id: slot.id, + deliveryTime: slot.deliveryTime.toISOString(), + freezeTime: slot.freezeTime.toISOString(), + deliverySequence: slot.deliverySequence + } + }; + }), + updateOrderItemPackaging: publicProcedure.input(external_exports.object({ + orderItemId: external_exports.number().int().positive("Valid order item ID required"), + is_packaged: external_exports.boolean() + })).mutation(async ({ input, ctx }) => { + const { orderItemId, is_packaged } = input; + const result = await updateVendorOrderItemPackaging(orderItemId, is_packaged); + if (!result.success) { + throw new Error(result.message); + } + return result; + }) + }); + } +}); + +// src/lib/roles-manager.ts +var ROLE_NAMES, defaultRole, RoleManager, roleManager, roles_manager_default; +var init_roles_manager = __esm({ + "src/lib/roles-manager.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ROLE_NAMES = { + ADMIN: "admin", + GENERAL_USER: "gen_user", + HOSPITAL_ADMIN: "hospital_admin", + DOCTOR: "doctor", + RECEPTIONIST: "receptionist" + }; + defaultRole = ROLE_NAMES.GENERAL_USER; + RoleManager = class { + roles = /* @__PURE__ */ new Map(); + rolesByName = /* @__PURE__ */ new Map(); + isInitialized = false; + constructor() { + } + /** + * Fetch all roles from the database and cache them + * This should be called during application startup + */ + async fetchRoles() { + try { + } catch (error50) { + console.error("[RoleManager] Error fetching roles:", error50); + throw error50; + } + } + /** + * Get all roles from cache + * If not initialized, fetches roles from DB first + */ + async getRoles() { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return Array.from(this.roles.values()); + } + /** + * Get role by ID + * @param id Role ID + */ + async getRoleById(id) { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return this.roles.get(id); + } + /** + * Get role by name + * @param name Role name + */ + async getRoleByName(name) { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return this.rolesByName.get(name); + } + /** + * Check if a role exists by name + * @param name Role name + */ + async roleExists(name) { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return this.rolesByName.has(name); + } + /** + * Get business roles (roles that are not 'admin' or 'gen_user') + */ + async getBusinessRoles() { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return Array.from(this.roles.values()).filter( + (role) => role.name !== ROLE_NAMES.ADMIN && role.name !== ROLE_NAMES.GENERAL_USER + ); + } + /** + * Force refresh the roles cache + */ + async refreshRoles() { + await this.fetchRoles(); + } + }; + __name(RoleManager, "RoleManager"); + roleManager = new RoleManager(); + roles_manager_default = roleManager; + } +}); + +// src/lib/const-keys.ts +var CONST_KEYS, CONST_KEYS_ARRAY; +var init_const_keys = __esm({ + "src/lib/const-keys.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + CONST_KEYS = { + minRegularOrderValue: "minRegularOrderValue", + freeDeliveryThreshold: "freeDeliveryThreshold", + deliveryCharge: "deliveryCharge", + flashFreeDeliveryThreshold: "flashFreeDeliveryThreshold", + flashDeliveryCharge: "flashDeliveryCharge", + platformFeePercent: "platformFeePercent", + taxRate: "taxRate", + tester: "tester", + minOrderAmountForCoupon: "minOrderAmountForCoupon", + maxCouponDiscount: "maxCouponDiscount", + flashDeliverySlotId: "flashDeliverySlotId", + readableOrderId: "readableOrderId", + versionNum: "versionNum", + playStoreUrl: "playStoreUrl", + appStoreUrl: "appStoreUrl", + popularItems: "popularItems", + allItemsOrder: "allItemsOrder", + isFlashDeliveryEnabled: "isFlashDeliveryEnabled", + supportMobile: "supportMobile", + supportEmail: "supportEmail" + }; + CONST_KEYS_ARRAY = Object.values(CONST_KEYS); + } +}); + +// src/lib/const-store.ts +var computeConstants, getConstant, getConstants, getAllConstValues; +var init_const_store = __esm({ + "src/lib/const-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_const_keys(); + computeConstants = /* @__PURE__ */ __name(async () => { + try { + console.log("Computing constants from database..."); + const constants2 = await getAllKeyValStore(); + console.log(`Computed ${constants2.length} constants from DB`); + } catch (error50) { + console.error("Failed to compute constants:", error50); + throw error50; + } + }, "computeConstants"); + getConstant = /* @__PURE__ */ __name(async (key) => { + const constants2 = await getAllKeyValStore(); + const entry = constants2.find((c2) => c2.key === key); + if (!entry) { + return null; + } + return entry.value; + }, "getConstant"); + getConstants = /* @__PURE__ */ __name(async (keys) => { + const constants2 = await getAllKeyValStore(); + const constantsMap = new Map(constants2.map((c2) => [c2.key, c2.value])); + const result = {}; + for (const key of keys) { + const value = constantsMap.get(key); + result[key] = value !== void 0 ? value : null; + } + return result; + }, "getConstants"); + getAllConstValues = /* @__PURE__ */ __name(async () => { + const constants2 = await getAllKeyValStore(); + const constantsMap = new Map(constants2.map((c2) => [c2.key, c2.value])); + const result = {}; + for (const key of CONST_KEYS_ARRAY) { + result[key] = constantsMap.get(key) ?? null; + } + return result; + }, "getAllConstValues"); + } +}); + +// src/stores/slot-store.ts +async function transformSlotToStoreSlot(slot) { + return { + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isCapacityFull: slot.isCapacityFull, + products: slot.productSlots.map((productSlot) => ({ + id: productSlot.product.id, + name: productSlot.product.name, + productQuantity: productSlot.product.productQuantity, + shortDescription: productSlot.product.shortDescription, + price: productSlot.product.price.toString(), + marketPrice: productSlot.product.marketPrice?.toString() || null, + unit: productSlot.product.unit?.shortNotation || null, + images: scaffoldAssetUrl( + productSlot.product.images || [] + ), + isOutOfStock: productSlot.product.isOutOfStock, + storeId: productSlot.product.storeId, + nextDeliveryDate: slot.deliveryTime + })) + }; +} +function extractSlotInfo(slot) { + return { + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isCapacityFull: slot.isCapacityFull + }; +} +async function fetchAllTransformedSlots() { + const slots = await getAllSlotsWithProductsForCache(); + return Promise.all(slots.map(transformSlotToStoreSlot)); +} +async function initializeSlotStore() { + try { + console.log("Initializing slot store in Redis..."); + const slots = await getAllSlotsWithProductsForCache(); + const slotsWithProducts = await Promise.all( + slots.map(async (slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isCapacityFull: slot.isCapacityFull, + products: await Promise.all( + slot.productSlots.map(async (productSlot) => ({ + id: productSlot.product.id, + name: productSlot.product.name, + productQuantity: productSlot.product.productQuantity, + shortDescription: productSlot.product.shortDescription, + price: productSlot.product.price.toString(), + marketPrice: productSlot.product.marketPrice?.toString() || null, + unit: productSlot.product.unit?.shortNotation || null, + images: scaffoldAssetUrl( + productSlot.product.images || [] + ), + isOutOfStock: productSlot.product.isOutOfStock, + storeId: productSlot.product.storeId, + nextDeliveryDate: slot.deliveryTime + })) + ) + })) + ); + const productSlotsMap = {}; + for (const slot of slotsWithProducts) { + for (const product of slot.products) { + if (!productSlotsMap[product.id]) { + productSlotsMap[product.id] = []; + } + productSlotsMap[product.id].push({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isCapacityFull: slot.isCapacityFull + }); + } + } + console.log("Slot store initialized successfully"); + } catch (error50) { + console.error("Error initializing slot store:", error50); + } +} +async function getSlotById(slotId) { + try { + const slots = await getAllSlotsWithProductsForCache(); + const slot = slots.find((s2) => s2.id === slotId); + if (!slot) + return null; + return transformSlotToStoreSlot(slot); + } catch (error50) { + console.error(`Error getting slot ${slotId}:`, error50); + return null; + } +} +async function getAllSlots() { + try { + return fetchAllTransformedSlots(); + } catch (error50) { + console.error("Error getting all slots:", error50); + return []; + } +} +async function getMultipleProductsSlots(productIds) { + try { + if (productIds.length === 0) + return {}; + const slots = await getAllSlotsWithProductsForCache(); + const productIdSet = new Set(productIds); + const result = {}; + for (const productId of productIds) { + result[productId] = []; + } + for (const slot of slots) { + const slotInfo = extractSlotInfo(slot); + for (const productSlot of slot.productSlots) { + const pid2 = productSlot.product.id; + if (productIdSet.has(pid2) && !slot.isCapacityFull) { + result[pid2].push(slotInfo); + } + } + } + return result; + } catch (error50) { + console.error("Error getting products slots:", error50); + return {}; + } +} +var init_slot_store = __esm({ + "src/stores/slot-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_s3_client(); + __name(transformSlotToStoreSlot, "transformSlotToStoreSlot"); + __name(extractSlotInfo, "extractSlotInfo"); + __name(fetchAllTransformedSlots, "fetchAllTransformedSlots"); + __name(initializeSlotStore, "initializeSlotStore"); + __name(getSlotById, "getSlotById"); + __name(getAllSlots, "getAllSlots"); + __name(getMultipleProductsSlots, "getMultipleProductsSlots"); + } +}); + +// src/stores/banner-store.ts +async function initializeBannerStore() { + try { + console.log("Initializing banner store in Redis..."); + const banners = await getAllBannersForCache(); + console.log("Banner store initialized successfully"); + } catch (error50) { + console.error("Error initializing banner store:", error50); + } +} +var init_banner_store = __esm({ + "src/stores/banner-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_s3_client(); + __name(initializeBannerStore, "initializeBannerStore"); + } +}); + +// ../../node_modules/@turf/helpers/dist/esm/index.js +function feature(geom, properties, options = {}) { + const feat = { type: "Feature" }; + if (options.id === 0 || options.id) { + feat.id = options.id; + } + if (options.bbox) { + feat.bbox = options.bbox; + } + feat.properties = properties || {}; + feat.geometry = geom; + return feat; +} +function point(coordinates, properties, options = {}) { + if (!coordinates) { + throw new Error("coordinates is required"); + } + if (!Array.isArray(coordinates)) { + throw new Error("coordinates must be an Array"); + } + if (coordinates.length < 2) { + throw new Error("coordinates must be at least 2 numbers long"); + } + if (!isNumber2(coordinates[0]) || !isNumber2(coordinates[1])) { + throw new Error("coordinates must contain numbers"); + } + const geom = { + type: "Point", + coordinates + }; + return feature(geom, properties, options); +} +function polygon(coordinates, properties, options = {}) { + for (const ring of coordinates) { + if (ring.length < 4) { + throw new Error( + "Each LinearRing of a Polygon must have 4 or more Positions." + ); + } + if (ring[ring.length - 1].length !== ring[0].length) { + throw new Error("First and last Position are not equivalent."); + } + for (let j2 = 0; j2 < ring[ring.length - 1].length; j2++) { + if (ring[ring.length - 1][j2] !== ring[0][j2]) { + throw new Error("First and last Position are not equivalent."); + } + } + } + const geom = { + type: "Polygon", + coordinates + }; + return feature(geom, properties, options); +} +function isNumber2(num) { + return !isNaN(num) && num !== null && !Array.isArray(num); +} +var earthRadius, factors; +var init_esm = __esm({ + "../../node_modules/@turf/helpers/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + earthRadius = 63710088e-1; + factors = { + centimeters: earthRadius * 100, + centimetres: earthRadius * 100, + degrees: 360 / (2 * Math.PI), + feet: earthRadius * 3.28084, + inches: earthRadius * 39.37, + kilometers: earthRadius / 1e3, + kilometres: earthRadius / 1e3, + meters: earthRadius, + metres: earthRadius, + miles: earthRadius / 1609.344, + millimeters: earthRadius * 1e3, + millimetres: earthRadius * 1e3, + nauticalmiles: earthRadius / 1852, + radians: 1, + yards: earthRadius * 1.0936 + }; + __name(feature, "feature"); + __name(point, "point"); + __name(polygon, "polygon"); + __name(isNumber2, "isNumber"); + } +}); + +// ../../node_modules/@turf/invariant/dist/esm/index.js +function getCoord(coord) { + if (!coord) { + throw new Error("coord is required"); + } + if (!Array.isArray(coord)) { + if (coord.type === "Feature" && coord.geometry !== null && coord.geometry.type === "Point") { + return [...coord.geometry.coordinates]; + } + if (coord.type === "Point") { + return [...coord.coordinates]; + } + } + if (Array.isArray(coord) && coord.length >= 2 && !Array.isArray(coord[0]) && !Array.isArray(coord[1])) { + return [...coord]; + } + throw new Error("coord must be GeoJSON Point or an Array of numbers"); +} +function getGeom(geojson) { + if (geojson.type === "Feature") { + return geojson.geometry; + } + return geojson; +} +var init_esm2 = __esm({ + "../../node_modules/@turf/invariant/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(getCoord, "getCoord"); + __name(getGeom, "getGeom"); + } +}); + +// ../../node_modules/@turf/meta/dist/esm/index.js +var init_esm3 = __esm({ + "../../node_modules/@turf/meta/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/robust-predicates/esm/util.js +function sum(elen, e2, flen, f2, h2) { + let Q2, Qnew, hh2, bvirt; + let enow = e2[0]; + let fnow = f2[0]; + let eindex = 0; + let findex = 0; + if (fnow > enow === fnow > -enow) { + Q2 = enow; + enow = e2[++eindex]; + } else { + Q2 = fnow; + fnow = f2[++findex]; + } + let hindex = 0; + if (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = enow + Q2; + hh2 = Q2 - (Qnew - enow); + enow = e2[++eindex]; + } else { + Qnew = fnow + Q2; + hh2 = Q2 - (Qnew - fnow); + fnow = f2[++findex]; + } + Q2 = Qnew; + if (hh2 !== 0) { + h2[hindex++] = hh2; + } + while (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = Q2 + enow; + bvirt = Qnew - Q2; + hh2 = Q2 - (Qnew - bvirt) + (enow - bvirt); + enow = e2[++eindex]; + } else { + Qnew = Q2 + fnow; + bvirt = Qnew - Q2; + hh2 = Q2 - (Qnew - bvirt) + (fnow - bvirt); + fnow = f2[++findex]; + } + Q2 = Qnew; + if (hh2 !== 0) { + h2[hindex++] = hh2; + } + } + } + while (eindex < elen) { + Qnew = Q2 + enow; + bvirt = Qnew - Q2; + hh2 = Q2 - (Qnew - bvirt) + (enow - bvirt); + enow = e2[++eindex]; + Q2 = Qnew; + if (hh2 !== 0) { + h2[hindex++] = hh2; + } + } + while (findex < flen) { + Qnew = Q2 + fnow; + bvirt = Qnew - Q2; + hh2 = Q2 - (Qnew - bvirt) + (fnow - bvirt); + fnow = f2[++findex]; + Q2 = Qnew; + if (hh2 !== 0) { + h2[hindex++] = hh2; + } + } + if (Q2 !== 0 || hindex === 0) { + h2[hindex++] = Q2; + } + return hindex; +} +function estimate(elen, e2) { + let Q2 = e2[0]; + for (let i2 = 1; i2 < elen; i2++) + Q2 += e2[i2]; + return Q2; +} +function vec(n2) { + return new Float64Array(n2); +} +var epsilon, splitter, resulterrbound; +var init_util4 = __esm({ + "../../node_modules/robust-predicates/esm/util.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + epsilon = 11102230246251565e-32; + splitter = 134217729; + resulterrbound = (3 + 8 * epsilon) * epsilon; + __name(sum, "sum"); + __name(estimate, "estimate"); + __name(vec, "vec"); + } +}); + +// ../../node_modules/robust-predicates/esm/orient2d.js +function orient2dadapt(ax2, ay2, bx2, by2, cx2, cy2, detsum) { + let acxtail, acytail, bcxtail, bcytail; + let bvirt, c2, ahi, alo, bhi, blo, _i2, _j, _0, s1, s0, t12, t02, u32; + const acx = ax2 - cx2; + const bcx = bx2 - cx2; + const acy = ay2 - cy2; + const bcy = by2 - cy2; + s1 = acx * bcy; + c2 = splitter * acx; + ahi = c2 - (c2 - acx); + alo = acx - ahi; + c2 = splitter * bcy; + bhi = c2 - (c2 - bcy); + blo = bcy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t12 = acy * bcx; + c2 = splitter * acy; + ahi = c2 - (c2 - acy); + alo = acy - ahi; + c2 = splitter * bcx; + bhi = c2 - (c2 - bcx); + blo = bcx - bhi; + t02 = alo * blo - (t12 - ahi * bhi - alo * bhi - ahi * blo); + _i2 = s0 - t02; + bvirt = s0 - _i2; + B2[0] = s0 - (_i2 + bvirt) + (bvirt - t02); + _j = s1 + _i2; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i2 - bvirt); + _i2 = _0 - t12; + bvirt = _0 - _i2; + B2[1] = _0 - (_i2 + bvirt) + (bvirt - t12); + u32 = _j + _i2; + bvirt = u32 - _j; + B2[2] = _j - (u32 - bvirt) + (_i2 - bvirt); + B2[3] = u32; + let det = estimate(4, B2); + let errbound = ccwerrboundB * detsum; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax2 - acx; + acxtail = ax2 - (acx + bvirt) + (bvirt - cx2); + bvirt = bx2 - bcx; + bcxtail = bx2 - (bcx + bvirt) + (bvirt - cx2); + bvirt = ay2 - acy; + acytail = ay2 - (acy + bvirt) + (bvirt - cy2); + bvirt = by2 - bcy; + bcytail = by2 - (bcy + bvirt) + (bvirt - cy2); + if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) { + return det; + } + errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det); + det += acx * bcytail + bcy * acxtail - (acy * bcxtail + bcx * acytail); + if (det >= errbound || -det >= errbound) + return det; + s1 = acxtail * bcy; + c2 = splitter * acxtail; + ahi = c2 - (c2 - acxtail); + alo = acxtail - ahi; + c2 = splitter * bcy; + bhi = c2 - (c2 - bcy); + blo = bcy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t12 = acytail * bcx; + c2 = splitter * acytail; + ahi = c2 - (c2 - acytail); + alo = acytail - ahi; + c2 = splitter * bcx; + bhi = c2 - (c2 - bcx); + blo = bcx - bhi; + t02 = alo * blo - (t12 - ahi * bhi - alo * bhi - ahi * blo); + _i2 = s0 - t02; + bvirt = s0 - _i2; + u2[0] = s0 - (_i2 + bvirt) + (bvirt - t02); + _j = s1 + _i2; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i2 - bvirt); + _i2 = _0 - t12; + bvirt = _0 - _i2; + u2[1] = _0 - (_i2 + bvirt) + (bvirt - t12); + u32 = _j + _i2; + bvirt = u32 - _j; + u2[2] = _j - (u32 - bvirt) + (_i2 - bvirt); + u2[3] = u32; + const C1len = sum(4, B2, 4, u2, C1); + s1 = acx * bcytail; + c2 = splitter * acx; + ahi = c2 - (c2 - acx); + alo = acx - ahi; + c2 = splitter * bcytail; + bhi = c2 - (c2 - bcytail); + blo = bcytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t12 = acy * bcxtail; + c2 = splitter * acy; + ahi = c2 - (c2 - acy); + alo = acy - ahi; + c2 = splitter * bcxtail; + bhi = c2 - (c2 - bcxtail); + blo = bcxtail - bhi; + t02 = alo * blo - (t12 - ahi * bhi - alo * bhi - ahi * blo); + _i2 = s0 - t02; + bvirt = s0 - _i2; + u2[0] = s0 - (_i2 + bvirt) + (bvirt - t02); + _j = s1 + _i2; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i2 - bvirt); + _i2 = _0 - t12; + bvirt = _0 - _i2; + u2[1] = _0 - (_i2 + bvirt) + (bvirt - t12); + u32 = _j + _i2; + bvirt = u32 - _j; + u2[2] = _j - (u32 - bvirt) + (_i2 - bvirt); + u2[3] = u32; + const C2len = sum(C1len, C1, 4, u2, C2); + s1 = acxtail * bcytail; + c2 = splitter * acxtail; + ahi = c2 - (c2 - acxtail); + alo = acxtail - ahi; + c2 = splitter * bcytail; + bhi = c2 - (c2 - bcytail); + blo = bcytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t12 = acytail * bcxtail; + c2 = splitter * acytail; + ahi = c2 - (c2 - acytail); + alo = acytail - ahi; + c2 = splitter * bcxtail; + bhi = c2 - (c2 - bcxtail); + blo = bcxtail - bhi; + t02 = alo * blo - (t12 - ahi * bhi - alo * bhi - ahi * blo); + _i2 = s0 - t02; + bvirt = s0 - _i2; + u2[0] = s0 - (_i2 + bvirt) + (bvirt - t02); + _j = s1 + _i2; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i2 - bvirt); + _i2 = _0 - t12; + bvirt = _0 - _i2; + u2[1] = _0 - (_i2 + bvirt) + (bvirt - t12); + u32 = _j + _i2; + bvirt = u32 - _j; + u2[2] = _j - (u32 - bvirt) + (_i2 - bvirt); + u2[3] = u32; + const Dlen = sum(C2len, C2, 4, u2, D2); + return D2[Dlen - 1]; +} +function orient2d(ax2, ay2, bx2, by2, cx2, cy2) { + const detleft = (ay2 - cy2) * (bx2 - cx2); + const detright = (ax2 - cx2) * (by2 - cy2); + const det = detleft - detright; + const detsum = Math.abs(detleft + detright); + if (Math.abs(det) >= ccwerrboundA * detsum) + return det; + return -orient2dadapt(ax2, ay2, bx2, by2, cx2, cy2, detsum); +} +var ccwerrboundA, ccwerrboundB, ccwerrboundC, B2, C1, C2, D2, u2; +var init_orient2d = __esm({ + "../../node_modules/robust-predicates/esm/orient2d.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util4(); + ccwerrboundA = (3 + 16 * epsilon) * epsilon; + ccwerrboundB = (2 + 12 * epsilon) * epsilon; + ccwerrboundC = (9 + 64 * epsilon) * epsilon * epsilon; + B2 = vec(4); + C1 = vec(8); + C2 = vec(12); + D2 = vec(16); + u2 = vec(4); + __name(orient2dadapt, "orient2dadapt"); + __name(orient2d, "orient2d"); + } +}); + +// ../../node_modules/robust-predicates/esm/orient3d.js +var o3derrboundA, o3derrboundB, o3derrboundC, bc2, ca2, ab2, at_b, at_c, bt_c, bt_a, ct_a, ct_b, bct, cat, abt, u3, _8, _8b, _16, _12, fin, fin2; +var init_orient3d = __esm({ + "../../node_modules/robust-predicates/esm/orient3d.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util4(); + o3derrboundA = (7 + 56 * epsilon) * epsilon; + o3derrboundB = (3 + 28 * epsilon) * epsilon; + o3derrboundC = (26 + 288 * epsilon) * epsilon * epsilon; + bc2 = vec(4); + ca2 = vec(4); + ab2 = vec(4); + at_b = vec(4); + at_c = vec(4); + bt_c = vec(4); + bt_a = vec(4); + ct_a = vec(4); + ct_b = vec(4); + bct = vec(8); + cat = vec(8); + abt = vec(8); + u3 = vec(4); + _8 = vec(8); + _8b = vec(8); + _16 = vec(8); + _12 = vec(12); + fin = vec(192); + fin2 = vec(192); + } +}); + +// ../../node_modules/robust-predicates/esm/incircle.js +var iccerrboundA, iccerrboundB, iccerrboundC, bc3, ca3, ab3, aa2, bb2, cc2, u4, v2, axtbc, aytbc, bxtca, bytca, cxtab, cytab, abt2, bct2, cat2, abtt, bctt, catt, _82, _162, _16b, _16c, _32, _32b, _48, _64, fin3, fin22; +var init_incircle = __esm({ + "../../node_modules/robust-predicates/esm/incircle.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util4(); + iccerrboundA = (10 + 96 * epsilon) * epsilon; + iccerrboundB = (4 + 48 * epsilon) * epsilon; + iccerrboundC = (44 + 576 * epsilon) * epsilon * epsilon; + bc3 = vec(4); + ca3 = vec(4); + ab3 = vec(4); + aa2 = vec(4); + bb2 = vec(4); + cc2 = vec(4); + u4 = vec(4); + v2 = vec(4); + axtbc = vec(8); + aytbc = vec(8); + bxtca = vec(8); + bytca = vec(8); + cxtab = vec(8); + cytab = vec(8); + abt2 = vec(8); + bct2 = vec(8); + cat2 = vec(8); + abtt = vec(4); + bctt = vec(4); + catt = vec(4); + _82 = vec(8); + _162 = vec(16); + _16b = vec(16); + _16c = vec(16); + _32 = vec(32); + _32b = vec(32); + _48 = vec(48); + _64 = vec(64); + fin3 = vec(1152); + fin22 = vec(1152); + } +}); + +// ../../node_modules/robust-predicates/esm/insphere.js +var isperrboundA, isperrboundB, isperrboundC, ab4, bc4, cd2, de, ea, ac2, bd2, ce2, da, eb, abc, bcd, cde, dea, eab, abd, bce, cda, deb, eac, adet, bdet, cdet, ddet, edet, abdet, cddet, cdedet, deter, _83, _8b2, _8c, _163, _24, _482, _48b, _96, _192, _384x, _384y, _384z, _768, xdet, ydet, zdet, fin4; +var init_insphere = __esm({ + "../../node_modules/robust-predicates/esm/insphere.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util4(); + isperrboundA = (16 + 224 * epsilon) * epsilon; + isperrboundB = (5 + 72 * epsilon) * epsilon; + isperrboundC = (71 + 1408 * epsilon) * epsilon * epsilon; + ab4 = vec(4); + bc4 = vec(4); + cd2 = vec(4); + de = vec(4); + ea = vec(4); + ac2 = vec(4); + bd2 = vec(4); + ce2 = vec(4); + da = vec(4); + eb = vec(4); + abc = vec(24); + bcd = vec(24); + cde = vec(24); + dea = vec(24); + eab = vec(24); + abd = vec(24); + bce = vec(24); + cda = vec(24); + deb = vec(24); + eac = vec(24); + adet = vec(1152); + bdet = vec(1152); + cdet = vec(1152); + ddet = vec(1152); + edet = vec(1152); + abdet = vec(2304); + cddet = vec(2304); + cdedet = vec(3456); + deter = vec(5760); + _83 = vec(8); + _8b2 = vec(8); + _8c = vec(8); + _163 = vec(16); + _24 = vec(24); + _482 = vec(48); + _48b = vec(48); + _96 = vec(96); + _192 = vec(192); + _384x = vec(384); + _384y = vec(384); + _384z = vec(384); + _768 = vec(768); + xdet = vec(96); + ydet = vec(96); + zdet = vec(96); + fin4 = vec(1152); + } +}); + +// ../../node_modules/robust-predicates/index.js +var init_robust_predicates = __esm({ + "../../node_modules/robust-predicates/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_orient2d(); + init_orient3d(); + init_incircle(); + init_insphere(); + } +}); + +// ../../node_modules/point-in-polygon-hao/dist/esm/index.js +function pointInPolygon(p2, polygon3) { + var i2; + var ii2; + var k2 = 0; + var f2; + var u1; + var v1; + var u22; + var v22; + var currentP; + var nextP; + var x2 = p2[0]; + var y2 = p2[1]; + var numContours = polygon3.length; + for (i2 = 0; i2 < numContours; i2++) { + ii2 = 0; + var contour = polygon3[i2]; + var contourLen = contour.length - 1; + currentP = contour[0]; + if (currentP[0] !== contour[contourLen][0] && currentP[1] !== contour[contourLen][1]) { + throw new Error("First and last coordinates in a ring must be the same"); + } + u1 = currentP[0] - x2; + v1 = currentP[1] - y2; + for (ii2; ii2 < contourLen; ii2++) { + nextP = contour[ii2 + 1]; + u22 = nextP[0] - x2; + v22 = nextP[1] - y2; + if (v1 === 0 && v22 === 0) { + if (u22 <= 0 && u1 >= 0 || u1 <= 0 && u22 >= 0) { + return 0; + } + } else if (v22 >= 0 && v1 <= 0 || v22 <= 0 && v1 >= 0) { + f2 = orient2d(u1, u22, v1, v22, 0, 0); + if (f2 === 0) { + return 0; + } + if (f2 > 0 && v22 > 0 && v1 <= 0 || f2 < 0 && v22 <= 0 && v1 > 0) { + k2++; + } + } + currentP = nextP; + v1 = v22; + u1 = u22; + } + } + if (k2 % 2 === 0) { + return false; + } + return true; +} +var init_esm4 = __esm({ + "../../node_modules/point-in-polygon-hao/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_robust_predicates(); + __name(pointInPolygon, "pointInPolygon"); + } +}); + +// ../../node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +function booleanPointInPolygon(point2, polygon3, options = {}) { + if (!point2) { + throw new Error("point is required"); + } + if (!polygon3) { + throw new Error("polygon is required"); + } + const pt = getCoord(point2); + const geom = getGeom(polygon3); + const type = geom.type; + const bbox = polygon3.bbox; + let polys = geom.coordinates; + if (bbox && inBBox(pt, bbox) === false) { + return false; + } + if (type === "Polygon") { + polys = [polys]; + } + let result = false; + for (var i2 = 0; i2 < polys.length; ++i2) { + const polyResult = pointInPolygon(pt, polys[i2]); + if (polyResult === 0) + return options.ignoreBoundary ? false : true; + else if (polyResult) + result = true; + } + return result; +} +function inBBox(pt, bbox) { + return bbox[0] <= pt[0] && bbox[1] <= pt[1] && bbox[2] >= pt[0] && bbox[3] >= pt[1]; +} +var init_esm5 = __esm({ + "../../node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_esm4(); + init_esm2(); + __name(booleanPointInPolygon, "booleanPointInPolygon"); + __name(inBBox, "inBBox"); + } +}); + +// ../../node_modules/@turf/clone/dist/esm/index.js +var init_esm6 = __esm({ + "../../node_modules/@turf/clone/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/clusters/dist/esm/index.js +var init_esm7 = __esm({ + "../../node_modules/@turf/clusters/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js +var init_esm8 = __esm({ + "../../node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/projection/dist/esm/index.js +var init_esm9 = __esm({ + "../../node_modules/@turf/projection/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/quadrat-analysis/dist/esm/index.js +var init_esm10 = __esm({ + "../../node_modules/@turf/quadrat-analysis/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/random/dist/esm/index.js +var init_esm11 = __esm({ + "../../node_modules/@turf/random/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/turf/dist/esm/index.js +var init_esm12 = __esm({ + "../../node_modules/@turf/turf/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_esm5(); + init_esm6(); + init_esm7(); + init_esm(); + init_esm2(); + init_esm3(); + init_esm8(); + init_esm9(); + init_esm10(); + init_esm11(); + } +}); + +// src/lib/mbnr-geojson.ts +var mbnrGeoJson; +var init_mbnr_geojson = __esm({ + "src/lib/mbnr-geojson.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + mbnrGeoJson = { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + [ + [ + 78.0540565157155, + 16.750355644371382 + ], + [ + 78.02147549424018, + 16.72066473405593 + ], + [ + 78.03026125246384, + 16.71696749930787 + ], + [ + 78.0438058450269, + 16.72191442229257 + ], + [ + 78.01378723066603, + 16.729427120762438 + ], + [ + 78.01192390645633, + 16.767270033080678 + ], + [ + 77.98897480599248, + 16.78383139678816 + ], + [ + 77.98650506846502, + 16.779477610410623 + ], + [ + 77.99211289459566, + 16.764294442899583 + ], + [ + 77.9917733766166, + 16.760247911187193 + ], + [ + 77.9871626670851, + 16.762487176781022 + ], + [ + 77.98216269568468, + 16.762520539253813 + ], + [ + 77.9728079653313, + 16.75895746646411 + ], + [ + 77.97076993211158, + 16.749241850772236 + ], + [ + 77.97290869571145, + 16.714289841456335 + ], + [ + 77.98673742913684, + 16.716189282573396 + ], + [ + 78.00286970994557, + 16.718191131206893 + ], + [ + 78.02757966423519, + 16.720603921728966 + ], + [ + 78.01653780770818, + 16.73184590223127 + ], + [ + 78.0064695230268, + 16.760236966033375 + ], + [ + 78.0148831108591, + 16.760801801995825 + ], + [ + 78.01488756695255, + 16.75827980335133 + ], + [ + 78.0244311364159, + 16.744778942163208 + ], + [ + 78.03342267256608, + 16.760773251410058 + ], + [ + 78.05078586709863, + 16.763902127913653 + ], + [ + 78.0540565157155, + 16.750355644371382 + ] + ] + ], + "type": "Polygon" + } + } + ] + }; + } +}); + +// src/trpc/apis/common-apis/common-trpc-index.ts +async function scaffoldEssentialConsts() { + const consts = await getAllConstValues(); + return { + freeDeliveryThreshold: consts[CONST_KEYS.freeDeliveryThreshold] ?? 200, + deliveryCharge: consts[CONST_KEYS.deliveryCharge] ?? 0, + flashFreeDeliveryThreshold: consts[CONST_KEYS.flashFreeDeliveryThreshold] ?? 500, + flashDeliveryCharge: consts[CONST_KEYS.flashDeliveryCharge] ?? 69, + popularItems: consts[CONST_KEYS.popularItems] ?? "5,3,2,4,1", + versionNum: consts[CONST_KEYS.versionNum] ?? "1.1.0", + playStoreUrl: consts[CONST_KEYS.playStoreUrl] ?? "https://play.google.com/store/apps/details?id=in.freshyo.app", + appStoreUrl: consts[CONST_KEYS.appStoreUrl] ?? "https://apps.apple.com/in/app/freshyo/id6756889077", + webViewHtml: null, + isWebviewClosable: true, + isFlashDeliveryEnabled: consts[CONST_KEYS.isFlashDeliveryEnabled] ?? true, + supportMobile: consts[CONST_KEYS.supportMobile] ?? "", + supportEmail: consts[CONST_KEYS.supportEmail] ?? "", + assetsDomain, + apiCacheKey + }; +} +var polygon2, commonApiRouter; +var init_common_trpc_index = __esm({ + "src/trpc/apis/common-apis/common-trpc-index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_common3(); + init_dbService(); + init_esm12(); + init_zod(); + init_mbnr_geojson(); + init_s3_client(); + init_api_error(); + init_const_store(); + init_const_keys(); + init_env_exporter(); + polygon2 = polygon(mbnrGeoJson.features[0].geometry.coordinates); + __name(scaffoldEssentialConsts, "scaffoldEssentialConsts"); + commonApiRouter = router2({ + product: commonRouter, + getStoresSummary: publicProcedure.query(async () => { + const stores = await getStoresSummary(); + return { + stores + }; + }), + checkLocationInPolygon: publicProcedure.input(external_exports.object({ + lat: external_exports.number().min(-90).max(90), + lng: external_exports.number().min(-180).max(180) + })).query(({ input }) => { + try { + const { lat, lng } = input; + const point2 = point([lng, lat]); + const isInside = booleanPointInPolygon(point2, polygon2); + return { isInside }; + } catch (error50) { + throw new Error("Invalid coordinates or polygon data"); + } + }), + generateUploadUrls: protectedProcedure.input(external_exports.object({ + contextString: external_exports.enum(["review", "review_response", "product_info", "notification", "store", "complaint", "profile", "tags"]), + mimeTypes: external_exports.array(external_exports.string()) + })).mutation(async ({ input }) => { + const { contextString, mimeTypes } = input; + const uploadUrls = []; + const keys = []; + for (const mimeType of mimeTypes) { + let folder; + if (contextString === "review") { + folder = "review-images"; + } else if (contextString === "product_info") { + folder = "product-images"; + } else if (contextString === "store") { + folder = "store-images"; + } else if (contextString === "review_response") { + folder = "review-response-images"; + } else if (contextString === "complaint") { + folder = "complaint-images"; + } else if (contextString === "profile") { + folder = "profile-images"; + } else if (contextString === "tags") { + folder = "tags"; + } else { + folder = ""; + } + const extension = mimeType === "image/jpeg" ? ".jpg" : mimeType === "image/png" ? ".png" : mimeType === "image/gif" ? ".gif" : ".jpg"; + const key = `${folder}/${Date.now()}${extension}`; + try { + const uploadUrl = await generateUploadUrl(key, mimeType); + uploadUrls.push(uploadUrl); + keys.push(key); + } catch (error50) { + console.error("Error generating upload URL:", error50); + throw new ApiError("Failed to generate upload URL", 500); + } + } + return { uploadUrls }; + }), + healthCheck: publicProcedure.query(async () => { + const result = await healthCheck(); + return result; + }), + essentialConsts: publicProcedure.query(async () => { + const response = await scaffoldEssentialConsts(); + return response; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/stores.ts +async function scaffoldStores() { + const storesData = await getStoreSummaries(); + const storesWithDetails = storesData.map((store) => { + const signedImageUrl = store.imageUrl ? scaffoldAssetUrl(store.imageUrl) : null; + const sampleProducts = store.sampleProducts.map((product) => ({ + id: product.id, + name: product.name, + signedImageUrl: product.images && product.images.length > 0 ? scaffoldAssetUrl(product.images[0]) : null + })); + return { + id: store.id, + name: store.name, + description: store.description, + signedImageUrl, + productCount: store.productCount, + sampleProducts + }; + }); + return { + stores: storesWithDetails + }; +} +async function scaffoldStoreWithProducts(storeId) { + const storeDetail = await getStoreDetail(storeId); + if (!storeDetail) { + throw new ApiError("Store not found", 404); + } + const signedImageUrl = storeDetail.store.imageUrl ? scaffoldAssetUrl(storeDetail.store.imageUrl) : null; + const productsWithSignedUrls = storeDetail.products.map((product) => ({ + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + price: product.price, + marketPrice: product.marketPrice, + incrementStep: product.incrementStep, + unit: product.unit, + unitNotation: product.unitNotation, + images: scaffoldAssetUrl(product.images || []), + isOutOfStock: product.isOutOfStock, + productQuantity: product.productQuantity + })); + const tags = await getTagsByStoreId(storeId); + return { + store: { + id: storeDetail.store.id, + name: storeDetail.store.name, + description: storeDetail.store.description, + signedImageUrl + }, + products: productsWithSignedUrls, + tags: tags.map((tag2) => ({ + id: tag2.id, + tagName: tag2.tagName, + tagDescription: tag2.tagDescription, + imageUrl: tag2.imageUrl, + productIds: tag2.productIds + })) + }; +} +var storesRouter; +var init_stores2 = __esm({ + "src/trpc/apis/user-apis/apis/stores.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_s3_client(); + init_api_error(); + init_product_tag_store(); + init_dbService(); + __name(scaffoldStores, "scaffoldStores"); + __name(scaffoldStoreWithProducts, "scaffoldStoreWithProducts"); + storesRouter = router2({ + getStores: publicProcedure.query(async () => { + const response = await scaffoldStores(); + return response; + }), + getStoreWithProducts: publicProcedure.input(external_exports.object({ + storeId: external_exports.number() + })).query(async ({ input }) => { + const { storeId } = input; + const response = await scaffoldStoreWithProducts(storeId); + return response; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/slots.ts +async function getSlotData(slotId) { + const slot = await getSlotById(slotId); + if (!slot) { + return null; + } + const currentTime = /* @__PURE__ */ new Date(); + if ((0, import_dayjs3.default)(slot.freezeTime).isBefore(currentTime)) { + return null; + } + return { + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + slotId: slot.id, + products: slot.products.filter((product) => !product.isOutOfStock) + }; +} +async function scaffoldSlotsWithProducts() { + const allSlots = await getAllSlots(); + const currentTime = /* @__PURE__ */ new Date(); + const validSlots = allSlots.filter((slot) => { + return (0, import_dayjs3.default)(slot.freezeTime).isAfter(currentTime) && (0, import_dayjs3.default)(slot.deliveryTime).isAfter(currentTime) && !slot.isCapacityFull; + }).sort((a2, b2) => (0, import_dayjs3.default)(a2.deliveryTime).valueOf() - (0, import_dayjs3.default)(b2.deliveryTime).valueOf()); + const productAvailability = await getProductAvailability(); + return { + slots: validSlots, + productAvailability, + count: validSlots.length + }; +} +var import_dayjs3, slotsRouter; +var init_slots3 = __esm({ + "src/trpc/apis/user-apis/apis/slots.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_slot_store(); + import_dayjs3 = __toESM(require_dayjs_min()); + init_dbService(); + __name(getSlotData, "getSlotData"); + __name(scaffoldSlotsWithProducts, "scaffoldSlotsWithProducts"); + slotsRouter = router2({ + getSlots: publicProcedure.query(async () => { + const slots = await getActiveSlotsList(); + return { + slots, + count: slots.length + }; + }), + getSlotsWithProducts: publicProcedure.query(async () => { + const response = await scaffoldSlotsWithProducts(); + return response; + }), + getSlotById: publicProcedure.input(external_exports.object({ slotId: external_exports.number() })).query(async ({ input }) => { + return await getSlotData(input.slotId); + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/banners.ts +async function scaffoldBanners() { + const banners = await getActiveBanners(); + const bannersWithSignedUrls = banners.map((banner) => ({ + ...banner, + imageUrl: banner.imageUrl ? scaffoldAssetUrl(banner.imageUrl) : banner.imageUrl + })); + return { + banners: bannersWithSignedUrls + }; +} +var bannerRouter; +var init_banners2 = __esm({ + "src/trpc/apis/user-apis/apis/banners.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_s3_client(); + init_dbService(); + __name(scaffoldBanners, "scaffoldBanners"); + bannerRouter = router2({ + getBanners: publicProcedure.query(async () => { + const response = await scaffoldBanners(); + return response; + }) + }); + } +}); + +// ../../packages/shared/types/index.ts +var init_types7 = __esm({ + "../../packages/shared/types/index.ts"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/shared/index.ts +var CACHE_FILENAMES; +var init_shared4 = __esm({ + "../../packages/shared/index.ts"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types7(); + CACHE_FILENAMES = { + products: "products.json", + stores: "stores.json", + slots: "slots.json", + essentialConsts: "essential-consts.json", + banners: "banners.json" + }; + } +}); + +// src/lib/retry.ts +async function retryWithExponentialBackoff(fn, maxRetries = 3, delayMs = 1e3) { + let lastError; + for (let attempt = 1; attempt <= maxRetries; attempt++) { + try { + return await fn(); + } catch (error50) { + lastError = error50 instanceof Error ? error50 : new Error(String(error50)); + if (attempt < maxRetries) { + console.log(`Attempt ${attempt} failed, retrying in ${delayMs}ms...`); + await new Promise((resolve) => setTimeout(resolve, delayMs)); + delayMs *= 2; + } + } + } + throw lastError; +} +var init_retry3 = __esm({ + "src/lib/retry.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(retryWithExponentialBackoff, "retryWithExponentialBackoff"); + } +}); + +// src/lib/cloud_cache.ts +function constructCacheUrl(path) { + return `${assetsDomain}${apiCacheKey}/${path}`; +} +async function createAllCacheFiles() { + console.log("Starting creation of all cache files..."); + const [ + productsKey, + essentialConstsKey, + storesKey, + slotsKey, + bannersKey, + individualStoreKeys + ] = await Promise.all([ + createProductsFileInternal(), + createEssentialConstsFileInternal(), + createStoresFileInternal(), + createSlotsFileInternal(), + createBannersFileInternal(), + createAllStoresFilesInternal() + ]); + const urls = [ + constructCacheUrl(CACHE_FILENAMES.products), + constructCacheUrl(CACHE_FILENAMES.essentialConsts), + constructCacheUrl(CACHE_FILENAMES.stores), + constructCacheUrl(CACHE_FILENAMES.slots), + constructCacheUrl(CACHE_FILENAMES.banners), + ...individualStoreKeys.map((_, index) => constructCacheUrl(`stores/${index + 1}.json`)) + ]; + try { + await retryWithExponentialBackoff(() => clearUrlCache(urls)); + console.log(`Cache purged for all ${urls.length} files`); + } catch (error50) { + console.error(`Failed to purge cache for all files after 3 retries`, error50); + } + console.log("All cache files created successfully"); + return { + products: productsKey, + essentialConsts: essentialConstsKey, + stores: storesKey, + slots: slotsKey, + banners: bannersKey, + individualStores: individualStoreKeys + }; +} +async function createProductsFileInternal() { + const productsData = await scaffoldProducts(); + const jsonContent = JSON.stringify(productsData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.products}`); +} +async function createEssentialConstsFileInternal() { + const essentialConstsData = await scaffoldEssentialConsts(); + const jsonContent = JSON.stringify(essentialConstsData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.essentialConsts}`); +} +async function createStoresFileInternal() { + const storesData = await scaffoldStores(); + const jsonContent = JSON.stringify(storesData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.stores}`); +} +async function createSlotsFileInternal() { + const slotsData = await scaffoldSlotsWithProducts(); + const jsonContent = JSON.stringify(slotsData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.slots}`); +} +async function createBannersFileInternal() { + const bannersData = await scaffoldBanners(); + const jsonContent = JSON.stringify(bannersData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.banners}`); +} +async function createAllStoresFilesInternal() { + const stores = await getStoresSummary(); + const results = []; + for (const store of stores) { + const storeData = await scaffoldStoreWithProducts(store.id); + const jsonContent = JSON.stringify(storeData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + const s3Key = await imageUploadS3(buffer, "application/json", `${apiCacheKey}/stores/${store.id}.json`); + results.push(s3Key); + } + console.log(`Created ${results.length} store cache files`); + return results; +} +async function clearUrlCache(urls) { + if (!cloudflareApiToken || !cloudflareZoneId) { + console.warn("Cloudflare credentials not configured, skipping cache clear"); + return { success: false, errors: ["Cloudflare credentials not configured"] }; + } + try { + const response = await axios_default.post( + `https://api.cloudflare.com/client/v4/zones/${cloudflareZoneId}/purge_cache`, + { files: urls }, + { + headers: { + "Authorization": `Bearer ${cloudflareApiToken}`, + "Content-Type": "application/json" + } + } + ); + const result = response.data; + if (!result.success) { + const errorMessages = result.errors?.map((e2) => e2.message) || ["Unknown error"]; + console.error(`Cloudflare cache purge failed for URLs: ${urls.join(", ")}`, errorMessages); + return { success: false, errors: errorMessages }; + } + console.log(`Successfully purged ${urls.length} URLs from Cloudflare cache: ${urls.join(", ")}`); + return { success: true }; + } catch (error50) { + console.log(error50); + const errorMessage = error50 instanceof Error ? error50.message : "Unknown error"; + console.error(`Error clearing Cloudflare cache for URLs: ${urls.join(", ")}`, errorMessage); + return { success: false, errors: [errorMessage] }; + } +} +var init_cloud_cache = __esm({ + "src/lib/cloud_cache.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_axios2(); + init_common3(); + init_common_trpc_index(); + init_stores2(); + init_slots3(); + init_banners2(); + init_stores2(); + init_dbService(); + init_s3_client(); + init_env_exporter(); + init_shared4(); + init_retry3(); + __name(constructCacheUrl, "constructCacheUrl"); + __name(createAllCacheFiles, "createAllCacheFiles"); + __name(createProductsFileInternal, "createProductsFileInternal"); + __name(createEssentialConstsFileInternal, "createEssentialConstsFileInternal"); + __name(createStoresFileInternal, "createStoresFileInternal"); + __name(createSlotsFileInternal, "createSlotsFileInternal"); + __name(createBannersFileInternal, "createBannersFileInternal"); + __name(createAllStoresFilesInternal, "createAllStoresFilesInternal"); + __name(clearUrlCache, "clearUrlCache"); + } +}); + +// src/stores/store-initializer.ts +var STORE_INIT_DELAY_MS, storeInitializationTimeout, initializeAllStores, scheduleStoreInitialization; +var init_store_initializer = __esm({ + "src/stores/store-initializer.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_roles_manager(); + init_const_store(); + init_product_store(); + init_product_tag_store(); + init_slot_store(); + init_banner_store(); + init_cloud_cache(); + STORE_INIT_DELAY_MS = 3 * 60 * 1e3; + storeInitializationTimeout = null; + initializeAllStores = /* @__PURE__ */ __name(async () => { + try { + console.log("Starting application stores initialization..."); + await Promise.all([ + roles_manager_default.fetchRoles(), + computeConstants(), + initializeProducts(), + initializeProductTagStore(), + initializeSlotStore(), + initializeBannerStore() + ]); + console.log("All application stores initialized successfully"); + createAllCacheFiles().catch((error50) => { + console.error("Failed to regenerate cache files during store initialization:", error50); + }); + } catch (error50) { + console.error("Application stores initialization failed:", error50); + throw error50; + } + }, "initializeAllStores"); + scheduleStoreInitialization = /* @__PURE__ */ __name(() => { + if (storeInitializationTimeout) { + clearTimeout(storeInitializationTimeout); + storeInitializationTimeout = null; + } + storeInitializationTimeout = setTimeout(() => { + storeInitializationTimeout = null; + initializeAllStores().catch((error50) => { + console.error("Scheduled store initialization failed:", error50); + }); + }, STORE_INIT_DELAY_MS); + }, "scheduleStoreInitialization"); + } +}); + +// src/trpc/apis/admin-apis/apis/slots.ts +var cachedSequenceSchema, createSlotSchema, getSlotByIdSchema, updateSlotSchema, deleteSlotSchema, getDeliverySequenceSchema, updateDeliverySequenceSchema, slotsRouter2; +var init_slots4 = __esm({ + "src/trpc/apis/admin-apis/apis/slots.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_dist3(); + init_zod(); + init_api_error(); + init_env_exporter(); + init_store_initializer(); + init_dbService(); + cachedSequenceSchema = external_exports.record(external_exports.string(), external_exports.array(external_exports.number())); + createSlotSchema = external_exports.object({ + deliveryTime: external_exports.string(), + freezeTime: external_exports.string(), + isActive: external_exports.boolean().optional(), + productIds: external_exports.array(external_exports.number()).optional(), + vendorSnippets: external_exports.array(external_exports.object({ + name: external_exports.string().min(1), + productIds: external_exports.array(external_exports.number().int().positive()).min(1), + validTill: external_exports.string().optional() + })).optional(), + groupIds: external_exports.array(external_exports.number()).optional() + }); + getSlotByIdSchema = external_exports.object({ + id: external_exports.number() + }); + updateSlotSchema = external_exports.object({ + id: external_exports.number(), + deliveryTime: external_exports.string(), + freezeTime: external_exports.string(), + isActive: external_exports.boolean().optional(), + productIds: external_exports.array(external_exports.number()).optional(), + vendorSnippets: external_exports.array(external_exports.object({ + name: external_exports.string().min(1), + productIds: external_exports.array(external_exports.number().int().positive()).min(1), + validTill: external_exports.string().optional() + })).optional(), + groupIds: external_exports.array(external_exports.number()).optional() + }); + deleteSlotSchema = external_exports.object({ + id: external_exports.number() + }); + getDeliverySequenceSchema = external_exports.object({ + id: external_exports.string() + }); + updateDeliverySequenceSchema = external_exports.object({ + id: external_exports.number(), + // deliverySequence: z.array(z.number()), + deliverySequence: external_exports.any() + }); + slotsRouter2 = router2({ + // Exact replica of GET /av/slots + getAll: protectedProcedure.query(async ({ ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const slots = await getActiveSlotsWithProducts(); + return { + slots, + count: slots.length + }; + }), + // Exact replica of POST /av/products/slots/product-ids + getSlotsProductIds: protectedProcedure.input(external_exports.object({ slotIds: external_exports.array(external_exports.number()) })).query(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { slotIds } = input; + if (!Array.isArray(slotIds)) { + throw new TRPCError({ + code: "BAD_REQUEST", + message: "slotIds must be an array" + }); + } + const result = await getSlotsProductIds(slotIds); + return result; + }), + // Exact replica of PUT /av/products/slots/:slotId/products + updateSlotProducts: protectedProcedure.input( + external_exports.object({ + slotId: external_exports.number(), + productIds: external_exports.array(external_exports.number()) + }) + ).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { slotId, productIds } = input; + if (!Array.isArray(productIds)) { + throw new TRPCError({ + code: "BAD_REQUEST", + message: "productIds must be an array" + }); + } + const result = await updateSlotProducts(String(slotId), productIds.map(String)); + scheduleStoreInitialization(); + return { + message: result.message, + added: result.added, + removed: result.removed + }; + }), + createSlot: protectedProcedure.input(createSlotSchema).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input; + if (!deliveryTime || !freezeTime) { + throw new ApiError("Delivery time and orders close time are required", 400); + } + const result = await createSlotWithRelations({ + deliveryTime, + freezeTime, + isActive, + productIds, + vendorSnippets: snippets, + groupIds + }); + scheduleStoreInitialization(); + return result; + }), + getSlots: protectedProcedure.query(async ({ ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const slots = await getActiveSlots(); + return { + slots, + count: slots.length + }; + }), + getSlotById: protectedProcedure.input(getSlotByIdSchema).query(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { id } = input; + const slot = await getSlotByIdWithRelations(id); + if (!slot) { + throw new ApiError("Slot not found", 404); + } + return { + slot: { + ...slot, + vendorSnippets: slot.vendorSnippets.map((snippet) => ({ + ...snippet, + accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}` + })) + } + }; + }), + updateSlot: protectedProcedure.input(updateSlotSchema).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + try { + const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input; + if (!deliveryTime || !freezeTime) { + throw new ApiError("Delivery time and orders close time are required", 400); + } + const result = await updateSlotWithRelations({ + id, + deliveryTime, + freezeTime, + isActive, + productIds, + vendorSnippets: snippets, + groupIds + }); + if (!result) { + throw new ApiError("Slot not found", 404); + } + scheduleStoreInitialization(); + return result; + } catch (e2) { + console.log(e2); + throw new ApiError("Unable to Update Slot"); + } + }), + deleteSlot: protectedProcedure.input(deleteSlotSchema).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { id } = input; + const deletedSlot = await deleteSlotById(id); + if (!deletedSlot) { + throw new ApiError("Slot not found", 404); + } + scheduleStoreInitialization(); + return { + message: "Slot deleted successfully" + }; + }), + getDeliverySequence: protectedProcedure.input(getDeliverySequenceSchema).query(async ({ input, ctx }) => { + const { id } = input; + const slotId = parseInt(id); + const slot = await getSlotDeliverySequence(slotId); + if (!slot) { + throw new ApiError("Slot not found", 404); + } + const sequence = slot.deliverySequence || {}; + return { deliverySequence: sequence }; + }), + updateDeliverySequence: protectedProcedure.input(updateDeliverySequenceSchema).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { id, deliverySequence } = input; + const updatedSlot = await updateSlotDeliverySequence(id, deliverySequence); + if (!updatedSlot) { + throw new ApiError("Slot not found", 404); + } + return { + slot: updatedSlot, + message: "Delivery sequence updated successfully" + }; + }), + updateSlotCapacity: protectedProcedure.input(external_exports.object({ + slotId: external_exports.number(), + isCapacityFull: external_exports.boolean() + })).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { slotId, isCapacityFull } = input; + const result = await updateSlotCapacity(slotId, isCapacityFull); + if (!result) { + throw new ApiError("Slot not found", 404); + } + scheduleStoreInitialization(); + return result; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/product.ts +var productRouter; +var init_product3 = __esm({ + "src/trpc/apis/admin-apis/apis/product.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_s3_client(); + init_store_initializer(); + init_dbService(); + productRouter = router2({ + getProducts: protectedProcedure.query(async () => { + const products = await getAllProducts(); + const productsWithSignedUrls = await Promise.all( + products.map(async (product) => ({ + ...product, + images: await generateSignedUrlsFromS3Urls(product.images || []) + })) + ); + return { + products: productsWithSignedUrls, + count: productsWithSignedUrls.length + }; + }), + getProductById: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).query(async ({ input }) => { + const { id } = input; + const product = await getProductById(id); + if (!product) { + throw new ApiError("Product not found", 404); + } + const productWithSignedUrls = { + ...product, + images: await generateSignedUrlsFromS3Urls(product.images || []) + }; + return { + product: productWithSignedUrls + }; + }), + deleteProduct: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).mutation(async ({ input }) => { + const { id } = input; + const deletedProduct = await deleteProduct(id); + if (!deletedProduct) { + throw new ApiError("Product not found", 404); + } + scheduleStoreInitialization(); + return { + message: "Product deleted successfully" + }; + }), + toggleOutOfStock: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).mutation(async ({ input }) => { + const { id } = input; + const updatedProduct = await toggleProductOutOfStock(id); + if (!updatedProduct) { + throw new ApiError("Product not found", 404); + } + scheduleStoreInitialization(); + return { + product: updatedProduct, + message: `Product marked as ${updatedProduct.isOutOfStock ? "out of stock" : "in stock"}` + }; + }), + createProduct: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + shortDescription: external_exports.string().optional(), + longDescription: external_exports.string().optional(), + unitId: external_exports.number().min(1, "Unit is required"), + storeId: external_exports.number().min(1, "Store is required"), + price: external_exports.number().positive("Price must be positive"), + marketPrice: external_exports.number().optional(), + incrementStep: external_exports.number().optional().default(1), + productQuantity: external_exports.number().optional().default(1), + isSuspended: external_exports.boolean().optional().default(false), + isFlashAvailable: external_exports.boolean().optional().default(false), + flashPrice: external_exports.number().optional(), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]), + deals: external_exports.array(external_exports.object({ + quantity: external_exports.number(), + price: external_exports.number(), + validTill: external_exports.string() + })).optional(), + tagIds: external_exports.array(external_exports.number()).optional().default([]) + })).mutation(async ({ input }) => { + const { name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, uploadUrls, deals, tagIds } = input; + const existingProduct = await checkProductExistsByName(name.trim()); + if (existingProduct) { + throw new ApiError("A product with this name already exists", 400); + } + const unitExists = await checkUnitExists(unitId); + if (!unitExists) { + throw new ApiError("Invalid unit ID", 400); + } + const imageKeys = uploadUrls.map((url2) => extractKeyFromPresignedUrl(url2)); + const newProduct = await createProduct({ + name, + shortDescription, + longDescription, + unitId, + storeId, + price: price.toString(), + marketPrice: marketPrice?.toString(), + incrementStep, + productQuantity, + isSuspended, + isFlashAvailable, + flashPrice: flashPrice?.toString(), + images: imageKeys + }); + let createdDeals = []; + if (deals && deals.length > 0) { + createdDeals = await createSpecialDealsForProduct(newProduct.id, deals); + } + if (tagIds.length > 0) { + await replaceProductTags(newProduct.id, tagIds); + } + if (uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + scheduleStoreInitialization(); + return { + product: newProduct, + deals: createdDeals, + message: "Product created successfully" + }; + }), + updateProduct: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + name: external_exports.string().min(1, "Name is required"), + shortDescription: external_exports.string().optional(), + longDescription: external_exports.string().optional(), + unitId: external_exports.number().min(1, "Unit is required"), + storeId: external_exports.number().min(1, "Store is required"), + price: external_exports.number().positive("Price must be positive"), + marketPrice: external_exports.number().optional(), + incrementStep: external_exports.number().optional().default(1), + productQuantity: external_exports.number().optional().default(1), + isSuspended: external_exports.boolean().optional().default(false), + isFlashAvailable: external_exports.boolean().optional().default(false), + flashPrice: external_exports.number().nullable().optional(), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]), + imagesToDelete: external_exports.array(external_exports.string()).optional().default([]), + deals: external_exports.array(external_exports.object({ + quantity: external_exports.number(), + price: external_exports.number(), + validTill: external_exports.string() + })).optional(), + tagIds: external_exports.array(external_exports.number()).optional().default([]) + })).mutation(async ({ input }) => { + const { id, name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, uploadUrls, imagesToDelete, deals, tagIds } = input; + const unitExists = await checkUnitExists(unitId); + if (!unitExists) { + throw new ApiError("Invalid unit ID", 400); + } + const currentImages = await getProductImagesById(id); + if (!currentImages) { + throw new ApiError("Product not found", 404); + } + let updatedImages = currentImages || []; + if (imagesToDelete.length > 0) { + const imagesToRemove = updatedImages.filter((img) => imagesToDelete.includes(img)); + await deleteImageUtil({ keys: imagesToRemove }); + updatedImages = updatedImages.filter((img) => !imagesToRemove.includes(img)); + } + const newImageKeys = uploadUrls.map((url2) => extractKeyFromPresignedUrl(url2)); + const finalImages = [...updatedImages, ...newImageKeys]; + const updatedProduct = await updateProduct(id, { + name, + shortDescription, + longDescription, + unitId, + storeId, + price: price.toString(), + marketPrice: marketPrice?.toString(), + incrementStep, + productQuantity, + isSuspended, + isFlashAvailable, + flashPrice: flashPrice?.toString() ?? null, + images: finalImages + }); + if (!updatedProduct) { + throw new ApiError("Product not found", 404); + } + if (deals && deals.length > 0) { + await updateProductDeals(id, deals); + } + if (tagIds.length > 0) { + await replaceProductTags(id, tagIds); + } + if (uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + scheduleStoreInitialization(); + return { + product: updatedProduct, + message: "Product updated successfully" + }; + }), + updateSlotProducts: protectedProcedure.input(external_exports.object({ + slotId: external_exports.string(), + productIds: external_exports.array(external_exports.string()) + })).mutation(async ({ input }) => { + const { slotId, productIds } = input; + if (!Array.isArray(productIds)) { + throw new ApiError("productIds must be an array", 400); + } + const result = await updateSlotProducts(slotId, productIds); + scheduleStoreInitialization(); + return { + message: "Slot products updated successfully", + added: result.added, + removed: result.removed + }; + }), + getSlotProductIds: protectedProcedure.input(external_exports.object({ + slotId: external_exports.string() + })).query(async ({ input }) => { + const { slotId } = input; + const productIds = await getSlotProductIds(slotId); + return { + productIds + }; + }), + getSlotsProductIds: protectedProcedure.input(external_exports.object({ + slotIds: external_exports.array(external_exports.number()) + })).query(async ({ input }) => { + const { slotIds } = input; + if (!Array.isArray(slotIds)) { + throw new ApiError("slotIds must be an array", 400); + } + const result = await getSlotsProductIds(slotIds); + return result; + }), + getProductReviews: protectedProcedure.input(external_exports.object({ + productId: external_exports.number().int().positive(), + limit: external_exports.number().int().min(1).max(50).optional().default(10), + offset: external_exports.number().int().min(0).optional().default(0) + })).query(async ({ input }) => { + const { productId, limit, offset } = input; + const { reviews, totalCount } = await getProductReviews(productId, limit, offset); + const reviewsWithSignedUrls = await Promise.all( + reviews.map(async (review) => ({ + ...review, + signedImageUrls: await generateSignedUrlsFromS3Urls(review.imageUrls || []), + signedAdminImageUrls: await generateSignedUrlsFromS3Urls(review.adminResponseImages || []) + })) + ); + const hasMore = offset + limit < totalCount; + return { reviews: reviewsWithSignedUrls, hasMore }; + }), + respondToReview: protectedProcedure.input(external_exports.object({ + reviewId: external_exports.number().int().positive(), + adminResponse: external_exports.string().optional(), + adminResponseImages: external_exports.array(external_exports.string()).optional().default([]), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]) + })).mutation(async ({ input }) => { + const { reviewId, adminResponse, adminResponseImages, uploadUrls } = input; + const updatedReview = await respondToReview(reviewId, adminResponse, adminResponseImages); + if (!updatedReview) { + throw new ApiError("Review not found", 404); + } + if (uploadUrls && uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + return { success: true, review: updatedReview }; + }), + getGroups: protectedProcedure.query(async () => { + const groups = await getAllProductGroups(); + return { + groups: groups.map((group6) => ({ + ...group6, + products: group6.memberships.map((m2) => ({ + ...m2.product, + images: m2.product.images || null + })), + productCount: group6.memberships.length + })) + }; + }), + createGroup: protectedProcedure.input(external_exports.object({ + group_name: external_exports.string().min(1), + description: external_exports.string().optional(), + product_ids: external_exports.array(external_exports.number()).default([]) + })).mutation(async ({ input }) => { + const { group_name, description, product_ids } = input; + const newGroup = await createProductGroup(group_name, description, product_ids); + scheduleStoreInitialization(); + return { + group: newGroup, + message: "Group created successfully" + }; + }), + updateGroup: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + group_name: external_exports.string().optional(), + description: external_exports.string().optional(), + product_ids: external_exports.array(external_exports.number()).optional() + })).mutation(async ({ input }) => { + const { id, group_name, description, product_ids } = input; + const updatedGroup = await updateProductGroup(id, group_name, description, product_ids); + if (!updatedGroup) { + throw new ApiError("Group not found", 404); + } + scheduleStoreInitialization(); + return { + group: updatedGroup, + message: "Group updated successfully" + }; + }), + deleteGroup: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).mutation(async ({ input }) => { + const { id } = input; + const deletedGroup = await deleteProductGroup(id); + if (!deletedGroup) { + throw new ApiError("Group not found", 404); + } + scheduleStoreInitialization(); + return { + message: "Group deleted successfully" + }; + }), + updateProductPrices: protectedProcedure.input(external_exports.object({ + updates: external_exports.array(external_exports.object({ + productId: external_exports.number(), + price: external_exports.number().optional(), + marketPrice: external_exports.number().nullable().optional(), + flashPrice: external_exports.number().nullable().optional(), + isFlashAvailable: external_exports.boolean().optional() + })) + })).mutation(async ({ input }) => { + const { updates } = input; + if (updates.length === 0) { + throw new ApiError("No updates provided", 400); + } + const result = await updateProductPrices(updates); + if (result.invalidIds.length > 0) { + throw new ApiError(`Invalid product IDs: ${result.invalidIds.join(", ")}`, 400); + } + scheduleStoreInitialization(); + return { + message: `Updated prices for ${result.updatedCount} product(s)`, + updatedCount: result.updatedCount + }; + }), + getProductTags: protectedProcedure.query(async () => { + const tags = await getAllProductTagInfos(); + const tagsWithSignedUrls = await Promise.all( + tags.map(async (tag2) => ({ + ...tag2, + imageUrl: tag2.imageUrl ? await generateSignedUrlFromS3Url(tag2.imageUrl) : null + })) + ); + return { + tags: tagsWithSignedUrls, + message: "Tags retrieved successfully" + }; + }), + getProductTagById: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).query(async ({ input }) => { + const tag2 = await getProductTagInfoById(input.id); + if (!tag2) { + throw new ApiError("Tag not found", 404); + } + const tagWithSignedUrl = { + ...tag2, + imageUrl: tag2.imageUrl ? await generateSignedUrlFromS3Url(tag2.imageUrl) : null + }; + return { + tag: tagWithSignedUrl, + message: "Tag retrieved successfully" + }; + }), + createProductTag: protectedProcedure.input(external_exports.object({ + tagName: external_exports.string().min(1, "Tag name is required"), + tagDescription: external_exports.string().optional(), + imageUrl: external_exports.string().optional().nullable(), + isDashboardTag: external_exports.boolean().optional().default(false), + relatedStores: external_exports.array(external_exports.number()).optional().default([]), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]) + })).mutation(async ({ input }) => { + const { tagName, tagDescription, imageUrl, isDashboardTag, relatedStores, uploadUrls } = input; + const existingTag = await checkProductTagExistsByName(tagName.trim()); + if (existingTag) { + throw new ApiError("A tag with this name already exists", 400); + } + const createdTag = await createProductTag({ + tagName: tagName.trim(), + tagDescription, + imageUrl: imageUrl ?? null, + isDashboardTag, + relatedStores + }); + if (uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + scheduleStoreInitialization(); + const { products, ...createdTagInfo } = createdTag; + return { + tag: { + ...createdTagInfo, + imageUrl: createdTagInfo.imageUrl ? await generateSignedUrlFromS3Url(createdTagInfo.imageUrl) : null + }, + message: "Tag created successfully" + }; + }), + updateProductTag: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + tagName: external_exports.string().min(1).optional(), + tagDescription: external_exports.string().optional().nullable(), + imageUrl: external_exports.string().optional().nullable(), + isDashboardTag: external_exports.boolean().optional(), + relatedStores: external_exports.array(external_exports.number()).optional(), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]) + })).mutation(async ({ input }) => { + const { id, tagName, tagDescription, imageUrl, isDashboardTag, relatedStores, uploadUrls } = input; + const currentTag = await getProductTagInfoById(id); + if (!currentTag) { + throw new ApiError("Tag not found", 404); + } + if (imageUrl !== void 0 && imageUrl !== currentTag.imageUrl) { + if (currentTag.imageUrl) { + await deleteImageUtil({ keys: [currentTag.imageUrl] }); + } + } + const updatedTag = await updateProductTag(id, { + tagName: tagName?.trim(), + tagDescription: tagDescription ?? void 0, + imageUrl: imageUrl ?? void 0, + isDashboardTag, + relatedStores + }); + if (uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + scheduleStoreInitialization(); + const { products, ...updatedTagInfo } = updatedTag; + return { + tag: { + ...updatedTagInfo, + imageUrl: updatedTagInfo.imageUrl ? await generateSignedUrlFromS3Url(updatedTagInfo.imageUrl) : null + }, + message: "Tag updated successfully" + }; + }), + deleteProductTag: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).mutation(async ({ input }) => { + const tag2 = await getProductTagInfoById(input.id); + if (!tag2) { + throw new ApiError("Tag not found", 404); + } + if (tag2.imageUrl) { + await deleteImageUtil({ keys: [tag2.imageUrl] }); + } + await deleteProductTag(input.id); + scheduleStoreInitialization(); + return { message: "Tag deleted successfully" }; + }) + }); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/crypto/web.mjs +var subtle; +var init_web = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/crypto/web.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + subtle = globalThis.crypto?.subtle; + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/crypto/node.mjs +var webcrypto, createCipher, createDecipher, pseudoRandomBytes, createCipheriv, createDecipheriv, createECDH, createSign, createVerify, diffieHellman, getCipherInfo, privateDecrypt, privateEncrypt, publicDecrypt, publicEncrypt, sign2, verify2, hash2, Cipher, Cipheriv, Decipher, Decipheriv, ECDH, Sign, Verify; +var init_node3 = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/crypto/node.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils(); + webcrypto = new Proxy(globalThis.crypto, { get(_, key) { + if (key === "CryptoKey") { + return globalThis.CryptoKey; + } + if (typeof globalThis.crypto[key] === "function") { + return globalThis.crypto[key].bind(globalThis.crypto); + } + return globalThis.crypto[key]; + } }); + createCipher = /* @__PURE__ */ notImplemented("crypto.createCipher"); + createDecipher = /* @__PURE__ */ notImplemented("crypto.createDecipher"); + pseudoRandomBytes = /* @__PURE__ */ notImplemented("crypto.pseudoRandomBytes"); + createCipheriv = /* @__PURE__ */ notImplemented("crypto.createCipheriv"); + createDecipheriv = /* @__PURE__ */ notImplemented("crypto.createDecipheriv"); + createECDH = /* @__PURE__ */ notImplemented("crypto.createECDH"); + createSign = /* @__PURE__ */ notImplemented("crypto.createSign"); + createVerify = /* @__PURE__ */ notImplemented("crypto.createVerify"); + diffieHellman = /* @__PURE__ */ notImplemented("crypto.diffieHellman"); + getCipherInfo = /* @__PURE__ */ notImplemented("crypto.getCipherInfo"); + privateDecrypt = /* @__PURE__ */ notImplemented("crypto.privateDecrypt"); + privateEncrypt = /* @__PURE__ */ notImplemented("crypto.privateEncrypt"); + publicDecrypt = /* @__PURE__ */ notImplemented("crypto.publicDecrypt"); + publicEncrypt = /* @__PURE__ */ notImplemented("crypto.publicEncrypt"); + sign2 = /* @__PURE__ */ notImplemented("crypto.sign"); + verify2 = /* @__PURE__ */ notImplemented("crypto.verify"); + hash2 = /* @__PURE__ */ notImplemented("crypto.hash"); + Cipher = /* @__PURE__ */ notImplementedClass("crypto.Cipher"); + Cipheriv = /* @__PURE__ */ notImplementedClass( + "crypto.Cipheriv" + // @ts-expect-error not typed yet + ); + Decipher = /* @__PURE__ */ notImplementedClass("crypto.Decipher"); + Decipheriv = /* @__PURE__ */ notImplementedClass( + "crypto.Decipheriv" + // @ts-expect-error not typed yet + ); + ECDH = /* @__PURE__ */ notImplementedClass("crypto.ECDH"); + Sign = /* @__PURE__ */ notImplementedClass("crypto.Sign"); + Verify = /* @__PURE__ */ notImplementedClass("crypto.Verify"); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/crypto/constants.mjs +var SSL_OP_ALL, SSL_OP_ALLOW_NO_DHE_KEX, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION, SSL_OP_CIPHER_SERVER_PREFERENCE, SSL_OP_CISCO_ANYCONNECT, SSL_OP_COOKIE_EXCHANGE, SSL_OP_CRYPTOPRO_TLSEXT_BUG, SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS, SSL_OP_LEGACY_SERVER_CONNECT, SSL_OP_NO_COMPRESSION, SSL_OP_NO_ENCRYPT_THEN_MAC, SSL_OP_NO_QUERY_MTU, SSL_OP_NO_RENEGOTIATION, SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION, SSL_OP_NO_SSLv2, SSL_OP_NO_SSLv3, SSL_OP_NO_TICKET, SSL_OP_NO_TLSv1, SSL_OP_NO_TLSv1_1, SSL_OP_NO_TLSv1_2, SSL_OP_NO_TLSv1_3, SSL_OP_PRIORITIZE_CHACHA, SSL_OP_TLS_ROLLBACK_BUG, ENGINE_METHOD_RSA, ENGINE_METHOD_DSA, ENGINE_METHOD_DH, ENGINE_METHOD_RAND, ENGINE_METHOD_EC, ENGINE_METHOD_CIPHERS, ENGINE_METHOD_DIGESTS, ENGINE_METHOD_PKEY_METHS, ENGINE_METHOD_PKEY_ASN1_METHS, ENGINE_METHOD_ALL, ENGINE_METHOD_NONE, DH_CHECK_P_NOT_SAFE_PRIME, DH_CHECK_P_NOT_PRIME, DH_UNABLE_TO_CHECK_GENERATOR, DH_NOT_SUITABLE_GENERATOR, RSA_PKCS1_PADDING, RSA_NO_PADDING, RSA_PKCS1_OAEP_PADDING, RSA_X931_PADDING, RSA_PKCS1_PSS_PADDING, RSA_PSS_SALTLEN_DIGEST, RSA_PSS_SALTLEN_MAX_SIGN, RSA_PSS_SALTLEN_AUTO, POINT_CONVERSION_COMPRESSED, POINT_CONVERSION_UNCOMPRESSED, POINT_CONVERSION_HYBRID, defaultCoreCipherList, defaultCipherList, OPENSSL_VERSION_NUMBER, TLS1_VERSION, TLS1_1_VERSION, TLS1_2_VERSION, TLS1_3_VERSION; +var init_constants16 = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/crypto/constants.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SSL_OP_ALL = 2147485776; + 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_LEGACY_SERVER_CONNECT = 4; + 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_PRIORITIZE_CHACHA = 2097152; + 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; + RSA_PKCS1_PADDING = 1; + 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; + POINT_CONVERSION_COMPRESSED = 2; + POINT_CONVERSION_UNCOMPRESSED = 4; + POINT_CONVERSION_HYBRID = 6; + defaultCoreCipherList = ""; + defaultCipherList = ""; + OPENSSL_VERSION_NUMBER = 0; + TLS1_VERSION = 0; + TLS1_1_VERSION = 0; + TLS1_2_VERSION = 0; + TLS1_3_VERSION = 0; + } +}); + +// ../../node_modules/unenv/dist/runtime/node/crypto.mjs +var constants; +var init_crypto2 = __esm({ + "../../node_modules/unenv/dist/runtime/node/crypto.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants16(); + init_web(); + init_node3(); + constants = { + OPENSSL_VERSION_NUMBER, + SSL_OP_ALL, + SSL_OP_ALLOW_NO_DHE_KEX, + SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION, + SSL_OP_CIPHER_SERVER_PREFERENCE, + SSL_OP_CISCO_ANYCONNECT, + SSL_OP_COOKIE_EXCHANGE, + SSL_OP_CRYPTOPRO_TLSEXT_BUG, + SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS, + SSL_OP_LEGACY_SERVER_CONNECT, + SSL_OP_NO_COMPRESSION, + SSL_OP_NO_ENCRYPT_THEN_MAC, + SSL_OP_NO_QUERY_MTU, + SSL_OP_NO_RENEGOTIATION, + SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION, + SSL_OP_NO_SSLv2, + SSL_OP_NO_SSLv3, + SSL_OP_NO_TICKET, + SSL_OP_NO_TLSv1, + SSL_OP_NO_TLSv1_1, + SSL_OP_NO_TLSv1_2, + SSL_OP_NO_TLSv1_3, + SSL_OP_PRIORITIZE_CHACHA, + SSL_OP_TLS_ROLLBACK_BUG, + ENGINE_METHOD_RSA, + ENGINE_METHOD_DSA, + ENGINE_METHOD_DH, + ENGINE_METHOD_RAND, + ENGINE_METHOD_EC, + ENGINE_METHOD_CIPHERS, + ENGINE_METHOD_DIGESTS, + ENGINE_METHOD_PKEY_METHS, + ENGINE_METHOD_PKEY_ASN1_METHS, + ENGINE_METHOD_ALL, + ENGINE_METHOD_NONE, + DH_CHECK_P_NOT_SAFE_PRIME, + DH_CHECK_P_NOT_PRIME, + DH_UNABLE_TO_CHECK_GENERATOR, + DH_NOT_SUITABLE_GENERATOR, + RSA_PKCS1_PADDING, + RSA_NO_PADDING, + RSA_PKCS1_OAEP_PADDING, + RSA_X931_PADDING, + RSA_PKCS1_PSS_PADDING, + RSA_PSS_SALTLEN_DIGEST, + RSA_PSS_SALTLEN_MAX_SIGN, + RSA_PSS_SALTLEN_AUTO, + defaultCoreCipherList, + TLS1_VERSION, + TLS1_1_VERSION, + TLS1_2_VERSION, + TLS1_3_VERSION, + POINT_CONVERSION_COMPRESSED, + POINT_CONVERSION_UNCOMPRESSED, + POINT_CONVERSION_HYBRID, + defaultCipherList + }; + } +}); + +// ../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.mjs +var workerdCrypto, Certificate, DiffieHellman, DiffieHellmanGroup, Hash, Hmac, KeyObject, X509Certificate, checkPrime, checkPrimeSync, createDiffieHellman, createDiffieHellmanGroup, createHash, createHmac, createPrivateKey, createPublicKey, createSecretKey, generateKey, generateKeyPair, generateKeyPairSync, generateKeySync, generatePrime, generatePrimeSync, getCiphers, getCurves, getDiffieHellman, getFips, getHashes, hkdf, hkdfSync, pbkdf2, pbkdf2Sync, randomBytes, randomFill, randomFillSync, randomInt, randomUUID2, scrypt, scryptSync, secureHeapUsed, setEngine, setFips, subtle2, timingSafeEqual, getRandomValues, webcrypto2, fips, crypto_default; +var init_crypto3 = __esm({ + "../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_crypto2(); + workerdCrypto = process.getBuiltinModule("node:crypto"); + ({ + Certificate, + DiffieHellman, + DiffieHellmanGroup, + Hash, + Hmac, + KeyObject, + X509Certificate, + checkPrime, + checkPrimeSync, + createDiffieHellman, + createDiffieHellmanGroup, + createHash, + createHmac, + createPrivateKey, + createPublicKey, + createSecretKey, + generateKey, + generateKeyPair, + generateKeyPairSync, + generateKeySync, + generatePrime, + generatePrimeSync, + getCiphers, + getCurves, + getDiffieHellman, + getFips, + getHashes, + hkdf, + hkdfSync, + pbkdf2, + pbkdf2Sync, + randomBytes, + randomFill, + randomFillSync, + randomInt, + randomUUID: randomUUID2, + scrypt, + scryptSync, + secureHeapUsed, + setEngine, + setFips, + subtle: subtle2, + timingSafeEqual + } = workerdCrypto); + getRandomValues = workerdCrypto.getRandomValues.bind( + workerdCrypto.webcrypto + ); + webcrypto2 = { + // @ts-expect-error unenv has unknown type + CryptoKey: webcrypto.CryptoKey, + getRandomValues, + randomUUID: randomUUID2, + subtle: subtle2 + }; + fips = workerdCrypto.fips; + crypto_default = { + /** + * manually unroll unenv-polyfilled-symbols to make it tree-shakeable + */ + Certificate, + Cipher, + Cipheriv, + Decipher, + Decipheriv, + ECDH, + Sign, + Verify, + X509Certificate, + // @ts-expect-error @types/node is out of date - this is a bug in typings + constants, + // @ts-expect-error unenv has unknown type + createCipheriv, + // @ts-expect-error unenv has unknown type + createDecipheriv, + // @ts-expect-error unenv has unknown type + createECDH, + // @ts-expect-error unenv has unknown type + createSign, + // @ts-expect-error unenv has unknown type + createVerify, + // @ts-expect-error unenv has unknown type + diffieHellman, + // @ts-expect-error unenv has unknown type + getCipherInfo, + // @ts-expect-error unenv has unknown type + hash: hash2, + // @ts-expect-error unenv has unknown type + privateDecrypt, + // @ts-expect-error unenv has unknown type + privateEncrypt, + // @ts-expect-error unenv has unknown type + publicDecrypt, + // @ts-expect-error unenv has unknown type + publicEncrypt, + scrypt, + scryptSync, + // @ts-expect-error unenv has unknown type + sign: sign2, + // @ts-expect-error unenv has unknown type + verify: verify2, + // default-only export from unenv + // @ts-expect-error unenv has unknown type + createCipher, + // @ts-expect-error unenv has unknown type + createDecipher, + // @ts-expect-error unenv has unknown type + pseudoRandomBytes, + /** + * manually unroll workerd-polyfilled-symbols to make it tree-shakeable + */ + DiffieHellman, + DiffieHellmanGroup, + Hash, + Hmac, + KeyObject, + checkPrime, + checkPrimeSync, + createDiffieHellman, + createDiffieHellmanGroup, + createHash, + createHmac, + createPrivateKey, + createPublicKey, + createSecretKey, + generateKey, + generateKeyPair, + generateKeyPairSync, + generateKeySync, + generatePrime, + generatePrimeSync, + getCiphers, + getCurves, + getDiffieHellman, + getFips, + getHashes, + getRandomValues, + hkdf, + hkdfSync, + pbkdf2, + pbkdf2Sync, + randomBytes, + randomFill, + randomFillSync, + randomInt, + randomUUID: randomUUID2, + secureHeapUsed, + setEngine, + setFips, + subtle: subtle2, + timingSafeEqual, + // default-only export from workerd + fips, + // special-cased deep merged symbols + webcrypto: webcrypto2 + }; + } +}); + +// ../../node_modules/bcryptjs/index.js +function randomBytes2(len) { + try { + return crypto.getRandomValues(new Uint8Array(len)); + } catch { + } + try { + return crypto_default.randomBytes(len); + } catch { + } + if (!randomFallback) { + throw Error( + "Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative" + ); + } + return randomFallback(len); +} +function setRandomFallback(random) { + randomFallback = random; +} +function genSaltSync(rounds, seed_length) { + rounds = rounds || GENSALT_DEFAULT_LOG2_ROUNDS; + if (typeof rounds !== "number") + throw Error( + "Illegal arguments: " + typeof rounds + ", " + typeof seed_length + ); + if (rounds < 4) + rounds = 4; + else if (rounds > 31) + rounds = 31; + var salt = []; + salt.push("$2b$"); + if (rounds < 10) + salt.push("0"); + salt.push(rounds.toString()); + salt.push("$"); + salt.push(base64_encode(randomBytes2(BCRYPT_SALT_LEN), BCRYPT_SALT_LEN)); + return salt.join(""); +} +function genSalt(rounds, seed_length, callback) { + if (typeof seed_length === "function") + callback = seed_length, seed_length = void 0; + if (typeof rounds === "function") + callback = rounds, rounds = void 0; + if (typeof rounds === "undefined") + rounds = GENSALT_DEFAULT_LOG2_ROUNDS; + else if (typeof rounds !== "number") + throw Error("illegal arguments: " + typeof rounds); + function _async(callback2) { + nextTick2(function() { + try { + callback2(null, genSaltSync(rounds)); + } catch (err) { + callback2(err); + } + }); + } + __name(_async, "_async"); + if (callback) { + if (typeof callback !== "function") + throw Error("Illegal callback: " + typeof callback); + _async(callback); + } else + return new Promise(function(resolve, reject) { + _async(function(err, res) { + if (err) { + reject(err); + return; + } + resolve(res); + }); + }); +} +function hashSync(password, salt) { + if (typeof salt === "undefined") + salt = GENSALT_DEFAULT_LOG2_ROUNDS; + if (typeof salt === "number") + salt = genSaltSync(salt); + if (typeof password !== "string" || typeof salt !== "string") + throw Error("Illegal arguments: " + typeof password + ", " + typeof salt); + return _hash(password, salt); +} +function hash3(password, salt, callback, progressCallback) { + function _async(callback2) { + if (typeof password === "string" && typeof salt === "number") + genSalt(salt, function(err, salt2) { + _hash(password, salt2, callback2, progressCallback); + }); + else if (typeof password === "string" && typeof salt === "string") + _hash(password, salt, callback2, progressCallback); + else + nextTick2( + callback2.bind( + this, + Error("Illegal arguments: " + typeof password + ", " + typeof salt) + ) + ); + } + __name(_async, "_async"); + if (callback) { + if (typeof callback !== "function") + throw Error("Illegal callback: " + typeof callback); + _async(callback); + } else + return new Promise(function(resolve, reject) { + _async(function(err, res) { + if (err) { + reject(err); + return; + } + resolve(res); + }); + }); +} +function safeStringCompare(known, unknown2) { + var diff = known.length ^ unknown2.length; + for (var i2 = 0; i2 < known.length; ++i2) { + diff |= known.charCodeAt(i2) ^ unknown2.charCodeAt(i2); + } + return diff === 0; +} +function compareSync(password, hash4) { + if (typeof password !== "string" || typeof hash4 !== "string") + throw Error("Illegal arguments: " + typeof password + ", " + typeof hash4); + if (hash4.length !== 60) + return false; + return safeStringCompare( + hashSync(password, hash4.substring(0, hash4.length - 31)), + hash4 + ); +} +function compare(password, hashValue, callback, progressCallback) { + function _async(callback2) { + if (typeof password !== "string" || typeof hashValue !== "string") { + nextTick2( + callback2.bind( + this, + Error( + "Illegal arguments: " + typeof password + ", " + typeof hashValue + ) + ) + ); + return; + } + if (hashValue.length !== 60) { + nextTick2(callback2.bind(this, null, false)); + return; + } + hash3( + password, + hashValue.substring(0, 29), + function(err, comp) { + if (err) + callback2(err); + else + callback2(null, safeStringCompare(comp, hashValue)); + }, + progressCallback + ); + } + __name(_async, "_async"); + if (callback) { + if (typeof callback !== "function") + throw Error("Illegal callback: " + typeof callback); + _async(callback); + } else + return new Promise(function(resolve, reject) { + _async(function(err, res) { + if (err) { + reject(err); + return; + } + resolve(res); + }); + }); +} +function getRounds(hash4) { + if (typeof hash4 !== "string") + throw Error("Illegal arguments: " + typeof hash4); + return parseInt(hash4.split("$")[2], 10); +} +function getSalt(hash4) { + if (typeof hash4 !== "string") + throw Error("Illegal arguments: " + typeof hash4); + if (hash4.length !== 60) + throw Error("Illegal hash length: " + hash4.length + " != 60"); + return hash4.substring(0, 29); +} +function truncates(password) { + if (typeof password !== "string") + throw Error("Illegal arguments: " + typeof password); + return utf8Length(password) > 72; +} +function utf8Length(string4) { + var len = 0, c2 = 0; + for (var i2 = 0; i2 < string4.length; ++i2) { + c2 = string4.charCodeAt(i2); + if (c2 < 128) + len += 1; + else if (c2 < 2048) + len += 2; + else if ((c2 & 64512) === 55296 && (string4.charCodeAt(i2 + 1) & 64512) === 56320) { + ++i2; + len += 4; + } else + len += 3; + } + return len; +} +function utf8Array(string4) { + var offset = 0, c1, c2; + var buffer = new Array(utf8Length(string4)); + for (var i2 = 0, k2 = string4.length; i2 < k2; ++i2) { + c1 = string4.charCodeAt(i2); + if (c1 < 128) { + buffer[offset++] = c1; + } else if (c1 < 2048) { + buffer[offset++] = c1 >> 6 | 192; + buffer[offset++] = c1 & 63 | 128; + } else if ((c1 & 64512) === 55296 && ((c2 = string4.charCodeAt(i2 + 1)) & 64512) === 56320) { + c1 = 65536 + ((c1 & 1023) << 10) + (c2 & 1023); + ++i2; + buffer[offset++] = c1 >> 18 | 240; + buffer[offset++] = c1 >> 12 & 63 | 128; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } else { + buffer[offset++] = c1 >> 12 | 224; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } + } + return buffer; +} +function base64_encode(b2, len) { + var off2 = 0, rs = [], c1, c2; + if (len <= 0 || len > b2.length) + throw Error("Illegal len: " + len); + while (off2 < len) { + c1 = b2[off2++] & 255; + rs.push(BASE64_CODE[c1 >> 2 & 63]); + c1 = (c1 & 3) << 4; + if (off2 >= len) { + rs.push(BASE64_CODE[c1 & 63]); + break; + } + c2 = b2[off2++] & 255; + c1 |= c2 >> 4 & 15; + rs.push(BASE64_CODE[c1 & 63]); + c1 = (c2 & 15) << 2; + if (off2 >= len) { + rs.push(BASE64_CODE[c1 & 63]); + break; + } + c2 = b2[off2++] & 255; + c1 |= c2 >> 6 & 3; + rs.push(BASE64_CODE[c1 & 63]); + rs.push(BASE64_CODE[c2 & 63]); + } + return rs.join(""); +} +function base64_decode(s2, len) { + var off2 = 0, slen = s2.length, olen = 0, rs = [], c1, c2, c3, c4, o2, code; + if (len <= 0) + throw Error("Illegal len: " + len); + while (off2 < slen - 1 && olen < len) { + code = s2.charCodeAt(off2++); + c1 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + code = s2.charCodeAt(off2++); + c2 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + if (c1 == -1 || c2 == -1) + break; + o2 = c1 << 2 >>> 0; + o2 |= (c2 & 48) >> 4; + rs.push(String.fromCharCode(o2)); + if (++olen >= len || off2 >= slen) + break; + code = s2.charCodeAt(off2++); + c3 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + if (c3 == -1) + break; + o2 = (c2 & 15) << 4 >>> 0; + o2 |= (c3 & 60) >> 2; + rs.push(String.fromCharCode(o2)); + if (++olen >= len || off2 >= slen) + break; + code = s2.charCodeAt(off2++); + c4 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + o2 = (c3 & 3) << 6 >>> 0; + o2 |= c4; + rs.push(String.fromCharCode(o2)); + ++olen; + } + var res = []; + for (off2 = 0; off2 < olen; off2++) + res.push(rs[off2].charCodeAt(0)); + return res; +} +function _encipher(lr, off2, P2, S2) { + var n2, l2 = lr[off2], r2 = lr[off2 + 1]; + l2 ^= P2[0]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[1]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[2]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[3]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[4]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[5]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[6]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[7]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[8]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[9]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[10]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[11]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[12]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[13]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[14]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[15]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[16]; + lr[off2] = r2 ^ P2[BLOWFISH_NUM_ROUNDS + 1]; + lr[off2 + 1] = l2; + return lr; +} +function _streamtoword(data, offp) { + for (var i2 = 0, word = 0; i2 < 4; ++i2) + word = word << 8 | data[offp] & 255, offp = (offp + 1) % data.length; + return { key: word, offp }; +} +function _key(key, P2, S2) { + var offset = 0, lr = [0, 0], plen = P2.length, slen = S2.length, sw; + for (var i2 = 0; i2 < plen; i2++) + sw = _streamtoword(key, offset), offset = sw.offp, P2[i2] = P2[i2] ^ sw.key; + for (i2 = 0; i2 < plen; i2 += 2) + lr = _encipher(lr, 0, P2, S2), P2[i2] = lr[0], P2[i2 + 1] = lr[1]; + for (i2 = 0; i2 < slen; i2 += 2) + lr = _encipher(lr, 0, P2, S2), S2[i2] = lr[0], S2[i2 + 1] = lr[1]; +} +function _ekskey(data, key, P2, S2) { + var offp = 0, lr = [0, 0], plen = P2.length, slen = S2.length, sw; + for (var i2 = 0; i2 < plen; i2++) + sw = _streamtoword(key, offp), offp = sw.offp, P2[i2] = P2[i2] ^ sw.key; + offp = 0; + for (i2 = 0; i2 < plen; i2 += 2) + sw = _streamtoword(data, offp), offp = sw.offp, lr[0] ^= sw.key, sw = _streamtoword(data, offp), offp = sw.offp, lr[1] ^= sw.key, lr = _encipher(lr, 0, P2, S2), P2[i2] = lr[0], P2[i2 + 1] = lr[1]; + for (i2 = 0; i2 < slen; i2 += 2) + sw = _streamtoword(data, offp), offp = sw.offp, lr[0] ^= sw.key, sw = _streamtoword(data, offp), offp = sw.offp, lr[1] ^= sw.key, lr = _encipher(lr, 0, P2, S2), S2[i2] = lr[0], S2[i2 + 1] = lr[1]; +} +function _crypt(b2, salt, rounds, callback, progressCallback) { + var cdata = C_ORIG.slice(), clen = cdata.length, err; + if (rounds < 4 || rounds > 31) { + err = Error("Illegal number of rounds (4-31): " + rounds); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + if (salt.length !== BCRYPT_SALT_LEN) { + err = Error( + "Illegal salt length: " + salt.length + " != " + BCRYPT_SALT_LEN + ); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + rounds = 1 << rounds >>> 0; + var P2, S2, i2 = 0, j2; + if (typeof Int32Array === "function") { + P2 = new Int32Array(P_ORIG); + S2 = new Int32Array(S_ORIG); + } else { + P2 = P_ORIG.slice(); + S2 = S_ORIG.slice(); + } + _ekskey(salt, b2, P2, S2); + function next() { + if (progressCallback) + progressCallback(i2 / rounds); + if (i2 < rounds) { + var start = Date.now(); + for (; i2 < rounds; ) { + i2 = i2 + 1; + _key(b2, P2, S2); + _key(salt, P2, S2); + if (Date.now() - start > MAX_EXECUTION_TIME) + break; + } + } else { + for (i2 = 0; i2 < 64; i2++) + for (j2 = 0; j2 < clen >> 1; j2++) + _encipher(cdata, j2 << 1, P2, S2); + var ret = []; + for (i2 = 0; i2 < clen; i2++) + ret.push((cdata[i2] >> 24 & 255) >>> 0), ret.push((cdata[i2] >> 16 & 255) >>> 0), ret.push((cdata[i2] >> 8 & 255) >>> 0), ret.push((cdata[i2] & 255) >>> 0); + if (callback) { + callback(null, ret); + return; + } else + return ret; + } + if (callback) + nextTick2(next); + } + __name(next, "next"); + if (typeof callback !== "undefined") { + next(); + } else { + var res; + while (true) + if (typeof (res = next()) !== "undefined") + return res || []; + } +} +function _hash(password, salt, callback, progressCallback) { + var err; + if (typeof password !== "string" || typeof salt !== "string") { + err = Error("Invalid string / salt: Not a string"); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + var minor, offset; + if (salt.charAt(0) !== "$" || salt.charAt(1) !== "2") { + err = Error("Invalid salt version: " + salt.substring(0, 2)); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + if (salt.charAt(2) === "$") + minor = String.fromCharCode(0), offset = 3; + else { + minor = salt.charAt(2); + if (minor !== "a" && minor !== "b" && minor !== "y" || salt.charAt(3) !== "$") { + err = Error("Invalid salt revision: " + salt.substring(2, 4)); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + offset = 4; + } + if (salt.charAt(offset + 2) > "$") { + err = Error("Missing salt rounds"); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + var r1 = parseInt(salt.substring(offset, offset + 1), 10) * 10, r2 = parseInt(salt.substring(offset + 1, offset + 2), 10), rounds = r1 + r2, real_salt = salt.substring(offset + 3, offset + 25); + password += minor >= "a" ? "\0" : ""; + var passwordb = utf8Array(password), saltb = base64_decode(real_salt, BCRYPT_SALT_LEN); + function finish(bytes) { + var res = []; + res.push("$2"); + if (minor >= "a") + res.push(minor); + res.push("$"); + if (rounds < 10) + res.push("0"); + res.push(rounds.toString()); + res.push("$"); + res.push(base64_encode(saltb, saltb.length)); + res.push(base64_encode(bytes, C_ORIG.length * 4 - 1)); + return res.join(""); + } + __name(finish, "finish"); + if (typeof callback == "undefined") + return finish(_crypt(passwordb, saltb, rounds)); + else { + _crypt( + passwordb, + saltb, + rounds, + function(err2, bytes) { + if (err2) + callback(err2, null); + else + callback(null, finish(bytes)); + }, + progressCallback + ); + } +} +function encodeBase642(bytes, length) { + return base64_encode(bytes, length); +} +function decodeBase642(string4, length) { + return base64_decode(string4, length); +} +var randomFallback, nextTick2, BASE64_CODE, BASE64_INDEX, BCRYPT_SALT_LEN, GENSALT_DEFAULT_LOG2_ROUNDS, BLOWFISH_NUM_ROUNDS, MAX_EXECUTION_TIME, P_ORIG, S_ORIG, C_ORIG, bcryptjs_default; +var init_bcryptjs = __esm({ + "../../node_modules/bcryptjs/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_crypto3(); + randomFallback = null; + __name(randomBytes2, "randomBytes"); + __name(setRandomFallback, "setRandomFallback"); + __name(genSaltSync, "genSaltSync"); + __name(genSalt, "genSalt"); + __name(hashSync, "hashSync"); + __name(hash3, "hash"); + __name(safeStringCompare, "safeStringCompare"); + __name(compareSync, "compareSync"); + __name(compare, "compare"); + __name(getRounds, "getRounds"); + __name(getSalt, "getSalt"); + __name(truncates, "truncates"); + nextTick2 = typeof setImmediate === "function" ? setImmediate : typeof scheduler === "object" && typeof scheduler.postTask === "function" ? scheduler.postTask.bind(scheduler) : setTimeout; + __name(utf8Length, "utf8Length"); + __name(utf8Array, "utf8Array"); + BASE64_CODE = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""); + BASE64_INDEX = [ + -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, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + -1, + -1, + -1, + -1, + -1, + -1, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + -1, + -1, + -1, + -1, + -1 + ]; + __name(base64_encode, "base64_encode"); + __name(base64_decode, "base64_decode"); + BCRYPT_SALT_LEN = 16; + GENSALT_DEFAULT_LOG2_ROUNDS = 10; + BLOWFISH_NUM_ROUNDS = 16; + MAX_EXECUTION_TIME = 100; + P_ORIG = [ + 608135816, + 2242054355, + 320440878, + 57701188, + 2752067618, + 698298832, + 137296536, + 3964562569, + 1160258022, + 953160567, + 3193202383, + 887688300, + 3232508343, + 3380367581, + 1065670069, + 3041331479, + 2450970073, + 2306472731 + ]; + S_ORIG = [ + 3509652390, + 2564797868, + 805139163, + 3491422135, + 3101798381, + 1780907670, + 3128725573, + 4046225305, + 614570311, + 3012652279, + 134345442, + 2240740374, + 1667834072, + 1901547113, + 2757295779, + 4103290238, + 227898511, + 1921955416, + 1904987480, + 2182433518, + 2069144605, + 3260701109, + 2620446009, + 720527379, + 3318853667, + 677414384, + 3393288472, + 3101374703, + 2390351024, + 1614419982, + 1822297739, + 2954791486, + 3608508353, + 3174124327, + 2024746970, + 1432378464, + 3864339955, + 2857741204, + 1464375394, + 1676153920, + 1439316330, + 715854006, + 3033291828, + 289532110, + 2706671279, + 2087905683, + 3018724369, + 1668267050, + 732546397, + 1947742710, + 3462151702, + 2609353502, + 2950085171, + 1814351708, + 2050118529, + 680887927, + 999245976, + 1800124847, + 3300911131, + 1713906067, + 1641548236, + 4213287313, + 1216130144, + 1575780402, + 4018429277, + 3917837745, + 3693486850, + 3949271944, + 596196993, + 3549867205, + 258830323, + 2213823033, + 772490370, + 2760122372, + 1774776394, + 2652871518, + 566650946, + 4142492826, + 1728879713, + 2882767088, + 1783734482, + 3629395816, + 2517608232, + 2874225571, + 1861159788, + 326777828, + 3124490320, + 2130389656, + 2716951837, + 967770486, + 1724537150, + 2185432712, + 2364442137, + 1164943284, + 2105845187, + 998989502, + 3765401048, + 2244026483, + 1075463327, + 1455516326, + 1322494562, + 910128902, + 469688178, + 1117454909, + 936433444, + 3490320968, + 3675253459, + 1240580251, + 122909385, + 2157517691, + 634681816, + 4142456567, + 3825094682, + 3061402683, + 2540495037, + 79693498, + 3249098678, + 1084186820, + 1583128258, + 426386531, + 1761308591, + 1047286709, + 322548459, + 995290223, + 1845252383, + 2603652396, + 3431023940, + 2942221577, + 3202600964, + 3727903485, + 1712269319, + 422464435, + 3234572375, + 1170764815, + 3523960633, + 3117677531, + 1434042557, + 442511882, + 3600875718, + 1076654713, + 1738483198, + 4213154764, + 2393238008, + 3677496056, + 1014306527, + 4251020053, + 793779912, + 2902807211, + 842905082, + 4246964064, + 1395751752, + 1040244610, + 2656851899, + 3396308128, + 445077038, + 3742853595, + 3577915638, + 679411651, + 2892444358, + 2354009459, + 1767581616, + 3150600392, + 3791627101, + 3102740896, + 284835224, + 4246832056, + 1258075500, + 768725851, + 2589189241, + 3069724005, + 3532540348, + 1274779536, + 3789419226, + 2764799539, + 1660621633, + 3471099624, + 4011903706, + 913787905, + 3497959166, + 737222580, + 2514213453, + 2928710040, + 3937242737, + 1804850592, + 3499020752, + 2949064160, + 2386320175, + 2390070455, + 2415321851, + 4061277028, + 2290661394, + 2416832540, + 1336762016, + 1754252060, + 3520065937, + 3014181293, + 791618072, + 3188594551, + 3933548030, + 2332172193, + 3852520463, + 3043980520, + 413987798, + 3465142937, + 3030929376, + 4245938359, + 2093235073, + 3534596313, + 375366246, + 2157278981, + 2479649556, + 555357303, + 3870105701, + 2008414854, + 3344188149, + 4221384143, + 3956125452, + 2067696032, + 3594591187, + 2921233993, + 2428461, + 544322398, + 577241275, + 1471733935, + 610547355, + 4027169054, + 1432588573, + 1507829418, + 2025931657, + 3646575487, + 545086370, + 48609733, + 2200306550, + 1653985193, + 298326376, + 1316178497, + 3007786442, + 2064951626, + 458293330, + 2589141269, + 3591329599, + 3164325604, + 727753846, + 2179363840, + 146436021, + 1461446943, + 4069977195, + 705550613, + 3059967265, + 3887724982, + 4281599278, + 3313849956, + 1404054877, + 2845806497, + 146425753, + 1854211946, + 1266315497, + 3048417604, + 3681880366, + 3289982499, + 290971e4, + 1235738493, + 2632868024, + 2414719590, + 3970600049, + 1771706367, + 1449415276, + 3266420449, + 422970021, + 1963543593, + 2690192192, + 3826793022, + 1062508698, + 1531092325, + 1804592342, + 2583117782, + 2714934279, + 4024971509, + 1294809318, + 4028980673, + 1289560198, + 2221992742, + 1669523910, + 35572830, + 157838143, + 1052438473, + 1016535060, + 1802137761, + 1753167236, + 1386275462, + 3080475397, + 2857371447, + 1040679964, + 2145300060, + 2390574316, + 1461121720, + 2956646967, + 4031777805, + 4028374788, + 33600511, + 2920084762, + 1018524850, + 629373528, + 3691585981, + 3515945977, + 2091462646, + 2486323059, + 586499841, + 988145025, + 935516892, + 3367335476, + 2599673255, + 2839830854, + 265290510, + 3972581182, + 2759138881, + 3795373465, + 1005194799, + 847297441, + 406762289, + 1314163512, + 1332590856, + 1866599683, + 4127851711, + 750260880, + 613907577, + 1450815602, + 3165620655, + 3734664991, + 3650291728, + 3012275730, + 3704569646, + 1427272223, + 778793252, + 1343938022, + 2676280711, + 2052605720, + 1946737175, + 3164576444, + 3914038668, + 3967478842, + 3682934266, + 1661551462, + 3294938066, + 4011595847, + 840292616, + 3712170807, + 616741398, + 312560963, + 711312465, + 1351876610, + 322626781, + 1910503582, + 271666773, + 2175563734, + 1594956187, + 70604529, + 3617834859, + 1007753275, + 1495573769, + 4069517037, + 2549218298, + 2663038764, + 504708206, + 2263041392, + 3941167025, + 2249088522, + 1514023603, + 1998579484, + 1312622330, + 694541497, + 2582060303, + 2151582166, + 1382467621, + 776784248, + 2618340202, + 3323268794, + 2497899128, + 2784771155, + 503983604, + 4076293799, + 907881277, + 423175695, + 432175456, + 1378068232, + 4145222326, + 3954048622, + 3938656102, + 3820766613, + 2793130115, + 2977904593, + 26017576, + 3274890735, + 3194772133, + 1700274565, + 1756076034, + 4006520079, + 3677328699, + 720338349, + 1533947780, + 354530856, + 688349552, + 3973924725, + 1637815568, + 332179504, + 3949051286, + 53804574, + 2852348879, + 3044236432, + 1282449977, + 3583942155, + 3416972820, + 4006381244, + 1617046695, + 2628476075, + 3002303598, + 1686838959, + 431878346, + 2686675385, + 1700445008, + 1080580658, + 1009431731, + 832498133, + 3223435511, + 2605976345, + 2271191193, + 2516031870, + 1648197032, + 4164389018, + 2548247927, + 300782431, + 375919233, + 238389289, + 3353747414, + 2531188641, + 2019080857, + 1475708069, + 455242339, + 2609103871, + 448939670, + 3451063019, + 1395535956, + 2413381860, + 1841049896, + 1491858159, + 885456874, + 4264095073, + 4001119347, + 1565136089, + 3898914787, + 1108368660, + 540939232, + 1173283510, + 2745871338, + 3681308437, + 4207628240, + 3343053890, + 4016749493, + 1699691293, + 1103962373, + 3625875870, + 2256883143, + 3830138730, + 1031889488, + 3479347698, + 1535977030, + 4236805024, + 3251091107, + 2132092099, + 1774941330, + 1199868427, + 1452454533, + 157007616, + 2904115357, + 342012276, + 595725824, + 1480756522, + 206960106, + 497939518, + 591360097, + 863170706, + 2375253569, + 3596610801, + 1814182875, + 2094937945, + 3421402208, + 1082520231, + 3463918190, + 2785509508, + 435703966, + 3908032597, + 1641649973, + 2842273706, + 3305899714, + 1510255612, + 2148256476, + 2655287854, + 3276092548, + 4258621189, + 236887753, + 3681803219, + 274041037, + 1734335097, + 3815195456, + 3317970021, + 1899903192, + 1026095262, + 4050517792, + 356393447, + 2410691914, + 3873677099, + 3682840055, + 3913112168, + 2491498743, + 4132185628, + 2489919796, + 1091903735, + 1979897079, + 3170134830, + 3567386728, + 3557303409, + 857797738, + 1136121015, + 1342202287, + 507115054, + 2535736646, + 337727348, + 3213592640, + 1301675037, + 2528481711, + 1895095763, + 1721773893, + 3216771564, + 62756741, + 2142006736, + 835421444, + 2531993523, + 1442658625, + 3659876326, + 2882144922, + 676362277, + 1392781812, + 170690266, + 3921047035, + 1759253602, + 3611846912, + 1745797284, + 664899054, + 1329594018, + 3901205900, + 3045908486, + 2062866102, + 2865634940, + 3543621612, + 3464012697, + 1080764994, + 553557557, + 3656615353, + 3996768171, + 991055499, + 499776247, + 1265440854, + 648242737, + 3940784050, + 980351604, + 3713745714, + 1749149687, + 3396870395, + 4211799374, + 3640570775, + 1161844396, + 3125318951, + 1431517754, + 545492359, + 4268468663, + 3499529547, + 1437099964, + 2702547544, + 3433638243, + 2581715763, + 2787789398, + 1060185593, + 1593081372, + 2418618748, + 4260947970, + 69676912, + 2159744348, + 86519011, + 2512459080, + 3838209314, + 1220612927, + 3339683548, + 133810670, + 1090789135, + 1078426020, + 1569222167, + 845107691, + 3583754449, + 4072456591, + 1091646820, + 628848692, + 1613405280, + 3757631651, + 526609435, + 236106946, + 48312990, + 2942717905, + 3402727701, + 1797494240, + 859738849, + 992217954, + 4005476642, + 2243076622, + 3870952857, + 3732016268, + 765654824, + 3490871365, + 2511836413, + 1685915746, + 3888969200, + 1414112111, + 2273134842, + 3281911079, + 4080962846, + 172450625, + 2569994100, + 980381355, + 4109958455, + 2819808352, + 2716589560, + 2568741196, + 3681446669, + 3329971472, + 1835478071, + 660984891, + 3704678404, + 4045999559, + 3422617507, + 3040415634, + 1762651403, + 1719377915, + 3470491036, + 2693910283, + 3642056355, + 3138596744, + 1364962596, + 2073328063, + 1983633131, + 926494387, + 3423689081, + 2150032023, + 4096667949, + 1749200295, + 3328846651, + 309677260, + 2016342300, + 1779581495, + 3079819751, + 111262694, + 1274766160, + 443224088, + 298511866, + 1025883608, + 3806446537, + 1145181785, + 168956806, + 3641502830, + 3584813610, + 1689216846, + 3666258015, + 3200248200, + 1692713982, + 2646376535, + 4042768518, + 1618508792, + 1610833997, + 3523052358, + 4130873264, + 2001055236, + 3610705100, + 2202168115, + 4028541809, + 2961195399, + 1006657119, + 2006996926, + 3186142756, + 1430667929, + 3210227297, + 1314452623, + 4074634658, + 4101304120, + 2273951170, + 1399257539, + 3367210612, + 3027628629, + 1190975929, + 2062231137, + 2333990788, + 2221543033, + 2438960610, + 1181637006, + 548689776, + 2362791313, + 3372408396, + 3104550113, + 3145860560, + 296247880, + 1970579870, + 3078560182, + 3769228297, + 1714227617, + 3291629107, + 3898220290, + 166772364, + 1251581989, + 493813264, + 448347421, + 195405023, + 2709975567, + 677966185, + 3703036547, + 1463355134, + 2715995803, + 1338867538, + 1343315457, + 2802222074, + 2684532164, + 233230375, + 2599980071, + 2000651841, + 3277868038, + 1638401717, + 4028070440, + 3237316320, + 6314154, + 819756386, + 300326615, + 590932579, + 1405279636, + 3267499572, + 3150704214, + 2428286686, + 3959192993, + 3461946742, + 1862657033, + 1266418056, + 963775037, + 2089974820, + 2263052895, + 1917689273, + 448879540, + 3550394620, + 3981727096, + 150775221, + 3627908307, + 1303187396, + 508620638, + 2975983352, + 2726630617, + 1817252668, + 1876281319, + 1457606340, + 908771278, + 3720792119, + 3617206836, + 2455994898, + 1729034894, + 1080033504, + 976866871, + 3556439503, + 2881648439, + 1522871579, + 1555064734, + 1336096578, + 3548522304, + 2579274686, + 3574697629, + 3205460757, + 3593280638, + 3338716283, + 3079412587, + 564236357, + 2993598910, + 1781952180, + 1464380207, + 3163844217, + 3332601554, + 1699332808, + 1393555694, + 1183702653, + 3581086237, + 1288719814, + 691649499, + 2847557200, + 2895455976, + 3193889540, + 2717570544, + 1781354906, + 1676643554, + 2592534050, + 3230253752, + 1126444790, + 2770207658, + 2633158820, + 2210423226, + 2615765581, + 2414155088, + 3127139286, + 673620729, + 2805611233, + 1269405062, + 4015350505, + 3341807571, + 4149409754, + 1057255273, + 2012875353, + 2162469141, + 2276492801, + 2601117357, + 993977747, + 3918593370, + 2654263191, + 753973209, + 36408145, + 2530585658, + 25011837, + 3520020182, + 2088578344, + 530523599, + 2918365339, + 1524020338, + 1518925132, + 3760827505, + 3759777254, + 1202760957, + 3985898139, + 3906192525, + 674977740, + 4174734889, + 2031300136, + 2019492241, + 3983892565, + 4153806404, + 3822280332, + 352677332, + 2297720250, + 60907813, + 90501309, + 3286998549, + 1016092578, + 2535922412, + 2839152426, + 457141659, + 509813237, + 4120667899, + 652014361, + 1966332200, + 2975202805, + 55981186, + 2327461051, + 676427537, + 3255491064, + 2882294119, + 3433927263, + 1307055953, + 942726286, + 933058658, + 2468411793, + 3933900994, + 4215176142, + 1361170020, + 2001714738, + 2830558078, + 3274259782, + 1222529897, + 1679025792, + 2729314320, + 3714953764, + 1770335741, + 151462246, + 3013232138, + 1682292957, + 1483529935, + 471910574, + 1539241949, + 458788160, + 3436315007, + 1807016891, + 3718408830, + 978976581, + 1043663428, + 3165965781, + 1927990952, + 4200891579, + 2372276910, + 3208408903, + 3533431907, + 1412390302, + 2931980059, + 4132332400, + 1947078029, + 3881505623, + 4168226417, + 2941484381, + 1077988104, + 1320477388, + 886195818, + 18198404, + 3786409e3, + 2509781533, + 112762804, + 3463356488, + 1866414978, + 891333506, + 18488651, + 661792760, + 1628790961, + 3885187036, + 3141171499, + 876946877, + 2693282273, + 1372485963, + 791857591, + 2686433993, + 3759982718, + 3167212022, + 3472953795, + 2716379847, + 445679433, + 3561995674, + 3504004811, + 3574258232, + 54117162, + 3331405415, + 2381918588, + 3769707343, + 4154350007, + 1140177722, + 4074052095, + 668550556, + 3214352940, + 367459370, + 261225585, + 2610173221, + 4209349473, + 3468074219, + 3265815641, + 314222801, + 3066103646, + 3808782860, + 282218597, + 3406013506, + 3773591054, + 379116347, + 1285071038, + 846784868, + 2669647154, + 3771962079, + 3550491691, + 2305946142, + 453669953, + 1268987020, + 3317592352, + 3279303384, + 3744833421, + 2610507566, + 3859509063, + 266596637, + 3847019092, + 517658769, + 3462560207, + 3443424879, + 370717030, + 4247526661, + 2224018117, + 4143653529, + 4112773975, + 2788324899, + 2477274417, + 1456262402, + 2901442914, + 1517677493, + 1846949527, + 2295493580, + 3734397586, + 2176403920, + 1280348187, + 1908823572, + 3871786941, + 846861322, + 1172426758, + 3287448474, + 3383383037, + 1655181056, + 3139813346, + 901632758, + 1897031941, + 2986607138, + 3066810236, + 3447102507, + 1393639104, + 373351379, + 950779232, + 625454576, + 3124240540, + 4148612726, + 2007998917, + 544563296, + 2244738638, + 2330496472, + 2058025392, + 1291430526, + 424198748, + 50039436, + 29584100, + 3605783033, + 2429876329, + 2791104160, + 1057563949, + 3255363231, + 3075367218, + 3463963227, + 1469046755, + 985887462 + ]; + C_ORIG = [ + 1332899944, + 1700884034, + 1701343084, + 1684370003, + 1668446532, + 1869963892 + ]; + __name(_encipher, "_encipher"); + __name(_streamtoword, "_streamtoword"); + __name(_key, "_key"); + __name(_ekskey, "_ekskey"); + __name(_crypt, "_crypt"); + __name(_hash, "_hash"); + __name(encodeBase642, "encodeBase64"); + __name(decodeBase642, "decodeBase64"); + bcryptjs_default = { + setRandomFallback, + genSaltSync, + genSalt, + hashSync, + hash: hash3, + compareSync, + compare, + getRounds, + getSalt, + truncates, + encodeBase64: encodeBase642, + decodeBase64: decodeBase642 + }; + } +}); + +// src/trpc/apis/admin-apis/apis/staff-user.ts +var staffUserRouter; +var init_staff_user2 = __esm({ + "src/trpc/apis/admin-apis/apis/staff-user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_bcryptjs(); + init_webapi(); + init_env_exporter(); + init_api_error(); + init_dbService(); + staffUserRouter = router2({ + login: publicProcedure.input(external_exports.object({ + name: external_exports.string(), + password: external_exports.string() + })).mutation(async ({ input }) => { + const { name, password } = input; + if (!name || !password) { + throw new ApiError("Name and password are required", 400); + } + const staff = await getStaffUserByName(name); + if (!staff) { + throw new ApiError("Invalid credentials", 401); + } + const isPasswordValid = await bcryptjs_default.compare(password, staff.password); + if (!isPasswordValid) { + throw new ApiError("Invalid credentials", 401); + } + const token = await new SignJWT({ staffId: staff.id, name: staff.name }).setProtectedHeader({ alg: "HS256" }).setExpirationTime("30d").sign(getEncodedJwtSecret()); + return { + message: "Login successful", + token, + staff: { id: staff.id, name: staff.name } + }; + }), + getStaff: protectedProcedure.query(async ({ ctx }) => { + const staff = await getAllStaff(); + const transformedStaff = staff.map((user) => ({ + id: user.id, + name: user.name, + role: user.role ? { + id: user.role.id, + name: user.role.roleName + } : null, + permissions: user.role?.rolePermissions.map((rp) => ({ + id: rp.permission.id, + name: rp.permission.permissionName + })) || [] + })); + return { + staff: transformedStaff + }; + }), + getUsers: protectedProcedure.input(external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(20), + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { cursor, limit, search } = input; + const { users: usersToReturn, hasMore } = await getAllUsers(cursor, limit, search); + const formattedUsers = usersToReturn.map((user) => ({ + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile, + image: user.userDetails?.profileImage || null + })); + return { + users: formattedUsers, + nextCursor: hasMore ? usersToReturn[usersToReturn.length - 1].id : void 0 + }; + }), + getUserDetails: protectedProcedure.input(external_exports.object({ userId: external_exports.number() })).query(async ({ input }) => { + const { userId } = input; + const user = await getUserWithDetails(userId); + if (!user) { + throw new ApiError("User not found", 404); + } + const lastOrder = user.orders[0]; + return { + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile, + addedOn: user.createdAt, + lastOrdered: lastOrder?.createdAt || null, + isSuspended: user.userDetails?.isSuspended || false + }; + }), + updateUserSuspension: protectedProcedure.input(external_exports.object({ userId: external_exports.number(), isSuspended: external_exports.boolean() })).mutation(async ({ input }) => { + const { userId, isSuspended } = input; + await upsertUserSuspension(userId, isSuspended); + return { success: true }; + }), + createStaffUser: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + password: external_exports.string().min(6, "Password must be at least 6 characters"), + roleId: external_exports.number().int().positive("Role is required") + })).mutation(async ({ input, ctx }) => { + const { name, password, roleId } = input; + const existingUser = await checkStaffUserExists(name); + if (existingUser) { + throw new ApiError("Staff user with this name already exists", 409); + } + const roleExists = await checkStaffRoleExists(roleId); + if (!roleExists) { + throw new ApiError("Invalid role selected", 400); + } + const hashedPassword = await bcryptjs_default.hash(password, 12); + const newUser = await createStaffUser(name, hashedPassword, roleId); + return { success: true, user: { id: newUser.id, name: newUser.name } }; + }), + getRoles: protectedProcedure.query(async ({ ctx }) => { + const roles = await getAllRoles(); + return { + roles: roles.map((role) => ({ + id: role.id, + name: role.roleName + })) + }; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/store.ts +var storeRouter; +var init_store2 = __esm({ + "src/trpc/apis/admin-apis/apis/store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_s3_client(); + init_store_initializer(); + init_dbService(); + storeRouter = router2({ + getStores: protectedProcedure.query(async ({ ctx }) => { + const stores = await getAllStores(); + await Promise.all(stores.map(async (store) => { + if (store.imageUrl) + store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl); + })).catch((e2) => { + throw new ApiError("Unable to find store image urls"); + }); + return { + stores, + count: stores.length + }; + }), + getStoreById: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).query(async ({ input, ctx }) => { + const { id } = input; + const store = await getStoreById(id); + if (!store) { + throw new ApiError("Store not found", 404); + } + store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl); + return { + store + }; + }), + createStore: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + description: external_exports.string().optional(), + imageUrl: external_exports.string().optional(), + owner: external_exports.number().min(1, "Owner is required"), + products: external_exports.array(external_exports.number()).optional() + })).mutation(async ({ input, ctx }) => { + const { name, description, imageUrl, owner, products } = input; + const imageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : void 0; + const newStore = await createStore( + { + name, + description, + imageUrl: imageKey, + owner + }, + products + ); + scheduleStoreInitialization(); + return { + store: newStore, + message: "Store created successfully" + }; + }), + updateStore: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + name: external_exports.string().min(1, "Name is required"), + description: external_exports.string().optional(), + imageUrl: external_exports.string().optional(), + owner: external_exports.number().min(1, "Owner is required"), + products: external_exports.array(external_exports.number()).optional() + })).mutation(async ({ input, ctx }) => { + const { id, name, description, imageUrl, owner, products } = input; + const existingStore = await getStoreById(id); + if (!existingStore) { + throw new ApiError("Store not found", 404); + } + const oldImageKey = existingStore.imageUrl; + const newImageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : oldImageKey; + if (oldImageKey && (newImageKey && newImageKey !== oldImageKey || !newImageKey)) { + try { + await deleteImageUtil({ keys: [oldImageKey] }); + } catch (error50) { + console.error("Failed to delete old image:", error50); + } + } + const updatedStore = await updateStore( + id, + { + name, + description, + imageUrl: newImageKey, + owner + }, + products + ); + scheduleStoreInitialization(); + return { + store: updatedStore, + message: "Store updated successfully" + }; + }), + deleteStore: protectedProcedure.input(external_exports.object({ + storeId: external_exports.number() + })).mutation(async ({ input, ctx }) => { + const { storeId } = input; + const result = await deleteStore(storeId); + scheduleStoreInitialization(); + return result; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/payments.ts +var initiateRefundSchema, adminPaymentsRouter; +var init_payments2 = __esm({ + "src/trpc/apis/admin-apis/apis/payments.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + initiateRefundSchema = external_exports.object({ + orderId: external_exports.number(), + refundPercent: external_exports.number().min(0).max(100).optional(), + refundAmount: external_exports.number().min(0).optional() + }).refine( + (data) => { + const hasPercent = data.refundPercent !== void 0; + const hasAmount = data.refundAmount !== void 0; + return hasPercent && !hasAmount || !hasPercent && hasAmount; + }, + { + message: "Provide either refundPercent or refundAmount, not both or neither" + } + ); + adminPaymentsRouter = router2({ + initiateRefund: protectedProcedure.input(initiateRefundSchema).mutation(async ({ input }) => { + return {}; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/banner.ts +var bannerRouter2; +var init_banner2 = __esm({ + "src/trpc/apis/admin-apis/apis/banner.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_zod(); + init_trpc_index(); + init_s3_client(); + init_api_error(); + init_store_initializer(); + init_dbService(); + bannerRouter2 = router2({ + // Get all banners + getBanners: protectedProcedure.query(async () => { + try { + const banners = await getBanners(); + const bannersWithSignedUrls = await Promise.all( + banners.map(async (banner) => { + try { + return { + ...banner, + imageUrl: banner.imageUrl ? await generateSignedUrlFromS3Url(banner.imageUrl) : banner.imageUrl, + // Ensure productIds is always an array + productIds: banner.productIds || [] + }; + } catch (error50) { + console.error(`Failed to generate signed URL for banner ${banner.id}:`, error50); + return { + ...banner, + imageUrl: banner.imageUrl, + // Keep original on error + // Ensure productIds is always an array + productIds: banner.productIds || [] + }; + } + }) + ); + return { + banners: bannersWithSignedUrls + }; + } catch (e2) { + console.log(e2); + throw new ApiError(e2.message); + } + }), + // Get single banner by ID + getBanner: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).query(async ({ input }) => { + const banner = await getBannerById(input.id); + if (banner) { + try { + if (banner.imageUrl) { + banner.imageUrl = await generateSignedUrlFromS3Url(banner.imageUrl); + } + } catch (error50) { + console.error(`Failed to generate signed URL for banner ${banner.id}:`, error50); + } + if (!banner.productIds) { + banner.productIds = []; + } + } + return banner; + }), + // Create new banner + createBanner: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1), + imageUrl: external_exports.string().url(), + description: external_exports.string().optional(), + productIds: external_exports.array(external_exports.number()).optional(), + redirectUrl: external_exports.string().url().optional() + // serialNum removed completely + })).mutation(async ({ input }) => { + try { + const imageUrl = extractKeyFromPresignedUrl(input.imageUrl); + const banner = await createBanner({ + name: input.name, + imageUrl, + description: input.description ?? null, + productIds: input.productIds || [], + redirectUrl: input.redirectUrl ?? null, + serialNum: 999, + // Default value, not used + isActive: false + // Default to inactive + }); + scheduleStoreInitialization(); + return banner; + } catch (error50) { + console.error("Error creating banner:", error50); + throw error50; + } + }), + // Update banner + updateBanner: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + name: external_exports.string().min(1).optional(), + imageUrl: external_exports.string().url().optional(), + description: external_exports.string().optional(), + productIds: external_exports.array(external_exports.number()).optional(), + redirectUrl: external_exports.string().url().optional(), + serialNum: external_exports.number().nullable().optional(), + isActive: external_exports.boolean().optional() + })).mutation(async ({ input }) => { + try { + const { id, ...updateData } = input; + const processedData = { + ...updateData, + ...updateData.imageUrl && { + imageUrl: extractKeyFromPresignedUrl(updateData.imageUrl) + } + }; + if ("serialNum" in processedData && processedData.serialNum === null) { + processedData.serialNum = null; + } + const banner = await updateBanner(id, processedData); + scheduleStoreInitialization(); + return banner; + } catch (error50) { + console.error("Error updating banner:", error50); + throw error50; + } + }), + // Delete banner + deleteBanner: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).mutation(async ({ input }) => { + await deleteBanner(input.id); + scheduleStoreInitialization(); + return { success: true }; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/user.ts +var userRouter; +var init_user3 = __esm({ + "src/trpc/apis/admin-apis/apis/user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_notif_job(); + init_user_negativity_store(); + init_dbService(); + userRouter = { + createUserByMobile: protectedProcedure.input(external_exports.object({ + mobile: external_exports.string().min(1, "Mobile number is required") + })).mutation(async ({ input }) => { + const cleanMobile = input.mobile.replace(/\D/g, ""); + if (cleanMobile.length !== 10) { + throw new ApiError("Mobile number must be exactly 10 digits", 400); + } + const existingUser = await getUserByMobile(cleanMobile); + if (existingUser) { + throw new ApiError("User with this mobile number already exists", 409); + } + const newUser = await createUserByMobile(cleanMobile); + return { + success: true, + data: newUser + }; + }), + getEssentials: protectedProcedure.query(async () => { + const count4 = await getUnresolvedComplaintsCount(); + return { + unresolvedComplaints: count4 + }; + }), + getAllUsers: protectedProcedure.input(external_exports.object({ + limit: external_exports.number().min(1).max(100).default(50), + cursor: external_exports.number().optional(), + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { limit, cursor, search } = input; + const { users: usersToReturn, hasMore } = await getAllUsersWithFilters(limit, cursor, search); + const userIds = usersToReturn.map((u5) => u5.id); + const orderCounts = await getOrderCountsByUserIds(userIds); + const lastOrders = await getLastOrdersByUserIds(userIds); + const suspensionStatuses = await getSuspensionStatusesByUserIds(userIds); + const orderCountMap = new Map(orderCounts.map((o2) => [o2.userId, o2.totalOrders])); + const lastOrderMap = new Map(lastOrders.map((o2) => [o2.userId, o2.lastOrderDate])); + const suspensionMap = new Map(suspensionStatuses.map((s2) => [s2.userId, s2.isSuspended])); + const usersWithStats = usersToReturn.map((user) => ({ + ...user, + totalOrders: orderCountMap.get(user.id) || 0, + lastOrderDate: lastOrderMap.get(user.id) || null, + isSuspended: suspensionMap.get(user.id) ?? false + })); + const nextCursor = hasMore ? usersToReturn[usersToReturn.length - 1].id : void 0; + return { + users: usersWithStats, + nextCursor, + hasMore + }; + }), + getUserDetails: protectedProcedure.input(external_exports.object({ + userId: external_exports.number() + })).query(async ({ input }) => { + const { userId } = input; + const user = await getUserBasicInfo(userId); + if (!user) { + throw new ApiError("User not found", 404); + } + const isSuspended = await getUserSuspensionStatus(userId); + const userOrders = await getUserOrders(userId); + const orderIds = userOrders.map((o2) => o2.id); + const orderStatuses = await getOrderStatusesByOrderIds(orderIds); + const itemCounts = await getItemCountsByOrderIds(orderIds); + const statusMap = new Map(orderStatuses.map((s2) => [s2.orderId, s2])); + const itemCountMap = new Map(itemCounts.map((c2) => [c2.orderId, c2.itemCount])); + const getStatus = /* @__PURE__ */ __name((status) => { + if (!status) + return "pending"; + if (status.isCancelled) + return "cancelled"; + if (status.isDelivered) + return "delivered"; + return "pending"; + }, "getStatus"); + const ordersWithDetails = userOrders.map((order) => { + const status = statusMap.get(order.id); + return { + id: order.id, + readableId: order.readableId, + totalAmount: order.totalAmount, + createdAt: order.createdAt, + isFlashDelivery: order.isFlashDelivery, + status: getStatus(status), + itemCount: itemCountMap.get(order.id) || 0 + }; + }); + return { + user: { + ...user, + isSuspended + }, + orders: ordersWithDetails + }; + }), + updateUserSuspension: protectedProcedure.input(external_exports.object({ + userId: external_exports.number(), + isSuspended: external_exports.boolean() + })).mutation(async ({ input }) => { + const { userId, isSuspended } = input; + await upsertUserSuspension(userId, isSuspended); + return { + success: true, + message: `User ${isSuspended ? "suspended" : "unsuspended"} successfully` + }; + }), + getUsersForNotification: protectedProcedure.input(external_exports.object({ + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { search } = input; + const usersList = await searchUsers(search); + const eligibleUsers = await getAllNotifCreds(); + const eligibleSet = new Set(eligibleUsers.map((u5) => u5.userId)); + return { + users: usersList.map((user) => ({ + id: user.id, + name: user.name, + mobile: user.mobile, + isEligibleForNotif: eligibleSet.has(user.id) + })) + }; + }), + sendNotification: protectedProcedure.input(external_exports.object({ + userIds: external_exports.array(external_exports.number()).default([]), + title: external_exports.string().min(1, "Title is required"), + text: external_exports.string().min(1, "Message is required"), + imageUrl: external_exports.string().optional() + })).mutation(async ({ input }) => { + const { userIds, title: title2, text: text2, imageUrl } = input; + let tokens = []; + if (userIds.length === 0) { + const loggedInTokens = await getAllNotifCreds(); + const unloggedTokens = await getAllUnloggedTokens(); + tokens = [ + ...loggedInTokens.map((t9) => t9.token), + ...unloggedTokens.map((t9) => t9.token) + ]; + } else { + const userTokens = await getNotifTokensByUserIds(userIds); + tokens = userTokens.map((t9) => t9.token); + } + let queuedCount = 0; + for (const token of tokens) { + try { + await notificationQueue.add("send-admin-notification", { + token, + title: title2, + body: text2, + imageUrl: imageUrl || null + }, { + attempts: 3, + backoff: { + type: "exponential", + delay: 2e3 + } + }); + queuedCount++; + } catch (error50) { + console.error(`Failed to queue notification for token:`, error50); + } + } + return { + success: true, + message: `Notification queued for ${queuedCount} users` + }; + }), + getUserIncidents: protectedProcedure.input(external_exports.object({ + userId: external_exports.number() + })).query(async ({ input }) => { + const { userId } = input; + const incidents = await getUserIncidentsWithRelations(userId); + return { + incidents: incidents.map((incident) => ({ + id: incident.id, + userId: incident.userId, + orderId: incident.orderId, + dateAdded: incident.dateAdded, + adminComment: incident.adminComment, + addedBy: incident.addedBy?.name || "Unknown", + negativityScore: incident.negativityScore, + orderStatus: incident.order?.orderStatus?.[0]?.isCancelled ? "cancelled" : "active" + })) + }; + }), + addUserIncident: protectedProcedure.input(external_exports.object({ + userId: external_exports.number(), + orderId: external_exports.number().optional(), + adminComment: external_exports.string().optional(), + negativityScore: external_exports.number().optional() + })).mutation(async ({ input, ctx }) => { + const { userId, orderId, adminComment, negativityScore } = input; + const adminUserId = ctx.staffUser?.id; + if (!adminUserId) { + throw new ApiError("Admin user not authenticated", 401); + } + const incident = await createUserIncident( + userId, + orderId, + adminComment, + adminUserId, + negativityScore + ); + recomputeUserNegativityScore(userId); + return { + success: true, + data: incident + }; + }) + }; + } +}); + +// src/trpc/apis/admin-apis/apis/const.ts +var constRouter; +var init_const2 = __esm({ + "src/trpc/apis/admin-apis/apis/const.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_const_store(); + init_const_keys(); + init_dbService(); + constRouter = router2({ + getConstants: protectedProcedure.query(async () => { + const constants2 = await getAllConstants(); + return constants2; + }), + updateConstants: protectedProcedure.input(external_exports.object({ + constants: external_exports.array(external_exports.object({ + key: external_exports.string(), + value: external_exports.any() + })) + })).mutation(async ({ input }) => { + const { constants: constants2 } = input; + const validKeys = Object.values(CONST_KEYS); + const invalidKeys = constants2.filter((c2) => !validKeys.includes(c2.key)).map((c2) => c2.key); + if (invalidKeys.length > 0) { + throw new Error(`Invalid constant keys: ${invalidKeys.join(", ")}`); + } + await upsertConstants(constants2); + await computeConstants(); + return { + success: true, + updatedCount: constants2.length, + keys: constants2.map((c2) => c2.key) + }; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/admin-trpc-index.ts +var adminRouter; +var init_admin_trpc_index = __esm({ + "src/trpc/apis/admin-apis/apis/admin-trpc-index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_complaint3(); + init_coupon3(); + init_order3(); + init_vendor_snippets2(); + init_slots4(); + init_product3(); + init_staff_user2(); + init_store2(); + init_payments2(); + init_banner2(); + init_user3(); + init_const2(); + adminRouter = router2({ + complaint: complaintRouter, + coupon: couponRouter, + order: orderRouter, + vendorSnippets: vendorSnippetsRouter, + slots: slotsRouter2, + product: productRouter, + staffUser: staffUserRouter, + store: storeRouter, + payments: adminPaymentsRouter, + banner: bannerRouter2, + user: userRouter, + const: constRouter + }); + } +}); + +// src/lib/license-util.ts +async function extractCoordsFromRedirectUrl(url2) { + try { + await axios_default.get(url2, { maxRedirects: 0 }); + return null; + } catch (error50) { + if (error50.response?.status === 302 || error50.response?.status === 301) { + const redirectUrl = error50.response.headers.location; + const coordsMatch = redirectUrl.match(/!3d([-\d.]+)!4d([-\d.]+)/); + if (coordsMatch) { + return { + latitude: coordsMatch[1], + longitude: coordsMatch[2] + }; + } + } + return null; + } +} +var init_license_util = __esm({ + "src/lib/license-util.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_axios2(); + __name(extractCoordsFromRedirectUrl, "extractCoordsFromRedirectUrl"); + } +}); + +// src/trpc/apis/user-apis/apis/address.ts +var addressRouter; +var init_address2 = __esm({ + "src/trpc/apis/user-apis/apis/address.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_license_util(); + init_dbService(); + addressRouter = router2({ + getDefaultAddress: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + const defaultAddress = await getDefaultAddress(userId); + return { success: true, data: defaultAddress }; + }), + getUserAddresses: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + const userAddresses = await getUserAddresses(userId); + return { success: true, data: userAddresses }; + }), + createAddress: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + phone: external_exports.string().min(1, "Phone is required"), + addressLine1: external_exports.string().min(1, "Address line 1 is required"), + addressLine2: external_exports.string().optional(), + city: external_exports.string().min(1, "City is required"), + state: external_exports.string().min(1, "State is required"), + pincode: external_exports.string().min(1, "Pincode is required"), + isDefault: external_exports.boolean().optional(), + latitude: external_exports.number().optional(), + longitude: external_exports.number().optional(), + googleMapsUrl: external_exports.string().optional() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { name, phone, addressLine1, addressLine2, city, state, pincode, isDefault, googleMapsUrl } = input; + let { latitude, longitude } = input; + if (googleMapsUrl && latitude === void 0 && longitude === void 0) { + const coords = await extractCoordsFromRedirectUrl(googleMapsUrl); + if (coords) { + latitude = Number(coords.latitude); + longitude = Number(coords.longitude); + } + } + if (!name || !phone || !addressLine1 || !city || !state || !pincode) { + throw new Error("Missing required fields"); + } + if (isDefault) { + await clearDefaultAddress(userId); + } + const newAddress = await createUserAddress({ + userId, + name, + phone, + addressLine1, + addressLine2, + city, + state, + pincode, + isDefault: isDefault || false, + latitude, + longitude, + googleMapsUrl + }); + return { success: true, data: newAddress }; + }), + updateAddress: protectedProcedure.input(external_exports.object({ + id: external_exports.number().int().positive(), + name: external_exports.string().min(1, "Name is required"), + phone: external_exports.string().min(1, "Phone is required"), + addressLine1: external_exports.string().min(1, "Address line 1 is required"), + addressLine2: external_exports.string().optional(), + city: external_exports.string().min(1, "City is required"), + state: external_exports.string().min(1, "State is required"), + pincode: external_exports.string().min(1, "Pincode is required"), + isDefault: external_exports.boolean().optional(), + latitude: external_exports.number().optional(), + longitude: external_exports.number().optional(), + googleMapsUrl: external_exports.string().optional() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { id, name, phone, addressLine1, addressLine2, city, state, pincode, isDefault, googleMapsUrl } = input; + let { latitude, longitude } = input; + if (googleMapsUrl && latitude === void 0 && longitude === void 0) { + const coords = await extractCoordsFromRedirectUrl(googleMapsUrl); + if (coords) { + latitude = Number(coords.latitude); + longitude = Number(coords.longitude); + } + } + const existingAddress = await getUserAddressById(userId, id); + if (!existingAddress) { + throw new Error("Address not found"); + } + if (isDefault) { + await clearDefaultAddress(userId); + } + const updatedAddress = await updateUserAddress({ + userId, + addressId: id, + name, + phone, + addressLine1, + addressLine2, + city, + state, + pincode, + isDefault: isDefault || false, + googleMapsUrl, + latitude, + longitude + }); + return { success: true, data: updatedAddress }; + }), + deleteAddress: protectedProcedure.input(external_exports.object({ + id: external_exports.number().int().positive() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { id } = input; + const existingAddress = await getUserAddressById(userId, id); + if (!existingAddress) { + throw new Error("Address not found or does not belong to user"); + } + const hasOngoingOrders = await hasOngoingOrdersForAddress(id); + if (hasOngoingOrders) { + throw new Error("Address is attached to an ongoing order. Please cancel the order first."); + } + if (existingAddress.isDefault) { + throw new Error("Cannot delete default address. Please set another address as default first."); + } + const deleted = await deleteUserAddress(userId, id); + if (!deleted) { + throw new Error("Address not found or does not belong to user"); + } + return { success: true, message: "Address deleted successfully" }; + }) + }); + } +}); + +// src/lib/otp-utils.ts +function getOtpCreds(mobile) { + const authKey = otpStore.get(mobile); + return authKey || null; +} +async function verifyOtpUtil(mobile, otp, verifId) { + const reqUrl = `https://cpaas.messagecentral.com/verification/v3/validateOtp?&verificationId=${verifId}&code=${otp}`; + const resp = await fetch(reqUrl, { + method: "GET", + headers: { + authToken: otpSenderAuthToken + } + }); + const rawData = await resp.json(); + if (rawData.data?.verificationStatus === "VERIFICATION_COMPLETED") { + return true; + } + return false; +} +var otpStore, setOtpCreds, sendOtp; +var init_otp_utils = __esm({ + "src/lib/otp-utils.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_api_error(); + init_env_exporter(); + otpStore = /* @__PURE__ */ new Map(); + setOtpCreds = /* @__PURE__ */ __name((phone, verificationId) => { + otpStore.set(phone, verificationId); + }, "setOtpCreds"); + __name(getOtpCreds, "getOtpCreds"); + sendOtp = /* @__PURE__ */ __name(async (phone) => { + if (!phone) { + throw new ApiError("Phone number is required", 400); + } + const reqUrl = `https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=${phone}&timeout=300`; + const resp = await fetch(reqUrl, { + headers: { + authToken: otpSenderAuthToken + }, + method: "POST" + }); + const data = await resp.json(); + if (data.message === "SUCCESS") { + setOtpCreds(phone, data.data.verificationId); + return { success: true, message: "OTP sent successfully", verificationId: data.data.verificationId }; + } + if (data.message === "REQUEST_ALREADY_EXISTS") { + return { success: true, message: "OTP already sent. Last OTP is still valid" }; + } + throw new ApiError("Error while sending OTP. Please try again", 500); + }, "sendOtp"); + __name(verifyOtpUtil, "verifyOtpUtil"); + } +}); + +// src/trpc/apis/user-apis/apis/auth.ts +var generateToken, authRouter; +var init_auth4 = __esm({ + "src/trpc/apis/user-apis/apis/auth.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_bcryptjs(); + init_webapi(); + init_s3_client(); + init_api_error(); + init_env_exporter(); + init_otp_utils(); + init_dbService(); + generateToken = /* @__PURE__ */ __name(async (userId) => { + return await new SignJWT({ userId }).setProtectedHeader({ alg: "HS256" }).setExpirationTime("7d").sign(getEncodedJwtSecret()); + }, "generateToken"); + authRouter = router2({ + login: publicProcedure.input(external_exports.object({ + identifier: external_exports.string().min(1, "Email/mobile is required"), + password: external_exports.string().min(1, "Password is required") + })).mutation(async ({ input }) => { + const { identifier, password } = input; + if (!identifier || !password) { + throw new ApiError("Email/mobile and password are required", 400); + } + const user = await getUserByEmail(identifier.toLowerCase()); + let foundUser = user || null; + if (!foundUser) { + const userByMobile = await getUserByMobile2(identifier); + foundUser = userByMobile || null; + } + if (!foundUser) { + throw new ApiError("Invalid credentials", 401); + } + const userCredentials = await getUserCreds(foundUser.id); + if (!userCredentials) { + throw new ApiError("Account setup incomplete. Please contact support.", 401); + } + const userDetail = await getUserDetails(foundUser.id); + const profileImageSignedUrl = userDetail?.profileImage ? await generateSignedUrlFromS3Url(userDetail.profileImage) : null; + const isPasswordValid = await bcryptjs_default.compare(password, userCredentials.userPassword); + if (!isPasswordValid) { + throw new ApiError("Invalid credentials", 401); + } + const token = await generateToken(foundUser.id); + const response = { + token, + user: { + id: foundUser.id, + name: foundUser.name, + email: foundUser.email, + mobile: foundUser.mobile, + createdAt: foundUser.createdAt.toISOString(), + profileImage: profileImageSignedUrl, + bio: userDetail?.bio || null, + dateOfBirth: userDetail?.dateOfBirth ? new Date(userDetail.dateOfBirth).toISOString() : null, + gender: userDetail?.gender || null, + occupation: userDetail?.occupation || null + } + }; + return { + success: true, + data: response + }; + }), + register: publicProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + email: external_exports.string().email("Invalid email format"), + mobile: external_exports.string().min(1, "Mobile is required"), + password: external_exports.string().min(1, "Password is required"), + profileImageUrl: external_exports.string().nullable().optional() + })).mutation(async ({ input }) => { + const { name, email: email3, mobile, password, profileImageUrl } = input; + if (!name || !email3 || !mobile || !password) { + throw new ApiError("All fields are required", 400); + } + const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + if (!emailRegex.test(email3)) { + throw new ApiError("Invalid email format", 400); + } + const cleanMobile = mobile.replace(/\D/g, ""); + if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) { + throw new ApiError("Invalid mobile number", 400); + } + const existingEmail = await getUserByEmail(email3.toLowerCase()); + if (existingEmail) { + throw new ApiError("Email already registered", 409); + } + const existingMobile = await getUserByMobile2(cleanMobile); + if (existingMobile) { + throw new ApiError("Mobile number already registered", 409); + } + const hashedPassword = await bcryptjs_default.hash(password, 12); + const newUser = await createUserWithProfile({ + name: name.trim(), + email: email3.toLowerCase().trim(), + mobile: cleanMobile, + hashedPassword, + profileImage: profileImageUrl ?? null + }); + const token = await generateToken(newUser.id); + const profileImageSignedUrl = profileImageUrl ? await generateSignedUrlFromS3Url(profileImageUrl) : null; + const response = { + token, + user: { + id: newUser.id, + name: newUser.name, + email: newUser.email, + mobile: newUser.mobile, + createdAt: newUser.createdAt.toISOString(), + profileImage: profileImageSignedUrl + } + }; + return { + success: true, + data: response + }; + }), + sendOtp: publicProcedure.input(external_exports.object({ + mobile: external_exports.string() + })).mutation(async ({ input }) => { + return await sendOtp(input.mobile); + }), + verifyOtp: publicProcedure.input(external_exports.object({ + mobile: external_exports.string(), + otp: external_exports.string() + })).mutation(async ({ input }) => { + const verificationId = getOtpCreds(input.mobile); + if (!verificationId) { + throw new ApiError("OTP not sent or expired", 400); + } + const isVerified = await verifyOtpUtil(input.mobile, input.otp, verificationId); + if (!isVerified) { + throw new ApiError("Invalid OTP", 400); + } + let user = await getUserByMobile2(input.mobile); + if (!user) { + user = await createUserWithMobile(input.mobile); + } + const token = await generateToken(user.id); + return { + success: true, + token, + user: { + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile, + createdAt: user.createdAt.toISOString(), + profileImage: null + } + }; + }), + updatePassword: protectedProcedure.input(external_exports.object({ + password: external_exports.string().min(6, "Password must be at least 6 characters") + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const hashedPassword = await bcryptjs_default.hash(input.password, 10); + await upsertUserPassword(userId, hashedPassword); + return { success: true, message: "Password updated successfully" }; + }), + updateProfile: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1).optional(), + email: external_exports.string().email("Invalid email format").optional(), + mobile: external_exports.string().min(1).optional(), + password: external_exports.string().min(6, "Password must be at least 6 characters").optional(), + bio: external_exports.string().optional().nullable(), + dateOfBirth: external_exports.string().optional().nullable(), + gender: external_exports.string().optional().nullable(), + occupation: external_exports.string().optional().nullable(), + profileImageUrl: external_exports.string().optional().nullable() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const { name, email: email3, mobile, password, bio, dateOfBirth, gender, occupation, profileImageUrl } = input; + if (email3) { + const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + if (!emailRegex.test(email3)) { + throw new ApiError("Invalid email format", 400); + } + } + if (mobile) { + const cleanMobile = mobile.replace(/\D/g, ""); + if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) { + throw new ApiError("Invalid mobile number", 400); + } + } + if (email3) { + const existingEmail = await getUserByEmail(email3.toLowerCase()); + if (existingEmail && existingEmail.id !== userId) { + throw new ApiError("Email already registered", 409); + } + } + if (mobile) { + const cleanMobile = mobile.replace(/\D/g, ""); + const existingMobile = await getUserByMobile2(cleanMobile); + if (existingMobile && existingMobile.id !== userId) { + throw new ApiError("Mobile number already registered", 409); + } + } + let hashedPassword; + if (password) { + hashedPassword = await bcryptjs_default.hash(password, 12); + } + const updatedUser = await updateUserProfile(userId, { + name: name?.trim(), + email: email3?.toLowerCase().trim(), + mobile: mobile?.replace(/\D/g, ""), + hashedPassword, + profileImage: profileImageUrl ?? void 0, + bio: bio ?? void 0, + dateOfBirth: dateOfBirth ? new Date(dateOfBirth) : void 0, + gender: gender ?? void 0, + occupation: occupation ?? void 0 + }); + const userDetail = await getUserDetailsByUserId(userId); + const profileImageSignedUrl = userDetail?.profileImage ? await generateSignedUrlFromS3Url(userDetail.profileImage) : null; + const authHeader = ctx.req.header("authorization"); + const token = authHeader?.replace("Bearer ", "") || ""; + const response = { + token, + user: { + id: updatedUser.id, + name: updatedUser.name, + email: updatedUser.email, + mobile: updatedUser.mobile, + createdAt: updatedUser.createdAt?.toISOString?.() || (/* @__PURE__ */ new Date()).toISOString(), + profileImage: profileImageSignedUrl, + bio: userDetail?.bio || null, + dateOfBirth: userDetail?.dateOfBirth ? new Date(userDetail.dateOfBirth).toISOString() : null, + gender: userDetail?.gender || null, + occupation: userDetail?.occupation || null + } + }; + return { + success: true, + data: response + }; + }), + getProfile: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const user = await getUserById(userId); + if (!user) { + throw new ApiError("User not found", 404); + } + return { + success: true, + data: { + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile + } + }; + }), + deleteAccount: protectedProcedure.input(external_exports.object({ + mobile: external_exports.string().min(10, "Mobile number is required") + })).mutation(async ({ ctx, input }) => { + const userId = ctx.user.userId; + const { mobile } = input; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const existingUser = await getUserById(userId); + if (!existingUser) { + throw new ApiError("User not found", 404); + } + if (existingUser.id !== userId) { + throw new ApiError("Unauthorized: Cannot delete another user's account", 403); + } + const cleanInputMobile = mobile.replace(/\D/g, ""); + const cleanUserMobile = existingUser.mobile?.replace(/\D/g, ""); + if (cleanInputMobile !== cleanUserMobile) { + throw new ApiError("Mobile number does not match your registered number", 400); + } + await deleteUserAccount(userId); + return { success: true, message: "Account deleted successfully" }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/cart.ts +var getCartData, cartRouter; +var init_cart2 = __esm({ + "src/trpc/apis/user-apis/apis/cart.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_s3_client(); + init_slot_store(); + init_dbService(); + getCartData = /* @__PURE__ */ __name(async (userId) => { + const cartItemsWithProducts = await getCartItemsWithProducts(userId); + const cartWithSignedUrls = cartItemsWithProducts.map((item) => ({ + ...item, + product: { + ...item.product, + images: scaffoldAssetUrl(item.product.images || []) + } + })); + const totalAmount = cartWithSignedUrls.reduce((sum2, item) => sum2 + item.subtotal, 0); + return { + items: cartWithSignedUrls, + totalItems: cartWithSignedUrls.length, + totalAmount + }; + }, "getCartData"); + cartRouter = router2({ + getCart: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + return await getCartData(userId); + }), + addToCart: protectedProcedure.input(external_exports.object({ + productId: external_exports.number().int().positive(), + quantity: external_exports.number().int().positive() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { productId, quantity } = input; + if (!productId || !quantity || quantity <= 0) { + throw new ApiError("Product ID and positive quantity required", 400); + } + const product = await getProductById2(productId); + if (!product) { + throw new ApiError("Product not found", 404); + } + const existingItem = await getCartItemByUserProduct(userId, productId); + if (existingItem) { + await incrementCartItemQuantity(existingItem.id, quantity); + } else { + await insertCartItem(userId, productId, quantity); + } + return await getCartData(userId); + }), + updateCartItem: protectedProcedure.input(external_exports.object({ + itemId: external_exports.number().int().positive(), + quantity: external_exports.number().int().min(0) + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { itemId, quantity } = input; + if (!quantity || quantity <= 0) { + throw new ApiError("Positive quantity required", 400); + } + const updated = await updateCartItemQuantity(userId, itemId, quantity); + if (!updated) { + throw new ApiError("Cart item not found", 404); + } + return await getCartData(userId); + }), + removeFromCart: protectedProcedure.input(external_exports.object({ + itemId: external_exports.number().int().positive() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { itemId } = input; + const deleted = await deleteCartItem(userId, itemId); + if (!deleted) { + throw new ApiError("Cart item not found", 404); + } + return await getCartData(userId); + }), + clearCart: protectedProcedure.mutation(async ({ ctx }) => { + const userId = ctx.user.userId; + await clearUserCart(userId); + return { + items: [], + totalItems: 0, + totalAmount: 0, + message: "Cart cleared successfully" + }; + }), + // Original DB-based getCartSlots (commented out) + // getCartSlots: publicProcedure + // .input(z.object({ + // productIds: z.array(z.number().int().positive()) + // })) + // .query(async ({ input }) => { + // const { productIds } = input; + // + // if (productIds.length === 0) { + // return {}; + // } + // + // // Get slots for these products where freeze time is after current time + // const slotsData = await db + // .select({ + // productId: productSlots.productId, + // slotId: deliverySlotInfo.id, + // deliveryTime: deliverySlotInfo.deliveryTime, + // freezeTime: deliverySlotInfo.freezeTime, + // isActive: deliverySlotInfo.isActive, + // }) + // .from(productSlots) + // .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id)) + // .where(and( + // inArray(productSlots.productId, productIds), + // gt(deliverySlotInfo.freezeTime, sql`NOW()`), + // eq(deliverySlotInfo.isActive, true) + // )); + // + // // Group by productId + // const result: Record = {}; + // slotsData.forEach(slot => { + // if (!result[slot.productId]) { + // result[slot.productId] = []; + // } + // result[slot.productId].push({ + // id: slot.slotId, + // deliveryTime: slot.deliveryTime, + // freezeTime: slot.freezeTime, + // }); + // }); + // + // return result; + // }), + // Cache-based getCartSlots + getCartSlots: publicProcedure.input(external_exports.object({ + productIds: external_exports.array(external_exports.number().int().positive()) + })).query(async ({ input }) => { + const { productIds } = input; + if (productIds.length === 0) { + return {}; + } + return await getMultipleProductsSlots(productIds); + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/complaint.ts +var complaintRouter2; +var init_complaint4 = __esm({ + "src/trpc/apis/user-apis/apis/complaint.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_dbService(); + complaintRouter2 = router2({ + getAll: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + const userComplaints = await getUserComplaints(userId); + return { + complaints: userComplaints + }; + }), + raise: protectedProcedure.input(external_exports.object({ + orderId: external_exports.string().optional(), + complaintBody: external_exports.string().min(1, "Complaint body is required"), + imageUrls: external_exports.array(external_exports.string()).optional() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { orderId, complaintBody, imageUrls } = input; + let orderIdNum = null; + if (orderId) { + const readableIdMatch = orderId.match(/^ORD(\d+)$/); + if (readableIdMatch) { + orderIdNum = parseInt(readableIdMatch[1]); + } + } + await createComplaint( + userId, + orderIdNum, + complaintBody.trim(), + imageUrls && imageUrls.length > 0 ? imageUrls : null + ); + return { success: true, message: "Complaint raised successfully" }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/order.ts +var placeOrderUtil, orderRouter2; +var init_order4 = __esm({ + "src/trpc/apis/user-apis/apis/order.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_dbService(); + init_common3(); + init_s3_client(); + init_api_error(); + init_notif_job(); + init_const_store(); + init_post_order_handler(); + placeOrderUtil = /* @__PURE__ */ __name(async (params) => { + const { + userId, + selectedItems, + addressId, + paymentMethod, + couponId, + userNotes + } = params; + const constants2 = await getConstants([ + CONST_KEYS.minRegularOrderValue, + CONST_KEYS.deliveryCharge, + CONST_KEYS.flashFreeDeliveryThreshold, + CONST_KEYS.flashDeliveryCharge + ]); + const isFlashDelivery = params.isFlash; + const minOrderValue2 = (isFlashDelivery ? constants2[CONST_KEYS.flashFreeDeliveryThreshold] : constants2[CONST_KEYS.minRegularOrderValue]) || 0; + const deliveryCharge2 = (isFlashDelivery ? constants2[CONST_KEYS.flashDeliveryCharge] : constants2[CONST_KEYS.deliveryCharge]) || 0; + const orderGroupId = `${Date.now()}-${userId}`; + const address = await getAddressByIdAndUser(addressId, userId); + if (!address) { + throw new ApiError("Invalid address", 400); + } + const ordersBySlot = /* @__PURE__ */ new Map(); + for (const item of selectedItems) { + const product = await getProductById4(item.productId); + if (!product) { + throw new ApiError(`Product ${item.productId} not found`, 400); + } + if (!ordersBySlot.has(item.slotId)) { + ordersBySlot.set(item.slotId, []); + } + ordersBySlot.get(item.slotId).push({ ...item, product }); + } + if (params.isFlash) { + for (const item of selectedItems) { + const product = await getProductById4(item.productId); + if (!product?.isFlashAvailable) { + throw new ApiError(`Product ${item.productId} is not available for flash delivery`, 400); + } + } + } + let totalAmount = 0; + for (const [slotId, items] of ordersBySlot) { + const orderTotal = items.reduce( + (sum2, item) => { + if (!item.product) + return sum2; + const basePrice = params.isFlash ? item.product.flashPrice ?? item.product.price : item.product.price; + const itemPrice = parseFloat((basePrice ?? 0).toString()); + return sum2 + itemPrice * item.quantity; + }, + 0 + ); + totalAmount += orderTotal; + } + const appliedCoupon = await validateAndGetCoupon(couponId, userId, totalAmount); + const expectedDeliveryCharge = totalAmount < minOrderValue2 ? deliveryCharge2 : 0; + const totalWithDelivery = totalAmount + expectedDeliveryCharge; + const ordersData = []; + let isFirstOrder = true; + for (const [slotId, items] of ordersBySlot) { + const subOrderTotal = items.reduce( + (sum2, item) => { + if (!item.product) + return sum2; + const basePrice = params.isFlash ? item.product.flashPrice ?? item.product.price : item.product.price; + const itemPrice = parseFloat((basePrice ?? 0).toString()); + return sum2 + itemPrice * item.quantity; + }, + 0 + ); + const subOrderTotalWithDelivery = subOrderTotal + expectedDeliveryCharge; + const orderGroupProportion = subOrderTotal / totalAmount; + const orderTotalAmount = isFirstOrder ? subOrderTotalWithDelivery : subOrderTotal; + const { finalOrderTotal: finalOrderAmount } = applyDiscountToOrder( + orderTotalAmount, + appliedCoupon, + orderGroupProportion + ); + const order = { + userId, + addressId, + slotId: params.isFlash ? null : slotId, + isCod: paymentMethod === "cod", + isOnlinePayment: paymentMethod === "online", + paymentInfoId: null, + totalAmount: finalOrderAmount.toString(), + deliveryCharge: isFirstOrder ? expectedDeliveryCharge.toString() : "0", + readableId: -1, + userNotes: userNotes || null, + orderGroupId, + orderGroupProportion: orderGroupProportion.toString(), + isFlashDelivery: params.isFlash + }; + const validItems = items.filter( + (item) => item.product !== null && item.product !== void 0 + ); + const orderItemsData = validItems.map( + (item) => { + const basePrice = params.isFlash ? item.product.flashPrice ?? item.product.price : item.product.price; + const priceString = (basePrice ?? 0).toString(); + return { + orderId: 0, + productId: item.productId, + quantity: item.quantity.toString(), + price: priceString, + discountedPrice: priceString + }; + } + ); + const orderStatusData = { + userId, + orderId: 0, + paymentStatus: paymentMethod === "cod" ? "cod" : "pending" + }; + ordersData.push({ order, orderItems: orderItemsData, orderStatus: orderStatusData }); + isFirstOrder = false; + } + const createdOrders = await placeOrderTransaction({ + userId, + ordersData, + paymentMethod, + totalWithDelivery + }); + await deleteCartItemsForOrder( + userId, + selectedItems.map((item) => item.productId) + ); + if (appliedCoupon && createdOrders.length > 0) { + await recordCouponUsage( + userId, + appliedCoupon.id, + createdOrders[0].id + ); + } + for (const order of createdOrders) { + sendOrderPlacedNotification(userId, order.id.toString()); + } + await publishFormattedOrder(createdOrders, ordersBySlot); + return { success: true, data: createdOrders }; + }, "placeOrderUtil"); + orderRouter2 = router2({ + placeOrder: protectedProcedure.input( + external_exports.object({ + selectedItems: external_exports.array( + external_exports.object({ + productId: external_exports.number().int().positive(), + quantity: external_exports.number().int().positive(), + slotId: external_exports.union([external_exports.number().int(), external_exports.null()]) + }) + ), + addressId: external_exports.number().int().positive(), + paymentMethod: external_exports.enum(["online", "cod"]), + couponId: external_exports.number().int().positive().optional(), + userNotes: external_exports.string().optional(), + isFlashDelivery: external_exports.boolean().optional().default(false) + }) + ).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const isSuspended = await checkUserSuspended(userId); + if (isSuspended) { + throw new ApiError("Unable to place order", 403); + } + const { + selectedItems, + addressId, + paymentMethod, + couponId, + userNotes, + isFlashDelivery + } = input; + if (isFlashDelivery) { + const isFlashDeliveryEnabled = await getConstant(CONST_KEYS.isFlashDeliveryEnabled); + if (!isFlashDeliveryEnabled) { + throw new ApiError("Flash delivery is currently unavailable. Please opt for scheduled delivery.", 403); + } + } + if (!isFlashDelivery) { + const slotIds = [...new Set(selectedItems.filter((i2) => i2.slotId !== null).map((i2) => i2.slotId))]; + for (const slotId of slotIds) { + const isCapacityFull = await getSlotCapacityStatus(slotId); + if (isCapacityFull) { + throw new ApiError("Selected delivery slot is at full capacity. Please choose another slot.", 403); + } + } + } + let processedItems = selectedItems; + if (isFlashDelivery) { + processedItems = selectedItems.map((item) => ({ + ...item, + slotId: null + })); + } + return await placeOrderUtil({ + userId, + selectedItems: processedItems, + addressId, + paymentMethod, + couponId, + userNotes, + isFlash: isFlashDelivery + }); + }), + getOrders: protectedProcedure.input( + external_exports.object({ + page: external_exports.number().min(1).default(1), + pageSize: external_exports.number().min(1).max(50).default(10) + }).optional() + ).query(async ({ input, ctx }) => { + const { page = 1, pageSize = 10 } = input || {}; + const userId = ctx.user.userId; + const offset = (page - 1) * pageSize; + const totalCount = await getOrderCount(userId); + const userOrders = await getOrdersWithRelations(userId, offset, pageSize); + const mappedOrders = await Promise.all( + userOrders.map(async (order) => { + const status = order.orderStatus[0]; + const refund = order.refunds[0]; + let deliveryStatus; + let orderStatus3; + const allItemsPackaged = order.orderItems.every( + (item) => item.is_packaged + ); + if (status?.isCancelled) { + deliveryStatus = "cancelled"; + orderStatus3 = "cancelled"; + } else if (status?.isDelivered) { + deliveryStatus = "success"; + orderStatus3 = "success"; + } else if (allItemsPackaged) { + deliveryStatus = "packaged"; + orderStatus3 = "success"; + } else { + deliveryStatus = "pending"; + orderStatus3 = "success"; + } + const paymentMode = order.isCod ? "CoD" : "Online"; + const paymentStatus = status?.paymentStatus || "pending"; + const refundStatus = refund?.refundStatus || "none"; + const refundAmount = refund?.refundAmount ? parseFloat(refund.refundAmount.toString()) : null; + const items = await Promise.all( + order.orderItems.map(async (item) => { + const signedImages = item.product.images ? scaffoldAssetUrl( + item.product.images + ) : []; + return { + productName: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat(item.price.toString()), + discountedPrice: parseFloat( + item.discountedPrice?.toString() || item.price.toString() + ), + amount: parseFloat(item.price.toString()) * parseFloat(item.quantity), + image: signedImages[0] || null + }; + }) + ); + return { + id: order.id, + orderId: `ORD${order.id}`, + orderDate: order.createdAt.toISOString(), + deliveryStatus, + deliveryDate: order.slot?.deliveryTime.toISOString(), + orderStatus: orderStatus3, + cancelReason: status?.cancelReason || null, + paymentMode, + totalAmount: Number(order.totalAmount), + deliveryCharge: Number(order.deliveryCharge), + paymentStatus, + refundStatus, + refundAmount, + userNotes: order.userNotes || null, + items, + isFlashDelivery: order.isFlashDelivery, + createdAt: order.createdAt.toISOString() + }; + }) + ); + return { + success: true, + data: mappedOrders, + pagination: { + page, + pageSize, + totalCount, + totalPages: Math.ceil(totalCount / pageSize) + } + }; + }), + getOrderById: protectedProcedure.input(external_exports.object({ orderId: external_exports.string() })).query(async ({ input, ctx }) => { + const { orderId } = input; + const userId = ctx.user.userId; + const order = await getOrderByIdWithRelations(parseInt(orderId), userId); + if (!order) { + throw new Error("Order not found"); + } + const couponUsageData = await getCouponUsageForOrder(order.id); + let couponData = null; + if (couponUsageData.length > 0) { + let totalDiscountAmount = 0; + const orderTotal = parseFloat(order.totalAmount.toString()); + for (const usage of couponUsageData) { + let discountAmount = 0; + if (usage.coupon.discountPercent) { + discountAmount = orderTotal * parseFloat(usage.coupon.discountPercent.toString()) / 100; + } else if (usage.coupon.flatDiscount) { + discountAmount = parseFloat(usage.coupon.flatDiscount.toString()); + } + if (usage.coupon.maxValue && discountAmount > parseFloat(usage.coupon.maxValue.toString())) { + discountAmount = parseFloat(usage.coupon.maxValue.toString()); + } + totalDiscountAmount += discountAmount; + } + couponData = { + couponCode: couponUsageData.map((u5) => u5.coupon.couponCode).join(", "), + couponDescription: `${couponUsageData.length} coupons applied`, + discountAmount: totalDiscountAmount + }; + } + const status = order.orderStatus[0]; + const refund = order.refunds[0]; + let deliveryStatus; + let orderStatusResult; + const allItemsPackaged = order.orderItems.every( + (item) => item.is_packaged + ); + if (status?.isCancelled) { + deliveryStatus = "cancelled"; + orderStatusResult = "cancelled"; + } else if (status?.isDelivered) { + deliveryStatus = "success"; + orderStatusResult = "success"; + } else if (allItemsPackaged) { + deliveryStatus = "packaged"; + orderStatusResult = "success"; + } else { + deliveryStatus = "pending"; + orderStatusResult = "success"; + } + const paymentMode = order.isCod ? "CoD" : "Online"; + const paymentStatus = status?.paymentStatus || "pending"; + const refundStatus = refund?.refundStatus || "none"; + const refundAmount = refund?.refundAmount ? parseFloat(refund.refundAmount.toString()) : null; + const items = await Promise.all( + order.orderItems.map(async (item) => { + const signedImages = item.product.images ? scaffoldAssetUrl( + item.product.images + ) : []; + return { + productName: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat(item.price.toString()), + discountedPrice: parseFloat( + item.discountedPrice?.toString() || item.price.toString() + ), + amount: parseFloat(item.price.toString()) * parseFloat(item.quantity), + image: signedImages[0] || null + }; + }) + ); + return { + id: order.id, + orderId: `ORD${order.id}`, + orderDate: order.createdAt.toISOString(), + deliveryStatus, + deliveryDate: order.slot?.deliveryTime.toISOString(), + orderStatus: orderStatusResult, + cancellationStatus: orderStatusResult, + cancelReason: status?.cancelReason || null, + paymentMode, + paymentStatus, + refundStatus, + refundAmount, + userNotes: order.userNotes || null, + items, + couponCode: couponData?.couponCode || null, + couponDescription: couponData?.couponDescription || null, + discountAmount: couponData?.discountAmount || null, + orderAmount: parseFloat(order.totalAmount.toString()), + isFlashDelivery: order.isFlashDelivery, + createdAt: order.createdAt.toISOString(), + totalAmount: parseFloat(order.totalAmount.toString()), + deliveryCharge: parseFloat(order.deliveryCharge.toString()) + }; + }), + cancelOrder: protectedProcedure.input( + external_exports.object({ + id: external_exports.number(), + reason: external_exports.string().min(1, "Cancellation reason is required") + }) + ).mutation(async ({ input, ctx }) => { + try { + const userId = ctx.user.userId; + const { id, reason } = input; + const order = await getOrderBasic(id); + if (!order) { + console.error("Order not found:", id); + throw new ApiError("Order not found", 404); + } + if (order.userId !== userId) { + console.error("Order does not belong to user:", { + orderId: id, + orderUserId: order.userId, + requestUserId: userId + }); + throw new ApiError("Order not found", 404); + } + const status = order.orderStatus[0]; + if (!status) { + console.error("Order status not found for order:", id); + throw new ApiError("Order status not found", 400); + } + if (status.isCancelled) { + console.error("Order is already cancelled:", id); + throw new ApiError("Order is already cancelled", 400); + } + if (status.isDelivered) { + console.error("Cannot cancel delivered order:", id); + throw new ApiError("Cannot cancel delivered order", 400); + } + await cancelOrderTransaction(id, status.id, reason, order.isCod); + await sendOrderCancelledNotification(userId, id.toString()); + await publishCancellation(id, "user", reason); + return { success: true, message: "Order cancelled successfully" }; + } catch (e2) { + console.log(e2); + throw new ApiError("failed to cancel order"); + } + }), + updateUserNotes: protectedProcedure.input( + external_exports.object({ + id: external_exports.number(), + userNotes: external_exports.string() + }) + ).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { id, userNotes } = input; + const order = await getOrderBasic(id); + if (!order) { + console.error("Order not found:", id); + throw new ApiError("Order not found", 404); + } + if (order.userId !== userId) { + console.error("Order does not belong to user:", { + orderId: id, + orderUserId: order.userId, + requestUserId: userId + }); + throw new ApiError("Order not found", 404); + } + const status = order.orderStatus[0]; + if (!status) { + console.error("Order status not found for order:", id); + throw new ApiError("Order status not found", 400); + } + if (status.isDelivered) { + console.error("Cannot update notes for delivered order:", id); + throw new ApiError("Cannot update notes for delivered order", 400); + } + if (status.isCancelled) { + console.error("Cannot update notes for cancelled order:", id); + throw new ApiError("Cannot update notes for cancelled order", 400); + } + await updateOrderNotes2(id, userNotes); + return { success: true, message: "Notes updated successfully" }; + }), + getRecentlyOrderedProducts: protectedProcedure.input( + external_exports.object({ + limit: external_exports.number().min(1).max(50).default(20) + }).optional() + ).query(async ({ input, ctx }) => { + const { limit = 20 } = input || {}; + const userId = ctx.user.userId; + const thirtyDaysAgo = /* @__PURE__ */ new Date(); + thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30); + const recentOrderIds = await getRecentlyDeliveredOrderIds(userId, 10, thirtyDaysAgo); + if (recentOrderIds.length === 0) { + return { success: true, products: [] }; + } + const productIds = await getProductIdsFromOrders(recentOrderIds); + if (productIds.length === 0) { + return { success: true, products: [] }; + } + const productsWithUnits = await getProductsForRecentOrders(productIds, limit); + const formattedProducts = await Promise.all( + productsWithUnits.map(async (product) => { + const nextDeliveryDate = await getNextDeliveryDate(product.id); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + price: product.price, + unit: product.unitShortNotation, + incrementStep: product.incrementStep, + isOutOfStock: product.isOutOfStock, + nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null, + images: scaffoldAssetUrl( + product.images || [] + ) + }; + }) + ); + return { + success: true, + products: formattedProducts + }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/product.ts +var import_dayjs4, signProductImages, productRouter2; +var init_product4 = __esm({ + "src/trpc/apis/user-apis/apis/product.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_s3_client(); + init_api_error(); + init_product_store(); + import_dayjs4 = __toESM(require_dayjs_min()); + init_dbService(); + signProductImages = /* @__PURE__ */ __name((product) => ({ + ...product, + images: scaffoldAssetUrl(product.images || []) + }), "signProductImages"); + productRouter2 = router2({ + getProductDetails: publicProcedure.input(external_exports.object({ + id: external_exports.string().regex(/^\d+$/, "Invalid product ID") + })).query(async ({ input }) => { + const { id } = input; + const productId = parseInt(id); + if (isNaN(productId)) { + throw new Error("Invalid product ID"); + } + console.log("from the api to get product details"); + const cachedProduct = await getProductById5(productId); + if (cachedProduct) { + const currentTime = /* @__PURE__ */ new Date(); + const filteredSlots = cachedProduct.deliverySlots.filter( + (slot) => (0, import_dayjs4.default)(slot.freezeTime).isAfter(currentTime) && !slot.isCapacityFull + ); + return { + ...cachedProduct, + deliverySlots: filteredSlots + }; + } + const productData = await getProductDetailById(productId); + if (!productData) { + throw new Error("Product not found"); + } + return signProductImages(productData); + }), + getProductReviews: publicProcedure.input(external_exports.object({ + productId: external_exports.number().int().positive(), + limit: external_exports.number().int().min(1).max(50).optional().default(10), + offset: external_exports.number().int().min(0).optional().default(0) + })).query(async ({ input }) => { + const { productId, limit, offset } = input; + const { reviews, totalCount } = await getProductReviews2(productId, limit, offset); + const reviewsWithSignedUrls = reviews.map((review) => ({ + ...review, + signedImageUrls: scaffoldAssetUrl(review.imageUrls || []) + })); + const hasMore = offset + limit < totalCount; + return { reviews: reviewsWithSignedUrls, hasMore }; + }), + createReview: protectedProcedure.input(external_exports.object({ + productId: external_exports.number().int().positive(), + reviewBody: external_exports.string().min(1, "Review body is required"), + ratings: external_exports.number().int().min(1).max(5), + imageUrls: external_exports.array(external_exports.string()).optional().default([]), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]) + })).mutation(async ({ input, ctx }) => { + const { productId, reviewBody, ratings, imageUrls, uploadUrls } = input; + const userId = ctx.user.userId; + const product = await getProductById3(productId); + if (!product) { + throw new ApiError("Product not found", 404); + } + const imageKeys = uploadUrls.map((item) => extractKeyFromPresignedUrl(item)); + const newReview = await createProductReview(userId, productId, reviewBody, ratings, imageKeys); + if (uploadUrls && uploadUrls.length > 0) { + try { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } catch (error50) { + console.error("Error claiming upload URLs:", error50); + } + } + return { success: true, review: newReview }; + }), + getAllProductsSummary: publicProcedure.query(async () => { + const allCachedProducts = await getAllProducts2(); + const transformedProducts = allCachedProducts.map((product) => ({ + ...product, + images: product.images || [], + deliverySlots: [], + specialDeals: [] + })); + return transformedProducts; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/user.ts +var userRouter2; +var init_user4 = __esm({ + "src/trpc/apis/user-apis/apis/user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_env_exporter(); + init_s3_client(); + init_dbService(); + userRouter2 = router2({ + getSelfData: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const user = await getUserById2(userId); + if (!user) { + throw new ApiError("User not found", 404); + } + const userDetail = await getUserDetailByUserId(userId); + const profileImageSignedUrl = userDetail?.profileImage ? await generateSignedUrlFromS3Url(userDetail.profileImage) : null; + return { + success: true, + data: { + user: { + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile, + profileImage: profileImageSignedUrl, + bio: userDetail?.bio || null, + dateOfBirth: userDetail?.dateOfBirth ? new Date(userDetail.dateOfBirth).toISOString() : null, + gender: userDetail?.gender || null, + occupation: userDetail?.occupation || null + } + } + }; + }), + checkProfileComplete: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const result = await getUserWithCreds(userId); + if (!result) { + throw new ApiError("User not found", 404); + } + return { + isComplete: !!(result.user.name && result.user.email && result.creds) + }; + }), + savePushToken: publicProcedure.input(external_exports.object({ token: external_exports.string() })).mutation(async ({ input, ctx }) => { + const { token } = input; + const userId = ctx.user?.userId; + if (userId) { + await upsertNotifCred(userId, token); + await deleteUnloggedToken(token); + } else { + const existing = await getUnloggedToken(token); + if (existing) { + await upsertUnloggedToken(token); + } else { + await upsertUnloggedToken(token); + } + } + return { success: true }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/coupon.ts +var generateCouponDescription, userCouponRouter; +var init_coupon4 = __esm({ + "src/trpc/apis/user-apis/apis/coupon.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_dbService(); + generateCouponDescription = /* @__PURE__ */ __name((coupon) => { + let desc2 = ""; + if (coupon.discountPercent) { + desc2 += `${coupon.discountPercent}% off`; + } else if (coupon.flatDiscount) { + desc2 += `\u20B9${coupon.flatDiscount} off`; + } + if (coupon.minOrder) { + desc2 += ` on orders above \u20B9${coupon.minOrder}`; + } + if (coupon.maxValue) { + desc2 += ` (max discount \u20B9${coupon.maxValue})`; + } + return desc2; + }, "generateCouponDescription"); + userCouponRouter = router2({ + getEligible: protectedProcedure.query(async ({ ctx }) => { + try { + const userId = ctx.user.userId; + const allCoupons = await getActiveCouponsWithRelations(userId); + const applicableCoupons = allCoupons.filter((coupon) => { + if (!coupon.isUserBased) + return true; + const applicableUsers = coupon.applicableUsers || []; + return applicableUsers.some((au2) => au2.userId === userId); + }); + return { success: true, data: applicableCoupons }; + } catch (e2) { + console.log(e2); + throw new ApiError("Unable to get coupons"); + } + }), + getProductCoupons: protectedProcedure.input(external_exports.object({ productId: external_exports.number().int().positive() })).query(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { productId } = input; + const allCoupons = await getActiveCouponsWithRelations(userId); + const applicableCoupons = allCoupons.filter((coupon) => { + const applicableUsers = coupon.applicableUsers || []; + const userApplicable = !coupon.isUserBased || applicableUsers.some((au2) => au2.userId === userId); + const applicableProducts = coupon.applicableProducts || []; + const productApplicable = applicableProducts.length === 0 || applicableProducts.some((ap2) => ap2.productId === productId); + return userApplicable && productApplicable; + }); + return { success: true, data: applicableCoupons }; + }), + getMyCoupons: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + const allCoupons = await getAllCouponsWithRelations(userId); + const applicableCoupons = allCoupons.filter((coupon) => { + const isNotInvalidated = !coupon.isInvalidated; + const applicableUsers = coupon.applicableUsers || []; + const isApplicable = coupon.isApplyForAll || applicableUsers.some((au2) => au2.userId === userId); + const isNotExpired = !coupon.validTill || new Date(coupon.validTill) > /* @__PURE__ */ new Date(); + return isNotInvalidated && isApplicable && isNotExpired; + }); + const personalCoupons = []; + const generalCoupons = []; + applicableCoupons.forEach((coupon) => { + const usageCount = coupon.usages.length; + const isExpired = false; + const isUsedUp = Boolean(coupon.maxLimitForUser && usageCount >= coupon.maxLimitForUser); + const couponDisplay = { + id: coupon.id, + code: coupon.couponCode, + discountType: coupon.discountPercent ? "percentage" : "flat", + discountValue: parseFloat(coupon.discountPercent || coupon.flatDiscount || "0"), + maxValue: coupon.maxValue ? parseFloat(coupon.maxValue) : void 0, + minOrder: coupon.minOrder ? parseFloat(coupon.minOrder) : void 0, + description: generateCouponDescription(coupon), + validTill: coupon.validTill ? new Date(coupon.validTill) : void 0, + usageCount, + maxLimitForUser: coupon.maxLimitForUser ? parseInt(coupon.maxLimitForUser.toString()) : void 0, + isExpired, + isUsedUp + }; + if ((coupon.applicableUsers || []).some((au2) => au2.userId === userId) && !coupon.isApplyForAll) { + personalCoupons.push(couponDisplay); + } else if (coupon.isApplyForAll) { + generalCoupons.push(couponDisplay); + } + }); + return { + success: true, + data: { + personal: personalCoupons, + general: generalCoupons + } + }; + }), + redeemReservedCoupon: protectedProcedure.input(external_exports.object({ secretCode: external_exports.string() })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { secretCode } = input; + const reservedCoupon = await getReservedCouponByCode(secretCode); + if (!reservedCoupon) { + throw new ApiError("Invalid or already redeemed coupon code", 400); + } + if (reservedCoupon.redeemedBy === userId) { + throw new ApiError("You have already redeemed this coupon", 400); + } + const couponResult = await redeemReservedCoupon(userId, reservedCoupon); + return { success: true, coupon: couponResult }; + }) + }); + } +}); + +// src/lib/payments-utils.ts +var RazorpayPaymentService; +var init_payments_utils = __esm({ + "src/lib/payments-utils.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + RazorpayPaymentService = class { + // private static instance = new Razorpay({ + // key_id: razorpayId, + // key_secret: razorpaySecret, + // }); + // + static async createOrder(orderId, amount) { + } + static async insertPaymentRecord(orderId, razorpayOrder, tx) { + } + static async initiateRefund(paymentId, amount) { + } + static async fetchRefund(refundId) { + } + }; + __name(RazorpayPaymentService, "RazorpayPaymentService"); + } +}); + +// src/trpc/apis/user-apis/apis/payments.ts +var paymentRouter; +var init_payments3 = __esm({ + "src/trpc/apis/user-apis/apis/payments.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_crypto3(); + init_env_exporter(); + init_payments_utils(); + init_dbService(); + paymentRouter = router2({ + createRazorpayOrder: protectedProcedure.input(external_exports.object({ + orderId: external_exports.string() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { orderId } = input; + const order = await getOrderById(parseInt(orderId)); + if (!order) { + throw new ApiError("Order not found", 404); + } + if (order.userId !== userId) { + throw new ApiError("Order does not belong to user", 403); + } + const existingPayment = await getPaymentByOrderId(parseInt(orderId)); + if (existingPayment && existingPayment.status === "pending") { + return { + razorpayOrderId: existingPayment.merchantOrderId, + key: razorpayId + }; + } + if (order.totalAmount === null) { + throw new ApiError("Order total is missing", 400); + } + const razorpayOrder = await RazorpayPaymentService.createOrder(parseInt(orderId), order.totalAmount); + await RazorpayPaymentService.insertPaymentRecord(parseInt(orderId), razorpayOrder); + return { + razorpayOrderId: 0, + key: razorpayId + }; + }), + verifyPayment: protectedProcedure.input(external_exports.object({ + razorpay_payment_id: external_exports.string(), + razorpay_order_id: external_exports.string(), + razorpay_signature: external_exports.string() + })).mutation(async ({ input, ctx }) => { + const { razorpay_payment_id, razorpay_order_id, razorpay_signature } = input; + const expectedSignature = crypto_default.createHmac("sha256", razorpaySecret).update(razorpay_order_id + "|" + razorpay_payment_id).digest("hex"); + if (expectedSignature !== razorpay_signature) { + throw new ApiError("Invalid payment signature", 400); + } + const currentPayment = await getPaymentByMerchantOrderId(razorpay_order_id); + if (!currentPayment) { + throw new ApiError("Payment record not found", 404); + } + const updatedPayload = { + ...currentPayment.payload || {}, + payment_id: razorpay_payment_id, + signature: razorpay_signature + }; + const updatedPayment = await updatePaymentSuccess(razorpay_order_id, updatedPayload); + if (!updatedPayment) { + throw new ApiError("Payment record not found", 404); + } + await updateOrderPaymentStatus(updatedPayment.orderId, "success"); + return { + success: true, + message: "Payment verified successfully" + }; + }), + markPaymentFailed: protectedProcedure.input(external_exports.object({ + merchantOrderId: external_exports.string() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { merchantOrderId } = input; + const payment = await getPaymentByMerchantOrderId(merchantOrderId); + if (!payment) { + throw new ApiError("Payment not found", 404); + } + const order = await getOrderById(payment.orderId); + if (!order || order.userId !== userId) { + throw new ApiError("Payment does not belong to user", 403); + } + await markPaymentFailed(payment.id); + return { + success: true, + message: "Payment marked as failed" + }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/file-upload.ts +var fileUploadRouter; +var init_file_upload = __esm({ + "src/trpc/apis/user-apis/apis/file-upload.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_s3_client(); + init_api_error(); + fileUploadRouter = router2({ + generateUploadUrls: protectedProcedure.input(external_exports.object({ + contextString: external_exports.enum(["review", "product_info", "notification", "complaint", "profile", "tags"]), + mimeTypes: external_exports.array(external_exports.string()) + })).mutation(async ({ input }) => { + const { contextString, mimeTypes } = input; + const uploadUrls = []; + const keys = []; + for (const mimeType of mimeTypes) { + let folder; + if (contextString === "review") { + folder = "review-images"; + } else if (contextString === "product_info") { + folder = "product-images"; + } else if (contextString === "notification") { + folder = "notification-images"; + } else if (contextString === "complaint") { + folder = "complaint-images"; + } else if (contextString === "profile") { + folder = "profile-images"; + } else if (contextString === "tags") { + folder = "tags"; + } else { + folder = ""; + } + const extension = mimeType === "image/jpeg" ? ".jpg" : mimeType === "image/png" ? ".png" : mimeType === "image/gif" ? ".gif" : ".jpg"; + const key = `${folder}/${Date.now()}${extension}`; + try { + const uploadUrl = await generateUploadUrl(key, mimeType); + uploadUrls.push(uploadUrl); + keys.push(key); + } catch (error50) { + console.error("Error generating upload URL:", error50); + throw new ApiError("Failed to generate upload URL", 500); + } + } + return { uploadUrls }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/tags.ts +var tagsRouter; +var init_tags = __esm({ + "src/trpc/apis/user-apis/apis/tags.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_product_tag_store(); + tagsRouter = router2({ + getTagsByStore: publicProcedure.input(external_exports.object({ + storeId: external_exports.number() + })).query(async ({ input }) => { + const { storeId } = input; + const tags = await getTagsByStoreId(storeId); + return { + tags: tags.map((tag2) => ({ + id: tag2.id, + tagName: tag2.tagName, + tagDescription: tag2.tagDescription, + imageUrl: tag2.imageUrl, + productIds: tag2.productIds + })) + }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/user-trpc-index.ts +var userRouter3; +var init_user_trpc_index = __esm({ + "src/trpc/apis/user-apis/apis/user-trpc-index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_address2(); + init_auth4(); + init_banners2(); + init_cart2(); + init_complaint4(); + init_order4(); + init_product4(); + init_slots3(); + init_user4(); + init_coupon4(); + init_payments3(); + init_stores2(); + init_file_upload(); + init_tags(); + userRouter3 = router2({ + address: addressRouter, + auth: authRouter, + banner: bannerRouter, + cart: cartRouter, + complaint: complaintRouter2, + order: orderRouter2, + product: productRouter2, + slots: slotsRouter, + user: userRouter2, + coupon: userCouponRouter, + payment: paymentRouter, + stores: storesRouter, + fileUpload: fileUploadRouter, + tags: tagsRouter + }); + } +}); + +// src/trpc/router.ts +var appRouter; +var init_router5 = __esm({ + "src/trpc/router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_admin_trpc_index(); + init_user_trpc_index(); + init_common_trpc_index(); + appRouter = router2({ + hello: publicProcedure.input(external_exports.object({ name: external_exports.string() })).query(({ input }) => { + return { greeting: `Hello ${input.name}!` }; + }), + admin: adminRouter, + user: userRouter3, + common: commonApiRouter + }); + } +}); + +// src/app.ts +var app_exports = {}; +__export(app_exports, { + createApp: () => createApp +}); +var createApp; +var init_app = __esm({ + "src/app.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_cors(); + init_logger(); + init_dist2(); + init_dbService(); + init_main_router(); + init_router5(); + init_dist3(); + init_webapi(); + init_env_exporter(); + createApp = /* @__PURE__ */ __name(() => { + const app = new Hono2(); + app.use(cors({ + origin: "http://localhost:5174", + allowMethods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], + allowHeaders: ["Origin", "X-Requested-With", "Content-Type", "Accept", "Authorization"], + credentials: true + })); + app.use(logger()); + app.use("/api/trpc/*", trpcServer({ + router: appRouter, + createContext: async ({ req }) => { + let user = null; + let staffUser = null; + const authHeader = req.headers.get("authorization"); + if (authHeader?.startsWith("Bearer ")) { + const token = authHeader.substring(7); + try { + const { payload } = await jwtVerify(token, getEncodedJwtSecret()); + const decoded = payload; + if (decoded.staffId) { + const staff = await getStaffUserById(decoded.staffId); + if (staff) { + user = staffUser; + staffUser = { + id: staff.id, + name: staff.name + }; + } + } else { + user = decoded; + const suspended = await isUserSuspended(user.userId); + if (suspended) { + throw new TRPCError({ + code: "FORBIDDEN", + message: "Account suspended" + }); + } + } + } catch (err) { + } + } + return { req, user, staffUser }; + }, + onError({ error: error50, path, type, ctx }) { + console.error("\u{1F6A8} tRPC Error :", { + path, + type, + code: error50.code, + message: error50.message, + userId: ctx?.user?.userId, + stack: error50.stack + }); + } + })); + app.route("/api", main_router_default); + app.onError((err, c2) => { + console.error(err); + let status = 500; + let message2 = "Internal Server Error"; + if (err instanceof TRPCError) { + const trpcStatusMap = { + BAD_REQUEST: 400, + UNAUTHORIZED: 401, + FORBIDDEN: 403, + NOT_FOUND: 404, + TIMEOUT: 408, + CONFLICT: 409, + PRECONDITION_FAILED: 412, + PAYLOAD_TOO_LARGE: 413, + METHOD_NOT_SUPPORTED: 405, + UNPROCESSABLE_CONTENT: 422, + TOO_MANY_REQUESTS: 429, + INTERNAL_SERVER_ERROR: 500 + }; + status = trpcStatusMap[err.code] || 500; + message2 = err.message; + } else if (err.statusCode) { + status = err.statusCode; + message2 = err.message; + } else if (err.status) { + status = err.status; + message2 = err.message; + } else if (err.message) { + message2 = err.message; + } + return c2.json({ message: message2 }, status); + }); + return app; + }, "createApp"); + } +}); + +// .wrangler/tmp/bundle-vljdhV/middleware-loader.entry.ts +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// .wrangler/tmp/bundle-vljdhV/middleware-insertion-facade.js +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// worker.ts +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var worker_default = { + async fetch(request, env2, ctx) { + ; + globalThis.ENV = env2; + const { createApp: createApp2 } = await Promise.resolve().then(() => (init_app(), app_exports)); + const { initDb: initDb2 } = await Promise.resolve().then(() => (init_dbService(), dbService_exports)); + if (env2.DB) { + initDb2(env2.DB); + } + const app = createApp2(); + return app.fetch(request, env2, ctx); + } +}; + +// ../../node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var drainBody = /* @__PURE__ */ __name(async (request, env2, _ctx, middlewareCtx) => { + try { + return await middlewareCtx.next(request, env2); + } finally { + try { + if (request.body !== null && !request.bodyUsed) { + const reader = request.body.getReader(); + while (!(await reader.read()).done) { + } + } + } catch (e2) { + console.error("Failed to drain the unused request body.", e2); + } + } +}, "drainBody"); +var middleware_ensure_req_body_drained_default = drainBody; + +// ../../node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function reduceError(e2) { + return { + name: e2?.name, + message: e2?.message ?? String(e2), + stack: e2?.stack, + cause: e2?.cause === void 0 ? void 0 : reduceError(e2.cause) + }; +} +__name(reduceError, "reduceError"); +var jsonError = /* @__PURE__ */ __name(async (request, env2, _ctx, middlewareCtx) => { + try { + return await middlewareCtx.next(request, env2); + } catch (e2) { + const error50 = reduceError(e2); + return Response.json(error50, { + status: 500, + headers: { "MF-Experimental-Error-Stack": "true" } + }); + } +}, "jsonError"); +var middleware_miniflare3_json_error_default = jsonError; + +// .wrangler/tmp/bundle-vljdhV/middleware-insertion-facade.js +var __INTERNAL_WRANGLER_MIDDLEWARE__ = [ + middleware_ensure_req_body_drained_default, + middleware_miniflare3_json_error_default +]; +var middleware_insertion_facade_default = worker_default; + +// ../../node_modules/wrangler/templates/middleware/common.ts +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var __facade_middleware__ = []; +function __facade_register__(...args) { + __facade_middleware__.push(...args.flat()); +} +__name(__facade_register__, "__facade_register__"); +function __facade_invokeChain__(request, env2, ctx, dispatch, middlewareChain) { + const [head, ...tail] = middlewareChain; + const middlewareCtx = { + dispatch, + next(newRequest, newEnv) { + return __facade_invokeChain__(newRequest, newEnv, ctx, dispatch, tail); + } + }; + return head(request, env2, ctx, middlewareCtx); +} +__name(__facade_invokeChain__, "__facade_invokeChain__"); +function __facade_invoke__(request, env2, ctx, dispatch, finalMiddleware) { + return __facade_invokeChain__(request, env2, ctx, dispatch, [ + ...__facade_middleware__, + finalMiddleware + ]); +} +__name(__facade_invoke__, "__facade_invoke__"); + +// .wrangler/tmp/bundle-vljdhV/middleware-loader.entry.ts +var __Facade_ScheduledController__ = class { + constructor(scheduledTime, cron, noRetry) { + this.scheduledTime = scheduledTime; + this.cron = cron; + this.#noRetry = noRetry; + } + #noRetry; + noRetry() { + if (!(this instanceof __Facade_ScheduledController__)) { + throw new TypeError("Illegal invocation"); + } + this.#noRetry(); + } +}; +__name(__Facade_ScheduledController__, "__Facade_ScheduledController__"); +function wrapExportedHandler(worker) { + if (__INTERNAL_WRANGLER_MIDDLEWARE__ === void 0 || __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0) { + return worker; + } + for (const middleware2 of __INTERNAL_WRANGLER_MIDDLEWARE__) { + __facade_register__(middleware2); + } + const fetchDispatcher = /* @__PURE__ */ __name(function(request, env2, ctx) { + if (worker.fetch === void 0) { + throw new Error("Handler does not export a fetch() function."); + } + return worker.fetch(request, env2, ctx); + }, "fetchDispatcher"); + return { + ...worker, + fetch(request, env2, ctx) { + const dispatcher = /* @__PURE__ */ __name(function(type, init) { + if (type === "scheduled" && worker.scheduled !== void 0) { + const controller = new __Facade_ScheduledController__( + Date.now(), + init.cron ?? "", + () => { + } + ); + return worker.scheduled(controller, env2, ctx); + } + }, "dispatcher"); + return __facade_invoke__(request, env2, ctx, dispatcher, fetchDispatcher); + } + }; +} +__name(wrapExportedHandler, "wrapExportedHandler"); +function wrapWorkerEntrypoint(klass) { + if (__INTERNAL_WRANGLER_MIDDLEWARE__ === void 0 || __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0) { + return klass; + } + for (const middleware2 of __INTERNAL_WRANGLER_MIDDLEWARE__) { + __facade_register__(middleware2); + } + return class extends klass { + #fetchDispatcher = (request, env2, ctx) => { + this.env = env2; + this.ctx = ctx; + if (super.fetch === void 0) { + throw new Error("Entrypoint class does not define a fetch() function."); + } + return super.fetch(request); + }; + #dispatcher = (type, init) => { + if (type === "scheduled" && super.scheduled !== void 0) { + const controller = new __Facade_ScheduledController__( + Date.now(), + init.cron ?? "", + () => { + } + ); + return super.scheduled(controller); + } + }; + fetch(request) { + return __facade_invoke__( + request, + this.env, + this.ctx, + this.#dispatcher, + this.#fetchDispatcher + ); + } + }; +} +__name(wrapWorkerEntrypoint, "wrapWorkerEntrypoint"); +var WRAPPED_ENTRY; +if (typeof middleware_insertion_facade_default === "object") { + WRAPPED_ENTRY = wrapExportedHandler(middleware_insertion_facade_default); +} else if (typeof middleware_insertion_facade_default === "function") { + WRAPPED_ENTRY = wrapWorkerEntrypoint(middleware_insertion_facade_default); +} +var middleware_loader_entry_default = WRAPPED_ENTRY; +export { + __INTERNAL_WRANGLER_MIDDLEWARE__, + middleware_loader_entry_default as default +}; +/*! Bundled license information: + +@trpc/server/dist/resolveResponse-CHqBlAgR.mjs: + (* istanbul ignore if -- @preserve *) + (*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + *) +*/ +//# sourceMappingURL=worker.js.map diff --git a/apps/backend/.wrangler/tmp/dev-RJsRQO/worker.js.map b/apps/backend/.wrangler/tmp/dev-RJsRQO/worker.js.map new file mode 100644 index 0000000..c42ed81 --- /dev/null +++ b/apps/backend/.wrangler/tmp/dev-RJsRQO/worker.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "sources": ["../bundle-vljdhV/strip-cf-connecting-ip-header.js", "../../../../../node_modules/unenv/dist/runtime/_internal/utils.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/perf_hooks/performance.mjs", "../../../../../node_modules/unenv/dist/runtime/node/perf_hooks.mjs", "../../../../../node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs", "../../../../../node_modules/unenv/dist/runtime/mock/noop.mjs", "../../../../../node_modules/unenv/dist/runtime/node/console.mjs", "../../../../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs", "../../../../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-console", "../../../../../node_modules/unenv/dist/runtime/node/internal/process/hrtime.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/tty/read-stream.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/tty/write-stream.mjs", "../../../../../node_modules/unenv/dist/runtime/node/tty.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/process/process.mjs", "../../../../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs", "../../../../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-process", "wrangler-modules-watch:wrangler:modules-watch", "../../../../../node_modules/wrangler/templates/modules-watch-stub.js", "../../../../../node_modules/hono/dist/compose.js", "../../../../../node_modules/hono/dist/http-exception.js", "../../../../../node_modules/hono/dist/request/constants.js", "../../../../../node_modules/hono/dist/utils/body.js", "../../../../../node_modules/hono/dist/utils/url.js", "../../../../../node_modules/hono/dist/request.js", "../../../../../node_modules/hono/dist/utils/html.js", "../../../../../node_modules/hono/dist/context.js", "../../../../../node_modules/hono/dist/router.js", "../../../../../node_modules/hono/dist/utils/constants.js", "../../../../../node_modules/hono/dist/hono-base.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/matcher.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/node.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/trie.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/router.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/prepared-router.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/index.js", "../../../../../node_modules/hono/dist/router/smart-router/router.js", "../../../../../node_modules/hono/dist/router/smart-router/index.js", "../../../../../node_modules/hono/dist/router/trie-router/node.js", "../../../../../node_modules/hono/dist/router/trie-router/router.js", "../../../../../node_modules/hono/dist/router/trie-router/index.js", "../../../../../node_modules/hono/dist/hono.js", "../../../../../node_modules/hono/dist/index.js", "../../../../../node_modules/hono/dist/middleware/cors/index.js", "../../../../../node_modules/hono/dist/utils/color.js", "../../../../../node_modules/hono/dist/middleware/logger/index.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/utils.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/rpc/codes.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/createProxy.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/error/getErrorShape.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/error/formatter.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/error/TRPCError.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/transformer.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/router.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/tracked.ts", "../../../../../node_modules/@trpc/server/src/observable/observable.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/parseConnectionParams.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/contentType.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/abortError.ts", "../../../../../node_modules/@trpc/server/src/vendor/is-plain-object.ts", "../../../../../node_modules/@trpc/server/src/vendor/unpromise/unpromise.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/disposable.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/timerResource.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/createDeferred.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/mergeAsyncIterables.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/readableStreamFrom.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/withPing.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/jsonl.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/sse.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/resolveResponse.ts", "../../../../../node_modules/@trpc/server/src/adapters/fetch/fetchRequestHandler.ts", "../../../../../node_modules/hono/dist/helper/route/index.js", "../../../../../node_modules/@hono/trpc-server/src/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/entity.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/logger.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/table.utils.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/table.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/column.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/column-builder.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/foreign-keys.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/tracing-utils.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/unique-constraint.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/utils/array.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/columns/common.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/columns/enum.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/subquery.ts", "../../../../../packages/db_helper_sqlite/node_modules/drizzle-orm/version.js", "../../../../../packages/db_helper_sqlite/node_modules/src/tracing.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/view-common.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/sql.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/utils.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/table.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/primary-keys.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/expressions/conditions.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/expressions/select.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/expressions/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/relations.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/alias.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/selection-proxy.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/query-promise.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/foreign-keys.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/unique-constraint.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/common.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/blob.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/custom.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/integer.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/numeric.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/real.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/text.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/all.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/table.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/checks.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/indexes.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/primary-keys.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/utils.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/delete.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/casing.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/errors.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/functions/aggregate.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/functions/vector.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/functions/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/view-base.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/dialect.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/query-builders/query-builder.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/select.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/query-builder.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/insert.ts", "../../../../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.types.js", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/update.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/count.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/query.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/raw.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/db.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/cache/core/cache.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/cache/core/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/alias.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/session.ts", "../../../../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/subquery.js", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/view.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/d1/session.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/d1/driver.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/d1/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/drizzle-orm/operations.js", "../../../../../packages/db_helper_sqlite/node_modules/src/index.ts", "../../../../../packages/db_helper_sqlite/src/db/schema.ts", "../../../../../packages/db_helper_sqlite/src/db/db_index.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/banner.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/complaint.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/const.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/coupon.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/order.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/product.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/slots.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/staff-user.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/store.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/user.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/vendor-snippets.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/address.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/banners.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/cart.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/complaint.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/stores.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/product.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/slots.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/payments.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/auth.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/coupon.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/user.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/order.ts", "../../../../../packages/db_helper_sqlite/src/stores/store-helpers.ts", "../../../../../packages/db_helper_sqlite/src/lib/automated-jobs.ts", "../../../../../packages/db_helper_sqlite/src/lib/health-check.ts", "../../../../../packages/db_helper_sqlite/src/lib/delete-orders.ts", "../../../../../packages/db_helper_sqlite/src/helper_methods/upload-url.ts", "../../../../../packages/db_helper_sqlite/src/lib/seed.ts", "../../../../../packages/db_helper_sqlite/index.ts", "../../../src/sqliteImporter.ts", "../../../src/dbService.ts", "../../../../../node_modules/jose/dist/webapi/lib/buffer_utils.js", "../../../../../node_modules/jose/dist/webapi/lib/base64.js", "../../../../../node_modules/jose/dist/webapi/util/base64url.js", "../../../../../node_modules/jose/dist/webapi/lib/crypto_key.js", "../../../../../node_modules/jose/dist/webapi/lib/invalid_key_input.js", "../../../../../node_modules/jose/dist/webapi/util/errors.js", "../../../../../node_modules/jose/dist/webapi/lib/is_key_like.js", "../../../../../node_modules/jose/dist/webapi/lib/helpers.js", "../../../../../node_modules/jose/dist/webapi/lib/type_checks.js", "../../../../../node_modules/jose/dist/webapi/lib/signing.js", "../../../../../node_modules/jose/dist/webapi/lib/jwk_to_key.js", "../../../../../node_modules/jose/dist/webapi/lib/normalize_key.js", "../../../../../node_modules/jose/dist/webapi/lib/validate_crit.js", "../../../../../node_modules/jose/dist/webapi/lib/validate_algorithms.js", "../../../../../node_modules/jose/dist/webapi/lib/check_key_type.js", "../../../../../node_modules/jose/dist/webapi/jws/flattened/verify.js", "../../../../../node_modules/jose/dist/webapi/jws/compact/verify.js", "../../../../../node_modules/jose/dist/webapi/lib/jwt_claims_set.js", "../../../../../node_modules/jose/dist/webapi/jwt/verify.js", "../../../../../node_modules/jose/dist/webapi/jws/flattened/sign.js", "../../../../../node_modules/jose/dist/webapi/jws/compact/sign.js", "../../../../../node_modules/jose/dist/webapi/jwt/sign.js", "../../../../../node_modules/jose/dist/webapi/index.js", "../../../src/lib/api-error.ts", "../../../src/lib/env-exporter.ts", "../../../src/middleware/staff-auth.ts", "../../../src/apis/admin-apis/apis/av-router.ts", "../../../../../node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/extensions/index.js", "../../../../../node_modules/@smithy/types/dist-es/abort.js", "../../../../../node_modules/@smithy/types/dist-es/auth/auth.js", "../../../../../node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js", "../../../../../node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js", "../../../../../node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js", "../../../../../node_modules/@smithy/types/dist-es/auth/HttpSigner.js", "../../../../../node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js", "../../../../../node_modules/@smithy/types/dist-es/auth/index.js", "../../../../../node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js", "../../../../../node_modules/@smithy/types/dist-es/checksum.js", "../../../../../node_modules/@smithy/types/dist-es/client.js", "../../../../../node_modules/@smithy/types/dist-es/command.js", "../../../../../node_modules/@smithy/types/dist-es/connection/config.js", "../../../../../node_modules/@smithy/types/dist-es/connection/manager.js", "../../../../../node_modules/@smithy/types/dist-es/connection/pool.js", "../../../../../node_modules/@smithy/types/dist-es/connection/index.js", "../../../../../node_modules/@smithy/types/dist-es/crypto.js", "../../../../../node_modules/@smithy/types/dist-es/encode.js", "../../../../../node_modules/@smithy/types/dist-es/endpoint.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/shared.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/index.js", "../../../../../node_modules/@smithy/types/dist-es/eventStream.js", "../../../../../node_modules/@smithy/types/dist-es/extensions/checksum.js", "../../../../../node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js", "../../../../../node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js", "../../../../../node_modules/@smithy/types/dist-es/extensions/index.js", "../../../../../node_modules/@smithy/types/dist-es/feature-ids.js", "../../../../../node_modules/@smithy/types/dist-es/http.js", "../../../../../node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js", "../../../../../node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js", "../../../../../node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js", "../../../../../node_modules/@smithy/types/dist-es/identity/identity.js", "../../../../../node_modules/@smithy/types/dist-es/identity/tokenIdentity.js", "../../../../../node_modules/@smithy/types/dist-es/identity/index.js", "../../../../../node_modules/@smithy/types/dist-es/logger.js", "../../../../../node_modules/@smithy/types/dist-es/middleware.js", "../../../../../node_modules/@smithy/types/dist-es/pagination.js", "../../../../../node_modules/@smithy/types/dist-es/profile.js", "../../../../../node_modules/@smithy/types/dist-es/response.js", "../../../../../node_modules/@smithy/types/dist-es/retry.js", "../../../../../node_modules/@smithy/types/dist-es/schema/schema.js", "../../../../../node_modules/@smithy/types/dist-es/schema/traits.js", "../../../../../node_modules/@smithy/types/dist-es/schema/schema-deprecated.js", "../../../../../node_modules/@smithy/types/dist-es/schema/sentinels.js", "../../../../../node_modules/@smithy/types/dist-es/schema/static-schemas.js", "../../../../../node_modules/@smithy/types/dist-es/serde.js", "../../../../../node_modules/@smithy/types/dist-es/shapes.js", "../../../../../node_modules/@smithy/types/dist-es/signature.js", "../../../../../node_modules/@smithy/types/dist-es/stream.js", "../../../../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js", "../../../../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js", "../../../../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js", "../../../../../node_modules/@smithy/types/dist-es/transfer.js", "../../../../../node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js", "../../../../../node_modules/@smithy/types/dist-es/transform/mutable.js", "../../../../../node_modules/@smithy/types/dist-es/transform/no-undefined.js", "../../../../../node_modules/@smithy/types/dist-es/transform/type-transform.js", "../../../../../node_modules/@smithy/types/dist-es/uri.js", "../../../../../node_modules/@smithy/types/dist-es/util.js", "../../../../../node_modules/@smithy/types/dist-es/waiter.js", "../../../../../node_modules/@smithy/types/dist-es/index.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/Field.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/Fields.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/httpHandler.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/httpRequest.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/httpResponse.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/isValidHostname.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/types.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-expect-continue/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/constants.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/client/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js", "../../../../../node_modules/@smithy/core/dist-es/getSmithyContext.js", "../../../../../node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js", "../../../../../node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js", "../../../../../node_modules/@smithy/util-middleware/dist-es/index.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-signing/index.js", "../../../../../node_modules/@smithy/core/dist-es/normalizeProvider.js", "../../../../../node_modules/@smithy/core/dist-es/pagination/createPaginator.js", "../../../../../node_modules/@smithy/util-base64/dist-es/constants.browser.js", "../../../../../node_modules/@smithy/util-base64/dist-es/fromBase64.browser.js", "../../../../../node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js", "../../../../../node_modules/@smithy/util-utf8/dist-es/toUint8Array.js", "../../../../../node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js", "../../../../../node_modules/@smithy/util-utf8/dist-es/index.js", "../../../../../node_modules/@smithy/util-base64/dist-es/toBase64.browser.js", "../../../../../node_modules/@smithy/util-base64/dist-es/index.js", "../../../../../node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js", "../../../../../node_modules/@smithy/util-stream/dist-es/checksum/ChecksumStream.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/stream-type-check.js", "../../../../../node_modules/@smithy/util-stream/dist-es/checksum/createChecksumStream.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/ByteArrayCollector.js", "../../../../../node_modules/@smithy/util-stream/dist-es/createBufferedReadableStream.js", "../../../../../node_modules/@smithy/util-stream/dist-es/getAwsChunkedEncodingStream.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/headStream.browser.js", "../../../../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri.js", "../../../../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri-path.js", "../../../../../node_modules/@smithy/util-uri-escape/dist-es/index.js", "../../../../../node_modules/@smithy/querystring-builder/dist-es/index.js", "../../../../../node_modules/@smithy/fetch-http-handler/dist-es/create-request.js", "../../../../../node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js", "../../../../../node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js", "../../../../../node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js", "../../../../../node_modules/@smithy/fetch-http-handler/dist-es/index.js", "../../../../../node_modules/@smithy/util-hex-encoding/dist-es/index.js", "../../../../../node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/splitStream.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/deref.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js", "../../../../../node_modules/@smithy/querystring-parser/dist-es/index.js", "../../../../../node_modules/@smithy/url-parser/dist-es/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/endpoints/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js", "../../../../../node_modules/@smithy/uuid/dist-es/randomUUID.browser.js", "../../../../../node_modules/@smithy/uuid/dist-es/v4.js", "../../../../../node_modules/@smithy/uuid/dist-es/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/generateIdempotencyToken.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/split-every.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/event-streams/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/index.js", "../../../../../node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js", "../../../../../node_modules/@smithy/core/dist-es/setFeature.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js", "../../../../../node_modules/@smithy/core/dist-es/index.js", "../../../../../node_modules/@smithy/property-provider/dist-es/ProviderError.js", "../../../../../node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js", "../../../../../node_modules/@smithy/property-provider/dist-es/TokenProviderError.js", "../../../../../node_modules/@smithy/property-provider/dist-es/chain.js", "../../../../../node_modules/@smithy/property-provider/dist-es/fromStatic.js", "../../../../../node_modules/@smithy/property-provider/dist-es/memoize.js", "../../../../../node_modules/@smithy/property-provider/dist-es/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/constants.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js", "../../../../../node_modules/@smithy/is-array-buffer/dist-es/index.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/headerUtil.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/prepareRequest.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/utilDate.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/SignatureV4.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/signature-v4a-container.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js", "../../../../../node_modules/@smithy/util-body-length-browser/dist-es/calculateBodyLength.js", "../../../../../node_modules/@smithy/util-body-length-browser/dist-es/index.js", "../../../../../node_modules/@smithy/middleware-stack/dist-es/MiddlewareStack.js", "../../../../../node_modules/@smithy/middleware-stack/dist-es/index.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/client.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/schemaLogFilter.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/command.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/constants.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/exceptions.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/default-error-handler.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/defaults-mode.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/extensions/retry.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/extensions/index.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/get-array-if-single-item.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/get-value-from-text-node.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/is-serializable-header-value.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/object-mapping.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/resolve-path.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/ser-utils.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/serde-json.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/escape-attribute.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/escape-element.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/XmlText.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/XmlNode.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.browser.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QuerySerializerSettings.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmForRequest.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumLocationName.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeader.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeaderWithPrefix.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isStreaming.js", "../../../../../node_modules/tslib/tslib.es6.mjs", "../../../../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js", "../../../../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js", "../../../../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js", "../../../../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/index.js", "../../../../../node_modules/@aws-crypto/util/src/convertToBuffer.ts", "../../../../../node_modules/@aws-crypto/util/src/isEmptyData.ts", "../../../../../node_modules/@aws-crypto/util/src/numToUint8.ts", "../../../../../node_modules/@aws-crypto/util/src/uint32ArrayFrom.ts", "../../../../../node_modules/@aws-crypto/util/src/index.ts", "../../../../../node_modules/@aws-crypto/crc32c/src/aws_crc32c.ts", "../../../../../node_modules/@aws-crypto/crc32c/src/index.ts", "../../../../../node_modules/@aws-sdk/crc64-nvme/dist-es/Crc64Nvme.js", "../../../../../node_modules/@aws-sdk/crc64-nvme/dist-es/crc64-nvme-crt-container.js", "../../../../../node_modules/@aws-sdk/crc64-nvme/dist-es/index.js", "../../../../../node_modules/@aws-crypto/crc32/src/aws_crc32.ts", "../../../../../node_modules/@aws-crypto/crc32/src/index.ts", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getCrc32ChecksumAlgorithmFunction.browser.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/types.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/selectChecksumAlgorithmFunction.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/stringHasher.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsInputMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmListForResponse.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isChecksumWithPartNumber.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksum.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/validateChecksumFromResponse.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsResponseMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getFlexibleChecksumsPlugin.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/resolveFlexibleChecksumsConfig.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-host-header/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-logger/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/configuration.js", "../../../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/recursionDetectionMiddleware.browser.js", "../../../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/getRecursionDetectionPlugin.js", "../../../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/check-content-length-header.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-endpoint-middleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-middleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-expires-middleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCache.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCacheEntry.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityProviderImpl.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/constants.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/SignatureV4S3Express.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/signS3Express.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressHttpSigningMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/index.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3Configuration.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js", "../../../../../node_modules/@aws-sdk/util-arn-parser/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/bucket-endpoint-middleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/validate-bucket-name.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/cache/EndpointCache.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/isIpAddress.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/isValidHostLabel.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/customEndpointFunctions.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/debug/debugId.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/debug/toDebugString.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/debug/index.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointError.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointFunctions.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointRuleObject.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/ErrorRuleObject.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/RuleSetObject.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/TreeRuleObject.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/shared.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/index.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/booleanEquals.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/isSet.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/not.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/parseURL.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/stringEquals.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/substring.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/uriEncode.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/index.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/callFunction.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointUrl.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/index.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/index.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/aws.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveDefaultAwsRegionalEndpointsConfig.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/index.js", "../../../../../node_modules/@smithy/util-retry/dist-es/config.js", "../../../../../node_modules/@smithy/service-error-classification/dist-es/constants.js", "../../../../../node_modules/@smithy/service-error-classification/dist-es/index.js", "../../../../../node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js", "../../../../../node_modules/@smithy/util-retry/dist-es/constants.js", "../../../../../node_modules/@smithy/util-retry/dist-es/defaultRetryBackoffStrategy.js", "../../../../../node_modules/@smithy/util-retry/dist-es/defaultRetryToken.js", "../../../../../node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js", "../../../../../node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js", "../../../../../node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js", "../../../../../node_modules/@smithy/util-retry/dist-es/types.js", "../../../../../node_modules/@smithy/util-retry/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/encode-features.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/index.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseFipsEndpointConfigOptions.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveCustomEndpointsConfig.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveEndpointsConfig.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/index.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/config.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/checkRegion.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/isFipsRegion.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/getRealRegion.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/resolveRegionConfig.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/index.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionInfo/PartitionHash.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionInfo/RegionHash.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionInfo/getRegionInfo.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionInfo/index.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/index.js", "../../../../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/EventStreamSerdeConfig.js", "../../../../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/index.js", "../../../../../node_modules/@smithy/middleware-content-length/dist-es/index.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/s3.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/index.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.browser.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/index.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js", "../../../../../node_modules/@smithy/middleware-serde/dist-es/deserializerMiddleware.js", "../../../../../node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js", "../../../../../node_modules/@smithy/middleware-serde/dist-es/serdePlugin.js", "../../../../../node_modules/@smithy/middleware-serde/dist-es/index.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointRequiredConfig.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/types.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/index.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/delayDecider.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/retryDecider.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/util.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/StandardRetryStrategy.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/AdaptiveRetryStrategy.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/configurations.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/omitRetryHeadersMiddleware.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/isStreamingPayload/isStreamingPayload.browser.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/index.js", "../../../../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/signature-v4-crt-container.js", "../../../../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4MultiRegion.js", "../../../../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/ruleset.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/endpointResolver.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthSchemeProvider.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/errors.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateSessionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/package.json", "../../../../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js", "../../../../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js", "../../../../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js", "../../../../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/index.js", "../../../../../node_modules/@aws-crypto/sha1-browser/src/isEmptyData.ts", "../../../../../node_modules/@aws-crypto/sha1-browser/src/constants.ts", "../../../../../node_modules/@aws-sdk/util-locate-window/dist-es/index.js", "../../../../../node_modules/@aws-crypto/sha1-browser/src/webCryptoSha1.ts", "../../../../../node_modules/@aws-crypto/supports-web-crypto/src/supportsWebCrypto.ts", "../../../../../node_modules/@aws-crypto/supports-web-crypto/src/index.ts", "../../../../../node_modules/@aws-crypto/sha1-browser/src/crossPlatformSha1.ts", "../../../../../node_modules/@aws-crypto/sha1-browser/src/index.ts", "../../../../../node_modules/@aws-crypto/sha256-browser/src/constants.ts", "../../../../../node_modules/@aws-crypto/sha256-browser/src/webCryptoSha256.ts", "../../../../../node_modules/@aws-crypto/sha256-js/src/constants.ts", "../../../../../node_modules/@aws-crypto/sha256-js/src/RawSha256.ts", "../../../../../node_modules/@aws-crypto/sha256-js/src/jsSha256.ts", "../../../../../node_modules/@aws-crypto/sha256-js/src/index.ts", "../../../../../node_modules/@aws-crypto/sha256-browser/src/crossPlatformSha256.ts", "../../../../../node_modules/@aws-crypto/sha256-browser/src/index.ts", "../../../../../node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/Int64.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/HeaderMarshaller.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/splitMessage.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/EventStreamCodec.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/Message.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/MessageDecoderStream.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/MessageEncoderStream.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageDecoderStream.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageEncoderStream.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/index.js", "../../../../../node_modules/@smithy/eventstream-serde-universal/dist-es/getChunkedStream.js", "../../../../../node_modules/@smithy/eventstream-serde-universal/dist-es/getUnmarshalledStream.js", "../../../../../node_modules/@smithy/eventstream-serde-universal/dist-es/EventStreamMarshaller.js", "../../../../../node_modules/@smithy/eventstream-serde-universal/dist-es/provider.js", "../../../../../node_modules/@smithy/eventstream-serde-universal/dist-es/index.js", "../../../../../node_modules/@smithy/eventstream-serde-browser/dist-es/utils.js", "../../../../../node_modules/@smithy/eventstream-serde-browser/dist-es/EventStreamMarshaller.js", "../../../../../node_modules/@smithy/eventstream-serde-browser/dist-es/provider.js", "../../../../../node_modules/@smithy/eventstream-serde-browser/dist-es/index.js", "../../../../../node_modules/@smithy/chunked-blob-reader/dist-es/index.js", "../../../../../node_modules/@smithy/hash-blob-browser/dist-es/index.js", "../../../../../node_modules/@smithy/invalid-dependency/dist-es/invalidFunction.js", "../../../../../node_modules/@smithy/invalid-dependency/dist-es/invalidProvider.js", "../../../../../node_modules/@smithy/invalid-dependency/dist-es/index.js", "../../../../../node_modules/@smithy/md5-js/dist-es/constants.js", "../../../../../node_modules/@smithy/md5-js/dist-es/index.js", "../../../../../node_modules/@smithy/util-defaults-mode-browser/dist-es/constants.js", "../../../../../node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js", "../../../../../node_modules/@smithy/util-defaults-mode-browser/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.shared.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.browser.js", "../../../../../node_modules/@aws-sdk/region-config-resolver/dist-es/extensions/index.js", "../../../../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/awsRegionConfig.js", "../../../../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/stsRegionDefaultResolver.browser.js", "../../../../../node_modules/@aws-sdk/region-config-resolver/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthExtensionConfiguration.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/runtimeExtensions.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/S3Client.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/AbortMultipartUploadCommand.js", "../../../../../node_modules/@aws-sdk/middleware-ssec/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CompleteMultipartUploadCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CopyObjectCommand.js", "../../../../../node_modules/@aws-sdk/middleware-location-constraint/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataTableConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateMultipartUploadCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketAnalyticsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCorsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketEncryptionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketIntelligentTieringConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketInventoryConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketLifecycleCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataTableConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetricsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketOwnershipControlsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketPolicyCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketReplicationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketWebsiteCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeletePublicAccessBlockCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAbacCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAccelerateConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAclCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAnalyticsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketCorsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketEncryptionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketIntelligentTieringConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketInventoryConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLifecycleConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLocationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLoggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataTableConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetricsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketNotificationConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketOwnershipControlsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyStatusCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketReplicationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketRequestPaymentCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketVersioningCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketWebsiteCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAclCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAttributesCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLegalHoldCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLockConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectRetentionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTorrentCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetPublicAccessBlockCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadBucketCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketAnalyticsConfigurationsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketIntelligentTieringConfigurationsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketInventoryConfigurationsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketMetricsConfigurationsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListDirectoryBucketsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListMultipartUploadsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsV2Command.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectVersionsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListPartsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAbacCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAccelerateConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAclCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAnalyticsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketCorsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketEncryptionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketIntelligentTieringConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketInventoryConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLifecycleConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLoggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketMetricsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketNotificationConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketOwnershipControlsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketPolicyCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketReplicationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketRequestPaymentCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketVersioningCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketWebsiteCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectAclCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLegalHoldCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLockConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectRetentionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutPublicAccessBlockCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/RenameObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/RestoreObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/SelectObjectContentCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataInventoryTableConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataJournalTableConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateObjectEncryptionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCopyCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/WriteGetObjectResponseCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListBucketsPaginator.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListDirectoryBucketsPaginator.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListObjectsV2Paginator.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListPartsPaginator.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/circularReplacer.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/utils/sleep.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/waiter.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/poller.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/utils/validate.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/utils/index.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/createWaiter.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketExists.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketNotExists.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectExists.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectNotExists.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/S3.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/Interfaces.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/waiters/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/enums.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/models_0.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/models_1.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/index.js", "../../../../../node_modules/@aws-sdk/util-format-url/dist-es/index.js", "../../../../../node_modules/@aws-sdk/s3-request-presigner/dist-es/constants.js", "../../../../../node_modules/@aws-sdk/s3-request-presigner/dist-es/presigner.js", "../../../../../node_modules/@aws-sdk/s3-request-presigner/dist-es/getSignedUrl.js", "../../../../../node_modules/@aws-sdk/s3-request-presigner/dist-es/index.js", "../../../src/lib/s3-client.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/middleware.ts", "../../../../../node_modules/@trpc/server/src/vendor/standard-schema-v1/error.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/parser.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/procedureBuilder.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/rootConfig.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/initTRPC.ts", "../../../../../node_modules/@trpc/server/dist/index.mjs", "../../../src/trpc/trpc-index.ts", "../../../src/stores/product-store.ts", "../../../src/stores/product-tag-store.ts", "../../../src/trpc/apis/common-apis/common.ts", "../../../src/apis/common-apis/apis/common-product.controller.ts", "../../../src/apis/common-apis/apis/common-product.router.ts", "../../../src/apis/common-apis/apis/common.router.ts", "../../../src/v1-router.ts", "../../../src/test-controller.ts", "../../../src/middleware/auth.middleware.ts", "../../../src/main-router.ts", "../../../../../node_modules/zod/v4/core/core.js", "../../../../../node_modules/zod/v4/core/util.js", "../../../../../node_modules/zod/v4/core/errors.js", "../../../../../node_modules/zod/v4/core/parse.js", "../../../../../node_modules/zod/v4/core/regexes.js", "../../../../../node_modules/zod/v4/core/checks.js", "../../../../../node_modules/zod/v4/core/doc.js", "../../../../../node_modules/zod/v4/core/versions.js", "../../../../../node_modules/zod/v4/core/schemas.js", "../../../../../node_modules/zod/v4/locales/ar.js", "../../../../../node_modules/zod/v4/locales/az.js", "../../../../../node_modules/zod/v4/locales/be.js", "../../../../../node_modules/zod/v4/locales/bg.js", "../../../../../node_modules/zod/v4/locales/ca.js", "../../../../../node_modules/zod/v4/locales/cs.js", "../../../../../node_modules/zod/v4/locales/da.js", "../../../../../node_modules/zod/v4/locales/de.js", "../../../../../node_modules/zod/v4/locales/en.js", "../../../../../node_modules/zod/v4/locales/eo.js", "../../../../../node_modules/zod/v4/locales/es.js", "../../../../../node_modules/zod/v4/locales/fa.js", "../../../../../node_modules/zod/v4/locales/fi.js", "../../../../../node_modules/zod/v4/locales/fr.js", "../../../../../node_modules/zod/v4/locales/fr-CA.js", "../../../../../node_modules/zod/v4/locales/he.js", "../../../../../node_modules/zod/v4/locales/hu.js", "../../../../../node_modules/zod/v4/locales/hy.js", "../../../../../node_modules/zod/v4/locales/id.js", "../../../../../node_modules/zod/v4/locales/is.js", "../../../../../node_modules/zod/v4/locales/it.js", "../../../../../node_modules/zod/v4/locales/ja.js", "../../../../../node_modules/zod/v4/locales/ka.js", "../../../../../node_modules/zod/v4/locales/km.js", "../../../../../node_modules/zod/v4/locales/kh.js", "../../../../../node_modules/zod/v4/locales/ko.js", "../../../../../node_modules/zod/v4/locales/lt.js", "../../../../../node_modules/zod/v4/locales/mk.js", "../../../../../node_modules/zod/v4/locales/ms.js", "../../../../../node_modules/zod/v4/locales/nl.js", "../../../../../node_modules/zod/v4/locales/no.js", "../../../../../node_modules/zod/v4/locales/ota.js", "../../../../../node_modules/zod/v4/locales/ps.js", "../../../../../node_modules/zod/v4/locales/pl.js", "../../../../../node_modules/zod/v4/locales/pt.js", "../../../../../node_modules/zod/v4/locales/ru.js", "../../../../../node_modules/zod/v4/locales/sl.js", "../../../../../node_modules/zod/v4/locales/sv.js", "../../../../../node_modules/zod/v4/locales/ta.js", "../../../../../node_modules/zod/v4/locales/th.js", "../../../../../node_modules/zod/v4/locales/tr.js", "../../../../../node_modules/zod/v4/locales/uk.js", "../../../../../node_modules/zod/v4/locales/ua.js", "../../../../../node_modules/zod/v4/locales/ur.js", "../../../../../node_modules/zod/v4/locales/uz.js", "../../../../../node_modules/zod/v4/locales/vi.js", "../../../../../node_modules/zod/v4/locales/zh-CN.js", "../../../../../node_modules/zod/v4/locales/zh-TW.js", "../../../../../node_modules/zod/v4/locales/yo.js", "../../../../../node_modules/zod/v4/locales/index.js", "../../../../../node_modules/zod/v4/core/registries.js", "../../../../../node_modules/zod/v4/core/api.js", "../../../../../node_modules/zod/v4/core/to-json-schema.js", "../../../../../node_modules/zod/v4/core/json-schema-processors.js", "../../../../../node_modules/zod/v4/core/json-schema-generator.js", "../../../../../node_modules/zod/v4/core/json-schema.js", "../../../../../node_modules/zod/v4/core/index.js", "../../../../../node_modules/zod/v4/classic/checks.js", "../../../../../node_modules/zod/v4/classic/iso.js", "../../../../../node_modules/zod/v4/classic/errors.js", "../../../../../node_modules/zod/v4/classic/parse.js", "../../../../../node_modules/zod/v4/classic/schemas.js", "../../../../../node_modules/zod/v4/classic/compat.js", "../../../../../node_modules/zod/v4/classic/from-json-schema.js", "../../../../../node_modules/zod/v4/classic/coerce.js", "../../../../../node_modules/zod/v4/classic/external.js", "../../../../../node_modules/zod/index.js", "../../../src/trpc/apis/admin-apis/apis/complaint.ts", "../../../../../node_modules/dayjs/dayjs.min.js", "../../../src/trpc/apis/admin-apis/apis/coupon.ts", "../../../../../node_modules/unenv/dist/runtime/npm/node-fetch.mjs", "required-unenv-alias:node-fetch", "node-built-in-modules:node:assert", "node-built-in-modules:node:zlib", "../../../../../node_modules/promise-limit/index.js", "../../../../../node_modules/err-code/index.js", "../../../../../node_modules/retry/lib/retry_operation.js", "../../../../../node_modules/retry/lib/retry.js", "../../../../../node_modules/retry/index.js", "../../../../../node_modules/promise-retry/index.js", "../../../node_modules/expo-server-sdk/src/ExpoClientValues.ts", "../../../node_modules/expo-server-sdk/package.json", "../../../node_modules/expo-server-sdk/src/ExpoClient.ts", "../../../src/lib/const-strings.ts", "../../../src/lib/notif-job.ts", "../../../src/lib/redis-client.ts", "../../../../../node_modules/axios/lib/helpers/bind.js", "../../../../../node_modules/axios/lib/utils.js", "../../../../../node_modules/axios/lib/core/AxiosError.js", "../../../../../node_modules/axios/lib/helpers/null.js", "../../../../../node_modules/axios/lib/helpers/toFormData.js", "../../../../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js", "../../../../../node_modules/axios/lib/helpers/buildURL.js", "../../../../../node_modules/axios/lib/core/InterceptorManager.js", "../../../../../node_modules/axios/lib/defaults/transitional.js", "../../../../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js", "../../../../../node_modules/axios/lib/platform/browser/classes/FormData.js", "../../../../../node_modules/axios/lib/platform/browser/classes/Blob.js", "../../../../../node_modules/axios/lib/platform/browser/index.js", "../../../../../node_modules/axios/lib/platform/common/utils.js", "../../../../../node_modules/axios/lib/platform/index.js", "../../../../../node_modules/axios/lib/helpers/toURLEncodedForm.js", "../../../../../node_modules/axios/lib/helpers/formDataToJSON.js", "../../../../../node_modules/axios/lib/defaults/index.js", "../../../../../node_modules/axios/lib/helpers/parseHeaders.js", "../../../../../node_modules/axios/lib/core/AxiosHeaders.js", "../../../../../node_modules/axios/lib/core/transformData.js", "../../../../../node_modules/axios/lib/cancel/isCancel.js", "../../../../../node_modules/axios/lib/cancel/CanceledError.js", "../../../../../node_modules/axios/lib/core/settle.js", "../../../../../node_modules/axios/lib/helpers/parseProtocol.js", "../../../../../node_modules/axios/lib/helpers/speedometer.js", "../../../../../node_modules/axios/lib/helpers/throttle.js", "../../../../../node_modules/axios/lib/helpers/progressEventReducer.js", "../../../../../node_modules/axios/lib/helpers/isURLSameOrigin.js", "../../../../../node_modules/axios/lib/helpers/cookies.js", "../../../../../node_modules/axios/lib/helpers/isAbsoluteURL.js", "../../../../../node_modules/axios/lib/helpers/combineURLs.js", "../../../../../node_modules/axios/lib/core/buildFullPath.js", "../../../../../node_modules/axios/lib/core/mergeConfig.js", "../../../../../node_modules/axios/lib/helpers/resolveConfig.js", "../../../../../node_modules/axios/lib/adapters/xhr.js", "../../../../../node_modules/axios/lib/helpers/composeSignals.js", "../../../../../node_modules/axios/lib/helpers/trackStream.js", "../../../../../node_modules/axios/lib/adapters/fetch.js", "../../../../../node_modules/axios/lib/adapters/adapters.js", "../../../../../node_modules/axios/lib/core/dispatchRequest.js", "../../../../../node_modules/axios/lib/env/data.js", "../../../../../node_modules/axios/lib/helpers/validator.js", "../../../../../node_modules/axios/lib/core/Axios.js", "../../../../../node_modules/axios/lib/cancel/CancelToken.js", "../../../../../node_modules/axios/lib/helpers/spread.js", "../../../../../node_modules/axios/lib/helpers/isAxiosError.js", "../../../../../node_modules/axios/lib/helpers/HttpStatusCode.js", "../../../../../node_modules/axios/lib/axios.js", "../../../../../node_modules/axios/index.js", "../../../src/lib/telegram-service.ts", "../../../src/lib/post-order-handler.ts", "../../../src/stores/user-negativity-store.ts", "../../../src/trpc/apis/admin-apis/apis/order.ts", "../../../src/trpc/apis/admin-apis/apis/vendor-snippets.ts", "../../../src/lib/roles-manager.ts", "../../../src/lib/const-keys.ts", "../../../src/lib/const-store.ts", "../../../src/stores/slot-store.ts", "../../../src/stores/banner-store.ts", "../../../../../node_modules/@turf/helpers/index.ts", "../../../../../node_modules/@turf/invariant/index.ts", "../../../../../node_modules/robust-predicates/esm/util.js", "../../../../../node_modules/robust-predicates/esm/orient2d.js", "../../../../../node_modules/robust-predicates/esm/orient3d.js", "../../../../../node_modules/robust-predicates/esm/incircle.js", "../../../../../node_modules/robust-predicates/esm/insphere.js", "../../../../../node_modules/robust-predicates/index.js", "../../../../../node_modules/point-in-polygon-hao/dist/esm/index.js", "../../../../../node_modules/@turf/boolean-point-in-polygon/index.ts", "../../../../../node_modules/@turf/turf/index.ts", "../../../src/lib/mbnr-geojson.ts", "../../../src/trpc/apis/common-apis/common-trpc-index.ts", "../../../src/trpc/apis/user-apis/apis/stores.ts", "../../../src/trpc/apis/user-apis/apis/slots.ts", "../../../src/trpc/apis/user-apis/apis/banners.ts", "../../../../../packages/shared/types/index.ts", "../../../../../packages/shared/index.ts", "../../../src/lib/retry.ts", "../../../src/lib/cloud_cache.ts", "../../../src/stores/store-initializer.ts", "../../../src/trpc/apis/admin-apis/apis/slots.ts", "../../../src/trpc/apis/admin-apis/apis/product.ts", "../../../../../node_modules/unenv/dist/runtime/node/internal/crypto/web.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/crypto/node.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/crypto/constants.mjs", "../../../../../node_modules/unenv/dist/runtime/node/crypto.mjs", "../../../../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.mjs", "../../../../../node_modules/bcryptjs/index.js", "../../../src/trpc/apis/admin-apis/apis/staff-user.ts", "../../../src/trpc/apis/admin-apis/apis/store.ts", "../../../src/trpc/apis/admin-apis/apis/payments.ts", "../../../src/trpc/apis/admin-apis/apis/banner.ts", "../../../src/trpc/apis/admin-apis/apis/user.ts", "../../../src/trpc/apis/admin-apis/apis/const.ts", "../../../src/trpc/apis/admin-apis/apis/admin-trpc-index.ts", "../../../src/lib/license-util.ts", "../../../src/trpc/apis/user-apis/apis/address.ts", "../../../src/lib/otp-utils.ts", "../../../src/trpc/apis/user-apis/apis/auth.ts", "../../../src/trpc/apis/user-apis/apis/cart.ts", "../../../src/trpc/apis/user-apis/apis/complaint.ts", "../../../src/trpc/apis/user-apis/apis/order.ts", "../../../src/trpc/apis/user-apis/apis/product.ts", "../../../src/trpc/apis/user-apis/apis/user.ts", "../../../src/trpc/apis/user-apis/apis/coupon.ts", "../../../src/lib/payments-utils.ts", "../../../src/trpc/apis/user-apis/apis/payments.ts", "../../../src/trpc/apis/user-apis/apis/file-upload.ts", "../../../src/trpc/apis/user-apis/apis/tags.ts", "../../../src/trpc/apis/user-apis/apis/user-trpc-index.ts", "../../../src/trpc/router.ts", "../../../src/app.ts", "../bundle-vljdhV/middleware-loader.entry.ts", "../bundle-vljdhV/middleware-insertion-facade.js", "../../../worker.ts", "../../../../../node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts", "../../../../../node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts", "../../../../../node_modules/wrangler/templates/middleware/common.ts"], + "sourceRoot": "/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/dev-RJsRQO", + "sourcesContent": ["function stripCfConnectingIPHeader(input, init) {\n\tconst request = new Request(input, init);\n\trequest.headers.delete(\"CF-Connecting-IP\");\n\treturn request;\n}\n\nglobalThis.fetch = new Proxy(globalThis.fetch, {\n\tapply(target, thisArg, argArray) {\n\t\treturn Reflect.apply(target, thisArg, [\n\t\t\tstripCfConnectingIPHeader.apply(null, argArray),\n\t\t]);\n\t},\n});\n", "/*@__NO_SIDE_EFFECTS__*/ export function rawHeaders(headers) {\n\tconst rawHeaders = [];\n\tfor (const key in headers) {\n\t\tif (Array.isArray(headers[key])) {\n\t\t\tfor (const h of headers[key]) {\n\t\t\t\trawHeaders.push(key, h);\n\t\t\t}\n\t\t} else {\n\t\t\trawHeaders.push(key, headers[key]);\n\t\t}\n\t}\n\treturn rawHeaders;\n}\n/*@__NO_SIDE_EFFECTS__*/ export function mergeFns(...functions) {\n\treturn function(...args) {\n\t\tfor (const fn of functions) {\n\t\t\tfn(...args);\n\t\t}\n\t};\n}\n/*@__NO_SIDE_EFFECTS__*/ export function createNotImplementedError(name) {\n\treturn new Error(`[unenv] ${name} is not implemented yet!`);\n}\n/*@__NO_SIDE_EFFECTS__*/ export function notImplemented(name) {\n\tconst fn = () => {\n\t\tthrow createNotImplementedError(name);\n\t};\n\treturn Object.assign(fn, { __unenv__: true });\n}\n/*@__NO_SIDE_EFFECTS__*/ export function notImplementedAsync(name) {\n\tconst fn = notImplemented(name);\n\tfn.__promisify__ = () => notImplemented(name + \".__promisify__\");\n\tfn.native = fn;\n\treturn fn;\n}\n/*@__NO_SIDE_EFFECTS__*/ export function notImplementedClass(name) {\n\treturn class {\n\t\t__unenv__ = true;\n\t\tconstructor() {\n\t\t\tthrow new Error(`[unenv] ${name} is not implemented yet!`);\n\t\t}\n\t};\n}\n", "import { createNotImplementedError } from \"../../../_internal/utils.mjs\";\nconst _timeOrigin = globalThis.performance?.timeOrigin ?? Date.now();\nconst _performanceNow = globalThis.performance?.now ? globalThis.performance.now.bind(globalThis.performance) : () => Date.now() - _timeOrigin;\nconst nodeTiming = {\n\tname: \"node\",\n\tentryType: \"node\",\n\tstartTime: 0,\n\tduration: 0,\n\tnodeStart: 0,\n\tv8Start: 0,\n\tbootstrapComplete: 0,\n\tenvironment: 0,\n\tloopStart: 0,\n\tloopExit: 0,\n\tidleTime: 0,\n\tuvMetricsInfo: {\n\t\tloopCount: 0,\n\t\tevents: 0,\n\t\teventsWaiting: 0\n\t},\n\tdetail: undefined,\n\ttoJSON() {\n\t\treturn this;\n\t}\n};\nexport class PerformanceEntry {\n\t__unenv__ = true;\n\tdetail;\n\tentryType = \"event\";\n\tname;\n\tstartTime;\n\tconstructor(name, options) {\n\t\tthis.name = name;\n\t\tthis.startTime = options?.startTime || _performanceNow();\n\t\tthis.detail = options?.detail;\n\t}\n\tget duration() {\n\t\treturn _performanceNow() - this.startTime;\n\t}\n\ttoJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tentryType: this.entryType,\n\t\t\tstartTime: this.startTime,\n\t\t\tduration: this.duration,\n\t\t\tdetail: this.detail\n\t\t};\n\t}\n}\nexport const PerformanceMark = class PerformanceMark extends PerformanceEntry {\n\tentryType = \"mark\";\n\tconstructor() {\n\t\tsuper(...arguments);\n\t}\n\tget duration() {\n\t\treturn 0;\n\t}\n};\nexport class PerformanceMeasure extends PerformanceEntry {\n\tentryType = \"measure\";\n}\nexport class PerformanceResourceTiming extends PerformanceEntry {\n\tentryType = \"resource\";\n\tserverTiming = [];\n\tconnectEnd = 0;\n\tconnectStart = 0;\n\tdecodedBodySize = 0;\n\tdomainLookupEnd = 0;\n\tdomainLookupStart = 0;\n\tencodedBodySize = 0;\n\tfetchStart = 0;\n\tinitiatorType = \"\";\n\tname = \"\";\n\tnextHopProtocol = \"\";\n\tredirectEnd = 0;\n\tredirectStart = 0;\n\trequestStart = 0;\n\tresponseEnd = 0;\n\tresponseStart = 0;\n\tsecureConnectionStart = 0;\n\tstartTime = 0;\n\ttransferSize = 0;\n\tworkerStart = 0;\n\tresponseStatus = 0;\n}\nexport class PerformanceObserverEntryList {\n\t__unenv__ = true;\n\tgetEntries() {\n\t\treturn [];\n\t}\n\tgetEntriesByName(_name, _type) {\n\t\treturn [];\n\t}\n\tgetEntriesByType(type) {\n\t\treturn [];\n\t}\n}\nexport class Performance {\n\t__unenv__ = true;\n\ttimeOrigin = _timeOrigin;\n\teventCounts = new Map();\n\t_entries = [];\n\t_resourceTimingBufferSize = 0;\n\tnavigation = undefined;\n\ttiming = undefined;\n\ttimerify(_fn, _options) {\n\t\tthrow createNotImplementedError(\"Performance.timerify\");\n\t}\n\tget nodeTiming() {\n\t\treturn nodeTiming;\n\t}\n\teventLoopUtilization() {\n\t\treturn {};\n\t}\n\tmarkResourceTiming() {\n\t\treturn new PerformanceResourceTiming(\"\");\n\t}\n\tonresourcetimingbufferfull = null;\n\tnow() {\n\t\tif (this.timeOrigin === _timeOrigin) {\n\t\t\treturn _performanceNow();\n\t\t}\n\t\treturn Date.now() - this.timeOrigin;\n\t}\n\tclearMarks(markName) {\n\t\tthis._entries = markName ? this._entries.filter((e) => e.name !== markName) : this._entries.filter((e) => e.entryType !== \"mark\");\n\t}\n\tclearMeasures(measureName) {\n\t\tthis._entries = measureName ? this._entries.filter((e) => e.name !== measureName) : this._entries.filter((e) => e.entryType !== \"measure\");\n\t}\n\tclearResourceTimings() {\n\t\tthis._entries = this._entries.filter((e) => e.entryType !== \"resource\" || e.entryType !== \"navigation\");\n\t}\n\tgetEntries() {\n\t\treturn this._entries;\n\t}\n\tgetEntriesByName(name, type) {\n\t\treturn this._entries.filter((e) => e.name === name && (!type || e.entryType === type));\n\t}\n\tgetEntriesByType(type) {\n\t\treturn this._entries.filter((e) => e.entryType === type);\n\t}\n\tmark(name, options) {\n\t\tconst entry = new PerformanceMark(name, options);\n\t\tthis._entries.push(entry);\n\t\treturn entry;\n\t}\n\tmeasure(measureName, startOrMeasureOptions, endMark) {\n\t\tlet start;\n\t\tlet end;\n\t\tif (typeof startOrMeasureOptions === \"string\") {\n\t\t\tstart = this.getEntriesByName(startOrMeasureOptions, \"mark\")[0]?.startTime;\n\t\t\tend = this.getEntriesByName(endMark, \"mark\")[0]?.startTime;\n\t\t} else {\n\t\t\tstart = Number.parseFloat(startOrMeasureOptions?.start) || this.now();\n\t\t\tend = Number.parseFloat(startOrMeasureOptions?.end) || this.now();\n\t\t}\n\t\tconst entry = new PerformanceMeasure(measureName, {\n\t\t\tstartTime: start,\n\t\t\tdetail: {\n\t\t\t\tstart,\n\t\t\t\tend\n\t\t\t}\n\t\t});\n\t\tthis._entries.push(entry);\n\t\treturn entry;\n\t}\n\tsetResourceTimingBufferSize(maxSize) {\n\t\tthis._resourceTimingBufferSize = maxSize;\n\t}\n\taddEventListener(type, listener, options) {\n\t\tthrow createNotImplementedError(\"Performance.addEventListener\");\n\t}\n\tremoveEventListener(type, listener, options) {\n\t\tthrow createNotImplementedError(\"Performance.removeEventListener\");\n\t}\n\tdispatchEvent(event) {\n\t\tthrow createNotImplementedError(\"Performance.dispatchEvent\");\n\t}\n\ttoJSON() {\n\t\treturn this;\n\t}\n}\nexport class PerformanceObserver {\n\t__unenv__ = true;\n\tstatic supportedEntryTypes = [];\n\t_callback = null;\n\tconstructor(callback) {\n\t\tthis._callback = callback;\n\t}\n\ttakeRecords() {\n\t\treturn [];\n\t}\n\tdisconnect() {\n\t\tthrow createNotImplementedError(\"PerformanceObserver.disconnect\");\n\t}\n\tobserve(options) {\n\t\tthrow createNotImplementedError(\"PerformanceObserver.observe\");\n\t}\n\tbind(fn) {\n\t\treturn fn;\n\t}\n\trunInAsyncScope(fn, thisArg, ...args) {\n\t\treturn fn.call(thisArg, ...args);\n\t}\n\tasyncId() {\n\t\treturn 0;\n\t}\n\ttriggerAsyncId() {\n\t\treturn 0;\n\t}\n\temitDestroy() {\n\t\treturn this;\n\t}\n}\nexport const performance = globalThis.performance && \"addEventListener\" in globalThis.performance ? globalThis.performance : new Performance();\n", "import { IntervalHistogram, RecordableHistogram } from \"./internal/perf_hooks/histogram.mjs\";\nimport { performance, Performance, PerformanceEntry, PerformanceMark, PerformanceMeasure, PerformanceObserverEntryList, PerformanceObserver, PerformanceResourceTiming } from \"./internal/perf_hooks/performance.mjs\";\nexport * from \"./internal/perf_hooks/performance.mjs\";\nimport { NODE_PERFORMANCE_GC_MAJOR, NODE_PERFORMANCE_GC_MINOR, NODE_PERFORMANCE_GC_INCREMENTAL, NODE_PERFORMANCE_GC_WEAKCB, NODE_PERFORMANCE_GC_FLAGS_NO, NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED, NODE_PERFORMANCE_GC_FLAGS_FORCED, NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING, NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE, NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY, NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE, NODE_PERFORMANCE_ENTRY_TYPE_GC, NODE_PERFORMANCE_ENTRY_TYPE_HTTP, NODE_PERFORMANCE_ENTRY_TYPE_HTTP2, NODE_PERFORMANCE_ENTRY_TYPE_NET, NODE_PERFORMANCE_ENTRY_TYPE_DNS, NODE_PERFORMANCE_MILESTONE_TIME_ORIGIN_TIMESTAMP, NODE_PERFORMANCE_MILESTONE_TIME_ORIGIN, NODE_PERFORMANCE_MILESTONE_ENVIRONMENT, NODE_PERFORMANCE_MILESTONE_NODE_START, NODE_PERFORMANCE_MILESTONE_V8_START, NODE_PERFORMANCE_MILESTONE_LOOP_START, NODE_PERFORMANCE_MILESTONE_LOOP_EXIT, NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE } from \"./internal/perf_hooks/constants.mjs\";\nexport const constants = {\n\tNODE_PERFORMANCE_GC_MAJOR,\n\tNODE_PERFORMANCE_GC_MINOR,\n\tNODE_PERFORMANCE_GC_INCREMENTAL,\n\tNODE_PERFORMANCE_GC_WEAKCB,\n\tNODE_PERFORMANCE_GC_FLAGS_NO,\n\tNODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED,\n\tNODE_PERFORMANCE_GC_FLAGS_FORCED,\n\tNODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING,\n\tNODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE,\n\tNODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY,\n\tNODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE,\n\tNODE_PERFORMANCE_ENTRY_TYPE_GC,\n\tNODE_PERFORMANCE_ENTRY_TYPE_HTTP,\n\tNODE_PERFORMANCE_ENTRY_TYPE_HTTP2,\n\tNODE_PERFORMANCE_ENTRY_TYPE_NET,\n\tNODE_PERFORMANCE_ENTRY_TYPE_DNS,\n\tNODE_PERFORMANCE_MILESTONE_TIME_ORIGIN_TIMESTAMP,\n\tNODE_PERFORMANCE_MILESTONE_TIME_ORIGIN,\n\tNODE_PERFORMANCE_MILESTONE_ENVIRONMENT,\n\tNODE_PERFORMANCE_MILESTONE_NODE_START,\n\tNODE_PERFORMANCE_MILESTONE_V8_START,\n\tNODE_PERFORMANCE_MILESTONE_LOOP_START,\n\tNODE_PERFORMANCE_MILESTONE_LOOP_EXIT,\n\tNODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE\n};\nexport const monitorEventLoopDelay = function(_options) {\n\treturn new IntervalHistogram();\n};\nexport const createHistogram = function(_options) {\n\treturn new RecordableHistogram();\n};\nexport default {\n\tPerformance,\n\tPerformanceMark,\n\tPerformanceEntry,\n\tPerformanceMeasure,\n\tPerformanceObserverEntryList,\n\tPerformanceObserver,\n\tPerformanceResourceTiming,\n\tperformance,\n\tconstants,\n\tcreateHistogram,\n\tmonitorEventLoopDelay\n};\n", "import {\n performance,\n Performance,\n PerformanceEntry,\n PerformanceMark,\n PerformanceMeasure,\n PerformanceObserver,\n PerformanceObserverEntryList,\n PerformanceResourceTiming\n} from \"node:perf_hooks\";\nglobalThis.performance = performance;\nglobalThis.Performance = Performance;\nglobalThis.PerformanceEntry = PerformanceEntry;\nglobalThis.PerformanceMark = PerformanceMark;\nglobalThis.PerformanceMeasure = PerformanceMeasure;\nglobalThis.PerformanceObserver = PerformanceObserver;\nglobalThis.PerformanceObserverEntryList = PerformanceObserverEntryList;\nglobalThis.PerformanceResourceTiming = PerformanceResourceTiming;\n", "export default Object.assign(() => {}, { __unenv__: true });\n", "import { Writable } from \"node:stream\";\nimport noop from \"../mock/noop.mjs\";\nimport { notImplemented, notImplementedClass } from \"../_internal/utils.mjs\";\nconst _console = globalThis.console;\nexport const _ignoreErrors = true;\nexport const _stderr = new Writable();\nexport const _stdout = new Writable();\nexport const log = _console?.log ?? noop;\nexport const info = _console?.info ?? log;\nexport const trace = _console?.trace ?? info;\nexport const debug = _console?.debug ?? log;\nexport const table = _console?.table ?? log;\nexport const error = _console?.error ?? log;\nexport const warn = _console?.warn ?? error;\nexport const createTask = _console?.createTask ?? /*@__PURE__*/ notImplemented(\"console.createTask\");\nexport const assert = /*@__PURE__*/ notImplemented(\"console.assert\");\nexport const clear = _console?.clear ?? noop;\nexport const count = _console?.count ?? noop;\nexport const countReset = _console?.countReset ?? noop;\nexport const dir = _console?.dir ?? noop;\nexport const dirxml = _console?.dirxml ?? noop;\nexport const group = _console?.group ?? noop;\nexport const groupEnd = _console?.groupEnd ?? noop;\nexport const groupCollapsed = _console?.groupCollapsed ?? noop;\nexport const profile = _console?.profile ?? noop;\nexport const profileEnd = _console?.profileEnd ?? noop;\nexport const time = _console?.time ?? noop;\nexport const timeEnd = _console?.timeEnd ?? noop;\nexport const timeLog = _console?.timeLog ?? noop;\nexport const timeStamp = _console?.timeStamp ?? noop;\nexport const Console = _console?.Console ?? /*@__PURE__*/ notImplementedClass(\"console.Console\");\nexport const _times = /*@__PURE__*/ new Map();\nexport function context() {\n\treturn _console;\n}\nexport const _stdoutErrorHandler = noop;\nexport const _stderrErrorHandler = noop;\nexport default {\n\t_times,\n\t_ignoreErrors,\n\t_stdoutErrorHandler,\n\t_stderrErrorHandler,\n\t_stdout,\n\t_stderr,\n\tassert,\n\tclear,\n\tConsole,\n\tcount,\n\tcountReset,\n\tdebug,\n\tdir,\n\tdirxml,\n\terror,\n\tcontext,\n\tcreateTask,\n\tgroup,\n\tgroupEnd,\n\tgroupCollapsed,\n\tinfo,\n\tlog,\n\tprofile,\n\tprofileEnd,\n\ttable,\n\ttime,\n\ttimeEnd,\n\ttimeLog,\n\ttimeStamp,\n\ttrace,\n\twarn\n};\n", "import {\n _ignoreErrors,\n _stderr,\n _stderrErrorHandler,\n _stdout,\n _stdoutErrorHandler,\n _times,\n Console\n} from \"unenv/node/console\";\nexport {\n Console,\n _ignoreErrors,\n _stderr,\n _stderrErrorHandler,\n _stdout,\n _stdoutErrorHandler,\n _times\n} from \"unenv/node/console\";\nconst workerdConsole = globalThis[\"console\"];\nexport const {\n assert,\n clear,\n // @ts-expect-error undocumented public API\n context,\n count,\n countReset,\n // @ts-expect-error undocumented public API\n createTask,\n debug,\n dir,\n dirxml,\n error,\n group,\n groupCollapsed,\n groupEnd,\n info,\n log,\n profile,\n profileEnd,\n table,\n time,\n timeEnd,\n timeLog,\n timeStamp,\n trace,\n warn\n} = workerdConsole;\nObject.assign(workerdConsole, {\n Console,\n _ignoreErrors,\n _stderr,\n _stderrErrorHandler,\n _stdout,\n _stdoutErrorHandler,\n _times\n});\nexport default workerdConsole;\n", "import { default as defaultExport } from \"@cloudflare/unenv-preset/node/console\";\nglobalThis.console = defaultExport;", "export const hrtime = /*@__PURE__*/ Object.assign(function hrtime(startTime) {\n\tconst now = Date.now();\n\tconst seconds = Math.trunc(now / 1e3);\n\tconst nanos = now % 1e3 * 1e6;\n\tif (startTime) {\n\t\tlet diffSeconds = seconds - startTime[0];\n\t\tlet diffNanos = nanos - startTime[0];\n\t\tif (diffNanos < 0) {\n\t\t\tdiffSeconds = diffSeconds - 1;\n\t\t\tdiffNanos = 1e9 + diffNanos;\n\t\t}\n\t\treturn [diffSeconds, diffNanos];\n\t}\n\treturn [seconds, nanos];\n}, { bigint: function bigint() {\n\treturn BigInt(Date.now() * 1e6);\n} });\n", "import { Socket } from \"node:net\";\nexport class ReadStream extends Socket {\n\tfd;\n\tconstructor(fd) {\n\t\tsuper();\n\t\tthis.fd = fd;\n\t}\n\tisRaw = false;\n\tsetRawMode(mode) {\n\t\tthis.isRaw = mode;\n\t\treturn this;\n\t}\n\tisTTY = false;\n}\n", "import { Socket } from \"node:net\";\nexport class WriteStream extends Socket {\n\tfd;\n\tconstructor(fd) {\n\t\tsuper();\n\t\tthis.fd = fd;\n\t}\n\tclearLine(dir, callback) {\n\t\tcallback && callback();\n\t\treturn false;\n\t}\n\tclearScreenDown(callback) {\n\t\tcallback && callback();\n\t\treturn false;\n\t}\n\tcursorTo(x, y, callback) {\n\t\tcallback && typeof callback === \"function\" && callback();\n\t\treturn false;\n\t}\n\tmoveCursor(dx, dy, callback) {\n\t\tcallback && callback();\n\t\treturn false;\n\t}\n\tgetColorDepth(env) {\n\t\treturn 1;\n\t}\n\thasColors(count, env) {\n\t\treturn false;\n\t}\n\tgetWindowSize() {\n\t\treturn [this.columns, this.rows];\n\t}\n\tcolumns = 80;\n\trows = 24;\n\tisTTY = false;\n}\n", "import { ReadStream } from \"./internal/tty/read-stream.mjs\";\nimport { WriteStream } from \"./internal/tty/write-stream.mjs\";\nexport { ReadStream } from \"./internal/tty/read-stream.mjs\";\nexport { WriteStream } from \"./internal/tty/write-stream.mjs\";\nexport const isatty = function() {\n\treturn false;\n};\nexport default {\n\tReadStream,\n\tWriteStream,\n\tisatty\n};\n", "import { EventEmitter } from \"node:events\";\nimport { ReadStream, WriteStream } from \"node:tty\";\nimport { notImplemented, createNotImplementedError } from \"../../../_internal/utils.mjs\";\nexport class Process extends EventEmitter {\n\tenv;\n\thrtime;\n\tnextTick;\n\tconstructor(impl) {\n\t\tsuper();\n\t\tthis.env = impl.env;\n\t\tthis.hrtime = impl.hrtime;\n\t\tthis.nextTick = impl.nextTick;\n\t\tfor (const prop of [...Object.getOwnPropertyNames(Process.prototype), ...Object.getOwnPropertyNames(EventEmitter.prototype)]) {\n\t\t\tconst value = this[prop];\n\t\t\tif (typeof value === \"function\") {\n\t\t\t\tthis[prop] = value.bind(this);\n\t\t\t}\n\t\t}\n\t}\n\temitWarning(warning, type, code) {\n\t\tconsole.warn(`${code ? `[${code}] ` : \"\"}${type ? `${type}: ` : \"\"}${warning}`);\n\t}\n\temit(...args) {\n\t\treturn super.emit(...args);\n\t}\n\tlisteners(eventName) {\n\t\treturn super.listeners(eventName);\n\t}\n\t#stdin;\n\t#stdout;\n\t#stderr;\n\tget stdin() {\n\t\treturn this.#stdin ??= new ReadStream(0);\n\t}\n\tget stdout() {\n\t\treturn this.#stdout ??= new WriteStream(1);\n\t}\n\tget stderr() {\n\t\treturn this.#stderr ??= new WriteStream(2);\n\t}\n\t#cwd = \"/\";\n\tchdir(cwd) {\n\t\tthis.#cwd = cwd;\n\t}\n\tcwd() {\n\t\treturn this.#cwd;\n\t}\n\tarch = \"\";\n\tplatform = \"\";\n\targv = [];\n\targv0 = \"\";\n\texecArgv = [];\n\texecPath = \"\";\n\ttitle = \"\";\n\tpid = 200;\n\tppid = 100;\n\tget version() {\n\t\treturn \"\";\n\t}\n\tget versions() {\n\t\treturn {};\n\t}\n\tget allowedNodeEnvironmentFlags() {\n\t\treturn new Set();\n\t}\n\tget sourceMapsEnabled() {\n\t\treturn false;\n\t}\n\tget debugPort() {\n\t\treturn 0;\n\t}\n\tget throwDeprecation() {\n\t\treturn false;\n\t}\n\tget traceDeprecation() {\n\t\treturn false;\n\t}\n\tget features() {\n\t\treturn {};\n\t}\n\tget release() {\n\t\treturn {};\n\t}\n\tget connected() {\n\t\treturn false;\n\t}\n\tget config() {\n\t\treturn {};\n\t}\n\tget moduleLoadList() {\n\t\treturn [];\n\t}\n\tconstrainedMemory() {\n\t\treturn 0;\n\t}\n\tavailableMemory() {\n\t\treturn 0;\n\t}\n\tuptime() {\n\t\treturn 0;\n\t}\n\tresourceUsage() {\n\t\treturn {};\n\t}\n\tref() {}\n\tunref() {}\n\tumask() {\n\t\tthrow createNotImplementedError(\"process.umask\");\n\t}\n\tgetBuiltinModule() {\n\t\treturn undefined;\n\t}\n\tgetActiveResourcesInfo() {\n\t\tthrow createNotImplementedError(\"process.getActiveResourcesInfo\");\n\t}\n\texit() {\n\t\tthrow createNotImplementedError(\"process.exit\");\n\t}\n\treallyExit() {\n\t\tthrow createNotImplementedError(\"process.reallyExit\");\n\t}\n\tkill() {\n\t\tthrow createNotImplementedError(\"process.kill\");\n\t}\n\tabort() {\n\t\tthrow createNotImplementedError(\"process.abort\");\n\t}\n\tdlopen() {\n\t\tthrow createNotImplementedError(\"process.dlopen\");\n\t}\n\tsetSourceMapsEnabled() {\n\t\tthrow createNotImplementedError(\"process.setSourceMapsEnabled\");\n\t}\n\tloadEnvFile() {\n\t\tthrow createNotImplementedError(\"process.loadEnvFile\");\n\t}\n\tdisconnect() {\n\t\tthrow createNotImplementedError(\"process.disconnect\");\n\t}\n\tcpuUsage() {\n\t\tthrow createNotImplementedError(\"process.cpuUsage\");\n\t}\n\tsetUncaughtExceptionCaptureCallback() {\n\t\tthrow createNotImplementedError(\"process.setUncaughtExceptionCaptureCallback\");\n\t}\n\thasUncaughtExceptionCaptureCallback() {\n\t\tthrow createNotImplementedError(\"process.hasUncaughtExceptionCaptureCallback\");\n\t}\n\tinitgroups() {\n\t\tthrow createNotImplementedError(\"process.initgroups\");\n\t}\n\topenStdin() {\n\t\tthrow createNotImplementedError(\"process.openStdin\");\n\t}\n\tassert() {\n\t\tthrow createNotImplementedError(\"process.assert\");\n\t}\n\tbinding() {\n\t\tthrow createNotImplementedError(\"process.binding\");\n\t}\n\tpermission = { has: /*@__PURE__*/ notImplemented(\"process.permission.has\") };\n\treport = {\n\t\tdirectory: \"\",\n\t\tfilename: \"\",\n\t\tsignal: \"SIGUSR2\",\n\t\tcompact: false,\n\t\treportOnFatalError: false,\n\t\treportOnSignal: false,\n\t\treportOnUncaughtException: false,\n\t\tgetReport: /*@__PURE__*/ notImplemented(\"process.report.getReport\"),\n\t\twriteReport: /*@__PURE__*/ notImplemented(\"process.report.writeReport\")\n\t};\n\tfinalization = {\n\t\tregister: /*@__PURE__*/ notImplemented(\"process.finalization.register\"),\n\t\tunregister: /*@__PURE__*/ notImplemented(\"process.finalization.unregister\"),\n\t\tregisterBeforeExit: /*@__PURE__*/ notImplemented(\"process.finalization.registerBeforeExit\")\n\t};\n\tmemoryUsage = Object.assign(() => ({\n\t\tarrayBuffers: 0,\n\t\trss: 0,\n\t\texternal: 0,\n\t\theapTotal: 0,\n\t\theapUsed: 0\n\t}), { rss: () => 0 });\n\tmainModule = undefined;\n\tdomain = undefined;\n\tsend = undefined;\n\texitCode = undefined;\n\tchannel = undefined;\n\tgetegid = undefined;\n\tgeteuid = undefined;\n\tgetgid = undefined;\n\tgetgroups = undefined;\n\tgetuid = undefined;\n\tsetegid = undefined;\n\tseteuid = undefined;\n\tsetgid = undefined;\n\tsetgroups = undefined;\n\tsetuid = undefined;\n\t_events = undefined;\n\t_eventsCount = undefined;\n\t_exiting = undefined;\n\t_maxListeners = undefined;\n\t_debugEnd = undefined;\n\t_debugProcess = undefined;\n\t_fatalException = undefined;\n\t_getActiveHandles = undefined;\n\t_getActiveRequests = undefined;\n\t_kill = undefined;\n\t_preload_modules = undefined;\n\t_rawDebug = undefined;\n\t_startProfilerIdleNotifier = undefined;\n\t_stopProfilerIdleNotifier = undefined;\n\t_tickCallback = undefined;\n\t_disconnect = undefined;\n\t_handleQueue = undefined;\n\t_pendingMessage = undefined;\n\t_channel = undefined;\n\t_send = undefined;\n\t_linkedBinding = undefined;\n}\n", "import { hrtime as UnenvHrTime } from \"unenv/node/internal/process/hrtime\";\nimport { Process as UnenvProcess } from \"unenv/node/internal/process/process\";\nconst globalProcess = globalThis[\"process\"];\nexport const getBuiltinModule = globalProcess.getBuiltinModule;\nexport const { exit, platform, nextTick } = getBuiltinModule(\n \"node:process\"\n);\nconst unenvProcess = new UnenvProcess({\n env: globalProcess.env,\n hrtime: UnenvHrTime,\n nextTick\n});\nexport const {\n abort,\n addListener,\n allowedNodeEnvironmentFlags,\n hasUncaughtExceptionCaptureCallback,\n setUncaughtExceptionCaptureCallback,\n loadEnvFile,\n sourceMapsEnabled,\n arch,\n argv,\n argv0,\n chdir,\n config,\n connected,\n constrainedMemory,\n availableMemory,\n cpuUsage,\n cwd,\n debugPort,\n dlopen,\n disconnect,\n emit,\n emitWarning,\n env,\n eventNames,\n execArgv,\n execPath,\n finalization,\n features,\n getActiveResourcesInfo,\n getMaxListeners,\n hrtime,\n kill,\n listeners,\n listenerCount,\n memoryUsage,\n on,\n off,\n once,\n pid,\n ppid,\n prependListener,\n prependOnceListener,\n rawListeners,\n release,\n removeAllListeners,\n removeListener,\n report,\n resourceUsage,\n setMaxListeners,\n setSourceMapsEnabled,\n stderr,\n stdin,\n stdout,\n title,\n throwDeprecation,\n traceDeprecation,\n umask,\n uptime,\n version,\n versions,\n domain,\n initgroups,\n moduleLoadList,\n reallyExit,\n openStdin,\n assert,\n binding,\n send,\n exitCode,\n channel,\n getegid,\n geteuid,\n getgid,\n getgroups,\n getuid,\n setegid,\n seteuid,\n setgid,\n setgroups,\n setuid,\n permission,\n mainModule,\n _events,\n _eventsCount,\n _exiting,\n _maxListeners,\n _debugEnd,\n _debugProcess,\n _fatalException,\n _getActiveHandles,\n _getActiveRequests,\n _kill,\n _preload_modules,\n _rawDebug,\n _startProfilerIdleNotifier,\n _stopProfilerIdleNotifier,\n _tickCallback,\n _disconnect,\n _handleQueue,\n _pendingMessage,\n _channel,\n _send,\n _linkedBinding\n} = unenvProcess;\nconst _process = {\n abort,\n addListener,\n allowedNodeEnvironmentFlags,\n hasUncaughtExceptionCaptureCallback,\n setUncaughtExceptionCaptureCallback,\n loadEnvFile,\n sourceMapsEnabled,\n arch,\n argv,\n argv0,\n chdir,\n config,\n connected,\n constrainedMemory,\n availableMemory,\n cpuUsage,\n cwd,\n debugPort,\n dlopen,\n disconnect,\n emit,\n emitWarning,\n env,\n eventNames,\n execArgv,\n execPath,\n exit,\n finalization,\n features,\n getBuiltinModule,\n getActiveResourcesInfo,\n getMaxListeners,\n hrtime,\n kill,\n listeners,\n listenerCount,\n memoryUsage,\n nextTick,\n on,\n off,\n once,\n pid,\n platform,\n ppid,\n prependListener,\n prependOnceListener,\n rawListeners,\n release,\n removeAllListeners,\n removeListener,\n report,\n resourceUsage,\n setMaxListeners,\n setSourceMapsEnabled,\n stderr,\n stdin,\n stdout,\n title,\n throwDeprecation,\n traceDeprecation,\n umask,\n uptime,\n version,\n versions,\n // @ts-expect-error old API\n domain,\n initgroups,\n moduleLoadList,\n reallyExit,\n openStdin,\n assert,\n binding,\n send,\n exitCode,\n channel,\n getegid,\n geteuid,\n getgid,\n getgroups,\n getuid,\n setegid,\n seteuid,\n setgid,\n setgroups,\n setuid,\n permission,\n mainModule,\n _events,\n _eventsCount,\n _exiting,\n _maxListeners,\n _debugEnd,\n _debugProcess,\n _fatalException,\n _getActiveHandles,\n _getActiveRequests,\n _kill,\n _preload_modules,\n _rawDebug,\n _startProfilerIdleNotifier,\n _stopProfilerIdleNotifier,\n _tickCallback,\n _disconnect,\n _handleQueue,\n _pendingMessage,\n _channel,\n _send,\n _linkedBinding\n};\nexport default _process;\n", "import { default as defaultExport } from \"@cloudflare/unenv-preset/node/process\";\nglobalThis.process = defaultExport;", "", "// `esbuild` doesn't support returning `watch*` options from `onStart()`\n// plugin callbacks. Instead, we define an empty virtual module that is\n// imported by this injected file. Importing the module registers watchers.\nimport \"wrangler:modules-watch\";\n", "// src/compose.ts\nvar compose = (middleware, onError, onNotFound) => {\n return (context, next) => {\n let index = -1;\n return dispatch(0);\n async function dispatch(i) {\n if (i <= index) {\n throw new Error(\"next() called multiple times\");\n }\n index = i;\n let res;\n let isError = false;\n let handler;\n if (middleware[i]) {\n handler = middleware[i][0][0];\n context.req.routeIndex = i;\n } else {\n handler = i === middleware.length && next || void 0;\n }\n if (handler) {\n try {\n res = await handler(context, () => dispatch(i + 1));\n } catch (err) {\n if (err instanceof Error && onError) {\n context.error = err;\n res = await onError(err, context);\n isError = true;\n } else {\n throw err;\n }\n }\n } else {\n if (context.finalized === false && onNotFound) {\n res = await onNotFound(context);\n }\n }\n if (res && (context.finalized === false || isError)) {\n context.res = res;\n }\n return context;\n }\n };\n};\nexport {\n compose\n};\n", "// src/http-exception.ts\nvar HTTPException = class extends Error {\n res;\n status;\n /**\n * Creates an instance of `HTTPException`.\n * @param status - HTTP status code for the exception. Defaults to 500.\n * @param options - Additional options for the exception.\n */\n constructor(status = 500, options) {\n super(options?.message, { cause: options?.cause });\n this.res = options?.res;\n this.status = status;\n }\n /**\n * Returns the response object associated with the exception.\n * If a response object is not provided, a new response is created with the error message and status code.\n * @returns The response object.\n */\n getResponse() {\n if (this.res) {\n const newResponse = new Response(this.res.body, {\n status: this.status,\n headers: this.res.headers\n });\n return newResponse;\n }\n return new Response(this.message, {\n status: this.status\n });\n }\n};\nexport {\n HTTPException\n};\n", "// src/request/constants.ts\nvar GET_MATCH_RESULT = /* @__PURE__ */ Symbol();\nexport {\n GET_MATCH_RESULT\n};\n", "// src/utils/body.ts\nimport { HonoRequest } from \"../request.js\";\nvar parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) => {\n const { all = false, dot = false } = options;\n const headers = request instanceof HonoRequest ? request.raw.headers : request.headers;\n const contentType = headers.get(\"Content-Type\");\n if (contentType?.startsWith(\"multipart/form-data\") || contentType?.startsWith(\"application/x-www-form-urlencoded\")) {\n return parseFormData(request, { all, dot });\n }\n return {};\n};\nasync function parseFormData(request, options) {\n const formData = await request.formData();\n if (formData) {\n return convertFormDataToBodyData(formData, options);\n }\n return {};\n}\nfunction convertFormDataToBodyData(formData, options) {\n const form = /* @__PURE__ */ Object.create(null);\n formData.forEach((value, key) => {\n const shouldParseAllValues = options.all || key.endsWith(\"[]\");\n if (!shouldParseAllValues) {\n form[key] = value;\n } else {\n handleParsingAllValues(form, key, value);\n }\n });\n if (options.dot) {\n Object.entries(form).forEach(([key, value]) => {\n const shouldParseDotValues = key.includes(\".\");\n if (shouldParseDotValues) {\n handleParsingNestedValues(form, key, value);\n delete form[key];\n }\n });\n }\n return form;\n}\nvar handleParsingAllValues = (form, key, value) => {\n if (form[key] !== void 0) {\n if (Array.isArray(form[key])) {\n ;\n form[key].push(value);\n } else {\n form[key] = [form[key], value];\n }\n } else {\n if (!key.endsWith(\"[]\")) {\n form[key] = value;\n } else {\n form[key] = [value];\n }\n }\n};\nvar handleParsingNestedValues = (form, key, value) => {\n if (/(?:^|\\.)__proto__\\./.test(key)) {\n return;\n }\n let nestedForm = form;\n const keys = key.split(\".\");\n keys.forEach((key2, index) => {\n if (index === keys.length - 1) {\n nestedForm[key2] = value;\n } else {\n if (!nestedForm[key2] || typeof nestedForm[key2] !== \"object\" || Array.isArray(nestedForm[key2]) || nestedForm[key2] instanceof File) {\n nestedForm[key2] = /* @__PURE__ */ Object.create(null);\n }\n nestedForm = nestedForm[key2];\n }\n });\n};\nexport {\n parseBody\n};\n", "// src/utils/url.ts\nvar splitPath = (path) => {\n const paths = path.split(\"/\");\n if (paths[0] === \"\") {\n paths.shift();\n }\n return paths;\n};\nvar splitRoutingPath = (routePath) => {\n const { groups, path } = extractGroupsFromPath(routePath);\n const paths = splitPath(path);\n return replaceGroupMarks(paths, groups);\n};\nvar extractGroupsFromPath = (path) => {\n const groups = [];\n path = path.replace(/\\{[^}]+\\}/g, (match, index) => {\n const mark = `@${index}`;\n groups.push([mark, match]);\n return mark;\n });\n return { groups, path };\n};\nvar replaceGroupMarks = (paths, groups) => {\n for (let i = groups.length - 1; i >= 0; i--) {\n const [mark] = groups[i];\n for (let j = paths.length - 1; j >= 0; j--) {\n if (paths[j].includes(mark)) {\n paths[j] = paths[j].replace(mark, groups[i][1]);\n break;\n }\n }\n }\n return paths;\n};\nvar patternCache = {};\nvar getPattern = (label, next) => {\n if (label === \"*\") {\n return \"*\";\n }\n const match = label.match(/^\\:([^\\{\\}]+)(?:\\{(.+)\\})?$/);\n if (match) {\n const cacheKey = `${label}#${next}`;\n if (!patternCache[cacheKey]) {\n if (match[2]) {\n patternCache[cacheKey] = next && next[0] !== \":\" && next[0] !== \"*\" ? [cacheKey, match[1], new RegExp(`^${match[2]}(?=/${next})`)] : [label, match[1], new RegExp(`^${match[2]}$`)];\n } else {\n patternCache[cacheKey] = [label, match[1], true];\n }\n }\n return patternCache[cacheKey];\n }\n return null;\n};\nvar tryDecode = (str, decoder) => {\n try {\n return decoder(str);\n } catch {\n return str.replace(/(?:%[0-9A-Fa-f]{2})+/g, (match) => {\n try {\n return decoder(match);\n } catch {\n return match;\n }\n });\n }\n};\nvar tryDecodeURI = (str) => tryDecode(str, decodeURI);\nvar getPath = (request) => {\n const url = request.url;\n const start = url.indexOf(\"/\", url.indexOf(\":\") + 4);\n let i = start;\n for (; i < url.length; i++) {\n const charCode = url.charCodeAt(i);\n if (charCode === 37) {\n const queryIndex = url.indexOf(\"?\", i);\n const hashIndex = url.indexOf(\"#\", i);\n const end = queryIndex === -1 ? hashIndex === -1 ? void 0 : hashIndex : hashIndex === -1 ? queryIndex : Math.min(queryIndex, hashIndex);\n const path = url.slice(start, end);\n return tryDecodeURI(path.includes(\"%25\") ? path.replace(/%25/g, \"%2525\") : path);\n } else if (charCode === 63 || charCode === 35) {\n break;\n }\n }\n return url.slice(start, i);\n};\nvar getQueryStrings = (url) => {\n const queryIndex = url.indexOf(\"?\", 8);\n return queryIndex === -1 ? \"\" : \"?\" + url.slice(queryIndex + 1);\n};\nvar getPathNoStrict = (request) => {\n const result = getPath(request);\n return result.length > 1 && result.at(-1) === \"/\" ? result.slice(0, -1) : result;\n};\nvar mergePath = (base, sub, ...rest) => {\n if (rest.length) {\n sub = mergePath(sub, ...rest);\n }\n return `${base?.[0] === \"/\" ? \"\" : \"/\"}${base}${sub === \"/\" ? \"\" : `${base?.at(-1) === \"/\" ? \"\" : \"/\"}${sub?.[0] === \"/\" ? sub.slice(1) : sub}`}`;\n};\nvar checkOptionalParameter = (path) => {\n if (path.charCodeAt(path.length - 1) !== 63 || !path.includes(\":\")) {\n return null;\n }\n const segments = path.split(\"/\");\n const results = [];\n let basePath = \"\";\n segments.forEach((segment) => {\n if (segment !== \"\" && !/\\:/.test(segment)) {\n basePath += \"/\" + segment;\n } else if (/\\:/.test(segment)) {\n if (/\\?/.test(segment)) {\n if (results.length === 0 && basePath === \"\") {\n results.push(\"/\");\n } else {\n results.push(basePath);\n }\n const optionalSegment = segment.replace(\"?\", \"\");\n basePath += \"/\" + optionalSegment;\n results.push(basePath);\n } else {\n basePath += \"/\" + segment;\n }\n }\n });\n return results.filter((v, i, a) => a.indexOf(v) === i);\n};\nvar _decodeURI = (value) => {\n if (!/[%+]/.test(value)) {\n return value;\n }\n if (value.indexOf(\"+\") !== -1) {\n value = value.replace(/\\+/g, \" \");\n }\n return value.indexOf(\"%\") !== -1 ? tryDecode(value, decodeURIComponent_) : value;\n};\nvar _getQueryParam = (url, key, multiple) => {\n let encoded;\n if (!multiple && key && !/[%+]/.test(key)) {\n let keyIndex2 = url.indexOf(\"?\", 8);\n if (keyIndex2 === -1) {\n return void 0;\n }\n if (!url.startsWith(key, keyIndex2 + 1)) {\n keyIndex2 = url.indexOf(`&${key}`, keyIndex2 + 1);\n }\n while (keyIndex2 !== -1) {\n const trailingKeyCode = url.charCodeAt(keyIndex2 + key.length + 1);\n if (trailingKeyCode === 61) {\n const valueIndex = keyIndex2 + key.length + 2;\n const endIndex = url.indexOf(\"&\", valueIndex);\n return _decodeURI(url.slice(valueIndex, endIndex === -1 ? void 0 : endIndex));\n } else if (trailingKeyCode == 38 || isNaN(trailingKeyCode)) {\n return \"\";\n }\n keyIndex2 = url.indexOf(`&${key}`, keyIndex2 + 1);\n }\n encoded = /[%+]/.test(url);\n if (!encoded) {\n return void 0;\n }\n }\n const results = {};\n encoded ??= /[%+]/.test(url);\n let keyIndex = url.indexOf(\"?\", 8);\n while (keyIndex !== -1) {\n const nextKeyIndex = url.indexOf(\"&\", keyIndex + 1);\n let valueIndex = url.indexOf(\"=\", keyIndex);\n if (valueIndex > nextKeyIndex && nextKeyIndex !== -1) {\n valueIndex = -1;\n }\n let name = url.slice(\n keyIndex + 1,\n valueIndex === -1 ? nextKeyIndex === -1 ? void 0 : nextKeyIndex : valueIndex\n );\n if (encoded) {\n name = _decodeURI(name);\n }\n keyIndex = nextKeyIndex;\n if (name === \"\") {\n continue;\n }\n let value;\n if (valueIndex === -1) {\n value = \"\";\n } else {\n value = url.slice(valueIndex + 1, nextKeyIndex === -1 ? void 0 : nextKeyIndex);\n if (encoded) {\n value = _decodeURI(value);\n }\n }\n if (multiple) {\n if (!(results[name] && Array.isArray(results[name]))) {\n results[name] = [];\n }\n ;\n results[name].push(value);\n } else {\n results[name] ??= value;\n }\n }\n return key ? results[key] : results;\n};\nvar getQueryParam = _getQueryParam;\nvar getQueryParams = (url, key) => {\n return _getQueryParam(url, key, true);\n};\nvar decodeURIComponent_ = decodeURIComponent;\nexport {\n checkOptionalParameter,\n decodeURIComponent_,\n getPath,\n getPathNoStrict,\n getPattern,\n getQueryParam,\n getQueryParams,\n getQueryStrings,\n mergePath,\n splitPath,\n splitRoutingPath,\n tryDecode,\n tryDecodeURI\n};\n", "// src/request.ts\nimport { HTTPException } from \"./http-exception.js\";\nimport { GET_MATCH_RESULT } from \"./request/constants.js\";\nimport { parseBody } from \"./utils/body.js\";\nimport { decodeURIComponent_, getQueryParam, getQueryParams, tryDecode } from \"./utils/url.js\";\nvar tryDecodeURIComponent = (str) => tryDecode(str, decodeURIComponent_);\nvar HonoRequest = class {\n /**\n * `.raw` can get the raw Request object.\n *\n * @see {@link https://hono.dev/docs/api/request#raw}\n *\n * @example\n * ```ts\n * // For Cloudflare Workers\n * app.post('/', async (c) => {\n * const metadata = c.req.raw.cf?.hostMetadata?\n * ...\n * })\n * ```\n */\n raw;\n #validatedData;\n // Short name of validatedData\n #matchResult;\n routeIndex = 0;\n /**\n * `.path` can get the pathname of the request.\n *\n * @see {@link https://hono.dev/docs/api/request#path}\n *\n * @example\n * ```ts\n * app.get('/about/me', (c) => {\n * const pathname = c.req.path // `/about/me`\n * })\n * ```\n */\n path;\n bodyCache = {};\n constructor(request, path = \"/\", matchResult = [[]]) {\n this.raw = request;\n this.path = path;\n this.#matchResult = matchResult;\n this.#validatedData = {};\n }\n param(key) {\n return key ? this.#getDecodedParam(key) : this.#getAllDecodedParams();\n }\n #getDecodedParam(key) {\n const paramKey = this.#matchResult[0][this.routeIndex][1][key];\n const param = this.#getParamValue(paramKey);\n return param && /\\%/.test(param) ? tryDecodeURIComponent(param) : param;\n }\n #getAllDecodedParams() {\n const decoded = {};\n const keys = Object.keys(this.#matchResult[0][this.routeIndex][1]);\n for (const key of keys) {\n const value = this.#getParamValue(this.#matchResult[0][this.routeIndex][1][key]);\n if (value !== void 0) {\n decoded[key] = /\\%/.test(value) ? tryDecodeURIComponent(value) : value;\n }\n }\n return decoded;\n }\n #getParamValue(paramKey) {\n return this.#matchResult[1] ? this.#matchResult[1][paramKey] : paramKey;\n }\n query(key) {\n return getQueryParam(this.url, key);\n }\n queries(key) {\n return getQueryParams(this.url, key);\n }\n header(name) {\n if (name) {\n return this.raw.headers.get(name) ?? void 0;\n }\n const headerData = {};\n this.raw.headers.forEach((value, key) => {\n headerData[key] = value;\n });\n return headerData;\n }\n async parseBody(options) {\n return parseBody(this, options);\n }\n #cachedBody = (key) => {\n const { bodyCache, raw } = this;\n const cachedBody = bodyCache[key];\n if (cachedBody) {\n return cachedBody;\n }\n const anyCachedKey = Object.keys(bodyCache)[0];\n if (anyCachedKey) {\n return bodyCache[anyCachedKey].then((body) => {\n if (anyCachedKey === \"json\") {\n body = JSON.stringify(body);\n }\n return new Response(body)[key]();\n });\n }\n return bodyCache[key] = raw[key]();\n };\n /**\n * `.json()` can parse Request body of type `application/json`\n *\n * @see {@link https://hono.dev/docs/api/request#json}\n *\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.json()\n * })\n * ```\n */\n json() {\n return this.#cachedBody(\"text\").then((text) => JSON.parse(text));\n }\n /**\n * `.text()` can parse Request body of type `text/plain`\n *\n * @see {@link https://hono.dev/docs/api/request#text}\n *\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.text()\n * })\n * ```\n */\n text() {\n return this.#cachedBody(\"text\");\n }\n /**\n * `.arrayBuffer()` parse Request body as an `ArrayBuffer`\n *\n * @see {@link https://hono.dev/docs/api/request#arraybuffer}\n *\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.arrayBuffer()\n * })\n * ```\n */\n arrayBuffer() {\n return this.#cachedBody(\"arrayBuffer\");\n }\n /**\n * Parses the request body as a `Blob`.\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.blob();\n * });\n * ```\n * @see https://hono.dev/docs/api/request#blob\n */\n blob() {\n return this.#cachedBody(\"blob\");\n }\n /**\n * Parses the request body as `FormData`.\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.formData();\n * });\n * ```\n * @see https://hono.dev/docs/api/request#formdata\n */\n formData() {\n return this.#cachedBody(\"formData\");\n }\n /**\n * Adds validated data to the request.\n *\n * @param target - The target of the validation.\n * @param data - The validated data to add.\n */\n addValidatedData(target, data) {\n this.#validatedData[target] = data;\n }\n valid(target) {\n return this.#validatedData[target];\n }\n /**\n * `.url()` can get the request url strings.\n *\n * @see {@link https://hono.dev/docs/api/request#url}\n *\n * @example\n * ```ts\n * app.get('/about/me', (c) => {\n * const url = c.req.url // `http://localhost:8787/about/me`\n * ...\n * })\n * ```\n */\n get url() {\n return this.raw.url;\n }\n /**\n * `.method()` can get the method name of the request.\n *\n * @see {@link https://hono.dev/docs/api/request#method}\n *\n * @example\n * ```ts\n * app.get('/about/me', (c) => {\n * const method = c.req.method // `GET`\n * })\n * ```\n */\n get method() {\n return this.raw.method;\n }\n get [GET_MATCH_RESULT]() {\n return this.#matchResult;\n }\n /**\n * `.matchedRoutes()` can return a matched route in the handler\n *\n * @deprecated\n *\n * Use matchedRoutes helper defined in \"hono/route\" instead.\n *\n * @see {@link https://hono.dev/docs/api/request#matchedroutes}\n *\n * @example\n * ```ts\n * app.use('*', async function logger(c, next) {\n * await next()\n * c.req.matchedRoutes.forEach(({ handler, method, path }, i) => {\n * const name = handler.name || (handler.length < 2 ? '[handler]' : '[middleware]')\n * console.log(\n * method,\n * ' ',\n * path,\n * ' '.repeat(Math.max(10 - path.length, 0)),\n * name,\n * i === c.req.routeIndex ? '<- respond from here' : ''\n * )\n * })\n * })\n * ```\n */\n get matchedRoutes() {\n return this.#matchResult[0].map(([[, route]]) => route);\n }\n /**\n * `routePath()` can retrieve the path registered within the handler\n *\n * @deprecated\n *\n * Use routePath helper defined in \"hono/route\" instead.\n *\n * @see {@link https://hono.dev/docs/api/request#routepath}\n *\n * @example\n * ```ts\n * app.get('/posts/:id', (c) => {\n * return c.json({ path: c.req.routePath })\n * })\n * ```\n */\n get routePath() {\n return this.#matchResult[0].map(([[, route]]) => route)[this.routeIndex].path;\n }\n};\nvar cloneRawRequest = async (req) => {\n if (!req.raw.bodyUsed) {\n return req.raw.clone();\n }\n const cacheKey = Object.keys(req.bodyCache)[0];\n if (!cacheKey) {\n throw new HTTPException(500, {\n message: \"Cannot clone request: body was already consumed and not cached. Please use HonoRequest methods (e.g., req.json(), req.text()) instead of consuming req.raw directly.\"\n });\n }\n const requestInit = {\n body: await req[cacheKey](),\n cache: req.raw.cache,\n credentials: req.raw.credentials,\n headers: req.header(),\n integrity: req.raw.integrity,\n keepalive: req.raw.keepalive,\n method: req.method,\n mode: req.raw.mode,\n redirect: req.raw.redirect,\n referrer: req.raw.referrer,\n referrerPolicy: req.raw.referrerPolicy,\n signal: req.raw.signal\n };\n return new Request(req.url, requestInit);\n};\nexport {\n HonoRequest,\n cloneRawRequest\n};\n", "// src/utils/html.ts\nvar HtmlEscapedCallbackPhase = {\n Stringify: 1,\n BeforeStream: 2,\n Stream: 3\n};\nvar raw = (value, callbacks) => {\n const escapedString = new String(value);\n escapedString.isEscaped = true;\n escapedString.callbacks = callbacks;\n return escapedString;\n};\nvar escapeRe = /[&<>'\"]/;\nvar stringBufferToString = async (buffer, callbacks) => {\n let str = \"\";\n callbacks ||= [];\n const resolvedBuffer = await Promise.all(buffer);\n for (let i = resolvedBuffer.length - 1; ; i--) {\n str += resolvedBuffer[i];\n i--;\n if (i < 0) {\n break;\n }\n let r = resolvedBuffer[i];\n if (typeof r === \"object\") {\n callbacks.push(...r.callbacks || []);\n }\n const isEscaped = r.isEscaped;\n r = await (typeof r === \"object\" ? r.toString() : r);\n if (typeof r === \"object\") {\n callbacks.push(...r.callbacks || []);\n }\n if (r.isEscaped ?? isEscaped) {\n str += r;\n } else {\n const buf = [str];\n escapeToBuffer(r, buf);\n str = buf[0];\n }\n }\n return raw(str, callbacks);\n};\nvar escapeToBuffer = (str, buffer) => {\n const match = str.search(escapeRe);\n if (match === -1) {\n buffer[0] += str;\n return;\n }\n let escape;\n let index;\n let lastIndex = 0;\n for (index = match; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n escape = \""\";\n break;\n case 39:\n escape = \"'\";\n break;\n case 38:\n escape = \"&\";\n break;\n case 60:\n escape = \"<\";\n break;\n case 62:\n escape = \">\";\n break;\n default:\n continue;\n }\n buffer[0] += str.substring(lastIndex, index) + escape;\n lastIndex = index + 1;\n }\n buffer[0] += str.substring(lastIndex, index);\n};\nvar resolveCallbackSync = (str) => {\n const callbacks = str.callbacks;\n if (!callbacks?.length) {\n return str;\n }\n const buffer = [str];\n const context = {};\n callbacks.forEach((c) => c({ phase: HtmlEscapedCallbackPhase.Stringify, buffer, context }));\n return buffer[0];\n};\nvar resolveCallback = async (str, phase, preserveCallbacks, context, buffer) => {\n if (typeof str === \"object\" && !(str instanceof String)) {\n if (!(str instanceof Promise)) {\n str = str.toString();\n }\n if (str instanceof Promise) {\n str = await str;\n }\n }\n const callbacks = str.callbacks;\n if (!callbacks?.length) {\n return Promise.resolve(str);\n }\n if (buffer) {\n buffer[0] += str;\n } else {\n buffer = [str];\n }\n const resStr = Promise.all(callbacks.map((c) => c({ phase, buffer, context }))).then(\n (res) => Promise.all(\n res.filter(Boolean).map((str2) => resolveCallback(str2, phase, false, context, buffer))\n ).then(() => buffer[0])\n );\n if (preserveCallbacks) {\n return raw(await resStr, callbacks);\n } else {\n return resStr;\n }\n};\nexport {\n HtmlEscapedCallbackPhase,\n escapeToBuffer,\n raw,\n resolveCallback,\n resolveCallbackSync,\n stringBufferToString\n};\n", "// src/context.ts\nimport { HonoRequest } from \"./request.js\";\nimport { HtmlEscapedCallbackPhase, resolveCallback } from \"./utils/html.js\";\nvar TEXT_PLAIN = \"text/plain; charset=UTF-8\";\nvar setDefaultContentType = (contentType, headers) => {\n return {\n \"Content-Type\": contentType,\n ...headers\n };\n};\nvar createResponseInstance = (body, init) => new Response(body, init);\nvar Context = class {\n #rawRequest;\n #req;\n /**\n * `.env` can get bindings (environment variables, secrets, KV namespaces, D1 database, R2 bucket etc.) in Cloudflare Workers.\n *\n * @see {@link https://hono.dev/docs/api/context#env}\n *\n * @example\n * ```ts\n * // Environment object for Cloudflare Workers\n * app.get('*', async c => {\n * const counter = c.env.COUNTER\n * })\n * ```\n */\n env = {};\n #var;\n finalized = false;\n /**\n * `.error` can get the error object from the middleware if the Handler throws an error.\n *\n * @see {@link https://hono.dev/docs/api/context#error}\n *\n * @example\n * ```ts\n * app.use('*', async (c, next) => {\n * await next()\n * if (c.error) {\n * // do something...\n * }\n * })\n * ```\n */\n error;\n #status;\n #executionCtx;\n #res;\n #layout;\n #renderer;\n #notFoundHandler;\n #preparedHeaders;\n #matchResult;\n #path;\n /**\n * Creates an instance of the Context class.\n *\n * @param req - The Request object.\n * @param options - Optional configuration options for the context.\n */\n constructor(req, options) {\n this.#rawRequest = req;\n if (options) {\n this.#executionCtx = options.executionCtx;\n this.env = options.env;\n this.#notFoundHandler = options.notFoundHandler;\n this.#path = options.path;\n this.#matchResult = options.matchResult;\n }\n }\n /**\n * `.req` is the instance of {@link HonoRequest}.\n */\n get req() {\n this.#req ??= new HonoRequest(this.#rawRequest, this.#path, this.#matchResult);\n return this.#req;\n }\n /**\n * @see {@link https://hono.dev/docs/api/context#event}\n * The FetchEvent associated with the current request.\n *\n * @throws Will throw an error if the context does not have a FetchEvent.\n */\n get event() {\n if (this.#executionCtx && \"respondWith\" in this.#executionCtx) {\n return this.#executionCtx;\n } else {\n throw Error(\"This context has no FetchEvent\");\n }\n }\n /**\n * @see {@link https://hono.dev/docs/api/context#executionctx}\n * The ExecutionContext associated with the current request.\n *\n * @throws Will throw an error if the context does not have an ExecutionContext.\n */\n get executionCtx() {\n if (this.#executionCtx) {\n return this.#executionCtx;\n } else {\n throw Error(\"This context has no ExecutionContext\");\n }\n }\n /**\n * @see {@link https://hono.dev/docs/api/context#res}\n * The Response object for the current request.\n */\n get res() {\n return this.#res ||= createResponseInstance(null, {\n headers: this.#preparedHeaders ??= new Headers()\n });\n }\n /**\n * Sets the Response object for the current request.\n *\n * @param _res - The Response object to set.\n */\n set res(_res) {\n if (this.#res && _res) {\n _res = createResponseInstance(_res.body, _res);\n for (const [k, v] of this.#res.headers.entries()) {\n if (k === \"content-type\") {\n continue;\n }\n if (k === \"set-cookie\") {\n const cookies = this.#res.headers.getSetCookie();\n _res.headers.delete(\"set-cookie\");\n for (const cookie of cookies) {\n _res.headers.append(\"set-cookie\", cookie);\n }\n } else {\n _res.headers.set(k, v);\n }\n }\n }\n this.#res = _res;\n this.finalized = true;\n }\n /**\n * `.render()` can create a response within a layout.\n *\n * @see {@link https://hono.dev/docs/api/context#render-setrenderer}\n *\n * @example\n * ```ts\n * app.get('/', (c) => {\n * return c.render('Hello!')\n * })\n * ```\n */\n render = (...args) => {\n this.#renderer ??= (content) => this.html(content);\n return this.#renderer(...args);\n };\n /**\n * Sets the layout for the response.\n *\n * @param layout - The layout to set.\n * @returns The layout function.\n */\n setLayout = (layout) => this.#layout = layout;\n /**\n * Gets the current layout for the response.\n *\n * @returns The current layout function.\n */\n getLayout = () => this.#layout;\n /**\n * `.setRenderer()` can set the layout in the custom middleware.\n *\n * @see {@link https://hono.dev/docs/api/context#render-setrenderer}\n *\n * @example\n * ```tsx\n * app.use('*', async (c, next) => {\n * c.setRenderer((content) => {\n * return c.html(\n * \n * \n *

{content}

\n * \n * \n * )\n * })\n * await next()\n * })\n * ```\n */\n setRenderer = (renderer) => {\n this.#renderer = renderer;\n };\n /**\n * `.header()` can set headers.\n *\n * @see {@link https://hono.dev/docs/api/context#header}\n *\n * @example\n * ```ts\n * app.get('/welcome', (c) => {\n * // Set headers\n * c.header('X-Message', 'Hello!')\n * c.header('Content-Type', 'text/plain')\n *\n * return c.body('Thank you for coming')\n * })\n * ```\n */\n header = (name, value, options) => {\n if (this.finalized) {\n this.#res = createResponseInstance(this.#res.body, this.#res);\n }\n const headers = this.#res ? this.#res.headers : this.#preparedHeaders ??= new Headers();\n if (value === void 0) {\n headers.delete(name);\n } else if (options?.append) {\n headers.append(name, value);\n } else {\n headers.set(name, value);\n }\n };\n status = (status) => {\n this.#status = status;\n };\n /**\n * `.set()` can set the value specified by the key.\n *\n * @see {@link https://hono.dev/docs/api/context#set-get}\n *\n * @example\n * ```ts\n * app.use('*', async (c, next) => {\n * c.set('message', 'Hono is hot!!')\n * await next()\n * })\n * ```\n */\n set = (key, value) => {\n this.#var ??= /* @__PURE__ */ new Map();\n this.#var.set(key, value);\n };\n /**\n * `.get()` can use the value specified by the key.\n *\n * @see {@link https://hono.dev/docs/api/context#set-get}\n *\n * @example\n * ```ts\n * app.get('/', (c) => {\n * const message = c.get('message')\n * return c.text(`The message is \"${message}\"`)\n * })\n * ```\n */\n get = (key) => {\n return this.#var ? this.#var.get(key) : void 0;\n };\n /**\n * `.var` can access the value of a variable.\n *\n * @see {@link https://hono.dev/docs/api/context#var}\n *\n * @example\n * ```ts\n * const result = c.var.client.oneMethod()\n * ```\n */\n // c.var.propName is a read-only\n get var() {\n if (!this.#var) {\n return {};\n }\n return Object.fromEntries(this.#var);\n }\n #newResponse(data, arg, headers) {\n const responseHeaders = this.#res ? new Headers(this.#res.headers) : this.#preparedHeaders ?? new Headers();\n if (typeof arg === \"object\" && \"headers\" in arg) {\n const argHeaders = arg.headers instanceof Headers ? arg.headers : new Headers(arg.headers);\n for (const [key, value] of argHeaders) {\n if (key.toLowerCase() === \"set-cookie\") {\n responseHeaders.append(key, value);\n } else {\n responseHeaders.set(key, value);\n }\n }\n }\n if (headers) {\n for (const [k, v] of Object.entries(headers)) {\n if (typeof v === \"string\") {\n responseHeaders.set(k, v);\n } else {\n responseHeaders.delete(k);\n for (const v2 of v) {\n responseHeaders.append(k, v2);\n }\n }\n }\n }\n const status = typeof arg === \"number\" ? arg : arg?.status ?? this.#status;\n return createResponseInstance(data, { status, headers: responseHeaders });\n }\n newResponse = (...args) => this.#newResponse(...args);\n /**\n * `.body()` can return the HTTP response.\n * You can set headers with `.header()` and set HTTP status code with `.status`.\n * This can also be set in `.text()`, `.json()` and so on.\n *\n * @see {@link https://hono.dev/docs/api/context#body}\n *\n * @example\n * ```ts\n * app.get('/welcome', (c) => {\n * // Set headers\n * c.header('X-Message', 'Hello!')\n * c.header('Content-Type', 'text/plain')\n * // Set HTTP status code\n * c.status(201)\n *\n * // Return the response body\n * return c.body('Thank you for coming')\n * })\n * ```\n */\n body = (data, arg, headers) => this.#newResponse(data, arg, headers);\n /**\n * `.text()` can render text as `Content-Type:text/plain`.\n *\n * @see {@link https://hono.dev/docs/api/context#text}\n *\n * @example\n * ```ts\n * app.get('/say', (c) => {\n * return c.text('Hello!')\n * })\n * ```\n */\n text = (text, arg, headers) => {\n return !this.#preparedHeaders && !this.#status && !arg && !headers && !this.finalized ? new Response(text) : this.#newResponse(\n text,\n arg,\n setDefaultContentType(TEXT_PLAIN, headers)\n );\n };\n /**\n * `.json()` can render JSON as `Content-Type:application/json`.\n *\n * @see {@link https://hono.dev/docs/api/context#json}\n *\n * @example\n * ```ts\n * app.get('/api', (c) => {\n * return c.json({ message: 'Hello!' })\n * })\n * ```\n */\n json = (object, arg, headers) => {\n return this.#newResponse(\n JSON.stringify(object),\n arg,\n setDefaultContentType(\"application/json\", headers)\n );\n };\n html = (html, arg, headers) => {\n const res = (html2) => this.#newResponse(html2, arg, setDefaultContentType(\"text/html; charset=UTF-8\", headers));\n return typeof html === \"object\" ? resolveCallback(html, HtmlEscapedCallbackPhase.Stringify, false, {}).then(res) : res(html);\n };\n /**\n * `.redirect()` can Redirect, default status code is 302.\n *\n * @see {@link https://hono.dev/docs/api/context#redirect}\n *\n * @example\n * ```ts\n * app.get('/redirect', (c) => {\n * return c.redirect('/')\n * })\n * app.get('/redirect-permanently', (c) => {\n * return c.redirect('/', 301)\n * })\n * ```\n */\n redirect = (location, status) => {\n const locationString = String(location);\n this.header(\n \"Location\",\n // Multibyes should be encoded\n // eslint-disable-next-line no-control-regex\n !/[^\\x00-\\xFF]/.test(locationString) ? locationString : encodeURI(locationString)\n );\n return this.newResponse(null, status ?? 302);\n };\n /**\n * `.notFound()` can return the Not Found Response.\n *\n * @see {@link https://hono.dev/docs/api/context#notfound}\n *\n * @example\n * ```ts\n * app.get('/notfound', (c) => {\n * return c.notFound()\n * })\n * ```\n */\n notFound = () => {\n this.#notFoundHandler ??= () => createResponseInstance();\n return this.#notFoundHandler(this);\n };\n};\nexport {\n Context,\n TEXT_PLAIN\n};\n", "// src/router.ts\nvar METHOD_NAME_ALL = \"ALL\";\nvar METHOD_NAME_ALL_LOWERCASE = \"all\";\nvar METHODS = [\"get\", \"post\", \"put\", \"delete\", \"options\", \"patch\"];\nvar MESSAGE_MATCHER_IS_ALREADY_BUILT = \"Can not add a route since the matcher is already built.\";\nvar UnsupportedPathError = class extends Error {\n};\nexport {\n MESSAGE_MATCHER_IS_ALREADY_BUILT,\n METHODS,\n METHOD_NAME_ALL,\n METHOD_NAME_ALL_LOWERCASE,\n UnsupportedPathError\n};\n", "// src/utils/constants.ts\nvar COMPOSED_HANDLER = \"__COMPOSED_HANDLER\";\nexport {\n COMPOSED_HANDLER\n};\n", "// src/hono-base.ts\nimport { compose } from \"./compose.js\";\nimport { Context } from \"./context.js\";\nimport { METHODS, METHOD_NAME_ALL, METHOD_NAME_ALL_LOWERCASE } from \"./router.js\";\nimport { COMPOSED_HANDLER } from \"./utils/constants.js\";\nimport { getPath, getPathNoStrict, mergePath } from \"./utils/url.js\";\nvar notFoundHandler = (c) => {\n return c.text(\"404 Not Found\", 404);\n};\nvar errorHandler = (err, c) => {\n if (\"getResponse\" in err) {\n const res = err.getResponse();\n return c.newResponse(res.body, res);\n }\n console.error(err);\n return c.text(\"Internal Server Error\", 500);\n};\nvar Hono = class _Hono {\n get;\n post;\n put;\n delete;\n options;\n patch;\n all;\n on;\n use;\n /*\n This class is like an abstract class and does not have a router.\n To use it, inherit the class and implement router in the constructor.\n */\n router;\n getPath;\n // Cannot use `#` because it requires visibility at JavaScript runtime.\n _basePath = \"/\";\n #path = \"/\";\n routes = [];\n constructor(options = {}) {\n const allMethods = [...METHODS, METHOD_NAME_ALL_LOWERCASE];\n allMethods.forEach((method) => {\n this[method] = (args1, ...args) => {\n if (typeof args1 === \"string\") {\n this.#path = args1;\n } else {\n this.#addRoute(method, this.#path, args1);\n }\n args.forEach((handler) => {\n this.#addRoute(method, this.#path, handler);\n });\n return this;\n };\n });\n this.on = (method, path, ...handlers) => {\n for (const p of [path].flat()) {\n this.#path = p;\n for (const m of [method].flat()) {\n handlers.map((handler) => {\n this.#addRoute(m.toUpperCase(), this.#path, handler);\n });\n }\n }\n return this;\n };\n this.use = (arg1, ...handlers) => {\n if (typeof arg1 === \"string\") {\n this.#path = arg1;\n } else {\n this.#path = \"*\";\n handlers.unshift(arg1);\n }\n handlers.forEach((handler) => {\n this.#addRoute(METHOD_NAME_ALL, this.#path, handler);\n });\n return this;\n };\n const { strict, ...optionsWithoutStrict } = options;\n Object.assign(this, optionsWithoutStrict);\n this.getPath = strict ?? true ? options.getPath ?? getPath : getPathNoStrict;\n }\n #clone() {\n const clone = new _Hono({\n router: this.router,\n getPath: this.getPath\n });\n clone.errorHandler = this.errorHandler;\n clone.#notFoundHandler = this.#notFoundHandler;\n clone.routes = this.routes;\n return clone;\n }\n #notFoundHandler = notFoundHandler;\n // Cannot use `#` because it requires visibility at JavaScript runtime.\n errorHandler = errorHandler;\n /**\n * `.route()` allows grouping other Hono instance in routes.\n *\n * @see {@link https://hono.dev/docs/api/routing#grouping}\n *\n * @param {string} path - base Path\n * @param {Hono} app - other Hono instance\n * @returns {Hono} routed Hono instance\n *\n * @example\n * ```ts\n * const app = new Hono()\n * const app2 = new Hono()\n *\n * app2.get(\"/user\", (c) => c.text(\"user\"))\n * app.route(\"/api\", app2) // GET /api/user\n * ```\n */\n route(path, app) {\n const subApp = this.basePath(path);\n app.routes.map((r) => {\n let handler;\n if (app.errorHandler === errorHandler) {\n handler = r.handler;\n } else {\n handler = async (c, next) => (await compose([], app.errorHandler)(c, () => r.handler(c, next))).res;\n handler[COMPOSED_HANDLER] = r.handler;\n }\n subApp.#addRoute(r.method, r.path, handler);\n });\n return this;\n }\n /**\n * `.basePath()` allows base paths to be specified.\n *\n * @see {@link https://hono.dev/docs/api/routing#base-path}\n *\n * @param {string} path - base Path\n * @returns {Hono} changed Hono instance\n *\n * @example\n * ```ts\n * const api = new Hono().basePath('/api')\n * ```\n */\n basePath(path) {\n const subApp = this.#clone();\n subApp._basePath = mergePath(this._basePath, path);\n return subApp;\n }\n /**\n * `.onError()` handles an error and returns a customized Response.\n *\n * @see {@link https://hono.dev/docs/api/hono#error-handling}\n *\n * @param {ErrorHandler} handler - request Handler for error\n * @returns {Hono} changed Hono instance\n *\n * @example\n * ```ts\n * app.onError((err, c) => {\n * console.error(`${err}`)\n * return c.text('Custom Error Message', 500)\n * })\n * ```\n */\n onError = (handler) => {\n this.errorHandler = handler;\n return this;\n };\n /**\n * `.notFound()` allows you to customize a Not Found Response.\n *\n * @see {@link https://hono.dev/docs/api/hono#not-found}\n *\n * @param {NotFoundHandler} handler - request handler for not-found\n * @returns {Hono} changed Hono instance\n *\n * @example\n * ```ts\n * app.notFound((c) => {\n * return c.text('Custom 404 Message', 404)\n * })\n * ```\n */\n notFound = (handler) => {\n this.#notFoundHandler = handler;\n return this;\n };\n /**\n * `.mount()` allows you to mount applications built with other frameworks into your Hono application.\n *\n * @see {@link https://hono.dev/docs/api/hono#mount}\n *\n * @param {string} path - base Path\n * @param {Function} applicationHandler - other Request Handler\n * @param {MountOptions} [options] - options of `.mount()`\n * @returns {Hono} mounted Hono instance\n *\n * @example\n * ```ts\n * import { Router as IttyRouter } from 'itty-router'\n * import { Hono } from 'hono'\n * // Create itty-router application\n * const ittyRouter = IttyRouter()\n * // GET /itty-router/hello\n * ittyRouter.get('/hello', () => new Response('Hello from itty-router'))\n *\n * const app = new Hono()\n * app.mount('/itty-router', ittyRouter.handle)\n * ```\n *\n * @example\n * ```ts\n * const app = new Hono()\n * // Send the request to another application without modification.\n * app.mount('/app', anotherApp, {\n * replaceRequest: (req) => req,\n * })\n * ```\n */\n mount(path, applicationHandler, options) {\n let replaceRequest;\n let optionHandler;\n if (options) {\n if (typeof options === \"function\") {\n optionHandler = options;\n } else {\n optionHandler = options.optionHandler;\n if (options.replaceRequest === false) {\n replaceRequest = (request) => request;\n } else {\n replaceRequest = options.replaceRequest;\n }\n }\n }\n const getOptions = optionHandler ? (c) => {\n const options2 = optionHandler(c);\n return Array.isArray(options2) ? options2 : [options2];\n } : (c) => {\n let executionContext = void 0;\n try {\n executionContext = c.executionCtx;\n } catch {\n }\n return [c.env, executionContext];\n };\n replaceRequest ||= (() => {\n const mergedPath = mergePath(this._basePath, path);\n const pathPrefixLength = mergedPath === \"/\" ? 0 : mergedPath.length;\n return (request) => {\n const url = new URL(request.url);\n url.pathname = url.pathname.slice(pathPrefixLength) || \"/\";\n return new Request(url, request);\n };\n })();\n const handler = async (c, next) => {\n const res = await applicationHandler(replaceRequest(c.req.raw), ...getOptions(c));\n if (res) {\n return res;\n }\n await next();\n };\n this.#addRoute(METHOD_NAME_ALL, mergePath(path, \"*\"), handler);\n return this;\n }\n #addRoute(method, path, handler) {\n method = method.toUpperCase();\n path = mergePath(this._basePath, path);\n const r = { basePath: this._basePath, path, method, handler };\n this.router.add(method, path, [handler, r]);\n this.routes.push(r);\n }\n #handleError(err, c) {\n if (err instanceof Error) {\n return this.errorHandler(err, c);\n }\n throw err;\n }\n #dispatch(request, executionCtx, env, method) {\n if (method === \"HEAD\") {\n return (async () => new Response(null, await this.#dispatch(request, executionCtx, env, \"GET\")))();\n }\n const path = this.getPath(request, { env });\n const matchResult = this.router.match(method, path);\n const c = new Context(request, {\n path,\n matchResult,\n env,\n executionCtx,\n notFoundHandler: this.#notFoundHandler\n });\n if (matchResult[0].length === 1) {\n let res;\n try {\n res = matchResult[0][0][0][0](c, async () => {\n c.res = await this.#notFoundHandler(c);\n });\n } catch (err) {\n return this.#handleError(err, c);\n }\n return res instanceof Promise ? res.then(\n (resolved) => resolved || (c.finalized ? c.res : this.#notFoundHandler(c))\n ).catch((err) => this.#handleError(err, c)) : res ?? this.#notFoundHandler(c);\n }\n const composed = compose(matchResult[0], this.errorHandler, this.#notFoundHandler);\n return (async () => {\n try {\n const context = await composed(c);\n if (!context.finalized) {\n throw new Error(\n \"Context is not finalized. Did you forget to return a Response object or `await next()`?\"\n );\n }\n return context.res;\n } catch (err) {\n return this.#handleError(err, c);\n }\n })();\n }\n /**\n * `.fetch()` will be entry point of your app.\n *\n * @see {@link https://hono.dev/docs/api/hono#fetch}\n *\n * @param {Request} request - request Object of request\n * @param {Env} Env - env Object\n * @param {ExecutionContext} - context of execution\n * @returns {Response | Promise} response of request\n *\n */\n fetch = (request, ...rest) => {\n return this.#dispatch(request, rest[1], rest[0], request.method);\n };\n /**\n * `.request()` is a useful method for testing.\n * You can pass a URL or pathname to send a GET request.\n * app will return a Response object.\n * ```ts\n * test('GET /hello is ok', async () => {\n * const res = await app.request('/hello')\n * expect(res.status).toBe(200)\n * })\n * ```\n * @see https://hono.dev/docs/api/hono#request\n */\n request = (input, requestInit, Env, executionCtx) => {\n if (input instanceof Request) {\n return this.fetch(requestInit ? new Request(input, requestInit) : input, Env, executionCtx);\n }\n input = input.toString();\n return this.fetch(\n new Request(\n /^https?:\\/\\//.test(input) ? input : `http://localhost${mergePath(\"/\", input)}`,\n requestInit\n ),\n Env,\n executionCtx\n );\n };\n /**\n * `.fire()` automatically adds a global fetch event listener.\n * This can be useful for environments that adhere to the Service Worker API, such as non-ES module Cloudflare Workers.\n * @deprecated\n * Use `fire` from `hono/service-worker` instead.\n * ```ts\n * import { Hono } from 'hono'\n * import { fire } from 'hono/service-worker'\n *\n * const app = new Hono()\n * // ...\n * fire(app)\n * ```\n * @see https://hono.dev/docs/api/hono#fire\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API\n * @see https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/\n */\n fire = () => {\n addEventListener(\"fetch\", (event) => {\n event.respondWith(this.#dispatch(event.request, event, void 0, event.request.method));\n });\n };\n};\nexport {\n Hono as HonoBase\n};\n", "// src/router/reg-exp-router/matcher.ts\nimport { METHOD_NAME_ALL } from \"../../router.js\";\nvar emptyParam = [];\nfunction match(method, path) {\n const matchers = this.buildAllMatchers();\n const match2 = ((method2, path2) => {\n const matcher = matchers[method2] || matchers[METHOD_NAME_ALL];\n const staticMatch = matcher[2][path2];\n if (staticMatch) {\n return staticMatch;\n }\n const match3 = path2.match(matcher[0]);\n if (!match3) {\n return [[], emptyParam];\n }\n const index = match3.indexOf(\"\", 1);\n return [matcher[1][index], match3];\n });\n this.match = match2;\n return match2(method, path);\n}\nexport {\n emptyParam,\n match\n};\n", "// src/router/reg-exp-router/node.ts\nvar LABEL_REG_EXP_STR = \"[^/]+\";\nvar ONLY_WILDCARD_REG_EXP_STR = \".*\";\nvar TAIL_WILDCARD_REG_EXP_STR = \"(?:|/.*)\";\nvar PATH_ERROR = /* @__PURE__ */ Symbol();\nvar regExpMetaChars = new Set(\".\\\\+*[^]$()\");\nfunction compareKey(a, b) {\n if (a.length === 1) {\n return b.length === 1 ? a < b ? -1 : 1 : -1;\n }\n if (b.length === 1) {\n return 1;\n }\n if (a === ONLY_WILDCARD_REG_EXP_STR || a === TAIL_WILDCARD_REG_EXP_STR) {\n return 1;\n } else if (b === ONLY_WILDCARD_REG_EXP_STR || b === TAIL_WILDCARD_REG_EXP_STR) {\n return -1;\n }\n if (a === LABEL_REG_EXP_STR) {\n return 1;\n } else if (b === LABEL_REG_EXP_STR) {\n return -1;\n }\n return a.length === b.length ? a < b ? -1 : 1 : b.length - a.length;\n}\nvar Node = class _Node {\n #index;\n #varIndex;\n #children = /* @__PURE__ */ Object.create(null);\n insert(tokens, index, paramMap, context, pathErrorCheckOnly) {\n if (tokens.length === 0) {\n if (this.#index !== void 0) {\n throw PATH_ERROR;\n }\n if (pathErrorCheckOnly) {\n return;\n }\n this.#index = index;\n return;\n }\n const [token, ...restTokens] = tokens;\n const pattern = token === \"*\" ? restTokens.length === 0 ? [\"\", \"\", ONLY_WILDCARD_REG_EXP_STR] : [\"\", \"\", LABEL_REG_EXP_STR] : token === \"/*\" ? [\"\", \"\", TAIL_WILDCARD_REG_EXP_STR] : token.match(/^\\:([^\\{\\}]+)(?:\\{(.+)\\})?$/);\n let node;\n if (pattern) {\n const name = pattern[1];\n let regexpStr = pattern[2] || LABEL_REG_EXP_STR;\n if (name && pattern[2]) {\n if (regexpStr === \".*\") {\n throw PATH_ERROR;\n }\n regexpStr = regexpStr.replace(/^\\((?!\\?:)(?=[^)]+\\)$)/, \"(?:\");\n if (/\\((?!\\?:)/.test(regexpStr)) {\n throw PATH_ERROR;\n }\n }\n node = this.#children[regexpStr];\n if (!node) {\n if (Object.keys(this.#children).some(\n (k) => k !== ONLY_WILDCARD_REG_EXP_STR && k !== TAIL_WILDCARD_REG_EXP_STR\n )) {\n throw PATH_ERROR;\n }\n if (pathErrorCheckOnly) {\n return;\n }\n node = this.#children[regexpStr] = new _Node();\n if (name !== \"\") {\n node.#varIndex = context.varIndex++;\n }\n }\n if (!pathErrorCheckOnly && name !== \"\") {\n paramMap.push([name, node.#varIndex]);\n }\n } else {\n node = this.#children[token];\n if (!node) {\n if (Object.keys(this.#children).some(\n (k) => k.length > 1 && k !== ONLY_WILDCARD_REG_EXP_STR && k !== TAIL_WILDCARD_REG_EXP_STR\n )) {\n throw PATH_ERROR;\n }\n if (pathErrorCheckOnly) {\n return;\n }\n node = this.#children[token] = new _Node();\n }\n }\n node.insert(restTokens, index, paramMap, context, pathErrorCheckOnly);\n }\n buildRegExpStr() {\n const childKeys = Object.keys(this.#children).sort(compareKey);\n const strList = childKeys.map((k) => {\n const c = this.#children[k];\n return (typeof c.#varIndex === \"number\" ? `(${k})@${c.#varIndex}` : regExpMetaChars.has(k) ? `\\\\${k}` : k) + c.buildRegExpStr();\n });\n if (typeof this.#index === \"number\") {\n strList.unshift(`#${this.#index}`);\n }\n if (strList.length === 0) {\n return \"\";\n }\n if (strList.length === 1) {\n return strList[0];\n }\n return \"(?:\" + strList.join(\"|\") + \")\";\n }\n};\nexport {\n Node,\n PATH_ERROR\n};\n", "// src/router/reg-exp-router/trie.ts\nimport { Node } from \"./node.js\";\nvar Trie = class {\n #context = { varIndex: 0 };\n #root = new Node();\n insert(path, index, pathErrorCheckOnly) {\n const paramAssoc = [];\n const groups = [];\n for (let i = 0; ; ) {\n let replaced = false;\n path = path.replace(/\\{[^}]+\\}/g, (m) => {\n const mark = `@\\\\${i}`;\n groups[i] = [mark, m];\n i++;\n replaced = true;\n return mark;\n });\n if (!replaced) {\n break;\n }\n }\n const tokens = path.match(/(?::[^\\/]+)|(?:\\/\\*$)|./g) || [];\n for (let i = groups.length - 1; i >= 0; i--) {\n const [mark] = groups[i];\n for (let j = tokens.length - 1; j >= 0; j--) {\n if (tokens[j].indexOf(mark) !== -1) {\n tokens[j] = tokens[j].replace(mark, groups[i][1]);\n break;\n }\n }\n }\n this.#root.insert(tokens, index, paramAssoc, this.#context, pathErrorCheckOnly);\n return paramAssoc;\n }\n buildRegExp() {\n let regexp = this.#root.buildRegExpStr();\n if (regexp === \"\") {\n return [/^$/, [], []];\n }\n let captureIndex = 0;\n const indexReplacementMap = [];\n const paramReplacementMap = [];\n regexp = regexp.replace(/#(\\d+)|@(\\d+)|\\.\\*\\$/g, (_, handlerIndex, paramIndex) => {\n if (handlerIndex !== void 0) {\n indexReplacementMap[++captureIndex] = Number(handlerIndex);\n return \"$()\";\n }\n if (paramIndex !== void 0) {\n paramReplacementMap[Number(paramIndex)] = ++captureIndex;\n return \"\";\n }\n return \"\";\n });\n return [new RegExp(`^${regexp}`), indexReplacementMap, paramReplacementMap];\n }\n};\nexport {\n Trie\n};\n", "// src/router/reg-exp-router/router.ts\nimport {\n MESSAGE_MATCHER_IS_ALREADY_BUILT,\n METHOD_NAME_ALL,\n UnsupportedPathError\n} from \"../../router.js\";\nimport { checkOptionalParameter } from \"../../utils/url.js\";\nimport { match, emptyParam } from \"./matcher.js\";\nimport { PATH_ERROR } from \"./node.js\";\nimport { Trie } from \"./trie.js\";\nvar nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];\nvar wildcardRegExpCache = /* @__PURE__ */ Object.create(null);\nfunction buildWildcardRegExp(path) {\n return wildcardRegExpCache[path] ??= new RegExp(\n path === \"*\" ? \"\" : `^${path.replace(\n /\\/\\*$|([.\\\\+*[^\\]$()])/g,\n (_, metaChar) => metaChar ? `\\\\${metaChar}` : \"(?:|/.*)\"\n )}$`\n );\n}\nfunction clearWildcardRegExpCache() {\n wildcardRegExpCache = /* @__PURE__ */ Object.create(null);\n}\nfunction buildMatcherFromPreprocessedRoutes(routes) {\n const trie = new Trie();\n const handlerData = [];\n if (routes.length === 0) {\n return nullMatcher;\n }\n const routesWithStaticPathFlag = routes.map(\n (route) => [!/\\*|\\/:/.test(route[0]), ...route]\n ).sort(\n ([isStaticA, pathA], [isStaticB, pathB]) => isStaticA ? 1 : isStaticB ? -1 : pathA.length - pathB.length\n );\n const staticMap = /* @__PURE__ */ Object.create(null);\n for (let i = 0, j = -1, len = routesWithStaticPathFlag.length; i < len; i++) {\n const [pathErrorCheckOnly, path, handlers] = routesWithStaticPathFlag[i];\n if (pathErrorCheckOnly) {\n staticMap[path] = [handlers.map(([h]) => [h, /* @__PURE__ */ Object.create(null)]), emptyParam];\n } else {\n j++;\n }\n let paramAssoc;\n try {\n paramAssoc = trie.insert(path, j, pathErrorCheckOnly);\n } catch (e) {\n throw e === PATH_ERROR ? new UnsupportedPathError(path) : e;\n }\n if (pathErrorCheckOnly) {\n continue;\n }\n handlerData[j] = handlers.map(([h, paramCount]) => {\n const paramIndexMap = /* @__PURE__ */ Object.create(null);\n paramCount -= 1;\n for (; paramCount >= 0; paramCount--) {\n const [key, value] = paramAssoc[paramCount];\n paramIndexMap[key] = value;\n }\n return [h, paramIndexMap];\n });\n }\n const [regexp, indexReplacementMap, paramReplacementMap] = trie.buildRegExp();\n for (let i = 0, len = handlerData.length; i < len; i++) {\n for (let j = 0, len2 = handlerData[i].length; j < len2; j++) {\n const map = handlerData[i][j]?.[1];\n if (!map) {\n continue;\n }\n const keys = Object.keys(map);\n for (let k = 0, len3 = keys.length; k < len3; k++) {\n map[keys[k]] = paramReplacementMap[map[keys[k]]];\n }\n }\n }\n const handlerMap = [];\n for (const i in indexReplacementMap) {\n handlerMap[i] = handlerData[indexReplacementMap[i]];\n }\n return [regexp, handlerMap, staticMap];\n}\nfunction findMiddleware(middleware, path) {\n if (!middleware) {\n return void 0;\n }\n for (const k of Object.keys(middleware).sort((a, b) => b.length - a.length)) {\n if (buildWildcardRegExp(k).test(path)) {\n return [...middleware[k]];\n }\n }\n return void 0;\n}\nvar RegExpRouter = class {\n name = \"RegExpRouter\";\n #middleware;\n #routes;\n constructor() {\n this.#middleware = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) };\n this.#routes = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) };\n }\n add(method, path, handler) {\n const middleware = this.#middleware;\n const routes = this.#routes;\n if (!middleware || !routes) {\n throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT);\n }\n if (!middleware[method]) {\n ;\n [middleware, routes].forEach((handlerMap) => {\n handlerMap[method] = /* @__PURE__ */ Object.create(null);\n Object.keys(handlerMap[METHOD_NAME_ALL]).forEach((p) => {\n handlerMap[method][p] = [...handlerMap[METHOD_NAME_ALL][p]];\n });\n });\n }\n if (path === \"/*\") {\n path = \"*\";\n }\n const paramCount = (path.match(/\\/:/g) || []).length;\n if (/\\*$/.test(path)) {\n const re = buildWildcardRegExp(path);\n if (method === METHOD_NAME_ALL) {\n Object.keys(middleware).forEach((m) => {\n middleware[m][path] ||= findMiddleware(middleware[m], path) || findMiddleware(middleware[METHOD_NAME_ALL], path) || [];\n });\n } else {\n middleware[method][path] ||= findMiddleware(middleware[method], path) || findMiddleware(middleware[METHOD_NAME_ALL], path) || [];\n }\n Object.keys(middleware).forEach((m) => {\n if (method === METHOD_NAME_ALL || method === m) {\n Object.keys(middleware[m]).forEach((p) => {\n re.test(p) && middleware[m][p].push([handler, paramCount]);\n });\n }\n });\n Object.keys(routes).forEach((m) => {\n if (method === METHOD_NAME_ALL || method === m) {\n Object.keys(routes[m]).forEach(\n (p) => re.test(p) && routes[m][p].push([handler, paramCount])\n );\n }\n });\n return;\n }\n const paths = checkOptionalParameter(path) || [path];\n for (let i = 0, len = paths.length; i < len; i++) {\n const path2 = paths[i];\n Object.keys(routes).forEach((m) => {\n if (method === METHOD_NAME_ALL || method === m) {\n routes[m][path2] ||= [\n ...findMiddleware(middleware[m], path2) || findMiddleware(middleware[METHOD_NAME_ALL], path2) || []\n ];\n routes[m][path2].push([handler, paramCount - len + i + 1]);\n }\n });\n }\n }\n match = match;\n buildAllMatchers() {\n const matchers = /* @__PURE__ */ Object.create(null);\n Object.keys(this.#routes).concat(Object.keys(this.#middleware)).forEach((method) => {\n matchers[method] ||= this.#buildMatcher(method);\n });\n this.#middleware = this.#routes = void 0;\n clearWildcardRegExpCache();\n return matchers;\n }\n #buildMatcher(method) {\n const routes = [];\n let hasOwnRoute = method === METHOD_NAME_ALL;\n [this.#middleware, this.#routes].forEach((r) => {\n const ownRoute = r[method] ? Object.keys(r[method]).map((path) => [path, r[method][path]]) : [];\n if (ownRoute.length !== 0) {\n hasOwnRoute ||= true;\n routes.push(...ownRoute);\n } else if (method !== METHOD_NAME_ALL) {\n routes.push(\n ...Object.keys(r[METHOD_NAME_ALL]).map((path) => [path, r[METHOD_NAME_ALL][path]])\n );\n }\n });\n if (!hasOwnRoute) {\n return null;\n } else {\n return buildMatcherFromPreprocessedRoutes(routes);\n }\n }\n};\nexport {\n RegExpRouter\n};\n", "// src/router/reg-exp-router/prepared-router.ts\nimport { METHOD_NAME_ALL } from \"../../router.js\";\nimport { match, emptyParam } from \"./matcher.js\";\nimport { RegExpRouter } from \"./router.js\";\nvar PreparedRegExpRouter = class {\n name = \"PreparedRegExpRouter\";\n #matchers;\n #relocateMap;\n constructor(matchers, relocateMap) {\n this.#matchers = matchers;\n this.#relocateMap = relocateMap;\n }\n #addWildcard(method, handlerData) {\n const matcher = this.#matchers[method];\n matcher[1].forEach((list) => list && list.push(handlerData));\n Object.values(matcher[2]).forEach((list) => list[0].push(handlerData));\n }\n #addPath(method, path, handler, indexes, map) {\n const matcher = this.#matchers[method];\n if (!map) {\n matcher[2][path][0].push([handler, {}]);\n } else {\n indexes.forEach((index) => {\n if (typeof index === \"number\") {\n matcher[1][index].push([handler, map]);\n } else {\n ;\n matcher[2][index || path][0].push([handler, map]);\n }\n });\n }\n }\n add(method, path, handler) {\n if (!this.#matchers[method]) {\n const all = this.#matchers[METHOD_NAME_ALL];\n const staticMap = {};\n for (const key in all[2]) {\n staticMap[key] = [all[2][key][0].slice(), emptyParam];\n }\n this.#matchers[method] = [\n all[0],\n all[1].map((list) => Array.isArray(list) ? list.slice() : 0),\n staticMap\n ];\n }\n if (path === \"/*\" || path === \"*\") {\n const handlerData = [handler, {}];\n if (method === METHOD_NAME_ALL) {\n for (const m in this.#matchers) {\n this.#addWildcard(m, handlerData);\n }\n } else {\n this.#addWildcard(method, handlerData);\n }\n return;\n }\n const data = this.#relocateMap[path];\n if (!data) {\n throw new Error(`Path ${path} is not registered`);\n }\n for (const [indexes, map] of data) {\n if (method === METHOD_NAME_ALL) {\n for (const m in this.#matchers) {\n this.#addPath(m, path, handler, indexes, map);\n }\n } else {\n this.#addPath(method, path, handler, indexes, map);\n }\n }\n }\n buildAllMatchers() {\n return this.#matchers;\n }\n match = match;\n};\nvar buildInitParams = ({ paths }) => {\n const RegExpRouterWithMatcherExport = class extends RegExpRouter {\n buildAndExportAllMatchers() {\n return this.buildAllMatchers();\n }\n };\n const router = new RegExpRouterWithMatcherExport();\n for (const path of paths) {\n router.add(METHOD_NAME_ALL, path, path);\n }\n const matchers = router.buildAndExportAllMatchers();\n const all = matchers[METHOD_NAME_ALL];\n const relocateMap = {};\n for (const path of paths) {\n if (path === \"/*\" || path === \"*\") {\n continue;\n }\n all[1].forEach((list, i) => {\n list.forEach(([p, map]) => {\n if (p === path) {\n if (relocateMap[path]) {\n relocateMap[path][0][1] = {\n ...relocateMap[path][0][1],\n ...map\n };\n } else {\n relocateMap[path] = [[[], map]];\n }\n if (relocateMap[path][0][0].findIndex((j) => j === i) === -1) {\n relocateMap[path][0][0].push(i);\n }\n }\n });\n });\n for (const path2 in all[2]) {\n all[2][path2][0].forEach(([p]) => {\n if (p === path) {\n relocateMap[path] ||= [[[]]];\n const value = path2 === path ? \"\" : path2;\n if (relocateMap[path][0][0].findIndex((v) => v === value) === -1) {\n relocateMap[path][0][0].push(value);\n }\n }\n });\n }\n }\n for (let i = 0, len = all[1].length; i < len; i++) {\n all[1][i] = all[1][i] ? [] : 0;\n }\n for (const path in all[2]) {\n all[2][path][0] = [];\n }\n return [matchers, relocateMap];\n};\nvar serializeInitParams = ([matchers, relocateMap]) => {\n const matchersStr = JSON.stringify(\n matchers,\n (_, value) => value instanceof RegExp ? `##${value.toString()}##` : value\n ).replace(/\"##(.+?)##\"/g, (_, str) => str.replace(/\\\\\\\\/g, \"\\\\\"));\n const relocateMapStr = JSON.stringify(relocateMap);\n return `[${matchersStr},${relocateMapStr}]`;\n};\nexport {\n PreparedRegExpRouter,\n buildInitParams,\n serializeInitParams\n};\n", "// src/router/reg-exp-router/index.ts\nimport { RegExpRouter } from \"./router.js\";\nimport { PreparedRegExpRouter, buildInitParams, serializeInitParams } from \"./prepared-router.js\";\nexport {\n PreparedRegExpRouter,\n RegExpRouter,\n buildInitParams,\n serializeInitParams\n};\n", "// src/router/smart-router/router.ts\nimport { MESSAGE_MATCHER_IS_ALREADY_BUILT, UnsupportedPathError } from \"../../router.js\";\nvar SmartRouter = class {\n name = \"SmartRouter\";\n #routers = [];\n #routes = [];\n constructor(init) {\n this.#routers = init.routers;\n }\n add(method, path, handler) {\n if (!this.#routes) {\n throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT);\n }\n this.#routes.push([method, path, handler]);\n }\n match(method, path) {\n if (!this.#routes) {\n throw new Error(\"Fatal error\");\n }\n const routers = this.#routers;\n const routes = this.#routes;\n const len = routers.length;\n let i = 0;\n let res;\n for (; i < len; i++) {\n const router = routers[i];\n try {\n for (let i2 = 0, len2 = routes.length; i2 < len2; i2++) {\n router.add(...routes[i2]);\n }\n res = router.match(method, path);\n } catch (e) {\n if (e instanceof UnsupportedPathError) {\n continue;\n }\n throw e;\n }\n this.match = router.match.bind(router);\n this.#routers = [router];\n this.#routes = void 0;\n break;\n }\n if (i === len) {\n throw new Error(\"Fatal error\");\n }\n this.name = `SmartRouter + ${this.activeRouter.name}`;\n return res;\n }\n get activeRouter() {\n if (this.#routes || this.#routers.length !== 1) {\n throw new Error(\"No active router has been determined yet.\");\n }\n return this.#routers[0];\n }\n};\nexport {\n SmartRouter\n};\n", "// src/router/smart-router/index.ts\nimport { SmartRouter } from \"./router.js\";\nexport {\n SmartRouter\n};\n", "// src/router/trie-router/node.ts\nimport { METHOD_NAME_ALL } from \"../../router.js\";\nimport { getPattern, splitPath, splitRoutingPath } from \"../../utils/url.js\";\nvar emptyParams = /* @__PURE__ */ Object.create(null);\nvar hasChildren = (children) => {\n for (const _ in children) {\n return true;\n }\n return false;\n};\nvar Node = class _Node {\n #methods;\n #children;\n #patterns;\n #order = 0;\n #params = emptyParams;\n constructor(method, handler, children) {\n this.#children = children || /* @__PURE__ */ Object.create(null);\n this.#methods = [];\n if (method && handler) {\n const m = /* @__PURE__ */ Object.create(null);\n m[method] = { handler, possibleKeys: [], score: 0 };\n this.#methods = [m];\n }\n this.#patterns = [];\n }\n insert(method, path, handler) {\n this.#order = ++this.#order;\n let curNode = this;\n const parts = splitRoutingPath(path);\n const possibleKeys = [];\n for (let i = 0, len = parts.length; i < len; i++) {\n const p = parts[i];\n const nextP = parts[i + 1];\n const pattern = getPattern(p, nextP);\n const key = Array.isArray(pattern) ? pattern[0] : p;\n if (key in curNode.#children) {\n curNode = curNode.#children[key];\n if (pattern) {\n possibleKeys.push(pattern[1]);\n }\n continue;\n }\n curNode.#children[key] = new _Node();\n if (pattern) {\n curNode.#patterns.push(pattern);\n possibleKeys.push(pattern[1]);\n }\n curNode = curNode.#children[key];\n }\n curNode.#methods.push({\n [method]: {\n handler,\n possibleKeys: possibleKeys.filter((v, i, a) => a.indexOf(v) === i),\n score: this.#order\n }\n });\n return curNode;\n }\n #pushHandlerSets(handlerSets, node, method, nodeParams, params) {\n for (let i = 0, len = node.#methods.length; i < len; i++) {\n const m = node.#methods[i];\n const handlerSet = m[method] || m[METHOD_NAME_ALL];\n const processedSet = {};\n if (handlerSet !== void 0) {\n handlerSet.params = /* @__PURE__ */ Object.create(null);\n handlerSets.push(handlerSet);\n if (nodeParams !== emptyParams || params && params !== emptyParams) {\n for (let i2 = 0, len2 = handlerSet.possibleKeys.length; i2 < len2; i2++) {\n const key = handlerSet.possibleKeys[i2];\n const processed = processedSet[handlerSet.score];\n handlerSet.params[key] = params?.[key] && !processed ? params[key] : nodeParams[key] ?? params?.[key];\n processedSet[handlerSet.score] = true;\n }\n }\n }\n }\n }\n search(method, path) {\n const handlerSets = [];\n this.#params = emptyParams;\n const curNode = this;\n let curNodes = [curNode];\n const parts = splitPath(path);\n const curNodesQueue = [];\n const len = parts.length;\n let partOffsets = null;\n for (let i = 0; i < len; i++) {\n const part = parts[i];\n const isLast = i === len - 1;\n const tempNodes = [];\n for (let j = 0, len2 = curNodes.length; j < len2; j++) {\n const node = curNodes[j];\n const nextNode = node.#children[part];\n if (nextNode) {\n nextNode.#params = node.#params;\n if (isLast) {\n if (nextNode.#children[\"*\"]) {\n this.#pushHandlerSets(handlerSets, nextNode.#children[\"*\"], method, node.#params);\n }\n this.#pushHandlerSets(handlerSets, nextNode, method, node.#params);\n } else {\n tempNodes.push(nextNode);\n }\n }\n for (let k = 0, len3 = node.#patterns.length; k < len3; k++) {\n const pattern = node.#patterns[k];\n const params = node.#params === emptyParams ? {} : { ...node.#params };\n if (pattern === \"*\") {\n const astNode = node.#children[\"*\"];\n if (astNode) {\n this.#pushHandlerSets(handlerSets, astNode, method, node.#params);\n astNode.#params = params;\n tempNodes.push(astNode);\n }\n continue;\n }\n const [key, name, matcher] = pattern;\n if (!part && !(matcher instanceof RegExp)) {\n continue;\n }\n const child = node.#children[key];\n if (matcher instanceof RegExp) {\n if (partOffsets === null) {\n partOffsets = new Array(len);\n let offset = path[0] === \"/\" ? 1 : 0;\n for (let p = 0; p < len; p++) {\n partOffsets[p] = offset;\n offset += parts[p].length + 1;\n }\n }\n const restPathString = path.substring(partOffsets[i]);\n const m = matcher.exec(restPathString);\n if (m) {\n params[name] = m[0];\n this.#pushHandlerSets(handlerSets, child, method, node.#params, params);\n if (hasChildren(child.#children)) {\n child.#params = params;\n const componentCount = m[0].match(/\\//)?.length ?? 0;\n const targetCurNodes = curNodesQueue[componentCount] ||= [];\n targetCurNodes.push(child);\n }\n continue;\n }\n }\n if (matcher === true || matcher.test(part)) {\n params[name] = part;\n if (isLast) {\n this.#pushHandlerSets(handlerSets, child, method, params, node.#params);\n if (child.#children[\"*\"]) {\n this.#pushHandlerSets(\n handlerSets,\n child.#children[\"*\"],\n method,\n params,\n node.#params\n );\n }\n } else {\n child.#params = params;\n tempNodes.push(child);\n }\n }\n }\n }\n const shifted = curNodesQueue.shift();\n curNodes = shifted ? tempNodes.concat(shifted) : tempNodes;\n }\n if (handlerSets.length > 1) {\n handlerSets.sort((a, b) => {\n return a.score - b.score;\n });\n }\n return [handlerSets.map(({ handler, params }) => [handler, params])];\n }\n};\nexport {\n Node\n};\n", "// src/router/trie-router/router.ts\nimport { checkOptionalParameter } from \"../../utils/url.js\";\nimport { Node } from \"./node.js\";\nvar TrieRouter = class {\n name = \"TrieRouter\";\n #node;\n constructor() {\n this.#node = new Node();\n }\n add(method, path, handler) {\n const results = checkOptionalParameter(path);\n if (results) {\n for (let i = 0, len = results.length; i < len; i++) {\n this.#node.insert(method, results[i], handler);\n }\n return;\n }\n this.#node.insert(method, path, handler);\n }\n match(method, path) {\n return this.#node.search(method, path);\n }\n};\nexport {\n TrieRouter\n};\n", "// src/router/trie-router/index.ts\nimport { TrieRouter } from \"./router.js\";\nexport {\n TrieRouter\n};\n", "// src/hono.ts\nimport { HonoBase } from \"./hono-base.js\";\nimport { RegExpRouter } from \"./router/reg-exp-router/index.js\";\nimport { SmartRouter } from \"./router/smart-router/index.js\";\nimport { TrieRouter } from \"./router/trie-router/index.js\";\nvar Hono = class extends HonoBase {\n /**\n * Creates an instance of the Hono class.\n *\n * @param options - Optional configuration options for the Hono instance.\n */\n constructor(options = {}) {\n super(options);\n this.router = options.router ?? new SmartRouter({\n routers: [new RegExpRouter(), new TrieRouter()]\n });\n }\n};\nexport {\n Hono\n};\n", "// src/index.ts\nimport { Hono } from \"./hono.js\";\nexport {\n Hono\n};\n", "// src/middleware/cors/index.ts\nvar cors = (options) => {\n const defaults = {\n origin: \"*\",\n allowMethods: [\"GET\", \"HEAD\", \"PUT\", \"POST\", \"DELETE\", \"PATCH\"],\n allowHeaders: [],\n exposeHeaders: []\n };\n const opts = {\n ...defaults,\n ...options\n };\n const findAllowOrigin = ((optsOrigin) => {\n if (typeof optsOrigin === \"string\") {\n if (optsOrigin === \"*\") {\n if (opts.credentials) {\n return (origin) => origin || null;\n }\n return () => optsOrigin;\n } else {\n return (origin) => optsOrigin === origin ? origin : null;\n }\n } else if (typeof optsOrigin === \"function\") {\n return optsOrigin;\n } else {\n return (origin) => optsOrigin.includes(origin) ? origin : null;\n }\n })(opts.origin);\n const findAllowMethods = ((optsAllowMethods) => {\n if (typeof optsAllowMethods === \"function\") {\n return optsAllowMethods;\n } else if (Array.isArray(optsAllowMethods)) {\n return () => optsAllowMethods;\n } else {\n return () => [];\n }\n })(opts.allowMethods);\n return async function cors2(c, next) {\n function set(key, value) {\n c.res.headers.set(key, value);\n }\n const allowOrigin = await findAllowOrigin(c.req.header(\"origin\") || \"\", c);\n if (allowOrigin) {\n set(\"Access-Control-Allow-Origin\", allowOrigin);\n }\n if (opts.credentials) {\n set(\"Access-Control-Allow-Credentials\", \"true\");\n }\n if (opts.exposeHeaders?.length) {\n set(\"Access-Control-Expose-Headers\", opts.exposeHeaders.join(\",\"));\n }\n if (c.req.method === \"OPTIONS\") {\n if (opts.origin !== \"*\" || opts.credentials) {\n set(\"Vary\", \"Origin\");\n }\n if (opts.maxAge != null) {\n set(\"Access-Control-Max-Age\", opts.maxAge.toString());\n }\n const allowMethods = await findAllowMethods(c.req.header(\"origin\") || \"\", c);\n if (allowMethods.length) {\n set(\"Access-Control-Allow-Methods\", allowMethods.join(\",\"));\n }\n let headers = opts.allowHeaders;\n if (!headers?.length) {\n const requestHeaders = c.req.header(\"Access-Control-Request-Headers\");\n if (requestHeaders) {\n headers = requestHeaders.split(/\\s*,\\s*/);\n }\n }\n if (headers?.length) {\n set(\"Access-Control-Allow-Headers\", headers.join(\",\"));\n c.res.headers.append(\"Vary\", \"Access-Control-Request-Headers\");\n }\n c.res.headers.delete(\"Content-Length\");\n c.res.headers.delete(\"Content-Type\");\n return new Response(null, {\n headers: c.res.headers,\n status: 204,\n statusText: \"No Content\"\n });\n }\n await next();\n if (opts.origin !== \"*\" || opts.credentials) {\n c.header(\"Vary\", \"Origin\", { append: true });\n }\n };\n};\nexport {\n cors\n};\n", "// src/utils/color.ts\nfunction getColorEnabled() {\n const { process, Deno } = globalThis;\n const isNoColor = typeof Deno?.noColor === \"boolean\" ? Deno.noColor : process !== void 0 ? (\n // eslint-disable-next-line no-unsafe-optional-chaining\n \"NO_COLOR\" in process?.env\n ) : false;\n return !isNoColor;\n}\nasync function getColorEnabledAsync() {\n const { navigator } = globalThis;\n const cfWorkers = \"cloudflare:workers\";\n const isNoColor = navigator !== void 0 && navigator.userAgent === \"Cloudflare-Workers\" ? await (async () => {\n try {\n return \"NO_COLOR\" in ((await import(cfWorkers)).env ?? {});\n } catch {\n return false;\n }\n })() : !getColorEnabled();\n return !isNoColor;\n}\nexport {\n getColorEnabled,\n getColorEnabledAsync\n};\n", "// src/middleware/logger/index.ts\nimport { getColorEnabledAsync } from \"../../utils/color.js\";\nvar humanize = (times) => {\n const [delimiter, separator] = [\",\", \".\"];\n const orderTimes = times.map((v) => v.replace(/(\\d)(?=(\\d\\d\\d)+(?!\\d))/g, \"$1\" + delimiter));\n return orderTimes.join(separator);\n};\nvar time = (start) => {\n const delta = Date.now() - start;\n return humanize([delta < 1e3 ? delta + \"ms\" : Math.round(delta / 1e3) + \"s\"]);\n};\nvar colorStatus = async (status) => {\n const colorEnabled = await getColorEnabledAsync();\n if (colorEnabled) {\n switch (status / 100 | 0) {\n case 5:\n return `\\x1B[31m${status}\\x1B[0m`;\n case 4:\n return `\\x1B[33m${status}\\x1B[0m`;\n case 3:\n return `\\x1B[36m${status}\\x1B[0m`;\n case 2:\n return `\\x1B[32m${status}\\x1B[0m`;\n }\n }\n return `${status}`;\n};\nasync function log(fn, prefix, method, path, status = 0, elapsed) {\n const out = prefix === \"<--\" /* Incoming */ ? `${prefix} ${method} ${path}` : `${prefix} ${method} ${path} ${await colorStatus(status)} ${elapsed}`;\n fn(out);\n}\nvar logger = (fn = console.log) => {\n return async function logger2(c, next) {\n const { method, url } = c.req;\n const path = url.slice(url.indexOf(\"/\", 8));\n await log(fn, \"<--\" /* Incoming */, method, path);\n const start = Date.now();\n await next();\n await log(fn, \"-->\" /* Outgoing */, method, path, c.res.status, time(start));\n };\n};\nexport {\n logger\n};\n", "/** @internal */\nexport type UnsetMarker = 'unsetMarker' & {\n __brand: 'unsetMarker';\n};\n\n/**\n * Ensures there are no duplicate keys when building a procedure.\n * @internal\n */\nexport function mergeWithoutOverrides>(\n obj1: TType,\n ...objs: Partial[]\n): TType {\n const newObj: TType = Object.assign(emptyObject(), obj1);\n\n for (const overrides of objs) {\n for (const key in overrides) {\n if (key in newObj && newObj[key] !== overrides[key]) {\n throw new Error(`Duplicate key ${key}`);\n }\n newObj[key as keyof TType] = overrides[key] as TType[keyof TType];\n }\n }\n return newObj;\n}\n\n/**\n * Check that value is object\n * @internal\n */\nexport function isObject(value: unknown): value is Record {\n return !!value && !Array.isArray(value) && typeof value === 'object';\n}\n\ntype AnyFn = ((...args: any[]) => unknown) & Record;\nexport function isFunction(fn: unknown): fn is AnyFn {\n return typeof fn === 'function';\n}\n\n/**\n * Create an object without inheriting anything from `Object.prototype`\n * @internal\n */\nexport function emptyObject>(): TObj {\n return Object.create(null);\n}\n\nconst asyncIteratorsSupported =\n typeof Symbol === 'function' && !!Symbol.asyncIterator;\n\nexport function isAsyncIterable(\n value: unknown,\n): value is AsyncIterable {\n return (\n asyncIteratorsSupported && isObject(value) && Symbol.asyncIterator in value\n );\n}\n\n/**\n * Run an IIFE\n */\nexport const run = (fn: () => TValue): TValue => fn();\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nexport function noop(): void {}\n\nexport function identity(it: T): T {\n return it;\n}\n\n/**\n * Generic runtime assertion function. Throws, if the condition is not `true`.\n *\n * Can be used as a slightly less dangerous variant of type assertions. Code\n * mistakes would be revealed at runtime then (hopefully during testing).\n */\nexport function assert(\n condition: boolean,\n msg = 'no additional info',\n): asserts condition {\n if (!condition) {\n throw new Error(`AssertionError: ${msg}`);\n }\n}\n\nexport function sleep(ms = 0): Promise {\n return new Promise((res) => setTimeout(res, ms));\n}\n\n/**\n * Ponyfill for\n * [`AbortSignal.any`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/any_static).\n */\nexport function abortSignalsAnyPonyfill(signals: AbortSignal[]): AbortSignal {\n if (typeof AbortSignal.any === 'function') {\n return AbortSignal.any(signals);\n }\n\n const ac = new AbortController();\n\n for (const signal of signals) {\n if (signal.aborted) {\n trigger();\n break;\n }\n signal.addEventListener('abort', trigger, { once: true });\n }\n\n return ac.signal;\n\n function trigger() {\n ac.abort();\n for (const signal of signals) {\n signal.removeEventListener('abort', trigger);\n }\n }\n}\n", "import type { InvertKeyValue, ValueOf } from '../types';\n\n// reference: https://www.jsonrpc.org/specification\n\n/**\n * JSON-RPC 2.0 Error codes\n *\n * `-32000` to `-32099` are reserved for implementation-defined server-errors.\n * For tRPC we're copying the last digits of HTTP 4XX errors.\n */\nexport const TRPC_ERROR_CODES_BY_KEY = {\n /**\n * Invalid JSON was received by the server.\n * An error occurred on the server while parsing the JSON text.\n */\n PARSE_ERROR: -32700,\n /**\n * The JSON sent is not a valid Request object.\n */\n BAD_REQUEST: -32600, // 400\n\n // Internal JSON-RPC error\n INTERNAL_SERVER_ERROR: -32603, // 500\n NOT_IMPLEMENTED: -32603, // 501\n BAD_GATEWAY: -32603, // 502\n SERVICE_UNAVAILABLE: -32603, // 503\n GATEWAY_TIMEOUT: -32603, // 504\n\n // Implementation specific errors\n UNAUTHORIZED: -32001, // 401\n PAYMENT_REQUIRED: -32002, // 402\n FORBIDDEN: -32003, // 403\n NOT_FOUND: -32004, // 404\n METHOD_NOT_SUPPORTED: -32005, // 405\n TIMEOUT: -32008, // 408\n CONFLICT: -32009, // 409\n PRECONDITION_FAILED: -32012, // 412\n PAYLOAD_TOO_LARGE: -32013, // 413\n UNSUPPORTED_MEDIA_TYPE: -32015, // 415\n UNPROCESSABLE_CONTENT: -32022, // 422\n PRECONDITION_REQUIRED: -32028, // 428\n TOO_MANY_REQUESTS: -32029, // 429\n CLIENT_CLOSED_REQUEST: -32099, // 499\n} as const;\n\n// pure\nexport const TRPC_ERROR_CODES_BY_NUMBER: InvertKeyValue<\n typeof TRPC_ERROR_CODES_BY_KEY\n> = {\n [-32700]: 'PARSE_ERROR',\n [-32600]: 'BAD_REQUEST',\n [-32603]: 'INTERNAL_SERVER_ERROR',\n [-32001]: 'UNAUTHORIZED',\n [-32002]: 'PAYMENT_REQUIRED',\n [-32003]: 'FORBIDDEN',\n [-32004]: 'NOT_FOUND',\n [-32005]: 'METHOD_NOT_SUPPORTED',\n [-32008]: 'TIMEOUT',\n [-32009]: 'CONFLICT',\n [-32012]: 'PRECONDITION_FAILED',\n [-32013]: 'PAYLOAD_TOO_LARGE',\n [-32015]: 'UNSUPPORTED_MEDIA_TYPE',\n [-32022]: 'UNPROCESSABLE_CONTENT',\n [-32028]: 'PRECONDITION_REQUIRED',\n [-32029]: 'TOO_MANY_REQUESTS',\n [-32099]: 'CLIENT_CLOSED_REQUEST',\n};\n\nexport type TRPC_ERROR_CODE_NUMBER = ValueOf;\nexport type TRPC_ERROR_CODE_KEY = keyof typeof TRPC_ERROR_CODES_BY_KEY;\n\n/**\n * tRPC error codes that are considered retryable\n * With out of the box SSE, the client will reconnect when these errors are encountered\n */\nexport const retryableRpcCodes: TRPC_ERROR_CODE_NUMBER[] = [\n TRPC_ERROR_CODES_BY_KEY.BAD_GATEWAY,\n TRPC_ERROR_CODES_BY_KEY.SERVICE_UNAVAILABLE,\n TRPC_ERROR_CODES_BY_KEY.GATEWAY_TIMEOUT,\n TRPC_ERROR_CODES_BY_KEY.INTERNAL_SERVER_ERROR,\n];\n", "import { emptyObject } from './utils';\n\ninterface ProxyCallbackOptions {\n path: readonly string[];\n args: readonly unknown[];\n}\ntype ProxyCallback = (opts: ProxyCallbackOptions) => unknown;\n\nconst noop = () => {\n // noop\n};\n\nconst freezeIfAvailable = (obj: object) => {\n if (Object.freeze) {\n Object.freeze(obj);\n }\n};\n\nfunction createInnerProxy(\n callback: ProxyCallback,\n path: readonly string[],\n memo: Record,\n) {\n const cacheKey = path.join('.');\n\n memo[cacheKey] ??= new Proxy(noop, {\n get(_obj, key) {\n if (typeof key !== 'string' || key === 'then') {\n // special case for if the proxy is accidentally treated\n // like a PromiseLike (like in `Promise.resolve(proxy)`)\n return undefined;\n }\n return createInnerProxy(callback, [...path, key], memo);\n },\n apply(_1, _2, args) {\n const lastOfPath = path[path.length - 1];\n\n let opts = { args, path };\n // special handling for e.g. `trpc.hello.call(this, 'there')` and `trpc.hello.apply(this, ['there'])\n if (lastOfPath === 'call') {\n opts = {\n args: args.length >= 2 ? [args[1]] : [],\n path: path.slice(0, -1),\n };\n } else if (lastOfPath === 'apply') {\n opts = {\n args: args.length >= 2 ? args[1] : [],\n path: path.slice(0, -1),\n };\n }\n freezeIfAvailable(opts.args);\n freezeIfAvailable(opts.path);\n return callback(opts);\n },\n });\n\n return memo[cacheKey];\n}\n\n/**\n * Creates a proxy that calls the callback with the path and arguments\n *\n * @internal\n */\nexport const createRecursiveProxy = (\n callback: ProxyCallback,\n): TFaux => createInnerProxy(callback, [], emptyObject()) as TFaux;\n\n/**\n * Used in place of `new Proxy` where each handler will map 1 level deep to another value.\n *\n * @internal\n */\nexport const createFlatProxy = (\n callback: (path: keyof TFaux) => any,\n): TFaux => {\n return new Proxy(noop, {\n get(_obj, name) {\n if (name === 'then') {\n // special case for if the proxy is accidentally treated\n // like a PromiseLike (like in `Promise.resolve(proxy)`)\n return undefined;\n }\n return callback(name as any);\n },\n }) as TFaux;\n};\n", "import type { TRPCError } from '../error/TRPCError';\nimport type { TRPC_ERROR_CODES_BY_KEY, TRPCResponse } from '../rpc';\nimport { TRPC_ERROR_CODES_BY_NUMBER } from '../rpc';\nimport type { InvertKeyValue, ValueOf } from '../types';\nimport { isObject } from '../utils';\n\nexport const JSONRPC2_TO_HTTP_CODE: Record<\n keyof typeof TRPC_ERROR_CODES_BY_KEY,\n number\n> = {\n PARSE_ERROR: 400,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n PAYMENT_REQUIRED: 402,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n METHOD_NOT_SUPPORTED: 405,\n TIMEOUT: 408,\n CONFLICT: 409,\n PRECONDITION_FAILED: 412,\n PAYLOAD_TOO_LARGE: 413,\n UNSUPPORTED_MEDIA_TYPE: 415,\n UNPROCESSABLE_CONTENT: 422,\n PRECONDITION_REQUIRED: 428,\n TOO_MANY_REQUESTS: 429,\n CLIENT_CLOSED_REQUEST: 499,\n INTERNAL_SERVER_ERROR: 500,\n NOT_IMPLEMENTED: 501,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n};\n\nexport const HTTP_CODE_TO_JSONRPC2: InvertKeyValue<\n typeof JSONRPC2_TO_HTTP_CODE\n> = {\n 400: 'BAD_REQUEST',\n 401: 'UNAUTHORIZED',\n 402: 'PAYMENT_REQUIRED',\n 403: 'FORBIDDEN',\n 404: 'NOT_FOUND',\n 405: 'METHOD_NOT_SUPPORTED',\n 408: 'TIMEOUT',\n 409: 'CONFLICT',\n 412: 'PRECONDITION_FAILED',\n 413: 'PAYLOAD_TOO_LARGE',\n 415: 'UNSUPPORTED_MEDIA_TYPE',\n 422: 'UNPROCESSABLE_CONTENT',\n 428: 'PRECONDITION_REQUIRED',\n 429: 'TOO_MANY_REQUESTS',\n 499: 'CLIENT_CLOSED_REQUEST',\n 500: 'INTERNAL_SERVER_ERROR',\n 501: 'NOT_IMPLEMENTED',\n 502: 'BAD_GATEWAY',\n 503: 'SERVICE_UNAVAILABLE',\n 504: 'GATEWAY_TIMEOUT',\n} as const;\n\nexport function getStatusCodeFromKey(\n code: keyof typeof TRPC_ERROR_CODES_BY_KEY,\n) {\n return JSONRPC2_TO_HTTP_CODE[code] ?? 500;\n}\n\nexport function getStatusKeyFromCode(\n code: keyof typeof HTTP_CODE_TO_JSONRPC2,\n): ValueOf {\n return HTTP_CODE_TO_JSONRPC2[code] ?? 'INTERNAL_SERVER_ERROR';\n}\n\nexport function getHTTPStatusCode(json: TRPCResponse | TRPCResponse[]) {\n const arr = Array.isArray(json) ? json : [json];\n const httpStatuses = new Set(\n arr.map((res) => {\n if ('error' in res && isObject(res.error.data)) {\n if (typeof res.error.data?.['httpStatus'] === 'number') {\n return res.error.data['httpStatus'];\n }\n const code = TRPC_ERROR_CODES_BY_NUMBER[res.error.code];\n return getStatusCodeFromKey(code);\n }\n return 200;\n }),\n );\n\n if (httpStatuses.size !== 1) {\n return 207;\n }\n\n const httpStatus = httpStatuses.values().next().value;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return httpStatus!;\n}\n\nexport function getHTTPStatusCodeFromError(error: TRPCError) {\n return getStatusCodeFromKey(error.code);\n}\n", "function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var defineProperty = require(\"./defineProperty.js\");\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nmodule.exports = _objectSpread2, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import { getHTTPStatusCodeFromError } from '../http/getHTTPStatusCode';\nimport type { ProcedureType } from '../procedure';\nimport type { AnyRootTypes, RootConfig } from '../rootConfig';\nimport { TRPC_ERROR_CODES_BY_KEY } from '../rpc';\nimport type { DefaultErrorShape } from './formatter';\nimport type { TRPCError } from './TRPCError';\n\n/**\n * @internal\n */\nexport function getErrorShape(opts: {\n config: RootConfig;\n error: TRPCError;\n type: ProcedureType | 'unknown';\n path: string | undefined;\n input: unknown;\n ctx: TRoot['ctx'] | undefined;\n}): TRoot['errorShape'] {\n const { path, error, config } = opts;\n const { code } = opts.error;\n const shape: DefaultErrorShape = {\n message: error.message,\n code: TRPC_ERROR_CODES_BY_KEY[code],\n data: {\n code,\n httpStatus: getHTTPStatusCodeFromError(error),\n },\n };\n if (config.isDev && typeof opts.error.stack === 'string') {\n shape.data.stack = opts.error.stack;\n }\n if (typeof path === 'string') {\n shape.data.path = path;\n }\n return config.errorFormatter({ ...opts, shape });\n}\n", "import type { ProcedureType } from '../procedure';\nimport type {\n TRPC_ERROR_CODE_KEY,\n TRPC_ERROR_CODE_NUMBER,\n TRPCErrorShape,\n} from '../rpc';\nimport type { TRPCError } from './TRPCError';\n\n/**\n * @internal\n */\nexport type ErrorFormatter = (opts: {\n error: TRPCError;\n type: ProcedureType | 'unknown';\n path: string | undefined;\n input: unknown;\n ctx: TContext | undefined;\n shape: DefaultErrorShape;\n}) => TShape;\n\n/**\n * @internal\n */\nexport type DefaultErrorData = {\n code: TRPC_ERROR_CODE_KEY;\n httpStatus: number;\n /**\n * Path to the procedure that threw the error\n */\n path?: string;\n /**\n * Stack trace of the error (only in development)\n */\n stack?: string;\n};\n\n/**\n * @internal\n */\nexport interface DefaultErrorShape extends TRPCErrorShape {\n message: string;\n code: TRPC_ERROR_CODE_NUMBER;\n}\n\nexport const defaultFormatter: ErrorFormatter = ({ shape }) => {\n return shape;\n};\n", "import type { TRPC_ERROR_CODE_KEY } from '../rpc/codes';\nimport { isObject } from '../utils';\n\nclass UnknownCauseError extends Error {\n [key: string]: unknown;\n}\nexport function getCauseFromUnknown(cause: unknown): Error | undefined {\n if (cause instanceof Error) {\n return cause;\n }\n\n const type = typeof cause;\n if (type === 'undefined' || type === 'function' || cause === null) {\n return undefined;\n }\n\n // Primitive types just get wrapped in an error\n if (type !== 'object') {\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n return new Error(String(cause));\n }\n\n // If it's an object, we'll create a synthetic error\n if (isObject(cause)) {\n return Object.assign(new UnknownCauseError(), cause);\n }\n\n return undefined;\n}\n\nexport function getTRPCErrorFromUnknown(cause: unknown): TRPCError {\n if (cause instanceof TRPCError) {\n return cause;\n }\n if (cause instanceof Error && cause.name === 'TRPCError') {\n // https://github.com/trpc/trpc/pull/4848\n return cause as TRPCError;\n }\n\n const trpcError = new TRPCError({\n code: 'INTERNAL_SERVER_ERROR',\n cause,\n });\n\n // Inherit stack from error\n if (cause instanceof Error && cause.stack) {\n trpcError.stack = cause.stack;\n }\n\n return trpcError;\n}\n\nexport class TRPCError extends Error {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore override doesn't work in all environments due to \"This member cannot have an 'override' modifier because it is not declared in the base class 'Error'\"\n public override readonly cause?: Error;\n public readonly code;\n\n constructor(opts: {\n message?: string;\n code: TRPC_ERROR_CODE_KEY;\n cause?: unknown;\n }) {\n const cause = getCauseFromUnknown(opts.cause);\n const message = opts.message ?? cause?.message ?? opts.code;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore https://github.com/tc39/proposal-error-cause\n super(message, { cause });\n\n this.code = opts.code;\n this.name = 'TRPCError';\n this.cause ??= cause;\n }\n}\n", "import type { AnyRootTypes, RootConfig } from './rootConfig';\nimport type { AnyRouter, inferRouterError } from './router';\nimport type {\n TRPCResponse,\n TRPCResponseMessage,\n TRPCResultMessage,\n} from './rpc';\nimport { isObject } from './utils';\n\n/**\n * @public\n */\nexport interface DataTransformer {\n serialize(object: any): any;\n deserialize(object: any): any;\n}\n\ninterface InputDataTransformer extends DataTransformer {\n /**\n * This function runs **on the client** before sending the data to the server.\n */\n serialize(object: any): any;\n /**\n * This function runs **on the server** to transform the data before it is passed to the resolver\n */\n deserialize(object: any): any;\n}\n\ninterface OutputDataTransformer extends DataTransformer {\n /**\n * This function runs **on the server** before sending the data to the client.\n */\n serialize(object: any): any;\n /**\n * This function runs **only on the client** to transform the data sent from the server.\n */\n deserialize(object: any): any;\n}\n\n/**\n * @public\n */\nexport interface CombinedDataTransformer {\n /**\n * Specify how the data sent from the client to the server should be transformed.\n */\n input: InputDataTransformer;\n /**\n * Specify how the data sent from the server to the client should be transformed.\n */\n output: OutputDataTransformer;\n}\n\n/**\n * @public\n */\nexport type CombinedDataTransformerClient = {\n input: Pick;\n output: Pick;\n};\n\n/**\n * @public\n */\nexport type DataTransformerOptions = CombinedDataTransformer | DataTransformer;\n\n/**\n * @internal\n */\nexport function getDataTransformer(\n transformer: DataTransformerOptions,\n): CombinedDataTransformer {\n if ('input' in transformer) {\n return transformer;\n }\n return { input: transformer, output: transformer };\n}\n\n/**\n * @internal\n */\nexport const defaultTransformer: CombinedDataTransformer = {\n input: { serialize: (obj) => obj, deserialize: (obj) => obj },\n output: { serialize: (obj) => obj, deserialize: (obj) => obj },\n};\n\nfunction transformTRPCResponseItem<\n TResponseItem extends TRPCResponse | TRPCResponseMessage,\n>(config: RootConfig, item: TResponseItem): TResponseItem {\n if ('error' in item) {\n return {\n ...item,\n error: config.transformer.output.serialize(item.error),\n };\n }\n\n if ('data' in item.result) {\n return {\n ...item,\n result: {\n ...item.result,\n data: config.transformer.output.serialize(item.result.data),\n },\n };\n }\n\n return item;\n}\n\n/**\n * Takes a unserialized `TRPCResponse` and serializes it with the router's transformers\n **/\nexport function transformTRPCResponse<\n TResponse extends\n | TRPCResponse\n | TRPCResponse[]\n | TRPCResponseMessage\n | TRPCResponseMessage[],\n>(config: RootConfig, itemOrItems: TResponse) {\n return Array.isArray(itemOrItems)\n ? itemOrItems.map((item) => transformTRPCResponseItem(config, item))\n : transformTRPCResponseItem(config, itemOrItems);\n}\n\n// FIXME:\n// - the generics here are probably unnecessary\n// - the RPC-spec could probably be simplified to combine HTTP + WS\n/** @internal */\nfunction transformResultInner(\n response:\n | TRPCResponse>\n | TRPCResponseMessage>,\n transformer: DataTransformer,\n) {\n if ('error' in response) {\n const error = transformer.deserialize(\n response.error,\n ) as inferRouterError;\n return {\n ok: false,\n error: {\n ...response,\n error,\n },\n } as const;\n }\n\n const result = {\n ...response.result,\n ...((!response.result.type || response.result.type === 'data') && {\n type: 'data',\n data: transformer.deserialize(response.result.data),\n }),\n } as TRPCResultMessage['result'];\n return { ok: true, result } as const;\n}\n\nclass TransformResultError extends Error {\n constructor() {\n super('Unable to transform response from server');\n }\n}\n\n/**\n * Transforms and validates that the result is a valid TRPCResponse\n * @internal\n */\nexport function transformResult(\n response:\n | TRPCResponse>\n | TRPCResponseMessage>,\n transformer: DataTransformer,\n): ReturnType {\n let result: ReturnType;\n try {\n // Use the data transformers on the JSON-response\n result = transformResultInner(response, transformer);\n } catch {\n throw new TransformResultError();\n }\n\n // check that output of the transformers is a valid TRPCResponse\n if (\n !result.ok &&\n (!isObject(result.error.error) ||\n typeof result.error.error['code'] !== 'number')\n ) {\n throw new TransformResultError();\n }\n if (result.ok && !isObject(result.result)) {\n throw new TransformResultError();\n }\n return result;\n}\n", "import type { Observable } from '../observable';\nimport { createRecursiveProxy } from './createProxy';\nimport { defaultFormatter } from './error/formatter';\nimport { getTRPCErrorFromUnknown, TRPCError } from './error/TRPCError';\nimport type {\n AnyProcedure,\n ErrorHandlerOptions,\n inferProcedureInput,\n inferProcedureOutput,\n LegacyObservableSubscriptionProcedure,\n} from './procedure';\nimport type { ProcedureCallOptions } from './procedureBuilder';\nimport type { AnyRootTypes, RootConfig } from './rootConfig';\nimport { defaultTransformer } from './transformer';\nimport type { MaybePromise, ValueOf } from './types';\nimport {\n emptyObject,\n isFunction,\n isObject,\n mergeWithoutOverrides,\n} from './utils';\n\nexport interface RouterRecord {\n [key: string]: AnyProcedure | RouterRecord;\n}\n\ntype DecorateProcedure = (\n input: inferProcedureInput,\n) => Promise<\n TProcedure['_def']['type'] extends 'subscription'\n ? TProcedure extends LegacyObservableSubscriptionProcedure\n ? Observable, TRPCError>\n : inferProcedureOutput\n : inferProcedureOutput\n>;\n\n/**\n * @internal\n */\nexport type DecorateRouterRecord = {\n [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value\n ? $Value extends AnyProcedure\n ? DecorateProcedure<$Value>\n : $Value extends RouterRecord\n ? DecorateRouterRecord<$Value>\n : never\n : never;\n};\n\n/**\n * @internal\n */\n\nexport type RouterCallerErrorHandler = (\n opts: ErrorHandlerOptions,\n) => void;\n\n/**\n * @internal\n */\nexport type RouterCaller<\n TRoot extends AnyRootTypes,\n TRecord extends RouterRecord,\n> = (\n /**\n * @note\n * If passing a function, we recommend it's a cached function\n * e.g. wrapped in `React.cache` to avoid unnecessary computations\n */\n ctx: TRoot['ctx'] | (() => MaybePromise),\n options?: {\n onError?: RouterCallerErrorHandler;\n signal?: AbortSignal;\n },\n) => DecorateRouterRecord;\n\n/**\n * @internal\n */\nconst lazyMarker = 'lazyMarker' as 'lazyMarker' & {\n __brand: 'lazyMarker';\n};\nexport type Lazy = (() => Promise) & { [lazyMarker]: true };\n\ntype LazyLoader = {\n load: () => Promise;\n ref: Lazy;\n};\n\nfunction once(fn: () => T): () => T {\n const uncalled = Symbol();\n let result: T | typeof uncalled = uncalled;\n return (): T => {\n if (result === uncalled) {\n result = fn();\n }\n return result;\n };\n}\n\n/**\n * Lazy load a router\n * @see https://trpc.io/docs/server/merging-routers#lazy-load\n */\nexport function lazy(\n importRouter: () => Promise<\n | TRouter\n | {\n [key: string]: TRouter;\n }\n >,\n): Lazy> {\n async function resolve(): Promise {\n const mod = await importRouter();\n\n // if the module is a router, return it\n if (isRouter(mod)) {\n return mod;\n }\n\n const routers = Object.values(mod);\n\n if (routers.length !== 1 || !isRouter(routers[0])) {\n throw new Error(\n \"Invalid router module - either define exactly 1 export or return the router directly.\\nExample: `lazy(() => import('./slow.js').then((m) => m.slowRouter))`\",\n );\n }\n\n return routers[0];\n }\n\n (resolve as Lazy>)[lazyMarker] = true as const;\n\n return resolve as Lazy>;\n}\n\nfunction isLazy(input: unknown): input is Lazy {\n return typeof input === 'function' && lazyMarker in input;\n}\n\n/**\n * @internal\n */\nexport interface RouterDef<\n TRoot extends AnyRootTypes,\n TRecord extends RouterRecord,\n> {\n _config: RootConfig;\n router: true;\n procedure?: never;\n procedures: TRecord;\n record: TRecord;\n lazy: Record>;\n}\n\nexport interface Router<\n TRoot extends AnyRootTypes,\n TRecord extends RouterRecord,\n> {\n _def: RouterDef;\n /**\n * @see https://trpc.io/docs/v11/server/server-side-calls\n */\n createCaller: RouterCaller;\n}\n\nexport type BuiltRouter<\n TRoot extends AnyRootTypes,\n TRecord extends RouterRecord,\n> = Router & TRecord;\n\nexport interface RouterBuilder {\n (\n _: TIn,\n ): BuiltRouter>;\n}\n\nexport type AnyRouter = Router;\n\nexport type inferRouterRootTypes =\n TRouter['_def']['_config']['$types'];\n\nexport type inferRouterContext =\n inferRouterRootTypes['ctx'];\nexport type inferRouterError =\n inferRouterRootTypes['errorShape'];\nexport type inferRouterMeta =\n inferRouterRootTypes['meta'];\n\nfunction isRouter(value: unknown): value is AnyRouter {\n return (\n isObject(value) && isObject(value['_def']) && 'router' in value['_def']\n );\n}\n\nconst emptyRouter = {\n _ctx: null as any,\n _errorShape: null as any,\n _meta: null as any,\n queries: {},\n mutations: {},\n subscriptions: {},\n errorFormatter: defaultFormatter,\n transformer: defaultTransformer,\n};\n\n/**\n * Reserved words that can't be used as router or procedure names\n */\nconst reservedWords = [\n /**\n * Then is a reserved word because otherwise we can't return a promise that returns a Proxy\n * since JS will think that `.then` is something that exists\n */\n 'then',\n /**\n * `fn.call()` and `fn.apply()` are reserved words because otherwise we can't call a function using `.call` or `.apply`\n */\n 'call',\n 'apply',\n];\n\n/** @internal */\nexport type CreateRouterOptions = {\n [key: string]:\n | AnyProcedure\n | AnyRouter\n | CreateRouterOptions\n | Lazy;\n};\n\n/** @internal */\nexport type DecorateCreateRouterOptions<\n TRouterOptions extends CreateRouterOptions,\n> = {\n [K in keyof TRouterOptions]: TRouterOptions[K] extends infer $Value\n ? $Value extends AnyProcedure\n ? $Value\n : $Value extends Router\n ? TRecord\n : $Value extends Lazy>\n ? TRecord\n : $Value extends CreateRouterOptions\n ? DecorateCreateRouterOptions<$Value>\n : never\n : never;\n};\n\n/**\n * @internal\n */\nexport function createRouterFactory(\n config: RootConfig,\n) {\n function createRouterInner(\n input: TInput,\n ): BuiltRouter> {\n const reservedWordsUsed = new Set(\n Object.keys(input).filter((v) => reservedWords.includes(v)),\n );\n if (reservedWordsUsed.size > 0) {\n throw new Error(\n 'Reserved words used in `router({})` call: ' +\n Array.from(reservedWordsUsed).join(', '),\n );\n }\n\n const procedures: Record = emptyObject();\n const lazy: Record> = emptyObject();\n\n function createLazyLoader(opts: {\n ref: Lazy;\n path: readonly string[];\n key: string;\n aggregate: RouterRecord;\n }): LazyLoader {\n return {\n ref: opts.ref,\n load: once(async () => {\n const router = await opts.ref();\n const lazyPath = [...opts.path, opts.key];\n const lazyKey = lazyPath.join('.');\n\n opts.aggregate[opts.key] = step(router._def.record, lazyPath);\n\n delete lazy[lazyKey];\n\n // add lazy loaders for nested routers\n for (const [nestedKey, nestedItem] of Object.entries(\n router._def.lazy,\n )) {\n const nestedRouterKey = [...lazyPath, nestedKey].join('.');\n\n // console.log('adding lazy', nestedRouterKey);\n lazy[nestedRouterKey] = createLazyLoader({\n ref: nestedItem.ref,\n path: lazyPath,\n key: nestedKey,\n aggregate: opts.aggregate[opts.key] as RouterRecord,\n });\n }\n }),\n };\n }\n\n function step(from: CreateRouterOptions, path: readonly string[] = []) {\n const aggregate: RouterRecord = emptyObject();\n for (const [key, item] of Object.entries(from ?? {})) {\n if (isLazy(item)) {\n lazy[[...path, key].join('.')] = createLazyLoader({\n path,\n ref: item,\n key,\n aggregate,\n });\n continue;\n }\n if (isRouter(item)) {\n aggregate[key] = step(item._def.record, [...path, key]);\n continue;\n }\n if (!isProcedure(item)) {\n // RouterRecord\n aggregate[key] = step(item, [...path, key]);\n continue;\n }\n\n const newPath = [...path, key].join('.');\n\n if (procedures[newPath]) {\n throw new Error(`Duplicate key: ${newPath}`);\n }\n\n procedures[newPath] = item;\n aggregate[key] = item;\n }\n\n return aggregate;\n }\n const record = step(input);\n\n const _def: AnyRouter['_def'] = {\n _config: config,\n router: true,\n procedures,\n lazy,\n ...emptyRouter,\n record,\n };\n\n const router: BuiltRouter = {\n ...(record as {}),\n _def,\n createCaller: createCallerFactory()({\n _def,\n }),\n };\n return router as BuiltRouter>;\n }\n\n return createRouterInner;\n}\n\nfunction isProcedure(\n procedureOrRouter: ValueOf,\n): procedureOrRouter is AnyProcedure {\n return typeof procedureOrRouter === 'function';\n}\n\n/**\n * @internal\n */\nexport async function getProcedureAtPath(\n router: Pick, '_def'>,\n path: string,\n): Promise {\n const { _def } = router;\n let procedure = _def.procedures[path];\n\n while (!procedure) {\n const key = Object.keys(_def.lazy).find((key) => path.startsWith(key));\n // console.log(`found lazy: ${key ?? 'NOPE'} (fullPath: ${fullPath})`);\n\n if (!key) {\n return null;\n }\n // console.log('loading', key, '.......');\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const lazyRouter = _def.lazy[key]!;\n await lazyRouter.load();\n\n procedure = _def.procedures[path];\n }\n\n return procedure;\n}\n\n/**\n * @internal\n */\nexport async function callProcedure(\n opts: ProcedureCallOptions & {\n router: AnyRouter;\n allowMethodOverride?: boolean;\n },\n) {\n const { type, path } = opts;\n const proc = await getProcedureAtPath(opts.router, path);\n if (\n !proc ||\n !isProcedure(proc) ||\n (proc._def.type !== type && !opts.allowMethodOverride)\n ) {\n throw new TRPCError({\n code: 'NOT_FOUND',\n message: `No \"${type}\"-procedure on path \"${path}\"`,\n });\n }\n\n /* istanbul ignore if -- @preserve */\n if (\n proc._def.type !== type &&\n opts.allowMethodOverride &&\n proc._def.type === 'subscription'\n ) {\n throw new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message: `Method override is not supported for subscriptions`,\n });\n }\n\n return proc(opts);\n}\n\nexport interface RouterCallerFactory {\n (\n router: Pick, '_def'>,\n ): RouterCaller;\n}\n\nexport function createCallerFactory<\n TRoot extends AnyRootTypes,\n>(): RouterCallerFactory {\n return function createCallerInner(\n router: Pick, '_def'>,\n ): RouterCaller {\n const { _def } = router;\n type Context = TRoot['ctx'];\n\n return function createCaller(ctxOrCallback, opts) {\n return createRecursiveProxy>>(\n async (innerOpts) => {\n const { path, args } = innerOpts;\n const fullPath = path.join('.');\n\n if (path.length === 1 && path[0] === '_def') {\n return _def;\n }\n\n const procedure = await getProcedureAtPath(router, fullPath);\n\n let ctx: Context | undefined = undefined;\n try {\n if (!procedure) {\n throw new TRPCError({\n code: 'NOT_FOUND',\n message: `No procedure found on path \"${path}\"`,\n });\n }\n ctx = isFunction(ctxOrCallback)\n ? await Promise.resolve(ctxOrCallback())\n : ctxOrCallback;\n\n return await procedure({\n path: fullPath,\n getRawInput: async () => args[0],\n ctx,\n type: procedure._def.type,\n signal: opts?.signal,\n batchIndex: 0,\n });\n } catch (cause) {\n opts?.onError?.({\n ctx,\n error: getTRPCErrorFromUnknown(cause),\n input: args[0],\n path: fullPath,\n type: procedure?._def.type ?? 'unknown',\n });\n throw cause;\n }\n },\n );\n };\n };\n}\n\n/** @internal */\nexport type MergeRouters<\n TRouters extends AnyRouter[],\n TRoot extends AnyRootTypes = TRouters[0]['_def']['_config']['$types'],\n TRecord extends RouterRecord = {},\n> = TRouters extends [\n infer Head extends AnyRouter,\n ...infer Tail extends AnyRouter[],\n]\n ? MergeRouters\n : BuiltRouter;\n\nexport function mergeRouters(\n ...routerList: [...TRouters]\n): MergeRouters {\n const record = mergeWithoutOverrides(\n {},\n ...routerList.map((r) => r._def.record),\n );\n const errorFormatter = routerList.reduce(\n (currentErrorFormatter, nextRouter) => {\n if (\n nextRouter._def._config.errorFormatter &&\n nextRouter._def._config.errorFormatter !== defaultFormatter\n ) {\n if (\n currentErrorFormatter !== defaultFormatter &&\n currentErrorFormatter !== nextRouter._def._config.errorFormatter\n ) {\n throw new Error('You seem to have several error formatters');\n }\n return nextRouter._def._config.errorFormatter;\n }\n return currentErrorFormatter;\n },\n defaultFormatter,\n );\n\n const transformer = routerList.reduce((prev, current) => {\n if (\n current._def._config.transformer &&\n current._def._config.transformer !== defaultTransformer\n ) {\n if (\n prev !== defaultTransformer &&\n prev !== current._def._config.transformer\n ) {\n throw new Error('You seem to have several transformers');\n }\n return current._def._config.transformer;\n }\n return prev;\n }, defaultTransformer);\n\n const router = createRouterFactory({\n errorFormatter,\n transformer,\n isDev: routerList.every((r) => r._def._config.isDev),\n allowOutsideOfServer: routerList.every(\n (r) => r._def._config.allowOutsideOfServer,\n ),\n isServer: routerList.every((r) => r._def._config.isServer),\n $types: routerList[0]?._def._config.$types,\n sse: routerList[0]?._def._config.sse,\n })(record);\n\n return router as MergeRouters;\n}\n", "const trackedSymbol = Symbol();\n\ntype TrackedId = string & {\n __brand: 'TrackedId';\n};\nexport type TrackedEnvelope = [TrackedId, TData, typeof trackedSymbol];\n\nexport interface TrackedData {\n /**\n * The id of the message to keep track of in case the connection gets lost\n */\n id: string;\n /**\n * The data field of the message\n */\n data: TData;\n}\n/**\n * Produce a typed server-sent event message\n * @deprecated use `tracked(id, data)` instead\n */\nexport function sse(event: { id: string; data: TData }) {\n return tracked(event.id, event.data);\n}\n\nexport function isTrackedEnvelope(\n value: unknown,\n): value is TrackedEnvelope {\n return Array.isArray(value) && value[2] === trackedSymbol;\n}\n\n/**\n * Automatically track an event so that it can be resumed from a given id if the connection is lost\n */\nexport function tracked(\n id: string,\n data: TData,\n): TrackedEnvelope {\n if (id === '') {\n // This limitation could be removed by using different SSE event names / channels for tracked event and non-tracked event\n throw new Error(\n '`id` must not be an empty string as empty string is the same as not setting the id at all',\n );\n }\n return [id as TrackedId, data, trackedSymbol];\n}\n\nexport type inferTrackedOutput =\n TData extends TrackedEnvelope ? TrackedData<$Data> : TData;\n", "import type { Result } from '../unstable-core-do-not-import';\nimport type {\n Observable,\n Observer,\n OperatorFunction,\n TeardownLogic,\n UnaryFunction,\n Unsubscribable,\n} from './types';\n\n/** @public */\nexport type inferObservableValue =\n TObservable extends Observable ? TValue : never;\n\n/** @public */\nexport function isObservable(x: unknown): x is Observable {\n return typeof x === 'object' && x !== null && 'subscribe' in x;\n}\n\n/** @public */\nexport function observable(\n subscribe: (observer: Observer) => TeardownLogic,\n): Observable {\n const self: Observable = {\n subscribe(observer) {\n let teardownRef: TeardownLogic | null = null;\n let isDone = false;\n let unsubscribed = false;\n let teardownImmediately = false;\n function unsubscribe() {\n if (teardownRef === null) {\n teardownImmediately = true;\n return;\n }\n if (unsubscribed) {\n return;\n }\n unsubscribed = true;\n\n if (typeof teardownRef === 'function') {\n teardownRef();\n } else if (teardownRef) {\n teardownRef.unsubscribe();\n }\n }\n teardownRef = subscribe({\n next(value) {\n if (isDone) {\n return;\n }\n observer.next?.(value);\n },\n error(err) {\n if (isDone) {\n return;\n }\n isDone = true;\n observer.error?.(err);\n unsubscribe();\n },\n complete() {\n if (isDone) {\n return;\n }\n isDone = true;\n observer.complete?.();\n unsubscribe();\n },\n });\n if (teardownImmediately) {\n unsubscribe();\n }\n return {\n unsubscribe,\n };\n },\n pipe(\n ...operations: OperatorFunction[]\n ): Observable {\n return operations.reduce(pipeReducer, self);\n },\n };\n return self;\n}\n\nfunction pipeReducer(prev: any, fn: UnaryFunction) {\n return fn(prev);\n}\n\n/** @internal */\nexport function observableToPromise(\n observable: Observable,\n) {\n const ac = new AbortController();\n const promise = new Promise((resolve, reject) => {\n let isDone = false;\n function onDone() {\n if (isDone) {\n return;\n }\n isDone = true;\n obs$.unsubscribe();\n }\n ac.signal.addEventListener('abort', () => {\n reject(ac.signal.reason);\n });\n const obs$ = observable.subscribe({\n next(data) {\n isDone = true;\n resolve(data);\n onDone();\n },\n error(data) {\n reject(data);\n },\n complete() {\n ac.abort();\n onDone();\n },\n });\n });\n return promise;\n}\n\n/**\n * @internal\n */\nfunction observableToReadableStream(\n observable: Observable,\n signal: AbortSignal,\n): ReadableStream> {\n let unsub: Unsubscribable | null = null;\n\n const onAbort = () => {\n unsub?.unsubscribe();\n unsub = null;\n signal.removeEventListener('abort', onAbort);\n };\n\n return new ReadableStream>({\n start(controller) {\n unsub = observable.subscribe({\n next(data) {\n controller.enqueue({ ok: true, value: data });\n },\n error(error) {\n controller.enqueue({ ok: false, error });\n controller.close();\n },\n complete() {\n controller.close();\n },\n });\n\n if (signal.aborted) {\n onAbort();\n } else {\n signal.addEventListener('abort', onAbort, { once: true });\n }\n },\n cancel() {\n onAbort();\n },\n });\n}\n\n/** @internal */\nexport function observableToAsyncIterable(\n observable: Observable,\n signal: AbortSignal,\n): AsyncIterable {\n const stream = observableToReadableStream(observable, signal);\n\n const reader = stream.getReader();\n const iterator: AsyncIterator = {\n async next() {\n const value = await reader.read();\n if (value.done) {\n return {\n value: undefined,\n done: true,\n };\n }\n const { value: result } = value;\n if (!result.ok) {\n throw result.error;\n }\n return {\n value: result.value,\n done: false,\n };\n },\n async return() {\n await reader.cancel();\n return {\n value: undefined,\n done: true,\n };\n },\n };\n return {\n [Symbol.asyncIterator]() {\n return iterator;\n },\n };\n}\n", "import { TRPCError } from '../error/TRPCError';\nimport { isObject } from '../utils';\nimport type { TRPCRequestInfo } from './types';\n\nexport function parseConnectionParamsFromUnknown(\n parsed: unknown,\n): TRPCRequestInfo['connectionParams'] {\n try {\n if (parsed === null) {\n return null;\n }\n if (!isObject(parsed)) {\n throw new Error('Expected object');\n }\n const nonStringValues = Object.entries(parsed).filter(\n ([_key, value]) => typeof value !== 'string',\n );\n\n if (nonStringValues.length > 0) {\n throw new Error(\n `Expected connectionParams to be string values. Got ${nonStringValues\n .map(([key, value]) => `${key}: ${typeof value}`)\n .join(', ')}`,\n );\n }\n return parsed as Record;\n } catch (cause) {\n throw new TRPCError({\n code: 'PARSE_ERROR',\n message: 'Invalid connection params shape',\n cause,\n });\n }\n}\nexport function parseConnectionParamsFromString(\n str: string,\n): TRPCRequestInfo['connectionParams'] {\n let parsed: unknown;\n try {\n parsed = JSON.parse(str);\n } catch (cause) {\n throw new TRPCError({\n code: 'PARSE_ERROR',\n message: 'Not JSON-parsable query params',\n cause,\n });\n }\n return parseConnectionParamsFromUnknown(parsed);\n}\n", "import { TRPCError } from '../error/TRPCError';\nimport type { ProcedureType } from '../procedure';\nimport { getProcedureAtPath, type AnyRouter } from '../router';\nimport { emptyObject, isObject } from '../utils';\nimport { parseConnectionParamsFromString } from './parseConnectionParams';\nimport type { TRPCAcceptHeader, TRPCRequestInfo } from './types';\n\nexport function getAcceptHeader(headers: Headers): TRPCAcceptHeader | null {\n return (\n (headers.get('trpc-accept') as TRPCAcceptHeader | null) ??\n (headers\n .get('accept')\n ?.split(',')\n .some((t) => t.trim() === 'application/jsonl')\n ? ('application/jsonl' as TRPCAcceptHeader)\n : null)\n );\n}\n\ntype GetRequestInfoOptions = {\n path: string;\n req: Request;\n url: URL | null;\n searchParams: URLSearchParams;\n headers: Headers;\n router: AnyRouter;\n};\n\ntype ContentTypeHandler = {\n isMatch: (opts: Request) => boolean;\n parse: (opts: GetRequestInfoOptions) => Promise;\n};\n\n/**\n * Memoize a function that takes no arguments\n * @internal\n */\nfunction memo(fn: () => Promise) {\n let promise: Promise | null = null;\n const sym = Symbol.for('@trpc/server/http/memo');\n let value: TReturn | typeof sym = sym;\n return {\n /**\n * Lazily read the value\n */\n read: async (): Promise => {\n if (value !== sym) {\n return value;\n }\n\n // dedupes promises and catches errors\n promise ??= fn().catch((cause) => {\n if (cause instanceof TRPCError) {\n throw cause;\n }\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: cause instanceof Error ? cause.message : 'Invalid input',\n cause,\n });\n });\n\n value = await promise;\n promise = null;\n\n return value;\n },\n /**\n * Get an already stored result\n */\n result: (): TReturn | undefined => {\n return value !== sym ? value : undefined;\n },\n };\n}\n\nconst jsonContentTypeHandler: ContentTypeHandler = {\n isMatch(req) {\n return !!req.headers.get('content-type')?.startsWith('application/json');\n },\n async parse(opts) {\n const { req } = opts;\n const isBatchCall = opts.searchParams.get('batch') === '1';\n const paths = isBatchCall ? opts.path.split(',') : [opts.path];\n\n type InputRecord = Record;\n const getInputs = memo(async (): Promise => {\n let inputs: unknown = undefined;\n if (req.method === 'GET') {\n const queryInput = opts.searchParams.get('input');\n if (queryInput) {\n inputs = JSON.parse(queryInput);\n }\n } else {\n inputs = await req.json();\n }\n if (inputs === undefined) {\n return emptyObject();\n }\n\n if (!isBatchCall) {\n const result: InputRecord = emptyObject();\n result[0] =\n opts.router._def._config.transformer.input.deserialize(inputs);\n return result;\n }\n\n if (!isObject(inputs)) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: '\"input\" needs to be an object when doing a batch call',\n });\n }\n const acc: InputRecord = emptyObject();\n for (const index of paths.keys()) {\n const input = inputs[index];\n if (input !== undefined) {\n acc[index] =\n opts.router._def._config.transformer.input.deserialize(input);\n }\n }\n\n return acc;\n });\n\n const calls = await Promise.all(\n paths.map(\n async (path, index): Promise => {\n const procedure = await getProcedureAtPath(opts.router, path);\n return {\n batchIndex: index,\n path,\n procedure,\n getRawInput: async () => {\n const inputs = await getInputs.read();\n let input = inputs[index];\n\n if (procedure?._def.type === 'subscription') {\n const lastEventId =\n opts.headers.get('last-event-id') ??\n opts.searchParams.get('lastEventId') ??\n opts.searchParams.get('Last-Event-Id');\n\n if (lastEventId) {\n if (isObject(input)) {\n input = {\n ...input,\n lastEventId: lastEventId,\n };\n } else {\n input ??= {\n lastEventId: lastEventId,\n };\n }\n }\n }\n return input;\n },\n result: () => {\n return getInputs.result()?.[index];\n },\n };\n },\n ),\n );\n\n const types = new Set(\n calls.map((call) => call.procedure?._def.type).filter(Boolean),\n );\n\n /* istanbul ignore if -- @preserve */\n if (types.size > 1) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: `Cannot mix procedure types in call: ${Array.from(types).join(\n ', ',\n )}`,\n });\n }\n const type: ProcedureType | 'unknown' =\n types.values().next().value ?? 'unknown';\n\n const connectionParamsStr = opts.searchParams.get('connectionParams');\n\n const info: TRPCRequestInfo = {\n isBatchCall,\n accept: getAcceptHeader(req.headers),\n calls,\n type,\n connectionParams:\n connectionParamsStr === null\n ? null\n : parseConnectionParamsFromString(connectionParamsStr),\n signal: req.signal,\n url: opts.url,\n };\n return info;\n },\n};\n\nconst formDataContentTypeHandler: ContentTypeHandler = {\n isMatch(req) {\n return !!req.headers.get('content-type')?.startsWith('multipart/form-data');\n },\n async parse(opts) {\n const { req } = opts;\n if (req.method !== 'POST') {\n throw new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message:\n 'Only POST requests are supported for multipart/form-data requests',\n });\n }\n const getInputs = memo(async () => {\n const fd = await req.formData();\n return fd;\n });\n const procedure = await getProcedureAtPath(opts.router, opts.path);\n return {\n accept: null,\n calls: [\n {\n batchIndex: 0,\n path: opts.path,\n getRawInput: getInputs.read,\n result: getInputs.result,\n procedure,\n },\n ],\n isBatchCall: false,\n type: 'mutation',\n connectionParams: null,\n signal: req.signal,\n url: opts.url,\n };\n },\n};\n\nconst octetStreamContentTypeHandler: ContentTypeHandler = {\n isMatch(req) {\n return !!req.headers\n .get('content-type')\n ?.startsWith('application/octet-stream');\n },\n async parse(opts) {\n const { req } = opts;\n if (req.method !== 'POST') {\n throw new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message:\n 'Only POST requests are supported for application/octet-stream requests',\n });\n }\n const getInputs = memo(async () => {\n return req.body;\n });\n return {\n calls: [\n {\n batchIndex: 0,\n path: opts.path,\n getRawInput: getInputs.read,\n result: getInputs.result,\n procedure: await getProcedureAtPath(opts.router, opts.path),\n },\n ],\n isBatchCall: false,\n accept: null,\n type: 'mutation',\n connectionParams: null,\n signal: req.signal,\n url: opts.url,\n };\n },\n};\n\nconst handlers = [\n jsonContentTypeHandler,\n formDataContentTypeHandler,\n octetStreamContentTypeHandler,\n];\n\nfunction getContentTypeHandler(req: Request): ContentTypeHandler {\n const handler = handlers.find((handler) => handler.isMatch(req));\n if (handler) {\n return handler;\n }\n\n if (!handler && req.method === 'GET') {\n // fallback to JSON for get requests so GET-requests can be opened in browser easily\n return jsonContentTypeHandler;\n }\n\n throw new TRPCError({\n code: 'UNSUPPORTED_MEDIA_TYPE',\n message: req.headers.has('content-type')\n ? `Unsupported content-type \"${req.headers.get('content-type')}`\n : 'Missing content-type header',\n });\n}\n\nexport async function getRequestInfo(\n opts: GetRequestInfoOptions,\n): Promise {\n const handler = getContentTypeHandler(opts.req);\n return await handler.parse(opts);\n}\n", "import { isObject } from '../utils';\n\nexport function isAbortError(\n error: unknown,\n): error is DOMException | Error | { name: 'AbortError' } {\n return isObject(error) && error['name'] === 'AbortError';\n}\n\nexport function throwAbortError(message = 'AbortError'): never {\n throw new DOMException(message, 'AbortError');\n}\n", "/*!\n * is-plain-object \n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o: unknown): o is Record {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n \nexport function isPlainObject(o: unknown): o is Record {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n};\n", "/* eslint-disable @typescript-eslint/unbound-method */\n \n \n\nimport type {\n PromiseExecutor,\n PromiseWithResolvers,\n ProxyPromise,\n SubscribedPromise,\n} from \"./types\";\n\n/** Memory safe (weakmapped) cache of the ProxyPromise for each Promise,\n * which is retained for the lifetime of the original Promise.\n */\nconst subscribableCache = new WeakMap<\n PromiseLike,\n ProxyPromise\n>();\n\n/** A NOOP function allowing a consistent interface for settled\n * SubscribedPromises (settled promises are not subscribed - they resolve\n * immediately). */\nconst NOOP = () => {\n // noop\n};\n\n/**\n * Every `Promise` can be shadowed by a single `ProxyPromise`. It is\n * created once, cached and reused throughout the lifetime of the Promise. Get a\n * Promise's ProxyPromise using `Unpromise.proxy(promise)`.\n *\n * The `ProxyPromise` attaches handlers to the original `Promise`\n * `.then()` and `.catch()` just once. Promises derived from it use a\n * subscription- (and unsubscription-) based mechanism that monitors these\n * handlers.\n *\n * Every time you call `.subscribe()`, `.then()` `.catch()` or `.finally()` on a\n * `ProxyPromise` it returns a `SubscribedPromise` having an additional\n * `unsubscribe()` method. Calling `unsubscribe()` detaches reference chains\n * from the original, potentially long-lived Promise, eliminating memory leaks.\n *\n * This approach can eliminate the memory leaks that otherwise come about from\n * repeated `race()` or `any()` calls invoking `.then()` and `.catch()` multiple\n * times on the same long-lived native Promise (subscriptions which can never be\n * cleaned up).\n *\n * `Unpromise.race(promises)` is a reference implementation of `Promise.race`\n * avoiding memory leaks when using long-lived unsettled Promises.\n *\n * `Unpromise.any(promises)` is a reference implementation of `Promise.any`\n * avoiding memory leaks when using long-lived unsettled Promises.\n *\n * `Unpromise.resolve(promise)` returns an ephemeral `SubscribedPromise` for\n * any given `Promise` facilitating arbitrary async/await patterns. Behind\n * the scenes, `resolve` is implemented simply as\n * `Unpromise.proxy(promise).subscribe()`. Don't forget to call `.unsubscribe()`\n * to tidy up!\n *\n */\nexport class Unpromise implements ProxyPromise {\n /** INSTANCE IMPLEMENTATION */\n\n /** The promise shadowed by this Unpromise */\n protected readonly promise: Promise | PromiseLike;\n\n /** Promises expecting eventual settlement (unless unsubscribed first). This list is deleted\n * after the original promise settles - no further notifications will be issued. */\n protected subscribers: ReadonlyArray> | null = [];\n\n /** The Promise's settlement (recorded when it fulfils or rejects). This is consulted when\n * calling .subscribe() .then() .catch() .finally() to see if an immediately-resolving Promise\n * can be returned, and therefore subscription can be bypassed. */\n protected settlement: PromiseSettledResult | null = null;\n\n /** Constructor accepts a normal Promise executor function like `new\n * Unpromise((resolve, reject) => {...})` or accepts a pre-existing Promise\n * like `new Unpromise(existingPromise)`. Adds `.then()` and `.catch()`\n * handlers to the Promise. These handlers pass fulfilment and rejection\n * notifications to downstream subscribers and maintains records of value\n * or error if the Promise ever settles. */\n protected constructor(promise: Promise);\n protected constructor(promise: PromiseLike);\n protected constructor(executor: PromiseExecutor);\n protected constructor(arg: Promise | PromiseLike | PromiseExecutor) {\n // handle either a Promise or a Promise executor function\n if (typeof arg === \"function\") {\n this.promise = new Promise(arg);\n } else {\n this.promise = arg;\n }\n\n // subscribe for eventual fulfilment and rejection\n\n // handle PromiseLike objects (that at least have .then)\n const thenReturn = this.promise.then((value) => {\n // atomically record fulfilment and detach subscriber list\n const { subscribers } = this;\n this.subscribers = null;\n this.settlement = {\n status: \"fulfilled\",\n value,\n };\n // notify fulfilment to subscriber list\n subscribers?.forEach(({ resolve }) => {\n resolve(value);\n });\n });\n\n // handle Promise (that also have a .catch behaviour)\n if (\"catch\" in thenReturn) {\n thenReturn.catch((reason) => {\n // atomically record rejection and detach subscriber list\n const { subscribers } = this;\n this.subscribers = null;\n this.settlement = {\n status: \"rejected\",\n reason,\n };\n // notify rejection to subscriber list\n subscribers?.forEach(({ reject }) => {\n reject(reason);\n });\n });\n }\n }\n\n /** Create a promise that mitigates uncontrolled subscription to a long-lived\n * Promise via .then() and .catch() - otherwise a source of memory leaks.\n *\n * The returned promise has an `unsubscribe()` method which can be called when\n * the Promise is no longer being tracked by application logic, and which\n * ensures that there is no reference chain from the original promise to the\n * new one, and therefore no memory leak.\n *\n * If original promise has not yet settled, this adds a new unique promise\n * that listens to then/catch events, along with an `unsubscribe()` method to\n * detach it.\n *\n * If original promise has settled, then creates a new Promise.resolve() or\n * Promise.reject() and provided unsubscribe is a noop.\n *\n * If you call `unsubscribe()` before the returned Promise has settled, it\n * will never settle.\n */\n subscribe(): SubscribedPromise {\n // in all cases we will combine some promise with its unsubscribe function\n let promise: Promise;\n let unsubscribe: () => void;\n\n const { settlement } = this;\n if (settlement === null) {\n // not yet settled - subscribe new promise. Expect eventual settlement\n if (this.subscribers === null) {\n // invariant - it is not settled, so it must have subscribers\n throw new Error(\"Unpromise settled but still has subscribers\");\n }\n const subscriber = withResolvers();\n this.subscribers = listWithMember(this.subscribers, subscriber);\n promise = subscriber.promise;\n unsubscribe = () => {\n if (this.subscribers !== null) {\n this.subscribers = listWithoutMember(this.subscribers, subscriber);\n }\n };\n } else {\n // settled - don't create subscribed promise. Just resolve or reject\n const { status } = settlement;\n if (status === \"fulfilled\") {\n promise = Promise.resolve(settlement.value);\n } else {\n promise = Promise.reject(settlement.reason);\n }\n unsubscribe = NOOP;\n }\n\n // extend promise signature with the extra method\n return Object.assign(promise, { unsubscribe });\n }\n\n /** STANDARD PROMISE METHODS (but returning a SubscribedPromise) */\n\n then(\n onfulfilled?:\n | ((value: T) => TResult1 | PromiseLike)\n | null\n ,\n onrejected?:\n | ((reason: any) => TResult2 | PromiseLike)\n | null\n \n ): SubscribedPromise {\n const subscribed = this.subscribe();\n const { unsubscribe } = subscribed;\n return Object.assign(subscribed.then(onfulfilled, onrejected), {\n unsubscribe,\n });\n }\n\n catch(\n onrejected?:\n | ((reason: any) => TResult | PromiseLike)\n | null\n \n ): SubscribedPromise {\n const subscribed = this.subscribe();\n const { unsubscribe } = subscribed;\n return Object.assign(subscribed.catch(onrejected), {\n unsubscribe,\n });\n }\n\n finally(onfinally?: (() => void) | null ): SubscribedPromise {\n const subscribed = this.subscribe();\n const { unsubscribe } = subscribed;\n return Object.assign(subscribed.finally(onfinally), {\n unsubscribe,\n });\n }\n\n /** TOSTRING SUPPORT */\n\n readonly [Symbol.toStringTag] = \"Unpromise\";\n\n /** Unpromise STATIC METHODS */\n\n /** Create or Retrieve the proxy Unpromise (a re-used Unpromise for the VM lifetime\n * of the provided Promise reference) */\n static proxy(promise: PromiseLike): ProxyPromise {\n const cached = Unpromise.getSubscribablePromise(promise);\n return typeof cached !== \"undefined\"\n ? cached\n : Unpromise.createSubscribablePromise(promise);\n }\n\n /** Create and store an Unpromise keyed by an original Promise. */\n protected static createSubscribablePromise(promise: PromiseLike) {\n const created = new Unpromise(promise);\n subscribableCache.set(promise, created as Unpromise); // resolve promise to unpromise\n subscribableCache.set(created, created as Unpromise); // resolve the unpromise to itself\n return created;\n }\n\n /** Retrieve a previously-created Unpromise keyed by an original Promise. */\n protected static getSubscribablePromise(promise: PromiseLike) {\n return subscribableCache.get(promise) as ProxyPromise | undefined;\n }\n\n /** Promise STATIC METHODS */\n\n /** Lookup the Unpromise for this promise, and derive a SubscribedPromise from\n * it (that can be later unsubscribed to eliminate Memory leaks) */\n static resolve(value: T | PromiseLike) {\n const promise: PromiseLike =\n typeof value === \"object\" &&\n value !== null &&\n \"then\" in value &&\n typeof value.then === \"function\"\n ? value\n : Promise.resolve(value);\n return Unpromise.proxy(promise).subscribe() as SubscribedPromise<\n Awaited\n >;\n }\n\n /** Perform Promise.any() via SubscribedPromises, then unsubscribe them.\n * Equivalent to Promise.any but eliminates memory leaks from long-lived\n * promises accumulating .then() and .catch() subscribers. */\n static async any(\n values: T\n ): Promise>;\n static async any(\n values: Iterable>\n ): Promise> {\n const valuesArray = Array.isArray(values) ? values : [...values];\n const subscribedPromises = valuesArray.map(Unpromise.resolve);\n try {\n return await Promise.any(subscribedPromises);\n } finally {\n subscribedPromises.forEach(({ unsubscribe }) => {\n unsubscribe();\n });\n }\n }\n\n /** Perform Promise.race via SubscribedPromises, then unsubscribe them.\n * Equivalent to Promise.race but eliminates memory leaks from long-lived\n * promises accumulating .then() and .catch() subscribers. */\n static async race(\n values: T\n ): Promise>;\n static async race(\n values: Iterable>\n ): Promise> {\n const valuesArray = Array.isArray(values) ? values : [...values];\n const subscribedPromises = valuesArray.map(Unpromise.resolve);\n try {\n return await Promise.race(subscribedPromises);\n } finally {\n subscribedPromises.forEach(({ unsubscribe }) => {\n unsubscribe();\n });\n }\n }\n\n /** Create a race of SubscribedPromises that will fulfil to a single winning\n * Promise (in a 1-Tuple). Eliminates memory leaks from long-lived promises\n * accumulating .then() and .catch() subscribers. Allows simple logic to\n * consume the result, like...\n * ```ts\n * const [ winner ] = await Unpromise.race([ promiseA, promiseB ]);\n * if(winner === promiseB){\n * const result = await promiseB;\n * // do the thing\n * }\n * ```\n * */\n static async raceReferences>(\n promises: readonly TPromise[]\n ) {\n // map each promise to an eventual 1-tuple containing itself\n const selfPromises = promises.map(resolveSelfTuple);\n\n // now race them. They will fulfil to a readonly [P] or reject.\n try {\n return await Promise.race(selfPromises);\n } finally {\n for (const promise of selfPromises) {\n // unsubscribe proxy promises when the race is over to mitigate memory leaks\n promise.unsubscribe();\n }\n }\n }\n}\n\n/** Promises a 1-tuple containing the original promise when it resolves. Allows\n * awaiting the eventual Promise ***reference*** (easy to destructure and\n * exactly compare with ===). Avoids resolving to the Promise ***value*** (which\n * may be ambiguous and therefore hard to identify as the winner of a race).\n * You can call unsubscribe on the Promise to mitigate memory leaks.\n * */\nexport function resolveSelfTuple>(\n promise: TPromise\n): SubscribedPromise {\n return Unpromise.proxy(promise).then(() => [promise] as const);\n}\n\n/** VENDORED (Future) PROMISE UTILITIES */\n\n/** Reference implementation of https://github.com/tc39/proposal-promise-with-resolvers */\nfunction withResolvers(): PromiseWithResolvers {\n let resolve!: PromiseWithResolvers[\"resolve\"];\n let reject!: PromiseWithResolvers[\"reject\"];\n const promise = new Promise((_resolve, _reject) => {\n resolve = _resolve;\n reject = _reject;\n });\n return {\n promise,\n resolve,\n reject,\n };\n}\n\n/** IMMUTABLE LIST OPERATIONS */\n\nfunction listWithMember(arr: readonly T[], member: T): readonly T[] {\n return [...arr, member];\n}\n\nfunction listWithoutIndex(arr: readonly T[], index: number) {\n return [...arr.slice(0, index), ...arr.slice(index + 1)];\n}\n\nfunction listWithoutMember(arr: readonly T[], member: unknown) {\n const index = arr.indexOf(member as T);\n if (index !== -1) {\n return listWithoutIndex(arr, index);\n }\n return arr;\n}\n", "// @ts-expect-error - polyfilling symbol\n// eslint-disable-next-line no-restricted-syntax\nSymbol.dispose ??= Symbol();\n\n// @ts-expect-error - polyfilling symbol\n// eslint-disable-next-line no-restricted-syntax\nSymbol.asyncDispose ??= Symbol();\n\n/**\n * Takes a value and a dispose function and returns a new object that implements the Disposable interface.\n * The returned object is the original value augmented with a Symbol.dispose method.\n * @param thing The value to make disposable\n * @param dispose Function to call when disposing the resource\n * @returns The original value with Symbol.dispose method added\n */\nexport function makeResource(thing: T, dispose: () => void): T & Disposable {\n const it = thing as T & Partial;\n\n // eslint-disable-next-line no-restricted-syntax\n const existing = it[Symbol.dispose];\n\n // eslint-disable-next-line no-restricted-syntax\n it[Symbol.dispose] = () => {\n dispose();\n existing?.();\n };\n\n return it as T & Disposable;\n}\n\n/**\n * Takes a value and an async dispose function and returns a new object that implements the AsyncDisposable interface.\n * The returned object is the original value augmented with a Symbol.asyncDispose method.\n * @param thing The value to make async disposable\n * @param dispose Async function to call when disposing the resource\n * @returns The original value with Symbol.asyncDispose method added\n */\nexport function makeAsyncResource(\n thing: T,\n dispose: () => Promise,\n): T & AsyncDisposable {\n const it = thing as T & Partial;\n\n // eslint-disable-next-line no-restricted-syntax\n const existing = it[Symbol.asyncDispose];\n\n // eslint-disable-next-line no-restricted-syntax\n it[Symbol.asyncDispose] = async () => {\n await dispose();\n await existing?.();\n };\n\n return it as T & AsyncDisposable;\n}\n", "import { makeResource } from './disposable';\n\nexport const disposablePromiseTimerResult = Symbol();\n\nexport function timerResource(ms: number) {\n let timer: ReturnType | null = null;\n\n return makeResource(\n {\n start() {\n if (timer) {\n throw new Error('Timer already started');\n }\n\n const promise = new Promise(\n (resolve) => {\n timer = setTimeout(() => resolve(disposablePromiseTimerResult), ms);\n },\n );\n return promise;\n },\n },\n () => {\n if (timer) {\n clearTimeout(timer);\n }\n },\n );\n}\n", "function _usingCtx() {\n var r = \"function\" == typeof SuppressedError ? SuppressedError : function (r, e) {\n var n = Error();\n return n.name = \"SuppressedError\", n.error = r, n.suppressed = e, n;\n },\n e = {},\n n = [];\n function using(r, e) {\n if (null != e) {\n if (Object(e) !== e) throw new TypeError(\"using declarations can only be used with objects, functions, null, or undefined.\");\n if (r) var o = e[Symbol.asyncDispose || Symbol[\"for\"](\"Symbol.asyncDispose\")];\n if (void 0 === o && (o = e[Symbol.dispose || Symbol[\"for\"](\"Symbol.dispose\")], r)) var t = o;\n if (\"function\" != typeof o) throw new TypeError(\"Object is not disposable.\");\n t && (o = function o() {\n try {\n t.call(e);\n } catch (r) {\n return Promise.reject(r);\n }\n }), n.push({\n v: e,\n d: o,\n a: r\n });\n } else r && n.push({\n d: e,\n a: r\n });\n return e;\n }\n return {\n e: e,\n u: using.bind(null, !1),\n a: using.bind(null, !0),\n d: function d() {\n var o,\n t = this.e,\n s = 0;\n function next() {\n for (; o = n.pop();) try {\n if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next);\n if (o.d) {\n var r = o.d.call(o.v);\n if (o.a) return s |= 2, Promise.resolve(r).then(next, err);\n } else s |= 1;\n } catch (r) {\n return err(r);\n }\n if (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve();\n if (t !== e) throw t;\n }\n function err(n) {\n return t = t !== e ? new r(n, t) : n, next();\n }\n return next();\n }\n };\n}\nmodule.exports = _usingCtx, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "function _OverloadYield(e, d) {\n this.v = e, this.k = d;\n}\nmodule.exports = _OverloadYield, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var OverloadYield = require(\"./OverloadYield.js\");\nfunction _awaitAsyncGenerator(e) {\n return new OverloadYield(e, 0);\n}\nmodule.exports = _awaitAsyncGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var OverloadYield = require(\"./OverloadYield.js\");\nfunction _wrapAsyncGenerator(e) {\n return function () {\n return new AsyncGenerator(e.apply(this, arguments));\n };\n}\nfunction AsyncGenerator(e) {\n var r, t;\n function resume(r, t) {\n try {\n var n = e[r](t),\n o = n.value,\n u = o instanceof OverloadYield;\n Promise.resolve(u ? o.v : o).then(function (t) {\n if (u) {\n var i = \"return\" === r ? \"return\" : \"next\";\n if (!o.k || t.done) return resume(i, t);\n t = e[i](t).value;\n }\n settle(n.done ? \"return\" : \"normal\", t);\n }, function (e) {\n resume(\"throw\", e);\n });\n } catch (e) {\n settle(\"throw\", e);\n }\n }\n function settle(e, n) {\n switch (e) {\n case \"return\":\n r.resolve({\n value: n,\n done: !0\n });\n break;\n case \"throw\":\n r.reject(n);\n break;\n default:\n r.resolve({\n value: n,\n done: !1\n });\n }\n (r = r.next) ? resume(r.key, r.arg) : t = null;\n }\n this._invoke = function (e, n) {\n return new Promise(function (o, u) {\n var i = {\n key: e,\n arg: n,\n resolve: o,\n reject: u,\n next: null\n };\n t ? t = t.next = i : (r = t = i, resume(e, n));\n });\n }, \"function\" != typeof e[\"return\"] && (this[\"return\"] = void 0);\n}\nAsyncGenerator.prototype[\"function\" == typeof Symbol && Symbol.asyncIterator || \"@@asyncIterator\"] = function () {\n return this;\n}, AsyncGenerator.prototype.next = function (e) {\n return this._invoke(\"next\", e);\n}, AsyncGenerator.prototype[\"throw\"] = function (e) {\n return this._invoke(\"throw\", e);\n}, AsyncGenerator.prototype[\"return\"] = function (e) {\n return this._invoke(\"return\", e);\n};\nmodule.exports = _wrapAsyncGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import { Unpromise } from '../../../vendor/unpromise';\nimport { throwAbortError } from '../../http/abortError';\nimport { makeAsyncResource } from './disposable';\nimport { disposablePromiseTimerResult, timerResource } from './timerResource';\n\nexport function iteratorResource(\n iterable: AsyncIterable,\n): AsyncIterator & AsyncDisposable {\n const iterator = iterable[Symbol.asyncIterator]();\n\n // @ts-expect-error - this is added in node 24 which we don't officially support yet\n // eslint-disable-next-line no-restricted-syntax\n if (iterator[Symbol.asyncDispose]) {\n return iterator as AsyncIterator & AsyncDisposable;\n }\n\n return makeAsyncResource(iterator, async () => {\n await iterator.return?.();\n });\n}\n\n/**\n * Derives a new {@link AsyncGenerator} based of {@link iterable}, that yields its first\n * {@link count} values. Then, a grace period of {@link gracePeriodMs} is started in which further\n * values may still come through. After this period, the generator aborts.\n */\nexport async function* takeWithGrace(\n iterable: AsyncIterable,\n opts: {\n count: number;\n gracePeriodMs: number;\n },\n): AsyncGenerator {\n await using iterator = iteratorResource(iterable);\n\n // declaration outside the loop for garbage collection reasons\n let result: null | IteratorResult | typeof disposablePromiseTimerResult;\n\n using timer = timerResource(opts.gracePeriodMs);\n\n let count = opts.count;\n\n let timerPromise = new Promise(() => {\n // never resolves\n });\n\n while (true) {\n result = await Unpromise.race([iterator.next(), timerPromise]);\n if (result === disposablePromiseTimerResult) {\n throwAbortError();\n }\n if (result.done) {\n return result.value;\n }\n yield result.value;\n if (--count === 0) {\n timerPromise = timer.start();\n }\n // free up reference for garbage collection\n result = null;\n }\n}\n", "/* eslint-disable @typescript-eslint/no-non-null-assertion */\nexport function createDeferred() {\n let resolve: (value: TValue) => void;\n let reject: (error: unknown) => void;\n const promise = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n return { promise, resolve: resolve!, reject: reject! };\n}\nexport type Deferred = ReturnType>;\n", "import { createDeferred } from './createDeferred';\nimport { makeAsyncResource } from './disposable';\n\ntype ManagedIteratorResult =\n | { status: 'yield'; value: TYield }\n | { status: 'return'; value: TReturn }\n | { status: 'error'; error: unknown };\nfunction createManagedIterator(\n iterable: AsyncIterable,\n onResult: (result: ManagedIteratorResult) => void,\n) {\n const iterator = iterable[Symbol.asyncIterator]();\n let state: 'idle' | 'pending' | 'done' = 'idle';\n\n function cleanup() {\n state = 'done';\n onResult = () => {\n // noop\n };\n }\n\n function pull() {\n if (state !== 'idle') {\n return;\n }\n state = 'pending';\n\n const next = iterator.next();\n next\n .then((result) => {\n if (result.done) {\n state = 'done';\n onResult({ status: 'return', value: result.value });\n cleanup();\n return;\n }\n state = 'idle';\n onResult({ status: 'yield', value: result.value });\n })\n .catch((cause) => {\n onResult({ status: 'error', error: cause });\n cleanup();\n });\n }\n\n return {\n pull,\n destroy: async () => {\n cleanup();\n await iterator.return?.();\n },\n };\n}\ntype ManagedIterator = ReturnType<\n typeof createManagedIterator\n>;\n\ninterface MergedAsyncIterables\n extends AsyncIterable {\n add(iterable: AsyncIterable): void;\n}\n\n/**\n * Creates a new async iterable that merges multiple async iterables into a single stream.\n * Values from the input iterables are yielded in the order they resolve, similar to Promise.race().\n *\n * New iterables can be added dynamically using the returned {@link MergedAsyncIterables.add} method, even after iteration has started.\n *\n * If any of the input iterables throws an error, that error will be propagated through the merged stream.\n * Other iterables will not continue to be processed.\n *\n * @template TYield The type of values yielded by the input iterables\n */\nexport function mergeAsyncIterables(): MergedAsyncIterables {\n let state: 'idle' | 'pending' | 'done' = 'idle';\n let flushSignal = createDeferred();\n\n /**\n * used while {@link state} is `idle`\n */\n const iterables: AsyncIterable[] = [];\n /**\n * used while {@link state} is `pending`\n */\n const iterators = new Set>();\n\n const buffer: Array<\n [\n iterator: ManagedIterator,\n result: Exclude<\n ManagedIteratorResult,\n { status: 'return' }\n >,\n ]\n > = [];\n\n function initIterable(iterable: AsyncIterable) {\n if (state !== 'pending') {\n // shouldn't happen\n return;\n }\n const iterator = createManagedIterator(iterable, (result) => {\n if (state !== 'pending') {\n // shouldn't happen\n return;\n }\n switch (result.status) {\n case 'yield':\n buffer.push([iterator, result]);\n break;\n case 'return':\n iterators.delete(iterator);\n break;\n case 'error':\n buffer.push([iterator, result]);\n iterators.delete(iterator);\n break;\n }\n flushSignal.resolve();\n });\n iterators.add(iterator);\n iterator.pull();\n }\n\n return {\n add(iterable: AsyncIterable) {\n switch (state) {\n case 'idle':\n iterables.push(iterable);\n break;\n case 'pending':\n initIterable(iterable);\n break;\n case 'done': {\n // shouldn't happen\n break;\n }\n }\n },\n async *[Symbol.asyncIterator]() {\n if (state !== 'idle') {\n throw new Error('Cannot iterate twice');\n }\n state = 'pending';\n\n await using _finally = makeAsyncResource({}, async () => {\n state = 'done';\n\n const errors: unknown[] = [];\n await Promise.all(\n Array.from(iterators.values()).map(async (it) => {\n try {\n await it.destroy();\n } catch (cause) {\n errors.push(cause);\n }\n }),\n );\n buffer.length = 0;\n iterators.clear();\n flushSignal.resolve();\n\n if (errors.length > 0) {\n throw new AggregateError(errors);\n }\n });\n\n while (iterables.length > 0) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n initIterable(iterables.shift()!);\n }\n\n while (iterators.size > 0) {\n await flushSignal.promise;\n\n while (buffer.length > 0) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const [iterator, result] = buffer.shift()!;\n\n switch (result.status) {\n case 'yield':\n yield result.value;\n iterator.pull();\n break;\n case 'error':\n throw result.error;\n }\n }\n flushSignal = createDeferred();\n }\n },\n };\n}\n", "/**\n * Creates a ReadableStream from an AsyncIterable.\n *\n * @param iterable - The source AsyncIterable to stream from\n * @returns A ReadableStream that yields values from the AsyncIterable\n */\nexport function readableStreamFrom(\n iterable: AsyncIterable,\n): ReadableStream {\n const iterator = iterable[Symbol.asyncIterator]();\n\n return new ReadableStream({\n async cancel() {\n await iterator.return?.();\n },\n\n async pull(controller) {\n const result = await iterator.next();\n\n if (result.done) {\n controller.close();\n return;\n }\n\n controller.enqueue(result.value);\n },\n });\n}\n", "import { Unpromise } from '../../../vendor/unpromise';\nimport { iteratorResource } from './asyncIterable';\nimport { disposablePromiseTimerResult, timerResource } from './timerResource';\n\nexport const PING_SYM = Symbol('ping');\n\n/**\n * Derives a new {@link AsyncGenerator} based of {@link iterable}, that yields {@link PING_SYM}\n * whenever no value has been yielded for {@link pingIntervalMs}.\n */\nexport async function* withPing(\n iterable: AsyncIterable,\n pingIntervalMs: number,\n): AsyncGenerator {\n await using iterator = iteratorResource(iterable);\n\n // declaration outside the loop for garbage collection reasons\n let result:\n | null\n | IteratorResult\n | typeof disposablePromiseTimerResult;\n\n let nextPromise = iterator.next();\n\n while (true) {\n using pingPromise = timerResource(pingIntervalMs);\n\n result = await Unpromise.race([nextPromise, pingPromise.start()]);\n\n if (result === disposablePromiseTimerResult) {\n // cancelled\n\n yield PING_SYM;\n continue;\n }\n\n if (result.done) {\n return result.value;\n }\n\n nextPromise = iterator.next();\n yield result.value;\n\n // free up reference for garbage collection\n result = null;\n }\n}\n", "function _asyncIterator(r) {\n var n,\n t,\n o,\n e = 2;\n for (\"undefined\" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) {\n if (t && null != (n = r[t])) return n.call(r);\n if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r));\n t = \"@@asyncIterator\", o = \"@@iterator\";\n }\n throw new TypeError(\"Object is not async iterable\");\n}\nfunction AsyncFromSyncIterator(r) {\n function AsyncFromSyncIteratorContinuation(r) {\n if (Object(r) !== r) return Promise.reject(new TypeError(r + \" is not an object.\"));\n var n = r.done;\n return Promise.resolve(r.value).then(function (r) {\n return {\n value: r,\n done: n\n };\n });\n }\n return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) {\n this.s = r, this.n = r.next;\n }, AsyncFromSyncIterator.prototype = {\n s: null,\n n: null,\n next: function next() {\n return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));\n },\n \"return\": function _return(r) {\n var n = this.s[\"return\"];\n return void 0 === n ? Promise.resolve({\n value: r,\n done: !0\n }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));\n },\n \"throw\": function _throw(r) {\n var n = this.s[\"return\"];\n return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));\n }\n }, new AsyncFromSyncIterator(r);\n}\nmodule.exports = _asyncIterator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import { isPlainObject } from '@trpc/server/vendor/is-plain-object';\nimport {\n emptyObject,\n isAsyncIterable,\n isFunction,\n isObject,\n run,\n} from '../utils';\nimport { iteratorResource } from './utils/asyncIterable';\nimport type { Deferred } from './utils/createDeferred';\nimport { createDeferred } from './utils/createDeferred';\nimport { makeResource } from './utils/disposable';\nimport { mergeAsyncIterables } from './utils/mergeAsyncIterables';\nimport { readableStreamFrom } from './utils/readableStreamFrom';\nimport { PING_SYM, withPing } from './utils/withPing';\n\n/**\n * A subset of the standard ReadableStream properties needed by tRPC internally.\n * @see ReadableStream from lib.dom.d.ts\n */\nexport type WebReadableStreamEsque = {\n getReader: () => ReadableStreamDefaultReader;\n};\n\nexport type NodeJSReadableStreamEsque = {\n on(\n eventName: string | symbol,\n listener: (...args: any[]) => void,\n ): NodeJSReadableStreamEsque;\n};\n\n// ---------- types\nconst CHUNK_VALUE_TYPE_PROMISE = 0;\ntype CHUNK_VALUE_TYPE_PROMISE = typeof CHUNK_VALUE_TYPE_PROMISE;\nconst CHUNK_VALUE_TYPE_ASYNC_ITERABLE = 1;\ntype CHUNK_VALUE_TYPE_ASYNC_ITERABLE = typeof CHUNK_VALUE_TYPE_ASYNC_ITERABLE;\n\nconst PROMISE_STATUS_FULFILLED = 0;\ntype PROMISE_STATUS_FULFILLED = typeof PROMISE_STATUS_FULFILLED;\nconst PROMISE_STATUS_REJECTED = 1;\ntype PROMISE_STATUS_REJECTED = typeof PROMISE_STATUS_REJECTED;\n\nconst ASYNC_ITERABLE_STATUS_RETURN = 0;\ntype ASYNC_ITERABLE_STATUS_RETURN = typeof ASYNC_ITERABLE_STATUS_RETURN;\nconst ASYNC_ITERABLE_STATUS_YIELD = 1;\ntype ASYNC_ITERABLE_STATUS_YIELD = typeof ASYNC_ITERABLE_STATUS_YIELD;\nconst ASYNC_ITERABLE_STATUS_ERROR = 2;\ntype ASYNC_ITERABLE_STATUS_ERROR = typeof ASYNC_ITERABLE_STATUS_ERROR;\n\ntype ChunkDefinitionKey =\n // root should be replaced\n | null\n // at array path\n | number\n // at key path\n | string;\n\ntype ChunkIndex = number & { __chunkIndex: true };\ntype ChunkValueType =\n | CHUNK_VALUE_TYPE_PROMISE\n | CHUNK_VALUE_TYPE_ASYNC_ITERABLE;\ntype ChunkDefinition = [\n key: ChunkDefinitionKey,\n type: ChunkValueType,\n chunkId: ChunkIndex,\n];\ntype EncodedValue = [\n // data\n [unknown] | [],\n // chunk descriptions\n ...ChunkDefinition[],\n];\n\ntype Head = Record;\ntype PromiseChunk =\n | [\n chunkIndex: ChunkIndex,\n status: PROMISE_STATUS_FULFILLED,\n value: EncodedValue,\n ]\n | [chunkIndex: ChunkIndex, status: PROMISE_STATUS_REJECTED, error: unknown];\ntype IterableChunk =\n | [\n chunkIndex: ChunkIndex,\n status: ASYNC_ITERABLE_STATUS_RETURN,\n value: EncodedValue,\n ]\n | [\n chunkIndex: ChunkIndex,\n status: ASYNC_ITERABLE_STATUS_YIELD,\n value: EncodedValue,\n ]\n | [\n chunkIndex: ChunkIndex,\n status: ASYNC_ITERABLE_STATUS_ERROR,\n error: unknown,\n ];\ntype ChunkData = PromiseChunk | IterableChunk;\ntype PlaceholderValue = 0 & { __placeholder: true };\nexport function isPromise(value: unknown): value is Promise {\n return (\n (isObject(value) || isFunction(value)) &&\n typeof value?.['then'] === 'function' &&\n typeof value?.['catch'] === 'function'\n );\n}\n\ntype Serialize = (value: any) => any;\ntype Deserialize = (value: any) => any;\n\ntype PathArray = readonly (string | number)[];\nexport type ProducerOnError = (opts: {\n error: unknown;\n path: PathArray;\n}) => void;\nexport interface JSONLProducerOptions {\n serialize?: Serialize;\n data: Record | unknown[];\n onError?: ProducerOnError;\n formatError?: (opts: { error: unknown; path: PathArray }) => unknown;\n maxDepth?: number;\n /**\n * Interval in milliseconds to send a ping to the client to keep the connection alive\n * This will be sent as a whitespace character\n * @default undefined\n */\n pingMs?: number;\n}\n\nclass MaxDepthError extends Error {\n constructor(public path: (string | number)[]) {\n super('Max depth reached at path: ' + path.join('.'));\n }\n}\n\nasync function* createBatchStreamProducer(\n opts: JSONLProducerOptions,\n): AsyncIterable {\n const { data } = opts;\n let counter = 0 as ChunkIndex;\n const placeholder = 0 as PlaceholderValue;\n\n const mergedIterables = mergeAsyncIterables();\n function registerAsync(\n callback: (idx: ChunkIndex) => AsyncIterable,\n ) {\n const idx = counter++ as ChunkIndex;\n\n const iterable = callback(idx);\n mergedIterables.add(iterable);\n\n return idx;\n }\n\n function encodePromise(promise: Promise, path: (string | number)[]) {\n return registerAsync(async function* (idx) {\n const error = checkMaxDepth(path);\n if (error) {\n // Catch any errors from the original promise to ensure they're reported\n promise.catch((cause) => {\n opts.onError?.({ error: cause, path });\n });\n // Replace the promise with a rejected one containing the max depth error\n promise = Promise.reject(error);\n }\n try {\n const next = await promise;\n yield [idx, PROMISE_STATUS_FULFILLED, encode(next, path)];\n } catch (cause) {\n opts.onError?.({ error: cause, path });\n yield [\n idx,\n PROMISE_STATUS_REJECTED,\n opts.formatError?.({ error: cause, path }),\n ];\n }\n });\n }\n function encodeAsyncIterable(\n iterable: AsyncIterable,\n path: (string | number)[],\n ) {\n return registerAsync(async function* (idx) {\n const error = checkMaxDepth(path);\n if (error) {\n throw error;\n }\n await using iterator = iteratorResource(iterable);\n\n try {\n while (true) {\n const next = await iterator.next();\n if (next.done) {\n yield [idx, ASYNC_ITERABLE_STATUS_RETURN, encode(next.value, path)];\n break;\n }\n yield [idx, ASYNC_ITERABLE_STATUS_YIELD, encode(next.value, path)];\n }\n } catch (cause) {\n opts.onError?.({ error: cause, path });\n\n yield [\n idx,\n ASYNC_ITERABLE_STATUS_ERROR,\n opts.formatError?.({ error: cause, path }),\n ];\n }\n });\n }\n function checkMaxDepth(path: (string | number)[]) {\n if (opts.maxDepth && path.length > opts.maxDepth) {\n return new MaxDepthError(path);\n }\n return null;\n }\n function encodeAsync(\n value: unknown,\n path: (string | number)[],\n ): null | [type: ChunkValueType, chunkId: ChunkIndex] {\n if (isPromise(value)) {\n return [CHUNK_VALUE_TYPE_PROMISE, encodePromise(value, path)];\n }\n if (isAsyncIterable(value)) {\n if (opts.maxDepth && path.length >= opts.maxDepth) {\n throw new Error('Max depth reached');\n }\n return [\n CHUNK_VALUE_TYPE_ASYNC_ITERABLE,\n encodeAsyncIterable(value, path),\n ];\n }\n return null;\n }\n function encode(value: unknown, path: (string | number)[]): EncodedValue {\n if (value === undefined) {\n return [[]];\n }\n const reg = encodeAsync(value, path);\n if (reg) {\n return [[placeholder], [null, ...reg]];\n }\n\n if (!isPlainObject(value)) {\n return [[value]];\n }\n\n const newObj: Record = emptyObject();\n const asyncValues: ChunkDefinition[] = [];\n for (const [key, item] of Object.entries(value)) {\n const transformed = encodeAsync(item, [...path, key]);\n if (!transformed) {\n newObj[key] = item;\n continue;\n }\n newObj[key] = placeholder;\n asyncValues.push([key, ...transformed]);\n }\n return [[newObj], ...asyncValues];\n }\n\n const newHead: Head = emptyObject();\n for (const [key, item] of Object.entries(data)) {\n newHead[key] = encode(item, [key]);\n }\n\n yield newHead;\n\n let iterable: AsyncIterable =\n mergedIterables;\n if (opts.pingMs) {\n iterable = withPing(mergedIterables, opts.pingMs);\n }\n\n for await (const value of iterable) {\n yield value;\n }\n}\n/**\n * JSON Lines stream producer\n * @see https://jsonlines.org/\n */\nexport function jsonlStreamProducer(opts: JSONLProducerOptions) {\n let stream = readableStreamFrom(createBatchStreamProducer(opts));\n\n const { serialize } = opts;\n if (serialize) {\n stream = stream.pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n if (chunk === PING_SYM) {\n controller.enqueue(PING_SYM);\n } else {\n controller.enqueue(serialize(chunk));\n }\n },\n }),\n );\n }\n\n return stream\n .pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n if (chunk === PING_SYM) {\n controller.enqueue(' ');\n } else {\n controller.enqueue(JSON.stringify(chunk) + '\\n');\n }\n },\n }),\n )\n .pipeThrough(new TextEncoderStream());\n}\n\nclass AsyncError extends Error {\n constructor(public readonly data: unknown) {\n super('Received error from server');\n }\n}\nexport type ConsumerOnError = (opts: { error: unknown }) => void;\n\nconst nodeJsStreamToReaderEsque = (source: NodeJSReadableStreamEsque) => {\n return {\n getReader() {\n const stream = new ReadableStream({\n start(controller) {\n source.on('data', (chunk) => {\n controller.enqueue(chunk);\n });\n source.on('end', () => {\n controller.close();\n });\n source.on('error', (error) => {\n controller.error(error);\n });\n },\n });\n return stream.getReader();\n },\n };\n};\n\nfunction createLineAccumulator(\n from: NodeJSReadableStreamEsque | WebReadableStreamEsque,\n) {\n const reader =\n 'getReader' in from\n ? from.getReader()\n : nodeJsStreamToReaderEsque(from).getReader();\n\n let lineAggregate = '';\n\n return new ReadableStream({\n async pull(controller) {\n const { done, value } = await reader.read();\n\n if (done) {\n controller.close();\n } else {\n controller.enqueue(value);\n }\n },\n cancel() {\n return reader.cancel();\n },\n })\n .pipeThrough(new TextDecoderStream())\n .pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n lineAggregate += chunk;\n const parts = lineAggregate.split('\\n');\n lineAggregate = parts.pop() ?? '';\n for (const part of parts) {\n controller.enqueue(part);\n }\n },\n }),\n );\n}\nfunction createConsumerStream(\n from: NodeJSReadableStreamEsque | WebReadableStreamEsque,\n) {\n const stream = createLineAccumulator(from);\n\n let sentHead = false;\n return stream.pipeThrough(\n new TransformStream({\n transform(line, controller) {\n if (!sentHead) {\n const head = JSON.parse(line);\n controller.enqueue(head as THead);\n sentHead = true;\n } else {\n const chunk: ChunkData = JSON.parse(line);\n controller.enqueue(chunk);\n }\n },\n }),\n );\n}\n\n/**\n * Creates a handler for managing stream controllers and their lifecycle\n */\nfunction createStreamsManager(abortController: AbortController) {\n const controllerMap = new Map<\n ChunkIndex,\n ReturnType\n >();\n\n /**\n * Checks if there are no pending controllers or deferred promises\n */\n function isEmpty() {\n return Array.from(controllerMap.values()).every((c) => c.closed);\n }\n\n /**\n * Creates a stream controller\n */\n function createStreamController() {\n let originalController: ReadableStreamDefaultController;\n const stream = new ReadableStream({\n start(controller) {\n originalController = controller;\n },\n });\n\n const streamController = {\n enqueue: (v: ChunkData) => originalController.enqueue(v),\n close: () => {\n originalController.close();\n\n clear();\n\n if (isEmpty()) {\n abortController.abort();\n }\n },\n closed: false,\n getReaderResource: () => {\n const reader = stream.getReader();\n\n return makeResource(reader, () => {\n streamController.close();\n reader.releaseLock();\n });\n },\n error: (reason: unknown) => {\n originalController.error(reason);\n\n clear();\n },\n };\n function clear() {\n Object.assign(streamController, {\n closed: true,\n close: () => {\n // noop\n },\n enqueue: () => {\n // noop\n },\n getReaderResource: null,\n error: () => {\n // noop\n },\n });\n }\n\n return streamController;\n }\n\n /**\n * Gets or creates a stream controller\n */\n function getOrCreate(chunkId: ChunkIndex) {\n let c = controllerMap.get(chunkId);\n if (!c) {\n c = createStreamController();\n controllerMap.set(chunkId, c);\n }\n return c;\n }\n\n /**\n * Cancels all pending controllers and rejects deferred promises\n */\n function cancelAll(reason: unknown) {\n for (const controller of controllerMap.values()) {\n controller.error(reason);\n }\n }\n\n return {\n getOrCreate,\n cancelAll,\n };\n}\n\n/**\n * JSON Lines stream consumer\n * @see https://jsonlines.org/\n */\nexport async function jsonlStreamConsumer(opts: {\n from: NodeJSReadableStreamEsque | WebReadableStreamEsque;\n deserialize?: Deserialize;\n onError?: ConsumerOnError;\n formatError?: (opts: { error: unknown }) => Error;\n /**\n * This `AbortController` will be triggered when there are no more listeners to the stream.\n */\n abortController: AbortController;\n}) {\n const { deserialize = (v) => v } = opts;\n\n let source = createConsumerStream(opts.from);\n if (deserialize) {\n source = source.pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n controller.enqueue(deserialize(chunk));\n },\n }),\n );\n }\n let headDeferred: null | Deferred = createDeferred();\n\n const streamManager = createStreamsManager(opts.abortController);\n\n function decodeChunkDefinition(value: ChunkDefinition) {\n const [_path, type, chunkId] = value;\n\n const controller = streamManager.getOrCreate(chunkId);\n\n switch (type) {\n case CHUNK_VALUE_TYPE_PROMISE: {\n return run(async () => {\n using reader = controller.getReaderResource();\n\n const { value } = await reader.read();\n const [_chunkId, status, data] = value as PromiseChunk;\n switch (status) {\n case PROMISE_STATUS_FULFILLED:\n return decode(data);\n case PROMISE_STATUS_REJECTED:\n throw opts.formatError?.({ error: data }) ?? new AsyncError(data);\n }\n });\n }\n case CHUNK_VALUE_TYPE_ASYNC_ITERABLE: {\n return run(async function* () {\n using reader = controller.getReaderResource();\n\n while (true) {\n const { value } = await reader.read();\n\n const [_chunkId, status, data] = value as IterableChunk;\n\n switch (status) {\n case ASYNC_ITERABLE_STATUS_YIELD:\n yield decode(data);\n break;\n case ASYNC_ITERABLE_STATUS_RETURN:\n return decode(data);\n case ASYNC_ITERABLE_STATUS_ERROR:\n throw (\n opts.formatError?.({ error: data }) ?? new AsyncError(data)\n );\n }\n }\n });\n }\n }\n }\n\n function decode(value: EncodedValue): unknown {\n const [[data], ...asyncProps] = value;\n\n for (const value of asyncProps) {\n const [key] = value;\n const decoded = decodeChunkDefinition(value);\n\n if (key === null) {\n return decoded;\n }\n\n (data as any)[key] = decoded;\n }\n return data;\n }\n\n const closeOrAbort = (reason?: unknown) => {\n headDeferred?.reject(reason);\n streamManager.cancelAll(reason);\n };\n\n source\n .pipeTo(\n new WritableStream({\n write(chunkOrHead) {\n if (headDeferred) {\n const head = chunkOrHead as Record;\n\n for (const [key, value] of Object.entries(chunkOrHead)) {\n const parsed = decode(value as any);\n head[key] = parsed;\n }\n headDeferred.resolve(head as THead);\n headDeferred = null;\n\n return;\n }\n const chunk = chunkOrHead as ChunkData;\n const [idx] = chunk;\n\n const controller = streamManager.getOrCreate(idx);\n controller.enqueue(chunk);\n },\n close: closeOrAbort,\n abort: closeOrAbort,\n }),\n )\n .catch((error) => {\n opts.onError?.({ error });\n closeOrAbort(error);\n });\n\n return [await headDeferred.promise] as const;\n}\n", "var OverloadYield = require(\"./OverloadYield.js\");\nfunction _asyncGeneratorDelegate(t) {\n var e = {},\n n = !1;\n function pump(e, r) {\n return n = !0, r = new Promise(function (n) {\n n(t[e](r));\n }), {\n done: !1,\n value: new OverloadYield(r, 1)\n };\n }\n return e[\"undefined\" != typeof Symbol && Symbol.iterator || \"@@iterator\"] = function () {\n return this;\n }, e.next = function (t) {\n return n ? (n = !1, t) : pump(\"next\", t);\n }, \"function\" == typeof t[\"throw\"] && (e[\"throw\"] = function (t) {\n if (n) throw n = !1, t;\n return pump(\"throw\", t);\n }), \"function\" == typeof t[\"return\"] && (e[\"return\"] = function (t) {\n return n ? (n = !1, t) : pump(\"return\", t);\n }), e;\n}\nmodule.exports = _asyncGeneratorDelegate, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import { Unpromise } from '../../vendor/unpromise';\nimport { getTRPCErrorFromUnknown } from '../error/TRPCError';\nimport { isAbortError } from '../http/abortError';\nimport type { MaybePromise } from '../types';\nimport { emptyObject, identity, run } from '../utils';\nimport type { EventSourceLike } from './sse.types';\nimport type { inferTrackedOutput } from './tracked';\nimport { isTrackedEnvelope } from './tracked';\nimport { takeWithGrace } from './utils/asyncIterable';\nimport { makeAsyncResource } from './utils/disposable';\nimport { readableStreamFrom } from './utils/readableStreamFrom';\nimport {\n disposablePromiseTimerResult,\n timerResource,\n} from './utils/timerResource';\nimport { PING_SYM, withPing } from './utils/withPing';\n\ntype Serialize = (value: any) => any;\ntype Deserialize = (value: any) => any;\n\n/**\n * @internal\n */\nexport interface SSEPingOptions {\n /**\n * Enable ping comments sent from the server\n * @default false\n */\n enabled: boolean;\n /**\n * Interval in milliseconds\n * @default 1000\n */\n intervalMs?: number;\n}\n\nexport interface SSEClientOptions {\n /**\n * Timeout and reconnect after inactivity in milliseconds\n * @default undefined\n */\n reconnectAfterInactivityMs?: number;\n}\n\nexport interface SSEStreamProducerOptions {\n serialize?: Serialize;\n data: AsyncIterable;\n\n maxDepth?: number;\n ping?: SSEPingOptions;\n /**\n * Maximum duration in milliseconds for the request before ending the stream\n * @default undefined\n */\n maxDurationMs?: number;\n /**\n * End the request immediately after data is sent\n * Only useful for serverless runtimes that do not support streaming responses\n * @default false\n */\n emitAndEndImmediately?: boolean;\n formatError?: (opts: { error: unknown }) => unknown;\n /**\n * Client-specific options - these will be sent to the client as part of the first message\n * @default {}\n */\n client?: SSEClientOptions;\n}\n\nconst PING_EVENT = 'ping';\nconst SERIALIZED_ERROR_EVENT = 'serialized-error';\nconst CONNECTED_EVENT = 'connected';\nconst RETURN_EVENT = 'return';\n\ninterface SSEvent {\n id?: string;\n data: unknown;\n comment?: string;\n event?: string;\n}\n/**\n *\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html\n */\nexport function sseStreamProducer(\n opts: SSEStreamProducerOptions,\n) {\n const { serialize = identity } = opts;\n\n const ping: Required = {\n enabled: opts.ping?.enabled ?? false,\n intervalMs: opts.ping?.intervalMs ?? 1000,\n };\n const client: SSEClientOptions = opts.client ?? {};\n\n if (\n ping.enabled &&\n client.reconnectAfterInactivityMs &&\n ping.intervalMs > client.reconnectAfterInactivityMs\n ) {\n throw new Error(\n `Ping interval must be less than client reconnect interval to prevent unnecessary reconnection - ping.intervalMs: ${ping.intervalMs} client.reconnectAfterInactivityMs: ${client.reconnectAfterInactivityMs}`,\n );\n }\n\n async function* generator(): AsyncIterable {\n yield {\n event: CONNECTED_EVENT,\n data: JSON.stringify(client),\n };\n\n type TIteratorValue = Awaited | typeof PING_SYM;\n\n let iterable: AsyncIterable = opts.data;\n\n if (opts.emitAndEndImmediately) {\n iterable = takeWithGrace(iterable, {\n count: 1,\n gracePeriodMs: 1,\n });\n }\n\n if (ping.enabled && ping.intervalMs !== Infinity && ping.intervalMs > 0) {\n iterable = withPing(iterable, ping.intervalMs);\n }\n\n // We need those declarations outside the loop for garbage collection reasons. If they were\n // declared inside, they would not be freed until the next value is present.\n let value: null | TIteratorValue;\n let chunk: null | SSEvent;\n\n for await (value of iterable) {\n if (value === PING_SYM) {\n yield { event: PING_EVENT, data: '' };\n continue;\n }\n\n chunk = isTrackedEnvelope(value)\n ? { id: value[0], data: value[1] }\n : { data: value };\n\n chunk.data = JSON.stringify(serialize(chunk.data));\n\n yield chunk;\n\n // free up references for garbage collection\n value = null;\n chunk = null;\n }\n }\n\n async function* generatorWithErrorHandling(): AsyncIterable {\n try {\n yield* generator();\n\n yield {\n event: RETURN_EVENT,\n data: '',\n };\n } catch (cause) {\n if (isAbortError(cause)) {\n // ignore abort errors, send any other errors\n return;\n }\n // `err` must be caused by `opts.data`, `JSON.stringify` or `serialize`.\n // So, a user error in any case.\n const error = getTRPCErrorFromUnknown(cause);\n const data = opts.formatError?.({ error }) ?? null;\n yield {\n event: SERIALIZED_ERROR_EVENT,\n data: JSON.stringify(serialize(data)),\n };\n }\n }\n\n const stream = readableStreamFrom(generatorWithErrorHandling());\n\n return stream\n .pipeThrough(\n new TransformStream({\n transform(chunk, controller: TransformStreamDefaultController) {\n if ('event' in chunk) {\n controller.enqueue(`event: ${chunk.event}\\n`);\n }\n if ('data' in chunk) {\n controller.enqueue(`data: ${chunk.data}\\n`);\n }\n if ('id' in chunk) {\n controller.enqueue(`id: ${chunk.id}\\n`);\n }\n if ('comment' in chunk) {\n controller.enqueue(`: ${chunk.comment}\\n`);\n }\n controller.enqueue('\\n\\n');\n },\n }),\n )\n .pipeThrough(new TextEncoderStream());\n}\n\ninterface ConsumerStreamResultBase {\n eventSource: InstanceType | null;\n}\n\ninterface ConsumerStreamResultData\n extends ConsumerStreamResultBase {\n type: 'data';\n data: inferTrackedOutput;\n}\n\ninterface ConsumerStreamResultError\n extends ConsumerStreamResultBase {\n type: 'serialized-error';\n error: TConfig['error'];\n}\n\ninterface ConsumerStreamResultConnecting\n extends ConsumerStreamResultBase {\n type: 'connecting';\n event: EventSourceLike.EventOf | null;\n}\ninterface ConsumerStreamResultTimeout\n extends ConsumerStreamResultBase {\n type: 'timeout';\n ms: number;\n}\ninterface ConsumerStreamResultPing\n extends ConsumerStreamResultBase {\n type: 'ping';\n}\n\ninterface ConsumerStreamResultConnected\n extends ConsumerStreamResultBase {\n type: 'connected';\n options: SSEClientOptions;\n}\n\ntype ConsumerStreamResult =\n | ConsumerStreamResultData\n | ConsumerStreamResultError\n | ConsumerStreamResultConnecting\n | ConsumerStreamResultTimeout\n | ConsumerStreamResultPing\n | ConsumerStreamResultConnected;\n\nexport interface SSEStreamConsumerOptions {\n url: () => MaybePromise;\n init: () =>\n | MaybePromise>\n | undefined;\n signal: AbortSignal;\n deserialize?: Deserialize;\n EventSource: TConfig['EventSource'];\n}\n\ninterface ConsumerConfig {\n data: unknown;\n error: unknown;\n EventSource: EventSourceLike.AnyConstructor;\n}\n\nasync function withTimeout(opts: {\n promise: Promise;\n timeoutMs: number;\n onTimeout: () => Promise>;\n}): Promise {\n using timeoutPromise = timerResource(opts.timeoutMs);\n const res = await Unpromise.race([opts.promise, timeoutPromise.start()]);\n\n if (res === disposablePromiseTimerResult) {\n return await opts.onTimeout();\n }\n return res;\n}\n\n/**\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html\n */\nexport function sseStreamConsumer(\n opts: SSEStreamConsumerOptions,\n): AsyncIterable> {\n const { deserialize = (v) => v } = opts;\n\n let clientOptions: SSEClientOptions = emptyObject();\n\n const signal = opts.signal;\n\n let _es: InstanceType | null = null;\n\n const createStream = () =>\n new ReadableStream>({\n async start(controller) {\n const [url, init] = await Promise.all([opts.url(), opts.init()]);\n const eventSource = (_es = new opts.EventSource(\n url,\n init,\n ) as InstanceType);\n\n controller.enqueue({\n type: 'connecting',\n eventSource: _es,\n event: null,\n });\n\n eventSource.addEventListener(CONNECTED_EVENT, (_msg) => {\n const msg = _msg as EventSourceLike.MessageEvent;\n\n const options: SSEClientOptions = JSON.parse(msg.data);\n\n clientOptions = options;\n controller.enqueue({\n type: 'connected',\n options,\n eventSource,\n });\n });\n\n eventSource.addEventListener(SERIALIZED_ERROR_EVENT, (_msg) => {\n const msg = _msg as EventSourceLike.MessageEvent;\n\n controller.enqueue({\n type: 'serialized-error',\n error: deserialize(JSON.parse(msg.data)),\n eventSource,\n });\n });\n eventSource.addEventListener(PING_EVENT, () => {\n controller.enqueue({\n type: 'ping',\n eventSource,\n });\n });\n eventSource.addEventListener(RETURN_EVENT, () => {\n eventSource.close();\n controller.close();\n _es = null;\n });\n eventSource.addEventListener('error', (event) => {\n if (eventSource.readyState === eventSource.CLOSED) {\n controller.error(event);\n } else {\n controller.enqueue({\n type: 'connecting',\n eventSource,\n event,\n });\n }\n });\n eventSource.addEventListener('message', (_msg) => {\n const msg = _msg as EventSourceLike.MessageEvent;\n\n const chunk = deserialize(JSON.parse(msg.data));\n\n const def: SSEvent = {\n data: chunk,\n };\n if (msg.lastEventId) {\n def.id = msg.lastEventId;\n }\n controller.enqueue({\n type: 'data',\n data: def as inferTrackedOutput,\n eventSource,\n });\n });\n\n const onAbort = () => {\n try {\n eventSource.close();\n controller.close();\n } catch {\n // ignore errors in case the controller is already closed\n }\n };\n if (signal.aborted) {\n onAbort();\n } else {\n signal.addEventListener('abort', onAbort);\n }\n },\n cancel() {\n _es?.close();\n },\n });\n\n const getStreamResource = () => {\n let stream = createStream();\n let reader = stream.getReader();\n\n async function dispose() {\n await reader.cancel();\n _es = null;\n }\n\n return makeAsyncResource(\n {\n read() {\n return reader.read();\n },\n async recreate() {\n await dispose();\n\n stream = createStream();\n reader = stream.getReader();\n },\n },\n dispose,\n );\n };\n\n return run(async function* () {\n await using stream = getStreamResource();\n\n while (true) {\n let promise = stream.read();\n\n const timeoutMs = clientOptions.reconnectAfterInactivityMs;\n if (timeoutMs) {\n promise = withTimeout({\n promise,\n timeoutMs,\n onTimeout: async () => {\n const res: Awaited = {\n value: {\n type: 'timeout',\n ms: timeoutMs,\n eventSource: _es,\n },\n done: false,\n };\n // Close and release old reader\n await stream.recreate();\n\n return res;\n },\n });\n }\n\n const result = await promise;\n\n if (result.done) {\n return result.value;\n }\n yield result.value;\n }\n });\n}\n\nexport const sseHeaders = {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache, no-transform',\n 'X-Accel-Buffering': 'no',\n Connection: 'keep-alive',\n} as const;\n", "/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport {\n isObservable,\n observableToAsyncIterable,\n} from '../../observable/observable';\nimport { getErrorShape } from '../error/getErrorShape';\nimport { getTRPCErrorFromUnknown, TRPCError } from '../error/TRPCError';\nimport type { ProcedureType } from '../procedure';\nimport {\n type AnyRouter,\n type inferRouterContext,\n type inferRouterError,\n} from '../router';\nimport type { TRPCResponse } from '../rpc';\nimport { isPromise, jsonlStreamProducer } from '../stream/jsonl';\nimport { sseHeaders, sseStreamProducer } from '../stream/sse';\nimport { transformTRPCResponse } from '../transformer';\nimport {\n abortSignalsAnyPonyfill,\n isAsyncIterable,\n isObject,\n run,\n} from '../utils';\nimport { getAcceptHeader, getRequestInfo } from './contentType';\nimport { getHTTPStatusCode } from './getHTTPStatusCode';\nimport type {\n HTTPBaseHandlerOptions,\n ResolveHTTPRequestOptionsContextFn,\n TRPCRequestInfo,\n} from './types';\n\nfunction errorToAsyncIterable(err: TRPCError): AsyncIterable {\n return run(async function* () {\n throw err;\n });\n}\ntype HTTPMethods =\n | 'GET'\n | 'POST'\n | 'HEAD'\n | 'OPTIONS'\n | 'PUT'\n | 'DELETE'\n | 'PATCH';\n\nfunction combinedAbortController(signal: AbortSignal) {\n const controller = new AbortController();\n const combinedSignal = abortSignalsAnyPonyfill([signal, controller.signal]);\n return {\n signal: combinedSignal,\n controller,\n };\n}\n\nconst TYPE_ACCEPTED_METHOD_MAP: Record = {\n mutation: ['POST'],\n query: ['GET'],\n subscription: ['GET'],\n};\nconst TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE: Record<\n ProcedureType,\n HTTPMethods[]\n> = {\n // never allow GET to do a mutation\n mutation: ['POST'],\n query: ['GET', 'POST'],\n subscription: ['GET', 'POST'],\n};\n\ninterface ResolveHTTPRequestOptions\n extends HTTPBaseHandlerOptions {\n createContext: ResolveHTTPRequestOptionsContextFn;\n req: Request;\n path: string;\n /**\n * If the request had an issue before reaching the handler\n */\n error: TRPCError | null;\n}\n\nfunction initResponse(initOpts: {\n ctx: inferRouterContext | undefined;\n info: TRPCRequestInfo | undefined;\n responseMeta?: HTTPBaseHandlerOptions['responseMeta'];\n untransformedJSON:\n | TRPCResponse>\n | TRPCResponse>[]\n | null;\n errors: TRPCError[];\n headers: Headers;\n}) {\n const {\n ctx,\n info,\n responseMeta,\n untransformedJSON,\n errors = [],\n headers,\n } = initOpts;\n\n let status = untransformedJSON ? getHTTPStatusCode(untransformedJSON) : 200;\n\n const eagerGeneration = !untransformedJSON;\n const data = eagerGeneration\n ? []\n : Array.isArray(untransformedJSON)\n ? untransformedJSON\n : [untransformedJSON];\n\n const meta =\n responseMeta?.({\n ctx,\n info,\n paths: info?.calls.map((call) => call.path),\n data,\n errors,\n eagerGeneration,\n type:\n info?.calls.find((call) => call.procedure?._def.type)?.procedure?._def\n .type ?? 'unknown',\n }) ?? {};\n\n if (meta.headers) {\n if (meta.headers instanceof Headers) {\n for (const [key, value] of meta.headers.entries()) {\n headers.append(key, value);\n }\n } else {\n /**\n * @deprecated, delete in v12\n */\n for (const [key, value] of Object.entries(meta.headers)) {\n if (Array.isArray(value)) {\n for (const v of value) {\n headers.append(key, v);\n }\n } else if (typeof value === 'string') {\n headers.set(key, value);\n }\n }\n }\n }\n if (meta.status) {\n status = meta.status;\n }\n\n return {\n status,\n };\n}\n\nfunction caughtErrorToData(\n cause: unknown,\n errorOpts: {\n opts: Pick<\n ResolveHTTPRequestOptions,\n 'onError' | 'req' | 'router'\n >;\n ctx: inferRouterContext | undefined;\n type: ProcedureType | 'unknown';\n path?: string;\n input?: unknown;\n },\n) {\n const { router, req, onError } = errorOpts.opts;\n const error = getTRPCErrorFromUnknown(cause);\n onError?.({\n error,\n path: errorOpts.path,\n input: errorOpts.input,\n ctx: errorOpts.ctx,\n type: errorOpts.type,\n req,\n });\n const untransformedJSON = {\n error: getErrorShape({\n config: router._def._config,\n error,\n type: errorOpts.type,\n path: errorOpts.path,\n input: errorOpts.input,\n ctx: errorOpts.ctx,\n }),\n };\n const transformedJSON = transformTRPCResponse(\n router._def._config,\n untransformedJSON,\n );\n const body = JSON.stringify(transformedJSON);\n return {\n error,\n untransformedJSON,\n body,\n };\n}\n\n/**\n * Check if a value is a stream-like object\n * - if it's an async iterable\n * - if it's an object with async iterables or promises\n */\nfunction isDataStream(v: unknown) {\n if (!isObject(v)) {\n return false;\n }\n\n if (isAsyncIterable(v)) {\n return true;\n }\n\n return (\n Object.values(v).some(isPromise) || Object.values(v).some(isAsyncIterable)\n );\n}\n\ntype ResultTuple = [undefined, T] | [TRPCError, undefined];\n\nexport async function resolveResponse(\n opts: ResolveHTTPRequestOptions,\n): Promise {\n const { router, req } = opts;\n const headers = new Headers([['vary', 'trpc-accept, accept']]);\n const config = router._def._config;\n\n const url = new URL(req.url);\n\n if (req.method === 'HEAD') {\n // can be used for lambda warmup\n return new Response(null, {\n status: 204,\n });\n }\n\n const allowBatching = opts.allowBatching ?? opts.batching?.enabled ?? true;\n const allowMethodOverride =\n (opts.allowMethodOverride ?? false) && req.method === 'POST';\n\n type $Context = inferRouterContext;\n\n const infoTuple: ResultTuple = await run(async () => {\n try {\n return [\n undefined,\n await getRequestInfo({\n req,\n path: decodeURIComponent(opts.path),\n router,\n searchParams: url.searchParams,\n headers: opts.req.headers,\n url,\n }),\n ];\n } catch (cause) {\n return [getTRPCErrorFromUnknown(cause), undefined];\n }\n });\n\n interface ContextManager {\n valueOrUndefined: () => $Context | undefined;\n value: () => $Context;\n create: (info: TRPCRequestInfo) => Promise;\n }\n const ctxManager: ContextManager = run(() => {\n let result: ResultTuple<$Context> | undefined = undefined;\n return {\n valueOrUndefined: () => {\n if (!result) {\n return undefined;\n }\n return result[1];\n },\n value: () => {\n const [err, ctx] = result!;\n if (err) {\n throw err;\n }\n return ctx;\n },\n create: async (info) => {\n if (result) {\n throw new Error(\n 'This should only be called once - report a bug in tRPC',\n );\n }\n try {\n const ctx = await opts.createContext({\n info,\n });\n result = [undefined, ctx];\n } catch (cause) {\n result = [getTRPCErrorFromUnknown(cause), undefined];\n }\n },\n };\n });\n\n const methodMapper = allowMethodOverride\n ? TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE\n : TYPE_ACCEPTED_METHOD_MAP;\n\n /**\n * @deprecated\n */\n const isStreamCall = getAcceptHeader(req.headers) === 'application/jsonl';\n\n const experimentalSSE = config.sse?.enabled ?? true;\n try {\n const [infoError, info] = infoTuple;\n if (infoError) {\n throw infoError;\n }\n if (info.isBatchCall && !allowBatching) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: `Batching is not enabled on the server`,\n });\n }\n /* istanbul ignore if -- @preserve */\n if (isStreamCall && !info.isBatchCall) {\n throw new TRPCError({\n message: `Streaming requests must be batched (you can do a batch of 1)`,\n code: 'BAD_REQUEST',\n });\n }\n await ctxManager.create(info);\n\n interface RPCResultOk {\n data: unknown;\n signal?: AbortSignal;\n }\n type RPCResult = ResultTuple;\n const rpcCalls = info.calls.map(async (call): Promise => {\n const proc = call.procedure;\n const combinedAbort = combinedAbortController(opts.req.signal);\n try {\n if (opts.error) {\n throw opts.error;\n }\n\n if (!proc) {\n throw new TRPCError({\n code: 'NOT_FOUND',\n message: `No procedure found on path \"${call.path}\"`,\n });\n }\n\n if (!methodMapper[proc._def.type].includes(req.method as HTTPMethods)) {\n throw new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message: `Unsupported ${req.method}-request to ${proc._def.type} procedure at path \"${call.path}\"`,\n });\n }\n\n if (proc._def.type === 'subscription') {\n /* istanbul ignore if -- @preserve */\n if (info.isBatchCall) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: `Cannot batch subscription calls`,\n });\n }\n\n if (config.sse?.maxDurationMs) {\n function cleanup() {\n clearTimeout(timer);\n combinedAbort.signal.removeEventListener('abort', cleanup);\n\n combinedAbort.controller.abort();\n }\n const timer = setTimeout(cleanup, config.sse.maxDurationMs);\n combinedAbort.signal.addEventListener('abort', cleanup);\n }\n }\n const data: unknown = await proc({\n path: call.path,\n getRawInput: call.getRawInput,\n ctx: ctxManager.value(),\n type: proc._def.type,\n signal: combinedAbort.signal,\n batchIndex: call.batchIndex,\n });\n return [\n undefined,\n {\n data,\n signal:\n proc._def.type === 'subscription'\n ? combinedAbort.signal\n : undefined,\n },\n ];\n } catch (cause) {\n const error = getTRPCErrorFromUnknown(cause);\n const input = call.result();\n\n opts.onError?.({\n error,\n path: call.path,\n input,\n ctx: ctxManager.valueOrUndefined(),\n type: call.procedure?._def.type ?? 'unknown',\n req: opts.req,\n });\n\n return [error, undefined];\n }\n });\n\n // ----------- response handlers -----------\n if (!info.isBatchCall) {\n const [call] = info.calls;\n const [error, result] = await rpcCalls[0]!;\n\n switch (info.type) {\n case 'unknown':\n case 'mutation':\n case 'query': {\n // httpLink\n headers.set('content-type', 'application/json');\n\n if (isDataStream(result?.data)) {\n throw new TRPCError({\n code: 'UNSUPPORTED_MEDIA_TYPE',\n message:\n 'Cannot use stream-like response in non-streaming request - use httpBatchStreamLink',\n });\n }\n const res: TRPCResponse> = error\n ? {\n error: getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input: call!.result(),\n path: call!.path,\n type: info.type,\n }),\n }\n : { result: { data: result.data } };\n\n const headResponse = initResponse({\n ctx: ctxManager.valueOrUndefined(),\n info,\n responseMeta: opts.responseMeta,\n errors: error ? [error] : [],\n headers,\n untransformedJSON: [res],\n });\n return new Response(\n JSON.stringify(transformTRPCResponse(config, res)),\n {\n status: headResponse.status,\n headers,\n },\n );\n }\n case 'subscription': {\n // httpSubscriptionLink\n\n const iterable: AsyncIterable = run(() => {\n if (error) {\n return errorToAsyncIterable(error);\n }\n if (!experimentalSSE) {\n return errorToAsyncIterable(\n new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message: 'Missing experimental flag \"sseSubscriptions\"',\n }),\n );\n }\n\n if (!isObservable(result.data) && !isAsyncIterable(result.data)) {\n return errorToAsyncIterable(\n new TRPCError({\n message: `Subscription ${\n call!.path\n } did not return an observable or a AsyncGenerator`,\n code: 'INTERNAL_SERVER_ERROR',\n }),\n );\n }\n const dataAsIterable = isObservable(result.data)\n ? observableToAsyncIterable(result.data, opts.req.signal)\n : result.data;\n return dataAsIterable;\n });\n\n const stream = sseStreamProducer({\n ...config.sse,\n data: iterable,\n serialize: (v) => config.transformer.output.serialize(v),\n formatError(errorOpts) {\n const error = getTRPCErrorFromUnknown(errorOpts.error);\n const input = call?.result();\n const path = call?.path;\n const type = call?.procedure?._def.type ?? 'unknown';\n\n opts.onError?.({\n error,\n path,\n input,\n ctx: ctxManager.valueOrUndefined(),\n req: opts.req,\n type,\n });\n\n const shape = getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input,\n path,\n type,\n });\n\n return shape;\n },\n });\n for (const [key, value] of Object.entries(sseHeaders)) {\n headers.set(key, value);\n }\n\n const headResponse = initResponse({\n ctx: ctxManager.valueOrUndefined(),\n info,\n responseMeta: opts.responseMeta,\n errors: [],\n headers,\n untransformedJSON: null,\n });\n\n const abortSignal = result?.signal;\n let responseBody: ReadableStream = stream;\n\n // Fixes: https://github.com/trpc/trpc/issues/7094\n if (abortSignal) {\n const reader = stream.getReader();\n const onAbort = () => void reader.cancel();\n if (abortSignal.aborted) {\n onAbort();\n } else {\n abortSignal.addEventListener('abort', onAbort, { once: true });\n }\n\n responseBody = new ReadableStream({\n async pull(controller) {\n const chunk = await reader.read();\n if (chunk.done) {\n abortSignal.removeEventListener('abort', onAbort);\n controller.close();\n } else {\n controller.enqueue(chunk.value);\n }\n },\n cancel() {\n abortSignal.removeEventListener('abort', onAbort);\n return reader.cancel();\n },\n });\n }\n\n return new Response(responseBody, {\n headers,\n status: headResponse.status,\n });\n }\n }\n }\n\n // batch response handlers\n if (info.accept === 'application/jsonl') {\n // httpBatchStreamLink\n headers.set('content-type', 'application/json');\n headers.set('transfer-encoding', 'chunked');\n const headResponse = initResponse({\n ctx: ctxManager.valueOrUndefined(),\n info,\n responseMeta: opts.responseMeta,\n errors: [],\n headers,\n untransformedJSON: null,\n });\n const stream = jsonlStreamProducer({\n ...config.jsonl,\n /**\n * Example structure for `maxDepth: 4`:\n * {\n * // 1\n * 0: {\n * // 2\n * result: {\n * // 3\n * data: // 4\n * }\n * }\n * }\n */\n maxDepth: Infinity,\n data: rpcCalls.map(async (res) => {\n const [error, result] = await res;\n\n const call = info.calls[0];\n\n if (error) {\n return {\n error: getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input: call!.result(),\n path: call!.path,\n type: call!.procedure?._def.type ?? 'unknown',\n }),\n };\n }\n\n /**\n * Not very pretty, but we need to wrap nested data in promises\n * Our stream producer will only resolve top-level async values or async values that are directly nested in another async value\n */\n const iterable = isObservable(result.data)\n ? observableToAsyncIterable(result.data, opts.req.signal)\n : Promise.resolve(result.data);\n return {\n result: Promise.resolve({\n data: iterable,\n }),\n };\n }),\n serialize: (data) => config.transformer.output.serialize(data),\n onError: (cause) => {\n opts.onError?.({\n error: getTRPCErrorFromUnknown(cause),\n path: undefined,\n input: undefined,\n ctx: ctxManager.valueOrUndefined(),\n req: opts.req,\n type: info?.type ?? 'unknown',\n });\n },\n\n formatError(errorOpts) {\n const call = info?.calls[errorOpts.path[0] as any];\n\n const error = getTRPCErrorFromUnknown(errorOpts.error);\n const input = call?.result();\n const path = call?.path;\n const type = call?.procedure?._def.type ?? 'unknown';\n\n // no need to call `onError` here as it will be propagated through the stream itself\n\n const shape = getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input,\n path,\n type,\n });\n\n return shape;\n },\n });\n\n return new Response(stream, {\n headers,\n status: headResponse.status,\n });\n }\n\n // httpBatchLink\n /**\n * Non-streaming response:\n * - await all responses in parallel, blocking on the slowest one\n * - create headers with known response body\n * - return a complete HTTPResponse\n */\n headers.set('content-type', 'application/json');\n const results: RPCResult[] = (await Promise.all(rpcCalls)).map(\n (res): RPCResult => {\n const [error, result] = res;\n if (error) {\n return res;\n }\n\n if (isDataStream(result.data)) {\n return [\n new TRPCError({\n code: 'UNSUPPORTED_MEDIA_TYPE',\n message:\n 'Cannot use stream-like response in non-streaming request - use httpBatchStreamLink',\n }),\n undefined,\n ];\n }\n return res;\n },\n );\n const resultAsRPCResponse = results.map(\n (\n [error, result],\n index,\n ): TRPCResponse> => {\n const call = info.calls[index]!;\n if (error) {\n return {\n error: getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input: call.result(),\n path: call.path,\n type: call.procedure?._def.type ?? 'unknown',\n }),\n };\n }\n return {\n result: { data: result.data },\n };\n },\n );\n\n const errors = results\n .map(([error]) => error)\n .filter(Boolean) as TRPCError[];\n\n const headResponse = initResponse({\n ctx: ctxManager.valueOrUndefined(),\n info,\n responseMeta: opts.responseMeta,\n untransformedJSON: resultAsRPCResponse,\n errors,\n headers,\n });\n\n return new Response(\n JSON.stringify(transformTRPCResponse(config, resultAsRPCResponse)),\n {\n status: headResponse.status,\n headers,\n },\n );\n } catch (cause) {\n const [_infoError, info] = infoTuple;\n const ctx = ctxManager.valueOrUndefined();\n // we get here if\n // - batching is called when it's not enabled\n // - `createContext()` throws\n // - `router._def._config.transformer.output.serialize()` throws\n // - post body is too large\n // - input deserialization fails\n // - `errorFormatter` return value is malformed\n const { error, untransformedJSON, body } = caughtErrorToData(cause, {\n opts,\n ctx: ctxManager.valueOrUndefined(),\n type: info?.type ?? 'unknown',\n });\n\n const headResponse = initResponse({\n ctx,\n info,\n responseMeta: opts.responseMeta,\n untransformedJSON,\n errors: [error],\n headers,\n });\n\n return new Response(body, {\n status: headResponse.status,\n headers,\n });\n }\n}\n", "/**\n * If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`\n *\n * @example\n * ```ts\n * import type { AnyTRPCRouter } from '@trpc/server'\n * import type { HTTPBaseHandlerOptions } from '@trpc/server/http'\n * ```\n */\n// @trpc/server\n\nimport type { AnyRouter } from '../../@trpc/server';\nimport type { ResolveHTTPRequestOptionsContextFn } from '../../@trpc/server/http';\nimport { resolveResponse } from '../../@trpc/server/http';\nimport type { FetchHandlerRequestOptions } from './types';\n\nconst trimSlashes = (path: string): string => {\n path = path.startsWith('/') ? path.slice(1) : path;\n path = path.endsWith('/') ? path.slice(0, -1) : path;\n\n return path;\n};\n\nexport async function fetchRequestHandler(\n opts: FetchHandlerRequestOptions,\n): Promise {\n const resHeaders = new Headers();\n\n const createContext: ResolveHTTPRequestOptionsContextFn = async (\n innerOpts,\n ) => {\n return opts.createContext?.({ req: opts.req, resHeaders, ...innerOpts });\n };\n\n const url = new URL(opts.req.url);\n\n const pathname = trimSlashes(url.pathname);\n const endpoint = trimSlashes(opts.endpoint);\n const path = trimSlashes(pathname.slice(endpoint.length));\n\n return await resolveResponse({\n ...opts,\n req: opts.req,\n createContext,\n path,\n error: null,\n onError(o) {\n opts?.onError?.({ ...o, req: opts.req });\n },\n responseMeta(data) {\n const meta = opts.responseMeta?.(data);\n\n if (meta?.headers) {\n if (meta.headers instanceof Headers) {\n for (const [key, value] of meta.headers.entries()) {\n resHeaders.append(key, value);\n }\n } else {\n /**\n * @deprecated, delete in v12\n */\n for (const [key, value] of Object.entries(meta.headers)) {\n if (Array.isArray(value)) {\n for (const v of value) {\n resHeaders.append(key, v);\n }\n } else if (typeof value === 'string') {\n resHeaders.set(key, value);\n }\n }\n }\n }\n\n return {\n headers: resHeaders,\n status: meta?.status,\n };\n },\n });\n}\n", "// src/helper/route/index.ts\nimport { GET_MATCH_RESULT } from \"../../request/constants.js\";\nimport { getPattern, splitRoutingPath } from \"../../utils/url.js\";\nvar matchedRoutes = (c) => (\n // @ts-expect-error c.req[GET_MATCH_RESULT] is not typed\n c.req[GET_MATCH_RESULT][0].map(([[, route]]) => route)\n);\nvar routePath = (c, index) => matchedRoutes(c).at(index ?? c.req.routeIndex)?.path ?? \"\";\nvar baseRoutePath = (c, index) => matchedRoutes(c).at(index ?? c.req.routeIndex)?.basePath ?? \"\";\nvar basePathCacheMap = /* @__PURE__ */ new WeakMap();\nvar basePath = (c, index) => {\n index ??= c.req.routeIndex;\n const cache = basePathCacheMap.get(c) || [];\n if (typeof cache[index] === \"string\") {\n return cache[index];\n }\n let result;\n const rp = baseRoutePath(c, index);\n if (!/[:*]/.test(rp)) {\n result = rp;\n } else {\n const paths = splitRoutingPath(rp);\n const reqPath = c.req.path;\n let basePathLength = 0;\n for (let i = 0, len = paths.length; i < len; i++) {\n const pattern = getPattern(paths[i], paths[i + 1]);\n if (pattern) {\n const re = pattern[2] === true || pattern === \"*\" ? /[^\\/]+/ : pattern[2];\n basePathLength += reqPath.substring(basePathLength + 1).match(re)?.[0].length || 0;\n } else {\n basePathLength += paths[i].length;\n }\n basePathLength += 1;\n }\n result = reqPath.substring(0, basePathLength);\n }\n cache[index] = result;\n basePathCacheMap.set(c, cache);\n return result;\n};\nexport {\n basePath,\n baseRoutePath,\n matchedRoutes,\n routePath\n};\n", "import type { AnyRouter } from '@trpc/server'\nimport type {\n FetchCreateContextFnOptions,\n FetchHandlerRequestOptions,\n} from '@trpc/server/adapters/fetch'\nimport { fetchRequestHandler } from '@trpc/server/adapters/fetch'\nimport type { Context, MiddlewareHandler } from 'hono'\nimport { routePath } from 'hono/route'\n\ntype tRPCOptions = Omit<\n FetchHandlerRequestOptions,\n 'req' | 'endpoint' | 'createContext'\n> &\n Partial, 'endpoint'>> & {\n createContext?(\n opts: FetchCreateContextFnOptions,\n c: Context\n ): Record | Promise>\n }\n\nexport const trpcServer = ({\n endpoint,\n createContext,\n ...rest\n}: tRPCOptions): MiddlewareHandler => {\n const bodyProps = new Set(['arrayBuffer', 'blob', 'formData', 'json', 'text'] as const)\n type BodyProp = typeof bodyProps extends Set ? T : never\n return async (c) => {\n const canWithBody = c.req.method === 'GET' || c.req.method === 'HEAD'\n\n // Auto-detect endpoint from route path if not explicitly provided\n let resolvedEndpoint = endpoint\n if (!endpoint) {\n const path = routePath(c)\n if (path) {\n // Remove wildcard suffix (e.g., \"/v1/*\" -> \"/v1\")\n resolvedEndpoint = path.replace(/\\/\\*+$/, '') || '/trpc'\n } else {\n resolvedEndpoint = '/trpc'\n }\n }\n\n const res = await fetchRequestHandler({\n ...rest,\n createContext: async (opts) => ({\n ...(createContext ? await createContext(opts, c) : {}),\n // propagate env by default\n env: c.env,\n }),\n endpoint: resolvedEndpoint!,\n req: canWithBody\n ? c.req.raw\n : new Proxy(c.req.raw, {\n get(t, p, _r) {\n if (bodyProps.has(p as BodyProp)) {\n return () => c.req[p as BodyProp]()\n }\n return Reflect.get(t, p, t)\n },\n }),\n })\n return res\n }\n}\n", "export const entityKind = Symbol.for('drizzle:entityKind');\nexport const hasOwnEntityKind = Symbol.for('drizzle:hasOwnEntityKind');\n\nexport interface DrizzleEntity {\n\t[entityKind]: string;\n}\n\nexport type DrizzleEntityClass =\n\t& ((abstract new(...args: any[]) => T) | (new(...args: any[]) => T))\n\t& DrizzleEntity;\n\nexport function is>(value: any, type: T): value is InstanceType {\n\tif (!value || typeof value !== 'object') {\n\t\treturn false;\n\t}\n\n\tif (value instanceof type) { // eslint-disable-line no-instanceof/no-instanceof\n\t\treturn true;\n\t}\n\n\tif (!Object.prototype.hasOwnProperty.call(type, entityKind)) {\n\t\tthrow new Error(\n\t\t\t`Class \"${\n\t\t\t\ttype.name ?? ''\n\t\t\t}\" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`,\n\t\t);\n\t}\n\n\tlet cls = Object.getPrototypeOf(value).constructor;\n\tif (cls) {\n\t\t// Traverse the prototype chain to find the entityKind\n\t\twhile (cls) {\n\t\t\tif (entityKind in cls && cls[entityKind] === type[entityKind]) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tcls = Object.getPrototypeOf(cls);\n\t\t}\n\t}\n\n\treturn false;\n}\n", "import { entityKind } from '~/entity.ts';\n\nexport interface Logger {\n\tlogQuery(query: string, params: unknown[]): void;\n}\n\nexport interface LogWriter {\n\twrite(message: string): void;\n}\n\nexport class ConsoleLogWriter implements LogWriter {\n\tstatic readonly [entityKind]: string = 'ConsoleLogWriter';\n\n\twrite(message: string) {\n\t\tconsole.log(message);\n\t}\n}\n\nexport class DefaultLogger implements Logger {\n\tstatic readonly [entityKind]: string = 'DefaultLogger';\n\n\treadonly writer: LogWriter;\n\n\tconstructor(config?: { writer: LogWriter }) {\n\t\tthis.writer = config?.writer ?? new ConsoleLogWriter();\n\t}\n\n\tlogQuery(query: string, params: unknown[]): void {\n\t\tconst stringifiedParams = params.map((p) => {\n\t\t\ttry {\n\t\t\t\treturn JSON.stringify(p);\n\t\t\t} catch {\n\t\t\t\treturn String(p);\n\t\t\t}\n\t\t});\n\t\tconst paramsStr = stringifiedParams.length ? ` -- params: [${stringifiedParams.join(', ')}]` : '';\n\t\tthis.writer.write(`Query: ${query}${paramsStr}`);\n\t}\n}\n\nexport class NoopLogger implements Logger {\n\tstatic readonly [entityKind]: string = 'NoopLogger';\n\n\tlogQuery(): void {\n\t\t// noop\n\t}\n}\n", "/** @internal */\nexport const TableName = Symbol.for('drizzle:Name');\n", "import type { Column, GetColumnData } from './column.ts';\nimport { entityKind } from './entity.ts';\nimport type { OptionalKeyOnly, RequiredKeyOnly } from './operations.ts';\nimport type { SQLWrapper } from './sql/sql.ts';\nimport { TableName } from './table.utils.ts';\nimport type { Simplify, Update } from './utils.ts';\n\nexport interface TableConfig> {\n\tname: string;\n\tschema: string | undefined;\n\tcolumns: Record;\n\tdialect: string;\n}\n\nexport type UpdateTableConfig> = Required<\n\tUpdate\n>;\n\n/** @internal */\nexport const Schema = Symbol.for('drizzle:Schema');\n\n/** @internal */\nexport const Columns = Symbol.for('drizzle:Columns');\n\n/** @internal */\nexport const ExtraConfigColumns = Symbol.for('drizzle:ExtraConfigColumns');\n\n/** @internal */\nexport const OriginalName = Symbol.for('drizzle:OriginalName');\n\n/** @internal */\nexport const BaseName = Symbol.for('drizzle:BaseName');\n\n/** @internal */\nexport const IsAlias = Symbol.for('drizzle:IsAlias');\n\n/** @internal */\nexport const ExtraConfigBuilder = Symbol.for('drizzle:ExtraConfigBuilder');\n\nconst IsDrizzleTable = Symbol.for('drizzle:IsDrizzleTable');\n\nexport interface Table<\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tT extends TableConfig = TableConfig,\n> extends SQLWrapper {\n\t// SQLWrapper runtime implementation is defined in 'sql/sql.ts'\n}\n\nexport class Table implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Table';\n\n\tdeclare readonly _: {\n\t\treadonly brand: 'Table';\n\t\treadonly config: T;\n\t\treadonly name: T['name'];\n\t\treadonly schema: T['schema'];\n\t\treadonly columns: T['columns'];\n\t\treadonly inferSelect: InferSelectModel>;\n\t\treadonly inferInsert: InferInsertModel>;\n\t};\n\n\tdeclare readonly $inferSelect: InferSelectModel>;\n\tdeclare readonly $inferInsert: InferInsertModel>;\n\n\t/** @internal */\n\tstatic readonly Symbol = {\n\t\tName: TableName as typeof TableName,\n\t\tSchema: Schema as typeof Schema,\n\t\tOriginalName: OriginalName as typeof OriginalName,\n\t\tColumns: Columns as typeof Columns,\n\t\tExtraConfigColumns: ExtraConfigColumns as typeof ExtraConfigColumns,\n\t\tBaseName: BaseName as typeof BaseName,\n\t\tIsAlias: IsAlias as typeof IsAlias,\n\t\tExtraConfigBuilder: ExtraConfigBuilder as typeof ExtraConfigBuilder,\n\t};\n\n\t/**\n\t * @internal\n\t * Can be changed if the table is aliased.\n\t */\n\t[TableName]: string;\n\n\t/**\n\t * @internal\n\t * Used to store the original name of the table, before any aliasing.\n\t */\n\t[OriginalName]: string;\n\n\t/** @internal */\n\t[Schema]: string | undefined;\n\n\t/** @internal */\n\t[Columns]!: T['columns'];\n\n\t/** @internal */\n\t[ExtraConfigColumns]!: Record;\n\n\t/**\n\t * @internal\n\t * Used to store the table name before the transformation via the `tableCreator` functions.\n\t */\n\t[BaseName]: string;\n\n\t/** @internal */\n\t[IsAlias] = false;\n\n\t/** @internal */\n\t[IsDrizzleTable] = true;\n\n\t/** @internal */\n\t[ExtraConfigBuilder]: ((self: any) => Record | unknown[]) | undefined = undefined;\n\n\tconstructor(name: string, schema: string | undefined, baseName: string) {\n\t\tthis[TableName] = this[OriginalName] = name;\n\t\tthis[Schema] = schema;\n\t\tthis[BaseName] = baseName;\n\t}\n}\n\nexport function isTable(table: unknown): table is Table {\n\treturn typeof table === 'object' && table !== null && IsDrizzleTable in table;\n}\n\n/**\n * Any table with a specified boundary.\n *\n * @example\n\t```ts\n\t// Any table with a specific name\n\ttype AnyUsersTable = AnyTable<{ name: 'users' }>;\n\t```\n *\n * To describe any table with any config, simply use `Table` without any type arguments, like this:\n *\n\t```ts\n\tfunction needsTable(table: Table) {\n\t\t...\n\t}\n\t```\n */\nexport type AnyTable> = Table>;\n\nexport function getTableName(table: T): T['_']['name'] {\n\treturn table[TableName];\n}\n\nexport function getTableUniqueName(table: T): `${T['_']['schema']}.${T['_']['name']}` {\n\treturn `${table[Schema] ?? 'public'}.${table[TableName]}`;\n}\n\nexport type MapColumnName =\n\tTDBColumNames extends true ? TColumn['_']['name']\n\t\t: TName;\n\nexport type InferModelFromColumns<\n\tTColumns extends Record,\n\tTInferMode extends 'select' | 'insert' = 'select',\n\tTConfig extends { dbColumnNames: boolean; override?: boolean } = { dbColumnNames: false; override: false },\n> = Simplify<\n\tTInferMode extends 'insert' ?\n\t\t\t& {\n\t\t\t\t[\n\t\t\t\t\tKey in keyof TColumns & string as RequiredKeyOnly<\n\t\t\t\t\t\tMapColumnName,\n\t\t\t\t\t\tTColumns[Key]\n\t\t\t\t\t>\n\t\t\t\t]: GetColumnData;\n\t\t\t}\n\t\t\t& {\n\t\t\t\t[\n\t\t\t\t\tKey in keyof TColumns & string as OptionalKeyOnly<\n\t\t\t\t\t\tMapColumnName,\n\t\t\t\t\t\tTColumns[Key],\n\t\t\t\t\t\tTConfig['override']\n\t\t\t\t\t>\n\t\t\t\t]?: GetColumnData | undefined;\n\t\t\t}\n\t\t: {\n\t\t\t[\n\t\t\t\tKey in keyof TColumns & string as MapColumnName<\n\t\t\t\t\tKey,\n\t\t\t\t\tTColumns[Key],\n\t\t\t\t\tTConfig['dbColumnNames']\n\t\t\t\t>\n\t\t\t]: GetColumnData;\n\t\t}\n>;\n\n/** @deprecated Use one of the alternatives: {@link InferSelectModel} / {@link InferInsertModel}, or `table.$inferSelect` / `table.$inferInsert`\n */\nexport type InferModel<\n\tTTable extends Table,\n\tTInferMode extends 'select' | 'insert' = 'select',\n\tTConfig extends { dbColumnNames: boolean } = { dbColumnNames: false },\n> = InferModelFromColumns;\n\nexport type InferSelectModel<\n\tTTable extends Table,\n\tTConfig extends { dbColumnNames: boolean } = { dbColumnNames: false },\n> = InferModelFromColumns;\n\nexport type InferInsertModel<\n\tTTable extends Table,\n\tTConfig extends { dbColumnNames: boolean; override?: boolean } = { dbColumnNames: false; override: false },\n> = InferModelFromColumns;\n\nexport type InferEnum = T extends { enumValues: readonly (infer U)[] } ? U\n\t: never;\n", "import type {\n\tColumnBuilderBaseConfig,\n\tColumnBuilderRuntimeConfig,\n\tColumnDataType,\n\tGeneratedColumnConfig,\n\tGeneratedIdentityConfig,\n} from './column-builder.ts';\nimport { entityKind } from './entity.ts';\nimport type { DriverValueMapper, SQL, SQLWrapper } from './sql/sql.ts';\nimport type { Table } from './table.ts';\nimport type { Update } from './utils.ts';\n\nexport interface ColumnBaseConfig<\n\tTDataType extends ColumnDataType,\n\tTColumnType extends string,\n> extends ColumnBuilderBaseConfig {\n\ttableName: string;\n\tnotNull: boolean;\n\thasDefault: boolean;\n\tisPrimaryKey: boolean;\n\tisAutoincrement: boolean;\n\thasRuntimeDefault: boolean;\n}\n\nexport type ColumnTypeConfig, TTypeConfig extends object> = T & {\n\tbrand: 'Column';\n\ttableName: T['tableName'];\n\tname: T['name'];\n\tdataType: T['dataType'];\n\tcolumnType: T['columnType'];\n\tdata: T['data'];\n\tdriverParam: T['driverParam'];\n\tnotNull: T['notNull'];\n\thasDefault: T['hasDefault'];\n\tisPrimaryKey: T['isPrimaryKey'];\n\tisAutoincrement: T['isAutoincrement'];\n\thasRuntimeDefault: T['hasRuntimeDefault'];\n\tenumValues: T['enumValues'];\n\tbaseColumn: T extends { baseColumn: infer U } ? U : unknown;\n\tgenerated: GeneratedColumnConfig | undefined;\n\tidentity: undefined | 'always' | 'byDefault';\n} & TTypeConfig;\n\nexport type ColumnRuntimeConfig = ColumnBuilderRuntimeConfig<\n\tTData,\n\tTRuntimeConfig\n>;\n\nexport interface Column<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTRuntimeConfig extends object = object,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTTypeConfig extends object = object,\n> extends DriverValueMapper, SQLWrapper {\n\t// SQLWrapper runtime implementation is defined in 'sql/sql.ts'\n}\n/*\n\t`Column` only accepts a full `ColumnConfig` as its generic.\n\tTo infer parts of the config, use `AnyColumn` that accepts a partial config.\n\tSee `GetColumnData` for example usage of inferring.\n*/\nexport abstract class Column<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n\tTRuntimeConfig extends object = object,\n\tTTypeConfig extends object = object,\n> implements DriverValueMapper, SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Column';\n\n\tdeclare readonly _: ColumnTypeConfig;\n\n\treadonly name: string;\n\treadonly keyAsName: boolean;\n\treadonly primary: boolean;\n\treadonly notNull: boolean;\n\treadonly default: T['data'] | SQL | undefined;\n\treadonly defaultFn: (() => T['data'] | SQL) | undefined;\n\treadonly onUpdateFn: (() => T['data'] | SQL) | undefined;\n\treadonly hasDefault: boolean;\n\treadonly isUnique: boolean;\n\treadonly uniqueName: string | undefined;\n\treadonly uniqueType: string | undefined;\n\treadonly dataType: T['dataType'];\n\treadonly columnType: T['columnType'];\n\treadonly enumValues: T['enumValues'] = undefined;\n\treadonly generated: GeneratedColumnConfig | undefined = undefined;\n\treadonly generatedIdentity: GeneratedIdentityConfig | undefined = undefined;\n\n\tprotected config: ColumnRuntimeConfig;\n\n\tconstructor(\n\t\treadonly table: Table,\n\t\tconfig: ColumnRuntimeConfig,\n\t) {\n\t\tthis.config = config;\n\t\tthis.name = config.name;\n\t\tthis.keyAsName = config.keyAsName;\n\t\tthis.notNull = config.notNull;\n\t\tthis.default = config.default;\n\t\tthis.defaultFn = config.defaultFn;\n\t\tthis.onUpdateFn = config.onUpdateFn;\n\t\tthis.hasDefault = config.hasDefault;\n\t\tthis.primary = config.primaryKey;\n\t\tthis.isUnique = config.isUnique;\n\t\tthis.uniqueName = config.uniqueName;\n\t\tthis.uniqueType = config.uniqueType;\n\t\tthis.dataType = config.dataType as T['dataType'];\n\t\tthis.columnType = config.columnType;\n\t\tthis.generated = config.generated;\n\t\tthis.generatedIdentity = config.generatedIdentity;\n\t}\n\n\tabstract getSQLType(): string;\n\n\tmapFromDriverValue(value: unknown): unknown {\n\t\treturn value;\n\t}\n\n\tmapToDriverValue(value: unknown): unknown {\n\t\treturn value;\n\t}\n\n\t// ** @internal */\n\tshouldDisableInsert(): boolean {\n\t\treturn this.config.generated !== undefined && this.config.generated.type !== 'byDefault';\n\t}\n}\n\nexport type UpdateColConfig<\n\tT extends ColumnBaseConfig,\n\tTUpdate extends Partial>,\n> = Update;\n\nexport type AnyColumn> = {}> = Column<\n\tRequired, TPartial>>\n>;\n\nexport type GetColumnData =\n\t// dprint-ignore\n\tTInferMode extends 'raw' // Raw mode\n\t\t? TColumn['_']['data'] // Just return the underlying type\n\t\t: TColumn['_']['notNull'] extends true // Query mode\n\t\t? TColumn['_']['data'] // Query mode, not null\n\t\t: TColumn['_']['data'] | null; // Query mode, nullable\n\nexport type InferColumnsDataTypes> = {\n\t[Key in keyof TColumns]: GetColumnData;\n};\n", "import { entityKind } from '~/entity.ts';\nimport type { Column } from './column.ts';\nimport type { GelColumn, GelExtraConfigColumn } from './gel-core/index.ts';\nimport type { MySqlColumn } from './mysql-core/index.ts';\nimport type { ExtraConfigColumn, PgColumn, PgSequenceOptions } from './pg-core/index.ts';\nimport type { SingleStoreColumn } from './singlestore-core/index.ts';\nimport type { SQL } from './sql/sql.ts';\nimport type { SQLiteColumn } from './sqlite-core/index.ts';\nimport type { Assume, Simplify } from './utils.ts';\n\nexport type ColumnDataType =\n\t| 'string'\n\t| 'number'\n\t| 'boolean'\n\t| 'array'\n\t| 'json'\n\t| 'date'\n\t| 'bigint'\n\t| 'custom'\n\t| 'buffer'\n\t| 'dateDuration'\n\t| 'duration'\n\t| 'relDuration'\n\t| 'localTime'\n\t| 'localDate'\n\t| 'localDateTime';\n\nexport type Dialect = 'pg' | 'mysql' | 'sqlite' | 'singlestore' | 'common' | 'gel';\n\nexport type GeneratedStorageMode = 'virtual' | 'stored';\n\nexport type GeneratedType = 'always' | 'byDefault';\n\nexport type GeneratedColumnConfig = {\n\tas: TDataType | SQL | (() => SQL);\n\ttype?: GeneratedType;\n\tmode?: GeneratedStorageMode;\n};\n\nexport type GeneratedIdentityConfig = {\n\tsequenceName?: string;\n\tsequenceOptions?: PgSequenceOptions;\n\ttype: 'always' | 'byDefault';\n};\n\nexport interface ColumnBuilderBaseConfig {\n\tname: string;\n\tdataType: TDataType;\n\tcolumnType: TColumnType;\n\tdata: unknown;\n\tdriverParam: unknown;\n\tenumValues: string[] | undefined;\n}\n\nexport type MakeColumnConfig<\n\tT extends ColumnBuilderBaseConfig,\n\tTTableName extends string,\n\tTData = T extends { $type: infer U } ? U : T['data'],\n> = {\n\tname: T['name'];\n\ttableName: TTableName;\n\tdataType: T['dataType'];\n\tcolumnType: T['columnType'];\n\tdata: TData;\n\tdriverParam: T['driverParam'];\n\tnotNull: T extends { notNull: true } ? true : false;\n\thasDefault: T extends { hasDefault: true } ? true : false;\n\tisPrimaryKey: T extends { isPrimaryKey: true } ? true : false;\n\tisAutoincrement: T extends { isAutoincrement: true } ? true : false;\n\thasRuntimeDefault: T extends { hasRuntimeDefault: true } ? true : false;\n\tenumValues: T['enumValues'];\n\tbaseColumn: T extends { baseBuilder: infer U extends ColumnBuilderBase } ? BuildColumn\n\t\t: never;\n\tidentity: T extends { identity: 'always' } ? 'always' : T extends { identity: 'byDefault' } ? 'byDefault' : undefined;\n\tgenerated: T extends { generated: infer G } ? unknown extends G ? undefined\n\t\t: G extends undefined ? undefined\n\t\t: G\n\t\t: undefined;\n} & {};\n\nexport type ColumnBuilderTypeConfig<\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tT extends ColumnBuilderBaseConfig,\n\tTTypeConfig extends object = object,\n> = Simplify<\n\t& {\n\t\tbrand: 'ColumnBuilder';\n\t\tname: T['name'];\n\t\tdataType: T['dataType'];\n\t\tcolumnType: T['columnType'];\n\t\tdata: T['data'];\n\t\tdriverParam: T['driverParam'];\n\t\tnotNull: T extends { notNull: infer U } ? U : boolean;\n\t\thasDefault: T extends { hasDefault: infer U } ? U : boolean;\n\t\tenumValues: T['enumValues'];\n\t\tidentity: T extends { identity: infer U } ? U : unknown;\n\t\tgenerated: T extends { generated: infer G } ? G extends undefined ? unknown : G : unknown;\n\t}\n\t& TTypeConfig\n>;\n\nexport type ColumnBuilderRuntimeConfig = {\n\tname: string;\n\tkeyAsName: boolean;\n\tnotNull: boolean;\n\tdefault: TData | SQL | undefined;\n\tdefaultFn: (() => TData | SQL) | undefined;\n\tonUpdateFn: (() => TData | SQL) | undefined;\n\thasDefault: boolean;\n\tprimaryKey: boolean;\n\tisUnique: boolean;\n\tuniqueName: string | undefined;\n\tuniqueType: string | undefined;\n\tdataType: string;\n\tcolumnType: string;\n\tgenerated: GeneratedColumnConfig | undefined;\n\tgeneratedIdentity: GeneratedIdentityConfig | undefined;\n} & TRuntimeConfig;\n\nexport interface ColumnBuilderExtraConfig {\n\tprimaryKeyHasDefault?: boolean;\n}\n\nexport type NotNull = T & {\n\t_: {\n\t\tnotNull: true;\n\t};\n};\n\nexport type HasDefault = T & {\n\t_: {\n\t\thasDefault: true;\n\t};\n};\n\nexport type IsPrimaryKey = T & {\n\t_: {\n\t\tisPrimaryKey: true;\n\t};\n};\n\nexport type IsAutoincrement = T & {\n\t_: {\n\t\tisAutoincrement: true;\n\t};\n};\n\nexport type HasRuntimeDefault = T & {\n\t_: {\n\t\thasRuntimeDefault: true;\n\t};\n};\n\nexport type $Type = T & {\n\t_: {\n\t\t$type: TType;\n\t};\n};\n\nexport type HasGenerated = T & {\n\t_: {\n\t\thasDefault: true;\n\t\tgenerated: TGenerated;\n\t};\n};\n\nexport type IsIdentity<\n\tT extends ColumnBuilderBase,\n\tTType extends 'always' | 'byDefault',\n> = T & {\n\t_: {\n\t\tnotNull: true;\n\t\thasDefault: true;\n\t\tidentity: TType;\n\t};\n};\nexport interface ColumnBuilderBase<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTTypeConfig extends object = object,\n> {\n\t_: ColumnBuilderTypeConfig;\n}\n\n// To understand how to use `ColumnBuilder` and `AnyColumnBuilder`, see `Column` and `AnyColumn` documentation.\nexport abstract class ColumnBuilder<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTRuntimeConfig extends object = object,\n\tTTypeConfig extends object = object,\n\tTExtraConfig extends ColumnBuilderExtraConfig = ColumnBuilderExtraConfig,\n> implements ColumnBuilderBase {\n\tstatic readonly [entityKind]: string = 'ColumnBuilder';\n\n\tdeclare _: ColumnBuilderTypeConfig;\n\n\tprotected config: ColumnBuilderRuntimeConfig;\n\n\tconstructor(name: T['name'], dataType: T['dataType'], columnType: T['columnType']) {\n\t\tthis.config = {\n\t\t\tname,\n\t\t\tkeyAsName: name === '',\n\t\t\tnotNull: false,\n\t\t\tdefault: undefined,\n\t\t\thasDefault: false,\n\t\t\tprimaryKey: false,\n\t\t\tisUnique: false,\n\t\t\tuniqueName: undefined,\n\t\t\tuniqueType: undefined,\n\t\t\tdataType,\n\t\t\tcolumnType,\n\t\t\tgenerated: undefined,\n\t\t} as ColumnBuilderRuntimeConfig;\n\t}\n\n\t/**\n\t * Changes the data type of the column. Commonly used with `json` columns. Also, useful for branded types.\n\t *\n\t * @example\n\t * ```ts\n\t * const users = pgTable('users', {\n\t * \tid: integer('id').$type().primaryKey(),\n\t * \tdetails: json('details').$type().notNull(),\n\t * });\n\t * ```\n\t */\n\t$type(): $Type {\n\t\treturn this as $Type;\n\t}\n\n\t/**\n\t * Adds a `not null` clause to the column definition.\n\t *\n\t * Affects the `select` model of the table - columns *without* `not null` will be nullable on select.\n\t */\n\tnotNull(): NotNull {\n\t\tthis.config.notNull = true;\n\t\treturn this as NotNull;\n\t}\n\n\t/**\n\t * Adds a `default ` clause to the column definition.\n\t *\n\t * Affects the `insert` model of the table - columns *with* `default` are optional on insert.\n\t *\n\t * If you need to set a dynamic default value, use {@link $defaultFn} instead.\n\t */\n\tdefault(value: (this['_'] extends { $type: infer U } ? U : this['_']['data']) | SQL): HasDefault {\n\t\tthis.config.default = value;\n\t\tthis.config.hasDefault = true;\n\t\treturn this as HasDefault;\n\t}\n\n\t/**\n\t * Adds a dynamic default value to the column.\n\t * The function will be called when the row is inserted, and the returned value will be used as the column value.\n\t *\n\t * **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`.\n\t */\n\t$defaultFn(\n\t\tfn: () => (this['_'] extends { $type: infer U } ? U : this['_']['data']) | SQL,\n\t): HasRuntimeDefault> {\n\t\tthis.config.defaultFn = fn;\n\t\tthis.config.hasDefault = true;\n\t\treturn this as HasRuntimeDefault>;\n\t}\n\n\t/**\n\t * Alias for {@link $defaultFn}.\n\t */\n\t$default = this.$defaultFn;\n\n\t/**\n\t * Adds a dynamic update value to the column.\n\t * The function will be called when the row is updated, and the returned value will be used as the column value if none is provided.\n\t * If no `default` (or `$defaultFn`) value is provided, the function will be called when the row is inserted as well, and the returned value will be used as the column value.\n\t *\n\t * **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`.\n\t */\n\t$onUpdateFn(\n\t\tfn: () => (this['_'] extends { $type: infer U } ? U : this['_']['data']) | SQL,\n\t): HasDefault {\n\t\tthis.config.onUpdateFn = fn;\n\t\tthis.config.hasDefault = true;\n\t\treturn this as HasDefault;\n\t}\n\n\t/**\n\t * Alias for {@link $onUpdateFn}.\n\t */\n\t$onUpdate = this.$onUpdateFn;\n\n\t/**\n\t * Adds a `primary key` clause to the column definition. This implicitly makes the column `not null`.\n\t *\n\t * In SQLite, `integer primary key` implicitly makes the column auto-incrementing.\n\t */\n\tprimaryKey(): TExtraConfig['primaryKeyHasDefault'] extends true ? IsPrimaryKey>>\n\t\t: IsPrimaryKey>\n\t{\n\t\tthis.config.primaryKey = true;\n\t\tthis.config.notNull = true;\n\t\treturn this as TExtraConfig['primaryKeyHasDefault'] extends true ? IsPrimaryKey>>\n\t\t\t: IsPrimaryKey>;\n\t}\n\n\tabstract generatedAlwaysAs(\n\t\tas: SQL | T['data'] | (() => SQL),\n\t\tconfig?: Partial>,\n\t): HasGenerated;\n\n\t/** @internal Sets the name of the column to the key within the table definition if a name was not given. */\n\tsetName(name: string) {\n\t\tif (this.config.name !== '') return;\n\t\tthis.config.name = name;\n\t}\n}\n\nexport type BuildColumn<\n\tTTableName extends string,\n\tTBuilder extends ColumnBuilderBase,\n\tTDialect extends Dialect,\n> = TDialect extends 'pg' ? PgColumn<\n\t\tMakeColumnConfig,\n\t\t{},\n\t\tSimplify | 'brand' | 'dialect'>>\n\t>\n\t: TDialect extends 'mysql' ? MySqlColumn<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify<\n\t\t\t\tOmit<\n\t\t\t\t\tTBuilder['_'],\n\t\t\t\t\t| keyof MakeColumnConfig\n\t\t\t\t\t| 'brand'\n\t\t\t\t\t| 'dialect'\n\t\t\t\t\t| 'primaryKeyHasDefault'\n\t\t\t\t\t| 'mysqlColumnBuilderBrand'\n\t\t\t\t>\n\t\t\t>\n\t\t>\n\t: TDialect extends 'sqlite' ? SQLiteColumn<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify | 'brand' | 'dialect'>>\n\t\t>\n\t: TDialect extends 'common' ? Column<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify | 'brand' | 'dialect'>>\n\t\t>\n\t: TDialect extends 'singlestore' ? SingleStoreColumn<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify<\n\t\t\t\tOmit<\n\t\t\t\t\tTBuilder['_'],\n\t\t\t\t\t| keyof MakeColumnConfig\n\t\t\t\t\t| 'brand'\n\t\t\t\t\t| 'dialect'\n\t\t\t\t\t| 'primaryKeyHasDefault'\n\t\t\t\t\t| 'singlestoreColumnBuilderBrand'\n\t\t\t\t>\n\t\t\t>\n\t\t>\n\t: TDialect extends 'gel' ? GelColumn<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify | 'brand' | 'dialect'>>\n\t\t>\n\t: never;\n\nexport type BuildIndexColumn<\n\tTDialect extends Dialect,\n> = TDialect extends 'pg' ? ExtraConfigColumn\n\t: TDialect extends 'gel' ? GelExtraConfigColumn\n\t: never;\n\n// TODO\n// try to make sql as well + indexRaw\n\n// optional after everything will be working as expected\n// also try to leave only needed methods for extraConfig\n// make an error if I pass .asc() to fk and so on\n\nexport type BuildColumns<\n\tTTableName extends string,\n\tTConfigMap extends Record,\n\tTDialect extends Dialect,\n> =\n\t& {\n\t\t[Key in keyof TConfigMap]: BuildColumn\n\t\t\t\t& { name: TConfigMap[Key]['_']['name'] extends '' ? Assume : TConfigMap[Key]['_']['name'] };\n\t\t}, TDialect>;\n\t}\n\t& {};\n\nexport type BuildExtraConfigColumns<\n\t_TTableName extends string,\n\tTConfigMap extends Record,\n\tTDialect extends Dialect,\n> =\n\t& {\n\t\t[Key in keyof TConfigMap]: BuildIndexColumn;\n\t}\n\t& {};\n\nexport type ChangeColumnTableName =\n\tTDialect extends 'pg' ? PgColumn>\n\t\t: TDialect extends 'mysql' ? MySqlColumn>\n\t\t: TDialect extends 'singlestore' ? SingleStoreColumn>\n\t\t: TDialect extends 'sqlite' ? SQLiteColumn>\n\t\t: TDialect extends 'gel' ? GelColumn>\n\t\t: never;\n", "import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { AnyPgColumn, PgColumn } from './columns/index.ts';\nimport type { PgTable } from './table.ts';\n\nexport type UpdateDeleteAction = 'cascade' | 'restrict' | 'no action' | 'set null' | 'set default';\n\nexport type Reference = () => {\n\treadonly name?: string;\n\treadonly columns: PgColumn[];\n\treadonly foreignTable: PgTable;\n\treadonly foreignColumns: PgColumn[];\n};\n\nexport class ForeignKeyBuilder {\n\tstatic readonly [entityKind]: string = 'PgForeignKeyBuilder';\n\n\t/** @internal */\n\treference: Reference;\n\n\t/** @internal */\n\t_onUpdate: UpdateDeleteAction | undefined = 'no action';\n\n\t/** @internal */\n\t_onDelete: UpdateDeleteAction | undefined = 'no action';\n\n\tconstructor(\n\t\tconfig: () => {\n\t\t\tname?: string;\n\t\t\tcolumns: PgColumn[];\n\t\t\tforeignColumns: PgColumn[];\n\t\t},\n\t\tactions?: {\n\t\t\tonUpdate?: UpdateDeleteAction;\n\t\t\tonDelete?: UpdateDeleteAction;\n\t\t} | undefined,\n\t) {\n\t\tthis.reference = () => {\n\t\t\tconst { name, columns, foreignColumns } = config();\n\t\t\treturn { name, columns, foreignTable: foreignColumns[0]!.table as PgTable, foreignColumns };\n\t\t};\n\t\tif (actions) {\n\t\t\tthis._onUpdate = actions.onUpdate;\n\t\t\tthis._onDelete = actions.onDelete;\n\t\t}\n\t}\n\n\tonUpdate(action: UpdateDeleteAction): this {\n\t\tthis._onUpdate = action === undefined ? 'no action' : action;\n\t\treturn this;\n\t}\n\n\tonDelete(action: UpdateDeleteAction): this {\n\t\tthis._onDelete = action === undefined ? 'no action' : action;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: PgTable): ForeignKey {\n\t\treturn new ForeignKey(table, this);\n\t}\n}\n\nexport type AnyForeignKeyBuilder = ForeignKeyBuilder;\n\nexport class ForeignKey {\n\tstatic readonly [entityKind]: string = 'PgForeignKey';\n\n\treadonly reference: Reference;\n\treadonly onUpdate: UpdateDeleteAction | undefined;\n\treadonly onDelete: UpdateDeleteAction | undefined;\n\n\tconstructor(readonly table: PgTable, builder: ForeignKeyBuilder) {\n\t\tthis.reference = builder.reference;\n\t\tthis.onUpdate = builder._onUpdate;\n\t\tthis.onDelete = builder._onDelete;\n\t}\n\n\tgetName(): string {\n\t\tconst { name, columns, foreignColumns } = this.reference();\n\t\tconst columnNames = columns.map((column) => column.name);\n\t\tconst foreignColumnNames = foreignColumns.map((column) => column.name);\n\t\tconst chunks = [\n\t\t\tthis.table[TableName],\n\t\t\t...columnNames,\n\t\t\tforeignColumns[0]!.table[TableName],\n\t\t\t...foreignColumnNames,\n\t\t];\n\t\treturn name ?? `${chunks.join('_')}_fk`;\n\t}\n}\n\ntype ColumnsWithTable<\n\tTTableName extends string,\n\tTColumns extends PgColumn[],\n> = { [Key in keyof TColumns]: AnyPgColumn<{ tableName: TTableName }> };\n\nexport function foreignKey<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends [AnyPgColumn<{ tableName: TTableName }>, ...AnyPgColumn<{ tableName: TTableName }>[]],\n>(\n\tconfig: {\n\t\tname?: string;\n\t\tcolumns: TColumns;\n\t\tforeignColumns: ColumnsWithTable;\n\t},\n): ForeignKeyBuilder {\n\tfunction mappedConfig() {\n\t\tconst { name, columns, foreignColumns } = config;\n\t\treturn {\n\t\t\tname,\n\t\t\tcolumns,\n\t\t\tforeignColumns,\n\t\t};\n\t}\n\n\treturn new ForeignKeyBuilder(mappedConfig);\n}\n", "export function iife(fn: (...args: T) => U, ...args: T): U {\n\treturn fn(...args);\n}\n", "import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { PgColumn } from './columns/index.ts';\nimport type { PgTable } from './table.ts';\n\nexport function unique(name?: string): UniqueOnConstraintBuilder {\n\treturn new UniqueOnConstraintBuilder(name);\n}\n\nexport function uniqueKeyName(table: PgTable, columns: string[]) {\n\treturn `${table[TableName]}_${columns.join('_')}_unique`;\n}\n\nexport class UniqueConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'PgUniqueConstraintBuilder';\n\n\t/** @internal */\n\tcolumns: PgColumn[];\n\t/** @internal */\n\tnullsNotDistinctConfig = false;\n\n\tconstructor(\n\t\tcolumns: PgColumn[],\n\t\tprivate name?: string,\n\t) {\n\t\tthis.columns = columns;\n\t}\n\n\tnullsNotDistinct() {\n\t\tthis.nullsNotDistinctConfig = true;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: PgTable): UniqueConstraint {\n\t\treturn new UniqueConstraint(table, this.columns, this.nullsNotDistinctConfig, this.name);\n\t}\n}\n\nexport class UniqueOnConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'PgUniqueOnConstraintBuilder';\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tname?: string,\n\t) {\n\t\tthis.name = name;\n\t}\n\n\ton(...columns: [PgColumn, ...PgColumn[]]) {\n\t\treturn new UniqueConstraintBuilder(columns, this.name);\n\t}\n}\n\nexport class UniqueConstraint {\n\tstatic readonly [entityKind]: string = 'PgUniqueConstraint';\n\n\treadonly columns: PgColumn[];\n\treadonly name?: string;\n\treadonly nullsNotDistinct: boolean = false;\n\n\tconstructor(readonly table: PgTable, columns: PgColumn[], nullsNotDistinct: boolean, name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name));\n\t\tthis.nullsNotDistinct = nullsNotDistinct;\n\t}\n\n\tgetName() {\n\t\treturn this.name;\n\t}\n}\n", "function parsePgArrayValue(arrayString: string, startFrom: number, inQuotes: boolean): [string, number] {\n\tfor (let i = startFrom; i < arrayString.length; i++) {\n\t\tconst char = arrayString[i];\n\n\t\tif (char === '\\\\') {\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === '\"') {\n\t\t\treturn [arrayString.slice(startFrom, i).replace(/\\\\/g, ''), i + 1];\n\t\t}\n\n\t\tif (inQuotes) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === ',' || char === '}') {\n\t\t\treturn [arrayString.slice(startFrom, i).replace(/\\\\/g, ''), i];\n\t\t}\n\t}\n\n\treturn [arrayString.slice(startFrom).replace(/\\\\/g, ''), arrayString.length];\n}\n\nexport function parsePgNestedArray(arrayString: string, startFrom = 0): [any[], number] {\n\tconst result: any[] = [];\n\tlet i = startFrom;\n\tlet lastCharIsComma = false;\n\n\twhile (i < arrayString.length) {\n\t\tconst char = arrayString[i];\n\n\t\tif (char === ',') {\n\t\t\tif (lastCharIsComma || i === startFrom) {\n\t\t\t\tresult.push('');\n\t\t\t}\n\t\t\tlastCharIsComma = true;\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tlastCharIsComma = false;\n\n\t\tif (char === '\\\\') {\n\t\t\ti += 2;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === '\"') {\n\t\t\tconst [value, startFrom] = parsePgArrayValue(arrayString, i + 1, true);\n\t\t\tresult.push(value);\n\t\t\ti = startFrom;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === '}') {\n\t\t\treturn [result, i + 1];\n\t\t}\n\n\t\tif (char === '{') {\n\t\t\tconst [value, startFrom] = parsePgNestedArray(arrayString, i + 1);\n\t\t\tresult.push(value);\n\t\t\ti = startFrom;\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst [value, newStartFrom] = parsePgArrayValue(arrayString, i, false);\n\t\tresult.push(value);\n\t\ti = newStartFrom;\n\t}\n\n\treturn [result, i];\n}\n\nexport function parsePgArray(arrayString: string): any[] {\n\tconst [result] = parsePgNestedArray(arrayString, 1);\n\treturn result;\n}\n\nexport function makePgArray(array: any[]): string {\n\treturn `{${\n\t\tarray.map((item) => {\n\t\t\tif (Array.isArray(item)) {\n\t\t\t\treturn makePgArray(item);\n\t\t\t}\n\n\t\t\tif (typeof item === 'string') {\n\t\t\t\treturn `\"${item.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"')}\"`;\n\t\t\t}\n\n\t\t\treturn `${item}`;\n\t\t}).join(',')\n\t}}`;\n}\n", "import type {\n\tColumnBuilderBase,\n\tColumnBuilderBaseConfig,\n\tColumnBuilderExtraConfig,\n\tColumnBuilderRuntimeConfig,\n\tColumnDataType,\n\tHasGenerated,\n\tMakeColumnConfig,\n} from '~/column-builder.ts';\nimport { ColumnBuilder } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { Column } from '~/column.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport type { Simplify, Update } from '~/utils.ts';\n\nimport type { ForeignKey, UpdateDeleteAction } from '~/pg-core/foreign-keys.ts';\nimport { ForeignKeyBuilder } from '~/pg-core/foreign-keys.ts';\nimport type { AnyPgTable, PgTable } from '~/pg-core/table.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport { iife } from '~/tracing-utils.ts';\nimport type { PgIndexOpClass } from '../indexes.ts';\nimport { uniqueKeyName } from '../unique-constraint.ts';\nimport { makePgArray, parsePgArray } from '../utils/array.ts';\n\nexport interface ReferenceConfig {\n\tref: () => PgColumn;\n\tactions: {\n\t\tonUpdate?: UpdateDeleteAction;\n\t\tonDelete?: UpdateDeleteAction;\n\t};\n}\n\nexport interface PgColumnBuilderBase<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTTypeConfig extends object = object,\n> extends ColumnBuilderBase {}\n\nexport abstract class PgColumnBuilder<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTRuntimeConfig extends object = object,\n\tTTypeConfig extends object = object,\n\tTExtraConfig extends ColumnBuilderExtraConfig = ColumnBuilderExtraConfig,\n> extends ColumnBuilder\n\timplements PgColumnBuilderBase\n{\n\tprivate foreignKeyConfigs: ReferenceConfig[] = [];\n\n\tstatic override readonly [entityKind]: string = 'PgColumnBuilder';\n\n\tarray(size?: TSize): PgArrayBuilder<\n\t\t& {\n\t\t\tname: T['name'];\n\t\t\tdataType: 'array';\n\t\t\tcolumnType: 'PgArray';\n\t\t\tdata: T['data'][];\n\t\t\tdriverParam: T['driverParam'][] | string;\n\t\t\tenumValues: T['enumValues'];\n\t\t\tsize: TSize;\n\t\t\tbaseBuilder: T;\n\t\t}\n\t\t& (T extends { notNull: true } ? { notNull: true } : {})\n\t\t& (T extends { hasDefault: true } ? { hasDefault: true } : {}),\n\t\tT\n\t> {\n\t\treturn new PgArrayBuilder(this.config.name, this as PgColumnBuilder, size as any);\n\t}\n\n\treferences(\n\t\tref: ReferenceConfig['ref'],\n\t\tactions: ReferenceConfig['actions'] = {},\n\t): this {\n\t\tthis.foreignKeyConfigs.push({ ref, actions });\n\t\treturn this;\n\t}\n\n\tunique(\n\t\tname?: string,\n\t\tconfig?: { nulls: 'distinct' | 'not distinct' },\n\t): this {\n\t\tthis.config.isUnique = true;\n\t\tthis.config.uniqueName = name;\n\t\tthis.config.uniqueType = config?.nulls;\n\t\treturn this;\n\t}\n\n\tgeneratedAlwaysAs(as: SQL | T['data'] | (() => SQL)): HasGenerated {\n\t\tthis.config.generated = {\n\t\t\tas,\n\t\t\ttype: 'always',\n\t\t\tmode: 'stored',\n\t\t};\n\t\treturn this as HasGenerated;\n\t}\n\n\t/** @internal */\n\tbuildForeignKeys(column: PgColumn, table: PgTable): ForeignKey[] {\n\t\treturn this.foreignKeyConfigs.map(({ ref, actions }) => {\n\t\t\treturn iife(\n\t\t\t\t(ref, actions) => {\n\t\t\t\t\tconst builder = new ForeignKeyBuilder(() => {\n\t\t\t\t\t\tconst foreignColumn = ref();\n\t\t\t\t\t\treturn { columns: [column], foreignColumns: [foreignColumn] };\n\t\t\t\t\t});\n\t\t\t\t\tif (actions.onUpdate) {\n\t\t\t\t\t\tbuilder.onUpdate(actions.onUpdate);\n\t\t\t\t\t}\n\t\t\t\t\tif (actions.onDelete) {\n\t\t\t\t\t\tbuilder.onDelete(actions.onDelete);\n\t\t\t\t\t}\n\t\t\t\t\treturn builder.build(table);\n\t\t\t\t},\n\t\t\t\tref,\n\t\t\t\tactions,\n\t\t\t);\n\t\t});\n\t}\n\n\t/** @internal */\n\tabstract build(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgColumn>;\n\n\t/** @internal */\n\tbuildExtraConfigColumn(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): ExtraConfigColumn {\n\t\treturn new ExtraConfigColumn(table, this.config);\n\t}\n}\n\n// To understand how to use `PgColumn` and `PgColumn`, see `Column` and `AnyColumn` documentation.\nexport abstract class PgColumn<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n\tTRuntimeConfig extends object = {},\n\tTTypeConfig extends object = {},\n> extends Column {\n\tstatic override readonly [entityKind]: string = 'PgColumn';\n\n\tconstructor(\n\t\toverride readonly table: PgTable,\n\t\tconfig: ColumnBuilderRuntimeConfig,\n\t) {\n\t\tif (!config.uniqueName) {\n\t\t\tconfig.uniqueName = uniqueKeyName(table, [config.name]);\n\t\t}\n\t\tsuper(table, config);\n\t}\n}\n\nexport type IndexedExtraConfigType = { order?: 'asc' | 'desc'; nulls?: 'first' | 'last'; opClass?: string };\n\nexport class ExtraConfigColumn<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n> extends PgColumn {\n\tstatic override readonly [entityKind]: string = 'ExtraConfigColumn';\n\n\toverride getSQLType(): string {\n\t\treturn this.getSQLType();\n\t}\n\n\tindexConfig: IndexedExtraConfigType = {\n\t\torder: this.config.order ?? 'asc',\n\t\tnulls: this.config.nulls ?? 'last',\n\t\topClass: this.config.opClass,\n\t};\n\tdefaultConfig: IndexedExtraConfigType = {\n\t\torder: 'asc',\n\t\tnulls: 'last',\n\t\topClass: undefined,\n\t};\n\n\tasc(): Omit {\n\t\tthis.indexConfig.order = 'asc';\n\t\treturn this;\n\t}\n\n\tdesc(): Omit {\n\t\tthis.indexConfig.order = 'desc';\n\t\treturn this;\n\t}\n\n\tnullsFirst(): Omit {\n\t\tthis.indexConfig.nulls = 'first';\n\t\treturn this;\n\t}\n\n\tnullsLast(): Omit {\n\t\tthis.indexConfig.nulls = 'last';\n\t\treturn this;\n\t}\n\n\t/**\n\t * ### PostgreSQL documentation quote\n\t *\n\t * > An operator class with optional parameters can be specified for each column of an index.\n\t * The operator class identifies the operators to be used by the index for that column.\n\t * For example, a B-tree index on four-byte integers would use the int4_ops class;\n\t * this operator class includes comparison functions for four-byte integers.\n\t * In practice the default operator class for the column's data type is usually sufficient.\n\t * The main point of having operator classes is that for some data types, there could be more than one meaningful ordering.\n\t * For example, we might want to sort a complex-number data type either by absolute value or by real part.\n\t * We could do this by defining two operator classes for the data type and then selecting the proper class when creating an index.\n\t * More information about operator classes check:\n\t *\n\t * ### Useful links\n\t * https://www.postgresql.org/docs/current/sql-createindex.html\n\t *\n\t * https://www.postgresql.org/docs/current/indexes-opclass.html\n\t *\n\t * https://www.postgresql.org/docs/current/xindex.html\n\t *\n\t * ### Additional types\n\t * If you have the `pg_vector` extension installed in your database, you can use the\n\t * `vector_l2_ops`, `vector_ip_ops`, `vector_cosine_ops`, `vector_l1_ops`, `bit_hamming_ops`, `bit_jaccard_ops`, `halfvec_l2_ops`, `sparsevec_l2_ops` options, which are predefined types.\n\t *\n\t * **You can always specify any string you want in the operator class, in case Drizzle doesn't have it natively in its types**\n\t *\n\t * @param opClass\n\t * @returns\n\t */\n\top(opClass: PgIndexOpClass): Omit {\n\t\tthis.indexConfig.opClass = opClass;\n\t\treturn this;\n\t}\n}\n\nexport class IndexedColumn {\n\tstatic readonly [entityKind]: string = 'IndexedColumn';\n\tconstructor(\n\t\tname: string | undefined,\n\t\tkeyAsName: boolean,\n\t\ttype: string,\n\t\tindexConfig: IndexedExtraConfigType,\n\t) {\n\t\tthis.name = name;\n\t\tthis.keyAsName = keyAsName;\n\t\tthis.type = type;\n\t\tthis.indexConfig = indexConfig;\n\t}\n\n\tname: string | undefined;\n\tkeyAsName: boolean;\n\ttype: string;\n\tindexConfig: IndexedExtraConfigType;\n}\n\nexport type AnyPgColumn> = {}> = PgColumn<\n\tRequired, TPartial>>\n>;\n\nexport type PgArrayColumnBuilderBaseConfig = ColumnBuilderBaseConfig<'array', 'PgArray'> & {\n\tsize: number | undefined;\n\tbaseBuilder: ColumnBuilderBaseConfig;\n};\n\nexport class PgArrayBuilder<\n\tT extends PgArrayColumnBuilderBaseConfig,\n\tTBase extends ColumnBuilderBaseConfig | PgArrayColumnBuilderBaseConfig,\n> extends PgColumnBuilder<\n\tT,\n\t{\n\t\tbaseBuilder: TBase extends PgArrayColumnBuilderBaseConfig ? PgArrayBuilder<\n\t\t\t\tTBase,\n\t\t\t\tTBase extends { baseBuilder: infer TBaseBuilder extends ColumnBuilderBaseConfig } ? TBaseBuilder\n\t\t\t\t\t: never\n\t\t\t>\n\t\t\t: PgColumnBuilder>>>;\n\t\tsize: T['size'];\n\t},\n\t{\n\t\tbaseBuilder: TBase extends PgArrayColumnBuilderBaseConfig ? PgArrayBuilder<\n\t\t\t\tTBase,\n\t\t\t\tTBase extends { baseBuilder: infer TBaseBuilder extends ColumnBuilderBaseConfig } ? TBaseBuilder\n\t\t\t\t\t: never\n\t\t\t>\n\t\t\t: PgColumnBuilder>>>;\n\t\tsize: T['size'];\n\t}\n> {\n\tstatic override readonly [entityKind] = 'PgArrayBuilder';\n\n\tconstructor(\n\t\tname: string,\n\t\tbaseBuilder: PgArrayBuilder['config']['baseBuilder'],\n\t\tsize: T['size'],\n\t) {\n\t\tsuper(name, 'array', 'PgArray');\n\t\tthis.config.baseBuilder = baseBuilder;\n\t\tthis.config.size = size;\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgArray & { size: T['size']; baseBuilder: T['baseBuilder'] }, TBase> {\n\t\tconst baseColumn = this.config.baseBuilder.build(table);\n\t\treturn new PgArray & { size: T['size']; baseBuilder: T['baseBuilder'] }, TBase>(\n\t\t\ttable as AnyPgTable<{ name: MakeColumnConfig['tableName'] }>,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t\tbaseColumn,\n\t\t);\n\t}\n}\n\nexport class PgArray<\n\tT extends ColumnBaseConfig<'array', 'PgArray'> & {\n\t\tsize: number | undefined;\n\t\tbaseBuilder: ColumnBuilderBaseConfig;\n\t},\n\tTBase extends ColumnBuilderBaseConfig,\n> extends PgColumn {\n\treadonly size: T['size'];\n\n\tstatic override readonly [entityKind]: string = 'PgArray';\n\n\tconstructor(\n\t\ttable: AnyPgTable<{ name: T['tableName'] }>,\n\t\tconfig: PgArrayBuilder['config'],\n\t\treadonly baseColumn: PgColumn,\n\t\treadonly range?: [number | undefined, number | undefined],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.size = config.size;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn `${this.baseColumn.getSQLType()}[${typeof this.size === 'number' ? this.size : ''}]`;\n\t}\n\n\toverride mapFromDriverValue(value: unknown[] | string): T['data'] {\n\t\tif (typeof value === 'string') {\n\t\t\t// Thank you node-postgres for not parsing enum arrays\n\t\t\tvalue = parsePgArray(value);\n\t\t}\n\t\treturn value.map((v) => this.baseColumn.mapFromDriverValue(v));\n\t}\n\n\toverride mapToDriverValue(value: unknown[], isNestedArray = false): unknown[] | string {\n\t\tconst a = value.map((v) =>\n\t\t\tv === null\n\t\t\t\t? null\n\t\t\t\t: is(this.baseColumn, PgArray)\n\t\t\t\t? this.baseColumn.mapToDriverValue(v as unknown[], true)\n\t\t\t\t: this.baseColumn.mapToDriverValue(v)\n\t\t);\n\t\tif (isNestedArray) return a;\n\t\treturn makePgArray(a);\n\t}\n}\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport type { NonArray, Writable } from '~/utils.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\n// Enum as ts enum\n\nexport type PgEnumObjectColumnBuilderInitial = PgEnumObjectColumnBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgEnumObjectColumn';\n\tdata: TValues[keyof TValues];\n\tenumValues: string[];\n\tdriverParam: string;\n}>;\n\nexport interface PgEnumObject {\n\t(): PgEnumObjectColumnBuilderInitial<'', TValues>;\n\t(name: TName): PgEnumObjectColumnBuilderInitial;\n\t(name?: TName): PgEnumObjectColumnBuilderInitial;\n\n\treadonly enumName: string;\n\treadonly enumValues: string[];\n\treadonly schema: string | undefined;\n\t/** @internal */\n\t[isPgEnumSym]: true;\n}\n\nexport class PgEnumObjectColumnBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'PgEnumObjectColumn'> & { enumValues: string[] },\n> extends PgColumnBuilder }> {\n\tstatic override readonly [entityKind]: string = 'PgEnumObjectColumnBuilder';\n\n\tconstructor(name: T['name'], enumInstance: PgEnumObject) {\n\t\tsuper(name, 'string', 'PgEnumObjectColumn');\n\t\tthis.config.enum = enumInstance;\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgEnumObjectColumn> {\n\t\treturn new PgEnumObjectColumn>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class PgEnumObjectColumn & { enumValues: object }>\n\textends PgColumn }>\n{\n\tstatic override readonly [entityKind]: string = 'PgEnumObjectColumn';\n\n\treadonly enum;\n\toverride readonly enumValues = this.config.enum.enumValues;\n\n\tconstructor(\n\t\ttable: AnyPgTable<{ name: T['tableName'] }>,\n\t\tconfig: PgEnumObjectColumnBuilder['config'],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.enum = config.enum;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn this.enum.enumName;\n\t}\n}\n\n// Enum as string union\n\nexport type PgEnumColumnBuilderInitial =\n\tPgEnumColumnBuilder<{\n\t\tname: TName;\n\t\tdataType: 'string';\n\t\tcolumnType: 'PgEnumColumn';\n\t\tdata: TValues[number];\n\t\tenumValues: TValues;\n\t\tdriverParam: string;\n\t}>;\n\nconst isPgEnumSym = Symbol.for('drizzle:isPgEnum');\nexport interface PgEnum {\n\t(): PgEnumColumnBuilderInitial<'', TValues>;\n\t(name: TName): PgEnumColumnBuilderInitial;\n\t(name?: TName): PgEnumColumnBuilderInitial;\n\n\treadonly enumName: string;\n\treadonly enumValues: TValues;\n\treadonly schema: string | undefined;\n\t/** @internal */\n\t[isPgEnumSym]: true;\n}\n\nexport function isPgEnum(obj: unknown): obj is PgEnum<[string, ...string[]]> {\n\treturn !!obj && typeof obj === 'function' && isPgEnumSym in obj && obj[isPgEnumSym] === true;\n}\n\nexport class PgEnumColumnBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'PgEnumColumn'> & { enumValues: [string, ...string[]] },\n> extends PgColumnBuilder }> {\n\tstatic override readonly [entityKind]: string = 'PgEnumColumnBuilder';\n\n\tconstructor(name: T['name'], enumInstance: PgEnum) {\n\t\tsuper(name, 'string', 'PgEnumColumn');\n\t\tthis.config.enum = enumInstance;\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgEnumColumn> {\n\t\treturn new PgEnumColumn>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class PgEnumColumn & { enumValues: [string, ...string[]] }>\n\textends PgColumn }>\n{\n\tstatic override readonly [entityKind]: string = 'PgEnumColumn';\n\n\treadonly enum = this.config.enum;\n\toverride readonly enumValues = this.config.enum.enumValues;\n\n\tconstructor(\n\t\ttable: AnyPgTable<{ name: T['tableName'] }>,\n\t\tconfig: PgEnumColumnBuilder['config'],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.enum = config.enum;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn this.enum.enumName;\n\t}\n}\n\nexport function pgEnum>(\n\tenumName: string,\n\tvalues: T | Writable,\n): PgEnum>;\n\nexport function pgEnum>(\n\tenumName: string,\n\tenumObj: NonArray,\n): PgEnumObject;\n\nexport function pgEnum(\n\tenumName: any,\n\tinput: any,\n): any {\n\treturn Array.isArray(input)\n\t\t? pgEnumWithSchema(enumName, [...input] as [string, ...string[]], undefined)\n\t\t: pgEnumObjectWithSchema(enumName, input, undefined);\n}\n\n/** @internal */\nexport function pgEnumWithSchema>(\n\tenumName: string,\n\tvalues: T | Writable,\n\tschema?: string,\n): PgEnum> {\n\tconst enumInstance: PgEnum> = Object.assign(\n\t\t(name?: TName): PgEnumColumnBuilderInitial> =>\n\t\t\tnew PgEnumColumnBuilder(name ?? '' as TName, enumInstance),\n\t\t{\n\t\t\tenumName,\n\t\t\tenumValues: values,\n\t\t\tschema,\n\t\t\t[isPgEnumSym]: true,\n\t\t} as const,\n\t);\n\n\treturn enumInstance;\n}\n\n/** @internal */\nexport function pgEnumObjectWithSchema(\n\tenumName: string,\n\tvalues: T,\n\tschema?: string,\n): PgEnumObject {\n\tconst enumInstance: PgEnumObject = Object.assign(\n\t\t(name?: TName): PgEnumObjectColumnBuilderInitial =>\n\t\t\tnew PgEnumObjectColumnBuilder(name ?? '' as TName, enumInstance),\n\t\t{\n\t\t\tenumName,\n\t\t\tenumValues: Object.values(values),\n\t\t\tschema,\n\t\t\t[isPgEnumSym]: true,\n\t\t} as const,\n\t);\n\n\treturn enumInstance;\n}\n", "import { entityKind } from './entity.ts';\nimport type { SQL, SQLWrapper } from './sql/sql.ts';\n\nexport interface Subquery<\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTAlias extends string = string,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTSelectedFields extends Record = Record,\n> extends SQLWrapper {\n\t// SQLWrapper runtime implementation is defined in 'sql/sql.ts'\n}\nexport class Subquery<\n\tTAlias extends string = string,\n\tTSelectedFields extends Record = Record,\n> implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Subquery';\n\n\tdeclare _: {\n\t\tbrand: 'Subquery';\n\t\tsql: SQL;\n\t\tselectedFields: TSelectedFields;\n\t\talias: TAlias;\n\t\tisWith: boolean;\n\t\tusedTables?: string[];\n\t};\n\n\tconstructor(sql: SQL, fields: TSelectedFields, alias: string, isWith = false, usedTables: string[] = []) {\n\t\tthis._ = {\n\t\t\tbrand: 'Subquery',\n\t\t\tsql,\n\t\t\tselectedFields: fields as TSelectedFields,\n\t\t\talias: alias as TAlias,\n\t\t\tisWith,\n\t\t\tusedTables,\n\t\t};\n\t}\n\n\t// getSQL(): SQL {\n\t// \treturn new SQL([this]);\n\t// }\n}\n\nexport class WithSubquery<\n\tTAlias extends string = string,\n\tTSelection extends Record = Record,\n> extends Subquery {\n\tstatic override readonly [entityKind]: string = 'WithSubquery';\n}\n\nexport type WithSubqueryWithoutSelection = WithSubquery;\n", "// package.json\nvar version = \"0.44.7\";\n\n// src/version.ts\nvar compatibilityVersion = 10;\nexport {\n compatibilityVersion,\n version as npmVersion\n};\n", "import type { Span, Tracer } from '@opentelemetry/api';\nimport { iife } from '~/tracing-utils.ts';\nimport { npmVersion } from '~/version.ts';\n\nlet otel: typeof import('@opentelemetry/api') | undefined;\nlet rawTracer: Tracer | undefined;\n// try {\n// \totel = await import('@opentelemetry/api');\n// } catch (err: any) {\n// \tif (err.code !== 'MODULE_NOT_FOUND' && err.code !== 'ERR_MODULE_NOT_FOUND') {\n// \t\tthrow err;\n// \t}\n// }\n\ntype SpanName =\n\t| 'drizzle.operation'\n\t| 'drizzle.prepareQuery'\n\t| 'drizzle.buildSQL'\n\t| 'drizzle.execute'\n\t| 'drizzle.driver.execute'\n\t| 'drizzle.mapResponse';\n\n/** @internal */\nexport const tracer = {\n\tstartActiveSpan unknown>(name: SpanName, fn: F): ReturnType {\n\t\tif (!otel) {\n\t\t\treturn fn() as ReturnType;\n\t\t}\n\n\t\tif (!rawTracer) {\n\t\t\trawTracer = otel.trace.getTracer('drizzle-orm', npmVersion);\n\t\t}\n\n\t\treturn iife(\n\t\t\t(otel, rawTracer) =>\n\t\t\t\trawTracer.startActiveSpan(\n\t\t\t\t\tname,\n\t\t\t\t\t((span: Span) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn fn(span);\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tspan.setStatus({\n\t\t\t\t\t\t\t\tcode: otel.SpanStatusCode.ERROR,\n\t\t\t\t\t\t\t\tmessage: e instanceof Error ? e.message : 'Unknown error', // eslint-disable-line no-instanceof/no-instanceof\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tthrow e;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tspan.end();\n\t\t\t\t\t\t}\n\t\t\t\t\t}) as F,\n\t\t\t\t),\n\t\t\totel,\n\t\t\trawTracer,\n\t\t);\n\t},\n};\n", "export const ViewBaseConfig = Symbol.for('drizzle:ViewBaseConfig');\n", "import type { CasingCache } from '~/casing.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport { isPgEnum } from '~/pg-core/columns/enum.ts';\nimport type { SelectResult } from '~/query-builders/select.types.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { tracer } from '~/tracing.ts';\nimport type { Assume, Equal } from '~/utils.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport type { AnyColumn } from '../column.ts';\nimport { Column } from '../column.ts';\nimport { IsAlias, Table } from '../table.ts';\n\n/**\n * This class is used to indicate a primitive param value that is used in `sql` tag.\n * It is only used on type level and is never instantiated at runtime.\n * If you see a value of this type in the code, its runtime value is actually the primitive param value.\n */\nexport class FakePrimitiveParam {\n\tstatic readonly [entityKind]: string = 'FakePrimitiveParam';\n}\n\nexport type Chunk =\n\t| string\n\t| Table\n\t| View\n\t| AnyColumn\n\t| Name\n\t| Param\n\t| Placeholder\n\t| SQL;\n\nexport interface BuildQueryConfig {\n\tcasing: CasingCache;\n\tescapeName(name: string): string;\n\tescapeParam(num: number, value: unknown): string;\n\tescapeString(str: string): string;\n\tprepareTyping?: (encoder: DriverValueEncoder) => QueryTypingsValue;\n\tparamStartIndex?: { value: number };\n\tinlineParams?: boolean;\n\tinvokeSource?: 'indexes' | undefined;\n}\n\nexport type QueryTypingsValue = 'json' | 'decimal' | 'time' | 'timestamp' | 'uuid' | 'date' | 'none';\n\nexport interface Query {\n\tsql: string;\n\tparams: unknown[];\n}\n\nexport interface QueryWithTypings extends Query {\n\ttypings?: QueryTypingsValue[];\n}\n\n/**\n * Any value that implements the `getSQL` method. The implementations include:\n * - `Table`\n * - `Column`\n * - `View`\n * - `Subquery`\n * - `SQL`\n * - `SQL.Aliased`\n * - `Placeholder`\n * - `Param`\n */\nexport interface SQLWrapper {\n\tgetSQL(): SQL;\n\tshouldOmitSQLParens?(): boolean;\n}\n\nexport function isSQLWrapper(value: unknown): value is SQLWrapper {\n\treturn value !== null && value !== undefined && typeof (value as any).getSQL === 'function';\n}\n\nfunction mergeQueries(queries: QueryWithTypings[]): QueryWithTypings {\n\tconst result: QueryWithTypings = { sql: '', params: [] };\n\tfor (const query of queries) {\n\t\tresult.sql += query.sql;\n\t\tresult.params.push(...query.params);\n\t\tif (query.typings?.length) {\n\t\t\tif (!result.typings) {\n\t\t\t\tresult.typings = [];\n\t\t\t}\n\t\t\tresult.typings.push(...query.typings);\n\t\t}\n\t}\n\treturn result;\n}\n\nexport class StringChunk implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'StringChunk';\n\n\treadonly value: string[];\n\n\tconstructor(value: string | string[]) {\n\t\tthis.value = Array.isArray(value) ? value : [value];\n\t}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\nexport class SQL implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'SQL';\n\n\tdeclare _: {\n\t\tbrand: 'SQL';\n\t\ttype: T;\n\t};\n\n\t/** @internal */\n\tdecoder: DriverValueDecoder = noopDecoder;\n\tprivate shouldInlineParams = false;\n\n\t/** @internal */\n\tusedTables: string[] = [];\n\n\tconstructor(readonly queryChunks: SQLChunk[]) {\n\t\tfor (const chunk of queryChunks) {\n\t\t\tif (is(chunk, Table)) {\n\t\t\t\tconst schemaName = chunk[Table.Symbol.Schema];\n\n\t\t\t\tthis.usedTables.push(\n\t\t\t\t\tschemaName === undefined\n\t\t\t\t\t\t? chunk[Table.Symbol.Name]\n\t\t\t\t\t\t: schemaName + '.' + chunk[Table.Symbol.Name],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tappend(query: SQL): this {\n\t\tthis.queryChunks.push(...query.queryChunks);\n\t\treturn this;\n\t}\n\n\ttoQuery(config: BuildQueryConfig): QueryWithTypings {\n\t\treturn tracer.startActiveSpan('drizzle.buildSQL', (span) => {\n\t\t\tconst query = this.buildQueryFromSourceParams(this.queryChunks, config);\n\t\t\tspan?.setAttributes({\n\t\t\t\t'drizzle.query.text': query.sql,\n\t\t\t\t'drizzle.query.params': JSON.stringify(query.params),\n\t\t\t});\n\t\t\treturn query;\n\t\t});\n\t}\n\n\tbuildQueryFromSourceParams(chunks: SQLChunk[], _config: BuildQueryConfig): Query {\n\t\tconst config = Object.assign({}, _config, {\n\t\t\tinlineParams: _config.inlineParams || this.shouldInlineParams,\n\t\t\tparamStartIndex: _config.paramStartIndex || { value: 0 },\n\t\t});\n\n\t\tconst {\n\t\t\tcasing,\n\t\t\tescapeName,\n\t\t\tescapeParam,\n\t\t\tprepareTyping,\n\t\t\tinlineParams,\n\t\t\tparamStartIndex,\n\t\t} = config;\n\n\t\treturn mergeQueries(chunks.map((chunk): QueryWithTypings => {\n\t\t\tif (is(chunk, StringChunk)) {\n\t\t\t\treturn { sql: chunk.value.join(''), params: [] };\n\t\t\t}\n\n\t\t\tif (is(chunk, Name)) {\n\t\t\t\treturn { sql: escapeName(chunk.value), params: [] };\n\t\t\t}\n\n\t\t\tif (chunk === undefined) {\n\t\t\t\treturn { sql: '', params: [] };\n\t\t\t}\n\n\t\t\tif (Array.isArray(chunk)) {\n\t\t\t\tconst result: SQLChunk[] = [new StringChunk('(')];\n\t\t\t\tfor (const [i, p] of chunk.entries()) {\n\t\t\t\t\tresult.push(p);\n\t\t\t\t\tif (i < chunk.length - 1) {\n\t\t\t\t\t\tresult.push(new StringChunk(', '));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult.push(new StringChunk(')'));\n\t\t\t\treturn this.buildQueryFromSourceParams(result, config);\n\t\t\t}\n\n\t\t\tif (is(chunk, SQL)) {\n\t\t\t\treturn this.buildQueryFromSourceParams(chunk.queryChunks, {\n\t\t\t\t\t...config,\n\t\t\t\t\tinlineParams: inlineParams || chunk.shouldInlineParams,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (is(chunk, Table)) {\n\t\t\t\tconst schemaName = chunk[Table.Symbol.Schema];\n\t\t\t\tconst tableName = chunk[Table.Symbol.Name];\n\t\t\t\treturn {\n\t\t\t\t\tsql: schemaName === undefined || chunk[IsAlias]\n\t\t\t\t\t\t? escapeName(tableName)\n\t\t\t\t\t\t: escapeName(schemaName) + '.' + escapeName(tableName),\n\t\t\t\t\tparams: [],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (is(chunk, Column)) {\n\t\t\t\tconst columnName = casing.getColumnCasing(chunk);\n\t\t\t\tif (_config.invokeSource === 'indexes') {\n\t\t\t\t\treturn { sql: escapeName(columnName), params: [] };\n\t\t\t\t}\n\n\t\t\t\tconst schemaName = chunk.table[Table.Symbol.Schema];\n\t\t\t\treturn {\n\t\t\t\t\tsql: chunk.table[IsAlias] || schemaName === undefined\n\t\t\t\t\t\t? escapeName(chunk.table[Table.Symbol.Name]) + '.' + escapeName(columnName)\n\t\t\t\t\t\t: escapeName(schemaName) + '.' + escapeName(chunk.table[Table.Symbol.Name]) + '.'\n\t\t\t\t\t\t\t+ escapeName(columnName),\n\t\t\t\t\tparams: [],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (is(chunk, View)) {\n\t\t\t\tconst schemaName = chunk[ViewBaseConfig].schema;\n\t\t\t\tconst viewName = chunk[ViewBaseConfig].name;\n\t\t\t\treturn {\n\t\t\t\t\tsql: schemaName === undefined || chunk[ViewBaseConfig].isAlias\n\t\t\t\t\t\t? escapeName(viewName)\n\t\t\t\t\t\t: escapeName(schemaName) + '.' + escapeName(viewName),\n\t\t\t\t\tparams: [],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (is(chunk, Param)) {\n\t\t\t\tif (is(chunk.value, Placeholder)) {\n\t\t\t\t\treturn { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ['none'] };\n\t\t\t\t}\n\n\t\t\t\tconst mappedValue = chunk.value === null ? null : chunk.encoder.mapToDriverValue(chunk.value);\n\n\t\t\t\tif (is(mappedValue, SQL)) {\n\t\t\t\t\treturn this.buildQueryFromSourceParams([mappedValue], config);\n\t\t\t\t}\n\n\t\t\t\tif (inlineParams) {\n\t\t\t\t\treturn { sql: this.mapInlineParam(mappedValue, config), params: [] };\n\t\t\t\t}\n\n\t\t\t\tlet typings: QueryTypingsValue[] = ['none'];\n\t\t\t\tif (prepareTyping) {\n\t\t\t\t\ttypings = [prepareTyping(chunk.encoder)];\n\t\t\t\t}\n\n\t\t\t\treturn { sql: escapeParam(paramStartIndex.value++, mappedValue), params: [mappedValue], typings };\n\t\t\t}\n\n\t\t\tif (is(chunk, Placeholder)) {\n\t\t\t\treturn { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ['none'] };\n\t\t\t}\n\n\t\t\tif (is(chunk, SQL.Aliased) && chunk.fieldAlias !== undefined) {\n\t\t\t\treturn { sql: escapeName(chunk.fieldAlias), params: [] };\n\t\t\t}\n\n\t\t\tif (is(chunk, Subquery)) {\n\t\t\t\tif (chunk._.isWith) {\n\t\t\t\t\treturn { sql: escapeName(chunk._.alias), params: [] };\n\t\t\t\t}\n\t\t\t\treturn this.buildQueryFromSourceParams([\n\t\t\t\t\tnew StringChunk('('),\n\t\t\t\t\tchunk._.sql,\n\t\t\t\t\tnew StringChunk(') '),\n\t\t\t\t\tnew Name(chunk._.alias),\n\t\t\t\t], config);\n\t\t\t}\n\n\t\t\tif (isPgEnum(chunk)) {\n\t\t\t\tif (chunk.schema) {\n\t\t\t\t\treturn { sql: escapeName(chunk.schema) + '.' + escapeName(chunk.enumName), params: [] };\n\t\t\t\t}\n\t\t\t\treturn { sql: escapeName(chunk.enumName), params: [] };\n\t\t\t}\n\n\t\t\tif (isSQLWrapper(chunk)) {\n\t\t\t\tif (chunk.shouldOmitSQLParens?.()) {\n\t\t\t\t\treturn this.buildQueryFromSourceParams([chunk.getSQL()], config);\n\t\t\t\t}\n\t\t\t\treturn this.buildQueryFromSourceParams([\n\t\t\t\t\tnew StringChunk('('),\n\t\t\t\t\tchunk.getSQL(),\n\t\t\t\t\tnew StringChunk(')'),\n\t\t\t\t], config);\n\t\t\t}\n\n\t\t\tif (inlineParams) {\n\t\t\t\treturn { sql: this.mapInlineParam(chunk, config), params: [] };\n\t\t\t}\n\n\t\t\treturn { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ['none'] };\n\t\t}));\n\t}\n\n\tprivate mapInlineParam(\n\t\tchunk: unknown,\n\t\t{ escapeString }: BuildQueryConfig,\n\t): string {\n\t\tif (chunk === null) {\n\t\t\treturn 'null';\n\t\t}\n\t\tif (typeof chunk === 'number' || typeof chunk === 'boolean') {\n\t\t\treturn chunk.toString();\n\t\t}\n\t\tif (typeof chunk === 'string') {\n\t\t\treturn escapeString(chunk);\n\t\t}\n\t\tif (typeof chunk === 'object') {\n\t\t\tconst mappedValueAsString = chunk.toString();\n\t\t\tif (mappedValueAsString === '[object Object]') {\n\t\t\t\treturn escapeString(JSON.stringify(chunk));\n\t\t\t}\n\t\t\treturn escapeString(mappedValueAsString);\n\t\t}\n\t\tthrow new Error('Unexpected param value: ' + chunk);\n\t}\n\n\tgetSQL(): SQL {\n\t\treturn this;\n\t}\n\n\tas(alias: string): SQL.Aliased;\n\t/**\n\t * @deprecated\n\t * Use ``sql`query`.as(alias)`` instead.\n\t */\n\tas(): SQL;\n\t/**\n\t * @deprecated\n\t * Use ``sql`query`.as(alias)`` instead.\n\t */\n\tas(alias: string): SQL.Aliased;\n\tas(alias?: string): SQL | SQL.Aliased {\n\t\t// TODO: remove with deprecated overloads\n\t\tif (alias === undefined) {\n\t\t\treturn this;\n\t\t}\n\n\t\treturn new SQL.Aliased(this, alias);\n\t}\n\n\tmapWith<\n\t\tTDecoder extends\n\t\t\t| DriverValueDecoder\n\t\t\t| DriverValueDecoder['mapFromDriverValue'],\n\t>(decoder: TDecoder): SQL> {\n\t\tthis.decoder = typeof decoder === 'function' ? { mapFromDriverValue: decoder } : decoder;\n\t\treturn this as SQL>;\n\t}\n\n\tinlineParams(): this {\n\t\tthis.shouldInlineParams = true;\n\t\treturn this;\n\t}\n\n\t/**\n\t * This method is used to conditionally include a part of the query.\n\t *\n\t * @param condition - Condition to check\n\t * @returns itself if the condition is `true`, otherwise `undefined`\n\t */\n\tif(condition: any | undefined): this | undefined {\n\t\treturn condition ? this : undefined;\n\t}\n}\n\nexport type GetDecoderResult = T extends Column ? T['_']['data'] : T extends\n\t| DriverValueDecoder\n\t| DriverValueDecoder['mapFromDriverValue'] ? TData\n: never;\n\n/**\n * Any DB name (table, column, index etc.)\n */\nexport class Name implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Name';\n\n\tprotected brand!: 'Name';\n\n\tconstructor(readonly value: string) {}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\n/**\n * Any DB name (table, column, index etc.)\n * @deprecated Use `sql.identifier` instead.\n */\nexport function name(value: string): Name {\n\treturn new Name(value);\n}\n\nexport interface DriverValueDecoder {\n\tmapFromDriverValue(value: TDriverParam): TData;\n}\n\nexport interface DriverValueEncoder {\n\tmapToDriverValue(value: TData): TDriverParam | SQL;\n}\n\nexport function isDriverValueEncoder(value: unknown): value is DriverValueEncoder {\n\treturn typeof value === 'object' && value !== null && 'mapToDriverValue' in value\n\t\t&& typeof (value as any).mapToDriverValue === 'function';\n}\n\nexport const noopDecoder: DriverValueDecoder = {\n\tmapFromDriverValue: (value) => value,\n};\n\nexport const noopEncoder: DriverValueEncoder = {\n\tmapToDriverValue: (value) => value,\n};\n\nexport interface DriverValueMapper\n\textends DriverValueDecoder, DriverValueEncoder\n{}\n\nexport const noopMapper: DriverValueMapper = {\n\t...noopDecoder,\n\t...noopEncoder,\n};\n\n/** Parameter value that is optionally bound to an encoder (for example, a column). */\nexport class Param implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Param';\n\n\tprotected brand!: 'BoundParamValue';\n\n\t/**\n\t * @param value - Parameter value\n\t * @param encoder - Encoder to convert the value to a driver parameter\n\t */\n\tconstructor(\n\t\treadonly value: TDataType,\n\t\treadonly encoder: DriverValueEncoder = noopEncoder,\n\t) {}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\n/** @deprecated Use `sql.param` instead. */\nexport function param(\n\tvalue: TData,\n\tencoder?: DriverValueEncoder,\n): Param {\n\treturn new Param(value, encoder);\n}\n\n/**\n * Anything that can be passed to the `` sql`...` `` tagged function.\n */\nexport type SQLChunk =\n\t| StringChunk\n\t| SQLChunk[]\n\t| SQLWrapper\n\t| SQL\n\t| Table\n\t| View\n\t| Subquery\n\t| AnyColumn\n\t| Param\n\t| Name\n\t| undefined\n\t| FakePrimitiveParam\n\t| Placeholder;\n\nexport function sql(strings: TemplateStringsArray, ...params: any[]): SQL;\n/*\n\tThe type of `params` is specified as `SQLChunk[]`, but that's slightly incorrect -\n\tin runtime, users won't pass `FakePrimitiveParam` instances as `params` - they will pass primitive values\n\twhich will be wrapped in `Param`. That's why the overload specifies `params` as `any[]` and not as `SQLSourceParam[]`.\n\tThis type is used to make our lives easier and the type checker happy.\n*/\nexport function sql(strings: TemplateStringsArray, ...params: SQLChunk[]): SQL {\n\tconst queryChunks: SQLChunk[] = [];\n\tif (params.length > 0 || (strings.length > 0 && strings[0] !== '')) {\n\t\tqueryChunks.push(new StringChunk(strings[0]!));\n\t}\n\tfor (const [paramIndex, param] of params.entries()) {\n\t\tqueryChunks.push(param, new StringChunk(strings[paramIndex + 1]!));\n\t}\n\n\treturn new SQL(queryChunks);\n}\n\nexport namespace sql {\n\texport function empty(): SQL {\n\t\treturn new SQL([]);\n\t}\n\n\t/** @deprecated - use `sql.join()` */\n\texport function fromList(list: SQLChunk[]): SQL {\n\t\treturn new SQL(list);\n\t}\n\n\t/**\n\t * Convenience function to create an SQL query from a raw string.\n\t * @param str The raw SQL query string.\n\t */\n\texport function raw(str: string): SQL {\n\t\treturn new SQL([new StringChunk(str)]);\n\t}\n\n\t/**\n\t * Join a list of SQL chunks with a separator.\n\t * @example\n\t * ```ts\n\t * const query = sql.join([sql`a`, sql`b`, sql`c`]);\n\t * // sql`abc`\n\t * ```\n\t * @example\n\t * ```ts\n\t * const query = sql.join([sql`a`, sql`b`, sql`c`], sql`, `);\n\t * // sql`a, b, c`\n\t * ```\n\t */\n\texport function join(chunks: SQLChunk[], separator?: SQLChunk): SQL {\n\t\tconst result: SQLChunk[] = [];\n\t\tfor (const [i, chunk] of chunks.entries()) {\n\t\t\tif (i > 0 && separator !== undefined) {\n\t\t\t\tresult.push(separator);\n\t\t\t}\n\t\t\tresult.push(chunk);\n\t\t}\n\t\treturn new SQL(result);\n\t}\n\n\t/**\n\t * Create a SQL chunk that represents a DB identifier (table, column, index etc.).\n\t * When used in a query, the identifier will be escaped based on the DB engine.\n\t * For example, in PostgreSQL, identifiers are escaped with double quotes.\n\t *\n\t * **WARNING: This function does not offer any protection against SQL injections, so you must validate any user input beforehand.**\n\t *\n\t * @example ```ts\n\t * const query = sql`SELECT * FROM ${sql.identifier('my-table')}`;\n\t * // 'SELECT * FROM \"my-table\"'\n\t * ```\n\t */\n\texport function identifier(value: string): Name {\n\t\treturn new Name(value);\n\t}\n\n\texport function placeholder(name: TName): Placeholder {\n\t\treturn new Placeholder(name);\n\t}\n\n\texport function param(\n\t\tvalue: TData,\n\t\tencoder?: DriverValueEncoder,\n\t): Param {\n\t\treturn new Param(value, encoder);\n\t}\n}\n\nexport namespace SQL {\n\texport class Aliased implements SQLWrapper {\n\t\tstatic readonly [entityKind]: string = 'SQL.Aliased';\n\n\t\tdeclare _: {\n\t\t\tbrand: 'SQL.Aliased';\n\t\t\ttype: T;\n\t\t};\n\n\t\t/** @internal */\n\t\tisSelectionField = false;\n\n\t\tconstructor(\n\t\t\treadonly sql: SQL,\n\t\t\treadonly fieldAlias: string,\n\t\t) {}\n\n\t\tgetSQL(): SQL {\n\t\t\treturn this.sql;\n\t\t}\n\n\t\t/** @internal */\n\t\tclone() {\n\t\t\treturn new Aliased(this.sql, this.fieldAlias);\n\t\t}\n\t}\n}\n\nexport class Placeholder implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Placeholder';\n\n\tdeclare protected: TValue;\n\n\tconstructor(readonly name: TName) {}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\n/** @deprecated Use `sql.placeholder` instead. */\nexport function placeholder(name: TName): Placeholder {\n\treturn new Placeholder(name);\n}\n\nexport function fillPlaceholders(params: unknown[], values: Record): unknown[] {\n\treturn params.map((p) => {\n\t\tif (is(p, Placeholder)) {\n\t\t\tif (!(p.name in values)) {\n\t\t\t\tthrow new Error(`No value for placeholder \"${p.name}\" was provided`);\n\t\t\t}\n\n\t\t\treturn values[p.name];\n\t\t}\n\n\t\tif (is(p, Param) && is(p.value, Placeholder)) {\n\t\t\tif (!(p.value.name in values)) {\n\t\t\t\tthrow new Error(`No value for placeholder \"${p.value.name}\" was provided`);\n\t\t\t}\n\n\t\t\treturn p.encoder.mapToDriverValue(values[p.value.name]);\n\t\t}\n\n\t\treturn p;\n\t});\n}\n\nexport type ColumnsSelection = Record;\n\nconst IsDrizzleView = Symbol.for('drizzle:IsDrizzleView');\n\nexport abstract class View<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n\tTSelection extends ColumnsSelection = ColumnsSelection,\n> implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'View';\n\n\tdeclare _: {\n\t\tbrand: 'View';\n\t\tviewBrand: string;\n\t\tname: TName;\n\t\texisting: TExisting;\n\t\tselectedFields: TSelection;\n\t};\n\n\t/** @internal */\n\t[ViewBaseConfig]: {\n\t\tname: TName;\n\t\toriginalName: TName;\n\t\tschema: string | undefined;\n\t\tselectedFields: ColumnsSelection;\n\t\tisExisting: TExisting;\n\t\tquery: TExisting extends true ? undefined : SQL;\n\t\tisAlias: boolean;\n\t};\n\n\t/** @internal */\n\t[IsDrizzleView] = true;\n\n\tdeclare readonly $inferSelect: InferSelectViewModel, TExisting, TSelection>>;\n\n\tconstructor(\n\t\t{ name, schema, selectedFields, query }: {\n\t\t\tname: TName;\n\t\t\tschema: string | undefined;\n\t\t\tselectedFields: ColumnsSelection;\n\t\t\tquery: SQL | undefined;\n\t\t},\n\t) {\n\t\tthis[ViewBaseConfig] = {\n\t\t\tname,\n\t\t\toriginalName: name,\n\t\t\tschema,\n\t\t\tselectedFields,\n\t\t\tquery: query as (TExisting extends true ? undefined : SQL),\n\t\t\tisExisting: !query as TExisting,\n\t\t\tisAlias: false,\n\t\t};\n\t}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\nexport function isView(view: unknown): view is View {\n\treturn typeof view === 'object' && view !== null && IsDrizzleView in view;\n}\n\nexport function getViewName(view: T): T['_']['name'] {\n\treturn view[ViewBaseConfig].name;\n}\n\nexport type InferSelectViewModel =\n\tEqual extends true ? { [x: string]: unknown }\n\t\t: SelectResult<\n\t\t\tTView['_']['selectedFields'],\n\t\t\t'single',\n\t\t\tRecord\n\t\t>;\n\n// Defined separately from the Column class to resolve circular dependency\nColumn.prototype.getSQL = function() {\n\treturn new SQL([this]);\n};\n\n// Defined separately from the Table class to resolve circular dependency\nTable.prototype.getSQL = function() {\n\treturn new SQL([this]);\n};\n\n// Defined separately from the Column class to resolve circular dependency\nSubquery.prototype.getSQL = function() {\n\treturn new SQL([this]);\n};\n", "import type { Cache } from './cache/core/cache.ts';\nimport type { AnyColumn } from './column.ts';\nimport { Column } from './column.ts';\nimport { is } from './entity.ts';\nimport type { Logger } from './logger.ts';\nimport type { SelectedFieldsOrdered } from './operations.ts';\nimport type { TableLike } from './query-builders/select.types.ts';\nimport { Param, SQL, View } from './sql/sql.ts';\nimport type { DriverValueDecoder } from './sql/sql.ts';\nimport { Subquery } from './subquery.ts';\nimport { getTableName, Table } from './table.ts';\nimport { ViewBaseConfig } from './view-common.ts';\n\n/** @internal */\nexport function mapResultRow(\n\tcolumns: SelectedFieldsOrdered,\n\trow: unknown[],\n\tjoinsNotNullableMap: Record | undefined,\n): TResult {\n\t// Key -> nested object key, value -> table name if all fields in the nested object are from the same table, false otherwise\n\tconst nullifyMap: Record = {};\n\n\tconst result = columns.reduce>(\n\t\t(result, { path, field }, columnIndex) => {\n\t\t\tlet decoder: DriverValueDecoder;\n\t\t\tif (is(field, Column)) {\n\t\t\t\tdecoder = field;\n\t\t\t} else if (is(field, SQL)) {\n\t\t\t\tdecoder = field.decoder;\n\t\t\t} else {\n\t\t\t\tdecoder = field.sql.decoder;\n\t\t\t}\n\t\t\tlet node = result;\n\t\t\tfor (const [pathChunkIndex, pathChunk] of path.entries()) {\n\t\t\t\tif (pathChunkIndex < path.length - 1) {\n\t\t\t\t\tif (!(pathChunk in node)) {\n\t\t\t\t\t\tnode[pathChunk] = {};\n\t\t\t\t\t}\n\t\t\t\t\tnode = node[pathChunk];\n\t\t\t\t} else {\n\t\t\t\t\tconst rawValue = row[columnIndex]!;\n\t\t\t\t\tconst value = node[pathChunk] = rawValue === null ? null : decoder.mapFromDriverValue(rawValue);\n\n\t\t\t\t\tif (joinsNotNullableMap && is(field, Column) && path.length === 2) {\n\t\t\t\t\t\tconst objectName = path[0]!;\n\t\t\t\t\t\tif (!(objectName in nullifyMap)) {\n\t\t\t\t\t\t\tnullifyMap[objectName] = value === null ? getTableName(field.table) : false;\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\ttypeof nullifyMap[objectName] === 'string' && nullifyMap[objectName] !== getTableName(field.table)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tnullifyMap[objectName] = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t},\n\t\t{},\n\t);\n\n\t// Nullify all nested objects from nullifyMap that are nullable\n\tif (joinsNotNullableMap && Object.keys(nullifyMap).length > 0) {\n\t\tfor (const [objectName, tableName] of Object.entries(nullifyMap)) {\n\t\t\tif (typeof tableName === 'string' && !joinsNotNullableMap[tableName]) {\n\t\t\t\tresult[objectName] = null;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result as TResult;\n}\n\n/** @internal */\nexport function orderSelectedFields(\n\tfields: Record,\n\tpathPrefix?: string[],\n): SelectedFieldsOrdered {\n\treturn Object.entries(fields).reduce>((result, [name, field]) => {\n\t\tif (typeof name !== 'string') {\n\t\t\treturn result;\n\t\t}\n\n\t\tconst newPath = pathPrefix ? [...pathPrefix, name] : [name];\n\t\tif (is(field, Column) || is(field, SQL) || is(field, SQL.Aliased)) {\n\t\t\tresult.push({ path: newPath, field });\n\t\t} else if (is(field, Table)) {\n\t\t\tresult.push(...orderSelectedFields(field[Table.Symbol.Columns], newPath));\n\t\t} else {\n\t\t\tresult.push(...orderSelectedFields(field as Record, newPath));\n\t\t}\n\t\treturn result;\n\t}, []) as SelectedFieldsOrdered;\n}\n\nexport function haveSameKeys(left: Record, right: Record) {\n\tconst leftKeys = Object.keys(left);\n\tconst rightKeys = Object.keys(right);\n\n\tif (leftKeys.length !== rightKeys.length) {\n\t\treturn false;\n\t}\n\n\tfor (const [index, key] of leftKeys.entries()) {\n\t\tif (key !== rightKeys[index]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/** @internal */\nexport function mapUpdateSet(table: Table, values: Record): UpdateSet {\n\tconst entries: [string, UpdateSet[string]][] = Object.entries(values)\n\t\t.filter(([, value]) => value !== undefined)\n\t\t.map(([key, value]) => {\n\t\t\t// eslint-disable-next-line unicorn/prefer-ternary\n\t\t\tif (is(value, SQL) || is(value, Column)) {\n\t\t\t\treturn [key, value];\n\t\t\t} else {\n\t\t\t\treturn [key, new Param(value, table[Table.Symbol.Columns][key])];\n\t\t\t}\n\t\t});\n\n\tif (entries.length === 0) {\n\t\tthrow new Error('No values to set');\n\t}\n\n\treturn Object.fromEntries(entries);\n}\n\nexport type UpdateSet = Record;\n\nexport type OneOrMany = T | T[];\n\nexport type Update =\n\t& {\n\t\t[K in Exclude]: T[K];\n\t}\n\t& TUpdate;\n\nexport type Simplify =\n\t& {\n\t\t// @ts-ignore - \"Type parameter 'K' has a circular constraint\", not sure why\n\t\t[K in keyof T]: T[K];\n\t}\n\t& {};\n\nexport type SimplifyMappedType = [T] extends [unknown] ? T : never;\n\nexport type ShallowRecord = SimplifyMappedType<{ [P in K]: T }>;\n\nexport type Assume = T extends U ? T : U;\n\nexport type Equal = (() => T extends X ? 1 : 2) extends (() => T extends Y ? 1 : 2) ? true : false;\n\nexport interface DrizzleTypeError {\n\t$drizzleTypeError: T;\n}\n\nexport type ValueOrArray = T | T[];\n\n/** @internal */\nexport function applyMixins(baseClass: any, extendedClasses: any[]) {\n\tfor (const extendedClass of extendedClasses) {\n\t\tfor (const name of Object.getOwnPropertyNames(extendedClass.prototype)) {\n\t\t\tif (name === 'constructor') continue;\n\n\t\t\tObject.defineProperty(\n\t\t\t\tbaseClass.prototype,\n\t\t\t\tname,\n\t\t\t\tObject.getOwnPropertyDescriptor(extendedClass.prototype, name) || Object.create(null),\n\t\t\t);\n\t\t}\n\t}\n}\n\nexport type Or = T1 extends true ? true : T2 extends true ? true : false;\n\nexport type IfThenElse = If extends true ? Then : Else;\n\nexport type PromiseOf = T extends Promise ? U : T;\n\nexport type Writable = {\n\t-readonly [P in keyof T]: T[P];\n};\n\nexport type NonArray = T extends any[] ? never : T;\n\nexport function getTableColumns(table: T): T['_']['columns'] {\n\treturn table[Table.Symbol.Columns];\n}\n\nexport function getViewSelectedFields(view: T): T['_']['selectedFields'] {\n\treturn view[ViewBaseConfig].selectedFields;\n}\n\n/** @internal */\nexport function getTableLikeName(table: TableLike): string | undefined {\n\treturn is(table, Subquery)\n\t\t? table._.alias\n\t\t: is(table, View)\n\t\t? table[ViewBaseConfig].name\n\t\t: is(table, SQL)\n\t\t? undefined\n\t\t: table[Table.Symbol.IsAlias]\n\t\t? table[Table.Symbol.Name]\n\t\t: table[Table.Symbol.BaseName];\n}\n\nexport type ColumnsWithTable<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends AnyColumn<{ tableName: TTableName }>[],\n> = { [Key in keyof TColumns]: AnyColumn<{ tableName: TForeignTableName }> };\n\nexport type Casing = 'snake_case' | 'camelCase';\n\nexport interface DrizzleConfig = Record> {\n\tlogger?: boolean | Logger;\n\tschema?: TSchema;\n\tcasing?: Casing;\n\tcache?: Cache;\n}\nexport type ValidateShape = T extends ValidShape\n\t? Exclude extends never ? TResult\n\t: DrizzleTypeError<\n\t\t`Invalid key(s): ${Exclude<(keyof T) & (string | number | bigint | boolean | null | undefined), keyof ValidShape>}`\n\t>\n\t: never;\n\nexport type KnownKeysOnly = {\n\t[K in keyof T]: K extends keyof U ? T[K] : never;\n};\n\nexport type IsAny = 0 extends (1 & T) ? true : false;\n\n/** @internal */\nexport function getColumnNameAndConfig<\n\tTConfig extends Record | undefined,\n>(a: string | TConfig | undefined, b: TConfig | undefined) {\n\treturn {\n\t\tname: typeof a === 'string' && a.length > 0 ? a : '' as string,\n\t\tconfig: typeof a === 'object' ? a : b as TConfig,\n\t};\n}\n\nexport type IfNotImported = unknown extends T ? Y : N;\n\nexport type ImportTypeError =\n\t`Please install \\`${TPackageName}\\` to allow Drizzle ORM to connect to the database`;\n\nexport type RequireAtLeastOne = Keys extends any\n\t? Required> & Partial>\n\t: never;\n\ntype ExpectedConfigShape = {\n\tlogger?: boolean | {\n\t\tlogQuery(query: string, params: unknown[]): void;\n\t};\n\tschema?: Record;\n\tcasing?: 'snake_case' | 'camelCase';\n};\n\n// If this errors, you must update config shape checker function with new config specs\nconst _: DrizzleConfig = {} as ExpectedConfigShape;\nconst __: ExpectedConfigShape = {} as DrizzleConfig;\n\nexport function isConfig(data: any): boolean {\n\tif (typeof data !== 'object' || data === null) return false;\n\n\tif (data.constructor.name !== 'Object') return false;\n\n\tif ('logger' in data) {\n\t\tconst type = typeof data['logger'];\n\t\tif (\n\t\t\ttype !== 'boolean' && (type !== 'object' || typeof data['logger']['logQuery'] !== 'function')\n\t\t\t&& type !== 'undefined'\n\t\t) return false;\n\n\t\treturn true;\n\t}\n\n\tif ('schema' in data) {\n\t\tconst type = typeof data['schema'];\n\t\tif (type !== 'object' && type !== 'undefined') return false;\n\n\t\treturn true;\n\t}\n\n\tif ('casing' in data) {\n\t\tconst type = typeof data['casing'];\n\t\tif (type !== 'string' && type !== 'undefined') return false;\n\n\t\treturn true;\n\t}\n\n\tif ('mode' in data) {\n\t\tif (data['mode'] !== 'default' || data['mode'] !== 'planetscale' || data['mode'] !== undefined) return false;\n\n\t\treturn true;\n\t}\n\n\tif ('connection' in data) {\n\t\tconst type = typeof data['connection'];\n\t\tif (type !== 'string' && type !== 'object' && type !== 'undefined') return false;\n\n\t\treturn true;\n\t}\n\n\tif ('client' in data) {\n\t\tconst type = typeof data['client'];\n\t\tif (type !== 'object' && type !== 'function' && type !== 'undefined') return false;\n\n\t\treturn true;\n\t}\n\n\tif (Object.keys(data).length === 0) return true;\n\n\treturn false;\n}\n\nexport type NeonAuthToken = string | (() => string | Promise);\n\nexport const textDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder();\n", "import type { BuildColumns, BuildExtraConfigColumns } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport { Table, type TableConfig as TableConfigBase, type UpdateTableConfig } from '~/table.ts';\nimport type { CheckBuilder } from './checks.ts';\nimport { getPgColumnBuilders, type PgColumnsBuilders } from './columns/all.ts';\nimport type { ExtraConfigColumn, PgColumn, PgColumnBuilder, PgColumnBuilderBase } from './columns/common.ts';\nimport type { ForeignKey, ForeignKeyBuilder } from './foreign-keys.ts';\nimport type { AnyIndexBuilder } from './indexes.ts';\nimport type { PgPolicy } from './policies.ts';\nimport type { PrimaryKeyBuilder } from './primary-keys.ts';\nimport type { UniqueConstraintBuilder } from './unique-constraint.ts';\n\nexport type PgTableExtraConfigValue =\n\t| AnyIndexBuilder\n\t| CheckBuilder\n\t| ForeignKeyBuilder\n\t| PrimaryKeyBuilder\n\t| UniqueConstraintBuilder\n\t| PgPolicy;\n\nexport type PgTableExtraConfig = Record<\n\tstring,\n\tPgTableExtraConfigValue\n>;\n\nexport type TableConfig = TableConfigBase;\n\n/** @internal */\nexport const InlineForeignKeys = Symbol.for('drizzle:PgInlineForeignKeys');\n/** @internal */\nexport const EnableRLS = Symbol.for('drizzle:EnableRLS');\n\nexport class PgTable extends Table {\n\tstatic override readonly [entityKind]: string = 'PgTable';\n\n\t/** @internal */\n\tstatic override readonly Symbol = Object.assign({}, Table.Symbol, {\n\t\tInlineForeignKeys: InlineForeignKeys as typeof InlineForeignKeys,\n\t\tEnableRLS: EnableRLS as typeof EnableRLS,\n\t});\n\n\t/**@internal */\n\t[InlineForeignKeys]: ForeignKey[] = [];\n\n\t/** @internal */\n\t[EnableRLS]: boolean = false;\n\n\t/** @internal */\n\toverride [Table.Symbol.ExtraConfigBuilder]: ((self: Record) => PgTableExtraConfig) | undefined =\n\t\tundefined;\n\n\t/** @internal */\n\toverride [Table.Symbol.ExtraConfigColumns]: Record = {};\n}\n\nexport type AnyPgTable = {}> = PgTable>;\n\nexport type PgTableWithColumns =\n\t& PgTable\n\t& {\n\t\t[Key in keyof T['columns']]: T['columns'][Key];\n\t}\n\t& {\n\t\tenableRLS: () => Omit<\n\t\t\tPgTableWithColumns,\n\t\t\t'enableRLS'\n\t\t>;\n\t};\n\n/** @internal */\nexport function pgTableWithSchema<\n\tTTableName extends string,\n\tTSchemaName extends string | undefined,\n\tTColumnsMap extends Record,\n>(\n\tname: TTableName,\n\tcolumns: TColumnsMap | ((columnTypes: PgColumnsBuilders) => TColumnsMap),\n\textraConfig:\n\t\t| ((self: BuildExtraConfigColumns) => PgTableExtraConfig | PgTableExtraConfigValue[])\n\t\t| undefined,\n\tschema: TSchemaName,\n\tbaseName = name,\n): PgTableWithColumns<{\n\tname: TTableName;\n\tschema: TSchemaName;\n\tcolumns: BuildColumns;\n\tdialect: 'pg';\n}> {\n\tconst rawTable = new PgTable<{\n\t\tname: TTableName;\n\t\tschema: TSchemaName;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>(name, schema, baseName);\n\n\tconst parsedColumns: TColumnsMap = typeof columns === 'function' ? columns(getPgColumnBuilders()) : columns;\n\n\tconst builtColumns = Object.fromEntries(\n\t\tObject.entries(parsedColumns).map(([name, colBuilderBase]) => {\n\t\t\tconst colBuilder = colBuilderBase as PgColumnBuilder;\n\t\t\tcolBuilder.setName(name);\n\t\t\tconst column = colBuilder.build(rawTable);\n\t\t\trawTable[InlineForeignKeys].push(...colBuilder.buildForeignKeys(column, rawTable));\n\t\t\treturn [name, column];\n\t\t}),\n\t) as unknown as BuildColumns;\n\n\tconst builtColumnsForExtraConfig = Object.fromEntries(\n\t\tObject.entries(parsedColumns).map(([name, colBuilderBase]) => {\n\t\t\tconst colBuilder = colBuilderBase as PgColumnBuilder;\n\t\t\tcolBuilder.setName(name);\n\t\t\tconst column = colBuilder.buildExtraConfigColumn(rawTable);\n\t\t\treturn [name, column];\n\t\t}),\n\t) as unknown as BuildExtraConfigColumns;\n\n\tconst table = Object.assign(rawTable, builtColumns);\n\n\ttable[Table.Symbol.Columns] = builtColumns;\n\ttable[Table.Symbol.ExtraConfigColumns] = builtColumnsForExtraConfig;\n\n\tif (extraConfig) {\n\t\ttable[PgTable.Symbol.ExtraConfigBuilder] = extraConfig as any;\n\t}\n\n\treturn Object.assign(table, {\n\t\tenableRLS: () => {\n\t\t\ttable[PgTable.Symbol.EnableRLS] = true;\n\t\t\treturn table as PgTableWithColumns<{\n\t\t\t\tname: TTableName;\n\t\t\t\tschema: TSchemaName;\n\t\t\t\tcolumns: BuildColumns;\n\t\t\t\tdialect: 'pg';\n\t\t\t}>;\n\t\t},\n\t});\n}\n\nexport interface PgTableFn {\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: TColumnsMap,\n\t\textraConfig?: (\n\t\t\tself: BuildExtraConfigColumns,\n\t\t) => PgTableExtraConfigValue[],\n\t): PgTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>;\n\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: (columnTypes: PgColumnsBuilders) => TColumnsMap,\n\t\textraConfig?: (self: BuildExtraConfigColumns) => PgTableExtraConfigValue[],\n\t): PgTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>;\n\t/**\n\t * @deprecated The third parameter of pgTable is changing and will only accept an array instead of an object\n\t *\n\t * @example\n\t * Deprecated version:\n\t * ```ts\n\t * export const users = pgTable(\"users\", {\n\t * \tid: integer(),\n\t * }, (t) => ({\n\t * \tidx: index('custom_name').on(t.id)\n\t * }));\n\t * ```\n\t *\n\t * New API:\n\t * ```ts\n\t * export const users = pgTable(\"users\", {\n\t * \tid: integer(),\n\t * }, (t) => [\n\t * \tindex('custom_name').on(t.id)\n\t * ]);\n\t * ```\n\t */\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: TColumnsMap,\n\t\textraConfig: (\n\t\t\tself: BuildExtraConfigColumns,\n\t\t) => PgTableExtraConfig,\n\t): PgTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>;\n\n\t/**\n\t * @deprecated The third parameter of pgTable is changing and will only accept an array instead of an object\n\t *\n\t * @example\n\t * Deprecated version:\n\t * ```ts\n\t * export const users = pgTable(\"users\", {\n\t * \tid: integer(),\n\t * }, (t) => ({\n\t * \tidx: index('custom_name').on(t.id)\n\t * }));\n\t * ```\n\t *\n\t * New API:\n\t * ```ts\n\t * export const users = pgTable(\"users\", {\n\t * \tid: integer(),\n\t * }, (t) => [\n\t * \tindex('custom_name').on(t.id)\n\t * ]);\n\t * ```\n\t */\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: (columnTypes: PgColumnsBuilders) => TColumnsMap,\n\t\textraConfig: (self: BuildExtraConfigColumns) => PgTableExtraConfig,\n\t): PgTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>;\n}\n\nexport const pgTable: PgTableFn = (name, columns, extraConfig) => {\n\treturn pgTableWithSchema(name, columns, extraConfig, undefined);\n};\n\nexport function pgTableCreator(customizeTableName: (name: string) => string): PgTableFn {\n\treturn (name, columns, extraConfig) => {\n\t\treturn pgTableWithSchema(customizeTableName(name) as typeof name, columns, extraConfig, undefined, name);\n\t};\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { AnyPgColumn, PgColumn } from './columns/index.ts';\nimport { PgTable } from './table.ts';\n\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumn extends AnyPgColumn<{ tableName: TTableName }>,\n\tTColumns extends AnyPgColumn<{ tableName: TTableName }>[],\n>(config: { name?: string; columns: [TColumn, ...TColumns] }): PrimaryKeyBuilder;\n/**\n * @deprecated: Please use primaryKey({ columns: [] }) instead of this function\n * @param columns\n */\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumns extends AnyPgColumn<{ tableName: TTableName }>[],\n>(...columns: TColumns): PrimaryKeyBuilder;\nexport function primaryKey(...config: any) {\n\tif (config[0].columns) {\n\t\treturn new PrimaryKeyBuilder(config[0].columns, config[0].name);\n\t}\n\treturn new PrimaryKeyBuilder(config);\n}\n\nexport class PrimaryKeyBuilder {\n\tstatic readonly [entityKind]: string = 'PgPrimaryKeyBuilder';\n\n\t/** @internal */\n\tcolumns: PgColumn[];\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tcolumns: PgColumn[],\n\t\tname?: string,\n\t) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\t/** @internal */\n\tbuild(table: PgTable): PrimaryKey {\n\t\treturn new PrimaryKey(table, this.columns, this.name);\n\t}\n}\n\nexport class PrimaryKey {\n\tstatic readonly [entityKind]: string = 'PgPrimaryKey';\n\n\treadonly columns: AnyPgColumn<{}>[];\n\treadonly name?: string;\n\n\tconstructor(readonly table: PgTable, columns: AnyPgColumn<{}>[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\tgetName(): string {\n\t\treturn this.name ?? `${this.table[PgTable.Symbol.Name]}_${this.columns.map((column) => column.name).join('_')}_pk`;\n\t}\n}\n", "import { type AnyColumn, Column, type GetColumnData } from '~/column.ts';\nimport { is } from '~/entity.ts';\nimport { Table } from '~/table.ts';\nimport {\n\tisDriverValueEncoder,\n\tisSQLWrapper,\n\tParam,\n\tPlaceholder,\n\tSQL,\n\tsql,\n\ttype SQLChunk,\n\ttype SQLWrapper,\n\tStringChunk,\n\tView,\n} from '../sql.ts';\n\nexport function bindIfParam(value: unknown, column: SQLWrapper): SQLChunk {\n\tif (\n\t\tisDriverValueEncoder(column)\n\t\t&& !isSQLWrapper(value)\n\t\t&& !is(value, Param)\n\t\t&& !is(value, Placeholder)\n\t\t&& !is(value, Column)\n\t\t&& !is(value, Table)\n\t\t&& !is(value, View)\n\t) {\n\t\treturn new Param(value, column);\n\t}\n\treturn value as SQLChunk;\n}\n\nexport interface BinaryOperator {\n\t(\n\t\tleft: TColumn,\n\t\tright: GetColumnData | SQLWrapper,\n\t): SQL;\n\t(left: SQL.Aliased, right: T | SQLWrapper): SQL;\n\t(\n\t\tleft: Exclude,\n\t\tright: unknown,\n\t): SQL;\n}\n\n/**\n * Test that two values are equal.\n *\n * Remember that the SQL standard dictates that\n * two NULL values are not equal, so if you want to test\n * whether a value is null, you may want to use\n * `isNull` instead.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made by Ford\n * db.select().from(cars)\n * .where(eq(cars.make, 'Ford'))\n * ```\n *\n * @see isNull for a way to test equality to NULL.\n */\nexport const eq: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} = ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test that two values are not equal.\n *\n * Remember that the SQL standard dictates that\n * two NULL values are not equal, so if you want to test\n * whether a value is not null, you may want to use\n * `isNotNull` instead.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars not made by Ford\n * db.select().from(cars)\n * .where(ne(cars.make, 'Ford'))\n * ```\n *\n * @see isNotNull for a way to test whether a value is not null.\n */\nexport const ne: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} <> ${bindIfParam(right, left)}`;\n};\n\n/**\n * Combine a list of conditions with the `and` operator. Conditions\n * that are equal `undefined` are automatically ignored.\n *\n * ## Examples\n *\n * ```ts\n * db.select().from(cars)\n * .where(\n * and(\n * eq(cars.make, 'Volvo'),\n * eq(cars.year, 1950),\n * )\n * )\n * ```\n */\nexport function and(...conditions: (SQLWrapper | undefined)[]): SQL | undefined;\nexport function and(\n\t...unfilteredConditions: (SQLWrapper | undefined)[]\n): SQL | undefined {\n\tconst conditions = unfilteredConditions.filter(\n\t\t(c): c is Exclude => c !== undefined,\n\t);\n\n\tif (conditions.length === 0) {\n\t\treturn undefined;\n\t}\n\n\tif (conditions.length === 1) {\n\t\treturn new SQL(conditions);\n\t}\n\n\treturn new SQL([\n\t\tnew StringChunk('('),\n\t\tsql.join(conditions, new StringChunk(' and ')),\n\t\tnew StringChunk(')'),\n\t]);\n}\n\n/**\n * Combine a list of conditions with the `or` operator. Conditions\n * that are equal `undefined` are automatically ignored.\n *\n * ## Examples\n *\n * ```ts\n * db.select().from(cars)\n * .where(\n * or(\n * eq(cars.make, 'GM'),\n * eq(cars.make, 'Ford'),\n * )\n * )\n * ```\n */\nexport function or(...conditions: (SQLWrapper | undefined)[]): SQL | undefined;\nexport function or(\n\t...unfilteredConditions: (SQLWrapper | undefined)[]\n): SQL | undefined {\n\tconst conditions = unfilteredConditions.filter(\n\t\t(c): c is Exclude => c !== undefined,\n\t);\n\n\tif (conditions.length === 0) {\n\t\treturn undefined;\n\t}\n\n\tif (conditions.length === 1) {\n\t\treturn new SQL(conditions);\n\t}\n\n\treturn new SQL([\n\t\tnew StringChunk('('),\n\t\tsql.join(conditions, new StringChunk(' or ')),\n\t\tnew StringChunk(')'),\n\t]);\n}\n\n/**\n * Negate the meaning of an expression using the `not` keyword.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars _not_ made by GM or Ford.\n * db.select().from(cars)\n * .where(not(inArray(cars.make, ['GM', 'Ford'])))\n * ```\n */\nexport function not(condition: SQLWrapper): SQL {\n\treturn sql`not ${condition}`;\n}\n\n/**\n * Test that the first expression passed is greater than\n * the second expression.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made after 2000.\n * db.select().from(cars)\n * .where(gt(cars.year, 2000))\n * ```\n *\n * @see gte for greater-than-or-equal\n */\nexport const gt: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} > ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test that the first expression passed is greater than\n * or equal to the second expression. Use `gt` to\n * test whether an expression is strictly greater\n * than another.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made on or after 2000.\n * db.select().from(cars)\n * .where(gte(cars.year, 2000))\n * ```\n *\n * @see gt for a strictly greater-than condition\n */\nexport const gte: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} >= ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test that the first expression passed is less than\n * the second expression.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made before 2000.\n * db.select().from(cars)\n * .where(lt(cars.year, 2000))\n * ```\n *\n * @see lte for less-than-or-equal\n */\nexport const lt: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} < ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test that the first expression passed is less than\n * or equal to the second expression.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made before 2000.\n * db.select().from(cars)\n * .where(lte(cars.year, 2000))\n * ```\n *\n * @see lt for a strictly less-than condition\n */\nexport const lte: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} <= ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test whether the first parameter, a column or expression,\n * has a value from a list passed as the second argument.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made by Ford or GM.\n * db.select().from(cars)\n * .where(inArray(cars.make, ['Ford', 'GM']))\n * ```\n *\n * @see notInArray for the inverse of this test\n */\nexport function inArray(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function inArray(\n\tcolumn: TColumn,\n\tvalues: ReadonlyArray | Placeholder> | SQLWrapper,\n): SQL;\nexport function inArray(\n\tcolumn: Exclude,\n\tvalues: ReadonlyArray | SQLWrapper,\n): SQL;\nexport function inArray(\n\tcolumn: SQLWrapper,\n\tvalues: ReadonlyArray | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\treturn sql`false`;\n\t\t}\n\t\treturn sql`${column} in ${values.map((v) => bindIfParam(v, column))}`;\n\t}\n\n\treturn sql`${column} in ${bindIfParam(values, column)}`;\n}\n\n/**\n * Test whether the first parameter, a column or expression,\n * has a value that is not present in a list passed as the\n * second argument.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made by any company except Ford or GM.\n * db.select().from(cars)\n * .where(notInArray(cars.make, ['Ford', 'GM']))\n * ```\n *\n * @see inArray for the inverse of this test\n */\nexport function notInArray(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function notInArray(\n\tcolumn: TColumn,\n\tvalues: (GetColumnData | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function notInArray(\n\tcolumn: Exclude,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function notInArray(\n\tcolumn: SQLWrapper,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\treturn sql`true`;\n\t\t}\n\t\treturn sql`${column} not in ${values.map((v) => bindIfParam(v, column))}`;\n\t}\n\n\treturn sql`${column} not in ${bindIfParam(values, column)}`;\n}\n\n/**\n * Test whether an expression is NULL. By the SQL standard,\n * NULL is neither equal nor not equal to itself, so\n * it's recommended to use `isNull` and `notIsNull` for\n * comparisons to NULL.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars that have no discontinuedAt date.\n * db.select().from(cars)\n * .where(isNull(cars.discontinuedAt))\n * ```\n *\n * @see isNotNull for the inverse of this test\n */\nexport function isNull(value: SQLWrapper): SQL {\n\treturn sql`${value} is null`;\n}\n\n/**\n * Test whether an expression is not NULL. By the SQL standard,\n * NULL is neither equal nor not equal to itself, so\n * it's recommended to use `isNull` and `notIsNull` for\n * comparisons to NULL.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars that have been discontinued.\n * db.select().from(cars)\n * .where(isNotNull(cars.discontinuedAt))\n * ```\n *\n * @see isNull for the inverse of this test\n */\nexport function isNotNull(value: SQLWrapper): SQL {\n\treturn sql`${value} is not null`;\n}\n\n/**\n * Test whether a subquery evaluates to have any rows.\n *\n * ## Examples\n *\n * ```ts\n * // Users whose `homeCity` column has a match in a cities\n * // table.\n * db\n * .select()\n * .from(users)\n * .where(\n * exists(db.select()\n * .from(cities)\n * .where(eq(users.homeCity, cities.id))),\n * );\n * ```\n *\n * @see notExists for the inverse of this test\n */\nexport function exists(subquery: SQLWrapper): SQL {\n\treturn sql`exists ${subquery}`;\n}\n\n/**\n * Test whether a subquery doesn't include any result\n * rows.\n *\n * ## Examples\n *\n * ```ts\n * // Users whose `homeCity` column doesn't match\n * // a row in the cities table.\n * db\n * .select()\n * .from(users)\n * .where(\n * notExists(db.select()\n * .from(cities)\n * .where(eq(users.homeCity, cities.id))),\n * );\n * ```\n *\n * @see exists for the inverse of this test\n */\nexport function notExists(subquery: SQLWrapper): SQL {\n\treturn sql`not exists ${subquery}`;\n}\n\n/**\n * Test whether an expression is between two values. This\n * is an easier way to express range tests, which would be\n * expressed mathematically as `x <= a <= y` but in SQL\n * would have to be like `a >= x AND a <= y`.\n *\n * Between is inclusive of the endpoints: if `column`\n * is equal to `min` or `max`, it will be TRUE.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made between 1990 and 2000\n * db.select().from(cars)\n * .where(between(cars.year, 1990, 2000))\n * ```\n *\n * @see notBetween for the inverse of this test\n */\nexport function between(\n\tcolumn: SQL.Aliased,\n\tmin: T | SQLWrapper,\n\tmax: T | SQLWrapper,\n): SQL;\nexport function between(\n\tcolumn: TColumn,\n\tmin: GetColumnData | SQLWrapper,\n\tmax: GetColumnData | SQLWrapper,\n): SQL;\nexport function between(\n\tcolumn: Exclude,\n\tmin: unknown,\n\tmax: unknown,\n): SQL;\nexport function between(column: SQLWrapper, min: unknown, max: unknown): SQL {\n\treturn sql`${column} between ${bindIfParam(min, column)} and ${\n\t\tbindIfParam(\n\t\t\tmax,\n\t\t\tcolumn,\n\t\t)\n\t}`;\n}\n\n/**\n * Test whether an expression is not between two values.\n *\n * This, like `between`, includes its endpoints, so if\n * the `column` is equal to `min` or `max`, in this case\n * it will evaluate to FALSE.\n *\n * ## Examples\n *\n * ```ts\n * // Exclude cars made in the 1970s\n * db.select().from(cars)\n * .where(notBetween(cars.year, 1970, 1979))\n * ```\n *\n * @see between for the inverse of this test\n */\nexport function notBetween(\n\tcolumn: SQL.Aliased,\n\tmin: T | SQLWrapper,\n\tmax: T | SQLWrapper,\n): SQL;\nexport function notBetween(\n\tcolumn: TColumn,\n\tmin: GetColumnData | SQLWrapper,\n\tmax: GetColumnData | SQLWrapper,\n): SQL;\nexport function notBetween(\n\tcolumn: Exclude,\n\tmin: unknown,\n\tmax: unknown,\n): SQL;\nexport function notBetween(\n\tcolumn: SQLWrapper,\n\tmin: unknown,\n\tmax: unknown,\n): SQL {\n\treturn sql`${column} not between ${\n\t\tbindIfParam(\n\t\t\tmin,\n\t\t\tcolumn,\n\t\t)\n\t} and ${bindIfParam(max, column)}`;\n}\n\n/**\n * Compare a column to a pattern, which can include `%` and `_`\n * characters to match multiple variations. Including `%`\n * in the pattern matches zero or more characters, and including\n * `_` will match a single character.\n *\n * ## Examples\n *\n * ```ts\n * // Select all cars with 'Turbo' in their names.\n * db.select().from(cars)\n * .where(like(cars.name, '%Turbo%'))\n * ```\n *\n * @see ilike for a case-insensitive version of this condition\n */\nexport function like(column: Column | SQL.Aliased | SQL, value: string | SQLWrapper): SQL {\n\treturn sql`${column} like ${value}`;\n}\n\n/**\n * The inverse of like - this tests that a given column\n * does not match a pattern, which can include `%` and `_`\n * characters to match multiple variations. Including `%`\n * in the pattern matches zero or more characters, and including\n * `_` will match a single character.\n *\n * ## Examples\n *\n * ```ts\n * // Select all cars that don't have \"ROver\" in their name.\n * db.select().from(cars)\n * .where(notLike(cars.name, '%Rover%'))\n * ```\n *\n * @see like for the inverse condition\n * @see notIlike for a case-insensitive version of this condition\n */\nexport function notLike(column: Column | SQL.Aliased | SQL, value: string | SQLWrapper): SQL {\n\treturn sql`${column} not like ${value}`;\n}\n\n/**\n * Case-insensitively compare a column to a pattern,\n * which can include `%` and `_`\n * characters to match multiple variations. Including `%`\n * in the pattern matches zero or more characters, and including\n * `_` will match a single character.\n *\n * Unlike like, this performs a case-insensitive comparison.\n *\n * ## Examples\n *\n * ```ts\n * // Select all cars with 'Turbo' in their names.\n * db.select().from(cars)\n * .where(ilike(cars.name, '%Turbo%'))\n * ```\n *\n * @see like for a case-sensitive version of this condition\n */\nexport function ilike(column: Column | SQL.Aliased | SQL, value: string | SQLWrapper): SQL {\n\treturn sql`${column} ilike ${value}`;\n}\n\n/**\n * The inverse of ilike - this case-insensitively tests that a given column\n * does not match a pattern, which can include `%` and `_`\n * characters to match multiple variations. Including `%`\n * in the pattern matches zero or more characters, and including\n * `_` will match a single character.\n *\n * ## Examples\n *\n * ```ts\n * // Select all cars that don't have \"Rover\" in their name.\n * db.select().from(cars)\n * .where(notLike(cars.name, '%Rover%'))\n * ```\n *\n * @see ilike for the inverse condition\n * @see notLike for a case-sensitive version of this condition\n */\nexport function notIlike(column: Column | SQL.Aliased | SQL, value: string | SQLWrapper): SQL {\n\treturn sql`${column} not ilike ${value}`;\n}\n\n/**\n * Test that a column or expression contains all elements of\n * the list passed as the second argument.\n *\n * ## Throws\n *\n * The argument passed in the second array can't be empty:\n * if an empty is provided, this method will throw.\n *\n * ## Examples\n *\n * ```ts\n * // Select posts where its tags contain \"Typescript\" and \"ORM\".\n * db.select().from(posts)\n * .where(arrayContains(posts.tags, ['Typescript', 'ORM']))\n * ```\n *\n * @see arrayContained to find if an array contains all elements of a column or expression\n * @see arrayOverlaps to find if a column or expression contains any elements of an array\n */\nexport function arrayContains(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayContains(\n\tcolumn: TColumn,\n\tvalues: (GetColumnData | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayContains(\n\tcolumn: Exclude,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function arrayContains(\n\tcolumn: SQLWrapper,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\tthrow new Error('arrayContains requires at least one value');\n\t\t}\n\t\tconst array = sql`${bindIfParam(values, column)}`;\n\t\treturn sql`${column} @> ${array}`;\n\t}\n\n\treturn sql`${column} @> ${bindIfParam(values, column)}`;\n}\n\n/**\n * Test that the list passed as the second argument contains\n * all elements of a column or expression.\n *\n * ## Throws\n *\n * The argument passed in the second array can't be empty:\n * if an empty is provided, this method will throw.\n *\n * ## Examples\n *\n * ```ts\n * // Select posts where its tags contain \"Typescript\", \"ORM\" or both,\n * // but filtering posts that have additional tags.\n * db.select().from(posts)\n * .where(arrayContained(posts.tags, ['Typescript', 'ORM']))\n * ```\n *\n * @see arrayContains to find if a column or expression contains all elements of an array\n * @see arrayOverlaps to find if a column or expression contains any elements of an array\n */\nexport function arrayContained(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayContained(\n\tcolumn: TColumn,\n\tvalues: (GetColumnData | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayContained(\n\tcolumn: Exclude,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function arrayContained(\n\tcolumn: SQLWrapper,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\tthrow new Error('arrayContained requires at least one value');\n\t\t}\n\t\tconst array = sql`${bindIfParam(values, column)}`;\n\t\treturn sql`${column} <@ ${array}`;\n\t}\n\n\treturn sql`${column} <@ ${bindIfParam(values, column)}`;\n}\n\n/**\n * Test that a column or expression contains any elements of\n * the list passed as the second argument.\n *\n * ## Throws\n *\n * The argument passed in the second array can't be empty:\n * if an empty is provided, this method will throw.\n *\n * ## Examples\n *\n * ```ts\n * // Select posts where its tags contain \"Typescript\", \"ORM\" or both.\n * db.select().from(posts)\n * .where(arrayOverlaps(posts.tags, ['Typescript', 'ORM']))\n * ```\n *\n * @see arrayContains to find if a column or expression contains all elements of an array\n * @see arrayContained to find if an array contains all elements of a column or expression\n */\nexport function arrayOverlaps(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayOverlaps(\n\tcolumn: TColumn,\n\tvalues: (GetColumnData | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayOverlaps(\n\tcolumn: Exclude,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function arrayOverlaps(\n\tcolumn: SQLWrapper,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\tthrow new Error('arrayOverlaps requires at least one value');\n\t\t}\n\t\tconst array = sql`${bindIfParam(values, column)}`;\n\t\treturn sql`${column} && ${array}`;\n\t}\n\n\treturn sql`${column} && ${bindIfParam(values, column)}`;\n}\n", "import type { AnyColumn } from '../../column.ts';\nimport type { SQL, SQLWrapper } from '../sql.ts';\nimport { sql } from '../sql.ts';\n\n/**\n * Used in sorting, this specifies that the given\n * column or expression should be sorted in ascending\n * order. By the SQL standard, ascending order is the\n * default, so it is not usually necessary to specify\n * ascending sort order.\n *\n * ## Examples\n *\n * ```ts\n * // Return cars, starting with the oldest models\n * // and going in ascending order to the newest.\n * db.select().from(cars)\n * .orderBy(asc(cars.year));\n * ```\n *\n * @see desc to sort in descending order\n */\nexport function asc(column: AnyColumn | SQLWrapper): SQL {\n\treturn sql`${column} asc`;\n}\n\n/**\n * Used in sorting, this specifies that the given\n * column or expression should be sorted in descending\n * order.\n *\n * ## Examples\n *\n * ```ts\n * // Select users, with the most recently created\n * // records coming first.\n * db.select().from(users)\n * .orderBy(desc(users.createdAt));\n * ```\n *\n * @see asc to sort in ascending order\n */\nexport function desc(column: AnyColumn | SQLWrapper): SQL {\n\treturn sql`${column} desc`;\n}\n", "export * from './conditions.ts';\nexport * from './select.ts';\n", "import { type AnyTable, getTableUniqueName, type InferModelFromColumns, Table } from '~/table.ts';\nimport { type AnyColumn, Column } from './column.ts';\nimport { entityKind, is } from './entity.ts';\nimport { PrimaryKeyBuilder } from './pg-core/primary-keys.ts';\nimport {\n\tand,\n\tasc,\n\tbetween,\n\tdesc,\n\teq,\n\texists,\n\tgt,\n\tgte,\n\tilike,\n\tinArray,\n\tisNotNull,\n\tisNull,\n\tlike,\n\tlt,\n\tlte,\n\tne,\n\tnot,\n\tnotBetween,\n\tnotExists,\n\tnotIlike,\n\tnotInArray,\n\tnotLike,\n\tor,\n} from './sql/expressions/index.ts';\nimport { type Placeholder, SQL, sql } from './sql/sql.ts';\nimport type { Assume, ColumnsWithTable, Equal, Simplify, ValueOrArray } from './utils.ts';\n\nexport abstract class Relation {\n\tstatic readonly [entityKind]: string = 'Relation';\n\n\tdeclare readonly $brand: 'Relation';\n\treadonly referencedTableName: TTableName;\n\tfieldName!: string;\n\n\tconstructor(\n\t\treadonly sourceTable: Table,\n\t\treadonly referencedTable: AnyTable<{ name: TTableName }>,\n\t\treadonly relationName: string | undefined,\n\t) {\n\t\tthis.referencedTableName = referencedTable[Table.Symbol.Name] as TTableName;\n\t}\n\n\tabstract withFieldName(fieldName: string): Relation;\n}\n\nexport class Relations<\n\tTTableName extends string = string,\n\tTConfig extends Record = Record,\n> {\n\tstatic readonly [entityKind]: string = 'Relations';\n\n\tdeclare readonly $brand: 'Relations';\n\n\tconstructor(\n\t\treadonly table: AnyTable<{ name: TTableName }>,\n\t\treadonly config: (helpers: TableRelationsHelpers) => TConfig,\n\t) {}\n}\n\nexport class One<\n\tTTableName extends string = string,\n\tTIsNullable extends boolean = boolean,\n> extends Relation {\n\tstatic override readonly [entityKind]: string = 'One';\n\n\tdeclare protected $relationBrand: 'One';\n\n\tconstructor(\n\t\tsourceTable: Table,\n\t\treferencedTable: AnyTable<{ name: TTableName }>,\n\t\treadonly config:\n\t\t\t| RelationConfig<\n\t\t\t\tTTableName,\n\t\t\t\tstring,\n\t\t\t\tAnyColumn<{ tableName: TTableName }>[]\n\t\t\t>\n\t\t\t| undefined,\n\t\treadonly isNullable: TIsNullable,\n\t) {\n\t\tsuper(sourceTable, referencedTable, config?.relationName);\n\t}\n\n\twithFieldName(fieldName: string): One {\n\t\tconst relation = new One(\n\t\t\tthis.sourceTable,\n\t\t\tthis.referencedTable,\n\t\t\tthis.config,\n\t\t\tthis.isNullable,\n\t\t);\n\t\trelation.fieldName = fieldName;\n\t\treturn relation;\n\t}\n}\n\nexport class Many extends Relation {\n\tstatic override readonly [entityKind]: string = 'Many';\n\n\tdeclare protected $relationBrand: 'Many';\n\n\tconstructor(\n\t\tsourceTable: Table,\n\t\treferencedTable: AnyTable<{ name: TTableName }>,\n\t\treadonly config: { relationName: string } | undefined,\n\t) {\n\t\tsuper(sourceTable, referencedTable, config?.relationName);\n\t}\n\n\twithFieldName(fieldName: string): Many {\n\t\tconst relation = new Many(\n\t\t\tthis.sourceTable,\n\t\t\tthis.referencedTable,\n\t\t\tthis.config,\n\t\t);\n\t\trelation.fieldName = fieldName;\n\t\treturn relation;\n\t}\n}\n\nexport type TableRelationsKeysOnly<\n\tTSchema extends Record,\n\tTTableName extends string,\n\tK extends keyof TSchema,\n> = TSchema[K] extends Relations ? K : never;\n\nexport type ExtractTableRelationsFromSchema<\n\tTSchema extends Record,\n\tTTableName extends string,\n> = ExtractObjectValues<\n\t{\n\t\t[\n\t\t\tK in keyof TSchema as TableRelationsKeysOnly<\n\t\t\t\tTSchema,\n\t\t\t\tTTableName,\n\t\t\t\tK\n\t\t\t>\n\t\t]: TSchema[K] extends Relations ? TConfig : never;\n\t}\n>;\n\nexport type ExtractObjectValues = T[keyof T];\n\nexport type ExtractRelationsFromTableExtraConfigSchema<\n\tTConfig extends unknown[],\n> = ExtractObjectValues<\n\t{\n\t\t[\n\t\t\tK in keyof TConfig as TConfig[K] extends Relations ? K\n\t\t\t\t: never\n\t\t]: TConfig[K] extends Relations ? TRelationConfig\n\t\t\t: never;\n\t}\n>;\n\nexport function getOperators() {\n\treturn {\n\t\tand,\n\t\tbetween,\n\t\teq,\n\t\texists,\n\t\tgt,\n\t\tgte,\n\t\tilike,\n\t\tinArray,\n\t\tisNull,\n\t\tisNotNull,\n\t\tlike,\n\t\tlt,\n\t\tlte,\n\t\tne,\n\t\tnot,\n\t\tnotBetween,\n\t\tnotExists,\n\t\tnotLike,\n\t\tnotIlike,\n\t\tnotInArray,\n\t\tor,\n\t\tsql,\n\t};\n}\n\nexport type Operators = ReturnType;\n\nexport function getOrderByOperators() {\n\treturn {\n\t\tsql,\n\t\tasc,\n\t\tdesc,\n\t};\n}\n\nexport type OrderByOperators = ReturnType;\n\nexport type FindTableByDBName<\n\tTSchema extends TablesRelationalConfig,\n\tTTableName extends string,\n> = ExtractObjectValues<\n\t{\n\t\t[\n\t\t\tK in keyof TSchema as TSchema[K]['dbName'] extends TTableName ? K\n\t\t\t\t: never\n\t\t]: TSchema[K];\n\t}\n>;\n\nexport type DBQueryConfig<\n\tTRelationType extends 'one' | 'many' = 'one' | 'many',\n\tTIsRoot extends boolean = boolean,\n\tTSchema extends TablesRelationalConfig = TablesRelationalConfig,\n\tTTableConfig extends TableRelationalConfig = TableRelationalConfig,\n> =\n\t& {\n\t\tcolumns?:\n\t\t\t| {\n\t\t\t\t[K in keyof TTableConfig['columns']]?: boolean;\n\t\t\t}\n\t\t\t| undefined;\n\t\twith?:\n\t\t\t| {\n\t\t\t\t[K in keyof TTableConfig['relations']]?:\n\t\t\t\t\t| true\n\t\t\t\t\t| DBQueryConfig<\n\t\t\t\t\t\tTTableConfig['relations'][K] extends One ? 'one' : 'many',\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\tTSchema,\n\t\t\t\t\t\tFindTableByDBName<\n\t\t\t\t\t\t\tTSchema,\n\t\t\t\t\t\t\tTTableConfig['relations'][K]['referencedTableName']\n\t\t\t\t\t\t>\n\t\t\t\t\t>\n\t\t\t\t\t| undefined;\n\t\t\t}\n\t\t\t| undefined;\n\t\textras?:\n\t\t\t| Record\n\t\t\t| ((\n\t\t\t\tfields: Simplify<\n\t\t\t\t\t[TTableConfig['columns']] extends [never] ? {}\n\t\t\t\t\t\t: TTableConfig['columns']\n\t\t\t\t>,\n\t\t\t\toperators: { sql: Operators['sql'] },\n\t\t\t) => Record)\n\t\t\t| undefined;\n\t}\n\t& (TRelationType extends 'many' ?\n\t\t\t& {\n\t\t\t\twhere?:\n\t\t\t\t\t| SQL\n\t\t\t\t\t| undefined\n\t\t\t\t\t| ((\n\t\t\t\t\t\tfields: Simplify<\n\t\t\t\t\t\t\t[TTableConfig['columns']] extends [never] ? {}\n\t\t\t\t\t\t\t\t: TTableConfig['columns']\n\t\t\t\t\t\t>,\n\t\t\t\t\t\toperators: Operators,\n\t\t\t\t\t) => SQL | undefined);\n\t\t\t\torderBy?:\n\t\t\t\t\t| ValueOrArray\n\t\t\t\t\t| ((\n\t\t\t\t\t\tfields: Simplify<\n\t\t\t\t\t\t\t[TTableConfig['columns']] extends [never] ? {}\n\t\t\t\t\t\t\t\t: TTableConfig['columns']\n\t\t\t\t\t\t>,\n\t\t\t\t\t\toperators: OrderByOperators,\n\t\t\t\t\t) => ValueOrArray)\n\t\t\t\t\t| undefined;\n\t\t\t\tlimit?: number | Placeholder | undefined;\n\t\t\t}\n\t\t\t& (TIsRoot extends true ? {\n\t\t\t\t\toffset?: number | Placeholder | undefined;\n\t\t\t\t}\n\t\t\t\t: {})\n\t\t: {});\n\nexport interface TableRelationalConfig {\n\ttsName: string;\n\tdbName: string;\n\tcolumns: Record;\n\trelations: Record;\n\tprimaryKey: AnyColumn[];\n\tschema?: string;\n}\n\nexport type TablesRelationalConfig = Record;\n\nexport interface RelationalSchemaConfig<\n\tTSchema extends TablesRelationalConfig,\n> {\n\tfullSchema: Record;\n\tschema: TSchema;\n\ttableNamesMap: Record;\n}\n\nexport type ExtractTablesWithRelations<\n\tTSchema extends Record,\n> = {\n\t[\n\t\tK in keyof TSchema as TSchema[K] extends Table ? K\n\t\t\t: never\n\t]: TSchema[K] extends Table ? {\n\t\t\ttsName: K & string;\n\t\t\tdbName: TSchema[K]['_']['name'];\n\t\t\tcolumns: TSchema[K]['_']['columns'];\n\t\t\trelations: ExtractTableRelationsFromSchema<\n\t\t\t\tTSchema,\n\t\t\t\tTSchema[K]['_']['name']\n\t\t\t>;\n\t\t\tprimaryKey: AnyColumn[];\n\t\t}\n\t\t: never;\n};\n\nexport type ReturnTypeOrValue = T extends (...args: any[]) => infer R ? R\n\t: T;\n\nexport type BuildRelationResult<\n\tTSchema extends TablesRelationalConfig,\n\tTInclude,\n\tTRelations extends Record,\n> = {\n\t[\n\t\tK in\n\t\t\t& NonUndefinedKeysOnly\n\t\t\t& keyof TRelations\n\t]: TRelations[K] extends infer TRel extends Relation ? BuildQueryResult<\n\t\t\tTSchema,\n\t\t\tFindTableByDBName,\n\t\t\tAssume>\n\t\t> extends infer TResult ? TRel extends One ?\n\t\t\t\t\t| TResult\n\t\t\t\t\t| (Equal extends true ? null : never)\n\t\t\t: TResult[]\n\t\t: never\n\t\t: never;\n};\n\nexport type NonUndefinedKeysOnly =\n\t& ExtractObjectValues<\n\t\t{\n\t\t\t[K in keyof T as T[K] extends undefined ? never : K]: K;\n\t\t}\n\t>\n\t& keyof T;\n\nexport type BuildQueryResult<\n\tTSchema extends TablesRelationalConfig,\n\tTTableConfig extends TableRelationalConfig,\n\tTFullSelection extends true | Record,\n> = Equal extends true ? InferModelFromColumns\n\t: TFullSelection extends Record ? Simplify<\n\t\t\t& (TFullSelection['columns'] extends Record ? InferModelFromColumns<\n\t\t\t\t\t{\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\tK in Equal<\n\t\t\t\t\t\t\t\tExclude<\n\t\t\t\t\t\t\t\t\tTFullSelection['columns'][\n\t\t\t\t\t\t\t\t\t\t& keyof TFullSelection['columns']\n\t\t\t\t\t\t\t\t\t\t& keyof TTableConfig['columns']\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\tundefined\n\t\t\t\t\t\t\t\t>,\n\t\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t\t> extends true ? Exclude<\n\t\t\t\t\t\t\t\t\tkeyof TTableConfig['columns'],\n\t\t\t\t\t\t\t\t\tNonUndefinedKeysOnly\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t\t\t& {\n\t\t\t\t\t\t\t\t\t\t[K in keyof TFullSelection['columns']]: Equal<\n\t\t\t\t\t\t\t\t\t\t\tTFullSelection['columns'][K],\n\t\t\t\t\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t\t\t\t\t> extends true ? K\n\t\t\t\t\t\t\t\t\t\t\t: never;\n\t\t\t\t\t\t\t\t\t}[keyof TFullSelection['columns']]\n\t\t\t\t\t\t\t\t\t& keyof TTableConfig['columns']\n\t\t\t\t\t\t]: TTableConfig['columns'][K];\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t: InferModelFromColumns)\n\t\t\t& (TFullSelection['extras'] extends\n\t\t\t\t| Record\n\t\t\t\t| ((...args: any[]) => Record) ? {\n\t\t\t\t\t[\n\t\t\t\t\t\tK in NonUndefinedKeysOnly<\n\t\t\t\t\t\t\tReturnTypeOrValue\n\t\t\t\t\t\t>\n\t\t\t\t\t]: Assume<\n\t\t\t\t\t\tReturnTypeOrValue[K],\n\t\t\t\t\t\tSQL.Aliased\n\t\t\t\t\t>['_']['type'];\n\t\t\t\t}\n\t\t\t\t: {})\n\t\t\t& (TFullSelection['with'] extends Record ? BuildRelationResult<\n\t\t\t\t\tTSchema,\n\t\t\t\t\tTFullSelection['with'],\n\t\t\t\t\tTTableConfig['relations']\n\t\t\t\t>\n\t\t\t\t: {})\n\t\t>\n\t: never;\n\nexport interface RelationConfig<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends AnyColumn<{ tableName: TTableName }>[],\n> {\n\trelationName?: string;\n\tfields: TColumns;\n\treferences: ColumnsWithTable;\n}\n\nexport function extractTablesRelationalConfig<\n\tTTables extends TablesRelationalConfig,\n>(\n\tschema: Record,\n\tconfigHelpers: (table: Table) => any,\n): { tables: TTables; tableNamesMap: Record } {\n\tif (\n\t\tObject.keys(schema).length === 1\n\t\t&& 'default' in schema\n\t\t&& !is(schema['default'], Table)\n\t) {\n\t\tschema = schema['default'] as Record;\n\t}\n\n\t// table DB name -> schema table key\n\tconst tableNamesMap: Record = {};\n\t// Table relations found before their tables - need to buffer them until we know the schema table key\n\tconst relationsBuffer: Record<\n\t\tstring,\n\t\t{ relations: Record; primaryKey?: AnyColumn[] }\n\t> = {};\n\tconst tablesConfig: TablesRelationalConfig = {};\n\tfor (const [key, value] of Object.entries(schema)) {\n\t\tif (is(value, Table)) {\n\t\t\tconst dbName = getTableUniqueName(value);\n\t\t\tconst bufferedRelations = relationsBuffer[dbName];\n\t\t\ttableNamesMap[dbName] = key;\n\t\t\ttablesConfig[key] = {\n\t\t\t\ttsName: key,\n\t\t\t\tdbName: value[Table.Symbol.Name],\n\t\t\t\tschema: value[Table.Symbol.Schema],\n\t\t\t\tcolumns: value[Table.Symbol.Columns],\n\t\t\t\trelations: bufferedRelations?.relations ?? {},\n\t\t\t\tprimaryKey: bufferedRelations?.primaryKey ?? [],\n\t\t\t};\n\n\t\t\t// Fill in primary keys\n\t\t\tfor (\n\t\t\t\tconst column of Object.values(\n\t\t\t\t\t(value as Table)[Table.Symbol.Columns],\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tif (column.primary) {\n\t\t\t\t\ttablesConfig[key]!.primaryKey.push(column);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst extraConfig = value[Table.Symbol.ExtraConfigBuilder]?.((value as Table)[Table.Symbol.ExtraConfigColumns]);\n\t\t\tif (extraConfig) {\n\t\t\t\tfor (const configEntry of Object.values(extraConfig)) {\n\t\t\t\t\tif (is(configEntry, PrimaryKeyBuilder)) {\n\t\t\t\t\t\ttablesConfig[key]!.primaryKey.push(...configEntry.columns);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (is(value, Relations)) {\n\t\t\tconst dbName = getTableUniqueName(value.table);\n\t\t\tconst tableName = tableNamesMap[dbName];\n\t\t\tconst relations: Record = value.config(\n\t\t\t\tconfigHelpers(value.table),\n\t\t\t);\n\t\t\tlet primaryKey: AnyColumn[] | undefined;\n\n\t\t\tfor (const [relationName, relation] of Object.entries(relations)) {\n\t\t\t\tif (tableName) {\n\t\t\t\t\tconst tableConfig = tablesConfig[tableName]!;\n\t\t\t\t\ttableConfig.relations[relationName] = relation;\n\t\t\t\t\tif (primaryKey) {\n\t\t\t\t\t\ttableConfig.primaryKey.push(...primaryKey);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (!(dbName in relationsBuffer)) {\n\t\t\t\t\t\trelationsBuffer[dbName] = {\n\t\t\t\t\t\t\trelations: {},\n\t\t\t\t\t\t\tprimaryKey,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\trelationsBuffer[dbName]!.relations[relationName] = relation;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { tables: tablesConfig as TTables, tableNamesMap };\n}\n\nexport function relations<\n\tTTableName extends string,\n\tTRelations extends Record>,\n>(\n\ttable: AnyTable<{ name: TTableName }>,\n\trelations: (helpers: TableRelationsHelpers) => TRelations,\n): Relations {\n\treturn new Relations(\n\t\ttable,\n\t\t(helpers: TableRelationsHelpers) =>\n\t\t\tObject.fromEntries(\n\t\t\t\tObject.entries(relations(helpers)).map(([key, value]) => [\n\t\t\t\t\tkey,\n\t\t\t\t\tvalue.withFieldName(key),\n\t\t\t\t]),\n\t\t\t) as TRelations,\n\t);\n}\n\nexport function createOne(sourceTable: Table) {\n\treturn function one<\n\t\tTForeignTable extends Table,\n\t\tTColumns extends [\n\t\t\tAnyColumn<{ tableName: TTableName }>,\n\t\t\t...AnyColumn<{ tableName: TTableName }>[],\n\t\t],\n\t>(\n\t\ttable: TForeignTable,\n\t\tconfig?: RelationConfig,\n\t): One<\n\t\tTForeignTable['_']['name'],\n\t\tEqual\n\t> {\n\t\treturn new One(\n\t\t\tsourceTable,\n\t\t\ttable,\n\t\t\tconfig,\n\t\t\t(config?.fields.reduce((res, f) => res && f.notNull, true)\n\t\t\t\t?? false) as Equal,\n\t\t);\n\t};\n}\n\nexport function createMany(sourceTable: Table) {\n\treturn function many(\n\t\treferencedTable: TForeignTable,\n\t\tconfig?: { relationName: string },\n\t): Many {\n\t\treturn new Many(sourceTable, referencedTable, config);\n\t};\n}\n\nexport interface NormalizedRelation {\n\tfields: AnyColumn[];\n\treferences: AnyColumn[];\n}\n\nexport function normalizeRelation(\n\tschema: TablesRelationalConfig,\n\ttableNamesMap: Record,\n\trelation: Relation,\n): NormalizedRelation {\n\tif (is(relation, One) && relation.config) {\n\t\treturn {\n\t\t\tfields: relation.config.fields,\n\t\t\treferences: relation.config.references,\n\t\t};\n\t}\n\n\tconst referencedTableTsName = tableNamesMap[getTableUniqueName(relation.referencedTable)];\n\tif (!referencedTableTsName) {\n\t\tthrow new Error(\n\t\t\t`Table \"${relation.referencedTable[Table.Symbol.Name]}\" not found in schema`,\n\t\t);\n\t}\n\n\tconst referencedTableConfig = schema[referencedTableTsName];\n\tif (!referencedTableConfig) {\n\t\tthrow new Error(`Table \"${referencedTableTsName}\" not found in schema`);\n\t}\n\n\tconst sourceTable = relation.sourceTable;\n\tconst sourceTableTsName = tableNamesMap[getTableUniqueName(sourceTable)];\n\tif (!sourceTableTsName) {\n\t\tthrow new Error(\n\t\t\t`Table \"${sourceTable[Table.Symbol.Name]}\" not found in schema`,\n\t\t);\n\t}\n\n\tconst reverseRelations: Relation[] = [];\n\tfor (\n\t\tconst referencedTableRelation of Object.values(\n\t\t\treferencedTableConfig.relations,\n\t\t)\n\t) {\n\t\tif (\n\t\t\t(relation.relationName\n\t\t\t\t&& relation !== referencedTableRelation\n\t\t\t\t&& referencedTableRelation.relationName === relation.relationName)\n\t\t\t|| (!relation.relationName\n\t\t\t\t&& referencedTableRelation.referencedTable === relation.sourceTable)\n\t\t) {\n\t\t\treverseRelations.push(referencedTableRelation);\n\t\t}\n\t}\n\n\tif (reverseRelations.length > 1) {\n\t\tthrow relation.relationName\n\t\t\t? new Error(\n\t\t\t\t`There are multiple relations with name \"${relation.relationName}\" in table \"${referencedTableTsName}\"`,\n\t\t\t)\n\t\t\t: new Error(\n\t\t\t\t`There are multiple relations between \"${referencedTableTsName}\" and \"${\n\t\t\t\t\trelation.sourceTable[Table.Symbol.Name]\n\t\t\t\t}\". Please specify relation name`,\n\t\t\t);\n\t}\n\n\tif (\n\t\treverseRelations[0]\n\t\t&& is(reverseRelations[0], One)\n\t\t&& reverseRelations[0].config\n\t) {\n\t\treturn {\n\t\t\tfields: reverseRelations[0].config.references,\n\t\t\treferences: reverseRelations[0].config.fields,\n\t\t};\n\t}\n\n\tthrow new Error(\n\t\t`There is not enough information to infer relation \"${sourceTableTsName}.${relation.fieldName}\"`,\n\t);\n}\n\nexport function createTableRelationsHelpers(\n\tsourceTable: AnyTable<{ name: TTableName }>,\n) {\n\treturn {\n\t\tone: createOne(sourceTable),\n\t\tmany: createMany(sourceTable),\n\t};\n}\n\nexport type TableRelationsHelpers = ReturnType<\n\ttypeof createTableRelationsHelpers\n>;\n\nexport interface BuildRelationalQueryResult<\n\tTTable extends Table = Table,\n\tTColumn extends Column = Column,\n> {\n\ttableTsKey: string;\n\tselection: {\n\t\tdbKey: string;\n\t\ttsKey: string;\n\t\tfield: TColumn | SQL | SQL.Aliased;\n\t\trelationTableTsKey: string | undefined;\n\t\tisJson: boolean;\n\t\tisExtra?: boolean;\n\t\tselection: BuildRelationalQueryResult['selection'];\n\t}[];\n\tsql: TTable | SQL;\n}\n\nexport function mapRelationalRow(\n\ttablesConfig: TablesRelationalConfig,\n\ttableConfig: TableRelationalConfig,\n\trow: unknown[],\n\tbuildQueryResultSelection: BuildRelationalQueryResult['selection'],\n\tmapColumnValue: (value: unknown) => unknown = (value) => value,\n): Record {\n\tconst result: Record = {};\n\n\tfor (\n\t\tconst [\n\t\t\tselectionItemIndex,\n\t\t\tselectionItem,\n\t\t] of buildQueryResultSelection.entries()\n\t) {\n\t\tif (selectionItem.isJson) {\n\t\t\tconst relation = tableConfig.relations[selectionItem.tsKey]!;\n\t\t\tconst rawSubRows = row[selectionItemIndex] as\n\t\t\t\t| unknown[]\n\t\t\t\t| null\n\t\t\t\t| [null]\n\t\t\t\t| string;\n\t\t\tconst subRows = typeof rawSubRows === 'string'\n\t\t\t\t? (JSON.parse(rawSubRows) as unknown[])\n\t\t\t\t: rawSubRows;\n\t\t\tresult[selectionItem.tsKey] = is(relation, One)\n\t\t\t\t? subRows\n\t\t\t\t\t&& mapRelationalRow(\n\t\t\t\t\t\ttablesConfig,\n\t\t\t\t\t\ttablesConfig[selectionItem.relationTableTsKey!]!,\n\t\t\t\t\t\tsubRows,\n\t\t\t\t\t\tselectionItem.selection,\n\t\t\t\t\t\tmapColumnValue,\n\t\t\t\t\t)\n\t\t\t\t: (subRows as unknown[][]).map((subRow) =>\n\t\t\t\t\tmapRelationalRow(\n\t\t\t\t\t\ttablesConfig,\n\t\t\t\t\t\ttablesConfig[selectionItem.relationTableTsKey!]!,\n\t\t\t\t\t\tsubRow,\n\t\t\t\t\t\tselectionItem.selection,\n\t\t\t\t\t\tmapColumnValue,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t} else {\n\t\t\tconst value = mapColumnValue(row[selectionItemIndex]);\n\t\t\tconst field = selectionItem.field!;\n\t\t\tlet decoder;\n\t\t\tif (is(field, Column)) {\n\t\t\t\tdecoder = field;\n\t\t\t} else if (is(field, SQL)) {\n\t\t\t\tdecoder = field.decoder;\n\t\t\t} else {\n\t\t\t\tdecoder = field.sql.decoder;\n\t\t\t}\n\t\t\tresult[selectionItem.tsKey] = value === null ? null : decoder.mapFromDriverValue(value);\n\t\t}\n\t}\n\n\treturn result;\n}\n", "import type { AnyColumn } from './column.ts';\nimport { Column } from './column.ts';\nimport { entityKind, is } from './entity.ts';\nimport type { Relation } from './relations.ts';\nimport type { View } from './sql/sql.ts';\nimport { SQL, sql } from './sql/sql.ts';\nimport { Table } from './table.ts';\nimport { ViewBaseConfig } from './view-common.ts';\n\nexport class ColumnAliasProxyHandler implements ProxyHandler {\n\tstatic readonly [entityKind]: string = 'ColumnAliasProxyHandler';\n\n\tconstructor(private table: Table | View) {}\n\n\tget(columnObj: TColumn, prop: string | symbol): any {\n\t\tif (prop === 'table') {\n\t\t\treturn this.table;\n\t\t}\n\n\t\treturn columnObj[prop as keyof TColumn];\n\t}\n}\n\nexport class TableAliasProxyHandler implements ProxyHandler {\n\tstatic readonly [entityKind]: string = 'TableAliasProxyHandler';\n\n\tconstructor(private alias: string, private replaceOriginalName: boolean) {}\n\n\tget(target: T, prop: string | symbol): any {\n\t\tif (prop === Table.Symbol.IsAlias) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (prop === Table.Symbol.Name) {\n\t\t\treturn this.alias;\n\t\t}\n\n\t\tif (this.replaceOriginalName && prop === Table.Symbol.OriginalName) {\n\t\t\treturn this.alias;\n\t\t}\n\n\t\tif (prop === ViewBaseConfig) {\n\t\t\treturn {\n\t\t\t\t...target[ViewBaseConfig as keyof typeof target],\n\t\t\t\tname: this.alias,\n\t\t\t\tisAlias: true,\n\t\t\t};\n\t\t}\n\n\t\tif (prop === Table.Symbol.Columns) {\n\t\t\tconst columns = (target as Table)[Table.Symbol.Columns];\n\t\t\tif (!columns) {\n\t\t\t\treturn columns;\n\t\t\t}\n\n\t\t\tconst proxiedColumns: { [key: string]: any } = {};\n\n\t\t\tObject.keys(columns).map((key) => {\n\t\t\t\tproxiedColumns[key] = new Proxy(\n\t\t\t\t\tcolumns[key]!,\n\t\t\t\t\tnew ColumnAliasProxyHandler(new Proxy(target, this)),\n\t\t\t\t);\n\t\t\t});\n\n\t\t\treturn proxiedColumns;\n\t\t}\n\n\t\tconst value = target[prop as keyof typeof target];\n\t\tif (is(value, Column)) {\n\t\t\treturn new Proxy(value as AnyColumn, new ColumnAliasProxyHandler(new Proxy(target, this)));\n\t\t}\n\n\t\treturn value;\n\t}\n}\n\nexport class RelationTableAliasProxyHandler implements ProxyHandler {\n\tstatic readonly [entityKind]: string = 'RelationTableAliasProxyHandler';\n\n\tconstructor(private alias: string) {}\n\n\tget(target: T, prop: string | symbol): any {\n\t\tif (prop === 'sourceTable') {\n\t\t\treturn aliasedTable(target.sourceTable, this.alias);\n\t\t}\n\n\t\treturn target[prop as keyof typeof target];\n\t}\n}\n\nexport function aliasedTable(\n\ttable: T,\n\ttableAlias: string,\n): T {\n\treturn new Proxy(table, new TableAliasProxyHandler(tableAlias, false)) as any;\n}\n\nexport function aliasedRelation(relation: T, tableAlias: string): T {\n\treturn new Proxy(relation, new RelationTableAliasProxyHandler(tableAlias));\n}\n\nexport function aliasedTableColumn(column: T, tableAlias: string): T {\n\treturn new Proxy(\n\t\tcolumn,\n\t\tnew ColumnAliasProxyHandler(new Proxy(column.table, new TableAliasProxyHandler(tableAlias, false))),\n\t);\n}\n\nexport function mapColumnsInAliasedSQLToAlias(query: SQL.Aliased, alias: string): SQL.Aliased {\n\treturn new SQL.Aliased(mapColumnsInSQLToAlias(query.sql, alias), query.fieldAlias);\n}\n\nexport function mapColumnsInSQLToAlias(query: SQL, alias: string): SQL {\n\treturn sql.join(query.queryChunks.map((c) => {\n\t\tif (is(c, Column)) {\n\t\t\treturn aliasedTableColumn(c, alias);\n\t\t}\n\t\tif (is(c, SQL)) {\n\t\t\treturn mapColumnsInSQLToAlias(c, alias);\n\t\t}\n\t\tif (is(c, SQL.Aliased)) {\n\t\t\treturn mapColumnsInAliasedSQLToAlias(c, alias);\n\t\t}\n\t\treturn c;\n\t}));\n}\n", "import { ColumnAliasProxyHandler, TableAliasProxyHandler } from './alias.ts';\nimport { Column } from './column.ts';\nimport { entityKind, is } from './entity.ts';\nimport { SQL, View } from './sql/sql.ts';\nimport { Subquery } from './subquery.ts';\nimport { ViewBaseConfig } from './view-common.ts';\n\nexport class SelectionProxyHandler | View>\n\timplements ProxyHandler | View>\n{\n\tstatic readonly [entityKind]: string = 'SelectionProxyHandler';\n\n\tprivate config: {\n\t\t/**\n\t\t * Table alias for the columns\n\t\t */\n\t\talias?: string;\n\t\t/**\n\t\t * What to do when a field is an instance of `SQL.Aliased` and it's not a selection field (from a subquery)\n\t\t *\n\t\t * `sql` - return the underlying SQL expression\n\t\t *\n\t\t * `alias` - return the field alias\n\t\t */\n\t\tsqlAliasedBehavior: 'sql' | 'alias';\n\t\t/**\n\t\t * What to do when a field is an instance of `SQL` and it doesn't have an alias declared\n\t\t *\n\t\t * `sql` - return the underlying SQL expression\n\t\t *\n\t\t * `error` - return a DrizzleTypeError on type level and throw an error on runtime\n\t\t */\n\t\tsqlBehavior: 'sql' | 'error';\n\n\t\t/**\n\t\t * Whether to replace the original name of the column with the alias\n\t\t * Should be set to `true` for views creation\n\t\t * @default false\n\t\t */\n\t\treplaceOriginalName?: boolean;\n\t};\n\n\tconstructor(config: SelectionProxyHandler['config']) {\n\t\tthis.config = { ...config };\n\t}\n\n\tget(subquery: T, prop: string | symbol): any {\n\t\tif (prop === '_') {\n\t\t\treturn {\n\t\t\t\t...subquery['_' as keyof typeof subquery],\n\t\t\t\tselectedFields: new Proxy(\n\t\t\t\t\t(subquery as Subquery)._.selectedFields,\n\t\t\t\t\tthis as ProxyHandler>,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\n\t\tif (prop === ViewBaseConfig) {\n\t\t\treturn {\n\t\t\t\t...subquery[ViewBaseConfig as keyof typeof subquery],\n\t\t\t\tselectedFields: new Proxy(\n\t\t\t\t\t(subquery as View)[ViewBaseConfig].selectedFields,\n\t\t\t\t\tthis as ProxyHandler>,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\n\t\tif (typeof prop === 'symbol') {\n\t\t\treturn subquery[prop as keyof typeof subquery];\n\t\t}\n\n\t\tconst columns = is(subquery, Subquery)\n\t\t\t? subquery._.selectedFields\n\t\t\t: is(subquery, View)\n\t\t\t? subquery[ViewBaseConfig].selectedFields\n\t\t\t: subquery;\n\t\tconst value: unknown = columns[prop as keyof typeof columns];\n\n\t\tif (is(value, SQL.Aliased)) {\n\t\t\t// Never return the underlying SQL expression for a field previously selected in a subquery\n\t\t\tif (this.config.sqlAliasedBehavior === 'sql' && !value.isSelectionField) {\n\t\t\t\treturn value.sql;\n\t\t\t}\n\n\t\t\tconst newValue = value.clone();\n\t\t\tnewValue.isSelectionField = true;\n\t\t\treturn newValue;\n\t\t}\n\n\t\tif (is(value, SQL)) {\n\t\t\tif (this.config.sqlBehavior === 'sql') {\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\tthrow new Error(\n\t\t\t\t`You tried to reference \"${prop}\" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using \".as('alias')\" method.`,\n\t\t\t);\n\t\t}\n\n\t\tif (is(value, Column)) {\n\t\t\tif (this.config.alias) {\n\t\t\t\treturn new Proxy(\n\t\t\t\t\tvalue,\n\t\t\t\t\tnew ColumnAliasProxyHandler(\n\t\t\t\t\t\tnew Proxy(\n\t\t\t\t\t\t\tvalue.table,\n\t\t\t\t\t\t\tnew TableAliasProxyHandler(this.config.alias, this.config.replaceOriginalName ?? false),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\n\t\tif (typeof value !== 'object' || value === null) {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn new Proxy(value, new SelectionProxyHandler(this.config));\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\n\nexport abstract class QueryPromise implements Promise {\n\tstatic readonly [entityKind]: string = 'QueryPromise';\n\n\t[Symbol.toStringTag] = 'QueryPromise';\n\n\tcatch(\n\t\tonRejected?: ((reason: any) => TResult | PromiseLike) | null | undefined,\n\t): Promise {\n\t\treturn this.then(undefined, onRejected);\n\t}\n\n\tfinally(onFinally?: (() => void) | null | undefined): Promise {\n\t\treturn this.then(\n\t\t\t(value) => {\n\t\t\t\tonFinally?.();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\t(reason) => {\n\t\t\t\tonFinally?.();\n\t\t\t\tthrow reason;\n\t\t\t},\n\t\t);\n\t}\n\n\tthen(\n\t\tonFulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null,\n\t\tonRejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null,\n\t): Promise {\n\t\treturn this.execute().then(onFulfilled, onRejected);\n\t}\n\n\tabstract execute(): Promise;\n}\n", "import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { AnySQLiteColumn, SQLiteColumn } from './columns/index.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport type UpdateDeleteAction = 'cascade' | 'restrict' | 'no action' | 'set null' | 'set default';\n\nexport type Reference = () => {\n\treadonly name?: string;\n\treadonly columns: SQLiteColumn[];\n\treadonly foreignTable: SQLiteTable;\n\treadonly foreignColumns: SQLiteColumn[];\n};\n\nexport class ForeignKeyBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteForeignKeyBuilder';\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteForeignKeyBuilder';\n\t\tforeignTableName: 'TForeignTableName';\n\t};\n\n\t/** @internal */\n\treference: Reference;\n\n\t/** @internal */\n\t_onUpdate: UpdateDeleteAction | undefined;\n\n\t/** @internal */\n\t_onDelete: UpdateDeleteAction | undefined;\n\n\tconstructor(\n\t\tconfig: () => {\n\t\t\tname?: string;\n\t\t\tcolumns: SQLiteColumn[];\n\t\t\tforeignColumns: SQLiteColumn[];\n\t\t},\n\t\tactions?: {\n\t\t\tonUpdate?: UpdateDeleteAction;\n\t\t\tonDelete?: UpdateDeleteAction;\n\t\t} | undefined,\n\t) {\n\t\tthis.reference = () => {\n\t\t\tconst { name, columns, foreignColumns } = config();\n\t\t\treturn { name, columns, foreignTable: foreignColumns[0]!.table as SQLiteTable, foreignColumns };\n\t\t};\n\t\tif (actions) {\n\t\t\tthis._onUpdate = actions.onUpdate;\n\t\t\tthis._onDelete = actions.onDelete;\n\t\t}\n\t}\n\n\tonUpdate(action: UpdateDeleteAction): this {\n\t\tthis._onUpdate = action;\n\t\treturn this;\n\t}\n\n\tonDelete(action: UpdateDeleteAction): this {\n\t\tthis._onDelete = action;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): ForeignKey {\n\t\treturn new ForeignKey(table, this);\n\t}\n}\n\nexport class ForeignKey {\n\tstatic readonly [entityKind]: string = 'SQLiteForeignKey';\n\n\treadonly reference: Reference;\n\treadonly onUpdate: UpdateDeleteAction | undefined;\n\treadonly onDelete: UpdateDeleteAction | undefined;\n\n\tconstructor(readonly table: SQLiteTable, builder: ForeignKeyBuilder) {\n\t\tthis.reference = builder.reference;\n\t\tthis.onUpdate = builder._onUpdate;\n\t\tthis.onDelete = builder._onDelete;\n\t}\n\n\tgetName(): string {\n\t\tconst { name, columns, foreignColumns } = this.reference();\n\t\tconst columnNames = columns.map((column) => column.name);\n\t\tconst foreignColumnNames = foreignColumns.map((column) => column.name);\n\t\tconst chunks = [\n\t\t\tthis.table[TableName],\n\t\t\t...columnNames,\n\t\t\tforeignColumns[0]!.table[TableName],\n\t\t\t...foreignColumnNames,\n\t\t];\n\t\treturn name ?? `${chunks.join('_')}_fk`;\n\t}\n}\n\ntype ColumnsWithTable<\n\tTTableName extends string,\n\tTColumns extends SQLiteColumn[],\n> = { [Key in keyof TColumns]: AnySQLiteColumn<{ tableName: TTableName }> };\n\n/**\n * @deprecated please use `foreignKey({ columns: [], foreignColumns: [] })` syntax without callback\n * @param config\n * @returns\n */\nexport function foreignKey<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends [AnySQLiteColumn<{ tableName: TTableName }>, ...AnySQLiteColumn<{ tableName: TTableName }>[]],\n>(\n\tconfig: () => {\n\t\tname?: string;\n\t\tcolumns: TColumns;\n\t\tforeignColumns: ColumnsWithTable;\n\t},\n): ForeignKeyBuilder;\nexport function foreignKey<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends [AnySQLiteColumn<{ tableName: TTableName }>, ...AnySQLiteColumn<{ tableName: TTableName }>[]],\n>(\n\tconfig: {\n\t\tname?: string;\n\t\tcolumns: TColumns;\n\t\tforeignColumns: ColumnsWithTable;\n\t},\n): ForeignKeyBuilder;\nexport function foreignKey(\n\tconfig: any,\n): ForeignKeyBuilder {\n\tfunction mappedConfig() {\n\t\tif (typeof config === 'function') {\n\t\t\tconst { name, columns, foreignColumns } = config();\n\t\t\treturn {\n\t\t\t\tname,\n\t\t\t\tcolumns,\n\t\t\t\tforeignColumns,\n\t\t\t};\n\t\t}\n\t\treturn config;\n\t}\n\n\treturn new ForeignKeyBuilder(mappedConfig);\n}\n", "import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { SQLiteColumn } from './columns/common.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport function uniqueKeyName(table: SQLiteTable, columns: string[]) {\n\treturn `${table[TableName]}_${columns.join('_')}_unique`;\n}\n\nexport function unique(name?: string): UniqueOnConstraintBuilder {\n\treturn new UniqueOnConstraintBuilder(name);\n}\n\nexport class UniqueConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueConstraintBuilder';\n\n\t/** @internal */\n\tcolumns: SQLiteColumn[];\n\n\tconstructor(\n\t\tcolumns: SQLiteColumn[],\n\t\tprivate name?: string,\n\t) {\n\t\tthis.columns = columns;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): UniqueConstraint {\n\t\treturn new UniqueConstraint(table, this.columns, this.name);\n\t}\n}\n\nexport class UniqueOnConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueOnConstraintBuilder';\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tname?: string,\n\t) {\n\t\tthis.name = name;\n\t}\n\n\ton(...columns: [SQLiteColumn, ...SQLiteColumn[]]) {\n\t\treturn new UniqueConstraintBuilder(columns, this.name);\n\t}\n}\n\nexport class UniqueConstraint {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueConstraint';\n\n\treadonly columns: SQLiteColumn[];\n\treadonly name?: string;\n\n\tconstructor(readonly table: SQLiteTable, columns: SQLiteColumn[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name));\n\t}\n\n\tgetName() {\n\t\treturn this.name;\n\t}\n}\n", "import type {\n\tColumnBuilderBase,\n\tColumnBuilderBaseConfig,\n\tColumnBuilderExtraConfig,\n\tColumnBuilderRuntimeConfig,\n\tColumnDataType,\n\tHasGenerated,\n\tMakeColumnConfig,\n} from '~/column-builder.ts';\nimport { ColumnBuilder } from '~/column-builder.ts';\nimport { Column } from '~/column.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { ForeignKey, UpdateDeleteAction } from '~/sqlite-core/foreign-keys.ts';\nimport { ForeignKeyBuilder } from '~/sqlite-core/foreign-keys.ts';\nimport type { AnySQLiteTable, SQLiteTable } from '~/sqlite-core/table.ts';\nimport type { Update } from '~/utils.ts';\nimport { uniqueKeyName } from '../unique-constraint.ts';\n\nexport interface ReferenceConfig {\n\tref: () => SQLiteColumn;\n\tactions: {\n\t\tonUpdate?: UpdateDeleteAction;\n\t\tonDelete?: UpdateDeleteAction;\n\t};\n}\n\nexport interface SQLiteColumnBuilderBase<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTTypeConfig extends object = object,\n> extends ColumnBuilderBase {}\n\nexport interface SQLiteGeneratedColumnConfig {\n\tmode?: 'virtual' | 'stored';\n}\n\nexport abstract class SQLiteColumnBuilder<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTRuntimeConfig extends object = object,\n\tTTypeConfig extends object = object,\n\tTExtraConfig extends ColumnBuilderExtraConfig = object,\n> extends ColumnBuilder\n\timplements SQLiteColumnBuilderBase\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteColumnBuilder';\n\n\tprivate foreignKeyConfigs: ReferenceConfig[] = [];\n\n\treferences(\n\t\tref: ReferenceConfig['ref'],\n\t\tactions: ReferenceConfig['actions'] = {},\n\t): this {\n\t\tthis.foreignKeyConfigs.push({ ref, actions });\n\t\treturn this;\n\t}\n\n\tunique(\n\t\tname?: string,\n\t): this {\n\t\tthis.config.isUnique = true;\n\t\tthis.config.uniqueName = name;\n\t\treturn this;\n\t}\n\n\tgeneratedAlwaysAs(as: SQL | T['data'] | (() => SQL), config?: SQLiteGeneratedColumnConfig): HasGenerated {\n\t\tthis.config.generated = {\n\t\t\tas,\n\t\t\ttype: 'always',\n\t\t\tmode: config?.mode ?? 'virtual',\n\t\t};\n\t\treturn this as any;\n\t}\n\n\t/** @internal */\n\tbuildForeignKeys(column: SQLiteColumn, table: SQLiteTable): ForeignKey[] {\n\t\treturn this.foreignKeyConfigs.map(({ ref, actions }) => {\n\t\t\treturn ((ref, actions) => {\n\t\t\t\tconst builder = new ForeignKeyBuilder(() => {\n\t\t\t\t\tconst foreignColumn = ref();\n\t\t\t\t\treturn { columns: [column], foreignColumns: [foreignColumn] };\n\t\t\t\t});\n\t\t\t\tif (actions.onUpdate) {\n\t\t\t\t\tbuilder.onUpdate(actions.onUpdate);\n\t\t\t\t}\n\t\t\t\tif (actions.onDelete) {\n\t\t\t\t\tbuilder.onDelete(actions.onDelete);\n\t\t\t\t}\n\t\t\t\treturn builder.build(table);\n\t\t\t})(ref, actions);\n\t\t});\n\t}\n\n\t/** @internal */\n\tabstract build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteColumn>;\n}\n\n// To understand how to use `SQLiteColumn` and `AnySQLiteColumn`, see `Column` and `AnyColumn` documentation.\nexport abstract class SQLiteColumn<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n\tTRuntimeConfig extends object = {},\n\tTTypeConfig extends object = {},\n> extends Column {\n\tstatic override readonly [entityKind]: string = 'SQLiteColumn';\n\n\tconstructor(\n\t\toverride readonly table: SQLiteTable,\n\t\tconfig: ColumnBuilderRuntimeConfig,\n\t) {\n\t\tif (!config.uniqueName) {\n\t\t\tconfig.uniqueName = uniqueKeyName(table, [config.name]);\n\t\t}\n\t\tsuper(table, config);\n\t}\n}\n\nexport type AnySQLiteColumn> = {}> = SQLiteColumn<\n\tRequired, TPartial>>\n>;\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySQLiteTable } from '~/sqlite-core/table.ts';\nimport { type Equal, getColumnNameAndConfig, textDecoder } from '~/utils.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\ntype BlobMode = 'buffer' | 'json' | 'bigint';\n\nexport type SQLiteBigIntBuilderInitial = SQLiteBigIntBuilder<{\n\tname: TName;\n\tdataType: 'bigint';\n\tcolumnType: 'SQLiteBigInt';\n\tdata: bigint;\n\tdriverParam: Buffer;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteBigIntBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBigIntBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'bigint', 'SQLiteBigInt');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBigInt> {\n\t\treturn new SQLiteBigInt>(table, this.config as ColumnBuilderRuntimeConfig);\n\t}\n}\n\nexport class SQLiteBigInt> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteBigInt';\n\n\tgetSQLType(): string {\n\t\treturn 'blob';\n\t}\n\n\toverride mapFromDriverValue(value: Buffer | Uint8Array | ArrayBuffer): bigint {\n\t\tif (typeof Buffer !== 'undefined' && Buffer.from) {\n\t\t\tconst buf = Buffer.isBuffer(value)\n\t\t\t\t? value\n\t\t\t\t// eslint-disable-next-line no-instanceof/no-instanceof\n\t\t\t\t: value instanceof ArrayBuffer\n\t\t\t\t? Buffer.from(value)\n\t\t\t\t: value.buffer\n\t\t\t\t? Buffer.from(value.buffer, value.byteOffset, value.byteLength)\n\t\t\t\t: Buffer.from(value);\n\t\t\treturn BigInt(buf.toString('utf8'));\n\t\t}\n\n\t\treturn BigInt(textDecoder!.decode(value));\n\t}\n\n\toverride mapToDriverValue(value: bigint): Buffer {\n\t\treturn Buffer.from(value.toString());\n\t}\n}\n\nexport type SQLiteBlobJsonBuilderInitial = SQLiteBlobJsonBuilder<{\n\tname: TName;\n\tdataType: 'json';\n\tcolumnType: 'SQLiteBlobJson';\n\tdata: unknown;\n\tdriverParam: Buffer;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteBlobJsonBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBlobJsonBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'json', 'SQLiteBlobJson');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBlobJson> {\n\t\treturn new SQLiteBlobJson>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteBlobJson> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteBlobJson';\n\n\tgetSQLType(): string {\n\t\treturn 'blob';\n\t}\n\n\toverride mapFromDriverValue(value: Buffer | Uint8Array | ArrayBuffer): T['data'] {\n\t\tif (typeof Buffer !== 'undefined' && Buffer.from) {\n\t\t\tconst buf = Buffer.isBuffer(value)\n\t\t\t\t? value\n\t\t\t\t// eslint-disable-next-line no-instanceof/no-instanceof\n\t\t\t\t: value instanceof ArrayBuffer\n\t\t\t\t? Buffer.from(value)\n\t\t\t\t: value.buffer\n\t\t\t\t? Buffer.from(value.buffer, value.byteOffset, value.byteLength)\n\t\t\t\t: Buffer.from(value);\n\t\t\treturn JSON.parse(buf.toString('utf8'));\n\t\t}\n\n\t\treturn JSON.parse(textDecoder!.decode(value));\n\t}\n\n\toverride mapToDriverValue(value: T['data']): Buffer {\n\t\treturn Buffer.from(JSON.stringify(value));\n\t}\n}\n\nexport type SQLiteBlobBufferBuilderInitial = SQLiteBlobBufferBuilder<{\n\tname: TName;\n\tdataType: 'buffer';\n\tcolumnType: 'SQLiteBlobBuffer';\n\tdata: Buffer;\n\tdriverParam: Buffer;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteBlobBufferBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBlobBufferBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'buffer', 'SQLiteBlobBuffer');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBlobBuffer> {\n\t\treturn new SQLiteBlobBuffer>(table, this.config as ColumnBuilderRuntimeConfig);\n\t}\n}\n\nexport class SQLiteBlobBuffer> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteBlobBuffer';\n\n\toverride mapFromDriverValue(value: Buffer | Uint8Array | ArrayBuffer): T['data'] {\n\t\tif (Buffer.isBuffer(value)) {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn Buffer.from(value as Uint8Array);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn 'blob';\n\t}\n}\n\nexport interface BlobConfig {\n\tmode: TMode;\n}\n\n/**\n * It's recommended to use `text('...', { mode: 'json' })` instead of `blob` in JSON mode, because it supports JSON functions:\n * >All JSON functions currently throw an error if any of their arguments are BLOBs because BLOBs are reserved for a future enhancement in which BLOBs will store the binary encoding for JSON.\n *\n * https://www.sqlite.org/json1.html\n */\nexport function blob(): SQLiteBlobJsonBuilderInitial<''>;\nexport function blob(\n\tconfig?: BlobConfig,\n): Equal extends true ? SQLiteBigIntBuilderInitial<''>\n\t: Equal extends true ? SQLiteBlobBufferBuilderInitial<''>\n\t: SQLiteBlobJsonBuilderInitial<''>;\nexport function blob(\n\tname: TName,\n\tconfig?: BlobConfig,\n): Equal extends true ? SQLiteBigIntBuilderInitial\n\t: Equal extends true ? SQLiteBlobBufferBuilderInitial\n\t: SQLiteBlobJsonBuilderInitial;\nexport function blob(a?: string | BlobConfig, b?: BlobConfig) {\n\tconst { name, config } = getColumnNameAndConfig(a, b);\n\tif (config?.mode === 'json') {\n\t\treturn new SQLiteBlobJsonBuilder(name);\n\t}\n\tif (config?.mode === 'bigint') {\n\t\treturn new SQLiteBigIntBuilder(name);\n\t}\n\treturn new SQLiteBlobBufferBuilder(name);\n}\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { AnySQLiteTable } from '~/sqlite-core/table.ts';\nimport { type Equal, getColumnNameAndConfig } from '~/utils.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport type ConvertCustomConfig> =\n\t& {\n\t\tname: TName;\n\t\tdataType: 'custom';\n\t\tcolumnType: 'SQLiteCustomColumn';\n\t\tdata: T['data'];\n\t\tdriverParam: T['driverData'];\n\t\tenumValues: undefined;\n\t}\n\t& (T['notNull'] extends true ? { notNull: true } : {})\n\t& (T['default'] extends true ? { hasDefault: true } : {});\n\nexport interface SQLiteCustomColumnInnerConfig {\n\tcustomTypeValues: CustomTypeValues;\n}\n\nexport class SQLiteCustomColumnBuilder>\n\textends SQLiteColumnBuilder<\n\t\tT,\n\t\t{\n\t\t\tfieldConfig: CustomTypeValues['config'];\n\t\t\tcustomTypeParams: CustomTypeParams;\n\t\t},\n\t\t{\n\t\t\tsqliteColumnBuilderBrand: 'SQLiteCustomColumnBuilderBrand';\n\t\t}\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteCustomColumnBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t\tfieldConfig: CustomTypeValues['config'],\n\t\tcustomTypeParams: CustomTypeParams,\n\t) {\n\t\tsuper(name, 'custom', 'SQLiteCustomColumn');\n\t\tthis.config.fieldConfig = fieldConfig;\n\t\tthis.config.customTypeParams = customTypeParams;\n\t}\n\n\t/** @internal */\n\tbuild(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteCustomColumn> {\n\t\treturn new SQLiteCustomColumn>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteCustomColumn> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteCustomColumn';\n\n\tprivate sqlName: string;\n\tprivate mapTo?: (value: T['data']) => T['driverParam'];\n\tprivate mapFrom?: (value: T['driverParam']) => T['data'];\n\n\tconstructor(\n\t\ttable: AnySQLiteTable<{ name: T['tableName'] }>,\n\t\tconfig: SQLiteCustomColumnBuilder['config'],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.sqlName = config.customTypeParams.dataType(config.fieldConfig);\n\t\tthis.mapTo = config.customTypeParams.toDriver;\n\t\tthis.mapFrom = config.customTypeParams.fromDriver;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn this.sqlName;\n\t}\n\n\toverride mapFromDriverValue(value: T['driverParam']): T['data'] {\n\t\treturn typeof this.mapFrom === 'function' ? this.mapFrom(value) : value as T['data'];\n\t}\n\n\toverride mapToDriverValue(value: T['data']): T['driverParam'] {\n\t\treturn typeof this.mapTo === 'function' ? this.mapTo(value) : value as T['data'];\n\t}\n}\n\nexport type CustomTypeValues = {\n\t/**\n\t * Required type for custom column, that will infer proper type model\n\t *\n\t * Examples:\n\t *\n\t * If you want your column to be `string` type after selecting/or on inserting - use `data: string`. Like `text`, `varchar`\n\t *\n\t * If you want your column to be `number` type after selecting/or on inserting - use `data: number`. Like `integer`\n\t */\n\tdata: unknown;\n\n\t/**\n\t * Type helper, that represents what type database driver is accepting for specific database data type\n\t */\n\tdriverData?: unknown;\n\n\t/**\n\t * What config type should be used for {@link CustomTypeParams} `dataType` generation\n\t */\n\tconfig?: Record;\n\n\t/**\n\t * Whether the config argument should be required or not\n\t * @default false\n\t */\n\tconfigRequired?: boolean;\n\n\t/**\n\t * If your custom data type should be notNull by default you can use `notNull: true`\n\t *\n\t * @example\n\t * const customSerial = customType<{ data: number, notNull: true, default: true }>({\n\t * \t dataType() {\n\t * \t return 'serial';\n\t * },\n\t * });\n\t */\n\tnotNull?: boolean;\n\n\t/**\n\t * If your custom data type has default you can use `default: true`\n\t *\n\t * @example\n\t * const customSerial = customType<{ data: number, notNull: true, default: true }>({\n\t * \t dataType() {\n\t * \t return 'serial';\n\t * },\n\t * });\n\t */\n\tdefault?: boolean;\n};\n\nexport interface CustomTypeParams {\n\t/**\n\t * Database data type string representation, that is used for migrations\n\t * @example\n\t * ```\n\t * `jsonb`, `text`\n\t * ```\n\t *\n\t * If database data type needs additional params you can use them from `config` param\n\t * @example\n\t * ```\n\t * `varchar(256)`, `numeric(2,3)`\n\t * ```\n\t *\n\t * To make `config` be of specific type please use config generic in {@link CustomTypeValues}\n\t *\n\t * @example\n\t * Usage example\n\t * ```\n\t * dataType() {\n\t * return 'boolean';\n\t * },\n\t * ```\n\t * Or\n\t * ```\n\t * dataType(config) {\n\t * \t return typeof config.length !== 'undefined' ? `varchar(${config.length})` : `varchar`;\n\t * \t }\n\t * ```\n\t */\n\tdataType: (config: T['config'] | (Equal extends true ? never : undefined)) => string;\n\n\t/**\n\t * Optional mapping function, between user input and driver\n\t * @example\n\t * For example, when using jsonb we need to map JS/TS object to string before writing to database\n\t * ```\n\t * toDriver(value: TData): string {\n\t * \t return JSON.stringify(value);\n\t * }\n\t * ```\n\t */\n\ttoDriver?: (value: T['data']) => T['driverData'] | SQL;\n\n\t/**\n\t * Optional mapping function, that is responsible for data mapping from database to JS/TS code\n\t * @example\n\t * For example, when using timestamp we need to map string Date representation to JS Date\n\t * ```\n\t * fromDriver(value: string): Date {\n\t * \treturn new Date(value);\n\t * },\n\t * ```\n\t */\n\tfromDriver?: (value: T['driverData']) => T['data'];\n}\n\n/**\n * Custom sqlite database data type generator\n */\nexport function customType(\n\tcustomTypeParams: CustomTypeParams,\n): Equal extends true ? {\n\t\t & T['config']>(\n\t\t\tfieldConfig: TConfig,\n\t\t): SQLiteCustomColumnBuilder>;\n\t\t(\n\t\t\tdbName: TName,\n\t\t\tfieldConfig: T['config'],\n\t\t): SQLiteCustomColumnBuilder>;\n\t}\n\t: {\n\t\t(): SQLiteCustomColumnBuilder>;\n\t\t & T['config']>(\n\t\t\tfieldConfig?: TConfig,\n\t\t): SQLiteCustomColumnBuilder>;\n\t\t(\n\t\t\tdbName: TName,\n\t\t\tfieldConfig?: T['config'],\n\t\t): SQLiteCustomColumnBuilder>;\n\t}\n{\n\treturn (\n\t\ta?: TName | T['config'],\n\t\tb?: T['config'],\n\t): SQLiteCustomColumnBuilder> => {\n\t\tconst { name, config } = getColumnNameAndConfig(a, b);\n\t\treturn new SQLiteCustomColumnBuilder(\n\t\t\tname as ConvertCustomConfig['name'],\n\t\t\tconfig,\n\t\t\tcustomTypeParams,\n\t\t);\n\t};\n}\n", "import type {\n\tColumnBuilderBaseConfig,\n\tColumnBuilderRuntimeConfig,\n\tColumnDataType,\n\tHasDefault,\n\tIsPrimaryKey,\n\tMakeColumnConfig,\n\tNotNull,\n} from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport { sql } from '~/sql/sql.ts';\nimport type { OnConflict } from '~/sqlite-core/utils.ts';\nimport { type Equal, getColumnNameAndConfig, type Or } from '~/utils.ts';\nimport type { AnySQLiteTable } from '../table.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport interface PrimaryKeyConfig {\n\tautoIncrement?: boolean;\n\tonConflict?: OnConflict;\n}\n\nexport abstract class SQLiteBaseIntegerBuilder<\n\tT extends ColumnBuilderBaseConfig,\n\tTRuntimeConfig extends object = object,\n> extends SQLiteColumnBuilder<\n\tT,\n\tTRuntimeConfig & { autoIncrement: boolean },\n\t{},\n\t{ primaryKeyHasDefault: true }\n> {\n\tstatic override readonly [entityKind]: string = 'SQLiteBaseIntegerBuilder';\n\n\tconstructor(name: T['name'], dataType: T['dataType'], columnType: T['columnType']) {\n\t\tsuper(name, dataType, columnType);\n\t\tthis.config.autoIncrement = false;\n\t}\n\n\toverride primaryKey(config?: PrimaryKeyConfig): IsPrimaryKey>> {\n\t\tif (config?.autoIncrement) {\n\t\t\tthis.config.autoIncrement = true;\n\t\t}\n\t\tthis.config.hasDefault = true;\n\t\treturn super.primaryKey() as IsPrimaryKey>>;\n\t}\n\n\t/** @internal */\n\tabstract override build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBaseInteger>;\n}\n\nexport abstract class SQLiteBaseInteger<\n\tT extends ColumnBaseConfig,\n\tTRuntimeConfig extends object = object,\n> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteBaseInteger';\n\n\treadonly autoIncrement: boolean = this.config.autoIncrement;\n\n\tgetSQLType(): string {\n\t\treturn 'integer';\n\t}\n}\n\nexport type SQLiteIntegerBuilderInitial = SQLiteIntegerBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'SQLiteInteger';\n\tdata: number;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteIntegerBuilder>\n\textends SQLiteBaseIntegerBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteIntegerBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'SQLiteInteger');\n\t}\n\n\tbuild(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteInteger> {\n\t\treturn new SQLiteInteger>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteInteger> extends SQLiteBaseInteger {\n\tstatic override readonly [entityKind]: string = 'SQLiteInteger';\n}\n\nexport type SQLiteTimestampBuilderInitial = SQLiteTimestampBuilder<{\n\tname: TName;\n\tdataType: 'date';\n\tcolumnType: 'SQLiteTimestamp';\n\tdata: Date;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteTimestampBuilder>\n\textends SQLiteBaseIntegerBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteTimestampBuilder';\n\n\tconstructor(name: T['name'], mode: 'timestamp' | 'timestamp_ms') {\n\t\tsuper(name, 'date', 'SQLiteTimestamp');\n\t\tthis.config.mode = mode;\n\t}\n\n\t/**\n\t * @deprecated Use `default()` with your own expression instead.\n\t *\n\t * Adds `DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer))` to the column, which is the current epoch timestamp in milliseconds.\n\t */\n\tdefaultNow(): HasDefault {\n\t\treturn this.default(sql`(cast((julianday('now') - 2440587.5)*86400000 as integer))`) as any;\n\t}\n\n\tbuild(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteTimestamp> {\n\t\treturn new SQLiteTimestamp>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteTimestamp>\n\textends SQLiteBaseInteger\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteTimestamp';\n\n\treadonly mode: 'timestamp' | 'timestamp_ms' = this.config.mode;\n\n\toverride mapFromDriverValue(value: number): Date {\n\t\tif (this.config.mode === 'timestamp') {\n\t\t\treturn new Date(value * 1000);\n\t\t}\n\t\treturn new Date(value);\n\t}\n\n\toverride mapToDriverValue(value: Date): number {\n\t\tconst unix = value.getTime();\n\t\tif (this.config.mode === 'timestamp') {\n\t\t\treturn Math.floor(unix / 1000);\n\t\t}\n\t\treturn unix;\n\t}\n}\n\nexport type SQLiteBooleanBuilderInitial = SQLiteBooleanBuilder<{\n\tname: TName;\n\tdataType: 'boolean';\n\tcolumnType: 'SQLiteBoolean';\n\tdata: boolean;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteBooleanBuilder>\n\textends SQLiteBaseIntegerBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBooleanBuilder';\n\n\tconstructor(name: T['name'], mode: 'boolean') {\n\t\tsuper(name, 'boolean', 'SQLiteBoolean');\n\t\tthis.config.mode = mode;\n\t}\n\n\tbuild(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBoolean> {\n\t\treturn new SQLiteBoolean>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteBoolean>\n\textends SQLiteBaseInteger\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBoolean';\n\n\treadonly mode: 'boolean' = this.config.mode;\n\n\toverride mapFromDriverValue(value: number): boolean {\n\t\treturn Number(value) === 1;\n\t}\n\n\toverride mapToDriverValue(value: boolean): number {\n\t\treturn value ? 1 : 0;\n\t}\n}\n\nexport interface IntegerConfig<\n\tTMode extends 'number' | 'timestamp' | 'timestamp_ms' | 'boolean' =\n\t\t| 'number'\n\t\t| 'timestamp'\n\t\t| 'timestamp_ms'\n\t\t| 'boolean',\n> {\n\tmode: TMode;\n}\n\nexport function integer(): SQLiteIntegerBuilderInitial<''>;\nexport function integer(\n\tconfig?: IntegerConfig,\n): Or, Equal> extends true ? SQLiteTimestampBuilderInitial<''>\n\t: Equal extends true ? SQLiteBooleanBuilderInitial<''>\n\t: SQLiteIntegerBuilderInitial<''>;\nexport function integer(\n\tname: TName,\n\tconfig?: IntegerConfig,\n): Or, Equal> extends true ? SQLiteTimestampBuilderInitial\n\t: Equal extends true ? SQLiteBooleanBuilderInitial\n\t: SQLiteIntegerBuilderInitial;\nexport function integer(a?: string | IntegerConfig, b?: IntegerConfig) {\n\tconst { name, config } = getColumnNameAndConfig(a, b);\n\tif (config?.mode === 'timestamp' || config?.mode === 'timestamp_ms') {\n\t\treturn new SQLiteTimestampBuilder(name, config.mode);\n\t}\n\tif (config?.mode === 'boolean') {\n\t\treturn new SQLiteBooleanBuilder(name, config.mode);\n\t}\n\treturn new SQLiteIntegerBuilder(name);\n}\n\nexport const int = integer;\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySQLiteTable } from '~/sqlite-core/table.ts';\nimport { type Equal, getColumnNameAndConfig } from '~/utils.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport type SQLiteNumericBuilderInitial = SQLiteNumericBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'SQLiteNumeric';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteNumericBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'string', 'SQLiteNumeric');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteNumeric> {\n\t\treturn new SQLiteNumeric>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteNumeric> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteNumeric';\n\n\toverride mapFromDriverValue(value: unknown): string {\n\t\tif (typeof value === 'string') return value;\n\n\t\treturn String(value);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn 'numeric';\n\t}\n}\n\nexport type SQLiteNumericNumberBuilderInitial = SQLiteNumericNumberBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'SQLiteNumericNumber';\n\tdata: number;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteNumericNumberBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericNumberBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'SQLiteNumericNumber');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteNumericNumber> {\n\t\treturn new SQLiteNumericNumber>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteNumericNumber> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericNumber';\n\n\toverride mapFromDriverValue(value: unknown): number {\n\t\tif (typeof value === 'number') return value;\n\n\t\treturn Number(value);\n\t}\n\n\toverride mapToDriverValue = String;\n\n\tgetSQLType(): string {\n\t\treturn 'numeric';\n\t}\n}\n\nexport type SQLiteNumericBigIntBuilderInitial = SQLiteNumericBigIntBuilder<{\n\tname: TName;\n\tdataType: 'bigint';\n\tcolumnType: 'SQLiteNumericBigInt';\n\tdata: bigint;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteNumericBigIntBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericBigIntBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'bigint', 'SQLiteNumericBigInt');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteNumericBigInt> {\n\t\treturn new SQLiteNumericBigInt>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteNumericBigInt> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericBigInt';\n\n\toverride mapFromDriverValue = BigInt;\n\n\toverride mapToDriverValue = String;\n\n\tgetSQLType(): string {\n\t\treturn 'numeric';\n\t}\n}\n\nexport type SQLiteNumericConfig = {\n\tmode: T;\n};\n\nexport function numeric(\n\tconfig?: SQLiteNumericConfig,\n): Equal extends true ? SQLiteNumericNumberBuilderInitial<''>\n\t: Equal extends true ? SQLiteNumericBigIntBuilderInitial<''>\n\t: SQLiteNumericBuilderInitial<''>;\nexport function numeric(\n\tname: TName,\n\tconfig?: SQLiteNumericConfig,\n): Equal extends true ? SQLiteNumericNumberBuilderInitial\n\t: Equal extends true ? SQLiteNumericBigIntBuilderInitial\n\t: SQLiteNumericBuilderInitial;\nexport function numeric(a?: string | SQLiteNumericConfig, b?: SQLiteNumericConfig) {\n\tconst { name, config } = getColumnNameAndConfig(a, b);\n\tconst mode = config?.mode;\n\treturn mode === 'number'\n\t\t? new SQLiteNumericNumberBuilder(name)\n\t\t: mode === 'bigint'\n\t\t? new SQLiteNumericBigIntBuilder(name)\n\t\t: new SQLiteNumericBuilder(name);\n}\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySQLiteTable } from '../table.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport type SQLiteRealBuilderInitial = SQLiteRealBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'SQLiteReal';\n\tdata: number;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteRealBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteRealBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'SQLiteReal');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteReal> {\n\t\treturn new SQLiteReal>(table, this.config as ColumnBuilderRuntimeConfig);\n\t}\n}\n\nexport class SQLiteReal> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteReal';\n\n\tgetSQLType(): string {\n\t\treturn 'real';\n\t}\n}\n\nexport function real(): SQLiteRealBuilderInitial<''>;\nexport function real(name: TName): SQLiteRealBuilderInitial;\nexport function real(name?: string) {\n\treturn new SQLiteRealBuilder(name ?? '');\n}\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySQLiteTable } from '~/sqlite-core/table.ts';\nimport { type Equal, getColumnNameAndConfig, type Writable } from '~/utils.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport type SQLiteTextBuilderInitial<\n\tTName extends string,\n\tTEnum extends [string, ...string[]],\n\tTLength extends number | undefined,\n> = SQLiteTextBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'SQLiteText';\n\tdata: TEnum[number];\n\tdriverParam: string;\n\tenumValues: TEnum;\n\tlength: TLength;\n}>;\n\nexport class SQLiteTextBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'SQLiteText'> & { length?: number | undefined },\n> extends SQLiteColumnBuilder<\n\tT,\n\t{ length: T['length']; enumValues: T['enumValues'] },\n\t{ length: T['length'] }\n> {\n\tstatic override readonly [entityKind]: string = 'SQLiteTextBuilder';\n\n\tconstructor(name: T['name'], config: SQLiteTextConfig<'text', T['enumValues'], T['length']>) {\n\t\tsuper(name, 'string', 'SQLiteText');\n\t\tthis.config.enumValues = config.enum;\n\t\tthis.config.length = config.length;\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteText & { length: T['length'] }> {\n\t\treturn new SQLiteText & { length: T['length'] }>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteText & { length?: number | undefined }>\n\textends SQLiteColumn\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteText';\n\n\toverride readonly enumValues = this.config.enumValues;\n\n\treadonly length: T['length'] = this.config.length;\n\n\tconstructor(\n\t\ttable: AnySQLiteTable<{ name: T['tableName'] }>,\n\t\tconfig: SQLiteTextBuilder['config'],\n\t) {\n\t\tsuper(table, config);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn `text${this.config.length ? `(${this.config.length})` : ''}`;\n\t}\n}\n\nexport type SQLiteTextJsonBuilderInitial = SQLiteTextJsonBuilder<{\n\tname: TName;\n\tdataType: 'json';\n\tcolumnType: 'SQLiteTextJson';\n\tdata: unknown;\n\tdriverParam: string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class SQLiteTextJsonBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteTextJsonBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'json', 'SQLiteTextJson');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteTextJson> {\n\t\treturn new SQLiteTextJson>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteTextJson>\n\textends SQLiteColumn\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteTextJson';\n\n\tgetSQLType(): string {\n\t\treturn 'text';\n\t}\n\n\toverride mapFromDriverValue(value: string): T['data'] {\n\t\treturn JSON.parse(value);\n\t}\n\n\toverride mapToDriverValue(value: T['data']): string {\n\t\treturn JSON.stringify(value);\n\t}\n}\n\nexport type SQLiteTextConfig<\n\tTMode extends 'text' | 'json' = 'text' | 'json',\n\tTEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined,\n\tTLength extends number | undefined = number | undefined,\n> = TMode extends 'text' ? {\n\t\tmode?: TMode;\n\t\tlength?: TLength;\n\t\tenum?: TEnum;\n\t}\n\t: {\n\t\tmode?: TMode;\n\t};\n\nexport function text(): SQLiteTextBuilderInitial<'', [string, ...string[]], undefined>;\nexport function text<\n\tU extends string,\n\tT extends Readonly<[U, ...U[]]>,\n\tL extends number | undefined,\n\tTMode extends 'text' | 'json' = 'text' | 'json',\n>(\n\tconfig?: SQLiteTextConfig, L>,\n): Equal extends true ? SQLiteTextJsonBuilderInitial<''>\n\t: SQLiteTextBuilderInitial<'', Writable, L>;\nexport function text<\n\tTName extends string,\n\tU extends string,\n\tT extends Readonly<[U, ...U[]]>,\n\tL extends number | undefined,\n\tTMode extends 'text' | 'json' = 'text' | 'json',\n>(\n\tname: TName,\n\tconfig?: SQLiteTextConfig, L>,\n): Equal extends true ? SQLiteTextJsonBuilderInitial\n\t: SQLiteTextBuilderInitial, L>;\nexport function text(a?: string | SQLiteTextConfig, b: SQLiteTextConfig = {}): any {\n\tconst { name, config } = getColumnNameAndConfig(a, b);\n\tif (config.mode === 'json') {\n\t\treturn new SQLiteTextJsonBuilder(name);\n\t}\n\treturn new SQLiteTextBuilder(name, config as any);\n}\n", "import { blob } from './blob.ts';\nimport { customType } from './custom.ts';\nimport { integer } from './integer.ts';\nimport { numeric } from './numeric.ts';\nimport { real } from './real.ts';\nimport { text } from './text.ts';\n\nexport function getSQLiteColumnBuilders() {\n\treturn {\n\t\tblob,\n\t\tcustomType,\n\t\tinteger,\n\t\tnumeric,\n\t\treal,\n\t\ttext,\n\t};\n}\n\nexport type SQLiteColumnBuilders = ReturnType;\n", "import type { BuildColumns, BuildExtraConfigColumns } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport { Table, type TableConfig as TableConfigBase, type UpdateTableConfig } from '~/table.ts';\nimport type { CheckBuilder } from './checks.ts';\nimport { getSQLiteColumnBuilders, type SQLiteColumnBuilders } from './columns/all.ts';\nimport type { SQLiteColumn, SQLiteColumnBuilder, SQLiteColumnBuilderBase } from './columns/common.ts';\nimport type { ForeignKey, ForeignKeyBuilder } from './foreign-keys.ts';\nimport type { IndexBuilder } from './indexes.ts';\nimport type { PrimaryKeyBuilder } from './primary-keys.ts';\nimport type { UniqueConstraintBuilder } from './unique-constraint.ts';\n\nexport type SQLiteTableExtraConfigValue =\n\t| IndexBuilder\n\t| CheckBuilder\n\t| ForeignKeyBuilder\n\t| PrimaryKeyBuilder\n\t| UniqueConstraintBuilder;\n\nexport type SQLiteTableExtraConfig = Record<\n\tstring,\n\tSQLiteTableExtraConfigValue\n>;\n\nexport type TableConfig = TableConfigBase>;\n\n/** @internal */\nexport const InlineForeignKeys = Symbol.for('drizzle:SQLiteInlineForeignKeys');\n\nexport class SQLiteTable extends Table {\n\tstatic override readonly [entityKind]: string = 'SQLiteTable';\n\n\t/** @internal */\n\tstatic override readonly Symbol = Object.assign({}, Table.Symbol, {\n\t\tInlineForeignKeys: InlineForeignKeys as typeof InlineForeignKeys,\n\t});\n\n\t/** @internal */\n\toverride [Table.Symbol.Columns]!: NonNullable;\n\n\t/** @internal */\n\t[InlineForeignKeys]: ForeignKey[] = [];\n\n\t/** @internal */\n\toverride [Table.Symbol.ExtraConfigBuilder]:\n\t\t| ((self: Record) => SQLiteTableExtraConfig)\n\t\t| undefined = undefined;\n}\n\nexport type AnySQLiteTable = {}> = SQLiteTable<\n\tUpdateTableConfig\n>;\n\nexport type SQLiteTableWithColumns =\n\t& SQLiteTable\n\t& {\n\t\t[Key in keyof T['columns']]: T['columns'][Key];\n\t};\n\nexport interface SQLiteTableFn {\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: TColumnsMap,\n\t\textraConfig?: (\n\t\t\tself: BuildColumns,\n\t\t) => SQLiteTableExtraConfigValue[],\n\t): SQLiteTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>;\n\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: (columnTypes: SQLiteColumnBuilders) => TColumnsMap,\n\t\textraConfig?: (self: BuildColumns) => SQLiteTableExtraConfigValue[],\n\t): SQLiteTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>;\n\t/**\n\t * @deprecated The third parameter of sqliteTable is changing and will only accept an array instead of an object\n\t *\n\t * @example\n\t * Deprecated version:\n\t * ```ts\n\t * export const users = sqliteTable(\"users\", {\n\t * \tid: int(),\n\t * }, (t) => ({\n\t * \tidx: index('custom_name').on(t.id)\n\t * }));\n\t * ```\n\t *\n\t * New API:\n\t * ```ts\n\t * export const users = sqliteTable(\"users\", {\n\t * \tid: int(),\n\t * }, (t) => [\n\t * \tindex('custom_name').on(t.id)\n\t * ]);\n\t * ```\n\t */\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: TColumnsMap,\n\t\textraConfig?: (self: BuildColumns) => SQLiteTableExtraConfig,\n\t): SQLiteTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>;\n\n\t/**\n\t * @deprecated The third parameter of sqliteTable is changing and will only accept an array instead of an object\n\t *\n\t * @example\n\t * Deprecated version:\n\t * ```ts\n\t * export const users = sqliteTable(\"users\", {\n\t * \tid: int(),\n\t * }, (t) => ({\n\t * \tidx: index('custom_name').on(t.id)\n\t * }));\n\t * ```\n\t *\n\t * New API:\n\t * ```ts\n\t * export const users = sqliteTable(\"users\", {\n\t * \tid: int(),\n\t * }, (t) => [\n\t * \tindex('custom_name').on(t.id)\n\t * ]);\n\t * ```\n\t */\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: (columnTypes: SQLiteColumnBuilders) => TColumnsMap,\n\t\textraConfig?: (self: BuildColumns) => SQLiteTableExtraConfig,\n\t): SQLiteTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>;\n}\n\nfunction sqliteTableBase<\n\tTTableName extends string,\n\tTColumnsMap extends Record,\n\tTSchema extends string | undefined,\n>(\n\tname: TTableName,\n\tcolumns: TColumnsMap | ((columnTypes: SQLiteColumnBuilders) => TColumnsMap),\n\textraConfig:\n\t\t| ((\n\t\t\tself: BuildColumns,\n\t\t) => SQLiteTableExtraConfig | SQLiteTableExtraConfigValue[])\n\t\t| undefined,\n\tschema?: TSchema,\n\tbaseName = name,\n): SQLiteTableWithColumns<{\n\tname: TTableName;\n\tschema: TSchema;\n\tcolumns: BuildColumns;\n\tdialect: 'sqlite';\n}> {\n\tconst rawTable = new SQLiteTable<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>(name, schema, baseName);\n\n\tconst parsedColumns: TColumnsMap = typeof columns === 'function' ? columns(getSQLiteColumnBuilders()) : columns;\n\n\tconst builtColumns = Object.fromEntries(\n\t\tObject.entries(parsedColumns).map(([name, colBuilderBase]) => {\n\t\t\tconst colBuilder = colBuilderBase as SQLiteColumnBuilder;\n\t\t\tcolBuilder.setName(name);\n\t\t\tconst column = colBuilder.build(rawTable);\n\t\t\trawTable[InlineForeignKeys].push(...colBuilder.buildForeignKeys(column, rawTable));\n\t\t\treturn [name, column];\n\t\t}),\n\t) as unknown as BuildColumns;\n\n\tconst table = Object.assign(rawTable, builtColumns);\n\n\ttable[Table.Symbol.Columns] = builtColumns;\n\ttable[Table.Symbol.ExtraConfigColumns] = builtColumns as unknown as BuildExtraConfigColumns<\n\t\tTTableName,\n\t\tTColumnsMap,\n\t\t'sqlite'\n\t>;\n\n\tif (extraConfig) {\n\t\ttable[SQLiteTable.Symbol.ExtraConfigBuilder] = extraConfig as (\n\t\t\tself: Record,\n\t\t) => SQLiteTableExtraConfig;\n\t}\n\n\treturn table;\n}\n\nexport const sqliteTable: SQLiteTableFn = (name, columns, extraConfig) => {\n\treturn sqliteTableBase(name, columns, extraConfig);\n};\n\nexport function sqliteTableCreator(customizeTableName: (name: string) => string): SQLiteTableFn {\n\treturn (name, columns, extraConfig) => {\n\t\treturn sqliteTableBase(customizeTableName(name) as typeof name, columns, extraConfig, undefined, name);\n\t};\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport class CheckBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteCheckBuilder';\n\n\tprotected brand!: 'SQLiteConstraintBuilder';\n\n\tconstructor(public name: string, public value: SQL) {}\n\n\tbuild(table: SQLiteTable): Check {\n\t\treturn new Check(table, this);\n\t}\n}\n\nexport class Check {\n\tstatic readonly [entityKind]: string = 'SQLiteCheck';\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteCheck';\n\t};\n\n\treadonly name: string;\n\treadonly value: SQL;\n\n\tconstructor(public table: SQLiteTable, builder: CheckBuilder) {\n\t\tthis.name = builder.name;\n\t\tthis.value = builder.value;\n\t}\n}\n\nexport function check(name: string, value: SQL): CheckBuilder {\n\treturn new CheckBuilder(name, value);\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { SQLiteColumn } from './columns/index.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport interface IndexConfig {\n\tname: string;\n\tcolumns: IndexColumn[];\n\tunique: boolean;\n\twhere: SQL | undefined;\n}\n\nexport type IndexColumn = SQLiteColumn | SQL;\n\nexport class IndexBuilderOn {\n\tstatic readonly [entityKind]: string = 'SQLiteIndexBuilderOn';\n\n\tconstructor(private name: string, private unique: boolean) {}\n\n\ton(...columns: [IndexColumn, ...IndexColumn[]]): IndexBuilder {\n\t\treturn new IndexBuilder(this.name, columns, this.unique);\n\t}\n}\n\nexport class IndexBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteIndexBuilder';\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteIndexBuilder';\n\t};\n\n\t/** @internal */\n\tconfig: IndexConfig;\n\n\tconstructor(name: string, columns: IndexColumn[], unique: boolean) {\n\t\tthis.config = {\n\t\t\tname,\n\t\t\tcolumns,\n\t\t\tunique,\n\t\t\twhere: undefined,\n\t\t};\n\t}\n\n\t/**\n\t * Condition for partial index.\n\t */\n\twhere(condition: SQL): this {\n\t\tthis.config.where = condition;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): Index {\n\t\treturn new Index(this.config, table);\n\t}\n}\n\nexport class Index {\n\tstatic readonly [entityKind]: string = 'SQLiteIndex';\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteIndex';\n\t};\n\n\treadonly config: IndexConfig & { table: SQLiteTable };\n\n\tconstructor(config: IndexConfig, table: SQLiteTable) {\n\t\tthis.config = { ...config, table };\n\t}\n}\n\nexport function index(name: string): IndexBuilderOn {\n\treturn new IndexBuilderOn(name, false);\n}\n\nexport function uniqueIndex(name: string): IndexBuilderOn {\n\treturn new IndexBuilderOn(name, true);\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { AnySQLiteColumn, SQLiteColumn } from './columns/index.ts';\nimport { SQLiteTable } from './table.ts';\n\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumn extends AnySQLiteColumn<{ tableName: TTableName }>,\n\tTColumns extends AnySQLiteColumn<{ tableName: TTableName }>[],\n>(config: { name?: string; columns: [TColumn, ...TColumns] }): PrimaryKeyBuilder;\n/**\n * @deprecated: Please use primaryKey({ columns: [] }) instead of this function\n * @param columns\n */\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumns extends AnySQLiteColumn<{ tableName: TTableName }>[],\n>(...columns: TColumns): PrimaryKeyBuilder;\nexport function primaryKey(...config: any) {\n\tif (config[0].columns) {\n\t\treturn new PrimaryKeyBuilder(config[0].columns, config[0].name);\n\t}\n\treturn new PrimaryKeyBuilder(config);\n}\nexport class PrimaryKeyBuilder {\n\tstatic readonly [entityKind]: string = 'SQLitePrimaryKeyBuilder';\n\n\tdeclare _: {\n\t\tbrand: 'SQLitePrimaryKeyBuilder';\n\t};\n\n\t/** @internal */\n\tcolumns: SQLiteColumn[];\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tcolumns: SQLiteColumn[],\n\t\tname?: string,\n\t) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): PrimaryKey {\n\t\treturn new PrimaryKey(table, this.columns, this.name);\n\t}\n}\n\nexport class PrimaryKey {\n\tstatic readonly [entityKind]: string = 'SQLitePrimaryKey';\n\n\treadonly columns: SQLiteColumn[];\n\treadonly name?: string;\n\n\tconstructor(readonly table: SQLiteTable, columns: SQLiteColumn[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\tgetName(): string {\n\t\treturn this.name\n\t\t\t?? `${this.table[SQLiteTable.Symbol.Name]}_${this.columns.map((column) => column.name).join('_')}_pk`;\n\t}\n}\n", "import { is } from '~/entity.ts';\nimport { SQL } from '~/sql/sql.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { Table } from '~/table.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport type { Check } from './checks.ts';\nimport { CheckBuilder } from './checks.ts';\nimport type { ForeignKey } from './foreign-keys.ts';\nimport { ForeignKeyBuilder } from './foreign-keys.ts';\nimport type { Index } from './indexes.ts';\nimport { IndexBuilder } from './indexes.ts';\nimport type { PrimaryKey } from './primary-keys.ts';\nimport { PrimaryKeyBuilder } from './primary-keys.ts';\nimport { SQLiteTable } from './table.ts';\nimport { type UniqueConstraint, UniqueConstraintBuilder } from './unique-constraint.ts';\nimport type { SQLiteViewBase } from './view-base.ts';\nimport type { SQLiteView } from './view.ts';\n\nexport function getTableConfig(table: TTable) {\n\tconst columns = Object.values(table[SQLiteTable.Symbol.Columns]);\n\tconst indexes: Index[] = [];\n\tconst checks: Check[] = [];\n\tconst primaryKeys: PrimaryKey[] = [];\n\tconst uniqueConstraints: UniqueConstraint[] = [];\n\tconst foreignKeys: ForeignKey[] = Object.values(table[SQLiteTable.Symbol.InlineForeignKeys]);\n\tconst name = table[Table.Symbol.Name];\n\n\tconst extraConfigBuilder = table[SQLiteTable.Symbol.ExtraConfigBuilder];\n\n\tif (extraConfigBuilder !== undefined) {\n\t\tconst extraConfig = extraConfigBuilder(table[SQLiteTable.Symbol.Columns]);\n\t\tconst extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) as any[] : Object.values(extraConfig);\n\t\tfor (const builder of Object.values(extraValues)) {\n\t\t\tif (is(builder, IndexBuilder)) {\n\t\t\t\tindexes.push(builder.build(table));\n\t\t\t} else if (is(builder, CheckBuilder)) {\n\t\t\t\tchecks.push(builder.build(table));\n\t\t\t} else if (is(builder, UniqueConstraintBuilder)) {\n\t\t\t\tuniqueConstraints.push(builder.build(table));\n\t\t\t} else if (is(builder, PrimaryKeyBuilder)) {\n\t\t\t\tprimaryKeys.push(builder.build(table));\n\t\t\t} else if (is(builder, ForeignKeyBuilder)) {\n\t\t\t\tforeignKeys.push(builder.build(table));\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tcolumns,\n\t\tindexes,\n\t\tforeignKeys,\n\t\tchecks,\n\t\tprimaryKeys,\n\t\tuniqueConstraints,\n\t\tname,\n\t};\n}\n\nexport function extractUsedTable(table: SQLiteTable | Subquery | SQLiteViewBase | SQL): string[] {\n\tif (is(table, SQLiteTable)) {\n\t\treturn [`${table[Table.Symbol.BaseName]}`];\n\t}\n\tif (is(table, Subquery)) {\n\t\treturn table._.usedTables ?? [];\n\t}\n\tif (is(table, SQL)) {\n\t\treturn table.usedTables ?? [];\n\t}\n\treturn [];\n}\n\nexport type OnConflict = 'rollback' | 'abort' | 'fail' | 'ignore' | 'replace';\n\nexport function getViewConfig<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n>(view: SQLiteView) {\n\treturn {\n\t\t...view[ViewBaseConfig],\n\t\t// ...view[SQLiteViewConfig],\n\t};\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { SelectResultFields } from '~/query-builders/select.types.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { Placeholder, Query, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteDialect } from '~/sqlite-core/dialect.ts';\nimport type { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/session.ts';\nimport { SQLiteTable } from '~/sqlite-core/table.ts';\nimport type { Subquery } from '~/subquery.ts';\nimport { Table } from '~/table.ts';\nimport { type DrizzleTypeError, orderSelectedFields, type ValueOrArray } from '~/utils.ts';\nimport type { SQLiteColumn } from '../columns/common.ts';\nimport { extractUsedTable } from '../utils.ts';\nimport type { SelectedFieldsFlat, SelectedFieldsOrdered } from './select.types.ts';\n\nexport type SQLiteDeleteWithout<\n\tT extends AnySQLiteDeleteBase,\n\tTDynamic extends boolean,\n\tK extends keyof T & string,\n> = TDynamic extends true ? T\n\t: Omit<\n\t\tSQLiteDeleteBase<\n\t\t\tT['_']['table'],\n\t\t\tT['_']['resultType'],\n\t\t\tT['_']['runResult'],\n\t\t\tT['_']['returning'],\n\t\t\tTDynamic,\n\t\t\tT['_']['excludedMethods'] | K\n\t\t>,\n\t\tT['_']['excludedMethods'] | K\n\t>;\n\nexport type SQLiteDelete<\n\tTTable extends SQLiteTable = SQLiteTable,\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = unknown,\n\tTReturning extends Record | undefined = undefined,\n> = SQLiteDeleteBase;\n\nexport interface SQLiteDeleteConfig {\n\twhere?: SQL | undefined;\n\tlimit?: number | Placeholder;\n\torderBy?: (SQLiteColumn | SQL | SQL.Aliased)[];\n\ttable: SQLiteTable;\n\treturning?: SelectedFieldsOrdered;\n\twithList?: Subquery[];\n}\n\nexport type SQLiteDeleteReturningAll<\n\tT extends AnySQLiteDeleteBase,\n\tTDynamic extends boolean,\n> = SQLiteDeleteWithout<\n\tSQLiteDeleteBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['table']['$inferSelect'],\n\t\tT['_']['dynamic'],\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteDeleteReturning<\n\tT extends AnySQLiteDeleteBase,\n\tTDynamic extends boolean,\n\tTSelectedFields extends SelectedFieldsFlat,\n> = SQLiteDeleteWithout<\n\tSQLiteDeleteBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tSelectResultFields,\n\t\tT['_']['dynamic'],\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteDeleteExecute = T['_']['returning'] extends undefined\n\t? T['_']['runResult']\n\t: T['_']['returning'][];\n\nexport type SQLiteDeletePrepare = SQLitePreparedQuery<{\n\ttype: T['_']['resultType'];\n\trun: T['_']['runResult'];\n\tall: T['_']['returning'] extends undefined ? DrizzleTypeError<'.all() cannot be used without .returning()'>\n\t\t: T['_']['returning'][];\n\tget: T['_']['returning'] extends undefined ? DrizzleTypeError<'.get() cannot be used without .returning()'>\n\t\t: T['_']['returning'] | undefined;\n\tvalues: T['_']['returning'] extends undefined ? DrizzleTypeError<'.values() cannot be used without .returning()'>\n\t\t: any[][];\n\texecute: SQLiteDeleteExecute;\n}>;\n\nexport type SQLiteDeleteDynamic = SQLiteDelete<\n\tT['_']['table'],\n\tT['_']['resultType'],\n\tT['_']['runResult'],\n\tT['_']['returning']\n>;\n\nexport type AnySQLiteDeleteBase = SQLiteDeleteBase;\n\nexport interface SQLiteDeleteBase<\n\tTTable extends SQLiteTable,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTReturning extends Record | undefined = undefined,\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n> extends\n\tQueryPromise,\n\tRunnableQuery,\n\tSQLWrapper\n{\n\treadonly _: {\n\t\tdialect: 'sqlite';\n\t\treadonly table: TTable;\n\t\treadonly resultType: TResultType;\n\t\treadonly runResult: TRunResult;\n\t\treadonly returning: TReturning;\n\t\treadonly dynamic: TDynamic;\n\t\treadonly excludedMethods: TExcludedMethods;\n\t\treadonly result: TReturning extends undefined ? TRunResult : TReturning[];\n\t};\n}\n\nexport class SQLiteDeleteBase<\n\tTTable extends SQLiteTable,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTReturning extends Record | undefined = undefined,\n\tTDynamic extends boolean = false,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTExcludedMethods extends string = never,\n> extends QueryPromise\n\timplements RunnableQuery, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteDelete';\n\n\t/** @internal */\n\tconfig: SQLiteDeleteConfig;\n\n\tconstructor(\n\t\tprivate table: TTable,\n\t\tprivate session: SQLiteSession,\n\t\tprivate dialect: SQLiteDialect,\n\t\twithList?: Subquery[],\n\t) {\n\t\tsuper();\n\t\tthis.config = { table, withList };\n\t}\n\n\t/**\n\t * Adds a `where` clause to the query.\n\t *\n\t * Calling this method will delete only those rows that fulfill a specified condition.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/delete}\n\t *\n\t * @param where the `where` clause.\n\t *\n\t * @example\n\t * You can use conditional operators and `sql function` to filter the rows to be deleted.\n\t *\n\t * ```ts\n\t * // Delete all cars with green color\n\t * db.delete(cars).where(eq(cars.color, 'green'));\n\t * // or\n\t * db.delete(cars).where(sql`${cars.color} = 'green'`)\n\t * ```\n\t *\n\t * You can logically combine conditional operators with `and()` and `or()` operators:\n\t *\n\t * ```ts\n\t * // Delete all BMW cars with a green color\n\t * db.delete(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW')));\n\t *\n\t * // Delete all cars with the green or blue color\n\t * db.delete(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue')));\n\t * ```\n\t */\n\twhere(where: SQL | undefined): SQLiteDeleteWithout {\n\t\tthis.config.where = where;\n\t\treturn this as any;\n\t}\n\n\torderBy(\n\t\tbuilder: (deleteTable: TTable) => ValueOrArray,\n\t): SQLiteDeleteWithout;\n\torderBy(...columns: (SQLiteColumn | SQL | SQL.Aliased)[]): SQLiteDeleteWithout;\n\torderBy(\n\t\t...columns:\n\t\t\t| [(deleteTable: TTable) => ValueOrArray]\n\t\t\t| (SQLiteColumn | SQL | SQL.Aliased)[]\n\t): SQLiteDeleteWithout {\n\t\tif (typeof columns[0] === 'function') {\n\t\t\tconst orderBy = columns[0](\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.table[Table.Symbol.Columns],\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'alias', sqlBehavior: 'sql' }),\n\t\t\t\t) as any,\n\t\t\t);\n\n\t\t\tconst orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy];\n\t\t\tthis.config.orderBy = orderByArray;\n\t\t} else {\n\t\t\tconst orderByArray = columns as (SQLiteColumn | SQL | SQL.Aliased)[];\n\t\t\tthis.config.orderBy = orderByArray;\n\t\t}\n\t\treturn this as any;\n\t}\n\n\tlimit(limit: number | Placeholder): SQLiteDeleteWithout {\n\t\tthis.config.limit = limit;\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `returning` clause to the query.\n\t *\n\t * Calling this method will return the specified fields of the deleted rows. If no fields are specified, all fields will be returned.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/delete#delete-with-return}\n\t *\n\t * @example\n\t * ```ts\n\t * // Delete all cars with the green color and return all fields\n\t * const deletedCars: Car[] = await db.delete(cars)\n\t * .where(eq(cars.color, 'green'))\n\t * .returning();\n\t *\n\t * // Delete all cars with the green color and return only their id and brand fields\n\t * const deletedCarsIdsAndBrands: { id: number, brand: string }[] = await db.delete(cars)\n\t * .where(eq(cars.color, 'green'))\n\t * .returning({ id: cars.id, brand: cars.brand });\n\t * ```\n\t */\n\treturning(): SQLiteDeleteReturningAll;\n\treturning(\n\t\tfields: TSelectedFields,\n\t): SQLiteDeleteReturning;\n\treturning(\n\t\tfields: SelectedFieldsFlat = this.table[SQLiteTable.Symbol.Columns],\n\t): SQLiteDeleteReturning {\n\t\tthis.config.returning = orderSelectedFields(fields);\n\t\treturn this as any;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildDeleteQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\t/** @internal */\n\t_prepare(isOneTimeQuery = true): SQLiteDeletePrepare {\n\t\treturn this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tthis.dialect.sqlToQuery(this.getSQL()),\n\t\t\tthis.config.returning,\n\t\t\tthis.config.returning ? 'all' : 'run',\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\ttype: 'delete',\n\t\t\t\ttables: extractUsedTable(this.config.table),\n\t\t\t},\n\t\t) as SQLiteDeletePrepare;\n\t}\n\n\tprepare(): SQLiteDeletePrepare {\n\t\treturn this._prepare(false);\n\t}\n\n\trun: ReturnType['run'] = (placeholderValues) => {\n\t\treturn this._prepare().run(placeholderValues);\n\t};\n\n\tall: ReturnType['all'] = (placeholderValues) => {\n\t\treturn this._prepare().all(placeholderValues);\n\t};\n\n\tget: ReturnType['get'] = (placeholderValues) => {\n\t\treturn this._prepare().get(placeholderValues);\n\t};\n\n\tvalues: ReturnType['values'] = (placeholderValues) => {\n\t\treturn this._prepare().values(placeholderValues);\n\t};\n\n\toverride async execute(placeholderValues?: Record): Promise> {\n\t\treturn this._prepare().execute(placeholderValues) as SQLiteDeleteExecute;\n\t}\n\n\t$dynamic(): SQLiteDeleteDynamic {\n\t\treturn this as any;\n\t}\n}\n", "import type { Column } from '~/column.ts';\nimport { entityKind } from './entity.ts';\nimport { Table } from './table.ts';\nimport type { Casing } from './utils.ts';\n\nexport function toSnakeCase(input: string) {\n\tconst words = input\n\t\t.replace(/['\\u2019]/g, '')\n\t\t.match(/[\\da-z]+|[A-Z]+(?![a-z])|[A-Z][\\da-z]+/g) ?? [];\n\n\treturn words.map((word) => word.toLowerCase()).join('_');\n}\n\nexport function toCamelCase(input: string) {\n\tconst words = input\n\t\t.replace(/['\\u2019]/g, '')\n\t\t.match(/[\\da-z]+|[A-Z]+(?![a-z])|[A-Z][\\da-z]+/g) ?? [];\n\n\treturn words.reduce((acc, word, i) => {\n\t\tconst formattedWord = i === 0 ? word.toLowerCase() : `${word[0]!.toUpperCase()}${word.slice(1)}`;\n\t\treturn acc + formattedWord;\n\t}, '');\n}\n\nfunction noopCase(input: string) {\n\treturn input;\n}\n\nexport class CasingCache {\n\tstatic readonly [entityKind]: string = 'CasingCache';\n\n\t/** @internal */\n\tcache: Record = {};\n\tprivate cachedTables: Record = {};\n\tprivate convert: (input: string) => string;\n\n\tconstructor(casing?: Casing) {\n\t\tthis.convert = casing === 'snake_case'\n\t\t\t? toSnakeCase\n\t\t\t: casing === 'camelCase'\n\t\t\t? toCamelCase\n\t\t\t: noopCase;\n\t}\n\n\tgetColumnCasing(column: Column): string {\n\t\tif (!column.keyAsName) return column.name;\n\n\t\tconst schema = column.table[Table.Symbol.Schema] ?? 'public';\n\t\tconst tableName = column.table[Table.Symbol.OriginalName];\n\t\tconst key = `${schema}.${tableName}.${column.name}`;\n\n\t\tif (!this.cache[key]) {\n\t\t\tthis.cacheTable(column.table);\n\t\t}\n\t\treturn this.cache[key]!;\n\t}\n\n\tprivate cacheTable(table: Table) {\n\t\tconst schema = table[Table.Symbol.Schema] ?? 'public';\n\t\tconst tableName = table[Table.Symbol.OriginalName];\n\t\tconst tableKey = `${schema}.${tableName}`;\n\n\t\tif (!this.cachedTables[tableKey]) {\n\t\t\tfor (const column of Object.values(table[Table.Symbol.Columns])) {\n\t\t\t\tconst columnKey = `${tableKey}.${column.name}`;\n\t\t\t\tthis.cache[columnKey] = this.convert(column.name);\n\t\t\t}\n\t\t\tthis.cachedTables[tableKey] = true;\n\t\t}\n\t}\n\n\tclearCache() {\n\t\tthis.cache = {};\n\t\tthis.cachedTables = {};\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\n\nexport class DrizzleError extends Error {\n\tstatic readonly [entityKind]: string = 'DrizzleError';\n\n\tconstructor({ message, cause }: { message?: string; cause?: unknown }) {\n\t\tsuper(message);\n\t\tthis.name = 'DrizzleError';\n\t\tthis.cause = cause;\n\t}\n}\n\nexport class DrizzleQueryError extends Error {\n\tconstructor(\n\t\tpublic query: string,\n\t\tpublic params: any[],\n\t\tpublic override cause?: Error,\n\t) {\n\t\tsuper(`Failed query: ${query}\\nparams: ${params}`);\n\t\tError.captureStackTrace(this, DrizzleQueryError);\n\n\t\t// ES2022+: preserves original error on `.cause`\n\t\tif (cause) (this as any).cause = cause;\n\t}\n}\n\nexport class TransactionRollbackError extends DrizzleError {\n\tstatic override readonly [entityKind]: string = 'TransactionRollbackError';\n\n\tconstructor() {\n\t\tsuper({ message: 'Rollback' });\n\t}\n}\n", "import { type AnyColumn, Column } from '~/column.ts';\nimport { is } from '~/entity.ts';\nimport { type SQL, sql, type SQLWrapper } from '../sql.ts';\n\n/**\n * Returns the number of values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Number employees with null values\n * db.select({ value: count() }).from(employees)\n * // Number of employees where `name` is not null\n * db.select({ value: count(employees.name) }).from(employees)\n * ```\n *\n * @see countDistinct to get the number of non-duplicate values in `expression`\n */\nexport function count(expression?: SQLWrapper): SQL {\n\treturn sql`count(${expression || sql.raw('*')})`.mapWith(Number);\n}\n\n/**\n * Returns the number of non-duplicate values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Number of employees where `name` is distinct\n * db.select({ value: countDistinct(employees.name) }).from(employees)\n * ```\n *\n * @see count to get the number of values in `expression`, including duplicates\n */\nexport function countDistinct(expression: SQLWrapper): SQL {\n\treturn sql`count(distinct ${expression})`.mapWith(Number);\n}\n\n/**\n * Returns the average (arithmetic mean) of all non-null values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Average salary of an employee\n * db.select({ value: avg(employees.salary) }).from(employees)\n * ```\n *\n * @see avgDistinct to get the average of all non-null and non-duplicate values in `expression`\n */\nexport function avg(expression: SQLWrapper): SQL {\n\treturn sql`avg(${expression})`.mapWith(String);\n}\n\n/**\n * Returns the average (arithmetic mean) of all non-null and non-duplicate values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Average salary of an employee where `salary` is distinct\n * db.select({ value: avgDistinct(employees.salary) }).from(employees)\n * ```\n *\n * @see avg to get the average of all non-null values in `expression`, including duplicates\n */\nexport function avgDistinct(expression: SQLWrapper): SQL {\n\treturn sql`avg(distinct ${expression})`.mapWith(String);\n}\n\n/**\n * Returns the sum of all non-null values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Sum of every employee's salary\n * db.select({ value: sum(employees.salary) }).from(employees)\n * ```\n *\n * @see sumDistinct to get the sum of all non-null and non-duplicate values in `expression`\n */\nexport function sum(expression: SQLWrapper): SQL {\n\treturn sql`sum(${expression})`.mapWith(String);\n}\n\n/**\n * Returns the sum of all non-null and non-duplicate values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Sum of every employee's salary where `salary` is distinct (no duplicates)\n * db.select({ value: sumDistinct(employees.salary) }).from(employees)\n * ```\n *\n * @see sum to get the sum of all non-null values in `expression`, including duplicates\n */\nexport function sumDistinct(expression: SQLWrapper): SQL {\n\treturn sql`sum(distinct ${expression})`.mapWith(String);\n}\n\n/**\n * Returns the maximum value in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // The employee with the highest salary\n * db.select({ value: max(employees.salary) }).from(employees)\n * ```\n */\nexport function max(expression: T): SQL<(T extends AnyColumn ? T['_']['data'] : string) | null> {\n\treturn sql`max(${expression})`.mapWith(is(expression, Column) ? expression : String) as any;\n}\n\n/**\n * Returns the minimum value in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // The employee with the lowest salary\n * db.select({ value: min(employees.salary) }).from(employees)\n * ```\n */\nexport function min(expression: T): SQL<(T extends AnyColumn ? T['_']['data'] : string) | null> {\n\treturn sql`min(${expression})`.mapWith(is(expression, Column) ? expression : String) as any;\n}\n", "import type { AnyColumn } from '~/column.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport { type SQL, sql, type SQLWrapper } from '../sql.ts';\n\nfunction toSql(value: number[] | string[]): string {\n\treturn JSON.stringify(value);\n}\n\n/**\n * Used in sorting and in querying, if used in sorting,\n * this specifies that the given column or expression should be sorted in an order\n * that minimizes the L2 distance to the given value.\n * If used in querying, this specifies that it should return the L2 distance\n * between the given column or expression and the given value.\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(l2Distance(cars.embedding, embedding));\n * ```\n *\n * ```ts\n * // Select distance of cars and embedding\n * // to the given embedding\n * db.select({distance: l2Distance(cars.embedding, embedding)}).from(cars)\n * ```\n */\nexport function l2Distance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <-> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <-> ${value}`;\n}\n\n/**\n * L1 distance is one of the possible distance measures between two probability distribution vectors and it is\n * calculated as the sum of the absolute differences.\n * The smaller the distance between the observed probability vectors, the higher the accuracy of the synthetic data\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(l1Distance(cars.embedding, embedding));\n * ```\n *\n * ```ts\n * // Select distance of cars and embedding\n * // to the given embedding\n * db.select({distance: l1Distance(cars.embedding, embedding)}).from(cars)\n * ```\n */\nexport function l1Distance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <+> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <+> ${value}`;\n}\n\n/**\n * Used in sorting and in querying, if used in sorting,\n * this specifies that the given column or expression should be sorted in an order\n * that minimizes the inner product distance to the given value.\n * If used in querying, this specifies that it should return the inner product distance\n * between the given column or expression and the given value.\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(innerProduct(cars.embedding, embedding));\n * ```\n *\n * ```ts\n * // Select distance of cars and embedding\n * // to the given embedding\n * db.select({ distance: innerProduct(cars.embedding, embedding) }).from(cars)\n * ```\n */\nexport function innerProduct(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <#> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <#> ${value}`;\n}\n\n/**\n * Used in sorting and in querying, if used in sorting,\n * this specifies that the given column or expression should be sorted in an order\n * that minimizes the cosine distance to the given value.\n * If used in querying, this specifies that it should return the cosine distance\n * between the given column or expression and the given value.\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(cosineDistance(cars.embedding, embedding));\n * ```\n *\n * ```ts\n * // Select distance of cars and embedding\n * // to the given embedding\n * db.select({distance: cosineDistance(cars.embedding, embedding)}).from(cars)\n * ```\n */\nexport function cosineDistance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <=> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <=> ${value}`;\n}\n\n/**\n * Hamming distance between two strings or vectors of equal length is the number of positions at which the\n * corresponding symbols are different. In other words, it measures the minimum number of\n * substitutions required to change one string into the other, or equivalently,\n * the minimum number of errors that could have transformed one string into the other\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(hammingDistance(cars.embedding, embedding));\n * ```\n */\nexport function hammingDistance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <~> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <~> ${value}`;\n}\n\n/**\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(jaccardDistance(cars.embedding, embedding));\n * ```\n */\nexport function jaccardDistance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <%> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <%> ${value}`;\n}\n", "export * from './aggregate.ts';\nexport * from './vector.ts';\n", "export * from './expressions/index.ts';\nexport * from './functions/index.ts';\nexport * from './sql.ts';\n", "export * from './blob.ts';\nexport * from './common.ts';\nexport * from './custom.ts';\nexport * from './integer.ts';\nexport * from './numeric.ts';\nexport * from './real.ts';\nexport * from './text.ts';\n", "import { entityKind } from '~/entity.ts';\nimport type { ColumnsSelection } from '~/sql/sql.ts';\nimport { View } from '~/sql/sql.ts';\n\nexport abstract class SQLiteViewBase<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n\tTSelection extends ColumnsSelection = ColumnsSelection,\n> extends View {\n\tstatic override readonly [entityKind]: string = 'SQLiteViewBase';\n\n\tdeclare _: View['_'] & {\n\t\tviewBrand: 'SQLiteView';\n\t};\n}\n", "import { aliasedTable, aliasedTableColumn, mapColumnsInAliasedSQLToAlias, mapColumnsInSQLToAlias } from '~/alias.ts';\nimport { CasingCache } from '~/casing.ts';\nimport type { AnyColumn } from '~/column.ts';\nimport { Column } from '~/column.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport { DrizzleError } from '~/errors.ts';\nimport type { MigrationConfig, MigrationMeta } from '~/migrator.ts';\nimport {\n\ttype BuildRelationalQueryResult,\n\ttype DBQueryConfig,\n\tgetOperators,\n\tgetOrderByOperators,\n\tMany,\n\tnormalizeRelation,\n\tOne,\n\ttype Relation,\n\ttype TableRelationalConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport type { Name, Placeholder } from '~/sql/index.ts';\nimport { and, eq } from '~/sql/index.ts';\nimport { Param, type QueryWithTypings, SQL, sql, type SQLChunk } from '~/sql/sql.ts';\nimport { SQLiteColumn } from '~/sqlite-core/columns/index.ts';\nimport type {\n\tAnySQLiteSelectQueryBuilder,\n\tSQLiteDeleteConfig,\n\tSQLiteInsertConfig,\n\tSQLiteUpdateConfig,\n} from '~/sqlite-core/query-builders/index.ts';\nimport { SQLiteTable } from '~/sqlite-core/table.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { getTableName, getTableUniqueName, Table } from '~/table.ts';\nimport { type Casing, orderSelectedFields, type UpdateSet } from '~/utils.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport type {\n\tSelectedFieldsOrdered,\n\tSQLiteSelectConfig,\n\tSQLiteSelectJoinConfig,\n} from './query-builders/select.types.ts';\nimport type { SQLiteSession } from './session.ts';\nimport { SQLiteViewBase } from './view-base.ts';\n\nexport interface SQLiteDialectConfig {\n\tcasing?: Casing;\n}\n\nexport abstract class SQLiteDialect {\n\tstatic readonly [entityKind]: string = 'SQLiteDialect';\n\n\t/** @internal */\n\treadonly casing: CasingCache;\n\n\tconstructor(config?: SQLiteDialectConfig) {\n\t\tthis.casing = new CasingCache(config?.casing);\n\t}\n\n\tescapeName(name: string): string {\n\t\treturn `\"${name}\"`;\n\t}\n\n\tescapeParam(_num: number): string {\n\t\treturn '?';\n\t}\n\n\tescapeString(str: string): string {\n\t\treturn `'${str.replace(/'/g, \"''\")}'`;\n\t}\n\n\tprivate buildWithCTE(queries: Subquery[] | undefined): SQL | undefined {\n\t\tif (!queries?.length) return undefined;\n\n\t\tconst withSqlChunks = [sql`with `];\n\t\tfor (const [i, w] of queries.entries()) {\n\t\t\twithSqlChunks.push(sql`${sql.identifier(w._.alias)} as (${w._.sql})`);\n\t\t\tif (i < queries.length - 1) {\n\t\t\t\twithSqlChunks.push(sql`, `);\n\t\t\t}\n\t\t}\n\t\twithSqlChunks.push(sql` `);\n\t\treturn sql.join(withSqlChunks);\n\t}\n\n\tbuildDeleteQuery({ table, where, returning, withList, limit, orderBy }: SQLiteDeleteConfig): SQL {\n\t\tconst withSql = this.buildWithCTE(withList);\n\n\t\tconst returningSql = returning\n\t\t\t? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}`\n\t\t\t: undefined;\n\n\t\tconst whereSql = where ? sql` where ${where}` : undefined;\n\n\t\tconst orderBySql = this.buildOrderBy(orderBy);\n\n\t\tconst limitSql = this.buildLimit(limit);\n\n\t\treturn sql`${withSql}delete from ${table}${whereSql}${returningSql}${orderBySql}${limitSql}`;\n\t}\n\n\tbuildUpdateSet(table: SQLiteTable, set: UpdateSet): SQL {\n\t\tconst tableColumns = table[Table.Symbol.Columns];\n\n\t\tconst columnNames = Object.keys(tableColumns).filter((colName) =>\n\t\t\tset[colName] !== undefined || tableColumns[colName]?.onUpdateFn !== undefined\n\t\t);\n\n\t\tconst setSize = columnNames.length;\n\t\treturn sql.join(columnNames.flatMap((colName, i) => {\n\t\t\tconst col = tableColumns[colName]!;\n\n\t\t\tconst value = set[colName] ?? sql.param(col.onUpdateFn!(), col);\n\t\t\tconst res = sql`${sql.identifier(this.casing.getColumnCasing(col))} = ${value}`;\n\n\t\t\tif (i < setSize - 1) {\n\t\t\t\treturn [res, sql.raw(', ')];\n\t\t\t}\n\t\t\treturn [res];\n\t\t}));\n\t}\n\n\tbuildUpdateQuery({ table, set, where, returning, withList, joins, from, limit, orderBy }: SQLiteUpdateConfig): SQL {\n\t\tconst withSql = this.buildWithCTE(withList);\n\n\t\tconst setSql = this.buildUpdateSet(table, set);\n\n\t\tconst fromSql = from && sql.join([sql.raw(' from '), this.buildFromTable(from)]);\n\n\t\tconst joinsSql = this.buildJoins(joins);\n\n\t\tconst returningSql = returning\n\t\t\t? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}`\n\t\t\t: undefined;\n\n\t\tconst whereSql = where ? sql` where ${where}` : undefined;\n\n\t\tconst orderBySql = this.buildOrderBy(orderBy);\n\n\t\tconst limitSql = this.buildLimit(limit);\n\n\t\treturn sql`${withSql}update ${table} set ${setSql}${fromSql}${joinsSql}${whereSql}${returningSql}${orderBySql}${limitSql}`;\n\t}\n\n\t/**\n\t * Builds selection SQL with provided fields/expressions\n\t *\n\t * Examples:\n\t *\n\t * `select from`\n\t *\n\t * `insert ... returning `\n\t *\n\t * If `isSingleTable` is true, then columns won't be prefixed with table name\n\t */\n\tprivate buildSelection(\n\t\tfields: SelectedFieldsOrdered,\n\t\t{ isSingleTable = false }: { isSingleTable?: boolean } = {},\n\t): SQL {\n\t\tconst columnsLen = fields.length;\n\n\t\tconst chunks = fields\n\t\t\t.flatMap(({ field }, i) => {\n\t\t\t\tconst chunk: SQLChunk[] = [];\n\n\t\t\t\tif (is(field, SQL.Aliased) && field.isSelectionField) {\n\t\t\t\t\tchunk.push(sql.identifier(field.fieldAlias));\n\t\t\t\t} else if (is(field, SQL.Aliased) || is(field, SQL)) {\n\t\t\t\t\tconst query = is(field, SQL.Aliased) ? field.sql : field;\n\n\t\t\t\t\tif (isSingleTable) {\n\t\t\t\t\t\tchunk.push(\n\t\t\t\t\t\t\tnew SQL(\n\t\t\t\t\t\t\t\tquery.queryChunks.map((c) => {\n\t\t\t\t\t\t\t\t\tif (is(c, Column)) {\n\t\t\t\t\t\t\t\t\t\treturn sql.identifier(this.casing.getColumnCasing(c));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn c;\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchunk.push(query);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (is(field, SQL.Aliased)) {\n\t\t\t\t\t\tchunk.push(sql` as ${sql.identifier(field.fieldAlias)}`);\n\t\t\t\t\t}\n\t\t\t\t} else if (is(field, Column)) {\n\t\t\t\t\tconst tableName = field.table[Table.Symbol.Name];\n\t\t\t\t\tif (field.columnType === 'SQLiteNumericBigInt') {\n\t\t\t\t\t\tif (isSingleTable) {\n\t\t\t\t\t\t\tchunk.push(sql`cast(${sql.identifier(this.casing.getColumnCasing(field))} as text)`);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchunk.push(\n\t\t\t\t\t\t\t\tsql`cast(${sql.identifier(tableName)}.${sql.identifier(this.casing.getColumnCasing(field))} as text)`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (isSingleTable) {\n\t\t\t\t\t\t\tchunk.push(sql.identifier(this.casing.getColumnCasing(field)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchunk.push(sql`${sql.identifier(tableName)}.${sql.identifier(this.casing.getColumnCasing(field))}`);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (i < columnsLen - 1) {\n\t\t\t\t\tchunk.push(sql`, `);\n\t\t\t\t}\n\n\t\t\t\treturn chunk;\n\t\t\t});\n\n\t\treturn sql.join(chunks);\n\t}\n\n\tprivate buildJoins(joins: SQLiteSelectJoinConfig[] | undefined): SQL | undefined {\n\t\tif (!joins || joins.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst joinsArray: SQL[] = [];\n\n\t\tif (joins) {\n\t\t\tfor (const [index, joinMeta] of joins.entries()) {\n\t\t\t\tif (index === 0) {\n\t\t\t\t\tjoinsArray.push(sql` `);\n\t\t\t\t}\n\t\t\t\tconst table = joinMeta.table;\n\t\t\t\tconst onSql = joinMeta.on ? sql` on ${joinMeta.on}` : undefined;\n\n\t\t\t\tif (is(table, SQLiteTable)) {\n\t\t\t\t\tconst tableName = table[SQLiteTable.Symbol.Name];\n\t\t\t\t\tconst tableSchema = table[SQLiteTable.Symbol.Schema];\n\t\t\t\t\tconst origTableName = table[SQLiteTable.Symbol.OriginalName];\n\t\t\t\t\tconst alias = tableName === origTableName ? undefined : joinMeta.alias;\n\t\t\t\t\tjoinsArray.push(\n\t\t\t\t\t\tsql`${sql.raw(joinMeta.joinType)} join ${tableSchema ? sql`${sql.identifier(tableSchema)}.` : undefined}${\n\t\t\t\t\t\t\tsql.identifier(origTableName)\n\t\t\t\t\t\t}${alias && sql` ${sql.identifier(alias)}`}${onSql}`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tjoinsArray.push(\n\t\t\t\t\t\tsql`${sql.raw(joinMeta.joinType)} join ${table}${onSql}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (index < joins.length - 1) {\n\t\t\t\t\tjoinsArray.push(sql` `);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn sql.join(joinsArray);\n\t}\n\n\tprivate buildLimit(limit: number | Placeholder | undefined): SQL | undefined {\n\t\treturn typeof limit === 'object' || (typeof limit === 'number' && limit >= 0)\n\t\t\t? sql` limit ${limit}`\n\t\t\t: undefined;\n\t}\n\n\tprivate buildOrderBy(orderBy: (SQLiteColumn | SQL | SQL.Aliased)[] | undefined): SQL | undefined {\n\t\tconst orderByList: (SQLiteColumn | SQL | SQL.Aliased)[] = [];\n\n\t\tif (orderBy) {\n\t\t\tfor (const [index, orderByValue] of orderBy.entries()) {\n\t\t\t\torderByList.push(orderByValue);\n\n\t\t\t\tif (index < orderBy.length - 1) {\n\t\t\t\t\torderByList.push(sql`, `);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn orderByList.length > 0 ? sql` order by ${sql.join(orderByList)}` : undefined;\n\t}\n\n\tprivate buildFromTable(\n\t\ttable: SQL | Subquery | SQLiteViewBase | SQLiteTable | undefined,\n\t): SQL | Subquery | SQLiteViewBase | SQLiteTable | undefined {\n\t\tif (is(table, Table) && table[Table.Symbol.IsAlias]) {\n\t\t\treturn sql`${sql`${sql.identifier(table[Table.Symbol.Schema] ?? '')}.`.if(table[Table.Symbol.Schema])}${\n\t\t\t\tsql.identifier(table[Table.Symbol.OriginalName])\n\t\t\t} ${sql.identifier(table[Table.Symbol.Name])}`;\n\t\t}\n\n\t\treturn table;\n\t}\n\n\tbuildSelectQuery(\n\t\t{\n\t\t\twithList,\n\t\t\tfields,\n\t\t\tfieldsFlat,\n\t\t\twhere,\n\t\t\thaving,\n\t\t\ttable,\n\t\t\tjoins,\n\t\t\torderBy,\n\t\t\tgroupBy,\n\t\t\tlimit,\n\t\t\toffset,\n\t\t\tdistinct,\n\t\t\tsetOperators,\n\t\t}: SQLiteSelectConfig,\n\t): SQL {\n\t\tconst fieldsList = fieldsFlat ?? orderSelectedFields(fields);\n\t\tfor (const f of fieldsList) {\n\t\t\tif (\n\t\t\t\tis(f.field, Column)\n\t\t\t\t&& getTableName(f.field.table)\n\t\t\t\t\t!== (is(table, Subquery)\n\t\t\t\t\t\t? table._.alias\n\t\t\t\t\t\t: is(table, SQLiteViewBase)\n\t\t\t\t\t\t? table[ViewBaseConfig].name\n\t\t\t\t\t\t: is(table, SQL)\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: getTableName(table))\n\t\t\t\t&& !((table) =>\n\t\t\t\t\tjoins?.some(({ alias }) =>\n\t\t\t\t\t\talias === (table[Table.Symbol.IsAlias] ? getTableName(table) : table[Table.Symbol.BaseName])\n\t\t\t\t\t))(f.field.table)\n\t\t\t) {\n\t\t\t\tconst tableName = getTableName(f.field.table);\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Your \"${\n\t\t\t\t\t\tf.path.join('->')\n\t\t\t\t\t}\" field references a column \"${tableName}\".\"${f.field.name}\", but the table \"${tableName}\" is not part of the query! Did you forget to join it?`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst isSingleTable = !joins || joins.length === 0;\n\n\t\tconst withSql = this.buildWithCTE(withList);\n\n\t\tconst distinctSql = distinct ? sql` distinct` : undefined;\n\n\t\tconst selection = this.buildSelection(fieldsList, { isSingleTable });\n\n\t\tconst tableSql = this.buildFromTable(table);\n\n\t\tconst joinsSql = this.buildJoins(joins);\n\n\t\tconst whereSql = where ? sql` where ${where}` : undefined;\n\n\t\tconst havingSql = having ? sql` having ${having}` : undefined;\n\n\t\tconst groupByList: (SQL | AnyColumn | SQL.Aliased)[] = [];\n\t\tif (groupBy) {\n\t\t\tfor (const [index, groupByValue] of groupBy.entries()) {\n\t\t\t\tgroupByList.push(groupByValue);\n\n\t\t\t\tif (index < groupBy.length - 1) {\n\t\t\t\t\tgroupByList.push(sql`, `);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst groupBySql = groupByList.length > 0 ? sql` group by ${sql.join(groupByList)}` : undefined;\n\n\t\tconst orderBySql = this.buildOrderBy(orderBy);\n\n\t\tconst limitSql = this.buildLimit(limit);\n\n\t\tconst offsetSql = offset ? sql` offset ${offset}` : undefined;\n\n\t\tconst finalQuery =\n\t\t\tsql`${withSql}select${distinctSql} ${selection} from ${tableSql}${joinsSql}${whereSql}${groupBySql}${havingSql}${orderBySql}${limitSql}${offsetSql}`;\n\n\t\tif (setOperators.length > 0) {\n\t\t\treturn this.buildSetOperations(finalQuery, setOperators);\n\t\t}\n\n\t\treturn finalQuery;\n\t}\n\n\tbuildSetOperations(leftSelect: SQL, setOperators: SQLiteSelectConfig['setOperators']): SQL {\n\t\tconst [setOperator, ...rest] = setOperators;\n\n\t\tif (!setOperator) {\n\t\t\tthrow new Error('Cannot pass undefined values to any set operator');\n\t\t}\n\n\t\tif (rest.length === 0) {\n\t\t\treturn this.buildSetOperationQuery({ leftSelect, setOperator });\n\t\t}\n\n\t\t// Some recursive magic here\n\t\treturn this.buildSetOperations(\n\t\t\tthis.buildSetOperationQuery({ leftSelect, setOperator }),\n\t\t\trest,\n\t\t);\n\t}\n\n\tbuildSetOperationQuery({\n\t\tleftSelect,\n\t\tsetOperator: { type, isAll, rightSelect, limit, orderBy, offset },\n\t}: { leftSelect: SQL; setOperator: SQLiteSelectConfig['setOperators'][number] }): SQL {\n\t\t// SQLite doesn't support parenthesis in set operations\n\t\tconst leftChunk = sql`${leftSelect.getSQL()} `;\n\t\tconst rightChunk = sql`${rightSelect.getSQL()}`;\n\n\t\tlet orderBySql;\n\t\tif (orderBy && orderBy.length > 0) {\n\t\t\tconst orderByValues: (SQL | Name)[] = [];\n\n\t\t\t// The next bit is necessary because the sql operator replaces ${table.column} with `table`.`column`\n\t\t\t// which is invalid Sql syntax, Table from one of the SELECTs cannot be used in global ORDER clause\n\t\t\tfor (const singleOrderBy of orderBy) {\n\t\t\t\tif (is(singleOrderBy, SQLiteColumn)) {\n\t\t\t\t\torderByValues.push(sql.identifier(singleOrderBy.name));\n\t\t\t\t} else if (is(singleOrderBy, SQL)) {\n\t\t\t\t\tfor (let i = 0; i < singleOrderBy.queryChunks.length; i++) {\n\t\t\t\t\t\tconst chunk = singleOrderBy.queryChunks[i];\n\n\t\t\t\t\t\tif (is(chunk, SQLiteColumn)) {\n\t\t\t\t\t\t\tsingleOrderBy.queryChunks[i] = sql.identifier(this.casing.getColumnCasing(chunk));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\torderByValues.push(sql`${singleOrderBy}`);\n\t\t\t\t} else {\n\t\t\t\t\torderByValues.push(sql`${singleOrderBy}`);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\torderBySql = sql` order by ${sql.join(orderByValues, sql`, `)}`;\n\t\t}\n\n\t\tconst limitSql = typeof limit === 'object' || (typeof limit === 'number' && limit >= 0)\n\t\t\t? sql` limit ${limit}`\n\t\t\t: undefined;\n\n\t\tconst operatorChunk = sql.raw(`${type} ${isAll ? 'all ' : ''}`);\n\n\t\tconst offsetSql = offset ? sql` offset ${offset}` : undefined;\n\n\t\treturn sql`${leftChunk}${operatorChunk}${rightChunk}${orderBySql}${limitSql}${offsetSql}`;\n\t}\n\n\tbuildInsertQuery(\n\t\t{ table, values: valuesOrSelect, onConflict, returning, withList, select }: SQLiteInsertConfig,\n\t): SQL {\n\t\t// const isSingleValue = values.length === 1;\n\t\tconst valuesSqlList: ((SQLChunk | SQL)[] | SQL)[] = [];\n\t\tconst columns: Record = table[Table.Symbol.Columns];\n\n\t\tconst colEntries: [string, SQLiteColumn][] = Object.entries(columns).filter(([_, col]) =>\n\t\t\t!col.shouldDisableInsert()\n\t\t);\n\t\tconst insertOrder = colEntries.map(([, column]) => sql.identifier(this.casing.getColumnCasing(column)));\n\n\t\tif (select) {\n\t\t\tconst select = valuesOrSelect as AnySQLiteSelectQueryBuilder | SQL;\n\n\t\t\tif (is(select, SQL)) {\n\t\t\t\tvaluesSqlList.push(select);\n\t\t\t} else {\n\t\t\t\tvaluesSqlList.push(select.getSQL());\n\t\t\t}\n\t\t} else {\n\t\t\tconst values = valuesOrSelect as Record[];\n\t\t\tvaluesSqlList.push(sql.raw('values '));\n\n\t\t\tfor (const [valueIndex, value] of values.entries()) {\n\t\t\t\tconst valueList: (SQLChunk | SQL)[] = [];\n\t\t\t\tfor (const [fieldName, col] of colEntries) {\n\t\t\t\t\tconst colValue = value[fieldName];\n\t\t\t\t\tif (colValue === undefined || (is(colValue, Param) && colValue.value === undefined)) {\n\t\t\t\t\t\tlet defaultValue;\n\t\t\t\t\t\tif (col.default !== null && col.default !== undefined) {\n\t\t\t\t\t\t\tdefaultValue = is(col.default, SQL) ? col.default : sql.param(col.default, col);\n\t\t\t\t\t\t\t// eslint-disable-next-line unicorn/no-negated-condition\n\t\t\t\t\t\t} else if (col.defaultFn !== undefined) {\n\t\t\t\t\t\t\tconst defaultFnResult = col.defaultFn();\n\t\t\t\t\t\t\tdefaultValue = is(defaultFnResult, SQL) ? defaultFnResult : sql.param(defaultFnResult, col);\n\t\t\t\t\t\t\t// eslint-disable-next-line unicorn/no-negated-condition\n\t\t\t\t\t\t} else if (!col.default && col.onUpdateFn !== undefined) {\n\t\t\t\t\t\t\tconst onUpdateFnResult = col.onUpdateFn();\n\t\t\t\t\t\t\tdefaultValue = is(onUpdateFnResult, SQL) ? onUpdateFnResult : sql.param(onUpdateFnResult, col);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdefaultValue = sql`null`;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalueList.push(defaultValue);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalueList.push(colValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvaluesSqlList.push(valueList);\n\t\t\t\tif (valueIndex < values.length - 1) {\n\t\t\t\t\tvaluesSqlList.push(sql`, `);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst withSql = this.buildWithCTE(withList);\n\n\t\tconst valuesSql = sql.join(valuesSqlList);\n\n\t\tconst returningSql = returning\n\t\t\t? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}`\n\t\t\t: undefined;\n\n\t\tconst onConflictSql = onConflict?.length\n\t\t\t? sql.join(onConflict)\n\t\t\t: undefined;\n\n\t\t// if (isSingleValue && valuesSqlList.length === 0){\n\t\t// \treturn sql`insert into ${table} default values ${onConflictSql}${returningSql}`;\n\t\t// }\n\n\t\treturn sql`${withSql}insert into ${table} ${insertOrder} ${valuesSql}${onConflictSql}${returningSql}`;\n\t}\n\n\tsqlToQuery(sql: SQL, invokeSource?: 'indexes' | undefined): QueryWithTypings {\n\t\treturn sql.toQuery({\n\t\t\tcasing: this.casing,\n\t\t\tescapeName: this.escapeName,\n\t\t\tescapeParam: this.escapeParam,\n\t\t\tescapeString: this.escapeString,\n\t\t\tinvokeSource,\n\t\t});\n\t}\n\n\tbuildRelationalQuery({\n\t\tfullSchema,\n\t\tschema,\n\t\ttableNamesMap,\n\t\ttable,\n\t\ttableConfig,\n\t\tqueryConfig: config,\n\t\ttableAlias,\n\t\tnestedQueryRelation,\n\t\tjoinOn,\n\t}: {\n\t\tfullSchema: Record;\n\t\tschema: TablesRelationalConfig;\n\t\ttableNamesMap: Record;\n\t\ttable: SQLiteTable;\n\t\ttableConfig: TableRelationalConfig;\n\t\tqueryConfig: true | DBQueryConfig<'many', true>;\n\t\ttableAlias: string;\n\t\tnestedQueryRelation?: Relation;\n\t\tjoinOn?: SQL;\n\t}): BuildRelationalQueryResult {\n\t\tlet selection: BuildRelationalQueryResult['selection'] = [];\n\t\tlet limit, offset, orderBy: SQLiteSelectConfig['orderBy'] = [], where;\n\t\tconst joins: SQLiteSelectJoinConfig[] = [];\n\n\t\tif (config === true) {\n\t\t\tconst selectionEntries = Object.entries(tableConfig.columns);\n\t\t\tselection = selectionEntries.map((\n\t\t\t\t[key, value],\n\t\t\t) => ({\n\t\t\t\tdbKey: value.name,\n\t\t\t\ttsKey: key,\n\t\t\t\tfield: aliasedTableColumn(value as SQLiteColumn, tableAlias),\n\t\t\t\trelationTableTsKey: undefined,\n\t\t\t\tisJson: false,\n\t\t\t\tselection: [],\n\t\t\t}));\n\t\t} else {\n\t\t\tconst aliasedColumns = Object.fromEntries(\n\t\t\t\tObject.entries(tableConfig.columns).map(([key, value]) => [key, aliasedTableColumn(value, tableAlias)]),\n\t\t\t);\n\n\t\t\tif (config.where) {\n\t\t\t\tconst whereSql = typeof config.where === 'function'\n\t\t\t\t\t? config.where(aliasedColumns, getOperators())\n\t\t\t\t\t: config.where;\n\t\t\t\twhere = whereSql && mapColumnsInSQLToAlias(whereSql, tableAlias);\n\t\t\t}\n\n\t\t\tconst fieldsSelection: { tsKey: string; value: SQLiteColumn | SQL.Aliased }[] = [];\n\t\t\tlet selectedColumns: string[] = [];\n\n\t\t\t// Figure out which columns to select\n\t\t\tif (config.columns) {\n\t\t\t\tlet isIncludeMode = false;\n\n\t\t\t\tfor (const [field, value] of Object.entries(config.columns)) {\n\t\t\t\t\tif (value === undefined) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (field in tableConfig.columns) {\n\t\t\t\t\t\tif (!isIncludeMode && value === true) {\n\t\t\t\t\t\t\tisIncludeMode = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tselectedColumns.push(field);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (selectedColumns.length > 0) {\n\t\t\t\t\tselectedColumns = isIncludeMode\n\t\t\t\t\t\t? selectedColumns.filter((c) => config.columns?.[c] === true)\n\t\t\t\t\t\t: Object.keys(tableConfig.columns).filter((key) => !selectedColumns.includes(key));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Select all columns if selection is not specified\n\t\t\t\tselectedColumns = Object.keys(tableConfig.columns);\n\t\t\t}\n\n\t\t\tfor (const field of selectedColumns) {\n\t\t\t\tconst column = tableConfig.columns[field]! as SQLiteColumn;\n\t\t\t\tfieldsSelection.push({ tsKey: field, value: column });\n\t\t\t}\n\n\t\t\tlet selectedRelations: {\n\t\t\t\ttsKey: string;\n\t\t\t\tqueryConfig: true | DBQueryConfig<'many', false>;\n\t\t\t\trelation: Relation;\n\t\t\t}[] = [];\n\n\t\t\t// Figure out which relations to select\n\t\t\tif (config.with) {\n\t\t\t\tselectedRelations = Object.entries(config.with)\n\t\t\t\t\t.filter((entry): entry is [typeof entry[0], NonNullable] => !!entry[1])\n\t\t\t\t\t.map(([tsKey, queryConfig]) => ({ tsKey, queryConfig, relation: tableConfig.relations[tsKey]! }));\n\t\t\t}\n\n\t\t\tlet extras;\n\n\t\t\t// Figure out which extras to select\n\t\t\tif (config.extras) {\n\t\t\t\textras = typeof config.extras === 'function'\n\t\t\t\t\t? config.extras(aliasedColumns, { sql })\n\t\t\t\t\t: config.extras;\n\t\t\t\tfor (const [tsKey, value] of Object.entries(extras)) {\n\t\t\t\t\tfieldsSelection.push({\n\t\t\t\t\t\ttsKey,\n\t\t\t\t\t\tvalue: mapColumnsInAliasedSQLToAlias(value, tableAlias),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Transform `fieldsSelection` into `selection`\n\t\t\t// `fieldsSelection` shouldn't be used after this point\n\t\t\tfor (const { tsKey, value } of fieldsSelection) {\n\t\t\t\tselection.push({\n\t\t\t\t\tdbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey]!.name,\n\t\t\t\t\ttsKey,\n\t\t\t\t\tfield: is(value, Column) ? aliasedTableColumn(value, tableAlias) : value,\n\t\t\t\t\trelationTableTsKey: undefined,\n\t\t\t\t\tisJson: false,\n\t\t\t\t\tselection: [],\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tlet orderByOrig = typeof config.orderBy === 'function'\n\t\t\t\t? config.orderBy(aliasedColumns, getOrderByOperators())\n\t\t\t\t: config.orderBy ?? [];\n\t\t\tif (!Array.isArray(orderByOrig)) {\n\t\t\t\torderByOrig = [orderByOrig];\n\t\t\t}\n\t\t\torderBy = orderByOrig.map((orderByValue) => {\n\t\t\t\tif (is(orderByValue, Column)) {\n\t\t\t\t\treturn aliasedTableColumn(orderByValue, tableAlias) as SQLiteColumn;\n\t\t\t\t}\n\t\t\t\treturn mapColumnsInSQLToAlias(orderByValue, tableAlias);\n\t\t\t});\n\n\t\t\tlimit = config.limit;\n\t\t\toffset = config.offset;\n\n\t\t\t// Process all relations\n\t\t\tfor (\n\t\t\t\tconst {\n\t\t\t\t\ttsKey: selectedRelationTsKey,\n\t\t\t\t\tqueryConfig: selectedRelationConfigValue,\n\t\t\t\t\trelation,\n\t\t\t\t} of selectedRelations\n\t\t\t) {\n\t\t\t\tconst normalizedRelation = normalizeRelation(schema, tableNamesMap, relation);\n\t\t\t\tconst relationTableName = getTableUniqueName(relation.referencedTable);\n\t\t\t\tconst relationTableTsName = tableNamesMap[relationTableName]!;\n\t\t\t\tconst relationTableAlias = `${tableAlias}_${selectedRelationTsKey}`;\n\t\t\t\t// const relationTable = schema[relationTableTsName]!;\n\t\t\t\tconst joinOn = and(\n\t\t\t\t\t...normalizedRelation.fields.map((field, i) =>\n\t\t\t\t\t\teq(\n\t\t\t\t\t\t\taliasedTableColumn(normalizedRelation.references[i]!, relationTableAlias),\n\t\t\t\t\t\t\taliasedTableColumn(field, tableAlias),\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tconst builtRelation = this.buildRelationalQuery({\n\t\t\t\t\tfullSchema,\n\t\t\t\t\tschema,\n\t\t\t\t\ttableNamesMap,\n\t\t\t\t\ttable: fullSchema[relationTableTsName] as SQLiteTable,\n\t\t\t\t\ttableConfig: schema[relationTableTsName]!,\n\t\t\t\t\tqueryConfig: is(relation, One)\n\t\t\t\t\t\t? (selectedRelationConfigValue === true\n\t\t\t\t\t\t\t? { limit: 1 }\n\t\t\t\t\t\t\t: { ...selectedRelationConfigValue, limit: 1 })\n\t\t\t\t\t\t: selectedRelationConfigValue,\n\t\t\t\t\ttableAlias: relationTableAlias,\n\t\t\t\t\tjoinOn,\n\t\t\t\t\tnestedQueryRelation: relation,\n\t\t\t\t});\n\t\t\t\tconst field = (sql`(${builtRelation.sql})`).as(selectedRelationTsKey);\n\t\t\t\tselection.push({\n\t\t\t\t\tdbKey: selectedRelationTsKey,\n\t\t\t\t\ttsKey: selectedRelationTsKey,\n\t\t\t\t\tfield,\n\t\t\t\t\trelationTableTsKey: relationTableTsName,\n\t\t\t\t\tisJson: true,\n\t\t\t\t\tselection: builtRelation.selection,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (selection.length === 0) {\n\t\t\tthrow new DrizzleError({\n\t\t\t\tmessage:\n\t\t\t\t\t`No fields selected for table \"${tableConfig.tsName}\" (\"${tableAlias}\"). You need to have at least one item in \"columns\", \"with\" or \"extras\". If you need to select all columns, omit the \"columns\" key or set it to undefined.`,\n\t\t\t});\n\t\t}\n\n\t\tlet result;\n\n\t\twhere = and(joinOn, where);\n\n\t\tif (nestedQueryRelation) {\n\t\t\tlet field = sql`json_array(${\n\t\t\t\tsql.join(\n\t\t\t\t\tselection.map(({ field }) =>\n\t\t\t\t\t\tis(field, SQLiteColumn)\n\t\t\t\t\t\t\t? sql.identifier(this.casing.getColumnCasing(field))\n\t\t\t\t\t\t\t: is(field, SQL.Aliased)\n\t\t\t\t\t\t\t? field.sql\n\t\t\t\t\t\t\t: field\n\t\t\t\t\t),\n\t\t\t\t\tsql`, `,\n\t\t\t\t)\n\t\t\t})`;\n\t\t\tif (is(nestedQueryRelation, Many)) {\n\t\t\t\tfield = sql`coalesce(json_group_array(${field}), json_array())`;\n\t\t\t}\n\t\t\tconst nestedSelection = [{\n\t\t\t\tdbKey: 'data',\n\t\t\t\ttsKey: 'data',\n\t\t\t\tfield: field.as('data'),\n\t\t\t\tisJson: true,\n\t\t\t\trelationTableTsKey: tableConfig.tsName,\n\t\t\t\tselection,\n\t\t\t}];\n\n\t\t\tconst needsSubquery = limit !== undefined || offset !== undefined || orderBy.length > 0;\n\n\t\t\tif (needsSubquery) {\n\t\t\t\tresult = this.buildSelectQuery({\n\t\t\t\t\ttable: aliasedTable(table, tableAlias),\n\t\t\t\t\tfields: {},\n\t\t\t\t\tfieldsFlat: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpath: [],\n\t\t\t\t\t\t\tfield: sql.raw('*'),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\twhere,\n\t\t\t\t\tlimit,\n\t\t\t\t\toffset,\n\t\t\t\t\torderBy,\n\t\t\t\t\tsetOperators: [],\n\t\t\t\t});\n\n\t\t\t\twhere = undefined;\n\t\t\t\tlimit = undefined;\n\t\t\t\toffset = undefined;\n\t\t\t\torderBy = undefined;\n\t\t\t} else {\n\t\t\t\tresult = aliasedTable(table, tableAlias);\n\t\t\t}\n\n\t\t\tresult = this.buildSelectQuery({\n\t\t\t\ttable: is(result, SQLiteTable) ? result : new Subquery(result, {}, tableAlias),\n\t\t\t\tfields: {},\n\t\t\t\tfieldsFlat: nestedSelection.map(({ field }) => ({\n\t\t\t\t\tpath: [],\n\t\t\t\t\tfield: is(field, Column) ? aliasedTableColumn(field, tableAlias) : field,\n\t\t\t\t})),\n\t\t\t\tjoins,\n\t\t\t\twhere,\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t\torderBy,\n\t\t\t\tsetOperators: [],\n\t\t\t});\n\t\t} else {\n\t\t\tresult = this.buildSelectQuery({\n\t\t\t\ttable: aliasedTable(table, tableAlias),\n\t\t\t\tfields: {},\n\t\t\t\tfieldsFlat: selection.map(({ field }) => ({\n\t\t\t\t\tpath: [],\n\t\t\t\t\tfield: is(field, Column) ? aliasedTableColumn(field, tableAlias) : field,\n\t\t\t\t})),\n\t\t\t\tjoins,\n\t\t\t\twhere,\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t\torderBy,\n\t\t\t\tsetOperators: [],\n\t\t\t});\n\t\t}\n\n\t\treturn {\n\t\t\ttableTsKey: tableConfig.tsName,\n\t\t\tsql: result,\n\t\t\tselection,\n\t\t};\n\t}\n}\n\nexport class SQLiteSyncDialect extends SQLiteDialect {\n\tstatic override readonly [entityKind]: string = 'SQLiteSyncDialect';\n\n\tmigrate(\n\t\tmigrations: MigrationMeta[],\n\t\tsession: SQLiteSession<'sync', unknown, Record, TablesRelationalConfig>,\n\t\tconfig?: string | MigrationConfig,\n\t): void {\n\t\tconst migrationsTable = config === undefined\n\t\t\t? '__drizzle_migrations'\n\t\t\t: typeof config === 'string'\n\t\t\t? '__drizzle_migrations'\n\t\t\t: config.migrationsTable ?? '__drizzle_migrations';\n\n\t\tconst migrationTableCreate = sql`\n\t\t\tCREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (\n\t\t\t\tid SERIAL PRIMARY KEY,\n\t\t\t\thash text NOT NULL,\n\t\t\t\tcreated_at numeric\n\t\t\t)\n\t\t`;\n\t\tsession.run(migrationTableCreate);\n\n\t\tconst dbMigrations = session.values<[number, string, string]>(\n\t\t\tsql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1`,\n\t\t);\n\n\t\tconst lastDbMigration = dbMigrations[0] ?? undefined;\n\t\tsession.run(sql`BEGIN`);\n\n\t\ttry {\n\t\t\tfor (const migration of migrations) {\n\t\t\t\tif (!lastDbMigration || Number(lastDbMigration[2])! < migration.folderMillis) {\n\t\t\t\t\tfor (const stmt of migration.sql) {\n\t\t\t\t\t\tsession.run(sql.raw(stmt));\n\t\t\t\t\t}\n\t\t\t\t\tsession.run(\n\t\t\t\t\t\tsql`INSERT INTO ${\n\t\t\t\t\t\t\tsql.identifier(migrationsTable)\n\t\t\t\t\t\t} (\"hash\", \"created_at\") VALUES(${migration.hash}, ${migration.folderMillis})`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsession.run(sql`COMMIT`);\n\t\t} catch (e) {\n\t\t\tsession.run(sql`ROLLBACK`);\n\t\t\tthrow e;\n\t\t}\n\t}\n}\n\nexport class SQLiteAsyncDialect extends SQLiteDialect {\n\tstatic override readonly [entityKind]: string = 'SQLiteAsyncDialect';\n\n\tasync migrate(\n\t\tmigrations: MigrationMeta[],\n\t\tsession: SQLiteSession<'async', any, any, any>,\n\t\tconfig?: string | MigrationConfig,\n\t): Promise {\n\t\tconst migrationsTable = config === undefined\n\t\t\t? '__drizzle_migrations'\n\t\t\t: typeof config === 'string'\n\t\t\t? '__drizzle_migrations'\n\t\t\t: config.migrationsTable ?? '__drizzle_migrations';\n\n\t\tconst migrationTableCreate = sql`\n\t\t\tCREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (\n\t\t\t\tid SERIAL PRIMARY KEY,\n\t\t\t\thash text NOT NULL,\n\t\t\t\tcreated_at numeric\n\t\t\t)\n\t\t`;\n\t\tawait session.run(migrationTableCreate);\n\n\t\tconst dbMigrations = await session.values<[number, string, string]>(\n\t\t\tsql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1`,\n\t\t);\n\n\t\tconst lastDbMigration = dbMigrations[0] ?? undefined;\n\n\t\tawait session.transaction(async (tx) => {\n\t\t\tfor (const migration of migrations) {\n\t\t\t\tif (!lastDbMigration || Number(lastDbMigration[2])! < migration.folderMillis) {\n\t\t\t\t\tfor (const stmt of migration.sql) {\n\t\t\t\t\t\tawait tx.run(sql.raw(stmt));\n\t\t\t\t\t}\n\t\t\t\t\tawait tx.run(\n\t\t\t\t\t\tsql`INSERT INTO ${\n\t\t\t\t\t\t\tsql.identifier(migrationsTable)\n\t\t\t\t\t\t} (\"hash\", \"created_at\") VALUES(${migration.hash}, ${migration.folderMillis})`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { SQL, SQLWrapper } from '~/sql/index.ts';\n\nexport abstract class TypedQueryBuilder implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'TypedQueryBuilder';\n\n\tdeclare _: {\n\t\tselectedFields: TSelection;\n\t\tresult: TResult;\n\t\tconfig?: TConfig;\n\t};\n\n\t/** @internal */\n\tgetSelectedFields(): TSelection {\n\t\treturn this._.selectedFields;\n\t}\n\n\tabstract getSQL(): SQL;\n}\n", "import type { CacheConfig, WithCacheConfig } from '~/cache/core/types.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type {\n\tBuildSubquerySelection,\n\tGetSelectTableName,\n\tGetSelectTableSelection,\n\tJoinNullability,\n\tJoinType,\n\tSelectMode,\n\tSelectResult,\n\tSetOperator,\n} from '~/query-builders/select.types.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport { SQL, View } from '~/sql/sql.ts';\nimport type { ColumnsSelection, Placeholder, Query, SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteColumn } from '~/sqlite-core/columns/index.ts';\nimport type { SQLiteDialect } from '~/sqlite-core/dialect.ts';\nimport type { SQLiteSession } from '~/sqlite-core/session.ts';\nimport type { SubqueryWithSelection } from '~/sqlite-core/subquery.ts';\nimport type { SQLiteTable } from '~/sqlite-core/table.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { Table } from '~/table.ts';\nimport {\n\tapplyMixins,\n\tgetTableColumns,\n\tgetTableLikeName,\n\thaveSameKeys,\n\torderSelectedFields,\n\ttype ValueOrArray,\n} from '~/utils.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport { extractUsedTable } from '../utils.ts';\nimport { SQLiteViewBase } from '../view-base.ts';\nimport type {\n\tAnySQLiteSelect,\n\tCreateSQLiteSelectFromBuilderMode,\n\tGetSQLiteSetOperators,\n\tSelectedFields,\n\tSetOperatorRightSelect,\n\tSQLiteCreateSetOperatorFn,\n\tSQLiteSelectConfig,\n\tSQLiteSelectCrossJoinFn,\n\tSQLiteSelectDynamic,\n\tSQLiteSelectExecute,\n\tSQLiteSelectHKT,\n\tSQLiteSelectHKTBase,\n\tSQLiteSelectJoinFn,\n\tSQLiteSelectPrepare,\n\tSQLiteSelectWithout,\n\tSQLiteSetOperatorExcludedMethods,\n\tSQLiteSetOperatorWithResult,\n} from './select.types.ts';\n\nexport class SQLiteSelectBuilder<\n\tTSelection extends SelectedFields | undefined,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTBuilderMode extends 'db' | 'qb' = 'db',\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteSelectBuilder';\n\n\tprivate fields: TSelection;\n\tprivate session: SQLiteSession | undefined;\n\tprivate dialect: SQLiteDialect;\n\tprivate withList: Subquery[] | undefined;\n\tprivate distinct: boolean | undefined;\n\n\tconstructor(\n\t\tconfig: {\n\t\t\tfields: TSelection;\n\t\t\tsession: SQLiteSession | undefined;\n\t\t\tdialect: SQLiteDialect;\n\t\t\twithList?: Subquery[];\n\t\t\tdistinct?: boolean;\n\t\t},\n\t) {\n\t\tthis.fields = config.fields;\n\t\tthis.session = config.session;\n\t\tthis.dialect = config.dialect;\n\t\tthis.withList = config.withList;\n\t\tthis.distinct = config.distinct;\n\t}\n\n\tfrom(\n\t\tsource: TFrom,\n\t): CreateSQLiteSelectFromBuilderMode<\n\t\tTBuilderMode,\n\t\tGetSelectTableName,\n\t\tTResultType,\n\t\tTRunResult,\n\t\tTSelection extends undefined ? GetSelectTableSelection : TSelection,\n\t\tTSelection extends undefined ? 'single' : 'partial'\n\t> {\n\t\tconst isPartialSelect = !!this.fields;\n\n\t\tlet fields: SelectedFields;\n\t\tif (this.fields) {\n\t\t\tfields = this.fields;\n\t\t} else if (is(source, Subquery)) {\n\t\t\t// This is required to use the proxy handler to get the correct field values from the subquery\n\t\t\tfields = Object.fromEntries(\n\t\t\t\tObject.keys(source._.selectedFields).map((\n\t\t\t\t\tkey,\n\t\t\t\t) => [key, source[key as unknown as keyof typeof source] as unknown as SelectedFields[string]]),\n\t\t\t);\n\t\t} else if (is(source, SQLiteViewBase)) {\n\t\t\tfields = source[ViewBaseConfig].selectedFields as SelectedFields;\n\t\t} else if (is(source, SQL)) {\n\t\t\tfields = {};\n\t\t} else {\n\t\t\tfields = getTableColumns(source);\n\t\t}\n\n\t\treturn new SQLiteSelectBase({\n\t\t\ttable: source,\n\t\t\tfields,\n\t\t\tisPartialSelect,\n\t\t\tsession: this.session,\n\t\t\tdialect: this.dialect,\n\t\t\twithList: this.withList,\n\t\t\tdistinct: this.distinct,\n\t\t}) as any;\n\t}\n}\n\nexport abstract class SQLiteSelectQueryBuilderBase<\n\tTHKT extends SQLiteSelectHKTBase,\n\tTTableName extends string | undefined,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTSelection extends ColumnsSelection,\n\tTSelectMode extends SelectMode,\n\tTNullabilityMap extends Record = TTableName extends string ? Record\n\t\t: {},\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n\tTResult extends any[] = SelectResult[],\n\tTSelectedFields extends ColumnsSelection = BuildSubquerySelection,\n> extends TypedQueryBuilder {\n\tstatic override readonly [entityKind]: string = 'SQLiteSelectQueryBuilder';\n\n\toverride readonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly hkt: THKT;\n\t\treadonly tableName: TTableName;\n\t\treadonly resultType: TResultType;\n\t\treadonly runResult: TRunResult;\n\t\treadonly selection: TSelection;\n\t\treadonly selectMode: TSelectMode;\n\t\treadonly nullabilityMap: TNullabilityMap;\n\t\treadonly dynamic: TDynamic;\n\t\treadonly excludedMethods: TExcludedMethods;\n\t\treadonly result: TResult;\n\t\treadonly selectedFields: TSelectedFields;\n\t\treadonly config: SQLiteSelectConfig;\n\t};\n\n\t/** @internal */\n\tconfig: SQLiteSelectConfig;\n\tprotected joinsNotNullableMap: Record;\n\tprivate tableName: string | undefined;\n\tprivate isPartialSelect: boolean;\n\tprotected session: SQLiteSession | undefined;\n\tprotected dialect: SQLiteDialect;\n\tprotected cacheConfig?: WithCacheConfig = undefined;\n\tprotected usedTables: Set = new Set();\n\n\tconstructor(\n\t\t{ table, fields, isPartialSelect, session, dialect, withList, distinct }: {\n\t\t\ttable: SQLiteSelectConfig['table'];\n\t\t\tfields: SQLiteSelectConfig['fields'];\n\t\t\tisPartialSelect: boolean;\n\t\t\tsession: SQLiteSession | undefined;\n\t\t\tdialect: SQLiteDialect;\n\t\t\twithList: Subquery[] | undefined;\n\t\t\tdistinct: boolean | undefined;\n\t\t},\n\t) {\n\t\tsuper();\n\t\tthis.config = {\n\t\t\twithList,\n\t\t\ttable,\n\t\t\tfields: { ...fields },\n\t\t\tdistinct,\n\t\t\tsetOperators: [],\n\t\t};\n\t\tthis.isPartialSelect = isPartialSelect;\n\t\tthis.session = session;\n\t\tthis.dialect = dialect;\n\t\tthis._ = {\n\t\t\tselectedFields: fields as TSelectedFields,\n\t\t\tconfig: this.config,\n\t\t} as this['_'];\n\t\tthis.tableName = getTableLikeName(table);\n\t\tthis.joinsNotNullableMap = typeof this.tableName === 'string' ? { [this.tableName]: true } : {};\n\t\tfor (const item of extractUsedTable(table)) this.usedTables.add(item);\n\t}\n\n\t/** @internal */\n\tgetUsedTables() {\n\t\treturn [...this.usedTables];\n\t}\n\n\tprivate createJoin(\n\t\tjoinType: TJoinType,\n\t): 'cross' extends TJoinType ? SQLiteSelectCrossJoinFn\n\t\t: SQLiteSelectJoinFn\n\t{\n\t\treturn (\n\t\t\ttable: SQLiteTable | Subquery | SQLiteViewBase | SQL,\n\t\t\ton?: ((aliases: TSelection) => SQL | undefined) | SQL | undefined,\n\t\t) => {\n\t\t\tconst baseTableName = this.tableName;\n\t\t\tconst tableName = getTableLikeName(table);\n\n\t\t\t// store all tables used in a query\n\t\t\tfor (const item of extractUsedTable(table)) this.usedTables.add(item);\n\n\t\t\tif (typeof tableName === 'string' && this.config.joins?.some((join) => join.alias === tableName)) {\n\t\t\t\tthrow new Error(`Alias \"${tableName}\" is already used in this query`);\n\t\t\t}\n\n\t\t\tif (!this.isPartialSelect) {\n\t\t\t\t// If this is the first join and this is not a partial select and we're not selecting from raw SQL, \"move\" the fields from the main table to the nested object\n\t\t\t\tif (Object.keys(this.joinsNotNullableMap).length === 1 && typeof baseTableName === 'string') {\n\t\t\t\t\tthis.config.fields = {\n\t\t\t\t\t\t[baseTableName]: this.config.fields,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif (typeof tableName === 'string' && !is(table, SQL)) {\n\t\t\t\t\tconst selection = is(table, Subquery)\n\t\t\t\t\t\t? table._.selectedFields\n\t\t\t\t\t\t: is(table, View)\n\t\t\t\t\t\t? table[ViewBaseConfig].selectedFields\n\t\t\t\t\t\t: table[Table.Symbol.Columns];\n\t\t\t\t\tthis.config.fields[tableName] = selection;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof on === 'function') {\n\t\t\t\ton = on(\n\t\t\t\t\tnew Proxy(\n\t\t\t\t\t\tthis.config.fields,\n\t\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t\t) as TSelection,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (!this.config.joins) {\n\t\t\t\tthis.config.joins = [];\n\t\t\t}\n\t\t\tthis.config.joins.push({ on, table, joinType, alias: tableName });\n\n\t\t\tif (typeof tableName === 'string') {\n\t\t\t\tswitch (joinType) {\n\t\t\t\t\tcase 'left': {\n\t\t\t\t\t\tthis.joinsNotNullableMap[tableName] = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'right': {\n\t\t\t\t\t\tthis.joinsNotNullableMap = Object.fromEntries(\n\t\t\t\t\t\t\tObject.entries(this.joinsNotNullableMap).map(([key]) => [key, false]),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.joinsNotNullableMap[tableName] = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'cross':\n\t\t\t\t\tcase 'inner': {\n\t\t\t\t\t\tthis.joinsNotNullableMap[tableName] = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'full': {\n\t\t\t\t\t\tthis.joinsNotNullableMap = Object.fromEntries(\n\t\t\t\t\t\t\tObject.entries(this.joinsNotNullableMap).map(([key]) => [key, false]),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.joinsNotNullableMap[tableName] = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this as any;\n\t\t};\n\t}\n\n\t/**\n\t * Executes a `left join` operation by adding another table to the current query.\n\t *\n\t * Calling this method associates each row of the table with the corresponding row from the joined table, if a match is found. If no matching row exists, it sets all columns of the joined table to null.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#left-join}\n\t *\n\t * @param table the table to join.\n\t * @param on the `on` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users and their pets\n\t * const usersWithPets: { user: User; pets: Pet | null; }[] = await db.select()\n\t * .from(users)\n\t * .leftJoin(pets, eq(users.id, pets.ownerId))\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number; petId: number | null; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .leftJoin(pets, eq(users.id, pets.ownerId))\n\t * ```\n\t */\n\tleftJoin = this.createJoin('left');\n\n\t/**\n\t * Executes a `right join` operation by adding another table to the current query.\n\t *\n\t * Calling this method associates each row of the joined table with the corresponding row from the main table, if a match is found. If no matching row exists, it sets all columns of the main table to null.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#right-join}\n\t *\n\t * @param table the table to join.\n\t * @param on the `on` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users and their pets\n\t * const usersWithPets: { user: User | null; pets: Pet; }[] = await db.select()\n\t * .from(users)\n\t * .rightJoin(pets, eq(users.id, pets.ownerId))\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number | null; petId: number; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .rightJoin(pets, eq(users.id, pets.ownerId))\n\t * ```\n\t */\n\trightJoin = this.createJoin('right');\n\n\t/**\n\t * Executes an `inner join` operation, creating a new table by combining rows from two tables that have matching values.\n\t *\n\t * Calling this method retrieves rows that have corresponding entries in both joined tables. Rows without matching entries in either table are excluded, resulting in a table that includes only matching pairs.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#inner-join}\n\t *\n\t * @param table the table to join.\n\t * @param on the `on` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users and their pets\n\t * const usersWithPets: { user: User; pets: Pet; }[] = await db.select()\n\t * .from(users)\n\t * .innerJoin(pets, eq(users.id, pets.ownerId))\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number; petId: number; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .innerJoin(pets, eq(users.id, pets.ownerId))\n\t * ```\n\t */\n\tinnerJoin = this.createJoin('inner');\n\n\t/**\n\t * Executes a `full join` operation by combining rows from two tables into a new table.\n\t *\n\t * Calling this method retrieves all rows from both main and joined tables, merging rows with matching values and filling in `null` for non-matching columns.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#full-join}\n\t *\n\t * @param table the table to join.\n\t * @param on the `on` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users and their pets\n\t * const usersWithPets: { user: User | null; pets: Pet | null; }[] = await db.select()\n\t * .from(users)\n\t * .fullJoin(pets, eq(users.id, pets.ownerId))\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number | null; petId: number | null; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .fullJoin(pets, eq(users.id, pets.ownerId))\n\t * ```\n\t */\n\tfullJoin = this.createJoin('full');\n\n\t/**\n\t * Executes a `cross join` operation by combining rows from two tables into a new table.\n\t *\n\t * Calling this method retrieves all rows from both main and joined tables, merging all rows from each table.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#cross-join}\n\t *\n\t * @param table the table to join.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users, each user with every pet\n\t * const usersWithPets: { user: User; pets: Pet; }[] = await db.select()\n\t * .from(users)\n\t * .crossJoin(pets)\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number; petId: number; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .crossJoin(pets)\n\t * ```\n\t */\n\tcrossJoin = this.createJoin('cross');\n\n\tprivate createSetOperator(\n\t\ttype: SetOperator,\n\t\tisAll: boolean,\n\t): >(\n\t\trightSelection:\n\t\t\t| ((setOperators: GetSQLiteSetOperators) => SetOperatorRightSelect)\n\t\t\t| SetOperatorRightSelect,\n\t) => SQLiteSelectWithout<\n\t\tthis,\n\t\tTDynamic,\n\t\tSQLiteSetOperatorExcludedMethods,\n\t\ttrue\n\t> {\n\t\treturn (rightSelection) => {\n\t\t\tconst rightSelect = (typeof rightSelection === 'function'\n\t\t\t\t? rightSelection(getSQLiteSetOperators())\n\t\t\t\t: rightSelection) as TypedQueryBuilder<\n\t\t\t\t\tany,\n\t\t\t\t\tTResult\n\t\t\t\t>;\n\n\t\t\tif (!haveSameKeys(this.getSelectedFields(), rightSelect.getSelectedFields())) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'Set operator error (union / intersect / except): selected fields are not the same or are in a different order',\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.config.setOperators.push({ type, isAll, rightSelect });\n\t\t\treturn this as any;\n\t\t};\n\t}\n\n\t/**\n\t * Adds `union` set operator to the query.\n\t *\n\t * Calling this method will combine the result sets of the `select` statements and remove any duplicate rows that appear across them.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/set-operations#union}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all unique names from customers and users tables\n\t * await db.select({ name: users.name })\n\t * .from(users)\n\t * .union(\n\t * db.select({ name: customers.name }).from(customers)\n\t * );\n\t * // or\n\t * import { union } from 'drizzle-orm/sqlite-core'\n\t *\n\t * await union(\n\t * db.select({ name: users.name }).from(users),\n\t * db.select({ name: customers.name }).from(customers)\n\t * );\n\t * ```\n\t */\n\tunion = this.createSetOperator('union', false);\n\n\t/**\n\t * Adds `union all` set operator to the query.\n\t *\n\t * Calling this method will combine the result-set of the `select` statements and keep all duplicate rows that appear across them.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/set-operations#union-all}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all transaction ids from both online and in-store sales\n\t * await db.select({ transaction: onlineSales.transactionId })\n\t * .from(onlineSales)\n\t * .unionAll(\n\t * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)\n\t * );\n\t * // or\n\t * import { unionAll } from 'drizzle-orm/sqlite-core'\n\t *\n\t * await unionAll(\n\t * db.select({ transaction: onlineSales.transactionId }).from(onlineSales),\n\t * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)\n\t * );\n\t * ```\n\t */\n\tunionAll = this.createSetOperator('union', true);\n\n\t/**\n\t * Adds `intersect` set operator to the query.\n\t *\n\t * Calling this method will retain only the rows that are present in both result sets and eliminate duplicates.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/set-operations#intersect}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select course names that are offered in both departments A and B\n\t * await db.select({ courseName: depA.courseName })\n\t * .from(depA)\n\t * .intersect(\n\t * db.select({ courseName: depB.courseName }).from(depB)\n\t * );\n\t * // or\n\t * import { intersect } from 'drizzle-orm/sqlite-core'\n\t *\n\t * await intersect(\n\t * db.select({ courseName: depA.courseName }).from(depA),\n\t * db.select({ courseName: depB.courseName }).from(depB)\n\t * );\n\t * ```\n\t */\n\tintersect = this.createSetOperator('intersect', false);\n\n\t/**\n\t * Adds `except` set operator to the query.\n\t *\n\t * Calling this method will retrieve all unique rows from the left query, except for the rows that are present in the result set of the right query.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/set-operations#except}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all courses offered in department A but not in department B\n\t * await db.select({ courseName: depA.courseName })\n\t * .from(depA)\n\t * .except(\n\t * db.select({ courseName: depB.courseName }).from(depB)\n\t * );\n\t * // or\n\t * import { except } from 'drizzle-orm/sqlite-core'\n\t *\n\t * await except(\n\t * db.select({ courseName: depA.courseName }).from(depA),\n\t * db.select({ courseName: depB.courseName }).from(depB)\n\t * );\n\t * ```\n\t */\n\texcept = this.createSetOperator('except', false);\n\n\t/** @internal */\n\taddSetOperators(setOperators: SQLiteSelectConfig['setOperators']): SQLiteSelectWithout<\n\t\tthis,\n\t\tTDynamic,\n\t\tSQLiteSetOperatorExcludedMethods,\n\t\ttrue\n\t> {\n\t\tthis.config.setOperators.push(...setOperators);\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `where` clause to the query.\n\t *\n\t * Calling this method will select only those rows that fulfill a specified condition.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#filtering}\n\t *\n\t * @param where the `where` clause.\n\t *\n\t * @example\n\t * You can use conditional operators and `sql function` to filter the rows to be selected.\n\t *\n\t * ```ts\n\t * // Select all cars with green color\n\t * await db.select().from(cars).where(eq(cars.color, 'green'));\n\t * // or\n\t * await db.select().from(cars).where(sql`${cars.color} = 'green'`)\n\t * ```\n\t *\n\t * You can logically combine conditional operators with `and()` and `or()` operators:\n\t *\n\t * ```ts\n\t * // Select all BMW cars with a green color\n\t * await db.select().from(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW')));\n\t *\n\t * // Select all cars with the green or blue color\n\t * await db.select().from(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue')));\n\t * ```\n\t */\n\twhere(\n\t\twhere: ((aliases: TSelection) => SQL | undefined) | SQL | undefined,\n\t): SQLiteSelectWithout {\n\t\tif (typeof where === 'function') {\n\t\t\twhere = where(\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.fields,\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t) as TSelection,\n\t\t\t);\n\t\t}\n\t\tthis.config.where = where;\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `having` clause to the query.\n\t *\n\t * Calling this method will select only those rows that fulfill a specified condition. It is typically used with aggregate functions to filter the aggregated data based on a specified condition.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#aggregations}\n\t *\n\t * @param having the `having` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all brands with more than one car\n\t * await db.select({\n\t * \tbrand: cars.brand,\n\t * \tcount: sql`cast(count(${cars.id}) as int)`,\n\t * })\n\t * .from(cars)\n\t * .groupBy(cars.brand)\n\t * .having(({ count }) => gt(count, 1));\n\t * ```\n\t */\n\thaving(\n\t\thaving: ((aliases: this['_']['selection']) => SQL | undefined) | SQL | undefined,\n\t): SQLiteSelectWithout {\n\t\tif (typeof having === 'function') {\n\t\t\thaving = having(\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.fields,\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t) as TSelection,\n\t\t\t);\n\t\t}\n\t\tthis.config.having = having;\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `group by` clause to the query.\n\t *\n\t * Calling this method will group rows that have the same values into summary rows, often used for aggregation purposes.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#aggregations}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Group and count people by their last names\n\t * await db.select({\n\t * lastName: people.lastName,\n\t * count: sql`cast(count(*) as int)`\n\t * })\n\t * .from(people)\n\t * .groupBy(people.lastName);\n\t * ```\n\t */\n\tgroupBy(\n\t\tbuilder: (aliases: this['_']['selection']) => ValueOrArray,\n\t): SQLiteSelectWithout;\n\tgroupBy(...columns: (SQLiteColumn | SQL)[]): SQLiteSelectWithout;\n\tgroupBy(\n\t\t...columns:\n\t\t\t| [(aliases: this['_']['selection']) => ValueOrArray]\n\t\t\t| (SQLiteColumn | SQL | SQL.Aliased)[]\n\t): SQLiteSelectWithout {\n\t\tif (typeof columns[0] === 'function') {\n\t\t\tconst groupBy = columns[0](\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.fields,\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'alias', sqlBehavior: 'sql' }),\n\t\t\t\t) as TSelection,\n\t\t\t);\n\t\t\tthis.config.groupBy = Array.isArray(groupBy) ? groupBy : [groupBy];\n\t\t} else {\n\t\t\tthis.config.groupBy = columns as (SQLiteColumn | SQL | SQL.Aliased)[];\n\t\t}\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds an `order by` clause to the query.\n\t *\n\t * Calling this method will sort the result-set in ascending or descending order. By default, the sort order is ascending.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#order-by}\n\t *\n\t * @example\n\t *\n\t * ```\n\t * // Select cars ordered by year\n\t * await db.select().from(cars).orderBy(cars.year);\n\t * ```\n\t *\n\t * You can specify whether results are in ascending or descending order with the `asc()` and `desc()` operators.\n\t *\n\t * ```ts\n\t * // Select cars ordered by year in descending order\n\t * await db.select().from(cars).orderBy(desc(cars.year));\n\t *\n\t * // Select cars ordered by year and price\n\t * await db.select().from(cars).orderBy(asc(cars.year), desc(cars.price));\n\t * ```\n\t */\n\torderBy(\n\t\tbuilder: (aliases: this['_']['selection']) => ValueOrArray,\n\t): SQLiteSelectWithout;\n\torderBy(...columns: (SQLiteColumn | SQL)[]): SQLiteSelectWithout;\n\torderBy(\n\t\t...columns:\n\t\t\t| [(aliases: this['_']['selection']) => ValueOrArray]\n\t\t\t| (SQLiteColumn | SQL | SQL.Aliased)[]\n\t): SQLiteSelectWithout {\n\t\tif (typeof columns[0] === 'function') {\n\t\t\tconst orderBy = columns[0](\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.fields,\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'alias', sqlBehavior: 'sql' }),\n\t\t\t\t) as TSelection,\n\t\t\t);\n\n\t\t\tconst orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy];\n\n\t\t\tif (this.config.setOperators.length > 0) {\n\t\t\t\tthis.config.setOperators.at(-1)!.orderBy = orderByArray;\n\t\t\t} else {\n\t\t\t\tthis.config.orderBy = orderByArray;\n\t\t\t}\n\t\t} else {\n\t\t\tconst orderByArray = columns as (SQLiteColumn | SQL | SQL.Aliased)[];\n\n\t\t\tif (this.config.setOperators.length > 0) {\n\t\t\t\tthis.config.setOperators.at(-1)!.orderBy = orderByArray;\n\t\t\t} else {\n\t\t\t\tthis.config.orderBy = orderByArray;\n\t\t\t}\n\t\t}\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `limit` clause to the query.\n\t *\n\t * Calling this method will set the maximum number of rows that will be returned by this query.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#limit--offset}\n\t *\n\t * @param limit the `limit` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Get the first 10 people from this query.\n\t * await db.select().from(people).limit(10);\n\t * ```\n\t */\n\tlimit(limit: number | Placeholder): SQLiteSelectWithout {\n\t\tif (this.config.setOperators.length > 0) {\n\t\t\tthis.config.setOperators.at(-1)!.limit = limit;\n\t\t} else {\n\t\t\tthis.config.limit = limit;\n\t\t}\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds an `offset` clause to the query.\n\t *\n\t * Calling this method will skip a number of rows when returning results from this query.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#limit--offset}\n\t *\n\t * @param offset the `offset` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Get the 10th-20th people from this query.\n\t * await db.select().from(people).offset(10).limit(10);\n\t * ```\n\t */\n\toffset(offset: number | Placeholder): SQLiteSelectWithout {\n\t\tif (this.config.setOperators.length > 0) {\n\t\t\tthis.config.setOperators.at(-1)!.offset = offset;\n\t\t} else {\n\t\t\tthis.config.offset = offset;\n\t\t}\n\t\treturn this as any;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildSelectQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\tas(\n\t\talias: TAlias,\n\t): SubqueryWithSelection {\n\t\tconst usedTables: string[] = [];\n\t\tusedTables.push(...extractUsedTable(this.config.table));\n\t\tif (this.config.joins) { for (const it of this.config.joins) usedTables.push(...extractUsedTable(it.table)); }\n\n\t\treturn new Proxy(\n\t\t\tnew Subquery(this.getSQL(), this.config.fields, alias, false, [...new Set(usedTables)]),\n\t\t\tnew SelectionProxyHandler({ alias, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t) as SubqueryWithSelection;\n\t}\n\n\t/** @internal */\n\toverride getSelectedFields(): this['_']['selectedFields'] {\n\t\treturn new Proxy(\n\t\t\tthis.config.fields,\n\t\t\tnew SelectionProxyHandler({ alias: this.tableName, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t) as this['_']['selectedFields'];\n\t}\n\n\t$dynamic(): SQLiteSelectDynamic {\n\t\treturn this;\n\t}\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface SQLiteSelectBase<\n\tTTableName extends string | undefined,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTSelection extends ColumnsSelection,\n\tTSelectMode extends SelectMode = 'single',\n\tTNullabilityMap extends Record = TTableName extends string ? Record\n\t\t: {},\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n\tTResult extends any[] = SelectResult[],\n\tTSelectedFields extends ColumnsSelection = BuildSubquerySelection,\n> extends\n\tSQLiteSelectQueryBuilderBase<\n\t\tSQLiteSelectHKT,\n\t\tTTableName,\n\t\tTResultType,\n\t\tTRunResult,\n\t\tTSelection,\n\t\tTSelectMode,\n\t\tTNullabilityMap,\n\t\tTDynamic,\n\t\tTExcludedMethods,\n\t\tTResult,\n\t\tTSelectedFields\n\t>,\n\tQueryPromise\n{}\n\nexport class SQLiteSelectBase<\n\tTTableName extends string | undefined,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTSelection,\n\tTSelectMode extends SelectMode = 'single',\n\tTNullabilityMap extends Record = TTableName extends string ? Record\n\t\t: {},\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n\tTResult = SelectResult[],\n\tTSelectedFields extends ColumnsSelection = BuildSubquerySelection,\n> extends SQLiteSelectQueryBuilderBase<\n\tSQLiteSelectHKT,\n\tTTableName,\n\tTResultType,\n\tTRunResult,\n\tTSelection,\n\tTSelectMode,\n\tTNullabilityMap,\n\tTDynamic,\n\tTExcludedMethods,\n\tTResult,\n\tTSelectedFields\n> implements RunnableQuery, SQLWrapper {\n\tstatic override readonly [entityKind]: string = 'SQLiteSelect';\n\n\t/** @internal */\n\t_prepare(isOneTimeQuery = true): SQLiteSelectPrepare {\n\t\tif (!this.session) {\n\t\t\tthrow new Error('Cannot execute a query on a query builder. Please use a database instance instead.');\n\t\t}\n\t\tconst fieldsList = orderSelectedFields(this.config.fields);\n\t\tconst query = this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tthis.dialect.sqlToQuery(this.getSQL()),\n\t\t\tfieldsList,\n\t\t\t'all',\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\ttype: 'select',\n\t\t\t\ttables: [...this.usedTables],\n\t\t\t},\n\t\t\tthis.cacheConfig,\n\t\t);\n\t\tquery.joinsNotNullableMap = this.joinsNotNullableMap;\n\t\treturn query as ReturnType;\n\t}\n\n\t$withCache(config?: { config?: CacheConfig; tag?: string; autoInvalidate?: boolean } | false) {\n\t\tthis.cacheConfig = config === undefined\n\t\t\t? { config: {}, enable: true, autoInvalidate: true }\n\t\t\t: config === false\n\t\t\t? { enable: false }\n\t\t\t: { enable: true, autoInvalidate: true, ...config };\n\t\treturn this;\n\t}\n\n\tprepare(): SQLiteSelectPrepare {\n\t\treturn this._prepare(false);\n\t}\n\n\trun: ReturnType['run'] = (placeholderValues) => {\n\t\treturn this._prepare().run(placeholderValues);\n\t};\n\n\tall: ReturnType['all'] = (placeholderValues) => {\n\t\treturn this._prepare().all(placeholderValues);\n\t};\n\n\tget: ReturnType['get'] = (placeholderValues) => {\n\t\treturn this._prepare().get(placeholderValues);\n\t};\n\n\tvalues: ReturnType['values'] = (placeholderValues) => {\n\t\treturn this._prepare().values(placeholderValues);\n\t};\n\n\tasync execute(): Promise> {\n\t\treturn this.all() as SQLiteSelectExecute;\n\t}\n}\n\napplyMixins(SQLiteSelectBase, [QueryPromise]);\n\nfunction createSetOperator(type: SetOperator, isAll: boolean): SQLiteCreateSetOperatorFn {\n\treturn (leftSelect, rightSelect, ...restSelects) => {\n\t\tconst setOperators = [rightSelect, ...restSelects].map((select) => ({\n\t\t\ttype,\n\t\t\tisAll,\n\t\t\trightSelect: select as AnySQLiteSelect,\n\t\t}));\n\n\t\tfor (const setOperator of setOperators) {\n\t\t\tif (!haveSameKeys((leftSelect as any).getSelectedFields(), setOperator.rightSelect.getSelectedFields())) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'Set operator error (union / intersect / except): selected fields are not the same or are in a different order',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn (leftSelect as AnySQLiteSelect).addSetOperators(setOperators) as any;\n\t};\n}\n\nconst getSQLiteSetOperators = () => ({\n\tunion,\n\tunionAll,\n\tintersect,\n\texcept,\n});\n\n/**\n * Adds `union` set operator to the query.\n *\n * Calling this method will combine the result sets of the `select` statements and remove any duplicate rows that appear across them.\n *\n * See docs: {@link https://orm.drizzle.team/docs/set-operations#union}\n *\n * @example\n *\n * ```ts\n * // Select all unique names from customers and users tables\n * import { union } from 'drizzle-orm/sqlite-core'\n *\n * await union(\n * db.select({ name: users.name }).from(users),\n * db.select({ name: customers.name }).from(customers)\n * );\n * // or\n * await db.select({ name: users.name })\n * .from(users)\n * .union(\n * db.select({ name: customers.name }).from(customers)\n * );\n * ```\n */\nexport const union = createSetOperator('union', false);\n\n/**\n * Adds `union all` set operator to the query.\n *\n * Calling this method will combine the result-set of the `select` statements and keep all duplicate rows that appear across them.\n *\n * See docs: {@link https://orm.drizzle.team/docs/set-operations#union-all}\n *\n * @example\n *\n * ```ts\n * // Select all transaction ids from both online and in-store sales\n * import { unionAll } from 'drizzle-orm/sqlite-core'\n *\n * await unionAll(\n * db.select({ transaction: onlineSales.transactionId }).from(onlineSales),\n * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)\n * );\n * // or\n * await db.select({ transaction: onlineSales.transactionId })\n * .from(onlineSales)\n * .unionAll(\n * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)\n * );\n * ```\n */\nexport const unionAll = createSetOperator('union', true);\n\n/**\n * Adds `intersect` set operator to the query.\n *\n * Calling this method will retain only the rows that are present in both result sets and eliminate duplicates.\n *\n * See docs: {@link https://orm.drizzle.team/docs/set-operations#intersect}\n *\n * @example\n *\n * ```ts\n * // Select course names that are offered in both departments A and B\n * import { intersect } from 'drizzle-orm/sqlite-core'\n *\n * await intersect(\n * db.select({ courseName: depA.courseName }).from(depA),\n * db.select({ courseName: depB.courseName }).from(depB)\n * );\n * // or\n * await db.select({ courseName: depA.courseName })\n * .from(depA)\n * .intersect(\n * db.select({ courseName: depB.courseName }).from(depB)\n * );\n * ```\n */\nexport const intersect = createSetOperator('intersect', false);\n\n/**\n * Adds `except` set operator to the query.\n *\n * Calling this method will retrieve all unique rows from the left query, except for the rows that are present in the result set of the right query.\n *\n * See docs: {@link https://orm.drizzle.team/docs/set-operations#except}\n *\n * @example\n *\n * ```ts\n * // Select all courses offered in department A but not in department B\n * import { except } from 'drizzle-orm/sqlite-core'\n *\n * await except(\n * db.select({ courseName: depA.courseName }).from(depA),\n * db.select({ courseName: depB.courseName }).from(depB)\n * );\n * // or\n * await db.select({ courseName: depA.courseName })\n * .from(depA)\n * .except(\n * db.select({ courseName: depB.courseName }).from(depB)\n * );\n * ```\n */\nexport const except = createSetOperator('except', false);\n", "import { entityKind, is } from '~/entity.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { ColumnsSelection, SQL } from '~/sql/sql.ts';\nimport type { SQLiteDialectConfig } from '~/sqlite-core/dialect.ts';\nimport { SQLiteDialect, SQLiteSyncDialect } from '~/sqlite-core/dialect.ts';\nimport type { WithBuilder } from '~/sqlite-core/subquery.ts';\nimport { WithSubquery } from '~/subquery.ts';\nimport { SQLiteSelectBuilder } from './select.ts';\nimport type { SelectedFields } from './select.types.ts';\n\nexport class QueryBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteQueryBuilder';\n\n\tprivate dialect: SQLiteDialect | undefined;\n\tprivate dialectConfig: SQLiteDialectConfig | undefined;\n\n\tconstructor(dialect?: SQLiteDialect | SQLiteDialectConfig) {\n\t\tthis.dialect = is(dialect, SQLiteDialect) ? dialect : undefined;\n\t\tthis.dialectConfig = is(dialect, SQLiteDialect) ? undefined : dialect;\n\t}\n\n\t$with: WithBuilder = (alias: string, selection?: ColumnsSelection) => {\n\t\tconst queryBuilder = this;\n\t\tconst as = (\n\t\t\tqb:\n\t\t\t\t| TypedQueryBuilder\n\t\t\t\t| SQL\n\t\t\t\t| ((qb: QueryBuilder) => TypedQueryBuilder | SQL),\n\t\t) => {\n\t\t\tif (typeof qb === 'function') {\n\t\t\t\tqb = qb(queryBuilder);\n\t\t\t}\n\n\t\t\treturn new Proxy(\n\t\t\t\tnew WithSubquery(\n\t\t\t\t\tqb.getSQL(),\n\t\t\t\t\tselection ?? ('getSelectedFields' in qb ? qb.getSelectedFields() ?? {} : {}) as SelectedFields,\n\t\t\t\t\talias,\n\t\t\t\t\ttrue,\n\t\t\t\t),\n\t\t\t\tnew SelectionProxyHandler({ alias, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t\t) as any;\n\t\t};\n\t\treturn { as };\n\t};\n\n\twith(...queries: WithSubquery[]) {\n\t\tconst self = this;\n\n\t\tfunction select(): SQLiteSelectBuilder;\n\t\tfunction select(\n\t\t\tfields: TSelection,\n\t\t): SQLiteSelectBuilder;\n\t\tfunction select(\n\t\t\tfields?: TSelection,\n\t\t): SQLiteSelectBuilder {\n\t\t\treturn new SQLiteSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: undefined,\n\t\t\t\tdialect: self.getDialect(),\n\t\t\t\twithList: queries,\n\t\t\t});\n\t\t}\n\n\t\tfunction selectDistinct(): SQLiteSelectBuilder;\n\t\tfunction selectDistinct(\n\t\t\tfields: TSelection,\n\t\t): SQLiteSelectBuilder;\n\t\tfunction selectDistinct(\n\t\t\tfields?: TSelection,\n\t\t): SQLiteSelectBuilder {\n\t\t\treturn new SQLiteSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: undefined,\n\t\t\t\tdialect: self.getDialect(),\n\t\t\t\twithList: queries,\n\t\t\t\tdistinct: true,\n\t\t\t});\n\t\t}\n\n\t\treturn { select, selectDistinct };\n\t}\n\n\tselect(): SQLiteSelectBuilder;\n\tselect(\n\t\tfields: TSelection,\n\t): SQLiteSelectBuilder;\n\tselect(\n\t\tfields?: TSelection,\n\t): SQLiteSelectBuilder {\n\t\treturn new SQLiteSelectBuilder({ fields: fields ?? undefined, session: undefined, dialect: this.getDialect() });\n\t}\n\n\tselectDistinct(): SQLiteSelectBuilder;\n\tselectDistinct(\n\t\tfields: TSelection,\n\t): SQLiteSelectBuilder;\n\tselectDistinct(\n\t\tfields?: TSelection,\n\t): SQLiteSelectBuilder {\n\t\treturn new SQLiteSelectBuilder({\n\t\t\tfields: fields ?? undefined,\n\t\t\tsession: undefined,\n\t\t\tdialect: this.getDialect(),\n\t\t\tdistinct: true,\n\t\t});\n\t}\n\n\t// Lazy load dialect to avoid circular dependency\n\tprivate getDialect() {\n\t\tif (!this.dialect) {\n\t\t\tthis.dialect = new SQLiteSyncDialect(this.dialectConfig);\n\t\t}\n\n\t\treturn this.dialect;\n\t}\n}\n", "import { entityKind, is } from '~/entity.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type { SelectResultFields } from '~/query-builders/select.types.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { Placeholder, Query, SQLWrapper } from '~/sql/sql.ts';\nimport { Param, SQL, sql } from '~/sql/sql.ts';\nimport type { SQLiteDialect } from '~/sqlite-core/dialect.ts';\nimport type { IndexColumn } from '~/sqlite-core/indexes.ts';\nimport type { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/session.ts';\nimport { SQLiteTable } from '~/sqlite-core/table.ts';\nimport type { Subquery } from '~/subquery.ts';\nimport { Columns, Table } from '~/table.ts';\nimport { type DrizzleTypeError, haveSameKeys, mapUpdateSet, orderSelectedFields, type Simplify } from '~/utils.ts';\nimport type { AnySQLiteColumn, SQLiteColumn } from '../columns/common.ts';\nimport { extractUsedTable } from '../utils.ts';\nimport { QueryBuilder } from './query-builder.ts';\nimport type { SelectedFieldsFlat, SelectedFieldsOrdered } from './select.types.ts';\nimport type { SQLiteUpdateSetSource } from './update.ts';\n\nexport interface SQLiteInsertConfig {\n\ttable: TTable;\n\tvalues: Record[] | SQLiteInsertSelectQueryBuilder | SQL;\n\twithList?: Subquery[];\n\tonConflict?: SQL[];\n\treturning?: SelectedFieldsOrdered;\n\tselect?: boolean;\n}\n\nexport type SQLiteInsertValue = Simplify<\n\t{\n\t\t[Key in keyof TTable['$inferInsert']]: TTable['$inferInsert'][Key] | SQL | Placeholder;\n\t}\n>;\n\nexport type SQLiteInsertSelectQueryBuilder = TypedQueryBuilder<\n\t{ [K in keyof TTable['$inferInsert']]: AnySQLiteColumn | SQL | SQL.Aliased | TTable['$inferInsert'][K] }\n>;\n\nexport class SQLiteInsertBuilder<\n\tTTable extends SQLiteTable,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteInsertBuilder';\n\n\tconstructor(\n\t\tprotected table: TTable,\n\t\tprotected session: SQLiteSession,\n\t\tprotected dialect: SQLiteDialect,\n\t\tprivate withList?: Subquery[],\n\t) {}\n\n\tvalues(value: SQLiteInsertValue): SQLiteInsertBase;\n\tvalues(values: SQLiteInsertValue[]): SQLiteInsertBase;\n\tvalues(\n\t\tvalues: SQLiteInsertValue | SQLiteInsertValue[],\n\t): SQLiteInsertBase {\n\t\tvalues = Array.isArray(values) ? values : [values];\n\t\tif (values.length === 0) {\n\t\t\tthrow new Error('values() must be called with at least one value');\n\t\t}\n\t\tconst mappedValues = values.map((entry) => {\n\t\t\tconst result: Record = {};\n\t\t\tconst cols = this.table[Table.Symbol.Columns];\n\t\t\tfor (const colKey of Object.keys(entry)) {\n\t\t\t\tconst colValue = entry[colKey as keyof typeof entry];\n\t\t\t\tresult[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]);\n\t\t\t}\n\t\t\treturn result;\n\t\t});\n\n\t\t// if (mappedValues.length > 1 && mappedValues.some((t) => Object.keys(t).length === 0)) {\n\t\t// \tthrow new Error(\n\t\t// \t\t`One of the values you want to insert is empty. In SQLite you can insert only one empty object per statement. For this case Drizzle with use \"INSERT INTO ... DEFAULT VALUES\" syntax`,\n\t\t// \t);\n\t\t// }\n\n\t\treturn new SQLiteInsertBase(this.table, mappedValues, this.session, this.dialect, this.withList);\n\t}\n\n\tselect(\n\t\tselectQuery: (qb: QueryBuilder) => SQLiteInsertSelectQueryBuilder,\n\t): SQLiteInsertBase;\n\tselect(selectQuery: (qb: QueryBuilder) => SQL): SQLiteInsertBase;\n\tselect(selectQuery: SQL): SQLiteInsertBase;\n\tselect(selectQuery: SQLiteInsertSelectQueryBuilder): SQLiteInsertBase;\n\tselect(\n\t\tselectQuery:\n\t\t\t| SQL\n\t\t\t| SQLiteInsertSelectQueryBuilder\n\t\t\t| ((qb: QueryBuilder) => SQLiteInsertSelectQueryBuilder | SQL),\n\t): SQLiteInsertBase {\n\t\tconst select = typeof selectQuery === 'function' ? selectQuery(new QueryBuilder()) : selectQuery;\n\n\t\tif (\n\t\t\t!is(select, SQL)\n\t\t\t&& !haveSameKeys(this.table[Columns], select._.selectedFields)\n\t\t) {\n\t\t\tthrow new Error(\n\t\t\t\t'Insert select error: selected fields are not the same or are in a different order compared to the table definition',\n\t\t\t);\n\t\t}\n\n\t\treturn new SQLiteInsertBase(this.table, select, this.session, this.dialect, this.withList, true);\n\t}\n}\n\nexport type SQLiteInsertWithout =\n\tTDynamic extends true ? T\n\t\t: Omit<\n\t\t\tSQLiteInsertBase<\n\t\t\t\tT['_']['table'],\n\t\t\t\tT['_']['resultType'],\n\t\t\t\tT['_']['runResult'],\n\t\t\t\tT['_']['returning'],\n\t\t\t\tTDynamic,\n\t\t\t\tT['_']['excludedMethods'] | K\n\t\t\t>,\n\t\t\tT['_']['excludedMethods'] | K\n\t\t>;\n\nexport type SQLiteInsertReturning<\n\tT extends AnySQLiteInsert,\n\tTDynamic extends boolean,\n\tTSelectedFields extends SelectedFieldsFlat,\n> = SQLiteInsertWithout<\n\tSQLiteInsertBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tSelectResultFields,\n\t\tTDynamic,\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteInsertReturningAll<\n\tT extends AnySQLiteInsert,\n\tTDynamic extends boolean,\n> = SQLiteInsertWithout<\n\tSQLiteInsertBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['table']['$inferSelect'],\n\t\tTDynamic,\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteInsertOnConflictDoUpdateConfig = {\n\ttarget: IndexColumn | IndexColumn[];\n\t/** @deprecated - use either `targetWhere` or `setWhere` */\n\twhere?: SQL;\n\t// TODO: add tests for targetWhere and setWhere\n\ttargetWhere?: SQL;\n\tsetWhere?: SQL;\n\tset: SQLiteUpdateSetSource;\n};\n\nexport type SQLiteInsertDynamic = SQLiteInsert<\n\tT['_']['table'],\n\tT['_']['resultType'],\n\tT['_']['runResult'],\n\tT['_']['returning']\n>;\n\nexport type SQLiteInsertExecute = T['_']['returning'] extends undefined ? T['_']['runResult']\n\t: T['_']['returning'][];\n\nexport type SQLiteInsertPrepare = SQLitePreparedQuery<\n\t{\n\t\ttype: T['_']['resultType'];\n\t\trun: T['_']['runResult'];\n\t\tall: T['_']['returning'] extends undefined ? DrizzleTypeError<'.all() cannot be used without .returning()'>\n\t\t\t: T['_']['returning'][];\n\t\tget: T['_']['returning'] extends undefined ? DrizzleTypeError<'.get() cannot be used without .returning()'>\n\t\t\t: T['_']['returning'];\n\t\tvalues: T['_']['returning'] extends undefined ? DrizzleTypeError<'.values() cannot be used without .returning()'>\n\t\t\t: any[][];\n\t\texecute: SQLiteInsertExecute;\n\t}\n>;\n\nexport type AnySQLiteInsert = SQLiteInsertBase;\n\nexport type SQLiteInsert<\n\tTTable extends SQLiteTable = SQLiteTable,\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = unknown,\n\tTReturning = any,\n> = SQLiteInsertBase;\n\nexport interface SQLiteInsertBase<\n\tTTable extends SQLiteTable,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTReturning = undefined,\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n> extends\n\tSQLWrapper,\n\tQueryPromise,\n\tRunnableQuery\n{\n\treadonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly table: TTable;\n\t\treadonly resultType: TResultType;\n\t\treadonly runResult: TRunResult;\n\t\treadonly returning: TReturning;\n\t\treadonly dynamic: TDynamic;\n\t\treadonly excludedMethods: TExcludedMethods;\n\t\treadonly result: TReturning extends undefined ? TRunResult : TReturning[];\n\t};\n}\n\nexport class SQLiteInsertBase<\n\tTTable extends SQLiteTable,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTReturning = undefined,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTDynamic extends boolean = false,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTExcludedMethods extends string = never,\n> extends QueryPromise\n\timplements RunnableQuery, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteInsert';\n\n\t/** @internal */\n\tconfig: SQLiteInsertConfig;\n\n\tconstructor(\n\t\ttable: TTable,\n\t\tvalues: SQLiteInsertConfig['values'],\n\t\tprivate session: SQLiteSession,\n\t\tprivate dialect: SQLiteDialect,\n\t\twithList?: Subquery[],\n\t\tselect?: boolean,\n\t) {\n\t\tsuper();\n\t\tthis.config = { table, values: values as any, withList, select };\n\t}\n\n\t/**\n\t * Adds a `returning` clause to the query.\n\t *\n\t * Calling this method will return the specified fields of the inserted rows. If no fields are specified, all fields will be returned.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/insert#insert-returning}\n\t *\n\t * @example\n\t * ```ts\n\t * // Insert one row and return all fields\n\t * const insertedCar: Car[] = await db.insert(cars)\n\t * .values({ brand: 'BMW' })\n\t * .returning();\n\t *\n\t * // Insert one row and return only the id\n\t * const insertedCarId: { id: number }[] = await db.insert(cars)\n\t * .values({ brand: 'BMW' })\n\t * .returning({ id: cars.id });\n\t * ```\n\t */\n\treturning(): SQLiteInsertReturningAll;\n\treturning(\n\t\tfields: TSelectedFields,\n\t): SQLiteInsertReturning;\n\treturning(\n\t\tfields: SelectedFieldsFlat = this.config.table[SQLiteTable.Symbol.Columns],\n\t): SQLiteInsertWithout {\n\t\tthis.config.returning = orderSelectedFields(fields);\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds an `on conflict do nothing` clause to the query.\n\t *\n\t * Calling this method simply avoids inserting a row as its alternative action.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/insert#on-conflict-do-nothing}\n\t *\n\t * @param config The `target` and `where` clauses.\n\t *\n\t * @example\n\t * ```ts\n\t * // Insert one row and cancel the insert if there's a conflict\n\t * await db.insert(cars)\n\t * .values({ id: 1, brand: 'BMW' })\n\t * .onConflictDoNothing();\n\t *\n\t * // Explicitly specify conflict target\n\t * await db.insert(cars)\n\t * .values({ id: 1, brand: 'BMW' })\n\t * .onConflictDoNothing({ target: cars.id });\n\t * ```\n\t */\n\tonConflictDoNothing(config: { target?: IndexColumn | IndexColumn[]; where?: SQL } = {}): this {\n\t\tif (!this.config.onConflict) this.config.onConflict = [];\n\n\t\tif (config.target === undefined) {\n\t\t\tthis.config.onConflict.push(sql` on conflict do nothing`);\n\t\t} else {\n\t\t\tconst targetSql = Array.isArray(config.target) ? sql`${config.target}` : sql`${[config.target]}`;\n\t\t\tconst whereSql = config.where ? sql` where ${config.where}` : sql``;\n\t\t\tthis.config.onConflict.push(sql` on conflict ${targetSql} do nothing${whereSql}`);\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds an `on conflict do update` clause to the query.\n\t *\n\t * Calling this method will update the existing row that conflicts with the row proposed for insertion as its alternative action.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/insert#upserts-and-conflicts}\n\t *\n\t * @param config The `target`, `set` and `where` clauses.\n\t *\n\t * @example\n\t * ```ts\n\t * // Update the row if there's a conflict\n\t * await db.insert(cars)\n\t * .values({ id: 1, brand: 'BMW' })\n\t * .onConflictDoUpdate({\n\t * target: cars.id,\n\t * set: { brand: 'Porsche' }\n\t * });\n\t *\n\t * // Upsert with 'where' clause\n\t * await db.insert(cars)\n\t * .values({ id: 1, brand: 'BMW' })\n\t * .onConflictDoUpdate({\n\t * target: cars.id,\n\t * set: { brand: 'newBMW' },\n\t * where: sql`${cars.createdAt} > '2023-01-01'::date`,\n\t * });\n\t * ```\n\t */\n\tonConflictDoUpdate(config: SQLiteInsertOnConflictDoUpdateConfig): this {\n\t\tif (config.where && (config.targetWhere || config.setWhere)) {\n\t\t\tthrow new Error(\n\t\t\t\t'You cannot use both \"where\" and \"targetWhere\"/\"setWhere\" at the same time - \"where\" is deprecated, use \"targetWhere\" or \"setWhere\" instead.',\n\t\t\t);\n\t\t}\n\n\t\tif (!this.config.onConflict) this.config.onConflict = [];\n\n\t\tconst whereSql = config.where ? sql` where ${config.where}` : undefined;\n\t\tconst targetWhereSql = config.targetWhere ? sql` where ${config.targetWhere}` : undefined;\n\t\tconst setWhereSql = config.setWhere ? sql` where ${config.setWhere}` : undefined;\n\t\tconst targetSql = Array.isArray(config.target) ? sql`${config.target}` : sql`${[config.target]}`;\n\t\tconst setSql = this.dialect.buildUpdateSet(this.config.table, mapUpdateSet(this.config.table, config.set));\n\t\tthis.config.onConflict.push(\n\t\t\tsql` on conflict ${targetSql}${targetWhereSql} do update set ${setSql}${whereSql}${setWhereSql}`,\n\t\t);\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildInsertQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\t/** @internal */\n\t_prepare(isOneTimeQuery = true): SQLiteInsertPrepare {\n\t\treturn this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tthis.dialect.sqlToQuery(this.getSQL()),\n\t\t\tthis.config.returning,\n\t\t\tthis.config.returning ? 'all' : 'run',\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\ttype: 'insert',\n\t\t\t\ttables: extractUsedTable(this.config.table),\n\t\t\t},\n\t\t) as SQLiteInsertPrepare;\n\t}\n\n\tprepare(): SQLiteInsertPrepare {\n\t\treturn this._prepare(false);\n\t}\n\n\trun: ReturnType['run'] = (placeholderValues) => {\n\t\treturn this._prepare().run(placeholderValues);\n\t};\n\n\tall: ReturnType['all'] = (placeholderValues) => {\n\t\treturn this._prepare().all(placeholderValues);\n\t};\n\n\tget: ReturnType['get'] = (placeholderValues) => {\n\t\treturn this._prepare().get(placeholderValues);\n\t};\n\n\tvalues: ReturnType['values'] = (placeholderValues) => {\n\t\treturn this._prepare().values(placeholderValues);\n\t};\n\n\toverride async execute(): Promise> {\n\t\treturn (this.config.returning ? this.all() : this.run()) as SQLiteInsertExecute;\n\t}\n\n\t$dynamic(): SQLiteInsertDynamic {\n\t\treturn this as any;\n\t}\n}\n", "//# sourceMappingURL=select.types.js.map", "import type { GetColumnData } from '~/column.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport type { JoinType, SelectResultFields } from '~/query-builders/select.types.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { Placeholder, Query, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteDialect } from '~/sqlite-core/dialect.ts';\nimport type { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/session.ts';\nimport { SQLiteTable } from '~/sqlite-core/table.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { Table } from '~/table.ts';\nimport {\n\ttype DrizzleTypeError,\n\tgetTableLikeName,\n\tmapUpdateSet,\n\torderSelectedFields,\n\ttype UpdateSet,\n\ttype ValueOrArray,\n} from '~/utils.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport type { SQLiteColumn } from '../columns/common.ts';\nimport { extractUsedTable } from '../utils.ts';\nimport { SQLiteViewBase } from '../view-base.ts';\nimport type { SelectedFields, SelectedFieldsOrdered, SQLiteSelectJoinConfig } from './select.types.ts';\n\nexport interface SQLiteUpdateConfig {\n\twhere?: SQL | undefined;\n\tlimit?: number | Placeholder;\n\torderBy?: (SQLiteColumn | SQL | SQL.Aliased)[];\n\tset: UpdateSet;\n\ttable: SQLiteTable;\n\tfrom?: SQLiteTable | Subquery | SQLiteViewBase | SQL;\n\tjoins: SQLiteSelectJoinConfig[];\n\treturning?: SelectedFieldsOrdered;\n\twithList?: Subquery[];\n}\n\nexport type SQLiteUpdateSetSource =\n\t& {\n\t\t[Key in keyof TTable['$inferInsert']]?:\n\t\t\t| GetColumnData\n\t\t\t| SQL\n\t\t\t| SQLiteColumn\n\t\t\t| undefined;\n\t}\n\t& {};\n\nexport class SQLiteUpdateBuilder<\n\tTTable extends SQLiteTable,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteUpdateBuilder';\n\n\tdeclare readonly _: {\n\t\treadonly table: TTable;\n\t};\n\n\tconstructor(\n\t\tprotected table: TTable,\n\t\tprotected session: SQLiteSession,\n\t\tprotected dialect: SQLiteDialect,\n\t\tprivate withList?: Subquery[],\n\t) {}\n\n\tset(\n\t\tvalues: SQLiteUpdateSetSource,\n\t): SQLiteUpdateWithout<\n\t\tSQLiteUpdateBase,\n\t\tfalse,\n\t\t'leftJoin' | 'rightJoin' | 'innerJoin' | 'fullJoin'\n\t> {\n\t\treturn new SQLiteUpdateBase(\n\t\t\tthis.table,\n\t\t\tmapUpdateSet(this.table, values),\n\t\t\tthis.session,\n\t\t\tthis.dialect,\n\t\t\tthis.withList,\n\t\t) as any;\n\t}\n}\n\nexport type SQLiteUpdateWithout<\n\tT extends AnySQLiteUpdate,\n\tTDynamic extends boolean,\n\tK extends keyof T & string,\n> = TDynamic extends true ? T : Omit<\n\tSQLiteUpdateBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['from'],\n\t\tT['_']['returning'],\n\t\tTDynamic,\n\t\tT['_']['excludedMethods'] | K\n\t>,\n\tT['_']['excludedMethods'] | K\n>;\n\nexport type SQLiteUpdateWithJoins<\n\tT extends AnySQLiteUpdate,\n\tTDynamic extends boolean,\n\tTFrom extends SQLiteTable | Subquery | SQLiteViewBase | SQL,\n> = TDynamic extends true ? T : Omit<\n\tSQLiteUpdateBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tTFrom,\n\t\tT['_']['returning'],\n\t\tTDynamic,\n\t\tExclude\n\t>,\n\tExclude\n>;\n\nexport type SQLiteUpdateReturningAll = SQLiteUpdateWithout<\n\tSQLiteUpdateBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['from'],\n\t\tT['_']['table']['$inferSelect'],\n\t\tTDynamic,\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteUpdateReturning<\n\tT extends AnySQLiteUpdate,\n\tTDynamic extends boolean,\n\tTSelectedFields extends SelectedFields,\n> = SQLiteUpdateWithout<\n\tSQLiteUpdateBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['from'],\n\t\tSelectResultFields,\n\t\tTDynamic,\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteUpdateExecute = T['_']['returning'] extends undefined ? T['_']['runResult']\n\t: T['_']['returning'][];\n\nexport type SQLiteUpdatePrepare = SQLitePreparedQuery<\n\t{\n\t\ttype: T['_']['resultType'];\n\t\trun: T['_']['runResult'];\n\t\tall: T['_']['returning'] extends undefined ? DrizzleTypeError<'.all() cannot be used without .returning()'>\n\t\t\t: T['_']['returning'][];\n\t\tget: T['_']['returning'] extends undefined ? DrizzleTypeError<'.get() cannot be used without .returning()'>\n\t\t\t: T['_']['returning'];\n\t\tvalues: T['_']['returning'] extends undefined ? DrizzleTypeError<'.values() cannot be used without .returning()'>\n\t\t\t: any[][];\n\t\texecute: SQLiteUpdateExecute;\n\t}\n>;\n\nexport type SQLiteUpdateJoinFn<\n\tT extends AnySQLiteUpdate,\n> = <\n\tTJoinedTable extends SQLiteTable | Subquery | SQLiteViewBase | SQL,\n>(\n\ttable: TJoinedTable,\n\ton:\n\t\t| (\n\t\t\t(\n\t\t\t\tupdateTable: T['_']['table']['_']['columns'],\n\t\t\t\tfrom: T['_']['from'] extends SQLiteTable ? T['_']['from']['_']['columns']\n\t\t\t\t\t: T['_']['from'] extends Subquery | SQLiteViewBase ? T['_']['from']['_']['selectedFields']\n\t\t\t\t\t: never,\n\t\t\t) => SQL | undefined\n\t\t)\n\t\t| SQL\n\t\t| undefined,\n) => T;\n\nexport type SQLiteUpdateDynamic = SQLiteUpdate<\n\tT['_']['table'],\n\tT['_']['resultType'],\n\tT['_']['runResult'],\n\tT['_']['returning']\n>;\n\nexport type SQLiteUpdate<\n\tTTable extends SQLiteTable = SQLiteTable,\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = any,\n\tTFrom extends SQLiteTable | Subquery | SQLiteViewBase | SQL | undefined = undefined,\n\tTReturning extends Record | undefined = Record | undefined,\n> = SQLiteUpdateBase;\n\nexport type AnySQLiteUpdate = SQLiteUpdateBase;\n\nexport interface SQLiteUpdateBase<\n\tTTable extends SQLiteTable = SQLiteTable,\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = unknown,\n\tTFrom extends SQLiteTable | Subquery | SQLiteViewBase | SQL | undefined = undefined,\n\tTReturning = undefined,\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n> extends SQLWrapper, QueryPromise {\n\treadonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly table: TTable;\n\t\treadonly resultType: TResultType;\n\t\treadonly runResult: TRunResult;\n\t\treadonly from: TFrom;\n\t\treadonly returning: TReturning;\n\t\treadonly dynamic: TDynamic;\n\t\treadonly excludedMethods: TExcludedMethods;\n\t\treadonly result: TReturning extends undefined ? TRunResult : TReturning[];\n\t};\n}\n\nexport class SQLiteUpdateBase<\n\tTTable extends SQLiteTable = SQLiteTable,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = unknown,\n\tTFrom extends SQLiteTable | Subquery | SQLiteViewBase | SQL | undefined = undefined,\n\tTReturning = undefined,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTDynamic extends boolean = false,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTExcludedMethods extends string = never,\n> extends QueryPromise\n\timplements RunnableQuery, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteUpdate';\n\n\t/** @internal */\n\tconfig: SQLiteUpdateConfig;\n\n\tconstructor(\n\t\ttable: TTable,\n\t\tset: UpdateSet,\n\t\tprivate session: SQLiteSession,\n\t\tprivate dialect: SQLiteDialect,\n\t\twithList?: Subquery[],\n\t) {\n\t\tsuper();\n\t\tthis.config = { set, table, withList, joins: [] };\n\t}\n\n\tfrom(\n\t\tsource: TFrom,\n\t): SQLiteUpdateWithJoins {\n\t\tthis.config.from = source;\n\t\treturn this as any;\n\t}\n\n\tprivate createJoin(\n\t\tjoinType: TJoinType,\n\t): SQLiteUpdateJoinFn {\n\t\treturn ((\n\t\t\ttable: SQLiteTable | Subquery | SQLiteViewBase | SQL,\n\t\t\ton: ((updateTable: TTable, from: TFrom) => SQL | undefined) | SQL | undefined,\n\t\t) => {\n\t\t\tconst tableName = getTableLikeName(table);\n\n\t\t\tif (typeof tableName === 'string' && this.config.joins.some((join) => join.alias === tableName)) {\n\t\t\t\tthrow new Error(`Alias \"${tableName}\" is already used in this query`);\n\t\t\t}\n\n\t\t\tif (typeof on === 'function') {\n\t\t\t\tconst from = this.config.from\n\t\t\t\t\t? is(table, SQLiteTable)\n\t\t\t\t\t\t? table[Table.Symbol.Columns]\n\t\t\t\t\t\t: is(table, Subquery)\n\t\t\t\t\t\t? table._.selectedFields\n\t\t\t\t\t\t: is(table, SQLiteViewBase)\n\t\t\t\t\t\t? table[ViewBaseConfig].selectedFields\n\t\t\t\t\t\t: undefined\n\t\t\t\t\t: undefined;\n\t\t\t\ton = on(\n\t\t\t\t\tnew Proxy(\n\t\t\t\t\t\tthis.config.table[Table.Symbol.Columns],\n\t\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t\t) as any,\n\t\t\t\t\tfrom && new Proxy(\n\t\t\t\t\t\tfrom,\n\t\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t\t) as any,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.config.joins.push({ on, table, joinType, alias: tableName });\n\n\t\t\treturn this as any;\n\t\t}) as any;\n\t}\n\n\tleftJoin = this.createJoin('left');\n\n\trightJoin = this.createJoin('right');\n\n\tinnerJoin = this.createJoin('inner');\n\n\tfullJoin = this.createJoin('full');\n\n\t/**\n\t * Adds a 'where' clause to the query.\n\t *\n\t * Calling this method will update only those rows that fulfill a specified condition.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/update}\n\t *\n\t * @param where the 'where' clause.\n\t *\n\t * @example\n\t * You can use conditional operators and `sql function` to filter the rows to be updated.\n\t *\n\t * ```ts\n\t * // Update all cars with green color\n\t * db.update(cars).set({ color: 'red' })\n\t * .where(eq(cars.color, 'green'));\n\t * // or\n\t * db.update(cars).set({ color: 'red' })\n\t * .where(sql`${cars.color} = 'green'`)\n\t * ```\n\t *\n\t * You can logically combine conditional operators with `and()` and `or()` operators:\n\t *\n\t * ```ts\n\t * // Update all BMW cars with a green color\n\t * db.update(cars).set({ color: 'red' })\n\t * .where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW')));\n\t *\n\t * // Update all cars with the green or blue color\n\t * db.update(cars).set({ color: 'red' })\n\t * .where(or(eq(cars.color, 'green'), eq(cars.color, 'blue')));\n\t * ```\n\t */\n\twhere(where: SQL | undefined): SQLiteUpdateWithout {\n\t\tthis.config.where = where;\n\t\treturn this as any;\n\t}\n\n\torderBy(\n\t\tbuilder: (updateTable: TTable) => ValueOrArray,\n\t): SQLiteUpdateWithout;\n\torderBy(...columns: (SQLiteColumn | SQL | SQL.Aliased)[]): SQLiteUpdateWithout;\n\torderBy(\n\t\t...columns:\n\t\t\t| [(updateTable: TTable) => ValueOrArray]\n\t\t\t| (SQLiteColumn | SQL | SQL.Aliased)[]\n\t): SQLiteUpdateWithout {\n\t\tif (typeof columns[0] === 'function') {\n\t\t\tconst orderBy = columns[0](\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.table[Table.Symbol.Columns],\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'alias', sqlBehavior: 'sql' }),\n\t\t\t\t) as any,\n\t\t\t);\n\n\t\t\tconst orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy];\n\t\t\tthis.config.orderBy = orderByArray;\n\t\t} else {\n\t\t\tconst orderByArray = columns as (SQLiteColumn | SQL | SQL.Aliased)[];\n\t\t\tthis.config.orderBy = orderByArray;\n\t\t}\n\t\treturn this as any;\n\t}\n\n\tlimit(limit: number | Placeholder): SQLiteUpdateWithout {\n\t\tthis.config.limit = limit;\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `returning` clause to the query.\n\t *\n\t * Calling this method will return the specified fields of the updated rows. If no fields are specified, all fields will be returned.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/update#update-with-returning}\n\t *\n\t * @example\n\t * ```ts\n\t * // Update all cars with the green color and return all fields\n\t * const updatedCars: Car[] = await db.update(cars)\n\t * .set({ color: 'red' })\n\t * .where(eq(cars.color, 'green'))\n\t * .returning();\n\t *\n\t * // Update all cars with the green color and return only their id and brand fields\n\t * const updatedCarsIdsAndBrands: { id: number, brand: string }[] = await db.update(cars)\n\t * .set({ color: 'red' })\n\t * .where(eq(cars.color, 'green'))\n\t * .returning({ id: cars.id, brand: cars.brand });\n\t * ```\n\t */\n\treturning(): SQLiteUpdateReturningAll;\n\treturning(\n\t\tfields: TSelectedFields,\n\t): SQLiteUpdateReturning;\n\treturning(\n\t\tfields: SelectedFields = this.config.table[SQLiteTable.Symbol.Columns],\n\t): SQLiteUpdateWithout {\n\t\tthis.config.returning = orderSelectedFields(fields);\n\t\treturn this as any;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildUpdateQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\t/** @internal */\n\t_prepare(isOneTimeQuery = true): SQLiteUpdatePrepare {\n\t\treturn this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tthis.dialect.sqlToQuery(this.getSQL()),\n\t\t\tthis.config.returning,\n\t\t\tthis.config.returning ? 'all' : 'run',\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\ttype: 'insert',\n\t\t\t\ttables: extractUsedTable(this.config.table),\n\t\t\t},\n\t\t) as SQLiteUpdatePrepare;\n\t}\n\n\tprepare(): SQLiteUpdatePrepare {\n\t\treturn this._prepare(false);\n\t}\n\n\trun: ReturnType['run'] = (placeholderValues) => {\n\t\treturn this._prepare().run(placeholderValues);\n\t};\n\n\tall: ReturnType['all'] = (placeholderValues) => {\n\t\treturn this._prepare().all(placeholderValues);\n\t};\n\n\tget: ReturnType['get'] = (placeholderValues) => {\n\t\treturn this._prepare().get(placeholderValues);\n\t};\n\n\tvalues: ReturnType['values'] = (placeholderValues) => {\n\t\treturn this._prepare().values(placeholderValues);\n\t};\n\n\toverride async execute(): Promise> {\n\t\treturn (this.config.returning ? this.all() : this.run()) as SQLiteUpdateExecute;\n\t}\n\n\t$dynamic(): SQLiteUpdateDynamic {\n\t\treturn this as any;\n\t}\n}\n", "export * from './delete.ts';\nexport * from './insert.ts';\nexport * from './query-builder.ts';\nexport * from './select.ts';\nexport * from './select.types.ts';\nexport * from './update.ts';\n", "import { entityKind } from '~/entity.ts';\nimport { SQL, sql, type SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteSession } from '../session.ts';\nimport type { SQLiteTable } from '../table.ts';\nimport type { SQLiteView } from '../view.ts';\n\nexport class SQLiteCountBuilder<\n\tTSession extends SQLiteSession,\n> extends SQL implements Promise, SQLWrapper {\n\tprivate sql: SQL;\n\n\tstatic override readonly [entityKind] = 'SQLiteCountBuilderAsync';\n\t[Symbol.toStringTag] = 'SQLiteCountBuilderAsync';\n\n\tprivate session: TSession;\n\n\tprivate static buildEmbeddedCount(\n\t\tsource: SQLiteTable | SQLiteView | SQL | SQLWrapper,\n\t\tfilters?: SQL,\n\t): SQL {\n\t\treturn sql`(select count(*) from ${source}${sql.raw(' where ').if(filters)}${filters})`;\n\t}\n\n\tprivate static buildCount(\n\t\tsource: SQLiteTable | SQLiteView | SQL | SQLWrapper,\n\t\tfilters?: SQL,\n\t): SQL {\n\t\treturn sql`select count(*) from ${source}${sql.raw(' where ').if(filters)}${filters}`;\n\t}\n\n\tconstructor(\n\t\treadonly params: {\n\t\t\tsource: SQLiteTable | SQLiteView | SQL | SQLWrapper;\n\t\t\tfilters?: SQL;\n\t\t\tsession: TSession;\n\t\t},\n\t) {\n\t\tsuper(SQLiteCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);\n\n\t\tthis.session = params.session;\n\n\t\tthis.sql = SQLiteCountBuilder.buildCount(\n\t\t\tparams.source,\n\t\t\tparams.filters,\n\t\t);\n\t}\n\n\tthen(\n\t\tonfulfilled?: ((value: number) => TResult1 | PromiseLike) | null | undefined,\n\t\tonrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined,\n\t): Promise {\n\t\treturn Promise.resolve(this.session.count(this.sql)).then(\n\t\t\tonfulfilled,\n\t\t\tonrejected,\n\t\t);\n\t}\n\n\tcatch(\n\t\tonRejected?: ((reason: any) => never | PromiseLike) | null | undefined,\n\t): Promise {\n\t\treturn this.then(undefined, onRejected);\n\t}\n\n\tfinally(onFinally?: (() => void) | null | undefined): Promise {\n\t\treturn this.then(\n\t\t\t(value) => {\n\t\t\t\tonFinally?.();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\t(reason) => {\n\t\t\t\tonFinally?.();\n\t\t\t\tthrow reason;\n\t\t\t},\n\t\t);\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport {\n\ttype BuildQueryResult,\n\ttype BuildRelationalQueryResult,\n\ttype DBQueryConfig,\n\tmapRelationalRow,\n\ttype TableRelationalConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { Query, QueryWithTypings, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport type { KnownKeysOnly } from '~/utils.ts';\nimport type { SQLiteDialect } from '../dialect.ts';\nimport type { PreparedQueryConfig, SQLitePreparedQuery, SQLiteSession } from '../session.ts';\nimport type { SQLiteTable } from '../table.ts';\n\nexport type SQLiteRelationalQueryKind = TMode extends 'async'\n\t? SQLiteRelationalQuery\n\t: SQLiteSyncRelationalQuery;\n\nexport class RelationalQueryBuilder<\n\tTMode extends 'sync' | 'async',\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n\tTFields extends TableRelationalConfig,\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteAsyncRelationalQueryBuilder';\n\n\tconstructor(\n\t\tprotected mode: TMode,\n\t\tprotected fullSchema: Record,\n\t\tprotected schema: TSchema,\n\t\tprotected tableNamesMap: Record,\n\t\tprotected table: SQLiteTable,\n\t\tprotected tableConfig: TableRelationalConfig,\n\t\tprotected dialect: SQLiteDialect,\n\t\tprotected session: SQLiteSession<'async', unknown, TFullSchema, TSchema>,\n\t) {}\n\n\tfindMany>(\n\t\tconfig?: KnownKeysOnly>,\n\t): SQLiteRelationalQueryKind[]> {\n\t\treturn (this.mode === 'sync'\n\t\t\t? new SQLiteSyncRelationalQuery(\n\t\t\t\tthis.fullSchema,\n\t\t\t\tthis.schema,\n\t\t\t\tthis.tableNamesMap,\n\t\t\t\tthis.table,\n\t\t\t\tthis.tableConfig,\n\t\t\t\tthis.dialect,\n\t\t\t\tthis.session,\n\t\t\t\tconfig ? (config as DBQueryConfig<'many', true>) : {},\n\t\t\t\t'many',\n\t\t\t)\n\t\t\t: new SQLiteRelationalQuery(\n\t\t\t\tthis.fullSchema,\n\t\t\t\tthis.schema,\n\t\t\t\tthis.tableNamesMap,\n\t\t\t\tthis.table,\n\t\t\t\tthis.tableConfig,\n\t\t\t\tthis.dialect,\n\t\t\t\tthis.session,\n\t\t\t\tconfig ? (config as DBQueryConfig<'many', true>) : {},\n\t\t\t\t'many',\n\t\t\t)) as SQLiteRelationalQueryKind[]>;\n\t}\n\n\tfindFirst, 'limit'>>(\n\t\tconfig?: KnownKeysOnly, 'limit'>>,\n\t): SQLiteRelationalQueryKind | undefined> {\n\t\treturn (this.mode === 'sync'\n\t\t\t? new SQLiteSyncRelationalQuery(\n\t\t\t\tthis.fullSchema,\n\t\t\t\tthis.schema,\n\t\t\t\tthis.tableNamesMap,\n\t\t\t\tthis.table,\n\t\t\t\tthis.tableConfig,\n\t\t\t\tthis.dialect,\n\t\t\t\tthis.session,\n\t\t\t\tconfig ? { ...(config as DBQueryConfig<'many', true> | undefined), limit: 1 } : { limit: 1 },\n\t\t\t\t'first',\n\t\t\t)\n\t\t\t: new SQLiteRelationalQuery(\n\t\t\t\tthis.fullSchema,\n\t\t\t\tthis.schema,\n\t\t\t\tthis.tableNamesMap,\n\t\t\t\tthis.table,\n\t\t\t\tthis.tableConfig,\n\t\t\t\tthis.dialect,\n\t\t\t\tthis.session,\n\t\t\t\tconfig ? { ...(config as DBQueryConfig<'many', true> | undefined), limit: 1 } : { limit: 1 },\n\t\t\t\t'first',\n\t\t\t)) as SQLiteRelationalQueryKind | undefined>;\n\t}\n}\n\nexport class SQLiteRelationalQuery extends QueryPromise\n\timplements RunnableQuery, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteAsyncRelationalQuery';\n\n\tdeclare readonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly type: TType;\n\t\treadonly result: TResult;\n\t};\n\n\t/** @internal */\n\tmode: 'many' | 'first';\n\n\tconstructor(\n\t\tprivate fullSchema: Record,\n\t\tprivate schema: TablesRelationalConfig,\n\t\tprivate tableNamesMap: Record,\n\t\t/** @internal */\n\t\tpublic table: SQLiteTable,\n\t\tprivate tableConfig: TableRelationalConfig,\n\t\tprivate dialect: SQLiteDialect,\n\t\tprivate session: SQLiteSession<'sync' | 'async', unknown, Record, TablesRelationalConfig>,\n\t\tprivate config: DBQueryConfig<'many', true> | true,\n\t\tmode: 'many' | 'first',\n\t) {\n\t\tsuper();\n\t\tthis.mode = mode;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildRelationalQuery({\n\t\t\tfullSchema: this.fullSchema,\n\t\t\tschema: this.schema,\n\t\t\ttableNamesMap: this.tableNamesMap,\n\t\t\ttable: this.table,\n\t\t\ttableConfig: this.tableConfig,\n\t\t\tqueryConfig: this.config,\n\t\t\ttableAlias: this.tableConfig.tsName,\n\t\t}).sql as SQL;\n\t}\n\n\t/** @internal */\n\t_prepare(\n\t\tisOneTimeQuery = false,\n\t): SQLitePreparedQuery {\n\t\tconst { query, builtQuery } = this._toSQL();\n\n\t\treturn this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tbuiltQuery,\n\t\t\tundefined,\n\t\t\tthis.mode === 'first' ? 'get' : 'all',\n\t\t\ttrue,\n\t\t\t(rawRows, mapColumnValue) => {\n\t\t\t\tconst rows = rawRows.map((row) =>\n\t\t\t\t\tmapRelationalRow(this.schema, this.tableConfig, row, query.selection, mapColumnValue)\n\t\t\t\t);\n\t\t\t\tif (this.mode === 'first') {\n\t\t\t\t\treturn rows[0] as TResult;\n\t\t\t\t}\n\t\t\t\treturn rows as TResult;\n\t\t\t},\n\t\t) as SQLitePreparedQuery;\n\t}\n\n\tprepare(): SQLitePreparedQuery {\n\t\treturn this._prepare(false);\n\t}\n\n\tprivate _toSQL(): { query: BuildRelationalQueryResult; builtQuery: QueryWithTypings } {\n\t\tconst query = this.dialect.buildRelationalQuery({\n\t\t\tfullSchema: this.fullSchema,\n\t\t\tschema: this.schema,\n\t\t\ttableNamesMap: this.tableNamesMap,\n\t\t\ttable: this.table,\n\t\t\ttableConfig: this.tableConfig,\n\t\t\tqueryConfig: this.config,\n\t\t\ttableAlias: this.tableConfig.tsName,\n\t\t});\n\n\t\tconst builtQuery = this.dialect.sqlToQuery(query.sql as SQL);\n\n\t\treturn { query, builtQuery };\n\t}\n\n\ttoSQL(): Query {\n\t\treturn this._toSQL().builtQuery;\n\t}\n\n\t/** @internal */\n\texecuteRaw(): TResult {\n\t\tif (this.mode === 'first') {\n\t\t\treturn this._prepare(false).get() as TResult;\n\t\t}\n\t\treturn this._prepare(false).all() as TResult;\n\t}\n\n\toverride async execute(): Promise {\n\t\treturn this.executeRaw();\n\t}\n}\n\nexport class SQLiteSyncRelationalQuery extends SQLiteRelationalQuery<'sync', TResult> {\n\tstatic override readonly [entityKind]: string = 'SQLiteSyncRelationalQuery';\n\n\tsync(): TResult {\n\t\treturn this.executeRaw();\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { PreparedQuery } from '~/session.ts';\nimport type { SQL, SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteAsyncDialect } from '../dialect.ts';\n\ntype SQLiteRawAction = 'all' | 'get' | 'values' | 'run';\nexport interface SQLiteRawConfig {\n\taction: SQLiteRawAction;\n}\n\nexport interface SQLiteRaw extends QueryPromise, RunnableQuery, SQLWrapper {}\n\nexport class SQLiteRaw extends QueryPromise\n\timplements RunnableQuery, SQLWrapper, PreparedQuery\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteRaw';\n\n\tdeclare readonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly result: TResult;\n\t};\n\n\t/** @internal */\n\tconfig: SQLiteRawConfig;\n\n\tconstructor(\n\t\tpublic execute: () => Promise,\n\t\t/** @internal */\n\t\tpublic getSQL: () => SQL,\n\t\taction: SQLiteRawAction,\n\t\tprivate dialect: SQLiteAsyncDialect,\n\t\tprivate mapBatchResult: (result: unknown) => unknown,\n\t) {\n\t\tsuper();\n\t\tthis.config = { action };\n\t}\n\n\tgetQuery() {\n\t\treturn { ...this.dialect.sqlToQuery(this.getSQL()), method: this.config.action };\n\t}\n\n\tmapResult(result: unknown, isFromBatch?: boolean) {\n\t\treturn isFromBatch ? this.mapBatchResult(result) : result;\n\t}\n\n\t_prepare(): PreparedQuery {\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tisResponseInArrayMode(): boolean {\n\t\treturn false;\n\t}\n}\n", "import type { Cache } from '~/cache/core/cache.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type { ExtractTablesWithRelations, RelationalSchemaConfig, TablesRelationalConfig } from '~/relations.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport { type ColumnsSelection, type SQL, sql, type SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteAsyncDialect, SQLiteSyncDialect } from '~/sqlite-core/dialect.ts';\nimport {\n\tQueryBuilder,\n\tSQLiteDeleteBase,\n\tSQLiteInsertBuilder,\n\tSQLiteSelectBuilder,\n\tSQLiteUpdateBuilder,\n} from '~/sqlite-core/query-builders/index.ts';\nimport type {\n\tDBResult,\n\tResult,\n\tSQLiteSession,\n\tSQLiteTransaction,\n\tSQLiteTransactionConfig,\n} from '~/sqlite-core/session.ts';\nimport type { SQLiteTable } from '~/sqlite-core/table.ts';\nimport { WithSubquery } from '~/subquery.ts';\nimport type { DrizzleTypeError } from '~/utils.ts';\nimport { SQLiteCountBuilder } from './query-builders/count.ts';\nimport { RelationalQueryBuilder } from './query-builders/query.ts';\nimport { SQLiteRaw } from './query-builders/raw.ts';\nimport type { SelectedFields } from './query-builders/select.types.ts';\nimport type { WithBuilder } from './subquery.ts';\nimport type { SQLiteViewBase } from './view-base.ts';\n\nexport class BaseSQLiteDatabase<\n\tTResultKind extends 'sync' | 'async',\n\tTRunResult,\n\tTFullSchema extends Record = Record,\n\tTSchema extends TablesRelationalConfig = ExtractTablesWithRelations,\n> {\n\tstatic readonly [entityKind]: string = 'BaseSQLiteDatabase';\n\n\tdeclare readonly _: {\n\t\treadonly schema: TSchema | undefined;\n\t\treadonly fullSchema: TFullSchema;\n\t\treadonly tableNamesMap: Record;\n\t};\n\n\tquery: TFullSchema extends Record\n\t\t? DrizzleTypeError<'Seems like the schema generic is missing - did you forget to add it to your DB type?'>\n\t\t: {\n\t\t\t[K in keyof TSchema]: RelationalQueryBuilder;\n\t\t};\n\n\tconstructor(\n\t\tprivate resultKind: TResultKind,\n\t\t/** @internal */\n\t\treadonly dialect: { sync: SQLiteSyncDialect; async: SQLiteAsyncDialect }[TResultKind],\n\t\t/** @internal */\n\t\treadonly session: SQLiteSession,\n\t\tschema: RelationalSchemaConfig | undefined,\n\t) {\n\t\tthis._ = schema\n\t\t\t? {\n\t\t\t\tschema: schema.schema,\n\t\t\t\tfullSchema: schema.fullSchema as TFullSchema,\n\t\t\t\ttableNamesMap: schema.tableNamesMap,\n\t\t\t}\n\t\t\t: {\n\t\t\t\tschema: undefined,\n\t\t\t\tfullSchema: {} as TFullSchema,\n\t\t\t\ttableNamesMap: {},\n\t\t\t};\n\t\tthis.query = {} as typeof this['query'];\n\t\tconst query = this.query as {\n\t\t\t[K in keyof TSchema]: RelationalQueryBuilder;\n\t\t};\n\t\tif (this._.schema) {\n\t\t\tfor (const [tableName, columns] of Object.entries(this._.schema)) {\n\t\t\t\tquery[tableName as keyof TSchema] = new RelationalQueryBuilder(\n\t\t\t\t\tresultKind,\n\t\t\t\t\tschema!.fullSchema,\n\t\t\t\t\tthis._.schema,\n\t\t\t\t\tthis._.tableNamesMap,\n\t\t\t\t\tschema!.fullSchema[tableName] as SQLiteTable,\n\t\t\t\t\tcolumns,\n\t\t\t\t\tdialect,\n\t\t\t\t\tsession as SQLiteSession as any,\n\t\t\t\t) as typeof query[keyof TSchema];\n\t\t\t}\n\t\t}\n\t\tthis.$cache = { invalidate: async (_params: any) => {} };\n\t}\n\n\t/**\n\t * Creates a subquery that defines a temporary named result set as a CTE.\n\t *\n\t * It is useful for breaking down complex queries into simpler parts and for reusing the result set in subsequent parts of the query.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#with-clause}\n\t *\n\t * @param alias The alias for the subquery.\n\t *\n\t * Failure to provide an alias will result in a DrizzleTypeError, preventing the subquery from being referenced in other queries.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Create a subquery with alias 'sq' and use it in the select query\n\t * const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42)));\n\t *\n\t * const result = await db.with(sq).select().from(sq);\n\t * ```\n\t *\n\t * To select arbitrary SQL values as fields in a CTE and reference them in other CTEs or in the main query, you need to add aliases to them:\n\t *\n\t * ```ts\n\t * // Select an arbitrary SQL value as a field in a CTE and reference it in the main query\n\t * const sq = db.$with('sq').as(db.select({\n\t * name: sql`upper(${users.name})`.as('name'),\n\t * })\n\t * .from(users));\n\t *\n\t * const result = await db.with(sq).select({ name: sq.name }).from(sq);\n\t * ```\n\t */\n\t$with: WithBuilder = (alias: string, selection?: ColumnsSelection) => {\n\t\tconst self = this;\n\t\tconst as = (\n\t\t\tqb:\n\t\t\t\t| TypedQueryBuilder\n\t\t\t\t| SQL\n\t\t\t\t| ((qb: QueryBuilder) => TypedQueryBuilder | SQL),\n\t\t) => {\n\t\t\tif (typeof qb === 'function') {\n\t\t\t\tqb = qb(new QueryBuilder(self.dialect));\n\t\t\t}\n\n\t\t\treturn new Proxy(\n\t\t\t\tnew WithSubquery(\n\t\t\t\t\tqb.getSQL(),\n\t\t\t\t\tselection ?? ('getSelectedFields' in qb ? qb.getSelectedFields() ?? {} : {}) as SelectedFields,\n\t\t\t\t\talias,\n\t\t\t\t\ttrue,\n\t\t\t\t),\n\t\t\t\tnew SelectionProxyHandler({ alias, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t\t);\n\t\t};\n\t\treturn { as };\n\t};\n\n\t$count(\n\t\tsource: SQLiteTable | SQLiteViewBase | SQL | SQLWrapper,\n\t\tfilters?: SQL,\n\t) {\n\t\treturn new SQLiteCountBuilder({ source, filters, session: this.session });\n\t}\n\n\t/**\n\t * Incorporates a previously defined CTE (using `$with`) into the main query.\n\t *\n\t * This method allows the main query to reference a temporary named result set.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#with-clause}\n\t *\n\t * @param queries The CTEs to incorporate into the main query.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Define a subquery 'sq' as a CTE using $with\n\t * const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42)));\n\t *\n\t * // Incorporate the CTE 'sq' into the main query and select from it\n\t * const result = await db.with(sq).select().from(sq);\n\t * ```\n\t */\n\twith(...queries: WithSubquery[]) {\n\t\tconst self = this;\n\n\t\t/**\n\t\t * Creates a select query.\n\t\t *\n\t\t * Calling this method with no arguments will select all columns from the table. Pass a selection object to specify the columns you want to select.\n\t\t *\n\t\t * Use `.from()` method to specify which table to select from.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/select}\n\t\t *\n\t\t * @param fields The selection object.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Select all columns and all rows from the 'cars' table\n\t\t * const allCars: Car[] = await db.select().from(cars);\n\t\t *\n\t\t * // Select specific columns and all rows from the 'cars' table\n\t\t * const carsIdsAndBrands: { id: number; brand: string }[] = await db.select({\n\t\t * id: cars.id,\n\t\t * brand: cars.brand\n\t\t * })\n\t\t * .from(cars);\n\t\t * ```\n\t\t *\n\t\t * Like in SQL, you can use arbitrary expressions as selection fields, not just table columns:\n\t\t *\n\t\t * ```ts\n\t\t * // Select specific columns along with expression and all rows from the 'cars' table\n\t\t * const carsIdsAndLowerNames: { id: number; lowerBrand: string }[] = await db.select({\n\t\t * id: cars.id,\n\t\t * lowerBrand: sql`lower(${cars.brand})`,\n\t\t * })\n\t\t * .from(cars);\n\t\t * ```\n\t\t */\n\t\tfunction select(): SQLiteSelectBuilder;\n\t\tfunction select(\n\t\t\tfields: TSelection,\n\t\t): SQLiteSelectBuilder;\n\t\tfunction select(\n\t\t\tfields?: SelectedFields,\n\t\t): SQLiteSelectBuilder {\n\t\t\treturn new SQLiteSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: self.session,\n\t\t\t\tdialect: self.dialect,\n\t\t\t\twithList: queries,\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Adds `distinct` expression to the select query.\n\t\t *\n\t\t * Calling this method will return only unique values. When multiple columns are selected, it returns rows with unique combinations of values in these columns.\n\t\t *\n\t\t * Use `.from()` method to specify which table to select from.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/select#distinct}\n\t\t *\n\t\t * @param fields The selection object.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Select all unique rows from the 'cars' table\n\t\t * await db.selectDistinct()\n\t\t * .from(cars)\n\t\t * .orderBy(cars.id, cars.brand, cars.color);\n\t\t *\n\t\t * // Select all unique brands from the 'cars' table\n\t\t * await db.selectDistinct({ brand: cars.brand })\n\t\t * .from(cars)\n\t\t * .orderBy(cars.brand);\n\t\t * ```\n\t\t */\n\t\tfunction selectDistinct(): SQLiteSelectBuilder;\n\t\tfunction selectDistinct(\n\t\t\tfields: TSelection,\n\t\t): SQLiteSelectBuilder;\n\t\tfunction selectDistinct(\n\t\t\tfields?: SelectedFields,\n\t\t): SQLiteSelectBuilder {\n\t\t\treturn new SQLiteSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: self.session,\n\t\t\t\tdialect: self.dialect,\n\t\t\t\twithList: queries,\n\t\t\t\tdistinct: true,\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Creates an update query.\n\t\t *\n\t\t * Calling this method without `.where()` clause will update all rows in a table. The `.where()` clause specifies which rows should be updated.\n\t\t *\n\t\t * Use `.set()` method to specify which values to update.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/update}\n\t\t *\n\t\t * @param table The table to update.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Update all rows in the 'cars' table\n\t\t * await db.update(cars).set({ color: 'red' });\n\t\t *\n\t\t * // Update rows with filters and conditions\n\t\t * await db.update(cars).set({ color: 'red' }).where(eq(cars.brand, 'BMW'));\n\t\t *\n\t\t * // Update with returning clause\n\t\t * const updatedCar: Car[] = await db.update(cars)\n\t\t * .set({ color: 'red' })\n\t\t * .where(eq(cars.id, 1))\n\t\t * .returning();\n\t\t * ```\n\t\t */\n\t\tfunction update(table: TTable): SQLiteUpdateBuilder {\n\t\t\treturn new SQLiteUpdateBuilder(table, self.session, self.dialect, queries);\n\t\t}\n\n\t\t/**\n\t\t * Creates an insert query.\n\t\t *\n\t\t * Calling this method will create new rows in a table. Use `.values()` method to specify which values to insert.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/insert}\n\t\t *\n\t\t * @param table The table to insert into.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Insert one row\n\t\t * await db.insert(cars).values({ brand: 'BMW' });\n\t\t *\n\t\t * // Insert multiple rows\n\t\t * await db.insert(cars).values([{ brand: 'BMW' }, { brand: 'Porsche' }]);\n\t\t *\n\t\t * // Insert with returning clause\n\t\t * const insertedCar: Car[] = await db.insert(cars)\n\t\t * .values({ brand: 'BMW' })\n\t\t * .returning();\n\t\t * ```\n\t\t */\n\t\tfunction insert(into: TTable): SQLiteInsertBuilder {\n\t\t\treturn new SQLiteInsertBuilder(into, self.session, self.dialect, queries);\n\t\t}\n\n\t\t/**\n\t\t * Creates a delete query.\n\t\t *\n\t\t * Calling this method without `.where()` clause will delete all rows in a table. The `.where()` clause specifies which rows should be deleted.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/delete}\n\t\t *\n\t\t * @param table The table to delete from.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Delete all rows in the 'cars' table\n\t\t * await db.delete(cars);\n\t\t *\n\t\t * // Delete rows with filters and conditions\n\t\t * await db.delete(cars).where(eq(cars.color, 'green'));\n\t\t *\n\t\t * // Delete with returning clause\n\t\t * const deletedCar: Car[] = await db.delete(cars)\n\t\t * .where(eq(cars.id, 1))\n\t\t * .returning();\n\t\t * ```\n\t\t */\n\t\tfunction delete_(from: TTable): SQLiteDeleteBase {\n\t\t\treturn new SQLiteDeleteBase(from, self.session, self.dialect, queries);\n\t\t}\n\n\t\treturn { select, selectDistinct, update, insert, delete: delete_ };\n\t}\n\n\t/**\n\t * Creates a select query.\n\t *\n\t * Calling this method with no arguments will select all columns from the table. Pass a selection object to specify the columns you want to select.\n\t *\n\t * Use `.from()` method to specify which table to select from.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select}\n\t *\n\t * @param fields The selection object.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all columns and all rows from the 'cars' table\n\t * const allCars: Car[] = await db.select().from(cars);\n\t *\n\t * // Select specific columns and all rows from the 'cars' table\n\t * const carsIdsAndBrands: { id: number; brand: string }[] = await db.select({\n\t * id: cars.id,\n\t * brand: cars.brand\n\t * })\n\t * .from(cars);\n\t * ```\n\t *\n\t * Like in SQL, you can use arbitrary expressions as selection fields, not just table columns:\n\t *\n\t * ```ts\n\t * // Select specific columns along with expression and all rows from the 'cars' table\n\t * const carsIdsAndLowerNames: { id: number; lowerBrand: string }[] = await db.select({\n\t * id: cars.id,\n\t * lowerBrand: sql`lower(${cars.brand})`,\n\t * })\n\t * .from(cars);\n\t * ```\n\t */\n\tselect(): SQLiteSelectBuilder;\n\tselect(\n\t\tfields: TSelection,\n\t): SQLiteSelectBuilder;\n\tselect(fields?: SelectedFields): SQLiteSelectBuilder {\n\t\treturn new SQLiteSelectBuilder({ fields: fields ?? undefined, session: this.session, dialect: this.dialect });\n\t}\n\n\t/**\n\t * Adds `distinct` expression to the select query.\n\t *\n\t * Calling this method will return only unique values. When multiple columns are selected, it returns rows with unique combinations of values in these columns.\n\t *\n\t * Use `.from()` method to specify which table to select from.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#distinct}\n\t *\n\t * @param fields The selection object.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all unique rows from the 'cars' table\n\t * await db.selectDistinct()\n\t * .from(cars)\n\t * .orderBy(cars.id, cars.brand, cars.color);\n\t *\n\t * // Select all unique brands from the 'cars' table\n\t * await db.selectDistinct({ brand: cars.brand })\n\t * .from(cars)\n\t * .orderBy(cars.brand);\n\t * ```\n\t */\n\tselectDistinct(): SQLiteSelectBuilder;\n\tselectDistinct(\n\t\tfields: TSelection,\n\t): SQLiteSelectBuilder;\n\tselectDistinct(\n\t\tfields?: SelectedFields,\n\t): SQLiteSelectBuilder {\n\t\treturn new SQLiteSelectBuilder({\n\t\t\tfields: fields ?? undefined,\n\t\t\tsession: this.session,\n\t\t\tdialect: this.dialect,\n\t\t\tdistinct: true,\n\t\t});\n\t}\n\n\t/**\n\t * Creates an update query.\n\t *\n\t * Calling this method without `.where()` clause will update all rows in a table. The `.where()` clause specifies which rows should be updated.\n\t *\n\t * Use `.set()` method to specify which values to update.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/update}\n\t *\n\t * @param table The table to update.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Update all rows in the 'cars' table\n\t * await db.update(cars).set({ color: 'red' });\n\t *\n\t * // Update rows with filters and conditions\n\t * await db.update(cars).set({ color: 'red' }).where(eq(cars.brand, 'BMW'));\n\t *\n\t * // Update with returning clause\n\t * const updatedCar: Car[] = await db.update(cars)\n\t * .set({ color: 'red' })\n\t * .where(eq(cars.id, 1))\n\t * .returning();\n\t * ```\n\t */\n\tupdate(table: TTable): SQLiteUpdateBuilder {\n\t\treturn new SQLiteUpdateBuilder(table, this.session, this.dialect);\n\t}\n\n\t$cache: { invalidate: Cache['onMutate'] };\n\n\t/**\n\t * Creates an insert query.\n\t *\n\t * Calling this method will create new rows in a table. Use `.values()` method to specify which values to insert.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/insert}\n\t *\n\t * @param table The table to insert into.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Insert one row\n\t * await db.insert(cars).values({ brand: 'BMW' });\n\t *\n\t * // Insert multiple rows\n\t * await db.insert(cars).values([{ brand: 'BMW' }, { brand: 'Porsche' }]);\n\t *\n\t * // Insert with returning clause\n\t * const insertedCar: Car[] = await db.insert(cars)\n\t * .values({ brand: 'BMW' })\n\t * .returning();\n\t * ```\n\t */\n\tinsert(into: TTable): SQLiteInsertBuilder {\n\t\treturn new SQLiteInsertBuilder(into, this.session, this.dialect);\n\t}\n\n\t/**\n\t * Creates a delete query.\n\t *\n\t * Calling this method without `.where()` clause will delete all rows in a table. The `.where()` clause specifies which rows should be deleted.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/delete}\n\t *\n\t * @param table The table to delete from.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Delete all rows in the 'cars' table\n\t * await db.delete(cars);\n\t *\n\t * // Delete rows with filters and conditions\n\t * await db.delete(cars).where(eq(cars.color, 'green'));\n\t *\n\t * // Delete with returning clause\n\t * const deletedCar: Car[] = await db.delete(cars)\n\t * .where(eq(cars.id, 1))\n\t * .returning();\n\t * ```\n\t */\n\tdelete(from: TTable): SQLiteDeleteBase {\n\t\treturn new SQLiteDeleteBase(from, this.session, this.dialect);\n\t}\n\n\trun(query: SQLWrapper | string): DBResult {\n\t\tconst sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();\n\t\tif (this.resultKind === 'async') {\n\t\t\treturn new SQLiteRaw(\n\t\t\t\tasync () => this.session.run(sequel),\n\t\t\t\t() => sequel,\n\t\t\t\t'run',\n\t\t\t\tthis.dialect as SQLiteAsyncDialect,\n\t\t\t\tthis.session.extractRawRunValueFromBatchResult.bind(this.session),\n\t\t\t) as DBResult;\n\t\t}\n\t\treturn this.session.run(sequel) as DBResult;\n\t}\n\n\tall(query: SQLWrapper | string): DBResult {\n\t\tconst sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();\n\t\tif (this.resultKind === 'async') {\n\t\t\treturn new SQLiteRaw(\n\t\t\t\tasync () => this.session.all(sequel),\n\t\t\t\t() => sequel,\n\t\t\t\t'all',\n\t\t\t\tthis.dialect as SQLiteAsyncDialect,\n\t\t\t\tthis.session.extractRawAllValueFromBatchResult.bind(this.session),\n\t\t\t) as any;\n\t\t}\n\t\treturn this.session.all(sequel) as DBResult;\n\t}\n\n\tget(query: SQLWrapper | string): DBResult {\n\t\tconst sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();\n\t\tif (this.resultKind === 'async') {\n\t\t\treturn new SQLiteRaw(\n\t\t\t\tasync () => this.session.get(sequel),\n\t\t\t\t() => sequel,\n\t\t\t\t'get',\n\t\t\t\tthis.dialect as SQLiteAsyncDialect,\n\t\t\t\tthis.session.extractRawGetValueFromBatchResult.bind(this.session),\n\t\t\t) as DBResult;\n\t\t}\n\t\treturn this.session.get(sequel) as DBResult;\n\t}\n\n\tvalues(query: SQLWrapper | string): DBResult {\n\t\tconst sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();\n\t\tif (this.resultKind === 'async') {\n\t\t\treturn new SQLiteRaw(\n\t\t\t\tasync () => this.session.values(sequel),\n\t\t\t\t() => sequel,\n\t\t\t\t'values',\n\t\t\t\tthis.dialect as SQLiteAsyncDialect,\n\t\t\t\tthis.session.extractRawValuesValueFromBatchResult.bind(this.session),\n\t\t\t) as any;\n\t\t}\n\t\treturn this.session.values(sequel) as DBResult;\n\t}\n\n\ttransaction(\n\t\ttransaction: (tx: SQLiteTransaction) => Result,\n\t\tconfig?: SQLiteTransactionConfig,\n\t): Result {\n\t\treturn this.session.transaction(transaction, config);\n\t}\n}\n\nexport type SQLiteWithReplicas = Q & { $primary: Q; $replicas: Q[] };\n\nexport const withReplicas = <\n\tTResultKind extends 'sync' | 'async',\n\tTRunResult,\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n\tQ extends BaseSQLiteDatabase<\n\t\tTResultKind,\n\t\tTRunResult,\n\t\tTFullSchema,\n\t\tTSchema extends Record ? ExtractTablesWithRelations : TSchema\n\t>,\n>(\n\tprimary: Q,\n\treplicas: [Q, ...Q[]],\n\tgetReplica: (replicas: Q[]) => Q = () => replicas[Math.floor(Math.random() * replicas.length)]!,\n): SQLiteWithReplicas => {\n\tconst select: Q['select'] = (...args: []) => getReplica(replicas).select(...args);\n\tconst selectDistinct: Q['selectDistinct'] = (...args: []) => getReplica(replicas).selectDistinct(...args);\n\tconst $count: Q['$count'] = (...args: [any]) => getReplica(replicas).$count(...args);\n\tconst $with: Q['with'] = (...args: []) => getReplica(replicas).with(...args);\n\n\tconst update: Q['update'] = (...args: [any]) => primary.update(...args);\n\tconst insert: Q['insert'] = (...args: [any]) => primary.insert(...args);\n\tconst $delete: Q['delete'] = (...args: [any]) => primary.delete(...args);\n\tconst run: Q['run'] = (...args: [any]) => primary.run(...args);\n\tconst all: Q['all'] = (...args: [any]) => primary.all(...args);\n\tconst get: Q['get'] = (...args: [any]) => primary.get(...args);\n\tconst values: Q['values'] = (...args: [any]) => primary.values(...args);\n\tconst transaction: Q['transaction'] = (...args: [any]) => primary.transaction(...args);\n\n\treturn {\n\t\t...primary,\n\t\tupdate,\n\t\tinsert,\n\t\tdelete: $delete,\n\t\trun,\n\t\tall,\n\t\tget,\n\t\tvalues,\n\t\ttransaction,\n\t\t$primary: primary,\n\t\t$replicas: replicas,\n\t\tselect,\n\t\tselectDistinct,\n\t\t$count,\n\t\twith: $with,\n\t\tget query() {\n\t\t\treturn getReplica(replicas).query;\n\t\t},\n\t};\n};\n", "import { entityKind } from '~/entity.ts';\nimport type { Table } from '~/index.ts';\nimport type { CacheConfig } from './types.ts';\n\nexport abstract class Cache {\n\tstatic readonly [entityKind]: string = 'Cache';\n\n\tabstract strategy(): 'explicit' | 'all';\n\n\t/**\n\t * Invoked if we should check cache for cached response\n\t * @param sql\n\t * @param tables\n\t */\n\tabstract get(\n\t\tkey: string,\n\t\ttables: string[],\n\t\tisTag: boolean,\n\t\tisAutoInvalidate?: boolean,\n\t): Promise;\n\n\t/**\n\t * Invoked if new query should be inserted to cache\n\t * @param sql\n\t * @param tables\n\t */\n\tabstract put(\n\t\thashedQuery: string,\n\t\tresponse: any,\n\t\ttables: string[],\n\t\tisTag: boolean,\n\t\tconfig?: CacheConfig,\n\t): Promise;\n\n\t/**\n\t * Invoked if insert, update, delete was invoked\n\t * @param tables\n\t */\n\tabstract onMutate(\n\t\tparams: MutationOption,\n\t): Promise;\n}\n\nexport class NoopCache extends Cache {\n\toverride strategy() {\n\t\treturn 'all' as const;\n\t}\n\n\tstatic override readonly [entityKind]: string = 'NoopCache';\n\n\toverride async get(_key: string): Promise {\n\t\treturn undefined;\n\t}\n\toverride async put(\n\t\t_hashedQuery: string,\n\t\t_response: any,\n\t\t_tables: string[],\n\t\t_config?: any,\n\t): Promise {\n\t\t// noop\n\t}\n\toverride async onMutate(_params: MutationOption): Promise {\n\t\t// noop\n\t}\n}\n\nexport type MutationOption = { tags?: string | string[]; tables?: Table | Table[] | string | string[] };\n\nexport async function hashQuery(sql: string, params?: any[]) {\n\tconst dataToHash = `${sql}-${JSON.stringify(params)}`;\n\tconst encoder = new TextEncoder();\n\tconst data = encoder.encode(dataToHash);\n\tconst hashBuffer = await crypto.subtle.digest('SHA-256', data);\n\tconst hashArray = [...new Uint8Array(hashBuffer)];\n\tconst hashHex = hashArray.map((b) => b.toString(16).padStart(2, '0')).join('');\n\n\treturn hashHex;\n}\n", "export * from './cache.ts';\n", "import { TableAliasProxyHandler } from '~/alias.ts';\nimport type { BuildAliasTable } from './query-builders/select.types.ts';\n\nimport type { SQLiteTable } from './table.ts';\nimport type { SQLiteViewBase } from './view-base.ts';\n\nexport function alias(\n\ttable: TTable,\n\talias: TAlias,\n): BuildAliasTable {\n\treturn new Proxy(table, new TableAliasProxyHandler(alias, false)) as any;\n}\n", "import { type Cache, hashQuery, NoopCache } from '~/cache/core/cache.ts';\nimport type { WithCacheConfig } from '~/cache/core/types.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport { DrizzleError, DrizzleQueryError, TransactionRollbackError } from '~/errors.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { TablesRelationalConfig } from '~/relations.ts';\nimport type { PreparedQuery } from '~/session.ts';\nimport type { Query, SQL } from '~/sql/sql.ts';\nimport type { SQLiteAsyncDialect, SQLiteSyncDialect } from '~/sqlite-core/dialect.ts';\nimport { BaseSQLiteDatabase } from './db.ts';\nimport type { SQLiteRaw } from './query-builders/raw.ts';\nimport type { SelectedFieldsOrdered } from './query-builders/select.types.ts';\n\nexport interface PreparedQueryConfig {\n\ttype: 'sync' | 'async';\n\trun: unknown;\n\tall: unknown;\n\tget: unknown;\n\tvalues: unknown;\n\texecute: unknown;\n}\n\nexport class ExecuteResultSync extends QueryPromise {\n\tstatic override readonly [entityKind]: string = 'ExecuteResultSync';\n\n\tconstructor(private resultCb: () => T) {\n\t\tsuper();\n\t}\n\n\toverride async execute(): Promise {\n\t\treturn this.resultCb();\n\t}\n\n\tsync(): T {\n\t\treturn this.resultCb();\n\t}\n}\n\nexport type ExecuteResult = TType extends 'async' ? Promise\n\t: ExecuteResultSync;\n\nexport abstract class SQLitePreparedQuery implements PreparedQuery {\n\tstatic readonly [entityKind]: string = 'PreparedQuery';\n\n\t/** @internal */\n\tjoinsNotNullableMap?: Record;\n\n\tconstructor(\n\t\tprivate mode: 'sync' | 'async',\n\t\tprivate executeMethod: SQLiteExecuteMethod,\n\t\tprotected query: Query,\n\t\tprivate cache?: Cache,\n\t\t// per query related metadata\n\t\tprivate queryMetadata?: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t} | undefined,\n\t\t// config that was passed through $withCache\n\t\tprivate cacheConfig?: WithCacheConfig,\n\t) {\n\t\t// it means that no $withCache options were passed and it should be just enabled\n\t\tif (cache && cache.strategy() === 'all' && cacheConfig === undefined) {\n\t\t\tthis.cacheConfig = { enable: true, autoInvalidate: true };\n\t\t}\n\t\tif (!this.cacheConfig?.enable) {\n\t\t\tthis.cacheConfig = undefined;\n\t\t}\n\t}\n\n\t/** @internal */\n\tprotected async queryWithCache(\n\t\tqueryString: string,\n\t\tparams: any[],\n\t\tquery: () => Promise,\n\t): Promise {\n\t\tif (this.cache === undefined || is(this.cache, NoopCache) || this.queryMetadata === undefined) {\n\t\t\ttry {\n\t\t\t\treturn await query();\n\t\t\t} catch (e) {\n\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t}\n\t\t}\n\n\t\t// don't do any mutations, if globally is false\n\t\tif (this.cacheConfig && !this.cacheConfig.enable) {\n\t\t\ttry {\n\t\t\t\treturn await query();\n\t\t\t} catch (e) {\n\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t}\n\t\t}\n\n\t\t// For mutate queries, we should query the database, wait for a response, and then perform invalidation\n\t\tif (\n\t\t\t(\n\t\t\t\tthis.queryMetadata.type === 'insert' || this.queryMetadata.type === 'update'\n\t\t\t\t|| this.queryMetadata.type === 'delete'\n\t\t\t) && this.queryMetadata.tables.length > 0\n\t\t) {\n\t\t\ttry {\n\t\t\t\tconst [res] = await Promise.all([\n\t\t\t\t\tquery(),\n\t\t\t\t\tthis.cache.onMutate({ tables: this.queryMetadata.tables }),\n\t\t\t\t]);\n\t\t\t\treturn res;\n\t\t\t} catch (e) {\n\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t}\n\t\t}\n\n\t\t// don't do any reads if globally disabled\n\t\tif (!this.cacheConfig) {\n\t\t\ttry {\n\t\t\t\treturn await query();\n\t\t\t} catch (e) {\n\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t}\n\t\t}\n\n\t\tif (this.queryMetadata.type === 'select') {\n\t\t\tconst fromCache = await this.cache.get(\n\t\t\t\tthis.cacheConfig.tag ?? await hashQuery(queryString, params),\n\t\t\t\tthis.queryMetadata.tables,\n\t\t\t\tthis.cacheConfig.tag !== undefined,\n\t\t\t\tthis.cacheConfig.autoInvalidate,\n\t\t\t);\n\t\t\tif (fromCache === undefined) {\n\t\t\t\tlet result;\n\t\t\t\ttry {\n\t\t\t\t\tresult = await query();\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t\t}\n\n\t\t\t\t// put actual key\n\t\t\t\tawait this.cache.put(\n\t\t\t\t\tthis.cacheConfig.tag ?? await hashQuery(queryString, params),\n\t\t\t\t\tresult,\n\t\t\t\t\t// make sure we send tables that were used in a query only if user wants to invalidate it on each write\n\t\t\t\t\tthis.cacheConfig.autoInvalidate ? this.queryMetadata.tables : [],\n\t\t\t\t\tthis.cacheConfig.tag !== undefined,\n\t\t\t\t\tthis.cacheConfig.config,\n\t\t\t\t);\n\t\t\t\t// put flag if we should invalidate or not\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\treturn fromCache as unknown as T;\n\t\t}\n\t\ttry {\n\t\t\treturn await query();\n\t\t} catch (e) {\n\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t}\n\t}\n\n\tgetQuery(): Query {\n\t\treturn this.query;\n\t}\n\n\tabstract run(placeholderValues?: Record): Result;\n\n\tmapRunResult(result: unknown, _isFromBatch?: boolean): unknown {\n\t\treturn result;\n\t}\n\n\tabstract all(placeholderValues?: Record): Result;\n\n\tmapAllResult(_result: unknown, _isFromBatch?: boolean): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n\n\tabstract get(placeholderValues?: Record): Result;\n\n\tmapGetResult(_result: unknown, _isFromBatch?: boolean): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n\n\tabstract values(placeholderValues?: Record): Result;\n\n\texecute(placeholderValues?: Record): ExecuteResult {\n\t\tif (this.mode === 'async') {\n\t\t\treturn this[this.executeMethod](placeholderValues) as ExecuteResult;\n\t\t}\n\t\treturn new ExecuteResultSync(() => this[this.executeMethod](placeholderValues));\n\t}\n\n\tmapResult(response: unknown, isFromBatch?: boolean) {\n\t\tswitch (this.executeMethod) {\n\t\t\tcase 'run': {\n\t\t\t\treturn this.mapRunResult(response, isFromBatch);\n\t\t\t}\n\t\t\tcase 'all': {\n\t\t\t\treturn this.mapAllResult(response, isFromBatch);\n\t\t\t}\n\t\t\tcase 'get': {\n\t\t\t\treturn this.mapGetResult(response, isFromBatch);\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @internal */\n\tabstract isResponseInArrayMode(): boolean;\n}\n\nexport interface SQLiteTransactionConfig {\n\tbehavior?: 'deferred' | 'immediate' | 'exclusive';\n}\n\nexport type SQLiteExecuteMethod = 'run' | 'all' | 'get';\n\nexport abstract class SQLiteSession<\n\tTResultKind extends 'sync' | 'async',\n\tTRunResult,\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteSession';\n\n\tconstructor(\n\t\t/** @internal */\n\t\treadonly dialect: { sync: SQLiteSyncDialect; async: SQLiteAsyncDialect }[TResultKind],\n\t) {}\n\n\tabstract prepareQuery(\n\t\tquery: Query,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t\tisResponseInArrayMode: boolean,\n\t\tcustomResultMapper?: (rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => unknown,\n\t\tqueryMetadata?: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t},\n\t\tcacheConfig?: WithCacheConfig,\n\t): SQLitePreparedQuery;\n\n\tprepareOneTimeQuery(\n\t\tquery: Query,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t\tisResponseInArrayMode: boolean,\n\t\tcustomResultMapper?: (rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => unknown,\n\t\tqueryMetadata?: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t},\n\t\tcacheConfig?: WithCacheConfig,\n\t): SQLitePreparedQuery {\n\t\treturn this.prepareQuery(\n\t\t\tquery,\n\t\t\tfields,\n\t\t\texecuteMethod,\n\t\t\tisResponseInArrayMode,\n\t\t\tcustomResultMapper,\n\t\t\tqueryMetadata,\n\t\t\tcacheConfig,\n\t\t);\n\t}\n\n\tabstract transaction(\n\t\ttransaction: (tx: SQLiteTransaction) => Result,\n\t\tconfig?: SQLiteTransactionConfig,\n\t): Result;\n\n\trun(query: SQL): Result {\n\t\tconst staticQuery = this.dialect.sqlToQuery(query);\n\t\ttry {\n\t\t\treturn this.prepareOneTimeQuery(staticQuery, undefined, 'run', false).run() as Result;\n\t\t} catch (err) {\n\t\t\tthrow new DrizzleError({ cause: err, message: `Failed to run the query '${staticQuery.sql}'` });\n\t\t}\n\t}\n\n\t/** @internal */\n\textractRawRunValueFromBatchResult(result: unknown) {\n\t\treturn result;\n\t}\n\n\tall(query: SQL): Result {\n\t\treturn this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), undefined, 'run', false).all() as Result<\n\t\t\tTResultKind,\n\t\t\tT[]\n\t\t>;\n\t}\n\n\t/** @internal */\n\textractRawAllValueFromBatchResult(_result: unknown): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n\n\tget(query: SQL): Result {\n\t\treturn this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), undefined, 'run', false).get() as Result<\n\t\t\tTResultKind,\n\t\t\tT\n\t\t>;\n\t}\n\n\t/** @internal */\n\textractRawGetValueFromBatchResult(_result: unknown): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n\n\tvalues(\n\t\tquery: SQL,\n\t): Result {\n\t\treturn this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), undefined, 'run', false).values() as Result<\n\t\t\tTResultKind,\n\t\t\tT[]\n\t\t>;\n\t}\n\n\tasync count(sql: SQL) {\n\t\tconst result = await this.values(sql) as [[number]];\n\n\t\treturn result[0][0];\n\t}\n\n\t/** @internal */\n\textractRawValuesValueFromBatchResult(_result: unknown): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n}\n\nexport type Result = { sync: TResult; async: Promise }[TKind];\n\nexport type DBResult = { sync: TResult; async: SQLiteRaw }[TKind];\n\nexport abstract class SQLiteTransaction<\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n> extends BaseSQLiteDatabase {\n\tstatic override readonly [entityKind]: string = 'SQLiteTransaction';\n\n\tconstructor(\n\t\tresultType: TResultType,\n\t\tdialect: { sync: SQLiteSyncDialect; async: SQLiteAsyncDialect }[TResultType],\n\t\tsession: SQLiteSession,\n\t\tprotected schema: {\n\t\t\tfullSchema: Record;\n\t\t\tschema: TSchema;\n\t\t\ttableNamesMap: Record;\n\t\t} | undefined,\n\t\tprotected readonly nestedIndex = 0,\n\t) {\n\t\tsuper(resultType, dialect, session, schema);\n\t}\n\n\trollback(): never {\n\t\tthrow new TransactionRollbackError();\n\t}\n}\n", "//# sourceMappingURL=subquery.js.map", "import type { BuildColumns } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type { AddAliasToSelection } from '~/query-builders/select.types.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { ColumnsSelection, SQL } from '~/sql/sql.ts';\nimport { getTableColumns } from '~/utils.ts';\nimport type { SQLiteColumn, SQLiteColumnBuilderBase } from './columns/common.ts';\nimport { QueryBuilder } from './query-builders/query-builder.ts';\nimport { sqliteTable } from './table.ts';\nimport { SQLiteViewBase } from './view-base.ts';\n\nexport interface ViewBuilderConfig {\n\talgorithm?: 'undefined' | 'merge' | 'temptable';\n\tdefiner?: string;\n\tsqlSecurity?: 'definer' | 'invoker';\n\twithCheckOption?: 'cascaded' | 'local';\n}\n\nexport class ViewBuilderCore<\n\tTConfig extends { name: string; columns?: unknown },\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteViewBuilderCore';\n\n\tdeclare readonly _: {\n\t\treadonly name: TConfig['name'];\n\t\treadonly columns: TConfig['columns'];\n\t};\n\n\tconstructor(\n\t\tprotected name: TConfig['name'],\n\t) {}\n\n\tprotected config: ViewBuilderConfig = {};\n}\n\nexport class ViewBuilder extends ViewBuilderCore<{ name: TName }> {\n\tstatic override readonly [entityKind]: string = 'SQLiteViewBuilder';\n\n\tas(\n\t\tqb: TypedQueryBuilder | ((qb: QueryBuilder) => TypedQueryBuilder),\n\t): SQLiteViewWithSelection> {\n\t\tif (typeof qb === 'function') {\n\t\t\tqb = qb(new QueryBuilder());\n\t\t}\n\t\tconst selectionProxy = new SelectionProxyHandler({\n\t\t\talias: this.name,\n\t\t\tsqlBehavior: 'error',\n\t\t\tsqlAliasedBehavior: 'alias',\n\t\t\treplaceOriginalName: true,\n\t\t});\n\t\t// const aliasedSelectedFields = new Proxy(qb.getSelectedFields(), selectionProxy);\n\t\tconst aliasedSelectedFields = qb.getSelectedFields();\n\t\treturn new Proxy(\n\t\t\tnew SQLiteView({\n\t\t\t\t// sqliteConfig: this.config,\n\t\t\t\tconfig: {\n\t\t\t\t\tname: this.name,\n\t\t\t\t\tschema: undefined,\n\t\t\t\t\tselectedFields: aliasedSelectedFields,\n\t\t\t\t\tquery: qb.getSQL().inlineParams(),\n\t\t\t\t},\n\t\t\t}),\n\t\t\tselectionProxy as any,\n\t\t) as SQLiteViewWithSelection>;\n\t}\n}\n\nexport class ManualViewBuilder<\n\tTName extends string = string,\n\tTColumns extends Record = Record,\n> extends ViewBuilderCore<\n\t{ name: TName; columns: TColumns }\n> {\n\tstatic override readonly [entityKind]: string = 'SQLiteManualViewBuilder';\n\n\tprivate columns: Record;\n\n\tconstructor(\n\t\tname: TName,\n\t\tcolumns: TColumns,\n\t) {\n\t\tsuper(name);\n\t\tthis.columns = getTableColumns(sqliteTable(name, columns)) as BuildColumns;\n\t}\n\n\texisting(): SQLiteViewWithSelection> {\n\t\treturn new Proxy(\n\t\t\tnew SQLiteView({\n\t\t\t\tconfig: {\n\t\t\t\t\tname: this.name,\n\t\t\t\t\tschema: undefined,\n\t\t\t\t\tselectedFields: this.columns,\n\t\t\t\t\tquery: undefined,\n\t\t\t\t},\n\t\t\t}),\n\t\t\tnew SelectionProxyHandler({\n\t\t\t\talias: this.name,\n\t\t\t\tsqlBehavior: 'error',\n\t\t\t\tsqlAliasedBehavior: 'alias',\n\t\t\t\treplaceOriginalName: true,\n\t\t\t}),\n\t\t) as SQLiteViewWithSelection>;\n\t}\n\n\tas(query: SQL): SQLiteViewWithSelection> {\n\t\treturn new Proxy(\n\t\t\tnew SQLiteView({\n\t\t\t\tconfig: {\n\t\t\t\t\tname: this.name,\n\t\t\t\t\tschema: undefined,\n\t\t\t\t\tselectedFields: this.columns,\n\t\t\t\t\tquery: query.inlineParams(),\n\t\t\t\t},\n\t\t\t}),\n\t\t\tnew SelectionProxyHandler({\n\t\t\t\talias: this.name,\n\t\t\t\tsqlBehavior: 'error',\n\t\t\t\tsqlAliasedBehavior: 'alias',\n\t\t\t\treplaceOriginalName: true,\n\t\t\t}),\n\t\t) as SQLiteViewWithSelection>;\n\t}\n}\n\nexport class SQLiteView<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n\tTSelection extends ColumnsSelection = ColumnsSelection,\n> extends SQLiteViewBase {\n\tstatic override readonly [entityKind]: string = 'SQLiteView';\n\n\tconstructor({ config }: {\n\t\tconfig: {\n\t\t\tname: TName;\n\t\t\tschema: string | undefined;\n\t\t\tselectedFields: ColumnsSelection;\n\t\t\tquery: SQL | undefined;\n\t\t};\n\t}) {\n\t\tsuper(config);\n\t}\n}\n\nexport type SQLiteViewWithSelection<\n\tTName extends string,\n\tTExisting extends boolean,\n\tTSelection extends ColumnsSelection,\n> = SQLiteView & TSelection;\n\nexport function sqliteView(name: TName): ViewBuilder;\nexport function sqliteView>(\n\tname: TName,\n\tcolumns: TColumns,\n): ManualViewBuilder;\nexport function sqliteView(\n\tname: string,\n\tselection?: Record,\n): ViewBuilder | ManualViewBuilder {\n\tif (selection) {\n\t\treturn new ManualViewBuilder(name, selection);\n\t}\n\treturn new ViewBuilder(name);\n}\n\nexport const view = sqliteView;\n", "export * from './alias.ts';\nexport * from './checks.ts';\nexport * from './columns/index.ts';\nexport * from './db.ts';\nexport * from './dialect.ts';\nexport * from './foreign-keys.ts';\nexport * from './indexes.ts';\nexport * from './primary-keys.ts';\nexport * from './query-builders/index.ts';\nexport * from './session.ts';\nexport * from './subquery.ts';\nexport * from './table.ts';\nexport * from './unique-constraint.ts';\nexport * from './utils.ts';\nexport * from './view.ts';\n", "/// \n\nimport type { BatchItem } from '~/batch.ts';\nimport { type Cache, NoopCache } from '~/cache/core/index.ts';\nimport type { WithCacheConfig } from '~/cache/core/types.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { Logger } from '~/logger.ts';\nimport { NoopLogger } from '~/logger.ts';\nimport type { RelationalSchemaConfig, TablesRelationalConfig } from '~/relations.ts';\nimport type { PreparedQuery } from '~/session.ts';\nimport { fillPlaceholders, type Query, sql } from '~/sql/sql.ts';\nimport type { SQLiteAsyncDialect } from '~/sqlite-core/dialect.ts';\nimport { SQLiteTransaction } from '~/sqlite-core/index.ts';\nimport type { SelectedFieldsOrdered } from '~/sqlite-core/query-builders/select.types.ts';\nimport type {\n\tPreparedQueryConfig as PreparedQueryConfigBase,\n\tSQLiteExecuteMethod,\n\tSQLiteTransactionConfig,\n} from '~/sqlite-core/session.ts';\nimport { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/session.ts';\nimport { mapResultRow } from '~/utils.ts';\n\nexport interface SQLiteD1SessionOptions {\n\tlogger?: Logger;\n\tcache?: Cache;\n}\n\ntype PreparedQueryConfig = Omit;\n\nexport class SQLiteD1Session<\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n> extends SQLiteSession<'async', D1Result, TFullSchema, TSchema> {\n\tstatic override readonly [entityKind]: string = 'SQLiteD1Session';\n\n\tprivate logger: Logger;\n\tprivate cache: Cache;\n\n\tconstructor(\n\t\tprivate client: D1Database,\n\t\tdialect: SQLiteAsyncDialect,\n\t\tprivate schema: RelationalSchemaConfig | undefined,\n\t\tprivate options: SQLiteD1SessionOptions = {},\n\t) {\n\t\tsuper(dialect);\n\t\tthis.logger = options.logger ?? new NoopLogger();\n\t\tthis.cache = options.cache ?? new NoopCache();\n\t}\n\n\tprepareQuery(\n\t\tquery: Query,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t\tisResponseInArrayMode: boolean,\n\t\tcustomResultMapper?: (rows: unknown[][]) => unknown,\n\t\tqueryMetadata?: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t},\n\t\tcacheConfig?: WithCacheConfig,\n\t): D1PreparedQuery {\n\t\tconst stmt = this.client.prepare(query.sql);\n\t\treturn new D1PreparedQuery(\n\t\t\tstmt,\n\t\t\tquery,\n\t\t\tthis.logger,\n\t\t\tthis.cache,\n\t\t\tqueryMetadata,\n\t\t\tcacheConfig,\n\t\t\tfields,\n\t\t\texecuteMethod,\n\t\t\tisResponseInArrayMode,\n\t\t\tcustomResultMapper,\n\t\t);\n\t}\n\n\tasync batch[] | readonly BatchItem<'sqlite'>[]>(queries: T) {\n\t\tconst preparedQueries: PreparedQuery[] = [];\n\t\tconst builtQueries: D1PreparedStatement[] = [];\n\n\t\tfor (const query of queries) {\n\t\t\tconst preparedQuery = query._prepare();\n\t\t\tconst builtQuery = preparedQuery.getQuery();\n\t\t\tpreparedQueries.push(preparedQuery);\n\t\t\tif (builtQuery.params.length > 0) {\n\t\t\t\tbuiltQueries.push((preparedQuery as D1PreparedQuery).stmt.bind(...builtQuery.params));\n\t\t\t} else {\n\t\t\t\tconst builtQuery = preparedQuery.getQuery();\n\t\t\t\tbuiltQueries.push(\n\t\t\t\t\tthis.client.prepare(builtQuery.sql).bind(...builtQuery.params),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst batchResults = await this.client.batch(builtQueries);\n\t\treturn batchResults.map((result, i) => preparedQueries[i]!.mapResult(result, true));\n\t}\n\n\toverride extractRawAllValueFromBatchResult(result: unknown): unknown {\n\t\treturn (result as D1Result).results;\n\t}\n\n\toverride extractRawGetValueFromBatchResult(result: unknown): unknown {\n\t\treturn (result as D1Result).results[0];\n\t}\n\n\toverride extractRawValuesValueFromBatchResult(result: unknown): unknown {\n\t\treturn d1ToRawMapping((result as D1Result).results);\n\t}\n\n\toverride async transaction(\n\t\ttransaction: (tx: D1Transaction) => T | Promise,\n\t\tconfig?: SQLiteTransactionConfig,\n\t): Promise {\n\t\tconst tx = new D1Transaction('async', this.dialect, this, this.schema);\n\t\tawait this.run(sql.raw(`begin${config?.behavior ? ' ' + config.behavior : ''}`));\n\t\ttry {\n\t\t\tconst result = await transaction(tx);\n\t\t\tawait this.run(sql`commit`);\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tawait this.run(sql`rollback`);\n\t\t\tthrow err;\n\t\t}\n\t}\n}\n\nexport class D1Transaction<\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n> extends SQLiteTransaction<'async', D1Result, TFullSchema, TSchema> {\n\tstatic override readonly [entityKind]: string = 'D1Transaction';\n\n\toverride async transaction(transaction: (tx: D1Transaction) => Promise): Promise {\n\t\tconst savepointName = `sp${this.nestedIndex}`;\n\t\tconst tx = new D1Transaction('async', this.dialect, this.session, this.schema, this.nestedIndex + 1);\n\t\tawait this.session.run(sql.raw(`savepoint ${savepointName}`));\n\t\ttry {\n\t\t\tconst result = await transaction(tx);\n\t\t\tawait this.session.run(sql.raw(`release savepoint ${savepointName}`));\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tawait this.session.run(sql.raw(`rollback to savepoint ${savepointName}`));\n\t\t\tthrow err;\n\t\t}\n\t}\n}\n\n/**\n * This function was taken from the D1 implementation: https://github.com/cloudflare/workerd/blob/4aae9f4c7ae30a59a88ca868c4aff88bda85c956/src/cloudflare/internal/d1-api.ts#L287\n * It may cause issues with duplicated column names in join queries, which should be fixed on the D1 side.\n * @param results\n * @returns\n */\nfunction d1ToRawMapping(results: any) {\n\tconst rows: unknown[][] = [];\n\tfor (const row of results) {\n\t\tconst entry = Object.keys(row).map((k) => row[k]);\n\t\trows.push(entry);\n\t}\n\treturn rows;\n}\n\nexport class D1PreparedQuery extends SQLitePreparedQuery<\n\t{ type: 'async'; run: D1Response; all: T['all']; get: T['get']; values: T['values']; execute: T['execute'] }\n> {\n\tstatic override readonly [entityKind]: string = 'D1PreparedQuery';\n\n\t/** @internal */\n\tcustomResultMapper?: (rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => unknown;\n\n\t/** @internal */\n\tfields?: SelectedFieldsOrdered;\n\n\t/** @internal */\n\tstmt: D1PreparedStatement;\n\n\tconstructor(\n\t\tstmt: D1PreparedStatement,\n\t\tquery: Query,\n\t\tprivate logger: Logger,\n\t\tcache: Cache,\n\t\tqueryMetadata: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t} | undefined,\n\t\tcacheConfig: WithCacheConfig | undefined,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t\tprivate _isResponseInArrayMode: boolean,\n\t\tcustomResultMapper?: (rows: unknown[][]) => unknown,\n\t) {\n\t\tsuper('async', executeMethod, query, cache, queryMetadata, cacheConfig);\n\t\tthis.customResultMapper = customResultMapper;\n\t\tthis.fields = fields;\n\t\tthis.stmt = stmt;\n\t}\n\n\tasync run(placeholderValues?: Record): Promise {\n\t\tconst params = fillPlaceholders(this.query.params, placeholderValues ?? {});\n\t\tthis.logger.logQuery(this.query.sql, params);\n\t\treturn await this.queryWithCache(this.query.sql, params, async () => {\n\t\t\treturn this.stmt.bind(...params).run();\n\t\t});\n\t}\n\n\tasync all(placeholderValues?: Record): Promise {\n\t\tconst { fields, query, logger, stmt, customResultMapper } = this;\n\t\tif (!fields && !customResultMapper) {\n\t\t\tconst params = fillPlaceholders(query.params, placeholderValues ?? {});\n\t\t\tlogger.logQuery(query.sql, params);\n\t\t\treturn await this.queryWithCache(query.sql, params, async () => {\n\t\t\t\treturn stmt.bind(...params).all().then(({ results }) => this.mapAllResult(results!));\n\t\t\t});\n\t\t}\n\n\t\tconst rows = await this.values(placeholderValues);\n\n\t\treturn this.mapAllResult(rows);\n\t}\n\n\toverride mapAllResult(rows: unknown, isFromBatch?: boolean): unknown {\n\t\tif (isFromBatch) {\n\t\t\trows = d1ToRawMapping((rows as D1Result).results);\n\t\t}\n\n\t\tif (!this.fields && !this.customResultMapper) {\n\t\t\treturn rows;\n\t\t}\n\n\t\tif (this.customResultMapper) {\n\t\t\treturn this.customResultMapper(rows as unknown[][]);\n\t\t}\n\n\t\treturn (rows as unknown[][]).map((row) => mapResultRow(this.fields!, row, this.joinsNotNullableMap));\n\t}\n\n\tasync get(placeholderValues?: Record): Promise {\n\t\tconst { fields, joinsNotNullableMap, query, logger, stmt, customResultMapper } = this;\n\t\tif (!fields && !customResultMapper) {\n\t\t\tconst params = fillPlaceholders(query.params, placeholderValues ?? {});\n\t\t\tlogger.logQuery(query.sql, params);\n\t\t\treturn await this.queryWithCache(query.sql, params, async () => {\n\t\t\t\treturn stmt.bind(...params).all().then(({ results }) => results![0]);\n\t\t\t});\n\t\t}\n\n\t\tconst rows = await this.values(placeholderValues);\n\n\t\tif (!rows[0]) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (customResultMapper) {\n\t\t\treturn customResultMapper(rows) as T['all'];\n\t\t}\n\n\t\treturn mapResultRow(fields!, rows[0], joinsNotNullableMap);\n\t}\n\n\toverride mapGetResult(result: unknown, isFromBatch?: boolean): unknown {\n\t\tif (isFromBatch) {\n\t\t\tresult = d1ToRawMapping((result as D1Result).results)[0];\n\t\t}\n\n\t\tif (!this.fields && !this.customResultMapper) {\n\t\t\treturn result;\n\t\t}\n\n\t\tif (this.customResultMapper) {\n\t\t\treturn this.customResultMapper([result as unknown[]]) as T['all'];\n\t\t}\n\n\t\treturn mapResultRow(this.fields!, result as unknown[], this.joinsNotNullableMap);\n\t}\n\n\tasync values(placeholderValues?: Record): Promise {\n\t\tconst params = fillPlaceholders(this.query.params, placeholderValues ?? {});\n\t\tthis.logger.logQuery(this.query.sql, params);\n\t\treturn await this.queryWithCache(this.query.sql, params, async () => {\n\t\t\treturn this.stmt.bind(...params).raw();\n\t\t});\n\t}\n\n\t/** @internal */\n\tisResponseInArrayMode(): boolean {\n\t\treturn this._isResponseInArrayMode;\n\t}\n}\n", "/// \nimport type { D1Database as MiniflareD1Database } from '@miniflare/d1';\nimport type { BatchItem, BatchResponse } from '~/batch.ts';\nimport { entityKind } from '~/entity.ts';\nimport { DefaultLogger } from '~/logger.ts';\nimport {\n\tcreateTableRelationsHelpers,\n\textractTablesRelationalConfig,\n\ttype ExtractTablesWithRelations,\n\ttype RelationalSchemaConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport { BaseSQLiteDatabase } from '~/sqlite-core/db.ts';\nimport { SQLiteAsyncDialect } from '~/sqlite-core/dialect.ts';\nimport type { DrizzleConfig, IfNotImported } from '~/utils.ts';\nimport { SQLiteD1Session } from './session.ts';\n\nexport type AnyD1Database = IfNotImported<\n\tD1Database,\n\tMiniflareD1Database,\n\tD1Database | IfNotImported\n>;\n\nexport class DrizzleD1Database<\n\tTSchema extends Record = Record,\n> extends BaseSQLiteDatabase<'async', D1Result, TSchema> {\n\tstatic override readonly [entityKind]: string = 'D1Database';\n\n\t/** @internal */\n\tdeclare readonly session: SQLiteD1Session>;\n\n\tasync batch, T extends Readonly<[U, ...U[]]>>(\n\t\tbatch: T,\n\t): Promise> {\n\t\treturn this.session.batch(batch) as Promise>;\n\t}\n}\n\nexport function drizzle<\n\tTSchema extends Record = Record,\n\tTClient extends AnyD1Database = AnyD1Database,\n>(\n\tclient: TClient,\n\tconfig: DrizzleConfig = {},\n): DrizzleD1Database & {\n\t$client: TClient;\n} {\n\tconst dialect = new SQLiteAsyncDialect({ casing: config.casing });\n\tlet logger;\n\tif (config.logger === true) {\n\t\tlogger = new DefaultLogger();\n\t} else if (config.logger !== false) {\n\t\tlogger = config.logger;\n\t}\n\n\tlet schema: RelationalSchemaConfig | undefined;\n\tif (config.schema) {\n\t\tconst tablesConfig = extractTablesRelationalConfig(\n\t\t\tconfig.schema,\n\t\t\tcreateTableRelationsHelpers,\n\t\t);\n\t\tschema = {\n\t\t\tfullSchema: config.schema,\n\t\t\tschema: tablesConfig.tables,\n\t\t\ttableNamesMap: tablesConfig.tableNamesMap,\n\t\t};\n\t}\n\n\tconst session = new SQLiteD1Session(client as D1Database, dialect, schema, { logger, cache: config.cache });\n\tconst db = new DrizzleD1Database('async', dialect, session, schema) as DrizzleD1Database;\n\t( db).$client = client;\n\t( db).$cache = config.cache;\n\tif (( db).$cache) {\n\t\t( db).$cache['invalidate'] = config.cache?.onMutate;\n\t}\n\n\treturn db as any;\n}\n", "export * from './driver.ts';\nexport * from './session.ts';\n", "//# sourceMappingURL=operations.js.map", "export * from './alias.ts';\nexport * from './column-builder.ts';\nexport * from './column.ts';\nexport * from './entity.ts';\nexport * from './errors.ts';\nexport * from './logger.ts';\nexport * from './operations.ts';\nexport * from './query-promise.ts';\nexport * from './relations.ts';\nexport * from './sql/index.ts';\nexport * from './subquery.ts';\nexport * from './table.ts';\nexport * from './utils.ts';\nexport * from './view-common.ts';\n", "import {\n sqliteTable,\n integer,\n text,\n real,\n uniqueIndex,\n primaryKey,\n check,\n customType,\n} from 'drizzle-orm/sqlite-core'\nimport { relations, sql } from 'drizzle-orm'\n\nconst jsonText = (name: string) =>\n customType<{ data: T | null; driverData: string | null }>({\n dataType() {\n return 'text'\n },\n toDriver(value) {\n if (value === undefined || value === null) return null\n return JSON.stringify(value)\n },\n fromDriver(value) {\n if (value === null || value === undefined) return null\n try {\n return JSON.parse(String(value)) as T\n } catch {\n return null\n }\n },\n })(name)\n\nconst numericText = (name: string) =>\n customType<{ data: string | null; driverData: string | null }>({\n dataType() {\n return 'text'\n },\n toDriver(value) {\n if (value === undefined || value === null) return null\n return String(value)\n },\n fromDriver(value) {\n if (value === null || value === undefined) return null\n return String(value)\n },\n })(name)\n\nconst staffRoleValues = ['super_admin', 'admin', 'marketer', 'delivery_staff'] as const\nconst staffPermissionValues = ['crud_product', 'make_coupon', 'crud_staff_users'] as const\nconst uploadStatusValues = ['pending', 'claimed'] as const\nconst paymentStatusValues = ['pending', 'success', 'cod', 'failed'] as const\n\nexport const staffRoleEnum = (name: string) => text(name, { enum: staffRoleValues })\nexport const staffPermissionEnum = (name: string) => text(name, { enum: staffPermissionValues })\nexport const uploadStatusEnum = (name: string) => text(name, { enum: uploadStatusValues })\nexport const paymentStatusEnum = (name: string) => text(name, { enum: paymentStatusValues })\n\nexport const users = sqliteTable('users', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text(),\n email: text(),\n mobile: text(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_email: uniqueIndex('unique_email').on(t.email),\n}))\n\nexport const userDetails = sqliteTable('user_details', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id).unique(),\n bio: text('bio'),\n dateOfBirth: integer('date_of_birth', { mode: 'timestamp' }),\n gender: text('gender'),\n occupation: text('occupation'),\n profileImage: text('profile_image'),\n isSuspended: integer('is_suspended', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const userCreds = sqliteTable('user_creds', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n userPassword: text('user_password').notNull(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const addressZones = sqliteTable('address_zones', {\n id: integer().primaryKey({ autoIncrement: true }),\n zoneName: text('zone_name').notNull(),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const addressAreas = sqliteTable('address_areas', {\n id: integer().primaryKey({ autoIncrement: true }),\n placeName: text('place_name').notNull(),\n zoneId: integer('zone_id').references(() => addressZones.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const addresses = sqliteTable('addresses', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n name: text('name').notNull(),\n phone: text('phone').notNull(),\n addressLine1: text('address_line1').notNull(),\n addressLine2: text('address_line2'),\n city: text('city').notNull(),\n state: text('state').notNull(),\n pincode: text('pincode').notNull(),\n isDefault: integer('is_default', { mode: 'boolean' }).notNull().default(false),\n latitude: real('latitude'),\n longitude: real('longitude'),\n googleMapsUrl: text('google_maps_url'),\n adminLatitude: real('admin_latitude'),\n adminLongitude: real('admin_longitude'),\n zoneId: integer('zone_id').references(() => addressZones.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const staffRoles = sqliteTable('staff_roles', {\n id: integer().primaryKey({ autoIncrement: true }),\n roleName: staffRoleEnum('role_name').notNull(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_role_name: uniqueIndex('unique_role_name').on(t.roleName),\n}))\n\nexport const staffPermissions = sqliteTable('staff_permissions', {\n id: integer().primaryKey({ autoIncrement: true }),\n permissionName: staffPermissionEnum('permission_name').notNull(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_permission_name: uniqueIndex('unique_permission_name').on(t.permissionName),\n}))\n\nexport const staffRolePermissions = sqliteTable('staff_role_permissions', {\n id: integer().primaryKey({ autoIncrement: true }),\n staffRoleId: integer('staff_role_id').notNull().references(() => staffRoles.id),\n staffPermissionId: integer('staff_permission_id').notNull().references(() => staffPermissions.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_role_permission: uniqueIndex('unique_role_permission').on(t.staffRoleId, t.staffPermissionId),\n}))\n\nexport const staffUsers = sqliteTable('staff_users', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text().notNull(),\n password: text().notNull(),\n staffRoleId: integer('staff_role_id').references(() => staffRoles.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const storeInfo = sqliteTable('store_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text().notNull(),\n description: text(),\n imageUrl: text('image_url'),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n owner: integer('owner').notNull().references(() => staffUsers.id),\n})\n\nexport const units = sqliteTable('units', {\n id: integer().primaryKey({ autoIncrement: true }),\n shortNotation: text('short_notation').notNull(),\n fullName: text('full_name').notNull(),\n}, (t) => ({\n unq_short_notation: uniqueIndex('unique_short_notation').on(t.shortNotation),\n}))\n\nexport const productInfo = sqliteTable('product_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text().notNull(),\n shortDescription: text('short_description'),\n longDescription: text('long_description'),\n unitId: integer('unit_id').notNull().references(() => units.id),\n price: numericText('price').notNull(),\n marketPrice: numericText('market_price'),\n images: jsonText('images'),\n isOutOfStock: integer('is_out_of_stock', { mode: 'boolean' }).notNull().default(false),\n isSuspended: integer('is_suspended', { mode: 'boolean' }).notNull().default(false),\n isFlashAvailable: integer('is_flash_available', { mode: 'boolean' }).notNull().default(false),\n flashPrice: numericText('flash_price'),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n incrementStep: real('increment_step').notNull().default(1),\n productQuantity: real('product_quantity').notNull().default(1),\n storeId: integer('store_id').references(() => storeInfo.id),\n})\n\nexport const productGroupInfo = sqliteTable('product_group_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n groupName: text('group_name').notNull(),\n description: text(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productGroupMembership = sqliteTable('product_group_membership', {\n productId: integer('product_id').notNull().references(() => productInfo.id),\n groupId: integer('group_id').notNull().references(() => productGroupInfo.id),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n pk: primaryKey({ columns: [t.productId, t.groupId], name: 'product_group_membership_pk' }),\n}))\n\nexport const homeBanners = sqliteTable('home_banners', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text('name').notNull(),\n imageUrl: text('image_url').notNull(),\n description: text('description'),\n productIds: jsonText('product_ids'),\n redirectUrl: text('redirect_url'),\n serialNum: integer('serial_num'),\n isActive: integer('is_active', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n lastUpdated: integer('last_updated', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productReviews = sqliteTable('product_reviews', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n reviewBody: text('review_body').notNull(),\n imageUrls: jsonText('image_urls').$defaultFn(() => []),\n reviewTime: integer('review_time', { mode: 'timestamp' }).notNull().defaultNow(),\n ratings: real('ratings').notNull(),\n adminResponse: text('admin_response'),\n adminResponseImages: jsonText('admin_response_images').$defaultFn(() => []),\n}, (t) => ({\n ratingCheck: check('rating_check', sql`${t.ratings} >= 1 AND ${t.ratings} <= 5`),\n}))\n\nexport const uploadUrlStatus = sqliteTable('upload_url_status', {\n id: integer().primaryKey({ autoIncrement: true }),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n key: text('key').notNull(),\n status: uploadStatusEnum('status').notNull().default('pending'),\n})\n\nexport const productTagInfo = sqliteTable('product_tag_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n tagName: text('tag_name').notNull().unique(),\n tagDescription: text('tag_description'),\n imageUrl: text('image_url'),\n isDashboardTag: integer('is_dashboard_tag', { mode: 'boolean' }).notNull().default(false),\n relatedStores: jsonText('related_stores').$defaultFn(() => []),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productTags = sqliteTable('product_tags', {\n id: integer().primaryKey({ autoIncrement: true }),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n tagId: integer('tag_id').notNull().references(() => productTagInfo.id),\n assignedAt: integer('assigned_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_product_tag: uniqueIndex('unique_product_tag').on(t.productId, t.tagId),\n}))\n\nexport const deliverySlotInfo = sqliteTable('delivery_slot_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n deliveryTime: integer('delivery_time', { mode: 'timestamp' }).notNull(),\n freezeTime: integer('freeze_time', { mode: 'timestamp' }).notNull(),\n isActive: integer('is_active', { mode: 'boolean' }).notNull().default(true),\n isFlash: integer('is_flash', { mode: 'boolean' }).notNull().default(false),\n isCapacityFull: integer('is_capacity_full', { mode: 'boolean' }).notNull().default(false),\n deliverySequence: jsonText>('delivery_sequence').$defaultFn(() => ({})),\n groupIds: jsonText('group_ids').$defaultFn(() => []),\n})\n\nexport const vendorSnippets = sqliteTable('vendor_snippets', {\n id: integer().primaryKey({ autoIncrement: true }),\n snippetCode: text('snippet_code').notNull().unique(),\n slotId: integer('slot_id').references(() => deliverySlotInfo.id),\n isPermanent: integer('is_permanent', { mode: 'boolean' }).notNull().default(false),\n productIds: jsonText('product_ids').notNull(),\n validTill: integer('valid_till', { mode: 'timestamp' }),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productSlots = sqliteTable('product_slots', {\n productId: integer('product_id').notNull().references(() => productInfo.id),\n slotId: integer('slot_id').notNull().references(() => deliverySlotInfo.id),\n}, (t) => ({\n pk: primaryKey({ columns: [t.productId, t.slotId], name: 'product_slot_pk' }),\n}))\n\nexport const specialDeals = sqliteTable('special_deals', {\n id: integer().primaryKey({ autoIncrement: true }),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n quantity: numericText('quantity').notNull(),\n price: numericText('price').notNull(),\n validTill: integer('valid_till', { mode: 'timestamp' }).notNull(),\n})\n\nexport const paymentInfoTable = sqliteTable('payment_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n status: text().notNull(),\n gateway: text().notNull(),\n orderId: text('order_id'),\n token: text('token'),\n merchantOrderId: text('merchant_order_id').notNull().unique(),\n payload: jsonText('payload'),\n})\n\nexport const orders = sqliteTable('orders', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n addressId: integer('address_id').notNull().references(() => addresses.id),\n slotId: integer('slot_id').references(() => deliverySlotInfo.id),\n isCod: integer('is_cod', { mode: 'boolean' }).notNull().default(false),\n isOnlinePayment: integer('is_online_payment', { mode: 'boolean' }).notNull().default(false),\n paymentInfoId: integer('payment_info_id').references(() => paymentInfoTable.id),\n totalAmount: numericText('total_amount').notNull(),\n deliveryCharge: numericText('delivery_charge').notNull().default('0'),\n readableId: integer('readable_id').notNull(),\n adminNotes: text('admin_notes'),\n userNotes: text('user_notes'),\n orderGroupId: text('order_group_id'),\n orderGroupProportion: numericText('order_group_proportion'),\n isFlashDelivery: integer('is_flash_delivery', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const orderItems = sqliteTable('order_items', {\n id: integer().primaryKey({ autoIncrement: true }),\n orderId: integer('order_id').notNull().references(() => orders.id),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n quantity: text('quantity').notNull(),\n price: numericText('price').notNull(),\n discountedPrice: numericText('discounted_price'),\n is_packaged: integer('is_packaged', { mode: 'boolean' }).notNull().default(false),\n is_package_verified: integer('is_package_verified', { mode: 'boolean' }).notNull().default(false),\n})\n\nexport const orderStatus = sqliteTable('order_status', {\n id: integer().primaryKey({ autoIncrement: true }),\n orderTime: integer('order_time', { mode: 'timestamp' }).notNull().defaultNow(),\n userId: integer('user_id').notNull().references(() => users.id),\n orderId: integer('order_id').notNull().references(() => orders.id),\n isPackaged: integer('is_packaged', { mode: 'boolean' }).notNull().default(false),\n isDelivered: integer('is_delivered', { mode: 'boolean' }).notNull().default(false),\n isCancelled: integer('is_cancelled', { mode: 'boolean' }).notNull().default(false),\n cancelReason: text('cancel_reason'),\n isCancelledByAdmin: integer('is_cancelled_by_admin', { mode: 'boolean' }),\n paymentStatus: paymentStatusEnum('payment_state').notNull().default('pending'),\n cancellationUserNotes: text('cancellation_user_notes'),\n cancellationAdminNotes: text('cancellation_admin_notes'),\n cancellationReviewed: integer('cancellation_reviewed', { mode: 'boolean' }).notNull().default(false),\n cancellationReviewedAt: integer('cancellation_reviewed_at', { mode: 'timestamp' }),\n refundCouponId: integer('refund_coupon_id').references(() => coupons.id),\n})\n\nexport const payments = sqliteTable('payments', {\n id: integer().primaryKey({ autoIncrement: true }),\n status: text().notNull(),\n gateway: text().notNull(),\n orderId: integer('order_id').notNull().references(() => orders.id),\n token: text('token'),\n merchantOrderId: text('merchant_order_id').notNull().unique(),\n payload: jsonText('payload'),\n})\n\nexport const refunds = sqliteTable('refunds', {\n id: integer().primaryKey({ autoIncrement: true }),\n orderId: integer('order_id').notNull().references(() => orders.id),\n refundAmount: numericText('refund_amount'),\n refundStatus: text('refund_status').default('none'),\n merchantRefundId: text('merchant_refund_id'),\n refundProcessedAt: integer('refund_processed_at', { mode: 'timestamp' }),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const keyValStore = sqliteTable('key_val_store', {\n key: text('key').primaryKey(),\n value: jsonText('value'),\n})\n\nexport const notifications = sqliteTable('notifications', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n title: text().notNull(),\n body: text().notNull(),\n type: text(),\n isRead: integer('is_read', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productCategories = sqliteTable('product_categories', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text().notNull(),\n description: text(),\n})\n\nexport const cartItems = sqliteTable('cart_items', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n quantity: numericText('quantity').notNull(),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_user_product: uniqueIndex('unique_user_product').on(t.userId, t.productId),\n}))\n\nexport const complaints = sqliteTable('complaints', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n orderId: integer('order_id').references(() => orders.id),\n complaintBody: text('complaint_body').notNull(),\n images: jsonText('images'),\n response: text('response'),\n isResolved: integer('is_resolved', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const coupons = sqliteTable('coupons', {\n id: integer().primaryKey({ autoIncrement: true }),\n couponCode: text('coupon_code').notNull().unique(),\n isUserBased: integer('is_user_based', { mode: 'boolean' }).notNull().default(false),\n discountPercent: numericText('discount_percent'),\n flatDiscount: numericText('flat_discount'),\n minOrder: numericText('min_order'),\n productIds: jsonText('product_ids'),\n createdBy: integer('created_by').notNull().references(() => staffUsers.id),\n maxValue: numericText('max_value'),\n isApplyForAll: integer('is_apply_for_all', { mode: 'boolean' }).notNull().default(false),\n validTill: integer('valid_till', { mode: 'timestamp' }),\n maxLimitForUser: integer('max_limit_for_user'),\n isInvalidated: integer('is_invalidated', { mode: 'boolean' }).notNull().default(false),\n exclusiveApply: integer('exclusive_apply', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const couponUsage = sqliteTable('coupon_usage', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n couponId: integer('coupon_id').notNull().references(() => coupons.id),\n orderId: integer('order_id').references(() => orders.id),\n orderItemId: integer('order_item_id').references(() => orderItems.id),\n usedAt: integer('used_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const couponApplicableUsers = sqliteTable('coupon_applicable_users', {\n id: integer().primaryKey({ autoIncrement: true }),\n couponId: integer('coupon_id').notNull().references(() => coupons.id),\n userId: integer('user_id').notNull().references(() => users.id),\n}, (t) => ({\n unq_coupon_user: uniqueIndex('unique_coupon_user').on(t.couponId, t.userId),\n}))\n\nexport const couponApplicableProducts = sqliteTable('coupon_applicable_products', {\n id: integer().primaryKey({ autoIncrement: true }),\n couponId: integer('coupon_id').notNull().references(() => coupons.id),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n}, (t) => ({\n unq_coupon_product: uniqueIndex('unique_coupon_product').on(t.couponId, t.productId),\n}))\n\nexport const userIncidents = sqliteTable('user_incidents', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n orderId: integer('order_id').references(() => orders.id),\n dateAdded: integer('date_added', { mode: 'timestamp' }).notNull().defaultNow(),\n adminComment: text('admin_comment'),\n addedBy: integer('added_by').references(() => staffUsers.id),\n negativityScore: integer('negativity_score'),\n})\n\nexport const reservedCoupons = sqliteTable('reserved_coupons', {\n id: integer().primaryKey({ autoIncrement: true }),\n secretCode: text('secret_code').notNull().unique(),\n couponCode: text('coupon_code').notNull(),\n discountPercent: numericText('discount_percent'),\n flatDiscount: numericText('flat_discount'),\n minOrder: numericText('min_order'),\n productIds: jsonText('product_ids'),\n maxValue: numericText('max_value'),\n validTill: integer('valid_till', { mode: 'timestamp' }),\n maxLimitForUser: integer('max_limit_for_user'),\n exclusiveApply: integer('exclusive_apply', { mode: 'boolean' }).notNull().default(false),\n isRedeemed: integer('is_redeemed', { mode: 'boolean' }).notNull().default(false),\n redeemedBy: integer('redeemed_by').references(() => users.id),\n redeemedAt: integer('redeemed_at', { mode: 'timestamp' }),\n createdBy: integer('created_by').notNull().references(() => staffUsers.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const notifCreds = sqliteTable('notif_creds', {\n id: integer().primaryKey({ autoIncrement: true }),\n token: text().notNull().unique(),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n userId: integer('user_id').notNull().references(() => users.id),\n lastVerified: integer('last_verified', { mode: 'timestamp' }),\n})\n\nexport const unloggedUserTokens = sqliteTable('unlogged_user_tokens', {\n id: integer().primaryKey({ autoIncrement: true }),\n token: text().notNull().unique(),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n lastVerified: integer('last_verified', { mode: 'timestamp' }),\n})\n\nexport const userNotifications = sqliteTable('user_notifications', {\n id: integer().primaryKey({ autoIncrement: true }),\n title: text('title').notNull(),\n imageUrl: text('image_url'),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n body: text('body').notNull(),\n applicableUsers: jsonText('applicable_users'),\n})\n\n// Relations\nexport const usersRelations = relations(users, ({ many, one }) => ({\n addresses: many(addresses),\n orders: many(orders),\n notifications: many(notifications),\n cartItems: many(cartItems),\n userCreds: one(userCreds),\n coupons: many(coupons),\n couponUsages: many(couponUsage),\n applicableCoupons: many(couponApplicableUsers),\n userDetails: one(userDetails),\n notifCreds: many(notifCreds),\n userIncidents: many(userIncidents),\n}))\n\nexport const userCredsRelations = relations(userCreds, ({ one }) => ({\n user: one(users, { fields: [userCreds.userId], references: [users.id] }),\n}))\n\nexport const staffUsersRelations = relations(staffUsers, ({ one, many }) => ({\n role: one(staffRoles, { fields: [staffUsers.staffRoleId], references: [staffRoles.id] }),\n coupons: many(coupons),\n stores: many(storeInfo),\n}))\n\nexport const addressesRelations = relations(addresses, ({ one, many }) => ({\n user: one(users, { fields: [addresses.userId], references: [users.id] }),\n orders: many(orders),\n zone: one(addressZones, { fields: [addresses.zoneId], references: [addressZones.id] }),\n}))\n\nexport const unitsRelations = relations(units, ({ many }) => ({\n products: many(productInfo),\n}))\n\nexport const productInfoRelations = relations(productInfo, ({ one, many }) => ({\n unit: one(units, { fields: [productInfo.unitId], references: [units.id] }),\n store: one(storeInfo, { fields: [productInfo.storeId], references: [storeInfo.id] }),\n productSlots: many(productSlots),\n specialDeals: many(specialDeals),\n orderItems: many(orderItems),\n cartItems: many(cartItems),\n tags: many(productTags),\n applicableCoupons: many(couponApplicableProducts),\n reviews: many(productReviews),\n groups: many(productGroupMembership),\n}))\n\nexport const productTagInfoRelations = relations(productTagInfo, ({ many }) => ({\n products: many(productTags),\n}))\n\nexport const productTagsRelations = relations(productTags, ({ one }) => ({\n product: one(productInfo, { fields: [productTags.productId], references: [productInfo.id] }),\n tag: one(productTagInfo, { fields: [productTags.tagId], references: [productTagInfo.id] }),\n}))\n\nexport const deliverySlotInfoRelations = relations(deliverySlotInfo, ({ many }) => ({\n productSlots: many(productSlots),\n orders: many(orders),\n vendorSnippets: many(vendorSnippets),\n}))\n\nexport const productSlotsRelations = relations(productSlots, ({ one }) => ({\n product: one(productInfo, { fields: [productSlots.productId], references: [productInfo.id] }),\n slot: one(deliverySlotInfo, { fields: [productSlots.slotId], references: [deliverySlotInfo.id] }),\n}))\n\nexport const specialDealsRelations = relations(specialDeals, ({ one }) => ({\n product: one(productInfo, { fields: [specialDeals.productId], references: [productInfo.id] }),\n}))\n\nexport const ordersRelations = relations(orders, ({ one, many }) => ({\n user: one(users, { fields: [orders.userId], references: [users.id] }),\n address: one(addresses, { fields: [orders.addressId], references: [addresses.id] }),\n slot: one(deliverySlotInfo, { fields: [orders.slotId], references: [deliverySlotInfo.id] }),\n orderItems: many(orderItems),\n payment: one(payments),\n paymentInfo: one(paymentInfoTable, { fields: [orders.paymentInfoId], references: [paymentInfoTable.id] }),\n orderStatus: many(orderStatus),\n refunds: many(refunds),\n couponUsages: many(couponUsage),\n userIncidents: many(userIncidents),\n}))\n\nexport const orderItemsRelations = relations(orderItems, ({ one }) => ({\n order: one(orders, { fields: [orderItems.orderId], references: [orders.id] }),\n product: one(productInfo, { fields: [orderItems.productId], references: [productInfo.id] }),\n}))\n\nexport const orderStatusRelations = relations(orderStatus, ({ one }) => ({\n order: one(orders, { fields: [orderStatus.orderId], references: [orders.id] }),\n user: one(users, { fields: [orderStatus.userId], references: [users.id] }),\n refundCoupon: one(coupons, { fields: [orderStatus.refundCouponId], references: [coupons.id] }),\n}))\n\nexport const paymentInfoRelations = relations(paymentInfoTable, ({ one }) => ({\n order: one(orders, { fields: [paymentInfoTable.id], references: [orders.paymentInfoId] }),\n}))\n\nexport const paymentsRelations = relations(payments, ({ one }) => ({\n order: one(orders, { fields: [payments.orderId], references: [orders.id] }),\n}))\n\nexport const refundsRelations = relations(refunds, ({ one }) => ({\n order: one(orders, { fields: [refunds.orderId], references: [orders.id] }),\n}))\n\nexport const notificationsRelations = relations(notifications, ({ one }) => ({\n user: one(users, { fields: [notifications.userId], references: [users.id] }),\n}))\n\nexport const productCategoriesRelations = relations(productCategories, ({}) => ({}))\n\nexport const cartItemsRelations = relations(cartItems, ({ one }) => ({\n user: one(users, { fields: [cartItems.userId], references: [users.id] }),\n product: one(productInfo, { fields: [cartItems.productId], references: [productInfo.id] }),\n}))\n\nexport const complaintsRelations = relations(complaints, ({ one }) => ({\n user: one(users, { fields: [complaints.userId], references: [users.id] }),\n order: one(orders, { fields: [complaints.orderId], references: [orders.id] }),\n}))\n\nexport const couponsRelations = relations(coupons, ({ one, many }) => ({\n creator: one(staffUsers, { fields: [coupons.createdBy], references: [staffUsers.id] }),\n usages: many(couponUsage),\n applicableUsers: many(couponApplicableUsers),\n applicableProducts: many(couponApplicableProducts),\n}))\n\nexport const couponUsageRelations = relations(couponUsage, ({ one }) => ({\n user: one(users, { fields: [couponUsage.userId], references: [users.id] }),\n coupon: one(coupons, { fields: [couponUsage.couponId], references: [coupons.id] }),\n order: one(orders, { fields: [couponUsage.orderId], references: [orders.id] }),\n orderItem: one(orderItems, { fields: [couponUsage.orderItemId], references: [orderItems.id] }),\n}))\n\nexport const userDetailsRelations = relations(userDetails, ({ one }) => ({\n user: one(users, { fields: [userDetails.userId], references: [users.id] }),\n}))\n\nexport const notifCredsRelations = relations(notifCreds, ({ one }) => ({\n user: one(users, { fields: [notifCreds.userId], references: [users.id] }),\n}))\n\nexport const userNotificationsRelations = relations(userNotifications, ({}) => ({\n // No relations needed for now\n}))\n\nexport const storeInfoRelations = relations(storeInfo, ({ one, many }) => ({\n owner: one(staffUsers, { fields: [storeInfo.owner], references: [staffUsers.id] }),\n products: many(productInfo),\n}))\n\nexport const couponApplicableUsersRelations = relations(couponApplicableUsers, ({ one }) => ({\n coupon: one(coupons, { fields: [couponApplicableUsers.couponId], references: [coupons.id] }),\n user: one(users, { fields: [couponApplicableUsers.userId], references: [users.id] }),\n}))\n\nexport const couponApplicableProductsRelations = relations(couponApplicableProducts, ({ one }) => ({\n coupon: one(coupons, { fields: [couponApplicableProducts.couponId], references: [coupons.id] }),\n product: one(productInfo, { fields: [couponApplicableProducts.productId], references: [productInfo.id] }),\n}))\n\nexport const reservedCouponsRelations = relations(reservedCoupons, ({ one }) => ({\n redeemedUser: one(users, { fields: [reservedCoupons.redeemedBy], references: [users.id] }),\n creator: one(staffUsers, { fields: [reservedCoupons.createdBy], references: [staffUsers.id] }),\n}))\n\nexport const productReviewsRelations = relations(productReviews, ({ one }) => ({\n user: one(users, { fields: [productReviews.userId], references: [users.id] }),\n product: one(productInfo, { fields: [productReviews.productId], references: [productInfo.id] }),\n}))\n\nexport const addressZonesRelations = relations(addressZones, ({ many }) => ({\n addresses: many(addresses),\n areas: many(addressAreas),\n}))\n\nexport const addressAreasRelations = relations(addressAreas, ({ one }) => ({\n zone: one(addressZones, { fields: [addressAreas.zoneId], references: [addressZones.id] }),\n}))\n\nexport const productGroupInfoRelations = relations(productGroupInfo, ({ many }) => ({\n memberships: many(productGroupMembership),\n}))\n\nexport const productGroupMembershipRelations = relations(productGroupMembership, ({ one }) => ({\n product: one(productInfo, { fields: [productGroupMembership.productId], references: [productInfo.id] }),\n group: one(productGroupInfo, { fields: [productGroupMembership.groupId], references: [productGroupInfo.id] }),\n}))\n\nexport const homeBannersRelations = relations(homeBanners, ({}) => ({\n // Relations for productIds array would be more complex, skipping for now\n}))\n\nexport const staffRolesRelations = relations(staffRoles, ({ many }) => ({\n staffUsers: many(staffUsers),\n rolePermissions: many(staffRolePermissions),\n}))\n\nexport const staffPermissionsRelations = relations(staffPermissions, ({ many }) => ({\n rolePermissions: many(staffRolePermissions),\n}))\n\nexport const staffRolePermissionsRelations = relations(staffRolePermissions, ({ one }) => ({\n role: one(staffRoles, { fields: [staffRolePermissions.staffRoleId], references: [staffRoles.id] }),\n permission: one(staffPermissions, { fields: [staffRolePermissions.staffPermissionId], references: [staffPermissions.id] }),\n}))\n\nexport const userIncidentsRelations = relations(userIncidents, ({ one }) => ({\n user: one(users, { fields: [userIncidents.userId], references: [users.id] }),\n order: one(orders, { fields: [userIncidents.orderId], references: [orders.id] }),\n addedBy: one(staffUsers, { fields: [userIncidents.addedBy], references: [staffUsers.id] }),\n}))\n\nexport const vendorSnippetsRelations = relations(vendorSnippets, ({ one }) => ({\n slot: one(deliverySlotInfo, { fields: [vendorSnippets.slotId], references: [deliverySlotInfo.id] }),\n}))\n", "import type { D1Database } from '@cloudflare/workers-types'\nimport { drizzle, type DrizzleD1Database } from 'drizzle-orm/d1'\nimport * as schema from './schema'\n\ntype DbClient = DrizzleD1Database\n\nlet dbInstance: DbClient | null = null\n\nexport function initDb(database: D1Database): void {\n const base = drizzle(database, { schema }) as DbClient\n dbInstance = Object.assign(base, {\n transaction: async (handler: (tx: DbClient) => Promise): Promise => {\n return handler(base)\n },\n })\n}\n\nexport const db = new Proxy({} as DbClient, {\n get(_target, prop: keyof DbClient) {\n if (!dbInstance) {\n throw new Error('D1 database not initialized. Call initDb(env.DB) before using db helpers.')\n }\n\n return dbInstance[prop]\n },\n})\n", "import { db } from '../db/db_index'\nimport { homeBanners, staffUsers } from '../db/schema'\nimport { eq, desc } from 'drizzle-orm'\n\n\nexport interface Banner {\n id: number\n name: string\n imageUrl: string\n description: string | null\n productIds: number[] | null\n redirectUrl: string | null\n serialNum: number | null\n isActive: boolean\n createdAt: Date\n lastUpdated: Date\n}\n\ntype BannerRow = typeof homeBanners.$inferSelect\n\nexport async function getBanners(): Promise {\n const banners = await db.query.homeBanners.findMany({\n orderBy: desc(homeBanners.createdAt),\n }) as BannerRow[]\n\n return banners.map((banner) => ({\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description,\n productIds: banner.productIds || [],\n redirectUrl: banner.redirectUrl,\n serialNum: banner.serialNum,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n }))\n}\n\nexport async function getBannerById(id: number): Promise {\n const banner = await db.query.homeBanners.findFirst({\n where: eq(homeBanners.id, id),\n })\n\n if (!banner) return null\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description,\n productIds: banner.productIds || [],\n redirectUrl: banner.redirectUrl,\n serialNum: banner.serialNum,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n }\n}\n\nexport type CreateBannerInput = Omit\n\nexport async function createBanner(input: CreateBannerInput): Promise {\n const [banner] = await db.insert(homeBanners).values({\n name: input.name,\n imageUrl: input.imageUrl,\n description: input.description,\n productIds: input.productIds || [],\n redirectUrl: input.redirectUrl,\n serialNum: input.serialNum,\n isActive: input.isActive,\n }).returning()\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description,\n productIds: banner.productIds || [],\n redirectUrl: banner.redirectUrl,\n serialNum: banner.serialNum,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n }\n}\n\nexport type UpdateBannerInput = Partial>\n\nexport async function updateBanner(id: number, input: UpdateBannerInput): Promise {\n const [banner] = await db.update(homeBanners)\n .set({\n ...input,\n lastUpdated: new Date(),\n })\n .where(eq(homeBanners.id, id))\n .returning()\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description,\n productIds: banner.productIds || [],\n redirectUrl: banner.redirectUrl,\n serialNum: banner.serialNum,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n }\n}\n\nexport async function deleteBanner(id: number): Promise {\n await db.delete(homeBanners).where(eq(homeBanners.id, id))\n}\n", "import { db } from '../db/db_index'\nimport { complaints, users } from '../db/schema'\nimport { eq, desc, lt } from 'drizzle-orm'\n\nexport interface Complaint {\n id: number\n complaintBody: string\n userId: number\n orderId: number | null\n isResolved: boolean\n response: string | null\n createdAt: Date\n images: string[] | null\n}\n\nexport interface ComplaintWithUser extends Complaint {\n userName: string | null\n userMobile: string | null\n}\n\nexport async function getComplaints(\n cursor?: number,\n limit: number = 20\n): Promise<{ complaints: ComplaintWithUser[]; hasMore: boolean }> {\n const whereCondition = cursor ? lt(complaints.id, cursor) : undefined\n\n const complaintsData = await db\n .select({\n id: complaints.id,\n complaintBody: complaints.complaintBody,\n userId: complaints.userId,\n orderId: complaints.orderId,\n isResolved: complaints.isResolved,\n response: complaints.response,\n createdAt: complaints.createdAt,\n images: complaints.images,\n userName: users.name,\n userMobile: users.mobile,\n })\n .from(complaints)\n .leftJoin(users, eq(complaints.userId, users.id))\n .where(whereCondition)\n .orderBy(desc(complaints.id))\n .limit(limit + 1)\n\n const hasMore = complaintsData.length > limit\n const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData\n\n return {\n complaints: complaintsToReturn.map((c) => ({\n id: c.id,\n complaintBody: c.complaintBody,\n userId: c.userId,\n orderId: c.orderId,\n isResolved: c.isResolved,\n response: c.response,\n createdAt: c.createdAt,\n images: c.images as string[],\n userName: c.userName,\n userMobile: c.userMobile,\n })),\n hasMore,\n }\n}\n\nexport async function resolveComplaint(\n id: number,\n response?: string\n): Promise {\n await db\n .update(complaints)\n .set({ isResolved: true, response })\n .where(eq(complaints.id, id))\n}\n", "import { db } from '../db/db_index'\nimport { keyValStore } from '../db/schema'\n\nexport interface Constant {\n key: string\n value: any\n}\n\nexport async function getAllConstants(): Promise {\n const constants = await db.select().from(keyValStore)\n\n return constants.map(c => ({\n key: c.key,\n value: c.value,\n }))\n}\n\nexport async function upsertConstants(constants: Constant[]): Promise {\n await db.transaction(async (tx) => {\n for (const { key, value } of constants) {\n await tx.insert(keyValStore)\n .values({ key, value })\n .onConflictDoUpdate({\n target: keyValStore.key,\n set: { value },\n })\n }\n })\n}\n", "import { db } from '../db/db_index'\nimport { coupons, reservedCoupons, users, orders, orderStatus, couponApplicableUsers, couponApplicableProducts } from '../db/schema'\nimport { eq, and, like, or, inArray, lt, desc, asc } from 'drizzle-orm'\n\nexport interface Coupon {\n id: number\n couponCode: string\n isUserBased: boolean\n discountPercent: string | null\n flatDiscount: string | null\n minOrder: string | null\n productIds: number[] | null\n maxValue: string | null\n isApplyForAll: boolean\n validTill: Date | null\n maxLimitForUser: number | null\n exclusiveApply: boolean\n isInvalidated: boolean\n createdAt: Date\n createdBy: number\n}\n\nexport async function getAllCoupons(\n cursor?: number,\n limit: number = 50,\n search?: string\n): Promise<{ coupons: any[]; hasMore: boolean }> {\n let whereCondition = undefined\n const conditions = []\n \n if (cursor) {\n conditions.push(lt(coupons.id, cursor))\n }\n \n if (search && search.trim()) {\n conditions.push(like(coupons.couponCode, `%${search}%`))\n }\n \n if (conditions.length > 0) {\n whereCondition = and(...conditions)\n }\n \n const result = await db.query.coupons.findMany({\n where: whereCondition,\n with: {\n creator: true,\n applicableUsers: {\n with: {\n user: true,\n },\n },\n applicableProducts: {\n with: {\n product: true,\n },\n },\n },\n orderBy: desc(coupons.createdAt),\n limit: limit + 1,\n })\n \n const hasMore = result.length > limit\n const couponsList = hasMore ? result.slice(0, limit) : result\n \n return { coupons: couponsList, hasMore }\n}\n\nexport async function getCouponById(id: number): Promise {\n return await db.query.coupons.findFirst({\n where: eq(coupons.id, id),\n with: {\n creator: true,\n applicableUsers: {\n with: {\n user: true,\n },\n },\n applicableProducts: {\n with: {\n product: true,\n },\n },\n },\n })\n}\n\nexport interface CreateCouponInput {\n couponCode: string\n isUserBased: boolean\n discountPercent?: string\n flatDiscount?: string\n minOrder?: string\n productIds?: number[] | null\n maxValue?: string\n isApplyForAll: boolean\n validTill?: Date\n maxLimitForUser?: number\n exclusiveApply: boolean\n createdBy: number\n}\n\nexport async function createCouponWithRelations(\n input: CreateCouponInput,\n applicableUsers?: number[],\n applicableProducts?: number[]\n): Promise {\n return await db.transaction(async (tx) => {\n const [coupon] = await tx.insert(coupons).values({\n couponCode: input.couponCode,\n isUserBased: input.isUserBased,\n discountPercent: input.discountPercent,\n flatDiscount: input.flatDiscount,\n minOrder: input.minOrder,\n productIds: input.productIds,\n createdBy: input.createdBy,\n maxValue: input.maxValue,\n isApplyForAll: input.isApplyForAll,\n validTill: input.validTill,\n maxLimitForUser: input.maxLimitForUser,\n exclusiveApply: input.exclusiveApply,\n }).returning()\n\n if (applicableUsers && applicableUsers.length > 0) {\n await tx.insert(couponApplicableUsers).values(\n applicableUsers.map(userId => ({\n couponId: coupon.id,\n userId,\n }))\n )\n }\n\n if (applicableProducts && applicableProducts.length > 0) {\n await tx.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: coupon.id,\n productId,\n }))\n )\n }\n\n return coupon as Coupon\n })\n}\n\nexport interface UpdateCouponInput {\n couponCode?: string\n isUserBased?: boolean\n discountPercent?: string\n flatDiscount?: string\n minOrder?: string\n productIds?: number[] | null\n maxValue?: string\n isApplyForAll?: boolean\n validTill?: Date | null\n maxLimitForUser?: number\n exclusiveApply?: boolean\n isInvalidated?: boolean\n}\n\nexport async function updateCouponWithRelations(\n id: number,\n input: UpdateCouponInput,\n applicableUsers?: number[],\n applicableProducts?: number[]\n): Promise {\n return await db.transaction(async (tx) => {\n const [coupon] = await tx.update(coupons)\n .set({\n ...input,\n })\n .where(eq(coupons.id, id))\n .returning()\n\n if (applicableUsers !== undefined) {\n await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.couponId, id))\n if (applicableUsers.length > 0) {\n await tx.insert(couponApplicableUsers).values(\n applicableUsers.map(userId => ({\n couponId: id,\n userId,\n }))\n )\n }\n }\n\n if (applicableProducts !== undefined) {\n await tx.delete(couponApplicableProducts).where(eq(couponApplicableProducts.couponId, id))\n if (applicableProducts.length > 0) {\n await tx.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: id,\n productId,\n }))\n )\n }\n }\n\n return coupon as Coupon\n })\n}\n\nexport async function invalidateCoupon(id: number): Promise {\n const result = await db.update(coupons)\n .set({ isInvalidated: true })\n .where(eq(coupons.id, id))\n .returning()\n\n return result[0] as Coupon\n}\n\nexport interface CouponValidationResult {\n valid: boolean\n message?: string\n discountAmount?: number\n coupon?: Partial\n}\n\nexport async function validateCoupon(\n code: string,\n userId: number,\n orderAmount: number\n): Promise {\n const coupon = await db.query.coupons.findFirst({\n where: and(\n eq(coupons.couponCode, code.toUpperCase()),\n eq(coupons.isInvalidated, false)\n ),\n })\n\n if (!coupon) {\n return { valid: false, message: 'Coupon not found or invalidated' }\n }\n\n if (coupon.validTill && new Date(coupon.validTill) < new Date()) {\n return { valid: false, message: 'Coupon has expired' }\n }\n\n if (!coupon.isApplyForAll && !coupon.isUserBased) {\n return { valid: false, message: 'Coupon is not available for use' }\n }\n\n const minOrderValue = coupon.minOrder ? parseFloat(coupon.minOrder) : 0\n if (minOrderValue > 0 && orderAmount < minOrderValue) {\n return { valid: false, message: `Minimum order amount is ${minOrderValue}` }\n }\n\n let discountAmount = 0\n if (coupon.discountPercent) {\n const percent = parseFloat(coupon.discountPercent)\n discountAmount = (orderAmount * percent) / 100\n } else if (coupon.flatDiscount) {\n discountAmount = parseFloat(coupon.flatDiscount)\n }\n\n const maxValueLimit = coupon.maxValue ? parseFloat(coupon.maxValue) : 0\n if (maxValueLimit > 0 && discountAmount > maxValueLimit) {\n discountAmount = maxValueLimit\n }\n\n return {\n valid: true,\n discountAmount,\n coupon: {\n id: coupon.id,\n discountPercent: coupon.discountPercent,\n flatDiscount: coupon.flatDiscount,\n maxValue: coupon.maxValue,\n }\n }\n}\n\nexport async function getReservedCoupons(\n cursor?: number,\n limit: number = 50,\n search?: string\n): Promise<{ coupons: any[]; hasMore: boolean }> {\n let whereCondition = undefined\n const conditions = []\n \n if (cursor) {\n conditions.push(lt(reservedCoupons.id, cursor))\n }\n \n if (search && search.trim()) {\n conditions.push(or(\n like(reservedCoupons.secretCode, `%${search}%`),\n like(reservedCoupons.couponCode, `%${search}%`)\n ))\n }\n \n if (conditions.length > 0) {\n whereCondition = and(...conditions)\n }\n\n const result = await db.query.reservedCoupons.findMany({\n where: whereCondition,\n with: {\n redeemedUser: true,\n creator: true,\n },\n orderBy: desc(reservedCoupons.createdAt),\n limit: limit + 1,\n })\n\n const hasMore = result.length > limit\n const couponsList = hasMore ? result.slice(0, limit) : result\n\n return { coupons: couponsList, hasMore }\n}\n\nexport async function createReservedCouponWithProducts(\n input: any,\n applicableProducts?: number[]\n): Promise {\n return await db.transaction(async (tx) => {\n const [coupon] = await tx.insert(reservedCoupons).values({\n secretCode: input.secretCode,\n couponCode: input.couponCode,\n discountPercent: input.discountPercent,\n flatDiscount: input.flatDiscount,\n minOrder: input.minOrder,\n productIds: input.productIds,\n maxValue: input.maxValue,\n validTill: input.validTill,\n maxLimitForUser: input.maxLimitForUser,\n exclusiveApply: input.exclusiveApply,\n createdBy: input.createdBy,\n }).returning()\n\n if (applicableProducts && applicableProducts.length > 0) {\n await tx.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: coupon.id,\n productId,\n }))\n )\n }\n\n return coupon\n })\n}\n\nexport async function checkUsersExist(userIds: number[]): Promise {\n const existingUsers = await db.query.users.findMany({\n where: inArray(users.id, userIds),\n columns: { id: true },\n })\n return existingUsers.length === userIds.length\n}\n\nexport async function checkCouponExists(couponCode: string): Promise {\n const existing = await db.query.coupons.findFirst({\n where: eq(coupons.couponCode, couponCode),\n })\n return !!existing\n}\n\nexport async function checkReservedCouponExists(secretCode: string): Promise {\n const existing = await db.query.reservedCoupons.findFirst({\n where: eq(reservedCoupons.secretCode, secretCode),\n })\n return !!existing\n}\n\nexport async function generateCancellationCoupon(\n orderId: number,\n staffUserId: number,\n userId: number,\n orderAmount: number,\n couponCode: string\n): Promise {\n return await db.transaction(async (tx) => {\n const expiryDate = new Date()\n expiryDate.setDate(expiryDate.getDate() + 30)\n\n const [coupon] = await tx.insert(coupons).values({\n couponCode,\n isUserBased: true,\n flatDiscount: orderAmount.toString(),\n minOrder: orderAmount.toString(),\n maxValue: orderAmount.toString(),\n validTill: expiryDate,\n maxLimitForUser: 1,\n createdBy: staffUserId,\n isApplyForAll: false,\n }).returning()\n\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId,\n })\n\n await tx.update(orderStatus)\n .set({ refundCouponId: coupon.id })\n .where(eq(orderStatus.orderId, orderId))\n\n return coupon as Coupon\n })\n}\n\nexport async function getOrderWithUser(orderId: number): Promise {\n return await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n user: true,\n },\n })\n}\n\nexport async function createCouponForUser(\n mobile: string,\n couponCode: string,\n staffUserId: number\n): Promise<{ coupon: Coupon; user: { id: number; mobile: string; name: string | null } }> {\n return await db.transaction(async (tx) => {\n let user = await tx.query.users.findFirst({\n where: eq(users.mobile, mobile),\n })\n\n if (!user) {\n const [newUser] = await tx.insert(users).values({\n name: null,\n email: null,\n mobile,\n }).returning()\n user = newUser\n }\n\n const [coupon] = await tx.insert(coupons).values({\n couponCode,\n isUserBased: true,\n discountPercent: '20',\n minOrder: '1000',\n maxValue: '500',\n maxLimitForUser: 1,\n isApplyForAll: false,\n exclusiveApply: false,\n createdBy: staffUserId,\n validTill: new Date(Date.now() + 90 * 24 * 60 * 60 * 1000),\n }).returning()\n\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId: user.id,\n })\n\n return {\n coupon: coupon as Coupon,\n user: {\n id: user.id,\n mobile: user.mobile as string,\n name: user.name,\n },\n }\n })\n}\n\nexport interface UserMiniInfo {\n id: number\n name: string\n mobile: string | null\n}\n\nexport async function getUsersForCoupon(\n search?: string,\n limit: number = 20,\n offset: number = 0\n): Promise<{ users: UserMiniInfo[] }> {\n let whereCondition = undefined\n if (search && search.trim()) {\n whereCondition = or(\n like(users.name, `%${search}%`),\n like(users.mobile, `%${search}%`)\n )\n }\n\n const userList = await db.query.users.findMany({\n where: whereCondition,\n columns: {\n id: true,\n name: true,\n mobile: true,\n },\n limit: limit,\n offset: offset,\n orderBy: asc(users.name),\n })\n\n return {\n users: userList.map((user) => ({\n id: user.id,\n name: user.name || 'Unknown',\n mobile: user.mobile,\n }))\n }\n}\n", "import { db } from '../db/db_index'\nimport {\n addresses,\n complaints,\n couponUsage,\n orderItems,\n orders,\n orderStatus,\n payments,\n refunds,\n} from '../db/schema'\nimport { and, desc, eq, inArray, lt, SQL } from 'drizzle-orm'\nimport type {\n AdminOrderDetails,\n AdminOrderRow,\n AdminOrderStatusRecord,\n AdminOrderUpdateResult,\n AdminOrderItemPackagingResult,\n AdminOrderMessageResult,\n AdminOrderBasicResult,\n AdminGetSlotOrdersResult,\n AdminGetAllOrdersResultWithUserId,\n AdminRebalanceSlotsResult,\n AdminCancelOrderResult,\n AdminRefundRecord,\n RefundStatus,\n PaymentStatus,\n} from '@packages/shared'\nimport type { InferSelectModel } from 'drizzle-orm'\n\nconst isPaymentStatus = (value: string): value is PaymentStatus =>\n value === 'pending' || value === 'success' || value === 'cod' || value === 'failed'\n\nconst isRefundStatus = (value: string): value is RefundStatus =>\n value === 'success' || value === 'pending' || value === 'failed' || value === 'none' || value === 'na' || value === 'processed'\n\ntype OrderStatusRow = InferSelectModel\n\nconst mapOrderStatusRecord = (record: OrderStatusRow): AdminOrderStatusRecord => ({\n id: record.id,\n orderTime: record.orderTime,\n userId: record.userId,\n orderId: record.orderId,\n isPackaged: record.isPackaged,\n isDelivered: record.isDelivered,\n isCancelled: record.isCancelled,\n cancelReason: record.cancelReason ?? null,\n isCancelledByAdmin: record.isCancelledByAdmin ?? null,\n paymentStatus: isPaymentStatus(record.paymentStatus) ? record.paymentStatus : 'pending',\n cancellationUserNotes: record.cancellationUserNotes ?? null,\n cancellationAdminNotes: record.cancellationAdminNotes ?? null,\n cancellationReviewed: record.cancellationReviewed,\n cancellationReviewedAt: record.cancellationReviewedAt ?? null,\n refundCouponId: record.refundCouponId ?? null,\n})\n\nexport async function updateOrderNotes(orderId: number, adminNotes: string | null): Promise {\n const [result] = await db\n .update(orders)\n .set({ adminNotes })\n .where(eq(orders.id, orderId))\n .returning()\n return (result || null) as AdminOrderRow | null\n}\n\nexport async function updateOrderPackaged(orderId: string, isPackaged: boolean): Promise {\n const orderIdNumber = parseInt(orderId)\n\n await db\n .update(orderItems)\n .set({ is_packaged: isPackaged })\n .where(eq(orderItems.orderId, orderIdNumber))\n\n if (!isPackaged) {\n await db\n .update(orderStatus)\n .set({ isPackaged, isDelivered: false })\n .where(eq(orderStatus.orderId, orderIdNumber))\n } else {\n await db\n .update(orderStatus)\n .set({ isPackaged })\n .where(eq(orderStatus.orderId, orderIdNumber))\n }\n\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderIdNumber),\n })\n\n return { success: true, userId: order?.userId ?? null }\n}\n\nexport async function updateOrderDelivered(orderId: string, isDelivered: boolean): Promise {\n const orderIdNumber = parseInt(orderId)\n\n await db\n .update(orderStatus)\n .set({ isDelivered })\n .where(eq(orderStatus.orderId, orderIdNumber))\n\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderIdNumber),\n })\n\n return { success: true, userId: order?.userId ?? null }\n}\n\nexport async function getOrderDetails(orderId: number): Promise {\n // Single optimized query with all relations\n const orderData = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n payment: true,\n paymentInfo: true,\n orderStatus: true,\n refunds: true,\n },\n })\n\n if (!orderData) {\n return null\n }\n\n const couponUsageData = await db.query.couponUsage.findMany({\n where: eq(couponUsage.orderId, orderData.id),\n with: {\n coupon: true,\n },\n })\n\n let couponData = null\n if (couponUsageData.length > 0) {\n let totalDiscountAmount = 0\n const orderTotal = parseFloat((orderData.totalAmount ?? '0').toString())\n\n for (const usage of couponUsageData) {\n let discountAmount = 0\n\n if (usage.coupon.discountPercent) {\n discountAmount =\n (orderTotal * parseFloat(usage.coupon.discountPercent.toString())) /\n 100\n } else if (usage.coupon.flatDiscount) {\n discountAmount = parseFloat(usage.coupon.flatDiscount.toString())\n }\n\n if (\n usage.coupon.maxValue &&\n discountAmount > parseFloat(usage.coupon.maxValue.toString())\n ) {\n discountAmount = parseFloat(usage.coupon.maxValue.toString())\n }\n\n totalDiscountAmount += discountAmount\n }\n\n couponData = {\n couponCode: couponUsageData.map((u: any) => u.coupon.couponCode).join(', '),\n couponDescription: `${couponUsageData.length} coupons applied`,\n discountAmount: totalDiscountAmount,\n }\n }\n\n const statusRecord = orderData.orderStatus?.[0]\n const orderStatusRecord = statusRecord ? mapOrderStatusRecord(statusRecord) : null\n let status: 'pending' | 'delivered' | 'cancelled' = 'pending'\n if (orderStatusRecord?.isCancelled) {\n status = 'cancelled'\n } else if (orderStatusRecord?.isDelivered) {\n status = 'delivered'\n }\n\n const refund = orderData.refunds?.[0]\n const refundStatus = refund?.refundStatus && isRefundStatus(refund.refundStatus)\n ? refund.refundStatus\n : null\n const refundRecord: AdminRefundRecord | null = refund\n ? {\n id: refund.id,\n orderId: refund.orderId,\n refundAmount: refund.refundAmount,\n refundStatus,\n merchantRefundId: refund.merchantRefundId,\n refundProcessedAt: refund.refundProcessedAt,\n createdAt: refund.createdAt,\n }\n : null\n\n return {\n id: orderData.id,\n readableId: orderData.id,\n userId: orderData.user.id,\n customerName: `${orderData.user.name}`,\n customerEmail: orderData.user.email,\n customerMobile: orderData.user.mobile,\n address: {\n name: orderData.address.name,\n line1: orderData.address.addressLine1,\n line2: orderData.address.addressLine2,\n city: orderData.address.city,\n state: orderData.address.state,\n pincode: orderData.address.pincode,\n phone: orderData.address.phone,\n },\n slotInfo: orderData.slot\n ? {\n time: orderData.slot.deliveryTime.toISOString(),\n sequence: orderData.slot.deliverySequence,\n }\n : null,\n isCod: orderData.isCod,\n isOnlinePayment: orderData.isOnlinePayment,\n totalAmount:\n parseFloat(orderData.totalAmount?.toString() || '0') -\n parseFloat(orderData.deliveryCharge?.toString() || '0'),\n deliveryCharge: parseFloat(orderData.deliveryCharge?.toString() || '0'),\n adminNotes: orderData.adminNotes,\n userNotes: orderData.userNotes,\n createdAt: orderData.createdAt,\n status,\n isPackaged: orderStatusRecord?.isPackaged || false,\n isDelivered: orderStatusRecord?.isDelivered || false,\n items: orderData.orderItems.map((item: any) => ({\n id: item.id,\n name: item.product.name,\n quantity: item.quantity,\n productSize: item.product.productQuantity,\n price: item.price,\n unit: item.product.unit?.shortNotation,\n amount: parseFloat(item.price.toString()) * parseFloat(item.quantity || '0'),\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n })),\n payment: orderData.payment\n ? {\n status: orderData.payment.status,\n gateway: orderData.payment.gateway,\n merchantOrderId: orderData.payment.merchantOrderId,\n }\n : null,\n paymentInfo: orderData.paymentInfo\n ? {\n status: orderData.paymentInfo.status,\n gateway: orderData.paymentInfo.gateway,\n merchantOrderId: orderData.paymentInfo.merchantOrderId,\n }\n : null,\n cancelReason: orderStatusRecord?.cancelReason || null,\n cancellationReviewed: orderStatusRecord?.cancellationReviewed || false,\n isRefundDone: refundStatus === 'processed' || false,\n refundStatus,\n refundAmount: refund?.refundAmount\n ? parseFloat(refund.refundAmount.toString())\n : null,\n couponData,\n couponCode: couponData?.couponCode || null,\n couponDescription: couponData?.couponDescription || null,\n discountAmount: couponData?.discountAmount || null,\n orderStatus: orderStatusRecord,\n refundRecord,\n isFlashDelivery: orderData.isFlashDelivery,\n }\n}\n\nexport async function updateOrderItemPackaging(\n orderItemId: number,\n isPackaged?: boolean,\n isPackageVerified?: boolean\n): Promise {\n const orderItem = await db.query.orderItems.findFirst({\n where: eq(orderItems.id, orderItemId),\n })\n\n if (!orderItem) {\n return { success: false, updated: false }\n }\n\n const updateData: Partial<{\n is_packaged: boolean\n is_package_verified: boolean\n }> = {}\n\n if (isPackaged !== undefined) {\n updateData.is_packaged = isPackaged\n }\n if (isPackageVerified !== undefined) {\n updateData.is_package_verified = isPackageVerified\n }\n\n await db\n .update(orderItems)\n .set(updateData)\n .where(eq(orderItems.id, orderItemId))\n\n return { success: true, updated: true }\n}\n\nexport async function removeDeliveryCharge(orderId: number): Promise {\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n })\n\n if (!order) {\n return null\n }\n\n const currentDeliveryCharge = parseFloat(order.deliveryCharge?.toString() || '0')\n const currentTotalAmount = parseFloat(order.totalAmount?.toString() || '0')\n const newTotalAmount = currentTotalAmount - currentDeliveryCharge\n\n await db\n .update(orders)\n .set({\n deliveryCharge: '0',\n totalAmount: newTotalAmount.toString(),\n })\n .where(eq(orders.id, orderId))\n\n return { success: true, message: 'Delivery charge removed' }\n}\n\nexport async function getSlotOrders(slotId: string): Promise {\n const slotOrders = await db.query.orders.findMany({\n where: eq(orders.slotId, parseInt(slotId)),\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n },\n })\n\n const filteredOrders = slotOrders.filter((order: any) => {\n const statusRecord = order.orderStatus[0]\n return order.isCod || (statusRecord && statusRecord.paymentStatus === 'success')\n })\n\n const formattedOrders = filteredOrders.map((order: any) => {\n const statusRecord = order.orderStatus[0]\n let status: 'pending' | 'delivered' | 'cancelled' = 'pending'\n if (statusRecord?.isCancelled) {\n status = 'cancelled'\n } else if (statusRecord?.isDelivered) {\n status = 'delivered'\n }\n\n const items = order.orderItems.map((item: any) => ({\n id: item.id,\n name: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n amount: parseFloat(item.quantity) * parseFloat(item.price.toString()),\n unit: item.product.unit?.shortNotation || '',\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n }))\n\n const paymentMode: 'COD' | 'Online' = order.isCod ? 'COD' : 'Online'\n\n return {\n id: order.id,\n readableId: order.id,\n customerName: order.user.name || order.user.mobile+'',\n address: `${order.address.addressLine1}${\n order.address.addressLine2 ? `, ${order.address.addressLine2}` : ''\n }, ${order.address.city}, ${order.address.state} - ${\n order.address.pincode\n }, Phone: ${order.address.phone}`,\n addressId: order.addressId,\n latitude: order.address.adminLatitude ?? order.address.latitude,\n longitude: order.address.adminLongitude ?? order.address.longitude,\n totalAmount: parseFloat(order.totalAmount),\n items,\n deliveryTime: order.slot?.deliveryTime.toISOString() || null,\n status,\n isPackaged: order.orderItems.every((item: any) => item.is_packaged) || false,\n isDelivered: statusRecord?.isDelivered || false,\n isCod: order.isCod,\n paymentMode,\n paymentStatus: isPaymentStatus(statusRecord?.paymentStatus || 'pending')\n ? statusRecord?.paymentStatus || 'pending'\n : 'pending',\n slotId: order.slotId,\n adminNotes: order.adminNotes,\n userNotes: order.userNotes,\n }\n })\n\n return { success: true, data: formattedOrders }\n}\n\nexport async function updateAddressCoords(\n addressId: number,\n latitude: number,\n longitude: number\n): Promise {\n const result = await db\n .update(addresses)\n .set({\n adminLatitude: latitude,\n adminLongitude: longitude,\n })\n .where(eq(addresses.id, addressId))\n .returning()\n\n return { success: result.length > 0 }\n}\n\ntype GetAllOrdersInput = {\n cursor?: number\n limit: number\n slotId?: number | null\n packagedFilter?: 'all' | 'packaged' | 'not_packaged'\n deliveredFilter?: 'all' | 'delivered' | 'not_delivered'\n cancellationFilter?: 'all' | 'cancelled' | 'not_cancelled'\n flashDeliveryFilter?: 'all' | 'flash' | 'regular'\n}\n\nexport async function getAllOrders(input: GetAllOrdersInput): Promise {\n const {\n cursor,\n limit,\n slotId,\n packagedFilter,\n deliveredFilter,\n cancellationFilter,\n flashDeliveryFilter,\n } = input\n\n let whereCondition: SQL | undefined = eq(orders.id, orders.id)\n if (cursor) {\n whereCondition = and(whereCondition, lt(orders.id, cursor))\n }\n if (slotId) {\n whereCondition = and(whereCondition, eq(orders.slotId, slotId))\n }\n if (packagedFilter === 'packaged') {\n whereCondition = and(whereCondition, eq(orderStatus.isPackaged, true))\n } else if (packagedFilter === 'not_packaged') {\n whereCondition = and(whereCondition, eq(orderStatus.isPackaged, false))\n }\n if (deliveredFilter === 'delivered') {\n whereCondition = and(whereCondition, eq(orderStatus.isDelivered, true))\n } else if (deliveredFilter === 'not_delivered') {\n whereCondition = and(whereCondition, eq(orderStatus.isDelivered, false))\n }\n if (cancellationFilter === 'cancelled') {\n whereCondition = and(whereCondition, eq(orderStatus.isCancelled, true))\n } else if (cancellationFilter === 'not_cancelled') {\n whereCondition = and(whereCondition, eq(orderStatus.isCancelled, false))\n }\n if (flashDeliveryFilter === 'flash') {\n whereCondition = and(whereCondition, eq(orders.isFlashDelivery, true))\n } else if (flashDeliveryFilter === 'regular') {\n whereCondition = and(whereCondition, eq(orders.isFlashDelivery, false))\n }\n\n const allOrders = await db.query.orders.findMany({\n where: whereCondition,\n orderBy: desc(orders.createdAt),\n limit: limit + 1,\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n },\n })\n\n const hasMore = allOrders.length > limit\n const ordersToReturn = hasMore ? allOrders.slice(0, limit) : allOrders\n\n const filteredOrders = ordersToReturn.filter((order: any) => {\n const statusRecord = order.orderStatus[0]\n return order.isCod || (statusRecord && statusRecord.paymentStatus === 'success')\n })\n\n const formattedOrders = filteredOrders.map((order: any) => {\n const statusRecord = order.orderStatus[0]\n let status: 'pending' | 'delivered' | 'cancelled' = 'pending'\n if (statusRecord?.isCancelled) {\n status = 'cancelled'\n } else if (statusRecord?.isDelivered) {\n status = 'delivered'\n }\n\n const items = order.orderItems\n .map((item: any) => ({\n id: item.id,\n name: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n amount: parseFloat(item.quantity) * parseFloat(item.price.toString()),\n unit: item.product.unit?.shortNotation || '',\n productSize: item.product.productQuantity,\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n }))\n .sort((first: any, second: any) => first.id - second.id)\n\n return {\n id: order.id,\n orderId: order.id.toString(),\n readableId: order.id,\n customerName: order.user.name || order.user.mobile + '',\n customerMobile: order.user.mobile,\n address: `${order.address.addressLine1}${\n order.address.addressLine2 ? `, ${order.address.addressLine2}` : ''\n }, ${order.address.city}, ${order.address.state} - ${\n order.address.pincode\n }, Phone: ${order.address.phone}`,\n addressId: order.addressId,\n latitude: order.address.adminLatitude ?? order.address.latitude,\n longitude: order.address.adminLongitude ?? order.address.longitude,\n totalAmount: parseFloat(order.totalAmount),\n deliveryCharge: parseFloat(order.deliveryCharge || '0'),\n items,\n createdAt: order.createdAt,\n deliveryTime: order.slot?.deliveryTime.toISOString() || null,\n status,\n isPackaged: order.orderItems.every((item: any) => item.is_packaged) || false,\n isDelivered: statusRecord?.isDelivered || false,\n isCod: order.isCod,\n isFlashDelivery: order.isFlashDelivery,\n userNotes: order.userNotes,\n adminNotes: order.adminNotes,\n userNegativityScore: 0,\n userId: order.userId,\n }\n })\n\n return {\n orders: formattedOrders,\n nextCursor: hasMore ? ordersToReturn[ordersToReturn.length - 1].id : undefined,\n }\n}\n\nexport async function rebalanceSlots(slotIds: number[]): Promise {\n const ordersList = await db.query.orders.findMany({\n where: inArray(orders.slotId, slotIds),\n with: {\n orderItems: {\n with: {\n product: true,\n },\n },\n couponUsages: {\n with: {\n coupon: true,\n },\n },\n },\n })\n\n const processedOrdersData = ordersList.map((order: any) => {\n let newTotal = order.orderItems.reduce((acc: number, item: any) => {\n const latestPrice = +item.product.price\n const amount = latestPrice * Number(item.quantity)\n return acc + amount\n }, 0)\n\n order.orderItems.forEach((item: any) => {\n item.price = item.product.price\n item.discountedPrice = item.product.price\n })\n\n const coupon = order.couponUsages[0]?.coupon\n\n let discount = 0\n if (coupon && !coupon.isInvalidated && (!coupon.validTill || new Date(coupon.validTill) > new Date())) {\n const proportion = Number(order.orderGroupProportion || 1)\n if (coupon.discountPercent) {\n const maxDiscount = Number(coupon.maxValue || Infinity) * proportion\n discount = Math.min((newTotal * parseFloat(coupon.discountPercent)) / 100, maxDiscount)\n } else {\n discount = Number(coupon.flatDiscount) * proportion\n }\n }\n newTotal -= discount\n\n const { couponUsages, orderItems: orderItemsRaw, ...rest } = order\n const updatedOrderItems = orderItemsRaw.map((item: any) => {\n const { product, ...rawOrderItem } = item\n return rawOrderItem\n })\n return { order: rest, updatedOrderItems, newTotal }\n })\n\n const updatedOrderIds: number[] = []\n await db.transaction(async (tx) => {\n for (const { order, updatedOrderItems, newTotal } of processedOrdersData) {\n await tx.update(orders).set({ totalAmount: newTotal.toString() }).where(eq(orders.id, order.id))\n updatedOrderIds.push(order.id)\n\n for (const item of updatedOrderItems) {\n await tx\n .update(orderItems)\n .set({\n price: item.price,\n discountedPrice: item.discountedPrice,\n })\n .where(eq(orderItems.id, item.id))\n }\n }\n })\n\n return {\n success: true,\n updatedOrders: updatedOrderIds,\n message: `Rebalanced ${updatedOrderIds.length} orders.`,\n }\n}\n\nexport async function cancelOrder(orderId: number, reason: string): Promise {\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n orderStatus: true,\n },\n })\n\n if (!order) {\n return { success: false, message: 'Order not found', error: 'order_not_found' }\n }\n\n const status = order.orderStatus[0]\n if (!status) {\n return { success: false, message: 'Order status not found', error: 'status_not_found' }\n }\n\n if (status.isCancelled) {\n return { success: false, message: 'Order is already cancelled', error: 'already_cancelled' }\n }\n\n if (status.isDelivered) {\n return { success: false, message: 'Cannot cancel delivered order', error: 'already_delivered' }\n }\n\n const result = await db.transaction(async (tx) => {\n await tx\n .update(orderStatus)\n .set({\n isCancelled: true,\n isCancelledByAdmin: true,\n cancelReason: reason,\n cancellationAdminNotes: reason,\n cancellationReviewed: true,\n cancellationReviewedAt: new Date(),\n })\n .where(eq(orderStatus.id, status.id))\n\n const refundStatus = order.isCod ? 'na' : 'pending'\n\n await tx.insert(refunds).values({\n orderId: order.id,\n refundStatus,\n })\n\n return { orderId: order.id, userId: order.userId }\n })\n\n return {\n success: true,\n message: 'Order cancelled successfully',\n orderId: result.orderId,\n userId: result.userId,\n }\n}\n\nexport async function deleteOrderById(orderId: number): Promise {\n await db.transaction(async (tx) => {\n await tx.delete(orderItems).where(eq(orderItems.orderId, orderId))\n await tx.delete(orderStatus).where(eq(orderStatus.orderId, orderId))\n await tx.delete(payments).where(eq(payments.orderId, orderId))\n await tx.delete(refunds).where(eq(refunds.orderId, orderId))\n await tx.delete(couponUsage).where(eq(couponUsage.orderId, orderId))\n await tx.delete(complaints).where(eq(complaints.orderId, orderId))\n await tx.delete(orders).where(eq(orders.id, orderId))\n })\n}\n", "import { db } from '../db/db_index'\nimport {\n productInfo,\n units,\n specialDeals,\n productSlots,\n productTags,\n productReviews,\n productGroupInfo,\n productGroupMembership,\n productTagInfo,\n users,\n storeInfo,\n} from '../db/schema'\nimport { and, desc, eq, inArray, sql } from 'drizzle-orm'\nimport type { InferInsertModel, InferSelectModel } from 'drizzle-orm'\nimport type {\n AdminProduct,\n AdminProductGroupInfo,\n AdminProductTagInfo,\n AdminProductTagWithProducts,\n AdminProductReview,\n AdminProductWithDetails,\n AdminProductWithRelations,\n AdminSpecialDeal,\n AdminUnit,\n AdminUpdateSlotProductsResult,\n Store,\n} from '@packages/shared'\n\ntype ProductRow = InferSelectModel\ntype UnitRow = InferSelectModel\ntype StoreRow = InferSelectModel\ntype SpecialDealRow = InferSelectModel\ntype ProductTagInfoRow = InferSelectModel\ntype ProductTagRow = InferSelectModel\ntype ProductGroupRow = InferSelectModel\ntype ProductGroupMembershipRow = InferSelectModel\ntype ProductReviewRow = InferSelectModel\n\nconst getStringArray = (value: unknown): string[] | null => {\n if (!Array.isArray(value)) return null\n return value.map((item) => String(item))\n}\n\nconst mapUnit = (unit: UnitRow): AdminUnit => ({\n id: unit.id,\n shortNotation: unit.shortNotation,\n fullName: unit.fullName,\n})\n\nconst mapStore = (store: StoreRow): Store => ({\n id: store.id,\n name: store.name,\n description: store.description,\n imageUrl: store.imageUrl,\n owner: store.owner,\n createdAt: store.createdAt,\n // updatedAt: store.createdAt,\n})\n\nconst mapProduct = (product: ProductRow): AdminProduct => ({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription ?? null,\n longDescription: product.longDescription ?? null,\n unitId: product.unitId,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n images: getStringArray(product.images),\n imageKeys: getStringArray(product.images),\n isOutOfStock: product.isOutOfStock,\n isSuspended: product.isSuspended,\n isFlashAvailable: product.isFlashAvailable,\n flashPrice: product.flashPrice ? String(product.flashPrice) : null,\n createdAt: product.createdAt,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n storeId: product.storeId,\n})\n\nconst mapSpecialDeal = (deal: SpecialDealRow): AdminSpecialDeal => ({\n id: deal.id,\n productId: deal.productId,\n quantity: String(deal.quantity ?? '0'),\n price: String(deal.price ?? '0'),\n validTill: deal.validTill,\n})\n\nconst mapTagInfo = (tag: ProductTagInfoRow): AdminProductTagInfo => ({\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription ?? null,\n imageUrl: tag.imageUrl ?? null,\n isDashboardTag: tag.isDashboardTag,\n relatedStores: tag.relatedStores,\n createdAt: tag.createdAt,\n})\n\nexport async function getAllProducts(): Promise {\n type ProductWithRelationsRow = ProductRow & { unit: UnitRow; store: StoreRow | null }\n const products = await db.query.productInfo.findMany({\n orderBy: productInfo.name,\n with: {\n unit: true,\n store: true,\n },\n }) as ProductWithRelationsRow[]\n\n return products.map((product) => ({\n ...mapProduct(product),\n unit: mapUnit(product.unit),\n store: product.store ? mapStore(product.store) : null,\n }))\n}\n\nexport async function getProductById(id: number): Promise {\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, id),\n with: {\n unit: true,\n },\n })\n\n if (!product) {\n return null\n }\n\n const deals = await db.query.specialDeals.findMany({\n where: eq(specialDeals.productId, id),\n orderBy: specialDeals.quantity,\n })\n\n const productTagsData = await db.query.productTags.findMany({\n where: eq(productTags.productId, id),\n with: {\n tag: true,\n },\n }) as Array\n\n return {\n ...mapProduct(product),\n unit: mapUnit(product.unit),\n deals: deals.map(mapSpecialDeal),\n tags: productTagsData.map((tag) => mapTagInfo(tag.tag)),\n }\n}\n\nexport async function deleteProduct(id: number): Promise {\n const [deletedProduct] = await db\n .delete(productInfo)\n .where(eq(productInfo.id, id))\n .returning()\n\n if (!deletedProduct) {\n return null\n }\n\n return mapProduct(deletedProduct)\n}\n\ntype ProductInfoInsert = InferInsertModel\ntype ProductInfoUpdate = Partial\n\nexport async function createProduct(input: ProductInfoInsert): Promise {\n const [product] = await db.insert(productInfo).values(input).returning()\n return mapProduct(product)\n}\n\nexport async function updateProduct(id: number, updates: ProductInfoUpdate): Promise {\n const [product] = await db.update(productInfo)\n .set(updates)\n .where(eq(productInfo.id, id))\n .returning()\n if (!product) {\n return null\n }\n\n return mapProduct(product)\n}\n\nexport async function toggleProductOutOfStock(id: number): Promise {\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, id),\n })\n\n if (!product) {\n return null\n }\n\n const [updatedProduct] = await db\n .update(productInfo)\n .set({\n isOutOfStock: !product.isOutOfStock,\n })\n .where(eq(productInfo.id, id))\n .returning()\n\n if (!updatedProduct) {\n return null\n }\n\n return mapProduct(updatedProduct)\n}\n\nexport async function updateSlotProducts(slotId: string, productIds: string[]): Promise {\n const currentAssociations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, parseInt(slotId)),\n columns: {\n productId: true,\n },\n }) as Array<{ productId: number }>\n\n const currentProductIds = currentAssociations.map((assoc: { productId: number }) => assoc.productId)\n const newProductIds = productIds.map((id: string) => parseInt(id))\n\n const productsToAdd = newProductIds.filter((id: number) => !currentProductIds.includes(id))\n const productsToRemove = currentProductIds.filter((id: number) => !newProductIds.includes(id))\n\n if (productsToRemove.length > 0) {\n await db.delete(productSlots).where(\n and(\n eq(productSlots.slotId, parseInt(slotId)),\n inArray(productSlots.productId, productsToRemove)\n )\n )\n }\n\n if (productsToAdd.length > 0) {\n const newAssociations = productsToAdd.map((productId) => ({\n productId,\n slotId: parseInt(slotId),\n }))\n\n await db.insert(productSlots).values(newAssociations)\n }\n\n return {\n message: 'Slot products updated successfully',\n added: productsToAdd.length,\n removed: productsToRemove.length,\n }\n}\n\nexport async function getSlotProductIds(slotId: string): Promise {\n const associations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, parseInt(slotId)),\n columns: {\n productId: true,\n },\n })\n\n return associations.map((assoc: { productId: number }) => assoc.productId)\n}\n\nexport async function getAllUnits(): Promise {\n const allUnits = await db.query.units.findMany({\n orderBy: units.shortNotation,\n })\n\n return allUnits.map(mapUnit)\n}\n\nexport async function getAllProductTags(): Promise {\n const tags = await db.query.productTagInfo.findMany({\n with: {\n products: {\n with: {\n product: true,\n },\n },\n },\n }) as Array }>\n\n return tags.map((tag: ProductTagInfoRow & { products: Array }) => ({\n ...mapTagInfo(tag),\n products: tag.products.map((assignment: ProductTagRow & { product: ProductRow }) => ({\n productId: assignment.productId,\n tagId: assignment.tagId,\n assignedAt: assignment.assignedAt,\n product: mapProduct(assignment.product),\n })),\n }))\n}\n\nexport async function getAllProductTagInfos(): Promise {\n const tags = await db.query.productTagInfo.findMany({\n orderBy: productTagInfo.tagName,\n })\n\n return tags.map(mapTagInfo)\n}\n\nexport async function getProductTagInfoById(tagId: number): Promise {\n const tag = await db.query.productTagInfo.findFirst({\n where: eq(productTagInfo.id, tagId),\n })\n\n if (!tag) {\n return null\n }\n\n return mapTagInfo(tag)\n}\n\nexport interface CreateProductTagInput {\n tagName: string\n tagDescription?: string | null\n imageUrl?: string | null\n isDashboardTag?: boolean\n relatedStores?: number[]\n}\n\nexport async function createProductTag(input: CreateProductTagInput): Promise {\n const [tag] = await db.insert(productTagInfo).values({\n tagName: input.tagName,\n tagDescription: input.tagDescription || null,\n imageUrl: input.imageUrl || null,\n isDashboardTag: input.isDashboardTag || false,\n relatedStores: input.relatedStores || [],\n }).returning()\n\n return {\n ...mapTagInfo(tag),\n products: [],\n }\n}\n\nexport async function getProductTagById(tagId: number): Promise {\n const tag = await db.query.productTagInfo.findFirst({\n where: eq(productTagInfo.id, tagId),\n with: {\n products: {\n with: {\n product: true,\n },\n },\n },\n })\n\n if (!tag) {\n return null\n }\n\n return {\n ...mapTagInfo(tag),\n products: tag.products.map((assignment: ProductTagRow & { product: ProductRow }) => ({\n productId: assignment.productId,\n tagId: assignment.tagId,\n assignedAt: assignment.assignedAt,\n product: mapProduct(assignment.product),\n })),\n }\n}\n\nexport interface UpdateProductTagInput {\n tagName?: string\n tagDescription?: string | null\n imageUrl?: string | null\n isDashboardTag?: boolean\n relatedStores?: number[]\n}\n\nexport async function updateProductTag(tagId: number, input: UpdateProductTagInput): Promise {\n const [tag] = await db.update(productTagInfo).set({\n ...(input.tagName !== undefined && { tagName: input.tagName }),\n ...(input.tagDescription !== undefined && { tagDescription: input.tagDescription }),\n ...(input.imageUrl !== undefined && { imageUrl: input.imageUrl }),\n ...(input.isDashboardTag !== undefined && { isDashboardTag: input.isDashboardTag }),\n ...(input.relatedStores !== undefined && { relatedStores: input.relatedStores }),\n }).where(eq(productTagInfo.id, tagId)).returning()\n\n const fullTag = await db.query.productTagInfo.findFirst({\n where: eq(productTagInfo.id, tagId),\n with: {\n products: {\n with: {\n product: true,\n },\n },\n },\n })\n\n return {\n ...mapTagInfo(tag),\n products: fullTag?.products.map((assignment: ProductTagRow & { product: ProductRow }) => ({\n productId: assignment.productId,\n tagId: assignment.tagId,\n assignedAt: assignment.assignedAt,\n product: mapProduct(assignment.product),\n })) || [],\n }\n}\n\nexport async function deleteProductTag(tagId: number): Promise {\n await db.delete(productTagInfo).where(eq(productTagInfo.id, tagId))\n}\n\nexport async function checkProductTagExistsByName(tagName: string): Promise {\n const tag = await db.query.productTagInfo.findFirst({\n where: eq(productTagInfo.tagName, tagName),\n })\n return !!tag\n}\n\nexport async function getSlotsProductIds(slotIds: number[]): Promise> {\n if (slotIds.length === 0) {\n return {}\n }\n\n const associations = await db.query.productSlots.findMany({\n where: inArray(productSlots.slotId, slotIds),\n columns: {\n slotId: true,\n productId: true,\n },\n }) as Array<{ slotId: number; productId: number }>\n\n const result: Record = {}\n for (const assoc of associations) {\n if (!result[assoc.slotId]) {\n result[assoc.slotId] = []\n }\n result[assoc.slotId].push(assoc.productId)\n }\n\n slotIds.forEach((slotId) => {\n if (!result[slotId]) {\n result[slotId] = []\n }\n })\n\n return result\n}\n\nexport async function getProductReviews(productId: number, limit: number, offset: number) {\n const reviews = await db\n .select({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n adminResponse: productReviews.adminResponse,\n adminResponseImages: productReviews.adminResponseImages,\n userName: users.name,\n })\n .from(productReviews)\n .innerJoin(users, eq(productReviews.userId, users.id))\n .where(eq(productReviews.productId, productId))\n .orderBy(desc(productReviews.reviewTime))\n .limit(limit)\n .offset(offset)\n\n const totalCountResult = await db\n .select({ count: sql`count(*)` })\n .from(productReviews)\n .where(eq(productReviews.productId, productId))\n\n const totalCount = Number(totalCountResult[0].count)\n\n const mappedReviews: AdminProductReview[] = reviews.map((review: any) => ({\n id: review.id,\n reviewBody: review.reviewBody,\n ratings: review.ratings,\n imageUrls: review.imageUrls,\n reviewTime: review.reviewTime,\n adminResponse: review.adminResponse ?? null,\n adminResponseImages: review.adminResponseImages,\n userName: review.userName ?? null,\n }))\n\n return {\n reviews: mappedReviews,\n totalCount,\n }\n}\n\nexport async function respondToReview(\n reviewId: number,\n adminResponse: string | undefined,\n adminResponseImages: string[]\n): Promise {\n const [updatedReview] = await db\n .update(productReviews)\n .set({\n adminResponse,\n adminResponseImages,\n })\n .where(eq(productReviews.id, reviewId))\n .returning()\n\n if (!updatedReview) {\n return null\n }\n\n return {\n id: updatedReview.id,\n reviewBody: updatedReview.reviewBody,\n ratings: updatedReview.ratings,\n imageUrls: updatedReview.imageUrls,\n reviewTime: updatedReview.reviewTime,\n adminResponse: updatedReview.adminResponse ?? null,\n adminResponseImages: updatedReview.adminResponseImages,\n userName: null,\n }\n}\n\nexport async function getAllProductGroups() {\n const groups = await db.query.productGroupInfo.findMany({\n with: {\n memberships: {\n with: {\n product: true,\n },\n },\n },\n orderBy: desc(productGroupInfo.createdAt),\n })\n\n return groups.map((group: any) => ({\n id: group.id,\n groupName: group.groupName,\n description: group.description ?? null,\n createdAt: group.createdAt,\n products: group.memberships.map((membership: any) => mapProduct(membership.product)),\n productCount: group.memberships.length,\n memberships: group.memberships\n }))\n}\n\nexport async function createProductGroup(\n groupName: string,\n description: string | undefined,\n productIds: number[]\n): Promise {\n const [newGroup] = await db\n .insert(productGroupInfo)\n .values({\n groupName,\n description,\n })\n .returning()\n\n if (productIds.length > 0) {\n const memberships = productIds.map((productId) => ({\n productId,\n groupId: newGroup.id,\n }))\n\n await db.insert(productGroupMembership).values(memberships)\n }\n\n return {\n id: newGroup.id,\n groupName: newGroup.groupName,\n description: newGroup.description ?? null,\n createdAt: newGroup.createdAt,\n }\n}\n\nexport async function updateProductGroup(\n id: number,\n groupName: string | undefined,\n description: string | undefined,\n productIds: number[] | undefined\n): Promise {\n const updateData: Partial<{\n groupName: string\n description: string | null\n }> = {}\n\n if (groupName !== undefined) updateData.groupName = groupName\n if (description !== undefined) updateData.description = description\n\n const [updatedGroup] = await db\n .update(productGroupInfo)\n .set(updateData)\n .where(eq(productGroupInfo.id, id))\n .returning()\n\n if (!updatedGroup) {\n return null\n }\n\n if (productIds !== undefined) {\n await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id))\n\n if (productIds.length > 0) {\n const memberships = productIds.map((productId) => ({\n productId,\n groupId: id,\n }))\n\n await db.insert(productGroupMembership).values(memberships)\n }\n }\n\n return {\n id: updatedGroup.id,\n groupName: updatedGroup.groupName,\n description: updatedGroup.description ?? null,\n createdAt: updatedGroup.createdAt,\n }\n}\n\nexport async function deleteProductGroup(id: number): Promise {\n await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id))\n\n const [deletedGroup] = await db\n .delete(productGroupInfo)\n .where(eq(productGroupInfo.id, id))\n .returning()\n\n if (!deletedGroup) {\n return null\n }\n\n return {\n id: deletedGroup.id,\n groupName: deletedGroup.groupName,\n description: deletedGroup.description ?? null,\n createdAt: deletedGroup.createdAt,\n }\n}\n\nexport async function addProductToGroup(groupId: number, productId: number): Promise {\n await db.insert(productGroupMembership).values({ groupId, productId })\n}\n\nexport async function removeProductFromGroup(groupId: number, productId: number): Promise {\n await db.delete(productGroupMembership)\n .where(and(\n eq(productGroupMembership.groupId, groupId),\n eq(productGroupMembership.productId, productId)\n ))\n}\n\nexport async function updateProductPrices(updates: Array<{\n productId: number\n price?: number\n marketPrice?: number | null\n flashPrice?: number | null\n isFlashAvailable?: boolean\n}>) {\n if (updates.length === 0) {\n return { updatedCount: 0, invalidIds: [] }\n }\n\n const productIds = updates.map((update) => update.productId)\n const existingProducts = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, productIds),\n columns: { id: true },\n }) as Array<{ id: number }>\n\n const existingIds = new Set(existingProducts.map((product: { id: number }) => product.id))\n const invalidIds = productIds.filter((id) => !existingIds.has(id))\n\n if (invalidIds.length > 0) {\n return { updatedCount: 0, invalidIds }\n }\n\n const updatePromises = updates.map((update) => {\n const { productId, price, marketPrice, flashPrice, isFlashAvailable } = update\n const updateData: Partial> = {}\n\n if (price !== undefined) updateData.price = price.toString()\n if (marketPrice !== undefined) updateData.marketPrice = marketPrice === null ? null : marketPrice.toString()\n if (flashPrice !== undefined) updateData.flashPrice = flashPrice === null ? null : flashPrice.toString()\n if (isFlashAvailable !== undefined) updateData.isFlashAvailable = isFlashAvailable\n\n return db\n .update(productInfo)\n .set(updateData)\n .where(eq(productInfo.id, productId))\n })\n\n await Promise.all(updatePromises)\n\n return { updatedCount: updates.length, invalidIds: [] }\n}\n\n\n// ==========================================================================\n// Product Helpers for Admin Controller\n// ==========================================================================\n\nexport async function checkProductExistsByName(name: string): Promise {\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.name, name),\n columns: { id: true },\n })\n\n return !!product\n}\n\nexport async function checkUnitExists(unitId: number): Promise {\n const unit = await db.query.units.findFirst({\n where: eq(units.id, unitId),\n columns: { id: true },\n })\n\n return !!unit\n}\n\nexport async function getProductImagesById(productId: number): Promise {\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n columns: { images: true },\n })\n\n if (!product) {\n return null\n }\n\n return getStringArray(product.images) || []\n}\n\nexport interface CreateSpecialDealInput {\n quantity: number\n price: number\n validTill: string | Date\n}\n\nexport async function createSpecialDealsForProduct(\n productId: number,\n deals: CreateSpecialDealInput[]\n): Promise {\n if (deals.length === 0) {\n return []\n }\n\n const dealInserts = deals.map((deal) => ({\n productId,\n quantity: deal.quantity.toString(),\n price: deal.price.toString(),\n validTill: new Date(deal.validTill),\n }))\n\n const createdDeals = await db\n .insert(specialDeals)\n .values(dealInserts)\n .returning()\n\n return createdDeals.map(mapSpecialDeal)\n}\n\nexport async function updateProductDeals(\n productId: number,\n deals: CreateSpecialDealInput[]\n): Promise {\n if (deals.length === 0) {\n await db.delete(specialDeals).where(eq(specialDeals.productId, productId))\n return\n }\n\n const existingDeals = await db.query.specialDeals.findMany({\n where: eq(specialDeals.productId, productId),\n })\n\n const existingDealsMap = new Map(\n existingDeals.map((deal: SpecialDealRow) => [`${deal.quantity}-${deal.price}`, deal])\n )\n const newDealsMap = new Map(\n deals.map((deal) => [`${deal.quantity}-${deal.price}`, deal])\n )\n\n const dealsToAdd = deals.filter((deal) => {\n const key = `${deal.quantity}-${deal.price}`\n return !existingDealsMap.has(key)\n })\n\n const dealsToRemove = existingDeals.filter((deal: SpecialDealRow) => {\n const key = `${deal.quantity}-${deal.price}`\n return !newDealsMap.has(key)\n })\n\n const dealsToUpdate = deals.filter((deal: CreateSpecialDealInput) => {\n const key = `${deal.quantity}-${deal.price}`\n const existing = existingDealsMap.get(key)\n const nextValidTill = deal.validTill instanceof Date\n ? deal.validTill.toISOString().split('T')[0]\n : String(deal.validTill)\n return existing && existing.validTill.toISOString().split('T')[0] !== nextValidTill\n })\n\n if (dealsToRemove.length > 0) {\n await db.delete(specialDeals).where(\n inArray(specialDeals.id, dealsToRemove.map((deal: SpecialDealRow) => deal.id))\n )\n }\n\n if (dealsToAdd.length > 0) {\n const dealInserts = dealsToAdd.map((deal) => ({\n productId,\n quantity: deal.quantity.toString(),\n price: deal.price.toString(),\n validTill: new Date(deal.validTill),\n }))\n await db.insert(specialDeals).values(dealInserts)\n }\n\n for (const deal of dealsToUpdate) {\n const key = `${deal.quantity}-${deal.price}`\n const existingDeal = existingDealsMap.get(key)\n if (existingDeal) {\n await db.update(specialDeals)\n .set({ validTill: new Date(deal.validTill) })\n .where(eq(specialDeals.id, existingDeal.id))\n }\n }\n}\n\nexport async function replaceProductTags(productId: number, tagIds: number[]): Promise {\n await db.delete(productTags).where(eq(productTags.productId, productId))\n\n if (tagIds.length === 0) {\n return\n }\n\n const tagAssociations = tagIds.map((tagId) => ({\n productId,\n tagId,\n }))\n\n await db.insert(productTags).values(tagAssociations)\n}\n", "import { db } from '../db/db_index'\nimport {\n deliverySlotInfo,\n productSlots,\n productInfo,\n vendorSnippets,\n productGroupInfo,\n} from '../db/schema'\nimport { and, asc, desc, eq, gt, inArray } from 'drizzle-orm'\nimport type {\n AdminDeliverySlot,\n AdminSlotWithProducts,\n AdminSlotWithProductsAndSnippetsBase,\n AdminSlotCreateResult,\n AdminSlotUpdateResult,\n AdminVendorSnippet,\n AdminSlotProductSummary,\n AdminUpdateSlotCapacityResult,\n} from '@packages/shared'\n\ntype SlotSnippetInput = {\n name: string\n productIds: number[]\n validTill?: string\n}\n\nconst getStringArray = (value: unknown): string[] | null => {\n if (!Array.isArray(value)) return null\n return value.map((item) => String(item))\n}\n\nconst getNumberArray = (value: unknown): number[] => {\n if (!Array.isArray(value)) return []\n return value.map((item) => Number(item))\n}\n\nconst mapDeliverySlot = (slot: typeof deliverySlotInfo.$inferSelect): AdminDeliverySlot => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isFlash: slot.isFlash,\n isCapacityFull: slot.isCapacityFull,\n deliverySequence: slot.deliverySequence,\n groupIds: slot.groupIds,\n})\n\nconst mapSlotProductSummary = (product: { id: number; name: string; images: unknown }): AdminSlotProductSummary => ({\n id: product.id,\n name: product.name,\n images: getStringArray(product.images),\n})\n\nconst mapVendorSnippet = (snippet: typeof vendorSnippets.$inferSelect): AdminVendorSnippet => ({\n id: snippet.id,\n snippetCode: snippet.snippetCode,\n slotId: snippet.slotId ?? null,\n productIds: snippet.productIds || [],\n isPermanent: snippet.isPermanent,\n validTill: snippet.validTill ?? null,\n createdAt: snippet.createdAt,\n})\n\nexport async function getActiveSlotsWithProducts(): Promise {\n const slots = await db.query.deliverySlotInfo\n .findMany({\n where: eq(deliverySlotInfo.isActive, true),\n orderBy: desc(deliverySlotInfo.deliveryTime),\n with: {\n productSlots: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n },\n })\n\n return slots.map((slot: any) => ({\n ...mapDeliverySlot(slot),\n deliverySequence: getNumberArray(slot.deliverySequence),\n products: slot.productSlots.map((ps: any) => mapSlotProductSummary(ps.product)),\n }))\n}\n\nexport async function getActiveSlots(): Promise {\n const slots = await db.query.deliverySlotInfo.findMany({\n where: eq(deliverySlotInfo.isActive, true),\n })\n\n return slots.map(mapDeliverySlot)\n}\n\nexport async function getSlotsAfterDate(afterDate: Date): Promise {\n const slots = await db.query.deliverySlotInfo.findMany({\n where: and(\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, afterDate)\n ),\n orderBy: asc(deliverySlotInfo.deliveryTime),\n })\n\n return slots.map(mapDeliverySlot)\n}\n\nexport async function getSlotByIdWithRelations(id: number): Promise {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, id),\n with: {\n productSlots: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n vendorSnippets: true,\n },\n })\n\n if (!slot) {\n return null\n }\n\n return {\n ...mapDeliverySlot(slot),\n deliverySequence: getNumberArray(slot.deliverySequence),\n groupIds: getNumberArray(slot.groupIds),\n products: slot.productSlots.map((ps: any) => mapSlotProductSummary(ps.product)),\n vendorSnippets: slot.vendorSnippets.map(mapVendorSnippet),\n }\n}\n\nexport async function createSlotWithRelations(input: {\n deliveryTime: string\n freezeTime: string\n isActive?: boolean\n productIds?: number[]\n vendorSnippets?: SlotSnippetInput[]\n groupIds?: number[]\n}): Promise {\n const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input\n\n const result = await db.transaction(async (tx) => {\n const [newSlot] = await tx\n .insert(deliverySlotInfo)\n .values({\n deliveryTime: new Date(deliveryTime),\n freezeTime: new Date(freezeTime),\n isActive: isActive !== undefined ? isActive : true,\n groupIds: groupIds !== undefined ? groupIds : [],\n })\n .returning()\n\n if (productIds && productIds.length > 0) {\n const associations = productIds.map((productId) => ({\n productId,\n slotId: newSlot.id,\n }))\n await tx.insert(productSlots).values(associations)\n }\n\n let createdSnippets: AdminVendorSnippet[] = []\n if (snippets && snippets.length > 0) {\n for (const snippet of snippets) {\n const products = await tx.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n })\n if (products.length !== snippet.productIds.length) {\n throw new Error(`One or more invalid product IDs in snippet \"${snippet.name}\"`)\n }\n\n const existingSnippet = await tx.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippet.name),\n })\n if (existingSnippet) {\n throw new Error(`Snippet name \"${snippet.name}\" already exists`)\n }\n\n const [createdSnippet] = await tx.insert(vendorSnippets).values({\n snippetCode: snippet.name,\n slotId: newSlot.id,\n productIds: snippet.productIds,\n validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,\n }).returning()\n\n createdSnippets.push(mapVendorSnippet(createdSnippet))\n }\n }\n\n return {\n slot: mapDeliverySlot(newSlot),\n createdSnippets,\n message: 'Slot created successfully',\n }\n })\n\n return result\n}\n\nexport async function updateSlotWithRelations(input: {\n id: number\n deliveryTime: string\n freezeTime: string\n isActive?: boolean\n productIds?: number[]\n vendorSnippets?: SlotSnippetInput[]\n groupIds?: number[]\n}): Promise {\n const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input\n\n let validGroupIds = groupIds\n if (groupIds && groupIds.length > 0) {\n const existingGroups = await db.query.productGroupInfo.findMany({\n where: inArray(productGroupInfo.id, groupIds),\n columns: { id: true },\n })\n validGroupIds = existingGroups.map((group: { id: number }) => group.id)\n }\n\n const result = await db.transaction(async (tx) => {\n const [updatedSlot] = await tx\n .update(deliverySlotInfo)\n .set({\n deliveryTime: new Date(deliveryTime),\n freezeTime: new Date(freezeTime),\n isActive: isActive !== undefined ? isActive : true,\n groupIds: validGroupIds !== undefined ? validGroupIds : [],\n })\n .where(eq(deliverySlotInfo.id, id))\n .returning()\n\n if (!updatedSlot) {\n return null\n }\n\n if (productIds !== undefined) {\n await tx.delete(productSlots).where(eq(productSlots.slotId, id))\n\n if (productIds.length > 0) {\n const associations = productIds.map((productId) => ({\n productId,\n slotId: id,\n }))\n await tx.insert(productSlots).values(associations)\n }\n }\n\n let createdSnippets: AdminVendorSnippet[] = []\n if (snippets && snippets.length > 0) {\n for (const snippet of snippets) {\n const products = await tx.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n })\n if (products.length !== snippet.productIds.length) {\n throw new Error(`One or more invalid product IDs in snippet \"${snippet.name}\"`)\n }\n\n const existingSnippet = await tx.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippet.name),\n })\n if (existingSnippet) {\n throw new Error(`Snippet name \"${snippet.name}\" already exists`)\n }\n\n const [createdSnippet] = await tx.insert(vendorSnippets).values({\n snippetCode: snippet.name,\n slotId: id,\n productIds: snippet.productIds,\n validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,\n }).returning()\n\n createdSnippets.push(mapVendorSnippet(createdSnippet))\n }\n }\n\n return {\n slot: mapDeliverySlot(updatedSlot),\n createdSnippets,\n message: 'Slot updated successfully',\n }\n })\n\n return result\n}\n\nexport async function deleteSlotById(id: number): Promise {\n const [deletedSlot] = await db\n .update(deliverySlotInfo)\n .set({ isActive: false })\n .where(eq(deliverySlotInfo.id, id))\n .returning()\n\n if (!deletedSlot) {\n return null\n }\n\n return mapDeliverySlot(deletedSlot)\n}\n\nexport async function getSlotDeliverySequence(slotId: number): Promise {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n })\n\n if (!slot) {\n return null\n }\n\n return mapDeliverySlot(slot)\n}\n\nexport async function updateSlotDeliverySequence(slotId: number, sequence: unknown) {\n const [updatedSlot] = await db\n .update(deliverySlotInfo)\n .set({ deliverySequence: sequence as Record })\n .where(eq(deliverySlotInfo.id, slotId))\n .returning({\n id: deliverySlotInfo.id,\n deliverySequence: deliverySlotInfo.deliverySequence,\n })\n\n return updatedSlot || null\n}\n\nexport async function updateSlotCapacity(slotId: number, isCapacityFull: boolean): Promise {\n const [updatedSlot] = await db\n .update(deliverySlotInfo)\n .set({ isCapacityFull })\n .where(eq(deliverySlotInfo.id, slotId))\n .returning()\n\n if (!updatedSlot) {\n return null\n }\n\n return {\n success: true,\n slot: mapDeliverySlot(updatedSlot),\n message: `Slot ${isCapacityFull ? 'marked as full capacity' : 'capacity reset'}`,\n }\n}\n", "import { db } from '../db/db_index'\nimport { staffUsers, staffRoles, users, userDetails, orders } from '../db/schema'\nimport { eq, or, like, and, lt, desc } from 'drizzle-orm'\n\nexport interface StaffUser {\n id: number\n name: string\n password: string\n staffRoleId: number | null\n createdAt: Date\n}\n\nexport async function getStaffUserByName(name: string): Promise {\n const staff = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.name, name),\n })\n\n return staff || null\n}\n\nexport async function getStaffUserById(staffId: number): Promise {\n const staff = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.id, staffId),\n })\n\n return staff || null\n}\n\nexport async function getAllStaff(): Promise {\n const staff = await db.query.staffUsers.findMany({\n columns: {\n id: true,\n name: true,\n },\n with: {\n role: {\n with: {\n rolePermissions: {\n with: {\n permission: true,\n },\n },\n },\n },\n },\n })\n\n return staff\n}\n\nexport async function getAllUsers(\n cursor?: number,\n limit: number = 20,\n search?: string\n): Promise<{ users: any[]; hasMore: boolean }> {\n let whereCondition = undefined\n\n if (search) {\n whereCondition = or(\n like(users.name, `%${search}%`),\n like(users.email, `%${search}%`),\n like(users.mobile, `%${search}%`)\n )\n }\n\n if (cursor) {\n const cursorCondition = lt(users.id, cursor)\n whereCondition = whereCondition ? and(whereCondition, cursorCondition) : cursorCondition\n }\n\n const allUsers = await db.query.users.findMany({\n where: whereCondition,\n with: {\n userDetails: true,\n },\n orderBy: desc(users.id),\n limit: limit + 1,\n })\n\n const hasMore = allUsers.length > limit\n const usersToReturn = hasMore ? allUsers.slice(0, limit) : allUsers\n\n return { users: usersToReturn, hasMore }\n}\n\nexport async function getUserWithDetails(userId: number): Promise {\n const user = await db.query.users.findFirst({\n where: eq(users.id, userId),\n with: {\n userDetails: true,\n orders: {\n orderBy: desc(orders.createdAt),\n limit: 1,\n },\n },\n })\n\n return user || null\n}\n\nexport async function updateUserSuspensionStatus(userId: number, isSuspended: boolean): Promise {\n await db\n .insert(userDetails)\n .values({ userId, isSuspended })\n .onConflictDoUpdate({\n target: userDetails.userId,\n set: { isSuspended },\n })\n}\n\nexport async function checkStaffUserExists(name: string): Promise {\n const existingUser = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.name, name),\n })\n return !!existingUser\n}\n\nexport async function checkStaffRoleExists(roleId: number): Promise {\n const role = await db.query.staffRoles.findFirst({\n where: eq(staffRoles.id, roleId),\n })\n return !!role\n}\n\nexport async function createStaffUser(\n name: string,\n password: string,\n roleId: number\n): Promise {\n const [newUser] = await db.insert(staffUsers).values({\n name: name.trim(),\n password,\n staffRoleId: roleId,\n }).returning()\n\n return {\n id: newUser.id,\n name: newUser.name,\n password: newUser.password,\n staffRoleId: newUser.staffRoleId,\n createdAt: newUser.createdAt,\n }\n}\n\nexport async function getAllRoles(): Promise {\n const roles = await db.query.staffRoles.findMany({\n columns: {\n id: true,\n roleName: true,\n },\n })\n\n return roles\n}\n", "import { db } from '../db/db_index'\nimport { storeInfo, productInfo } from '../db/schema'\nimport { eq, inArray } from 'drizzle-orm'\n\nexport interface Store {\n id: number\n name: string\n description: string | null\n imageUrl: string | null\n owner: number\n createdAt: Date\n // updatedAt: Date\n}\n\nexport async function getAllStores(): Promise {\n const stores = await db.query.storeInfo.findMany({\n with: {\n owner: true,\n },\n })\n\n return stores\n}\n\nexport async function getStoreById(id: number): Promise {\n const store = await db.query.storeInfo.findFirst({\n where: eq(storeInfo.id, id),\n with: {\n owner: true,\n },\n })\n\n return store || null\n}\n\nexport interface CreateStoreInput {\n name: string\n description?: string\n imageUrl?: string\n owner: number\n}\n\nexport async function createStore(\n input: CreateStoreInput,\n products?: number[]\n): Promise {\n const [newStore] = await db\n .insert(storeInfo)\n .values({\n name: input.name,\n description: input.description,\n imageUrl: input.imageUrl,\n owner: input.owner,\n })\n .returning()\n\n if (products && products.length > 0) {\n await db\n .update(productInfo)\n .set({ storeId: newStore.id })\n .where(inArray(productInfo.id, products))\n }\n\n return {\n id: newStore.id,\n name: newStore.name,\n description: newStore.description,\n imageUrl: newStore.imageUrl,\n owner: newStore.owner,\n createdAt: newStore.createdAt,\n // updatedAt: newStore.updatedAt,\n }\n}\n\nexport interface UpdateStoreInput {\n name?: string\n description?: string\n imageUrl?: string\n owner?: number\n}\n\nexport async function updateStore(\n id: number,\n input: UpdateStoreInput,\n products?: number[]\n): Promise {\n const [updatedStore] = await db\n .update(storeInfo)\n .set({\n ...input,\n // updatedAt: new Date(),\n })\n .where(eq(storeInfo.id, id))\n .returning()\n\n if (!updatedStore) {\n throw new Error('Store not found')\n }\n\n if (products !== undefined) {\n await db\n .update(productInfo)\n .set({ storeId: null })\n .where(eq(productInfo.storeId, id))\n\n if (products.length > 0) {\n await db\n .update(productInfo)\n .set({ storeId: id })\n .where(inArray(productInfo.id, products))\n }\n }\n\n return {\n id: updatedStore.id,\n name: updatedStore.name,\n description: updatedStore.description,\n imageUrl: updatedStore.imageUrl,\n owner: updatedStore.owner,\n createdAt: updatedStore.createdAt,\n // updatedAt: updatedStore.updatedAt,\n }\n}\n\nexport async function deleteStore(id: number): Promise<{ message: string }> {\n return await db.transaction(async (tx) => {\n await tx\n .update(productInfo)\n .set({ storeId: null })\n .where(eq(productInfo.storeId, id))\n\n const [deletedStore] = await tx\n .delete(storeInfo)\n .where(eq(storeInfo.id, id))\n .returning()\n\n if (!deletedStore) {\n throw new Error('Store not found')\n }\n\n return {\n message: 'Store deleted successfully',\n }\n })\n}\n", "import { db } from '../db/db_index'\nimport { users, userDetails, orders, orderItems, complaints, notifCreds, unloggedUserTokens, userIncidents, orderStatus } from '../db/schema'\nimport { eq, sql, desc, asc, count, max, inArray } from 'drizzle-orm'\n\nexport async function createUserByMobile(mobile: string): Promise {\n const [newUser] = await db\n .insert(users)\n .values({\n name: null,\n email: null,\n mobile,\n })\n .returning()\n\n return newUser\n}\n\nexport async function getUserByMobile(mobile: string): Promise {\n const [existingUser] = await db\n .select()\n .from(users)\n .where(eq(users.mobile, mobile))\n .limit(1)\n\n return existingUser || null\n}\n\nexport async function getUnresolvedComplaintsCount(): Promise {\n const result = await db\n .select({ count: count(complaints.id) })\n .from(complaints)\n .where(eq(complaints.isResolved, false))\n \n return result[0]?.count || 0\n}\n\nexport async function getAllUsersWithFilters(\n limit: number,\n cursor?: number,\n search?: string\n): Promise<{ users: any[]; hasMore: boolean }> {\n const whereConditions = []\n \n if (search && search.trim()) {\n whereConditions.push(sql`${users.mobile} LIKE ${`%${search.trim()}%`}`)\n }\n \n if (cursor) {\n whereConditions.push(sql`${users.id} > ${cursor}`)\n }\n\n const usersList = await db\n .select({\n id: users.id,\n name: users.name,\n mobile: users.mobile,\n createdAt: users.createdAt,\n })\n .from(users)\n .where(whereConditions.length > 0 ? sql.join(whereConditions, sql` AND `) : undefined)\n .orderBy(asc(users.id))\n .limit(limit + 1)\n\n const hasMore = usersList.length > limit\n const usersToReturn = hasMore ? usersList.slice(0, limit) : usersList\n\n return { users: usersToReturn, hasMore }\n}\n\nexport async function getOrderCountsByUserIds(userIds: number[]): Promise<{ userId: number; totalOrders: number }[]> {\n if (userIds.length === 0) return []\n \n return await db\n .select({\n userId: orders.userId,\n totalOrders: count(orders.id),\n })\n .from(orders)\n .where(sql`${orders.userId} IN (${sql.join(userIds, sql`, `)})`)\n .groupBy(orders.userId)\n}\n\nexport async function getLastOrdersByUserIds(userIds: number[]): Promise<{ userId: number; lastOrderDate: Date | null }[]> {\n if (userIds.length === 0) return []\n \n return await db\n .select({\n userId: orders.userId,\n lastOrderDate: max(orders.createdAt),\n })\n .from(orders)\n .where(sql`${orders.userId} IN (${sql.join(userIds, sql`, `)})`)\n .groupBy(orders.userId)\n}\n\nexport async function getSuspensionStatusesByUserIds(userIds: number[]): Promise<{ userId: number; isSuspended: boolean }[]> {\n if (userIds.length === 0) return []\n \n return await db\n .select({\n userId: userDetails.userId,\n isSuspended: userDetails.isSuspended,\n })\n .from(userDetails)\n .where(sql`${userDetails.userId} IN (${sql.join(userIds, sql`, `)})`)\n}\n\nexport async function getUserBasicInfo(userId: number): Promise {\n const user = await db\n .select({\n id: users.id,\n name: users.name,\n mobile: users.mobile,\n createdAt: users.createdAt,\n })\n .from(users)\n .where(eq(users.id, userId))\n .limit(1)\n\n return user[0] || null\n}\n\nexport async function getUserSuspensionStatus(userId: number): Promise {\n const userDetail = await db\n .select({\n isSuspended: userDetails.isSuspended,\n })\n .from(userDetails)\n .where(eq(userDetails.userId, userId))\n .limit(1)\n\n return userDetail[0]?.isSuspended ?? false\n}\n\nexport async function getUserOrders(userId: number): Promise {\n return await db\n .select({\n id: orders.id,\n readableId: orders.readableId,\n totalAmount: orders.totalAmount,\n createdAt: orders.createdAt,\n isFlashDelivery: orders.isFlashDelivery,\n })\n .from(orders)\n .where(eq(orders.userId, userId))\n .orderBy(desc(orders.createdAt))\n}\n\nexport async function getOrderStatusesByOrderIds(orderIds: number[]): Promise<{ orderId: number; isDelivered: boolean; isCancelled: boolean }[]> {\n if (orderIds.length === 0) return []\n \n return await db\n .select({\n orderId: orderStatus.orderId,\n isDelivered: orderStatus.isDelivered,\n isCancelled: orderStatus.isCancelled,\n })\n .from(orderStatus)\n .where(sql`${orderStatus.orderId} IN (${sql.join(orderIds, sql`, `)})`)\n}\n\nexport async function getItemCountsByOrderIds(orderIds: number[]): Promise<{ orderId: number; itemCount: number }[]> {\n if (orderIds.length === 0) return []\n \n return await db\n .select({\n orderId: orderItems.orderId,\n itemCount: count(orderItems.id),\n })\n .from(orderItems)\n .where(sql`${orderItems.orderId} IN (${sql.join(orderIds, sql`, `)})`)\n .groupBy(orderItems.orderId)\n}\n\nexport async function upsertUserSuspension(userId: number, isSuspended: boolean): Promise {\n const existingDetail = await db\n .select({ id: userDetails.id })\n .from(userDetails)\n .where(eq(userDetails.userId, userId))\n .limit(1)\n\n if (existingDetail.length > 0) {\n await db\n .update(userDetails)\n .set({ isSuspended })\n .where(eq(userDetails.userId, userId))\n } else {\n await db\n .insert(userDetails)\n .values({\n userId,\n isSuspended,\n })\n }\n}\n\nexport async function searchUsers(search?: string): Promise {\n if (search && search.trim()) {\n return await db\n .select({\n id: users.id,\n name: users.name,\n mobile: users.mobile,\n })\n .from(users)\n .where(sql`${users.mobile} LIKE ${`%${search.trim()}%`} OR ${users.name} LIKE ${`%${search.trim()}%`}`)\n } else {\n return await db\n .select({\n id: users.id,\n name: users.name,\n mobile: users.mobile,\n })\n .from(users)\n }\n}\n\nexport async function getAllNotifCreds(): Promise<{ userId: number, token: string }[]> {\n return await db\n .select({ userId: notifCreds.userId, token: notifCreds.token })\n .from(notifCreds)\n}\n\nexport async function getAllUnloggedTokens(): Promise<{ token: string }[]> {\n return await db\n .select({ token: unloggedUserTokens.token })\n .from(unloggedUserTokens)\n}\n\nexport async function getNotifTokensByUserIds(userIds: number[]): Promise<{ token: string }[]> {\n return await db\n .select({ token: notifCreds.token })\n .from(notifCreds)\n .where(inArray(notifCreds.userId, userIds))\n}\n\nexport async function getUserIncidentsWithRelations(userId: number): Promise {\n return await db.query.userIncidents.findMany({\n where: eq(userIncidents.userId, userId),\n with: {\n order: {\n with: {\n orderStatus: true,\n },\n },\n addedBy: true,\n },\n orderBy: desc(userIncidents.dateAdded),\n })\n}\n\nexport async function createUserIncident(\n userId: number,\n orderId: number | undefined,\n adminComment: string | undefined,\n adminUserId: number,\n negativityScore: number | undefined\n): Promise {\n const [incident] = await db.insert(userIncidents)\n .values({\n userId,\n orderId,\n adminComment,\n addedBy: adminUserId,\n negativityScore,\n })\n .returning()\n\n return incident\n}\n", "import { db } from '../db/db_index'\nimport { vendorSnippets, deliverySlotInfo, productInfo, orders, orderItems, orderStatus } from '../db/schema'\nimport { desc, eq, inArray } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type {\n AdminDeliverySlot,\n AdminVendorSnippet,\n AdminVendorSnippetWithSlot,\n AdminVendorSnippetProduct,\n AdminVendorUpdatePackagingResult,\n} from '@packages/shared'\n\ntype VendorSnippetRow = InferSelectModel\ntype DeliverySlotRow = InferSelectModel\ntype ProductRow = InferSelectModel\n\nconst mapVendorSnippet = (snippet: VendorSnippetRow): AdminVendorSnippet => ({\n id: snippet.id,\n snippetCode: snippet.snippetCode,\n slotId: snippet.slotId ?? null,\n productIds: snippet.productIds || [],\n isPermanent: snippet.isPermanent,\n validTill: snippet.validTill ?? null,\n createdAt: snippet.createdAt,\n})\n\nconst mapDeliverySlot = (slot: DeliverySlotRow): AdminDeliverySlot => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isFlash: slot.isFlash,\n isCapacityFull: slot.isCapacityFull,\n deliverySequence: slot.deliverySequence,\n groupIds: slot.groupIds,\n})\n\nconst mapProductSummary = (product: { id: number; name: string }): AdminVendorSnippetProduct => ({\n id: product.id,\n name: product.name,\n})\n\nexport async function checkVendorSnippetExists(snippetCode: string): Promise {\n const existingSnippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n })\n return !!existingSnippet\n}\n\nexport async function getVendorSnippetById(id: number): Promise {\n const snippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.id, id),\n with: {\n slot: true,\n },\n })\n\n if (!snippet) {\n return null\n }\n\n return {\n ...mapVendorSnippet(snippet),\n slot: snippet.slot ? mapDeliverySlot(snippet.slot) : null,\n }\n}\n\nexport async function getVendorSnippetByCode(snippetCode: string): Promise {\n const snippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n })\n\n return snippet ? mapVendorSnippet(snippet) : null\n}\n\nexport async function getAllVendorSnippets(): Promise {\n const snippets = await db.query.vendorSnippets.findMany({\n with: {\n slot: true,\n },\n orderBy: desc(vendorSnippets.createdAt),\n })\n\n return snippets.map((snippet: VendorSnippetRow & { slot: DeliverySlotRow | null }) => ({\n ...mapVendorSnippet(snippet),\n slot: snippet.slot ? mapDeliverySlot(snippet.slot) : null,\n }))\n}\n\nexport async function createVendorSnippet(input: {\n snippetCode: string\n slotId?: number\n productIds: number[]\n isPermanent: boolean\n validTill?: Date\n}): Promise {\n const [result] = await db.insert(vendorSnippets).values({\n snippetCode: input.snippetCode,\n slotId: input.slotId,\n productIds: input.productIds,\n isPermanent: input.isPermanent,\n validTill: input.validTill,\n }).returning()\n\n return mapVendorSnippet(result)\n}\n\nexport async function updateVendorSnippet(id: number, updates: {\n snippetCode?: string\n slotId?: number | null\n productIds?: number[]\n isPermanent?: boolean\n validTill?: Date | null\n}): Promise {\n const [result] = await db.update(vendorSnippets)\n .set(updates)\n .where(eq(vendorSnippets.id, id))\n .returning()\n\n return result ? mapVendorSnippet(result) : null\n}\n\nexport async function deleteVendorSnippet(id: number): Promise {\n const [result] = await db.delete(vendorSnippets)\n .where(eq(vendorSnippets.id, id))\n .returning()\n\n return result ? mapVendorSnippet(result) : null\n}\n\nexport async function getProductsByIds(productIds: number[]): Promise {\n const products = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, productIds),\n columns: { id: true, name: true },\n })\n\n const prods = products.map(mapProductSummary)\n return prods\n}\n\nexport async function getVendorSlotById(slotId: number): Promise {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n })\n\n return slot ? mapDeliverySlot(slot) : null\n}\n\nexport async function getVendorOrdersBySlotId(slotId: number) {\n return await db.query.orders.findMany({\n where: eq(orders.slotId, slotId),\n with: {\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n user: true,\n slot: true,\n },\n orderBy: desc(orders.createdAt),\n })\n}\n\nexport async function getVendorOrders() {\n return await db.query.orders.findMany({\n with: {\n user: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n },\n orderBy: desc(orders.createdAt),\n })\n}\n\nexport async function getOrderItemsByOrderIds(orderIds: number[]) {\n return await db.query.orderItems.findMany({\n where: inArray(orderItems.orderId, orderIds),\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n })\n}\n\nexport async function getOrderStatusByOrderIds(orderIds: number[]) {\n return await db.query.orderStatus.findMany({\n where: inArray(orderStatus.orderId, orderIds),\n })\n}\n\nexport async function updateVendorOrderItemPackaging(\n orderItemId: number,\n isPackaged: boolean\n): Promise {\n const orderItem = await db.query.orderItems.findFirst({\n where: eq(orderItems.id, orderItemId),\n with: {\n order: {\n with: {\n slot: true,\n },\n },\n },\n })\n\n if (!orderItem) {\n return { success: false, message: 'Order item not found' }\n }\n\n if (!orderItem.order.slotId) {\n return { success: false, message: 'Order item not associated with a vendor slot' }\n }\n\n const snippetExists = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.slotId, orderItem.order.slotId),\n })\n\n if (!snippetExists) {\n return { success: false, message: \"No vendor snippet found for this order's slot\" }\n }\n\n const [updatedItem] = await db.update(orderItems)\n .set({\n is_packaged: isPackaged,\n })\n .where(eq(orderItems.id, orderItemId))\n .returning({ id: orderItems.id })\n\n if (!updatedItem) {\n return { success: false, message: 'Failed to update packaging status' }\n }\n\n return { success: true, orderItemId, is_packaged: isPackaged }\n}\n", "import { db } from '../db/db_index'\nimport { addresses, deliverySlotInfo, orders, orderStatus } from '../db/schema'\nimport { and, eq, gte } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserAddress } from '@packages/shared'\n\ntype AddressRow = InferSelectModel\n\nconst mapUserAddress = (address: AddressRow): UserAddress => ({\n id: address.id,\n userId: address.userId,\n name: address.name,\n phone: address.phone,\n addressLine1: address.addressLine1,\n addressLine2: address.addressLine2 ?? null,\n city: address.city,\n state: address.state,\n pincode: address.pincode,\n isDefault: address.isDefault,\n latitude: address.latitude ?? null,\n longitude: address.longitude ?? null,\n googleMapsUrl: address.googleMapsUrl ?? null,\n adminLatitude: address.adminLatitude ?? null,\n adminLongitude: address.adminLongitude ?? null,\n zoneId: address.zoneId ?? null,\n createdAt: address.createdAt,\n})\n\nexport async function getDefaultAddress(userId: number): Promise {\n const [defaultAddress] = await db\n .select()\n .from(addresses)\n .where(and(eq(addresses.userId, userId), eq(addresses.isDefault, true)))\n .limit(1)\n\n return defaultAddress ? mapUserAddress(defaultAddress) : null\n}\n\nexport async function getUserAddresses(userId: number): Promise {\n const userAddresses = await db.select().from(addresses).where(eq(addresses.userId, userId))\n return userAddresses.map(mapUserAddress)\n}\n\nexport async function getUserAddressById(userId: number, addressId: number): Promise {\n const [address] = await db\n .select()\n .from(addresses)\n .where(and(eq(addresses.id, addressId), eq(addresses.userId, userId)))\n .limit(1)\n\n return address ? mapUserAddress(address) : null\n}\n\nexport async function clearDefaultAddress(userId: number): Promise {\n await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId))\n}\n\nexport async function createUserAddress(input: {\n userId: number\n name: string\n phone: string\n addressLine1: string\n addressLine2?: string\n city: string\n state: string\n pincode: string\n isDefault: boolean\n latitude?: number\n longitude?: number\n googleMapsUrl?: string\n}): Promise {\n const [newAddress] = await db.insert(addresses).values({\n userId: input.userId,\n name: input.name,\n phone: input.phone,\n addressLine1: input.addressLine1,\n addressLine2: input.addressLine2,\n city: input.city,\n state: input.state,\n pincode: input.pincode,\n isDefault: input.isDefault,\n latitude: input.latitude,\n longitude: input.longitude,\n googleMapsUrl: input.googleMapsUrl,\n }).returning()\n\n return mapUserAddress(newAddress)\n}\n\nexport async function updateUserAddress(input: {\n userId: number\n addressId: number\n name: string\n phone: string\n addressLine1: string\n addressLine2?: string\n city: string\n state: string\n pincode: string\n isDefault: boolean\n latitude?: number\n longitude?: number\n googleMapsUrl?: string\n}): Promise {\n const [updatedAddress] = await db.update(addresses)\n .set({\n name: input.name,\n phone: input.phone,\n addressLine1: input.addressLine1,\n addressLine2: input.addressLine2,\n city: input.city,\n state: input.state,\n pincode: input.pincode,\n isDefault: input.isDefault,\n googleMapsUrl: input.googleMapsUrl,\n latitude: input.latitude,\n longitude: input.longitude,\n })\n .where(and(eq(addresses.id, input.addressId), eq(addresses.userId, input.userId)))\n .returning()\n\n return updatedAddress ? mapUserAddress(updatedAddress) : null\n}\n\nexport async function deleteUserAddress(userId: number, addressId: number): Promise {\n const [deleted] = await db.delete(addresses)\n .where(and(eq(addresses.id, addressId), eq(addresses.userId, userId)))\n .returning({ id: addresses.id })\n\n return !!deleted\n}\n\nexport async function hasOngoingOrdersForAddress(addressId: number): Promise {\n const ongoingOrders = await db.select({\n orderId: orders.id,\n })\n .from(orders)\n .innerJoin(orderStatus, eq(orders.id, orderStatus.orderId))\n .innerJoin(deliverySlotInfo, eq(orders.slotId, deliverySlotInfo.id))\n .where(and(\n eq(orders.addressId, addressId),\n eq(orderStatus.isCancelled, false),\n gte(deliverySlotInfo.deliveryTime, new Date())\n ))\n .limit(1)\n\n return ongoingOrders.length > 0\n}\n", "import { db } from '../db/db_index'\nimport { homeBanners } from '../db/schema'\nimport { asc, isNotNull } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserBanner } from '@packages/shared'\n\ntype BannerRow = InferSelectModel\n\nconst mapBanner = (banner: BannerRow): UserBanner => ({\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description ?? null,\n productIds: banner.productIds ?? null,\n redirectUrl: banner.redirectUrl ?? null,\n serialNum: banner.serialNum ?? null,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n})\n\nexport async function getActiveBanners(): Promise {\n const banners = await db.query.homeBanners.findMany({\n where: isNotNull(homeBanners.serialNum),\n orderBy: asc(homeBanners.serialNum),\n })\n\n return banners.map(mapBanner)\n}\n", "import { db } from '../db/db_index'\nimport { cartItems, productInfo, units } from '../db/schema'\nimport { and, eq, sql } from 'drizzle-orm'\nimport type { UserCartItem } from '@packages/shared'\n\nconst getStringArray = (value: unknown): string[] => {\n if (!Array.isArray(value)) return []\n return value.map((item) => String(item))\n}\n\nexport async function getCartItemsWithProducts(userId: number): Promise {\n const cartItemsWithProducts = await db\n .select({\n cartId: cartItems.id,\n productId: productInfo.id,\n productName: productInfo.name,\n productPrice: productInfo.price,\n productImages: productInfo.images,\n productQuantity: productInfo.productQuantity,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n quantity: cartItems.quantity,\n addedAt: cartItems.addedAt,\n })\n .from(cartItems)\n .innerJoin(productInfo, eq(cartItems.productId, productInfo.id))\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(eq(cartItems.userId, userId))\n\n return cartItemsWithProducts.map((item) => {\n const priceValue = item.productPrice ?? '0'\n const quantityValue = item.quantity ?? '0'\n return {\n id: item.cartId,\n productId: item.productId,\n quantity: parseFloat(quantityValue),\n addedAt: item.addedAt,\n product: {\n id: item.productId,\n name: item.productName,\n price: priceValue.toString(),\n productQuantity: item.productQuantity,\n unit: item.unitShortNotation,\n isOutOfStock: item.isOutOfStock,\n images: getStringArray(item.productImages),\n },\n subtotal: parseFloat(priceValue.toString()) * parseFloat(quantityValue),\n }\n })\n}\n\nexport async function getProductById(productId: number) {\n return db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n })\n}\n\nexport async function getCartItemByUserProduct(userId: number, productId: number) {\n return db.query.cartItems.findFirst({\n where: and(eq(cartItems.userId, userId), eq(cartItems.productId, productId)),\n })\n}\n\nexport async function incrementCartItemQuantity(itemId: number, quantity: number): Promise {\n await db.update(cartItems)\n .set({\n quantity: sql`${cartItems.quantity} + ${quantity}`,\n })\n .where(eq(cartItems.id, itemId))\n}\n\nexport async function insertCartItem(userId: number, productId: number, quantity: number): Promise {\n await db.insert(cartItems).values({\n userId,\n productId,\n quantity: quantity.toString(),\n })\n}\n\nexport async function updateCartItemQuantity(userId: number, itemId: number, quantity: number) {\n const [updatedItem] = await db.update(cartItems)\n .set({ quantity: quantity.toString() })\n .where(and(eq(cartItems.id, itemId), eq(cartItems.userId, userId)))\n .returning({ id: cartItems.id })\n\n return !!updatedItem\n}\n\nexport async function deleteCartItem(userId: number, itemId: number): Promise {\n const [deletedItem] = await db.delete(cartItems)\n .where(and(eq(cartItems.id, itemId), eq(cartItems.userId, userId)))\n .returning({ id: cartItems.id })\n\n return !!deletedItem\n}\n\nexport async function clearUserCart(userId: number): Promise {\n await db.delete(cartItems).where(eq(cartItems.userId, userId))\n}\n", "import { db } from '../db/db_index'\nimport { complaints } from '../db/schema'\nimport { asc, eq } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserComplaint } from '@packages/shared'\n\ntype ComplaintRow = InferSelectModel\n\nexport async function getUserComplaints(userId: number): Promise {\n const userComplaints = await db\n .select({\n id: complaints.id,\n complaintBody: complaints.complaintBody,\n response: complaints.response,\n isResolved: complaints.isResolved,\n createdAt: complaints.createdAt,\n orderId: complaints.orderId,\n })\n .from(complaints)\n .where(eq(complaints.userId, userId))\n .orderBy(asc(complaints.createdAt))\n\n return userComplaints.map((complaint) => ({\n id: complaint.id,\n complaintBody: complaint.complaintBody,\n response: complaint.response ?? null,\n isResolved: complaint.isResolved,\n createdAt: complaint.createdAt,\n orderId: complaint.orderId ?? null,\n }))\n}\n\nexport async function createComplaint(\n userId: number,\n orderId: number | null,\n complaintBody: string,\n images?: string[] | null\n): Promise {\n await db.insert(complaints).values({\n userId,\n orderId,\n complaintBody,\n images: images || null,\n })\n}\n", "import { db } from '../db/db_index'\nimport { productInfo, storeInfo, units } from '../db/schema'\nimport { and, eq, sql } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserStoreDetailData, UserStoreProductData, UserStoreSummaryData, StoreSummary } from '@packages/shared'\n\ntype StoreRow = InferSelectModel\ntype StoreProductRow = {\n id: number\n name: string\n shortDescription: string | null\n price: string | null\n marketPrice: string | null\n images: unknown\n isOutOfStock: boolean\n incrementStep: number\n unitShortNotation: string\n productQuantity: number\n}\n\nconst getStringArray = (value: unknown): string[] | null => {\n if (!Array.isArray(value)) return null\n return value.map((item) => String(item))\n}\n\nexport async function getStoreSummaries(): Promise {\n const storesData = await db\n .select({\n id: storeInfo.id,\n name: storeInfo.name,\n description: storeInfo.description,\n imageUrl: storeInfo.imageUrl,\n productCount: sql`count(${productInfo.id})`.as('productCount'),\n })\n .from(storeInfo)\n .leftJoin(\n productInfo,\n and(eq(productInfo.storeId, storeInfo.id), eq(productInfo.isSuspended, false))\n )\n .groupBy(storeInfo.id)\n\n const storesWithDetails = await Promise.all(\n storesData.map(async (store) => {\n const sampleProducts = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n images: productInfo.images,\n })\n .from(productInfo)\n .where(and(eq(productInfo.storeId, store.id), eq(productInfo.isSuspended, false)))\n .limit(3)\n\n return {\n id: store.id,\n name: store.name,\n description: store.description ?? null,\n imageUrl: store.imageUrl ?? null,\n productCount: store.productCount || 0,\n sampleProducts: sampleProducts.map((product) => ({\n id: product.id,\n name: product.name,\n images: getStringArray(product.images),\n })),\n }\n })\n )\n\n return storesWithDetails\n}\n\nexport async function getStoreDetail(storeId: number): Promise {\n const storeData = await db.query.storeInfo.findFirst({\n where: eq(storeInfo.id, storeId),\n columns: {\n id: true,\n name: true,\n description: true,\n imageUrl: true,\n },\n })\n\n if (!storeData) {\n return null\n }\n\n const productsData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n incrementStep: productInfo.incrementStep,\n unitShortNotation: units.shortNotation,\n productQuantity: productInfo.productQuantity,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(and(eq(productInfo.storeId, storeId), eq(productInfo.isSuspended, false)))\n\n const products = productsData.map((product: StoreProductRow): UserStoreProductData => ({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription ?? null,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n incrementStep: product.incrementStep,\n unit: product.unitShortNotation,\n unitNotation: product.unitShortNotation,\n images: getStringArray(product.images),\n isOutOfStock: product.isOutOfStock,\n productQuantity: product.productQuantity,\n }))\n\n return {\n store: {\n id: storeData.id,\n name: storeData.name,\n description: storeData.description ?? null,\n imageUrl: storeData.imageUrl ?? null,\n },\n products,\n }\n}\n\n/**\n * Get simple store summary (id, name, description only)\n * Used for common API endpoints\n */\nexport async function getStoresSummary(): Promise {\n return db.query.storeInfo.findMany({\n columns: {\n id: true,\n name: true,\n description: true,\n },\n })\n}\n", "import { db } from '../db/db_index'\nimport { deliverySlotInfo, productInfo, productReviews, productSlots, productTags, specialDeals, storeInfo, units, users } from '../db/schema'\nimport { and, desc, eq, gt, inArray, sql } from 'drizzle-orm'\nimport type { UserProductDetailData, UserProductReview } from '@packages/shared'\n\nconst getStringArray = (value: unknown): string[] | null => {\n if (!Array.isArray(value)) return null\n return value.map((item) => String(item))\n}\n\nexport async function getProductDetailById(productId: number): Promise {\n const productData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n longDescription: productInfo.longDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n storeId: productInfo.storeId,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n productQuantity: productInfo.productQuantity,\n isFlashAvailable: productInfo.isFlashAvailable,\n flashPrice: productInfo.flashPrice,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(eq(productInfo.id, productId))\n .limit(1)\n\n if (productData.length === 0) {\n return null\n }\n\n const product = productData[0]\n\n const storeData = product.storeId ? await db.query.storeInfo.findFirst({\n where: eq(storeInfo.id, product.storeId),\n columns: { id: true, name: true, description: true },\n }) : null\n\n const deliverySlotsData = await db\n .select({\n id: deliverySlotInfo.id,\n deliveryTime: deliverySlotInfo.deliveryTime,\n freezeTime: deliverySlotInfo.freezeTime,\n })\n .from(productSlots)\n .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n .where(\n and(\n eq(productSlots.productId, productId),\n eq(deliverySlotInfo.isActive, true),\n eq(deliverySlotInfo.isCapacityFull, false),\n gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`),\n gt(deliverySlotInfo.freezeTime, sql`CURRENT_TIMESTAMP`)\n )\n )\n .orderBy(deliverySlotInfo.deliveryTime)\n\n const specialDealsData = await db\n .select({\n quantity: specialDeals.quantity,\n price: specialDeals.price,\n validTill: specialDeals.validTill,\n })\n .from(specialDeals)\n .where(\n and(\n eq(specialDeals.productId, productId),\n gt(specialDeals.validTill, sql`CURRENT_TIMESTAMP`)\n )\n )\n .orderBy(specialDeals.quantity)\n\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription ?? null,\n longDescription: product.longDescription ?? null,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n unitNotation: product.unitShortNotation,\n images: getStringArray(product.images),\n isOutOfStock: product.isOutOfStock,\n store: storeData ? {\n id: storeData.id,\n name: storeData.name,\n description: storeData.description ?? null,\n } : null,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n isFlashAvailable: product.isFlashAvailable,\n flashPrice: product.flashPrice?.toString() || null,\n deliverySlots: deliverySlotsData,\n specialDeals: specialDealsData.map((deal) => ({\n quantity: String(deal.quantity ?? '0'),\n price: String(deal.price ?? '0'),\n validTill: deal.validTill,\n })),\n }\n}\n\nexport async function getProductReviews(productId: number, limit: number, offset: number) {\n const reviews = await db\n .select({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n userName: users.name,\n })\n .from(productReviews)\n .innerJoin(users, eq(productReviews.userId, users.id))\n .where(eq(productReviews.productId, productId))\n .orderBy(desc(productReviews.reviewTime))\n .limit(limit)\n .offset(offset)\n\n const totalCountResult = await db\n .select({ count: sql`count(*)` })\n .from(productReviews)\n .where(eq(productReviews.productId, productId))\n\n const totalCount = Number(totalCountResult[0].count)\n\n const mappedReviews: UserProductReview[] = reviews.map((review) => ({\n id: review.id,\n reviewBody: review.reviewBody,\n ratings: review.ratings,\n imageUrls: getStringArray(review.imageUrls),\n reviewTime: review.reviewTime,\n userName: review.userName ?? null,\n }))\n\n return {\n reviews: mappedReviews,\n totalCount,\n }\n}\n\nexport async function getProductById(productId: number) {\n return db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n })\n}\n\nexport async function createProductReview(\n userId: number,\n productId: number,\n reviewBody: string,\n ratings: number,\n imageUrls: string[]\n): Promise {\n const [newReview] = await db.insert(productReviews).values({\n userId,\n productId,\n reviewBody,\n ratings,\n imageUrls,\n }).returning({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n })\n\n return {\n id: newReview.id,\n reviewBody: newReview.reviewBody,\n ratings: newReview.ratings,\n imageUrls: getStringArray(newReview.imageUrls),\n reviewTime: newReview.reviewTime,\n userName: null,\n }\n}\n\nexport interface ProductSummaryData {\n id: number\n name: string\n shortDescription: string | null\n price: string\n marketPrice: string | null\n images: unknown\n isOutOfStock: boolean\n unitShortNotation: string\n productQuantity: number\n}\n\nexport async function getAllProductsWithUnits(tagId?: number): Promise {\n let productIds: number[] | null = null\n\n // If tagId is provided, get products that have this tag\n if (tagId) {\n const taggedProducts = await db\n .select({ productId: productTags.productId })\n .from(productTags)\n .where(eq(productTags.tagId, tagId))\n\n productIds = taggedProducts.map(tp => tp.productId)\n }\n\n let whereCondition = undefined\n\n // Filter by product IDs if tag filtering is applied\n if (productIds && productIds.length > 0) {\n whereCondition = inArray(productInfo.id, productIds)\n }\n\n const results = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n productQuantity: productInfo.productQuantity,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(whereCondition)\n\n return results.map((product) => ({\n ...product,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n }))\n}\n\n/**\n * Get all suspended product IDs\n */\nexport async function getSuspendedProductIds(): Promise {\n const suspendedProducts = await db\n .select({ id: productInfo.id })\n .from(productInfo)\n .where(eq(productInfo.isSuspended, true))\n\n return suspendedProducts.map(sp => sp.id)\n}\n\n/**\n * Get next delivery date for a product (with capacity check)\n * This version filters by both isActive AND isCapacityFull\n */\nexport async function getNextDeliveryDateWithCapacity(productId: number): Promise {\n const result = await db\n .select({ deliveryTime: deliverySlotInfo.deliveryTime })\n .from(productSlots)\n .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n .where(\n and(\n eq(productSlots.productId, productId),\n eq(deliverySlotInfo.isActive, true),\n eq(deliverySlotInfo.isCapacityFull, false),\n gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`)\n )\n )\n .orderBy(deliverySlotInfo.deliveryTime)\n .limit(1)\n\n return result[0]?.deliveryTime || null\n}\n", "import { db } from '../db/db_index'\nimport { deliverySlotInfo, productInfo } from '../db/schema'\nimport { asc, eq } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserDeliverySlot, UserSlotAvailability } from '@packages/shared'\n\ntype SlotRow = InferSelectModel\n\nconst mapSlot = (slot: SlotRow): UserDeliverySlot => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isFlash: slot.isFlash,\n isCapacityFull: slot.isCapacityFull,\n deliverySequence: slot.deliverySequence,\n groupIds: slot.groupIds,\n})\n\nexport async function getActiveSlotsList(): Promise {\n const slots = await db.query.deliverySlotInfo.findMany({\n where: eq(deliverySlotInfo.isActive, true),\n orderBy: asc(deliverySlotInfo.deliveryTime),\n })\n\n return slots.map(mapSlot)\n}\n\nexport async function getProductAvailability(): Promise {\n const products = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n isOutOfStock: productInfo.isOutOfStock,\n isFlashAvailable: productInfo.isFlashAvailable,\n })\n .from(productInfo)\n .where(eq(productInfo.isSuspended, false))\n\n return products.map((product) => ({\n id: product.id,\n name: product.name,\n isOutOfStock: product.isOutOfStock,\n isFlashAvailable: product.isFlashAvailable,\n }))\n}\n", "import { db } from '../db/db_index'\nimport { orders, payments, orderStatus } from '../db/schema'\nimport { eq } from 'drizzle-orm'\n\nexport async function getOrderById(orderId: number) {\n return db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n })\n}\n\nexport async function getPaymentByOrderId(orderId: number) {\n return db.query.payments.findFirst({\n where: eq(payments.orderId, orderId),\n })\n}\n\nexport async function getPaymentByMerchantOrderId(merchantOrderId: string) {\n return db.query.payments.findFirst({\n where: eq(payments.merchantOrderId, merchantOrderId),\n })\n}\n\nexport async function updatePaymentSuccess(merchantOrderId: string, payload: unknown) {\n const [updatedPayment] = await db\n .update(payments)\n .set({\n status: 'success',\n payload,\n })\n .where(eq(payments.merchantOrderId, merchantOrderId))\n .returning({\n id: payments.id,\n orderId: payments.orderId,\n })\n\n return updatedPayment || null\n}\n\nexport async function updateOrderPaymentStatus(orderId: number, status: 'pending' | 'success' | 'cod' | 'failed') {\n await db\n .update(orderStatus)\n .set({ paymentStatus: status })\n .where(eq(orderStatus.orderId, orderId))\n}\n\nexport async function markPaymentFailed(paymentId: number) {\n await db\n .update(payments)\n .set({ status: 'failed' })\n .where(eq(payments.id, paymentId))\n}\n", "import { db } from '../db/db_index'\nimport {\n users,\n userCreds,\n userDetails,\n addresses,\n cartItems,\n complaints,\n couponApplicableUsers,\n couponUsage,\n notifCreds,\n notifications,\n orderItems,\n orderStatus,\n orders,\n payments,\n refunds,\n productReviews,\n reservedCoupons,\n} from '../db/schema'\nimport { eq } from 'drizzle-orm'\n\nexport async function getUserByEmail(email: string) {\n const [user] = await db.select().from(users).where(eq(users.email, email)).limit(1)\n return user || null\n}\n\nexport async function getUserByMobile(mobile: string) {\n const [user] = await db.select().from(users).where(eq(users.mobile, mobile)).limit(1)\n return user || null\n}\n\nexport async function getUserById(userId: number) {\n const [user] = await db.select().from(users).where(eq(users.id, userId)).limit(1)\n return user || null\n}\n\nexport async function getUserCreds(userId: number) {\n const [creds] = await db.select().from(userCreds).where(eq(userCreds.userId, userId)).limit(1)\n return creds || null\n}\n\nexport async function getUserDetails(userId: number) {\n const [details] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1)\n return details || null\n}\n\nexport async function isUserSuspended(userId: number): Promise {\n const details = await getUserDetails(userId)\n return details?.isSuspended ?? false\n}\n\nexport async function createUserWithProfile(input: {\n name: string\n email: string\n mobile: string\n hashedPassword: string\n profileImage?: string | null\n}) {\n return db.transaction(async (tx) => {\n // Create user\n const [user] = await tx.insert(users).values({\n name: input.name,\n email: input.email,\n mobile: input.mobile,\n }).returning()\n\n // Create user credentials\n await tx.insert(userCreds).values({\n userId: user.id,\n userPassword: input.hashedPassword,\n })\n\n // Create user details with profile image\n await tx.insert(userDetails).values({\n userId: user.id,\n profileImage: input.profileImage || null,\n })\n\n return user\n })\n}\n\nexport async function getUserDetailsByUserId(userId: number) {\n const [details] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1)\n return details || null\n}\n\nexport async function updateUserProfile(userId: number, data: {\n name?: string\n email?: string\n mobile?: string\n hashedPassword?: string\n profileImage?: string\n bio?: string\n dateOfBirth?: Date | null\n gender?: string\n occupation?: string\n}) {\n return db.transaction(async (tx) => {\n // Update user table\n const userUpdate: any = {}\n if (data.name !== undefined) userUpdate.name = data.name\n if (data.email !== undefined) userUpdate.email = data.email\n if (data.mobile !== undefined) userUpdate.mobile = data.mobile\n\n if (Object.keys(userUpdate).length > 0) {\n await tx.update(users).set(userUpdate).where(eq(users.id, userId))\n }\n\n // Update password if provided\n if (data.hashedPassword) {\n await tx.update(userCreds).set({\n userPassword: data.hashedPassword,\n }).where(eq(userCreds.userId, userId))\n }\n\n // Update or insert user details\n const detailsUpdate: any = {}\n if (data.bio !== undefined) detailsUpdate.bio = data.bio\n if (data.dateOfBirth !== undefined) detailsUpdate.dateOfBirth = data.dateOfBirth\n if (data.gender !== undefined) detailsUpdate.gender = data.gender\n if (data.occupation !== undefined) detailsUpdate.occupation = data.occupation\n if (data.profileImage !== undefined) detailsUpdate.profileImage = data.profileImage\n detailsUpdate.updatedAt = new Date()\n\n const [existingDetails] = await tx.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1)\n\n if (existingDetails) {\n await tx.update(userDetails).set(detailsUpdate).where(eq(userDetails.userId, userId))\n } else {\n await tx.insert(userDetails).values({\n userId,\n ...detailsUpdate,\n createdAt: new Date(),\n })\n }\n\n // Return updated user\n const [user] = await tx.select().from(users).where(eq(users.id, userId)).limit(1)\n return user\n })\n}\n\nexport async function createUserWithCreds(input: {\n name: string\n email: string\n mobile: string\n hashedPassword: string\n}) {\n return db.transaction(async (tx) => {\n const [user] = await tx.insert(users).values({\n name: input.name,\n email: input.email,\n mobile: input.mobile,\n }).returning()\n\n await tx.insert(userCreds).values({\n userId: user.id,\n userPassword: input.hashedPassword,\n })\n\n return user\n })\n}\n\nexport async function createUserWithMobile(mobile: string) {\n const [user] = await db.insert(users).values({\n name: null,\n email: null,\n mobile,\n }).returning()\n\n return user\n}\n\nexport async function upsertUserPassword(userId: number, hashedPassword: string) {\n try {\n await db.insert(userCreds).values({\n userId,\n userPassword: hashedPassword,\n })\n return\n } catch (error: any) {\n if (error.code === '23505') {\n await db.update(userCreds).set({\n userPassword: hashedPassword,\n }).where(eq(userCreds.userId, userId))\n return\n }\n throw error\n }\n}\n\nexport async function deleteUserAccount(userId: number) {\n await db.transaction(async (tx) => {\n await tx.delete(notifCreds).where(eq(notifCreds.userId, userId))\n await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.userId, userId))\n await tx.delete(couponUsage).where(eq(couponUsage.userId, userId))\n await tx.delete(complaints).where(eq(complaints.userId, userId))\n await tx.delete(cartItems).where(eq(cartItems.userId, userId))\n await tx.delete(notifications).where(eq(notifications.userId, userId))\n await tx.delete(productReviews).where(eq(productReviews.userId, userId))\n\n await tx.update(reservedCoupons)\n .set({ redeemedBy: null })\n .where(eq(reservedCoupons.redeemedBy, userId))\n\n const userOrders = await tx\n .select({ id: orders.id })\n .from(orders)\n .where(eq(orders.userId, userId))\n\n for (const order of userOrders) {\n await tx.delete(orderItems).where(eq(orderItems.orderId, order.id))\n await tx.delete(orderStatus).where(eq(orderStatus.orderId, order.id))\n await tx.delete(payments).where(eq(payments.orderId, order.id))\n await tx.delete(refunds).where(eq(refunds.orderId, order.id))\n await tx.delete(couponUsage).where(eq(couponUsage.orderId, order.id))\n await tx.delete(complaints).where(eq(complaints.orderId, order.id))\n }\n\n await tx.delete(orders).where(eq(orders.userId, userId))\n await tx.delete(addresses).where(eq(addresses.userId, userId))\n await tx.delete(userDetails).where(eq(userDetails.userId, userId))\n await tx.delete(userCreds).where(eq(userCreds.userId, userId))\n await tx.delete(users).where(eq(users.id, userId))\n })\n}\n", "import { db } from '../db/db_index'\nimport {\n couponApplicableProducts,\n couponApplicableUsers,\n couponUsage,\n coupons,\n reservedCoupons,\n} from '../db/schema'\nimport { and, eq, gt, isNull, or } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserCoupon, UserCouponApplicableProduct, UserCouponApplicableUser, UserCouponUsage, UserCouponWithRelations } from '@packages/shared'\n\ntype CouponRow = InferSelectModel\ntype CouponUsageRow = InferSelectModel\ntype CouponApplicableUserRow = InferSelectModel\ntype CouponApplicableProductRow = InferSelectModel\ntype ReservedCouponRow = InferSelectModel\n\nconst mapCoupon = (coupon: CouponRow): UserCoupon => ({\n id: coupon.id,\n couponCode: coupon.couponCode,\n isUserBased: coupon.isUserBased,\n discountPercent: coupon.discountPercent ? coupon.discountPercent.toString() : null,\n flatDiscount: coupon.flatDiscount ? coupon.flatDiscount.toString() : null,\n minOrder: coupon.minOrder ? coupon.minOrder.toString() : null,\n productIds: coupon.productIds,\n maxValue: coupon.maxValue ? coupon.maxValue.toString() : null,\n isApplyForAll: coupon.isApplyForAll,\n validTill: coupon.validTill ?? null,\n maxLimitForUser: coupon.maxLimitForUser ?? null,\n isInvalidated: coupon.isInvalidated,\n exclusiveApply: coupon.exclusiveApply,\n createdAt: coupon.createdAt,\n})\n\nconst mapUsage = (usage: CouponUsageRow): UserCouponUsage => ({\n id: usage.id,\n userId: usage.userId,\n couponId: usage.couponId,\n orderId: usage.orderId ?? null,\n orderItemId: usage.orderItemId ?? null,\n usedAt: usage.usedAt,\n})\n\nconst mapApplicableUser = (applicable: CouponApplicableUserRow): UserCouponApplicableUser => ({\n id: applicable.id,\n couponId: applicable.couponId,\n userId: applicable.userId,\n})\n\nconst mapApplicableProduct = (applicable: CouponApplicableProductRow): UserCouponApplicableProduct => ({\n id: applicable.id,\n couponId: applicable.couponId,\n productId: applicable.productId,\n})\n\nconst mapCouponWithRelations = (coupon: CouponRow & {\n usages: CouponUsageRow[]\n applicableUsers: CouponApplicableUserRow[]\n applicableProducts: CouponApplicableProductRow[]\n}): UserCouponWithRelations => ({\n ...mapCoupon(coupon),\n usages: coupon.usages.map(mapUsage),\n applicableUsers: coupon.applicableUsers.map(mapApplicableUser),\n applicableProducts: coupon.applicableProducts.map(mapApplicableProduct),\n})\n\nexport async function getActiveCouponsWithRelations(userId: number): Promise {\n const allCoupons = await db.query.coupons.findMany({\n where: and(\n eq(coupons.isInvalidated, false),\n or(\n isNull(coupons.validTill),\n gt(coupons.validTill, new Date())\n )\n ),\n with: {\n usages: {\n where: eq(couponUsage.userId, userId),\n },\n applicableUsers: true,\n applicableProducts: true,\n },\n })\n\n return allCoupons.map(mapCouponWithRelations)\n}\n\nexport async function getAllCouponsWithRelations(userId: number): Promise {\n const allCoupons = await db.query.coupons.findMany({\n with: {\n usages: {\n where: eq(couponUsage.userId, userId),\n },\n applicableUsers: true,\n applicableProducts: true,\n },\n })\n\n return allCoupons.map(mapCouponWithRelations)\n}\n\nexport async function getReservedCouponByCode(secretCode: string): Promise {\n const reserved = await db.query.reservedCoupons.findFirst({\n where: and(\n eq(reservedCoupons.secretCode, secretCode.toUpperCase()),\n eq(reservedCoupons.isRedeemed, false)\n ),\n })\n\n return reserved || null\n}\n\nexport async function redeemReservedCoupon(userId: number, reservedCoupon: ReservedCouponRow): Promise {\n const couponResult = await db.transaction(async (tx) => {\n const [coupon] = await tx.insert(coupons).values({\n couponCode: reservedCoupon.couponCode,\n isUserBased: true,\n discountPercent: reservedCoupon.discountPercent,\n flatDiscount: reservedCoupon.flatDiscount,\n minOrder: reservedCoupon.minOrder,\n productIds: reservedCoupon.productIds,\n maxValue: reservedCoupon.maxValue,\n isApplyForAll: false,\n validTill: reservedCoupon.validTill,\n maxLimitForUser: reservedCoupon.maxLimitForUser,\n exclusiveApply: reservedCoupon.exclusiveApply,\n createdBy: reservedCoupon.createdBy,\n }).returning()\n\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId,\n })\n\n await tx.update(reservedCoupons).set({\n isRedeemed: true,\n redeemedBy: userId,\n redeemedAt: new Date(),\n }).where(eq(reservedCoupons.id, reservedCoupon.id))\n\n return coupon\n })\n\n return mapCoupon(couponResult)\n}\n", "import { db } from '../db/db_index'\nimport { notifCreds, unloggedUserTokens, userCreds, userDetails, users } from '../db/schema'\nimport { and, eq } from 'drizzle-orm'\n\nexport async function getUserById(userId: number) {\n const [user] = await db.select().from(users).where(eq(users.id, userId)).limit(1)\n return user || null\n}\n\nexport async function getUserDetailByUserId(userId: number) {\n const [detail] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1)\n return detail || null\n}\n\nexport async function getUserWithCreds(userId: number) {\n const result = await db\n .select()\n .from(users)\n .leftJoin(userCreds, eq(users.id, userCreds.userId))\n .where(eq(users.id, userId))\n .limit(1)\n\n if (result.length === 0) return null\n return {\n user: result[0].users,\n creds: result[0].user_creds,\n }\n}\n\nexport async function getNotifCred(userId: number, token: string) {\n return db.query.notifCreds.findFirst({\n where: and(eq(notifCreds.userId, userId), eq(notifCreds.token, token)),\n })\n}\n\nexport async function upsertNotifCred(userId: number, token: string): Promise {\n const existing = await getNotifCred(userId, token)\n if (existing) {\n await db.update(notifCreds)\n .set({ lastVerified: new Date() })\n .where(eq(notifCreds.id, existing.id))\n return\n }\n\n await db.insert(notifCreds).values({\n userId,\n token,\n lastVerified: new Date(),\n })\n}\n\nexport async function deleteUnloggedToken(token: string): Promise {\n await db.delete(unloggedUserTokens).where(eq(unloggedUserTokens.token, token))\n}\n\nexport async function getUnloggedToken(token: string) {\n return db.query.unloggedUserTokens.findFirst({\n where: eq(unloggedUserTokens.token, token),\n })\n}\n\nexport async function upsertUnloggedToken(token: string): Promise {\n const existing = await getUnloggedToken(token)\n if (existing) {\n await db.update(unloggedUserTokens)\n .set({ lastVerified: new Date() })\n .where(eq(unloggedUserTokens.id, existing.id))\n return\n }\n\n await db.insert(unloggedUserTokens).values({\n token,\n lastVerified: new Date(),\n })\n}\n", "import { db } from '../db/db_index'\nimport {\n orders,\n orderItems,\n orderStatus,\n addresses,\n productInfo,\n paymentInfoTable,\n coupons,\n couponUsage,\n cartItems,\n refunds,\n units,\n userDetails,\n deliverySlotInfo,\n} from '../db/schema'\nimport { and, eq, inArray, desc, gte, sql } from 'drizzle-orm'\nimport type {\n UserOrderSummary,\n UserOrderDetail,\n UserRecentProduct,\n} from '@packages/shared'\n\nexport interface OrderItemInput {\n productId: number\n quantity: number\n slotId: number | null\n}\n\nexport interface PlaceOrderInput {\n userId: number\n selectedItems: OrderItemInput[]\n addressId: number\n paymentMethod: 'online' | 'cod'\n couponId?: number\n userNotes?: string\n isFlash?: boolean\n}\n\nexport interface OrderGroupData {\n slotId: number | null\n items: Array<{\n productId: number\n quantity: number\n slotId: number | null\n product: typeof productInfo.$inferSelect\n }>\n}\n\nexport interface PlacedOrder {\n id: number\n userId: number\n addressId: number\n slotId: number | null\n totalAmount: string\n deliveryCharge: string\n isCod: boolean\n isOnlinePayment: boolean\n paymentInfoId: number | null\n readableId: number\n userNotes: string | null\n orderGroupId: string\n orderGroupProportion: string\n isFlashDelivery: boolean\n createdAt: Date\n}\n\nexport interface OrderWithRelations {\n id: number\n userId: number\n addressId: number\n slotId: number | null\n totalAmount: string\n deliveryCharge: string\n isCod: boolean\n isOnlinePayment: boolean\n isFlashDelivery: boolean\n userNotes: string | null\n createdAt: Date\n orderItems: Array<{\n id: number\n productId: number\n quantity: string\n price: string\n discountedPrice: string | null\n is_packaged: boolean\n product: {\n id: number\n name: string\n images: unknown\n }\n }>\n slot: {\n deliveryTime: Date\n } | null\n paymentInfo: {\n id: number\n status: string\n } | null\n orderStatus: Array<{\n id: number\n isCancelled: boolean\n isDelivered: boolean\n paymentStatus: string\n cancelReason: string | null\n }>\n refunds: Array<{\n refundStatus: string\n refundAmount: string | null\n }>\n}\n\nexport interface OrderDetailWithRelations {\n id: number\n userId: number\n addressId: number\n slotId: number | null\n totalAmount: string\n deliveryCharge: string\n isCod: boolean\n isOnlinePayment: boolean\n isFlashDelivery: boolean\n userNotes: string | null\n createdAt: Date\n orderItems: Array<{\n id: number\n productId: number\n quantity: string\n price: string\n discountedPrice: string | null\n is_packaged: boolean\n product: {\n id: number\n name: string\n images: unknown\n }\n }>\n slot: {\n deliveryTime: Date\n } | null\n paymentInfo: {\n id: number\n status: string\n } | null\n orderStatus: Array<{\n id: number\n isCancelled: boolean\n isDelivered: boolean\n paymentStatus: string\n cancelReason: string | null\n }>\n refunds: Array<{\n refundStatus: string\n refundAmount: string | null\n }>\n}\n\nexport interface CouponValidationResult {\n id: number\n couponCode: string\n isInvalidated: boolean\n validTill: Date | null\n maxLimitForUser: number | null\n minOrder: string | null\n discountPercent: string | null\n flatDiscount: string | null\n maxValue: string | null\n usages: Array<{\n id: number\n userId: number\n }>\n}\n\nexport interface CouponUsageWithCoupon {\n id: number\n couponId: number\n orderId: number | null\n coupon: {\n id: number\n couponCode: string\n discountPercent: string | null\n flatDiscount: string | null\n maxValue: string | null\n }\n}\n\nexport async function validateAndGetCoupon(\n couponId: number | undefined,\n userId: number,\n totalAmount: number\n): Promise {\n if (!couponId) return null\n\n const coupon = await db.query.coupons.findFirst({\n where: eq(coupons.id, couponId),\n with: {\n usages: { where: eq(couponUsage.userId, userId) },\n },\n })\n\n if (!coupon) throw new Error('Invalid coupon')\n if (coupon.isInvalidated) throw new Error('Coupon is no longer valid')\n if (coupon.validTill && new Date(coupon.validTill) < new Date())\n throw new Error('Coupon has expired')\n if (\n coupon.maxLimitForUser &&\n coupon.usages.length >= coupon.maxLimitForUser\n )\n throw new Error('Coupon usage limit exceeded')\n if (\n coupon.minOrder &&\n parseFloat(coupon.minOrder.toString()) > totalAmount\n )\n throw new Error('Order amount does not meet coupon minimum requirement')\n\n return coupon as CouponValidationResult\n}\n\nexport function applyDiscountToOrder(\n orderTotal: number,\n appliedCoupon: CouponValidationResult | null,\n proportion: number\n): { finalOrderTotal: number; orderGroupProportion: number } {\n let finalOrderTotal = orderTotal\n \n if (appliedCoupon) {\n if (appliedCoupon.discountPercent) {\n const discount = Math.min(\n (orderTotal *\n parseFloat(appliedCoupon.discountPercent.toString())) /\n 100,\n appliedCoupon.maxValue\n ? parseFloat(appliedCoupon.maxValue.toString()) * proportion\n : Infinity\n )\n finalOrderTotal -= discount\n } else if (appliedCoupon.flatDiscount) {\n const discount = Math.min(\n parseFloat(appliedCoupon.flatDiscount.toString()) * proportion,\n appliedCoupon.maxValue\n ? parseFloat(appliedCoupon.maxValue.toString()) * proportion\n : finalOrderTotal\n )\n finalOrderTotal -= discount\n }\n }\n\n return { finalOrderTotal, orderGroupProportion: proportion }\n}\n\nexport async function getAddressByIdAndUser(\n addressId: number,\n userId: number\n) {\n return db.query.addresses.findFirst({\n where: and(eq(addresses.userId, userId), eq(addresses.id, addressId)),\n })\n}\n\nexport async function getProductById(productId: number) {\n return db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n })\n}\n\nexport async function checkUserSuspended(userId: number): Promise {\n const userDetail = await db.query.userDetails.findFirst({\n where: eq(userDetails.userId, userId),\n })\n return userDetail?.isSuspended ?? false\n}\n\nexport async function getSlotCapacityStatus(slotId: number): Promise {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n columns: {\n isCapacityFull: true,\n },\n })\n return slot?.isCapacityFull ?? false\n}\n\nexport async function placeOrderTransaction(params: {\n userId: number\n ordersData: Array<{\n order: Omit\n orderItems: Omit[]\n orderStatus: Omit\n }>\n paymentMethod: 'online' | 'cod'\n totalWithDelivery: number\n}): Promise {\n const { userId, ordersData, paymentMethod } = params\n\n return db.transaction(async (tx) => {\n let sharedPaymentInfoId: number | null = null\n if (paymentMethod === 'online') {\n const [paymentInfo] = await tx\n .insert(paymentInfoTable)\n .values({\n status: 'pending',\n gateway: 'razorpay',\n merchantOrderId: `multi_order_${Date.now()}`,\n })\n .returning()\n sharedPaymentInfoId = paymentInfo.id\n }\n\n const ordersToInsert: Omit[] =\n ordersData.map((od) => ({\n ...od.order,\n paymentInfoId: sharedPaymentInfoId,\n }))\n\n const insertedOrders = await tx.insert(orders).values(ordersToInsert).returning()\n\n const allOrderItems: Omit[] = []\n const allOrderStatuses: Omit[] = []\n\n insertedOrders.forEach((order, index) => {\n const od = ordersData[index]\n od.orderItems.forEach((item) => {\n allOrderItems.push({ ...item, orderId: order.id })\n })\n allOrderStatuses.push({\n ...od.orderStatus,\n orderId: order.id,\n })\n })\n\n await tx.insert(orderItems).values(allOrderItems)\n await tx.insert(orderStatus).values(allOrderStatuses)\n\n return insertedOrders as PlacedOrder[]\n })\n}\n\nexport async function deleteCartItemsForOrder(\n userId: number,\n productIds: number[]\n): Promise {\n await db.delete(cartItems).where(\n and(\n eq(cartItems.userId, userId),\n inArray(cartItems.productId, productIds)\n )\n )\n}\n\nexport async function recordCouponUsage(\n userId: number,\n couponId: number,\n orderId: number\n): Promise {\n await db.insert(couponUsage).values({\n userId,\n couponId,\n orderId,\n orderItemId: null,\n usedAt: new Date(),\n })\n}\n\nexport async function getOrdersWithRelations(\n userId: number,\n offset: number,\n pageSize: number\n): Promise {\n return db.query.orders.findMany({\n where: eq(orders.userId, userId),\n with: {\n orderItems: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n slot: {\n columns: {\n deliveryTime: true,\n },\n },\n paymentInfo: {\n columns: {\n id: true,\n status: true,\n },\n },\n orderStatus: {\n columns: {\n id: true,\n isCancelled: true,\n isDelivered: true,\n paymentStatus: true,\n cancelReason: true,\n },\n },\n refunds: {\n columns: {\n refundStatus: true,\n refundAmount: true,\n },\n },\n },\n orderBy: [desc(orders.createdAt)],\n limit: pageSize,\n offset: offset,\n }) as Promise\n}\n\nexport async function getOrderCount(userId: number): Promise {\n const result = await db\n .select({ count: sql`count(*)` })\n .from(orders)\n .where(eq(orders.userId, userId))\n\n return Number(result[0]?.count ?? 0)\n}\n\nexport async function getOrderByIdWithRelations(\n orderId: number,\n userId: number\n): Promise {\n const order = await db.query.orders.findFirst({\n where: and(eq(orders.id, orderId), eq(orders.userId, userId)),\n with: {\n orderItems: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n slot: {\n columns: {\n deliveryTime: true,\n },\n },\n paymentInfo: {\n columns: {\n id: true,\n status: true,\n },\n },\n orderStatus: {\n columns: {\n id: true,\n isCancelled: true,\n isDelivered: true,\n paymentStatus: true,\n cancelReason: true,\n },\n with: {\n refundCoupon: {\n columns: {\n id: true,\n couponCode: true,\n },\n },\n },\n },\n refunds: {\n columns: {\n refundStatus: true,\n refundAmount: true,\n },\n },\n },\n })\n\n return order as OrderDetailWithRelations | null\n}\n\nexport async function getCouponUsageForOrder(\n orderId: number\n): Promise {\n return db.query.couponUsage.findMany({\n where: eq(couponUsage.orderId, orderId),\n with: {\n coupon: {\n columns: {\n id: true,\n couponCode: true,\n discountPercent: true,\n flatDiscount: true,\n maxValue: true,\n },\n },\n },\n }) as Promise\n}\n\nexport async function getOrderBasic(orderId: number) {\n return db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n orderStatus: {\n columns: {\n id: true,\n isCancelled: true,\n isDelivered: true,\n },\n },\n },\n })\n}\n\nexport async function cancelOrderTransaction(\n orderId: number,\n statusId: number,\n reason: string,\n isCod: boolean\n): Promise {\n await db.transaction(async (tx) => {\n await tx\n .update(orderStatus)\n .set({\n isCancelled: true,\n cancelReason: reason,\n cancellationUserNotes: reason,\n cancellationReviewed: false,\n })\n .where(eq(orderStatus.id, statusId))\n\n const refundStatus = isCod ? 'na' : 'pending'\n\n await tx.insert(refunds).values({\n orderId,\n refundStatus,\n })\n })\n}\n\nexport async function updateOrderNotes(\n orderId: number,\n userNotes: string\n): Promise {\n await db\n .update(orders)\n .set({\n userNotes: userNotes || null,\n })\n .where(eq(orders.id, orderId))\n}\n\nexport async function getRecentlyDeliveredOrderIds(\n userId: number,\n limit: number,\n since: Date\n): Promise {\n const recentOrders = await db\n .select({ id: orders.id })\n .from(orders)\n .innerJoin(orderStatus, eq(orders.id, orderStatus.orderId))\n .where(\n and(\n eq(orders.userId, userId),\n eq(orderStatus.isDelivered, true),\n gte(orders.createdAt, since)\n )\n )\n .orderBy(desc(orders.createdAt))\n .limit(limit)\n\n return recentOrders.map((order) => order.id)\n}\n\nexport async function getProductIdsFromOrders(\n orderIds: number[]\n): Promise {\n const orderItemsResult = await db\n .select({ productId: orderItems.productId })\n .from(orderItems)\n .where(inArray(orderItems.orderId, orderIds))\n\n return [...new Set(orderItemsResult.map((item) => item.productId))]\n}\n\nexport interface RecentProductData {\n id: number\n name: string\n shortDescription: string | null\n price: string\n images: unknown\n isOutOfStock: boolean\n unitShortNotation: string\n incrementStep: number\n}\n\nexport async function getProductsForRecentOrders(\n productIds: number[],\n limit: number\n): Promise {\n const results = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(\n and(\n inArray(productInfo.id, productIds),\n eq(productInfo.isSuspended, false)\n )\n )\n .orderBy(desc(productInfo.createdAt))\n .limit(limit)\n\n return results.map((product) => ({\n ...product,\n price: String(product.price ?? '0'),\n }))\n}\n\n// ============================================================================\n// Post-Order Handler Helpers (for Telegram notifications)\n// ============================================================================\n\nexport interface OrderWithFullData {\n id: number\n totalAmount: string\n isFlashDelivery: boolean\n address: {\n name: string | null\n addressLine1: string | null\n addressLine2: string | null\n city: string | null\n state: string | null\n pincode: string | null\n phone: string | null\n } | null\n orderItems: Array<{\n quantity: string\n product: {\n name: string\n } | null\n }>\n slot: {\n deliveryTime: Date\n } | null\n}\n\nexport async function getOrdersByIdsWithFullData(\n orderIds: number[]\n): Promise {\n return db.query.orders.findMany({\n where: inArray(orders.id, orderIds),\n with: {\n address: {\n columns: {\n name: true,\n addressLine1: true,\n addressLine2: true,\n city: true,\n state: true,\n pincode: true,\n phone: true,\n },\n },\n orderItems: {\n with: {\n product: {\n columns: {\n name: true,\n },\n },\n },\n },\n slot: {\n columns: {\n deliveryTime: true,\n },\n },\n },\n }) as Promise\n}\n\nexport interface OrderWithCancellationData extends OrderWithFullData {\n refunds: Array<{\n refundStatus: string\n }>\n}\n\nexport async function getOrderByIdWithFullData(\n orderId: number\n): Promise {\n return db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n address: {\n columns: {\n name: true,\n addressLine1: true,\n addressLine2: true,\n city: true,\n state: true,\n pincode: true,\n phone: true,\n },\n },\n orderItems: {\n with: {\n product: {\n columns: {\n name: true,\n },\n },\n },\n },\n slot: {\n columns: {\n deliveryTime: true,\n },\n },\n refunds: {\n columns: {\n refundStatus: true,\n },\n },\n },\n }) as Promise\n}\n", "// Store Helpers - Database operations for cache initialization\n// These are used by stores in apps/backend/src/stores/\n\nimport { db } from '../db/db_index'\nimport {\n homeBanners,\n productInfo,\n units,\n productSlots,\n deliverySlotInfo,\n specialDeals,\n storeInfo,\n productTags,\n productTagInfo,\n userIncidents,\n} from '../db/schema'\nimport { eq, and, gt, sql, isNotNull, asc } from 'drizzle-orm'\n\n// ============================================================================\n// BANNER STORE HELPERS\n// ============================================================================\n\nexport interface BannerData {\n id: number\n name: string\n imageUrl: string | null\n serialNum: number | null\n productIds: number[] | null\n createdAt: Date\n}\n\nexport async function getAllBannersForCache(): Promise {\n return db.query.homeBanners.findMany({\n where: isNotNull(homeBanners.serialNum),\n orderBy: asc(homeBanners.serialNum),\n })\n}\n\n// ============================================================================\n// PRODUCT STORE HELPERS\n// ============================================================================\n\nexport interface ProductBasicData {\n id: number\n name: string\n shortDescription: string | null\n longDescription: string | null\n price: string\n marketPrice: string | null\n images: unknown\n isOutOfStock: boolean\n storeId: number | null\n unitShortNotation: string\n incrementStep: number\n productQuantity: number\n isFlashAvailable: boolean\n flashPrice: string | null\n}\n\nexport interface StoreBasicData {\n id: number\n name: string\n description: string | null\n}\n\nexport interface DeliverySlotData {\n productId: number\n id: number\n deliveryTime: Date\n freezeTime: Date\n isCapacityFull: boolean\n}\n\nexport interface SpecialDealData {\n productId: number\n quantity: string\n price: string\n validTill: Date\n}\n\nexport interface ProductTagData {\n productId: number\n tagName: string\n}\n\nexport async function getAllProductsForCache(): Promise {\n const results = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n longDescription: productInfo.longDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n storeId: productInfo.storeId,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n productQuantity: productInfo.productQuantity,\n isFlashAvailable: productInfo.isFlashAvailable,\n flashPrice: productInfo.flashPrice,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n\n return results.map((product) => ({\n ...product,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n flashPrice: product.flashPrice ? String(product.flashPrice) : null,\n }))\n}\n\nexport async function getAllStoresForCache(): Promise {\n return db.query.storeInfo.findMany({\n columns: { id: true, name: true, description: true },\n })\n}\n\nexport async function getAllDeliverySlotsForCache(): Promise {\n return db\n .select({\n productId: productSlots.productId,\n id: deliverySlotInfo.id,\n deliveryTime: deliverySlotInfo.deliveryTime,\n freezeTime: deliverySlotInfo.freezeTime,\n isCapacityFull: deliverySlotInfo.isCapacityFull,\n })\n .from(productSlots)\n .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n .where(\n and(\n eq(deliverySlotInfo.isActive, true),\n eq(deliverySlotInfo.isCapacityFull, false),\n gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`)\n )\n )\n}\n\nexport async function getAllSpecialDealsForCache(): Promise {\n const results = await db\n .select({\n productId: specialDeals.productId,\n quantity: specialDeals.quantity,\n price: specialDeals.price,\n validTill: specialDeals.validTill,\n })\n .from(specialDeals)\n .where(gt(specialDeals.validTill, sql`CURRENT_TIMESTAMP`))\n\n return results.map((deal) => ({\n ...deal,\n quantity: String(deal.quantity ?? '0'),\n price: String(deal.price ?? '0'),\n }))\n}\n\nexport async function getAllProductTagsForCache(): Promise {\n return db\n .select({\n productId: productTags.productId,\n tagName: productTagInfo.tagName,\n })\n .from(productTags)\n .innerJoin(productTagInfo, eq(productTags.tagId, productTagInfo.id))\n}\n\n// ============================================================================\n// PRODUCT TAG STORE HELPERS\n// ============================================================================\n\nexport interface TagBasicData {\n id: number\n tagName: string\n tagDescription: string | null\n imageUrl: string | null\n isDashboardTag: boolean\n relatedStores: unknown\n}\n\nexport interface TagProductMapping {\n tagId: number\n productId: number\n}\n\nexport async function getAllTagsForCache(): Promise {\n return db\n .select({\n id: productTagInfo.id,\n tagName: productTagInfo.tagName,\n tagDescription: productTagInfo.tagDescription,\n imageUrl: productTagInfo.imageUrl,\n isDashboardTag: productTagInfo.isDashboardTag,\n relatedStores: productTagInfo.relatedStores,\n })\n .from(productTagInfo)\n}\n\nexport async function getAllTagProductMappings(): Promise {\n return db\n .select({\n tagId: productTags.tagId,\n productId: productTags.productId,\n })\n .from(productTags)\n}\n\n// ============================================================================\n// SLOT STORE HELPERS\n// ============================================================================\n\nexport interface SlotWithProductsData {\n id: number\n deliveryTime: Date\n freezeTime: Date\n isActive: boolean\n isCapacityFull: boolean\n productSlots: Array<{\n product: {\n id: number\n name: string\n productQuantity: number\n shortDescription: string | null\n price: string\n marketPrice: string | null\n unit: { shortNotation: string } | null\n store: { id: number; name: string; description: string | null } | null\n images: unknown\n isOutOfStock: boolean\n storeId: number | null\n }\n }>\n}\n\nexport async function getAllSlotsWithProductsForCache(): Promise {\n const now = new Date()\n \n return db.query.deliverySlotInfo.findMany({\n where: and(\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, now)\n ),\n with: {\n productSlots: {\n with: {\n product: {\n with: {\n unit: true,\n store: true,\n },\n },\n },\n },\n },\n orderBy: asc(deliverySlotInfo.deliveryTime),\n }) as Promise\n}\n\n// ============================================================================\n// USER NEGATIVITY STORE HELPERS\n// ============================================================================\n\nexport interface UserNegativityData {\n userId: number\n totalNegativityScore: number\n}\n\nexport async function getAllUserNegativityScores(): Promise {\n const results = await db\n .select({\n userId: userIncidents.userId,\n totalNegativityScore: sql`sum(${userIncidents.negativityScore})`,\n })\n .from(userIncidents)\n .groupBy(userIncidents.userId)\n\n return results.map((result) => ({\n userId: result.userId,\n totalNegativityScore: Number(result.totalNegativityScore ?? 0),\n }))\n}\n\nexport async function getUserNegativityScore(userId: number): Promise {\n const [result] = await db\n .select({\n totalNegativityScore: sql`sum(${userIncidents.negativityScore})`,\n })\n .from(userIncidents)\n .where(eq(userIncidents.userId, userId))\n .limit(1)\n\n return Number(result?.totalNegativityScore ?? 0)\n}\n", "import { db } from '../db/db_index'\nimport { productInfo, keyValStore } from '../db/schema'\nimport { inArray, eq } from 'drizzle-orm'\n\n/**\n * Toggle flash delivery availability for specific products\n * @param isAvailable - Whether flash delivery should be available\n * @param productIds - Array of product IDs to update\n */\nexport async function toggleFlashDeliveryForItems(\n isAvailable: boolean,\n productIds: number[]\n): Promise {\n await db\n .update(productInfo)\n .set({ isFlashAvailable: isAvailable })\n .where(inArray(productInfo.id, productIds))\n}\n\n/**\n * Update key-value store\n * @param key - The key to update\n * @param value - The boolean value to set\n */\nexport async function toggleKeyVal(\n key: string,\n value: boolean\n): Promise {\n await db\n .update(keyValStore)\n .set({ value })\n .where(eq(keyValStore.key, key))\n}\n\n/**\n * Get all key-value store constants\n * @returns Array of all key-value pairs\n */\nexport async function getAllKeyValStore(): Promise> {\n return db.select().from(keyValStore)\n}\n", "import { db } from '../db/db_index'\nimport { keyValStore, productInfo } from '../db/schema'\n\n/**\n * Health check - test database connectivity\n * Tries to select from keyValStore first, falls back to productInfo\n */\nexport async function healthCheck(): Promise<{ status: string }> {\n try {\n // Try keyValStore first (smaller table)\n await db.select({ key: keyValStore.key }).from(keyValStore).limit(1)\n return { status: 'ok' }\n } catch {\n // Fallback to productInfo\n await db.select({ name: productInfo.name }).from(productInfo).limit(1)\n return { status: 'ok' }\n }\n}\n", "import { db } from '../db/db_index'\nimport { orders, orderItems, orderStatus, payments, refunds, couponUsage, complaints } from '../db/schema'\nimport { inArray } from 'drizzle-orm'\n\n/**\n * Delete orders and all their related records\n * @param orderIds Array of order IDs to delete\n * @returns Promise\n * @throws Error if deletion fails\n */\nexport async function deleteOrdersWithRelations(orderIds: number[]): Promise {\n if (orderIds.length === 0) {\n return\n }\n\n // Delete child records first (in correct order to avoid FK constraint errors)\n\n // 1. Delete coupon usage records\n await db.delete(couponUsage).where(inArray(couponUsage.orderId, orderIds))\n\n // 2. Delete complaints related to these orders\n await db.delete(complaints).where(inArray(complaints.orderId, orderIds))\n\n // 3. Delete refunds\n await db.delete(refunds).where(inArray(refunds.orderId, orderIds))\n\n // 4. Delete payments\n await db.delete(payments).where(inArray(payments.orderId, orderIds))\n\n // 5. Delete order status records\n await db.delete(orderStatus).where(inArray(orderStatus.orderId, orderIds))\n\n // 6. Delete order items\n await db.delete(orderItems).where(inArray(orderItems.orderId, orderIds))\n\n // 7. Finally delete the orders themselves\n await db.delete(orders).where(inArray(orders.id, orderIds))\n}\n", "import { and, eq } from 'drizzle-orm'\nimport { db } from '../db/db_index'\nimport { uploadUrlStatus } from '../db/schema'\n\nexport async function createUploadUrlStatus(key: string): Promise {\n await db.insert(uploadUrlStatus).values({\n key,\n status: 'pending',\n })\n}\n\nexport async function claimUploadUrlStatus(key: string): Promise {\n const result = await db\n .update(uploadUrlStatus)\n .set({ status: 'claimed' })\n .where(and(eq(uploadUrlStatus.key, key), eq(uploadUrlStatus.status, 'pending')))\n .returning()\n\n return result.length > 0\n}\n", "import { db } from '../db/db_index'\nimport { eq, and } from 'drizzle-orm'\n\n// ============================================================================\n// Unit Seed Helper\n// ============================================================================\n\nexport interface UnitSeedData {\n shortNotation: string\n fullName: string\n}\n\nexport async function seedUnits(unitsToSeed: UnitSeedData[]): Promise {\n for (const unit of unitsToSeed) {\n const { units: unitsTable } = await import('../db/schema')\n const existingUnit = await db.query.units.findFirst({\n where: eq(unitsTable.shortNotation, unit.shortNotation),\n })\n if (!existingUnit) {\n await db.insert(unitsTable).values(unit)\n }\n }\n}\n\n// ============================================================================\n// Staff Role Seed Helper\n// ============================================================================\n\n// Type for staff role names based on the enum values in schema\nexport type StaffRoleName = 'super_admin' | 'admin' | 'marketer' | 'delivery_staff'\n\nexport async function seedStaffRoles(rolesToSeed: StaffRoleName[]): Promise {\n for (const roleName of rolesToSeed) {\n const { staffRoles } = await import('../db/schema')\n const existingRole = await db.query.staffRoles.findFirst({\n where: eq(staffRoles.roleName, roleName),\n })\n if (!existingRole) {\n await db.insert(staffRoles).values({ roleName })\n }\n }\n}\n\n// ============================================================================\n// Staff Permission Seed Helper\n// ============================================================================\n\n// Type for staff permission names based on the enum values in schema\nexport type StaffPermissionName = 'crud_product' | 'make_coupon' | 'crud_staff_users'\n\nexport async function seedStaffPermissions(permissionsToSeed: StaffPermissionName[]): Promise {\n for (const permissionName of permissionsToSeed) {\n const { staffPermissions } = await import('../db/schema')\n const existingPermission = await db.query.staffPermissions.findFirst({\n where: eq(staffPermissions.permissionName, permissionName),\n })\n if (!existingPermission) {\n await db.insert(staffPermissions).values({ permissionName })\n }\n }\n}\n\n// ============================================================================\n// Role-Permission Assignment Helper\n// ============================================================================\n\nexport interface RolePermissionAssignment {\n roleName: StaffRoleName\n permissionName: StaffPermissionName\n}\n\nexport async function seedRolePermissions(assignments: RolePermissionAssignment[]): Promise {\n await db.transaction(async (tx) => {\n const { staffRoles, staffPermissions, staffRolePermissions } = await import('../db/schema')\n\n for (const assignment of assignments) {\n // Get role ID\n const role = await tx.query.staffRoles.findFirst({\n where: eq(staffRoles.roleName, assignment.roleName),\n })\n\n // Get permission ID\n const permission = await tx.query.staffPermissions.findFirst({\n where: eq(staffPermissions.permissionName, assignment.permissionName),\n })\n\n if (role && permission) {\n const existing = await tx.query.staffRolePermissions.findFirst({\n where: and(\n eq(staffRolePermissions.staffRoleId, role.id),\n eq(staffRolePermissions.staffPermissionId, permission.id)\n ),\n })\n if (!existing) {\n await tx.insert(staffRolePermissions).values({\n staffRoleId: role.id,\n staffPermissionId: permission.id,\n })\n }\n }\n }\n })\n}\n\n// ============================================================================\n// Key-Value Store Seed Helper\n// ============================================================================\n\nexport interface KeyValSeedData {\n key: string\n value: any\n}\n\nexport async function seedKeyValStore(constantsToSeed: KeyValSeedData[]): Promise {\n for (const constant of constantsToSeed) {\n const { keyValStore } = await import('../db/schema')\n const existing = await db.query.keyValStore.findFirst({\n where: eq(keyValStore.key, constant.key),\n })\n if (!existing) {\n await db.insert(keyValStore).values({\n key: constant.key,\n value: constant.value,\n })\n }\n }\n}\n", "// Database Helper - SQLite (Cloudflare D1)\n// Main entry point for the package\n\n// Re-export database connection\nexport { db, initDb } from './src/db/db_index'\n// Re-export schema\nexport * from './src/db/schema'\n\n// Export enum types for type safety\nexport { staffRoleEnum, staffPermissionEnum } from './src/db/schema'\n\n// Admin API helpers - explicitly namespaced exports to avoid duplicates\nexport {\n // Banner\n getBanners,\n getBannerById,\n createBanner,\n updateBanner,\n deleteBanner,\n} from './src/admin-apis/banner'\n\nexport {\n // Complaint\n getComplaints,\n resolveComplaint,\n} from './src/admin-apis/complaint'\n\nexport {\n // Constants\n getAllConstants,\n upsertConstants,\n} from './src/admin-apis/const'\n\nexport {\n // Coupon\n getAllCoupons,\n getCouponById,\n invalidateCoupon,\n validateCoupon,\n getReservedCoupons,\n getUsersForCoupon,\n createCouponWithRelations,\n updateCouponWithRelations,\n generateCancellationCoupon,\n createReservedCouponWithProducts,\n createCouponForUser,\n checkUsersExist,\n checkCouponExists,\n checkReservedCouponExists,\n getOrderWithUser,\n} from './src/admin-apis/coupon'\n\nexport {\n // Order\n updateOrderNotes,\n getOrderDetails,\n updateOrderPackaged,\n updateOrderDelivered,\n updateOrderItemPackaging,\n removeDeliveryCharge,\n getSlotOrders,\n updateAddressCoords,\n getAllOrders,\n rebalanceSlots,\n cancelOrder,\n deleteOrderById,\n} from './src/admin-apis/order'\n\nexport {\n // Product\n getAllProducts,\n getProductById,\n deleteProduct,\n createProduct,\n updateProduct,\n checkProductExistsByName,\n checkUnitExists,\n getProductImagesById,\n createSpecialDealsForProduct,\n updateProductDeals,\n replaceProductTags,\n toggleProductOutOfStock,\n updateSlotProducts,\n getSlotProductIds,\n getSlotsProductIds,\n getAllUnits,\n getAllProductTags,\n getAllProductTagInfos,\n getProductTagInfoById,\n createProductTag,\n getProductTagById,\n updateProductTag,\n deleteProductTag,\n checkProductTagExistsByName,\n getProductReviews,\n respondToReview,\n getAllProductGroups,\n createProductGroup,\n updateProductGroup,\n deleteProductGroup,\n addProductToGroup,\n removeProductFromGroup,\n updateProductPrices,\n} from './src/admin-apis/product'\n\nexport {\n // Slots\n getActiveSlotsWithProducts,\n getActiveSlots,\n getSlotsAfterDate,\n getSlotByIdWithRelations,\n createSlotWithRelations,\n updateSlotWithRelations,\n deleteSlotById,\n updateSlotCapacity,\n getSlotDeliverySequence,\n updateSlotDeliverySequence,\n} from './src/admin-apis/slots'\n\nexport {\n // Staff User\n getStaffUserByName,\n getStaffUserById,\n getAllStaff,\n getAllUsers,\n getUserWithDetails,\n updateUserSuspensionStatus,\n checkStaffUserExists,\n checkStaffRoleExists,\n createStaffUser,\n getAllRoles,\n} from './src/admin-apis/staff-user'\n\nexport {\n // Store\n getAllStores,\n getStoreById,\n createStore,\n updateStore,\n deleteStore,\n} from './src/admin-apis/store'\n\nexport {\n // User\n createUserByMobile,\n getUserByMobile,\n getUnresolvedComplaintsCount,\n getAllUsersWithFilters,\n getOrderCountsByUserIds,\n getLastOrdersByUserIds,\n getSuspensionStatusesByUserIds,\n getUserBasicInfo,\n getUserSuspensionStatus,\n getUserOrders,\n getOrderStatusesByOrderIds,\n getItemCountsByOrderIds,\n upsertUserSuspension,\n searchUsers,\n getAllNotifCreds,\n getAllUnloggedTokens,\n getNotifTokensByUserIds,\n getUserIncidentsWithRelations,\n createUserIncident,\n} from './src/admin-apis/user'\n\nexport {\n // Vendor Snippets\n checkVendorSnippetExists,\n getVendorSnippetById,\n getVendorSnippetByCode,\n getAllVendorSnippets,\n createVendorSnippet,\n updateVendorSnippet,\n deleteVendorSnippet,\n getProductsByIds,\n getVendorSlotById,\n getVendorOrdersBySlotId,\n getOrderItemsByOrderIds,\n getOrderStatusByOrderIds,\n updateVendorOrderItemPackaging,\n getVendorOrders,\n} from './src/admin-apis/vendor-snippets'\n\nexport {\n // User Address\n getDefaultAddress as getUserDefaultAddress,\n getUserAddresses,\n getUserAddressById,\n clearDefaultAddress as clearUserDefaultAddress,\n createUserAddress,\n updateUserAddress,\n deleteUserAddress,\n hasOngoingOrdersForAddress,\n} from './src/user-apis/address'\n\nexport {\n // User Banners\n getActiveBanners as getUserActiveBanners,\n} from './src/user-apis/banners'\n\nexport {\n // User Cart\n getCartItemsWithProducts as getUserCartItemsWithProducts,\n getProductById as getUserProductById,\n getCartItemByUserProduct as getUserCartItemByUserProduct,\n incrementCartItemQuantity as incrementUserCartItemQuantity,\n insertCartItem as insertUserCartItem,\n updateCartItemQuantity as updateUserCartItemQuantity,\n deleteCartItem as deleteUserCartItem,\n clearUserCart,\n} from './src/user-apis/cart'\n\nexport {\n // User Complaint\n getUserComplaints as getUserComplaints,\n createComplaint as createUserComplaint,\n} from './src/user-apis/complaint'\n\nexport {\n // User Stores\n getStoreSummaries as getUserStoreSummaries,\n getStoreDetail as getUserStoreDetail,\n} from './src/user-apis/stores'\n\nexport {\n // User Product\n getProductDetailById as getUserProductDetailById,\n getProductReviews as getUserProductReviews,\n getProductById as getUserProductByIdBasic,\n createProductReview as createUserProductReview,\n getAllProductsWithUnits,\n type ProductSummaryData,\n} from './src/user-apis/product'\n\nexport {\n // User Slots\n getActiveSlotsList as getUserActiveSlotsList,\n getProductAvailability as getUserProductAvailability,\n} from './src/user-apis/slots'\n\nexport {\n // User Payments\n getOrderById as getUserPaymentOrderById,\n getPaymentByOrderId as getUserPaymentByOrderId,\n getPaymentByMerchantOrderId as getUserPaymentByMerchantOrderId,\n updatePaymentSuccess as updateUserPaymentSuccess,\n updateOrderPaymentStatus as updateUserOrderPaymentStatus,\n markPaymentFailed as markUserPaymentFailed,\n} from './src/user-apis/payments'\n\nexport {\n // User Auth\n getUserByEmail as getUserAuthByEmail,\n getUserByMobile as getUserAuthByMobile,\n getUserById as getUserAuthById,\n getUserCreds as getUserAuthCreds,\n getUserDetails as getUserAuthDetails,\n isUserSuspended,\n createUserWithCreds as createUserAuthWithCreds,\n createUserWithMobile as createUserAuthWithMobile,\n upsertUserPassword as upsertUserAuthPassword,\n deleteUserAccount as deleteUserAuthAccount,\n // UV API helpers\n createUserWithProfile,\n getUserDetailsByUserId,\n updateUserProfile,\n} from './src/user-apis/auth'\n\nexport {\n // User Coupon\n getActiveCouponsWithRelations as getUserActiveCouponsWithRelations,\n getAllCouponsWithRelations as getUserAllCouponsWithRelations,\n getReservedCouponByCode as getUserReservedCouponByCode,\n redeemReservedCoupon as redeemUserReservedCoupon,\n} from './src/user-apis/coupon'\n\nexport {\n // User Profile\n getUserById as getUserProfileById,\n getUserDetailByUserId as getUserProfileDetailById,\n getUserWithCreds as getUserWithCreds,\n getNotifCred as getUserNotifCred,\n upsertNotifCred as upsertUserNotifCred,\n deleteUnloggedToken as deleteUserUnloggedToken,\n getUnloggedToken as getUserUnloggedToken,\n upsertUnloggedToken as upsertUserUnloggedToken,\n} from './src/user-apis/user'\n\nexport {\n // User Order\n validateAndGetCoupon as validateAndGetUserCoupon,\n applyDiscountToOrder as applyDiscountToUserOrder,\n getAddressByIdAndUser as getUserAddressByIdAndUser,\n getProductById as getOrderProductById,\n checkUserSuspended,\n getSlotCapacityStatus as getUserSlotCapacityStatus,\n placeOrderTransaction as placeUserOrderTransaction,\n deleteCartItemsForOrder as deleteUserCartItemsForOrder,\n recordCouponUsage as recordUserCouponUsage,\n getOrdersWithRelations as getUserOrdersWithRelations,\n getOrderCount as getUserOrderCount,\n getOrderByIdWithRelations as getUserOrderByIdWithRelations,\n getCouponUsageForOrder as getUserCouponUsageForOrder,\n getOrderBasic as getUserOrderBasic,\n cancelOrderTransaction as cancelUserOrderTransaction,\n updateOrderNotes as updateUserOrderNotes,\n getRecentlyDeliveredOrderIds as getUserRecentlyDeliveredOrderIds,\n getProductIdsFromOrders as getUserProductIdsFromOrders,\n getProductsForRecentOrders as getUserProductsForRecentOrders,\n // Post-order handler helpers\n getOrdersByIdsWithFullData,\n getOrderByIdWithFullData,\n type OrderWithFullData,\n type OrderWithCancellationData,\n} from './src/user-apis/order'\n\n// Store Helpers (for cache initialization)\nexport {\n // Banner Store\n getAllBannersForCache,\n type BannerData,\n // Product Store\n getAllProductsForCache,\n getAllStoresForCache,\n getAllDeliverySlotsForCache,\n getAllSpecialDealsForCache,\n getAllProductTagsForCache,\n type ProductBasicData,\n type StoreBasicData,\n type DeliverySlotData,\n type SpecialDealData,\n type ProductTagData,\n // Product Tag Store\n getAllTagsForCache,\n getAllTagProductMappings,\n type TagBasicData,\n type TagProductMapping,\n // Slot Store\n getAllSlotsWithProductsForCache,\n type SlotWithProductsData,\n // User Negativity Store\n getAllUserNegativityScores,\n getUserNegativityScore,\n type UserNegativityData,\n} from './src/stores/store-helpers'\n\n// Automated Jobs Helpers\nexport {\n toggleFlashDeliveryForItems,\n toggleKeyVal,\n getAllKeyValStore,\n} from './src/lib/automated-jobs'\n\n// Health Check\nexport {\n healthCheck,\n} from './src/lib/health-check'\n\n// Common API Helpers\nexport {\n getSuspendedProductIds,\n getNextDeliveryDateWithCapacity,\n} from './src/user-apis/product'\n\nexport {\n getStoresSummary,\n} from './src/user-apis/stores'\n\n// Delete Orders Helper\nexport {\n deleteOrdersWithRelations,\n} from './src/lib/delete-orders'\n\n// Upload URL Helpers\nexport {\n createUploadUrlStatus,\n claimUploadUrlStatus,\n} from './src/helper_methods/upload-url'\n\n// Seed Helpers\nexport {\n seedUnits,\n seedStaffRoles,\n seedStaffPermissions,\n seedRolePermissions,\n seedKeyValStore,\n type UnitSeedData,\n type RolePermissionAssignment,\n type KeyValSeedData,\n type StaffRoleName,\n type StaffPermissionName,\n} from './src/lib/seed'\n", "// SQLite Importer - Intermediate layer to avoid direct db_helper_sqlite imports in dbService\n// This file re-exports everything from sqliteService\n\n// Re-export database connection\nexport { db, initDb } from 'sqliteService'\n\n// Re-export all schema exports\nexport * from 'sqliteService'\n\n// Re-export all helper methods from sqliteService\nexport {\n // Admin - Banner\n getBanners,\n getBannerById,\n createBanner,\n updateBanner,\n deleteBanner,\n // Admin - Complaint\n getComplaints,\n resolveComplaint,\n // Admin - Constants\n getAllConstants,\n upsertConstants,\n // Admin - Coupon\n getAllCoupons,\n getCouponById,\n invalidateCoupon,\n validateCoupon,\n getReservedCoupons,\n getUsersForCoupon,\n createCouponWithRelations,\n updateCouponWithRelations,\n generateCancellationCoupon,\n createReservedCouponWithProducts,\n createCouponForUser,\n checkUsersExist,\n checkCouponExists,\n checkReservedCouponExists,\n getOrderWithUser,\n // Admin - Order\n updateOrderNotes,\n getOrderDetails,\n updateOrderPackaged,\n updateOrderDelivered,\n updateOrderItemPackaging,\n removeDeliveryCharge,\n getSlotOrders,\n updateAddressCoords,\n getAllOrders,\n rebalanceSlots,\n cancelOrder,\n deleteOrderById,\n // Admin - Product\n getAllProducts,\n getProductById,\n deleteProduct,\n createProduct,\n updateProduct,\n checkProductExistsByName,\n checkUnitExists,\n getProductImagesById,\n createSpecialDealsForProduct,\n updateProductDeals,\n replaceProductTags,\n toggleProductOutOfStock,\n updateSlotProducts,\n getSlotProductIds,\n getSlotsProductIds,\n getAllUnits,\n getAllProductTags,\n getAllProductTagInfos,\n getProductTagInfoById,\n createProductTag,\n getProductTagById,\n updateProductTag,\n deleteProductTag,\n checkProductTagExistsByName,\n getProductReviews,\n respondToReview,\n getAllProductGroups,\n createProductGroup,\n updateProductGroup,\n deleteProductGroup,\n addProductToGroup,\n removeProductFromGroup,\n updateProductPrices,\n // Admin - Slots\n getActiveSlotsWithProducts,\n getActiveSlots,\n getSlotsAfterDate,\n getSlotByIdWithRelations,\n createSlotWithRelations,\n updateSlotWithRelations,\n deleteSlotById,\n updateSlotCapacity,\n getSlotDeliverySequence,\n updateSlotDeliverySequence,\n // Admin - Staff User\n getStaffUserByName,\n getStaffUserById,\n getAllStaff,\n getAllUsers,\n getUserWithDetails,\n updateUserSuspensionStatus,\n checkStaffUserExists,\n checkStaffRoleExists,\n createStaffUser,\n getAllRoles,\n // Admin - Store\n getAllStores,\n getStoreById,\n createStore,\n updateStore,\n deleteStore,\n // Admin - User\n createUserByMobile,\n getUserByMobile,\n getUnresolvedComplaintsCount,\n getAllUsersWithFilters,\n getOrderCountsByUserIds,\n getLastOrdersByUserIds,\n getSuspensionStatusesByUserIds,\n getUserBasicInfo,\n getUserSuspensionStatus,\n getUserOrders,\n getOrderStatusesByOrderIds,\n getItemCountsByOrderIds,\n upsertUserSuspension,\n searchUsers,\n getAllNotifCreds,\n getAllUnloggedTokens,\n getNotifTokensByUserIds,\n getUserIncidentsWithRelations,\n createUserIncident,\n // Admin - Vendor Snippets\n checkVendorSnippetExists,\n getVendorSnippetById,\n getVendorSnippetByCode,\n getAllVendorSnippets,\n createVendorSnippet,\n updateVendorSnippet,\n deleteVendorSnippet,\n getProductsByIds,\n getVendorSlotById,\n getVendorOrdersBySlotId,\n getOrderItemsByOrderIds,\n getOrderStatusByOrderIds,\n updateVendorOrderItemPackaging,\n getVendorOrders,\n // User - Address\n getUserDefaultAddress,\n getUserAddresses,\n getUserAddressById,\n clearUserDefaultAddress,\n createUserAddress,\n updateUserAddress,\n deleteUserAddress,\n hasOngoingOrdersForAddress,\n // User - Banners\n getUserActiveBanners,\n // User - Cart\n getUserCartItemsWithProducts,\n getUserProductById,\n getUserCartItemByUserProduct,\n incrementUserCartItemQuantity,\n insertUserCartItem,\n updateUserCartItemQuantity,\n deleteUserCartItem,\n clearUserCart,\n // User - Complaint\n getUserComplaints,\n createUserComplaint,\n // User - Stores\n getUserStoreSummaries,\n getUserStoreDetail,\n // User - Product\n getUserProductDetailById,\n getUserProductReviews,\n getUserProductByIdBasic,\n createUserProductReview,\n getAllProductsWithUnits,\n type ProductSummaryData,\n // User - Slots\n getUserActiveSlotsList,\n getUserProductAvailability,\n // User - Payments\n getUserPaymentOrderById,\n getUserPaymentByOrderId,\n getUserPaymentByMerchantOrderId,\n updateUserPaymentSuccess,\n updateUserOrderPaymentStatus,\n markUserPaymentFailed,\n // User - Auth\n getUserAuthByEmail,\n getUserAuthByMobile,\n getUserAuthById,\n getUserAuthCreds,\n getUserAuthDetails,\n isUserSuspended,\n createUserAuthWithCreds,\n createUserAuthWithMobile,\n upsertUserAuthPassword,\n deleteUserAuthAccount,\n // UV API helpers\n createUserWithProfile,\n getUserDetailsByUserId,\n updateUserProfile,\n // User - Coupon\n getUserActiveCouponsWithRelations,\n getUserAllCouponsWithRelations,\n getUserReservedCouponByCode,\n redeemUserReservedCoupon,\n // User - Profile\n getUserProfileById,\n getUserProfileDetailById,\n getUserWithCreds,\n getUserNotifCred,\n upsertUserNotifCred,\n deleteUserUnloggedToken,\n getUserUnloggedToken,\n upsertUserUnloggedToken,\n // User - Order\n validateAndGetUserCoupon,\n applyDiscountToUserOrder,\n getUserAddressByIdAndUser,\n getOrderProductById,\n checkUserSuspended,\n getUserSlotCapacityStatus,\n placeUserOrderTransaction,\n deleteUserCartItemsForOrder,\n recordUserCouponUsage,\n getUserOrdersWithRelations,\n getUserOrderCount,\n getUserOrderByIdWithRelations,\n getUserCouponUsageForOrder,\n getUserOrderBasic,\n cancelUserOrderTransaction,\n updateUserOrderNotes,\n getUserRecentlyDeliveredOrderIds,\n getUserProductIdsFromOrders,\n getUserProductsForRecentOrders,\n // Store Helpers\n getAllBannersForCache,\n getAllProductsForCache,\n getAllStoresForCache,\n getAllDeliverySlotsForCache,\n getAllSpecialDealsForCache,\n getAllProductTagsForCache,\n getAllTagsForCache,\n getAllTagProductMappings,\n getAllSlotsWithProductsForCache,\n getAllUserNegativityScores,\n getUserNegativityScore,\n type BannerData,\n type ProductBasicData,\n type StoreBasicData,\n type DeliverySlotData,\n type SpecialDealData,\n type ProductTagData,\n type TagBasicData,\n type TagProductMapping,\n type SlotWithProductsData,\n type UserNegativityData,\n // Automated Jobs\n toggleFlashDeliveryForItems,\n toggleKeyVal,\n getAllKeyValStore,\n // Post-order handler helpers\n getOrdersByIdsWithFullData,\n getOrderByIdWithFullData,\n type OrderWithFullData,\n type OrderWithCancellationData,\n // Common API helpers\n getSuspendedProductIds,\n getNextDeliveryDateWithCapacity,\n getStoresSummary,\n healthCheck,\n // Delete orders helper\n deleteOrdersWithRelations,\n // Seed helpers\n seedUnits,\n seedStaffRoles,\n seedStaffPermissions,\n seedRolePermissions,\n seedKeyValStore,\n type UnitSeedData,\n type RolePermissionAssignment,\n type KeyValSeedData,\n type StaffRoleName,\n type StaffPermissionName,\n // Upload URL Helpers\n createUploadUrlStatus,\n claimUploadUrlStatus,\n} from 'sqliteService'\n", "// Database Service - Central export for all database-related imports\n// This file re-exports everything from postgresImporter to provide a clean abstraction layer\n\nimport type { AdminOrderDetails } from '@packages/shared'\n// import { getOrderDetails } from '@/src/postgresImporter'\nimport { getOrderDetails, initDb } from '@/src/sqliteImporter'\n\n// Re-export everything from postgresImporter\n// export * from '@/src/postgresImporter'\n\nexport * from '@/src/sqliteImporter'\n\nexport { initDb }\n\n// Re-export getOrderDetails with the correct signature\nexport async function getOrderDetailsWrapper(orderId: number): Promise {\n return getOrderDetails(orderId)\n}\n\n// Re-export all types from shared package\nexport type {\n // Admin types\n Banner,\n Complaint,\n ComplaintWithUser,\n Constant,\n ConstantUpdateResult,\n Coupon,\n CouponValidationResult,\n UserMiniInfo,\n Store,\n StaffUser,\n StaffRole,\n AdminOrderRow,\n AdminOrderDetails,\n AdminOrderUpdateResult,\n AdminOrderItemPackagingResult,\n AdminOrderMessageResult,\n AdminOrderBasicResult,\n AdminGetSlotOrdersResult,\n AdminGetAllOrdersResult,\n AdminGetAllOrdersResultWithUserId,\n AdminRebalanceSlotsResult,\n AdminCancelOrderResult,\n AdminUnit,\n AdminProduct,\n AdminProductWithRelations,\n AdminProductWithDetails,\n AdminProductTagInfo,\n AdminProductTagWithProducts,\n AdminProductListResponse,\n AdminProductResponse,\n AdminDeleteProductResult,\n AdminToggleOutOfStockResult,\n AdminUpdateSlotProductsResult,\n AdminSlotProductIdsResult,\n AdminSlotsProductIdsResult,\n AdminProductReview,\n AdminProductReviewWithSignedUrls,\n AdminProductReviewsResult,\n AdminProductReviewResponse,\n AdminProductGroup,\n AdminProductGroupsResult,\n AdminProductGroupResponse,\n AdminProductGroupInfo,\n AdminUpdateProductPricesResult,\n AdminDeliverySlot,\n AdminSlotProductSummary,\n AdminSlotWithProducts,\n AdminSlotWithProductsAndSnippets,\n AdminSlotWithProductsAndSnippetsBase,\n AdminSlotsResult,\n AdminSlotsListResult,\n AdminSlotResult,\n AdminSlotCreateResult,\n AdminSlotUpdateResult,\n AdminSlotDeleteResult,\n AdminDeliverySequence,\n AdminDeliverySequenceResult,\n AdminUpdateDeliverySequenceResult,\n AdminUpdateSlotCapacityResult,\n AdminVendorSnippet,\n AdminVendorSnippetWithAccess,\n AdminVendorSnippetWithSlot,\n AdminVendorSnippetProduct,\n AdminVendorSnippetWithProducts,\n AdminVendorSnippetCreateInput,\n AdminVendorSnippetUpdateInput,\n AdminVendorSnippetDeleteResult,\n AdminVendorSnippetOrderProduct,\n AdminVendorSnippetOrderSummary,\n AdminVendorSnippetOrdersResult,\n AdminVendorSnippetOrdersWithSlotResult,\n AdminVendorOrderSummary,\n AdminUpcomingSlotsResult,\n AdminVendorUpdatePackagingResult,\n UserAddress,\n UserAddressResponse,\n UserAddressesResponse,\n UserAddressDeleteResponse,\n UserBanner,\n UserBannersResponse,\n UserCartProduct,\n UserCartItem,\n UserCartResponse,\n UserComplaint,\n UserComplaintsResponse,\n UserRaiseComplaintResponse,\n UserStoreSummary,\n UserStoreSummaryData,\n UserStoresResponse,\n UserStoreSampleProduct,\n UserStoreSampleProductData,\n UserStoreDetail,\n UserStoreDetailData,\n UserStoreProduct,\n UserStoreProductData,\n UserTagSummary,\n UserProductDetail,\n UserProductDetailData,\n UserProductReview,\n UserProductReviewWithSignedUrls,\n UserProductReviewsResponse,\n UserCreateReviewResponse,\n UserSlotProduct,\n UserSlotWithProducts,\n UserSlotData,\n UserSlotAvailability,\n UserDeliverySlot,\n UserSlotsResponse,\n UserSlotsWithProductsResponse,\n UserSlotsListResponse,\n UserPaymentOrderResponse,\n UserPaymentVerifyResponse,\n UserPaymentFailResponse,\n UserAuthProfile,\n UserAuthResponse,\n UserAuthResult,\n UserOtpVerifyResponse,\n UserPasswordUpdateResponse,\n UserProfileResponse,\n UserDeleteAccountResponse,\n UserCouponUsage,\n UserCouponApplicableUser,\n UserCouponApplicableProduct,\n UserCoupon,\n UserCouponWithRelations,\n UserEligibleCouponsResponse,\n UserCouponDisplay,\n UserMyCouponsResponse,\n UserRedeemCouponResponse,\n UserSelfDataResponse,\n UserProfileCompleteResponse,\n UserSavePushTokenResponse,\n UserOrderItemSummary,\n UserOrderSummary,\n UserOrdersResponse,\n UserOrderDetail,\n UserCancelOrderResponse,\n UserUpdateNotesResponse,\n UserRecentProduct,\n UserRecentProductsResponse,\n // Store types\n StoreSummary,\n StoresSummaryResponse,\n} from '@packages/shared';\n\nexport type {\n // User types\n User,\n UserDetails,\n Address,\n Product,\n CartItem,\n Order,\n OrderItem,\n Payment,\n} from '@packages/shared';\n", "export const encoder = new TextEncoder();\nexport const decoder = new TextDecoder();\nconst MAX_INT32 = 2 ** 32;\nexport function concat(...buffers) {\n const size = buffers.reduce((acc, { length }) => acc + length, 0);\n const buf = new Uint8Array(size);\n let i = 0;\n for (const buffer of buffers) {\n buf.set(buffer, i);\n i += buffer.length;\n }\n return buf;\n}\nfunction writeUInt32BE(buf, value, offset) {\n if (value < 0 || value >= MAX_INT32) {\n throw new RangeError(`value must be >= 0 and <= ${MAX_INT32 - 1}. Received ${value}`);\n }\n buf.set([value >>> 24, value >>> 16, value >>> 8, value & 0xff], offset);\n}\nexport function uint64be(value) {\n const high = Math.floor(value / MAX_INT32);\n const low = value % MAX_INT32;\n const buf = new Uint8Array(8);\n writeUInt32BE(buf, high, 0);\n writeUInt32BE(buf, low, 4);\n return buf;\n}\nexport function uint32be(value) {\n const buf = new Uint8Array(4);\n writeUInt32BE(buf, value);\n return buf;\n}\nexport function encode(string) {\n const bytes = new Uint8Array(string.length);\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code > 127) {\n throw new TypeError('non-ASCII string encountered in encode()');\n }\n bytes[i] = code;\n }\n return bytes;\n}\n", "export function encodeBase64(input) {\n if (Uint8Array.prototype.toBase64) {\n return input.toBase64();\n }\n const CHUNK_SIZE = 0x8000;\n const arr = [];\n for (let i = 0; i < input.length; i += CHUNK_SIZE) {\n arr.push(String.fromCharCode.apply(null, input.subarray(i, i + CHUNK_SIZE)));\n }\n return btoa(arr.join(''));\n}\nexport function decodeBase64(encoded) {\n if (Uint8Array.fromBase64) {\n return Uint8Array.fromBase64(encoded);\n }\n const binary = atob(encoded);\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i);\n }\n return bytes;\n}\n", "import { encoder, decoder } from '../lib/buffer_utils.js';\nimport { encodeBase64, decodeBase64 } from '../lib/base64.js';\nexport function decode(input) {\n if (Uint8Array.fromBase64) {\n return Uint8Array.fromBase64(typeof input === 'string' ? input : decoder.decode(input), {\n alphabet: 'base64url',\n });\n }\n let encoded = input;\n if (encoded instanceof Uint8Array) {\n encoded = decoder.decode(encoded);\n }\n encoded = encoded.replace(/-/g, '+').replace(/_/g, '/');\n try {\n return decodeBase64(encoded);\n }\n catch {\n throw new TypeError('The input to be decoded is not correctly encoded.');\n }\n}\nexport function encode(input) {\n let unencoded = input;\n if (typeof unencoded === 'string') {\n unencoded = encoder.encode(unencoded);\n }\n if (Uint8Array.prototype.toBase64) {\n return unencoded.toBase64({ alphabet: 'base64url', omitPadding: true });\n }\n return encodeBase64(unencoded).replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n}\n", "const unusable = (name, prop = 'algorithm.name') => new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`);\nconst isAlgorithm = (algorithm, name) => algorithm.name === name;\nfunction getHashLength(hash) {\n return parseInt(hash.name.slice(4), 10);\n}\nfunction checkHashLength(algorithm, expected) {\n const actual = getHashLength(algorithm.hash);\n if (actual !== expected)\n throw unusable(`SHA-${expected}`, 'algorithm.hash');\n}\nfunction getNamedCurve(alg) {\n switch (alg) {\n case 'ES256':\n return 'P-256';\n case 'ES384':\n return 'P-384';\n case 'ES512':\n return 'P-521';\n default:\n throw new Error('unreachable');\n }\n}\nfunction checkUsage(key, usage) {\n if (usage && !key.usages.includes(usage)) {\n throw new TypeError(`CryptoKey does not support this operation, its usages must include ${usage}.`);\n }\n}\nexport function checkSigCryptoKey(key, alg, usage) {\n switch (alg) {\n case 'HS256':\n case 'HS384':\n case 'HS512': {\n if (!isAlgorithm(key.algorithm, 'HMAC'))\n throw unusable('HMAC');\n checkHashLength(key.algorithm, parseInt(alg.slice(2), 10));\n break;\n }\n case 'RS256':\n case 'RS384':\n case 'RS512': {\n if (!isAlgorithm(key.algorithm, 'RSASSA-PKCS1-v1_5'))\n throw unusable('RSASSA-PKCS1-v1_5');\n checkHashLength(key.algorithm, parseInt(alg.slice(2), 10));\n break;\n }\n case 'PS256':\n case 'PS384':\n case 'PS512': {\n if (!isAlgorithm(key.algorithm, 'RSA-PSS'))\n throw unusable('RSA-PSS');\n checkHashLength(key.algorithm, parseInt(alg.slice(2), 10));\n break;\n }\n case 'Ed25519':\n case 'EdDSA': {\n if (!isAlgorithm(key.algorithm, 'Ed25519'))\n throw unusable('Ed25519');\n break;\n }\n case 'ML-DSA-44':\n case 'ML-DSA-65':\n case 'ML-DSA-87': {\n if (!isAlgorithm(key.algorithm, alg))\n throw unusable(alg);\n break;\n }\n case 'ES256':\n case 'ES384':\n case 'ES512': {\n if (!isAlgorithm(key.algorithm, 'ECDSA'))\n throw unusable('ECDSA');\n const expected = getNamedCurve(alg);\n const actual = key.algorithm.namedCurve;\n if (actual !== expected)\n throw unusable(expected, 'algorithm.namedCurve');\n break;\n }\n default:\n throw new TypeError('CryptoKey does not support this operation');\n }\n checkUsage(key, usage);\n}\nexport function checkEncCryptoKey(key, alg, usage) {\n switch (alg) {\n case 'A128GCM':\n case 'A192GCM':\n case 'A256GCM': {\n if (!isAlgorithm(key.algorithm, 'AES-GCM'))\n throw unusable('AES-GCM');\n const expected = parseInt(alg.slice(1, 4), 10);\n const actual = key.algorithm.length;\n if (actual !== expected)\n throw unusable(expected, 'algorithm.length');\n break;\n }\n case 'A128KW':\n case 'A192KW':\n case 'A256KW': {\n if (!isAlgorithm(key.algorithm, 'AES-KW'))\n throw unusable('AES-KW');\n const expected = parseInt(alg.slice(1, 4), 10);\n const actual = key.algorithm.length;\n if (actual !== expected)\n throw unusable(expected, 'algorithm.length');\n break;\n }\n case 'ECDH': {\n switch (key.algorithm.name) {\n case 'ECDH':\n case 'X25519':\n break;\n default:\n throw unusable('ECDH or X25519');\n }\n break;\n }\n case 'PBES2-HS256+A128KW':\n case 'PBES2-HS384+A192KW':\n case 'PBES2-HS512+A256KW':\n if (!isAlgorithm(key.algorithm, 'PBKDF2'))\n throw unusable('PBKDF2');\n break;\n case 'RSA-OAEP':\n case 'RSA-OAEP-256':\n case 'RSA-OAEP-384':\n case 'RSA-OAEP-512': {\n if (!isAlgorithm(key.algorithm, 'RSA-OAEP'))\n throw unusable('RSA-OAEP');\n checkHashLength(key.algorithm, parseInt(alg.slice(9), 10) || 1);\n break;\n }\n default:\n throw new TypeError('CryptoKey does not support this operation');\n }\n checkUsage(key, usage);\n}\n", "function message(msg, actual, ...types) {\n types = types.filter(Boolean);\n if (types.length > 2) {\n const last = types.pop();\n msg += `one of type ${types.join(', ')}, or ${last}.`;\n }\n else if (types.length === 2) {\n msg += `one of type ${types[0]} or ${types[1]}.`;\n }\n else {\n msg += `of type ${types[0]}.`;\n }\n if (actual == null) {\n msg += ` Received ${actual}`;\n }\n else if (typeof actual === 'function' && actual.name) {\n msg += ` Received function ${actual.name}`;\n }\n else if (typeof actual === 'object' && actual != null) {\n if (actual.constructor?.name) {\n msg += ` Received an instance of ${actual.constructor.name}`;\n }\n }\n return msg;\n}\nexport const invalidKeyInput = (actual, ...types) => message('Key must be ', actual, ...types);\nexport const withAlg = (alg, actual, ...types) => message(`Key for the ${alg} algorithm must be `, actual, ...types);\n", "export class JOSEError extends Error {\n static code = 'ERR_JOSE_GENERIC';\n code = 'ERR_JOSE_GENERIC';\n constructor(message, options) {\n super(message, options);\n this.name = this.constructor.name;\n Error.captureStackTrace?.(this, this.constructor);\n }\n}\nexport class JWTClaimValidationFailed extends JOSEError {\n static code = 'ERR_JWT_CLAIM_VALIDATION_FAILED';\n code = 'ERR_JWT_CLAIM_VALIDATION_FAILED';\n claim;\n reason;\n payload;\n constructor(message, payload, claim = 'unspecified', reason = 'unspecified') {\n super(message, { cause: { claim, reason, payload } });\n this.claim = claim;\n this.reason = reason;\n this.payload = payload;\n }\n}\nexport class JWTExpired extends JOSEError {\n static code = 'ERR_JWT_EXPIRED';\n code = 'ERR_JWT_EXPIRED';\n claim;\n reason;\n payload;\n constructor(message, payload, claim = 'unspecified', reason = 'unspecified') {\n super(message, { cause: { claim, reason, payload } });\n this.claim = claim;\n this.reason = reason;\n this.payload = payload;\n }\n}\nexport class JOSEAlgNotAllowed extends JOSEError {\n static code = 'ERR_JOSE_ALG_NOT_ALLOWED';\n code = 'ERR_JOSE_ALG_NOT_ALLOWED';\n}\nexport class JOSENotSupported extends JOSEError {\n static code = 'ERR_JOSE_NOT_SUPPORTED';\n code = 'ERR_JOSE_NOT_SUPPORTED';\n}\nexport class JWEDecryptionFailed extends JOSEError {\n static code = 'ERR_JWE_DECRYPTION_FAILED';\n code = 'ERR_JWE_DECRYPTION_FAILED';\n constructor(message = 'decryption operation failed', options) {\n super(message, options);\n }\n}\nexport class JWEInvalid extends JOSEError {\n static code = 'ERR_JWE_INVALID';\n code = 'ERR_JWE_INVALID';\n}\nexport class JWSInvalid extends JOSEError {\n static code = 'ERR_JWS_INVALID';\n code = 'ERR_JWS_INVALID';\n}\nexport class JWTInvalid extends JOSEError {\n static code = 'ERR_JWT_INVALID';\n code = 'ERR_JWT_INVALID';\n}\nexport class JWKInvalid extends JOSEError {\n static code = 'ERR_JWK_INVALID';\n code = 'ERR_JWK_INVALID';\n}\nexport class JWKSInvalid extends JOSEError {\n static code = 'ERR_JWKS_INVALID';\n code = 'ERR_JWKS_INVALID';\n}\nexport class JWKSNoMatchingKey extends JOSEError {\n static code = 'ERR_JWKS_NO_MATCHING_KEY';\n code = 'ERR_JWKS_NO_MATCHING_KEY';\n constructor(message = 'no applicable key found in the JSON Web Key Set', options) {\n super(message, options);\n }\n}\nexport class JWKSMultipleMatchingKeys extends JOSEError {\n [Symbol.asyncIterator];\n static code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';\n code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';\n constructor(message = 'multiple matching keys found in the JSON Web Key Set', options) {\n super(message, options);\n }\n}\nexport class JWKSTimeout extends JOSEError {\n static code = 'ERR_JWKS_TIMEOUT';\n code = 'ERR_JWKS_TIMEOUT';\n constructor(message = 'request timed out', options) {\n super(message, options);\n }\n}\nexport class JWSSignatureVerificationFailed extends JOSEError {\n static code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED';\n code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED';\n constructor(message = 'signature verification failed', options) {\n super(message, options);\n }\n}\n", "export function assertCryptoKey(key) {\n if (!isCryptoKey(key)) {\n throw new Error('CryptoKey instance expected');\n }\n}\nexport const isCryptoKey = (key) => {\n if (key?.[Symbol.toStringTag] === 'CryptoKey')\n return true;\n try {\n return key instanceof CryptoKey;\n }\n catch {\n return false;\n }\n};\nexport const isKeyObject = (key) => key?.[Symbol.toStringTag] === 'KeyObject';\nexport const isKeyLike = (key) => isCryptoKey(key) || isKeyObject(key);\n", "import { decode } from '../util/base64url.js';\nexport const unprotected = Symbol();\nexport function assertNotSet(value, name) {\n if (value) {\n throw new TypeError(`${name} can only be called once`);\n }\n}\nexport function decodeBase64url(value, label, ErrorClass) {\n try {\n return decode(value);\n }\n catch {\n throw new ErrorClass(`Failed to base64url decode the ${label}`);\n }\n}\nexport async function digest(algorithm, data) {\n const subtleDigest = `SHA-${algorithm.slice(-3)}`;\n return new Uint8Array(await crypto.subtle.digest(subtleDigest, data));\n}\n", "const isObjectLike = (value) => typeof value === 'object' && value !== null;\nexport function isObject(input) {\n if (!isObjectLike(input) || Object.prototype.toString.call(input) !== '[object Object]') {\n return false;\n }\n if (Object.getPrototypeOf(input) === null) {\n return true;\n }\n let proto = input;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(input) === proto;\n}\nexport function isDisjoint(...headers) {\n const sources = headers.filter(Boolean);\n if (sources.length === 0 || sources.length === 1) {\n return true;\n }\n let acc;\n for (const header of sources) {\n const parameters = Object.keys(header);\n if (!acc || acc.size === 0) {\n acc = new Set(parameters);\n continue;\n }\n for (const parameter of parameters) {\n if (acc.has(parameter)) {\n return false;\n }\n acc.add(parameter);\n }\n }\n return true;\n}\nexport const isJWK = (key) => isObject(key) && typeof key.kty === 'string';\nexport const isPrivateJWK = (key) => key.kty !== 'oct' &&\n ((key.kty === 'AKP' && typeof key.priv === 'string') || typeof key.d === 'string');\nexport const isPublicJWK = (key) => key.kty !== 'oct' && key.d === undefined && key.priv === undefined;\nexport const isSecretJWK = (key) => key.kty === 'oct' && typeof key.k === 'string';\n", "import { JOSENotSupported } from '../util/errors.js';\nimport { checkSigCryptoKey } from './crypto_key.js';\nimport { invalidKeyInput } from './invalid_key_input.js';\nexport function checkKeyLength(alg, key) {\n if (alg.startsWith('RS') || alg.startsWith('PS')) {\n const { modulusLength } = key.algorithm;\n if (typeof modulusLength !== 'number' || modulusLength < 2048) {\n throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);\n }\n }\n}\nfunction subtleAlgorithm(alg, algorithm) {\n const hash = `SHA-${alg.slice(-3)}`;\n switch (alg) {\n case 'HS256':\n case 'HS384':\n case 'HS512':\n return { hash, name: 'HMAC' };\n case 'PS256':\n case 'PS384':\n case 'PS512':\n return { hash, name: 'RSA-PSS', saltLength: parseInt(alg.slice(-3), 10) >> 3 };\n case 'RS256':\n case 'RS384':\n case 'RS512':\n return { hash, name: 'RSASSA-PKCS1-v1_5' };\n case 'ES256':\n case 'ES384':\n case 'ES512':\n return { hash, name: 'ECDSA', namedCurve: algorithm.namedCurve };\n case 'Ed25519':\n case 'EdDSA':\n return { name: 'Ed25519' };\n case 'ML-DSA-44':\n case 'ML-DSA-65':\n case 'ML-DSA-87':\n return { name: alg };\n default:\n throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);\n }\n}\nasync function getSigKey(alg, key, usage) {\n if (key instanceof Uint8Array) {\n if (!alg.startsWith('HS')) {\n throw new TypeError(invalidKeyInput(key, 'CryptoKey', 'KeyObject', 'JSON Web Key'));\n }\n return crypto.subtle.importKey('raw', key, { hash: `SHA-${alg.slice(-3)}`, name: 'HMAC' }, false, [usage]);\n }\n checkSigCryptoKey(key, alg, usage);\n return key;\n}\nexport async function sign(alg, key, data) {\n const cryptoKey = await getSigKey(alg, key, 'sign');\n checkKeyLength(alg, cryptoKey);\n const signature = await crypto.subtle.sign(subtleAlgorithm(alg, cryptoKey.algorithm), cryptoKey, data);\n return new Uint8Array(signature);\n}\nexport async function verify(alg, key, signature, data) {\n const cryptoKey = await getSigKey(alg, key, 'verify');\n checkKeyLength(alg, cryptoKey);\n const algorithm = subtleAlgorithm(alg, cryptoKey.algorithm);\n try {\n return await crypto.subtle.verify(algorithm, cryptoKey, signature, data);\n }\n catch {\n return false;\n }\n}\n", "import { JOSENotSupported } from '../util/errors.js';\nconst unsupportedAlg = 'Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value';\nfunction subtleMapping(jwk) {\n let algorithm;\n let keyUsages;\n switch (jwk.kty) {\n case 'AKP': {\n switch (jwk.alg) {\n case 'ML-DSA-44':\n case 'ML-DSA-65':\n case 'ML-DSA-87':\n algorithm = { name: jwk.alg };\n keyUsages = jwk.priv ? ['sign'] : ['verify'];\n break;\n default:\n throw new JOSENotSupported(unsupportedAlg);\n }\n break;\n }\n case 'RSA': {\n switch (jwk.alg) {\n case 'PS256':\n case 'PS384':\n case 'PS512':\n algorithm = { name: 'RSA-PSS', hash: `SHA-${jwk.alg.slice(-3)}` };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'RS256':\n case 'RS384':\n case 'RS512':\n algorithm = { name: 'RSASSA-PKCS1-v1_5', hash: `SHA-${jwk.alg.slice(-3)}` };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'RSA-OAEP':\n case 'RSA-OAEP-256':\n case 'RSA-OAEP-384':\n case 'RSA-OAEP-512':\n algorithm = {\n name: 'RSA-OAEP',\n hash: `SHA-${parseInt(jwk.alg.slice(-3), 10) || 1}`,\n };\n keyUsages = jwk.d ? ['decrypt', 'unwrapKey'] : ['encrypt', 'wrapKey'];\n break;\n default:\n throw new JOSENotSupported(unsupportedAlg);\n }\n break;\n }\n case 'EC': {\n switch (jwk.alg) {\n case 'ES256':\n case 'ES384':\n case 'ES512':\n algorithm = {\n name: 'ECDSA',\n namedCurve: { ES256: 'P-256', ES384: 'P-384', ES512: 'P-521' }[jwk.alg],\n };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'ECDH-ES':\n case 'ECDH-ES+A128KW':\n case 'ECDH-ES+A192KW':\n case 'ECDH-ES+A256KW':\n algorithm = { name: 'ECDH', namedCurve: jwk.crv };\n keyUsages = jwk.d ? ['deriveBits'] : [];\n break;\n default:\n throw new JOSENotSupported(unsupportedAlg);\n }\n break;\n }\n case 'OKP': {\n switch (jwk.alg) {\n case 'Ed25519':\n case 'EdDSA':\n algorithm = { name: 'Ed25519' };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'ECDH-ES':\n case 'ECDH-ES+A128KW':\n case 'ECDH-ES+A192KW':\n case 'ECDH-ES+A256KW':\n algorithm = { name: jwk.crv };\n keyUsages = jwk.d ? ['deriveBits'] : [];\n break;\n default:\n throw new JOSENotSupported(unsupportedAlg);\n }\n break;\n }\n default:\n throw new JOSENotSupported('Invalid or unsupported JWK \"kty\" (Key Type) Parameter value');\n }\n return { algorithm, keyUsages };\n}\nexport async function jwkToKey(jwk) {\n if (!jwk.alg) {\n throw new TypeError('\"alg\" argument is required when \"jwk.alg\" is not present');\n }\n const { algorithm, keyUsages } = subtleMapping(jwk);\n const keyData = { ...jwk };\n if (keyData.kty !== 'AKP') {\n delete keyData.alg;\n }\n delete keyData.use;\n return crypto.subtle.importKey('jwk', keyData, algorithm, jwk.ext ?? (jwk.d || jwk.priv ? false : true), jwk.key_ops ?? keyUsages);\n}\n", "import { isJWK } from './type_checks.js';\nimport { decode } from '../util/base64url.js';\nimport { jwkToKey } from './jwk_to_key.js';\nimport { isCryptoKey, isKeyObject } from './is_key_like.js';\nconst unusableForAlg = 'given KeyObject instance cannot be used for this algorithm';\nlet cache;\nconst handleJWK = async (key, jwk, alg, freeze = false) => {\n cache ||= new WeakMap();\n let cached = cache.get(key);\n if (cached?.[alg]) {\n return cached[alg];\n }\n const cryptoKey = await jwkToKey({ ...jwk, alg });\n if (freeze)\n Object.freeze(key);\n if (!cached) {\n cache.set(key, { [alg]: cryptoKey });\n }\n else {\n cached[alg] = cryptoKey;\n }\n return cryptoKey;\n};\nconst handleKeyObject = (keyObject, alg) => {\n cache ||= new WeakMap();\n let cached = cache.get(keyObject);\n if (cached?.[alg]) {\n return cached[alg];\n }\n const isPublic = keyObject.type === 'public';\n const extractable = isPublic ? true : false;\n let cryptoKey;\n if (keyObject.asymmetricKeyType === 'x25519') {\n switch (alg) {\n case 'ECDH-ES':\n case 'ECDH-ES+A128KW':\n case 'ECDH-ES+A192KW':\n case 'ECDH-ES+A256KW':\n break;\n default:\n throw new TypeError(unusableForAlg);\n }\n cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, isPublic ? [] : ['deriveBits']);\n }\n if (keyObject.asymmetricKeyType === 'ed25519') {\n if (alg !== 'EdDSA' && alg !== 'Ed25519') {\n throw new TypeError(unusableForAlg);\n }\n cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [\n isPublic ? 'verify' : 'sign',\n ]);\n }\n switch (keyObject.asymmetricKeyType) {\n case 'ml-dsa-44':\n case 'ml-dsa-65':\n case 'ml-dsa-87': {\n if (alg !== keyObject.asymmetricKeyType.toUpperCase()) {\n throw new TypeError(unusableForAlg);\n }\n cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [\n isPublic ? 'verify' : 'sign',\n ]);\n }\n }\n if (keyObject.asymmetricKeyType === 'rsa') {\n let hash;\n switch (alg) {\n case 'RSA-OAEP':\n hash = 'SHA-1';\n break;\n case 'RS256':\n case 'PS256':\n case 'RSA-OAEP-256':\n hash = 'SHA-256';\n break;\n case 'RS384':\n case 'PS384':\n case 'RSA-OAEP-384':\n hash = 'SHA-384';\n break;\n case 'RS512':\n case 'PS512':\n case 'RSA-OAEP-512':\n hash = 'SHA-512';\n break;\n default:\n throw new TypeError(unusableForAlg);\n }\n if (alg.startsWith('RSA-OAEP')) {\n return keyObject.toCryptoKey({\n name: 'RSA-OAEP',\n hash,\n }, extractable, isPublic ? ['encrypt'] : ['decrypt']);\n }\n cryptoKey = keyObject.toCryptoKey({\n name: alg.startsWith('PS') ? 'RSA-PSS' : 'RSASSA-PKCS1-v1_5',\n hash,\n }, extractable, [isPublic ? 'verify' : 'sign']);\n }\n if (keyObject.asymmetricKeyType === 'ec') {\n const nist = new Map([\n ['prime256v1', 'P-256'],\n ['secp384r1', 'P-384'],\n ['secp521r1', 'P-521'],\n ]);\n const namedCurve = nist.get(keyObject.asymmetricKeyDetails?.namedCurve);\n if (!namedCurve) {\n throw new TypeError(unusableForAlg);\n }\n const expectedCurve = { ES256: 'P-256', ES384: 'P-384', ES512: 'P-521' };\n if (expectedCurve[alg] && namedCurve === expectedCurve[alg]) {\n cryptoKey = keyObject.toCryptoKey({\n name: 'ECDSA',\n namedCurve,\n }, extractable, [isPublic ? 'verify' : 'sign']);\n }\n if (alg.startsWith('ECDH-ES')) {\n cryptoKey = keyObject.toCryptoKey({\n name: 'ECDH',\n namedCurve,\n }, extractable, isPublic ? [] : ['deriveBits']);\n }\n }\n if (!cryptoKey) {\n throw new TypeError(unusableForAlg);\n }\n if (!cached) {\n cache.set(keyObject, { [alg]: cryptoKey });\n }\n else {\n cached[alg] = cryptoKey;\n }\n return cryptoKey;\n};\nexport async function normalizeKey(key, alg) {\n if (key instanceof Uint8Array) {\n return key;\n }\n if (isCryptoKey(key)) {\n return key;\n }\n if (isKeyObject(key)) {\n if (key.type === 'secret') {\n return key.export();\n }\n if ('toCryptoKey' in key && typeof key.toCryptoKey === 'function') {\n try {\n return handleKeyObject(key, alg);\n }\n catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n }\n }\n let jwk = key.export({ format: 'jwk' });\n return handleJWK(key, jwk, alg);\n }\n if (isJWK(key)) {\n if (key.k) {\n return decode(key.k);\n }\n return handleJWK(key, key, alg, true);\n }\n throw new Error('unreachable');\n}\n", "import { JOSENotSupported, JWEInvalid, JWSInvalid } from '../util/errors.js';\nexport function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) {\n if (joseHeader.crit !== undefined && protectedHeader?.crit === undefined) {\n throw new Err('\"crit\" (Critical) Header Parameter MUST be integrity protected');\n }\n if (!protectedHeader || protectedHeader.crit === undefined) {\n return new Set();\n }\n if (!Array.isArray(protectedHeader.crit) ||\n protectedHeader.crit.length === 0 ||\n protectedHeader.crit.some((input) => typeof input !== 'string' || input.length === 0)) {\n throw new Err('\"crit\" (Critical) Header Parameter MUST be an array of non-empty strings when present');\n }\n let recognized;\n if (recognizedOption !== undefined) {\n recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]);\n }\n else {\n recognized = recognizedDefault;\n }\n for (const parameter of protectedHeader.crit) {\n if (!recognized.has(parameter)) {\n throw new JOSENotSupported(`Extension Header Parameter \"${parameter}\" is not recognized`);\n }\n if (joseHeader[parameter] === undefined) {\n throw new Err(`Extension Header Parameter \"${parameter}\" is missing`);\n }\n if (recognized.get(parameter) && protectedHeader[parameter] === undefined) {\n throw new Err(`Extension Header Parameter \"${parameter}\" MUST be integrity protected`);\n }\n }\n return new Set(protectedHeader.crit);\n}\n", "export function validateAlgorithms(option, algorithms) {\n if (algorithms !== undefined &&\n (!Array.isArray(algorithms) || algorithms.some((s) => typeof s !== 'string'))) {\n throw new TypeError(`\"${option}\" option must be an array of strings`);\n }\n if (!algorithms) {\n return undefined;\n }\n return new Set(algorithms);\n}\n", "import { withAlg as invalidKeyInput } from './invalid_key_input.js';\nimport { isKeyLike } from './is_key_like.js';\nimport * as jwk from './type_checks.js';\nconst tag = (key) => key?.[Symbol.toStringTag];\nconst jwkMatchesOp = (alg, key, usage) => {\n if (key.use !== undefined) {\n let expected;\n switch (usage) {\n case 'sign':\n case 'verify':\n expected = 'sig';\n break;\n case 'encrypt':\n case 'decrypt':\n expected = 'enc';\n break;\n }\n if (key.use !== expected) {\n throw new TypeError(`Invalid key for this operation, its \"use\" must be \"${expected}\" when present`);\n }\n }\n if (key.alg !== undefined && key.alg !== alg) {\n throw new TypeError(`Invalid key for this operation, its \"alg\" must be \"${alg}\" when present`);\n }\n if (Array.isArray(key.key_ops)) {\n let expectedKeyOp;\n switch (true) {\n case usage === 'sign' || usage === 'verify':\n case alg === 'dir':\n case alg.includes('CBC-HS'):\n expectedKeyOp = usage;\n break;\n case alg.startsWith('PBES2'):\n expectedKeyOp = 'deriveBits';\n break;\n case /^A\\d{3}(?:GCM)?(?:KW)?$/.test(alg):\n if (!alg.includes('GCM') && alg.endsWith('KW')) {\n expectedKeyOp = usage === 'encrypt' ? 'wrapKey' : 'unwrapKey';\n }\n else {\n expectedKeyOp = usage;\n }\n break;\n case usage === 'encrypt' && alg.startsWith('RSA'):\n expectedKeyOp = 'wrapKey';\n break;\n case usage === 'decrypt':\n expectedKeyOp = alg.startsWith('RSA') ? 'unwrapKey' : 'deriveBits';\n break;\n }\n if (expectedKeyOp && key.key_ops?.includes?.(expectedKeyOp) === false) {\n throw new TypeError(`Invalid key for this operation, its \"key_ops\" must include \"${expectedKeyOp}\" when present`);\n }\n }\n return true;\n};\nconst symmetricTypeCheck = (alg, key, usage) => {\n if (key instanceof Uint8Array)\n return;\n if (jwk.isJWK(key)) {\n if (jwk.isSecretJWK(key) && jwkMatchesOp(alg, key, usage))\n return;\n throw new TypeError(`JSON Web Key for symmetric algorithms must have JWK \"kty\" (Key Type) equal to \"oct\" and the JWK \"k\" (Key Value) present`);\n }\n if (!isKeyLike(key)) {\n throw new TypeError(invalidKeyInput(alg, key, 'CryptoKey', 'KeyObject', 'JSON Web Key', 'Uint8Array'));\n }\n if (key.type !== 'secret') {\n throw new TypeError(`${tag(key)} instances for symmetric algorithms must be of type \"secret\"`);\n }\n};\nconst asymmetricTypeCheck = (alg, key, usage) => {\n if (jwk.isJWK(key)) {\n switch (usage) {\n case 'decrypt':\n case 'sign':\n if (jwk.isPrivateJWK(key) && jwkMatchesOp(alg, key, usage))\n return;\n throw new TypeError(`JSON Web Key for this operation must be a private JWK`);\n case 'encrypt':\n case 'verify':\n if (jwk.isPublicJWK(key) && jwkMatchesOp(alg, key, usage))\n return;\n throw new TypeError(`JSON Web Key for this operation must be a public JWK`);\n }\n }\n if (!isKeyLike(key)) {\n throw new TypeError(invalidKeyInput(alg, key, 'CryptoKey', 'KeyObject', 'JSON Web Key'));\n }\n if (key.type === 'secret') {\n throw new TypeError(`${tag(key)} instances for asymmetric algorithms must not be of type \"secret\"`);\n }\n if (key.type === 'public') {\n switch (usage) {\n case 'sign':\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm signing must be of type \"private\"`);\n case 'decrypt':\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm decryption must be of type \"private\"`);\n }\n }\n if (key.type === 'private') {\n switch (usage) {\n case 'verify':\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm verifying must be of type \"public\"`);\n case 'encrypt':\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm encryption must be of type \"public\"`);\n }\n }\n};\nexport function checkKeyType(alg, key, usage) {\n switch (alg.substring(0, 2)) {\n case 'A1':\n case 'A2':\n case 'di':\n case 'HS':\n case 'PB':\n symmetricTypeCheck(alg, key, usage);\n break;\n default:\n asymmetricTypeCheck(alg, key, usage);\n }\n}\n", "import { decode as b64u } from '../../util/base64url.js';\nimport { verify } from '../../lib/signing.js';\nimport { JOSEAlgNotAllowed, JWSInvalid, JWSSignatureVerificationFailed } from '../../util/errors.js';\nimport { concat, encoder, decoder, encode } from '../../lib/buffer_utils.js';\nimport { decodeBase64url } from '../../lib/helpers.js';\nimport { isDisjoint } from '../../lib/type_checks.js';\nimport { isObject } from '../../lib/type_checks.js';\nimport { checkKeyType } from '../../lib/check_key_type.js';\nimport { validateCrit } from '../../lib/validate_crit.js';\nimport { validateAlgorithms } from '../../lib/validate_algorithms.js';\nimport { normalizeKey } from '../../lib/normalize_key.js';\nexport async function flattenedVerify(jws, key, options) {\n if (!isObject(jws)) {\n throw new JWSInvalid('Flattened JWS must be an object');\n }\n if (jws.protected === undefined && jws.header === undefined) {\n throw new JWSInvalid('Flattened JWS must have either of the \"protected\" or \"header\" members');\n }\n if (jws.protected !== undefined && typeof jws.protected !== 'string') {\n throw new JWSInvalid('JWS Protected Header incorrect type');\n }\n if (jws.payload === undefined) {\n throw new JWSInvalid('JWS Payload missing');\n }\n if (typeof jws.signature !== 'string') {\n throw new JWSInvalid('JWS Signature missing or incorrect type');\n }\n if (jws.header !== undefined && !isObject(jws.header)) {\n throw new JWSInvalid('JWS Unprotected Header incorrect type');\n }\n let parsedProt = {};\n if (jws.protected) {\n try {\n const protectedHeader = b64u(jws.protected);\n parsedProt = JSON.parse(decoder.decode(protectedHeader));\n }\n catch {\n throw new JWSInvalid('JWS Protected Header is invalid');\n }\n }\n if (!isDisjoint(parsedProt, jws.header)) {\n throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');\n }\n const joseHeader = {\n ...parsedProt,\n ...jws.header,\n };\n const extensions = validateCrit(JWSInvalid, new Map([['b64', true]]), options?.crit, parsedProt, joseHeader);\n let b64 = true;\n if (extensions.has('b64')) {\n b64 = parsedProt.b64;\n if (typeof b64 !== 'boolean') {\n throw new JWSInvalid('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean');\n }\n }\n const { alg } = joseHeader;\n if (typeof alg !== 'string' || !alg) {\n throw new JWSInvalid('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');\n }\n const algorithms = options && validateAlgorithms('algorithms', options.algorithms);\n if (algorithms && !algorithms.has(alg)) {\n throw new JOSEAlgNotAllowed('\"alg\" (Algorithm) Header Parameter value not allowed');\n }\n if (b64) {\n if (typeof jws.payload !== 'string') {\n throw new JWSInvalid('JWS Payload must be a string');\n }\n }\n else if (typeof jws.payload !== 'string' && !(jws.payload instanceof Uint8Array)) {\n throw new JWSInvalid('JWS Payload must be a string or an Uint8Array instance');\n }\n let resolvedKey = false;\n if (typeof key === 'function') {\n key = await key(parsedProt, jws);\n resolvedKey = true;\n }\n checkKeyType(alg, key, 'verify');\n const data = concat(jws.protected !== undefined ? encode(jws.protected) : new Uint8Array(), encode('.'), typeof jws.payload === 'string'\n ? b64\n ? encode(jws.payload)\n : encoder.encode(jws.payload)\n : jws.payload);\n const signature = decodeBase64url(jws.signature, 'signature', JWSInvalid);\n const k = await normalizeKey(key, alg);\n const verified = await verify(alg, k, signature, data);\n if (!verified) {\n throw new JWSSignatureVerificationFailed();\n }\n let payload;\n if (b64) {\n payload = decodeBase64url(jws.payload, 'payload', JWSInvalid);\n }\n else if (typeof jws.payload === 'string') {\n payload = encoder.encode(jws.payload);\n }\n else {\n payload = jws.payload;\n }\n const result = { payload };\n if (jws.protected !== undefined) {\n result.protectedHeader = parsedProt;\n }\n if (jws.header !== undefined) {\n result.unprotectedHeader = jws.header;\n }\n if (resolvedKey) {\n return { ...result, key: k };\n }\n return result;\n}\n", "import { flattenedVerify } from '../flattened/verify.js';\nimport { JWSInvalid } from '../../util/errors.js';\nimport { decoder } from '../../lib/buffer_utils.js';\nexport async function compactVerify(jws, key, options) {\n if (jws instanceof Uint8Array) {\n jws = decoder.decode(jws);\n }\n if (typeof jws !== 'string') {\n throw new JWSInvalid('Compact JWS must be a string or Uint8Array');\n }\n const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split('.');\n if (length !== 3) {\n throw new JWSInvalid('Invalid Compact JWS');\n }\n const verified = await flattenedVerify({ payload, protected: protectedHeader, signature }, key, options);\n const result = { payload: verified.payload, protectedHeader: verified.protectedHeader };\n if (typeof key === 'function') {\n return { ...result, key: verified.key };\n }\n return result;\n}\n", "import { JWTClaimValidationFailed, JWTExpired, JWTInvalid } from '../util/errors.js';\nimport { encoder, decoder } from './buffer_utils.js';\nimport { isObject } from './type_checks.js';\nconst epoch = (date) => Math.floor(date.getTime() / 1000);\nconst minute = 60;\nconst hour = minute * 60;\nconst day = hour * 24;\nconst week = day * 7;\nconst year = day * 365.25;\nconst REGEX = /^(\\+|\\-)? ?(\\d+|\\d+\\.\\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;\nexport function secs(str) {\n const matched = REGEX.exec(str);\n if (!matched || (matched[4] && matched[1])) {\n throw new TypeError('Invalid time period format');\n }\n const value = parseFloat(matched[2]);\n const unit = matched[3].toLowerCase();\n let numericDate;\n switch (unit) {\n case 'sec':\n case 'secs':\n case 'second':\n case 'seconds':\n case 's':\n numericDate = Math.round(value);\n break;\n case 'minute':\n case 'minutes':\n case 'min':\n case 'mins':\n case 'm':\n numericDate = Math.round(value * minute);\n break;\n case 'hour':\n case 'hours':\n case 'hr':\n case 'hrs':\n case 'h':\n numericDate = Math.round(value * hour);\n break;\n case 'day':\n case 'days':\n case 'd':\n numericDate = Math.round(value * day);\n break;\n case 'week':\n case 'weeks':\n case 'w':\n numericDate = Math.round(value * week);\n break;\n default:\n numericDate = Math.round(value * year);\n break;\n }\n if (matched[1] === '-' || matched[4] === 'ago') {\n return -numericDate;\n }\n return numericDate;\n}\nfunction validateInput(label, input) {\n if (!Number.isFinite(input)) {\n throw new TypeError(`Invalid ${label} input`);\n }\n return input;\n}\nconst normalizeTyp = (value) => {\n if (value.includes('/')) {\n return value.toLowerCase();\n }\n return `application/${value.toLowerCase()}`;\n};\nconst checkAudiencePresence = (audPayload, audOption) => {\n if (typeof audPayload === 'string') {\n return audOption.includes(audPayload);\n }\n if (Array.isArray(audPayload)) {\n return audOption.some(Set.prototype.has.bind(new Set(audPayload)));\n }\n return false;\n};\nexport function validateClaimsSet(protectedHeader, encodedPayload, options = {}) {\n let payload;\n try {\n payload = JSON.parse(decoder.decode(encodedPayload));\n }\n catch {\n }\n if (!isObject(payload)) {\n throw new JWTInvalid('JWT Claims Set must be a top-level JSON object');\n }\n const { typ } = options;\n if (typ &&\n (typeof protectedHeader.typ !== 'string' ||\n normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) {\n throw new JWTClaimValidationFailed('unexpected \"typ\" JWT header value', payload, 'typ', 'check_failed');\n }\n const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options;\n const presenceCheck = [...requiredClaims];\n if (maxTokenAge !== undefined)\n presenceCheck.push('iat');\n if (audience !== undefined)\n presenceCheck.push('aud');\n if (subject !== undefined)\n presenceCheck.push('sub');\n if (issuer !== undefined)\n presenceCheck.push('iss');\n for (const claim of new Set(presenceCheck.reverse())) {\n if (!(claim in payload)) {\n throw new JWTClaimValidationFailed(`missing required \"${claim}\" claim`, payload, claim, 'missing');\n }\n }\n if (issuer &&\n !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) {\n throw new JWTClaimValidationFailed('unexpected \"iss\" claim value', payload, 'iss', 'check_failed');\n }\n if (subject && payload.sub !== subject) {\n throw new JWTClaimValidationFailed('unexpected \"sub\" claim value', payload, 'sub', 'check_failed');\n }\n if (audience &&\n !checkAudiencePresence(payload.aud, typeof audience === 'string' ? [audience] : audience)) {\n throw new JWTClaimValidationFailed('unexpected \"aud\" claim value', payload, 'aud', 'check_failed');\n }\n let tolerance;\n switch (typeof options.clockTolerance) {\n case 'string':\n tolerance = secs(options.clockTolerance);\n break;\n case 'number':\n tolerance = options.clockTolerance;\n break;\n case 'undefined':\n tolerance = 0;\n break;\n default:\n throw new TypeError('Invalid clockTolerance option type');\n }\n const { currentDate } = options;\n const now = epoch(currentDate || new Date());\n if ((payload.iat !== undefined || maxTokenAge) && typeof payload.iat !== 'number') {\n throw new JWTClaimValidationFailed('\"iat\" claim must be a number', payload, 'iat', 'invalid');\n }\n if (payload.nbf !== undefined) {\n if (typeof payload.nbf !== 'number') {\n throw new JWTClaimValidationFailed('\"nbf\" claim must be a number', payload, 'nbf', 'invalid');\n }\n if (payload.nbf > now + tolerance) {\n throw new JWTClaimValidationFailed('\"nbf\" claim timestamp check failed', payload, 'nbf', 'check_failed');\n }\n }\n if (payload.exp !== undefined) {\n if (typeof payload.exp !== 'number') {\n throw new JWTClaimValidationFailed('\"exp\" claim must be a number', payload, 'exp', 'invalid');\n }\n if (payload.exp <= now - tolerance) {\n throw new JWTExpired('\"exp\" claim timestamp check failed', payload, 'exp', 'check_failed');\n }\n }\n if (maxTokenAge) {\n const age = now - payload.iat;\n const max = typeof maxTokenAge === 'number' ? maxTokenAge : secs(maxTokenAge);\n if (age - tolerance > max) {\n throw new JWTExpired('\"iat\" claim timestamp check failed (too far in the past)', payload, 'iat', 'check_failed');\n }\n if (age < 0 - tolerance) {\n throw new JWTClaimValidationFailed('\"iat\" claim timestamp check failed (it should be in the past)', payload, 'iat', 'check_failed');\n }\n }\n return payload;\n}\nexport class JWTClaimsBuilder {\n #payload;\n constructor(payload) {\n if (!isObject(payload)) {\n throw new TypeError('JWT Claims Set MUST be an object');\n }\n this.#payload = structuredClone(payload);\n }\n data() {\n return encoder.encode(JSON.stringify(this.#payload));\n }\n get iss() {\n return this.#payload.iss;\n }\n set iss(value) {\n this.#payload.iss = value;\n }\n get sub() {\n return this.#payload.sub;\n }\n set sub(value) {\n this.#payload.sub = value;\n }\n get aud() {\n return this.#payload.aud;\n }\n set aud(value) {\n this.#payload.aud = value;\n }\n set jti(value) {\n this.#payload.jti = value;\n }\n set nbf(value) {\n if (typeof value === 'number') {\n this.#payload.nbf = validateInput('setNotBefore', value);\n }\n else if (value instanceof Date) {\n this.#payload.nbf = validateInput('setNotBefore', epoch(value));\n }\n else {\n this.#payload.nbf = epoch(new Date()) + secs(value);\n }\n }\n set exp(value) {\n if (typeof value === 'number') {\n this.#payload.exp = validateInput('setExpirationTime', value);\n }\n else if (value instanceof Date) {\n this.#payload.exp = validateInput('setExpirationTime', epoch(value));\n }\n else {\n this.#payload.exp = epoch(new Date()) + secs(value);\n }\n }\n set iat(value) {\n if (value === undefined) {\n this.#payload.iat = epoch(new Date());\n }\n else if (value instanceof Date) {\n this.#payload.iat = validateInput('setIssuedAt', epoch(value));\n }\n else if (typeof value === 'string') {\n this.#payload.iat = validateInput('setIssuedAt', epoch(new Date()) + secs(value));\n }\n else {\n this.#payload.iat = validateInput('setIssuedAt', value);\n }\n }\n}\n", "import { compactVerify } from '../jws/compact/verify.js';\nimport { validateClaimsSet } from '../lib/jwt_claims_set.js';\nimport { JWTInvalid } from '../util/errors.js';\nexport async function jwtVerify(jwt, key, options) {\n const verified = await compactVerify(jwt, key, options);\n if (verified.protectedHeader.crit?.includes('b64') && verified.protectedHeader.b64 === false) {\n throw new JWTInvalid('JWTs MUST NOT use unencoded payload');\n }\n const payload = validateClaimsSet(verified.protectedHeader, verified.payload, options);\n const result = { payload, protectedHeader: verified.protectedHeader };\n if (typeof key === 'function') {\n return { ...result, key: verified.key };\n }\n return result;\n}\n", "import { encode as b64u } from '../../util/base64url.js';\nimport { sign } from '../../lib/signing.js';\nimport { isDisjoint } from '../../lib/type_checks.js';\nimport { JWSInvalid } from '../../util/errors.js';\nimport { concat, encode } from '../../lib/buffer_utils.js';\nimport { checkKeyType } from '../../lib/check_key_type.js';\nimport { validateCrit } from '../../lib/validate_crit.js';\nimport { normalizeKey } from '../../lib/normalize_key.js';\nimport { assertNotSet } from '../../lib/helpers.js';\nexport class FlattenedSign {\n #payload;\n #protectedHeader;\n #unprotectedHeader;\n constructor(payload) {\n if (!(payload instanceof Uint8Array)) {\n throw new TypeError('payload must be an instance of Uint8Array');\n }\n this.#payload = payload;\n }\n setProtectedHeader(protectedHeader) {\n assertNotSet(this.#protectedHeader, 'setProtectedHeader');\n this.#protectedHeader = protectedHeader;\n return this;\n }\n setUnprotectedHeader(unprotectedHeader) {\n assertNotSet(this.#unprotectedHeader, 'setUnprotectedHeader');\n this.#unprotectedHeader = unprotectedHeader;\n return this;\n }\n async sign(key, options) {\n if (!this.#protectedHeader && !this.#unprotectedHeader) {\n throw new JWSInvalid('either setProtectedHeader or setUnprotectedHeader must be called before #sign()');\n }\n if (!isDisjoint(this.#protectedHeader, this.#unprotectedHeader)) {\n throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');\n }\n const joseHeader = {\n ...this.#protectedHeader,\n ...this.#unprotectedHeader,\n };\n const extensions = validateCrit(JWSInvalid, new Map([['b64', true]]), options?.crit, this.#protectedHeader, joseHeader);\n let b64 = true;\n if (extensions.has('b64')) {\n b64 = this.#protectedHeader.b64;\n if (typeof b64 !== 'boolean') {\n throw new JWSInvalid('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean');\n }\n }\n const { alg } = joseHeader;\n if (typeof alg !== 'string' || !alg) {\n throw new JWSInvalid('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');\n }\n checkKeyType(alg, key, 'sign');\n let payloadS;\n let payloadB;\n if (b64) {\n payloadS = b64u(this.#payload);\n payloadB = encode(payloadS);\n }\n else {\n payloadB = this.#payload;\n payloadS = '';\n }\n let protectedHeaderString;\n let protectedHeaderBytes;\n if (this.#protectedHeader) {\n protectedHeaderString = b64u(JSON.stringify(this.#protectedHeader));\n protectedHeaderBytes = encode(protectedHeaderString);\n }\n else {\n protectedHeaderString = '';\n protectedHeaderBytes = new Uint8Array();\n }\n const data = concat(protectedHeaderBytes, encode('.'), payloadB);\n const k = await normalizeKey(key, alg);\n const signature = await sign(alg, k, data);\n const jws = {\n signature: b64u(signature),\n payload: payloadS,\n };\n if (this.#unprotectedHeader) {\n jws.header = this.#unprotectedHeader;\n }\n if (this.#protectedHeader) {\n jws.protected = protectedHeaderString;\n }\n return jws;\n }\n}\n", "import { FlattenedSign } from '../flattened/sign.js';\nexport class CompactSign {\n #flattened;\n constructor(payload) {\n this.#flattened = new FlattenedSign(payload);\n }\n setProtectedHeader(protectedHeader) {\n this.#flattened.setProtectedHeader(protectedHeader);\n return this;\n }\n async sign(key, options) {\n const jws = await this.#flattened.sign(key, options);\n if (jws.payload === undefined) {\n throw new TypeError('use the flattened module for creating JWS with b64: false');\n }\n return `${jws.protected}.${jws.payload}.${jws.signature}`;\n }\n}\n", "import { CompactSign } from '../jws/compact/sign.js';\nimport { JWTInvalid } from '../util/errors.js';\nimport { JWTClaimsBuilder } from '../lib/jwt_claims_set.js';\nexport class SignJWT {\n #protectedHeader;\n #jwt;\n constructor(payload = {}) {\n this.#jwt = new JWTClaimsBuilder(payload);\n }\n setIssuer(issuer) {\n this.#jwt.iss = issuer;\n return this;\n }\n setSubject(subject) {\n this.#jwt.sub = subject;\n return this;\n }\n setAudience(audience) {\n this.#jwt.aud = audience;\n return this;\n }\n setJti(jwtId) {\n this.#jwt.jti = jwtId;\n return this;\n }\n setNotBefore(input) {\n this.#jwt.nbf = input;\n return this;\n }\n setExpirationTime(input) {\n this.#jwt.exp = input;\n return this;\n }\n setIssuedAt(input) {\n this.#jwt.iat = input;\n return this;\n }\n setProtectedHeader(protectedHeader) {\n this.#protectedHeader = protectedHeader;\n return this;\n }\n async sign(key, options) {\n const sig = new CompactSign(this.#jwt.data());\n sig.setProtectedHeader(this.#protectedHeader);\n if (Array.isArray(this.#protectedHeader?.crit) &&\n this.#protectedHeader.crit.includes('b64') &&\n this.#protectedHeader.b64 === false) {\n throw new JWTInvalid('JWTs MUST NOT use unencoded payload');\n }\n return sig.sign(key, options);\n }\n}\n", "export { compactDecrypt } from './jwe/compact/decrypt.js';\nexport { flattenedDecrypt } from './jwe/flattened/decrypt.js';\nexport { generalDecrypt } from './jwe/general/decrypt.js';\nexport { GeneralEncrypt } from './jwe/general/encrypt.js';\nexport { compactVerify } from './jws/compact/verify.js';\nexport { flattenedVerify } from './jws/flattened/verify.js';\nexport { generalVerify } from './jws/general/verify.js';\nexport { jwtVerify } from './jwt/verify.js';\nexport { jwtDecrypt } from './jwt/decrypt.js';\nexport { CompactEncrypt } from './jwe/compact/encrypt.js';\nexport { FlattenedEncrypt } from './jwe/flattened/encrypt.js';\nexport { CompactSign } from './jws/compact/sign.js';\nexport { FlattenedSign } from './jws/flattened/sign.js';\nexport { GeneralSign } from './jws/general/sign.js';\nexport { SignJWT } from './jwt/sign.js';\nexport { EncryptJWT } from './jwt/encrypt.js';\nexport { calculateJwkThumbprint, calculateJwkThumbprintUri } from './jwk/thumbprint.js';\nexport { EmbeddedJWK } from './jwk/embedded.js';\nexport { createLocalJWKSet } from './jwks/local.js';\nexport { createRemoteJWKSet, jwksCache, customFetch } from './jwks/remote.js';\nexport { UnsecuredJWT } from './jwt/unsecured.js';\nexport { exportPKCS8, exportSPKI, exportJWK } from './key/export.js';\nexport { importSPKI, importPKCS8, importX509, importJWK } from './key/import.js';\nexport { decodeProtectedHeader } from './util/decode_protected_header.js';\nexport { decodeJwt } from './util/decode_jwt.js';\nimport * as errors from './util/errors.js';\nexport { errors };\nexport { generateKeyPair } from './key/generate_key_pair.js';\nexport { generateSecret } from './key/generate_secret.js';\nimport * as base64url from './util/base64url.js';\nexport { base64url };\nexport const cryptoRuntime = 'WebCryptoAPI';\n", "export class ApiError extends Error {\n public statusCode: number;\n public details?: any;\n\n constructor(message: string, statusCode: number = 500, details?: any) {\n console.log(message)\n \n super(message);\n this.name = 'ApiError';\n this.statusCode = statusCode;\n this.details = details;\n // Error.captureStackTrace?.(this, ApiError);\n }\n}\n", "\n// Old env loading (Node only)\n// export const appUrl = process.env.APP_URL as string;\n//\n// export const jwtSecret: string = process.env.JWT_SECRET as string\n//\n// export const defaultRoleName = 'gen_user';\n//\n// export const encodedJwtSecret = new TextEncoder().encode(jwtSecret)\n//\n// export const s3AccessKeyId = process.env.S3_ACCESS_KEY_ID as string\n//\n// export const s3SecretAccessKey = process.env.S3_SECRET_ACCESS_KEY as string\n//\n// export const s3BucketName = process.env.S3_BUCKET_NAME as string\n//\n// export const s3Region = process.env.S3_REGION as string\n//\n// export const assetsDomain = process.env.ASSETS_DOMAIN as string;\n//\n// export const apiCacheKey = process.env.API_CACHE_KEY as string;\n//\n// export const cloudflareApiToken = process.env.CLOUDFLARE_API_TOKEN as string;\n//\n// export const cloudflareZoneId = process.env.CLOUDFLARE_ZONE_ID as string;\n//\n// export const s3Url = process.env.S3_URL as string\n//\n// export const redisUrl = process.env.REDIS_URL as string\n//\n//\n// export const expoAccessToken = process.env.EXPO_ACCESS_TOKEN as string;\n//\n// export const phonePeBaseUrl = process.env.PHONE_PE_BASE_URL as string;\n//\n// export const phonePeClientId = process.env.PHONE_PE_CLIENT_ID as string;\n//\n// export const phonePeClientVersion = Number(process.env.PHONE_PE_CLIENT_VERSION as string);\n//\n// export const phonePeClientSecret = process.env.PHONE_PE_CLIENT_SECRET as string;\n//\n// export const phonePeMerchantId = process.env.PHONE_PE_MERCHANT_ID as string;\n//\n// export const razorpayId = process.env.RAZORPAY_KEY as string;\n//\n// export const razorpaySecret = process.env.RAZORPAY_SECRET as string;\n//\n// export const otpSenderAuthToken = process.env.OTP_SENDER_AUTH_TOKEN as string;\n//\n// export const minOrderValue = Number(process.env.MIN_ORDER_VALUE as string);\n//\n// export const deliveryCharge = Number(process.env.DELIVERY_CHARGE as string);\n//\n// export const telegramBotToken = process.env.TELEGRAM_BOT_TOKEN as string;\n//\n// export const telegramChatIds = (process.env.TELEGRAM_CHAT_IDS as string)?.split(',').map(id => id.trim()) || [];\n//\n// export const isDevMode = (process.env.ENV_MODE as string) === 'dev';\n\nconst getRuntimeEnv = () => (globalThis as any).ENV || (globalThis as any).process?.env || {}\n\nconst runtimeEnv = getRuntimeEnv()\n\nexport const appUrl = runtimeEnv.APP_URL as string\n\nexport const jwtSecret: string = runtimeEnv.JWT_SECRET as string\n\nexport const defaultRoleName = 'gen_user';\n\nexport const getEncodedJwtSecret = () => {\n const env = getRuntimeEnv()\n const secret = (env.JWT_SECRET as string) || ''\n return new TextEncoder().encode(secret)\n}\n\nexport const s3AccessKeyId = runtimeEnv.S3_ACCESS_KEY_ID as string\n\nexport const s3SecretAccessKey = runtimeEnv.S3_SECRET_ACCESS_KEY as string\n\nexport const s3BucketName = runtimeEnv.S3_BUCKET_NAME as string\n\nexport const s3Region = runtimeEnv.S3_REGION as string\n\nexport const assetsDomain = runtimeEnv.ASSETS_DOMAIN as string\n\nexport const apiCacheKey = runtimeEnv.API_CACHE_KEY as string\n\nexport const cloudflareApiToken = runtimeEnv.CLOUDFLARE_API_TOKEN as string\n\nexport const cloudflareZoneId = runtimeEnv.CLOUDFLARE_ZONE_ID as string\n\nexport const s3Url = runtimeEnv.S3_URL as string\n\nexport const redisUrl = runtimeEnv.REDIS_URL as string\n\nexport const expoAccessToken = runtimeEnv.EXPO_ACCESS_TOKEN as string\n\nexport const phonePeBaseUrl = runtimeEnv.PHONE_PE_BASE_URL as string\n\nexport const phonePeClientId = runtimeEnv.PHONE_PE_CLIENT_ID as string\n\nexport const phonePeClientVersion = Number(runtimeEnv.PHONE_PE_CLIENT_VERSION as string)\n\nexport const phonePeClientSecret = runtimeEnv.PHONE_PE_CLIENT_SECRET as string\n\nexport const phonePeMerchantId = runtimeEnv.PHONE_PE_MERCHANT_ID as string\n\nexport const razorpayId = runtimeEnv.RAZORPAY_KEY as string\n\nexport const razorpaySecret = runtimeEnv.RAZORPAY_SECRET as string\n\nexport const otpSenderAuthToken = runtimeEnv.OTP_SENDER_AUTH_TOKEN as string\n\nexport const minOrderValue = Number(runtimeEnv.MIN_ORDER_VALUE as string)\n\nexport const deliveryCharge = Number(runtimeEnv.DELIVERY_CHARGE as string)\n\nexport const telegramBotToken = runtimeEnv.TELEGRAM_BOT_TOKEN as string\n\nexport const telegramChatIds = (runtimeEnv.TELEGRAM_CHAT_IDS as string)?.split(',').map(id => id.trim()) || []\n\nexport const isDevMode = (runtimeEnv.ENV_MODE as string) === 'dev'\n", "import { Context, Next } from 'hono';\nimport { jwtVerify } from 'jose';\nimport { getStaffUserById } from '@/src/dbService';\nimport { ApiError } from '@/src/lib/api-error';\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter';\n\n/**\n * Verify JWT token and extract payload\n */\nconst verifyStaffToken = async (token: string) => {\n try {\n const { payload } = await jwtVerify(token, getEncodedJwtSecret());\n return payload;\n } catch (error) {\n throw new ApiError('Access denied. Invalid auth credentials', 401);\n }\n};\n\n/**\n * Middleware to authenticate staff users and attach staffUser to context\n */\nexport const authenticateStaff = async (c: Context, next: Next) => {\n try {\n // Extract token from Authorization header\n const authHeader = c.req.header('authorization');\n\n if (!authHeader || !authHeader.startsWith('Bearer ')) {\n throw new ApiError('Staff authentication required', 401);\n }\n\n const token = authHeader.split(' ')[1];\n\n if (!token) {\n throw new ApiError('Staff authentication token missing', 401);\n }\n\n // Verify token and extract payload\n const decoded = await verifyStaffToken(token) as any;\n\n // Verify staffId exists in token\n if (!decoded.staffId) {\n throw new ApiError('Invalid staff token format', 401);\n }\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { staffUsers } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n const staff = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.id, decoded.staffId),\n });\n */\n\n // Fetch staff user from database\n const staff = await getStaffUserById(decoded.staffId);\n\n if (!staff) {\n throw new ApiError('Staff user not found', 401);\n }\n\n // Attach staff user to context\n c.set('staffUser', {\n id: staff.id,\n name: staff.name,\n });\n\n await next();\n } catch (error) {\n throw error;\n }\n};\n", "import { Hono } from 'hono';\nimport { authenticateStaff } from \"@/src/middleware/staff-auth\";\n\nconst router = new Hono();\n\n// Apply staff authentication to all admin routes\nrouter.use('*', authenticateStaff);\n\nconst avRouter = router;\n\nexport default avRouter;\n", "export const getHttpHandlerExtensionConfiguration = (runtimeConfig) => {\n return {\n setHttpHandler(handler) {\n runtimeConfig.httpHandler = handler;\n },\n httpHandler() {\n return runtimeConfig.httpHandler;\n },\n updateHttpClientConfig(key, value) {\n runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);\n },\n httpHandlerConfigs() {\n return runtimeConfig.httpHandler.httpHandlerConfigs();\n },\n };\n};\nexport const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {\n return {\n httpHandler: httpHandlerExtensionConfiguration.httpHandler(),\n };\n};\n", "export * from \"./httpExtensionConfiguration\";\n", "export {};\n", "export var HttpAuthLocation;\n(function (HttpAuthLocation) {\n HttpAuthLocation[\"HEADER\"] = \"header\";\n HttpAuthLocation[\"QUERY\"] = \"query\";\n})(HttpAuthLocation || (HttpAuthLocation = {}));\n", "export var HttpApiKeyAuthLocation;\n(function (HttpApiKeyAuthLocation) {\n HttpApiKeyAuthLocation[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation[\"QUERY\"] = \"query\";\n})(HttpApiKeyAuthLocation || (HttpApiKeyAuthLocation = {}));\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./auth\";\nexport * from \"./HttpApiKeyAuth\";\nexport * from \"./HttpAuthScheme\";\nexport * from \"./HttpAuthSchemeProvider\";\nexport * from \"./HttpSigner\";\nexport * from \"./IdentityProviderConfig\";\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./config\";\nexport * from \"./manager\";\nexport * from \"./pool\";\n", "export {};\n", "export {};\n", "export var EndpointURLScheme;\n(function (EndpointURLScheme) {\n EndpointURLScheme[\"HTTP\"] = \"http\";\n EndpointURLScheme[\"HTTPS\"] = \"https\";\n})(EndpointURLScheme || (EndpointURLScheme = {}));\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./EndpointRuleObject\";\nexport * from \"./ErrorRuleObject\";\nexport * from \"./RuleSetObject\";\nexport * from \"./shared\";\nexport * from \"./TreeRuleObject\";\n", "export {};\n", "export var AlgorithmId;\n(function (AlgorithmId) {\n AlgorithmId[\"MD5\"] = \"md5\";\n AlgorithmId[\"CRC32\"] = \"crc32\";\n AlgorithmId[\"CRC32C\"] = \"crc32c\";\n AlgorithmId[\"SHA1\"] = \"sha1\";\n AlgorithmId[\"SHA256\"] = \"sha256\";\n})(AlgorithmId || (AlgorithmId = {}));\nexport const getChecksumConfiguration = (runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== undefined) {\n checksumAlgorithms.push({\n algorithmId: () => AlgorithmId.SHA256,\n checksumConstructor: () => runtimeConfig.sha256,\n });\n }\n if (runtimeConfig.md5 != undefined) {\n checksumAlgorithms.push({\n algorithmId: () => AlgorithmId.MD5,\n checksumConstructor: () => runtimeConfig.md5,\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n },\n };\n};\nexport const resolveChecksumRuntimeConfig = (clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n};\n", "import { getChecksumConfiguration, resolveChecksumRuntimeConfig } from \"./checksum\";\nexport const getDefaultClientConfiguration = (runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n};\nexport const resolveDefaultRuntimeConfig = (config) => {\n return resolveChecksumRuntimeConfig(config);\n};\n", "export {};\n", "export * from \"./defaultClientConfiguration\";\nexport * from \"./defaultExtensionConfiguration\";\nexport { AlgorithmId } from \"./checksum\";\n", "export {};\n", "export var FieldPosition;\n(function (FieldPosition) {\n FieldPosition[FieldPosition[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition[FieldPosition[\"TRAILER\"] = 1] = \"TRAILER\";\n})(FieldPosition || (FieldPosition = {}));\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./apiKeyIdentity\";\nexport * from \"./awsCredentialIdentity\";\nexport * from \"./identity\";\nexport * from \"./tokenIdentity\";\n", "export {};\n", "export const SMITHY_CONTEXT_KEY = \"__smithy_context\";\n", "export {};\n", "export var IniSectionType;\n(function (IniSectionType) {\n IniSectionType[\"PROFILE\"] = \"profile\";\n IniSectionType[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType[\"SERVICES\"] = \"services\";\n})(IniSectionType || (IniSectionType = {}));\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export var RequestHandlerProtocol;\n(function (RequestHandlerProtocol) {\n RequestHandlerProtocol[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol[\"TDS_8_0\"] = \"tds/8.0\";\n})(RequestHandlerProtocol || (RequestHandlerProtocol = {}));\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./abort\";\nexport * from \"./auth\";\nexport * from \"./blob/blob-payload-input-types\";\nexport * from \"./checksum\";\nexport * from \"./client\";\nexport * from \"./command\";\nexport * from \"./connection\";\nexport * from \"./crypto\";\nexport * from \"./encode\";\nexport * from \"./endpoint\";\nexport * from \"./endpoints\";\nexport * from \"./eventStream\";\nexport * from \"./extensions\";\nexport * from \"./feature-ids\";\nexport * from \"./http\";\nexport * from \"./http/httpHandlerInitialization\";\nexport * from \"./identity\";\nexport * from \"./logger\";\nexport * from \"./middleware\";\nexport * from \"./pagination\";\nexport * from \"./profile\";\nexport * from \"./response\";\nexport * from \"./retry\";\nexport * from \"./schema/schema\";\nexport * from \"./schema/traits\";\nexport * from \"./schema/schema-deprecated\";\nexport * from \"./schema/sentinels\";\nexport * from \"./schema/static-schemas\";\nexport * from \"./serde\";\nexport * from \"./shapes\";\nexport * from \"./signature\";\nexport * from \"./stream\";\nexport * from \"./streaming-payload/streaming-blob-common-types\";\nexport * from \"./streaming-payload/streaming-blob-payload-input-types\";\nexport * from \"./streaming-payload/streaming-blob-payload-output-types\";\nexport * from \"./transfer\";\nexport * from \"./transform/client-payload-blob-type-narrow\";\nexport * from \"./transform/mutable\";\nexport * from \"./transform/no-undefined\";\nexport * from \"./transform/type-transform\";\nexport * from \"./uri\";\nexport * from \"./util\";\nexport * from \"./waiter\";\n", "import { FieldPosition } from \"@smithy/types\";\nexport class Field {\n name;\n kind;\n values;\n constructor({ name, kind = FieldPosition.HEADER, values = [] }) {\n this.name = name;\n this.kind = kind;\n this.values = values;\n }\n add(value) {\n this.values.push(value);\n }\n set(values) {\n this.values = values;\n }\n remove(value) {\n this.values = this.values.filter((v) => v !== value);\n }\n toString() {\n return this.values.map((v) => (v.includes(\",\") || v.includes(\" \") ? `\"${v}\"` : v)).join(\", \");\n }\n get() {\n return this.values;\n }\n}\n", "export class Fields {\n entries = {};\n encoding;\n constructor({ fields = [], encoding = \"utf-8\" }) {\n fields.forEach(this.setField.bind(this));\n this.encoding = encoding;\n }\n setField(field) {\n this.entries[field.name.toLowerCase()] = field;\n }\n getField(name) {\n return this.entries[name.toLowerCase()];\n }\n removeField(name) {\n delete this.entries[name.toLowerCase()];\n }\n getByType(kind) {\n return Object.values(this.entries).filter((field) => field.kind === kind);\n }\n}\n", "export {};\n", "export class HttpRequest {\n method;\n protocol;\n hostname;\n port;\n path;\n query;\n headers;\n username;\n password;\n fragment;\n body;\n constructor(options) {\n this.method = options.method || \"GET\";\n this.hostname = options.hostname || \"localhost\";\n this.port = options.port;\n this.query = options.query || {};\n this.headers = options.headers || {};\n this.body = options.body;\n this.protocol = options.protocol\n ? options.protocol.slice(-1) !== \":\"\n ? `${options.protocol}:`\n : options.protocol\n : \"https:\";\n this.path = options.path ? (options.path.charAt(0) !== \"/\" ? `/${options.path}` : options.path) : \"/\";\n this.username = options.username;\n this.password = options.password;\n this.fragment = options.fragment;\n }\n static clone(request) {\n const cloned = new HttpRequest({\n ...request,\n headers: { ...request.headers },\n });\n if (cloned.query) {\n cloned.query = cloneQuery(cloned.query);\n }\n return cloned;\n }\n static isInstance(request) {\n if (!request) {\n return false;\n }\n const req = request;\n return (\"method\" in req &&\n \"protocol\" in req &&\n \"hostname\" in req &&\n \"path\" in req &&\n typeof req[\"query\"] === \"object\" &&\n typeof req[\"headers\"] === \"object\");\n }\n clone() {\n return HttpRequest.clone(this);\n }\n}\nfunction cloneQuery(query) {\n return Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param,\n };\n }, {});\n}\n", "export class HttpResponse {\n statusCode;\n reason;\n headers;\n body;\n constructor(options) {\n this.statusCode = options.statusCode;\n this.reason = options.reason;\n this.headers = options.headers || {};\n this.body = options.body;\n }\n static isInstance(response) {\n if (!response)\n return false;\n const resp = response;\n return typeof resp.statusCode === \"number\" && typeof resp.headers === \"object\";\n }\n}\n", "export function isValidHostname(hostname) {\n const hostPattern = /^[a-z0-9][a-z0-9\\.\\-]*[a-z0-9]$/;\n return hostPattern.test(hostname);\n}\n", "export {};\n", "export * from \"./extensions\";\nexport * from \"./Field\";\nexport * from \"./Fields\";\nexport * from \"./httpHandler\";\nexport * from \"./httpRequest\";\nexport * from \"./httpResponse\";\nexport * from \"./isValidHostname\";\nexport * from \"./types\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nexport function addExpectContinueMiddleware(options) {\n return (next) => async (args) => {\n const { request } = args;\n if (options.expectContinueHeader !== false &&\n HttpRequest.isInstance(request) &&\n request.body &&\n options.runtime === \"node\" &&\n options.requestHandler?.constructor?.name !== \"FetchHttpHandler\") {\n let sendHeader = true;\n if (typeof options.expectContinueHeader === \"number\") {\n try {\n const bodyLength = Number(request.headers?.[\"content-length\"]) ?? options.bodyLengthChecker?.(request.body) ?? Infinity;\n sendHeader = bodyLength >= options.expectContinueHeader;\n }\n catch (e) { }\n }\n else {\n sendHeader = !!options.expectContinueHeader;\n }\n if (sendHeader) {\n request.headers.Expect = \"100-continue\";\n }\n }\n return next({\n ...args,\n request,\n });\n };\n}\nexport const addExpectContinueMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_EXPECT_HEADER\", \"EXPECT_HEADER\"],\n name: \"addExpectContinueMiddleware\",\n override: true,\n};\nexport const getAddExpectContinuePlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(addExpectContinueMiddleware(options), addExpectContinueMiddlewareOptions);\n },\n});\n", "export const RequestChecksumCalculation = {\n WHEN_SUPPORTED: \"WHEN_SUPPORTED\",\n WHEN_REQUIRED: \"WHEN_REQUIRED\",\n};\nexport const DEFAULT_REQUEST_CHECKSUM_CALCULATION = RequestChecksumCalculation.WHEN_SUPPORTED;\nexport const ResponseChecksumValidation = {\n WHEN_SUPPORTED: \"WHEN_SUPPORTED\",\n WHEN_REQUIRED: \"WHEN_REQUIRED\",\n};\nexport const DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.WHEN_SUPPORTED;\nexport var ChecksumAlgorithm;\n(function (ChecksumAlgorithm) {\n ChecksumAlgorithm[\"MD5\"] = \"MD5\";\n ChecksumAlgorithm[\"CRC32\"] = \"CRC32\";\n ChecksumAlgorithm[\"CRC32C\"] = \"CRC32C\";\n ChecksumAlgorithm[\"CRC64NVME\"] = \"CRC64NVME\";\n ChecksumAlgorithm[\"SHA1\"] = \"SHA1\";\n ChecksumAlgorithm[\"SHA256\"] = \"SHA256\";\n})(ChecksumAlgorithm || (ChecksumAlgorithm = {}));\nexport var ChecksumLocation;\n(function (ChecksumLocation) {\n ChecksumLocation[\"HEADER\"] = \"header\";\n ChecksumLocation[\"TRAILER\"] = \"trailer\";\n})(ChecksumLocation || (ChecksumLocation = {}));\nexport const DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.CRC32;\n", "import { DEFAULT_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation } from \"./constants\";\nimport { SelectorType, stringUnionSelector } from \"./stringUnionSelector\";\nexport const ENV_REQUEST_CHECKSUM_CALCULATION = \"AWS_REQUEST_CHECKSUM_CALCULATION\";\nexport const CONFIG_REQUEST_CHECKSUM_CALCULATION = \"request_checksum_calculation\";\nexport const NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => stringUnionSelector(env, ENV_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.ENV),\n configFileSelector: (profile) => stringUnionSelector(profile, CONFIG_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.CONFIG),\n default: DEFAULT_REQUEST_CHECKSUM_CALCULATION,\n};\n", "import { DEFAULT_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation } from \"./constants\";\nimport { SelectorType, stringUnionSelector } from \"./stringUnionSelector\";\nexport const ENV_RESPONSE_CHECKSUM_VALIDATION = \"AWS_RESPONSE_CHECKSUM_VALIDATION\";\nexport const CONFIG_RESPONSE_CHECKSUM_VALIDATION = \"response_checksum_validation\";\nexport const NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => stringUnionSelector(env, ENV_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.ENV),\n configFileSelector: (profile) => stringUnionSelector(profile, CONFIG_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.CONFIG),\n default: DEFAULT_RESPONSE_CHECKSUM_VALIDATION,\n};\n", "export const state = {\n warningEmitted: false,\n};\nexport const emitWarningIfUnsupportedVersion = (version) => {\n if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 20) {\n state.warningEmitted = true;\n process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js ${version} in January 2026.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to a supported Node.js LTS version.\n\nMore information can be found at: https://a.co/c895JFp`);\n }\n};\n", "export function setCredentialFeature(credentials, feature, value) {\n if (!credentials.$source) {\n credentials.$source = {};\n }\n credentials.$source[feature] = value;\n return credentials;\n}\n", "export function setFeature(context, feature, value) {\n if (!context.__aws_sdk_context) {\n context.__aws_sdk_context = {\n features: {},\n };\n }\n else if (!context.__aws_sdk_context.features) {\n context.__aws_sdk_context.features = {};\n }\n context.__aws_sdk_context.features[feature] = value;\n}\n", "export function setTokenFeature(token, feature, value) {\n if (!token.$source) {\n token.$source = {};\n }\n token.$source[feature] = value;\n return token;\n}\n", "export * from \"./emitWarningIfUnsupportedVersion\";\nexport * from \"./setCredentialFeature\";\nexport * from \"./setFeature\";\nexport * from \"./setTokenFeature\";\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nexport const getDateHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined;\n", "export const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);\n", "import { getSkewCorrectedDate } from \"./getSkewCorrectedDate\";\nexport const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000;\n", "import { isClockSkewed } from \"./isClockSkewed\";\nexport const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {\n const clockTimeInMs = Date.parse(clockTime);\n if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {\n return clockTimeInMs - Date.now();\n }\n return currentSystemClockOffset;\n};\n", "export * from \"./getDateHeader\";\nexport * from \"./getSkewCorrectedDate\";\nexport * from \"./getUpdatedSystemClockOffset\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { getDateHeader, getSkewCorrectedDate, getUpdatedSystemClockOffset } from \"../utils\";\nconst throwSigningPropertyError = (name, property) => {\n if (!property) {\n throw new Error(`Property \\`${name}\\` is not resolved for AWS SDK SigV4Auth`);\n }\n return property;\n};\nexport const validateSigningProperties = async (signingProperties) => {\n const context = throwSigningPropertyError(\"context\", signingProperties.context);\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const authScheme = context.endpointV2?.properties?.authSchemes?.[0];\n const signerFunction = throwSigningPropertyError(\"signer\", config.signer);\n const signer = await signerFunction(authScheme);\n const signingRegion = signingProperties?.signingRegion;\n const signingRegionSet = signingProperties?.signingRegionSet;\n const signingName = signingProperties?.signingName;\n return {\n config,\n signer,\n signingRegion,\n signingRegionSet,\n signingName,\n };\n};\nexport class AwsSdkSigV4Signer {\n async sign(httpRequest, identity, signingProperties) {\n if (!HttpRequest.isInstance(httpRequest)) {\n throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n }\n const validatedProps = await validateSigningProperties(signingProperties);\n const { config, signer } = validatedProps;\n let { signingRegion, signingName } = validatedProps;\n const handlerExecutionContext = signingProperties.context;\n if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {\n const [first, second] = handlerExecutionContext.authSchemes;\n if (first?.name === \"sigv4a\" && second?.name === \"sigv4\") {\n signingRegion = second?.signingRegion ?? signingRegion;\n signingName = second?.signingName ?? signingName;\n }\n }\n const signedRequest = await signer.sign(httpRequest, {\n signingDate: getSkewCorrectedDate(config.systemClockOffset),\n signingRegion: signingRegion,\n signingService: signingName,\n });\n return signedRequest;\n }\n errorHandler(signingProperties) {\n return (error) => {\n const serverTime = error.ServerTime ?? getDateHeader(error.$response);\n if (serverTime) {\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const initialSystemClockOffset = config.systemClockOffset;\n config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);\n const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;\n if (clockSkewCorrected && error.$metadata) {\n error.$metadata.clockSkewCorrected = true;\n }\n }\n throw error;\n };\n }\n successHandler(httpResponse, signingProperties) {\n const dateHeader = getDateHeader(httpResponse);\n if (dateHeader) {\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);\n }\n }\n}\nexport const AWSSDKSigV4Signer = AwsSdkSigV4Signer;\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { getSkewCorrectedDate } from \"../utils\";\nimport { AwsSdkSigV4Signer, validateSigningProperties } from \"./AwsSdkSigV4Signer\";\nexport class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer {\n async sign(httpRequest, identity, signingProperties) {\n if (!HttpRequest.isInstance(httpRequest)) {\n throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n }\n const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties);\n const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.();\n const multiRegionOverride = (configResolvedSigningRegionSet ??\n signingRegionSet ?? [signingRegion]).join(\",\");\n const signedRequest = await signer.sign(httpRequest, {\n signingDate: getSkewCorrectedDate(config.systemClockOffset),\n signingRegion: multiRegionOverride,\n signingService: signingName,\n });\n return signedRequest;\n }\n}\n", "export const getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\\s-]/g, \"_\").toUpperCase()}`;\n", "import { getArrayForCommaSeparatedString } from \"../utils/getArrayForCommaSeparatedString\";\nimport { getBearerTokenEnvKey } from \"../utils/getBearerTokenEnvKey\";\nconst NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = \"AWS_AUTH_SCHEME_PREFERENCE\";\nconst NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = \"auth_scheme_preference\";\nexport const NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {\n environmentVariableSelector: (env, options) => {\n if (options?.signingName) {\n const bearerTokenKey = getBearerTokenEnvKey(options.signingName);\n if (bearerTokenKey in env)\n return [\"httpBearerAuth\"];\n }\n if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env))\n return undefined;\n return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);\n },\n configFileSelector: (profile) => {\n if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile))\n return undefined;\n return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);\n },\n default: [],\n};\n", "import { SMITHY_CONTEXT_KEY } from \"@smithy/types\";\nexport const getSmithyContext = (context) => context[SMITHY_CONTEXT_KEY] || (context[SMITHY_CONTEXT_KEY] = {});\n", "import { SMITHY_CONTEXT_KEY } from \"@smithy/types\";\nexport const getSmithyContext = (context) => context[SMITHY_CONTEXT_KEY] || (context[SMITHY_CONTEXT_KEY] = {});\n", "export const normalizeProvider = (input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n};\n", "export * from \"./getSmithyContext\";\nexport * from \"./normalizeProvider\";\n", "export const resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => {\n if (!authSchemePreference || authSchemePreference.length === 0) {\n return candidateAuthOptions;\n }\n const preferredAuthOptions = [];\n for (const preferredSchemeName of authSchemePreference) {\n for (const candidateAuthOption of candidateAuthOptions) {\n const candidateAuthSchemeName = candidateAuthOption.schemeId.split(\"#\")[1];\n if (candidateAuthSchemeName === preferredSchemeName) {\n preferredAuthOptions.push(candidateAuthOption);\n }\n }\n }\n for (const candidateAuthOption of candidateAuthOptions) {\n if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) {\n preferredAuthOptions.push(candidateAuthOption);\n }\n }\n return preferredAuthOptions;\n};\n", "import { getSmithyContext } from \"@smithy/util-middleware\";\nimport { resolveAuthOptions } from \"./resolveAuthOptions\";\nfunction convertHttpAuthSchemesToMap(httpAuthSchemes) {\n const map = new Map();\n for (const scheme of httpAuthSchemes) {\n map.set(scheme.schemeId, scheme);\n }\n return map;\n}\nexport const httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => {\n const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input));\n const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];\n const resolvedOptions = resolveAuthOptions(options, authSchemePreference);\n const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);\n const smithyContext = getSmithyContext(context);\n const failureReasons = [];\n for (const option of resolvedOptions) {\n const scheme = authSchemes.get(option.schemeId);\n if (!scheme) {\n failureReasons.push(`HttpAuthScheme \\`${option.schemeId}\\` was not enabled for this service.`);\n continue;\n }\n const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config));\n if (!identityProvider) {\n failureReasons.push(`HttpAuthScheme \\`${option.schemeId}\\` did not have an IdentityProvider configured.`);\n continue;\n }\n const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {};\n option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);\n option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);\n smithyContext.selectedHttpAuthScheme = {\n httpAuthOption: option,\n identity: await identityProvider(option.identityProperties),\n signer: scheme.signer,\n };\n break;\n }\n if (!smithyContext.selectedHttpAuthScheme) {\n throw new Error(failureReasons.join(\"\\n\"));\n }\n return next(args);\n};\n", "import { httpAuthSchemeMiddleware } from \"./httpAuthSchemeMiddleware\";\nexport const httpAuthSchemeEndpointRuleSetMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"HTTP_AUTH_SCHEME\"],\n name: \"httpAuthSchemeMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: \"endpointV2Middleware\",\n};\nexport const getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider,\n }), httpAuthSchemeEndpointRuleSetMiddlewareOptions);\n },\n});\n", "import { httpAuthSchemeMiddleware } from \"./httpAuthSchemeMiddleware\";\nexport const httpAuthSchemeMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"HTTP_AUTH_SCHEME\"],\n name: \"httpAuthSchemeMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: \"serializerMiddleware\",\n};\nexport const getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider,\n }), httpAuthSchemeMiddlewareOptions);\n },\n});\n", "export * from \"./httpAuthSchemeMiddleware\";\nexport * from \"./getHttpAuthSchemeEndpointRuleSetPlugin\";\nexport * from \"./getHttpAuthSchemePlugin\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { getSmithyContext } from \"@smithy/util-middleware\";\nconst defaultErrorHandler = (signingProperties) => (error) => {\n throw error;\n};\nconst defaultSuccessHandler = (httpResponse, signingProperties) => { };\nexport const httpSigningMiddleware = (config) => (next, context) => async (args) => {\n if (!HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n const smithyContext = getSmithyContext(context);\n const scheme = smithyContext.selectedHttpAuthScheme;\n if (!scheme) {\n throw new Error(`No HttpAuthScheme was selected: unable to sign request`);\n }\n const { httpAuthOption: { signingProperties = {} }, identity, signer, } = scheme;\n const output = await next({\n ...args,\n request: await signer.sign(args.request, identity, signingProperties),\n }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));\n (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);\n return output;\n};\n", "import { httpSigningMiddleware } from \"./httpSigningMiddleware\";\nexport const httpSigningMiddlewareOptions = {\n step: \"finalizeRequest\",\n tags: [\"HTTP_SIGNING\"],\n name: \"httpSigningMiddleware\",\n aliases: [\"apiKeyMiddleware\", \"tokenMiddleware\", \"awsAuthMiddleware\"],\n override: true,\n relation: \"after\",\n toMiddleware: \"retryMiddleware\",\n};\nexport const getHttpSigningPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions);\n },\n});\n", "export * from \"./httpSigningMiddleware\";\nexport * from \"./getHttpSigningMiddleware\";\n", "export const normalizeProvider = (input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n};\n", "const makePagedClientRequest = async (CommandCtor, client, input, withCommand = (_) => _, ...args) => {\n let command = new CommandCtor(input);\n command = withCommand(command) ?? command;\n return await client.send(command, ...args);\n};\nexport function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) {\n return async function* paginateOperation(config, input, ...additionalArguments) {\n const _input = input;\n let token = config.startingToken ?? _input[inputTokenName];\n let hasNext = true;\n let page;\n while (hasNext) {\n _input[inputTokenName] = token;\n if (pageSizeTokenName) {\n _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config.pageSize;\n }\n if (config.client instanceof ClientCtor) {\n page = await makePagedClientRequest(CommandCtor, config.client, input, config.withCommand, ...additionalArguments);\n }\n else {\n throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`);\n }\n yield page;\n const prevToken = token;\n token = get(page, outputTokenName);\n hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));\n }\n return undefined;\n };\n}\nconst get = (fromObject, path) => {\n let cursor = fromObject;\n const pathComponents = path.split(\".\");\n for (const step of pathComponents) {\n if (!cursor || typeof cursor !== \"object\") {\n return undefined;\n }\n cursor = cursor[step];\n }\n return cursor;\n};\n", "const chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;\nexport const alphabetByEncoding = Object.entries(chars).reduce((acc, [i, c]) => {\n acc[c] = Number(i);\n return acc;\n}, {});\nexport const alphabetByValue = chars.split(\"\");\nexport const bitsPerLetter = 6;\nexport const bitsPerByte = 8;\nexport const maxLetterValue = 0b111111;\n", "import { alphabetByEncoding, bitsPerByte, bitsPerLetter } from \"./constants.browser\";\nexport const fromBase64 = (input) => {\n let totalByteLength = (input.length / 4) * 3;\n if (input.slice(-2) === \"==\") {\n totalByteLength -= 2;\n }\n else if (input.slice(-1) === \"=\") {\n totalByteLength--;\n }\n const out = new ArrayBuffer(totalByteLength);\n const dataView = new DataView(out);\n for (let i = 0; i < input.length; i += 4) {\n let bits = 0;\n let bitLength = 0;\n for (let j = i, limit = i + 3; j <= limit; j++) {\n if (input[j] !== \"=\") {\n if (!(input[j] in alphabetByEncoding)) {\n throw new TypeError(`Invalid character ${input[j]} in base64 string.`);\n }\n bits |= alphabetByEncoding[input[j]] << ((limit - j) * bitsPerLetter);\n bitLength += bitsPerLetter;\n }\n else {\n bits >>= bitsPerLetter;\n }\n }\n const chunkOffset = (i / 4) * 3;\n bits >>= bitLength % bitsPerByte;\n const byteLength = Math.floor(bitLength / bitsPerByte);\n for (let k = 0; k < byteLength; k++) {\n const offset = (byteLength - k - 1) * bitsPerByte;\n dataView.setUint8(chunkOffset + k, (bits & (255 << offset)) >> offset);\n }\n }\n return new Uint8Array(out);\n};\n", "export const fromUtf8 = (input) => new TextEncoder().encode(input);\n", "import { fromUtf8 } from \"./fromUtf8\";\nexport const toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n", "export const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return new TextDecoder(\"utf-8\").decode(input);\n};\n", "export * from \"./fromUtf8\";\nexport * from \"./toUint8Array\";\nexport * from \"./toUtf8\";\n", "import { fromUtf8 } from \"@smithy/util-utf8\";\nimport { alphabetByValue, bitsPerByte, bitsPerLetter, maxLetterValue } from \"./constants.browser\";\nexport function toBase64(_input) {\n let input;\n if (typeof _input === \"string\") {\n input = fromUtf8(_input);\n }\n else {\n input = _input;\n }\n const isArrayLike = typeof input === \"object\" && typeof input.length === \"number\";\n const isUint8Array = typeof input === \"object\" &&\n typeof input.byteOffset === \"number\" &&\n typeof input.byteLength === \"number\";\n if (!isArrayLike && !isUint8Array) {\n throw new Error(\"@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.\");\n }\n let str = \"\";\n for (let i = 0; i < input.length; i += 3) {\n let bits = 0;\n let bitLength = 0;\n for (let j = i, limit = Math.min(i + 3, input.length); j < limit; j++) {\n bits |= input[j] << ((limit - j - 1) * bitsPerByte);\n bitLength += bitsPerByte;\n }\n const bitClusterCount = Math.ceil(bitLength / bitsPerLetter);\n bits <<= bitClusterCount * bitsPerLetter - bitLength;\n for (let k = 1; k <= bitClusterCount; k++) {\n const offset = (bitClusterCount - k) * bitsPerLetter;\n str += alphabetByValue[(bits & (maxLetterValue << offset)) >> offset];\n }\n str += \"==\".slice(0, 4 - bitClusterCount);\n }\n return str;\n}\n", "export * from \"./fromBase64\";\nexport * from \"./toBase64\";\n", "import { fromBase64, toBase64 } from \"@smithy/util-base64\";\nimport { fromUtf8, toUtf8 } from \"@smithy/util-utf8\";\nexport class Uint8ArrayBlobAdapter extends Uint8Array {\n static fromString(source, encoding = \"utf-8\") {\n if (typeof source === \"string\") {\n if (encoding === \"base64\") {\n return Uint8ArrayBlobAdapter.mutate(fromBase64(source));\n }\n return Uint8ArrayBlobAdapter.mutate(fromUtf8(source));\n }\n throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);\n }\n static mutate(source) {\n Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype);\n return source;\n }\n transformToString(encoding = \"utf-8\") {\n if (encoding === \"base64\") {\n return toBase64(this);\n }\n return toUtf8(this);\n }\n}\n", "const ReadableStreamRef = typeof ReadableStream === \"function\" ? ReadableStream : function () { };\nexport class ChecksumStream extends ReadableStreamRef {\n}\n", "export const isReadableStream = (stream) => typeof ReadableStream === \"function\" &&\n (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream);\nexport const isBlob = (blob) => {\n return typeof Blob === \"function\" && (blob?.constructor?.name === Blob.name || blob instanceof Blob);\n};\n", "import { toBase64 } from \"@smithy/util-base64\";\nimport { isReadableStream } from \"../stream-type-check\";\nimport { ChecksumStream } from \"./ChecksumStream.browser\";\nexport const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => {\n if (!isReadableStream(source)) {\n throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);\n }\n const encoder = base64Encoder ?? toBase64;\n if (typeof TransformStream !== \"function\") {\n throw new Error(\"@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.\");\n }\n const transform = new TransformStream({\n start() { },\n async transform(chunk, controller) {\n checksum.update(chunk);\n controller.enqueue(chunk);\n },\n async flush(controller) {\n const digest = await checksum.digest();\n const received = encoder(digest);\n if (expectedChecksum !== received) {\n const error = new Error(`Checksum mismatch: expected \"${expectedChecksum}\" but received \"${received}\"` +\n ` in response header \"${checksumSourceLocation}\".`);\n controller.error(error);\n }\n else {\n controller.terminate();\n }\n },\n });\n source.pipeThrough(transform);\n const readable = transform.readable;\n Object.setPrototypeOf(readable, ChecksumStream.prototype);\n return readable;\n};\n", "export class ByteArrayCollector {\n allocByteArray;\n byteLength = 0;\n byteArrays = [];\n constructor(allocByteArray) {\n this.allocByteArray = allocByteArray;\n }\n push(byteArray) {\n this.byteArrays.push(byteArray);\n this.byteLength += byteArray.byteLength;\n }\n flush() {\n if (this.byteArrays.length === 1) {\n const bytes = this.byteArrays[0];\n this.reset();\n return bytes;\n }\n const aggregation = this.allocByteArray(this.byteLength);\n let cursor = 0;\n for (let i = 0; i < this.byteArrays.length; ++i) {\n const bytes = this.byteArrays[i];\n aggregation.set(bytes, cursor);\n cursor += bytes.byteLength;\n }\n this.reset();\n return aggregation;\n }\n reset() {\n this.byteArrays = [];\n this.byteLength = 0;\n }\n}\n", "import { ByteArrayCollector } from \"./ByteArrayCollector\";\nexport function createBufferedReadableStream(upstream, size, logger) {\n const reader = upstream.getReader();\n let streamBufferingLoggedWarning = false;\n let bytesSeen = 0;\n const buffers = [\"\", new ByteArrayCollector((size) => new Uint8Array(size))];\n let mode = -1;\n const pull = async (controller) => {\n const { value, done } = await reader.read();\n const chunk = value;\n if (done) {\n if (mode !== -1) {\n const remainder = flush(buffers, mode);\n if (sizeOf(remainder) > 0) {\n controller.enqueue(remainder);\n }\n }\n controller.close();\n }\n else {\n const chunkMode = modeOf(chunk, false);\n if (mode !== chunkMode) {\n if (mode >= 0) {\n controller.enqueue(flush(buffers, mode));\n }\n mode = chunkMode;\n }\n if (mode === -1) {\n controller.enqueue(chunk);\n return;\n }\n const chunkSize = sizeOf(chunk);\n bytesSeen += chunkSize;\n const bufferSize = sizeOf(buffers[mode]);\n if (chunkSize >= size && bufferSize === 0) {\n controller.enqueue(chunk);\n }\n else {\n const newSize = merge(buffers, mode, chunk);\n if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {\n streamBufferingLoggedWarning = true;\n logger?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);\n }\n if (newSize >= size) {\n controller.enqueue(flush(buffers, mode));\n }\n else {\n await pull(controller);\n }\n }\n }\n };\n return new ReadableStream({\n pull,\n });\n}\nexport const createBufferedReadable = createBufferedReadableStream;\nexport function merge(buffers, mode, chunk) {\n switch (mode) {\n case 0:\n buffers[0] += chunk;\n return sizeOf(buffers[0]);\n case 1:\n case 2:\n buffers[mode].push(chunk);\n return sizeOf(buffers[mode]);\n }\n}\nexport function flush(buffers, mode) {\n switch (mode) {\n case 0:\n const s = buffers[0];\n buffers[0] = \"\";\n return s;\n case 1:\n case 2:\n return buffers[mode].flush();\n }\n throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`);\n}\nexport function sizeOf(chunk) {\n return chunk?.byteLength ?? chunk?.length ?? 0;\n}\nexport function modeOf(chunk, allowBuffer = true) {\n if (allowBuffer && typeof Buffer !== \"undefined\" && chunk instanceof Buffer) {\n return 2;\n }\n if (chunk instanceof Uint8Array) {\n return 1;\n }\n if (typeof chunk === \"string\") {\n return 0;\n }\n return -1;\n}\n", "export const getAwsChunkedEncodingStream = (readableStream, options) => {\n const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;\n const checksumRequired = base64Encoder !== undefined &&\n bodyLengthChecker !== undefined &&\n checksumAlgorithmFn !== undefined &&\n checksumLocationName !== undefined &&\n streamHasher !== undefined;\n const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;\n const reader = readableStream.getReader();\n return new ReadableStream({\n async pull(controller) {\n const { value, done } = await reader.read();\n if (done) {\n controller.enqueue(`0\\r\\n`);\n if (checksumRequired) {\n const checksum = base64Encoder(await digest);\n controller.enqueue(`${checksumLocationName}:${checksum}\\r\\n`);\n controller.enqueue(`\\r\\n`);\n }\n controller.close();\n }\n else {\n controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\\r\\n${value}\\r\\n`);\n }\n },\n });\n};\n", "export async function headStream(stream, bytes) {\n let byteLengthCounter = 0;\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n byteLengthCounter += value?.byteLength ?? 0;\n }\n if (byteLengthCounter >= bytes) {\n break;\n }\n isDone = done;\n }\n reader.releaseLock();\n const collected = new Uint8Array(Math.min(bytes, byteLengthCounter));\n let offset = 0;\n for (const chunk of chunks) {\n if (chunk.byteLength > collected.byteLength - offset) {\n collected.set(chunk.subarray(0, collected.byteLength - offset), offset);\n break;\n }\n else {\n collected.set(chunk, offset);\n }\n offset += chunk.length;\n }\n return collected;\n}\n", "export const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);\nconst hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;\n", "import { escapeUri } from \"./escape-uri\";\nexport const escapeUriPath = (uri) => uri.split(\"/\").map(escapeUri).join(\"/\");\n", "export * from \"./escape-uri\";\nexport * from \"./escape-uri-path\";\n", "import { escapeUri } from \"@smithy/util-uri-escape\";\nexport function buildQueryString(query) {\n const parts = [];\n for (let key of Object.keys(query).sort()) {\n const value = query[key];\n key = escapeUri(key);\n if (Array.isArray(value)) {\n for (let i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(`${key}=${escapeUri(value[i])}`);\n }\n }\n else {\n let qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += `=${escapeUri(value)}`;\n }\n parts.push(qsEntry);\n }\n }\n return parts.join(\"&\");\n}\n", "export function createRequest(url, requestOptions) {\n return new Request(url, requestOptions);\n}\n", "export function requestTimeout(timeoutInMs = 0) {\n return new Promise((resolve, reject) => {\n if (timeoutInMs) {\n setTimeout(() => {\n const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);\n timeoutError.name = \"TimeoutError\";\n reject(timeoutError);\n }, timeoutInMs);\n }\n });\n}\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nimport { buildQueryString } from \"@smithy/querystring-builder\";\nimport { createRequest } from \"./create-request\";\nimport { requestTimeout as requestTimeoutFn } from \"./request-timeout\";\nexport const keepAliveSupport = {\n supported: undefined,\n};\nexport class FetchHttpHandler {\n config;\n configProvider;\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new FetchHttpHandler(instanceOrOptions);\n }\n constructor(options) {\n if (typeof options === \"function\") {\n this.configProvider = options().then((opts) => opts || {});\n }\n else {\n this.config = options ?? {};\n this.configProvider = Promise.resolve(this.config);\n }\n if (keepAliveSupport.supported === undefined) {\n keepAliveSupport.supported = Boolean(typeof Request !== \"undefined\" && \"keepalive\" in createRequest(\"https://[::1]\"));\n }\n }\n destroy() {\n }\n async handle(request, { abortSignal, requestTimeout } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n const requestTimeoutInMs = requestTimeout ?? this.config.requestTimeout;\n const keepAlive = this.config.keepAlive === true;\n const credentials = this.config.credentials;\n if (abortSignal?.aborted) {\n const abortError = buildAbortError(abortSignal);\n return Promise.reject(abortError);\n }\n let path = request.path;\n const queryString = buildQueryString(request.query || {});\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const { port, method } = request;\n const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : \"\"}${path}`;\n const body = method === \"GET\" || method === \"HEAD\" ? undefined : request.body;\n const requestOptions = {\n body,\n headers: new Headers(request.headers),\n method: method,\n credentials,\n };\n if (this.config?.cache) {\n requestOptions.cache = this.config.cache;\n }\n if (body) {\n requestOptions.duplex = \"half\";\n }\n if (typeof AbortController !== \"undefined\") {\n requestOptions.signal = abortSignal;\n }\n if (keepAliveSupport.supported) {\n requestOptions.keepalive = keepAlive;\n }\n if (typeof this.config.requestInit === \"function\") {\n Object.assign(requestOptions, this.config.requestInit(request));\n }\n let removeSignalEventListener = () => { };\n const fetchRequest = createRequest(url, requestOptions);\n const raceOfPromises = [\n fetch(fetchRequest).then((response) => {\n const fetchHeaders = response.headers;\n const transformedHeaders = {};\n for (const pair of fetchHeaders.entries()) {\n transformedHeaders[pair[0]] = pair[1];\n }\n const hasReadableStream = response.body != undefined;\n if (!hasReadableStream) {\n return response.blob().then((body) => ({\n response: new HttpResponse({\n headers: transformedHeaders,\n reason: response.statusText,\n statusCode: response.status,\n body,\n }),\n }));\n }\n return {\n response: new HttpResponse({\n headers: transformedHeaders,\n reason: response.statusText,\n statusCode: response.status,\n body: response.body,\n }),\n };\n }),\n requestTimeoutFn(requestTimeoutInMs),\n ];\n if (abortSignal) {\n raceOfPromises.push(new Promise((resolve, reject) => {\n const onAbort = () => {\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n };\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n removeSignalEventListener = () => signal.removeEventListener(\"abort\", onAbort);\n }\n else {\n abortSignal.onabort = onAbort;\n }\n }));\n }\n return Promise.race(raceOfPromises).finally(removeSignalEventListener);\n }\n updateHttpClientConfig(key, value) {\n this.config = undefined;\n this.configProvider = this.configProvider.then((config) => {\n config[key] = value;\n return config;\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n}\nfunction buildAbortError(abortSignal) {\n const reason = abortSignal && typeof abortSignal === \"object\" && \"reason\" in abortSignal\n ? abortSignal.reason\n : undefined;\n if (reason) {\n if (reason instanceof Error) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n abortError.cause = reason;\n return abortError;\n }\n const abortError = new Error(String(reason));\n abortError.name = \"AbortError\";\n return abortError;\n }\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n return abortError;\n}\n", "import { fromBase64 } from \"@smithy/util-base64\";\nexport const streamCollector = async (stream) => {\n if ((typeof Blob === \"function\" && stream instanceof Blob) || stream.constructor?.name === \"Blob\") {\n if (Blob.prototype.arrayBuffer !== undefined) {\n return new Uint8Array(await stream.arrayBuffer());\n }\n return collectBlob(stream);\n }\n return collectStream(stream);\n};\nasync function collectBlob(blob) {\n const base64 = await readToBase64(blob);\n const arrayBuffer = fromBase64(base64);\n return new Uint8Array(arrayBuffer);\n}\nasync function collectStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n let length = 0;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n isDone = done;\n }\n const collected = new Uint8Array(length);\n let offset = 0;\n for (const chunk of chunks) {\n collected.set(chunk, offset);\n offset += chunk.length;\n }\n return collected;\n}\nfunction readToBase64(blob) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n if (reader.readyState !== 2) {\n return reject(new Error(\"Reader aborted too early\"));\n }\n const result = (reader.result ?? \"\");\n const commaIndex = result.indexOf(\",\");\n const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;\n resolve(result.substring(dataOffset));\n };\n reader.onabort = () => reject(new Error(\"Read aborted\"));\n reader.onerror = () => reject(reader.error);\n reader.readAsDataURL(blob);\n });\n}\n", "export * from \"./fetch-http-handler\";\nexport * from \"./stream-collector\";\n", "const SHORT_TO_HEX = {};\nconst HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\nexport function fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n }\n else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n}\nexport function toHex(bytes) {\n let out = \"\";\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n}\n", "import { streamCollector } from \"@smithy/fetch-http-handler\";\nimport { toBase64 } from \"@smithy/util-base64\";\nimport { toHex } from \"@smithy/util-hex-encoding\";\nimport { toUtf8 } from \"@smithy/util-utf8\";\nimport { isReadableStream } from \"./stream-type-check\";\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nexport const sdkStreamMixin = (stream) => {\n if (!isBlobInstance(stream) && !isReadableStream(stream)) {\n const name = stream?.__proto__?.constructor?.name || stream;\n throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await streamCollector(stream);\n };\n const blobToWebStream = (blob) => {\n if (typeof blob.stream !== \"function\") {\n throw new Error(\"Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\\n\" +\n \"If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body\");\n }\n return blob.stream();\n };\n return Object.assign(stream, {\n transformToByteArray: transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === \"base64\") {\n return toBase64(buf);\n }\n else if (encoding === \"hex\") {\n return toHex(buf);\n }\n else if (encoding === undefined || encoding === \"utf8\" || encoding === \"utf-8\") {\n return toUtf8(buf);\n }\n else if (typeof TextDecoder === \"function\") {\n return new TextDecoder(encoding).decode(buf);\n }\n else {\n throw new Error(\"TextDecoder is not available, please make sure polyfill is provided.\");\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n if (isBlobInstance(stream)) {\n return blobToWebStream(stream);\n }\n else if (isReadableStream(stream)) {\n return stream;\n }\n else {\n throw new Error(`Cannot transform payload to web stream, got ${stream}`);\n }\n },\n });\n};\nconst isBlobInstance = (stream) => typeof Blob === \"function\" && stream instanceof Blob;\n", "export async function splitStream(stream) {\n if (typeof stream.stream === \"function\") {\n stream = stream.stream();\n }\n const readableStream = stream;\n return readableStream.tee();\n}\n", "export * from \"./blob/Uint8ArrayBlobAdapter\";\nexport * from \"./checksum/ChecksumStream\";\nexport * from \"./checksum/createChecksumStream\";\nexport * from \"./createBufferedReadable\";\nexport * from \"./getAwsChunkedEncodingStream\";\nexport * from \"./headStream\";\nexport * from \"./sdk-stream-mixin\";\nexport * from \"./splitStream\";\nexport { isReadableStream, isBlob } from \"./stream-type-check\";\n", "import { Uint8ArrayBlobAdapter } from \"@smithy/util-stream\";\nexport const collectBody = async (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return Uint8ArrayBlobAdapter.mutate(streamBody);\n }\n if (!streamBody) {\n return Uint8ArrayBlobAdapter.mutate(new Uint8Array());\n }\n const fromContext = context.streamCollector(streamBody);\n return Uint8ArrayBlobAdapter.mutate(await fromContext);\n};\n", "export function extendedEncodeURIComponent(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n", "export const deref = (schemaRef) => {\n if (typeof schemaRef === \"function\") {\n return schemaRef();\n }\n return schemaRef;\n};\n", "export const operation = (namespace, name, traits, input, output) => ({\n name,\n namespace,\n traits,\n input,\n output,\n});\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nimport { getSmithyContext } from \"@smithy/util-middleware\";\nimport { operation } from \"../schemas/operation\";\nexport const schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {\n const { response } = await next(args);\n const { operationSchema } = getSmithyContext(context);\n const [, ns, n, t, i, o] = operationSchema ?? [];\n try {\n const parsed = await config.protocol.deserializeResponse(operation(ns, n, t, i, o), {\n ...config,\n ...context,\n }, response);\n return {\n response,\n output: parsed,\n };\n }\n catch (error) {\n Object.defineProperty(error, \"$response\", {\n value: response,\n enumerable: false,\n writable: false,\n configurable: false,\n });\n if (!(\"$metadata\" in error)) {\n const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;\n try {\n error.message += \"\\n \" + hint;\n }\n catch (e) {\n if (!context.logger || context.logger?.constructor?.name === \"NoOpLogger\") {\n console.warn(hint);\n }\n else {\n context.logger?.warn?.(hint);\n }\n }\n if (typeof error.$responseBodyText !== \"undefined\") {\n if (error.$response) {\n error.$response.body = error.$responseBodyText;\n }\n }\n try {\n if (HttpResponse.isInstance(response)) {\n const { headers = {} } = response;\n const headerEntries = Object.entries(headers);\n error.$metadata = {\n httpStatusCode: response.statusCode,\n requestId: findHeader(/^x-[\\w-]+-request-?id$/, headerEntries),\n extendedRequestId: findHeader(/^x-[\\w-]+-id-2$/, headerEntries),\n cfId: findHeader(/^x-[\\w-]+-cf-id$/, headerEntries),\n };\n }\n }\n catch (e) {\n }\n }\n throw error;\n }\n};\nconst findHeader = (pattern, headers) => {\n return (headers.find(([k]) => {\n return k.match(pattern);\n }) || [void 0, void 1])[1];\n};\n", "export function parseQueryString(querystring) {\n const query = {};\n querystring = querystring.replace(/^\\?/, \"\");\n if (querystring) {\n for (const pair of querystring.split(\"&\")) {\n let [key, value = null] = pair.split(\"=\");\n key = decodeURIComponent(key);\n if (value) {\n value = decodeURIComponent(value);\n }\n if (!(key in query)) {\n query[key] = value;\n }\n else if (Array.isArray(query[key])) {\n query[key].push(value);\n }\n else {\n query[key] = [query[key], value];\n }\n }\n }\n return query;\n}\n", "import { parseQueryString } from \"@smithy/querystring-parser\";\nexport const parseUrl = (url) => {\n if (typeof url === \"string\") {\n return parseUrl(new URL(url));\n }\n const { hostname, pathname, port, protocol, search } = url;\n let query;\n if (search) {\n query = parseQueryString(search);\n }\n return {\n hostname,\n port: port ? parseInt(port) : undefined,\n protocol,\n path: pathname,\n query,\n };\n};\n", "import { parseUrl } from \"@smithy/url-parser\";\nexport const toEndpointV1 = (endpoint) => {\n if (typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n const v1Endpoint = parseUrl(endpoint.url);\n if (endpoint.headers) {\n v1Endpoint.headers = {};\n for (const [name, values] of Object.entries(endpoint.headers)) {\n v1Endpoint.headers[name.toLowerCase()] = values.join(\", \");\n }\n }\n return v1Endpoint;\n }\n return endpoint;\n }\n return parseUrl(endpoint);\n};\n", "export * from \"./toEndpointV1\";\n", "import { toEndpointV1 } from \"@smithy/core/endpoints\";\nimport { getSmithyContext } from \"@smithy/util-middleware\";\nimport { operation } from \"../schemas/operation\";\nexport const schemaSerializationMiddleware = (config) => (next, context) => async (args) => {\n const { operationSchema } = getSmithyContext(context);\n const [, ns, n, t, i, o] = operationSchema ?? [];\n const endpoint = context.endpointV2\n ? async () => toEndpointV1(context.endpointV2)\n : config.endpoint;\n const request = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, {\n ...config,\n ...context,\n endpoint,\n });\n return next({\n ...args,\n request,\n });\n};\n", "import { schemaDeserializationMiddleware } from \"./schemaDeserializationMiddleware\";\nimport { schemaSerializationMiddleware } from \"./schemaSerializationMiddleware\";\nexport const deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true,\n};\nexport const serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true,\n};\nexport function getSchemaSerdePlugin(config) {\n return {\n applyToStack: (commandStack) => {\n commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption);\n commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption);\n config.protocol.setSerdeContext(config);\n },\n };\n}\n", "export class Schema {\n name;\n namespace;\n traits;\n static assign(instance, values) {\n const schema = Object.assign(instance, values);\n return schema;\n }\n static [Symbol.hasInstance](lhs) {\n const isPrototype = this.prototype.isPrototypeOf(lhs);\n if (!isPrototype && typeof lhs === \"object\" && lhs !== null) {\n const list = lhs;\n return list.symbol === this.symbol;\n }\n return isPrototype;\n }\n getName() {\n return this.namespace + \"#\" + this.name;\n }\n}\n", "import { Schema } from \"./Schema\";\nexport class ListSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/lis\");\n name;\n traits;\n valueSchema;\n symbol = ListSchema.symbol;\n}\nexport const list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), {\n name,\n namespace,\n traits,\n valueSchema,\n});\n", "import { Schema } from \"./Schema\";\nexport class MapSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/map\");\n name;\n traits;\n keySchema;\n valueSchema;\n symbol = MapSchema.symbol;\n}\nexport const map = (namespace, name, traits, keySchema, valueSchema) => Schema.assign(new MapSchema(), {\n name,\n namespace,\n traits,\n keySchema,\n valueSchema,\n});\n", "import { Schema } from \"./Schema\";\nexport class OperationSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/ope\");\n name;\n traits;\n input;\n output;\n symbol = OperationSchema.symbol;\n}\nexport const op = (namespace, name, traits, input, output) => Schema.assign(new OperationSchema(), {\n name,\n namespace,\n traits,\n input,\n output,\n});\n", "import { Schema } from \"./Schema\";\nexport class StructureSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/str\");\n name;\n traits;\n memberNames;\n memberList;\n symbol = StructureSchema.symbol;\n}\nexport const struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), {\n name,\n namespace,\n traits,\n memberNames,\n memberList,\n});\n", "import { Schema } from \"./Schema\";\nimport { StructureSchema } from \"./StructureSchema\";\nexport class ErrorSchema extends StructureSchema {\n static symbol = Symbol.for(\"@smithy/err\");\n ctor;\n symbol = ErrorSchema.symbol;\n}\nexport const error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), {\n name,\n namespace,\n traits,\n memberNames,\n memberList,\n ctor: null,\n});\n", "export const traitsCache = [];\nexport function translateTraits(indicator) {\n if (typeof indicator === \"object\") {\n return indicator;\n }\n indicator = indicator | 0;\n if (traitsCache[indicator]) {\n return traitsCache[indicator];\n }\n const traits = {};\n let i = 0;\n for (const trait of [\n \"httpLabel\",\n \"idempotent\",\n \"idempotencyToken\",\n \"sensitive\",\n \"httpPayload\",\n \"httpResponseCode\",\n \"httpQueryParams\",\n ]) {\n if (((indicator >> i++) & 1) === 1) {\n traits[trait] = 1;\n }\n }\n return (traitsCache[indicator] = traits);\n}\n", "import { deref } from \"../deref\";\nimport { translateTraits } from \"./translateTraits\";\nconst anno = {\n it: Symbol.for(\"@smithy/nor-struct-it\"),\n ns: Symbol.for(\"@smithy/ns\"),\n};\nexport const simpleSchemaCacheN = [];\nexport const simpleSchemaCacheS = {};\nexport class NormalizedSchema {\n ref;\n memberName;\n static symbol = Symbol.for(\"@smithy/nor\");\n symbol = NormalizedSchema.symbol;\n name;\n schema;\n _isMemberSchema;\n traits;\n memberTraits;\n normalizedTraits;\n constructor(ref, memberName) {\n this.ref = ref;\n this.memberName = memberName;\n const traitStack = [];\n let _ref = ref;\n let schema = ref;\n this._isMemberSchema = false;\n while (isMemberSchema(_ref)) {\n traitStack.push(_ref[1]);\n _ref = _ref[0];\n schema = deref(_ref);\n this._isMemberSchema = true;\n }\n if (traitStack.length > 0) {\n this.memberTraits = {};\n for (let i = traitStack.length - 1; i >= 0; --i) {\n const traitSet = traitStack[i];\n Object.assign(this.memberTraits, translateTraits(traitSet));\n }\n }\n else {\n this.memberTraits = 0;\n }\n if (schema instanceof NormalizedSchema) {\n const computedMemberTraits = this.memberTraits;\n Object.assign(this, schema);\n this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits());\n this.normalizedTraits = void 0;\n this.memberName = memberName ?? schema.memberName;\n return;\n }\n this.schema = deref(schema);\n if (isStaticSchema(this.schema)) {\n this.name = `${this.schema[1]}#${this.schema[2]}`;\n this.traits = this.schema[3];\n }\n else {\n this.name = this.memberName ?? String(schema);\n this.traits = 0;\n }\n if (this._isMemberSchema && !memberName) {\n throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`);\n }\n }\n static [Symbol.hasInstance](lhs) {\n const isPrototype = this.prototype.isPrototypeOf(lhs);\n if (!isPrototype && typeof lhs === \"object\" && lhs !== null) {\n const ns = lhs;\n return ns.symbol === this.symbol;\n }\n return isPrototype;\n }\n static of(ref) {\n const keyAble = typeof ref === \"function\" || (typeof ref === \"object\" && ref !== null);\n if (typeof ref === \"number\") {\n if (simpleSchemaCacheN[ref]) {\n return simpleSchemaCacheN[ref];\n }\n }\n else if (typeof ref === \"string\") {\n if (simpleSchemaCacheS[ref]) {\n return simpleSchemaCacheS[ref];\n }\n }\n else if (keyAble) {\n if (ref[anno.ns]) {\n return ref[anno.ns];\n }\n }\n const sc = deref(ref);\n if (sc instanceof NormalizedSchema) {\n return sc;\n }\n if (isMemberSchema(sc)) {\n const [ns, traits] = sc;\n if (ns instanceof NormalizedSchema) {\n Object.assign(ns.getMergedTraits(), translateTraits(traits));\n return ns;\n }\n throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`);\n }\n const ns = new NormalizedSchema(sc);\n if (keyAble) {\n return (ref[anno.ns] = ns);\n }\n if (typeof sc === \"string\") {\n return (simpleSchemaCacheS[sc] = ns);\n }\n if (typeof sc === \"number\") {\n return (simpleSchemaCacheN[sc] = ns);\n }\n return ns;\n }\n getSchema() {\n const sc = this.schema;\n if (Array.isArray(sc) && sc[0] === 0) {\n return sc[4];\n }\n return sc;\n }\n getName(withNamespace = false) {\n const { name } = this;\n const short = !withNamespace && name && name.includes(\"#\");\n return short ? name.split(\"#\")[1] : name || undefined;\n }\n getMemberName() {\n return this.memberName;\n }\n isMemberSchema() {\n return this._isMemberSchema;\n }\n isListSchema() {\n const sc = this.getSchema();\n return typeof sc === \"number\"\n ? sc >= 64 && sc < 128\n : sc[0] === 1;\n }\n isMapSchema() {\n const sc = this.getSchema();\n return typeof sc === \"number\"\n ? sc >= 128 && sc <= 0b1111_1111\n : sc[0] === 2;\n }\n isStructSchema() {\n const sc = this.getSchema();\n if (typeof sc !== \"object\") {\n return false;\n }\n const id = sc[0];\n return (id === 3 ||\n id === -3 ||\n id === 4);\n }\n isUnionSchema() {\n const sc = this.getSchema();\n if (typeof sc !== \"object\") {\n return false;\n }\n return sc[0] === 4;\n }\n isBlobSchema() {\n const sc = this.getSchema();\n return sc === 21 || sc === 42;\n }\n isTimestampSchema() {\n const sc = this.getSchema();\n return (typeof sc === \"number\" &&\n sc >= 4 &&\n sc <= 7);\n }\n isUnitSchema() {\n return this.getSchema() === \"unit\";\n }\n isDocumentSchema() {\n return this.getSchema() === 15;\n }\n isStringSchema() {\n return this.getSchema() === 0;\n }\n isBooleanSchema() {\n return this.getSchema() === 2;\n }\n isNumericSchema() {\n return this.getSchema() === 1;\n }\n isBigIntegerSchema() {\n return this.getSchema() === 17;\n }\n isBigDecimalSchema() {\n return this.getSchema() === 19;\n }\n isStreaming() {\n const { streaming } = this.getMergedTraits();\n return !!streaming || this.getSchema() === 42;\n }\n isIdempotencyToken() {\n return !!this.getMergedTraits().idempotencyToken;\n }\n getMergedTraits() {\n return (this.normalizedTraits ??\n (this.normalizedTraits = {\n ...this.getOwnTraits(),\n ...this.getMemberTraits(),\n }));\n }\n getMemberTraits() {\n return translateTraits(this.memberTraits);\n }\n getOwnTraits() {\n return translateTraits(this.traits);\n }\n getKeySchema() {\n const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()];\n if (!isDoc && !isMap) {\n throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`);\n }\n const schema = this.getSchema();\n const memberSchema = isDoc\n ? 15\n : schema[4] ?? 0;\n return member([memberSchema, 0], \"key\");\n }\n getValueSchema() {\n const sc = this.getSchema();\n const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()];\n const memberSchema = typeof sc === \"number\"\n ? 0b0011_1111 & sc\n : sc && typeof sc === \"object\" && (isMap || isList)\n ? sc[3 + sc[0]]\n : isDoc\n ? 15\n : void 0;\n if (memberSchema != null) {\n return member([memberSchema, 0], isMap ? \"value\" : \"member\");\n }\n throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`);\n }\n getMemberSchema(memberName) {\n const struct = this.getSchema();\n if (this.isStructSchema() && struct[4].includes(memberName)) {\n const i = struct[4].indexOf(memberName);\n const memberSchema = struct[5][i];\n return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName);\n }\n if (this.isDocumentSchema()) {\n return member([15, 0], memberName);\n }\n throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`);\n }\n getMemberSchemas() {\n const buffer = {};\n try {\n for (const [k, v] of this.structIterator()) {\n buffer[k] = v;\n }\n }\n catch (ignored) { }\n return buffer;\n }\n getEventStreamMember() {\n if (this.isStructSchema()) {\n for (const [memberName, memberSchema] of this.structIterator()) {\n if (memberSchema.isStreaming() && memberSchema.isStructSchema()) {\n return memberName;\n }\n }\n }\n return \"\";\n }\n *structIterator() {\n if (this.isUnitSchema()) {\n return;\n }\n if (!this.isStructSchema()) {\n throw new Error(\"@smithy/core/schema - cannot iterate non-struct schema.\");\n }\n const struct = this.getSchema();\n const z = struct[4].length;\n let it = struct[anno.it];\n if (it && z === it.length) {\n yield* it;\n return;\n }\n it = Array(z);\n for (let i = 0; i < z; ++i) {\n const k = struct[4][i];\n const v = member([struct[5][i], 0], k);\n yield (it[i] = [k, v]);\n }\n struct[anno.it] = it;\n }\n}\nfunction member(memberSchema, memberName) {\n if (memberSchema instanceof NormalizedSchema) {\n return Object.assign(memberSchema, {\n memberName,\n _isMemberSchema: true,\n });\n }\n const internalCtorAccess = NormalizedSchema;\n return new internalCtorAccess(memberSchema, memberName);\n}\nconst isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2;\nexport const isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5;\n", "import { Schema } from \"./Schema\";\nexport class SimpleSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/sim\");\n name;\n schemaRef;\n traits;\n symbol = SimpleSchema.symbol;\n}\nexport const sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), {\n name,\n namespace,\n traits,\n schemaRef,\n});\nexport const simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), {\n name,\n namespace,\n traits,\n schemaRef,\n});\n", "export const SCHEMA = {\n BLOB: 0b0001_0101,\n STREAMING_BLOB: 0b0010_1010,\n BOOLEAN: 0b0000_0010,\n STRING: 0b0000_0000,\n NUMERIC: 0b0000_0001,\n BIG_INTEGER: 0b0001_0001,\n BIG_DECIMAL: 0b0001_0011,\n DOCUMENT: 0b0000_1111,\n TIMESTAMP_DEFAULT: 0b0000_0100,\n TIMESTAMP_DATE_TIME: 0b0000_0101,\n TIMESTAMP_HTTP_DATE: 0b0000_0110,\n TIMESTAMP_EPOCH_SECONDS: 0b0000_0111,\n LIST_MODIFIER: 0b0100_0000,\n MAP_MODIFIER: 0b1000_0000,\n};\n", "export class TypeRegistry {\n namespace;\n schemas;\n exceptions;\n static registries = new Map();\n constructor(namespace, schemas = new Map(), exceptions = new Map()) {\n this.namespace = namespace;\n this.schemas = schemas;\n this.exceptions = exceptions;\n }\n static for(namespace) {\n if (!TypeRegistry.registries.has(namespace)) {\n TypeRegistry.registries.set(namespace, new TypeRegistry(namespace));\n }\n return TypeRegistry.registries.get(namespace);\n }\n copyFrom(other) {\n const { schemas, exceptions } = this;\n for (const [k, v] of other.schemas) {\n if (!schemas.has(k)) {\n schemas.set(k, v);\n }\n }\n for (const [k, v] of other.exceptions) {\n if (!exceptions.has(k)) {\n exceptions.set(k, v);\n }\n }\n }\n register(shapeId, schema) {\n const qualifiedName = this.normalizeShapeId(shapeId);\n for (const r of [this, TypeRegistry.for(qualifiedName.split(\"#\")[0])]) {\n r.schemas.set(qualifiedName, schema);\n }\n }\n getSchema(shapeId) {\n const id = this.normalizeShapeId(shapeId);\n if (!this.schemas.has(id)) {\n throw new Error(`@smithy/core/schema - schema not found for ${id}`);\n }\n return this.schemas.get(id);\n }\n registerError(es, ctor) {\n const $error = es;\n const ns = $error[1];\n for (const r of [this, TypeRegistry.for(ns)]) {\n r.schemas.set(ns + \"#\" + $error[2], $error);\n r.exceptions.set($error, ctor);\n }\n }\n getErrorCtor(es) {\n const $error = es;\n if (this.exceptions.has($error)) {\n return this.exceptions.get($error);\n }\n const registry = TypeRegistry.for($error[1]);\n return registry.exceptions.get($error);\n }\n getBaseException() {\n for (const exceptionKey of this.exceptions.keys()) {\n if (Array.isArray(exceptionKey)) {\n const [, ns, name] = exceptionKey;\n const id = ns + \"#\" + name;\n if (id.startsWith(\"smithy.ts.sdk.synthetic.\") && id.endsWith(\"ServiceException\")) {\n return exceptionKey;\n }\n }\n }\n return undefined;\n }\n find(predicate) {\n return [...this.schemas.values()].find(predicate);\n }\n clear() {\n this.schemas.clear();\n this.exceptions.clear();\n }\n normalizeShapeId(shapeId) {\n if (shapeId.includes(\"#\")) {\n return shapeId;\n }\n return this.namespace + \"#\" + shapeId;\n }\n}\n", "export * from \"./deref\";\nexport * from \"./middleware/getSchemaSerdePlugin\";\nexport * from \"./schemas/ListSchema\";\nexport * from \"./schemas/MapSchema\";\nexport * from \"./schemas/OperationSchema\";\nexport * from \"./schemas/operation\";\nexport * from \"./schemas/ErrorSchema\";\nexport * from \"./schemas/NormalizedSchema\";\nexport * from \"./schemas/Schema\";\nexport * from \"./schemas/SimpleSchema\";\nexport * from \"./schemas/StructureSchema\";\nexport * from \"./schemas/sentinels\";\nexport * from \"./schemas/translateTraits\";\nexport * from \"./TypeRegistry\";\n", "export const copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source;\n", "export const parseBoolean = (value) => {\n switch (value) {\n case \"true\":\n return true;\n case \"false\":\n return false;\n default:\n throw new Error(`Unable to parse boolean value \"${value}\"`);\n }\n};\nexport const expectBoolean = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"number\") {\n if (value === 0 || value === 1) {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (value === 0) {\n return false;\n }\n if (value === 1) {\n return true;\n }\n }\n if (typeof value === \"string\") {\n const lower = value.toLowerCase();\n if (lower === \"false\" || lower === \"true\") {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (lower === \"false\") {\n return false;\n }\n if (lower === \"true\") {\n return true;\n }\n }\n if (typeof value === \"boolean\") {\n return value;\n }\n throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);\n};\nexport const expectNumber = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"string\") {\n const parsed = parseFloat(value);\n if (!Number.isNaN(parsed)) {\n if (String(parsed) !== String(value)) {\n logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));\n }\n return parsed;\n }\n }\n if (typeof value === \"number\") {\n return value;\n }\n throw new TypeError(`Expected number, got ${typeof value}: ${value}`);\n};\nconst MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));\nexport const expectFloat32 = (value) => {\n const expected = expectNumber(value);\n if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {\n if (Math.abs(expected) > MAX_FLOAT) {\n throw new TypeError(`Expected 32-bit float, got ${value}`);\n }\n }\n return expected;\n};\nexport const expectLong = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (Number.isInteger(value) && !Number.isNaN(value)) {\n return value;\n }\n throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);\n};\nexport const expectInt = expectLong;\nexport const expectInt32 = (value) => expectSizedInt(value, 32);\nexport const expectShort = (value) => expectSizedInt(value, 16);\nexport const expectByte = (value) => expectSizedInt(value, 8);\nconst expectSizedInt = (value, size) => {\n const expected = expectLong(value);\n if (expected !== undefined && castInt(expected, size) !== expected) {\n throw new TypeError(`Expected ${size}-bit integer, got ${value}`);\n }\n return expected;\n};\nconst castInt = (value, size) => {\n switch (size) {\n case 32:\n return Int32Array.of(value)[0];\n case 16:\n return Int16Array.of(value)[0];\n case 8:\n return Int8Array.of(value)[0];\n }\n};\nexport const expectNonNull = (value, location) => {\n if (value === null || value === undefined) {\n if (location) {\n throw new TypeError(`Expected a non-null value for ${location}`);\n }\n throw new TypeError(\"Expected a non-null value\");\n }\n return value;\n};\nexport const expectObject = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"object\" && !Array.isArray(value)) {\n return value;\n }\n const receivedType = Array.isArray(value) ? \"array\" : typeof value;\n throw new TypeError(`Expected object, got ${receivedType}: ${value}`);\n};\nexport const expectString = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"string\") {\n return value;\n }\n if ([\"boolean\", \"number\", \"bigint\"].includes(typeof value)) {\n logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));\n return String(value);\n }\n throw new TypeError(`Expected string, got ${typeof value}: ${value}`);\n};\nexport const expectUnion = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n const asObject = expectObject(value);\n const setKeys = Object.entries(asObject)\n .filter(([, v]) => v != null)\n .map(([k]) => k);\n if (setKeys.length === 0) {\n throw new TypeError(`Unions must have exactly one non-null member. None were found.`);\n }\n if (setKeys.length > 1) {\n throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);\n }\n return asObject;\n};\nexport const strictParseDouble = (value) => {\n if (typeof value == \"string\") {\n return expectNumber(parseNumber(value));\n }\n return expectNumber(value);\n};\nexport const strictParseFloat = strictParseDouble;\nexport const strictParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return expectFloat32(parseNumber(value));\n }\n return expectFloat32(value);\n};\nconst NUMBER_REGEX = /(-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)|(-?Infinity)|(NaN)/g;\nconst parseNumber = (value) => {\n const matches = value.match(NUMBER_REGEX);\n if (matches === null || matches[0].length !== value.length) {\n throw new TypeError(`Expected real number, got implicit NaN`);\n }\n return parseFloat(value);\n};\nexport const limitedParseDouble = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectNumber(value);\n};\nexport const handleFloat = limitedParseDouble;\nexport const limitedParseFloat = limitedParseDouble;\nexport const limitedParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectFloat32(value);\n};\nconst parseFloatString = (value) => {\n switch (value) {\n case \"NaN\":\n return NaN;\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n default:\n throw new Error(`Unable to parse float value: ${value}`);\n }\n};\nexport const strictParseLong = (value) => {\n if (typeof value === \"string\") {\n return expectLong(parseNumber(value));\n }\n return expectLong(value);\n};\nexport const strictParseInt = strictParseLong;\nexport const strictParseInt32 = (value) => {\n if (typeof value === \"string\") {\n return expectInt32(parseNumber(value));\n }\n return expectInt32(value);\n};\nexport const strictParseShort = (value) => {\n if (typeof value === \"string\") {\n return expectShort(parseNumber(value));\n }\n return expectShort(value);\n};\nexport const strictParseByte = (value) => {\n if (typeof value === \"string\") {\n return expectByte(parseNumber(value));\n }\n return expectByte(value);\n};\nconst stackTraceWarning = (message) => {\n return String(new TypeError(message).stack || message)\n .split(\"\\n\")\n .slice(0, 5)\n .filter((s) => !s.includes(\"stackTraceWarning\"))\n .join(\"\\n\");\n};\nexport const logger = {\n warn: console.warn,\n};\n", "import { strictParseByte, strictParseDouble, strictParseFloat32, strictParseShort } from \"./parse-utils\";\nconst DAYS = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\nconst MONTHS = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nexport function dateToUtcString(date) {\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const dayOfWeek = date.getUTCDay();\n const dayOfMonthInt = date.getUTCDate();\n const hoursInt = date.getUTCHours();\n const minutesInt = date.getUTCMinutes();\n const secondsInt = date.getUTCSeconds();\n const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;\n const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;\n const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;\n const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;\n return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;\n}\nconst RFC3339 = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?[zZ]$/);\nexport const parseRfc3339DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n};\nconst RFC3339_WITH_OFFSET = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?(([-+]\\d{2}\\:\\d{2})|[zZ])$/);\nexport const parseRfc3339DateTimeWithOffset = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339_WITH_OFFSET.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n if (offsetStr.toUpperCase() != \"Z\") {\n date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));\n }\n return date;\n};\nconst IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/);\nconst RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/);\nconst ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? (\\d{4})$/);\nexport const parseRfc7231DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-7231 date-times must be expressed as strings\");\n }\n let match = IMF_FIXDATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });\n }\n match = RFC_850_DATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), {\n hours,\n minutes,\n seconds,\n fractionalMilliseconds,\n }));\n }\n match = ASC_TIME.exec(value);\n if (match) {\n const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;\n return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), \"day\", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });\n }\n throw new TypeError(\"Invalid RFC-7231 date-time value\");\n};\nexport const parseEpochTimestamp = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n let valueAsDouble;\n if (typeof value === \"number\") {\n valueAsDouble = value;\n }\n else if (typeof value === \"string\") {\n valueAsDouble = strictParseDouble(value);\n }\n else if (typeof value === \"object\" && value.tag === 1) {\n valueAsDouble = value.value;\n }\n else {\n throw new TypeError(\"Epoch timestamps must be expressed as floating point numbers or their string representation\");\n }\n if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid, non-Infinite, non-NaN numerics\");\n }\n return new Date(Math.round(valueAsDouble * 1000));\n};\nconst buildDate = (year, month, day, time) => {\n const adjustedMonth = month - 1;\n validateDayOfMonth(year, adjustedMonth, day);\n return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, \"hour\", 0, 23), parseDateValue(time.minutes, \"minute\", 0, 59), parseDateValue(time.seconds, \"seconds\", 0, 60), parseMilliseconds(time.fractionalMilliseconds)));\n};\nconst parseTwoDigitYear = (value) => {\n const thisYear = new Date().getUTCFullYear();\n const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));\n if (valueInThisCentury < thisYear) {\n return valueInThisCentury + 100;\n }\n return valueInThisCentury;\n};\nconst FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000;\nconst adjustRfc850Year = (input) => {\n if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) {\n return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));\n }\n return input;\n};\nconst parseMonthByShortName = (value) => {\n const monthIdx = MONTHS.indexOf(value);\n if (monthIdx < 0) {\n throw new TypeError(`Invalid month: ${value}`);\n }\n return monthIdx + 1;\n};\nconst DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst validateDayOfMonth = (year, month, day) => {\n let maxDays = DAYS_IN_MONTH[month];\n if (month === 1 && isLeapYear(year)) {\n maxDays = 29;\n }\n if (day > maxDays) {\n throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);\n }\n};\nconst isLeapYear = (year) => {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n};\nconst parseDateValue = (value, type, lower, upper) => {\n const dateVal = strictParseByte(stripLeadingZeroes(value));\n if (dateVal < lower || dateVal > upper) {\n throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);\n }\n return dateVal;\n};\nconst parseMilliseconds = (value) => {\n if (value === null || value === undefined) {\n return 0;\n }\n return strictParseFloat32(\"0.\" + value) * 1000;\n};\nconst parseOffsetToMilliseconds = (value) => {\n const directionStr = value[0];\n let direction = 1;\n if (directionStr == \"+\") {\n direction = 1;\n }\n else if (directionStr == \"-\") {\n direction = -1;\n }\n else {\n throw new TypeError(`Offset direction, ${directionStr}, must be \"+\" or \"-\"`);\n }\n const hour = Number(value.substring(1, 3));\n const minute = Number(value.substring(4, 6));\n return direction * (hour * 60 + minute) * 60 * 1000;\n};\nconst stripLeadingZeroes = (value) => {\n let idx = 0;\n while (idx < value.length - 1 && value.charAt(idx) === \"0\") {\n idx++;\n }\n if (idx === 0) {\n return value;\n }\n return value.slice(idx);\n};\n", "export const randomUUID = typeof crypto !== \"undefined\" && crypto.randomUUID && crypto.randomUUID.bind(crypto);\n", "import { randomUUID } from \"./randomUUID\";\nconst decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, \"0\"));\nexport const v4 = () => {\n if (randomUUID) {\n return randomUUID();\n }\n const rnds = new Uint8Array(16);\n crypto.getRandomValues(rnds);\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n return (decimalToHex[rnds[0]] +\n decimalToHex[rnds[1]] +\n decimalToHex[rnds[2]] +\n decimalToHex[rnds[3]] +\n \"-\" +\n decimalToHex[rnds[4]] +\n decimalToHex[rnds[5]] +\n \"-\" +\n decimalToHex[rnds[6]] +\n decimalToHex[rnds[7]] +\n \"-\" +\n decimalToHex[rnds[8]] +\n decimalToHex[rnds[9]] +\n \"-\" +\n decimalToHex[rnds[10]] +\n decimalToHex[rnds[11]] +\n decimalToHex[rnds[12]] +\n decimalToHex[rnds[13]] +\n decimalToHex[rnds[14]] +\n decimalToHex[rnds[15]]);\n};\n", "export * from \"./v4\";\n", "import { v4 as generateIdempotencyToken } from \"@smithy/uuid\";\nexport { generateIdempotencyToken };\n", "export const LazyJsonString = function LazyJsonString(val) {\n const str = Object.assign(new String(val), {\n deserializeJSON() {\n return JSON.parse(String(val));\n },\n toString() {\n return String(val);\n },\n toJSON() {\n return String(val);\n },\n });\n return str;\n};\nLazyJsonString.from = (object) => {\n if (object && typeof object === \"object\" && (object instanceof LazyJsonString || \"deserializeJSON\" in object)) {\n return object;\n }\n else if (typeof object === \"string\" || Object.getPrototypeOf(object) === String.prototype) {\n return LazyJsonString(String(object));\n }\n return LazyJsonString(JSON.stringify(object));\n};\nLazyJsonString.fromObject = LazyJsonString.from;\n", "export function quoteHeader(part) {\n if (part.includes(\",\") || part.includes('\"')) {\n part = `\"${part.replace(/\"/g, '\\\\\"')}\"`;\n }\n return part;\n}\n", "const ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;\nconst mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;\nconst time = `(\\\\d?\\\\d):(\\\\d{2}):(\\\\d{2})(?:\\\\.(\\\\d+))?`;\nconst date = `(\\\\d?\\\\d)`;\nconst year = `(\\\\d{4})`;\nconst RFC3339_WITH_OFFSET = new RegExp(/^(\\d{4})-(\\d\\d)-(\\d\\d)[tT](\\d\\d):(\\d\\d):(\\d\\d)(\\.(\\d+))?(([-+]\\d\\d:\\d\\d)|[zZ])$/);\nconst IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`);\nconst RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\\\d\\\\d) ${time} GMT$`);\nconst ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\\\d\\\\d) ${time} ${year}$`);\nconst months = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nexport const _parseEpochTimestamp = (value) => {\n if (value == null) {\n return void 0;\n }\n let num = NaN;\n if (typeof value === \"number\") {\n num = value;\n }\n else if (typeof value === \"string\") {\n if (!/^-?\\d*\\.?\\d+$/.test(value)) {\n throw new TypeError(`parseEpochTimestamp - numeric string invalid.`);\n }\n num = Number.parseFloat(value);\n }\n else if (typeof value === \"object\" && value.tag === 1) {\n num = value.value;\n }\n if (isNaN(num) || Math.abs(num) === Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid finite numbers.\");\n }\n return new Date(Math.round(num * 1000));\n};\nexport const _parseRfc3339DateTimeWithOffset = (value) => {\n if (value == null) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC3339 timestamps must be strings\");\n }\n const matches = RFC3339_WITH_OFFSET.exec(value);\n if (!matches) {\n throw new TypeError(`Invalid RFC3339 timestamp format ${value}`);\n }\n const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches;\n range(monthStr, 1, 12);\n range(dayStr, 1, 31);\n range(hours, 0, 23);\n range(minutes, 0, 59);\n range(seconds, 0, 60);\n const date = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1000) : 0));\n date.setUTCFullYear(Number(yearStr));\n if (offsetStr.toUpperCase() != \"Z\") {\n const [, sign, offsetH, offsetM] = /([+-])(\\d\\d):(\\d\\d)/.exec(offsetStr) || [void 0, \"+\", 0, 0];\n const scalar = sign === \"-\" ? 1 : -1;\n date.setTime(date.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1000 + Number(offsetM) * 60 * 1000));\n }\n return date;\n};\nexport const _parseRfc7231DateTime = (value) => {\n if (value == null) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC7231 timestamps must be strings.\");\n }\n let day;\n let month;\n let year;\n let hour;\n let minute;\n let second;\n let fraction;\n let matches;\n if ((matches = IMF_FIXDATE.exec(value))) {\n [, day, month, year, hour, minute, second, fraction] = matches;\n }\n else if ((matches = RFC_850_DATE.exec(value))) {\n [, day, month, year, hour, minute, second, fraction] = matches;\n year = (Number(year) + 1900).toString();\n }\n else if ((matches = ASC_TIME.exec(value))) {\n [, month, day, hour, minute, second, fraction, year] = matches;\n }\n if (year && second) {\n const timestamp = Date.UTC(Number(year), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1000) : 0);\n range(day, 1, 31);\n range(hour, 0, 23);\n range(minute, 0, 59);\n range(second, 0, 60);\n const date = new Date(timestamp);\n date.setUTCFullYear(Number(year));\n return date;\n }\n throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);\n};\nfunction range(v, min, max) {\n const _v = Number(v);\n if (_v < min || _v > max) {\n throw new Error(`Value ${_v} out of range [${min}, ${max}]`);\n }\n}\n", "export function splitEvery(value, delimiter, numDelimiters) {\n if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {\n throw new Error(\"Invalid number of delimiters (\" + numDelimiters + \") for splitEvery.\");\n }\n const segments = value.split(delimiter);\n if (numDelimiters === 1) {\n return segments;\n }\n const compoundSegments = [];\n let currentSegment = \"\";\n for (let i = 0; i < segments.length; i++) {\n if (currentSegment === \"\") {\n currentSegment = segments[i];\n }\n else {\n currentSegment += delimiter + segments[i];\n }\n if ((i + 1) % numDelimiters === 0) {\n compoundSegments.push(currentSegment);\n currentSegment = \"\";\n }\n }\n if (currentSegment !== \"\") {\n compoundSegments.push(currentSegment);\n }\n return compoundSegments;\n}\n", "export const splitHeader = (value) => {\n const z = value.length;\n const values = [];\n let withinQuotes = false;\n let prevChar = undefined;\n let anchor = 0;\n for (let i = 0; i < z; ++i) {\n const char = value[i];\n switch (char) {\n case `\"`:\n if (prevChar !== \"\\\\\") {\n withinQuotes = !withinQuotes;\n }\n break;\n case \",\":\n if (!withinQuotes) {\n values.push(value.slice(anchor, i));\n anchor = i + 1;\n }\n break;\n default:\n }\n prevChar = char;\n }\n values.push(value.slice(anchor));\n return values.map((v) => {\n v = v.trim();\n const z = v.length;\n if (z < 2) {\n return v;\n }\n if (v[0] === `\"` && v[z - 1] === `\"`) {\n v = v.slice(1, z - 1);\n }\n return v.replace(/\\\\\"/g, '\"');\n });\n};\n", "const format = /^-?\\d*(\\.\\d+)?$/;\nexport class NumericValue {\n string;\n type;\n constructor(string, type) {\n this.string = string;\n this.type = type;\n if (!format.test(string)) {\n throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point \".\", and an optional negation prefix \"-\".`);\n }\n }\n toString() {\n return this.string;\n }\n static [Symbol.hasInstance](object) {\n if (!object || typeof object !== \"object\") {\n return false;\n }\n const _nv = object;\n return NumericValue.prototype.isPrototypeOf(object) || (_nv.type === \"bigDecimal\" && format.test(_nv.string));\n }\n}\nexport function nv(input) {\n return new NumericValue(String(input), \"bigDecimal\");\n}\n", "export * from \"./copyDocumentWithTransform\";\nexport * from \"./date-utils\";\nexport * from \"./generateIdempotencyToken\";\nexport * from \"./lazy-json\";\nexport * from \"./parse-utils\";\nexport * from \"./quote-header\";\nexport * from \"./schema-serde-lib/schema-date-utils\";\nexport * from \"./split-every\";\nexport * from \"./split-header\";\nexport * from \"./value/NumericValue\";\n", "export class SerdeContext {\n serdeContext;\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n }\n}\n", "import { fromUtf8, toUtf8 } from \"@smithy/util-utf8\";\nexport class EventStreamSerde {\n marshaller;\n serializer;\n deserializer;\n serdeContext;\n defaultContentType;\n constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }) {\n this.marshaller = marshaller;\n this.serializer = serializer;\n this.deserializer = deserializer;\n this.serdeContext = serdeContext;\n this.defaultContentType = defaultContentType;\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = requestSchema.getEventStreamMember();\n const unionSchema = requestSchema.getMemberSchema(eventStreamMember);\n const serializer = this.serializer;\n const defaultContentType = this.defaultContentType;\n const initialRequestMarker = Symbol(\"initialRequestMarker\");\n const eventStreamIterable = {\n async *[Symbol.asyncIterator]() {\n if (initialRequest) {\n const headers = {\n \":event-type\": { type: \"string\", value: \"initial-request\" },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: defaultContentType },\n };\n serializer.write(requestSchema, initialRequest);\n const body = serializer.flush();\n yield {\n [initialRequestMarker]: true,\n headers,\n body,\n };\n }\n for await (const page of eventStream) {\n yield page;\n }\n },\n };\n return marshaller.serialize(eventStreamIterable, (event) => {\n if (event[initialRequestMarker]) {\n return {\n headers: event.headers,\n body: event.body,\n };\n }\n const unionMember = Object.keys(event).find((key) => {\n return key !== \"__type\";\n }) ?? \"\";\n const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);\n const headers = {\n \":event-type\": { type: \"string\", value: eventType },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: explicitPayloadContentType ?? defaultContentType },\n ...additionalHeaders,\n };\n return {\n headers,\n body,\n };\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = responseSchema.getEventStreamMember();\n const unionSchema = responseSchema.getMemberSchema(eventStreamMember);\n const memberSchemas = unionSchema.getMemberSchemas();\n const initialResponseMarker = Symbol(\"initialResponseMarker\");\n const asyncIterable = marshaller.deserialize(response.body, async (event) => {\n const unionMember = Object.keys(event).find((key) => {\n return key !== \"__type\";\n }) ?? \"\";\n const body = event[unionMember].body;\n if (unionMember === \"initial-response\") {\n const dataObject = await this.deserializer.read(responseSchema, body);\n delete dataObject[eventStreamMember];\n return {\n [initialResponseMarker]: true,\n ...dataObject,\n };\n }\n else if (unionMember in memberSchemas) {\n const eventStreamSchema = memberSchemas[unionMember];\n if (eventStreamSchema.isStructSchema()) {\n const out = {};\n let hasBindings = false;\n for (const [name, member] of eventStreamSchema.structIterator()) {\n const { eventHeader, eventPayload } = member.getMergedTraits();\n hasBindings = hasBindings || Boolean(eventHeader || eventPayload);\n if (eventPayload) {\n if (member.isBlobSchema()) {\n out[name] = body;\n }\n else if (member.isStringSchema()) {\n out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body);\n }\n else if (member.isStructSchema()) {\n out[name] = await this.deserializer.read(member, body);\n }\n }\n else if (eventHeader) {\n const value = event[unionMember].headers[name]?.value;\n if (value != null) {\n if (member.isNumericSchema()) {\n if (value && typeof value === \"object\" && \"bytes\" in value) {\n out[name] = BigInt(value.toString());\n }\n else {\n out[name] = Number(value);\n }\n }\n else {\n out[name] = value;\n }\n }\n }\n }\n if (hasBindings) {\n return {\n [unionMember]: out,\n };\n }\n if (body.byteLength === 0) {\n return {\n [unionMember]: {},\n };\n }\n }\n return {\n [unionMember]: await this.deserializer.read(eventStreamSchema, body),\n };\n }\n else {\n return {\n $unknown: event,\n };\n }\n });\n const asyncIterator = asyncIterable[Symbol.asyncIterator]();\n const firstEvent = await asyncIterator.next();\n if (firstEvent.done) {\n return asyncIterable;\n }\n if (firstEvent.value?.[initialResponseMarker]) {\n if (!responseSchema) {\n throw new Error(\"@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.\");\n }\n for (const [key, value] of Object.entries(firstEvent.value)) {\n initialResponseContainer[key] = value;\n }\n }\n return {\n async *[Symbol.asyncIterator]() {\n if (!firstEvent?.value?.[initialResponseMarker]) {\n yield firstEvent.value;\n }\n while (true) {\n const { done, value } = await asyncIterator.next();\n if (done) {\n break;\n }\n yield value;\n }\n },\n };\n }\n writeEventBody(unionMember, unionSchema, event) {\n const serializer = this.serializer;\n let eventType = unionMember;\n let explicitPayloadMember = null;\n let explicitPayloadContentType;\n const isKnownSchema = (() => {\n const struct = unionSchema.getSchema();\n return struct[4].includes(unionMember);\n })();\n const additionalHeaders = {};\n if (!isKnownSchema) {\n const [type, value] = event[unionMember];\n eventType = type;\n serializer.write(15, value);\n }\n else {\n const eventSchema = unionSchema.getMemberSchema(unionMember);\n if (eventSchema.isStructSchema()) {\n for (const [memberName, memberSchema] of eventSchema.structIterator()) {\n const { eventHeader, eventPayload } = memberSchema.getMergedTraits();\n if (eventPayload) {\n explicitPayloadMember = memberName;\n }\n else if (eventHeader) {\n const value = event[unionMember][memberName];\n let type = \"binary\";\n if (memberSchema.isNumericSchema()) {\n if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) {\n type = \"integer\";\n }\n else {\n type = \"long\";\n }\n }\n else if (memberSchema.isTimestampSchema()) {\n type = \"timestamp\";\n }\n else if (memberSchema.isStringSchema()) {\n type = \"string\";\n }\n else if (memberSchema.isBooleanSchema()) {\n type = \"boolean\";\n }\n if (value != null) {\n additionalHeaders[memberName] = {\n type,\n value,\n };\n delete event[unionMember][memberName];\n }\n }\n }\n if (explicitPayloadMember !== null) {\n const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember);\n if (payloadSchema.isBlobSchema()) {\n explicitPayloadContentType = \"application/octet-stream\";\n }\n else if (payloadSchema.isStringSchema()) {\n explicitPayloadContentType = \"text/plain\";\n }\n serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]);\n }\n else {\n serializer.write(eventSchema, event[unionMember]);\n }\n }\n else if (eventSchema.isUnitSchema()) {\n serializer.write(eventSchema, {});\n }\n else {\n throw new Error(\"@smithy/core/event-streams - non-struct member not supported in event stream union.\");\n }\n }\n const messageSerialization = serializer.flush() ?? new Uint8Array();\n const body = typeof messageSerialization === \"string\"\n ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization)\n : messageSerialization;\n return {\n body,\n eventType,\n explicitPayloadContentType,\n additionalHeaders,\n };\n }\n}\n", "export * from \"./EventStreamSerde\";\n", "import { NormalizedSchema, translateTraits, TypeRegistry } from \"@smithy/core/schema\";\nimport { HttpRequest, HttpResponse } from \"@smithy/protocol-http\";\nimport { SerdeContext } from \"./SerdeContext\";\nexport class HttpProtocol extends SerdeContext {\n options;\n compositeErrorRegistry;\n constructor(options) {\n super();\n this.options = options;\n this.compositeErrorRegistry = TypeRegistry.for(options.defaultNamespace);\n for (const etr of options.errorTypeRegistries ?? []) {\n this.compositeErrorRegistry.copyFrom(etr);\n }\n }\n getRequestType() {\n return HttpRequest;\n }\n getResponseType() {\n return HttpResponse;\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n this.serializer.setSerdeContext(serdeContext);\n this.deserializer.setSerdeContext(serdeContext);\n if (this.getPayloadCodec()) {\n this.getPayloadCodec().setSerdeContext(serdeContext);\n }\n }\n updateServiceEndpoint(request, endpoint) {\n if (\"url\" in endpoint) {\n request.protocol = endpoint.url.protocol;\n request.hostname = endpoint.url.hostname;\n request.port = endpoint.url.port ? Number(endpoint.url.port) : undefined;\n request.path = endpoint.url.pathname;\n request.fragment = endpoint.url.hash || void 0;\n request.username = endpoint.url.username || void 0;\n request.password = endpoint.url.password || void 0;\n if (!request.query) {\n request.query = {};\n }\n for (const [k, v] of endpoint.url.searchParams.entries()) {\n request.query[k] = v;\n }\n if (endpoint.headers) {\n for (const [name, values] of Object.entries(endpoint.headers)) {\n request.headers[name] = values.join(\", \");\n }\n }\n return request;\n }\n else {\n request.protocol = endpoint.protocol;\n request.hostname = endpoint.hostname;\n request.port = endpoint.port ? Number(endpoint.port) : undefined;\n request.path = endpoint.path;\n request.query = {\n ...endpoint.query,\n };\n if (endpoint.headers) {\n for (const [name, value] of Object.entries(endpoint.headers)) {\n request.headers[name] = value;\n }\n }\n return request;\n }\n }\n setHostPrefix(request, operationSchema, input) {\n if (this.serdeContext?.disableHostPrefix) {\n return;\n }\n const inputNs = NormalizedSchema.of(operationSchema.input);\n const opTraits = translateTraits(operationSchema.traits ?? {});\n if (opTraits.endpoint) {\n let hostPrefix = opTraits.endpoint?.[0];\n if (typeof hostPrefix === \"string\") {\n const hostLabelInputs = [...inputNs.structIterator()].filter(([, member]) => member.getMergedTraits().hostLabel);\n for (const [name] of hostLabelInputs) {\n const replacement = input[name];\n if (typeof replacement !== \"string\") {\n throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);\n }\n hostPrefix = hostPrefix.replace(`{${name}}`, replacement);\n }\n request.hostname = hostPrefix + request.hostname;\n }\n }\n }\n deserializeMetadata(output) {\n return {\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n };\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const eventStreamSerde = await this.loadEventStreamCapability();\n return eventStreamSerde.serializeEventStream({\n eventStream,\n requestSchema,\n initialRequest,\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const eventStreamSerde = await this.loadEventStreamCapability();\n return eventStreamSerde.deserializeEventStream({\n response,\n responseSchema,\n initialResponseContainer,\n });\n }\n async loadEventStreamCapability() {\n const { EventStreamSerde } = await import(\"@smithy/core/event-streams\");\n return new EventStreamSerde({\n marshaller: this.getEventStreamMarshaller(),\n serializer: this.serializer,\n deserializer: this.deserializer,\n serdeContext: this.serdeContext,\n defaultContentType: this.getDefaultContentType(),\n });\n }\n getDefaultContentType() {\n throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);\n }\n async deserializeHttpMessage(schema, context, response, arg4, arg5) {\n void schema;\n void context;\n void response;\n void arg4;\n void arg5;\n return [];\n }\n getEventStreamMarshaller() {\n const context = this.serdeContext;\n if (!context.eventStreamMarshaller) {\n throw new Error(\"@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.\");\n }\n return context.eventStreamMarshaller;\n }\n}\n", "import { NormalizedSchema, translateTraits } from \"@smithy/core/schema\";\nimport { splitEvery, splitHeader } from \"@smithy/core/serde\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { sdkStreamMixin } from \"@smithy/util-stream\";\nimport { collectBody } from \"./collect-stream-body\";\nimport { extendedEncodeURIComponent } from \"./extended-encode-uri-component\";\nimport { HttpProtocol } from \"./HttpProtocol\";\nexport class HttpBindingProtocol extends HttpProtocol {\n async serializeRequest(operationSchema, _input, context) {\n const input = {\n ...(_input ?? {}),\n };\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = NormalizedSchema.of(operationSchema?.input);\n const payloadMemberNames = [];\n const payloadMemberSchemas = [];\n let hasNonHttpBindingMember = false;\n let payload;\n const request = new HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: undefined,\n path: \"\",\n fragment: undefined,\n query: query,\n headers: headers,\n body: undefined,\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n const opTraits = translateTraits(operationSchema.traits);\n if (opTraits.http) {\n request.method = opTraits.http[0];\n const [path, search] = opTraits.http[1].split(\"?\");\n if (request.path == \"/\") {\n request.path = path;\n }\n else {\n request.path += path;\n }\n const traitSearchParams = new URLSearchParams(search ?? \"\");\n Object.assign(query, Object.fromEntries(traitSearchParams));\n }\n }\n for (const [memberName, memberNs] of ns.structIterator()) {\n const memberTraits = memberNs.getMergedTraits() ?? {};\n const inputMemberValue = input[memberName];\n if (inputMemberValue == null && !memberNs.isIdempotencyToken()) {\n if (memberTraits.httpLabel) {\n if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) {\n throw new Error(`No value provided for input HTTP label: ${memberName}.`);\n }\n }\n continue;\n }\n if (memberTraits.httpPayload) {\n const isStreaming = memberNs.isStreaming();\n if (isStreaming) {\n const isEventStream = memberNs.isStructSchema();\n if (isEventStream) {\n if (input[memberName]) {\n payload = await this.serializeEventStream({\n eventStream: input[memberName],\n requestSchema: ns,\n });\n }\n }\n else {\n payload = inputMemberValue;\n }\n }\n else {\n serializer.write(memberNs, inputMemberValue);\n payload = serializer.flush();\n }\n delete input[memberName];\n }\n else if (memberTraits.httpLabel) {\n serializer.write(memberNs, inputMemberValue);\n const replacement = serializer.flush();\n if (request.path.includes(`{${memberName}+}`)) {\n request.path = request.path.replace(`{${memberName}+}`, replacement.split(\"/\").map(extendedEncodeURIComponent).join(\"/\"));\n }\n else if (request.path.includes(`{${memberName}}`)) {\n request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));\n }\n delete input[memberName];\n }\n else if (memberTraits.httpHeader) {\n serializer.write(memberNs, inputMemberValue);\n headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());\n delete input[memberName];\n }\n else if (typeof memberTraits.httpPrefixHeaders === \"string\") {\n for (const [key, val] of Object.entries(inputMemberValue)) {\n const amalgam = memberTraits.httpPrefixHeaders + key;\n serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);\n headers[amalgam.toLowerCase()] = serializer.flush();\n }\n delete input[memberName];\n }\n else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {\n this.serializeQuery(memberNs, inputMemberValue, query);\n delete input[memberName];\n }\n else {\n hasNonHttpBindingMember = true;\n payloadMemberNames.push(memberName);\n payloadMemberSchemas.push(memberNs);\n }\n }\n if (hasNonHttpBindingMember && input) {\n const [namespace, name] = (ns.getName(true) ?? \"#Unknown\").split(\"#\");\n const requiredMembers = ns.getSchema()[6];\n const payloadSchema = [\n 3,\n namespace,\n name,\n ns.getMergedTraits(),\n payloadMemberNames,\n payloadMemberSchemas,\n undefined,\n ];\n if (requiredMembers) {\n payloadSchema[6] = requiredMembers;\n }\n else {\n payloadSchema.pop();\n }\n serializer.write(payloadSchema, input);\n payload = serializer.flush();\n }\n request.headers = headers;\n request.query = query;\n request.body = payload;\n return request;\n }\n serializeQuery(ns, data, query) {\n const serializer = this.serializer;\n const traits = ns.getMergedTraits();\n if (traits.httpQueryParams) {\n for (const [key, val] of Object.entries(data)) {\n if (!(key in query)) {\n const valueSchema = ns.getValueSchema();\n Object.assign(valueSchema.getMergedTraits(), {\n ...traits,\n httpQuery: key,\n httpQueryParams: undefined,\n });\n this.serializeQuery(valueSchema, val, query);\n }\n }\n return;\n }\n if (ns.isListSchema()) {\n const sparse = !!ns.getMergedTraits().sparse;\n const buffer = [];\n for (const item of data) {\n serializer.write([ns.getValueSchema(), traits], item);\n const serializable = serializer.flush();\n if (sparse || serializable !== undefined) {\n buffer.push(serializable);\n }\n }\n query[traits.httpQuery] = buffer;\n }\n else {\n serializer.write([ns, traits], data);\n query[traits.httpQuery] = serializer.flush();\n }\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - HTTP Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);\n if (nonHttpBindingMembers.length) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n const dataFromBody = await deserializer.read(ns, bytes);\n for (const member of nonHttpBindingMembers) {\n if (dataFromBody[member] != null) {\n dataObject[member] = dataFromBody[member];\n }\n }\n }\n }\n else if (nonHttpBindingMembers.discardResponseBody) {\n await collectBody(response.body, context);\n }\n dataObject.$metadata = this.deserializeMetadata(response);\n return dataObject;\n }\n async deserializeHttpMessage(schema, context, response, arg4, arg5) {\n let dataObject;\n if (arg4 instanceof Set) {\n dataObject = arg5;\n }\n else {\n dataObject = arg4;\n }\n let discardResponseBody = true;\n const deserializer = this.deserializer;\n const ns = NormalizedSchema.of(schema);\n const nonHttpBindingMembers = [];\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const memberTraits = memberSchema.getMemberTraits();\n if (memberTraits.httpPayload) {\n discardResponseBody = false;\n const isStreaming = memberSchema.isStreaming();\n if (isStreaming) {\n const isEventStream = memberSchema.isStructSchema();\n if (isEventStream) {\n dataObject[memberName] = await this.deserializeEventStream({\n response,\n responseSchema: ns,\n });\n }\n else {\n dataObject[memberName] = sdkStreamMixin(response.body);\n }\n }\n else if (response.body) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n dataObject[memberName] = await deserializer.read(memberSchema, bytes);\n }\n }\n }\n else if (memberTraits.httpHeader) {\n const key = String(memberTraits.httpHeader).toLowerCase();\n const value = response.headers[key];\n if (null != value) {\n if (memberSchema.isListSchema()) {\n const headerListValueSchema = memberSchema.getValueSchema();\n headerListValueSchema.getMergedTraits().httpHeader = key;\n let sections;\n if (headerListValueSchema.isTimestampSchema() &&\n headerListValueSchema.getSchema() === 4) {\n sections = splitEvery(value, \",\", 2);\n }\n else {\n sections = splitHeader(value);\n }\n const list = [];\n for (const section of sections) {\n list.push(await deserializer.read(headerListValueSchema, section.trim()));\n }\n dataObject[memberName] = list;\n }\n else {\n dataObject[memberName] = await deserializer.read(memberSchema, value);\n }\n }\n }\n else if (memberTraits.httpPrefixHeaders !== undefined) {\n dataObject[memberName] = {};\n for (const [header, value] of Object.entries(response.headers)) {\n if (header.startsWith(memberTraits.httpPrefixHeaders)) {\n const valueSchema = memberSchema.getValueSchema();\n valueSchema.getMergedTraits().httpHeader = header;\n dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);\n }\n }\n }\n else if (memberTraits.httpResponseCode) {\n dataObject[memberName] = response.statusCode;\n }\n else {\n nonHttpBindingMembers.push(memberName);\n }\n }\n nonHttpBindingMembers.discardResponseBody = discardResponseBody;\n return nonHttpBindingMembers;\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { collectBody } from \"./collect-stream-body\";\nimport { HttpProtocol } from \"./HttpProtocol\";\nexport class RpcProtocol extends HttpProtocol {\n async serializeRequest(operationSchema, input, context) {\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = NormalizedSchema.of(operationSchema?.input);\n const schema = ns.getSchema();\n let payload;\n const request = new HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: undefined,\n path: \"/\",\n fragment: undefined,\n query: query,\n headers: headers,\n body: undefined,\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n }\n const _input = {\n ...input,\n };\n if (input) {\n const eventStreamMember = ns.getEventStreamMember();\n if (eventStreamMember) {\n if (_input[eventStreamMember]) {\n const initialRequest = {};\n for (const [memberName, memberSchema] of ns.structIterator()) {\n if (memberName !== eventStreamMember && _input[memberName]) {\n serializer.write(memberSchema, _input[memberName]);\n initialRequest[memberName] = serializer.flush();\n }\n }\n payload = await this.serializeEventStream({\n eventStream: _input[eventStreamMember],\n requestSchema: ns,\n initialRequest,\n });\n }\n }\n else {\n serializer.write(schema, _input);\n payload = serializer.flush();\n }\n }\n request.headers = Object.assign(request.headers, headers);\n request.query = query;\n request.body = payload;\n request.method = \"POST\";\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - RPC Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const eventStreamMember = ns.getEventStreamMember();\n if (eventStreamMember) {\n dataObject[eventStreamMember] = await this.deserializeEventStream({\n response,\n responseSchema: ns,\n initialResponseContainer: dataObject,\n });\n }\n else {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(ns, bytes));\n }\n }\n dataObject.$metadata = this.deserializeMetadata(response);\n return dataObject;\n }\n}\n", "import { extendedEncodeURIComponent } from \"./extended-encode-uri-component\";\nexport const resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {\n if (input != null && input[memberName] !== undefined) {\n const labelValue = labelValueProvider();\n if (labelValue == null || labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: \" + memberName + \".\");\n }\n resolvedPath = resolvedPath.replace(uriLabel, isGreedyLabel\n ? labelValue\n .split(\"/\")\n .map((segment) => extendedEncodeURIComponent(segment))\n .join(\"/\")\n : extendedEncodeURIComponent(labelValue));\n }\n else {\n throw new Error(\"No value provided for input HTTP label: \" + memberName + \".\");\n }\n return resolvedPath;\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { resolvedPath } from \"./resolve-path\";\nexport function requestBuilder(input, context) {\n return new RequestBuilder(input, context);\n}\nexport class RequestBuilder {\n input;\n context;\n query = {};\n method = \"\";\n headers = {};\n path = \"\";\n body = null;\n hostname = \"\";\n resolvePathStack = [];\n constructor(input, context) {\n this.input = input;\n this.context = context;\n }\n async build() {\n const { hostname, protocol = \"https\", port, path: basePath } = await this.context.endpoint();\n this.path = basePath;\n for (const resolvePath of this.resolvePathStack) {\n resolvePath(this.path);\n }\n return new HttpRequest({\n protocol,\n hostname: this.hostname || hostname,\n port,\n method: this.method,\n path: this.path,\n query: this.query,\n body: this.body,\n headers: this.headers,\n });\n }\n hn(hostname) {\n this.hostname = hostname;\n return this;\n }\n bp(uriLabel) {\n this.resolvePathStack.push((basePath) => {\n this.path = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + uriLabel;\n });\n return this;\n }\n p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {\n this.resolvePathStack.push((path) => {\n this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);\n });\n return this;\n }\n h(headers) {\n this.headers = headers;\n return this;\n }\n q(query) {\n this.query = query;\n return this;\n }\n b(body) {\n this.body = body;\n return this;\n }\n m(method) {\n this.method = method;\n return this;\n }\n}\n", "export function determineTimestampFormat(ns, settings) {\n if (settings.timestampFormat.useTrait) {\n if (ns.isTimestampSchema() &&\n (ns.getSchema() === 5 ||\n ns.getSchema() === 6 ||\n ns.getSchema() === 7)) {\n return ns.getSchema();\n }\n }\n const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits();\n const bindingFormat = settings.httpBindings\n ? typeof httpPrefixHeaders === \"string\" || Boolean(httpHeader)\n ? 6\n : Boolean(httpQuery) || Boolean(httpLabel)\n ? 5\n : undefined\n : undefined;\n return bindingFormat ?? settings.timestampFormat.default;\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime, LazyJsonString, NumericValue, splitHeader, } from \"@smithy/core/serde\";\nimport { fromBase64 } from \"@smithy/util-base64\";\nimport { toUtf8 } from \"@smithy/util-utf8\";\nimport { SerdeContext } from \"../SerdeContext\";\nimport { determineTimestampFormat } from \"./determineTimestampFormat\";\nexport class FromStringShapeDeserializer extends SerdeContext {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n read(_schema, data) {\n const ns = NormalizedSchema.of(_schema);\n if (ns.isListSchema()) {\n return splitHeader(data).map((item) => this.read(ns.getValueSchema(), item));\n }\n if (ns.isBlobSchema()) {\n return (this.serdeContext?.base64Decoder ?? fromBase64)(data);\n }\n if (ns.isTimestampSchema()) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return _parseRfc3339DateTimeWithOffset(data);\n case 6:\n return _parseRfc7231DateTime(data);\n case 7:\n return _parseEpochTimestamp(data);\n default:\n console.warn(\"Missing timestamp format, parsing value with Date constructor:\", data);\n return new Date(data);\n }\n }\n if (ns.isStringSchema()) {\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = data;\n if (mediaType) {\n if (ns.getMergedTraits().httpHeader) {\n intermediateValue = this.base64ToUtf8(intermediateValue);\n }\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = LazyJsonString.from(intermediateValue);\n }\n return intermediateValue;\n }\n }\n if (ns.isNumericSchema()) {\n return Number(data);\n }\n if (ns.isBigIntegerSchema()) {\n return BigInt(data);\n }\n if (ns.isBigDecimalSchema()) {\n return new NumericValue(data, \"bigDecimal\");\n }\n if (ns.isBooleanSchema()) {\n return String(data).toLowerCase() === \"true\";\n }\n return data;\n }\n base64ToUtf8(base64String) {\n return (this.serdeContext?.utf8Encoder ?? toUtf8)((this.serdeContext?.base64Decoder ?? fromBase64)(base64String));\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { fromUtf8, toUtf8 } from \"@smithy/util-utf8\";\nimport { SerdeContext } from \"../SerdeContext\";\nimport { FromStringShapeDeserializer } from \"./FromStringShapeDeserializer\";\nexport class HttpInterceptingShapeDeserializer extends SerdeContext {\n codecDeserializer;\n stringDeserializer;\n constructor(codecDeserializer, codecSettings) {\n super();\n this.codecDeserializer = codecDeserializer;\n this.stringDeserializer = new FromStringShapeDeserializer(codecSettings);\n }\n setSerdeContext(serdeContext) {\n this.stringDeserializer.setSerdeContext(serdeContext);\n this.codecDeserializer.setSerdeContext(serdeContext);\n this.serdeContext = serdeContext;\n }\n read(schema, data) {\n const ns = NormalizedSchema.of(schema);\n const traits = ns.getMergedTraits();\n const toString = this.serdeContext?.utf8Encoder ?? toUtf8;\n if (traits.httpHeader || traits.httpResponseCode) {\n return this.stringDeserializer.read(ns, toString(data));\n }\n if (traits.httpPayload) {\n if (ns.isBlobSchema()) {\n const toBytes = this.serdeContext?.utf8Decoder ?? fromUtf8;\n if (typeof data === \"string\") {\n return toBytes(data);\n }\n return data;\n }\n else if (ns.isStringSchema()) {\n if (\"byteLength\" in data) {\n return toString(data);\n }\n return data;\n }\n }\n return this.codecDeserializer.read(ns, data);\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { dateToUtcString, generateIdempotencyToken, LazyJsonString, quoteHeader } from \"@smithy/core/serde\";\nimport { toBase64 } from \"@smithy/util-base64\";\nimport { SerdeContext } from \"../SerdeContext\";\nimport { determineTimestampFormat } from \"./determineTimestampFormat\";\nexport class ToStringShapeSerializer extends SerdeContext {\n settings;\n stringBuffer = \"\";\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value) {\n const ns = NormalizedSchema.of(schema);\n switch (typeof value) {\n case \"object\":\n if (value === null) {\n this.stringBuffer = \"null\";\n return;\n }\n if (ns.isTimestampSchema()) {\n if (!(value instanceof Date)) {\n throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`);\n }\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n this.stringBuffer = value.toISOString().replace(\".000Z\", \"Z\");\n break;\n case 6:\n this.stringBuffer = dateToUtcString(value);\n break;\n case 7:\n this.stringBuffer = String(value.getTime() / 1000);\n break;\n default:\n console.warn(\"Missing timestamp format, using epoch seconds\", value);\n this.stringBuffer = String(value.getTime() / 1000);\n }\n return;\n }\n if (ns.isBlobSchema() && \"byteLength\" in value) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(value);\n return;\n }\n if (ns.isListSchema() && Array.isArray(value)) {\n let buffer = \"\";\n for (const item of value) {\n this.write([ns.getValueSchema(), ns.getMergedTraits()], item);\n const headerItem = this.flush();\n const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : quoteHeader(headerItem);\n if (buffer !== \"\") {\n buffer += \", \";\n }\n buffer += serialized;\n }\n this.stringBuffer = buffer;\n return;\n }\n this.stringBuffer = JSON.stringify(value, null, 2);\n break;\n case \"string\":\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = value;\n if (mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = LazyJsonString.from(intermediateValue);\n }\n if (ns.getMergedTraits().httpHeader) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(intermediateValue.toString());\n return;\n }\n }\n this.stringBuffer = value;\n break;\n default:\n if (ns.isIdempotencyToken()) {\n this.stringBuffer = generateIdempotencyToken();\n }\n else {\n this.stringBuffer = String(value);\n }\n }\n }\n flush() {\n const buffer = this.stringBuffer;\n this.stringBuffer = \"\";\n return buffer;\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { ToStringShapeSerializer } from \"./ToStringShapeSerializer\";\nexport class HttpInterceptingShapeSerializer {\n codecSerializer;\n stringSerializer;\n buffer;\n constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) {\n this.codecSerializer = codecSerializer;\n this.stringSerializer = stringSerializer;\n }\n setSerdeContext(serdeContext) {\n this.codecSerializer.setSerdeContext(serdeContext);\n this.stringSerializer.setSerdeContext(serdeContext);\n }\n write(schema, value) {\n const ns = NormalizedSchema.of(schema);\n const traits = ns.getMergedTraits();\n if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {\n this.stringSerializer.write(ns, value);\n this.buffer = this.stringSerializer.flush();\n return;\n }\n return this.codecSerializer.write(ns, value);\n }\n flush() {\n if (this.buffer !== undefined) {\n const buffer = this.buffer;\n this.buffer = undefined;\n return buffer;\n }\n return this.codecSerializer.flush();\n }\n}\n", "export * from \"./collect-stream-body\";\nexport * from \"./extended-encode-uri-component\";\nexport * from \"./HttpBindingProtocol\";\nexport * from \"./HttpProtocol\";\nexport * from \"./RpcProtocol\";\nexport * from \"./requestBuilder\";\nexport * from \"./resolve-path\";\nexport * from \"./serde/FromStringShapeDeserializer\";\nexport * from \"./serde/HttpInterceptingShapeDeserializer\";\nexport * from \"./serde/HttpInterceptingShapeSerializer\";\nexport * from \"./serde/ToStringShapeSerializer\";\nexport * from \"./serde/determineTimestampFormat\";\nexport * from \"./SerdeContext\";\n", "export { requestBuilder } from \"@smithy/core/protocols\";\n", "export function setFeature(context, feature, value) {\n if (!context.__smithy_context) {\n context.__smithy_context = {\n features: {},\n };\n }\n else if (!context.__smithy_context.features) {\n context.__smithy_context.features = {};\n }\n context.__smithy_context.features[feature] = value;\n}\n", "export class DefaultIdentityProviderConfig {\n authSchemes = new Map();\n constructor(config) {\n for (const [key, value] of Object.entries(config)) {\n if (value !== undefined) {\n this.authSchemes.set(key, value);\n }\n }\n }\n getIdentityProvider(schemeId) {\n return this.authSchemes.get(schemeId);\n }\n}\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { HttpApiKeyAuthLocation } from \"@smithy/types\";\nexport class HttpApiKeyAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n if (!signingProperties) {\n throw new Error(\"request could not be signed with `apiKey` since the `name` and `in` signer properties are missing\");\n }\n if (!signingProperties.name) {\n throw new Error(\"request could not be signed with `apiKey` since the `name` signer property is missing\");\n }\n if (!signingProperties.in) {\n throw new Error(\"request could not be signed with `apiKey` since the `in` signer property is missing\");\n }\n if (!identity.apiKey) {\n throw new Error(\"request could not be signed with `apiKey` since the `apiKey` is not defined\");\n }\n const clonedRequest = HttpRequest.clone(httpRequest);\n if (signingProperties.in === HttpApiKeyAuthLocation.QUERY) {\n clonedRequest.query[signingProperties.name] = identity.apiKey;\n }\n else if (signingProperties.in === HttpApiKeyAuthLocation.HEADER) {\n clonedRequest.headers[signingProperties.name] = signingProperties.scheme\n ? `${signingProperties.scheme} ${identity.apiKey}`\n : identity.apiKey;\n }\n else {\n throw new Error(\"request can only be signed with `apiKey` locations `query` or `header`, \" +\n \"but found: `\" +\n signingProperties.in +\n \"`\");\n }\n return clonedRequest;\n }\n}\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nexport class HttpBearerAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n const clonedRequest = HttpRequest.clone(httpRequest);\n if (!identity.token) {\n throw new Error(\"request could not be signed with `token` since the `token` is not defined\");\n }\n clonedRequest.headers[\"Authorization\"] = `Bearer ${identity.token}`;\n return clonedRequest;\n }\n}\n", "export class NoAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n return httpRequest;\n }\n}\n", "export * from \"./httpApiKeyAuth\";\nexport * from \"./httpBearerAuth\";\nexport * from \"./noAuth\";\n", "export const createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired(identity) {\n return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs;\n};\nexport const EXPIRATION_MS = 300_000;\nexport const isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);\nexport const doesIdentityRequireRefresh = (identity) => identity.expiration !== undefined;\nexport const memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => {\n if (provider === undefined) {\n return undefined;\n }\n const normalizedProvider = typeof provider !== \"function\" ? async () => Promise.resolve(provider) : provider;\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = async (options) => {\n if (!pending) {\n pending = normalizedProvider(options);\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n }\n finally {\n pending = undefined;\n }\n return resolved;\n };\n if (isExpired === undefined) {\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider(options);\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider(options);\n }\n if (isConstant) {\n return resolved;\n }\n if (!requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider(options);\n return resolved;\n }\n return resolved;\n };\n};\n", "export * from \"./DefaultIdentityProviderConfig\";\nexport * from \"./httpAuthSchemes\";\nexport * from \"./memoizeIdentityProvider\";\n", "export * from \"./getSmithyContext\";\nexport * from \"./middleware-http-auth-scheme\";\nexport * from \"./middleware-http-signing\";\nexport * from \"./normalizeProvider\";\nexport { createPaginator } from \"./pagination/createPaginator\";\nexport * from \"./request-builder/requestBuilder\";\nexport * from \"./setFeature\";\nexport * from \"./util-identity-and-auth\";\n", "export class ProviderError extends Error {\n name = \"ProviderError\";\n tryNextLink;\n constructor(message, options = true) {\n let logger;\n let tryNextLink = true;\n if (typeof options === \"boolean\") {\n logger = undefined;\n tryNextLink = options;\n }\n else if (options != null && typeof options === \"object\") {\n logger = options.logger;\n tryNextLink = options.tryNextLink ?? true;\n }\n super(message);\n this.tryNextLink = tryNextLink;\n Object.setPrototypeOf(this, ProviderError.prototype);\n logger?.debug?.(`@smithy/property-provider ${tryNextLink ? \"->\" : \"(!)\"} ${message}`);\n }\n static from(error, options = true) {\n return Object.assign(new this(error.message, options), error);\n }\n}\n", "import { ProviderError } from \"./ProviderError\";\nexport class CredentialsProviderError extends ProviderError {\n name = \"CredentialsProviderError\";\n constructor(message, options = true) {\n super(message, options);\n Object.setPrototypeOf(this, CredentialsProviderError.prototype);\n }\n}\n", "import { ProviderError } from \"./ProviderError\";\nexport class TokenProviderError extends ProviderError {\n name = \"TokenProviderError\";\n constructor(message, options = true) {\n super(message, options);\n Object.setPrototypeOf(this, TokenProviderError.prototype);\n }\n}\n", "import { ProviderError } from \"./ProviderError\";\nexport const chain = (...providers) => async () => {\n if (providers.length === 0) {\n throw new ProviderError(\"No providers in chain\");\n }\n let lastProviderError;\n for (const provider of providers) {\n try {\n const credentials = await provider();\n return credentials;\n }\n catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n};\n", "export const fromStatic = (staticValue) => () => Promise.resolve(staticValue);\n", "export const memoize = (provider, isExpired, requiresRefresh) => {\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = async () => {\n if (!pending) {\n pending = provider();\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n }\n finally {\n pending = undefined;\n }\n return resolved;\n };\n if (isExpired === undefined) {\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider();\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider();\n }\n if (isConstant) {\n return resolved;\n }\n if (requiresRefresh && !requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider();\n return resolved;\n }\n return resolved;\n };\n};\n", "export * from \"./CredentialsProviderError\";\nexport * from \"./ProviderError\";\nexport * from \"./TokenProviderError\";\nexport * from \"./chain\";\nexport * from \"./fromStatic\";\nexport * from \"./memoize\";\n", "import { normalizeProvider } from \"@smithy/core\";\nimport { ProviderError } from \"@smithy/property-provider\";\nexport const resolveAwsSdkSigV4AConfig = (config) => {\n config.sigv4aSigningRegionSet = normalizeProvider(config.sigv4aSigningRegionSet);\n return config;\n};\nexport const NODE_SIGV4A_CONFIG_OPTIONS = {\n environmentVariableSelector(env) {\n if (env.AWS_SIGV4A_SIGNING_REGION_SET) {\n return env.AWS_SIGV4A_SIGNING_REGION_SET.split(\",\").map((_) => _.trim());\n }\n throw new ProviderError(\"AWS_SIGV4A_SIGNING_REGION_SET not set in env.\", {\n tryNextLink: true,\n });\n },\n configFileSelector(profile) {\n if (profile.sigv4a_signing_region_set) {\n return (profile.sigv4a_signing_region_set ?? \"\").split(\",\").map((_) => _.trim());\n }\n throw new ProviderError(\"sigv4a_signing_region_set not set in profile.\", {\n tryNextLink: true,\n });\n },\n default: undefined,\n};\n", "export const ALGORITHM_QUERY_PARAM = \"X-Amz-Algorithm\";\nexport const CREDENTIAL_QUERY_PARAM = \"X-Amz-Credential\";\nexport const AMZ_DATE_QUERY_PARAM = \"X-Amz-Date\";\nexport const SIGNED_HEADERS_QUERY_PARAM = \"X-Amz-SignedHeaders\";\nexport const EXPIRES_QUERY_PARAM = \"X-Amz-Expires\";\nexport const SIGNATURE_QUERY_PARAM = \"X-Amz-Signature\";\nexport const TOKEN_QUERY_PARAM = \"X-Amz-Security-Token\";\nexport const REGION_SET_PARAM = \"X-Amz-Region-Set\";\nexport const AUTH_HEADER = \"authorization\";\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();\nexport const DATE_HEADER = \"date\";\nexport const GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];\nexport const SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();\nexport const SHA256_HEADER = \"x-amz-content-sha256\";\nexport const TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();\nexport const HOST_HEADER = \"host\";\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n \"cache-control\": true,\n connection: true,\n expect: true,\n from: true,\n \"keep-alive\": true,\n \"max-forwards\": true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n \"transfer-encoding\": true,\n upgrade: true,\n \"user-agent\": true,\n \"x-amzn-trace-id\": true,\n};\nexport const PROXY_HEADER_PATTERN = /^proxy-/;\nexport const SEC_HEADER_PATTERN = /^sec-/;\nexport const UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i];\nexport const ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256\";\nexport const ALGORITHM_IDENTIFIER_V4A = \"AWS4-ECDSA-P256-SHA256\";\nexport const EVENT_ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256-PAYLOAD\";\nexport const UNSIGNED_PAYLOAD = \"UNSIGNED-PAYLOAD\";\nexport const MAX_CACHE_SIZE = 50;\nexport const KEY_TYPE_IDENTIFIER = \"aws4_request\";\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;\n", "import { toHex } from \"@smithy/util-hex-encoding\";\nimport { toUint8Array } from \"@smithy/util-utf8\";\nimport { KEY_TYPE_IDENTIFIER, MAX_CACHE_SIZE } from \"./constants\";\nconst signingKeyCache = {};\nconst cacheQueue = [];\nexport const createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`;\nexport const getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => {\n const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);\n const cacheKey = `${shortDate}:${region}:${service}:${toHex(credsHash)}:${credentials.sessionToken}`;\n if (cacheKey in signingKeyCache) {\n return signingKeyCache[cacheKey];\n }\n cacheQueue.push(cacheKey);\n while (cacheQueue.length > MAX_CACHE_SIZE) {\n delete signingKeyCache[cacheQueue.shift()];\n }\n let key = `AWS4${credentials.secretAccessKey}`;\n for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) {\n key = await hmac(sha256Constructor, key, signable);\n }\n return (signingKeyCache[cacheKey] = key);\n};\nexport const clearCredentialCache = () => {\n cacheQueue.length = 0;\n Object.keys(signingKeyCache).forEach((cacheKey) => {\n delete signingKeyCache[cacheKey];\n });\n};\nconst hmac = (ctor, secret, data) => {\n const hash = new ctor(secret);\n hash.update(toUint8Array(data));\n return hash.digest();\n};\n", "import { ALWAYS_UNSIGNABLE_HEADERS, PROXY_HEADER_PATTERN, SEC_HEADER_PATTERN } from \"./constants\";\nexport const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => {\n const canonical = {};\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue;\n }\n const canonicalHeaderName = headerName.toLowerCase();\n if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName) ||\n PROXY_HEADER_PATTERN.test(canonicalHeaderName) ||\n SEC_HEADER_PATTERN.test(canonicalHeaderName)) {\n if (!signableHeaders || (signableHeaders && !signableHeaders.has(canonicalHeaderName))) {\n continue;\n }\n }\n canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\\s+/g, \" \");\n }\n return canonical;\n};\n", "export const isArrayBuffer = (arg) => (typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer) ||\n Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\";\n", "import { isArrayBuffer } from \"@smithy/is-array-buffer\";\nimport { toHex } from \"@smithy/util-hex-encoding\";\nimport { toUint8Array } from \"@smithy/util-utf8\";\nimport { SHA256_HEADER, UNSIGNED_PAYLOAD } from \"./constants\";\nexport const getPayloadHash = async ({ headers, body }, hashConstructor) => {\n for (const headerName of Object.keys(headers)) {\n if (headerName.toLowerCase() === SHA256_HEADER) {\n return headers[headerName];\n }\n }\n if (body == undefined) {\n return \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\";\n }\n else if (typeof body === \"string\" || ArrayBuffer.isView(body) || isArrayBuffer(body)) {\n const hashCtor = new hashConstructor();\n hashCtor.update(toUint8Array(body));\n return toHex(await hashCtor.digest());\n }\n return UNSIGNED_PAYLOAD;\n};\n", "import { fromHex, toHex } from \"@smithy/util-hex-encoding\";\nimport { fromUtf8 } from \"@smithy/util-utf8\";\nexport class HeaderFormatter {\n format(headers) {\n const chunks = [];\n for (const headerName of Object.keys(headers)) {\n const bytes = fromUtf8(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? 0 : 1]);\n case \"byte\":\n return Uint8Array.from([2, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, 3);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, 4);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = 5;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, 6);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = fromUtf8(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, 7);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = 8;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = 9;\n uuidBytes.set(fromHex(header.value.replace(/\\-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n}\nvar HEADER_VALUE_TYPE;\n(function (HEADER_VALUE_TYPE) {\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolTrue\"] = 0] = \"boolTrue\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolFalse\"] = 1] = \"boolFalse\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byte\"] = 2] = \"byte\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"short\"] = 3] = \"short\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"integer\"] = 4] = \"integer\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"long\"] = 5] = \"long\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byteArray\"] = 6] = \"byteArray\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"string\"] = 7] = \"string\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"timestamp\"] = 8] = \"timestamp\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"uuid\"] = 9] = \"uuid\";\n})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));\nconst UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\nexport class Int64 {\n bytes;\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static fromNumber(number) {\n if (number > 9_223_372_036_854_775_807 || number < -9_223_372_036_854_775_808) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new Int64(bytes);\n }\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 0b10000000;\n if (negative) {\n negate(bytes);\n }\n return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n}\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 0xff;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n", "export const hasHeader = (soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true;\n }\n }\n return false;\n};\nexport const getHeaderValue = (soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return headers[headerName];\n }\n }\n return undefined;\n};\nexport const deleteHeader = (soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n delete headers[headerName];\n }\n }\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nexport const moveHeadersToQuery = (request, options = {}) => {\n const { headers, query = {} } = HttpRequest.clone(request);\n for (const name of Object.keys(headers)) {\n const lname = name.toLowerCase();\n if ((lname.slice(0, 6) === \"x-amz-\" && !options.unhoistableHeaders?.has(lname)) ||\n options.hoistableHeaders?.has(lname)) {\n query[name] = headers[name];\n delete headers[name];\n }\n }\n return {\n ...request,\n headers,\n query,\n };\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { GENERATED_HEADERS } from \"./constants\";\nexport const prepareRequest = (request) => {\n request = HttpRequest.clone(request);\n for (const headerName of Object.keys(request.headers)) {\n if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName];\n }\n }\n return request;\n};\n", "import { escapeUri } from \"@smithy/util-uri-escape\";\nimport { SIGNATURE_HEADER } from \"./constants\";\nexport const getCanonicalQuery = ({ query = {} }) => {\n const keys = [];\n const serialized = {};\n for (const key of Object.keys(query)) {\n if (key.toLowerCase() === SIGNATURE_HEADER) {\n continue;\n }\n const encodedKey = escapeUri(key);\n keys.push(encodedKey);\n const value = query[key];\n if (typeof value === \"string\") {\n serialized[encodedKey] = `${encodedKey}=${escapeUri(value)}`;\n }\n else if (Array.isArray(value)) {\n serialized[encodedKey] = value\n .slice(0)\n .reduce((encoded, value) => encoded.concat([`${encodedKey}=${escapeUri(value)}`]), [])\n .sort()\n .join(\"&\");\n }\n }\n return keys\n .sort()\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join(\"&\");\n};\n", "export const iso8601 = (time) => toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, \"Z\");\nexport const toDate = (time) => {\n if (typeof time === \"number\") {\n return new Date(time * 1000);\n }\n if (typeof time === \"string\") {\n if (Number(time)) {\n return new Date(Number(time) * 1000);\n }\n return new Date(time);\n }\n return time;\n};\n", "import { toHex } from \"@smithy/util-hex-encoding\";\nimport { normalizeProvider } from \"@smithy/util-middleware\";\nimport { escapeUri } from \"@smithy/util-uri-escape\";\nimport { toUint8Array } from \"@smithy/util-utf8\";\nimport { getCanonicalQuery } from \"./getCanonicalQuery\";\nimport { iso8601 } from \"./utilDate\";\nexport class SignatureV4Base {\n service;\n regionProvider;\n credentialProvider;\n sha256;\n uriEscapePath;\n applyChecksum;\n constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) {\n this.service = service;\n this.sha256 = sha256;\n this.uriEscapePath = uriEscapePath;\n this.applyChecksum = typeof applyChecksum === \"boolean\" ? applyChecksum : true;\n this.regionProvider = normalizeProvider(region);\n this.credentialProvider = normalizeProvider(credentials);\n }\n createCanonicalRequest(request, canonicalHeaders, payloadHash) {\n const sortedHeaders = Object.keys(canonicalHeaders).sort();\n return `${request.method}\n${this.getCanonicalPath(request)}\n${getCanonicalQuery(request)}\n${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join(\"\\n\")}\n\n${sortedHeaders.join(\";\")}\n${payloadHash}`;\n }\n async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {\n const hash = new this.sha256();\n hash.update(toUint8Array(canonicalRequest));\n const hashedRequest = await hash.digest();\n return `${algorithmIdentifier}\n${longDate}\n${credentialScope}\n${toHex(hashedRequest)}`;\n }\n getCanonicalPath({ path }) {\n if (this.uriEscapePath) {\n const normalizedPathSegments = [];\n for (const pathSegment of path.split(\"/\")) {\n if (pathSegment?.length === 0)\n continue;\n if (pathSegment === \".\")\n continue;\n if (pathSegment === \"..\") {\n normalizedPathSegments.pop();\n }\n else {\n normalizedPathSegments.push(pathSegment);\n }\n }\n const normalizedPath = `${path?.startsWith(\"/\") ? \"/\" : \"\"}${normalizedPathSegments.join(\"/\")}${normalizedPathSegments.length > 0 && path?.endsWith(\"/\") ? \"/\" : \"\"}`;\n const doubleEncoded = escapeUri(normalizedPath);\n return doubleEncoded.replace(/%2F/g, \"/\");\n }\n return path;\n }\n validateResolvedCredentials(credentials) {\n if (typeof credentials !== \"object\" ||\n typeof credentials.accessKeyId !== \"string\" ||\n typeof credentials.secretAccessKey !== \"string\") {\n throw new Error(\"Resolved credential object is not valid\");\n }\n }\n formatDate(now) {\n const longDate = iso8601(now).replace(/[\\-:]/g, \"\");\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n };\n }\n getCanonicalHeaderList(headers) {\n return Object.keys(headers).sort().join(\";\");\n }\n}\n", "import { toHex } from \"@smithy/util-hex-encoding\";\nimport { toUint8Array } from \"@smithy/util-utf8\";\nimport { ALGORITHM_IDENTIFIER, ALGORITHM_QUERY_PARAM, AMZ_DATE_HEADER, AMZ_DATE_QUERY_PARAM, AUTH_HEADER, CREDENTIAL_QUERY_PARAM, EVENT_ALGORITHM_IDENTIFIER, EXPIRES_QUERY_PARAM, MAX_PRESIGNED_TTL, SHA256_HEADER, SIGNATURE_QUERY_PARAM, SIGNED_HEADERS_QUERY_PARAM, TOKEN_HEADER, TOKEN_QUERY_PARAM, } from \"./constants\";\nimport { createScope, getSigningKey } from \"./credentialDerivation\";\nimport { getCanonicalHeaders } from \"./getCanonicalHeaders\";\nimport { getPayloadHash } from \"./getPayloadHash\";\nimport { HeaderFormatter } from \"./HeaderFormatter\";\nimport { hasHeader } from \"./headerUtil\";\nimport { moveHeadersToQuery } from \"./moveHeadersToQuery\";\nimport { prepareRequest } from \"./prepareRequest\";\nimport { SignatureV4Base } from \"./SignatureV4Base\";\nexport class SignatureV4 extends SignatureV4Base {\n headerFormatter = new HeaderFormatter();\n constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) {\n super({\n applyChecksum,\n credentials,\n region,\n service,\n sha256,\n uriEscapePath,\n });\n }\n async presign(originalRequest, options = {}) {\n const { signingDate = new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService, } = options;\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? (await this.regionProvider());\n const { longDate, shortDate } = this.formatDate(signingDate);\n if (expiresIn > MAX_PRESIGNED_TTL) {\n return Promise.reject(\"Signature version 4 presigned URLs\" + \" must have an expiration date less than one week in\" + \" the future\");\n }\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders });\n if (credentials.sessionToken) {\n request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;\n }\n request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;\n request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;\n request.query[AMZ_DATE_QUERY_PARAM] = longDate;\n request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders);\n request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)));\n return request;\n }\n async sign(toSign, options) {\n if (typeof toSign === \"string\") {\n return this.signString(toSign, options);\n }\n else if (toSign.headers && toSign.payload) {\n return this.signEvent(toSign, options);\n }\n else if (toSign.message) {\n return this.signMessage(toSign, options);\n }\n else {\n return this.signRequest(toSign, options);\n }\n }\n async signEvent({ headers, payload }, { signingDate = new Date(), priorSignature, signingRegion, signingService }) {\n const region = signingRegion ?? (await this.regionProvider());\n const { shortDate, longDate } = this.formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256);\n const hash = new this.sha256();\n hash.update(headers);\n const hashedHeaders = toHex(await hash.digest());\n const stringToSign = [\n EVENT_ALGORITHM_IDENTIFIER,\n longDate,\n scope,\n priorSignature,\n hashedHeaders,\n hashedPayload,\n ].join(\"\\n\");\n return this.signString(stringToSign, { signingDate, signingRegion: region, signingService });\n }\n async signMessage(signableMessage, { signingDate = new Date(), signingRegion, signingService }) {\n const promise = this.signEvent({\n headers: this.headerFormatter.format(signableMessage.message.headers),\n payload: signableMessage.message.body,\n }, {\n signingDate,\n signingRegion,\n signingService,\n priorSignature: signableMessage.priorSignature,\n });\n return promise.then((signature) => {\n return { message: signableMessage.message, signature };\n });\n }\n async signString(stringToSign, { signingDate = new Date(), signingRegion, signingService } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? (await this.regionProvider());\n const { shortDate } = this.formatDate(signingDate);\n const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));\n hash.update(toUint8Array(stringToSign));\n return toHex(await hash.digest());\n }\n async signRequest(requestToSign, { signingDate = new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService, } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? (await this.regionProvider());\n const request = prepareRequest(requestToSign);\n const { longDate, shortDate } = this.formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n request.headers[AMZ_DATE_HEADER] = longDate;\n if (credentials.sessionToken) {\n request.headers[TOKEN_HEADER] = credentials.sessionToken;\n }\n const payloadHash = await getPayloadHash(request, this.sha256);\n if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) {\n request.headers[SHA256_HEADER] = payloadHash;\n }\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash));\n request.headers[AUTH_HEADER] =\n `${ALGORITHM_IDENTIFIER} ` +\n `Credential=${credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, ` +\n `Signature=${signature}`;\n return request;\n }\n async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {\n const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER);\n const hash = new this.sha256(await keyPromise);\n hash.update(toUint8Array(stringToSign));\n return toHex(await hash.digest());\n }\n getSigningKey(credentials, region, shortDate, service) {\n return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);\n }\n}\n", "export const signatureV4aContainer = {\n SignatureV4a: null,\n};\n", "export * from \"./SignatureV4\";\nexport * from \"./constants\";\nexport { getCanonicalHeaders } from \"./getCanonicalHeaders\";\nexport { getCanonicalQuery } from \"./getCanonicalQuery\";\nexport { getPayloadHash } from \"./getPayloadHash\";\nexport { moveHeadersToQuery } from \"./moveHeadersToQuery\";\nexport { prepareRequest } from \"./prepareRequest\";\nexport * from \"./credentialDerivation\";\nexport { SignatureV4Base } from \"./SignatureV4Base\";\nexport { hasHeader } from \"./headerUtil\";\nexport * from \"./signature-v4a-container\";\n", "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { doesIdentityRequireRefresh, isIdentityExpired, memoizeIdentityProvider, normalizeProvider, } from \"@smithy/core\";\nimport { SignatureV4 } from \"@smithy/signature-v4\";\nexport const resolveAwsSdkSigV4Config = (config) => {\n let inputCredentials = config.credentials;\n let isUserSupplied = !!config.credentials;\n let resolvedCredentials = undefined;\n Object.defineProperty(config, \"credentials\", {\n set(credentials) {\n if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {\n isUserSupplied = true;\n }\n inputCredentials = credentials;\n const memoizedProvider = normalizeCredentialProvider(config, {\n credentials: inputCredentials,\n credentialDefaultProvider: config.credentialDefaultProvider,\n });\n const boundProvider = bindCallerConfig(config, memoizedProvider);\n if (isUserSupplied && !boundProvider.attributed) {\n const isCredentialObject = typeof inputCredentials === \"object\" && inputCredentials !== null;\n resolvedCredentials = async (options) => {\n const creds = await boundProvider(options);\n const attributedCreds = creds;\n if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) {\n return setCredentialFeature(attributedCreds, \"CREDENTIALS_CODE\", \"e\");\n }\n return attributedCreds;\n };\n resolvedCredentials.memoized = boundProvider.memoized;\n resolvedCredentials.configBound = boundProvider.configBound;\n resolvedCredentials.attributed = true;\n }\n else {\n resolvedCredentials = boundProvider;\n }\n },\n get() {\n return resolvedCredentials;\n },\n enumerable: true,\n configurable: true,\n });\n config.credentials = inputCredentials;\n const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256, } = config;\n let signer;\n if (config.signer) {\n signer = normalizeProvider(config.signer);\n }\n else if (config.regionInfoProvider) {\n signer = () => normalizeProvider(config.region)()\n .then(async (region) => [\n (await config.regionInfoProvider(region, {\n useFipsEndpoint: await config.useFipsEndpoint(),\n useDualstackEndpoint: await config.useDualstackEndpoint(),\n })) || {},\n region,\n ])\n .then(([regionInfo, region]) => {\n const { signingRegion, signingService } = regionInfo;\n config.signingRegion = config.signingRegion || signingRegion || region;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: config.credentials,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath,\n };\n const SignerCtor = config.signerConstructor || SignatureV4;\n return new SignerCtor(params);\n });\n }\n else {\n signer = async (authScheme) => {\n authScheme = Object.assign({}, {\n name: \"sigv4\",\n signingName: config.signingName || config.defaultSigningName,\n signingRegion: await normalizeProvider(config.region)(),\n properties: {},\n }, authScheme);\n const signingRegion = authScheme.signingRegion;\n const signingService = authScheme.signingName;\n config.signingRegion = config.signingRegion || signingRegion;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: config.credentials,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath,\n };\n const SignerCtor = config.signerConstructor || SignatureV4;\n return new SignerCtor(params);\n };\n }\n const resolvedConfig = Object.assign(config, {\n systemClockOffset,\n signingEscapePath,\n signer,\n });\n return resolvedConfig;\n};\nexport const resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;\nfunction normalizeCredentialProvider(config, { credentials, credentialDefaultProvider, }) {\n let credentialsProvider;\n if (credentials) {\n if (!credentials?.memoized) {\n credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh);\n }\n else {\n credentialsProvider = credentials;\n }\n }\n else {\n if (credentialDefaultProvider) {\n credentialsProvider = normalizeProvider(credentialDefaultProvider(Object.assign({}, config, {\n parentClientConfig: config,\n })));\n }\n else {\n credentialsProvider = async () => {\n throw new Error(\"@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.\");\n };\n }\n }\n credentialsProvider.memoized = true;\n return credentialsProvider;\n}\nfunction bindCallerConfig(config, credentialsProvider) {\n if (credentialsProvider.configBound) {\n return credentialsProvider;\n }\n const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config });\n fn.memoized = credentialsProvider.memoized;\n fn.configBound = true;\n return fn;\n}\n", "export { AwsSdkSigV4Signer, AWSSDKSigV4Signer, validateSigningProperties } from \"./AwsSdkSigV4Signer\";\nexport { AwsSdkSigV4ASigner } from \"./AwsSdkSigV4ASigner\";\nexport * from \"./NODE_AUTH_SCHEME_PREFERENCE_OPTIONS\";\nexport * from \"./resolveAwsSdkSigV4AConfig\";\nexport * from \"./resolveAwsSdkSigV4Config\";\n", "export * from \"./aws_sdk\";\nexport * from \"./utils/getBearerTokenEnvKey\";\n", "const TEXT_ENCODER = typeof TextEncoder == \"function\" ? new TextEncoder() : null;\nexport const calculateBodyLength = (body) => {\n if (typeof body === \"string\") {\n if (TEXT_ENCODER) {\n return TEXT_ENCODER.encode(body).byteLength;\n }\n let len = body.length;\n for (let i = len - 1; i >= 0; i--) {\n const code = body.charCodeAt(i);\n if (code > 0x7f && code <= 0x7ff)\n len++;\n else if (code > 0x7ff && code <= 0xffff)\n len += 2;\n if (code >= 0xdc00 && code <= 0xdfff)\n i--;\n }\n return len;\n }\n else if (typeof body.byteLength === \"number\") {\n return body.byteLength;\n }\n else if (typeof body.size === \"number\") {\n return body.size;\n }\n throw new Error(`Body Length computation failed for ${body}`);\n};\n", "export * from \"./calculateBodyLength\";\n", "const getAllAliases = (name, aliases) => {\n const _aliases = [];\n if (name) {\n _aliases.push(name);\n }\n if (aliases) {\n for (const alias of aliases) {\n _aliases.push(alias);\n }\n }\n return _aliases;\n};\nconst getMiddlewareNameWithAliases = (name, aliases) => {\n return `${name || \"anonymous\"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(\",\")})` : \"\"}`;\n};\nexport const constructStack = () => {\n let absoluteEntries = [];\n let relativeEntries = [];\n let identifyOnResolve = false;\n const entriesNameSet = new Set();\n const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] ||\n priorityWeights[b.priority || \"normal\"] - priorityWeights[a.priority || \"normal\"]);\n const removeByName = (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n const aliases = getAllAliases(entry.name, entry.aliases);\n if (aliases.includes(toRemove)) {\n isRemoved = true;\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n };\n const removeByReference = (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n if (entry.middleware === toRemove) {\n isRemoved = true;\n for (const alias of getAllAliases(entry.name, entry.aliases)) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n };\n const cloneTo = (toStack) => {\n absoluteEntries.forEach((entry) => {\n toStack.add(entry.middleware, { ...entry });\n });\n relativeEntries.forEach((entry) => {\n toStack.addRelativeTo(entry.middleware, { ...entry });\n });\n toStack.identifyOnResolve?.(stack.identifyOnResolve());\n return toStack;\n };\n const expandRelativeMiddlewareList = (from) => {\n const expandedMiddlewareList = [];\n from.before.forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n }\n else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n expandedMiddlewareList.push(from);\n from.after.reverse().forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n }\n else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n return expandedMiddlewareList;\n };\n const getMiddlewareList = (debug = false) => {\n const normalizedAbsoluteEntries = [];\n const normalizedRelativeEntries = [];\n const normalizedEntriesNameMap = {};\n absoluteEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: [],\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedAbsoluteEntries.push(normalizedEntry);\n });\n relativeEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: [],\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedRelativeEntries.push(normalizedEntry);\n });\n normalizedRelativeEntries.forEach((entry) => {\n if (entry.toMiddleware) {\n const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];\n if (toMiddleware === undefined) {\n if (debug) {\n return;\n }\n throw new Error(`${entry.toMiddleware} is not found when adding ` +\n `${getMiddlewareNameWithAliases(entry.name, entry.aliases)} ` +\n `middleware ${entry.relation} ${entry.toMiddleware}`);\n }\n if (entry.relation === \"after\") {\n toMiddleware.after.push(entry);\n }\n if (entry.relation === \"before\") {\n toMiddleware.before.push(entry);\n }\n }\n });\n const mainChain = sort(normalizedAbsoluteEntries)\n .map(expandRelativeMiddlewareList)\n .reduce((wholeList, expandedMiddlewareList) => {\n wholeList.push(...expandedMiddlewareList);\n return wholeList;\n }, []);\n return mainChain;\n };\n const stack = {\n add: (middleware, options = {}) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n step: \"initialize\",\n priority: \"normal\",\n middleware,\n ...options,\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = absoluteEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias));\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = absoluteEntries[toOverrideIndex];\n if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {\n throw new Error(`\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware with ` +\n `${toOverride.priority} priority in ${toOverride.step} step cannot ` +\n `be overridden by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware with ` +\n `${entry.priority} priority in ${entry.step} step.`);\n }\n absoluteEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n absoluteEntries.push(entry);\n },\n addRelativeTo: (middleware, options) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n middleware,\n ...options,\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = relativeEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias));\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = relativeEntries[toOverrideIndex];\n if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {\n throw new Error(`\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware ` +\n `${toOverride.relation} \"${toOverride.toMiddleware}\" middleware cannot be overridden ` +\n `by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware ${entry.relation} ` +\n `\"${entry.toMiddleware}\" middleware.`);\n }\n relativeEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n relativeEntries.push(entry);\n },\n clone: () => cloneTo(constructStack()),\n use: (plugin) => {\n plugin.applyToStack(stack);\n },\n remove: (toRemove) => {\n if (typeof toRemove === \"string\")\n return removeByName(toRemove);\n else\n return removeByReference(toRemove);\n },\n removeByTag: (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n const { tags, name, aliases: _aliases } = entry;\n if (tags && tags.includes(toRemove)) {\n const aliases = getAllAliases(name, _aliases);\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n isRemoved = true;\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n },\n concat: (from) => {\n const cloned = cloneTo(constructStack());\n cloned.use(from);\n cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false));\n return cloned;\n },\n applyToStack: cloneTo,\n identify: () => {\n return getMiddlewareList(true).map((mw) => {\n const step = mw.step ??\n mw.relation +\n \" \" +\n mw.toMiddleware;\n return getMiddlewareNameWithAliases(mw.name, mw.aliases) + \" - \" + step;\n });\n },\n identifyOnResolve(toggle) {\n if (typeof toggle === \"boolean\")\n identifyOnResolve = toggle;\n return identifyOnResolve;\n },\n resolve: (handler, context) => {\n for (const middleware of getMiddlewareList()\n .map((entry) => entry.middleware)\n .reverse()) {\n handler = middleware(handler, context);\n }\n if (identifyOnResolve) {\n console.log(stack.identify());\n }\n return handler;\n },\n };\n return stack;\n};\nconst stepWeights = {\n initialize: 5,\n serialize: 4,\n build: 3,\n finalizeRequest: 2,\n deserialize: 1,\n};\nconst priorityWeights = {\n high: 3,\n normal: 2,\n low: 1,\n};\n", "export * from \"./MiddlewareStack\";\n", "import { constructStack } from \"@smithy/middleware-stack\";\nexport class Client {\n config;\n middlewareStack = constructStack();\n initConfig;\n handlers;\n constructor(config) {\n this.config = config;\n const { protocol, protocolSettings } = config;\n if (protocolSettings) {\n if (typeof protocol === \"function\") {\n config.protocol = new protocol(protocolSettings);\n }\n }\n }\n send(command, optionsOrCb, cb) {\n const options = typeof optionsOrCb !== \"function\" ? optionsOrCb : undefined;\n const callback = typeof optionsOrCb === \"function\" ? optionsOrCb : cb;\n const useHandlerCache = options === undefined && this.config.cacheMiddleware === true;\n let handler;\n if (useHandlerCache) {\n if (!this.handlers) {\n this.handlers = new WeakMap();\n }\n const handlers = this.handlers;\n if (handlers.has(command.constructor)) {\n handler = handlers.get(command.constructor);\n }\n else {\n handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n handlers.set(command.constructor, handler);\n }\n }\n else {\n delete this.handlers;\n handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n }\n if (callback) {\n handler(command)\n .then((result) => callback(null, result.output), (err) => callback(err))\n .catch(() => { });\n }\n else {\n return handler(command).then((result) => result.output);\n }\n }\n destroy() {\n this.config?.requestHandler?.destroy?.();\n delete this.handlers;\n }\n}\n", "export { collectBody } from \"@smithy/core/protocols\";\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nconst SENSITIVE_STRING = \"***SensitiveInformation***\";\nexport function schemaLogFilter(schema, data) {\n if (data == null) {\n return data;\n }\n const ns = NormalizedSchema.of(schema);\n if (ns.getMergedTraits().sensitive) {\n return SENSITIVE_STRING;\n }\n if (ns.isListSchema()) {\n const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive;\n if (isSensitive) {\n return SENSITIVE_STRING;\n }\n }\n else if (ns.isMapSchema()) {\n const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive;\n if (isSensitive) {\n return SENSITIVE_STRING;\n }\n }\n else if (ns.isStructSchema() && typeof data === \"object\") {\n const object = data;\n const newObject = {};\n for (const [member, memberNs] of ns.structIterator()) {\n if (object[member] != null) {\n newObject[member] = schemaLogFilter(memberNs, object[member]);\n }\n }\n return newObject;\n }\n return data;\n}\n", "import { constructStack } from \"@smithy/middleware-stack\";\nimport { SMITHY_CONTEXT_KEY } from \"@smithy/types\";\nimport { schemaLogFilter } from \"./schemaLogFilter\";\nexport class Command {\n middlewareStack = constructStack();\n schema;\n static classBuilder() {\n return new ClassBuilder();\n }\n resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor, }) {\n for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {\n this.middlewareStack.use(mw);\n }\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog,\n outputFilterSensitiveLog,\n [SMITHY_CONTEXT_KEY]: {\n commandInstance: this,\n ...smithyContext,\n },\n ...additionalContext,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n}\nclass ClassBuilder {\n _init = () => { };\n _ep = {};\n _middlewareFn = () => [];\n _commandName = \"\";\n _clientName = \"\";\n _additionalContext = {};\n _smithyContext = {};\n _inputFilterSensitiveLog = undefined;\n _outputFilterSensitiveLog = undefined;\n _serializer = null;\n _deserializer = null;\n _operationSchema;\n init(cb) {\n this._init = cb;\n }\n ep(endpointParameterInstructions) {\n this._ep = endpointParameterInstructions;\n return this;\n }\n m(middlewareSupplier) {\n this._middlewareFn = middlewareSupplier;\n return this;\n }\n s(service, operation, smithyContext = {}) {\n this._smithyContext = {\n service,\n operation,\n ...smithyContext,\n };\n return this;\n }\n c(additionalContext = {}) {\n this._additionalContext = additionalContext;\n return this;\n }\n n(clientName, commandName) {\n this._clientName = clientName;\n this._commandName = commandName;\n return this;\n }\n f(inputFilter = (_) => _, outputFilter = (_) => _) {\n this._inputFilterSensitiveLog = inputFilter;\n this._outputFilterSensitiveLog = outputFilter;\n return this;\n }\n ser(serializer) {\n this._serializer = serializer;\n return this;\n }\n de(deserializer) {\n this._deserializer = deserializer;\n return this;\n }\n sc(operation) {\n this._operationSchema = operation;\n this._smithyContext.operationSchema = operation;\n return this;\n }\n build() {\n const closure = this;\n let CommandRef;\n return (CommandRef = class extends Command {\n input;\n static getEndpointParameterInstructions() {\n return closure._ep;\n }\n constructor(...[input]) {\n super();\n this.input = input ?? {};\n closure._init(this);\n this.schema = closure._operationSchema;\n }\n resolveMiddleware(stack, configuration, options) {\n const op = closure._operationSchema;\n const input = op?.[4] ?? op?.input;\n const output = op?.[5] ?? op?.output;\n return this.resolveMiddlewareWithContext(stack, configuration, options, {\n CommandCtor: CommandRef,\n middlewareFn: closure._middlewareFn,\n clientName: closure._clientName,\n commandName: closure._commandName,\n inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_) => _),\n outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_) => _),\n smithyContext: closure._smithyContext,\n additionalContext: closure._additionalContext,\n });\n }\n serialize = closure._serializer;\n deserialize = closure._deserializer;\n });\n }\n}\n", "export const SENSITIVE_STRING = \"***SensitiveInformation***\";\n", "export const createAggregatedClient = (commands, Client, options) => {\n for (const [command, CommandCtor] of Object.entries(commands)) {\n const methodImpl = async function (args, optionsOrCb, cb) {\n const command = new CommandCtor(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expected http options but got ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n };\n const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, \"\");\n Client.prototype[methodName] = methodImpl;\n }\n const { paginators = {}, waiters = {} } = options ?? {};\n for (const [paginatorName, paginatorFn] of Object.entries(paginators)) {\n if (Client.prototype[paginatorName] === void 0) {\n Client.prototype[paginatorName] = function (commandInput = {}, paginationConfiguration, ...rest) {\n return paginatorFn({\n ...paginationConfiguration,\n client: this,\n }, commandInput, ...rest);\n };\n }\n }\n for (const [waiterName, waiterFn] of Object.entries(waiters)) {\n if (Client.prototype[waiterName] === void 0) {\n Client.prototype[waiterName] = async function (commandInput = {}, waiterConfiguration, ...rest) {\n let config = waiterConfiguration;\n if (typeof waiterConfiguration === \"number\") {\n config = {\n maxWaitTime: waiterConfiguration,\n };\n }\n return waiterFn({\n ...config,\n client: this,\n }, commandInput, ...rest);\n };\n }\n }\n};\n", "export class ServiceException extends Error {\n $fault;\n $response;\n $retryable;\n $metadata;\n constructor(options) {\n super(options.message);\n Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype);\n this.name = options.name;\n this.$fault = options.$fault;\n this.$metadata = options.$metadata;\n }\n static isInstance(value) {\n if (!value)\n return false;\n const candidate = value;\n return (ServiceException.prototype.isPrototypeOf(candidate) ||\n (Boolean(candidate.$fault) &&\n Boolean(candidate.$metadata) &&\n (candidate.$fault === \"client\" || candidate.$fault === \"server\")));\n }\n static [Symbol.hasInstance](instance) {\n if (!instance)\n return false;\n const candidate = instance;\n if (this === ServiceException) {\n return ServiceException.isInstance(instance);\n }\n if (ServiceException.isInstance(instance)) {\n if (candidate.name && this.name) {\n return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;\n }\n return this.prototype.isPrototypeOf(instance);\n }\n return false;\n }\n}\nexport const decorateServiceException = (exception, additions = {}) => {\n Object.entries(additions)\n .filter(([, v]) => v !== undefined)\n .forEach(([k, v]) => {\n if (exception[k] == undefined || exception[k] === \"\") {\n exception[k] = v;\n }\n });\n const message = exception.message || exception.Message || \"UnknownError\";\n exception.message = message;\n delete exception.Message;\n return exception;\n};\n", "import { decorateServiceException } from \"./exceptions\";\nexport const throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => {\n const $metadata = deserializeMetadata(output);\n const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + \"\" : undefined;\n const response = new exceptionCtor({\n name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || \"UnknownError\",\n $fault: \"client\",\n $metadata,\n });\n throw decorateServiceException(response, parsedBody);\n};\nexport const withBaseException = (ExceptionCtor) => {\n return ({ output, parsedBody, errorCode }) => {\n throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });\n };\n};\nconst deserializeMetadata = (output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n});\n", "export const loadConfigsForDefaultMode = (mode) => {\n switch (mode) {\n case \"standard\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100,\n };\n case \"in-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 1100,\n };\n case \"cross-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100,\n };\n case \"mobile\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 30000,\n };\n default:\n return {};\n }\n};\n", "let warningEmitted = false;\nexport const emitWarningIfUnsupportedVersion = (version) => {\n if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 16) {\n warningEmitted = true;\n }\n};\n", "export { extendedEncodeURIComponent } from \"@smithy/core/protocols\";\n", "import { AlgorithmId } from \"@smithy/types\";\nexport { AlgorithmId };\nconst knownAlgorithms = Object.values(AlgorithmId);\nexport const getChecksumConfiguration = (runtimeConfig) => {\n const checksumAlgorithms = [];\n for (const id in AlgorithmId) {\n const algorithmId = AlgorithmId[id];\n if (runtimeConfig[algorithmId] === undefined) {\n continue;\n }\n checksumAlgorithms.push({\n algorithmId: () => algorithmId,\n checksumConstructor: () => runtimeConfig[algorithmId],\n });\n }\n for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) {\n checksumAlgorithms.push({\n algorithmId: () => id,\n checksumConstructor: () => ChecksumCtor,\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {};\n const id = algo.algorithmId();\n const ctor = algo.checksumConstructor();\n if (knownAlgorithms.includes(id)) {\n runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor;\n }\n else {\n runtimeConfig.checksumAlgorithms[id] = ctor;\n }\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n },\n };\n};\nexport const resolveChecksumRuntimeConfig = (clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n const id = checksumAlgorithm.algorithmId();\n if (knownAlgorithms.includes(id)) {\n runtimeConfig[id] = checksumAlgorithm.checksumConstructor();\n }\n });\n return runtimeConfig;\n};\n", "export const getRetryConfiguration = (runtimeConfig) => {\n return {\n setRetryStrategy(retryStrategy) {\n runtimeConfig.retryStrategy = retryStrategy;\n },\n retryStrategy() {\n return runtimeConfig.retryStrategy;\n },\n };\n};\nexport const resolveRetryRuntimeConfig = (retryStrategyConfiguration) => {\n const runtimeConfig = {};\n runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();\n return runtimeConfig;\n};\n", "import { getChecksumConfiguration, resolveChecksumRuntimeConfig } from \"./checksum\";\nimport { getRetryConfiguration, resolveRetryRuntimeConfig } from \"./retry\";\nexport const getDefaultExtensionConfiguration = (runtimeConfig) => {\n return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig));\n};\nexport const getDefaultClientConfiguration = getDefaultExtensionConfiguration;\nexport const resolveDefaultRuntimeConfig = (config) => {\n return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config));\n};\n", "export * from \"./defaultExtensionConfiguration\";\n", "export const getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray];\n", "export const getValueFromTextNode = (obj) => {\n const textNodeName = \"#text\";\n for (const key in obj) {\n if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== undefined) {\n obj[key] = obj[key][textNodeName];\n }\n else if (typeof obj[key] === \"object\" && obj[key] !== null) {\n obj[key] = getValueFromTextNode(obj[key]);\n }\n }\n return obj;\n};\n", "export const isSerializableHeaderValue = (value) => {\n return value != null;\n};\n", "export class NoOpLogger {\n trace() { }\n debug() { }\n info() { }\n warn() { }\n error() { }\n}\n", "export function map(arg0, arg1, arg2) {\n let target;\n let filter;\n let instructions;\n if (typeof arg1 === \"undefined\" && typeof arg2 === \"undefined\") {\n target = {};\n instructions = arg0;\n }\n else {\n target = arg0;\n if (typeof arg1 === \"function\") {\n filter = arg1;\n instructions = arg2;\n return mapWithFilter(target, filter, instructions);\n }\n else {\n instructions = arg1;\n }\n }\n for (const key of Object.keys(instructions)) {\n if (!Array.isArray(instructions[key])) {\n target[key] = instructions[key];\n continue;\n }\n applyInstruction(target, null, instructions, key);\n }\n return target;\n}\nexport const convertMap = (target) => {\n const output = {};\n for (const [k, v] of Object.entries(target || {})) {\n output[k] = [, v];\n }\n return output;\n};\nexport const take = (source, instructions) => {\n const out = {};\n for (const key in instructions) {\n applyInstruction(out, source, instructions, key);\n }\n return out;\n};\nconst mapWithFilter = (target, filter, instructions) => {\n return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => {\n if (Array.isArray(value)) {\n _instructions[key] = value;\n }\n else {\n if (typeof value === \"function\") {\n _instructions[key] = [filter, value()];\n }\n else {\n _instructions[key] = [filter, value];\n }\n }\n return _instructions;\n }, {}));\n};\nconst applyInstruction = (target, source, instructions, targetKey) => {\n if (source !== null) {\n let instruction = instructions[targetKey];\n if (typeof instruction === \"function\") {\n instruction = [, instruction];\n }\n const [filter = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;\n if ((typeof filter === \"function\" && filter(source[sourceKey])) || (typeof filter !== \"function\" && !!filter)) {\n target[targetKey] = valueFn(source[sourceKey]);\n }\n return;\n }\n let [filter, value] = instructions[targetKey];\n if (typeof value === \"function\") {\n let _value;\n const defaultFilterPassed = filter === undefined && (_value = value()) != null;\n const customFilterPassed = (typeof filter === \"function\" && !!filter(void 0)) || (typeof filter !== \"function\" && !!filter);\n if (defaultFilterPassed) {\n target[targetKey] = _value;\n }\n else if (customFilterPassed) {\n target[targetKey] = value();\n }\n }\n else {\n const defaultFilterPassed = filter === undefined && value != null;\n const customFilterPassed = (typeof filter === \"function\" && !!filter(value)) || (typeof filter !== \"function\" && !!filter);\n if (defaultFilterPassed || customFilterPassed) {\n target[targetKey] = value;\n }\n }\n};\nconst nonNullish = (_) => _ != null;\nconst pass = (_) => _;\n", "export { resolvedPath } from \"@smithy/core/protocols\";\n", "export const serializeFloat = (value) => {\n if (value !== value) {\n return \"NaN\";\n }\n switch (value) {\n case Infinity:\n return \"Infinity\";\n case -Infinity:\n return \"-Infinity\";\n default:\n return value;\n }\n};\nexport const serializeDateTime = (date) => date.toISOString().replace(\".000Z\", \"Z\");\n", "export const _json = (obj) => {\n if (obj == null) {\n return {};\n }\n if (Array.isArray(obj)) {\n return obj.filter((_) => _ != null).map(_json);\n }\n if (typeof obj === \"object\") {\n const target = {};\n for (const key of Object.keys(obj)) {\n if (obj[key] == null) {\n continue;\n }\n target[key] = _json(obj[key]);\n }\n return target;\n }\n return obj;\n};\n", "export * from \"./client\";\nexport * from \"./collect-stream-body\";\nexport * from \"./command\";\nexport * from \"./constants\";\nexport * from \"./create-aggregated-client\";\nexport * from \"./default-error-handler\";\nexport * from \"./defaults-mode\";\nexport * from \"./emitWarningIfUnsupportedVersion\";\nexport * from \"./exceptions\";\nexport * from \"./extended-encode-uri-component\";\nexport * from \"./extensions\";\nexport * from \"./get-array-if-single-item\";\nexport * from \"./get-value-from-text-node\";\nexport * from \"./is-serializable-header-value\";\nexport * from \"./NoOpLogger\";\nexport * from \"./object-mapping\";\nexport * from \"./resolve-path\";\nexport * from \"./ser-utils\";\nexport * from \"./serde-json\";\nexport * from \"@smithy/core/serde\";\n", "import { NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { decorateServiceException } from \"@smithy/smithy-client\";\nexport class ProtocolLib {\n queryCompat;\n constructor(queryCompat = false) {\n this.queryCompat = queryCompat;\n }\n resolveRestContentType(defaultContentType, inputSchema) {\n const members = inputSchema.getMemberSchemas();\n const httpPayloadMember = Object.values(members).find((m) => {\n return !!m.getMergedTraits().httpPayload;\n });\n if (httpPayloadMember) {\n const mediaType = httpPayloadMember.getMergedTraits().mediaType;\n if (mediaType) {\n return mediaType;\n }\n else if (httpPayloadMember.isStringSchema()) {\n return \"text/plain\";\n }\n else if (httpPayloadMember.isBlobSchema()) {\n return \"application/octet-stream\";\n }\n else {\n return defaultContentType;\n }\n }\n else if (!inputSchema.isUnitSchema()) {\n const hasBody = Object.values(members).find((m) => {\n const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits();\n const noPrefixHeaders = httpPrefixHeaders === void 0;\n return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders;\n });\n if (hasBody) {\n return defaultContentType;\n }\n }\n }\n async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) {\n let namespace = defaultNamespace;\n let errorName = errorIdentifier;\n if (errorIdentifier.includes(\"#\")) {\n [namespace, errorName] = errorIdentifier.split(\"#\");\n }\n const errorMetadata = {\n $metadata: metadata,\n $fault: response.statusCode < 500 ? \"client\" : \"server\",\n };\n const registry = TypeRegistry.for(namespace);\n try {\n const errorSchema = getErrorSchema?.(registry, errorName) ?? registry.getSchema(errorIdentifier);\n return { errorSchema, errorMetadata };\n }\n catch (e) {\n dataObject.message = dataObject.message ?? dataObject.Message ?? \"UnknownError\";\n const synthetic = TypeRegistry.for(\"smithy.ts.sdk.synthetic.\" + namespace);\n const baseExceptionSchema = synthetic.getBaseException();\n if (baseExceptionSchema) {\n const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error;\n throw this.decorateServiceException(Object.assign(new ErrorCtor({ name: errorName }), errorMetadata), dataObject);\n }\n throw this.decorateServiceException(Object.assign(new Error(errorName), errorMetadata), dataObject);\n }\n }\n decorateServiceException(exception, additions = {}) {\n if (this.queryCompat) {\n const msg = exception.Message ?? additions.Message;\n const error = decorateServiceException(exception, additions);\n if (msg) {\n error.message = msg;\n }\n error.Error = {\n ...error.Error,\n Type: error.Error?.Type,\n Code: error.Error?.Code,\n Message: error.Error?.message ?? error.Error?.Message ?? msg,\n };\n const reqId = error.$metadata.requestId;\n if (reqId) {\n error.RequestId = reqId;\n }\n return error;\n }\n return decorateServiceException(exception, additions);\n }\n setQueryCompatError(output, response) {\n const queryErrorHeader = response.headers?.[\"x-amzn-query-error\"];\n if (output !== undefined && queryErrorHeader != null) {\n const [Code, Type] = queryErrorHeader.split(\";\");\n const entries = Object.entries(output);\n const Error = {\n Code,\n Type,\n };\n Object.assign(output, Error);\n for (const [k, v] of entries) {\n Error[k === \"message\" ? \"Message\" : k] = v;\n }\n delete Error.__type;\n output.Error = Error;\n }\n }\n queryCompatOutput(queryCompatErrorData, errorData) {\n if (queryCompatErrorData.Error) {\n errorData.Error = queryCompatErrorData.Error;\n }\n if (queryCompatErrorData.Type) {\n errorData.Type = queryCompatErrorData.Type;\n }\n if (queryCompatErrorData.Code) {\n errorData.Code = queryCompatErrorData.Code;\n }\n }\n findQueryCompatibleError(registry, errorName) {\n try {\n return registry.getSchema(errorName);\n }\n catch (e) {\n return registry.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName);\n }\n }\n}\n", "import { loadSmithyRpcV2CborErrorCode, SmithyRpcV2CborProtocol } from \"@smithy/core/cbor\";\nimport { NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nexport class AwsSmithyRpcV2CborProtocol extends SmithyRpcV2CborProtocol {\n awsQueryCompatible;\n mixin;\n constructor({ defaultNamespace, awsQueryCompatible, }) {\n super({ defaultNamespace });\n this.awsQueryCompatible = !!awsQueryCompatible;\n this.mixin = new ProtocolLib(this.awsQueryCompatible);\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n if (this.awsQueryCompatible) {\n request.headers[\"x-amzn-query-mode\"] = \"true\";\n }\n return request;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n if (this.awsQueryCompatible) {\n this.mixin.setQueryCompatError(dataObject, response);\n }\n const errorName = (() => {\n const compatHeader = response.headers[\"x-amzn-query-error\"];\n if (compatHeader && this.awsQueryCompatible) {\n return compatHeader.split(\";\")[0];\n }\n return loadSmithyRpcV2CborErrorCode(response, dataObject) ?? \"Unknown\";\n })();\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);\n const ns = NormalizedSchema.of(errorSchema);\n const message = dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor(message);\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n if (dataObject[name] != null) {\n output[name] = this.deserializer.readValue(member, dataObject[name]);\n }\n }\n if (this.awsQueryCompatible) {\n this.mixin.queryCompatOutput(dataObject, output);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n}\n", "export const _toStr = (val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"number\" || typeof val === \"bigint\") {\n const warning = new Error(`Received number ${val} where a string was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return String(val);\n }\n if (typeof val === \"boolean\") {\n const warning = new Error(`Received boolean ${val} where a string was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return String(val);\n }\n return val;\n};\nexport const _toBool = (val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"number\") {\n }\n if (typeof val === \"string\") {\n const lowercase = val.toLowerCase();\n if (val !== \"\" && lowercase !== \"false\" && lowercase !== \"true\") {\n const warning = new Error(`Received string \"${val}\" where a boolean was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n }\n return val !== \"\" && lowercase !== \"false\";\n }\n return val;\n};\nexport const _toNum = (val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"boolean\") {\n }\n if (typeof val === \"string\") {\n const num = Number(val);\n if (num.toString() !== val) {\n const warning = new Error(`Received string \"${val}\" where a number was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return val;\n }\n return num;\n }\n return val;\n};\n", "export class SerdeContextConfig {\n serdeContext;\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n }\n}\n", "export class UnionSerde {\n from;\n to;\n keys;\n constructor(from, to) {\n this.from = from;\n this.to = to;\n this.keys = new Set(Object.keys(this.from).filter((k) => k !== \"__type\"));\n }\n mark(key) {\n this.keys.delete(key);\n }\n hasUnknown() {\n return this.keys.size === 1 && Object.keys(this.to).length === 0;\n }\n writeUnknown() {\n if (this.hasUnknown()) {\n const k = this.keys.values().next().value;\n const v = this.from[k];\n this.to.$unknown = [k, v];\n }\n }\n}\n", "import { collectBodyString } from \"../common\";\nexport const parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n try {\n return JSON.parse(encoded);\n }\n catch (e) {\n if (e?.name === \"SyntaxError\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: encoded,\n });\n }\n throw e;\n }\n }\n return {};\n});\nexport const parseJsonErrorBody = async (errorBody, context) => {\n const value = await parseJsonBody(errorBody, context);\n value.message = value.message ?? value.Message;\n return value;\n};\nexport const loadRestJsonErrorCode = (output, data) => {\n const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());\n const sanitizeErrorCode = (rawValue) => {\n let cleanValue = rawValue;\n if (typeof cleanValue === \"number\") {\n cleanValue = cleanValue.toString();\n }\n if (cleanValue.indexOf(\",\") >= 0) {\n cleanValue = cleanValue.split(\",\")[0];\n }\n if (cleanValue.indexOf(\":\") >= 0) {\n cleanValue = cleanValue.split(\":\")[0];\n }\n if (cleanValue.indexOf(\"#\") >= 0) {\n cleanValue = cleanValue.split(\"#\")[1];\n }\n return cleanValue;\n };\n const headerKey = findKey(output.headers, \"x-amzn-errortype\");\n if (headerKey !== undefined) {\n return sanitizeErrorCode(output.headers[headerKey]);\n }\n if (data && typeof data === \"object\") {\n const codeKey = findKey(data, \"code\");\n if (codeKey && data[codeKey] !== undefined) {\n return sanitizeErrorCode(data[codeKey]);\n }\n if (data[\"__type\"] !== undefined) {\n return sanitizeErrorCode(data[\"__type\"]);\n }\n }\n};\n", "import { determineTimestampFormat } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { LazyJsonString, NumericValue, parseEpochTimestamp, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, } from \"@smithy/core/serde\";\nimport { fromBase64 } from \"@smithy/util-base64\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { UnionSerde } from \"../UnionSerde\";\nimport { jsonReviver } from \"./jsonReviver\";\nimport { parseJsonBody } from \"./parseJsonBody\";\nexport class JsonShapeDeserializer extends SerdeContextConfig {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n async read(schema, data) {\n return this._read(schema, typeof data === \"string\" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext));\n }\n readObject(schema, data) {\n return this._read(schema, data);\n }\n _read(schema, value) {\n const isObject = value !== null && typeof value === \"object\";\n const ns = NormalizedSchema.of(schema);\n if (isObject) {\n if (ns.isStructSchema()) {\n const record = value;\n const union = ns.isUnionSchema();\n const out = {};\n let nameMap = void 0;\n const { jsonName } = this.settings;\n if (jsonName) {\n nameMap = {};\n }\n let unionSerde;\n if (union) {\n unionSerde = new UnionSerde(record, out);\n }\n for (const [memberName, memberSchema] of ns.structIterator()) {\n let fromKey = memberName;\n if (jsonName) {\n fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;\n nameMap[fromKey] = memberName;\n }\n if (union) {\n unionSerde.mark(fromKey);\n }\n if (record[fromKey] != null) {\n out[memberName] = this._read(memberSchema, record[fromKey]);\n }\n }\n if (union) {\n unionSerde.writeUnknown();\n }\n else if (typeof record.__type === \"string\") {\n for (const [k, v] of Object.entries(record)) {\n const t = jsonName ? nameMap[k] ?? k : k;\n if (!(t in out)) {\n out[t] = v;\n }\n }\n }\n return out;\n }\n if (Array.isArray(value) && ns.isListSchema()) {\n const listMember = ns.getValueSchema();\n const out = [];\n for (const item of value) {\n out.push(this._read(listMember, item));\n }\n return out;\n }\n if (ns.isMapSchema()) {\n const mapMember = ns.getValueSchema();\n const out = {};\n for (const [_k, _v] of Object.entries(value)) {\n out[_k] = this._read(mapMember, _v);\n }\n return out;\n }\n }\n if (ns.isBlobSchema() && typeof value === \"string\") {\n return fromBase64(value);\n }\n const mediaType = ns.getMergedTraits().mediaType;\n if (ns.isStringSchema() && typeof value === \"string\" && mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n return LazyJsonString.from(value);\n }\n return value;\n }\n if (ns.isTimestampSchema() && value != null) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return parseRfc3339DateTimeWithOffset(value);\n case 6:\n return parseRfc7231DateTime(value);\n case 7:\n return parseEpochTimestamp(value);\n default:\n console.warn(\"Missing timestamp format, parsing value with Date constructor:\", value);\n return new Date(value);\n }\n }\n if (ns.isBigIntegerSchema() && (typeof value === \"number\" || typeof value === \"string\")) {\n return BigInt(value);\n }\n if (ns.isBigDecimalSchema() && value != undefined) {\n if (value instanceof NumericValue) {\n return value;\n }\n const untyped = value;\n if (untyped.type === \"bigDecimal\" && \"string\" in untyped) {\n return new NumericValue(untyped.string, untyped.type);\n }\n return new NumericValue(String(value), \"bigDecimal\");\n }\n if (ns.isNumericSchema() && typeof value === \"string\") {\n switch (value) {\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n case \"NaN\":\n return NaN;\n }\n return value;\n }\n if (ns.isDocumentSchema()) {\n if (isObject) {\n const out = Array.isArray(value) ? [] : {};\n for (const [k, v] of Object.entries(value)) {\n if (v instanceof NumericValue) {\n out[k] = v;\n }\n else {\n out[k] = this._read(ns, v);\n }\n }\n return out;\n }\n else {\n return structuredClone(value);\n }\n }\n return value;\n }\n}\n", "import { determineTimestampFormat } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { dateToUtcString, generateIdempotencyToken, LazyJsonString, NumericValue } from \"@smithy/core/serde\";\nimport { toBase64 } from \"@smithy/util-base64\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { JsonReplacer } from \"./jsonReplacer\";\nexport class JsonShapeSerializer extends SerdeContextConfig {\n settings;\n buffer;\n useReplacer = false;\n rootSchema;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value) {\n this.rootSchema = NormalizedSchema.of(schema);\n this.buffer = this._write(this.rootSchema, value);\n }\n writeDiscriminatedDocument(schema, value) {\n this.write(schema, value);\n if (typeof this.buffer === \"object\") {\n this.buffer.__type = NormalizedSchema.of(schema).getName(true);\n }\n }\n flush() {\n const { rootSchema, useReplacer } = this;\n this.rootSchema = undefined;\n this.useReplacer = false;\n if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) {\n if (!useReplacer) {\n return JSON.stringify(this.buffer);\n }\n const replacer = new JsonReplacer();\n return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0));\n }\n return this.buffer;\n }\n _write(schema, value, container) {\n const isObject = value !== null && typeof value === \"object\";\n const ns = NormalizedSchema.of(schema);\n if (isObject) {\n if (ns.isStructSchema()) {\n const record = value;\n const out = {};\n const { jsonName } = this.settings;\n let nameMap = void 0;\n if (jsonName) {\n nameMap = {};\n }\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const serializableValue = this._write(memberSchema, record[memberName], ns);\n if (serializableValue !== undefined) {\n let targetKey = memberName;\n if (jsonName) {\n targetKey = memberSchema.getMergedTraits().jsonName ?? memberName;\n nameMap[memberName] = targetKey;\n }\n out[targetKey] = serializableValue;\n }\n }\n if (ns.isUnionSchema() && Object.keys(out).length === 0) {\n const { $unknown } = record;\n if (Array.isArray($unknown)) {\n const [k, v] = $unknown;\n out[k] = this._write(15, v);\n }\n }\n else if (typeof record.__type === \"string\") {\n for (const [k, v] of Object.entries(record)) {\n const targetKey = jsonName ? nameMap[k] ?? k : k;\n if (!(targetKey in out)) {\n out[targetKey] = this._write(15, v);\n }\n }\n }\n return out;\n }\n if (Array.isArray(value) && ns.isListSchema()) {\n const listMember = ns.getValueSchema();\n const out = [];\n const sparse = !!ns.getMergedTraits().sparse;\n for (const item of value) {\n if (sparse || item != null) {\n out.push(this._write(listMember, item));\n }\n }\n return out;\n }\n if (ns.isMapSchema()) {\n const mapMember = ns.getValueSchema();\n const out = {};\n const sparse = !!ns.getMergedTraits().sparse;\n for (const [_k, _v] of Object.entries(value)) {\n if (sparse || _v != null) {\n out[_k] = this._write(mapMember, _v);\n }\n }\n return out;\n }\n if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) {\n if (ns === this.rootSchema) {\n return value;\n }\n return (this.serdeContext?.base64Encoder ?? toBase64)(value);\n }\n if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return value.toISOString().replace(\".000Z\", \"Z\");\n case 6:\n return dateToUtcString(value);\n case 7:\n return value.getTime() / 1000;\n default:\n console.warn(\"Missing timestamp format, using epoch seconds\", value);\n return value.getTime() / 1000;\n }\n }\n if (value instanceof NumericValue) {\n this.useReplacer = true;\n }\n }\n if (value === null && container?.isStructSchema()) {\n return void 0;\n }\n if (ns.isStringSchema()) {\n if (typeof value === \"undefined\" && ns.isIdempotencyToken()) {\n return generateIdempotencyToken();\n }\n const mediaType = ns.getMergedTraits().mediaType;\n if (value != null && mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n return LazyJsonString.from(value);\n }\n }\n return value;\n }\n if (typeof value === \"number\" && ns.isNumericSchema()) {\n if (Math.abs(value) === Infinity || isNaN(value)) {\n return String(value);\n }\n return value;\n }\n if (typeof value === \"string\" && ns.isBlobSchema()) {\n if (ns === this.rootSchema) {\n return value;\n }\n return (this.serdeContext?.base64Encoder ?? toBase64)(value);\n }\n if (typeof value === \"bigint\") {\n this.useReplacer = true;\n }\n if (ns.isDocumentSchema()) {\n if (isObject) {\n const out = Array.isArray(value) ? [] : {};\n for (const [k, v] of Object.entries(value)) {\n if (v instanceof NumericValue) {\n this.useReplacer = true;\n out[k] = v;\n }\n else {\n out[k] = this._write(ns, v);\n }\n }\n return out;\n }\n else {\n return structuredClone(value);\n }\n }\n return value;\n }\n}\n", "import { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { JsonShapeDeserializer } from \"./JsonShapeDeserializer\";\nimport { JsonShapeSerializer } from \"./JsonShapeSerializer\";\nexport class JsonCodec extends SerdeContextConfig {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n createSerializer() {\n const serializer = new JsonShapeSerializer(this.settings);\n serializer.setSerdeContext(this.serdeContext);\n return serializer;\n }\n createDeserializer() {\n const deserializer = new JsonShapeDeserializer(this.settings);\n deserializer.setSerdeContext(this.serdeContext);\n return deserializer;\n }\n}\n", "import { RpcProtocol } from \"@smithy/core/protocols\";\nimport { deref, NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { JsonCodec } from \"./JsonCodec\";\nimport { loadRestJsonErrorCode } from \"./parseJsonBody\";\nexport class AwsJsonRpcProtocol extends RpcProtocol {\n serializer;\n deserializer;\n serviceTarget;\n codec;\n mixin;\n awsQueryCompatible;\n constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {\n super({\n defaultNamespace,\n });\n this.serviceTarget = serviceTarget;\n this.codec =\n jsonCodec ??\n new JsonCodec({\n timestampFormat: {\n useTrait: true,\n default: 7,\n },\n jsonName: false,\n });\n this.serializer = this.codec.createSerializer();\n this.deserializer = this.codec.createDeserializer();\n this.awsQueryCompatible = !!awsQueryCompatible;\n this.mixin = new ProtocolLib(this.awsQueryCompatible);\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n if (!request.path.endsWith(\"/\")) {\n request.path += \"/\";\n }\n Object.assign(request.headers, {\n \"content-type\": `application/x-amz-json-${this.getJsonRpcVersion()}`,\n \"x-amz-target\": `${this.serviceTarget}.${operationSchema.name}`,\n });\n if (this.awsQueryCompatible) {\n request.headers[\"x-amzn-query-mode\"] = \"true\";\n }\n if (deref(operationSchema.input) === \"unit\" || !request.body) {\n request.body = \"{}\";\n }\n return request;\n }\n getPayloadCodec() {\n return this.codec;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n if (this.awsQueryCompatible) {\n this.mixin.setQueryCompatError(dataObject, response);\n }\n const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? \"Unknown\";\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);\n const ns = NormalizedSchema.of(errorSchema);\n const message = dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor(message);\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n if (dataObject[name] != null) {\n output[name] = this.codec.createDeserializer().readObject(member, dataObject[name]);\n }\n }\n if (this.awsQueryCompatible) {\n this.mixin.queryCompatOutput(dataObject, output);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n}\n", "import { AwsJsonRpcProtocol } from \"./AwsJsonRpcProtocol\";\nexport class AwsJson1_0Protocol extends AwsJsonRpcProtocol {\n constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {\n super({\n defaultNamespace,\n serviceTarget,\n awsQueryCompatible,\n jsonCodec,\n });\n }\n getShapeId() {\n return \"aws.protocols#awsJson1_0\";\n }\n getJsonRpcVersion() {\n return \"1.0\";\n }\n getDefaultContentType() {\n return \"application/x-amz-json-1.0\";\n }\n}\n", "import { AwsJsonRpcProtocol } from \"./AwsJsonRpcProtocol\";\nexport class AwsJson1_1Protocol extends AwsJsonRpcProtocol {\n constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {\n super({\n defaultNamespace,\n serviceTarget,\n awsQueryCompatible,\n jsonCodec,\n });\n }\n getShapeId() {\n return \"aws.protocols#awsJson1_1\";\n }\n getJsonRpcVersion() {\n return \"1.1\";\n }\n getDefaultContentType() {\n return \"application/x-amz-json-1.1\";\n }\n}\n", "import { HttpBindingProtocol, HttpInterceptingShapeDeserializer, HttpInterceptingShapeSerializer, } from \"@smithy/core/protocols\";\nimport { NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { JsonCodec } from \"./JsonCodec\";\nimport { loadRestJsonErrorCode } from \"./parseJsonBody\";\nexport class AwsRestJsonProtocol extends HttpBindingProtocol {\n serializer;\n deserializer;\n codec;\n mixin = new ProtocolLib();\n constructor({ defaultNamespace }) {\n super({\n defaultNamespace,\n });\n const settings = {\n timestampFormat: {\n useTrait: true,\n default: 7,\n },\n httpBindings: true,\n jsonName: true,\n };\n this.codec = new JsonCodec(settings);\n this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);\n this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);\n }\n getShapeId() {\n return \"aws.protocols#restJson1\";\n }\n getPayloadCodec() {\n return this.codec;\n }\n setSerdeContext(serdeContext) {\n this.codec.setSerdeContext(serdeContext);\n super.setSerdeContext(serdeContext);\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n const inputSchema = NormalizedSchema.of(operationSchema.input);\n if (!request.headers[\"content-type\"]) {\n const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);\n if (contentType) {\n request.headers[\"content-type\"] = contentType;\n }\n }\n if (request.body == null && request.headers[\"content-type\"] === this.getDefaultContentType()) {\n request.body = \"{}\";\n }\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const output = await super.deserializeResponse(operationSchema, context, response);\n const outputSchema = NormalizedSchema.of(operationSchema.output);\n for (const [name, member] of outputSchema.structIterator()) {\n if (member.getMemberTraits().httpPayload && !(name in output)) {\n output[name] = null;\n }\n }\n return output;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? \"Unknown\";\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);\n const ns = NormalizedSchema.of(errorSchema);\n const message = dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor(message);\n await this.deserializeHttpMessage(errorSchema, context, response, dataObject);\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n const target = member.getMergedTraits().jsonName ?? name;\n output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n getDefaultContentType() {\n return \"application/json\";\n }\n}\n", "import { expectUnion } from \"@smithy/smithy-client\";\nexport const awsExpectUnion = (value) => {\n if (value == null) {\n return undefined;\n }\n if (typeof value === \"object\" && \"__type\" in value) {\n delete value.__type;\n }\n return expectUnion(value);\n};\n", "export function escapeAttribute(value) {\n return value.replace(/&/g, \"&\").replace(//g, \">\").replace(/\"/g, \""\");\n}\n", "export function escapeElement(value) {\n return value\n .replace(/&/g, \"&\")\n .replace(/\"/g, \""\")\n .replace(/'/g, \"'\")\n .replace(//g, \">\")\n .replace(/\\r/g, \" \")\n .replace(/\\n/g, \" \")\n .replace(/\\u0085/g, \"…\")\n .replace(/\\u2028/, \"
\");\n}\n", "import { escapeElement } from \"./escape-element\";\nexport class XmlText {\n value;\n constructor(value) {\n this.value = value;\n }\n toString() {\n return escapeElement(\"\" + this.value);\n }\n}\n", "import { escapeAttribute } from \"./escape-attribute\";\nimport { XmlText } from \"./XmlText\";\nexport class XmlNode {\n name;\n children;\n attributes = {};\n static of(name, childText, withName) {\n const node = new XmlNode(name);\n if (childText !== undefined) {\n node.addChildNode(new XmlText(childText));\n }\n if (withName !== undefined) {\n node.withName(withName);\n }\n return node;\n }\n constructor(name, children = []) {\n this.name = name;\n this.children = children;\n }\n withName(name) {\n this.name = name;\n return this;\n }\n addAttribute(name, value) {\n this.attributes[name] = value;\n return this;\n }\n addChildNode(child) {\n this.children.push(child);\n return this;\n }\n removeAttribute(name) {\n delete this.attributes[name];\n return this;\n }\n n(name) {\n this.name = name;\n return this;\n }\n c(child) {\n this.children.push(child);\n return this;\n }\n a(name, value) {\n if (value != null) {\n this.attributes[name] = value;\n }\n return this;\n }\n cc(input, field, withName = field) {\n if (input[field] != null) {\n const node = XmlNode.of(field, input[field]).withName(withName);\n this.c(node);\n }\n }\n l(input, listName, memberName, valueProvider) {\n if (input[listName] != null) {\n const nodes = valueProvider();\n nodes.map((node) => {\n node.withName(memberName);\n this.c(node);\n });\n }\n }\n lc(input, listName, memberName, valueProvider) {\n if (input[listName] != null) {\n const nodes = valueProvider();\n const containerNode = new XmlNode(memberName);\n nodes.map((node) => {\n containerNode.c(node);\n });\n this.c(containerNode);\n }\n }\n toString() {\n const hasChildren = Boolean(this.children.length);\n let xmlText = `<${this.name}`;\n const attributes = this.attributes;\n for (const attributeName of Object.keys(attributes)) {\n const attribute = attributes[attributeName];\n if (attribute != null) {\n xmlText += ` ${attributeName}=\"${escapeAttribute(\"\" + attribute)}\"`;\n }\n }\n return (xmlText += !hasChildren ? \"/>\" : `>${this.children.map((c) => c.toString()).join(\"\")}`);\n }\n}\n", "let parser;\nexport function parseXML(xmlString) {\n if (!parser) {\n parser = new DOMParser();\n }\n const xmlDocument = parser.parseFromString(xmlString, \"application/xml\");\n if (xmlDocument.getElementsByTagName(\"parsererror\").length > 0) {\n throw new Error(\"DOMParser XML parsing error.\");\n }\n const xmlToObj = (node) => {\n if (node.nodeType === Node.TEXT_NODE) {\n if (node.textContent?.trim()) {\n return node.textContent;\n }\n }\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node;\n if (element.attributes.length === 0 && element.childNodes.length === 0) {\n return \"\";\n }\n const obj = {};\n const attributes = Array.from(element.attributes);\n for (const attr of attributes) {\n obj[`${attr.name}`] = attr.value;\n }\n const childNodes = Array.from(element.childNodes);\n for (const child of childNodes) {\n const childResult = xmlToObj(child);\n if (childResult != null) {\n const childName = child.nodeName;\n if (childNodes.length === 1 && attributes.length === 0 && childName === \"#text\") {\n return childResult;\n }\n if (obj[childName]) {\n if (Array.isArray(obj[childName])) {\n obj[childName].push(childResult);\n }\n else {\n obj[childName] = [obj[childName], childResult];\n }\n }\n else {\n obj[childName] = childResult;\n }\n }\n else if (childNodes.length === 1 && attributes.length === 0) {\n return element.textContent;\n }\n }\n return obj;\n }\n return null;\n };\n return {\n [xmlDocument.documentElement.nodeName]: xmlToObj(xmlDocument.documentElement),\n };\n}\n", "export * from \"./XmlNode\";\nexport * from \"./XmlText\";\nexport { parseXML } from \"./xml-parser\";\n", "import { parseXML } from \"@aws-sdk/xml-builder\";\nimport { FromStringShapeDeserializer } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { getValueFromTextNode } from \"@smithy/smithy-client\";\nimport { toUtf8 } from \"@smithy/util-utf8\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { UnionSerde } from \"../UnionSerde\";\nexport class XmlShapeDeserializer extends SerdeContextConfig {\n settings;\n stringDeserializer;\n constructor(settings) {\n super();\n this.settings = settings;\n this.stringDeserializer = new FromStringShapeDeserializer(settings);\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n this.stringDeserializer.setSerdeContext(serdeContext);\n }\n read(schema, bytes, key) {\n const ns = NormalizedSchema.of(schema);\n const memberSchemas = ns.getMemberSchemas();\n const isEventPayload = ns.isStructSchema() &&\n ns.isMemberSchema() &&\n !!Object.values(memberSchemas).find((memberNs) => {\n return !!memberNs.getMemberTraits().eventPayload;\n });\n if (isEventPayload) {\n const output = {};\n const memberName = Object.keys(memberSchemas)[0];\n const eventMemberSchema = memberSchemas[memberName];\n if (eventMemberSchema.isBlobSchema()) {\n output[memberName] = bytes;\n }\n else {\n output[memberName] = this.read(memberSchemas[memberName], bytes);\n }\n return output;\n }\n const xmlString = (this.serdeContext?.utf8Encoder ?? toUtf8)(bytes);\n const parsedObject = this.parseXml(xmlString);\n return this.readSchema(schema, key ? parsedObject[key] : parsedObject);\n }\n readSchema(_schema, value) {\n const ns = NormalizedSchema.of(_schema);\n if (ns.isUnitSchema()) {\n return;\n }\n const traits = ns.getMergedTraits();\n if (ns.isListSchema() && !Array.isArray(value)) {\n return this.readSchema(ns, [value]);\n }\n if (value == null) {\n return value;\n }\n if (typeof value === \"object\") {\n const flat = !!traits.xmlFlattened;\n if (ns.isListSchema()) {\n const listValue = ns.getValueSchema();\n const buffer = [];\n const sourceKey = listValue.getMergedTraits().xmlName ?? \"member\";\n const source = flat ? value : (value[0] ?? value)[sourceKey];\n if (source == null) {\n return buffer;\n }\n const sourceArray = Array.isArray(source) ? source : [source];\n for (const v of sourceArray) {\n buffer.push(this.readSchema(listValue, v));\n }\n return buffer;\n }\n const buffer = {};\n if (ns.isMapSchema()) {\n const keyNs = ns.getKeySchema();\n const memberNs = ns.getValueSchema();\n let entries;\n if (flat) {\n entries = Array.isArray(value) ? value : [value];\n }\n else {\n entries = Array.isArray(value.entry) ? value.entry : [value.entry];\n }\n const keyProperty = keyNs.getMergedTraits().xmlName ?? \"key\";\n const valueProperty = memberNs.getMergedTraits().xmlName ?? \"value\";\n for (const entry of entries) {\n const key = entry[keyProperty];\n const value = entry[valueProperty];\n buffer[key] = this.readSchema(memberNs, value);\n }\n return buffer;\n }\n if (ns.isStructSchema()) {\n const union = ns.isUnionSchema();\n let unionSerde;\n if (union) {\n unionSerde = new UnionSerde(value, buffer);\n }\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const memberTraits = memberSchema.getMergedTraits();\n const xmlObjectKey = !memberTraits.httpPayload\n ? memberSchema.getMemberTraits().xmlName ?? memberName\n : memberTraits.xmlName ?? memberSchema.getName();\n if (union) {\n unionSerde.mark(xmlObjectKey);\n }\n if (value[xmlObjectKey] != null) {\n buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]);\n }\n }\n if (union) {\n unionSerde.writeUnknown();\n }\n return buffer;\n }\n if (ns.isDocumentSchema()) {\n return value;\n }\n throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`);\n }\n if (ns.isListSchema()) {\n return [];\n }\n if (ns.isMapSchema() || ns.isStructSchema()) {\n return {};\n }\n return this.stringDeserializer.read(ns, value);\n }\n parseXml(xml) {\n if (xml.length) {\n let parsedObj;\n try {\n parsedObj = parseXML(xml);\n }\n catch (e) {\n if (e && typeof e === \"object\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: xml,\n });\n }\n throw e;\n }\n const textNodeName = \"#text\";\n const key = Object.keys(parsedObj)[0];\n const parsedObjToReturn = parsedObj[key];\n if (parsedObjToReturn[textNodeName]) {\n parsedObjToReturn[key] = parsedObjToReturn[textNodeName];\n delete parsedObjToReturn[textNodeName];\n }\n return getValueFromTextNode(parsedObjToReturn);\n }\n return {};\n }\n}\n", "import { determineTimestampFormat, extendedEncodeURIComponent } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { generateIdempotencyToken, NumericValue } from \"@smithy/core/serde\";\nimport { dateToUtcString } from \"@smithy/smithy-client\";\nimport { toBase64 } from \"@smithy/util-base64\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nexport class QueryShapeSerializer extends SerdeContextConfig {\n settings;\n buffer;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value, prefix = \"\") {\n if (this.buffer === undefined) {\n this.buffer = \"\";\n }\n const ns = NormalizedSchema.of(schema);\n if (prefix && !prefix.endsWith(\".\")) {\n prefix += \".\";\n }\n if (ns.isBlobSchema()) {\n if (typeof value === \"string\" || value instanceof Uint8Array) {\n this.writeKey(prefix);\n this.writeValue((this.serdeContext?.base64Encoder ?? toBase64)(value));\n }\n }\n else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) {\n if (value != null) {\n this.writeKey(prefix);\n this.writeValue(String(value));\n }\n else if (ns.isIdempotencyToken()) {\n this.writeKey(prefix);\n this.writeValue(generateIdempotencyToken());\n }\n }\n else if (ns.isBigIntegerSchema()) {\n if (value != null) {\n this.writeKey(prefix);\n this.writeValue(String(value));\n }\n }\n else if (ns.isBigDecimalSchema()) {\n if (value != null) {\n this.writeKey(prefix);\n this.writeValue(value instanceof NumericValue ? value.string : String(value));\n }\n }\n else if (ns.isTimestampSchema()) {\n if (value instanceof Date) {\n this.writeKey(prefix);\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n this.writeValue(value.toISOString().replace(\".000Z\", \"Z\"));\n break;\n case 6:\n this.writeValue(dateToUtcString(value));\n break;\n case 7:\n this.writeValue(String(value.getTime() / 1000));\n break;\n }\n }\n }\n else if (ns.isDocumentSchema()) {\n if (Array.isArray(value)) {\n this.write(64 | 15, value, prefix);\n }\n else if (value instanceof Date) {\n this.write(4, value, prefix);\n }\n else if (value instanceof Uint8Array) {\n this.write(21, value, prefix);\n }\n else if (value && typeof value === \"object\") {\n this.write(128 | 15, value, prefix);\n }\n else {\n this.writeKey(prefix);\n this.writeValue(String(value));\n }\n }\n else if (ns.isListSchema()) {\n if (Array.isArray(value)) {\n if (value.length === 0) {\n if (this.settings.serializeEmptyLists) {\n this.writeKey(prefix);\n this.writeValue(\"\");\n }\n }\n else {\n const member = ns.getValueSchema();\n const flat = this.settings.flattenLists || ns.getMergedTraits().xmlFlattened;\n let i = 1;\n for (const item of value) {\n if (item == null) {\n continue;\n }\n const traits = member.getMergedTraits();\n const suffix = this.getKey(\"member\", traits.xmlName, traits.ec2QueryName);\n const key = flat ? `${prefix}${i}` : `${prefix}${suffix}.${i}`;\n this.write(member, item, key);\n ++i;\n }\n }\n }\n }\n else if (ns.isMapSchema()) {\n if (value && typeof value === \"object\") {\n const keySchema = ns.getKeySchema();\n const memberSchema = ns.getValueSchema();\n const flat = ns.getMergedTraits().xmlFlattened;\n let i = 1;\n for (const [k, v] of Object.entries(value)) {\n if (v == null) {\n continue;\n }\n const keyTraits = keySchema.getMergedTraits();\n const keySuffix = this.getKey(\"key\", keyTraits.xmlName, keyTraits.ec2QueryName);\n const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`;\n const valTraits = memberSchema.getMergedTraits();\n const valueSuffix = this.getKey(\"value\", valTraits.xmlName, valTraits.ec2QueryName);\n const valueKey = flat ? `${prefix}${i}.${valueSuffix}` : `${prefix}entry.${i}.${valueSuffix}`;\n this.write(keySchema, k, key);\n this.write(memberSchema, v, valueKey);\n ++i;\n }\n }\n }\n else if (ns.isStructSchema()) {\n if (value && typeof value === \"object\") {\n let didWriteMember = false;\n for (const [memberName, member] of ns.structIterator()) {\n if (value[memberName] == null && !member.isIdempotencyToken()) {\n continue;\n }\n const traits = member.getMergedTraits();\n const suffix = this.getKey(memberName, traits.xmlName, traits.ec2QueryName, \"struct\");\n const key = `${prefix}${suffix}`;\n this.write(member, value[memberName], key);\n didWriteMember = true;\n }\n if (!didWriteMember && ns.isUnionSchema()) {\n const { $unknown } = value;\n if (Array.isArray($unknown)) {\n const [k, v] = $unknown;\n const key = `${prefix}${k}`;\n this.write(15, v, key);\n }\n }\n }\n }\n else if (ns.isUnitSchema()) {\n }\n else {\n throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`);\n }\n }\n flush() {\n if (this.buffer === undefined) {\n throw new Error(\"@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.\");\n }\n const str = this.buffer;\n delete this.buffer;\n return str;\n }\n getKey(memberName, xmlName, ec2QueryName, keySource) {\n const { ec2, capitalizeKeys } = this.settings;\n if (ec2 && ec2QueryName) {\n return ec2QueryName;\n }\n const key = xmlName ?? memberName;\n if (capitalizeKeys && keySource === \"struct\") {\n return key[0].toUpperCase() + key.slice(1);\n }\n return key;\n }\n writeKey(key) {\n if (key.endsWith(\".\")) {\n key = key.slice(0, key.length - 1);\n }\n this.buffer += `&${extendedEncodeURIComponent(key)}=`;\n }\n writeValue(value) {\n this.buffer += extendedEncodeURIComponent(value);\n }\n}\n", "import { collectBody, RpcProtocol } from \"@smithy/core/protocols\";\nimport { deref, NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { XmlShapeDeserializer } from \"../xml/XmlShapeDeserializer\";\nimport { QueryShapeSerializer } from \"./QueryShapeSerializer\";\nexport class AwsQueryProtocol extends RpcProtocol {\n options;\n serializer;\n deserializer;\n mixin = new ProtocolLib();\n constructor(options) {\n super({\n defaultNamespace: options.defaultNamespace,\n });\n this.options = options;\n const settings = {\n timestampFormat: {\n useTrait: true,\n default: 5,\n },\n httpBindings: false,\n xmlNamespace: options.xmlNamespace,\n serviceNamespace: options.defaultNamespace,\n serializeEmptyLists: true,\n };\n this.serializer = new QueryShapeSerializer(settings);\n this.deserializer = new XmlShapeDeserializer(settings);\n }\n getShapeId() {\n return \"aws.protocols#awsQuery\";\n }\n setSerdeContext(serdeContext) {\n this.serializer.setSerdeContext(serdeContext);\n this.deserializer.setSerdeContext(serdeContext);\n }\n getPayloadCodec() {\n throw new Error(\"AWSQuery protocol has no payload codec.\");\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n if (!request.path.endsWith(\"/\")) {\n request.path += \"/\";\n }\n Object.assign(request.headers, {\n \"content-type\": `application/x-www-form-urlencoded`,\n });\n if (deref(operationSchema.input) === \"unit\" || !request.body) {\n request.body = \"\";\n }\n const action = operationSchema.name.split(\"#\")[1] ?? operationSchema.name;\n request.body = `Action=${action}&Version=${this.options.version}` + request.body;\n if (request.body.endsWith(\"&\")) {\n request.body = request.body.slice(-1);\n }\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const shortName = operationSchema.name.split(\"#\")[1] ?? operationSchema.name;\n const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + \"Result\" : undefined;\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));\n }\n const output = {\n $metadata: this.deserializeMetadata(response),\n ...dataObject,\n };\n return output;\n }\n useNestedResult() {\n return true;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? \"Unknown\";\n const errorData = this.loadQueryError(dataObject) ?? {};\n const message = this.loadQueryErrorMessage(dataObject);\n errorData.message = message;\n errorData.Error = {\n Type: errorData.Type,\n Code: errorData.Code,\n Message: message,\n };\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, this.mixin.findQueryCompatibleError);\n const ns = NormalizedSchema.of(errorSchema);\n const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor(message);\n const output = {\n Type: errorData.Error.Type,\n Code: errorData.Error.Code,\n Error: errorData.Error,\n };\n for (const [name, member] of ns.structIterator()) {\n const target = member.getMergedTraits().xmlName ?? name;\n const value = errorData[target] ?? dataObject[target];\n output[name] = this.deserializer.readSchema(member, value);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n loadQueryErrorCode(output, data) {\n const code = (data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error)?.Code;\n if (code !== undefined) {\n return code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n }\n loadQueryError(data) {\n return data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error;\n }\n loadQueryErrorMessage(data) {\n const errorData = this.loadQueryError(data);\n return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? \"Unknown\";\n }\n getDefaultContentType() {\n return \"application/x-www-form-urlencoded\";\n }\n}\n", "import { AwsQueryProtocol } from \"./AwsQueryProtocol\";\nexport class AwsEc2QueryProtocol extends AwsQueryProtocol {\n options;\n constructor(options) {\n super(options);\n this.options = options;\n const ec2Settings = {\n capitalizeKeys: true,\n flattenLists: true,\n serializeEmptyLists: false,\n ec2: true,\n };\n Object.assign(this.serializer.settings, ec2Settings);\n }\n getShapeId() {\n return \"aws.protocols#ec2Query\";\n }\n useNestedResult() {\n return false;\n }\n}\n", "export {};\n", "import { parseXML } from \"@aws-sdk/xml-builder\";\nimport { getValueFromTextNode } from \"@smithy/smithy-client\";\nimport { collectBodyString } from \"../common\";\nexport const parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n let parsedObj;\n try {\n parsedObj = parseXML(encoded);\n }\n catch (e) {\n if (e && typeof e === \"object\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: encoded,\n });\n }\n throw e;\n }\n const textNodeName = \"#text\";\n const key = Object.keys(parsedObj)[0];\n const parsedObjToReturn = parsedObj[key];\n if (parsedObjToReturn[textNodeName]) {\n parsedObjToReturn[key] = parsedObjToReturn[textNodeName];\n delete parsedObjToReturn[textNodeName];\n }\n return getValueFromTextNode(parsedObjToReturn);\n }\n return {};\n});\nexport const parseXmlErrorBody = async (errorBody, context) => {\n const value = await parseXmlBody(errorBody, context);\n if (value.Error) {\n value.Error.message = value.Error.message ?? value.Error.Message;\n }\n return value;\n};\nexport const loadRestXmlErrorCode = (output, data) => {\n if (data?.Error?.Code !== undefined) {\n return data.Error.Code;\n }\n if (data?.Code !== undefined) {\n return data.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n};\n", "import { XmlNode, XmlText } from \"@aws-sdk/xml-builder\";\nimport { determineTimestampFormat } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { generateIdempotencyToken, NumericValue } from \"@smithy/core/serde\";\nimport { dateToUtcString } from \"@smithy/smithy-client\";\nimport { fromBase64, toBase64 } from \"@smithy/util-base64\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nexport class XmlShapeSerializer extends SerdeContextConfig {\n settings;\n stringBuffer;\n byteBuffer;\n buffer;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value) {\n const ns = NormalizedSchema.of(schema);\n if (ns.isStringSchema() && typeof value === \"string\") {\n this.stringBuffer = value;\n }\n else if (ns.isBlobSchema()) {\n this.byteBuffer =\n \"byteLength\" in value\n ? value\n : (this.serdeContext?.base64Decoder ?? fromBase64)(value);\n }\n else {\n this.buffer = this.writeStruct(ns, value, undefined);\n const traits = ns.getMergedTraits();\n if (traits.httpPayload && !traits.xmlName) {\n this.buffer.withName(ns.getName());\n }\n }\n }\n flush() {\n if (this.byteBuffer !== undefined) {\n const bytes = this.byteBuffer;\n delete this.byteBuffer;\n return bytes;\n }\n if (this.stringBuffer !== undefined) {\n const str = this.stringBuffer;\n delete this.stringBuffer;\n return str;\n }\n const buffer = this.buffer;\n if (this.settings.xmlNamespace) {\n if (!buffer?.attributes?.[\"xmlns\"]) {\n buffer.addAttribute(\"xmlns\", this.settings.xmlNamespace);\n }\n }\n delete this.buffer;\n return buffer.toString();\n }\n writeStruct(ns, value, parentXmlns) {\n const traits = ns.getMergedTraits();\n const name = ns.isMemberSchema() && !traits.httpPayload\n ? ns.getMemberTraits().xmlName ?? ns.getMemberName()\n : traits.xmlName ?? ns.getName();\n if (!name || !ns.isStructSchema()) {\n throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${ns.getName(true)}.`);\n }\n const structXmlNode = XmlNode.of(name);\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const val = value[memberName];\n if (val != null || memberSchema.isIdempotencyToken()) {\n if (memberSchema.getMergedTraits().xmlAttribute) {\n structXmlNode.addAttribute(memberSchema.getMergedTraits().xmlName ?? memberName, this.writeSimple(memberSchema, val));\n continue;\n }\n if (memberSchema.isListSchema()) {\n this.writeList(memberSchema, val, structXmlNode, xmlns);\n }\n else if (memberSchema.isMapSchema()) {\n this.writeMap(memberSchema, val, structXmlNode, xmlns);\n }\n else if (memberSchema.isStructSchema()) {\n structXmlNode.addChildNode(this.writeStruct(memberSchema, val, xmlns));\n }\n else {\n const memberNode = XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName());\n this.writeSimpleInto(memberSchema, val, memberNode, xmlns);\n structXmlNode.addChildNode(memberNode);\n }\n }\n }\n const { $unknown } = value;\n if ($unknown && ns.isUnionSchema() && Array.isArray($unknown) && Object.keys(value).length === 1) {\n const [k, v] = $unknown;\n const node = XmlNode.of(k);\n if (typeof v !== \"string\") {\n if (value instanceof XmlNode || value instanceof XmlText) {\n structXmlNode.addChildNode(value);\n }\n else {\n throw new Error(`@aws-sdk - $unknown union member in XML requires ` +\n `value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`);\n }\n }\n this.writeSimpleInto(0, v, node, xmlns);\n structXmlNode.addChildNode(node);\n }\n if (xmlns) {\n structXmlNode.addAttribute(xmlnsAttr, xmlns);\n }\n return structXmlNode;\n }\n writeList(listMember, array, container, parentXmlns) {\n if (!listMember.isMemberSchema()) {\n throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${listMember.getName(true)}`);\n }\n const listTraits = listMember.getMergedTraits();\n const listValueSchema = listMember.getValueSchema();\n const listValueTraits = listValueSchema.getMergedTraits();\n const sparse = !!listValueTraits.sparse;\n const flat = !!listTraits.xmlFlattened;\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(listMember, parentXmlns);\n const writeItem = (container, value) => {\n if (listValueSchema.isListSchema()) {\n this.writeList(listValueSchema, Array.isArray(value) ? value : [value], container, xmlns);\n }\n else if (listValueSchema.isMapSchema()) {\n this.writeMap(listValueSchema, value, container, xmlns);\n }\n else if (listValueSchema.isStructSchema()) {\n const struct = this.writeStruct(listValueSchema, value, xmlns);\n container.addChildNode(struct.withName(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? \"member\"));\n }\n else {\n const listItemNode = XmlNode.of(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? \"member\");\n this.writeSimpleInto(listValueSchema, value, listItemNode, xmlns);\n container.addChildNode(listItemNode);\n }\n };\n if (flat) {\n for (const value of array) {\n if (sparse || value != null) {\n writeItem(container, value);\n }\n }\n }\n else {\n const listNode = XmlNode.of(listTraits.xmlName ?? listMember.getMemberName());\n if (xmlns) {\n listNode.addAttribute(xmlnsAttr, xmlns);\n }\n for (const value of array) {\n if (sparse || value != null) {\n writeItem(listNode, value);\n }\n }\n container.addChildNode(listNode);\n }\n }\n writeMap(mapMember, map, container, parentXmlns, containerIsMap = false) {\n if (!mapMember.isMemberSchema()) {\n throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}`);\n }\n const mapTraits = mapMember.getMergedTraits();\n const mapKeySchema = mapMember.getKeySchema();\n const mapKeyTraits = mapKeySchema.getMergedTraits();\n const keyTag = mapKeyTraits.xmlName ?? \"key\";\n const mapValueSchema = mapMember.getValueSchema();\n const mapValueTraits = mapValueSchema.getMergedTraits();\n const valueTag = mapValueTraits.xmlName ?? \"value\";\n const sparse = !!mapValueTraits.sparse;\n const flat = !!mapTraits.xmlFlattened;\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(mapMember, parentXmlns);\n const addKeyValue = (entry, key, val) => {\n const keyNode = XmlNode.of(keyTag, key);\n const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns);\n if (keyXmlns) {\n keyNode.addAttribute(keyXmlnsAttr, keyXmlns);\n }\n entry.addChildNode(keyNode);\n let valueNode = XmlNode.of(valueTag);\n if (mapValueSchema.isListSchema()) {\n this.writeList(mapValueSchema, val, valueNode, xmlns);\n }\n else if (mapValueSchema.isMapSchema()) {\n this.writeMap(mapValueSchema, val, valueNode, xmlns, true);\n }\n else if (mapValueSchema.isStructSchema()) {\n valueNode = this.writeStruct(mapValueSchema, val, xmlns);\n }\n else {\n this.writeSimpleInto(mapValueSchema, val, valueNode, xmlns);\n }\n entry.addChildNode(valueNode);\n };\n if (flat) {\n for (const [key, val] of Object.entries(map)) {\n if (sparse || val != null) {\n const entry = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());\n addKeyValue(entry, key, val);\n container.addChildNode(entry);\n }\n }\n }\n else {\n let mapNode;\n if (!containerIsMap) {\n mapNode = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());\n if (xmlns) {\n mapNode.addAttribute(xmlnsAttr, xmlns);\n }\n container.addChildNode(mapNode);\n }\n for (const [key, val] of Object.entries(map)) {\n if (sparse || val != null) {\n const entry = XmlNode.of(\"entry\");\n addKeyValue(entry, key, val);\n (containerIsMap ? container : mapNode).addChildNode(entry);\n }\n }\n }\n }\n writeSimple(_schema, value) {\n if (null === value) {\n throw new Error(\"@aws-sdk/core/protocols - (XML serializer) cannot write null value.\");\n }\n const ns = NormalizedSchema.of(_schema);\n let nodeContents = null;\n if (value && typeof value === \"object\") {\n if (ns.isBlobSchema()) {\n nodeContents = (this.serdeContext?.base64Encoder ?? toBase64)(value);\n }\n else if (ns.isTimestampSchema() && value instanceof Date) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n nodeContents = value.toISOString().replace(\".000Z\", \"Z\");\n break;\n case 6:\n nodeContents = dateToUtcString(value);\n break;\n case 7:\n nodeContents = String(value.getTime() / 1000);\n break;\n default:\n console.warn(\"Missing timestamp format, using http date\", value);\n nodeContents = dateToUtcString(value);\n break;\n }\n }\n else if (ns.isBigDecimalSchema() && value) {\n if (value instanceof NumericValue) {\n return value.string;\n }\n return String(value);\n }\n else if (ns.isMapSchema() || ns.isListSchema()) {\n throw new Error(\"@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead.\");\n }\n else {\n throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${ns.getName(true)}`);\n }\n }\n if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {\n nodeContents = String(value);\n }\n if (ns.isStringSchema()) {\n if (value === undefined && ns.isIdempotencyToken()) {\n nodeContents = generateIdempotencyToken();\n }\n else {\n nodeContents = String(value);\n }\n }\n if (nodeContents === null) {\n throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`);\n }\n return nodeContents;\n }\n writeSimpleInto(_schema, value, into, parentXmlns) {\n const nodeContents = this.writeSimple(_schema, value);\n const ns = NormalizedSchema.of(_schema);\n const content = new XmlText(nodeContents);\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);\n if (xmlns) {\n into.addAttribute(xmlnsAttr, xmlns);\n }\n into.addChildNode(content);\n }\n getXmlnsAttribute(ns, parentXmlns) {\n const traits = ns.getMergedTraits();\n const [prefix, xmlns] = traits.xmlNamespace ?? [];\n if (xmlns && xmlns !== parentXmlns) {\n return [prefix ? `xmlns:${prefix}` : \"xmlns\", xmlns];\n }\n return [void 0, void 0];\n }\n}\n", "import { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { XmlShapeDeserializer } from \"./XmlShapeDeserializer\";\nimport { XmlShapeSerializer } from \"./XmlShapeSerializer\";\nexport class XmlCodec extends SerdeContextConfig {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n createSerializer() {\n const serializer = new XmlShapeSerializer(this.settings);\n serializer.setSerdeContext(this.serdeContext);\n return serializer;\n }\n createDeserializer() {\n const deserializer = new XmlShapeDeserializer(this.settings);\n deserializer.setSerdeContext(this.serdeContext);\n return deserializer;\n }\n}\n", "import { HttpBindingProtocol, HttpInterceptingShapeDeserializer, HttpInterceptingShapeSerializer, } from \"@smithy/core/protocols\";\nimport { NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { loadRestXmlErrorCode } from \"./parseXmlBody\";\nimport { XmlCodec } from \"./XmlCodec\";\nexport class AwsRestXmlProtocol extends HttpBindingProtocol {\n codec;\n serializer;\n deserializer;\n mixin = new ProtocolLib();\n constructor(options) {\n super(options);\n const settings = {\n timestampFormat: {\n useTrait: true,\n default: 5,\n },\n httpBindings: true,\n xmlNamespace: options.xmlNamespace,\n serviceNamespace: options.defaultNamespace,\n };\n this.codec = new XmlCodec(settings);\n this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);\n this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);\n }\n getPayloadCodec() {\n return this.codec;\n }\n getShapeId() {\n return \"aws.protocols#restXml\";\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n const inputSchema = NormalizedSchema.of(operationSchema.input);\n if (!request.headers[\"content-type\"]) {\n const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);\n if (contentType) {\n request.headers[\"content-type\"] = contentType;\n }\n }\n if (typeof request.body === \"string\" &&\n request.headers[\"content-type\"] === this.getDefaultContentType() &&\n !request.body.startsWith(\"' + request.body;\n }\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n return super.deserializeResponse(operationSchema, context, response);\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? \"Unknown\";\n if (dataObject.Error && typeof dataObject.Error === \"object\") {\n for (const key of Object.keys(dataObject.Error)) {\n dataObject[key] = dataObject.Error[key];\n if (key.toLowerCase() === \"message\") {\n dataObject.message = dataObject.Error[key];\n }\n }\n }\n if (dataObject.RequestId && !metadata.requestId) {\n metadata.requestId = dataObject.RequestId;\n }\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);\n const ns = NormalizedSchema.of(errorSchema);\n const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor(message);\n await this.deserializeHttpMessage(errorSchema, context, response, dataObject);\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n const target = member.getMergedTraits().xmlName ?? name;\n const value = dataObject.Error?.[target] ?? dataObject[target];\n output[name] = this.codec.createDeserializer().readSchema(member, value);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n getDefaultContentType() {\n return \"application/xml\";\n }\n hasUnstructuredPayloadBinding(ns) {\n for (const [, member] of ns.structIterator()) {\n if (member.getMergedTraits().httpPayload) {\n return !(member.isStructSchema() || member.isMapSchema() || member.isListSchema());\n }\n }\n return false;\n }\n}\n", "export * from \"./cbor/AwsSmithyRpcV2CborProtocol\";\nexport * from \"./coercing-serializers\";\nexport * from \"./json/AwsJson1_0Protocol\";\nexport * from \"./json/AwsJson1_1Protocol\";\nexport * from \"./json/AwsJsonRpcProtocol\";\nexport * from \"./json/AwsRestJsonProtocol\";\nexport * from \"./json/JsonCodec\";\nexport * from \"./json/JsonShapeDeserializer\";\nexport * from \"./json/JsonShapeSerializer\";\nexport * from \"./json/awsExpectUnion\";\nexport * from \"./json/parseJsonBody\";\nexport * from \"./query/AwsEc2QueryProtocol\";\nexport * from \"./query/AwsQueryProtocol\";\nexport * from \"./query/QuerySerializerSettings\";\nexport * from \"./query/QueryShapeSerializer\";\nexport * from \"./xml/AwsRestXmlProtocol\";\nexport * from \"./xml/XmlCodec\";\nexport * from \"./xml/XmlShapeDeserializer\";\nexport * from \"./xml/XmlShapeSerializer\";\nexport * from \"./xml/parseXmlBody\";\n", "export * from \"./submodules/client/index\";\nexport * from \"./submodules/httpAuthSchemes/index\";\nexport * from \"./submodules/protocols/index\";\n", "import { DEFAULT_CHECKSUM_ALGORITHM, RequestChecksumCalculation } from \"./constants\";\nexport const getChecksumAlgorithmForRequest = (input, { requestChecksumRequired, requestAlgorithmMember, requestChecksumCalculation }) => {\n if (!requestAlgorithmMember) {\n return requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired\n ? DEFAULT_CHECKSUM_ALGORITHM\n : undefined;\n }\n if (!input[requestAlgorithmMember]) {\n return undefined;\n }\n const checksumAlgorithm = input[requestAlgorithmMember];\n return checksumAlgorithm;\n};\n", "import { ChecksumAlgorithm } from \"./constants\";\nexport const getChecksumLocationName = (algorithm) => algorithm === ChecksumAlgorithm.MD5 ? \"content-md5\" : `x-amz-checksum-${algorithm.toLowerCase()}`;\n", "export const hasHeader = (header, headers) => {\n const soughtHeader = header.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true;\n }\n }\n return false;\n};\n", "export const hasHeaderWithPrefix = (headerPrefix, headers) => {\n const soughtHeaderPrefix = headerPrefix.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (headerName.toLowerCase().startsWith(soughtHeaderPrefix)) {\n return true;\n }\n }\n return false;\n};\n", "import { isArrayBuffer } from \"@smithy/is-array-buffer\";\nexport const isStreaming = (body) => body !== undefined && typeof body !== \"string\" && !ArrayBuffer.isView(body) && !isArrayBuffer(body);\n", "/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n", "export const fromUtf8 = (input) => new TextEncoder().encode(input);\n", "import { fromUtf8 } from \"./fromUtf8\";\nexport const toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n", "export const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return new TextDecoder(\"utf-8\").decode(input);\n};\n", "export * from \"./fromUtf8\";\nexport * from \"./toUint8Array\";\nexport * from \"./toUtf8\";\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SourceData } from \"@aws-sdk/types\";\nimport { fromUtf8 as fromUtf8Browser } from \"@smithy/util-utf8\";\n\n// Quick polyfill\nconst fromUtf8 =\n typeof Buffer !== \"undefined\" && Buffer.from\n ? (input: string) => Buffer.from(input, \"utf8\")\n : fromUtf8Browser;\n\nexport function convertToBuffer(data: SourceData): Uint8Array {\n // Already a Uint8, do nothing\n if (data instanceof Uint8Array) return data;\n\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(\n data.buffer,\n data.byteOffset,\n data.byteLength / Uint8Array.BYTES_PER_ELEMENT\n );\n }\n\n return new Uint8Array(data);\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SourceData } from \"@aws-sdk/types\";\n\nexport function isEmptyData(data: SourceData): boolean {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n\n return data.byteLength === 0;\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function numToUint8(num: number) {\n return new Uint8Array([\n (num & 0xff000000) >> 24,\n (num & 0x00ff0000) >> 16,\n (num & 0x0000ff00) >> 8,\n num & 0x000000ff,\n ]);\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n// IE 11 does not support Array.from, so we do it manually\nexport function uint32ArrayFrom(a_lookUpTable: Array): Uint32Array {\n if (!Uint32Array.from) {\n const return_array = new Uint32Array(a_lookUpTable.length)\n let a_index = 0\n while (a_index < a_lookUpTable.length) {\n return_array[a_index] = a_lookUpTable[a_index]\n a_index += 1\n }\n return return_array\n }\n return Uint32Array.from(a_lookUpTable)\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport { convertToBuffer } from \"./convertToBuffer\";\nexport { isEmptyData } from \"./isEmptyData\";\nexport { numToUint8 } from \"./numToUint8\";\nexport {uint32ArrayFrom} from './uint32ArrayFrom';\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { convertToBuffer, isEmptyData, numToUint8 } from \"@aws-crypto/util\";\nimport { Crc32c } from \"./index\";\n\nexport class AwsCrc32c implements Checksum {\n private crc32c = new Crc32c();\n\n update(toHash: SourceData) {\n if (isEmptyData(toHash)) return;\n\n this.crc32c.update(convertToBuffer(toHash));\n }\n\n async digest(): Promise {\n return numToUint8(this.crc32c.digest());\n }\n\n reset(): void {\n this.crc32c = new Crc32c();\n }\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport {uint32ArrayFrom} from \"@aws-crypto/util\";\n\nexport function crc32c(data: Uint8Array): number {\n return new Crc32c().update(data).digest();\n}\n\nexport class Crc32c {\n private checksum = 0xffffffff;\n\n update(data: Uint8Array): this {\n for (const byte of data) {\n this.checksum =\n (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff];\n }\n\n return this;\n }\n\n digest(): number {\n return (this.checksum ^ 0xffffffff) >>> 0;\n }\n}\n\n// prettier-ignore\nconst a_lookupTable = [\n 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB,\n 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24,\n 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B, 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384,\n 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B,\n 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A, 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35,\n 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5, 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA,\n 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45, 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A,\n 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595,\n 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957,\n 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198,\n 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38,\n 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8, 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7,\n 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096, 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789,\n 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859, 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46,\n 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6,\n 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829,\n 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93,\n 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C,\n 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3, 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC,\n 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C, 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033,\n 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652, 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D,\n 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982,\n 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622,\n 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED,\n 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F,\n 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF, 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0,\n 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F, 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540,\n 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90, 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F,\n 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1,\n 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E,\n 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E,\n 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351,\n];\n\nconst lookupTable: Uint32Array = uint32ArrayFrom(a_lookupTable)\nexport { AwsCrc32c } from \"./aws_crc32c\";\n", "const generateCRC64NVMETable = () => {\n const sliceLength = 8;\n const tables = new Array(sliceLength);\n for (let slice = 0; slice < sliceLength; slice++) {\n const table = new Array(512);\n for (let i = 0; i < 256; i++) {\n let crc = BigInt(i);\n for (let j = 0; j < 8 * (slice + 1); j++) {\n if (crc & 1n) {\n crc = (crc >> 1n) ^ 0x9a6c9329ac4bc9b5n;\n }\n else {\n crc = crc >> 1n;\n }\n }\n table[i * 2] = Number((crc >> 32n) & 0xffffffffn);\n table[i * 2 + 1] = Number(crc & 0xffffffffn);\n }\n tables[slice] = new Uint32Array(table);\n }\n return tables;\n};\nlet CRC64_NVME_REVERSED_TABLE;\nlet t0, t1, t2, t3;\nlet t4, t5, t6, t7;\nconst ensureTablesInitialized = () => {\n if (!CRC64_NVME_REVERSED_TABLE) {\n CRC64_NVME_REVERSED_TABLE = generateCRC64NVMETable();\n [t0, t1, t2, t3, t4, t5, t6, t7] = CRC64_NVME_REVERSED_TABLE;\n }\n};\nexport class Crc64Nvme {\n c1 = 0;\n c2 = 0;\n constructor() {\n ensureTablesInitialized();\n this.reset();\n }\n update(data) {\n const len = data.length;\n let i = 0;\n let crc1 = this.c1;\n let crc2 = this.c2;\n while (i + 8 <= len) {\n const idx0 = ((crc2 ^ data[i++]) & 255) << 1;\n const idx1 = (((crc2 >>> 8) ^ data[i++]) & 255) << 1;\n const idx2 = (((crc2 >>> 16) ^ data[i++]) & 255) << 1;\n const idx3 = (((crc2 >>> 24) ^ data[i++]) & 255) << 1;\n const idx4 = ((crc1 ^ data[i++]) & 255) << 1;\n const idx5 = (((crc1 >>> 8) ^ data[i++]) & 255) << 1;\n const idx6 = (((crc1 >>> 16) ^ data[i++]) & 255) << 1;\n const idx7 = (((crc1 >>> 24) ^ data[i++]) & 255) << 1;\n crc1 = t7[idx0] ^ t6[idx1] ^ t5[idx2] ^ t4[idx3] ^ t3[idx4] ^ t2[idx5] ^ t1[idx6] ^ t0[idx7];\n crc2 =\n t7[idx0 + 1] ^\n t6[idx1 + 1] ^\n t5[idx2 + 1] ^\n t4[idx3 + 1] ^\n t3[idx4 + 1] ^\n t2[idx5 + 1] ^\n t1[idx6 + 1] ^\n t0[idx7 + 1];\n }\n while (i < len) {\n const idx = ((crc2 ^ data[i]) & 255) << 1;\n crc2 = ((crc2 >>> 8) | ((crc1 & 255) << 24)) >>> 0;\n crc1 = (crc1 >>> 8) ^ t0[idx];\n crc2 ^= t0[idx + 1];\n i++;\n }\n this.c1 = crc1;\n this.c2 = crc2;\n }\n async digest() {\n const c1 = this.c1 ^ 4294967295;\n const c2 = this.c2 ^ 4294967295;\n return new Uint8Array([\n c1 >>> 24,\n (c1 >>> 16) & 255,\n (c1 >>> 8) & 255,\n c1 & 255,\n c2 >>> 24,\n (c2 >>> 16) & 255,\n (c2 >>> 8) & 255,\n c2 & 255,\n ]);\n }\n reset() {\n this.c1 = 4294967295;\n this.c2 = 4294967295;\n }\n}\n", "export const crc64NvmeCrtContainer = {\n CrtCrc64Nvme: null,\n};\n", "export * from \"./Crc64Nvme\";\nexport * from \"./crc64-nvme-crt-container\";\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SourceData, Checksum } from \"@aws-sdk/types\";\nimport { convertToBuffer, isEmptyData, numToUint8 } from \"@aws-crypto/util\";\nimport { Crc32 } from \"./index\";\n\nexport class AwsCrc32 implements Checksum {\n private crc32 = new Crc32();\n\n update(toHash: SourceData) {\n if (isEmptyData(toHash)) return;\n\n this.crc32.update(convertToBuffer(toHash));\n }\n\n async digest(): Promise {\n return numToUint8(this.crc32.digest());\n }\n\n reset(): void {\n this.crc32 = new Crc32();\n }\n}\n", "import {uint32ArrayFrom} from \"@aws-crypto/util\";\n\nexport function crc32(data: Uint8Array): number {\n return new Crc32().update(data).digest();\n}\n\nexport class Crc32 {\n private checksum = 0xffffffff;\n\n update(data: Uint8Array): this {\n for (const byte of data) {\n this.checksum =\n (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff];\n }\n\n return this;\n }\n\n digest(): number {\n return (this.checksum ^ 0xffffffff) >>> 0;\n }\n}\n\n// prettier-ignore\nconst a_lookUpTable = [\n 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,\n 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,\n 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,\n 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,\n 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,\n 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,\n 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,\n 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,\n 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,\n 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,\n 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,\n 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,\n 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,\n 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,\n 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,\n 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,\n 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,\n 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,\n 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,\n 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,\n 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,\n 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,\n 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,\n 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,\n 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,\n 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,\n 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,\n 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,\n 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,\n 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,\n 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,\n 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,\n 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,\n 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,\n 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,\n 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,\n 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,\n 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,\n 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,\n 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,\n 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,\n 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,\n 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,\n 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,\n 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,\n 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,\n 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,\n 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,\n 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,\n 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,\n 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,\n 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,\n 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,\n 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,\n 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,\n 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,\n 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,\n 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,\n 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,\n 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,\n 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,\n 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,\n 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,\n 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D,\n];\nconst lookupTable: Uint32Array = uint32ArrayFrom(a_lookUpTable)\nexport { AwsCrc32 } from \"./aws_crc32\";\n", "import { AwsCrc32 } from \"@aws-crypto/crc32\";\nexport const getCrc32ChecksumAlgorithmFunction = () => AwsCrc32;\n", "import { ChecksumAlgorithm } from \"./constants\";\nexport const CLIENT_SUPPORTED_ALGORITHMS = [\n ChecksumAlgorithm.CRC32,\n ChecksumAlgorithm.CRC32C,\n ChecksumAlgorithm.CRC64NVME,\n ChecksumAlgorithm.SHA1,\n ChecksumAlgorithm.SHA256,\n];\nexport const PRIORITY_ORDER_ALGORITHMS = [\n ChecksumAlgorithm.SHA256,\n ChecksumAlgorithm.SHA1,\n ChecksumAlgorithm.CRC32,\n ChecksumAlgorithm.CRC32C,\n ChecksumAlgorithm.CRC64NVME,\n];\n", "import { AwsCrc32c } from \"@aws-crypto/crc32c\";\nimport { Crc64Nvme, crc64NvmeCrtContainer } from \"@aws-sdk/crc64-nvme\";\nimport { ChecksumAlgorithm } from \"./constants\";\nimport { getCrc32ChecksumAlgorithmFunction } from \"./getCrc32ChecksumAlgorithmFunction\";\nimport { CLIENT_SUPPORTED_ALGORITHMS } from \"./types\";\nexport const selectChecksumAlgorithmFunction = (checksumAlgorithm, config) => {\n const { checksumAlgorithms = {} } = config;\n switch (checksumAlgorithm) {\n case ChecksumAlgorithm.MD5:\n return checksumAlgorithms?.MD5 ?? config.md5;\n case ChecksumAlgorithm.CRC32:\n return checksumAlgorithms?.CRC32 ?? getCrc32ChecksumAlgorithmFunction();\n case ChecksumAlgorithm.CRC32C:\n return checksumAlgorithms?.CRC32C ?? AwsCrc32c;\n case ChecksumAlgorithm.CRC64NVME:\n if (typeof crc64NvmeCrtContainer.CrtCrc64Nvme !== \"function\") {\n return checksumAlgorithms?.CRC64NVME ?? Crc64Nvme;\n }\n return checksumAlgorithms?.CRC64NVME ?? crc64NvmeCrtContainer.CrtCrc64Nvme;\n case ChecksumAlgorithm.SHA1:\n return checksumAlgorithms?.SHA1 ?? config.sha1;\n case ChecksumAlgorithm.SHA256:\n return checksumAlgorithms?.SHA256 ?? config.sha256;\n default:\n if (checksumAlgorithms?.[checksumAlgorithm]) {\n return checksumAlgorithms[checksumAlgorithm];\n }\n throw new Error(`The checksum algorithm \"${checksumAlgorithm}\" is not supported by the client.` +\n ` Select one of ${CLIENT_SUPPORTED_ALGORITHMS}, or provide an implementation to ` +\n ` the client constructor checksums field.`);\n }\n};\n", "import { toUint8Array } from \"@smithy/util-utf8\";\nexport const stringHasher = (checksumAlgorithmFn, body) => {\n const hash = new checksumAlgorithmFn();\n hash.update(toUint8Array(body || \"\"));\n return hash.digest();\n};\n", "import { setFeature } from \"@aws-sdk/core\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { createBufferedReadable } from \"@smithy/util-stream\";\nimport { ChecksumAlgorithm, DEFAULT_CHECKSUM_ALGORITHM, RequestChecksumCalculation } from \"./constants\";\nimport { getChecksumAlgorithmForRequest } from \"./getChecksumAlgorithmForRequest\";\nimport { getChecksumLocationName } from \"./getChecksumLocationName\";\nimport { hasHeader } from \"./hasHeader\";\nimport { hasHeaderWithPrefix } from \"./hasHeaderWithPrefix\";\nimport { isStreaming } from \"./isStreaming\";\nimport { selectChecksumAlgorithmFunction } from \"./selectChecksumAlgorithmFunction\";\nimport { stringHasher } from \"./stringHasher\";\nexport const flexibleChecksumsMiddlewareOptions = {\n name: \"flexibleChecksumsMiddleware\",\n step: \"build\",\n tags: [\"BODY_CHECKSUM\"],\n override: true,\n};\nexport const flexibleChecksumsMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {\n if (!HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n if (hasHeaderWithPrefix(\"x-amz-checksum-\", args.request.headers)) {\n return next(args);\n }\n const { request, input } = args;\n const { body: requestBody, headers } = request;\n const { base64Encoder, streamHasher } = config;\n const { requestChecksumRequired, requestAlgorithmMember } = middlewareConfig;\n const requestChecksumCalculation = await config.requestChecksumCalculation();\n const requestAlgorithmMemberName = requestAlgorithmMember?.name;\n const requestAlgorithmMemberHttpHeader = requestAlgorithmMember?.httpHeader;\n if (requestAlgorithmMemberName && !input[requestAlgorithmMemberName]) {\n if (requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired) {\n input[requestAlgorithmMemberName] = DEFAULT_CHECKSUM_ALGORITHM;\n if (requestAlgorithmMemberHttpHeader) {\n headers[requestAlgorithmMemberHttpHeader] = DEFAULT_CHECKSUM_ALGORITHM;\n }\n }\n }\n const checksumAlgorithm = getChecksumAlgorithmForRequest(input, {\n requestChecksumRequired,\n requestAlgorithmMember: requestAlgorithmMember?.name,\n requestChecksumCalculation,\n });\n let updatedBody = requestBody;\n let updatedHeaders = headers;\n if (checksumAlgorithm) {\n switch (checksumAlgorithm) {\n case ChecksumAlgorithm.CRC32:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_CRC32\", \"U\");\n break;\n case ChecksumAlgorithm.CRC32C:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_CRC32C\", \"V\");\n break;\n case ChecksumAlgorithm.CRC64NVME:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_CRC64\", \"W\");\n break;\n case ChecksumAlgorithm.SHA1:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_SHA1\", \"X\");\n break;\n case ChecksumAlgorithm.SHA256:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_SHA256\", \"Y\");\n break;\n }\n const checksumLocationName = getChecksumLocationName(checksumAlgorithm);\n const checksumAlgorithmFn = selectChecksumAlgorithmFunction(checksumAlgorithm, config);\n if (isStreaming(requestBody)) {\n const { getAwsChunkedEncodingStream, bodyLengthChecker } = config;\n updatedBody = getAwsChunkedEncodingStream(typeof config.requestStreamBufferSize === \"number\" && config.requestStreamBufferSize >= 8 * 1024\n ? createBufferedReadable(requestBody, config.requestStreamBufferSize, context.logger)\n : requestBody, {\n base64Encoder,\n bodyLengthChecker,\n checksumLocationName,\n checksumAlgorithmFn,\n streamHasher,\n });\n updatedHeaders = {\n ...headers,\n \"content-encoding\": headers[\"content-encoding\"]\n ? `${headers[\"content-encoding\"]},aws-chunked`\n : \"aws-chunked\",\n \"transfer-encoding\": \"chunked\",\n \"x-amz-decoded-content-length\": headers[\"content-length\"],\n \"x-amz-content-sha256\": \"STREAMING-UNSIGNED-PAYLOAD-TRAILER\",\n \"x-amz-trailer\": checksumLocationName,\n };\n delete updatedHeaders[\"content-length\"];\n }\n else if (!hasHeader(checksumLocationName, headers)) {\n const rawChecksum = await stringHasher(checksumAlgorithmFn, requestBody);\n updatedHeaders = {\n ...headers,\n [checksumLocationName]: base64Encoder(rawChecksum),\n };\n }\n }\n try {\n const result = await next({\n ...args,\n request: {\n ...request,\n headers: updatedHeaders,\n body: updatedBody,\n },\n });\n return result;\n }\n catch (e) {\n if (e instanceof Error && e.name === \"InvalidChunkSizeError\") {\n try {\n if (!e.message.endsWith(\".\")) {\n e.message += \".\";\n }\n e.message +=\n \" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream.\";\n }\n catch (ignored) {\n }\n }\n throw e;\n }\n};\n", "import { setFeature } from \"@aws-sdk/core\";\nimport { RequestChecksumCalculation, ResponseChecksumValidation } from \"./constants\";\nexport const flexibleChecksumsInputMiddlewareOptions = {\n name: \"flexibleChecksumsInputMiddleware\",\n toMiddleware: \"serializerMiddleware\",\n relation: \"before\",\n tags: [\"BODY_CHECKSUM\"],\n override: true,\n};\nexport const flexibleChecksumsInputMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {\n const input = args.input;\n const { requestValidationModeMember } = middlewareConfig;\n const requestChecksumCalculation = await config.requestChecksumCalculation();\n const responseChecksumValidation = await config.responseChecksumValidation();\n switch (requestChecksumCalculation) {\n case RequestChecksumCalculation.WHEN_REQUIRED:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED\", \"a\");\n break;\n case RequestChecksumCalculation.WHEN_SUPPORTED:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED\", \"Z\");\n break;\n }\n switch (responseChecksumValidation) {\n case ResponseChecksumValidation.WHEN_REQUIRED:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED\", \"c\");\n break;\n case ResponseChecksumValidation.WHEN_SUPPORTED:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED\", \"b\");\n break;\n }\n if (requestValidationModeMember && !input[requestValidationModeMember]) {\n if (responseChecksumValidation === ResponseChecksumValidation.WHEN_SUPPORTED) {\n input[requestValidationModeMember] = \"ENABLED\";\n }\n }\n return next(args);\n};\n", "import { CLIENT_SUPPORTED_ALGORITHMS, PRIORITY_ORDER_ALGORITHMS } from \"./types\";\nexport const getChecksumAlgorithmListForResponse = (responseAlgorithms = []) => {\n const validChecksumAlgorithms = [];\n for (const algorithm of PRIORITY_ORDER_ALGORITHMS) {\n if (!responseAlgorithms.includes(algorithm) || !CLIENT_SUPPORTED_ALGORITHMS.includes(algorithm)) {\n continue;\n }\n validChecksumAlgorithms.push(algorithm);\n }\n return validChecksumAlgorithms;\n};\n", "export const isChecksumWithPartNumber = (checksum) => {\n const lastHyphenIndex = checksum.lastIndexOf(\"-\");\n if (lastHyphenIndex !== -1) {\n const numberPart = checksum.slice(lastHyphenIndex + 1);\n if (!numberPart.startsWith(\"0\")) {\n const number = parseInt(numberPart, 10);\n if (!isNaN(number) && number >= 1 && number <= 10000) {\n return true;\n }\n }\n }\n return false;\n};\n", "import { stringHasher } from \"./stringHasher\";\nexport const getChecksum = async (body, { checksumAlgorithmFn, base64Encoder }) => base64Encoder(await stringHasher(checksumAlgorithmFn, body));\n", "import { createChecksumStream } from \"@smithy/util-stream\";\nimport { ChecksumAlgorithm } from \"./constants\";\nimport { getChecksum } from \"./getChecksum\";\nimport { getChecksumAlgorithmListForResponse } from \"./getChecksumAlgorithmListForResponse\";\nimport { getChecksumLocationName } from \"./getChecksumLocationName\";\nimport { isStreaming } from \"./isStreaming\";\nimport { selectChecksumAlgorithmFunction } from \"./selectChecksumAlgorithmFunction\";\nexport const validateChecksumFromResponse = async (response, { config, responseAlgorithms, logger }) => {\n const checksumAlgorithms = getChecksumAlgorithmListForResponse(responseAlgorithms);\n const { body: responseBody, headers: responseHeaders } = response;\n for (const algorithm of checksumAlgorithms) {\n const responseHeader = getChecksumLocationName(algorithm);\n const checksumFromResponse = responseHeaders[responseHeader];\n if (checksumFromResponse) {\n let checksumAlgorithmFn;\n try {\n checksumAlgorithmFn = selectChecksumAlgorithmFunction(algorithm, config);\n }\n catch (error) {\n if (algorithm === ChecksumAlgorithm.CRC64NVME) {\n logger?.warn(`Skipping ${ChecksumAlgorithm.CRC64NVME} checksum validation: ${error.message}`);\n continue;\n }\n throw error;\n }\n const { base64Encoder } = config;\n if (isStreaming(responseBody)) {\n response.body = createChecksumStream({\n expectedChecksum: checksumFromResponse,\n checksumSourceLocation: responseHeader,\n checksum: new checksumAlgorithmFn(),\n source: responseBody,\n base64Encoder,\n });\n return;\n }\n const checksum = await getChecksum(responseBody, { checksumAlgorithmFn, base64Encoder });\n if (checksum === checksumFromResponse) {\n break;\n }\n throw new Error(`Checksum mismatch: expected \"${checksum}\" but received \"${checksumFromResponse}\"` +\n ` in response header \"${responseHeader}\".`);\n }\n }\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { getChecksumAlgorithmListForResponse } from \"./getChecksumAlgorithmListForResponse\";\nimport { getChecksumLocationName } from \"./getChecksumLocationName\";\nimport { isChecksumWithPartNumber } from \"./isChecksumWithPartNumber\";\nimport { validateChecksumFromResponse } from \"./validateChecksumFromResponse\";\nexport const flexibleChecksumsResponseMiddlewareOptions = {\n name: \"flexibleChecksumsResponseMiddleware\",\n toMiddleware: \"deserializerMiddleware\",\n relation: \"after\",\n tags: [\"BODY_CHECKSUM\"],\n override: true,\n};\nexport const flexibleChecksumsResponseMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {\n if (!HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n const input = args.input;\n const result = await next(args);\n const response = result.response;\n const { requestValidationModeMember, responseAlgorithms } = middlewareConfig;\n if (requestValidationModeMember && input[requestValidationModeMember] === \"ENABLED\") {\n const { clientName, commandName } = context;\n const isS3WholeObjectMultipartGetResponseChecksum = clientName === \"S3Client\" &&\n commandName === \"GetObjectCommand\" &&\n getChecksumAlgorithmListForResponse(responseAlgorithms).every((algorithm) => {\n const responseHeader = getChecksumLocationName(algorithm);\n const checksumFromResponse = response.headers[responseHeader];\n return !checksumFromResponse || isChecksumWithPartNumber(checksumFromResponse);\n });\n if (isS3WholeObjectMultipartGetResponseChecksum) {\n return result;\n }\n await validateChecksumFromResponse(response, {\n config,\n responseAlgorithms,\n logger: context.logger,\n });\n }\n return result;\n};\n", "import { flexibleChecksumsInputMiddleware, flexibleChecksumsInputMiddlewareOptions, } from \"./flexibleChecksumsInputMiddleware\";\nimport { flexibleChecksumsMiddleware, flexibleChecksumsMiddlewareOptions } from \"./flexibleChecksumsMiddleware\";\nimport { flexibleChecksumsResponseMiddleware, flexibleChecksumsResponseMiddlewareOptions, } from \"./flexibleChecksumsResponseMiddleware\";\nexport const getFlexibleChecksumsPlugin = (config, middlewareConfig) => ({\n applyToStack: (clientStack) => {\n clientStack.add(flexibleChecksumsMiddleware(config, middlewareConfig), flexibleChecksumsMiddlewareOptions);\n clientStack.addRelativeTo(flexibleChecksumsInputMiddleware(config, middlewareConfig), flexibleChecksumsInputMiddlewareOptions);\n clientStack.addRelativeTo(flexibleChecksumsResponseMiddleware(config, middlewareConfig), flexibleChecksumsResponseMiddlewareOptions);\n },\n});\n", "import { normalizeProvider } from \"@smithy/util-middleware\";\nimport { DEFAULT_REQUEST_CHECKSUM_CALCULATION, DEFAULT_RESPONSE_CHECKSUM_VALIDATION } from \"./constants\";\nexport const resolveFlexibleChecksumsConfig = (input) => {\n const { requestChecksumCalculation, responseChecksumValidation, requestStreamBufferSize } = input;\n return Object.assign(input, {\n requestChecksumCalculation: normalizeProvider(requestChecksumCalculation ?? DEFAULT_REQUEST_CHECKSUM_CALCULATION),\n responseChecksumValidation: normalizeProvider(responseChecksumValidation ?? DEFAULT_RESPONSE_CHECKSUM_VALIDATION),\n requestStreamBufferSize: Number(requestStreamBufferSize ?? 0),\n checksumAlgorithms: input.checksumAlgorithms ?? {},\n });\n};\n", "export * from \"./NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS\";\nexport * from \"./NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS\";\nexport * from \"./constants\";\nexport * from \"./flexibleChecksumsMiddleware\";\nexport * from \"./getFlexibleChecksumsPlugin\";\nexport * from \"./resolveFlexibleChecksumsConfig\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nexport function resolveHostHeaderConfig(input) {\n return input;\n}\nexport const hostHeaderMiddleware = (options) => (next) => async (args) => {\n if (!HttpRequest.isInstance(args.request))\n return next(args);\n const { request } = args;\n const { handlerProtocol = \"\" } = options.requestHandler.metadata || {};\n if (handlerProtocol.indexOf(\"h2\") >= 0 && !request.headers[\":authority\"]) {\n delete request.headers[\"host\"];\n request.headers[\":authority\"] = request.hostname + (request.port ? \":\" + request.port : \"\");\n }\n else if (!request.headers[\"host\"]) {\n let host = request.hostname;\n if (request.port != null)\n host += `:${request.port}`;\n request.headers[\"host\"] = host;\n }\n return next(args);\n};\nexport const hostHeaderMiddlewareOptions = {\n name: \"hostHeaderMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"HOST\"],\n override: true,\n};\nexport const getHostHeaderPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);\n },\n});\n", "export const loggerMiddleware = () => (next, context) => async (args) => {\n try {\n const response = await next(args);\n const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;\n const { $metadata, ...outputWithoutMetadata } = response.output;\n logger?.info?.({\n clientName,\n commandName,\n input: inputFilterSensitiveLog(args.input),\n output: outputFilterSensitiveLog(outputWithoutMetadata),\n metadata: $metadata,\n });\n return response;\n }\n catch (error) {\n const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n logger?.error?.({\n clientName,\n commandName,\n input: inputFilterSensitiveLog(args.input),\n error,\n metadata: error.$metadata,\n });\n throw error;\n }\n};\nexport const loggerMiddlewareOptions = {\n name: \"loggerMiddleware\",\n tags: [\"LOGGER\"],\n step: \"initialize\",\n override: true,\n};\nexport const getLoggerPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);\n },\n});\n", "export * from \"./loggerMiddleware\";\n", "export const recursionDetectionMiddlewareOptions = {\n step: \"build\",\n tags: [\"RECURSION_DETECTION\"],\n name: \"recursionDetectionMiddleware\",\n override: true,\n priority: \"low\",\n};\n", "export const recursionDetectionMiddleware = () => (next) => async (args) => next(args);\n", "import { recursionDetectionMiddlewareOptions } from \"./configuration\";\nimport { recursionDetectionMiddleware } from \"./recursionDetectionMiddleware\";\nexport const getRecursionDetectionPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions);\n },\n});\n", "export * from \"./getRecursionDetectionPlugin\";\nexport * from \"./recursionDetectionMiddleware\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { NoOpLogger } from \"@smithy/smithy-client\";\nconst CONTENT_LENGTH_HEADER = \"content-length\";\nconst DECODED_CONTENT_LENGTH_HEADER = \"x-amz-decoded-content-length\";\nexport function checkContentLengthHeader() {\n return (next, context) => async (args) => {\n const { request } = args;\n if (HttpRequest.isInstance(request)) {\n if (!(CONTENT_LENGTH_HEADER in request.headers) && !(DECODED_CONTENT_LENGTH_HEADER in request.headers)) {\n const message = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`;\n if (typeof context?.logger?.warn === \"function\" && !(context.logger instanceof NoOpLogger)) {\n context.logger.warn(message);\n }\n else {\n console.warn(message);\n }\n }\n }\n return next({ ...args });\n };\n}\nexport const checkContentLengthHeaderMiddlewareOptions = {\n step: \"finalizeRequest\",\n tags: [\"CHECK_CONTENT_LENGTH_HEADER\"],\n name: \"getCheckContentLengthHeaderPlugin\",\n override: true,\n};\nexport const getCheckContentLengthHeaderPlugin = (unused) => ({\n applyToStack: (clientStack) => {\n clientStack.add(checkContentLengthHeader(), checkContentLengthHeaderMiddlewareOptions);\n },\n});\n", "export const regionRedirectEndpointMiddleware = (config) => {\n return (next, context) => async (args) => {\n const originalRegion = await config.region();\n const regionProviderRef = config.region;\n let unlock = () => { };\n if (context.__s3RegionRedirect) {\n Object.defineProperty(config, \"region\", {\n writable: false,\n value: async () => {\n return context.__s3RegionRedirect;\n },\n });\n unlock = () => Object.defineProperty(config, \"region\", {\n writable: true,\n value: regionProviderRef,\n });\n }\n try {\n const result = await next(args);\n if (context.__s3RegionRedirect) {\n unlock();\n const region = await config.region();\n if (originalRegion !== region) {\n throw new Error(\"Region was not restored following S3 region redirect.\");\n }\n }\n return result;\n }\n catch (e) {\n unlock();\n throw e;\n }\n };\n};\nexport const regionRedirectEndpointMiddlewareOptions = {\n tags: [\"REGION_REDIRECT\", \"S3\"],\n name: \"regionRedirectEndpointMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: \"endpointV2Middleware\",\n};\n", "import { regionRedirectEndpointMiddleware, regionRedirectEndpointMiddlewareOptions, } from \"./region-redirect-endpoint-middleware\";\nexport function regionRedirectMiddleware(clientConfig) {\n return (next, context) => async (args) => {\n try {\n return await next(args);\n }\n catch (err) {\n if (clientConfig.followRegionRedirects) {\n const statusCode = err?.$metadata?.httpStatusCode;\n const isHeadBucket = context.commandName === \"HeadBucketCommand\";\n const bucketRegionHeader = err?.$response?.headers?.[\"x-amz-bucket-region\"];\n if (bucketRegionHeader) {\n if (statusCode === 301 ||\n (statusCode === 400 && (err?.name === \"IllegalLocationConstraintException\" || isHeadBucket))) {\n try {\n const actualRegion = bucketRegionHeader;\n context.logger?.debug(`Redirecting from ${await clientConfig.region()} to ${actualRegion}`);\n context.__s3RegionRedirect = actualRegion;\n }\n catch (e) {\n throw new Error(\"Region redirect failed: \" + e);\n }\n return next(args);\n }\n }\n }\n throw err;\n }\n };\n}\nexport const regionRedirectMiddlewareOptions = {\n step: \"initialize\",\n tags: [\"REGION_REDIRECT\", \"S3\"],\n name: \"regionRedirectMiddleware\",\n override: true,\n};\nexport const getRegionRedirectMiddlewarePlugin = (clientConfig) => ({\n applyToStack: (clientStack) => {\n clientStack.add(regionRedirectMiddleware(clientConfig), regionRedirectMiddlewareOptions);\n clientStack.addRelativeTo(regionRedirectEndpointMiddleware(clientConfig), regionRedirectEndpointMiddlewareOptions);\n },\n});\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nimport { parseRfc7231DateTime } from \"@smithy/smithy-client\";\nexport const s3ExpiresMiddleware = (config) => {\n return (next, context) => async (args) => {\n const result = await next(args);\n const { response } = result;\n if (HttpResponse.isInstance(response)) {\n if (response.headers.expires) {\n response.headers.expiresstring = response.headers.expires;\n try {\n parseRfc7231DateTime(response.headers.expires);\n }\n catch (e) {\n context.logger?.warn(`AWS SDK Warning for ${context.clientName}::${context.commandName} response parsing (${response.headers.expires}): ${e}`);\n delete response.headers.expires;\n }\n }\n }\n return result;\n };\n};\nexport const s3ExpiresMiddlewareOptions = {\n tags: [\"S3\"],\n name: \"s3ExpiresMiddleware\",\n override: true,\n relation: \"after\",\n toMiddleware: \"deserializerMiddleware\",\n};\nexport const getS3ExpiresMiddlewarePlugin = (clientConfig) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(s3ExpiresMiddleware(clientConfig), s3ExpiresMiddlewareOptions);\n },\n});\n", "export class S3ExpressIdentityCache {\n data;\n lastPurgeTime = Date.now();\n static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS = 30_000;\n constructor(data = {}) {\n this.data = data;\n }\n get(key) {\n const entry = this.data[key];\n if (!entry) {\n return;\n }\n return entry;\n }\n set(key, entry) {\n this.data[key] = entry;\n return entry;\n }\n delete(key) {\n delete this.data[key];\n }\n async purgeExpired() {\n const now = Date.now();\n if (this.lastPurgeTime + S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS > now) {\n return;\n }\n for (const key in this.data) {\n const entry = this.data[key];\n if (!entry.isRefreshing) {\n const credential = await entry.identity;\n if (credential.expiration) {\n if (credential.expiration.getTime() < now) {\n delete this.data[key];\n }\n }\n }\n }\n }\n}\n", "export class S3ExpressIdentityCacheEntry {\n _identity;\n isRefreshing;\n accessed;\n constructor(_identity, isRefreshing = false, accessed = Date.now()) {\n this._identity = _identity;\n this.isRefreshing = isRefreshing;\n this.accessed = accessed;\n }\n get identity() {\n this.accessed = Date.now();\n return this._identity;\n }\n}\n", "import { S3ExpressIdentityCache } from \"./S3ExpressIdentityCache\";\nimport { S3ExpressIdentityCacheEntry } from \"./S3ExpressIdentityCacheEntry\";\nexport class S3ExpressIdentityProviderImpl {\n createSessionFn;\n cache;\n static REFRESH_WINDOW_MS = 60_000;\n constructor(createSessionFn, cache = new S3ExpressIdentityCache()) {\n this.createSessionFn = createSessionFn;\n this.cache = cache;\n }\n async getS3ExpressIdentity(awsIdentity, identityProperties) {\n const key = identityProperties.Bucket;\n const { cache } = this;\n const entry = cache.get(key);\n if (entry) {\n return entry.identity.then((identity) => {\n const isExpired = (identity.expiration?.getTime() ?? 0) < Date.now();\n if (isExpired) {\n return cache.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity;\n }\n const isExpiringSoon = (identity.expiration?.getTime() ?? 0) < Date.now() + S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS;\n if (isExpiringSoon && !entry.isRefreshing) {\n entry.isRefreshing = true;\n this.getIdentity(key).then((id) => {\n cache.set(key, new S3ExpressIdentityCacheEntry(Promise.resolve(id)));\n });\n }\n return identity;\n });\n }\n return cache.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity;\n }\n async getIdentity(key) {\n await this.cache.purgeExpired().catch((error) => {\n console.warn(\"Error while clearing expired entries in S3ExpressIdentityCache: \\n\" + error);\n });\n const session = await this.createSessionFn(key);\n if (!session.Credentials?.AccessKeyId || !session.Credentials?.SecretAccessKey) {\n throw new Error(\"s3#createSession response credential missing AccessKeyId or SecretAccessKey.\");\n }\n const identity = {\n accessKeyId: session.Credentials.AccessKeyId,\n secretAccessKey: session.Credentials.SecretAccessKey,\n sessionToken: session.Credentials.SessionToken,\n expiration: session.Credentials.Expiration ? new Date(session.Credentials.Expiration) : undefined,\n };\n return identity;\n }\n}\n", "import { booleanSelector, SelectorType } from \"@smithy/util-config-provider\";\nexport const S3_EXPRESS_BUCKET_TYPE = \"Directory\";\nexport const S3_EXPRESS_BACKEND = \"S3Express\";\nexport const S3_EXPRESS_AUTH_SCHEME = \"sigv4-s3express\";\nexport const SESSION_TOKEN_QUERY_PARAM = \"X-Amz-S3session-Token\";\nexport const SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase();\nexport const NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME = \"AWS_S3_DISABLE_EXPRESS_SESSION_AUTH\";\nexport const NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME = \"s3_disable_express_session_auth\";\nexport const NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = {\n environmentVariableSelector: (env) => booleanSelector(env, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME, SelectorType.ENV),\n configFileSelector: (profile) => booleanSelector(profile, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME, SelectorType.CONFIG),\n default: false,\n};\n", "import { SignatureV4 } from \"@smithy/signature-v4\";\nimport { SESSION_TOKEN_HEADER, SESSION_TOKEN_QUERY_PARAM } from \"../constants\";\nexport class SignatureV4S3Express extends SignatureV4 {\n async signWithCredentials(requestToSign, credentials, options) {\n const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);\n requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken;\n const privateAccess = this;\n setSingleOverride(privateAccess, credentialsWithoutSessionToken);\n return privateAccess.signRequest(requestToSign, options ?? {});\n }\n async presignWithCredentials(requestToSign, credentials, options) {\n const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);\n delete requestToSign.headers[SESSION_TOKEN_HEADER];\n requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;\n requestToSign.query = requestToSign.query ?? {};\n requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;\n const privateAccess = this;\n setSingleOverride(privateAccess, credentialsWithoutSessionToken);\n return this.presign(requestToSign, options);\n }\n}\nfunction getCredentialsWithoutSessionToken(credentials) {\n const credentialsWithoutSessionToken = {\n accessKeyId: credentials.accessKeyId,\n secretAccessKey: credentials.secretAccessKey,\n expiration: credentials.expiration,\n };\n return credentialsWithoutSessionToken;\n}\nfunction setSingleOverride(privateAccess, credentialsWithoutSessionToken) {\n const id = setTimeout(() => {\n throw new Error(\"SignatureV4S3Express credential override was created but not called.\");\n }, 10);\n const currentCredentialProvider = privateAccess.credentialProvider;\n const overrideCredentialsProviderOnce = () => {\n clearTimeout(id);\n privateAccess.credentialProvider = currentCredentialProvider;\n return Promise.resolve(credentialsWithoutSessionToken);\n };\n privateAccess.credentialProvider = overrideCredentialsProviderOnce;\n}\n", "import { setFeature } from \"@aws-sdk/core\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { S3_EXPRESS_AUTH_SCHEME, S3_EXPRESS_BACKEND, S3_EXPRESS_BUCKET_TYPE, SESSION_TOKEN_HEADER } from \"../constants\";\nexport const s3ExpressMiddleware = (options) => {\n return (next, context) => async (args) => {\n if (context.endpointV2) {\n const endpoint = context.endpointV2;\n const isS3ExpressAuth = endpoint.properties?.authSchemes?.[0]?.name === S3_EXPRESS_AUTH_SCHEME;\n const isS3ExpressBucket = endpoint.properties?.backend === S3_EXPRESS_BACKEND ||\n endpoint.properties?.bucketType === S3_EXPRESS_BUCKET_TYPE;\n if (isS3ExpressBucket) {\n setFeature(context, \"S3_EXPRESS_BUCKET\", \"J\");\n context.isS3ExpressBucket = true;\n }\n if (isS3ExpressAuth) {\n const requestBucket = args.input.Bucket;\n if (requestBucket) {\n const s3ExpressIdentity = await options.s3ExpressIdentityProvider.getS3ExpressIdentity(await options.credentials(), {\n Bucket: requestBucket,\n });\n context.s3ExpressIdentity = s3ExpressIdentity;\n if (HttpRequest.isInstance(args.request) && s3ExpressIdentity.sessionToken) {\n args.request.headers[SESSION_TOKEN_HEADER] = s3ExpressIdentity.sessionToken;\n }\n }\n }\n }\n return next(args);\n };\n};\nexport const s3ExpressMiddlewareOptions = {\n name: \"s3ExpressMiddleware\",\n step: \"build\",\n tags: [\"S3\", \"S3_EXPRESS\"],\n override: true,\n};\nexport const getS3ExpressPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(s3ExpressMiddleware(options), s3ExpressMiddlewareOptions);\n },\n});\n", "export const signS3Express = async (s3ExpressIdentity, signingOptions, request, sigV4MultiRegionSigner) => {\n const signedRequest = await sigV4MultiRegionSigner.signWithCredentials(request, s3ExpressIdentity, {});\n if (signedRequest.headers[\"X-Amz-Security-Token\"] || signedRequest.headers[\"x-amz-security-token\"]) {\n throw new Error(\"X-Amz-Security-Token must not be set for s3-express requests.\");\n }\n return signedRequest;\n};\n", "import { httpSigningMiddlewareOptions } from \"@smithy/core\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { getSmithyContext } from \"@smithy/util-middleware\";\nimport { signS3Express } from \"./signS3Express\";\nconst defaultErrorHandler = (signingProperties) => (error) => {\n throw error;\n};\nconst defaultSuccessHandler = (httpResponse, signingProperties) => { };\nexport const s3ExpressHttpSigningMiddlewareOptions = httpSigningMiddlewareOptions;\nexport const s3ExpressHttpSigningMiddleware = (config) => (next, context) => async (args) => {\n if (!HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n const smithyContext = getSmithyContext(context);\n const scheme = smithyContext.selectedHttpAuthScheme;\n if (!scheme) {\n throw new Error(`No HttpAuthScheme was selected: unable to sign request`);\n }\n const { httpAuthOption: { signingProperties = {} }, identity, signer, } = scheme;\n let request;\n if (context.s3ExpressIdentity) {\n request = await signS3Express(context.s3ExpressIdentity, signingProperties, args.request, await config.signer());\n }\n else {\n request = await signer.sign(args.request, identity, signingProperties);\n }\n const output = await next({\n ...args,\n request,\n }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));\n (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);\n return output;\n};\nexport const getS3ExpressHttpSigningPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(s3ExpressHttpSigningMiddleware(config), httpSigningMiddlewareOptions);\n },\n});\n", "export { S3ExpressIdentityCache } from \"./classes/S3ExpressIdentityCache\";\nexport { S3ExpressIdentityCacheEntry } from \"./classes/S3ExpressIdentityCacheEntry\";\nexport { S3ExpressIdentityProviderImpl } from \"./classes/S3ExpressIdentityProviderImpl\";\nexport { SignatureV4S3Express } from \"./classes/SignatureV4S3Express\";\nexport { NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS } from \"./constants\";\nexport { getS3ExpressPlugin, s3ExpressMiddleware, s3ExpressMiddlewareOptions } from \"./functions/s3ExpressMiddleware\";\nexport { getS3ExpressHttpSigningPlugin, s3ExpressHttpSigningMiddleware, s3ExpressHttpSigningMiddlewareOptions, } from \"./functions/s3ExpressHttpSigningMiddleware\";\n", "import { S3ExpressIdentityProviderImpl } from \"./s3-express\";\nexport const resolveS3Config = (input, { session, }) => {\n const [s3ClientProvider, CreateSessionCommandCtor] = session;\n const { forcePathStyle, useAccelerateEndpoint, disableMultiregionAccessPoints, followRegionRedirects, s3ExpressIdentityProvider, bucketEndpoint, expectContinueHeader, } = input;\n return Object.assign(input, {\n forcePathStyle: forcePathStyle ?? false,\n useAccelerateEndpoint: useAccelerateEndpoint ?? false,\n disableMultiregionAccessPoints: disableMultiregionAccessPoints ?? false,\n followRegionRedirects: followRegionRedirects ?? false,\n s3ExpressIdentityProvider: s3ExpressIdentityProvider ??\n new S3ExpressIdentityProviderImpl(async (key) => s3ClientProvider().send(new CreateSessionCommandCtor({\n Bucket: key,\n }))),\n bucketEndpoint: bucketEndpoint ?? false,\n expectContinueHeader: expectContinueHeader ?? 2_097_152,\n });\n};\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nimport { headStream, splitStream } from \"@smithy/util-stream\";\nconst THROW_IF_EMPTY_BODY = {\n CopyObjectCommand: true,\n UploadPartCopyCommand: true,\n CompleteMultipartUploadCommand: true,\n};\nconst MAX_BYTES_TO_INSPECT = 3000;\nexport const throw200ExceptionsMiddleware = (config) => (next, context) => async (args) => {\n const result = await next(args);\n const { response } = result;\n if (!HttpResponse.isInstance(response)) {\n return result;\n }\n const { statusCode, body: sourceBody } = response;\n if (statusCode < 200 || statusCode >= 300) {\n return result;\n }\n const isSplittableStream = typeof sourceBody?.stream === \"function\" ||\n typeof sourceBody?.pipe === \"function\" ||\n typeof sourceBody?.tee === \"function\";\n if (!isSplittableStream) {\n return result;\n }\n let bodyCopy = sourceBody;\n let body = sourceBody;\n if (sourceBody && typeof sourceBody === \"object\" && !(sourceBody instanceof Uint8Array)) {\n [bodyCopy, body] = await splitStream(sourceBody);\n }\n response.body = body;\n const bodyBytes = await collectBody(bodyCopy, {\n streamCollector: async (stream) => {\n return headStream(stream, MAX_BYTES_TO_INSPECT);\n },\n });\n if (typeof bodyCopy?.destroy === \"function\") {\n bodyCopy.destroy();\n }\n const bodyStringTail = config.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16));\n if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context.commandName]) {\n const err = new Error(\"S3 aborted request\");\n err.name = \"InternalError\";\n throw err;\n }\n if (bodyStringTail && bodyStringTail.endsWith(\"\")) {\n response.statusCode = 400;\n }\n return result;\n};\nconst collectBody = (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return Promise.resolve(streamBody);\n }\n return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());\n};\nexport const throw200ExceptionsMiddlewareOptions = {\n relation: \"after\",\n toMiddleware: \"deserializerMiddleware\",\n tags: [\"THROW_200_EXCEPTIONS\", \"S3\"],\n name: \"throw200ExceptionsMiddleware\",\n override: true,\n};\nexport const getThrow200ExceptionsPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(throw200ExceptionsMiddleware(config), throw200ExceptionsMiddlewareOptions);\n },\n});\n", "export const validate = (str) => typeof str === \"string\" && str.indexOf(\"arn:\") === 0 && str.split(\":\").length >= 6;\nexport const parse = (arn) => {\n const segments = arn.split(\":\");\n if (segments.length < 6 || segments[0] !== \"arn\")\n throw new Error(\"Malformed ARN\");\n const [, partition, service, region, accountId, ...resource] = segments;\n return {\n partition,\n service,\n region,\n accountId,\n resource: resource.join(\":\"),\n };\n};\nexport const build = (arnObject) => {\n const { partition = \"aws\", service, region, accountId, resource } = arnObject;\n if ([service, region, accountId, resource].some((segment) => typeof segment !== \"string\")) {\n throw new Error(\"Input ARN object is invalid\");\n }\n return `arn:${partition}:${service}:${region}:${accountId}:${resource}`;\n};\n", "export function bucketEndpointMiddleware(options) {\n return (next, context) => async (args) => {\n if (options.bucketEndpoint) {\n const endpoint = context.endpointV2;\n if (endpoint) {\n const bucket = args.input.Bucket;\n if (typeof bucket === \"string\") {\n try {\n const bucketEndpointUrl = new URL(bucket);\n context.endpointV2 = {\n ...endpoint,\n url: bucketEndpointUrl,\n };\n }\n catch (e) {\n const warning = `@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${bucket} could not be parsed as URL.`;\n if (context.logger?.constructor?.name === \"NoOpLogger\") {\n console.warn(warning);\n }\n else {\n context.logger?.warn?.(warning);\n }\n throw e;\n }\n }\n }\n }\n return next(args);\n };\n}\nexport const bucketEndpointMiddlewareOptions = {\n name: \"bucketEndpointMiddleware\",\n override: true,\n relation: \"after\",\n toMiddleware: \"endpointV2Middleware\",\n};\n", "import { validate as validateArn } from \"@aws-sdk/util-arn-parser\";\nimport { bucketEndpointMiddleware, bucketEndpointMiddlewareOptions } from \"./bucket-endpoint-middleware\";\nexport function validateBucketNameMiddleware({ bucketEndpoint }) {\n return (next) => async (args) => {\n const { input: { Bucket }, } = args;\n if (!bucketEndpoint && typeof Bucket === \"string\" && !validateArn(Bucket) && Bucket.indexOf(\"/\") >= 0) {\n const err = new Error(`Bucket name shouldn't contain '/', received '${Bucket}'`);\n err.name = \"InvalidBucketName\";\n throw err;\n }\n return next({ ...args });\n };\n}\nexport const validateBucketNameMiddlewareOptions = {\n step: \"initialize\",\n tags: [\"VALIDATE_BUCKET_NAME\"],\n name: \"validateBucketNameMiddleware\",\n override: true,\n};\nexport const getValidateBucketNamePlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(validateBucketNameMiddleware(options), validateBucketNameMiddlewareOptions);\n clientStack.addRelativeTo(bucketEndpointMiddleware(options), bucketEndpointMiddlewareOptions);\n },\n});\n", "export * from \"./check-content-length-header\";\nexport * from \"./region-redirect-endpoint-middleware\";\nexport * from \"./region-redirect-middleware\";\nexport * from \"./s3-expires-middleware\";\nexport * from \"./s3-express/index\";\nexport * from \"./s3Configuration\";\nexport * from \"./throw-200-exceptions\";\nexport * from \"./validate-bucket-name\";\n", "import { normalizeProvider } from \"@smithy/core\";\nexport const DEFAULT_UA_APP_ID = undefined;\nfunction isValidUserAgentAppId(appId) {\n if (appId === undefined) {\n return true;\n }\n return typeof appId === \"string\" && appId.length <= 50;\n}\nexport function resolveUserAgentConfig(input) {\n const normalizedAppIdProvider = normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID);\n const { customUserAgent } = input;\n return Object.assign(input, {\n customUserAgent: typeof customUserAgent === \"string\" ? [[customUserAgent]] : customUserAgent,\n userAgentAppId: async () => {\n const appId = await normalizedAppIdProvider();\n if (!isValidUserAgentAppId(appId)) {\n const logger = input.logger?.constructor?.name === \"NoOpLogger\" || !input.logger ? console : input.logger;\n if (typeof appId !== \"string\") {\n logger?.warn(\"userAgentAppId must be a string or undefined.\");\n }\n else if (appId.length > 50) {\n logger?.warn(\"The provided userAgentAppId exceeds the maximum length of 50 characters.\");\n }\n }\n return appId;\n },\n });\n}\n", "export class EndpointCache {\n capacity;\n data = new Map();\n parameters = [];\n constructor({ size, params }) {\n this.capacity = size ?? 50;\n if (params) {\n this.parameters = params;\n }\n }\n get(endpointParams, resolver) {\n const key = this.hash(endpointParams);\n if (key === false) {\n return resolver();\n }\n if (!this.data.has(key)) {\n if (this.data.size > this.capacity + 10) {\n const keys = this.data.keys();\n let i = 0;\n while (true) {\n const { value, done } = keys.next();\n this.data.delete(value);\n if (done || ++i > 10) {\n break;\n }\n }\n }\n this.data.set(key, resolver());\n }\n return this.data.get(key);\n }\n size() {\n return this.data.size;\n }\n hash(endpointParams) {\n let buffer = \"\";\n const { parameters } = this;\n if (parameters.length === 0) {\n return false;\n }\n for (const param of parameters) {\n const val = String(endpointParams[param] ?? \"\");\n if (val.includes(\"|;\")) {\n return false;\n }\n buffer += val + \"|;\";\n }\n return buffer;\n }\n}\n", "const IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}$`);\nexport const isIpAddress = (value) => IP_V4_REGEX.test(value) || (value.startsWith(\"[\") && value.endsWith(\"]\"));\n", "const VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);\nexport const isValidHostLabel = (value, allowSubDomains = false) => {\n if (!allowSubDomains) {\n return VALID_HOST_LABEL_REGEX.test(value);\n }\n const labels = value.split(\".\");\n for (const label of labels) {\n if (!isValidHostLabel(label)) {\n return false;\n }\n }\n return true;\n};\n", "export const customEndpointFunctions = {};\n", "export const debugId = \"endpoints\";\n", "export function toDebugString(input) {\n if (typeof input !== \"object\" || input == null) {\n return input;\n }\n if (\"ref\" in input) {\n return `$${toDebugString(input.ref)}`;\n }\n if (\"fn\" in input) {\n return `${input.fn}(${(input.argv || []).map(toDebugString).join(\", \")})`;\n }\n return JSON.stringify(input, null, 2);\n}\n", "export * from \"./debugId\";\nexport * from \"./toDebugString\";\n", "export class EndpointError extends Error {\n constructor(message) {\n super(message);\n this.name = \"EndpointError\";\n }\n}\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./EndpointError\";\nexport * from \"./EndpointFunctions\";\nexport * from \"./EndpointRuleObject\";\nexport * from \"./ErrorRuleObject\";\nexport * from \"./RuleSetObject\";\nexport * from \"./TreeRuleObject\";\nexport * from \"./shared\";\n", "export const booleanEquals = (value1, value2) => value1 === value2;\n", "import { EndpointError } from \"../types\";\nexport const getAttrPathList = (path) => {\n const parts = path.split(\".\");\n const pathList = [];\n for (const part of parts) {\n const squareBracketIndex = part.indexOf(\"[\");\n if (squareBracketIndex !== -1) {\n if (part.indexOf(\"]\") !== part.length - 1) {\n throw new EndpointError(`Path: '${path}' does not end with ']'`);\n }\n const arrayIndex = part.slice(squareBracketIndex + 1, -1);\n if (Number.isNaN(parseInt(arrayIndex))) {\n throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`);\n }\n if (squareBracketIndex !== 0) {\n pathList.push(part.slice(0, squareBracketIndex));\n }\n pathList.push(arrayIndex);\n }\n else {\n pathList.push(part);\n }\n }\n return pathList;\n};\n", "import { EndpointError } from \"../types\";\nimport { getAttrPathList } from \"./getAttrPathList\";\nexport const getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => {\n if (typeof acc !== \"object\") {\n throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`);\n }\n else if (Array.isArray(acc)) {\n return acc[parseInt(index)];\n }\n return acc[index];\n}, value);\n", "export const isSet = (value) => value != null;\n", "export const not = (value) => !value;\n", "import { EndpointURLScheme } from \"@smithy/types\";\nimport { isIpAddress } from \"./isIpAddress\";\nconst DEFAULT_PORTS = {\n [EndpointURLScheme.HTTP]: 80,\n [EndpointURLScheme.HTTPS]: 443,\n};\nexport const parseURL = (value) => {\n const whatwgURL = (() => {\n try {\n if (value instanceof URL) {\n return value;\n }\n if (typeof value === \"object\" && \"hostname\" in value) {\n const { hostname, port, protocol = \"\", path = \"\", query = {} } = value;\n const url = new URL(`${protocol}//${hostname}${port ? `:${port}` : \"\"}${path}`);\n url.search = Object.entries(query)\n .map(([k, v]) => `${k}=${v}`)\n .join(\"&\");\n return url;\n }\n return new URL(value);\n }\n catch (error) {\n return null;\n }\n })();\n if (!whatwgURL) {\n console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`);\n return null;\n }\n const urlString = whatwgURL.href;\n const { host, hostname, pathname, protocol, search } = whatwgURL;\n if (search) {\n return null;\n }\n const scheme = protocol.slice(0, -1);\n if (!Object.values(EndpointURLScheme).includes(scheme)) {\n return null;\n }\n const isIp = isIpAddress(hostname);\n const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) ||\n (typeof value === \"string\" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`));\n const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`;\n return {\n scheme,\n authority,\n path: pathname,\n normalizedPath: pathname.endsWith(\"/\") ? pathname : `${pathname}/`,\n isIp,\n };\n};\n", "export const stringEquals = (value1, value2) => value1 === value2;\n", "export const substring = (input, start, stop, reverse) => {\n if (start >= stop || input.length < stop || /[^\\u0000-\\u007f]/.test(input)) {\n return null;\n }\n if (!reverse) {\n return input.substring(start, stop);\n }\n return input.substring(input.length - stop, input.length - start);\n};\n", "export const uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);\n", "export * from \"./booleanEquals\";\nexport * from \"./getAttr\";\nexport * from \"./isSet\";\nexport * from \"./isValidHostLabel\";\nexport * from \"./not\";\nexport * from \"./parseURL\";\nexport * from \"./stringEquals\";\nexport * from \"./substring\";\nexport * from \"./uriEncode\";\n", "import { booleanEquals, getAttr, isSet, isValidHostLabel, not, parseURL, stringEquals, substring, uriEncode, } from \"../lib\";\nexport const endpointFunctions = {\n booleanEquals,\n getAttr,\n isSet,\n isValidHostLabel,\n not,\n parseURL,\n stringEquals,\n substring,\n uriEncode,\n};\n", "import { getAttr } from \"../lib\";\nexport const evaluateTemplate = (template, options) => {\n const evaluatedTemplateArr = [];\n const templateContext = {\n ...options.endpointParams,\n ...options.referenceRecord,\n };\n let currentIndex = 0;\n while (currentIndex < template.length) {\n const openingBraceIndex = template.indexOf(\"{\", currentIndex);\n if (openingBraceIndex === -1) {\n evaluatedTemplateArr.push(template.slice(currentIndex));\n break;\n }\n evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex));\n const closingBraceIndex = template.indexOf(\"}\", openingBraceIndex);\n if (closingBraceIndex === -1) {\n evaluatedTemplateArr.push(template.slice(openingBraceIndex));\n break;\n }\n if (template[openingBraceIndex + 1] === \"{\" && template[closingBraceIndex + 1] === \"}\") {\n evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex));\n currentIndex = closingBraceIndex + 2;\n }\n const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex);\n if (parameterName.includes(\"#\")) {\n const [refName, attrName] = parameterName.split(\"#\");\n evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName));\n }\n else {\n evaluatedTemplateArr.push(templateContext[parameterName]);\n }\n currentIndex = closingBraceIndex + 1;\n }\n return evaluatedTemplateArr.join(\"\");\n};\n", "export const getReferenceValue = ({ ref }, options) => {\n const referenceRecord = {\n ...options.endpointParams,\n ...options.referenceRecord,\n };\n return referenceRecord[ref];\n};\n", "import { EndpointError } from \"../types\";\nimport { customEndpointFunctions } from \"./customEndpointFunctions\";\nimport { endpointFunctions } from \"./endpointFunctions\";\nimport { evaluateTemplate } from \"./evaluateTemplate\";\nimport { getReferenceValue } from \"./getReferenceValue\";\nexport const evaluateExpression = (obj, keyName, options) => {\n if (typeof obj === \"string\") {\n return evaluateTemplate(obj, options);\n }\n else if (obj[\"fn\"]) {\n return group.callFunction(obj, options);\n }\n else if (obj[\"ref\"]) {\n return getReferenceValue(obj, options);\n }\n throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);\n};\nexport const callFunction = ({ fn, argv }, options) => {\n const evaluatedArgs = argv.map((arg) => [\"boolean\", \"number\"].includes(typeof arg) ? arg : group.evaluateExpression(arg, \"arg\", options));\n const fnSegments = fn.split(\".\");\n if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) {\n return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs);\n }\n return endpointFunctions[fn](...evaluatedArgs);\n};\nexport const group = {\n evaluateExpression,\n callFunction,\n};\n", "export { callFunction } from \"./evaluateExpression\";\n", "import { debugId, toDebugString } from \"../debug\";\nimport { EndpointError } from \"../types\";\nimport { callFunction } from \"./callFunction\";\nexport const evaluateCondition = ({ assign, ...fnArgs }, options) => {\n if (assign && assign in options.referenceRecord) {\n throw new EndpointError(`'${assign}' is already defined in Reference Record.`);\n }\n const value = callFunction(fnArgs, options);\n options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`);\n return {\n result: value === \"\" ? true : !!value,\n ...(assign != null && { toAssign: { name: assign, value } }),\n };\n};\n", "import { debugId, toDebugString } from \"../debug\";\nimport { evaluateCondition } from \"./evaluateCondition\";\nexport const evaluateConditions = (conditions = [], options) => {\n const conditionsReferenceRecord = {};\n for (const condition of conditions) {\n const { result, toAssign } = evaluateCondition(condition, {\n ...options,\n referenceRecord: {\n ...options.referenceRecord,\n ...conditionsReferenceRecord,\n },\n });\n if (!result) {\n return { result };\n }\n if (toAssign) {\n conditionsReferenceRecord[toAssign.name] = toAssign.value;\n options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`);\n }\n }\n return { result: true, referenceRecord: conditionsReferenceRecord };\n};\n", "import { EndpointError } from \"../types\";\nimport { evaluateExpression } from \"./evaluateExpression\";\nexport const getEndpointHeaders = (headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({\n ...acc,\n [headerKey]: headerVal.map((headerValEntry) => {\n const processedExpr = evaluateExpression(headerValEntry, \"Header value entry\", options);\n if (typeof processedExpr !== \"string\") {\n throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`);\n }\n return processedExpr;\n }),\n}), {});\n", "import { EndpointError } from \"../types\";\nimport { evaluateTemplate } from \"./evaluateTemplate\";\nexport const getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({\n ...acc,\n [propertyKey]: group.getEndpointProperty(propertyVal, options),\n}), {});\nexport const getEndpointProperty = (property, options) => {\n if (Array.isArray(property)) {\n return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));\n }\n switch (typeof property) {\n case \"string\":\n return evaluateTemplate(property, options);\n case \"object\":\n if (property === null) {\n throw new EndpointError(`Unexpected endpoint property: ${property}`);\n }\n return group.getEndpointProperties(property, options);\n case \"boolean\":\n return property;\n default:\n throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`);\n }\n};\nexport const group = {\n getEndpointProperty,\n getEndpointProperties,\n};\n", "import { EndpointError } from \"../types\";\nimport { evaluateExpression } from \"./evaluateExpression\";\nexport const getEndpointUrl = (endpointUrl, options) => {\n const expression = evaluateExpression(endpointUrl, \"Endpoint URL\", options);\n if (typeof expression === \"string\") {\n try {\n return new URL(expression);\n }\n catch (error) {\n console.error(`Failed to construct URL with ${expression}`, error);\n throw error;\n }\n }\n throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`);\n};\n", "import { debugId, toDebugString } from \"../debug\";\nimport { evaluateConditions } from \"./evaluateConditions\";\nimport { getEndpointHeaders } from \"./getEndpointHeaders\";\nimport { getEndpointProperties } from \"./getEndpointProperties\";\nimport { getEndpointUrl } from \"./getEndpointUrl\";\nexport const evaluateEndpointRule = (endpointRule, options) => {\n const { conditions, endpoint } = endpointRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n const endpointRuleOptions = {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord },\n };\n const { url, properties, headers } = endpoint;\n options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`);\n return {\n ...(headers != undefined && {\n headers: getEndpointHeaders(headers, endpointRuleOptions),\n }),\n ...(properties != undefined && {\n properties: getEndpointProperties(properties, endpointRuleOptions),\n }),\n url: getEndpointUrl(url, endpointRuleOptions),\n };\n};\n", "import { EndpointError } from \"../types\";\nimport { evaluateConditions } from \"./evaluateConditions\";\nimport { evaluateExpression } from \"./evaluateExpression\";\nexport const evaluateErrorRule = (errorRule, options) => {\n const { conditions, error } = errorRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n throw new EndpointError(evaluateExpression(error, \"Error\", {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord },\n }));\n};\n", "import { EndpointError } from \"../types\";\nimport { evaluateConditions } from \"./evaluateConditions\";\nimport { evaluateEndpointRule } from \"./evaluateEndpointRule\";\nimport { evaluateErrorRule } from \"./evaluateErrorRule\";\nexport const evaluateRules = (rules, options) => {\n for (const rule of rules) {\n if (rule.type === \"endpoint\") {\n const endpointOrUndefined = evaluateEndpointRule(rule, options);\n if (endpointOrUndefined) {\n return endpointOrUndefined;\n }\n }\n else if (rule.type === \"error\") {\n evaluateErrorRule(rule, options);\n }\n else if (rule.type === \"tree\") {\n const endpointOrUndefined = group.evaluateTreeRule(rule, options);\n if (endpointOrUndefined) {\n return endpointOrUndefined;\n }\n }\n else {\n throw new EndpointError(`Unknown endpoint rule: ${rule}`);\n }\n }\n throw new EndpointError(`Rules evaluation failed`);\n};\nexport const evaluateTreeRule = (treeRule, options) => {\n const { conditions, rules } = treeRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n return group.evaluateRules(rules, {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord },\n });\n};\nexport const group = {\n evaluateRules,\n evaluateTreeRule,\n};\n", "export * from \"./customEndpointFunctions\";\nexport * from \"./evaluateRules\";\n", "import { debugId, toDebugString } from \"./debug\";\nimport { EndpointError } from \"./types\";\nimport { evaluateRules } from \"./utils\";\nexport const resolveEndpoint = (ruleSetObject, options) => {\n const { endpointParams, logger } = options;\n const { parameters, rules } = ruleSetObject;\n options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);\n const paramsWithDefault = Object.entries(parameters)\n .filter(([, v]) => v.default != null)\n .map(([k, v]) => [k, v.default]);\n if (paramsWithDefault.length > 0) {\n for (const [paramKey, paramDefaultValue] of paramsWithDefault) {\n endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue;\n }\n }\n const requiredParams = Object.entries(parameters)\n .filter(([, v]) => v.required)\n .map(([k]) => k);\n for (const requiredParam of requiredParams) {\n if (endpointParams[requiredParam] == null) {\n throw new EndpointError(`Missing required parameter: '${requiredParam}'`);\n }\n }\n const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} });\n options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`);\n return endpoint;\n};\n", "export * from \"./cache/EndpointCache\";\nexport * from \"./lib/isIpAddress\";\nexport * from \"./lib/isValidHostLabel\";\nexport * from \"./utils/customEndpointFunctions\";\nexport * from \"./resolveEndpoint\";\nexport * from \"./types\";\n", "export { isIpAddress } from \"@smithy/util-endpoints\";\n", "import { isValidHostLabel } from \"@smithy/util-endpoints\";\nimport { isIpAddress } from \"../isIpAddress\";\nexport const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {\n if (allowSubDomains) {\n for (const label of value.split(\".\")) {\n if (!isVirtualHostableS3Bucket(label)) {\n return false;\n }\n }\n return true;\n }\n if (!isValidHostLabel(value)) {\n return false;\n }\n if (value.length < 3 || value.length > 63) {\n return false;\n }\n if (value !== value.toLowerCase()) {\n return false;\n }\n if (isIpAddress(value)) {\n return false;\n }\n return true;\n};\n", "const ARN_DELIMITER = \":\";\nconst RESOURCE_DELIMITER = \"/\";\nexport const parseArn = (value) => {\n const segments = value.split(ARN_DELIMITER);\n if (segments.length < 6)\n return null;\n const [arn, partition, service, region, accountId, ...resourcePath] = segments;\n if (arn !== \"arn\" || partition === \"\" || service === \"\" || resourcePath.join(ARN_DELIMITER) === \"\")\n return null;\n const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat();\n return {\n partition,\n service,\n region,\n accountId,\n resourceId,\n };\n};\n", "{\n \"partitions\": [{\n \"id\": \"aws\",\n \"outputs\": {\n \"dnsSuffix\": \"amazonaws.com\",\n \"dualStackDnsSuffix\": \"api.aws\",\n \"implicitGlobalRegion\": \"us-east-1\",\n \"name\": \"aws\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"af-south-1\": {\n \"description\": \"Africa (Cape Town)\"\n },\n \"ap-east-1\": {\n \"description\": \"Asia Pacific (Hong Kong)\"\n },\n \"ap-east-2\": {\n \"description\": \"Asia Pacific (Taipei)\"\n },\n \"ap-northeast-1\": {\n \"description\": \"Asia Pacific (Tokyo)\"\n },\n \"ap-northeast-2\": {\n \"description\": \"Asia Pacific (Seoul)\"\n },\n \"ap-northeast-3\": {\n \"description\": \"Asia Pacific (Osaka)\"\n },\n \"ap-south-1\": {\n \"description\": \"Asia Pacific (Mumbai)\"\n },\n \"ap-south-2\": {\n \"description\": \"Asia Pacific (Hyderabad)\"\n },\n \"ap-southeast-1\": {\n \"description\": \"Asia Pacific (Singapore)\"\n },\n \"ap-southeast-2\": {\n \"description\": \"Asia Pacific (Sydney)\"\n },\n \"ap-southeast-3\": {\n \"description\": \"Asia Pacific (Jakarta)\"\n },\n \"ap-southeast-4\": {\n \"description\": \"Asia Pacific (Melbourne)\"\n },\n \"ap-southeast-5\": {\n \"description\": \"Asia Pacific (Malaysia)\"\n },\n \"ap-southeast-6\": {\n \"description\": \"Asia Pacific (New Zealand)\"\n },\n \"ap-southeast-7\": {\n \"description\": \"Asia Pacific (Thailand)\"\n },\n \"aws-global\": {\n \"description\": \"aws global region\"\n },\n \"ca-central-1\": {\n \"description\": \"Canada (Central)\"\n },\n \"ca-west-1\": {\n \"description\": \"Canada West (Calgary)\"\n },\n \"eu-central-1\": {\n \"description\": \"Europe (Frankfurt)\"\n },\n \"eu-central-2\": {\n \"description\": \"Europe (Zurich)\"\n },\n \"eu-north-1\": {\n \"description\": \"Europe (Stockholm)\"\n },\n \"eu-south-1\": {\n \"description\": \"Europe (Milan)\"\n },\n \"eu-south-2\": {\n \"description\": \"Europe (Spain)\"\n },\n \"eu-west-1\": {\n \"description\": \"Europe (Ireland)\"\n },\n \"eu-west-2\": {\n \"description\": \"Europe (London)\"\n },\n \"eu-west-3\": {\n \"description\": \"Europe (Paris)\"\n },\n \"il-central-1\": {\n \"description\": \"Israel (Tel Aviv)\"\n },\n \"me-central-1\": {\n \"description\": \"Middle East (UAE)\"\n },\n \"me-south-1\": {\n \"description\": \"Middle East (Bahrain)\"\n },\n \"mx-central-1\": {\n \"description\": \"Mexico (Central)\"\n },\n \"sa-east-1\": {\n \"description\": \"South America (Sao Paulo)\"\n },\n \"us-east-1\": {\n \"description\": \"US East (N. Virginia)\"\n },\n \"us-east-2\": {\n \"description\": \"US East (Ohio)\"\n },\n \"us-west-1\": {\n \"description\": \"US West (N. California)\"\n },\n \"us-west-2\": {\n \"description\": \"US West (Oregon)\"\n }\n }\n }, {\n \"id\": \"aws-cn\",\n \"outputs\": {\n \"dnsSuffix\": \"amazonaws.com.cn\",\n \"dualStackDnsSuffix\": \"api.amazonwebservices.com.cn\",\n \"implicitGlobalRegion\": \"cn-northwest-1\",\n \"name\": \"aws-cn\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^cn\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-cn-global\": {\n \"description\": \"aws-cn global region\"\n },\n \"cn-north-1\": {\n \"description\": \"China (Beijing)\"\n },\n \"cn-northwest-1\": {\n \"description\": \"China (Ningxia)\"\n }\n }\n }, {\n \"id\": \"aws-eusc\",\n \"outputs\": {\n \"dnsSuffix\": \"amazonaws.eu\",\n \"dualStackDnsSuffix\": \"api.amazonwebservices.eu\",\n \"implicitGlobalRegion\": \"eusc-de-east-1\",\n \"name\": \"aws-eusc\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"eusc-de-east-1\": {\n \"description\": \"AWS European Sovereign Cloud (Germany)\"\n }\n }\n }, {\n \"id\": \"aws-iso\",\n \"outputs\": {\n \"dnsSuffix\": \"c2s.ic.gov\",\n \"dualStackDnsSuffix\": \"api.aws.ic.gov\",\n \"implicitGlobalRegion\": \"us-iso-east-1\",\n \"name\": \"aws-iso\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-iso-global\": {\n \"description\": \"aws-iso global region\"\n },\n \"us-iso-east-1\": {\n \"description\": \"US ISO East\"\n },\n \"us-iso-west-1\": {\n \"description\": \"US ISO WEST\"\n }\n }\n }, {\n \"id\": \"aws-iso-b\",\n \"outputs\": {\n \"dnsSuffix\": \"sc2s.sgov.gov\",\n \"dualStackDnsSuffix\": \"api.aws.scloud\",\n \"implicitGlobalRegion\": \"us-isob-east-1\",\n \"name\": \"aws-iso-b\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-iso-b-global\": {\n \"description\": \"aws-iso-b global region\"\n },\n \"us-isob-east-1\": {\n \"description\": \"US ISOB East (Ohio)\"\n },\n \"us-isob-west-1\": {\n \"description\": \"US ISOB West\"\n }\n }\n }, {\n \"id\": \"aws-iso-e\",\n \"outputs\": {\n \"dnsSuffix\": \"cloud.adc-e.uk\",\n \"dualStackDnsSuffix\": \"api.cloud-aws.adc-e.uk\",\n \"implicitGlobalRegion\": \"eu-isoe-west-1\",\n \"name\": \"aws-iso-e\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-iso-e-global\": {\n \"description\": \"aws-iso-e global region\"\n },\n \"eu-isoe-west-1\": {\n \"description\": \"EU ISOE West\"\n }\n }\n }, {\n \"id\": \"aws-iso-f\",\n \"outputs\": {\n \"dnsSuffix\": \"csp.hci.ic.gov\",\n \"dualStackDnsSuffix\": \"api.aws.hci.ic.gov\",\n \"implicitGlobalRegion\": \"us-isof-south-1\",\n \"name\": \"aws-iso-f\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-iso-f-global\": {\n \"description\": \"aws-iso-f global region\"\n },\n \"us-isof-east-1\": {\n \"description\": \"US ISOF EAST\"\n },\n \"us-isof-south-1\": {\n \"description\": \"US ISOF SOUTH\"\n }\n }\n }, {\n \"id\": \"aws-us-gov\",\n \"outputs\": {\n \"dnsSuffix\": \"amazonaws.com\",\n \"dualStackDnsSuffix\": \"api.aws\",\n \"implicitGlobalRegion\": \"us-gov-west-1\",\n \"name\": \"aws-us-gov\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-us-gov-global\": {\n \"description\": \"aws-us-gov global region\"\n },\n \"us-gov-east-1\": {\n \"description\": \"AWS GovCloud (US-East)\"\n },\n \"us-gov-west-1\": {\n \"description\": \"AWS GovCloud (US-West)\"\n }\n }\n }],\n \"version\": \"1.1\"\n}\n", "import partitionsInfo from \"./partitions.json\";\nlet selectedPartitionsInfo = partitionsInfo;\nlet selectedUserAgentPrefix = \"\";\nexport const partition = (value) => {\n const { partitions } = selectedPartitionsInfo;\n for (const partition of partitions) {\n const { regions, outputs } = partition;\n for (const [region, regionData] of Object.entries(regions)) {\n if (region === value) {\n return {\n ...outputs,\n ...regionData,\n };\n }\n }\n }\n for (const partition of partitions) {\n const { regionRegex, outputs } = partition;\n if (new RegExp(regionRegex).test(value)) {\n return {\n ...outputs,\n };\n }\n }\n const DEFAULT_PARTITION = partitions.find((partition) => partition.id === \"aws\");\n if (!DEFAULT_PARTITION) {\n throw new Error(\"Provided region was not found in the partition array or regex,\" +\n \" and default partition with id 'aws' doesn't exist.\");\n }\n return {\n ...DEFAULT_PARTITION.outputs,\n };\n};\nexport const setPartitionInfo = (partitionsInfo, userAgentPrefix = \"\") => {\n selectedPartitionsInfo = partitionsInfo;\n selectedUserAgentPrefix = userAgentPrefix;\n};\nexport const useDefaultPartitionInfo = () => {\n setPartitionInfo(partitionsInfo, \"\");\n};\nexport const getUserAgentPrefix = () => selectedUserAgentPrefix;\n", "import { customEndpointFunctions } from \"@smithy/util-endpoints\";\nimport { isVirtualHostableS3Bucket } from \"./lib/aws/isVirtualHostableS3Bucket\";\nimport { parseArn } from \"./lib/aws/parseArn\";\nimport { partition } from \"./lib/aws/partition\";\nexport const awsEndpointFunctions = {\n isVirtualHostableS3Bucket: isVirtualHostableS3Bucket,\n parseArn: parseArn,\n partition: partition,\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n", "import { parseUrl } from \"@smithy/url-parser\";\nexport const resolveDefaultAwsRegionalEndpointsConfig = (input) => {\n if (typeof input.endpointProvider !== \"function\") {\n throw new Error(\"@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.\");\n }\n const { endpoint } = input;\n if (endpoint === undefined) {\n input.endpoint = async () => {\n return toEndpointV1(input.endpointProvider({\n Region: typeof input.region === \"function\" ? await input.region() : input.region,\n UseDualStack: typeof input.useDualstackEndpoint === \"function\"\n ? await input.useDualstackEndpoint()\n : input.useDualstackEndpoint,\n UseFIPS: typeof input.useFipsEndpoint === \"function\" ? await input.useFipsEndpoint() : input.useFipsEndpoint,\n Endpoint: undefined,\n }, { logger: input.logger }));\n };\n }\n return input;\n};\nexport const toEndpointV1 = (endpoint) => parseUrl(endpoint.url);\n", "export { resolveEndpoint } from \"@smithy/util-endpoints\";\n", "export { EndpointError } from \"@smithy/util-endpoints\";\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./EndpointError\";\nexport * from \"./EndpointRuleObject\";\nexport * from \"./ErrorRuleObject\";\nexport * from \"./RuleSetObject\";\nexport * from \"./TreeRuleObject\";\nexport * from \"./shared\";\n", "export * from \"./aws\";\nexport * from \"./lib/aws/partition\";\nexport * from \"./lib/isIpAddress\";\nexport * from \"./resolveDefaultAwsRegionalEndpointsConfig\";\nexport * from \"./resolveEndpoint\";\nexport * from \"./types\";\n", "export var RETRY_MODES;\n(function (RETRY_MODES) {\n RETRY_MODES[\"STANDARD\"] = \"standard\";\n RETRY_MODES[\"ADAPTIVE\"] = \"adaptive\";\n})(RETRY_MODES || (RETRY_MODES = {}));\nexport const DEFAULT_MAX_ATTEMPTS = 3;\nexport const DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD;\n", "export const CLOCK_SKEW_ERROR_CODES = [\n \"AuthFailure\",\n \"InvalidSignatureException\",\n \"RequestExpired\",\n \"RequestInTheFuture\",\n \"RequestTimeTooSkewed\",\n \"SignatureDoesNotMatch\",\n];\nexport const THROTTLING_ERROR_CODES = [\n \"BandwidthLimitExceeded\",\n \"EC2ThrottledException\",\n \"LimitExceededException\",\n \"PriorRequestNotComplete\",\n \"ProvisionedThroughputExceededException\",\n \"RequestLimitExceeded\",\n \"RequestThrottled\",\n \"RequestThrottledException\",\n \"SlowDown\",\n \"ThrottledException\",\n \"Throttling\",\n \"ThrottlingException\",\n \"TooManyRequestsException\",\n \"TransactionInProgressException\",\n];\nexport const TRANSIENT_ERROR_CODES = [\"TimeoutError\", \"RequestTimeout\", \"RequestTimeoutException\"];\nexport const TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];\nexport const NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"ECONNREFUSED\", \"EPIPE\", \"ETIMEDOUT\"];\nexport const NODEJS_NETWORK_ERROR_CODES = [\"EHOSTUNREACH\", \"ENETUNREACH\", \"ENOTFOUND\"];\n", "import { CLOCK_SKEW_ERROR_CODES, NODEJS_NETWORK_ERROR_CODES, NODEJS_TIMEOUT_ERROR_CODES, THROTTLING_ERROR_CODES, TRANSIENT_ERROR_CODES, TRANSIENT_ERROR_STATUS_CODES, } from \"./constants\";\nexport const isRetryableByTrait = (error) => error?.$retryable !== undefined;\nexport const isClockSkewError = (error) => CLOCK_SKEW_ERROR_CODES.includes(error.name);\nexport const isClockSkewCorrectedError = (error) => error.$metadata?.clockSkewCorrected;\nexport const isBrowserNetworkError = (error) => {\n const errorMessages = new Set([\n \"Failed to fetch\",\n \"NetworkError when attempting to fetch resource\",\n \"The Internet connection appears to be offline\",\n \"Load failed\",\n \"Network request failed\",\n ]);\n const isValid = error && error instanceof TypeError;\n if (!isValid) {\n return false;\n }\n return errorMessages.has(error.message);\n};\nexport const isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 ||\n THROTTLING_ERROR_CODES.includes(error.name) ||\n error.$retryable?.throttling == true;\nexport const isTransientError = (error, depth = 0) => isRetryableByTrait(error) ||\n isClockSkewCorrectedError(error) ||\n TRANSIENT_ERROR_CODES.includes(error.name) ||\n NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || \"\") ||\n NODEJS_NETWORK_ERROR_CODES.includes(error?.code || \"\") ||\n TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) ||\n isBrowserNetworkError(error) ||\n (error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1));\nexport const isServerError = (error) => {\n if (error.$metadata?.httpStatusCode !== undefined) {\n const statusCode = error.$metadata.httpStatusCode;\n if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) {\n return true;\n }\n return false;\n }\n return false;\n};\n", "import { isThrottlingError } from \"@smithy/service-error-classification\";\nexport class DefaultRateLimiter {\n static setTimeoutFn = setTimeout;\n beta;\n minCapacity;\n minFillRate;\n scaleConstant;\n smooth;\n currentCapacity = 0;\n enabled = false;\n lastMaxRate = 0;\n measuredTxRate = 0;\n requestCount = 0;\n fillRate;\n lastThrottleTime;\n lastTimestamp = 0;\n lastTxRateBucket;\n maxCapacity;\n timeWindow = 0;\n constructor(options) {\n this.beta = options?.beta ?? 0.7;\n this.minCapacity = options?.minCapacity ?? 1;\n this.minFillRate = options?.minFillRate ?? 0.5;\n this.scaleConstant = options?.scaleConstant ?? 0.4;\n this.smooth = options?.smooth ?? 0.8;\n const currentTimeInSeconds = this.getCurrentTimeInSeconds();\n this.lastThrottleTime = currentTimeInSeconds;\n this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());\n this.fillRate = this.minFillRate;\n this.maxCapacity = this.minCapacity;\n }\n getCurrentTimeInSeconds() {\n return Date.now() / 1000;\n }\n async getSendToken() {\n return this.acquireTokenBucket(1);\n }\n async acquireTokenBucket(amount) {\n if (!this.enabled) {\n return;\n }\n this.refillTokenBucket();\n if (amount > this.currentCapacity) {\n const delay = ((amount - this.currentCapacity) / this.fillRate) * 1000;\n await new Promise((resolve) => DefaultRateLimiter.setTimeoutFn(resolve, delay));\n }\n this.currentCapacity = this.currentCapacity - amount;\n }\n refillTokenBucket() {\n const timestamp = this.getCurrentTimeInSeconds();\n if (!this.lastTimestamp) {\n this.lastTimestamp = timestamp;\n return;\n }\n const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate;\n this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount);\n this.lastTimestamp = timestamp;\n }\n updateClientSendingRate(response) {\n let calculatedRate;\n this.updateMeasuredRate();\n if (isThrottlingError(response)) {\n const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);\n this.lastMaxRate = rateToUse;\n this.calculateTimeWindow();\n this.lastThrottleTime = this.getCurrentTimeInSeconds();\n calculatedRate = this.cubicThrottle(rateToUse);\n this.enableTokenBucket();\n }\n else {\n this.calculateTimeWindow();\n calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());\n }\n const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);\n this.updateTokenBucketRate(newRate);\n }\n calculateTimeWindow() {\n this.timeWindow = this.getPrecise(Math.pow((this.lastMaxRate * (1 - this.beta)) / this.scaleConstant, 1 / 3));\n }\n cubicThrottle(rateToUse) {\n return this.getPrecise(rateToUse * this.beta);\n }\n cubicSuccess(timestamp) {\n return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate);\n }\n enableTokenBucket() {\n this.enabled = true;\n }\n updateTokenBucketRate(newRate) {\n this.refillTokenBucket();\n this.fillRate = Math.max(newRate, this.minFillRate);\n this.maxCapacity = Math.max(newRate, this.minCapacity);\n this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity);\n }\n updateMeasuredRate() {\n const t = this.getCurrentTimeInSeconds();\n const timeBucket = Math.floor(t * 2) / 2;\n this.requestCount++;\n if (timeBucket > this.lastTxRateBucket) {\n const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);\n this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));\n this.requestCount = 0;\n this.lastTxRateBucket = timeBucket;\n }\n }\n getPrecise(num) {\n return parseFloat(num.toFixed(8));\n }\n}\n", "export const DEFAULT_RETRY_DELAY_BASE = 100;\nexport const MAXIMUM_RETRY_DELAY = 20 * 1000;\nexport const THROTTLING_RETRY_DELAY_BASE = 500;\nexport const INITIAL_RETRY_TOKENS = 500;\nexport const RETRY_COST = 5;\nexport const TIMEOUT_RETRY_COST = 10;\nexport const NO_RETRY_INCREMENT = 1;\nexport const INVOCATION_ID_HEADER = \"amz-sdk-invocation-id\";\nexport const REQUEST_HEADER = \"amz-sdk-request\";\n", "import { DEFAULT_RETRY_DELAY_BASE, MAXIMUM_RETRY_DELAY } from \"./constants\";\nexport const getDefaultRetryBackoffStrategy = () => {\n let delayBase = DEFAULT_RETRY_DELAY_BASE;\n const computeNextBackoffDelay = (attempts) => {\n return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));\n };\n const setDelayBase = (delay) => {\n delayBase = delay;\n };\n return {\n computeNextBackoffDelay,\n setDelayBase,\n };\n};\n", "import { MAXIMUM_RETRY_DELAY } from \"./constants\";\nexport const createDefaultRetryToken = ({ retryDelay, retryCount, retryCost, }) => {\n const getRetryCount = () => retryCount;\n const getRetryDelay = () => Math.min(MAXIMUM_RETRY_DELAY, retryDelay);\n const getRetryCost = () => retryCost;\n return {\n getRetryCount,\n getRetryDelay,\n getRetryCost,\n };\n};\n", "import { DEFAULT_MAX_ATTEMPTS, RETRY_MODES } from \"./config\";\nimport { DEFAULT_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, NO_RETRY_INCREMENT, RETRY_COST, THROTTLING_RETRY_DELAY_BASE, TIMEOUT_RETRY_COST, } from \"./constants\";\nimport { getDefaultRetryBackoffStrategy } from \"./defaultRetryBackoffStrategy\";\nimport { createDefaultRetryToken } from \"./defaultRetryToken\";\nexport class StandardRetryStrategy {\n maxAttempts;\n mode = RETRY_MODES.STANDARD;\n capacity = INITIAL_RETRY_TOKENS;\n retryBackoffStrategy = getDefaultRetryBackoffStrategy();\n maxAttemptsProvider;\n constructor(maxAttempts) {\n this.maxAttempts = maxAttempts;\n this.maxAttemptsProvider = typeof maxAttempts === \"function\" ? maxAttempts : async () => maxAttempts;\n }\n async acquireInitialRetryToken(retryTokenScope) {\n return createDefaultRetryToken({\n retryDelay: DEFAULT_RETRY_DELAY_BASE,\n retryCount: 0,\n });\n }\n async refreshRetryTokenForRetry(token, errorInfo) {\n const maxAttempts = await this.getMaxAttempts();\n if (this.shouldRetry(token, errorInfo, maxAttempts)) {\n const errorType = errorInfo.errorType;\n this.retryBackoffStrategy.setDelayBase(errorType === \"THROTTLING\" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE);\n const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount());\n const retryDelay = errorInfo.retryAfterHint\n ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType)\n : delayFromErrorType;\n const capacityCost = this.getCapacityCost(errorType);\n this.capacity -= capacityCost;\n return createDefaultRetryToken({\n retryDelay,\n retryCount: token.getRetryCount() + 1,\n retryCost: capacityCost,\n });\n }\n throw new Error(\"No retry token available\");\n }\n recordSuccess(token) {\n this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT));\n }\n getCapacity() {\n return this.capacity;\n }\n async getMaxAttempts() {\n try {\n return await this.maxAttemptsProvider();\n }\n catch (error) {\n console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);\n return DEFAULT_MAX_ATTEMPTS;\n }\n }\n shouldRetry(tokenToRenew, errorInfo, maxAttempts) {\n const attempts = tokenToRenew.getRetryCount() + 1;\n return (attempts < maxAttempts &&\n this.capacity >= this.getCapacityCost(errorInfo.errorType) &&\n this.isRetryableError(errorInfo.errorType));\n }\n getCapacityCost(errorType) {\n return errorType === \"TRANSIENT\" ? TIMEOUT_RETRY_COST : RETRY_COST;\n }\n isRetryableError(errorType) {\n return errorType === \"THROTTLING\" || errorType === \"TRANSIENT\";\n }\n}\n", "import { RETRY_MODES } from \"./config\";\nimport { DefaultRateLimiter } from \"./DefaultRateLimiter\";\nimport { StandardRetryStrategy } from \"./StandardRetryStrategy\";\nexport class AdaptiveRetryStrategy {\n maxAttemptsProvider;\n rateLimiter;\n standardRetryStrategy;\n mode = RETRY_MODES.ADAPTIVE;\n constructor(maxAttemptsProvider, options) {\n this.maxAttemptsProvider = maxAttemptsProvider;\n const { rateLimiter } = options ?? {};\n this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();\n this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider);\n }\n async acquireInitialRetryToken(retryTokenScope) {\n await this.rateLimiter.getSendToken();\n return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);\n }\n async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {\n this.rateLimiter.updateClientSendingRate(errorInfo);\n return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);\n }\n recordSuccess(token) {\n this.rateLimiter.updateClientSendingRate({});\n this.standardRetryStrategy.recordSuccess(token);\n }\n}\n", "import { DEFAULT_RETRY_DELAY_BASE } from \"./constants\";\nimport { StandardRetryStrategy } from \"./StandardRetryStrategy\";\nexport class ConfiguredRetryStrategy extends StandardRetryStrategy {\n computeNextBackoffDelay;\n constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) {\n super(typeof maxAttempts === \"function\" ? maxAttempts : async () => maxAttempts);\n if (typeof computeNextBackoffDelay === \"number\") {\n this.computeNextBackoffDelay = () => computeNextBackoffDelay;\n }\n else {\n this.computeNextBackoffDelay = computeNextBackoffDelay;\n }\n }\n async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {\n const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo);\n token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount());\n return token;\n }\n}\n", "export {};\n", "export * from \"./AdaptiveRetryStrategy\";\nexport * from \"./ConfiguredRetryStrategy\";\nexport * from \"./DefaultRateLimiter\";\nexport * from \"./StandardRetryStrategy\";\nexport * from \"./config\";\nexport * from \"./constants\";\nexport * from \"./types\";\n", "import { setFeature } from \"@aws-sdk/core\";\nimport { RETRY_MODES } from \"@smithy/util-retry\";\nconst ACCOUNT_ID_ENDPOINT_REGEX = /\\d{12}\\.ddb/;\nexport async function checkFeatures(context, config, args) {\n const request = args.request;\n if (request?.headers?.[\"smithy-protocol\"] === \"rpc-v2-cbor\") {\n setFeature(context, \"PROTOCOL_RPC_V2_CBOR\", \"M\");\n }\n if (typeof config.retryStrategy === \"function\") {\n const retryStrategy = await config.retryStrategy();\n if (typeof retryStrategy.mode === \"string\") {\n switch (retryStrategy.mode) {\n case RETRY_MODES.ADAPTIVE:\n setFeature(context, \"RETRY_MODE_ADAPTIVE\", \"F\");\n break;\n case RETRY_MODES.STANDARD:\n setFeature(context, \"RETRY_MODE_STANDARD\", \"E\");\n break;\n }\n }\n }\n if (typeof config.accountIdEndpointMode === \"function\") {\n const endpointV2 = context.endpointV2;\n if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {\n setFeature(context, \"ACCOUNT_ID_ENDPOINT\", \"O\");\n }\n switch (await config.accountIdEndpointMode?.()) {\n case \"disabled\":\n setFeature(context, \"ACCOUNT_ID_MODE_DISABLED\", \"Q\");\n break;\n case \"preferred\":\n setFeature(context, \"ACCOUNT_ID_MODE_PREFERRED\", \"P\");\n break;\n case \"required\":\n setFeature(context, \"ACCOUNT_ID_MODE_REQUIRED\", \"R\");\n break;\n }\n }\n const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity;\n if (identity?.$source) {\n const credentials = identity;\n if (credentials.accountId) {\n setFeature(context, \"RESOLVED_ACCOUNT_ID\", \"T\");\n }\n for (const [key, value] of Object.entries(credentials.$source ?? {})) {\n setFeature(context, key, value);\n }\n }\n}\n", "export const USER_AGENT = \"user-agent\";\nexport const X_AMZ_USER_AGENT = \"x-amz-user-agent\";\nexport const SPACE = \" \";\nexport const UA_NAME_SEPARATOR = \"/\";\nexport const UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\\-.^_`|~\\w]/g;\nexport const UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\\-.^_`|~\\w#]/g;\nexport const UA_ESCAPE_CHAR = \"-\";\n", "const BYTE_LIMIT = 1024;\nexport function encodeFeatures(features) {\n let buffer = \"\";\n for (const key in features) {\n const val = features[key];\n if (buffer.length + val.length + 1 <= BYTE_LIMIT) {\n if (buffer.length) {\n buffer += \",\" + val;\n }\n else {\n buffer += val;\n }\n continue;\n }\n break;\n }\n return buffer;\n}\n", "import { getUserAgentPrefix } from \"@aws-sdk/util-endpoints\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { checkFeatures } from \"./check-features\";\nimport { SPACE, UA_ESCAPE_CHAR, UA_NAME_ESCAPE_REGEX, UA_NAME_SEPARATOR, UA_VALUE_ESCAPE_REGEX, USER_AGENT, X_AMZ_USER_AGENT, } from \"./constants\";\nimport { encodeFeatures } from \"./encode-features\";\nexport const userAgentMiddleware = (options) => (next, context) => async (args) => {\n const { request } = args;\n if (!HttpRequest.isInstance(request)) {\n return next(args);\n }\n const { headers } = request;\n const userAgent = context?.userAgent?.map(escapeUserAgent) || [];\n const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);\n await checkFeatures(context, options, args);\n const awsContext = context;\n defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);\n const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];\n const appId = await options.userAgentAppId();\n if (appId) {\n defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`]));\n }\n const prefix = getUserAgentPrefix();\n const sdkUserAgentValue = (prefix ? [prefix] : [])\n .concat([...defaultUserAgent, ...userAgent, ...customUserAgent])\n .join(SPACE);\n const normalUAValue = [\n ...defaultUserAgent.filter((section) => section.startsWith(\"aws-sdk-\")),\n ...customUserAgent,\n ].join(SPACE);\n if (options.runtime !== \"browser\") {\n if (normalUAValue) {\n headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT]\n ? `${headers[USER_AGENT]} ${normalUAValue}`\n : normalUAValue;\n }\n headers[USER_AGENT] = sdkUserAgentValue;\n }\n else {\n headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;\n }\n return next({\n ...args,\n request,\n });\n};\nconst escapeUserAgent = (userAgentPair) => {\n const name = userAgentPair[0]\n .split(UA_NAME_SEPARATOR)\n .map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR))\n .join(UA_NAME_SEPARATOR);\n const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);\n const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);\n const prefix = name.substring(0, prefixSeparatorIndex);\n let uaName = name.substring(prefixSeparatorIndex + 1);\n if (prefix === \"api\") {\n uaName = uaName.toLowerCase();\n }\n return [prefix, uaName, version]\n .filter((item) => item && item.length > 0)\n .reduce((acc, item, index) => {\n switch (index) {\n case 0:\n return item;\n case 1:\n return `${acc}/${item}`;\n default:\n return `${acc}#${item}`;\n }\n }, \"\");\n};\nexport const getUserAgentMiddlewareOptions = {\n name: \"getUserAgentMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"SET_USER_AGENT\", \"USER_AGENT\"],\n override: true,\n};\nexport const getUserAgentPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);\n },\n});\n", "export * from \"./configurations\";\nexport * from \"./user-agent-middleware\";\n", "import { booleanSelector, SelectorType } from \"@smithy/util-config-provider\";\nexport const ENV_USE_DUALSTACK_ENDPOINT = \"AWS_USE_DUALSTACK_ENDPOINT\";\nexport const CONFIG_USE_DUALSTACK_ENDPOINT = \"use_dualstack_endpoint\";\nexport const DEFAULT_USE_DUALSTACK_ENDPOINT = false;\nexport const NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV),\n configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG),\n default: false,\n};\n", "import { booleanSelector, SelectorType } from \"@smithy/util-config-provider\";\nexport const ENV_USE_FIPS_ENDPOINT = \"AWS_USE_FIPS_ENDPOINT\";\nexport const CONFIG_USE_FIPS_ENDPOINT = \"use_fips_endpoint\";\nexport const DEFAULT_USE_FIPS_ENDPOINT = false;\nexport const NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV),\n configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG),\n default: false,\n};\n", "import { normalizeProvider } from \"@smithy/util-middleware\";\nexport const resolveCustomEndpointsConfig = (input) => {\n const { tls, endpoint, urlParser, useDualstackEndpoint } = input;\n return Object.assign(input, {\n tls: tls ?? true,\n endpoint: normalizeProvider(typeof endpoint === \"string\" ? urlParser(endpoint) : endpoint),\n isCustomEndpoint: true,\n useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false),\n });\n};\n", "import { normalizeProvider } from \"@smithy/util-middleware\";\nimport { getEndpointFromRegion } from \"./utils/getEndpointFromRegion\";\nexport const resolveEndpointsConfig = (input) => {\n const useDualstackEndpoint = normalizeProvider(input.useDualstackEndpoint ?? false);\n const { endpoint, useFipsEndpoint, urlParser, tls } = input;\n return Object.assign(input, {\n tls: tls ?? true,\n endpoint: endpoint\n ? normalizeProvider(typeof endpoint === \"string\" ? urlParser(endpoint) : endpoint)\n : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }),\n isCustomEndpoint: !!endpoint,\n useDualstackEndpoint,\n });\n};\n", "export * from \"./NodeUseDualstackEndpointConfigOptions\";\nexport * from \"./NodeUseFipsEndpointConfigOptions\";\nexport * from \"./resolveCustomEndpointsConfig\";\nexport * from \"./resolveEndpointsConfig\";\n", "export const REGION_ENV_NAME = \"AWS_REGION\";\nexport const REGION_INI_NAME = \"region\";\nexport const NODE_REGION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[REGION_ENV_NAME],\n configFileSelector: (profile) => profile[REGION_INI_NAME],\n default: () => {\n throw new Error(\"Region is missing\");\n },\n};\nexport const NODE_REGION_CONFIG_FILE_OPTIONS = {\n preferredFile: \"credentials\",\n};\n", "import { isValidHostLabel } from \"@smithy/util-endpoints\";\nconst validRegions = new Set();\nexport const checkRegion = (region, check = isValidHostLabel) => {\n if (!validRegions.has(region) && !check(region)) {\n if (region === \"*\") {\n console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of \"*\". See \"sigv4a\" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);\n }\n else {\n throw new Error(`Region not accepted: region=\"${region}\" is not a valid hostname component.`);\n }\n }\n else {\n validRegions.add(region);\n }\n};\n", "export const isFipsRegion = (region) => typeof region === \"string\" && (region.startsWith(\"fips-\") || region.endsWith(\"-fips\"));\n", "import { isFipsRegion } from \"./isFipsRegion\";\nexport const getRealRegion = (region) => isFipsRegion(region)\n ? [\"fips-aws-global\", \"aws-fips\"].includes(region)\n ? \"us-east-1\"\n : region.replace(/fips-(dkr-|prod-)?|-fips/, \"\")\n : region;\n", "import { checkRegion } from \"./checkRegion\";\nimport { getRealRegion } from \"./getRealRegion\";\nimport { isFipsRegion } from \"./isFipsRegion\";\nexport const resolveRegionConfig = (input) => {\n const { region, useFipsEndpoint } = input;\n if (!region) {\n throw new Error(\"Region is missing\");\n }\n return Object.assign(input, {\n region: async () => {\n const providedRegion = typeof region === \"function\" ? await region() : region;\n const realRegion = getRealRegion(providedRegion);\n checkRegion(realRegion);\n return realRegion;\n },\n useFipsEndpoint: async () => {\n const providedRegion = typeof region === \"string\" ? region : await region();\n if (isFipsRegion(providedRegion)) {\n return true;\n }\n return typeof useFipsEndpoint !== \"function\" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();\n },\n });\n};\n", "export * from \"./config\";\nexport * from \"./resolveRegionConfig\";\n", "export {};\n", "export {};\n", "import { getHostnameFromVariants } from \"./getHostnameFromVariants\";\nimport { getResolvedHostname } from \"./getResolvedHostname\";\nimport { getResolvedPartition } from \"./getResolvedPartition\";\nimport { getResolvedSigningRegion } from \"./getResolvedSigningRegion\";\nexport const getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash, }) => {\n const partition = getResolvedPartition(region, { partitionHash });\n const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region;\n const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };\n const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions);\n const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions);\n const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });\n if (hostname === undefined) {\n throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);\n }\n const signingRegion = getResolvedSigningRegion(hostname, {\n signingRegion: regionHash[resolvedRegion]?.signingRegion,\n regionRegex: partitionHash[partition].regionRegex,\n useFipsEndpoint,\n });\n return {\n partition,\n signingService,\n hostname,\n ...(signingRegion && { signingRegion }),\n ...(regionHash[resolvedRegion]?.signingService && {\n signingService: regionHash[resolvedRegion].signingService,\n }),\n };\n};\n", "export * from \"./PartitionHash\";\nexport * from \"./RegionHash\";\nexport * from \"./getRegionInfo\";\n", "export * from \"./endpointsConfig\";\nexport * from \"./regionConfig\";\nexport * from \"./regionInfo\";\n", "export const resolveEventStreamSerdeConfig = (input) => Object.assign(input, {\n eventStreamMarshaller: input.eventStreamSerdeProvider(input),\n});\n", "export * from \"./EventStreamSerdeConfig\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nconst CONTENT_LENGTH_HEADER = \"content-length\";\nexport function contentLengthMiddleware(bodyLengthChecker) {\n return (next) => async (args) => {\n const request = args.request;\n if (HttpRequest.isInstance(request)) {\n const { body, headers } = request;\n if (body &&\n Object.keys(headers)\n .map((str) => str.toLowerCase())\n .indexOf(CONTENT_LENGTH_HEADER) === -1) {\n try {\n const length = bodyLengthChecker(body);\n request.headers = {\n ...request.headers,\n [CONTENT_LENGTH_HEADER]: String(length),\n };\n }\n catch (error) {\n }\n }\n }\n return next({\n ...args,\n request,\n });\n };\n}\nexport const contentLengthMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_CONTENT_LENGTH\", \"CONTENT_LENGTH\"],\n name: \"contentLengthMiddleware\",\n override: true,\n};\nexport const getContentLengthPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);\n },\n});\n", "export const resolveParamsForS3 = async (endpointParams) => {\n const bucket = endpointParams?.Bucket || \"\";\n if (typeof endpointParams.Bucket === \"string\") {\n endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent(\"#\")).replace(/\\?/g, encodeURIComponent(\"?\"));\n }\n if (isArnBucketName(bucket)) {\n if (endpointParams.ForcePathStyle === true) {\n throw new Error(\"Path-style addressing cannot be used with ARN buckets\");\n }\n }\n else if (!isDnsCompatibleBucketName(bucket) ||\n (bucket.indexOf(\".\") !== -1 && !String(endpointParams.Endpoint).startsWith(\"http:\")) ||\n bucket.toLowerCase() !== bucket ||\n bucket.length < 3) {\n endpointParams.ForcePathStyle = true;\n }\n if (endpointParams.DisableMultiRegionAccessPoints) {\n endpointParams.disableMultiRegionAccessPoints = true;\n endpointParams.DisableMRAP = true;\n }\n return endpointParams;\n};\nconst DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\\.\\-]{1,61}[a-z0-9]$/;\nconst IP_ADDRESS_PATTERN = /(\\d+\\.){3}\\d+/;\nconst DOTS_PATTERN = /\\.\\./;\nexport const DOT_PATTERN = /\\./;\nexport const S3_HOSTNAME_PATTERN = /^(.+\\.)?s3(-fips)?(\\.dualstack)?[.-]([a-z0-9-]+)\\./;\nexport const isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName);\nexport const isArnBucketName = (bucketName) => {\n const [arn, partition, service, , , bucket] = bucketName.split(\":\");\n const isArn = arn === \"arn\" && bucketName.split(\":\").length >= 6;\n const isValidArn = Boolean(isArn && partition && service && bucket);\n if (isArn && !isValidArn) {\n throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);\n }\n return isValidArn;\n};\n", "export * from \"./s3\";\n", "export const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => {\n const configProvider = async () => {\n let configValue;\n if (isClientContextParam) {\n const clientContextParams = config.clientContextParams;\n const nestedValue = clientContextParams?.[configKey];\n configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey];\n }\n else {\n configValue = config[configKey] ?? config[canonicalEndpointParamKey];\n }\n if (typeof configValue === \"function\") {\n return configValue();\n }\n return configValue;\n };\n if (configKey === \"credentialScope\" || canonicalEndpointParamKey === \"CredentialScope\") {\n return async () => {\n const credentials = typeof config.credentials === \"function\" ? await config.credentials() : config.credentials;\n const configValue = credentials?.credentialScope ?? credentials?.CredentialScope;\n return configValue;\n };\n }\n if (configKey === \"accountId\" || canonicalEndpointParamKey === \"AccountId\") {\n return async () => {\n const credentials = typeof config.credentials === \"function\" ? await config.credentials() : config.credentials;\n const configValue = credentials?.accountId ?? credentials?.AccountId;\n return configValue;\n };\n }\n if (configKey === \"endpoint\" || canonicalEndpointParamKey === \"endpoint\") {\n return async () => {\n if (config.isCustomEndpoint === false) {\n return undefined;\n }\n const endpoint = await configProvider();\n if (endpoint && typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n return endpoint.url.href;\n }\n if (\"hostname\" in endpoint) {\n const { protocol, hostname, port, path } = endpoint;\n return `${protocol}//${hostname}${port ? \":\" + port : \"\"}${path}`;\n }\n }\n return endpoint;\n };\n }\n return configProvider;\n};\n", "export const getEndpointFromConfig = async (serviceId) => undefined;\n", "import { parseUrl } from \"@smithy/url-parser\";\nexport const toEndpointV1 = (endpoint) => {\n if (typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n const v1Endpoint = parseUrl(endpoint.url);\n if (endpoint.headers) {\n v1Endpoint.headers = {};\n for (const [name, values] of Object.entries(endpoint.headers)) {\n v1Endpoint.headers[name.toLowerCase()] = values.join(\", \");\n }\n }\n return v1Endpoint;\n }\n return endpoint;\n }\n return parseUrl(endpoint);\n};\n", "import { resolveParamsForS3 } from \"../service-customizations\";\nimport { createConfigValueProvider } from \"./createConfigValueProvider\";\nimport { getEndpointFromConfig } from \"./getEndpointFromConfig\";\nimport { toEndpointV1 } from \"./toEndpointV1\";\nexport const getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => {\n if (!clientConfig.isCustomEndpoint) {\n let endpointFromConfig;\n if (clientConfig.serviceConfiguredEndpoint) {\n endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();\n }\n else {\n endpointFromConfig = await getEndpointFromConfig(clientConfig.serviceId);\n }\n if (endpointFromConfig) {\n clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));\n clientConfig.isCustomEndpoint = true;\n }\n }\n const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);\n if (typeof clientConfig.endpointProvider !== \"function\") {\n throw new Error(\"config.endpointProvider is not set.\");\n }\n const endpoint = clientConfig.endpointProvider(endpointParams, context);\n if (clientConfig.isCustomEndpoint && clientConfig.endpoint) {\n const customEndpoint = await clientConfig.endpoint();\n if (customEndpoint?.headers) {\n endpoint.headers ??= {};\n for (const [name, value] of Object.entries(customEndpoint.headers)) {\n endpoint.headers[name] = Array.isArray(value) ? value : [value];\n }\n }\n }\n return endpoint;\n};\nexport const resolveParams = async (commandInput, instructionsSupplier, clientConfig) => {\n const endpointParams = {};\n const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {};\n for (const [name, instruction] of Object.entries(instructions)) {\n switch (instruction.type) {\n case \"staticContextParams\":\n endpointParams[name] = instruction.value;\n break;\n case \"contextParams\":\n endpointParams[name] = commandInput[instruction.name];\n break;\n case \"clientContextParams\":\n case \"builtInParams\":\n endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== \"builtInParams\")();\n break;\n case \"operationContextParams\":\n endpointParams[name] = instruction.get(commandInput);\n break;\n default:\n throw new Error(\"Unrecognized endpoint parameter instruction: \" + JSON.stringify(instruction));\n }\n }\n if (Object.keys(instructions).length === 0) {\n Object.assign(endpointParams, clientConfig);\n }\n if (String(clientConfig.serviceId).toLowerCase() === \"s3\") {\n await resolveParamsForS3(endpointParams);\n }\n return endpointParams;\n};\n", "export * from \"./getEndpointFromInstructions\";\nexport * from \"./toEndpointV1\";\n", "import { setFeature } from \"@smithy/core\";\nimport { getSmithyContext } from \"@smithy/util-middleware\";\nimport { getEndpointFromInstructions } from \"./adaptors/getEndpointFromInstructions\";\nexport const endpointMiddleware = ({ config, instructions, }) => {\n return (next, context) => async (args) => {\n if (config.isCustomEndpoint) {\n setFeature(context, \"ENDPOINT_OVERRIDE\", \"N\");\n }\n const endpoint = await getEndpointFromInstructions(args.input, {\n getEndpointParameterInstructions() {\n return instructions;\n },\n }, { ...config }, context);\n context.endpointV2 = endpoint;\n context.authSchemes = endpoint.properties?.authSchemes;\n const authScheme = context.authSchemes?.[0];\n if (authScheme) {\n context[\"signing_region\"] = authScheme.signingRegion;\n context[\"signing_service\"] = authScheme.signingName;\n const smithyContext = getSmithyContext(context);\n const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;\n if (httpAuthOption) {\n httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {\n signing_region: authScheme.signingRegion,\n signingRegion: authScheme.signingRegion,\n signing_service: authScheme.signingName,\n signingName: authScheme.signingName,\n signingRegionSet: authScheme.signingRegionSet,\n }, authScheme.properties);\n }\n }\n return next({\n ...args,\n });\n };\n};\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nexport const deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => {\n const { response } = await next(args);\n try {\n const parsed = await deserializer(response, options);\n return {\n response,\n output: parsed,\n };\n }\n catch (error) {\n Object.defineProperty(error, \"$response\", {\n value: response,\n enumerable: false,\n writable: false,\n configurable: false,\n });\n if (!(\"$metadata\" in error)) {\n const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;\n try {\n error.message += \"\\n \" + hint;\n }\n catch (e) {\n if (!context.logger || context.logger?.constructor?.name === \"NoOpLogger\") {\n console.warn(hint);\n }\n else {\n context.logger?.warn?.(hint);\n }\n }\n if (typeof error.$responseBodyText !== \"undefined\") {\n if (error.$response) {\n error.$response.body = error.$responseBodyText;\n }\n }\n try {\n if (HttpResponse.isInstance(response)) {\n const { headers = {} } = response;\n const headerEntries = Object.entries(headers);\n error.$metadata = {\n httpStatusCode: response.statusCode,\n requestId: findHeader(/^x-[\\w-]+-request-?id$/, headerEntries),\n extendedRequestId: findHeader(/^x-[\\w-]+-id-2$/, headerEntries),\n cfId: findHeader(/^x-[\\w-]+-cf-id$/, headerEntries),\n };\n }\n }\n catch (e) {\n }\n }\n throw error;\n }\n};\nconst findHeader = (pattern, headers) => {\n return (headers.find(([k]) => {\n return k.match(pattern);\n }) || [void 0, void 1])[1];\n};\n", "import { toEndpointV1 } from \"@smithy/core/endpoints\";\nexport const serializerMiddleware = (options, serializer) => (next, context) => async (args) => {\n const endpointConfig = options;\n const endpoint = context.endpointV2\n ? async () => toEndpointV1(context.endpointV2)\n : endpointConfig.endpoint;\n if (!endpoint) {\n throw new Error(\"No valid endpoint provider available.\");\n }\n const request = await serializer(args.input, { ...options, endpoint });\n return next({\n ...args,\n request,\n });\n};\n", "import { deserializerMiddleware } from \"./deserializerMiddleware\";\nimport { serializerMiddleware } from \"./serializerMiddleware\";\nexport const deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true,\n};\nexport const serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true,\n};\nexport function getSerdePlugin(config, serializer, deserializer) {\n return {\n applyToStack: (commandStack) => {\n commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);\n commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);\n },\n };\n}\n", "export * from \"./deserializerMiddleware\";\nexport * from \"./serdePlugin\";\nexport * from \"./serializerMiddleware\";\n", "import { serializerMiddlewareOption } from \"@smithy/middleware-serde\";\nimport { endpointMiddleware } from \"./endpointMiddleware\";\nexport const endpointMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"ENDPOINT_PARAMETERS\", \"ENDPOINT_V2\", \"ENDPOINT\"],\n name: \"endpointV2Middleware\",\n override: true,\n relation: \"before\",\n toMiddleware: serializerMiddlewareOption.name,\n};\nexport const getEndpointPlugin = (config, instructions) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(endpointMiddleware({\n config,\n instructions,\n }), endpointMiddlewareOptions);\n },\n});\n", "import { normalizeProvider } from \"@smithy/util-middleware\";\nimport { getEndpointFromConfig } from \"./adaptors/getEndpointFromConfig\";\nimport { toEndpointV1 } from \"./adaptors/toEndpointV1\";\nexport const resolveEndpointConfig = (input) => {\n const tls = input.tls ?? true;\n const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input;\n const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await normalizeProvider(endpoint)()) : undefined;\n const isCustomEndpoint = !!endpoint;\n const resolvedConfig = Object.assign(input, {\n endpoint: customEndpointProvider,\n tls,\n isCustomEndpoint,\n useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false),\n useFipsEndpoint: normalizeProvider(useFipsEndpoint ?? false),\n });\n let configuredEndpointPromise = undefined;\n resolvedConfig.serviceConfiguredEndpoint = async () => {\n if (input.serviceId && !configuredEndpointPromise) {\n configuredEndpointPromise = getEndpointFromConfig(input.serviceId);\n }\n return configuredEndpointPromise;\n };\n return resolvedConfig;\n};\n", "export const resolveEndpointRequiredConfig = (input) => {\n const { endpoint } = input;\n if (endpoint === undefined) {\n input.endpoint = async () => {\n throw new Error(\"@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.\");\n };\n }\n return input;\n};\n", "export {};\n", "export * from \"./adaptors\";\nexport * from \"./endpointMiddleware\";\nexport * from \"./getEndpointPlugin\";\nexport * from \"./resolveEndpointConfig\";\nexport * from \"./resolveEndpointRequiredConfig\";\nexport * from \"./types\";\n", "import { MAXIMUM_RETRY_DELAY } from \"@smithy/util-retry\";\nexport const defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));\n", "import { isClockSkewError, isRetryableByTrait, isThrottlingError, isTransientError, } from \"@smithy/service-error-classification\";\nexport const defaultRetryDecider = (error) => {\n if (!error) {\n return false;\n }\n return isRetryableByTrait(error) || isClockSkewError(error) || isThrottlingError(error) || isTransientError(error);\n};\n", "export const asSdkError = (error) => {\n if (error instanceof Error)\n return error;\n if (error instanceof Object)\n return Object.assign(new Error(), error);\n if (typeof error === \"string\")\n return new Error(error);\n return new Error(`AWS SDK error wrapper for ${error}`);\n};\n", "import { HttpRequest, HttpResponse } from \"@smithy/protocol-http\";\nimport { isThrottlingError } from \"@smithy/service-error-classification\";\nimport { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, INVOCATION_ID_HEADER, REQUEST_HEADER, RETRY_MODES, THROTTLING_RETRY_DELAY_BASE, } from \"@smithy/util-retry\";\nimport { v4 } from \"@smithy/uuid\";\nimport { getDefaultRetryQuota } from \"./defaultRetryQuota\";\nimport { defaultDelayDecider } from \"./delayDecider\";\nimport { defaultRetryDecider } from \"./retryDecider\";\nimport { asSdkError } from \"./util\";\nexport class StandardRetryStrategy {\n maxAttemptsProvider;\n retryDecider;\n delayDecider;\n retryQuota;\n mode = RETRY_MODES.STANDARD;\n constructor(maxAttemptsProvider, options) {\n this.maxAttemptsProvider = maxAttemptsProvider;\n this.retryDecider = options?.retryDecider ?? defaultRetryDecider;\n this.delayDecider = options?.delayDecider ?? defaultDelayDecider;\n this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(INITIAL_RETRY_TOKENS);\n }\n shouldRetry(error, attempts, maxAttempts) {\n return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);\n }\n async getMaxAttempts() {\n let maxAttempts;\n try {\n maxAttempts = await this.maxAttemptsProvider();\n }\n catch (error) {\n maxAttempts = DEFAULT_MAX_ATTEMPTS;\n }\n return maxAttempts;\n }\n async retry(next, args, options) {\n let retryTokenAmount;\n let attempts = 0;\n let totalDelay = 0;\n const maxAttempts = await this.getMaxAttempts();\n const { request } = args;\n if (HttpRequest.isInstance(request)) {\n request.headers[INVOCATION_ID_HEADER] = v4();\n }\n while (true) {\n try {\n if (HttpRequest.isInstance(request)) {\n request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n if (options?.beforeRequest) {\n await options.beforeRequest();\n }\n const { response, output } = await next(args);\n if (options?.afterRequest) {\n options.afterRequest(response);\n }\n this.retryQuota.releaseRetryTokens(retryTokenAmount);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalDelay;\n return { response, output };\n }\n catch (e) {\n const err = asSdkError(e);\n attempts++;\n if (this.shouldRetry(err, attempts, maxAttempts)) {\n retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);\n const delayFromDecider = this.delayDecider(isThrottlingError(err) ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE, attempts);\n const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);\n const delay = Math.max(delayFromResponse || 0, delayFromDecider);\n totalDelay += delay;\n await new Promise((resolve) => setTimeout(resolve, delay));\n continue;\n }\n if (!err.$metadata) {\n err.$metadata = {};\n }\n err.$metadata.attempts = attempts;\n err.$metadata.totalRetryDelay = totalDelay;\n throw err;\n }\n }\n }\n}\nconst getDelayFromRetryAfterHeader = (response) => {\n if (!HttpResponse.isInstance(response))\n return;\n const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === \"retry-after\");\n if (!retryAfterHeaderName)\n return;\n const retryAfter = response.headers[retryAfterHeaderName];\n const retryAfterSeconds = Number(retryAfter);\n if (!Number.isNaN(retryAfterSeconds))\n return retryAfterSeconds * 1000;\n const retryAfterDate = new Date(retryAfter);\n return retryAfterDate.getTime() - Date.now();\n};\n", "import { DefaultRateLimiter, RETRY_MODES } from \"@smithy/util-retry\";\nimport { StandardRetryStrategy } from \"./StandardRetryStrategy\";\nexport class AdaptiveRetryStrategy extends StandardRetryStrategy {\n rateLimiter;\n constructor(maxAttemptsProvider, options) {\n const { rateLimiter, ...superOptions } = options ?? {};\n super(maxAttemptsProvider, superOptions);\n this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();\n this.mode = RETRY_MODES.ADAPTIVE;\n }\n async retry(next, args) {\n return super.retry(next, args, {\n beforeRequest: async () => {\n return this.rateLimiter.getSendToken();\n },\n afterRequest: (response) => {\n this.rateLimiter.updateClientSendingRate(response);\n },\n });\n }\n}\n", "import { normalizeProvider } from \"@smithy/util-middleware\";\nimport { AdaptiveRetryStrategy, DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, RETRY_MODES, StandardRetryStrategy, } from \"@smithy/util-retry\";\nexport const ENV_MAX_ATTEMPTS = \"AWS_MAX_ATTEMPTS\";\nexport const CONFIG_MAX_ATTEMPTS = \"max_attempts\";\nexport const NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => {\n const value = env[ENV_MAX_ATTEMPTS];\n if (!value)\n return undefined;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n configFileSelector: (profile) => {\n const value = profile[CONFIG_MAX_ATTEMPTS];\n if (!value)\n return undefined;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n default: DEFAULT_MAX_ATTEMPTS,\n};\nexport const resolveRetryConfig = (input) => {\n const { retryStrategy, retryMode } = input;\n const maxAttempts = normalizeProvider(input.maxAttempts ?? DEFAULT_MAX_ATTEMPTS);\n let controller = retryStrategy\n ? Promise.resolve(retryStrategy)\n : undefined;\n const getDefault = async () => (await normalizeProvider(retryMode)()) === RETRY_MODES.ADAPTIVE\n ? new AdaptiveRetryStrategy(maxAttempts)\n : new StandardRetryStrategy(maxAttempts);\n return Object.assign(input, {\n maxAttempts,\n retryStrategy: () => (controller ??= getDefault()),\n });\n};\nexport const ENV_RETRY_MODE = \"AWS_RETRY_MODE\";\nexport const CONFIG_RETRY_MODE = \"retry_mode\";\nexport const NODE_RETRY_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_RETRY_MODE],\n configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],\n default: DEFAULT_RETRY_MODE,\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { INVOCATION_ID_HEADER, REQUEST_HEADER } from \"@smithy/util-retry\";\nexport const omitRetryHeadersMiddleware = () => (next) => async (args) => {\n const { request } = args;\n if (HttpRequest.isInstance(request)) {\n delete request.headers[INVOCATION_ID_HEADER];\n delete request.headers[REQUEST_HEADER];\n }\n return next(args);\n};\nexport const omitRetryHeadersMiddlewareOptions = {\n name: \"omitRetryHeadersMiddleware\",\n tags: [\"RETRY\", \"HEADERS\", \"OMIT_RETRY_HEADERS\"],\n relation: \"before\",\n toMiddleware: \"awsAuthMiddleware\",\n override: true,\n};\nexport const getOmitRetryHeadersPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);\n },\n});\n", "export const isStreamingPayload = (request) => request?.body instanceof ReadableStream;\n", "import { HttpRequest, HttpResponse } from \"@smithy/protocol-http\";\nimport { isServerError, isThrottlingError, isTransientError } from \"@smithy/service-error-classification\";\nimport { NoOpLogger } from \"@smithy/smithy-client\";\nimport { INVOCATION_ID_HEADER, REQUEST_HEADER } from \"@smithy/util-retry\";\nimport { v4 } from \"@smithy/uuid\";\nimport { isStreamingPayload } from \"./isStreamingPayload/isStreamingPayload\";\nimport { asSdkError } from \"./util\";\nexport const retryMiddleware = (options) => (next, context) => async (args) => {\n let retryStrategy = await options.retryStrategy();\n const maxAttempts = await options.maxAttempts();\n if (isRetryStrategyV2(retryStrategy)) {\n retryStrategy = retryStrategy;\n let retryToken = await retryStrategy.acquireInitialRetryToken(context[\"partition_id\"]);\n let lastError = new Error();\n let attempts = 0;\n let totalRetryDelay = 0;\n const { request } = args;\n const isRequest = HttpRequest.isInstance(request);\n if (isRequest) {\n request.headers[INVOCATION_ID_HEADER] = v4();\n }\n while (true) {\n try {\n if (isRequest) {\n request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n const { response, output } = await next(args);\n retryStrategy.recordSuccess(retryToken);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalRetryDelay;\n return { response, output };\n }\n catch (e) {\n const retryErrorInfo = getRetryErrorInfo(e);\n lastError = asSdkError(e);\n if (isRequest && isStreamingPayload(request)) {\n (context.logger instanceof NoOpLogger ? console : context.logger)?.warn(\"An error was encountered in a non-retryable streaming request.\");\n throw lastError;\n }\n try {\n retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);\n }\n catch (refreshError) {\n if (!lastError.$metadata) {\n lastError.$metadata = {};\n }\n lastError.$metadata.attempts = attempts + 1;\n lastError.$metadata.totalRetryDelay = totalRetryDelay;\n throw lastError;\n }\n attempts = retryToken.getRetryCount();\n const delay = retryToken.getRetryDelay();\n totalRetryDelay += delay;\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n }\n }\n else {\n retryStrategy = retryStrategy;\n if (retryStrategy?.mode)\n context.userAgent = [...(context.userAgent || []), [\"cfg/retry-mode\", retryStrategy.mode]];\n return retryStrategy.retry(next, args);\n }\n};\nconst isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== \"undefined\" &&\n typeof retryStrategy.refreshRetryTokenForRetry !== \"undefined\" &&\n typeof retryStrategy.recordSuccess !== \"undefined\";\nconst getRetryErrorInfo = (error) => {\n const errorInfo = {\n error,\n errorType: getRetryErrorType(error),\n };\n const retryAfterHint = getRetryAfterHint(error.$response);\n if (retryAfterHint) {\n errorInfo.retryAfterHint = retryAfterHint;\n }\n return errorInfo;\n};\nconst getRetryErrorType = (error) => {\n if (isThrottlingError(error))\n return \"THROTTLING\";\n if (isTransientError(error))\n return \"TRANSIENT\";\n if (isServerError(error))\n return \"SERVER_ERROR\";\n return \"CLIENT_ERROR\";\n};\nexport const retryMiddlewareOptions = {\n name: \"retryMiddleware\",\n tags: [\"RETRY\"],\n step: \"finalizeRequest\",\n priority: \"high\",\n override: true,\n};\nexport const getRetryPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(retryMiddleware(options), retryMiddlewareOptions);\n },\n});\nexport const getRetryAfterHint = (response) => {\n if (!HttpResponse.isInstance(response))\n return;\n const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === \"retry-after\");\n if (!retryAfterHeaderName)\n return;\n const retryAfter = response.headers[retryAfterHeaderName];\n const retryAfterSeconds = Number(retryAfter);\n if (!Number.isNaN(retryAfterSeconds))\n return new Date(retryAfterSeconds * 1000);\n const retryAfterDate = new Date(retryAfter);\n return retryAfterDate;\n};\n", "export * from \"./AdaptiveRetryStrategy\";\nexport * from \"./StandardRetryStrategy\";\nexport * from \"./configurations\";\nexport * from \"./delayDecider\";\nexport * from \"./omitRetryHeadersMiddleware\";\nexport * from \"./retryDecider\";\nexport * from \"./retryMiddleware\";\n", "export const signatureV4CrtContainer = {\n CrtSignerV4: null,\n};\n", "import { SignatureV4S3Express } from \"@aws-sdk/middleware-sdk-s3\";\nimport { signatureV4aContainer } from \"@smithy/signature-v4\";\nimport { signatureV4CrtContainer } from \"./signature-v4-crt-container\";\nexport class SignatureV4MultiRegion {\n sigv4aSigner;\n sigv4Signer;\n signerOptions;\n static sigv4aDependency() {\n if (typeof signatureV4CrtContainer.CrtSignerV4 === \"function\") {\n return \"crt\";\n }\n else if (typeof signatureV4aContainer.SignatureV4a === \"function\") {\n return \"js\";\n }\n return \"none\";\n }\n constructor(options) {\n this.sigv4Signer = new SignatureV4S3Express(options);\n this.signerOptions = options;\n }\n async sign(requestToSign, options = {}) {\n if (options.signingRegion === \"*\") {\n return this.getSigv4aSigner().sign(requestToSign, options);\n }\n return this.sigv4Signer.sign(requestToSign, options);\n }\n async signWithCredentials(requestToSign, credentials, options = {}) {\n if (options.signingRegion === \"*\") {\n const signer = this.getSigv4aSigner();\n const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;\n if (CrtSignerV4 && signer instanceof CrtSignerV4) {\n return signer.signWithCredentials(requestToSign, credentials, options);\n }\n else {\n throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. ` +\n `Please check whether you have installed the \"@aws-sdk/signature-v4-crt\" package explicitly. ` +\n `You must also register the package by calling [require(\"@aws-sdk/signature-v4-crt\");] ` +\n `or an ESM equivalent such as [import \"@aws-sdk/signature-v4-crt\";]. ` +\n `For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);\n }\n }\n return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options);\n }\n async presign(originalRequest, options = {}) {\n if (options.signingRegion === \"*\") {\n const signer = this.getSigv4aSigner();\n const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;\n if (CrtSignerV4 && signer instanceof CrtSignerV4) {\n return signer.presign(originalRequest, options);\n }\n else {\n throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. ` +\n `Please check whether you have installed the \"@aws-sdk/signature-v4-crt\" package explicitly. ` +\n `You must also register the package by calling [require(\"@aws-sdk/signature-v4-crt\");] ` +\n `or an ESM equivalent such as [import \"@aws-sdk/signature-v4-crt\";]. ` +\n `For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);\n }\n }\n return this.sigv4Signer.presign(originalRequest, options);\n }\n async presignWithCredentials(originalRequest, credentials, options = {}) {\n if (options.signingRegion === \"*\") {\n throw new Error(\"Method presignWithCredentials is not supported for [signingRegion=*].\");\n }\n return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options);\n }\n getSigv4aSigner() {\n if (!this.sigv4aSigner) {\n const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;\n const JsSigV4aSigner = signatureV4aContainer.SignatureV4a;\n if (this.signerOptions.runtime === \"node\") {\n if (!CrtSignerV4 && !JsSigV4aSigner) {\n throw new Error(\"Neither CRT nor JS SigV4a implementation is available. \" +\n \"Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. \" +\n \"For more information please go to \" +\n \"https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt\");\n }\n if (CrtSignerV4 && typeof CrtSignerV4 === \"function\") {\n this.sigv4aSigner = new CrtSignerV4({\n ...this.signerOptions,\n signingAlgorithm: 1,\n });\n }\n else if (JsSigV4aSigner && typeof JsSigV4aSigner === \"function\") {\n this.sigv4aSigner = new JsSigV4aSigner({\n ...this.signerOptions,\n });\n }\n else {\n throw new Error(\"Available SigV4a implementation is not a valid constructor. \" +\n \"Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.\" +\n \"For more information please go to \" +\n \"https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt\");\n }\n }\n else {\n if (!JsSigV4aSigner || typeof JsSigV4aSigner !== \"function\") {\n throw new Error(\"JS SigV4a implementation is not available or not a valid constructor. \" +\n \"Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. \" +\n \"You must also register the package by calling [require('@aws-sdk/signature-v4a');] \" +\n \"or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. \" +\n \"For more information please go to \" +\n \"https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a\");\n }\n this.sigv4aSigner = new JsSigV4aSigner({\n ...this.signerOptions,\n });\n }\n }\n return this.sigv4aSigner;\n }\n}\n", "export * from \"./SignatureV4MultiRegion\";\nexport * from \"./signature-v4-crt-container\";\n", "const cs = \"required\", ct = \"type\", cu = \"rules\", cv = \"conditions\", cw = \"fn\", cx = \"argv\", cy = \"ref\", cz = \"assign\", cA = \"url\", cB = \"properties\", cC = \"backend\", cD = \"authSchemes\", cE = \"disableDoubleEncoding\", cF = \"signingName\", cG = \"signingRegion\", cH = \"headers\", cI = \"signingRegionSet\";\nconst a = 6, b = false, c = true, d = \"isSet\", e = \"booleanEquals\", f = \"error\", g = \"aws.partition\", h = \"stringEquals\", i = \"getAttr\", j = \"name\", k = \"substring\", l = \"bucketSuffix\", m = \"parseURL\", n = \"endpoint\", o = \"tree\", p = \"aws.isVirtualHostableS3Bucket\", q = \"{url#scheme}://{Bucket}.{url#authority}{url#path}\", r = \"not\", s = \"accessPointSuffix\", t = \"{url#scheme}://{url#authority}{url#path}\", u = \"hardwareType\", v = \"regionPrefix\", w = \"bucketAliasSuffix\", x = \"outpostId\", y = \"isValidHostLabel\", z = \"sigv4a\", A = \"s3-outposts\", B = \"s3\", C = \"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}\", D = \"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}\", E = \"https://{Bucket}.s3.{partitionResult#dnsSuffix}\", F = \"aws.parseArn\", G = \"bucketArn\", H = \"arnType\", I = \"\", J = \"s3-object-lambda\", K = \"accesspoint\", L = \"accessPointName\", M = \"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}\", N = \"mrapPartition\", O = \"outpostType\", P = \"arnPrefix\", Q = \"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}\", R = \"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", S = \"https://s3.{partitionResult#dnsSuffix}\", T = { [cs]: false, [ct]: \"string\" }, U = { [cs]: true, \"default\": false, [ct]: \"boolean\" }, V = { [cs]: false, [ct]: \"boolean\" }, W = { [cw]: e, [cx]: [{ [cy]: \"Accelerate\" }, true] }, X = { [cw]: e, [cx]: [{ [cy]: \"UseFIPS\" }, true] }, Y = { [cw]: e, [cx]: [{ [cy]: \"UseDualStack\" }, true] }, Z = { [cw]: d, [cx]: [{ [cy]: \"Endpoint\" }] }, aa = { [cw]: g, [cx]: [{ [cy]: \"Region\" }], [cz]: \"partitionResult\" }, ab = { [cw]: h, [cx]: [{ [cw]: i, [cx]: [{ [cy]: \"partitionResult\" }, j] }, \"aws-cn\"] }, ac = { [cw]: d, [cx]: [{ [cy]: \"Bucket\" }] }, ad = { [cy]: \"Bucket\" }, ae = { [cv]: [W], [f]: \"S3Express does not support S3 Accelerate.\", [ct]: f }, af = { [cv]: [Z, { [cw]: m, [cx]: [{ [cy]: \"Endpoint\" }], [cz]: \"url\" }], [cu]: [{ [cv]: [{ [cw]: d, [cx]: [{ [cy]: \"DisableS3ExpressSessionAuth\" }] }, { [cw]: e, [cx]: [{ [cy]: \"DisableS3ExpressSessionAuth\" }, true] }], [cu]: [{ [cv]: [{ [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: \"url\" }, \"isIp\"] }, true] }], [cu]: [{ [cv]: [{ [cw]: \"uriEncode\", [cx]: [ad], [cz]: \"uri_encoded_bucket\" }], [cu]: [{ [n]: { [cA]: \"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: p, [cx]: [ad, false] }], [cu]: [{ [n]: { [cA]: q, [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }], [ct]: o }, { [f]: \"S3Express bucket name is not a valid virtual hostable name.\", [ct]: f }], [ct]: o }, { [cv]: [{ [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: \"url\" }, \"isIp\"] }, true] }], [cu]: [{ [cv]: [{ [cw]: \"uriEncode\", [cx]: [ad], [cz]: \"uri_encoded_bucket\" }], [cu]: [{ [n]: { [cA]: \"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: p, [cx]: [ad, false] }], [cu]: [{ [n]: { [cA]: q, [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }], [ct]: o }, { [f]: \"S3Express bucket name is not a valid virtual hostable name.\", [ct]: f }], [ct]: o }, ag = { [cw]: m, [cx]: [{ [cy]: \"Endpoint\" }], [cz]: \"url\" }, ah = { [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: \"url\" }, \"isIp\"] }, true] }, ai = { [cy]: \"url\" }, aj = { [cw]: \"uriEncode\", [cx]: [ad], [cz]: \"uri_encoded_bucket\" }, ak = { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, al = {}, am = { [cw]: p, [cx]: [ad, false] }, an = { [f]: \"S3Express bucket name is not a valid virtual hostable name.\", [ct]: f }, ao = { [cw]: d, [cx]: [{ [cy]: \"UseS3ExpressControlEndpoint\" }] }, ap = { [cw]: e, [cx]: [{ [cy]: \"UseS3ExpressControlEndpoint\" }, true] }, aq = { [cw]: r, [cx]: [Z] }, ar = { [cw]: e, [cx]: [{ [cy]: \"UseDualStack\" }, false] }, as = { [cw]: e, [cx]: [{ [cy]: \"UseFIPS\" }, false] }, at = { [f]: \"Unrecognized S3Express bucket name format.\", [ct]: f }, au = { [cw]: r, [cx]: [ac] }, av = { [cy]: u }, aw = { [cv]: [aq], [f]: \"Expected a endpoint to be specified but no endpoint was found\", [ct]: f }, ax = { [cD]: [{ [cE]: true, [j]: z, [cF]: A, [cI]: [\"*\"] }, { [cE]: true, [j]: \"sigv4\", [cF]: A, [cG]: \"{Region}\" }] }, ay = { [cw]: e, [cx]: [{ [cy]: \"ForcePathStyle\" }, false] }, az = { [cy]: \"ForcePathStyle\" }, aA = { [cw]: e, [cx]: [{ [cy]: \"Accelerate\" }, false] }, aB = { [cw]: h, [cx]: [{ [cy]: \"Region\" }, \"aws-global\"] }, aC = { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: B, [cG]: \"us-east-1\" }] }, aD = { [cw]: r, [cx]: [aB] }, aE = { [cw]: e, [cx]: [{ [cy]: \"UseGlobalEndpoint\" }, true] }, aF = { [cA]: \"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: B, [cG]: \"{Region}\" }] }, [cH]: {} }, aG = { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: B, [cG]: \"{Region}\" }] }, aH = { [cw]: e, [cx]: [{ [cy]: \"UseGlobalEndpoint\" }, false] }, aI = { [cA]: \"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, aJ = { [cA]: \"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, aK = { [cA]: \"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, aL = { [cw]: e, [cx]: [{ [cw]: i, [cx]: [ai, \"isIp\"] }, false] }, aM = { [cA]: C, [cB]: aG, [cH]: {} }, aN = { [cA]: q, [cB]: aG, [cH]: {} }, aO = { [n]: aN, [ct]: n }, aP = { [cA]: D, [cB]: aG, [cH]: {} }, aQ = { [cA]: \"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, aR = { [f]: \"Invalid region: region was not a valid DNS name.\", [ct]: f }, aS = { [cy]: G }, aT = { [cy]: H }, aU = { [cw]: i, [cx]: [aS, \"service\"] }, aV = { [cy]: L }, aW = { [cv]: [Y], [f]: \"S3 Object Lambda does not support Dual-stack\", [ct]: f }, aX = { [cv]: [W], [f]: \"S3 Object Lambda does not support S3 Accelerate\", [ct]: f }, aY = { [cv]: [{ [cw]: d, [cx]: [{ [cy]: \"DisableAccessPoints\" }] }, { [cw]: e, [cx]: [{ [cy]: \"DisableAccessPoints\" }, true] }], [f]: \"Access points are not supported for this operation\", [ct]: f }, aZ = { [cv]: [{ [cw]: d, [cx]: [{ [cy]: \"UseArnRegion\" }] }, { [cw]: e, [cx]: [{ [cy]: \"UseArnRegion\" }, false] }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [aS, \"region\"] }, \"{Region}\"] }] }], [f]: \"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`\", [ct]: f }, ba = { [cw]: i, [cx]: [{ [cy]: \"bucketPartition\" }, j] }, bb = { [cw]: i, [cx]: [aS, \"accountId\"] }, bc = { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: J, [cG]: \"{bucketArn#region}\" }] }, bd = { [f]: \"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`\", [ct]: f }, be = { [f]: \"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`\", [ct]: f }, bf = { [f]: \"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)\", [ct]: f }, bg = { [f]: \"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`\", [ct]: f }, bh = { [f]: \"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.\", [ct]: f }, bi = { [f]: \"Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided\", [ct]: f }, bj = { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: B, [cG]: \"{bucketArn#region}\" }] }, bk = { [cD]: [{ [cE]: true, [j]: z, [cF]: A, [cI]: [\"*\"] }, { [cE]: true, [j]: \"sigv4\", [cF]: A, [cG]: \"{bucketArn#region}\" }] }, bl = { [cw]: F, [cx]: [ad] }, bm = { [cA]: \"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aG, [cH]: {} }, bn = { [cA]: \"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aG, [cH]: {} }, bo = { [cA]: \"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aG, [cH]: {} }, bp = { [cA]: Q, [cB]: aG, [cH]: {} }, bq = { [cA]: \"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aG, [cH]: {} }, br = { [cy]: \"UseObjectLambdaEndpoint\" }, bs = { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: J, [cG]: \"{Region}\" }] }, bt = { [cA]: \"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, bu = { [cA]: \"https://s3-fips.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, bv = { [cA]: \"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, bw = { [cA]: t, [cB]: aG, [cH]: {} }, bx = { [cA]: \"https://s3.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, by = [{ [cy]: \"Region\" }], bz = [{ [cy]: \"Endpoint\" }], bA = [ad], bB = [W], bC = [Z, ag], bD = [{ [cw]: d, [cx]: [{ [cy]: \"DisableS3ExpressSessionAuth\" }] }, { [cw]: e, [cx]: [{ [cy]: \"DisableS3ExpressSessionAuth\" }, true] }], bE = [aj], bF = [am], bG = [aa], bH = [X, Y], bI = [X, ar], bJ = [as, Y], bK = [as, ar], bL = [{ [cw]: k, [cx]: [ad, 6, 14, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 14, 16, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bM = [{ [cv]: [X, Y], [n]: { [cA]: \"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bI, [n]: { [cA]: \"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bJ, [n]: { [cA]: \"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bK, [n]: { [cA]: \"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: {} }, [ct]: n }], bN = [{ [cw]: k, [cx]: [ad, 6, 15, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 15, 17, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bO = [{ [cw]: k, [cx]: [ad, 6, 19, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 19, 21, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bP = [{ [cw]: k, [cx]: [ad, 6, 20, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 20, 22, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bQ = [{ [cw]: k, [cx]: [ad, 6, 26, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 26, 28, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bR = [{ [cv]: [X, Y], [n]: { [cA]: \"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }, { [cv]: bI, [n]: { [cA]: \"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }, { [cv]: bJ, [n]: { [cA]: \"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }, { [cv]: bK, [n]: { [cA]: \"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }], bS = [ad, 0, 7, true], bT = [{ [cw]: k, [cx]: [ad, 7, 15, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 15, 17, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bU = [{ [cw]: k, [cx]: [ad, 7, 16, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 16, 18, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bV = [{ [cw]: k, [cx]: [ad, 7, 20, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 20, 22, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bW = [{ [cw]: k, [cx]: [ad, 7, 21, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 21, 23, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bX = [{ [cw]: k, [cx]: [ad, 7, 27, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 27, 29, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bY = [ac], bZ = [{ [cw]: y, [cx]: [{ [cy]: x }, false] }], ca = [{ [cw]: h, [cx]: [{ [cy]: v }, \"beta\"] }], cb = [\"*\"], cc = [{ [cw]: y, [cx]: [{ [cy]: \"Region\" }, false] }], cd = [{ [cw]: h, [cx]: [{ [cy]: \"Region\" }, \"us-east-1\"] }], ce = [{ [cw]: h, [cx]: [aT, K] }], cf = [{ [cw]: i, [cx]: [aS, \"resourceId[1]\"], [cz]: L }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [aV, I] }] }], cg = [aS, \"resourceId[1]\"], ch = [Y], ci = [{ [cw]: r, [cx]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [aS, \"region\"] }, I] }] }], cj = [{ [cw]: r, [cx]: [{ [cw]: d, [cx]: [{ [cw]: i, [cx]: [aS, \"resourceId[2]\"] }] }] }], ck = [aS, \"resourceId[2]\"], cl = [{ [cw]: g, [cx]: [{ [cw]: i, [cx]: [aS, \"region\"] }], [cz]: \"bucketPartition\" }], cm = [{ [cw]: h, [cx]: [ba, { [cw]: i, [cx]: [{ [cy]: \"partitionResult\" }, j] }] }], cn = [{ [cw]: y, [cx]: [{ [cw]: i, [cx]: [aS, \"region\"] }, true] }], co = [{ [cw]: y, [cx]: [bb, false] }], cp = [{ [cw]: y, [cx]: [aV, false] }], cq = [X], cr = [{ [cw]: y, [cx]: [{ [cy]: \"Region\" }, true] }];\nconst _data = { version: \"1.0\", parameters: { Bucket: T, Region: T, UseFIPS: U, UseDualStack: U, Endpoint: T, ForcePathStyle: U, Accelerate: U, UseGlobalEndpoint: U, UseObjectLambdaEndpoint: V, Key: T, Prefix: T, CopySource: T, DisableAccessPoints: V, DisableMultiRegionAccessPoints: U, UseArnRegion: V, UseS3ExpressControlEndpoint: V, DisableS3ExpressSessionAuth: V }, [cu]: [{ [cv]: [{ [cw]: d, [cx]: by }], [cu]: [{ [cv]: [W, X], error: \"Accelerate cannot be used with FIPS\", [ct]: f }, { [cv]: [Y, Z], error: \"Cannot set dual-stack in combination with a custom endpoint.\", [ct]: f }, { [cv]: [Z, X], error: \"A custom endpoint cannot be combined with FIPS\", [ct]: f }, { [cv]: [Z, W], error: \"A custom endpoint cannot be combined with S3 Accelerate\", [ct]: f }, { [cv]: [X, aa, ab], error: \"Partition does not support FIPS\", [ct]: f }, { [cv]: [ac, { [cw]: k, [cx]: [ad, 0, a, c], [cz]: l }, { [cw]: h, [cx]: [{ [cy]: l }, \"--x-s3\"] }], [cu]: [ae, af, { [cv]: [ao, ap], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [aj, aq], [cu]: [{ [cv]: bH, endpoint: { [cA]: \"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: \"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: \"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: \"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: ak, [cH]: al }, [ct]: n }], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: bF, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bD, [cu]: [{ [cv]: bL, [cu]: bM, [ct]: o }, { [cv]: bN, [cu]: bM, [ct]: o }, { [cv]: bO, [cu]: bM, [ct]: o }, { [cv]: bP, [cu]: bM, [ct]: o }, { [cv]: bQ, [cu]: bM, [ct]: o }, at], [ct]: o }, { [cv]: bL, [cu]: bR, [ct]: o }, { [cv]: bN, [cu]: bR, [ct]: o }, { [cv]: bO, [cu]: bR, [ct]: o }, { [cv]: bP, [cu]: bR, [ct]: o }, { [cv]: bQ, [cu]: bR, [ct]: o }, at], [ct]: o }], [ct]: o }, an], [ct]: o }, { [cv]: [ac, { [cw]: k, [cx]: bS, [cz]: s }, { [cw]: h, [cx]: [{ [cy]: s }, \"--xa-s3\"] }], [cu]: [ae, af, { [cv]: bF, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bD, [cu]: [{ [cv]: bT, [cu]: bM, [ct]: o }, { [cv]: bU, [cu]: bM, [ct]: o }, { [cv]: bV, [cu]: bM, [ct]: o }, { [cv]: bW, [cu]: bM, [ct]: o }, { [cv]: bX, [cu]: bM, [ct]: o }, at], [ct]: o }, { [cv]: bT, [cu]: bR, [ct]: o }, { [cv]: bU, [cu]: bR, [ct]: o }, { [cv]: bV, [cu]: bR, [ct]: o }, { [cv]: bW, [cu]: bR, [ct]: o }, { [cv]: bX, [cu]: bR, [ct]: o }, at], [ct]: o }], [ct]: o }, an], [ct]: o }, { [cv]: [au, ao, ap], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bC, endpoint: { [cA]: t, [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bH, endpoint: { [cA]: \"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: \"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: \"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: \"https://s3express-control.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: al }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [ac, { [cw]: k, [cx]: [ad, 49, 50, c], [cz]: u }, { [cw]: k, [cx]: [ad, 8, 12, c], [cz]: v }, { [cw]: k, [cx]: bS, [cz]: w }, { [cw]: k, [cx]: [ad, 32, 49, c], [cz]: x }, { [cw]: g, [cx]: by, [cz]: \"regionPartition\" }, { [cw]: h, [cx]: [{ [cy]: w }, \"--op-s3\"] }], [cu]: [{ [cv]: bZ, [cu]: [{ [cv]: bF, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [av, \"e\"] }], [cu]: [{ [cv]: ca, [cu]: [aw, { [cv]: bC, endpoint: { [cA]: \"https://{Bucket}.ec2.{url#authority}\", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { endpoint: { [cA]: \"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}\", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { [cv]: [{ [cw]: h, [cx]: [av, \"o\"] }], [cu]: [{ [cv]: ca, [cu]: [aw, { [cv]: bC, endpoint: { [cA]: \"https://{Bucket}.op-{outpostId}.{url#authority}\", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { endpoint: { [cA]: \"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}\", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { error: \"Unrecognized hardware type: \\\"Expected hardware type o or e but got {hardwareType}\\\"\", [ct]: f }], [ct]: o }, { error: \"Invalid Outposts Bucket alias - it must be a valid bucket name.\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.\", [ct]: f }], [ct]: o }, { [cv]: bY, [cu]: [{ [cv]: [Z, { [cw]: r, [cx]: [{ [cw]: d, [cx]: [{ [cw]: m, [cx]: bz }] }] }], error: \"Custom endpoint `{Endpoint}` was not a valid URI\", [ct]: f }, { [cv]: [ay, am], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cc, [cu]: [{ [cv]: [W, ab], error: \"S3 Accelerate cannot be used in this region\", [ct]: f }, { [cv]: [Y, X, aA, aq, aB], endpoint: { [cA]: \"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, X, aA, aq, aD, aE], [cu]: [{ endpoint: aF, [ct]: n }], [ct]: o }, { [cv]: [Y, X, aA, aq, aD, aH], endpoint: aF, [ct]: n }, { [cv]: [ar, X, aA, aq, aB], endpoint: { [cA]: \"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, X, aA, aq, aD, aE], [cu]: [{ endpoint: aI, [ct]: n }], [ct]: o }, { [cv]: [ar, X, aA, aq, aD, aH], endpoint: aI, [ct]: n }, { [cv]: [Y, as, W, aq, aB], endpoint: { [cA]: \"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, as, W, aq, aD, aE], [cu]: [{ endpoint: aJ, [ct]: n }], [ct]: o }, { [cv]: [Y, as, W, aq, aD, aH], endpoint: aJ, [ct]: n }, { [cv]: [Y, as, aA, aq, aB], endpoint: { [cA]: \"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, as, aA, aq, aD, aE], [cu]: [{ endpoint: aK, [ct]: n }], [ct]: o }, { [cv]: [Y, as, aA, aq, aD, aH], endpoint: aK, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, ah, aB], endpoint: { [cA]: C, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, aL, aB], endpoint: { [cA]: q, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, ah, aD, aE], [cu]: [{ [cv]: cd, endpoint: aM, [ct]: n }, { endpoint: aM, [ct]: n }], [ct]: o }, { [cv]: [ar, as, aA, Z, ag, aL, aD, aE], [cu]: [{ [cv]: cd, endpoint: aN, [ct]: n }, aO], [ct]: o }, { [cv]: [ar, as, aA, Z, ag, ah, aD, aH], endpoint: aM, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, aL, aD, aH], endpoint: aN, [ct]: n }, { [cv]: [ar, as, W, aq, aB], endpoint: { [cA]: D, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, W, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: aP, [ct]: n }, { endpoint: aP, [ct]: n }], [ct]: o }, { [cv]: [ar, as, W, aq, aD, aH], endpoint: aP, [ct]: n }, { [cv]: [ar, as, aA, aq, aB], endpoint: { [cA]: E, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: E, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: aQ, [ct]: n }], [ct]: o }, { [cv]: [ar, as, aA, aq, aD, aH], endpoint: aQ, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [Z, ag, { [cw]: h, [cx]: [{ [cw]: i, [cx]: [ai, \"scheme\"] }, \"http\"] }, { [cw]: p, [cx]: [ad, c] }, ay, as, ar, aA], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cc, [cu]: [aO], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [ay, { [cw]: F, [cx]: bA, [cz]: G }], [cu]: [{ [cv]: [{ [cw]: i, [cx]: [aS, \"resourceId[0]\"], [cz]: H }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [aT, I] }] }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [aU, J] }], [cu]: [{ [cv]: ce, [cu]: [{ [cv]: cf, [cu]: [aW, aX, { [cv]: ci, [cu]: [aY, { [cv]: cj, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cm, [cu]: [{ [cv]: cn, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [bb, I] }], error: \"Invalid ARN: Missing account id\", [ct]: f }, { [cv]: co, [cu]: [{ [cv]: cp, [cu]: [{ [cv]: bC, endpoint: { [cA]: M, [cB]: bc, [cH]: al }, [ct]: n }, { [cv]: cq, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bc, [cH]: al }, [ct]: n }, { endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bc, [cH]: al }, [ct]: n }], [ct]: o }, bd], [ct]: o }, be], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, bh], [ct]: o }, { error: \"Invalid ARN: bucket ARN is missing a region\", [ct]: f }], [ct]: o }, bi], [ct]: o }, { error: \"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`\", [ct]: f }], [ct]: o }, { [cv]: ce, [cu]: [{ [cv]: cf, [cu]: [{ [cv]: ci, [cu]: [{ [cv]: ce, [cu]: [{ [cv]: ci, [cu]: [aY, { [cv]: cj, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [ba, \"{partitionResult#name}\"] }], [cu]: [{ [cv]: cn, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [aU, B] }], [cu]: [{ [cv]: co, [cu]: [{ [cv]: cp, [cu]: [{ [cv]: bB, error: \"Access Points do not support S3 Accelerate\", [ct]: f }, { [cv]: bH, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: [as, ar, Z, ag], endpoint: { [cA]: M, [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bj, [cH]: al }, [ct]: n }], [ct]: o }, bd], [ct]: o }, be], [ct]: o }, { error: \"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}\", [ct]: f }], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, bh], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: y, [cx]: [aV, c] }], [cu]: [{ [cv]: ch, error: \"S3 MRAP does not support dual-stack\", [ct]: f }, { [cv]: cq, error: \"S3 MRAP does not support FIPS\", [ct]: f }, { [cv]: bB, error: \"S3 MRAP does not support S3 Accelerate\", [ct]: f }, { [cv]: [{ [cw]: e, [cx]: [{ [cy]: \"DisableMultiRegionAccessPoints\" }, c] }], error: \"Invalid configuration: Multi-Region Access Point ARNs are disabled.\", [ct]: f }, { [cv]: [{ [cw]: g, [cx]: by, [cz]: N }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [{ [cy]: N }, j] }, { [cw]: i, [cx]: [aS, \"partition\"] }] }], [cu]: [{ endpoint: { [cA]: \"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}\", [cB]: { [cD]: [{ [cE]: c, name: z, [cF]: B, [cI]: cb }] }, [cH]: al }, [ct]: n }], [ct]: o }, { error: \"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`\", [ct]: f }], [ct]: o }], [ct]: o }, { error: \"Invalid Access Point Name\", [ct]: f }], [ct]: o }, bi], [ct]: o }, { [cv]: [{ [cw]: h, [cx]: [aU, A] }], [cu]: [{ [cv]: ch, error: \"S3 Outposts does not support Dual-stack\", [ct]: f }, { [cv]: cq, error: \"S3 Outposts does not support FIPS\", [ct]: f }, { [cv]: bB, error: \"S3 Outposts does not support S3 Accelerate\", [ct]: f }, { [cv]: [{ [cw]: d, [cx]: [{ [cw]: i, [cx]: [aS, \"resourceId[4]\"] }] }], error: \"Invalid Arn: Outpost Access Point ARN contains sub resources\", [ct]: f }, { [cv]: [{ [cw]: i, [cx]: cg, [cz]: x }], [cu]: [{ [cv]: bZ, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cm, [cu]: [{ [cv]: cn, [cu]: [{ [cv]: co, [cu]: [{ [cv]: [{ [cw]: i, [cx]: ck, [cz]: O }], [cu]: [{ [cv]: [{ [cw]: i, [cx]: [aS, \"resourceId[3]\"], [cz]: L }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [{ [cy]: O }, K] }], [cu]: [{ [cv]: bC, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}\", [cB]: bk, [cH]: al }, [ct]: n }, { endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bk, [cH]: al }, [ct]: n }], [ct]: o }, { error: \"Expected an outpost type `accesspoint`, found {outpostType}\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: expected an access point name\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: Expected a 4-component resource\", [ct]: f }], [ct]: o }, be], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, { error: \"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: The Outpost Id was not set\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: No ARN type specified\", [ct]: f }], [ct]: o }, { [cv]: [{ [cw]: k, [cx]: [ad, 0, 4, b], [cz]: P }, { [cw]: h, [cx]: [{ [cy]: P }, \"arn:\"] }, { [cw]: r, [cx]: [{ [cw]: d, [cx]: [bl] }] }], error: \"Invalid ARN: `{Bucket}` was not a valid ARN\", [ct]: f }, { [cv]: [{ [cw]: e, [cx]: [az, c] }, bl], error: \"Path-style addressing cannot be used with ARN buckets\", [ct]: f }, { [cv]: bE, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [aA], [cu]: [{ [cv]: [Y, aq, X, aB], endpoint: { [cA]: \"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, aq, X, aD, aE], [cu]: [{ endpoint: bm, [ct]: n }], [ct]: o }, { [cv]: [Y, aq, X, aD, aH], endpoint: bm, [ct]: n }, { [cv]: [ar, aq, X, aB], endpoint: { [cA]: \"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, aq, X, aD, aE], [cu]: [{ endpoint: bn, [ct]: n }], [ct]: o }, { [cv]: [ar, aq, X, aD, aH], endpoint: bn, [ct]: n }, { [cv]: [Y, aq, as, aB], endpoint: { [cA]: \"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, aq, as, aD, aE], [cu]: [{ endpoint: bo, [ct]: n }], [ct]: o }, { [cv]: [Y, aq, as, aD, aH], endpoint: bo, [ct]: n }, { [cv]: [ar, Z, ag, as, aB], endpoint: { [cA]: Q, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, Z, ag, as, aD, aE], [cu]: [{ [cv]: cd, endpoint: bp, [ct]: n }, { endpoint: bp, [ct]: n }], [ct]: o }, { [cv]: [ar, Z, ag, as, aD, aH], endpoint: bp, [ct]: n }, { [cv]: [ar, aq, as, aB], endpoint: { [cA]: R, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, aq, as, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: R, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: bq, [ct]: n }], [ct]: o }, { [cv]: [ar, aq, as, aD, aH], endpoint: bq, [ct]: n }], [ct]: o }, { error: \"Path-style addressing cannot be used with S3 Accelerate\", [ct]: f }], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: d, [cx]: [br] }, { [cw]: e, [cx]: [br, c] }], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cr, [cu]: [aW, aX, { [cv]: bC, endpoint: { [cA]: t, [cB]: bs, [cH]: al }, [ct]: n }, { [cv]: cq, endpoint: { [cA]: \"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}\", [cB]: bs, [cH]: al }, [ct]: n }, { endpoint: { [cA]: \"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}\", [cB]: bs, [cH]: al }, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [au], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cr, [cu]: [{ [cv]: [X, Y, aq, aB], endpoint: { [cA]: \"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [X, Y, aq, aD, aE], [cu]: [{ endpoint: bt, [ct]: n }], [ct]: o }, { [cv]: [X, Y, aq, aD, aH], endpoint: bt, [ct]: n }, { [cv]: [X, ar, aq, aB], endpoint: { [cA]: \"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [X, ar, aq, aD, aE], [cu]: [{ endpoint: bu, [ct]: n }], [ct]: o }, { [cv]: [X, ar, aq, aD, aH], endpoint: bu, [ct]: n }, { [cv]: [as, Y, aq, aB], endpoint: { [cA]: \"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, Y, aq, aD, aE], [cu]: [{ endpoint: bv, [ct]: n }], [ct]: o }, { [cv]: [as, Y, aq, aD, aH], endpoint: bv, [ct]: n }, { [cv]: [as, ar, Z, ag, aB], endpoint: { [cA]: t, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, ar, Z, ag, aD, aE], [cu]: [{ [cv]: cd, endpoint: bw, [ct]: n }, { endpoint: bw, [ct]: n }], [ct]: o }, { [cv]: [as, ar, Z, ag, aD, aH], endpoint: bw, [ct]: n }, { [cv]: [as, ar, aq, aB], endpoint: { [cA]: S, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, ar, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: S, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: bx, [ct]: n }], [ct]: o }, { [cv]: [as, ar, aq, aD, aH], endpoint: bx, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }], [ct]: o }, { error: \"A region must be set when sending requests to S3.\", [ct]: f }] };\nexport const ruleSet = _data;\n", "import { awsEndpointFunctions } from \"@aws-sdk/util-endpoints\";\nimport { customEndpointFunctions, EndpointCache, resolveEndpoint } from \"@smithy/util-endpoints\";\nimport { ruleSet } from \"./ruleset\";\nconst cache = new EndpointCache({\n size: 50,\n params: [\n \"Accelerate\",\n \"Bucket\",\n \"DisableAccessPoints\",\n \"DisableMultiRegionAccessPoints\",\n \"DisableS3ExpressSessionAuth\",\n \"Endpoint\",\n \"ForcePathStyle\",\n \"Region\",\n \"UseArnRegion\",\n \"UseDualStack\",\n \"UseFIPS\",\n \"UseGlobalEndpoint\",\n \"UseObjectLambdaEndpoint\",\n \"UseS3ExpressControlEndpoint\",\n ],\n});\nexport const defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n", "import { resolveAwsSdkSigV4AConfig, resolveAwsSdkSigV4Config, } from \"@aws-sdk/core\";\nimport { SignatureV4MultiRegion } from \"@aws-sdk/signature-v4-multi-region\";\nimport { resolveParams } from \"@smithy/middleware-endpoint\";\nimport { getSmithyContext, normalizeProvider } from \"@smithy/util-middleware\";\nimport { defaultEndpointResolver } from \"../endpoint/endpointResolver\";\nconst createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {\n if (!input) {\n throw new Error(\"Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`\");\n }\n const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);\n const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor\n ?.getEndpointParameterInstructions;\n if (!instructionsFn) {\n throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);\n }\n const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);\n return Object.assign(defaultParameters, endpointParameters);\n};\nconst _defaultS3HttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: getSmithyContext(context).operation,\n region: await normalizeProvider(config.region)() || (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexport const defaultS3HttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultS3HttpAuthSchemeParametersProvider);\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"s3\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createAwsAuthSigv4aHttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4a\",\n signingProperties: {\n name: \"s3\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nconst createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {\n const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {\n const endpoint = defaultEndpointResolver(authParameters);\n const authSchemes = endpoint.properties?.authSchemes;\n if (!authSchemes) {\n return defaultHttpAuthSchemeResolver(authParameters);\n }\n const options = [];\n for (const scheme of authSchemes) {\n const { name: resolvedName, properties = {}, ...rest } = scheme;\n const name = resolvedName.toLowerCase();\n if (resolvedName !== name) {\n console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);\n }\n let schemeId;\n if (name === \"sigv4a\") {\n schemeId = \"aws.auth#sigv4a\";\n const sigv4Present = authSchemes.find((s) => {\n const name = s.name.toLowerCase();\n return name !== \"sigv4a\" && name.startsWith(\"sigv4\");\n });\n if (SignatureV4MultiRegion.sigv4aDependency() === \"none\" && sigv4Present) {\n continue;\n }\n }\n else if (name.startsWith(\"sigv4\")) {\n schemeId = \"aws.auth#sigv4\";\n }\n else {\n throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`);\n }\n const createOption = createHttpAuthOptionFunctions[schemeId];\n if (!createOption) {\n throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);\n }\n const option = createOption(authParameters);\n option.schemeId = schemeId;\n option.signingProperties = { ...(option.signingProperties || {}), ...rest, ...properties };\n options.push(option);\n }\n return options;\n };\n return endpointRuleSetHttpAuthSchemeProvider;\n};\nconst _defaultS3HttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexport const defaultS3HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultS3HttpAuthSchemeProvider, {\n \"aws.auth#sigv4\": createAwsAuthSigv4HttpAuthOption,\n \"aws.auth#sigv4a\": createAwsAuthSigv4aHttpAuthOption,\n});\nexport const resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = resolveAwsSdkSigV4Config(config);\n const config_1 = resolveAwsSdkSigV4AConfig(config_0);\n return Object.assign(config_1, {\n authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n", "const clientContextParamDefaults = {};\nexport const resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n forcePathStyle: options.forcePathStyle ?? false,\n useAccelerateEndpoint: options.useAccelerateEndpoint ?? false,\n useGlobalEndpoint: options.useGlobalEndpoint ?? false,\n disableMultiregionAccessPoints: options.disableMultiregionAccessPoints ?? false,\n defaultSigningName: \"s3\",\n clientContextParams: options.clientContextParams ?? {},\n });\n};\nexport const commonParams = {\n ForcePathStyle: { type: \"clientContextParams\", name: \"forcePathStyle\" },\n UseArnRegion: { type: \"clientContextParams\", name: \"useArnRegion\" },\n DisableMultiRegionAccessPoints: { type: \"clientContextParams\", name: \"disableMultiregionAccessPoints\" },\n Accelerate: { type: \"clientContextParams\", name: \"useAccelerateEndpoint\" },\n DisableS3ExpressSessionAuth: { type: \"clientContextParams\", name: \"disableS3ExpressSessionAuth\" },\n UseGlobalEndpoint: { type: \"builtInParams\", name: \"useGlobalEndpoint\" },\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n", "import { ServiceException as __ServiceException, } from \"@smithy/smithy-client\";\nexport { __ServiceException };\nexport class S3ServiceException extends __ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, S3ServiceException.prototype);\n }\n}\n", "import { S3ServiceException as __BaseException } from \"./S3ServiceException\";\nexport class NoSuchUpload extends __BaseException {\n name = \"NoSuchUpload\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NoSuchUpload\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NoSuchUpload.prototype);\n }\n}\nexport class AccessDenied extends __BaseException {\n name = \"AccessDenied\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"AccessDenied\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AccessDenied.prototype);\n }\n}\nexport class ObjectNotInActiveTierError extends __BaseException {\n name = \"ObjectNotInActiveTierError\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ObjectNotInActiveTierError\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ObjectNotInActiveTierError.prototype);\n }\n}\nexport class BucketAlreadyExists extends __BaseException {\n name = \"BucketAlreadyExists\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"BucketAlreadyExists\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, BucketAlreadyExists.prototype);\n }\n}\nexport class BucketAlreadyOwnedByYou extends __BaseException {\n name = \"BucketAlreadyOwnedByYou\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"BucketAlreadyOwnedByYou\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, BucketAlreadyOwnedByYou.prototype);\n }\n}\nexport class NoSuchBucket extends __BaseException {\n name = \"NoSuchBucket\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NoSuchBucket\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NoSuchBucket.prototype);\n }\n}\nexport class InvalidObjectState extends __BaseException {\n name = \"InvalidObjectState\";\n $fault = \"client\";\n StorageClass;\n AccessTier;\n constructor(opts) {\n super({\n name: \"InvalidObjectState\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidObjectState.prototype);\n this.StorageClass = opts.StorageClass;\n this.AccessTier = opts.AccessTier;\n }\n}\nexport class NoSuchKey extends __BaseException {\n name = \"NoSuchKey\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NoSuchKey\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NoSuchKey.prototype);\n }\n}\nexport class NotFound extends __BaseException {\n name = \"NotFound\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NotFound\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NotFound.prototype);\n }\n}\nexport class EncryptionTypeMismatch extends __BaseException {\n name = \"EncryptionTypeMismatch\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"EncryptionTypeMismatch\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, EncryptionTypeMismatch.prototype);\n }\n}\nexport class InvalidRequest extends __BaseException {\n name = \"InvalidRequest\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidRequest\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidRequest.prototype);\n }\n}\nexport class InvalidWriteOffset extends __BaseException {\n name = \"InvalidWriteOffset\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidWriteOffset\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidWriteOffset.prototype);\n }\n}\nexport class TooManyParts extends __BaseException {\n name = \"TooManyParts\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyParts\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyParts.prototype);\n }\n}\nexport class IdempotencyParameterMismatch extends __BaseException {\n name = \"IdempotencyParameterMismatch\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"IdempotencyParameterMismatch\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, IdempotencyParameterMismatch.prototype);\n }\n}\nexport class ObjectAlreadyInActiveTierError extends __BaseException {\n name = \"ObjectAlreadyInActiveTierError\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ObjectAlreadyInActiveTierError\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ObjectAlreadyInActiveTierError.prototype);\n }\n}\n", "const _A = \"Account\";\nconst _AAO = \"AnalyticsAndOperator\";\nconst _AC = \"AccelerateConfiguration\";\nconst _ACL = \"AccessControlList\";\nconst _ACL_ = \"ACL\";\nconst _ACLn = \"AnalyticsConfigurationList\";\nconst _ACP = \"AccessControlPolicy\";\nconst _ACT = \"AccessControlTranslation\";\nconst _ACn = \"AnalyticsConfiguration\";\nconst _AD = \"AccessDenied\";\nconst _ADb = \"AbortDate\";\nconst _AED = \"AnalyticsExportDestination\";\nconst _AF = \"AnalyticsFilter\";\nconst _AH = \"AllowedHeaders\";\nconst _AHl = \"AllowedHeader\";\nconst _AI = \"AccountId\";\nconst _AIMU = \"AbortIncompleteMultipartUpload\";\nconst _AKI = \"AccessKeyId\";\nconst _AM = \"AllowedMethods\";\nconst _AMU = \"AbortMultipartUpload\";\nconst _AMUO = \"AbortMultipartUploadOutput\";\nconst _AMUR = \"AbortMultipartUploadRequest\";\nconst _AMl = \"AllowedMethod\";\nconst _AO = \"AllowedOrigins\";\nconst _AOl = \"AllowedOrigin\";\nconst _APA = \"AccessPointAlias\";\nconst _APAc = \"AccessPointArn\";\nconst _AQRD = \"AllowQuotedRecordDelimiter\";\nconst _AR = \"AcceptRanges\";\nconst _ARI = \"AbortRuleId\";\nconst _AS = \"AbacStatus\";\nconst _ASBD = \"AnalyticsS3BucketDestination\";\nconst _ASSEBD = \"ApplyServerSideEncryptionByDefault\";\nconst _ASr = \"ArchiveStatus\";\nconst _AT = \"AccessTier\";\nconst _An = \"And\";\nconst _B = \"Bucket\";\nconst _BA = \"BucketArn\";\nconst _BAE = \"BucketAlreadyExists\";\nconst _BAI = \"BucketAccountId\";\nconst _BAOBY = \"BucketAlreadyOwnedByYou\";\nconst _BET = \"BlockedEncryptionTypes\";\nconst _BGR = \"BypassGovernanceRetention\";\nconst _BI = \"BucketInfo\";\nconst _BKE = \"BucketKeyEnabled\";\nconst _BLC = \"BucketLifecycleConfiguration\";\nconst _BLN = \"BucketLocationName\";\nconst _BLS = \"BucketLoggingStatus\";\nconst _BLT = \"BucketLocationType\";\nconst _BN = \"BucketNamespace\";\nconst _BNu = \"BucketName\";\nconst _BP = \"BytesProcessed\";\nconst _BPA = \"BlockPublicAcls\";\nconst _BPP = \"BlockPublicPolicy\";\nconst _BR = \"BucketRegion\";\nconst _BRy = \"BytesReturned\";\nconst _BS = \"BytesScanned\";\nconst _Bo = \"Body\";\nconst _Bu = \"Buckets\";\nconst _C = \"Checksum\";\nconst _CA = \"ChecksumAlgorithm\";\nconst _CACL = \"CannedACL\";\nconst _CB = \"CreateBucket\";\nconst _CBC = \"CreateBucketConfiguration\";\nconst _CBMC = \"CreateBucketMetadataConfiguration\";\nconst _CBMCR = \"CreateBucketMetadataConfigurationRequest\";\nconst _CBMTC = \"CreateBucketMetadataTableConfiguration\";\nconst _CBMTCR = \"CreateBucketMetadataTableConfigurationRequest\";\nconst _CBO = \"CreateBucketOutput\";\nconst _CBR = \"CreateBucketRequest\";\nconst _CC = \"CacheControl\";\nconst _CCRC = \"ChecksumCRC32\";\nconst _CCRCC = \"ChecksumCRC32C\";\nconst _CCRCNVME = \"ChecksumCRC64NVME\";\nconst _CC_ = \"Cache-Control\";\nconst _CD = \"CreationDate\";\nconst _CD_ = \"Content-Disposition\";\nconst _CDo = \"ContentDisposition\";\nconst _CE = \"ContinuationEvent\";\nconst _CE_ = \"Content-Encoding\";\nconst _CEo = \"ContentEncoding\";\nconst _CF = \"CloudFunction\";\nconst _CFC = \"CloudFunctionConfiguration\";\nconst _CL = \"ContentLanguage\";\nconst _CL_ = \"Content-Language\";\nconst _CL__ = \"Content-Length\";\nconst _CLo = \"ContentLength\";\nconst _CM = \"Content-MD5\";\nconst _CMD = \"ContentMD5\";\nconst _CMU = \"CompletedMultipartUpload\";\nconst _CMUO = \"CompleteMultipartUploadOutput\";\nconst _CMUOr = \"CreateMultipartUploadOutput\";\nconst _CMUR = \"CompleteMultipartUploadResult\";\nconst _CMURo = \"CompleteMultipartUploadRequest\";\nconst _CMURr = \"CreateMultipartUploadRequest\";\nconst _CMUo = \"CompleteMultipartUpload\";\nconst _CMUr = \"CreateMultipartUpload\";\nconst _CMh = \"ChecksumMode\";\nconst _CO = \"CopyObject\";\nconst _COO = \"CopyObjectOutput\";\nconst _COR = \"CopyObjectResult\";\nconst _CORSC = \"CORSConfiguration\";\nconst _CORSR = \"CORSRules\";\nconst _CORSRu = \"CORSRule\";\nconst _CORo = \"CopyObjectRequest\";\nconst _CP = \"CommonPrefix\";\nconst _CPL = \"CommonPrefixList\";\nconst _CPLo = \"CompletedPartList\";\nconst _CPR = \"CopyPartResult\";\nconst _CPo = \"CompletedPart\";\nconst _CPom = \"CommonPrefixes\";\nconst _CR = \"ContentRange\";\nconst _CRSBA = \"ConfirmRemoveSelfBucketAccess\";\nconst _CR_ = \"Content-Range\";\nconst _CS = \"CopySource\";\nconst _CSHA = \"ChecksumSHA1\";\nconst _CSHAh = \"ChecksumSHA256\";\nconst _CSIM = \"CopySourceIfMatch\";\nconst _CSIMS = \"CopySourceIfModifiedSince\";\nconst _CSINM = \"CopySourceIfNoneMatch\";\nconst _CSIUS = \"CopySourceIfUnmodifiedSince\";\nconst _CSO = \"CreateSessionOutput\";\nconst _CSR = \"CreateSessionResult\";\nconst _CSRo = \"CopySourceRange\";\nconst _CSRr = \"CreateSessionRequest\";\nconst _CSSSECA = \"CopySourceSSECustomerAlgorithm\";\nconst _CSSSECK = \"CopySourceSSECustomerKey\";\nconst _CSSSECKMD = \"CopySourceSSECustomerKeyMD5\";\nconst _CSV = \"CSV\";\nconst _CSVI = \"CopySourceVersionId\";\nconst _CSVIn = \"CSVInput\";\nconst _CSVO = \"CSVOutput\";\nconst _CSo = \"ConfigurationState\";\nconst _CSr = \"CreateSession\";\nconst _CT = \"ChecksumType\";\nconst _CT_ = \"Content-Type\";\nconst _CTl = \"ClientToken\";\nconst _CTo = \"ContentType\";\nconst _CTom = \"CompressionType\";\nconst _CTon = \"ContinuationToken\";\nconst _Co = \"Condition\";\nconst _Cod = \"Code\";\nconst _Com = \"Comments\";\nconst _Con = \"Contents\";\nconst _Cont = \"Cont\";\nconst _Cr = \"Credentials\";\nconst _D = \"Days\";\nconst _DAI = \"DaysAfterInitiation\";\nconst _DB = \"DeleteBucket\";\nconst _DBAC = \"DeleteBucketAnalyticsConfiguration\";\nconst _DBACR = \"DeleteBucketAnalyticsConfigurationRequest\";\nconst _DBC = \"DeleteBucketCors\";\nconst _DBCR = \"DeleteBucketCorsRequest\";\nconst _DBE = \"DeleteBucketEncryption\";\nconst _DBER = \"DeleteBucketEncryptionRequest\";\nconst _DBIC = \"DeleteBucketInventoryConfiguration\";\nconst _DBICR = \"DeleteBucketInventoryConfigurationRequest\";\nconst _DBITC = \"DeleteBucketIntelligentTieringConfiguration\";\nconst _DBITCR = \"DeleteBucketIntelligentTieringConfigurationRequest\";\nconst _DBL = \"DeleteBucketLifecycle\";\nconst _DBLR = \"DeleteBucketLifecycleRequest\";\nconst _DBMC = \"DeleteBucketMetadataConfiguration\";\nconst _DBMCR = \"DeleteBucketMetadataConfigurationRequest\";\nconst _DBMCRe = \"DeleteBucketMetricsConfigurationRequest\";\nconst _DBMCe = \"DeleteBucketMetricsConfiguration\";\nconst _DBMTC = \"DeleteBucketMetadataTableConfiguration\";\nconst _DBMTCR = \"DeleteBucketMetadataTableConfigurationRequest\";\nconst _DBOC = \"DeleteBucketOwnershipControls\";\nconst _DBOCR = \"DeleteBucketOwnershipControlsRequest\";\nconst _DBP = \"DeleteBucketPolicy\";\nconst _DBPR = \"DeleteBucketPolicyRequest\";\nconst _DBR = \"DeleteBucketRequest\";\nconst _DBRR = \"DeleteBucketReplicationRequest\";\nconst _DBRe = \"DeleteBucketReplication\";\nconst _DBT = \"DeleteBucketTagging\";\nconst _DBTR = \"DeleteBucketTaggingRequest\";\nconst _DBW = \"DeleteBucketWebsite\";\nconst _DBWR = \"DeleteBucketWebsiteRequest\";\nconst _DE = \"DataExport\";\nconst _DIM = \"DestinationIfMatch\";\nconst _DIMS = \"DestinationIfModifiedSince\";\nconst _DINM = \"DestinationIfNoneMatch\";\nconst _DIUS = \"DestinationIfUnmodifiedSince\";\nconst _DM = \"DeleteMarker\";\nconst _DME = \"DeleteMarkerEntry\";\nconst _DMR = \"DeleteMarkerReplication\";\nconst _DMVI = \"DeleteMarkerVersionId\";\nconst _DMe = \"DeleteMarkers\";\nconst _DN = \"DisplayName\";\nconst _DO = \"DeletedObject\";\nconst _DOO = \"DeleteObjectOutput\";\nconst _DOOe = \"DeleteObjectsOutput\";\nconst _DOR = \"DeleteObjectRequest\";\nconst _DORe = \"DeleteObjectsRequest\";\nconst _DOT = \"DeleteObjectTagging\";\nconst _DOTO = \"DeleteObjectTaggingOutput\";\nconst _DOTR = \"DeleteObjectTaggingRequest\";\nconst _DOe = \"DeletedObjects\";\nconst _DOel = \"DeleteObject\";\nconst _DOele = \"DeleteObjects\";\nconst _DPAB = \"DeletePublicAccessBlock\";\nconst _DPABR = \"DeletePublicAccessBlockRequest\";\nconst _DR = \"DataRedundancy\";\nconst _DRe = \"DefaultRetention\";\nconst _DRel = \"DeleteResult\";\nconst _DRes = \"DestinationResult\";\nconst _Da = \"Date\";\nconst _De = \"Delete\";\nconst _Del = \"Deleted\";\nconst _Deli = \"Delimiter\";\nconst _Des = \"Destination\";\nconst _Desc = \"Description\";\nconst _Det = \"Details\";\nconst _E = \"Expiration\";\nconst _EA = \"EmailAddress\";\nconst _EBC = \"EventBridgeConfiguration\";\nconst _EBO = \"ExpectedBucketOwner\";\nconst _EC = \"EncryptionConfiguration\";\nconst _ECr = \"ErrorCode\";\nconst _ED = \"ErrorDetails\";\nconst _EDr = \"ErrorDocument\";\nconst _EE = \"EndEvent\";\nconst _EH = \"ExposeHeaders\";\nconst _EHx = \"ExposeHeader\";\nconst _EM = \"ErrorMessage\";\nconst _EODM = \"ExpiredObjectDeleteMarker\";\nconst _EOR = \"ExistingObjectReplication\";\nconst _ES = \"ExpiresString\";\nconst _ESBO = \"ExpectedSourceBucketOwner\";\nconst _ET = \"EncryptionType\";\nconst _ETL = \"EncryptionTypeList\";\nconst _ETM = \"EncryptionTypeMismatch\";\nconst _ETa = \"ETag\";\nconst _ETn = \"EncodingType\";\nconst _ETv = \"EventThreshold\";\nconst _ETx = \"ExpressionType\";\nconst _En = \"Encryption\";\nconst _Ena = \"Enabled\";\nconst _End = \"End\";\nconst _Er = \"Errors\";\nconst _Err = \"Error\";\nconst _Ev = \"Events\";\nconst _Eve = \"Event\";\nconst _Ex = \"Expires\";\nconst _Exp = \"Expression\";\nconst _F = \"Filter\";\nconst _FD = \"FieldDelimiter\";\nconst _FHI = \"FileHeaderInfo\";\nconst _FO = \"FetchOwner\";\nconst _FR = \"FilterRule\";\nconst _FRL = \"FilterRuleList\";\nconst _FRi = \"FilterRules\";\nconst _Fi = \"Field\";\nconst _Fo = \"Format\";\nconst _Fr = \"Frequency\";\nconst _G = \"Grants\";\nconst _GBA = \"GetBucketAbac\";\nconst _GBAC = \"GetBucketAccelerateConfiguration\";\nconst _GBACO = \"GetBucketAccelerateConfigurationOutput\";\nconst _GBACOe = \"GetBucketAnalyticsConfigurationOutput\";\nconst _GBACR = \"GetBucketAccelerateConfigurationRequest\";\nconst _GBACRe = \"GetBucketAnalyticsConfigurationRequest\";\nconst _GBACe = \"GetBucketAnalyticsConfiguration\";\nconst _GBAO = \"GetBucketAbacOutput\";\nconst _GBAOe = \"GetBucketAclOutput\";\nconst _GBAR = \"GetBucketAbacRequest\";\nconst _GBARe = \"GetBucketAclRequest\";\nconst _GBAe = \"GetBucketAcl\";\nconst _GBC = \"GetBucketCors\";\nconst _GBCO = \"GetBucketCorsOutput\";\nconst _GBCR = \"GetBucketCorsRequest\";\nconst _GBE = \"GetBucketEncryption\";\nconst _GBEO = \"GetBucketEncryptionOutput\";\nconst _GBER = \"GetBucketEncryptionRequest\";\nconst _GBIC = \"GetBucketInventoryConfiguration\";\nconst _GBICO = \"GetBucketInventoryConfigurationOutput\";\nconst _GBICR = \"GetBucketInventoryConfigurationRequest\";\nconst _GBITC = \"GetBucketIntelligentTieringConfiguration\";\nconst _GBITCO = \"GetBucketIntelligentTieringConfigurationOutput\";\nconst _GBITCR = \"GetBucketIntelligentTieringConfigurationRequest\";\nconst _GBL = \"GetBucketLocation\";\nconst _GBLC = \"GetBucketLifecycleConfiguration\";\nconst _GBLCO = \"GetBucketLifecycleConfigurationOutput\";\nconst _GBLCR = \"GetBucketLifecycleConfigurationRequest\";\nconst _GBLO = \"GetBucketLocationOutput\";\nconst _GBLOe = \"GetBucketLoggingOutput\";\nconst _GBLR = \"GetBucketLocationRequest\";\nconst _GBLRe = \"GetBucketLoggingRequest\";\nconst _GBLe = \"GetBucketLogging\";\nconst _GBMC = \"GetBucketMetadataConfiguration\";\nconst _GBMCO = \"GetBucketMetadataConfigurationOutput\";\nconst _GBMCOe = \"GetBucketMetricsConfigurationOutput\";\nconst _GBMCR = \"GetBucketMetadataConfigurationResult\";\nconst _GBMCRe = \"GetBucketMetadataConfigurationRequest\";\nconst _GBMCRet = \"GetBucketMetricsConfigurationRequest\";\nconst _GBMCe = \"GetBucketMetricsConfiguration\";\nconst _GBMTC = \"GetBucketMetadataTableConfiguration\";\nconst _GBMTCO = \"GetBucketMetadataTableConfigurationOutput\";\nconst _GBMTCR = \"GetBucketMetadataTableConfigurationResult\";\nconst _GBMTCRe = \"GetBucketMetadataTableConfigurationRequest\";\nconst _GBNC = \"GetBucketNotificationConfiguration\";\nconst _GBNCR = \"GetBucketNotificationConfigurationRequest\";\nconst _GBOC = \"GetBucketOwnershipControls\";\nconst _GBOCO = \"GetBucketOwnershipControlsOutput\";\nconst _GBOCR = \"GetBucketOwnershipControlsRequest\";\nconst _GBP = \"GetBucketPolicy\";\nconst _GBPO = \"GetBucketPolicyOutput\";\nconst _GBPR = \"GetBucketPolicyRequest\";\nconst _GBPS = \"GetBucketPolicyStatus\";\nconst _GBPSO = \"GetBucketPolicyStatusOutput\";\nconst _GBPSR = \"GetBucketPolicyStatusRequest\";\nconst _GBR = \"GetBucketReplication\";\nconst _GBRO = \"GetBucketReplicationOutput\";\nconst _GBRP = \"GetBucketRequestPayment\";\nconst _GBRPO = \"GetBucketRequestPaymentOutput\";\nconst _GBRPR = \"GetBucketRequestPaymentRequest\";\nconst _GBRR = \"GetBucketReplicationRequest\";\nconst _GBT = \"GetBucketTagging\";\nconst _GBTO = \"GetBucketTaggingOutput\";\nconst _GBTR = \"GetBucketTaggingRequest\";\nconst _GBV = \"GetBucketVersioning\";\nconst _GBVO = \"GetBucketVersioningOutput\";\nconst _GBVR = \"GetBucketVersioningRequest\";\nconst _GBW = \"GetBucketWebsite\";\nconst _GBWO = \"GetBucketWebsiteOutput\";\nconst _GBWR = \"GetBucketWebsiteRequest\";\nconst _GFC = \"GrantFullControl\";\nconst _GJP = \"GlacierJobParameters\";\nconst _GO = \"GetObject\";\nconst _GOA = \"GetObjectAcl\";\nconst _GOAO = \"GetObjectAclOutput\";\nconst _GOAOe = \"GetObjectAttributesOutput\";\nconst _GOAP = \"GetObjectAttributesParts\";\nconst _GOAR = \"GetObjectAclRequest\";\nconst _GOARe = \"GetObjectAttributesResponse\";\nconst _GOARet = \"GetObjectAttributesRequest\";\nconst _GOAe = \"GetObjectAttributes\";\nconst _GOLC = \"GetObjectLockConfiguration\";\nconst _GOLCO = \"GetObjectLockConfigurationOutput\";\nconst _GOLCR = \"GetObjectLockConfigurationRequest\";\nconst _GOLH = \"GetObjectLegalHold\";\nconst _GOLHO = \"GetObjectLegalHoldOutput\";\nconst _GOLHR = \"GetObjectLegalHoldRequest\";\nconst _GOO = \"GetObjectOutput\";\nconst _GOR = \"GetObjectRequest\";\nconst _GORO = \"GetObjectRetentionOutput\";\nconst _GORR = \"GetObjectRetentionRequest\";\nconst _GORe = \"GetObjectRetention\";\nconst _GOT = \"GetObjectTagging\";\nconst _GOTO = \"GetObjectTaggingOutput\";\nconst _GOTOe = \"GetObjectTorrentOutput\";\nconst _GOTR = \"GetObjectTaggingRequest\";\nconst _GOTRe = \"GetObjectTorrentRequest\";\nconst _GOTe = \"GetObjectTorrent\";\nconst _GPAB = \"GetPublicAccessBlock\";\nconst _GPABO = \"GetPublicAccessBlockOutput\";\nconst _GPABR = \"GetPublicAccessBlockRequest\";\nconst _GR = \"GrantRead\";\nconst _GRACP = \"GrantReadACP\";\nconst _GW = \"GrantWrite\";\nconst _GWACP = \"GrantWriteACP\";\nconst _Gr = \"Grant\";\nconst _Gra = \"Grantee\";\nconst _HB = \"HeadBucket\";\nconst _HBO = \"HeadBucketOutput\";\nconst _HBR = \"HeadBucketRequest\";\nconst _HECRE = \"HttpErrorCodeReturnedEquals\";\nconst _HN = \"HostName\";\nconst _HO = \"HeadObject\";\nconst _HOO = \"HeadObjectOutput\";\nconst _HOR = \"HeadObjectRequest\";\nconst _HRC = \"HttpRedirectCode\";\nconst _I = \"Id\";\nconst _IC = \"InventoryConfiguration\";\nconst _ICL = \"InventoryConfigurationList\";\nconst _ID = \"ID\";\nconst _IDn = \"IndexDocument\";\nconst _IDnv = \"InventoryDestination\";\nconst _IE = \"IsEnabled\";\nconst _IEn = \"InventoryEncryption\";\nconst _IF = \"InventoryFilter\";\nconst _IL = \"IsLatest\";\nconst _IM = \"IfMatch\";\nconst _IMIT = \"IfMatchInitiatedTime\";\nconst _IMLMT = \"IfMatchLastModifiedTime\";\nconst _IMS = \"IfMatchSize\";\nconst _IMS_ = \"If-Modified-Since\";\nconst _IMSf = \"IfModifiedSince\";\nconst _IMUR = \"InitiateMultipartUploadResult\";\nconst _IM_ = \"If-Match\";\nconst _INM = \"IfNoneMatch\";\nconst _INM_ = \"If-None-Match\";\nconst _IOF = \"InventoryOptionalFields\";\nconst _IOS = \"InvalidObjectState\";\nconst _IOV = \"IncludedObjectVersions\";\nconst _IP = \"IsPublic\";\nconst _IPA = \"IgnorePublicAcls\";\nconst _IPM = \"IdempotencyParameterMismatch\";\nconst _IR = \"InvalidRequest\";\nconst _IRIP = \"IsRestoreInProgress\";\nconst _IS = \"InputSerialization\";\nconst _ISBD = \"InventoryS3BucketDestination\";\nconst _ISn = \"InventorySchedule\";\nconst _IT = \"IsTruncated\";\nconst _ITAO = \"IntelligentTieringAndOperator\";\nconst _ITC = \"IntelligentTieringConfiguration\";\nconst _ITCL = \"IntelligentTieringConfigurationList\";\nconst _ITCR = \"InventoryTableConfigurationResult\";\nconst _ITCU = \"InventoryTableConfigurationUpdates\";\nconst _ITCn = \"InventoryTableConfiguration\";\nconst _ITF = \"IntelligentTieringFilter\";\nconst _IUS = \"IfUnmodifiedSince\";\nconst _IUS_ = \"If-Unmodified-Since\";\nconst _IWO = \"InvalidWriteOffset\";\nconst _In = \"Initiator\";\nconst _Ini = \"Initiated\";\nconst _JSON = \"JSON\";\nconst _JSONI = \"JSONInput\";\nconst _JSONO = \"JSONOutput\";\nconst _JTC = \"JournalTableConfiguration\";\nconst _JTCR = \"JournalTableConfigurationResult\";\nconst _JTCU = \"JournalTableConfigurationUpdates\";\nconst _K = \"Key\";\nconst _KC = \"KeyCount\";\nconst _KI = \"KeyId\";\nconst _KKA = \"KmsKeyArn\";\nconst _KM = \"KeyMarker\";\nconst _KMSC = \"KMSContext\";\nconst _KMSKA = \"KMSKeyArn\";\nconst _KMSKI = \"KMSKeyId\";\nconst _KMSMKID = \"KMSMasterKeyID\";\nconst _KPE = \"KeyPrefixEquals\";\nconst _L = \"Location\";\nconst _LAMBR = \"ListAllMyBucketsResult\";\nconst _LAMDBR = \"ListAllMyDirectoryBucketsResult\";\nconst _LB = \"ListBuckets\";\nconst _LBAC = \"ListBucketAnalyticsConfigurations\";\nconst _LBACO = \"ListBucketAnalyticsConfigurationsOutput\";\nconst _LBACR = \"ListBucketAnalyticsConfigurationResult\";\nconst _LBACRi = \"ListBucketAnalyticsConfigurationsRequest\";\nconst _LBIC = \"ListBucketInventoryConfigurations\";\nconst _LBICO = \"ListBucketInventoryConfigurationsOutput\";\nconst _LBICR = \"ListBucketInventoryConfigurationsRequest\";\nconst _LBITC = \"ListBucketIntelligentTieringConfigurations\";\nconst _LBITCO = \"ListBucketIntelligentTieringConfigurationsOutput\";\nconst _LBITCR = \"ListBucketIntelligentTieringConfigurationsRequest\";\nconst _LBMC = \"ListBucketMetricsConfigurations\";\nconst _LBMCO = \"ListBucketMetricsConfigurationsOutput\";\nconst _LBMCR = \"ListBucketMetricsConfigurationsRequest\";\nconst _LBO = \"ListBucketsOutput\";\nconst _LBR = \"ListBucketsRequest\";\nconst _LBRi = \"ListBucketResult\";\nconst _LC = \"LocationConstraint\";\nconst _LCi = \"LifecycleConfiguration\";\nconst _LDB = \"ListDirectoryBuckets\";\nconst _LDBO = \"ListDirectoryBucketsOutput\";\nconst _LDBR = \"ListDirectoryBucketsRequest\";\nconst _LE = \"LoggingEnabled\";\nconst _LEi = \"LifecycleExpiration\";\nconst _LFA = \"LambdaFunctionArn\";\nconst _LFC = \"LambdaFunctionConfiguration\";\nconst _LFCL = \"LambdaFunctionConfigurationList\";\nconst _LFCa = \"LambdaFunctionConfigurations\";\nconst _LH = \"LegalHold\";\nconst _LI = \"LocationInfo\";\nconst _LICR = \"ListInventoryConfigurationsResult\";\nconst _LM = \"LastModified\";\nconst _LMCR = \"ListMetricsConfigurationsResult\";\nconst _LMT = \"LastModifiedTime\";\nconst _LMU = \"ListMultipartUploads\";\nconst _LMUO = \"ListMultipartUploadsOutput\";\nconst _LMUR = \"ListMultipartUploadsResult\";\nconst _LMURi = \"ListMultipartUploadsRequest\";\nconst _LM_ = \"Last-Modified\";\nconst _LO = \"ListObjects\";\nconst _LOO = \"ListObjectsOutput\";\nconst _LOR = \"ListObjectsRequest\";\nconst _LOV = \"ListObjectsV2\";\nconst _LOVO = \"ListObjectsV2Output\";\nconst _LOVOi = \"ListObjectVersionsOutput\";\nconst _LOVR = \"ListObjectsV2Request\";\nconst _LOVRi = \"ListObjectVersionsRequest\";\nconst _LOVi = \"ListObjectVersions\";\nconst _LP = \"ListParts\";\nconst _LPO = \"ListPartsOutput\";\nconst _LPR = \"ListPartsResult\";\nconst _LPRi = \"ListPartsRequest\";\nconst _LR = \"LifecycleRule\";\nconst _LRAO = \"LifecycleRuleAndOperator\";\nconst _LRF = \"LifecycleRuleFilter\";\nconst _LRi = \"LifecycleRules\";\nconst _LVR = \"ListVersionsResult\";\nconst _M = \"Metadata\";\nconst _MAO = \"MetricsAndOperator\";\nconst _MAS = \"MaxAgeSeconds\";\nconst _MB = \"MaxBuckets\";\nconst _MC = \"MetadataConfiguration\";\nconst _MCL = \"MetricsConfigurationList\";\nconst _MCR = \"MetadataConfigurationResult\";\nconst _MCe = \"MetricsConfiguration\";\nconst _MD = \"MetadataDirective\";\nconst _MDB = \"MaxDirectoryBuckets\";\nconst _MDf = \"MfaDelete\";\nconst _ME = \"MetadataEntry\";\nconst _MF = \"MetricsFilter\";\nconst _MFA = \"MFA\";\nconst _MFAD = \"MFADelete\";\nconst _MK = \"MaxKeys\";\nconst _MM = \"MissingMeta\";\nconst _MOS = \"MpuObjectSize\";\nconst _MP = \"MaxParts\";\nconst _MTC = \"MetadataTableConfiguration\";\nconst _MTCR = \"MetadataTableConfigurationResult\";\nconst _MTEC = \"MetadataTableEncryptionConfiguration\";\nconst _MU = \"MultipartUpload\";\nconst _MUL = \"MultipartUploadList\";\nconst _MUa = \"MaxUploads\";\nconst _Ma = \"Marker\";\nconst _Me = \"Metrics\";\nconst _Mes = \"Message\";\nconst _Mi = \"Minutes\";\nconst _Mo = \"Mode\";\nconst _N = \"Name\";\nconst _NC = \"NotificationConfiguration\";\nconst _NCF = \"NotificationConfigurationFilter\";\nconst _NCT = \"NextContinuationToken\";\nconst _ND = \"NoncurrentDays\";\nconst _NEKKAS = \"NonEmptyKmsKeyArnString\";\nconst _NF = \"NotFound\";\nconst _NKM = \"NextKeyMarker\";\nconst _NM = \"NextMarker\";\nconst _NNV = \"NewerNoncurrentVersions\";\nconst _NPNM = \"NextPartNumberMarker\";\nconst _NSB = \"NoSuchBucket\";\nconst _NSK = \"NoSuchKey\";\nconst _NSU = \"NoSuchUpload\";\nconst _NUIM = \"NextUploadIdMarker\";\nconst _NVE = \"NoncurrentVersionExpiration\";\nconst _NVIM = \"NextVersionIdMarker\";\nconst _NVT = \"NoncurrentVersionTransitions\";\nconst _NVTL = \"NoncurrentVersionTransitionList\";\nconst _NVTo = \"NoncurrentVersionTransition\";\nconst _O = \"Owner\";\nconst _OA = \"ObjectAttributes\";\nconst _OAIATE = \"ObjectAlreadyInActiveTierError\";\nconst _OC = \"OwnershipControls\";\nconst _OCR = \"OwnershipControlsRule\";\nconst _OCRw = \"OwnershipControlsRules\";\nconst _OE = \"ObjectEncryption\";\nconst _OF = \"OptionalFields\";\nconst _OI = \"ObjectIdentifier\";\nconst _OIL = \"ObjectIdentifierList\";\nconst _OL = \"OutputLocation\";\nconst _OLC = \"ObjectLockConfiguration\";\nconst _OLE = \"ObjectLockEnabled\";\nconst _OLEFB = \"ObjectLockEnabledForBucket\";\nconst _OLLH = \"ObjectLockLegalHold\";\nconst _OLLHS = \"ObjectLockLegalHoldStatus\";\nconst _OLM = \"ObjectLockMode\";\nconst _OLR = \"ObjectLockRetention\";\nconst _OLRUD = \"ObjectLockRetainUntilDate\";\nconst _OLRb = \"ObjectLockRule\";\nconst _OLb = \"ObjectList\";\nconst _ONIATE = \"ObjectNotInActiveTierError\";\nconst _OO = \"ObjectOwnership\";\nconst _OOA = \"OptionalObjectAttributes\";\nconst _OP = \"ObjectParts\";\nconst _OPb = \"ObjectPart\";\nconst _OS = \"ObjectSize\";\nconst _OSGT = \"ObjectSizeGreaterThan\";\nconst _OSLT = \"ObjectSizeLessThan\";\nconst _OSV = \"OutputSchemaVersion\";\nconst _OSu = \"OutputSerialization\";\nconst _OV = \"ObjectVersion\";\nconst _OVL = \"ObjectVersionList\";\nconst _Ob = \"Objects\";\nconst _Obj = \"Object\";\nconst _P = \"Prefix\";\nconst _PABC = \"PublicAccessBlockConfiguration\";\nconst _PBA = \"PutBucketAbac\";\nconst _PBAC = \"PutBucketAccelerateConfiguration\";\nconst _PBACR = \"PutBucketAccelerateConfigurationRequest\";\nconst _PBACRu = \"PutBucketAnalyticsConfigurationRequest\";\nconst _PBACu = \"PutBucketAnalyticsConfiguration\";\nconst _PBAR = \"PutBucketAbacRequest\";\nconst _PBARu = \"PutBucketAclRequest\";\nconst _PBAu = \"PutBucketAcl\";\nconst _PBC = \"PutBucketCors\";\nconst _PBCR = \"PutBucketCorsRequest\";\nconst _PBE = \"PutBucketEncryption\";\nconst _PBER = \"PutBucketEncryptionRequest\";\nconst _PBIC = \"PutBucketInventoryConfiguration\";\nconst _PBICR = \"PutBucketInventoryConfigurationRequest\";\nconst _PBITC = \"PutBucketIntelligentTieringConfiguration\";\nconst _PBITCR = \"PutBucketIntelligentTieringConfigurationRequest\";\nconst _PBL = \"PutBucketLogging\";\nconst _PBLC = \"PutBucketLifecycleConfiguration\";\nconst _PBLCO = \"PutBucketLifecycleConfigurationOutput\";\nconst _PBLCR = \"PutBucketLifecycleConfigurationRequest\";\nconst _PBLR = \"PutBucketLoggingRequest\";\nconst _PBMC = \"PutBucketMetricsConfiguration\";\nconst _PBMCR = \"PutBucketMetricsConfigurationRequest\";\nconst _PBNC = \"PutBucketNotificationConfiguration\";\nconst _PBNCR = \"PutBucketNotificationConfigurationRequest\";\nconst _PBOC = \"PutBucketOwnershipControls\";\nconst _PBOCR = \"PutBucketOwnershipControlsRequest\";\nconst _PBP = \"PutBucketPolicy\";\nconst _PBPR = \"PutBucketPolicyRequest\";\nconst _PBR = \"PutBucketReplication\";\nconst _PBRP = \"PutBucketRequestPayment\";\nconst _PBRPR = \"PutBucketRequestPaymentRequest\";\nconst _PBRR = \"PutBucketReplicationRequest\";\nconst _PBT = \"PutBucketTagging\";\nconst _PBTR = \"PutBucketTaggingRequest\";\nconst _PBV = \"PutBucketVersioning\";\nconst _PBVR = \"PutBucketVersioningRequest\";\nconst _PBW = \"PutBucketWebsite\";\nconst _PBWR = \"PutBucketWebsiteRequest\";\nconst _PC = \"PartsCount\";\nconst _PDS = \"PartitionDateSource\";\nconst _PE = \"ProgressEvent\";\nconst _PI = \"ParquetInput\";\nconst _PL = \"PartsList\";\nconst _PN = \"PartNumber\";\nconst _PNM = \"PartNumberMarker\";\nconst _PO = \"PutObject\";\nconst _POA = \"PutObjectAcl\";\nconst _POAO = \"PutObjectAclOutput\";\nconst _POAR = \"PutObjectAclRequest\";\nconst _POLC = \"PutObjectLockConfiguration\";\nconst _POLCO = \"PutObjectLockConfigurationOutput\";\nconst _POLCR = \"PutObjectLockConfigurationRequest\";\nconst _POLH = \"PutObjectLegalHold\";\nconst _POLHO = \"PutObjectLegalHoldOutput\";\nconst _POLHR = \"PutObjectLegalHoldRequest\";\nconst _POO = \"PutObjectOutput\";\nconst _POR = \"PutObjectRequest\";\nconst _PORO = \"PutObjectRetentionOutput\";\nconst _PORR = \"PutObjectRetentionRequest\";\nconst _PORu = \"PutObjectRetention\";\nconst _POT = \"PutObjectTagging\";\nconst _POTO = \"PutObjectTaggingOutput\";\nconst _POTR = \"PutObjectTaggingRequest\";\nconst _PP = \"PartitionedPrefix\";\nconst _PPAB = \"PutPublicAccessBlock\";\nconst _PPABR = \"PutPublicAccessBlockRequest\";\nconst _PS = \"PolicyStatus\";\nconst _Pa = \"Parts\";\nconst _Par = \"Part\";\nconst _Parq = \"Parquet\";\nconst _Pay = \"Payer\";\nconst _Payl = \"Payload\";\nconst _Pe = \"Permission\";\nconst _Po = \"Policy\";\nconst _Pr = \"Progress\";\nconst _Pri = \"Priority\";\nconst _Pro = \"Protocol\";\nconst _Q = \"Quiet\";\nconst _QA = \"QueueArn\";\nconst _QC = \"QuoteCharacter\";\nconst _QCL = \"QueueConfigurationList\";\nconst _QCu = \"QueueConfigurations\";\nconst _QCue = \"QueueConfiguration\";\nconst _QEC = \"QuoteEscapeCharacter\";\nconst _QF = \"QuoteFields\";\nconst _Qu = \"Queue\";\nconst _R = \"Rules\";\nconst _RART = \"RedirectAllRequestsTo\";\nconst _RC = \"RequestCharged\";\nconst _RCC = \"ResponseCacheControl\";\nconst _RCD = \"ResponseContentDisposition\";\nconst _RCE = \"ResponseContentEncoding\";\nconst _RCL = \"ResponseContentLanguage\";\nconst _RCT = \"ResponseContentType\";\nconst _RCe = \"ReplicationConfiguration\";\nconst _RD = \"RecordDelimiter\";\nconst _RE = \"ResponseExpires\";\nconst _RED = \"RestoreExpiryDate\";\nconst _REe = \"RecordExpiration\";\nconst _REec = \"RecordsEvent\";\nconst _RKKID = \"ReplicaKmsKeyID\";\nconst _RKPW = \"ReplaceKeyPrefixWith\";\nconst _RKW = \"ReplaceKeyWith\";\nconst _RM = \"ReplicaModifications\";\nconst _RO = \"RenameObject\";\nconst _ROO = \"RenameObjectOutput\";\nconst _ROOe = \"RestoreObjectOutput\";\nconst _ROP = \"RestoreOutputPath\";\nconst _ROR = \"RenameObjectRequest\";\nconst _RORe = \"RestoreObjectRequest\";\nconst _ROe = \"RestoreObject\";\nconst _RP = \"RequestPayer\";\nconst _RPB = \"RestrictPublicBuckets\";\nconst _RPC = \"RequestPaymentConfiguration\";\nconst _RPe = \"RequestProgress\";\nconst _RR = \"RoutingRules\";\nconst _RRAO = \"ReplicationRuleAndOperator\";\nconst _RRF = \"ReplicationRuleFilter\";\nconst _RRe = \"ReplicationRule\";\nconst _RRep = \"ReplicationRules\";\nconst _RReq = \"RequestRoute\";\nconst _RRes = \"RestoreRequest\";\nconst _RRo = \"RoutingRule\";\nconst _RS = \"ReplicationStatus\";\nconst _RSe = \"RestoreStatus\";\nconst _RSen = \"RenameSource\";\nconst _RT = \"ReplicationTime\";\nconst _RTV = \"ReplicationTimeValue\";\nconst _RTe = \"RequestToken\";\nconst _RUD = \"RetainUntilDate\";\nconst _Ra = \"Range\";\nconst _Re = \"Restore\";\nconst _Rec = \"Records\";\nconst _Red = \"Redirect\";\nconst _Ret = \"Retention\";\nconst _Ro = \"Role\";\nconst _Ru = \"Rule\";\nconst _S = \"Status\";\nconst _SA = \"StartAfter\";\nconst _SAK = \"SecretAccessKey\";\nconst _SAs = \"SseAlgorithm\";\nconst _SB = \"StreamingBlob\";\nconst _SBD = \"S3BucketDestination\";\nconst _SC = \"StorageClass\";\nconst _SCA = \"StorageClassAnalysis\";\nconst _SCADE = \"StorageClassAnalysisDataExport\";\nconst _SCV = \"SessionCredentialValue\";\nconst _SCe = \"SessionCredentials\";\nconst _SCt = \"StatusCode\";\nconst _SDV = \"SkipDestinationValidation\";\nconst _SE = \"StatsEvent\";\nconst _SIM = \"SourceIfMatch\";\nconst _SIMS = \"SourceIfModifiedSince\";\nconst _SINM = \"SourceIfNoneMatch\";\nconst _SIUS = \"SourceIfUnmodifiedSince\";\nconst _SK = \"SSE-KMS\";\nconst _SKEO = \"SseKmsEncryptedObjects\";\nconst _SKF = \"S3KeyFilter\";\nconst _SKe = \"S3Key\";\nconst _SL = \"S3Location\";\nconst _SM = \"SessionMode\";\nconst _SOC = \"SelectObjectContent\";\nconst _SOCES = \"SelectObjectContentEventStream\";\nconst _SOCO = \"SelectObjectContentOutput\";\nconst _SOCR = \"SelectObjectContentRequest\";\nconst _SP = \"SelectParameters\";\nconst _SPi = \"SimplePrefix\";\nconst _SR = \"ScanRange\";\nconst _SS = \"SSE-S3\";\nconst _SSC = \"SourceSelectionCriteria\";\nconst _SSE = \"ServerSideEncryption\";\nconst _SSEA = \"SSEAlgorithm\";\nconst _SSEBD = \"ServerSideEncryptionByDefault\";\nconst _SSEC = \"ServerSideEncryptionConfiguration\";\nconst _SSECA = \"SSECustomerAlgorithm\";\nconst _SSECK = \"SSECustomerKey\";\nconst _SSECKMD = \"SSECustomerKeyMD5\";\nconst _SSEKMS = \"SSEKMS\";\nconst _SSEKMSE = \"SSEKMSEncryption\";\nconst _SSEKMSEC = \"SSEKMSEncryptionContext\";\nconst _SSEKMSKI = \"SSEKMSKeyId\";\nconst _SSER = \"ServerSideEncryptionRule\";\nconst _SSERe = \"ServerSideEncryptionRules\";\nconst _SSES = \"SSES3\";\nconst _ST = \"SessionToken\";\nconst _STD = \"S3TablesDestination\";\nconst _STDR = \"S3TablesDestinationResult\";\nconst _S_ = \"S3\";\nconst _Sc = \"Schedule\";\nconst _Si = \"Size\";\nconst _St = \"Start\";\nconst _Sta = \"Stats\";\nconst _Su = \"Suffix\";\nconst _T = \"Tags\";\nconst _TA = \"TableArn\";\nconst _TAo = \"TopicArn\";\nconst _TB = \"TargetBucket\";\nconst _TBA = \"TableBucketArn\";\nconst _TBT = \"TableBucketType\";\nconst _TC = \"TagCount\";\nconst _TCL = \"TopicConfigurationList\";\nconst _TCo = \"TopicConfigurations\";\nconst _TCop = \"TopicConfiguration\";\nconst _TD = \"TaggingDirective\";\nconst _TDMOS = \"TransitionDefaultMinimumObjectSize\";\nconst _TG = \"TargetGrants\";\nconst _TGa = \"TargetGrant\";\nconst _TL = \"TieringList\";\nconst _TLr = \"TransitionList\";\nconst _TMP = \"TooManyParts\";\nconst _TN = \"TableNamespace\";\nconst _TNa = \"TableName\";\nconst _TOKF = \"TargetObjectKeyFormat\";\nconst _TP = \"TargetPrefix\";\nconst _TPC = \"TotalPartsCount\";\nconst _TS = \"TagSet\";\nconst _TSa = \"TableStatus\";\nconst _Ta = \"Tag\";\nconst _Tag = \"Tagging\";\nconst _Ti = \"Tier\";\nconst _Tie = \"Tierings\";\nconst _Tier = \"Tiering\";\nconst _Tim = \"Time\";\nconst _To = \"Token\";\nconst _Top = \"Topic\";\nconst _Tr = \"Transitions\";\nconst _Tra = \"Transition\";\nconst _Ty = \"Type\";\nconst _U = \"Uploads\";\nconst _UBMITC = \"UpdateBucketMetadataInventoryTableConfiguration\";\nconst _UBMITCR = \"UpdateBucketMetadataInventoryTableConfigurationRequest\";\nconst _UBMJTC = \"UpdateBucketMetadataJournalTableConfiguration\";\nconst _UBMJTCR = \"UpdateBucketMetadataJournalTableConfigurationRequest\";\nconst _UI = \"UploadId\";\nconst _UIM = \"UploadIdMarker\";\nconst _UM = \"UserMetadata\";\nconst _UOE = \"UpdateObjectEncryption\";\nconst _UOER = \"UpdateObjectEncryptionRequest\";\nconst _UOERp = \"UpdateObjectEncryptionResponse\";\nconst _UP = \"UploadPart\";\nconst _UPC = \"UploadPartCopy\";\nconst _UPCO = \"UploadPartCopyOutput\";\nconst _UPCR = \"UploadPartCopyRequest\";\nconst _UPO = \"UploadPartOutput\";\nconst _UPR = \"UploadPartRequest\";\nconst _URI = \"URI\";\nconst _Up = \"Upload\";\nconst _V = \"Value\";\nconst _VC = \"VersioningConfiguration\";\nconst _VI = \"VersionId\";\nconst _VIM = \"VersionIdMarker\";\nconst _Ve = \"Versions\";\nconst _Ver = \"Version\";\nconst _WC = \"WebsiteConfiguration\";\nconst _WGOR = \"WriteGetObjectResponse\";\nconst _WGORR = \"WriteGetObjectResponseRequest\";\nconst _WOB = \"WriteOffsetBytes\";\nconst _WRL = \"WebsiteRedirectLocation\";\nconst _Y = \"Years\";\nconst _ar = \"accept-ranges\";\nconst _br = \"bucket-region\";\nconst _c = \"client\";\nconst _ct = \"continuation-token\";\nconst _d = \"delimiter\";\nconst _e = \"error\";\nconst _eP = \"eventPayload\";\nconst _en = \"endpoint\";\nconst _et = \"encoding-type\";\nconst _fo = \"fetch-owner\";\nconst _h = \"http\";\nconst _hC = \"httpChecksum\";\nconst _hE = \"httpError\";\nconst _hH = \"httpHeader\";\nconst _hL = \"hostLabel\";\nconst _hP = \"httpPayload\";\nconst _hPH = \"httpPrefixHeaders\";\nconst _hQ = \"httpQuery\";\nconst _hi = \"http://www.w3.org/2001/XMLSchema-instance\";\nconst _i = \"id\";\nconst _iT = \"idempotencyToken\";\nconst _km = \"key-marker\";\nconst _m = \"marker\";\nconst _mb = \"max-buckets\";\nconst _mdb = \"max-directory-buckets\";\nconst _mk = \"max-keys\";\nconst _mp = \"max-parts\";\nconst _mu = \"max-uploads\";\nconst _p = \"prefix\";\nconst _pN = \"partNumber\";\nconst _pnm = \"part-number-marker\";\nconst _rcc = \"response-cache-control\";\nconst _rcd = \"response-content-disposition\";\nconst _rce = \"response-content-encoding\";\nconst _rcl = \"response-content-language\";\nconst _rct = \"response-content-type\";\nconst _re = \"response-expires\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.s3\";\nconst _sa = \"start-after\";\nconst _st = \"streaming\";\nconst _uI = \"uploadId\";\nconst _uim = \"upload-id-marker\";\nconst _vI = \"versionId\";\nconst _vim = \"version-id-marker\";\nconst _x = \"xsi\";\nconst _xA = \"xmlAttribute\";\nconst _xF = \"xmlFlattened\";\nconst _xN = \"xmlName\";\nconst _xNm = \"xmlNamespace\";\nconst _xaa = \"x-amz-acl\";\nconst _xaad = \"x-amz-abort-date\";\nconst _xaapa = \"x-amz-access-point-alias\";\nconst _xaari = \"x-amz-abort-rule-id\";\nconst _xaas = \"x-amz-archive-status\";\nconst _xaba = \"x-amz-bucket-arn\";\nconst _xabgr = \"x-amz-bypass-governance-retention\";\nconst _xabln = \"x-amz-bucket-location-name\";\nconst _xablt = \"x-amz-bucket-location-type\";\nconst _xabn = \"x-amz-bucket-namespace\";\nconst _xabole = \"x-amz-bucket-object-lock-enabled\";\nconst _xabolt = \"x-amz-bucket-object-lock-token\";\nconst _xabr = \"x-amz-bucket-region\";\nconst _xaca = \"x-amz-checksum-algorithm\";\nconst _xacc = \"x-amz-checksum-crc32\";\nconst _xacc_ = \"x-amz-checksum-crc32c\";\nconst _xacc__ = \"x-amz-checksum-crc64nvme\";\nconst _xacm = \"x-amz-checksum-mode\";\nconst _xacrsba = \"x-amz-confirm-remove-self-bucket-access\";\nconst _xacs = \"x-amz-checksum-sha1\";\nconst _xacs_ = \"x-amz-checksum-sha256\";\nconst _xacs__ = \"x-amz-copy-source\";\nconst _xacsim = \"x-amz-copy-source-if-match\";\nconst _xacsims = \"x-amz-copy-source-if-modified-since\";\nconst _xacsinm = \"x-amz-copy-source-if-none-match\";\nconst _xacsius = \"x-amz-copy-source-if-unmodified-since\";\nconst _xacsm = \"x-amz-create-session-mode\";\nconst _xacsr = \"x-amz-copy-source-range\";\nconst _xacssseca = \"x-amz-copy-source-server-side-encryption-customer-algorithm\";\nconst _xacssseck = \"x-amz-copy-source-server-side-encryption-customer-key\";\nconst _xacssseckM = \"x-amz-copy-source-server-side-encryption-customer-key-MD5\";\nconst _xacsvi = \"x-amz-copy-source-version-id\";\nconst _xact = \"x-amz-checksum-type\";\nconst _xact_ = \"x-amz-client-token\";\nconst _xadm = \"x-amz-delete-marker\";\nconst _xae = \"x-amz-expiration\";\nconst _xaebo = \"x-amz-expected-bucket-owner\";\nconst _xafec = \"x-amz-fwd-error-code\";\nconst _xafem = \"x-amz-fwd-error-message\";\nconst _xafhCC = \"x-amz-fwd-header-Cache-Control\";\nconst _xafhCD = \"x-amz-fwd-header-Content-Disposition\";\nconst _xafhCE = \"x-amz-fwd-header-Content-Encoding\";\nconst _xafhCL = \"x-amz-fwd-header-Content-Language\";\nconst _xafhCR = \"x-amz-fwd-header-Content-Range\";\nconst _xafhCT = \"x-amz-fwd-header-Content-Type\";\nconst _xafhE = \"x-amz-fwd-header-ETag\";\nconst _xafhE_ = \"x-amz-fwd-header-Expires\";\nconst _xafhLM = \"x-amz-fwd-header-Last-Modified\";\nconst _xafhar = \"x-amz-fwd-header-accept-ranges\";\nconst _xafhxacc = \"x-amz-fwd-header-x-amz-checksum-crc32\";\nconst _xafhxacc_ = \"x-amz-fwd-header-x-amz-checksum-crc32c\";\nconst _xafhxacc__ = \"x-amz-fwd-header-x-amz-checksum-crc64nvme\";\nconst _xafhxacs = \"x-amz-fwd-header-x-amz-checksum-sha1\";\nconst _xafhxacs_ = \"x-amz-fwd-header-x-amz-checksum-sha256\";\nconst _xafhxadm = \"x-amz-fwd-header-x-amz-delete-marker\";\nconst _xafhxae = \"x-amz-fwd-header-x-amz-expiration\";\nconst _xafhxamm = \"x-amz-fwd-header-x-amz-missing-meta\";\nconst _xafhxampc = \"x-amz-fwd-header-x-amz-mp-parts-count\";\nconst _xafhxaollh = \"x-amz-fwd-header-x-amz-object-lock-legal-hold\";\nconst _xafhxaolm = \"x-amz-fwd-header-x-amz-object-lock-mode\";\nconst _xafhxaolrud = \"x-amz-fwd-header-x-amz-object-lock-retain-until-date\";\nconst _xafhxar = \"x-amz-fwd-header-x-amz-restore\";\nconst _xafhxarc = \"x-amz-fwd-header-x-amz-request-charged\";\nconst _xafhxars = \"x-amz-fwd-header-x-amz-replication-status\";\nconst _xafhxasc = \"x-amz-fwd-header-x-amz-storage-class\";\nconst _xafhxasse = \"x-amz-fwd-header-x-amz-server-side-encryption\";\nconst _xafhxasseakki = \"x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id\";\nconst _xafhxassebke = \"x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled\";\nconst _xafhxasseca = \"x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm\";\nconst _xafhxasseckM = \"x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5\";\nconst _xafhxatc = \"x-amz-fwd-header-x-amz-tagging-count\";\nconst _xafhxavi = \"x-amz-fwd-header-x-amz-version-id\";\nconst _xafs = \"x-amz-fwd-status\";\nconst _xagfc = \"x-amz-grant-full-control\";\nconst _xagr = \"x-amz-grant-read\";\nconst _xagra = \"x-amz-grant-read-acp\";\nconst _xagw = \"x-amz-grant-write\";\nconst _xagwa = \"x-amz-grant-write-acp\";\nconst _xaimit = \"x-amz-if-match-initiated-time\";\nconst _xaimlmt = \"x-amz-if-match-last-modified-time\";\nconst _xaims = \"x-amz-if-match-size\";\nconst _xam = \"x-amz-meta-\";\nconst _xam_ = \"x-amz-mfa\";\nconst _xamd = \"x-amz-metadata-directive\";\nconst _xamm = \"x-amz-missing-meta\";\nconst _xamos = \"x-amz-mp-object-size\";\nconst _xamp = \"x-amz-max-parts\";\nconst _xampc = \"x-amz-mp-parts-count\";\nconst _xaoa = \"x-amz-object-attributes\";\nconst _xaollh = \"x-amz-object-lock-legal-hold\";\nconst _xaolm = \"x-amz-object-lock-mode\";\nconst _xaolrud = \"x-amz-object-lock-retain-until-date\";\nconst _xaoo = \"x-amz-object-ownership\";\nconst _xaooa = \"x-amz-optional-object-attributes\";\nconst _xaos = \"x-amz-object-size\";\nconst _xapnm = \"x-amz-part-number-marker\";\nconst _xar = \"x-amz-restore\";\nconst _xarc = \"x-amz-request-charged\";\nconst _xarop = \"x-amz-restore-output-path\";\nconst _xarp = \"x-amz-request-payer\";\nconst _xarr = \"x-amz-request-route\";\nconst _xars = \"x-amz-replication-status\";\nconst _xars_ = \"x-amz-rename-source\";\nconst _xarsim = \"x-amz-rename-source-if-match\";\nconst _xarsims = \"x-amz-rename-source-if-modified-since\";\nconst _xarsinm = \"x-amz-rename-source-if-none-match\";\nconst _xarsius = \"x-amz-rename-source-if-unmodified-since\";\nconst _xart = \"x-amz-request-token\";\nconst _xasc = \"x-amz-storage-class\";\nconst _xasca = \"x-amz-sdk-checksum-algorithm\";\nconst _xasdv = \"x-amz-skip-destination-validation\";\nconst _xasebo = \"x-amz-source-expected-bucket-owner\";\nconst _xasse = \"x-amz-server-side-encryption\";\nconst _xasseakki = \"x-amz-server-side-encryption-aws-kms-key-id\";\nconst _xassebke = \"x-amz-server-side-encryption-bucket-key-enabled\";\nconst _xassec = \"x-amz-server-side-encryption-context\";\nconst _xasseca = \"x-amz-server-side-encryption-customer-algorithm\";\nconst _xasseck = \"x-amz-server-side-encryption-customer-key\";\nconst _xasseckM = \"x-amz-server-side-encryption-customer-key-MD5\";\nconst _xat = \"x-amz-tagging\";\nconst _xatc = \"x-amz-tagging-count\";\nconst _xatd = \"x-amz-tagging-directive\";\nconst _xatdmos = \"x-amz-transition-default-minimum-object-size\";\nconst _xavi = \"x-amz-version-id\";\nconst _xawob = \"x-amz-write-offset-bytes\";\nconst _xawrl = \"x-amz-website-redirect-location\";\nconst _xs = \"xsi:type\";\nconst n0 = \"com.amazonaws.s3\";\nimport { TypeRegistry } from \"@smithy/core/schema\";\nimport { AccessDenied, BucketAlreadyExists, BucketAlreadyOwnedByYou, EncryptionTypeMismatch, IdempotencyParameterMismatch, InvalidObjectState, InvalidRequest, InvalidWriteOffset, NoSuchBucket, NoSuchKey, NoSuchUpload, NotFound, ObjectAlreadyInActiveTierError, ObjectNotInActiveTierError, TooManyParts, } from \"../models/errors\";\nimport { S3ServiceException } from \"../models/S3ServiceException\";\nconst _s_registry = TypeRegistry.for(_s);\nexport var S3ServiceException$ = [-3, _s, \"S3ServiceException\", 0, [], []];\n_s_registry.registerError(S3ServiceException$, S3ServiceException);\nconst n0_registry = TypeRegistry.for(n0);\nexport var AccessDenied$ = [-3, n0, _AD,\n { [_e]: _c, [_hE]: 403 },\n [],\n []\n];\nn0_registry.registerError(AccessDenied$, AccessDenied);\nexport var BucketAlreadyExists$ = [-3, n0, _BAE,\n { [_e]: _c, [_hE]: 409 },\n [],\n []\n];\nn0_registry.registerError(BucketAlreadyExists$, BucketAlreadyExists);\nexport var BucketAlreadyOwnedByYou$ = [-3, n0, _BAOBY,\n { [_e]: _c, [_hE]: 409 },\n [],\n []\n];\nn0_registry.registerError(BucketAlreadyOwnedByYou$, BucketAlreadyOwnedByYou);\nexport var EncryptionTypeMismatch$ = [-3, n0, _ETM,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(EncryptionTypeMismatch$, EncryptionTypeMismatch);\nexport var IdempotencyParameterMismatch$ = [-3, n0, _IPM,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(IdempotencyParameterMismatch$, IdempotencyParameterMismatch);\nexport var InvalidObjectState$ = [-3, n0, _IOS,\n { [_e]: _c, [_hE]: 403 },\n [_SC, _AT],\n [0, 0]\n];\nn0_registry.registerError(InvalidObjectState$, InvalidObjectState);\nexport var InvalidRequest$ = [-3, n0, _IR,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(InvalidRequest$, InvalidRequest);\nexport var InvalidWriteOffset$ = [-3, n0, _IWO,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(InvalidWriteOffset$, InvalidWriteOffset);\nexport var NoSuchBucket$ = [-3, n0, _NSB,\n { [_e]: _c, [_hE]: 404 },\n [],\n []\n];\nn0_registry.registerError(NoSuchBucket$, NoSuchBucket);\nexport var NoSuchKey$ = [-3, n0, _NSK,\n { [_e]: _c, [_hE]: 404 },\n [],\n []\n];\nn0_registry.registerError(NoSuchKey$, NoSuchKey);\nexport var NoSuchUpload$ = [-3, n0, _NSU,\n { [_e]: _c, [_hE]: 404 },\n [],\n []\n];\nn0_registry.registerError(NoSuchUpload$, NoSuchUpload);\nexport var NotFound$ = [-3, n0, _NF,\n { [_e]: _c },\n [],\n []\n];\nn0_registry.registerError(NotFound$, NotFound);\nexport var ObjectAlreadyInActiveTierError$ = [-3, n0, _OAIATE,\n { [_e]: _c, [_hE]: 403 },\n [],\n []\n];\nn0_registry.registerError(ObjectAlreadyInActiveTierError$, ObjectAlreadyInActiveTierError);\nexport var ObjectNotInActiveTierError$ = [-3, n0, _ONIATE,\n { [_e]: _c, [_hE]: 403 },\n [],\n []\n];\nn0_registry.registerError(ObjectNotInActiveTierError$, ObjectNotInActiveTierError);\nexport var TooManyParts$ = [-3, n0, _TMP,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(TooManyParts$, TooManyParts);\nexport const errorTypeRegistries = [\n _s_registry,\n n0_registry,\n];\nvar CopySourceSSECustomerKey = [0, n0, _CSSSECK, 8, 0];\nvar NonEmptyKmsKeyArnString = [0, n0, _NEKKAS, 8, 0];\nvar SessionCredentialValue = [0, n0, _SCV, 8, 0];\nvar SSECustomerKey = [0, n0, _SSECK, 8, 0];\nvar SSEKMSEncryptionContext = [0, n0, _SSEKMSEC, 8, 0];\nvar SSEKMSKeyId = [0, n0, _SSEKMSKI, 8, 0];\nvar StreamingBlob = [0, n0, _SB, { [_st]: 1 }, 42];\nexport var AbacStatus$ = [3, n0, _AS,\n 0,\n [_S],\n [0]\n];\nexport var AbortIncompleteMultipartUpload$ = [3, n0, _AIMU,\n 0,\n [_DAI],\n [1]\n];\nexport var AbortMultipartUploadOutput$ = [3, n0, _AMUO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var AbortMultipartUploadRequest$ = [3, n0, _AMUR,\n 0,\n [_B, _K, _UI, _RP, _EBO, _IMIT],\n [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [6, { [_hH]: _xaimit }]], 3\n];\nexport var AccelerateConfiguration$ = [3, n0, _AC,\n 0,\n [_S],\n [0]\n];\nexport var AccessControlPolicy$ = [3, n0, _ACP,\n 0,\n [_G, _O],\n [[() => Grants, { [_xN]: _ACL }], () => Owner$]\n];\nexport var AccessControlTranslation$ = [3, n0, _ACT,\n 0,\n [_O],\n [0], 1\n];\nexport var AnalyticsAndOperator$ = [3, n0, _AAO,\n 0,\n [_P, _T],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]]\n];\nexport var AnalyticsConfiguration$ = [3, n0, _ACn,\n 0,\n [_I, _SCA, _F],\n [0, () => StorageClassAnalysis$, [() => AnalyticsFilter$, 0]], 2\n];\nexport var AnalyticsExportDestination$ = [3, n0, _AED,\n 0,\n [_SBD],\n [() => AnalyticsS3BucketDestination$], 1\n];\nexport var AnalyticsS3BucketDestination$ = [3, n0, _ASBD,\n 0,\n [_Fo, _B, _BAI, _P],\n [0, 0, 0, 0], 2\n];\nexport var BlockedEncryptionTypes$ = [3, n0, _BET,\n 0,\n [_ET],\n [[() => EncryptionTypeList, { [_xF]: 1 }]]\n];\nexport var Bucket$ = [3, n0, _B,\n 0,\n [_N, _CD, _BR, _BA],\n [0, 4, 0, 0]\n];\nexport var BucketInfo$ = [3, n0, _BI,\n 0,\n [_DR, _Ty],\n [0, 0]\n];\nexport var BucketLifecycleConfiguration$ = [3, n0, _BLC,\n 0,\n [_R],\n [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Ru }]], 1\n];\nexport var BucketLoggingStatus$ = [3, n0, _BLS,\n 0,\n [_LE],\n [[() => LoggingEnabled$, 0]]\n];\nexport var Checksum$ = [3, n0, _C,\n 0,\n [_CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT],\n [0, 0, 0, 0, 0, 0]\n];\nexport var CommonPrefix$ = [3, n0, _CP,\n 0,\n [_P],\n [0]\n];\nexport var CompletedMultipartUpload$ = [3, n0, _CMU,\n 0,\n [_Pa],\n [[() => CompletedPartList, { [_xF]: 1, [_xN]: _Par }]]\n];\nexport var CompletedPart$ = [3, n0, _CPo,\n 0,\n [_ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _PN],\n [0, 0, 0, 0, 0, 0, 1]\n];\nexport var CompleteMultipartUploadOutput$ = [3, n0, _CMUO,\n { [_xN]: _CMUR },\n [_L, _B, _K, _E, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _SSE, _VI, _SSEKMSKI, _BKE, _RC],\n [0, 0, 0, [0, { [_hH]: _xae }], 0, 0, 0, 0, 0, 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]]\n];\nexport var CompleteMultipartUploadRequest$ = [3, n0, _CMURo,\n 0,\n [_B, _K, _UI, _MU, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _MOS, _RP, _EBO, _IM, _INM, _SSECA, _SSECK, _SSECKMD],\n [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [() => CompletedMultipartUpload$, { [_hP]: 1, [_xN]: _CMUo }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamos }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], 3\n];\nexport var Condition$ = [3, n0, _Co,\n 0,\n [_HECRE, _KPE],\n [0, 0]\n];\nexport var ContinuationEvent$ = [3, n0, _CE,\n 0,\n [],\n []\n];\nexport var CopyObjectOutput$ = [3, n0, _COO,\n 0,\n [_COR, _E, _CSVI, _VI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC],\n [[() => CopyObjectResult$, 16], [0, { [_hH]: _xae }], [0, { [_hH]: _xacsvi }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]]\n];\nexport var CopyObjectRequest$ = [3, n0, _CORo,\n 0,\n [_B, _CS, _K, _ACL_, _CC, _CA, _CDo, _CEo, _CL, _CTo, _CSIM, _CSIMS, _CSINM, _CSIUS, _Ex, _GFC, _GR, _GRACP, _GWACP, _IM, _INM, _M, _MD, _TD, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _ESBO],\n [[0, 1], [0, { [_hH]: _xacs__ }], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _xaca }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [4, { [_hH]: _Ex }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xamd }], [0, { [_hH]: _xatd }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], 3\n];\nexport var CopyObjectResult$ = [3, n0, _COR,\n 0,\n [_ETa, _LM, _CT, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh],\n [0, 4, 0, 0, 0, 0, 0, 0]\n];\nexport var CopyPartResult$ = [3, n0, _CPR,\n 0,\n [_ETa, _LM, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh],\n [0, 4, 0, 0, 0, 0, 0]\n];\nexport var CORSConfiguration$ = [3, n0, _CORSC,\n 0,\n [_CORSR],\n [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]], 1\n];\nexport var CORSRule$ = [3, n0, _CORSRu,\n 0,\n [_AM, _AO, _ID, _AH, _EH, _MAS],\n [[64 | 0, { [_xF]: 1, [_xN]: _AMl }], [64 | 0, { [_xF]: 1, [_xN]: _AOl }], 0, [64 | 0, { [_xF]: 1, [_xN]: _AHl }], [64 | 0, { [_xF]: 1, [_xN]: _EHx }], 1], 2\n];\nexport var CreateBucketConfiguration$ = [3, n0, _CBC,\n 0,\n [_LC, _L, _B, _T],\n [0, () => LocationInfo$, () => BucketInfo$, [() => TagSet, 0]]\n];\nexport var CreateBucketMetadataConfigurationRequest$ = [3, n0, _CBMCR,\n 0,\n [_B, _MC, _CMD, _CA, _EBO],\n [[0, 1], [() => MetadataConfiguration$, { [_hP]: 1, [_xN]: _MC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var CreateBucketMetadataTableConfigurationRequest$ = [3, n0, _CBMTCR,\n 0,\n [_B, _MTC, _CMD, _CA, _EBO],\n [[0, 1], [() => MetadataTableConfiguration$, { [_hP]: 1, [_xN]: _MTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var CreateBucketOutput$ = [3, n0, _CBO,\n 0,\n [_L, _BA],\n [[0, { [_hH]: _L }], [0, { [_hH]: _xaba }]]\n];\nexport var CreateBucketRequest$ = [3, n0, _CBR,\n 0,\n [_B, _ACL_, _CBC, _GFC, _GR, _GRACP, _GW, _GWACP, _OLEFB, _OO, _BN],\n [[0, 1], [0, { [_hH]: _xaa }], [() => CreateBucketConfiguration$, { [_hP]: 1, [_xN]: _CBC }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [2, { [_hH]: _xabole }], [0, { [_hH]: _xaoo }], [0, { [_hH]: _xabn }]], 1\n];\nexport var CreateMultipartUploadOutput$ = [3, n0, _CMUOr,\n { [_xN]: _IMUR },\n [_ADb, _ARI, _B, _K, _UI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC, _CA, _CT],\n [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], [0, { [_xN]: _B }], 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]]\n];\nexport var CreateMultipartUploadRequest$ = [3, n0, _CMURr,\n 0,\n [_B, _K, _ACL_, _CC, _CDo, _CEo, _CL, _CTo, _Ex, _GFC, _GR, _GRACP, _GWACP, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _CA, _CT],\n [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]], 2\n];\nexport var CreateSessionOutput$ = [3, n0, _CSO,\n { [_xN]: _CSR },\n [_Cr, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE],\n [[() => SessionCredentials$, { [_xN]: _Cr }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], 1\n];\nexport var CreateSessionRequest$ = [3, n0, _CSRr,\n 0,\n [_B, _SM, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE],\n [[0, 1], [0, { [_hH]: _xacsm }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], 1\n];\nexport var CSVInput$ = [3, n0, _CSVIn,\n 0,\n [_FHI, _Com, _QEC, _RD, _FD, _QC, _AQRD],\n [0, 0, 0, 0, 0, 0, 2]\n];\nexport var CSVOutput$ = [3, n0, _CSVO,\n 0,\n [_QF, _QEC, _RD, _FD, _QC],\n [0, 0, 0, 0, 0]\n];\nexport var DefaultRetention$ = [3, n0, _DRe,\n 0,\n [_Mo, _D, _Y],\n [0, 1, 1]\n];\nexport var Delete$ = [3, n0, _De,\n 0,\n [_Ob, _Q],\n [[() => ObjectIdentifierList, { [_xF]: 1, [_xN]: _Obj }], 2], 1\n];\nexport var DeleteBucketAnalyticsConfigurationRequest$ = [3, n0, _DBACR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeleteBucketCorsRequest$ = [3, n0, _DBCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketEncryptionRequest$ = [3, n0, _DBER,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketIntelligentTieringConfigurationRequest$ = [3, n0, _DBITCR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeleteBucketInventoryConfigurationRequest$ = [3, n0, _DBICR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeleteBucketLifecycleRequest$ = [3, n0, _DBLR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketMetadataConfigurationRequest$ = [3, n0, _DBMCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketMetadataTableConfigurationRequest$ = [3, n0, _DBMTCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketMetricsConfigurationRequest$ = [3, n0, _DBMCRe,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeleteBucketOwnershipControlsRequest$ = [3, n0, _DBOCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketPolicyRequest$ = [3, n0, _DBPR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketReplicationRequest$ = [3, n0, _DBRR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketRequest$ = [3, n0, _DBR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketTaggingRequest$ = [3, n0, _DBTR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketWebsiteRequest$ = [3, n0, _DBWR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeletedObject$ = [3, n0, _DO,\n 0,\n [_K, _VI, _DM, _DMVI],\n [0, 0, 2, 0]\n];\nexport var DeleteMarkerEntry$ = [3, n0, _DME,\n 0,\n [_O, _K, _VI, _IL, _LM],\n [() => Owner$, 0, 0, 2, 4]\n];\nexport var DeleteMarkerReplication$ = [3, n0, _DMR,\n 0,\n [_S],\n [0]\n];\nexport var DeleteObjectOutput$ = [3, n0, _DOO,\n 0,\n [_DM, _VI, _RC],\n [[2, { [_hH]: _xadm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }]]\n];\nexport var DeleteObjectRequest$ = [3, n0, _DOR,\n 0,\n [_B, _K, _MFA, _VI, _RP, _BGR, _EBO, _IM, _IMLMT, _IMS],\n [[0, 1], [0, 1], [0, { [_hH]: _xam_ }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [6, { [_hH]: _xaimlmt }], [1, { [_hH]: _xaims }]], 2\n];\nexport var DeleteObjectsOutput$ = [3, n0, _DOOe,\n { [_xN]: _DRel },\n [_Del, _RC, _Er],\n [[() => DeletedObjects, { [_xF]: 1 }], [0, { [_hH]: _xarc }], [() => Errors, { [_xF]: 1, [_xN]: _Err }]]\n];\nexport var DeleteObjectsRequest$ = [3, n0, _DORe,\n 0,\n [_B, _De, _MFA, _RP, _BGR, _EBO, _CA],\n [[0, 1], [() => Delete$, { [_hP]: 1, [_xN]: _De }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], 2\n];\nexport var DeleteObjectTaggingOutput$ = [3, n0, _DOTO,\n 0,\n [_VI],\n [[0, { [_hH]: _xavi }]]\n];\nexport var DeleteObjectTaggingRequest$ = [3, n0, _DOTR,\n 0,\n [_B, _K, _VI, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeletePublicAccessBlockRequest$ = [3, n0, _DPABR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var Destination$ = [3, n0, _Des,\n 0,\n [_B, _A, _SC, _ACT, _EC, _RT, _Me],\n [0, 0, 0, () => AccessControlTranslation$, () => EncryptionConfiguration$, () => ReplicationTime$, () => Metrics$], 1\n];\nexport var DestinationResult$ = [3, n0, _DRes,\n 0,\n [_TBT, _TBA, _TN],\n [0, 0, 0]\n];\nexport var Encryption$ = [3, n0, _En,\n 0,\n [_ET, _KMSKI, _KMSC],\n [0, [() => SSEKMSKeyId, 0], 0], 1\n];\nexport var EncryptionConfiguration$ = [3, n0, _EC,\n 0,\n [_RKKID],\n [0]\n];\nexport var EndEvent$ = [3, n0, _EE,\n 0,\n [],\n []\n];\nexport var _Error$ = [3, n0, _Err,\n 0,\n [_K, _VI, _Cod, _Mes],\n [0, 0, 0, 0]\n];\nexport var ErrorDetails$ = [3, n0, _ED,\n 0,\n [_ECr, _EM],\n [0, 0]\n];\nexport var ErrorDocument$ = [3, n0, _EDr,\n 0,\n [_K],\n [0], 1\n];\nexport var EventBridgeConfiguration$ = [3, n0, _EBC,\n 0,\n [],\n []\n];\nexport var ExistingObjectReplication$ = [3, n0, _EOR,\n 0,\n [_S],\n [0], 1\n];\nexport var FilterRule$ = [3, n0, _FR,\n 0,\n [_N, _V],\n [0, 0]\n];\nexport var GetBucketAbacOutput$ = [3, n0, _GBAO,\n 0,\n [_AS],\n [[() => AbacStatus$, 16]]\n];\nexport var GetBucketAbacRequest$ = [3, n0, _GBAR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketAccelerateConfigurationOutput$ = [3, n0, _GBACO,\n { [_xN]: _AC },\n [_S, _RC],\n [0, [0, { [_hH]: _xarc }]]\n];\nexport var GetBucketAccelerateConfigurationRequest$ = [3, n0, _GBACR,\n 0,\n [_B, _EBO, _RP],\n [[0, 1], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], 1\n];\nexport var GetBucketAclOutput$ = [3, n0, _GBAOe,\n { [_xN]: _ACP },\n [_O, _G],\n [() => Owner$, [() => Grants, { [_xN]: _ACL }]]\n];\nexport var GetBucketAclRequest$ = [3, n0, _GBARe,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketAnalyticsConfigurationOutput$ = [3, n0, _GBACOe,\n 0,\n [_ACn],\n [[() => AnalyticsConfiguration$, 16]]\n];\nexport var GetBucketAnalyticsConfigurationRequest$ = [3, n0, _GBACRe,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetBucketCorsOutput$ = [3, n0, _GBCO,\n { [_xN]: _CORSC },\n [_CORSR],\n [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]]\n];\nexport var GetBucketCorsRequest$ = [3, n0, _GBCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketEncryptionOutput$ = [3, n0, _GBEO,\n 0,\n [_SSEC],\n [[() => ServerSideEncryptionConfiguration$, 16]]\n];\nexport var GetBucketEncryptionRequest$ = [3, n0, _GBER,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketIntelligentTieringConfigurationOutput$ = [3, n0, _GBITCO,\n 0,\n [_ITC],\n [[() => IntelligentTieringConfiguration$, 16]]\n];\nexport var GetBucketIntelligentTieringConfigurationRequest$ = [3, n0, _GBITCR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetBucketInventoryConfigurationOutput$ = [3, n0, _GBICO,\n 0,\n [_IC],\n [[() => InventoryConfiguration$, 16]]\n];\nexport var GetBucketInventoryConfigurationRequest$ = [3, n0, _GBICR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetBucketLifecycleConfigurationOutput$ = [3, n0, _GBLCO,\n { [_xN]: _LCi },\n [_R, _TDMOS],\n [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Ru }], [0, { [_hH]: _xatdmos }]]\n];\nexport var GetBucketLifecycleConfigurationRequest$ = [3, n0, _GBLCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketLocationOutput$ = [3, n0, _GBLO,\n { [_xN]: _LC },\n [_LC],\n [0]\n];\nexport var GetBucketLocationRequest$ = [3, n0, _GBLR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketLoggingOutput$ = [3, n0, _GBLOe,\n { [_xN]: _BLS },\n [_LE],\n [[() => LoggingEnabled$, 0]]\n];\nexport var GetBucketLoggingRequest$ = [3, n0, _GBLRe,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketMetadataConfigurationOutput$ = [3, n0, _GBMCO,\n 0,\n [_GBMCR],\n [[() => GetBucketMetadataConfigurationResult$, 16]]\n];\nexport var GetBucketMetadataConfigurationRequest$ = [3, n0, _GBMCRe,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketMetadataConfigurationResult$ = [3, n0, _GBMCR,\n 0,\n [_MCR],\n [() => MetadataConfigurationResult$], 1\n];\nexport var GetBucketMetadataTableConfigurationOutput$ = [3, n0, _GBMTCO,\n 0,\n [_GBMTCR],\n [[() => GetBucketMetadataTableConfigurationResult$, 16]]\n];\nexport var GetBucketMetadataTableConfigurationRequest$ = [3, n0, _GBMTCRe,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketMetadataTableConfigurationResult$ = [3, n0, _GBMTCR,\n 0,\n [_MTCR, _S, _Err],\n [() => MetadataTableConfigurationResult$, 0, () => ErrorDetails$], 2\n];\nexport var GetBucketMetricsConfigurationOutput$ = [3, n0, _GBMCOe,\n 0,\n [_MCe],\n [[() => MetricsConfiguration$, 16]]\n];\nexport var GetBucketMetricsConfigurationRequest$ = [3, n0, _GBMCRet,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetBucketNotificationConfigurationRequest$ = [3, n0, _GBNCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketOwnershipControlsOutput$ = [3, n0, _GBOCO,\n 0,\n [_OC],\n [[() => OwnershipControls$, 16]]\n];\nexport var GetBucketOwnershipControlsRequest$ = [3, n0, _GBOCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketPolicyOutput$ = [3, n0, _GBPO,\n 0,\n [_Po],\n [[0, 16]]\n];\nexport var GetBucketPolicyRequest$ = [3, n0, _GBPR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketPolicyStatusOutput$ = [3, n0, _GBPSO,\n 0,\n [_PS],\n [[() => PolicyStatus$, 16]]\n];\nexport var GetBucketPolicyStatusRequest$ = [3, n0, _GBPSR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketReplicationOutput$ = [3, n0, _GBRO,\n 0,\n [_RCe],\n [[() => ReplicationConfiguration$, 16]]\n];\nexport var GetBucketReplicationRequest$ = [3, n0, _GBRR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketRequestPaymentOutput$ = [3, n0, _GBRPO,\n { [_xN]: _RPC },\n [_Pay],\n [0]\n];\nexport var GetBucketRequestPaymentRequest$ = [3, n0, _GBRPR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketTaggingOutput$ = [3, n0, _GBTO,\n { [_xN]: _Tag },\n [_TS],\n [[() => TagSet, 0]], 1\n];\nexport var GetBucketTaggingRequest$ = [3, n0, _GBTR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketVersioningOutput$ = [3, n0, _GBVO,\n { [_xN]: _VC },\n [_S, _MFAD],\n [0, [0, { [_xN]: _MDf }]]\n];\nexport var GetBucketVersioningRequest$ = [3, n0, _GBVR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketWebsiteOutput$ = [3, n0, _GBWO,\n { [_xN]: _WC },\n [_RART, _IDn, _EDr, _RR],\n [() => RedirectAllRequestsTo$, () => IndexDocument$, () => ErrorDocument$, [() => RoutingRules, 0]]\n];\nexport var GetBucketWebsiteRequest$ = [3, n0, _GBWR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetObjectAclOutput$ = [3, n0, _GOAO,\n { [_xN]: _ACP },\n [_O, _G, _RC],\n [() => Owner$, [() => Grants, { [_xN]: _ACL }], [0, { [_hH]: _xarc }]]\n];\nexport var GetObjectAclRequest$ = [3, n0, _GOAR,\n 0,\n [_B, _K, _VI, _RP, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetObjectAttributesOutput$ = [3, n0, _GOAOe,\n { [_xN]: _GOARe },\n [_DM, _LM, _VI, _RC, _ETa, _C, _OP, _SC, _OS],\n [[2, { [_hH]: _xadm }], [4, { [_hH]: _LM_ }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }], 0, () => Checksum$, [() => GetObjectAttributesParts$, 0], 0, 1]\n];\nexport var GetObjectAttributesParts$ = [3, n0, _GOAP,\n 0,\n [_TPC, _PNM, _NPNM, _MP, _IT, _Pa],\n [[1, { [_xN]: _PC }], 0, 0, 1, 2, [() => PartsList, { [_xF]: 1, [_xN]: _Par }]]\n];\nexport var GetObjectAttributesRequest$ = [3, n0, _GOARet,\n 0,\n [_B, _K, _OA, _VI, _MP, _PNM, _SSECA, _SSECK, _SSECKMD, _RP, _EBO],\n [[0, 1], [0, 1], [64 | 0, { [_hH]: _xaoa }], [0, { [_hQ]: _vI }], [1, { [_hH]: _xamp }], [0, { [_hH]: _xapnm }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var GetObjectLegalHoldOutput$ = [3, n0, _GOLHO,\n 0,\n [_LH],\n [[() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }]]\n];\nexport var GetObjectLegalHoldRequest$ = [3, n0, _GOLHR,\n 0,\n [_B, _K, _VI, _RP, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetObjectLockConfigurationOutput$ = [3, n0, _GOLCO,\n 0,\n [_OLC],\n [[() => ObjectLockConfiguration$, 16]]\n];\nexport var GetObjectLockConfigurationRequest$ = [3, n0, _GOLCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetObjectOutput$ = [3, n0, _GOO,\n 0,\n [_Bo, _DM, _AR, _E, _Re, _LM, _CLo, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _MM, _VI, _CC, _CDo, _CEo, _CL, _CR, _CTo, _Ex, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS],\n [[() => StreamingBlob, 16], [2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CR_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]]\n];\nexport var GetObjectRequest$ = [3, n0, _GOR,\n 0,\n [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh],\n [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm }]], 2\n];\nexport var GetObjectRetentionOutput$ = [3, n0, _GORO,\n 0,\n [_Ret],\n [[() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }]]\n];\nexport var GetObjectRetentionRequest$ = [3, n0, _GORR,\n 0,\n [_B, _K, _VI, _RP, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetObjectTaggingOutput$ = [3, n0, _GOTO,\n { [_xN]: _Tag },\n [_TS, _VI],\n [[() => TagSet, 0], [0, { [_hH]: _xavi }]], 1\n];\nexport var GetObjectTaggingRequest$ = [3, n0, _GOTR,\n 0,\n [_B, _K, _VI, _EBO, _RP],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], 2\n];\nexport var GetObjectTorrentOutput$ = [3, n0, _GOTOe,\n 0,\n [_Bo, _RC],\n [[() => StreamingBlob, 16], [0, { [_hH]: _xarc }]]\n];\nexport var GetObjectTorrentRequest$ = [3, n0, _GOTRe,\n 0,\n [_B, _K, _RP, _EBO],\n [[0, 1], [0, 1], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetPublicAccessBlockOutput$ = [3, n0, _GPABO,\n 0,\n [_PABC],\n [[() => PublicAccessBlockConfiguration$, 16]]\n];\nexport var GetPublicAccessBlockRequest$ = [3, n0, _GPABR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GlacierJobParameters$ = [3, n0, _GJP,\n 0,\n [_Ti],\n [0], 1\n];\nexport var Grant$ = [3, n0, _Gr,\n 0,\n [_Gra, _Pe],\n [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0]\n];\nexport var Grantee$ = [3, n0, _Gra,\n 0,\n [_Ty, _DN, _EA, _ID, _URI],\n [[0, { [_xA]: 1, [_xN]: _xs }], 0, 0, 0, 0], 1\n];\nexport var HeadBucketOutput$ = [3, n0, _HBO,\n 0,\n [_BA, _BLT, _BLN, _BR, _APA],\n [[0, { [_hH]: _xaba }], [0, { [_hH]: _xablt }], [0, { [_hH]: _xabln }], [0, { [_hH]: _xabr }], [2, { [_hH]: _xaapa }]]\n];\nexport var HeadBucketRequest$ = [3, n0, _HBR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var HeadObjectOutput$ = [3, n0, _HOO,\n 0,\n [_DM, _AR, _E, _Re, _ASr, _LM, _CLo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _ETa, _MM, _VI, _CC, _CDo, _CEo, _CL, _CTo, _CR, _Ex, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS],\n [[2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [0, { [_hH]: _xaas }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [0, { [_hH]: _ETa }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _CR_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]]\n];\nexport var HeadObjectRequest$ = [3, n0, _HOR,\n 0,\n [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh],\n [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm }]], 2\n];\nexport var IndexDocument$ = [3, n0, _IDn,\n 0,\n [_Su],\n [0], 1\n];\nexport var Initiator$ = [3, n0, _In,\n 0,\n [_ID, _DN],\n [0, 0]\n];\nexport var InputSerialization$ = [3, n0, _IS,\n 0,\n [_CSV, _CTom, _JSON, _Parq],\n [() => CSVInput$, 0, () => JSONInput$, () => ParquetInput$]\n];\nexport var IntelligentTieringAndOperator$ = [3, n0, _ITAO,\n 0,\n [_P, _T],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]]\n];\nexport var IntelligentTieringConfiguration$ = [3, n0, _ITC,\n 0,\n [_I, _S, _Tie, _F],\n [0, 0, [() => TieringList, { [_xF]: 1, [_xN]: _Tier }], [() => IntelligentTieringFilter$, 0]], 3\n];\nexport var IntelligentTieringFilter$ = [3, n0, _ITF,\n 0,\n [_P, _Ta, _An],\n [0, () => Tag$, [() => IntelligentTieringAndOperator$, 0]]\n];\nexport var InventoryConfiguration$ = [3, n0, _IC,\n 0,\n [_Des, _IE, _I, _IOV, _Sc, _F, _OF],\n [[() => InventoryDestination$, 0], 2, 0, 0, () => InventorySchedule$, () => InventoryFilter$, [() => InventoryOptionalFields, 0]], 5\n];\nexport var InventoryDestination$ = [3, n0, _IDnv,\n 0,\n [_SBD],\n [[() => InventoryS3BucketDestination$, 0]], 1\n];\nexport var InventoryEncryption$ = [3, n0, _IEn,\n 0,\n [_SSES, _SSEKMS],\n [[() => SSES3$, { [_xN]: _SS }], [() => SSEKMS$, { [_xN]: _SK }]]\n];\nexport var InventoryFilter$ = [3, n0, _IF,\n 0,\n [_P],\n [0], 1\n];\nexport var InventoryS3BucketDestination$ = [3, n0, _ISBD,\n 0,\n [_B, _Fo, _AI, _P, _En],\n [0, 0, 0, 0, [() => InventoryEncryption$, 0]], 2\n];\nexport var InventorySchedule$ = [3, n0, _ISn,\n 0,\n [_Fr],\n [0], 1\n];\nexport var InventoryTableConfiguration$ = [3, n0, _ITCn,\n 0,\n [_CSo, _EC],\n [0, () => MetadataTableEncryptionConfiguration$], 1\n];\nexport var InventoryTableConfigurationResult$ = [3, n0, _ITCR,\n 0,\n [_CSo, _TSa, _Err, _TNa, _TA],\n [0, 0, () => ErrorDetails$, 0, 0], 1\n];\nexport var InventoryTableConfigurationUpdates$ = [3, n0, _ITCU,\n 0,\n [_CSo, _EC],\n [0, () => MetadataTableEncryptionConfiguration$], 1\n];\nexport var JournalTableConfiguration$ = [3, n0, _JTC,\n 0,\n [_REe, _EC],\n [() => RecordExpiration$, () => MetadataTableEncryptionConfiguration$], 1\n];\nexport var JournalTableConfigurationResult$ = [3, n0, _JTCR,\n 0,\n [_TSa, _TNa, _REe, _Err, _TA],\n [0, 0, () => RecordExpiration$, () => ErrorDetails$, 0], 3\n];\nexport var JournalTableConfigurationUpdates$ = [3, n0, _JTCU,\n 0,\n [_REe],\n [() => RecordExpiration$], 1\n];\nexport var JSONInput$ = [3, n0, _JSONI,\n 0,\n [_Ty],\n [0]\n];\nexport var JSONOutput$ = [3, n0, _JSONO,\n 0,\n [_RD],\n [0]\n];\nexport var LambdaFunctionConfiguration$ = [3, n0, _LFC,\n 0,\n [_LFA, _Ev, _I, _F],\n [[0, { [_xN]: _CF }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], 2\n];\nexport var LifecycleExpiration$ = [3, n0, _LEi,\n 0,\n [_Da, _D, _EODM],\n [5, 1, 2]\n];\nexport var LifecycleRule$ = [3, n0, _LR,\n 0,\n [_S, _E, _ID, _P, _F, _Tr, _NVT, _NVE, _AIMU],\n [0, () => LifecycleExpiration$, 0, 0, [() => LifecycleRuleFilter$, 0], [() => TransitionList, { [_xF]: 1, [_xN]: _Tra }], [() => NoncurrentVersionTransitionList, { [_xF]: 1, [_xN]: _NVTo }], () => NoncurrentVersionExpiration$, () => AbortIncompleteMultipartUpload$], 1\n];\nexport var LifecycleRuleAndOperator$ = [3, n0, _LRAO,\n 0,\n [_P, _T, _OSGT, _OSLT],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 1, 1]\n];\nexport var LifecycleRuleFilter$ = [3, n0, _LRF,\n 0,\n [_P, _Ta, _OSGT, _OSLT, _An],\n [0, () => Tag$, 1, 1, [() => LifecycleRuleAndOperator$, 0]]\n];\nexport var ListBucketAnalyticsConfigurationsOutput$ = [3, n0, _LBACO,\n { [_xN]: _LBACR },\n [_IT, _CTon, _NCT, _ACLn],\n [2, 0, 0, [() => AnalyticsConfigurationList, { [_xF]: 1, [_xN]: _ACn }]]\n];\nexport var ListBucketAnalyticsConfigurationsRequest$ = [3, n0, _LBACRi,\n 0,\n [_B, _CTon, _EBO],\n [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var ListBucketIntelligentTieringConfigurationsOutput$ = [3, n0, _LBITCO,\n 0,\n [_IT, _CTon, _NCT, _ITCL],\n [2, 0, 0, [() => IntelligentTieringConfigurationList, { [_xF]: 1, [_xN]: _ITC }]]\n];\nexport var ListBucketIntelligentTieringConfigurationsRequest$ = [3, n0, _LBITCR,\n 0,\n [_B, _CTon, _EBO],\n [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var ListBucketInventoryConfigurationsOutput$ = [3, n0, _LBICO,\n { [_xN]: _LICR },\n [_CTon, _ICL, _IT, _NCT],\n [0, [() => InventoryConfigurationList, { [_xF]: 1, [_xN]: _IC }], 2, 0]\n];\nexport var ListBucketInventoryConfigurationsRequest$ = [3, n0, _LBICR,\n 0,\n [_B, _CTon, _EBO],\n [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var ListBucketMetricsConfigurationsOutput$ = [3, n0, _LBMCO,\n { [_xN]: _LMCR },\n [_IT, _CTon, _NCT, _MCL],\n [2, 0, 0, [() => MetricsConfigurationList, { [_xF]: 1, [_xN]: _MCe }]]\n];\nexport var ListBucketMetricsConfigurationsRequest$ = [3, n0, _LBMCR,\n 0,\n [_B, _CTon, _EBO],\n [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var ListBucketsOutput$ = [3, n0, _LBO,\n { [_xN]: _LAMBR },\n [_Bu, _O, _CTon, _P],\n [[() => Buckets, 0], () => Owner$, 0, 0]\n];\nexport var ListBucketsRequest$ = [3, n0, _LBR,\n 0,\n [_MB, _CTon, _P, _BR],\n [[1, { [_hQ]: _mb }], [0, { [_hQ]: _ct }], [0, { [_hQ]: _p }], [0, { [_hQ]: _br }]]\n];\nexport var ListDirectoryBucketsOutput$ = [3, n0, _LDBO,\n { [_xN]: _LAMDBR },\n [_Bu, _CTon],\n [[() => Buckets, 0], 0]\n];\nexport var ListDirectoryBucketsRequest$ = [3, n0, _LDBR,\n 0,\n [_CTon, _MDB],\n [[0, { [_hQ]: _ct }], [1, { [_hQ]: _mdb }]]\n];\nexport var ListMultipartUploadsOutput$ = [3, n0, _LMUO,\n { [_xN]: _LMUR },\n [_B, _KM, _UIM, _NKM, _P, _Deli, _NUIM, _MUa, _IT, _U, _CPom, _ETn, _RC],\n [0, 0, 0, 0, 0, 0, 0, 1, 2, [() => MultipartUploadList, { [_xF]: 1, [_xN]: _Up }], [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]]\n];\nexport var ListMultipartUploadsRequest$ = [3, n0, _LMURi,\n 0,\n [_B, _Deli, _ETn, _KM, _MUa, _P, _UIM, _EBO, _RP],\n [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mu }], [0, { [_hQ]: _p }], [0, { [_hQ]: _uim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], 1\n];\nexport var ListObjectsOutput$ = [3, n0, _LOO,\n { [_xN]: _LBRi },\n [_IT, _Ma, _NM, _Con, _N, _P, _Deli, _MK, _CPom, _ETn, _RC],\n [2, 0, 0, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]]\n];\nexport var ListObjectsRequest$ = [3, n0, _LOR,\n 0,\n [_B, _Deli, _ETn, _Ma, _MK, _P, _RP, _EBO, _OOA],\n [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _m }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], 1\n];\nexport var ListObjectsV2Output$ = [3, n0, _LOVO,\n { [_xN]: _LBRi },\n [_IT, _Con, _N, _P, _Deli, _MK, _CPom, _ETn, _KC, _CTon, _NCT, _SA, _RC],\n [2, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, 1, 0, 0, 0, [0, { [_hH]: _xarc }]]\n];\nexport var ListObjectsV2Request$ = [3, n0, _LOVR,\n 0,\n [_B, _Deli, _ETn, _MK, _P, _CTon, _FO, _SA, _RP, _EBO, _OOA],\n [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _ct }], [2, { [_hQ]: _fo }], [0, { [_hQ]: _sa }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], 1\n];\nexport var ListObjectVersionsOutput$ = [3, n0, _LOVOi,\n { [_xN]: _LVR },\n [_IT, _KM, _VIM, _NKM, _NVIM, _Ve, _DMe, _N, _P, _Deli, _MK, _CPom, _ETn, _RC],\n [2, 0, 0, 0, 0, [() => ObjectVersionList, { [_xF]: 1, [_xN]: _Ver }], [() => DeleteMarkers, { [_xF]: 1, [_xN]: _DM }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]]\n];\nexport var ListObjectVersionsRequest$ = [3, n0, _LOVRi,\n 0,\n [_B, _Deli, _ETn, _KM, _MK, _P, _VIM, _EBO, _RP, _OOA],\n [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _vim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }], [64 | 0, { [_hH]: _xaooa }]], 1\n];\nexport var ListPartsOutput$ = [3, n0, _LPO,\n { [_xN]: _LPR },\n [_ADb, _ARI, _B, _K, _UI, _PNM, _NPNM, _MP, _IT, _Pa, _In, _O, _SC, _RC, _CA, _CT],\n [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], 0, 0, 0, 0, 0, 1, 2, [() => Parts, { [_xF]: 1, [_xN]: _Par }], () => Initiator$, () => Owner$, 0, [0, { [_hH]: _xarc }], 0, 0]\n];\nexport var ListPartsRequest$ = [3, n0, _LPRi,\n 0,\n [_B, _K, _UI, _MP, _PNM, _RP, _EBO, _SSECA, _SSECK, _SSECKMD],\n [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [1, { [_hQ]: _mp }], [0, { [_hQ]: _pnm }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], 3\n];\nexport var LocationInfo$ = [3, n0, _LI,\n 0,\n [_Ty, _N],\n [0, 0]\n];\nexport var LoggingEnabled$ = [3, n0, _LE,\n 0,\n [_TB, _TP, _TG, _TOKF],\n [0, 0, [() => TargetGrants, 0], [() => TargetObjectKeyFormat$, 0]], 2\n];\nexport var MetadataConfiguration$ = [3, n0, _MC,\n 0,\n [_JTC, _ITCn],\n [() => JournalTableConfiguration$, () => InventoryTableConfiguration$], 1\n];\nexport var MetadataConfigurationResult$ = [3, n0, _MCR,\n 0,\n [_DRes, _JTCR, _ITCR],\n [() => DestinationResult$, () => JournalTableConfigurationResult$, () => InventoryTableConfigurationResult$], 1\n];\nexport var MetadataEntry$ = [3, n0, _ME,\n 0,\n [_N, _V],\n [0, 0]\n];\nexport var MetadataTableConfiguration$ = [3, n0, _MTC,\n 0,\n [_STD],\n [() => S3TablesDestination$], 1\n];\nexport var MetadataTableConfigurationResult$ = [3, n0, _MTCR,\n 0,\n [_STDR],\n [() => S3TablesDestinationResult$], 1\n];\nexport var MetadataTableEncryptionConfiguration$ = [3, n0, _MTEC,\n 0,\n [_SAs, _KKA],\n [0, 0], 1\n];\nexport var Metrics$ = [3, n0, _Me,\n 0,\n [_S, _ETv],\n [0, () => ReplicationTimeValue$], 1\n];\nexport var MetricsAndOperator$ = [3, n0, _MAO,\n 0,\n [_P, _T, _APAc],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 0]\n];\nexport var MetricsConfiguration$ = [3, n0, _MCe,\n 0,\n [_I, _F],\n [0, [() => MetricsFilter$, 0]], 1\n];\nexport var MultipartUpload$ = [3, n0, _MU,\n 0,\n [_UI, _K, _Ini, _SC, _O, _In, _CA, _CT],\n [0, 0, 4, 0, () => Owner$, () => Initiator$, 0, 0]\n];\nexport var NoncurrentVersionExpiration$ = [3, n0, _NVE,\n 0,\n [_ND, _NNV],\n [1, 1]\n];\nexport var NoncurrentVersionTransition$ = [3, n0, _NVTo,\n 0,\n [_ND, _SC, _NNV],\n [1, 0, 1]\n];\nexport var NotificationConfiguration$ = [3, n0, _NC,\n 0,\n [_TCo, _QCu, _LFCa, _EBC],\n [[() => TopicConfigurationList, { [_xF]: 1, [_xN]: _TCop }], [() => QueueConfigurationList, { [_xF]: 1, [_xN]: _QCue }], [() => LambdaFunctionConfigurationList, { [_xF]: 1, [_xN]: _CFC }], () => EventBridgeConfiguration$]\n];\nexport var NotificationConfigurationFilter$ = [3, n0, _NCF,\n 0,\n [_K],\n [[() => S3KeyFilter$, { [_xN]: _SKe }]]\n];\nexport var _Object$ = [3, n0, _Obj,\n 0,\n [_K, _LM, _ETa, _CA, _CT, _Si, _SC, _O, _RSe],\n [0, 4, 0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, () => Owner$, () => RestoreStatus$]\n];\nexport var ObjectIdentifier$ = [3, n0, _OI,\n 0,\n [_K, _VI, _ETa, _LMT, _Si],\n [0, 0, 0, 6, 1], 1\n];\nexport var ObjectLockConfiguration$ = [3, n0, _OLC,\n 0,\n [_OLE, _Ru],\n [0, () => ObjectLockRule$]\n];\nexport var ObjectLockLegalHold$ = [3, n0, _OLLH,\n 0,\n [_S],\n [0]\n];\nexport var ObjectLockRetention$ = [3, n0, _OLR,\n 0,\n [_Mo, _RUD],\n [0, 5]\n];\nexport var ObjectLockRule$ = [3, n0, _OLRb,\n 0,\n [_DRe],\n [() => DefaultRetention$]\n];\nexport var ObjectPart$ = [3, n0, _OPb,\n 0,\n [_PN, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh],\n [1, 1, 0, 0, 0, 0, 0]\n];\nexport var ObjectVersion$ = [3, n0, _OV,\n 0,\n [_ETa, _CA, _CT, _Si, _SC, _K, _VI, _IL, _LM, _O, _RSe],\n [0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, 0, 0, 2, 4, () => Owner$, () => RestoreStatus$]\n];\nexport var OutputLocation$ = [3, n0, _OL,\n 0,\n [_S_],\n [[() => S3Location$, 0]]\n];\nexport var OutputSerialization$ = [3, n0, _OSu,\n 0,\n [_CSV, _JSON],\n [() => CSVOutput$, () => JSONOutput$]\n];\nexport var Owner$ = [3, n0, _O,\n 0,\n [_DN, _ID],\n [0, 0]\n];\nexport var OwnershipControls$ = [3, n0, _OC,\n 0,\n [_R],\n [[() => OwnershipControlsRules, { [_xF]: 1, [_xN]: _Ru }]], 1\n];\nexport var OwnershipControlsRule$ = [3, n0, _OCR,\n 0,\n [_OO],\n [0], 1\n];\nexport var ParquetInput$ = [3, n0, _PI,\n 0,\n [],\n []\n];\nexport var Part$ = [3, n0, _Par,\n 0,\n [_PN, _LM, _ETa, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh],\n [1, 4, 0, 1, 0, 0, 0, 0, 0]\n];\nexport var PartitionedPrefix$ = [3, n0, _PP,\n { [_xN]: _PP },\n [_PDS],\n [0]\n];\nexport var PolicyStatus$ = [3, n0, _PS,\n 0,\n [_IP],\n [[2, { [_xN]: _IP }]]\n];\nexport var Progress$ = [3, n0, _Pr,\n 0,\n [_BS, _BP, _BRy],\n [1, 1, 1]\n];\nexport var ProgressEvent$ = [3, n0, _PE,\n 0,\n [_Det],\n [[() => Progress$, { [_eP]: 1 }]]\n];\nexport var PublicAccessBlockConfiguration$ = [3, n0, _PABC,\n 0,\n [_BPA, _IPA, _BPP, _RPB],\n [[2, { [_xN]: _BPA }], [2, { [_xN]: _IPA }], [2, { [_xN]: _BPP }], [2, { [_xN]: _RPB }]]\n];\nexport var PutBucketAbacRequest$ = [3, n0, _PBAR,\n 0,\n [_B, _AS, _CMD, _CA, _EBO],\n [[0, 1], [() => AbacStatus$, { [_hP]: 1, [_xN]: _AS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketAccelerateConfigurationRequest$ = [3, n0, _PBACR,\n 0,\n [_B, _AC, _EBO, _CA],\n [[0, 1], [() => AccelerateConfiguration$, { [_hP]: 1, [_xN]: _AC }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], 2\n];\nexport var PutBucketAclRequest$ = [3, n0, _PBARu,\n 0,\n [_B, _ACL_, _ACP, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _EBO],\n [[0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var PutBucketAnalyticsConfigurationRequest$ = [3, n0, _PBACRu,\n 0,\n [_B, _I, _ACn, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [() => AnalyticsConfiguration$, { [_hP]: 1, [_xN]: _ACn }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var PutBucketCorsRequest$ = [3, n0, _PBCR,\n 0,\n [_B, _CORSC, _CMD, _CA, _EBO],\n [[0, 1], [() => CORSConfiguration$, { [_hP]: 1, [_xN]: _CORSC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketEncryptionRequest$ = [3, n0, _PBER,\n 0,\n [_B, _SSEC, _CMD, _CA, _EBO],\n [[0, 1], [() => ServerSideEncryptionConfiguration$, { [_hP]: 1, [_xN]: _SSEC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketIntelligentTieringConfigurationRequest$ = [3, n0, _PBITCR,\n 0,\n [_B, _I, _ITC, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [() => IntelligentTieringConfiguration$, { [_hP]: 1, [_xN]: _ITC }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var PutBucketInventoryConfigurationRequest$ = [3, n0, _PBICR,\n 0,\n [_B, _I, _IC, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [() => InventoryConfiguration$, { [_hP]: 1, [_xN]: _IC }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var PutBucketLifecycleConfigurationOutput$ = [3, n0, _PBLCO,\n 0,\n [_TDMOS],\n [[0, { [_hH]: _xatdmos }]]\n];\nexport var PutBucketLifecycleConfigurationRequest$ = [3, n0, _PBLCR,\n 0,\n [_B, _CA, _LCi, _EBO, _TDMOS],\n [[0, 1], [0, { [_hH]: _xasca }], [() => BucketLifecycleConfiguration$, { [_hP]: 1, [_xN]: _LCi }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xatdmos }]], 1\n];\nexport var PutBucketLoggingRequest$ = [3, n0, _PBLR,\n 0,\n [_B, _BLS, _CMD, _CA, _EBO],\n [[0, 1], [() => BucketLoggingStatus$, { [_hP]: 1, [_xN]: _BLS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketMetricsConfigurationRequest$ = [3, n0, _PBMCR,\n 0,\n [_B, _I, _MCe, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [() => MetricsConfiguration$, { [_hP]: 1, [_xN]: _MCe }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var PutBucketNotificationConfigurationRequest$ = [3, n0, _PBNCR,\n 0,\n [_B, _NC, _EBO, _SDV],\n [[0, 1], [() => NotificationConfiguration$, { [_hP]: 1, [_xN]: _NC }], [0, { [_hH]: _xaebo }], [2, { [_hH]: _xasdv }]], 2\n];\nexport var PutBucketOwnershipControlsRequest$ = [3, n0, _PBOCR,\n 0,\n [_B, _OC, _CMD, _EBO, _CA],\n [[0, 1], [() => OwnershipControls$, { [_hP]: 1, [_xN]: _OC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], 2\n];\nexport var PutBucketPolicyRequest$ = [3, n0, _PBPR,\n 0,\n [_B, _Po, _CMD, _CA, _CRSBA, _EBO],\n [[0, 1], [0, 16], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [2, { [_hH]: _xacrsba }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketReplicationRequest$ = [3, n0, _PBRR,\n 0,\n [_B, _RCe, _CMD, _CA, _To, _EBO],\n [[0, 1], [() => ReplicationConfiguration$, { [_hP]: 1, [_xN]: _RCe }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketRequestPaymentRequest$ = [3, n0, _PBRPR,\n 0,\n [_B, _RPC, _CMD, _CA, _EBO],\n [[0, 1], [() => RequestPaymentConfiguration$, { [_hP]: 1, [_xN]: _RPC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketTaggingRequest$ = [3, n0, _PBTR,\n 0,\n [_B, _Tag, _CMD, _CA, _EBO],\n [[0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketVersioningRequest$ = [3, n0, _PBVR,\n 0,\n [_B, _VC, _CMD, _CA, _MFA, _EBO],\n [[0, 1], [() => VersioningConfiguration$, { [_hP]: 1, [_xN]: _VC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketWebsiteRequest$ = [3, n0, _PBWR,\n 0,\n [_B, _WC, _CMD, _CA, _EBO],\n [[0, 1], [() => WebsiteConfiguration$, { [_hP]: 1, [_xN]: _WC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectAclOutput$ = [3, n0, _POAO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var PutObjectAclRequest$ = [3, n0, _POAR,\n 0,\n [_B, _K, _ACL_, _ACP, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _RP, _VI, _EBO],\n [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectLegalHoldOutput$ = [3, n0, _POLHO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var PutObjectLegalHoldRequest$ = [3, n0, _POLHR,\n 0,\n [_B, _K, _LH, _RP, _VI, _CMD, _CA, _EBO],\n [[0, 1], [0, 1], [() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectLockConfigurationOutput$ = [3, n0, _POLCO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var PutObjectLockConfigurationRequest$ = [3, n0, _POLCR,\n 0,\n [_B, _OLC, _RP, _To, _CMD, _CA, _EBO],\n [[0, 1], [() => ObjectLockConfiguration$, { [_hP]: 1, [_xN]: _OLC }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var PutObjectOutput$ = [3, n0, _POO,\n 0,\n [_E, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _SSE, _VI, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _Si, _RC],\n [[0, { [_hH]: _xae }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [1, { [_hH]: _xaos }], [0, { [_hH]: _xarc }]]\n];\nexport var PutObjectRequest$ = [3, n0, _POR,\n 0,\n [_B, _K, _ACL_, _Bo, _CC, _CDo, _CEo, _CL, _CLo, _CMD, _CTo, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _Ex, _IM, _INM, _GFC, _GR, _GRACP, _GWACP, _WOB, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO],\n [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => StreamingBlob, 16], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [1, { [_hH]: _xawob }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectRetentionOutput$ = [3, n0, _PORO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var PutObjectRetentionRequest$ = [3, n0, _PORR,\n 0,\n [_B, _K, _Ret, _RP, _VI, _BGR, _CMD, _CA, _EBO],\n [[0, 1], [0, 1], [() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectTaggingOutput$ = [3, n0, _POTO,\n 0,\n [_VI],\n [[0, { [_hH]: _xavi }]]\n];\nexport var PutObjectTaggingRequest$ = [3, n0, _POTR,\n 0,\n [_B, _K, _Tag, _VI, _CMD, _CA, _EBO, _RP],\n [[0, 1], [0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], 3\n];\nexport var PutPublicAccessBlockRequest$ = [3, n0, _PPABR,\n 0,\n [_B, _PABC, _CMD, _CA, _EBO],\n [[0, 1], [() => PublicAccessBlockConfiguration$, { [_hP]: 1, [_xN]: _PABC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var QueueConfiguration$ = [3, n0, _QCue,\n 0,\n [_QA, _Ev, _I, _F],\n [[0, { [_xN]: _Qu }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], 2\n];\nexport var RecordExpiration$ = [3, n0, _REe,\n 0,\n [_E, _D],\n [0, 1], 1\n];\nexport var RecordsEvent$ = [3, n0, _REec,\n 0,\n [_Payl],\n [[21, { [_eP]: 1 }]]\n];\nexport var Redirect$ = [3, n0, _Red,\n 0,\n [_HN, _HRC, _Pro, _RKPW, _RKW],\n [0, 0, 0, 0, 0]\n];\nexport var RedirectAllRequestsTo$ = [3, n0, _RART,\n 0,\n [_HN, _Pro],\n [0, 0], 1\n];\nexport var RenameObjectOutput$ = [3, n0, _ROO,\n 0,\n [],\n []\n];\nexport var RenameObjectRequest$ = [3, n0, _ROR,\n 0,\n [_B, _K, _RSen, _DIM, _DINM, _DIMS, _DIUS, _SIM, _SINM, _SIMS, _SIUS, _CTl],\n [[0, 1], [0, 1], [0, { [_hH]: _xars_ }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IMS_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _xarsim }], [0, { [_hH]: _xarsinm }], [6, { [_hH]: _xarsims }], [6, { [_hH]: _xarsius }], [0, { [_hH]: _xact_, [_iT]: 1 }]], 3\n];\nexport var ReplicaModifications$ = [3, n0, _RM,\n 0,\n [_S],\n [0], 1\n];\nexport var ReplicationConfiguration$ = [3, n0, _RCe,\n 0,\n [_Ro, _R],\n [0, [() => ReplicationRules, { [_xF]: 1, [_xN]: _Ru }]], 2\n];\nexport var ReplicationRule$ = [3, n0, _RRe,\n 0,\n [_S, _Des, _ID, _Pri, _P, _F, _SSC, _EOR, _DMR],\n [0, () => Destination$, 0, 1, 0, [() => ReplicationRuleFilter$, 0], () => SourceSelectionCriteria$, () => ExistingObjectReplication$, () => DeleteMarkerReplication$], 2\n];\nexport var ReplicationRuleAndOperator$ = [3, n0, _RRAO,\n 0,\n [_P, _T],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]]\n];\nexport var ReplicationRuleFilter$ = [3, n0, _RRF,\n 0,\n [_P, _Ta, _An],\n [0, () => Tag$, [() => ReplicationRuleAndOperator$, 0]]\n];\nexport var ReplicationTime$ = [3, n0, _RT,\n 0,\n [_S, _Tim],\n [0, () => ReplicationTimeValue$], 2\n];\nexport var ReplicationTimeValue$ = [3, n0, _RTV,\n 0,\n [_Mi],\n [1]\n];\nexport var RequestPaymentConfiguration$ = [3, n0, _RPC,\n 0,\n [_Pay],\n [0], 1\n];\nexport var RequestProgress$ = [3, n0, _RPe,\n 0,\n [_Ena],\n [2]\n];\nexport var RestoreObjectOutput$ = [3, n0, _ROOe,\n 0,\n [_RC, _ROP],\n [[0, { [_hH]: _xarc }], [0, { [_hH]: _xarop }]]\n];\nexport var RestoreObjectRequest$ = [3, n0, _RORe,\n 0,\n [_B, _K, _VI, _RRes, _RP, _CA, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [() => RestoreRequest$, { [_hP]: 1, [_xN]: _RRes }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var RestoreRequest$ = [3, n0, _RRes,\n 0,\n [_D, _GJP, _Ty, _Ti, _Desc, _SP, _OL],\n [1, () => GlacierJobParameters$, 0, 0, 0, () => SelectParameters$, [() => OutputLocation$, 0]]\n];\nexport var RestoreStatus$ = [3, n0, _RSe,\n 0,\n [_IRIP, _RED],\n [2, 4]\n];\nexport var RoutingRule$ = [3, n0, _RRo,\n 0,\n [_Red, _Co],\n [() => Redirect$, () => Condition$], 1\n];\nexport var S3KeyFilter$ = [3, n0, _SKF,\n 0,\n [_FRi],\n [[() => FilterRuleList, { [_xF]: 1, [_xN]: _FR }]]\n];\nexport var S3Location$ = [3, n0, _SL,\n 0,\n [_BNu, _P, _En, _CACL, _ACL, _Tag, _UM, _SC],\n [0, 0, [() => Encryption$, 0], 0, [() => Grants, 0], [() => Tagging$, 0], [() => UserMetadata, 0], 0], 2\n];\nexport var S3TablesDestination$ = [3, n0, _STD,\n 0,\n [_TBA, _TNa],\n [0, 0], 2\n];\nexport var S3TablesDestinationResult$ = [3, n0, _STDR,\n 0,\n [_TBA, _TNa, _TA, _TN],\n [0, 0, 0, 0], 4\n];\nexport var ScanRange$ = [3, n0, _SR,\n 0,\n [_St, _End],\n [1, 1]\n];\nexport var SelectObjectContentOutput$ = [3, n0, _SOCO,\n 0,\n [_Payl],\n [[() => SelectObjectContentEventStream$, 16]]\n];\nexport var SelectObjectContentRequest$ = [3, n0, _SOCR,\n 0,\n [_B, _K, _Exp, _ETx, _IS, _OSu, _SSECA, _SSECK, _SSECKMD, _RPe, _SR, _EBO],\n [[0, 1], [0, 1], 0, 0, () => InputSerialization$, () => OutputSerialization$, [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], () => RequestProgress$, () => ScanRange$, [0, { [_hH]: _xaebo }]], 6\n];\nexport var SelectParameters$ = [3, n0, _SP,\n 0,\n [_IS, _ETx, _Exp, _OSu],\n [() => InputSerialization$, 0, 0, () => OutputSerialization$], 4\n];\nexport var ServerSideEncryptionByDefault$ = [3, n0, _SSEBD,\n 0,\n [_SSEA, _KMSMKID],\n [0, [() => SSEKMSKeyId, 0]], 1\n];\nexport var ServerSideEncryptionConfiguration$ = [3, n0, _SSEC,\n 0,\n [_R],\n [[() => ServerSideEncryptionRules, { [_xF]: 1, [_xN]: _Ru }]], 1\n];\nexport var ServerSideEncryptionRule$ = [3, n0, _SSER,\n 0,\n [_ASSEBD, _BKE, _BET],\n [[() => ServerSideEncryptionByDefault$, 0], 2, [() => BlockedEncryptionTypes$, 0]]\n];\nexport var SessionCredentials$ = [3, n0, _SCe,\n 0,\n [_AKI, _SAK, _ST, _E],\n [[0, { [_xN]: _AKI }], [() => SessionCredentialValue, { [_xN]: _SAK }], [() => SessionCredentialValue, { [_xN]: _ST }], [4, { [_xN]: _E }]], 4\n];\nexport var SimplePrefix$ = [3, n0, _SPi,\n { [_xN]: _SPi },\n [],\n []\n];\nexport var SourceSelectionCriteria$ = [3, n0, _SSC,\n 0,\n [_SKEO, _RM],\n [() => SseKmsEncryptedObjects$, () => ReplicaModifications$]\n];\nexport var SSEKMS$ = [3, n0, _SSEKMS,\n { [_xN]: _SK },\n [_KI],\n [[() => SSEKMSKeyId, 0]], 1\n];\nexport var SseKmsEncryptedObjects$ = [3, n0, _SKEO,\n 0,\n [_S],\n [0], 1\n];\nexport var SSEKMSEncryption$ = [3, n0, _SSEKMSE,\n { [_xN]: _SK },\n [_KMSKA, _BKE],\n [[() => NonEmptyKmsKeyArnString, 0], 2], 1\n];\nexport var SSES3$ = [3, n0, _SSES,\n { [_xN]: _SS },\n [],\n []\n];\nexport var Stats$ = [3, n0, _Sta,\n 0,\n [_BS, _BP, _BRy],\n [1, 1, 1]\n];\nexport var StatsEvent$ = [3, n0, _SE,\n 0,\n [_Det],\n [[() => Stats$, { [_eP]: 1 }]]\n];\nexport var StorageClassAnalysis$ = [3, n0, _SCA,\n 0,\n [_DE],\n [() => StorageClassAnalysisDataExport$]\n];\nexport var StorageClassAnalysisDataExport$ = [3, n0, _SCADE,\n 0,\n [_OSV, _Des],\n [0, () => AnalyticsExportDestination$], 2\n];\nexport var Tag$ = [3, n0, _Ta,\n 0,\n [_K, _V],\n [0, 0], 2\n];\nexport var Tagging$ = [3, n0, _Tag,\n 0,\n [_TS],\n [[() => TagSet, 0]], 1\n];\nexport var TargetGrant$ = [3, n0, _TGa,\n 0,\n [_Gra, _Pe],\n [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0]\n];\nexport var TargetObjectKeyFormat$ = [3, n0, _TOKF,\n 0,\n [_SPi, _PP],\n [[() => SimplePrefix$, { [_xN]: _SPi }], [() => PartitionedPrefix$, { [_xN]: _PP }]]\n];\nexport var Tiering$ = [3, n0, _Tier,\n 0,\n [_D, _AT],\n [1, 0], 2\n];\nexport var TopicConfiguration$ = [3, n0, _TCop,\n 0,\n [_TAo, _Ev, _I, _F],\n [[0, { [_xN]: _Top }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], 2\n];\nexport var Transition$ = [3, n0, _Tra,\n 0,\n [_Da, _D, _SC],\n [5, 1, 0]\n];\nexport var UpdateBucketMetadataInventoryTableConfigurationRequest$ = [3, n0, _UBMITCR,\n 0,\n [_B, _ITCn, _CMD, _CA, _EBO],\n [[0, 1], [() => InventoryTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _ITCn }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var UpdateBucketMetadataJournalTableConfigurationRequest$ = [3, n0, _UBMJTCR,\n 0,\n [_B, _JTC, _CMD, _CA, _EBO],\n [[0, 1], [() => JournalTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _JTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var UpdateObjectEncryptionRequest$ = [3, n0, _UOER,\n 0,\n [_B, _K, _OE, _VI, _RP, _EBO, _CMD, _CA],\n [[0, 1], [0, 1], [() => ObjectEncryption$, 16], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }]], 3\n];\nexport var UpdateObjectEncryptionResponse$ = [3, n0, _UOERp,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var UploadPartCopyOutput$ = [3, n0, _UPCO,\n 0,\n [_CSVI, _CPR, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC],\n [[0, { [_hH]: _xacsvi }], [() => CopyPartResult$, 16], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]]\n];\nexport var UploadPartCopyRequest$ = [3, n0, _UPCR,\n 0,\n [_B, _CS, _K, _PN, _UI, _CSIM, _CSIMS, _CSINM, _CSIUS, _CSRo, _SSECA, _SSECK, _SSECKMD, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _EBO, _ESBO],\n [[0, 1], [0, { [_hH]: _xacs__ }], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [0, { [_hH]: _xacsr }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], 5\n];\nexport var UploadPartOutput$ = [3, n0, _UPO,\n 0,\n [_SSE, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC],\n [[0, { [_hH]: _xasse }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]]\n];\nexport var UploadPartRequest$ = [3, n0, _UPR,\n 0,\n [_B, _K, _PN, _UI, _Bo, _CLo, _CMD, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _SSECA, _SSECK, _SSECKMD, _RP, _EBO],\n [[0, 1], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [() => StreamingBlob, 16], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 4\n];\nexport var VersioningConfiguration$ = [3, n0, _VC,\n 0,\n [_MFAD, _S],\n [[0, { [_xN]: _MDf }], 0]\n];\nexport var WebsiteConfiguration$ = [3, n0, _WC,\n 0,\n [_EDr, _IDn, _RART, _RR],\n [() => ErrorDocument$, () => IndexDocument$, () => RedirectAllRequestsTo$, [() => RoutingRules, 0]]\n];\nexport var WriteGetObjectResponseRequest$ = [3, n0, _WGORR,\n 0,\n [_RReq, _RTe, _Bo, _SCt, _ECr, _EM, _AR, _CC, _CDo, _CEo, _CL, _CLo, _CR, _CTo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _DM, _ETa, _Ex, _E, _LM, _MM, _M, _OLM, _OLLHS, _OLRUD, _PC, _RS, _RC, _Re, _SSE, _SSECA, _SSEKMSKI, _SSECKMD, _SC, _TC, _VI, _BKE],\n [[0, { [_hL]: 1, [_hH]: _xarr }], [0, { [_hH]: _xart }], [() => StreamingBlob, 16], [1, { [_hH]: _xafs }], [0, { [_hH]: _xafec }], [0, { [_hH]: _xafem }], [0, { [_hH]: _xafhar }], [0, { [_hH]: _xafhCC }], [0, { [_hH]: _xafhCD }], [0, { [_hH]: _xafhCE }], [0, { [_hH]: _xafhCL }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xafhCR }], [0, { [_hH]: _xafhCT }], [0, { [_hH]: _xafhxacc }], [0, { [_hH]: _xafhxacc_ }], [0, { [_hH]: _xafhxacc__ }], [0, { [_hH]: _xafhxacs }], [0, { [_hH]: _xafhxacs_ }], [2, { [_hH]: _xafhxadm }], [0, { [_hH]: _xafhE }], [4, { [_hH]: _xafhE_ }], [0, { [_hH]: _xafhxae }], [4, { [_hH]: _xafhLM }], [1, { [_hH]: _xafhxamm }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xafhxaolm }], [0, { [_hH]: _xafhxaollh }], [5, { [_hH]: _xafhxaolrud }], [1, { [_hH]: _xafhxampc }], [0, { [_hH]: _xafhxars }], [0, { [_hH]: _xafhxarc }], [0, { [_hH]: _xafhxar }], [0, { [_hH]: _xafhxasse }], [0, { [_hH]: _xafhxasseca }], [() => SSEKMSKeyId, { [_hH]: _xafhxasseakki }], [0, { [_hH]: _xafhxasseckM }], [0, { [_hH]: _xafhxasc }], [1, { [_hH]: _xafhxatc }], [0, { [_hH]: _xafhxavi }], [2, { [_hH]: _xafhxassebke }]], 2\n];\nvar __Unit = \"unit\";\nvar AllowedHeaders = 64 | 0;\nvar AllowedMethods = 64 | 0;\nvar AllowedOrigins = 64 | 0;\nvar AnalyticsConfigurationList = [1, n0, _ACLn,\n 0, [() => AnalyticsConfiguration$,\n 0]\n];\nvar Buckets = [1, n0, _Bu,\n 0, [() => Bucket$,\n { [_xN]: _B }]\n];\nvar ChecksumAlgorithmList = 64 | 0;\nvar CommonPrefixList = [1, n0, _CPL,\n 0, () => CommonPrefix$\n];\nvar CompletedPartList = [1, n0, _CPLo,\n 0, () => CompletedPart$\n];\nvar CORSRules = [1, n0, _CORSR,\n 0, [() => CORSRule$,\n 0]\n];\nvar DeletedObjects = [1, n0, _DOe,\n 0, () => DeletedObject$\n];\nvar DeleteMarkers = [1, n0, _DMe,\n 0, () => DeleteMarkerEntry$\n];\nvar EncryptionTypeList = [1, n0, _ETL,\n 0, [0,\n { [_xN]: _ET }]\n];\nvar Errors = [1, n0, _Er,\n 0, () => _Error$\n];\nvar EventList = 64 | 0;\nvar ExposeHeaders = 64 | 0;\nvar FilterRuleList = [1, n0, _FRL,\n 0, () => FilterRule$\n];\nvar Grants = [1, n0, _G,\n 0, [() => Grant$,\n { [_xN]: _Gr }]\n];\nvar IntelligentTieringConfigurationList = [1, n0, _ITCL,\n 0, [() => IntelligentTieringConfiguration$,\n 0]\n];\nvar InventoryConfigurationList = [1, n0, _ICL,\n 0, [() => InventoryConfiguration$,\n 0]\n];\nvar InventoryOptionalFields = [1, n0, _IOF,\n 0, [0,\n { [_xN]: _Fi }]\n];\nvar LambdaFunctionConfigurationList = [1, n0, _LFCL,\n 0, [() => LambdaFunctionConfiguration$,\n 0]\n];\nvar LifecycleRules = [1, n0, _LRi,\n 0, [() => LifecycleRule$,\n 0]\n];\nvar MetricsConfigurationList = [1, n0, _MCL,\n 0, [() => MetricsConfiguration$,\n 0]\n];\nvar MultipartUploadList = [1, n0, _MUL,\n 0, () => MultipartUpload$\n];\nvar NoncurrentVersionTransitionList = [1, n0, _NVTL,\n 0, () => NoncurrentVersionTransition$\n];\nvar ObjectAttributesList = 64 | 0;\nvar ObjectIdentifierList = [1, n0, _OIL,\n 0, () => ObjectIdentifier$\n];\nvar ObjectList = [1, n0, _OLb,\n 0, [() => _Object$,\n 0]\n];\nvar ObjectVersionList = [1, n0, _OVL,\n 0, [() => ObjectVersion$,\n 0]\n];\nvar OptionalObjectAttributesList = 64 | 0;\nvar OwnershipControlsRules = [1, n0, _OCRw,\n 0, () => OwnershipControlsRule$\n];\nvar Parts = [1, n0, _Pa,\n 0, () => Part$\n];\nvar PartsList = [1, n0, _PL,\n 0, () => ObjectPart$\n];\nvar QueueConfigurationList = [1, n0, _QCL,\n 0, [() => QueueConfiguration$,\n 0]\n];\nvar ReplicationRules = [1, n0, _RRep,\n 0, [() => ReplicationRule$,\n 0]\n];\nvar RoutingRules = [1, n0, _RR,\n 0, [() => RoutingRule$,\n { [_xN]: _RRo }]\n];\nvar ServerSideEncryptionRules = [1, n0, _SSERe,\n 0, [() => ServerSideEncryptionRule$,\n 0]\n];\nvar TagSet = [1, n0, _TS,\n 0, [() => Tag$,\n { [_xN]: _Ta }]\n];\nvar TargetGrants = [1, n0, _TG,\n 0, [() => TargetGrant$,\n { [_xN]: _Gr }]\n];\nvar TieringList = [1, n0, _TL,\n 0, () => Tiering$\n];\nvar TopicConfigurationList = [1, n0, _TCL,\n 0, [() => TopicConfiguration$,\n 0]\n];\nvar TransitionList = [1, n0, _TLr,\n 0, () => Transition$\n];\nvar UserMetadata = [1, n0, _UM,\n 0, [() => MetadataEntry$,\n { [_xN]: _ME }]\n];\nvar Metadata = 128 | 0;\nexport var AnalyticsFilter$ = [4, n0, _AF,\n 0,\n [_P, _Ta, _An],\n [0, () => Tag$, [() => AnalyticsAndOperator$, 0]]\n];\nexport var MetricsFilter$ = [4, n0, _MF,\n 0,\n [_P, _Ta, _APAc, _An],\n [0, () => Tag$, 0, [() => MetricsAndOperator$, 0]]\n];\nexport var ObjectEncryption$ = [4, n0, _OE,\n 0,\n [_SSEKMS],\n [[() => SSEKMSEncryption$, { [_xN]: _SK }]]\n];\nexport var SelectObjectContentEventStream$ = [4, n0, _SOCES,\n { [_st]: 1 },\n [_Rec, _Sta, _Pr, _Cont, _End],\n [[() => RecordsEvent$, 0], [() => StatsEvent$, 0], [() => ProgressEvent$, 0], () => ContinuationEvent$, () => EndEvent$]\n];\nexport var AbortMultipartUpload$ = [9, n0, _AMU,\n { [_h]: [\"DELETE\", \"/{Key+}?x-id=AbortMultipartUpload\", 204] }, () => AbortMultipartUploadRequest$, () => AbortMultipartUploadOutput$\n];\nexport var CompleteMultipartUpload$ = [9, n0, _CMUo,\n { [_h]: [\"POST\", \"/{Key+}\", 200] }, () => CompleteMultipartUploadRequest$, () => CompleteMultipartUploadOutput$\n];\nexport var CopyObject$ = [9, n0, _CO,\n { [_h]: [\"PUT\", \"/{Key+}?x-id=CopyObject\", 200] }, () => CopyObjectRequest$, () => CopyObjectOutput$\n];\nexport var CreateBucket$ = [9, n0, _CB,\n { [_h]: [\"PUT\", \"/\", 200] }, () => CreateBucketRequest$, () => CreateBucketOutput$\n];\nexport var CreateBucketMetadataConfiguration$ = [9, n0, _CBMC,\n { [_hC]: \"-\", [_h]: [\"POST\", \"/?metadataConfiguration\", 200] }, () => CreateBucketMetadataConfigurationRequest$, () => __Unit\n];\nexport var CreateBucketMetadataTableConfiguration$ = [9, n0, _CBMTC,\n { [_hC]: \"-\", [_h]: [\"POST\", \"/?metadataTable\", 200] }, () => CreateBucketMetadataTableConfigurationRequest$, () => __Unit\n];\nexport var CreateMultipartUpload$ = [9, n0, _CMUr,\n { [_h]: [\"POST\", \"/{Key+}?uploads\", 200] }, () => CreateMultipartUploadRequest$, () => CreateMultipartUploadOutput$\n];\nexport var CreateSession$ = [9, n0, _CSr,\n { [_h]: [\"GET\", \"/?session\", 200] }, () => CreateSessionRequest$, () => CreateSessionOutput$\n];\nexport var DeleteBucket$ = [9, n0, _DB,\n { [_h]: [\"DELETE\", \"/\", 204] }, () => DeleteBucketRequest$, () => __Unit\n];\nexport var DeleteBucketAnalyticsConfiguration$ = [9, n0, _DBAC,\n { [_h]: [\"DELETE\", \"/?analytics\", 204] }, () => DeleteBucketAnalyticsConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketCors$ = [9, n0, _DBC,\n { [_h]: [\"DELETE\", \"/?cors\", 204] }, () => DeleteBucketCorsRequest$, () => __Unit\n];\nexport var DeleteBucketEncryption$ = [9, n0, _DBE,\n { [_h]: [\"DELETE\", \"/?encryption\", 204] }, () => DeleteBucketEncryptionRequest$, () => __Unit\n];\nexport var DeleteBucketIntelligentTieringConfiguration$ = [9, n0, _DBITC,\n { [_h]: [\"DELETE\", \"/?intelligent-tiering\", 204] }, () => DeleteBucketIntelligentTieringConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketInventoryConfiguration$ = [9, n0, _DBIC,\n { [_h]: [\"DELETE\", \"/?inventory\", 204] }, () => DeleteBucketInventoryConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketLifecycle$ = [9, n0, _DBL,\n { [_h]: [\"DELETE\", \"/?lifecycle\", 204] }, () => DeleteBucketLifecycleRequest$, () => __Unit\n];\nexport var DeleteBucketMetadataConfiguration$ = [9, n0, _DBMC,\n { [_h]: [\"DELETE\", \"/?metadataConfiguration\", 204] }, () => DeleteBucketMetadataConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketMetadataTableConfiguration$ = [9, n0, _DBMTC,\n { [_h]: [\"DELETE\", \"/?metadataTable\", 204] }, () => DeleteBucketMetadataTableConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketMetricsConfiguration$ = [9, n0, _DBMCe,\n { [_h]: [\"DELETE\", \"/?metrics\", 204] }, () => DeleteBucketMetricsConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketOwnershipControls$ = [9, n0, _DBOC,\n { [_h]: [\"DELETE\", \"/?ownershipControls\", 204] }, () => DeleteBucketOwnershipControlsRequest$, () => __Unit\n];\nexport var DeleteBucketPolicy$ = [9, n0, _DBP,\n { [_h]: [\"DELETE\", \"/?policy\", 204] }, () => DeleteBucketPolicyRequest$, () => __Unit\n];\nexport var DeleteBucketReplication$ = [9, n0, _DBRe,\n { [_h]: [\"DELETE\", \"/?replication\", 204] }, () => DeleteBucketReplicationRequest$, () => __Unit\n];\nexport var DeleteBucketTagging$ = [9, n0, _DBT,\n { [_h]: [\"DELETE\", \"/?tagging\", 204] }, () => DeleteBucketTaggingRequest$, () => __Unit\n];\nexport var DeleteBucketWebsite$ = [9, n0, _DBW,\n { [_h]: [\"DELETE\", \"/?website\", 204] }, () => DeleteBucketWebsiteRequest$, () => __Unit\n];\nexport var DeleteObject$ = [9, n0, _DOel,\n { [_h]: [\"DELETE\", \"/{Key+}?x-id=DeleteObject\", 204] }, () => DeleteObjectRequest$, () => DeleteObjectOutput$\n];\nexport var DeleteObjects$ = [9, n0, _DOele,\n { [_hC]: \"-\", [_h]: [\"POST\", \"/?delete\", 200] }, () => DeleteObjectsRequest$, () => DeleteObjectsOutput$\n];\nexport var DeleteObjectTagging$ = [9, n0, _DOT,\n { [_h]: [\"DELETE\", \"/{Key+}?tagging\", 204] }, () => DeleteObjectTaggingRequest$, () => DeleteObjectTaggingOutput$\n];\nexport var DeletePublicAccessBlock$ = [9, n0, _DPAB,\n { [_h]: [\"DELETE\", \"/?publicAccessBlock\", 204] }, () => DeletePublicAccessBlockRequest$, () => __Unit\n];\nexport var GetBucketAbac$ = [9, n0, _GBA,\n { [_h]: [\"GET\", \"/?abac\", 200] }, () => GetBucketAbacRequest$, () => GetBucketAbacOutput$\n];\nexport var GetBucketAccelerateConfiguration$ = [9, n0, _GBAC,\n { [_h]: [\"GET\", \"/?accelerate\", 200] }, () => GetBucketAccelerateConfigurationRequest$, () => GetBucketAccelerateConfigurationOutput$\n];\nexport var GetBucketAcl$ = [9, n0, _GBAe,\n { [_h]: [\"GET\", \"/?acl\", 200] }, () => GetBucketAclRequest$, () => GetBucketAclOutput$\n];\nexport var GetBucketAnalyticsConfiguration$ = [9, n0, _GBACe,\n { [_h]: [\"GET\", \"/?analytics&x-id=GetBucketAnalyticsConfiguration\", 200] }, () => GetBucketAnalyticsConfigurationRequest$, () => GetBucketAnalyticsConfigurationOutput$\n];\nexport var GetBucketCors$ = [9, n0, _GBC,\n { [_h]: [\"GET\", \"/?cors\", 200] }, () => GetBucketCorsRequest$, () => GetBucketCorsOutput$\n];\nexport var GetBucketEncryption$ = [9, n0, _GBE,\n { [_h]: [\"GET\", \"/?encryption\", 200] }, () => GetBucketEncryptionRequest$, () => GetBucketEncryptionOutput$\n];\nexport var GetBucketIntelligentTieringConfiguration$ = [9, n0, _GBITC,\n { [_h]: [\"GET\", \"/?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration\", 200] }, () => GetBucketIntelligentTieringConfigurationRequest$, () => GetBucketIntelligentTieringConfigurationOutput$\n];\nexport var GetBucketInventoryConfiguration$ = [9, n0, _GBIC,\n { [_h]: [\"GET\", \"/?inventory&x-id=GetBucketInventoryConfiguration\", 200] }, () => GetBucketInventoryConfigurationRequest$, () => GetBucketInventoryConfigurationOutput$\n];\nexport var GetBucketLifecycleConfiguration$ = [9, n0, _GBLC,\n { [_h]: [\"GET\", \"/?lifecycle\", 200] }, () => GetBucketLifecycleConfigurationRequest$, () => GetBucketLifecycleConfigurationOutput$\n];\nexport var GetBucketLocation$ = [9, n0, _GBL,\n { [_h]: [\"GET\", \"/?location\", 200] }, () => GetBucketLocationRequest$, () => GetBucketLocationOutput$\n];\nexport var GetBucketLogging$ = [9, n0, _GBLe,\n { [_h]: [\"GET\", \"/?logging\", 200] }, () => GetBucketLoggingRequest$, () => GetBucketLoggingOutput$\n];\nexport var GetBucketMetadataConfiguration$ = [9, n0, _GBMC,\n { [_h]: [\"GET\", \"/?metadataConfiguration\", 200] }, () => GetBucketMetadataConfigurationRequest$, () => GetBucketMetadataConfigurationOutput$\n];\nexport var GetBucketMetadataTableConfiguration$ = [9, n0, _GBMTC,\n { [_h]: [\"GET\", \"/?metadataTable\", 200] }, () => GetBucketMetadataTableConfigurationRequest$, () => GetBucketMetadataTableConfigurationOutput$\n];\nexport var GetBucketMetricsConfiguration$ = [9, n0, _GBMCe,\n { [_h]: [\"GET\", \"/?metrics&x-id=GetBucketMetricsConfiguration\", 200] }, () => GetBucketMetricsConfigurationRequest$, () => GetBucketMetricsConfigurationOutput$\n];\nexport var GetBucketNotificationConfiguration$ = [9, n0, _GBNC,\n { [_h]: [\"GET\", \"/?notification\", 200] }, () => GetBucketNotificationConfigurationRequest$, () => NotificationConfiguration$\n];\nexport var GetBucketOwnershipControls$ = [9, n0, _GBOC,\n { [_h]: [\"GET\", \"/?ownershipControls\", 200] }, () => GetBucketOwnershipControlsRequest$, () => GetBucketOwnershipControlsOutput$\n];\nexport var GetBucketPolicy$ = [9, n0, _GBP,\n { [_h]: [\"GET\", \"/?policy\", 200] }, () => GetBucketPolicyRequest$, () => GetBucketPolicyOutput$\n];\nexport var GetBucketPolicyStatus$ = [9, n0, _GBPS,\n { [_h]: [\"GET\", \"/?policyStatus\", 200] }, () => GetBucketPolicyStatusRequest$, () => GetBucketPolicyStatusOutput$\n];\nexport var GetBucketReplication$ = [9, n0, _GBR,\n { [_h]: [\"GET\", \"/?replication\", 200] }, () => GetBucketReplicationRequest$, () => GetBucketReplicationOutput$\n];\nexport var GetBucketRequestPayment$ = [9, n0, _GBRP,\n { [_h]: [\"GET\", \"/?requestPayment\", 200] }, () => GetBucketRequestPaymentRequest$, () => GetBucketRequestPaymentOutput$\n];\nexport var GetBucketTagging$ = [9, n0, _GBT,\n { [_h]: [\"GET\", \"/?tagging\", 200] }, () => GetBucketTaggingRequest$, () => GetBucketTaggingOutput$\n];\nexport var GetBucketVersioning$ = [9, n0, _GBV,\n { [_h]: [\"GET\", \"/?versioning\", 200] }, () => GetBucketVersioningRequest$, () => GetBucketVersioningOutput$\n];\nexport var GetBucketWebsite$ = [9, n0, _GBW,\n { [_h]: [\"GET\", \"/?website\", 200] }, () => GetBucketWebsiteRequest$, () => GetBucketWebsiteOutput$\n];\nexport var GetObject$ = [9, n0, _GO,\n { [_hC]: \"-\", [_h]: [\"GET\", \"/{Key+}?x-id=GetObject\", 200] }, () => GetObjectRequest$, () => GetObjectOutput$\n];\nexport var GetObjectAcl$ = [9, n0, _GOA,\n { [_h]: [\"GET\", \"/{Key+}?acl\", 200] }, () => GetObjectAclRequest$, () => GetObjectAclOutput$\n];\nexport var GetObjectAttributes$ = [9, n0, _GOAe,\n { [_h]: [\"GET\", \"/{Key+}?attributes\", 200] }, () => GetObjectAttributesRequest$, () => GetObjectAttributesOutput$\n];\nexport var GetObjectLegalHold$ = [9, n0, _GOLH,\n { [_h]: [\"GET\", \"/{Key+}?legal-hold\", 200] }, () => GetObjectLegalHoldRequest$, () => GetObjectLegalHoldOutput$\n];\nexport var GetObjectLockConfiguration$ = [9, n0, _GOLC,\n { [_h]: [\"GET\", \"/?object-lock\", 200] }, () => GetObjectLockConfigurationRequest$, () => GetObjectLockConfigurationOutput$\n];\nexport var GetObjectRetention$ = [9, n0, _GORe,\n { [_h]: [\"GET\", \"/{Key+}?retention\", 200] }, () => GetObjectRetentionRequest$, () => GetObjectRetentionOutput$\n];\nexport var GetObjectTagging$ = [9, n0, _GOT,\n { [_h]: [\"GET\", \"/{Key+}?tagging\", 200] }, () => GetObjectTaggingRequest$, () => GetObjectTaggingOutput$\n];\nexport var GetObjectTorrent$ = [9, n0, _GOTe,\n { [_h]: [\"GET\", \"/{Key+}?torrent\", 200] }, () => GetObjectTorrentRequest$, () => GetObjectTorrentOutput$\n];\nexport var GetPublicAccessBlock$ = [9, n0, _GPAB,\n { [_h]: [\"GET\", \"/?publicAccessBlock\", 200] }, () => GetPublicAccessBlockRequest$, () => GetPublicAccessBlockOutput$\n];\nexport var HeadBucket$ = [9, n0, _HB,\n { [_h]: [\"HEAD\", \"/\", 200] }, () => HeadBucketRequest$, () => HeadBucketOutput$\n];\nexport var HeadObject$ = [9, n0, _HO,\n { [_h]: [\"HEAD\", \"/{Key+}\", 200] }, () => HeadObjectRequest$, () => HeadObjectOutput$\n];\nexport var ListBucketAnalyticsConfigurations$ = [9, n0, _LBAC,\n { [_h]: [\"GET\", \"/?analytics&x-id=ListBucketAnalyticsConfigurations\", 200] }, () => ListBucketAnalyticsConfigurationsRequest$, () => ListBucketAnalyticsConfigurationsOutput$\n];\nexport var ListBucketIntelligentTieringConfigurations$ = [9, n0, _LBITC,\n { [_h]: [\"GET\", \"/?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations\", 200] }, () => ListBucketIntelligentTieringConfigurationsRequest$, () => ListBucketIntelligentTieringConfigurationsOutput$\n];\nexport var ListBucketInventoryConfigurations$ = [9, n0, _LBIC,\n { [_h]: [\"GET\", \"/?inventory&x-id=ListBucketInventoryConfigurations\", 200] }, () => ListBucketInventoryConfigurationsRequest$, () => ListBucketInventoryConfigurationsOutput$\n];\nexport var ListBucketMetricsConfigurations$ = [9, n0, _LBMC,\n { [_h]: [\"GET\", \"/?metrics&x-id=ListBucketMetricsConfigurations\", 200] }, () => ListBucketMetricsConfigurationsRequest$, () => ListBucketMetricsConfigurationsOutput$\n];\nexport var ListBuckets$ = [9, n0, _LB,\n { [_h]: [\"GET\", \"/?x-id=ListBuckets\", 200] }, () => ListBucketsRequest$, () => ListBucketsOutput$\n];\nexport var ListDirectoryBuckets$ = [9, n0, _LDB,\n { [_h]: [\"GET\", \"/?x-id=ListDirectoryBuckets\", 200] }, () => ListDirectoryBucketsRequest$, () => ListDirectoryBucketsOutput$\n];\nexport var ListMultipartUploads$ = [9, n0, _LMU,\n { [_h]: [\"GET\", \"/?uploads\", 200] }, () => ListMultipartUploadsRequest$, () => ListMultipartUploadsOutput$\n];\nexport var ListObjects$ = [9, n0, _LO,\n { [_h]: [\"GET\", \"/\", 200] }, () => ListObjectsRequest$, () => ListObjectsOutput$\n];\nexport var ListObjectsV2$ = [9, n0, _LOV,\n { [_h]: [\"GET\", \"/?list-type=2\", 200] }, () => ListObjectsV2Request$, () => ListObjectsV2Output$\n];\nexport var ListObjectVersions$ = [9, n0, _LOVi,\n { [_h]: [\"GET\", \"/?versions\", 200] }, () => ListObjectVersionsRequest$, () => ListObjectVersionsOutput$\n];\nexport var ListParts$ = [9, n0, _LP,\n { [_h]: [\"GET\", \"/{Key+}?x-id=ListParts\", 200] }, () => ListPartsRequest$, () => ListPartsOutput$\n];\nexport var PutBucketAbac$ = [9, n0, _PBA,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?abac\", 200] }, () => PutBucketAbacRequest$, () => __Unit\n];\nexport var PutBucketAccelerateConfiguration$ = [9, n0, _PBAC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?accelerate\", 200] }, () => PutBucketAccelerateConfigurationRequest$, () => __Unit\n];\nexport var PutBucketAcl$ = [9, n0, _PBAu,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?acl\", 200] }, () => PutBucketAclRequest$, () => __Unit\n];\nexport var PutBucketAnalyticsConfiguration$ = [9, n0, _PBACu,\n { [_h]: [\"PUT\", \"/?analytics\", 200] }, () => PutBucketAnalyticsConfigurationRequest$, () => __Unit\n];\nexport var PutBucketCors$ = [9, n0, _PBC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?cors\", 200] }, () => PutBucketCorsRequest$, () => __Unit\n];\nexport var PutBucketEncryption$ = [9, n0, _PBE,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?encryption\", 200] }, () => PutBucketEncryptionRequest$, () => __Unit\n];\nexport var PutBucketIntelligentTieringConfiguration$ = [9, n0, _PBITC,\n { [_h]: [\"PUT\", \"/?intelligent-tiering\", 200] }, () => PutBucketIntelligentTieringConfigurationRequest$, () => __Unit\n];\nexport var PutBucketInventoryConfiguration$ = [9, n0, _PBIC,\n { [_h]: [\"PUT\", \"/?inventory\", 200] }, () => PutBucketInventoryConfigurationRequest$, () => __Unit\n];\nexport var PutBucketLifecycleConfiguration$ = [9, n0, _PBLC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?lifecycle\", 200] }, () => PutBucketLifecycleConfigurationRequest$, () => PutBucketLifecycleConfigurationOutput$\n];\nexport var PutBucketLogging$ = [9, n0, _PBL,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?logging\", 200] }, () => PutBucketLoggingRequest$, () => __Unit\n];\nexport var PutBucketMetricsConfiguration$ = [9, n0, _PBMC,\n { [_h]: [\"PUT\", \"/?metrics\", 200] }, () => PutBucketMetricsConfigurationRequest$, () => __Unit\n];\nexport var PutBucketNotificationConfiguration$ = [9, n0, _PBNC,\n { [_h]: [\"PUT\", \"/?notification\", 200] }, () => PutBucketNotificationConfigurationRequest$, () => __Unit\n];\nexport var PutBucketOwnershipControls$ = [9, n0, _PBOC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?ownershipControls\", 200] }, () => PutBucketOwnershipControlsRequest$, () => __Unit\n];\nexport var PutBucketPolicy$ = [9, n0, _PBP,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?policy\", 200] }, () => PutBucketPolicyRequest$, () => __Unit\n];\nexport var PutBucketReplication$ = [9, n0, _PBR,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?replication\", 200] }, () => PutBucketReplicationRequest$, () => __Unit\n];\nexport var PutBucketRequestPayment$ = [9, n0, _PBRP,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?requestPayment\", 200] }, () => PutBucketRequestPaymentRequest$, () => __Unit\n];\nexport var PutBucketTagging$ = [9, n0, _PBT,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?tagging\", 200] }, () => PutBucketTaggingRequest$, () => __Unit\n];\nexport var PutBucketVersioning$ = [9, n0, _PBV,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?versioning\", 200] }, () => PutBucketVersioningRequest$, () => __Unit\n];\nexport var PutBucketWebsite$ = [9, n0, _PBW,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?website\", 200] }, () => PutBucketWebsiteRequest$, () => __Unit\n];\nexport var PutObject$ = [9, n0, _PO,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?x-id=PutObject\", 200] }, () => PutObjectRequest$, () => PutObjectOutput$\n];\nexport var PutObjectAcl$ = [9, n0, _POA,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?acl\", 200] }, () => PutObjectAclRequest$, () => PutObjectAclOutput$\n];\nexport var PutObjectLegalHold$ = [9, n0, _POLH,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?legal-hold\", 200] }, () => PutObjectLegalHoldRequest$, () => PutObjectLegalHoldOutput$\n];\nexport var PutObjectLockConfiguration$ = [9, n0, _POLC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?object-lock\", 200] }, () => PutObjectLockConfigurationRequest$, () => PutObjectLockConfigurationOutput$\n];\nexport var PutObjectRetention$ = [9, n0, _PORu,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?retention\", 200] }, () => PutObjectRetentionRequest$, () => PutObjectRetentionOutput$\n];\nexport var PutObjectTagging$ = [9, n0, _POT,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?tagging\", 200] }, () => PutObjectTaggingRequest$, () => PutObjectTaggingOutput$\n];\nexport var PutPublicAccessBlock$ = [9, n0, _PPAB,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?publicAccessBlock\", 200] }, () => PutPublicAccessBlockRequest$, () => __Unit\n];\nexport var RenameObject$ = [9, n0, _RO,\n { [_h]: [\"PUT\", \"/{Key+}?renameObject\", 200] }, () => RenameObjectRequest$, () => RenameObjectOutput$\n];\nexport var RestoreObject$ = [9, n0, _ROe,\n { [_hC]: \"-\", [_h]: [\"POST\", \"/{Key+}?restore\", 200] }, () => RestoreObjectRequest$, () => RestoreObjectOutput$\n];\nexport var SelectObjectContent$ = [9, n0, _SOC,\n { [_h]: [\"POST\", \"/{Key+}?select&select-type=2\", 200] }, () => SelectObjectContentRequest$, () => SelectObjectContentOutput$\n];\nexport var UpdateBucketMetadataInventoryTableConfiguration$ = [9, n0, _UBMITC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?metadataInventoryTable\", 200] }, () => UpdateBucketMetadataInventoryTableConfigurationRequest$, () => __Unit\n];\nexport var UpdateBucketMetadataJournalTableConfiguration$ = [9, n0, _UBMJTC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?metadataJournalTable\", 200] }, () => UpdateBucketMetadataJournalTableConfigurationRequest$, () => __Unit\n];\nexport var UpdateObjectEncryption$ = [9, n0, _UOE,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?encryption\", 200] }, () => UpdateObjectEncryptionRequest$, () => UpdateObjectEncryptionResponse$\n];\nexport var UploadPart$ = [9, n0, _UP,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?x-id=UploadPart\", 200] }, () => UploadPartRequest$, () => UploadPartOutput$\n];\nexport var UploadPartCopy$ = [9, n0, _UPC,\n { [_h]: [\"PUT\", \"/{Key+}?x-id=UploadPartCopy\", 200] }, () => UploadPartCopyRequest$, () => UploadPartCopyOutput$\n];\nexport var WriteGetObjectResponse$ = [9, n0, _WGOR,\n { [_en]: [\"{RequestRoute}.\"], [_h]: [\"POST\", \"/WriteGetObjectResponse\", 200] }, () => WriteGetObjectResponseRequest$, () => __Unit\n];\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CreateSession$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CreateSessionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n DisableS3ExpressSessionAuth: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"CreateSession\", {})\n .n(\"S3Client\", \"CreateSessionCommand\")\n .sc(CreateSession$)\n .build() {\n}\n", "{\n \"name\": \"@aws-sdk/client-s3\",\n \"description\": \"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native\",\n \"version\": \"3.1009.0\",\n \"scripts\": {\n \"build\": \"concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs\",\n \"build:cjs\": \"node ../../scripts/compilation/inline client-s3\",\n \"build:es\": \"tsc -p tsconfig.es.json\",\n \"build:include:deps\": \"yarn g:turbo run build -F=\\\"$npm_package_name\\\"\",\n \"build:types\": \"tsc -p tsconfig.types.json\",\n \"build:types:downlevel\": \"downlevel-dts dist-types dist-types/ts3.4\",\n \"clean\": \"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo\",\n \"extract:docs\": \"api-extractor run --local\",\n \"generate:client\": \"node ../../scripts/generate-clients/single-service --solo s3\",\n \"test\": \"yarn g:vitest run\",\n \"test:browser\": \"node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.mts\",\n \"test:browser:watch\": \"node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.mts\",\n \"test:e2e\": \"yarn g:vitest run -c vitest.config.e2e.mts && yarn test:browser\",\n \"test:e2e:watch\": \"yarn g:vitest watch -c vitest.config.e2e.mts\",\n \"test:index\": \"tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs\",\n \"test:integration\": \"yarn g:vitest run -c vitest.config.integ.mts\",\n \"test:integration:watch\": \"yarn g:vitest watch -c vitest.config.integ.mts\",\n \"test:watch\": \"yarn g:vitest watch\"\n },\n \"main\": \"./dist-cjs/index.js\",\n \"types\": \"./dist-types/index.d.ts\",\n \"module\": \"./dist-es/index.js\",\n \"sideEffects\": false,\n \"dependencies\": {\n \"@aws-crypto/sha1-browser\": \"5.2.0\",\n \"@aws-crypto/sha256-browser\": \"5.2.0\",\n \"@aws-crypto/sha256-js\": \"5.2.0\",\n \"@aws-sdk/core\": \"^3.973.20\",\n \"@aws-sdk/credential-provider-node\": \"^3.972.21\",\n \"@aws-sdk/middleware-bucket-endpoint\": \"^3.972.8\",\n \"@aws-sdk/middleware-expect-continue\": \"^3.972.8\",\n \"@aws-sdk/middleware-flexible-checksums\": \"^3.973.6\",\n \"@aws-sdk/middleware-host-header\": \"^3.972.8\",\n \"@aws-sdk/middleware-location-constraint\": \"^3.972.8\",\n \"@aws-sdk/middleware-logger\": \"^3.972.8\",\n \"@aws-sdk/middleware-recursion-detection\": \"^3.972.8\",\n \"@aws-sdk/middleware-sdk-s3\": \"^3.972.20\",\n \"@aws-sdk/middleware-ssec\": \"^3.972.8\",\n \"@aws-sdk/middleware-user-agent\": \"^3.972.21\",\n \"@aws-sdk/region-config-resolver\": \"^3.972.8\",\n \"@aws-sdk/signature-v4-multi-region\": \"^3.996.8\",\n \"@aws-sdk/types\": \"^3.973.6\",\n \"@aws-sdk/util-endpoints\": \"^3.996.5\",\n \"@aws-sdk/util-user-agent-browser\": \"^3.972.8\",\n \"@aws-sdk/util-user-agent-node\": \"^3.973.7\",\n \"@smithy/config-resolver\": \"^4.4.11\",\n \"@smithy/core\": \"^3.23.11\",\n \"@smithy/eventstream-serde-browser\": \"^4.2.12\",\n \"@smithy/eventstream-serde-config-resolver\": \"^4.3.12\",\n \"@smithy/eventstream-serde-node\": \"^4.2.12\",\n \"@smithy/fetch-http-handler\": \"^5.3.15\",\n \"@smithy/hash-blob-browser\": \"^4.2.13\",\n \"@smithy/hash-node\": \"^4.2.12\",\n \"@smithy/hash-stream-node\": \"^4.2.12\",\n \"@smithy/invalid-dependency\": \"^4.2.12\",\n \"@smithy/md5-js\": \"^4.2.12\",\n \"@smithy/middleware-content-length\": \"^4.2.12\",\n \"@smithy/middleware-endpoint\": \"^4.4.25\",\n \"@smithy/middleware-retry\": \"^4.4.42\",\n \"@smithy/middleware-serde\": \"^4.2.14\",\n \"@smithy/middleware-stack\": \"^4.2.12\",\n \"@smithy/node-config-provider\": \"^4.3.12\",\n \"@smithy/node-http-handler\": \"^4.4.16\",\n \"@smithy/protocol-http\": \"^5.3.12\",\n \"@smithy/smithy-client\": \"^4.12.5\",\n \"@smithy/types\": \"^4.13.1\",\n \"@smithy/url-parser\": \"^4.2.12\",\n \"@smithy/util-base64\": \"^4.3.2\",\n \"@smithy/util-body-length-browser\": \"^4.2.2\",\n \"@smithy/util-body-length-node\": \"^4.2.3\",\n \"@smithy/util-defaults-mode-browser\": \"^4.3.41\",\n \"@smithy/util-defaults-mode-node\": \"^4.2.44\",\n \"@smithy/util-endpoints\": \"^3.3.3\",\n \"@smithy/util-middleware\": \"^4.2.12\",\n \"@smithy/util-retry\": \"^4.2.12\",\n \"@smithy/util-stream\": \"^4.5.19\",\n \"@smithy/util-utf8\": \"^4.2.2\",\n \"@smithy/util-waiter\": \"^4.2.13\",\n \"tslib\": \"^2.6.2\"\n },\n \"devDependencies\": {\n \"@aws-sdk/signature-v4-crt\": \"3.1009.0\",\n \"@smithy/snapshot-testing\": \"^2.0.2\",\n \"@tsconfig/node20\": \"20.1.8\",\n \"@types/node\": \"^20.14.8\",\n \"concurrently\": \"7.0.0\",\n \"downlevel-dts\": \"0.10.1\",\n \"premove\": \"4.0.0\",\n \"typescript\": \"~5.8.3\",\n \"vitest\": \"^4.0.17\"\n },\n \"engines\": {\n \"node\": \">=20.0.0\"\n },\n \"typesVersions\": {\n \"<4.5\": {\n \"dist-types/*\": [\n \"dist-types/ts3.4/*\"\n ]\n }\n },\n \"files\": [\n \"dist-*/**\"\n ],\n \"author\": {\n \"name\": \"AWS SDK for JavaScript Team\",\n \"url\": \"https://aws.amazon.com/javascript/\"\n },\n \"license\": \"Apache-2.0\",\n \"browser\": {\n \"./dist-es/runtimeConfig\": \"./dist-es/runtimeConfig.browser\"\n },\n \"react-native\": {\n \"./dist-es/runtimeConfig\": \"./dist-es/runtimeConfig.native\"\n },\n \"homepage\": \"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/aws/aws-sdk-js-v3.git\",\n \"directory\": \"clients/client-s3\"\n }\n}\n", "export const fromUtf8 = (input) => new TextEncoder().encode(input);\n", "import { fromUtf8 } from \"./fromUtf8\";\nexport const toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n", "export const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return new TextDecoder(\"utf-8\").decode(input);\n};\n", "export * from \"./fromUtf8\";\nexport * from \"./toUint8Array\";\nexport * from \"./toUtf8\";\n", "import { SourceData } from \"@aws-sdk/types\";\n\nexport function isEmptyData(data: SourceData): boolean {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n\n return data.byteLength === 0;\n}\n", "export const SHA_1_HASH: { name: \"SHA-1\" } = { name: \"SHA-1\" };\n\nexport const SHA_1_HMAC_ALGO: { name: \"HMAC\"; hash: { name: \"SHA-1\" } } = {\n name: \"HMAC\",\n hash: SHA_1_HASH,\n};\n\nexport const EMPTY_DATA_SHA_1 = new Uint8Array([\n 218,\n 57,\n 163,\n 238,\n 94,\n 107,\n 75,\n 13,\n 50,\n 85,\n 191,\n 239,\n 149,\n 96,\n 24,\n 144,\n 175,\n 216,\n 7,\n 9,\n]);\n", "const fallbackWindow = {};\nexport function locateWindow() {\n if (typeof window !== \"undefined\") {\n return window;\n }\n else if (typeof self !== \"undefined\") {\n return self;\n }\n return fallbackWindow;\n}\n", "import { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { fromUtf8 } from \"@smithy/util-utf8\";\nimport { isEmptyData } from \"./isEmptyData\";\nimport { EMPTY_DATA_SHA_1, SHA_1_HASH, SHA_1_HMAC_ALGO } from \"./constants\";\nimport { locateWindow } from \"@aws-sdk/util-locate-window\";\n\nexport class Sha1 implements Checksum {\n private readonly key: Promise | undefined;\n private toHash: Uint8Array = new Uint8Array(0);\n\n constructor(secret?: SourceData) {\n if (secret !== void 0) {\n this.key = new Promise((resolve, reject) => {\n locateWindow()\n .crypto.subtle.importKey(\n \"raw\",\n convertToBuffer(secret),\n SHA_1_HMAC_ALGO,\n false,\n [\"sign\"]\n )\n .then(resolve, reject);\n });\n this.key.catch(() => {});\n }\n }\n\n update(data: SourceData): void {\n if (isEmptyData(data)) {\n return;\n }\n\n const update = convertToBuffer(data);\n const typedArray = new Uint8Array(\n this.toHash.byteLength + update.byteLength\n );\n typedArray.set(this.toHash, 0);\n typedArray.set(update, this.toHash.byteLength);\n this.toHash = typedArray;\n }\n\n digest(): Promise {\n if (this.key) {\n return this.key.then((key) =>\n locateWindow()\n .crypto.subtle.sign(SHA_1_HMAC_ALGO, key, this.toHash)\n .then((data) => new Uint8Array(data))\n );\n }\n\n if (isEmptyData(this.toHash)) {\n return Promise.resolve(EMPTY_DATA_SHA_1);\n }\n\n return Promise.resolve()\n .then(() => locateWindow().crypto.subtle.digest(SHA_1_HASH, this.toHash))\n .then((data) => Promise.resolve(new Uint8Array(data)));\n }\n\n reset(): void {\n this.toHash = new Uint8Array(0);\n }\n}\n\nfunction convertToBuffer(data: SourceData): Uint8Array {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(\n data.buffer,\n data.byteOffset,\n data.byteLength / Uint8Array.BYTES_PER_ELEMENT\n );\n }\n\n return new Uint8Array(data);\n}\n", "type SubtleCryptoMethod =\n | \"decrypt\"\n | \"digest\"\n | \"encrypt\"\n | \"exportKey\"\n | \"generateKey\"\n | \"importKey\"\n | \"sign\"\n | \"verify\";\n\nconst subtleCryptoMethods: Array = [\n \"decrypt\",\n \"digest\",\n \"encrypt\",\n \"exportKey\",\n \"generateKey\",\n \"importKey\",\n \"sign\",\n \"verify\"\n];\n\nexport function supportsWebCrypto(window: Window): boolean {\n if (\n supportsSecureRandom(window) &&\n typeof window.crypto.subtle === \"object\"\n ) {\n const { subtle } = window.crypto;\n\n return supportsSubtleCrypto(subtle);\n }\n\n return false;\n}\n\nexport function supportsSecureRandom(window: Window): boolean {\n if (typeof window === \"object\" && typeof window.crypto === \"object\") {\n const { getRandomValues } = window.crypto;\n\n return typeof getRandomValues === \"function\";\n }\n\n return false;\n}\n\nexport function supportsSubtleCrypto(subtle: SubtleCrypto) {\n return (\n subtle &&\n subtleCryptoMethods.every(\n methodName => typeof subtle[methodName] === \"function\"\n )\n );\n}\n\nexport async function supportsZeroByteGCM(subtle: SubtleCrypto) {\n if (!supportsSubtleCrypto(subtle)) return false;\n try {\n const key = await subtle.generateKey(\n { name: \"AES-GCM\", length: 128 },\n false,\n [\"encrypt\"]\n );\n const zeroByteAuthTag = await subtle.encrypt(\n {\n name: \"AES-GCM\",\n iv: new Uint8Array(Array(12)),\n additionalData: new Uint8Array(Array(16)),\n tagLength: 128\n },\n key,\n new Uint8Array(0)\n );\n return zeroByteAuthTag.byteLength === 16;\n } catch {\n return false;\n }\n}\n", "export * from \"./supportsWebCrypto\";\n", "import { Sha1 as WebCryptoSha1 } from \"./webCryptoSha1\";\nimport { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { supportsWebCrypto } from \"@aws-crypto/supports-web-crypto\";\nimport { locateWindow } from \"@aws-sdk/util-locate-window\";\nimport { convertToBuffer } from \"@aws-crypto/util\";\n\nexport class Sha1 implements Checksum {\n private hash: Checksum;\n\n constructor(secret?: SourceData) {\n if (supportsWebCrypto(locateWindow())) {\n this.hash = new WebCryptoSha1(secret);\n } else {\n throw new Error(\"SHA1 not supported\");\n }\n }\n\n update(data: SourceData, encoding?: \"utf8\" | \"ascii\" | \"latin1\"): void {\n this.hash.update(convertToBuffer(data));\n }\n\n digest(): Promise {\n return this.hash.digest();\n }\n\n reset(): void {\n this.hash.reset();\n }\n}\n", "export * from \"./crossPlatformSha1\";\nexport { Sha1 as WebCryptoSha1 } from \"./webCryptoSha1\";\n", "export const SHA_256_HASH: { name: \"SHA-256\" } = { name: \"SHA-256\" };\n\nexport const SHA_256_HMAC_ALGO: { name: \"HMAC\"; hash: { name: \"SHA-256\" } } = {\n name: \"HMAC\",\n hash: SHA_256_HASH\n};\n\nexport const EMPTY_DATA_SHA_256 = new Uint8Array([\n 227,\n 176,\n 196,\n 66,\n 152,\n 252,\n 28,\n 20,\n 154,\n 251,\n 244,\n 200,\n 153,\n 111,\n 185,\n 36,\n 39,\n 174,\n 65,\n 228,\n 100,\n 155,\n 147,\n 76,\n 164,\n 149,\n 153,\n 27,\n 120,\n 82,\n 184,\n 85\n]);\n", "import { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { isEmptyData, convertToBuffer } from \"@aws-crypto/util\";\nimport {\n EMPTY_DATA_SHA_256,\n SHA_256_HASH,\n SHA_256_HMAC_ALGO,\n} from \"./constants\";\nimport { locateWindow } from \"@aws-sdk/util-locate-window\";\n\nexport class Sha256 implements Checksum {\n private readonly secret?: SourceData;\n private key: Promise | undefined;\n private toHash: Uint8Array = new Uint8Array(0);\n\n constructor(secret?: SourceData) {\n this.secret = secret;\n this.reset();\n }\n\n update(data: SourceData): void {\n if (isEmptyData(data)) {\n return;\n }\n\n const update = convertToBuffer(data);\n const typedArray = new Uint8Array(\n this.toHash.byteLength + update.byteLength\n );\n typedArray.set(this.toHash, 0);\n typedArray.set(update, this.toHash.byteLength);\n this.toHash = typedArray;\n }\n\n digest(): Promise {\n if (this.key) {\n return this.key.then((key) =>\n locateWindow()\n .crypto.subtle.sign(SHA_256_HMAC_ALGO, key, this.toHash)\n .then((data) => new Uint8Array(data))\n );\n }\n\n if (isEmptyData(this.toHash)) {\n return Promise.resolve(EMPTY_DATA_SHA_256);\n }\n\n return Promise.resolve()\n .then(() =>\n locateWindow().crypto.subtle.digest(SHA_256_HASH, this.toHash)\n )\n .then((data) => Promise.resolve(new Uint8Array(data)));\n }\n\n reset(): void {\n this.toHash = new Uint8Array(0);\n if (this.secret && this.secret !== void 0) {\n this.key = new Promise((resolve, reject) => {\n locateWindow()\n .crypto.subtle.importKey(\n \"raw\",\n convertToBuffer(this.secret as SourceData),\n SHA_256_HMAC_ALGO,\n false,\n [\"sign\"]\n )\n .then(resolve, reject);\n });\n this.key.catch(() => {});\n }\n }\n}\n", "/**\n * @internal\n */\nexport const BLOCK_SIZE: number = 64;\n\n/**\n * @internal\n */\nexport const DIGEST_LENGTH: number = 32;\n\n/**\n * @internal\n */\nexport const KEY = new Uint32Array([\n 0x428a2f98,\n 0x71374491,\n 0xb5c0fbcf,\n 0xe9b5dba5,\n 0x3956c25b,\n 0x59f111f1,\n 0x923f82a4,\n 0xab1c5ed5,\n 0xd807aa98,\n 0x12835b01,\n 0x243185be,\n 0x550c7dc3,\n 0x72be5d74,\n 0x80deb1fe,\n 0x9bdc06a7,\n 0xc19bf174,\n 0xe49b69c1,\n 0xefbe4786,\n 0x0fc19dc6,\n 0x240ca1cc,\n 0x2de92c6f,\n 0x4a7484aa,\n 0x5cb0a9dc,\n 0x76f988da,\n 0x983e5152,\n 0xa831c66d,\n 0xb00327c8,\n 0xbf597fc7,\n 0xc6e00bf3,\n 0xd5a79147,\n 0x06ca6351,\n 0x14292967,\n 0x27b70a85,\n 0x2e1b2138,\n 0x4d2c6dfc,\n 0x53380d13,\n 0x650a7354,\n 0x766a0abb,\n 0x81c2c92e,\n 0x92722c85,\n 0xa2bfe8a1,\n 0xa81a664b,\n 0xc24b8b70,\n 0xc76c51a3,\n 0xd192e819,\n 0xd6990624,\n 0xf40e3585,\n 0x106aa070,\n 0x19a4c116,\n 0x1e376c08,\n 0x2748774c,\n 0x34b0bcb5,\n 0x391c0cb3,\n 0x4ed8aa4a,\n 0x5b9cca4f,\n 0x682e6ff3,\n 0x748f82ee,\n 0x78a5636f,\n 0x84c87814,\n 0x8cc70208,\n 0x90befffa,\n 0xa4506ceb,\n 0xbef9a3f7,\n 0xc67178f2\n]);\n\n/**\n * @internal\n */\nexport const INIT = [\n 0x6a09e667,\n 0xbb67ae85,\n 0x3c6ef372,\n 0xa54ff53a,\n 0x510e527f,\n 0x9b05688c,\n 0x1f83d9ab,\n 0x5be0cd19\n];\n\n/**\n * @internal\n */\nexport const MAX_HASHABLE_LENGTH = 2 ** 53 - 1;\n", "import {\n BLOCK_SIZE,\n DIGEST_LENGTH,\n INIT,\n KEY,\n MAX_HASHABLE_LENGTH\n} from \"./constants\";\n\n/**\n * @internal\n */\nexport class RawSha256 {\n private state: Int32Array = Int32Array.from(INIT);\n private temp: Int32Array = new Int32Array(64);\n private buffer: Uint8Array = new Uint8Array(64);\n private bufferLength: number = 0;\n private bytesHashed: number = 0;\n\n /**\n * @internal\n */\n finished: boolean = false;\n\n update(data: Uint8Array): void {\n if (this.finished) {\n throw new Error(\"Attempted to update an already finished hash.\");\n }\n\n let position = 0;\n let { byteLength } = data;\n this.bytesHashed += byteLength;\n\n if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) {\n throw new Error(\"Cannot hash more than 2^53 - 1 bits\");\n }\n\n while (byteLength > 0) {\n this.buffer[this.bufferLength++] = data[position++];\n byteLength--;\n\n if (this.bufferLength === BLOCK_SIZE) {\n this.hashBuffer();\n this.bufferLength = 0;\n }\n }\n }\n\n digest(): Uint8Array {\n if (!this.finished) {\n const bitsHashed = this.bytesHashed * 8;\n const bufferView = new DataView(\n this.buffer.buffer,\n this.buffer.byteOffset,\n this.buffer.byteLength\n );\n\n const undecoratedLength = this.bufferLength;\n bufferView.setUint8(this.bufferLength++, 0x80);\n\n // Ensure the final block has enough room for the hashed length\n if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) {\n for (let i = this.bufferLength; i < BLOCK_SIZE; i++) {\n bufferView.setUint8(i, 0);\n }\n this.hashBuffer();\n this.bufferLength = 0;\n }\n\n for (let i = this.bufferLength; i < BLOCK_SIZE - 8; i++) {\n bufferView.setUint8(i, 0);\n }\n bufferView.setUint32(\n BLOCK_SIZE - 8,\n Math.floor(bitsHashed / 0x100000000),\n true\n );\n bufferView.setUint32(BLOCK_SIZE - 4, bitsHashed);\n\n this.hashBuffer();\n\n this.finished = true;\n }\n\n // The value in state is little-endian rather than big-endian, so flip\n // each word into a new Uint8Array\n const out = new Uint8Array(DIGEST_LENGTH);\n for (let i = 0; i < 8; i++) {\n out[i * 4] = (this.state[i] >>> 24) & 0xff;\n out[i * 4 + 1] = (this.state[i] >>> 16) & 0xff;\n out[i * 4 + 2] = (this.state[i] >>> 8) & 0xff;\n out[i * 4 + 3] = (this.state[i] >>> 0) & 0xff;\n }\n\n return out;\n }\n\n private hashBuffer(): void {\n const { buffer, state } = this;\n\n let state0 = state[0],\n state1 = state[1],\n state2 = state[2],\n state3 = state[3],\n state4 = state[4],\n state5 = state[5],\n state6 = state[6],\n state7 = state[7];\n\n for (let i = 0; i < BLOCK_SIZE; i++) {\n if (i < 16) {\n this.temp[i] =\n ((buffer[i * 4] & 0xff) << 24) |\n ((buffer[i * 4 + 1] & 0xff) << 16) |\n ((buffer[i * 4 + 2] & 0xff) << 8) |\n (buffer[i * 4 + 3] & 0xff);\n } else {\n let u = this.temp[i - 2];\n const t1 =\n ((u >>> 17) | (u << 15)) ^ ((u >>> 19) | (u << 13)) ^ (u >>> 10);\n\n u = this.temp[i - 15];\n const t2 =\n ((u >>> 7) | (u << 25)) ^ ((u >>> 18) | (u << 14)) ^ (u >>> 3);\n\n this.temp[i] =\n ((t1 + this.temp[i - 7]) | 0) + ((t2 + this.temp[i - 16]) | 0);\n }\n\n const t1 =\n ((((((state4 >>> 6) | (state4 << 26)) ^\n ((state4 >>> 11) | (state4 << 21)) ^\n ((state4 >>> 25) | (state4 << 7))) +\n ((state4 & state5) ^ (~state4 & state6))) |\n 0) +\n ((state7 + ((KEY[i] + this.temp[i]) | 0)) | 0)) |\n 0;\n\n const t2 =\n ((((state0 >>> 2) | (state0 << 30)) ^\n ((state0 >>> 13) | (state0 << 19)) ^\n ((state0 >>> 22) | (state0 << 10))) +\n ((state0 & state1) ^ (state0 & state2) ^ (state1 & state2))) |\n 0;\n\n state7 = state6;\n state6 = state5;\n state5 = state4;\n state4 = (state3 + t1) | 0;\n state3 = state2;\n state2 = state1;\n state1 = state0;\n state0 = (t1 + t2) | 0;\n }\n\n state[0] += state0;\n state[1] += state1;\n state[2] += state2;\n state[3] += state3;\n state[4] += state4;\n state[5] += state5;\n state[6] += state6;\n state[7] += state7;\n }\n}\n", "import { BLOCK_SIZE } from \"./constants\";\nimport { RawSha256 } from \"./RawSha256\";\nimport { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { isEmptyData, convertToBuffer } from \"@aws-crypto/util\";\n\nexport class Sha256 implements Checksum {\n private readonly secret?: SourceData;\n private hash: RawSha256;\n private outer?: RawSha256;\n private error: any;\n\n constructor(secret?: SourceData) {\n this.secret = secret;\n this.hash = new RawSha256();\n this.reset();\n }\n\n update(toHash: SourceData): void {\n if (isEmptyData(toHash) || this.error) {\n return;\n }\n\n try {\n this.hash.update(convertToBuffer(toHash));\n } catch (e) {\n this.error = e;\n }\n }\n\n /* This synchronous method keeps compatibility\n * with the v2 aws-sdk.\n */\n digestSync(): Uint8Array {\n if (this.error) {\n throw this.error;\n }\n\n if (this.outer) {\n if (!this.outer.finished) {\n this.outer.update(this.hash.digest());\n }\n\n return this.outer.digest();\n }\n\n return this.hash.digest();\n }\n\n /* The underlying digest method here is synchronous.\n * To keep the same interface with the other hash functions\n * the default is to expose this as an async method.\n * However, it can sometimes be useful to have a sync method.\n */\n async digest(): Promise {\n return this.digestSync();\n }\n\n reset(): void {\n this.hash = new RawSha256();\n if (this.secret) {\n this.outer = new RawSha256();\n const inner = bufferFromSecret(this.secret);\n const outer = new Uint8Array(BLOCK_SIZE);\n outer.set(inner);\n\n for (let i = 0; i < BLOCK_SIZE; i++) {\n inner[i] ^= 0x36;\n outer[i] ^= 0x5c;\n }\n\n this.hash.update(inner);\n this.outer.update(outer);\n\n // overwrite the copied key in memory\n for (let i = 0; i < inner.byteLength; i++) {\n inner[i] = 0;\n }\n }\n }\n}\n\nfunction bufferFromSecret(secret: SourceData): Uint8Array {\n let input = convertToBuffer(secret);\n\n if (input.byteLength > BLOCK_SIZE) {\n const bufferHash = new RawSha256();\n bufferHash.update(input);\n input = bufferHash.digest();\n }\n\n const buffer = new Uint8Array(BLOCK_SIZE);\n buffer.set(input);\n return buffer;\n}\n", "export * from \"./jsSha256\";\n", "import { Sha256 as WebCryptoSha256 } from \"./webCryptoSha256\";\nimport { Sha256 as JsSha256 } from \"@aws-crypto/sha256-js\";\nimport { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { supportsWebCrypto } from \"@aws-crypto/supports-web-crypto\";\nimport { locateWindow } from \"@aws-sdk/util-locate-window\";\nimport { convertToBuffer } from \"@aws-crypto/util\";\n\nexport class Sha256 implements Checksum {\n private hash: Checksum;\n\n constructor(secret?: SourceData) {\n if (supportsWebCrypto(locateWindow())) {\n this.hash = new WebCryptoSha256(secret);\n } else {\n this.hash = new JsSha256(secret);\n }\n }\n\n update(data: SourceData, encoding?: \"utf8\" | \"ascii\" | \"latin1\"): void {\n this.hash.update(convertToBuffer(data));\n }\n\n digest(): Promise {\n return this.hash.digest();\n }\n\n reset(): void {\n this.hash.reset();\n }\n}\n", "export * from \"./crossPlatformSha256\";\nexport { Sha256 as WebCryptoSha256 } from \"./webCryptoSha256\";\n", "export { createUserAgentStringParsingProvider } from \"./createUserAgentStringParsingProvider\";\nexport const createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => async (config) => {\n const navigator = typeof window !== \"undefined\" ? window.navigator : undefined;\n const uaString = navigator?.userAgent ?? \"\";\n const osName = navigator?.userAgentData?.platform ?? fallback.os(uaString) ?? \"other\";\n const osVersion = undefined;\n const brands = navigator?.userAgentData?.brands ?? [];\n const brand = brands[brands.length - 1];\n const browserName = brand?.brand ?? fallback.browser(uaString) ?? \"unknown\";\n const browserVersion = brand?.version ?? \"unknown\";\n const sections = [\n [\"aws-sdk-js\", clientVersion],\n [\"ua\", \"2.1\"],\n [`os/${osName}`, osVersion],\n [\"lang/js\"],\n [\"md/browser\", `${browserName}_${browserVersion}`],\n ];\n if (serviceId) {\n sections.push([`api/${serviceId}`, clientVersion]);\n }\n const appId = await config?.userAgentAppId?.();\n if (appId) {\n sections.push([`app/${appId}`]);\n }\n return sections;\n};\nexport const fallback = {\n os(ua) {\n if (/iPhone|iPad|iPod/.test(ua))\n return \"iOS\";\n if (/Macintosh|Mac OS X/.test(ua))\n return \"macOS\";\n if (/Windows NT/.test(ua))\n return \"Windows\";\n if (/Android/.test(ua))\n return \"Android\";\n if (/Linux/.test(ua))\n return \"Linux\";\n return undefined;\n },\n browser(ua) {\n if (/EdgiOS|EdgA|Edg\\//.test(ua))\n return \"Microsoft Edge\";\n if (/Firefox\\//.test(ua))\n return \"Firefox\";\n if (/Chrome\\//.test(ua))\n return \"Chrome\";\n if (/Safari\\//.test(ua))\n return \"Safari\";\n return undefined;\n },\n};\nexport const defaultUserAgent = createDefaultUserAgentProvider;\n", "import { toHex } from \"@smithy/util-hex-encoding\";\nexport class Int64 {\n bytes;\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static fromNumber(number) {\n if (number > 9_223_372_036_854_775_807 || number < -9_223_372_036_854_775_808) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new Int64(bytes);\n }\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 0b10000000;\n if (negative) {\n negate(bytes);\n }\n return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n}\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 0xff;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n", "import { fromHex, toHex } from \"@smithy/util-hex-encoding\";\nimport { Int64 } from \"./Int64\";\nexport class HeaderMarshaller {\n toUtf8;\n fromUtf8;\n constructor(toUtf8, fromUtf8) {\n this.toUtf8 = toUtf8;\n this.fromUtf8 = fromUtf8;\n }\n format(headers) {\n const chunks = [];\n for (const headerName of Object.keys(headers)) {\n const bytes = this.fromUtf8(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? 0 : 1]);\n case \"byte\":\n return Uint8Array.from([2, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, 3);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, 4);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = 5;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, 6);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = this.fromUtf8(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, 7);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = 8;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = 9;\n uuidBytes.set(fromHex(header.value.replace(/\\-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n parse(headers) {\n const out = {};\n let position = 0;\n while (position < headers.byteLength) {\n const nameLength = headers.getUint8(position++);\n const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));\n position += nameLength;\n switch (headers.getUint8(position++)) {\n case 0:\n out[name] = {\n type: BOOLEAN_TAG,\n value: true,\n };\n break;\n case 1:\n out[name] = {\n type: BOOLEAN_TAG,\n value: false,\n };\n break;\n case 2:\n out[name] = {\n type: BYTE_TAG,\n value: headers.getInt8(position++),\n };\n break;\n case 3:\n out[name] = {\n type: SHORT_TAG,\n value: headers.getInt16(position, false),\n };\n position += 2;\n break;\n case 4:\n out[name] = {\n type: INT_TAG,\n value: headers.getInt32(position, false),\n };\n position += 4;\n break;\n case 5:\n out[name] = {\n type: LONG_TAG,\n value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)),\n };\n position += 8;\n break;\n case 6:\n const binaryLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: BINARY_TAG,\n value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength),\n };\n position += binaryLength;\n break;\n case 7:\n const stringLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: STRING_TAG,\n value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)),\n };\n position += stringLength;\n break;\n case 8:\n out[name] = {\n type: TIMESTAMP_TAG,\n value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()),\n };\n position += 8;\n break;\n case 9:\n const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);\n position += 16;\n out[name] = {\n type: UUID_TAG,\n value: `${toHex(uuidBytes.subarray(0, 4))}-${toHex(uuidBytes.subarray(4, 6))}-${toHex(uuidBytes.subarray(6, 8))}-${toHex(uuidBytes.subarray(8, 10))}-${toHex(uuidBytes.subarray(10))}`,\n };\n break;\n default:\n throw new Error(`Unrecognized header type tag`);\n }\n }\n return out;\n }\n}\nvar HEADER_VALUE_TYPE;\n(function (HEADER_VALUE_TYPE) {\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolTrue\"] = 0] = \"boolTrue\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolFalse\"] = 1] = \"boolFalse\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byte\"] = 2] = \"byte\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"short\"] = 3] = \"short\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"integer\"] = 4] = \"integer\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"long\"] = 5] = \"long\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byteArray\"] = 6] = \"byteArray\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"string\"] = 7] = \"string\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"timestamp\"] = 8] = \"timestamp\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"uuid\"] = 9] = \"uuid\";\n})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));\nconst BOOLEAN_TAG = \"boolean\";\nconst BYTE_TAG = \"byte\";\nconst SHORT_TAG = \"short\";\nconst INT_TAG = \"integer\";\nconst LONG_TAG = \"long\";\nconst BINARY_TAG = \"binary\";\nconst STRING_TAG = \"string\";\nconst TIMESTAMP_TAG = \"timestamp\";\nconst UUID_TAG = \"uuid\";\nconst UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\n", "import { Crc32 } from \"@aws-crypto/crc32\";\nconst PRELUDE_MEMBER_LENGTH = 4;\nconst PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;\nconst CHECKSUM_LENGTH = 4;\nconst MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;\nexport function splitMessage({ byteLength, byteOffset, buffer }) {\n if (byteLength < MINIMUM_MESSAGE_LENGTH) {\n throw new Error(\"Provided message too short to accommodate event stream message overhead\");\n }\n const view = new DataView(buffer, byteOffset, byteLength);\n const messageLength = view.getUint32(0, false);\n if (byteLength !== messageLength) {\n throw new Error(\"Reported message length does not match received message length\");\n }\n const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);\n const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);\n const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);\n const checksummer = new Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH));\n if (expectedPreludeChecksum !== checksummer.digest()) {\n throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`);\n }\n checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)));\n if (expectedMessageChecksum !== checksummer.digest()) {\n throw new Error(`The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`);\n }\n return {\n headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength),\n body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)),\n };\n}\n", "import { Crc32 } from \"@aws-crypto/crc32\";\nimport { HeaderMarshaller } from \"./HeaderMarshaller\";\nimport { splitMessage } from \"./splitMessage\";\nexport class EventStreamCodec {\n headerMarshaller;\n messageBuffer;\n isEndOfStream;\n constructor(toUtf8, fromUtf8) {\n this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8);\n this.messageBuffer = [];\n this.isEndOfStream = false;\n }\n feed(message) {\n this.messageBuffer.push(this.decode(message));\n }\n endOfStream() {\n this.isEndOfStream = true;\n }\n getMessage() {\n const message = this.messageBuffer.pop();\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessage() {\n return message;\n },\n isEndOfStream() {\n return isEndOfStream;\n },\n };\n }\n getAvailableMessages() {\n const messages = this.messageBuffer;\n this.messageBuffer = [];\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessages() {\n return messages;\n },\n isEndOfStream() {\n return isEndOfStream;\n },\n };\n }\n encode({ headers: rawHeaders, body }) {\n const headers = this.headerMarshaller.format(rawHeaders);\n const length = headers.byteLength + body.byteLength + 16;\n const out = new Uint8Array(length);\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n const checksum = new Crc32();\n view.setUint32(0, length, false);\n view.setUint32(4, headers.byteLength, false);\n view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false);\n out.set(headers, 12);\n out.set(body, headers.byteLength + 12);\n view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false);\n return out;\n }\n decode(message) {\n const { headers, body } = splitMessage(message);\n return { headers: this.headerMarshaller.parse(headers), body };\n }\n formatHeaders(rawHeaders) {\n return this.headerMarshaller.format(rawHeaders);\n }\n}\n", "export {};\n", "export class MessageDecoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const bytes of this.options.inputStream) {\n const decoded = this.options.decoder.decode(bytes);\n yield decoded;\n }\n }\n}\n", "export class MessageEncoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const msg of this.options.messageStream) {\n const encoded = this.options.encoder.encode(msg);\n yield encoded;\n }\n if (this.options.includeEndFrame) {\n yield new Uint8Array(0);\n }\n }\n}\n", "export class SmithyMessageDecoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const message of this.options.messageStream) {\n const deserialized = await this.options.deserializer(message);\n if (deserialized === undefined)\n continue;\n yield deserialized;\n }\n }\n}\n", "export class SmithyMessageEncoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const chunk of this.options.inputStream) {\n const payloadBuf = this.options.serializer(chunk);\n yield payloadBuf;\n }\n }\n}\n", "export * from \"./EventStreamCodec\";\nexport * from \"./HeaderMarshaller\";\nexport * from \"./Int64\";\nexport * from \"./Message\";\nexport * from \"./MessageDecoderStream\";\nexport * from \"./MessageEncoderStream\";\nexport * from \"./SmithyMessageDecoderStream\";\nexport * from \"./SmithyMessageEncoderStream\";\n", "export function getChunkedStream(source) {\n let currentMessageTotalLength = 0;\n let currentMessagePendingLength = 0;\n let currentMessage = null;\n let messageLengthBuffer = null;\n const allocateMessage = (size) => {\n if (typeof size !== \"number\") {\n throw new Error(\"Attempted to allocate an event message where size was not a number: \" + size);\n }\n currentMessageTotalLength = size;\n currentMessagePendingLength = 4;\n currentMessage = new Uint8Array(size);\n const currentMessageView = new DataView(currentMessage.buffer);\n currentMessageView.setUint32(0, size, false);\n };\n const iterator = async function* () {\n const sourceIterator = source[Symbol.asyncIterator]();\n while (true) {\n const { value, done } = await sourceIterator.next();\n if (done) {\n if (!currentMessageTotalLength) {\n return;\n }\n else if (currentMessageTotalLength === currentMessagePendingLength) {\n yield currentMessage;\n }\n else {\n throw new Error(\"Truncated event message received.\");\n }\n return;\n }\n const chunkLength = value.length;\n let currentOffset = 0;\n while (currentOffset < chunkLength) {\n if (!currentMessage) {\n const bytesRemaining = chunkLength - currentOffset;\n if (!messageLengthBuffer) {\n messageLengthBuffer = new Uint8Array(4);\n }\n const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining);\n messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength);\n currentMessagePendingLength += numBytesForTotal;\n currentOffset += numBytesForTotal;\n if (currentMessagePendingLength < 4) {\n break;\n }\n allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false));\n messageLengthBuffer = null;\n }\n const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset);\n currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength);\n currentMessagePendingLength += numBytesToWrite;\n currentOffset += numBytesToWrite;\n if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) {\n yield currentMessage;\n currentMessage = null;\n currentMessageTotalLength = 0;\n currentMessagePendingLength = 0;\n }\n }\n }\n };\n return {\n [Symbol.asyncIterator]: iterator,\n };\n}\n", "export function getUnmarshalledStream(source, options) {\n const messageUnmarshaller = getMessageUnmarshaller(options.deserializer, options.toUtf8);\n return {\n [Symbol.asyncIterator]: async function* () {\n for await (const chunk of source) {\n const message = options.eventStreamCodec.decode(chunk);\n const type = await messageUnmarshaller(message);\n if (type === undefined)\n continue;\n yield type;\n }\n },\n };\n}\nexport function getMessageUnmarshaller(deserializer, toUtf8) {\n return async function (message) {\n const { value: messageType } = message.headers[\":message-type\"];\n if (messageType === \"error\") {\n const unmodeledError = new Error(message.headers[\":error-message\"].value || \"UnknownError\");\n unmodeledError.name = message.headers[\":error-code\"].value;\n throw unmodeledError;\n }\n else if (messageType === \"exception\") {\n const code = message.headers[\":exception-type\"].value;\n const exception = { [code]: message };\n const deserializedException = await deserializer(exception);\n if (deserializedException.$unknown) {\n const error = new Error(toUtf8(message.body));\n error.name = code;\n throw error;\n }\n throw deserializedException[code];\n }\n else if (messageType === \"event\") {\n const event = {\n [message.headers[\":event-type\"].value]: message,\n };\n const deserialized = await deserializer(event);\n if (deserialized.$unknown)\n return;\n return deserialized;\n }\n else {\n throw Error(`Unrecognizable event type: ${message.headers[\":event-type\"].value}`);\n }\n };\n}\n", "import { EventStreamCodec, MessageDecoderStream, MessageEncoderStream, SmithyMessageDecoderStream, SmithyMessageEncoderStream, } from \"@smithy/eventstream-codec\";\nimport { getChunkedStream } from \"./getChunkedStream\";\nimport { getMessageUnmarshaller } from \"./getUnmarshalledStream\";\nexport class EventStreamMarshaller {\n eventStreamCodec;\n utfEncoder;\n constructor({ utf8Encoder, utf8Decoder }) {\n this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder);\n this.utfEncoder = utf8Encoder;\n }\n deserialize(body, deserializer) {\n const inputStream = getChunkedStream(body);\n return new SmithyMessageDecoderStream({\n messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }),\n deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder),\n });\n }\n serialize(inputStream, serializer) {\n return new MessageEncoderStream({\n messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }),\n encoder: this.eventStreamCodec,\n includeEndFrame: true,\n });\n }\n}\n", "import { EventStreamMarshaller } from \"./EventStreamMarshaller\";\nexport const eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);\n", "export * from \"./EventStreamMarshaller\";\nexport * from \"./provider\";\n", "export const readableStreamtoIterable = (readableStream) => ({\n [Symbol.asyncIterator]: async function* () {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done)\n return;\n yield value;\n }\n }\n finally {\n reader.releaseLock();\n }\n },\n});\nexport const iterableToReadableStream = (asyncIterable) => {\n const iterator = asyncIterable[Symbol.asyncIterator]();\n return new ReadableStream({\n async pull(controller) {\n const { done, value } = await iterator.next();\n if (done) {\n return controller.close();\n }\n controller.enqueue(value);\n },\n });\n};\n", "import { EventStreamMarshaller as UniversalEventStreamMarshaller } from \"@smithy/eventstream-serde-universal\";\nimport { iterableToReadableStream, readableStreamtoIterable } from \"./utils\";\nexport class EventStreamMarshaller {\n universalMarshaller;\n constructor({ utf8Encoder, utf8Decoder }) {\n this.universalMarshaller = new UniversalEventStreamMarshaller({\n utf8Decoder,\n utf8Encoder,\n });\n }\n deserialize(body, deserializer) {\n const bodyIterable = isReadableStream(body) ? readableStreamtoIterable(body) : body;\n return this.universalMarshaller.deserialize(bodyIterable, deserializer);\n }\n serialize(input, serializer) {\n const serialziedIterable = this.universalMarshaller.serialize(input, serializer);\n return typeof ReadableStream === \"function\" ? iterableToReadableStream(serialziedIterable) : serialziedIterable;\n }\n}\nconst isReadableStream = (body) => typeof ReadableStream === \"function\" && body instanceof ReadableStream;\n", "import { EventStreamMarshaller } from \"./EventStreamMarshaller\";\nexport const eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);\n", "export * from \"./EventStreamMarshaller\";\nexport * from \"./provider\";\nexport * from \"./utils\";\n", "export async function blobReader(blob, onChunk, chunkSize = 1024 * 1024) {\n const size = blob.size;\n let totalBytesRead = 0;\n while (totalBytesRead < size) {\n const slice = blob.slice(totalBytesRead, Math.min(size, totalBytesRead + chunkSize));\n onChunk(new Uint8Array(await slice.arrayBuffer()));\n totalBytesRead += slice.size;\n }\n}\n", "import { blobReader } from \"@smithy/chunked-blob-reader\";\nexport const blobHasher = async function blobHasher(hashCtor, blob) {\n const hash = new hashCtor();\n await blobReader(blob, (chunk) => {\n hash.update(chunk);\n });\n return hash.digest();\n};\n", "export const invalidFunction = (message) => () => {\n throw new Error(message);\n};\n", "export const invalidProvider = (message) => () => Promise.reject(message);\n", "export * from \"./invalidFunction\";\nexport * from \"./invalidProvider\";\n", "export const BLOCK_SIZE = 64;\nexport const DIGEST_LENGTH = 16;\nexport const INIT = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476];\n", "import { fromUtf8 } from \"@smithy/util-utf8\";\nimport { BLOCK_SIZE, DIGEST_LENGTH, INIT } from \"./constants\";\nexport class Md5 {\n state;\n buffer;\n bufferLength;\n bytesHashed;\n finished;\n constructor() {\n this.reset();\n }\n update(sourceData) {\n if (isEmptyData(sourceData)) {\n return;\n }\n else if (this.finished) {\n throw new Error(\"Attempted to update an already finished hash.\");\n }\n const data = convertToBuffer(sourceData);\n let position = 0;\n let { byteLength } = data;\n this.bytesHashed += byteLength;\n while (byteLength > 0) {\n this.buffer.setUint8(this.bufferLength++, data[position++]);\n byteLength--;\n if (this.bufferLength === BLOCK_SIZE) {\n this.hashBuffer();\n this.bufferLength = 0;\n }\n }\n }\n async digest() {\n if (!this.finished) {\n const { buffer, bufferLength: undecoratedLength, bytesHashed } = this;\n const bitsHashed = bytesHashed * 8;\n buffer.setUint8(this.bufferLength++, 0b10000000);\n if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) {\n for (let i = this.bufferLength; i < BLOCK_SIZE; i++) {\n buffer.setUint8(i, 0);\n }\n this.hashBuffer();\n this.bufferLength = 0;\n }\n for (let i = this.bufferLength; i < BLOCK_SIZE - 8; i++) {\n buffer.setUint8(i, 0);\n }\n buffer.setUint32(BLOCK_SIZE - 8, bitsHashed >>> 0, true);\n buffer.setUint32(BLOCK_SIZE - 4, Math.floor(bitsHashed / 0x100000000), true);\n this.hashBuffer();\n this.finished = true;\n }\n const out = new DataView(new ArrayBuffer(DIGEST_LENGTH));\n for (let i = 0; i < 4; i++) {\n out.setUint32(i * 4, this.state[i], true);\n }\n return new Uint8Array(out.buffer, out.byteOffset, out.byteLength);\n }\n hashBuffer() {\n const { buffer, state } = this;\n let a = state[0], b = state[1], c = state[2], d = state[3];\n a = ff(a, b, c, d, buffer.getUint32(0, true), 7, 0xd76aa478);\n d = ff(d, a, b, c, buffer.getUint32(4, true), 12, 0xe8c7b756);\n c = ff(c, d, a, b, buffer.getUint32(8, true), 17, 0x242070db);\n b = ff(b, c, d, a, buffer.getUint32(12, true), 22, 0xc1bdceee);\n a = ff(a, b, c, d, buffer.getUint32(16, true), 7, 0xf57c0faf);\n d = ff(d, a, b, c, buffer.getUint32(20, true), 12, 0x4787c62a);\n c = ff(c, d, a, b, buffer.getUint32(24, true), 17, 0xa8304613);\n b = ff(b, c, d, a, buffer.getUint32(28, true), 22, 0xfd469501);\n a = ff(a, b, c, d, buffer.getUint32(32, true), 7, 0x698098d8);\n d = ff(d, a, b, c, buffer.getUint32(36, true), 12, 0x8b44f7af);\n c = ff(c, d, a, b, buffer.getUint32(40, true), 17, 0xffff5bb1);\n b = ff(b, c, d, a, buffer.getUint32(44, true), 22, 0x895cd7be);\n a = ff(a, b, c, d, buffer.getUint32(48, true), 7, 0x6b901122);\n d = ff(d, a, b, c, buffer.getUint32(52, true), 12, 0xfd987193);\n c = ff(c, d, a, b, buffer.getUint32(56, true), 17, 0xa679438e);\n b = ff(b, c, d, a, buffer.getUint32(60, true), 22, 0x49b40821);\n a = gg(a, b, c, d, buffer.getUint32(4, true), 5, 0xf61e2562);\n d = gg(d, a, b, c, buffer.getUint32(24, true), 9, 0xc040b340);\n c = gg(c, d, a, b, buffer.getUint32(44, true), 14, 0x265e5a51);\n b = gg(b, c, d, a, buffer.getUint32(0, true), 20, 0xe9b6c7aa);\n a = gg(a, b, c, d, buffer.getUint32(20, true), 5, 0xd62f105d);\n d = gg(d, a, b, c, buffer.getUint32(40, true), 9, 0x02441453);\n c = gg(c, d, a, b, buffer.getUint32(60, true), 14, 0xd8a1e681);\n b = gg(b, c, d, a, buffer.getUint32(16, true), 20, 0xe7d3fbc8);\n a = gg(a, b, c, d, buffer.getUint32(36, true), 5, 0x21e1cde6);\n d = gg(d, a, b, c, buffer.getUint32(56, true), 9, 0xc33707d6);\n c = gg(c, d, a, b, buffer.getUint32(12, true), 14, 0xf4d50d87);\n b = gg(b, c, d, a, buffer.getUint32(32, true), 20, 0x455a14ed);\n a = gg(a, b, c, d, buffer.getUint32(52, true), 5, 0xa9e3e905);\n d = gg(d, a, b, c, buffer.getUint32(8, true), 9, 0xfcefa3f8);\n c = gg(c, d, a, b, buffer.getUint32(28, true), 14, 0x676f02d9);\n b = gg(b, c, d, a, buffer.getUint32(48, true), 20, 0x8d2a4c8a);\n a = hh(a, b, c, d, buffer.getUint32(20, true), 4, 0xfffa3942);\n d = hh(d, a, b, c, buffer.getUint32(32, true), 11, 0x8771f681);\n c = hh(c, d, a, b, buffer.getUint32(44, true), 16, 0x6d9d6122);\n b = hh(b, c, d, a, buffer.getUint32(56, true), 23, 0xfde5380c);\n a = hh(a, b, c, d, buffer.getUint32(4, true), 4, 0xa4beea44);\n d = hh(d, a, b, c, buffer.getUint32(16, true), 11, 0x4bdecfa9);\n c = hh(c, d, a, b, buffer.getUint32(28, true), 16, 0xf6bb4b60);\n b = hh(b, c, d, a, buffer.getUint32(40, true), 23, 0xbebfbc70);\n a = hh(a, b, c, d, buffer.getUint32(52, true), 4, 0x289b7ec6);\n d = hh(d, a, b, c, buffer.getUint32(0, true), 11, 0xeaa127fa);\n c = hh(c, d, a, b, buffer.getUint32(12, true), 16, 0xd4ef3085);\n b = hh(b, c, d, a, buffer.getUint32(24, true), 23, 0x04881d05);\n a = hh(a, b, c, d, buffer.getUint32(36, true), 4, 0xd9d4d039);\n d = hh(d, a, b, c, buffer.getUint32(48, true), 11, 0xe6db99e5);\n c = hh(c, d, a, b, buffer.getUint32(60, true), 16, 0x1fa27cf8);\n b = hh(b, c, d, a, buffer.getUint32(8, true), 23, 0xc4ac5665);\n a = ii(a, b, c, d, buffer.getUint32(0, true), 6, 0xf4292244);\n d = ii(d, a, b, c, buffer.getUint32(28, true), 10, 0x432aff97);\n c = ii(c, d, a, b, buffer.getUint32(56, true), 15, 0xab9423a7);\n b = ii(b, c, d, a, buffer.getUint32(20, true), 21, 0xfc93a039);\n a = ii(a, b, c, d, buffer.getUint32(48, true), 6, 0x655b59c3);\n d = ii(d, a, b, c, buffer.getUint32(12, true), 10, 0x8f0ccc92);\n c = ii(c, d, a, b, buffer.getUint32(40, true), 15, 0xffeff47d);\n b = ii(b, c, d, a, buffer.getUint32(4, true), 21, 0x85845dd1);\n a = ii(a, b, c, d, buffer.getUint32(32, true), 6, 0x6fa87e4f);\n d = ii(d, a, b, c, buffer.getUint32(60, true), 10, 0xfe2ce6e0);\n c = ii(c, d, a, b, buffer.getUint32(24, true), 15, 0xa3014314);\n b = ii(b, c, d, a, buffer.getUint32(52, true), 21, 0x4e0811a1);\n a = ii(a, b, c, d, buffer.getUint32(16, true), 6, 0xf7537e82);\n d = ii(d, a, b, c, buffer.getUint32(44, true), 10, 0xbd3af235);\n c = ii(c, d, a, b, buffer.getUint32(8, true), 15, 0x2ad7d2bb);\n b = ii(b, c, d, a, buffer.getUint32(36, true), 21, 0xeb86d391);\n state[0] = (a + state[0]) & 0xffffffff;\n state[1] = (b + state[1]) & 0xffffffff;\n state[2] = (c + state[2]) & 0xffffffff;\n state[3] = (d + state[3]) & 0xffffffff;\n }\n reset() {\n this.state = Uint32Array.from(INIT);\n this.buffer = new DataView(new ArrayBuffer(BLOCK_SIZE));\n this.bufferLength = 0;\n this.bytesHashed = 0;\n this.finished = false;\n }\n}\nfunction cmn(q, a, b, x, s, t) {\n a = (((a + q) & 0xffffffff) + ((x + t) & 0xffffffff)) & 0xffffffff;\n return (((a << s) | (a >>> (32 - s))) + b) & 0xffffffff;\n}\nfunction ff(a, b, c, d, x, s, t) {\n return cmn((b & c) | (~b & d), a, b, x, s, t);\n}\nfunction gg(a, b, c, d, x, s, t) {\n return cmn((b & d) | (c & ~d), a, b, x, s, t);\n}\nfunction hh(a, b, c, d, x, s, t) {\n return cmn(b ^ c ^ d, a, b, x, s, t);\n}\nfunction ii(a, b, c, d, x, s, t) {\n return cmn(c ^ (b | ~d), a, b, x, s, t);\n}\nfunction isEmptyData(data) {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n return data.byteLength === 0;\n}\nfunction convertToBuffer(data) {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}\n", "export const DEFAULTS_MODE_OPTIONS = [\"in-region\", \"cross-region\", \"mobile\", \"standard\", \"legacy\"];\n", "import { memoize } from \"@smithy/property-provider\";\nimport { DEFAULTS_MODE_OPTIONS } from \"./constants\";\nexport const resolveDefaultsModeConfig = ({ defaultsMode, } = {}) => memoize(async () => {\n const mode = typeof defaultsMode === \"function\" ? await defaultsMode() : defaultsMode;\n switch (mode?.toLowerCase()) {\n case \"auto\":\n return Promise.resolve(useMobileConfiguration() ? \"mobile\" : \"standard\");\n case \"mobile\":\n case \"in-region\":\n case \"cross-region\":\n case \"standard\":\n case \"legacy\":\n return Promise.resolve(mode?.toLocaleLowerCase());\n case undefined:\n return Promise.resolve(\"legacy\");\n default:\n throw new Error(`Invalid parameter for \"defaultsMode\", expect ${DEFAULTS_MODE_OPTIONS.join(\", \")}, got ${mode}`);\n }\n});\nconst useMobileConfiguration = () => {\n const navigator = window?.navigator;\n if (navigator?.connection) {\n const { effectiveType, rtt, downlink } = navigator?.connection;\n const slow = (typeof effectiveType === \"string\" && effectiveType !== \"4g\") || Number(rtt) > 100 || Number(downlink) < 10;\n if (slow) {\n return true;\n }\n }\n return (navigator?.userAgentData?.mobile || (typeof navigator?.maxTouchPoints === \"number\" && navigator?.maxTouchPoints > 1));\n};\n", "export * from \"./resolveDefaultsModeConfig\";\n", "import { AwsSdkSigV4ASigner, AwsSdkSigV4Signer } from \"@aws-sdk/core\";\nimport { AwsRestXmlProtocol } from \"@aws-sdk/core/protocols\";\nimport { SignatureV4MultiRegion } from \"@aws-sdk/signature-v4-multi-region\";\nimport { NoOpLogger } from \"@smithy/smithy-client\";\nimport { parseUrl } from \"@smithy/url-parser\";\nimport { fromBase64, toBase64 } from \"@smithy/util-base64\";\nimport { getAwsChunkedEncodingStream, sdkStreamMixin } from \"@smithy/util-stream\";\nimport { fromUtf8, toUtf8 } from \"@smithy/util-utf8\";\nimport { defaultS3HttpAuthSchemeProvider } from \"./auth/httpAuthSchemeProvider\";\nimport { defaultEndpointResolver } from \"./endpoint/endpointResolver\";\nimport { errorTypeRegistries } from \"./schemas/schemas_0\";\nexport const getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2006-03-01\",\n base64Decoder: config?.base64Decoder ?? fromBase64,\n base64Encoder: config?.base64Encoder ?? toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n getAwsChunkedEncodingStream: config?.getAwsChunkedEncodingStream ?? getAwsChunkedEncodingStream,\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultS3HttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"aws.auth#sigv4a\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4a\"),\n signer: new AwsSdkSigV4ASigner(),\n },\n ],\n logger: config?.logger ?? new NoOpLogger(),\n protocol: config?.protocol ?? AwsRestXmlProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.s3\",\n errorTypeRegistries,\n xmlNamespace: \"http://s3.amazonaws.com/doc/2006-03-01/\",\n version: \"2006-03-01\",\n serviceTarget: \"AmazonS3\",\n },\n sdkStreamMixin: config?.sdkStreamMixin ?? sdkStreamMixin,\n serviceId: config?.serviceId ?? \"S3\",\n signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,\n signingEscapePath: config?.signingEscapePath ?? false,\n urlParser: config?.urlParser ?? parseUrl,\n useArnRegion: config?.useArnRegion ?? undefined,\n utf8Decoder: config?.utf8Decoder ?? fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? toUtf8,\n };\n};\n", "import packageInfo from \"../package.json\";\nimport { Sha1 } from \"@aws-crypto/sha1-browser\";\nimport { Sha256 } from \"@aws-crypto/sha256-browser\";\nimport { createDefaultUserAgentProvider } from \"@aws-sdk/util-user-agent-browser\";\nimport { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from \"@smithy/config-resolver\";\nimport { eventStreamSerdeProvider } from \"@smithy/eventstream-serde-browser\";\nimport { FetchHttpHandler as RequestHandler, streamCollector } from \"@smithy/fetch-http-handler\";\nimport { blobHasher as streamHasher } from \"@smithy/hash-blob-browser\";\nimport { invalidProvider } from \"@smithy/invalid-dependency\";\nimport { Md5 } from \"@smithy/md5-js\";\nimport { loadConfigsForDefaultMode } from \"@smithy/smithy-client\";\nimport { calculateBodyLength } from \"@smithy/util-body-length-browser\";\nimport { resolveDefaultsModeConfig } from \"@smithy/util-defaults-mode-browser\";\nimport { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from \"@smithy/util-retry\";\nimport { getRuntimeConfig as getSharedRuntimeConfig } from \"./runtimeConfig.shared\";\nexport const getRuntimeConfig = (config) => {\n const defaultsMode = resolveDefaultsModeConfig(config);\n const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);\n const clientSharedValues = getSharedRuntimeConfig(config);\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"browser\",\n defaultsMode,\n bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,\n credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error(\"Credential is missing\"))),\n defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,\n maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,\n md5: config?.md5 ?? Md5,\n region: config?.region ?? invalidProvider(\"Region is missing\"),\n requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),\n sha1: config?.sha1 ?? Sha1,\n sha256: config?.sha256 ?? Sha256,\n streamCollector: config?.streamCollector ?? streamCollector,\n streamHasher: config?.streamHasher ?? streamHasher,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),\n useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),\n };\n};\n", "export const getAwsRegionExtensionConfiguration = (runtimeConfig) => {\n return {\n setRegion(region) {\n runtimeConfig.region = region;\n },\n region() {\n return runtimeConfig.region;\n },\n };\n};\nexport const resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => {\n return {\n region: awsRegionExtensionConfiguration.region(),\n };\n};\n", "export { REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, } from \"@smithy/config-resolver\";\nexport { resolveRegionConfig } from \"@smithy/config-resolver\";\n", "export function stsRegionDefaultResolver() {\n return async () => \"us-east-1\";\n}\n", "export * from \"./extensions\";\nexport * from \"./regionConfig/awsRegionConfig\";\nexport * from \"./regionConfig/stsRegionDefaultResolver\";\n", "export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nexport const resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n", "import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from \"@aws-sdk/region-config-resolver\";\nimport { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from \"@smithy/protocol-http\";\nimport { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from \"@smithy/smithy-client\";\nimport { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from \"./auth/httpAuthExtensionConfiguration\";\nexport const resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n", "import { getAddExpectContinuePlugin } from \"@aws-sdk/middleware-expect-continue\";\nimport { resolveFlexibleChecksumsConfig, } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getHostHeaderPlugin, resolveHostHeaderConfig, } from \"@aws-sdk/middleware-host-header\";\nimport { getLoggerPlugin } from \"@aws-sdk/middleware-logger\";\nimport { getRecursionDetectionPlugin } from \"@aws-sdk/middleware-recursion-detection\";\nimport { getRegionRedirectMiddlewarePlugin, getS3ExpressHttpSigningPlugin, getS3ExpressPlugin, getValidateBucketNamePlugin, resolveS3Config, } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getUserAgentPlugin, resolveUserAgentConfig, } from \"@aws-sdk/middleware-user-agent\";\nimport { resolveRegionConfig } from \"@smithy/config-resolver\";\nimport { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from \"@smithy/core\";\nimport { getSchemaSerdePlugin } from \"@smithy/core/schema\";\nimport { resolveEventStreamSerdeConfig, } from \"@smithy/eventstream-serde-config-resolver\";\nimport { getContentLengthPlugin } from \"@smithy/middleware-content-length\";\nimport { resolveEndpointConfig, } from \"@smithy/middleware-endpoint\";\nimport { getRetryPlugin, resolveRetryConfig, } from \"@smithy/middleware-retry\";\nimport { Client as __Client, } from \"@smithy/smithy-client\";\nimport { defaultS3HttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from \"./auth/httpAuthSchemeProvider\";\nimport { CreateSessionCommand, } from \"./commands/CreateSessionCommand\";\nimport { resolveClientEndpointParameters, } from \"./endpoint/EndpointParameters\";\nimport { getRuntimeConfig as __getRuntimeConfig } from \"./runtimeConfig\";\nimport { resolveRuntimeExtensions } from \"./runtimeExtensions\";\nexport { __Client };\nexport class S3Client extends __Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = __getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = resolveUserAgentConfig(_config_1);\n const _config_3 = resolveFlexibleChecksumsConfig(_config_2);\n const _config_4 = resolveRetryConfig(_config_3);\n const _config_5 = resolveRegionConfig(_config_4);\n const _config_6 = resolveHostHeaderConfig(_config_5);\n const _config_7 = resolveEndpointConfig(_config_6);\n const _config_8 = resolveEventStreamSerdeConfig(_config_7);\n const _config_9 = resolveHttpAuthSchemeConfig(_config_8);\n const _config_10 = resolveS3Config(_config_9, { session: [() => this, CreateSessionCommand] });\n const _config_11 = resolveRuntimeExtensions(_config_10, configuration?.extensions || []);\n this.config = _config_11;\n this.middlewareStack.use(getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(getUserAgentPlugin(this.config));\n this.middlewareStack.use(getRetryPlugin(this.config));\n this.middlewareStack.use(getContentLengthPlugin(this.config));\n this.middlewareStack.use(getHostHeaderPlugin(this.config));\n this.middlewareStack.use(getLoggerPlugin(this.config));\n this.middlewareStack.use(getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultS3HttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n \"aws.auth#sigv4a\": config.credentials,\n }),\n }));\n this.middlewareStack.use(getHttpSigningPlugin(this.config));\n this.middlewareStack.use(getValidateBucketNamePlugin(this.config));\n this.middlewareStack.use(getAddExpectContinuePlugin(this.config));\n this.middlewareStack.use(getRegionRedirectMiddlewarePlugin(this.config));\n this.middlewareStack.use(getS3ExpressPlugin(this.config));\n this.middlewareStack.use(getS3ExpressHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { AbortMultipartUpload$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class AbortMultipartUploadCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"AbortMultipartUpload\", {})\n .n(\"S3Client\", \"AbortMultipartUploadCommand\")\n .sc(AbortMultipartUpload$)\n .build() {\n}\n", "export function ssecMiddleware(options) {\n return (next) => async (args) => {\n const input = { ...args.input };\n const properties = [\n {\n target: \"SSECustomerKey\",\n hash: \"SSECustomerKeyMD5\",\n },\n {\n target: \"CopySourceSSECustomerKey\",\n hash: \"CopySourceSSECustomerKeyMD5\",\n },\n ];\n for (const prop of properties) {\n const value = input[prop.target];\n if (value) {\n let valueForHash;\n if (typeof value === \"string\") {\n if (isValidBase64EncodedSSECustomerKey(value, options)) {\n valueForHash = options.base64Decoder(value);\n }\n else {\n valueForHash = options.utf8Decoder(value);\n input[prop.target] = options.base64Encoder(valueForHash);\n }\n }\n else {\n valueForHash = ArrayBuffer.isView(value)\n ? new Uint8Array(value.buffer, value.byteOffset, value.byteLength)\n : new Uint8Array(value);\n input[prop.target] = options.base64Encoder(valueForHash);\n }\n const hash = new options.md5();\n hash.update(valueForHash);\n input[prop.hash] = options.base64Encoder(await hash.digest());\n }\n }\n return next({\n ...args,\n input,\n });\n };\n}\nexport const ssecMiddlewareOptions = {\n name: \"ssecMiddleware\",\n step: \"initialize\",\n tags: [\"SSE\"],\n override: true,\n};\nexport const getSsecPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.add(ssecMiddleware(config), ssecMiddlewareOptions);\n },\n});\nexport function isValidBase64EncodedSSECustomerKey(str, options) {\n const base64Regex = /^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;\n if (!base64Regex.test(str))\n return false;\n try {\n const decodedBytes = options.base64Decoder(str);\n return decodedBytes.length === 32;\n }\n catch {\n return false;\n }\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CompleteMultipartUpload$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CompleteMultipartUploadCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"CompleteMultipartUpload\", {})\n .n(\"S3Client\", \"CompleteMultipartUploadCommand\")\n .sc(CompleteMultipartUpload$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CopyObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CopyObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n DisableS3ExpressSessionAuth: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n CopySource: { type: \"contextParams\", name: \"CopySource\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"CopyObject\", {})\n .n(\"S3Client\", \"CopyObjectCommand\")\n .sc(CopyObject$)\n .build() {\n}\n", "export function locationConstraintMiddleware(options) {\n return (next) => async (args) => {\n const { CreateBucketConfiguration } = args.input;\n const region = await options.region();\n if (!CreateBucketConfiguration?.LocationConstraint && !CreateBucketConfiguration?.Location) {\n if (region !== \"us-east-1\") {\n args.input.CreateBucketConfiguration = args.input.CreateBucketConfiguration ?? {};\n args.input.CreateBucketConfiguration.LocationConstraint = region;\n }\n }\n return next(args);\n };\n}\nexport const locationConstraintMiddlewareOptions = {\n step: \"initialize\",\n tags: [\"LOCATION_CONSTRAINT\", \"CREATE_BUCKET_CONFIGURATION\"],\n name: \"locationConstraintMiddleware\",\n override: true,\n};\nexport const getLocationConstraintPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.add(locationConstraintMiddleware(config), locationConstraintMiddlewareOptions);\n },\n});\n", "import { getLocationConstraintPlugin } from \"@aws-sdk/middleware-location-constraint\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CreateBucket$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CreateBucketCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n DisableAccessPoints: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getLocationConstraintPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"CreateBucket\", {})\n .n(\"S3Client\", \"CreateBucketCommand\")\n .sc(CreateBucket$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CreateBucketMetadataConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CreateBucketMetadataConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"CreateBucketMetadataConfiguration\", {})\n .n(\"S3Client\", \"CreateBucketMetadataConfigurationCommand\")\n .sc(CreateBucketMetadataConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CreateBucketMetadataTableConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CreateBucketMetadataTableConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"CreateBucketMetadataTableConfiguration\", {})\n .n(\"S3Client\", \"CreateBucketMetadataTableConfigurationCommand\")\n .sc(CreateBucketMetadataTableConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CreateMultipartUpload$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CreateMultipartUploadCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"CreateMultipartUpload\", {})\n .n(\"S3Client\", \"CreateMultipartUploadCommand\")\n .sc(CreateMultipartUpload$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketAnalyticsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketAnalyticsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketAnalyticsConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketAnalyticsConfigurationCommand\")\n .sc(DeleteBucketAnalyticsConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucket$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucket\", {})\n .n(\"S3Client\", \"DeleteBucketCommand\")\n .sc(DeleteBucket$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketCors$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketCorsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketCors\", {})\n .n(\"S3Client\", \"DeleteBucketCorsCommand\")\n .sc(DeleteBucketCors$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketEncryption$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketEncryptionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketEncryption\", {})\n .n(\"S3Client\", \"DeleteBucketEncryptionCommand\")\n .sc(DeleteBucketEncryption$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketIntelligentTieringConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketIntelligentTieringConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketIntelligentTieringConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketIntelligentTieringConfigurationCommand\")\n .sc(DeleteBucketIntelligentTieringConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketInventoryConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketInventoryConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketInventoryConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketInventoryConfigurationCommand\")\n .sc(DeleteBucketInventoryConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketLifecycle$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketLifecycleCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketLifecycle\", {})\n .n(\"S3Client\", \"DeleteBucketLifecycleCommand\")\n .sc(DeleteBucketLifecycle$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketMetadataConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketMetadataConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketMetadataConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketMetadataConfigurationCommand\")\n .sc(DeleteBucketMetadataConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketMetadataTableConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketMetadataTableConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketMetadataTableConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketMetadataTableConfigurationCommand\")\n .sc(DeleteBucketMetadataTableConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketMetricsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketMetricsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketMetricsConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketMetricsConfigurationCommand\")\n .sc(DeleteBucketMetricsConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketOwnershipControls$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketOwnershipControlsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketOwnershipControls\", {})\n .n(\"S3Client\", \"DeleteBucketOwnershipControlsCommand\")\n .sc(DeleteBucketOwnershipControls$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketPolicy$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketPolicyCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketPolicy\", {})\n .n(\"S3Client\", \"DeleteBucketPolicyCommand\")\n .sc(DeleteBucketPolicy$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketReplication$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketReplicationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketReplication\", {})\n .n(\"S3Client\", \"DeleteBucketReplicationCommand\")\n .sc(DeleteBucketReplication$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketTagging\", {})\n .n(\"S3Client\", \"DeleteBucketTaggingCommand\")\n .sc(DeleteBucketTagging$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketWebsite$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketWebsiteCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketWebsite\", {})\n .n(\"S3Client\", \"DeleteBucketWebsiteCommand\")\n .sc(DeleteBucketWebsite$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"DeleteObject\", {})\n .n(\"S3Client\", \"DeleteObjectCommand\")\n .sc(DeleteObject$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteObjects$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteObjectsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"DeleteObjects\", {})\n .n(\"S3Client\", \"DeleteObjectsCommand\")\n .sc(DeleteObjects$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteObjectTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteObjectTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"DeleteObjectTagging\", {})\n .n(\"S3Client\", \"DeleteObjectTaggingCommand\")\n .sc(DeleteObjectTagging$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeletePublicAccessBlock$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeletePublicAccessBlockCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeletePublicAccessBlock\", {})\n .n(\"S3Client\", \"DeletePublicAccessBlockCommand\")\n .sc(DeletePublicAccessBlock$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketAbac$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketAbacCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketAbac\", {})\n .n(\"S3Client\", \"GetBucketAbacCommand\")\n .sc(GetBucketAbac$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketAccelerateConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketAccelerateConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketAccelerateConfiguration\", {})\n .n(\"S3Client\", \"GetBucketAccelerateConfigurationCommand\")\n .sc(GetBucketAccelerateConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketAcl$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketAclCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketAcl\", {})\n .n(\"S3Client\", \"GetBucketAclCommand\")\n .sc(GetBucketAcl$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketAnalyticsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketAnalyticsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketAnalyticsConfiguration\", {})\n .n(\"S3Client\", \"GetBucketAnalyticsConfigurationCommand\")\n .sc(GetBucketAnalyticsConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketCors$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketCorsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketCors\", {})\n .n(\"S3Client\", \"GetBucketCorsCommand\")\n .sc(GetBucketCors$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketEncryption$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketEncryptionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketEncryption\", {})\n .n(\"S3Client\", \"GetBucketEncryptionCommand\")\n .sc(GetBucketEncryption$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketIntelligentTieringConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketIntelligentTieringConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketIntelligentTieringConfiguration\", {})\n .n(\"S3Client\", \"GetBucketIntelligentTieringConfigurationCommand\")\n .sc(GetBucketIntelligentTieringConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketInventoryConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketInventoryConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketInventoryConfiguration\", {})\n .n(\"S3Client\", \"GetBucketInventoryConfigurationCommand\")\n .sc(GetBucketInventoryConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketLifecycleConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketLifecycleConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketLifecycleConfiguration\", {})\n .n(\"S3Client\", \"GetBucketLifecycleConfigurationCommand\")\n .sc(GetBucketLifecycleConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketLocation$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketLocationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketLocation\", {})\n .n(\"S3Client\", \"GetBucketLocationCommand\")\n .sc(GetBucketLocation$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketLogging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketLoggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketLogging\", {})\n .n(\"S3Client\", \"GetBucketLoggingCommand\")\n .sc(GetBucketLogging$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketMetadataConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketMetadataConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketMetadataConfiguration\", {})\n .n(\"S3Client\", \"GetBucketMetadataConfigurationCommand\")\n .sc(GetBucketMetadataConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketMetadataTableConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketMetadataTableConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketMetadataTableConfiguration\", {})\n .n(\"S3Client\", \"GetBucketMetadataTableConfigurationCommand\")\n .sc(GetBucketMetadataTableConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketMetricsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketMetricsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketMetricsConfiguration\", {})\n .n(\"S3Client\", \"GetBucketMetricsConfigurationCommand\")\n .sc(GetBucketMetricsConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketNotificationConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketNotificationConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketNotificationConfiguration\", {})\n .n(\"S3Client\", \"GetBucketNotificationConfigurationCommand\")\n .sc(GetBucketNotificationConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketOwnershipControls$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketOwnershipControlsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketOwnershipControls\", {})\n .n(\"S3Client\", \"GetBucketOwnershipControlsCommand\")\n .sc(GetBucketOwnershipControls$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketPolicy$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketPolicyCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketPolicy\", {})\n .n(\"S3Client\", \"GetBucketPolicyCommand\")\n .sc(GetBucketPolicy$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketPolicyStatus$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketPolicyStatusCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketPolicyStatus\", {})\n .n(\"S3Client\", \"GetBucketPolicyStatusCommand\")\n .sc(GetBucketPolicyStatus$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketReplication$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketReplicationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketReplication\", {})\n .n(\"S3Client\", \"GetBucketReplicationCommand\")\n .sc(GetBucketReplication$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketRequestPayment$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketRequestPaymentCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketRequestPayment\", {})\n .n(\"S3Client\", \"GetBucketRequestPaymentCommand\")\n .sc(GetBucketRequestPayment$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketTagging\", {})\n .n(\"S3Client\", \"GetBucketTaggingCommand\")\n .sc(GetBucketTagging$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketVersioning$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketVersioningCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketVersioning\", {})\n .n(\"S3Client\", \"GetBucketVersioningCommand\")\n .sc(GetBucketVersioning$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketWebsite$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketWebsiteCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketWebsite\", {})\n .n(\"S3Client\", \"GetBucketWebsiteCommand\")\n .sc(GetBucketWebsite$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectAcl$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectAclCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectAcl\", {})\n .n(\"S3Client\", \"GetObjectAclCommand\")\n .sc(GetObjectAcl$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectAttributes$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectAttributesCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectAttributes\", {})\n .n(\"S3Client\", \"GetObjectAttributesCommand\")\n .sc(GetObjectAttributes$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getS3ExpiresMiddlewarePlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestChecksumRequired: false,\n requestValidationModeMember: 'ChecksumMode',\n 'responseAlgorithms': ['CRC64NVME', 'CRC32', 'CRC32C', 'SHA256', 'SHA1'],\n }),\n getSsecPlugin(config),\n getS3ExpiresMiddlewarePlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObject\", {})\n .n(\"S3Client\", \"GetObjectCommand\")\n .sc(GetObject$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectLegalHold$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectLegalHoldCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectLegalHold\", {})\n .n(\"S3Client\", \"GetObjectLegalHoldCommand\")\n .sc(GetObjectLegalHold$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectLockConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectLockConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectLockConfiguration\", {})\n .n(\"S3Client\", \"GetObjectLockConfigurationCommand\")\n .sc(GetObjectLockConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectRetention$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectRetentionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectRetention\", {})\n .n(\"S3Client\", \"GetObjectRetentionCommand\")\n .sc(GetObjectRetention$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectTagging\", {})\n .n(\"S3Client\", \"GetObjectTaggingCommand\")\n .sc(GetObjectTagging$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectTorrent$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectTorrentCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"GetObjectTorrent\", {})\n .n(\"S3Client\", \"GetObjectTorrentCommand\")\n .sc(GetObjectTorrent$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetPublicAccessBlock$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetPublicAccessBlockCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetPublicAccessBlock\", {})\n .n(\"S3Client\", \"GetPublicAccessBlockCommand\")\n .sc(GetPublicAccessBlock$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { HeadBucket$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class HeadBucketCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"HeadBucket\", {})\n .n(\"S3Client\", \"HeadBucketCommand\")\n .sc(HeadBucket$)\n .build() {\n}\n", "import { getS3ExpiresMiddlewarePlugin, getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { HeadObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class HeadObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n getS3ExpiresMiddlewarePlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"HeadObject\", {})\n .n(\"S3Client\", \"HeadObjectCommand\")\n .sc(HeadObject$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListBucketAnalyticsConfigurations$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListBucketAnalyticsConfigurationsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListBucketAnalyticsConfigurations\", {})\n .n(\"S3Client\", \"ListBucketAnalyticsConfigurationsCommand\")\n .sc(ListBucketAnalyticsConfigurations$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListBucketIntelligentTieringConfigurations$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListBucketIntelligentTieringConfigurationsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListBucketIntelligentTieringConfigurations\", {})\n .n(\"S3Client\", \"ListBucketIntelligentTieringConfigurationsCommand\")\n .sc(ListBucketIntelligentTieringConfigurations$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListBucketInventoryConfigurations$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListBucketInventoryConfigurationsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListBucketInventoryConfigurations\", {})\n .n(\"S3Client\", \"ListBucketInventoryConfigurationsCommand\")\n .sc(ListBucketInventoryConfigurations$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListBucketMetricsConfigurations$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListBucketMetricsConfigurationsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListBucketMetricsConfigurations\", {})\n .n(\"S3Client\", \"ListBucketMetricsConfigurationsCommand\")\n .sc(ListBucketMetricsConfigurations$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListBuckets$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListBucketsCommand extends $Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListBuckets\", {})\n .n(\"S3Client\", \"ListBucketsCommand\")\n .sc(ListBuckets$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListDirectoryBuckets$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListDirectoryBucketsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListDirectoryBuckets\", {})\n .n(\"S3Client\", \"ListDirectoryBucketsCommand\")\n .sc(ListDirectoryBuckets$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListMultipartUploads$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListMultipartUploadsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Prefix: { type: \"contextParams\", name: \"Prefix\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListMultipartUploads\", {})\n .n(\"S3Client\", \"ListMultipartUploadsCommand\")\n .sc(ListMultipartUploads$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListObjects$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListObjectsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Prefix: { type: \"contextParams\", name: \"Prefix\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListObjects\", {})\n .n(\"S3Client\", \"ListObjectsCommand\")\n .sc(ListObjects$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListObjectsV2$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListObjectsV2Command extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Prefix: { type: \"contextParams\", name: \"Prefix\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListObjectsV2\", {})\n .n(\"S3Client\", \"ListObjectsV2Command\")\n .sc(ListObjectsV2$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListObjectVersions$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListObjectVersionsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Prefix: { type: \"contextParams\", name: \"Prefix\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListObjectVersions\", {})\n .n(\"S3Client\", \"ListObjectVersionsCommand\")\n .sc(ListObjectVersions$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListParts$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListPartsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListParts\", {})\n .n(\"S3Client\", \"ListPartsCommand\")\n .sc(ListParts$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketAbac$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketAbacCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: false,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketAbac\", {})\n .n(\"S3Client\", \"PutBucketAbacCommand\")\n .sc(PutBucketAbac$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketAccelerateConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketAccelerateConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: false,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketAccelerateConfiguration\", {})\n .n(\"S3Client\", \"PutBucketAccelerateConfigurationCommand\")\n .sc(PutBucketAccelerateConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketAcl$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketAclCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketAcl\", {})\n .n(\"S3Client\", \"PutBucketAclCommand\")\n .sc(PutBucketAcl$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketAnalyticsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketAnalyticsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"PutBucketAnalyticsConfiguration\", {})\n .n(\"S3Client\", \"PutBucketAnalyticsConfigurationCommand\")\n .sc(PutBucketAnalyticsConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketCors$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketCorsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketCors\", {})\n .n(\"S3Client\", \"PutBucketCorsCommand\")\n .sc(PutBucketCors$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketEncryption$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketEncryptionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketEncryption\", {})\n .n(\"S3Client\", \"PutBucketEncryptionCommand\")\n .sc(PutBucketEncryption$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketIntelligentTieringConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketIntelligentTieringConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"PutBucketIntelligentTieringConfiguration\", {})\n .n(\"S3Client\", \"PutBucketIntelligentTieringConfigurationCommand\")\n .sc(PutBucketIntelligentTieringConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketInventoryConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketInventoryConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"PutBucketInventoryConfiguration\", {})\n .n(\"S3Client\", \"PutBucketInventoryConfigurationCommand\")\n .sc(PutBucketInventoryConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketLifecycleConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketLifecycleConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketLifecycleConfiguration\", {})\n .n(\"S3Client\", \"PutBucketLifecycleConfigurationCommand\")\n .sc(PutBucketLifecycleConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketLogging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketLoggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketLogging\", {})\n .n(\"S3Client\", \"PutBucketLoggingCommand\")\n .sc(PutBucketLogging$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketMetricsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketMetricsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"PutBucketMetricsConfiguration\", {})\n .n(\"S3Client\", \"PutBucketMetricsConfigurationCommand\")\n .sc(PutBucketMetricsConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketNotificationConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketNotificationConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"PutBucketNotificationConfiguration\", {})\n .n(\"S3Client\", \"PutBucketNotificationConfigurationCommand\")\n .sc(PutBucketNotificationConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketOwnershipControls$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketOwnershipControlsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketOwnershipControls\", {})\n .n(\"S3Client\", \"PutBucketOwnershipControlsCommand\")\n .sc(PutBucketOwnershipControls$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketPolicy$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketPolicyCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketPolicy\", {})\n .n(\"S3Client\", \"PutBucketPolicyCommand\")\n .sc(PutBucketPolicy$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketReplication$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketReplicationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketReplication\", {})\n .n(\"S3Client\", \"PutBucketReplicationCommand\")\n .sc(PutBucketReplication$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketRequestPayment$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketRequestPaymentCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketRequestPayment\", {})\n .n(\"S3Client\", \"PutBucketRequestPaymentCommand\")\n .sc(PutBucketRequestPayment$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketTagging\", {})\n .n(\"S3Client\", \"PutBucketTaggingCommand\")\n .sc(PutBucketTagging$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketVersioning$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketVersioningCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketVersioning\", {})\n .n(\"S3Client\", \"PutBucketVersioningCommand\")\n .sc(PutBucketVersioning$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketWebsite$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketWebsiteCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketWebsite\", {})\n .n(\"S3Client\", \"PutBucketWebsiteCommand\")\n .sc(PutBucketWebsite$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObjectAcl$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectAclCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObjectAcl\", {})\n .n(\"S3Client\", \"PutObjectAclCommand\")\n .sc(PutObjectAcl$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getCheckContentLengthHeaderPlugin, getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: false,\n }),\n getCheckContentLengthHeaderPlugin(config),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObject\", {})\n .n(\"S3Client\", \"PutObjectCommand\")\n .sc(PutObject$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObjectLegalHold$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectLegalHoldCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObjectLegalHold\", {})\n .n(\"S3Client\", \"PutObjectLegalHoldCommand\")\n .sc(PutObjectLegalHold$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObjectLockConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectLockConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObjectLockConfiguration\", {})\n .n(\"S3Client\", \"PutObjectLockConfigurationCommand\")\n .sc(PutObjectLockConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObjectRetention$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectRetentionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObjectRetention\", {})\n .n(\"S3Client\", \"PutObjectRetentionCommand\")\n .sc(PutObjectRetention$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObjectTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObjectTagging\", {})\n .n(\"S3Client\", \"PutObjectTaggingCommand\")\n .sc(PutObjectTagging$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutPublicAccessBlock$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutPublicAccessBlockCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutPublicAccessBlock\", {})\n .n(\"S3Client\", \"PutPublicAccessBlockCommand\")\n .sc(PutPublicAccessBlock$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { RenameObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class RenameObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"RenameObject\", {})\n .n(\"S3Client\", \"RenameObjectCommand\")\n .sc(RenameObject$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { RestoreObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class RestoreObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: false,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"RestoreObject\", {})\n .n(\"S3Client\", \"RestoreObjectCommand\")\n .sc(RestoreObject$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { SelectObjectContent$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class SelectObjectContentCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"SelectObjectContent\", {\n eventStream: {\n output: true,\n },\n})\n .n(\"S3Client\", \"SelectObjectContentCommand\")\n .sc(SelectObjectContent$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { UpdateBucketMetadataInventoryTableConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class UpdateBucketMetadataInventoryTableConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"UpdateBucketMetadataInventoryTableConfiguration\", {})\n .n(\"S3Client\", \"UpdateBucketMetadataInventoryTableConfigurationCommand\")\n .sc(UpdateBucketMetadataInventoryTableConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { UpdateBucketMetadataJournalTableConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class UpdateBucketMetadataJournalTableConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"UpdateBucketMetadataJournalTableConfiguration\", {})\n .n(\"S3Client\", \"UpdateBucketMetadataJournalTableConfigurationCommand\")\n .sc(UpdateBucketMetadataJournalTableConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { UpdateObjectEncryption$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class UpdateObjectEncryptionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"UpdateObjectEncryption\", {})\n .n(\"S3Client\", \"UpdateObjectEncryptionCommand\")\n .sc(UpdateObjectEncryption$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { UploadPart$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class UploadPartCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: false,\n }),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"UploadPart\", {})\n .n(\"S3Client\", \"UploadPartCommand\")\n .sc(UploadPart$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { UploadPartCopy$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class UploadPartCopyCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n DisableS3ExpressSessionAuth: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"UploadPartCopy\", {})\n .n(\"S3Client\", \"UploadPartCopyCommand\")\n .sc(UploadPartCopy$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { WriteGetObjectResponse$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class WriteGetObjectResponseCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseObjectLambdaEndpoint: { type: \"staticContextParams\", value: true },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"WriteGetObjectResponse\", {})\n .n(\"S3Client\", \"WriteGetObjectResponseCommand\")\n .sc(WriteGetObjectResponse$)\n .build() {\n}\n", "import { createPaginator } from \"@smithy/core\";\nimport { ListBucketsCommand } from \"../commands/ListBucketsCommand\";\nimport { S3Client } from \"../S3Client\";\nexport const paginateListBuckets = createPaginator(S3Client, ListBucketsCommand, \"ContinuationToken\", \"ContinuationToken\", \"MaxBuckets\");\n", "import { createPaginator } from \"@smithy/core\";\nimport { ListDirectoryBucketsCommand, } from \"../commands/ListDirectoryBucketsCommand\";\nimport { S3Client } from \"../S3Client\";\nexport const paginateListDirectoryBuckets = createPaginator(S3Client, ListDirectoryBucketsCommand, \"ContinuationToken\", \"ContinuationToken\", \"MaxDirectoryBuckets\");\n", "import { createPaginator } from \"@smithy/core\";\nimport { ListObjectsV2Command, } from \"../commands/ListObjectsV2Command\";\nimport { S3Client } from \"../S3Client\";\nexport const paginateListObjectsV2 = createPaginator(S3Client, ListObjectsV2Command, \"ContinuationToken\", \"NextContinuationToken\", \"MaxKeys\");\n", "import { createPaginator } from \"@smithy/core\";\nimport { ListPartsCommand } from \"../commands/ListPartsCommand\";\nimport { S3Client } from \"../S3Client\";\nexport const paginateListParts = createPaginator(S3Client, ListPartsCommand, \"PartNumberMarker\", \"NextPartNumberMarker\", \"MaxParts\");\n", "export const getCircularReplacer = () => {\n const seen = new WeakSet();\n return (key, value) => {\n if (typeof value === \"object\" && value !== null) {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n }\n return value;\n };\n};\n", "export const sleep = (seconds) => {\n return new Promise((resolve) => setTimeout(resolve, seconds * 1000));\n};\n", "import { getCircularReplacer } from \"./circularReplacer\";\nexport const waiterServiceDefaults = {\n minDelay: 2,\n maxDelay: 120,\n};\nexport var WaiterState;\n(function (WaiterState) {\n WaiterState[\"ABORTED\"] = \"ABORTED\";\n WaiterState[\"FAILURE\"] = \"FAILURE\";\n WaiterState[\"SUCCESS\"] = \"SUCCESS\";\n WaiterState[\"RETRY\"] = \"RETRY\";\n WaiterState[\"TIMEOUT\"] = \"TIMEOUT\";\n})(WaiterState || (WaiterState = {}));\nexport const checkExceptions = (result) => {\n if (result.state === WaiterState.ABORTED) {\n const abortError = new Error(`${JSON.stringify({\n ...result,\n reason: \"Request was aborted\",\n }, getCircularReplacer())}`);\n abortError.name = \"AbortError\";\n throw abortError;\n }\n else if (result.state === WaiterState.TIMEOUT) {\n const timeoutError = new Error(`${JSON.stringify({\n ...result,\n reason: \"Waiter has timed out\",\n }, getCircularReplacer())}`);\n timeoutError.name = \"TimeoutError\";\n throw timeoutError;\n }\n else if (result.state !== WaiterState.SUCCESS) {\n throw new Error(`${JSON.stringify(result, getCircularReplacer())}`);\n }\n return result;\n};\n", "import { getCircularReplacer } from \"./circularReplacer\";\nimport { sleep } from \"./utils/sleep\";\nimport { WaiterState } from \"./waiter\";\nconst exponentialBackoffWithJitter = (minDelay, maxDelay, attemptCeiling, attempt) => {\n if (attempt > attemptCeiling)\n return maxDelay;\n const delay = minDelay * 2 ** (attempt - 1);\n return randomInRange(minDelay, delay);\n};\nconst randomInRange = (min, max) => min + Math.random() * (max - min);\nexport const runPolling = async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => {\n const observedResponses = {};\n const { state, reason } = await acceptorChecks(client, input);\n if (reason) {\n const message = createMessageFromResponse(reason);\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n }\n if (state !== WaiterState.RETRY) {\n return { state, reason, observedResponses };\n }\n let currentAttempt = 1;\n const waitUntil = Date.now() + maxWaitTime * 1000;\n const attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1;\n while (true) {\n if (abortController?.signal?.aborted || abortSignal?.aborted) {\n const message = \"AbortController signal aborted.\";\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n return { state: WaiterState.ABORTED, observedResponses };\n }\n const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt);\n if (Date.now() + delay * 1000 > waitUntil) {\n return { state: WaiterState.TIMEOUT, observedResponses };\n }\n await sleep(delay);\n const { state, reason } = await acceptorChecks(client, input);\n if (reason) {\n const message = createMessageFromResponse(reason);\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n }\n if (state !== WaiterState.RETRY) {\n return { state, reason, observedResponses };\n }\n currentAttempt += 1;\n }\n};\nconst createMessageFromResponse = (reason) => {\n if (reason?.$responseBodyText) {\n return `Deserialization error for body: ${reason.$responseBodyText}`;\n }\n if (reason?.$metadata?.httpStatusCode) {\n if (reason.$response || reason.message) {\n return `${reason.$response?.statusCode ?? reason.$metadata.httpStatusCode ?? \"Unknown\"}: ${reason.message}`;\n }\n return `${reason.$metadata.httpStatusCode}: OK`;\n }\n return String(reason?.message ?? JSON.stringify(reason, getCircularReplacer()) ?? \"Unknown\");\n};\n", "export const validateWaiterOptions = (options) => {\n if (options.maxWaitTime <= 0) {\n throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`);\n }\n else if (options.minDelay <= 0) {\n throw new Error(`WaiterConfiguration.minDelay must be greater than 0`);\n }\n else if (options.maxDelay <= 0) {\n throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`);\n }\n else if (options.maxWaitTime <= options.minDelay) {\n throw new Error(`WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`);\n }\n else if (options.maxDelay < options.minDelay) {\n throw new Error(`WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`);\n }\n};\n", "export * from \"./sleep\";\nexport * from \"./validate\";\n", "import { runPolling } from \"./poller\";\nimport { validateWaiterOptions } from \"./utils\";\nimport { waiterServiceDefaults, WaiterState } from \"./waiter\";\nconst abortTimeout = (abortSignal) => {\n let onAbort;\n const promise = new Promise((resolve) => {\n onAbort = () => resolve({ state: WaiterState.ABORTED });\n if (typeof abortSignal.addEventListener === \"function\") {\n abortSignal.addEventListener(\"abort\", onAbort);\n }\n else {\n abortSignal.onabort = onAbort;\n }\n });\n return {\n clearListener() {\n if (typeof abortSignal.removeEventListener === \"function\") {\n abortSignal.removeEventListener(\"abort\", onAbort);\n }\n },\n aborted: promise,\n };\n};\nexport const createWaiter = async (options, input, acceptorChecks) => {\n const params = {\n ...waiterServiceDefaults,\n ...options,\n };\n validateWaiterOptions(params);\n const exitConditions = [runPolling(params, input, acceptorChecks)];\n const finalize = [];\n if (options.abortSignal) {\n const { aborted, clearListener } = abortTimeout(options.abortSignal);\n finalize.push(clearListener);\n exitConditions.push(aborted);\n }\n if (options.abortController?.signal) {\n const { aborted, clearListener } = abortTimeout(options.abortController.signal);\n finalize.push(clearListener);\n exitConditions.push(aborted);\n }\n return Promise.race(exitConditions).then((result) => {\n for (const fn of finalize) {\n fn();\n }\n return result;\n });\n};\n", "export * from \"./createWaiter\";\nexport * from \"./waiter\";\n", "import { checkExceptions, createWaiter, WaiterState } from \"@smithy/util-waiter\";\nimport { HeadBucketCommand } from \"../commands/HeadBucketCommand\";\nconst checkState = async (client, input) => {\n let reason;\n try {\n let result = await client.send(new HeadBucketCommand(input));\n reason = result;\n return { state: WaiterState.SUCCESS, reason };\n }\n catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"NotFound\") {\n return { state: WaiterState.RETRY, reason };\n }\n }\n return { state: WaiterState.RETRY, reason };\n};\nexport const waitForBucketExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n return createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n};\nexport const waitUntilBucketExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n return checkExceptions(result);\n};\n", "import { checkExceptions, createWaiter, WaiterState } from \"@smithy/util-waiter\";\nimport { HeadBucketCommand } from \"../commands/HeadBucketCommand\";\nconst checkState = async (client, input) => {\n let reason;\n try {\n let result = await client.send(new HeadBucketCommand(input));\n reason = result;\n }\n catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"NotFound\") {\n return { state: WaiterState.SUCCESS, reason };\n }\n }\n return { state: WaiterState.RETRY, reason };\n};\nexport const waitForBucketNotExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n return createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n};\nexport const waitUntilBucketNotExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n return checkExceptions(result);\n};\n", "import { checkExceptions, createWaiter, WaiterState } from \"@smithy/util-waiter\";\nimport { HeadObjectCommand } from \"../commands/HeadObjectCommand\";\nconst checkState = async (client, input) => {\n let reason;\n try {\n let result = await client.send(new HeadObjectCommand(input));\n reason = result;\n return { state: WaiterState.SUCCESS, reason };\n }\n catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"NotFound\") {\n return { state: WaiterState.RETRY, reason };\n }\n }\n return { state: WaiterState.RETRY, reason };\n};\nexport const waitForObjectExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n return createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n};\nexport const waitUntilObjectExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n return checkExceptions(result);\n};\n", "import { checkExceptions, createWaiter, WaiterState } from \"@smithy/util-waiter\";\nimport { HeadObjectCommand } from \"../commands/HeadObjectCommand\";\nconst checkState = async (client, input) => {\n let reason;\n try {\n let result = await client.send(new HeadObjectCommand(input));\n reason = result;\n }\n catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"NotFound\") {\n return { state: WaiterState.SUCCESS, reason };\n }\n }\n return { state: WaiterState.RETRY, reason };\n};\nexport const waitForObjectNotExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n return createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n};\nexport const waitUntilObjectNotExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n return checkExceptions(result);\n};\n", "import { createAggregatedClient } from \"@smithy/smithy-client\";\nimport { AbortMultipartUploadCommand, } from \"./commands/AbortMultipartUploadCommand\";\nimport { CompleteMultipartUploadCommand, } from \"./commands/CompleteMultipartUploadCommand\";\nimport { CopyObjectCommand } from \"./commands/CopyObjectCommand\";\nimport { CreateBucketCommand, } from \"./commands/CreateBucketCommand\";\nimport { CreateBucketMetadataConfigurationCommand, } from \"./commands/CreateBucketMetadataConfigurationCommand\";\nimport { CreateBucketMetadataTableConfigurationCommand, } from \"./commands/CreateBucketMetadataTableConfigurationCommand\";\nimport { CreateMultipartUploadCommand, } from \"./commands/CreateMultipartUploadCommand\";\nimport { CreateSessionCommand, } from \"./commands/CreateSessionCommand\";\nimport { DeleteBucketAnalyticsConfigurationCommand, } from \"./commands/DeleteBucketAnalyticsConfigurationCommand\";\nimport { DeleteBucketCommand, } from \"./commands/DeleteBucketCommand\";\nimport { DeleteBucketCorsCommand, } from \"./commands/DeleteBucketCorsCommand\";\nimport { DeleteBucketEncryptionCommand, } from \"./commands/DeleteBucketEncryptionCommand\";\nimport { DeleteBucketIntelligentTieringConfigurationCommand, } from \"./commands/DeleteBucketIntelligentTieringConfigurationCommand\";\nimport { DeleteBucketInventoryConfigurationCommand, } from \"./commands/DeleteBucketInventoryConfigurationCommand\";\nimport { DeleteBucketLifecycleCommand, } from \"./commands/DeleteBucketLifecycleCommand\";\nimport { DeleteBucketMetadataConfigurationCommand, } from \"./commands/DeleteBucketMetadataConfigurationCommand\";\nimport { DeleteBucketMetadataTableConfigurationCommand, } from \"./commands/DeleteBucketMetadataTableConfigurationCommand\";\nimport { DeleteBucketMetricsConfigurationCommand, } from \"./commands/DeleteBucketMetricsConfigurationCommand\";\nimport { DeleteBucketOwnershipControlsCommand, } from \"./commands/DeleteBucketOwnershipControlsCommand\";\nimport { DeleteBucketPolicyCommand, } from \"./commands/DeleteBucketPolicyCommand\";\nimport { DeleteBucketReplicationCommand, } from \"./commands/DeleteBucketReplicationCommand\";\nimport { DeleteBucketTaggingCommand, } from \"./commands/DeleteBucketTaggingCommand\";\nimport { DeleteBucketWebsiteCommand, } from \"./commands/DeleteBucketWebsiteCommand\";\nimport { DeleteObjectCommand, } from \"./commands/DeleteObjectCommand\";\nimport { DeleteObjectsCommand, } from \"./commands/DeleteObjectsCommand\";\nimport { DeleteObjectTaggingCommand, } from \"./commands/DeleteObjectTaggingCommand\";\nimport { DeletePublicAccessBlockCommand, } from \"./commands/DeletePublicAccessBlockCommand\";\nimport { GetBucketAbacCommand, } from \"./commands/GetBucketAbacCommand\";\nimport { GetBucketAccelerateConfigurationCommand, } from \"./commands/GetBucketAccelerateConfigurationCommand\";\nimport { GetBucketAclCommand, } from \"./commands/GetBucketAclCommand\";\nimport { GetBucketAnalyticsConfigurationCommand, } from \"./commands/GetBucketAnalyticsConfigurationCommand\";\nimport { GetBucketCorsCommand, } from \"./commands/GetBucketCorsCommand\";\nimport { GetBucketEncryptionCommand, } from \"./commands/GetBucketEncryptionCommand\";\nimport { GetBucketIntelligentTieringConfigurationCommand, } from \"./commands/GetBucketIntelligentTieringConfigurationCommand\";\nimport { GetBucketInventoryConfigurationCommand, } from \"./commands/GetBucketInventoryConfigurationCommand\";\nimport { GetBucketLifecycleConfigurationCommand, } from \"./commands/GetBucketLifecycleConfigurationCommand\";\nimport { GetBucketLocationCommand, } from \"./commands/GetBucketLocationCommand\";\nimport { GetBucketLoggingCommand, } from \"./commands/GetBucketLoggingCommand\";\nimport { GetBucketMetadataConfigurationCommand, } from \"./commands/GetBucketMetadataConfigurationCommand\";\nimport { GetBucketMetadataTableConfigurationCommand, } from \"./commands/GetBucketMetadataTableConfigurationCommand\";\nimport { GetBucketMetricsConfigurationCommand, } from \"./commands/GetBucketMetricsConfigurationCommand\";\nimport { GetBucketNotificationConfigurationCommand, } from \"./commands/GetBucketNotificationConfigurationCommand\";\nimport { GetBucketOwnershipControlsCommand, } from \"./commands/GetBucketOwnershipControlsCommand\";\nimport { GetBucketPolicyCommand, } from \"./commands/GetBucketPolicyCommand\";\nimport { GetBucketPolicyStatusCommand, } from \"./commands/GetBucketPolicyStatusCommand\";\nimport { GetBucketReplicationCommand, } from \"./commands/GetBucketReplicationCommand\";\nimport { GetBucketRequestPaymentCommand, } from \"./commands/GetBucketRequestPaymentCommand\";\nimport { GetBucketTaggingCommand, } from \"./commands/GetBucketTaggingCommand\";\nimport { GetBucketVersioningCommand, } from \"./commands/GetBucketVersioningCommand\";\nimport { GetBucketWebsiteCommand, } from \"./commands/GetBucketWebsiteCommand\";\nimport { GetObjectAclCommand, } from \"./commands/GetObjectAclCommand\";\nimport { GetObjectAttributesCommand, } from \"./commands/GetObjectAttributesCommand\";\nimport { GetObjectCommand } from \"./commands/GetObjectCommand\";\nimport { GetObjectLegalHoldCommand, } from \"./commands/GetObjectLegalHoldCommand\";\nimport { GetObjectLockConfigurationCommand, } from \"./commands/GetObjectLockConfigurationCommand\";\nimport { GetObjectRetentionCommand, } from \"./commands/GetObjectRetentionCommand\";\nimport { GetObjectTaggingCommand, } from \"./commands/GetObjectTaggingCommand\";\nimport { GetObjectTorrentCommand, } from \"./commands/GetObjectTorrentCommand\";\nimport { GetPublicAccessBlockCommand, } from \"./commands/GetPublicAccessBlockCommand\";\nimport { HeadBucketCommand } from \"./commands/HeadBucketCommand\";\nimport { HeadObjectCommand } from \"./commands/HeadObjectCommand\";\nimport { ListBucketAnalyticsConfigurationsCommand, } from \"./commands/ListBucketAnalyticsConfigurationsCommand\";\nimport { ListBucketIntelligentTieringConfigurationsCommand, } from \"./commands/ListBucketIntelligentTieringConfigurationsCommand\";\nimport { ListBucketInventoryConfigurationsCommand, } from \"./commands/ListBucketInventoryConfigurationsCommand\";\nimport { ListBucketMetricsConfigurationsCommand, } from \"./commands/ListBucketMetricsConfigurationsCommand\";\nimport { ListBucketsCommand } from \"./commands/ListBucketsCommand\";\nimport { ListDirectoryBucketsCommand, } from \"./commands/ListDirectoryBucketsCommand\";\nimport { ListMultipartUploadsCommand, } from \"./commands/ListMultipartUploadsCommand\";\nimport { ListObjectsCommand } from \"./commands/ListObjectsCommand\";\nimport { ListObjectsV2Command, } from \"./commands/ListObjectsV2Command\";\nimport { ListObjectVersionsCommand, } from \"./commands/ListObjectVersionsCommand\";\nimport { ListPartsCommand } from \"./commands/ListPartsCommand\";\nimport { PutBucketAbacCommand, } from \"./commands/PutBucketAbacCommand\";\nimport { PutBucketAccelerateConfigurationCommand, } from \"./commands/PutBucketAccelerateConfigurationCommand\";\nimport { PutBucketAclCommand, } from \"./commands/PutBucketAclCommand\";\nimport { PutBucketAnalyticsConfigurationCommand, } from \"./commands/PutBucketAnalyticsConfigurationCommand\";\nimport { PutBucketCorsCommand, } from \"./commands/PutBucketCorsCommand\";\nimport { PutBucketEncryptionCommand, } from \"./commands/PutBucketEncryptionCommand\";\nimport { PutBucketIntelligentTieringConfigurationCommand, } from \"./commands/PutBucketIntelligentTieringConfigurationCommand\";\nimport { PutBucketInventoryConfigurationCommand, } from \"./commands/PutBucketInventoryConfigurationCommand\";\nimport { PutBucketLifecycleConfigurationCommand, } from \"./commands/PutBucketLifecycleConfigurationCommand\";\nimport { PutBucketLoggingCommand, } from \"./commands/PutBucketLoggingCommand\";\nimport { PutBucketMetricsConfigurationCommand, } from \"./commands/PutBucketMetricsConfigurationCommand\";\nimport { PutBucketNotificationConfigurationCommand, } from \"./commands/PutBucketNotificationConfigurationCommand\";\nimport { PutBucketOwnershipControlsCommand, } from \"./commands/PutBucketOwnershipControlsCommand\";\nimport { PutBucketPolicyCommand, } from \"./commands/PutBucketPolicyCommand\";\nimport { PutBucketReplicationCommand, } from \"./commands/PutBucketReplicationCommand\";\nimport { PutBucketRequestPaymentCommand, } from \"./commands/PutBucketRequestPaymentCommand\";\nimport { PutBucketTaggingCommand, } from \"./commands/PutBucketTaggingCommand\";\nimport { PutBucketVersioningCommand, } from \"./commands/PutBucketVersioningCommand\";\nimport { PutBucketWebsiteCommand, } from \"./commands/PutBucketWebsiteCommand\";\nimport { PutObjectAclCommand, } from \"./commands/PutObjectAclCommand\";\nimport { PutObjectCommand } from \"./commands/PutObjectCommand\";\nimport { PutObjectLegalHoldCommand, } from \"./commands/PutObjectLegalHoldCommand\";\nimport { PutObjectLockConfigurationCommand, } from \"./commands/PutObjectLockConfigurationCommand\";\nimport { PutObjectRetentionCommand, } from \"./commands/PutObjectRetentionCommand\";\nimport { PutObjectTaggingCommand, } from \"./commands/PutObjectTaggingCommand\";\nimport { PutPublicAccessBlockCommand, } from \"./commands/PutPublicAccessBlockCommand\";\nimport { RenameObjectCommand, } from \"./commands/RenameObjectCommand\";\nimport { RestoreObjectCommand, } from \"./commands/RestoreObjectCommand\";\nimport { SelectObjectContentCommand, } from \"./commands/SelectObjectContentCommand\";\nimport { UpdateBucketMetadataInventoryTableConfigurationCommand, } from \"./commands/UpdateBucketMetadataInventoryTableConfigurationCommand\";\nimport { UpdateBucketMetadataJournalTableConfigurationCommand, } from \"./commands/UpdateBucketMetadataJournalTableConfigurationCommand\";\nimport { UpdateObjectEncryptionCommand, } from \"./commands/UpdateObjectEncryptionCommand\";\nimport { UploadPartCommand } from \"./commands/UploadPartCommand\";\nimport { UploadPartCopyCommand, } from \"./commands/UploadPartCopyCommand\";\nimport { WriteGetObjectResponseCommand, } from \"./commands/WriteGetObjectResponseCommand\";\nimport { paginateListBuckets } from \"./pagination/ListBucketsPaginator\";\nimport { paginateListDirectoryBuckets } from \"./pagination/ListDirectoryBucketsPaginator\";\nimport { paginateListObjectsV2 } from \"./pagination/ListObjectsV2Paginator\";\nimport { paginateListParts } from \"./pagination/ListPartsPaginator\";\nimport { S3Client } from \"./S3Client\";\nimport { waitUntilBucketExists } from \"./waiters/waitForBucketExists\";\nimport { waitUntilBucketNotExists } from \"./waiters/waitForBucketNotExists\";\nimport { waitUntilObjectExists } from \"./waiters/waitForObjectExists\";\nimport { waitUntilObjectNotExists } from \"./waiters/waitForObjectNotExists\";\nconst commands = {\n AbortMultipartUploadCommand,\n CompleteMultipartUploadCommand,\n CopyObjectCommand,\n CreateBucketCommand,\n CreateBucketMetadataConfigurationCommand,\n CreateBucketMetadataTableConfigurationCommand,\n CreateMultipartUploadCommand,\n CreateSessionCommand,\n DeleteBucketCommand,\n DeleteBucketAnalyticsConfigurationCommand,\n DeleteBucketCorsCommand,\n DeleteBucketEncryptionCommand,\n DeleteBucketIntelligentTieringConfigurationCommand,\n DeleteBucketInventoryConfigurationCommand,\n DeleteBucketLifecycleCommand,\n DeleteBucketMetadataConfigurationCommand,\n DeleteBucketMetadataTableConfigurationCommand,\n DeleteBucketMetricsConfigurationCommand,\n DeleteBucketOwnershipControlsCommand,\n DeleteBucketPolicyCommand,\n DeleteBucketReplicationCommand,\n DeleteBucketTaggingCommand,\n DeleteBucketWebsiteCommand,\n DeleteObjectCommand,\n DeleteObjectsCommand,\n DeleteObjectTaggingCommand,\n DeletePublicAccessBlockCommand,\n GetBucketAbacCommand,\n GetBucketAccelerateConfigurationCommand,\n GetBucketAclCommand,\n GetBucketAnalyticsConfigurationCommand,\n GetBucketCorsCommand,\n GetBucketEncryptionCommand,\n GetBucketIntelligentTieringConfigurationCommand,\n GetBucketInventoryConfigurationCommand,\n GetBucketLifecycleConfigurationCommand,\n GetBucketLocationCommand,\n GetBucketLoggingCommand,\n GetBucketMetadataConfigurationCommand,\n GetBucketMetadataTableConfigurationCommand,\n GetBucketMetricsConfigurationCommand,\n GetBucketNotificationConfigurationCommand,\n GetBucketOwnershipControlsCommand,\n GetBucketPolicyCommand,\n GetBucketPolicyStatusCommand,\n GetBucketReplicationCommand,\n GetBucketRequestPaymentCommand,\n GetBucketTaggingCommand,\n GetBucketVersioningCommand,\n GetBucketWebsiteCommand,\n GetObjectCommand,\n GetObjectAclCommand,\n GetObjectAttributesCommand,\n GetObjectLegalHoldCommand,\n GetObjectLockConfigurationCommand,\n GetObjectRetentionCommand,\n GetObjectTaggingCommand,\n GetObjectTorrentCommand,\n GetPublicAccessBlockCommand,\n HeadBucketCommand,\n HeadObjectCommand,\n ListBucketAnalyticsConfigurationsCommand,\n ListBucketIntelligentTieringConfigurationsCommand,\n ListBucketInventoryConfigurationsCommand,\n ListBucketMetricsConfigurationsCommand,\n ListBucketsCommand,\n ListDirectoryBucketsCommand,\n ListMultipartUploadsCommand,\n ListObjectsCommand,\n ListObjectsV2Command,\n ListObjectVersionsCommand,\n ListPartsCommand,\n PutBucketAbacCommand,\n PutBucketAccelerateConfigurationCommand,\n PutBucketAclCommand,\n PutBucketAnalyticsConfigurationCommand,\n PutBucketCorsCommand,\n PutBucketEncryptionCommand,\n PutBucketIntelligentTieringConfigurationCommand,\n PutBucketInventoryConfigurationCommand,\n PutBucketLifecycleConfigurationCommand,\n PutBucketLoggingCommand,\n PutBucketMetricsConfigurationCommand,\n PutBucketNotificationConfigurationCommand,\n PutBucketOwnershipControlsCommand,\n PutBucketPolicyCommand,\n PutBucketReplicationCommand,\n PutBucketRequestPaymentCommand,\n PutBucketTaggingCommand,\n PutBucketVersioningCommand,\n PutBucketWebsiteCommand,\n PutObjectCommand,\n PutObjectAclCommand,\n PutObjectLegalHoldCommand,\n PutObjectLockConfigurationCommand,\n PutObjectRetentionCommand,\n PutObjectTaggingCommand,\n PutPublicAccessBlockCommand,\n RenameObjectCommand,\n RestoreObjectCommand,\n SelectObjectContentCommand,\n UpdateBucketMetadataInventoryTableConfigurationCommand,\n UpdateBucketMetadataJournalTableConfigurationCommand,\n UpdateObjectEncryptionCommand,\n UploadPartCommand,\n UploadPartCopyCommand,\n WriteGetObjectResponseCommand,\n};\nconst paginators = {\n paginateListBuckets,\n paginateListDirectoryBuckets,\n paginateListObjectsV2,\n paginateListParts,\n};\nconst waiters = {\n waitUntilBucketExists,\n waitUntilBucketNotExists,\n waitUntilObjectExists,\n waitUntilObjectNotExists,\n};\nexport class S3 extends S3Client {\n}\ncreateAggregatedClient(commands, S3, { paginators, waiters });\n", "export * from \"./AbortMultipartUploadCommand\";\nexport * from \"./CompleteMultipartUploadCommand\";\nexport * from \"./CopyObjectCommand\";\nexport * from \"./CreateBucketCommand\";\nexport * from \"./CreateBucketMetadataConfigurationCommand\";\nexport * from \"./CreateBucketMetadataTableConfigurationCommand\";\nexport * from \"./CreateMultipartUploadCommand\";\nexport * from \"./CreateSessionCommand\";\nexport * from \"./DeleteBucketAnalyticsConfigurationCommand\";\nexport * from \"./DeleteBucketCommand\";\nexport * from \"./DeleteBucketCorsCommand\";\nexport * from \"./DeleteBucketEncryptionCommand\";\nexport * from \"./DeleteBucketIntelligentTieringConfigurationCommand\";\nexport * from \"./DeleteBucketInventoryConfigurationCommand\";\nexport * from \"./DeleteBucketLifecycleCommand\";\nexport * from \"./DeleteBucketMetadataConfigurationCommand\";\nexport * from \"./DeleteBucketMetadataTableConfigurationCommand\";\nexport * from \"./DeleteBucketMetricsConfigurationCommand\";\nexport * from \"./DeleteBucketOwnershipControlsCommand\";\nexport * from \"./DeleteBucketPolicyCommand\";\nexport * from \"./DeleteBucketReplicationCommand\";\nexport * from \"./DeleteBucketTaggingCommand\";\nexport * from \"./DeleteBucketWebsiteCommand\";\nexport * from \"./DeleteObjectCommand\";\nexport * from \"./DeleteObjectTaggingCommand\";\nexport * from \"./DeleteObjectsCommand\";\nexport * from \"./DeletePublicAccessBlockCommand\";\nexport * from \"./GetBucketAbacCommand\";\nexport * from \"./GetBucketAccelerateConfigurationCommand\";\nexport * from \"./GetBucketAclCommand\";\nexport * from \"./GetBucketAnalyticsConfigurationCommand\";\nexport * from \"./GetBucketCorsCommand\";\nexport * from \"./GetBucketEncryptionCommand\";\nexport * from \"./GetBucketIntelligentTieringConfigurationCommand\";\nexport * from \"./GetBucketInventoryConfigurationCommand\";\nexport * from \"./GetBucketLifecycleConfigurationCommand\";\nexport * from \"./GetBucketLocationCommand\";\nexport * from \"./GetBucketLoggingCommand\";\nexport * from \"./GetBucketMetadataConfigurationCommand\";\nexport * from \"./GetBucketMetadataTableConfigurationCommand\";\nexport * from \"./GetBucketMetricsConfigurationCommand\";\nexport * from \"./GetBucketNotificationConfigurationCommand\";\nexport * from \"./GetBucketOwnershipControlsCommand\";\nexport * from \"./GetBucketPolicyCommand\";\nexport * from \"./GetBucketPolicyStatusCommand\";\nexport * from \"./GetBucketReplicationCommand\";\nexport * from \"./GetBucketRequestPaymentCommand\";\nexport * from \"./GetBucketTaggingCommand\";\nexport * from \"./GetBucketVersioningCommand\";\nexport * from \"./GetBucketWebsiteCommand\";\nexport * from \"./GetObjectAclCommand\";\nexport * from \"./GetObjectAttributesCommand\";\nexport * from \"./GetObjectCommand\";\nexport * from \"./GetObjectLegalHoldCommand\";\nexport * from \"./GetObjectLockConfigurationCommand\";\nexport * from \"./GetObjectRetentionCommand\";\nexport * from \"./GetObjectTaggingCommand\";\nexport * from \"./GetObjectTorrentCommand\";\nexport * from \"./GetPublicAccessBlockCommand\";\nexport * from \"./HeadBucketCommand\";\nexport * from \"./HeadObjectCommand\";\nexport * from \"./ListBucketAnalyticsConfigurationsCommand\";\nexport * from \"./ListBucketIntelligentTieringConfigurationsCommand\";\nexport * from \"./ListBucketInventoryConfigurationsCommand\";\nexport * from \"./ListBucketMetricsConfigurationsCommand\";\nexport * from \"./ListBucketsCommand\";\nexport * from \"./ListDirectoryBucketsCommand\";\nexport * from \"./ListMultipartUploadsCommand\";\nexport * from \"./ListObjectVersionsCommand\";\nexport * from \"./ListObjectsCommand\";\nexport * from \"./ListObjectsV2Command\";\nexport * from \"./ListPartsCommand\";\nexport * from \"./PutBucketAbacCommand\";\nexport * from \"./PutBucketAccelerateConfigurationCommand\";\nexport * from \"./PutBucketAclCommand\";\nexport * from \"./PutBucketAnalyticsConfigurationCommand\";\nexport * from \"./PutBucketCorsCommand\";\nexport * from \"./PutBucketEncryptionCommand\";\nexport * from \"./PutBucketIntelligentTieringConfigurationCommand\";\nexport * from \"./PutBucketInventoryConfigurationCommand\";\nexport * from \"./PutBucketLifecycleConfigurationCommand\";\nexport * from \"./PutBucketLoggingCommand\";\nexport * from \"./PutBucketMetricsConfigurationCommand\";\nexport * from \"./PutBucketNotificationConfigurationCommand\";\nexport * from \"./PutBucketOwnershipControlsCommand\";\nexport * from \"./PutBucketPolicyCommand\";\nexport * from \"./PutBucketReplicationCommand\";\nexport * from \"./PutBucketRequestPaymentCommand\";\nexport * from \"./PutBucketTaggingCommand\";\nexport * from \"./PutBucketVersioningCommand\";\nexport * from \"./PutBucketWebsiteCommand\";\nexport * from \"./PutObjectAclCommand\";\nexport * from \"./PutObjectCommand\";\nexport * from \"./PutObjectLegalHoldCommand\";\nexport * from \"./PutObjectLockConfigurationCommand\";\nexport * from \"./PutObjectRetentionCommand\";\nexport * from \"./PutObjectTaggingCommand\";\nexport * from \"./PutPublicAccessBlockCommand\";\nexport * from \"./RenameObjectCommand\";\nexport * from \"./RestoreObjectCommand\";\nexport * from \"./SelectObjectContentCommand\";\nexport * from \"./UpdateBucketMetadataInventoryTableConfigurationCommand\";\nexport * from \"./UpdateBucketMetadataJournalTableConfigurationCommand\";\nexport * from \"./UpdateObjectEncryptionCommand\";\nexport * from \"./UploadPartCommand\";\nexport * from \"./UploadPartCopyCommand\";\nexport * from \"./WriteGetObjectResponseCommand\";\n", "export {};\n", "export * from \"./Interfaces\";\nexport * from \"./ListBucketsPaginator\";\nexport * from \"./ListDirectoryBucketsPaginator\";\nexport * from \"./ListObjectsV2Paginator\";\nexport * from \"./ListPartsPaginator\";\n", "export * from \"./waitForBucketExists\";\nexport * from \"./waitForBucketNotExists\";\nexport * from \"./waitForObjectExists\";\nexport * from \"./waitForObjectNotExists\";\n", "export const BucketAbacStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const RequestCharged = {\n requester: \"requester\",\n};\nexport const RequestPayer = {\n requester: \"requester\",\n};\nexport const BucketAccelerateStatus = {\n Enabled: \"Enabled\",\n Suspended: \"Suspended\",\n};\nexport const Type = {\n AmazonCustomerByEmail: \"AmazonCustomerByEmail\",\n CanonicalUser: \"CanonicalUser\",\n Group: \"Group\",\n};\nexport const Permission = {\n FULL_CONTROL: \"FULL_CONTROL\",\n READ: \"READ\",\n READ_ACP: \"READ_ACP\",\n WRITE: \"WRITE\",\n WRITE_ACP: \"WRITE_ACP\",\n};\nexport const OwnerOverride = {\n Destination: \"Destination\",\n};\nexport const ChecksumType = {\n COMPOSITE: \"COMPOSITE\",\n FULL_OBJECT: \"FULL_OBJECT\",\n};\nexport const ServerSideEncryption = {\n AES256: \"AES256\",\n aws_fsx: \"aws:fsx\",\n aws_kms: \"aws:kms\",\n aws_kms_dsse: \"aws:kms:dsse\",\n};\nexport const ObjectCannedACL = {\n authenticated_read: \"authenticated-read\",\n aws_exec_read: \"aws-exec-read\",\n bucket_owner_full_control: \"bucket-owner-full-control\",\n bucket_owner_read: \"bucket-owner-read\",\n private: \"private\",\n public_read: \"public-read\",\n public_read_write: \"public-read-write\",\n};\nexport const ChecksumAlgorithm = {\n CRC32: \"CRC32\",\n CRC32C: \"CRC32C\",\n CRC64NVME: \"CRC64NVME\",\n SHA1: \"SHA1\",\n SHA256: \"SHA256\",\n};\nexport const MetadataDirective = {\n COPY: \"COPY\",\n REPLACE: \"REPLACE\",\n};\nexport const ObjectLockLegalHoldStatus = {\n OFF: \"OFF\",\n ON: \"ON\",\n};\nexport const ObjectLockMode = {\n COMPLIANCE: \"COMPLIANCE\",\n GOVERNANCE: \"GOVERNANCE\",\n};\nexport const StorageClass = {\n DEEP_ARCHIVE: \"DEEP_ARCHIVE\",\n EXPRESS_ONEZONE: \"EXPRESS_ONEZONE\",\n FSX_ONTAP: \"FSX_ONTAP\",\n FSX_OPENZFS: \"FSX_OPENZFS\",\n GLACIER: \"GLACIER\",\n GLACIER_IR: \"GLACIER_IR\",\n INTELLIGENT_TIERING: \"INTELLIGENT_TIERING\",\n ONEZONE_IA: \"ONEZONE_IA\",\n OUTPOSTS: \"OUTPOSTS\",\n REDUCED_REDUNDANCY: \"REDUCED_REDUNDANCY\",\n SNOW: \"SNOW\",\n STANDARD: \"STANDARD\",\n STANDARD_IA: \"STANDARD_IA\",\n};\nexport const TaggingDirective = {\n COPY: \"COPY\",\n REPLACE: \"REPLACE\",\n};\nexport const BucketCannedACL = {\n authenticated_read: \"authenticated-read\",\n private: \"private\",\n public_read: \"public-read\",\n public_read_write: \"public-read-write\",\n};\nexport const BucketNamespace = {\n ACCOUNT_REGIONAL: \"account-regional\",\n GLOBAL: \"global\",\n};\nexport const DataRedundancy = {\n SingleAvailabilityZone: \"SingleAvailabilityZone\",\n SingleLocalZone: \"SingleLocalZone\",\n};\nexport const BucketType = {\n Directory: \"Directory\",\n};\nexport const LocationType = {\n AvailabilityZone: \"AvailabilityZone\",\n LocalZone: \"LocalZone\",\n};\nexport const BucketLocationConstraint = {\n EU: \"EU\",\n af_south_1: \"af-south-1\",\n ap_east_1: \"ap-east-1\",\n ap_northeast_1: \"ap-northeast-1\",\n ap_northeast_2: \"ap-northeast-2\",\n ap_northeast_3: \"ap-northeast-3\",\n ap_south_1: \"ap-south-1\",\n ap_south_2: \"ap-south-2\",\n ap_southeast_1: \"ap-southeast-1\",\n ap_southeast_2: \"ap-southeast-2\",\n ap_southeast_3: \"ap-southeast-3\",\n ap_southeast_4: \"ap-southeast-4\",\n ap_southeast_5: \"ap-southeast-5\",\n ca_central_1: \"ca-central-1\",\n cn_north_1: \"cn-north-1\",\n cn_northwest_1: \"cn-northwest-1\",\n eu_central_1: \"eu-central-1\",\n eu_central_2: \"eu-central-2\",\n eu_north_1: \"eu-north-1\",\n eu_south_1: \"eu-south-1\",\n eu_south_2: \"eu-south-2\",\n eu_west_1: \"eu-west-1\",\n eu_west_2: \"eu-west-2\",\n eu_west_3: \"eu-west-3\",\n il_central_1: \"il-central-1\",\n me_central_1: \"me-central-1\",\n me_south_1: \"me-south-1\",\n sa_east_1: \"sa-east-1\",\n us_east_2: \"us-east-2\",\n us_gov_east_1: \"us-gov-east-1\",\n us_gov_west_1: \"us-gov-west-1\",\n us_west_1: \"us-west-1\",\n us_west_2: \"us-west-2\",\n};\nexport const ObjectOwnership = {\n BucketOwnerEnforced: \"BucketOwnerEnforced\",\n BucketOwnerPreferred: \"BucketOwnerPreferred\",\n ObjectWriter: \"ObjectWriter\",\n};\nexport const InventoryConfigurationState = {\n DISABLED: \"DISABLED\",\n ENABLED: \"ENABLED\",\n};\nexport const TableSseAlgorithm = {\n AES256: \"AES256\",\n aws_kms: \"aws:kms\",\n};\nexport const ExpirationState = {\n DISABLED: \"DISABLED\",\n ENABLED: \"ENABLED\",\n};\nexport const SessionMode = {\n ReadOnly: \"ReadOnly\",\n ReadWrite: \"ReadWrite\",\n};\nexport const AnalyticsS3ExportFileFormat = {\n CSV: \"CSV\",\n};\nexport const StorageClassAnalysisSchemaVersion = {\n V_1: \"V_1\",\n};\nexport const EncryptionType = {\n NONE: \"NONE\",\n SSE_C: \"SSE-C\",\n};\nexport const IntelligentTieringStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const IntelligentTieringAccessTier = {\n ARCHIVE_ACCESS: \"ARCHIVE_ACCESS\",\n DEEP_ARCHIVE_ACCESS: \"DEEP_ARCHIVE_ACCESS\",\n};\nexport const InventoryFormat = {\n CSV: \"CSV\",\n ORC: \"ORC\",\n Parquet: \"Parquet\",\n};\nexport const InventoryIncludedObjectVersions = {\n All: \"All\",\n Current: \"Current\",\n};\nexport const InventoryOptionalField = {\n BucketKeyStatus: \"BucketKeyStatus\",\n ChecksumAlgorithm: \"ChecksumAlgorithm\",\n ETag: \"ETag\",\n EncryptionStatus: \"EncryptionStatus\",\n IntelligentTieringAccessTier: \"IntelligentTieringAccessTier\",\n IsMultipartUploaded: \"IsMultipartUploaded\",\n LastModifiedDate: \"LastModifiedDate\",\n LifecycleExpirationDate: \"LifecycleExpirationDate\",\n ObjectAccessControlList: \"ObjectAccessControlList\",\n ObjectLockLegalHoldStatus: \"ObjectLockLegalHoldStatus\",\n ObjectLockMode: \"ObjectLockMode\",\n ObjectLockRetainUntilDate: \"ObjectLockRetainUntilDate\",\n ObjectOwner: \"ObjectOwner\",\n ReplicationStatus: \"ReplicationStatus\",\n Size: \"Size\",\n StorageClass: \"StorageClass\",\n};\nexport const InventoryFrequency = {\n Daily: \"Daily\",\n Weekly: \"Weekly\",\n};\nexport const TransitionStorageClass = {\n DEEP_ARCHIVE: \"DEEP_ARCHIVE\",\n GLACIER: \"GLACIER\",\n GLACIER_IR: \"GLACIER_IR\",\n INTELLIGENT_TIERING: \"INTELLIGENT_TIERING\",\n ONEZONE_IA: \"ONEZONE_IA\",\n STANDARD_IA: \"STANDARD_IA\",\n};\nexport const ExpirationStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const TransitionDefaultMinimumObjectSize = {\n all_storage_classes_128K: \"all_storage_classes_128K\",\n varies_by_storage_class: \"varies_by_storage_class\",\n};\nexport const BucketLogsPermission = {\n FULL_CONTROL: \"FULL_CONTROL\",\n READ: \"READ\",\n WRITE: \"WRITE\",\n};\nexport const PartitionDateSource = {\n DeliveryTime: \"DeliveryTime\",\n EventTime: \"EventTime\",\n};\nexport const S3TablesBucketType = {\n aws: \"aws\",\n customer: \"customer\",\n};\nexport const Event = {\n s3_IntelligentTiering: \"s3:IntelligentTiering\",\n s3_LifecycleExpiration_: \"s3:LifecycleExpiration:*\",\n s3_LifecycleExpiration_Delete: \"s3:LifecycleExpiration:Delete\",\n s3_LifecycleExpiration_DeleteMarkerCreated: \"s3:LifecycleExpiration:DeleteMarkerCreated\",\n s3_LifecycleTransition: \"s3:LifecycleTransition\",\n s3_ObjectAcl_Put: \"s3:ObjectAcl:Put\",\n s3_ObjectCreated_: \"s3:ObjectCreated:*\",\n s3_ObjectCreated_CompleteMultipartUpload: \"s3:ObjectCreated:CompleteMultipartUpload\",\n s3_ObjectCreated_Copy: \"s3:ObjectCreated:Copy\",\n s3_ObjectCreated_Post: \"s3:ObjectCreated:Post\",\n s3_ObjectCreated_Put: \"s3:ObjectCreated:Put\",\n s3_ObjectRemoved_: \"s3:ObjectRemoved:*\",\n s3_ObjectRemoved_Delete: \"s3:ObjectRemoved:Delete\",\n s3_ObjectRemoved_DeleteMarkerCreated: \"s3:ObjectRemoved:DeleteMarkerCreated\",\n s3_ObjectRestore_: \"s3:ObjectRestore:*\",\n s3_ObjectRestore_Completed: \"s3:ObjectRestore:Completed\",\n s3_ObjectRestore_Delete: \"s3:ObjectRestore:Delete\",\n s3_ObjectRestore_Post: \"s3:ObjectRestore:Post\",\n s3_ObjectTagging_: \"s3:ObjectTagging:*\",\n s3_ObjectTagging_Delete: \"s3:ObjectTagging:Delete\",\n s3_ObjectTagging_Put: \"s3:ObjectTagging:Put\",\n s3_ReducedRedundancyLostObject: \"s3:ReducedRedundancyLostObject\",\n s3_Replication_: \"s3:Replication:*\",\n s3_Replication_OperationFailedReplication: \"s3:Replication:OperationFailedReplication\",\n s3_Replication_OperationMissedThreshold: \"s3:Replication:OperationMissedThreshold\",\n s3_Replication_OperationNotTracked: \"s3:Replication:OperationNotTracked\",\n s3_Replication_OperationReplicatedAfterThreshold: \"s3:Replication:OperationReplicatedAfterThreshold\",\n};\nexport const FilterRuleName = {\n prefix: \"prefix\",\n suffix: \"suffix\",\n};\nexport const DeleteMarkerReplicationStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const MetricsStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const ReplicationTimeStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const ExistingObjectReplicationStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const ReplicaModificationsStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const SseKmsEncryptedObjectsStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const ReplicationRuleStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const Payer = {\n BucketOwner: \"BucketOwner\",\n Requester: \"Requester\",\n};\nexport const MFADeleteStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const BucketVersioningStatus = {\n Enabled: \"Enabled\",\n Suspended: \"Suspended\",\n};\nexport const Protocol = {\n http: \"http\",\n https: \"https\",\n};\nexport const ReplicationStatus = {\n COMPLETE: \"COMPLETE\",\n COMPLETED: \"COMPLETED\",\n FAILED: \"FAILED\",\n PENDING: \"PENDING\",\n REPLICA: \"REPLICA\",\n};\nexport const ChecksumMode = {\n ENABLED: \"ENABLED\",\n};\nexport const ObjectAttributes = {\n CHECKSUM: \"Checksum\",\n ETAG: \"ETag\",\n OBJECT_PARTS: \"ObjectParts\",\n OBJECT_SIZE: \"ObjectSize\",\n STORAGE_CLASS: \"StorageClass\",\n};\nexport const ObjectLockEnabled = {\n Enabled: \"Enabled\",\n};\nexport const ObjectLockRetentionMode = {\n COMPLIANCE: \"COMPLIANCE\",\n GOVERNANCE: \"GOVERNANCE\",\n};\nexport const ArchiveStatus = {\n ARCHIVE_ACCESS: \"ARCHIVE_ACCESS\",\n DEEP_ARCHIVE_ACCESS: \"DEEP_ARCHIVE_ACCESS\",\n};\nexport const EncodingType = {\n url: \"url\",\n};\nexport const ObjectStorageClass = {\n DEEP_ARCHIVE: \"DEEP_ARCHIVE\",\n EXPRESS_ONEZONE: \"EXPRESS_ONEZONE\",\n FSX_ONTAP: \"FSX_ONTAP\",\n FSX_OPENZFS: \"FSX_OPENZFS\",\n GLACIER: \"GLACIER\",\n GLACIER_IR: \"GLACIER_IR\",\n INTELLIGENT_TIERING: \"INTELLIGENT_TIERING\",\n ONEZONE_IA: \"ONEZONE_IA\",\n OUTPOSTS: \"OUTPOSTS\",\n REDUCED_REDUNDANCY: \"REDUCED_REDUNDANCY\",\n SNOW: \"SNOW\",\n STANDARD: \"STANDARD\",\n STANDARD_IA: \"STANDARD_IA\",\n};\nexport const OptionalObjectAttributes = {\n RESTORE_STATUS: \"RestoreStatus\",\n};\nexport const ObjectVersionStorageClass = {\n STANDARD: \"STANDARD\",\n};\nexport const MFADelete = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const Tier = {\n Bulk: \"Bulk\",\n Expedited: \"Expedited\",\n Standard: \"Standard\",\n};\nexport const ExpressionType = {\n SQL: \"SQL\",\n};\nexport const CompressionType = {\n BZIP2: \"BZIP2\",\n GZIP: \"GZIP\",\n NONE: \"NONE\",\n};\nexport const FileHeaderInfo = {\n IGNORE: \"IGNORE\",\n NONE: \"NONE\",\n USE: \"USE\",\n};\nexport const JSONType = {\n DOCUMENT: \"DOCUMENT\",\n LINES: \"LINES\",\n};\nexport const QuoteFields = {\n ALWAYS: \"ALWAYS\",\n ASNEEDED: \"ASNEEDED\",\n};\nexport const RestoreRequestType = {\n SELECT: \"SELECT\",\n};\n", "export {};\n", "export {};\n", "export * from \"./S3Client\";\nexport * from \"./S3\";\nexport * from \"./commands\";\nexport * from \"./schemas/schemas_0\";\nexport * from \"./pagination\";\nexport * from \"./waiters\";\nexport * from \"./models/enums\";\nexport * from \"./models/errors\";\nexport * from \"./models/models_0\";\nexport * from \"./models/models_1\";\nexport { S3ServiceException } from \"./models/S3ServiceException\";\n", "import { buildQueryString } from \"@smithy/querystring-builder\";\nexport function formatUrl(request) {\n const { port, query } = request;\n let { protocol, path, hostname } = request;\n if (protocol && protocol.slice(-1) !== \":\") {\n protocol += \":\";\n }\n if (port) {\n hostname += `:${port}`;\n }\n if (path && path.charAt(0) !== \"/\") {\n path = `/${path}`;\n }\n let queryString = query ? buildQueryString(query) : \"\";\n if (queryString && queryString[0] !== \"?\") {\n queryString = `?${queryString}`;\n }\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n let fragment = \"\";\n if (request.fragment) {\n fragment = `#${request.fragment}`;\n }\n return `${protocol}//${auth}${hostname}${path}${queryString}${fragment}`;\n}\n", "export const UNSIGNED_PAYLOAD = \"UNSIGNED-PAYLOAD\";\nexport const SHA256_HEADER = \"X-Amz-Content-Sha256\";\nexport const ALGORITHM_QUERY_PARAM = \"X-Amz-Algorithm\";\nexport const CREDENTIAL_QUERY_PARAM = \"X-Amz-Credential\";\nexport const AMZ_DATE_QUERY_PARAM = \"X-Amz-Date\";\nexport const SIGNED_HEADERS_QUERY_PARAM = \"X-Amz-SignedHeaders\";\nexport const EXPIRES_QUERY_PARAM = \"X-Amz-Expires\";\nexport const HOST_HEADER = \"host\";\nexport const ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256\";\n", "import { SignatureV4MultiRegion } from \"@aws-sdk/signature-v4-multi-region\";\nimport { SHA256_HEADER, UNSIGNED_PAYLOAD } from \"./constants\";\nexport class S3RequestPresigner {\n signer;\n constructor(options) {\n const resolvedOptions = {\n service: options.signingName || options.service || \"s3\",\n uriEscapePath: options.uriEscapePath || false,\n applyChecksum: options.applyChecksum || false,\n ...options,\n };\n this.signer = new SignatureV4MultiRegion(resolvedOptions);\n }\n presign(requestToSign, { unsignableHeaders = new Set(), hoistableHeaders = new Set(), unhoistableHeaders = new Set(), ...options } = {}) {\n this.prepareRequest(requestToSign, {\n unsignableHeaders,\n unhoistableHeaders,\n hoistableHeaders,\n });\n return this.signer.presign(requestToSign, {\n expiresIn: 900,\n unsignableHeaders,\n unhoistableHeaders,\n ...options,\n });\n }\n presignWithCredentials(requestToSign, credentials, { unsignableHeaders = new Set(), hoistableHeaders = new Set(), unhoistableHeaders = new Set(), ...options } = {}) {\n this.prepareRequest(requestToSign, {\n unsignableHeaders,\n unhoistableHeaders,\n hoistableHeaders,\n });\n return this.signer.presignWithCredentials(requestToSign, credentials, {\n expiresIn: 900,\n unsignableHeaders,\n unhoistableHeaders,\n ...options,\n });\n }\n prepareRequest(requestToSign, { unsignableHeaders = new Set(), unhoistableHeaders = new Set(), hoistableHeaders = new Set(), } = {}) {\n unsignableHeaders.add(\"content-type\");\n Object.keys(requestToSign.headers)\n .map((header) => header.toLowerCase())\n .filter((header) => header.startsWith(\"x-amz-server-side-encryption\"))\n .forEach((header) => {\n if (!hoistableHeaders.has(header)) {\n unhoistableHeaders.add(header);\n }\n });\n requestToSign.headers[SHA256_HEADER] = UNSIGNED_PAYLOAD;\n const currentHostHeader = requestToSign.headers.host;\n const port = requestToSign.port;\n const expectedHostHeader = `${requestToSign.hostname}${requestToSign.port != null ? \":\" + port : \"\"}`;\n if (!currentHostHeader || (currentHostHeader === requestToSign.hostname && requestToSign.port != null)) {\n requestToSign.headers.host = expectedHostHeader;\n }\n }\n}\n", "import { formatUrl } from \"@aws-sdk/util-format-url\";\nimport { getEndpointFromInstructions } from \"@smithy/middleware-endpoint\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { S3RequestPresigner } from \"./presigner\";\nexport const getSignedUrl = async (client, command, options = {}) => {\n let s3Presigner;\n let region;\n if (typeof client.config.endpointProvider === \"function\") {\n const endpointV2 = await getEndpointFromInstructions(command.input, command.constructor, client.config);\n const authScheme = endpointV2.properties?.authSchemes?.[0];\n if (authScheme?.name === \"sigv4a\") {\n region = authScheme?.signingRegionSet?.join(\",\");\n }\n else {\n region = authScheme?.signingRegion;\n }\n s3Presigner = new S3RequestPresigner({\n ...client.config,\n signingName: authScheme?.signingName,\n region: async () => region,\n });\n }\n else {\n s3Presigner = new S3RequestPresigner(client.config);\n }\n const presignInterceptMiddleware = (next, context) => async (args) => {\n const { request } = args;\n if (!HttpRequest.isInstance(request)) {\n throw new Error(\"Request to be presigned is not an valid HTTP request.\");\n }\n delete request.headers[\"amz-sdk-invocation-id\"];\n delete request.headers[\"amz-sdk-request\"];\n delete request.headers[\"x-amz-user-agent\"];\n let presigned;\n const presignerOptions = {\n ...options,\n signingRegion: options.signingRegion ?? context[\"signing_region\"] ?? region,\n signingService: options.signingService ?? context[\"signing_service\"],\n };\n if (context.s3ExpressIdentity) {\n presigned = await s3Presigner.presignWithCredentials(request, context.s3ExpressIdentity, presignerOptions);\n }\n else {\n presigned = await s3Presigner.presign(request, presignerOptions);\n }\n return {\n response: {},\n output: {\n $metadata: { httpStatusCode: 200 },\n presigned,\n },\n };\n };\n const middlewareName = \"presignInterceptMiddleware\";\n const clientStack = client.middlewareStack.clone();\n clientStack.addRelativeTo(presignInterceptMiddleware, {\n name: middlewareName,\n relation: \"before\",\n toMiddleware: \"awsAuthMiddleware\",\n override: true,\n });\n const handler = command.resolveMiddleware(clientStack, client.config, {});\n const { output } = await handler({ input: command.input });\n const { presigned } = output;\n return formatUrl(presigned);\n};\n", "export * from \"./getSignedUrl\";\nexport * from \"./presigner\";\n", "// import { s3A, awsBucketName, awsRegion, awsSecretAccessKey } from \"@/src/lib/env-exporter\"\nimport { DeleteObjectCommand, DeleteObjectsCommand, PutObjectCommand, S3Client, GetObjectCommand } from \"@aws-sdk/client-s3\"\nimport { getSignedUrl } from \"@aws-sdk/s3-request-presigner\"\n// import signedUrlCache from \"@/src/lib/signed-url-cache\" // Disabled for Workers compatibility\nimport { claimUploadUrlStatus, createUploadUrlStatus } from '@/src/dbService'\nimport { s3AccessKeyId, s3Region, s3Url, s3SecretAccessKey, s3BucketName, assetsDomain } from \"@/src/lib/env-exporter\"\n\nconst s3Client = new S3Client({\n region: s3Region,\n endpoint: s3Url,\n forcePathStyle: true,\n credentials: {\n accessKeyId: s3AccessKeyId,\n secretAccessKey: s3SecretAccessKey,\n },\n})\nexport default s3Client;\n\nexport const imageUploadS3 = async(body: Buffer, type: string, key:string) => {\n // const key = `${category}/${Date.now()}`\n const command = new PutObjectCommand({\n Bucket: s3BucketName,\n Key: key,\n Body: body,\n ContentType: type,\n })\n const resp = await s3Client.send(command)\n \n const imageUrl = `${key}`\n return imageUrl;\n}\n\n\n// export async function deleteImageUtil(...keys:string[]):Promise;\n\nexport async function deleteImageUtil({bucket = s3BucketName, keys}:{bucket?:string, keys: string[]}) {\n \n if (keys.length === 0) {\n return true;\n }\n try {\n const deleteParams = {\n Bucket: bucket,\n Delete: {\n Objects: keys.map((key) => ({ Key: key })),\n Quiet: false,\n }\n }\n \n const deleteCommand = new DeleteObjectsCommand(deleteParams)\n await s3Client.send(deleteCommand)\n return true\n }\n catch (error) {\n console.error(\"Error deleting image:\", error)\n throw new Error(\"Failed to delete image\")\n return false;\n }\n}\n\nexport function scaffoldAssetUrl(input: string | null): string\nexport function scaffoldAssetUrl(input: (string | null)[]): string[]\nexport function scaffoldAssetUrl(input: string | null | (string | null)[]): string | string[] {\n if (Array.isArray(input)) {\n return input.map(key => scaffoldAssetUrl(key) as string);\n }\n if (!input) {\n return '';\n }\n const normalizedKey = input.replace(/^\\/+/, '');\n const domain = assetsDomain.endsWith('/')\n ? assetsDomain.slice(0, -1)\n : assetsDomain;\n return `${domain}/${normalizedKey}`;\n}\n\n\n/**\n * Generate a signed URL from an S3 URL\n * @param s3Url The full S3 URL (e.g., https://bucket-name.s3.region.amazonaws.com/path/to/object)\n * @param expiresIn Expiration time in seconds (default: 259200 seconds = 3 days)\n * @returns A pre-signed URL that provides temporary access to the object\n */\nexport async function generateSignedUrlFromS3Url(s3UrlRaw: string|null, expiresIn: number = 259200): Promise {\n if (!s3UrlRaw) {\n return '';\n }\n\n const s3Url = s3UrlRaw\n \n try {\n // Cache disabled for Workers compatibility\n // const cachedUrl = signedUrlCache.get(s3Url);\n // if (cachedUrl) {\n // return cachedUrl;\n // }\n \n // Create the command to get the object\n const command = new GetObjectCommand({\n Bucket: s3BucketName,\n Key: s3Url,\n });\n \n // Generate the signed URL\n const signedUrl = await getSignedUrl(s3Client, command, { expiresIn });\n \n // Cache disabled for Workers compatibility\n // signedUrlCache.set(s3Url, signedUrl, (expiresIn * 1000) - 60000);\n \n return signedUrl;\n } catch (error) {\n console.error(\"Error generating signed URL:\", error);\n throw new Error(\"Failed to generate signed URL\");\n }\n}\n\n/**\n * Get the original S3 URL from a signed URL\n * @param signedUrl The signed URL \n * @returns The original S3 URL if found in cache, otherwise null\n */\nexport function getOriginalUrlFromSignedUrl(signedUrl: string|null): string|null {\n // Cache disabled for Workers compatibility - cannot retrieve original URL without cache\n // To re-enable, migrate signed-url-cache to object storage (R2/S3)\n return null;\n}\n\n/**\n * Generate signed URLs for multiple S3 URLs\n * @param s3Urls Array of S3 URLs or null values\n * @param expiresIn Expiration time in seconds (default: 259200 seconds = 3 days)\n * @returns Array of signed URLs (empty strings for null/invalid inputs)\n */\nexport async function generateSignedUrlsFromS3Urls(s3Urls: (string|null)[], expiresIn: number = 259200): Promise {\n if (!s3Urls || !s3Urls.length) {\n return [];\n }\n\n try {\n // Process URLs in parallel for better performance\n const signedUrls = await Promise.all(\n s3Urls.map(url => generateSignedUrlFromS3Url(url, expiresIn).catch(() => ''))\n );\n \n return signedUrls;\n } catch (error) {\n console.error(\"Error generating multiple signed URLs:\", error);\n // Return an array of empty strings with the same length as input\n return s3Urls.map(() => '');\n }\n}\n\nexport async function generateUploadUrl(key: string, mimeType: string, expiresIn: number = 180): Promise {\n try {\n // Insert record into upload_url_status\n await createUploadUrlStatus(key)\n\n // Generate signed upload URL\n const command = new PutObjectCommand({\n Bucket: s3BucketName,\n Key: key,\n ContentType: mimeType,\n });\n\n const signedUrl = await getSignedUrl(s3Client, command, { expiresIn });\n return signedUrl;\n } catch (error) {\n console.error('Error generating upload URL:', error);\n throw new Error('Failed to generate upload URL');\n }\n}\n\n\n// export function extractKeyFromPresignedUrl(url:string) {\n// const u = new URL(url);\n// const rawKey = u.pathname.replace(/^\\/+/, \"\"); // remove leading slash\n// return decodeURIComponent(rawKey);\n// }\n\n// New function (excludes bucket name)\nexport function extractKeyFromPresignedUrl(url: string): string {\n const u = new URL(url);\n const rawKey = u.pathname.replace(/^\\/+/, \"\"); // remove leading slash\n const decodedKey = decodeURIComponent(rawKey);\n // Remove bucket prefix\n const parts = decodedKey.split('/');\n parts.shift(); // Remove bucket name\n return parts.join('/');\n}\n\nexport async function claimUploadUrl(url: string): Promise {\n try {\n const semiKey = extractKeyFromPresignedUrl(url);\n\n // Update status to 'claimed' if currently 'pending'\n const updated = await claimUploadUrlStatus(semiKey)\n \n if (!updated) {\n throw new Error('Upload URL not found or already claimed');\n }\n } catch (error) {\n console.error('Error claiming upload URL:', error);\n throw new Error('Failed to claim upload URL');\n }\n}\n", "import { TRPCError } from './error/TRPCError';\nimport type { ParseFn } from './parser';\nimport type { ProcedureType } from './procedure';\nimport type { GetRawInputFn, Overwrite, Simplify } from './types';\nimport { isObject } from './utils';\n\n/** @internal */\nexport const middlewareMarker = 'middlewareMarker' as 'middlewareMarker' & {\n __brand: 'middlewareMarker';\n};\ntype MiddlewareMarker = typeof middlewareMarker;\n\ninterface MiddlewareResultBase {\n /**\n * All middlewares should pass through their `next()`'s output.\n * Requiring this marker makes sure that can't be forgotten at compile-time.\n */\n readonly marker: MiddlewareMarker;\n}\n\ninterface MiddlewareOKResult<_TContextOverride> extends MiddlewareResultBase {\n ok: true;\n data: unknown;\n // this could be extended with `input`/`rawInput` later\n}\n\ninterface MiddlewareErrorResult<_TContextOverride>\n extends MiddlewareResultBase {\n ok: false;\n error: TRPCError;\n}\n\n/**\n * @internal\n */\nexport type MiddlewareResult<_TContextOverride> =\n | MiddlewareErrorResult<_TContextOverride>\n | MiddlewareOKResult<_TContextOverride>;\n\n/**\n * @internal\n */\nexport interface MiddlewareBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n> {\n /**\n * Create a new builder based on the current middleware builder\n */\n unstable_pipe<$ContextOverridesOut>(\n fn:\n | MiddlewareFunction<\n TContext,\n TMeta,\n TContextOverrides,\n $ContextOverridesOut,\n TInputOut\n >\n | MiddlewareBuilder<\n Overwrite,\n TMeta,\n $ContextOverridesOut,\n TInputOut\n >,\n ): MiddlewareBuilder<\n TContext,\n TMeta,\n Overwrite,\n TInputOut\n >;\n\n /**\n * List of middlewares within this middleware builder\n */\n _middlewares: MiddlewareFunction<\n TContext,\n TMeta,\n TContextOverrides,\n object,\n TInputOut\n >[];\n}\n\n/**\n * @internal\n */\nexport type MiddlewareFunction<\n TContext,\n TMeta,\n TContextOverridesIn,\n $ContextOverridesOut,\n TInputOut,\n> = {\n (opts: {\n ctx: Simplify>;\n type: ProcedureType;\n path: string;\n input: TInputOut;\n getRawInput: GetRawInputFn;\n meta: TMeta | undefined;\n signal: AbortSignal | undefined;\n /**\n * The index of this call in a batch request.\n */\n batchIndex: number;\n next: {\n (): Promise>;\n <$ContextOverride>(opts: {\n ctx?: $ContextOverride;\n input?: unknown;\n }): Promise>;\n (opts: {\n getRawInput: GetRawInputFn;\n }): Promise>;\n };\n }): Promise>;\n _type?: string | undefined;\n};\n\nexport type AnyMiddlewareFunction = MiddlewareFunction;\nexport type AnyMiddlewareBuilder = MiddlewareBuilder;\n/**\n * @internal\n */\nexport function createMiddlewareFactory<\n TContext,\n TMeta,\n TInputOut = unknown,\n>() {\n function createMiddlewareInner(\n middlewares: AnyMiddlewareFunction[],\n ): AnyMiddlewareBuilder {\n return {\n _middlewares: middlewares,\n unstable_pipe(middlewareBuilderOrFn) {\n const pipedMiddleware =\n '_middlewares' in middlewareBuilderOrFn\n ? middlewareBuilderOrFn._middlewares\n : [middlewareBuilderOrFn];\n\n return createMiddlewareInner([...middlewares, ...pipedMiddleware]);\n },\n };\n }\n\n function createMiddleware<$ContextOverrides>(\n fn: MiddlewareFunction<\n TContext,\n TMeta,\n object,\n $ContextOverrides,\n TInputOut\n >,\n ): MiddlewareBuilder {\n return createMiddlewareInner([fn]);\n }\n\n return createMiddleware;\n}\n\n/**\n * Create a standalone middleware\n * @see https://trpc.io/docs/v11/server/middlewares#experimental-standalone-middlewares\n * @deprecated use `.concat()` instead\n */\nexport const experimental_standaloneMiddleware = <\n TCtx extends {\n ctx?: object;\n meta?: object;\n input?: unknown;\n },\n>() => ({\n create: createMiddlewareFactory<\n TCtx extends { ctx: infer T extends object } ? T : any,\n TCtx extends { meta: infer T extends object } ? T : object,\n TCtx extends { input: infer T } ? T : unknown\n >(),\n});\n\n/**\n * @internal\n * Please note, `trpc-openapi` uses this function.\n */\nexport function createInputMiddleware(parse: ParseFn) {\n const inputMiddleware: AnyMiddlewareFunction =\n async function inputValidatorMiddleware(opts) {\n let parsedInput: ReturnType;\n\n const rawInput = await opts.getRawInput();\n try {\n parsedInput = await parse(rawInput);\n } catch (cause) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n cause,\n });\n }\n\n // Multiple input parsers\n const combinedInput =\n isObject(opts.input) && isObject(parsedInput)\n ? {\n ...opts.input,\n ...parsedInput,\n }\n : parsedInput;\n\n return opts.next({ input: combinedInput });\n };\n inputMiddleware._type = 'input';\n return inputMiddleware;\n}\n\n/**\n * @internal\n */\nexport function createOutputMiddleware(parse: ParseFn) {\n const outputMiddleware: AnyMiddlewareFunction =\n async function outputValidatorMiddleware({ next }) {\n const result = await next();\n if (!result.ok) {\n // pass through failures without validating\n return result;\n }\n try {\n const data = await parse(result.data);\n return {\n ...result,\n data,\n };\n } catch (cause) {\n throw new TRPCError({\n message: 'Output validation failed',\n code: 'INTERNAL_SERVER_ERROR',\n cause,\n });\n }\n };\n outputMiddleware._type = 'output';\n return outputMiddleware;\n}\n", "import type { StandardSchemaV1 } from \"./spec\";\n\n/** A schema error with useful information. */\n\nexport class StandardSchemaV1Error extends Error {\n /** The schema issues. */\n public readonly issues: ReadonlyArray;\n\n /**\n * Creates a schema error with useful information.\n *\n * @param issues The schema issues.\n */\n constructor(issues: ReadonlyArray) {\n super(issues[0]?.message);\n this.name = 'SchemaError';\n this.issues = issues;\n }\n}\n", "import { StandardSchemaV1Error } from '../vendor/standard-schema-v1/error';\nimport { type StandardSchemaV1 } from '../vendor/standard-schema-v1/spec';\n\n// zod / typeschema\nexport type ParserZodEsque = {\n _input: TInput;\n _output: TParsedInput;\n};\n\nexport type ParserValibotEsque = {\n schema: {\n _types?: {\n input: TInput;\n output: TParsedInput;\n };\n };\n};\n\nexport type ParserArkTypeEsque = {\n inferIn: TInput;\n infer: TParsedInput;\n};\n\nexport type ParserStandardSchemaEsque = StandardSchemaV1<\n TInput,\n TParsedInput\n>;\n\nexport type ParserMyZodEsque = {\n parse: (input: any) => TInput;\n};\n\nexport type ParserSuperstructEsque = {\n create: (input: unknown) => TInput;\n};\n\nexport type ParserCustomValidatorEsque = (\n input: unknown,\n) => Promise | TInput;\n\nexport type ParserYupEsque = {\n validateSync: (input: unknown) => TInput;\n};\n\nexport type ParserScaleEsque = {\n assert(value: unknown): asserts value is TInput;\n};\n\nexport type ParserWithoutInput =\n | ParserCustomValidatorEsque\n | ParserMyZodEsque\n | ParserScaleEsque\n | ParserSuperstructEsque\n | ParserYupEsque;\n\nexport type ParserWithInputOutput =\n | ParserZodEsque\n | ParserValibotEsque\n | ParserArkTypeEsque\n | ParserStandardSchemaEsque;\n\nexport type Parser = ParserWithInputOutput | ParserWithoutInput;\n\nexport type inferParser =\n TParser extends ParserStandardSchemaEsque\n ? {\n in: $TIn;\n out: $TOut;\n }\n : TParser extends ParserWithInputOutput\n ? {\n in: $TIn;\n out: $TOut;\n }\n : TParser extends ParserWithoutInput\n ? {\n in: $InOut;\n out: $InOut;\n }\n : never;\n\nexport type ParseFn = (value: unknown) => Promise | TType;\n\nexport function getParseFn(procedureParser: Parser): ParseFn {\n const parser = procedureParser as any;\n const isStandardSchema = '~standard' in parser;\n\n if (typeof parser === 'function' && typeof parser.assert === 'function') {\n // ParserArkTypeEsque - arktype schemas shouldn't be called as a function because they return a union type instead of throwing\n return parser.assert.bind(parser);\n }\n\n if (typeof parser === 'function' && !isStandardSchema) {\n // ParserValibotEsque (>= v0.31.0)\n // ParserCustomValidatorEsque - note the check for standard-schema conformance - some libraries like `effect` use function schemas which are *not* a \"parse\" function.\n return parser;\n }\n\n if (typeof parser.parseAsync === 'function') {\n // ParserZodEsque\n return parser.parseAsync.bind(parser);\n }\n\n if (typeof parser.parse === 'function') {\n // ParserZodEsque\n // ParserValibotEsque (< v0.13.0)\n return parser.parse.bind(parser);\n }\n\n if (typeof parser.validateSync === 'function') {\n // ParserYupEsque\n return parser.validateSync.bind(parser);\n }\n\n if (typeof parser.create === 'function') {\n // ParserSuperstructEsque\n return parser.create.bind(parser);\n }\n\n if (typeof parser.assert === 'function') {\n // ParserScaleEsque\n return (value) => {\n parser.assert(value);\n return value as TType;\n };\n }\n\n if (isStandardSchema) {\n // StandardSchemaEsque\n return async (value) => {\n const result = await parser['~standard'].validate(value);\n if (result.issues) {\n throw new StandardSchemaV1Error(result.issues);\n }\n return result.value;\n };\n }\n\n throw new Error('Could not find a validator fn');\n}\n", "function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.includes(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose.js\");\nfunction _objectWithoutProperties(e, t) {\n if (null == e) return {};\n var o,\n r,\n i = objectWithoutPropertiesLoose(e, t);\n if (Object.getOwnPropertySymbols) {\n var s = Object.getOwnPropertySymbols(e);\n for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n }\n return i;\n}\nmodule.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import type { inferObservableValue, Observable } from '../observable';\nimport { getTRPCErrorFromUnknown, TRPCError } from './error/TRPCError';\nimport type {\n AnyMiddlewareFunction,\n MiddlewareBuilder,\n MiddlewareFunction,\n MiddlewareResult,\n} from './middleware';\nimport {\n createInputMiddleware,\n createOutputMiddleware,\n middlewareMarker,\n} from './middleware';\nimport type { inferParser, Parser } from './parser';\nimport { getParseFn } from './parser';\nimport type {\n AnyMutationProcedure,\n AnyProcedure,\n AnyQueryProcedure,\n LegacyObservableSubscriptionProcedure,\n MutationProcedure,\n ProcedureType,\n QueryProcedure,\n SubscriptionProcedure,\n} from './procedure';\nimport type { inferTrackedOutput } from './stream/tracked';\nimport type {\n GetRawInputFn,\n MaybePromise,\n Overwrite,\n Simplify,\n TypeError,\n} from './types';\nimport type { UnsetMarker } from './utils';\nimport { mergeWithoutOverrides } from './utils';\n\ntype IntersectIfDefined = TType extends UnsetMarker\n ? TWith\n : TWith extends UnsetMarker\n ? TType\n : Simplify;\n\ntype DefaultValue = TValue extends UnsetMarker\n ? TFallback\n : TValue;\n\ntype inferAsyncIterable =\n TOutput extends AsyncIterable\n ? {\n yield: $Yield;\n return: $Return;\n next: $Next;\n }\n : never;\ntype inferSubscriptionOutput =\n TOutput extends AsyncIterable\n ? AsyncIterable<\n inferTrackedOutput['yield']>,\n inferAsyncIterable['return'],\n inferAsyncIterable['next']\n >\n : TypeError<'Subscription output could not be inferred'>;\n\nexport type CallerOverride = (opts: {\n args: unknown[];\n invoke: (opts: ProcedureCallOptions) => Promise;\n _def: AnyProcedure['_def'];\n}) => Promise;\ntype ProcedureBuilderDef = {\n procedure: true;\n inputs: Parser[];\n output?: Parser;\n meta?: TMeta;\n resolver?: ProcedureBuilderResolver;\n middlewares: AnyMiddlewareFunction[];\n /**\n * @deprecated use `type` instead\n */\n mutation?: boolean;\n /**\n * @deprecated use `type` instead\n */\n query?: boolean;\n /**\n * @deprecated use `type` instead\n */\n subscription?: boolean;\n type?: ProcedureType;\n caller?: CallerOverride;\n};\n\ntype AnyProcedureBuilderDef = ProcedureBuilderDef;\n\n/**\n * Procedure resolver options (what the `.query()`, `.mutation()`, and `.subscription()` functions receive)\n * @internal\n */\nexport interface ProcedureResolverOptions<\n TContext,\n _TMeta,\n TContextOverridesIn,\n TInputOut,\n> {\n ctx: Simplify>;\n input: TInputOut extends UnsetMarker ? undefined : TInputOut;\n /**\n * The AbortSignal of the request\n */\n signal: AbortSignal | undefined;\n /**\n * The path of the procedure\n */\n path: string;\n /**\n * The index of this call in a batch request.\n * Will be set when the procedure is called as part of a batch.\n */\n batchIndex?: number;\n}\n\n/**\n * A procedure resolver\n */\ntype ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputParserIn,\n $Output,\n> = (\n opts: ProcedureResolverOptions,\n) => MaybePromise<\n // If an output parser is defined, we need to return what the parser expects, otherwise we return the inferred type\n DefaultValue\n>;\n\ntype AnyResolver = ProcedureResolver;\nexport type AnyProcedureBuilder = ProcedureBuilder<\n any,\n any,\n any,\n any,\n any,\n any,\n any,\n any\n>;\n\n/**\n * Infer the context type from a procedure builder\n * Useful to create common helper functions for different procedures\n */\nexport type inferProcedureBuilderResolverOptions<\n TProcedureBuilder extends AnyProcedureBuilder,\n> =\n TProcedureBuilder extends ProcedureBuilder<\n infer TContext,\n infer TMeta,\n infer TContextOverrides,\n infer _TInputIn,\n infer TInputOut,\n infer _TOutputIn,\n infer _TOutputOut,\n infer _TCaller\n >\n ? ProcedureResolverOptions<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut extends UnsetMarker\n ? // if input is not set, we don't want to infer it as `undefined` since a procedure further down the chain might have set an input\n unknown\n : TInputOut extends object\n ? Simplify<\n TInputOut & {\n /**\n * Extra input params might have been added by a `.input()` further down the chain\n */\n [keyAddedByInputCallFurtherDown: string]: unknown;\n }\n >\n : TInputOut\n >\n : never;\n\nexport interface ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputIn,\n TInputOut,\n TOutputIn,\n TOutputOut,\n TCaller extends boolean,\n> {\n /**\n * Add an input parser to the procedure.\n * @see https://trpc.io/docs/v11/server/validators\n */\n input<$Parser extends Parser>(\n schema: TInputOut extends UnsetMarker\n ? $Parser\n : inferParser<$Parser>['out'] extends Record | undefined\n ? TInputOut extends Record | undefined\n ? undefined extends inferParser<$Parser>['out'] // if current is optional the previous must be too\n ? undefined extends TInputOut\n ? $Parser\n : TypeError<'Cannot chain an optional parser to a required parser'>\n : $Parser\n : TypeError<'All input parsers did not resolve to an object'>\n : TypeError<'All input parsers did not resolve to an object'>,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n IntersectIfDefined['in']>,\n IntersectIfDefined['out']>,\n TOutputIn,\n TOutputOut,\n TCaller\n >;\n /**\n * Add an output parser to the procedure.\n * @see https://trpc.io/docs/v11/server/validators\n */\n output<$Parser extends Parser>(\n schema: $Parser,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputIn,\n TInputOut,\n IntersectIfDefined['in']>,\n IntersectIfDefined['out']>,\n TCaller\n >;\n /**\n * Add a meta data to the procedure.\n * @see https://trpc.io/docs/v11/server/metadata\n */\n meta(\n meta: TMeta,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputIn,\n TInputOut,\n TOutputIn,\n TOutputOut,\n TCaller\n >;\n /**\n * Add a middleware to the procedure.\n * @see https://trpc.io/docs/v11/server/middlewares\n */\n use<$ContextOverridesOut>(\n fn:\n | MiddlewareBuilder<\n Overwrite,\n TMeta,\n $ContextOverridesOut,\n TInputOut\n >\n | MiddlewareFunction<\n TContext,\n TMeta,\n TContextOverrides,\n $ContextOverridesOut,\n TInputOut\n >,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n Overwrite,\n TInputIn,\n TInputOut,\n TOutputIn,\n TOutputOut,\n TCaller\n >;\n\n /**\n * @deprecated use {@link concat} instead\n */\n unstable_concat<\n $Context,\n $Meta,\n $ContextOverrides,\n $InputIn,\n $InputOut,\n $OutputIn,\n $OutputOut,\n >(\n builder: Overwrite extends $Context\n ? TMeta extends $Meta\n ? ProcedureBuilder<\n $Context,\n $Meta,\n $ContextOverrides,\n $InputIn,\n $InputOut,\n $OutputIn,\n $OutputOut,\n TCaller\n >\n : TypeError<'Meta mismatch'>\n : TypeError<'Context mismatch'>,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n Overwrite,\n IntersectIfDefined,\n IntersectIfDefined,\n IntersectIfDefined,\n IntersectIfDefined,\n TCaller\n >;\n\n /**\n * Combine two procedure builders\n */\n concat<\n $Context,\n $Meta,\n $ContextOverrides,\n $InputIn,\n $InputOut,\n $OutputIn,\n $OutputOut,\n >(\n builder: Overwrite extends $Context\n ? TMeta extends $Meta\n ? ProcedureBuilder<\n $Context,\n $Meta,\n $ContextOverrides,\n $InputIn,\n $InputOut,\n $OutputIn,\n $OutputOut,\n TCaller\n >\n : TypeError<'Meta mismatch'>\n : TypeError<'Context mismatch'>,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n Overwrite,\n IntersectIfDefined,\n IntersectIfDefined,\n IntersectIfDefined,\n IntersectIfDefined,\n TCaller\n >;\n /**\n * Query procedure\n * @see https://trpc.io/docs/v11/concepts#vocabulary\n */\n query<$Output>(\n resolver: ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputIn,\n $Output\n >,\n ): TCaller extends true\n ? (\n input: DefaultValue,\n ) => Promise>\n : QueryProcedure<{\n input: DefaultValue;\n output: DefaultValue;\n meta: TMeta;\n }>;\n\n /**\n * Mutation procedure\n * @see https://trpc.io/docs/v11/concepts#vocabulary\n */\n mutation<$Output>(\n resolver: ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputIn,\n $Output\n >,\n ): TCaller extends true\n ? (\n input: DefaultValue,\n ) => Promise>\n : MutationProcedure<{\n input: DefaultValue;\n output: DefaultValue;\n meta: TMeta;\n }>;\n\n /**\n * Subscription procedure\n * @see https://trpc.io/docs/v11/server/subscriptions\n */\n subscription<$Output extends AsyncIterable>(\n resolver: ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputIn,\n $Output\n >,\n ): TCaller extends true\n ? TypeError<'Not implemented'>\n : SubscriptionProcedure<{\n input: DefaultValue;\n output: inferSubscriptionOutput>;\n meta: TMeta;\n }>;\n /**\n * @deprecated Using subscriptions with an observable is deprecated. Use an async generator instead.\n * This feature will be removed in v12 of tRPC.\n * @see https://trpc.io/docs/v11/server/subscriptions\n */\n subscription<$Output extends Observable>(\n resolver: ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputIn,\n $Output\n >,\n ): TCaller extends true\n ? TypeError<'Not implemented'>\n : LegacyObservableSubscriptionProcedure<{\n input: DefaultValue;\n output: inferObservableValue>;\n meta: TMeta;\n }>;\n /**\n * Overrides the way a procedure is invoked\n * Do not use this unless you know what you're doing - this is an experimental API\n */\n experimental_caller(\n caller: CallerOverride,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputIn,\n TInputOut,\n TOutputIn,\n TOutputOut,\n true\n >;\n /**\n * @internal\n */\n _def: ProcedureBuilderDef;\n}\n\ntype ProcedureBuilderResolver = (\n opts: ProcedureResolverOptions,\n) => Promise;\n\nfunction createNewBuilder(\n def1: AnyProcedureBuilderDef,\n def2: Partial,\n): AnyProcedureBuilder {\n const { middlewares = [], inputs, meta, ...rest } = def2;\n\n // TODO: maybe have a fn here to warn about calls\n return createBuilder({\n ...mergeWithoutOverrides(def1, rest),\n inputs: [...def1.inputs, ...(inputs ?? [])],\n middlewares: [...def1.middlewares, ...middlewares],\n meta: def1.meta && meta ? { ...def1.meta, ...meta } : (meta ?? def1.meta),\n });\n}\n\nexport function createBuilder(\n initDef: Partial = {},\n): ProcedureBuilder<\n TContext,\n TMeta,\n object,\n UnsetMarker,\n UnsetMarker,\n UnsetMarker,\n UnsetMarker,\n false\n> {\n const _def: AnyProcedureBuilderDef = {\n procedure: true,\n inputs: [],\n middlewares: [],\n ...initDef,\n };\n\n const builder: AnyProcedureBuilder = {\n _def,\n input(input) {\n const parser = getParseFn(input as Parser);\n return createNewBuilder(_def, {\n inputs: [input as Parser],\n middlewares: [createInputMiddleware(parser)],\n });\n },\n output(output: Parser) {\n const parser = getParseFn(output);\n return createNewBuilder(_def, {\n output,\n middlewares: [createOutputMiddleware(parser)],\n });\n },\n meta(meta) {\n return createNewBuilder(_def, {\n meta,\n });\n },\n use(middlewareBuilderOrFn) {\n // Distinguish between a middleware builder and a middleware function\n const middlewares =\n '_middlewares' in middlewareBuilderOrFn\n ? middlewareBuilderOrFn._middlewares\n : [middlewareBuilderOrFn];\n\n return createNewBuilder(_def, {\n middlewares: middlewares,\n });\n },\n unstable_concat(builder) {\n return createNewBuilder(_def, (builder as AnyProcedureBuilder)._def);\n },\n concat(builder) {\n return createNewBuilder(_def, (builder as AnyProcedureBuilder)._def);\n },\n query(resolver) {\n return createResolver(\n { ..._def, type: 'query' },\n resolver,\n ) as AnyQueryProcedure;\n },\n mutation(resolver) {\n return createResolver(\n { ..._def, type: 'mutation' },\n resolver,\n ) as AnyMutationProcedure;\n },\n subscription(resolver: ProcedureResolver) {\n return createResolver({ ..._def, type: 'subscription' }, resolver) as any;\n },\n experimental_caller(caller) {\n return createNewBuilder(_def, {\n caller,\n }) as any;\n },\n };\n\n return builder;\n}\n\nfunction createResolver(\n _defIn: AnyProcedureBuilderDef & { type: ProcedureType },\n resolver: AnyResolver,\n) {\n const finalBuilder = createNewBuilder(_defIn, {\n resolver,\n middlewares: [\n async function resolveMiddleware(opts) {\n const data = await resolver(opts);\n return {\n marker: middlewareMarker,\n ok: true,\n data,\n ctx: opts.ctx,\n } as const;\n },\n ],\n });\n const _def: AnyProcedure['_def'] = {\n ...finalBuilder._def,\n type: _defIn.type,\n experimental_caller: Boolean(finalBuilder._def.caller),\n meta: finalBuilder._def.meta,\n $types: null as any,\n };\n\n const invoke = createProcedureCaller(finalBuilder._def);\n const callerOverride = finalBuilder._def.caller;\n if (!callerOverride) {\n return invoke;\n }\n const callerWrapper = async (...args: unknown[]) => {\n return await callerOverride({\n args,\n invoke,\n _def: _def,\n });\n };\n\n callerWrapper._def = _def;\n\n return callerWrapper;\n}\n\n/**\n * @internal\n */\nexport interface ProcedureCallOptions {\n ctx: TContext;\n getRawInput: GetRawInputFn;\n input?: unknown;\n path: string;\n type: ProcedureType;\n signal: AbortSignal | undefined;\n /**\n * The index of this call in a batch request.\n */\n batchIndex: number;\n}\n\nconst codeblock = `\nThis is a client-only function.\nIf you want to call this function on the server, see https://trpc.io/docs/v11/server/server-side-calls\n`.trim();\n\n// run the middlewares recursively with the resolver as the last one\nasync function callRecursive(\n index: number,\n _def: AnyProcedureBuilderDef,\n opts: ProcedureCallOptions,\n): Promise> {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const middleware = _def.middlewares[index]!;\n const result = await middleware({\n ...opts,\n meta: _def.meta,\n input: opts.input,\n next(_nextOpts?: any) {\n const nextOpts = _nextOpts as\n | {\n ctx?: Record;\n input?: unknown;\n getRawInput?: GetRawInputFn;\n }\n | undefined;\n\n return callRecursive(index + 1, _def, {\n ...opts,\n ctx: nextOpts?.ctx ? { ...opts.ctx, ...nextOpts.ctx } : opts.ctx,\n input: nextOpts && 'input' in nextOpts ? nextOpts.input : opts.input,\n getRawInput: nextOpts?.getRawInput ?? opts.getRawInput,\n });\n },\n });\n\n return result;\n } catch (cause) {\n return {\n ok: false,\n error: getTRPCErrorFromUnknown(cause),\n marker: middlewareMarker,\n };\n }\n}\n\nfunction createProcedureCaller(_def: AnyProcedureBuilderDef): AnyProcedure {\n async function procedure(opts: ProcedureCallOptions) {\n // is direct server-side call\n if (!opts || !('getRawInput' in opts)) {\n throw new Error(codeblock);\n }\n\n // there's always at least one \"next\" since we wrap this.resolver in a middleware\n const result = await callRecursive(0, _def, opts);\n\n if (!result) {\n throw new TRPCError({\n code: 'INTERNAL_SERVER_ERROR',\n message:\n 'No result from middlewares - did you forget to `return next()`?',\n });\n }\n if (!result.ok) {\n // re-throw original error\n throw result.error;\n }\n return result.data;\n }\n\n procedure._def = _def;\n procedure.procedure = true;\n procedure.meta = _def.meta;\n\n // FIXME typecast shouldn't be needed - fixittt\n return procedure as unknown as AnyProcedure;\n}\n", "import type { CombinedDataTransformer } from '../unstable-core-do-not-import';\nimport type { DefaultErrorShape, ErrorFormatter } from './error/formatter';\nimport type { JSONLProducerOptions } from './stream/jsonl';\nimport type { SSEStreamProducerOptions } from './stream/sse';\n\n/**\n * The initial generics that are used in the init function\n * @internal\n */\nexport interface RootTypes {\n ctx: object;\n meta: object;\n errorShape: DefaultErrorShape;\n transformer: boolean;\n}\n\n/**\n * The default check to see if we're in a server\n */\nexport const isServerDefault: boolean =\n typeof window === 'undefined' ||\n 'Deno' in window ||\n // eslint-disable-next-line @typescript-eslint/dot-notation\n globalThis.process?.env?.['NODE_ENV'] === 'test' ||\n !!globalThis.process?.env?.['JEST_WORKER_ID'] ||\n !!globalThis.process?.env?.['VITEST_WORKER_ID'];\n\n/**\n * The tRPC root config\n * @internal\n */\nexport interface RootConfig {\n /**\n * The types that are used in the config\n * @internal\n */\n $types: TTypes;\n /**\n * Use a data transformer\n * @see https://trpc.io/docs/v11/data-transformers\n */\n transformer: CombinedDataTransformer;\n /**\n * Use custom error formatting\n * @see https://trpc.io/docs/v11/error-formatting\n */\n errorFormatter: ErrorFormatter;\n /**\n * Allow `@trpc/server` to run in non-server environments\n * @warning **Use with caution**, this should likely mainly be used within testing.\n * @default false\n */\n allowOutsideOfServer: boolean;\n /**\n * Is this a server environment?\n * @warning **Use with caution**, this should likely mainly be used within testing.\n * @default typeof window === 'undefined' || 'Deno' in window || process.env.NODE_ENV === 'test'\n */\n isServer: boolean;\n /**\n * Is this development?\n * Will be used to decide if the API should return stack traces\n * @default process.env.NODE_ENV !== 'production'\n */\n isDev: boolean;\n\n defaultMeta?: TTypes['meta'] extends object ? TTypes['meta'] : never;\n\n /**\n * Options for server-sent events (SSE) subscriptions\n * @see https://trpc.io/docs/client/links/httpSubscriptionLink\n */\n sse?: {\n /**\n * Enable server-sent events (SSE) subscriptions\n * @default true\n */\n enabled?: boolean;\n } & Pick<\n SSEStreamProducerOptions,\n 'ping' | 'emitAndEndImmediately' | 'maxDurationMs' | 'client'\n >;\n\n /**\n * Options for batch stream\n * @see https://trpc.io/docs/client/links/httpBatchStreamLink\n */\n jsonl?: Pick;\n experimental?: {};\n}\n\n/**\n * @internal\n */\nexport type CreateRootTypes = TGenerics;\n\nexport type AnyRootTypes = CreateRootTypes<{\n ctx: any;\n meta: any;\n errorShape: any;\n transformer: any;\n}>;\n\ntype PartialIf = TCondition extends true\n ? Partial\n : TType;\n\n/**\n * Adds a `createContext` option with a given callback function\n * If context is the default value, then the `createContext` option is optional\n */\nexport type CreateContextCallback<\n TContext,\n TFunction extends (...args: any[]) => any,\n> = PartialIf<\n object extends TContext ? true : false,\n {\n /**\n * @see https://trpc.io/docs/v11/context\n **/\n createContext: TFunction;\n }\n>;\n", "import {\n defaultFormatter,\n type DefaultErrorShape,\n type ErrorFormatter,\n} from './error/formatter';\nimport type { MiddlewareBuilder, MiddlewareFunction } from './middleware';\nimport { createMiddlewareFactory } from './middleware';\nimport type { ProcedureBuilder } from './procedureBuilder';\nimport { createBuilder } from './procedureBuilder';\nimport type { AnyRootTypes, CreateRootTypes } from './rootConfig';\nimport { isServerDefault, type RootConfig } from './rootConfig';\nimport type {\n AnyRouter,\n MergeRouters,\n RouterBuilder,\n RouterCallerFactory,\n} from './router';\nimport {\n createCallerFactory,\n createRouterFactory,\n mergeRouters,\n} from './router';\nimport type { DataTransformerOptions } from './transformer';\nimport { defaultTransformer, getDataTransformer } from './transformer';\nimport type { Unwrap, ValidateShape } from './types';\nimport type { UnsetMarker } from './utils';\n\ntype inferErrorFormatterShape =\n TType extends ErrorFormatter ? TShape : DefaultErrorShape;\n/** @internal */\nexport interface RuntimeConfigOptions<\n TContext extends object,\n TMeta extends object,\n> extends Partial<\n Omit<\n RootConfig<{\n ctx: TContext;\n meta: TMeta;\n errorShape: any;\n transformer: any;\n }>,\n '$types' | 'transformer'\n >\n > {\n /**\n * Use a data transformer\n * @see https://trpc.io/docs/v11/data-transformers\n */\n transformer?: DataTransformerOptions;\n}\n\ntype ContextCallback = (...args: any[]) => object | Promise;\n\nexport interface TRPCRootObject<\n TContext extends object,\n TMeta extends object,\n TOptions extends RuntimeConfigOptions,\n $Root extends AnyRootTypes = {\n ctx: TContext;\n meta: TMeta;\n errorShape: undefined extends TOptions['errorFormatter']\n ? DefaultErrorShape\n : inferErrorFormatterShape;\n transformer: undefined extends TOptions['transformer'] ? false : true;\n },\n> {\n /**\n * Your router config\n * @internal\n */\n _config: RootConfig<$Root>;\n\n /**\n * Builder object for creating procedures\n * @see https://trpc.io/docs/v11/server/procedures\n */\n procedure: ProcedureBuilder<\n TContext,\n TMeta,\n object,\n UnsetMarker,\n UnsetMarker,\n UnsetMarker,\n UnsetMarker,\n false\n >;\n\n /**\n * Create reusable middlewares\n * @see https://trpc.io/docs/v11/server/middlewares\n */\n middleware: <$ContextOverrides>(\n fn: MiddlewareFunction,\n ) => MiddlewareBuilder;\n\n /**\n * Create a router\n * @see https://trpc.io/docs/v11/server/routers\n */\n router: RouterBuilder<$Root>;\n\n /**\n * Merge Routers\n * @see https://trpc.io/docs/v11/server/merging-routers\n */\n mergeRouters: (\n ...routerList: [...TRouters]\n ) => MergeRouters;\n\n /**\n * Create a server-side caller for a router\n * @see https://trpc.io/docs/v11/server/server-side-calls\n */\n createCallerFactory: RouterCallerFactory<$Root>;\n}\n\nclass TRPCBuilder {\n /**\n * Add a context shape as a generic to the root object\n * @see https://trpc.io/docs/v11/server/context\n */\n context() {\n return new TRPCBuilder<\n TNewContext extends ContextCallback ? Unwrap : TNewContext,\n TMeta\n >();\n }\n\n /**\n * Add a meta shape as a generic to the root object\n * @see https://trpc.io/docs/v11/quickstart\n */\n meta() {\n return new TRPCBuilder();\n }\n\n /**\n * Create the root object\n * @see https://trpc.io/docs/v11/server/routers#initialize-trpc\n */\n create>(\n opts?: ValidateShape>,\n ): TRPCRootObject {\n type $Root = CreateRootTypes<{\n ctx: TContext;\n meta: TMeta;\n errorShape: undefined extends TOptions['errorFormatter']\n ? DefaultErrorShape\n : inferErrorFormatterShape;\n transformer: undefined extends TOptions['transformer'] ? false : true;\n }>;\n\n const config: RootConfig<$Root> = {\n ...opts,\n transformer: getDataTransformer(opts?.transformer ?? defaultTransformer),\n isDev:\n opts?.isDev ??\n // eslint-disable-next-line @typescript-eslint/dot-notation\n globalThis.process?.env['NODE_ENV'] !== 'production',\n allowOutsideOfServer: opts?.allowOutsideOfServer ?? false,\n errorFormatter: opts?.errorFormatter ?? defaultFormatter,\n isServer: opts?.isServer ?? isServerDefault,\n /**\n * These are just types, they can't be used at runtime\n * @internal\n */\n $types: null as any,\n };\n\n {\n // Server check\n const isServer: boolean = opts?.isServer ?? isServerDefault;\n\n if (!isServer && opts?.allowOutsideOfServer !== true) {\n throw new Error(\n `You're trying to use @trpc/server in a non-server environment. This is not supported by default.`,\n );\n }\n }\n return {\n /**\n * Your router config\n * @internal\n */\n _config: config,\n /**\n * Builder object for creating procedures\n * @see https://trpc.io/docs/v11/server/procedures\n */\n procedure: createBuilder<$Root['ctx'], $Root['meta']>({\n meta: opts?.defaultMeta,\n }),\n /**\n * Create reusable middlewares\n * @see https://trpc.io/docs/v11/server/middlewares\n */\n middleware: createMiddlewareFactory<$Root['ctx'], $Root['meta']>(),\n /**\n * Create a router\n * @see https://trpc.io/docs/v11/server/routers\n */\n router: createRouterFactory<$Root>(config),\n /**\n * Merge Routers\n * @see https://trpc.io/docs/v11/server/merging-routers\n */\n mergeRouters,\n /**\n * Create a server-side caller for a router\n * @see https://trpc.io/docs/v11/server/server-side-calls\n */\n createCallerFactory: createCallerFactory<$Root>(),\n };\n }\n}\n\n/**\n * Builder to initialize the tRPC root object - use this exactly once per backend\n * @see https://trpc.io/docs/v11/quickstart\n */\nexport const initTRPC = new TRPCBuilder();\nexport type { TRPCBuilder };\n", "import { createFlatProxy, createRecursiveProxy, getErrorShape } from \"./getErrorShape-vC8mUXJD.mjs\";\nimport \"./codes-DagpWZLc.mjs\";\nimport { TRPCError, callProcedure, getTRPCErrorFromUnknown, isTrackedEnvelope, lazy, sse, tracked, transformTRPCResponse } from \"./tracked-Bjtgv3wJ.mjs\";\nimport { StandardSchemaV1Error, experimental_standaloneMiddleware, initTRPC } from \"./initTRPC-RoZMIBeA.mjs\";\n\nexport { StandardSchemaV1Error, TRPCError, callProcedure as callTRPCProcedure, createFlatProxy as createTRPCFlatProxy, createRecursiveProxy as createTRPCRecursiveProxy, lazy as experimental_lazy, experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware, getErrorShape, getTRPCErrorFromUnknown, getErrorShape as getTRPCErrorShape, initTRPC, isTrackedEnvelope, lazy, sse, tracked, transformTRPCResponse };", "import { initTRPC, TRPCError } from '@trpc/server';\nimport type { Context as HonoContext } from 'hono';\n\nexport interface Context {\n req: HonoContext['req'];\n user?: any;\n staffUser?: {\n id: number;\n name: string;\n } | null;\n}\n\nconst t = initTRPC.context().create();\n\nexport const middleware = t.middleware;\nexport const router = t.router;\nexport { TRPCError };\n\n// Global error logger middleware\nconst errorLoggerMiddleware = middleware(async ({ path, type, next, ctx }) => {\n const start = Date.now();\n\n try {\n const result = await next();\n const duration = Date.now() - start;\n\n // Log successful operations in development\n if (process.env.NODE_ENV === 'development') {\n console.log(`\u2705 ${type} ${path} - ${duration}ms`);\n }\n\n return result;\n } catch (error) {\n const duration = Date.now() - start;\n const err = error as any; // Type assertion for error object\n\n // Comprehensive error logging\n console.error('\uD83D\uDEA8 tRPC Error:', {\n timestamp: new Date().toISOString(),\n path,\n type,\n duration: `${duration}ms`,\n userId: ctx?.user?.userId || ctx?.staffUser?.id || 'anonymous',\n error: {\n name: err.name,\n message: err.message,\n code: err.code,\n stack: err.stack,\n },\n // Add SQL-specific details if available\n ...(err.code && { sqlCode: err.code }),\n ...(err.meta && { sqlMeta: err.meta }),\n ...(err.sql && { sql: err.sql }),\n });\n\n throw error; // Re-throw to maintain error flow\n }\n});\n\nexport const publicProcedure = t.procedure.use(errorLoggerMiddleware);\nexport const protectedProcedure = t.procedure.use(errorLoggerMiddleware).use(\n middleware(async ({ ctx, next }) => {\n\n if ((!ctx.user && !ctx.staffUser)) {\n throw new TRPCError({ code: 'UNAUTHORIZED' });\n }\n return next();\n })\n);\n\nexport const createCallerFactory = t.createCallerFactory;\nexport const createTRPCRouter = t.router;\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllProductsForCache,\n getAllStoresForCache,\n getAllDeliverySlotsForCache,\n getAllSpecialDealsForCache,\n getAllProductTagsForCache,\n getProductById as getProductByIdFromDb,\n type ProductBasicData,\n type StoreBasicData,\n type DeliverySlotData,\n type SpecialDealData,\n type ProductTagData,\n} from '@/src/dbService'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\n\n// Uniform Product Type (matches getProductDetails return)\ninterface Product {\n id: number\n name: string\n shortDescription: string | null\n longDescription: string | null\n price: string\n marketPrice: string | null\n unitNotation: string\n images: string[]\n isOutOfStock: boolean\n store: { id: number; name: string; description: string | null } | null\n incrementStep: number\n productQuantity: number\n isFlashAvailable: boolean\n flashPrice: string | null\n deliverySlots: Array<{ id: number; deliveryTime: Date; freezeTime: Date; isCapacityFull: boolean }>\n specialDeals: Array<{ quantity: string; price: string; validTill: Date }>\n productTags: string[]\n}\n\nexport async function initializeProducts(): Promise {\n try {\n console.log('Initializing product store in Redis...')\n\n // Fetch all products with full details (similar to productMega logic)\n const productsData = await getAllProductsForCache()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { productInfo, units } from '@/src/db/schema'\n\n const productsData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n longDescription: productInfo.longDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n storeId: productInfo.storeId,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n productQuantity: productInfo.productQuantity,\n isFlashAvailable: productInfo.isFlashAvailable,\n flashPrice: productInfo.flashPrice,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id));\n */\n\n // Fetch all stores\n const allStores = await getAllStoresForCache()\n const storeMap = new Map(allStores.map((s) => [s.id, s]))\n\n // Fetch all delivery slots (excluding full capacity slots)\n const allDeliverySlots = await getAllDeliverySlotsForCache()\n const deliverySlotsMap = new Map()\n for (const slot of allDeliverySlots) {\n if (!deliverySlotsMap.has(slot.productId))\n deliverySlotsMap.set(slot.productId, [])\n deliverySlotsMap.get(slot.productId)!.push(slot)\n }\n\n // Fetch all special deals\n const allSpecialDeals = await getAllSpecialDealsForCache()\n const specialDealsMap = new Map()\n for (const deal of allSpecialDeals) {\n if (!specialDealsMap.has(deal.productId))\n specialDealsMap.set(deal.productId, [])\n specialDealsMap.get(deal.productId)!.push(deal)\n }\n\n // Fetch all product tags\n const allProductTags = await getAllProductTagsForCache()\n const productTagsMap = new Map()\n for (const tag of allProductTags) {\n if (!productTagsMap.has(tag.productId))\n productTagsMap.set(tag.productId, [])\n productTagsMap.get(tag.productId)!.push(tag.tagName)\n }\n\n // Store each product in Redis\n // for (const product of productsData) {\n // const signedImages = scaffoldAssetUrl(\n // (product.images as string[]) || []\n // )\n // const store = product.storeId\n // ? storeMap.get(product.storeId) || null\n // : null\n // const deliverySlots = deliverySlotsMap.get(product.id) || []\n // const specialDeals = specialDealsMap.get(product.id) || []\n // const productTags = productTagsMap.get(product.id) || []\n //\n // const productObj: Product = {\n // id: product.id,\n // name: product.name,\n // shortDescription: product.shortDescription,\n // longDescription: product.longDescription,\n // price: product.price.toString(),\n // marketPrice: product.marketPrice?.toString() || null,\n // unitNotation: product.unitShortNotation,\n // images: signedImages,\n // isOutOfStock: product.isOutOfStock,\n // store: store\n // ? { id: store.id, name: store.name, description: store.description }\n // : null,\n // incrementStep: product.incrementStep,\n // productQuantity: product.productQuantity,\n // isFlashAvailable: product.isFlashAvailable,\n // flashPrice: product.flashPrice?.toString() || null,\n // deliverySlots: deliverySlots.map((s) => ({\n // id: s.id,\n // deliveryTime: s.deliveryTime,\n // freezeTime: s.freezeTime,\n // isCapacityFull: s.isCapacityFull,\n // })),\n // specialDeals: specialDeals.map((d) => ({\n // quantity: d.quantity.toString(),\n // price: d.price.toString(),\n // validTill: d.validTill,\n // })),\n // productTags: productTags,\n // }\n //\n // await redisClient.set(`product:${product.id}`, JSON.stringify(productObj))\n // }\n\n console.log('Product store initialized successfully')\n } catch (error) {\n console.error('Error initializing product store:', error)\n }\n}\n\nexport async function getProductById(id: number): Promise {\n try {\n // const key = `product:${id}`\n // const data = await redisClient.get(key)\n // if (!data) return null\n // return JSON.parse(data) as Product\n\n const product = await getProductByIdFromDb(id)\n if (!product) return null\n\n const signedImages = scaffoldAssetUrl(\n (product.images as string[]) || []\n )\n\n // Fetch store info\n const allStores = await getAllStoresForCache()\n const store = product.storeId\n ? allStores.find(s => s.id === product.storeId) || null\n : null\n\n // Fetch delivery slots for this product\n const allDeliverySlots = await getAllDeliverySlotsForCache()\n const productSlots = allDeliverySlots.filter(s => s.productId === id)\n\n // Fetch special deals for this product\n const allSpecialDeals = await getAllSpecialDealsForCache()\n const productDeals = allSpecialDeals.filter(d => d.productId === id)\n\n // Fetch product tags for this product\n const allProductTags = await getAllProductTagsForCache()\n const productTagNames = allProductTags\n .filter(t => t.productId === id)\n .map(t => t.tagName)\n\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n longDescription: product.longDescription,\n price: product.price.toString(),\n marketPrice: product.marketPrice?.toString() || null,\n unitNotation: product.unit.shortNotation,\n images: signedImages,\n isOutOfStock: product.isOutOfStock,\n store: store\n ? { id: store.id, name: store.name, description: store.description }\n : null,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n isFlashAvailable: product.isFlashAvailable,\n flashPrice: product.flashPrice?.toString() || null,\n deliverySlots: productSlots.map((s) => ({\n id: s.id,\n deliveryTime: s.deliveryTime,\n freezeTime: s.freezeTime,\n isCapacityFull: s.isCapacityFull,\n })),\n specialDeals: productDeals.map((d) => ({\n quantity: d.quantity.toString(),\n price: d.price.toString(),\n validTill: d.validTill,\n })),\n productTags: productTagNames,\n }\n } catch (error) {\n console.error(`Error getting product ${id}:`, error)\n return null\n }\n}\n\nexport async function getAllProducts(): Promise {\n try {\n // Get all keys matching the pattern \"product:*\"\n // const keys = await redisClient.KEYS('product:*')\n //\n // if (keys.length === 0) {\n // return []\n // }\n //\n // // Get all products using MGET for better performance\n // const productsData = await redisClient.MGET(keys)\n //\n // const products: Product[] = []\n // for (const productData of productsData) {\n // if (productData) {\n // products.push(JSON.parse(productData) as Product)\n // }\n // }\n //\n // return products\n\n const productsData = await getAllProductsForCache()\n\n const allStores = await getAllStoresForCache()\n const storeMap = new Map(allStores.map((s) => [s.id, s]))\n\n const allDeliverySlots = await getAllDeliverySlotsForCache()\n const deliverySlotsMap = new Map()\n for (const slot of allDeliverySlots) {\n if (!deliverySlotsMap.has(slot.productId))\n deliverySlotsMap.set(slot.productId, [])\n deliverySlotsMap.get(slot.productId)!.push(slot)\n }\n\n const allSpecialDeals = await getAllSpecialDealsForCache()\n const specialDealsMap = new Map()\n for (const deal of allSpecialDeals) {\n if (!specialDealsMap.has(deal.productId))\n specialDealsMap.set(deal.productId, [])\n specialDealsMap.get(deal.productId)!.push(deal)\n }\n\n const allProductTags = await getAllProductTagsForCache()\n const productTagsMap = new Map()\n for (const tag of allProductTags) {\n if (!productTagsMap.has(tag.productId))\n productTagsMap.set(tag.productId, [])\n productTagsMap.get(tag.productId)!.push(tag.tagName)\n }\n\n const products: Product[] = []\n for (const product of productsData) {\n const signedImages = scaffoldAssetUrl(\n (product.images as string[]) || []\n )\n const store = product.storeId\n ? storeMap.get(product.storeId) || null\n : null\n const deliverySlots = deliverySlotsMap.get(product.id) || []\n const specialDeals = specialDealsMap.get(product.id) || []\n const productTags = productTagsMap.get(product.id) || []\n\n products.push({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n longDescription: product.longDescription,\n price: product.price.toString(),\n marketPrice: product.marketPrice?.toString() || null,\n unitNotation: product.unitShortNotation,\n images: signedImages,\n isOutOfStock: product.isOutOfStock,\n store: store\n ? { id: store.id, name: store.name, description: store.description }\n : null,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n isFlashAvailable: product.isFlashAvailable,\n flashPrice: product.flashPrice?.toString() || null,\n deliverySlots: deliverySlots.map((s) => ({\n id: s.id,\n deliveryTime: s.deliveryTime,\n freezeTime: s.freezeTime,\n isCapacityFull: s.isCapacityFull,\n })),\n specialDeals: specialDeals.map((d) => ({\n quantity: d.quantity.toString(),\n price: d.price.toString(),\n validTill: d.validTill,\n })),\n productTags: productTags,\n })\n }\n\n return products\n } catch (error) {\n console.error('Error getting all products:', error)\n return []\n }\n}\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllTagsForCache,\n getAllTagProductMappings,\n getAllProductTags,\n getProductTagById as getProductTagByIdFromDb,\n type TagBasicData,\n type TagProductMapping,\n} from '@/src/dbService'\nimport { generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\n\n// Tag Type (matches getDashboardTags return)\ninterface Tag {\n id: number\n tagName: string\n tagDescription: string | null\n imageUrl: string | null\n isDashboardTag: boolean\n relatedStores: number[]\n productIds: number[]\n}\n\nasync function transformTagToStoreTag(tag: {\n id: number\n tagName: string\n tagDescription: string | null\n imageUrl: string | null\n isDashboardTag: boolean\n relatedStores: unknown\n products?: Array<{ productId: number }>\n}): Promise {\n const signedImageUrl = tag.imageUrl\n ? await generateSignedUrlFromS3Url(tag.imageUrl)\n : null\n\n return {\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription,\n imageUrl: signedImageUrl,\n isDashboardTag: tag.isDashboardTag,\n relatedStores: (tag.relatedStores as number[]) || [],\n productIds: tag.products ? tag.products.map(p => p.productId) : [],\n }\n}\n\nexport async function initializeProductTagStore(): Promise {\n try {\n console.log('Initializing product tag store in Redis...')\n\n // Fetch all tags\n const tagsData = await getAllTagsForCache()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { productTagInfo } from '@/src/db/schema'\n\n const tagsData = await db\n .select({\n id: productTagInfo.id,\n tagName: productTagInfo.tagName,\n tagDescription: productTagInfo.tagDescription,\n imageUrl: productTagInfo.imageUrl,\n isDashboardTag: productTagInfo.isDashboardTag,\n relatedStores: productTagInfo.relatedStores,\n })\n .from(productTagInfo);\n */\n\n // Fetch product IDs for each tag\n const productTagsData = await getAllTagProductMappings()\n\n /*\n // Old implementation - direct DB queries:\n import { productTags } from '@/src/db/schema'\n import { inArray } from 'drizzle-orm'\n\n const tagIds = tagsData.map(t => t.id);\n const productTagsData = await db\n .select({\n tagId: productTags.tagId,\n productId: productTags.productId,\n })\n .from(productTags)\n .where(inArray(productTags.tagId, tagIds));\n */\n\n // Group product IDs by tag\n const productIdsByTag = new Map()\n for (const pt of productTagsData) {\n if (!productIdsByTag.has(pt.tagId)) {\n productIdsByTag.set(pt.tagId, [])\n }\n productIdsByTag.get(pt.tagId)!.push(pt.productId)\n }\n\n // Store each tag in Redis\n // for (const tag of tagsData) {\n // const signedImageUrl = tag.imageUrl\n // ? await generateSignedUrlFromS3Url(tag.imageUrl)\n // : null\n //\n // const tagObj: Tag = {\n // id: tag.id,\n // tagName: tag.tagName,\n // tagDescription: tag.tagDescription,\n // imageUrl: signedImageUrl,\n // isDashboardTag: tag.isDashboardTag,\n // relatedStores: (tag.relatedStores as number[]) || [],\n // productIds: productIdsByTag.get(tag.id) || [],\n // }\n //\n // await redisClient.set(`tag:${tag.id}`, JSON.stringify(tagObj))\n // }\n\n console.log('Product tag store initialized successfully')\n } catch (error) {\n console.error('Error initializing product tag store:', error)\n }\n}\n\nexport async function getTagById(id: number): Promise {\n try {\n // const key = `tag:${id}`\n // const data = await redisClient.get(key)\n // if (!data) return null\n // return JSON.parse(data) as Tag\n\n const tag = await getProductTagByIdFromDb(id)\n if (!tag) return null\n\n return transformTagToStoreTag(tag)\n } catch (error) {\n console.error(`Error getting tag ${id}:`, error)\n return null\n }\n}\n\nexport async function getAllTags(): Promise {\n try {\n // Get all keys matching the pattern \"tag:*\"\n // const keys = await redisClient.KEYS('tag:*')\n //\n // if (keys.length === 0) {\n // return []\n // }\n //\n // // Get all tags using MGET for better performance\n // const tagsData = await redisClient.MGET(keys)\n //\n // const tags: Tag[] = []\n // for (const tagData of tagsData) {\n // if (tagData) {\n // tags.push(JSON.parse(tagData) as Tag)\n // }\n // }\n //\n // return tags\n\n const tags = await getAllProductTags()\n\n const result: Tag[] = []\n for (const tag of tags) {\n result.push(await transformTagToStoreTag(tag))\n }\n return result\n } catch (error) {\n console.error('Error getting all tags:', error)\n return []\n }\n}\n\nexport async function getDashboardTags(): Promise {\n try {\n // Get all keys matching the pattern \"tag:*\"\n // const keys = await redisClient.KEYS('tag:*')\n //\n // if (keys.length === 0) {\n // return []\n // }\n //\n // // Get all tags using MGET for better performance\n // const tagsData = await redisClient.MGET(keys)\n //\n // const dashboardTags: Tag[] = []\n // for (const tagData of tagsData) {\n // if (tagData) {\n // const tag = JSON.parse(tagData) as Tag\n // if (tag.isDashboardTag) {\n // dashboardTags.push(tag)\n // }\n // }\n // }\n //\n // return dashboardTags\n\n const tags = await getAllProductTags()\n\n const result: Tag[] = []\n for (const tag of tags) {\n if (tag.isDashboardTag) {\n result.push(await transformTagToStoreTag(tag))\n }\n }\n return result\n } catch (error) {\n console.error('Error getting dashboard tags:', error)\n return []\n }\n}\n\nexport async function getTagsByStoreId(storeId: number): Promise {\n try {\n // Get all keys matching the pattern \"tag:*\"\n // const keys = await redisClient.KEYS('tag:*')\n //\n // if (keys.length === 0) {\n // return []\n // }\n //\n // // Get all tags using MGET for better performance\n // const tagsData = await redisClient.MGET(keys)\n //\n // const storeTags: Tag[] = []\n // for (const tagData of tagsData) {\n // if (tagData) {\n // const tag = JSON.parse(tagData) as Tag\n // if (tag.relatedStores.includes(storeId)) {\n // storeTags.push(tag)\n // }\n // }\n // }\n //\n // return storeTags\n\n const tags = await getAllProductTags()\n\n const result: Tag[] = []\n for (const tag of tags) {\n const relatedStores = (tag.relatedStores as number[]) || []\n if (relatedStores.includes(storeId)) {\n result.push(await transformTagToStoreTag(tag))\n }\n }\n return result\n } catch (error) {\n console.error(`Error getting tags for store ${storeId}:`, error)\n return []\n }\n}\n", "import { router, publicProcedure } from '@/src/trpc/trpc-index'\nimport {\n getSuspendedProductIds,\n getNextDeliveryDateWithCapacity,\n getStoresSummary,\n} from '@/src/dbService'\nimport { generateSignedUrlsFromS3Urls, generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport { getAllProducts as getAllProductsFromCache } from '@/src/stores/product-store'\nimport { getDashboardTags as getDashboardTagsFromCache } from '@/src/stores/product-tag-store'\n\n// Re-export with original name for backwards compatibility\nexport const getNextDeliveryDate = getNextDeliveryDateWithCapacity\n\nexport async function scaffoldProducts() {\n // Get all products from cache\n let products = await getAllProductsFromCache();\n products = products.filter(item => Boolean(item.id))\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { productInfo } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n // Get suspended product IDs to filter them out\n const suspendedProducts = await db\n .select({ id: productInfo.id })\n .from(productInfo)\n .where(eq(productInfo.isSuspended, true));\n */\n\n const suspendedProductIds = new Set(await getSuspendedProductIds());\n\n // Filter out suspended products\n products = products.filter(product => !suspendedProductIds.has(product.id));\n\n // Format products to match the expected response structure\n const formattedProducts = await Promise.all(\n products.map(async (product) => {\n const nextDeliveryDate = await getNextDeliveryDateWithCapacity(product.id);\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: parseFloat(product.price),\n marketPrice: product.marketPrice ? parseFloat(product.marketPrice) : null,\n unit: product.unitNotation,\n unitNotation: product.unitNotation,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n storeId: product.store?.id || null,\n isOutOfStock: product.isOutOfStock,\n isFlashAvailable: product.isFlashAvailable,\n nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null,\n images: product.images,\n flashPrice: product.flashPrice\n };\n })\n );\n\n return {\n products: formattedProducts,\n count: formattedProducts.length,\n };\n}\n\nexport const commonRouter = router({\n getDashboardTags: publicProcedure\n .query(async () => {\n // Get dashboard tags from cache\n const tags = await getDashboardTagsFromCache();\n\n return {\n tags: tags,\n };\n }),\n\n getAllProductsSummary: publicProcedure\n .query(async () => {\n const response = await scaffoldProducts();\n return response;\n }),\n\n /*\n // Old implementation - moved to common-trpc-index.ts:\n getStoresSummary: publicProcedure\n .query(async () => {\n const stores = await getStoresSummary();\n return { stores };\n }),\n\n healthCheck: publicProcedure\n .query(async () => {\n const result = await healthCheck();\n return result;\n }),\n */\n});\n", "import { Context } from 'hono';\nimport { scaffoldAssetUrl } from \"@/src/lib/s3-client\"\nimport { getNextDeliveryDate } from \"@/src/trpc/apis/common-apis/common\"\nimport {\n getAllProductsWithUnits,\n type ProductSummaryData,\n} from \"@/src/dbService\"\n\n/**\n * Get all products summary for dropdown\n */\nexport const getAllProductsSummary = async (c: Context) => {\n try {\n const tagId = c.req.query('tagId');\n const tagIdNum = tagId ? parseInt(tagId) : undefined;\n\n // If tagId is provided but no products found, return empty array\n if (tagIdNum) {\n const products = await getAllProductsWithUnits(tagIdNum);\n if (products.length === 0) {\n return c.json({\n products: [],\n count: 0,\n }, 200);\n }\n }\n\n const productsWithUnits = await getAllProductsWithUnits(tagIdNum);\n\n // Generate signed URLs for product images\n const formattedProducts = await Promise.all(\n productsWithUnits.map(async (product: ProductSummaryData) => {\n const nextDeliveryDate = await getNextDeliveryDate(product.id);\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n marketPrice: product.marketPrice,\n unit: product.unitShortNotation,\n productQuantity: product.productQuantity,\n isOutOfStock: product.isOutOfStock,\n nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null,\n images: scaffoldAssetUrl((product.images as string[]) || []),\n };\n })\n );\n\n return c.json({\n products: formattedProducts,\n count: formattedProducts.length,\n }, 200);\n } catch (error) {\n console.error(\"Get products summary error:\", error);\n return c.json({ error: \"Failed to fetch products summary\" }, 500);\n }\n};\n\n/*\n// Old implementation - direct DB queries:\nimport { eq, gt, and, sql, inArray } from \"drizzle-orm\";\nimport { db } from \"@/src/db/db_index\"\nimport { productInfo, units, productSlots, deliverySlotInfo, productTags } from \"@/src/db/schema\"\n\nconst getNextDeliveryDate = async (productId: number): Promise => {\n const result = await db\n .select({ deliveryTime: deliverySlotInfo.deliveryTime })\n .from(productSlots)\n .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n .where(\n and(\n eq(productSlots.productId, productId),\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, sql`NOW()`)\n )\n )\n .orderBy(deliverySlotInfo.deliveryTime)\n .limit(1);\n \n return result[0]?.deliveryTime || null;\n};\n\nexport const getAllProductsSummary = async (req: Request, res: Response) => {\n try {\n const { tagId } = req.query;\n const tagIdNum = tagId ? parseInt(tagId as string) : null;\n\n let productIds: number[] | null = null;\n\n // If tagId is provided, get products that have this tag\n if (tagIdNum) {\n const taggedProducts = await db\n .select({ productId: productTags.productId })\n .from(productTags)\n .where(eq(productTags.tagId, tagIdNum));\n\n productIds = taggedProducts.map(tp => tp.productId);\n }\n\n let whereCondition = undefined;\n\n // Filter by product IDs if tag filtering is applied\n if (productIds && productIds.length > 0) {\n whereCondition = inArray(productInfo.id, productIds);\n } else if (tagIdNum) {\n // If tagId was provided but no products found, return empty array\n return res.status(200).json({\n products: [],\n count: 0,\n });\n }\n\n const productsWithUnits = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n productQuantity: productInfo.productQuantity,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(whereCondition);\n\n // Generate signed URLs for product images\n const formattedProducts = await Promise.all(\n productsWithUnits.map(async (product) => {\n const nextDeliveryDate = await getNextDeliveryDate(product.id);\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n marketPrice: product.marketPrice,\n unit: product.unitShortNotation,\n productQuantity: product.productQuantity,\n isOutOfStock: product.isOutOfStock,\n nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null,\n images: scaffoldAssetUrl((product.images as string[]) || []),\n };\n })\n );\n\n return res.status(200).json({\n products: formattedProducts,\n count: formattedProducts.length,\n });\n } catch (error) {\n console.error(\"Get products summary error:\", error);\n return res.status(500).json({ error: \"Failed to fetch products summary\" });\n }\n};\n*/\n", "import { Hono } from 'hono';\nimport { getAllProductsSummary } from \"@/src/apis/common-apis/apis/common-product.controller\"\n\nconst router = new Hono();\n\nrouter.get(\"/summary\", getAllProductsSummary);\n\n\nconst commonProductsRouter= router;\nexport default commonProductsRouter;\n", "import { Hono } from 'hono';\nimport commonProductsRouter from \"@/src/apis/common-apis/apis/common-product.router\"\n\nconst router = new Hono();\n\nrouter.route('/products', commonProductsRouter)\n\nconst commonRouter = router;\n\nexport default commonRouter;\n", "import { Hono } from 'hono';\nimport avRouter from \"@/src/apis/admin-apis/apis/av-router\"\nimport commonRouter from \"@/src/apis/common-apis/apis/common.router\"\n\nconst router = new Hono();\n\nrouter.route('/av', avRouter);\nrouter.route('/cm', commonRouter);\n\nconst v1Router = router;\n\nexport default v1Router;\n", "import { Hono } from 'hono';\n\nconst router = new Hono();\n\nrouter.get('/', (c) => {\n return c.json({\n status: 'ok',\n message: 'Health check passed',\n timestamp: new Date().toISOString(),\n });\n});\n\nexport default router;\n", "import { Context, Next } from 'hono';\nimport { jwtVerify } from 'jose';\nimport { getStaffUserById, isUserSuspended } from '@/src/dbService';\nimport { ApiError } from '@/src/lib/api-error';\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter';\n\ninterface UserContext {\n userId: number;\n name?: string;\n email?: string;\n mobile?: string;\n}\n\ninterface StaffContext {\n id: number;\n name: string;\n}\n\nexport const authenticateUser = async (c: Context, next: Next) => {\n try {\n const authHeader = c.req.header('authorization');\n\n if (!authHeader?.startsWith('Bearer ')) {\n throw new ApiError('Authorization token required', 401);\n }\n\n const token = authHeader.substring(7);\n console.log(c.req.header)\n\n const { payload } = await jwtVerify(token, getEncodedJwtSecret());\n const decoded = payload as any;\n\n // Check if this is a staff token (has staffId)\n if (decoded.staffId) {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { staffUsers } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n const staff = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.id, decoded.staffId),\n });\n */\n\n // This is a staff token, verify staff exists\n const staff = await getStaffUserById(decoded.staffId);\n\n if (!staff) {\n throw new ApiError('Invalid staff token', 401);\n }\n\n c.set('staffUser', {\n id: staff.id,\n name: staff.name,\n });\n } else {\n // This is a regular user token\n c.set('user', decoded);\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { userDetails } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n const details = await db.query.userDetails.findFirst({\n where: eq(userDetails.userId, decoded.userId),\n });\n\n if (details?.isSuspended) {\n throw new ApiError('Account suspended', 403);\n }\n */\n\n // Check if user is suspended\n const suspended = await isUserSuspended(decoded.userId);\n\n if (suspended) {\n throw new ApiError('Account suspended', 403);\n }\n }\n\n await next();\n } catch (error) {\n throw error;\n }\n};\n", "import { Hono } from 'hono';\nimport avRouter from \"@/src/apis/admin-apis/apis/av-router\"\nimport { ApiError } from \"@/src/lib/api-error\"\nimport v1Router from \"@/src/v1-router\"\nimport testController from \"@/src/test-controller\"\nimport { authenticateUser } from \"@/src/middleware/auth.middleware\"\n\nconst router = new Hono();\n\n// Health check endpoints (no auth required)\nrouter.get('/health', (c) => {\n return c.json({\n status: 'OK',\n timestamp: new Date().toISOString(),\n uptime: process.uptime(),\n message: 'Hello world'\n });\n});\n\nrouter.get('/seed', (c) => {\n return c.json({\n status: 'OK',\n timestamp: new Date().toISOString(),\n uptime: process.uptime()\n });\n});\n\n// Apply authentication middleware to all subsequent routes\nrouter.use('*', authenticateUser);\n\nrouter.route('/v1', v1Router);\n// router.route('/av', avRouter);\nrouter.route('/test', testController);\n\nconst mainRouter = router;\n\nexport default mainRouter;\n", "/** A special constant with type `never` */\nexport const NEVER = Object.freeze({\n status: \"aborted\",\n});\nexport /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, params) {\n function init(inst, def) {\n if (!inst._zod) {\n Object.defineProperty(inst, \"_zod\", {\n value: {\n def,\n constr: _,\n traits: new Set(),\n },\n enumerable: false,\n });\n }\n if (inst._zod.traits.has(name)) {\n return;\n }\n inst._zod.traits.add(name);\n initializer(inst, def);\n // support prototype modifications\n const proto = _.prototype;\n const keys = Object.keys(proto);\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i];\n if (!(k in inst)) {\n inst[k] = proto[k].bind(inst);\n }\n }\n }\n // doesn't work if Parent has a constructor with arguments\n const Parent = params?.Parent ?? Object;\n class Definition extends Parent {\n }\n Object.defineProperty(Definition, \"name\", { value: name });\n function _(def) {\n var _a;\n const inst = params?.Parent ? new Definition() : this;\n init(inst, def);\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n for (const fn of inst._zod.deferred) {\n fn();\n }\n return inst;\n }\n Object.defineProperty(_, \"init\", { value: init });\n Object.defineProperty(_, Symbol.hasInstance, {\n value: (inst) => {\n if (params?.Parent && inst instanceof params.Parent)\n return true;\n return inst?._zod?.traits?.has(name);\n },\n });\n Object.defineProperty(_, \"name\", { value: name });\n return _;\n}\n////////////////////////////// UTILITIES ///////////////////////////////////////\nexport const $brand = Symbol(\"zod_brand\");\nexport class $ZodAsyncError extends Error {\n constructor() {\n super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n }\n}\nexport class $ZodEncodeError extends Error {\n constructor(name) {\n super(`Encountered unidirectional transform during encode: ${name}`);\n this.name = \"ZodEncodeError\";\n }\n}\nexport const globalConfig = {};\nexport function config(newConfig) {\n if (newConfig)\n Object.assign(globalConfig, newConfig);\n return globalConfig;\n}\n", "// functions\nexport function assertEqual(val) {\n return val;\n}\nexport function assertNotEqual(val) {\n return val;\n}\nexport function assertIs(_arg) { }\nexport function assertNever(_x) {\n throw new Error(\"Unexpected value in exhaustive check\");\n}\nexport function assert(_) { }\nexport function getEnumValues(entries) {\n const numericValues = Object.values(entries).filter((v) => typeof v === \"number\");\n const values = Object.entries(entries)\n .filter(([k, _]) => numericValues.indexOf(+k) === -1)\n .map(([_, v]) => v);\n return values;\n}\nexport function joinValues(array, separator = \"|\") {\n return array.map((val) => stringifyPrimitive(val)).join(separator);\n}\nexport function jsonStringifyReplacer(_, value) {\n if (typeof value === \"bigint\")\n return value.toString();\n return value;\n}\nexport function cached(getter) {\n const set = false;\n return {\n get value() {\n if (!set) {\n const value = getter();\n Object.defineProperty(this, \"value\", { value });\n return value;\n }\n throw new Error(\"cached value already set\");\n },\n };\n}\nexport function nullish(input) {\n return input === null || input === undefined;\n}\nexport function cleanRegex(source) {\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n return source.slice(start, end);\n}\nexport function floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepString = step.toString();\n let stepDecCount = (stepString.split(\".\")[1] || \"\").length;\n if (stepDecCount === 0 && /\\d?e-\\d?/.test(stepString)) {\n const match = stepString.match(/\\d?e-(\\d?)/);\n if (match?.[1]) {\n stepDecCount = Number.parseInt(match[1]);\n }\n }\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / 10 ** decCount;\n}\nconst EVALUATING = Symbol(\"evaluating\");\nexport function defineLazy(object, key, getter) {\n let value = undefined;\n Object.defineProperty(object, key, {\n get() {\n if (value === EVALUATING) {\n // Circular reference detected, return undefined to break the cycle\n return undefined;\n }\n if (value === undefined) {\n value = EVALUATING;\n value = getter();\n }\n return value;\n },\n set(v) {\n Object.defineProperty(object, key, {\n value: v,\n // configurable: true,\n });\n // object[key] = v;\n },\n configurable: true,\n });\n}\nexport function objectClone(obj) {\n return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));\n}\nexport function assignProp(target, prop, value) {\n Object.defineProperty(target, prop, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n}\nexport function mergeDefs(...defs) {\n const mergedDescriptors = {};\n for (const def of defs) {\n const descriptors = Object.getOwnPropertyDescriptors(def);\n Object.assign(mergedDescriptors, descriptors);\n }\n return Object.defineProperties({}, mergedDescriptors);\n}\nexport function cloneDef(schema) {\n return mergeDefs(schema._zod.def);\n}\nexport function getElementAtPath(obj, path) {\n if (!path)\n return obj;\n return path.reduce((acc, key) => acc?.[key], obj);\n}\nexport function promiseAllObject(promisesObj) {\n const keys = Object.keys(promisesObj);\n const promises = keys.map((key) => promisesObj[key]);\n return Promise.all(promises).then((results) => {\n const resolvedObj = {};\n for (let i = 0; i < keys.length; i++) {\n resolvedObj[keys[i]] = results[i];\n }\n return resolvedObj;\n });\n}\nexport function randomString(length = 10) {\n const chars = \"abcdefghijklmnopqrstuvwxyz\";\n let str = \"\";\n for (let i = 0; i < length; i++) {\n str += chars[Math.floor(Math.random() * chars.length)];\n }\n return str;\n}\nexport function esc(str) {\n return JSON.stringify(str);\n}\nexport function slugify(input) {\n return input\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/[\\s_-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\nexport const captureStackTrace = (\"captureStackTrace\" in Error ? Error.captureStackTrace : (..._args) => { });\nexport function isObject(data) {\n return typeof data === \"object\" && data !== null && !Array.isArray(data);\n}\nexport const allowsEval = cached(() => {\n // @ts-ignore\n if (typeof navigator !== \"undefined\" && navigator?.userAgent?.includes(\"Cloudflare\")) {\n return false;\n }\n try {\n const F = Function;\n new F(\"\");\n return true;\n }\n catch (_) {\n return false;\n }\n});\nexport function isPlainObject(o) {\n if (isObject(o) === false)\n return false;\n // modified constructor\n const ctor = o.constructor;\n if (ctor === undefined)\n return true;\n if (typeof ctor !== \"function\")\n return true;\n // modified prototype\n const prot = ctor.prototype;\n if (isObject(prot) === false)\n return false;\n // ctor doesn't have static `isPrototypeOf`\n if (Object.prototype.hasOwnProperty.call(prot, \"isPrototypeOf\") === false) {\n return false;\n }\n return true;\n}\nexport function shallowClone(o) {\n if (isPlainObject(o))\n return { ...o };\n if (Array.isArray(o))\n return [...o];\n return o;\n}\nexport function numKeys(data) {\n let keyCount = 0;\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n keyCount++;\n }\n }\n return keyCount;\n}\nexport const getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return \"undefined\";\n case \"string\":\n return \"string\";\n case \"number\":\n return Number.isNaN(data) ? \"nan\" : \"number\";\n case \"boolean\":\n return \"boolean\";\n case \"function\":\n return \"function\";\n case \"bigint\":\n return \"bigint\";\n case \"symbol\":\n return \"symbol\";\n case \"object\":\n if (Array.isArray(data)) {\n return \"array\";\n }\n if (data === null) {\n return \"null\";\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return \"promise\";\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return \"map\";\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return \"set\";\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return \"date\";\n }\n // @ts-ignore\n if (typeof File !== \"undefined\" && data instanceof File) {\n return \"file\";\n }\n return \"object\";\n default:\n throw new Error(`Unknown data type: ${t}`);\n }\n};\nexport const propertyKeyTypes = new Set([\"string\", \"number\", \"symbol\"]);\nexport const primitiveTypes = new Set([\"string\", \"number\", \"bigint\", \"boolean\", \"symbol\", \"undefined\"]);\nexport function escapeRegex(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n// zod-specific utils\nexport function clone(inst, def, params) {\n const cl = new inst._zod.constr(def ?? inst._zod.def);\n if (!def || params?.parent)\n cl._zod.parent = inst;\n return cl;\n}\nexport function normalizeParams(_params) {\n const params = _params;\n if (!params)\n return {};\n if (typeof params === \"string\")\n return { error: () => params };\n if (params?.message !== undefined) {\n if (params?.error !== undefined)\n throw new Error(\"Cannot specify both `message` and `error` params\");\n params.error = params.message;\n }\n delete params.message;\n if (typeof params.error === \"string\")\n return { ...params, error: () => params.error };\n return params;\n}\nexport function createTransparentProxy(getter) {\n let target;\n return new Proxy({}, {\n get(_, prop, receiver) {\n target ?? (target = getter());\n return Reflect.get(target, prop, receiver);\n },\n set(_, prop, value, receiver) {\n target ?? (target = getter());\n return Reflect.set(target, prop, value, receiver);\n },\n has(_, prop) {\n target ?? (target = getter());\n return Reflect.has(target, prop);\n },\n deleteProperty(_, prop) {\n target ?? (target = getter());\n return Reflect.deleteProperty(target, prop);\n },\n ownKeys(_) {\n target ?? (target = getter());\n return Reflect.ownKeys(target);\n },\n getOwnPropertyDescriptor(_, prop) {\n target ?? (target = getter());\n return Reflect.getOwnPropertyDescriptor(target, prop);\n },\n defineProperty(_, prop, descriptor) {\n target ?? (target = getter());\n return Reflect.defineProperty(target, prop, descriptor);\n },\n });\n}\nexport function stringifyPrimitive(value) {\n if (typeof value === \"bigint\")\n return value.toString() + \"n\";\n if (typeof value === \"string\")\n return `\"${value}\"`;\n return `${value}`;\n}\nexport function optionalKeys(shape) {\n return Object.keys(shape).filter((k) => {\n return shape[k]._zod.optin === \"optional\" && shape[k]._zod.optout === \"optional\";\n });\n}\nexport const NUMBER_FORMAT_RANGES = {\n safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],\n int32: [-2147483648, 2147483647],\n uint32: [0, 4294967295],\n float32: [-3.4028234663852886e38, 3.4028234663852886e38],\n float64: [-Number.MAX_VALUE, Number.MAX_VALUE],\n};\nexport const BIGINT_FORMAT_RANGES = {\n int64: [/* @__PURE__*/ BigInt(\"-9223372036854775808\"), /* @__PURE__*/ BigInt(\"9223372036854775807\")],\n uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt(\"18446744073709551615\")],\n};\nexport function pick(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".pick() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = {};\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n newShape[key] = currDef.shape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function omit(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".omit() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = { ...schema._zod.def.shape };\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n delete newShape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function extend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to extend: expected a plain object\");\n }\n const checks = schema._zod.def.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n // Only throw if new shape overlaps with existing shape\n // Use getOwnPropertyDescriptor to check key existence without accessing values\n const existingShape = schema._zod.def.shape;\n for (const key in shape) {\n if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {\n throw new Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\");\n }\n }\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function safeExtend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to safeExtend: expected a plain object\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function merge(a, b) {\n const def = mergeDefs(a._zod.def, {\n get shape() {\n const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n get catchall() {\n return b._zod.def.catchall;\n },\n checks: [], // delete existing checks\n });\n return clone(a, def);\n}\nexport function partial(Class, schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".partial() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in oldShape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n else {\n for (const key in oldShape) {\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function required(Class, schema, mask) {\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n else {\n for (const key in oldShape) {\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n });\n return clone(schema, def);\n}\n// invalid_type | too_big | too_small | invalid_format | not_multiple_of | unrecognized_keys | invalid_union | invalid_key | invalid_element | invalid_value | custom\nexport function aborted(x, startIndex = 0) {\n if (x.aborted === true)\n return true;\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue !== true) {\n return true;\n }\n }\n return false;\n}\nexport function prefixIssues(path, issues) {\n return issues.map((iss) => {\n var _a;\n (_a = iss).path ?? (_a.path = []);\n iss.path.unshift(path);\n return iss;\n });\n}\nexport function unwrapMessage(message) {\n return typeof message === \"string\" ? message : message?.message;\n}\nexport function finalizeIssue(iss, ctx, config) {\n const full = { ...iss, path: iss.path ?? [] };\n // for backwards compatibility\n if (!iss.message) {\n const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??\n unwrapMessage(ctx?.error?.(iss)) ??\n unwrapMessage(config.customError?.(iss)) ??\n unwrapMessage(config.localeError?.(iss)) ??\n \"Invalid input\";\n full.message = message;\n }\n // delete (full as any).def;\n delete full.inst;\n delete full.continue;\n if (!ctx?.reportInput) {\n delete full.input;\n }\n return full;\n}\nexport function getSizableOrigin(input) {\n if (input instanceof Set)\n return \"set\";\n if (input instanceof Map)\n return \"map\";\n // @ts-ignore\n if (input instanceof File)\n return \"file\";\n return \"unknown\";\n}\nexport function getLengthableOrigin(input) {\n if (Array.isArray(input))\n return \"array\";\n if (typeof input === \"string\")\n return \"string\";\n return \"unknown\";\n}\nexport function parsedType(data) {\n const t = typeof data;\n switch (t) {\n case \"number\": {\n return Number.isNaN(data) ? \"nan\" : \"number\";\n }\n case \"object\": {\n if (data === null) {\n return \"null\";\n }\n if (Array.isArray(data)) {\n return \"array\";\n }\n const obj = data;\n if (obj && Object.getPrototypeOf(obj) !== Object.prototype && \"constructor\" in obj && obj.constructor) {\n return obj.constructor.name;\n }\n }\n }\n return t;\n}\nexport function issue(...args) {\n const [iss, input, inst] = args;\n if (typeof iss === \"string\") {\n return {\n message: iss,\n code: \"custom\",\n input,\n inst,\n };\n }\n return { ...iss };\n}\nexport function cleanEnum(obj) {\n return Object.entries(obj)\n .filter(([k, _]) => {\n // return true if NaN, meaning it's not a number, thus a string key\n return Number.isNaN(Number.parseInt(k, 10));\n })\n .map((el) => el[1]);\n}\n// Codec utility functions\nexport function base64ToUint8Array(base64) {\n const binaryString = atob(base64);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n return bytes;\n}\nexport function uint8ArrayToBase64(bytes) {\n let binaryString = \"\";\n for (let i = 0; i < bytes.length; i++) {\n binaryString += String.fromCharCode(bytes[i]);\n }\n return btoa(binaryString);\n}\nexport function base64urlToUint8Array(base64url) {\n const base64 = base64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padding = \"=\".repeat((4 - (base64.length % 4)) % 4);\n return base64ToUint8Array(base64 + padding);\n}\nexport function uint8ArrayToBase64url(bytes) {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\nexport function hexToUint8Array(hex) {\n const cleanHex = hex.replace(/^0x/, \"\");\n if (cleanHex.length % 2 !== 0) {\n throw new Error(\"Invalid hex string length\");\n }\n const bytes = new Uint8Array(cleanHex.length / 2);\n for (let i = 0; i < cleanHex.length; i += 2) {\n bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);\n }\n return bytes;\n}\nexport function uint8ArrayToHex(bytes) {\n return Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n// instanceof\nexport class Class {\n constructor(..._args) { }\n}\n", "import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n Object.defineProperty(inst, \"_zod\", {\n value: inst._zod,\n enumerable: false,\n });\n Object.defineProperty(inst, \"issues\", {\n value: def,\n enumerable: false,\n });\n inst.message = JSON.stringify(def, util.jsonStringifyReplacer, 2);\n Object.defineProperty(inst, \"toString\", {\n value: () => inst.message,\n enumerable: false,\n });\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, { Parent: Error });\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues });\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues });\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a, _b;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, issue.path));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_b = curr.items)[el] ?? (_b[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * \u2716 Expected number, received string at \"username\n * favoriteNumbers[0]\n * \u2716 Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n const segs = [];\n const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`\u2716 ${issue.message}`);\n if (issue.path?.length)\n lines.push(` \u2192 at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\\n\");\n}\n", "import * as core from \"./core.js\";\nimport * as errors from \"./errors.js\";\nimport * as util from \"./util.js\";\nexport const _parse = (_Err) => (schema, value, _ctx, _params) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n if (result.issues.length) {\n const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, _params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parse = /* @__PURE__*/ _parse(errors.$ZodRealError);\nexport const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n if (result.issues.length) {\n const e = new (params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parseAsync = /* @__PURE__*/ _parseAsync(errors.$ZodRealError);\nexport const _safeParse = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n return result.issues.length\n ? {\n success: false,\n error: new (_Err ?? errors.$ZodError)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodRealError);\nexport const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n return result.issues.length\n ? {\n success: false,\n error: new _Err(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodRealError);\nexport const _encode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _parse(_Err)(schema, value, ctx);\n};\nexport const encode = /* @__PURE__*/ _encode(errors.$ZodRealError);\nexport const _decode = (_Err) => (schema, value, _ctx) => {\n return _parse(_Err)(schema, value, _ctx);\n};\nexport const decode = /* @__PURE__*/ _decode(errors.$ZodRealError);\nexport const _encodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _parseAsync(_Err)(schema, value, ctx);\n};\nexport const encodeAsync = /* @__PURE__*/ _encodeAsync(errors.$ZodRealError);\nexport const _decodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _parseAsync(_Err)(schema, value, _ctx);\n};\nexport const decodeAsync = /* @__PURE__*/ _decodeAsync(errors.$ZodRealError);\nexport const _safeEncode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _safeParse(_Err)(schema, value, ctx);\n};\nexport const safeEncode = /* @__PURE__*/ _safeEncode(errors.$ZodRealError);\nexport const _safeDecode = (_Err) => (schema, value, _ctx) => {\n return _safeParse(_Err)(schema, value, _ctx);\n};\nexport const safeDecode = /* @__PURE__*/ _safeDecode(errors.$ZodRealError);\nexport const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _safeParseAsync(_Err)(schema, value, ctx);\n};\nexport const safeEncodeAsync = /* @__PURE__*/ _safeEncodeAsync(errors.$ZodRealError);\nexport const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _safeParseAsync(_Err)(schema, value, _ctx);\n};\nexport const safeDecodeAsync = /* @__PURE__*/ _safeDecodeAsync(errors.$ZodRealError);\n", "import * as util from \"./util.js\";\nexport const cuid = /^[cC][^\\s-]{8,}$/;\nexport const cuid2 = /^[0-9a-z]+$/;\nexport const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;\nexport const xid = /^[0-9a-vA-V]{20}$/;\nexport const ksuid = /^[A-Za-z0-9]{27}$/;\nexport const nanoid = /^[a-zA-Z0-9_-]{21}$/;\n/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */\nexport const duration = /^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;\n/** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */\nexport const extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */\nexport const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;\n/** Returns a regex for validating an RFC 9562/4122 UUID.\n *\n * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */\nexport const uuid = (version) => {\n if (!version)\n return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;\n return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);\n};\nexport const uuid4 = /*@__PURE__*/ uuid(4);\nexport const uuid6 = /*@__PURE__*/ uuid(6);\nexport const uuid7 = /*@__PURE__*/ uuid(7);\n/** Practical email validation */\nexport const email = /^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;\n/** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */\nexport const html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n/** The classic emailregex.com regex for RFC 5322-compliant emails */\nexport const rfc5322Email = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n/** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */\nexport const unicodeEmail = /^[^\\s@\"]{1,64}@[^\\s@]{1,255}$/u;\nexport const idnEmail = unicodeEmail;\nexport const browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emoji = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nexport function emoji() {\n return new RegExp(_emoji, \"u\");\n}\nexport const ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\nexport const ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;\nexport const mac = (delimiter) => {\n const escapedDelim = util.escapeRegex(delimiter ?? \":\");\n return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);\n};\nexport const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/;\nexport const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nexport const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;\nexport const base64url = /^[A-Za-z0-9_-]*$/;\n// based on https://stackoverflow.com/questions/106179/regular-expression-to-match-dns-hostname-or-ip-address\n// export const hostname: RegExp = /^([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+$/;\nexport const hostname = /^(?=.{1,253}\\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\\.?$/;\nexport const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/;\n// https://blog.stevenlevithan.com/archives/validate-phone-number#r4-3 (regex sans spaces)\n// E.164: leading digit must be 1-9; total digits (excluding '+') between 7-15\nexport const e164 = /^\\+[1-9]\\d{6,14}$/;\n// const dateSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\nconst dateSource = `(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))`;\nexport const date = /*@__PURE__*/ new RegExp(`^${dateSource}$`);\nfunction timeSource(args) {\n const hhmm = `(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;\n const regex = typeof args.precision === \"number\"\n ? args.precision === -1\n ? `${hhmm}`\n : args.precision === 0\n ? `${hhmm}:[0-5]\\\\d`\n : `${hhmm}:[0-5]\\\\d\\\\.\\\\d{${args.precision}}`\n : `${hhmm}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`;\n return regex;\n}\nexport function time(args) {\n return new RegExp(`^${timeSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nexport function datetime(args) {\n const time = timeSource({ precision: args.precision });\n const opts = [\"Z\"];\n if (args.local)\n opts.push(\"\");\n // if (args.offset) opts.push(`([+-]\\\\d{2}:\\\\d{2})`);\n if (args.offset)\n opts.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);\n const timeRegex = `${time}(?:${opts.join(\"|\")})`;\n return new RegExp(`^${dateSource}T(?:${timeRegex})$`);\n}\nexport const string = (params) => {\n const regex = params ? `[\\\\s\\\\S]{${params?.minimum ?? 0},${params?.maximum ?? \"\"}}` : `[\\\\s\\\\S]*`;\n return new RegExp(`^${regex}$`);\n};\nexport const bigint = /^-?\\d+n?$/;\nexport const integer = /^-?\\d+$/;\nexport const number = /^-?\\d+(?:\\.\\d+)?$/;\nexport const boolean = /^(?:true|false)$/i;\nconst _null = /^null$/i;\nexport { _null as null };\nconst _undefined = /^undefined$/i;\nexport { _undefined as undefined };\n// regex for string with no uppercase letters\nexport const lowercase = /^[^A-Z]*$/;\n// regex for string with no lowercase letters\nexport const uppercase = /^[^a-z]*$/;\n// regex for hexadecimal strings (any length)\nexport const hex = /^[0-9a-fA-F]*$/;\n// Hash regexes for different algorithms and encodings\n// Helper function to create base64 regex with exact length and padding\nfunction fixedBase64(bodyLength, padding) {\n return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);\n}\n// Helper function to create base64url regex with exact length (no padding)\nfunction fixedBase64url(length) {\n return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);\n}\n// MD5 (16 bytes): base64 = 24 chars total (22 + \"==\")\nexport const md5_hex = /^[0-9a-fA-F]{32}$/;\nexport const md5_base64 = /*@__PURE__*/ fixedBase64(22, \"==\");\nexport const md5_base64url = /*@__PURE__*/ fixedBase64url(22);\n// SHA1 (20 bytes): base64 = 28 chars total (27 + \"=\")\nexport const sha1_hex = /^[0-9a-fA-F]{40}$/;\nexport const sha1_base64 = /*@__PURE__*/ fixedBase64(27, \"=\");\nexport const sha1_base64url = /*@__PURE__*/ fixedBase64url(27);\n// SHA256 (32 bytes): base64 = 44 chars total (43 + \"=\")\nexport const sha256_hex = /^[0-9a-fA-F]{64}$/;\nexport const sha256_base64 = /*@__PURE__*/ fixedBase64(43, \"=\");\nexport const sha256_base64url = /*@__PURE__*/ fixedBase64url(43);\n// SHA384 (48 bytes): base64 = 64 chars total (no padding)\nexport const sha384_hex = /^[0-9a-fA-F]{96}$/;\nexport const sha384_base64 = /*@__PURE__*/ fixedBase64(64, \"\");\nexport const sha384_base64url = /*@__PURE__*/ fixedBase64url(64);\n// SHA512 (64 bytes): base64 = 88 chars total (86 + \"==\")\nexport const sha512_hex = /^[0-9a-fA-F]{128}$/;\nexport const sha512_base64 = /*@__PURE__*/ fixedBase64(86, \"==\");\nexport const sha512_base64url = /*@__PURE__*/ fixedBase64url(86);\n", "// import { $ZodType } from \"./schemas.js\";\nimport * as core from \"./core.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nexport const $ZodCheck = /*@__PURE__*/ core.$constructor(\"$ZodCheck\", (inst, def) => {\n var _a;\n inst._zod ?? (inst._zod = {});\n inst._zod.def = def;\n (_a = inst._zod).onattach ?? (_a.onattach = []);\n});\nconst numericOriginMap = {\n number: \"number\",\n bigint: \"bigint\",\n object: \"date\",\n};\nexport const $ZodCheckLessThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckLessThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;\n if (def.value < curr) {\n if (def.inclusive)\n bag.maximum = def.value;\n else\n bag.exclusiveMaximum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckGreaterThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckGreaterThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;\n if (def.value > curr) {\n if (def.inclusive)\n bag.minimum = def.value;\n else\n bag.exclusiveMinimum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMultipleOf = \n/*@__PURE__*/ core.$constructor(\"$ZodCheckMultipleOf\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n var _a;\n (_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);\n });\n inst._zod.check = (payload) => {\n if (typeof payload.value !== typeof def.value)\n throw new Error(\"Cannot mix number and bigint in multiple_of check.\");\n const isMultiple = typeof payload.value === \"bigint\"\n ? payload.value % def.value === BigInt(0)\n : util.floatSafeRemainder(payload.value, def.value) === 0;\n if (isMultiple)\n return;\n payload.issues.push({\n origin: typeof payload.value,\n code: \"not_multiple_of\",\n divisor: def.value,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckNumberFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n def.format = def.format || \"float64\";\n const isInt = def.format?.includes(\"int\");\n const origin = isInt ? \"int\" : \"number\";\n const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n if (isInt)\n bag.pattern = regexes.integer;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (isInt) {\n if (!Number.isInteger(input)) {\n // invalid_format issue\n // payload.issues.push({\n // expected: def.format,\n // format: def.format,\n // code: \"invalid_format\",\n // input,\n // inst,\n // });\n // invalid_type issue\n payload.issues.push({\n expected: origin,\n format: def.format,\n code: \"invalid_type\",\n continue: false,\n input,\n inst,\n });\n return;\n // not_multiple_of issue\n // payload.issues.push({\n // code: \"not_multiple_of\",\n // origin: \"number\",\n // input,\n // inst,\n // divisor: 1,\n // });\n }\n if (!Number.isSafeInteger(input)) {\n if (input > 0) {\n // too_big\n payload.issues.push({\n input,\n code: \"too_big\",\n maximum: Number.MAX_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n else {\n // too_small\n payload.issues.push({\n input,\n code: \"too_small\",\n minimum: Number.MIN_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n return;\n }\n }\n if (input < minimum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_small\",\n minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckBigIntFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (input < minimum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_small\",\n minimum: minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckMaxSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size <= def.maximum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size >= def.minimum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckSizeEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckSizeEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.size;\n bag.maximum = def.size;\n bag.size = def.size;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size === def.size)\n return;\n const tooBig = size > def.size;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n ...(tooBig ? { code: \"too_big\", maximum: def.size } : { code: \"too_small\", minimum: def.size }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMaxLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length <= def.maximum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length >= def.minimum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckLengthEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.length;\n bag.maximum = def.length;\n bag.length = def.length;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length === def.length)\n return;\n const origin = util.getLengthableOrigin(input);\n const tooBig = length > def.length;\n payload.issues.push({\n origin,\n ...(tooBig ? { code: \"too_big\", maximum: def.length } : { code: \"too_small\", minimum: def.length }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckStringFormat\", (inst, def) => {\n var _a, _b;\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n if (def.pattern) {\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(def.pattern);\n }\n });\n if (def.pattern)\n (_a = inst._zod).check ?? (_a.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n ...(def.pattern ? { pattern: def.pattern.toString() } : {}),\n inst,\n continue: !def.abort,\n });\n });\n else\n (_b = inst._zod).check ?? (_b.check = () => { });\n});\nexport const $ZodCheckRegex = /*@__PURE__*/ core.$constructor(\"$ZodCheckRegex\", (inst, def) => {\n $ZodCheckStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"regex\",\n input: payload.value,\n pattern: def.pattern.toString(),\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLowerCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckLowerCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.lowercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckUpperCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckUpperCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.uppercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckIncludes = /*@__PURE__*/ core.$constructor(\"$ZodCheckIncludes\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const escapedRegex = util.escapeRegex(def.includes);\n const pattern = new RegExp(typeof def.position === \"number\" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);\n def.pattern = pattern;\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.includes(def.includes, def.position))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"includes\",\n includes: def.includes,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStartsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckStartsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.startsWith(def.prefix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"starts_with\",\n prefix: def.prefix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckEndsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckEndsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.endsWith(def.suffix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"ends_with\",\n suffix: def.suffix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n///////////////////////////////////\n///// $ZodCheckProperty /////\n///////////////////////////////////\nfunction handleCheckPropertyResult(result, payload, property) {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(property, result.issues));\n }\n}\nexport const $ZodCheckProperty = /*@__PURE__*/ core.$constructor(\"$ZodCheckProperty\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n const result = def.schema._zod.run({\n value: payload.value[def.property],\n issues: [],\n }, {});\n if (result instanceof Promise) {\n return result.then((result) => handleCheckPropertyResult(result, payload, def.property));\n }\n handleCheckPropertyResult(result, payload, def.property);\n return;\n };\n});\nexport const $ZodCheckMimeType = /*@__PURE__*/ core.$constructor(\"$ZodCheckMimeType\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const mimeSet = new Set(def.mime);\n inst._zod.onattach.push((inst) => {\n inst._zod.bag.mime = def.mime;\n });\n inst._zod.check = (payload) => {\n if (mimeSet.has(payload.value.type))\n return;\n payload.issues.push({\n code: \"invalid_value\",\n values: def.mime,\n input: payload.value.type,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckOverwrite = /*@__PURE__*/ core.$constructor(\"$ZodCheckOverwrite\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n payload.value = def.tx(payload.value);\n };\n});\n", "export class Doc {\n constructor(args = []) {\n this.content = [];\n this.indent = 0;\n if (this)\n this.args = args;\n }\n indented(fn) {\n this.indent += 1;\n fn(this);\n this.indent -= 1;\n }\n write(arg) {\n if (typeof arg === \"function\") {\n arg(this, { execution: \"sync\" });\n arg(this, { execution: \"async\" });\n return;\n }\n const content = arg;\n const lines = content.split(\"\\n\").filter((x) => x);\n const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));\n const dedented = lines.map((x) => x.slice(minIndent)).map((x) => \" \".repeat(this.indent * 2) + x);\n for (const line of dedented) {\n this.content.push(line);\n }\n }\n compile() {\n const F = Function;\n const args = this?.args;\n const content = this?.content ?? [``];\n const lines = [...content.map((x) => ` ${x}`)];\n // console.log(lines.join(\"\\n\"));\n return new F(...args, lines.join(\"\\n\"));\n }\n}\n", "export const version = {\n major: 4,\n minor: 3,\n patch: 6,\n};\n", "import * as checks from \"./checks.js\";\nimport * as core from \"./core.js\";\nimport { Doc } from \"./doc.js\";\nimport { parse, parseAsync, safeParse, safeParseAsync } from \"./parse.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nimport { version } from \"./versions.js\";\nexport const $ZodType = /*@__PURE__*/ core.$constructor(\"$ZodType\", (inst, def) => {\n var _a;\n inst ?? (inst = {});\n inst._zod.def = def; // set _def property\n inst._zod.bag = inst._zod.bag || {}; // initialize _bag object\n inst._zod.version = version;\n const checks = [...(inst._zod.def.checks ?? [])];\n // if inst is itself a checks.$ZodCheck, run it as a check\n if (inst._zod.traits.has(\"$ZodCheck\")) {\n checks.unshift(inst);\n }\n for (const ch of checks) {\n for (const fn of ch._zod.onattach) {\n fn(inst);\n }\n }\n if (checks.length === 0) {\n // deferred initializer\n // inst._zod.parse is not yet defined\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred?.push(() => {\n inst._zod.run = inst._zod.parse;\n });\n }\n else {\n const runChecks = (payload, checks, ctx) => {\n let isAborted = util.aborted(payload);\n let asyncResult;\n for (const ch of checks) {\n if (ch._zod.def.when) {\n const shouldRun = ch._zod.def.when(payload);\n if (!shouldRun)\n continue;\n }\n else if (isAborted) {\n continue;\n }\n const currLen = payload.issues.length;\n const _ = ch._zod.check(payload);\n if (_ instanceof Promise && ctx?.async === false) {\n throw new core.$ZodAsyncError();\n }\n if (asyncResult || _ instanceof Promise) {\n asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {\n await _;\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n return;\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n });\n }\n else {\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n continue;\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n }\n }\n if (asyncResult) {\n return asyncResult.then(() => {\n return payload;\n });\n }\n return payload;\n };\n const handleCanaryResult = (canary, payload, ctx) => {\n // abort if the canary is aborted\n if (util.aborted(canary)) {\n canary.aborted = true;\n return canary;\n }\n // run checks first, then\n const checkResult = runChecks(payload, checks, ctx);\n if (checkResult instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));\n }\n return inst._zod.parse(checkResult, ctx);\n };\n inst._zod.run = (payload, ctx) => {\n if (ctx.skipChecks) {\n return inst._zod.parse(payload, ctx);\n }\n if (ctx.direction === \"backward\") {\n // run canary\n // initial pass (no checks)\n const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });\n if (canary instanceof Promise) {\n return canary.then((canary) => {\n return handleCanaryResult(canary, payload, ctx);\n });\n }\n return handleCanaryResult(canary, payload, ctx);\n }\n // forward\n const result = inst._zod.parse(payload, ctx);\n if (result instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return result.then((result) => runChecks(result, checks, ctx));\n }\n return runChecks(result, checks, ctx);\n };\n }\n // Lazy initialize ~standard to avoid creating objects for every schema\n util.defineLazy(inst, \"~standard\", () => ({\n validate: (value) => {\n try {\n const r = safeParse(inst, value);\n return r.success ? { value: r.data } : { issues: r.error?.issues };\n }\n catch (_) {\n return safeParseAsync(inst, value).then((r) => (r.success ? { value: r.data } : { issues: r.error?.issues }));\n }\n },\n vendor: \"zod\",\n version: 1,\n }));\n});\nexport { clone } from \"./util.js\";\nexport const $ZodString = /*@__PURE__*/ core.$constructor(\"$ZodString\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? regexes.string(inst._zod.bag);\n inst._zod.parse = (payload, _) => {\n if (def.coerce)\n try {\n payload.value = String(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"string\")\n return payload;\n payload.issues.push({\n expected: \"string\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodStringFormat\", (inst, def) => {\n // check initialization must come first\n checks.$ZodCheckStringFormat.init(inst, def);\n $ZodString.init(inst, def);\n});\nexport const $ZodGUID = /*@__PURE__*/ core.$constructor(\"$ZodGUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.guid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodUUID = /*@__PURE__*/ core.$constructor(\"$ZodUUID\", (inst, def) => {\n if (def.version) {\n const versionMap = {\n v1: 1,\n v2: 2,\n v3: 3,\n v4: 4,\n v5: 5,\n v6: 6,\n v7: 7,\n v8: 8,\n };\n const v = versionMap[def.version];\n if (v === undefined)\n throw new Error(`Invalid UUID version: \"${def.version}\"`);\n def.pattern ?? (def.pattern = regexes.uuid(v));\n }\n else\n def.pattern ?? (def.pattern = regexes.uuid());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodEmail = /*@__PURE__*/ core.$constructor(\"$ZodEmail\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.email);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodURL = /*@__PURE__*/ core.$constructor(\"$ZodURL\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n try {\n // Trim whitespace from input\n const trimmed = payload.value.trim();\n // @ts-ignore\n const url = new URL(trimmed);\n if (def.hostname) {\n def.hostname.lastIndex = 0;\n if (!def.hostname.test(url.hostname)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid hostname\",\n pattern: def.hostname.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n }\n if (def.protocol) {\n def.protocol.lastIndex = 0;\n if (!def.protocol.test(url.protocol.endsWith(\":\") ? url.protocol.slice(0, -1) : url.protocol)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid protocol\",\n pattern: def.protocol.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n }\n // Set the output value based on normalize flag\n if (def.normalize) {\n // Use normalized URL\n payload.value = url.href;\n }\n else {\n // Preserve the original input (trimmed)\n payload.value = trimmed;\n }\n return;\n }\n catch (_) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodEmoji = /*@__PURE__*/ core.$constructor(\"$ZodEmoji\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.emoji());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodNanoID = /*@__PURE__*/ core.$constructor(\"$ZodNanoID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.nanoid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID = /*@__PURE__*/ core.$constructor(\"$ZodCUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID2 = /*@__PURE__*/ core.$constructor(\"$ZodCUID2\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid2);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodULID = /*@__PURE__*/ core.$constructor(\"$ZodULID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ulid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodXID = /*@__PURE__*/ core.$constructor(\"$ZodXID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.xid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodKSUID = /*@__PURE__*/ core.$constructor(\"$ZodKSUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ksuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODateTime = /*@__PURE__*/ core.$constructor(\"$ZodISODateTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.datetime(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODate = /*@__PURE__*/ core.$constructor(\"$ZodISODate\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.date);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISOTime = /*@__PURE__*/ core.$constructor(\"$ZodISOTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.time(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODuration = /*@__PURE__*/ core.$constructor(\"$ZodISODuration\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.duration);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodIPv4 = /*@__PURE__*/ core.$constructor(\"$ZodIPv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv4);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv4`;\n});\nexport const $ZodIPv6 = /*@__PURE__*/ core.$constructor(\"$ZodIPv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv6);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv6`;\n inst._zod.check = (payload) => {\n try {\n // @ts-ignore\n new URL(`http://[${payload.value}]`);\n // return;\n }\n catch {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"ipv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodMAC = /*@__PURE__*/ core.$constructor(\"$ZodMAC\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.mac(def.delimiter));\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `mac`;\n});\nexport const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv4);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n const parts = payload.value.split(\"/\");\n try {\n if (parts.length !== 2)\n throw new Error();\n const [address, prefix] = parts;\n if (!prefix)\n throw new Error();\n const prefixNum = Number(prefix);\n if (`${prefixNum}` !== prefix)\n throw new Error();\n if (prefixNum < 0 || prefixNum > 128)\n throw new Error();\n // @ts-ignore\n new URL(`http://[${address}]`);\n }\n catch {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"cidrv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64(data) {\n if (data === \"\")\n return true;\n if (data.length % 4 !== 0)\n return false;\n try {\n // @ts-ignore\n atob(data);\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodBase64 = /*@__PURE__*/ core.$constructor(\"$ZodBase64\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64\";\n inst._zod.check = (payload) => {\n if (isValidBase64(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64URL(data) {\n if (!regexes.base64url.test(data))\n return false;\n const base64 = data.replace(/[-_]/g, (c) => (c === \"-\" ? \"+\" : \"/\"));\n const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, \"=\");\n return isValidBase64(padded);\n}\nexport const $ZodBase64URL = /*@__PURE__*/ core.$constructor(\"$ZodBase64URL\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64url);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64url\";\n inst._zod.check = (payload) => {\n if (isValidBase64URL(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodE164 = /*@__PURE__*/ core.$constructor(\"$ZodE164\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.e164);\n $ZodStringFormat.init(inst, def);\n});\n////////////////////////////// ZodJWT //////////////////////////////\nexport function isValidJWT(token, algorithm = null) {\n try {\n const tokensParts = token.split(\".\");\n if (tokensParts.length !== 3)\n return false;\n const [header] = tokensParts;\n if (!header)\n return false;\n // @ts-ignore\n const parsedHeader = JSON.parse(atob(header));\n if (\"typ\" in parsedHeader && parsedHeader?.typ !== \"JWT\")\n return false;\n if (!parsedHeader.alg)\n return false;\n if (algorithm && (!(\"alg\" in parsedHeader) || parsedHeader.alg !== algorithm))\n return false;\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodJWT = /*@__PURE__*/ core.$constructor(\"$ZodJWT\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidJWT(payload.value, def.alg))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"jwt\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCustomStringFormat\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (def.fn(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodNumber = /*@__PURE__*/ core.$constructor(\"$ZodNumber\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Number(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"number\" && !Number.isNaN(input) && Number.isFinite(input)) {\n return payload;\n }\n const received = typeof input === \"number\"\n ? Number.isNaN(input)\n ? \"NaN\"\n : !Number.isFinite(input)\n ? \"Infinity\"\n : undefined\n : undefined;\n payload.issues.push({\n expected: \"number\",\n code: \"invalid_type\",\n input,\n inst,\n ...(received ? { received } : {}),\n });\n return payload;\n };\n});\nexport const $ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodNumberFormat\", (inst, def) => {\n checks.$ZodCheckNumberFormat.init(inst, def);\n $ZodNumber.init(inst, def); // no format checks\n});\nexport const $ZodBoolean = /*@__PURE__*/ core.$constructor(\"$ZodBoolean\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.boolean;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Boolean(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"boolean\")\n return payload;\n payload.issues.push({\n expected: \"boolean\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigInt = /*@__PURE__*/ core.$constructor(\"$ZodBigInt\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.bigint;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = BigInt(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"bigint\")\n return payload;\n payload.issues.push({\n expected: \"bigint\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodBigIntFormat\", (inst, def) => {\n checks.$ZodCheckBigIntFormat.init(inst, def);\n $ZodBigInt.init(inst, def); // no format checks\n});\nexport const $ZodSymbol = /*@__PURE__*/ core.$constructor(\"$ZodSymbol\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"symbol\")\n return payload;\n payload.issues.push({\n expected: \"symbol\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodUndefined = /*@__PURE__*/ core.$constructor(\"$ZodUndefined\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.undefined;\n inst._zod.values = new Set([undefined]);\n inst._zod.optin = \"optional\";\n inst._zod.optout = \"optional\";\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"undefined\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodNull = /*@__PURE__*/ core.$constructor(\"$ZodNull\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.null;\n inst._zod.values = new Set([null]);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (input === null)\n return payload;\n payload.issues.push({\n expected: \"null\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodAny = /*@__PURE__*/ core.$constructor(\"$ZodAny\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodUnknown = /*@__PURE__*/ core.$constructor(\"$ZodUnknown\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodNever = /*@__PURE__*/ core.$constructor(\"$ZodNever\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n payload.issues.push({\n expected: \"never\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodVoid = /*@__PURE__*/ core.$constructor(\"$ZodVoid\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"void\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodDate = /*@__PURE__*/ core.$constructor(\"$ZodDate\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce) {\n try {\n payload.value = new Date(payload.value);\n }\n catch (_err) { }\n }\n const input = payload.value;\n const isDate = input instanceof Date;\n const isValidDate = isDate && !Number.isNaN(input.getTime());\n if (isValidDate)\n return payload;\n payload.issues.push({\n expected: \"date\",\n code: \"invalid_type\",\n input,\n ...(isDate ? { received: \"Invalid Date\" } : {}),\n inst,\n });\n return payload;\n };\n});\nfunction handleArrayResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodArray = /*@__PURE__*/ core.$constructor(\"$ZodArray\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n expected: \"array\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = Array(input.length);\n const proms = [];\n for (let i = 0; i < input.length; i++) {\n const item = input[i];\n const result = def.element._zod.run({\n value: item,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleArrayResult(result, payload, i)));\n }\n else {\n handleArrayResult(result, payload, i);\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload; //handleArrayResultsAsync(parseResults, final);\n };\n});\nfunction handlePropertyResult(result, final, key, input, isOptionalOut) {\n if (result.issues.length) {\n // For optional-out schemas, ignore errors on absent keys\n if (isOptionalOut && !(key in input)) {\n return;\n }\n final.issues.push(...util.prefixIssues(key, result.issues));\n }\n if (result.value === undefined) {\n if (key in input) {\n final.value[key] = undefined;\n }\n }\n else {\n final.value[key] = result.value;\n }\n}\nfunction normalizeDef(def) {\n const keys = Object.keys(def.shape);\n for (const k of keys) {\n if (!def.shape?.[k]?._zod?.traits?.has(\"$ZodType\")) {\n throw new Error(`Invalid element at key \"${k}\": expected a Zod schema`);\n }\n }\n const okeys = util.optionalKeys(def.shape);\n return {\n ...def,\n keys,\n keySet: new Set(keys),\n numKeys: keys.length,\n optionalKeys: new Set(okeys),\n };\n}\nfunction handleCatchall(proms, input, payload, ctx, def, inst) {\n const unrecognized = [];\n // iterate over input keys\n const keySet = def.keySet;\n const _catchall = def.catchall._zod;\n const t = _catchall.def.type;\n const isOptionalOut = _catchall.optout === \"optional\";\n for (const key in input) {\n if (keySet.has(key))\n continue;\n if (t === \"never\") {\n unrecognized.push(key);\n continue;\n }\n const r = _catchall.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n }\n else {\n handlePropertyResult(r, payload, key, input, isOptionalOut);\n }\n }\n if (unrecognized.length) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n keys: unrecognized,\n input,\n inst,\n });\n }\n if (!proms.length)\n return payload;\n return Promise.all(proms).then(() => {\n return payload;\n });\n}\nexport const $ZodObject = /*@__PURE__*/ core.$constructor(\"$ZodObject\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodType.init(inst, def);\n // const sh = def.shape;\n const desc = Object.getOwnPropertyDescriptor(def, \"shape\");\n if (!desc?.get) {\n const sh = def.shape;\n Object.defineProperty(def, \"shape\", {\n get: () => {\n const newSh = { ...sh };\n Object.defineProperty(def, \"shape\", {\n value: newSh,\n });\n return newSh;\n },\n });\n }\n const _normalized = util.cached(() => normalizeDef(def));\n util.defineLazy(inst._zod, \"propValues\", () => {\n const shape = def.shape;\n const propValues = {};\n for (const key in shape) {\n const field = shape[key]._zod;\n if (field.values) {\n propValues[key] ?? (propValues[key] = new Set());\n for (const v of field.values)\n propValues[key].add(v);\n }\n }\n return propValues;\n });\n const isObject = util.isObject;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = {};\n const proms = [];\n const shape = value.shape;\n for (const key of value.keys) {\n const el = shape[key];\n const isOptionalOut = el._zod.optout === \"optional\";\n const r = el._zod.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n }\n else {\n handlePropertyResult(r, payload, key, input, isOptionalOut);\n }\n }\n if (!catchall) {\n return proms.length ? Promise.all(proms).then(() => payload) : payload;\n }\n return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);\n };\n});\nexport const $ZodObjectJIT = /*@__PURE__*/ core.$constructor(\"$ZodObjectJIT\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodObject.init(inst, def);\n const superParse = inst._zod.parse;\n const _normalized = util.cached(() => normalizeDef(def));\n const generateFastpass = (shape) => {\n const doc = new Doc([\"shape\", \"payload\", \"ctx\"]);\n const normalized = _normalized.value;\n const parseStr = (key) => {\n const k = util.esc(key);\n return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;\n };\n doc.write(`const input = payload.value;`);\n const ids = Object.create(null);\n let counter = 0;\n for (const key of normalized.keys) {\n ids[key] = `key_${counter++}`;\n }\n // A: preserve key order {\n doc.write(`const newResult = {};`);\n for (const key of normalized.keys) {\n const id = ids[key];\n const k = util.esc(key);\n const schema = shape[key];\n const isOptionalOut = schema?._zod?.optout === \"optional\";\n doc.write(`const ${id} = ${parseStr(key)};`);\n if (isOptionalOut) {\n // For optional-out schemas, ignore errors on absent keys\n doc.write(`\n if (${id}.issues.length) {\n if (${k} in input) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n }\n \n if (${id}.value === undefined) {\n if (${k} in input) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n \n `);\n }\n else {\n doc.write(`\n if (${id}.issues.length) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n \n if (${id}.value === undefined) {\n if (${k} in input) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n \n `);\n }\n }\n doc.write(`payload.value = newResult;`);\n doc.write(`return payload;`);\n const fn = doc.compile();\n return (payload, ctx) => fn(shape, payload, ctx);\n };\n let fastpass;\n const isObject = util.isObject;\n const jit = !core.globalConfig.jitless;\n const allowsEval = util.allowsEval;\n const fastEnabled = jit && allowsEval.value; // && !def.catchall;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {\n // always synchronous\n if (!fastpass)\n fastpass = generateFastpass(def.shape);\n payload = fastpass(payload, ctx);\n if (!catchall)\n return payload;\n return handleCatchall([], input, payload, ctx, value, inst);\n }\n return superParse(payload, ctx);\n };\n});\nfunction handleUnionResults(results, final, inst, ctx) {\n for (const result of results) {\n if (result.issues.length === 0) {\n final.value = result.value;\n return final;\n }\n }\n const nonaborted = results.filter((r) => !util.aborted(r));\n if (nonaborted.length === 1) {\n final.value = nonaborted[0].value;\n return nonaborted[0];\n }\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n return final;\n}\nexport const $ZodUnion = /*@__PURE__*/ core.$constructor(\"$ZodUnion\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.options.some((o) => o._zod.optin === \"optional\") ? \"optional\" : undefined);\n util.defineLazy(inst._zod, \"optout\", () => def.options.some((o) => o._zod.optout === \"optional\") ? \"optional\" : undefined);\n util.defineLazy(inst._zod, \"values\", () => {\n if (def.options.every((o) => o._zod.values)) {\n return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));\n }\n return undefined;\n });\n util.defineLazy(inst._zod, \"pattern\", () => {\n if (def.options.every((o) => o._zod.pattern)) {\n const patterns = def.options.map((o) => o._zod.pattern);\n return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join(\"|\")})$`);\n }\n return undefined;\n });\n const single = def.options.length === 1;\n const first = def.options[0]._zod.run;\n inst._zod.parse = (payload, ctx) => {\n if (single) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n if (result.issues.length === 0)\n return result;\n results.push(result);\n }\n }\n if (!async)\n return handleUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleUnionResults(results, payload, inst, ctx);\n });\n };\n});\nfunction handleExclusiveUnionResults(results, final, inst, ctx) {\n const successes = results.filter((r) => r.issues.length === 0);\n if (successes.length === 1) {\n final.value = successes[0].value;\n return final;\n }\n if (successes.length === 0) {\n // No matches - same as regular union\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n }\n else {\n // Multiple matches - exclusive union failure\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: [],\n inclusive: false,\n });\n }\n return final;\n}\nexport const $ZodXor = /*@__PURE__*/ core.$constructor(\"$ZodXor\", (inst, def) => {\n $ZodUnion.init(inst, def);\n def.inclusive = false;\n const single = def.options.length === 1;\n const first = def.options[0]._zod.run;\n inst._zod.parse = (payload, ctx) => {\n if (single) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n results.push(result);\n }\n }\n if (!async)\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n });\n };\n});\nexport const $ZodDiscriminatedUnion = \n/*@__PURE__*/\ncore.$constructor(\"$ZodDiscriminatedUnion\", (inst, def) => {\n def.inclusive = false;\n $ZodUnion.init(inst, def);\n const _super = inst._zod.parse;\n util.defineLazy(inst._zod, \"propValues\", () => {\n const propValues = {};\n for (const option of def.options) {\n const pv = option._zod.propValues;\n if (!pv || Object.keys(pv).length === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(option)}\"`);\n for (const [k, v] of Object.entries(pv)) {\n if (!propValues[k])\n propValues[k] = new Set();\n for (const val of v) {\n propValues[k].add(val);\n }\n }\n }\n return propValues;\n });\n const disc = util.cached(() => {\n const opts = def.options;\n const map = new Map();\n for (const o of opts) {\n const values = o._zod.propValues?.[def.discriminator];\n if (!values || values.size === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(o)}\"`);\n for (const v of values) {\n if (map.has(v)) {\n throw new Error(`Duplicate discriminator value \"${String(v)}\"`);\n }\n map.set(v, o);\n }\n }\n return map;\n });\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isObject(input)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"object\",\n input,\n inst,\n });\n return payload;\n }\n const opt = disc.value.get(input?.[def.discriminator]);\n if (opt) {\n return opt._zod.run(payload, ctx);\n }\n if (def.unionFallback) {\n return _super(payload, ctx);\n }\n // no matching discriminator\n payload.issues.push({\n code: \"invalid_union\",\n errors: [],\n note: \"No matching discriminator\",\n discriminator: def.discriminator,\n input,\n path: [def.discriminator],\n inst,\n });\n return payload;\n };\n});\nexport const $ZodIntersection = /*@__PURE__*/ core.$constructor(\"$ZodIntersection\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n const left = def.left._zod.run({ value: input, issues: [] }, ctx);\n const right = def.right._zod.run({ value: input, issues: [] }, ctx);\n const async = left instanceof Promise || right instanceof Promise;\n if (async) {\n return Promise.all([left, right]).then(([left, right]) => {\n return handleIntersectionResults(payload, left, right);\n });\n }\n return handleIntersectionResults(payload, left, right);\n };\n});\nfunction mergeValues(a, b) {\n // const aType = parse.t(a);\n // const bType = parse.t(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n if (a instanceof Date && b instanceof Date && +a === +b) {\n return { valid: true, data: a };\n }\n if (util.isPlainObject(a) && util.isPlainObject(b)) {\n const bKeys = Object.keys(b);\n const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [key, ...sharedValue.mergeErrorPath],\n };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) {\n return { valid: false, mergeErrorPath: [] };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [index, ...sharedValue.mergeErrorPath],\n };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n return { valid: false, mergeErrorPath: [] };\n}\nfunction handleIntersectionResults(result, left, right) {\n // Track which side(s) report each key as unrecognized\n const unrecKeys = new Map();\n let unrecIssue;\n for (const iss of left.issues) {\n if (iss.code === \"unrecognized_keys\") {\n unrecIssue ?? (unrecIssue = iss);\n for (const k of iss.keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k).l = true;\n }\n }\n else {\n result.issues.push(iss);\n }\n }\n for (const iss of right.issues) {\n if (iss.code === \"unrecognized_keys\") {\n for (const k of iss.keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k).r = true;\n }\n }\n else {\n result.issues.push(iss);\n }\n }\n // Report only keys unrecognized by BOTH sides\n const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);\n if (bothKeys.length && unrecIssue) {\n result.issues.push({ ...unrecIssue, keys: bothKeys });\n }\n if (util.aborted(result))\n return result;\n const merged = mergeValues(left.value, right.value);\n if (!merged.valid) {\n throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);\n }\n result.value = merged.data;\n return result;\n}\nexport const $ZodTuple = /*@__PURE__*/ core.$constructor(\"$ZodTuple\", (inst, def) => {\n $ZodType.init(inst, def);\n const items = def.items;\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n input,\n inst,\n expected: \"tuple\",\n code: \"invalid_type\",\n });\n return payload;\n }\n payload.value = [];\n const proms = [];\n const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== \"optional\");\n const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;\n if (!def.rest) {\n const tooBig = input.length > items.length;\n const tooSmall = input.length < optStart - 1;\n if (tooBig || tooSmall) {\n payload.issues.push({\n ...(tooBig\n ? { code: \"too_big\", maximum: items.length, inclusive: true }\n : { code: \"too_small\", minimum: items.length }),\n input,\n inst,\n origin: \"array\",\n });\n return payload;\n }\n }\n let i = -1;\n for (const item of items) {\n i++;\n if (i >= input.length)\n if (i >= optStart)\n continue;\n const result = item._zod.run({\n value: input[i],\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleTupleResult(result, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n if (def.rest) {\n const rest = input.slice(items.length);\n for (const el of rest) {\n i++;\n const result = def.rest._zod.run({\n value: el,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleTupleResult(result, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleTupleResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodRecord = /*@__PURE__*/ core.$constructor(\"$ZodRecord\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isPlainObject(input)) {\n payload.issues.push({\n expected: \"record\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n const values = def.keyType._zod.values;\n if (values) {\n payload.value = {};\n const recordKeys = new Set();\n for (const key of values) {\n if (typeof key === \"string\" || typeof key === \"number\" || typeof key === \"symbol\") {\n recordKeys.add(typeof key === \"number\" ? key.toString() : key);\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[key] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[key] = result.value;\n }\n }\n }\n let unrecognized;\n for (const key in input) {\n if (!recordKeys.has(key)) {\n unrecognized = unrecognized ?? [];\n unrecognized.push(key);\n }\n }\n if (unrecognized && unrecognized.length > 0) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n input,\n inst,\n keys: unrecognized,\n });\n }\n }\n else {\n payload.value = {};\n for (const key of Reflect.ownKeys(input)) {\n if (key === \"__proto__\")\n continue;\n let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n if (keyResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n // Numeric string fallback: if key is a numeric string and failed, retry with Number(key)\n // This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals\n const checkNumericKey = typeof key === \"string\" && regexes.number.test(key) && keyResult.issues.length;\n if (checkNumericKey) {\n const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);\n if (retryResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n if (retryResult.issues.length === 0) {\n keyResult = retryResult;\n }\n }\n if (keyResult.issues.length) {\n if (def.mode === \"loose\") {\n // Pass through unchanged\n payload.value[key] = input[key];\n }\n else {\n // Default \"strict\" behavior: error on invalid key\n payload.issues.push({\n code: \"invalid_key\",\n origin: \"record\",\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n input: key,\n path: [key],\n inst,\n });\n }\n continue;\n }\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[keyResult.value] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[keyResult.value] = result.value;\n }\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload;\n };\n});\nexport const $ZodMap = /*@__PURE__*/ core.$constructor(\"$ZodMap\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Map)) {\n payload.issues.push({\n expected: \"map\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n payload.value = new Map();\n for (const [key, value] of input) {\n const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);\n if (keyResult instanceof Promise || valueResult instanceof Promise) {\n proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }));\n }\n else {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {\n if (keyResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, keyResult.issues));\n }\n else {\n final.issues.push({\n code: \"invalid_key\",\n origin: \"map\",\n input,\n inst,\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n if (valueResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, valueResult.issues));\n }\n else {\n final.issues.push({\n origin: \"map\",\n code: \"invalid_element\",\n input,\n inst,\n key: key,\n issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n final.value.set(keyResult.value, valueResult.value);\n}\nexport const $ZodSet = /*@__PURE__*/ core.$constructor(\"$ZodSet\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Set)) {\n payload.issues.push({\n input,\n inst,\n expected: \"set\",\n code: \"invalid_type\",\n });\n return payload;\n }\n const proms = [];\n payload.value = new Set();\n for (const item of input) {\n const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleSetResult(result, payload)));\n }\n else\n handleSetResult(result, payload);\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleSetResult(result, final) {\n if (result.issues.length) {\n final.issues.push(...result.issues);\n }\n final.value.add(result.value);\n}\nexport const $ZodEnum = /*@__PURE__*/ core.$constructor(\"$ZodEnum\", (inst, def) => {\n $ZodType.init(inst, def);\n const values = util.getEnumValues(def.entries);\n const valuesSet = new Set(values);\n inst._zod.values = valuesSet;\n inst._zod.pattern = new RegExp(`^(${values\n .filter((k) => util.propertyKeyTypes.has(typeof k))\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o.toString()))\n .join(\"|\")})$`);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (valuesSet.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodLiteral = /*@__PURE__*/ core.$constructor(\"$ZodLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n if (def.values.length === 0) {\n throw new Error(\"Cannot create literal schema with no valid values\");\n }\n const values = new Set(def.values);\n inst._zod.values = values;\n inst._zod.pattern = new RegExp(`^(${def.values\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o)))\n .join(\"|\")})$`);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (values.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values: def.values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodFile = /*@__PURE__*/ core.$constructor(\"$ZodFile\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n // @ts-ignore\n if (input instanceof File)\n return payload;\n payload.issues.push({\n expected: \"file\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodTransform = /*@__PURE__*/ core.$constructor(\"$ZodTransform\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n const _out = def.transform(payload.value, payload);\n if (ctx.async) {\n const output = _out instanceof Promise ? _out : Promise.resolve(_out);\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n if (_out instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n payload.value = _out;\n return payload;\n };\n});\nfunction handleOptionalResult(result, input) {\n if (result.issues.length && input === undefined) {\n return { issues: [], value: undefined };\n }\n return result;\n}\nexport const $ZodOptional = /*@__PURE__*/ core.$constructor(\"$ZodOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n inst._zod.optout = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => {\n return def.innerType._zod.values ? new Set([...def.innerType._zod.values, undefined]) : undefined;\n });\n util.defineLazy(inst._zod, \"pattern\", () => {\n const pattern = def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n if (def.innerType._zod.optin === \"optional\") {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise)\n return result.then((r) => handleOptionalResult(r, payload.value));\n return handleOptionalResult(result, payload.value);\n }\n if (payload.value === undefined) {\n return payload;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodExactOptional = /*@__PURE__*/ core.$constructor(\"$ZodExactOptional\", (inst, def) => {\n // Call parent init - inherits optin/optout = \"optional\"\n $ZodOptional.init(inst, def);\n // Override values/pattern to NOT add undefined\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n util.defineLazy(inst._zod, \"pattern\", () => def.innerType._zod.pattern);\n // Override parse to just delegate (no undefined handling)\n inst._zod.parse = (payload, ctx) => {\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNullable = /*@__PURE__*/ core.$constructor(\"$ZodNullable\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n util.defineLazy(inst._zod, \"pattern\", () => {\n const pattern = def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;\n });\n util.defineLazy(inst._zod, \"values\", () => {\n return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n // Forward direction (decode): allow null to pass through\n if (payload.value === null)\n return payload;\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodDefault = /*@__PURE__*/ core.$constructor(\"$ZodDefault\", (inst, def) => {\n $ZodType.init(inst, def);\n // inst._zod.qin = \"true\";\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply defaults for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n /**\n * $ZodDefault returns the default value immediately in forward direction.\n * It doesn't pass the default value into the validator (\"prefault\"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a \"prefault\" for the pipe. */\n return payload;\n }\n // Forward direction: continue with default handling\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleDefaultResult(result, def));\n }\n return handleDefaultResult(result, def);\n };\n});\nfunction handleDefaultResult(payload, def) {\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return payload;\n}\nexport const $ZodPrefault = /*@__PURE__*/ core.$constructor(\"$ZodPrefault\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply prefault for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNonOptional = /*@__PURE__*/ core.$constructor(\"$ZodNonOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => {\n const v = def.innerType._zod.values;\n return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleNonOptionalResult(result, inst));\n }\n return handleNonOptionalResult(result, inst);\n };\n});\nfunction handleNonOptionalResult(payload, inst) {\n if (!payload.issues.length && payload.value === undefined) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: payload.value,\n inst,\n });\n }\n return payload;\n}\nexport const $ZodSuccess = /*@__PURE__*/ core.$constructor(\"$ZodSuccess\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(\"ZodSuccess\");\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.issues.length === 0;\n return payload;\n });\n }\n payload.value = result.issues.length === 0;\n return payload;\n };\n});\nexport const $ZodCatch = /*@__PURE__*/ core.$constructor(\"$ZodCatch\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply catch logic\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.value;\n if (result.issues.length) {\n payload.value = def.catchValue({\n ...payload,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n payload.issues = [];\n }\n return payload;\n });\n }\n payload.value = result.value;\n if (result.issues.length) {\n payload.value = def.catchValue({\n ...payload,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n payload.issues = [];\n }\n return payload;\n };\n});\nexport const $ZodNaN = /*@__PURE__*/ core.$constructor(\"$ZodNaN\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"number\" || !Number.isNaN(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"nan\",\n code: \"invalid_type\",\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodPipe = /*@__PURE__*/ core.$constructor(\"$ZodPipe\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => def.in._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n util.defineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handlePipeResult(right, def.in, ctx));\n }\n return handlePipeResult(right, def.in, ctx);\n }\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handlePipeResult(left, def.out, ctx));\n }\n return handlePipeResult(left, def.out, ctx);\n };\n});\nfunction handlePipeResult(left, next, ctx) {\n if (left.issues.length) {\n // prevent further checks\n left.aborted = true;\n return left;\n }\n return next._zod.run({ value: left.value, issues: left.issues }, ctx);\n}\nexport const $ZodCodec = /*@__PURE__*/ core.$constructor(\"$ZodCodec\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => def.in._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n util.defineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handleCodecAResult(left, def, ctx));\n }\n return handleCodecAResult(left, def, ctx);\n }\n else {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handleCodecAResult(right, def, ctx));\n }\n return handleCodecAResult(right, def, ctx);\n }\n };\n});\nfunction handleCodecAResult(result, def, ctx) {\n if (result.issues.length) {\n // prevent further checks\n result.aborted = true;\n return result;\n }\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const transformed = def.transform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));\n }\n return handleCodecTxResult(result, transformed, def.out, ctx);\n }\n else {\n const transformed = def.reverseTransform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));\n }\n return handleCodecTxResult(result, transformed, def.in, ctx);\n }\n}\nfunction handleCodecTxResult(left, value, nextSchema, ctx) {\n // Check if transform added any issues\n if (left.issues.length) {\n left.aborted = true;\n return left;\n }\n return nextSchema._zod.run({ value, issues: left.issues }, ctx);\n}\nexport const $ZodReadonly = /*@__PURE__*/ core.$constructor(\"$ZodReadonly\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"propValues\", () => def.innerType._zod.propValues);\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType?._zod?.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType?._zod?.optout);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then(handleReadonlyResult);\n }\n return handleReadonlyResult(result);\n };\n});\nfunction handleReadonlyResult(payload) {\n payload.value = Object.freeze(payload.value);\n return payload;\n}\nexport const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"$ZodTemplateLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n const regexParts = [];\n for (const part of def.parts) {\n if (typeof part === \"object\" && part !== null) {\n // is Zod schema\n if (!part._zod.pattern) {\n // if (!source)\n throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);\n }\n const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;\n if (!source)\n throw new Error(`Invalid template literal part: ${part._zod.traits}`);\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n regexParts.push(source.slice(start, end));\n }\n else if (part === null || util.primitiveTypes.has(typeof part)) {\n regexParts.push(util.escapeRegex(`${part}`));\n }\n else {\n throw new Error(`Invalid template literal part: ${part}`);\n }\n }\n inst._zod.pattern = new RegExp(`^${regexParts.join(\"\")}$`);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"string\") {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"string\",\n code: \"invalid_type\",\n });\n return payload;\n }\n inst._zod.pattern.lastIndex = 0;\n if (!inst._zod.pattern.test(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n code: \"invalid_format\",\n format: def.format ?? \"template_literal\",\n pattern: inst._zod.pattern.source,\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodFunction = /*@__PURE__*/ core.$constructor(\"$ZodFunction\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._def = def;\n inst._zod.def = def;\n inst.implement = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implement() must be called with a function\");\n }\n return function (...args) {\n const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;\n const result = Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return parse(inst._def.output, result);\n }\n return result;\n };\n };\n inst.implementAsync = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implementAsync() must be called with a function\");\n }\n return async function (...args) {\n const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;\n const result = await Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return await parseAsync(inst._def.output, result);\n }\n return result;\n };\n };\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"function\") {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"function\",\n input: payload.value,\n inst,\n });\n return payload;\n }\n // Check if output is a promise type to determine if we should use async implementation\n const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === \"promise\";\n if (hasPromiseOutput) {\n payload.value = inst.implementAsync(payload.value);\n }\n else {\n payload.value = inst.implement(payload.value);\n }\n return payload;\n };\n inst.input = (...args) => {\n const F = inst.constructor;\n if (Array.isArray(args[0])) {\n return new F({\n type: \"function\",\n input: new $ZodTuple({\n type: \"tuple\",\n items: args[0],\n rest: args[1],\n }),\n output: inst._def.output,\n });\n }\n return new F({\n type: \"function\",\n input: args[0],\n output: inst._def.output,\n });\n };\n inst.output = (output) => {\n const F = inst.constructor;\n return new F({\n type: \"function\",\n input: inst._def.input,\n output,\n });\n };\n return inst;\n});\nexport const $ZodPromise = /*@__PURE__*/ core.$constructor(\"$ZodPromise\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));\n };\n});\nexport const $ZodLazy = /*@__PURE__*/ core.$constructor(\"$ZodLazy\", (inst, def) => {\n $ZodType.init(inst, def);\n // let _innerType!: any;\n // util.defineLazy(def, \"getter\", () => {\n // if (!_innerType) {\n // _innerType = def.getter();\n // }\n // return () => _innerType;\n // });\n util.defineLazy(inst._zod, \"innerType\", () => def.getter());\n util.defineLazy(inst._zod, \"pattern\", () => inst._zod.innerType?._zod?.pattern);\n util.defineLazy(inst._zod, \"propValues\", () => inst._zod.innerType?._zod?.propValues);\n util.defineLazy(inst._zod, \"optin\", () => inst._zod.innerType?._zod?.optin ?? undefined);\n util.defineLazy(inst._zod, \"optout\", () => inst._zod.innerType?._zod?.optout ?? undefined);\n inst._zod.parse = (payload, ctx) => {\n const inner = inst._zod.innerType;\n return inner._zod.run(payload, ctx);\n };\n});\nexport const $ZodCustom = /*@__PURE__*/ core.$constructor(\"$ZodCustom\", (inst, def) => {\n checks.$ZodCheck.init(inst, def);\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _) => {\n return payload;\n };\n inst._zod.check = (payload) => {\n const input = payload.value;\n const r = def.fn(input);\n if (r instanceof Promise) {\n return r.then((r) => handleRefineResult(r, payload, input, inst));\n }\n handleRefineResult(r, payload, input, inst);\n return;\n };\n});\nfunction handleRefineResult(result, payload, input, inst) {\n if (!result) {\n const _iss = {\n code: \"custom\",\n input,\n inst, // incorporates params.error into issue reporting\n path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting\n continue: !inst._zod.def.abort,\n // params: inst._zod.def.params,\n };\n if (inst._zod.def.params)\n _iss.params = inst._zod.def.params;\n payload.issues.push(util.issue(_iss));\n }\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u062D\u0631\u0641\", verb: \"\u0623\u0646 \u064A\u062D\u0648\u064A\" },\n file: { unit: \"\u0628\u0627\u064A\u062A\", verb: \"\u0623\u0646 \u064A\u062D\u0648\u064A\" },\n array: { unit: \"\u0639\u0646\u0635\u0631\", verb: \"\u0623\u0646 \u064A\u062D\u0648\u064A\" },\n set: { unit: \"\u0639\u0646\u0635\u0631\", verb: \"\u0623\u0646 \u064A\u062D\u0648\u064A\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0645\u062F\u062E\u0644\",\n email: \"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A\",\n url: \"\u0631\u0627\u0628\u0637\",\n emoji: \"\u0625\u064A\u0645\u0648\u062C\u064A\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO\",\n date: \"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO\",\n time: \"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO\",\n duration: \"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO\",\n ipv4: \"\u0639\u0646\u0648\u0627\u0646 IPv4\",\n ipv6: \"\u0639\u0646\u0648\u0627\u0646 IPv6\",\n cidrv4: \"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4\",\n cidrv6: \"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6\",\n base64: \"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded\",\n base64url: \"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded\",\n json_string: \"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON\",\n e164: \"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0645\u062F\u062E\u0644\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${issue.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`;\n }\n return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue.origin ?? \"\u0627\u0644\u0642\u064A\u0645\u0629\"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"\u0639\u0646\u0635\u0631\"}`;\n return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue.origin ?? \"\u0627\u0644\u0642\u064A\u0645\u0629\"} ${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 \"${issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`;\n }\n case \"not_multiple_of\":\n return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u0645\u0639\u0631\u0641${issue.keys.length > 1 ? \"\u0627\u062A\" : \"\"} \u063A\u0631\u064A\u0628${issue.keys.length > 1 ? \"\u0629\" : \"\"}: ${util.joinValues(issue.keys, \"\u060C \")}`;\n case \"invalid_key\":\n return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue.origin}`;\n case \"invalid_union\":\n return \"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\";\n case \"invalid_element\":\n return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue.origin}`;\n default:\n return \"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\";\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"simvol\", verb: \"olmal\u0131d\u0131r\" },\n file: { unit: \"bayt\", verb: \"olmal\u0131d\u0131r\" },\n array: { unit: \"element\", verb: \"olmal\u0131d\u0131r\" },\n set: { unit: \"element\", verb: \"olmal\u0131d\u0131r\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"email address\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datetime\",\n date: \"ISO date\",\n time: \"ISO time\",\n duration: \"ISO duration\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded string\",\n base64url: \"base64url-encoded string\",\n json_string: \"JSON string\",\n e164: \"E.164 number\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Yanl\u0131\u015F d\u0259y\u0259r: g\u00F6zl\u0259nil\u0259n instanceof ${issue.expected}, daxil olan ${received}`;\n }\n return `Yanl\u0131\u015F d\u0259y\u0259r: g\u00F6zl\u0259nil\u0259n ${expected}, daxil olan ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Yanl\u0131\u015F d\u0259y\u0259r: g\u00F6zl\u0259nil\u0259n ${util.stringifyPrimitive(issue.values[0])}`;\n return `Yanl\u0131\u015F se\u00E7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u00C7ox b\u00F6y\u00FCk: g\u00F6zl\u0259nil\u0259n ${issue.origin ?? \"d\u0259y\u0259r\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"element\"}`;\n return `\u00C7ox b\u00F6y\u00FCk: g\u00F6zl\u0259nil\u0259n ${issue.origin ?? \"d\u0259y\u0259r\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u00C7ox ki\u00E7ik: g\u00F6zl\u0259nil\u0259n ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n return `\u00C7ox ki\u00E7ik: g\u00F6zl\u0259nil\u0259n ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Yanl\u0131\u015F m\u0259tn: \"${_issue.prefix}\" il\u0259 ba\u015Flamal\u0131d\u0131r`;\n if (_issue.format === \"ends_with\")\n return `Yanl\u0131\u015F m\u0259tn: \"${_issue.suffix}\" il\u0259 bitm\u0259lidir`;\n if (_issue.format === \"includes\")\n return `Yanl\u0131\u015F m\u0259tn: \"${_issue.includes}\" daxil olmal\u0131d\u0131r`;\n if (_issue.format === \"regex\")\n return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`;\n return `Yanl\u0131\u015F ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Yanl\u0131\u015F \u0259d\u0259d: ${issue.divisor} il\u0259 b\u00F6l\u00FCn\u0259 bil\u0259n olmal\u0131d\u0131r`;\n case \"unrecognized_keys\":\n return `Tan\u0131nmayan a\u00E7ar${issue.keys.length > 1 ? \"lar\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} daxilind\u0259 yanl\u0131\u015F a\u00E7ar`;\n case \"invalid_union\":\n return \"Yanl\u0131\u015F d\u0259y\u0259r\";\n case \"invalid_element\":\n return `${issue.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;\n default:\n return `Yanl\u0131\u015F d\u0259y\u0259r`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nfunction getBelarusianPlural(count, one, few, many) {\n const absCount = Math.abs(count);\n const lastDigit = absCount % 10;\n const lastTwoDigits = absCount % 100;\n if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {\n return many;\n }\n if (lastDigit === 1) {\n return one;\n }\n if (lastDigit >= 2 && lastDigit <= 4) {\n return few;\n }\n return many;\n}\nconst error = () => {\n const Sizable = {\n string: {\n unit: {\n one: \"\u0441\u0456\u043C\u0432\u0430\u043B\",\n few: \"\u0441\u0456\u043C\u0432\u0430\u043B\u044B\",\n many: \"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E\",\n },\n verb: \"\u043C\u0435\u0446\u044C\",\n },\n array: {\n unit: {\n one: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\",\n few: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B\",\n many: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E\",\n },\n verb: \"\u043C\u0435\u0446\u044C\",\n },\n set: {\n unit: {\n one: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\",\n few: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B\",\n many: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E\",\n },\n verb: \"\u043C\u0435\u0446\u044C\",\n },\n file: {\n unit: {\n one: \"\u0431\u0430\u0439\u0442\",\n few: \"\u0431\u0430\u0439\u0442\u044B\",\n many: \"\u0431\u0430\u0439\u0442\u0430\u045E\",\n },\n verb: \"\u043C\u0435\u0446\u044C\",\n },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0443\u0432\u043E\u0434\",\n email: \"email \u0430\u0434\u0440\u0430\u0441\",\n url: \"URL\",\n emoji: \"\u044D\u043C\u043E\u0434\u0437\u0456\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441\",\n date: \"ISO \u0434\u0430\u0442\u0430\",\n time: \"ISO \u0447\u0430\u0441\",\n duration: \"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C\",\n ipv4: \"IPv4 \u0430\u0434\u0440\u0430\u0441\",\n ipv6: \"IPv6 \u0430\u0434\u0440\u0430\u0441\",\n cidrv4: \"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D\",\n cidrv6: \"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D\",\n base64: \"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64\",\n base64url: \"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url\",\n json_string: \"JSON \u0440\u0430\u0434\u043E\u043A\",\n e164: \"\u043D\u0443\u043C\u0430\u0440 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0443\u0432\u043E\u0434\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u043B\u0456\u043A\",\n array: \"\u043C\u0430\u0441\u0456\u045E\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${issue.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`;\n }\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const maxValue = Number(issue.maximum);\n const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435\"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue.maximum.toString()} ${unit}`;\n }\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435\"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const minValue = Number(issue.minimum);\n const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue.minimum.toString()} ${unit}`;\n }\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue.keys.length > 1 ? \"\u043A\u043B\u044E\u0447\u044B\" : \"\u043A\u043B\u044E\u0447\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434\";\n case \"invalid_element\":\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue.origin}`;\n default:\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0441\u0438\u043C\u0432\u043E\u043B\u0430\", verb: \"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\" },\n file: { unit: \"\u0431\u0430\u0439\u0442\u0430\", verb: \"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\" },\n array: { unit: \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430\", verb: \"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\" },\n set: { unit: \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430\", verb: \"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0432\u0445\u043E\u0434\",\n email: \"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441\",\n url: \"URL\",\n emoji: \"\u0435\u043C\u043E\u0434\u0436\u0438\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0432\u0440\u0435\u043C\u0435\",\n date: \"ISO \u0434\u0430\u0442\u0430\",\n time: \"ISO \u0432\u0440\u0435\u043C\u0435\",\n duration: \"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442\",\n ipv4: \"IPv4 \u0430\u0434\u0440\u0435\u0441\",\n ipv6: \"IPv6 \u0430\u0434\u0440\u0435\u0441\",\n cidrv4: \"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\",\n cidrv6: \"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\",\n base64: \"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437\",\n base64url: \"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437\",\n json_string: \"JSON \u043D\u0438\u0437\",\n e164: \"E.164 \u043D\u043E\u043C\u0435\u0440\",\n jwt: \"JWT\",\n template_literal: \"\u0432\u0445\u043E\u0434\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0447\u0438\u0441\u043B\u043E\",\n array: \"\u043C\u0430\u0441\u0438\u0432\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${issue.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`;\n }\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue.origin ?? \"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430\"}`;\n return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue.origin ?? \"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`;\n let invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D\";\n if (_issue.format === \"emoji\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E\";\n if (_issue.format === \"datetime\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E\";\n if (_issue.format === \"date\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430\";\n if (_issue.format === \"time\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E\";\n if (_issue.format === \"duration\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430\";\n return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue.keys.length > 1 ? \"\u0438\" : \"\"} \u043A\u043B\u044E\u0447${issue.keys.length > 1 ? \"\u043E\u0432\u0435\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434\";\n case \"invalid_element\":\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue.origin}`;\n default:\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"car\u00E0cters\", verb: \"contenir\" },\n file: { unit: \"bytes\", verb: \"contenir\" },\n array: { unit: \"elements\", verb: \"contenir\" },\n set: { unit: \"elements\", verb: \"contenir\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entrada\",\n email: \"adre\u00E7a electr\u00F2nica\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"data i hora ISO\",\n date: \"data ISO\",\n time: \"hora ISO\",\n duration: \"durada ISO\",\n ipv4: \"adre\u00E7a IPv4\",\n ipv6: \"adre\u00E7a IPv6\",\n cidrv4: \"rang IPv4\",\n cidrv6: \"rang IPv6\",\n base64: \"cadena codificada en base64\",\n base64url: \"cadena codificada en base64url\",\n json_string: \"cadena JSON\",\n e164: \"n\u00FAmero E.164\",\n jwt: \"JWT\",\n template_literal: \"entrada\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Tipus inv\u00E0lid: s'esperava instanceof ${issue.expected}, s'ha rebut ${received}`;\n }\n return `Tipus inv\u00E0lid: s'esperava ${expected}, s'ha rebut ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Valor inv\u00E0lid: s'esperava ${util.stringifyPrimitive(issue.values[0])}`;\n return `Opci\u00F3 inv\u00E0lida: s'esperava una de ${util.joinValues(issue.values, \" o \")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"com a m\u00E0xim\" : \"menys de\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Massa gran: s'esperava que ${issue.origin ?? \"el valor\"} contingu\u00E9s ${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"elements\"}`;\n return `Massa gran: s'esperava que ${issue.origin ?? \"el valor\"} fos ${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"com a m\u00EDnim\" : \"m\u00E9s de\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Massa petit: s'esperava que ${issue.origin} contingu\u00E9s ${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Massa petit: s'esperava que ${issue.origin} fos ${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Format inv\u00E0lid: ha de comen\u00E7ar amb \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Format inv\u00E0lid: ha d'acabar amb \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Format inv\u00E0lid: ha d'incloure \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Format inv\u00E0lid: ha de coincidir amb el patr\u00F3 ${_issue.pattern}`;\n return `Format inv\u00E0lid per a ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `N\u00FAmero inv\u00E0lid: ha de ser m\u00FAltiple de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Clau${issue.keys.length > 1 ? \"s\" : \"\"} no reconeguda${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Clau inv\u00E0lida a ${issue.origin}`;\n case \"invalid_union\":\n return \"Entrada inv\u00E0lida\"; // Could also be \"Tipus d'uni\u00F3 inv\u00E0lid\" but \"Entrada inv\u00E0lida\" is more general\n case \"invalid_element\":\n return `Element inv\u00E0lid a ${issue.origin}`;\n default:\n return `Entrada inv\u00E0lida`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"znak\u016F\", verb: \"m\u00EDt\" },\n file: { unit: \"bajt\u016F\", verb: \"m\u00EDt\" },\n array: { unit: \"prvk\u016F\", verb: \"m\u00EDt\" },\n set: { unit: \"prvk\u016F\", verb: \"m\u00EDt\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"regul\u00E1rn\u00ED v\u00FDraz\",\n email: \"e-mailov\u00E1 adresa\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"datum a \u010Das ve form\u00E1tu ISO\",\n date: \"datum ve form\u00E1tu ISO\",\n time: \"\u010Das ve form\u00E1tu ISO\",\n duration: \"doba trv\u00E1n\u00ED ISO\",\n ipv4: \"IPv4 adresa\",\n ipv6: \"IPv6 adresa\",\n cidrv4: \"rozsah IPv4\",\n cidrv6: \"rozsah IPv6\",\n base64: \"\u0159et\u011Bzec zak\u00F3dovan\u00FD ve form\u00E1tu base64\",\n base64url: \"\u0159et\u011Bzec zak\u00F3dovan\u00FD ve form\u00E1tu base64url\",\n json_string: \"\u0159et\u011Bzec ve form\u00E1tu JSON\",\n e164: \"\u010D\u00EDslo E.164\",\n jwt: \"JWT\",\n template_literal: \"vstup\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u010D\u00EDslo\",\n string: \"\u0159et\u011Bzec\",\n function: \"funkce\",\n array: \"pole\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Neplatn\u00FD vstup: o\u010Dek\u00E1v\u00E1no instanceof ${issue.expected}, obdr\u017Eeno ${received}`;\n }\n return `Neplatn\u00FD vstup: o\u010Dek\u00E1v\u00E1no ${expected}, obdr\u017Eeno ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Neplatn\u00FD vstup: o\u010Dek\u00E1v\u00E1no ${util.stringifyPrimitive(issue.values[0])}`;\n return `Neplatn\u00E1 mo\u017Enost: o\u010Dek\u00E1v\u00E1na jedna z hodnot ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Hodnota je p\u0159\u00EDli\u0161 velk\u00E1: ${issue.origin ?? \"hodnota\"} mus\u00ED m\u00EDt ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"prvk\u016F\"}`;\n }\n return `Hodnota je p\u0159\u00EDli\u0161 velk\u00E1: ${issue.origin ?? \"hodnota\"} mus\u00ED b\u00FDt ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Hodnota je p\u0159\u00EDli\u0161 mal\u00E1: ${issue.origin ?? \"hodnota\"} mus\u00ED m\u00EDt ${adj}${issue.minimum.toString()} ${sizing.unit ?? \"prvk\u016F\"}`;\n }\n return `Hodnota je p\u0159\u00EDli\u0161 mal\u00E1: ${issue.origin ?? \"hodnota\"} mus\u00ED b\u00FDt ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Neplatn\u00FD \u0159et\u011Bzec: mus\u00ED za\u010D\u00EDnat na \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Neplatn\u00FD \u0159et\u011Bzec: mus\u00ED kon\u010Dit na \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Neplatn\u00FD \u0159et\u011Bzec: mus\u00ED obsahovat \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Neplatn\u00FD \u0159et\u011Bzec: mus\u00ED odpov\u00EDdat vzoru ${_issue.pattern}`;\n return `Neplatn\u00FD form\u00E1t ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Neplatn\u00E9 \u010D\u00EDslo: mus\u00ED b\u00FDt n\u00E1sobkem ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Nezn\u00E1m\u00E9 kl\u00ED\u010De: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Neplatn\u00FD kl\u00ED\u010D v ${issue.origin}`;\n case \"invalid_union\":\n return \"Neplatn\u00FD vstup\";\n case \"invalid_element\":\n return `Neplatn\u00E1 hodnota v ${issue.origin}`;\n default:\n return `Neplatn\u00FD vstup`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"tegn\", verb: \"havde\" },\n file: { unit: \"bytes\", verb: \"havde\" },\n array: { unit: \"elementer\", verb: \"indeholdt\" },\n set: { unit: \"elementer\", verb: \"indeholdt\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"e-mailadresse\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO dato- og klokkesl\u00E6t\",\n date: \"ISO-dato\",\n time: \"ISO-klokkesl\u00E6t\",\n duration: \"ISO-varighed\",\n ipv4: \"IPv4-omr\u00E5de\",\n ipv6: \"IPv6-omr\u00E5de\",\n cidrv4: \"IPv4-spektrum\",\n cidrv6: \"IPv6-spektrum\",\n base64: \"base64-kodet streng\",\n base64url: \"base64url-kodet streng\",\n json_string: \"JSON-streng\",\n e164: \"E.164-nummer\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n string: \"streng\",\n number: \"tal\",\n boolean: \"boolean\",\n array: \"liste\",\n object: \"objekt\",\n set: \"s\u00E6t\",\n file: \"fil\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ugyldigt input: forventede instanceof ${issue.expected}, fik ${received}`;\n }\n return `Ugyldigt input: forventede ${expected}, fik ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ugyldig v\u00E6rdi: forventede ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ugyldigt valg: forventede en af f\u00F8lgende ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n if (sizing)\n return `For stor: forventede ${origin ?? \"value\"} ${sizing.verb} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"elementer\"}`;\n return `For stor: forventede ${origin ?? \"value\"} havde ${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n if (sizing) {\n return `For lille: forventede ${origin} ${sizing.verb} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `For lille: forventede ${origin} havde ${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Ugyldig streng: skal starte med \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Ugyldig streng: skal ende med \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Ugyldig streng: skal indeholde \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Ugyldig streng: skal matche m\u00F8nsteret ${_issue.pattern}`;\n return `Ugyldig ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ugyldigt tal: skal v\u00E6re deleligt med ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Ukendte n\u00F8gler\" : \"Ukendt n\u00F8gle\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ugyldig n\u00F8gle i ${issue.origin}`;\n case \"invalid_union\":\n return \"Ugyldigt input: matcher ingen af de tilladte typer\";\n case \"invalid_element\":\n return `Ugyldig v\u00E6rdi i ${issue.origin}`;\n default:\n return `Ugyldigt input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"Zeichen\", verb: \"zu haben\" },\n file: { unit: \"Bytes\", verb: \"zu haben\" },\n array: { unit: \"Elemente\", verb: \"zu haben\" },\n set: { unit: \"Elemente\", verb: \"zu haben\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"Eingabe\",\n email: \"E-Mail-Adresse\",\n url: \"URL\",\n emoji: \"Emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-Datum und -Uhrzeit\",\n date: \"ISO-Datum\",\n time: \"ISO-Uhrzeit\",\n duration: \"ISO-Dauer\",\n ipv4: \"IPv4-Adresse\",\n ipv6: \"IPv6-Adresse\",\n cidrv4: \"IPv4-Bereich\",\n cidrv6: \"IPv6-Bereich\",\n base64: \"Base64-codierter String\",\n base64url: \"Base64-URL-codierter String\",\n json_string: \"JSON-String\",\n e164: \"E.164-Nummer\",\n jwt: \"JWT\",\n template_literal: \"Eingabe\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"Zahl\",\n array: \"Array\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ung\u00FCltige Eingabe: erwartet instanceof ${issue.expected}, erhalten ${received}`;\n }\n return `Ung\u00FCltige Eingabe: erwartet ${expected}, erhalten ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ung\u00FCltige Eingabe: erwartet ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ung\u00FCltige Option: erwartet eine von ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Zu gro\u00DF: erwartet, dass ${issue.origin ?? \"Wert\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"Elemente\"} hat`;\n return `Zu gro\u00DF: erwartet, dass ${issue.origin ?? \"Wert\"} ${adj}${issue.maximum.toString()} ist`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Zu klein: erwartet, dass ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} hat`;\n }\n return `Zu klein: erwartet, dass ${issue.origin} ${adj}${issue.minimum.toString()} ist`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Ung\u00FCltiger String: muss mit \"${_issue.prefix}\" beginnen`;\n if (_issue.format === \"ends_with\")\n return `Ung\u00FCltiger String: muss mit \"${_issue.suffix}\" enden`;\n if (_issue.format === \"includes\")\n return `Ung\u00FCltiger String: muss \"${_issue.includes}\" enthalten`;\n if (_issue.format === \"regex\")\n return `Ung\u00FCltiger String: muss dem Muster ${_issue.pattern} entsprechen`;\n return `Ung\u00FCltig: ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ung\u00FCltige Zahl: muss ein Vielfaches von ${issue.divisor} sein`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Unbekannte Schl\u00FCssel\" : \"Unbekannter Schl\u00FCssel\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ung\u00FCltiger Schl\u00FCssel in ${issue.origin}`;\n case \"invalid_union\":\n return \"Ung\u00FCltige Eingabe\";\n case \"invalid_element\":\n return `Ung\u00FCltiger Wert in ${issue.origin}`;\n default:\n return `Ung\u00FCltige Eingabe`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"characters\", verb: \"to have\" },\n file: { unit: \"bytes\", verb: \"to have\" },\n array: { unit: \"items\", verb: \"to have\" },\n set: { unit: \"items\", verb: \"to have\" },\n map: { unit: \"entries\", verb: \"to have\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"email address\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datetime\",\n date: \"ISO date\",\n time: \"ISO time\",\n duration: \"ISO duration\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n mac: \"MAC address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded string\",\n base64url: \"base64url-encoded string\",\n json_string: \"JSON string\",\n e164: \"E.164 number\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n // type names: missing keys = do not translate (use raw value via ?? fallback)\n const TypeDictionary = {\n // Compatibility: \"nan\" -> \"NaN\" for display\n nan: \"NaN\",\n // All other type names omitted - they fall back to raw values via ?? operator\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n return `Invalid input: expected ${expected}, received ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;\n return `Invalid option: expected one of ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Too big: expected ${issue.origin ?? \"value\"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elements\"}`;\n return `Too big: expected ${issue.origin ?? \"value\"} to be ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Invalid string: must start with \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Invalid string: must end with \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Invalid string: must include \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Invalid string: must match pattern ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Invalid number: must be a multiple of ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Unrecognized key${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Invalid key in ${issue.origin}`;\n case \"invalid_union\":\n return \"Invalid input\";\n case \"invalid_element\":\n return `Invalid value in ${issue.origin}`;\n default:\n return `Invalid input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"karaktrojn\", verb: \"havi\" },\n file: { unit: \"bajtojn\", verb: \"havi\" },\n array: { unit: \"elementojn\", verb: \"havi\" },\n set: { unit: \"elementojn\", verb: \"havi\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"enigo\",\n email: \"retadreso\",\n url: \"URL\",\n emoji: \"emo\u011Dio\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-datotempo\",\n date: \"ISO-dato\",\n time: \"ISO-tempo\",\n duration: \"ISO-da\u016Dro\",\n ipv4: \"IPv4-adreso\",\n ipv6: \"IPv6-adreso\",\n cidrv4: \"IPv4-rango\",\n cidrv6: \"IPv6-rango\",\n base64: \"64-ume kodita karaktraro\",\n base64url: \"URL-64-ume kodita karaktraro\",\n json_string: \"JSON-karaktraro\",\n e164: \"E.164-nombro\",\n jwt: \"JWT\",\n template_literal: \"enigo\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"nombro\",\n array: \"tabelo\",\n null: \"senvalora\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Nevalida enigo: atendi\u011Dis instanceof ${issue.expected}, ricevi\u011Dis ${received}`;\n }\n return `Nevalida enigo: atendi\u011Dis ${expected}, ricevi\u011Dis ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Nevalida enigo: atendi\u011Dis ${util.stringifyPrimitive(issue.values[0])}`;\n return `Nevalida opcio: atendi\u011Dis unu el ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Tro granda: atendi\u011Dis ke ${issue.origin ?? \"valoro\"} havu ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementojn\"}`;\n return `Tro granda: atendi\u011Dis ke ${issue.origin ?? \"valoro\"} havu ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Tro malgranda: atendi\u011Dis ke ${issue.origin} havu ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Tro malgranda: atendi\u011Dis ke ${issue.origin} estu ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Nevalida karaktraro: devas komenci\u011Di per \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Nevalida karaktraro: devas fini\u011Di per \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Nevalida karaktraro: devas inkluzivi \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;\n return `Nevalida ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Nevalida nombro: devas esti oblo de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Nekonata${issue.keys.length > 1 ? \"j\" : \"\"} \u015Dlosilo${issue.keys.length > 1 ? \"j\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Nevalida \u015Dlosilo en ${issue.origin}`;\n case \"invalid_union\":\n return \"Nevalida enigo\";\n case \"invalid_element\":\n return `Nevalida valoro en ${issue.origin}`;\n default:\n return `Nevalida enigo`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caracteres\", verb: \"tener\" },\n file: { unit: \"bytes\", verb: \"tener\" },\n array: { unit: \"elementos\", verb: \"tener\" },\n set: { unit: \"elementos\", verb: \"tener\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entrada\",\n email: \"direcci\u00F3n de correo electr\u00F3nico\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"fecha y hora ISO\",\n date: \"fecha ISO\",\n time: \"hora ISO\",\n duration: \"duraci\u00F3n ISO\",\n ipv4: \"direcci\u00F3n IPv4\",\n ipv6: \"direcci\u00F3n IPv6\",\n cidrv4: \"rango IPv4\",\n cidrv6: \"rango IPv6\",\n base64: \"cadena codificada en base64\",\n base64url: \"URL codificada en base64\",\n json_string: \"cadena JSON\",\n e164: \"n\u00FAmero E.164\",\n jwt: \"JWT\",\n template_literal: \"entrada\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n string: \"texto\",\n number: \"n\u00FAmero\",\n boolean: \"booleano\",\n array: \"arreglo\",\n object: \"objeto\",\n set: \"conjunto\",\n file: \"archivo\",\n date: \"fecha\",\n bigint: \"n\u00FAmero grande\",\n symbol: \"s\u00EDmbolo\",\n undefined: \"indefinido\",\n null: \"nulo\",\n function: \"funci\u00F3n\",\n map: \"mapa\",\n record: \"registro\",\n tuple: \"tupla\",\n enum: \"enumeraci\u00F3n\",\n union: \"uni\u00F3n\",\n literal: \"literal\",\n promise: \"promesa\",\n void: \"vac\u00EDo\",\n never: \"nunca\",\n unknown: \"desconocido\",\n any: \"cualquiera\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Entrada inv\u00E1lida: se esperaba instanceof ${issue.expected}, recibido ${received}`;\n }\n return `Entrada inv\u00E1lida: se esperaba ${expected}, recibido ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entrada inv\u00E1lida: se esperaba ${util.stringifyPrimitive(issue.values[0])}`;\n return `Opci\u00F3n inv\u00E1lida: se esperaba una de ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n if (sizing)\n return `Demasiado grande: se esperaba que ${origin ?? \"valor\"} tuviera ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementos\"}`;\n return `Demasiado grande: se esperaba que ${origin ?? \"valor\"} fuera ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n if (sizing) {\n return `Demasiado peque\u00F1o: se esperaba que ${origin} tuviera ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Demasiado peque\u00F1o: se esperaba que ${origin} fuera ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Cadena inv\u00E1lida: debe comenzar con \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Cadena inv\u00E1lida: debe terminar en \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Cadena inv\u00E1lida: debe incluir \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Cadena inv\u00E1lida: debe coincidir con el patr\u00F3n ${_issue.pattern}`;\n return `Inv\u00E1lido ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `N\u00FAmero inv\u00E1lido: debe ser m\u00FAltiplo de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Llave${issue.keys.length > 1 ? \"s\" : \"\"} desconocida${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Llave inv\u00E1lida en ${TypeDictionary[issue.origin] ?? issue.origin}`;\n case \"invalid_union\":\n return \"Entrada inv\u00E1lida\";\n case \"invalid_element\":\n return `Valor inv\u00E1lido en ${TypeDictionary[issue.origin] ?? issue.origin}`;\n default:\n return `Entrada inv\u00E1lida`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631\", verb: \"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F\" },\n file: { unit: \"\u0628\u0627\u06CC\u062A\", verb: \"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F\" },\n array: { unit: \"\u0622\u06CC\u062A\u0645\", verb: \"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F\" },\n set: { unit: \"\u0622\u06CC\u062A\u0645\", verb: \"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0648\u0631\u0648\u062F\u06CC\",\n email: \"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644\",\n url: \"URL\",\n emoji: \"\u0627\u06CC\u0645\u0648\u062C\u06CC\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648\",\n date: \"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648\",\n time: \"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648\",\n duration: \"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648\",\n ipv4: \"IPv4 \u0622\u062F\u0631\u0633\",\n ipv6: \"IPv6 \u0622\u062F\u0631\u0633\",\n cidrv4: \"IPv4 \u062F\u0627\u0645\u0646\u0647\",\n cidrv6: \"IPv6 \u062F\u0627\u0645\u0646\u0647\",\n base64: \"base64-encoded \u0631\u0634\u062A\u0647\",\n base64url: \"base64url-encoded \u0631\u0634\u062A\u0647\",\n json_string: \"JSON \u0631\u0634\u062A\u0647\",\n e164: \"E.164 \u0639\u062F\u062F\",\n jwt: \"JWT\",\n template_literal: \"\u0648\u0631\u0648\u062F\u06CC\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0639\u062F\u062F\",\n array: \"\u0622\u0631\u0627\u06CC\u0647\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${issue.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;\n }\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1) {\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${util.stringifyPrimitive(issue.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`;\n }\n return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${util.joinValues(issue.values, \"|\")} \u0645\u06CC\u200C\u0628\u0648\u062F`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue.origin ?? \"\u0645\u0642\u062F\u0627\u0631\"} \u0628\u0627\u06CC\u062F ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0639\u0646\u0635\u0631\"} \u0628\u0627\u0634\u062F`;\n }\n return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue.origin ?? \"\u0645\u0642\u062F\u0627\u0631\"} \u0628\u0627\u06CC\u062F ${adj}${issue.maximum.toString()} \u0628\u0627\u0634\u062F`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue.origin} \u0628\u0627\u06CC\u062F ${adj}${issue.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`;\n }\n return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue.origin} \u0628\u0627\u06CC\u062F ${adj}${issue.minimum.toString()} \u0628\u0627\u0634\u062F`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \"${_issue.prefix}\" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`;\n }\n if (_issue.format === \"ends_with\") {\n return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \"${_issue.suffix}\" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`;\n }\n if (_issue.format === \"includes\") {\n return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 \"${_issue.includes}\" \u0628\u0627\u0634\u062F`;\n }\n if (_issue.format === \"regex\") {\n return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`;\n }\n return `${FormatDictionary[_issue.format] ?? issue.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;\n }\n case \"not_multiple_of\":\n return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue.divisor} \u0628\u0627\u0634\u062F`;\n case \"unrecognized_keys\":\n return `\u06A9\u0644\u06CC\u062F${issue.keys.length > 1 ? \"\u0647\u0627\u06CC\" : \"\"} \u0646\u0627\u0634\u0646\u0627\u0633: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue.origin}`;\n case \"invalid_union\":\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;\n case \"invalid_element\":\n return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue.origin}`;\n default:\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"merkki\u00E4\", subject: \"merkkijonon\" },\n file: { unit: \"tavua\", subject: \"tiedoston\" },\n array: { unit: \"alkiota\", subject: \"listan\" },\n set: { unit: \"alkiota\", subject: \"joukon\" },\n number: { unit: \"\", subject: \"luvun\" },\n bigint: { unit: \"\", subject: \"suuren kokonaisluvun\" },\n int: { unit: \"\", subject: \"kokonaisluvun\" },\n date: { unit: \"\", subject: \"p\u00E4iv\u00E4m\u00E4\u00E4r\u00E4n\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"s\u00E4\u00E4nn\u00F6llinen lauseke\",\n email: \"s\u00E4hk\u00F6postiosoite\",\n url: \"URL-osoite\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-aikaleima\",\n date: \"ISO-p\u00E4iv\u00E4m\u00E4\u00E4r\u00E4\",\n time: \"ISO-aika\",\n duration: \"ISO-kesto\",\n ipv4: \"IPv4-osoite\",\n ipv6: \"IPv6-osoite\",\n cidrv4: \"IPv4-alue\",\n cidrv6: \"IPv6-alue\",\n base64: \"base64-koodattu merkkijono\",\n base64url: \"base64url-koodattu merkkijono\",\n json_string: \"JSON-merkkijono\",\n e164: \"E.164-luku\",\n jwt: \"JWT\",\n template_literal: \"templaattimerkkijono\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Virheellinen tyyppi: odotettiin instanceof ${issue.expected}, oli ${received}`;\n }\n return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Virheellinen sy\u00F6te: t\u00E4ytyy olla ${util.stringifyPrimitive(issue.values[0])}`;\n return `Virheellinen valinta: t\u00E4ytyy olla yksi seuraavista: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Liian suuri: ${sizing.subject} t\u00E4ytyy olla ${adj}${issue.maximum.toString()} ${sizing.unit}`.trim();\n }\n return `Liian suuri: arvon t\u00E4ytyy olla ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Liian pieni: ${sizing.subject} t\u00E4ytyy olla ${adj}${issue.minimum.toString()} ${sizing.unit}`.trim();\n }\n return `Liian pieni: arvon t\u00E4ytyy olla ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Virheellinen sy\u00F6te: t\u00E4ytyy alkaa \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Virheellinen sy\u00F6te: t\u00E4ytyy loppua \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Virheellinen sy\u00F6te: t\u00E4ytyy sis\u00E4lt\u00E4\u00E4 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\") {\n return `Virheellinen sy\u00F6te: t\u00E4ytyy vastata s\u00E4\u00E4nn\u00F6llist\u00E4 lauseketta ${_issue.pattern}`;\n }\n return `Virheellinen ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Virheellinen luku: t\u00E4ytyy olla luvun ${issue.divisor} monikerta`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Tuntemattomat avaimet\" : \"Tuntematon avain\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return \"Virheellinen avain tietueessa\";\n case \"invalid_union\":\n return \"Virheellinen unioni\";\n case \"invalid_element\":\n return \"Virheellinen arvo joukossa\";\n default:\n return `Virheellinen sy\u00F6te`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caract\u00E8res\", verb: \"avoir\" },\n file: { unit: \"octets\", verb: \"avoir\" },\n array: { unit: \"\u00E9l\u00E9ments\", verb: \"avoir\" },\n set: { unit: \"\u00E9l\u00E9ments\", verb: \"avoir\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entr\u00E9e\",\n email: \"adresse e-mail\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"date et heure ISO\",\n date: \"date ISO\",\n time: \"heure ISO\",\n duration: \"dur\u00E9e ISO\",\n ipv4: \"adresse IPv4\",\n ipv6: \"adresse IPv6\",\n cidrv4: \"plage IPv4\",\n cidrv6: \"plage IPv6\",\n base64: \"cha\u00EEne encod\u00E9e en base64\",\n base64url: \"cha\u00EEne encod\u00E9e en base64url\",\n json_string: \"cha\u00EEne JSON\",\n e164: \"num\u00E9ro E.164\",\n jwt: \"JWT\",\n template_literal: \"entr\u00E9e\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"nombre\",\n array: \"tableau\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Entr\u00E9e invalide : instanceof ${issue.expected} attendu, ${received} re\u00E7u`;\n }\n return `Entr\u00E9e invalide : ${expected} attendu, ${received} re\u00E7u`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entr\u00E9e invalide : ${util.stringifyPrimitive(issue.values[0])} attendu`;\n return `Option invalide : une valeur parmi ${util.joinValues(issue.values, \"|\")} attendue`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Trop grand : ${issue.origin ?? \"valeur\"} doit ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u00E9l\u00E9ment(s)\"}`;\n return `Trop grand : ${issue.origin ?? \"valeur\"} doit \u00EAtre ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Trop petit : ${issue.origin} doit ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Trop petit : ${issue.origin} doit \u00EAtre ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Cha\u00EEne invalide : doit commencer par \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Cha\u00EEne invalide : doit se terminer par \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Cha\u00EEne invalide : doit inclure \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Cha\u00EEne invalide : doit correspondre au mod\u00E8le ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} invalide`;\n }\n case \"not_multiple_of\":\n return `Nombre invalide : doit \u00EAtre un multiple de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Cl\u00E9${issue.keys.length > 1 ? \"s\" : \"\"} non reconnue${issue.keys.length > 1 ? \"s\" : \"\"} : ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Cl\u00E9 invalide dans ${issue.origin}`;\n case \"invalid_union\":\n return \"Entr\u00E9e invalide\";\n case \"invalid_element\":\n return `Valeur invalide dans ${issue.origin}`;\n default:\n return `Entr\u00E9e invalide`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caract\u00E8res\", verb: \"avoir\" },\n file: { unit: \"octets\", verb: \"avoir\" },\n array: { unit: \"\u00E9l\u00E9ments\", verb: \"avoir\" },\n set: { unit: \"\u00E9l\u00E9ments\", verb: \"avoir\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entr\u00E9e\",\n email: \"adresse courriel\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"date-heure ISO\",\n date: \"date ISO\",\n time: \"heure ISO\",\n duration: \"dur\u00E9e ISO\",\n ipv4: \"adresse IPv4\",\n ipv6: \"adresse IPv6\",\n cidrv4: \"plage IPv4\",\n cidrv6: \"plage IPv6\",\n base64: \"cha\u00EEne encod\u00E9e en base64\",\n base64url: \"cha\u00EEne encod\u00E9e en base64url\",\n json_string: \"cha\u00EEne JSON\",\n e164: \"num\u00E9ro E.164\",\n jwt: \"JWT\",\n template_literal: \"entr\u00E9e\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Entr\u00E9e invalide : attendu instanceof ${issue.expected}, re\u00E7u ${received}`;\n }\n return `Entr\u00E9e invalide : attendu ${expected}, re\u00E7u ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entr\u00E9e invalide : attendu ${util.stringifyPrimitive(issue.values[0])}`;\n return `Option invalide : attendu l'une des valeurs suivantes ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"\u2264\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Trop grand : attendu que ${issue.origin ?? \"la valeur\"} ait ${adj}${issue.maximum.toString()} ${sizing.unit}`;\n return `Trop grand : attendu que ${issue.origin ?? \"la valeur\"} soit ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"\u2265\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Trop petit : attendu que ${issue.origin} ait ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Trop petit : attendu que ${issue.origin} soit ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Cha\u00EEne invalide : doit commencer par \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Cha\u00EEne invalide : doit se terminer par \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Cha\u00EEne invalide : doit inclure \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Cha\u00EEne invalide : doit correspondre au motif ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} invalide`;\n }\n case \"not_multiple_of\":\n return `Nombre invalide : doit \u00EAtre un multiple de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Cl\u00E9${issue.keys.length > 1 ? \"s\" : \"\"} non reconnue${issue.keys.length > 1 ? \"s\" : \"\"} : ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Cl\u00E9 invalide dans ${issue.origin}`;\n case \"invalid_union\":\n return \"Entr\u00E9e invalide\";\n case \"invalid_element\":\n return `Valeur invalide dans ${issue.origin}`;\n default:\n return `Entr\u00E9e invalide`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n // Hebrew labels + grammatical gender\n const TypeNames = {\n string: { label: \"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA\", gender: \"f\" },\n number: { label: \"\u05DE\u05E1\u05E4\u05E8\", gender: \"m\" },\n boolean: { label: \"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9\", gender: \"m\" },\n bigint: { label: \"BigInt\", gender: \"m\" },\n date: { label: \"\u05EA\u05D0\u05E8\u05D9\u05DA\", gender: \"m\" },\n array: { label: \"\u05DE\u05E2\u05E8\u05DA\", gender: \"m\" },\n object: { label: \"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8\", gender: \"m\" },\n null: { label: \"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)\", gender: \"m\" },\n undefined: { label: \"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)\", gender: \"m\" },\n symbol: { label: \"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)\", gender: \"m\" },\n function: { label: \"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4\", gender: \"f\" },\n map: { label: \"\u05DE\u05E4\u05D4 (Map)\", gender: \"f\" },\n set: { label: \"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)\", gender: \"f\" },\n file: { label: \"\u05E7\u05D5\u05D1\u05E5\", gender: \"m\" },\n promise: { label: \"Promise\", gender: \"m\" },\n NaN: { label: \"NaN\", gender: \"m\" },\n unknown: { label: \"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2\", gender: \"m\" },\n value: { label: \"\u05E2\u05E8\u05DA\", gender: \"m\" },\n };\n // Sizing units for size-related messages + localized origin labels\n const Sizable = {\n string: { unit: \"\u05EA\u05D5\u05D5\u05D9\u05DD\", shortLabel: \"\u05E7\u05E6\u05E8\", longLabel: \"\u05D0\u05E8\u05D5\u05DA\" },\n file: { unit: \"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD\", shortLabel: \"\u05E7\u05D8\u05DF\", longLabel: \"\u05D2\u05D3\u05D5\u05DC\" },\n array: { unit: \"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD\", shortLabel: \"\u05E7\u05D8\u05DF\", longLabel: \"\u05D2\u05D3\u05D5\u05DC\" },\n set: { unit: \"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD\", shortLabel: \"\u05E7\u05D8\u05DF\", longLabel: \"\u05D2\u05D3\u05D5\u05DC\" },\n number: { unit: \"\", shortLabel: \"\u05E7\u05D8\u05DF\", longLabel: \"\u05D2\u05D3\u05D5\u05DC\" }, // no unit\n };\n // Helpers \u2014 labels, articles, and verbs\n const typeEntry = (t) => (t ? TypeNames[t] : undefined);\n const typeLabel = (t) => {\n const e = typeEntry(t);\n if (e)\n return e.label;\n // fallback: show raw string if unknown\n return t ?? TypeNames.unknown.label;\n };\n const withDefinite = (t) => `\u05D4${typeLabel(t)}`;\n const verbFor = (t) => {\n const e = typeEntry(t);\n const gender = e?.gender ?? \"m\";\n return gender === \"f\" ? \"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA\" : \"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA\";\n };\n const getSizing = (origin) => {\n if (!origin)\n return null;\n return Sizable[origin] ?? null;\n };\n const FormatDictionary = {\n regex: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n email: { label: \"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC\", gender: \"f\" },\n url: { label: \"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA\", gender: \"f\" },\n emoji: { label: \"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9\", gender: \"m\" },\n uuid: { label: \"UUID\", gender: \"m\" },\n nanoid: { label: \"nanoid\", gender: \"m\" },\n guid: { label: \"GUID\", gender: \"m\" },\n cuid: { label: \"cuid\", gender: \"m\" },\n cuid2: { label: \"cuid2\", gender: \"m\" },\n ulid: { label: \"ULID\", gender: \"m\" },\n xid: { label: \"XID\", gender: \"m\" },\n ksuid: { label: \"KSUID\", gender: \"m\" },\n datetime: { label: \"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO\", gender: \"m\" },\n date: { label: \"\u05EA\u05D0\u05E8\u05D9\u05DA ISO\", gender: \"m\" },\n time: { label: \"\u05D6\u05DE\u05DF ISO\", gender: \"m\" },\n duration: { label: \"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO\", gender: \"m\" },\n ipv4: { label: \"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4\", gender: \"f\" },\n ipv6: { label: \"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6\", gender: \"f\" },\n cidrv4: { label: \"\u05D8\u05D5\u05D5\u05D7 IPv4\", gender: \"m\" },\n cidrv6: { label: \"\u05D8\u05D5\u05D5\u05D7 IPv6\", gender: \"m\" },\n base64: { label: \"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64\", gender: \"f\" },\n base64url: { label: \"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA\", gender: \"f\" },\n json_string: { label: \"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON\", gender: \"f\" },\n e164: { label: \"\u05DE\u05E1\u05E4\u05E8 E.164\", gender: \"m\" },\n jwt: { label: \"JWT\", gender: \"m\" },\n ends_with: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n includes: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n lowercase: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n starts_with: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n uppercase: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n // Expected type: show without definite article for clearer Hebrew\n const expectedKey = issue.expected;\n const expected = TypeDictionary[expectedKey ?? \"\"] ?? typeLabel(expectedKey);\n // Received: show localized label if known, otherwise constructor/raw\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`;\n }\n return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`;\n }\n case \"invalid_value\": {\n if (issue.values.length === 1) {\n return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${util.stringifyPrimitive(issue.values[0])}`;\n }\n // Join values with proper Hebrew formatting\n const stringified = issue.values.map((v) => util.stringifyPrimitive(v));\n if (issue.values.length === 2) {\n return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`;\n }\n // For 3+ values: \"a\", \"b\" \u05D0\u05D5 \"c\"\n const lastValue = stringified[stringified.length - 1];\n const restValues = stringified.slice(0, -1).join(\", \");\n return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`;\n }\n case \"too_big\": {\n const sizing = getSizing(issue.origin);\n const subject = withDefinite(issue.origin ?? \"value\");\n if (issue.origin === \"string\") {\n // Special handling for strings - more natural Hebrew\n return `${sizing?.longLabel ?? \"\u05D0\u05E8\u05D5\u05DA\"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue.maximum.toString()} ${sizing?.unit ?? \"\"} ${issue.inclusive ? \"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA\" : \"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8\"}`.trim();\n }\n if (issue.origin === \"number\") {\n // Natural Hebrew for numbers\n const comparison = issue.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue.maximum}`;\n return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`;\n }\n if (issue.origin === \"array\" || issue.origin === \"set\") {\n // Natural Hebrew for arrays and sets\n const verb = issue.origin === \"set\" ? \"\u05E6\u05E8\u05D9\u05DB\u05D4\" : \"\u05E6\u05E8\u05D9\u05DA\";\n const comparison = issue.inclusive\n ? `${issue.maximum} ${sizing?.unit ?? \"\"} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`\n : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue.maximum} ${sizing?.unit ?? \"\"}`;\n return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();\n }\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const be = verbFor(issue.origin ?? \"value\");\n if (sizing?.unit) {\n return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue.maximum.toString()} ${sizing.unit}`;\n }\n return `${sizing?.longLabel ?? \"\u05D2\u05D3\u05D5\u05DC\"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const sizing = getSizing(issue.origin);\n const subject = withDefinite(issue.origin ?? \"value\");\n if (issue.origin === \"string\") {\n // Special handling for strings - more natural Hebrew\n return `${sizing?.shortLabel ?? \"\u05E7\u05E6\u05E8\"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue.minimum.toString()} ${sizing?.unit ?? \"\"} ${issue.inclusive ? \"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8\" : \"\u05DC\u05E4\u05D7\u05D5\u05EA\"}`.trim();\n }\n if (issue.origin === \"number\") {\n // Natural Hebrew for numbers\n const comparison = issue.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue.minimum}`;\n return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`;\n }\n if (issue.origin === \"array\" || issue.origin === \"set\") {\n // Natural Hebrew for arrays and sets\n const verb = issue.origin === \"set\" ? \"\u05E6\u05E8\u05D9\u05DB\u05D4\" : \"\u05E6\u05E8\u05D9\u05DA\";\n // Special case for singular (minimum === 1)\n if (issue.minimum === 1 && issue.inclusive) {\n const singularPhrase = issue.origin === \"set\" ? \"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3\" : \"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3\";\n return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`;\n }\n const comparison = issue.inclusive\n ? `${issue.minimum} ${sizing?.unit ?? \"\"} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`\n : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue.minimum} ${sizing?.unit ?? \"\"}`;\n return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();\n }\n const adj = issue.inclusive ? \">=\" : \">\";\n const be = verbFor(issue.origin ?? \"value\");\n if (sizing?.unit) {\n return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `${sizing?.shortLabel ?? \"\u05E7\u05D8\u05DF\"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n // These apply to strings \u2014 use feminine grammar + \u05D4\u05F3 \u05D4\u05D9\u05D3\u05D9\u05E2\u05D4\n if (_issue.format === \"starts_with\")\n return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`;\n // Handle gender agreement for formats\n const nounEntry = FormatDictionary[_issue.format];\n const noun = nounEntry?.label ?? _issue.format;\n const gender = nounEntry?.gender ?? \"m\";\n const adjective = gender === \"f\" ? \"\u05EA\u05E7\u05D9\u05E0\u05D4\" : \"\u05EA\u05E7\u05D9\u05DF\";\n return `${noun} \u05DC\u05D0 ${adjective}`;\n }\n case \"not_multiple_of\":\n return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u05DE\u05E4\u05EA\u05D7${issue.keys.length > 1 ? \"\u05D5\u05EA\" : \"\"} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue.keys.length > 1 ? \"\u05D9\u05DD\" : \"\u05D4\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\": {\n return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`;\n }\n case \"invalid_union\":\n return \"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF\";\n case \"invalid_element\": {\n const place = withDefinite(issue.origin ?? \"array\");\n return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`;\n }\n default:\n return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"karakter\", verb: \"legyen\" },\n file: { unit: \"byte\", verb: \"legyen\" },\n array: { unit: \"elem\", verb: \"legyen\" },\n set: { unit: \"elem\", verb: \"legyen\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"bemenet\",\n email: \"email c\u00EDm\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO id\u0151b\u00E9lyeg\",\n date: \"ISO d\u00E1tum\",\n time: \"ISO id\u0151\",\n duration: \"ISO id\u0151intervallum\",\n ipv4: \"IPv4 c\u00EDm\",\n ipv6: \"IPv6 c\u00EDm\",\n cidrv4: \"IPv4 tartom\u00E1ny\",\n cidrv6: \"IPv6 tartom\u00E1ny\",\n base64: \"base64-k\u00F3dolt string\",\n base64url: \"base64url-k\u00F3dolt string\",\n json_string: \"JSON string\",\n e164: \"E.164 sz\u00E1m\",\n jwt: \"JWT\",\n template_literal: \"bemenet\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"sz\u00E1m\",\n array: \"t\u00F6mb\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u00C9rv\u00E9nytelen bemenet: a v\u00E1rt \u00E9rt\u00E9k instanceof ${issue.expected}, a kapott \u00E9rt\u00E9k ${received}`;\n }\n return `\u00C9rv\u00E9nytelen bemenet: a v\u00E1rt \u00E9rt\u00E9k ${expected}, a kapott \u00E9rt\u00E9k ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u00C9rv\u00E9nytelen bemenet: a v\u00E1rt \u00E9rt\u00E9k ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u00C9rv\u00E9nytelen opci\u00F3: valamelyik \u00E9rt\u00E9k v\u00E1rt ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `T\u00FAl nagy: ${issue.origin ?? \"\u00E9rt\u00E9k\"} m\u00E9rete t\u00FAl nagy ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elem\"}`;\n return `T\u00FAl nagy: a bemeneti \u00E9rt\u00E9k ${issue.origin ?? \"\u00E9rt\u00E9k\"} t\u00FAl nagy: ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `T\u00FAl kicsi: a bemeneti \u00E9rt\u00E9k ${issue.origin} m\u00E9rete t\u00FAl kicsi ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `T\u00FAl kicsi: a bemeneti \u00E9rt\u00E9k ${issue.origin} t\u00FAl kicsi ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u00C9rv\u00E9nytelen string: \"${_issue.prefix}\" \u00E9rt\u00E9kkel kell kezd\u0151dnie`;\n if (_issue.format === \"ends_with\")\n return `\u00C9rv\u00E9nytelen string: \"${_issue.suffix}\" \u00E9rt\u00E9kkel kell v\u00E9gz\u0151dnie`;\n if (_issue.format === \"includes\")\n return `\u00C9rv\u00E9nytelen string: \"${_issue.includes}\" \u00E9rt\u00E9ket kell tartalmaznia`;\n if (_issue.format === \"regex\")\n return `\u00C9rv\u00E9nytelen string: ${_issue.pattern} mint\u00E1nak kell megfelelnie`;\n return `\u00C9rv\u00E9nytelen ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u00C9rv\u00E9nytelen sz\u00E1m: ${issue.divisor} t\u00F6bbsz\u00F6r\u00F6s\u00E9nek kell lennie`;\n case \"unrecognized_keys\":\n return `Ismeretlen kulcs${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u00C9rv\u00E9nytelen kulcs ${issue.origin}`;\n case \"invalid_union\":\n return \"\u00C9rv\u00E9nytelen bemenet\";\n case \"invalid_element\":\n return `\u00C9rv\u00E9nytelen \u00E9rt\u00E9k: ${issue.origin}`;\n default:\n return `\u00C9rv\u00E9nytelen bemenet`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nfunction getArmenianPlural(count, one, many) {\n return Math.abs(count) === 1 ? one : many;\n}\nfunction withDefiniteArticle(word) {\n if (!word)\n return \"\";\n const vowels = [\"\u0561\", \"\u0565\", \"\u0568\", \"\u056B\", \"\u0578\", \"\u0578\u0582\", \"\u0585\"];\n const lastChar = word[word.length - 1];\n return word + (vowels.includes(lastChar) ? \"\u0576\" : \"\u0568\");\n}\nconst error = () => {\n const Sizable = {\n string: {\n unit: {\n one: \"\u0576\u0577\u0561\u0576\",\n many: \"\u0576\u0577\u0561\u0576\u0576\u0565\u0580\",\n },\n verb: \"\u0578\u0582\u0576\u0565\u0576\u0561\u056C\",\n },\n file: {\n unit: {\n one: \"\u0562\u0561\u0575\u0569\",\n many: \"\u0562\u0561\u0575\u0569\u0565\u0580\",\n },\n verb: \"\u0578\u0582\u0576\u0565\u0576\u0561\u056C\",\n },\n array: {\n unit: {\n one: \"\u057F\u0561\u0580\u0580\",\n many: \"\u057F\u0561\u0580\u0580\u0565\u0580\",\n },\n verb: \"\u0578\u0582\u0576\u0565\u0576\u0561\u056C\",\n },\n set: {\n unit: {\n one: \"\u057F\u0561\u0580\u0580\",\n many: \"\u057F\u0561\u0580\u0580\u0565\u0580\",\n },\n verb: \"\u0578\u0582\u0576\u0565\u0576\u0561\u056C\",\n },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0574\u0578\u0582\u057F\u0584\",\n email: \"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565\",\n url: \"URL\",\n emoji: \"\u0567\u0574\u0578\u057B\u056B\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574\",\n date: \"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E\",\n time: \"ISO \u056A\u0561\u0574\",\n duration: \"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576\",\n ipv4: \"IPv4 \u0570\u0561\u057D\u0581\u0565\",\n ipv6: \"IPv6 \u0570\u0561\u057D\u0581\u0565\",\n cidrv4: \"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584\",\n cidrv6: \"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584\",\n base64: \"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572\",\n base64url: \"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572\",\n json_string: \"JSON \u057F\u0578\u0572\",\n e164: \"E.164 \u0570\u0561\u0574\u0561\u0580\",\n jwt: \"JWT\",\n template_literal: \"\u0574\u0578\u0582\u057F\u0584\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0569\u056B\u057E\",\n array: \"\u0566\u0561\u0576\u0563\u057E\u0561\u056E\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${issue.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`;\n }\n return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${util.stringifyPrimitive(issue.values[1])}`;\n return `\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const maxValue = Number(issue.maximum);\n const unit = getArmenianPlural(maxValue, sizing.unit.one, sizing.unit.many);\n return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue.origin ?? \"\u0561\u0580\u056A\u0565\u0584\")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue.maximum.toString()} ${unit}`;\n }\n return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue.origin ?? \"\u0561\u0580\u056A\u0565\u0584\")} \u056C\u056B\u0576\u056B ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const minValue = Number(issue.minimum);\n const unit = getArmenianPlural(minValue, sizing.unit.one, sizing.unit.many);\n return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue.minimum.toString()} ${unit}`;\n }\n return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue.origin)} \u056C\u056B\u0576\u056B ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B \"${_issue.prefix}\"-\u0578\u057E`;\n if (_issue.format === \"ends_with\")\n return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B \"${_issue.suffix}\"-\u0578\u057E`;\n if (_issue.format === \"includes\")\n return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${_issue.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`;\n return `\u054D\u056D\u0561\u056C ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${issue.divisor}-\u056B`;\n case \"unrecognized_keys\":\n return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${issue.keys.length > 1 ? \"\u0576\u0565\u0580\" : \"\"}. ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${withDefiniteArticle(issue.origin)}-\u0578\u0582\u0574`;\n case \"invalid_union\":\n return \"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\";\n case \"invalid_element\":\n return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${withDefiniteArticle(issue.origin)}-\u0578\u0582\u0574`;\n default:\n return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"karakter\", verb: \"memiliki\" },\n file: { unit: \"byte\", verb: \"memiliki\" },\n array: { unit: \"item\", verb: \"memiliki\" },\n set: { unit: \"item\", verb: \"memiliki\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"alamat email\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"tanggal dan waktu format ISO\",\n date: \"tanggal format ISO\",\n time: \"jam format ISO\",\n duration: \"durasi format ISO\",\n ipv4: \"alamat IPv4\",\n ipv6: \"alamat IPv6\",\n cidrv4: \"rentang alamat IPv4\",\n cidrv6: \"rentang alamat IPv6\",\n base64: \"string dengan enkode base64\",\n base64url: \"string dengan enkode base64url\",\n json_string: \"string JSON\",\n e164: \"angka E.164\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Input tidak valid: diharapkan instanceof ${issue.expected}, diterima ${received}`;\n }\n return `Input tidak valid: diharapkan ${expected}, diterima ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Input tidak valid: diharapkan ${util.stringifyPrimitive(issue.values[0])}`;\n return `Pilihan tidak valid: diharapkan salah satu dari ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Terlalu besar: diharapkan ${issue.origin ?? \"value\"} memiliki ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elemen\"}`;\n return `Terlalu besar: diharapkan ${issue.origin ?? \"value\"} menjadi ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Terlalu kecil: diharapkan ${issue.origin} memiliki ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Terlalu kecil: diharapkan ${issue.origin} menjadi ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `String tidak valid: harus dimulai dengan \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `String tidak valid: harus berakhir dengan \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `String tidak valid: harus menyertakan \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `String tidak valid: harus sesuai pola ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} tidak valid`;\n }\n case \"not_multiple_of\":\n return `Angka tidak valid: harus kelipatan dari ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Kunci tidak dikenali ${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Kunci tidak valid di ${issue.origin}`;\n case \"invalid_union\":\n return \"Input tidak valid\";\n case \"invalid_element\":\n return `Nilai tidak valid di ${issue.origin}`;\n default:\n return `Input tidak valid`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"stafi\", verb: \"a\u00F0 hafa\" },\n file: { unit: \"b\u00E6ti\", verb: \"a\u00F0 hafa\" },\n array: { unit: \"hluti\", verb: \"a\u00F0 hafa\" },\n set: { unit: \"hluti\", verb: \"a\u00F0 hafa\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"gildi\",\n email: \"netfang\",\n url: \"vefsl\u00F3\u00F0\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO dagsetning og t\u00EDmi\",\n date: \"ISO dagsetning\",\n time: \"ISO t\u00EDmi\",\n duration: \"ISO t\u00EDmalengd\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded strengur\",\n base64url: \"base64url-encoded strengur\",\n json_string: \"JSON strengur\",\n e164: \"E.164 t\u00F6lugildi\",\n jwt: \"JWT\",\n template_literal: \"gildi\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"n\u00FAmer\",\n array: \"fylki\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Rangt gildi: \u00DE\u00FA sl\u00F3st inn ${received} \u00FEar sem \u00E1 a\u00F0 vera instanceof ${issue.expected}`;\n }\n return `Rangt gildi: \u00DE\u00FA sl\u00F3st inn ${received} \u00FEar sem \u00E1 a\u00F0 vera ${expected}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Rangt gildi: gert r\u00E1\u00F0 fyrir ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u00D3gilt val: m\u00E1 vera eitt af eftirfarandi ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Of st\u00F3rt: gert er r\u00E1\u00F0 fyrir a\u00F0 ${issue.origin ?? \"gildi\"} hafi ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"hluti\"}`;\n return `Of st\u00F3rt: gert er r\u00E1\u00F0 fyrir a\u00F0 ${issue.origin ?? \"gildi\"} s\u00E9 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Of l\u00EDti\u00F0: gert er r\u00E1\u00F0 fyrir a\u00F0 ${issue.origin} hafi ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Of l\u00EDti\u00F0: gert er r\u00E1\u00F0 fyrir a\u00F0 ${issue.origin} s\u00E9 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u00D3gildur strengur: ver\u00F0ur a\u00F0 byrja \u00E1 \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u00D3gildur strengur: ver\u00F0ur a\u00F0 enda \u00E1 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u00D3gildur strengur: ver\u00F0ur a\u00F0 innihalda \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u00D3gildur strengur: ver\u00F0ur a\u00F0 fylgja mynstri ${_issue.pattern}`;\n return `Rangt ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `R\u00F6ng tala: ver\u00F0ur a\u00F0 vera margfeldi af ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u00D3\u00FEekkt ${issue.keys.length > 1 ? \"ir lyklar\" : \"ur lykill\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Rangur lykill \u00ED ${issue.origin}`;\n case \"invalid_union\":\n return \"Rangt gildi\";\n case \"invalid_element\":\n return `Rangt gildi \u00ED ${issue.origin}`;\n default:\n return `Rangt gildi`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caratteri\", verb: \"avere\" },\n file: { unit: \"byte\", verb: \"avere\" },\n array: { unit: \"elementi\", verb: \"avere\" },\n set: { unit: \"elementi\", verb: \"avere\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"indirizzo email\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"data e ora ISO\",\n date: \"data ISO\",\n time: \"ora ISO\",\n duration: \"durata ISO\",\n ipv4: \"indirizzo IPv4\",\n ipv6: \"indirizzo IPv6\",\n cidrv4: \"intervallo IPv4\",\n cidrv6: \"intervallo IPv6\",\n base64: \"stringa codificata in base64\",\n base64url: \"URL codificata in base64\",\n json_string: \"stringa JSON\",\n e164: \"numero E.164\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"numero\",\n array: \"vettore\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Input non valido: atteso instanceof ${issue.expected}, ricevuto ${received}`;\n }\n return `Input non valido: atteso ${expected}, ricevuto ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Input non valido: atteso ${util.stringifyPrimitive(issue.values[0])}`;\n return `Opzione non valida: atteso uno tra ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Troppo grande: ${issue.origin ?? \"valore\"} deve avere ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementi\"}`;\n return `Troppo grande: ${issue.origin ?? \"valore\"} deve essere ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Troppo piccolo: ${issue.origin} deve avere ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Troppo piccolo: ${issue.origin} deve essere ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Stringa non valida: deve iniziare con \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Stringa non valida: deve terminare con \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Stringa non valida: deve includere \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Numero non valido: deve essere un multiplo di ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Chiav${issue.keys.length > 1 ? \"i\" : \"e\"} non riconosciut${issue.keys.length > 1 ? \"e\" : \"a\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Chiave non valida in ${issue.origin}`;\n case \"invalid_union\":\n return \"Input non valido\";\n case \"invalid_element\":\n return `Valore non valido in ${issue.origin}`;\n default:\n return `Input non valido`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u6587\u5B57\", verb: \"\u3067\u3042\u308B\" },\n file: { unit: \"\u30D0\u30A4\u30C8\", verb: \"\u3067\u3042\u308B\" },\n array: { unit: \"\u8981\u7D20\", verb: \"\u3067\u3042\u308B\" },\n set: { unit: \"\u8981\u7D20\", verb: \"\u3067\u3042\u308B\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u5165\u529B\u5024\",\n email: \"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\",\n url: \"URL\",\n emoji: \"\u7D75\u6587\u5B57\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO\u65E5\u6642\",\n date: \"ISO\u65E5\u4ED8\",\n time: \"ISO\u6642\u523B\",\n duration: \"ISO\u671F\u9593\",\n ipv4: \"IPv4\u30A2\u30C9\u30EC\u30B9\",\n ipv6: \"IPv6\u30A2\u30C9\u30EC\u30B9\",\n cidrv4: \"IPv4\u7BC4\u56F2\",\n cidrv6: \"IPv6\u7BC4\u56F2\",\n base64: \"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217\",\n base64url: \"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217\",\n json_string: \"JSON\u6587\u5B57\u5217\",\n e164: \"E.164\u756A\u53F7\",\n jwt: \"JWT\",\n template_literal: \"\u5165\u529B\u5024\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u6570\u5024\",\n array: \"\u914D\u5217\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u7121\u52B9\u306A\u5165\u529B: instanceof ${issue.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;\n }\n return `\u7121\u52B9\u306A\u5165\u529B: ${expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u7121\u52B9\u306A\u5165\u529B: ${util.stringifyPrimitive(issue.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`;\n return `\u7121\u52B9\u306A\u9078\u629E: ${util.joinValues(issue.values, \"\u3001\")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"\u4EE5\u4E0B\u3067\u3042\u308B\" : \"\u3088\u308A\u5C0F\u3055\u3044\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue.origin ?? \"\u5024\"}\u306F${issue.maximum.toString()}${sizing.unit ?? \"\u8981\u7D20\"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue.origin ?? \"\u5024\"}\u306F${issue.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"\u4EE5\u4E0A\u3067\u3042\u308B\" : \"\u3088\u308A\u5927\u304D\u3044\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue.origin}\u306F${issue.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue.origin}\u306F${issue.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \"${_issue.prefix}\"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n if (_issue.format === \"ends_with\")\n return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \"${_issue.suffix}\"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n if (_issue.format === \"includes\")\n return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \"${_issue.includes}\"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n if (_issue.format === \"regex\")\n return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n return `\u7121\u52B9\u306A${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u7121\u52B9\u306A\u6570\u5024: ${issue.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n case \"unrecognized_keys\":\n return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue.keys.length > 1 ? \"\u7FA4\" : \"\"}: ${util.joinValues(issue.keys, \"\u3001\")}`;\n case \"invalid_key\":\n return `${issue.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;\n case \"invalid_union\":\n return \"\u7121\u52B9\u306A\u5165\u529B\";\n case \"invalid_element\":\n return `${issue.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;\n default:\n return `\u7121\u52B9\u306A\u5165\u529B`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD\", verb: \"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1\" },\n file: { unit: \"\u10D1\u10D0\u10D8\u10E2\u10D8\", verb: \"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1\" },\n array: { unit: \"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8\", verb: \"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1\" },\n set: { unit: \"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8\", verb: \"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0\",\n email: \"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8\",\n url: \"URL\",\n emoji: \"\u10D4\u10DB\u10DD\u10EF\u10D8\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD\",\n date: \"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8\",\n time: \"\u10D3\u10E0\u10DD\",\n duration: \"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0\",\n ipv4: \"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8\",\n ipv6: \"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8\",\n cidrv4: \"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8\",\n cidrv6: \"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8\",\n base64: \"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8\",\n base64url: \"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8\",\n json_string: \"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8\",\n e164: \"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8\",\n jwt: \"JWT\",\n template_literal: \"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8\",\n string: \"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8\",\n boolean: \"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8\",\n function: \"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0\",\n array: \"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${issue.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`;\n }\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${util.joinValues(issue.values, \"|\")}-\u10D3\u10D0\u10DC`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue.origin ?? \"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0\"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit}`;\n return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue.origin ?? \"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0\"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \"${_issue.prefix}\"-\u10D8\u10D7`;\n }\n if (_issue.format === \"ends_with\")\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \"${_issue.suffix}\"-\u10D8\u10D7`;\n if (_issue.format === \"includes\")\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 \"${_issue.includes}\"-\u10E1`;\n if (_issue.format === \"regex\")\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;\n case \"unrecognized_keys\":\n return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue.keys.length > 1 ? \"\u10D4\u10D1\u10D8\" : \"\u10D8\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue.origin}-\u10E8\u10D8`;\n case \"invalid_union\":\n return \"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0\";\n case \"invalid_element\":\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue.origin}-\u10E8\u10D8`;\n default:\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A\", verb: \"\u1782\u17BD\u179A\u1798\u17B6\u1793\" },\n file: { unit: \"\u1794\u17C3\", verb: \"\u1782\u17BD\u179A\u1798\u17B6\u1793\" },\n array: { unit: \"\u1792\u17B6\u178F\u17BB\", verb: \"\u1782\u17BD\u179A\u1798\u17B6\u1793\" },\n set: { unit: \"\u1792\u17B6\u178F\u17BB\", verb: \"\u1782\u17BD\u179A\u1798\u17B6\u1793\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\",\n email: \"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B\",\n url: \"URL\",\n emoji: \"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO\",\n date: \"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO\",\n time: \"\u1798\u17C9\u17C4\u1784 ISO\",\n duration: \"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO\",\n ipv4: \"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4\",\n ipv6: \"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6\",\n cidrv4: \"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4\",\n cidrv6: \"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6\",\n base64: \"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64\",\n base64url: \"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url\",\n json_string: \"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON\",\n e164: \"\u179B\u17C1\u1781 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u179B\u17C1\u1781\",\n array: \"\u17A2\u17B6\u179A\u17C1 (Array)\",\n null: \"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${issue.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`;\n }\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue.origin ?? \"\u178F\u1798\u17D2\u179B\u17C3\"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"\u1792\u17B6\u178F\u17BB\"}`;\n return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue.origin ?? \"\u178F\u1798\u17D2\u179B\u17C3\"} ${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue.origin} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue.origin} ${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`;\n return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue.origin}`;\n case \"invalid_union\":\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`;\n case \"invalid_element\":\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue.origin}`;\n default:\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import km from \"./km.js\";\n/** @deprecated Use `km` instead. */\nexport default function () {\n return km();\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\uBB38\uC790\", verb: \"to have\" },\n file: { unit: \"\uBC14\uC774\uD2B8\", verb: \"to have\" },\n array: { unit: \"\uAC1C\", verb: \"to have\" },\n set: { unit: \"\uAC1C\", verb: \"to have\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\uC785\uB825\",\n email: \"\uC774\uBA54\uC77C \uC8FC\uC18C\",\n url: \"URL\",\n emoji: \"\uC774\uBAA8\uC9C0\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \uB0A0\uC9DC\uC2DC\uAC04\",\n date: \"ISO \uB0A0\uC9DC\",\n time: \"ISO \uC2DC\uAC04\",\n duration: \"ISO \uAE30\uAC04\",\n ipv4: \"IPv4 \uC8FC\uC18C\",\n ipv6: \"IPv6 \uC8FC\uC18C\",\n cidrv4: \"IPv4 \uBC94\uC704\",\n cidrv6: \"IPv6 \uBC94\uC704\",\n base64: \"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4\",\n base64url: \"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4\",\n json_string: \"JSON \uBB38\uC790\uC5F4\",\n e164: \"E.164 \uBC88\uD638\",\n jwt: \"JWT\",\n template_literal: \"\uC785\uB825\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${issue.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`;\n }\n return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${util.stringifyPrimitive(issue.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`;\n return `\uC798\uBABB\uB41C \uC635\uC158: ${util.joinValues(issue.values, \"\uB610\uB294 \")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"\uC774\uD558\" : \"\uBBF8\uB9CC\";\n const suffix = adj === \"\uBBF8\uB9CC\" ? \"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4\" : \"\uC5EC\uC57C \uD569\uB2C8\uB2E4\";\n const sizing = getSizing(issue.origin);\n const unit = sizing?.unit ?? \"\uC694\uC18C\";\n if (sizing)\n return `${issue.origin ?? \"\uAC12\"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue.maximum.toString()}${unit} ${adj}${suffix}`;\n return `${issue.origin ?? \"\uAC12\"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue.maximum.toString()} ${adj}${suffix}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"\uC774\uC0C1\" : \"\uCD08\uACFC\";\n const suffix = adj === \"\uC774\uC0C1\" ? \"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4\" : \"\uC5EC\uC57C \uD569\uB2C8\uB2E4\";\n const sizing = getSizing(issue.origin);\n const unit = sizing?.unit ?? \"\uC694\uC18C\";\n if (sizing) {\n return `${issue.origin ?? \"\uAC12\"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue.minimum.toString()}${unit} ${adj}${suffix}`;\n }\n return `${issue.origin ?? \"\uAC12\"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue.minimum.toString()} ${adj}${suffix}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \"${_issue.prefix}\"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`;\n }\n if (_issue.format === \"ends_with\")\n return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \"${_issue.suffix}\"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`;\n if (_issue.format === \"includes\")\n return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \"${_issue.includes}\"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`;\n if (_issue.format === \"regex\")\n return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`;\n return `\uC798\uBABB\uB41C ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;\n case \"unrecognized_keys\":\n return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\uC798\uBABB\uB41C \uD0A4: ${issue.origin}`;\n case \"invalid_union\":\n return `\uC798\uBABB\uB41C \uC785\uB825`;\n case \"invalid_element\":\n return `\uC798\uBABB\uB41C \uAC12: ${issue.origin}`;\n default:\n return `\uC798\uBABB\uB41C \uC785\uB825`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst capitalizeFirstCharacter = (text) => {\n return text.charAt(0).toUpperCase() + text.slice(1);\n};\nfunction getUnitTypeFromNumber(number) {\n const abs = Math.abs(number);\n const last = abs % 10;\n const last2 = abs % 100;\n if ((last2 >= 11 && last2 <= 19) || last === 0)\n return \"many\";\n if (last === 1)\n return \"one\";\n return \"few\";\n}\nconst error = () => {\n const Sizable = {\n string: {\n unit: {\n one: \"simbolis\",\n few: \"simboliai\",\n many: \"simboli\u0173\",\n },\n verb: {\n smaller: {\n inclusive: \"turi b\u016Bti ne ilgesn\u0117 kaip\",\n notInclusive: \"turi b\u016Bti trumpesn\u0117 kaip\",\n },\n bigger: {\n inclusive: \"turi b\u016Bti ne trumpesn\u0117 kaip\",\n notInclusive: \"turi b\u016Bti ilgesn\u0117 kaip\",\n },\n },\n },\n file: {\n unit: {\n one: \"baitas\",\n few: \"baitai\",\n many: \"bait\u0173\",\n },\n verb: {\n smaller: {\n inclusive: \"turi b\u016Bti ne didesnis kaip\",\n notInclusive: \"turi b\u016Bti ma\u017Eesnis kaip\",\n },\n bigger: {\n inclusive: \"turi b\u016Bti ne ma\u017Eesnis kaip\",\n notInclusive: \"turi b\u016Bti didesnis kaip\",\n },\n },\n },\n array: {\n unit: {\n one: \"element\u0105\",\n few: \"elementus\",\n many: \"element\u0173\",\n },\n verb: {\n smaller: {\n inclusive: \"turi tur\u0117ti ne daugiau kaip\",\n notInclusive: \"turi tur\u0117ti ma\u017Eiau kaip\",\n },\n bigger: {\n inclusive: \"turi tur\u0117ti ne ma\u017Eiau kaip\",\n notInclusive: \"turi tur\u0117ti daugiau kaip\",\n },\n },\n },\n set: {\n unit: {\n one: \"element\u0105\",\n few: \"elementus\",\n many: \"element\u0173\",\n },\n verb: {\n smaller: {\n inclusive: \"turi tur\u0117ti ne daugiau kaip\",\n notInclusive: \"turi tur\u0117ti ma\u017Eiau kaip\",\n },\n bigger: {\n inclusive: \"turi tur\u0117ti ne ma\u017Eiau kaip\",\n notInclusive: \"turi tur\u0117ti daugiau kaip\",\n },\n },\n },\n };\n function getSizing(origin, unitType, inclusive, targetShouldBe) {\n const result = Sizable[origin] ?? null;\n if (result === null)\n return result;\n return {\n unit: result.unit[unitType],\n verb: result.verb[targetShouldBe][inclusive ? \"inclusive\" : \"notInclusive\"],\n };\n }\n const FormatDictionary = {\n regex: \"\u012Fvestis\",\n email: \"el. pa\u0161to adresas\",\n url: \"URL\",\n emoji: \"jaustukas\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO data ir laikas\",\n date: \"ISO data\",\n time: \"ISO laikas\",\n duration: \"ISO trukm\u0117\",\n ipv4: \"IPv4 adresas\",\n ipv6: \"IPv6 adresas\",\n cidrv4: \"IPv4 tinklo prefiksas (CIDR)\",\n cidrv6: \"IPv6 tinklo prefiksas (CIDR)\",\n base64: \"base64 u\u017Ekoduota eilut\u0117\",\n base64url: \"base64url u\u017Ekoduota eilut\u0117\",\n json_string: \"JSON eilut\u0117\",\n e164: \"E.164 numeris\",\n jwt: \"JWT\",\n template_literal: \"\u012Fvestis\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"skai\u010Dius\",\n bigint: \"sveikasis skai\u010Dius\",\n string: \"eilut\u0117\",\n boolean: \"login\u0117 reik\u0161m\u0117\",\n undefined: \"neapibr\u0117\u017Eta reik\u0161m\u0117\",\n function: \"funkcija\",\n symbol: \"simbolis\",\n array: \"masyvas\",\n object: \"objektas\",\n null: \"nulin\u0117 reik\u0161m\u0117\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Gautas tipas ${received}, o tik\u0117tasi - instanceof ${issue.expected}`;\n }\n return `Gautas tipas ${received}, o tik\u0117tasi - ${expected}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Privalo b\u016Bti ${util.stringifyPrimitive(issue.values[0])}`;\n return `Privalo b\u016Bti vienas i\u0161 ${util.joinValues(issue.values, \"|\")} pasirinkim\u0173`;\n case \"too_big\": {\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n const sizing = getSizing(issue.origin, getUnitTypeFromNumber(Number(issue.maximum)), issue.inclusive ?? false, \"smaller\");\n if (sizing?.verb)\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} ${sizing.verb} ${issue.maximum.toString()} ${sizing.unit ?? \"element\u0173\"}`;\n const adj = issue.inclusive ? \"ne didesnis kaip\" : \"ma\u017Eesnis kaip\";\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} turi b\u016Bti ${adj} ${issue.maximum.toString()} ${sizing?.unit}`;\n }\n case \"too_small\": {\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n const sizing = getSizing(issue.origin, getUnitTypeFromNumber(Number(issue.minimum)), issue.inclusive ?? false, \"bigger\");\n if (sizing?.verb)\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} ${sizing.verb} ${issue.minimum.toString()} ${sizing.unit ?? \"element\u0173\"}`;\n const adj = issue.inclusive ? \"ne ma\u017Eesnis kaip\" : \"didesnis kaip\";\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} turi b\u016Bti ${adj} ${issue.minimum.toString()} ${sizing?.unit}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Eilut\u0117 privalo prasid\u0117ti \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Eilut\u0117 privalo pasibaigti \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Eilut\u0117 privalo \u012Ftraukti \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Eilut\u0117 privalo atitikti ${_issue.pattern}`;\n return `Neteisingas ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Skai\u010Dius privalo b\u016Bti ${issue.divisor} kartotinis.`;\n case \"unrecognized_keys\":\n return `Neatpa\u017Eint${issue.keys.length > 1 ? \"i\" : \"as\"} rakt${issue.keys.length > 1 ? \"ai\" : \"as\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return \"Rastas klaidingas raktas\";\n case \"invalid_union\":\n return \"Klaidinga \u012Fvestis\";\n case \"invalid_element\": {\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} turi klaiding\u0105 \u012Fvest\u012F`;\n }\n default:\n return \"Klaidinga \u012Fvestis\";\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0437\u043D\u0430\u0446\u0438\", verb: \"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442\" },\n file: { unit: \"\u0431\u0430\u0458\u0442\u0438\", verb: \"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442\" },\n array: { unit: \"\u0441\u0442\u0430\u0432\u043A\u0438\", verb: \"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442\" },\n set: { unit: \"\u0441\u0442\u0430\u0432\u043A\u0438\", verb: \"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0432\u043D\u0435\u0441\",\n email: \"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430\",\n url: \"URL\",\n emoji: \"\u0435\u043C\u043E\u045F\u0438\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435\",\n date: \"ISO \u0434\u0430\u0442\u0443\u043C\",\n time: \"ISO \u0432\u0440\u0435\u043C\u0435\",\n duration: \"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435\",\n ipv4: \"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430\",\n ipv6: \"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430\",\n cidrv4: \"IPv4 \u043E\u043F\u0441\u0435\u0433\",\n cidrv6: \"IPv6 \u043E\u043F\u0441\u0435\u0433\",\n base64: \"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430\",\n base64url: \"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430\",\n json_string: \"JSON \u043D\u0438\u0437\u0430\",\n e164: \"E.164 \u0431\u0440\u043E\u0458\",\n jwt: \"JWT\",\n template_literal: \"\u0432\u043D\u0435\u0441\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0431\u0440\u043E\u0458\",\n array: \"\u043D\u0438\u0437\u0430\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${issue.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`;\n }\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue.origin ?? \"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430\"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438\"}`;\n return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue.origin ?? \"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430\"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438\" : \"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue.origin}`;\n case \"invalid_union\":\n return \"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441\";\n case \"invalid_element\":\n return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue.origin}`;\n default:\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"aksara\", verb: \"mempunyai\" },\n file: { unit: \"bait\", verb: \"mempunyai\" },\n array: { unit: \"elemen\", verb: \"mempunyai\" },\n set: { unit: \"elemen\", verb: \"mempunyai\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"alamat e-mel\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"tarikh masa ISO\",\n date: \"tarikh ISO\",\n time: \"masa ISO\",\n duration: \"tempoh ISO\",\n ipv4: \"alamat IPv4\",\n ipv6: \"alamat IPv6\",\n cidrv4: \"julat IPv4\",\n cidrv6: \"julat IPv6\",\n base64: \"string dikodkan base64\",\n base64url: \"string dikodkan base64url\",\n json_string: \"string JSON\",\n e164: \"nombor E.164\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"nombor\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Input tidak sah: dijangka instanceof ${issue.expected}, diterima ${received}`;\n }\n return `Input tidak sah: dijangka ${expected}, diterima ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Input tidak sah: dijangka ${util.stringifyPrimitive(issue.values[0])}`;\n return `Pilihan tidak sah: dijangka salah satu daripada ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Terlalu besar: dijangka ${issue.origin ?? \"nilai\"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elemen\"}`;\n return `Terlalu besar: dijangka ${issue.origin ?? \"nilai\"} adalah ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Terlalu kecil: dijangka ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Terlalu kecil: dijangka ${issue.origin} adalah ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `String tidak sah: mesti bermula dengan \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `String tidak sah: mesti berakhir dengan \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `String tidak sah: mesti mengandungi \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} tidak sah`;\n }\n case \"not_multiple_of\":\n return `Nombor tidak sah: perlu gandaan ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Kunci tidak dikenali: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Kunci tidak sah dalam ${issue.origin}`;\n case \"invalid_union\":\n return \"Input tidak sah\";\n case \"invalid_element\":\n return `Nilai tidak sah dalam ${issue.origin}`;\n default:\n return `Input tidak sah`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"tekens\", verb: \"heeft\" },\n file: { unit: \"bytes\", verb: \"heeft\" },\n array: { unit: \"elementen\", verb: \"heeft\" },\n set: { unit: \"elementen\", verb: \"heeft\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"invoer\",\n email: \"emailadres\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datum en tijd\",\n date: \"ISO datum\",\n time: \"ISO tijd\",\n duration: \"ISO duur\",\n ipv4: \"IPv4-adres\",\n ipv6: \"IPv6-adres\",\n cidrv4: \"IPv4-bereik\",\n cidrv6: \"IPv6-bereik\",\n base64: \"base64-gecodeerde tekst\",\n base64url: \"base64 URL-gecodeerde tekst\",\n json_string: \"JSON string\",\n e164: \"E.164-nummer\",\n jwt: \"JWT\",\n template_literal: \"invoer\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"getal\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ongeldige invoer: verwacht instanceof ${issue.expected}, ontving ${received}`;\n }\n return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ongeldige invoer: verwacht ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ongeldige optie: verwacht \u00E9\u00E9n van ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n const longName = issue.origin === \"date\" ? \"laat\" : issue.origin === \"string\" ? \"lang\" : \"groot\";\n if (sizing)\n return `Te ${longName}: verwacht dat ${issue.origin ?? \"waarde\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementen\"} ${sizing.verb}`;\n return `Te ${longName}: verwacht dat ${issue.origin ?? \"waarde\"} ${adj}${issue.maximum.toString()} is`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n const shortName = issue.origin === \"date\" ? \"vroeg\" : issue.origin === \"string\" ? \"kort\" : \"klein\";\n if (sizing) {\n return `Te ${shortName}: verwacht dat ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} ${sizing.verb}`;\n }\n return `Te ${shortName}: verwacht dat ${issue.origin} ${adj}${issue.minimum.toString()} is`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Ongeldige tekst: moet met \"${_issue.prefix}\" beginnen`;\n }\n if (_issue.format === \"ends_with\")\n return `Ongeldige tekst: moet op \"${_issue.suffix}\" eindigen`;\n if (_issue.format === \"includes\")\n return `Ongeldige tekst: moet \"${_issue.includes}\" bevatten`;\n if (_issue.format === \"regex\")\n return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`;\n return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ongeldig getal: moet een veelvoud van ${issue.divisor} zijn`;\n case \"unrecognized_keys\":\n return `Onbekende key${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ongeldige key in ${issue.origin}`;\n case \"invalid_union\":\n return \"Ongeldige invoer\";\n case \"invalid_element\":\n return `Ongeldige waarde in ${issue.origin}`;\n default:\n return `Ongeldige invoer`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"tegn\", verb: \"\u00E5 ha\" },\n file: { unit: \"bytes\", verb: \"\u00E5 ha\" },\n array: { unit: \"elementer\", verb: \"\u00E5 inneholde\" },\n set: { unit: \"elementer\", verb: \"\u00E5 inneholde\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"e-postadresse\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO dato- og klokkeslett\",\n date: \"ISO-dato\",\n time: \"ISO-klokkeslett\",\n duration: \"ISO-varighet\",\n ipv4: \"IPv4-omr\u00E5de\",\n ipv6: \"IPv6-omr\u00E5de\",\n cidrv4: \"IPv4-spekter\",\n cidrv6: \"IPv6-spekter\",\n base64: \"base64-enkodet streng\",\n base64url: \"base64url-enkodet streng\",\n json_string: \"JSON-streng\",\n e164: \"E.164-nummer\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"tall\",\n array: \"liste\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ugyldig input: forventet instanceof ${issue.expected}, fikk ${received}`;\n }\n return `Ugyldig input: forventet ${expected}, fikk ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ugyldig verdi: forventet ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ugyldig valg: forventet en av ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `For stor(t): forventet ${issue.origin ?? \"value\"} til \u00E5 ha ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementer\"}`;\n return `For stor(t): forventet ${issue.origin ?? \"value\"} til \u00E5 ha ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `For lite(n): forventet ${issue.origin} til \u00E5 ha ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `For lite(n): forventet ${issue.origin} til \u00E5 ha ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Ugyldig streng: m\u00E5 starte med \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Ugyldig streng: m\u00E5 ende med \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Ugyldig streng: m\u00E5 inneholde \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Ugyldig streng: m\u00E5 matche m\u00F8nsteret ${_issue.pattern}`;\n return `Ugyldig ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ugyldig tall: m\u00E5 v\u00E6re et multiplum av ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Ukjente n\u00F8kler\" : \"Ukjent n\u00F8kkel\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ugyldig n\u00F8kkel i ${issue.origin}`;\n case \"invalid_union\":\n return \"Ugyldig input\";\n case \"invalid_element\":\n return `Ugyldig verdi i ${issue.origin}`;\n default:\n return `Ugyldig input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"harf\", verb: \"olmal\u0131d\u0131r\" },\n file: { unit: \"bayt\", verb: \"olmal\u0131d\u0131r\" },\n array: { unit: \"unsur\", verb: \"olmal\u0131d\u0131r\" },\n set: { unit: \"unsur\", verb: \"olmal\u0131d\u0131r\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"giren\",\n email: \"epostag\u00E2h\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO heng\u00E2m\u0131\",\n date: \"ISO tarihi\",\n time: \"ISO zaman\u0131\",\n duration: \"ISO m\u00FCddeti\",\n ipv4: \"IPv4 ni\u015F\u00E2n\u0131\",\n ipv6: \"IPv6 ni\u015F\u00E2n\u0131\",\n cidrv4: \"IPv4 menzili\",\n cidrv6: \"IPv6 menzili\",\n base64: \"base64-\u015Fifreli metin\",\n base64url: \"base64url-\u015Fifreli metin\",\n json_string: \"JSON metin\",\n e164: \"E.164 say\u0131s\u0131\",\n jwt: \"JWT\",\n template_literal: \"giren\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"numara\",\n array: \"saf\",\n null: \"gayb\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `F\u00E2sit giren: umulan instanceof ${issue.expected}, al\u0131nan ${received}`;\n }\n return `F\u00E2sit giren: umulan ${expected}, al\u0131nan ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `F\u00E2sit giren: umulan ${util.stringifyPrimitive(issue.values[0])}`;\n return `F\u00E2sit tercih: m\u00FBteberler ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Fazla b\u00FCy\u00FCk: ${issue.origin ?? \"value\"}, ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elements\"} sahip olmal\u0131yd\u0131.`;\n return `Fazla b\u00FCy\u00FCk: ${issue.origin ?? \"value\"}, ${adj}${issue.maximum.toString()} olmal\u0131yd\u0131.`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Fazla k\u00FC\u00E7\u00FCk: ${issue.origin}, ${adj}${issue.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`;\n }\n return `Fazla k\u00FC\u00E7\u00FCk: ${issue.origin}, ${adj}${issue.minimum.toString()} olmal\u0131yd\u0131.`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `F\u00E2sit metin: \"${_issue.prefix}\" ile ba\u015Flamal\u0131.`;\n if (_issue.format === \"ends_with\")\n return `F\u00E2sit metin: \"${_issue.suffix}\" ile bitmeli.`;\n if (_issue.format === \"includes\")\n return `F\u00E2sit metin: \"${_issue.includes}\" ihtiv\u00E2 etmeli.`;\n if (_issue.format === \"regex\")\n return `F\u00E2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`;\n return `F\u00E2sit ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `F\u00E2sit say\u0131: ${issue.divisor} kat\u0131 olmal\u0131yd\u0131.`;\n case \"unrecognized_keys\":\n return `Tan\u0131nmayan anahtar ${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} i\u00E7in tan\u0131nmayan anahtar var.`;\n case \"invalid_union\":\n return \"Giren tan\u0131namad\u0131.\";\n case \"invalid_element\":\n return `${issue.origin} i\u00E7in tan\u0131nmayan k\u0131ymet var.`;\n default:\n return `K\u0131ymet tan\u0131namad\u0131.`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u062A\u0648\u06A9\u064A\", verb: \"\u0648\u0644\u0631\u064A\" },\n file: { unit: \"\u0628\u0627\u06CC\u067C\u0633\", verb: \"\u0648\u0644\u0631\u064A\" },\n array: { unit: \"\u062A\u0648\u06A9\u064A\", verb: \"\u0648\u0644\u0631\u064A\" },\n set: { unit: \"\u062A\u0648\u06A9\u064A\", verb: \"\u0648\u0644\u0631\u064A\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0648\u0631\u0648\u062F\u064A\",\n email: \"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9\",\n url: \"\u06CC\u0648 \u0622\u0631 \u0627\u0644\",\n emoji: \"\u0627\u06CC\u0645\u0648\u062C\u064A\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A\",\n date: \"\u0646\u06D0\u067C\u0647\",\n time: \"\u0648\u062E\u062A\",\n duration: \"\u0645\u0648\u062F\u0647\",\n ipv4: \"\u062F IPv4 \u067E\u062A\u0647\",\n ipv6: \"\u062F IPv6 \u067E\u062A\u0647\",\n cidrv4: \"\u062F IPv4 \u0633\u0627\u062D\u0647\",\n cidrv6: \"\u062F IPv6 \u0633\u0627\u062D\u0647\",\n base64: \"base64-encoded \u0645\u062A\u0646\",\n base64url: \"base64url-encoded \u0645\u062A\u0646\",\n json_string: \"JSON \u0645\u062A\u0646\",\n e164: \"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647\",\n jwt: \"JWT\",\n template_literal: \"\u0648\u0631\u0648\u062F\u064A\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0639\u062F\u062F\",\n array: \"\u0627\u0631\u06D0\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${issue.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;\n }\n return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1) {\n return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${util.stringifyPrimitive(issue.values[0])} \u0648\u0627\u06CC`;\n }\n return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${util.joinValues(issue.values, \"|\")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue.origin ?? \"\u0627\u0631\u0632\u069A\u062A\"} \u0628\u0627\u06CC\u062F ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0639\u0646\u0635\u0631\u0648\u0646\u0647\"} \u0648\u0644\u0631\u064A`;\n }\n return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue.origin ?? \"\u0627\u0631\u0632\u069A\u062A\"} \u0628\u0627\u06CC\u062F ${adj}${issue.maximum.toString()} \u0648\u064A`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue.origin} \u0628\u0627\u06CC\u062F ${adj}${issue.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`;\n }\n return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue.origin} \u0628\u0627\u06CC\u062F ${adj}${issue.minimum.toString()} \u0648\u064A`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F \"${_issue.prefix}\" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`;\n }\n if (_issue.format === \"ends_with\") {\n return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F \"${_issue.suffix}\" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`;\n }\n if (_issue.format === \"includes\") {\n return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \"${_issue.includes}\" \u0648\u0644\u0631\u064A`;\n }\n if (_issue.format === \"regex\") {\n return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`;\n }\n return `${FormatDictionary[_issue.format] ?? issue.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`;\n }\n case \"not_multiple_of\":\n return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;\n case \"unrecognized_keys\":\n return `\u0646\u0627\u0633\u0645 ${issue.keys.length > 1 ? \"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647\" : \"\u06A9\u0644\u06CC\u0689\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue.origin} \u06A9\u06D0`;\n case \"invalid_union\":\n return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`;\n case \"invalid_element\":\n return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue.origin} \u06A9\u06D0`;\n default:\n return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"znak\u00F3w\", verb: \"mie\u0107\" },\n file: { unit: \"bajt\u00F3w\", verb: \"mie\u0107\" },\n array: { unit: \"element\u00F3w\", verb: \"mie\u0107\" },\n set: { unit: \"element\u00F3w\", verb: \"mie\u0107\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"wyra\u017Cenie\",\n email: \"adres email\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"data i godzina w formacie ISO\",\n date: \"data w formacie ISO\",\n time: \"godzina w formacie ISO\",\n duration: \"czas trwania ISO\",\n ipv4: \"adres IPv4\",\n ipv6: \"adres IPv6\",\n cidrv4: \"zakres IPv4\",\n cidrv6: \"zakres IPv6\",\n base64: \"ci\u0105g znak\u00F3w zakodowany w formacie base64\",\n base64url: \"ci\u0105g znak\u00F3w zakodowany w formacie base64url\",\n json_string: \"ci\u0105g znak\u00F3w w formacie JSON\",\n e164: \"liczba E.164\",\n jwt: \"JWT\",\n template_literal: \"wej\u015Bcie\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"liczba\",\n array: \"tablica\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${issue.expected}, otrzymano ${received}`;\n }\n return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${expected}, otrzymano ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${util.stringifyPrimitive(issue.values[0])}`;\n return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue.origin ?? \"warto\u015B\u0107\"} b\u0119dzie mie\u0107 ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"element\u00F3w\"}`;\n }\n return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue.origin ?? \"warto\u015B\u0107\"} b\u0119dzie wynosi\u0107 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue.origin ?? \"warto\u015B\u0107\"} b\u0119dzie mie\u0107 ${adj}${issue.minimum.toString()} ${sizing.unit ?? \"element\u00F3w\"}`;\n }\n return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue.origin ?? \"warto\u015B\u0107\"} b\u0119dzie wynosi\u0107 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Nieprawid\u0142owy ci\u0105g znak\u00F3w: musi zaczyna\u0107 si\u0119 od \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Nieprawid\u0142owy ci\u0105g znak\u00F3w: musi ko\u0144czy\u0107 si\u0119 na \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Nieprawid\u0142owy ci\u0105g znak\u00F3w: musi zawiera\u0107 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Nieprawid\u0142owy ci\u0105g znak\u00F3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`;\n return `Nieprawid\u0142ow(y/a/e) ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Nierozpoznane klucze${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Nieprawid\u0142owy klucz w ${issue.origin}`;\n case \"invalid_union\":\n return \"Nieprawid\u0142owe dane wej\u015Bciowe\";\n case \"invalid_element\":\n return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue.origin}`;\n default:\n return `Nieprawid\u0142owe dane wej\u015Bciowe`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caracteres\", verb: \"ter\" },\n file: { unit: \"bytes\", verb: \"ter\" },\n array: { unit: \"itens\", verb: \"ter\" },\n set: { unit: \"itens\", verb: \"ter\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"padr\u00E3o\",\n email: \"endere\u00E7o de e-mail\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"data e hora ISO\",\n date: \"data ISO\",\n time: \"hora ISO\",\n duration: \"dura\u00E7\u00E3o ISO\",\n ipv4: \"endere\u00E7o IPv4\",\n ipv6: \"endere\u00E7o IPv6\",\n cidrv4: \"faixa de IPv4\",\n cidrv6: \"faixa de IPv6\",\n base64: \"texto codificado em base64\",\n base64url: \"URL codificada em base64\",\n json_string: \"texto JSON\",\n e164: \"n\u00FAmero E.164\",\n jwt: \"JWT\",\n template_literal: \"entrada\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"n\u00FAmero\",\n null: \"nulo\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Tipo inv\u00E1lido: esperado instanceof ${issue.expected}, recebido ${received}`;\n }\n return `Tipo inv\u00E1lido: esperado ${expected}, recebido ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entrada inv\u00E1lida: esperado ${util.stringifyPrimitive(issue.values[0])}`;\n return `Op\u00E7\u00E3o inv\u00E1lida: esperada uma das ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Muito grande: esperado que ${issue.origin ?? \"valor\"} tivesse ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementos\"}`;\n return `Muito grande: esperado que ${issue.origin ?? \"valor\"} fosse ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Muito pequeno: esperado que ${issue.origin} tivesse ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Muito pequeno: esperado que ${issue.origin} fosse ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Texto inv\u00E1lido: deve come\u00E7ar com \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Texto inv\u00E1lido: deve terminar com \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Texto inv\u00E1lido: deve incluir \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Texto inv\u00E1lido: deve corresponder ao padr\u00E3o ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} inv\u00E1lido`;\n }\n case \"not_multiple_of\":\n return `N\u00FAmero inv\u00E1lido: deve ser m\u00FAltiplo de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Chave${issue.keys.length > 1 ? \"s\" : \"\"} desconhecida${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Chave inv\u00E1lida em ${issue.origin}`;\n case \"invalid_union\":\n return \"Entrada inv\u00E1lida\";\n case \"invalid_element\":\n return `Valor inv\u00E1lido em ${issue.origin}`;\n default:\n return `Campo inv\u00E1lido`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nfunction getRussianPlural(count, one, few, many) {\n const absCount = Math.abs(count);\n const lastDigit = absCount % 10;\n const lastTwoDigits = absCount % 100;\n if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {\n return many;\n }\n if (lastDigit === 1) {\n return one;\n }\n if (lastDigit >= 2 && lastDigit <= 4) {\n return few;\n }\n return many;\n}\nconst error = () => {\n const Sizable = {\n string: {\n unit: {\n one: \"\u0441\u0438\u043C\u0432\u043E\u043B\",\n few: \"\u0441\u0438\u043C\u0432\u043E\u043B\u0430\",\n many: \"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432\",\n },\n verb: \"\u0438\u043C\u0435\u0442\u044C\",\n },\n file: {\n unit: {\n one: \"\u0431\u0430\u0439\u0442\",\n few: \"\u0431\u0430\u0439\u0442\u0430\",\n many: \"\u0431\u0430\u0439\u0442\",\n },\n verb: \"\u0438\u043C\u0435\u0442\u044C\",\n },\n array: {\n unit: {\n one: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\",\n few: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\",\n many: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432\",\n },\n verb: \"\u0438\u043C\u0435\u0442\u044C\",\n },\n set: {\n unit: {\n one: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\",\n few: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\",\n many: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432\",\n },\n verb: \"\u0438\u043C\u0435\u0442\u044C\",\n },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0432\u0432\u043E\u0434\",\n email: \"email \u0430\u0434\u0440\u0435\u0441\",\n url: \"URL\",\n emoji: \"\u044D\u043C\u043E\u0434\u0437\u0438\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F\",\n date: \"ISO \u0434\u0430\u0442\u0430\",\n time: \"ISO \u0432\u0440\u0435\u043C\u044F\",\n duration: \"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C\",\n ipv4: \"IPv4 \u0430\u0434\u0440\u0435\u0441\",\n ipv6: \"IPv6 \u0430\u0434\u0440\u0435\u0441\",\n cidrv4: \"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\",\n cidrv6: \"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\",\n base64: \"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64\",\n base64url: \"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url\",\n json_string: \"JSON \u0441\u0442\u0440\u043E\u043A\u0430\",\n e164: \"\u043D\u043E\u043C\u0435\u0440 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0432\u0432\u043E\u0434\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0447\u0438\u0441\u043B\u043E\",\n array: \"\u043C\u0430\u0441\u0441\u0438\u0432\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${issue.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`;\n }\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const maxValue = Number(issue.maximum);\n const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);\n return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435\"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue.maximum.toString()} ${unit}`;\n }\n return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435\"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const minValue = Number(issue.minimum);\n const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);\n return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue.minimum.toString()} ${unit}`;\n }\n return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue.keys.length > 1 ? \"\u044B\u0435\" : \"\u044B\u0439\"} \u043A\u043B\u044E\u0447${issue.keys.length > 1 ? \"\u0438\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\";\n case \"invalid_element\":\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue.origin}`;\n default:\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"znakov\", verb: \"imeti\" },\n file: { unit: \"bajtov\", verb: \"imeti\" },\n array: { unit: \"elementov\", verb: \"imeti\" },\n set: { unit: \"elementov\", verb: \"imeti\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"vnos\",\n email: \"e-po\u0161tni naslov\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datum in \u010Das\",\n date: \"ISO datum\",\n time: \"ISO \u010Das\",\n duration: \"ISO trajanje\",\n ipv4: \"IPv4 naslov\",\n ipv6: \"IPv6 naslov\",\n cidrv4: \"obseg IPv4\",\n cidrv6: \"obseg IPv6\",\n base64: \"base64 kodiran niz\",\n base64url: \"base64url kodiran niz\",\n json_string: \"JSON niz\",\n e164: \"E.164 \u0161tevilka\",\n jwt: \"JWT\",\n template_literal: \"vnos\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0161tevilo\",\n array: \"tabela\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Neveljaven vnos: pri\u010Dakovano instanceof ${issue.expected}, prejeto ${received}`;\n }\n return `Neveljaven vnos: pri\u010Dakovano ${expected}, prejeto ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Neveljaven vnos: pri\u010Dakovano ${util.stringifyPrimitive(issue.values[0])}`;\n return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Preveliko: pri\u010Dakovano, da bo ${issue.origin ?? \"vrednost\"} imelo ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementov\"}`;\n return `Preveliko: pri\u010Dakovano, da bo ${issue.origin ?? \"vrednost\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Premajhno: pri\u010Dakovano, da bo ${issue.origin} imelo ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Premajhno: pri\u010Dakovano, da bo ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Neveljaven niz: mora se za\u010Deti z \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Neveljaven niz: mora se kon\u010Dati z \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Neveljaven niz: mora vsebovati \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`;\n return `Neveljaven ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Neprepoznan${issue.keys.length > 1 ? \"i klju\u010Di\" : \" klju\u010D\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Neveljaven klju\u010D v ${issue.origin}`;\n case \"invalid_union\":\n return \"Neveljaven vnos\";\n case \"invalid_element\":\n return `Neveljavna vrednost v ${issue.origin}`;\n default:\n return \"Neveljaven vnos\";\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"tecken\", verb: \"att ha\" },\n file: { unit: \"bytes\", verb: \"att ha\" },\n array: { unit: \"objekt\", verb: \"att inneh\u00E5lla\" },\n set: { unit: \"objekt\", verb: \"att inneh\u00E5lla\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"regulj\u00E4rt uttryck\",\n email: \"e-postadress\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-datum och tid\",\n date: \"ISO-datum\",\n time: \"ISO-tid\",\n duration: \"ISO-varaktighet\",\n ipv4: \"IPv4-intervall\",\n ipv6: \"IPv6-intervall\",\n cidrv4: \"IPv4-spektrum\",\n cidrv6: \"IPv6-spektrum\",\n base64: \"base64-kodad str\u00E4ng\",\n base64url: \"base64url-kodad str\u00E4ng\",\n json_string: \"JSON-str\u00E4ng\",\n e164: \"E.164-nummer\",\n jwt: \"JWT\",\n template_literal: \"mall-literal\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"antal\",\n array: \"lista\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ogiltig inmatning: f\u00F6rv\u00E4ntat instanceof ${issue.expected}, fick ${received}`;\n }\n return `Ogiltig inmatning: f\u00F6rv\u00E4ntat ${expected}, fick ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ogiltig inmatning: f\u00F6rv\u00E4ntat ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ogiltigt val: f\u00F6rv\u00E4ntade en av ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `F\u00F6r stor(t): f\u00F6rv\u00E4ntade ${issue.origin ?? \"v\u00E4rdet\"} att ha ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"element\"}`;\n }\n return `F\u00F6r stor(t): f\u00F6rv\u00E4ntat ${issue.origin ?? \"v\u00E4rdet\"} att ha ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `F\u00F6r lite(t): f\u00F6rv\u00E4ntade ${issue.origin ?? \"v\u00E4rdet\"} att ha ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `F\u00F6r lite(t): f\u00F6rv\u00E4ntade ${issue.origin ?? \"v\u00E4rdet\"} att ha ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Ogiltig str\u00E4ng: m\u00E5ste b\u00F6rja med \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Ogiltig str\u00E4ng: m\u00E5ste sluta med \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Ogiltig str\u00E4ng: m\u00E5ste inneh\u00E5lla \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Ogiltig str\u00E4ng: m\u00E5ste matcha m\u00F6nstret \"${_issue.pattern}\"`;\n return `Ogiltig(t) ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ogiltigt tal: m\u00E5ste vara en multipel av ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Ok\u00E4nda nycklar\" : \"Ok\u00E4nd nyckel\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ogiltig nyckel i ${issue.origin ?? \"v\u00E4rdet\"}`;\n case \"invalid_union\":\n return \"Ogiltig input\";\n case \"invalid_element\":\n return `Ogiltigt v\u00E4rde i ${issue.origin ?? \"v\u00E4rdet\"}`;\n default:\n return `Ogiltig input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD\", verb: \"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD\" },\n file: { unit: \"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD\", verb: \"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD\" },\n array: { unit: \"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD\", verb: \"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD\" },\n set: { unit: \"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD\", verb: \"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1\",\n email: \"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD\",\n date: \"ISO \u0BA4\u0BC7\u0BA4\u0BBF\",\n time: \"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD\",\n duration: \"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1\",\n ipv4: \"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF\",\n ipv6: \"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF\",\n cidrv4: \"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1\",\n cidrv6: \"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1\",\n base64: \"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD\",\n base64url: \"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD\",\n json_string: \"JSON \u0B9A\u0BB0\u0BAE\u0BCD\",\n e164: \"E.164 \u0B8E\u0BA3\u0BCD\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0B8E\u0BA3\u0BCD\",\n array: \"\u0B85\u0BA3\u0BBF\",\n null: \"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${issue.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`;\n }\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${util.joinValues(issue.values, \"|\")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue.origin ?? \"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD\"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n }\n return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue.origin ?? \"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1\"} ${adj}${issue.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; //\n }\n return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue.origin} ${adj}${issue.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: \"${_issue.prefix}\" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n if (_issue.format === \"ends_with\")\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: \"${_issue.suffix}\" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n if (_issue.format === \"includes\")\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: \"${_issue.includes}\" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n if (_issue.format === \"regex\")\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n case \"unrecognized_keys\":\n return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue.keys.length > 1 ? \"\u0B95\u0BB3\u0BCD\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;\n case \"invalid_union\":\n return \"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1\";\n case \"invalid_element\":\n return `${issue.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;\n default:\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\", verb: \"\u0E04\u0E27\u0E23\u0E21\u0E35\" },\n file: { unit: \"\u0E44\u0E1A\u0E15\u0E4C\", verb: \"\u0E04\u0E27\u0E23\u0E21\u0E35\" },\n array: { unit: \"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\", verb: \"\u0E04\u0E27\u0E23\u0E21\u0E35\" },\n set: { unit: \"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\", verb: \"\u0E04\u0E27\u0E23\u0E21\u0E35\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19\",\n email: \"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25\",\n url: \"URL\",\n emoji: \"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO\",\n date: \"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO\",\n time: \"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO\",\n duration: \"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO\",\n ipv4: \"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4\",\n ipv6: \"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6\",\n cidrv4: \"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4\",\n cidrv6: \"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6\",\n base64: \"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64\",\n base64url: \"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL\",\n json_string: \"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON\",\n e164: \"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)\",\n jwt: \"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT\",\n template_literal: \"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\",\n array: \"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)\",\n null: \"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;\n }\n return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19\" : \"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue.origin ?? \"\u0E04\u0E48\u0E32\"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\"}`;\n return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue.origin ?? \"\u0E04\u0E48\u0E32\"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22\" : \"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 \"${_issue.includes}\" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`;\n if (_issue.format === \"regex\")\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`;\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;\n case \"unrecognized_keys\":\n return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49\";\n case \"invalid_element\":\n return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue.origin}`;\n default:\n return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"karakter\", verb: \"olmal\u0131\" },\n file: { unit: \"bayt\", verb: \"olmal\u0131\" },\n array: { unit: \"\u00F6\u011Fe\", verb: \"olmal\u0131\" },\n set: { unit: \"\u00F6\u011Fe\", verb: \"olmal\u0131\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"girdi\",\n email: \"e-posta adresi\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO tarih ve saat\",\n date: \"ISO tarih\",\n time: \"ISO saat\",\n duration: \"ISO s\u00FCre\",\n ipv4: \"IPv4 adresi\",\n ipv6: \"IPv6 adresi\",\n cidrv4: \"IPv4 aral\u0131\u011F\u0131\",\n cidrv6: \"IPv6 aral\u0131\u011F\u0131\",\n base64: \"base64 ile \u015Fifrelenmi\u015F metin\",\n base64url: \"base64url ile \u015Fifrelenmi\u015F metin\",\n json_string: \"JSON dizesi\",\n e164: \"E.164 say\u0131s\u0131\",\n jwt: \"JWT\",\n template_literal: \"\u015Eablon dizesi\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ge\u00E7ersiz de\u011Fer: beklenen instanceof ${issue.expected}, al\u0131nan ${received}`;\n }\n return `Ge\u00E7ersiz de\u011Fer: beklenen ${expected}, al\u0131nan ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ge\u00E7ersiz de\u011Fer: beklenen ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ge\u00E7ersiz se\u00E7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u00C7ok b\u00FCy\u00FCk: beklenen ${issue.origin ?? \"de\u011Fer\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u00F6\u011Fe\"}`;\n return `\u00C7ok b\u00FCy\u00FCk: beklenen ${issue.origin ?? \"de\u011Fer\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u00C7ok k\u00FC\u00E7\u00FCk: beklenen ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n return `\u00C7ok k\u00FC\u00E7\u00FCk: beklenen ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Ge\u00E7ersiz metin: \"${_issue.prefix}\" ile ba\u015Flamal\u0131`;\n if (_issue.format === \"ends_with\")\n return `Ge\u00E7ersiz metin: \"${_issue.suffix}\" ile bitmeli`;\n if (_issue.format === \"includes\")\n return `Ge\u00E7ersiz metin: \"${_issue.includes}\" i\u00E7ermeli`;\n if (_issue.format === \"regex\")\n return `Ge\u00E7ersiz metin: ${_issue.pattern} desenine uymal\u0131`;\n return `Ge\u00E7ersiz ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ge\u00E7ersiz say\u0131: ${issue.divisor} ile tam b\u00F6l\u00FCnebilmeli`;\n case \"unrecognized_keys\":\n return `Tan\u0131nmayan anahtar${issue.keys.length > 1 ? \"lar\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} i\u00E7inde ge\u00E7ersiz anahtar`;\n case \"invalid_union\":\n return \"Ge\u00E7ersiz de\u011Fer\";\n case \"invalid_element\":\n return `${issue.origin} i\u00E7inde ge\u00E7ersiz de\u011Fer`;\n default:\n return `Ge\u00E7ersiz de\u011Fer`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432\", verb: \"\u043C\u0430\u0442\u0438\u043C\u0435\" },\n file: { unit: \"\u0431\u0430\u0439\u0442\u0456\u0432\", verb: \"\u043C\u0430\u0442\u0438\u043C\u0435\" },\n array: { unit: \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432\", verb: \"\u043C\u0430\u0442\u0438\u043C\u0435\" },\n set: { unit: \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432\", verb: \"\u043C\u0430\u0442\u0438\u043C\u0435\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456\",\n email: \"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438\",\n url: \"URL\",\n emoji: \"\u0435\u043C\u043E\u0434\u0437\u0456\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO\",\n date: \"\u0434\u0430\u0442\u0430 ISO\",\n time: \"\u0447\u0430\u0441 ISO\",\n duration: \"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO\",\n ipv4: \"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4\",\n ipv6: \"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6\",\n cidrv4: \"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4\",\n cidrv6: \"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6\",\n base64: \"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64\",\n base64url: \"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url\",\n json_string: \"\u0440\u044F\u0434\u043E\u043A JSON\",\n e164: \"\u043D\u043E\u043C\u0435\u0440 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0447\u0438\u0441\u043B\u043E\",\n array: \"\u043C\u0430\u0441\u0438\u0432\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${issue.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`;\n }\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F\"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432\"}`;\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F\"} \u0431\u0443\u0434\u0435 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue.origin} \u0431\u0443\u0434\u0435 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue.keys.length > 1 ? \"\u0456\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456\";\n case \"invalid_element\":\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue.origin}`;\n default:\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import uk from \"./uk.js\";\n/** @deprecated Use `uk` instead. */\nexport default function () {\n return uk();\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u062D\u0631\u0648\u0641\", verb: \"\u06C1\u0648\u0646\u0627\" },\n file: { unit: \"\u0628\u0627\u0626\u0679\u0633\", verb: \"\u06C1\u0648\u0646\u0627\" },\n array: { unit: \"\u0622\u0626\u0679\u0645\u0632\", verb: \"\u06C1\u0648\u0646\u0627\" },\n set: { unit: \"\u0622\u0626\u0679\u0645\u0632\", verb: \"\u06C1\u0648\u0646\u0627\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0627\u0646 \u067E\u0679\",\n email: \"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633\",\n url: \"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644\",\n emoji: \"\u0627\u06CC\u0645\u0648\u062C\u06CC\",\n uuid: \"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n uuidv4: \"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4\",\n uuidv6: \"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6\",\n nanoid: \"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n guid: \"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n cuid: \"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n cuid2: \"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2\",\n ulid: \"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC\",\n xid: \"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC\",\n ksuid: \"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n datetime: \"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645\",\n date: \"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E\",\n time: \"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A\",\n duration: \"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A\",\n ipv4: \"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633\",\n ipv6: \"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633\",\n cidrv4: \"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C\",\n cidrv6: \"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C\",\n base64: \"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF\",\n base64url: \"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF\",\n json_string: \"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF\",\n e164: \"\u0627\u06CC 164 \u0646\u0645\u0628\u0631\",\n jwt: \"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC\",\n template_literal: \"\u0627\u0646 \u067E\u0679\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0646\u0645\u0628\u0631\",\n array: \"\u0622\u0631\u06D2\",\n null: \"\u0646\u0644\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${issue.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;\n }\n return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${util.stringifyPrimitive(issue.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;\n return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${util.joinValues(issue.values, \"|\")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue.origin ?? \"\u0648\u06CC\u0644\u06CC\u0648\"} \u06A9\u06D2 ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0639\u0646\u0627\u0635\u0631\"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;\n return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue.origin ?? \"\u0648\u06CC\u0644\u06CC\u0648\"} \u06A9\u0627 ${adj}${issue.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue.origin} \u06A9\u06D2 ${adj}${issue.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;\n }\n return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue.origin} \u06A9\u0627 ${adj}${issue.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \"${_issue.prefix}\" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n }\n if (_issue.format === \"ends_with\")\n return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \"${_issue.suffix}\" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n if (_issue.format === \"includes\")\n return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \"${_issue.includes}\" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n if (_issue.format === \"regex\")\n return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n return `\u063A\u0644\u0637 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n case \"unrecognized_keys\":\n return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue.keys.length > 1 ? \"\u0632\" : \"\"}: ${util.joinValues(issue.keys, \"\u060C \")}`;\n case \"invalid_key\":\n return `${issue.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;\n case \"invalid_union\":\n return \"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679\";\n case \"invalid_element\":\n return `${issue.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;\n default:\n return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"belgi\", verb: \"bo\u2018lishi kerak\" },\n file: { unit: \"bayt\", verb: \"bo\u2018lishi kerak\" },\n array: { unit: \"element\", verb: \"bo\u2018lishi kerak\" },\n set: { unit: \"element\", verb: \"bo\u2018lishi kerak\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"kirish\",\n email: \"elektron pochta manzili\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO sana va vaqti\",\n date: \"ISO sana\",\n time: \"ISO vaqt\",\n duration: \"ISO davomiylik\",\n ipv4: \"IPv4 manzil\",\n ipv6: \"IPv6 manzil\",\n mac: \"MAC manzil\",\n cidrv4: \"IPv4 diapazon\",\n cidrv6: \"IPv6 diapazon\",\n base64: \"base64 kodlangan satr\",\n base64url: \"base64url kodlangan satr\",\n json_string: \"JSON satr\",\n e164: \"E.164 raqam\",\n jwt: \"JWT\",\n template_literal: \"kirish\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"raqam\",\n array: \"massiv\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Noto\u2018g\u2018ri kirish: kutilgan instanceof ${issue.expected}, qabul qilingan ${received}`;\n }\n return `Noto\u2018g\u2018ri kirish: kutilgan ${expected}, qabul qilingan ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Noto\u2018g\u2018ri kirish: kutilgan ${util.stringifyPrimitive(issue.values[0])}`;\n return `Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Juda katta: kutilgan ${issue.origin ?? \"qiymat\"} ${adj}${issue.maximum.toString()} ${sizing.unit} ${sizing.verb}`;\n return `Juda katta: kutilgan ${issue.origin ?? \"qiymat\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Juda kichik: kutilgan ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} ${sizing.verb}`;\n }\n return `Juda kichik: kutilgan ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Noto\u2018g\u2018ri satr: \"${_issue.prefix}\" bilan boshlanishi kerak`;\n if (_issue.format === \"ends_with\")\n return `Noto\u2018g\u2018ri satr: \"${_issue.suffix}\" bilan tugashi kerak`;\n if (_issue.format === \"includes\")\n return `Noto\u2018g\u2018ri satr: \"${_issue.includes}\" ni o\u2018z ichiga olishi kerak`;\n if (_issue.format === \"regex\")\n return `Noto\u2018g\u2018ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`;\n return `Noto\u2018g\u2018ri ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Noto\u2018g\u2018ri raqam: ${issue.divisor} ning karralisi bo\u2018lishi kerak`;\n case \"unrecognized_keys\":\n return `Noma\u2019lum kalit${issue.keys.length > 1 ? \"lar\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} dagi kalit noto\u2018g\u2018ri`;\n case \"invalid_union\":\n return \"Noto\u2018g\u2018ri kirish\";\n case \"invalid_element\":\n return `${issue.origin} da noto\u2018g\u2018ri qiymat`;\n default:\n return `Noto\u2018g\u2018ri kirish`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"k\u00FD t\u1EF1\", verb: \"c\u00F3\" },\n file: { unit: \"byte\", verb: \"c\u00F3\" },\n array: { unit: \"ph\u1EA7n t\u1EED\", verb: \"c\u00F3\" },\n set: { unit: \"ph\u1EA7n t\u1EED\", verb: \"c\u00F3\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0111\u1EA7u v\u00E0o\",\n email: \"\u0111\u1ECBa ch\u1EC9 email\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ng\u00E0y gi\u1EDD ISO\",\n date: \"ng\u00E0y ISO\",\n time: \"gi\u1EDD ISO\",\n duration: \"kho\u1EA3ng th\u1EDDi gian ISO\",\n ipv4: \"\u0111\u1ECBa ch\u1EC9 IPv4\",\n ipv6: \"\u0111\u1ECBa ch\u1EC9 IPv6\",\n cidrv4: \"d\u1EA3i IPv4\",\n cidrv6: \"d\u1EA3i IPv6\",\n base64: \"chu\u1ED7i m\u00E3 h\u00F3a base64\",\n base64url: \"chu\u1ED7i m\u00E3 h\u00F3a base64url\",\n json_string: \"chu\u1ED7i JSON\",\n e164: \"s\u1ED1 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0111\u1EA7u v\u00E0o\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"s\u1ED1\",\n array: \"m\u1EA3ng\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${issue.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`;\n }\n return `\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${util.stringifyPrimitive(issue.values[0])}`;\n return `T\u00F9y ch\u1ECDn kh\u00F4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\u00E1c gi\u00E1 tr\u1ECB ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Qu\u00E1 l\u1EDBn: mong \u0111\u1EE3i ${issue.origin ?? \"gi\u00E1 tr\u1ECB\"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"ph\u1EA7n t\u1EED\"}`;\n return `Qu\u00E1 l\u1EDBn: mong \u0111\u1EE3i ${issue.origin ?? \"gi\u00E1 tr\u1ECB\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Qu\u00E1 nh\u1ECF: mong \u0111\u1EE3i ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Qu\u00E1 nh\u1ECF: mong \u0111\u1EE3i ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Chu\u1ED7i kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Chu\u1ED7i kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\u00FAc b\u1EB1ng \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Chu\u1ED7i kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Chu\u1ED7i kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} kh\u00F4ng h\u1EE3p l\u1EC7`;\n }\n case \"not_multiple_of\":\n return `S\u1ED1 kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\u00E0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Kh\u00F3a kh\u00F4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Kh\u00F3a kh\u00F4ng h\u1EE3p l\u1EC7 trong ${issue.origin}`;\n case \"invalid_union\":\n return \"\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7\";\n case \"invalid_element\":\n return `Gi\u00E1 tr\u1ECB kh\u00F4ng h\u1EE3p l\u1EC7 trong ${issue.origin}`;\n default:\n return `\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u5B57\u7B26\", verb: \"\u5305\u542B\" },\n file: { unit: \"\u5B57\u8282\", verb: \"\u5305\u542B\" },\n array: { unit: \"\u9879\", verb: \"\u5305\u542B\" },\n set: { unit: \"\u9879\", verb: \"\u5305\u542B\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u8F93\u5165\",\n email: \"\u7535\u5B50\u90AE\u4EF6\",\n url: \"URL\",\n emoji: \"\u8868\u60C5\u7B26\u53F7\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO\u65E5\u671F\u65F6\u95F4\",\n date: \"ISO\u65E5\u671F\",\n time: \"ISO\u65F6\u95F4\",\n duration: \"ISO\u65F6\u957F\",\n ipv4: \"IPv4\u5730\u5740\",\n ipv6: \"IPv6\u5730\u5740\",\n cidrv4: \"IPv4\u7F51\u6BB5\",\n cidrv6: \"IPv6\u7F51\u6BB5\",\n base64: \"base64\u7F16\u7801\u5B57\u7B26\u4E32\",\n base64url: \"base64url\u7F16\u7801\u5B57\u7B26\u4E32\",\n json_string: \"JSON\u5B57\u7B26\u4E32\",\n e164: \"E.164\u53F7\u7801\",\n jwt: \"JWT\",\n template_literal: \"\u8F93\u5165\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u6570\u5B57\",\n array: \"\u6570\u7EC4\",\n null: \"\u7A7A\u503C(null)\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${issue.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`;\n }\n return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue.origin ?? \"\u503C\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u4E2A\u5143\u7D20\"}`;\n return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue.origin ?? \"\u503C\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 \"${_issue.prefix}\" \u5F00\u5934`;\n if (_issue.format === \"ends_with\")\n return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 \"${_issue.suffix}\" \u7ED3\u5C3E`;\n if (_issue.format === \"includes\")\n return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`;\n return `\u65E0\u6548${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue.divisor} \u7684\u500D\u6570`;\n case \"unrecognized_keys\":\n return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;\n case \"invalid_union\":\n return \"\u65E0\u6548\u8F93\u5165\";\n case \"invalid_element\":\n return `${issue.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;\n default:\n return `\u65E0\u6548\u8F93\u5165`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u5B57\u5143\", verb: \"\u64C1\u6709\" },\n file: { unit: \"\u4F4D\u5143\u7D44\", verb: \"\u64C1\u6709\" },\n array: { unit: \"\u9805\u76EE\", verb: \"\u64C1\u6709\" },\n set: { unit: \"\u9805\u76EE\", verb: \"\u64C1\u6709\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u8F38\u5165\",\n email: \"\u90F5\u4EF6\u5730\u5740\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u65E5\u671F\u6642\u9593\",\n date: \"ISO \u65E5\u671F\",\n time: \"ISO \u6642\u9593\",\n duration: \"ISO \u671F\u9593\",\n ipv4: \"IPv4 \u4F4D\u5740\",\n ipv6: \"IPv6 \u4F4D\u5740\",\n cidrv4: \"IPv4 \u7BC4\u570D\",\n cidrv6: \"IPv6 \u7BC4\u570D\",\n base64: \"base64 \u7DE8\u78BC\u5B57\u4E32\",\n base64url: \"base64url \u7DE8\u78BC\u5B57\u4E32\",\n json_string: \"JSON \u5B57\u4E32\",\n e164: \"E.164 \u6578\u503C\",\n jwt: \"JWT\",\n template_literal: \"\u8F38\u5165\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${issue.expected}\uFF0C\u4F46\u6536\u5230 ${received}`;\n }\n return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${expected}\uFF0C\u4F46\u6536\u5230 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue.origin ?? \"\u503C\"} \u61C9\u70BA ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u500B\u5143\u7D20\"}`;\n return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue.origin ?? \"\u503C\"} \u61C9\u70BA ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue.origin} \u61C9\u70BA ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue.origin} \u61C9\u70BA ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 \"${_issue.prefix}\" \u958B\u982D`;\n }\n if (_issue.format === \"ends_with\")\n return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 \"${_issue.suffix}\" \u7D50\u5C3E`;\n if (_issue.format === \"includes\")\n return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`;\n return `\u7121\u6548\u7684 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue.divisor} \u7684\u500D\u6578`;\n case \"unrecognized_keys\":\n return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue.keys.length > 1 ? \"\u5011\" : \"\"}\uFF1A${util.joinValues(issue.keys, \"\u3001\")}`;\n case \"invalid_key\":\n return `${issue.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;\n case \"invalid_union\":\n return \"\u7121\u6548\u7684\u8F38\u5165\u503C\";\n case \"invalid_element\":\n return `${issue.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;\n default:\n return `\u7121\u6548\u7684\u8F38\u5165\u503C`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u00E0mi\", verb: \"n\u00ED\" },\n file: { unit: \"bytes\", verb: \"n\u00ED\" },\n array: { unit: \"nkan\", verb: \"n\u00ED\" },\n set: { unit: \"nkan\", verb: \"n\u00ED\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u1EB9\u0300r\u1ECD \u00ECb\u00E1w\u1ECDl\u00E9\",\n email: \"\u00E0d\u00EDr\u1EB9\u0301s\u00EC \u00ECm\u1EB9\u0301l\u00EC\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u00E0k\u00F3k\u00F2 ISO\",\n date: \"\u1ECDj\u1ECD\u0301 ISO\",\n time: \"\u00E0k\u00F3k\u00F2 ISO\",\n duration: \"\u00E0k\u00F3k\u00F2 t\u00F3 p\u00E9 ISO\",\n ipv4: \"\u00E0d\u00EDr\u1EB9\u0301s\u00EC IPv4\",\n ipv6: \"\u00E0d\u00EDr\u1EB9\u0301s\u00EC IPv6\",\n cidrv4: \"\u00E0gb\u00E8gb\u00E8 IPv4\",\n cidrv6: \"\u00E0gb\u00E8gb\u00E8 IPv6\",\n base64: \"\u1ECD\u0300r\u1ECD\u0300 t\u00ED a k\u1ECD\u0301 n\u00ED base64\",\n base64url: \"\u1ECD\u0300r\u1ECD\u0300 base64url\",\n json_string: \"\u1ECD\u0300r\u1ECD\u0300 JSON\",\n e164: \"n\u1ECD\u0301mb\u00E0 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u1EB9\u0300r\u1ECD \u00ECb\u00E1w\u1ECDl\u00E9\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"n\u1ECD\u0301mb\u00E0\",\n array: \"akop\u1ECD\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e: a n\u00ED l\u00E1ti fi instanceof ${issue.expected}, \u00E0m\u1ECD\u0300 a r\u00ED ${received}`;\n }\n return `\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e: a n\u00ED l\u00E1ti fi ${expected}, \u00E0m\u1ECD\u0300 a r\u00ED ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e: a n\u00ED l\u00E1ti fi ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u00C0\u1E63\u00E0y\u00E0n a\u1E63\u00EC\u1E63e: yan \u1ECD\u0300kan l\u00E1ra ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `T\u00F3 p\u1ECD\u0300 j\u00F9: a n\u00ED l\u00E1ti j\u1EB9\u0301 p\u00E9 ${issue.origin ?? \"iye\"} ${sizing.verb} ${adj}${issue.maximum} ${sizing.unit}`;\n return `T\u00F3 p\u1ECD\u0300 j\u00F9: a n\u00ED l\u00E1ti j\u1EB9\u0301 ${adj}${issue.maximum}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `K\u00E9r\u00E9 ju: a n\u00ED l\u00E1ti j\u1EB9\u0301 p\u00E9 ${issue.origin} ${sizing.verb} ${adj}${issue.minimum} ${sizing.unit}`;\n return `K\u00E9r\u00E9 ju: a n\u00ED l\u00E1ti j\u1EB9\u0301 ${adj}${issue.minimum}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\u00FA \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\u00ED p\u1EB9\u0300l\u00FA \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\u00ED \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u00E1 \u00E0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`;\n return `A\u1E63\u00EC\u1E63e: ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `N\u1ECD\u0301mb\u00E0 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \u00E8y\u00E0 p\u00EDp\u00EDn ti ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `B\u1ECDt\u00ECn\u00EC \u00E0\u00ECm\u1ECD\u0300: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `B\u1ECDt\u00ECn\u00EC a\u1E63\u00EC\u1E63e n\u00EDn\u00FA ${issue.origin}`;\n case \"invalid_union\":\n return \"\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e\";\n case \"invalid_element\":\n return `Iye a\u1E63\u00EC\u1E63e n\u00EDn\u00FA ${issue.origin}`;\n default:\n return \"\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e\";\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "export { default as ar } from \"./ar.js\";\nexport { default as az } from \"./az.js\";\nexport { default as be } from \"./be.js\";\nexport { default as bg } from \"./bg.js\";\nexport { default as ca } from \"./ca.js\";\nexport { default as cs } from \"./cs.js\";\nexport { default as da } from \"./da.js\";\nexport { default as de } from \"./de.js\";\nexport { default as en } from \"./en.js\";\nexport { default as eo } from \"./eo.js\";\nexport { default as es } from \"./es.js\";\nexport { default as fa } from \"./fa.js\";\nexport { default as fi } from \"./fi.js\";\nexport { default as fr } from \"./fr.js\";\nexport { default as frCA } from \"./fr-CA.js\";\nexport { default as he } from \"./he.js\";\nexport { default as hu } from \"./hu.js\";\nexport { default as hy } from \"./hy.js\";\nexport { default as id } from \"./id.js\";\nexport { default as is } from \"./is.js\";\nexport { default as it } from \"./it.js\";\nexport { default as ja } from \"./ja.js\";\nexport { default as ka } from \"./ka.js\";\nexport { default as kh } from \"./kh.js\";\nexport { default as km } from \"./km.js\";\nexport { default as ko } from \"./ko.js\";\nexport { default as lt } from \"./lt.js\";\nexport { default as mk } from \"./mk.js\";\nexport { default as ms } from \"./ms.js\";\nexport { default as nl } from \"./nl.js\";\nexport { default as no } from \"./no.js\";\nexport { default as ota } from \"./ota.js\";\nexport { default as ps } from \"./ps.js\";\nexport { default as pl } from \"./pl.js\";\nexport { default as pt } from \"./pt.js\";\nexport { default as ru } from \"./ru.js\";\nexport { default as sl } from \"./sl.js\";\nexport { default as sv } from \"./sv.js\";\nexport { default as ta } from \"./ta.js\";\nexport { default as th } from \"./th.js\";\nexport { default as tr } from \"./tr.js\";\nexport { default as ua } from \"./ua.js\";\nexport { default as uk } from \"./uk.js\";\nexport { default as ur } from \"./ur.js\";\nexport { default as uz } from \"./uz.js\";\nexport { default as vi } from \"./vi.js\";\nexport { default as zhCN } from \"./zh-CN.js\";\nexport { default as zhTW } from \"./zh-TW.js\";\nexport { default as yo } from \"./yo.js\";\n", "var _a;\nexport const $output = Symbol(\"ZodOutput\");\nexport const $input = Symbol(\"ZodInput\");\nexport class $ZodRegistry {\n constructor() {\n this._map = new WeakMap();\n this._idmap = new Map();\n }\n add(schema, ..._meta) {\n const meta = _meta[0];\n this._map.set(schema, meta);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.set(meta.id, schema);\n }\n return this;\n }\n clear() {\n this._map = new WeakMap();\n this._idmap = new Map();\n return this;\n }\n remove(schema) {\n const meta = this._map.get(schema);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.delete(meta.id);\n }\n this._map.delete(schema);\n return this;\n }\n get(schema) {\n // return this._map.get(schema) as any;\n // inherit metadata\n const p = schema._zod.parent;\n if (p) {\n const pm = { ...(this.get(p) ?? {}) };\n delete pm.id; // do not inherit id\n const f = { ...pm, ...this._map.get(schema) };\n return Object.keys(f).length ? f : undefined;\n }\n return this._map.get(schema);\n }\n has(schema) {\n return this._map.has(schema);\n }\n}\n// registries\nexport function registry() {\n return new $ZodRegistry();\n}\n(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());\nexport const globalRegistry = globalThis.__zod_globalRegistry;\n", "import * as checks from \"./checks.js\";\nimport * as registries from \"./registries.js\";\nimport * as schemas from \"./schemas.js\";\nimport * as util from \"./util.js\";\n// @__NO_SIDE_EFFECTS__\nexport function _string(Class, params) {\n return new Class({\n type: \"string\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedString(Class, params) {\n return new Class({\n type: \"string\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _email(Class, params) {\n return new Class({\n type: \"string\",\n format: \"email\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _guid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"guid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v4\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v6\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv7(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v7\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _emoji(Class, params) {\n return new Class({\n type: \"string\",\n format: \"emoji\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nanoid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"nanoid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid2(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid2\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ulid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ulid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _xid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"xid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ksuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ksuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mac(Class, params) {\n return new Class({\n type: \"string\",\n format: \"mac\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _e164(Class, params) {\n return new Class({\n type: \"string\",\n format: \"e164\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _jwt(Class, params) {\n return new Class({\n type: \"string\",\n format: \"jwt\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport const TimePrecision = {\n Any: null,\n Minute: -1,\n Second: 0,\n Millisecond: 3,\n Microsecond: 6,\n};\n// @__NO_SIDE_EFFECTS__\nexport function _isoDateTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"datetime\",\n check: \"string_format\",\n offset: false,\n local: false,\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDate(Class, params) {\n return new Class({\n type: \"string\",\n format: \"date\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"time\",\n check: \"string_format\",\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDuration(Class, params) {\n return new Class({\n type: \"string\",\n format: \"duration\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _number(Class, params) {\n return new Class({\n type: \"number\",\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedNumber(Class, params) {\n return new Class({\n type: \"number\",\n coerce: true,\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"safeint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float64(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"int32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"uint32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _boolean(Class, params) {\n return new Class({\n type: \"boolean\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBoolean(Class, params) {\n return new Class({\n type: \"boolean\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _bigint(Class, params) {\n return new Class({\n type: \"bigint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBigint(Class, params) {\n return new Class({\n type: \"bigint\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"int64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"uint64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _symbol(Class, params) {\n return new Class({\n type: \"symbol\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _undefined(Class, params) {\n return new Class({\n type: \"undefined\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _null(Class, params) {\n return new Class({\n type: \"null\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _any(Class) {\n return new Class({\n type: \"any\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _unknown(Class) {\n return new Class({\n type: \"unknown\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _never(Class, params) {\n return new Class({\n type: \"never\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _void(Class, params) {\n return new Class({\n type: \"void\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _date(Class, params) {\n return new Class({\n type: \"date\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedDate(Class, params) {\n return new Class({\n type: \"date\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nan(Class, params) {\n return new Class({\n type: \"nan\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lt(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lte(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.lte()` instead. */\n_lte as _max, };\n// @__NO_SIDE_EFFECTS__\nexport function _gt(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _gte(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.gte()` instead. */\n_gte as _min, };\n// @__NO_SIDE_EFFECTS__\nexport function _positive(params) {\n return _gt(0, params);\n}\n// negative\n// @__NO_SIDE_EFFECTS__\nexport function _negative(params) {\n return _lt(0, params);\n}\n// nonpositive\n// @__NO_SIDE_EFFECTS__\nexport function _nonpositive(params) {\n return _lte(0, params);\n}\n// nonnegative\n// @__NO_SIDE_EFFECTS__\nexport function _nonnegative(params) {\n return _gte(0, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function _multipleOf(value, params) {\n return new checks.$ZodCheckMultipleOf({\n check: \"multiple_of\",\n ...util.normalizeParams(params),\n value,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxSize(maximum, params) {\n return new checks.$ZodCheckMaxSize({\n check: \"max_size\",\n ...util.normalizeParams(params),\n maximum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minSize(minimum, params) {\n return new checks.$ZodCheckMinSize({\n check: \"min_size\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _size(size, params) {\n return new checks.$ZodCheckSizeEquals({\n check: \"size_equals\",\n ...util.normalizeParams(params),\n size,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxLength(maximum, params) {\n const ch = new checks.$ZodCheckMaxLength({\n check: \"max_length\",\n ...util.normalizeParams(params),\n maximum,\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minLength(minimum, params) {\n return new checks.$ZodCheckMinLength({\n check: \"min_length\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _length(length, params) {\n return new checks.$ZodCheckLengthEquals({\n check: \"length_equals\",\n ...util.normalizeParams(params),\n length,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _regex(pattern, params) {\n return new checks.$ZodCheckRegex({\n check: \"string_format\",\n format: \"regex\",\n ...util.normalizeParams(params),\n pattern,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lowercase(params) {\n return new checks.$ZodCheckLowerCase({\n check: \"string_format\",\n format: \"lowercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uppercase(params) {\n return new checks.$ZodCheckUpperCase({\n check: \"string_format\",\n format: \"uppercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _includes(includes, params) {\n return new checks.$ZodCheckIncludes({\n check: \"string_format\",\n format: \"includes\",\n ...util.normalizeParams(params),\n includes,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _startsWith(prefix, params) {\n return new checks.$ZodCheckStartsWith({\n check: \"string_format\",\n format: \"starts_with\",\n ...util.normalizeParams(params),\n prefix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _endsWith(suffix, params) {\n return new checks.$ZodCheckEndsWith({\n check: \"string_format\",\n format: \"ends_with\",\n ...util.normalizeParams(params),\n suffix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _property(property, schema, params) {\n return new checks.$ZodCheckProperty({\n check: \"property\",\n property,\n schema,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mime(types, params) {\n return new checks.$ZodCheckMimeType({\n check: \"mime_type\",\n mime: types,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _overwrite(tx) {\n return new checks.$ZodCheckOverwrite({\n check: \"overwrite\",\n tx,\n });\n}\n// normalize\n// @__NO_SIDE_EFFECTS__\nexport function _normalize(form) {\n return _overwrite((input) => input.normalize(form));\n}\n// trim\n// @__NO_SIDE_EFFECTS__\nexport function _trim() {\n return _overwrite((input) => input.trim());\n}\n// toLowerCase\n// @__NO_SIDE_EFFECTS__\nexport function _toLowerCase() {\n return _overwrite((input) => input.toLowerCase());\n}\n// toUpperCase\n// @__NO_SIDE_EFFECTS__\nexport function _toUpperCase() {\n return _overwrite((input) => input.toUpperCase());\n}\n// slugify\n// @__NO_SIDE_EFFECTS__\nexport function _slugify() {\n return _overwrite((input) => util.slugify(input));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _array(Class, element, params) {\n return new Class({\n type: \"array\",\n element,\n // get element() {\n // return element;\n // },\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _union(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n ...util.normalizeParams(params),\n });\n}\nexport function _xor(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _discriminatedUnion(Class, discriminator, options, params) {\n return new Class({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _intersection(Class, left, right) {\n return new Class({\n type: \"intersection\",\n left,\n right,\n });\n}\n// export function _tuple(\n// Class: util.SchemaClass,\n// items: [],\n// params?: string | $ZodTupleParams\n// ): schemas.$ZodTuple<[], null>;\n// @__NO_SIDE_EFFECTS__\nexport function _tuple(Class, items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof schemas.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new Class({\n type: \"tuple\",\n items,\n rest,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _record(Class, keyType, valueType, params) {\n return new Class({\n type: \"record\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _map(Class, keyType, valueType, params) {\n return new Class({\n type: \"map\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _set(Class, valueType, params) {\n return new Class({\n type: \"set\",\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _enum(Class, values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n // if (Array.isArray(values)) {\n // for (const value of values) {\n // entries[value] = value;\n // }\n // } else {\n // Object.assign(entries, values);\n // }\n // const entries: util.EnumLike = {};\n // for (const val of values) {\n // entries[val] = val;\n // }\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function _nativeEnum(Class, entries, params) {\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _literal(Class, value, params) {\n return new Class({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _file(Class, params) {\n return new Class({\n type: \"file\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _transform(Class, fn) {\n return new Class({\n type: \"transform\",\n transform: fn,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _optional(Class, innerType) {\n return new Class({\n type: \"optional\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nullable(Class, innerType) {\n return new Class({\n type: \"nullable\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _default(Class, innerType, defaultValue) {\n return new Class({\n type: \"default\",\n innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nonoptional(Class, innerType, params) {\n return new Class({\n type: \"nonoptional\",\n innerType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _success(Class, innerType) {\n return new Class({\n type: \"success\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _catch(Class, innerType, catchValue) {\n return new Class({\n type: \"catch\",\n innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _pipe(Class, in_, out) {\n return new Class({\n type: \"pipe\",\n in: in_,\n out,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _readonly(Class, innerType) {\n return new Class({\n type: \"readonly\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _templateLiteral(Class, parts, params) {\n return new Class({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lazy(Class, getter) {\n return new Class({\n type: \"lazy\",\n getter,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _promise(Class, innerType) {\n return new Class({\n type: \"promise\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _custom(Class, fn, _params) {\n const norm = util.normalizeParams(_params);\n norm.abort ?? (norm.abort = true); // default to abort:false\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...norm,\n });\n return schema;\n}\n// same as _custom but defaults to abort:false\n// @__NO_SIDE_EFFECTS__\nexport function _refine(Class, fn, _params) {\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...util.normalizeParams(_params),\n });\n return schema;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _superRefine(fn) {\n const ch = _check((payload) => {\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, ch._zod.def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n _issue.input ?? (_issue.input = payload.value);\n _issue.inst ?? (_issue.inst = ch);\n _issue.continue ?? (_issue.continue = !ch._zod.def.abort); // abort is always undefined, so this is always true...\n payload.issues.push(util.issue(_issue));\n }\n };\n return fn(payload.value, payload);\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _check(fn, params) {\n const ch = new checks.$ZodCheck({\n check: \"custom\",\n ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function describe(description) {\n const ch = new checks.$ZodCheck({ check: \"describe\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, description });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function meta(metadata) {\n const ch = new checks.$ZodCheck({ check: \"meta\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, ...metadata });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringbool(Classes, _params) {\n const params = util.normalizeParams(_params);\n let truthyArray = params.truthy ?? [\"true\", \"1\", \"yes\", \"on\", \"y\", \"enabled\"];\n let falsyArray = params.falsy ?? [\"false\", \"0\", \"no\", \"off\", \"n\", \"disabled\"];\n if (params.case !== \"sensitive\") {\n truthyArray = truthyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n falsyArray = falsyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n }\n const truthySet = new Set(truthyArray);\n const falsySet = new Set(falsyArray);\n const _Codec = Classes.Codec ?? schemas.$ZodCodec;\n const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;\n const _String = Classes.String ?? schemas.$ZodString;\n const stringSchema = new _String({ type: \"string\", error: params.error });\n const booleanSchema = new _Boolean({ type: \"boolean\", error: params.error });\n const codec = new _Codec({\n type: \"pipe\",\n in: stringSchema,\n out: booleanSchema,\n transform: ((input, payload) => {\n let data = input;\n if (params.case !== \"sensitive\")\n data = data.toLowerCase();\n if (truthySet.has(data)) {\n return true;\n }\n else if (falsySet.has(data)) {\n return false;\n }\n else {\n payload.issues.push({\n code: \"invalid_value\",\n expected: \"stringbool\",\n values: [...truthySet, ...falsySet],\n input: payload.value,\n inst: codec,\n continue: false,\n });\n return {};\n }\n }),\n reverseTransform: ((input, _payload) => {\n if (input === true) {\n return truthyArray[0] || \"true\";\n }\n else {\n return falsyArray[0] || \"false\";\n }\n }),\n error: params.error,\n });\n return codec;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringFormat(Class, format, fnOrRegex, _params = {}) {\n const params = util.normalizeParams(_params);\n const def = {\n ...util.normalizeParams(_params),\n check: \"string_format\",\n type: \"string\",\n format,\n fn: typeof fnOrRegex === \"function\" ? fnOrRegex : (val) => fnOrRegex.test(val),\n ...params,\n };\n if (fnOrRegex instanceof RegExp) {\n def.pattern = fnOrRegex;\n }\n const inst = new Class(def);\n return inst;\n}\n", "import { globalRegistry } from \"./registries.js\";\n// function initializeContext(inputs: JSONSchemaGeneratorParams): ToJSONSchemaContext {\n// return {\n// processor: inputs.processor,\n// metadataRegistry: inputs.metadata ?? globalRegistry,\n// target: inputs.target ?? \"draft-2020-12\",\n// unrepresentable: inputs.unrepresentable ?? \"throw\",\n// };\n// }\nexport function initializeContext(params) {\n // Normalize target: convert old non-hyphenated versions to hyphenated versions\n let target = params?.target ?? \"draft-2020-12\";\n if (target === \"draft-4\")\n target = \"draft-04\";\n if (target === \"draft-7\")\n target = \"draft-07\";\n return {\n processors: params.processors ?? {},\n metadataRegistry: params?.metadata ?? globalRegistry,\n target,\n unrepresentable: params?.unrepresentable ?? \"throw\",\n override: params?.override ?? (() => { }),\n io: params?.io ?? \"output\",\n counter: 0,\n seen: new Map(),\n cycles: params?.cycles ?? \"ref\",\n reused: params?.reused ?? \"inline\",\n external: params?.external ?? undefined,\n };\n}\nexport function process(schema, ctx, _params = { path: [], schemaPath: [] }) {\n var _a;\n const def = schema._zod.def;\n // check for schema in seens\n const seen = ctx.seen.get(schema);\n if (seen) {\n seen.count++;\n // check if cycle\n const isCycle = _params.schemaPath.includes(schema);\n if (isCycle) {\n seen.cycle = _params.path;\n }\n return seen.schema;\n }\n // initialize\n const result = { schema: {}, count: 1, cycle: undefined, path: _params.path };\n ctx.seen.set(schema, result);\n // custom method overrides default behavior\n const overrideSchema = schema._zod.toJSONSchema?.();\n if (overrideSchema) {\n result.schema = overrideSchema;\n }\n else {\n const params = {\n ..._params,\n schemaPath: [..._params.schemaPath, schema],\n path: _params.path,\n };\n if (schema._zod.processJSONSchema) {\n schema._zod.processJSONSchema(ctx, result.schema, params);\n }\n else {\n const _json = result.schema;\n const processor = ctx.processors[def.type];\n if (!processor) {\n throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);\n }\n processor(schema, ctx, _json, params);\n }\n const parent = schema._zod.parent;\n if (parent) {\n // Also set ref if processor didn't (for inheritance)\n if (!result.ref)\n result.ref = parent;\n process(parent, ctx, params);\n ctx.seen.get(parent).isParent = true;\n }\n }\n // metadata\n const meta = ctx.metadataRegistry.get(schema);\n if (meta)\n Object.assign(result.schema, meta);\n if (ctx.io === \"input\" && isTransforming(schema)) {\n // examples/defaults only apply to output type of pipe\n delete result.schema.examples;\n delete result.schema.default;\n }\n // set prefault as default\n if (ctx.io === \"input\" && result.schema._prefault)\n (_a = result.schema).default ?? (_a.default = result.schema._prefault);\n delete result.schema._prefault;\n // pulling fresh from ctx.seen in case it was overwritten\n const _result = ctx.seen.get(schema);\n return _result.schema;\n}\nexport function extractDefs(ctx, schema\n// params: EmitParams\n) {\n // iterate over seen map;\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // Track ids to detect duplicates across different schemas\n const idToSchema = new Map();\n for (const entry of ctx.seen.entries()) {\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n const existing = idToSchema.get(id);\n if (existing && existing !== entry[0]) {\n throw new Error(`Duplicate schema id \"${id}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);\n }\n idToSchema.set(id, entry[0]);\n }\n }\n // returns a ref to the schema\n // defId will be empty if the ref points to an external schema (or #)\n const makeURI = (entry) => {\n // comparing the seen objects because sometimes\n // multiple schemas map to the same seen object.\n // e.g. lazy\n // external is configured\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (ctx.external) {\n const externalId = ctx.external.registry.get(entry[0])?.id; // ?? \"__shared\";// `__schema${ctx.counter++}`;\n // check if schema is in the external registry\n const uriGenerator = ctx.external.uri ?? ((id) => id);\n if (externalId) {\n return { ref: uriGenerator(externalId) };\n }\n // otherwise, add to __shared\n const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;\n entry[1].defId = id; // set defId so it will be reused if needed\n return { defId: id, ref: `${uriGenerator(\"__shared\")}#/${defsSegment}/${id}` };\n }\n if (entry[1] === root) {\n return { ref: \"#\" };\n }\n // self-contained schema\n const uriPrefix = `#`;\n const defUriPrefix = `${uriPrefix}/${defsSegment}/`;\n const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;\n return { defId, ref: defUriPrefix + defId };\n };\n // stored cached version in `def` property\n // remove all properties, set $ref\n const extractToDef = (entry) => {\n // if the schema is already a reference, do not extract it\n if (entry[1].schema.$ref) {\n return;\n }\n const seen = entry[1];\n const { ref, defId } = makeURI(entry);\n seen.def = { ...seen.schema };\n // defId won't be set if the schema is a reference to an external schema\n // or if the schema is the root schema\n if (defId)\n seen.defId = defId;\n // wipe away all properties except $ref\n const schema = seen.schema;\n for (const key in schema) {\n delete schema[key];\n }\n schema.$ref = ref;\n };\n // throw on cycles\n // break cycles\n if (ctx.cycles === \"throw\") {\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.cycle) {\n throw new Error(\"Cycle detected: \" +\n `#/${seen.cycle?.join(\"/\")}/` +\n '\\n\\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.');\n }\n }\n }\n // extract schemas into $defs\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n // convert root schema to # $ref\n if (schema === entry[0]) {\n extractToDef(entry); // this has special handling for the root schema\n continue;\n }\n // extract schemas that are in the external registry\n if (ctx.external) {\n const ext = ctx.external.registry.get(entry[0])?.id;\n if (schema !== entry[0] && ext) {\n extractToDef(entry);\n continue;\n }\n }\n // extract schemas with `id` meta\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n extractToDef(entry);\n continue;\n }\n // break cycles\n if (seen.cycle) {\n // any\n extractToDef(entry);\n continue;\n }\n // extract reused schemas\n if (seen.count > 1) {\n if (ctx.reused === \"ref\") {\n extractToDef(entry);\n // biome-ignore lint:\n continue;\n }\n }\n }\n}\nexport function finalize(ctx, schema) {\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // flatten refs - inherit properties from parent schemas\n const flattenRef = (zodSchema) => {\n const seen = ctx.seen.get(zodSchema);\n // already processed\n if (seen.ref === null)\n return;\n const schema = seen.def ?? seen.schema;\n const _cached = { ...schema };\n const ref = seen.ref;\n seen.ref = null; // prevent infinite recursion\n if (ref) {\n flattenRef(ref);\n const refSeen = ctx.seen.get(ref);\n const refSchema = refSeen.schema;\n // merge referenced schema into current\n if (refSchema.$ref && (ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\")) {\n // older drafts can't combine $ref with other properties\n schema.allOf = schema.allOf ?? [];\n schema.allOf.push(refSchema);\n }\n else {\n Object.assign(schema, refSchema);\n }\n // restore child's own properties (child wins)\n Object.assign(schema, _cached);\n const isParentRef = zodSchema._zod.parent === ref;\n // For parent chain, child is a refinement - remove parent-only properties\n if (isParentRef) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (!(key in _cached)) {\n delete schema[key];\n }\n }\n }\n // When ref was extracted to $defs, remove properties that match the definition\n if (refSchema.$ref && refSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n // If parent was extracted (has $ref), propagate $ref to this schema\n // This handles cases like: readonly().meta({id}).describe()\n // where processor sets ref to innerType but parent should be referenced\n const parent = zodSchema._zod.parent;\n if (parent && parent !== ref) {\n // Ensure parent is processed first so its def has inherited properties\n flattenRef(parent);\n const parentSeen = ctx.seen.get(parent);\n if (parentSeen?.schema.$ref) {\n schema.$ref = parentSeen.schema.$ref;\n // De-duplicate with parent's definition\n if (parentSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n }\n // execute overrides\n ctx.override({\n zodSchema: zodSchema,\n jsonSchema: schema,\n path: seen.path ?? [],\n });\n };\n for (const entry of [...ctx.seen.entries()].reverse()) {\n flattenRef(entry[0]);\n }\n const result = {};\n if (ctx.target === \"draft-2020-12\") {\n result.$schema = \"https://json-schema.org/draft/2020-12/schema\";\n }\n else if (ctx.target === \"draft-07\") {\n result.$schema = \"http://json-schema.org/draft-07/schema#\";\n }\n else if (ctx.target === \"draft-04\") {\n result.$schema = \"http://json-schema.org/draft-04/schema#\";\n }\n else if (ctx.target === \"openapi-3.0\") {\n // OpenAPI 3.0 schema objects should not include a $schema property\n }\n else {\n // Arbitrary string values are allowed but won't have a $schema property set\n }\n if (ctx.external?.uri) {\n const id = ctx.external.registry.get(schema)?.id;\n if (!id)\n throw new Error(\"Schema is missing an `id` property\");\n result.$id = ctx.external.uri(id);\n }\n Object.assign(result, root.def ?? root.schema);\n // build defs object\n const defs = ctx.external?.defs ?? {};\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.def && seen.defId) {\n defs[seen.defId] = seen.def;\n }\n }\n // set definitions in result\n if (ctx.external) {\n }\n else {\n if (Object.keys(defs).length > 0) {\n if (ctx.target === \"draft-2020-12\") {\n result.$defs = defs;\n }\n else {\n result.definitions = defs;\n }\n }\n }\n try {\n // this \"finalizes\" this schema and ensures all cycles are removed\n // each call to finalize() is functionally independent\n // though the seen map is shared\n const finalized = JSON.parse(JSON.stringify(result));\n Object.defineProperty(finalized, \"~standard\", {\n value: {\n ...schema[\"~standard\"],\n jsonSchema: {\n input: createStandardJSONSchemaMethod(schema, \"input\", ctx.processors),\n output: createStandardJSONSchemaMethod(schema, \"output\", ctx.processors),\n },\n },\n enumerable: false,\n writable: false,\n });\n return finalized;\n }\n catch (_err) {\n throw new Error(\"Error converting schema to JSON.\");\n }\n}\nfunction isTransforming(_schema, _ctx) {\n const ctx = _ctx ?? { seen: new Set() };\n if (ctx.seen.has(_schema))\n return false;\n ctx.seen.add(_schema);\n const def = _schema._zod.def;\n if (def.type === \"transform\")\n return true;\n if (def.type === \"array\")\n return isTransforming(def.element, ctx);\n if (def.type === \"set\")\n return isTransforming(def.valueType, ctx);\n if (def.type === \"lazy\")\n return isTransforming(def.getter(), ctx);\n if (def.type === \"promise\" ||\n def.type === \"optional\" ||\n def.type === \"nonoptional\" ||\n def.type === \"nullable\" ||\n def.type === \"readonly\" ||\n def.type === \"default\" ||\n def.type === \"prefault\") {\n return isTransforming(def.innerType, ctx);\n }\n if (def.type === \"intersection\") {\n return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);\n }\n if (def.type === \"record\" || def.type === \"map\") {\n return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);\n }\n if (def.type === \"pipe\") {\n return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);\n }\n if (def.type === \"object\") {\n for (const key in def.shape) {\n if (isTransforming(def.shape[key], ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"union\") {\n for (const option of def.options) {\n if (isTransforming(option, ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"tuple\") {\n for (const item of def.items) {\n if (isTransforming(item, ctx))\n return true;\n }\n if (def.rest && isTransforming(def.rest, ctx))\n return true;\n return false;\n }\n return false;\n}\n/**\n * Creates a toJSONSchema method for a schema instance.\n * This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.\n */\nexport const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {\n const ctx = initializeContext({ ...params, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\nexport const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {\n const { libraryOptions, target } = params ?? {};\n const ctx = initializeContext({ ...(libraryOptions ?? {}), target, io, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\n", "import { extractDefs, finalize, initializeContext, process, } from \"./to-json-schema.js\";\nimport { getEnumValues } from \"./util.js\";\nconst formatMap = {\n guid: \"uuid\",\n url: \"uri\",\n datetime: \"date-time\",\n json_string: \"json-string\",\n regex: \"\", // do not set\n};\n// ==================== SIMPLE TYPE PROCESSORS ====================\nexport const stringProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n json.type = \"string\";\n const { minimum, maximum, format, patterns, contentEncoding } = schema._zod\n .bag;\n if (typeof minimum === \"number\")\n json.minLength = minimum;\n if (typeof maximum === \"number\")\n json.maxLength = maximum;\n // custom pattern overrides format\n if (format) {\n json.format = formatMap[format] ?? format;\n if (json.format === \"\")\n delete json.format; // empty format is not valid\n // JSON Schema format: \"time\" requires a full time with offset or Z\n // z.iso.time() does not include timezone information, so format: \"time\" should never be used\n if (format === \"time\") {\n delete json.format;\n }\n }\n if (contentEncoding)\n json.contentEncoding = contentEncoding;\n if (patterns && patterns.size > 0) {\n const regexes = [...patterns];\n if (regexes.length === 1)\n json.pattern = regexes[0].source;\n else if (regexes.length > 1) {\n json.allOf = [\n ...regexes.map((regex) => ({\n ...(ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\"\n ? { type: \"string\" }\n : {}),\n pattern: regex.source,\n })),\n ];\n }\n }\n};\nexport const numberProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;\n if (typeof format === \"string\" && format.includes(\"int\"))\n json.type = \"integer\";\n else\n json.type = \"number\";\n if (typeof exclusiveMinimum === \"number\") {\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.minimum = exclusiveMinimum;\n json.exclusiveMinimum = true;\n }\n else {\n json.exclusiveMinimum = exclusiveMinimum;\n }\n }\n if (typeof minimum === \"number\") {\n json.minimum = minimum;\n if (typeof exclusiveMinimum === \"number\" && ctx.target !== \"draft-04\") {\n if (exclusiveMinimum >= minimum)\n delete json.minimum;\n else\n delete json.exclusiveMinimum;\n }\n }\n if (typeof exclusiveMaximum === \"number\") {\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.maximum = exclusiveMaximum;\n json.exclusiveMaximum = true;\n }\n else {\n json.exclusiveMaximum = exclusiveMaximum;\n }\n }\n if (typeof maximum === \"number\") {\n json.maximum = maximum;\n if (typeof exclusiveMaximum === \"number\" && ctx.target !== \"draft-04\") {\n if (exclusiveMaximum <= maximum)\n delete json.maximum;\n else\n delete json.exclusiveMaximum;\n }\n }\n if (typeof multipleOf === \"number\")\n json.multipleOf = multipleOf;\n};\nexport const booleanProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const bigintProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"BigInt cannot be represented in JSON Schema\");\n }\n};\nexport const symbolProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Symbols cannot be represented in JSON Schema\");\n }\n};\nexport const nullProcessor = (_schema, ctx, json, _params) => {\n if (ctx.target === \"openapi-3.0\") {\n json.type = \"string\";\n json.nullable = true;\n json.enum = [null];\n }\n else {\n json.type = \"null\";\n }\n};\nexport const undefinedProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Undefined cannot be represented in JSON Schema\");\n }\n};\nexport const voidProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Void cannot be represented in JSON Schema\");\n }\n};\nexport const neverProcessor = (_schema, _ctx, json, _params) => {\n json.not = {};\n};\nexport const anyProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const unknownProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const dateProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Date cannot be represented in JSON Schema\");\n }\n};\nexport const enumProcessor = (schema, _ctx, json, _params) => {\n const def = schema._zod.def;\n const values = getEnumValues(def.entries);\n // Number enums can have both string and number values\n if (values.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (values.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n json.enum = values;\n};\nexport const literalProcessor = (schema, ctx, json, _params) => {\n const def = schema._zod.def;\n const vals = [];\n for (const val of def.values) {\n if (val === undefined) {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Literal `undefined` cannot be represented in JSON Schema\");\n }\n else {\n // do not add to vals\n }\n }\n else if (typeof val === \"bigint\") {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"BigInt literals cannot be represented in JSON Schema\");\n }\n else {\n vals.push(Number(val));\n }\n }\n else {\n vals.push(val);\n }\n }\n if (vals.length === 0) {\n // do nothing (an undefined literal was stripped)\n }\n else if (vals.length === 1) {\n const val = vals[0];\n json.type = val === null ? \"null\" : typeof val;\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.enum = [val];\n }\n else {\n json.const = val;\n }\n }\n else {\n if (vals.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (vals.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n if (vals.every((v) => typeof v === \"boolean\"))\n json.type = \"boolean\";\n if (vals.every((v) => v === null))\n json.type = \"null\";\n json.enum = vals;\n }\n};\nexport const nanProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"NaN cannot be represented in JSON Schema\");\n }\n};\nexport const templateLiteralProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const pattern = schema._zod.pattern;\n if (!pattern)\n throw new Error(\"Pattern not found in template literal\");\n _json.type = \"string\";\n _json.pattern = pattern.source;\n};\nexport const fileProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const file = {\n type: \"string\",\n format: \"binary\",\n contentEncoding: \"binary\",\n };\n const { minimum, maximum, mime } = schema._zod.bag;\n if (minimum !== undefined)\n file.minLength = minimum;\n if (maximum !== undefined)\n file.maxLength = maximum;\n if (mime) {\n if (mime.length === 1) {\n file.contentMediaType = mime[0];\n Object.assign(_json, file);\n }\n else {\n Object.assign(_json, file); // shared props at root\n _json.anyOf = mime.map((m) => ({ contentMediaType: m })); // only contentMediaType differs\n }\n }\n else {\n Object.assign(_json, file);\n }\n};\nexport const successProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const customProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Custom types cannot be represented in JSON Schema\");\n }\n};\nexport const functionProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Function types cannot be represented in JSON Schema\");\n }\n};\nexport const transformProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Transforms cannot be represented in JSON Schema\");\n }\n};\nexport const mapProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Map cannot be represented in JSON Schema\");\n }\n};\nexport const setProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Set cannot be represented in JSON Schema\");\n }\n};\n// ==================== COMPOSITE TYPE PROCESSORS ====================\nexport const arrayProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n json.type = \"array\";\n json.items = process(def.element, ctx, { ...params, path: [...params.path, \"items\"] });\n};\nexport const objectProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n json.properties = {};\n const shape = def.shape;\n for (const key in shape) {\n json.properties[key] = process(shape[key], ctx, {\n ...params,\n path: [...params.path, \"properties\", key],\n });\n }\n // required keys\n const allKeys = new Set(Object.keys(shape));\n const requiredKeys = new Set([...allKeys].filter((key) => {\n const v = def.shape[key]._zod;\n if (ctx.io === \"input\") {\n return v.optin === undefined;\n }\n else {\n return v.optout === undefined;\n }\n }));\n if (requiredKeys.size > 0) {\n json.required = Array.from(requiredKeys);\n }\n // catchall\n if (def.catchall?._zod.def.type === \"never\") {\n // strict\n json.additionalProperties = false;\n }\n else if (!def.catchall) {\n // regular\n if (ctx.io === \"output\")\n json.additionalProperties = false;\n }\n else if (def.catchall) {\n json.additionalProperties = process(def.catchall, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n};\nexport const unionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n // Exclusive unions (inclusive === false) use oneOf (exactly one match) instead of anyOf (one or more matches)\n // This includes both z.xor() and discriminated unions\n const isExclusive = def.inclusive === false;\n const options = def.options.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, isExclusive ? \"oneOf\" : \"anyOf\", i],\n }));\n if (isExclusive) {\n json.oneOf = options;\n }\n else {\n json.anyOf = options;\n }\n};\nexport const intersectionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const a = process(def.left, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 0],\n });\n const b = process(def.right, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 1],\n });\n const isSimpleIntersection = (val) => \"allOf\" in val && Object.keys(val).length === 1;\n const allOf = [\n ...(isSimpleIntersection(a) ? a.allOf : [a]),\n ...(isSimpleIntersection(b) ? b.allOf : [b]),\n ];\n json.allOf = allOf;\n};\nexport const tupleProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"array\";\n const prefixPath = ctx.target === \"draft-2020-12\" ? \"prefixItems\" : \"items\";\n const restPath = ctx.target === \"draft-2020-12\" ? \"items\" : ctx.target === \"openapi-3.0\" ? \"items\" : \"additionalItems\";\n const prefixItems = def.items.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, prefixPath, i],\n }));\n const rest = def.rest\n ? process(def.rest, ctx, {\n ...params,\n path: [...params.path, restPath, ...(ctx.target === \"openapi-3.0\" ? [def.items.length] : [])],\n })\n : null;\n if (ctx.target === \"draft-2020-12\") {\n json.prefixItems = prefixItems;\n if (rest) {\n json.items = rest;\n }\n }\n else if (ctx.target === \"openapi-3.0\") {\n json.items = {\n anyOf: prefixItems,\n };\n if (rest) {\n json.items.anyOf.push(rest);\n }\n json.minItems = prefixItems.length;\n if (!rest) {\n json.maxItems = prefixItems.length;\n }\n }\n else {\n json.items = prefixItems;\n if (rest) {\n json.additionalItems = rest;\n }\n }\n // length\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n};\nexport const recordProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n // For looseRecord with regex patterns, use patternProperties\n // This correctly represents \"only validate keys matching the pattern\" semantics\n // and composes well with allOf (intersections)\n const keyType = def.keyType;\n const keyBag = keyType._zod.bag;\n const patterns = keyBag?.patterns;\n if (def.mode === \"loose\" && patterns && patterns.size > 0) {\n // Use patternProperties for looseRecord with regex patterns\n const valueSchema = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"patternProperties\", \"*\"],\n });\n json.patternProperties = {};\n for (const pattern of patterns) {\n json.patternProperties[pattern.source] = valueSchema;\n }\n }\n else {\n // Default behavior: use propertyNames + additionalProperties\n if (ctx.target === \"draft-07\" || ctx.target === \"draft-2020-12\") {\n json.propertyNames = process(def.keyType, ctx, {\n ...params,\n path: [...params.path, \"propertyNames\"],\n });\n }\n json.additionalProperties = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n // Add required for keys with discrete values (enum, literal, etc.)\n const keyValues = keyType._zod.values;\n if (keyValues) {\n const validKeyValues = [...keyValues].filter((v) => typeof v === \"string\" || typeof v === \"number\");\n if (validKeyValues.length > 0) {\n json.required = validKeyValues;\n }\n }\n};\nexport const nullableProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const inner = process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n if (ctx.target === \"openapi-3.0\") {\n seen.ref = def.innerType;\n json.nullable = true;\n }\n else {\n json.anyOf = [inner, { type: \"null\" }];\n }\n};\nexport const nonoptionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const defaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.default = JSON.parse(JSON.stringify(def.defaultValue));\n};\nexport const prefaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n if (ctx.io === \"input\")\n json._prefault = JSON.parse(JSON.stringify(def.defaultValue));\n};\nexport const catchProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n let catchValue;\n try {\n catchValue = def.catchValue(undefined);\n }\n catch {\n throw new Error(\"Dynamic catch values are not supported in JSON Schema\");\n }\n json.default = catchValue;\n};\nexport const pipeProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n const innerType = ctx.io === \"input\" ? (def.in._zod.def.type === \"transform\" ? def.out : def.in) : def.out;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\nexport const readonlyProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.readOnly = true;\n};\nexport const promiseProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const optionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const lazyProcessor = (schema, ctx, _json, params) => {\n const innerType = schema._zod.innerType;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\n// ==================== ALL PROCESSORS ====================\nexport const allProcessors = {\n string: stringProcessor,\n number: numberProcessor,\n boolean: booleanProcessor,\n bigint: bigintProcessor,\n symbol: symbolProcessor,\n null: nullProcessor,\n undefined: undefinedProcessor,\n void: voidProcessor,\n never: neverProcessor,\n any: anyProcessor,\n unknown: unknownProcessor,\n date: dateProcessor,\n enum: enumProcessor,\n literal: literalProcessor,\n nan: nanProcessor,\n template_literal: templateLiteralProcessor,\n file: fileProcessor,\n success: successProcessor,\n custom: customProcessor,\n function: functionProcessor,\n transform: transformProcessor,\n map: mapProcessor,\n set: setProcessor,\n array: arrayProcessor,\n object: objectProcessor,\n union: unionProcessor,\n intersection: intersectionProcessor,\n tuple: tupleProcessor,\n record: recordProcessor,\n nullable: nullableProcessor,\n nonoptional: nonoptionalProcessor,\n default: defaultProcessor,\n prefault: prefaultProcessor,\n catch: catchProcessor,\n pipe: pipeProcessor,\n readonly: readonlyProcessor,\n promise: promiseProcessor,\n optional: optionalProcessor,\n lazy: lazyProcessor,\n};\nexport function toJSONSchema(input, params) {\n if (\"_idmap\" in input) {\n // Registry case\n const registry = input;\n const ctx = initializeContext({ ...params, processors: allProcessors });\n const defs = {};\n // First pass: process all schemas to build the seen map\n for (const entry of registry._idmap.entries()) {\n const [_, schema] = entry;\n process(schema, ctx);\n }\n const schemas = {};\n const external = {\n registry,\n uri: params?.uri,\n defs,\n };\n // Update the context with external configuration\n ctx.external = external;\n // Second pass: emit each schema\n for (const entry of registry._idmap.entries()) {\n const [key, schema] = entry;\n extractDefs(ctx, schema);\n schemas[key] = finalize(ctx, schema);\n }\n if (Object.keys(defs).length > 0) {\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n schemas.__shared = {\n [defsSegment]: defs,\n };\n }\n return { schemas };\n }\n // Single schema case\n const ctx = initializeContext({ ...params, processors: allProcessors });\n process(input, ctx);\n extractDefs(ctx, input);\n return finalize(ctx, input);\n}\n", "import { allProcessors } from \"./json-schema-processors.js\";\nimport { extractDefs, finalize, initializeContext, process, } from \"./to-json-schema.js\";\n/**\n * Legacy class-based interface for JSON Schema generation.\n * This class wraps the new functional implementation to provide backward compatibility.\n *\n * @deprecated Use the `toJSONSchema` function instead for new code.\n *\n * @example\n * ```typescript\n * // Legacy usage (still supported)\n * const gen = new JSONSchemaGenerator({ target: \"draft-07\" });\n * gen.process(schema);\n * const result = gen.emit(schema);\n *\n * // Preferred modern usage\n * const result = toJSONSchema(schema, { target: \"draft-07\" });\n * ```\n */\nexport class JSONSchemaGenerator {\n /** @deprecated Access via ctx instead */\n get metadataRegistry() {\n return this.ctx.metadataRegistry;\n }\n /** @deprecated Access via ctx instead */\n get target() {\n return this.ctx.target;\n }\n /** @deprecated Access via ctx instead */\n get unrepresentable() {\n return this.ctx.unrepresentable;\n }\n /** @deprecated Access via ctx instead */\n get override() {\n return this.ctx.override;\n }\n /** @deprecated Access via ctx instead */\n get io() {\n return this.ctx.io;\n }\n /** @deprecated Access via ctx instead */\n get counter() {\n return this.ctx.counter;\n }\n set counter(value) {\n this.ctx.counter = value;\n }\n /** @deprecated Access via ctx instead */\n get seen() {\n return this.ctx.seen;\n }\n constructor(params) {\n // Normalize target for internal context\n let normalizedTarget = params?.target ?? \"draft-2020-12\";\n if (normalizedTarget === \"draft-4\")\n normalizedTarget = \"draft-04\";\n if (normalizedTarget === \"draft-7\")\n normalizedTarget = \"draft-07\";\n this.ctx = initializeContext({\n processors: allProcessors,\n target: normalizedTarget,\n ...(params?.metadata && { metadata: params.metadata }),\n ...(params?.unrepresentable && { unrepresentable: params.unrepresentable }),\n ...(params?.override && { override: params.override }),\n ...(params?.io && { io: params.io }),\n });\n }\n /**\n * Process a schema to prepare it for JSON Schema generation.\n * This must be called before emit().\n */\n process(schema, _params = { path: [], schemaPath: [] }) {\n return process(schema, this.ctx, _params);\n }\n /**\n * Emit the final JSON Schema after processing.\n * Must call process() first.\n */\n emit(schema, _params) {\n // Apply emit params to the context\n if (_params) {\n if (_params.cycles)\n this.ctx.cycles = _params.cycles;\n if (_params.reused)\n this.ctx.reused = _params.reused;\n if (_params.external)\n this.ctx.external = _params.external;\n }\n extractDefs(this.ctx, schema);\n const result = finalize(this.ctx, schema);\n // Strip ~standard property to match old implementation's return type\n const { \"~standard\": _, ...plainResult } = result;\n return plainResult;\n }\n}\n", "export {};\n", "export * from \"./core.js\";\nexport * from \"./parse.js\";\nexport * from \"./errors.js\";\nexport * from \"./schemas.js\";\nexport * from \"./checks.js\";\nexport * from \"./versions.js\";\nexport * as util from \"./util.js\";\nexport * as regexes from \"./regexes.js\";\nexport * as locales from \"../locales/index.js\";\nexport * from \"./registries.js\";\nexport * from \"./doc.js\";\nexport * from \"./api.js\";\nexport * from \"./to-json-schema.js\";\nexport { toJSONSchema } from \"./json-schema-processors.js\";\nexport { JSONSchemaGenerator } from \"./json-schema-generator.js\";\nexport * as JSONSchema from \"./json-schema.js\";\n", "export { _lt as lt, _lte as lte, _gt as gt, _gte as gte, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, _slugify as slugify, } from \"../core/index.js\";\n", "import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\nexport const ZodISODateTime = /*@__PURE__*/ core.$constructor(\"ZodISODateTime\", (inst, def) => {\n core.$ZodISODateTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function datetime(params) {\n return core._isoDateTime(ZodISODateTime, params);\n}\nexport const ZodISODate = /*@__PURE__*/ core.$constructor(\"ZodISODate\", (inst, def) => {\n core.$ZodISODate.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function date(params) {\n return core._isoDate(ZodISODate, params);\n}\nexport const ZodISOTime = /*@__PURE__*/ core.$constructor(\"ZodISOTime\", (inst, def) => {\n core.$ZodISOTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function time(params) {\n return core._isoTime(ZodISOTime, params);\n}\nexport const ZodISODuration = /*@__PURE__*/ core.$constructor(\"ZodISODuration\", (inst, def) => {\n core.$ZodISODuration.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function duration(params) {\n return core._isoDuration(ZodISODuration, params);\n}\n", "import * as core from \"../core/index.js\";\nimport { $ZodError } from \"../core/index.js\";\nimport * as util from \"../core/util.js\";\nconst initializer = (inst, issues) => {\n $ZodError.init(inst, issues);\n inst.name = \"ZodError\";\n Object.defineProperties(inst, {\n format: {\n value: (mapper) => core.formatError(inst, mapper),\n // enumerable: false,\n },\n flatten: {\n value: (mapper) => core.flattenError(inst, mapper),\n // enumerable: false,\n },\n addIssue: {\n value: (issue) => {\n inst.issues.push(issue);\n inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);\n },\n // enumerable: false,\n },\n addIssues: {\n value: (issues) => {\n inst.issues.push(...issues);\n inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);\n },\n // enumerable: false,\n },\n isEmpty: {\n get() {\n return inst.issues.length === 0;\n },\n // enumerable: false,\n },\n });\n // Object.defineProperty(inst, \"isEmpty\", {\n // get() {\n // return inst.issues.length === 0;\n // },\n // });\n};\nexport const ZodError = core.$constructor(\"ZodError\", initializer);\nexport const ZodRealError = core.$constructor(\"ZodError\", initializer, {\n Parent: Error,\n});\n// /** @deprecated Use `z.core.$ZodErrorMapCtx` instead. */\n// export type ErrorMapCtx = core.$ZodErrorMapCtx;\n", "import * as core from \"../core/index.js\";\nimport { ZodRealError } from \"./errors.js\";\nexport const parse = /* @__PURE__ */ core._parse(ZodRealError);\nexport const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);\nexport const safeParse = /* @__PURE__ */ core._safeParse(ZodRealError);\nexport const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodRealError);\n// Codec functions\nexport const encode = /* @__PURE__ */ core._encode(ZodRealError);\nexport const decode = /* @__PURE__ */ core._decode(ZodRealError);\nexport const encodeAsync = /* @__PURE__ */ core._encodeAsync(ZodRealError);\nexport const decodeAsync = /* @__PURE__ */ core._decodeAsync(ZodRealError);\nexport const safeEncode = /* @__PURE__ */ core._safeEncode(ZodRealError);\nexport const safeDecode = /* @__PURE__ */ core._safeDecode(ZodRealError);\nexport const safeEncodeAsync = /* @__PURE__ */ core._safeEncodeAsync(ZodRealError);\nexport const safeDecodeAsync = /* @__PURE__ */ core._safeDecodeAsync(ZodRealError);\n", "import * as core from \"../core/index.js\";\nimport { util } from \"../core/index.js\";\nimport * as processors from \"../core/json-schema-processors.js\";\nimport { createStandardJSONSchemaMethod, createToJSONSchemaMethod } from \"../core/to-json-schema.js\";\nimport * as checks from \"./checks.js\";\nimport * as iso from \"./iso.js\";\nimport * as parse from \"./parse.js\";\nexport const ZodType = /*@__PURE__*/ core.$constructor(\"ZodType\", (inst, def) => {\n core.$ZodType.init(inst, def);\n Object.assign(inst[\"~standard\"], {\n jsonSchema: {\n input: createStandardJSONSchemaMethod(inst, \"input\"),\n output: createStandardJSONSchemaMethod(inst, \"output\"),\n },\n });\n inst.toJSONSchema = createToJSONSchemaMethod(inst, {});\n inst.def = def;\n inst.type = def.type;\n Object.defineProperty(inst, \"_def\", { value: def });\n // base methods\n inst.check = (...checks) => {\n return inst.clone(util.mergeDefs(def, {\n checks: [\n ...(def.checks ?? []),\n ...checks.map((ch) => typeof ch === \"function\" ? { _zod: { check: ch, def: { check: \"custom\" }, onattach: [] } } : ch),\n ],\n }), {\n parent: true,\n });\n };\n inst.with = inst.check;\n inst.clone = (def, params) => core.clone(inst, def, params);\n inst.brand = () => inst;\n inst.register = ((reg, meta) => {\n reg.add(inst, meta);\n return inst;\n });\n // parsing\n inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });\n inst.safeParse = (data, params) => parse.safeParse(inst, data, params);\n inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });\n inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);\n inst.spa = inst.safeParseAsync;\n // encoding/decoding\n inst.encode = (data, params) => parse.encode(inst, data, params);\n inst.decode = (data, params) => parse.decode(inst, data, params);\n inst.encodeAsync = async (data, params) => parse.encodeAsync(inst, data, params);\n inst.decodeAsync = async (data, params) => parse.decodeAsync(inst, data, params);\n inst.safeEncode = (data, params) => parse.safeEncode(inst, data, params);\n inst.safeDecode = (data, params) => parse.safeDecode(inst, data, params);\n inst.safeEncodeAsync = async (data, params) => parse.safeEncodeAsync(inst, data, params);\n inst.safeDecodeAsync = async (data, params) => parse.safeDecodeAsync(inst, data, params);\n // refinements\n inst.refine = (check, params) => inst.check(refine(check, params));\n inst.superRefine = (refinement) => inst.check(superRefine(refinement));\n inst.overwrite = (fn) => inst.check(checks.overwrite(fn));\n // wrappers\n inst.optional = () => optional(inst);\n inst.exactOptional = () => exactOptional(inst);\n inst.nullable = () => nullable(inst);\n inst.nullish = () => optional(nullable(inst));\n inst.nonoptional = (params) => nonoptional(inst, params);\n inst.array = () => array(inst);\n inst.or = (arg) => union([inst, arg]);\n inst.and = (arg) => intersection(inst, arg);\n inst.transform = (tx) => pipe(inst, transform(tx));\n inst.default = (def) => _default(inst, def);\n inst.prefault = (def) => prefault(inst, def);\n // inst.coalesce = (def, params) => coalesce(inst, def, params);\n inst.catch = (params) => _catch(inst, params);\n inst.pipe = (target) => pipe(inst, target);\n inst.readonly = () => readonly(inst);\n // meta\n inst.describe = (description) => {\n const cl = inst.clone();\n core.globalRegistry.add(cl, { description });\n return cl;\n };\n Object.defineProperty(inst, \"description\", {\n get() {\n return core.globalRegistry.get(inst)?.description;\n },\n configurable: true,\n });\n inst.meta = (...args) => {\n if (args.length === 0) {\n return core.globalRegistry.get(inst);\n }\n const cl = inst.clone();\n core.globalRegistry.add(cl, args[0]);\n return cl;\n };\n // helpers\n inst.isOptional = () => inst.safeParse(undefined).success;\n inst.isNullable = () => inst.safeParse(null).success;\n inst.apply = (fn) => fn(inst);\n return inst;\n});\n/** @internal */\nexport const _ZodString = /*@__PURE__*/ core.$constructor(\"_ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.stringProcessor(inst, ctx, json, params);\n const bag = inst._zod.bag;\n inst.format = bag.format ?? null;\n inst.minLength = bag.minimum ?? null;\n inst.maxLength = bag.maximum ?? null;\n // validations\n inst.regex = (...args) => inst.check(checks.regex(...args));\n inst.includes = (...args) => inst.check(checks.includes(...args));\n inst.startsWith = (...args) => inst.check(checks.startsWith(...args));\n inst.endsWith = (...args) => inst.check(checks.endsWith(...args));\n inst.min = (...args) => inst.check(checks.minLength(...args));\n inst.max = (...args) => inst.check(checks.maxLength(...args));\n inst.length = (...args) => inst.check(checks.length(...args));\n inst.nonempty = (...args) => inst.check(checks.minLength(1, ...args));\n inst.lowercase = (params) => inst.check(checks.lowercase(params));\n inst.uppercase = (params) => inst.check(checks.uppercase(params));\n // transforms\n inst.trim = () => inst.check(checks.trim());\n inst.normalize = (...args) => inst.check(checks.normalize(...args));\n inst.toLowerCase = () => inst.check(checks.toLowerCase());\n inst.toUpperCase = () => inst.check(checks.toUpperCase());\n inst.slugify = () => inst.check(checks.slugify());\n});\nexport const ZodString = /*@__PURE__*/ core.$constructor(\"ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n _ZodString.init(inst, def);\n inst.email = (params) => inst.check(core._email(ZodEmail, params));\n inst.url = (params) => inst.check(core._url(ZodURL, params));\n inst.jwt = (params) => inst.check(core._jwt(ZodJWT, params));\n inst.emoji = (params) => inst.check(core._emoji(ZodEmoji, params));\n inst.guid = (params) => inst.check(core._guid(ZodGUID, params));\n inst.uuid = (params) => inst.check(core._uuid(ZodUUID, params));\n inst.uuidv4 = (params) => inst.check(core._uuidv4(ZodUUID, params));\n inst.uuidv6 = (params) => inst.check(core._uuidv6(ZodUUID, params));\n inst.uuidv7 = (params) => inst.check(core._uuidv7(ZodUUID, params));\n inst.nanoid = (params) => inst.check(core._nanoid(ZodNanoID, params));\n inst.guid = (params) => inst.check(core._guid(ZodGUID, params));\n inst.cuid = (params) => inst.check(core._cuid(ZodCUID, params));\n inst.cuid2 = (params) => inst.check(core._cuid2(ZodCUID2, params));\n inst.ulid = (params) => inst.check(core._ulid(ZodULID, params));\n inst.base64 = (params) => inst.check(core._base64(ZodBase64, params));\n inst.base64url = (params) => inst.check(core._base64url(ZodBase64URL, params));\n inst.xid = (params) => inst.check(core._xid(ZodXID, params));\n inst.ksuid = (params) => inst.check(core._ksuid(ZodKSUID, params));\n inst.ipv4 = (params) => inst.check(core._ipv4(ZodIPv4, params));\n inst.ipv6 = (params) => inst.check(core._ipv6(ZodIPv6, params));\n inst.cidrv4 = (params) => inst.check(core._cidrv4(ZodCIDRv4, params));\n inst.cidrv6 = (params) => inst.check(core._cidrv6(ZodCIDRv6, params));\n inst.e164 = (params) => inst.check(core._e164(ZodE164, params));\n // iso\n inst.datetime = (params) => inst.check(iso.datetime(params));\n inst.date = (params) => inst.check(iso.date(params));\n inst.time = (params) => inst.check(iso.time(params));\n inst.duration = (params) => inst.check(iso.duration(params));\n});\nexport function string(params) {\n return core._string(ZodString, params);\n}\nexport const ZodStringFormat = /*@__PURE__*/ core.$constructor(\"ZodStringFormat\", (inst, def) => {\n core.$ZodStringFormat.init(inst, def);\n _ZodString.init(inst, def);\n});\nexport const ZodEmail = /*@__PURE__*/ core.$constructor(\"ZodEmail\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmail.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function email(params) {\n return core._email(ZodEmail, params);\n}\nexport const ZodGUID = /*@__PURE__*/ core.$constructor(\"ZodGUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodGUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function guid(params) {\n return core._guid(ZodGUID, params);\n}\nexport const ZodUUID = /*@__PURE__*/ core.$constructor(\"ZodUUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodUUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function uuid(params) {\n return core._uuid(ZodUUID, params);\n}\nexport function uuidv4(params) {\n return core._uuidv4(ZodUUID, params);\n}\n// ZodUUIDv6\nexport function uuidv6(params) {\n return core._uuidv6(ZodUUID, params);\n}\n// ZodUUIDv7\nexport function uuidv7(params) {\n return core._uuidv7(ZodUUID, params);\n}\nexport const ZodURL = /*@__PURE__*/ core.$constructor(\"ZodURL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodURL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function url(params) {\n return core._url(ZodURL, params);\n}\nexport function httpUrl(params) {\n return core._url(ZodURL, {\n protocol: /^https?$/,\n hostname: core.regexes.domain,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEmoji = /*@__PURE__*/ core.$constructor(\"ZodEmoji\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmoji.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function emoji(params) {\n return core._emoji(ZodEmoji, params);\n}\nexport const ZodNanoID = /*@__PURE__*/ core.$constructor(\"ZodNanoID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodNanoID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function nanoid(params) {\n return core._nanoid(ZodNanoID, params);\n}\nexport const ZodCUID = /*@__PURE__*/ core.$constructor(\"ZodCUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cuid(params) {\n return core._cuid(ZodCUID, params);\n}\nexport const ZodCUID2 = /*@__PURE__*/ core.$constructor(\"ZodCUID2\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID2.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cuid2(params) {\n return core._cuid2(ZodCUID2, params);\n}\nexport const ZodULID = /*@__PURE__*/ core.$constructor(\"ZodULID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodULID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ulid(params) {\n return core._ulid(ZodULID, params);\n}\nexport const ZodXID = /*@__PURE__*/ core.$constructor(\"ZodXID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodXID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function xid(params) {\n return core._xid(ZodXID, params);\n}\nexport const ZodKSUID = /*@__PURE__*/ core.$constructor(\"ZodKSUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodKSUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ksuid(params) {\n return core._ksuid(ZodKSUID, params);\n}\nexport const ZodIPv4 = /*@__PURE__*/ core.$constructor(\"ZodIPv4\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv4(params) {\n return core._ipv4(ZodIPv4, params);\n}\nexport const ZodMAC = /*@__PURE__*/ core.$constructor(\"ZodMAC\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodMAC.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function mac(params) {\n return core._mac(ZodMAC, params);\n}\nexport const ZodIPv6 = /*@__PURE__*/ core.$constructor(\"ZodIPv6\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv6(params) {\n return core._ipv6(ZodIPv6, params);\n}\nexport const ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv4\", (inst, def) => {\n core.$ZodCIDRv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv4(params) {\n return core._cidrv4(ZodCIDRv4, params);\n}\nexport const ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv6\", (inst, def) => {\n core.$ZodCIDRv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv6(params) {\n return core._cidrv6(ZodCIDRv6, params);\n}\nexport const ZodBase64 = /*@__PURE__*/ core.$constructor(\"ZodBase64\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64(params) {\n return core._base64(ZodBase64, params);\n}\nexport const ZodBase64URL = /*@__PURE__*/ core.$constructor(\"ZodBase64URL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64URL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64url(params) {\n return core._base64url(ZodBase64URL, params);\n}\nexport const ZodE164 = /*@__PURE__*/ core.$constructor(\"ZodE164\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodE164.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function e164(params) {\n return core._e164(ZodE164, params);\n}\nexport const ZodJWT = /*@__PURE__*/ core.$constructor(\"ZodJWT\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodJWT.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function jwt(params) {\n return core._jwt(ZodJWT, params);\n}\nexport const ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"ZodCustomStringFormat\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCustomStringFormat.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function stringFormat(format, fnOrRegex, _params = {}) {\n return core._stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);\n}\nexport function hostname(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hostname\", core.regexes.hostname, _params);\n}\nexport function hex(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hex\", core.regexes.hex, _params);\n}\nexport function hash(alg, params) {\n const enc = params?.enc ?? \"hex\";\n const format = `${alg}_${enc}`;\n const regex = core.regexes[format];\n if (!regex)\n throw new Error(`Unrecognized hash format: ${format}`);\n return core._stringFormat(ZodCustomStringFormat, format, regex, params);\n}\nexport const ZodNumber = /*@__PURE__*/ core.$constructor(\"ZodNumber\", (inst, def) => {\n core.$ZodNumber.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.numberProcessor(inst, ctx, json, params);\n inst.gt = (value, params) => inst.check(checks.gt(value, params));\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.lt = (value, params) => inst.check(checks.lt(value, params));\n inst.lte = (value, params) => inst.check(checks.lte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n inst.int = (params) => inst.check(int(params));\n inst.safe = (params) => inst.check(int(params));\n inst.positive = (params) => inst.check(checks.gt(0, params));\n inst.nonnegative = (params) => inst.check(checks.gte(0, params));\n inst.negative = (params) => inst.check(checks.lt(0, params));\n inst.nonpositive = (params) => inst.check(checks.lte(0, params));\n inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));\n inst.step = (value, params) => inst.check(checks.multipleOf(value, params));\n // inst.finite = (params) => inst.check(core.finite(params));\n inst.finite = () => inst;\n const bag = inst._zod.bag;\n inst.minValue =\n Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;\n inst.maxValue =\n Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;\n inst.isInt = (bag.format ?? \"\").includes(\"int\") || Number.isSafeInteger(bag.multipleOf ?? 0.5);\n inst.isFinite = true;\n inst.format = bag.format ?? null;\n});\nexport function number(params) {\n return core._number(ZodNumber, params);\n}\nexport const ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"ZodNumberFormat\", (inst, def) => {\n core.$ZodNumberFormat.init(inst, def);\n ZodNumber.init(inst, def);\n});\nexport function int(params) {\n return core._int(ZodNumberFormat, params);\n}\nexport function float32(params) {\n return core._float32(ZodNumberFormat, params);\n}\nexport function float64(params) {\n return core._float64(ZodNumberFormat, params);\n}\nexport function int32(params) {\n return core._int32(ZodNumberFormat, params);\n}\nexport function uint32(params) {\n return core._uint32(ZodNumberFormat, params);\n}\nexport const ZodBoolean = /*@__PURE__*/ core.$constructor(\"ZodBoolean\", (inst, def) => {\n core.$ZodBoolean.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.booleanProcessor(inst, ctx, json, params);\n});\nexport function boolean(params) {\n return core._boolean(ZodBoolean, params);\n}\nexport const ZodBigInt = /*@__PURE__*/ core.$constructor(\"ZodBigInt\", (inst, def) => {\n core.$ZodBigInt.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.bigintProcessor(inst, ctx, json, params);\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.gt = (value, params) => inst.check(checks.gt(value, params));\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.lt = (value, params) => inst.check(checks.lt(value, params));\n inst.lte = (value, params) => inst.check(checks.lte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n inst.positive = (params) => inst.check(checks.gt(BigInt(0), params));\n inst.negative = (params) => inst.check(checks.lt(BigInt(0), params));\n inst.nonpositive = (params) => inst.check(checks.lte(BigInt(0), params));\n inst.nonnegative = (params) => inst.check(checks.gte(BigInt(0), params));\n inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));\n const bag = inst._zod.bag;\n inst.minValue = bag.minimum ?? null;\n inst.maxValue = bag.maximum ?? null;\n inst.format = bag.format ?? null;\n});\nexport function bigint(params) {\n return core._bigint(ZodBigInt, params);\n}\nexport const ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"ZodBigIntFormat\", (inst, def) => {\n core.$ZodBigIntFormat.init(inst, def);\n ZodBigInt.init(inst, def);\n});\n// int64\nexport function int64(params) {\n return core._int64(ZodBigIntFormat, params);\n}\n// uint64\nexport function uint64(params) {\n return core._uint64(ZodBigIntFormat, params);\n}\nexport const ZodSymbol = /*@__PURE__*/ core.$constructor(\"ZodSymbol\", (inst, def) => {\n core.$ZodSymbol.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.symbolProcessor(inst, ctx, json, params);\n});\nexport function symbol(params) {\n return core._symbol(ZodSymbol, params);\n}\nexport const ZodUndefined = /*@__PURE__*/ core.$constructor(\"ZodUndefined\", (inst, def) => {\n core.$ZodUndefined.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.undefinedProcessor(inst, ctx, json, params);\n});\nfunction _undefined(params) {\n return core._undefined(ZodUndefined, params);\n}\nexport { _undefined as undefined };\nexport const ZodNull = /*@__PURE__*/ core.$constructor(\"ZodNull\", (inst, def) => {\n core.$ZodNull.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullProcessor(inst, ctx, json, params);\n});\nfunction _null(params) {\n return core._null(ZodNull, params);\n}\nexport { _null as null };\nexport const ZodAny = /*@__PURE__*/ core.$constructor(\"ZodAny\", (inst, def) => {\n core.$ZodAny.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.anyProcessor(inst, ctx, json, params);\n});\nexport function any() {\n return core._any(ZodAny);\n}\nexport const ZodUnknown = /*@__PURE__*/ core.$constructor(\"ZodUnknown\", (inst, def) => {\n core.$ZodUnknown.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unknownProcessor(inst, ctx, json, params);\n});\nexport function unknown() {\n return core._unknown(ZodUnknown);\n}\nexport const ZodNever = /*@__PURE__*/ core.$constructor(\"ZodNever\", (inst, def) => {\n core.$ZodNever.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.neverProcessor(inst, ctx, json, params);\n});\nexport function never(params) {\n return core._never(ZodNever, params);\n}\nexport const ZodVoid = /*@__PURE__*/ core.$constructor(\"ZodVoid\", (inst, def) => {\n core.$ZodVoid.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.voidProcessor(inst, ctx, json, params);\n});\nfunction _void(params) {\n return core._void(ZodVoid, params);\n}\nexport { _void as void };\nexport const ZodDate = /*@__PURE__*/ core.$constructor(\"ZodDate\", (inst, def) => {\n core.$ZodDate.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.dateProcessor(inst, ctx, json, params);\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n const c = inst._zod.bag;\n inst.minDate = c.minimum ? new Date(c.minimum) : null;\n inst.maxDate = c.maximum ? new Date(c.maximum) : null;\n});\nexport function date(params) {\n return core._date(ZodDate, params);\n}\nexport const ZodArray = /*@__PURE__*/ core.$constructor(\"ZodArray\", (inst, def) => {\n core.$ZodArray.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.arrayProcessor(inst, ctx, json, params);\n inst.element = def.element;\n inst.min = (minLength, params) => inst.check(checks.minLength(minLength, params));\n inst.nonempty = (params) => inst.check(checks.minLength(1, params));\n inst.max = (maxLength, params) => inst.check(checks.maxLength(maxLength, params));\n inst.length = (len, params) => inst.check(checks.length(len, params));\n inst.unwrap = () => inst.element;\n});\nexport function array(element, params) {\n return core._array(ZodArray, element, params);\n}\n// .keyof\nexport function keyof(schema) {\n const shape = schema._zod.def.shape;\n return _enum(Object.keys(shape));\n}\nexport const ZodObject = /*@__PURE__*/ core.$constructor(\"ZodObject\", (inst, def) => {\n core.$ZodObjectJIT.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.objectProcessor(inst, ctx, json, params);\n util.defineLazy(inst, \"shape\", () => {\n return def.shape;\n });\n inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));\n inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall: catchall });\n inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });\n inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });\n inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });\n inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });\n inst.extend = (incoming) => {\n return util.extend(inst, incoming);\n };\n inst.safeExtend = (incoming) => {\n return util.safeExtend(inst, incoming);\n };\n inst.merge = (other) => util.merge(inst, other);\n inst.pick = (mask) => util.pick(inst, mask);\n inst.omit = (mask) => util.omit(inst, mask);\n inst.partial = (...args) => util.partial(ZodOptional, inst, args[0]);\n inst.required = (...args) => util.required(ZodNonOptional, inst, args[0]);\n});\nexport function object(shape, params) {\n const def = {\n type: \"object\",\n shape: shape ?? {},\n ...util.normalizeParams(params),\n };\n return new ZodObject(def);\n}\n// strictObject\nexport function strictObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: never(),\n ...util.normalizeParams(params),\n });\n}\n// looseObject\nexport function looseObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: unknown(),\n ...util.normalizeParams(params),\n });\n}\nexport const ZodUnion = /*@__PURE__*/ core.$constructor(\"ZodUnion\", (inst, def) => {\n core.$ZodUnion.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\nexport function union(options, params) {\n return new ZodUnion({\n type: \"union\",\n options: options,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodXor = /*@__PURE__*/ core.$constructor(\"ZodXor\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodXor.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\n/** Creates an exclusive union (XOR) where exactly one option must match.\n * Unlike regular unions that succeed when any option matches, xor fails if\n * zero or more than one option matches the input. */\nexport function xor(options, params) {\n return new ZodXor({\n type: \"union\",\n options: options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodDiscriminatedUnion = /*@__PURE__*/ core.$constructor(\"ZodDiscriminatedUnion\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodDiscriminatedUnion.init(inst, def);\n});\nexport function discriminatedUnion(discriminator, options, params) {\n // const [options, params] = args;\n return new ZodDiscriminatedUnion({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodIntersection = /*@__PURE__*/ core.$constructor(\"ZodIntersection\", (inst, def) => {\n core.$ZodIntersection.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.intersectionProcessor(inst, ctx, json, params);\n});\nexport function intersection(left, right) {\n return new ZodIntersection({\n type: \"intersection\",\n left: left,\n right: right,\n });\n}\nexport const ZodTuple = /*@__PURE__*/ core.$constructor(\"ZodTuple\", (inst, def) => {\n core.$ZodTuple.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.tupleProcessor(inst, ctx, json, params);\n inst.rest = (rest) => inst.clone({\n ...inst._zod.def,\n rest: rest,\n });\n});\nexport function tuple(items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof core.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new ZodTuple({\n type: \"tuple\",\n items: items,\n rest,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodRecord = /*@__PURE__*/ core.$constructor(\"ZodRecord\", (inst, def) => {\n core.$ZodRecord.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.recordProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n});\nexport function record(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\n// type alksjf = core.output;\nexport function partialRecord(keyType, valueType, params) {\n const k = core.clone(keyType);\n k._zod.values = undefined;\n return new ZodRecord({\n type: \"record\",\n keyType: k,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport function looseRecord(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n mode: \"loose\",\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMap = /*@__PURE__*/ core.$constructor(\"ZodMap\", (inst, def) => {\n core.$ZodMap.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.mapProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function map(keyType, valueType, params) {\n return new ZodMap({\n type: \"map\",\n keyType: keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSet = /*@__PURE__*/ core.$constructor(\"ZodSet\", (inst, def) => {\n core.$ZodSet.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.setProcessor(inst, ctx, json, params);\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function set(valueType, params) {\n return new ZodSet({\n type: \"set\",\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEnum = /*@__PURE__*/ core.$constructor(\"ZodEnum\", (inst, def) => {\n core.$ZodEnum.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.enumProcessor(inst, ctx, json, params);\n inst.enum = def.entries;\n inst.options = Object.values(def.entries);\n const keys = new Set(Object.keys(def.entries));\n inst.extract = (values, params) => {\n const newEntries = {};\n for (const value of values) {\n if (keys.has(value)) {\n newEntries[value] = def.entries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n inst.exclude = (values, params) => {\n const newEntries = { ...def.entries };\n for (const value of values) {\n if (keys.has(value)) {\n delete newEntries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n});\nfunction _enum(values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport { _enum as enum };\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function nativeEnum(entries, params) {\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLiteral = /*@__PURE__*/ core.$constructor(\"ZodLiteral\", (inst, def) => {\n core.$ZodLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.literalProcessor(inst, ctx, json, params);\n inst.values = new Set(def.values);\n Object.defineProperty(inst, \"value\", {\n get() {\n if (def.values.length > 1) {\n throw new Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");\n }\n return def.values[0];\n },\n });\n});\nexport function literal(value, params) {\n return new ZodLiteral({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\nexport const ZodFile = /*@__PURE__*/ core.$constructor(\"ZodFile\", (inst, def) => {\n core.$ZodFile.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.fileProcessor(inst, ctx, json, params);\n inst.min = (size, params) => inst.check(core._minSize(size, params));\n inst.max = (size, params) => inst.check(core._maxSize(size, params));\n inst.mime = (types, params) => inst.check(core._mime(Array.isArray(types) ? types : [types], params));\n});\nexport function file(params) {\n return core._file(ZodFile, params);\n}\nexport const ZodTransform = /*@__PURE__*/ core.$constructor(\"ZodTransform\", (inst, def) => {\n core.$ZodTransform.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.transformProcessor(inst, ctx, json, params);\n inst._zod.parse = (payload, _ctx) => {\n if (_ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n _issue.input ?? (_issue.input = payload.value);\n _issue.inst ?? (_issue.inst = inst);\n // _issue.continue ??= true;\n payload.issues.push(util.issue(_issue));\n }\n };\n const output = def.transform(payload.value, payload);\n if (output instanceof Promise) {\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n payload.value = output;\n return payload;\n };\n});\nexport function transform(fn) {\n return new ZodTransform({\n type: \"transform\",\n transform: fn,\n });\n}\nexport const ZodOptional = /*@__PURE__*/ core.$constructor(\"ZodOptional\", (inst, def) => {\n core.$ZodOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function optional(innerType) {\n return new ZodOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodExactOptional = /*@__PURE__*/ core.$constructor(\"ZodExactOptional\", (inst, def) => {\n core.$ZodExactOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function exactOptional(innerType) {\n return new ZodExactOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodNullable = /*@__PURE__*/ core.$constructor(\"ZodNullable\", (inst, def) => {\n core.$ZodNullable.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullableProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nullable(innerType) {\n return new ZodNullable({\n type: \"nullable\",\n innerType: innerType,\n });\n}\n// nullish\nexport function nullish(innerType) {\n return optional(nullable(innerType));\n}\nexport const ZodDefault = /*@__PURE__*/ core.$constructor(\"ZodDefault\", (inst, def) => {\n core.$ZodDefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.defaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeDefault = inst.unwrap;\n});\nexport function _default(innerType, defaultValue) {\n return new ZodDefault({\n type: \"default\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodPrefault = /*@__PURE__*/ core.$constructor(\"ZodPrefault\", (inst, def) => {\n core.$ZodPrefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.prefaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function prefault(innerType, defaultValue) {\n return new ZodPrefault({\n type: \"prefault\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodNonOptional = /*@__PURE__*/ core.$constructor(\"ZodNonOptional\", (inst, def) => {\n core.$ZodNonOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nonoptionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nonoptional(innerType, params) {\n return new ZodNonOptional({\n type: \"nonoptional\",\n innerType: innerType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSuccess = /*@__PURE__*/ core.$constructor(\"ZodSuccess\", (inst, def) => {\n core.$ZodSuccess.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.successProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function success(innerType) {\n return new ZodSuccess({\n type: \"success\",\n innerType: innerType,\n });\n}\nexport const ZodCatch = /*@__PURE__*/ core.$constructor(\"ZodCatch\", (inst, def) => {\n core.$ZodCatch.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.catchProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeCatch = inst.unwrap;\n});\nfunction _catch(innerType, catchValue) {\n return new ZodCatch({\n type: \"catch\",\n innerType: innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\nexport { _catch as catch };\nexport const ZodNaN = /*@__PURE__*/ core.$constructor(\"ZodNaN\", (inst, def) => {\n core.$ZodNaN.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nanProcessor(inst, ctx, json, params);\n});\nexport function nan(params) {\n return core._nan(ZodNaN, params);\n}\nexport const ZodPipe = /*@__PURE__*/ core.$constructor(\"ZodPipe\", (inst, def) => {\n core.$ZodPipe.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.pipeProcessor(inst, ctx, json, params);\n inst.in = def.in;\n inst.out = def.out;\n});\nexport function pipe(in_, out) {\n return new ZodPipe({\n type: \"pipe\",\n in: in_,\n out: out,\n // ...util.normalizeParams(params),\n });\n}\nexport const ZodCodec = /*@__PURE__*/ core.$constructor(\"ZodCodec\", (inst, def) => {\n ZodPipe.init(inst, def);\n core.$ZodCodec.init(inst, def);\n});\nexport function codec(in_, out, params) {\n return new ZodCodec({\n type: \"pipe\",\n in: in_,\n out: out,\n transform: params.decode,\n reverseTransform: params.encode,\n });\n}\nexport const ZodReadonly = /*@__PURE__*/ core.$constructor(\"ZodReadonly\", (inst, def) => {\n core.$ZodReadonly.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.readonlyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function readonly(innerType) {\n return new ZodReadonly({\n type: \"readonly\",\n innerType: innerType,\n });\n}\nexport const ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"ZodTemplateLiteral\", (inst, def) => {\n core.$ZodTemplateLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.templateLiteralProcessor(inst, ctx, json, params);\n});\nexport function templateLiteral(parts, params) {\n return new ZodTemplateLiteral({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLazy = /*@__PURE__*/ core.$constructor(\"ZodLazy\", (inst, def) => {\n core.$ZodLazy.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.lazyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.getter();\n});\nexport function lazy(getter) {\n return new ZodLazy({\n type: \"lazy\",\n getter: getter,\n });\n}\nexport const ZodPromise = /*@__PURE__*/ core.$constructor(\"ZodPromise\", (inst, def) => {\n core.$ZodPromise.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.promiseProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function promise(innerType) {\n return new ZodPromise({\n type: \"promise\",\n innerType: innerType,\n });\n}\nexport const ZodFunction = /*@__PURE__*/ core.$constructor(\"ZodFunction\", (inst, def) => {\n core.$ZodFunction.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.functionProcessor(inst, ctx, json, params);\n});\nexport function _function(params) {\n return new ZodFunction({\n type: \"function\",\n input: Array.isArray(params?.input) ? tuple(params?.input) : (params?.input ?? array(unknown())),\n output: params?.output ?? unknown(),\n });\n}\nexport { _function as function };\nexport const ZodCustom = /*@__PURE__*/ core.$constructor(\"ZodCustom\", (inst, def) => {\n core.$ZodCustom.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.customProcessor(inst, ctx, json, params);\n});\n// custom checks\nexport function check(fn) {\n const ch = new core.$ZodCheck({\n check: \"custom\",\n // ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\nexport function custom(fn, _params) {\n return core._custom(ZodCustom, fn ?? (() => true), _params);\n}\nexport function refine(fn, _params = {}) {\n return core._refine(ZodCustom, fn, _params);\n}\n// superRefine\nexport function superRefine(fn) {\n return core._superRefine(fn);\n}\n// Re-export describe and meta from core\nexport const describe = core.describe;\nexport const meta = core.meta;\nfunction _instanceof(cls, params = {}) {\n const inst = new ZodCustom({\n type: \"custom\",\n check: \"custom\",\n fn: (data) => data instanceof cls,\n abort: true,\n ...util.normalizeParams(params),\n });\n inst._zod.bag.Class = cls;\n // Override check to emit invalid_type instead of custom\n inst._zod.check = (payload) => {\n if (!(payload.value instanceof cls)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: cls.name,\n input: payload.value,\n inst,\n path: [...(inst._zod.def.path ?? [])],\n });\n }\n };\n return inst;\n}\nexport { _instanceof as instanceof };\n// stringbool\nexport const stringbool = (...args) => core._stringbool({\n Codec: ZodCodec,\n Boolean: ZodBoolean,\n String: ZodString,\n}, ...args);\nexport function json(params) {\n const jsonSchema = lazy(() => {\n return union([string(params), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);\n });\n return jsonSchema;\n}\n// preprocess\n// /** @deprecated Use `z.pipe()` and `z.transform()` instead. */\nexport function preprocess(fn, schema) {\n return pipe(transform(fn), schema);\n}\n", "// Zod 3 compat layer\nimport * as core from \"../core/index.js\";\n/** @deprecated Use the raw string literal codes instead, e.g. \"invalid_type\". */\nexport const ZodIssueCode = {\n invalid_type: \"invalid_type\",\n too_big: \"too_big\",\n too_small: \"too_small\",\n invalid_format: \"invalid_format\",\n not_multiple_of: \"not_multiple_of\",\n unrecognized_keys: \"unrecognized_keys\",\n invalid_union: \"invalid_union\",\n invalid_key: \"invalid_key\",\n invalid_element: \"invalid_element\",\n invalid_value: \"invalid_value\",\n custom: \"custom\",\n};\nexport { $brand, config } from \"../core/index.js\";\n/** @deprecated Use `z.config(params)` instead. */\nexport function setErrorMap(map) {\n core.config({\n customError: map,\n });\n}\n/** @deprecated Use `z.config()` instead. */\nexport function getErrorMap() {\n return core.config().customError;\n}\n/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */\nexport var ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\n", "import { globalRegistry } from \"../core/registries.js\";\nimport * as _checks from \"./checks.js\";\nimport * as _iso from \"./iso.js\";\nimport * as _schemas from \"./schemas.js\";\n// Local z object to avoid circular dependency with ../index.js\nconst z = {\n ..._schemas,\n ..._checks,\n iso: _iso,\n};\n// Keys that are recognized and handled by the conversion logic\nconst RECOGNIZED_KEYS = new Set([\n // Schema identification\n \"$schema\",\n \"$ref\",\n \"$defs\",\n \"definitions\",\n // Core schema keywords\n \"$id\",\n \"id\",\n \"$comment\",\n \"$anchor\",\n \"$vocabulary\",\n \"$dynamicRef\",\n \"$dynamicAnchor\",\n // Type\n \"type\",\n \"enum\",\n \"const\",\n // Composition\n \"anyOf\",\n \"oneOf\",\n \"allOf\",\n \"not\",\n // Object\n \"properties\",\n \"required\",\n \"additionalProperties\",\n \"patternProperties\",\n \"propertyNames\",\n \"minProperties\",\n \"maxProperties\",\n // Array\n \"items\",\n \"prefixItems\",\n \"additionalItems\",\n \"minItems\",\n \"maxItems\",\n \"uniqueItems\",\n \"contains\",\n \"minContains\",\n \"maxContains\",\n // String\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"format\",\n // Number\n \"minimum\",\n \"maximum\",\n \"exclusiveMinimum\",\n \"exclusiveMaximum\",\n \"multipleOf\",\n // Already handled metadata\n \"description\",\n \"default\",\n // Content\n \"contentEncoding\",\n \"contentMediaType\",\n \"contentSchema\",\n // Unsupported (error-throwing)\n \"unevaluatedItems\",\n \"unevaluatedProperties\",\n \"if\",\n \"then\",\n \"else\",\n \"dependentSchemas\",\n \"dependentRequired\",\n // OpenAPI\n \"nullable\",\n \"readOnly\",\n]);\nfunction detectVersion(schema, defaultTarget) {\n const $schema = schema.$schema;\n if ($schema === \"https://json-schema.org/draft/2020-12/schema\") {\n return \"draft-2020-12\";\n }\n if ($schema === \"http://json-schema.org/draft-07/schema#\") {\n return \"draft-7\";\n }\n if ($schema === \"http://json-schema.org/draft-04/schema#\") {\n return \"draft-4\";\n }\n // Use defaultTarget if provided, otherwise default to draft-2020-12\n return defaultTarget ?? \"draft-2020-12\";\n}\nfunction resolveRef(ref, ctx) {\n if (!ref.startsWith(\"#\")) {\n throw new Error(\"External $ref is not supported, only local refs (#/...) are allowed\");\n }\n const path = ref.slice(1).split(\"/\").filter(Boolean);\n // Handle root reference \"#\"\n if (path.length === 0) {\n return ctx.rootSchema;\n }\n const defsKey = ctx.version === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (path[0] === defsKey) {\n const key = path[1];\n if (!key || !ctx.defs[key]) {\n throw new Error(`Reference not found: ${ref}`);\n }\n return ctx.defs[key];\n }\n throw new Error(`Reference not found: ${ref}`);\n}\nfunction convertBaseSchema(schema, ctx) {\n // Handle unsupported features\n if (schema.not !== undefined) {\n // Special case: { not: {} } represents never\n if (typeof schema.not === \"object\" && Object.keys(schema.not).length === 0) {\n return z.never();\n }\n throw new Error(\"not is not supported in Zod (except { not: {} } for never)\");\n }\n if (schema.unevaluatedItems !== undefined) {\n throw new Error(\"unevaluatedItems is not supported\");\n }\n if (schema.unevaluatedProperties !== undefined) {\n throw new Error(\"unevaluatedProperties is not supported\");\n }\n if (schema.if !== undefined || schema.then !== undefined || schema.else !== undefined) {\n throw new Error(\"Conditional schemas (if/then/else) are not supported\");\n }\n if (schema.dependentSchemas !== undefined || schema.dependentRequired !== undefined) {\n throw new Error(\"dependentSchemas and dependentRequired are not supported\");\n }\n // Handle $ref\n if (schema.$ref) {\n const refPath = schema.$ref;\n if (ctx.refs.has(refPath)) {\n return ctx.refs.get(refPath);\n }\n if (ctx.processing.has(refPath)) {\n // Circular reference - use lazy\n return z.lazy(() => {\n if (!ctx.refs.has(refPath)) {\n throw new Error(`Circular reference not resolved: ${refPath}`);\n }\n return ctx.refs.get(refPath);\n });\n }\n ctx.processing.add(refPath);\n const resolved = resolveRef(refPath, ctx);\n const zodSchema = convertSchema(resolved, ctx);\n ctx.refs.set(refPath, zodSchema);\n ctx.processing.delete(refPath);\n return zodSchema;\n }\n // Handle enum\n if (schema.enum !== undefined) {\n const enumValues = schema.enum;\n // Special case: OpenAPI 3.0 null representation { type: \"string\", nullable: true, enum: [null] }\n if (ctx.version === \"openapi-3.0\" &&\n schema.nullable === true &&\n enumValues.length === 1 &&\n enumValues[0] === null) {\n return z.null();\n }\n if (enumValues.length === 0) {\n return z.never();\n }\n if (enumValues.length === 1) {\n return z.literal(enumValues[0]);\n }\n // Check if all values are strings\n if (enumValues.every((v) => typeof v === \"string\")) {\n return z.enum(enumValues);\n }\n // Mixed types - use union of literals\n const literalSchemas = enumValues.map((v) => z.literal(v));\n if (literalSchemas.length < 2) {\n return literalSchemas[0];\n }\n return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);\n }\n // Handle const\n if (schema.const !== undefined) {\n return z.literal(schema.const);\n }\n // Handle type\n const type = schema.type;\n if (Array.isArray(type)) {\n // Expand type array into anyOf union\n const typeSchemas = type.map((t) => {\n const typeSchema = { ...schema, type: t };\n return convertBaseSchema(typeSchema, ctx);\n });\n if (typeSchemas.length === 0) {\n return z.never();\n }\n if (typeSchemas.length === 1) {\n return typeSchemas[0];\n }\n return z.union(typeSchemas);\n }\n if (!type) {\n // No type specified - empty schema (any)\n return z.any();\n }\n let zodSchema;\n switch (type) {\n case \"string\": {\n let stringSchema = z.string();\n // Apply format using .check() with Zod format functions\n if (schema.format) {\n const format = schema.format;\n // Map common formats to Zod check functions\n if (format === \"email\") {\n stringSchema = stringSchema.check(z.email());\n }\n else if (format === \"uri\" || format === \"uri-reference\") {\n stringSchema = stringSchema.check(z.url());\n }\n else if (format === \"uuid\" || format === \"guid\") {\n stringSchema = stringSchema.check(z.uuid());\n }\n else if (format === \"date-time\") {\n stringSchema = stringSchema.check(z.iso.datetime());\n }\n else if (format === \"date\") {\n stringSchema = stringSchema.check(z.iso.date());\n }\n else if (format === \"time\") {\n stringSchema = stringSchema.check(z.iso.time());\n }\n else if (format === \"duration\") {\n stringSchema = stringSchema.check(z.iso.duration());\n }\n else if (format === \"ipv4\") {\n stringSchema = stringSchema.check(z.ipv4());\n }\n else if (format === \"ipv6\") {\n stringSchema = stringSchema.check(z.ipv6());\n }\n else if (format === \"mac\") {\n stringSchema = stringSchema.check(z.mac());\n }\n else if (format === \"cidr\") {\n stringSchema = stringSchema.check(z.cidrv4());\n }\n else if (format === \"cidr-v6\") {\n stringSchema = stringSchema.check(z.cidrv6());\n }\n else if (format === \"base64\") {\n stringSchema = stringSchema.check(z.base64());\n }\n else if (format === \"base64url\") {\n stringSchema = stringSchema.check(z.base64url());\n }\n else if (format === \"e164\") {\n stringSchema = stringSchema.check(z.e164());\n }\n else if (format === \"jwt\") {\n stringSchema = stringSchema.check(z.jwt());\n }\n else if (format === \"emoji\") {\n stringSchema = stringSchema.check(z.emoji());\n }\n else if (format === \"nanoid\") {\n stringSchema = stringSchema.check(z.nanoid());\n }\n else if (format === \"cuid\") {\n stringSchema = stringSchema.check(z.cuid());\n }\n else if (format === \"cuid2\") {\n stringSchema = stringSchema.check(z.cuid2());\n }\n else if (format === \"ulid\") {\n stringSchema = stringSchema.check(z.ulid());\n }\n else if (format === \"xid\") {\n stringSchema = stringSchema.check(z.xid());\n }\n else if (format === \"ksuid\") {\n stringSchema = stringSchema.check(z.ksuid());\n }\n // Note: json-string format is not currently supported by Zod\n // Custom formats are ignored - keep as plain string\n }\n // Apply constraints\n if (typeof schema.minLength === \"number\") {\n stringSchema = stringSchema.min(schema.minLength);\n }\n if (typeof schema.maxLength === \"number\") {\n stringSchema = stringSchema.max(schema.maxLength);\n }\n if (schema.pattern) {\n // JSON Schema patterns are not implicitly anchored (match anywhere in string)\n stringSchema = stringSchema.regex(new RegExp(schema.pattern));\n }\n zodSchema = stringSchema;\n break;\n }\n case \"number\":\n case \"integer\": {\n let numberSchema = type === \"integer\" ? z.number().int() : z.number();\n // Apply constraints\n if (typeof schema.minimum === \"number\") {\n numberSchema = numberSchema.min(schema.minimum);\n }\n if (typeof schema.maximum === \"number\") {\n numberSchema = numberSchema.max(schema.maximum);\n }\n if (typeof schema.exclusiveMinimum === \"number\") {\n numberSchema = numberSchema.gt(schema.exclusiveMinimum);\n }\n else if (schema.exclusiveMinimum === true && typeof schema.minimum === \"number\") {\n numberSchema = numberSchema.gt(schema.minimum);\n }\n if (typeof schema.exclusiveMaximum === \"number\") {\n numberSchema = numberSchema.lt(schema.exclusiveMaximum);\n }\n else if (schema.exclusiveMaximum === true && typeof schema.maximum === \"number\") {\n numberSchema = numberSchema.lt(schema.maximum);\n }\n if (typeof schema.multipleOf === \"number\") {\n numberSchema = numberSchema.multipleOf(schema.multipleOf);\n }\n zodSchema = numberSchema;\n break;\n }\n case \"boolean\": {\n zodSchema = z.boolean();\n break;\n }\n case \"null\": {\n zodSchema = z.null();\n break;\n }\n case \"object\": {\n const shape = {};\n const properties = schema.properties || {};\n const requiredSet = new Set(schema.required || []);\n // Convert properties - mark optional ones\n for (const [key, propSchema] of Object.entries(properties)) {\n const propZodSchema = convertSchema(propSchema, ctx);\n // If not in required array, make it optional\n shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional();\n }\n // Handle propertyNames\n if (schema.propertyNames) {\n const keySchema = convertSchema(schema.propertyNames, ctx);\n const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === \"object\"\n ? convertSchema(schema.additionalProperties, ctx)\n : z.any();\n // Case A: No properties (pure record)\n if (Object.keys(shape).length === 0) {\n zodSchema = z.record(keySchema, valueSchema);\n break;\n }\n // Case B: With properties (intersection of object and looseRecord)\n const objectSchema = z.object(shape).passthrough();\n const recordSchema = z.looseRecord(keySchema, valueSchema);\n zodSchema = z.intersection(objectSchema, recordSchema);\n break;\n }\n // Handle patternProperties\n if (schema.patternProperties) {\n // patternProperties: keys matching pattern must satisfy corresponding schema\n // Use loose records so non-matching keys pass through\n const patternProps = schema.patternProperties;\n const patternKeys = Object.keys(patternProps);\n const looseRecords = [];\n for (const pattern of patternKeys) {\n const patternValue = convertSchema(patternProps[pattern], ctx);\n const keySchema = z.string().regex(new RegExp(pattern));\n looseRecords.push(z.looseRecord(keySchema, patternValue));\n }\n // Build intersection: object schema + all pattern property records\n const schemasToIntersect = [];\n if (Object.keys(shape).length > 0) {\n // Use passthrough so patternProperties can validate additional keys\n schemasToIntersect.push(z.object(shape).passthrough());\n }\n schemasToIntersect.push(...looseRecords);\n if (schemasToIntersect.length === 0) {\n zodSchema = z.object({}).passthrough();\n }\n else if (schemasToIntersect.length === 1) {\n zodSchema = schemasToIntersect[0];\n }\n else {\n // Chain intersections: (A & B) & C & D ...\n let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);\n for (let i = 2; i < schemasToIntersect.length; i++) {\n result = z.intersection(result, schemasToIntersect[i]);\n }\n zodSchema = result;\n }\n break;\n }\n // Handle additionalProperties\n // In JSON Schema, additionalProperties defaults to true (allow any extra properties)\n // In Zod, objects strip unknown keys by default, so we need to handle this explicitly\n const objectSchema = z.object(shape);\n if (schema.additionalProperties === false) {\n // Strict mode - no extra properties allowed\n zodSchema = objectSchema.strict();\n }\n else if (typeof schema.additionalProperties === \"object\") {\n // Extra properties must match the specified schema\n zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));\n }\n else {\n // additionalProperties is true or undefined - allow any extra properties (passthrough)\n zodSchema = objectSchema.passthrough();\n }\n break;\n }\n case \"array\": {\n // TODO: uniqueItems is not supported\n // TODO: contains/minContains/maxContains are not supported\n // Check if this is a tuple (prefixItems or items as array)\n const prefixItems = schema.prefixItems;\n const items = schema.items;\n if (prefixItems && Array.isArray(prefixItems)) {\n // Tuple with prefixItems (draft-2020-12)\n const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));\n const rest = items && typeof items === \"object\" && !Array.isArray(items)\n ? convertSchema(items, ctx)\n : undefined;\n if (rest) {\n zodSchema = z.tuple(tupleItems).rest(rest);\n }\n else {\n zodSchema = z.tuple(tupleItems);\n }\n // Apply minItems/maxItems constraints to tuples\n if (typeof schema.minItems === \"number\") {\n zodSchema = zodSchema.check(z.minLength(schema.minItems));\n }\n if (typeof schema.maxItems === \"number\") {\n zodSchema = zodSchema.check(z.maxLength(schema.maxItems));\n }\n }\n else if (Array.isArray(items)) {\n // Tuple with items array (draft-7)\n const tupleItems = items.map((item) => convertSchema(item, ctx));\n const rest = schema.additionalItems && typeof schema.additionalItems === \"object\"\n ? convertSchema(schema.additionalItems, ctx)\n : undefined; // additionalItems: false means no rest, handled by default tuple behavior\n if (rest) {\n zodSchema = z.tuple(tupleItems).rest(rest);\n }\n else {\n zodSchema = z.tuple(tupleItems);\n }\n // Apply minItems/maxItems constraints to tuples\n if (typeof schema.minItems === \"number\") {\n zodSchema = zodSchema.check(z.minLength(schema.minItems));\n }\n if (typeof schema.maxItems === \"number\") {\n zodSchema = zodSchema.check(z.maxLength(schema.maxItems));\n }\n }\n else if (items !== undefined) {\n // Regular array\n const element = convertSchema(items, ctx);\n let arraySchema = z.array(element);\n // Apply constraints\n if (typeof schema.minItems === \"number\") {\n arraySchema = arraySchema.min(schema.minItems);\n }\n if (typeof schema.maxItems === \"number\") {\n arraySchema = arraySchema.max(schema.maxItems);\n }\n zodSchema = arraySchema;\n }\n else {\n // No items specified - array of any\n zodSchema = z.array(z.any());\n }\n break;\n }\n default:\n throw new Error(`Unsupported type: ${type}`);\n }\n // Apply metadata\n if (schema.description) {\n zodSchema = zodSchema.describe(schema.description);\n }\n if (schema.default !== undefined) {\n zodSchema = zodSchema.default(schema.default);\n }\n return zodSchema;\n}\nfunction convertSchema(schema, ctx) {\n if (typeof schema === \"boolean\") {\n return schema ? z.any() : z.never();\n }\n // Convert base schema first (ignoring composition keywords)\n let baseSchema = convertBaseSchema(schema, ctx);\n const hasExplicitType = schema.type || schema.enum !== undefined || schema.const !== undefined;\n // Process composition keywords LAST (they can appear together)\n // Handle anyOf - wrap base schema with union\n if (schema.anyOf && Array.isArray(schema.anyOf)) {\n const options = schema.anyOf.map((s) => convertSchema(s, ctx));\n const anyOfUnion = z.union(options);\n baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion;\n }\n // Handle oneOf - exclusive union (exactly one must match)\n if (schema.oneOf && Array.isArray(schema.oneOf)) {\n const options = schema.oneOf.map((s) => convertSchema(s, ctx));\n const oneOfUnion = z.xor(options);\n baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion;\n }\n // Handle allOf - wrap base schema with intersection\n if (schema.allOf && Array.isArray(schema.allOf)) {\n if (schema.allOf.length === 0) {\n baseSchema = hasExplicitType ? baseSchema : z.any();\n }\n else {\n let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);\n const startIdx = hasExplicitType ? 0 : 1;\n for (let i = startIdx; i < schema.allOf.length; i++) {\n result = z.intersection(result, convertSchema(schema.allOf[i], ctx));\n }\n baseSchema = result;\n }\n }\n // Handle nullable (OpenAPI 3.0)\n if (schema.nullable === true && ctx.version === \"openapi-3.0\") {\n baseSchema = z.nullable(baseSchema);\n }\n // Handle readOnly\n if (schema.readOnly === true) {\n baseSchema = z.readonly(baseSchema);\n }\n // Collect metadata: core schema keywords and unrecognized keys\n const extraMeta = {};\n // Core schema keywords that should be captured as metadata\n const coreMetadataKeys = [\"$id\", \"id\", \"$comment\", \"$anchor\", \"$vocabulary\", \"$dynamicRef\", \"$dynamicAnchor\"];\n for (const key of coreMetadataKeys) {\n if (key in schema) {\n extraMeta[key] = schema[key];\n }\n }\n // Content keywords - store as metadata\n const contentMetadataKeys = [\"contentEncoding\", \"contentMediaType\", \"contentSchema\"];\n for (const key of contentMetadataKeys) {\n if (key in schema) {\n extraMeta[key] = schema[key];\n }\n }\n // Unrecognized keys (custom metadata)\n for (const key of Object.keys(schema)) {\n if (!RECOGNIZED_KEYS.has(key)) {\n extraMeta[key] = schema[key];\n }\n }\n if (Object.keys(extraMeta).length > 0) {\n ctx.registry.add(baseSchema, extraMeta);\n }\n return baseSchema;\n}\n/**\n * Converts a JSON Schema to a Zod schema. This function should be considered semi-experimental. It's behavior is liable to change. */\nexport function fromJSONSchema(schema, params) {\n // Handle boolean schemas\n if (typeof schema === \"boolean\") {\n return schema ? z.any() : z.never();\n }\n const version = detectVersion(schema, params?.defaultTarget);\n const defs = (schema.$defs || schema.definitions || {});\n const ctx = {\n version,\n defs,\n refs: new Map(),\n processing: new Set(),\n rootSchema: schema,\n registry: params?.registry ?? globalRegistry,\n };\n return convertSchema(schema, ctx);\n}\n", "import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\nexport function string(params) {\n return core._coercedString(schemas.ZodString, params);\n}\nexport function number(params) {\n return core._coercedNumber(schemas.ZodNumber, params);\n}\nexport function boolean(params) {\n return core._coercedBoolean(schemas.ZodBoolean, params);\n}\nexport function bigint(params) {\n return core._coercedBigint(schemas.ZodBigInt, params);\n}\nexport function date(params) {\n return core._coercedDate(schemas.ZodDate, params);\n}\n", "export * as core from \"../core/index.js\";\nexport * from \"./schemas.js\";\nexport * from \"./checks.js\";\nexport * from \"./errors.js\";\nexport * from \"./parse.js\";\nexport * from \"./compat.js\";\n// zod-specified\nimport { config } from \"../core/index.js\";\nimport en from \"../locales/en.js\";\nconfig(en());\nexport { globalRegistry, registry, config, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, } from \"../core/index.js\";\nexport { toJSONSchema } from \"../core/json-schema-processors.js\";\nexport { fromJSONSchema } from \"./from-json-schema.js\";\nexport * as locales from \"../locales/index.js\";\n// iso\n// must be exported from top-level\n// https://github.com/colinhacks/zod/issues/4491\nexport { ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration } from \"./iso.js\";\nexport * as iso from \"./iso.js\";\nexport * as coerce from \"./coerce.js\";\n", "import * as z from \"./v4/classic/external.js\";\nexport * from \"./v4/classic/external.js\";\nexport { z };\nexport default z;\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport { generateSignedUrlsFromS3Urls } from '@/src/lib/s3-client'\nimport { getComplaints as getComplaintsFromDb, resolveComplaint as resolveComplaintInDb } from '@/src/dbService'\nimport type { ComplaintWithUser } from '@packages/shared'\n\nexport const complaintRouter = router({\n getAll: protectedProcedure\n .input(z.object({\n cursor: z.number().optional(),\n limit: z.number().default(20),\n }))\n .query(async ({ input }): Promise<{\n complaints: Array<{\n id: number;\n text: string;\n userId: number;\n userName: string | null;\n userMobile: string | null;\n orderId: number | null;\n status: string;\n createdAt: Date;\n images: string[];\n }>;\n nextCursor?: number;\n }> => {\n const { cursor, limit } = input;\n\n // Using dbService helper (new implementation)\n const { complaints: complaintsData, hasMore } = await getComplaintsFromDb(cursor, limit);\n\n /*\n // Old implementation - direct DB query:\n const { cursor, limit } = input;\n\n let whereCondition = cursor \n ? lt(complaints.id, cursor) \n : undefined;\n\n const complaintsData = await db\n .select({\n id: complaints.id,\n complaintBody: complaints.complaintBody,\n userId: complaints.userId,\n orderId: complaints.orderId,\n isResolved: complaints.isResolved,\n createdAt: complaints.createdAt,\n userName: users.name,\n userMobile: users.mobile,\n images: complaints.images,\n })\n .from(complaints)\n .leftJoin(users, eq(complaints.userId, users.id))\n .where(whereCondition)\n .orderBy(desc(complaints.id))\n .limit(limit + 1);\n\n const hasMore = complaintsData.length > limit;\n const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData;\n */\n\n const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData;\n\n const complaintsWithSignedImages = await Promise.all(\n complaintsToReturn.map(async (c: ComplaintWithUser) => {\n const signedImages = c.images\n ? await generateSignedUrlsFromS3Urls(c.images as string[])\n : [];\n\n return {\n id: c.id,\n text: c.complaintBody,\n userId: c.userId,\n userName: c.userName,\n userMobile: c.userMobile,\n orderId: c.orderId,\n status: c.isResolved ? 'resolved' : 'pending',\n createdAt: c.createdAt,\n images: signedImages,\n };\n })\n );\n\n return {\n complaints: complaintsWithSignedImages,\n nextCursor: hasMore\n ? complaintsToReturn[complaintsToReturn.length - 1].id\n : undefined,\n };\n }),\n\n resolve: protectedProcedure\n .input(z.object({ id: z.string(), response: z.string().optional() }))\n .mutation(async ({ input }): Promise<{ message: string }> => {\n // Using dbService helper (new implementation)\n await resolveComplaintInDb(parseInt(input.id), input.response);\n\n /*\n // Old implementation - direct DB query:\n await db\n .update(complaints)\n .set({ isResolved: true, response: input.response })\n .where(eq(complaints.id, parseInt(input.id)));\n */\n\n return { message: 'Complaint resolved successfully' };\n }),\n});\n", "!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t) => {\n const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableUsers, applicableProducts, maxValue, isApplyForAll, validTill, maxLimitForUser, exclusiveApply } = input;\n\n // Validation: ensure at least one discount type is provided\n if ((!discountPercent && !flatDiscount) || (discountPercent && flatDiscount)) {\n throw new Error(\"Either discountPercent or flatDiscount must be provided (but not both)\");\n }\n\n // If user-based, applicableUsers is required (unless it's apply for all)\n if (isUserBased && (!applicableUsers || applicableUsers.length === 0) && !isApplyForAll) {\n throw new Error(\"applicableUsers is required for user-based coupons (or set isApplyForAll to true)\");\n }\n\n // Cannot be both user-based and apply for all\n if (isUserBased && isApplyForAll) {\n throw new Error(\"Cannot be both user-based and apply for all users\");\n }\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n\n // Generate coupon code if not provided\n let finalCouponCode = couponCode;\n if (!finalCouponCode) {\n const timestamp = Date.now().toString().slice(-6);\n const random = Math.random().toString(36).substring(2, 8).toUpperCase();\n finalCouponCode = `MF${timestamp}${random}`;\n }\n\n // Using dbService helper (new implementation)\n const codeExists = await checkCouponExists(finalCouponCode);\n if (codeExists) {\n throw new Error(\"Coupon code already exists\");\n }\n\n // If applicableUsers is provided, verify users exist\n if (applicableUsers && applicableUsers.length > 0) {\n const usersExist = await checkUsersExist(applicableUsers);\n if (!usersExist) {\n throw new Error(\"Some applicable users not found\");\n }\n }\n\n const coupon = await createCouponWithRelations(\n {\n couponCode: finalCouponCode,\n isUserBased: isUserBased || false,\n discountPercent: discountPercent?.toString(),\n flatDiscount: flatDiscount?.toString(),\n minOrder: minOrder?.toString(),\n productIds: productIds || null,\n createdBy: staffUserId,\n maxValue: maxValue?.toString(),\n isApplyForAll: isApplyForAll || false,\n validTill: validTill ? dayjs(validTill).toDate() : undefined,\n maxLimitForUser,\n exclusiveApply: exclusiveApply || false,\n },\n applicableUsers,\n applicableProducts\n );\n\n /*\n // Old implementation - direct DB query with transaction:\n const result = await db.insert(coupons).values({\n couponCode: finalCouponCode,\n isUserBased: isUserBased || false,\n discountPercent: discountPercent?.toString(),\n flatDiscount: flatDiscount?.toString(),\n minOrder: minOrder?.toString(),\n productIds: productIds || null,\n createdBy: staffUserId,\n maxValue: maxValue?.toString(),\n isApplyForAll: isApplyForAll || false,\n validTill: validTill ? dayjs(validTill).toDate() : undefined,\n maxLimitForUser,\n exclusiveApply: exclusiveApply || false,\n }).returning();\n\n const coupon = result[0];\n\n // Insert applicable users\n if (applicableUsers && applicableUsers.length > 0) {\n await db.insert(couponApplicableUsers).values(\n applicableUsers.map(userId => ({\n couponId: coupon.id,\n userId,\n }))\n );\n }\n\n // Insert applicable products\n if (applicableProducts && applicableProducts.length > 0) {\n await db.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: coupon.id,\n productId,\n }))\n );\n }\n */\n\n return coupon;\n }),\n\n getAll: protectedProcedure\n .input(z.object({\n cursor: z.number().optional(),\n limit: z.number().default(50),\n search: z.string().optional(),\n }))\n .query(async ({ input }): Promise<{ coupons: any[]; nextCursor?: number }> => {\n const { cursor, limit, search } = input;\n \n const { coupons: couponsList, hasMore } = await getAllCouponsFromDb(cursor, limit, search);\n\n const nextCursor = hasMore ? couponsList[couponsList.length - 1].id : undefined;\n \n return { coupons: couponsList, nextCursor };\n }),\n\n getById: protectedProcedure\n .input(z.object({ id: z.number() }))\n .query(async ({ input }): Promise => {\n const couponId = input.id;\n\n const result = await getCouponByIdFromDb(couponId);\n\n if (!result) {\n throw new Error(\"Coupon not found\");\n }\n\n return {\n ...result,\n productIds: (result.productIds as number[]) || undefined,\n applicableUsers: result.applicableUsers.map((au: any) => au.user),\n applicableProducts: result.applicableProducts.map((ap: any) => ap.product),\n };\n }),\n\n update: protectedProcedure\n .input(z.object({\n id: z.number(),\n updates: createCouponBodySchema.extend({\n isInvalidated: z.boolean().optional(),\n }),\n }))\n .mutation(async ({ input }): Promise => {\n const { id, updates } = input;\n\n // Validation: ensure discount types are valid\n if (updates.discountPercent !== undefined && updates.flatDiscount !== undefined) {\n if (updates.discountPercent && updates.flatDiscount) {\n throw new Error(\"Cannot have both discountPercent and flatDiscount\");\n }\n }\n\n // Prepare update data\n const updateData: any = {};\n if (updates.couponCode !== undefined) updateData.couponCode = updates.couponCode;\n if (updates.isUserBased !== undefined) updateData.isUserBased = updates.isUserBased;\n if (updates.discountPercent !== undefined) updateData.discountPercent = updates.discountPercent?.toString();\n if (updates.flatDiscount !== undefined) updateData.flatDiscount = updates.flatDiscount?.toString();\n if (updates.minOrder !== undefined) updateData.minOrder = updates.minOrder?.toString();\n if (updates.maxValue !== undefined) updateData.maxValue = updates.maxValue?.toString();\n if (updates.isApplyForAll !== undefined) updateData.isApplyForAll = updates.isApplyForAll;\n if (updates.validTill !== undefined) updateData.validTill = updates.validTill ? dayjs(updates.validTill).toDate() : null;\n if (updates.maxLimitForUser !== undefined) updateData.maxLimitForUser = updates.maxLimitForUser;\n if (updates.exclusiveApply !== undefined) updateData.exclusiveApply = updates.exclusiveApply;\n if (updates.isInvalidated !== undefined) updateData.isInvalidated = updates.isInvalidated;\n if (updates.productIds !== undefined) updateData.productIds = updates.productIds;\n\n // Using dbService helper (new implementation)\n const coupon = await updateCouponWithRelations(\n id,\n updateData,\n updates.applicableUsers,\n updates.applicableProducts\n );\n\n /*\n // Old implementation - direct DB query:\n const result = await db.update(coupons)\n .set(updateData)\n .where(eq(coupons.id, id))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Coupon not found\");\n }\n\n // Update applicable users: delete existing and insert new\n if (updates.applicableUsers !== undefined) {\n await db.delete(couponApplicableUsers).where(eq(couponApplicableUsers.couponId, id));\n if (updates.applicableUsers.length > 0) {\n await db.insert(couponApplicableUsers).values(\n updates.applicableUsers.map(userId => ({\n couponId: id,\n userId,\n }))\n );\n }\n }\n\n // Update applicable products: delete existing and insert new\n if (updates.applicableProducts !== undefined) {\n await db.delete(couponApplicableProducts).where(eq(couponApplicableProducts.couponId, id));\n if (updates.applicableProducts.length > 0) {\n await db.insert(couponApplicableProducts).values(\n updates.applicableProducts.map(productId => ({\n couponId: id,\n productId,\n }))\n );\n }\n }\n */\n\n return coupon;\n }),\n\n delete: protectedProcedure\n .input(z.object({ id: z.number() }))\n .mutation(async ({ input }): Promise<{ message: string }> => {\n const { id } = input;\n\n await invalidateCouponInDb(id);\n\n return { message: \"Coupon invalidated successfully\" };\n }),\n\n validate: protectedProcedure\n .input(validateCouponBodySchema)\n .query(async ({ input }): Promise => {\n const { code, userId, orderAmount } = input;\n\n if (!code || typeof code !== 'string') {\n return { valid: false, message: \"Invalid coupon code\" };\n }\n\n const result = await validateCouponInDb(code, userId, orderAmount);\n\n return result;\n }),\n\n generateCancellationCoupon: protectedProcedure\n .input(\n z.object({\n orderId: z.number(),\n })\n )\n .mutation(async ({ input, ctx }): Promise => {\n const { orderId } = input;\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n\n // Using dbService helper (new implementation)\n const order = await getOrderWithUser(orderId);\n\n if (!order) {\n throw new Error(\"Order not found\");\n }\n\n if (!order.user) {\n throw new Error(\"User not found for this order\");\n }\n\n // Generate coupon code: first 3 letters of user name or mobile + orderId\n const userNamePrefix = (order.user.name || order.user.mobile || 'USR').substring(0, 3).toUpperCase();\n const couponCode = `${userNamePrefix}${orderId}`;\n\n // Check if coupon code already exists\n const codeExists = await checkCouponExists(couponCode);\n if (codeExists) {\n throw new Error(\"Coupon code already exists\");\n }\n\n // Get order total amount\n const orderAmount = parseFloat(order.totalAmount);\n\n const coupon = await generateCancellationCoupon(\n orderId,\n staffUserId,\n order.userId,\n orderAmount,\n couponCode\n );\n\n /*\n // Old implementation - direct DB query with transaction:\n const coupon = await db.transaction(async (tx) => {\n // Calculate expiry date (30 days from now)\n const expiryDate = new Date();\n expiryDate.setDate(expiryDate.getDate() + 30);\n\n // Create the coupon\n const result = await tx.insert(coupons).values({\n couponCode,\n isUserBased: true,\n flatDiscount: orderAmount.toString(),\n minOrder: orderAmount.toString(),\n maxValue: orderAmount.toString(),\n validTill: expiryDate,\n maxLimitForUser: 1,\n createdBy: staffUserId,\n isApplyForAll: false,\n }).returning();\n\n const coupon = result[0];\n\n // Insert applicable users\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId: order.userId,\n });\n\n // Update order_status with refund coupon ID\n await tx.update(orderStatus)\n .set({ refundCouponId: coupon.id })\n .where(eq(orderStatus.orderId, orderId));\n\n return coupon;\n });\n */\n\n return coupon;\n }),\n\n getReservedCoupons: protectedProcedure\n .input(z.object({\n cursor: z.number().optional(),\n limit: z.number().default(50),\n search: z.string().optional(),\n }))\n .query(async ({ input }): Promise<{ coupons: any[]; nextCursor?: number }> => {\n const { cursor, limit, search } = input;\n\n const { coupons: result, hasMore } = await getReservedCouponsFromDb(cursor, limit, search);\n\n const nextCursor = hasMore ? result[result.length - 1].id : undefined;\n\n return {\n coupons: result,\n nextCursor,\n };\n }),\n\n createReservedCoupon: protectedProcedure\n .input(createCouponBodySchema)\n .mutation(async ({ input, ctx }): Promise => {\n const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableProducts, maxValue, validTill, maxLimitForUser, exclusiveApply } = input;\n\n // Validation: ensure at least one discount type is provided\n if ((!discountPercent && !flatDiscount) || (discountPercent && flatDiscount)) {\n throw new Error(\"Either discountPercent or flatDiscount must be provided (but not both)\");\n }\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n\n // Generate secret code if not provided\n let secretCode = couponCode || `SECRET${Date.now().toString().slice(-6)}${Math.random().toString(36).substring(2, 8).toUpperCase()}`;\n\n // Using dbService helper (new implementation)\n const codeExists = await checkReservedCouponExists(secretCode);\n if (codeExists) {\n throw new Error(\"Secret code already exists\");\n }\n\n const coupon = await createReservedCouponWithProducts(\n {\n secretCode,\n couponCode: couponCode || `RESERVED${Date.now().toString().slice(-6)}`,\n discountPercent: discountPercent?.toString(),\n flatDiscount: flatDiscount?.toString(),\n minOrder: minOrder?.toString(),\n productIds,\n maxValue: maxValue?.toString(),\n validTill: validTill ? dayjs(validTill).toDate() : undefined,\n maxLimitForUser,\n exclusiveApply: exclusiveApply || false,\n createdBy: staffUserId,\n },\n applicableProducts\n );\n\n /*\n // Old implementation - direct DB query:\n const result = await db.insert(reservedCoupons).values({\n secretCode,\n couponCode: couponCode || RESERVED${Date.now().toString().slice(-6)},\n discountPercent: discountPercent?.toString(),\n flatDiscount: flatDiscount?.toString(),\n minOrder: minOrder?.toString(),\n productIds,\n maxValue: maxValue?.toString(),\n validTill: validTill ? dayjs(validTill).toDate() : undefined,\n maxLimitForUser,\n exclusiveApply: exclusiveApply || false,\n createdBy: staffUserId,\n }).returning();\n\n const coupon = result[0];\n\n // Insert applicable products if provided\n if (applicableProducts && applicableProducts.length > 0) {\n await db.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: coupon.id,\n productId,\n }))\n );\n }\n */\n\n return coupon;\n }),\n\n getUsersMiniInfo: protectedProcedure\n .input(z.object({\n search: z.string().optional(),\n limit: z.number().min(1).max(50).default(20),\n offset: z.number().min(0).default(0),\n }))\n .query(async ({ input }): Promise<{ users: UserMiniInfo[] }> => {\n const { search, limit, offset } = input;\n\n const result = await getUsersForCouponFromDb(search, limit, offset);\n\n return result;\n }),\n\n createCoupon: protectedProcedure\n .input(z.object({\n mobile: z.string().min(1, 'Mobile number is required'),\n }))\n .mutation(async ({ input, ctx }): Promise<{ success: boolean; coupon: any }> => {\n const { mobile } = input;\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n\n // Clean mobile number (remove non-digits)\n const cleanMobile = mobile.replace(/\\D/g, '');\n\n // Validate: exactly 10 digits\n if (cleanMobile.length !== 10) {\n throw new Error(\"Mobile number must be exactly 10 digits\");\n }\n\n // Generate unique coupon code\n const timestamp = Date.now().toString().slice(-6);\n const random = Math.random().toString(36).substring(2, 6).toUpperCase();\n const couponCode = `MF${cleanMobile.slice(-4)}${timestamp}${random}`;\n\n // Using dbService helper (new implementation)\n const codeExists = await checkCouponExists(couponCode);\n if (codeExists) {\n throw new Error(\"Generated coupon code already exists - please try again\");\n }\n\n const { coupon, user } = await createCouponForUser(cleanMobile, couponCode, staffUserId);\n\n /*\n // Old implementation - direct DB query with transaction:\n // Check if user exists, create if not\n let user = await db.query.users.findFirst({\n where: eq(users.mobile, cleanMobile),\n });\n\n if (!user) {\n const [newUser] = await db.insert(users).values({\n name: null,\n email: null,\n mobile: cleanMobile,\n }).returning();\n user = newUser;\n }\n\n // Create the coupon\n const [coupon] = await db.insert(coupons).values({\n couponCode,\n isUserBased: true,\n discountPercent: \"20\",\n minOrder: \"1000\",\n maxValue: \"500\",\n maxLimitForUser: 1,\n isApplyForAll: false,\n exclusiveApply: false,\n createdBy: staffUserId,\n validTill: dayjs().add(90, 'days').toDate(),\n }).returning();\n\n // Associate coupon with user\n await db.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId: user.id,\n });\n */\n\n return {\n success: true,\n coupon: {\n id: coupon.id,\n couponCode: coupon.couponCode,\n userId: user.id,\n userMobile: user.mobile,\n discountPercent: 20,\n minOrder: 1000,\n maxValue: 500,\n maxLimitForUser: 1,\n },\n };\n }),\n});\n", "export const fetch = (...args) => globalThis.fetch(...args);\nexport const Headers = globalThis.Headers;\nexport const Request = globalThis.Request;\nexport const Response = globalThis.Response;\nexport const AbortController = globalThis.AbortController;\nexport const FetchError = Error;\nexport const AbortError = Error;\nconst redirectStatus = new Set([\n\t301,\n\t302,\n\t303,\n\t307,\n\t308\n]);\nexport const isRedirect = (code) => redirectStatus.has(code);\nfetch.Promise = globalThis.Promise;\nfetch.isRedirect = isRedirect;\nexport default fetch;\n", "import * as esm from 'node-fetch';\nmodule.exports = Object.entries(esm)\n\t\t\t.filter(([k,]) => k !== 'default')\n\t\t\t.reduce((cjs, [k, value]) =>\n\t\t\t\tObject.defineProperty(cjs, k, { value, enumerable: true }),\n\t\t\t\t\"default\" in esm ? esm.default : {}\n\t\t\t);", "import libDefault from 'node:assert';\nmodule.exports = libDefault;", "import libDefault from 'node:zlib';\nmodule.exports = libDefault;", "function limiter (count) {\n var outstanding = 0\n var jobs = []\n\n function remove () {\n outstanding--\n\n if (outstanding < count) {\n dequeue()\n }\n }\n\n function dequeue () {\n var job = jobs.shift()\n semaphore.queue = jobs.length\n\n if (job) {\n run(job.fn).then(job.resolve).catch(job.reject)\n }\n }\n\n function queue (fn) {\n return new Promise(function (resolve, reject) {\n jobs.push({fn: fn, resolve: resolve, reject: reject})\n semaphore.queue = jobs.length\n })\n }\n\n function run (fn) {\n outstanding++\n try {\n return Promise.resolve(fn()).then(function (result) {\n remove()\n return result\n }, function (error) {\n remove()\n throw error\n })\n } catch (err) {\n remove()\n return Promise.reject(err)\n }\n }\n\n var semaphore = function (fn) {\n if (outstanding >= count) {\n return queue(fn)\n } else {\n return run(fn)\n }\n }\n\n return semaphore\n}\n\nfunction map (items, mapper) {\n var failed = false\n\n var limit = this\n\n return Promise.all(items.map(function () {\n var args = arguments\n return limit(function () {\n if (!failed) {\n return mapper.apply(undefined, args).catch(function (e) {\n failed = true\n throw e\n })\n }\n })\n }))\n}\n\nfunction addExtras (fn) {\n fn.queue = 0\n fn.map = map\n return fn\n}\n\nmodule.exports = function (count) {\n if (count) {\n return addExtras(limiter(count))\n } else {\n return addExtras(function (fn) {\n return fn()\n })\n }\n}\n", "'use strict';\n\nfunction assign(obj, props) {\n for (const key in props) {\n Object.defineProperty(obj, key, {\n value: props[key],\n enumerable: true,\n configurable: true,\n });\n }\n\n return obj;\n}\n\nfunction createError(err, code, props) {\n if (!err || typeof err === 'string') {\n throw new TypeError('Please pass an Error to err-code');\n }\n\n if (!props) {\n props = {};\n }\n\n if (typeof code === 'object') {\n props = code;\n code = undefined;\n }\n\n if (code != null) {\n props.code = code;\n }\n\n try {\n return assign(err, props);\n } catch (_) {\n props.message = err.message;\n props.stack = err.stack;\n\n const ErrClass = function () {};\n\n ErrClass.prototype = Object.create(Object.getPrototypeOf(err));\n\n return assign(new ErrClass(), props);\n }\n}\n\nmodule.exports = createError;\n", "function RetryOperation(timeouts, options) {\n // Compatibility for the old (timeouts, retryForever) signature\n if (typeof options === 'boolean') {\n options = { forever: options };\n }\n\n this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));\n this._timeouts = timeouts;\n this._options = options || {};\n this._maxRetryTime = options && options.maxRetryTime || Infinity;\n this._fn = null;\n this._errors = [];\n this._attempts = 1;\n this._operationTimeout = null;\n this._operationTimeoutCb = null;\n this._timeout = null;\n this._operationStart = null;\n\n if (this._options.forever) {\n this._cachedTimeouts = this._timeouts.slice(0);\n }\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.reset = function() {\n this._attempts = 1;\n this._timeouts = this._originalTimeouts;\n}\n\nRetryOperation.prototype.stop = function() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n this._timeouts = [];\n this._cachedTimeouts = null;\n};\n\nRetryOperation.prototype.retry = function(err) {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n if (!err) {\n return false;\n }\n var currentTime = new Date().getTime();\n if (err && currentTime - this._operationStart >= this._maxRetryTime) {\n this._errors.unshift(new Error('RetryOperation timeout occurred'));\n return false;\n }\n\n this._errors.push(err);\n\n var timeout = this._timeouts.shift();\n if (timeout === undefined) {\n if (this._cachedTimeouts) {\n // retry forever, only keep last error\n this._errors.splice(this._errors.length - 1, this._errors.length);\n this._timeouts = this._cachedTimeouts.slice(0);\n timeout = this._timeouts.shift();\n } else {\n return false;\n }\n }\n\n var self = this;\n var timer = setTimeout(function() {\n self._attempts++;\n\n if (self._operationTimeoutCb) {\n self._timeout = setTimeout(function() {\n self._operationTimeoutCb(self._attempts);\n }, self._operationTimeout);\n\n if (self._options.unref) {\n self._timeout.unref();\n }\n }\n\n self._fn(self._attempts);\n }, timeout);\n\n if (this._options.unref) {\n timer.unref();\n }\n\n return true;\n};\n\nRetryOperation.prototype.attempt = function(fn, timeoutOps) {\n this._fn = fn;\n\n if (timeoutOps) {\n if (timeoutOps.timeout) {\n this._operationTimeout = timeoutOps.timeout;\n }\n if (timeoutOps.cb) {\n this._operationTimeoutCb = timeoutOps.cb;\n }\n }\n\n var self = this;\n if (this._operationTimeoutCb) {\n this._timeout = setTimeout(function() {\n self._operationTimeoutCb();\n }, self._operationTimeout);\n }\n\n this._operationStart = new Date().getTime();\n\n this._fn(this._attempts);\n};\n\nRetryOperation.prototype.try = function(fn) {\n console.log('Using RetryOperation.try() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = function(fn) {\n console.log('Using RetryOperation.start() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = RetryOperation.prototype.try;\n\nRetryOperation.prototype.errors = function() {\n return this._errors;\n};\n\nRetryOperation.prototype.attempts = function() {\n return this._attempts;\n};\n\nRetryOperation.prototype.mainError = function() {\n if (this._errors.length === 0) {\n return null;\n }\n\n var counts = {};\n var mainError = null;\n var mainErrorCount = 0;\n\n for (var i = 0; i < this._errors.length; i++) {\n var error = this._errors[i];\n var message = error.message;\n var count = (counts[message] || 0) + 1;\n\n counts[message] = count;\n\n if (count >= mainErrorCount) {\n mainError = error;\n mainErrorCount = count;\n }\n }\n\n return mainError;\n};\n", "var RetryOperation = require('./retry_operation');\n\nexports.operation = function(options) {\n var timeouts = exports.timeouts(options);\n return new RetryOperation(timeouts, {\n forever: options && options.forever,\n unref: options && options.unref,\n maxRetryTime: options && options.maxRetryTime\n });\n};\n\nexports.timeouts = function(options) {\n if (options instanceof Array) {\n return [].concat(options);\n }\n\n var opts = {\n retries: 10,\n factor: 2,\n minTimeout: 1 * 1000,\n maxTimeout: Infinity,\n randomize: false\n };\n for (var key in options) {\n opts[key] = options[key];\n }\n\n if (opts.minTimeout > opts.maxTimeout) {\n throw new Error('minTimeout is greater than maxTimeout');\n }\n\n var timeouts = [];\n for (var i = 0; i < opts.retries; i++) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n if (options && options.forever && !timeouts.length) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n // sort the array numerically ascending\n timeouts.sort(function(a,b) {\n return a - b;\n });\n\n return timeouts;\n};\n\nexports.createTimeout = function(attempt, opts) {\n var random = (opts.randomize)\n ? (Math.random() + 1)\n : 1;\n\n var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));\n timeout = Math.min(timeout, opts.maxTimeout);\n\n return timeout;\n};\n\nexports.wrap = function(obj, options, methods) {\n if (options instanceof Array) {\n methods = options;\n options = null;\n }\n\n if (!methods) {\n methods = [];\n for (var key in obj) {\n if (typeof obj[key] === 'function') {\n methods.push(key);\n }\n }\n }\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n var original = obj[method];\n\n obj[method] = function retryWrapper(original) {\n var op = exports.operation(options);\n var args = Array.prototype.slice.call(arguments, 1);\n var callback = args.pop();\n\n args.push(function(err) {\n if (op.retry(err)) {\n return;\n }\n if (err) {\n arguments[0] = op.mainError();\n }\n callback.apply(this, arguments);\n });\n\n op.attempt(function() {\n original.apply(obj, args);\n });\n }.bind(obj, original);\n obj[method].options = options;\n }\n};\n", "module.exports = require('./lib/retry');", "'use strict';\n\nvar errcode = require('err-code');\nvar retry = require('retry');\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n\nfunction isRetryError(err) {\n return err && err.code === 'EPROMISERETRY' && hasOwn.call(err, 'retried');\n}\n\nfunction promiseRetry(fn, options) {\n var temp;\n var operation;\n\n if (typeof fn === 'object' && typeof options === 'function') {\n // Swap options and fn when using alternate signature (options, fn)\n temp = options;\n options = fn;\n fn = temp;\n }\n\n operation = retry.operation(options);\n\n return new Promise(function (resolve, reject) {\n operation.attempt(function (number) {\n Promise.resolve()\n .then(function () {\n return fn(function (err) {\n if (isRetryError(err)) {\n err = err.retried;\n }\n\n throw errcode(new Error('Retrying'), 'EPROMISERETRY', { retried: err });\n }, number);\n })\n .then(resolve, function (err) {\n if (isRetryError(err)) {\n err = err.retried;\n\n if (operation.retry(err || new Error())) {\n return;\n }\n }\n\n reject(err);\n });\n });\n });\n}\n\nmodule.exports = promiseRetry;\n", null, "{\n \"name\": \"expo-server-sdk\",\n \"version\": \"4.0.0\",\n \"description\": \"Server-side library for working with Expo using Node.js\",\n \"main\": \"build/ExpoClient.js\",\n \"types\": \"build/ExpoClient.d.ts\",\n \"files\": [\n \"build\"\n ],\n \"engines\": {\n \"node\": \">=20\"\n },\n \"scripts\": {\n \"build\": \"yarn prepack\",\n \"lint\": \"eslint\",\n \"prepack\": \"tsc --project tsconfig.build.json\",\n \"test\": \"jest\",\n \"tsc\": \"tsc\",\n \"watch\": \"tsc --watch\"\n },\n \"jest\": {\n \"coverageDirectory\": \"/../coverage\",\n \"coverageThreshold\": {\n \"global\": {\n \"branches\": 100,\n \"functions\": 100,\n \"lines\": 100,\n \"statements\": 0\n }\n },\n \"preset\": \"ts-jest\",\n \"rootDir\": \"src\",\n \"testEnvironment\": \"node\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/expo/expo-server-sdk-node.git\"\n },\n \"keywords\": [\n \"expo\",\n \"push-notifications\"\n ],\n \"author\": \"support@expo.dev\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/expo/expo-server-sdk-node/issues\"\n },\n \"homepage\": \"https://github.com/expo/expo-server-sdk-node#readme\",\n \"dependencies\": {\n \"node-fetch\": \"^2.6.0\",\n \"promise-limit\": \"^2.7.0\",\n \"promise-retry\": \"^2.0.1\"\n },\n \"devDependencies\": {\n \"@tsconfig/node20\": \"20.1.6\",\n \"@tsconfig/strictest\": \"2.0.5\",\n \"@types/node\": \"22.17.2\",\n \"@types/node-fetch\": \"2.6.12\",\n \"@types/promise-retry\": \"1.1.6\",\n \"eslint\": \"9.33.0\",\n \"eslint-config-universe\": \"15.0.3\",\n \"jest\": \"29.7.0\",\n \"jiti\": \"2.4.2\",\n \"msw\": \"2.10.5\",\n \"prettier\": \"3.6.2\",\n \"ts-jest\": \"29.4.1\",\n \"typescript\": \"5.9.2\"\n },\n \"packageManager\": \"yarn@4.9.2\"\n}\n", null, "/**\n * This file contains constants that are used throughout the application\n * to avoid hardcoding strings in multiple places\n */\n\n// User role and designation constants\nexport const READABLE_ORDER_ID_KEY = 'readableOrderId';\n\n// Queue constants\nexport const NOTIFS_QUEUE = 'notifications';\nexport const OTP_COMMENT_NAME='otp-comment'\n\n// Notification message constants\nexport const ORDER_PLACED_MESSAGE = 'Your order has been placed successfully!';\nexport const PAYMENT_FAILED_MESSAGE = 'Payment failed. Please try again.';\nexport const ORDER_PACKAGED_MESSAGE = 'Your order has been packaged and is ready for delivery.';\nexport const ORDER_OUT_FOR_DELIVERY_MESSAGE = 'Your order is out for delivery.';\nexport const ORDER_DELIVERED_MESSAGE = 'Your order has been delivered.';\nexport const ORDER_CANCELLED_MESSAGE = 'Your order has been cancelled.';\nexport const REFUND_INITIATED_MESSAGE = 'Refund has been initiated for your order.';\nexport const WELCOME_MESSAGE = 'Welcome to Farm2Door! Thank you for joining us.';\n\nexport const REFUND_STATUS = {\n PENDING: 'none',\n NOT_APPLICABLE: 'na',\n PROCESSING: 'initiated',\n SUCCESS: 'success',\n};", "// import { Queue, Worker } from 'bullmq';\nimport { Expo } from 'expo-server-sdk';\nimport { redisUrl } from '@/src/lib/env-exporter'\n// import { db } from '@/src/db/db_index'\nimport { generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport {\n NOTIFS_QUEUE,\n ORDER_PLACED_MESSAGE,\n PAYMENT_FAILED_MESSAGE,\n ORDER_PACKAGED_MESSAGE,\n ORDER_OUT_FOR_DELIVERY_MESSAGE,\n ORDER_DELIVERED_MESSAGE,\n ORDER_CANCELLED_MESSAGE,\n REFUND_INITIATED_MESSAGE\n} from '@/src/lib/const-strings';\n\n\nexport const notificationQueue:any = {};\n\n// export const notificationQueue = new Queue(NOTIFS_QUEUE, {\n// connection: { url: redisUrl },\n// defaultJobOptions: {\n// removeOnComplete: true,\n// removeOnFail: 10,\n// attempts: 3,\n// },\n// });\n\nexport const notificationWorker:any = {};\n// export const notificationWorker = new Worker(NOTIFS_QUEUE, async (job) => {\n// if (!job) return;\n//\n// const { name, data } = job;\n// console.log(`Processing notification job ${job.id} - ${name}`);\n//\n// if (name === 'send-admin-notification') {\n// await sendAdminNotification(data);\n// } else if (name === 'send-notification') {\n// // Handle legacy notification type\n// console.log('Legacy notification job - not implemented yet');\n// }\n// }, {\n// connection: { url: redisUrl },\n// concurrency: 5,\n// });\n\nasync function sendAdminNotification(data: {\n token: string;\n title: string;\n body: string;\n imageUrl: string | null;\n}) {\n const { token, title, body, imageUrl } = data;\n \n // Validate Expo push token\n if (!Expo.isExpoPushToken(token)) {\n console.error(`Invalid Expo push token: ${token}`);\n return;\n }\n \n // Generate signed URL for image if provided\n const signedImageUrl = imageUrl ? await generateSignedUrlFromS3Url(imageUrl) : null;\n \n // Send notification\n const expo = new Expo();\n const message = {\n to: token,\n sound: 'default',\n title,\n body,\n data: { imageUrl },\n ...(signedImageUrl ? {\n attachments: [\n {\n url: signedImageUrl,\n contentType: 'image/jpeg',\n }\n ]\n } : {}),\n };\n \n try {\n const [ticket] = await expo.sendPushNotificationsAsync([message]);\n console.log(`Notification sent:`, ticket);\n } catch (error) {\n console.error(`Failed to send notification:`, error);\n throw error;\n }\n}\n\n// notificationWorker.on('completed', (job) => {\n// if (job) console.log(`Notification job ${job.id} completed`);\n// });\n// notificationWorker.on('failed', (job, err) => {\n// if (job) console.error(`Notification job ${job.id} failed:`, err);\n// });\n\nexport async function scheduleNotification(userId: number, payload: any, options?: { delay?: number; priority?: number }) {\n const jobData = { userId, ...payload };\n await notificationQueue.add('send-notification', jobData, options);\n}\n\n// Utility methods for specific notification events\nexport async function sendOrderPlacedNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Order Placed',\n body: ORDER_PLACED_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendPaymentFailedNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Payment Failed',\n body: PAYMENT_FAILED_MESSAGE,\n type: 'payment',\n orderId\n });\n}\n\nexport async function sendOrderPackagedNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Order Packaged',\n body: ORDER_PACKAGED_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendOrderOutForDeliveryNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Out for Delivery',\n body: ORDER_OUT_FOR_DELIVERY_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendOrderDeliveredNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Order Delivered',\n body: ORDER_DELIVERED_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendOrderCancelledNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Order Cancelled',\n body: ORDER_CANCELLED_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendRefundInitiatedNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Refund Initiated',\n body: REFUND_INITIATED_MESSAGE,\n type: 'refund',\n orderId\n });\n}\n//\n// process.on('SIGTERM', async () => {\n// await notificationQueue.close();\n// await notificationWorker.close();\n// });\n", "// import { createClient, RedisClientType } from 'redis';\nimport { redisUrl } from '@/src/lib/env-exporter'\n\nconst createClient = (args:any) => {}\nclass RedisClient {\n // private client: RedisClientType;\n // private subscriberClient: RedisClientType | null = null;\n // private isConnected: boolean = false;\n //\n private client: any;\n private subscriberrlient: any;\n private isConnected: any = false;\n\n\n constructor() {\n this.client = createClient({\n url: redisUrl,\n });\n\n // this.client.on('error', (err) => {\n // console.error('Redis Client Error:', err);\n // });\n //\n // this.client.on('connect', () => {\n // console.log('Redis Client Connected');\n // this.isConnected = true;\n // });\n //\n // this.client.on('disconnect', () => {\n // console.log('Redis Client Disconnected');\n // this.isConnected = false;\n // });\n //\n // this.client.on('ready', () => {\n // console.log('Redis Client Ready');\n // });\n //\n // this.client.on('reconnecting', () => {\n // console.log('Redis Client Reconnecting');\n // });\n\n // Connect immediately (fire and forget)\n // this.client.connect().catch((err) => {\n // console.error('Failed to connect Redis:', err);\n // });\n }\n\n async set(key: string, value: string, ttlSeconds?: number): Promise {\n if (ttlSeconds) {\n return await this.client.setEx(key, ttlSeconds, value);\n } else {\n return await this.client.set(key, value);\n }\n }\n\n async get(key: string): Promise {\n return await this.client.get(key);\n }\n\n async exists(key: string): Promise {\n const result = await this.client.exists(key);\n return result === 1;\n }\n\n async delete(key: string): Promise {\n return await this.client.del(key);\n }\n\n async lPush(key: string, value: string): Promise {\n return await this.client.lPush(key, value);\n }\n\n async KEYS(pattern: string): Promise {\n return await this.client.KEYS(pattern);\n }\n\n async MGET(keys: string[]): Promise<(string | null)[]> {\n return await this.client.MGET(keys);\n }\n\n // Publish message to a channel\n async publish(channel: string, message: string): Promise {\n return await this.client.publish(channel, message);\n }\n\n // Subscribe to a channel with callback\n async subscribe(channel: string, callback: (message: string) => void): Promise {\n // if (!this.subscriberClient) {\n // this.subscriberClient = createClient({\n // url: redisUrl,\n // });\n //\n // this.subscriberClient.on('error', (err) => {\n // console.error('Redis Subscriber Error:', err);\n // });\n //\n // this.subscriberClient.on('connect', () => {\n // console.log('Redis Subscriber Connected');\n // });\n //\n // await this.subscriberClient.connect();\n // }\n //\n // await this.subscriberClient.subscribe(channel, callback);\n console.log(`Subscribed to channel: ${channel}`);\n }\n\n // Unsubscribe from a channel\n async unsubscribe(channel: string): Promise {\n // if (this.subscriberClient) {\n // await this.subscriberClient.unsubscribe(channel);\n // console.log(`Unsubscribed from channel: ${channel}`);\n // }\n }\n\n disconnect(): void {\n // if (this.isConnected) {\n // this.client.disconnect();\n // }\n // if (this.subscriberClient) {\n // this.subscriberClient.disconnect();\n // }\n }\n\n get isClientConnected(): boolean {\n return this.isConnected;\n }\n}\n\nconst redisClient = new RedisClient();\n\nexport default redisClient;\nexport { RedisClient };\n", "'use strict';\n\n/**\n * Create a bound version of a function with a specified `this` context\n *\n * @param {Function} fn - The function to bind\n * @param {*} thisArg - The value to be passed as the `this` parameter\n * @returns {Function} A new function that will call the original function with the specified `this` context\n */\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n", "'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst { toString } = Object.prototype;\nconst { getPrototypeOf } = Object;\nconst { iterator, toStringTag } = Symbol;\n\nconst kindOf = ((cache) => (thing) => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type;\n};\n\nconst typeOfTest = (type) => (thing) => typeof thing === type;\n\n/**\n * Determine if a value is a non-null object\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst { isArray } = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return (\n val !== null &&\n !isUndefined(val) &&\n val.constructor !== null &&\n !isUndefined(val.constructor) &&\n isFunction(val.constructor.isBuffer) &&\n val.constructor.isBuffer(val)\n );\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n result = ArrayBuffer.isView(val);\n } else {\n result = val && val.buffer && isArrayBuffer(val.buffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = (thing) => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (\n (prototype === null ||\n prototype === Object.prototype ||\n Object.getPrototypeOf(prototype) === null) &&\n !(toStringTag in val) &&\n !(iterator in val)\n );\n};\n\n/**\n * Determine if a value is an empty object (safely handles Buffers)\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an empty object, otherwise false\n */\nconst isEmptyObject = (val) => {\n // Early return for non-objects or Buffers to prevent RangeError\n if (!isObject(val) || isBuffer(val)) {\n return false;\n }\n\n try {\n return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;\n } catch (e) {\n // Fallback for any other objects that might cause RangeError with Object.keys()\n return false;\n }\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a React Native Blob\n * React Native \"blob\": an object with a `uri` attribute. Optionally, it can\n * also have a `name` and `type` attribute to specify filename and content type\n *\n * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71\n * \n * @param {*} value The value to test\n * \n * @returns {boolean} True if value is a React Native Blob, otherwise false\n */\nconst isReactNativeBlob = (value) => {\n return !!(value && typeof value.uri !== 'undefined');\n}\n\n/**\n * Determine if environment is React Native\n * ReactNative `FormData` has a non-standard `getParts()` method\n * \n * @param {*} formData The formData to test\n * \n * @returns {boolean} True if environment is React Native, otherwise false\n */\nconst isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction getGlobal() {\n if (typeof globalThis !== 'undefined') return globalThis;\n if (typeof self !== 'undefined') return self;\n if (typeof window !== 'undefined') return window;\n if (typeof global !== 'undefined') return global;\n return {};\n}\n\nconst G = getGlobal();\nconst FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;\n\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (FormDataCtor && thing instanceof FormDataCtor) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n );\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = [\n 'ReadableStream',\n 'Request',\n 'Response',\n 'Headers',\n].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => {\n return str.trim ? str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n};\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, { allOwnKeys = false } = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Buffer check\n if (isBuffer(obj)) {\n return;\n }\n\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\n/**\n * Finds a key in an object, case-insensitive, returning the actual key name.\n * Returns null if the object is a Buffer or if no match is found.\n *\n * @param {Object} obj - The object to search.\n * @param {string} key - The key to find (case-insensitive).\n * @returns {?string} The actual key name if found, otherwise null.\n */\nfunction findKey(obj, key) {\n if (isBuffer(obj)) {\n return null;\n }\n\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== 'undefined') return globalThis;\n return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * const result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};\n const result = {};\n const assignValue = (val, key) => {\n // Skip dangerous property names to prevent prototype pollution\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return;\n }\n\n const targetKey = (caseless && findKey(result, key)) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else if (!skipUndefined || !isUndefined(val)) {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, { allOwnKeys } = {}) => {\n forEach(\n b,\n (val, key) => {\n if (thisArg && isFunction(val)) {\n Object.defineProperty(a, key, {\n value: bind(val, thisArg),\n writable: true,\n enumerable: true,\n configurable: true,\n });\n } else {\n Object.defineProperty(a, key, {\n value: val,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n },\n { allOwnKeys }\n );\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xfeff) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n Object.defineProperty(constructor.prototype, 'constructor', {\n value: constructor,\n writable: true,\n enumerable: false,\n configurable: true,\n });\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype,\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = ((TypedArray) => {\n // eslint-disable-next-line func-names\n return (thing) => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[iterator];\n\n const _iterator = generator.call(obj);\n\n let result;\n\n while ((result = _iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = (str) => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g, function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n });\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (\n ({ hasOwnProperty }) =>\n (obj, prop) =>\n hasOwnProperty.call(obj, prop)\n)(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error(\"Can not rewrite read-only method '\" + name + \"'\");\n };\n }\n });\n};\n\n/**\n * Converts an array or a delimited string into an object set with values as keys and true as values.\n * Useful for fast membership checks.\n *\n * @param {Array|string} arrayOrString - The array or string to convert.\n * @param {string} delimiter - The delimiter to use if input is a string.\n * @returns {Object} An object with keys from the array or string, values set to true.\n */\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach((value) => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite((value = +value)) ? value : defaultValue;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(\n thing &&\n isFunction(thing.append) &&\n thing[toStringTag] === 'FormData' &&\n thing[iterator]\n );\n}\n\n/**\n * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.\n *\n * @param {Object} obj - The object to convert.\n * @returns {Object} The JSON-compatible object.\n */\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n //Buffer check\n if (isBuffer(source)) {\n return source;\n }\n\n if (!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\n/**\n * Determines if a value is an async function.\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is an async function, otherwise false.\n */\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\n/**\n * Determines if a value is thenable (has then and catch methods).\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is thenable, otherwise false.\n */\nconst isThenable = (thing) =>\n thing &&\n (isObject(thing) || isFunction(thing)) &&\n isFunction(thing.then) &&\n isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\n/**\n * Provides a cross-platform setImmediate implementation.\n * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.\n *\n * @param {boolean} setImmediateSupported - Whether setImmediate is supported.\n * @param {boolean} postMessageSupported - Whether postMessage is supported.\n * @returns {Function} A function to schedule a callback asynchronously.\n */\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported\n ? ((token, callbacks) => {\n _global.addEventListener(\n 'message',\n ({ source, data }) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n },\n false\n );\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, '*');\n };\n })(`axios@${Math.random()}`, [])\n : (cb) => setTimeout(cb);\n})(typeof setImmediate === 'function', isFunction(_global.postMessage));\n\n/**\n * Schedules a microtask or asynchronous callback as soon as possible.\n * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.\n *\n * @type {Function}\n */\nconst asap =\n typeof queueMicrotask !== 'undefined'\n ? queueMicrotask.bind(_global)\n : (typeof process !== 'undefined' && process.nextTick) || _setImmediate;\n\n// *********************\n\nconst isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isEmptyObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isReactNativeBlob,\n isReactNative,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap,\n isIterable,\n};\n", "'use strict';\n\nimport utils from '../utils.js';\n\nclass AxiosError extends Error {\n static from(error, code, config, request, response, customProps) {\n const axiosError = new AxiosError(error.message, code || error.code, config, request, response);\n axiosError.cause = error;\n axiosError.name = error.name;\n\n // Preserve status from the original error if not already set from response\n if (error.status != null && axiosError.status == null) {\n axiosError.status = error.status;\n }\n\n customProps && Object.assign(axiosError, customProps);\n return axiosError;\n }\n\n /**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\n constructor(message, code, config, request, response) {\n super(message);\n \n // Make message enumerable to maintain backward compatibility\n // The native Error constructor sets message as non-enumerable,\n // but axios < v1.13.3 had it as enumerable\n Object.defineProperty(this, 'message', {\n value: message,\n enumerable: true,\n writable: true,\n configurable: true\n });\n \n this.name = 'AxiosError';\n this.isAxiosError = true;\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status;\n }\n }\n\n toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.status,\n };\n }\n}\n\n// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.\nAxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';\nAxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';\nAxiosError.ECONNABORTED = 'ECONNABORTED';\nAxiosError.ETIMEDOUT = 'ETIMEDOUT';\nAxiosError.ERR_NETWORK = 'ERR_NETWORK';\nAxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';\nAxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';\nAxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';\nAxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';\nAxiosError.ERR_CANCELED = 'ERR_CANCELED';\nAxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';\nAxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';\n\nexport default AxiosError;\n", "// eslint-disable-next-line strict\nexport default null;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path\n .concat(key)\n .map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n })\n .join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(\n options,\n {\n metaTokens: true,\n dots: false,\n indexes: false,\n },\n false,\n function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n }\n );\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (utils.isBoolean(value)) {\n return value.toString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (utils.isReactNative(formData) && utils.isReactNativeBlob(value)) {\n formData.append(renderKey(path, key, dots), convertValue(value));\n return false;\n }\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value)))\n ) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) &&\n formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true\n ? renderKey([key], index, dots)\n : indexes === null\n ? key\n : key + '[]',\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable,\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result =\n !(utils.isUndefined(el) || el === null) &&\n visitor.call(formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers);\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n", "'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00',\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder\n ? function (value) {\n return encoder.call(this, value, encode);\n }\n : encode;\n\n return this._pairs\n .map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '')\n .join('&');\n};\n\nexport default AxiosURLSearchParams;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val)\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',')\n .replace(/%20/g, '+');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n if (!params) {\n return url;\n }\n\n const _encode = (options && options.encode) || encode;\n\n const _options = utils.isFunction(options)\n ? {\n serialize: options,\n }\n : options;\n\n const serializeFn = _options && _options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, _options);\n } else {\n serializedParams = utils.isURLSearchParams(params)\n ? params.toString()\n : new AxiosURLSearchParams(params, _options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf('#');\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n", "'use strict';\n\nimport utils from '../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n * @param {Object} options The options for the interceptor, synchronous and runWhen\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null,\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {void}\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n", "'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false,\n legacyInterceptorReqResOrdering: true,\n};\n", "'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n", "'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n", "'use strict';\n\nexport default typeof Blob !== 'undefined' ? Blob : null;\n", "import URLSearchParams from './classes/URLSearchParams.js';\nimport FormData from './classes/FormData.js';\nimport Blob from './classes/Blob.js';\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob,\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],\n};\n", "const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = (typeof navigator === 'object' && navigator) || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv =\n hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = (hasBrowserEnv && window.location.href) || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin,\n};\n", "import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform,\n};\n", "'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), {\n visitor: function (value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n },\n ...options,\n });\n}\n", "'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map((match) => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [\n function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if (\n (isFileList = utils.isFileList(data)) ||\n contentType.indexOf('multipart/form-data') > -1\n ) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? { 'files[]': data } : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n },\n ],\n\n transformResponse: [\n function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (\n data &&\n utils.isString(data) &&\n ((forcedJSONParsing && !this.responseType) || JSONRequested)\n ) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data, this.parseReviver);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n },\n ],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob,\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': undefined,\n },\n },\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n", "'use strict';\n\nimport utils from '../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age',\n 'authorization',\n 'content-length',\n 'content-type',\n 'etag',\n 'expires',\n 'from',\n 'host',\n 'if-modified-since',\n 'if-unmodified-since',\n 'last-modified',\n 'location',\n 'max-forwards',\n 'proxy-authorization',\n 'referer',\n 'retry-after',\n 'user-agent',\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default (rawHeaders) => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders &&\n rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n", "'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header\n .trim()\n .toLowerCase()\n .replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach((methodName) => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function (arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true,\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if (\n !key ||\n self[key] === undefined ||\n _rewrite === true ||\n (_rewrite === undefined && self[key] !== false)\n ) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isObject(header) && utils.isIterable(header)) {\n let obj = {},\n dest,\n key;\n for (const entry of header) {\n if (!utils.isArray(entry)) {\n throw TypeError('Object iterator must return a key-value pair');\n }\n\n obj[(key = entry[0])] = (dest = obj[key])\n ? utils.isArray(dest)\n ? [...dest, entry[1]]\n : [dest, entry[1]]\n : entry[1];\n }\n\n setHeaders(obj, valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(\n key &&\n this[key] !== undefined &&\n (!matcher || matchHeaderValue(this, this[key], key, matcher))\n );\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null &&\n value !== false &&\n (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON())\n .map(([header, value]) => header + ': ' + value)\n .join('\\n');\n }\n\n getSetCookie() {\n return this.get('set-cookie') || [];\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals =\n (this[$internals] =\n this[$internals] =\n {\n accessors: {},\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor([\n 'Content-Type',\n 'Content-Length',\n 'Accept',\n 'Accept-Encoding',\n 'User-Agent',\n 'Authorization',\n]);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n },\n };\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n", "'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n", "'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\n\nclass CanceledError extends AxiosError {\n /**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\n constructor(message, config, request) {\n super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n this.__CANCEL__ = true;\n }\n}\n\nexport default CanceledError;\n", "'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(\n new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][\n Math.floor(response.status / 100) - 4\n ],\n response.config,\n response.request,\n response\n )\n );\n }\n}\n", "'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return (match && match[1]) || '';\n}\n", "'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round((bytesCount * 1000) / passed) : undefined;\n };\n}\n\nexport default speedometer;\n", "/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn(...args);\n };\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if (passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs);\n }, threshold - passed);\n }\n }\n };\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n", "import speedometer from './speedometer.js';\nimport throttle from './throttle.js';\nimport utils from '../utils.js';\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle((e) => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? loaded / total : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true,\n };\n\n listener(data);\n }, freq);\n};\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [\n (loaded) =>\n throttled[0]({\n lengthComputable,\n total,\n loaded,\n }),\n throttled[1],\n ];\n};\n\nexport const asyncDecorator =\n (fn) =>\n (...args) =>\n utils.asap(() => fn(...args));\n", "import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n })(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n )\n : () => true;\n", "import utils from '../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n ? // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure, sameSite) {\n if (typeof document === 'undefined') return;\n\n const cookie = [`${name}=${encodeURIComponent(value)}`];\n\n if (utils.isNumber(expires)) {\n cookie.push(`expires=${new Date(expires).toUTCString()}`);\n }\n if (utils.isString(path)) {\n cookie.push(`path=${path}`);\n }\n if (utils.isString(domain)) {\n cookie.push(`domain=${domain}`);\n }\n if (secure === true) {\n cookie.push('secure');\n }\n if (utils.isString(sameSite)) {\n cookie.push(`SameSite=${sameSite}`);\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n if (typeof document === 'undefined') return null;\n const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));\n return match ? decodeURIComponent(match[1]) : null;\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000, '/');\n },\n }\n : // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {},\n };\n", "'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n if (typeof url !== 'string') {\n return false;\n }\n\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n", "'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n", "'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst headersToObject = (thing) => (thing instanceof AxiosHeaders ? { ...thing } : thing);\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({ caseless }, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(a, b, prop, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b, prop) =>\n mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),\n };\n\n utils.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {\n if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;\n const merge = utils.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n", "import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport isURLSameOrigin from './isURLSameOrigin.js';\nimport cookies from './cookies.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport mergeConfig from '../core/mergeConfig.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport buildURL from './buildURL.js';\n\nexport default (config) => {\n const newConfig = mergeConfig({}, config);\n\n let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(\n buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),\n config.params,\n config.paramsSerializer\n );\n\n // HTTP basic authentication\n if (auth) {\n headers.set(\n 'Authorization',\n 'Basic ' +\n btoa(\n (auth.username || '') +\n ':' +\n (auth.password ? unescape(encodeURIComponent(auth.password)) : '')\n )\n );\n }\n\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // browser handles it\n } else if (utils.isFunction(data.getHeaders)) {\n // Node.js FormData (like form-data package)\n const formHeaders = data.getHeaders();\n // Only set safe headers to avoid overwriting security headers\n const allowedHeaders = ['content-type', 'content-length'];\n Object.entries(formHeaders).forEach(([key, val]) => {\n if (allowedHeaders.includes(key.toLowerCase())) {\n headers.set(key, val);\n }\n });\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n};\n", "import utils from '../utils.js';\nimport settle from '../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport { progressEventReducer } from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported &&\n function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let { responseType, onUploadProgress, onDownloadProgress } = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData =\n !responseType || responseType === 'text' || responseType === 'json'\n ? request.responseText\n : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request,\n };\n\n settle(\n function _resolve(value) {\n resolve(value);\n done();\n },\n function _reject(err) {\n reject(err);\n done();\n },\n response\n );\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (\n request.status === 0 &&\n !(request.responseURL && request.responseURL.indexOf('file:') === 0)\n ) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError(event) {\n // Browsers deliver a ProgressEvent in XHR onerror\n // (message may be empty; when present, surface it)\n // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event\n const msg = event && event.message ? event.message : 'Network Error';\n const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);\n // attach the underlying event for consumers who want details\n err.event = event || null;\n reject(err);\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout\n ? 'timeout of ' + _config.timeout + 'ms exceeded'\n : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(\n new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request\n )\n );\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = (cancel) => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted\n ? onCanceled()\n : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(\n new AxiosError(\n 'Unsupported protocol ' + protocol + ':',\n AxiosError.ERR_BAD_REQUEST,\n config\n )\n );\n return;\n }\n\n // Send the request\n request.send(requestData || null);\n });\n };\n", "import CanceledError from '../cancel/CanceledError.js';\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n const { length } = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(\n err instanceof AxiosError\n ? err\n : new CanceledError(err instanceof Error ? err.message : err)\n );\n }\n };\n\n let timer =\n timeout &&\n setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));\n }, timeout);\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach((signal) => {\n signal.unsubscribe\n ? signal.unsubscribe(onabort)\n : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n };\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const { signal } = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n }\n};\n\nexport default composeSignals;\n", "export const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n};\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n};\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n};\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n };\n\n return new ReadableStream(\n {\n async pull(controller) {\n try {\n const { done, value } = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = (bytes += len);\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n },\n },\n {\n highWaterMark: 2,\n }\n );\n};\n", "import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport composeSignals from '../helpers/composeSignals.js';\nimport { trackStream } from '../helpers/trackStream.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {\n progressEventReducer,\n progressEventDecorator,\n asyncDecorator,\n} from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\nimport settle from '../core/settle.js';\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst { isFunction } = utils;\n\nconst globalFetchAPI = (({ Request, Response }) => ({\n Request,\n Response,\n}))(utils.global);\n\nconst { ReadableStream, TextEncoder } = utils.global;\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false;\n }\n};\n\nconst factory = (env) => {\n env = utils.merge.call(\n {\n skipUndefined: true,\n },\n globalFetchAPI,\n env\n );\n\n const { fetch: envFetch, Request, Response } = env;\n const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';\n const isRequestSupported = isFunction(Request);\n const isResponseSupported = isFunction(Response);\n\n if (!isFetchSupported) {\n return false;\n }\n\n const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);\n\n const encodeText =\n isFetchSupported &&\n (typeof TextEncoder === 'function'\n ? (\n (encoder) => (str) =>\n encoder.encode(str)\n )(new TextEncoder())\n : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));\n\n const supportsRequestStream =\n isRequestSupported &&\n isReadableStreamSupported &&\n test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n });\n\n const supportsResponseStream =\n isResponseSupported &&\n isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n const resolvers = {\n stream: supportsResponseStream && ((res) => res.body),\n };\n\n isFetchSupported &&\n (() => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {\n !resolvers[type] &&\n (resolvers[type] = (res, config) => {\n let method = res && res[type];\n\n if (method) {\n return method.call(res);\n }\n\n throw new AxiosError(\n `Response type '${type}' is not supported`,\n AxiosError.ERR_NOT_SUPPORT,\n config\n );\n });\n });\n })();\n\n const getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if (utils.isBlob(body)) {\n return body.size;\n }\n\n if (utils.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if (utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if (utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if (utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n };\n\n const resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n };\n\n return async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions,\n } = resolveConfig(config);\n\n let _fetch = envFetch || fetch;\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals(\n [signal, cancelToken && cancelToken.toAbortSignal()],\n timeout\n );\n\n let request = null;\n\n const unsubscribe =\n composedSignal &&\n composedSignal.unsubscribe &&\n (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress &&\n supportsRequestStream &&\n method !== 'get' &&\n method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: 'half',\n });\n\n let contentTypeHeader;\n\n if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader);\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;\n\n const resolvedOptions = {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: 'half',\n credentials: isCredentialsSupported ? withCredentials : undefined,\n };\n\n request = isRequestSupported && new Request(url, resolvedOptions);\n\n let response = await (isRequestSupported\n ? _fetch(request, fetchOptions)\n : _fetch(url, resolvedOptions));\n\n const isStreamResponse =\n supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach((prop) => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] =\n (onDownloadProgress &&\n progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n )) ||\n [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](\n response,\n config\n );\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request,\n });\n });\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError(\n 'Network Error',\n AxiosError.ERR_NETWORK,\n config,\n request,\n err && err.response\n ),\n {\n cause: err.cause || err,\n }\n );\n }\n\n throw AxiosError.from(err, err && err.code, config, request, err && err.response);\n }\n };\n};\n\nconst seedCache = new Map();\n\nexport const getFetch = (config) => {\n let env = (config && config.env) || {};\n const { fetch, Request, Response } = env;\n const seeds = [Request, Response, fetch];\n\n let len = seeds.length,\n i = len,\n seed,\n target,\n map = seedCache;\n\n while (i--) {\n seed = seeds[i];\n target = map.get(seed);\n\n target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));\n\n map = target;\n }\n\n return target;\n};\n\nconst adapter = getFetch();\n\nexport default adapter;\n", "import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport * as fetchAdapter from './fetch.js';\nimport AxiosError from '../core/AxiosError.js';\n\n/**\n * Known adapters mapping.\n * Provides environment-specific adapters for Axios:\n * - `http` for Node.js\n * - `xhr` for browsers\n * - `fetch` for fetch API-based requests\n *\n * @type {Object}\n */\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: {\n get: fetchAdapter.getFetch,\n },\n};\n\n// Assign adapter names for easier debugging and identification\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', { value });\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', { value });\n }\n});\n\n/**\n * Render a rejection reason string for unknown or unsupported adapters\n *\n * @param {string} reason\n * @returns {string}\n */\nconst renderReason = (reason) => `- ${reason}`;\n\n/**\n * Check if the adapter is resolved (function, null, or false)\n *\n * @param {Function|null|false} adapter\n * @returns {boolean}\n */\nconst isResolvedHandle = (adapter) =>\n utils.isFunction(adapter) || adapter === null || adapter === false;\n\n/**\n * Get the first suitable adapter from the provided list.\n * Tries each adapter in order until a supported one is found.\n * Throws an AxiosError if no adapter is suitable.\n *\n * @param {Array|string|Function} adapters - Adapter(s) by name or function.\n * @param {Object} config - Axios request configuration\n * @throws {AxiosError} If no suitable adapter is available\n * @returns {Function} The resolved adapter function\n */\nfunction getAdapter(adapters, config) {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const { length } = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n const reasons = Object.entries(rejectedReasons).map(\n ([id, state]) =>\n `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length\n ? reasons.length > 1\n ? 'since :\\n' + reasons.map(renderReason).join('\\n')\n : ' ' + renderReason(reasons[0])\n : 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n}\n\n/**\n * Exports Axios adapters and utility to resolve an adapter\n */\nexport default {\n /**\n * Resolve an adapter from a list of adapter names or functions.\n * @type {Function}\n */\n getAdapter,\n\n /**\n * Exposes all known adapters\n * @type {Object}\n */\n adapters: knownAdapters,\n};\n", "'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from '../adapters/adapters.js';\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(config, config.transformRequest);\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);\n\n return adapter(config).then(\n function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(config, config.transformResponse, response);\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n },\n function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n }\n );\n}\n", "export const VERSION = \"1.13.6\";", "'use strict';\n\nimport { VERSION } from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return (\n '[Axios v' +\n VERSION +\n \"] Transitional option '\" +\n opt +\n \"'\" +\n desc +\n (message ? '. ' + message : '')\n );\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError(\n 'option ' + opt + ' must be ' + result,\n AxiosError.ERR_BAD_OPTION_VALUE\n );\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators,\n};\n", "'use strict';\n\nimport utils from '../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\nimport transitionalDefaults from '../defaults/transitional.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig || {};\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager(),\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n try {\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n } catch (e) {\n // ignore the case where \"stack\" is an un-writable property\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const { transitional, paramsSerializer, headers } = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(\n transitional,\n {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean),\n legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),\n },\n false\n );\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer,\n };\n } else {\n validator.assertOptions(\n paramsSerializer,\n {\n encode: validators.function,\n serialize: validators.function,\n },\n true\n );\n }\n }\n\n // Set config.allowAbsoluteUrls\n if (config.allowAbsoluteUrls !== undefined) {\n // do nothing\n } else if (this.defaults.allowAbsoluteUrls !== undefined) {\n config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n } else {\n config.allowAbsoluteUrls = true;\n }\n\n validator.assertOptions(\n config,\n {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken'),\n },\n true\n );\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(headers.common, headers[config.method]);\n\n headers &&\n utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {\n delete headers[method];\n });\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n const transitional = config.transitional || transitionalDefaults;\n const legacyInterceptorReqResOrdering =\n transitional && transitional.legacyInterceptorReqResOrdering;\n\n if (legacyInterceptorReqResOrdering) {\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n } else {\n requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n }\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift(...requestInterceptorChain);\n chain.push(...responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function (url, config) {\n return this.request(\n mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data,\n })\n );\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(\n mergeConfig(config || {}, {\n method,\n headers: isForm\n ? {\n 'Content-Type': 'multipart/form-data',\n }\n : {},\n url,\n data,\n })\n );\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n", "'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then((cancel) => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = (onfulfilled) => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise((resolve) => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel,\n };\n }\n}\n\nexport default CancelToken;\n", "'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * const args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n", "'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && payload.isAxiosError === true;\n}\n", "const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n WebServerIsDown: 521,\n ConnectionTimedOut: 522,\n OriginIsUnreachable: 523,\n TimeoutOccurred: 524,\n SslHandshakeFailed: 525,\n InvalidSslCertificate: 526,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n", "'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport { VERSION } from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from './core/AxiosHeaders.js';\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, { allOwnKeys: true });\n\n // Copy context to instance\n utils.extend(instance, context, null, { allOwnKeys: true });\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = (thing) => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios;\n", "import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig,\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig,\n};\n", "import axios from 'axios';\nimport { isDevMode, telegramBotToken, telegramChatIds } from '@/src/lib/env-exporter'\n\nconst BOT_TOKEN = telegramBotToken;\nconst CHAT_IDS = telegramChatIds;\nconst TELEGRAM_API_URL = `https://api.telegram.org/bot${BOT_TOKEN}`;\n\n/**\n * Send a message to Telegram bot\n * @param message The message text to send\n * @returns Promise indicating success, failure, or null if dev mode\n */\nexport const sendTelegramMessage = async (message: string): Promise => {\n if (isDevMode) {\n return null;\n }\n try {\n const results = await Promise.all(\n CHAT_IDS.map(async (chatId) => {\n try {\n const response = await axios.post(`${TELEGRAM_API_URL}/sendMessage`, {\n chat_id: chatId,\n text: message,\n parse_mode: 'HTML',\n });\n\n if (response.data && response.data.ok) {\n console.log(`Telegram message sent successfully to ${chatId}`);\n return true;\n } else {\n console.error(`Telegram API error for ${chatId}:`, response.data);\n return false;\n }\n } catch (error) {\n console.error(`Failed to send Telegram message to ${chatId}:`, error);\n return false;\n }\n })\n ); \n\n console.log('sent telegram message successfully')\n \n\n // Return true if at least one message was sent successfully\n return results.some((result) => result);\n } catch (error) {\n console.error('Failed to send Telegram message:', error);\n return false;\n }\n};\n", "import {\n getOrdersByIdsWithFullData,\n getOrderByIdWithFullData,\n} from '@/src/dbService'\nimport redisClient from '@/src/lib/redis-client'\nimport { sendTelegramMessage } from '@/src/lib/telegram-service'\n\nconst ORDER_CHANNEL = 'orders:placed';\nconst CANCELLED_CHANNEL = 'orders:cancelled';\n\ninterface OrderIdMessage {\n orderIds: number[];\n}\n\ninterface CancellationMessage {\n orderId: number;\n cancelledBy: 'user' | 'admin';\n reason: string;\n cancelledAt: string;\n}\n\nconst formatDateTime = (dateStr: string | null | undefined): string => {\n if (!dateStr) return 'N/A';\n return new Date(dateStr).toLocaleString('en-IN', {\n dateStyle: 'medium',\n timeStyle: 'short',\n timeZone: 'Asia/Kolkata',\n });\n};\n\nconst formatOrderMessageWithFullData = (ordersData: any[]): string => {\n let message = '\uD83D\uDED2 New Order Placed\\n\\n';\n\n ordersData.forEach((order, index) => {\n message += `Order ${order.id}\\n`;\n\n message += '\uD83D\uDCE6 Items:\\n';\n order.orderItems?.forEach((item: any) => {\n message += ` \u2022 ${item.product?.name || 'Unknown'} x${item.quantity}\\n`;\n });\n\n message += `\\n\uD83D\uDCB0 Total: \u20B9${order.totalAmount}\\n`;\n\n message += `\uD83D\uDE9A Delivery: ${\n order.isFlashDelivery ? 'Flash Delivery' : formatDateTime(order.slot?.deliveryTime)\n }\\n`;\n\n message += `\\n\uD83D\uDCCD Address:\\n`;\n message += ` ${order.address?.name || 'N/A'}\\n`;\n message += ` ${order.address?.addressLine1 || ''}\\n`;\n if (order.address?.addressLine2) {\n message += ` ${order.address.addressLine2}\\n`;\n }\n message += ` ${order.address?.city || ''}, ${order.address?.state || ''} - ${order.address?.pincode || ''}\\n`;\n if (order.address?.phone) {\n message += ` \uD83D\uDCDE ${order.address.phone}\\n`;\n }\n\n if (index < ordersData.length - 1) {\n message += '\\n---\\n\\n';\n }\n });\n\n return message;\n};\n\nconst formatCancellationMessage = (orderData: any, cancellationData: CancellationMessage): string => {\n const message = `\u274C Order Cancelled\n\nOrder #${orderData.id}\n\n\uD83D\uDC64 Name: ${orderData.address?.name || 'N/A'}\n\uD83D\uDCDE Phone: ${orderData.address?.phone || 'N/A'}\n\n\uD83D\uDCE6 Items:\n${orderData.orderItems?.map((item: any) => ` \u2022 ${item.product?.name || 'Unknown'} x${item.quantity}`).join('\\n') || ' N/A'}\n\n\uD83D\uDCB0 Total: \u20B9${orderData.totalAmount}\n\uD83D\uDCB3 Refund: ${orderData.refundStatus === 'na' ? 'N/A (COD)' : orderData.refundStatus || 'Pending'}\n\n\u2753 Reason: ${cancellationData.reason}\n\uD83D\uDC64 Cancelled by: ${cancellationData.cancelledBy === 'admin' ? 'Admin' : 'User'}\n\u23F0 Time: ${formatDateTime(cancellationData.cancelledAt)}\n`;\n\n return message;\n};\n\n/**\n * Start the post order handler\n * Subscribes to the orders:placed channel and sends to Telegram\n */\nexport const startOrderHandler = async (): Promise => {\n try {\n console.log('Starting post order handler...');\n\n await redisClient.subscribe(ORDER_CHANNEL, async (message: string) => {\n try {\n const { orderIds }: OrderIdMessage = JSON.parse(message);\n console.log('New order received, sending to Telegram...');\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { orders } from '@/src/db/schema'\n import { inArray } from 'drizzle-orm';\n\n const ordersData = await db.query.orders.findMany({\n where: inArray(orders.id, orderIds),\n with: {\n address: true,\n orderItems: { with: { product: true } },\n slot: true,\n },\n });\n */\n\n const ordersData = await getOrdersByIdsWithFullData(orderIds);\n\n const telegramMessage = formatOrderMessageWithFullData(ordersData);\n await sendTelegramMessage(telegramMessage);\n } catch (error) {\n console.error('Failed to process order message:', error);\n await sendTelegramMessage(`\u26A0\uFE0F Error parsing order: ${message}`);\n }\n });\n\n console.log('Post order handler started successfully');\n } catch (error) {\n console.error('Failed to start post order handler:', error);\n throw error;\n }\n};\n\n/**\n * Stop the post order handler\n */\nexport const stopOrderHandler = async (): Promise => {\n try {\n await redisClient.unsubscribe(ORDER_CHANNEL);\n console.log('Post order handler stopped');\n } catch (error) {\n console.error('Error stopping post order handler:', error);\n }\n};\n\nexport const startCancellationHandler = async (): Promise => {\n try {\n console.log('Starting cancellation handler...');\n\n await redisClient.subscribe(CANCELLED_CHANNEL, async (message: string) => {\n try {\n const cancellationData: CancellationMessage = JSON.parse(message);\n console.log('Order cancellation received, sending to Telegram...');\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { orders } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n const orderData = await db.query.orders.findFirst({\n where: eq(orders.id, cancellationData.orderId),\n with: {\n address: true,\n orderItems: { with: { product: true } },\n refunds: true,\n },\n });\n */\n\n const orderData = await getOrderByIdWithFullData(cancellationData.orderId);\n\n if (!orderData) {\n console.error('Order not found for cancellation:', cancellationData.orderId);\n await sendTelegramMessage(`\u26A0\uFE0F Order ${cancellationData.orderId} was cancelled but could not be found in database`);\n return;\n }\n\n const refundStatus = orderData.refunds?.[0]?.refundStatus || 'pending';\n\n const telegramMessage = formatCancellationMessage({ ...orderData, refundStatus }, cancellationData);\n await sendTelegramMessage(telegramMessage);\n } catch (error) {\n console.error('Failed to process cancellation message:', error);\n await sendTelegramMessage(`\u26A0\uFE0F Error processing cancellation: ${message}`);\n }\n });\n\n console.log('Cancellation handler started successfully');\n } catch (error) {\n console.error('Failed to start cancellation handler:', error);\n throw error;\n }\n};\n\nexport const stopCancellationHandler = async (): Promise => {\n try {\n await redisClient.unsubscribe(CANCELLED_CHANNEL);\n console.log('Cancellation handler stopped');\n } catch (error) {\n console.error('Error stopping cancellation handler:', error);\n }\n};\n\nexport const publishOrder = async (orderDetails: OrderIdMessage): Promise => {\n try {\n const message = JSON.stringify(orderDetails);\n await redisClient.publish(ORDER_CHANNEL, message);\n return true;\n } catch (error) {\n console.error('Failed to publish order:', error);\n return false;\n }\n};\n\nexport const publishFormattedOrder = async (\n createdOrders: any[],\n ordersBySlot: Map\n): Promise => {\n try {\n const orderIds = createdOrders.map(order => order.id);\n return await publishOrder({ orderIds });\n } catch (error) {\n console.error('Failed to format and publish order:', error);\n return false;\n }\n};\n\nexport const publishCancellation = async (\n orderId: number,\n cancelledBy: 'user' | 'admin',\n reason: string\n): Promise => {\n try {\n const message: CancellationMessage = {\n orderId,\n cancelledBy,\n reason,\n cancelledAt: new Date().toISOString(),\n };\n await redisClient.publish(CANCELLED_CHANNEL, JSON.stringify(message));\n console.log('Cancellation published to Redis:', orderId);\n return true;\n } catch (error) {\n console.error('Failed to publish cancellation:', error);\n return false;\n }\n};\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllUserNegativityScores as getAllUserNegativityScoresFromDb,\n getUserNegativityScore as getUserNegativityScoreFromDb,\n type UserNegativityData,\n} from '@/src/dbService'\n\nexport async function initializeUserNegativityStore(): Promise {\n try {\n console.log('Initializing user negativity store in Redis...')\n\n const results = await getAllUserNegativityScoresFromDb()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { userIncidents } from '@/src/db/schema'\n import { sum } from 'drizzle-orm'\n\n const results = await db\n .select({\n userId: userIncidents.userId,\n totalNegativityScore: sum(userIncidents.negativityScore).mapWith(Number),\n })\n .from(userIncidents)\n .groupBy(userIncidents.userId);\n */\n\n // for (const { userId, totalNegativityScore } of results) {\n // await redisClient.set(\n // `user:negativity:${userId}`,\n // totalNegativityScore.toString()\n // )\n // }\n\n console.log(`User negativity store initialized for ${results.length} users`)\n } catch (error) {\n console.error('Error initializing user negativity store:', error)\n throw error\n }\n}\n\nexport async function getUserNegativity(userId: number): Promise {\n try {\n // const key = `user:negativity:${userId}`\n // const data = await redisClient.get(key)\n //\n // if (!data) {\n // return 0\n // }\n //\n // return parseInt(data, 10)\n\n return await getUserNegativityScoreFromDb(userId)\n } catch (error) {\n console.error(`Error getting negativity score for user ${userId}:`, error)\n return 0\n }\n}\n\nexport async function getAllUserNegativityScores(): Promise> {\n try {\n // const keys = await redisClient.KEYS('user:negativity:*')\n //\n // if (keys.length === 0) return {}\n //\n // const values = await redisClient.MGET(keys)\n //\n // const result: Record = {}\n // for (let i = 0; i < keys.length; i++) {\n // const key = keys[i]\n // const value = values[i]\n //\n // const match = key.match(/user:negativity:(\\d+)/)\n // if (match && value) {\n // const userId = parseInt(match[1], 10)\n // result[userId] = parseInt(value, 10)\n // }\n // }\n //\n // return result\n\n const results = await getAllUserNegativityScoresFromDb()\n\n const result: Record = {}\n for (const { userId, totalNegativityScore } of results) {\n result[userId] = totalNegativityScore\n }\n return result\n } catch (error) {\n console.error('Error getting all user negativity scores:', error)\n return {}\n }\n}\n\nexport async function getMultipleUserNegativityScores(\n userIds: number[]\n): Promise> {\n try {\n if (userIds.length === 0) return {}\n\n // const keys = userIds.map((id) => `user:negativity:${id}`)\n //\n // const values = await redisClient.MGET(keys)\n //\n // const result: Record = {}\n // for (let i = 0; i < userIds.length; i++) {\n // const value = values[i]\n // if (value) {\n // result[userIds[i]] = parseInt(value, 10)\n // } else {\n // result[userIds[i]] = 0\n // }\n // }\n //\n // return result\n\n const result: Record = {}\n for (const userId of userIds) {\n result[userId] = await getUserNegativityScoreFromDb(userId)\n }\n return result\n } catch (error) {\n console.error('Error getting multiple user negativity scores:', error)\n return {}\n }\n}\n\nexport async function recomputeUserNegativityScore(userId: number): Promise {\n try {\n const totalScore = await getUserNegativityScoreFromDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { userIncidents } from '@/src/db/schema'\n import { eq, sum } from 'drizzle-orm'\n\n const [result] = await db\n .select({\n totalNegativityScore: sum(userIncidents.negativityScore).mapWith(Number),\n })\n .from(userIncidents)\n .where(eq(userIncidents.userId, userId))\n .limit(1);\n\n const totalScore = result?.totalNegativityScore || 0;\n */\n\n // const key = `user:negativity:${userId}`\n // await redisClient.set(key, totalScore.toString())\n } catch (error) {\n console.error(`Error recomputing negativity score for user ${userId}:`, error)\n throw error\n }\n}\n", "import { router, protectedProcedure } from \"@/src/trpc/trpc-index\"\nimport { z } from \"zod\";\nimport { ApiError } from \"@/src/lib/api-error\"\nimport {\n sendOrderPackagedNotification,\n sendOrderDeliveredNotification,\n} from \"@/src/lib/notif-job\";\nimport { publishCancellation } from \"@/src/lib/post-order-handler\"\nimport { getMultipleUserNegativityScores } from \"@/src/stores/user-negativity-store\"\nimport {\n updateOrderNotes as updateOrderNotesInDb,\n getOrderDetails as getOrderDetailsInDb,\n updateOrderPackaged as updateOrderPackagedInDb,\n updateOrderDelivered as updateOrderDeliveredInDb,\n updateOrderItemPackaging as updateOrderItemPackagingInDb,\n removeDeliveryCharge as removeDeliveryChargeInDb,\n getSlotOrders as getSlotOrdersInDb,\n updateAddressCoords as updateAddressCoordsInDb,\n getAllOrders as getAllOrdersInDb,\n rebalanceSlots as rebalanceSlotsInDb,\n cancelOrder as cancelOrderInDb,\n deleteOrderById as deleteOrderByIdInDb,\n} from '@/src/dbService'\nimport type {\n AdminCancelOrderResult,\n AdminGetAllOrdersResult,\n AdminGetSlotOrdersResult,\n AdminOrderBasicResult,\n AdminOrderDetails,\n AdminOrderItemPackagingResult,\n AdminOrderMessageResult,\n AdminOrderRow,\n AdminOrderUpdateResult,\n AdminRebalanceSlotsResult,\n} from \"@packages/shared\"\n\nconst updateOrderNotesSchema = z.object({\n orderId: z.number(),\n adminNotes: z.string(),\n});\n\nconst getOrderDetailsSchema = z.object({\n orderId: z.number(),\n});\n\nconst updatePackagedSchema = z.object({\n orderId: z.string(),\n isPackaged: z.boolean(),\n});\n\nconst updateDeliveredSchema = z.object({\n orderId: z.string(),\n isDelivered: z.boolean(),\n});\n\nconst updateOrderItemPackagingSchema = z.object({\n orderItemId: z.number(),\n isPackaged: z.boolean().optional(),\n isPackageVerified: z.boolean().optional(),\n});\n\nconst getSlotOrdersSchema = z.object({\n slotId: z.string(),\n});\n\nconst getAllOrdersSchema = z.object({\n cursor: z.number().optional(),\n limit: z.number().default(20),\n slotId: z.number().optional().nullable(),\n packagedFilter: z\n .enum([\"all\", \"packaged\", \"not_packaged\"])\n .optional()\n .default(\"all\"),\n deliveredFilter: z\n .enum([\"all\", \"delivered\", \"not_delivered\"])\n .optional()\n .default(\"all\"),\n cancellationFilter: z\n .enum([\"all\", \"cancelled\", \"not_cancelled\"])\n .optional()\n .default(\"all\"),\n flashDeliveryFilter: z\n .enum([\"all\", \"flash\", \"regular\"])\n .optional()\n .default(\"all\"),\n});\n\nexport const orderRouter = router({\n updateNotes: protectedProcedure\n .input(updateOrderNotesSchema)\n .mutation(async ({ input }): Promise => {\n const { orderId, adminNotes } = input;\n\n const result = await updateOrderNotesInDb(orderId, adminNotes || null)\n\n /*\n // Old implementation - direct DB query:\n const result = await db\n .update(orders)\n .set({\n adminNotes: adminNotes || null,\n })\n .where(eq(orders.id, orderId))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Order not found\");\n }\n */\n\n if (!result) {\n throw new Error(\"Order not found\")\n }\n\n return result as AdminOrderRow;\n }),\n\n getOrderDetails: protectedProcedure\n .input(getOrderDetailsSchema)\n .query(async ({ input }): Promise => {\n const { orderId } = input;\n\n const orderDetails = await getOrderDetailsInDb(orderId)\n\n /*\n // Old implementation - direct DB queries:\n // Single optimized query with all relations\n const orderData = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n payment: true,\n paymentInfo: true,\n orderStatus: true,\n refunds: true,\n },\n });\n\n if (!orderData) {\n throw new Error(\"Order not found\");\n }\n\n // Get coupon usage for this specific order using new orderId field\n const couponUsageData = await db.query.couponUsage.findMany({\n where: eq(couponUsage.orderId, orderData.id),\n with: {\n coupon: true,\n },\n });\n\n let couponData = null;\n if (couponUsageData.length > 0) {\n // Calculate total discount from multiple coupons\n let totalDiscountAmount = 0;\n const orderTotal = parseFloat(orderData.totalAmount.toString());\n\n for (const usage of couponUsageData) {\n let discountAmount = 0;\n\n if (usage.coupon.discountPercent) {\n discountAmount =\n (orderTotal *\n parseFloat(usage.coupon.discountPercent.toString())) /\n 100;\n } else if (usage.coupon.flatDiscount) {\n discountAmount = parseFloat(usage.coupon.flatDiscount.toString());\n }\n\n // Apply max value limit if set\n if (\n usage.coupon.maxValue &&\n discountAmount > parseFloat(usage.coupon.maxValue.toString())\n ) {\n discountAmount = parseFloat(usage.coupon.maxValue.toString());\n }\n\n totalDiscountAmount += discountAmount;\n }\n\n couponData = {\n couponCode: couponUsageData\n .map((u) => u.coupon.couponCode)\n .join(\", \"),\n couponDescription: `${couponUsageData.length} coupons applied`,\n discountAmount: totalDiscountAmount,\n };\n }\n\n // Status determination from included relation\n const statusRecord = orderData.orderStatus?.[0];\n let status: \"pending\" | \"delivered\" | \"cancelled\" = \"pending\";\n if (statusRecord?.isCancelled) {\n status = \"cancelled\";\n } else if (statusRecord?.isDelivered) {\n status = \"delivered\";\n }\n\n // Always include refund data (will be null/undefined if not cancelled)\n const refund = orderData.refunds?.[0];\n\n return {\n id: orderData.id,\n readableId: orderData.id,\n userId: orderData.user.id,\n customerName: `${orderData.user.name}`,\n customerEmail: orderData.user.email,\n customerMobile: orderData.user.mobile,\n address: {\n name: orderData.address.name,\n line1: orderData.address.addressLine1,\n line2: orderData.address.addressLine2,\n city: orderData.address.city,\n state: orderData.address.state,\n pincode: orderData.address.pincode,\n phone: orderData.address.phone,\n },\n slotInfo: orderData.slot\n ? {\n time: orderData.slot.deliveryTime.toISOString(),\n sequence: orderData.slot.deliverySequence,\n }\n : null,\n isCod: orderData.isCod,\n isOnlinePayment: orderData.isOnlinePayment,\n totalAmount: parseFloat(orderData.totalAmount?.toString() || '0') - parseFloat(orderData.deliveryCharge?.toString() || '0'),\n deliveryCharge: parseFloat(orderData.deliveryCharge?.toString() || '0'),\n adminNotes: orderData.adminNotes,\n userNotes: orderData.userNotes,\n createdAt: orderData.createdAt,\n status,\n isPackaged: statusRecord?.isPackaged || false,\n isDelivered: statusRecord?.isDelivered || false,\n items: orderData.orderItems.map((item) => ({\n id: item.id,\n name: item.product.name,\n quantity: item.quantity,\n productSize: item.product.productQuantity,\n price: item.price,\n unit: item.product.unit?.shortNotation,\n amount:\n parseFloat(item.price.toString()) *\n parseFloat(item.quantity || \"0\"),\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n })),\n payment: orderData.payment\n ? {\n status: orderData.payment.status,\n gateway: orderData.payment.gateway,\n merchantOrderId: orderData.payment.merchantOrderId,\n }\n : null,\n paymentInfo: orderData.paymentInfo\n ? {\n status: orderData.paymentInfo.status,\n gateway: orderData.paymentInfo.gateway,\n merchantOrderId: orderData.paymentInfo.merchantOrderId,\n }\n : null,\n // Cancellation details (always included, null if not cancelled)\n cancelReason: statusRecord?.cancelReason || null,\n cancellationReviewed: statusRecord?.cancellationReviewed || false,\n isRefundDone: refund?.refundStatus === \"processed\" || false,\n refundStatus: refund?.refundStatus as RefundStatus,\n refundAmount: refund?.refundAmount\n ? parseFloat(refund.refundAmount.toString())\n : null,\n // Coupon information\n couponData: couponData,\n couponCode: couponData?.couponCode || null,\n couponDescription: couponData?.couponDescription || null,\n discountAmount: couponData?.discountAmount || null,\n orderStatus: statusRecord,\n refundRecord: refund,\n isFlashDelivery: orderData.isFlashDelivery,\n };\n */\n\n if (!orderDetails) {\n throw new Error('Order not found')\n }\n\n return orderDetails\n }),\n\n updatePackaged: protectedProcedure\n .input(updatePackagedSchema)\n .mutation(async ({ input }): Promise => {\n const { orderId, isPackaged } = input;\n\n const result = await updateOrderPackagedInDb(orderId, isPackaged)\n\n /*\n // Old implementation - direct DB queries:\n // Update all order items to the specified packaged state\n await db\n .update(orderItems)\n .set({ is_packaged: isPackaged })\n .where(eq(orderItems.orderId, parseInt(orderId)));\n\n // Also update the order status table for backward compatibility\n if (!isPackaged) {\n await db\n .update(orderStatus)\n .set({ isPackaged, isDelivered: false })\n .where(eq(orderStatus.orderId, parseInt(orderId)));\n } else {\n await db\n .update(orderStatus)\n .set({ isPackaged })\n .where(eq(orderStatus.orderId, parseInt(orderId)));\n }\n\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, parseInt(orderId)),\n });\n if (order) await sendOrderPackagedNotification(order.userId, orderId);\n\n return { success: true };\n */\n\n if (result.userId) await sendOrderPackagedNotification(result.userId, orderId)\n\n return { success: true, userId: result.userId }\n }),\n\n updateDelivered: protectedProcedure\n .input(updateDeliveredSchema)\n .mutation(async ({ input }): Promise => {\n const { orderId, isDelivered } = input;\n\n const result = await updateOrderDeliveredInDb(orderId, isDelivered)\n\n /*\n // Old implementation - direct DB queries:\n await db\n .update(orderStatus)\n .set({ isDelivered })\n .where(eq(orderStatus.orderId, parseInt(orderId)));\n\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, parseInt(orderId)),\n });\n if (order) await sendOrderDeliveredNotification(order.userId, orderId);\n\n return { success: true };\n */\n\n if (result.userId) await sendOrderDeliveredNotification(result.userId, orderId)\n\n return { success: true, userId: result.userId }\n }),\n\n updateOrderItemPackaging: protectedProcedure\n .input(updateOrderItemPackagingSchema)\n .mutation(async ({ input }): Promise => {\n const { orderItemId, isPackaged, isPackageVerified } = input;\n\n const result = await updateOrderItemPackagingInDb(orderItemId, isPackaged, isPackageVerified)\n\n /*\n // Old implementation - direct DB queries:\n // Validate that orderItem exists\n const orderItem = await db.query.orderItems.findFirst({\n where: eq(orderItems.id, orderItemId),\n });\n\n if (!orderItem) {\n throw new ApiError(\"Order item not found\", 404);\n }\n\n // Build update object with only provided fields\n const updateData: any = {};\n if (isPackaged !== undefined) {\n updateData.is_packaged = isPackaged;\n }\n if (isPackageVerified !== undefined) {\n updateData.is_package_verified = isPackageVerified;\n }\n\n // Update the order item\n await db\n .update(orderItems)\n .set(updateData)\n .where(eq(orderItems.id, orderItemId));\n\n return { success: true };\n */\n\n if (!result.updated) {\n throw new ApiError('Order item not found', 404)\n }\n\n return result\n }),\n\n removeDeliveryCharge: protectedProcedure\n .input(z.object({ orderId: z.number() }))\n .mutation(async ({ input }): Promise => {\n const { orderId } = input;\n\n const result = await removeDeliveryChargeInDb(orderId)\n\n /*\n // Old implementation - direct DB queries:\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n });\n\n if (!order) {\n throw new Error('Order not found');\n }\n\n const currentDeliveryCharge = parseFloat(order.deliveryCharge?.toString() || '0');\n const currentTotalAmount = parseFloat(order.totalAmount?.toString() || '0');\n const newTotalAmount = currentTotalAmount - currentDeliveryCharge;\n\n await db\n .update(orders)\n .set({ \n deliveryCharge: '0',\n totalAmount: newTotalAmount.toString()\n })\n .where(eq(orders.id, orderId));\n\n return { success: true, message: 'Delivery charge removed' };\n */\n\n if (!result) {\n throw new Error('Order not found')\n }\n\n return result\n }),\n\n getSlotOrders: protectedProcedure\n .input(getSlotOrdersSchema)\n .query(async ({ input }): Promise => {\n const { slotId } = input;\n\n const result = await getSlotOrdersInDb(slotId)\n\n /*\n // Old implementation - direct DB queries:\n const slotOrders = await db.query.orders.findMany({\n where: eq(orders.slotId, parseInt(slotId)),\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n },\n });\n\n const filteredOrders = slotOrders.filter((order) => {\n const statusRecord = order.orderStatus[0];\n return (\n order.isCod ||\n (statusRecord && statusRecord.paymentStatus === \"success\")\n );\n });\n\n const formattedOrders = filteredOrders.map((order) => {\n const statusRecord = order.orderStatus[0]; // assuming one status per order\n let status: \"pending\" | \"delivered\" | \"cancelled\" = \"pending\";\n if (statusRecord?.isCancelled) {\n status = \"cancelled\";\n } else if (statusRecord?.isDelivered) {\n status = \"delivered\";\n }\n\n const items = order.orderItems.map((item) => ({\n id: item.id,\n name: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n amount: parseFloat(item.quantity) * parseFloat(item.price.toString()),\n unit: item.product.unit?.shortNotation || \"\",\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n }));\n\n return {\n id: order.id,\n readableId: order.id,\n customerName: order.user.name,\n address: `${order.address.addressLine1}${\n order.address.addressLine2 ? `, ${order.address.addressLine2}` : \"\"\n }, ${order.address.city}, ${order.address.state} - ${\n order.address.pincode\n }, Phone: ${order.address.phone}`,\n addressId: order.addressId,\n latitude: order.address.adminLatitude ?? order.address.latitude,\n longitude: order.address.adminLongitude ?? order.address.longitude,\n totalAmount: parseFloat(order.totalAmount),\n items,\n deliveryTime: order.slot?.deliveryTime.toISOString() || null,\n status,\n isPackaged:\n order.orderItems.every((item) => item.is_packaged) || false,\n isDelivered: statusRecord?.isDelivered || false,\n isCod: order.isCod,\n paymentMode: order.isCod ? \"COD\" : \"Online\",\n paymentStatus: statusRecord?.paymentStatus || \"pending\",\n slotId: order.slotId,\n adminNotes: order.adminNotes,\n userNotes: order.userNotes,\n };\n });\n\n return { success: true, data: formattedOrders };\n */\n\n return result\n }),\n\n updateAddressCoords: protectedProcedure\n .input(\n z.object({\n addressId: z.number(),\n latitude: z.number(),\n longitude: z.number(),\n })\n )\n .mutation(async ({ input }): Promise => {\n const { addressId, latitude, longitude } = input;\n\n const result = await updateAddressCoordsInDb(addressId, latitude, longitude)\n\n /*\n // Old implementation - direct DB queries:\n const result = await db\n .update(addresses)\n .set({\n adminLatitude: latitude,\n adminLongitude: longitude,\n })\n .where(eq(addresses.id, addressId))\n .returning();\n\n if (result.length === 0) {\n throw new ApiError(\"Address not found\", 404);\n }\n\n return { success: true };\n */\n\n if (!result.success) {\n throw new ApiError('Address not found', 404)\n }\n\n return result\n }),\n\n getAll: protectedProcedure\n .input(getAllOrdersSchema)\n .query(async ({ input }): Promise => {\n try {\n const result = await getAllOrdersInDb(input)\n const userIds = [...new Set(result.orders.map((order) => order.userId))]\n const negativityScores = await getMultipleUserNegativityScores(userIds)\n\n const orders = result.orders.map((order) => {\n const { userId, userNegativityScore, ...rest } = order\n return {\n ...rest,\n userNegativityScore: negativityScores[userId] || 0,\n }\n })\n\n /*\n // Old implementation - direct DB queries:\n const {\n cursor,\n limit,\n slotId,\n packagedFilter,\n deliveredFilter,\n cancellationFilter,\n flashDeliveryFilter,\n } = input;\n\n let whereCondition: SQL | undefined = eq(orders.id, orders.id); // always true\n if (cursor) {\n whereCondition = and(whereCondition, lt(orders.id, cursor));\n }\n if (slotId) {\n whereCondition = and(whereCondition, eq(orders.slotId, slotId));\n }\n if (packagedFilter === \"packaged\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isPackaged, true)\n );\n } else if (packagedFilter === \"not_packaged\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isPackaged, false)\n );\n }\n if (deliveredFilter === \"delivered\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isDelivered, true)\n );\n } else if (deliveredFilter === \"not_delivered\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isDelivered, false)\n );\n }\n if (cancellationFilter === \"cancelled\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isCancelled, true)\n );\n } else if (cancellationFilter === \"not_cancelled\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isCancelled, false)\n );\n }\n if (flashDeliveryFilter === \"flash\") {\n whereCondition = and(\n whereCondition,\n eq(orders.isFlashDelivery, true)\n );\n } else if (flashDeliveryFilter === \"regular\") {\n whereCondition = and(\n whereCondition,\n eq(orders.isFlashDelivery, false)\n );\n }\n\n const allOrders = await db.query.orders.findMany({\n where: whereCondition,\n orderBy: desc(orders.createdAt),\n limit: limit + 1, // fetch one extra to check if there's more\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n },\n });\n\n const hasMore = allOrders.length > limit;\n const ordersToReturn = hasMore ? allOrders.slice(0, limit) : allOrders;\n\n const userIds = [...new Set(ordersToReturn.map(o => o.userId))];\n const negativityScores = await getMultipleUserNegativityScores(userIds);\n\n const filteredOrders = ordersToReturn.filter((order) => {\n const statusRecord = order.orderStatus[0];\n return (\n order.isCod ||\n (statusRecord && statusRecord.paymentStatus === \"success\")\n );\n });\n\n const formattedOrders = filteredOrders.map((order) => {\n const statusRecord = order.orderStatus[0];\n let status: \"pending\" | \"delivered\" | \"cancelled\" = \"pending\";\n if (statusRecord?.isCancelled) {\n status = \"cancelled\";\n } else if (statusRecord?.isDelivered) {\n status = \"delivered\";\n }\n\n const items = order.orderItems\n .map((item) => ({\n id: item.id,\n name: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n amount:\n parseFloat(item.quantity) * parseFloat(item.price.toString()),\n unit: item.product.unit?.shortNotation || \"\",\n productSize: item.product.productQuantity,\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n }))\n .sort((first, second) => first.id - second.id);\n dayjs.extend(utc);\n return {\n id: order.id,\n orderId: order.id.toString(),\n readableId: order.id,\n customerName: order.user.name,\n customerMobile: order.user.mobile,\n address: `${order.address.addressLine1}${\n order.address.addressLine2\n ? `, ${order.address.addressLine2}`\n : \"\"\n }, ${order.address.city}, ${order.address.state} - ${\n order.address.pincode\n }, Phone: ${order.address.phone}`,\n addressId: order.addressId,\n latitude: order.address.adminLatitude ?? order.address.latitude,\n longitude: order.address.adminLongitude ?? order.address.longitude,\n totalAmount: parseFloat(order.totalAmount),\n deliveryCharge: parseFloat(order.deliveryCharge || \"0\"),\n items,\n createdAt: order.createdAt,\n // deliveryTime: order.slot ? dayjs.utc(order.slot.deliveryTime).format('ddd, MMM D \u2022 h:mm A') : 'Not scheduled',\n deliveryTime: order.slot?.deliveryTime.toISOString() || null,\n status,\n isPackaged:\n order.orderItems.every((item) => item.is_packaged) || false,\n isDelivered: statusRecord?.isDelivered || false,\n isCod: order.isCod,\n isFlashDelivery: order.isFlashDelivery,\n userNotes: order.userNotes,\n adminNotes: order.adminNotes,\n userNegativityScore: negativityScores[order.userId] || 0,\n };\n });\n \n return {\n orders: formattedOrders,\n nextCursor: hasMore\n ? ordersToReturn[ordersToReturn.length - 1].id\n : undefined,\n };\n */\n\n return {\n orders,\n nextCursor: result.nextCursor,\n }\n } catch (e) {\n console.log({ e });\n }\n }),\n\n rebalanceSlots: protectedProcedure\n .input(z.object({ slotIds: z.array(z.number()).min(1).max(50) }))\n .mutation(async ({ input }): Promise => {\n const slotIds = input.slotIds;\n\n const result = await rebalanceSlotsInDb(slotIds)\n\n /*\n // Old implementation - direct DB queries:\n const ordersList = await db.query.orders.findMany({\n where: inArray(orders.slotId, slotIds),\n with: {\n orderItems: {\n with: {\n product: true\n }\n },\n couponUsages: {\n with: {\n coupon: true\n }\n },\n }\n });\n\n const processedOrdersData = ordersList.map((order) => {\n\n let newTotal = order.orderItems.reduce((acc,item) => {\n const latestPrice = +item.product.price;\n const amount = (latestPrice * Number(item.quantity));\n return acc+amount;\n },0)\n\n order.orderItems.forEach(item => {\n item.price = item.product.price;\n item.discountedPrice = item.product.price\n })\n\n const coupon = order.couponUsages[0]?.coupon;\n\n let discount = 0;\n if(coupon && !coupon.isInvalidated && (!coupon.validTill || new Date(coupon.validTill) > new Date())) {\n const proportion = Number(order.orderGroupProportion || 1);\n if(coupon.discountPercent) {\n const maxDiscount = Number(coupon.maxValue || Infinity) * proportion;\n discount = Math.min((newTotal * parseFloat(coupon.discountPercent)) / 100, maxDiscount);\n }\n else {\n discount = Number(coupon.flatDiscount) * proportion;\n }\n }\n newTotal -= discount\n\n const { couponUsages, orderItems: orderItemsRaw, ...rest} = order;\n const updatedOrderItems = orderItemsRaw.map(item => {\n const { product, ...rawOrderItem } = item;\n return rawOrderItem;\n })\n return {order: rest, updatedOrderItems, newTotal }\n })\n\n const updatedOrderIds: number[] = [];\n await db.transaction(async (tx) => {\n for (const { order, updatedOrderItems, newTotal } of processedOrdersData) {\n await tx.update(orders).set({ totalAmount: newTotal.toString() }).where(eq(orders.id, order.id));\n updatedOrderIds.push(order.id);\n\n for (const item of updatedOrderItems) {\n await tx.update(orderItems).set({\n price: item.price,\n discountedPrice: item.discountedPrice\n }).where(eq(orderItems.id, item.id));\n }\n }\n });\n\n return { success: true, updatedOrders: updatedOrderIds, message: `Rebalanced ${updatedOrderIds.length} orders.` };\n */\n\n return result\n }),\n\n cancelOrder: protectedProcedure\n .input(z.object({\n orderId: z.number(),\n reason: z.string().min(1, \"Cancellation reason is required\"),\n }))\n .mutation(async ({ input }): Promise => {\n const { orderId, reason } = input;\n\n const result = await cancelOrderInDb(orderId, reason)\n\n /*\n // Old implementation - direct DB queries:\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n orderStatus: true,\n },\n });\n\n if (!order) {\n throw new ApiError(\"Order not found\", 404);\n }\n\n const status = order.orderStatus[0];\n if (!status) {\n throw new ApiError(\"Order status not found\", 400);\n }\n\n if (status.isCancelled) {\n throw new ApiError(\"Order is already cancelled\", 400);\n }\n\n if (status.isDelivered) {\n throw new ApiError(\"Cannot cancel delivered order\", 400);\n }\n\n const result = await db.transaction(async (tx) => {\n await tx\n .update(orderStatus)\n .set({\n isCancelled: true,\n isCancelledByAdmin: true,\n cancelReason: reason,\n cancellationAdminNotes: reason,\n cancellationReviewed: true,\n cancellationReviewedAt: new Date(),\n })\n .where(eq(orderStatus.id, status.id));\n\n const refundStatus = order.isCod ? \"na\" : \"pending\";\n\n await tx.insert(refunds).values({\n orderId: order.id,\n refundStatus,\n });\n\n return { orderId: order.id, userId: order.userId };\n });\n\n // Publish to Redis for Telegram notification\n await publishCancellation(result.orderId, 'admin', reason);\n\n return { success: true, message: \"Order cancelled successfully\" };\n */\n\n if (!result.success) {\n if (result.error === 'order_not_found') {\n throw new ApiError(result.message, 404)\n }\n if (result.error === 'status_not_found') {\n throw new ApiError(result.message, 400)\n }\n if (result.error === 'already_cancelled') {\n throw new ApiError(result.message, 400)\n }\n if (result.error === 'already_delivered') {\n throw new ApiError(result.message, 400)\n }\n\n throw new ApiError(result.message, 400)\n }\n\n if (result.orderId) {\n await publishCancellation(result.orderId, 'admin', reason)\n }\n\n return { success: true, message: result.message }\n }),\n});\n\n// {\"id\": \"order_Rhh00qJNdjUp8o\", \"notes\": {\"retry\": \"true\", \"customerOrderId\": \"14\"}, \"amount\": 21000, \"entity\": \"order\", \"status\": \"created\", \"receipt\": \"order_14_retry\", \"attempts\": 0, \"currency\": \"INR\", \"offer_id\": null, \"signature\": \"6df20655021f1d6841340f2a2ef2ef9378cb3d43495ab09e85f08aea1a851583\", \"amount_due\": 21000, \"created_at\": 1763575791, \"payment_id\": \"pay_Rhh15cLL28YM7j\", \"amount_paid\": 0}\n\nexport async function deleteOrderById(orderId: number): Promise {\n await deleteOrderByIdInDb(orderId)\n\n /*\n // Old implementation - direct DB queries:\n await db.transaction(async (tx) => {\n await tx.delete(orderItems).where(eq(orderItems.orderId, orderId));\n await tx.delete(orderStatus).where(eq(orderStatus.orderId, orderId));\n await tx.delete(payments).where(eq(payments.orderId, orderId));\n await tx.delete(refunds).where(eq(refunds.orderId, orderId));\n await tx.delete(couponUsage).where(eq(couponUsage.orderId, orderId));\n await tx.delete(complaints).where(eq(complaints.orderId, orderId));\n await tx.delete(orders).where(eq(orders.id, orderId));\n });\n */\n}\n", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport dayjs from 'dayjs'\nimport { appUrl } from '@/src/lib/env-exporter'\nimport {\n checkVendorSnippetExists as checkVendorSnippetExistsInDb,\n getVendorSnippetById as getVendorSnippetByIdInDb,\n getVendorSnippetByCode as getVendorSnippetByCodeInDb,\n getAllVendorSnippets as getAllVendorSnippetsInDb,\n createVendorSnippet as createVendorSnippetInDb,\n updateVendorSnippet as updateVendorSnippetInDb,\n deleteVendorSnippet as deleteVendorSnippetInDb,\n getProductsByIds as getProductsByIdsInDb,\n getVendorSlotById as getVendorSlotByIdInDb,\n getVendorOrdersBySlotId as getVendorOrdersBySlotIdInDb,\n getVendorOrders as getVendorOrdersInDb,\n updateVendorOrderItemPackaging as updateVendorOrderItemPackagingInDb,\n getSlotsAfterDate as getSlotsAfterDateInDb,\n} from '@/src/dbService'\nimport type {\n AdminVendorSnippet,\n AdminVendorSnippetWithProducts,\n AdminVendorSnippetWithSlot,\n AdminVendorSnippetDeleteResult,\n AdminVendorSnippetOrdersResult,\n AdminVendorSnippetOrdersWithSlotResult,\n AdminVendorOrderSummary,\n AdminUpcomingSlotsResult,\n AdminVendorUpdatePackagingResult,\n} from '@packages/shared'\n\nconst createSnippetSchema = z.object({\n snippetCode: z.string().min(1, \"Snippet code is required\"),\n slotId: z.number().optional(),\n productIds: z.array(z.number().int().positive()).min(1, \"At least one product is required\"),\n validTill: z.string().optional(),\n isPermanent: z.boolean().default(false)\n});\n\nconst updateSnippetSchema = z.object({\n id: z.number().int().positive(),\n updates: createSnippetSchema.partial().extend({\n snippetCode: z.string().min(1).optional(),\n productIds: z.array(z.number().int().positive()).optional(),\n isPermanent: z.boolean().default(false)\n }),\n});\n\nexport const vendorSnippetsRouter = router({\n create: protectedProcedure\n .input(createSnippetSchema)\n .mutation(async ({ input, ctx }): Promise => {\n const { snippetCode, slotId, productIds, validTill, isPermanent } = input;\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n \n if(slotId) {\n const slot = await getVendorSlotByIdInDb(slotId)\n if (!slot) {\n throw new Error(\"Invalid slot ID\")\n }\n }\n\n const products = await getProductsByIdsInDb(productIds)\n if (products.length !== productIds.length) {\n throw new Error(\"One or more invalid product IDs\")\n }\n\n const existingSnippet = await checkVendorSnippetExistsInDb(snippetCode)\n if (existingSnippet) {\n throw new Error(\"Snippet code already exists\")\n }\n\n const result = await createVendorSnippetInDb({\n snippetCode,\n slotId,\n productIds,\n isPermanent,\n validTill: validTill ? new Date(validTill) : undefined,\n })\n\n /*\n // Old implementation - direct DB queries:\n // Validate slot exists\n if(slotId) {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n });\n if (!slot) {\n throw new Error(\"Invalid slot ID\");\n }\n }\n\n // Validate products exist\n const products = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, productIds),\n });\n if (products.length !== productIds.length) {\n throw new Error(\"One or more invalid product IDs\");\n }\n\n // Check if snippet code already exists\n const existingSnippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n });\n if (existingSnippet) {\n throw new Error(\"Snippet code already exists\");\n }\n\n const result = await db.insert(vendorSnippets).values({\n snippetCode,\n slotId,\n productIds,\n isPermanent,\n validTill: validTill ? new Date(validTill) : undefined,\n }).returning();\n\n return result[0];\n */\n\n return result\n }),\n\n getAll: protectedProcedure\n .query(async (): Promise => {\n console.log('from the vendor snipptes methods')\n\n try {\n const result = await getAllVendorSnippetsInDb()\n\n const snippetsWithProducts = await Promise.all(\n result.map(async (snippet) => {\n const products = await getProductsByIdsInDb(snippet.productIds)\n\n return {\n ...snippet,\n accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`,\n products,\n }\n })\n )\n\n /*\n // Old implementation - direct DB queries:\n const result = await db.query.vendorSnippets.findMany({\n with: {\n slot: true,\n },\n orderBy: (vendorSnippets, { desc }) => [desc(vendorSnippets.createdAt)],\n });\n\n const snippetsWithProducts = await Promise.all(\n result.map(async (snippet) => {\n const products = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n columns: { id: true, name: true },\n });\n\n return {\n ...snippet,\n accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`,\n products: products.map(p => ({ id: p.id, name: p.name })),\n };\n })\n );\n\n return snippetsWithProducts;\n */\n\n return snippetsWithProducts\n }\n catch(e) {\n console.log(e)\n }\n return []\n }),\n\n getById: protectedProcedure\n .input(z.object({ id: z.number().int().positive() }))\n .query(async ({ input }): Promise => {\n const { id } = input;\n\n const result = await getVendorSnippetByIdInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const result = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.id, id),\n with: {\n slot: true,\n },\n });\n\n if (!result) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n return result;\n */\n\n if (!result) {\n throw new Error('Vendor snippet not found')\n }\n\n return result\n }),\n\n update: protectedProcedure\n .input(updateSnippetSchema)\n .mutation(async ({ input }): Promise => {\n const { id, updates } = input;\n \n const existingSnippet = await getVendorSnippetByIdInDb(id)\n if (!existingSnippet) {\n throw new Error('Vendor snippet not found')\n }\n\n if (updates.slotId) {\n const slot = await getVendorSlotByIdInDb(updates.slotId)\n if (!slot) {\n throw new Error('Invalid slot ID')\n }\n }\n\n if (updates.productIds) {\n const products = await getProductsByIdsInDb(updates.productIds)\n if (products.length !== updates.productIds.length) {\n throw new Error('One or more invalid product IDs')\n }\n }\n\n if (updates.snippetCode && updates.snippetCode !== existingSnippet.snippetCode) {\n const duplicateSnippet = await checkVendorSnippetExistsInDb(updates.snippetCode)\n if (duplicateSnippet) {\n throw new Error('Snippet code already exists')\n }\n }\n\n const updateData = {\n ...updates,\n validTill: updates.validTill !== undefined\n ? (updates.validTill ? new Date(updates.validTill) : null)\n : undefined,\n }\n\n const result = await updateVendorSnippetInDb(id, updateData)\n\n /*\n // Old implementation - direct DB queries:\n const existingSnippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.id, id),\n });\n if (!existingSnippet) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n // Validate slot if being updated\n if (updates.slotId) {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, updates.slotId),\n });\n if (!slot) {\n throw new Error(\"Invalid slot ID\");\n }\n }\n\n // Validate products if being updated\n if (updates.productIds) {\n const products = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, updates.productIds),\n });\n if (products.length !== updates.productIds.length) {\n throw new Error(\"One or more invalid product IDs\");\n }\n }\n\n // Check snippet code uniqueness if being updated\n if (updates.snippetCode && updates.snippetCode !== existingSnippet.snippetCode) {\n const duplicateSnippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, updates.snippetCode),\n });\n if (duplicateSnippet) {\n throw new Error(\"Snippet code already exists\");\n }\n }\n\n const updateData: any = { ...updates };\n if (updates.validTill !== undefined) {\n updateData.validTill = updates.validTill ? new Date(updates.validTill) : null;\n }\n\n const result = await db.update(vendorSnippets)\n .set(updateData)\n .where(eq(vendorSnippets.id, id))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Failed to update vendor snippet\");\n }\n\n return result[0];\n */\n\n if (!result) {\n throw new Error('Failed to update vendor snippet')\n }\n\n return result\n }),\n\n delete: protectedProcedure\n .input(z.object({ id: z.number().int().positive() }))\n .mutation(async ({ input }): Promise => {\n const { id } = input;\n\n const result = await deleteVendorSnippetInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const result = await db.delete(vendorSnippets)\n .where(eq(vendorSnippets.id, id))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n return { message: \"Vendor snippet deleted successfully\" };\n */\n\n if (!result) {\n throw new Error('Vendor snippet not found')\n }\n\n return { message: 'Vendor snippet deleted successfully' }\n }),\n\n getOrdersBySnippet: publicProcedure\n .input(z.object({\n snippetCode: z.string().min(1, \"Snippet code is required\")\n }))\n .query(async ({ input }): Promise => {\n const { snippetCode } = input;\n\n const snippet = await getVendorSnippetByCodeInDb(snippetCode)\n\n /*\n // Old implementation - direct DB queries:\n // Find the snippet\n const snippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n });\n\n if (!snippet) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n // Check if snippet is still valid\n if (snippet.validTill && new Date(snippet.validTill) < new Date()) {\n throw new Error(\"Vendor snippet has expired\");\n }\n\n // Query orders that match the snippet criteria\n const matchingOrders = await db.query.orders.findMany({\n where: eq(orders.slotId, snippet.slotId!),\n with: {\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n user: true,\n slot: true,\n },\n orderBy: (orders, { desc }) => [desc(orders.createdAt)],\n });\n */\n\n if (!snippet) {\n throw new Error('Vendor snippet not found')\n }\n\n if (snippet.validTill && new Date(snippet.validTill) < new Date()) {\n throw new Error('Vendor snippet has expired')\n }\n\n if (!snippet.slotId) {\n throw new Error('Vendor snippet not associated with a slot')\n }\n\n const matchingOrders = await getVendorOrdersBySlotIdInDb(snippet.slotId)\n\n // Filter orders that contain at least one of the snippet's products\n const filteredOrders = matchingOrders.filter(order => {\n const status = order.orderStatus;\n if (status[0].isCancelled) return false;\n const orderProductIds = order.orderItems.map(item => item.productId);\n return snippet.productIds.some(productId => orderProductIds.includes(productId));\n });\n\n // Format the response\n const formattedOrders = filteredOrders.map(order => {\n // Filter orderItems to only include products attached to the snippet\n const attachedOrderItems = order.orderItems.filter(item =>\n snippet.productIds.includes(item.productId)\n );\n\n const products = attachedOrderItems.map(item => ({\n orderItemId: item.id,\n productId: item.productId,\n productName: item.product.name,\n quantity: parseFloat(item.quantity),\n productSize: item.product.productQuantity,\n price: parseFloat((item.price ?? 0).toString()),\n unit: item.product.unit?.shortNotation || 'unit',\n subtotal: parseFloat((item.price ?? 0).toString()) * parseFloat(item.quantity),\n is_packaged: item.is_packaged,\n is_package_verified: item.is_package_verified,\n }));\n\n const orderTotal = products.reduce((sum, p) => sum + p.subtotal, 0);\n\n return {\n orderId: `ORD${order.id}`,\n orderDate: order.createdAt.toISOString(),\n customerName: order.user.name || '',\n totalAmount: orderTotal,\n slotInfo: order.slot ? {\n time: order.slot.deliveryTime.toISOString(),\n sequence: order.slot.deliverySequence,\n } : null,\n products,\n matchedProducts: snippet.productIds, // All snippet products are considered matched\n snippetCode: snippet.snippetCode,\n };\n });\n\n return {\n success: true,\n data: formattedOrders,\n snippet: {\n id: snippet.id,\n snippetCode: snippet.snippetCode,\n slotId: snippet.slotId,\n productIds: snippet.productIds,\n validTill: snippet.validTill?.toISOString(),\n createdAt: snippet.createdAt.toISOString(),\n isPermanent: snippet.isPermanent,\n },\n }\n }),\n\n getVendorOrders: protectedProcedure\n .query(async (): Promise => {\n const vendorOrders = await getVendorOrdersInDb()\n\n /*\n // Old implementation - direct DB queries:\n const vendorOrders = await db.query.orders.findMany({\n with: {\n user: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n },\n orderBy: (orders, { desc }) => [desc(orders.createdAt)],\n });\n */\n\n return vendorOrders.map(order => ({\n id: order.id,\n status: 'pending',\n orderDate: order.createdAt.toISOString(),\n totalQuantity: order.orderItems.reduce((sum, item) => sum + parseFloat(item.quantity || '0'), 0),\n products: order.orderItems.map(item => ({\n name: item.product.name,\n quantity: parseFloat(item.quantity || '0'),\n unit: item.product.unit?.shortNotation || 'unit',\n })),\n }))\n }),\n\n getUpcomingSlots: publicProcedure\n .query(async (): Promise => {\n const threeHoursAgo = dayjs().subtract(3, 'hour').toDate();\n const slots = await getSlotsAfterDateInDb(threeHoursAgo)\n\n /*\n // Old implementation - direct DB queries:\n const slots = await db.query.deliverySlotInfo.findMany({\n where: and(\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, threeHoursAgo)\n ),\n orderBy: asc(deliverySlotInfo.deliveryTime),\n });\n */\n\n return {\n success: true,\n data: slots.map(slot => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime.toISOString(),\n freezeTime: slot.freezeTime.toISOString(),\n deliverySequence: slot.deliverySequence,\n })),\n }\n }),\n\n getOrdersBySnippetAndSlot: publicProcedure\n .input(z.object({\n snippetCode: z.string().min(1, \"Snippet code is required\"),\n slotId: z.number().int().positive(\"Valid slot ID is required\"),\n }))\n .query(async ({ input }): Promise => {\n const { snippetCode, slotId } = input;\n\n const snippet = await getVendorSnippetByCodeInDb(snippetCode)\n const slot = await getVendorSlotByIdInDb(slotId)\n\n /*\n // Old implementation - direct DB queries:\n // Find the snippet\n const snippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n });\n\n if (!snippet) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n // Find the slot\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n });\n\n if (!slot) {\n throw new Error(\"Slot not found\");\n }\n \n // Query orders that match the slot and snippet criteria\n const matchingOrders = await db.query.orders.findMany({\n where: eq(orders.slotId, slotId),\n with: {\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n user: true,\n slot: true,\n },\n orderBy: (orders, { desc }) => [desc(orders.createdAt)],\n });\n */\n\n if (!snippet) {\n throw new Error('Vendor snippet not found')\n }\n\n if (!slot) {\n throw new Error('Slot not found')\n }\n\n const matchingOrders = await getVendorOrdersBySlotIdInDb(slotId)\n\n // Filter orders that contain at least one of the snippet's products\n const filteredOrders = matchingOrders.filter(order => {\n const status = order.orderStatus;\n if (status[0]?.isCancelled) return false;\n const orderProductIds = order.orderItems.map(item => item.productId);\n return snippet.productIds.some(productId => orderProductIds.includes(productId));\n });\n\n // Format the response\n const formattedOrders = filteredOrders.map(order => {\n // Filter orderItems to only include products attached to the snippet\n const attachedOrderItems = order.orderItems.filter(item =>\n snippet.productIds.includes(item.productId)\n );\n\n const products = attachedOrderItems.map(item => ({\n orderItemId: item.id,\n productId: item.productId,\n productName: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat((item.price ?? 0).toString()),\n unit: item.product.unit?.shortNotation || 'unit',\n subtotal: parseFloat((item.price ?? 0).toString()) * parseFloat(item.quantity),\n productSize: item.product.productQuantity,\n is_packaged: item.is_packaged,\n is_package_verified: item.is_package_verified,\n }));\n\n const orderTotal = products.reduce((sum, p) => sum + p.subtotal, 0);\n\n return {\n orderId: `ORD${order.id}`,\n orderDate: order.createdAt.toISOString(),\n customerName: order.user.name || '',\n totalAmount: orderTotal,\n slotInfo: order.slot ? {\n time: order.slot.deliveryTime.toISOString(),\n sequence: order.slot.deliverySequence,\n } : null,\n products,\n matchedProducts: snippet.productIds,\n snippetCode: snippet.snippetCode,\n };\n });\n\n return {\n success: true,\n data: formattedOrders,\n snippet: {\n id: snippet.id,\n snippetCode: snippet.snippetCode,\n slotId: snippet.slotId,\n productIds: snippet.productIds,\n validTill: snippet.validTill?.toISOString(),\n createdAt: snippet.createdAt.toISOString(),\n isPermanent: snippet.isPermanent,\n },\n selectedSlot: {\n id: slot.id,\n deliveryTime: slot.deliveryTime.toISOString(),\n freezeTime: slot.freezeTime.toISOString(),\n deliverySequence: slot.deliverySequence,\n },\n }\n }),\n\n updateOrderItemPackaging: publicProcedure\n .input(z.object({\n orderItemId: z.number().int().positive(\"Valid order item ID required\"),\n is_packaged: z.boolean()\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const { orderItemId, is_packaged } = input;\n\n // Get staff user ID from auth middleware\n // const staffUserId = ctx.staffUser?.id;\n // if (!staffUserId) {\n // throw new Error(\"Unauthorized\");\n // }\n\n const result = await updateVendorOrderItemPackagingInDb(orderItemId, is_packaged)\n\n /*\n // Old implementation - direct DB queries:\n // Check if order item exists and get related data\n const orderItem = await db.query.orderItems.findFirst({\n where: eq(orderItems.id, orderItemId),\n with: {\n order: {\n with: {\n slot: true\n }\n }\n }\n });\n\n if (!orderItem) {\n throw new Error(\"Order item not found\");\n }\n\n // Check if this order item belongs to a slot that has vendor snippets\n // This ensures only order items from vendor-accessible orders can be updated\n if (!orderItem.order.slotId) {\n throw new Error(\"Order item not associated with a vendor slot\");\n }\n\n const snippetExists = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.slotId, orderItem.order.slotId),\n });\n\n if (!snippetExists) {\n throw new Error(\"No vendor snippet found for this order's slot\");\n }\n\n // Update the is_packaged field\n const result = await db.update(orderItems)\n .set({ is_packaged })\n .where(eq(orderItems.id, orderItemId))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Failed to update packaging status\");\n }\n\n return {\n success: true,\n orderItemId,\n is_packaged\n };\n */\n\n if (!result.success) {\n throw new Error(result.message)\n }\n\n return result\n }),\n});\n", "/**\n * Constants for role names to avoid hardcoding and typos\n */\nexport const ROLE_NAMES = {\n ADMIN: 'admin',\n GENERAL_USER: 'gen_user',\n HOSPITAL_ADMIN: 'hospital_admin',\n DOCTOR: 'doctor',\n RECEPTIONIST: 'receptionist'\n};\n\nexport const defaultRole = ROLE_NAMES.GENERAL_USER;\n\n/**\n * RoleManager class to handle caching and retrieving role information\n * Provides methods to fetch roles from DB and cache them for quick access\n */\nclass RoleManager {\n private roles: Map = new Map();\n private rolesByName: Map = new Map();\n private isInitialized: boolean = false;\n\n constructor() {\n // Singleton instance\n }\n\n /**\n * Fetch all roles from the database and cache them\n * This should be called during application startup\n */\n public async fetchRoles(): Promise {\n try {\n // const roles = await db.query.roleInfoTable.findMany();\n \n // // Clear existing maps before adding new data\n // this.roles.clear();\n // this.rolesByName.clear();\n \n // // Cache roles by ID and by name for quick lookup\n // roles.forEach(role => {\n // this.roles.set(role.id, role);\n // this.rolesByName.set(role.name, role);\n // });\n \n // this.isInitialized = true;\n // console.log(`[RoleManager] Cached ${roles.length} roles`);\n } catch (error) {\n console.error('[RoleManager] Error fetching roles:', error);\n throw error;\n }\n }\n\n /**\n * Get all roles from cache\n * If not initialized, fetches roles from DB first\n */\n public async getRoles(): Promise<{ id: number; name: string; description: string | null }[]> {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n return Array.from(this.roles.values());\n }\n\n /**\n * Get role by ID\n * @param id Role ID\n */\n public async getRoleById(id: number): Promise<{ id: number; name: string; description: string | null } | undefined> {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n return this.roles.get(id);\n }\n\n /**\n * Get role by name\n * @param name Role name\n */\n public async getRoleByName(name: string): Promise<{ id: number; name: string; description: string | null } | undefined> {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n return this.rolesByName.get(name);\n }\n\n /**\n * Check if a role exists by name\n * @param name Role name\n */\n public async roleExists(name: string): Promise {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n return this.rolesByName.has(name);\n }\n\n /**\n * Get business roles (roles that are not 'admin' or 'gen_user')\n */\n public async getBusinessRoles(): Promise<{ id: number; name: string; description: string | null }[]> {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n \n return Array.from(this.roles.values()).filter(\n role => role.name !== ROLE_NAMES.ADMIN && role.name !== ROLE_NAMES.GENERAL_USER\n );\n }\n\n /**\n * Force refresh the roles cache\n */\n public async refreshRoles(): Promise {\n await this.fetchRoles();\n }\n}\n\n// Create a singleton instance\nconst roleManager = new RoleManager();\n\n// Export the singleton instance\nexport default roleManager;\n", "export const CONST_KEYS = {\n minRegularOrderValue: 'minRegularOrderValue',\n freeDeliveryThreshold: 'freeDeliveryThreshold',\n deliveryCharge: 'deliveryCharge',\n flashFreeDeliveryThreshold: 'flashFreeDeliveryThreshold',\n flashDeliveryCharge: 'flashDeliveryCharge',\n platformFeePercent: 'platformFeePercent',\n taxRate: 'taxRate',\n tester: 'tester',\n minOrderAmountForCoupon: 'minOrderAmountForCoupon',\n maxCouponDiscount: 'maxCouponDiscount',\n flashDeliverySlotId: 'flashDeliverySlotId',\n readableOrderId: 'readableOrderId',\n versionNum: 'versionNum',\n playStoreUrl: 'playStoreUrl',\n appStoreUrl: 'appStoreUrl',\n popularItems: 'popularItems',\n allItemsOrder: 'allItemsOrder',\n isFlashDeliveryEnabled: 'isFlashDeliveryEnabled',\n supportMobile: 'supportMobile',\n supportEmail: 'supportEmail',\n} as const;\n\nexport const CONST_LABELS: Record = {\n minRegularOrderValue: 'Minimum Regular Order Value',\n freeDeliveryThreshold: 'Free Delivery Threshold',\n deliveryCharge: 'Delivery Charge',\n flashFreeDeliveryThreshold: 'Flash Free Delivery Threshold',\n flashDeliveryCharge: 'Flash Delivery Charge',\n platformFeePercent: 'Platform Fee Percent',\n taxRate: 'Tax Rate',\n tester: 'Tester',\n minOrderAmountForCoupon: 'Minimum Order Amount for Coupon',\n maxCouponDiscount: 'Maximum Coupon Discount',\n flashDeliverySlotId: 'Flash Delivery Slot ID',\n readableOrderId: 'Readable Order ID',\n versionNum: 'Version Number',\n playStoreUrl: 'Play Store URL',\n appStoreUrl: 'App Store URL',\n popularItems: 'Popular Items',\n allItemsOrder: 'All Items Order',\n isFlashDeliveryEnabled: 'Enable Flash Delivery',\n supportMobile: 'Support Mobile',\n supportEmail: 'Support Email',\n};\n\nexport type ConstKey = (typeof CONST_KEYS)[keyof typeof CONST_KEYS];\n\nexport const CONST_KEYS_ARRAY = Object.values(CONST_KEYS) as ConstKey[];\n", "import { getAllKeyValStore } from '@/src/dbService'\n// import redisClient from '@/src/lib/redis-client'\nimport { CONST_KEYS, CONST_KEYS_ARRAY, type ConstKey } from '@/src/lib/const-keys'\n\n// const CONST_REDIS_PREFIX = 'const:';\n\nexport const computeConstants = async (): Promise => {\n try {\n console.log('Computing constants from database...');\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { keyValStore } from '@/src/db/schema'\n\n const constants = await db.select().from(keyValStore);\n */\n\n const constants = await getAllKeyValStore();\n\n // for (const constant of constants) {\n // const redisKey = `${CONST_REDIS_PREFIX}${constant.key}`;\n // const value = JSON.stringify(constant.value);\n // await redisClient.set(redisKey, value);\n // }\n\n console.log(`Computed ${constants.length} constants from DB`);\n } catch (error) {\n console.error('Failed to compute constants:', error);\n throw error;\n }\n};\n\nexport const getConstant = async (key: string): Promise => {\n // const redisKey = `${CONST_REDIS_PREFIX}${key}`;\n // const value = await redisClient.get(redisKey);\n //\n // if (!value) {\n // return null;\n // }\n //\n // try {\n // return JSON.parse(value) as T;\n // } catch {\n // return value as unknown as T;\n // }\n\n const constants = await getAllKeyValStore();\n const entry = constants.find(c => c.key === key);\n\n if (!entry) {\n return null;\n }\n\n return entry.value as T;\n};\n\nexport const getConstants = async (keys: string[]): Promise> => {\n // const redisKeys = keys.map(key => `${CONST_REDIS_PREFIX}${key}`);\n // const values = await redisClient.MGET(redisKeys);\n //\n // const result: Record = {};\n // keys.forEach((key, index) => {\n // const value = values[index];\n // if (!value) {\n // result[key] = null;\n // } else {\n // try {\n // result[key] = JSON.parse(value) as T;\n // } catch {\n // result[key] = value as unknown as T;\n // }\n // }\n // });\n //\n // return result;\n\n const constants = await getAllKeyValStore();\n const constantsMap = new Map(constants.map(c => [c.key, c.value]));\n\n const result: Record = {};\n for (const key of keys) {\n const value = constantsMap.get(key);\n result[key] = (value !== undefined ? value : null) as T | null;\n }\n\n return result;\n};\n\nexport const getAllConstValues = async (): Promise> => {\n // const result: Record = {};\n //\n // for (const key of CONST_KEYS_ARRAY) {\n // result[key] = await getConstant(key);\n // }\n //\n // return result as Record;\n\n const constants = await getAllKeyValStore();\n const constantsMap = new Map(constants.map(c => [c.key, c.value]));\n\n const result: Record = {};\n for (const key of CONST_KEYS_ARRAY) {\n result[key] = constantsMap.get(key) ?? null;\n }\n\n return result as Record;\n};\n\nexport { CONST_KEYS, CONST_KEYS_ARRAY };\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllSlotsWithProductsForCache,\n type SlotWithProductsData,\n} from '@/src/dbService'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport dayjs from 'dayjs'\n\n// Define the structure for slot with products\ninterface SlotWithProducts {\n id: number\n deliveryTime: Date\n freezeTime: Date\n isActive: boolean\n isCapacityFull: boolean\n products: Array<{\n id: number\n name: string\n shortDescription: string | null\n productQuantity: number\n price: string\n marketPrice: string | null\n unit: string | null\n images: string[]\n isOutOfStock: boolean\n storeId: number | null\n nextDeliveryDate: Date\n }>\n}\n\ninterface SlotInfo {\n id: number\n deliveryTime: Date\n freezeTime: Date\n isCapacityFull: boolean\n}\n\nasync function transformSlotToStoreSlot(slot: SlotWithProductsData): Promise {\n return {\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isCapacityFull: slot.isCapacityFull,\n products: slot.productSlots.map((productSlot) => ({\n id: productSlot.product.id,\n name: productSlot.product.name,\n productQuantity: productSlot.product.productQuantity,\n shortDescription: productSlot.product.shortDescription,\n price: productSlot.product.price.toString(),\n marketPrice: productSlot.product.marketPrice?.toString() || null,\n unit: productSlot.product.unit?.shortNotation || null,\n images: scaffoldAssetUrl(\n (productSlot.product.images as string[]) || []\n ),\n isOutOfStock: productSlot.product.isOutOfStock,\n storeId: productSlot.product.storeId,\n nextDeliveryDate: slot.deliveryTime,\n })),\n }\n}\n\nfunction extractSlotInfo(slot: SlotWithProductsData): SlotInfo {\n return {\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isCapacityFull: slot.isCapacityFull,\n }\n}\n\nasync function fetchAllTransformedSlots(): Promise {\n const slots = await getAllSlotsWithProductsForCache()\n return Promise.all(slots.map(transformSlotToStoreSlot))\n}\n\nexport async function initializeSlotStore(): Promise {\n try {\n console.log('Initializing slot store in Redis...')\n\n // Fetch active delivery slots with future delivery times\n const slots = await getAllSlotsWithProductsForCache()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { deliverySlotInfo } from '@/src/db/schema'\n import { eq, gt, and, asc } from 'drizzle-orm'\n\n const now = new Date();\n const slots = await db.query.deliverySlotInfo.findMany({\n where: and(\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, now),\n ),\n with: {\n productSlots: {\n with: {\n product: {\n with: {\n unit: true,\n store: true,\n },\n },\n },\n },\n },\n orderBy: asc(deliverySlotInfo.deliveryTime),\n });\n */\n\n // Transform data for storage\n const slotsWithProducts = await Promise.all(\n slots.map(async (slot) => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isCapacityFull: slot.isCapacityFull,\n products: await Promise.all(\n slot.productSlots.map(async (productSlot) => ({\n id: productSlot.product.id,\n name: productSlot.product.name,\n productQuantity: productSlot.product.productQuantity,\n shortDescription: productSlot.product.shortDescription,\n price: productSlot.product.price.toString(),\n marketPrice: productSlot.product.marketPrice?.toString() || null,\n unit: productSlot.product.unit?.shortNotation || null,\n images: scaffoldAssetUrl(\n (productSlot.product.images as string[]) || []\n ),\n isOutOfStock: productSlot.product.isOutOfStock,\n storeId: productSlot.product.storeId,\n nextDeliveryDate: slot.deliveryTime,\n }))\n ),\n }))\n )\n\n // Store each slot in Redis with key pattern \"slot:{id}\"\n // for (const slot of slotsWithProducts) {\n // await redisClient.set(`slot:${slot.id}`, JSON.stringify(slot))\n // }\n\n // Build and store product-slots map\n // Group slots by productId\n const productSlotsMap: Record = {}\n\n for (const slot of slotsWithProducts) {\n for (const product of slot.products) {\n if (!productSlotsMap[product.id]) {\n productSlotsMap[product.id] = []\n }\n productSlotsMap[product.id].push({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isCapacityFull: slot.isCapacityFull,\n })\n }\n }\n\n // Store each product's slots in Redis with key pattern \"product:{id}:slots\"\n // for (const [productId, slotInfos] of Object.entries(productSlotsMap)) {\n // await redisClient.set(\n // `product:${productId}:slots`,\n // JSON.stringify(slotInfos)\n // )\n // }\n\n console.log('Slot store initialized successfully')\n } catch (error) {\n console.error('Error initializing slot store:', error)\n }\n}\n\nexport async function getSlotById(slotId: number): Promise {\n try {\n // const key = `slot:${slotId}`\n // const data = await redisClient.get(key)\n // if (!data) return null\n // return JSON.parse(data) as SlotWithProducts\n\n const slots = await getAllSlotsWithProductsForCache()\n const slot = slots.find(s => s.id === slotId)\n if (!slot) return null\n\n return transformSlotToStoreSlot(slot)\n } catch (error) {\n console.error(`Error getting slot ${slotId}:`, error)\n return null\n }\n}\n\nexport async function getAllSlots(): Promise {\n try {\n // Get all keys matching the pattern \"slot:*\"\n // const keys = await redisClient.KEYS('slot:*')\n //\n // if (keys.length === 0) return []\n //\n // // Get all slots using MGET for better performance\n // const slotsData = await redisClient.MGET(keys)\n //\n // const slots: SlotWithProducts[] = []\n // for (const slotData of slotsData) {\n // if (slotData) {\n // slots.push(JSON.parse(slotData) as SlotWithProducts)\n // }\n // }\n //\n // return slots\n\n return fetchAllTransformedSlots()\n } catch (error) {\n console.error('Error getting all slots:', error)\n return []\n }\n}\n\nexport async function getProductSlots(productId: number): Promise {\n try {\n // const key = `product:${productId}:slots`\n // const data = await redisClient.get(key)\n // if (!data) return []\n // return JSON.parse(data) as SlotInfo[]\n\n const slots = await getAllSlotsWithProductsForCache()\n const productSlots: SlotInfo[] = []\n\n for (const slot of slots) {\n const hasProduct = slot.productSlots.some(ps => ps.product.id === productId)\n if (hasProduct) {\n productSlots.push(extractSlotInfo(slot))\n }\n }\n\n return productSlots\n } catch (error) {\n console.error(`Error getting slots for product ${productId}:`, error)\n return []\n }\n}\n\nexport async function getAllProductsSlots(): Promise> {\n try {\n // Get all keys matching the pattern \"product:*:slots\"\n // const keys = await redisClient.KEYS('product:*:slots')\n //\n // if (keys.length === 0) return {}\n //\n // // Get all product slots using MGET for better performance\n // const productsData = await redisClient.MGET(keys)\n //\n // const result: Record = {}\n // for (const key of keys) {\n // // Extract productId from key \"product:{id}:slots\"\n // const match = key.match(/product:(\\d+):slots/)\n // if (match) {\n // const productId = parseInt(match[1], 10)\n // const dataIndex = keys.indexOf(key)\n // if (productsData[dataIndex]) {\n // result[productId] = JSON.parse(productsData[dataIndex]) as SlotInfo[]\n // }\n // }\n // }\n //\n // return result\n\n const slots = await getAllSlotsWithProductsForCache()\n const result: Record = {}\n\n for (const slot of slots) {\n const slotInfo = extractSlotInfo(slot)\n for (const productSlot of slot.productSlots) {\n const productId = productSlot.product.id\n if (!result[productId]) {\n result[productId] = []\n }\n result[productId].push(slotInfo)\n }\n }\n\n return result\n } catch (error) {\n console.error('Error getting all products slots:', error)\n return {}\n }\n}\n\nexport async function getMultipleProductsSlots(\n productIds: number[]\n): Promise> {\n try {\n if (productIds.length === 0) return {}\n\n // Build keys for all productIds\n // const keys = productIds.map((id) => `product:${id}:slots`)\n //\n // // Use MGET for batch retrieval\n // const productsData = await redisClient.MGET(keys)\n //\n // const result: Record = {}\n // for (let i = 0; i < productIds.length; i++) {\n // const data = productsData[i]\n // if (data) {\n // const slots = JSON.parse(data) as SlotInfo[]\n // // Filter out slots that are at full capacity\n // result[productIds[i]] = slots.filter((slot) => !slot.isCapacityFull)\n // }\n // }\n //\n // return result\n\n const slots = await getAllSlotsWithProductsForCache()\n const productIdSet = new Set(productIds)\n const result: Record = {}\n\n for (const productId of productIds) {\n result[productId] = []\n }\n\n for (const slot of slots) {\n const slotInfo = extractSlotInfo(slot)\n for (const productSlot of slot.productSlots) {\n const pid = productSlot.product.id\n if (productIdSet.has(pid) && !slot.isCapacityFull) {\n result[pid].push(slotInfo)\n }\n }\n }\n\n return result\n } catch (error) {\n console.error('Error getting products slots:', error)\n return {}\n }\n}\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllBannersForCache,\n getBanners,\n getBannerById as getBannerByIdFromDb,\n type BannerData,\n} from '@/src/dbService'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\n\n// Banner Type (matches getBanners return)\ninterface Banner {\n id: number\n name: string\n imageUrl: string | null\n serialNum: number | null\n productIds: number[] | null\n createdAt: Date\n}\n\nexport async function initializeBannerStore(): Promise {\n try {\n console.log('Initializing banner store in Redis...')\n\n const banners = await getAllBannersForCache()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { homeBanners } from '@/src/db/schema'\n import { isNotNull, asc } from 'drizzle-orm'\n\n const banners = await db.query.homeBanners.findMany({\n where: isNotNull(homeBanners.serialNum),\n orderBy: asc(homeBanners.serialNum),\n });\n */\n\n // Store each banner in Redis\n // for (const banner of banners) {\n // const signedImageUrl = banner.imageUrl\n // ? scaffoldAssetUrl(banner.imageUrl)\n // : banner.imageUrl\n //\n // const bannerObj: Banner = {\n // id: banner.id,\n // name: banner.name,\n // imageUrl: signedImageUrl,\n // serialNum: banner.serialNum,\n // productIds: banner.productIds,\n // createdAt: banner.createdAt,\n // }\n //\n // await redisClient.set(`banner:${banner.id}`, JSON.stringify(bannerObj))\n // }\n\n console.log('Banner store initialized successfully')\n } catch (error) {\n console.error('Error initializing banner store:', error)\n }\n}\n\nexport async function getBannerById(id: number): Promise {\n try {\n // const key = `banner:${id}`\n // const data = await redisClient.get(key)\n // if (!data) return null\n // return JSON.parse(data) as Banner\n\n const banner = await getBannerByIdFromDb(id)\n if (!banner) return null\n\n const signedImageUrl = banner.imageUrl\n ? scaffoldAssetUrl(banner.imageUrl)\n : banner.imageUrl\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: signedImageUrl,\n serialNum: banner.serialNum,\n productIds: banner.productIds,\n createdAt: banner.createdAt,\n }\n } catch (error) {\n console.error(`Error getting banner ${id}:`, error)\n return null\n }\n}\n\nexport async function getAllBanners(): Promise {\n try {\n // Get all keys matching the pattern \"banner:*\"\n // const keys = await redisClient.KEYS('banner:*')\n //\n // if (keys.length === 0) return []\n //\n // // Get all banners using MGET for better performance\n // const bannersData = await redisClient.MGET(keys)\n //\n // const banners: Banner[] = []\n // for (const bannerData of bannersData) {\n // if (bannerData) {\n // banners.push(JSON.parse(bannerData) as Banner)\n // }\n // }\n //\n // // Sort by serialNum to maintain the same order as the original query\n // banners.sort((a, b) => (a.serialNum || 0) - (b.serialNum || 0))\n //\n // return banners\n\n const banners = await getBanners()\n\n return banners.map((banner) => {\n const signedImageUrl = banner.imageUrl\n ? scaffoldAssetUrl(banner.imageUrl)\n : banner.imageUrl\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: signedImageUrl,\n serialNum: banner.serialNum,\n productIds: banner.productIds,\n createdAt: banner.createdAt,\n }\n })\n } catch (error) {\n console.error('Error getting all banners:', error)\n return []\n }\n}\n", "import {\n BBox,\n Feature,\n FeatureCollection,\n Geometry,\n GeometryCollection,\n GeometryObject,\n LineString,\n MultiLineString,\n MultiPoint,\n MultiPolygon,\n Point,\n Polygon,\n Position,\n GeoJsonProperties,\n} from \"geojson\";\n\nimport { Id } from \"./lib/geojson.js\";\nexport * from \"./lib/geojson.js\";\n\n/**\n * @module helpers\n */\n\n// TurfJS Combined Types\nexport type Coord = Feature | Point | Position;\n\n/**\n * Linear measurement units.\n *\n * ⚠️ Warning. Be aware of the implications of using radian or degree units to\n * measure distance. The distance represented by a degree of longitude *varies*\n * depending on latitude.\n *\n * See https://www.thoughtco.com/degree-of-latitude-and-longitude-distance-4070616\n * for an illustration of this behaviour.\n *\n * @typedef\n */\nexport type Units =\n | \"meters\"\n | \"metres\"\n | \"millimeters\"\n | \"millimetres\"\n | \"centimeters\"\n | \"centimetres\"\n | \"kilometers\"\n | \"kilometres\"\n | \"miles\"\n | \"nauticalmiles\"\n | \"inches\"\n | \"yards\"\n | \"feet\"\n | \"radians\"\n | \"degrees\";\n\n/**\n * Area measurement units.\n *\n * @typedef\n */\nexport type AreaUnits =\n | Exclude\n | \"acres\"\n | \"hectares\";\n\n/**\n * Grid types.\n *\n * @typedef\n */\nexport type Grid = \"point\" | \"square\" | \"hex\" | \"triangle\";\n\n/**\n * Shorthand corner identifiers.\n *\n * @typedef\n */\nexport type Corners = \"sw\" | \"se\" | \"nw\" | \"ne\" | \"center\" | \"centroid\";\n\n/**\n * Geometries made up of lines i.e. lines and polygons.\n *\n * @typedef\n */\nexport type Lines = LineString | MultiLineString | Polygon | MultiPolygon;\n\n/**\n * Convenience type for all possible GeoJSON.\n *\n * @typedef\n */\nexport type AllGeoJSON =\n | Feature\n | FeatureCollection\n | Geometry\n | GeometryCollection;\n\n/**\n * The Earth radius in meters. Used by Turf modules that model the Earth as a sphere. The {@link https://en.wikipedia.org/wiki/Earth_radius#Arithmetic_mean_radius mean radius} was selected because it is {@link https://rosettacode.org/wiki/Haversine_formula#:~:text=This%20value%20is%20recommended recommended } by the Haversine formula (used by turf/distance) to reduce error.\n *\n * @constant\n */\nexport const earthRadius = 6371008.8;\n\n/**\n * Unit of measurement factors based on earthRadius.\n *\n * Keys are the name of the unit, values are the number of that unit in a single radian\n *\n * @constant\n */\nexport const factors: Record = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: 360 / (2 * Math.PI),\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n\n/**\n\n * Area of measurement factors based on 1 square meter.\n *\n * @constant\n */\nexport const areaFactors: Record = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n nauticalmiles: 2.9155334959812285e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @function\n * @param {GeometryObject} geometry input geometry\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature<\n G extends GeometryObject = Geometry,\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n geom: G | null,\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n const feat: any = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @function\n * @param {(\"Point\" | \"LineString\" | \"Polygon\" | \"MultiPoint\" | \"MultiLineString\" | \"MultiPolygon\")} type Geometry Type\n * @param {Array} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry<\n T extends\n | \"Point\"\n | \"LineString\"\n | \"Polygon\"\n | \"MultiPoint\"\n | \"MultiLineString\"\n | \"MultiPolygon\",\n>(\n type: T,\n coordinates: any[],\n _options: Record = {}\n): Extract {\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry as Extract;\n case \"LineString\":\n return lineString(coordinates).geometry as Extract;\n case \"Polygon\":\n return polygon(coordinates).geometry as Extract;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry as Extract;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry as Extract<\n Geometry,\n { type: T }\n >;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry as Extract<\n Geometry,\n { type: T }\n >;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @function\n * @param {Position} coordinates longitude, latitude position (each in decimal degrees)\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point

(\n coordinates: Position,\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n\n const geom: Point = {\n type: \"Point\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @function\n * @param {Position[]} coordinates an array of Points\n * @param {GeoJsonProperties} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {Id} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points

(\n coordinates: Position[],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection {\n return featureCollection(\n coordinates.map((coords) => {\n return point(coords, properties);\n }),\n options\n );\n}\n\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @function\n * @param {Position[][]} coordinates an array of LinearRings\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon

(\n coordinates: Position[][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n for (const ring of coordinates) {\n if (ring.length < 4) {\n throw new Error(\n \"Each LinearRing of a Polygon must have 4 or more Positions.\"\n );\n }\n\n if (ring[ring.length - 1].length !== ring[0].length) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n\n for (let j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n const geom: Polygon = {\n type: \"Polygon\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @function\n * @param {Position[][][]} coordinates an array of Polygon coordinates\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons

(\n coordinates: Position[][][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection {\n return featureCollection(\n coordinates.map((coords) => {\n return polygon(coords, properties);\n }),\n options\n );\n}\n\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @function\n * @param {Position[]} coordinates an array of Positions\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString

(\n coordinates: Position[],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n const geom: LineString = {\n type: \"LineString\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @function\n * @param {Position[][]} coordinates an array of LinearRings\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {Id} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings

(\n coordinates: Position[][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection {\n return featureCollection(\n coordinates.map((coords) => {\n return lineString(coords, properties);\n }),\n options\n );\n}\n\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @function\n * @param {Array>} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection<\n G extends GeometryObject = Geometry,\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n features: Array>,\n options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection {\n const fc: any = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n\n/**\n * Creates a {@link Feature}<{@link MultiLineString}> based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Position[][]} coordinates an array of LineStrings\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString<\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n coordinates: Position[][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n const geom: MultiLineString = {\n type: \"MultiLineString\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Feature}<{@link MultiPoint}> based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Position[]} coordinates an array of Positions\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint

(\n coordinates: Position[],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n const geom: MultiPoint = {\n type: \"MultiPoint\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Feature}<{@link MultiPolygon}> based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Position[][][]} coordinates an array of Polygons\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon

(\n coordinates: Position[][][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n const geom: MultiPolygon = {\n type: \"MultiPolygon\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a Feature based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Array} geometries an array of GeoJSON Geometries\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection<\n G extends\n | Point\n | LineString\n | Polygon\n | MultiPoint\n | MultiLineString\n | MultiPolygon,\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n geometries: Array,\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature, P> {\n const geom: GeometryCollection = {\n type: \"GeometryCollection\",\n geometries,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Round number to precision\n *\n * @function\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num: number, precision = 0): number {\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n const multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @function\n * @param {number} radians in radians across the sphere\n * @param {Units} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(\n radians: number,\n units: Units = \"kilometers\"\n): number {\n const factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @function\n * @param {number} distance in real units\n * @param {Units} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(\n distance: number,\n units: Units = \"kilometers\"\n): number {\n const factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @function\n * @param {number} distance in real units\n * @param {Units} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance: number, units?: Units): number {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @function\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing: number): number {\n let angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n\n/**\n * Converts any azimuth angle from the north line direction (positive clockwise)\n * and returns an angle between -180 and +180 degrees (positive clockwise), 0 being the north line\n *\n * @function\n * @param {number} angle between 0 and 360 degrees\n * @returns {number} bearing between -180 and +180 degrees\n */\nexport function azimuthToBearing(angle: number): number {\n // Ignore full revolutions (multiples of 360)\n angle = angle % 360;\n\n if (angle > 180) {\n return angle - 360;\n } else if (angle < -180) {\n return angle + 360;\n }\n\n return angle;\n}\n\n/**\n * Converts an angle in radians to degrees\n *\n * @function\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians: number): number {\n // % (2 * Math.PI) radians in case someone passes value > 2π\n const normalisedRadians = radians % (2 * Math.PI);\n return (normalisedRadians * 180) / Math.PI;\n}\n\n/**\n * Converts an angle in degrees to radians\n *\n * @function\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees: number): number {\n // % 360 degrees in case someone passes value > 360\n const normalisedDegrees = degrees % 360;\n return (normalisedDegrees * Math.PI) / 180;\n}\n\n/**\n * Converts a length from one unit to another.\n *\n * @function\n * @param {number} length Length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] Input length unit\n * @param {Units} [finalUnit=\"kilometers\"] Returned length unit\n * @returns {number} The converted length\n */\nexport function convertLength(\n length: number,\n originalUnit: Units = \"kilometers\",\n finalUnit: Units = \"kilometers\"\n): number {\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n\n/**\n * Converts an area from one unit to another.\n *\n * @function\n * @param {number} area Area to be converted\n * @param {AreaUnits} [originalUnit=\"meters\"] Input area unit\n * @param {AreaUnits} [finalUnit=\"kilometers\"] Returned area unit\n * @returns {number} The converted length\n */\nexport function convertArea(\n area: number,\n originalUnit: AreaUnits = \"meters\",\n finalUnit: AreaUnits = \"kilometers\"\n): number {\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n\n const startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n\n const finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n\n return (area / startFactor) * finalFactor;\n}\n\n/**\n * isNumber\n *\n * @function\n * @param {any} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num: any): boolean {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n\n/**\n * isObject\n *\n * @function\n * @param {any} input variable to validate\n * @returns {boolean} true/false, including false for Arrays and Functions\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input: any): boolean {\n return input !== null && typeof input === \"object\" && !Array.isArray(input);\n}\n\n/**\n * Validate BBox\n *\n * @private\n * @param {any} bbox BBox to validate\n * @returns {void}\n * @throws {Error} if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox: any): void {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach((num) => {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n\n/**\n * Validate Id\n *\n * @private\n * @param {any} id Id to validate\n * @returns {void}\n * @throws {Error} if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id: any): void {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n", "import {\n Feature,\n FeatureCollection,\n Geometry,\n LineString,\n MultiPoint,\n MultiLineString,\n MultiPolygon,\n Point,\n Polygon,\n} from \"geojson\";\nimport { isNumber } from \"@turf/helpers\";\n\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @function\n * @param {Array|Geometry|Feature} coord GeoJSON Point or an Array of numbers\n * @returns {Array} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nfunction getCoord(coord: Feature | Point | number[]): number[] {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n\n if (!Array.isArray(coord)) {\n if (\n coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\"\n ) {\n return [...coord.geometry.coordinates];\n }\n if (coord.type === \"Point\") {\n return [...coord.coordinates];\n }\n }\n if (\n Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])\n ) {\n return [...coord];\n }\n\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @function\n * @param {Array|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nfunction getCoords<\n G extends\n | Point\n | LineString\n | Polygon\n | MultiPoint\n | MultiLineString\n | MultiPolygon,\n>(coords: any[] | Feature | G): any[] {\n if (Array.isArray(coords)) {\n return coords;\n }\n\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n } else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n\n throw new Error(\n \"coords must be GeoJSON Feature, Geometry Object or an Array\"\n );\n}\n\n/**\n * Checks if coordinates contains a number\n *\n * @function\n * @param {Array} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nfunction containsNumber(coordinates: any[]): boolean {\n if (\n coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])\n ) {\n return true;\n }\n\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @function\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction geojsonType(value: any, type: string, name: string): void {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n\n if (!value || value.type !== type) {\n throw new Error(\n \"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type\n );\n }\n}\n\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @function\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nfunction featureOf(feature: Feature, type: string, name: string): void {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\n \"Invalid input to \" + name + \", Feature with geometry required\"\n );\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\n \"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type\n );\n }\n}\n\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @function\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction collectionOf(\n featureCollection: FeatureCollection,\n type: string,\n name: string\n) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\n \"Invalid input to \" + name + \", FeatureCollection required\"\n );\n }\n for (const feature of featureCollection.features) {\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\n \"Invalid input to \" + name + \", Feature with geometry required\"\n );\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\n \"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type\n );\n }\n }\n}\n\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nfunction getGeom(geojson: Feature | G): G {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nfunction getType(\n geojson: Feature | FeatureCollection | Geometry,\n _name?: string\n): string {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n\nexport {\n getCoord,\n getCoords,\n containsNumber,\n geojsonType,\n featureOf,\n collectionOf,\n getGeom,\n getType,\n};\n// No default export!\n", "export const epsilon = 1.1102230246251565e-16;\nexport const splitter = 134217729;\nexport const resulterrbound = (3 + 8 * epsilon) * epsilon;\n\n// fast_expansion_sum_zeroelim routine from oritinal code\nexport function sum(elen, e, flen, f, h) {\n let Q, Qnew, hh, bvirt;\n let enow = e[0];\n let fnow = f[0];\n let eindex = 0;\n let findex = 0;\n if ((fnow > enow) === (fnow > -enow)) {\n Q = enow;\n enow = e[++eindex];\n } else {\n Q = fnow;\n fnow = f[++findex];\n }\n let hindex = 0;\n if (eindex < elen && findex < flen) {\n if ((fnow > enow) === (fnow > -enow)) {\n Qnew = enow + Q;\n hh = Q - (Qnew - enow);\n enow = e[++eindex];\n } else {\n Qnew = fnow + Q;\n hh = Q - (Qnew - fnow);\n fnow = f[++findex];\n }\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n while (eindex < elen && findex < flen) {\n if ((fnow > enow) === (fnow > -enow)) {\n Qnew = Q + enow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (enow - bvirt);\n enow = e[++eindex];\n } else {\n Qnew = Q + fnow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n fnow = f[++findex];\n }\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n }\n while (eindex < elen) {\n Qnew = Q + enow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (enow - bvirt);\n enow = e[++eindex];\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n while (findex < flen) {\n Qnew = Q + fnow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n fnow = f[++findex];\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n if (Q !== 0 || hindex === 0) {\n h[hindex++] = Q;\n }\n return hindex;\n}\n\nexport function sum_three(alen, a, blen, b, clen, c, tmp, out) {\n return sum(sum(alen, a, blen, b, tmp), tmp, clen, c, out);\n}\n\n// scale_expansion_zeroelim routine from oritinal code\nexport function scale(elen, e, b, h) {\n let Q, sum, hh, product1, product0;\n let bvirt, c, ahi, alo, bhi, blo;\n\n c = splitter * b;\n bhi = c - (c - b);\n blo = b - bhi;\n let enow = e[0];\n Q = enow * b;\n c = splitter * enow;\n ahi = c - (c - enow);\n alo = enow - ahi;\n hh = alo * blo - (Q - ahi * bhi - alo * bhi - ahi * blo);\n let hindex = 0;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n for (let i = 1; i < elen; i++) {\n enow = e[i];\n product1 = enow * b;\n c = splitter * enow;\n ahi = c - (c - enow);\n alo = enow - ahi;\n product0 = alo * blo - (product1 - ahi * bhi - alo * bhi - ahi * blo);\n sum = Q + product0;\n bvirt = sum - Q;\n hh = Q - (sum - bvirt) + (product0 - bvirt);\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n Q = product1 + sum;\n hh = sum - (Q - product1);\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n if (Q !== 0 || hindex === 0) {\n h[hindex++] = Q;\n }\n return hindex;\n}\n\nexport function negate(elen, e) {\n for (let i = 0; i < elen; i++) e[i] = -e[i];\n return elen;\n}\n\nexport function estimate(elen, e) {\n let Q = e[0];\n for (let i = 1; i < elen; i++) Q += e[i];\n return Q;\n}\n\nexport function vec(n) {\n return new Float64Array(n);\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum} from './util.js';\n\nconst ccwerrboundA = (3 + 16 * epsilon) * epsilon;\nconst ccwerrboundB = (2 + 12 * epsilon) * epsilon;\nconst ccwerrboundC = (9 + 64 * epsilon) * epsilon * epsilon;\n\nconst B = vec(4);\nconst C1 = vec(8);\nconst C2 = vec(12);\nconst D = vec(16);\nconst u = vec(4);\n\nfunction orient2dadapt(ax, ay, bx, by, cx, cy, detsum) {\n let acxtail, acytail, bcxtail, bcytail;\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n const acx = ax - cx;\n const bcx = bx - cx;\n const acy = ay - cy;\n const bcy = by - cy;\n\n s1 = acx * bcy;\n c = splitter * acx;\n ahi = c - (c - acx);\n alo = acx - ahi;\n c = splitter * bcy;\n bhi = c - (c - bcy);\n blo = bcy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acy * bcx;\n c = splitter * acy;\n ahi = c - (c - acy);\n alo = acy - ahi;\n c = splitter * bcx;\n bhi = c - (c - bcx);\n blo = bcx - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n B[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n B[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n B[2] = _j - (u3 - bvirt) + (_i - bvirt);\n B[3] = u3;\n\n let det = estimate(4, B);\n let errbound = ccwerrboundB * detsum;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - acx;\n acxtail = ax - (acx + bvirt) + (bvirt - cx);\n bvirt = bx - bcx;\n bcxtail = bx - (bcx + bvirt) + (bvirt - cx);\n bvirt = ay - acy;\n acytail = ay - (acy + bvirt) + (bvirt - cy);\n bvirt = by - bcy;\n bcytail = by - (bcy + bvirt) + (bvirt - cy);\n\n if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) {\n return det;\n }\n\n errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det);\n det += (acx * bcytail + bcy * acxtail) - (acy * bcxtail + bcx * acytail);\n if (det >= errbound || -det >= errbound) return det;\n\n s1 = acxtail * bcy;\n c = splitter * acxtail;\n ahi = c - (c - acxtail);\n alo = acxtail - ahi;\n c = splitter * bcy;\n bhi = c - (c - bcy);\n blo = bcy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acytail * bcx;\n c = splitter * acytail;\n ahi = c - (c - acytail);\n alo = acytail - ahi;\n c = splitter * bcx;\n bhi = c - (c - bcx);\n blo = bcx - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const C1len = sum(4, B, 4, u, C1);\n\n s1 = acx * bcytail;\n c = splitter * acx;\n ahi = c - (c - acx);\n alo = acx - ahi;\n c = splitter * bcytail;\n bhi = c - (c - bcytail);\n blo = bcytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acy * bcxtail;\n c = splitter * acy;\n ahi = c - (c - acy);\n alo = acy - ahi;\n c = splitter * bcxtail;\n bhi = c - (c - bcxtail);\n blo = bcxtail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const C2len = sum(C1len, C1, 4, u, C2);\n\n s1 = acxtail * bcytail;\n c = splitter * acxtail;\n ahi = c - (c - acxtail);\n alo = acxtail - ahi;\n c = splitter * bcytail;\n bhi = c - (c - bcytail);\n blo = bcytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acytail * bcxtail;\n c = splitter * acytail;\n ahi = c - (c - acytail);\n alo = acytail - ahi;\n c = splitter * bcxtail;\n bhi = c - (c - bcxtail);\n blo = bcxtail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const Dlen = sum(C2len, C2, 4, u, D);\n\n return D[Dlen - 1];\n}\n\nexport function orient2d(ax, ay, bx, by, cx, cy) {\n const detleft = (ay - cy) * (bx - cx);\n const detright = (ax - cx) * (by - cy);\n const det = detleft - detright;\n\n const detsum = Math.abs(detleft + detright);\n if (Math.abs(det) >= ccwerrboundA * detsum) return det;\n\n return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum);\n}\n\nexport function orient2dfast(ax, ay, bx, by, cx, cy) {\n return (ay - cy) * (bx - cx) - (ax - cx) * (by - cy);\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum, scale} from './util.js';\n\nconst o3derrboundA = (7 + 56 * epsilon) * epsilon;\nconst o3derrboundB = (3 + 28 * epsilon) * epsilon;\nconst o3derrboundC = (26 + 288 * epsilon) * epsilon * epsilon;\n\nconst bc = vec(4);\nconst ca = vec(4);\nconst ab = vec(4);\nconst at_b = vec(4);\nconst at_c = vec(4);\nconst bt_c = vec(4);\nconst bt_a = vec(4);\nconst ct_a = vec(4);\nconst ct_b = vec(4);\nconst bct = vec(8);\nconst cat = vec(8);\nconst abt = vec(8);\nconst u = vec(4);\n\nconst _8 = vec(8);\nconst _8b = vec(8);\nconst _16 = vec(8);\nconst _12 = vec(12);\n\nlet fin = vec(192);\nlet fin2 = vec(192);\n\nfunction finadd(finlen, alen, a) {\n finlen = sum(finlen, fin, alen, a, fin2);\n const tmp = fin; fin = fin2; fin2 = tmp;\n return finlen;\n}\n\nfunction tailinit(xtail, ytail, ax, ay, bx, by, a, b) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3, negate;\n if (xtail === 0) {\n if (ytail === 0) {\n a[0] = 0;\n b[0] = 0;\n return 1;\n } else {\n negate = -ytail;\n s1 = negate * ax;\n c = splitter * negate;\n ahi = c - (c - negate);\n alo = negate - ahi;\n c = splitter * ax;\n bhi = c - (c - ax);\n blo = ax - bhi;\n a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n a[1] = s1;\n s1 = ytail * bx;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * bx;\n bhi = c - (c - bx);\n blo = bx - bhi;\n b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n b[1] = s1;\n return 2;\n }\n } else {\n if (ytail === 0) {\n s1 = xtail * ay;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n a[1] = s1;\n negate = -xtail;\n s1 = negate * by;\n c = splitter * negate;\n ahi = c - (c - negate);\n alo = negate - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n b[1] = s1;\n return 2;\n } else {\n s1 = xtail * ay;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ytail * ax;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * ax;\n bhi = c - (c - ax);\n blo = ax - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n a[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n a[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n a[2] = _j - (u3 - bvirt) + (_i - bvirt);\n a[3] = u3;\n s1 = ytail * bx;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * bx;\n bhi = c - (c - bx);\n blo = bx - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = xtail * by;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n b[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n b[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n b[2] = _j - (u3 - bvirt) + (_i - bvirt);\n b[3] = u3;\n return 4;\n }\n }\n}\n\nfunction tailadd(finlen, a, b, k, z) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, u3;\n s1 = a * b;\n c = splitter * a;\n ahi = c - (c - a);\n alo = a - ahi;\n c = splitter * b;\n bhi = c - (c - b);\n blo = b - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n c = splitter * k;\n bhi = c - (c - k);\n blo = k - bhi;\n _i = s0 * k;\n c = splitter * s0;\n ahi = c - (c - s0);\n alo = s0 - ahi;\n u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n _j = s1 * k;\n c = splitter * s1;\n ahi = c - (c - s1);\n alo = s1 - ahi;\n _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n _k = _i + _0;\n bvirt = _k - _i;\n u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n u3 = _j + _k;\n u[2] = _k - (u3 - _j);\n u[3] = u3;\n finlen = finadd(finlen, 4, u);\n if (z !== 0) {\n c = splitter * z;\n bhi = c - (c - z);\n blo = z - bhi;\n _i = s0 * z;\n c = splitter * s0;\n ahi = c - (c - s0);\n alo = s0 - ahi;\n u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n _j = s1 * z;\n c = splitter * s1;\n ahi = c - (c - s1);\n alo = s1 - ahi;\n _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n _k = _i + _0;\n bvirt = _k - _i;\n u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n u3 = _j + _k;\n u[2] = _k - (u3 - _j);\n u[3] = u3;\n finlen = finadd(finlen, 4, u);\n }\n return finlen;\n}\n\nfunction orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent) {\n let finlen;\n let adxtail, bdxtail, cdxtail;\n let adytail, bdytail, cdytail;\n let adztail, bdztail, cdztail;\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3;\n\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n s1 = bdx * cdy;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * bdy;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cdx * ady;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * cdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ca[3] = u3;\n s1 = adx * bdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * ady;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n\n finlen = sum(\n sum(\n scale(4, bc, adz, _8), _8,\n scale(4, ca, bdz, _8b), _8b, _16), _16,\n scale(4, ab, cdz, _8), _8, fin);\n\n let det = estimate(finlen, fin);\n let errbound = o3derrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - adx;\n adxtail = ax - (adx + bvirt) + (bvirt - dx);\n bvirt = bx - bdx;\n bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n bvirt = cx - cdx;\n cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n bvirt = ay - ady;\n adytail = ay - (ady + bvirt) + (bvirt - dy);\n bvirt = by - bdy;\n bdytail = by - (bdy + bvirt) + (bvirt - dy);\n bvirt = cy - cdy;\n cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n bvirt = az - adz;\n adztail = az - (adz + bvirt) + (bvirt - dz);\n bvirt = bz - bdz;\n bdztail = bz - (bdz + bvirt) + (bvirt - dz);\n bvirt = cz - cdz;\n cdztail = cz - (cdz + bvirt) + (bvirt - dz);\n\n if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 &&\n adytail === 0 && bdytail === 0 && cdytail === 0 &&\n adztail === 0 && bdztail === 0 && cdztail === 0) {\n return det;\n }\n\n errbound = o3derrboundC * permanent + resulterrbound * Math.abs(det);\n det +=\n adz * (bdx * cdytail + cdy * bdxtail - (bdy * cdxtail + cdx * bdytail)) + adztail * (bdx * cdy - bdy * cdx) +\n bdz * (cdx * adytail + ady * cdxtail - (cdy * adxtail + adx * cdytail)) + bdztail * (cdx * ady - cdy * adx) +\n cdz * (adx * bdytail + bdy * adxtail - (ady * bdxtail + bdx * adytail)) + cdztail * (adx * bdy - ady * bdx);\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n const at_len = tailinit(adxtail, adytail, bdx, bdy, cdx, cdy, at_b, at_c);\n const bt_len = tailinit(bdxtail, bdytail, cdx, cdy, adx, ady, bt_c, bt_a);\n const ct_len = tailinit(cdxtail, cdytail, adx, ady, bdx, bdy, ct_a, ct_b);\n\n const bctlen = sum(bt_len, bt_c, ct_len, ct_b, bct);\n finlen = finadd(finlen, scale(bctlen, bct, adz, _16), _16);\n\n const catlen = sum(ct_len, ct_a, at_len, at_c, cat);\n finlen = finadd(finlen, scale(catlen, cat, bdz, _16), _16);\n\n const abtlen = sum(at_len, at_b, bt_len, bt_a, abt);\n finlen = finadd(finlen, scale(abtlen, abt, cdz, _16), _16);\n\n if (adztail !== 0) {\n finlen = finadd(finlen, scale(4, bc, adztail, _12), _12);\n finlen = finadd(finlen, scale(bctlen, bct, adztail, _16), _16);\n }\n if (bdztail !== 0) {\n finlen = finadd(finlen, scale(4, ca, bdztail, _12), _12);\n finlen = finadd(finlen, scale(catlen, cat, bdztail, _16), _16);\n }\n if (cdztail !== 0) {\n finlen = finadd(finlen, scale(4, ab, cdztail, _12), _12);\n finlen = finadd(finlen, scale(abtlen, abt, cdztail, _16), _16);\n }\n\n if (adxtail !== 0) {\n if (bdytail !== 0) {\n finlen = tailadd(finlen, adxtail, bdytail, cdz, cdztail);\n }\n if (cdytail !== 0) {\n finlen = tailadd(finlen, -adxtail, cdytail, bdz, bdztail);\n }\n }\n if (bdxtail !== 0) {\n if (cdytail !== 0) {\n finlen = tailadd(finlen, bdxtail, cdytail, adz, adztail);\n }\n if (adytail !== 0) {\n finlen = tailadd(finlen, -bdxtail, adytail, cdz, cdztail);\n }\n }\n if (cdxtail !== 0) {\n if (adytail !== 0) {\n finlen = tailadd(finlen, cdxtail, adytail, bdz, bdztail);\n }\n if (bdytail !== 0) {\n finlen = tailadd(finlen, -cdxtail, bdytail, adz, adztail);\n }\n }\n\n return fin[finlen - 1];\n}\n\nexport function orient3d(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n const bdxcdy = bdx * cdy;\n const cdxbdy = cdx * bdy;\n\n const cdxady = cdx * ady;\n const adxcdy = adx * cdy;\n\n const adxbdy = adx * bdy;\n const bdxady = bdx * ady;\n\n const det =\n adz * (bdxcdy - cdxbdy) +\n bdz * (cdxady - adxcdy) +\n cdz * (adxbdy - bdxady);\n\n const permanent =\n (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * Math.abs(adz) +\n (Math.abs(cdxady) + Math.abs(adxcdy)) * Math.abs(bdz) +\n (Math.abs(adxbdy) + Math.abs(bdxady)) * Math.abs(cdz);\n\n const errbound = o3derrboundA * permanent;\n if (det > errbound || -det > errbound) {\n return det;\n }\n\n return orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent);\n}\n\nexport function orient3dfast(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n return adx * (bdy * cdz - bdz * cdy) +\n bdx * (cdy * adz - cdz * ady) +\n cdx * (ady * bdz - adz * bdy);\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum, sum_three, scale} from './util.js';\n\nconst iccerrboundA = (10 + 96 * epsilon) * epsilon;\nconst iccerrboundB = (4 + 48 * epsilon) * epsilon;\nconst iccerrboundC = (44 + 576 * epsilon) * epsilon * epsilon;\n\nconst bc = vec(4);\nconst ca = vec(4);\nconst ab = vec(4);\nconst aa = vec(4);\nconst bb = vec(4);\nconst cc = vec(4);\nconst u = vec(4);\nconst v = vec(4);\nconst axtbc = vec(8);\nconst aytbc = vec(8);\nconst bxtca = vec(8);\nconst bytca = vec(8);\nconst cxtab = vec(8);\nconst cytab = vec(8);\nconst abt = vec(8);\nconst bct = vec(8);\nconst cat = vec(8);\nconst abtt = vec(4);\nconst bctt = vec(4);\nconst catt = vec(4);\n\nconst _8 = vec(8);\nconst _16 = vec(16);\nconst _16b = vec(16);\nconst _16c = vec(16);\nconst _32 = vec(32);\nconst _32b = vec(32);\nconst _48 = vec(48);\nconst _64 = vec(64);\n\nlet fin = vec(1152);\nlet fin2 = vec(1152);\n\nfunction finadd(finlen, a, alen) {\n finlen = sum(finlen, fin, a, alen, fin2);\n const tmp = fin; fin = fin2; fin2 = tmp;\n return finlen;\n}\n\nfunction incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent) {\n let finlen;\n let adxtail, bdxtail, cdxtail, adytail, bdytail, cdytail;\n let axtbclen, aytbclen, bxtcalen, bytcalen, cxtablen, cytablen;\n let abtlen, bctlen, catlen;\n let abttlen, bcttlen, cattlen;\n let n1, n0;\n\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n\n s1 = bdx * cdy;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * bdy;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cdx * ady;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * cdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ca[3] = u3;\n s1 = adx * bdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * ady;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n\n finlen = sum(\n sum(\n sum(\n scale(scale(4, bc, adx, _8), _8, adx, _16), _16,\n scale(scale(4, bc, ady, _8), _8, ady, _16b), _16b, _32), _32,\n sum(\n scale(scale(4, ca, bdx, _8), _8, bdx, _16), _16,\n scale(scale(4, ca, bdy, _8), _8, bdy, _16b), _16b, _32b), _32b, _64), _64,\n sum(\n scale(scale(4, ab, cdx, _8), _8, cdx, _16), _16,\n scale(scale(4, ab, cdy, _8), _8, cdy, _16b), _16b, _32), _32, fin);\n\n let det = estimate(finlen, fin);\n let errbound = iccerrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - adx;\n adxtail = ax - (adx + bvirt) + (bvirt - dx);\n bvirt = ay - ady;\n adytail = ay - (ady + bvirt) + (bvirt - dy);\n bvirt = bx - bdx;\n bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n bvirt = by - bdy;\n bdytail = by - (bdy + bvirt) + (bvirt - dy);\n bvirt = cx - cdx;\n cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n bvirt = cy - cdy;\n cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 && adytail === 0 && bdytail === 0 && cdytail === 0) {\n return det;\n }\n\n errbound = iccerrboundC * permanent + resulterrbound * Math.abs(det);\n det += ((adx * adx + ady * ady) * ((bdx * cdytail + cdy * bdxtail) - (bdy * cdxtail + cdx * bdytail)) +\n 2 * (adx * adxtail + ady * adytail) * (bdx * cdy - bdy * cdx)) +\n ((bdx * bdx + bdy * bdy) * ((cdx * adytail + ady * cdxtail) - (cdy * adxtail + adx * cdytail)) +\n 2 * (bdx * bdxtail + bdy * bdytail) * (cdx * ady - cdy * adx)) +\n ((cdx * cdx + cdy * cdy) * ((adx * bdytail + bdy * adxtail) - (ady * bdxtail + bdx * adytail)) +\n 2 * (cdx * cdxtail + cdy * cdytail) * (adx * bdy - ady * bdx));\n\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n s1 = adx * adx;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = ady * ady;\n c = splitter * ady;\n ahi = c - (c - ady);\n alo = ady - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n aa[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n aa[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n aa[2] = _j - (u3 - bvirt) + (_i - bvirt);\n aa[3] = u3;\n }\n if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n s1 = bdx * bdx;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = bdy * bdy;\n c = splitter * bdy;\n ahi = c - (c - bdy);\n alo = bdy - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n bb[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n bb[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bb[3] = u3;\n }\n if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n s1 = cdx * cdx;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = cdy * cdy;\n c = splitter * cdy;\n ahi = c - (c - cdy);\n alo = cdy - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n cc[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n cc[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n cc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n cc[3] = u3;\n }\n\n if (adxtail !== 0) {\n axtbclen = scale(4, bc, adxtail, axtbc);\n finlen = finadd(finlen, sum_three(\n scale(axtbclen, axtbc, 2 * adx, _16), _16,\n scale(scale(4, cc, adxtail, _8), _8, bdy, _16b), _16b,\n scale(scale(4, bb, adxtail, _8), _8, -cdy, _16c), _16c, _32, _48), _48);\n }\n if (adytail !== 0) {\n aytbclen = scale(4, bc, adytail, aytbc);\n finlen = finadd(finlen, sum_three(\n scale(aytbclen, aytbc, 2 * ady, _16), _16,\n scale(scale(4, bb, adytail, _8), _8, cdx, _16b), _16b,\n scale(scale(4, cc, adytail, _8), _8, -bdx, _16c), _16c, _32, _48), _48);\n }\n if (bdxtail !== 0) {\n bxtcalen = scale(4, ca, bdxtail, bxtca);\n finlen = finadd(finlen, sum_three(\n scale(bxtcalen, bxtca, 2 * bdx, _16), _16,\n scale(scale(4, aa, bdxtail, _8), _8, cdy, _16b), _16b,\n scale(scale(4, cc, bdxtail, _8), _8, -ady, _16c), _16c, _32, _48), _48);\n }\n if (bdytail !== 0) {\n bytcalen = scale(4, ca, bdytail, bytca);\n finlen = finadd(finlen, sum_three(\n scale(bytcalen, bytca, 2 * bdy, _16), _16,\n scale(scale(4, cc, bdytail, _8), _8, adx, _16b), _16b,\n scale(scale(4, aa, bdytail, _8), _8, -cdx, _16c), _16c, _32, _48), _48);\n }\n if (cdxtail !== 0) {\n cxtablen = scale(4, ab, cdxtail, cxtab);\n finlen = finadd(finlen, sum_three(\n scale(cxtablen, cxtab, 2 * cdx, _16), _16,\n scale(scale(4, bb, cdxtail, _8), _8, ady, _16b), _16b,\n scale(scale(4, aa, cdxtail, _8), _8, -bdy, _16c), _16c, _32, _48), _48);\n }\n if (cdytail !== 0) {\n cytablen = scale(4, ab, cdytail, cytab);\n finlen = finadd(finlen, sum_three(\n scale(cytablen, cytab, 2 * cdy, _16), _16,\n scale(scale(4, aa, cdytail, _8), _8, bdx, _16b), _16b,\n scale(scale(4, bb, cdytail, _8), _8, -adx, _16c), _16c, _32, _48), _48);\n }\n\n if (adxtail !== 0 || adytail !== 0) {\n if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n s1 = bdxtail * cdy;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * cdytail;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n s1 = cdxtail * -bdy;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * -bdy;\n bhi = c - (c - -bdy);\n blo = -bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * -bdytail;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * -bdytail;\n bhi = c - (c - -bdytail);\n blo = -bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n bctlen = sum(4, u, 4, v, bct);\n s1 = bdxtail * cdytail;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdxtail * bdytail;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bctt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bctt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bctt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bctt[3] = u3;\n bcttlen = 4;\n } else {\n bct[0] = 0;\n bctlen = 1;\n bctt[0] = 0;\n bcttlen = 1;\n }\n if (adxtail !== 0) {\n const len = scale(bctlen, bct, adxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(axtbclen, axtbc, adxtail, _16), _16,\n scale(len, _16c, 2 * adx, _32), _32, _48), _48);\n\n const len2 = scale(bcttlen, bctt, adxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * adx, _16), _16,\n scale(len2, _8, adxtail, _16b), _16b,\n scale(len, _16c, adxtail, _32), _32, _32b, _64), _64);\n\n if (bdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, cc, adxtail, _8), _8, bdytail, _16), _16);\n }\n if (cdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, bb, -adxtail, _8), _8, cdytail, _16), _16);\n }\n }\n if (adytail !== 0) {\n const len = scale(bctlen, bct, adytail, _16c);\n finlen = finadd(finlen, sum(\n scale(aytbclen, aytbc, adytail, _16), _16,\n scale(len, _16c, 2 * ady, _32), _32, _48), _48);\n\n const len2 = scale(bcttlen, bctt, adytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * ady, _16), _16,\n scale(len2, _8, adytail, _16b), _16b,\n scale(len, _16c, adytail, _32), _32, _32b, _64), _64);\n }\n }\n if (bdxtail !== 0 || bdytail !== 0) {\n if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n s1 = cdxtail * ady;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * adytail;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n n1 = -cdy;\n n0 = -cdytail;\n s1 = adxtail * n1;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * n1;\n bhi = c - (c - n1);\n blo = n1 - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * n0;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * n0;\n bhi = c - (c - n0);\n blo = n0 - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n catlen = sum(4, u, 4, v, cat);\n s1 = cdxtail * adytail;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adxtail * cdytail;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n catt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n catt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n catt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n catt[3] = u3;\n cattlen = 4;\n } else {\n cat[0] = 0;\n catlen = 1;\n catt[0] = 0;\n cattlen = 1;\n }\n if (bdxtail !== 0) {\n const len = scale(catlen, cat, bdxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(bxtcalen, bxtca, bdxtail, _16), _16,\n scale(len, _16c, 2 * bdx, _32), _32, _48), _48);\n\n const len2 = scale(cattlen, catt, bdxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * bdx, _16), _16,\n scale(len2, _8, bdxtail, _16b), _16b,\n scale(len, _16c, bdxtail, _32), _32, _32b, _64), _64);\n\n if (cdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, aa, bdxtail, _8), _8, cdytail, _16), _16);\n }\n if (adytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, cc, -bdxtail, _8), _8, adytail, _16), _16);\n }\n }\n if (bdytail !== 0) {\n const len = scale(catlen, cat, bdytail, _16c);\n finlen = finadd(finlen, sum(\n scale(bytcalen, bytca, bdytail, _16), _16,\n scale(len, _16c, 2 * bdy, _32), _32, _48), _48);\n\n const len2 = scale(cattlen, catt, bdytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * bdy, _16), _16,\n scale(len2, _8, bdytail, _16b), _16b,\n scale(len, _16c, bdytail, _32), _32, _32b, _64), _64);\n }\n }\n if (cdxtail !== 0 || cdytail !== 0) {\n if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n s1 = adxtail * bdy;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * bdytail;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n n1 = -ady;\n n0 = -adytail;\n s1 = bdxtail * n1;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * n1;\n bhi = c - (c - n1);\n blo = n1 - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * n0;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * n0;\n bhi = c - (c - n0);\n blo = n0 - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n abtlen = sum(4, u, 4, v, abt);\n s1 = adxtail * bdytail;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdxtail * adytail;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n abtt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n abtt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n abtt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n abtt[3] = u3;\n abttlen = 4;\n } else {\n abt[0] = 0;\n abtlen = 1;\n abtt[0] = 0;\n abttlen = 1;\n }\n if (cdxtail !== 0) {\n const len = scale(abtlen, abt, cdxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(cxtablen, cxtab, cdxtail, _16), _16,\n scale(len, _16c, 2 * cdx, _32), _32, _48), _48);\n\n const len2 = scale(abttlen, abtt, cdxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * cdx, _16), _16,\n scale(len2, _8, cdxtail, _16b), _16b,\n scale(len, _16c, cdxtail, _32), _32, _32b, _64), _64);\n\n if (adytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, bb, cdxtail, _8), _8, adytail, _16), _16);\n }\n if (bdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, aa, -cdxtail, _8), _8, bdytail, _16), _16);\n }\n }\n if (cdytail !== 0) {\n const len = scale(abtlen, abt, cdytail, _16c);\n finlen = finadd(finlen, sum(\n scale(cytablen, cytab, cdytail, _16), _16,\n scale(len, _16c, 2 * cdy, _32), _32, _48), _48);\n\n const len2 = scale(abttlen, abtt, cdytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * cdy, _16), _16,\n scale(len2, _8, cdytail, _16b), _16b,\n scale(len, _16c, cdytail, _32), _32, _32b, _64), _64);\n }\n }\n\n return fin[finlen - 1];\n}\n\nexport function incircle(ax, ay, bx, by, cx, cy, dx, dy) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n\n const bdxcdy = bdx * cdy;\n const cdxbdy = cdx * bdy;\n const alift = adx * adx + ady * ady;\n\n const cdxady = cdx * ady;\n const adxcdy = adx * cdy;\n const blift = bdx * bdx + bdy * bdy;\n\n const adxbdy = adx * bdy;\n const bdxady = bdx * ady;\n const clift = cdx * cdx + cdy * cdy;\n\n const det =\n alift * (bdxcdy - cdxbdy) +\n blift * (cdxady - adxcdy) +\n clift * (adxbdy - bdxady);\n\n const permanent =\n (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * alift +\n (Math.abs(cdxady) + Math.abs(adxcdy)) * blift +\n (Math.abs(adxbdy) + Math.abs(bdxady)) * clift;\n\n const errbound = iccerrboundA * permanent;\n\n if (det > errbound || -det > errbound) {\n return det;\n }\n return incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent);\n}\n\nexport function incirclefast(ax, ay, bx, by, cx, cy, dx, dy) {\n const adx = ax - dx;\n const ady = ay - dy;\n const bdx = bx - dx;\n const bdy = by - dy;\n const cdx = cx - dx;\n const cdy = cy - dy;\n\n const abdet = adx * bdy - bdx * ady;\n const bcdet = bdx * cdy - cdx * bdy;\n const cadet = cdx * ady - adx * cdy;\n const alift = adx * adx + ady * ady;\n const blift = bdx * bdx + bdy * bdy;\n const clift = cdx * cdx + cdy * cdy;\n\n return alift * bcdet + blift * cadet + clift * abdet;\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum, sum_three, scale, negate} from './util.js';\n\nconst isperrboundA = (16 + 224 * epsilon) * epsilon;\nconst isperrboundB = (5 + 72 * epsilon) * epsilon;\nconst isperrboundC = (71 + 1408 * epsilon) * epsilon * epsilon;\n\nconst ab = vec(4);\nconst bc = vec(4);\nconst cd = vec(4);\nconst de = vec(4);\nconst ea = vec(4);\nconst ac = vec(4);\nconst bd = vec(4);\nconst ce = vec(4);\nconst da = vec(4);\nconst eb = vec(4);\n\nconst abc = vec(24);\nconst bcd = vec(24);\nconst cde = vec(24);\nconst dea = vec(24);\nconst eab = vec(24);\nconst abd = vec(24);\nconst bce = vec(24);\nconst cda = vec(24);\nconst deb = vec(24);\nconst eac = vec(24);\n\nconst adet = vec(1152);\nconst bdet = vec(1152);\nconst cdet = vec(1152);\nconst ddet = vec(1152);\nconst edet = vec(1152);\nconst abdet = vec(2304);\nconst cddet = vec(2304);\nconst cdedet = vec(3456);\nconst deter = vec(5760);\n\nconst _8 = vec(8);\nconst _8b = vec(8);\nconst _8c = vec(8);\nconst _16 = vec(16);\nconst _24 = vec(24);\nconst _48 = vec(48);\nconst _48b = vec(48);\nconst _96 = vec(96);\nconst _192 = vec(192);\nconst _384x = vec(384);\nconst _384y = vec(384);\nconst _384z = vec(384);\nconst _768 = vec(768);\n\nfunction sum_three_scale(a, b, c, az, bz, cz, out) {\n return sum_three(\n scale(4, a, az, _8), _8,\n scale(4, b, bz, _8b), _8b,\n scale(4, c, cz, _8c), _8c, _16, out);\n}\n\nfunction liftexact(alen, a, blen, b, clen, c, dlen, d, x, y, z, out) {\n const len = sum(\n sum(alen, a, blen, b, _48), _48,\n negate(sum(clen, c, dlen, d, _48b), _48b), _48b, _96);\n\n return sum_three(\n scale(scale(len, _96, x, _192), _192, x, _384x), _384x,\n scale(scale(len, _96, y, _192), _192, y, _384y), _384y,\n scale(scale(len, _96, z, _192), _192, z, _384z), _384z, _768, out);\n}\n\nfunction insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n s1 = ax * by;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bx * ay;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n s1 = bx * cy;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cx * by;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cx * dy;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dx * cy;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n cd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n cd[3] = u3;\n s1 = dx * ey;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ex * dy;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n de[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n de[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n de[2] = _j - (u3 - bvirt) + (_i - bvirt);\n de[3] = u3;\n s1 = ex * ay;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ax * ey;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ea[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ea[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ea[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ea[3] = u3;\n s1 = ax * cy;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cx * ay;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ac[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ac[3] = u3;\n s1 = bx * dy;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dx * by;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bd[3] = u3;\n s1 = cx * ey;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ex * cy;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ce[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ce[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ce[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ce[3] = u3;\n s1 = dx * ay;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ax * dy;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n da[2] = _j - (u3 - bvirt) + (_i - bvirt);\n da[3] = u3;\n s1 = ex * by;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bx * ey;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n eb[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n eb[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n eb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n eb[3] = u3;\n\n const abclen = sum_three_scale(ab, bc, ac, cz, az, -bz, abc);\n const bcdlen = sum_three_scale(bc, cd, bd, dz, bz, -cz, bcd);\n const cdelen = sum_three_scale(cd, de, ce, ez, cz, -dz, cde);\n const dealen = sum_three_scale(de, ea, da, az, dz, -ez, dea);\n const eablen = sum_three_scale(ea, ab, eb, bz, ez, -az, eab);\n const abdlen = sum_three_scale(ab, bd, da, dz, az, bz, abd);\n const bcelen = sum_three_scale(bc, ce, eb, ez, bz, cz, bce);\n const cdalen = sum_three_scale(cd, da, ac, az, cz, dz, cda);\n const deblen = sum_three_scale(de, eb, bd, bz, dz, ez, deb);\n const eaclen = sum_three_scale(ea, ac, ce, cz, ez, az, eac);\n\n const deterlen = sum_three(\n liftexact(cdelen, cde, bcelen, bce, deblen, deb, bcdlen, bcd, ax, ay, az, adet), adet,\n liftexact(dealen, dea, cdalen, cda, eaclen, eac, cdelen, cde, bx, by, bz, bdet), bdet,\n sum_three(\n liftexact(eablen, eab, deblen, deb, abdlen, abd, dealen, dea, cx, cy, cz, cdet), cdet,\n liftexact(abclen, abc, eaclen, eac, bcelen, bce, eablen, eab, dx, dy, dz, ddet), ddet,\n liftexact(bcdlen, bcd, abdlen, abd, cdalen, cda, abclen, abc, ex, ey, ez, edet), edet, cddet, cdedet), cdedet, abdet, deter);\n\n return deter[deterlen - 1];\n}\n\nconst xdet = vec(96);\nconst ydet = vec(96);\nconst zdet = vec(96);\nconst fin = vec(1152);\n\nfunction liftadapt(a, b, c, az, bz, cz, x, y, z, out) {\n const len = sum_three_scale(a, b, c, az, bz, cz, _24);\n return sum_three(\n scale(scale(len, _24, x, _48), _48, x, xdet), xdet,\n scale(scale(len, _24, y, _48), _48, y, ydet), ydet,\n scale(scale(len, _24, z, _48), _48, z, zdet), zdet, _192, out);\n}\n\nfunction insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent) {\n let ab3, bc3, cd3, da3, ac3, bd3;\n\n let aextail, bextail, cextail, dextail;\n let aeytail, beytail, ceytail, deytail;\n let aeztail, beztail, ceztail, deztail;\n\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0;\n\n const aex = ax - ex;\n const bex = bx - ex;\n const cex = cx - ex;\n const dex = dx - ex;\n const aey = ay - ey;\n const bey = by - ey;\n const cey = cy - ey;\n const dey = dy - ey;\n const aez = az - ez;\n const bez = bz - ez;\n const cez = cz - ez;\n const dez = dz - ez;\n\n s1 = aex * bey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bex * aey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n ab3 = _j + _i;\n bvirt = ab3 - _j;\n ab[2] = _j - (ab3 - bvirt) + (_i - bvirt);\n ab[3] = ab3;\n s1 = bex * cey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cex * bey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n bc3 = _j + _i;\n bvirt = bc3 - _j;\n bc[2] = _j - (bc3 - bvirt) + (_i - bvirt);\n bc[3] = bc3;\n s1 = cex * dey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dex * cey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n cd3 = _j + _i;\n bvirt = cd3 - _j;\n cd[2] = _j - (cd3 - bvirt) + (_i - bvirt);\n cd[3] = cd3;\n s1 = dex * aey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = aex * dey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n da3 = _j + _i;\n bvirt = da3 - _j;\n da[2] = _j - (da3 - bvirt) + (_i - bvirt);\n da[3] = da3;\n s1 = aex * cey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cex * aey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n ac3 = _j + _i;\n bvirt = ac3 - _j;\n ac[2] = _j - (ac3 - bvirt) + (_i - bvirt);\n ac[3] = ac3;\n s1 = bex * dey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dex * bey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n bd3 = _j + _i;\n bvirt = bd3 - _j;\n bd[2] = _j - (bd3 - bvirt) + (_i - bvirt);\n bd[3] = bd3;\n\n const finlen = sum(\n sum(\n negate(liftadapt(bc, cd, bd, dez, bez, -cez, aex, aey, aez, adet), adet), adet,\n liftadapt(cd, da, ac, aez, cez, dez, bex, bey, bez, bdet), bdet, abdet), abdet,\n sum(\n negate(liftadapt(da, ab, bd, bez, dez, aez, cex, cey, cez, cdet), cdet), cdet,\n liftadapt(ab, bc, ac, cez, aez, -bez, dex, dey, dez, ddet), ddet, cddet), cddet, fin);\n\n let det = estimate(finlen, fin);\n let errbound = isperrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - aex;\n aextail = ax - (aex + bvirt) + (bvirt - ex);\n bvirt = ay - aey;\n aeytail = ay - (aey + bvirt) + (bvirt - ey);\n bvirt = az - aez;\n aeztail = az - (aez + bvirt) + (bvirt - ez);\n bvirt = bx - bex;\n bextail = bx - (bex + bvirt) + (bvirt - ex);\n bvirt = by - bey;\n beytail = by - (bey + bvirt) + (bvirt - ey);\n bvirt = bz - bez;\n beztail = bz - (bez + bvirt) + (bvirt - ez);\n bvirt = cx - cex;\n cextail = cx - (cex + bvirt) + (bvirt - ex);\n bvirt = cy - cey;\n ceytail = cy - (cey + bvirt) + (bvirt - ey);\n bvirt = cz - cez;\n ceztail = cz - (cez + bvirt) + (bvirt - ez);\n bvirt = dx - dex;\n dextail = dx - (dex + bvirt) + (bvirt - ex);\n bvirt = dy - dey;\n deytail = dy - (dey + bvirt) + (bvirt - ey);\n bvirt = dz - dez;\n deztail = dz - (dez + bvirt) + (bvirt - ez);\n if (aextail === 0 && aeytail === 0 && aeztail === 0 &&\n bextail === 0 && beytail === 0 && beztail === 0 &&\n cextail === 0 && ceytail === 0 && ceztail === 0 &&\n dextail === 0 && deytail === 0 && deztail === 0) {\n return det;\n }\n\n errbound = isperrboundC * permanent + resulterrbound * Math.abs(det);\n\n const abeps = (aex * beytail + bey * aextail) - (aey * bextail + bex * aeytail);\n const bceps = (bex * ceytail + cey * bextail) - (bey * cextail + cex * beytail);\n const cdeps = (cex * deytail + dey * cextail) - (cey * dextail + dex * ceytail);\n const daeps = (dex * aeytail + aey * dextail) - (dey * aextail + aex * deytail);\n const aceps = (aex * ceytail + cey * aextail) - (aey * cextail + cex * aeytail);\n const bdeps = (bex * deytail + dey * bextail) - (bey * dextail + dex * beytail);\n det +=\n (((bex * bex + bey * bey + bez * bez) * ((cez * daeps + dez * aceps + aez * cdeps) +\n (ceztail * da3 + deztail * ac3 + aeztail * cd3)) + (dex * dex + dey * dey + dez * dez) *\n ((aez * bceps - bez * aceps + cez * abeps) + (aeztail * bc3 - beztail * ac3 + ceztail * ab3))) -\n ((aex * aex + aey * aey + aez * aez) * ((bez * cdeps - cez * bdeps + dez * bceps) +\n (beztail * cd3 - ceztail * bd3 + deztail * bc3)) + (cex * cex + cey * cey + cez * cez) *\n ((dez * abeps + aez * bdeps + bez * daeps) + (deztail * ab3 + aeztail * bd3 + beztail * da3)))) +\n 2 * (((bex * bextail + bey * beytail + bez * beztail) * (cez * da3 + dez * ac3 + aez * cd3) +\n (dex * dextail + dey * deytail + dez * deztail) * (aez * bc3 - bez * ac3 + cez * ab3)) -\n ((aex * aextail + aey * aeytail + aez * aeztail) * (bez * cd3 - cez * bd3 + dez * bc3) +\n (cex * cextail + cey * ceytail + cez * ceztail) * (dez * ab3 + aez * bd3 + bez * da3)));\n\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n return insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez);\n}\n\nexport function insphere(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n const aex = ax - ex;\n const bex = bx - ex;\n const cex = cx - ex;\n const dex = dx - ex;\n const aey = ay - ey;\n const bey = by - ey;\n const cey = cy - ey;\n const dey = dy - ey;\n const aez = az - ez;\n const bez = bz - ez;\n const cez = cz - ez;\n const dez = dz - ez;\n\n const aexbey = aex * bey;\n const bexaey = bex * aey;\n const ab = aexbey - bexaey;\n const bexcey = bex * cey;\n const cexbey = cex * bey;\n const bc = bexcey - cexbey;\n const cexdey = cex * dey;\n const dexcey = dex * cey;\n const cd = cexdey - dexcey;\n const dexaey = dex * aey;\n const aexdey = aex * dey;\n const da = dexaey - aexdey;\n const aexcey = aex * cey;\n const cexaey = cex * aey;\n const ac = aexcey - cexaey;\n const bexdey = bex * dey;\n const dexbey = dex * bey;\n const bd = bexdey - dexbey;\n\n const alift = aex * aex + aey * aey + aez * aez;\n const blift = bex * bex + bey * bey + bez * bez;\n const clift = cex * cex + cey * cey + cez * cez;\n const dlift = dex * dex + dey * dey + dez * dez;\n\n const det =\n (clift * (dez * ab + aez * bd + bez * da) - dlift * (aez * bc - bez * ac + cez * ab)) +\n (alift * (bez * cd - cez * bd + dez * bc) - blift * (cez * da + dez * ac + aez * cd));\n\n const aezplus = Math.abs(aez);\n const bezplus = Math.abs(bez);\n const cezplus = Math.abs(cez);\n const dezplus = Math.abs(dez);\n const aexbeyplus = Math.abs(aexbey) + Math.abs(bexaey);\n const bexceyplus = Math.abs(bexcey) + Math.abs(cexbey);\n const cexdeyplus = Math.abs(cexdey) + Math.abs(dexcey);\n const dexaeyplus = Math.abs(dexaey) + Math.abs(aexdey);\n const aexceyplus = Math.abs(aexcey) + Math.abs(cexaey);\n const bexdeyplus = Math.abs(bexdey) + Math.abs(dexbey);\n const permanent =\n (cexdeyplus * bezplus + bexdeyplus * cezplus + bexceyplus * dezplus) * alift +\n (dexaeyplus * cezplus + aexceyplus * dezplus + cexdeyplus * aezplus) * blift +\n (aexbeyplus * dezplus + bexdeyplus * aezplus + dexaeyplus * bezplus) * clift +\n (bexceyplus * aezplus + aexceyplus * bezplus + aexbeyplus * cezplus) * dlift;\n\n const errbound = isperrboundA * permanent;\n if (det > errbound || -det > errbound) {\n return det;\n }\n return -insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent);\n}\n\nexport function inspherefast(pax, pay, paz, pbx, pby, pbz, pcx, pcy, pcz, pdx, pdy, pdz, pex, pey, pez) {\n const aex = pax - pex;\n const bex = pbx - pex;\n const cex = pcx - pex;\n const dex = pdx - pex;\n const aey = pay - pey;\n const bey = pby - pey;\n const cey = pcy - pey;\n const dey = pdy - pey;\n const aez = paz - pez;\n const bez = pbz - pez;\n const cez = pcz - pez;\n const dez = pdz - pez;\n\n const ab = aex * bey - bex * aey;\n const bc = bex * cey - cex * bey;\n const cd = cex * dey - dex * cey;\n const da = dex * aey - aex * dey;\n const ac = aex * cey - cex * aey;\n const bd = bex * dey - dex * bey;\n\n const abc = aez * bc - bez * ac + cez * ab;\n const bcd = bez * cd - cez * bd + dez * bc;\n const cda = cez * da + dez * ac + aez * cd;\n const dab = dez * ab + aez * bd + bez * da;\n\n const alift = aex * aex + aey * aey + aez * aez;\n const blift = bex * bex + bey * bey + bez * bez;\n const clift = cex * cex + cey * cey + cez * cez;\n const dlift = dex * dex + dey * dey + dez * dez;\n\n return (clift * dab - dlift * abc) + (alift * bcd - blift * cda);\n}\n", "\nexport {orient2d, orient2dfast} from './esm/orient2d.js';\nexport {orient3d, orient3dfast} from './esm/orient3d.js';\nexport {incircle, incirclefast} from './esm/incircle.js';\nexport {insphere, inspherefast} from './esm/insphere.js';\n", "import { orient2d } from 'robust-predicates';\n\nfunction pointInPolygon(p, polygon) {\n var i;\n var ii;\n var k = 0;\n var f;\n var u1;\n var v1;\n var u2;\n var v2;\n var currentP;\n var nextP;\n\n var x = p[0];\n var y = p[1];\n\n var numContours = polygon.length;\n for (i = 0; i < numContours; i++) {\n ii = 0;\n var contour = polygon[i];\n var contourLen = contour.length - 1;\n\n currentP = contour[0];\n if (currentP[0] !== contour[contourLen][0] &&\n currentP[1] !== contour[contourLen][1]) {\n throw new Error('First and last coordinates in a ring must be the same')\n }\n\n u1 = currentP[0] - x;\n v1 = currentP[1] - y;\n\n for (ii; ii < contourLen; ii++) {\n nextP = contour[ii + 1];\n\n u2 = nextP[0] - x;\n v2 = nextP[1] - y;\n\n if (v1 === 0 && v2 === 0) {\n if ((u2 <= 0 && u1 >= 0) || (u1 <= 0 && u2 >= 0)) { return 0 }\n } else if ((v2 >= 0 && v1 <= 0) || (v2 <= 0 && v1 >= 0)) {\n f = orient2d(u1, u2, v1, v2, 0, 0);\n if (f === 0) { return 0 }\n if ((f > 0 && v2 > 0 && v1 <= 0) || (f < 0 && v2 <= 0 && v1 > 0)) { k++; }\n }\n currentP = nextP;\n v1 = v2;\n u1 = u2;\n }\n }\n\n if (k % 2 === 0) { return false }\n return true\n}\n\nexport { pointInPolygon as default };\n", "import pip from \"point-in-polygon-hao\";\nimport {\n BBox,\n Feature,\n MultiPolygon,\n Polygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { Coord } from \"@turf/helpers\";\nimport { getCoord, getGeom } from \"@turf/invariant\";\n\n// http://en.wikipedia.org/wiki/Even%E2%80%93odd_rule\n// modified from: https://github.com/substack/point-in-polygon/blob/master/index.js\n// which was modified from http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html\n/**\n * Takes a {@link Point} and a {@link Polygon} or {@link MultiPolygon} and determines if the point\n * resides inside the polygon. The polygon can be convex or concave. The function accounts for holes.\n *\n * @function\n * @param {Coord} point input point\n * @param {Feature} polygon input polygon or multipolygon\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.ignoreBoundary=false] True if polygon boundary should be ignored when determining if\n * the point is inside the polygon otherwise false.\n * @returns {boolean} `true` if the Point is inside the Polygon; `false` if the Point is not inside the Polygon\n * @example\n * var pt = turf.point([-77, 44]);\n * var poly = turf.polygon([[\n * [-81, 41],\n * [-81, 47],\n * [-72, 47],\n * [-72, 41],\n * [-81, 41]\n * ]]);\n *\n * turf.booleanPointInPolygon(pt, poly);\n * //= true\n */\nfunction booleanPointInPolygon<\n G extends Polygon | MultiPolygon,\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n point: Coord,\n polygon: Feature | G,\n options: {\n ignoreBoundary?: boolean;\n } = {}\n) {\n // validation\n if (!point) {\n throw new Error(\"point is required\");\n }\n if (!polygon) {\n throw new Error(\"polygon is required\");\n }\n\n const pt = getCoord(point);\n const geom = getGeom(polygon);\n const type = geom.type;\n const bbox = polygon.bbox;\n let polys: any[] = geom.coordinates;\n\n // Quick elimination if point is not inside bbox\n if (bbox && inBBox(pt, bbox) === false) {\n return false;\n }\n\n if (type === \"Polygon\") {\n polys = [polys];\n }\n let result = false;\n for (var i = 0; i < polys.length; ++i) {\n const polyResult = pip(pt, polys[i]);\n if (polyResult === 0) return options.ignoreBoundary ? false : true;\n else if (polyResult) result = true;\n }\n\n return result;\n}\n\n/**\n * inBBox\n *\n * @private\n * @param {Position} pt point [x,y]\n * @param {BBox} bbox BBox [west, south, east, north]\n * @returns {boolean} true/false if point is inside BBox\n */\nfunction inBBox(pt: number[], bbox: BBox) {\n return (\n bbox[0] <= pt[0] && bbox[1] <= pt[1] && bbox[2] >= pt[0] && bbox[3] >= pt[1]\n );\n}\n\nexport { booleanPointInPolygon };\nexport default booleanPointInPolygon;\n", "/**\n * Turf is a modular geospatial analysis engine written in JavaScript. It performs geospatial\n * processing tasks with GeoJSON data and can be run on a server or in a browser.\n *\n * @module turf\n * @summary Geospatial analysis for JavaScript\n */\nexport { along } from \"@turf/along\";\nexport { angle } from \"@turf/angle\";\nexport { area } from \"@turf/area\";\nexport { bbox } from \"@turf/bbox\";\nexport { bboxClip } from \"@turf/bbox-clip\";\nexport { bboxPolygon } from \"@turf/bbox-polygon\";\nexport { bearing } from \"@turf/bearing\";\nexport { bezierSpline } from \"@turf/bezier-spline\";\nexport { booleanClockwise } from \"@turf/boolean-clockwise\";\nexport { booleanConcave } from \"@turf/boolean-concave\";\nexport { booleanContains } from \"@turf/boolean-contains\";\nexport { booleanCrosses } from \"@turf/boolean-crosses\";\nexport { booleanDisjoint } from \"@turf/boolean-disjoint\";\nexport { booleanEqual } from \"@turf/boolean-equal\";\nexport { booleanIntersects } from \"@turf/boolean-intersects\";\nexport { booleanOverlap } from \"@turf/boolean-overlap\";\nexport { booleanParallel } from \"@turf/boolean-parallel\";\nexport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nexport { booleanPointOnLine } from \"@turf/boolean-point-on-line\";\nexport { booleanTouches } from \"@turf/boolean-touches\";\nexport { booleanValid } from \"@turf/boolean-valid\";\nexport { booleanWithin } from \"@turf/boolean-within\";\nexport { buffer } from \"@turf/buffer\"; // JSTS Module\nexport { center } from \"@turf/center\";\nexport { centerMean } from \"@turf/center-mean\";\nexport { centerMedian } from \"@turf/center-median\";\nexport { centerOfMass } from \"@turf/center-of-mass\";\nexport { centroid } from \"@turf/centroid\";\nexport { circle } from \"@turf/circle\";\nexport { cleanCoords } from \"@turf/clean-coords\";\nexport * from \"@turf/clone\";\nexport * from \"@turf/clusters\";\nexport * as clusters from \"@turf/clusters\";\nexport { clustersDbscan } from \"@turf/clusters-dbscan\";\nexport { clustersKmeans } from \"@turf/clusters-kmeans\";\nexport { collect } from \"@turf/collect\";\nexport { combine } from \"@turf/combine\";\nexport { concave } from \"@turf/concave\";\nexport { convex } from \"@turf/convex\";\nexport { destination } from \"@turf/destination\";\nexport { difference } from \"@turf/difference\"; // JSTS Module\nexport { dissolve } from \"@turf/dissolve\"; // JSTS Sub-Model\nexport { distance } from \"@turf/distance\";\nexport { distanceWeight } from \"@turf/distance-weight\";\nexport { ellipse } from \"@turf/ellipse\";\nexport { envelope } from \"@turf/envelope\";\nexport { explode } from \"@turf/explode\";\nexport { flatten } from \"@turf/flatten\";\nexport { flip } from \"@turf/flip\";\nexport { geojsonRbush } from \"@turf/geojson-rbush\";\nexport { greatCircle } from \"@turf/great-circle\";\nexport * from \"@turf/helpers\";\nexport * as helpers from \"@turf/helpers\";\nexport { hexGrid } from \"@turf/hex-grid\"; // JSTS Sub-Model\nexport { interpolate } from \"@turf/interpolate\"; // JSTS Sub-Model\nexport { intersect } from \"@turf/intersect\"; // JSTS Module\nexport * from \"@turf/invariant\";\nexport * as invariant from \"@turf/invariant\";\nexport { isobands } from \"@turf/isobands\";\nexport { isolines } from \"@turf/isolines\";\nexport { kinks } from \"@turf/kinks\";\nexport { length } from \"@turf/length\";\nexport { lineArc } from \"@turf/line-arc\";\nexport { lineChunk } from \"@turf/line-chunk\";\nexport { lineIntersect } from \"@turf/line-intersect\";\nexport { lineOffset } from \"@turf/line-offset\";\nexport { lineOverlap } from \"@turf/line-overlap\";\nexport { lineSegment } from \"@turf/line-segment\";\nexport { lineSlice } from \"@turf/line-slice\";\nexport { lineSliceAlong } from \"@turf/line-slice-along\";\nexport { lineSplit } from \"@turf/line-split\";\nexport { lineToPolygon } from \"@turf/line-to-polygon\";\nexport { mask } from \"@turf/mask\"; // JSTS Sub-Model\nexport * from \"@turf/meta\";\nexport * as meta from \"@turf/meta\";\nexport { midpoint } from \"@turf/midpoint\";\nexport { moranIndex } from \"@turf/moran-index\";\nexport * from \"@turf/nearest-neighbor-analysis\";\nexport { nearestPoint } from \"@turf/nearest-point\";\nexport { nearestPointOnLine } from \"@turf/nearest-point-on-line\";\nexport { nearestPointToLine } from \"@turf/nearest-point-to-line\";\nexport { planepoint } from \"@turf/planepoint\";\nexport { pointGrid } from \"@turf/point-grid\";\nexport { pointOnFeature } from \"@turf/point-on-feature\";\nexport { pointsWithinPolygon } from \"@turf/points-within-polygon\";\nexport { pointToLineDistance } from \"@turf/point-to-line-distance\";\nexport { pointToPolygonDistance } from \"@turf/point-to-polygon-distance\";\nexport { polygonize } from \"@turf/polygonize\";\nexport { polygonSmooth } from \"@turf/polygon-smooth\";\nexport { polygonTangents } from \"@turf/polygon-tangents\";\nexport { polygonToLine } from \"@turf/polygon-to-line\";\nexport * from \"@turf/projection\";\nexport * as projection from \"@turf/projection\";\nexport * from \"@turf/quadrat-analysis\";\nexport * from \"@turf/random\";\nexport * as random from \"@turf/random\";\nexport { rectangleGrid } from \"@turf/rectangle-grid\"; // JSTS Sub-Model\nexport { rewind } from \"@turf/rewind\";\nexport { rhumbBearing } from \"@turf/rhumb-bearing\";\nexport { rhumbDestination } from \"@turf/rhumb-destination\";\nexport { rhumbDistance } from \"@turf/rhumb-distance\";\nexport { sample } from \"@turf/sample\";\nexport { sector } from \"@turf/sector\";\nexport { shortestPath } from \"@turf/shortest-path\";\nexport { simplify } from \"@turf/simplify\";\nexport { square } from \"@turf/square\";\nexport { squareGrid } from \"@turf/square-grid\"; // JSTS Sub-Model\nexport { standardDeviationalEllipse } from \"@turf/standard-deviational-ellipse\";\nexport { tag } from \"@turf/tag\";\nexport { tesselate } from \"@turf/tesselate\";\nexport { tin } from \"@turf/tin\";\nexport { transformRotate } from \"@turf/transform-rotate\";\nexport { transformScale } from \"@turf/transform-scale\";\nexport { transformTranslate } from \"@turf/transform-translate\";\nexport { triangleGrid } from \"@turf/triangle-grid\"; // JSTS Sub-Model\nexport { truncate } from \"@turf/truncate\";\nexport { union } from \"@turf/union\"; // JSTS Module\nexport { unkinkPolygon } from \"@turf/unkink-polygon\";\nexport { voronoi } from \"@turf/voronoi\";\n", "export const mbnrGeoJson = {\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"properties\": {},\n \"geometry\": {\n \"coordinates\": [\n [\n [\n 78.0540565157155,\n 16.750355644371382\n ],\n [\n 78.02147549424018,\n 16.72066473405593\n ],\n [\n 78.03026125246384,\n 16.71696749930787\n ],\n [\n 78.0438058450269,\n 16.72191442229257\n ],\n [\n 78.01378723066603,\n 16.729427120762438\n ],\n [\n 78.01192390645633,\n 16.767270033080678\n ],\n [\n 77.98897480599248,\n 16.78383139678816\n ],\n [\n 77.98650506846502,\n 16.779477610410623\n ],\n [\n 77.99211289459566,\n 16.764294442899583\n ],\n [\n 77.9917733766166,\n 16.760247911187193\n ],\n [\n 77.9871626670851,\n 16.762487176781022\n ],\n [\n 77.98216269568468,\n 16.762520539253813\n ],\n [\n 77.9728079653313,\n 16.75895746646411\n ],\n [\n 77.97076993211158,\n 16.749241850772236\n ],\n [\n 77.97290869571145,\n 16.714289841456335\n ],\n [\n 77.98673742913684,\n 16.716189282573396\n ],\n [\n 78.00286970994557,\n 16.718191131206893\n ],\n [\n 78.02757966423519,\n 16.720603921728966\n ],\n [\n 78.01653780770818,\n 16.73184590223127\n ],\n [\n 78.0064695230268,\n 16.760236966033375\n ],\n [\n 78.0148831108591,\n 16.760801801995825\n ],\n [\n 78.01488756695255,\n 16.75827980335133\n ],\n [\n 78.0244311364159,\n 16.744778942163208\n ],\n [\n 78.03342267256608,\n 16.760773251410058\n ],\n [\n 78.05078586709863,\n 16.763902127913653\n ],\n [\n 78.0540565157155,\n 16.750355644371382\n ]\n ]\n ],\n \"type\": \"Polygon\"\n }\n }\n ]\n};", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { commonRouter } from '@/src/trpc/apis/common-apis/common'\nimport {\n getStoresSummary,\n healthCheck,\n} from '@/src/dbService'\nimport type { StoresSummaryResponse } from '@packages/shared'\nimport * as turf from '@turf/turf';\nimport { z } from 'zod';\nimport { mbnrGeoJson } from '@/src/lib/mbnr-geojson'\nimport { generateUploadUrl } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getAllConstValues } from '@/src/lib/const-store'\nimport { CONST_KEYS } from '@/src/lib/const-keys'\nimport { assetsDomain, apiCacheKey } from '@/src/lib/env-exporter'\n\nconst polygon = turf.polygon(mbnrGeoJson.features[0].geometry.coordinates);\n\nexport async function scaffoldEssentialConsts() {\n const consts = await getAllConstValues();\n\n return {\n freeDeliveryThreshold: consts[CONST_KEYS.freeDeliveryThreshold] ?? 200,\n deliveryCharge: consts[CONST_KEYS.deliveryCharge] ?? 0,\n flashFreeDeliveryThreshold: consts[CONST_KEYS.flashFreeDeliveryThreshold] ?? 500,\n flashDeliveryCharge: consts[CONST_KEYS.flashDeliveryCharge] ?? 69,\n popularItems: consts[CONST_KEYS.popularItems] ?? '5,3,2,4,1',\n versionNum: consts[CONST_KEYS.versionNum] ?? '1.1.0',\n playStoreUrl: consts[CONST_KEYS.playStoreUrl] ?? 'https://play.google.com/store/apps/details?id=in.freshyo.app',\n appStoreUrl: consts[CONST_KEYS.appStoreUrl] ?? 'https://apps.apple.com/in/app/freshyo/id6756889077',\n webViewHtml: null,\n isWebviewClosable: true,\n isFlashDeliveryEnabled: consts[CONST_KEYS.isFlashDeliveryEnabled] ?? true,\n supportMobile: consts[CONST_KEYS.supportMobile] ?? '',\n supportEmail: consts[CONST_KEYS.supportEmail] ?? '',\n assetsDomain,\n apiCacheKey,\n };\n}\n\nexport const commonApiRouter = router({\n product: commonRouter,\n\n getStoresSummary: publicProcedure\n .query(async (): Promise => {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { storeInfo } from '@/src/db/schema'\n\n const stores = await db.query.storeInfo.findMany({\n columns: {\n id: true,\n name: true,\n description: true,\n },\n });\n */\n\n const stores = await getStoresSummary();\n\n return {\n stores,\n };\n }),\n\n checkLocationInPolygon: publicProcedure\n .input(z.object({\n lat: z.number().min(-90).max(90),\n lng: z.number().min(-180).max(180),\n }))\n .query(({ input }) => {\n try {\n const { lat, lng } = input;\n const point = turf.point([lng, lat]); // GeoJSON: [longitude, latitude]\n const isInside = turf.booleanPointInPolygon(point, polygon);\n return { isInside };\n } catch (error) {\n throw new Error('Invalid coordinates or polygon data');\n }\n }),\n\n generateUploadUrls: protectedProcedure\n .input(z.object({\n contextString: z.enum(['review', 'review_response', 'product_info', 'notification', 'store', 'complaint', 'profile', 'tags']),\n mimeTypes: z.array(z.string()),\n }))\n .mutation(async ({ input }): Promise<{ uploadUrls: string[] }> => {\n const { contextString, mimeTypes } = input;\n\n const uploadUrls: string[] = [];\n const keys: string[] = [];\n\n for (const mimeType of mimeTypes) {\n // Generate key based on context and mime type\n let folder: string;\n if (contextString === 'review') {\n folder = 'review-images';\n } else if (contextString === 'product_info') {\n folder = 'product-images';\n } else if (contextString === 'store') {\n folder = 'store-images';\n } else if (contextString === 'review_response') {\n folder = 'review-response-images';\n } else if (contextString === 'complaint') {\n folder = 'complaint-images';\n } else if (contextString === 'profile') {\n folder = 'profile-images';\n } else if (contextString === 'tags') {\n folder = 'tags';\n } else {\n folder = '';\n }\n\n const extension = mimeType === 'image/jpeg' ? '.jpg' :\n mimeType === 'image/png' ? '.png' :\n mimeType === 'image/gif' ? '.gif' : '.jpg';\n const key = `${folder}/${Date.now()}${extension}`;\n\n try {\n const uploadUrl = await generateUploadUrl(key, mimeType);\n uploadUrls.push(uploadUrl);\n keys.push(key);\n\n } catch (error) {\n console.error('Error generating upload URL:', error);\n throw new ApiError('Failed to generate upload URL', 500);\n }\n }\n return { uploadUrls };\n }),\n\n healthCheck: publicProcedure\n .query(async () => {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { keyValStore, productInfo } from '@/src/db/schema'\n\n // Test DB connection by selecting product names\n // await db.select({ name: productInfo.name }).from(productInfo).limit(1);\n await db.select({ key: keyValStore.key }).from(keyValStore).limit(1);\n */\n\n const result = await healthCheck();\n return result;\n }),\n\n essentialConsts: publicProcedure\n .query(async () => {\n const response = await scaffoldEssentialConsts();\n return response;\n }),\n});\n\nexport type CommonApiRouter = typeof commonApiRouter;\n", "import { router, publicProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getTagsByStoreId } from '@/src/stores/product-tag-store'\nimport {\n getUserStoreSummaries as getUserStoreSummariesInDb,\n getUserStoreDetail as getUserStoreDetailInDb,\n} from '@/src/dbService'\nimport type {\n UserStoresResponse,\n UserStoreDetail,\n UserStoreSummary,\n} from '@packages/shared'\n\nexport async function scaffoldStores(): Promise {\n const storesData = await getUserStoreSummariesInDb()\n\n /*\n // Old implementation - direct DB queries:\n const storesData = await db\n .select({\n id: storeInfo.id,\n name: storeInfo.name,\n description: storeInfo.description,\n imageUrl: storeInfo.imageUrl,\n productCount: sql`count(${productInfo.id})`.as('productCount'),\n })\n .from(storeInfo)\n .leftJoin(\n productInfo,\n and(eq(productInfo.storeId, storeInfo.id), eq(productInfo.isSuspended, false))\n )\n .groupBy(storeInfo.id);\n */\n\n const storesWithDetails: UserStoreSummary[] = storesData.map((store) => {\n const signedImageUrl = store.imageUrl ? scaffoldAssetUrl(store.imageUrl) : null\n const sampleProducts = store.sampleProducts.map((product) => ({\n id: product.id,\n name: product.name,\n signedImageUrl: product.images && product.images.length > 0\n ? scaffoldAssetUrl(product.images[0])\n : null,\n }))\n\n return {\n id: store.id,\n name: store.name,\n description: store.description,\n signedImageUrl,\n productCount: store.productCount,\n sampleProducts,\n }\n })\n\n return {\n stores: storesWithDetails,\n }\n}\n\nexport async function scaffoldStoreWithProducts(storeId: number): Promise {\n const storeDetail = await getUserStoreDetailInDb(storeId)\n\n /*\n // Old implementation - direct DB queries:\n const storeData = await db.query.storeInfo.findFirst({\n where: eq(storeInfo.id, storeId),\n columns: {\n id: true,\n name: true,\n description: true,\n imageUrl: true,\n },\n });\n\n if (!storeData) {\n throw new ApiError('Store not found', 404);\n }\n\n const signedImageUrl = storeData.imageUrl ? scaffoldAssetUrl(storeData.imageUrl) : null;\n\n const productsData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n incrementStep: productInfo.incrementStep,\n unitShortNotation: units.shortNotation,\n unitNotation: units.shortNotation,\n productQuantity: productInfo.productQuantity,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(and(eq(productInfo.storeId, storeId), eq(productInfo.isSuspended, false)));\n\n const productsWithSignedUrls = await Promise.all(\n productsData.map(async (product) => ({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n marketPrice: product.marketPrice,\n incrementStep: product.incrementStep,\n unit: product.unitShortNotation,\n unitNotation: product.unitNotation,\n images: scaffoldAssetUrl((product.images as string[]) || []),\n isOutOfStock: product.isOutOfStock,\n productQuantity: product.productQuantity\n }))\n );\n\n const tags = await getTagsByStoreId(storeId);\n\n return {\n store: {\n id: storeData.id,\n name: storeData.name,\n description: storeData.description,\n signedImageUrl,\n },\n products: productsWithSignedUrls,\n tags: tags.map(tag => ({\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription,\n imageUrl: tag.imageUrl,\n productIds: tag.productIds,\n })),\n };\n */\n\n if (!storeDetail) {\n throw new ApiError('Store not found', 404)\n }\n\n const signedImageUrl = storeDetail.store.imageUrl\n ? scaffoldAssetUrl(storeDetail.store.imageUrl)\n : null\n\n const productsWithSignedUrls = storeDetail.products.map((product) => ({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n marketPrice: product.marketPrice,\n incrementStep: product.incrementStep,\n unit: product.unit,\n unitNotation: product.unitNotation,\n images: scaffoldAssetUrl(product.images || []),\n isOutOfStock: product.isOutOfStock,\n productQuantity: product.productQuantity,\n }))\n\n const tags = await getTagsByStoreId(storeId)\n\n return {\n store: {\n id: storeDetail.store.id,\n name: storeDetail.store.name,\n description: storeDetail.store.description,\n signedImageUrl,\n },\n products: productsWithSignedUrls,\n tags: tags.map(tag => ({\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription,\n imageUrl: tag.imageUrl,\n productIds: tag.productIds,\n })),\n }\n}\n\nexport const storesRouter = router({\n getStores: publicProcedure\n .query(async (): Promise => {\n const response = await scaffoldStores();\n return response;\n }),\n\n getStoreWithProducts: publicProcedure\n .input(z.object({\n storeId: z.number(),\n }))\n .query(async ({ input }): Promise => {\n const { storeId } = input;\n const response = await scaffoldStoreWithProducts(storeId);\n return response;\n }),\n});\n", "import { router, publicProcedure } from \"@/src/trpc/trpc-index\"\nimport { z } from \"zod\"\nimport { getAllSlots as getAllSlotsFromCache, getSlotById as getSlotByIdFromCache } from \"@/src/stores/slot-store\"\nimport dayjs from 'dayjs'\nimport { getUserActiveSlotsList as getUserActiveSlotsListInDb, getUserProductAvailability as getUserProductAvailabilityInDb } from '@/src/dbService'\nimport type { UserSlotData, UserSlotsListResponse, UserSlotsWithProductsResponse } from '@packages/shared'\n\n// Helper method to get formatted slot data by ID\nasync function getSlotData(slotId: number) {\n const slot = await getSlotByIdFromCache(slotId);\n\n if (!slot) {\n return null;\n }\n\n const currentTime = new Date();\n if (dayjs(slot.freezeTime).isBefore(currentTime)) {\n return null;\n }\n\n return {\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n slotId: slot.id,\n products: slot.products.filter((product) => !product.isOutOfStock),\n };\n}\n\nexport async function scaffoldSlotsWithProducts(): Promise {\n const allSlots = await getAllSlotsFromCache();\n const currentTime = new Date();\n const validSlots = allSlots\n .filter((slot) => {\n return dayjs(slot.freezeTime).isAfter(currentTime) &&\n dayjs(slot.deliveryTime).isAfter(currentTime) &&\n !slot.isCapacityFull;\n })\n .sort((a, b) => dayjs(a.deliveryTime).valueOf() - dayjs(b.deliveryTime).valueOf());\n\n const productAvailability = await getUserProductAvailabilityInDb()\n\n /*\n // Old implementation - direct DB query:\n const allProducts = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n isOutOfStock: productInfo.isOutOfStock,\n isFlashAvailable: productInfo.isFlashAvailable,\n })\n .from(productInfo)\n .where(eq(productInfo.isSuspended, false));\n\n const productAvailability = allProducts.map(product => ({\n id: product.id,\n name: product.name,\n isOutOfStock: product.isOutOfStock,\n isFlashAvailable: product.isFlashAvailable,\n }));\n */\n\n return {\n slots: validSlots,\n productAvailability,\n count: validSlots.length,\n };\n}\n\nexport const slotsRouter = router({\n getSlots: publicProcedure.query(async (): Promise => {\n const slots = await getUserActiveSlotsListInDb()\n\n /*\n // Old implementation - direct DB query:\n const slots = await db.query.deliverySlotInfo.findMany({\n where: eq(deliverySlotInfo.isActive, true),\n });\n */\n\n return {\n slots,\n count: slots.length,\n }\n }),\n\n getSlotsWithProducts: publicProcedure.query(async (): Promise => {\n const response = await scaffoldSlotsWithProducts();\n return response;\n }),\n\n getSlotById: publicProcedure\n .input(z.object({ slotId: z.number() }))\n .query(async ({ input }): Promise => {\n return await getSlotData(input.slotId);\n }),\n});\n", "import { publicProcedure, router } from '@/src/trpc/trpc-index'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport { getUserActiveBanners as getUserActiveBannersInDb } from '@/src/dbService'\nimport type { UserBannersResponse } from '@packages/shared'\n\nexport async function scaffoldBanners(): Promise {\n const banners = await getUserActiveBannersInDb()\n\n /*\n // Old implementation - direct DB queries:\n const banners = await db.query.homeBanners.findMany({\n where: isNotNull(homeBanners.serialNum), // Only show assigned banners\n orderBy: asc(homeBanners.serialNum), // Order by slot number 1-4\n });\n */\n\n const bannersWithSignedUrls = banners.map((banner) => ({\n ...banner,\n imageUrl: banner.imageUrl ? scaffoldAssetUrl(banner.imageUrl) : banner.imageUrl,\n }))\n\n return {\n banners: bannersWithSignedUrls,\n }\n}\n\nexport const bannerRouter = router({\n getBanners: publicProcedure\n .query(async () => {\n const response = await scaffoldBanners();\n return response;\n }),\n});\n", "// Central types export file\n// Re-export all types from the types folder\n\nexport type * from './admin';\nexport type * from './user';\nexport type * from './store.types';\n", "export const CACHE_FILENAMES = {\n products: 'products.json',\n stores: 'stores.json',\n slots: 'slots.json',\n essentialConsts: 'essential-consts.json',\n banners: 'banners.json',\n} as const\n\nexport type CacheFilename = typeof CACHE_FILENAMES[keyof typeof CACHE_FILENAMES]\n\n// Re-export all types from the types folder\nexport * from './types'\n", "export async function retryWithExponentialBackoff(\n fn: () => Promise,\n maxRetries: number = 3,\n delayMs: number = 1000\n): Promise {\n let lastError: Error | undefined\n \n for (let attempt = 1; attempt <= maxRetries; attempt++) {\n try {\n return await fn()\n } catch (error) {\n lastError = error instanceof Error ? error : new Error(String(error))\n \n if (attempt < maxRetries) {\n console.log(`Attempt ${attempt} failed, retrying in ${delayMs}ms...`)\n await new Promise(resolve => setTimeout(resolve, delayMs))\n delayMs *= 2\n }\n }\n }\n \n throw lastError\n}", "import axios from 'axios'\nimport { scaffoldProducts } from '@/src/trpc/apis/common-apis/common'\nimport { scaffoldEssentialConsts } from '@/src/trpc/apis/common-apis/common-trpc-index'\nimport { scaffoldStores } from '@/src/trpc/apis/user-apis/apis/stores'\nimport { scaffoldSlotsWithProducts } from '@/src/trpc/apis/user-apis/apis/slots'\nimport { scaffoldBanners } from '@/src/trpc/apis/user-apis/apis/banners'\nimport { scaffoldStoreWithProducts } from '@/src/trpc/apis/user-apis/apis/stores'\nimport { getStoresSummary } from '@/src/dbService'\nimport { imageUploadS3 } from '@/src/lib/s3-client'\nimport { apiCacheKey, cloudflareApiToken, cloudflareZoneId, assetsDomain } from '@/src/lib/env-exporter'\nimport { CACHE_FILENAMES } from '@packages/shared'\nimport { retryWithExponentialBackoff } from '@/src/lib/retry'\n\nfunction constructCacheUrl(path: string): string {\n return `${assetsDomain}${apiCacheKey}/${path}`\n}\n\nexport async function createProductsFile(): Promise {\n // Get products data from the API method\n const productsData = await scaffoldProducts()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(productsData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.products}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.products)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createEssentialConstsFile(): Promise {\n // Get essential consts data from the API method\n const essentialConstsData = await scaffoldEssentialConsts()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(essentialConstsData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.essentialConsts}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.essentialConsts)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createStoresFile(): Promise {\n // Get stores data from the API method\n const storesData = await scaffoldStores()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(storesData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.stores}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.stores)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createSlotsFile(): Promise {\n // Get slots data from the API method\n const slotsData = await scaffoldSlotsWithProducts()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(slotsData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.slots}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.slots)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createBannersFile(): Promise {\n // Get banners data from the API method\n const bannersData = await scaffoldBanners()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(bannersData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.banners}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.banners)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createStoreFile(storeId: number): Promise {\n // Get store data from the API method\n const storeData = await scaffoldStoreWithProducts(storeId)\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(storeData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/stores/${storeId}.json`)\n\n // Purge cache with retry\n const url = constructCacheUrl(`stores/${storeId}.json`)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createAllStoresFiles(): Promise {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { storeInfo } from '@/src/db/schema'\n\n const stores = await db.select({ id: storeInfo.id }).from(storeInfo)\n */\n\n // Fetch all store IDs from database using helper\n const stores = await getStoresSummary()\n\n // Create cache files for all stores and collect URLs\n const results: string[] = []\n const urls: string[] = []\n\n for (const store of stores) {\n const s3Key = await createStoreFile(store.id)\n results.push(s3Key)\n urls.push(constructCacheUrl(`stores/${store.id}.json`))\n }\n\n console.log(`Created ${results.length} store cache files`)\n\n // Purge all store caches in one batch with retry\n try {\n await retryWithExponentialBackoff(() => clearUrlCache(urls))\n console.log(`Cache purged for ${urls.length} store files`)\n } catch (error) {\n console.error(`Failed to purge cache for store files after 3 retries. URLs: ${urls.join(', ')}`, error)\n }\n\n return results\n}\n\nexport interface CreateAllCacheFilesResult {\n products: string\n essentialConsts: string\n stores: string\n slots: string\n banners: string\n individualStores: string[]\n}\n\nexport async function createAllCacheFiles(): Promise {\n console.log('Starting creation of all cache files...')\n\n // Create all global cache files in parallel\n const [\n productsKey,\n essentialConstsKey,\n storesKey,\n slotsKey,\n bannersKey,\n individualStoreKeys,\n ] = await Promise.all([\n createProductsFileInternal(),\n createEssentialConstsFileInternal(),\n createStoresFileInternal(),\n createSlotsFileInternal(),\n createBannersFileInternal(),\n createAllStoresFilesInternal(),\n ])\n\n // Collect all URLs for batch cache purge\n const urls = [\n constructCacheUrl(CACHE_FILENAMES.products),\n constructCacheUrl(CACHE_FILENAMES.essentialConsts),\n constructCacheUrl(CACHE_FILENAMES.stores),\n constructCacheUrl(CACHE_FILENAMES.slots),\n constructCacheUrl(CACHE_FILENAMES.banners),\n ...individualStoreKeys.map((_, index) => constructCacheUrl(`stores/${index + 1}.json`)),\n ]\n\n // Purge all caches in one batch with retry\n try {\n await retryWithExponentialBackoff(() => clearUrlCache(urls))\n console.log(`Cache purged for all ${urls.length} files`)\n } catch (error) {\n console.error(`Failed to purge cache for all files after 3 retries`, error)\n }\n\n console.log('All cache files created successfully')\n\n return {\n products: productsKey,\n essentialConsts: essentialConstsKey,\n stores: storesKey,\n slots: slotsKey,\n banners: bannersKey,\n individualStores: individualStoreKeys,\n }\n}\n\n// Internal versions that skip cache purging (for batch operations)\nasync function createProductsFileInternal(): Promise {\n const productsData = await scaffoldProducts()\n const jsonContent = JSON.stringify(productsData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.products}`)\n}\n\nasync function createEssentialConstsFileInternal(): Promise {\n const essentialConstsData = await scaffoldEssentialConsts()\n const jsonContent = JSON.stringify(essentialConstsData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.essentialConsts}`)\n}\n\nasync function createStoresFileInternal(): Promise {\n const storesData = await scaffoldStores()\n const jsonContent = JSON.stringify(storesData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.stores}`)\n}\n\nasync function createSlotsFileInternal(): Promise {\n const slotsData = await scaffoldSlotsWithProducts()\n const jsonContent = JSON.stringify(slotsData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.slots}`)\n}\n\nasync function createBannersFileInternal(): Promise {\n const bannersData = await scaffoldBanners()\n const jsonContent = JSON.stringify(bannersData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.banners}`)\n}\n\nasync function createAllStoresFilesInternal(): Promise {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { storeInfo } from '@/src/db/schema'\n\n const stores = await db.select({ id: storeInfo.id }).from(storeInfo)\n */\n\n const stores = await getStoresSummary()\n const results: string[] = []\n\n for (const store of stores) {\n const storeData = await scaffoldStoreWithProducts(store.id)\n const jsonContent = JSON.stringify(storeData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/stores/${store.id}.json`)\n results.push(s3Key)\n }\n\n console.log(`Created ${results.length} store cache files`)\n return results\n}\n\nexport async function clearUrlCache(urls: string[]): Promise<{ success: boolean; errors?: string[] }> {\n if (!cloudflareApiToken || !cloudflareZoneId) {\n console.warn('Cloudflare credentials not configured, skipping cache clear')\n return { success: false, errors: ['Cloudflare credentials not configured'] }\n }\n\n try {\n const response = await axios.post(\n `https://api.cloudflare.com/client/v4/zones/${cloudflareZoneId}/purge_cache`,\n { files: urls },\n {\n headers: {\n 'Authorization': `Bearer ${cloudflareApiToken}`,\n 'Content-Type': 'application/json',\n },\n }\n )\n\n const result = response.data as { success: boolean; errors?: { message: string }[] }\n\n if (!result.success) {\n const errorMessages = result.errors?.map(e => e.message) || ['Unknown error']\n console.error(`Cloudflare cache purge failed for URLs: ${urls.join(', ')}`, errorMessages)\n return { success: false, errors: errorMessages }\n }\n\n console.log(`Successfully purged ${urls.length} URLs from Cloudflare cache: ${urls.join(', ')}`)\n return { success: true }\n } catch (error) {\n console.log(error)\n const errorMessage = error instanceof Error ? error.message : 'Unknown error'\n console.error(`Error clearing Cloudflare cache for URLs: ${urls.join(', ')}`, errorMessage)\n return { success: false, errors: [errorMessage] }\n }\n}\n\nexport async function clearAllCache(): Promise<{ success: boolean; errors?: string[] }> {\n if (!cloudflareApiToken || !cloudflareZoneId) {\n console.warn('Cloudflare credentials not configured, skipping cache clear')\n return { success: false, errors: ['Cloudflare credentials not configured'] }\n }\n\n try {\n const response = await axios.post(\n `https://api.cloudflare.com/client/v4/zones/${cloudflareZoneId}/purge_cache`,\n { purge_everything: true },\n {\n headers: {\n 'Authorization': `Bearer ${cloudflareApiToken}`,\n 'Content-Type': 'application/json',\n },\n }\n )\n\n const result = response.data as { success: boolean; errors?: { message: string }[] }\n\n if (!result.success) {\n const errorMessages = result.errors?.map(e => e.message) || ['Unknown error']\n console.error('Cloudflare cache purge failed:', errorMessages)\n return { success: false, errors: errorMessages }\n }\n\n console.log('Successfully purged all cache from Cloudflare')\n return { success: true }\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error'\n console.error('Error clearing Cloudflare cache:', errorMessage)\n return { success: false, errors: [errorMessage] }\n }\n}\n", "import roleManager from '@/src/lib/roles-manager'\nimport { computeConstants } from '@/src/lib/const-store'\nimport { initializeProducts } from '@/src/stores/product-store'\nimport { initializeProductTagStore } from '@/src/stores/product-tag-store'\nimport { initializeSlotStore } from '@/src/stores/slot-store'\nimport { initializeBannerStore } from '@/src/stores/banner-store'\nimport { createAllCacheFiles } from '@/src/lib/cloud_cache'\n\nconst STORE_INIT_DELAY_MS = 3 * 60 * 1000\nlet storeInitializationTimeout: NodeJS.Timeout | null = null\n\n/**\n * Initialize all application stores\n * This function handles initialization of:\n * - Role Manager (fetches and caches all roles)\n * - Const Store (syncs constants from DB to Redis)\n * - Product Store (caches all products in Redis)\n * - Product Tag Store (caches all product tags in Redis)\n * - Slot Store (caches all delivery slots with products in Redis)\n * - Banner Store (caches all banners in Redis)\n */\nexport const initializeAllStores = async (): Promise => {\n try {\n console.log('Starting application stores initialization...');\n\n await Promise.all([\n roleManager.fetchRoles(),\n computeConstants(),\n initializeProducts(),\n initializeProductTagStore(),\n initializeSlotStore(),\n initializeBannerStore(),\n ]);\n\n console.log('All application stores initialized successfully');\n\n // Regenerate all cache files (fire-and-forget)\n createAllCacheFiles().catch(error => {\n console.error('Failed to regenerate cache files during store initialization:', error)\n })\n } catch (error) {\n console.error('Application stores initialization failed:', error);\n throw error;\n }\n};\n\nexport const scheduleStoreInitialization = (): void => {\n if (storeInitializationTimeout) {\n clearTimeout(storeInitializationTimeout)\n storeInitializationTimeout = null\n }\n\n storeInitializationTimeout = setTimeout(() => {\n storeInitializationTimeout = null\n initializeAllStores().catch(error => {\n console.error('Scheduled store initialization failed:', error)\n })\n }, STORE_INIT_DELAY_MS)\n}\n", "import { router, protectedProcedure } from \"@/src/trpc/trpc-index\"\nimport { TRPCError } from \"@trpc/server\";\nimport { z } from \"zod\";\nimport { ApiError } from \"@/src/lib/api-error\"\nimport { appUrl } from \"@/src/lib/env-exporter\"\n// import redisClient from \"@/src/lib/redis-client\"\n// import { getSlotSequenceKey } from \"@/src/lib/redisKeyGetters\"\nimport { scheduleStoreInitialization } from '@/src/stores/store-initializer'\nimport {\n getActiveSlotsWithProducts as getActiveSlotsWithProductsInDb,\n getActiveSlots as getActiveSlotsInDb,\n getSlotsAfterDate as getSlotsAfterDateInDb,\n getSlotByIdWithRelations as getSlotByIdWithRelationsInDb,\n createSlotWithRelations as createSlotWithRelationsInDb,\n updateSlotWithRelations as updateSlotWithRelationsInDb,\n deleteSlotById as deleteSlotByIdInDb,\n updateSlotCapacity as updateSlotCapacityInDb,\n getSlotDeliverySequence as getSlotDeliverySequenceInDb,\n updateSlotDeliverySequence as updateSlotDeliverySequenceInDb,\n updateSlotProducts as updateSlotProductsInDb,\n getSlotsProductIds as getSlotsProductIdsInDb,\n} from '@/src/dbService'\nimport type {\n AdminDeliverySequenceResult,\n AdminSlotResult,\n AdminSlotsResult,\n AdminSlotsListResult,\n AdminSlotCreateResult,\n AdminSlotUpdateResult,\n AdminSlotDeleteResult,\n AdminUpdateDeliverySequenceResult,\n AdminUpdateSlotCapacityResult,\n AdminSlotsProductIdsResult,\n AdminUpdateSlotProductsResult,\n} from '@packages/shared'\n\n\ninterface CachedDeliverySequence {\n [userId: string]: number[];\n}\n\nconst cachedSequenceSchema = z.record(z.string(), z.array(z.number()));\n\nconst createSlotSchema = z.object({\n deliveryTime: z.string(),\n freezeTime: z.string(),\n isActive: z.boolean().optional(),\n productIds: z.array(z.number()).optional(),\n vendorSnippets: z.array(z.object({\n name: z.string().min(1),\n productIds: z.array(z.number().int().positive()).min(1),\n validTill: z.string().optional(),\n })).optional(),\n groupIds: z.array(z.number()).optional(),\n});\n\nconst getSlotByIdSchema = z.object({\n id: z.number(),\n});\n\nconst updateSlotSchema = z.object({\n id: z.number(),\n deliveryTime: z.string(),\n freezeTime: z.string(),\n isActive: z.boolean().optional(),\n productIds: z.array(z.number()).optional(),\n vendorSnippets: z.array(z.object({\n name: z.string().min(1),\n productIds: z.array(z.number().int().positive()).min(1),\n validTill: z.string().optional(),\n })).optional(),\n groupIds: z.array(z.number()).optional(),\n});\n\nconst deleteSlotSchema = z.object({\n id: z.number(),\n});\n\nconst getDeliverySequenceSchema = z.object({\n id: z.string(),\n});\n\nconst updateDeliverySequenceSchema = z.object({\n id: z.number(),\n // deliverySequence: z.array(z.number()),\n deliverySequence: z.any(),\n});\n\nexport const slotsRouter = router({\n // Exact replica of GET /av/slots\n getAll: protectedProcedure.query(async ({ ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const slots = await getActiveSlotsWithProductsInDb()\n\n /*\n // Old implementation - direct DB queries:\n const slots = await db.query.deliverySlotInfo\n .findMany({\n where: eq(deliverySlotInfo.isActive, true),\n orderBy: desc(deliverySlotInfo.deliveryTime),\n with: {\n productSlots: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n },\n })\n .then((slots) =>\n slots.map((slot) => ({\n ...slot,\n deliverySequence: slot.deliverySequence as number[],\n products: slot.productSlots.map((ps) => ps.product),\n }))\n );\n */\n\n return {\n slots,\n count: slots.length,\n }\n }),\n\n // Exact replica of POST /av/products/slots/product-ids\n getSlotsProductIds: protectedProcedure\n .input(z.object({ slotIds: z.array(z.number()) }))\n .query(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { slotIds } = input;\n\n if (!Array.isArray(slotIds)) {\n throw new TRPCError({\n code: \"BAD_REQUEST\",\n message: \"slotIds must be an array\",\n });\n }\n\n const result = await getSlotsProductIdsInDb(slotIds)\n\n /*\n // Old implementation - direct DB queries:\n if (slotIds.length === 0) {\n return {};\n }\n\n // Fetch all associations for the requested slots\n const associations = await db.query.productSlots.findMany({\n where: inArray(productSlots.slotId, slotIds),\n columns: {\n slotId: true,\n productId: true,\n },\n });\n\n // Group by slotId\n const result = associations.reduce((acc, assoc) => {\n if (!acc[assoc.slotId]) {\n acc[assoc.slotId] = [];\n }\n acc[assoc.slotId].push(assoc.productId);\n return acc;\n }, {} as Record);\n\n // Ensure all requested slots have entries (even if empty)\n slotIds.forEach((slotId) => {\n if (!result[slotId]) {\n result[slotId] = [];\n }\n });\n\n return result;\n */\n\n return result\n }),\n\n // Exact replica of PUT /av/products/slots/:slotId/products\n updateSlotProducts: protectedProcedure\n .input(\n z.object({\n slotId: z.number(),\n productIds: z.array(z.number()),\n })\n )\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { slotId, productIds } = input;\n\n if (!Array.isArray(productIds)) {\n throw new TRPCError({\n code: \"BAD_REQUEST\",\n message: \"productIds must be an array\",\n });\n }\n\n const result = await updateSlotProductsInDb(String(slotId), productIds.map(String))\n\n /*\n // Old implementation - direct DB queries:\n // Get current associations\n const currentAssociations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, slotId),\n columns: {\n productId: true,\n },\n });\n\n const currentProductIds = currentAssociations.map(\n (assoc) => assoc.productId\n );\n const newProductIds = productIds;\n\n // Find products to add and remove\n const productsToAdd = newProductIds.filter(\n (id) => !currentProductIds.includes(id)\n );\n const productsToRemove = currentProductIds.filter(\n (id) => !newProductIds.includes(id)\n );\n\n // Remove associations for products that are no longer selected\n if (productsToRemove.length > 0) {\n await db\n .delete(productSlots)\n .where(\n and(\n eq(productSlots.slotId, slotId),\n inArray(productSlots.productId, productsToRemove)\n )\n );\n }\n\n // Add associations for newly selected products\n if (productsToAdd.length > 0) {\n const newAssociations = productsToAdd.map((productId) => ({\n productId,\n slotId,\n }));\n\n await db.insert(productSlots).values(newAssociations);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: \"Slot products updated successfully\",\n added: productsToAdd.length,\n removed: productsToRemove.length,\n };\n */\n\n scheduleStoreInitialization()\n\n return {\n message: result.message,\n added: result.added,\n removed: result.removed,\n }\n }),\n\n createSlot: protectedProcedure\n .input(createSlotSchema)\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input;\n\n // Validate required fields\n if (!deliveryTime || !freezeTime) {\n throw new ApiError(\"Delivery time and orders close time are required\", 400);\n }\n\n const result = await createSlotWithRelationsInDb({\n deliveryTime,\n freezeTime,\n isActive,\n productIds,\n vendorSnippets: snippets,\n groupIds,\n })\n\n /*\n // Old implementation - direct DB queries:\n const result = await db.transaction(async (tx) => {\n // Create slot\n const [newSlot] = await tx\n .insert(deliverySlotInfo)\n .values({\n deliveryTime: new Date(deliveryTime),\n freezeTime: new Date(freezeTime),\n isActive: isActive !== undefined ? isActive : true,\n groupIds: groupIds !== undefined ? groupIds : [],\n })\n .returning();\n\n // Insert product associations if provided\n if (productIds && productIds.length > 0) {\n const associations = productIds.map((productId) => ({\n productId,\n slotId: newSlot.id,\n }));\n await tx.insert(productSlots).values(associations);\n }\n\n // Create vendor snippets if provided\n let createdSnippets: any[] = [];\n if (snippets && snippets.length > 0) {\n for (const snippet of snippets) {\n // Validate products exist\n const products = await tx.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n });\n if (products.length !== snippet.productIds.length) {\n throw new ApiError(`One or more invalid product IDs in snippet \"${snippet.name}\"`, 400);\n }\n\n // Check if snippet name already exists\n const existingSnippet = await tx.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippet.name),\n });\n if (existingSnippet) {\n throw new ApiError(`Snippet name \"${snippet.name}\" already exists`, 400);\n }\n\n const [createdSnippet] = await tx.insert(vendorSnippets).values({\n snippetCode: snippet.name,\n slotId: newSlot.id,\n productIds: snippet.productIds,\n validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,\n }).returning();\n\n createdSnippets.push(createdSnippet);\n }\n }\n\n return {\n slot: newSlot,\n createdSnippets,\n message: \"Slot created successfully\",\n };\n });\n */\n\n // Reinitialize stores to reflect changes (outside transaction)\n scheduleStoreInitialization()\n\n return result\n }),\n\n getSlots: protectedProcedure.query(async ({ ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const slots = await getActiveSlotsInDb()\n\n /*\n // Old implementation - direct DB queries:\n const slots = await db.query.deliverySlotInfo.findMany({\n where: eq(deliverySlotInfo.isActive, true),\n });\n */\n\n return {\n slots,\n count: slots.length,\n }\n }),\n\n getSlotById: protectedProcedure\n .input(getSlotByIdSchema)\n .query(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { id } = input;\n\n const slot = await getSlotByIdWithRelationsInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, id),\n with: {\n productSlots: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n vendorSnippets: true,\n },\n });\n */\n\n if (!slot) {\n throw new ApiError('Slot not found', 404)\n }\n\n return {\n slot: {\n ...slot,\n vendorSnippets: slot.vendorSnippets.map(snippet => ({\n ...snippet,\n accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`,\n })),\n },\n }\n }),\n\n updateSlot: protectedProcedure\n .input(updateSlotSchema)\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n try{\n const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input;\n\n if (!deliveryTime || !freezeTime) {\n throw new ApiError(\"Delivery time and orders close time are required\", 400);\n }\n\n const result = await updateSlotWithRelationsInDb({\n id,\n deliveryTime,\n freezeTime,\n isActive,\n productIds,\n vendorSnippets: snippets,\n groupIds,\n })\n\n /*\n // Old implementation - direct DB queries:\n // Filter groupIds to only include valid (existing) groups\n let validGroupIds = groupIds;\n if (groupIds && groupIds.length > 0) {\n const existingGroups = await db.query.productGroupInfo.findMany({\n where: inArray(productGroupInfo.id, groupIds),\n columns: { id: true },\n });\n validGroupIds = existingGroups.map(g => g.id);\n }\n\n const result = await db.transaction(async (tx) => {\n const [updatedSlot] = await tx\n .update(deliverySlotInfo)\n .set({\n deliveryTime: new Date(deliveryTime),\n freezeTime: new Date(freezeTime),\n isActive: isActive !== undefined ? isActive : true,\n groupIds: validGroupIds !== undefined ? validGroupIds : [],\n })\n .where(eq(deliverySlotInfo.id, id))\n .returning();\n\n if (!updatedSlot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n\n // Update product associations\n if (productIds !== undefined) {\n // Delete existing associations\n await tx.delete(productSlots).where(eq(productSlots.slotId, id));\n\n // Insert new associations\n if (productIds.length > 0) {\n const associations = productIds.map((productId) => ({\n productId,\n slotId: id,\n }));\n await tx.insert(productSlots).values(associations);\n }\n }\n\n // Create vendor snippets if provided\n let createdSnippets: any[] = [];\n if (snippets && snippets.length > 0) {\n for (const snippet of snippets) {\n // Validate products exist\n const products = await tx.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n });\n if (products.length !== snippet.productIds.length) {\n throw new ApiError(`One or more invalid product IDs in snippet \"${snippet.name}\"`, 400);\n }\n\n // Check if snippet name already exists\n const existingSnippet = await tx.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippet.name),\n });\n if (existingSnippet) {\n throw new ApiError(`Snippet name \"${snippet.name}\" already exists`, 400);\n }\n \n const [createdSnippet] = await tx.insert(vendorSnippets).values({\n snippetCode: snippet.name,\n slotId: id,\n productIds: snippet.productIds,\n validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,\n\n }).returning();\n\n createdSnippets.push(createdSnippet);\n }\n }\n\n return {\n slot: updatedSlot,\n createdSnippets,\n message: \"Slot updated successfully\",\n };\n });\n */\n\n if (!result) {\n throw new ApiError('Slot not found', 404)\n }\n\n // Reinitialize stores to reflect changes (outside transaction)\n scheduleStoreInitialization()\n\n return result\n }\n catch(e) {\n console.log(e)\n throw new ApiError(\"Unable to Update Slot\");\n }\n }),\n\n deleteSlot: protectedProcedure\n .input(deleteSlotSchema)\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { id } = input;\n\n const deletedSlot = await deleteSlotByIdInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const [deletedSlot] = await db\n .update(deliverySlotInfo)\n .set({ isActive: false })\n .where(eq(deliverySlotInfo.id, id))\n .returning();\n\n if (!deletedSlot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n */\n\n if (!deletedSlot) {\n throw new ApiError('Slot not found', 404)\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: 'Slot deleted successfully',\n }\n }),\n\n getDeliverySequence: protectedProcedure\n .input(getDeliverySequenceSchema)\n .query(async ({ input, ctx }): Promise => {\n\n const { id } = input;\n const slotId = parseInt(id);\n // const cacheKey = getSlotSequenceKey(slotId);\n\n // try {\n // const cached = await redisClient.get(cacheKey);\n // if (cached) {\n // const parsed = JSON.parse(cached);\n // const validated = cachedSequenceSchema.parse(parsed);\n // console.log('sending cached response')\n // \n // return { deliverySequence: validated };\n // }\n // } catch (error) {\n // console.warn('Redis cache read/validation failed, falling back to DB:', error);\n // // Continue to DB fallback\n // }\n\n // Fallback to DB\n const slot = await getSlotDeliverySequenceInDb(slotId)\n\n /*\n // Old implementation - direct DB queries:\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n });\n\n if (!slot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n\n const sequence = cachedSequenceSchema.parse(slot.deliverySequence || {});\n */\n\n if (!slot) {\n throw new ApiError('Slot not found', 404)\n }\n\n const sequence = (slot.deliverySequence || {}) as CachedDeliverySequence;\n\n // Cache the validated result\n // try {\n // const validated = cachedSequenceSchema.parse(sequence);\n // await redisClient.set(cacheKey, JSON.stringify(validated), 3600);\n // } catch (cacheError) {\n // console.warn('Redis cache write failed:', cacheError);\n // }\n\n return { deliverySequence: sequence }\n }),\n\n updateDeliverySequence: protectedProcedure\n .input(updateDeliverySequenceSchema)\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { id, deliverySequence } = input;\n\n const updatedSlot = await updateSlotDeliverySequenceInDb(id, deliverySequence)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedSlot] = await db\n .update(deliverySlotInfo)\n .set({ deliverySequence })\n .where(eq(deliverySlotInfo.id, id))\n .returning({\n id: deliverySlotInfo.id,\n deliverySequence: deliverySlotInfo.deliverySequence,\n });\n\n if (!updatedSlot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n */\n\n if (!updatedSlot) {\n throw new ApiError('Slot not found', 404)\n }\n\n // Cache the updated sequence\n // const cacheKey = getSlotSequenceKey(id);\n // try {\n // const validated = cachedSequenceSchema.parse(deliverySequence);\n // await redisClient.set(cacheKey, JSON.stringify(validated), 3600);\n // } catch (cacheError) {\n // console.warn('Redis cache write failed:', cacheError);\n // }\n\n return {\n slot: updatedSlot,\n message: 'Delivery sequence updated successfully',\n }\n }),\n\n updateSlotCapacity: protectedProcedure\n .input(z.object({\n slotId: z.number(),\n isCapacityFull: z.boolean(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { slotId, isCapacityFull } = input;\n\n const result = await updateSlotCapacityInDb(slotId, isCapacityFull)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedSlot] = await db\n .update(deliverySlotInfo)\n .set({ isCapacityFull })\n .where(eq(deliverySlotInfo.id, slotId))\n .returning();\n\n if (!updatedSlot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n success: true,\n slot: updatedSlot,\n message: `Slot ${isCapacityFull ? 'marked as full capacity' : 'capacity reset'}`,\n };\n */\n\n if (!result) {\n throw new ApiError('Slot not found', 404)\n }\n\n scheduleStoreInitialization()\n\n return result\n }),\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport { generateSignedUrlsFromS3Urls, generateSignedUrlFromS3Url, claimUploadUrl, extractKeyFromPresignedUrl, deleteImageUtil } from '@/src/lib/s3-client'\nimport { scheduleStoreInitialization } from '@/src/stores/store-initializer'\nimport {\n getAllProducts as getAllProductsInDb,\n getProductById as getProductByIdInDb,\n deleteProduct as deleteProductInDb,\n toggleProductOutOfStock as toggleProductOutOfStockInDb,\n updateSlotProducts as updateSlotProductsInDb,\n getSlotProductIds as getSlotProductIdsInDb,\n getSlotsProductIds as getSlotsProductIdsInDb,\n getProductReviews as getProductReviewsInDb,\n respondToReview as respondToReviewInDb,\n getAllProductGroups as getAllProductGroupsInDb,\n createProductGroup as createProductGroupInDb,\n updateProductGroup as updateProductGroupInDb,\n deleteProductGroup as deleteProductGroupInDb,\n updateProductPrices as updateProductPricesInDb,\n checkProductExistsByName,\n checkUnitExists,\n createProduct as createProductInDb,\n createSpecialDealsForProduct,\n replaceProductTags,\n getProductImagesById,\n updateProduct as updateProductInDb,\n updateProductDeals,\n checkProductTagExistsByName,\n createProductTag as createProductTagInDb,\n updateProductTag as updateProductTagInDb,\n deleteProductTag as deleteProductTagInDb,\n getAllProductTagInfos as getAllProductTagInfosInDb,\n getProductTagInfoById as getProductTagInfoByIdInDb,\n} from '@/src/dbService'\nimport type {\n AdminProduct,\n AdminSpecialDeal,\n AdminProductGroupsResult,\n AdminProductGroupResponse,\n AdminProductReviewsResult,\n AdminProductReviewResponse,\n AdminProductListResponse,\n AdminProductResponse,\n AdminDeleteProductResult,\n AdminToggleOutOfStockResult,\n AdminUpdateSlotProductsResult,\n AdminSlotProductIdsResult,\n AdminSlotsProductIdsResult,\n AdminUpdateProductPricesResult,\n} from '@packages/shared'\n\n\nexport const productRouter = router({\n getProducts: protectedProcedure\n .query(async (): Promise => {\n const products = await getAllProductsInDb()\n\n /*\n // Old implementation - direct DB query:\n const products = await db.query.productInfo.findMany({\n orderBy: productInfo.name,\n with: {\n unit: true,\n store: true,\n },\n });\n */\n\n const productsWithSignedUrls = await Promise.all(\n products.map(async (product) => ({\n ...product,\n images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),\n }))\n )\n\n return {\n products: productsWithSignedUrls,\n count: productsWithSignedUrls.length,\n }\n }),\n\n getProductById: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .query(async ({ input }): Promise => {\n const { id } = input;\n\n const product = await getProductByIdInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, id),\n with: {\n unit: true,\n },\n });\n\n if (!product) {\n throw new ApiError(\"Product not found\", 404);\n }\n\n // Fetch special deals for this product\n const deals = await db.query.specialDeals.findMany({\n where: eq(specialDeals.productId, id),\n orderBy: specialDeals.quantity,\n });\n\n // Fetch associated tags for this product\n const productTagsData = await db.query.productTags.findMany({\n where: eq(productTags.productId, id),\n with: {\n tag: true,\n },\n });\n\n // Generate signed URLs for product images\n const productWithSignedUrls = {\n ...product,\n images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),\n deals,\n tags: productTagsData.map(pt => pt.tag),\n };\n\n return {\n product: productWithSignedUrls,\n };\n */\n\n if (!product) {\n throw new ApiError('Product not found', 404)\n }\n\n const productWithSignedUrls = {\n ...product,\n images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),\n }\n\n return {\n product: productWithSignedUrls,\n }\n }),\n\n deleteProduct: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .mutation(async ({ input }): Promise => {\n const { id } = input;\n\n const deletedProduct = await deleteProductInDb(id)\n\n /*\n // Old implementation - direct DB query:\n const [deletedProduct] = await db\n .delete(productInfo)\n .where(eq(productInfo.id, id))\n .returning();\n\n if (!deletedProduct) {\n throw new ApiError(\"Product not found\", 404);\n }\n */\n\n if (!deletedProduct) {\n throw new ApiError('Product not found', 404)\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: 'Product deleted successfully',\n }\n }),\n\n toggleOutOfStock: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .mutation(async ({ input }): Promise => {\n const { id } = input;\n\n const updatedProduct = await toggleProductOutOfStockInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, id),\n });\n\n if (!product) {\n throw new ApiError(\"Product not found\", 404);\n }\n\n const [updatedProduct] = await db\n .update(productInfo)\n .set({\n isOutOfStock: !product.isOutOfStock,\n })\n .where(eq(productInfo.id, id))\n .returning();\n */\n\n if (!updatedProduct) {\n throw new ApiError('Product not found', 404)\n }\n\n scheduleStoreInitialization()\n\n return {\n product: updatedProduct,\n message: `Product marked as ${updatedProduct.isOutOfStock ? 'out of stock' : 'in stock'}`,\n }\n }),\n\n createProduct: protectedProcedure\n .input(z.object({\n name: z.string().min(1, 'Name is required'),\n shortDescription: z.string().optional(),\n longDescription: z.string().optional(),\n unitId: z.number().min(1, 'Unit is required'),\n storeId: z.number().min(1, 'Store is required'),\n price: z.number().positive('Price must be positive'),\n marketPrice: z.number().optional(),\n incrementStep: z.number().optional().default(1),\n productQuantity: z.number().optional().default(1),\n isSuspended: z.boolean().optional().default(false),\n isFlashAvailable: z.boolean().optional().default(false),\n flashPrice: z.number().optional(),\n uploadUrls: z.array(z.string()).optional().default([]),\n deals: z.array(z.object({\n quantity: z.number(),\n price: z.number(),\n validTill: z.string(),\n })).optional(),\n tagIds: z.array(z.number()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise<{ product: AdminProduct; deals: AdminSpecialDeal[]; message: string }> => {\n const { name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, uploadUrls, deals, tagIds } = input\n\n const existingProduct = await checkProductExistsByName(name.trim())\n if (existingProduct) {\n throw new ApiError('A product with this name already exists', 400)\n }\n\n const unitExists = await checkUnitExists(unitId)\n if (!unitExists) {\n throw new ApiError('Invalid unit ID', 400)\n }\n\n const imageKeys = uploadUrls.map(url => extractKeyFromPresignedUrl(url))\n\n const newProduct = await createProductInDb({\n name,\n shortDescription,\n longDescription,\n unitId,\n storeId,\n price: price.toString(),\n marketPrice: marketPrice?.toString(),\n incrementStep,\n productQuantity,\n isSuspended,\n isFlashAvailable,\n flashPrice: flashPrice?.toString(),\n images: imageKeys,\n })\n\n let createdDeals: AdminSpecialDeal[] = []\n if (deals && deals.length > 0) {\n createdDeals = await createSpecialDealsForProduct(newProduct.id, deals)\n }\n\n if (tagIds.length > 0) {\n await replaceProductTags(newProduct.id, tagIds)\n }\n\n if (uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)))\n }\n\n scheduleStoreInitialization()\n\n return {\n product: newProduct,\n deals: createdDeals,\n message: 'Product created successfully',\n }\n }),\n\n updateProduct: protectedProcedure\n .input(z.object({\n id: z.number(),\n name: z.string().min(1, 'Name is required'),\n shortDescription: z.string().optional(),\n longDescription: z.string().optional(),\n unitId: z.number().min(1, 'Unit is required'),\n storeId: z.number().min(1, 'Store is required'),\n price: z.number().positive('Price must be positive'),\n marketPrice: z.number().optional(),\n incrementStep: z.number().optional().default(1),\n productQuantity: z.number().optional().default(1),\n isSuspended: z.boolean().optional().default(false),\n isFlashAvailable: z.boolean().optional().default(false),\n flashPrice: z.number().nullable().optional(),\n uploadUrls: z.array(z.string()).optional().default([]),\n imagesToDelete: z.array(z.string()).optional().default([]),\n deals: z.array(z.object({\n quantity: z.number(),\n price: z.number(),\n validTill: z.string(),\n })).optional(),\n tagIds: z.array(z.number()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise<{ product: AdminProduct; message: string }> => {\n const { id, name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, uploadUrls, imagesToDelete, deals, tagIds } = input\n\n const unitExists = await checkUnitExists(unitId)\n if (!unitExists) {\n throw new ApiError('Invalid unit ID', 400)\n }\n\n const currentImages = await getProductImagesById(id)\n if (!currentImages) {\n throw new ApiError('Product not found', 404)\n }\n\n let updatedImages = currentImages || []\n if (imagesToDelete.length > 0) {\n const imagesToRemove = updatedImages.filter(img => imagesToDelete.includes(img))\n await deleteImageUtil({ keys: imagesToRemove })\n updatedImages = updatedImages.filter(img => !imagesToRemove.includes(img))\n }\n\n const newImageKeys = uploadUrls.map(url => extractKeyFromPresignedUrl(url))\n const finalImages = [...updatedImages, ...newImageKeys]\n\n const updatedProduct = await updateProductInDb(id, {\n name,\n shortDescription,\n longDescription,\n unitId,\n storeId,\n price: price.toString(),\n marketPrice: marketPrice?.toString(),\n incrementStep,\n productQuantity,\n isSuspended,\n isFlashAvailable,\n flashPrice: flashPrice?.toString() ?? null,\n images: finalImages,\n })\n\n if (!updatedProduct) {\n throw new ApiError('Product not found', 404)\n }\n\n if (deals && deals.length > 0) {\n await updateProductDeals(id, deals)\n }\n\n if (tagIds.length > 0) {\n await replaceProductTags(id, tagIds)\n }\n\n if (uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)))\n }\n\n scheduleStoreInitialization()\n\n return {\n product: updatedProduct,\n message: 'Product updated successfully',\n }\n }),\n\n updateSlotProducts: protectedProcedure\n .input(z.object({\n slotId: z.string(),\n productIds: z.array(z.string()),\n }))\n .mutation(async ({ input }): Promise => {\n const { slotId, productIds } = input;\n\n if (!Array.isArray(productIds)) {\n throw new ApiError(\"productIds must be an array\", 400);\n }\n\n const result = await updateSlotProductsInDb(slotId, productIds)\n\n /*\n // Old implementation - direct DB queries:\n // Get current associations\n const currentAssociations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, parseInt(slotId)),\n columns: {\n productId: true,\n },\n });\n\n const currentProductIds = currentAssociations.map(assoc => assoc.productId);\n const newProductIds = productIds.map((id: string) => parseInt(id));\n\n // Find products to add and remove\n const productsToAdd = newProductIds.filter(id => !currentProductIds.includes(id));\n const productsToRemove = currentProductIds.filter(id => !newProductIds.includes(id));\n\n // Remove associations for products that are no longer selected\n if (productsToRemove.length > 0) {\n await db.delete(productSlots).where(\n and(\n eq(productSlots.slotId, parseInt(slotId)),\n inArray(productSlots.productId, productsToRemove)\n )\n );\n }\n\n // Add associations for newly selected products\n if (productsToAdd.length > 0) {\n const newAssociations = productsToAdd.map(productId => ({\n productId,\n slotId: parseInt(slotId),\n }));\n\n await db.insert(productSlots).values(newAssociations);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: \"Slot products updated successfully\",\n added: productsToAdd.length,\n removed: productsToRemove.length,\n };\n */\n\n scheduleStoreInitialization()\n\n return {\n message: 'Slot products updated successfully',\n added: result.added,\n removed: result.removed,\n }\n }),\n\n getSlotProductIds: protectedProcedure\n .input(z.object({\n slotId: z.string(),\n }))\n .query(async ({ input }): Promise => {\n const { slotId } = input;\n\n const productIds = await getSlotProductIdsInDb(slotId)\n\n /*\n // Old implementation - direct DB queries:\n const associations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, parseInt(slotId)),\n columns: {\n productId: true,\n },\n });\n\n const productIds = associations.map(assoc => assoc.productId);\n\n return {\n productIds,\n };\n */\n\n return {\n productIds,\n }\n }),\n\n getSlotsProductIds: protectedProcedure\n .input(z.object({\n slotIds: z.array(z.number()),\n }))\n .query(async ({ input }): Promise => {\n const { slotIds } = input;\n\n if (!Array.isArray(slotIds)) {\n throw new ApiError(\"slotIds must be an array\", 400);\n }\n\n const result = await getSlotsProductIdsInDb(slotIds)\n\n /*\n // Old implementation - direct DB queries:\n if (slotIds.length === 0) {\n return {};\n }\n\n // Fetch all associations for the requested slots\n const associations = await db.query.productSlots.findMany({\n where: inArray(productSlots.slotId, slotIds),\n columns: {\n slotId: true,\n productId: true,\n },\n });\n\n // Group by slotId\n const result = associations.reduce((acc, assoc) => {\n if (!acc[assoc.slotId]) {\n acc[assoc.slotId] = [];\n }\n acc[assoc.slotId].push(assoc.productId);\n return acc;\n }, {} as Record);\n\n // Ensure all requested slots have entries (even if empty)\n slotIds.forEach(slotId => {\n if (!result[slotId]) {\n result[slotId] = [];\n }\n });\n\n return result;\n */\n\n return result\n }),\n\n getProductReviews: protectedProcedure\n .input(z.object({\n productId: z.number().int().positive(),\n limit: z.number().int().min(1).max(50).optional().default(10),\n offset: z.number().int().min(0).optional().default(0),\n }))\n .query(async ({ input }): Promise => {\n const { productId, limit, offset } = input;\n\n const { reviews, totalCount } = await getProductReviewsInDb(productId, limit, offset)\n\n /*\n // Old implementation - direct DB queries:\n const reviews = await db\n .select({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n adminResponse: productReviews.adminResponse,\n adminResponseImages: productReviews.adminResponseImages,\n userName: users.name,\n })\n .from(productReviews)\n .innerJoin(users, eq(productReviews.userId, users.id))\n .where(eq(productReviews.productId, productId))\n .orderBy(desc(productReviews.reviewTime))\n .limit(limit)\n .offset(offset);\n\n // Generate signed URLs for images\n const reviewsWithSignedUrls = await Promise.all(\n reviews.map(async (review) => ({\n ...review,\n signedImageUrls: await generateSignedUrlsFromS3Urls((review.imageUrls as string[]) || []),\n signedAdminImageUrls: await generateSignedUrlsFromS3Urls((review.adminResponseImages as string[]) || []),\n }))\n );\n\n // Check if more reviews exist\n const totalCountResult = await db\n .select({ count: sql`count(*)` })\n .from(productReviews)\n .where(eq(productReviews.productId, productId));\n\n const totalCount = Number(totalCountResult[0].count);\n const hasMore = offset + limit < totalCount;\n\n return { reviews: reviewsWithSignedUrls, hasMore };\n */\n\n const reviewsWithSignedUrls = await Promise.all(\n reviews.map(async (review) => ({\n ...review,\n signedImageUrls: await generateSignedUrlsFromS3Urls((review.imageUrls as string[]) || []),\n signedAdminImageUrls: await generateSignedUrlsFromS3Urls((review.adminResponseImages as string[]) || []),\n }))\n )\n\n const hasMore = offset + limit < totalCount\n\n return { reviews: reviewsWithSignedUrls, hasMore }\n }),\n\n respondToReview: protectedProcedure\n .input(z.object({\n reviewId: z.number().int().positive(),\n adminResponse: z.string().optional(),\n adminResponseImages: z.array(z.string()).optional().default([]),\n uploadUrls: z.array(z.string()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise => {\n const { reviewId, adminResponse, adminResponseImages, uploadUrls } = input;\n\n const updatedReview = await respondToReviewInDb(reviewId, adminResponse, adminResponseImages)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedReview] = await db\n .update(productReviews)\n .set({\n adminResponse,\n adminResponseImages,\n })\n .where(eq(productReviews.id, reviewId))\n .returning();\n\n if (!updatedReview) {\n throw new ApiError('Review not found', 404);\n }\n\n // Claim upload URLs\n if (uploadUrls && uploadUrls.length > 0) {\n // const { claimUploadUrl } = await import('@/src/lib/s3-client');\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)));\n }\n\n return { success: true, review: updatedReview };\n */\n\n if (!updatedReview) {\n throw new ApiError('Review not found', 404)\n }\n\n if (uploadUrls && uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)))\n }\n\n return { success: true, review: updatedReview }\n }),\n\n getGroups: protectedProcedure\n .query(async (): Promise => {\n const groups = await getAllProductGroupsInDb()\n\n /*\n // Old implementation - direct DB queries:\n const groups = await db.query.productGroupInfo.findMany({\n with: {\n memberships: {\n with: {\n product: true,\n },\n },\n },\n orderBy: desc(productGroupInfo.createdAt),\n });\n */\n\n return {\n groups: groups.map(group => ({\n ...group,\n products: group.memberships.map((m: any) => ({\n ...(m.product as AdminProduct),\n images: (m.product.images as string[]) || null,\n })),\n productCount: group.memberships.length,\n })),\n }\n }),\n\n createGroup: protectedProcedure\n .input(z.object({\n group_name: z.string().min(1),\n description: z.string().optional(),\n product_ids: z.array(z.number()).default([]),\n }))\n .mutation(async ({ input }): Promise => {\n const { group_name, description, product_ids } = input;\n\n const newGroup = await createProductGroupInDb(group_name, description, product_ids)\n\n /*\n // Old implementation - direct DB queries:\n const [newGroup] = await db\n .insert(productGroupInfo)\n .values({\n groupName: group_name,\n description,\n })\n .returning();\n\n if (product_ids.length > 0) {\n const memberships = product_ids.map(productId => ({\n productId,\n groupId: newGroup.id,\n }));\n\n await db.insert(productGroupMembership).values(memberships);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n group: newGroup,\n message: 'Group created successfully',\n };\n */\n\n scheduleStoreInitialization()\n\n return {\n group: newGroup,\n message: 'Group created successfully',\n }\n }),\n\n updateGroup: protectedProcedure\n .input(z.object({\n id: z.number(),\n group_name: z.string().optional(),\n description: z.string().optional(),\n product_ids: z.array(z.number()).optional(),\n }))\n .mutation(async ({ input }): Promise => {\n const { id, group_name, description, product_ids } = input;\n\n const updatedGroup = await updateProductGroupInDb(id, group_name, description, product_ids)\n\n /*\n // Old implementation - direct DB queries:\n const updateData: any = {};\n if (group_name !== undefined) updateData.groupName = group_name;\n if (description !== undefined) updateData.description = description;\n\n const [updatedGroup] = await db\n .update(productGroupInfo)\n .set(updateData)\n .where(eq(productGroupInfo.id, id))\n .returning();\n\n if (!updatedGroup) {\n throw new ApiError('Group not found', 404);\n }\n\n if (product_ids !== undefined) {\n // Delete existing memberships\n await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id));\n\n // Insert new memberships\n if (product_ids.length > 0) {\n const memberships = product_ids.map(productId => ({\n productId,\n groupId: id,\n }));\n\n await db.insert(productGroupMembership).values(memberships);\n }\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n group: updatedGroup,\n message: 'Group updated successfully',\n };\n */\n\n if (!updatedGroup) {\n throw new ApiError('Group not found', 404)\n }\n\n scheduleStoreInitialization()\n\n return {\n group: updatedGroup,\n message: 'Group updated successfully',\n }\n }),\n\n deleteGroup: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .mutation(async ({ input }): Promise => {\n const { id } = input;\n\n const deletedGroup = await deleteProductGroupInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n // Delete memberships first\n await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id));\n\n // Delete group\n const [deletedGroup] = await db\n .delete(productGroupInfo)\n .where(eq(productGroupInfo.id, id))\n .returning();\n\n if (!deletedGroup) {\n throw new ApiError('Group not found', 404);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: 'Group deleted successfully',\n };\n */\n\n if (!deletedGroup) {\n throw new ApiError('Group not found', 404)\n }\n\n scheduleStoreInitialization()\n\n return {\n message: 'Group deleted successfully',\n }\n }),\n\n updateProductPrices: protectedProcedure\n .input(z.object({\n updates: z.array(z.object({\n productId: z.number(),\n price: z.number().optional(),\n marketPrice: z.number().nullable().optional(),\n flashPrice: z.number().nullable().optional(),\n isFlashAvailable: z.boolean().optional(),\n })),\n }))\n .mutation(async ({ input }): Promise => {\n const { updates } = input;\n\n if (updates.length === 0) {\n throw new ApiError('No updates provided', 400)\n }\n\n const result = await updateProductPricesInDb(updates)\n\n /*\n // Old implementation - direct DB queries:\n if (updates.length === 0) {\n throw new ApiError('No updates provided', 400);\n }\n\n // Validate that all productIds exist\n const productIds = updates.map(u => u.productId);\n const existingProducts = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, productIds),\n columns: { id: true },\n });\n\n const existingIds = new Set(existingProducts.map(p => p.id));\n const invalidIds = productIds.filter(id => !existingIds.has(id));\n\n if (invalidIds.length > 0) {\n throw new ApiError(`Invalid product IDs: ${invalidIds.join(', ')}`, 400);\n }\n\n // Perform batch update\n const updatePromises = updates.map(async (update) => {\n const { productId, price, marketPrice, flashPrice, isFlashAvailable } = update;\n const updateData: any = {};\n if (price !== undefined) updateData.price = price;\n if (marketPrice !== undefined) updateData.marketPrice = marketPrice;\n if (flashPrice !== undefined) updateData.flashPrice = flashPrice;\n if (isFlashAvailable !== undefined) updateData.isFlashAvailable = isFlashAvailable;\n\n return db\n .update(productInfo)\n .set(updateData)\n .where(eq(productInfo.id, productId));\n });\n\n await Promise.all(updatePromises);\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: `Updated prices for ${updates.length} product(s)`,\n updatedCount: updates.length,\n };\n */\n\n if (result.invalidIds.length > 0) {\n throw new ApiError(`Invalid product IDs: ${result.invalidIds.join(', ')}`, 400)\n }\n\n scheduleStoreInitialization()\n\n return {\n message: `Updated prices for ${result.updatedCount} product(s)`,\n updatedCount: result.updatedCount,\n }\n }),\n\n getProductTags: protectedProcedure\n .query(async (): Promise<{ tags: Array<{ id: number; tagName: string; tagDescription: string | null; imageUrl: string | null; isDashboardTag: boolean; relatedStores: unknown; createdAt: Date }>; message: string }> => {\n const tags = await getAllProductTagInfosInDb()\n\n const tagsWithSignedUrls = await Promise.all(\n tags.map(async (tag) => ({\n ...tag,\n imageUrl: tag.imageUrl ? await generateSignedUrlFromS3Url(tag.imageUrl) : null,\n }))\n )\n\n return {\n tags: tagsWithSignedUrls,\n message: 'Tags retrieved successfully',\n }\n }),\n\n getProductTagById: protectedProcedure\n .input(z.object({ id: z.number() }))\n .query(async ({ input }): Promise<{ tag: { id: number; tagName: string; tagDescription: string | null; imageUrl: string | null; isDashboardTag: boolean; relatedStores: unknown; createdAt: Date }; message: string }> => {\n const tag = await getProductTagInfoByIdInDb(input.id)\n\n if (!tag) {\n throw new ApiError('Tag not found', 404)\n }\n\n const tagWithSignedUrl = {\n ...tag,\n imageUrl: tag.imageUrl ? await generateSignedUrlFromS3Url(tag.imageUrl) : null,\n }\n\n return {\n tag: tagWithSignedUrl,\n message: 'Tag retrieved successfully',\n }\n }),\n\n createProductTag: protectedProcedure\n .input(z.object({\n tagName: z.string().min(1, 'Tag name is required'),\n tagDescription: z.string().optional(),\n imageUrl: z.string().optional().nullable(),\n isDashboardTag: z.boolean().optional().default(false),\n relatedStores: z.array(z.number()).optional().default([]),\n uploadUrls: z.array(z.string()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise<{ tag: { id: number; tagName: string; tagDescription: string | null; imageUrl: string | null; isDashboardTag: boolean; relatedStores: unknown; createdAt: Date }; message: string }> => {\n const { tagName, tagDescription, imageUrl, isDashboardTag, relatedStores, uploadUrls } = input\n\n const existingTag = await checkProductTagExistsByName(tagName.trim())\n if (existingTag) {\n throw new ApiError('A tag with this name already exists', 400)\n }\n\n const createdTag = await createProductTagInDb({\n tagName: tagName.trim(),\n tagDescription,\n imageUrl: imageUrl ?? null,\n isDashboardTag,\n relatedStores,\n })\n\n if (uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map((url) => claimUploadUrl(url)))\n }\n\n scheduleStoreInitialization()\n\n const { products, ...createdTagInfo } = createdTag\n\n return {\n tag: {\n ...createdTagInfo,\n imageUrl: createdTagInfo.imageUrl ? await generateSignedUrlFromS3Url(createdTagInfo.imageUrl) : null,\n },\n message: 'Tag created successfully',\n }\n }),\n\n updateProductTag: protectedProcedure\n .input(z.object({\n id: z.number(),\n tagName: z.string().min(1).optional(),\n tagDescription: z.string().optional().nullable(),\n imageUrl: z.string().optional().nullable(),\n isDashboardTag: z.boolean().optional(),\n relatedStores: z.array(z.number()).optional(),\n uploadUrls: z.array(z.string()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise<{ tag: { id: number; tagName: string; tagDescription: string | null; imageUrl: string | null; isDashboardTag: boolean; relatedStores: unknown; createdAt: Date }; message: string }> => {\n const { id, tagName, tagDescription, imageUrl, isDashboardTag, relatedStores, uploadUrls } = input\n\n const currentTag = await getProductTagInfoByIdInDb(id)\n\n if (!currentTag) {\n throw new ApiError('Tag not found', 404)\n }\n\n if (imageUrl !== undefined && imageUrl !== currentTag.imageUrl) {\n if (currentTag.imageUrl) {\n await deleteImageUtil({ keys: [currentTag.imageUrl] })\n }\n }\n\n const updatedTag = await updateProductTagInDb(id, {\n tagName: tagName?.trim(),\n tagDescription: tagDescription ?? undefined,\n imageUrl: imageUrl ?? undefined,\n isDashboardTag,\n relatedStores,\n })\n\n if (uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map((url) => claimUploadUrl(url)))\n }\n\n scheduleStoreInitialization()\n\n const { products, ...updatedTagInfo } = updatedTag\n\n return {\n tag: {\n ...updatedTagInfo,\n imageUrl: updatedTagInfo.imageUrl ? await generateSignedUrlFromS3Url(updatedTagInfo.imageUrl) : null,\n },\n message: 'Tag updated successfully',\n }\n }),\n\n deleteProductTag: protectedProcedure\n .input(z.object({ id: z.number() }))\n .mutation(async ({ input }): Promise<{ message: string }> => {\n const tag = await getProductTagInfoByIdInDb(input.id)\n\n if (!tag) {\n throw new ApiError('Tag not found', 404)\n }\n\n if (tag.imageUrl) {\n await deleteImageUtil({ keys: [tag.imageUrl] })\n }\n\n await deleteProductTagInDb(input.id)\n\n scheduleStoreInitialization()\n\n return { message: 'Tag deleted successfully' }\n }),\n });\n", "export const subtle = globalThis.crypto?.subtle;\nexport const randomUUID = () => {\n\treturn globalThis.crypto?.randomUUID();\n};\nexport const getRandomValues = (array) => {\n\treturn globalThis.crypto?.getRandomValues(array);\n};\n", "import { notImplemented, notImplementedClass } from \"../../../_internal/utils.mjs\";\nimport { getRandomValues } from \"./web.mjs\";\nconst MAX_RANDOM_VALUE_BYTES = 65536;\nexport const webcrypto = new Proxy(globalThis.crypto, { get(_, key) {\n\tif (key === \"CryptoKey\") {\n\t\treturn globalThis.CryptoKey;\n\t}\n\tif (typeof globalThis.crypto[key] === \"function\") {\n\t\treturn globalThis.crypto[key].bind(globalThis.crypto);\n\t}\n\treturn globalThis.crypto[key];\n} });\nexport const randomBytes = (size, cb) => {\n\tconst bytes = Buffer.alloc(size, 0, undefined);\n\tfor (let generated = 0; generated < size; generated += MAX_RANDOM_VALUE_BYTES) {\n\t\tgetRandomValues(\n\t\t\t// Use subarray to get a view of the buffer\n\t\t\tUint8Array.prototype.subarray.call(bytes, generated, generated + MAX_RANDOM_VALUE_BYTES)\n);\n\t}\n\tif (typeof cb === \"function\") {\n\t\tcb(null, bytes);\n\t\treturn undefined;\n\t}\n\treturn bytes;\n};\nexport const rng = randomBytes;\nexport const prng = randomBytes;\nexport const fips = false;\nexport const checkPrime = /*@__PURE__*/ notImplemented(\"crypto.checkPrime\");\nexport const checkPrimeSync = /*@__PURE__*/ notImplemented(\"crypto.checkPrimeSync\");\n/** @deprecated */\nexport const createCipher = /*@__PURE__*/ notImplemented(\"crypto.createCipher\");\n/** @deprecated */\nexport const createDecipher = /*@__PURE__*/ notImplemented(\"crypto.createDecipher\");\nexport const pseudoRandomBytes = /*@__PURE__*/ notImplemented(\"crypto.pseudoRandomBytes\");\nexport const createCipheriv = /*@__PURE__*/ notImplemented(\"crypto.createCipheriv\");\nexport const createDecipheriv = /*@__PURE__*/ notImplemented(\"crypto.createDecipheriv\");\nexport const createDiffieHellman = /*@__PURE__*/ notImplemented(\"crypto.createDiffieHellman\");\nexport const createDiffieHellmanGroup = /*@__PURE__*/ notImplemented(\"crypto.createDiffieHellmanGroup\");\nexport const createECDH = /*@__PURE__*/ notImplemented(\"crypto.createECDH\");\nexport const createHash = /*@__PURE__*/ notImplemented(\"crypto.createHash\");\nexport const createHmac = /*@__PURE__*/ notImplemented(\"crypto.createHmac\");\nexport const createPrivateKey = /*@__PURE__*/ notImplemented(\"crypto.createPrivateKey\");\nexport const createPublicKey = /*@__PURE__*/ notImplemented(\"crypto.createPublicKey\");\nexport const createSecretKey = /*@__PURE__*/ notImplemented(\"crypto.createSecretKey\");\nexport const createSign = /*@__PURE__*/ notImplemented(\"crypto.createSign\");\nexport const createVerify = /*@__PURE__*/ notImplemented(\"crypto.createVerify\");\nexport const diffieHellman = /*@__PURE__*/ notImplemented(\"crypto.diffieHellman\");\nexport const generatePrime = /*@__PURE__*/ notImplemented(\"crypto.generatePrime\");\nexport const generatePrimeSync = /*@__PURE__*/ notImplemented(\"crypto.generatePrimeSync\");\nexport const getCiphers = /*@__PURE__*/ notImplemented(\"crypto.getCiphers\");\nexport const getCipherInfo = /*@__PURE__*/ notImplemented(\"crypto.getCipherInfo\");\nexport const getCurves = /*@__PURE__*/ notImplemented(\"crypto.getCurves\");\nexport const getDiffieHellman = /*@__PURE__*/ notImplemented(\"crypto.getDiffieHellman\");\nexport const getHashes = /*@__PURE__*/ notImplemented(\"crypto.getHashes\");\nexport const hkdf = /*@__PURE__*/ notImplemented(\"crypto.hkdf\");\nexport const hkdfSync = /*@__PURE__*/ notImplemented(\"crypto.hkdfSync\");\nexport const pbkdf2 = /*@__PURE__*/ notImplemented(\"crypto.pbkdf2\");\nexport const pbkdf2Sync = /*@__PURE__*/ notImplemented(\"crypto.pbkdf2Sync\");\nexport const generateKeyPair = /*@__PURE__*/ notImplemented(\"crypto.generateKeyPair\");\nexport const generateKeyPairSync = /*@__PURE__*/ notImplemented(\"crypto.generateKeyPairSync\");\nexport const generateKey = /*@__PURE__*/ notImplemented(\"crypto.generateKey\");\nexport const generateKeySync = /*@__PURE__*/ notImplemented(\"crypto.generateKeySync\");\nexport const privateDecrypt = /*@__PURE__*/ notImplemented(\"crypto.privateDecrypt\");\nexport const privateEncrypt = /*@__PURE__*/ notImplemented(\"crypto.privateEncrypt\");\nexport const publicDecrypt = /*@__PURE__*/ notImplemented(\"crypto.publicDecrypt\");\nexport const publicEncrypt = /*@__PURE__*/ notImplemented(\"crypto.publicEncrypt\");\nexport const randomFill = /*@__PURE__*/ notImplemented(\"crypto.randomFill\");\nexport const randomFillSync = /*@__PURE__*/ notImplemented(\"crypto.randomFillSync\");\nexport const randomInt = /*@__PURE__*/ notImplemented(\"crypto.randomInt\");\nexport const scrypt = /*@__PURE__*/ notImplemented(\"crypto.scrypt\");\nexport const scryptSync = /*@__PURE__*/ notImplemented(\"crypto.scryptSync\");\nexport const sign = /*@__PURE__*/ notImplemented(\"crypto.sign\");\nexport const setEngine = /*@__PURE__*/ notImplemented(\"crypto.setEngine\");\nexport const timingSafeEqual = /*@__PURE__*/ notImplemented(\"crypto.timingSafeEqual\");\nexport const getFips = /*@__PURE__*/ notImplemented(\"crypto.getFips\");\nexport const setFips = /*@__PURE__*/ notImplemented(\"crypto.setFips\");\nexport const verify = /*@__PURE__*/ notImplemented(\"crypto.verify\");\nexport const secureHeapUsed = /*@__PURE__*/ notImplemented(\"crypto.secureHeapUsed\");\nexport const hash = /*@__PURE__*/ notImplemented(\"crypto.hash\");\nexport const Certificate = /*@__PURE__*/ notImplementedClass(\"crypto.Certificate\");\nexport const Cipher = /*@__PURE__*/ notImplementedClass(\"crypto.Cipher\");\nexport const Cipheriv = /*@__PURE__*/ notImplementedClass(\n\t\"crypto.Cipheriv\"\n\t// @ts-expect-error not typed yet\n);\nexport const Decipher = /*@__PURE__*/ notImplementedClass(\"crypto.Decipher\");\nexport const Decipheriv = /*@__PURE__*/ notImplementedClass(\n\t\"crypto.Decipheriv\"\n\t// @ts-expect-error not typed yet\n);\nexport const DiffieHellman = /*@__PURE__*/ notImplementedClass(\"crypto.DiffieHellman\");\nexport const DiffieHellmanGroup = /*@__PURE__*/ notImplementedClass(\"crypto.DiffieHellmanGroup\");\nexport const ECDH = /*@__PURE__*/ notImplementedClass(\"crypto.ECDH\");\nexport const Hash = /*@__PURE__*/ notImplementedClass(\"crypto.Hash\");\nexport const Hmac = /*@__PURE__*/ notImplementedClass(\"crypto.Hmac\");\nexport const KeyObject = /*@__PURE__*/ notImplementedClass(\"crypto.KeyObject\");\nexport const Sign = /*@__PURE__*/ notImplementedClass(\"crypto.Sign\");\nexport const Verify = /*@__PURE__*/ notImplementedClass(\"crypto.Verify\");\nexport const X509Certificate = /*@__PURE__*/ notImplementedClass(\"crypto.X509Certificate\");\n", "export const SSL_OP_ALL = 2147485776;\nexport const SSL_OP_ALLOW_NO_DHE_KEX = 1024;\nexport const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION = 262144;\nexport const SSL_OP_CIPHER_SERVER_PREFERENCE = 4194304;\nexport const SSL_OP_CISCO_ANYCONNECT = 32768;\nexport const SSL_OP_COOKIE_EXCHANGE = 8192;\nexport const SSL_OP_CRYPTOPRO_TLSEXT_BUG = 2147483648;\nexport const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS = 2048;\nexport const SSL_OP_LEGACY_SERVER_CONNECT = 4;\nexport const SSL_OP_NO_COMPRESSION = 131072;\nexport const SSL_OP_NO_ENCRYPT_THEN_MAC = 524288;\nexport const SSL_OP_NO_QUERY_MTU = 4096;\nexport const SSL_OP_NO_RENEGOTIATION = 1073741824;\nexport const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION = 65536;\nexport const SSL_OP_NO_SSLv2 = 0;\nexport const SSL_OP_NO_SSLv3 = 33554432;\nexport const SSL_OP_NO_TICKET = 16384;\nexport const SSL_OP_NO_TLSv1 = 67108864;\nexport const SSL_OP_NO_TLSv1_1 = 268435456;\nexport const SSL_OP_NO_TLSv1_2 = 134217728;\nexport const SSL_OP_NO_TLSv1_3 = 536870912;\nexport const SSL_OP_PRIORITIZE_CHACHA = 2097152;\nexport const SSL_OP_TLS_ROLLBACK_BUG = 8388608;\nexport const ENGINE_METHOD_RSA = 1;\nexport const ENGINE_METHOD_DSA = 2;\nexport const ENGINE_METHOD_DH = 4;\nexport const ENGINE_METHOD_RAND = 8;\nexport const ENGINE_METHOD_EC = 2048;\nexport const ENGINE_METHOD_CIPHERS = 64;\nexport const ENGINE_METHOD_DIGESTS = 128;\nexport const ENGINE_METHOD_PKEY_METHS = 512;\nexport const ENGINE_METHOD_PKEY_ASN1_METHS = 1024;\nexport const ENGINE_METHOD_ALL = 65535;\nexport const ENGINE_METHOD_NONE = 0;\nexport const DH_CHECK_P_NOT_SAFE_PRIME = 2;\nexport const DH_CHECK_P_NOT_PRIME = 1;\nexport const DH_UNABLE_TO_CHECK_GENERATOR = 4;\nexport const DH_NOT_SUITABLE_GENERATOR = 8;\nexport const RSA_PKCS1_PADDING = 1;\nexport const RSA_NO_PADDING = 3;\nexport const RSA_PKCS1_OAEP_PADDING = 4;\nexport const RSA_X931_PADDING = 5;\nexport const RSA_PKCS1_PSS_PADDING = 6;\nexport const RSA_PSS_SALTLEN_DIGEST = -1;\nexport const RSA_PSS_SALTLEN_MAX_SIGN = -2;\nexport const RSA_PSS_SALTLEN_AUTO = -2;\nexport const POINT_CONVERSION_COMPRESSED = 2;\nexport const POINT_CONVERSION_UNCOMPRESSED = 4;\nexport const POINT_CONVERSION_HYBRID = 6;\nexport const defaultCoreCipherList = \"\";\nexport const defaultCipherList = \"\";\nexport const OPENSSL_VERSION_NUMBER = 0;\nexport const TLS1_VERSION = 0;\nexport const TLS1_1_VERSION = 0;\nexport const TLS1_2_VERSION = 0;\nexport const TLS1_3_VERSION = 0;\n", "import { getRandomValues, randomUUID, subtle } from \"./internal/crypto/web.mjs\";\nimport { Certificate, Cipher, Cipheriv, Decipher, Decipheriv, DiffieHellman, DiffieHellmanGroup, ECDH, Hash, Hmac, KeyObject, Sign, Verify, X509Certificate, checkPrime, checkPrimeSync, createCipheriv, createDecipheriv, createDiffieHellman, createDiffieHellmanGroup, createECDH, createHash, createHmac, createPrivateKey, createPublicKey, createSecretKey, createSign, createVerify, diffieHellman, fips, generateKey, generateKeyPair, generateKeyPairSync, generateKeySync, generatePrime, generatePrimeSync, getCipherInfo, getCiphers, getCurves, getDiffieHellman, getFips, getHashes, hash, hkdf, hkdfSync, pbkdf2, pbkdf2Sync, privateDecrypt, privateEncrypt, pseudoRandomBytes, publicDecrypt, prng, publicEncrypt, randomBytes, randomFill, randomFillSync, randomInt, rng, scrypt, scryptSync, secureHeapUsed, setEngine, setFips, sign, timingSafeEqual, verify, webcrypto } from \"./internal/crypto/node.mjs\";\nimport { OPENSSL_VERSION_NUMBER, SSL_OP_ALL, SSL_OP_ALLOW_NO_DHE_KEX, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION, SSL_OP_CIPHER_SERVER_PREFERENCE, SSL_OP_CISCO_ANYCONNECT, SSL_OP_COOKIE_EXCHANGE, SSL_OP_CRYPTOPRO_TLSEXT_BUG, SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS, SSL_OP_LEGACY_SERVER_CONNECT, SSL_OP_NO_COMPRESSION, SSL_OP_NO_ENCRYPT_THEN_MAC, SSL_OP_NO_QUERY_MTU, SSL_OP_NO_RENEGOTIATION, SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION, SSL_OP_NO_SSLv2, SSL_OP_NO_SSLv3, SSL_OP_NO_TICKET, SSL_OP_NO_TLSv1, SSL_OP_NO_TLSv1_1, SSL_OP_NO_TLSv1_2, SSL_OP_NO_TLSv1_3, SSL_OP_PRIORITIZE_CHACHA, SSL_OP_TLS_ROLLBACK_BUG, ENGINE_METHOD_RSA, ENGINE_METHOD_DSA, ENGINE_METHOD_DH, ENGINE_METHOD_RAND, ENGINE_METHOD_EC, ENGINE_METHOD_CIPHERS, ENGINE_METHOD_DIGESTS, ENGINE_METHOD_PKEY_METHS, ENGINE_METHOD_PKEY_ASN1_METHS, ENGINE_METHOD_ALL, ENGINE_METHOD_NONE, DH_CHECK_P_NOT_SAFE_PRIME, DH_CHECK_P_NOT_PRIME, DH_UNABLE_TO_CHECK_GENERATOR, DH_NOT_SUITABLE_GENERATOR, RSA_PKCS1_PADDING, RSA_NO_PADDING, RSA_PKCS1_OAEP_PADDING, RSA_X931_PADDING, RSA_PKCS1_PSS_PADDING, RSA_PSS_SALTLEN_DIGEST, RSA_PSS_SALTLEN_MAX_SIGN, RSA_PSS_SALTLEN_AUTO, defaultCoreCipherList, TLS1_VERSION, TLS1_1_VERSION, TLS1_2_VERSION, TLS1_3_VERSION, POINT_CONVERSION_COMPRESSED, POINT_CONVERSION_UNCOMPRESSED, POINT_CONVERSION_HYBRID, defaultCipherList } from \"./internal/crypto/constants.mjs\";\nexport * from \"./internal/crypto/web.mjs\";\nexport * from \"./internal/crypto/node.mjs\";\nexport const constants = {\n\tOPENSSL_VERSION_NUMBER,\n\tSSL_OP_ALL,\n\tSSL_OP_ALLOW_NO_DHE_KEX,\n\tSSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION,\n\tSSL_OP_CIPHER_SERVER_PREFERENCE,\n\tSSL_OP_CISCO_ANYCONNECT,\n\tSSL_OP_COOKIE_EXCHANGE,\n\tSSL_OP_CRYPTOPRO_TLSEXT_BUG,\n\tSSL_OP_DONT_INSERT_EMPTY_FRAGMENTS,\n\tSSL_OP_LEGACY_SERVER_CONNECT,\n\tSSL_OP_NO_COMPRESSION,\n\tSSL_OP_NO_ENCRYPT_THEN_MAC,\n\tSSL_OP_NO_QUERY_MTU,\n\tSSL_OP_NO_RENEGOTIATION,\n\tSSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION,\n\tSSL_OP_NO_SSLv2,\n\tSSL_OP_NO_SSLv3,\n\tSSL_OP_NO_TICKET,\n\tSSL_OP_NO_TLSv1,\n\tSSL_OP_NO_TLSv1_1,\n\tSSL_OP_NO_TLSv1_2,\n\tSSL_OP_NO_TLSv1_3,\n\tSSL_OP_PRIORITIZE_CHACHA,\n\tSSL_OP_TLS_ROLLBACK_BUG,\n\tENGINE_METHOD_RSA,\n\tENGINE_METHOD_DSA,\n\tENGINE_METHOD_DH,\n\tENGINE_METHOD_RAND,\n\tENGINE_METHOD_EC,\n\tENGINE_METHOD_CIPHERS,\n\tENGINE_METHOD_DIGESTS,\n\tENGINE_METHOD_PKEY_METHS,\n\tENGINE_METHOD_PKEY_ASN1_METHS,\n\tENGINE_METHOD_ALL,\n\tENGINE_METHOD_NONE,\n\tDH_CHECK_P_NOT_SAFE_PRIME,\n\tDH_CHECK_P_NOT_PRIME,\n\tDH_UNABLE_TO_CHECK_GENERATOR,\n\tDH_NOT_SUITABLE_GENERATOR,\n\tRSA_PKCS1_PADDING,\n\tRSA_NO_PADDING,\n\tRSA_PKCS1_OAEP_PADDING,\n\tRSA_X931_PADDING,\n\tRSA_PKCS1_PSS_PADDING,\n\tRSA_PSS_SALTLEN_DIGEST,\n\tRSA_PSS_SALTLEN_MAX_SIGN,\n\tRSA_PSS_SALTLEN_AUTO,\n\tdefaultCoreCipherList,\n\tTLS1_VERSION,\n\tTLS1_1_VERSION,\n\tTLS1_2_VERSION,\n\tTLS1_3_VERSION,\n\tPOINT_CONVERSION_COMPRESSED,\n\tPOINT_CONVERSION_UNCOMPRESSED,\n\tPOINT_CONVERSION_HYBRID,\n\tdefaultCipherList\n};\nexport default {\n\tconstants,\n\tgetRandomValues,\n\trandomUUID,\n\tsubtle,\n\tCertificate,\n\tCipher,\n\tCipheriv,\n\tDecipher,\n\tDecipheriv,\n\tDiffieHellman,\n\tDiffieHellmanGroup,\n\tECDH,\n\tHash,\n\tHmac,\n\tKeyObject,\n\tSign,\n\tVerify,\n\tX509Certificate,\n\tcheckPrime,\n\tcheckPrimeSync,\n\tcreateCipheriv,\n\tcreateDecipheriv,\n\tcreateDiffieHellman,\n\tcreateDiffieHellmanGroup,\n\tcreateECDH,\n\tcreateHash,\n\tcreateHmac,\n\tcreatePrivateKey,\n\tcreatePublicKey,\n\tcreateSecretKey,\n\tcreateSign,\n\tcreateVerify,\n\tdiffieHellman,\n\tfips,\n\tgenerateKey,\n\tgenerateKeyPair,\n\tgenerateKeyPairSync,\n\tgenerateKeySync,\n\tgeneratePrime,\n\tgeneratePrimeSync,\n\tgetCipherInfo,\n\tgetCiphers,\n\tgetCurves,\n\tgetDiffieHellman,\n\tgetFips,\n\tgetHashes,\n\thash,\n\thkdf,\n\thkdfSync,\n\tpbkdf2,\n\tpbkdf2Sync,\n\tprivateDecrypt,\n\tprivateEncrypt,\n\tpseudoRandomBytes,\n\tpublicDecrypt,\n\tprng,\n\tpublicEncrypt,\n\trandomBytes,\n\trandomFill,\n\trandomFillSync,\n\trandomInt,\n\trng,\n\tscrypt,\n\tscryptSync,\n\tsecureHeapUsed,\n\tsetEngine,\n\tsetFips,\n\tsign,\n\ttimingSafeEqual,\n\tverify,\n\twebcrypto\n};\n", "import {\n Cipher,\n Cipheriv,\n constants,\n createCipher,\n createCipheriv,\n createDecipher,\n createDecipheriv,\n createECDH,\n createSign,\n createVerify,\n Decipher,\n Decipheriv,\n diffieHellman,\n ECDH,\n getCipherInfo,\n hash,\n privateDecrypt,\n privateEncrypt,\n pseudoRandomBytes,\n publicDecrypt,\n publicEncrypt,\n Sign,\n sign,\n webcrypto as unenvCryptoWebcrypto,\n Verify,\n verify\n} from \"unenv/node/crypto\";\nexport {\n Cipher,\n Cipheriv,\n Decipher,\n Decipheriv,\n ECDH,\n Sign,\n Verify,\n constants,\n createCipheriv,\n createDecipheriv,\n createECDH,\n createSign,\n createVerify,\n diffieHellman,\n getCipherInfo,\n hash,\n privateDecrypt,\n privateEncrypt,\n publicDecrypt,\n publicEncrypt,\n sign,\n verify\n} from \"unenv/node/crypto\";\nconst workerdCrypto = process.getBuiltinModule(\"node:crypto\");\nexport const {\n Certificate,\n DiffieHellman,\n DiffieHellmanGroup,\n Hash,\n Hmac,\n KeyObject,\n X509Certificate,\n checkPrime,\n checkPrimeSync,\n createDiffieHellman,\n createDiffieHellmanGroup,\n createHash,\n createHmac,\n createPrivateKey,\n createPublicKey,\n createSecretKey,\n generateKey,\n generateKeyPair,\n generateKeyPairSync,\n generateKeySync,\n generatePrime,\n generatePrimeSync,\n getCiphers,\n getCurves,\n getDiffieHellman,\n getFips,\n getHashes,\n hkdf,\n hkdfSync,\n pbkdf2,\n pbkdf2Sync,\n randomBytes,\n randomFill,\n randomFillSync,\n randomInt,\n randomUUID,\n scrypt,\n scryptSync,\n secureHeapUsed,\n setEngine,\n setFips,\n subtle,\n timingSafeEqual\n} = workerdCrypto;\nexport const getRandomValues = workerdCrypto.getRandomValues.bind(\n workerdCrypto.webcrypto\n);\nexport const webcrypto = {\n // @ts-expect-error unenv has unknown type\n CryptoKey: unenvCryptoWebcrypto.CryptoKey,\n getRandomValues,\n randomUUID,\n subtle\n};\nconst fips = workerdCrypto.fips;\nexport default {\n /**\n * manually unroll unenv-polyfilled-symbols to make it tree-shakeable\n */\n Certificate,\n Cipher,\n Cipheriv,\n Decipher,\n Decipheriv,\n ECDH,\n Sign,\n Verify,\n X509Certificate,\n // @ts-expect-error @types/node is out of date - this is a bug in typings\n constants,\n // @ts-expect-error unenv has unknown type\n createCipheriv,\n // @ts-expect-error unenv has unknown type\n createDecipheriv,\n // @ts-expect-error unenv has unknown type\n createECDH,\n // @ts-expect-error unenv has unknown type\n createSign,\n // @ts-expect-error unenv has unknown type\n createVerify,\n // @ts-expect-error unenv has unknown type\n diffieHellman,\n // @ts-expect-error unenv has unknown type\n getCipherInfo,\n // @ts-expect-error unenv has unknown type\n hash,\n // @ts-expect-error unenv has unknown type\n privateDecrypt,\n // @ts-expect-error unenv has unknown type\n privateEncrypt,\n // @ts-expect-error unenv has unknown type\n publicDecrypt,\n // @ts-expect-error unenv has unknown type\n publicEncrypt,\n scrypt,\n scryptSync,\n // @ts-expect-error unenv has unknown type\n sign,\n // @ts-expect-error unenv has unknown type\n verify,\n // default-only export from unenv\n // @ts-expect-error unenv has unknown type\n createCipher,\n // @ts-expect-error unenv has unknown type\n createDecipher,\n // @ts-expect-error unenv has unknown type\n pseudoRandomBytes,\n /**\n * manually unroll workerd-polyfilled-symbols to make it tree-shakeable\n */\n DiffieHellman,\n DiffieHellmanGroup,\n Hash,\n Hmac,\n KeyObject,\n checkPrime,\n checkPrimeSync,\n createDiffieHellman,\n createDiffieHellmanGroup,\n createHash,\n createHmac,\n createPrivateKey,\n createPublicKey,\n createSecretKey,\n generateKey,\n generateKeyPair,\n generateKeyPairSync,\n generateKeySync,\n generatePrime,\n generatePrimeSync,\n getCiphers,\n getCurves,\n getDiffieHellman,\n getFips,\n getHashes,\n getRandomValues,\n hkdf,\n hkdfSync,\n pbkdf2,\n pbkdf2Sync,\n randomBytes,\n randomFill,\n randomFillSync,\n randomInt,\n randomUUID,\n secureHeapUsed,\n setEngine,\n setFips,\n subtle,\n timingSafeEqual,\n // default-only export from workerd\n fips,\n // special-cased deep merged symbols\n webcrypto\n};\n", "/*\n Copyright (c) 2012 Nevins Bartolomeo \n Copyright (c) 2012 Shane Girish \n Copyright (c) 2025 Daniel Wirtz \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n 3. The name of the author may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// The Node.js crypto module is used as a fallback for the Web Crypto API. When\n// building for the browser, inclusion of the crypto module should be disabled,\n// which the package hints at in its package.json for bundlers that support it.\nimport nodeCrypto from \"crypto\";\n\n/**\n * The random implementation to use as a fallback.\n * @type {?function(number):!Array.}\n * @inner\n */\nvar randomFallback = null;\n\n/**\n * Generates cryptographically secure random bytes.\n * @function\n * @param {number} len Bytes length\n * @returns {!Array.} Random bytes\n * @throws {Error} If no random implementation is available\n * @inner\n */\nfunction randomBytes(len) {\n // Web Crypto API. Globally available in the browser and in Node.js >=23.\n try {\n return crypto.getRandomValues(new Uint8Array(len));\n } catch {}\n // Node.js crypto module for non-browser environments.\n try {\n return nodeCrypto.randomBytes(len);\n } catch {}\n // Custom fallback specified with `setRandomFallback`.\n if (!randomFallback) {\n throw Error(\n \"Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative\",\n );\n }\n return randomFallback(len);\n}\n\n/**\n * Sets the pseudo random number generator to use as a fallback if neither node's `crypto` module nor the Web Crypto\n * API is available. Please note: It is highly important that the PRNG used is cryptographically secure and that it\n * is seeded properly!\n * @param {?function(number):!Array.} random Function taking the number of bytes to generate as its\n * sole argument, returning the corresponding array of cryptographically secure random byte values.\n * @see http://nodejs.org/api/crypto.html\n * @see http://www.w3.org/TR/WebCryptoAPI/\n */\nexport function setRandomFallback(random) {\n randomFallback = random;\n}\n\n/**\n * Synchronously generates a salt.\n * @param {number=} rounds Number of rounds to use, defaults to 10 if omitted\n * @param {number=} seed_length Not supported.\n * @returns {string} Resulting salt\n * @throws {Error} If a random fallback is required but not set\n */\nexport function genSaltSync(rounds, seed_length) {\n rounds = rounds || GENSALT_DEFAULT_LOG2_ROUNDS;\n if (typeof rounds !== \"number\")\n throw Error(\n \"Illegal arguments: \" + typeof rounds + \", \" + typeof seed_length,\n );\n if (rounds < 4) rounds = 4;\n else if (rounds > 31) rounds = 31;\n var salt = [];\n salt.push(\"$2b$\");\n if (rounds < 10) salt.push(\"0\");\n salt.push(rounds.toString());\n salt.push(\"$\");\n salt.push(base64_encode(randomBytes(BCRYPT_SALT_LEN), BCRYPT_SALT_LEN)); // May throw\n return salt.join(\"\");\n}\n\n/**\n * Asynchronously generates a salt.\n * @param {(number|function(Error, string=))=} rounds Number of rounds to use, defaults to 10 if omitted\n * @param {(number|function(Error, string=))=} seed_length Not supported.\n * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting salt\n * @returns {!Promise} If `callback` has been omitted\n * @throws {Error} If `callback` is present but not a function\n */\nexport function genSalt(rounds, seed_length, callback) {\n if (typeof seed_length === \"function\")\n (callback = seed_length), (seed_length = undefined); // Not supported.\n if (typeof rounds === \"function\") (callback = rounds), (rounds = undefined);\n if (typeof rounds === \"undefined\") rounds = GENSALT_DEFAULT_LOG2_ROUNDS;\n else if (typeof rounds !== \"number\")\n throw Error(\"illegal arguments: \" + typeof rounds);\n\n function _async(callback) {\n nextTick(function () {\n // Pretty thin, but salting is fast enough\n try {\n callback(null, genSaltSync(rounds));\n } catch (err) {\n callback(err);\n }\n });\n }\n\n if (callback) {\n if (typeof callback !== \"function\")\n throw Error(\"Illegal callback: \" + typeof callback);\n _async(callback);\n } else\n return new Promise(function (resolve, reject) {\n _async(function (err, res) {\n if (err) {\n reject(err);\n return;\n }\n resolve(res);\n });\n });\n}\n\n/**\n * Synchronously generates a hash for the given password.\n * @param {string} password Password to hash\n * @param {(number|string)=} salt Salt length to generate or salt to use, default to 10\n * @returns {string} Resulting hash\n */\nexport function hashSync(password, salt) {\n if (typeof salt === \"undefined\") salt = GENSALT_DEFAULT_LOG2_ROUNDS;\n if (typeof salt === \"number\") salt = genSaltSync(salt);\n if (typeof password !== \"string\" || typeof salt !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof password + \", \" + typeof salt);\n return _hash(password, salt);\n}\n\n/**\n * Asynchronously generates a hash for the given password.\n * @param {string} password Password to hash\n * @param {number|string} salt Salt length to generate or salt to use\n * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting hash\n * @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed\n * (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.\n * @returns {!Promise} If `callback` has been omitted\n * @throws {Error} If `callback` is present but not a function\n */\nexport function hash(password, salt, callback, progressCallback) {\n function _async(callback) {\n if (typeof password === \"string\" && typeof salt === \"number\")\n genSalt(salt, function (err, salt) {\n _hash(password, salt, callback, progressCallback);\n });\n else if (typeof password === \"string\" && typeof salt === \"string\")\n _hash(password, salt, callback, progressCallback);\n else\n nextTick(\n callback.bind(\n this,\n Error(\"Illegal arguments: \" + typeof password + \", \" + typeof salt),\n ),\n );\n }\n\n if (callback) {\n if (typeof callback !== \"function\")\n throw Error(\"Illegal callback: \" + typeof callback);\n _async(callback);\n } else\n return new Promise(function (resolve, reject) {\n _async(function (err, res) {\n if (err) {\n reject(err);\n return;\n }\n resolve(res);\n });\n });\n}\n\n/**\n * Compares two strings of the same length in constant time.\n * @param {string} known Must be of the correct length\n * @param {string} unknown Must be the same length as `known`\n * @returns {boolean}\n * @inner\n */\nfunction safeStringCompare(known, unknown) {\n var diff = known.length ^ unknown.length;\n for (var i = 0; i < known.length; ++i) {\n diff |= known.charCodeAt(i) ^ unknown.charCodeAt(i);\n }\n return diff === 0;\n}\n\n/**\n * Synchronously tests a password against a hash.\n * @param {string} password Password to compare\n * @param {string} hash Hash to test against\n * @returns {boolean} true if matching, otherwise false\n * @throws {Error} If an argument is illegal\n */\nexport function compareSync(password, hash) {\n if (typeof password !== \"string\" || typeof hash !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof password + \", \" + typeof hash);\n if (hash.length !== 60) return false;\n return safeStringCompare(\n hashSync(password, hash.substring(0, hash.length - 31)),\n hash,\n );\n}\n\n/**\n * Asynchronously tests a password against a hash.\n * @param {string} password Password to compare\n * @param {string} hashValue Hash to test against\n * @param {function(Error, boolean)=} callback Callback receiving the error, if any, otherwise the result\n * @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed\n * (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.\n * @returns {!Promise} If `callback` has been omitted\n * @throws {Error} If `callback` is present but not a function\n */\nexport function compare(password, hashValue, callback, progressCallback) {\n function _async(callback) {\n if (typeof password !== \"string\" || typeof hashValue !== \"string\") {\n nextTick(\n callback.bind(\n this,\n Error(\n \"Illegal arguments: \" + typeof password + \", \" + typeof hashValue,\n ),\n ),\n );\n return;\n }\n if (hashValue.length !== 60) {\n nextTick(callback.bind(this, null, false));\n return;\n }\n hash(\n password,\n hashValue.substring(0, 29),\n function (err, comp) {\n if (err) callback(err);\n else callback(null, safeStringCompare(comp, hashValue));\n },\n progressCallback,\n );\n }\n\n if (callback) {\n if (typeof callback !== \"function\")\n throw Error(\"Illegal callback: \" + typeof callback);\n _async(callback);\n } else\n return new Promise(function (resolve, reject) {\n _async(function (err, res) {\n if (err) {\n reject(err);\n return;\n }\n resolve(res);\n });\n });\n}\n\n/**\n * Gets the number of rounds used to encrypt the specified hash.\n * @param {string} hash Hash to extract the used number of rounds from\n * @returns {number} Number of rounds used\n * @throws {Error} If `hash` is not a string\n */\nexport function getRounds(hash) {\n if (typeof hash !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof hash);\n return parseInt(hash.split(\"$\")[2], 10);\n}\n\n/**\n * Gets the salt portion from a hash. Does not validate the hash.\n * @param {string} hash Hash to extract the salt from\n * @returns {string} Extracted salt part\n * @throws {Error} If `hash` is not a string or otherwise invalid\n */\nexport function getSalt(hash) {\n if (typeof hash !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof hash);\n if (hash.length !== 60)\n throw Error(\"Illegal hash length: \" + hash.length + \" != 60\");\n return hash.substring(0, 29);\n}\n\n/**\n * Tests if a password will be truncated when hashed, that is its length is\n * greater than 72 bytes when converted to UTF-8.\n * @param {string} password The password to test\n * @returns {boolean} `true` if truncated, otherwise `false`\n */\nexport function truncates(password) {\n if (typeof password !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof password);\n return utf8Length(password) > 72;\n}\n\n/**\n * Continues with the callback after yielding to the event loop.\n * @function\n * @param {function(...[*])} callback Callback to execute\n * @inner\n */\nvar nextTick =\n typeof setImmediate === \"function\"\n ? setImmediate\n : typeof scheduler === \"object\" && typeof scheduler.postTask === \"function\"\n ? scheduler.postTask.bind(scheduler)\n : setTimeout;\n\n/** Calculates the byte length of a string encoded as UTF8. */\nfunction utf8Length(string) {\n var len = 0,\n c = 0;\n for (var i = 0; i < string.length; ++i) {\n c = string.charCodeAt(i);\n if (c < 128) len += 1;\n else if (c < 2048) len += 2;\n else if (\n (c & 0xfc00) === 0xd800 &&\n (string.charCodeAt(i + 1) & 0xfc00) === 0xdc00\n ) {\n ++i;\n len += 4;\n } else len += 3;\n }\n return len;\n}\n\n/** Converts a string to an array of UTF8 bytes. */\nfunction utf8Array(string) {\n var offset = 0,\n c1,\n c2;\n var buffer = new Array(utf8Length(string));\n for (var i = 0, k = string.length; i < k; ++i) {\n c1 = string.charCodeAt(i);\n if (c1 < 128) {\n buffer[offset++] = c1;\n } else if (c1 < 2048) {\n buffer[offset++] = (c1 >> 6) | 192;\n buffer[offset++] = (c1 & 63) | 128;\n } else if (\n (c1 & 0xfc00) === 0xd800 &&\n ((c2 = string.charCodeAt(i + 1)) & 0xfc00) === 0xdc00\n ) {\n c1 = 0x10000 + ((c1 & 0x03ff) << 10) + (c2 & 0x03ff);\n ++i;\n buffer[offset++] = (c1 >> 18) | 240;\n buffer[offset++] = ((c1 >> 12) & 63) | 128;\n buffer[offset++] = ((c1 >> 6) & 63) | 128;\n buffer[offset++] = (c1 & 63) | 128;\n } else {\n buffer[offset++] = (c1 >> 12) | 224;\n buffer[offset++] = ((c1 >> 6) & 63) | 128;\n buffer[offset++] = (c1 & 63) | 128;\n }\n }\n return buffer;\n}\n\n// A base64 implementation for the bcrypt algorithm. This is partly non-standard.\n\n/**\n * bcrypt's own non-standard base64 dictionary.\n * @type {!Array.}\n * @const\n * @inner\n **/\nvar BASE64_CODE =\n \"./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\".split(\"\");\n\n/**\n * @type {!Array.}\n * @const\n * @inner\n **/\nvar BASE64_INDEX = [\n -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,\n -1, -1, -1, -1, -1, -1, -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, 28,\n 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,\n 48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1,\n];\n\n/**\n * Encodes a byte array to base64 with up to len bytes of input.\n * @param {!Array.} b Byte array\n * @param {number} len Maximum input length\n * @returns {string}\n * @inner\n */\nfunction base64_encode(b, len) {\n var off = 0,\n rs = [],\n c1,\n c2;\n if (len <= 0 || len > b.length) throw Error(\"Illegal len: \" + len);\n while (off < len) {\n c1 = b[off++] & 0xff;\n rs.push(BASE64_CODE[(c1 >> 2) & 0x3f]);\n c1 = (c1 & 0x03) << 4;\n if (off >= len) {\n rs.push(BASE64_CODE[c1 & 0x3f]);\n break;\n }\n c2 = b[off++] & 0xff;\n c1 |= (c2 >> 4) & 0x0f;\n rs.push(BASE64_CODE[c1 & 0x3f]);\n c1 = (c2 & 0x0f) << 2;\n if (off >= len) {\n rs.push(BASE64_CODE[c1 & 0x3f]);\n break;\n }\n c2 = b[off++] & 0xff;\n c1 |= (c2 >> 6) & 0x03;\n rs.push(BASE64_CODE[c1 & 0x3f]);\n rs.push(BASE64_CODE[c2 & 0x3f]);\n }\n return rs.join(\"\");\n}\n\n/**\n * Decodes a base64 encoded string to up to len bytes of output.\n * @param {string} s String to decode\n * @param {number} len Maximum output length\n * @returns {!Array.}\n * @inner\n */\nfunction base64_decode(s, len) {\n var off = 0,\n slen = s.length,\n olen = 0,\n rs = [],\n c1,\n c2,\n c3,\n c4,\n o,\n code;\n if (len <= 0) throw Error(\"Illegal len: \" + len);\n while (off < slen - 1 && olen < len) {\n code = s.charCodeAt(off++);\n c1 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;\n code = s.charCodeAt(off++);\n c2 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;\n if (c1 == -1 || c2 == -1) break;\n o = (c1 << 2) >>> 0;\n o |= (c2 & 0x30) >> 4;\n rs.push(String.fromCharCode(o));\n if (++olen >= len || off >= slen) break;\n code = s.charCodeAt(off++);\n c3 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;\n if (c3 == -1) break;\n o = ((c2 & 0x0f) << 4) >>> 0;\n o |= (c3 & 0x3c) >> 2;\n rs.push(String.fromCharCode(o));\n if (++olen >= len || off >= slen) break;\n code = s.charCodeAt(off++);\n c4 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;\n o = ((c3 & 0x03) << 6) >>> 0;\n o |= c4;\n rs.push(String.fromCharCode(o));\n ++olen;\n }\n var res = [];\n for (off = 0; off < olen; off++) res.push(rs[off].charCodeAt(0));\n return res;\n}\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar BCRYPT_SALT_LEN = 16;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar GENSALT_DEFAULT_LOG2_ROUNDS = 10;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar BLOWFISH_NUM_ROUNDS = 16;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar MAX_EXECUTION_TIME = 100;\n\n/**\n * @type {Array.}\n * @const\n * @inner\n */\nvar P_ORIG = [\n 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, 0x299f31d0,\n 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,\n 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, 0x9216d5d9, 0x8979fb1b,\n];\n\n/**\n * @type {Array.}\n * @const\n * @inner\n */\nvar S_ORIG = [\n 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, 0xb8e1afed, 0x6a267e96,\n 0xba7c9045, 0xf12c7f99, 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16,\n 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, 0x0d95748f, 0x728eb658,\n 0x718bcd58, 0x82154aee, 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,\n 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, 0x8e79dcb0, 0x603a180e,\n 0x6c9e0e8b, 0xb01e8a3e, 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,\n 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, 0x55ca396a, 0x2aab10b6,\n 0xb4cc5c34, 0x1141e8ce, 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,\n 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, 0xafd6ba33, 0x6c24cf5c,\n 0x7a325381, 0x28958677, 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,\n 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, 0xef845d5d, 0xe98575b1,\n 0xdc262302, 0xeb651b88, 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,\n 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, 0x21c66842, 0xf6e96c9a,\n 0x670c9c61, 0xabd388f0, 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3,\n 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, 0xa1f1651d, 0x39af0176,\n 0x66ca593e, 0x82430e88, 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,\n 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, 0x4ed3aa62, 0x363f7706,\n 0x1bfedf72, 0x429b023d, 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,\n 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, 0xe3fe501a, 0xb6794c3b,\n 0x976ce0bd, 0x04c006ba, 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,\n 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, 0x6dfc511f, 0x9b30952c,\n 0xcc814544, 0xaf5ebd09, 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3,\n 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, 0x5579c0bd, 0x1a60320a,\n 0xd6a100c6, 0x402c7279, 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,\n 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, 0x323db5fa, 0xfd238760,\n 0x53317b48, 0x3e00df82, 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db,\n 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, 0x695b27b0, 0xbbca58c8,\n 0xe1ffa35d, 0xb8f011a0, 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b,\n 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, 0xe1ddf2da, 0xa4cb7e33,\n 0x62fb1341, 0xcee4c6e8, 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,\n 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, 0xd08ed1d0, 0xafc725e0,\n 0x8e3c5b2f, 0x8e7594b7, 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c,\n 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, 0x2f2f2218, 0xbe0e1777,\n 0xea752dfe, 0x8b021fa1, 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299,\n 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, 0x165fa266, 0x80957705,\n 0x93cc7314, 0x211a1477, 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,\n 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, 0x00250e2d, 0x2071b35e,\n 0x226800bb, 0x57b8e0af, 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa,\n 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, 0x83260376, 0x6295cfa9,\n 0x11c81968, 0x4e734a41, 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,\n 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, 0x08ba6fb5, 0x571be91f,\n 0xf296ec6b, 0x2a0dd915, 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664,\n 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a, 0x4b7a70e9, 0xb5b32944,\n 0xdb75092e, 0xc4192623, 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266,\n 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, 0x193602a5, 0x75094c29,\n 0xa0591340, 0xe4183a3e, 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6,\n 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, 0x4cdd2086, 0x8470eb26,\n 0x6382e9c6, 0x021ecc5e, 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1,\n 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, 0x3e07841c, 0x7fdeae5c,\n 0x8e7d44ec, 0x5716f2b8, 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff,\n 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, 0xd19113f9, 0x7ca92ff6,\n 0x94324773, 0x22f54701, 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7,\n 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, 0xe238cd99, 0x3bea0e2f,\n 0x3280bba1, 0x183eb331, 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf,\n 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, 0xde9a771f, 0xd9930810,\n 0xb38bae12, 0xdccf3f2e, 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87,\n 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, 0xec7aec3a, 0xdb851dfa,\n 0x63094366, 0xc464c3d2, 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16,\n 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, 0x71dff89e, 0x10314e55,\n 0x81ac77d6, 0x5f11199b, 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,\n 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, 0x86e34570, 0xeae96fb1,\n 0x860e5e0a, 0x5a3e2ab3, 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f,\n 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, 0xc6150eba, 0x94e2ea78,\n 0xa5fc3c53, 0x1e0a2df4, 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960,\n 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, 0xe3bc4595, 0xa67bc883,\n 0xb17f37d1, 0x018cff28, 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802,\n 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, 0x1521b628, 0x29076170,\n 0xecdd4775, 0x619f1510, 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf,\n 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, 0xeecc86bc, 0x60622ca7,\n 0x9cab5cab, 0xb2f3846e, 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50,\n 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, 0x9b540b19, 0x875fa099,\n 0x95f7997e, 0x623d7da8, 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281,\n 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, 0x57f584a5, 0x1b227263,\n 0x9b83c3ff, 0x1ac24696, 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128,\n 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, 0x5d4a14d9, 0xe864b7e3,\n 0x42105d14, 0x203e13e0, 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0,\n 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, 0xd81e799e, 0x86854dc7,\n 0xe44b476a, 0x3d816250, 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3,\n 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, 0x095bbf00, 0xad19489d,\n 0x1462b174, 0x23820e00, 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061,\n 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, 0x7cde3759, 0xcbee7460,\n 0x4085f2a7, 0xce77326e, 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735,\n 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, 0x9e447a2e, 0xc3453484,\n 0xfdd56705, 0x0e1e9ec9, 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340,\n 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, 0x153e21e7, 0x8fb03d4a,\n 0xe6e39f2b, 0xdb83adf7, 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934,\n 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, 0xd4082471, 0x3320f46a,\n 0x43b7d4b7, 0x500061af, 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840,\n 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, 0xbfbc09ec, 0x03bd9785,\n 0x7fac6dd0, 0x31cb8504, 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,\n 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, 0x68dc1462, 0xd7486900,\n 0x680ec0a4, 0x27a18dee, 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6,\n 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, 0x20fe9e35, 0xd9f385b9,\n 0xee39d7ab, 0x3b124e8b, 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2,\n 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, 0xfb0af54e, 0xd8feb397,\n 0x454056ac, 0xba489527, 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b,\n 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, 0xa62a4a56, 0x3f3125f9,\n 0x5ef47e1c, 0x9029317c, 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3,\n 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, 0x07f9c9ee, 0x41041f0f,\n 0x404779a4, 0x5d886e17, 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564,\n 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, 0x0e12b4c2, 0x02e1329e,\n 0xaf664fd1, 0xcad18115, 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922,\n 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, 0xd0127845, 0x95b794fd,\n 0x647d0862, 0xe7ccf5f0, 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e,\n 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, 0xa812dc60, 0xa1ebddf8,\n 0x991be14c, 0xdb6e6b0d, 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804,\n 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, 0x667b9ffb, 0xcedb7d9c,\n 0xa091cf0b, 0xd9155ea3, 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb,\n 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, 0x6842ada7, 0xc66a2b3b,\n 0x12754ccc, 0x782ef11c, 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350,\n 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, 0x44421659, 0x0a121386,\n 0xd90cec6e, 0xd5abea2a, 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe,\n 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, 0xd1fd8346, 0xf6381fb0,\n 0x7745ae04, 0xd736fccc, 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f,\n 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, 0x4e58f48f, 0xf2ddfda2,\n 0xf474ef38, 0x8789bdc2, 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9,\n 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, 0x466e598e, 0x20b45770,\n 0x8cd55591, 0xc902de4c, 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e,\n 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, 0xe85a1f02, 0x09f0be8c,\n 0x4a99a025, 0x1d6efe10, 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,\n 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, 0x50115e01, 0xa70683fa,\n 0xa002b5c4, 0x0de6d027, 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5,\n 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, 0x11e69ed7, 0x2338ea63,\n 0x53c2dd94, 0xc2c21634, 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76,\n 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, 0x86e3725f, 0x724d9db9,\n 0x1ac15bb4, 0xd39eb8fc, 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4,\n 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, 0x6fd5c7e7, 0x56e14ec4,\n 0x362abfce, 0xddc6c837, 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0,\n 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, 0x5cb0679e, 0x4fa33742,\n 0xd3822740, 0x99bc9bbe, 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,\n 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, 0x5748ab2f, 0xbc946e79,\n 0xc6a376d2, 0x6549c2c8, 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,\n 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, 0xa1fad5f0, 0x6a2d519a,\n 0x63ef8ce2, 0x9a86ee22, 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4,\n 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, 0x2826a2f9, 0xa73a3ae1,\n 0x4ba99586, 0xef5562e9, 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59,\n 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, 0xe990fd5a, 0x9e34d797,\n 0x2cf0b7d9, 0x022b8b51, 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28,\n 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, 0xe029ac71, 0xe019a5e6,\n 0x47b0acfd, 0xed93fa9b, 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,\n 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, 0x15056dd4, 0x88f46dba,\n 0x03a16125, 0x0564f0bd, 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a,\n 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, 0x7533d928, 0xb155fdf5,\n 0x03563482, 0x8aba3cbb, 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,\n 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, 0xea7a90c2, 0xfb3e7bce,\n 0x5121ce64, 0x774fbe32, 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680,\n 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, 0xb39a460a, 0x6445c0dd,\n 0x586cdecf, 0x1c20c8ae, 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb,\n 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, 0x72eacea8, 0xfa6484bb,\n 0x8d6612ae, 0xbf3c6f47, 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,\n 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, 0x4040cb08, 0x4eb4e2cc,\n 0x34d2466a, 0x0115af84, 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048,\n 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, 0x611560b1, 0xe7933fdc,\n 0xbb3a792b, 0x344525bd, 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9,\n 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, 0x1a908749, 0xd44fbd9a,\n 0xd0dadecb, 0xd50ada38, 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,\n 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, 0xbf97222c, 0x15e6fc2a,\n 0x0f91fc71, 0x9b941525, 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1,\n 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, 0xe0ec6e0e, 0x1698db3b,\n 0x4c98a0be, 0x3278e964, 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,\n 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, 0xdf359f8d, 0x9b992f2e,\n 0xe60b6f47, 0x0fe3f11d, 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f,\n 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, 0xf523f357, 0xa6327623,\n 0x93a83531, 0x56cccd02, 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc,\n 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, 0xe6c6c7bd, 0x327a140a,\n 0x45e1d006, 0xc3f27b9a, 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6,\n 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, 0x53113ec0, 0x1640e3d3,\n 0x38abbd60, 0x2547adf0, 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,\n 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, 0x1948c25c, 0x02fb8a8c,\n 0x01c36ae4, 0xd6ebe1f9, 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,\n 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6,\n];\n\n/**\n * @type {Array.}\n * @const\n * @inner\n */\nvar C_ORIG = [\n 0x4f727068, 0x65616e42, 0x65686f6c, 0x64657253, 0x63727944, 0x6f756274,\n];\n\n/**\n * @param {Array.} lr\n * @param {number} off\n * @param {Array.} P\n * @param {Array.} S\n * @returns {Array.}\n * @inner\n */\nfunction _encipher(lr, off, P, S) {\n // This is our bottleneck: 1714/1905 ticks / 90% - see profile.txt\n var n,\n l = lr[off],\n r = lr[off + 1];\n\n l ^= P[0];\n\n /*\n for (var i=0, k=BLOWFISH_NUM_ROUNDS-2; i<=k;)\n // Feistel substitution on left word\n n = S[l >>> 24],\n n += S[0x100 | ((l >> 16) & 0xff)],\n n ^= S[0x200 | ((l >> 8) & 0xff)],\n n += S[0x300 | (l & 0xff)],\n r ^= n ^ P[++i],\n // Feistel substitution on right word\n n = S[r >>> 24],\n n += S[0x100 | ((r >> 16) & 0xff)],\n n ^= S[0x200 | ((r >> 8) & 0xff)],\n n += S[0x300 | (r & 0xff)],\n l ^= n ^ P[++i];\n */\n\n //The following is an unrolled version of the above loop.\n //Iteration 0\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[1];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[2];\n //Iteration 1\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[3];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[4];\n //Iteration 2\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[5];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[6];\n //Iteration 3\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[7];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[8];\n //Iteration 4\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[9];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[10];\n //Iteration 5\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[11];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[12];\n //Iteration 6\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[13];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[14];\n //Iteration 7\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[15];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[16];\n\n lr[off] = r ^ P[BLOWFISH_NUM_ROUNDS + 1];\n lr[off + 1] = l;\n return lr;\n}\n\n/**\n * @param {Array.} data\n * @param {number} offp\n * @returns {{key: number, offp: number}}\n * @inner\n */\nfunction _streamtoword(data, offp) {\n for (var i = 0, word = 0; i < 4; ++i)\n (word = (word << 8) | (data[offp] & 0xff)),\n (offp = (offp + 1) % data.length);\n return { key: word, offp: offp };\n}\n\n/**\n * @param {Array.} key\n * @param {Array.} P\n * @param {Array.} S\n * @inner\n */\nfunction _key(key, P, S) {\n var offset = 0,\n lr = [0, 0],\n plen = P.length,\n slen = S.length,\n sw;\n for (var i = 0; i < plen; i++)\n (sw = _streamtoword(key, offset)),\n (offset = sw.offp),\n (P[i] = P[i] ^ sw.key);\n for (i = 0; i < plen; i += 2)\n (lr = _encipher(lr, 0, P, S)), (P[i] = lr[0]), (P[i + 1] = lr[1]);\n for (i = 0; i < slen; i += 2)\n (lr = _encipher(lr, 0, P, S)), (S[i] = lr[0]), (S[i + 1] = lr[1]);\n}\n\n/**\n * Expensive key schedule Blowfish.\n * @param {Array.} data\n * @param {Array.} key\n * @param {Array.} P\n * @param {Array.} S\n * @inner\n */\nfunction _ekskey(data, key, P, S) {\n var offp = 0,\n lr = [0, 0],\n plen = P.length,\n slen = S.length,\n sw;\n for (var i = 0; i < plen; i++)\n (sw = _streamtoword(key, offp)), (offp = sw.offp), (P[i] = P[i] ^ sw.key);\n offp = 0;\n for (i = 0; i < plen; i += 2)\n (sw = _streamtoword(data, offp)),\n (offp = sw.offp),\n (lr[0] ^= sw.key),\n (sw = _streamtoword(data, offp)),\n (offp = sw.offp),\n (lr[1] ^= sw.key),\n (lr = _encipher(lr, 0, P, S)),\n (P[i] = lr[0]),\n (P[i + 1] = lr[1]);\n for (i = 0; i < slen; i += 2)\n (sw = _streamtoword(data, offp)),\n (offp = sw.offp),\n (lr[0] ^= sw.key),\n (sw = _streamtoword(data, offp)),\n (offp = sw.offp),\n (lr[1] ^= sw.key),\n (lr = _encipher(lr, 0, P, S)),\n (S[i] = lr[0]),\n (S[i + 1] = lr[1]);\n}\n\n/**\n * Internaly crypts a string.\n * @param {Array.} b Bytes to crypt\n * @param {Array.} salt Salt bytes to use\n * @param {number} rounds Number of rounds\n * @param {function(Error, Array.=)=} callback Callback receiving the error, if any, and the resulting bytes. If\n * omitted, the operation will be performed synchronously.\n * @param {function(number)=} progressCallback Callback called with the current progress\n * @returns {!Array.|undefined} Resulting bytes if callback has been omitted, otherwise `undefined`\n * @inner\n */\nfunction _crypt(b, salt, rounds, callback, progressCallback) {\n var cdata = C_ORIG.slice(),\n clen = cdata.length,\n err;\n\n // Validate\n if (rounds < 4 || rounds > 31) {\n err = Error(\"Illegal number of rounds (4-31): \" + rounds);\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n if (salt.length !== BCRYPT_SALT_LEN) {\n err = Error(\n \"Illegal salt length: \" + salt.length + \" != \" + BCRYPT_SALT_LEN,\n );\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n rounds = (1 << rounds) >>> 0;\n\n var P,\n S,\n i = 0,\n j;\n\n //Use typed arrays when available - huge speedup!\n if (typeof Int32Array === \"function\") {\n P = new Int32Array(P_ORIG);\n S = new Int32Array(S_ORIG);\n } else {\n P = P_ORIG.slice();\n S = S_ORIG.slice();\n }\n\n _ekskey(salt, b, P, S);\n\n /**\n * Calcualtes the next round.\n * @returns {Array.|undefined} Resulting array if callback has been omitted, otherwise `undefined`\n * @inner\n */\n function next() {\n if (progressCallback) progressCallback(i / rounds);\n if (i < rounds) {\n var start = Date.now();\n for (; i < rounds; ) {\n i = i + 1;\n _key(b, P, S);\n _key(salt, P, S);\n if (Date.now() - start > MAX_EXECUTION_TIME) break;\n }\n } else {\n for (i = 0; i < 64; i++)\n for (j = 0; j < clen >> 1; j++) _encipher(cdata, j << 1, P, S);\n var ret = [];\n for (i = 0; i < clen; i++)\n ret.push(((cdata[i] >> 24) & 0xff) >>> 0),\n ret.push(((cdata[i] >> 16) & 0xff) >>> 0),\n ret.push(((cdata[i] >> 8) & 0xff) >>> 0),\n ret.push((cdata[i] & 0xff) >>> 0);\n if (callback) {\n callback(null, ret);\n return;\n } else return ret;\n }\n if (callback) nextTick(next);\n }\n\n // Async\n if (typeof callback !== \"undefined\") {\n next();\n\n // Sync\n } else {\n var res;\n while (true) if (typeof (res = next()) !== \"undefined\") return res || [];\n }\n}\n\n/**\n * Internally hashes a password.\n * @param {string} password Password to hash\n * @param {?string} salt Salt to use, actually never null\n * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting hash. If omitted,\n * hashing is performed synchronously.\n * @param {function(number)=} progressCallback Callback called with the current progress\n * @returns {string|undefined} Resulting hash if callback has been omitted, otherwise `undefined`\n * @inner\n */\nfunction _hash(password, salt, callback, progressCallback) {\n var err;\n if (typeof password !== \"string\" || typeof salt !== \"string\") {\n err = Error(\"Invalid string / salt: Not a string\");\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n\n // Validate the salt\n var minor, offset;\n if (salt.charAt(0) !== \"$\" || salt.charAt(1) !== \"2\") {\n err = Error(\"Invalid salt version: \" + salt.substring(0, 2));\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n if (salt.charAt(2) === \"$\") (minor = String.fromCharCode(0)), (offset = 3);\n else {\n minor = salt.charAt(2);\n if (\n (minor !== \"a\" && minor !== \"b\" && minor !== \"y\") ||\n salt.charAt(3) !== \"$\"\n ) {\n err = Error(\"Invalid salt revision: \" + salt.substring(2, 4));\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n offset = 4;\n }\n\n // Extract number of rounds\n if (salt.charAt(offset + 2) > \"$\") {\n err = Error(\"Missing salt rounds\");\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n var r1 = parseInt(salt.substring(offset, offset + 1), 10) * 10,\n r2 = parseInt(salt.substring(offset + 1, offset + 2), 10),\n rounds = r1 + r2,\n real_salt = salt.substring(offset + 3, offset + 25);\n password += minor >= \"a\" ? \"\\x00\" : \"\";\n\n var passwordb = utf8Array(password),\n saltb = base64_decode(real_salt, BCRYPT_SALT_LEN);\n\n /**\n * Finishes hashing.\n * @param {Array.} bytes Byte array\n * @returns {string}\n * @inner\n */\n function finish(bytes) {\n var res = [];\n res.push(\"$2\");\n if (minor >= \"a\") res.push(minor);\n res.push(\"$\");\n if (rounds < 10) res.push(\"0\");\n res.push(rounds.toString());\n res.push(\"$\");\n res.push(base64_encode(saltb, saltb.length));\n res.push(base64_encode(bytes, C_ORIG.length * 4 - 1));\n return res.join(\"\");\n }\n\n // Sync\n if (typeof callback == \"undefined\")\n return finish(_crypt(passwordb, saltb, rounds));\n // Async\n else {\n _crypt(\n passwordb,\n saltb,\n rounds,\n function (err, bytes) {\n if (err) callback(err, null);\n else callback(null, finish(bytes));\n },\n progressCallback,\n );\n }\n}\n\n/**\n * Encodes a byte array to base64 with up to len bytes of input, using the custom bcrypt alphabet.\n * @function\n * @param {!Array.} bytes Byte array\n * @param {number} length Maximum input length\n * @returns {string}\n */\nexport function encodeBase64(bytes, length) {\n return base64_encode(bytes, length);\n}\n\n/**\n * Decodes a base64 encoded string to up to len bytes of output, using the custom bcrypt alphabet.\n * @function\n * @param {string} string String to decode\n * @param {number} length Maximum output length\n * @returns {!Array.}\n */\nexport function decodeBase64(string, length) {\n return base64_decode(string, length);\n}\n\nexport default {\n setRandomFallback,\n genSaltSync,\n genSalt,\n hashSync,\n hash,\n compareSync,\n compare,\n getRounds,\n getSalt,\n truncates,\n encodeBase64,\n decodeBase64,\n};\n", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport bcrypt from 'bcryptjs';\nimport { SignJWT } from 'jose';\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter';\nimport { ApiError } from '@/src/lib/api-error'\nimport {\n getStaffUserByName,\n getAllStaff,\n getAllUsers,\n getUserWithDetails,\n upsertUserSuspension,\n checkStaffUserExists,\n checkStaffRoleExists,\n createStaffUser,\n getAllRoles,\n} from '@/src/dbService'\nimport type { StaffUser, StaffRole } from '@packages/shared'\n\nexport const staffUserRouter = router({\n login: publicProcedure\n .input(z.object({\n name: z.string(),\n password: z.string(),\n }))\n .mutation(async ({ input }) => {\n const { name, password } = input;\n\n if (!name || !password) {\n throw new ApiError('Name and password are required', 400);\n }\n\n const staff = await getStaffUserByName(name);\n\n if (!staff) {\n throw new ApiError('Invalid credentials', 401);\n }\n\n const isPasswordValid = await bcrypt.compare(password, staff.password);\n if (!isPasswordValid) {\n throw new ApiError('Invalid credentials', 401);\n }\n\n const token = await new SignJWT({ staffId: staff.id, name: staff.name })\n .setProtectedHeader({ alg: 'HS256' })\n .setExpirationTime('30d')\n .sign(getEncodedJwtSecret());\n\n return {\n message: 'Login successful',\n token,\n staff: { id: staff.id, name: staff.name },\n };\n }),\n\n getStaff: protectedProcedure\n .query(async ({ ctx }) => {\n const staff = await getAllStaff();\n\n // Transform the data to include role and permissions in a cleaner format\n const transformedStaff = staff.map((user) => ({\n id: user.id,\n name: user.name,\n role: user.role ? {\n id: user.role.id,\n name: user.role.roleName,\n } : null,\n permissions: user.role?.rolePermissions.map((rp: any) => ({\n id: rp.permission.id,\n name: rp.permission.permissionName,\n })) || [],\n }));\n\n return {\n staff: transformedStaff,\n };\n }),\n\n getUsers: protectedProcedure\n .input(z.object({\n cursor: z.number().optional(),\n limit: z.number().default(20),\n search: z.string().optional(),\n }))\n .query(async ({ input }) => {\n const { cursor, limit, search } = input;\n\n const { users: usersToReturn, hasMore } = await getAllUsers(cursor, limit, search);\n\n const formattedUsers = usersToReturn.map((user: any) => ({\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n image: user.userDetails?.profileImage || null,\n }));\n\n return {\n users: formattedUsers,\n nextCursor: hasMore ? usersToReturn[usersToReturn.length - 1].id : undefined,\n };\n }),\n\n getUserDetails: protectedProcedure\n .input(z.object({ userId: z.number() }))\n .query(async ({ input }) => {\n const { userId } = input;\n\n const user = await getUserWithDetails(userId);\n\n if (!user) {\n throw new ApiError(\"User not found\", 404);\n }\n\n const lastOrder = user.orders[0];\n\n return {\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n addedOn: user.createdAt,\n lastOrdered: lastOrder?.createdAt || null,\n isSuspended: user.userDetails?.isSuspended || false,\n };\n }),\n\n updateUserSuspension: protectedProcedure\n .input(z.object({ userId: z.number(), isSuspended: z.boolean() }))\n .mutation(async ({ input }) => {\n const { userId, isSuspended } = input;\n\n await upsertUserSuspension(userId, isSuspended);\n\n return { success: true };\n }),\n\n createStaffUser: protectedProcedure\n .input(z.object({\n name: z.string().min(1, 'Name is required'),\n password: z.string().min(6, 'Password must be at least 6 characters'),\n roleId: z.number().int().positive('Role is required'),\n }))\n .mutation(async ({ input, ctx }) => {\n const { name, password, roleId } = input;\n\n // Check if staff user already exists\n const existingUser = await checkStaffUserExists(name);\n\n if (existingUser) {\n throw new ApiError('Staff user with this name already exists', 409);\n }\n\n // Check if role exists\n const roleExists = await checkStaffRoleExists(roleId);\n\n if (!roleExists) {\n throw new ApiError('Invalid role selected', 400);\n }\n\n // Hash password\n const hashedPassword = await bcrypt.hash(password, 12);\n\n // Create staff user\n const newUser = await createStaffUser(name, hashedPassword, roleId);\n\n return { success: true, user: { id: newUser.id, name: newUser.name } };\n }),\n\n getRoles: protectedProcedure\n .query(async ({ ctx }) => {\n const roles = await getAllRoles();\n\n return {\n roles: roles.map((role: any) => ({\n id: role.id,\n name: role.roleName,\n })),\n };\n }),\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport { ApiError } from '@/src/lib/api-error'\nimport { extractKeyFromPresignedUrl, deleteImageUtil, generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport { scheduleStoreInitialization } from '@/src/stores/store-initializer'\nimport {\n getAllStores as getAllStoresFromDb,\n getStoreById as getStoreByIdFromDb,\n createStore as createStoreInDb,\n updateStore as updateStoreInDb,\n deleteStore as deleteStoreFromDb,\n} from '@/src/dbService'\nimport type { Store } from '@packages/shared'\n\nexport const storeRouter = router({\n getStores: protectedProcedure\n .query(async ({ ctx }): Promise<{ stores: any[]; count: number }> => {\n const stores = await getAllStoresFromDb();\n\n await Promise.all(stores.map(async store => {\n if(store.imageUrl)\n store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl)\n })).catch((e) => {\n throw new ApiError(\"Unable to find store image urls\")\n })\n\n return {\n stores,\n count: stores.length,\n };\n }),\n\n getStoreById: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .query(async ({ input, ctx }): Promise<{ store: any }> => {\n const { id } = input;\n\n const store = await getStoreByIdFromDb(id);\n\n if (!store) {\n throw new ApiError(\"Store not found\", 404);\n }\n store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl);\n return {\n store,\n };\n }),\n\n createStore: protectedProcedure\n .input(z.object({\n name: z.string().min(1, \"Name is required\"),\n description: z.string().optional(),\n imageUrl: z.string().optional(),\n owner: z.number().min(1, \"Owner is required\"),\n products: z.array(z.number()).optional(),\n }))\n .mutation(async ({ input, ctx }): Promise<{ store: Store; message: string }> => {\n const { name, description, imageUrl, owner, products } = input;\n\n const imageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : undefined;\n\n const newStore = await createStoreInDb(\n {\n name,\n description,\n imageUrl: imageKey,\n owner,\n },\n products\n );\n\n /*\n // Old implementation - direct DB query:\n const [newStore] = await db\n .insert(storeInfo)\n .values({\n name,\n description,\n imageUrl: imageKey,\n owner,\n })\n .returning();\n\n // Assign selected products to this store\n if (products && products.length > 0) {\n await db\n .update(productInfo)\n .set({ storeId: newStore.id })\n .where(inArray(productInfo.id, products));\n }\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n store: newStore,\n message: \"Store created successfully\",\n };\n }),\n\n updateStore: protectedProcedure\n .input(z.object({\n id: z.number(),\n name: z.string().min(1, \"Name is required\"),\n description: z.string().optional(),\n imageUrl: z.string().optional(),\n owner: z.number().min(1, \"Owner is required\"),\n products: z.array(z.number()).optional(),\n }))\n .mutation(async ({ input, ctx }): Promise<{ store: Store; message: string }> => {\n const { id, name, description, imageUrl, owner, products } = input;\n\n const existingStore = await getStoreByIdFromDb(id);\n\n if (!existingStore) {\n throw new ApiError(\"Store not found\", 404);\n }\n\n const oldImageKey = existingStore.imageUrl;\n const newImageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : oldImageKey;\n\n // Delete old image only if:\n // 1. New image provided and keys are different, OR\n // 2. No new image but old exists (clearing the image)\n if (oldImageKey && (\n (newImageKey && newImageKey !== oldImageKey) ||\n (!newImageKey)\n )) {\n try {\n await deleteImageUtil({keys: [oldImageKey]});\n } catch (error) {\n console.error('Failed to delete old image:', error);\n // Continue with update even if deletion fails\n }\n }\n\n const updatedStore = await updateStoreInDb(\n id,\n {\n name,\n description,\n imageUrl: newImageKey,\n owner,\n },\n products\n );\n\n /*\n // Old implementation - direct DB query:\n const [updatedStore] = await db\n .update(storeInfo)\n .set({\n name,\n description,\n imageUrl: newImageKey,\n owner,\n })\n .where(eq(storeInfo.id, id))\n .returning();\n\n if (!updatedStore) {\n throw new ApiError(\"Store not found\", 404);\n }\n\n // Update products if provided\n if (products) {\n // First, set storeId to null for products not in the list but currently assigned to this store\n await db\n .update(productInfo)\n .set({ storeId: null })\n .where(eq(productInfo.storeId, id));\n\n // Then, assign the selected products to this store\n if (products.length > 0) {\n await db\n .update(productInfo)\n .set({ storeId: id })\n .where(inArray(productInfo.id, products));\n }\n }\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n store: updatedStore,\n message: \"Store updated successfully\",\n };\n }),\n\n deleteStore: protectedProcedure\n .input(z.object({\n storeId: z.number(),\n }))\n .mutation(async ({ input, ctx }): Promise<{ message: string }> => {\n const { storeId } = input;\n\n const result = await deleteStoreFromDb(storeId);\n\n /*\n // Old implementation - direct DB query with transaction:\n const result = await db.transaction(async (tx) => {\n // First, update all products of this store to set storeId to null\n await tx\n .update(productInfo)\n .set({ storeId: null })\n .where(eq(productInfo.storeId, storeId));\n\n // Then delete the store\n const [deletedStore] = await tx\n .delete(storeInfo)\n .where(eq(storeInfo.id, storeId))\n .returning();\n\n if (!deletedStore) {\n throw new ApiError(\"Store not found\", 404);\n }\n\n return {\n message: \"Store deleted successfully\",\n };\n });\n */\n\n // Reinitialize stores to reflect changes (outside transaction)\n scheduleStoreInitialization()\n\n return result;\n }),\n});\n", "import { router, protectedProcedure } from \"@/src/trpc/trpc-index\"\nimport { z } from \"zod\";\n\nconst initiateRefundSchema = z\n .object({\n orderId: z.number(),\n refundPercent: z.number().min(0).max(100).optional(),\n refundAmount: z.number().min(0).optional(),\n })\n .refine(\n (data) => {\n const hasPercent = data.refundPercent !== undefined;\n const hasAmount = data.refundAmount !== undefined;\n return (hasPercent && !hasAmount) || (!hasPercent && hasAmount);\n },\n {\n message:\n \"Provide either refundPercent or refundAmount, not both or neither\",\n }\n );\n\nexport const adminPaymentsRouter = router({\n initiateRefund: protectedProcedure\n .input(initiateRefundSchema)\n .mutation(async ({ input }) => {\n return {}\n }),\n});\n", "import { z } from 'zod';\nimport { protectedProcedure, router } from '@/src/trpc/trpc-index'\nimport { extractKeyFromPresignedUrl, generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error';\nimport { scheduleStoreInitialization } from '@/src/stores/store-initializer'\nimport {\n getBanners as getBannersFromDb,\n getBannerById as getBannerByIdFromDb,\n createBanner as createBannerInDb,\n updateBanner as updateBannerInDb,\n deleteBanner as deleteBannerFromDb,\n} from '@/src/dbService'\nimport type { Banner } from '@packages/shared'\n\n\nexport const bannerRouter = router({\n // Get all banners\n getBanners: protectedProcedure\n .query(async (): Promise<{ banners: Banner[] }> => {\n try {\n\n // Using dbService helper (new implementation)\n const banners = await getBannersFromDb();\n\n \n // Old implementation - direct DB query:\n // const banners = await db.query.homeBanners.findMany({\n // orderBy: desc(homeBanners.createdAt), // Order by creation date instead\n // Removed product relationship since we now use productIds array\n // });\n \n\n // Convert S3 keys to signed URLs for client\n const bannersWithSignedUrls = await Promise.all(\n banners.map(async (banner) => {\n try {\n return {\n ...banner,\n imageUrl: banner.imageUrl ? await generateSignedUrlFromS3Url(banner.imageUrl) : banner.imageUrl,\n // Ensure productIds is always an array\n productIds: banner.productIds || [],\n };\n } catch (error) {\n console.error(`Failed to generate signed URL for banner ${banner.id}:`, error);\n return {\n ...banner,\n imageUrl: banner.imageUrl, // Keep original on error\n // Ensure productIds is always an array\n productIds: banner.productIds || [],\n };\n }\n })\n );\n\n return {\n banners: bannersWithSignedUrls,\n };\n }\n catch(e:any) {\n console.log(e)\n \n throw new ApiError(e.message);\n }\n }),\n\n // Get single banner by ID\n getBanner: protectedProcedure\n .input(z.object({ id: z.number() }))\n .query(async ({ input }): Promise => {\n // Using dbService helper (new implementation)\n const banner = await getBannerByIdFromDb(input.id);\n \n /*\n // Old implementation - direct DB query:\n const banner = await db.query.homeBanners.findFirst({\n where: eq(homeBanners.id, input.id),\n // Removed product relationship since we now use productIds array\n });\n */\n\n if (banner) {\n try {\n // Convert S3 key to signed URL for client\n if (banner.imageUrl) {\n banner.imageUrl = await generateSignedUrlFromS3Url(banner.imageUrl);\n }\n } catch (error) {\n console.error(`Failed to generate signed URL for banner ${banner.id}:`, error);\n // Keep original imageUrl on error\n }\n\n // Ensure productIds is always an array (handle migration compatibility)\n if (!banner.productIds) {\n banner.productIds = [];\n }\n }\n\n return banner;\n }),\n\n // Create new banner\n createBanner: protectedProcedure\n .input(z.object({\n name: z.string().min(1),\n imageUrl: z.string().url(),\n description: z.string().optional(),\n productIds: z.array(z.number()).optional(),\n redirectUrl: z.string().url().optional(),\n // serialNum removed completely\n }))\n .mutation(async ({ input }): Promise => {\n try {\n // Using dbService helper (new implementation)\n const imageUrl = extractKeyFromPresignedUrl(input.imageUrl)\n const banner = await createBannerInDb({\n name: input.name,\n imageUrl: imageUrl,\n description: input.description ?? null,\n productIds: input.productIds || [],\n redirectUrl: input.redirectUrl ?? null,\n serialNum: 999, // Default value, not used\n isActive: false, // Default to inactive\n });\n\n /*\n // Old implementation - direct DB query:\n const imageUrl = extractKeyFromPresignedUrl(input.imageUrl)\n const [banner] = await db.insert(homeBanners).values({\n name: input.name,\n imageUrl: imageUrl,\n description: input.description,\n productIds: input.productIds || [],\n redirectUrl: input.redirectUrl,\n serialNum: 999, // Default value, not used\n isActive: false, // Default to inactive\n }).returning();\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return banner;\n } catch (error) {\n console.error('Error creating banner:', error);\n throw error; // Re-throw to maintain tRPC error handling\n }\n }),\n\n // Update banner\n updateBanner: protectedProcedure\n .input(z.object({\n id: z.number(),\n name: z.string().min(1).optional(),\n imageUrl: z.string().url().optional(),\n description: z.string().optional(),\n productIds: z.array(z.number()).optional(),\n redirectUrl: z.string().url().optional(),\n serialNum: z.number().nullable().optional(),\n isActive: z.boolean().optional(),\n }))\n .mutation(async ({ input }): Promise => {\n try {\n // Using dbService helper (new implementation)\n const { id, ...updateData } = input;\n\n // Extract S3 key from presigned URL if imageUrl is provided\n const processedData = {\n ...updateData,\n ...(updateData.imageUrl && {\n imageUrl: extractKeyFromPresignedUrl(updateData.imageUrl)\n }),\n };\n\n // Handle serialNum null case\n if ('serialNum' in processedData && processedData.serialNum === null) {\n processedData.serialNum = null;\n }\n\n const banner = await updateBannerInDb(id, processedData);\n\n /*\n // Old implementation - direct DB query:\n const { id, ...updateData } = input;\n const incomingProductIds = input.productIds;\n // Extract S3 key from presigned URL if imageUrl is provided\n const processedData = {\n ...updateData,\n ...(updateData.imageUrl && {\n imageUrl: extractKeyFromPresignedUrl(updateData.imageUrl)\n }),\n };\n\n // Handle serialNum null case\n const finalData: any = { ...processedData };\n if ('serialNum' in finalData && finalData.serialNum === null) {\n // Set to null explicitly\n finalData.serialNum = null;\n }\n\n const [banner] = await db.update(homeBanners)\n .set({ ...finalData, lastUpdated: new Date(), })\n .where(eq(homeBanners.id, id))\n .returning();\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return banner;\n } catch (error) {\n console.error('Error updating banner:', error);\n throw error;\n }\n }),\n\n // Delete banner\n deleteBanner: protectedProcedure\n .input(z.object({ id: z.number() }))\n .mutation(async ({ input }): Promise<{ success: true }> => {\n // Using dbService helper (new implementation)\n await deleteBannerFromDb(input.id);\n\n /*\n // Old implementation - direct DB query:\n await db.delete(homeBanners).where(eq(homeBanners.id, input.id));\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return { success: true };\n }),\n});\n", "import { protectedProcedure } from '@/src/trpc/trpc-index';\nimport { z } from 'zod';\nimport { ApiError } from '@/src/lib/api-error';\nimport { notificationQueue } from '@/src/lib/notif-job';\nimport { recomputeUserNegativityScore } from '@/src/stores/user-negativity-store';\nimport {\n createUserByMobile,\n getUserByMobile,\n getUnresolvedComplaintsCount,\n getAllUsersWithFilters,\n getOrderCountsByUserIds,\n getLastOrdersByUserIds,\n getSuspensionStatusesByUserIds,\n getUserBasicInfo,\n getUserSuspensionStatus,\n getUserOrders,\n getOrderStatusesByOrderIds,\n getItemCountsByOrderIds,\n upsertUserSuspension,\n searchUsers,\n getAllNotifCreds,\n getAllUnloggedTokens,\n getNotifTokensByUserIds,\n getUserIncidentsWithRelations,\n createUserIncident,\n} from '@/src/dbService';\n\nexport const userRouter = {\n createUserByMobile: protectedProcedure\n .input(z.object({\n mobile: z.string().min(1, 'Mobile number is required'),\n }))\n .mutation(async ({ input }) => {\n // Clean mobile number (remove non-digits)\n const cleanMobile = input.mobile.replace(/\\D/g, '');\n\n // Validate: exactly 10 digits\n if (cleanMobile.length !== 10) {\n throw new ApiError('Mobile number must be exactly 10 digits', 400);\n }\n\n // Check if user already exists\n const existingUser = await getUserByMobile(cleanMobile);\n\n if (existingUser) {\n throw new ApiError('User with this mobile number already exists', 409);\n }\n\n const newUser = await createUserByMobile(cleanMobile);\n\n return {\n success: true,\n data: newUser,\n };\n }),\n\n getEssentials: protectedProcedure\n .query(async () => {\n const count = await getUnresolvedComplaintsCount();\n \n return {\n unresolvedComplaints: count,\n };\n }),\n\n getAllUsers: protectedProcedure\n .input(z.object({\n limit: z.number().min(1).max(100).default(50),\n cursor: z.number().optional(),\n search: z.string().optional(),\n }))\n .query(async ({ input }) => {\n const { limit, cursor, search } = input;\n \n const { users: usersToReturn, hasMore } = await getAllUsersWithFilters(limit, cursor, search);\n\n // Get order stats for each user\n const userIds = usersToReturn.map((u: any) => u.id);\n \n const orderCounts = await getOrderCountsByUserIds(userIds);\n const lastOrders = await getLastOrdersByUserIds(userIds);\n const suspensionStatuses = await getSuspensionStatusesByUserIds(userIds);\n \n // Create lookup maps\n const orderCountMap = new Map(orderCounts.map(o => [o.userId, o.totalOrders]));\n const lastOrderMap = new Map(lastOrders.map(o => [o.userId, o.lastOrderDate]));\n const suspensionMap = new Map(suspensionStatuses.map(s => [s.userId, s.isSuspended]));\n\n // Combine data\n const usersWithStats = usersToReturn.map((user: any) => ({\n ...user,\n totalOrders: orderCountMap.get(user.id) || 0,\n lastOrderDate: lastOrderMap.get(user.id) || null,\n isSuspended: suspensionMap.get(user.id) ?? false,\n }));\n\n // Get next cursor\n const nextCursor = hasMore ? usersToReturn[usersToReturn.length - 1].id : undefined;\n\n return {\n users: usersWithStats,\n nextCursor,\n hasMore,\n };\n }),\n\n getUserDetails: protectedProcedure\n .input(z.object({\n userId: z.number(),\n }))\n .query(async ({ input }) => {\n const { userId } = input;\n\n // Get user info\n const user = await getUserBasicInfo(userId);\n\n if (!user) {\n throw new ApiError('User not found', 404);\n }\n\n // Get user suspension status\n const isSuspended = await getUserSuspensionStatus(userId);\n\n // Get all orders for this user\n const userOrders = await getUserOrders(userId);\n\n // Get order status for each order\n const orderIds = userOrders.map((o: any) => o.id);\n const orderStatuses = await getOrderStatusesByOrderIds(orderIds);\n\n // Get item counts for each order\n const itemCounts = await getItemCountsByOrderIds(orderIds);\n\n // Create lookup maps\n const statusMap = new Map(orderStatuses.map(s => [s.orderId, s]));\n const itemCountMap = new Map(itemCounts.map(c => [c.orderId, c.itemCount]));\n\n // Determine status string\n const getStatus = (status: { isDelivered: boolean; isCancelled: boolean } | undefined) => {\n if (!status) return 'pending';\n if (status.isCancelled) return 'cancelled';\n if (status.isDelivered) return 'delivered';\n return 'pending';\n };\n\n // Combine data\n const ordersWithDetails = userOrders.map((order: any) => {\n const status = statusMap.get(order.id);\n return {\n id: order.id,\n readableId: order.readableId,\n totalAmount: order.totalAmount,\n createdAt: order.createdAt,\n isFlashDelivery: order.isFlashDelivery,\n status: getStatus(status),\n itemCount: itemCountMap.get(order.id) || 0,\n };\n });\n\n return {\n user: {\n ...user,\n isSuspended,\n },\n orders: ordersWithDetails,\n };\n }),\n\n updateUserSuspension: protectedProcedure\n .input(z.object({\n userId: z.number(),\n isSuspended: z.boolean(),\n }))\n .mutation(async ({ input }) => {\n const { userId, isSuspended } = input;\n\n await upsertUserSuspension(userId, isSuspended);\n\n return {\n success: true,\n message: `User ${isSuspended ? 'suspended' : 'unsuspended'} successfully`,\n };\n }),\n\n getUsersForNotification: protectedProcedure\n .input(z.object({\n search: z.string().optional(),\n }))\n .query(async ({ input }) => {\n const { search } = input;\n\n const usersList = await searchUsers(search);\n\n // Get eligible users (have notif_creds entry)\n const eligibleUsers = await getAllNotifCreds();\n\n const eligibleSet = new Set(eligibleUsers.map(u => u.userId));\n\n return {\n users: usersList.map((user: any) => ({\n id: user.id,\n name: user.name,\n mobile: user.mobile,\n isEligibleForNotif: eligibleSet.has(user.id),\n })),\n };\n }),\n\n sendNotification: protectedProcedure\n .input(z.object({\n userIds: z.array(z.number()).default([]),\n title: z.string().min(1, 'Title is required'),\n text: z.string().min(1, 'Message is required'),\n imageUrl: z.string().optional(),\n }))\n .mutation(async ({ input }) => {\n const { userIds, title, text, imageUrl } = input;\n\n let tokens: string[] = [];\n\n if (userIds.length === 0) {\n // Send to all users - get tokens from both logged-in and unlogged users\n const loggedInTokens = await getAllNotifCreds();\n const unloggedTokens = await getAllUnloggedTokens();\n \n tokens = [\n ...loggedInTokens.map(t => t.token),\n ...unloggedTokens.map(t => t.token)\n ];\n } else {\n // Send to specific users - get their tokens\n const userTokens = await getNotifTokensByUserIds(userIds);\n tokens = userTokens.map(t => t.token);\n }\n\n // Queue one job per token\n let queuedCount = 0;\n for (const token of tokens) {\n try {\n await notificationQueue.add('send-admin-notification', {\n token,\n title,\n body: text,\n imageUrl: imageUrl || null,\n }, {\n attempts: 3,\n backoff: {\n type: 'exponential',\n delay: 2000,\n },\n });\n queuedCount++;\n } catch (error) {\n console.error(`Failed to queue notification for token:`, error);\n }\n }\n\n return {\n success: true,\n message: `Notification queued for ${queuedCount} users`,\n };\n }),\n\n getUserIncidents: protectedProcedure\n .input(z.object({\n userId: z.number(),\n }))\n .query(async ({ input }) => {\n const { userId } = input;\n\n const incidents = await getUserIncidentsWithRelations(userId);\n\n return {\n incidents: incidents.map((incident: any) => ({\n id: incident.id,\n userId: incident.userId,\n orderId: incident.orderId,\n dateAdded: incident.dateAdded,\n adminComment: incident.adminComment,\n addedBy: incident.addedBy?.name || 'Unknown',\n negativityScore: incident.negativityScore,\n orderStatus: incident.order?.orderStatus?.[0]?.isCancelled ? 'cancelled' : 'active',\n })),\n };\n }),\n\n addUserIncident: protectedProcedure\n .input(z.object({\n userId: z.number(),\n orderId: z.number().optional(),\n adminComment: z.string().optional(),\n negativityScore: z.number().optional(),\n }))\n .mutation(async ({ input, ctx }) => {\n const { userId, orderId, adminComment, negativityScore } = input;\n \n const adminUserId = ctx.staffUser?.id;\n \n if (!adminUserId) {\n throw new ApiError('Admin user not authenticated', 401);\n }\n\n const incident = await createUserIncident(\n userId,\n orderId,\n adminComment,\n adminUserId,\n negativityScore\n );\n\n recomputeUserNegativityScore(userId);\n\n return {\n success: true,\n data: incident,\n };\n }),\n};\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport { computeConstants } from '@/src/lib/const-store'\nimport { CONST_KEYS } from '@/src/lib/const-keys'\nimport { getAllConstants as getAllConstantsFromDb, upsertConstants as upsertConstantsInDb } from '@/src/dbService'\nimport type { Constant, ConstantUpdateResult } from '@packages/shared'\n\nexport const constRouter = router({\n getConstants: protectedProcedure\n .query(async (): Promise => {\n // Using dbService helper (new implementation)\n const constants = await getAllConstantsFromDb();\n\n /*\n // Old implementation - direct DB query:\n const constants = await db.select().from(keyValStore);\n\n const resp = constants.map(c => ({\n key: c.key,\n value: c.value,\n }));\n */\n \n return constants;\n }),\n\n updateConstants: protectedProcedure\n .input(z.object({\n constants: z.array(z.object({\n key: z.string(),\n value: z.any(),\n })),\n }))\n .mutation(async ({ input }): Promise => {\n const { constants } = input;\n\n const validKeys = Object.values(CONST_KEYS) as string[];\n const invalidKeys = constants\n .filter(c => !validKeys.includes(c.key))\n .map(c => c.key);\n\n if (invalidKeys.length > 0) {\n throw new Error(`Invalid constant keys: ${invalidKeys.join(', ')}`);\n }\n\n // Using dbService helper (new implementation)\n await upsertConstantsInDb(constants);\n\n /*\n // Old implementation - direct DB query:\n await db.transaction(async (tx) => {\n for (const { key, value } of constants) {\n await tx.insert(keyValStore)\n .values({ key, value })\n .onConflictDoUpdate({\n target: keyValStore.key,\n set: { value },\n });\n }\n });\n */\n\n // Refresh all constants in Redis after database update\n await computeConstants();\n\n return {\n success: true,\n updatedCount: constants.length,\n keys: constants.map(c => c.key),\n };\n }),\n});\n", "// import { router } from '@/src/trpc/trpc-index';\nimport { router } from '@/src/trpc/trpc-index'\nimport { complaintRouter } from '@/src/trpc/apis/admin-apis/apis/complaint'\nimport { couponRouter } from '@/src/trpc/apis/admin-apis/apis/coupon'\nimport { orderRouter } from '@/src/trpc/apis/admin-apis/apis/order'\nimport { vendorSnippetsRouter } from '@/src/trpc/apis/admin-apis/apis/vendor-snippets'\nimport { slotsRouter } from '@/src/trpc/apis/admin-apis/apis/slots'\nimport { productRouter } from '@/src/trpc/apis/admin-apis/apis/product'\nimport { staffUserRouter } from '@/src/trpc/apis/admin-apis/apis/staff-user'\nimport { storeRouter } from '@/src/trpc/apis/admin-apis/apis/store'\nimport { adminPaymentsRouter } from '@/src/trpc/apis/admin-apis/apis/payments'\nimport { bannerRouter } from '@/src/trpc/apis/admin-apis/apis/banner'\nimport { userRouter } from '@/src/trpc/apis/admin-apis/apis/user'\nimport { constRouter } from '@/src/trpc/apis/admin-apis/apis/const'\n\nexport const adminRouter = router({\n complaint: complaintRouter,\n coupon: couponRouter,\n order: orderRouter,\n vendorSnippets: vendorSnippetsRouter,\n slots: slotsRouter,\n product: productRouter,\n staffUser: staffUserRouter,\n store: storeRouter,\n payments: adminPaymentsRouter,\n banner: bannerRouter,\n user: userRouter,\n const: constRouter,\n});\n\nexport type AdminRouter = typeof adminRouter;\n", "import axios from 'axios';\n\nexport async function extractCoordsFromRedirectUrl(url: string): Promise<{ latitude: string; longitude: string } | null> {\n try {\n await axios.get(url, { maxRedirects: 0 });\n return null;\n } catch (error: any) {\n if (error.response?.status === 302 || error.response?.status === 301) {\n const redirectUrl = error.response.headers.location;\n const coordsMatch = redirectUrl.match(/!3d([-\\d.]+)!4d([-\\d.]+)/);\n if (coordsMatch) {\n return {\n latitude: coordsMatch[1],\n longitude: coordsMatch[2],\n };\n }\n }\n return null;\n }\n}\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { extractCoordsFromRedirectUrl } from '@/src/lib/license-util'\nimport {\n getUserDefaultAddress as getDefaultAddressInDb,\n getUserAddresses as getUserAddressesInDb,\n getUserAddressById as getUserAddressByIdInDb,\n clearUserDefaultAddress as clearDefaultAddressInDb,\n createUserAddress as createUserAddressInDb,\n updateUserAddress as updateUserAddressInDb,\n deleteUserAddress as deleteUserAddressInDb,\n hasOngoingOrdersForAddress as hasOngoingOrdersForAddressInDb,\n} from '@/src/dbService'\nimport type {\n UserAddressResponse,\n UserAddressesResponse,\n UserAddressDeleteResponse,\n} from '@packages/shared'\n\nexport const addressRouter = router({\n getDefaultAddress: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n const defaultAddress = await getDefaultAddressInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const [defaultAddress] = await db\n .select()\n .from(addresses)\n .where(and(eq(addresses.userId, userId), eq(addresses.isDefault, true)))\n .limit(1);\n */\n\n return { success: true, data: defaultAddress }\n }),\n\n getUserAddresses: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n const userAddresses = await getUserAddressesInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const userAddresses = await db.select().from(addresses).where(eq(addresses.userId, userId));\n */\n\n return { success: true, data: userAddresses }\n }),\n\n createAddress: protectedProcedure\n .input(z.object({\n name: z.string().min(1, 'Name is required'),\n phone: z.string().min(1, 'Phone is required'),\n addressLine1: z.string().min(1, 'Address line 1 is required'),\n addressLine2: z.string().optional(),\n city: z.string().min(1, 'City is required'),\n state: z.string().min(1, 'State is required'),\n pincode: z.string().min(1, 'Pincode is required'),\n isDefault: z.boolean().optional(),\n latitude: z.number().optional(),\n longitude: z.number().optional(),\n googleMapsUrl: z.string().optional(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { name, phone, addressLine1, addressLine2, city, state, pincode, isDefault, googleMapsUrl } = input;\n\n let { latitude, longitude } = input;\n\n if (googleMapsUrl && latitude === undefined && longitude === undefined) {\n const coords = await extractCoordsFromRedirectUrl(googleMapsUrl);\n if (coords) {\n latitude = Number(coords.latitude);\n longitude = Number(coords.longitude);\n }\n }\n\n // Validate required fields\n if (!name || !phone || !addressLine1 || !city || !state || !pincode) {\n throw new Error('Missing required fields');\n }\n\n // If setting as default, unset other defaults\n if (isDefault) {\n await clearDefaultAddressInDb(userId)\n }\n\n const newAddress = await createUserAddressInDb({\n userId,\n name,\n phone,\n addressLine1,\n addressLine2,\n city,\n state,\n pincode,\n isDefault: isDefault || false,\n latitude,\n longitude,\n googleMapsUrl,\n })\n\n /*\n // Old implementation - direct DB queries:\n if (isDefault) {\n await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId));\n }\n\n const [newAddress] = await db.insert(addresses).values({\n userId,\n name,\n phone,\n addressLine1,\n addressLine2,\n city,\n state,\n pincode,\n isDefault: isDefault || false,\n latitude,\n longitude,\n googleMapsUrl,\n }).returning();\n */\n\n return { success: true, data: newAddress }\n }),\n\n updateAddress: protectedProcedure\n .input(z.object({\n id: z.number().int().positive(),\n name: z.string().min(1, 'Name is required'),\n phone: z.string().min(1, 'Phone is required'),\n addressLine1: z.string().min(1, 'Address line 1 is required'),\n addressLine2: z.string().optional(),\n city: z.string().min(1, 'City is required'),\n state: z.string().min(1, 'State is required'),\n pincode: z.string().min(1, 'Pincode is required'),\n isDefault: z.boolean().optional(),\n latitude: z.number().optional(),\n longitude: z.number().optional(),\n googleMapsUrl: z.string().optional(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { id, name, phone, addressLine1, addressLine2, city, state, pincode, isDefault, googleMapsUrl } = input;\n\n let { latitude, longitude } = input;\n\n if (googleMapsUrl && latitude === undefined && longitude === undefined) {\n const coords = await extractCoordsFromRedirectUrl(googleMapsUrl);\n if (coords) {\n latitude = Number(coords.latitude);\n longitude = Number(coords.longitude);\n }\n }\n\n // Check if address exists and belongs to user\n const existingAddress = await getUserAddressByIdInDb(userId, id)\n if (!existingAddress) {\n throw new Error('Address not found')\n }\n\n // If setting as default, unset other defaults\n if (isDefault) {\n await clearDefaultAddressInDb(userId)\n }\n\n const updatedAddress = await updateUserAddressInDb({\n userId,\n addressId: id,\n name,\n phone,\n addressLine1,\n addressLine2,\n city,\n state,\n pincode,\n isDefault: isDefault || false,\n googleMapsUrl,\n latitude,\n longitude,\n })\n\n /*\n // Old implementation - direct DB queries:\n if (isDefault) {\n await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId));\n }\n\n const updateData: any = {\n name,\n phone,\n addressLine1,\n addressLine2,\n city,\n state,\n pincode,\n isDefault: isDefault || false,\n googleMapsUrl,\n };\n\n if (latitude !== undefined) {\n updateData.latitude = latitude;\n }\n if (longitude !== undefined) {\n updateData.longitude = longitude;\n }\n\n const [updatedAddress] = await db.update(addresses).set(updateData).where(and(eq(addresses.id, id), eq(addresses.userId, userId))).returning();\n */\n\n return { success: true, data: updatedAddress }\n }),\n\n deleteAddress: protectedProcedure\n .input(z.object({\n id: z.number().int().positive(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { id } = input;\n\n const existingAddress = await getUserAddressByIdInDb(userId, id)\n if (!existingAddress) {\n throw new Error('Address not found or does not belong to user')\n }\n\n const hasOngoingOrders = await hasOngoingOrdersForAddressInDb(id)\n if (hasOngoingOrders) {\n throw new Error('Address is attached to an ongoing order. Please cancel the order first.')\n }\n\n if (existingAddress.isDefault) {\n throw new Error('Cannot delete default address. Please set another address as default first.')\n }\n\n const deleted = await deleteUserAddressInDb(userId, id)\n\n /*\n // Old implementation - direct DB queries:\n const existingAddress = await db.select().from(addresses).where(and(eq(addresses.id, id), eq(addresses.userId, userId))).limit(1);\n if (existingAddress.length === 0) {\n throw new Error('Address not found or does not belong to user');\n }\n\n const ongoingOrders = await db.select({\n order: orders,\n status: orderStatus,\n slot: deliverySlotInfo\n })\n .from(orders)\n .innerJoin(orderStatus, eq(orders.id, orderStatus.orderId))\n .innerJoin(deliverySlotInfo, eq(orders.slotId, deliverySlotInfo.id))\n .where(and(\n eq(orders.addressId, id),\n eq(orderStatus.isCancelled, false),\n gte(deliverySlotInfo.deliveryTime, new Date())\n ))\n .limit(1);\n\n if (ongoingOrders.length > 0) {\n throw new Error('Address is attached to an ongoing order. Please cancel the order first.');\n }\n\n if (existingAddress[0].isDefault) {\n throw new Error('Cannot delete default address. Please set another address as default first.');\n }\n\n await db.delete(addresses).where(and(eq(addresses.id, id), eq(addresses.userId, userId)));\n */\n\n if (!deleted) {\n throw new Error('Address not found or does not belong to user')\n }\n\n return { success: true, message: 'Address deleted successfully' }\n }),\n});\n", "import { ApiError } from '@/src/lib/api-error'\nimport { otpSenderAuthToken } from '@/src/lib/env-exporter'\n\nconst otpStore = new Map();\n\nconst setOtpCreds = (phone: string, verificationId: string) => {\n otpStore.set(phone, verificationId);\n};\n\nexport function getOtpCreds(mobile: string) {\n const authKey = otpStore.get(mobile);\n\n return authKey || null;\n}\n\nexport const sendOtp = async (phone: string) => {\n if (!phone) {\n throw new ApiError(\"Phone number is required\", 400);\n }\n const reqUrl = `https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=${phone}&timeout=300`;\n const resp = await fetch(reqUrl, {\n headers: {\n authToken: otpSenderAuthToken,\n },\n method: \"POST\",\n });\n const data = await resp.json();\n\n if (data.message === \"SUCCESS\") {\n setOtpCreds(phone, data.data.verificationId);\n return { success: true, message: \"OTP sent successfully\", verificationId: data.data.verificationId };\n }\n if (data.message === \"REQUEST_ALREADY_EXISTS\") {\n return { success: true, message: \"OTP already sent. Last OTP is still valid\" };\n }\n\n throw new ApiError(\"Error while sending OTP. Please try again\", 500);\n};\n\nexport async function verifyOtpUtil(mobile: string, otp: string, verifId: string):Promise {\n const reqUrl = `https://cpaas.messagecentral.com/verification/v3/validateOtp?&verificationId=${verifId}&code=${otp}`;\n const resp = await fetch(reqUrl, {\n method: \"GET\",\n headers: {\n authToken: otpSenderAuthToken,\n },\n });\n\n const rawData = await resp.json();\n if (rawData.data?.verificationStatus === \"VERIFICATION_COMPLETED\") {\n // delete the verificationId from the local storage\n return true;\n }\n return false;\n}", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport bcrypt from 'bcryptjs'\nimport { SignJWT } from 'jose';\nimport { generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter'\nimport { sendOtp, verifyOtpUtil, getOtpCreds } from '@/src/lib/otp-utils'\nimport {\n getUserAuthByEmail as getUserAuthByEmailInDb,\n getUserAuthByMobile as getUserAuthByMobileInDb,\n getUserAuthById as getUserAuthByIdInDb,\n getUserAuthCreds as getUserAuthCredsInDb,\n getUserAuthDetails as getUserAuthDetailsInDb,\n createUserAuthWithMobile as createUserAuthWithMobileInDb,\n upsertUserAuthPassword as upsertUserAuthPasswordInDb,\n deleteUserAuthAccount as deleteUserAuthAccountInDb,\n createUserWithProfile as createUserWithProfileInDb,\n updateUserProfile as updateUserProfileInDb,\n getUserDetailsByUserId as getUserDetailsByUserIdInDb,\n} from '@/src/dbService'\nimport type {\n UserAuthResult,\n UserAuthResponse,\n UserOtpVerifyResponse,\n UserPasswordUpdateResponse,\n UserProfileResponse,\n UserDeleteAccountResponse,\n} from '@packages/shared'\n\ninterface LoginRequest {\n identifier: string;\n password: string;\n}\n\ninterface RegisterRequest {\n name: string;\n email: string;\n mobile: string;\n password: string;\n profileImageUrl?: string | null;\n}\n\nconst generateToken = async (userId: number): Promise => {\n return await new SignJWT({ userId })\n .setProtectedHeader({ alg: 'HS256' })\n .setExpirationTime('7d')\n .sign(getEncodedJwtSecret());\n};\n\n\n\nexport const authRouter = router({\n login: publicProcedure\n .input(z.object({\n identifier: z.string().min(1, 'Email/mobile is required'),\n password: z.string().min(1, 'Password is required'),\n }))\n .mutation(async ({ input }): Promise => {\n const { identifier, password }: LoginRequest = input;\n\n if (!identifier || !password) {\n throw new ApiError('Email/mobile and password are required', 400);\n }\n\n // Find user by email or mobile\n const user = await getUserAuthByEmailInDb(identifier.toLowerCase())\n let foundUser = user || null\n\n if (!foundUser) {\n // Try mobile if email didn't work\n const userByMobile = await getUserAuthByMobileInDb(identifier)\n foundUser = userByMobile || null\n }\n\n if (!foundUser) {\n throw new ApiError('Invalid credentials', 401);\n }\n\n // Get user credentials\n const userCredentials = await getUserAuthCredsInDb(foundUser.id)\n\n if (!userCredentials) {\n throw new ApiError('Account setup incomplete. Please contact support.', 401);\n }\n\n // Get user details for profile image\n const userDetail = await getUserAuthDetailsInDb(foundUser.id)\n\n // Generate signed URL for profile image if it exists\n const profileImageSignedUrl = userDetail?.profileImage\n ? await generateSignedUrlFromS3Url(userDetail.profileImage)\n : null;\n\n // Verify password\n const isPasswordValid = await bcrypt.compare(password, userCredentials.userPassword);\n if (!isPasswordValid) {\n throw new ApiError('Invalid credentials', 401);\n }\n\n const token = await generateToken(foundUser.id);\n\n const response: UserAuthResponse = {\n token,\n user: {\n id: foundUser.id,\n name: foundUser.name,\n email: foundUser.email,\n mobile: foundUser.mobile,\n createdAt: foundUser.createdAt.toISOString(),\n profileImage: profileImageSignedUrl,\n bio: userDetail?.bio || null,\n dateOfBirth: userDetail?.dateOfBirth\n ? new Date(userDetail.dateOfBirth as any).toISOString()\n : null,\n gender: userDetail?.gender || null,\n occupation: userDetail?.occupation || null,\n },\n };\n\n return {\n success: true,\n data: response,\n }\n }),\n\n register: publicProcedure\n .input(z.object({\n name: z.string().min(1, 'Name is required'),\n email: z.string().email('Invalid email format'),\n mobile: z.string().min(1, 'Mobile is required'),\n password: z.string().min(1, 'Password is required'),\n profileImageUrl: z.string().nullable().optional(),\n }))\n .mutation(async ({ input }): Promise => {\n const { name, email, mobile, password, profileImageUrl }: RegisterRequest = input;\n\n if (!name || !email || !mobile || !password) {\n throw new ApiError('All fields are required', 400);\n }\n\n // Validate email format\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!emailRegex.test(email)) {\n throw new ApiError('Invalid email format', 400);\n }\n\n // Validate mobile format (Indian mobile numbers)\n const cleanMobile = mobile.replace(/\\D/g, '');\n if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) {\n throw new ApiError('Invalid mobile number', 400);\n }\n\n // Check if email already exists\n const existingEmail = await getUserAuthByEmailInDb(email.toLowerCase())\n\n if (existingEmail) {\n throw new ApiError('Email already registered', 409);\n }\n\n // Check if mobile already exists\n const existingMobile = await getUserAuthByMobileInDb(cleanMobile)\n\n if (existingMobile) {\n throw new ApiError('Mobile number already registered', 409);\n }\n\n // Hash password\n const hashedPassword = await bcrypt.hash(password, 12);\n\n // Create user and credentials in a transaction\n const newUser = await createUserWithProfileInDb({\n name: name.trim(),\n email: email.toLowerCase().trim(),\n mobile: cleanMobile,\n hashedPassword,\n profileImage: profileImageUrl ?? null,\n })\n\n const token = await generateToken(newUser.id);\n\n const profileImageSignedUrl = profileImageUrl\n ? await generateSignedUrlFromS3Url(profileImageUrl)\n : null\n\n const response: UserAuthResponse = {\n token,\n user: {\n id: newUser.id,\n name: newUser.name,\n email: newUser.email,\n mobile: newUser.mobile,\n createdAt: newUser.createdAt.toISOString(),\n profileImage: profileImageSignedUrl,\n },\n };\n\n return {\n success: true,\n data: response,\n }\n }),\n\n sendOtp: publicProcedure\n .input(z.object({\n mobile: z.string(),\n }))\n .mutation(async ({ input }) => {\n \n return await sendOtp(input.mobile);\n }),\n\n verifyOtp: publicProcedure\n .input(z.object({\n mobile: z.string(),\n otp: z.string(),\n }))\n .mutation(async ({ input }): Promise => {\n const verificationId = getOtpCreds(input.mobile);\n if (!verificationId) {\n throw new ApiError(\"OTP not sent or expired\", 400);\n }\n const isVerified = await verifyOtpUtil(input.mobile, input.otp, verificationId);\n\n if (!isVerified) {\n throw new ApiError(\"Invalid OTP\", 400);\n }\n\n // Find user\n let user = await getUserAuthByMobileInDb(input.mobile)\n\n // If user doesn't exist, create one\n if (!user) {\n user = await createUserAuthWithMobileInDb(input.mobile)\n }\n\n // Generate JWT\n const token = await generateToken(user.id);\n\n return {\n success: true,\n token,\n user: {\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n createdAt: user.createdAt.toISOString(),\n profileImage: null,\n },\n }\n }),\n\n updatePassword: protectedProcedure\n .input(z.object({\n password: z.string().min(6, 'Password must be at least 6 characters'),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const hashedPassword = await bcrypt.hash(input.password, 10);\n\n // Insert if not exists, then update if exists\n await upsertUserAuthPasswordInDb(userId, hashedPassword)\n\n /*\n // Old implementation - direct DB queries:\n try {\n await db.insert(userCreds).values({\n userId: userId,\n userPassword: hashedPassword,\n });\n } catch (error: any) {\n if (error.code === '23505') {\n await db.update(userCreds).set({\n userPassword: hashedPassword,\n }).where(eq(userCreds.userId, userId));\n } else {\n throw error;\n }\n }\n */\n\n return { success: true, message: 'Password updated successfully' }\n }),\n\n updateProfile: protectedProcedure\n .input(z.object({\n name: z.string().min(1).optional(),\n email: z.string().email('Invalid email format').optional(),\n mobile: z.string().min(1).optional(),\n password: z.string().min(6, 'Password must be at least 6 characters').optional(),\n bio: z.string().optional().nullable(),\n dateOfBirth: z.string().optional().nullable(),\n gender: z.string().optional().nullable(),\n occupation: z.string().optional().nullable(),\n profileImageUrl: z.string().optional().nullable(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const { name, email, mobile, password, bio, dateOfBirth, gender, occupation, profileImageUrl } = input\n\n if (email) {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!emailRegex.test(email)) {\n throw new ApiError('Invalid email format', 400);\n }\n }\n\n if (mobile) {\n const cleanMobile = mobile.replace(/\\D/g, '');\n if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) {\n throw new ApiError('Invalid mobile number', 400);\n }\n }\n\n if (email) {\n const existingEmail = await getUserAuthByEmailInDb(email.toLowerCase())\n if (existingEmail && existingEmail.id !== userId) {\n throw new ApiError('Email already registered', 409)\n }\n }\n\n if (mobile) {\n const cleanMobile = mobile.replace(/\\D/g, '')\n const existingMobile = await getUserAuthByMobileInDb(cleanMobile)\n if (existingMobile && existingMobile.id !== userId) {\n throw new ApiError('Mobile number already registered', 409)\n }\n }\n\n let hashedPassword: string | undefined;\n if (password) {\n hashedPassword = await bcrypt.hash(password, 12)\n }\n\n const updatedUser = await updateUserProfileInDb(userId, {\n name: name?.trim(),\n email: email?.toLowerCase().trim(),\n mobile: mobile?.replace(/\\D/g, ''),\n hashedPassword,\n profileImage: profileImageUrl ?? undefined,\n bio: bio ?? undefined,\n dateOfBirth: dateOfBirth ? new Date(dateOfBirth) : undefined,\n gender: gender ?? undefined,\n occupation: occupation ?? undefined,\n })\n\n const userDetail = await getUserDetailsByUserIdInDb(userId)\n const profileImageSignedUrl = userDetail?.profileImage\n ? await generateSignedUrlFromS3Url(userDetail.profileImage)\n : null\n\n const authHeader = ctx.req.header('authorization');\n const token = authHeader?.replace('Bearer ', '') || ''\n\n const response: UserAuthResponse = {\n token,\n user: {\n id: updatedUser.id,\n name: updatedUser.name,\n email: updatedUser.email,\n mobile: updatedUser.mobile,\n createdAt: updatedUser.createdAt?.toISOString?.() || new Date().toISOString(),\n profileImage: profileImageSignedUrl,\n bio: userDetail?.bio || null,\n dateOfBirth: userDetail?.dateOfBirth\n ? new Date(userDetail.dateOfBirth as any).toISOString()\n : null,\n gender: userDetail?.gender || null,\n occupation: userDetail?.occupation || null,\n },\n }\n\n return {\n success: true,\n data: response,\n }\n }),\n\n getProfile: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const user = await getUserAuthByIdInDb(userId)\n\n if (!user) {\n throw new ApiError('User not found', 404);\n }\n\n return {\n success: true,\n data: {\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n },\n }\n }),\n\n deleteAccount: protectedProcedure\n .input(z.object({\n mobile: z.string().min(10, 'Mobile number is required'),\n }))\n .mutation(async ({ ctx, input }): Promise => {\n const userId = ctx.user.userId;\n const { mobile } = input;\n \n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n // Double-check: verify user exists and is the authenticated user\n const existingUser = await getUserAuthByIdInDb(userId)\n\n if (!existingUser) {\n throw new ApiError('User not found', 404);\n }\n\n // Additional verification: ensure we're not deleting someone else's data\n // The JWT token should already ensure this, but double-checking\n if (existingUser.id !== userId) {\n throw new ApiError('Unauthorized: Cannot delete another user\\'s account', 403);\n }\n\n // Verify mobile number matches user's registered mobile\n const cleanInputMobile = mobile.replace(/\\D/g, '');\n const cleanUserMobile = existingUser.mobile?.replace(/\\D/g, '');\n\n if (cleanInputMobile !== cleanUserMobile) {\n throw new ApiError('Mobile number does not match your registered number', 400);\n }\n\n // Use transaction for atomic deletion\n await deleteUserAuthAccountInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n await db.transaction(async (tx) => {\n await tx.delete(notifCreds).where(eq(notifCreds.userId, userId));\n await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.userId, userId));\n await tx.delete(couponUsage).where(eq(couponUsage.userId, userId));\n await tx.delete(complaints).where(eq(complaints.userId, userId));\n await tx.delete(cartItems).where(eq(cartItems.userId, userId));\n await tx.delete(notifications).where(eq(notifications.userId, userId));\n await tx.delete(productReviews).where(eq(productReviews.userId, userId));\n await tx.update(reservedCoupons)\n .set({ redeemedBy: null })\n .where(eq(reservedCoupons.redeemedBy, userId));\n\n const userOrders = await tx\n .select({ id: orders.id })\n .from(orders)\n .where(eq(orders.userId, userId));\n\n for (const order of userOrders) {\n await tx.delete(orderItems).where(eq(orderItems.orderId, order.id));\n await tx.delete(orderStatus).where(eq(orderStatus.orderId, order.id));\n await tx.delete(payments).where(eq(payments.orderId, order.id));\n await tx.delete(refunds).where(eq(refunds.orderId, order.id));\n await tx.delete(couponUsage).where(eq(couponUsage.orderId, order.id));\n await tx.delete(complaints).where(eq(complaints.orderId, order.id));\n }\n\n await tx.delete(orders).where(eq(orders.userId, userId));\n await tx.delete(addresses).where(eq(addresses.userId, userId));\n await tx.delete(userDetails).where(eq(userDetails.userId, userId));\n await tx.delete(userCreds).where(eq(userCreds.userId, userId));\n await tx.delete(users).where(eq(users.id, userId));\n });\n */\n\n return { success: true, message: 'Account deleted successfully' }\n }),\n});\n", "import { router, protectedProcedure, publicProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport { getMultipleProductsSlots } from '@/src/stores/slot-store'\nimport {\n getUserCartItemsWithProducts as getUserCartItemsWithProductsInDb,\n getUserProductById as getUserProductByIdInDb,\n getUserCartItemByUserProduct as getUserCartItemByUserProductInDb,\n incrementUserCartItemQuantity as incrementUserCartItemQuantityInDb,\n insertUserCartItem as insertUserCartItemInDb,\n updateUserCartItemQuantity as updateUserCartItemQuantityInDb,\n deleteUserCartItem as deleteUserCartItemInDb,\n clearUserCart as clearUserCartInDb,\n} from '@/src/dbService'\nimport type { UserCartResponse } from '@packages/shared'\n\nconst getCartData = async (userId: number): Promise => {\n const cartItemsWithProducts = await getUserCartItemsWithProductsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const cartItemsWithProducts = await db\n .select({\n cartId: cartItems.id,\n productId: productInfo.id,\n productName: productInfo.name,\n productPrice: productInfo.price,\n productImages: productInfo.images,\n productQuantity: productInfo.productQuantity,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n quantity: cartItems.quantity,\n addedAt: cartItems.addedAt,\n })\n .from(cartItems)\n .innerJoin(productInfo, eq(cartItems.productId, productInfo.id))\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(eq(cartItems.userId, userId));\n */\n\n const cartWithSignedUrls = cartItemsWithProducts.map((item) => ({\n ...item,\n product: {\n ...item.product,\n images: scaffoldAssetUrl(item.product.images || []),\n },\n }))\n\n const totalAmount = cartWithSignedUrls.reduce((sum, item) => sum + item.subtotal, 0)\n\n return {\n items: cartWithSignedUrls,\n totalItems: cartWithSignedUrls.length,\n totalAmount,\n }\n}\n\nexport const cartRouter = router({\n getCart: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n return await getCartData(userId);\n }),\n\n addToCart: protectedProcedure\n .input(z.object({\n productId: z.number().int().positive(),\n quantity: z.number().int().positive(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { productId, quantity } = input;\n\n // Validate input\n if (!productId || !quantity || quantity <= 0) {\n throw new ApiError(\"Product ID and positive quantity required\", 400);\n }\n\n // Check if product exists\n const product = await getUserProductByIdInDb(productId)\n\n if (!product) {\n throw new ApiError('Product not found', 404)\n }\n\n const existingItem = await getUserCartItemByUserProductInDb(userId, productId)\n\n if (existingItem) {\n await incrementUserCartItemQuantityInDb(existingItem.id, quantity)\n } else {\n await insertUserCartItemInDb(userId, productId, quantity)\n }\n\n /*\n // Old implementation - direct DB queries:\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n });\n\n if (!product) {\n throw new ApiError(\"Product not found\", 404);\n }\n\n const existingItem = await db.query.cartItems.findFirst({\n where: and(eq(cartItems.userId, userId), eq(cartItems.productId, productId)),\n });\n\n if (existingItem) {\n await db.update(cartItems)\n .set({\n quantity: sql`${cartItems.quantity} + ${quantity}`,\n })\n .where(eq(cartItems.id, existingItem.id));\n } else {\n await db.insert(cartItems).values({\n userId,\n productId,\n quantity: quantity.toString(),\n });\n }\n */\n\n // Return updated cart\n return await getCartData(userId)\n }),\n\n updateCartItem: protectedProcedure\n .input(z.object({\n itemId: z.number().int().positive(),\n quantity: z.number().int().min(0),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { itemId, quantity } = input;\n\n if (!quantity || quantity <= 0) {\n throw new ApiError(\"Positive quantity required\", 400);\n }\n\n const updated = await updateUserCartItemQuantityInDb(userId, itemId, quantity)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedItem] = await db.update(cartItems)\n .set({ quantity: quantity.toString() })\n .where(and(\n eq(cartItems.id, itemId),\n eq(cartItems.userId, userId)\n ))\n .returning();\n\n if (!updatedItem) {\n throw new ApiError(\"Cart item not found\", 404);\n }\n */\n\n if (!updated) {\n throw new ApiError('Cart item not found', 404)\n }\n\n // Return updated cart\n return await getCartData(userId)\n }),\n\n removeFromCart: protectedProcedure\n .input(z.object({\n itemId: z.number().int().positive(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { itemId } = input;\n\n const deleted = await deleteUserCartItemInDb(userId, itemId)\n\n /*\n // Old implementation - direct DB queries:\n const [deletedItem] = await db.delete(cartItems)\n .where(and(\n eq(cartItems.id, itemId),\n eq(cartItems.userId, userId)\n ))\n .returning();\n\n if (!deletedItem) {\n throw new ApiError(\"Cart item not found\", 404);\n }\n */\n\n if (!deleted) {\n throw new ApiError('Cart item not found', 404)\n }\n\n // Return updated cart\n return await getCartData(userId)\n }),\n\n clearCart: protectedProcedure\n .mutation(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n await clearUserCartInDb(userId)\n\n /*\n // Old implementation - direct DB query:\n await db.delete(cartItems).where(eq(cartItems.userId, userId));\n */\n\n return {\n items: [],\n totalItems: 0,\n totalAmount: 0,\n message: \"Cart cleared successfully\",\n }\n }),\n\n // Original DB-based getCartSlots (commented out)\n // getCartSlots: publicProcedure\n // .input(z.object({\n // productIds: z.array(z.number().int().positive())\n // }))\n // .query(async ({ input }) => {\n // const { productIds } = input;\n //\n // if (productIds.length === 0) {\n // return {};\n // }\n //\n // // Get slots for these products where freeze time is after current time\n // const slotsData = await db\n // .select({\n // productId: productSlots.productId,\n // slotId: deliverySlotInfo.id,\n // deliveryTime: deliverySlotInfo.deliveryTime,\n // freezeTime: deliverySlotInfo.freezeTime,\n // isActive: deliverySlotInfo.isActive,\n // })\n // .from(productSlots)\n // .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n // .where(and(\n // inArray(productSlots.productId, productIds),\n // gt(deliverySlotInfo.freezeTime, sql`NOW()`),\n // eq(deliverySlotInfo.isActive, true)\n // ));\n //\n // // Group by productId\n // const result: Record = {};\n // slotsData.forEach(slot => {\n // if (!result[slot.productId]) {\n // result[slot.productId] = [];\n // }\n // result[slot.productId].push({\n // id: slot.slotId,\n // deliveryTime: slot.deliveryTime,\n // freezeTime: slot.freezeTime,\n // });\n // });\n //\n // return result;\n // }),\n\n // Cache-based getCartSlots\n getCartSlots: publicProcedure\n .input(z.object({\n productIds: z.array(z.number().int().positive())\n }))\n .query(async ({ input }) => {\n const { productIds } = input;\n\n if (productIds.length === 0) {\n return {};\n }\n\n return await getMultipleProductsSlots(productIds);\n }),\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport {\n getUserComplaints as getUserComplaintsInDb,\n createUserComplaint as createUserComplaintInDb,\n} from '@/src/dbService'\nimport type { UserComplaintsResponse, UserRaiseComplaintResponse } from '@packages/shared'\n\nexport const complaintRouter = router({\n getAll: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n const userComplaints = await getUserComplaintsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const userComplaints = await db\n .select({\n id: complaints.id,\n complaintBody: complaints.complaintBody,\n response: complaints.response,\n isResolved: complaints.isResolved,\n createdAt: complaints.createdAt,\n orderId: complaints.orderId,\n })\n .from(complaints)\n .where(eq(complaints.userId, userId))\n .orderBy(complaints.createdAt);\n\n return {\n complaints: userComplaints.map(c => ({\n id: c.id,\n complaintBody: c.complaintBody,\n response: c.response,\n isResolved: c.isResolved,\n createdAt: c.createdAt,\n orderId: c.orderId,\n })),\n };\n */\n\n return {\n complaints: userComplaints,\n }\n }),\n\n raise: protectedProcedure\n .input(z.object({\n orderId: z.string().optional(),\n complaintBody: z.string().min(1, 'Complaint body is required'),\n imageUrls: z.array(z.string()).optional(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { orderId, complaintBody, imageUrls } = input;\n\n let orderIdNum: number | null = null;\n\n if (orderId) {\n const readableIdMatch = orderId.match(/^ORD(\\d+)$/);\n if (readableIdMatch) {\n orderIdNum = parseInt(readableIdMatch[1]);\n }\n }\n\n await createUserComplaintInDb(\n userId,\n orderIdNum,\n complaintBody.trim(),\n imageUrls && imageUrls.length > 0 ? imageUrls : null\n )\n\n /*\n // Old implementation - direct DB query:\n await db.insert(complaints).values({\n userId,\n orderId: orderIdNum,\n complaintBody: complaintBody.trim(),\n });\n */\n\n return { success: true, message: 'Complaint raised successfully' }\n }),\n});\n", "import { router, protectedProcedure } from \"@/src/trpc/trpc-index\";\nimport { z } from \"zod\";\nimport {\n applyDiscountToUserOrder,\n cancelUserOrderTransaction,\n checkUserSuspended,\n db,\n deleteUserCartItemsForOrder,\n getOrderProductById,\n getUserAddressByIdAndUser,\n getUserCouponUsageForOrder,\n getUserOrderBasic,\n getUserOrderByIdWithRelations,\n getUserOrderCount,\n getUserOrdersWithRelations,\n getUserProductIdsFromOrders,\n getUserProductsForRecentOrders,\n getUserRecentlyDeliveredOrderIds,\n getUserSlotCapacityStatus,\n orders,\n orderItems,\n orderStatus,\n placeUserOrderTransaction,\n recordUserCouponUsage,\n updateUserOrderNotes,\n validateAndGetUserCoupon,\n} from \"@/src/dbService\";\nimport { getNextDeliveryDate } from \"@/src/trpc/apis/common-apis/common\";\nimport { scaffoldAssetUrl } from \"@/src/lib/s3-client\";\nimport { ApiError } from \"@/src/lib/api-error\";\nimport {\n sendOrderPlacedNotification,\n sendOrderCancelledNotification,\n} from \"@/src/lib/notif-job\";\nimport { CONST_KEYS, getConstant, getConstants } from \"@/src/lib/const-store\";\nimport { publishFormattedOrder, publishCancellation } from \"@/src/lib/post-order-handler\";\nimport { getSlotById } from \"@/src/stores/slot-store\";\nimport type {\n UserOrdersResponse,\n UserOrderDetail,\n UserCancelOrderResponse,\n UserUpdateNotesResponse,\n UserRecentProductsResponse,\n} from \"@/src/dbService\";\n\nconst placeOrderUtil = async (params: {\n userId: number;\n selectedItems: Array<{\n productId: number;\n quantity: number;\n slotId: number | null;\n }>;\n addressId: number;\n paymentMethod: \"online\" | \"cod\";\n couponId?: number;\n userNotes?: string;\n isFlash?: boolean;\n}) => {\n const {\n userId,\n selectedItems,\n addressId,\n paymentMethod,\n couponId,\n userNotes,\n } = params;\n\n const constants = await getConstants([\n CONST_KEYS.minRegularOrderValue,\n CONST_KEYS.deliveryCharge,\n CONST_KEYS.flashFreeDeliveryThreshold,\n CONST_KEYS.flashDeliveryCharge,\n ]);\n\n const isFlashDelivery = params.isFlash;\n const minOrderValue = (isFlashDelivery ? constants[CONST_KEYS.flashFreeDeliveryThreshold] : constants[CONST_KEYS.minRegularOrderValue]) || 0;\n const deliveryCharge = (isFlashDelivery ? constants[CONST_KEYS.flashDeliveryCharge] : constants[CONST_KEYS.deliveryCharge]) || 0;\n\n const orderGroupId = `${Date.now()}-${userId}`;\n\n const address = await getUserAddressByIdAndUser(addressId, userId);\n if (!address) {\n throw new ApiError(\"Invalid address\", 400);\n }\n\n const ordersBySlot = new Map<\n number | null,\n Array<{\n productId: number;\n quantity: number;\n slotId: number | null;\n product: Awaited>;\n }>\n >();\n\n for (const item of selectedItems) {\n const product = await getOrderProductById(item.productId);\n if (!product) {\n throw new ApiError(`Product ${item.productId} not found`, 400);\n }\n\n if (!ordersBySlot.has(item.slotId)) {\n ordersBySlot.set(item.slotId, []);\n }\n ordersBySlot.get(item.slotId)!.push({ ...item, product });\n }\n\n if (params.isFlash) {\n for (const item of selectedItems) {\n const product = await getOrderProductById(item.productId);\n if (!product?.isFlashAvailable) {\n throw new ApiError(`Product ${item.productId} is not available for flash delivery`, 400);\n }\n }\n }\n\n let totalAmount = 0;\n for (const [slotId, items] of ordersBySlot) {\n const orderTotal = items.reduce(\n (sum, item) => {\n if (!item.product) return sum\n const basePrice = params.isFlash\n ? (item.product.flashPrice ?? item.product.price)\n : item.product.price\n const itemPrice = parseFloat((basePrice ?? 0).toString())\n return sum + itemPrice * item.quantity;\n },\n 0\n );\n totalAmount += orderTotal;\n }\n\n const appliedCoupon = await validateAndGetUserCoupon(couponId, userId, totalAmount);\n\n const expectedDeliveryCharge =\n totalAmount < minOrderValue ? deliveryCharge : 0;\n\n const totalWithDelivery = totalAmount + expectedDeliveryCharge;\n\n type OrderData = {\n order: Omit;\n orderItems: Omit[];\n orderStatus: Omit;\n };\n\n const ordersData: OrderData[] = [];\n let isFirstOrder = true;\n\n for (const [slotId, items] of ordersBySlot) {\n const subOrderTotal = items.reduce(\n (sum, item) => {\n if (!item.product) return sum\n const basePrice = params.isFlash\n ? (item.product.flashPrice ?? item.product.price)\n : item.product.price\n const itemPrice = parseFloat((basePrice ?? 0).toString())\n return sum + itemPrice * item.quantity;\n },\n 0\n );\n const subOrderTotalWithDelivery = subOrderTotal + expectedDeliveryCharge;\n\n const orderGroupProportion = subOrderTotal / totalAmount;\n const orderTotalAmount = isFirstOrder ? subOrderTotalWithDelivery : subOrderTotal;\n\n const { finalOrderTotal: finalOrderAmount } = applyDiscountToUserOrder(\n orderTotalAmount,\n appliedCoupon,\n orderGroupProportion\n );\n\n const order: Omit = {\n userId,\n addressId,\n slotId: params.isFlash ? null : slotId,\n isCod: paymentMethod === \"cod\",\n isOnlinePayment: paymentMethod === \"online\",\n paymentInfoId: null,\n totalAmount: finalOrderAmount.toString(),\n deliveryCharge: isFirstOrder ? expectedDeliveryCharge.toString() : \"0\",\n readableId: -1,\n userNotes: userNotes || null,\n orderGroupId,\n orderGroupProportion: orderGroupProportion.toString(),\n isFlashDelivery: params.isFlash,\n };\n\n const validItems = items.filter(\n (item): item is typeof item & { product: NonNullable } =>\n item.product !== null && item.product !== undefined\n )\n const orderItemsData: Omit[] = validItems.map(\n (item) => {\n const basePrice = params.isFlash\n ? (item.product.flashPrice ?? item.product.price)\n : item.product.price\n const priceString = (basePrice ?? 0).toString()\n\n return {\n orderId: 0,\n productId: item.productId,\n quantity: item.quantity.toString(),\n price: priceString,\n discountedPrice: priceString,\n }\n }\n );\n\n const orderStatusData: Omit = {\n userId,\n orderId: 0,\n paymentStatus: paymentMethod === \"cod\" ? \"cod\" : \"pending\",\n };\n\n ordersData.push({ order, orderItems: orderItemsData, orderStatus: orderStatusData });\n isFirstOrder = false;\n }\n\n const createdOrders = await placeUserOrderTransaction({\n userId,\n ordersData,\n paymentMethod,\n totalWithDelivery,\n });\n\n await deleteUserCartItemsForOrder(\n userId,\n selectedItems.map((item) => item.productId)\n );\n\n if (appliedCoupon && createdOrders.length > 0) {\n await recordUserCouponUsage(\n userId,\n appliedCoupon.id,\n createdOrders[0].id\n );\n }\n\n for (const order of createdOrders) {\n sendOrderPlacedNotification(userId, order.id.toString());\n }\n\n await publishFormattedOrder(createdOrders, ordersBySlot);\n\n return { success: true, data: createdOrders };\n};\n\nexport const orderRouter = router({\n placeOrder: protectedProcedure\n .input(\n z.object({\n selectedItems: z.array(\n z.object({\n productId: z.number().int().positive(),\n quantity: z.number().int().positive(),\n slotId: z.union([z.number().int(), z.null()]),\n })\n ),\n addressId: z.number().int().positive(),\n paymentMethod: z.enum([\"online\", \"cod\"]),\n couponId: z.number().int().positive().optional(),\n userNotes: z.string().optional(),\n isFlashDelivery: z.boolean().optional().default(false),\n })\n )\n .mutation(async ({ input, ctx }) => {\n const userId = ctx.user.userId;\n\n const isSuspended = await checkUserSuspended(userId);\n if (isSuspended) {\n throw new ApiError(\"Unable to place order\", 403);\n }\n\n const {\n selectedItems,\n addressId,\n paymentMethod,\n couponId,\n userNotes,\n isFlashDelivery,\n } = input;\n\n if (isFlashDelivery) {\n const isFlashDeliveryEnabled = await getConstant(CONST_KEYS.isFlashDeliveryEnabled);\n if (!isFlashDeliveryEnabled) {\n throw new ApiError(\"Flash delivery is currently unavailable. Please opt for scheduled delivery.\", 403);\n }\n }\n\n if (!isFlashDelivery) {\n const slotIds = [...new Set(selectedItems.filter(i => i.slotId !== null).map(i => i.slotId as number))];\n for (const slotId of slotIds) {\n const isCapacityFull = await getUserSlotCapacityStatus(slotId);\n if (isCapacityFull) {\n throw new ApiError(\"Selected delivery slot is at full capacity. Please choose another slot.\", 403);\n }\n }\n }\n\n let processedItems = selectedItems;\n\n if (isFlashDelivery) {\n processedItems = selectedItems.map(item => ({\n ...item,\n slotId: null as any,\n }));\n }\n\n return await placeOrderUtil({\n userId,\n selectedItems: processedItems,\n addressId,\n paymentMethod,\n couponId,\n userNotes,\n isFlash: isFlashDelivery,\n });\n }),\n\n getOrders: protectedProcedure\n .input(\n z\n .object({\n page: z.number().min(1).default(1),\n pageSize: z.number().min(1).max(50).default(10),\n })\n .optional()\n )\n .query(async ({ input, ctx }): Promise => {\n const { page = 1, pageSize = 10 } = input || {};\n const userId = ctx.user.userId;\n const offset = (page - 1) * pageSize;\n\n const totalCount = await getUserOrderCount(userId);\n const userOrders = await getUserOrdersWithRelations(userId, offset, pageSize);\n\n const mappedOrders = await Promise.all(\n userOrders.map(async (order) => {\n const status = order.orderStatus[0];\n const refund = order.refunds[0];\n\n type DeliveryStatus = \"cancelled\" | \"success\" | \"pending\" | \"packaged\";\n type OrderStatus = \"cancelled\" | \"success\";\n\n let deliveryStatus: DeliveryStatus;\n let orderStatus: OrderStatus;\n\n const allItemsPackaged = order.orderItems.every(\n (item) => item.is_packaged\n );\n\n if (status?.isCancelled) {\n deliveryStatus = \"cancelled\";\n orderStatus = \"cancelled\";\n } else if (status?.isDelivered) {\n deliveryStatus = \"success\";\n orderStatus = \"success\";\n } else if (allItemsPackaged) {\n deliveryStatus = \"packaged\";\n orderStatus = \"success\";\n } else {\n deliveryStatus = \"pending\";\n orderStatus = \"success\";\n }\n\n const paymentMode = order.isCod ? \"CoD\" : \"Online\";\n const paymentStatus = status?.paymentStatus || \"pending\";\n const refundStatus = refund?.refundStatus || \"none\";\n const refundAmount = refund?.refundAmount\n ? parseFloat(refund.refundAmount.toString())\n : null;\n\n const items = await Promise.all(\n order.orderItems.map(async (item) => {\n const signedImages = item.product.images\n ? scaffoldAssetUrl(\n item.product.images as string[]\n )\n : [];\n return {\n productName: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n discountedPrice: parseFloat(\n item.discountedPrice?.toString() || item.price.toString()\n ),\n amount:\n parseFloat(item.price.toString()) * parseFloat(item.quantity),\n image: signedImages[0] || null,\n };\n })\n );\n\n return {\n id: order.id,\n orderId: `ORD${order.id}`,\n orderDate: order.createdAt.toISOString(),\n deliveryStatus,\n deliveryDate: order.slot?.deliveryTime.toISOString(),\n orderStatus,\n cancelReason: status?.cancelReason || null,\n paymentMode,\n totalAmount: Number(order.totalAmount),\n deliveryCharge: Number(order.deliveryCharge),\n paymentStatus,\n refundStatus,\n refundAmount,\n userNotes: order.userNotes || null,\n items,\n isFlashDelivery: order.isFlashDelivery,\n createdAt: order.createdAt.toISOString(),\n };\n })\n );\n\n return {\n success: true,\n data: mappedOrders,\n pagination: {\n page,\n pageSize,\n totalCount,\n totalPages: Math.ceil(totalCount / pageSize),\n },\n };\n }),\n\n getOrderById: protectedProcedure\n .input(z.object({ orderId: z.string() }))\n .query(async ({ input, ctx }): Promise => {\n const { orderId } = input;\n const userId = ctx.user.userId;\n\n const order = await getUserOrderByIdWithRelations(parseInt(orderId), userId);\n\n if (!order) {\n throw new Error(\"Order not found\");\n }\n\n const couponUsageData = await getUserCouponUsageForOrder(order.id);\n\n let couponData = null;\n if (couponUsageData.length > 0) {\n let totalDiscountAmount = 0;\n const orderTotal = parseFloat(order.totalAmount.toString());\n\n for (const usage of couponUsageData) {\n let discountAmount = 0;\n\n if (usage.coupon.discountPercent) {\n discountAmount =\n (orderTotal *\n parseFloat(usage.coupon.discountPercent.toString())) /\n 100;\n } else if (usage.coupon.flatDiscount) {\n discountAmount = parseFloat(usage.coupon.flatDiscount.toString());\n }\n\n if (\n usage.coupon.maxValue &&\n discountAmount > parseFloat(usage.coupon.maxValue.toString())\n ) {\n discountAmount = parseFloat(usage.coupon.maxValue.toString());\n }\n\n totalDiscountAmount += discountAmount;\n }\n\n couponData = {\n couponCode: couponUsageData\n .map((u) => u.coupon.couponCode)\n .join(\", \"),\n couponDescription: `${couponUsageData.length} coupons applied`,\n discountAmount: totalDiscountAmount,\n };\n }\n\n const status = order.orderStatus[0];\n const refund = order.refunds[0];\n\n type DeliveryStatus = \"cancelled\" | \"success\" | \"pending\" | \"packaged\";\n type OrderStatus = \"cancelled\" | \"success\";\n\n let deliveryStatus: DeliveryStatus;\n let orderStatusResult: OrderStatus;\n\n const allItemsPackaged = order.orderItems.every(\n (item) => item.is_packaged\n );\n\n if (status?.isCancelled) {\n deliveryStatus = \"cancelled\";\n orderStatusResult = \"cancelled\";\n } else if (status?.isDelivered) {\n deliveryStatus = \"success\";\n orderStatusResult = \"success\";\n } else if (allItemsPackaged) {\n deliveryStatus = \"packaged\";\n orderStatusResult = \"success\";\n } else {\n deliveryStatus = \"pending\";\n orderStatusResult = \"success\";\n }\n\n const paymentMode = order.isCod ? \"CoD\" : \"Online\";\n const paymentStatus = status?.paymentStatus || \"pending\";\n const refundStatus = refund?.refundStatus || \"none\";\n const refundAmount = refund?.refundAmount\n ? parseFloat(refund.refundAmount.toString())\n : null;\n\n const items = await Promise.all(\n order.orderItems.map(async (item) => {\n const signedImages = item.product.images\n ? scaffoldAssetUrl(\n item.product.images as string[]\n )\n : [];\n return {\n productName: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n discountedPrice: parseFloat(\n item.discountedPrice?.toString() || item.price.toString()\n ),\n amount:\n parseFloat(item.price.toString()) * parseFloat(item.quantity),\n image: signedImages[0] || null,\n };\n })\n );\n\n return {\n id: order.id,\n orderId: `ORD${order.id}`,\n orderDate: order.createdAt.toISOString(),\n deliveryStatus,\n deliveryDate: order.slot?.deliveryTime.toISOString(),\n orderStatus: orderStatusResult,\n cancellationStatus: orderStatusResult,\n cancelReason: status?.cancelReason || null,\n paymentMode,\n paymentStatus,\n refundStatus,\n refundAmount,\n userNotes: order.userNotes || null,\n items,\n couponCode: couponData?.couponCode || null,\n couponDescription: couponData?.couponDescription || null,\n discountAmount: couponData?.discountAmount || null,\n orderAmount: parseFloat(order.totalAmount.toString()),\n isFlashDelivery: order.isFlashDelivery,\n createdAt: order.createdAt.toISOString(),\n totalAmount: parseFloat(order.totalAmount.toString()),\n deliveryCharge: parseFloat(order.deliveryCharge.toString()),\n };\n }),\n\n cancelOrder: protectedProcedure\n .input(\n z.object({\n id: z.number(),\n reason: z.string().min(1, \"Cancellation reason is required\"),\n })\n )\n .mutation(async ({ input, ctx }): Promise => {\n try {\n const userId = ctx.user.userId;\n const { id, reason } = input;\n\n const order = await getUserOrderBasic(id);\n\n if (!order) {\n console.error(\"Order not found:\", id);\n throw new ApiError(\"Order not found\", 404);\n }\n\n if (order.userId !== userId) {\n console.error(\"Order does not belong to user:\", {\n orderId: id,\n orderUserId: order.userId,\n requestUserId: userId,\n });\n\n throw new ApiError(\"Order not found\", 404);\n }\n\n const status = order.orderStatus[0];\n if (!status) {\n console.error(\"Order status not found for order:\", id);\n throw new ApiError(\"Order status not found\", 400);\n }\n\n if (status.isCancelled) {\n console.error(\"Order is already cancelled:\", id);\n throw new ApiError(\"Order is already cancelled\", 400);\n }\n\n if (status.isDelivered) {\n console.error(\"Cannot cancel delivered order:\", id);\n throw new ApiError(\"Cannot cancel delivered order\", 400);\n }\n\n await cancelUserOrderTransaction(id, status.id, reason, order.isCod);\n\n await sendOrderCancelledNotification(userId, id.toString());\n\n await publishCancellation(id, 'user', reason);\n\n return { success: true, message: \"Order cancelled successfully\" };\n } catch (e) {\n console.log(e);\n throw new ApiError(\"failed to cancel order\");\n }\n }),\n\n updateUserNotes: protectedProcedure\n .input(\n z.object({\n id: z.number(),\n userNotes: z.string(),\n })\n )\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { id, userNotes } = input;\n\n const order = await getUserOrderBasic(id);\n\n if (!order) {\n console.error(\"Order not found:\", id);\n throw new ApiError(\"Order not found\", 404);\n }\n\n if (order.userId !== userId) {\n console.error(\"Order does not belong to user:\", {\n orderId: id,\n orderUserId: order.userId,\n requestUserId: userId,\n });\n throw new ApiError(\"Order not found\", 404);\n }\n\n const status = order.orderStatus[0];\n if (!status) {\n console.error(\"Order status not found for order:\", id);\n throw new ApiError(\"Order status not found\", 400);\n }\n\n if (status.isDelivered) {\n console.error(\"Cannot update notes for delivered order:\", id);\n throw new ApiError(\"Cannot update notes for delivered order\", 400);\n }\n\n if (status.isCancelled) {\n console.error(\"Cannot update notes for cancelled order:\", id);\n throw new ApiError(\"Cannot update notes for cancelled order\", 400);\n }\n\n await updateUserOrderNotes(id, userNotes);\n\n return { success: true, message: \"Notes updated successfully\" };\n }),\n\n getRecentlyOrderedProducts: protectedProcedure\n .input(\n z\n .object({\n limit: z.number().min(1).max(50).default(20),\n })\n .optional()\n )\n .query(async ({ input, ctx }): Promise => {\n const { limit = 20 } = input || {};\n const userId = ctx.user.userId;\n\n const thirtyDaysAgo = new Date();\n thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30);\n\n const recentOrderIds = await getUserRecentlyDeliveredOrderIds(userId, 10, thirtyDaysAgo);\n\n if (recentOrderIds.length === 0) {\n return { success: true, products: [] };\n }\n\n const productIds = await getUserProductIdsFromOrders(recentOrderIds);\n\n if (productIds.length === 0) {\n return { success: true, products: [] };\n }\n\n const productsWithUnits = await getUserProductsForRecentOrders(productIds, limit);\n\n const formattedProducts = await Promise.all(\n productsWithUnits.map(async (product) => {\n const nextDeliveryDate = await getNextDeliveryDate(product.id);\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n unit: product.unitShortNotation,\n incrementStep: product.incrementStep,\n isOutOfStock: product.isOutOfStock,\n nextDeliveryDate: nextDeliveryDate\n ? nextDeliveryDate.toISOString()\n : null,\n images: scaffoldAssetUrl(\n (product.images as string[]) || []\n ),\n };\n })\n );\n\n return {\n success: true,\n products: formattedProducts,\n };\n }),\n});\n", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { claimUploadUrl, extractKeyFromPresignedUrl, scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getProductById as getProductByIdFromCache, getAllProducts as getAllProductsFromCache } from '@/src/stores/product-store'\nimport dayjs from 'dayjs'\nimport {\n getUserProductDetailById as getUserProductDetailByIdInDb,\n getUserProductReviews as getUserProductReviewsInDb,\n getUserProductByIdBasic as getUserProductByIdBasicInDb,\n createUserProductReview as createUserProductReviewInDb,\n} from '@/src/dbService'\nimport type {\n UserProductDetail,\n UserProductDetailData,\n UserProductReviewsResponse,\n UserCreateReviewResponse,\n UserProductReviewWithSignedUrls,\n} from '@packages/shared'\n\nconst signProductImages = (product: UserProductDetailData): UserProductDetail => ({\n ...product,\n images: scaffoldAssetUrl(product.images || []),\n})\n\nexport const productRouter = router({\n getProductDetails: publicProcedure\n .input(z.object({\n id: z.string().regex(/^\\d+$/, 'Invalid product ID'),\n }))\n .query(async ({ input }): Promise => {\n const { id } = input;\n const productId = parseInt(id);\n\n if (isNaN(productId)) {\n throw new Error('Invalid product ID');\n }\n\n console.log('from the api to get product details')\n\n// First, try to get the product from Redis cache\n const cachedProduct = await getProductByIdFromCache(productId);\n \n if (cachedProduct) {\n // Filter delivery slots to only include those with future freeze times and not at full capacity\n const currentTime = new Date();\n const filteredSlots = cachedProduct.deliverySlots.filter(slot => \n dayjs(slot.freezeTime).isAfter(currentTime) && !slot.isCapacityFull\n );\n \n return {\n ...cachedProduct,\n deliverySlots: filteredSlots\n };\n }\n\n // If not in cache, fetch from database (fallback)\n const productData = await getUserProductDetailByIdInDb(productId)\n\n /*\n // Old implementation - direct DB queries:\n const productData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n longDescription: productInfo.longDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n storeId: productInfo.storeId,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n productQuantity: productInfo.productQuantity,\n isFlashAvailable: productInfo.isFlashAvailable,\n flashPrice: productInfo.flashPrice,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(eq(productInfo.id, productId))\n .limit(1);\n */\n\n if (!productData) {\n throw new Error('Product not found')\n }\n\n return signProductImages(productData)\n }),\n\n getProductReviews: publicProcedure\n .input(z.object({\n productId: z.number().int().positive(),\n limit: z.number().int().min(1).max(50).optional().default(10),\n offset: z.number().int().min(0).optional().default(0),\n }))\n .query(async ({ input }): Promise => {\n const { productId, limit, offset } = input;\n\n const { reviews, totalCount } = await getUserProductReviewsInDb(productId, limit, offset)\n\n /*\n // Old implementation - direct DB queries:\n const reviews = await db\n .select({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n userName: users.name,\n })\n .from(productReviews)\n .innerJoin(users, eq(productReviews.userId, users.id))\n .where(eq(productReviews.productId, productId))\n .orderBy(desc(productReviews.reviewTime))\n .limit(limit)\n .offset(offset);\n\n const totalCountResult = await db\n .select({ count: sql`count(*)` })\n .from(productReviews)\n .where(eq(productReviews.productId, productId));\n\n const totalCount = Number(totalCountResult[0].count);\n const hasMore = offset + limit < totalCount;\n */\n\n const reviewsWithSignedUrls: UserProductReviewWithSignedUrls[] = reviews.map((review) => ({\n ...review,\n signedImageUrls: scaffoldAssetUrl(review.imageUrls || []),\n }))\n\n const hasMore = offset + limit < totalCount\n\n return { reviews: reviewsWithSignedUrls, hasMore }\n }),\n\n createReview: protectedProcedure\n .input(z.object({\n productId: z.number().int().positive(),\n reviewBody: z.string().min(1, 'Review body is required'),\n ratings: z.number().int().min(1).max(5),\n imageUrls: z.array(z.string()).optional().default([]),\n uploadUrls: z.array(z.string()).optional().default([]),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const { productId, reviewBody, ratings, imageUrls, uploadUrls } = input;\n const userId = ctx.user.userId;\n\n const product = await getUserProductByIdBasicInDb(productId)\n if (!product) {\n throw new ApiError('Product not found', 404)\n }\n\n const imageKeys = uploadUrls.map(item => extractKeyFromPresignedUrl(item))\n const newReview = await createUserProductReviewInDb(userId, productId, reviewBody, ratings, imageKeys)\n\n /*\n // Old implementation - direct DB queries:\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n });\n if (!product) {\n throw new ApiError('Product not found', 404);\n }\n\n const [newReview] = await db.insert(productReviews).values({\n userId,\n productId,\n reviewBody,\n ratings,\n imageUrls: uploadUrls.map(item => extractKeyFromPresignedUrl(item)),\n }).returning();\n */\n\n // Claim upload URLs\n if (uploadUrls && uploadUrls.length > 0) {\n try {\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)));\n } catch (error) {\n console.error('Error claiming upload URLs:', error);\n // Don't fail the review creation\n }\n }\n\n return { success: true, review: newReview }\n }),\n\n \n getAllProductsSummary: publicProcedure\n .query(async (): Promise => {\n // Get all products from cache\n const allCachedProducts = await getAllProductsFromCache();\n\n // Transform the cached products to match the expected summary format\n // (with empty deliverySlots and specialDeals arrays for summary view)\n const transformedProducts: UserProductDetail[] = allCachedProducts.map(product => ({\n ...product,\n images: product.images || [],\n deliverySlots: [],\n specialDeals: [],\n }))\n\n return transformedProducts\n }),\n\n});\n", "import { router, protectedProcedure, publicProcedure } from '@/src/trpc/trpc-index'\nimport { SignJWT } from 'jose'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter'\nimport { generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport {\n getUserProfileById as getUserProfileByIdInDb,\n getUserProfileDetailById as getUserProfileDetailByIdInDb,\n getUserWithCreds as getUserWithCredsInDb,\n upsertUserNotifCred as upsertUserNotifCredInDb,\n deleteUserUnloggedToken as deleteUserUnloggedTokenInDb,\n getUserUnloggedToken as getUserUnloggedTokenInDb,\n upsertUserUnloggedToken as upsertUserUnloggedTokenInDb,\n} from '@/src/dbService'\nimport type {\n UserSelfDataResponse,\n UserProfileCompleteResponse,\n UserSavePushTokenResponse,\n} from '@packages/shared'\n\nconst generateToken = async (userId: number): Promise => {\n return await new SignJWT({ userId })\n .setProtectedHeader({ alg: 'HS256' })\n .setExpirationTime('7d')\n .sign(getEncodedJwtSecret());\n};\n\nexport const userRouter = router({\n getSelfData: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const user = await getUserProfileByIdInDb(userId)\n\n if (!user) {\n throw new ApiError('User not found', 404);\n }\n\n // Get user details for profile image\n const userDetail = await getUserProfileDetailByIdInDb(userId)\n\n // Generate signed URL for profile image if it exists\n const profileImageSignedUrl = userDetail?.profileImage\n ? await generateSignedUrlFromS3Url(userDetail.profileImage)\n : null;\n\n return {\n success: true,\n data: {\n user: {\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n profileImage: profileImageSignedUrl,\n bio: userDetail?.bio || null,\n dateOfBirth: userDetail?.dateOfBirth\n ? new Date(userDetail.dateOfBirth as any).toISOString()\n : null,\n gender: userDetail?.gender || null,\n occupation: userDetail?.occupation || null,\n },\n },\n }\n }),\n\n checkProfileComplete: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const result = await getUserWithCredsInDb(userId)\n\n if (!result) {\n throw new ApiError('User not found', 404)\n }\n\n return {\n isComplete: !!(result.user.name && result.user.email && result.creds),\n };\n }),\n\n savePushToken: publicProcedure\n .input(z.object({ token: z.string() }))\n .mutation(async ({ input, ctx }): Promise => {\n const { token } = input;\n const userId = ctx.user?.userId;\n\n if (userId) {\n // AUTHENTICATED USER\n // Check if token exists in notif_creds for this user\n await upsertUserNotifCredInDb(userId, token)\n await deleteUserUnloggedTokenInDb(token)\n\n } else {\n // UNAUTHENTICATED USER\n // Save/update in unlogged_user_tokens\n const existing = await getUserUnloggedTokenInDb(token)\n if (existing) {\n await upsertUserUnloggedTokenInDb(token)\n } else {\n await upsertUserUnloggedTokenInDb(token)\n }\n }\n\n return { success: true }\n }),\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport {\n getUserActiveCouponsWithRelations as getUserActiveCouponsWithRelationsInDb,\n getUserAllCouponsWithRelations as getUserAllCouponsWithRelationsInDb,\n getUserReservedCouponByCode as getUserReservedCouponByCodeInDb,\n redeemUserReservedCoupon as redeemUserReservedCouponInDb,\n} from '@/src/dbService'\nimport type {\n UserCouponDisplay,\n UserEligibleCouponsResponse,\n UserMyCouponsResponse,\n UserRedeemCouponResponse,\n} from '@packages/shared'\n\nconst generateCouponDescription = (coupon: { discountPercent?: string | null; flatDiscount?: string | null; minOrder?: string | null; maxValue?: string | null }): string => {\n let desc = '';\n\n if (coupon.discountPercent) {\n desc += `${coupon.discountPercent}% off`;\n } else if (coupon.flatDiscount) {\n desc += `\u20B9${coupon.flatDiscount} off`;\n }\n\n if (coupon.minOrder) {\n desc += ` on orders above \u20B9${coupon.minOrder}`;\n }\n\n if (coupon.maxValue) {\n desc += ` (max discount \u20B9${coupon.maxValue})`;\n }\n\n return desc;\n};\n\nexport const userCouponRouter = router({\n getEligible: protectedProcedure\n .query(async ({ ctx }): Promise => {\n try {\n\n const userId = ctx.user.userId;\n \n const allCoupons = await getUserActiveCouponsWithRelationsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const allCoupons = await db.query.coupons.findMany({\n where: and(\n eq(coupons.isInvalidated, false),\n or(\n isNull(coupons.validTill),\n gt(coupons.validTill, new Date())\n )\n ),\n with: {\n usages: {\n where: eq(couponUsage.userId, userId)\n },\n applicableUsers: {\n with: {\n user: true\n }\n },\n applicableProducts: {\n with: {\n product: true\n }\n },\n }\n });\n */\n\n // Filter to only coupons applicable to current user\n const applicableCoupons = allCoupons.filter(coupon => {\n if(!coupon.isUserBased) return true;\n const applicableUsers = coupon.applicableUsers || [];\n return applicableUsers.some(au => au.userId === userId);\n });\n\n return { success: true, data: applicableCoupons };\n }\n catch(e) {\n console.log(e)\n throw new ApiError(\"Unable to get coupons\")\n }\n }),\n\n getProductCoupons: protectedProcedure\n .input(z.object({ productId: z.number().int().positive() }))\n .query(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { productId } = input;\n\n // Get all active, non-expired coupons\n const allCoupons = await getUserActiveCouponsWithRelationsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const allCoupons = await db.query.coupons.findMany({\n where: and(\n eq(coupons.isInvalidated, false),\n or(\n isNull(coupons.validTill),\n gt(coupons.validTill, new Date())\n )\n ),\n with: {\n usages: {\n where: eq(couponUsage.userId, userId)\n },\n applicableUsers: {\n with: {\n user: true\n }\n },\n applicableProducts: {\n with: {\n product: true\n }\n },\n }\n });\n */\n\n // Filter to only coupons applicable to current user and product\n const applicableCoupons = allCoupons.filter(coupon => {\n const applicableUsers = coupon.applicableUsers || [];\n const userApplicable = !coupon.isUserBased || applicableUsers.some(au => au.userId === userId);\n\n const applicableProducts = coupon.applicableProducts || [];\n const productApplicable = applicableProducts.length === 0 || applicableProducts.some(ap => ap.productId === productId);\n\n return userApplicable && productApplicable;\n });\n\n return { success: true, data: applicableCoupons };\n }),\n\n getMyCoupons: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n const allCoupons = await getUserAllCouponsWithRelationsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const allCoupons = await db.query.coupons.findMany({\n with: {\n usages: {\n where: eq(couponUsage.userId, userId)\n },\n applicableUsers: {\n with: {\n user: true\n }\n }\n }\n });\n */\n\n // Filter coupons in JS: not invalidated, applicable to user, and not expired\n const applicableCoupons = allCoupons.filter(coupon => {\n const isNotInvalidated = !coupon.isInvalidated;\n const applicableUsers = coupon.applicableUsers || [];\n const isApplicable = coupon.isApplyForAll || applicableUsers.some(au => au.userId === userId);\n const isNotExpired = !coupon.validTill || new Date(coupon.validTill) > new Date();\n return isNotInvalidated && isApplicable && isNotExpired;\n });\n\n // Categorize coupons\n const personalCoupons: UserCouponDisplay[] = [];\n const generalCoupons: UserCouponDisplay[] = [];\n\n applicableCoupons.forEach(coupon => {\n const usageCount = coupon.usages.length;\n const isExpired = false; // Already filtered out expired coupons\n const isUsedUp = Boolean(coupon.maxLimitForUser && usageCount >= coupon.maxLimitForUser);\n\n const couponDisplay: UserCouponDisplay = {\n id: coupon.id,\n code: coupon.couponCode,\n discountType: coupon.discountPercent ? 'percentage' : 'flat',\n discountValue: parseFloat(coupon.discountPercent || coupon.flatDiscount || '0'),\n maxValue: coupon.maxValue ? parseFloat(coupon.maxValue) : undefined,\n minOrder: coupon.minOrder ? parseFloat(coupon.minOrder) : undefined,\n description: generateCouponDescription(coupon),\n validTill: coupon.validTill ? new Date(coupon.validTill) : undefined,\n usageCount,\n maxLimitForUser: coupon.maxLimitForUser ? parseInt(coupon.maxLimitForUser.toString()) : undefined,\n isExpired,\n isUsedUp,\n };\n\n if ((coupon.applicableUsers || []).some(au => au.userId === userId) && !coupon.isApplyForAll) {\n // Personal coupon\n personalCoupons.push(couponDisplay);\n } else if (coupon.isApplyForAll) {\n // General coupon\n generalCoupons.push(couponDisplay);\n }\n });\n\n return {\n success: true,\n data: {\n personal: personalCoupons,\n general: generalCoupons,\n }\n };\n }),\n\n redeemReservedCoupon: protectedProcedure\n .input(z.object({ secretCode: z.string() }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { secretCode } = input;\n\n const reservedCoupon = await getUserReservedCouponByCodeInDb(secretCode)\n\n /*\n // Old implementation - direct DB queries:\n const reservedCoupon = await db.query.reservedCoupons.findFirst({\n where: and(\n eq(reservedCoupons.secretCode, secretCode.toUpperCase()),\n eq(reservedCoupons.isRedeemed, false)\n ),\n });\n */\n\n if (!reservedCoupon) {\n throw new ApiError(\"Invalid or already redeemed coupon code\", 400);\n }\n\n // Check if already redeemed by this user (in case of multiple attempts)\n if (reservedCoupon.redeemedBy === userId) {\n throw new ApiError(\"You have already redeemed this coupon\", 400);\n }\n\n const couponResult = await redeemUserReservedCouponInDb(userId, reservedCoupon)\n\n /*\n // Old implementation - direct DB queries:\n const couponResult = await db.transaction(async (tx) => {\n const couponInsert = await tx.insert(coupons).values({\n couponCode: reservedCoupon.couponCode,\n isUserBased: true,\n discountPercent: reservedCoupon.discountPercent,\n flatDiscount: reservedCoupon.flatDiscount,\n minOrder: reservedCoupon.minOrder,\n productIds: reservedCoupon.productIds,\n maxValue: reservedCoupon.maxValue,\n isApplyForAll: false,\n validTill: reservedCoupon.validTill,\n maxLimitForUser: reservedCoupon.maxLimitForUser,\n exclusiveApply: reservedCoupon.exclusiveApply,\n createdBy: reservedCoupon.createdBy,\n }).returning();\n\n const coupon = couponInsert[0];\n\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId,\n });\n\n await tx.update(reservedCoupons).set({\n isRedeemed: true,\n redeemedBy: userId,\n redeemedAt: new Date(),\n }).where(eq(reservedCoupons.id, reservedCoupon.id));\n\n return coupon;\n });\n */\n\n return { success: true, coupon: couponResult };\n }),\n});\n", "// import Razorpay from \"razorpay\";\nimport { razorpayId, razorpaySecret } from \"@/src/lib/env-exporter\"\n\nexport class RazorpayPaymentService {\n // private static instance = new Razorpay({\n // key_id: razorpayId,\n // key_secret: razorpaySecret,\n // });\n //\n static async createOrder(orderId: number, amount: string) {\n // Create Razorpay order\n // const razorpayOrder = await this.instance.orders.create({\n // amount: parseFloat(amount) * 100, // Convert to paisa\n // currency: 'INR',\n // receipt: `order_${orderId}`,\n // notes: {\n // customerOrderId: orderId.toString(),\n // },\n // });\n //\n // return razorpayOrder;\n }\n\n static async insertPaymentRecord(orderId: number, razorpayOrder: any, tx?: unknown) {\n // Use transaction if provided, otherwise use db\n // const dbInstance = tx || db;\n //\n // // Insert payment record\n // const [payment] = await dbInstance\n // .insert(payments)\n // .values({\n // status: 'pending',\n // gateway: 'razorpay',\n // orderId,\n // token: orderId.toString(),\n // merchantOrderId: razorpayOrder.id,\n // payload: razorpayOrder,\n // })\n // .returning();\n //\n // return payment;\n }\n\n static async initiateRefund(paymentId: string, amount: number) {\n // const refund = await this.instance.payments.refund(paymentId, {\n // amount,\n // });\n // return refund;\n }\n\n static async fetchRefund(refundId: string) {\n // const refund = await this.instance.refunds.fetch(refundId);\n // return refund;\n }\n}\n", "\nimport { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport crypto from 'crypto'\nimport { razorpayId, razorpaySecret } from \"@/src/lib/env-exporter\"\nimport { RazorpayPaymentService } from \"@/src/lib/payments-utils\"\nimport {\n getUserPaymentOrderById as getUserPaymentOrderByIdInDb,\n getUserPaymentByOrderId as getUserPaymentByOrderIdInDb,\n getUserPaymentByMerchantOrderId as getUserPaymentByMerchantOrderIdInDb,\n updateUserPaymentSuccess as updateUserPaymentSuccessInDb,\n updateUserOrderPaymentStatus as updateUserOrderPaymentStatusInDb,\n markUserPaymentFailed as markUserPaymentFailedInDb,\n} from '@/src/dbService'\nimport type {\n UserPaymentOrderResponse,\n UserPaymentVerifyResponse,\n UserPaymentFailResponse,\n} from '@packages/shared'\n\n\n\n\nexport const paymentRouter = router({\n createRazorpayOrder: protectedProcedure //either create a new payment order or return the existing one\n .input(z.object({\n orderId: z.string(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { orderId } = input;\n\n const order = await getUserPaymentOrderByIdInDb(parseInt(orderId))\n\n /*\n // Old implementation - direct DB queries:\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, parseInt(orderId)),\n });\n */\n\n if (!order) {\n throw new ApiError(\"Order not found\", 404)\n }\n\n if (order.userId !== userId) {\n throw new ApiError(\"Order does not belong to user\", 403)\n }\n\n // Check for existing pending payment\n const existingPayment = await getUserPaymentByOrderIdInDb(parseInt(orderId))\n\n /*\n // Old implementation - direct DB queries:\n const existingPayment = await db.query.payments.findFirst({\n where: eq(payments.orderId, parseInt(orderId)),\n });\n */\n\n if (existingPayment && existingPayment.status === 'pending') {\n return {\n razorpayOrderId: existingPayment.merchantOrderId,\n key: razorpayId,\n };\n }\n\n // Create Razorpay order and insert payment record\n if (order.totalAmount === null) {\n throw new ApiError('Order total is missing', 400)\n }\n const razorpayOrder = await RazorpayPaymentService.createOrder(parseInt(orderId), order.totalAmount);\n await RazorpayPaymentService.insertPaymentRecord(parseInt(orderId), razorpayOrder);\n\n return {\n razorpayOrderId: 0,\n key: razorpayId,\n }\n }),\n\n\n\n verifyPayment: protectedProcedure\n .input(z.object({\n razorpay_payment_id: z.string(),\n razorpay_order_id: z.string(),\n razorpay_signature: z.string(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const { razorpay_payment_id, razorpay_order_id, razorpay_signature } = input;\n\n // Verify signature\n const expectedSignature = crypto\n .createHmac('sha256', razorpaySecret)\n .update(razorpay_order_id + '|' + razorpay_payment_id)\n .digest('hex');\n\n if (expectedSignature !== razorpay_signature) {\n throw new ApiError(\"Invalid payment signature\", 400);\n }\n\n // Get current payment record\n const currentPayment = await getUserPaymentByMerchantOrderIdInDb(razorpay_order_id)\n\n /*\n // Old implementation - direct DB queries:\n const currentPayment = await db.query.payments.findFirst({\n where: eq(payments.merchantOrderId, razorpay_order_id),\n });\n */\n\n if (!currentPayment) {\n throw new ApiError(\"Payment record not found\", 404);\n }\n\n // Update payment status and payload\n const updatedPayload = {\n ...((currentPayment.payload as any) || {}),\n payment_id: razorpay_payment_id,\n signature: razorpay_signature,\n };\n\n const updatedPayment = await updateUserPaymentSuccessInDb(razorpay_order_id, updatedPayload)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedPayment] = await db\n .update(payments)\n .set({\n status: 'success',\n payload: updatedPayload,\n })\n .where(eq(payments.merchantOrderId, razorpay_order_id))\n .returning();\n\n await db\n .update(orderStatus)\n .set({\n paymentStatus: 'success',\n })\n .where(eq(orderStatus.orderId, updatedPayment.orderId));\n */\n\n if (!updatedPayment) {\n throw new ApiError(\"Payment record not found\", 404)\n }\n\n await updateUserOrderPaymentStatusInDb(updatedPayment.orderId, 'success')\n\n return {\n success: true,\n message: \"Payment verified successfully\",\n }\n }),\n\n markPaymentFailed: protectedProcedure\n .input(z.object({\n merchantOrderId: z.string(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { merchantOrderId } = input;\n\n // Find payment by merchantOrderId\n const payment = await getUserPaymentByMerchantOrderIdInDb(merchantOrderId)\n\n /*\n // Old implementation - direct DB queries:\n const payment = await db.query.payments.findFirst({\n where: eq(payments.merchantOrderId, merchantOrderId),\n });\n */\n\n if (!payment) {\n throw new ApiError(\"Payment not found\", 404);\n }\n\n // Check if payment belongs to user's order\n const order = await getUserPaymentOrderByIdInDb(payment.orderId)\n\n /*\n // Old implementation - direct DB queries:\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, payment.orderId),\n });\n */\n\n if (!order || order.userId !== userId) {\n throw new ApiError(\"Payment does not belong to user\", 403);\n }\n\n // Update payment status to failed\n await markUserPaymentFailedInDb(payment.id)\n\n /*\n // Old implementation - direct DB queries:\n await db\n .update(payments)\n .set({ status: 'failed' })\n .where(eq(payments.id, payment.id));\n */\n\n return {\n success: true,\n message: \"Payment marked as failed\",\n }\n }),\n\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index';\nimport { z } from 'zod';\nimport { generateUploadUrl } from '@/src/lib/s3-client';\nimport { ApiError } from '@/src/lib/api-error';\n\nexport const fileUploadRouter = router({\n generateUploadUrls: protectedProcedure\n .input(z.object({\n contextString: z.enum(['review', 'product_info', 'notification', 'complaint', 'profile', 'tags']),\n mimeTypes: z.array(z.string()),\n }))\n .mutation(async ({ input }): Promise<{ uploadUrls: string[] }> => {\n const { contextString, mimeTypes } = input;\n\n const uploadUrls: string[] = [];\n const keys: string[] = [];\n\n for (const mimeType of mimeTypes) {\n // Generate key based on context and mime type\n let folder: string;\n if (contextString === 'review') {\n folder = 'review-images';\n } else if(contextString === 'product_info') {\n folder = 'product-images';\n }\n // else if(contextString === 'review_response') {\n // folder = 'review-response-images'\n // } \n else if(contextString === 'notification') {\n folder = 'notification-images'\n } else if (contextString === 'complaint') {\n folder = 'complaint-images'\n } else if (contextString === 'profile') {\n folder = 'profile-images'\n } else if (contextString === 'tags') {\n folder = 'tags'\n } else {\n folder = '';\n }\n\n const extension = mimeType === 'image/jpeg' ? '.jpg' :\n mimeType === 'image/png' ? '.png' :\n mimeType === 'image/gif' ? '.gif' : '.jpg';\n const key = `${folder}/${Date.now()}${extension}`;\n\n try {\n const uploadUrl = await generateUploadUrl(key, mimeType);\n uploadUrls.push(uploadUrl);\n keys.push(key);\n \n } catch (error) {\n console.error('Error generating upload URL:', error);\n throw new ApiError('Failed to generate upload URL', 500);\n }\n }\n \n return { uploadUrls };\n }),\n});\n\nexport type FileUploadRouter = typeof fileUploadRouter;\n", "import { router, publicProcedure } from '@/src/trpc/trpc-index';\nimport { z } from 'zod';\nimport { getTagsByStoreId } from '@/src/stores/product-tag-store';\nimport { ApiError } from '@/src/lib/api-error';\n\nexport const tagsRouter = router({\n getTagsByStore: publicProcedure\n .input(z.object({\n storeId: z.number(),\n }))\n .query(async ({ input }) => {\n const { storeId } = input;\n\n // Get tags from cache that are related to this store\n const tags = await getTagsByStoreId(storeId);\n \n\n return {\n tags: tags.map(tag => ({\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription,\n imageUrl: tag.imageUrl,\n productIds: tag.productIds,\n })),\n };\n }),\n});\n", "import { router } from '@/src/trpc/trpc-index';\nimport { addressRouter } from '@/src/trpc/apis/user-apis/apis/address';\nimport { authRouter } from '@/src/trpc/apis/user-apis/apis/auth';\nimport { bannerRouter } from '@/src/trpc/apis/user-apis/apis/banners';\nimport { cartRouter } from '@/src/trpc/apis/user-apis/apis/cart';\nimport { complaintRouter } from '@/src/trpc/apis/user-apis/apis/complaint';\nimport { orderRouter } from '@/src/trpc/apis/user-apis/apis/order';\nimport { productRouter } from '@/src/trpc/apis/user-apis/apis/product';\nimport { slotsRouter } from '@/src/trpc/apis/user-apis/apis/slots';\nimport { userRouter as userDataRouter } from '@/src/trpc/apis/user-apis/apis/user';\nimport { userCouponRouter } from '@/src/trpc/apis/user-apis/apis/coupon';\nimport { paymentRouter } from '@/src/trpc/apis/user-apis/apis/payments';\nimport { storesRouter } from '@/src/trpc/apis/user-apis/apis/stores';\nimport { fileUploadRouter } from '@/src/trpc/apis/user-apis/apis/file-upload';\nimport { tagsRouter } from '@/src/trpc/apis/user-apis/apis/tags';\n\nexport const userRouter = router({\n address: addressRouter,\n auth: authRouter,\n banner: bannerRouter,\n cart: cartRouter,\n complaint: complaintRouter,\n order: orderRouter,\n product: productRouter,\n slots: slotsRouter,\n user: userDataRouter,\n coupon: userCouponRouter,\n payment: paymentRouter,\n stores: storesRouter,\n fileUpload: fileUploadRouter,\n tags: tagsRouter,\n});\n\nexport type UserRouter = typeof userRouter;\n", "import { router, publicProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport { adminRouter } from '@/src/trpc/apis/admin-apis/apis/admin-trpc-index'\nimport { userRouter } from '@/src/trpc/apis/user-apis/apis/user-trpc-index'\nimport { commonApiRouter } from '@/src/trpc/apis/common-apis/common-trpc-index'\nimport { scaffoldProducts } from './apis/common-apis/common';\nimport { scaffoldStores, scaffoldStoreWithProducts } from './apis/user-apis/apis/stores';\nimport { scaffoldSlotsWithProducts } from './apis/user-apis/apis/slots';\nimport { scaffoldEssentialConsts } from './apis/common-apis/common-trpc-index';\nimport { scaffoldBanners } from './apis/user-apis/apis/banners';\n\n// Create the main app router\nexport const appRouter = router({\n hello: publicProcedure\n .input(z.object({ name: z.string() }))\n .query(({ input }) => {\n return { greeting: `Hello ${input.name}!` };\n }),\n admin: adminRouter,\n user: userRouter,\n common: commonApiRouter,\n});\n\n\n// Export type definition of API\nexport type AppRouter = typeof appRouter;\n\nexport type AllProductsApiType = Awaited>;\nexport type StoresApiType = Awaited>;\nexport type SlotsApiType = Awaited>;\nexport type EssentialConstsApiType = Awaited>;\nexport type BannersApiType = Awaited>;\nexport type StoreWithProductsApiType = Awaited>;\n", "import { Hono } from 'hono'\nimport { cors } from 'hono/cors'\nimport { logger } from 'hono/logger'\nimport { trpcServer } from '@hono/trpc-server'\nimport { getStaffUserById, isUserSuspended } from '@/src/dbService'\nimport mainRouter from '@/src/main-router'\nimport { appRouter } from '@/src/trpc/router'\nimport { TRPCError } from '@trpc/server'\nimport { jwtVerify } from 'jose'\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter'\n\nexport const createApp = () => {\n const app = new Hono()\n\n // CORS middleware\n app.use(cors({\n origin: 'http://localhost:5174',\n allowMethods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],\n allowHeaders: ['Origin', 'X-Requested-With', 'Content-Type', 'Accept', 'Authorization'],\n credentials: true,\n }))\n\n // Logger middleware\n app.use(logger())\n\n // tRPC middleware\n app.use('/api/trpc/*', trpcServer({\n router: appRouter,\n createContext: async ({ req }) => {\n let user = null\n let staffUser = null\n const authHeader = req.headers.get('authorization')\n\n if (authHeader?.startsWith('Bearer ')) {\n const token = authHeader.substring(7)\n try {\n const { payload } = await jwtVerify(token, getEncodedJwtSecret())\n const decoded = payload as any\n\n // Check if this is a staff token (has staffId)\n if (decoded.staffId) {\n // This is a staff token, verify staff exists\n const staff = await getStaffUserById(decoded.staffId)\n\n if (staff) {\n user = staffUser\n staffUser = {\n id: staff.id,\n name: staff.name,\n }\n }\n } else {\n // This is a regular user token\n user = decoded\n\n // Check if user is suspended\n const suspended = await isUserSuspended(user.userId)\n\n if (suspended) {\n throw new TRPCError({\n code: 'FORBIDDEN',\n message: 'Account suspended',\n })\n }\n }\n } catch (err) {\n // Invalid token, both user and staffUser remain null\n }\n }\n return { req, user, staffUser }\n },\n onError({ error, path, type, ctx }) {\n console.error('\uD83D\uDEA8 tRPC Error :', {\n path,\n type,\n code: error.code,\n message: error.message,\n userId: ctx?.user?.userId,\n stack: error.stack,\n })\n },\n }))\n\n // Mount main router\n app.route('/api', mainRouter)\n\n // Global error handler\n app.onError((err, c) => {\n console.error(err)\n // Handle different error types\n let status = 500\n let message = 'Internal Server Error'\n\n if (err instanceof TRPCError) {\n // Map TRPC error codes to HTTP status codes\n const trpcStatusMap: Record = {\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n TIMEOUT: 408,\n CONFLICT: 409,\n PRECONDITION_FAILED: 412,\n PAYLOAD_TOO_LARGE: 413,\n METHOD_NOT_SUPPORTED: 405,\n UNPROCESSABLE_CONTENT: 422,\n TOO_MANY_REQUESTS: 429,\n INTERNAL_SERVER_ERROR: 500,\n }\n status = trpcStatusMap[err.code] || 500\n message = err.message\n } else if ((err as any).statusCode) {\n status = (err as any).statusCode\n message = err.message\n } else if ((err as any).status) {\n status = (err as any).status\n message = err.message\n } else if (err.message) {\n message = err.message\n }\n\n return c.json({ message }, status as any)\n })\n\n return app\n}\n", "// This loads all middlewares exposed on the middleware object and then starts\n// the invocation chain. The big idea is that we can add these to the middleware\n// export dynamically through wrangler, or we can potentially let users directly\n// add them as a sort of \"plugin\" system.\n\nimport ENTRY, { __INTERNAL_WRANGLER_MIDDLEWARE__ } from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/bundle-vljdhV/middleware-insertion-facade.js\";\nimport { __facade_invoke__, __facade_register__, Dispatcher } from \"/Users/mohammedshafiuddin/WebDev/freshyo/node_modules/wrangler/templates/middleware/common.ts\";\nimport type { WorkerEntrypointConstructor } from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/bundle-vljdhV/middleware-insertion-facade.js\";\n\n// Preserve all the exports from the worker\nexport * from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/bundle-vljdhV/middleware-insertion-facade.js\";\n\nclass __Facade_ScheduledController__ implements ScheduledController {\n\treadonly #noRetry: ScheduledController[\"noRetry\"];\n\n\tconstructor(\n\t\treadonly scheduledTime: number,\n\t\treadonly cron: string,\n\t\tnoRetry: ScheduledController[\"noRetry\"]\n\t) {\n\t\tthis.#noRetry = noRetry;\n\t}\n\n\tnoRetry() {\n\t\tif (!(this instanceof __Facade_ScheduledController__)) {\n\t\t\tthrow new TypeError(\"Illegal invocation\");\n\t\t}\n\t\t// Need to call native method immediately in case uncaught error thrown\n\t\tthis.#noRetry();\n\t}\n}\n\nfunction wrapExportedHandler(worker: ExportedHandler): ExportedHandler {\n\t// If we don't have any middleware defined, just return the handler as is\n\tif (\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__ === undefined ||\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__.length === 0\n\t) {\n\t\treturn worker;\n\t}\n\t// Otherwise, register all middleware once\n\tfor (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {\n\t\t__facade_register__(middleware);\n\t}\n\n\tconst fetchDispatcher: ExportedHandlerFetchHandler = function (\n\t\trequest,\n\t\tenv,\n\t\tctx\n\t) {\n\t\tif (worker.fetch === undefined) {\n\t\t\tthrow new Error(\"Handler does not export a fetch() function.\");\n\t\t}\n\t\treturn worker.fetch(request, env, ctx);\n\t};\n\n\treturn {\n\t\t...worker,\n\t\tfetch(request, env, ctx) {\n\t\t\tconst dispatcher: Dispatcher = function (type, init) {\n\t\t\t\tif (type === \"scheduled\" && worker.scheduled !== undefined) {\n\t\t\t\t\tconst controller = new __Facade_ScheduledController__(\n\t\t\t\t\t\tDate.now(),\n\t\t\t\t\t\tinit.cron ?? \"\",\n\t\t\t\t\t\t() => {}\n\t\t\t\t\t);\n\t\t\t\t\treturn worker.scheduled(controller, env, ctx);\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn __facade_invoke__(request, env, ctx, dispatcher, fetchDispatcher);\n\t\t},\n\t};\n}\n\nfunction wrapWorkerEntrypoint(\n\tklass: WorkerEntrypointConstructor\n): WorkerEntrypointConstructor {\n\t// If we don't have any middleware defined, just return the handler as is\n\tif (\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__ === undefined ||\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__.length === 0\n\t) {\n\t\treturn klass;\n\t}\n\t// Otherwise, register all middleware once\n\tfor (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {\n\t\t__facade_register__(middleware);\n\t}\n\n\t// `extend`ing `klass` here so other RPC methods remain callable\n\treturn class extends klass {\n\t\t#fetchDispatcher: ExportedHandlerFetchHandler> = (\n\t\t\trequest,\n\t\t\tenv,\n\t\t\tctx\n\t\t) => {\n\t\t\tthis.env = env;\n\t\t\tthis.ctx = ctx;\n\t\t\tif (super.fetch === undefined) {\n\t\t\t\tthrow new Error(\"Entrypoint class does not define a fetch() function.\");\n\t\t\t}\n\t\t\treturn super.fetch(request);\n\t\t};\n\n\t\t#dispatcher: Dispatcher = (type, init) => {\n\t\t\tif (type === \"scheduled\" && super.scheduled !== undefined) {\n\t\t\t\tconst controller = new __Facade_ScheduledController__(\n\t\t\t\t\tDate.now(),\n\t\t\t\t\tinit.cron ?? \"\",\n\t\t\t\t\t() => {}\n\t\t\t\t);\n\t\t\t\treturn super.scheduled(controller);\n\t\t\t}\n\t\t};\n\n\t\tfetch(request: Request) {\n\t\t\treturn __facade_invoke__(\n\t\t\t\trequest,\n\t\t\t\tthis.env,\n\t\t\t\tthis.ctx,\n\t\t\t\tthis.#dispatcher,\n\t\t\t\tthis.#fetchDispatcher\n\t\t\t);\n\t\t}\n\t};\n}\n\nlet WRAPPED_ENTRY: ExportedHandler | WorkerEntrypointConstructor | undefined;\nif (typeof ENTRY === \"object\") {\n\tWRAPPED_ENTRY = wrapExportedHandler(ENTRY);\n} else if (typeof ENTRY === \"function\") {\n\tWRAPPED_ENTRY = wrapWorkerEntrypoint(ENTRY);\n}\nexport default WRAPPED_ENTRY;\n", "\t\t\t\timport worker, * as OTHER_EXPORTS from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/worker.ts\";\n\t\t\t\timport * as __MIDDLEWARE_0__ from \"/Users/mohammedshafiuddin/WebDev/freshyo/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts\";\nimport * as __MIDDLEWARE_1__ from \"/Users/mohammedshafiuddin/WebDev/freshyo/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts\";\n\n\t\t\t\texport * from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/worker.ts\";\n\n\t\t\t\texport const __INTERNAL_WRANGLER_MIDDLEWARE__ = [\n\t\t\t\t\t\n\t\t\t\t\t__MIDDLEWARE_0__.default,__MIDDLEWARE_1__.default\n\t\t\t\t]\n\t\t\t\texport default worker;", "import type { ExecutionContext, D1Database } from '@cloudflare/workers-types'\n\nexport default {\n async fetch(\n request: Request,\n env: Record & { DB?: D1Database },\n ctx: ExecutionContext\n ) {\n ;(globalThis as any).ENV = env\n const { createApp } = await import('./src/app')\n const { initDb } = await import('./src/dbService')\n if (env.DB) {\n initDb(env.DB)\n }\n const app = createApp()\n return app.fetch(request, env, ctx)\n },\n}\n", "import type { Middleware } from \"./common\";\n\nconst drainBody: Middleware = async (request, env, _ctx, middlewareCtx) => {\n\ttry {\n\t\treturn await middlewareCtx.next(request, env);\n\t} finally {\n\t\ttry {\n\t\t\tif (request.body !== null && !request.bodyUsed) {\n\t\t\t\tconst reader = request.body.getReader();\n\t\t\t\twhile (!(await reader.read()).done) {}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(\"Failed to drain the unused request body.\", e);\n\t\t}\n\t}\n};\n\nexport default drainBody;\n", "import type { Middleware } from \"./common\";\n\ninterface JsonError {\n\tmessage?: string;\n\tname?: string;\n\tstack?: string;\n\tcause?: JsonError;\n}\n\nfunction reduceError(e: any): JsonError {\n\treturn {\n\t\tname: e?.name,\n\t\tmessage: e?.message ?? String(e),\n\t\tstack: e?.stack,\n\t\tcause: e?.cause === undefined ? undefined : reduceError(e.cause),\n\t};\n}\n\n// See comment in `bundle.ts` for details on why this is needed\nconst jsonError: Middleware = async (request, env, _ctx, middlewareCtx) => {\n\ttry {\n\t\treturn await middlewareCtx.next(request, env);\n\t} catch (e: any) {\n\t\tconst error = reduceError(e);\n\t\treturn Response.json(error, {\n\t\t\tstatus: 500,\n\t\t\theaders: { \"MF-Experimental-Error-Stack\": \"true\" },\n\t\t});\n\t}\n};\n\nexport default jsonError;\n", "export type Awaitable = T | Promise;\n// TODO: allow dispatching more events?\nexport type Dispatcher = (\n\ttype: \"scheduled\",\n\tinit: { cron?: string }\n) => Awaitable;\n\nexport type IncomingRequest = Request<\n\tunknown,\n\tIncomingRequestCfProperties\n>;\n\nexport interface MiddlewareContext {\n\tdispatch: Dispatcher;\n\tnext(request: IncomingRequest, env: any): Awaitable;\n}\n\nexport type Middleware = (\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tmiddlewareCtx: MiddlewareContext\n) => Awaitable;\n\nconst __facade_middleware__: Middleware[] = [];\n\n// The register functions allow for the insertion of one or many middleware,\n// We register internal middleware first in the stack, but have no way of controlling\n// the order that addMiddleware is run in service workers so need an internal function.\nexport function __facade_register__(...args: (Middleware | Middleware[])[]) {\n\t__facade_middleware__.push(...args.flat());\n}\nexport function __facade_registerInternal__(\n\t...args: (Middleware | Middleware[])[]\n) {\n\t__facade_middleware__.unshift(...args.flat());\n}\n\nfunction __facade_invokeChain__(\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tdispatch: Dispatcher,\n\tmiddlewareChain: Middleware[]\n): Awaitable {\n\tconst [head, ...tail] = middlewareChain;\n\tconst middlewareCtx: MiddlewareContext = {\n\t\tdispatch,\n\t\tnext(newRequest, newEnv) {\n\t\t\treturn __facade_invokeChain__(newRequest, newEnv, ctx, dispatch, tail);\n\t\t},\n\t};\n\treturn head(request, env, ctx, middlewareCtx);\n}\n\nexport function __facade_invoke__(\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tdispatch: Dispatcher,\n\tfinalMiddleware: Middleware\n): Awaitable {\n\treturn __facade_invokeChain__(request, env, ctx, dispatch, [\n\t\t...__facade_middleware__,\n\t\tfinalMiddleware,\n\t]);\n}\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,0BAA0B,OAAO,MAAM;AAC/C,QAAM,UAAU,IAAI,QAAQ,OAAO,IAAI;AACvC,UAAQ,QAAQ,OAAO,kBAAkB;AACzC,SAAO;AACR;AAJA;AAAA;AAAA;AAAS;AAMT,eAAW,QAAQ,IAAI,MAAM,WAAW,OAAO;AAAA,MAC9C,MAAM,QAAQ,SAAS,UAAU;AAChC,eAAO,QAAQ,MAAM,QAAQ,SAAS;AAAA,UACrC,0BAA0B,MAAM,MAAM,QA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,cAAc;AAAA,QACd,KAAK;AAAA,QACL,UAAU;AAAA,QACV,WAAW;AAAA,QACX,UAAU;AAAA,MACX,IAAI,EAAE,KAAK,MAAM,EAAE,CAAC;AAAA,MACpB,aAAa;AAAA,MACb,SAAS;AAAA,MACT,OAAO;AAAA,MACP,WAAW;AAAA,MACX,UAAU;AAAA,MACV,UAAU;AAAA,MACV,UAAU;AAAA,MACV,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,MACV,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,UAAU;AAAA,MACV,eAAe;AAAA,MACf,WAAW;AAAA,MACX,gBAAgB;AAAA,MAChB,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,kBAAkB;AAAA,MAClB,oBAAoB;AAAA,MACpB,qBAAqB;AAAA,MACrB,QAAQ;AAAA,MACR,mBAAmB;AAAA,MACnB,YAAY;AAAA,MACZ,6BAA6B;AAAA,MAC7B,4BAA4B;AAAA,MAC5B,gBAAgB;AAAA,MAChB,cAAc;AAAA,MACd,eAAe;AAAA,MACf,kBAAkB;AAAA,MAClB,WAAW;AAAA,MACX,QAAQ;AAAA,MACR,iBAAiB;AAAA,IAClB;AAzNa;AAAA;AAAA;;;ACHb,IAEM,eACO,kBACE,MAAM,UAAU,UAGzB,cAMJ,OACA,aACA,6BACA,qCACA,qCACA,aACA,mBACA,MACA,MACA,OACA,OACA,QACA,WACA,mBACA,iBACA,UACA,KACA,WACA,QACA,YACA,MACA,aACA,KACA,YACA,UACA,UACA,cACA,UACA,wBACA,iBACAC,SACA,MACA,WACA,eACA,aACA,IACA,KACA,MACA,KACA,MACA,iBACA,qBACA,cACA,SACA,oBACA,gBACA,QACA,eACA,iBACA,sBACA,QACA,OACA,QACA,OACA,kBACA,kBACA,OACA,QACA,SACA,UACA,QACA,YACA,gBACA,YACA,WACAC,SACA,SACA,MACA,UACA,SACA,SACA,SACA,QACA,WACA,QACA,SACA,SACA,QACA,WACA,QACA,YACA,YACA,SACA,cACA,UACA,eACA,WACA,eACA,iBACA,mBACA,oBACA,OACA,kBACA,WACA,4BACA,2BACA,eACA,aACA,cACA,iBACA,UACA,OACA,gBAEI,UA8GC;AAnOP,IAAAC,gBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AACA;AACA,IAAM,gBAAgB,WAAW,SAAS;AACnC,IAAM,mBAAmB,cAAc;AACvC,KAAM,EAAE,MAAM,UAAU,aAAa;AAAA,MAC1C;AAAA,IACF;AACA,IAAM,eAAe,IAAI,QAAa;AAAA,MACpC,KAAK,cAAc;AAAA,MACnB;AAAA,MACA;AAAA,IACF,CAAC;AACM,KAAM;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAAH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAAC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,QACE;AACJ,IAAM,WAAW;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAAD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,MAEA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAAC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA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2B,mBAAgB;AAAA,MAC9C,OAAO;AAAA,MACP,SAAS;AAAA,MACT,YAAY,MAAM;AACd,cAAM;AAAA,UACF,MAAM;AAAA,UACN,QAAQ;AAAA,UACR,GAAG;AAAA,QACP,CAAC;AACD,eAAO,eAAe,MAAM,aAAa,SAAS;AAAA,MACtD;AAAA,IACJ;AAXa;AAYN,IAAM,+BAAN,cAA2C,mBAAgB;AAAA,MAC9D,OAAO;AAAA,MACP,SAAS;AAAA,MACT,YAAY,MAAM;AACd,cAAM;AAAA,UACF,MAAM;AAAA,UACN,QAAQ;AAAA,UACR,GAAG;AAAA,QACP,CAAC;AACD,eAAO,eAAe,MAAM,6BAA6B,SAAS;AAAA,MACtE;AAAA,IACJ;AAXa;AAYN,IAAM,iCAAN,cAA6C,mBAAgB;AAAA,MAChE,OAAO;AAAA,MACP,SAAS;AAAA,MACT,YAAY,MAAM;AACd,cAAM;AAAA,UACF,MAAM;AAAA,UACN,QAAQ;AAAA,UACR,GAAG;AAAA,QACP,CAAC;AACD,eAAO,eAAe,MAAM,+BAA+B,SAAS;AAAA,MACxE;AAAA,IACJ;AAXa;AAAA;AAAA;;;AC7Kb,IAAM,IACA,MACA,KACA,MACA,OACA,OACA,MACA,MACA,MACA,KACA,MACA,MACA,KACA,KACA,MACA,KACA,OACA,MACA,KACA,MACA,OACA,OACA,MACA,KACA,MACA,MACA,OACA,OACA,KACA,MACA,KACA,OACA,SACA,MACA,KACA,KACA,IACA,KACA,MACA,MACA,QACA,MACA,MACA,KACA,MACA,MACA,MACA,MACA,MACA,KACA,MACA,KACA,MACA,MACA,KACA,MACA,KACA,KACA,KACA,IACA,KACA,OACA,KACA,MACA,OACA,QACA,QACA,SACA,MACA,MACA,KACA,OACA,QACA,WACA,MACA,KACA,MACA,MACA,KACA,MACA,MACA,KACA,MACA,KACA,MACA,OACA,MACA,KACA,MACA,MACA,OACA,QACA,OACA,QACA,QACA,OACA,OACA,MACA,KACA,MACA,MACA,QACA,QACA,SACA,OACA,KACA,MACA,OACA,MACA,MACA,OACA,KACA,QACA,MACA,KACA,OACA,QACA,OACA,QACA,QACA,QACA,MACA,MACA,OACA,OACA,UACA,UACA,YACA,MACA,OACA,QACA,OACA,MACA,MACA,KACA,MACA,MACA,MACA,OACA,OACA,KACA,MACA,MACA,MACA,OACA,KACA,IACA,MACA,KACA,OACA,QACA,MACA,OACA,MACA,OACA,OACA,QACA,QACA,SACA,MACA,OACA,OACA,QACA,SACA,QACA,QACA,SACA,OACA,QACA,MACA,OACA,MACA,OACA,OACA,MACA,OACA,MACA,OACA,KACA,MACA,OACA,OACA,OACA,KACA,MACA,MACA,OACA,MACA,KACA,KACA,MACA,OACA,MACA,OACA,MACA,OACA,OACA,MACA,OACA,QACA,OACA,QACA,KACA,MACA,OACA,OACA,KACA,KACA,MACA,OACA,MACA,OACA,MACA,IACA,KACA,MACA,MACA,KACA,MACA,KACA,MACA,KACA,KACA,MACA,KACA,OACA,MACA,KACA,OACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,MACA,MACA,KACA,MACA,KACA,MACA,KACA,MACA,IACA,KACA,MACA,KACA,KACA,MACA,MACA,KACA,KACA,KACA,IACA,MACA,OACA,QACA,SACA,QACA,SACA,QACA,OACA,QACA,OACA,QACA,OACA,MACA,OACA,OACA,MACA,OACA,OACA,OACA,QACA,QACA,QACA,SACA,SACA,MACA,OACA,QACA,QACA,OACA,QACA,OACA,QACA,OACA,OACA,QACA,SACA,QACA,SACA,UACA,QACA,QACA,SACA,SACA,UACA,OACA,QACA,OACA,QACA,QACA,MACA,OACA,OACA,OACA,QACA,QACA,MACA,OACA,OACA,QACA,QACA,OACA,MACA,OACA,OACA,MACA,OACA,OACA,MACA,OACA,OACA,MACA,MACA,KACA,MACA,OACA,QACA,OACA,OACA,QACA,SACA,OACA,OACA,QACA,QACA,OACA,QACA,QACA,MACA,MACA,OACA,OACA,OACA,MACA,OACA,QACA,OACA,QACA,OACA,OACA,QACA,QACA,KACA,QACA,KACA,QACA,KACA,MACA,KACA,MACA,MACA,QACA,KACA,KACA,MACA,MACA,MACA,IACA,KACA,MACA,KACA,MACA,OACA,KACA,MACA,KACA,KACA,KACA,OACA,QACA,MACA,OACA,OACA,OACA,MACA,MACA,OACA,MACA,MACA,MACA,KACA,MACA,MACA,KACA,OACA,KACA,OACA,MACA,KACA,OACA,MACA,OACA,OACA,OACA,OACA,MACA,MACA,OACA,MACA,KACA,MACA,OACA,QACA,QACA,MACA,OACA,OACA,IACA,KACA,KACA,MACA,KACA,OACA,QACA,QACA,UACA,MACA,IACA,QACA,SACA,KACA,OACA,QACA,QACA,SACA,OACA,QACA,QACA,QACA,SACA,SACA,OACA,QACA,QACA,MACA,MACA,OACA,KACA,MACA,MACA,OACA,OACA,KACA,MACA,MACA,MACA,OACA,OACA,KACA,KACA,OACA,KACA,OACA,MACA,MACA,OACA,OACA,QACA,MACA,KACA,MACA,MACA,MACA,OACA,QACA,OACA,QACA,OACA,KACA,MACA,MACA,OACA,KACA,OACA,MACA,MACA,MACA,IACA,MACA,MACA,KACA,KACA,MACA,MACA,MACA,KACA,MACA,MACA,KACA,KACA,MACA,OACA,KACA,KACA,MACA,KACA,MACA,OACA,OACA,KACA,MACA,MACA,KACA,KACA,MACA,KACA,KACA,IACA,KACA,MACA,MACA,KACA,SACA,KACA,MACA,KACA,MACA,OACA,MACA,MACA,MACA,OACA,MACA,OACA,MACA,OACA,OACA,IACA,KACA,SACA,KACA,MACA,OACA,KACA,KACA,KACA,MACA,KACA,MACA,MACA,QACA,OACA,QACA,MACA,MACA,QACA,OACA,MACA,SACA,KACA,MACA,KACA,MACA,KACA,OACA,OACA,MACA,MACA,KACA,MACA,KACA,MACA,IACA,OACA,MACA,OACA,QACA,SACA,QACA,OACA,QACA,OACA,MACA,OACA,MACA,OACA,OACA,QACA,QACA,SACA,MACA,OACA,QACA,QACA,OACA,OACA,QACA,OACA,QACA,OACA,QACA,MACA,OACA,MACA,OACA,QACA,OACA,MACA,OACA,MACA,OACA,MACA,OACA,KACA,MACA,KACA,KACA,KACA,KACA,MACA,KACA,MACA,OACA,OACA,OACA,QACA,QACA,OACA,QACA,QACA,MACA,MACA,OACA,OACA,OACA,MACA,OACA,OACA,KACA,OACA,QACA,KACA,KACA,MACA,OACA,MACA,OACA,KACA,KACA,KACA,MACA,MACA,IACA,KACA,KACA,MACA,MACA,OACA,MACA,KACA,KACA,IACA,OACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,MACA,MACA,OACA,QACA,OACA,MACA,KACA,KACA,MACA,OACA,MACA,MACA,OACA,MACA,KACA,MACA,MACA,MACA,KACA,OACA,MACA,MACA,OACA,OACA,OACA,MACA,KACA,MACA,OACA,KACA,MACA,MACA,MACA,KACA,KACA,MACA,MACA,MACA,KACA,KACA,IACA,KACA,MACA,MACA,KACA,MACA,KACA,MACA,QACA,MACA,MACA,MACA,MACA,KACA,MACA,OACA,OACA,OACA,KACA,OACA,MACA,MACA,KACA,KACA,MACA,QACA,OACA,OACA,KACA,MACA,KACA,KACA,MACA,MACA,OACA,QACA,OACA,QACA,QACA,UACA,SACA,UACA,WACA,WACA,OACA,QACA,OACA,KACA,MACA,OACA,KACA,KACA,KACA,KACA,MACA,KACA,IACA,KACA,MACA,KACA,MACA,MACA,KACA,MACA,MACA,OACA,KACA,QACA,KACA,MACA,KACA,MACA,MACA,KACA,MACA,OACA,KACA,MACA,KACA,MACA,KACA,MACA,KACA,MACA,OACA,MACA,KACA,MACA,KACA,MACA,KACA,IACA,SACA,UACA,SACA,UACA,KACA,MACA,KACA,MACA,OACA,QACA,KACA,MACA,OACA,OACA,MACA,MACA,MACA,KACA,IACA,KACA,KACA,MACA,KACA,MACA,KACA,OACA,QACA,MACA,MACA,IACA,KACA,KACA,IACA,KACA,IACA,IACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,MACA,KACA,KACA,IACA,KACA,KACA,IACA,KACA,MACA,KACA,KACA,KACA,IACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,IACA,KACA,KACA,KACA,MACA,KACA,MACA,IACA,KACA,KACA,KACA,MACA,MACA,OACA,QACA,QACA,OACA,OACA,QACA,QACA,QACA,OACA,SACA,SACA,OACA,OACA,OACA,QACA,SACA,OACA,UACA,OACA,QACA,SACA,SACA,UACA,UACA,UACA,QACA,QACA,YACA,YACA,aACA,SACA,OACA,QACA,OACA,MACA,QACA,QACA,QACA,SACA,SACA,SACA,SACA,SACA,SACA,QACA,SACA,SACA,SACA,WACA,YACA,aACA,WACA,YACA,WACA,UACA,WACA,YACA,aACA,YACA,cACA,UACA,WACA,WACA,WACA,YACA,gBACA,eACA,cACA,eACA,WACA,WACA,OACA,QACA,OACA,QACA,OACA,QACA,SACA,UACA,QACA,MACA,OACA,OACA,OACA,QACA,OACA,QACA,OACA,SACA,QACA,UACA,OACA,QACA,OACA,QACA,MACA,OACA,QACA,OACA,OACA,OACA,QACA,SACA,UACA,UACA,UACA,OACA,OACA,QACA,QACA,SACA,QACA,YACA,WACA,SACA,UACA,UACA,WACA,MACA,OACA,OACA,UACA,OACA,QACA,QACA,KACA,IAIA,aACK,qBAEL,aACK,eAMA,sBAMA,0BAMA,yBAMA,+BAMA,qBAMA,iBAMA,qBAMA,eAMA,YAMA,eAMA,WAMA,iCAMA,6BAMA,eAME,qBAIT,0BACA,yBACA,wBACA,gBACA,yBACA,aACA,eACO,aAKA,iCAKA,6BAKA,8BAKA,0BAKA,sBAKA,2BAKA,uBAKA,yBAKA,6BAKA,+BAKA,yBAKA,SAKA,aAKA,+BAKA,sBAKA,WAKA,eAKA,2BAKA,gBAKA,gCAKA,iCAKA,YAKA,oBAKA,mBAKA,oBAKA,mBAKA,iBAKA,oBAKA,WAKA,4BAKA,2CAKA,gDAKA,qBAKA,sBAKA,8BAKA,+BAKA,sBAKA,uBAKA,WAKA,YAKA,mBAKA,SAKA,4CAKA,0BAKA,gCAKA,qDAKA,4CAKA,+BAKA,2CAKA,gDAKA,0CAKA,uCAKA,4BAKA,iC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AA,MACJ;AACA,aAAO,EAAE,OAAO,YAAY,OAAO,OAAO;AAAA,IAC9C,GAbmB;AAkBZ,IAAM,2BAA2B,8BAAO,QAAQ,UAAU;AAC7D,YAAM,kBAAkB,EAAE,UAAU,GAAG,UAAU,IAAI;AACrD,YAAM,SAAS,MAAM,aAAa,EAAE,GAAG,iBAAiB,GAAG,OAAO,GAAG,OAAOA,WAAU;AACtF,aAAO,gBAAgB,MAAM;AAAA,IACjC,GAJwC;AAAA;AAAA;;;ACpBxC,IAqHM,UA6GA,YAMA,SAMO;AA9Ob;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAG;AAAA,IAAAC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAM,WAAW;AAAA,MACb;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;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AAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;;;AC1GA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AAAA;;;ACAA,IAAAC,mBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;;;ACJA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AACA;AACA;AACA;AAAA;AAAA;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AAAA;;;ACAA,IAAAC,iBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AACA;AACA;AACA;AACA,IAAAC;AACA;AACA;AACA,IAAAC;AACA;AACA;AAAA;AAAA;;;ACRO,SAAS,UAAU,SAAS;AAC/B,QAAM,EAAE,MAAM,MAAM,IAAI;AACxB,MAAI,EAAE,UAAU,MAAM,UAAAC,UAAS,IAAI;AACnC,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A;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA;AAAA;;;AC9DA,IAoDM,eAEJ,aACA,eACA,oBACA,MACA,MACA,WACA,iBACA,YACA,gBACA,qBACA,0BACA,YACA,YACA,kBACA,iBACA,iBACA,aACA,iBACA,qBACA,iBACA,eACA,mBACA,YACA,WACA,kBACA,SACA,WACA,MACA,UACA,QACA,YACA,aACA,YACA,gBACA,WACAC,aACA,QACA,YACA,gBACA,WACA,SACAC,SACA,iBAEW,iBAGAC,YAOP,MACC;AA7GP,IAAAC,eAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA,IAAAD;AAoDA,IAAM,gBAAgB,QAAQ,iBAAiB,aAAa;AACrD,KAAM;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,YAAAH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAAC;AAAA,MACA;AAAA,QACE;AACG,IAAM,kBAAkB,cAAc,gBAAgB;AAAA,MAC3D,cAAc;AAAA,IAChB;AACO,IAAMC,aAAY;AAAA;AAAA,MAEvB,WAAW,UAAqB;AAAA,MAChC;AAAA,MACA,YAAAF;AAAA,MACA,QAAAC;AAAA,IACF;AACA,I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kBAAgB,oBAAoB,mCAAK;AAC1C,WAAW,OAAO,wCAAU,YAAY;AACvC,kBAAgB,qBAAqB,mCAAK;AAC3C;AACA,IAAO,kCAAQ;", + "names": ["init_performance", "init_performance", "PerformanceMark", "e", "init_performance", "init_performance", "init_performance", "init_performance", "clear", "count", "countReset", "createTask", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "profile", "profileEnd", "table", "time", "timeEnd", "timeLog", "timeStamp", "trace", "warn", "init_console", "init_performance", "init_console", "init_performance", "hrtime", "init_performance", "Socket", "init_performance", "dir", "x", "y", "env", "count", "init_performance", "init_performance", "cwd", "hrtime", "assert", "init_process", "init_performance", "init_process", "init_performance", "init_performance", "middleware", "context", "i", "init_performance", "init_performance", "init_performance", "all", "init_performance", "routePath", "match", "i", "j", "decoder", "url", "v", "a", "init_performance", "raw", "text", "init_performance", "context", "c", "init_performance", "k", "v", "v2", "text", "object", "init_performance", "init_constants", "init_performance", "init_performance", "init_constants", "c", "handlers", "p", "m", "clone", "r", "url", "env", "context", "init_performance", "a", "b", "Node", "init_performance", "context", "k", "c", "init_performance", "Node", "i", "m", "j", "i", "j", "handlers", "h", "e", "map", "k", "middleware", "a", "b", "init_router", "init_performance", "p", "m", "r", "init_performance", "init_router", "init_performance", "init_router", "init_router", "init_performance", "i", "router", "i2", "e", "init_performance", "init_router", "Node", "init_node", "init_performance", "_Node", "m", "i", "p", "v", "a", "i2", "j", "k", "b", "init_router", "init_performance", "init_node", "Node", "i", "init_performance", "init_router", "Hono", "init_performance", "init_performance", "init_performance", "defaults", "origin", "c", "set", "process", "navigator", "init_performance", "log", "time", "init_performance", "v", "logger2", "c", "url", "obj1: TType", "newObj: TType", "value: unknown", "fn: unknown", "it: T", "signals: AbortSignal[]", "ac", "TRPC_ERROR_CODES_BY_NUMBER: InvertKeyValue<\n typeof TRPC_ERROR_CODES_BY_KEY\n>", "retryableRpcCodes: TRPC_ERROR_CODE_NUMBER[]", "fn: () => TValue", "callback: ProxyCallback", "path: readonly string[]", "memo: Record", "memo", "code: keyof typeof TRPC_ERROR_CODES_BY_KEY", "json: TRPCResponse | TRPCResponse[]", "json", "error: TRPCError", "error", "opts: {\n config: RootConfig;\n error: TRPCError;\n type: ProcedureType | 'unknown';\n path: string | undefined;\n input: unknown;\n ctx: TRoot['ctx'] | undefined;\n}", "config", "shape: DefaultErrorShape", "JSONRPC2_TO_HTTP_CODE: Record<\n keyof typeof TRPC_ERROR_CODES_BY_KEY,\n number\n>", "obj: object", "_typeof", "o", "toPrimitive", "t", "r", "e", "i", "toPropertyKey", "cause: unknown", "transformer: DataTransformerOptions", "config: RootConfig", "item: TResponseItem", "config", "itemOrItems: TResponse", "once", "fn: () => T", "result: T | typeof uncalled", "input: unknown", "value: unknown", "config: RootConfig", "input: TInput", "v", "procedures: Record", "lazy: Record>", "opts: {\n ref: Lazy;\n path: readonly string[];\n key: string;\n aggregate: RouterRecord;\n }", "router", "lazy", "from: CreateRouterOptions", "path: readonly string[]", "aggregate: RouterRecord", "record", "_def: AnyRouter['_def']", "router: BuiltRouter", "procedureOrRouter: ValueOf", "router: Pick, '_def'>", "path: string", "key", "router: Pick, '_def'>", "ctx: Context | undefined", "r", "defaultFormatter: ErrorFormatter", "defaultTransformer: CombinedDataTransformer", "opts: {\n message?: string;\n code: TRPC_ERROR_CODE_KEY;\n cause?: unknown;\n }", "message", "x: unknown", "x", "observable: Observable", "signal: AbortSignal", "unsub: Unsubscribable | null", "error", "observable", "iterator: AsyncIterator", "iterator", "parsed: unknown", "_key", "str: string", "headers: Headers", "t", "fn: () => Promise", "promise: Promise | null", "value: TReturn | typeof sym", "_promise", "promise", "req: Request", "handler", "opts: GetRequestInfoOptions", "error: unknown", "error", "message", "isObject", "o: unknown", "o", "promise: TPromise", "resolve!: PromiseWithResolvers[\"resolve\"]", "reject!: PromiseWithResolvers[\"reject\"]", "arr: readonly T[]", "member: T", "member", "index: number", "member: unknown", "thing: T", "dispose: () => void", "dispose: () => Promise", "ms: number", "timer: ReturnType | null", "iterable: AsyncIterable", "iterator", "_x", "_x2", "iterable: AsyncIterable", "opts: {\n count: number;\n gracePeriodMs: number;\n }", "result: null | IteratorResult | typeof disposablePromiseTimerResult", "count", "resolve: (value: TValue) => void", "reject: (error: unknown) => void", "iterable: AsyncIterable", "onResult: (result: ManagedIteratorResult) => void", "state: 'idle' | 'pending' | 'done'", "iterables: AsyncIterable[]", "buffer: Array<\n [\n iterator: ManagedIterator,\n result: Exclude<\n ManagedIteratorResult,\n { status: 'return' }\n >,\n ]\n >", "iterable: AsyncIterable", "errors: unknown[]", "iterable: AsyncIterable", "iterable: AsyncIterable", "pingIntervalMs: number", "result:\n | null\n | IteratorResult\n | typeof disposablePromiseTimerResult", "value: unknown", "opts: JSONLProducerOptions", "callback: (idx: ChunkIndex) => AsyncIterable", "iterable", "promise: Promise", "path: (string | number)[]", "encode", "iterable: AsyncIterable", "encodeAsync", "newObj: Record", "asyncValues: ChunkDefinition[]", "newHead: Head", "iterable: AsyncIterable", "opts: SSEStreamProducerOptions", "ping: Required", "client: SSEClientOptions", "iterable: AsyncIterable", "value: null | TIteratorValue", "chunk: null | SSEvent", "controller: TransformStreamDefaultController", "err: TRPCError", "signal: AbortSignal", "initOpts: {\n ctx: inferRouterContext | undefined;\n info: TRPCRequestInfo | undefined;\n responseMeta?: HTTPBaseHandlerOptions['responseMeta'];\n untransformedJSON:\n | TRPCResponse>\n | TRPCResponse>[]\n | null;\n errors: TRPCError[];\n headers: Headers;\n}", "info", "meta", "v", "cause: unknown", "errorOpts: {\n opts: Pick<\n ResolveHTTPRequestOptions,\n 'onError' | 'req' | 'router'\n >;\n ctx: inferRouterContext | undefined;\n type: ProcedureType | 'unknown';\n path?: string;\n input?: unknown;\n }", "router", "v: unknown", "opts: ResolveHTTPRequestOptions", "config", "url", "infoTuple: ResultTuple", "ctxManager: ContextManager", "result: ResultTuple<$Context> | undefined", "data: unknown", "res: TRPCResponse>", "headResponse", "import_objectSpread2", "responseBody: ReadableStream", "results: RPCResult[]", "jsonContentTypeHandler: ContentTypeHandler", "formDataContentTypeHandler: ContentTypeHandler", "octetStreamContentTypeHandler: ContentTypeHandler", "TYPE_ACCEPTED_METHOD_MAP: Record", "TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE: Record<\n ProcedureType,\n HTTPMethods[]\n>", "inputs: unknown", "result: InputRecord", "acc: InputRecord", "import_objectSpread2$1", "type: ProcedureType | 'unknown'", "info: TRPCRequestInfo", "Unpromise", "arg: Promise | PromiseLike | PromiseExecutor", "promise: Promise", "unsubscribe: () => void", "onfulfilled?:\n | ((value: T) => TResult1 | PromiseLike)\n | null", "onrejected?:\n | ((reason: any) => TResult2 | PromiseLike)\n | null", "onrejected?:\n | ((reason: any) => TResult | PromiseLike)\n | null", "onfinally?: (() => void) | null", "promise: PromiseLike", "cached", "value: T | PromiseLike", "values: Iterable>", "promises: readonly TPromise[]", "r", "e", "n", "d", "s", "OverloadYield", "_awaitAsyncGenerator", "_wrapAsyncGenerator", "u", "i", "settle", "_asyncIterator", "AsyncFromSyncIterator", "_asyncGeneratorDelegate", "opts: FetchHandlerRequestOptions", "createContext: ResolveHTTPRequestOptionsContextFn", "import_objectSpread2", "url", "o", "meta", "v", "path: string", "init_performance", "c", "c", "t", "p", "init_performance", "_a", "init_logger", "init_performance", "message", "config", "p", "init_performance", "table", "_a", "init_performance", "_a", "init_performance", "table", "config", "_a", "init_performance", "_a", "init_performance", "config", "table", "init_performance", "table", "_a", "init_performance", "i", "value", "startFrom", "array", "init_performance", "_a", "init_performance", "config", "as", "table", "ref", "actions", "range", "v", "a", "_a", "init_performance", "table", "config", "_a", "init_performance", "sql", "version", "init_performance", "init_performance", "version", "otel", "rawTracer", "e", "init_performance", "param", "p", "_a", "init_performance", "config", "i", "decoder", "encoder", "sql", "raw", "placeholder", "name", "SQL", "result", "decoder", "table", "a", "b", "init_utils", "init_performance", "_a", "init_table", "init_performance", "_a", "init_performance", "init_table", "table", "c", "v", "max", "init_performance", "init_performance", "init_performance", "relations", "primaryKey", "table", "config", "f", "decoder", "_a", "init_performance", "table", "c", "_a", "init_performance", "_a", "init_performance", "config", "_a", "init_performance", "_a", "ForeignKeyBuilder", "ForeignKey", "init_foreign_keys", "init_performance", "config", "table", "uniqueKeyName", "table", "_a", "UniqueConstraintBuilder", "UniqueOnConstraintBuilder", "UniqueConstraint", "init_unique_constraint", "init_performance", "_a", "init_common", "init_performance", "init_foreign_keys", "init_unique_constraint", "as", "config", "table", "ref", "actions", "ForeignKeyBuilder", "uniqueKeyName", "a", "b", "config", "_a", "init_performance", "init_utils", "init_common", "table", "a", "b", "config", "_a", "init_performance", "init_utils", "init_common", "table", "a", "b", "config", "_a", "init_performance", "init_utils", "init_common", "table", "a", "b", "config", "_a", "init_performance", "init_utils", "init_common", "table", "_a", "init_performance", "init_common", "table", "a", "b", "config", "_a", "init_performance", "init_utils", "init_common", "table", "init_performance", "name", "InlineForeignKeys", "table", "_a", "init_table", "init_performance", "_a", "init_performance", "table", "_a", "init_performance", "table", "config", "config", "PrimaryKeyBuilder", "_a", "PrimaryKey", "init_primary_keys", "init_performance", "init_table", "table", "table", "init_utils", "init_performance", "init_table", "_a", "init_performance", "init_table", "init_utils", "table", "i", "_a", "init_performance", "table", "_a", "init_performance", "message", "count", "init_performance", "init_performance", "init_performance", "init_sql", "init_performance", "init_performance", "init_common", "_a", "init_performance", "_a", "init_performance", "init_sql", "init_table", "init_utils", "config", "i", "w", "table", "set", "c", "f", "select", "sql", "joinOn", "field", "e", "_a", "init_performance", "_a", "init_select", "init_performance", "init_utils", "config", "table", "on", "_a", "init_query_builder", "init_performance", "init_select", "as", "self", "_a", "init_performance", "init_table", "init_utils", "init_query_builder", "table", "config", "init_performance", "_a", "init_performance", "init_table", "init_utils", "table", "set", "on", "init_performance", "init_query_builder", "init_select", "_a", "init_performance", "_a", "init_performance", "table", "config", "_a", "init_performance", "_a", "init_performance", "self", "as", "table", "config", "sql", "encoder", "b", "_a", "init_performance", "_key", "init_performance", "init_alias", "init_performance", "_a", "init_performance", "cache", "e", "sql", "init_subquery", "init_performance", "_a", "init_performance", "init_utils", "init_query_builder", "init_table", "config", "init_performance", "init_alias", "init_foreign_keys", "init_primary_keys", "init_subquery", "init_table", "init_unique_constraint", "init_utils", "k", "_a", "init_session", "init_performance", "init_logger", "init_utils", "builtQuery", "i", "config", "logger", "cache", "config", "logger", "db", "_a", "init_performance", "init_logger", "init_session", "init_performance", "init_session", "init_performance", "init_performance", "init_logger", "init_sql", "init_utils", "init_performance", "t", "init_performance", "init_performance", "c", "init_performance", "constants", "c", "init_performance", "minOrderValue", "init_performance", "u", "init_performance", "record", "tag", "group", "init_performance", "group", "getStringArray", "init_performance", "init_performance", "init_performance", "count", "init_performance", "mapVendorSnippet", "mapDeliverySlot", "init_performance", "init_performance", "init_performance", "getStringArray", "getProductById", "init_performance", "init_complaint", "init_performance", "getStringArray", "init_performance", "getStringArray", "getProductReviews", "getProductById", "init_product", "init_performance", "init_slots", "init_performance", "init_performance", "email", "getUserByMobile", "error", "init_performance", "init_coupon", "init_performance", "getUserById", "init_user", "init_performance", "getProductById", "updateOrderNotes", "init_order", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "staffRoles", "staffPermissions", "staffRolePermissions", "permission", "keyValStore", "init_performance", "init_performance", "init_complaint", "init_product", "init_slots", "init_coupon", "init_user", "init_order", "init_performance", "getProductById", "getUserByMobile", "getProductReviews", "getUserById", "updateOrderNotes", "init_performance", "i", "string", "init_performance", "i", "init_performance", "encode", "init_performance", "hash", "init_performance", "init_performance", "init_errors", "init_performance", "message", "init_performance", "init_performance", "isObject", "init_performance", "hash", "init_performance", "init_errors", "init_performance", "init_errors", "init_performance", "cached", "hash", "init_performance", "init_errors", "s", "init_performance", "init_performance", "isObject", "k", "init_performance", "init_errors", "init_verify", "init_performance", "init_errors", "isObject", "max", "init_performance", "init_errors", "date", "jwt", "init_verify", "init_performance", "init_errors", "init_performance", "init_errors", "encode", "k", "init_sign", "init_performance", "init_sign", "init_performance", "init_errors", "init_performance", "init_verify", "init_sign", "init_performance", "message", "init_performance", "env", "init_performance", "error", "c", "init_performance", "Hono", "init_performance", "init_performance", "init_performance", "init_auth", "init_performance", "HttpAuthLocation", "init_performance", "HttpApiKeyAuthLocation", "init_performance", "init_performance", "init_performance", "init_performance", "init_auth", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "EndpointURLScheme", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_checksum", "init_performance", "AlgorithmId", "init_performance", "init_performance", "init_extensions", "init_performance", "init_checksum", "init_performance", "init_performance", "FieldPosition", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_identity", "init_performance", "init_logger", "init_performance", "init_performance", "init_performance", "init_performance", "IniSectionType", "init_performance", "init_performance", "init_schema", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "RequestHandlerProtocol", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_auth", "init_extensions", "init_identity", "init_logger", "init_schema", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "e", "init_dist_es", "init_performance", "init_constants", "init_performance", "ChecksumAlgorithm", "ChecksumLocation", "init_performance", "init_performance", "init_performance", "feature", "init_performance", "context", "feature", "init_performance", "init_performance", "init_client", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_performance", "init_utils", "init_performance", "init_performance", "init_dist_es", "init_utils", "context", "config", "identity", "error", "init_performance", "init_dist_es", "init_utils", "identity", "config", "init_performance", "init_performance", "init_performance", "init_getSmithyContext", "init_performance", "context", "init_performance", "init_dist_es", "init_performance", "init_getSmithyContext", "init_performance", "map", "init_performance", "init_dist_es", "config", "context", "init_performance", "config", "init_performance", "init_performance", "init_performance", "init_dist_es", "error", "config", "context", "identity", "init_performance", "config", "init_performance", "normalizeProvider", "init_normalizeProvider", "init_performance", "config", "init_performance", "init_performance", "i", "c", "init_performance", "i", "j", "k", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "i", "j", "k", "init_performance", "init_dist_es", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_performance", "init_dist_es", "encoder", "transform", "error", "init_performance", "i", "logger", "size", "s", "init_performance", "init_performance", "init_performance", "init_performance", "c", "init_performance", "init_dist_es", "init_performance", "i", "init_dist_es", "init_performance", "url", "init_performance", "init_performance", "abortError", "init_performance", "init_dist_es", "requestTimeout", "url", "body", "config", "blob", "base64", "init_performance", "init_dist_es", "init_dist_es", "init_performance", "i", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "blob", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "context", "c", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "config", "context", "n", "t", "i", "o", "error", "e", "k", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "url", "hostname", "init_performance", "init_dist_es", "init_endpoints", "init_performance", "init_performance", "init_endpoints", "init_dist_es", "config", "context", "n", "t", "i", "o", "config", "init_performance", "Schema", "init_performance", "init_performance", "Schema", "init_performance", "Schema", "init_performance", "Schema", "init_performance", "Schema", "init_performance", "i", "init_performance", "init_performance", "i", "ns", "k", "v", "z", "init_performance", "Schema", "init_sentinels", "init_performance", "init_performance", "k", "v", "r", "registry", "init_schema", "init_performance", "init_sentinels", "init_performance", "logger", "init_performance", "message", "s", "date", "year", "init_performance", "match", "day", "time", "init_performance", "init_performance", "i", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_performance", "LazyJsonString", "object", "init_performance", "v", "max", "time", "year", "RFC3339_WITH_OFFSET", "IMF_FIXDATE", "RFC_850_DATE", "ASC_TIME", "init_performance", "date", "sign", "day", "hour", "minute", "i", "init_performance", "init_performance", "z", "i", "v", "init_performance", "string", "object", "init_serde", "init_performance", "init_performance", "init_performance", "init_dist_es", "member", "init_performance", "init_performance", "init_schema", "init_dist_es", "k", "v", "member", "EventStreamSerde", "context", "init_performance", "init_schema", "init_serde", "init_dist_es", "context", "isStreaming", "member", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_schema", "init_serde", "init_dist_es", "format", "init_performance", "init_schema", "init_dist_es", "toString", "init_performance", "init_schema", "init_serde", "init_dist_es", "format", "init_performance", "init_schema", "init_performance", "init_requestBuilder", "init_performance", "setFeature", "context", "feature", "init_setFeature", "init_performance", "init_performance", "config", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "isIdentityExpired", "identity", "init_performance", "init_dist_es", "init_performance", "init_normalizeProvider", "init_requestBuilder", "init_setFeature", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "config", "normalizeProvider", "init_constants", "init_performance", "init_performance", "init_dist_es", "init_constants", "hash", "init_performance", "init_constants", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_constants", "i", "init_performance", "init_dist_es", "HEADER_VALUE_TYPE", "number", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_constants", "init_performance", "init_dist_es", "init_constants", "value", "serialized", "init_performance", "time", "init_performance", "init_dist_es", "hash", "init_performance", "init_dist_es", "init_constants", "hash", "promise", "init_performance", "init_dist_es", "init_performance", "init_constants", "config", "normalizeProvider", "init_performance", "init_client", "init_dist_es", "init_performance", "init_httpAuthSchemes", "init_performance", "init_performance", "i", "init_dist_es", "init_performance", "init_performance", "a", "b", "debug", "middleware", "entry", "context", "init_dist_es", "init_performance", "init_client", "init_performance", "init_dist_es", "config", "cb", "handlers", "init_collect_stream_body", "init_performance", "object", "member", "init_performance", "init_schema", "init_command", "init_performance", "init_dist_es", "logger", "cb", "operation", "init_constants", "init_performance", "init_performance", "commands", "Client", "cb", "command", "paginators", "waiters", "config", "init_performance", "v", "k", "message", "init_performance", "init_performance", "init_emitWarningIfUnsupportedVersion", "init_performance", "init_extended_encode_uri_component", "init_performance", "init_checksum", "init_performance", "init_retry", "init_performance", "init_defaultExtensionConfiguration", "init_performance", "init_checksum", "init_retry", "config", "init_extensions", "init_performance", "init_defaultExtensionConfiguration", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_resolve_path", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_client", "init_collect_stream_body", "init_command", "init_constants", "init_emitWarningIfUnsupportedVersion", "init_extended_encode_uri_component", "init_extensions", "init_resolve_path", "init_serde", "init_performance", "init_schema", "init_dist_es", "m", "registry", "e", "error", "Error", "k", "v", "init_performance", "init_performance", "init_performance", "init_performance", "k", "v", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "hasChildren", "c", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_schema", "buffer", "v", "value", "union", "e", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_schema", "init_serde", "k", "v", "array", "container", "map", "format", "init_performance", "init_performance", "init_schema", "context", "message", "member", "init_protocols", "init_performance", "init_dist_es", "init_performance", "init_client", "init_httpAuthSchemes", "init_protocols", "init_performance", "init_constants", "init_performance", "init_constants", "hasHeader", "init_performance", "init_performance", "init_performance", "init_dist_es", "P", "e", "t", "f", "y", "g", "n", "v", "o", "s", "m", "i", "init_performance", "fromUtf8", "init_fromUtf8_browser", "init_performance", "init_toUint8Array", "init_performance", "init_fromUtf8_browser", "init_toUtf8_browser", "init_performance", "init_dist_es", "init_performance", "init_fromUtf8_browser", "init_toUint8Array", "init_toUtf8_browser", "fromUtf8", "init_performance", "init_dist_es", "init_performance", "init_performance", "a_lookUpTable", "init_performance", "init_performance", "init_performance", "init_module", "AwsCrc32c", "init_module", "init_performance", "Crc32c", "init_performance", "table", "i", "j", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_module", "AwsCrc32", "lookupTable", "Crc32", "init_performance", "init_module", "init_types", "init_performance", "init_constants", "init_performance", "init_module", "init_dist_es", "init_constants", "init_types", "config", "init_performance", "init_dist_es", "hash", "init_performance", "init_dist_es", "init_constants", "config", "context", "getAwsChunkedEncodingStream", "hasHeader", "e", "init_performance", "init_dist_es", "init_constants", "config", "context", "init_performance", "init_types", "init_performance", "number", "init_performance", "init_performance", "init_dist_es", "init_constants", "config", "logger", "error", "init_performance", "init_dist_es", "config", "context", "init_performance", "config", "init_performance", "init_dist_es", "init_constants", "init_dist_es", "init_performance", "init_constants", "init_dist_es", "init_performance", "init_performance", "context", "logger", "error", "init_dist_es", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "context", "message", "init_performance", "init_dist_es", "init_performance", "config", "context", "e", "context", "e", "init_performance", "init_performance", "init_dist_es", "config", "context", "e", "init_performance", "init_performance", "init_performance", "cache", "identity", "error", "init_constants", "init_performance", "init_performance", "init_dist_es", "init_constants", "init_performance", "init_dist_es", "init_constants", "context", "init_performance", "defaultErrorHandler", "defaultSuccessHandler", "init_performance", "init_dist_es", "error", "config", "context", "identity", "init_performance", "init_performance", "collectBody", "init_performance", "init_dist_es", "config", "context", "init_dist_es", "init_performance", "context", "e", "init_performance", "init_performance", "init_dist_es", "init_dist_es", "init_performance", "normalizeProvider", "logger", "init_performance", "init_dist_es", "init_performance", "i", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "message", "init_performance", "init_EndpointRuleObject", "init_performance", "init_ErrorRuleObject", "init_performance", "init_RuleSetObject", "init_performance", "init_TreeRuleObject", "init_performance", "init_shared", "init_performance", "init_types", "init_performance", "init_EndpointRuleObject", "init_ErrorRuleObject", "init_RuleSetObject", "init_TreeRuleObject", "init_shared", "init_performance", "init_performance", "init_types", "init_performance", "init_types", "init_performance", "not", "init_performance", "init_performance", "hostname", "protocol", "url", "k", "v", "error", "init_performance", "init_performance", "init_performance", "c", "init_performance", "init_performance", "not", "init_performance", "init_performance", "group", "init_performance", "init_types", "argv", "init_performance", "init_performance", "init_types", "init_performance", "init_performance", "init_types", "group", "init_performance", "init_types", "init_performance", "init_types", "error", "init_performance", "url", "init_performance", "init_types", "error", "group", "init_performance", "init_types", "init_utils", "init_performance", "init_performance", "init_types", "init_utils", "logger", "v", "k", "init_dist_es", "init_performance", "init_types", "init_isIpAddress", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_isIpAddress", "init_performance", "partition", "init_performance", "partition", "init_performance", "init_dist_es", "init_performance", "init_resolveEndpoint", "init_performance", "init_EndpointError", "init_performance", "init_EndpointRuleObject", "init_performance", "init_ErrorRuleObject", "init_performance", "init_RuleSetObject", "init_performance", "init_TreeRuleObject", "init_performance", "init_shared", "init_performance", "init_types", "init_performance", "init_EndpointError", "init_EndpointRuleObject", "init_ErrorRuleObject", "init_RuleSetObject", "init_TreeRuleObject", "init_shared", "init_dist_es", "init_performance", "init_isIpAddress", "init_resolveEndpoint", "init_types", "init_config", "init_performance", "RETRY_MODES", "init_constants", "init_performance", "init_dist_es", "init_performance", "init_constants", "error", "init_performance", "init_dist_es", "t", "init_constants", "init_performance", "init_performance", "init_constants", "init_performance", "init_constants", "init_performance", "init_config", "init_constants", "error", "init_performance", "init_config", "init_performance", "init_types", "init_performance", "init_dist_es", "init_performance", "init_config", "init_constants", "init_types", "context", "config", "identity", "init_performance", "init_dist_es", "init_constants", "init_performance", "features", "init_performance", "init_performance", "init_dist_es", "init_constants", "context", "version", "config", "init_dist_es", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_config", "init_performance", "init_performance", "init_dist_es", "check", "init_performance", "init_performance", "init_performance", "init_performance", "init_config", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_performance", "CONTENT_LENGTH_HEADER", "error", "init_dist_es", "init_performance", "init_performance", "partition", "init_performance", "init_performance", "config", "hostname", "init_performance", "toEndpointV1", "init_toEndpointV1", "init_performance", "init_dist_es", "init_performance", "init_toEndpointV1", "context", "toEndpointV1", "init_performance", "init_toEndpointV1", "init_performance", "init_dist_es", "config", "context", "setFeature", "init_performance", "init_performance", "serializerMiddlewareOption", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "serializerMiddlewareOption", "config", "init_performance", "init_dist_es", "init_toEndpointV1", "toEndpointV1", "init_performance", "init_types", "init_performance", "init_dist_es", "init_performance", "init_types", "init_performance", "init_performance", "init_util", "init_performance", "error", "init_StandardRetryStrategy", "init_performance", "init_AdaptiveRetryStrategy", "init_performance", "init_configurations", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_util", "context", "isRequest", "e", "error", "init_dist_es", "init_performance", "init_AdaptiveRetryStrategy", "init_StandardRetryStrategy", "init_configurations", "init_performance", "init_performance", "init_dist_es", "init_dist_es", "init_performance", "init_performance", "cache", "init_performance", "init_dist_es", "context", "config", "context", "init_performance", "init_dist_es", "defaultEndpointResolver", "s", "name", "init_performance", "init_performance", "init_dist_es", "init_errors", "init_performance", "init_performance", "init_schema", "init_errors", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "fromUtf8", "init_fromUtf8_browser", "init_performance", "init_toUint8Array", "init_performance", "init_fromUtf8_browser", "init_toUtf8_browser", "init_performance", "init_dist_es", "init_performance", "init_fromUtf8_browser", "init_toUint8Array", "init_toUtf8_browser", "isEmptyData", "init_isEmptyData", "init_performance", "init_constants", "init_performance", "init_dist_es", "init_performance", "convertToBuffer", "fromUtf8", "init_performance", "init_dist_es", "init_isEmptyData", "init_constants", "Sha1", "isEmptyData", "window", "subtle", "getRandomValues", "init_module", "init_performance", "Sha1", "init_performance", "init_module", "init_dist_es", "init_module", "init_performance", "init_constants", "init_performance", "init_performance", "init_constants", "init_dist_es", "Sha256", "init_constants", "init_performance", "init_performance", "init_constants", "RawSha256", "i", "_a", "u", "t1", "t2", "Sha256", "init_constants", "e", "i", "init_module", "init_performance", "Sha256", "init_performance", "init_module", "init_dist_es", "init_module", "init_performance", "init_dist_es", "init_performance", "config", "navigator", "negate", "i", "Int64", "init_performance", "init_dist_es", "number", "HEADER_VALUE_TYPE", "UUID_PATTERN", "init_performance", "init_dist_es", "toUtf8", "fromUtf8", "Int64", "init_performance", "init_module", "init_performance", "init_module", "toUtf8", "fromUtf8", "message", "init_performance", "init_performance", "init_performance", "init_performance", "message", "init_performance", "init_dist_es", "init_performance", "iterator", "init_performance", "toUtf8", "message", "error", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "init_utils", "init_performance", "iterator", "EventStreamMarshaller", "isReadableStream", "init_EventStreamMarshaller", "init_performance", "init_dist_es", "init_utils", "init_provider", "init_performance", "init_EventStreamMarshaller", "EventStreamMarshaller", "init_dist_es", "init_performance", "init_EventStreamMarshaller", "init_provider", "init_utils", "blob", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "blobHasher", "blob", "hash", "init_performance", "init_performance", "message", "init_dist_es", "init_performance", "BLOCK_SIZE", "DIGEST_LENGTH", "INIT", "init_constants", "init_performance", "q", "a", "b", "x", "s", "t", "c", "d", "isEmptyData", "convertToBuffer", "init_dist_es", "init_performance", "init_constants", "BLOCK_SIZE", "i", "DIGEST_LENGTH", "INIT", "init_constants", "init_performance", "init_performance", "init_dist_es", "init_constants", "navigator", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_protocols", "config", "getRuntimeConfig", "init_performance", "init_module", "init_dist_es", "config", "Sha1", "Sha256", "init_extensions", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_extensions", "init_performance", "config", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_schema", "getRuntimeConfig", "config", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "hash", "init_dist_es", "init_performance", "config", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_dist_es", "init_performance", "config", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_waiter", "init_performance", "WaiterState", "init_performance", "init_waiter", "max", "message", "state", "reason", "init_performance", "init_utils", "init_performance", "init_performance", "init_utils", "init_waiter", "promise", "finalize", "aborted", "init_dist_es", "init_performance", "init_waiter", "init_performance", "init_dist_es", "checkState", "init_performance", "init_dist_es", "checkState", "init_performance", "init_dist_es", "checkState", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_pagination", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_pagination", "init_errors", "hostname", "init_dist_es", "init_performance", "UNSIGNED_PAYLOAD", "SHA256_HEADER", "init_constants", "init_performance", "init_performance", "init_dist_es", "init_constants", "SHA256_HEADER", "UNSIGNED_PAYLOAD", "init_performance", "init_dist_es", "context", "presigned", "init_dist_es", "init_performance", "error", "domain", "s3Url", "url", "u", "init_performance", "init_dist_es", "middlewares: AnyMiddlewareFunction[]", "fn: MiddlewareFunction<\n TContext,\n TMeta,\n object,\n $ContextOverrides,\n TInputOut\n >", "parse: ParseFn", "inputMiddleware: AnyMiddlewareFunction", "parsedInput: ReturnType", "parse", "parse: ParseFn", "outputMiddleware: AnyMiddlewareFunction", "procedureParser: Parser", "parser", "def1: AnyProcedureBuilderDef", "def2: Partial", "meta", "import_objectSpread2$1", "initDef: Partial", "_def: AnyProcedureBuilderDef", "builder: AnyProcedureBuilder", "output: Parser", "builder", "resolver: ProcedureResolver", "_defIn: AnyProcedureBuilderDef & { type: ProcedureType }", "resolver: AnyResolver", "_def: AnyProcedure['_def']", "index: number", "opts: ProcedureCallOptions", "middleware", "_nextOpts?: any", "opts: ProcedureCallOptions", "isServerDefault: boolean", "issues: ReadonlyArray", "r", "e", "t", "n", "_objectWithoutProperties", "o", "i", "s", "TRPCBuilder", "opts?: ValidateShape>", "config: RootConfig<$Root>", "isServer: boolean", "config", "init_dist", "init_performance", "t", "router", "createCallerFactory", "init_performance", "init_dist", "duration", "error", "s", "tag", "error", "getProductById", "productSlots", "d", "t", "getAllProducts", "specialDeals", "productTags", "init_performance", "tag", "p", "error", "init_performance", "getAllProducts", "init_common", "init_performance", "router", "init_performance", "init_common", "c", "error", "router", "init_performance", "Hono", "router", "commonRouter", "init_performance", "Hono", "router", "init_performance", "Hono", "router", "init_performance", "Hono", "c", "init_performance", "c", "error", "router", "init_performance", "Hono", "c", "initializer", "i", "k", "_a", "config", "init_core", "init_performance", "assert", "isObject", "isPlainObject", "merge", "_x", "v", "k", "array", "set", "match", "object", "i", "chars", "o", "cl", "a", "b", "Class", "x", "_a", "message", "config", "t", "base64", "base64url", "hex", "init_util", "init_performance", "F", "error", "issue", "i", "_a", "a", "b", "init_errors", "init_performance", "init_core", "init_util", "encode", "decode", "init_performance", "init_core", "init_errors", "init_util", "_Err", "e", "config", "bigint", "date", "domain", "integer", "time", "init_performance", "init_util", "version", "init_checks", "init_performance", "init_core", "init_util", "_a", "origin", "inst", "integer", "result", "init_performance", "x", "F", "version", "init_performance", "base64", "c", "k", "t", "r", "config", "a", "b", "isPlainObject", "f", "init_performance", "init_checks", "init_core", "init_util", "_a", "version", "ch", "checks", "checkResult", "canary", "result", "_", "v", "url", "date", "time", "bigint", "isDate", "i", "desc", "isObject", "allowsEval", "o", "p", "results", "map", "left", "right", "keyResult", "valueResult", "output", "x", "F", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "count", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "t", "e", "origin", "issue", "v", "be", "error", "init_performance", "init_util", "origin", "issue", "count", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "init_performance", "error", "init_performance", "init_util", "origin", "issue", "number", "error", "init_performance", "init_util", "text", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "count", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "init_performance", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "init_performance", "_a", "init_performance", "meta", "p", "f", "Class", "_emoji", "_undefined", "_null", "ch", "v", "issue", "codec", "format", "init_performance", "init_checks", "init_util", "process", "_a", "meta", "id", "schema", "init_performance", "registry", "ctx", "process", "init_performance", "init_util", "json", "format", "v", "file", "m", "x", "i", "a", "b", "init_performance", "process", "init_performance", "core_exports", "_emoji", "_null", "_undefined", "config", "decode", "encode", "process", "version", "init_core", "init_performance", "init_errors", "init_checks", "init_util", "checks_exports", "init_checks", "init_performance", "init_core", "date", "datetime", "duration", "time", "init_performance", "init_core", "init_schemas", "initializer", "init_errors", "init_performance", "init_core", "init_util", "issue", "issues", "parse", "parseAsync", "safeParse", "safeParseAsync", "encode", "decode", "encodeAsync", "decodeAsync", "safeEncode", "safeDecode", "safeEncodeAsync", "safeDecodeAsync", "init_parse", "init_performance", "init_core", "init_errors", "schemas_exports", "_default", "base64", "base64url", "bigint", "boolean", "_catch", "check", "cidrv4", "cidrv6", "cuid", "cuid2", "date", "describe", "e164", "email", "emoji", "_enum", "guid", "hex", "hostname", "ipv4", "ipv6", "ksuid", "lazy", "mac", "meta", "nanoid", "_null", "nullish", "number", "string", "ulid", "_undefined", "union", "uuid", "_void", "xid", "_emoji", "format", "k", "v", "ch", "init_schemas", "init_performance", "init_core", "init_checks", "init_parse", "def", "parse", "safeParse", "parseAsync", "safeParseAsync", "encode", "decode", "encodeAsync", "decodeAsync", "safeEncode", "safeDecode", "safeEncodeAsync", "safeDecodeAsync", "cl", "json", "datetime", "time", "duration", "c", "issue", "output", "map", "config", "init_performance", "init_core", "ZodFirstPartyTypeKind", "z", "zodSchema", "v", "t", "format", "objectSchema", "i", "s", "version", "init_performance", "init_checks", "init_schemas", "schemas_exports", "checks_exports", "bigint", "boolean", "date", "number", "string", "init_performance", "init_core", "init_schemas", "_default", "base64", "base64url", "bigint", "boolean", "_catch", "check", "cidrv4", "cidrv6", "config", "core_exports", "cuid", "cuid2", "date", "decode", "decodeAsync", "describe", "e164", "email", "emoji", "encode", "encodeAsync", "_enum", "guid", "hex", "hostname", "ipv4", "ipv6", "ksuid", "lazy", "mac", "meta", "nanoid", "_null", "nullish", "number", "parse", "parseAsync", "safeDecode", "safeDecodeAsync", "safeEncode", "safeEncodeAsync", "safeParse", "safeParseAsync", "string", "ulid", "_undefined", "union", "uuid", "_void", "xid", "init_performance", "init_core", "init_schemas", "init_checks", "init_errors", "init_parse", "init_performance", "init_complaint", "init_performance", "router", "c", "init_performance", "t", "e", "n", "r", "i", "s", "u", "a", "o", "c", "f", "h", "d", "l", "y", "M", "m", "v", "g", "D", "p", "S", "w", "O", "b", "$", "k", "init_coupon", "init_performance", "router", "dayjs", "au", "ap", "AbortController", "Headers", "Request", "Response", "fetch", "init_performance", "init_performance", "k", "init_performance", "libDefault", "init_performance", "init_performance", "count", "run", "error", "map", "e", "init_performance", "init_performance", "self", "i", "error", "message", "count", "init_performance", "i", "a", "b", "original", "require_retry", "init_performance", "init_performance", "operation", "number", "url", "e", "message", "json", "text", "error", "Expo", "init_performance", "init_performance", "init_performance", "channel", "message", "init_performance", "isFunction", "isArrayBuffer", "i", "l", "_key", "merge", "isPlainObject", "isObject", "G", "isReadableStream", "extend", "toCamelCase", "noop", "init_utils", "init_performance", "cache", "prototype", "e", "context", "a", "b", "filter", "m", "hasOwnProperty", "define", "cb", "init_performance", "init_utils", "error", "config", "message", "init_performance", "i", "init_performance", "init_utils", "encode", "match", "init_performance", "toString", "encoder", "_encode", "encode", "url", "_encode", "init_performance", "init_utils", "init_performance", "init_utils", "h", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_utils", "init_performance", "init_performance", "init_utils", "init_performance", "init_utils", "match", "i", "init_performance", "init_utils", "parser", "encoder", "e", "init_performance", "init_utils", "isFormData", "isFileList", "transitional", "init_performance", "init_utils", "i", "parser", "match", "context", "filter", "w", "init_performance", "init_utils", "self", "parser", "i", "format", "prototype", "config", "context", "transform", "init_performance", "init_utils", "init_performance", "init_performance", "message", "config", "validateStatus", "init_performance", "url", "match", "init_performance", "i", "init_performance", "flush", "init_performance", "init_performance", "init_utils", "e", "init_performance", "origin", "url", "init_performance", "init_utils", "domain", "match", "url", "init_performance", "init_performance", "init_performance", "config2", "config", "a", "b", "merge", "init_performance", "init_utils", "init_performance", "init_utils", "config", "init_performance", "init_utils", "config", "transitional", "init_performance", "init_utils", "aborted", "signal", "init_performance", "iterator", "e", "done", "isFunction", "ReadableStream", "TextEncoder", "init_fetch", "init_performance", "init_utils", "Request", "Response", "e", "env", "encoder", "config", "url", "flush", "fetch", "i", "map", "config", "adapter", "i", "s", "init_performance", "init_utils", "init_fetch", "e", "config", "adapter", "init_performance", "init_performance", "i", "init_performance", "version", "message", "desc", "validators", "init_performance", "init_utils", "config", "e", "transitional", "promise", "i", "error", "url", "init_performance", "i", "promise", "message", "config", "abort", "c", "init_performance", "init_performance", "init_utils", "init_performance", "context", "init_performance", "init_utils", "Axios", "AxiosError", "CanceledError", "isCancel", "CancelToken", "VERSION", "all", "isAxiosError", "spread", "toFormData", "AxiosHeaders", "HttpStatusCode", "getAdapter", "mergeConfig", "init_axios", "init_performance", "init_performance", "init_performance", "message", "error", "error", "init_performance", "init_order", "init_performance", "router", "orders", "e", "import_dayjs", "init_vendor_snippets", "init_performance", "router", "e", "sum", "p", "dayjs", "init_performance", "error", "init_performance", "init_performance", "constants", "error", "c", "error", "s", "pid", "init_performance", "error", "init_performance", "isNumber", "j", "e", "f", "h", "Q", "hh", "i", "n", "init_util", "init_performance", "ax", "ay", "bx", "by", "cx", "cy", "c", "_i", "t1", "t0", "u3", "B", "u", "D", "init_performance", "init_util", "bc", "ca", "ab", "u", "init_performance", "init_util", "bc", "ca", "ab", "aa", "bb", "cc", "u", "v", "abt", "bct", "cat", "_8", "_16", "fin", "fin2", "init_performance", "init_util", "ab", "bc", "cd", "ac", "bd", "ce", "_8", "_8b", "_16", "_48", "fin", "init_performance", "init_util", "init_performance", "p", "polygon", "i", "ii", "k", "f", "u2", "v2", "x", "y", "init_esm", "init_performance", "point", "polygon", "i", "init_esm", "init_esm", "init_performance", "polygon", "init_performance", "init_common", "init_esm", "router", "point", "error", "tag", "init_stores", "init_performance", "router", "dayjs", "a", "b", "import_dayjs", "init_slots", "init_performance", "router", "init_banners", "init_performance", "router", "init_types", "init_performance", "init_shared", "init_performance", "init_types", "error", "init_retry", "init_performance", "error", "e", "init_performance", "init_axios", "init_common", "init_stores", "init_slots", "init_banners", "init_shared", "init_retry", "init_performance", "error", "slotsRouter", "init_slots", "init_performance", "init_dist", "router", "e", "init_product", "init_performance", "router", "url", "group", "m", "tag", "init_performance", "sign", "verify", "hash", "init_node", "init_performance", "init_constants", "init_performance", "init_crypto", "init_performance", "init_constants", "init_node", "randomUUID", "subtle", "webcrypto", "init_crypto", "init_performance", "hash", "sign", "verify", "randomBytes", "callback", "nextTick", "hash", "salt", "unknown", "i", "string", "c", "k", "b", "off", "s", "o", "P", "S", "n", "l", "r", "j", "err", "encodeBase64", "decodeBase64", "init_performance", "init_crypto", "init_staff_user", "init_performance", "router", "init_store", "init_performance", "router", "e", "error", "init_payments", "init_performance", "router", "bannerRouter", "init_banner", "init_performance", "router", "error", "e", "init_user", "init_performance", "count", "u", "o", "s", "c", "title", "text", "t", "error", "init_const", "init_performance", "router", "constants", "c", "init_performance", "init_complaint", "init_coupon", "init_order", "init_vendor_snippets", "init_slots", "init_product", "init_staff_user", "init_store", "init_payments", "init_banner", "init_user", "init_const", "router", "slotsRouter", "bannerRouter", "url", "error", "init_performance", "init_axios", "init_address", "init_performance", "router", "init_performance", "init_auth", "init_performance", "router", "getUserByMobile", "email", "init_cart", "init_performance", "sum", "router", "getProductById", "complaintRouter", "init_complaint", "init_performance", "router", "orderRouter", "init_order", "init_performance", "init_common", "constants", "minOrderValue", "deliveryCharge", "getProductById", "sum", "router", "i", "orderStatus", "u", "e", "updateOrderNotes", "import_dayjs", "productRouter", "init_product", "init_performance", "router", "getProductById", "dayjs", "getProductReviews", "url", "error", "getAllProducts", "userRouter", "init_user", "init_performance", "router", "getUserById", "init_coupon", "init_performance", "desc", "router", "au", "e", "ap", "init_performance", "init_payments", "init_performance", "init_crypto", "router", "init_performance", "router", "error", "init_performance", "router", "tag", "userRouter", "init_performance", "init_address", "init_auth", "init_banners", "init_cart", "init_complaint", "init_order", "init_product", "init_slots", "init_user", "init_coupon", "init_payments", "init_stores", "router", "complaintRouter", "orderRouter", "productRouter", "init_router", "init_performance", "router", "userRouter", "init_performance", "init_dist", "init_router", "Hono", "error", "c", "message", "init_performance", "init_performance", "init_performance", "env", "createApp", "initDb", "init_performance", "env", "e", "init_performance", "e", "env", "error", "init_performance", "env", "middleware", "env"] +} diff --git a/apps/backend/.wrangler/tmp/dev-knF4eP/worker.js b/apps/backend/.wrangler/tmp/dev-knF4eP/worker.js new file mode 100644 index 0000000..a9833c6 --- /dev/null +++ b/apps/backend/.wrangler/tmp/dev-knF4eP/worker.js @@ -0,0 +1,77854 @@ +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 __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __commonJS = (cb2, mod) => function __require() { + return mod || (0, cb2[__getOwnPropNames(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all3) => { + for (var name in all3) + __defProp(target, name, { get: all3[name], enumerable: true }); +}; +var __copyProps = (to, from, except2, desc2) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except2) + __defProp(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.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 __publicField = (obj, key, value) => { + __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); + return value; +}; + +// .wrangler/tmp/bundle-GYbPT2/strip-cf-connecting-ip-header.js +function stripCfConnectingIPHeader(input, init) { + const request = new Request(input, init); + request.headers.delete("CF-Connecting-IP"); + return request; +} +var init_strip_cf_connecting_ip_header = __esm({ + ".wrangler/tmp/bundle-GYbPT2/strip-cf-connecting-ip-header.js"() { + "use strict"; + __name(stripCfConnectingIPHeader, "stripCfConnectingIPHeader"); + globalThis.fetch = new Proxy(globalThis.fetch, { + apply(target, thisArg, argArray) { + return Reflect.apply(target, thisArg, [ + stripCfConnectingIPHeader.apply(null, argArray) + ]); + } + }); + } +}); + +// ../../node_modules/unenv/dist/runtime/_internal/utils.mjs +function createNotImplementedError(name) { + return new Error(`[unenv] ${name} is not implemented yet!`); +} +function notImplemented(name) { + const fn = /* @__PURE__ */ __name(() => { + throw createNotImplementedError(name); + }, "fn"); + return Object.assign(fn, { __unenv__: true }); +} +function notImplementedClass(name) { + return class { + __unenv__ = true; + constructor() { + throw new Error(`[unenv] ${name} is not implemented yet!`); + } + }; +} +var init_utils = __esm({ + "../../node_modules/unenv/dist/runtime/_internal/utils.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(createNotImplementedError, "createNotImplementedError"); + __name(notImplemented, "notImplemented"); + __name(notImplementedClass, "notImplementedClass"); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/perf_hooks/performance.mjs +var _timeOrigin, _performanceNow, nodeTiming, PerformanceEntry, PerformanceMark, PerformanceMeasure, PerformanceResourceTiming, PerformanceObserverEntryList, Performance, PerformanceObserver, performance; +var init_performance = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/perf_hooks/performance.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils(); + _timeOrigin = globalThis.performance?.timeOrigin ?? Date.now(); + _performanceNow = globalThis.performance?.now ? globalThis.performance.now.bind(globalThis.performance) : () => Date.now() - _timeOrigin; + nodeTiming = { + name: "node", + entryType: "node", + startTime: 0, + duration: 0, + nodeStart: 0, + v8Start: 0, + bootstrapComplete: 0, + environment: 0, + loopStart: 0, + loopExit: 0, + idleTime: 0, + uvMetricsInfo: { + loopCount: 0, + events: 0, + eventsWaiting: 0 + }, + detail: void 0, + toJSON() { + return this; + } + }; + PerformanceEntry = class { + __unenv__ = true; + detail; + entryType = "event"; + name; + startTime; + constructor(name, options) { + this.name = name; + this.startTime = options?.startTime || _performanceNow(); + this.detail = options?.detail; + } + get duration() { + return _performanceNow() - this.startTime; + } + toJSON() { + return { + name: this.name, + entryType: this.entryType, + startTime: this.startTime, + duration: this.duration, + detail: this.detail + }; + } + }; + __name(PerformanceEntry, "PerformanceEntry"); + PerformanceMark = /* @__PURE__ */ __name(class PerformanceMark2 extends PerformanceEntry { + entryType = "mark"; + constructor() { + super(...arguments); + } + get duration() { + return 0; + } + }, "PerformanceMark"); + PerformanceMeasure = class extends PerformanceEntry { + entryType = "measure"; + }; + __name(PerformanceMeasure, "PerformanceMeasure"); + PerformanceResourceTiming = class extends PerformanceEntry { + entryType = "resource"; + serverTiming = []; + connectEnd = 0; + connectStart = 0; + decodedBodySize = 0; + domainLookupEnd = 0; + domainLookupStart = 0; + encodedBodySize = 0; + fetchStart = 0; + initiatorType = ""; + name = ""; + nextHopProtocol = ""; + redirectEnd = 0; + redirectStart = 0; + requestStart = 0; + responseEnd = 0; + responseStart = 0; + secureConnectionStart = 0; + startTime = 0; + transferSize = 0; + workerStart = 0; + responseStatus = 0; + }; + __name(PerformanceResourceTiming, "PerformanceResourceTiming"); + PerformanceObserverEntryList = class { + __unenv__ = true; + getEntries() { + return []; + } + getEntriesByName(_name, _type) { + return []; + } + getEntriesByType(type) { + return []; + } + }; + __name(PerformanceObserverEntryList, "PerformanceObserverEntryList"); + Performance = class { + __unenv__ = true; + timeOrigin = _timeOrigin; + eventCounts = /* @__PURE__ */ new Map(); + _entries = []; + _resourceTimingBufferSize = 0; + navigation = void 0; + timing = void 0; + timerify(_fn, _options) { + throw createNotImplementedError("Performance.timerify"); + } + get nodeTiming() { + return nodeTiming; + } + eventLoopUtilization() { + return {}; + } + markResourceTiming() { + return new PerformanceResourceTiming(""); + } + onresourcetimingbufferfull = null; + now() { + if (this.timeOrigin === _timeOrigin) { + return _performanceNow(); + } + return Date.now() - this.timeOrigin; + } + clearMarks(markName) { + this._entries = markName ? this._entries.filter((e2) => e2.name !== markName) : this._entries.filter((e2) => e2.entryType !== "mark"); + } + clearMeasures(measureName) { + this._entries = measureName ? this._entries.filter((e2) => e2.name !== measureName) : this._entries.filter((e2) => e2.entryType !== "measure"); + } + clearResourceTimings() { + this._entries = this._entries.filter((e2) => e2.entryType !== "resource" || e2.entryType !== "navigation"); + } + getEntries() { + return this._entries; + } + getEntriesByName(name, type) { + return this._entries.filter((e2) => e2.name === name && (!type || e2.entryType === type)); + } + getEntriesByType(type) { + return this._entries.filter((e2) => e2.entryType === type); + } + mark(name, options) { + const entry = new PerformanceMark(name, options); + this._entries.push(entry); + return entry; + } + measure(measureName, startOrMeasureOptions, endMark) { + let start; + let end; + if (typeof startOrMeasureOptions === "string") { + start = this.getEntriesByName(startOrMeasureOptions, "mark")[0]?.startTime; + end = this.getEntriesByName(endMark, "mark")[0]?.startTime; + } else { + start = Number.parseFloat(startOrMeasureOptions?.start) || this.now(); + end = Number.parseFloat(startOrMeasureOptions?.end) || this.now(); + } + const entry = new PerformanceMeasure(measureName, { + startTime: start, + detail: { + start, + end + } + }); + this._entries.push(entry); + return entry; + } + setResourceTimingBufferSize(maxSize) { + this._resourceTimingBufferSize = maxSize; + } + addEventListener(type, listener, options) { + throw createNotImplementedError("Performance.addEventListener"); + } + removeEventListener(type, listener, options) { + throw createNotImplementedError("Performance.removeEventListener"); + } + dispatchEvent(event) { + throw createNotImplementedError("Performance.dispatchEvent"); + } + toJSON() { + return this; + } + }; + __name(Performance, "Performance"); + PerformanceObserver = class { + __unenv__ = true; + _callback = null; + constructor(callback) { + this._callback = callback; + } + takeRecords() { + return []; + } + disconnect() { + throw createNotImplementedError("PerformanceObserver.disconnect"); + } + observe(options) { + throw createNotImplementedError("PerformanceObserver.observe"); + } + bind(fn) { + return fn; + } + runInAsyncScope(fn, thisArg, ...args) { + return fn.call(thisArg, ...args); + } + asyncId() { + return 0; + } + triggerAsyncId() { + return 0; + } + emitDestroy() { + return this; + } + }; + __name(PerformanceObserver, "PerformanceObserver"); + __publicField(PerformanceObserver, "supportedEntryTypes", []); + performance = globalThis.performance && "addEventListener" in globalThis.performance ? globalThis.performance : new Performance(); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/perf_hooks.mjs +var init_perf_hooks = __esm({ + "../../node_modules/unenv/dist/runtime/node/perf_hooks.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_performance(); + } +}); + +// ../../node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs +var init_performance2 = __esm({ + "../../node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs"() { + init_perf_hooks(); + globalThis.performance = performance; + globalThis.Performance = Performance; + globalThis.PerformanceEntry = PerformanceEntry; + globalThis.PerformanceMark = PerformanceMark; + globalThis.PerformanceMeasure = PerformanceMeasure; + globalThis.PerformanceObserver = PerformanceObserver; + globalThis.PerformanceObserverEntryList = PerformanceObserverEntryList; + globalThis.PerformanceResourceTiming = PerformanceResourceTiming; + } +}); + +// ../../node_modules/unenv/dist/runtime/mock/noop.mjs +var noop_default; +var init_noop = __esm({ + "../../node_modules/unenv/dist/runtime/mock/noop.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + noop_default = Object.assign(() => { + }, { __unenv__: true }); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/console.mjs +import { Writable } from "node:stream"; +var _console, _ignoreErrors, _stderr, _stdout, log, info, trace, debug, table, error, warn, createTask, clear, count, countReset, dir, dirxml, group, groupEnd, groupCollapsed, profile, profileEnd, time, timeEnd, timeLog, timeStamp, Console, _times, _stdoutErrorHandler, _stderrErrorHandler; +var init_console = __esm({ + "../../node_modules/unenv/dist/runtime/node/console.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_noop(); + init_utils(); + _console = globalThis.console; + _ignoreErrors = true; + _stderr = new Writable(); + _stdout = new Writable(); + log = _console?.log ?? noop_default; + info = _console?.info ?? log; + trace = _console?.trace ?? info; + debug = _console?.debug ?? log; + table = _console?.table ?? log; + error = _console?.error ?? log; + warn = _console?.warn ?? error; + createTask = _console?.createTask ?? /* @__PURE__ */ notImplemented("console.createTask"); + clear = _console?.clear ?? noop_default; + count = _console?.count ?? noop_default; + countReset = _console?.countReset ?? noop_default; + dir = _console?.dir ?? noop_default; + dirxml = _console?.dirxml ?? noop_default; + group = _console?.group ?? noop_default; + groupEnd = _console?.groupEnd ?? noop_default; + groupCollapsed = _console?.groupCollapsed ?? noop_default; + profile = _console?.profile ?? noop_default; + profileEnd = _console?.profileEnd ?? noop_default; + time = _console?.time ?? noop_default; + timeEnd = _console?.timeEnd ?? noop_default; + timeLog = _console?.timeLog ?? noop_default; + timeStamp = _console?.timeStamp ?? noop_default; + Console = _console?.Console ?? /* @__PURE__ */ notImplementedClass("console.Console"); + _times = /* @__PURE__ */ new Map(); + _stdoutErrorHandler = noop_default; + _stderrErrorHandler = noop_default; + } +}); + +// ../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs +var workerdConsole, assert, clear2, context, count2, countReset2, createTask2, debug2, dir2, dirxml2, error2, group2, groupCollapsed2, groupEnd2, info2, log2, profile2, profileEnd2, table2, time2, timeEnd2, timeLog2, timeStamp2, trace2, warn2, console_default; +var init_console2 = __esm({ + "../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_console(); + workerdConsole = globalThis["console"]; + ({ + assert, + clear: clear2, + context: ( + // @ts-expect-error undocumented public API + context + ), + count: count2, + countReset: countReset2, + createTask: ( + // @ts-expect-error undocumented public API + createTask2 + ), + debug: debug2, + dir: dir2, + dirxml: dirxml2, + error: error2, + group: group2, + groupCollapsed: groupCollapsed2, + groupEnd: groupEnd2, + info: info2, + log: log2, + profile: profile2, + profileEnd: profileEnd2, + table: table2, + time: time2, + timeEnd: timeEnd2, + timeLog: timeLog2, + timeStamp: timeStamp2, + trace: trace2, + warn: warn2 + } = workerdConsole); + Object.assign(workerdConsole, { + Console, + _ignoreErrors, + _stderr, + _stderrErrorHandler, + _stdout, + _stdoutErrorHandler, + _times + }); + console_default = workerdConsole; + } +}); + +// ../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-console +var init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console = __esm({ + "../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-console"() { + init_console2(); + globalThis.console = console_default; + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/process/hrtime.mjs +var hrtime; +var init_hrtime = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/process/hrtime.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + hrtime = /* @__PURE__ */ Object.assign(/* @__PURE__ */ __name(function hrtime2(startTime) { + const now = Date.now(); + const seconds = Math.trunc(now / 1e3); + const nanos = now % 1e3 * 1e6; + if (startTime) { + let diffSeconds = seconds - startTime[0]; + let diffNanos = nanos - startTime[0]; + if (diffNanos < 0) { + diffSeconds = diffSeconds - 1; + diffNanos = 1e9 + diffNanos; + } + return [diffSeconds, diffNanos]; + } + return [seconds, nanos]; + }, "hrtime"), { bigint: /* @__PURE__ */ __name(function bigint() { + return BigInt(Date.now() * 1e6); + }, "bigint") }); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/tty/read-stream.mjs +import { Socket } from "node:net"; +var ReadStream; +var init_read_stream = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/tty/read-stream.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ReadStream = class extends Socket { + fd; + constructor(fd) { + super(); + this.fd = fd; + } + isRaw = false; + setRawMode(mode) { + this.isRaw = mode; + return this; + } + isTTY = false; + }; + __name(ReadStream, "ReadStream"); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/tty/write-stream.mjs +import { Socket as Socket2 } from "node:net"; +var WriteStream; +var init_write_stream = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/tty/write-stream.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + WriteStream = class extends Socket2 { + fd; + constructor(fd) { + super(); + this.fd = fd; + } + clearLine(dir3, callback) { + callback && callback(); + return false; + } + clearScreenDown(callback) { + callback && callback(); + return false; + } + cursorTo(x2, y2, callback) { + callback && typeof callback === "function" && callback(); + return false; + } + moveCursor(dx, dy, callback) { + callback && callback(); + return false; + } + getColorDepth(env2) { + return 1; + } + hasColors(count4, env2) { + return false; + } + getWindowSize() { + return [this.columns, this.rows]; + } + columns = 80; + rows = 24; + isTTY = false; + }; + __name(WriteStream, "WriteStream"); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/tty.mjs +var init_tty = __esm({ + "../../node_modules/unenv/dist/runtime/node/tty.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_read_stream(); + init_write_stream(); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/process/process.mjs +import { EventEmitter } from "node:events"; +var Process; +var init_process = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/process/process.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tty(); + init_utils(); + Process = class extends EventEmitter { + env; + hrtime; + nextTick; + constructor(impl) { + super(); + this.env = impl.env; + this.hrtime = impl.hrtime; + this.nextTick = impl.nextTick; + for (const prop of [...Object.getOwnPropertyNames(Process.prototype), ...Object.getOwnPropertyNames(EventEmitter.prototype)]) { + const value = this[prop]; + if (typeof value === "function") { + this[prop] = value.bind(this); + } + } + } + emitWarning(warning, type, code) { + console.warn(`${code ? `[${code}] ` : ""}${type ? `${type}: ` : ""}${warning}`); + } + emit(...args) { + return super.emit(...args); + } + listeners(eventName) { + return super.listeners(eventName); + } + #stdin; + #stdout; + #stderr; + get stdin() { + return this.#stdin ??= new ReadStream(0); + } + get stdout() { + return this.#stdout ??= new WriteStream(1); + } + get stderr() { + return this.#stderr ??= new WriteStream(2); + } + #cwd = "/"; + chdir(cwd2) { + this.#cwd = cwd2; + } + cwd() { + return this.#cwd; + } + arch = ""; + platform = ""; + argv = []; + argv0 = ""; + execArgv = []; + execPath = ""; + title = ""; + pid = 200; + ppid = 100; + get version() { + return ""; + } + get versions() { + return {}; + } + get allowedNodeEnvironmentFlags() { + return /* @__PURE__ */ new Set(); + } + get sourceMapsEnabled() { + return false; + } + get debugPort() { + return 0; + } + get throwDeprecation() { + return false; + } + get traceDeprecation() { + return false; + } + get features() { + return {}; + } + get release() { + return {}; + } + get connected() { + return false; + } + get config() { + return {}; + } + get moduleLoadList() { + return []; + } + constrainedMemory() { + return 0; + } + availableMemory() { + return 0; + } + uptime() { + return 0; + } + resourceUsage() { + return {}; + } + ref() { + } + unref() { + } + umask() { + throw createNotImplementedError("process.umask"); + } + getBuiltinModule() { + return void 0; + } + getActiveResourcesInfo() { + throw createNotImplementedError("process.getActiveResourcesInfo"); + } + exit() { + throw createNotImplementedError("process.exit"); + } + reallyExit() { + throw createNotImplementedError("process.reallyExit"); + } + kill() { + throw createNotImplementedError("process.kill"); + } + abort() { + throw createNotImplementedError("process.abort"); + } + dlopen() { + throw createNotImplementedError("process.dlopen"); + } + setSourceMapsEnabled() { + throw createNotImplementedError("process.setSourceMapsEnabled"); + } + loadEnvFile() { + throw createNotImplementedError("process.loadEnvFile"); + } + disconnect() { + throw createNotImplementedError("process.disconnect"); + } + cpuUsage() { + throw createNotImplementedError("process.cpuUsage"); + } + setUncaughtExceptionCaptureCallback() { + throw createNotImplementedError("process.setUncaughtExceptionCaptureCallback"); + } + hasUncaughtExceptionCaptureCallback() { + throw createNotImplementedError("process.hasUncaughtExceptionCaptureCallback"); + } + initgroups() { + throw createNotImplementedError("process.initgroups"); + } + openStdin() { + throw createNotImplementedError("process.openStdin"); + } + assert() { + throw createNotImplementedError("process.assert"); + } + binding() { + throw createNotImplementedError("process.binding"); + } + permission = { has: /* @__PURE__ */ notImplemented("process.permission.has") }; + report = { + directory: "", + filename: "", + signal: "SIGUSR2", + compact: false, + reportOnFatalError: false, + reportOnSignal: false, + reportOnUncaughtException: false, + getReport: /* @__PURE__ */ notImplemented("process.report.getReport"), + writeReport: /* @__PURE__ */ notImplemented("process.report.writeReport") + }; + finalization = { + register: /* @__PURE__ */ notImplemented("process.finalization.register"), + unregister: /* @__PURE__ */ notImplemented("process.finalization.unregister"), + registerBeforeExit: /* @__PURE__ */ notImplemented("process.finalization.registerBeforeExit") + }; + memoryUsage = Object.assign(() => ({ + arrayBuffers: 0, + rss: 0, + external: 0, + heapTotal: 0, + heapUsed: 0 + }), { rss: () => 0 }); + mainModule = void 0; + domain = void 0; + send = void 0; + exitCode = void 0; + channel = void 0; + getegid = void 0; + geteuid = void 0; + getgid = void 0; + getgroups = void 0; + getuid = void 0; + setegid = void 0; + seteuid = void 0; + setgid = void 0; + setgroups = void 0; + setuid = void 0; + _events = void 0; + _eventsCount = void 0; + _exiting = void 0; + _maxListeners = void 0; + _debugEnd = void 0; + _debugProcess = void 0; + _fatalException = void 0; + _getActiveHandles = void 0; + _getActiveRequests = void 0; + _kill = void 0; + _preload_modules = void 0; + _rawDebug = void 0; + _startProfilerIdleNotifier = void 0; + _stopProfilerIdleNotifier = void 0; + _tickCallback = void 0; + _disconnect = void 0; + _handleQueue = void 0; + _pendingMessage = void 0; + _channel = void 0; + _send = void 0; + _linkedBinding = void 0; + }; + __name(Process, "Process"); + } +}); + +// ../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs +var globalProcess, getBuiltinModule, exit, platform, nextTick, unenvProcess, abort, addListener, allowedNodeEnvironmentFlags, hasUncaughtExceptionCaptureCallback, setUncaughtExceptionCaptureCallback, loadEnvFile, sourceMapsEnabled, arch, argv, argv0, chdir, config, connected, constrainedMemory, availableMemory, cpuUsage, cwd, debugPort, dlopen, disconnect, emit, emitWarning, env, eventNames, execArgv, execPath, finalization, features, getActiveResourcesInfo, getMaxListeners, hrtime3, kill, listeners, listenerCount, memoryUsage, on, off, once, pid, ppid, prependListener, prependOnceListener, rawListeners, release, removeAllListeners, removeListener, report, resourceUsage, setMaxListeners, setSourceMapsEnabled, stderr, stdin, stdout, title, throwDeprecation, traceDeprecation, umask, uptime, version, versions, domain, initgroups, moduleLoadList, reallyExit, openStdin, assert2, binding, send, exitCode, channel, getegid, geteuid, getgid, getgroups, getuid, setegid, seteuid, setgid, setgroups, setuid, permission, mainModule, _events, _eventsCount, _exiting, _maxListeners, _debugEnd, _debugProcess, _fatalException, _getActiveHandles, _getActiveRequests, _kill, _preload_modules, _rawDebug, _startProfilerIdleNotifier, _stopProfilerIdleNotifier, _tickCallback, _disconnect, _handleQueue, _pendingMessage, _channel, _send, _linkedBinding, _process, process_default; +var init_process2 = __esm({ + "../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_hrtime(); + init_process(); + globalProcess = globalThis["process"]; + getBuiltinModule = globalProcess.getBuiltinModule; + ({ exit, platform, nextTick } = getBuiltinModule( + "node:process" + )); + unenvProcess = new Process({ + env: globalProcess.env, + hrtime, + nextTick + }); + ({ + abort, + addListener, + allowedNodeEnvironmentFlags, + hasUncaughtExceptionCaptureCallback, + setUncaughtExceptionCaptureCallback, + loadEnvFile, + sourceMapsEnabled, + arch, + argv, + argv0, + chdir, + config, + connected, + constrainedMemory, + availableMemory, + cpuUsage, + cwd, + debugPort, + dlopen, + disconnect, + emit, + emitWarning, + env, + eventNames, + execArgv, + execPath, + finalization, + features, + getActiveResourcesInfo, + getMaxListeners, + hrtime: hrtime3, + kill, + listeners, + listenerCount, + memoryUsage, + on, + off, + once, + pid, + ppid, + prependListener, + prependOnceListener, + rawListeners, + release, + removeAllListeners, + removeListener, + report, + resourceUsage, + setMaxListeners, + setSourceMapsEnabled, + stderr, + stdin, + stdout, + title, + throwDeprecation, + traceDeprecation, + umask, + uptime, + version, + versions, + domain, + initgroups, + moduleLoadList, + reallyExit, + openStdin, + assert: assert2, + binding, + send, + exitCode, + channel, + getegid, + geteuid, + getgid, + getgroups, + getuid, + setegid, + seteuid, + setgid, + setgroups, + setuid, + permission, + mainModule, + _events, + _eventsCount, + _exiting, + _maxListeners, + _debugEnd, + _debugProcess, + _fatalException, + _getActiveHandles, + _getActiveRequests, + _kill, + _preload_modules, + _rawDebug, + _startProfilerIdleNotifier, + _stopProfilerIdleNotifier, + _tickCallback, + _disconnect, + _handleQueue, + _pendingMessage, + _channel, + _send, + _linkedBinding + } = unenvProcess); + _process = { + abort, + addListener, + allowedNodeEnvironmentFlags, + hasUncaughtExceptionCaptureCallback, + setUncaughtExceptionCaptureCallback, + loadEnvFile, + sourceMapsEnabled, + arch, + argv, + argv0, + chdir, + config, + connected, + constrainedMemory, + availableMemory, + cpuUsage, + cwd, + debugPort, + dlopen, + disconnect, + emit, + emitWarning, + env, + eventNames, + execArgv, + execPath, + exit, + finalization, + features, + getBuiltinModule, + getActiveResourcesInfo, + getMaxListeners, + hrtime: hrtime3, + kill, + listeners, + listenerCount, + memoryUsage, + nextTick, + on, + off, + once, + pid, + platform, + ppid, + prependListener, + prependOnceListener, + rawListeners, + release, + removeAllListeners, + removeListener, + report, + resourceUsage, + setMaxListeners, + setSourceMapsEnabled, + stderr, + stdin, + stdout, + title, + throwDeprecation, + traceDeprecation, + umask, + uptime, + version, + versions, + // @ts-expect-error old API + domain, + initgroups, + moduleLoadList, + reallyExit, + openStdin, + assert: assert2, + binding, + send, + exitCode, + channel, + getegid, + geteuid, + getgid, + getgroups, + getuid, + setegid, + seteuid, + setgid, + setgroups, + setuid, + permission, + mainModule, + _events, + _eventsCount, + _exiting, + _maxListeners, + _debugEnd, + _debugProcess, + _fatalException, + _getActiveHandles, + _getActiveRequests, + _kill, + _preload_modules, + _rawDebug, + _startProfilerIdleNotifier, + _stopProfilerIdleNotifier, + _tickCallback, + _disconnect, + _handleQueue, + _pendingMessage, + _channel, + _send, + _linkedBinding + }; + process_default = _process; + } +}); + +// ../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-process +var init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process = __esm({ + "../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-process"() { + init_process2(); + globalThis.process = process_default; + } +}); + +// wrangler-modules-watch:wrangler:modules-watch +var init_wrangler_modules_watch = __esm({ + "wrangler-modules-watch:wrangler:modules-watch"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/wrangler/templates/modules-watch-stub.js +var init_modules_watch_stub = __esm({ + "../../node_modules/wrangler/templates/modules-watch-stub.js"() { + init_wrangler_modules_watch(); + } +}); + +// ../../node_modules/hono/dist/compose.js +var compose; +var init_compose = __esm({ + "../../node_modules/hono/dist/compose.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + compose = /* @__PURE__ */ __name((middleware2, onError, onNotFound) => { + return (context2, next) => { + let index = -1; + return dispatch(0); + async function dispatch(i2) { + if (i2 <= index) { + throw new Error("next() called multiple times"); + } + index = i2; + let res; + let isError = false; + let handler; + if (middleware2[i2]) { + handler = middleware2[i2][0][0]; + context2.req.routeIndex = i2; + } else { + handler = i2 === middleware2.length && next || void 0; + } + if (handler) { + try { + res = await handler(context2, () => dispatch(i2 + 1)); + } catch (err) { + if (err instanceof Error && onError) { + context2.error = err; + res = await onError(err, context2); + isError = true; + } else { + throw err; + } + } + } else { + if (context2.finalized === false && onNotFound) { + res = await onNotFound(context2); + } + } + if (res && (context2.finalized === false || isError)) { + context2.res = res; + } + return context2; + } + __name(dispatch, "dispatch"); + }; + }, "compose"); + } +}); + +// ../../node_modules/hono/dist/http-exception.js +var init_http_exception = __esm({ + "../../node_modules/hono/dist/http-exception.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/hono/dist/request/constants.js +var GET_MATCH_RESULT; +var init_constants = __esm({ + "../../node_modules/hono/dist/request/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + GET_MATCH_RESULT = /* @__PURE__ */ Symbol(); + } +}); + +// ../../node_modules/hono/dist/utils/body.js +async function parseFormData(request, options) { + const formData = await request.formData(); + if (formData) { + return convertFormDataToBodyData(formData, options); + } + return {}; +} +function convertFormDataToBodyData(formData, options) { + const form = /* @__PURE__ */ Object.create(null); + formData.forEach((value, key) => { + const shouldParseAllValues = options.all || key.endsWith("[]"); + if (!shouldParseAllValues) { + form[key] = value; + } else { + handleParsingAllValues(form, key, value); + } + }); + if (options.dot) { + Object.entries(form).forEach(([key, value]) => { + const shouldParseDotValues = key.includes("."); + if (shouldParseDotValues) { + handleParsingNestedValues(form, key, value); + delete form[key]; + } + }); + } + return form; +} +var parseBody, handleParsingAllValues, handleParsingNestedValues; +var init_body = __esm({ + "../../node_modules/hono/dist/utils/body.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_request(); + parseBody = /* @__PURE__ */ __name(async (request, options = /* @__PURE__ */ Object.create(null)) => { + const { all: all3 = false, dot = false } = options; + const headers = request instanceof HonoRequest ? request.raw.headers : request.headers; + const contentType = headers.get("Content-Type"); + if (contentType?.startsWith("multipart/form-data") || contentType?.startsWith("application/x-www-form-urlencoded")) { + return parseFormData(request, { all: all3, dot }); + } + return {}; + }, "parseBody"); + __name(parseFormData, "parseFormData"); + __name(convertFormDataToBodyData, "convertFormDataToBodyData"); + handleParsingAllValues = /* @__PURE__ */ __name((form, key, value) => { + if (form[key] !== void 0) { + if (Array.isArray(form[key])) { + ; + form[key].push(value); + } else { + form[key] = [form[key], value]; + } + } else { + if (!key.endsWith("[]")) { + form[key] = value; + } else { + form[key] = [value]; + } + } + }, "handleParsingAllValues"); + handleParsingNestedValues = /* @__PURE__ */ __name((form, key, value) => { + if (/(?:^|\.)__proto__\./.test(key)) { + return; + } + let nestedForm = form; + const keys = key.split("."); + keys.forEach((key2, index) => { + if (index === keys.length - 1) { + nestedForm[key2] = value; + } else { + if (!nestedForm[key2] || typeof nestedForm[key2] !== "object" || Array.isArray(nestedForm[key2]) || nestedForm[key2] instanceof File) { + nestedForm[key2] = /* @__PURE__ */ Object.create(null); + } + nestedForm = nestedForm[key2]; + } + }); + }, "handleParsingNestedValues"); + } +}); + +// ../../node_modules/hono/dist/utils/url.js +var splitPath, splitRoutingPath, extractGroupsFromPath, replaceGroupMarks, patternCache, getPattern, tryDecode, tryDecodeURI, getPath, getPathNoStrict, mergePath, checkOptionalParameter, _decodeURI, _getQueryParam, getQueryParam, getQueryParams, decodeURIComponent_; +var init_url = __esm({ + "../../node_modules/hono/dist/utils/url.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + splitPath = /* @__PURE__ */ __name((path) => { + const paths = path.split("/"); + if (paths[0] === "") { + paths.shift(); + } + return paths; + }, "splitPath"); + splitRoutingPath = /* @__PURE__ */ __name((routePath2) => { + const { groups, path } = extractGroupsFromPath(routePath2); + const paths = splitPath(path); + return replaceGroupMarks(paths, groups); + }, "splitRoutingPath"); + extractGroupsFromPath = /* @__PURE__ */ __name((path) => { + const groups = []; + path = path.replace(/\{[^}]+\}/g, (match2, index) => { + const mark = `@${index}`; + groups.push([mark, match2]); + return mark; + }); + return { groups, path }; + }, "extractGroupsFromPath"); + replaceGroupMarks = /* @__PURE__ */ __name((paths, groups) => { + for (let i2 = groups.length - 1; i2 >= 0; i2--) { + const [mark] = groups[i2]; + for (let j2 = paths.length - 1; j2 >= 0; j2--) { + if (paths[j2].includes(mark)) { + paths[j2] = paths[j2].replace(mark, groups[i2][1]); + break; + } + } + } + return paths; + }, "replaceGroupMarks"); + patternCache = {}; + getPattern = /* @__PURE__ */ __name((label, next) => { + if (label === "*") { + return "*"; + } + const match2 = label.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/); + if (match2) { + const cacheKey = `${label}#${next}`; + if (!patternCache[cacheKey]) { + if (match2[2]) { + patternCache[cacheKey] = next && next[0] !== ":" && next[0] !== "*" ? [cacheKey, match2[1], new RegExp(`^${match2[2]}(?=/${next})`)] : [label, match2[1], new RegExp(`^${match2[2]}$`)]; + } else { + patternCache[cacheKey] = [label, match2[1], true]; + } + } + return patternCache[cacheKey]; + } + return null; + }, "getPattern"); + tryDecode = /* @__PURE__ */ __name((str, decoder2) => { + try { + return decoder2(str); + } catch { + return str.replace(/(?:%[0-9A-Fa-f]{2})+/g, (match2) => { + try { + return decoder2(match2); + } catch { + return match2; + } + }); + } + }, "tryDecode"); + tryDecodeURI = /* @__PURE__ */ __name((str) => tryDecode(str, decodeURI), "tryDecodeURI"); + getPath = /* @__PURE__ */ __name((request) => { + const url2 = request.url; + const start = url2.indexOf("/", url2.indexOf(":") + 4); + let i2 = start; + for (; i2 < url2.length; i2++) { + const charCode = url2.charCodeAt(i2); + if (charCode === 37) { + const queryIndex = url2.indexOf("?", i2); + const hashIndex = url2.indexOf("#", i2); + const end = queryIndex === -1 ? hashIndex === -1 ? void 0 : hashIndex : hashIndex === -1 ? queryIndex : Math.min(queryIndex, hashIndex); + const path = url2.slice(start, end); + return tryDecodeURI(path.includes("%25") ? path.replace(/%25/g, "%2525") : path); + } else if (charCode === 63 || charCode === 35) { + break; + } + } + return url2.slice(start, i2); + }, "getPath"); + getPathNoStrict = /* @__PURE__ */ __name((request) => { + const result = getPath(request); + return result.length > 1 && result.at(-1) === "/" ? result.slice(0, -1) : result; + }, "getPathNoStrict"); + mergePath = /* @__PURE__ */ __name((base, sub, ...rest) => { + if (rest.length) { + sub = mergePath(sub, ...rest); + } + return `${base?.[0] === "/" ? "" : "/"}${base}${sub === "/" ? "" : `${base?.at(-1) === "/" ? "" : "/"}${sub?.[0] === "/" ? sub.slice(1) : sub}`}`; + }, "mergePath"); + checkOptionalParameter = /* @__PURE__ */ __name((path) => { + if (path.charCodeAt(path.length - 1) !== 63 || !path.includes(":")) { + return null; + } + const segments = path.split("/"); + const results = []; + let basePath = ""; + segments.forEach((segment) => { + if (segment !== "" && !/\:/.test(segment)) { + basePath += "/" + segment; + } else if (/\:/.test(segment)) { + if (/\?/.test(segment)) { + if (results.length === 0 && basePath === "") { + results.push("/"); + } else { + results.push(basePath); + } + const optionalSegment = segment.replace("?", ""); + basePath += "/" + optionalSegment; + results.push(basePath); + } else { + basePath += "/" + segment; + } + } + }); + return results.filter((v3, i2, a2) => a2.indexOf(v3) === i2); + }, "checkOptionalParameter"); + _decodeURI = /* @__PURE__ */ __name((value) => { + if (!/[%+]/.test(value)) { + return value; + } + if (value.indexOf("+") !== -1) { + value = value.replace(/\+/g, " "); + } + return value.indexOf("%") !== -1 ? tryDecode(value, decodeURIComponent_) : value; + }, "_decodeURI"); + _getQueryParam = /* @__PURE__ */ __name((url2, key, multiple) => { + let encoded; + if (!multiple && key && !/[%+]/.test(key)) { + let keyIndex2 = url2.indexOf("?", 8); + if (keyIndex2 === -1) { + return void 0; + } + if (!url2.startsWith(key, keyIndex2 + 1)) { + keyIndex2 = url2.indexOf(`&${key}`, keyIndex2 + 1); + } + while (keyIndex2 !== -1) { + const trailingKeyCode = url2.charCodeAt(keyIndex2 + key.length + 1); + if (trailingKeyCode === 61) { + const valueIndex = keyIndex2 + key.length + 2; + const endIndex = url2.indexOf("&", valueIndex); + return _decodeURI(url2.slice(valueIndex, endIndex === -1 ? void 0 : endIndex)); + } else if (trailingKeyCode == 38 || isNaN(trailingKeyCode)) { + return ""; + } + keyIndex2 = url2.indexOf(`&${key}`, keyIndex2 + 1); + } + encoded = /[%+]/.test(url2); + if (!encoded) { + return void 0; + } + } + const results = {}; + encoded ??= /[%+]/.test(url2); + let keyIndex = url2.indexOf("?", 8); + while (keyIndex !== -1) { + const nextKeyIndex = url2.indexOf("&", keyIndex + 1); + let valueIndex = url2.indexOf("=", keyIndex); + if (valueIndex > nextKeyIndex && nextKeyIndex !== -1) { + valueIndex = -1; + } + let name = url2.slice( + keyIndex + 1, + valueIndex === -1 ? nextKeyIndex === -1 ? void 0 : nextKeyIndex : valueIndex + ); + if (encoded) { + name = _decodeURI(name); + } + keyIndex = nextKeyIndex; + if (name === "") { + continue; + } + let value; + if (valueIndex === -1) { + value = ""; + } else { + value = url2.slice(valueIndex + 1, nextKeyIndex === -1 ? void 0 : nextKeyIndex); + if (encoded) { + value = _decodeURI(value); + } + } + if (multiple) { + if (!(results[name] && Array.isArray(results[name]))) { + results[name] = []; + } + ; + results[name].push(value); + } else { + results[name] ??= value; + } + } + return key ? results[key] : results; + }, "_getQueryParam"); + getQueryParam = _getQueryParam; + getQueryParams = /* @__PURE__ */ __name((url2, key) => { + return _getQueryParam(url2, key, true); + }, "getQueryParams"); + decodeURIComponent_ = decodeURIComponent; + } +}); + +// ../../node_modules/hono/dist/request.js +var tryDecodeURIComponent, HonoRequest; +var init_request = __esm({ + "../../node_modules/hono/dist/request.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_http_exception(); + init_constants(); + init_body(); + init_url(); + tryDecodeURIComponent = /* @__PURE__ */ __name((str) => tryDecode(str, decodeURIComponent_), "tryDecodeURIComponent"); + HonoRequest = /* @__PURE__ */ __name(class { + /** + * `.raw` can get the raw Request object. + * + * @see {@link https://hono.dev/docs/api/request#raw} + * + * @example + * ```ts + * // For Cloudflare Workers + * app.post('/', async (c) => { + * const metadata = c.req.raw.cf?.hostMetadata? + * ... + * }) + * ``` + */ + raw; + #validatedData; + // Short name of validatedData + #matchResult; + routeIndex = 0; + /** + * `.path` can get the pathname of the request. + * + * @see {@link https://hono.dev/docs/api/request#path} + * + * @example + * ```ts + * app.get('/about/me', (c) => { + * const pathname = c.req.path // `/about/me` + * }) + * ``` + */ + path; + bodyCache = {}; + constructor(request, path = "/", matchResult = [[]]) { + this.raw = request; + this.path = path; + this.#matchResult = matchResult; + this.#validatedData = {}; + } + param(key) { + return key ? this.#getDecodedParam(key) : this.#getAllDecodedParams(); + } + #getDecodedParam(key) { + const paramKey = this.#matchResult[0][this.routeIndex][1][key]; + const param = this.#getParamValue(paramKey); + return param && /\%/.test(param) ? tryDecodeURIComponent(param) : param; + } + #getAllDecodedParams() { + const decoded = {}; + const keys = Object.keys(this.#matchResult[0][this.routeIndex][1]); + for (const key of keys) { + const value = this.#getParamValue(this.#matchResult[0][this.routeIndex][1][key]); + if (value !== void 0) { + decoded[key] = /\%/.test(value) ? tryDecodeURIComponent(value) : value; + } + } + return decoded; + } + #getParamValue(paramKey) { + return this.#matchResult[1] ? this.#matchResult[1][paramKey] : paramKey; + } + query(key) { + return getQueryParam(this.url, key); + } + queries(key) { + return getQueryParams(this.url, key); + } + header(name) { + if (name) { + return this.raw.headers.get(name) ?? void 0; + } + const headerData = {}; + this.raw.headers.forEach((value, key) => { + headerData[key] = value; + }); + return headerData; + } + async parseBody(options) { + return parseBody(this, options); + } + #cachedBody = (key) => { + const { bodyCache, raw: raw2 } = this; + const cachedBody = bodyCache[key]; + if (cachedBody) { + return cachedBody; + } + const anyCachedKey = Object.keys(bodyCache)[0]; + if (anyCachedKey) { + return bodyCache[anyCachedKey].then((body) => { + if (anyCachedKey === "json") { + body = JSON.stringify(body); + } + return new Response(body)[key](); + }); + } + return bodyCache[key] = raw2[key](); + }; + /** + * `.json()` can parse Request body of type `application/json` + * + * @see {@link https://hono.dev/docs/api/request#json} + * + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.json() + * }) + * ``` + */ + json() { + return this.#cachedBody("text").then((text2) => JSON.parse(text2)); + } + /** + * `.text()` can parse Request body of type `text/plain` + * + * @see {@link https://hono.dev/docs/api/request#text} + * + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.text() + * }) + * ``` + */ + text() { + return this.#cachedBody("text"); + } + /** + * `.arrayBuffer()` parse Request body as an `ArrayBuffer` + * + * @see {@link https://hono.dev/docs/api/request#arraybuffer} + * + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.arrayBuffer() + * }) + * ``` + */ + arrayBuffer() { + return this.#cachedBody("arrayBuffer"); + } + /** + * Parses the request body as a `Blob`. + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.blob(); + * }); + * ``` + * @see https://hono.dev/docs/api/request#blob + */ + blob() { + return this.#cachedBody("blob"); + } + /** + * Parses the request body as `FormData`. + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.formData(); + * }); + * ``` + * @see https://hono.dev/docs/api/request#formdata + */ + formData() { + return this.#cachedBody("formData"); + } + /** + * Adds validated data to the request. + * + * @param target - The target of the validation. + * @param data - The validated data to add. + */ + addValidatedData(target, data) { + this.#validatedData[target] = data; + } + valid(target) { + return this.#validatedData[target]; + } + /** + * `.url()` can get the request url strings. + * + * @see {@link https://hono.dev/docs/api/request#url} + * + * @example + * ```ts + * app.get('/about/me', (c) => { + * const url = c.req.url // `http://localhost:8787/about/me` + * ... + * }) + * ``` + */ + get url() { + return this.raw.url; + } + /** + * `.method()` can get the method name of the request. + * + * @see {@link https://hono.dev/docs/api/request#method} + * + * @example + * ```ts + * app.get('/about/me', (c) => { + * const method = c.req.method // `GET` + * }) + * ``` + */ + get method() { + return this.raw.method; + } + get [GET_MATCH_RESULT]() { + return this.#matchResult; + } + /** + * `.matchedRoutes()` can return a matched route in the handler + * + * @deprecated + * + * Use matchedRoutes helper defined in "hono/route" instead. + * + * @see {@link https://hono.dev/docs/api/request#matchedroutes} + * + * @example + * ```ts + * app.use('*', async function logger(c, next) { + * await next() + * c.req.matchedRoutes.forEach(({ handler, method, path }, i) => { + * const name = handler.name || (handler.length < 2 ? '[handler]' : '[middleware]') + * console.log( + * method, + * ' ', + * path, + * ' '.repeat(Math.max(10 - path.length, 0)), + * name, + * i === c.req.routeIndex ? '<- respond from here' : '' + * ) + * }) + * }) + * ``` + */ + get matchedRoutes() { + return this.#matchResult[0].map(([[, route]]) => route); + } + /** + * `routePath()` can retrieve the path registered within the handler + * + * @deprecated + * + * Use routePath helper defined in "hono/route" instead. + * + * @see {@link https://hono.dev/docs/api/request#routepath} + * + * @example + * ```ts + * app.get('/posts/:id', (c) => { + * return c.json({ path: c.req.routePath }) + * }) + * ``` + */ + get routePath() { + return this.#matchResult[0].map(([[, route]]) => route)[this.routeIndex].path; + } + }, "HonoRequest"); + } +}); + +// ../../node_modules/hono/dist/utils/html.js +var HtmlEscapedCallbackPhase, raw, resolveCallback; +var init_html = __esm({ + "../../node_modules/hono/dist/utils/html.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + HtmlEscapedCallbackPhase = { + Stringify: 1, + BeforeStream: 2, + Stream: 3 + }; + raw = /* @__PURE__ */ __name((value, callbacks) => { + const escapedString = new String(value); + escapedString.isEscaped = true; + escapedString.callbacks = callbacks; + return escapedString; + }, "raw"); + resolveCallback = /* @__PURE__ */ __name(async (str, phase, preserveCallbacks, context2, buffer) => { + if (typeof str === "object" && !(str instanceof String)) { + if (!(str instanceof Promise)) { + str = str.toString(); + } + if (str instanceof Promise) { + str = await str; + } + } + const callbacks = str.callbacks; + if (!callbacks?.length) { + return Promise.resolve(str); + } + if (buffer) { + buffer[0] += str; + } else { + buffer = [str]; + } + const resStr = Promise.all(callbacks.map((c2) => c2({ phase, buffer, context: context2 }))).then( + (res) => Promise.all( + res.filter(Boolean).map((str2) => resolveCallback(str2, phase, false, context2, buffer)) + ).then(() => buffer[0]) + ); + if (preserveCallbacks) { + return raw(await resStr, callbacks); + } else { + return resStr; + } + }, "resolveCallback"); + } +}); + +// ../../node_modules/hono/dist/context.js +var TEXT_PLAIN, setDefaultContentType, createResponseInstance, Context; +var init_context = __esm({ + "../../node_modules/hono/dist/context.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_request(); + init_html(); + TEXT_PLAIN = "text/plain; charset=UTF-8"; + setDefaultContentType = /* @__PURE__ */ __name((contentType, headers) => { + return { + "Content-Type": contentType, + ...headers + }; + }, "setDefaultContentType"); + createResponseInstance = /* @__PURE__ */ __name((body, init) => new Response(body, init), "createResponseInstance"); + Context = /* @__PURE__ */ __name(class { + #rawRequest; + #req; + /** + * `.env` can get bindings (environment variables, secrets, KV namespaces, D1 database, R2 bucket etc.) in Cloudflare Workers. + * + * @see {@link https://hono.dev/docs/api/context#env} + * + * @example + * ```ts + * // Environment object for Cloudflare Workers + * app.get('*', async c => { + * const counter = c.env.COUNTER + * }) + * ``` + */ + env = {}; + #var; + finalized = false; + /** + * `.error` can get the error object from the middleware if the Handler throws an error. + * + * @see {@link https://hono.dev/docs/api/context#error} + * + * @example + * ```ts + * app.use('*', async (c, next) => { + * await next() + * if (c.error) { + * // do something... + * } + * }) + * ``` + */ + error; + #status; + #executionCtx; + #res; + #layout; + #renderer; + #notFoundHandler; + #preparedHeaders; + #matchResult; + #path; + /** + * Creates an instance of the Context class. + * + * @param req - The Request object. + * @param options - Optional configuration options for the context. + */ + constructor(req, options) { + this.#rawRequest = req; + if (options) { + this.#executionCtx = options.executionCtx; + this.env = options.env; + this.#notFoundHandler = options.notFoundHandler; + this.#path = options.path; + this.#matchResult = options.matchResult; + } + } + /** + * `.req` is the instance of {@link HonoRequest}. + */ + get req() { + this.#req ??= new HonoRequest(this.#rawRequest, this.#path, this.#matchResult); + return this.#req; + } + /** + * @see {@link https://hono.dev/docs/api/context#event} + * The FetchEvent associated with the current request. + * + * @throws Will throw an error if the context does not have a FetchEvent. + */ + get event() { + if (this.#executionCtx && "respondWith" in this.#executionCtx) { + return this.#executionCtx; + } else { + throw Error("This context has no FetchEvent"); + } + } + /** + * @see {@link https://hono.dev/docs/api/context#executionctx} + * The ExecutionContext associated with the current request. + * + * @throws Will throw an error if the context does not have an ExecutionContext. + */ + get executionCtx() { + if (this.#executionCtx) { + return this.#executionCtx; + } else { + throw Error("This context has no ExecutionContext"); + } + } + /** + * @see {@link https://hono.dev/docs/api/context#res} + * The Response object for the current request. + */ + get res() { + return this.#res ||= createResponseInstance(null, { + headers: this.#preparedHeaders ??= new Headers() + }); + } + /** + * Sets the Response object for the current request. + * + * @param _res - The Response object to set. + */ + set res(_res) { + if (this.#res && _res) { + _res = createResponseInstance(_res.body, _res); + for (const [k2, v3] of this.#res.headers.entries()) { + if (k2 === "content-type") { + continue; + } + if (k2 === "set-cookie") { + const cookies = this.#res.headers.getSetCookie(); + _res.headers.delete("set-cookie"); + for (const cookie of cookies) { + _res.headers.append("set-cookie", cookie); + } + } else { + _res.headers.set(k2, v3); + } + } + } + this.#res = _res; + this.finalized = true; + } + /** + * `.render()` can create a response within a layout. + * + * @see {@link https://hono.dev/docs/api/context#render-setrenderer} + * + * @example + * ```ts + * app.get('/', (c) => { + * return c.render('Hello!') + * }) + * ``` + */ + render = (...args) => { + this.#renderer ??= (content) => this.html(content); + return this.#renderer(...args); + }; + /** + * Sets the layout for the response. + * + * @param layout - The layout to set. + * @returns The layout function. + */ + setLayout = (layout) => this.#layout = layout; + /** + * Gets the current layout for the response. + * + * @returns The current layout function. + */ + getLayout = () => this.#layout; + /** + * `.setRenderer()` can set the layout in the custom middleware. + * + * @see {@link https://hono.dev/docs/api/context#render-setrenderer} + * + * @example + * ```tsx + * app.use('*', async (c, next) => { + * c.setRenderer((content) => { + * return c.html( + * + * + *

{content}

+ * + * + * ) + * }) + * await next() + * }) + * ``` + */ + setRenderer = (renderer) => { + this.#renderer = renderer; + }; + /** + * `.header()` can set headers. + * + * @see {@link https://hono.dev/docs/api/context#header} + * + * @example + * ```ts + * app.get('/welcome', (c) => { + * // Set headers + * c.header('X-Message', 'Hello!') + * c.header('Content-Type', 'text/plain') + * + * return c.body('Thank you for coming') + * }) + * ``` + */ + header = (name, value, options) => { + if (this.finalized) { + this.#res = createResponseInstance(this.#res.body, this.#res); + } + const headers = this.#res ? this.#res.headers : this.#preparedHeaders ??= new Headers(); + if (value === void 0) { + headers.delete(name); + } else if (options?.append) { + headers.append(name, value); + } else { + headers.set(name, value); + } + }; + status = (status) => { + this.#status = status; + }; + /** + * `.set()` can set the value specified by the key. + * + * @see {@link https://hono.dev/docs/api/context#set-get} + * + * @example + * ```ts + * app.use('*', async (c, next) => { + * c.set('message', 'Hono is hot!!') + * await next() + * }) + * ``` + */ + set = (key, value) => { + this.#var ??= /* @__PURE__ */ new Map(); + this.#var.set(key, value); + }; + /** + * `.get()` can use the value specified by the key. + * + * @see {@link https://hono.dev/docs/api/context#set-get} + * + * @example + * ```ts + * app.get('/', (c) => { + * const message = c.get('message') + * return c.text(`The message is "${message}"`) + * }) + * ``` + */ + get = (key) => { + return this.#var ? this.#var.get(key) : void 0; + }; + /** + * `.var` can access the value of a variable. + * + * @see {@link https://hono.dev/docs/api/context#var} + * + * @example + * ```ts + * const result = c.var.client.oneMethod() + * ``` + */ + // c.var.propName is a read-only + get var() { + if (!this.#var) { + return {}; + } + return Object.fromEntries(this.#var); + } + #newResponse(data, arg, headers) { + const responseHeaders = this.#res ? new Headers(this.#res.headers) : this.#preparedHeaders ?? new Headers(); + if (typeof arg === "object" && "headers" in arg) { + const argHeaders = arg.headers instanceof Headers ? arg.headers : new Headers(arg.headers); + for (const [key, value] of argHeaders) { + if (key.toLowerCase() === "set-cookie") { + responseHeaders.append(key, value); + } else { + responseHeaders.set(key, value); + } + } + } + if (headers) { + for (const [k2, v3] of Object.entries(headers)) { + if (typeof v3 === "string") { + responseHeaders.set(k2, v3); + } else { + responseHeaders.delete(k2); + for (const v22 of v3) { + responseHeaders.append(k2, v22); + } + } + } + } + const status = typeof arg === "number" ? arg : arg?.status ?? this.#status; + return createResponseInstance(data, { status, headers: responseHeaders }); + } + newResponse = (...args) => this.#newResponse(...args); + /** + * `.body()` can return the HTTP response. + * You can set headers with `.header()` and set HTTP status code with `.status`. + * This can also be set in `.text()`, `.json()` and so on. + * + * @see {@link https://hono.dev/docs/api/context#body} + * + * @example + * ```ts + * app.get('/welcome', (c) => { + * // Set headers + * c.header('X-Message', 'Hello!') + * c.header('Content-Type', 'text/plain') + * // Set HTTP status code + * c.status(201) + * + * // Return the response body + * return c.body('Thank you for coming') + * }) + * ``` + */ + body = (data, arg, headers) => this.#newResponse(data, arg, headers); + /** + * `.text()` can render text as `Content-Type:text/plain`. + * + * @see {@link https://hono.dev/docs/api/context#text} + * + * @example + * ```ts + * app.get('/say', (c) => { + * return c.text('Hello!') + * }) + * ``` + */ + text = (text2, arg, headers) => { + return !this.#preparedHeaders && !this.#status && !arg && !headers && !this.finalized ? new Response(text2) : this.#newResponse( + text2, + arg, + setDefaultContentType(TEXT_PLAIN, headers) + ); + }; + /** + * `.json()` can render JSON as `Content-Type:application/json`. + * + * @see {@link https://hono.dev/docs/api/context#json} + * + * @example + * ```ts + * app.get('/api', (c) => { + * return c.json({ message: 'Hello!' }) + * }) + * ``` + */ + json = (object2, arg, headers) => { + return this.#newResponse( + JSON.stringify(object2), + arg, + setDefaultContentType("application/json", headers) + ); + }; + html = (html, arg, headers) => { + const res = /* @__PURE__ */ __name((html2) => this.#newResponse(html2, arg, setDefaultContentType("text/html; charset=UTF-8", headers)), "res"); + return typeof html === "object" ? resolveCallback(html, HtmlEscapedCallbackPhase.Stringify, false, {}).then(res) : res(html); + }; + /** + * `.redirect()` can Redirect, default status code is 302. + * + * @see {@link https://hono.dev/docs/api/context#redirect} + * + * @example + * ```ts + * app.get('/redirect', (c) => { + * return c.redirect('/') + * }) + * app.get('/redirect-permanently', (c) => { + * return c.redirect('/', 301) + * }) + * ``` + */ + redirect = (location, status) => { + const locationString = String(location); + this.header( + "Location", + // Multibyes should be encoded + // eslint-disable-next-line no-control-regex + !/[^\x00-\xFF]/.test(locationString) ? locationString : encodeURI(locationString) + ); + return this.newResponse(null, status ?? 302); + }; + /** + * `.notFound()` can return the Not Found Response. + * + * @see {@link https://hono.dev/docs/api/context#notfound} + * + * @example + * ```ts + * app.get('/notfound', (c) => { + * return c.notFound() + * }) + * ``` + */ + notFound = () => { + this.#notFoundHandler ??= () => createResponseInstance(); + return this.#notFoundHandler(this); + }; + }, "Context"); + } +}); + +// ../../node_modules/hono/dist/router.js +var METHOD_NAME_ALL, METHOD_NAME_ALL_LOWERCASE, METHODS, MESSAGE_MATCHER_IS_ALREADY_BUILT, UnsupportedPathError; +var init_router = __esm({ + "../../node_modules/hono/dist/router.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + METHOD_NAME_ALL = "ALL"; + METHOD_NAME_ALL_LOWERCASE = "all"; + METHODS = ["get", "post", "put", "delete", "options", "patch"]; + MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is already built."; + UnsupportedPathError = /* @__PURE__ */ __name(class extends Error { + }, "UnsupportedPathError"); + } +}); + +// ../../node_modules/hono/dist/utils/constants.js +var COMPOSED_HANDLER; +var init_constants2 = __esm({ + "../../node_modules/hono/dist/utils/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + COMPOSED_HANDLER = "__COMPOSED_HANDLER"; + } +}); + +// ../../node_modules/hono/dist/hono-base.js +var notFoundHandler, errorHandler, Hono; +var init_hono_base = __esm({ + "../../node_modules/hono/dist/hono-base.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_compose(); + init_context(); + init_router(); + init_constants2(); + init_url(); + notFoundHandler = /* @__PURE__ */ __name((c2) => { + return c2.text("404 Not Found", 404); + }, "notFoundHandler"); + errorHandler = /* @__PURE__ */ __name((err, c2) => { + if ("getResponse" in err) { + const res = err.getResponse(); + return c2.newResponse(res.body, res); + } + console.error(err); + return c2.text("Internal Server Error", 500); + }, "errorHandler"); + Hono = /* @__PURE__ */ __name(class _Hono { + get; + post; + put; + delete; + options; + patch; + all; + on; + use; + /* + This class is like an abstract class and does not have a router. + To use it, inherit the class and implement router in the constructor. + */ + router; + getPath; + // Cannot use `#` because it requires visibility at JavaScript runtime. + _basePath = "/"; + #path = "/"; + routes = []; + constructor(options = {}) { + const allMethods = [...METHODS, METHOD_NAME_ALL_LOWERCASE]; + allMethods.forEach((method) => { + this[method] = (args1, ...args) => { + if (typeof args1 === "string") { + this.#path = args1; + } else { + this.#addRoute(method, this.#path, args1); + } + args.forEach((handler) => { + this.#addRoute(method, this.#path, handler); + }); + return this; + }; + }); + this.on = (method, path, ...handlers2) => { + for (const p2 of [path].flat()) { + this.#path = p2; + for (const m2 of [method].flat()) { + handlers2.map((handler) => { + this.#addRoute(m2.toUpperCase(), this.#path, handler); + }); + } + } + return this; + }; + this.use = (arg1, ...handlers2) => { + if (typeof arg1 === "string") { + this.#path = arg1; + } else { + this.#path = "*"; + handlers2.unshift(arg1); + } + handlers2.forEach((handler) => { + this.#addRoute(METHOD_NAME_ALL, this.#path, handler); + }); + return this; + }; + const { strict, ...optionsWithoutStrict } = options; + Object.assign(this, optionsWithoutStrict); + this.getPath = strict ?? true ? options.getPath ?? getPath : getPathNoStrict; + } + #clone() { + const clone2 = new _Hono({ + router: this.router, + getPath: this.getPath + }); + clone2.errorHandler = this.errorHandler; + clone2.#notFoundHandler = this.#notFoundHandler; + clone2.routes = this.routes; + return clone2; + } + #notFoundHandler = notFoundHandler; + // Cannot use `#` because it requires visibility at JavaScript runtime. + errorHandler = errorHandler; + /** + * `.route()` allows grouping other Hono instance in routes. + * + * @see {@link https://hono.dev/docs/api/routing#grouping} + * + * @param {string} path - base Path + * @param {Hono} app - other Hono instance + * @returns {Hono} routed Hono instance + * + * @example + * ```ts + * const app = new Hono() + * const app2 = new Hono() + * + * app2.get("/user", (c) => c.text("user")) + * app.route("/api", app2) // GET /api/user + * ``` + */ + route(path, app) { + const subApp = this.basePath(path); + app.routes.map((r2) => { + let handler; + if (app.errorHandler === errorHandler) { + handler = r2.handler; + } else { + handler = /* @__PURE__ */ __name(async (c2, next) => (await compose([], app.errorHandler)(c2, () => r2.handler(c2, next))).res, "handler"); + handler[COMPOSED_HANDLER] = r2.handler; + } + subApp.#addRoute(r2.method, r2.path, handler); + }); + return this; + } + /** + * `.basePath()` allows base paths to be specified. + * + * @see {@link https://hono.dev/docs/api/routing#base-path} + * + * @param {string} path - base Path + * @returns {Hono} changed Hono instance + * + * @example + * ```ts + * const api = new Hono().basePath('/api') + * ``` + */ + basePath(path) { + const subApp = this.#clone(); + subApp._basePath = mergePath(this._basePath, path); + return subApp; + } + /** + * `.onError()` handles an error and returns a customized Response. + * + * @see {@link https://hono.dev/docs/api/hono#error-handling} + * + * @param {ErrorHandler} handler - request Handler for error + * @returns {Hono} changed Hono instance + * + * @example + * ```ts + * app.onError((err, c) => { + * console.error(`${err}`) + * return c.text('Custom Error Message', 500) + * }) + * ``` + */ + onError = (handler) => { + this.errorHandler = handler; + return this; + }; + /** + * `.notFound()` allows you to customize a Not Found Response. + * + * @see {@link https://hono.dev/docs/api/hono#not-found} + * + * @param {NotFoundHandler} handler - request handler for not-found + * @returns {Hono} changed Hono instance + * + * @example + * ```ts + * app.notFound((c) => { + * return c.text('Custom 404 Message', 404) + * }) + * ``` + */ + notFound = (handler) => { + this.#notFoundHandler = handler; + return this; + }; + /** + * `.mount()` allows you to mount applications built with other frameworks into your Hono application. + * + * @see {@link https://hono.dev/docs/api/hono#mount} + * + * @param {string} path - base Path + * @param {Function} applicationHandler - other Request Handler + * @param {MountOptions} [options] - options of `.mount()` + * @returns {Hono} mounted Hono instance + * + * @example + * ```ts + * import { Router as IttyRouter } from 'itty-router' + * import { Hono } from 'hono' + * // Create itty-router application + * const ittyRouter = IttyRouter() + * // GET /itty-router/hello + * ittyRouter.get('/hello', () => new Response('Hello from itty-router')) + * + * const app = new Hono() + * app.mount('/itty-router', ittyRouter.handle) + * ``` + * + * @example + * ```ts + * const app = new Hono() + * // Send the request to another application without modification. + * app.mount('/app', anotherApp, { + * replaceRequest: (req) => req, + * }) + * ``` + */ + mount(path, applicationHandler, options) { + let replaceRequest; + let optionHandler; + if (options) { + if (typeof options === "function") { + optionHandler = options; + } else { + optionHandler = options.optionHandler; + if (options.replaceRequest === false) { + replaceRequest = /* @__PURE__ */ __name((request) => request, "replaceRequest"); + } else { + replaceRequest = options.replaceRequest; + } + } + } + const getOptions = optionHandler ? (c2) => { + const options2 = optionHandler(c2); + return Array.isArray(options2) ? options2 : [options2]; + } : (c2) => { + let executionContext = void 0; + try { + executionContext = c2.executionCtx; + } catch { + } + return [c2.env, executionContext]; + }; + replaceRequest ||= (() => { + const mergedPath = mergePath(this._basePath, path); + const pathPrefixLength = mergedPath === "/" ? 0 : mergedPath.length; + return (request) => { + const url2 = new URL(request.url); + url2.pathname = url2.pathname.slice(pathPrefixLength) || "/"; + return new Request(url2, request); + }; + })(); + const handler = /* @__PURE__ */ __name(async (c2, next) => { + const res = await applicationHandler(replaceRequest(c2.req.raw), ...getOptions(c2)); + if (res) { + return res; + } + await next(); + }, "handler"); + this.#addRoute(METHOD_NAME_ALL, mergePath(path, "*"), handler); + return this; + } + #addRoute(method, path, handler) { + method = method.toUpperCase(); + path = mergePath(this._basePath, path); + const r2 = { basePath: this._basePath, path, method, handler }; + this.router.add(method, path, [handler, r2]); + this.routes.push(r2); + } + #handleError(err, c2) { + if (err instanceof Error) { + return this.errorHandler(err, c2); + } + throw err; + } + #dispatch(request, executionCtx, env2, method) { + if (method === "HEAD") { + return (async () => new Response(null, await this.#dispatch(request, executionCtx, env2, "GET")))(); + } + const path = this.getPath(request, { env: env2 }); + const matchResult = this.router.match(method, path); + const c2 = new Context(request, { + path, + matchResult, + env: env2, + executionCtx, + notFoundHandler: this.#notFoundHandler + }); + if (matchResult[0].length === 1) { + let res; + try { + res = matchResult[0][0][0][0](c2, async () => { + c2.res = await this.#notFoundHandler(c2); + }); + } catch (err) { + return this.#handleError(err, c2); + } + return res instanceof Promise ? res.then( + (resolved) => resolved || (c2.finalized ? c2.res : this.#notFoundHandler(c2)) + ).catch((err) => this.#handleError(err, c2)) : res ?? this.#notFoundHandler(c2); + } + const composed = compose(matchResult[0], this.errorHandler, this.#notFoundHandler); + return (async () => { + try { + const context2 = await composed(c2); + if (!context2.finalized) { + throw new Error( + "Context is not finalized. Did you forget to return a Response object or `await next()`?" + ); + } + return context2.res; + } catch (err) { + return this.#handleError(err, c2); + } + })(); + } + /** + * `.fetch()` will be entry point of your app. + * + * @see {@link https://hono.dev/docs/api/hono#fetch} + * + * @param {Request} request - request Object of request + * @param {Env} Env - env Object + * @param {ExecutionContext} - context of execution + * @returns {Response | Promise} response of request + * + */ + fetch = (request, ...rest) => { + return this.#dispatch(request, rest[1], rest[0], request.method); + }; + /** + * `.request()` is a useful method for testing. + * You can pass a URL or pathname to send a GET request. + * app will return a Response object. + * ```ts + * test('GET /hello is ok', async () => { + * const res = await app.request('/hello') + * expect(res.status).toBe(200) + * }) + * ``` + * @see https://hono.dev/docs/api/hono#request + */ + request = (input, requestInit, Env, executionCtx) => { + if (input instanceof Request) { + return this.fetch(requestInit ? new Request(input, requestInit) : input, Env, executionCtx); + } + input = input.toString(); + return this.fetch( + new Request( + /^https?:\/\//.test(input) ? input : `http://localhost${mergePath("/", input)}`, + requestInit + ), + Env, + executionCtx + ); + }; + /** + * `.fire()` automatically adds a global fetch event listener. + * This can be useful for environments that adhere to the Service Worker API, such as non-ES module Cloudflare Workers. + * @deprecated + * Use `fire` from `hono/service-worker` instead. + * ```ts + * import { Hono } from 'hono' + * import { fire } from 'hono/service-worker' + * + * const app = new Hono() + * // ... + * fire(app) + * ``` + * @see https://hono.dev/docs/api/hono#fire + * @see https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API + * @see https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/ + */ + fire = () => { + addEventListener("fetch", (event) => { + event.respondWith(this.#dispatch(event.request, event, void 0, event.request.method)); + }); + }; + }, "_Hono"); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/matcher.js +function match(method, path) { + const matchers = this.buildAllMatchers(); + const match2 = /* @__PURE__ */ __name((method2, path2) => { + const matcher = matchers[method2] || matchers[METHOD_NAME_ALL]; + const staticMatch = matcher[2][path2]; + if (staticMatch) { + return staticMatch; + } + const match3 = path2.match(matcher[0]); + if (!match3) { + return [[], emptyParam]; + } + const index = match3.indexOf("", 1); + return [matcher[1][index], match3]; + }, "match2"); + this.match = match2; + return match2(method, path); +} +var emptyParam; +var init_matcher = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/matcher.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router(); + emptyParam = []; + __name(match, "match"); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/node.js +function compareKey(a2, b2) { + if (a2.length === 1) { + return b2.length === 1 ? a2 < b2 ? -1 : 1 : -1; + } + if (b2.length === 1) { + return 1; + } + if (a2 === ONLY_WILDCARD_REG_EXP_STR || a2 === TAIL_WILDCARD_REG_EXP_STR) { + return 1; + } else if (b2 === ONLY_WILDCARD_REG_EXP_STR || b2 === TAIL_WILDCARD_REG_EXP_STR) { + return -1; + } + if (a2 === LABEL_REG_EXP_STR) { + return 1; + } else if (b2 === LABEL_REG_EXP_STR) { + return -1; + } + return a2.length === b2.length ? a2 < b2 ? -1 : 1 : b2.length - a2.length; +} +var LABEL_REG_EXP_STR, ONLY_WILDCARD_REG_EXP_STR, TAIL_WILDCARD_REG_EXP_STR, PATH_ERROR, regExpMetaChars, Node2; +var init_node = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/node.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + LABEL_REG_EXP_STR = "[^/]+"; + ONLY_WILDCARD_REG_EXP_STR = ".*"; + TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)"; + PATH_ERROR = /* @__PURE__ */ Symbol(); + regExpMetaChars = new Set(".\\+*[^]$()"); + __name(compareKey, "compareKey"); + Node2 = /* @__PURE__ */ __name(class _Node { + #index; + #varIndex; + #children = /* @__PURE__ */ Object.create(null); + insert(tokens, index, paramMap, context2, pathErrorCheckOnly) { + if (tokens.length === 0) { + if (this.#index !== void 0) { + throw PATH_ERROR; + } + if (pathErrorCheckOnly) { + return; + } + this.#index = index; + return; + } + const [token, ...restTokens] = tokens; + const pattern = token === "*" ? restTokens.length === 0 ? ["", "", ONLY_WILDCARD_REG_EXP_STR] : ["", "", LABEL_REG_EXP_STR] : token === "/*" ? ["", "", TAIL_WILDCARD_REG_EXP_STR] : token.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/); + let node; + if (pattern) { + const name = pattern[1]; + let regexpStr = pattern[2] || LABEL_REG_EXP_STR; + if (name && pattern[2]) { + if (regexpStr === ".*") { + throw PATH_ERROR; + } + regexpStr = regexpStr.replace(/^\((?!\?:)(?=[^)]+\)$)/, "(?:"); + if (/\((?!\?:)/.test(regexpStr)) { + throw PATH_ERROR; + } + } + node = this.#children[regexpStr]; + if (!node) { + if (Object.keys(this.#children).some( + (k2) => k2 !== ONLY_WILDCARD_REG_EXP_STR && k2 !== TAIL_WILDCARD_REG_EXP_STR + )) { + throw PATH_ERROR; + } + if (pathErrorCheckOnly) { + return; + } + node = this.#children[regexpStr] = new _Node(); + if (name !== "") { + node.#varIndex = context2.varIndex++; + } + } + if (!pathErrorCheckOnly && name !== "") { + paramMap.push([name, node.#varIndex]); + } + } else { + node = this.#children[token]; + if (!node) { + if (Object.keys(this.#children).some( + (k2) => k2.length > 1 && k2 !== ONLY_WILDCARD_REG_EXP_STR && k2 !== TAIL_WILDCARD_REG_EXP_STR + )) { + throw PATH_ERROR; + } + if (pathErrorCheckOnly) { + return; + } + node = this.#children[token] = new _Node(); + } + } + node.insert(restTokens, index, paramMap, context2, pathErrorCheckOnly); + } + buildRegExpStr() { + const childKeys = Object.keys(this.#children).sort(compareKey); + const strList = childKeys.map((k2) => { + const c2 = this.#children[k2]; + return (typeof c2.#varIndex === "number" ? `(${k2})@${c2.#varIndex}` : regExpMetaChars.has(k2) ? `\\${k2}` : k2) + c2.buildRegExpStr(); + }); + if (typeof this.#index === "number") { + strList.unshift(`#${this.#index}`); + } + if (strList.length === 0) { + return ""; + } + if (strList.length === 1) { + return strList[0]; + } + return "(?:" + strList.join("|") + ")"; + } + }, "_Node"); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/trie.js +var Trie; +var init_trie = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/trie.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_node(); + Trie = /* @__PURE__ */ __name(class { + #context = { varIndex: 0 }; + #root = new Node2(); + insert(path, index, pathErrorCheckOnly) { + const paramAssoc = []; + const groups = []; + for (let i2 = 0; ; ) { + let replaced = false; + path = path.replace(/\{[^}]+\}/g, (m2) => { + const mark = `@\\${i2}`; + groups[i2] = [mark, m2]; + i2++; + replaced = true; + return mark; + }); + if (!replaced) { + break; + } + } + const tokens = path.match(/(?::[^\/]+)|(?:\/\*$)|./g) || []; + for (let i2 = groups.length - 1; i2 >= 0; i2--) { + const [mark] = groups[i2]; + for (let j2 = tokens.length - 1; j2 >= 0; j2--) { + if (tokens[j2].indexOf(mark) !== -1) { + tokens[j2] = tokens[j2].replace(mark, groups[i2][1]); + break; + } + } + } + this.#root.insert(tokens, index, paramAssoc, this.#context, pathErrorCheckOnly); + return paramAssoc; + } + buildRegExp() { + let regexp = this.#root.buildRegExpStr(); + if (regexp === "") { + return [/^$/, [], []]; + } + let captureIndex = 0; + const indexReplacementMap = []; + const paramReplacementMap = []; + regexp = regexp.replace(/#(\d+)|@(\d+)|\.\*\$/g, (_, handlerIndex, paramIndex) => { + if (handlerIndex !== void 0) { + indexReplacementMap[++captureIndex] = Number(handlerIndex); + return "$()"; + } + if (paramIndex !== void 0) { + paramReplacementMap[Number(paramIndex)] = ++captureIndex; + return ""; + } + return ""; + }); + return [new RegExp(`^${regexp}`), indexReplacementMap, paramReplacementMap]; + } + }, "Trie"); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/router.js +function buildWildcardRegExp(path) { + return wildcardRegExpCache[path] ??= new RegExp( + path === "*" ? "" : `^${path.replace( + /\/\*$|([.\\+*[^\]$()])/g, + (_, metaChar) => metaChar ? `\\${metaChar}` : "(?:|/.*)" + )}$` + ); +} +function clearWildcardRegExpCache() { + wildcardRegExpCache = /* @__PURE__ */ Object.create(null); +} +function buildMatcherFromPreprocessedRoutes(routes) { + const trie = new Trie(); + const handlerData = []; + if (routes.length === 0) { + return nullMatcher; + } + const routesWithStaticPathFlag = routes.map( + (route) => [!/\*|\/:/.test(route[0]), ...route] + ).sort( + ([isStaticA, pathA], [isStaticB, pathB]) => isStaticA ? 1 : isStaticB ? -1 : pathA.length - pathB.length + ); + const staticMap = /* @__PURE__ */ Object.create(null); + for (let i2 = 0, j2 = -1, len = routesWithStaticPathFlag.length; i2 < len; i2++) { + const [pathErrorCheckOnly, path, handlers2] = routesWithStaticPathFlag[i2]; + if (pathErrorCheckOnly) { + staticMap[path] = [handlers2.map(([h2]) => [h2, /* @__PURE__ */ Object.create(null)]), emptyParam]; + } else { + j2++; + } + let paramAssoc; + try { + paramAssoc = trie.insert(path, j2, pathErrorCheckOnly); + } catch (e2) { + throw e2 === PATH_ERROR ? new UnsupportedPathError(path) : e2; + } + if (pathErrorCheckOnly) { + continue; + } + handlerData[j2] = handlers2.map(([h2, paramCount]) => { + const paramIndexMap = /* @__PURE__ */ Object.create(null); + paramCount -= 1; + for (; paramCount >= 0; paramCount--) { + const [key, value] = paramAssoc[paramCount]; + paramIndexMap[key] = value; + } + return [h2, paramIndexMap]; + }); + } + const [regexp, indexReplacementMap, paramReplacementMap] = trie.buildRegExp(); + for (let i2 = 0, len = handlerData.length; i2 < len; i2++) { + for (let j2 = 0, len2 = handlerData[i2].length; j2 < len2; j2++) { + const map2 = handlerData[i2][j2]?.[1]; + if (!map2) { + continue; + } + const keys = Object.keys(map2); + for (let k2 = 0, len3 = keys.length; k2 < len3; k2++) { + map2[keys[k2]] = paramReplacementMap[map2[keys[k2]]]; + } + } + } + const handlerMap = []; + for (const i2 in indexReplacementMap) { + handlerMap[i2] = handlerData[indexReplacementMap[i2]]; + } + return [regexp, handlerMap, staticMap]; +} +function findMiddleware(middleware2, path) { + if (!middleware2) { + return void 0; + } + for (const k2 of Object.keys(middleware2).sort((a2, b2) => b2.length - a2.length)) { + if (buildWildcardRegExp(k2).test(path)) { + return [...middleware2[k2]]; + } + } + return void 0; +} +var nullMatcher, wildcardRegExpCache, RegExpRouter; +var init_router2 = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/router.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router(); + init_url(); + init_matcher(); + init_node(); + init_trie(); + nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)]; + wildcardRegExpCache = /* @__PURE__ */ Object.create(null); + __name(buildWildcardRegExp, "buildWildcardRegExp"); + __name(clearWildcardRegExpCache, "clearWildcardRegExpCache"); + __name(buildMatcherFromPreprocessedRoutes, "buildMatcherFromPreprocessedRoutes"); + __name(findMiddleware, "findMiddleware"); + RegExpRouter = /* @__PURE__ */ __name(class { + name = "RegExpRouter"; + #middleware; + #routes; + constructor() { + this.#middleware = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) }; + this.#routes = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) }; + } + add(method, path, handler) { + const middleware2 = this.#middleware; + const routes = this.#routes; + if (!middleware2 || !routes) { + throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT); + } + if (!middleware2[method]) { + ; + [middleware2, routes].forEach((handlerMap) => { + handlerMap[method] = /* @__PURE__ */ Object.create(null); + Object.keys(handlerMap[METHOD_NAME_ALL]).forEach((p2) => { + handlerMap[method][p2] = [...handlerMap[METHOD_NAME_ALL][p2]]; + }); + }); + } + if (path === "/*") { + path = "*"; + } + const paramCount = (path.match(/\/:/g) || []).length; + if (/\*$/.test(path)) { + const re = buildWildcardRegExp(path); + if (method === METHOD_NAME_ALL) { + Object.keys(middleware2).forEach((m2) => { + middleware2[m2][path] ||= findMiddleware(middleware2[m2], path) || findMiddleware(middleware2[METHOD_NAME_ALL], path) || []; + }); + } else { + middleware2[method][path] ||= findMiddleware(middleware2[method], path) || findMiddleware(middleware2[METHOD_NAME_ALL], path) || []; + } + Object.keys(middleware2).forEach((m2) => { + if (method === METHOD_NAME_ALL || method === m2) { + Object.keys(middleware2[m2]).forEach((p2) => { + re.test(p2) && middleware2[m2][p2].push([handler, paramCount]); + }); + } + }); + Object.keys(routes).forEach((m2) => { + if (method === METHOD_NAME_ALL || method === m2) { + Object.keys(routes[m2]).forEach( + (p2) => re.test(p2) && routes[m2][p2].push([handler, paramCount]) + ); + } + }); + return; + } + const paths = checkOptionalParameter(path) || [path]; + for (let i2 = 0, len = paths.length; i2 < len; i2++) { + const path2 = paths[i2]; + Object.keys(routes).forEach((m2) => { + if (method === METHOD_NAME_ALL || method === m2) { + routes[m2][path2] ||= [ + ...findMiddleware(middleware2[m2], path2) || findMiddleware(middleware2[METHOD_NAME_ALL], path2) || [] + ]; + routes[m2][path2].push([handler, paramCount - len + i2 + 1]); + } + }); + } + } + match = match; + buildAllMatchers() { + const matchers = /* @__PURE__ */ Object.create(null); + Object.keys(this.#routes).concat(Object.keys(this.#middleware)).forEach((method) => { + matchers[method] ||= this.#buildMatcher(method); + }); + this.#middleware = this.#routes = void 0; + clearWildcardRegExpCache(); + return matchers; + } + #buildMatcher(method) { + const routes = []; + let hasOwnRoute = method === METHOD_NAME_ALL; + [this.#middleware, this.#routes].forEach((r2) => { + const ownRoute = r2[method] ? Object.keys(r2[method]).map((path) => [path, r2[method][path]]) : []; + if (ownRoute.length !== 0) { + hasOwnRoute ||= true; + routes.push(...ownRoute); + } else if (method !== METHOD_NAME_ALL) { + routes.push( + ...Object.keys(r2[METHOD_NAME_ALL]).map((path) => [path, r2[METHOD_NAME_ALL][path]]) + ); + } + }); + if (!hasOwnRoute) { + return null; + } else { + return buildMatcherFromPreprocessedRoutes(routes); + } + } + }, "RegExpRouter"); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/prepared-router.js +var init_prepared_router = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/prepared-router.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router(); + init_matcher(); + init_router2(); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/index.js +var init_reg_exp_router = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router2(); + init_prepared_router(); + } +}); + +// ../../node_modules/hono/dist/router/smart-router/router.js +var SmartRouter; +var init_router3 = __esm({ + "../../node_modules/hono/dist/router/smart-router/router.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router(); + SmartRouter = /* @__PURE__ */ __name(class { + name = "SmartRouter"; + #routers = []; + #routes = []; + constructor(init) { + this.#routers = init.routers; + } + add(method, path, handler) { + if (!this.#routes) { + throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT); + } + this.#routes.push([method, path, handler]); + } + match(method, path) { + if (!this.#routes) { + throw new Error("Fatal error"); + } + const routers = this.#routers; + const routes = this.#routes; + const len = routers.length; + let i2 = 0; + let res; + for (; i2 < len; i2++) { + const router8 = routers[i2]; + try { + for (let i22 = 0, len2 = routes.length; i22 < len2; i22++) { + router8.add(...routes[i22]); + } + res = router8.match(method, path); + } catch (e2) { + if (e2 instanceof UnsupportedPathError) { + continue; + } + throw e2; + } + this.match = router8.match.bind(router8); + this.#routers = [router8]; + this.#routes = void 0; + break; + } + if (i2 === len) { + throw new Error("Fatal error"); + } + this.name = `SmartRouter + ${this.activeRouter.name}`; + return res; + } + get activeRouter() { + if (this.#routes || this.#routers.length !== 1) { + throw new Error("No active router has been determined yet."); + } + return this.#routers[0]; + } + }, "SmartRouter"); + } +}); + +// ../../node_modules/hono/dist/router/smart-router/index.js +var init_smart_router = __esm({ + "../../node_modules/hono/dist/router/smart-router/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router3(); + } +}); + +// ../../node_modules/hono/dist/router/trie-router/node.js +var emptyParams, hasChildren, Node3; +var init_node2 = __esm({ + "../../node_modules/hono/dist/router/trie-router/node.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router(); + init_url(); + emptyParams = /* @__PURE__ */ Object.create(null); + hasChildren = /* @__PURE__ */ __name((children) => { + for (const _ in children) { + return true; + } + return false; + }, "hasChildren"); + Node3 = /* @__PURE__ */ __name(class _Node2 { + #methods; + #children; + #patterns; + #order = 0; + #params = emptyParams; + constructor(method, handler, children) { + this.#children = children || /* @__PURE__ */ Object.create(null); + this.#methods = []; + if (method && handler) { + const m2 = /* @__PURE__ */ Object.create(null); + m2[method] = { handler, possibleKeys: [], score: 0 }; + this.#methods = [m2]; + } + this.#patterns = []; + } + insert(method, path, handler) { + this.#order = ++this.#order; + let curNode = this; + const parts = splitRoutingPath(path); + const possibleKeys = []; + for (let i2 = 0, len = parts.length; i2 < len; i2++) { + const p2 = parts[i2]; + const nextP = parts[i2 + 1]; + const pattern = getPattern(p2, nextP); + const key = Array.isArray(pattern) ? pattern[0] : p2; + if (key in curNode.#children) { + curNode = curNode.#children[key]; + if (pattern) { + possibleKeys.push(pattern[1]); + } + continue; + } + curNode.#children[key] = new _Node2(); + if (pattern) { + curNode.#patterns.push(pattern); + possibleKeys.push(pattern[1]); + } + curNode = curNode.#children[key]; + } + curNode.#methods.push({ + [method]: { + handler, + possibleKeys: possibleKeys.filter((v3, i2, a2) => a2.indexOf(v3) === i2), + score: this.#order + } + }); + return curNode; + } + #pushHandlerSets(handlerSets, node, method, nodeParams, params) { + for (let i2 = 0, len = node.#methods.length; i2 < len; i2++) { + const m2 = node.#methods[i2]; + const handlerSet = m2[method] || m2[METHOD_NAME_ALL]; + const processedSet = {}; + if (handlerSet !== void 0) { + handlerSet.params = /* @__PURE__ */ Object.create(null); + handlerSets.push(handlerSet); + if (nodeParams !== emptyParams || params && params !== emptyParams) { + for (let i22 = 0, len2 = handlerSet.possibleKeys.length; i22 < len2; i22++) { + const key = handlerSet.possibleKeys[i22]; + const processed = processedSet[handlerSet.score]; + handlerSet.params[key] = params?.[key] && !processed ? params[key] : nodeParams[key] ?? params?.[key]; + processedSet[handlerSet.score] = true; + } + } + } + } + } + search(method, path) { + const handlerSets = []; + this.#params = emptyParams; + const curNode = this; + let curNodes = [curNode]; + const parts = splitPath(path); + const curNodesQueue = []; + const len = parts.length; + let partOffsets = null; + for (let i2 = 0; i2 < len; i2++) { + const part = parts[i2]; + const isLast = i2 === len - 1; + const tempNodes = []; + for (let j2 = 0, len2 = curNodes.length; j2 < len2; j2++) { + const node = curNodes[j2]; + const nextNode = node.#children[part]; + if (nextNode) { + nextNode.#params = node.#params; + if (isLast) { + if (nextNode.#children["*"]) { + this.#pushHandlerSets(handlerSets, nextNode.#children["*"], method, node.#params); + } + this.#pushHandlerSets(handlerSets, nextNode, method, node.#params); + } else { + tempNodes.push(nextNode); + } + } + for (let k2 = 0, len3 = node.#patterns.length; k2 < len3; k2++) { + const pattern = node.#patterns[k2]; + const params = node.#params === emptyParams ? {} : { ...node.#params }; + if (pattern === "*") { + const astNode = node.#children["*"]; + if (astNode) { + this.#pushHandlerSets(handlerSets, astNode, method, node.#params); + astNode.#params = params; + tempNodes.push(astNode); + } + continue; + } + const [key, name, matcher] = pattern; + if (!part && !(matcher instanceof RegExp)) { + continue; + } + const child = node.#children[key]; + if (matcher instanceof RegExp) { + if (partOffsets === null) { + partOffsets = new Array(len); + let offset = path[0] === "/" ? 1 : 0; + for (let p2 = 0; p2 < len; p2++) { + partOffsets[p2] = offset; + offset += parts[p2].length + 1; + } + } + const restPathString = path.substring(partOffsets[i2]); + const m2 = matcher.exec(restPathString); + if (m2) { + params[name] = m2[0]; + this.#pushHandlerSets(handlerSets, child, method, node.#params, params); + if (hasChildren(child.#children)) { + child.#params = params; + const componentCount = m2[0].match(/\//)?.length ?? 0; + const targetCurNodes = curNodesQueue[componentCount] ||= []; + targetCurNodes.push(child); + } + continue; + } + } + if (matcher === true || matcher.test(part)) { + params[name] = part; + if (isLast) { + this.#pushHandlerSets(handlerSets, child, method, params, node.#params); + if (child.#children["*"]) { + this.#pushHandlerSets( + handlerSets, + child.#children["*"], + method, + params, + node.#params + ); + } + } else { + child.#params = params; + tempNodes.push(child); + } + } + } + } + const shifted = curNodesQueue.shift(); + curNodes = shifted ? tempNodes.concat(shifted) : tempNodes; + } + if (handlerSets.length > 1) { + handlerSets.sort((a2, b2) => { + return a2.score - b2.score; + }); + } + return [handlerSets.map(({ handler, params }) => [handler, params])]; + } + }, "_Node"); + } +}); + +// ../../node_modules/hono/dist/router/trie-router/router.js +var TrieRouter; +var init_router4 = __esm({ + "../../node_modules/hono/dist/router/trie-router/router.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_url(); + init_node2(); + TrieRouter = /* @__PURE__ */ __name(class { + name = "TrieRouter"; + #node; + constructor() { + this.#node = new Node3(); + } + add(method, path, handler) { + const results = checkOptionalParameter(path); + if (results) { + for (let i2 = 0, len = results.length; i2 < len; i2++) { + this.#node.insert(method, results[i2], handler); + } + return; + } + this.#node.insert(method, path, handler); + } + match(method, path) { + return this.#node.search(method, path); + } + }, "TrieRouter"); + } +}); + +// ../../node_modules/hono/dist/router/trie-router/index.js +var init_trie_router = __esm({ + "../../node_modules/hono/dist/router/trie-router/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router4(); + } +}); + +// ../../node_modules/hono/dist/hono.js +var Hono2; +var init_hono = __esm({ + "../../node_modules/hono/dist/hono.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_hono_base(); + init_reg_exp_router(); + init_smart_router(); + init_trie_router(); + Hono2 = /* @__PURE__ */ __name(class extends Hono { + /** + * Creates an instance of the Hono class. + * + * @param options - Optional configuration options for the Hono instance. + */ + constructor(options = {}) { + super(options); + this.router = options.router ?? new SmartRouter({ + routers: [new RegExpRouter(), new TrieRouter()] + }); + } + }, "Hono"); + } +}); + +// ../../node_modules/hono/dist/index.js +var init_dist = __esm({ + "../../node_modules/hono/dist/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_hono(); + } +}); + +// ../../node_modules/hono/dist/middleware/cors/index.js +var cors; +var init_cors = __esm({ + "../../node_modules/hono/dist/middleware/cors/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + cors = /* @__PURE__ */ __name((options) => { + const defaults2 = { + origin: "*", + allowMethods: ["GET", "HEAD", "PUT", "POST", "DELETE", "PATCH"], + allowHeaders: [], + exposeHeaders: [] + }; + const opts = { + ...defaults2, + ...options + }; + const findAllowOrigin = ((optsOrigin) => { + if (typeof optsOrigin === "string") { + if (optsOrigin === "*") { + if (opts.credentials) { + return (origin2) => origin2 || null; + } + return () => optsOrigin; + } else { + return (origin2) => optsOrigin === origin2 ? origin2 : null; + } + } else if (typeof optsOrigin === "function") { + return optsOrigin; + } else { + return (origin2) => optsOrigin.includes(origin2) ? origin2 : null; + } + })(opts.origin); + const findAllowMethods = ((optsAllowMethods) => { + if (typeof optsAllowMethods === "function") { + return optsAllowMethods; + } else if (Array.isArray(optsAllowMethods)) { + return () => optsAllowMethods; + } else { + return () => []; + } + })(opts.allowMethods); + return /* @__PURE__ */ __name(async function cors2(c2, next) { + function set2(key, value) { + c2.res.headers.set(key, value); + } + __name(set2, "set"); + const allowOrigin = await findAllowOrigin(c2.req.header("origin") || "", c2); + if (allowOrigin) { + set2("Access-Control-Allow-Origin", allowOrigin); + } + if (opts.credentials) { + set2("Access-Control-Allow-Credentials", "true"); + } + if (opts.exposeHeaders?.length) { + set2("Access-Control-Expose-Headers", opts.exposeHeaders.join(",")); + } + if (c2.req.method === "OPTIONS") { + if (opts.origin !== "*" || opts.credentials) { + set2("Vary", "Origin"); + } + if (opts.maxAge != null) { + set2("Access-Control-Max-Age", opts.maxAge.toString()); + } + const allowMethods = await findAllowMethods(c2.req.header("origin") || "", c2); + if (allowMethods.length) { + set2("Access-Control-Allow-Methods", allowMethods.join(",")); + } + let headers = opts.allowHeaders; + if (!headers?.length) { + const requestHeaders = c2.req.header("Access-Control-Request-Headers"); + if (requestHeaders) { + headers = requestHeaders.split(/\s*,\s*/); + } + } + if (headers?.length) { + set2("Access-Control-Allow-Headers", headers.join(",")); + c2.res.headers.append("Vary", "Access-Control-Request-Headers"); + } + c2.res.headers.delete("Content-Length"); + c2.res.headers.delete("Content-Type"); + return new Response(null, { + headers: c2.res.headers, + status: 204, + statusText: "No Content" + }); + } + await next(); + if (opts.origin !== "*" || opts.credentials) { + c2.header("Vary", "Origin", { append: true }); + } + }, "cors2"); + }, "cors"); + } +}); + +// ../../node_modules/hono/dist/utils/color.js +function getColorEnabled() { + const { process: process3, Deno } = globalThis; + const isNoColor = typeof Deno?.noColor === "boolean" ? Deno.noColor : process3 !== void 0 ? ( + // eslint-disable-next-line no-unsafe-optional-chaining + "NO_COLOR" in process3?.env + ) : false; + return !isNoColor; +} +async function getColorEnabledAsync() { + const { navigator: navigator2 } = globalThis; + const cfWorkers = "cloudflare:workers"; + const isNoColor = navigator2 !== void 0 && navigator2.userAgent === "Cloudflare-Workers" ? await (async () => { + try { + return "NO_COLOR" in ((await import(cfWorkers)).env ?? {}); + } catch { + return false; + } + })() : !getColorEnabled(); + return !isNoColor; +} +var init_color = __esm({ + "../../node_modules/hono/dist/utils/color.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(getColorEnabled, "getColorEnabled"); + __name(getColorEnabledAsync, "getColorEnabledAsync"); + } +}); + +// ../../node_modules/hono/dist/middleware/logger/index.js +async function log3(fn, prefix, method, path, status = 0, elapsed) { + const out = prefix === "<--" ? `${prefix} ${method} ${path}` : `${prefix} ${method} ${path} ${await colorStatus(status)} ${elapsed}`; + fn(out); +} +var humanize, time3, colorStatus, logger; +var init_logger = __esm({ + "../../node_modules/hono/dist/middleware/logger/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_color(); + humanize = /* @__PURE__ */ __name((times) => { + const [delimiter, separator] = [",", "."]; + const orderTimes = times.map((v3) => v3.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1" + delimiter)); + return orderTimes.join(separator); + }, "humanize"); + time3 = /* @__PURE__ */ __name((start) => { + const delta = Date.now() - start; + return humanize([delta < 1e3 ? delta + "ms" : Math.round(delta / 1e3) + "s"]); + }, "time"); + colorStatus = /* @__PURE__ */ __name(async (status) => { + const colorEnabled = await getColorEnabledAsync(); + if (colorEnabled) { + switch (status / 100 | 0) { + case 5: + return `\x1B[31m${status}\x1B[0m`; + case 4: + return `\x1B[33m${status}\x1B[0m`; + case 3: + return `\x1B[36m${status}\x1B[0m`; + case 2: + return `\x1B[32m${status}\x1B[0m`; + } + } + return `${status}`; + }, "colorStatus"); + __name(log3, "log"); + logger = /* @__PURE__ */ __name((fn = console.log) => { + return /* @__PURE__ */ __name(async function logger22(c2, next) { + const { method, url: url2 } = c2.req; + const path = url2.slice(url2.indexOf("/", 8)); + await log3(fn, "<--", method, path); + const start = Date.now(); + await next(); + await log3(fn, "-->", method, path, c2.res.status, time3(start)); + }, "logger2"); + }, "logger"); + } +}); + +// ../../node_modules/@trpc/server/dist/codes-DagpWZLc.mjs +function mergeWithoutOverrides(obj1, ...objs) { + const newObj = Object.assign(emptyObject(), obj1); + for (const overrides of objs) + for (const key in overrides) { + if (key in newObj && newObj[key] !== overrides[key]) + throw new Error(`Duplicate key ${key}`); + newObj[key] = overrides[key]; + } + return newObj; +} +function isObject(value) { + return !!value && !Array.isArray(value) && typeof value === "object"; +} +function isFunction(fn) { + return typeof fn === "function"; +} +function emptyObject() { + return /* @__PURE__ */ Object.create(null); +} +function isAsyncIterable(value) { + return asyncIteratorsSupported && isObject(value) && Symbol.asyncIterator in value; +} +function identity(it) { + return it; +} +function abortSignalsAnyPonyfill(signals) { + if (typeof AbortSignal.any === "function") + return AbortSignal.any(signals); + const ac3 = new AbortController(); + for (const signal of signals) { + if (signal.aborted) { + trigger(); + break; + } + signal.addEventListener("abort", trigger, { once: true }); + } + return ac3.signal; + function trigger() { + ac3.abort(); + for (const signal of signals) + signal.removeEventListener("abort", trigger); + } + __name(trigger, "trigger"); +} +var asyncIteratorsSupported, run, TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER, retryableRpcCodes; +var init_codes_DagpWZLc = __esm({ + "../../node_modules/@trpc/server/dist/codes-DagpWZLc.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(mergeWithoutOverrides, "mergeWithoutOverrides"); + __name(isObject, "isObject"); + __name(isFunction, "isFunction"); + __name(emptyObject, "emptyObject"); + asyncIteratorsSupported = typeof Symbol === "function" && !!Symbol.asyncIterator; + __name(isAsyncIterable, "isAsyncIterable"); + run = /* @__PURE__ */ __name((fn) => fn(), "run"); + __name(identity, "identity"); + __name(abortSignalsAnyPonyfill, "abortSignalsAnyPonyfill"); + TRPC_ERROR_CODES_BY_KEY = { + PARSE_ERROR: -32700, + BAD_REQUEST: -32600, + INTERNAL_SERVER_ERROR: -32603, + NOT_IMPLEMENTED: -32603, + BAD_GATEWAY: -32603, + SERVICE_UNAVAILABLE: -32603, + GATEWAY_TIMEOUT: -32603, + UNAUTHORIZED: -32001, + PAYMENT_REQUIRED: -32002, + FORBIDDEN: -32003, + NOT_FOUND: -32004, + METHOD_NOT_SUPPORTED: -32005, + TIMEOUT: -32008, + CONFLICT: -32009, + PRECONDITION_FAILED: -32012, + PAYLOAD_TOO_LARGE: -32013, + UNSUPPORTED_MEDIA_TYPE: -32015, + UNPROCESSABLE_CONTENT: -32022, + PRECONDITION_REQUIRED: -32028, + TOO_MANY_REQUESTS: -32029, + CLIENT_CLOSED_REQUEST: -32099 + }; + TRPC_ERROR_CODES_BY_NUMBER = { + [-32700]: "PARSE_ERROR", + [-32600]: "BAD_REQUEST", + [-32603]: "INTERNAL_SERVER_ERROR", + [-32001]: "UNAUTHORIZED", + [-32002]: "PAYMENT_REQUIRED", + [-32003]: "FORBIDDEN", + [-32004]: "NOT_FOUND", + [-32005]: "METHOD_NOT_SUPPORTED", + [-32008]: "TIMEOUT", + [-32009]: "CONFLICT", + [-32012]: "PRECONDITION_FAILED", + [-32013]: "PAYLOAD_TOO_LARGE", + [-32015]: "UNSUPPORTED_MEDIA_TYPE", + [-32022]: "UNPROCESSABLE_CONTENT", + [-32028]: "PRECONDITION_REQUIRED", + [-32029]: "TOO_MANY_REQUESTS", + [-32099]: "CLIENT_CLOSED_REQUEST" + }; + retryableRpcCodes = [ + TRPC_ERROR_CODES_BY_KEY.BAD_GATEWAY, + TRPC_ERROR_CODES_BY_KEY.SERVICE_UNAVAILABLE, + TRPC_ERROR_CODES_BY_KEY.GATEWAY_TIMEOUT, + TRPC_ERROR_CODES_BY_KEY.INTERNAL_SERVER_ERROR + ]; + } +}); + +// ../../node_modules/@trpc/server/dist/getErrorShape-vC8mUXJD.mjs +function createInnerProxy(callback, path, memo2) { + var _memo$cacheKey; + const cacheKey = path.join("."); + (_memo$cacheKey = memo2[cacheKey]) !== null && _memo$cacheKey !== void 0 || (memo2[cacheKey] = new Proxy(noop, { + get(_obj, key) { + if (typeof key !== "string" || key === "then") + return void 0; + return createInnerProxy(callback, [...path, key], memo2); + }, + apply(_1, _2, args) { + const lastOfPath = path[path.length - 1]; + let opts = { + args, + path + }; + if (lastOfPath === "call") + opts = { + args: args.length >= 2 ? [args[1]] : [], + path: path.slice(0, -1) + }; + else if (lastOfPath === "apply") + opts = { + args: args.length >= 2 ? args[1] : [], + path: path.slice(0, -1) + }; + freezeIfAvailable(opts.args); + freezeIfAvailable(opts.path); + return callback(opts); + } + })); + return memo2[cacheKey]; +} +function getStatusCodeFromKey(code) { + var _JSONRPC2_TO_HTTP_COD; + return (_JSONRPC2_TO_HTTP_COD = JSONRPC2_TO_HTTP_CODE[code]) !== null && _JSONRPC2_TO_HTTP_COD !== void 0 ? _JSONRPC2_TO_HTTP_COD : 500; +} +function getHTTPStatusCode(json2) { + const arr = Array.isArray(json2) ? json2 : [json2]; + const httpStatuses = new Set(arr.map((res) => { + if ("error" in res && isObject(res.error.data)) { + var _res$error$data; + if (typeof ((_res$error$data = res.error.data) === null || _res$error$data === void 0 ? void 0 : _res$error$data["httpStatus"]) === "number") + return res.error.data["httpStatus"]; + const code = TRPC_ERROR_CODES_BY_NUMBER[res.error.code]; + return getStatusCodeFromKey(code); + } + return 200; + })); + if (httpStatuses.size !== 1) + return 207; + const httpStatus = httpStatuses.values().next().value; + return httpStatus; +} +function getHTTPStatusCodeFromError(error50) { + return getStatusCodeFromKey(error50.code); +} +function getErrorShape(opts) { + const { path, error: error50, config: config3 } = opts; + const { code } = opts.error; + const shape = { + message: error50.message, + code: TRPC_ERROR_CODES_BY_KEY[code], + data: { + code, + httpStatus: getHTTPStatusCodeFromError(error50) + } + }; + if (config3.isDev && typeof opts.error.stack === "string") + shape.data.stack = opts.error.stack; + if (typeof path === "string") + shape.data.path = path; + return config3.errorFormatter((0, import_objectSpread2.default)((0, import_objectSpread2.default)({}, opts), {}, { shape })); +} +var __create2, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __getProtoOf2, __hasOwnProp2, __commonJS2, __copyProps2, __toESM2, noop, freezeIfAvailable, createRecursiveProxy, JSONRPC2_TO_HTTP_CODE, require_typeof, require_toPrimitive, require_toPropertyKey, require_defineProperty, require_objectSpread2, import_objectSpread2; +var init_getErrorShape_vC8mUXJD = __esm({ + "../../node_modules/@trpc/server/dist/getErrorShape-vC8mUXJD.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_codes_DagpWZLc(); + __create2 = Object.create; + __defProp2 = Object.defineProperty; + __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + __getOwnPropNames2 = Object.getOwnPropertyNames; + __getProtoOf2 = Object.getPrototypeOf; + __hasOwnProp2 = Object.prototype.hasOwnProperty; + __commonJS2 = /* @__PURE__ */ __name((cb2, mod) => function() { + return mod || (0, cb2[__getOwnPropNames2(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + }, "__commonJS"); + __copyProps2 = /* @__PURE__ */ __name((to, from, except2, desc2) => { + if (from && typeof from === "object" || typeof from === "function") + for (var keys = __getOwnPropNames2(from), i2 = 0, n2 = keys.length, key; i2 < n2; i2++) { + key = keys[i2]; + if (!__hasOwnProp2.call(to, key) && key !== except2) + __defProp2(to, key, { + get: ((k2) => from[k2]).bind(null, key), + enumerable: !(desc2 = __getOwnPropDesc2(from, key)) || desc2.enumerable + }); + } + return to; + }, "__copyProps"); + __toESM2 = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { + value: mod, + enumerable: true + }) : target, mod)), "__toESM"); + noop = /* @__PURE__ */ __name(() => { + }, "noop"); + freezeIfAvailable = /* @__PURE__ */ __name((obj) => { + if (Object.freeze) + Object.freeze(obj); + }, "freezeIfAvailable"); + __name(createInnerProxy, "createInnerProxy"); + createRecursiveProxy = /* @__PURE__ */ __name((callback) => createInnerProxy(callback, [], emptyObject()), "createRecursiveProxy"); + JSONRPC2_TO_HTTP_CODE = { + PARSE_ERROR: 400, + BAD_REQUEST: 400, + UNAUTHORIZED: 401, + PAYMENT_REQUIRED: 402, + FORBIDDEN: 403, + NOT_FOUND: 404, + METHOD_NOT_SUPPORTED: 405, + TIMEOUT: 408, + CONFLICT: 409, + PRECONDITION_FAILED: 412, + PAYLOAD_TOO_LARGE: 413, + UNSUPPORTED_MEDIA_TYPE: 415, + UNPROCESSABLE_CONTENT: 422, + PRECONDITION_REQUIRED: 428, + TOO_MANY_REQUESTS: 429, + CLIENT_CLOSED_REQUEST: 499, + INTERNAL_SERVER_ERROR: 500, + NOT_IMPLEMENTED: 501, + BAD_GATEWAY: 502, + SERVICE_UNAVAILABLE: 503, + GATEWAY_TIMEOUT: 504 + }; + __name(getStatusCodeFromKey, "getStatusCodeFromKey"); + __name(getHTTPStatusCode, "getHTTPStatusCode"); + __name(getHTTPStatusCodeFromError, "getHTTPStatusCodeFromError"); + require_typeof = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(exports, module) { + function _typeof$2(o2) { + "@babel/helpers - typeof"; + return module.exports = _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) { + return typeof o$1; + } : function(o$1) { + return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1; + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof$2(o2); + } + __name(_typeof$2, "_typeof$2"); + module.exports = _typeof$2, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_toPrimitive = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(exports, module) { + var _typeof$1 = require_typeof()["default"]; + function toPrimitive$1(t9, r2) { + if ("object" != _typeof$1(t9) || !t9) + return t9; + var e2 = t9[Symbol.toPrimitive]; + if (void 0 !== e2) { + var i2 = e2.call(t9, r2 || "default"); + if ("object" != _typeof$1(i2)) + return i2; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r2 ? String : Number)(t9); + } + __name(toPrimitive$1, "toPrimitive$1"); + module.exports = toPrimitive$1, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_toPropertyKey = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(exports, module) { + var _typeof = require_typeof()["default"]; + var toPrimitive = require_toPrimitive(); + function toPropertyKey$1(t9) { + var i2 = toPrimitive(t9, "string"); + return "symbol" == _typeof(i2) ? i2 : i2 + ""; + } + __name(toPropertyKey$1, "toPropertyKey$1"); + module.exports = toPropertyKey$1, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_defineProperty = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(exports, module) { + var toPropertyKey = require_toPropertyKey(); + function _defineProperty(e2, r2, t9) { + return (r2 = toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, { + value: t9, + enumerable: true, + configurable: true, + writable: true + }) : e2[r2] = t9, e2; + } + __name(_defineProperty, "_defineProperty"); + module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_objectSpread2 = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(exports, module) { + var defineProperty = require_defineProperty(); + function ownKeys(e2, r2) { + var t9 = Object.keys(e2); + if (Object.getOwnPropertySymbols) { + var o2 = Object.getOwnPropertySymbols(e2); + r2 && (o2 = o2.filter(function(r$1) { + return Object.getOwnPropertyDescriptor(e2, r$1).enumerable; + })), t9.push.apply(t9, o2); + } + return t9; + } + __name(ownKeys, "ownKeys"); + function _objectSpread2(e2) { + for (var r2 = 1; r2 < arguments.length; r2++) { + var t9 = null != arguments[r2] ? arguments[r2] : {}; + r2 % 2 ? ownKeys(Object(t9), true).forEach(function(r$1) { + defineProperty(e2, r$1, t9[r$1]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t9)) : ownKeys(Object(t9)).forEach(function(r$1) { + Object.defineProperty(e2, r$1, Object.getOwnPropertyDescriptor(t9, r$1)); + }); + } + return e2; + } + __name(_objectSpread2, "_objectSpread2"); + module.exports = _objectSpread2, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + import_objectSpread2 = __toESM2(require_objectSpread2(), 1); + __name(getErrorShape, "getErrorShape"); + } +}); + +// ../../node_modules/@trpc/server/dist/tracked-Bjtgv3wJ.mjs +function getCauseFromUnknown(cause) { + if (cause instanceof Error) + return cause; + const type = typeof cause; + if (type === "undefined" || type === "function" || cause === null) + return void 0; + if (type !== "object") + return new Error(String(cause)); + if (isObject(cause)) + return Object.assign(new UnknownCauseError(), cause); + return void 0; +} +function getTRPCErrorFromUnknown(cause) { + if (cause instanceof TRPCError) + return cause; + if (cause instanceof Error && cause.name === "TRPCError") + return cause; + const trpcError = new TRPCError({ + code: "INTERNAL_SERVER_ERROR", + cause + }); + if (cause instanceof Error && cause.stack) + trpcError.stack = cause.stack; + return trpcError; +} +function getDataTransformer(transformer) { + if ("input" in transformer) + return transformer; + return { + input: transformer, + output: transformer + }; +} +function transformTRPCResponseItem(config3, item) { + if ("error" in item) + return (0, import_objectSpread2$1.default)((0, import_objectSpread2$1.default)({}, item), {}, { error: config3.transformer.output.serialize(item.error) }); + if ("data" in item.result) + return (0, import_objectSpread2$1.default)((0, import_objectSpread2$1.default)({}, item), {}, { result: (0, import_objectSpread2$1.default)((0, import_objectSpread2$1.default)({}, item.result), {}, { data: config3.transformer.output.serialize(item.result.data) }) }); + return item; +} +function transformTRPCResponse(config3, itemOrItems) { + return Array.isArray(itemOrItems) ? itemOrItems.map((item) => transformTRPCResponseItem(config3, item)) : transformTRPCResponseItem(config3, itemOrItems); +} +function once2(fn) { + const uncalled = Symbol(); + let result = uncalled; + return () => { + if (result === uncalled) + result = fn(); + return result; + }; +} +function isLazy(input) { + return typeof input === "function" && lazyMarker in input; +} +function isRouter(value) { + return isObject(value) && isObject(value["_def"]) && "router" in value["_def"]; +} +function createRouterFactory(config3) { + function createRouterInner(input) { + const reservedWordsUsed = new Set(Object.keys(input).filter((v3) => reservedWords.includes(v3))); + if (reservedWordsUsed.size > 0) + throw new Error("Reserved words used in `router({})` call: " + Array.from(reservedWordsUsed).join(", ")); + const procedures = emptyObject(); + const lazy$1 = emptyObject(); + function createLazyLoader(opts) { + return { + ref: opts.ref, + load: once2(async () => { + const router$1 = await opts.ref(); + const lazyPath = [...opts.path, opts.key]; + const lazyKey = lazyPath.join("."); + opts.aggregate[opts.key] = step(router$1._def.record, lazyPath); + delete lazy$1[lazyKey]; + for (const [nestedKey, nestedItem] of Object.entries(router$1._def.lazy)) { + const nestedRouterKey = [...lazyPath, nestedKey].join("."); + lazy$1[nestedRouterKey] = createLazyLoader({ + ref: nestedItem.ref, + path: lazyPath, + key: nestedKey, + aggregate: opts.aggregate[opts.key] + }); + } + }) + }; + } + __name(createLazyLoader, "createLazyLoader"); + function step(from, path = []) { + const aggregate = emptyObject(); + for (const [key, item] of Object.entries(from !== null && from !== void 0 ? from : {})) { + if (isLazy(item)) { + lazy$1[[...path, key].join(".")] = createLazyLoader({ + path, + ref: item, + key, + aggregate + }); + continue; + } + if (isRouter(item)) { + aggregate[key] = step(item._def.record, [...path, key]); + continue; + } + if (!isProcedure(item)) { + aggregate[key] = step(item, [...path, key]); + continue; + } + const newPath = [...path, key].join("."); + if (procedures[newPath]) + throw new Error(`Duplicate key: ${newPath}`); + procedures[newPath] = item; + aggregate[key] = item; + } + return aggregate; + } + __name(step, "step"); + const record2 = step(input); + const _def = (0, import_objectSpread22.default)((0, import_objectSpread22.default)({ + _config: config3, + router: true, + procedures, + lazy: lazy$1 + }, emptyRouter), {}, { record: record2 }); + const router8 = (0, import_objectSpread22.default)((0, import_objectSpread22.default)({}, record2), {}, { + _def, + createCaller: createCallerFactory()({ _def }) + }); + return router8; + } + __name(createRouterInner, "createRouterInner"); + return createRouterInner; +} +function isProcedure(procedureOrRouter) { + return typeof procedureOrRouter === "function"; +} +async function getProcedureAtPath(router8, path) { + const { _def } = router8; + let procedure = _def.procedures[path]; + while (!procedure) { + const key = Object.keys(_def.lazy).find((key$1) => path.startsWith(key$1)); + if (!key) + return null; + const lazyRouter = _def.lazy[key]; + await lazyRouter.load(); + procedure = _def.procedures[path]; + } + return procedure; +} +function createCallerFactory() { + return /* @__PURE__ */ __name(function createCallerInner(router8) { + const { _def } = router8; + return /* @__PURE__ */ __name(function createCaller(ctxOrCallback, opts) { + return createRecursiveProxy(async (innerOpts) => { + const { path, args } = innerOpts; + const fullPath = path.join("."); + if (path.length === 1 && path[0] === "_def") + return _def; + const procedure = await getProcedureAtPath(router8, fullPath); + let ctx = void 0; + try { + if (!procedure) + throw new TRPCError({ + code: "NOT_FOUND", + message: `No procedure found on path "${path}"` + }); + ctx = isFunction(ctxOrCallback) ? await Promise.resolve(ctxOrCallback()) : ctxOrCallback; + return await procedure({ + path: fullPath, + getRawInput: async () => args[0], + ctx, + type: procedure._def.type, + signal: opts === null || opts === void 0 ? void 0 : opts.signal, + batchIndex: 0 + }); + } catch (cause) { + var _opts$onError, _procedure$_def$type; + opts === null || opts === void 0 || (_opts$onError = opts.onError) === null || _opts$onError === void 0 || _opts$onError.call(opts, { + ctx, + error: getTRPCErrorFromUnknown(cause), + input: args[0], + path: fullPath, + type: (_procedure$_def$type = procedure === null || procedure === void 0 ? void 0 : procedure._def.type) !== null && _procedure$_def$type !== void 0 ? _procedure$_def$type : "unknown" + }); + throw cause; + } + }); + }, "createCaller"); + }, "createCallerInner"); +} +function mergeRouters(...routerList) { + var _routerList$, _routerList$2; + const record2 = mergeWithoutOverrides({}, ...routerList.map((r2) => r2._def.record)); + const errorFormatter = routerList.reduce((currentErrorFormatter, nextRouter) => { + if (nextRouter._def._config.errorFormatter && nextRouter._def._config.errorFormatter !== defaultFormatter) { + if (currentErrorFormatter !== defaultFormatter && currentErrorFormatter !== nextRouter._def._config.errorFormatter) + throw new Error("You seem to have several error formatters"); + return nextRouter._def._config.errorFormatter; + } + return currentErrorFormatter; + }, defaultFormatter); + const transformer = routerList.reduce((prev, current) => { + if (current._def._config.transformer && current._def._config.transformer !== defaultTransformer) { + if (prev !== defaultTransformer && prev !== current._def._config.transformer) + throw new Error("You seem to have several transformers"); + return current._def._config.transformer; + } + return prev; + }, defaultTransformer); + const router8 = createRouterFactory({ + errorFormatter, + transformer, + isDev: routerList.every((r2) => r2._def._config.isDev), + allowOutsideOfServer: routerList.every((r2) => r2._def._config.allowOutsideOfServer), + isServer: routerList.every((r2) => r2._def._config.isServer), + $types: (_routerList$ = routerList[0]) === null || _routerList$ === void 0 ? void 0 : _routerList$._def._config.$types, + sse: (_routerList$2 = routerList[0]) === null || _routerList$2 === void 0 ? void 0 : _routerList$2._def._config.sse + })(record2); + return router8; +} +function isTrackedEnvelope(value) { + return Array.isArray(value) && value[2] === trackedSymbol; +} +var defaultFormatter, import_defineProperty, UnknownCauseError, TRPCError, import_objectSpread2$1, defaultTransformer, import_objectSpread22, lazyMarker, emptyRouter, reservedWords, trackedSymbol; +var init_tracked_Bjtgv3wJ = __esm({ + "../../node_modules/@trpc/server/dist/tracked-Bjtgv3wJ.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getErrorShape_vC8mUXJD(); + init_codes_DagpWZLc(); + defaultFormatter = /* @__PURE__ */ __name(({ shape }) => { + return shape; + }, "defaultFormatter"); + import_defineProperty = __toESM2(require_defineProperty(), 1); + UnknownCauseError = /* @__PURE__ */ __name(class extends Error { + }, "UnknownCauseError"); + __name(getCauseFromUnknown, "getCauseFromUnknown"); + __name(getTRPCErrorFromUnknown, "getTRPCErrorFromUnknown"); + TRPCError = /* @__PURE__ */ __name(class extends Error { + constructor(opts) { + var _ref, _opts$message, _this$cause; + const cause = getCauseFromUnknown(opts.cause); + const message2 = (_ref = (_opts$message = opts.message) !== null && _opts$message !== void 0 ? _opts$message : cause === null || cause === void 0 ? void 0 : cause.message) !== null && _ref !== void 0 ? _ref : opts.code; + super(message2, { cause }); + (0, import_defineProperty.default)(this, "cause", void 0); + (0, import_defineProperty.default)(this, "code", void 0); + this.code = opts.code; + this.name = "TRPCError"; + (_this$cause = this.cause) !== null && _this$cause !== void 0 || (this.cause = cause); + } + }, "TRPCError"); + import_objectSpread2$1 = __toESM2(require_objectSpread2(), 1); + __name(getDataTransformer, "getDataTransformer"); + defaultTransformer = { + input: { + serialize: (obj) => obj, + deserialize: (obj) => obj + }, + output: { + serialize: (obj) => obj, + deserialize: (obj) => obj + } + }; + __name(transformTRPCResponseItem, "transformTRPCResponseItem"); + __name(transformTRPCResponse, "transformTRPCResponse"); + import_objectSpread22 = __toESM2(require_objectSpread2(), 1); + lazyMarker = "lazyMarker"; + __name(once2, "once"); + __name(isLazy, "isLazy"); + __name(isRouter, "isRouter"); + emptyRouter = { + _ctx: null, + _errorShape: null, + _meta: null, + queries: {}, + mutations: {}, + subscriptions: {}, + errorFormatter: defaultFormatter, + transformer: defaultTransformer + }; + reservedWords = [ + "then", + "call", + "apply" + ]; + __name(createRouterFactory, "createRouterFactory"); + __name(isProcedure, "isProcedure"); + __name(getProcedureAtPath, "getProcedureAtPath"); + __name(createCallerFactory, "createCallerFactory"); + __name(mergeRouters, "mergeRouters"); + trackedSymbol = Symbol(); + __name(isTrackedEnvelope, "isTrackedEnvelope"); + } +}); + +// ../../node_modules/@trpc/server/dist/observable-UMO3vUa_.mjs +function isObservable(x2) { + return typeof x2 === "object" && x2 !== null && "subscribe" in x2; +} +function observableToReadableStream(observable$1, signal) { + let unsub = null; + const onAbort = /* @__PURE__ */ __name(() => { + unsub === null || unsub === void 0 || unsub.unsubscribe(); + unsub = null; + signal.removeEventListener("abort", onAbort); + }, "onAbort"); + return new ReadableStream({ + start(controller) { + unsub = observable$1.subscribe({ + next(data) { + controller.enqueue({ + ok: true, + value: data + }); + }, + error(error50) { + controller.enqueue({ + ok: false, + error: error50 + }); + controller.close(); + }, + complete() { + controller.close(); + } + }); + if (signal.aborted) + onAbort(); + else + signal.addEventListener("abort", onAbort, { once: true }); + }, + cancel() { + onAbort(); + } + }); +} +function observableToAsyncIterable(observable$1, signal) { + const stream = observableToReadableStream(observable$1, signal); + const reader = stream.getReader(); + const iterator2 = { + async next() { + const value = await reader.read(); + if (value.done) + return { + value: void 0, + done: true + }; + const { value: result } = value; + if (!result.ok) + throw result.error; + return { + value: result.value, + done: false + }; + }, + async return() { + await reader.cancel(); + return { + value: void 0, + done: true + }; + } + }; + return { [Symbol.asyncIterator]() { + return iterator2; + } }; +} +var init_observable_UMO3vUa = __esm({ + "../../node_modules/@trpc/server/dist/observable-UMO3vUa_.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(isObservable, "isObservable"); + __name(observableToReadableStream, "observableToReadableStream"); + __name(observableToAsyncIterable, "observableToAsyncIterable"); + } +}); + +// ../../node_modules/@trpc/server/dist/resolveResponse-CHqBlAgR.mjs +function parseConnectionParamsFromUnknown(parsed) { + try { + if (parsed === null) + return null; + if (!isObject(parsed)) + throw new Error("Expected object"); + const nonStringValues = Object.entries(parsed).filter(([_key2, value]) => typeof value !== "string"); + if (nonStringValues.length > 0) + throw new Error(`Expected connectionParams to be string values. Got ${nonStringValues.map(([key, value]) => `${key}: ${typeof value}`).join(", ")}`); + return parsed; + } catch (cause) { + throw new TRPCError({ + code: "PARSE_ERROR", + message: "Invalid connection params shape", + cause + }); + } +} +function parseConnectionParamsFromString(str) { + let parsed; + try { + parsed = JSON.parse(str); + } catch (cause) { + throw new TRPCError({ + code: "PARSE_ERROR", + message: "Not JSON-parsable query params", + cause + }); + } + return parseConnectionParamsFromUnknown(parsed); +} +function getAcceptHeader(headers) { + var _ref, _headers$get; + return (_ref = headers.get("trpc-accept")) !== null && _ref !== void 0 ? _ref : ((_headers$get = headers.get("accept")) === null || _headers$get === void 0 ? void 0 : _headers$get.split(",").some((t9) => t9.trim() === "application/jsonl")) ? "application/jsonl" : null; +} +function memo(fn) { + let promise2 = null; + const sym = Symbol.for("@trpc/server/http/memo"); + let value = sym; + return { + read: async () => { + var _promise2; + if (value !== sym) + return value; + (_promise2 = promise2) !== null && _promise2 !== void 0 || (promise2 = fn().catch((cause) => { + if (cause instanceof TRPCError) + throw cause; + throw new TRPCError({ + code: "BAD_REQUEST", + message: cause instanceof Error ? cause.message : "Invalid input", + cause + }); + })); + value = await promise2; + promise2 = null; + return value; + }, + result: () => { + return value !== sym ? value : void 0; + } + }; +} +function getContentTypeHandler(req) { + const handler = handlers.find((handler$1) => handler$1.isMatch(req)); + if (handler) + return handler; + if (!handler && req.method === "GET") + return jsonContentTypeHandler; + throw new TRPCError({ + code: "UNSUPPORTED_MEDIA_TYPE", + message: req.headers.has("content-type") ? `Unsupported content-type "${req.headers.get("content-type")}` : "Missing content-type header" + }); +} +async function getRequestInfo(opts) { + const handler = getContentTypeHandler(opts.req); + return await handler.parse(opts); +} +function isAbortError(error50) { + return isObject(error50) && error50["name"] === "AbortError"; +} +function throwAbortError(message2 = "AbortError") { + throw new DOMException(message2, "AbortError"); +} +function isObject$1(o2) { + return Object.prototype.toString.call(o2) === "[object Object]"; +} +function isPlainObject(o2) { + var ctor, prot; + if (isObject$1(o2) === false) + return false; + ctor = o2.constructor; + if (ctor === void 0) + return true; + prot = ctor.prototype; + if (isObject$1(prot) === false) + return false; + if (prot.hasOwnProperty("isPrototypeOf") === false) + return false; + return true; +} +function resolveSelfTuple(promise2) { + return Unpromise.proxy(promise2).then(() => [promise2]); +} +function withResolvers() { + let resolve; + let reject; + const promise2 = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + return { + promise: promise2, + resolve, + reject + }; +} +function listWithMember(arr, member2) { + return [...arr, member2]; +} +function listWithoutIndex(arr, index) { + return [...arr.slice(0, index), ...arr.slice(index + 1)]; +} +function listWithoutMember(arr, member2) { + const index = arr.indexOf(member2); + if (index !== -1) + return listWithoutIndex(arr, index); + return arr; +} +function makeResource(thing, dispose) { + const it = thing; + const existing = it[Symbol.dispose]; + it[Symbol.dispose] = () => { + dispose(); + existing === null || existing === void 0 || existing(); + }; + return it; +} +function makeAsyncResource(thing, dispose) { + const it = thing; + const existing = it[Symbol.asyncDispose]; + it[Symbol.asyncDispose] = async () => { + await dispose(); + await (existing === null || existing === void 0 ? void 0 : existing()); + }; + return it; +} +function timerResource(ms) { + let timer = null; + return makeResource({ start() { + if (timer) + throw new Error("Timer already started"); + const promise2 = new Promise((resolve) => { + timer = setTimeout(() => resolve(disposablePromiseTimerResult), ms); + }); + return promise2; + } }, () => { + if (timer) + clearTimeout(timer); + }); +} +function iteratorResource(iterable) { + const iterator2 = iterable[Symbol.asyncIterator](); + if (iterator2[Symbol.asyncDispose]) + return iterator2; + return makeAsyncResource(iterator2, async () => { + var _iterator$return; + await ((_iterator$return = iterator2.return) === null || _iterator$return === void 0 ? void 0 : _iterator$return.call(iterator2)); + }); +} +function takeWithGrace(_x2, _x22) { + return _takeWithGrace.apply(this, arguments); +} +function _takeWithGrace() { + _takeWithGrace = (0, import_wrapAsyncGenerator$5.default)(function* (iterable, opts) { + try { + var _usingCtx$1 = (0, import_usingCtx$4.default)(); + const iterator2 = _usingCtx$1.a(iteratorResource(iterable)); + let result; + const timer = _usingCtx$1.u(timerResource(opts.gracePeriodMs)); + let count4 = opts.count; + let timerPromise = new Promise(() => { + }); + while (true) { + result = yield (0, import_awaitAsyncGenerator$4.default)(Unpromise.race([iterator2.next(), timerPromise])); + if (result === disposablePromiseTimerResult) + throwAbortError(); + if (result.done) + return result.value; + yield result.value; + if (--count4 === 0) + timerPromise = timer.start(); + result = null; + } + } catch (_) { + _usingCtx$1.e = _; + } finally { + yield (0, import_awaitAsyncGenerator$4.default)(_usingCtx$1.d()); + } + }); + return _takeWithGrace.apply(this, arguments); +} +function createDeferred() { + let resolve; + let reject; + const promise2 = new Promise((res, rej) => { + resolve = res; + reject = rej; + }); + return { + promise: promise2, + resolve, + reject + }; +} +function createManagedIterator(iterable, onResult) { + const iterator2 = iterable[Symbol.asyncIterator](); + let state = "idle"; + function cleanup() { + state = "done"; + onResult = /* @__PURE__ */ __name(() => { + }, "onResult"); + } + __name(cleanup, "cleanup"); + function pull() { + if (state !== "idle") + return; + state = "pending"; + const next = iterator2.next(); + next.then((result) => { + if (result.done) { + state = "done"; + onResult({ + status: "return", + value: result.value + }); + cleanup(); + return; + } + state = "idle"; + onResult({ + status: "yield", + value: result.value + }); + }).catch((cause) => { + onResult({ + status: "error", + error: cause + }); + cleanup(); + }); + } + __name(pull, "pull"); + return { + pull, + destroy: async () => { + var _iterator$return; + cleanup(); + await ((_iterator$return = iterator2.return) === null || _iterator$return === void 0 ? void 0 : _iterator$return.call(iterator2)); + } + }; +} +function mergeAsyncIterables() { + let state = "idle"; + let flushSignal = createDeferred(); + const iterables = []; + const iterators = /* @__PURE__ */ new Set(); + const buffer = []; + function initIterable(iterable) { + if (state !== "pending") + return; + const iterator2 = createManagedIterator(iterable, (result) => { + if (state !== "pending") + return; + switch (result.status) { + case "yield": + buffer.push([iterator2, result]); + break; + case "return": + iterators.delete(iterator2); + break; + case "error": + buffer.push([iterator2, result]); + iterators.delete(iterator2); + break; + } + flushSignal.resolve(); + }); + iterators.add(iterator2); + iterator2.pull(); + } + __name(initIterable, "initIterable"); + return { + add(iterable) { + switch (state) { + case "idle": + iterables.push(iterable); + break; + case "pending": + initIterable(iterable); + break; + case "done": + break; + } + }, + [Symbol.asyncIterator]() { + return (0, import_wrapAsyncGenerator$4.default)(function* () { + try { + var _usingCtx$1 = (0, import_usingCtx$3.default)(); + if (state !== "idle") + throw new Error("Cannot iterate twice"); + state = "pending"; + const _finally = _usingCtx$1.a(makeAsyncResource({}, async () => { + state = "done"; + const errors = []; + await Promise.all(Array.from(iterators.values()).map(async (it) => { + try { + await it.destroy(); + } catch (cause) { + errors.push(cause); + } + })); + buffer.length = 0; + iterators.clear(); + flushSignal.resolve(); + if (errors.length > 0) + throw new AggregateError(errors); + })); + while (iterables.length > 0) + initIterable(iterables.shift()); + while (iterators.size > 0) { + yield (0, import_awaitAsyncGenerator$3.default)(flushSignal.promise); + while (buffer.length > 0) { + const [iterator2, result] = buffer.shift(); + switch (result.status) { + case "yield": + yield result.value; + iterator2.pull(); + break; + case "error": + throw result.error; + } + } + flushSignal = createDeferred(); + } + } catch (_) { + _usingCtx$1.e = _; + } finally { + yield (0, import_awaitAsyncGenerator$3.default)(_usingCtx$1.d()); + } + })(); + } + }; +} +function readableStreamFrom(iterable) { + const iterator2 = iterable[Symbol.asyncIterator](); + return new ReadableStream({ + async cancel() { + var _iterator$return; + await ((_iterator$return = iterator2.return) === null || _iterator$return === void 0 ? void 0 : _iterator$return.call(iterator2)); + }, + async pull(controller) { + const result = await iterator2.next(); + if (result.done) { + controller.close(); + return; + } + controller.enqueue(result.value); + } + }); +} +function withPing(_x2, _x22) { + return _withPing.apply(this, arguments); +} +function _withPing() { + _withPing = (0, import_wrapAsyncGenerator$3.default)(function* (iterable, pingIntervalMs) { + try { + var _usingCtx$1 = (0, import_usingCtx$2.default)(); + const iterator2 = _usingCtx$1.a(iteratorResource(iterable)); + let result; + let nextPromise = iterator2.next(); + while (true) + try { + var _usingCtx3 = (0, import_usingCtx$2.default)(); + const pingPromise = _usingCtx3.u(timerResource(pingIntervalMs)); + result = yield (0, import_awaitAsyncGenerator$2.default)(Unpromise.race([nextPromise, pingPromise.start()])); + if (result === disposablePromiseTimerResult) { + yield PING_SYM; + continue; + } + if (result.done) + return result.value; + nextPromise = iterator2.next(); + yield result.value; + result = null; + } catch (_) { + _usingCtx3.e = _; + } finally { + _usingCtx3.d(); + } + } catch (_) { + _usingCtx$1.e = _; + } finally { + yield (0, import_awaitAsyncGenerator$2.default)(_usingCtx$1.d()); + } + }); + return _withPing.apply(this, arguments); +} +function isPromise(value) { + return (isObject(value) || isFunction(value)) && typeof (value === null || value === void 0 ? void 0 : value["then"]) === "function" && typeof (value === null || value === void 0 ? void 0 : value["catch"]) === "function"; +} +function createBatchStreamProducer(_x3) { + return _createBatchStreamProducer.apply(this, arguments); +} +function _createBatchStreamProducer() { + _createBatchStreamProducer = (0, import_wrapAsyncGenerator$2.default)(function* (opts) { + const { data } = opts; + let counter = 0; + const placeholder = 0; + const mergedIterables = mergeAsyncIterables(); + function registerAsync(callback) { + const idx = counter++; + const iterable$1 = callback(idx); + mergedIterables.add(iterable$1); + return idx; + } + __name(registerAsync, "registerAsync"); + function encodePromise(promise2, path) { + return registerAsync(/* @__PURE__ */ function() { + var _ref = (0, import_wrapAsyncGenerator$2.default)(function* (idx) { + const error50 = checkMaxDepth(path); + if (error50) { + promise2.catch((cause) => { + var _opts$onError; + (_opts$onError = opts.onError) === null || _opts$onError === void 0 || _opts$onError.call(opts, { + error: cause, + path + }); + }); + promise2 = Promise.reject(error50); + } + try { + const next = yield (0, import_awaitAsyncGenerator$1.default)(promise2); + yield [ + idx, + PROMISE_STATUS_FULFILLED, + encode7(next, path) + ]; + } catch (cause) { + var _opts$onError2, _opts$formatError; + (_opts$onError2 = opts.onError) === null || _opts$onError2 === void 0 || _opts$onError2.call(opts, { + error: cause, + path + }); + yield [ + idx, + PROMISE_STATUS_REJECTED, + (_opts$formatError = opts.formatError) === null || _opts$formatError === void 0 ? void 0 : _opts$formatError.call(opts, { + error: cause, + path + }) + ]; + } + }); + return function(_x2) { + return _ref.apply(this, arguments); + }; + }()); + } + __name(encodePromise, "encodePromise"); + function encodeAsyncIterable(iterable$1, path) { + return registerAsync(/* @__PURE__ */ function() { + var _ref2 = (0, import_wrapAsyncGenerator$2.default)(function* (idx) { + try { + var _usingCtx$1 = (0, import_usingCtx$1.default)(); + const error50 = checkMaxDepth(path); + if (error50) + throw error50; + const iterator2 = _usingCtx$1.a(iteratorResource(iterable$1)); + try { + while (true) { + const next = yield (0, import_awaitAsyncGenerator$1.default)(iterator2.next()); + if (next.done) { + yield [ + idx, + ASYNC_ITERABLE_STATUS_RETURN, + encode7(next.value, path) + ]; + break; + } + yield [ + idx, + ASYNC_ITERABLE_STATUS_YIELD, + encode7(next.value, path) + ]; + } + } catch (cause) { + var _opts$onError3, _opts$formatError2; + (_opts$onError3 = opts.onError) === null || _opts$onError3 === void 0 || _opts$onError3.call(opts, { + error: cause, + path + }); + yield [ + idx, + ASYNC_ITERABLE_STATUS_ERROR, + (_opts$formatError2 = opts.formatError) === null || _opts$formatError2 === void 0 ? void 0 : _opts$formatError2.call(opts, { + error: cause, + path + }) + ]; + } + } catch (_) { + _usingCtx$1.e = _; + } finally { + yield (0, import_awaitAsyncGenerator$1.default)(_usingCtx$1.d()); + } + }); + return function(_x2) { + return _ref2.apply(this, arguments); + }; + }()); + } + __name(encodeAsyncIterable, "encodeAsyncIterable"); + function checkMaxDepth(path) { + if (opts.maxDepth && path.length > opts.maxDepth) + return new MaxDepthError(path); + return null; + } + __name(checkMaxDepth, "checkMaxDepth"); + function encodeAsync3(value, path) { + if (isPromise(value)) + return [CHUNK_VALUE_TYPE_PROMISE, encodePromise(value, path)]; + if (isAsyncIterable(value)) { + if (opts.maxDepth && path.length >= opts.maxDepth) + throw new Error("Max depth reached"); + return [CHUNK_VALUE_TYPE_ASYNC_ITERABLE, encodeAsyncIterable(value, path)]; + } + return null; + } + __name(encodeAsync3, "encodeAsync"); + function encode7(value, path) { + if (value === void 0) + return [[]]; + const reg = encodeAsync3(value, path); + if (reg) + return [[placeholder], [null, ...reg]]; + if (!isPlainObject(value)) + return [[value]]; + const newObj = emptyObject(); + const asyncValues = []; + for (const [key, item] of Object.entries(value)) { + const transformed = encodeAsync3(item, [...path, key]); + if (!transformed) { + newObj[key] = item; + continue; + } + newObj[key] = placeholder; + asyncValues.push([key, ...transformed]); + } + return [[newObj], ...asyncValues]; + } + __name(encode7, "encode"); + const newHead = emptyObject(); + for (const [key, item] of Object.entries(data)) + newHead[key] = encode7(item, [key]); + yield newHead; + let iterable = mergedIterables; + if (opts.pingMs) + iterable = withPing(mergedIterables, opts.pingMs); + var _iteratorAbruptCompletion = false; + var _didIteratorError = false; + var _iteratorError; + try { + for (var _iterator = (0, import_asyncIterator$1.default)(iterable), _step; _iteratorAbruptCompletion = !(_step = yield (0, import_awaitAsyncGenerator$1.default)(_iterator.next())).done; _iteratorAbruptCompletion = false) { + const value = _step.value; + yield value; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (_iteratorAbruptCompletion && _iterator.return != null) + yield (0, import_awaitAsyncGenerator$1.default)(_iterator.return()); + } finally { + if (_didIteratorError) + throw _iteratorError; + } + } + }); + return _createBatchStreamProducer.apply(this, arguments); +} +function jsonlStreamProducer(opts) { + let stream = readableStreamFrom(createBatchStreamProducer(opts)); + const { serialize } = opts; + if (serialize) + stream = stream.pipeThrough(new TransformStream({ transform(chunk, controller) { + if (chunk === PING_SYM) + controller.enqueue(PING_SYM); + else + controller.enqueue(serialize(chunk)); + } })); + return stream.pipeThrough(new TransformStream({ transform(chunk, controller) { + if (chunk === PING_SYM) + controller.enqueue(" "); + else + controller.enqueue(JSON.stringify(chunk) + "\n"); + } })).pipeThrough(new TextEncoderStream()); +} +function sseStreamProducer(opts) { + var _opts$ping$enabled, _opts$ping, _opts$ping$intervalMs, _opts$ping2, _opts$client; + const { serialize = identity } = opts; + const ping = { + enabled: (_opts$ping$enabled = (_opts$ping = opts.ping) === null || _opts$ping === void 0 ? void 0 : _opts$ping.enabled) !== null && _opts$ping$enabled !== void 0 ? _opts$ping$enabled : false, + intervalMs: (_opts$ping$intervalMs = (_opts$ping2 = opts.ping) === null || _opts$ping2 === void 0 ? void 0 : _opts$ping2.intervalMs) !== null && _opts$ping$intervalMs !== void 0 ? _opts$ping$intervalMs : 1e3 + }; + const client = (_opts$client = opts.client) !== null && _opts$client !== void 0 ? _opts$client : {}; + if (ping.enabled && client.reconnectAfterInactivityMs && ping.intervalMs > client.reconnectAfterInactivityMs) + throw new Error(`Ping interval must be less than client reconnect interval to prevent unnecessary reconnection - ping.intervalMs: ${ping.intervalMs} client.reconnectAfterInactivityMs: ${client.reconnectAfterInactivityMs}`); + function generator() { + return _generator.apply(this, arguments); + } + __name(generator, "generator"); + function _generator() { + _generator = (0, import_wrapAsyncGenerator$1.default)(function* () { + yield { + event: CONNECTED_EVENT, + data: JSON.stringify(client) + }; + let iterable = opts.data; + if (opts.emitAndEndImmediately) + iterable = takeWithGrace(iterable, { + count: 1, + gracePeriodMs: 1 + }); + if (ping.enabled && ping.intervalMs !== Infinity && ping.intervalMs > 0) + iterable = withPing(iterable, ping.intervalMs); + let value; + let chunk; + var _iteratorAbruptCompletion = false; + var _didIteratorError = false; + var _iteratorError; + try { + for (var _iterator = (0, import_asyncIterator.default)(iterable), _step; _iteratorAbruptCompletion = !(_step = yield (0, import_awaitAsyncGenerator.default)(_iterator.next())).done; _iteratorAbruptCompletion = false) { + value = _step.value; + { + if (value === PING_SYM) { + yield { + event: PING_EVENT, + data: "" + }; + continue; + } + chunk = isTrackedEnvelope(value) ? { + id: value[0], + data: value[1] + } : { data: value }; + chunk.data = JSON.stringify(serialize(chunk.data)); + yield chunk; + value = null; + chunk = null; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (_iteratorAbruptCompletion && _iterator.return != null) + yield (0, import_awaitAsyncGenerator.default)(_iterator.return()); + } finally { + if (_didIteratorError) + throw _iteratorError; + } + } + }); + return _generator.apply(this, arguments); + } + __name(_generator, "_generator"); + function generatorWithErrorHandling() { + return _generatorWithErrorHandling.apply(this, arguments); + } + __name(generatorWithErrorHandling, "generatorWithErrorHandling"); + function _generatorWithErrorHandling() { + _generatorWithErrorHandling = (0, import_wrapAsyncGenerator$1.default)(function* () { + try { + yield* (0, import_asyncGeneratorDelegate.default)((0, import_asyncIterator.default)(generator())); + yield { + event: RETURN_EVENT, + data: "" + }; + } catch (cause) { + var _opts$formatError, _opts$formatError2; + if (isAbortError(cause)) + return; + const error50 = getTRPCErrorFromUnknown(cause); + const data = (_opts$formatError = (_opts$formatError2 = opts.formatError) === null || _opts$formatError2 === void 0 ? void 0 : _opts$formatError2.call(opts, { error: error50 })) !== null && _opts$formatError !== void 0 ? _opts$formatError : null; + yield { + event: SERIALIZED_ERROR_EVENT, + data: JSON.stringify(serialize(data)) + }; + } + }); + return _generatorWithErrorHandling.apply(this, arguments); + } + __name(_generatorWithErrorHandling, "_generatorWithErrorHandling"); + const stream = readableStreamFrom(generatorWithErrorHandling()); + return stream.pipeThrough(new TransformStream({ transform(chunk, controller) { + if ("event" in chunk) + controller.enqueue(`event: ${chunk.event} +`); + if ("data" in chunk) + controller.enqueue(`data: ${chunk.data} +`); + if ("id" in chunk) + controller.enqueue(`id: ${chunk.id} +`); + if ("comment" in chunk) + controller.enqueue(`: ${chunk.comment} +`); + controller.enqueue("\n\n"); + } })).pipeThrough(new TextEncoderStream()); +} +function errorToAsyncIterable(err) { + return run((0, import_wrapAsyncGenerator.default)(function* () { + throw err; + })); +} +function combinedAbortController(signal) { + const controller = new AbortController(); + const combinedSignal = abortSignalsAnyPonyfill([signal, controller.signal]); + return { + signal: combinedSignal, + controller + }; +} +function initResponse(initOpts) { + var _responseMeta, _info$calls$find$proc, _info$calls$find; + const { ctx, info: info3, responseMeta, untransformedJSON, errors = [], headers } = initOpts; + let status = untransformedJSON ? getHTTPStatusCode(untransformedJSON) : 200; + const eagerGeneration = !untransformedJSON; + const data = eagerGeneration ? [] : Array.isArray(untransformedJSON) ? untransformedJSON : [untransformedJSON]; + const meta3 = (_responseMeta = responseMeta === null || responseMeta === void 0 ? void 0 : responseMeta({ + ctx, + info: info3, + paths: info3 === null || info3 === void 0 ? void 0 : info3.calls.map((call) => call.path), + data, + errors, + eagerGeneration, + type: (_info$calls$find$proc = info3 === null || info3 === void 0 || (_info$calls$find = info3.calls.find((call) => { + var _call$procedure; + return (_call$procedure = call.procedure) === null || _call$procedure === void 0 ? void 0 : _call$procedure._def.type; + })) === null || _info$calls$find === void 0 || (_info$calls$find = _info$calls$find.procedure) === null || _info$calls$find === void 0 ? void 0 : _info$calls$find._def.type) !== null && _info$calls$find$proc !== void 0 ? _info$calls$find$proc : "unknown" + })) !== null && _responseMeta !== void 0 ? _responseMeta : {}; + if (meta3.headers) { + if (meta3.headers instanceof Headers) + for (const [key, value] of meta3.headers.entries()) + headers.append(key, value); + else + for (const [key, value] of Object.entries(meta3.headers)) + if (Array.isArray(value)) + for (const v3 of value) + headers.append(key, v3); + else if (typeof value === "string") + headers.set(key, value); + } + if (meta3.status) + status = meta3.status; + return { status }; +} +function caughtErrorToData(cause, errorOpts) { + const { router: router8, req, onError } = errorOpts.opts; + const error50 = getTRPCErrorFromUnknown(cause); + onError === null || onError === void 0 || onError({ + error: error50, + path: errorOpts.path, + input: errorOpts.input, + ctx: errorOpts.ctx, + type: errorOpts.type, + req + }); + const untransformedJSON = { error: getErrorShape({ + config: router8._def._config, + error: error50, + type: errorOpts.type, + path: errorOpts.path, + input: errorOpts.input, + ctx: errorOpts.ctx + }) }; + const transformedJSON = transformTRPCResponse(router8._def._config, untransformedJSON); + const body = JSON.stringify(transformedJSON); + return { + error: error50, + untransformedJSON, + body + }; +} +function isDataStream(v3) { + if (!isObject(v3)) + return false; + if (isAsyncIterable(v3)) + return true; + return Object.values(v3).some(isPromise) || Object.values(v3).some(isAsyncIterable); +} +async function resolveResponse(opts) { + var _ref, _opts$allowBatching, _opts$batching, _opts$allowMethodOver, _config$sse$enabled, _config$sse; + const { router: router8, req } = opts; + const headers = new Headers([["vary", "trpc-accept, accept"]]); + const config3 = router8._def._config; + const url2 = new URL(req.url); + if (req.method === "HEAD") + return new Response(null, { status: 204 }); + const allowBatching = (_ref = (_opts$allowBatching = opts.allowBatching) !== null && _opts$allowBatching !== void 0 ? _opts$allowBatching : (_opts$batching = opts.batching) === null || _opts$batching === void 0 ? void 0 : _opts$batching.enabled) !== null && _ref !== void 0 ? _ref : true; + const allowMethodOverride = ((_opts$allowMethodOver = opts.allowMethodOverride) !== null && _opts$allowMethodOver !== void 0 ? _opts$allowMethodOver : false) && req.method === "POST"; + const infoTuple = await run(async () => { + try { + return [void 0, await getRequestInfo({ + req, + path: decodeURIComponent(opts.path), + router: router8, + searchParams: url2.searchParams, + headers: opts.req.headers, + url: url2 + })]; + } catch (cause) { + return [getTRPCErrorFromUnknown(cause), void 0]; + } + }); + const ctxManager = run(() => { + let result = void 0; + return { + valueOrUndefined: () => { + if (!result) + return void 0; + return result[1]; + }, + value: () => { + const [err, ctx] = result; + if (err) + throw err; + return ctx; + }, + create: async (info3) => { + if (result) + throw new Error("This should only be called once - report a bug in tRPC"); + try { + const ctx = await opts.createContext({ info: info3 }); + result = [void 0, ctx]; + } catch (cause) { + result = [getTRPCErrorFromUnknown(cause), void 0]; + } + } + }; + }); + const methodMapper = allowMethodOverride ? TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE : TYPE_ACCEPTED_METHOD_MAP; + const isStreamCall = getAcceptHeader(req.headers) === "application/jsonl"; + const experimentalSSE = (_config$sse$enabled = (_config$sse = config3.sse) === null || _config$sse === void 0 ? void 0 : _config$sse.enabled) !== null && _config$sse$enabled !== void 0 ? _config$sse$enabled : true; + try { + const [infoError, info3] = infoTuple; + if (infoError) + throw infoError; + if (info3.isBatchCall && !allowBatching) + throw new TRPCError({ + code: "BAD_REQUEST", + message: `Batching is not enabled on the server` + }); + if (isStreamCall && !info3.isBatchCall) + throw new TRPCError({ + message: `Streaming requests must be batched (you can do a batch of 1)`, + code: "BAD_REQUEST" + }); + await ctxManager.create(info3); + const rpcCalls = info3.calls.map(async (call) => { + const proc = call.procedure; + const combinedAbort = combinedAbortController(opts.req.signal); + try { + if (opts.error) + throw opts.error; + if (!proc) + throw new TRPCError({ + code: "NOT_FOUND", + message: `No procedure found on path "${call.path}"` + }); + if (!methodMapper[proc._def.type].includes(req.method)) + throw new TRPCError({ + code: "METHOD_NOT_SUPPORTED", + message: `Unsupported ${req.method}-request to ${proc._def.type} procedure at path "${call.path}"` + }); + if (proc._def.type === "subscription") { + var _config$sse2; + if (info3.isBatchCall) + throw new TRPCError({ + code: "BAD_REQUEST", + message: `Cannot batch subscription calls` + }); + if ((_config$sse2 = config3.sse) === null || _config$sse2 === void 0 ? void 0 : _config$sse2.maxDurationMs) { + let cleanup = function() { + clearTimeout(timer); + combinedAbort.signal.removeEventListener("abort", cleanup); + combinedAbort.controller.abort(); + }; + __name(cleanup, "cleanup"); + const timer = setTimeout(cleanup, config3.sse.maxDurationMs); + combinedAbort.signal.addEventListener("abort", cleanup); + } + } + const data = await proc({ + path: call.path, + getRawInput: call.getRawInput, + ctx: ctxManager.value(), + type: proc._def.type, + signal: combinedAbort.signal, + batchIndex: call.batchIndex + }); + return [void 0, { + data, + signal: proc._def.type === "subscription" ? combinedAbort.signal : void 0 + }]; + } catch (cause) { + var _opts$onError, _call$procedure$_def$, _call$procedure2; + const error50 = getTRPCErrorFromUnknown(cause); + const input = call.result(); + (_opts$onError = opts.onError) === null || _opts$onError === void 0 || _opts$onError.call(opts, { + error: error50, + path: call.path, + input, + ctx: ctxManager.valueOrUndefined(), + type: (_call$procedure$_def$ = (_call$procedure2 = call.procedure) === null || _call$procedure2 === void 0 ? void 0 : _call$procedure2._def.type) !== null && _call$procedure$_def$ !== void 0 ? _call$procedure$_def$ : "unknown", + req: opts.req + }); + return [error50, void 0]; + } + }); + if (!info3.isBatchCall) { + const [call] = info3.calls; + const [error50, result] = await rpcCalls[0]; + switch (info3.type) { + case "unknown": + case "mutation": + case "query": { + headers.set("content-type", "application/json"); + if (isDataStream(result === null || result === void 0 ? void 0 : result.data)) + throw new TRPCError({ + code: "UNSUPPORTED_MEDIA_TYPE", + message: "Cannot use stream-like response in non-streaming request - use httpBatchStreamLink" + }); + const res = error50 ? { error: getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error50, + input: call.result(), + path: call.path, + type: info3.type + }) } : { result: { data: result.data } }; + const headResponse$1 = initResponse({ + ctx: ctxManager.valueOrUndefined(), + info: info3, + responseMeta: opts.responseMeta, + errors: error50 ? [error50] : [], + headers, + untransformedJSON: [res] + }); + return new Response(JSON.stringify(transformTRPCResponse(config3, res)), { + status: headResponse$1.status, + headers + }); + } + case "subscription": { + const iterable = run(() => { + if (error50) + return errorToAsyncIterable(error50); + if (!experimentalSSE) + return errorToAsyncIterable(new TRPCError({ + code: "METHOD_NOT_SUPPORTED", + message: 'Missing experimental flag "sseSubscriptions"' + })); + if (!isObservable(result.data) && !isAsyncIterable(result.data)) + return errorToAsyncIterable(new TRPCError({ + message: `Subscription ${call.path} did not return an observable or a AsyncGenerator`, + code: "INTERNAL_SERVER_ERROR" + })); + const dataAsIterable = isObservable(result.data) ? observableToAsyncIterable(result.data, opts.req.signal) : result.data; + return dataAsIterable; + }); + const stream = sseStreamProducer((0, import_objectSpread23.default)((0, import_objectSpread23.default)({}, config3.sse), {}, { + data: iterable, + serialize: (v3) => config3.transformer.output.serialize(v3), + formatError(errorOpts) { + var _call$procedure$_def$2, _call$procedure3, _opts$onError2; + const error$1 = getTRPCErrorFromUnknown(errorOpts.error); + const input = call === null || call === void 0 ? void 0 : call.result(); + const path = call === null || call === void 0 ? void 0 : call.path; + const type = (_call$procedure$_def$2 = call === null || call === void 0 || (_call$procedure3 = call.procedure) === null || _call$procedure3 === void 0 ? void 0 : _call$procedure3._def.type) !== null && _call$procedure$_def$2 !== void 0 ? _call$procedure$_def$2 : "unknown"; + (_opts$onError2 = opts.onError) === null || _opts$onError2 === void 0 || _opts$onError2.call(opts, { + error: error$1, + path, + input, + ctx: ctxManager.valueOrUndefined(), + req: opts.req, + type + }); + const shape = getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error$1, + input, + path, + type + }); + return shape; + } + })); + for (const [key, value] of Object.entries(sseHeaders)) + headers.set(key, value); + const headResponse$1 = initResponse({ + ctx: ctxManager.valueOrUndefined(), + info: info3, + responseMeta: opts.responseMeta, + errors: [], + headers, + untransformedJSON: null + }); + const abortSignal = result === null || result === void 0 ? void 0 : result.signal; + let responseBody = stream; + if (abortSignal) { + const reader = stream.getReader(); + const onAbort = /* @__PURE__ */ __name(() => void reader.cancel(), "onAbort"); + if (abortSignal.aborted) + onAbort(); + else + abortSignal.addEventListener("abort", onAbort, { once: true }); + responseBody = new ReadableStream({ + async pull(controller) { + const chunk = await reader.read(); + if (chunk.done) { + abortSignal.removeEventListener("abort", onAbort); + controller.close(); + } else + controller.enqueue(chunk.value); + }, + cancel() { + abortSignal.removeEventListener("abort", onAbort); + return reader.cancel(); + } + }); + } + return new Response(responseBody, { + headers, + status: headResponse$1.status + }); + } + } + } + if (info3.accept === "application/jsonl") { + headers.set("content-type", "application/json"); + headers.set("transfer-encoding", "chunked"); + const headResponse$1 = initResponse({ + ctx: ctxManager.valueOrUndefined(), + info: info3, + responseMeta: opts.responseMeta, + errors: [], + headers, + untransformedJSON: null + }); + const stream = jsonlStreamProducer((0, import_objectSpread23.default)((0, import_objectSpread23.default)({}, config3.jsonl), {}, { + maxDepth: Infinity, + data: rpcCalls.map(async (res) => { + const [error50, result] = await res; + const call = info3.calls[0]; + if (error50) { + var _procedure$_def$type, _procedure; + return { error: getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error50, + input: call.result(), + path: call.path, + type: (_procedure$_def$type = (_procedure = call.procedure) === null || _procedure === void 0 ? void 0 : _procedure._def.type) !== null && _procedure$_def$type !== void 0 ? _procedure$_def$type : "unknown" + }) }; + } + const iterable = isObservable(result.data) ? observableToAsyncIterable(result.data, opts.req.signal) : Promise.resolve(result.data); + return { result: Promise.resolve({ data: iterable }) }; + }), + serialize: (data) => config3.transformer.output.serialize(data), + onError: (cause) => { + var _opts$onError3, _info$type; + (_opts$onError3 = opts.onError) === null || _opts$onError3 === void 0 || _opts$onError3.call(opts, { + error: getTRPCErrorFromUnknown(cause), + path: void 0, + input: void 0, + ctx: ctxManager.valueOrUndefined(), + req: opts.req, + type: (_info$type = info3 === null || info3 === void 0 ? void 0 : info3.type) !== null && _info$type !== void 0 ? _info$type : "unknown" + }); + }, + formatError(errorOpts) { + var _call$procedure$_def$3, _call$procedure4; + const call = info3 === null || info3 === void 0 ? void 0 : info3.calls[errorOpts.path[0]]; + const error50 = getTRPCErrorFromUnknown(errorOpts.error); + const input = call === null || call === void 0 ? void 0 : call.result(); + const path = call === null || call === void 0 ? void 0 : call.path; + const type = (_call$procedure$_def$3 = call === null || call === void 0 || (_call$procedure4 = call.procedure) === null || _call$procedure4 === void 0 ? void 0 : _call$procedure4._def.type) !== null && _call$procedure$_def$3 !== void 0 ? _call$procedure$_def$3 : "unknown"; + const shape = getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error50, + input, + path, + type + }); + return shape; + } + })); + return new Response(stream, { + headers, + status: headResponse$1.status + }); + } + headers.set("content-type", "application/json"); + const results = (await Promise.all(rpcCalls)).map((res) => { + const [error50, result] = res; + if (error50) + return res; + if (isDataStream(result.data)) + return [new TRPCError({ + code: "UNSUPPORTED_MEDIA_TYPE", + message: "Cannot use stream-like response in non-streaming request - use httpBatchStreamLink" + }), void 0]; + return res; + }); + const resultAsRPCResponse = results.map(([error50, result], index) => { + const call = info3.calls[index]; + if (error50) { + var _call$procedure$_def$4, _call$procedure5; + return { error: getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error50, + input: call.result(), + path: call.path, + type: (_call$procedure$_def$4 = (_call$procedure5 = call.procedure) === null || _call$procedure5 === void 0 ? void 0 : _call$procedure5._def.type) !== null && _call$procedure$_def$4 !== void 0 ? _call$procedure$_def$4 : "unknown" + }) }; + } + return { result: { data: result.data } }; + }); + const errors = results.map(([error50]) => error50).filter(Boolean); + const headResponse = initResponse({ + ctx: ctxManager.valueOrUndefined(), + info: info3, + responseMeta: opts.responseMeta, + untransformedJSON: resultAsRPCResponse, + errors, + headers + }); + return new Response(JSON.stringify(transformTRPCResponse(config3, resultAsRPCResponse)), { + status: headResponse.status, + headers + }); + } catch (cause) { + var _info$type2; + const [_infoError, info3] = infoTuple; + const ctx = ctxManager.valueOrUndefined(); + const { error: error50, untransformedJSON, body } = caughtErrorToData(cause, { + opts, + ctx: ctxManager.valueOrUndefined(), + type: (_info$type2 = info3 === null || info3 === void 0 ? void 0 : info3.type) !== null && _info$type2 !== void 0 ? _info$type2 : "unknown" + }); + const headResponse = initResponse({ + ctx, + info: info3, + responseMeta: opts.responseMeta, + untransformedJSON, + errors: [error50], + headers + }); + return new Response(body, { + status: headResponse.status, + headers + }); + } +} +var import_objectSpread2$12, jsonContentTypeHandler, formDataContentTypeHandler, octetStreamContentTypeHandler, handlers, import_defineProperty2, _Symbol$toStringTag, subscribableCache, NOOP, Unpromise, _Symbol, _Symbol$dispose, _Symbol2, _Symbol2$asyncDispose, disposablePromiseTimerResult, require_usingCtx, require_OverloadYield, require_awaitAsyncGenerator, require_wrapAsyncGenerator, import_usingCtx$4, import_awaitAsyncGenerator$4, import_wrapAsyncGenerator$5, import_usingCtx$3, import_awaitAsyncGenerator$3, import_wrapAsyncGenerator$4, import_usingCtx$2, import_awaitAsyncGenerator$2, import_wrapAsyncGenerator$3, PING_SYM, require_asyncIterator, import_awaitAsyncGenerator$1, import_wrapAsyncGenerator$2, import_usingCtx$1, import_asyncIterator$1, CHUNK_VALUE_TYPE_PROMISE, CHUNK_VALUE_TYPE_ASYNC_ITERABLE, PROMISE_STATUS_FULFILLED, PROMISE_STATUS_REJECTED, ASYNC_ITERABLE_STATUS_RETURN, ASYNC_ITERABLE_STATUS_YIELD, ASYNC_ITERABLE_STATUS_ERROR, MaxDepthError, require_asyncGeneratorDelegate, import_asyncIterator, import_awaitAsyncGenerator, import_wrapAsyncGenerator$1, import_asyncGeneratorDelegate, import_usingCtx, PING_EVENT, SERIALIZED_ERROR_EVENT, CONNECTED_EVENT, RETURN_EVENT, sseHeaders, import_wrapAsyncGenerator, import_objectSpread23, TYPE_ACCEPTED_METHOD_MAP, TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE; +var init_resolveResponse_CHqBlAgR = __esm({ + "../../node_modules/@trpc/server/dist/resolveResponse-CHqBlAgR.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getErrorShape_vC8mUXJD(); + init_codes_DagpWZLc(); + init_tracked_Bjtgv3wJ(); + init_observable_UMO3vUa(); + __name(parseConnectionParamsFromUnknown, "parseConnectionParamsFromUnknown"); + __name(parseConnectionParamsFromString, "parseConnectionParamsFromString"); + import_objectSpread2$12 = __toESM2(require_objectSpread2(), 1); + __name(getAcceptHeader, "getAcceptHeader"); + __name(memo, "memo"); + jsonContentTypeHandler = { + isMatch(req) { + var _req$headers$get; + return !!((_req$headers$get = req.headers.get("content-type")) === null || _req$headers$get === void 0 ? void 0 : _req$headers$get.startsWith("application/json")); + }, + async parse(opts) { + var _types$values$next$va; + const { req } = opts; + const isBatchCall = opts.searchParams.get("batch") === "1"; + const paths = isBatchCall ? opts.path.split(",") : [opts.path]; + const getInputs = memo(async () => { + let inputs = void 0; + if (req.method === "GET") { + const queryInput = opts.searchParams.get("input"); + if (queryInput) + inputs = JSON.parse(queryInput); + } else + inputs = await req.json(); + if (inputs === void 0) + return emptyObject(); + if (!isBatchCall) { + const result = emptyObject(); + result[0] = opts.router._def._config.transformer.input.deserialize(inputs); + return result; + } + if (!isObject(inputs)) + throw new TRPCError({ + code: "BAD_REQUEST", + message: '"input" needs to be an object when doing a batch call' + }); + const acc = emptyObject(); + for (const index of paths.keys()) { + const input = inputs[index]; + if (input !== void 0) + acc[index] = opts.router._def._config.transformer.input.deserialize(input); + } + return acc; + }); + const calls = await Promise.all(paths.map(async (path, index) => { + const procedure = await getProcedureAtPath(opts.router, path); + return { + batchIndex: index, + path, + procedure, + getRawInput: async () => { + const inputs = await getInputs.read(); + let input = inputs[index]; + if ((procedure === null || procedure === void 0 ? void 0 : procedure._def.type) === "subscription") { + var _ref2, _opts$headers$get; + const lastEventId = (_ref2 = (_opts$headers$get = opts.headers.get("last-event-id")) !== null && _opts$headers$get !== void 0 ? _opts$headers$get : opts.searchParams.get("lastEventId")) !== null && _ref2 !== void 0 ? _ref2 : opts.searchParams.get("Last-Event-Id"); + if (lastEventId) + if (isObject(input)) + input = (0, import_objectSpread2$12.default)((0, import_objectSpread2$12.default)({}, input), {}, { lastEventId }); + else { + var _input; + (_input = input) !== null && _input !== void 0 || (input = { lastEventId }); + } + } + return input; + }, + result: () => { + var _getInputs$result; + return (_getInputs$result = getInputs.result()) === null || _getInputs$result === void 0 ? void 0 : _getInputs$result[index]; + } + }; + })); + const types = new Set(calls.map((call) => { + var _call$procedure; + return (_call$procedure = call.procedure) === null || _call$procedure === void 0 ? void 0 : _call$procedure._def.type; + }).filter(Boolean)); + if (types.size > 1) + throw new TRPCError({ + code: "BAD_REQUEST", + message: `Cannot mix procedure types in call: ${Array.from(types).join(", ")}` + }); + const type = (_types$values$next$va = types.values().next().value) !== null && _types$values$next$va !== void 0 ? _types$values$next$va : "unknown"; + const connectionParamsStr = opts.searchParams.get("connectionParams"); + const info3 = { + isBatchCall, + accept: getAcceptHeader(req.headers), + calls, + type, + connectionParams: connectionParamsStr === null ? null : parseConnectionParamsFromString(connectionParamsStr), + signal: req.signal, + url: opts.url + }; + return info3; + } + }; + formDataContentTypeHandler = { + isMatch(req) { + var _req$headers$get2; + return !!((_req$headers$get2 = req.headers.get("content-type")) === null || _req$headers$get2 === void 0 ? void 0 : _req$headers$get2.startsWith("multipart/form-data")); + }, + async parse(opts) { + const { req } = opts; + if (req.method !== "POST") + throw new TRPCError({ + code: "METHOD_NOT_SUPPORTED", + message: "Only POST requests are supported for multipart/form-data requests" + }); + const getInputs = memo(async () => { + const fd = await req.formData(); + return fd; + }); + const procedure = await getProcedureAtPath(opts.router, opts.path); + return { + accept: null, + calls: [{ + batchIndex: 0, + path: opts.path, + getRawInput: getInputs.read, + result: getInputs.result, + procedure + }], + isBatchCall: false, + type: "mutation", + connectionParams: null, + signal: req.signal, + url: opts.url + }; + } + }; + octetStreamContentTypeHandler = { + isMatch(req) { + var _req$headers$get3; + return !!((_req$headers$get3 = req.headers.get("content-type")) === null || _req$headers$get3 === void 0 ? void 0 : _req$headers$get3.startsWith("application/octet-stream")); + }, + async parse(opts) { + const { req } = opts; + if (req.method !== "POST") + throw new TRPCError({ + code: "METHOD_NOT_SUPPORTED", + message: "Only POST requests are supported for application/octet-stream requests" + }); + const getInputs = memo(async () => { + return req.body; + }); + return { + calls: [{ + batchIndex: 0, + path: opts.path, + getRawInput: getInputs.read, + result: getInputs.result, + procedure: await getProcedureAtPath(opts.router, opts.path) + }], + isBatchCall: false, + accept: null, + type: "mutation", + connectionParams: null, + signal: req.signal, + url: opts.url + }; + } + }; + handlers = [ + jsonContentTypeHandler, + formDataContentTypeHandler, + octetStreamContentTypeHandler + ]; + __name(getContentTypeHandler, "getContentTypeHandler"); + __name(getRequestInfo, "getRequestInfo"); + __name(isAbortError, "isAbortError"); + __name(throwAbortError, "throwAbortError"); + __name(isObject$1, "isObject$1"); + __name(isPlainObject, "isPlainObject"); + import_defineProperty2 = __toESM2(require_defineProperty(), 1); + subscribableCache = /* @__PURE__ */ new WeakMap(); + NOOP = /* @__PURE__ */ __name(() => { + }, "NOOP"); + _Symbol$toStringTag = Symbol.toStringTag; + Unpromise = /* @__PURE__ */ __name(class Unpromise2 { + constructor(arg) { + (0, import_defineProperty2.default)(this, "promise", void 0); + (0, import_defineProperty2.default)(this, "subscribers", []); + (0, import_defineProperty2.default)(this, "settlement", null); + (0, import_defineProperty2.default)(this, _Symbol$toStringTag, "Unpromise"); + if (typeof arg === "function") + this.promise = new Promise(arg); + else + this.promise = arg; + const thenReturn = this.promise.then((value) => { + const { subscribers } = this; + this.subscribers = null; + this.settlement = { + status: "fulfilled", + value + }; + subscribers === null || subscribers === void 0 || subscribers.forEach(({ resolve }) => { + resolve(value); + }); + }); + if ("catch" in thenReturn) + thenReturn.catch((reason) => { + const { subscribers } = this; + this.subscribers = null; + this.settlement = { + status: "rejected", + reason + }; + subscribers === null || subscribers === void 0 || subscribers.forEach(({ reject }) => { + reject(reason); + }); + }); + } + /** Create a promise that mitigates uncontrolled subscription to a long-lived + * Promise via .then() and .catch() - otherwise a source of memory leaks. + * + * The returned promise has an `unsubscribe()` method which can be called when + * the Promise is no longer being tracked by application logic, and which + * ensures that there is no reference chain from the original promise to the + * new one, and therefore no memory leak. + * + * If original promise has not yet settled, this adds a new unique promise + * that listens to then/catch events, along with an `unsubscribe()` method to + * detach it. + * + * If original promise has settled, then creates a new Promise.resolve() or + * Promise.reject() and provided unsubscribe is a noop. + * + * If you call `unsubscribe()` before the returned Promise has settled, it + * will never settle. + */ + subscribe() { + let promise2; + let unsubscribe; + const { settlement } = this; + if (settlement === null) { + if (this.subscribers === null) + throw new Error("Unpromise settled but still has subscribers"); + const subscriber = withResolvers(); + this.subscribers = listWithMember(this.subscribers, subscriber); + promise2 = subscriber.promise; + unsubscribe = /* @__PURE__ */ __name(() => { + if (this.subscribers !== null) + this.subscribers = listWithoutMember(this.subscribers, subscriber); + }, "unsubscribe"); + } else { + const { status } = settlement; + if (status === "fulfilled") + promise2 = Promise.resolve(settlement.value); + else + promise2 = Promise.reject(settlement.reason); + unsubscribe = NOOP; + } + return Object.assign(promise2, { unsubscribe }); + } + /** STANDARD PROMISE METHODS (but returning a SubscribedPromise) */ + then(onfulfilled, onrejected) { + const subscribed = this.subscribe(); + const { unsubscribe } = subscribed; + return Object.assign(subscribed.then(onfulfilled, onrejected), { unsubscribe }); + } + catch(onrejected) { + const subscribed = this.subscribe(); + const { unsubscribe } = subscribed; + return Object.assign(subscribed.catch(onrejected), { unsubscribe }); + } + finally(onfinally) { + const subscribed = this.subscribe(); + const { unsubscribe } = subscribed; + return Object.assign(subscribed.finally(onfinally), { unsubscribe }); + } + /** Unpromise STATIC METHODS */ + /** Create or Retrieve the proxy Unpromise (a re-used Unpromise for the VM lifetime + * of the provided Promise reference) */ + static proxy(promise2) { + const cached2 = Unpromise2.getSubscribablePromise(promise2); + return typeof cached2 !== "undefined" ? cached2 : Unpromise2.createSubscribablePromise(promise2); + } + /** Create and store an Unpromise keyed by an original Promise. */ + static createSubscribablePromise(promise2) { + const created = new Unpromise2(promise2); + subscribableCache.set(promise2, created); + subscribableCache.set(created, created); + return created; + } + /** Retrieve a previously-created Unpromise keyed by an original Promise. */ + static getSubscribablePromise(promise2) { + return subscribableCache.get(promise2); + } + /** Promise STATIC METHODS */ + /** Lookup the Unpromise for this promise, and derive a SubscribedPromise from + * it (that can be later unsubscribed to eliminate Memory leaks) */ + static resolve(value) { + const promise2 = typeof value === "object" && value !== null && "then" in value && typeof value.then === "function" ? value : Promise.resolve(value); + return Unpromise2.proxy(promise2).subscribe(); + } + static async any(values) { + const valuesArray = Array.isArray(values) ? values : [...values]; + const subscribedPromises = valuesArray.map(Unpromise2.resolve); + try { + return await Promise.any(subscribedPromises); + } finally { + subscribedPromises.forEach(({ unsubscribe }) => { + unsubscribe(); + }); + } + } + static async race(values) { + const valuesArray = Array.isArray(values) ? values : [...values]; + const subscribedPromises = valuesArray.map(Unpromise2.resolve); + try { + return await Promise.race(subscribedPromises); + } finally { + subscribedPromises.forEach(({ unsubscribe }) => { + unsubscribe(); + }); + } + } + /** Create a race of SubscribedPromises that will fulfil to a single winning + * Promise (in a 1-Tuple). Eliminates memory leaks from long-lived promises + * accumulating .then() and .catch() subscribers. Allows simple logic to + * consume the result, like... + * ```ts + * const [ winner ] = await Unpromise.race([ promiseA, promiseB ]); + * if(winner === promiseB){ + * const result = await promiseB; + * // do the thing + * } + * ``` + * */ + static async raceReferences(promises) { + const selfPromises = promises.map(resolveSelfTuple); + try { + return await Promise.race(selfPromises); + } finally { + for (const promise2 of selfPromises) + promise2.unsubscribe(); + } + } + }, "Unpromise"); + __name(resolveSelfTuple, "resolveSelfTuple"); + __name(withResolvers, "withResolvers"); + __name(listWithMember, "listWithMember"); + __name(listWithoutIndex, "listWithoutIndex"); + __name(listWithoutMember, "listWithoutMember"); + (_Symbol$dispose = (_Symbol = Symbol).dispose) !== null && _Symbol$dispose !== void 0 || (_Symbol.dispose = Symbol()); + (_Symbol2$asyncDispose = (_Symbol2 = Symbol).asyncDispose) !== null && _Symbol2$asyncDispose !== void 0 || (_Symbol2.asyncDispose = Symbol()); + __name(makeResource, "makeResource"); + __name(makeAsyncResource, "makeAsyncResource"); + disposablePromiseTimerResult = Symbol(); + __name(timerResource, "timerResource"); + require_usingCtx = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) { + function _usingCtx() { + var r2 = "function" == typeof SuppressedError ? SuppressedError : function(r$1, e$1) { + var n$1 = Error(); + return n$1.name = "SuppressedError", n$1.error = r$1, n$1.suppressed = e$1, n$1; + }, e2 = {}, n2 = []; + function using(r$1, e$1) { + if (null != e$1) { + if (Object(e$1) !== e$1) + throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); + if (r$1) + var o2 = e$1[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")]; + if (void 0 === o2 && (o2 = e$1[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r$1)) + var t9 = o2; + if ("function" != typeof o2) + throw new TypeError("Object is not disposable."); + t9 && (o2 = /* @__PURE__ */ __name(function o$1() { + try { + t9.call(e$1); + } catch (r$2) { + return Promise.reject(r$2); + } + }, "o$1")), n2.push({ + v: e$1, + d: o2, + a: r$1 + }); + } else + r$1 && n2.push({ + d: e$1, + a: r$1 + }); + return e$1; + } + __name(using, "using"); + return { + e: e2, + u: using.bind(null, false), + a: using.bind(null, true), + d: /* @__PURE__ */ __name(function d2() { + var o2, t9 = this.e, s2 = 0; + function next() { + for (; o2 = n2.pop(); ) + try { + if (!o2.a && 1 === s2) + return s2 = 0, n2.push(o2), Promise.resolve().then(next); + if (o2.d) { + var r$1 = o2.d.call(o2.v); + if (o2.a) + return s2 |= 2, Promise.resolve(r$1).then(next, err); + } else + s2 |= 1; + } catch (r$2) { + return err(r$2); + } + if (1 === s2) + return t9 !== e2 ? Promise.reject(t9) : Promise.resolve(); + if (t9 !== e2) + throw t9; + } + __name(next, "next"); + function err(n$1) { + return t9 = t9 !== e2 ? new r2(n$1, t9) : n$1, next(); + } + __name(err, "err"); + return next(); + }, "d") + }; + } + __name(_usingCtx, "_usingCtx"); + module.exports = _usingCtx, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_OverloadYield = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(exports, module) { + function _OverloadYield(e2, d2) { + this.v = e2, this.k = d2; + } + __name(_OverloadYield, "_OverloadYield"); + module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_awaitAsyncGenerator = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(exports, module) { + var OverloadYield$2 = require_OverloadYield(); + function _awaitAsyncGenerator$5(e2) { + return new OverloadYield$2(e2, 0); + } + __name(_awaitAsyncGenerator$5, "_awaitAsyncGenerator$5"); + module.exports = _awaitAsyncGenerator$5, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_wrapAsyncGenerator = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(exports, module) { + var OverloadYield$1 = require_OverloadYield(); + function _wrapAsyncGenerator$6(e2) { + return function() { + return new AsyncGenerator(e2.apply(this, arguments)); + }; + } + __name(_wrapAsyncGenerator$6, "_wrapAsyncGenerator$6"); + function AsyncGenerator(e2) { + var r2, t9; + function resume(r$1, t$1) { + try { + var n2 = e2[r$1](t$1), o2 = n2.value, u5 = o2 instanceof OverloadYield$1; + Promise.resolve(u5 ? o2.v : o2).then(function(t$2) { + if (u5) { + var i2 = "return" === r$1 ? "return" : "next"; + if (!o2.k || t$2.done) + return resume(i2, t$2); + t$2 = e2[i2](t$2).value; + } + settle2(n2.done ? "return" : "normal", t$2); + }, function(e$1) { + resume("throw", e$1); + }); + } catch (e$1) { + settle2("throw", e$1); + } + } + __name(resume, "resume"); + function settle2(e$1, n2) { + switch (e$1) { + case "return": + r2.resolve({ + value: n2, + done: true + }); + break; + case "throw": + r2.reject(n2); + break; + default: + r2.resolve({ + value: n2, + done: false + }); + } + (r2 = r2.next) ? resume(r2.key, r2.arg) : t9 = null; + } + __name(settle2, "settle"); + this._invoke = function(e$1, n2) { + return new Promise(function(o2, u5) { + var i2 = { + key: e$1, + arg: n2, + resolve: o2, + reject: u5, + next: null + }; + t9 ? t9 = t9.next = i2 : (r2 = t9 = i2, resume(e$1, n2)); + }); + }, "function" != typeof e2["return"] && (this["return"] = void 0); + } + __name(AsyncGenerator, "AsyncGenerator"); + AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function() { + return this; + }, AsyncGenerator.prototype.next = function(e2) { + return this._invoke("next", e2); + }, AsyncGenerator.prototype["throw"] = function(e2) { + return this._invoke("throw", e2); + }, AsyncGenerator.prototype["return"] = function(e2) { + return this._invoke("return", e2); + }; + module.exports = _wrapAsyncGenerator$6, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + import_usingCtx$4 = __toESM2(require_usingCtx(), 1); + import_awaitAsyncGenerator$4 = __toESM2(require_awaitAsyncGenerator(), 1); + import_wrapAsyncGenerator$5 = __toESM2(require_wrapAsyncGenerator(), 1); + __name(iteratorResource, "iteratorResource"); + __name(takeWithGrace, "takeWithGrace"); + __name(_takeWithGrace, "_takeWithGrace"); + __name(createDeferred, "createDeferred"); + import_usingCtx$3 = __toESM2(require_usingCtx(), 1); + import_awaitAsyncGenerator$3 = __toESM2(require_awaitAsyncGenerator(), 1); + import_wrapAsyncGenerator$4 = __toESM2(require_wrapAsyncGenerator(), 1); + __name(createManagedIterator, "createManagedIterator"); + __name(mergeAsyncIterables, "mergeAsyncIterables"); + __name(readableStreamFrom, "readableStreamFrom"); + import_usingCtx$2 = __toESM2(require_usingCtx(), 1); + import_awaitAsyncGenerator$2 = __toESM2(require_awaitAsyncGenerator(), 1); + import_wrapAsyncGenerator$3 = __toESM2(require_wrapAsyncGenerator(), 1); + PING_SYM = Symbol("ping"); + __name(withPing, "withPing"); + __name(_withPing, "_withPing"); + require_asyncIterator = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(exports, module) { + function _asyncIterator$2(r2) { + var n2, t9, o2, e2 = 2; + for ("undefined" != typeof Symbol && (t9 = Symbol.asyncIterator, o2 = Symbol.iterator); e2--; ) { + if (t9 && null != (n2 = r2[t9])) + return n2.call(r2); + if (o2 && null != (n2 = r2[o2])) + return new AsyncFromSyncIterator(n2.call(r2)); + t9 = "@@asyncIterator", o2 = "@@iterator"; + } + throw new TypeError("Object is not async iterable"); + } + __name(_asyncIterator$2, "_asyncIterator$2"); + function AsyncFromSyncIterator(r2) { + function AsyncFromSyncIteratorContinuation(r$1) { + if (Object(r$1) !== r$1) + return Promise.reject(new TypeError(r$1 + " is not an object.")); + var n2 = r$1.done; + return Promise.resolve(r$1.value).then(function(r$2) { + return { + value: r$2, + done: n2 + }; + }); + } + __name(AsyncFromSyncIteratorContinuation, "AsyncFromSyncIteratorContinuation"); + return AsyncFromSyncIterator = /* @__PURE__ */ __name(function AsyncFromSyncIterator$1(r$1) { + this.s = r$1, this.n = r$1.next; + }, "AsyncFromSyncIterator$1"), AsyncFromSyncIterator.prototype = { + s: null, + n: null, + next: /* @__PURE__ */ __name(function next() { + return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); + }, "next"), + "return": /* @__PURE__ */ __name(function _return(r$1) { + var n2 = this.s["return"]; + return void 0 === n2 ? Promise.resolve({ + value: r$1, + done: true + }) : AsyncFromSyncIteratorContinuation(n2.apply(this.s, arguments)); + }, "_return"), + "throw": /* @__PURE__ */ __name(function _throw(r$1) { + var n2 = this.s["return"]; + return void 0 === n2 ? Promise.reject(r$1) : AsyncFromSyncIteratorContinuation(n2.apply(this.s, arguments)); + }, "_throw") + }, new AsyncFromSyncIterator(r2); + } + __name(AsyncFromSyncIterator, "AsyncFromSyncIterator"); + module.exports = _asyncIterator$2, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + import_awaitAsyncGenerator$1 = __toESM2(require_awaitAsyncGenerator(), 1); + import_wrapAsyncGenerator$2 = __toESM2(require_wrapAsyncGenerator(), 1); + import_usingCtx$1 = __toESM2(require_usingCtx(), 1); + import_asyncIterator$1 = __toESM2(require_asyncIterator(), 1); + CHUNK_VALUE_TYPE_PROMISE = 0; + CHUNK_VALUE_TYPE_ASYNC_ITERABLE = 1; + PROMISE_STATUS_FULFILLED = 0; + PROMISE_STATUS_REJECTED = 1; + ASYNC_ITERABLE_STATUS_RETURN = 0; + ASYNC_ITERABLE_STATUS_YIELD = 1; + ASYNC_ITERABLE_STATUS_ERROR = 2; + __name(isPromise, "isPromise"); + MaxDepthError = /* @__PURE__ */ __name(class extends Error { + constructor(path) { + super("Max depth reached at path: " + path.join(".")); + this.path = path; + } + }, "MaxDepthError"); + __name(createBatchStreamProducer, "createBatchStreamProducer"); + __name(_createBatchStreamProducer, "_createBatchStreamProducer"); + __name(jsonlStreamProducer, "jsonlStreamProducer"); + require_asyncGeneratorDelegate = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js"(exports, module) { + var OverloadYield = require_OverloadYield(); + function _asyncGeneratorDelegate$1(t9) { + var e2 = {}, n2 = false; + function pump(e$1, r2) { + return n2 = true, r2 = new Promise(function(n$1) { + n$1(t9[e$1](r2)); + }), { + done: false, + value: new OverloadYield(r2, 1) + }; + } + __name(pump, "pump"); + return e2["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function() { + return this; + }, e2.next = function(t$1) { + return n2 ? (n2 = false, t$1) : pump("next", t$1); + }, "function" == typeof t9["throw"] && (e2["throw"] = function(t$1) { + if (n2) + throw n2 = false, t$1; + return pump("throw", t$1); + }), "function" == typeof t9["return"] && (e2["return"] = function(t$1) { + return n2 ? (n2 = false, t$1) : pump("return", t$1); + }), e2; + } + __name(_asyncGeneratorDelegate$1, "_asyncGeneratorDelegate$1"); + module.exports = _asyncGeneratorDelegate$1, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + import_asyncIterator = __toESM2(require_asyncIterator(), 1); + import_awaitAsyncGenerator = __toESM2(require_awaitAsyncGenerator(), 1); + import_wrapAsyncGenerator$1 = __toESM2(require_wrapAsyncGenerator(), 1); + import_asyncGeneratorDelegate = __toESM2(require_asyncGeneratorDelegate(), 1); + import_usingCtx = __toESM2(require_usingCtx(), 1); + PING_EVENT = "ping"; + SERIALIZED_ERROR_EVENT = "serialized-error"; + CONNECTED_EVENT = "connected"; + RETURN_EVENT = "return"; + __name(sseStreamProducer, "sseStreamProducer"); + sseHeaders = { + "Content-Type": "text/event-stream", + "Cache-Control": "no-cache, no-transform", + "X-Accel-Buffering": "no", + Connection: "keep-alive" + }; + import_wrapAsyncGenerator = __toESM2(require_wrapAsyncGenerator(), 1); + import_objectSpread23 = __toESM2(require_objectSpread2(), 1); + __name(errorToAsyncIterable, "errorToAsyncIterable"); + __name(combinedAbortController, "combinedAbortController"); + TYPE_ACCEPTED_METHOD_MAP = { + mutation: ["POST"], + query: ["GET"], + subscription: ["GET"] + }; + TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE = { + mutation: ["POST"], + query: ["GET", "POST"], + subscription: ["GET", "POST"] + }; + __name(initResponse, "initResponse"); + __name(caughtErrorToData, "caughtErrorToData"); + __name(isDataStream, "isDataStream"); + __name(resolveResponse, "resolveResponse"); + } +}); + +// ../../node_modules/@trpc/server/dist/adapters/fetch/index.mjs +async function fetchRequestHandler(opts) { + const resHeaders = new Headers(); + const createContext = /* @__PURE__ */ __name(async (innerOpts) => { + var _opts$createContext; + return (_opts$createContext = opts.createContext) === null || _opts$createContext === void 0 ? void 0 : _opts$createContext.call(opts, (0, import_objectSpread24.default)({ + req: opts.req, + resHeaders + }, innerOpts)); + }, "createContext"); + const url2 = new URL(opts.req.url); + const pathname = trimSlashes(url2.pathname); + const endpoint = trimSlashes(opts.endpoint); + const path = trimSlashes(pathname.slice(endpoint.length)); + return await resolveResponse((0, import_objectSpread24.default)((0, import_objectSpread24.default)({}, opts), {}, { + req: opts.req, + createContext, + path, + error: null, + onError(o2) { + var _opts$onError; + opts === null || opts === void 0 || (_opts$onError = opts.onError) === null || _opts$onError === void 0 || _opts$onError.call(opts, (0, import_objectSpread24.default)((0, import_objectSpread24.default)({}, o2), {}, { req: opts.req })); + }, + responseMeta(data) { + var _opts$responseMeta; + const meta3 = (_opts$responseMeta = opts.responseMeta) === null || _opts$responseMeta === void 0 ? void 0 : _opts$responseMeta.call(opts, data); + if (meta3 === null || meta3 === void 0 ? void 0 : meta3.headers) { + if (meta3.headers instanceof Headers) + for (const [key, value] of meta3.headers.entries()) + resHeaders.append(key, value); + else + for (const [key, value] of Object.entries(meta3.headers)) + if (Array.isArray(value)) + for (const v3 of value) + resHeaders.append(key, v3); + else if (typeof value === "string") + resHeaders.set(key, value); + } + return { + headers: resHeaders, + status: meta3 === null || meta3 === void 0 ? void 0 : meta3.status + }; + } + })); +} +var import_objectSpread24, trimSlashes; +var init_fetch = __esm({ + "../../node_modules/@trpc/server/dist/adapters/fetch/index.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getErrorShape_vC8mUXJD(); + init_resolveResponse_CHqBlAgR(); + import_objectSpread24 = __toESM2(require_objectSpread2(), 1); + trimSlashes = /* @__PURE__ */ __name((path) => { + path = path.startsWith("/") ? path.slice(1) : path; + path = path.endsWith("/") ? path.slice(0, -1) : path; + return path; + }, "trimSlashes"); + __name(fetchRequestHandler, "fetchRequestHandler"); + } +}); + +// ../../node_modules/hono/dist/helper/route/index.js +var matchedRoutes, routePath; +var init_route = __esm({ + "../../node_modules/hono/dist/helper/route/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants(); + init_url(); + matchedRoutes = /* @__PURE__ */ __name((c2) => ( + // @ts-expect-error c.req[GET_MATCH_RESULT] is not typed + c2.req[GET_MATCH_RESULT][0].map(([[, route]]) => route) + ), "matchedRoutes"); + routePath = /* @__PURE__ */ __name((c2, index) => matchedRoutes(c2).at(index ?? c2.req.routeIndex)?.path ?? "", "routePath"); + } +}); + +// ../../node_modules/@hono/trpc-server/dist/index.js +var trpcServer; +var init_dist2 = __esm({ + "../../node_modules/@hono/trpc-server/dist/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fetch(); + init_route(); + trpcServer = /* @__PURE__ */ __name(({ endpoint, createContext, ...rest }) => { + const bodyProps = /* @__PURE__ */ new Set([ + "arrayBuffer", + "blob", + "formData", + "json", + "text" + ]); + return async (c2) => { + const canWithBody = c2.req.method === "GET" || c2.req.method === "HEAD"; + let resolvedEndpoint = endpoint; + if (!endpoint) { + const path = routePath(c2); + if (path) + resolvedEndpoint = path.replace(/\/\*+$/, "") || "/trpc"; + else + resolvedEndpoint = "/trpc"; + } + return await fetchRequestHandler({ + ...rest, + createContext: async (opts) => ({ + ...createContext ? await createContext(opts, c2) : {}, + env: c2.env + }), + endpoint: resolvedEndpoint, + req: canWithBody ? c2.req.raw : new Proxy(c2.req.raw, { get(t9, p2, _r) { + if (bodyProps.has(p2)) + return () => c2.req[p2](); + return Reflect.get(t9, p2, t9); + } }) + }); + }; + }, "trpcServer"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/entity.js +function is(value, type) { + if (!value || typeof value !== "object") { + return false; + } + if (value instanceof type) { + return true; + } + if (!Object.prototype.hasOwnProperty.call(type, entityKind)) { + throw new Error( + `Class "${type.name ?? ""}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.` + ); + } + let cls = Object.getPrototypeOf(value).constructor; + if (cls) { + while (cls) { + if (entityKind in cls && cls[entityKind] === type[entityKind]) { + return true; + } + cls = Object.getPrototypeOf(cls); + } + } + return false; +} +var entityKind, hasOwnEntityKind; +var init_entity = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/entity.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + entityKind = Symbol.for("drizzle:entityKind"); + hasOwnEntityKind = Symbol.for("drizzle:hasOwnEntityKind"); + __name(is, "is"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/logger.js +var _a, ConsoleLogWriter, _a2, DefaultLogger, _a3, NoopLogger; +var init_logger2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/logger.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + ConsoleLogWriter = class { + write(message2) { + console.log(message2); + } + }; + __name(ConsoleLogWriter, "ConsoleLogWriter"); + _a = entityKind; + __publicField(ConsoleLogWriter, _a, "ConsoleLogWriter"); + DefaultLogger = class { + writer; + constructor(config3) { + this.writer = config3?.writer ?? new ConsoleLogWriter(); + } + logQuery(query, params) { + const stringifiedParams = params.map((p2) => { + try { + return JSON.stringify(p2); + } catch { + return String(p2); + } + }); + const paramsStr = stringifiedParams.length ? ` -- params: [${stringifiedParams.join(", ")}]` : ""; + this.writer.write(`Query: ${query}${paramsStr}`); + } + }; + __name(DefaultLogger, "DefaultLogger"); + _a2 = entityKind; + __publicField(DefaultLogger, _a2, "DefaultLogger"); + NoopLogger = class { + logQuery() { + } + }; + __name(NoopLogger, "NoopLogger"); + _a3 = entityKind; + __publicField(NoopLogger, _a3, "NoopLogger"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/table.utils.js +var TableName; +var init_table_utils = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/table.utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + TableName = Symbol.for("drizzle:Name"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/table.js +function getTableName(table3) { + return table3[TableName]; +} +function getTableUniqueName(table3) { + return `${table3[Schema] ?? "public"}.${table3[TableName]}`; +} +var Schema, Columns, ExtraConfigColumns, OriginalName, BaseName, IsAlias, ExtraConfigBuilder, IsDrizzleTable, _a4, Table; +var init_table = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/table.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + Schema = Symbol.for("drizzle:Schema"); + Columns = Symbol.for("drizzle:Columns"); + ExtraConfigColumns = Symbol.for("drizzle:ExtraConfigColumns"); + OriginalName = Symbol.for("drizzle:OriginalName"); + BaseName = Symbol.for("drizzle:BaseName"); + IsAlias = Symbol.for("drizzle:IsAlias"); + ExtraConfigBuilder = Symbol.for("drizzle:ExtraConfigBuilder"); + IsDrizzleTable = Symbol.for("drizzle:IsDrizzleTable"); + Table = class { + /** + * @internal + * Can be changed if the table is aliased. + */ + [(_a4 = entityKind, TableName)]; + /** + * @internal + * Used to store the original name of the table, before any aliasing. + */ + [OriginalName]; + /** @internal */ + [Schema]; + /** @internal */ + [Columns]; + /** @internal */ + [ExtraConfigColumns]; + /** + * @internal + * Used to store the table name before the transformation via the `tableCreator` functions. + */ + [BaseName]; + /** @internal */ + [IsAlias] = false; + /** @internal */ + [IsDrizzleTable] = true; + /** @internal */ + [ExtraConfigBuilder] = void 0; + constructor(name, schema, baseName) { + this[TableName] = this[OriginalName] = name; + this[Schema] = schema; + this[BaseName] = baseName; + } + }; + __name(Table, "Table"); + __publicField(Table, _a4, "Table"); + /** @internal */ + __publicField(Table, "Symbol", { + Name: TableName, + Schema, + OriginalName, + Columns, + ExtraConfigColumns, + BaseName, + IsAlias, + ExtraConfigBuilder + }); + __name(getTableName, "getTableName"); + __name(getTableUniqueName, "getTableUniqueName"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/column.js +var _a5, Column; +var init_column = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/column.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + Column = class { + constructor(table3, config3) { + this.table = table3; + this.config = config3; + this.name = config3.name; + this.keyAsName = config3.keyAsName; + this.notNull = config3.notNull; + this.default = config3.default; + this.defaultFn = config3.defaultFn; + this.onUpdateFn = config3.onUpdateFn; + this.hasDefault = config3.hasDefault; + this.primary = config3.primaryKey; + this.isUnique = config3.isUnique; + this.uniqueName = config3.uniqueName; + this.uniqueType = config3.uniqueType; + this.dataType = config3.dataType; + this.columnType = config3.columnType; + this.generated = config3.generated; + this.generatedIdentity = config3.generatedIdentity; + } + name; + keyAsName; + primary; + notNull; + default; + defaultFn; + onUpdateFn; + hasDefault; + isUnique; + uniqueName; + uniqueType; + dataType; + columnType; + enumValues = void 0; + generated = void 0; + generatedIdentity = void 0; + config; + mapFromDriverValue(value) { + return value; + } + mapToDriverValue(value) { + return value; + } + // ** @internal */ + shouldDisableInsert() { + return this.config.generated !== void 0 && this.config.generated.type !== "byDefault"; + } + }; + __name(Column, "Column"); + _a5 = entityKind; + __publicField(Column, _a5, "Column"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/column-builder.js +var _a6, ColumnBuilder; +var init_column_builder = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/column-builder.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + ColumnBuilder = class { + config; + constructor(name, dataType, columnType) { + this.config = { + name, + keyAsName: name === "", + notNull: false, + default: void 0, + hasDefault: false, + primaryKey: false, + isUnique: false, + uniqueName: void 0, + uniqueType: void 0, + dataType, + columnType, + generated: void 0 + }; + } + /** + * Changes the data type of the column. Commonly used with `json` columns. Also, useful for branded types. + * + * @example + * ```ts + * const users = pgTable('users', { + * id: integer('id').$type().primaryKey(), + * details: json('details').$type().notNull(), + * }); + * ``` + */ + $type() { + return this; + } + /** + * Adds a `not null` clause to the column definition. + * + * Affects the `select` model of the table - columns *without* `not null` will be nullable on select. + */ + notNull() { + this.config.notNull = true; + return this; + } + /** + * Adds a `default ` clause to the column definition. + * + * Affects the `insert` model of the table - columns *with* `default` are optional on insert. + * + * If you need to set a dynamic default value, use {@link $defaultFn} instead. + */ + default(value) { + this.config.default = value; + this.config.hasDefault = true; + return this; + } + /** + * Adds a dynamic default value to the column. + * The function will be called when the row is inserted, and the returned value will be used as the column value. + * + * **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`. + */ + $defaultFn(fn) { + this.config.defaultFn = fn; + this.config.hasDefault = true; + return this; + } + /** + * Alias for {@link $defaultFn}. + */ + $default = this.$defaultFn; + /** + * Adds a dynamic update value to the column. + * The function will be called when the row is updated, and the returned value will be used as the column value if none is provided. + * If no `default` (or `$defaultFn`) value is provided, the function will be called when the row is inserted as well, and the returned value will be used as the column value. + * + * **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`. + */ + $onUpdateFn(fn) { + this.config.onUpdateFn = fn; + this.config.hasDefault = true; + return this; + } + /** + * Alias for {@link $onUpdateFn}. + */ + $onUpdate = this.$onUpdateFn; + /** + * Adds a `primary key` clause to the column definition. This implicitly makes the column `not null`. + * + * In SQLite, `integer primary key` implicitly makes the column auto-incrementing. + */ + primaryKey() { + this.config.primaryKey = true; + this.config.notNull = true; + return this; + } + /** @internal Sets the name of the column to the key within the table definition if a name was not given. */ + setName(name) { + if (this.config.name !== "") + return; + this.config.name = name; + } + }; + __name(ColumnBuilder, "ColumnBuilder"); + _a6 = entityKind; + __publicField(ColumnBuilder, _a6, "ColumnBuilder"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/foreign-keys.js +var _a7, ForeignKeyBuilder, _a8, ForeignKey; +var init_foreign_keys = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/foreign-keys.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + ForeignKeyBuilder = class { + /** @internal */ + reference; + /** @internal */ + _onUpdate = "no action"; + /** @internal */ + _onDelete = "no action"; + constructor(config3, actions) { + this.reference = () => { + const { name, columns, foreignColumns } = config3(); + return { name, columns, foreignTable: foreignColumns[0].table, foreignColumns }; + }; + if (actions) { + this._onUpdate = actions.onUpdate; + this._onDelete = actions.onDelete; + } + } + onUpdate(action) { + this._onUpdate = action === void 0 ? "no action" : action; + return this; + } + onDelete(action) { + this._onDelete = action === void 0 ? "no action" : action; + return this; + } + /** @internal */ + build(table3) { + return new ForeignKey(table3, this); + } + }; + __name(ForeignKeyBuilder, "ForeignKeyBuilder"); + _a7 = entityKind; + __publicField(ForeignKeyBuilder, _a7, "PgForeignKeyBuilder"); + ForeignKey = class { + constructor(table3, builder) { + this.table = table3; + this.reference = builder.reference; + this.onUpdate = builder._onUpdate; + this.onDelete = builder._onDelete; + } + reference; + onUpdate; + onDelete; + getName() { + const { name, columns, foreignColumns } = this.reference(); + const columnNames = columns.map((column) => column.name); + const foreignColumnNames = foreignColumns.map((column) => column.name); + const chunks = [ + this.table[TableName], + ...columnNames, + foreignColumns[0].table[TableName], + ...foreignColumnNames + ]; + return name ?? `${chunks.join("_")}_fk`; + } + }; + __name(ForeignKey, "ForeignKey"); + _a8 = entityKind; + __publicField(ForeignKey, _a8, "PgForeignKey"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/tracing-utils.js +function iife(fn, ...args) { + return fn(...args); +} +var init_tracing_utils = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/tracing-utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(iife, "iife"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/unique-constraint.js +function uniqueKeyName(table3, columns) { + return `${table3[TableName]}_${columns.join("_")}_unique`; +} +var _a9, UniqueConstraintBuilder, _a10, UniqueOnConstraintBuilder, _a11, UniqueConstraint; +var init_unique_constraint = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/unique-constraint.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + __name(uniqueKeyName, "uniqueKeyName"); + UniqueConstraintBuilder = class { + constructor(columns, name) { + this.name = name; + this.columns = columns; + } + /** @internal */ + columns; + /** @internal */ + nullsNotDistinctConfig = false; + nullsNotDistinct() { + this.nullsNotDistinctConfig = true; + return this; + } + /** @internal */ + build(table3) { + return new UniqueConstraint(table3, this.columns, this.nullsNotDistinctConfig, this.name); + } + }; + __name(UniqueConstraintBuilder, "UniqueConstraintBuilder"); + _a9 = entityKind; + __publicField(UniqueConstraintBuilder, _a9, "PgUniqueConstraintBuilder"); + UniqueOnConstraintBuilder = class { + /** @internal */ + name; + constructor(name) { + this.name = name; + } + on(...columns) { + return new UniqueConstraintBuilder(columns, this.name); + } + }; + __name(UniqueOnConstraintBuilder, "UniqueOnConstraintBuilder"); + _a10 = entityKind; + __publicField(UniqueOnConstraintBuilder, _a10, "PgUniqueOnConstraintBuilder"); + UniqueConstraint = class { + constructor(table3, columns, nullsNotDistinct, name) { + this.table = table3; + this.columns = columns; + this.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name)); + this.nullsNotDistinct = nullsNotDistinct; + } + columns; + name; + nullsNotDistinct = false; + getName() { + return this.name; + } + }; + __name(UniqueConstraint, "UniqueConstraint"); + _a11 = entityKind; + __publicField(UniqueConstraint, _a11, "PgUniqueConstraint"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/utils/array.js +function parsePgArrayValue(arrayString, startFrom, inQuotes) { + for (let i2 = startFrom; i2 < arrayString.length; i2++) { + const char = arrayString[i2]; + if (char === "\\") { + i2++; + continue; + } + if (char === '"') { + return [arrayString.slice(startFrom, i2).replace(/\\/g, ""), i2 + 1]; + } + if (inQuotes) { + continue; + } + if (char === "," || char === "}") { + return [arrayString.slice(startFrom, i2).replace(/\\/g, ""), i2]; + } + } + return [arrayString.slice(startFrom).replace(/\\/g, ""), arrayString.length]; +} +function parsePgNestedArray(arrayString, startFrom = 0) { + const result = []; + let i2 = startFrom; + let lastCharIsComma = false; + while (i2 < arrayString.length) { + const char = arrayString[i2]; + if (char === ",") { + if (lastCharIsComma || i2 === startFrom) { + result.push(""); + } + lastCharIsComma = true; + i2++; + continue; + } + lastCharIsComma = false; + if (char === "\\") { + i2 += 2; + continue; + } + if (char === '"') { + const [value2, startFrom2] = parsePgArrayValue(arrayString, i2 + 1, true); + result.push(value2); + i2 = startFrom2; + continue; + } + if (char === "}") { + return [result, i2 + 1]; + } + if (char === "{") { + const [value2, startFrom2] = parsePgNestedArray(arrayString, i2 + 1); + result.push(value2); + i2 = startFrom2; + continue; + } + const [value, newStartFrom] = parsePgArrayValue(arrayString, i2, false); + result.push(value); + i2 = newStartFrom; + } + return [result, i2]; +} +function parsePgArray(arrayString) { + const [result] = parsePgNestedArray(arrayString, 1); + return result; +} +function makePgArray(array2) { + return `{${array2.map((item) => { + if (Array.isArray(item)) { + return makePgArray(item); + } + if (typeof item === "string") { + return `"${item.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`; + } + return `${item}`; + }).join(",")}}`; +} +var init_array = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/utils/array.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(parsePgArrayValue, "parsePgArrayValue"); + __name(parsePgNestedArray, "parsePgNestedArray"); + __name(parsePgArray, "parsePgArray"); + __name(makePgArray, "makePgArray"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/columns/common.js +var _a12, PgColumnBuilder, _a13, PgColumn, _a14, ExtraConfigColumn, _a15, IndexedColumn, _a16, PgArrayBuilder, _a17, _PgArray, PgArray; +var init_common = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/columns/common.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column_builder(); + init_column(); + init_entity(); + init_foreign_keys(); + init_tracing_utils(); + init_unique_constraint(); + init_array(); + PgColumnBuilder = class extends ColumnBuilder { + foreignKeyConfigs = []; + array(size) { + return new PgArrayBuilder(this.config.name, this, size); + } + references(ref, actions = {}) { + this.foreignKeyConfigs.push({ ref, actions }); + return this; + } + unique(name, config3) { + this.config.isUnique = true; + this.config.uniqueName = name; + this.config.uniqueType = config3?.nulls; + return this; + } + generatedAlwaysAs(as2) { + this.config.generated = { + as: as2, + type: "always", + mode: "stored" + }; + return this; + } + /** @internal */ + buildForeignKeys(column, table3) { + return this.foreignKeyConfigs.map(({ ref, actions }) => { + return iife( + (ref2, actions2) => { + const builder = new ForeignKeyBuilder(() => { + const foreignColumn = ref2(); + return { columns: [column], foreignColumns: [foreignColumn] }; + }); + if (actions2.onUpdate) { + builder.onUpdate(actions2.onUpdate); + } + if (actions2.onDelete) { + builder.onDelete(actions2.onDelete); + } + return builder.build(table3); + }, + ref, + actions + ); + }); + } + /** @internal */ + buildExtraConfigColumn(table3) { + return new ExtraConfigColumn(table3, this.config); + } + }; + __name(PgColumnBuilder, "PgColumnBuilder"); + _a12 = entityKind; + __publicField(PgColumnBuilder, _a12, "PgColumnBuilder"); + PgColumn = class extends Column { + constructor(table3, config3) { + if (!config3.uniqueName) { + config3.uniqueName = uniqueKeyName(table3, [config3.name]); + } + super(table3, config3); + this.table = table3; + } + }; + __name(PgColumn, "PgColumn"); + _a13 = entityKind; + __publicField(PgColumn, _a13, "PgColumn"); + ExtraConfigColumn = class extends PgColumn { + getSQLType() { + return this.getSQLType(); + } + indexConfig = { + order: this.config.order ?? "asc", + nulls: this.config.nulls ?? "last", + opClass: this.config.opClass + }; + defaultConfig = { + order: "asc", + nulls: "last", + opClass: void 0 + }; + asc() { + this.indexConfig.order = "asc"; + return this; + } + desc() { + this.indexConfig.order = "desc"; + return this; + } + nullsFirst() { + this.indexConfig.nulls = "first"; + return this; + } + nullsLast() { + this.indexConfig.nulls = "last"; + return this; + } + /** + * ### PostgreSQL documentation quote + * + * > An operator class with optional parameters can be specified for each column of an index. + * The operator class identifies the operators to be used by the index for that column. + * For example, a B-tree index on four-byte integers would use the int4_ops class; + * this operator class includes comparison functions for four-byte integers. + * In practice the default operator class for the column's data type is usually sufficient. + * The main point of having operator classes is that for some data types, there could be more than one meaningful ordering. + * For example, we might want to sort a complex-number data type either by absolute value or by real part. + * We could do this by defining two operator classes for the data type and then selecting the proper class when creating an index. + * More information about operator classes check: + * + * ### Useful links + * https://www.postgresql.org/docs/current/sql-createindex.html + * + * https://www.postgresql.org/docs/current/indexes-opclass.html + * + * https://www.postgresql.org/docs/current/xindex.html + * + * ### Additional types + * If you have the `pg_vector` extension installed in your database, you can use the + * `vector_l2_ops`, `vector_ip_ops`, `vector_cosine_ops`, `vector_l1_ops`, `bit_hamming_ops`, `bit_jaccard_ops`, `halfvec_l2_ops`, `sparsevec_l2_ops` options, which are predefined types. + * + * **You can always specify any string you want in the operator class, in case Drizzle doesn't have it natively in its types** + * + * @param opClass + * @returns + */ + op(opClass) { + this.indexConfig.opClass = opClass; + return this; + } + }; + __name(ExtraConfigColumn, "ExtraConfigColumn"); + _a14 = entityKind; + __publicField(ExtraConfigColumn, _a14, "ExtraConfigColumn"); + IndexedColumn = class { + constructor(name, keyAsName, type, indexConfig) { + this.name = name; + this.keyAsName = keyAsName; + this.type = type; + this.indexConfig = indexConfig; + } + name; + keyAsName; + type; + indexConfig; + }; + __name(IndexedColumn, "IndexedColumn"); + _a15 = entityKind; + __publicField(IndexedColumn, _a15, "IndexedColumn"); + PgArrayBuilder = class extends PgColumnBuilder { + constructor(name, baseBuilder, size) { + super(name, "array", "PgArray"); + this.config.baseBuilder = baseBuilder; + this.config.size = size; + } + /** @internal */ + build(table3) { + const baseColumn = this.config.baseBuilder.build(table3); + return new PgArray( + table3, + this.config, + baseColumn + ); + } + }; + __name(PgArrayBuilder, "PgArrayBuilder"); + _a16 = entityKind; + __publicField(PgArrayBuilder, _a16, "PgArrayBuilder"); + _PgArray = class extends PgColumn { + constructor(table3, config3, baseColumn, range2) { + super(table3, config3); + this.baseColumn = baseColumn; + this.range = range2; + this.size = config3.size; + } + size; + getSQLType() { + return `${this.baseColumn.getSQLType()}[${typeof this.size === "number" ? this.size : ""}]`; + } + mapFromDriverValue(value) { + if (typeof value === "string") { + value = parsePgArray(value); + } + return value.map((v3) => this.baseColumn.mapFromDriverValue(v3)); + } + mapToDriverValue(value, isNestedArray = false) { + const a2 = value.map( + (v3) => v3 === null ? null : is(this.baseColumn, _PgArray) ? this.baseColumn.mapToDriverValue(v3, true) : this.baseColumn.mapToDriverValue(v3) + ); + if (isNestedArray) + return a2; + return makePgArray(a2); + } + }; + PgArray = _PgArray; + __name(PgArray, "PgArray"); + _a17 = entityKind; + __publicField(PgArray, _a17, "PgArray"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/columns/enum.js +function isPgEnum(obj) { + return !!obj && typeof obj === "function" && isPgEnumSym in obj && obj[isPgEnumSym] === true; +} +var _a18, PgEnumObjectColumnBuilder, _a19, PgEnumObjectColumn, isPgEnumSym, _a20, PgEnumColumnBuilder, _a21, PgEnumColumn; +var init_enum = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/columns/enum.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_common(); + PgEnumObjectColumnBuilder = class extends PgColumnBuilder { + constructor(name, enumInstance) { + super(name, "string", "PgEnumObjectColumn"); + this.config.enum = enumInstance; + } + /** @internal */ + build(table3) { + return new PgEnumObjectColumn( + table3, + this.config + ); + } + }; + __name(PgEnumObjectColumnBuilder, "PgEnumObjectColumnBuilder"); + _a18 = entityKind; + __publicField(PgEnumObjectColumnBuilder, _a18, "PgEnumObjectColumnBuilder"); + PgEnumObjectColumn = class extends PgColumn { + enum; + enumValues = this.config.enum.enumValues; + constructor(table3, config3) { + super(table3, config3); + this.enum = config3.enum; + } + getSQLType() { + return this.enum.enumName; + } + }; + __name(PgEnumObjectColumn, "PgEnumObjectColumn"); + _a19 = entityKind; + __publicField(PgEnumObjectColumn, _a19, "PgEnumObjectColumn"); + isPgEnumSym = Symbol.for("drizzle:isPgEnum"); + __name(isPgEnum, "isPgEnum"); + PgEnumColumnBuilder = class extends PgColumnBuilder { + constructor(name, enumInstance) { + super(name, "string", "PgEnumColumn"); + this.config.enum = enumInstance; + } + /** @internal */ + build(table3) { + return new PgEnumColumn( + table3, + this.config + ); + } + }; + __name(PgEnumColumnBuilder, "PgEnumColumnBuilder"); + _a20 = entityKind; + __publicField(PgEnumColumnBuilder, _a20, "PgEnumColumnBuilder"); + PgEnumColumn = class extends PgColumn { + enum = this.config.enum; + enumValues = this.config.enum.enumValues; + constructor(table3, config3) { + super(table3, config3); + this.enum = config3.enum; + } + getSQLType() { + return this.enum.enumName; + } + }; + __name(PgEnumColumn, "PgEnumColumn"); + _a21 = entityKind; + __publicField(PgEnumColumn, _a21, "PgEnumColumn"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/subquery.js +var _a22, Subquery, _a23, WithSubquery; +var init_subquery = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/subquery.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + Subquery = class { + constructor(sql2, fields, alias, isWith = false, usedTables = []) { + this._ = { + brand: "Subquery", + sql: sql2, + selectedFields: fields, + alias, + isWith, + usedTables + }; + } + // getSQL(): SQL { + // return new SQL([this]); + // } + }; + __name(Subquery, "Subquery"); + _a22 = entityKind; + __publicField(Subquery, _a22, "Subquery"); + WithSubquery = class extends Subquery { + }; + __name(WithSubquery, "WithSubquery"); + _a23 = entityKind; + __publicField(WithSubquery, _a23, "WithSubquery"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/version.js +var version2; +var init_version = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/version.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + version2 = "0.44.7"; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/tracing.js +var otel, rawTracer, tracer; +var init_tracing = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/tracing.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tracing_utils(); + init_version(); + tracer = { + startActiveSpan(name, fn) { + if (!otel) { + return fn(); + } + if (!rawTracer) { + rawTracer = otel.trace.getTracer("drizzle-orm", version2); + } + return iife( + (otel2, rawTracer2) => rawTracer2.startActiveSpan( + name, + (span) => { + try { + return fn(span); + } catch (e2) { + span.setStatus({ + code: otel2.SpanStatusCode.ERROR, + message: e2 instanceof Error ? e2.message : "Unknown error" + // eslint-disable-line no-instanceof/no-instanceof + }); + throw e2; + } finally { + span.end(); + } + } + ), + otel, + rawTracer + ); + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/view-common.js +var ViewBaseConfig; +var init_view_common = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/view-common.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/sql.js +function isSQLWrapper(value) { + return value !== null && value !== void 0 && typeof value.getSQL === "function"; +} +function mergeQueries(queries) { + const result = { sql: "", params: [] }; + for (const query of queries) { + result.sql += query.sql; + result.params.push(...query.params); + if (query.typings?.length) { + if (!result.typings) { + result.typings = []; + } + result.typings.push(...query.typings); + } + } + return result; +} +function isDriverValueEncoder(value) { + return typeof value === "object" && value !== null && "mapToDriverValue" in value && typeof value.mapToDriverValue === "function"; +} +function sql(strings, ...params) { + const queryChunks = []; + if (params.length > 0 || strings.length > 0 && strings[0] !== "") { + queryChunks.push(new StringChunk(strings[0])); + } + for (const [paramIndex, param2] of params.entries()) { + queryChunks.push(param2, new StringChunk(strings[paramIndex + 1])); + } + return new SQL(queryChunks); +} +function fillPlaceholders(params, values) { + return params.map((p2) => { + if (is(p2, Placeholder)) { + if (!(p2.name in values)) { + throw new Error(`No value for placeholder "${p2.name}" was provided`); + } + return values[p2.name]; + } + if (is(p2, Param) && is(p2.value, Placeholder)) { + if (!(p2.value.name in values)) { + throw new Error(`No value for placeholder "${p2.value.name}" was provided`); + } + return p2.encoder.mapToDriverValue(values[p2.value.name]); + } + return p2; + }); +} +var _a24, FakePrimitiveParam, _a25, StringChunk, _a26, _SQL, SQL, _a27, Name, noopDecoder, noopEncoder, noopMapper, _a28, Param, _a29, Placeholder, IsDrizzleView, _a30, View; +var init_sql = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/sql.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_enum(); + init_subquery(); + init_tracing(); + init_view_common(); + init_column(); + init_table(); + FakePrimitiveParam = class { + }; + __name(FakePrimitiveParam, "FakePrimitiveParam"); + _a24 = entityKind; + __publicField(FakePrimitiveParam, _a24, "FakePrimitiveParam"); + __name(isSQLWrapper, "isSQLWrapper"); + __name(mergeQueries, "mergeQueries"); + StringChunk = class { + value; + constructor(value) { + this.value = Array.isArray(value) ? value : [value]; + } + getSQL() { + return new SQL([this]); + } + }; + __name(StringChunk, "StringChunk"); + _a25 = entityKind; + __publicField(StringChunk, _a25, "StringChunk"); + _SQL = class { + constructor(queryChunks) { + this.queryChunks = queryChunks; + for (const chunk of queryChunks) { + if (is(chunk, Table)) { + const schemaName = chunk[Table.Symbol.Schema]; + this.usedTables.push( + schemaName === void 0 ? chunk[Table.Symbol.Name] : schemaName + "." + chunk[Table.Symbol.Name] + ); + } + } + } + /** @internal */ + decoder = noopDecoder; + shouldInlineParams = false; + /** @internal */ + usedTables = []; + append(query) { + this.queryChunks.push(...query.queryChunks); + return this; + } + toQuery(config3) { + return tracer.startActiveSpan("drizzle.buildSQL", (span) => { + const query = this.buildQueryFromSourceParams(this.queryChunks, config3); + span?.setAttributes({ + "drizzle.query.text": query.sql, + "drizzle.query.params": JSON.stringify(query.params) + }); + return query; + }); + } + buildQueryFromSourceParams(chunks, _config) { + const config3 = Object.assign({}, _config, { + inlineParams: _config.inlineParams || this.shouldInlineParams, + paramStartIndex: _config.paramStartIndex || { value: 0 } + }); + const { + casing, + escapeName, + escapeParam, + prepareTyping, + inlineParams, + paramStartIndex + } = config3; + return mergeQueries(chunks.map((chunk) => { + if (is(chunk, StringChunk)) { + return { sql: chunk.value.join(""), params: [] }; + } + if (is(chunk, Name)) { + return { sql: escapeName(chunk.value), params: [] }; + } + if (chunk === void 0) { + return { sql: "", params: [] }; + } + if (Array.isArray(chunk)) { + const result = [new StringChunk("(")]; + for (const [i2, p2] of chunk.entries()) { + result.push(p2); + if (i2 < chunk.length - 1) { + result.push(new StringChunk(", ")); + } + } + result.push(new StringChunk(")")); + return this.buildQueryFromSourceParams(result, config3); + } + if (is(chunk, _SQL)) { + return this.buildQueryFromSourceParams(chunk.queryChunks, { + ...config3, + inlineParams: inlineParams || chunk.shouldInlineParams + }); + } + if (is(chunk, Table)) { + const schemaName = chunk[Table.Symbol.Schema]; + const tableName = chunk[Table.Symbol.Name]; + return { + sql: schemaName === void 0 || chunk[IsAlias] ? escapeName(tableName) : escapeName(schemaName) + "." + escapeName(tableName), + params: [] + }; + } + if (is(chunk, Column)) { + const columnName = casing.getColumnCasing(chunk); + if (_config.invokeSource === "indexes") { + return { sql: escapeName(columnName), params: [] }; + } + const schemaName = chunk.table[Table.Symbol.Schema]; + return { + sql: chunk.table[IsAlias] || schemaName === void 0 ? escapeName(chunk.table[Table.Symbol.Name]) + "." + escapeName(columnName) : escapeName(schemaName) + "." + escapeName(chunk.table[Table.Symbol.Name]) + "." + escapeName(columnName), + params: [] + }; + } + if (is(chunk, View)) { + const schemaName = chunk[ViewBaseConfig].schema; + const viewName = chunk[ViewBaseConfig].name; + return { + sql: schemaName === void 0 || chunk[ViewBaseConfig].isAlias ? escapeName(viewName) : escapeName(schemaName) + "." + escapeName(viewName), + params: [] + }; + } + if (is(chunk, Param)) { + if (is(chunk.value, Placeholder)) { + return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] }; + } + const mappedValue = chunk.value === null ? null : chunk.encoder.mapToDriverValue(chunk.value); + if (is(mappedValue, _SQL)) { + return this.buildQueryFromSourceParams([mappedValue], config3); + } + if (inlineParams) { + return { sql: this.mapInlineParam(mappedValue, config3), params: [] }; + } + let typings = ["none"]; + if (prepareTyping) { + typings = [prepareTyping(chunk.encoder)]; + } + return { sql: escapeParam(paramStartIndex.value++, mappedValue), params: [mappedValue], typings }; + } + if (is(chunk, Placeholder)) { + return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] }; + } + if (is(chunk, _SQL.Aliased) && chunk.fieldAlias !== void 0) { + return { sql: escapeName(chunk.fieldAlias), params: [] }; + } + if (is(chunk, Subquery)) { + if (chunk._.isWith) { + return { sql: escapeName(chunk._.alias), params: [] }; + } + return this.buildQueryFromSourceParams([ + new StringChunk("("), + chunk._.sql, + new StringChunk(") "), + new Name(chunk._.alias) + ], config3); + } + if (isPgEnum(chunk)) { + if (chunk.schema) { + return { sql: escapeName(chunk.schema) + "." + escapeName(chunk.enumName), params: [] }; + } + return { sql: escapeName(chunk.enumName), params: [] }; + } + if (isSQLWrapper(chunk)) { + if (chunk.shouldOmitSQLParens?.()) { + return this.buildQueryFromSourceParams([chunk.getSQL()], config3); + } + return this.buildQueryFromSourceParams([ + new StringChunk("("), + chunk.getSQL(), + new StringChunk(")") + ], config3); + } + if (inlineParams) { + return { sql: this.mapInlineParam(chunk, config3), params: [] }; + } + return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] }; + })); + } + mapInlineParam(chunk, { escapeString }) { + if (chunk === null) { + return "null"; + } + if (typeof chunk === "number" || typeof chunk === "boolean") { + return chunk.toString(); + } + if (typeof chunk === "string") { + return escapeString(chunk); + } + if (typeof chunk === "object") { + const mappedValueAsString = chunk.toString(); + if (mappedValueAsString === "[object Object]") { + return escapeString(JSON.stringify(chunk)); + } + return escapeString(mappedValueAsString); + } + throw new Error("Unexpected param value: " + chunk); + } + getSQL() { + return this; + } + as(alias) { + if (alias === void 0) { + return this; + } + return new _SQL.Aliased(this, alias); + } + mapWith(decoder2) { + this.decoder = typeof decoder2 === "function" ? { mapFromDriverValue: decoder2 } : decoder2; + return this; + } + inlineParams() { + this.shouldInlineParams = true; + return this; + } + /** + * This method is used to conditionally include a part of the query. + * + * @param condition - Condition to check + * @returns itself if the condition is `true`, otherwise `undefined` + */ + if(condition) { + return condition ? this : void 0; + } + }; + SQL = _SQL; + __name(SQL, "SQL"); + _a26 = entityKind; + __publicField(SQL, _a26, "SQL"); + Name = class { + constructor(value) { + this.value = value; + } + brand; + getSQL() { + return new SQL([this]); + } + }; + __name(Name, "Name"); + _a27 = entityKind; + __publicField(Name, _a27, "Name"); + __name(isDriverValueEncoder, "isDriverValueEncoder"); + noopDecoder = { + mapFromDriverValue: (value) => value + }; + noopEncoder = { + mapToDriverValue: (value) => value + }; + noopMapper = { + ...noopDecoder, + ...noopEncoder + }; + Param = class { + /** + * @param value - Parameter value + * @param encoder - Encoder to convert the value to a driver parameter + */ + constructor(value, encoder2 = noopEncoder) { + this.value = value; + this.encoder = encoder2; + } + brand; + getSQL() { + return new SQL([this]); + } + }; + __name(Param, "Param"); + _a28 = entityKind; + __publicField(Param, _a28, "Param"); + __name(sql, "sql"); + ((sql2) => { + function empty() { + return new SQL([]); + } + __name(empty, "empty"); + sql2.empty = empty; + function fromList(list) { + return new SQL(list); + } + __name(fromList, "fromList"); + sql2.fromList = fromList; + function raw2(str) { + return new SQL([new StringChunk(str)]); + } + __name(raw2, "raw"); + sql2.raw = raw2; + function join(chunks, separator) { + const result = []; + for (const [i2, chunk] of chunks.entries()) { + if (i2 > 0 && separator !== void 0) { + result.push(separator); + } + result.push(chunk); + } + return new SQL(result); + } + __name(join, "join"); + sql2.join = join; + function identifier(value) { + return new Name(value); + } + __name(identifier, "identifier"); + sql2.identifier = identifier; + function placeholder2(name2) { + return new Placeholder(name2); + } + __name(placeholder2, "placeholder2"); + sql2.placeholder = placeholder2; + function param2(value, encoder2) { + return new Param(value, encoder2); + } + __name(param2, "param2"); + sql2.param = param2; + })(sql || (sql = {})); + ((SQL22) => { + class Aliased { + constructor(sql2, fieldAlias) { + this.sql = sql2; + this.fieldAlias = fieldAlias; + } + static [entityKind] = "SQL.Aliased"; + /** @internal */ + isSelectionField = false; + getSQL() { + return this.sql; + } + /** @internal */ + clone() { + return new Aliased(this.sql, this.fieldAlias); + } + } + __name(Aliased, "Aliased"); + SQL22.Aliased = Aliased; + })(SQL || (SQL = {})); + Placeholder = class { + constructor(name2) { + this.name = name2; + } + getSQL() { + return new SQL([this]); + } + }; + __name(Placeholder, "Placeholder"); + _a29 = entityKind; + __publicField(Placeholder, _a29, "Placeholder"); + __name(fillPlaceholders, "fillPlaceholders"); + IsDrizzleView = Symbol.for("drizzle:IsDrizzleView"); + View = class { + /** @internal */ + [(_a30 = entityKind, ViewBaseConfig)]; + /** @internal */ + [IsDrizzleView] = true; + constructor({ name: name2, schema, selectedFields, query }) { + this[ViewBaseConfig] = { + name: name2, + originalName: name2, + schema, + selectedFields, + query, + isExisting: !query, + isAlias: false + }; + } + getSQL() { + return new SQL([this]); + } + }; + __name(View, "View"); + __publicField(View, _a30, "View"); + Column.prototype.getSQL = function() { + return new SQL([this]); + }; + Table.prototype.getSQL = function() { + return new SQL([this]); + }; + Subquery.prototype.getSQL = function() { + return new SQL([this]); + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/utils.js +function mapResultRow(columns, row, joinsNotNullableMap) { + const nullifyMap = {}; + const result = columns.reduce( + (result2, { path, field }, columnIndex) => { + let decoder2; + if (is(field, Column)) { + decoder2 = field; + } else if (is(field, SQL)) { + decoder2 = field.decoder; + } else { + decoder2 = field.sql.decoder; + } + let node = result2; + for (const [pathChunkIndex, pathChunk] of path.entries()) { + if (pathChunkIndex < path.length - 1) { + if (!(pathChunk in node)) { + node[pathChunk] = {}; + } + node = node[pathChunk]; + } else { + const rawValue = row[columnIndex]; + const value = node[pathChunk] = rawValue === null ? null : decoder2.mapFromDriverValue(rawValue); + if (joinsNotNullableMap && is(field, Column) && path.length === 2) { + const objectName = path[0]; + if (!(objectName in nullifyMap)) { + nullifyMap[objectName] = value === null ? getTableName(field.table) : false; + } else if (typeof nullifyMap[objectName] === "string" && nullifyMap[objectName] !== getTableName(field.table)) { + nullifyMap[objectName] = false; + } + } + } + } + return result2; + }, + {} + ); + if (joinsNotNullableMap && Object.keys(nullifyMap).length > 0) { + for (const [objectName, tableName] of Object.entries(nullifyMap)) { + if (typeof tableName === "string" && !joinsNotNullableMap[tableName]) { + result[objectName] = null; + } + } + } + return result; +} +function orderSelectedFields(fields, pathPrefix) { + return Object.entries(fields).reduce((result, [name, field]) => { + if (typeof name !== "string") { + return result; + } + const newPath = pathPrefix ? [...pathPrefix, name] : [name]; + if (is(field, Column) || is(field, SQL) || is(field, SQL.Aliased)) { + result.push({ path: newPath, field }); + } else if (is(field, Table)) { + result.push(...orderSelectedFields(field[Table.Symbol.Columns], newPath)); + } else { + result.push(...orderSelectedFields(field, newPath)); + } + return result; + }, []); +} +function haveSameKeys(left, right) { + const leftKeys = Object.keys(left); + const rightKeys = Object.keys(right); + if (leftKeys.length !== rightKeys.length) { + return false; + } + for (const [index, key] of leftKeys.entries()) { + if (key !== rightKeys[index]) { + return false; + } + } + return true; +} +function mapUpdateSet(table3, values) { + const entries = Object.entries(values).filter(([, value]) => value !== void 0).map(([key, value]) => { + if (is(value, SQL) || is(value, Column)) { + return [key, value]; + } else { + return [key, new Param(value, table3[Table.Symbol.Columns][key])]; + } + }); + if (entries.length === 0) { + throw new Error("No values to set"); + } + return Object.fromEntries(entries); +} +function applyMixins(baseClass, extendedClasses) { + for (const extendedClass of extendedClasses) { + for (const name of Object.getOwnPropertyNames(extendedClass.prototype)) { + if (name === "constructor") + continue; + Object.defineProperty( + baseClass.prototype, + name, + Object.getOwnPropertyDescriptor(extendedClass.prototype, name) || /* @__PURE__ */ Object.create(null) + ); + } + } +} +function getTableColumns(table3) { + return table3[Table.Symbol.Columns]; +} +function getTableLikeName(table3) { + return is(table3, Subquery) ? table3._.alias : is(table3, View) ? table3[ViewBaseConfig].name : is(table3, SQL) ? void 0 : table3[Table.Symbol.IsAlias] ? table3[Table.Symbol.Name] : table3[Table.Symbol.BaseName]; +} +function getColumnNameAndConfig(a2, b2) { + return { + name: typeof a2 === "string" && a2.length > 0 ? a2 : "", + config: typeof a2 === "object" ? a2 : b2 + }; +} +var textDecoder; +var init_utils2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column(); + init_entity(); + init_sql(); + init_subquery(); + init_table(); + init_view_common(); + __name(mapResultRow, "mapResultRow"); + __name(orderSelectedFields, "orderSelectedFields"); + __name(haveSameKeys, "haveSameKeys"); + __name(mapUpdateSet, "mapUpdateSet"); + __name(applyMixins, "applyMixins"); + __name(getTableColumns, "getTableColumns"); + __name(getTableLikeName, "getTableLikeName"); + __name(getColumnNameAndConfig, "getColumnNameAndConfig"); + textDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/table.js +var InlineForeignKeys, EnableRLS, _a31, PgTable; +var init_table2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/table.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table(); + InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys"); + EnableRLS = Symbol.for("drizzle:EnableRLS"); + PgTable = class extends Table { + /**@internal */ + [(_a31 = entityKind, InlineForeignKeys)] = []; + /** @internal */ + [EnableRLS] = false; + /** @internal */ + [Table.Symbol.ExtraConfigBuilder] = void 0; + /** @internal */ + [Table.Symbol.ExtraConfigColumns] = {}; + }; + __name(PgTable, "PgTable"); + __publicField(PgTable, _a31, "PgTable"); + /** @internal */ + __publicField(PgTable, "Symbol", Object.assign({}, Table.Symbol, { + InlineForeignKeys, + EnableRLS + })); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/primary-keys.js +var _a32, PrimaryKeyBuilder, _a33, PrimaryKey; +var init_primary_keys = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/primary-keys.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table2(); + PrimaryKeyBuilder = class { + /** @internal */ + columns; + /** @internal */ + name; + constructor(columns, name) { + this.columns = columns; + this.name = name; + } + /** @internal */ + build(table3) { + return new PrimaryKey(table3, this.columns, this.name); + } + }; + __name(PrimaryKeyBuilder, "PrimaryKeyBuilder"); + _a32 = entityKind; + __publicField(PrimaryKeyBuilder, _a32, "PgPrimaryKeyBuilder"); + PrimaryKey = class { + constructor(table3, columns, name) { + this.table = table3; + this.columns = columns; + this.name = name; + } + columns; + name; + getName() { + return this.name ?? `${this.table[PgTable.Symbol.Name]}_${this.columns.map((column) => column.name).join("_")}_pk`; + } + }; + __name(PrimaryKey, "PrimaryKey"); + _a33 = entityKind; + __publicField(PrimaryKey, _a33, "PgPrimaryKey"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/conditions.js +function bindIfParam(value, column) { + if (isDriverValueEncoder(column) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column) && !is(value, Table) && !is(value, View)) { + return new Param(value, column); + } + return value; +} +function and(...unfilteredConditions) { + const conditions = unfilteredConditions.filter( + (c2) => c2 !== void 0 + ); + if (conditions.length === 0) { + return void 0; + } + if (conditions.length === 1) { + return new SQL(conditions); + } + return new SQL([ + new StringChunk("("), + sql.join(conditions, new StringChunk(" and ")), + new StringChunk(")") + ]); +} +function or(...unfilteredConditions) { + const conditions = unfilteredConditions.filter( + (c2) => c2 !== void 0 + ); + if (conditions.length === 0) { + return void 0; + } + if (conditions.length === 1) { + return new SQL(conditions); + } + return new SQL([ + new StringChunk("("), + sql.join(conditions, new StringChunk(" or ")), + new StringChunk(")") + ]); +} +function not(condition) { + return sql`not ${condition}`; +} +function inArray(column, values) { + if (Array.isArray(values)) { + if (values.length === 0) { + return sql`false`; + } + return sql`${column} in ${values.map((v3) => bindIfParam(v3, column))}`; + } + return sql`${column} in ${bindIfParam(values, column)}`; +} +function notInArray(column, values) { + if (Array.isArray(values)) { + if (values.length === 0) { + return sql`true`; + } + return sql`${column} not in ${values.map((v3) => bindIfParam(v3, column))}`; + } + return sql`${column} not in ${bindIfParam(values, column)}`; +} +function isNull(value) { + return sql`${value} is null`; +} +function isNotNull(value) { + return sql`${value} is not null`; +} +function exists(subquery) { + return sql`exists ${subquery}`; +} +function notExists(subquery) { + return sql`not exists ${subquery}`; +} +function between(column, min, max2) { + return sql`${column} between ${bindIfParam(min, column)} and ${bindIfParam( + max2, + column + )}`; +} +function notBetween(column, min, max2) { + return sql`${column} not between ${bindIfParam( + min, + column + )} and ${bindIfParam(max2, column)}`; +} +function like(column, value) { + return sql`${column} like ${value}`; +} +function notLike(column, value) { + return sql`${column} not like ${value}`; +} +function ilike(column, value) { + return sql`${column} ilike ${value}`; +} +function notIlike(column, value) { + return sql`${column} not ilike ${value}`; +} +var eq, ne, gt, gte, lt, lte; +var init_conditions = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/conditions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column(); + init_entity(); + init_table(); + init_sql(); + __name(bindIfParam, "bindIfParam"); + eq = /* @__PURE__ */ __name((left, right) => { + return sql`${left} = ${bindIfParam(right, left)}`; + }, "eq"); + ne = /* @__PURE__ */ __name((left, right) => { + return sql`${left} <> ${bindIfParam(right, left)}`; + }, "ne"); + __name(and, "and"); + __name(or, "or"); + __name(not, "not"); + gt = /* @__PURE__ */ __name((left, right) => { + return sql`${left} > ${bindIfParam(right, left)}`; + }, "gt"); + gte = /* @__PURE__ */ __name((left, right) => { + return sql`${left} >= ${bindIfParam(right, left)}`; + }, "gte"); + lt = /* @__PURE__ */ __name((left, right) => { + return sql`${left} < ${bindIfParam(right, left)}`; + }, "lt"); + lte = /* @__PURE__ */ __name((left, right) => { + return sql`${left} <= ${bindIfParam(right, left)}`; + }, "lte"); + __name(inArray, "inArray"); + __name(notInArray, "notInArray"); + __name(isNull, "isNull"); + __name(isNotNull, "isNotNull"); + __name(exists, "exists"); + __name(notExists, "notExists"); + __name(between, "between"); + __name(notBetween, "notBetween"); + __name(like, "like"); + __name(notLike, "notLike"); + __name(ilike, "ilike"); + __name(notIlike, "notIlike"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/select.js +function asc(column) { + return sql`${column} asc`; +} +function desc(column) { + return sql`${column} desc`; +} +var init_select = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/select.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sql(); + __name(asc, "asc"); + __name(desc, "desc"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/index.js +var init_expressions = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_conditions(); + init_select(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/relations.js +function getOperators() { + return { + and, + between, + eq, + exists, + gt, + gte, + ilike, + inArray, + isNull, + isNotNull, + like, + lt, + lte, + ne, + not, + notBetween, + notExists, + notLike, + notIlike, + notInArray, + or, + sql + }; +} +function getOrderByOperators() { + return { + sql, + asc, + desc + }; +} +function extractTablesRelationalConfig(schema, configHelpers) { + if (Object.keys(schema).length === 1 && "default" in schema && !is(schema["default"], Table)) { + schema = schema["default"]; + } + const tableNamesMap = {}; + const relationsBuffer = {}; + const tablesConfig = {}; + for (const [key, value] of Object.entries(schema)) { + if (is(value, Table)) { + const dbName = getTableUniqueName(value); + const bufferedRelations = relationsBuffer[dbName]; + tableNamesMap[dbName] = key; + tablesConfig[key] = { + tsName: key, + dbName: value[Table.Symbol.Name], + schema: value[Table.Symbol.Schema], + columns: value[Table.Symbol.Columns], + relations: bufferedRelations?.relations ?? {}, + primaryKey: bufferedRelations?.primaryKey ?? [] + }; + for (const column of Object.values( + value[Table.Symbol.Columns] + )) { + if (column.primary) { + tablesConfig[key].primaryKey.push(column); + } + } + const extraConfig = value[Table.Symbol.ExtraConfigBuilder]?.(value[Table.Symbol.ExtraConfigColumns]); + if (extraConfig) { + for (const configEntry of Object.values(extraConfig)) { + if (is(configEntry, PrimaryKeyBuilder)) { + tablesConfig[key].primaryKey.push(...configEntry.columns); + } + } + } + } else if (is(value, Relations)) { + const dbName = getTableUniqueName(value.table); + const tableName = tableNamesMap[dbName]; + const relations2 = value.config( + configHelpers(value.table) + ); + let primaryKey2; + for (const [relationName, relation] of Object.entries(relations2)) { + if (tableName) { + const tableConfig = tablesConfig[tableName]; + tableConfig.relations[relationName] = relation; + if (primaryKey2) { + tableConfig.primaryKey.push(...primaryKey2); + } + } else { + if (!(dbName in relationsBuffer)) { + relationsBuffer[dbName] = { + relations: {}, + primaryKey: primaryKey2 + }; + } + relationsBuffer[dbName].relations[relationName] = relation; + } + } + } + } + return { tables: tablesConfig, tableNamesMap }; +} +function relations(table3, relations2) { + return new Relations( + table3, + (helpers) => Object.fromEntries( + Object.entries(relations2(helpers)).map(([key, value]) => [ + key, + value.withFieldName(key) + ]) + ) + ); +} +function createOne(sourceTable) { + return /* @__PURE__ */ __name(function one(table3, config3) { + return new One( + sourceTable, + table3, + config3, + config3?.fields.reduce((res, f2) => res && f2.notNull, true) ?? false + ); + }, "one"); +} +function createMany(sourceTable) { + return /* @__PURE__ */ __name(function many(referencedTable, config3) { + return new Many(sourceTable, referencedTable, config3); + }, "many"); +} +function normalizeRelation(schema, tableNamesMap, relation) { + if (is(relation, One) && relation.config) { + return { + fields: relation.config.fields, + references: relation.config.references + }; + } + const referencedTableTsName = tableNamesMap[getTableUniqueName(relation.referencedTable)]; + if (!referencedTableTsName) { + throw new Error( + `Table "${relation.referencedTable[Table.Symbol.Name]}" not found in schema` + ); + } + const referencedTableConfig = schema[referencedTableTsName]; + if (!referencedTableConfig) { + throw new Error(`Table "${referencedTableTsName}" not found in schema`); + } + const sourceTable = relation.sourceTable; + const sourceTableTsName = tableNamesMap[getTableUniqueName(sourceTable)]; + if (!sourceTableTsName) { + throw new Error( + `Table "${sourceTable[Table.Symbol.Name]}" not found in schema` + ); + } + const reverseRelations = []; + for (const referencedTableRelation of Object.values( + referencedTableConfig.relations + )) { + if (relation.relationName && relation !== referencedTableRelation && referencedTableRelation.relationName === relation.relationName || !relation.relationName && referencedTableRelation.referencedTable === relation.sourceTable) { + reverseRelations.push(referencedTableRelation); + } + } + if (reverseRelations.length > 1) { + throw relation.relationName ? new Error( + `There are multiple relations with name "${relation.relationName}" in table "${referencedTableTsName}"` + ) : new Error( + `There are multiple relations between "${referencedTableTsName}" and "${relation.sourceTable[Table.Symbol.Name]}". Please specify relation name` + ); + } + if (reverseRelations[0] && is(reverseRelations[0], One) && reverseRelations[0].config) { + return { + fields: reverseRelations[0].config.references, + references: reverseRelations[0].config.fields + }; + } + throw new Error( + `There is not enough information to infer relation "${sourceTableTsName}.${relation.fieldName}"` + ); +} +function createTableRelationsHelpers(sourceTable) { + return { + one: createOne(sourceTable), + many: createMany(sourceTable) + }; +} +function mapRelationalRow(tablesConfig, tableConfig, row, buildQueryResultSelection, mapColumnValue = (value) => value) { + const result = {}; + for (const [ + selectionItemIndex, + selectionItem + ] of buildQueryResultSelection.entries()) { + if (selectionItem.isJson) { + const relation = tableConfig.relations[selectionItem.tsKey]; + const rawSubRows = row[selectionItemIndex]; + const subRows = typeof rawSubRows === "string" ? JSON.parse(rawSubRows) : rawSubRows; + result[selectionItem.tsKey] = is(relation, One) ? subRows && mapRelationalRow( + tablesConfig, + tablesConfig[selectionItem.relationTableTsKey], + subRows, + selectionItem.selection, + mapColumnValue + ) : subRows.map( + (subRow) => mapRelationalRow( + tablesConfig, + tablesConfig[selectionItem.relationTableTsKey], + subRow, + selectionItem.selection, + mapColumnValue + ) + ); + } else { + const value = mapColumnValue(row[selectionItemIndex]); + const field = selectionItem.field; + let decoder2; + if (is(field, Column)) { + decoder2 = field; + } else if (is(field, SQL)) { + decoder2 = field.decoder; + } else { + decoder2 = field.sql.decoder; + } + result[selectionItem.tsKey] = value === null ? null : decoder2.mapFromDriverValue(value); + } + } + return result; +} +var _a34, Relation, _a35, Relations, _a36, _One, One, _a37, _Many, Many; +var init_relations = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/relations.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_table(); + init_column(); + init_entity(); + init_primary_keys(); + init_expressions(); + init_sql(); + Relation = class { + constructor(sourceTable, referencedTable, relationName) { + this.sourceTable = sourceTable; + this.referencedTable = referencedTable; + this.relationName = relationName; + this.referencedTableName = referencedTable[Table.Symbol.Name]; + } + referencedTableName; + fieldName; + }; + __name(Relation, "Relation"); + _a34 = entityKind; + __publicField(Relation, _a34, "Relation"); + Relations = class { + constructor(table3, config3) { + this.table = table3; + this.config = config3; + } + }; + __name(Relations, "Relations"); + _a35 = entityKind; + __publicField(Relations, _a35, "Relations"); + _One = class extends Relation { + constructor(sourceTable, referencedTable, config3, isNullable) { + super(sourceTable, referencedTable, config3?.relationName); + this.config = config3; + this.isNullable = isNullable; + } + withFieldName(fieldName) { + const relation = new _One( + this.sourceTable, + this.referencedTable, + this.config, + this.isNullable + ); + relation.fieldName = fieldName; + return relation; + } + }; + One = _One; + __name(One, "One"); + _a36 = entityKind; + __publicField(One, _a36, "One"); + _Many = class extends Relation { + constructor(sourceTable, referencedTable, config3) { + super(sourceTable, referencedTable, config3?.relationName); + this.config = config3; + } + withFieldName(fieldName) { + const relation = new _Many( + this.sourceTable, + this.referencedTable, + this.config + ); + relation.fieldName = fieldName; + return relation; + } + }; + Many = _Many; + __name(Many, "Many"); + _a37 = entityKind; + __publicField(Many, _a37, "Many"); + __name(getOperators, "getOperators"); + __name(getOrderByOperators, "getOrderByOperators"); + __name(extractTablesRelationalConfig, "extractTablesRelationalConfig"); + __name(relations, "relations"); + __name(createOne, "createOne"); + __name(createMany, "createMany"); + __name(normalizeRelation, "normalizeRelation"); + __name(createTableRelationsHelpers, "createTableRelationsHelpers"); + __name(mapRelationalRow, "mapRelationalRow"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/alias.js +function aliasedTable(table3, tableAlias) { + return new Proxy(table3, new TableAliasProxyHandler(tableAlias, false)); +} +function aliasedTableColumn(column, tableAlias) { + return new Proxy( + column, + new ColumnAliasProxyHandler(new Proxy(column.table, new TableAliasProxyHandler(tableAlias, false))) + ); +} +function mapColumnsInAliasedSQLToAlias(query, alias) { + return new SQL.Aliased(mapColumnsInSQLToAlias(query.sql, alias), query.fieldAlias); +} +function mapColumnsInSQLToAlias(query, alias) { + return sql.join(query.queryChunks.map((c2) => { + if (is(c2, Column)) { + return aliasedTableColumn(c2, alias); + } + if (is(c2, SQL)) { + return mapColumnsInSQLToAlias(c2, alias); + } + if (is(c2, SQL.Aliased)) { + return mapColumnsInAliasedSQLToAlias(c2, alias); + } + return c2; + })); +} +var _a38, ColumnAliasProxyHandler, _a39, TableAliasProxyHandler, _a40, RelationTableAliasProxyHandler; +var init_alias = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/alias.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column(); + init_entity(); + init_sql(); + init_table(); + init_view_common(); + ColumnAliasProxyHandler = class { + constructor(table3) { + this.table = table3; + } + get(columnObj, prop) { + if (prop === "table") { + return this.table; + } + return columnObj[prop]; + } + }; + __name(ColumnAliasProxyHandler, "ColumnAliasProxyHandler"); + _a38 = entityKind; + __publicField(ColumnAliasProxyHandler, _a38, "ColumnAliasProxyHandler"); + TableAliasProxyHandler = class { + constructor(alias, replaceOriginalName) { + this.alias = alias; + this.replaceOriginalName = replaceOriginalName; + } + get(target, prop) { + if (prop === Table.Symbol.IsAlias) { + return true; + } + if (prop === Table.Symbol.Name) { + return this.alias; + } + if (this.replaceOriginalName && prop === Table.Symbol.OriginalName) { + return this.alias; + } + if (prop === ViewBaseConfig) { + return { + ...target[ViewBaseConfig], + name: this.alias, + isAlias: true + }; + } + if (prop === Table.Symbol.Columns) { + const columns = target[Table.Symbol.Columns]; + if (!columns) { + return columns; + } + const proxiedColumns = {}; + Object.keys(columns).map((key) => { + proxiedColumns[key] = new Proxy( + columns[key], + new ColumnAliasProxyHandler(new Proxy(target, this)) + ); + }); + return proxiedColumns; + } + const value = target[prop]; + if (is(value, Column)) { + return new Proxy(value, new ColumnAliasProxyHandler(new Proxy(target, this))); + } + return value; + } + }; + __name(TableAliasProxyHandler, "TableAliasProxyHandler"); + _a39 = entityKind; + __publicField(TableAliasProxyHandler, _a39, "TableAliasProxyHandler"); + RelationTableAliasProxyHandler = class { + constructor(alias) { + this.alias = alias; + } + get(target, prop) { + if (prop === "sourceTable") { + return aliasedTable(target.sourceTable, this.alias); + } + return target[prop]; + } + }; + __name(RelationTableAliasProxyHandler, "RelationTableAliasProxyHandler"); + _a40 = entityKind; + __publicField(RelationTableAliasProxyHandler, _a40, "RelationTableAliasProxyHandler"); + __name(aliasedTable, "aliasedTable"); + __name(aliasedTableColumn, "aliasedTableColumn"); + __name(mapColumnsInAliasedSQLToAlias, "mapColumnsInAliasedSQLToAlias"); + __name(mapColumnsInSQLToAlias, "mapColumnsInSQLToAlias"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/selection-proxy.js +var _a41, _SelectionProxyHandler, SelectionProxyHandler; +var init_selection_proxy = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/selection-proxy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_alias(); + init_column(); + init_entity(); + init_sql(); + init_subquery(); + init_view_common(); + _SelectionProxyHandler = class { + config; + constructor(config3) { + this.config = { ...config3 }; + } + get(subquery, prop) { + if (prop === "_") { + return { + ...subquery["_"], + selectedFields: new Proxy( + subquery._.selectedFields, + this + ) + }; + } + if (prop === ViewBaseConfig) { + return { + ...subquery[ViewBaseConfig], + selectedFields: new Proxy( + subquery[ViewBaseConfig].selectedFields, + this + ) + }; + } + if (typeof prop === "symbol") { + return subquery[prop]; + } + const columns = is(subquery, Subquery) ? subquery._.selectedFields : is(subquery, View) ? subquery[ViewBaseConfig].selectedFields : subquery; + const value = columns[prop]; + if (is(value, SQL.Aliased)) { + if (this.config.sqlAliasedBehavior === "sql" && !value.isSelectionField) { + return value.sql; + } + const newValue = value.clone(); + newValue.isSelectionField = true; + return newValue; + } + if (is(value, SQL)) { + if (this.config.sqlBehavior === "sql") { + return value; + } + throw new Error( + `You tried to reference "${prop}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.` + ); + } + if (is(value, Column)) { + if (this.config.alias) { + return new Proxy( + value, + new ColumnAliasProxyHandler( + new Proxy( + value.table, + new TableAliasProxyHandler(this.config.alias, this.config.replaceOriginalName ?? false) + ) + ) + ); + } + return value; + } + if (typeof value !== "object" || value === null) { + return value; + } + return new Proxy(value, new _SelectionProxyHandler(this.config)); + } + }; + SelectionProxyHandler = _SelectionProxyHandler; + __name(SelectionProxyHandler, "SelectionProxyHandler"); + _a41 = entityKind; + __publicField(SelectionProxyHandler, _a41, "SelectionProxyHandler"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/query-promise.js +var _a42, QueryPromise; +var init_query_promise = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/query-promise.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + QueryPromise = class { + [(_a42 = entityKind, Symbol.toStringTag)] = "QueryPromise"; + catch(onRejected) { + return this.then(void 0, onRejected); + } + finally(onFinally) { + return this.then( + (value) => { + onFinally?.(); + return value; + }, + (reason) => { + onFinally?.(); + throw reason; + } + ); + } + then(onFulfilled, onRejected) { + return this.execute().then(onFulfilled, onRejected); + } + }; + __name(QueryPromise, "QueryPromise"); + __publicField(QueryPromise, _a42, "QueryPromise"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/foreign-keys.js +var _a43, ForeignKeyBuilder2, _a44, ForeignKey2; +var init_foreign_keys2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/foreign-keys.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + ForeignKeyBuilder2 = class { + /** @internal */ + reference; + /** @internal */ + _onUpdate; + /** @internal */ + _onDelete; + constructor(config3, actions) { + this.reference = () => { + const { name, columns, foreignColumns } = config3(); + return { name, columns, foreignTable: foreignColumns[0].table, foreignColumns }; + }; + if (actions) { + this._onUpdate = actions.onUpdate; + this._onDelete = actions.onDelete; + } + } + onUpdate(action) { + this._onUpdate = action; + return this; + } + onDelete(action) { + this._onDelete = action; + return this; + } + /** @internal */ + build(table3) { + return new ForeignKey2(table3, this); + } + }; + __name(ForeignKeyBuilder2, "ForeignKeyBuilder"); + _a43 = entityKind; + __publicField(ForeignKeyBuilder2, _a43, "SQLiteForeignKeyBuilder"); + ForeignKey2 = class { + constructor(table3, builder) { + this.table = table3; + this.reference = builder.reference; + this.onUpdate = builder._onUpdate; + this.onDelete = builder._onDelete; + } + reference; + onUpdate; + onDelete; + getName() { + const { name, columns, foreignColumns } = this.reference(); + const columnNames = columns.map((column) => column.name); + const foreignColumnNames = foreignColumns.map((column) => column.name); + const chunks = [ + this.table[TableName], + ...columnNames, + foreignColumns[0].table[TableName], + ...foreignColumnNames + ]; + return name ?? `${chunks.join("_")}_fk`; + } + }; + __name(ForeignKey2, "ForeignKey"); + _a44 = entityKind; + __publicField(ForeignKey2, _a44, "SQLiteForeignKey"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/unique-constraint.js +function uniqueKeyName2(table3, columns) { + return `${table3[TableName]}_${columns.join("_")}_unique`; +} +var _a45, UniqueConstraintBuilder2, _a46, UniqueOnConstraintBuilder2, _a47, UniqueConstraint2; +var init_unique_constraint2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/unique-constraint.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + __name(uniqueKeyName2, "uniqueKeyName"); + UniqueConstraintBuilder2 = class { + constructor(columns, name) { + this.name = name; + this.columns = columns; + } + /** @internal */ + columns; + /** @internal */ + build(table3) { + return new UniqueConstraint2(table3, this.columns, this.name); + } + }; + __name(UniqueConstraintBuilder2, "UniqueConstraintBuilder"); + _a45 = entityKind; + __publicField(UniqueConstraintBuilder2, _a45, "SQLiteUniqueConstraintBuilder"); + UniqueOnConstraintBuilder2 = class { + /** @internal */ + name; + constructor(name) { + this.name = name; + } + on(...columns) { + return new UniqueConstraintBuilder2(columns, this.name); + } + }; + __name(UniqueOnConstraintBuilder2, "UniqueOnConstraintBuilder"); + _a46 = entityKind; + __publicField(UniqueOnConstraintBuilder2, _a46, "SQLiteUniqueOnConstraintBuilder"); + UniqueConstraint2 = class { + constructor(table3, columns, name) { + this.table = table3; + this.columns = columns; + this.name = name ?? uniqueKeyName2(this.table, this.columns.map((column) => column.name)); + } + columns; + name; + getName() { + return this.name; + } + }; + __name(UniqueConstraint2, "UniqueConstraint"); + _a47 = entityKind; + __publicField(UniqueConstraint2, _a47, "SQLiteUniqueConstraint"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/common.js +var _a48, SQLiteColumnBuilder, _a49, SQLiteColumn; +var init_common2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/common.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column_builder(); + init_column(); + init_entity(); + init_foreign_keys2(); + init_unique_constraint2(); + SQLiteColumnBuilder = class extends ColumnBuilder { + foreignKeyConfigs = []; + references(ref, actions = {}) { + this.foreignKeyConfigs.push({ ref, actions }); + return this; + } + unique(name) { + this.config.isUnique = true; + this.config.uniqueName = name; + return this; + } + generatedAlwaysAs(as2, config3) { + this.config.generated = { + as: as2, + type: "always", + mode: config3?.mode ?? "virtual" + }; + return this; + } + /** @internal */ + buildForeignKeys(column, table3) { + return this.foreignKeyConfigs.map(({ ref, actions }) => { + return ((ref2, actions2) => { + const builder = new ForeignKeyBuilder2(() => { + const foreignColumn = ref2(); + return { columns: [column], foreignColumns: [foreignColumn] }; + }); + if (actions2.onUpdate) { + builder.onUpdate(actions2.onUpdate); + } + if (actions2.onDelete) { + builder.onDelete(actions2.onDelete); + } + return builder.build(table3); + })(ref, actions); + }); + } + }; + __name(SQLiteColumnBuilder, "SQLiteColumnBuilder"); + _a48 = entityKind; + __publicField(SQLiteColumnBuilder, _a48, "SQLiteColumnBuilder"); + SQLiteColumn = class extends Column { + constructor(table3, config3) { + if (!config3.uniqueName) { + config3.uniqueName = uniqueKeyName2(table3, [config3.name]); + } + super(table3, config3); + this.table = table3; + } + }; + __name(SQLiteColumn, "SQLiteColumn"); + _a49 = entityKind; + __publicField(SQLiteColumn, _a49, "SQLiteColumn"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/blob.js +function blob(a2, b2) { + const { name, config: config3 } = getColumnNameAndConfig(a2, b2); + if (config3?.mode === "json") { + return new SQLiteBlobJsonBuilder(name); + } + if (config3?.mode === "bigint") { + return new SQLiteBigIntBuilder(name); + } + return new SQLiteBlobBufferBuilder(name); +} +var _a50, SQLiteBigIntBuilder, _a51, SQLiteBigInt, _a52, SQLiteBlobJsonBuilder, _a53, SQLiteBlobJson, _a54, SQLiteBlobBufferBuilder, _a55, SQLiteBlobBuffer; +var init_blob = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/blob.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_utils2(); + init_common2(); + SQLiteBigIntBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "bigint", "SQLiteBigInt"); + } + /** @internal */ + build(table3) { + return new SQLiteBigInt(table3, this.config); + } + }; + __name(SQLiteBigIntBuilder, "SQLiteBigIntBuilder"); + _a50 = entityKind; + __publicField(SQLiteBigIntBuilder, _a50, "SQLiteBigIntBuilder"); + SQLiteBigInt = class extends SQLiteColumn { + getSQLType() { + return "blob"; + } + mapFromDriverValue(value) { + if (typeof Buffer !== "undefined" && Buffer.from) { + const buf = Buffer.isBuffer(value) ? value : value instanceof ArrayBuffer ? Buffer.from(value) : value.buffer ? Buffer.from(value.buffer, value.byteOffset, value.byteLength) : Buffer.from(value); + return BigInt(buf.toString("utf8")); + } + return BigInt(textDecoder.decode(value)); + } + mapToDriverValue(value) { + return Buffer.from(value.toString()); + } + }; + __name(SQLiteBigInt, "SQLiteBigInt"); + _a51 = entityKind; + __publicField(SQLiteBigInt, _a51, "SQLiteBigInt"); + SQLiteBlobJsonBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "json", "SQLiteBlobJson"); + } + /** @internal */ + build(table3) { + return new SQLiteBlobJson( + table3, + this.config + ); + } + }; + __name(SQLiteBlobJsonBuilder, "SQLiteBlobJsonBuilder"); + _a52 = entityKind; + __publicField(SQLiteBlobJsonBuilder, _a52, "SQLiteBlobJsonBuilder"); + SQLiteBlobJson = class extends SQLiteColumn { + getSQLType() { + return "blob"; + } + mapFromDriverValue(value) { + if (typeof Buffer !== "undefined" && Buffer.from) { + const buf = Buffer.isBuffer(value) ? value : value instanceof ArrayBuffer ? Buffer.from(value) : value.buffer ? Buffer.from(value.buffer, value.byteOffset, value.byteLength) : Buffer.from(value); + return JSON.parse(buf.toString("utf8")); + } + return JSON.parse(textDecoder.decode(value)); + } + mapToDriverValue(value) { + return Buffer.from(JSON.stringify(value)); + } + }; + __name(SQLiteBlobJson, "SQLiteBlobJson"); + _a53 = entityKind; + __publicField(SQLiteBlobJson, _a53, "SQLiteBlobJson"); + SQLiteBlobBufferBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "buffer", "SQLiteBlobBuffer"); + } + /** @internal */ + build(table3) { + return new SQLiteBlobBuffer(table3, this.config); + } + }; + __name(SQLiteBlobBufferBuilder, "SQLiteBlobBufferBuilder"); + _a54 = entityKind; + __publicField(SQLiteBlobBufferBuilder, _a54, "SQLiteBlobBufferBuilder"); + SQLiteBlobBuffer = class extends SQLiteColumn { + mapFromDriverValue(value) { + if (Buffer.isBuffer(value)) { + return value; + } + return Buffer.from(value); + } + getSQLType() { + return "blob"; + } + }; + __name(SQLiteBlobBuffer, "SQLiteBlobBuffer"); + _a55 = entityKind; + __publicField(SQLiteBlobBuffer, _a55, "SQLiteBlobBuffer"); + __name(blob, "blob"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/custom.js +function customType(customTypeParams) { + return (a2, b2) => { + const { name, config: config3 } = getColumnNameAndConfig(a2, b2); + return new SQLiteCustomColumnBuilder( + name, + config3, + customTypeParams + ); + }; +} +var _a56, SQLiteCustomColumnBuilder, _a57, SQLiteCustomColumn; +var init_custom = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/custom.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_utils2(); + init_common2(); + SQLiteCustomColumnBuilder = class extends SQLiteColumnBuilder { + constructor(name, fieldConfig, customTypeParams) { + super(name, "custom", "SQLiteCustomColumn"); + this.config.fieldConfig = fieldConfig; + this.config.customTypeParams = customTypeParams; + } + /** @internal */ + build(table3) { + return new SQLiteCustomColumn( + table3, + this.config + ); + } + }; + __name(SQLiteCustomColumnBuilder, "SQLiteCustomColumnBuilder"); + _a56 = entityKind; + __publicField(SQLiteCustomColumnBuilder, _a56, "SQLiteCustomColumnBuilder"); + SQLiteCustomColumn = class extends SQLiteColumn { + sqlName; + mapTo; + mapFrom; + constructor(table3, config3) { + super(table3, config3); + this.sqlName = config3.customTypeParams.dataType(config3.fieldConfig); + this.mapTo = config3.customTypeParams.toDriver; + this.mapFrom = config3.customTypeParams.fromDriver; + } + getSQLType() { + return this.sqlName; + } + mapFromDriverValue(value) { + return typeof this.mapFrom === "function" ? this.mapFrom(value) : value; + } + mapToDriverValue(value) { + return typeof this.mapTo === "function" ? this.mapTo(value) : value; + } + }; + __name(SQLiteCustomColumn, "SQLiteCustomColumn"); + _a57 = entityKind; + __publicField(SQLiteCustomColumn, _a57, "SQLiteCustomColumn"); + __name(customType, "customType"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/integer.js +function integer(a2, b2) { + const { name, config: config3 } = getColumnNameAndConfig(a2, b2); + if (config3?.mode === "timestamp" || config3?.mode === "timestamp_ms") { + return new SQLiteTimestampBuilder(name, config3.mode); + } + if (config3?.mode === "boolean") { + return new SQLiteBooleanBuilder(name, config3.mode); + } + return new SQLiteIntegerBuilder(name); +} +var _a58, SQLiteBaseIntegerBuilder, _a59, SQLiteBaseInteger, _a60, SQLiteIntegerBuilder, _a61, SQLiteInteger, _a62, SQLiteTimestampBuilder, _a63, SQLiteTimestamp, _a64, SQLiteBooleanBuilder, _a65, SQLiteBoolean; +var init_integer = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/integer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_sql(); + init_utils2(); + init_common2(); + SQLiteBaseIntegerBuilder = class extends SQLiteColumnBuilder { + constructor(name, dataType, columnType) { + super(name, dataType, columnType); + this.config.autoIncrement = false; + } + primaryKey(config3) { + if (config3?.autoIncrement) { + this.config.autoIncrement = true; + } + this.config.hasDefault = true; + return super.primaryKey(); + } + }; + __name(SQLiteBaseIntegerBuilder, "SQLiteBaseIntegerBuilder"); + _a58 = entityKind; + __publicField(SQLiteBaseIntegerBuilder, _a58, "SQLiteBaseIntegerBuilder"); + SQLiteBaseInteger = class extends SQLiteColumn { + autoIncrement = this.config.autoIncrement; + getSQLType() { + return "integer"; + } + }; + __name(SQLiteBaseInteger, "SQLiteBaseInteger"); + _a59 = entityKind; + __publicField(SQLiteBaseInteger, _a59, "SQLiteBaseInteger"); + SQLiteIntegerBuilder = class extends SQLiteBaseIntegerBuilder { + constructor(name) { + super(name, "number", "SQLiteInteger"); + } + build(table3) { + return new SQLiteInteger( + table3, + this.config + ); + } + }; + __name(SQLiteIntegerBuilder, "SQLiteIntegerBuilder"); + _a60 = entityKind; + __publicField(SQLiteIntegerBuilder, _a60, "SQLiteIntegerBuilder"); + SQLiteInteger = class extends SQLiteBaseInteger { + }; + __name(SQLiteInteger, "SQLiteInteger"); + _a61 = entityKind; + __publicField(SQLiteInteger, _a61, "SQLiteInteger"); + SQLiteTimestampBuilder = class extends SQLiteBaseIntegerBuilder { + constructor(name, mode) { + super(name, "date", "SQLiteTimestamp"); + this.config.mode = mode; + } + /** + * @deprecated Use `default()` with your own expression instead. + * + * Adds `DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer))` to the column, which is the current epoch timestamp in milliseconds. + */ + defaultNow() { + return this.default(sql`(cast((julianday('now') - 2440587.5)*86400000 as integer))`); + } + build(table3) { + return new SQLiteTimestamp( + table3, + this.config + ); + } + }; + __name(SQLiteTimestampBuilder, "SQLiteTimestampBuilder"); + _a62 = entityKind; + __publicField(SQLiteTimestampBuilder, _a62, "SQLiteTimestampBuilder"); + SQLiteTimestamp = class extends SQLiteBaseInteger { + mode = this.config.mode; + mapFromDriverValue(value) { + if (this.config.mode === "timestamp") { + return new Date(value * 1e3); + } + return new Date(value); + } + mapToDriverValue(value) { + const unix = value.getTime(); + if (this.config.mode === "timestamp") { + return Math.floor(unix / 1e3); + } + return unix; + } + }; + __name(SQLiteTimestamp, "SQLiteTimestamp"); + _a63 = entityKind; + __publicField(SQLiteTimestamp, _a63, "SQLiteTimestamp"); + SQLiteBooleanBuilder = class extends SQLiteBaseIntegerBuilder { + constructor(name, mode) { + super(name, "boolean", "SQLiteBoolean"); + this.config.mode = mode; + } + build(table3) { + return new SQLiteBoolean( + table3, + this.config + ); + } + }; + __name(SQLiteBooleanBuilder, "SQLiteBooleanBuilder"); + _a64 = entityKind; + __publicField(SQLiteBooleanBuilder, _a64, "SQLiteBooleanBuilder"); + SQLiteBoolean = class extends SQLiteBaseInteger { + mode = this.config.mode; + mapFromDriverValue(value) { + return Number(value) === 1; + } + mapToDriverValue(value) { + return value ? 1 : 0; + } + }; + __name(SQLiteBoolean, "SQLiteBoolean"); + _a65 = entityKind; + __publicField(SQLiteBoolean, _a65, "SQLiteBoolean"); + __name(integer, "integer"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/numeric.js +function numeric(a2, b2) { + const { name, config: config3 } = getColumnNameAndConfig(a2, b2); + const mode = config3?.mode; + return mode === "number" ? new SQLiteNumericNumberBuilder(name) : mode === "bigint" ? new SQLiteNumericBigIntBuilder(name) : new SQLiteNumericBuilder(name); +} +var _a66, SQLiteNumericBuilder, _a67, SQLiteNumeric, _a68, SQLiteNumericNumberBuilder, _a69, SQLiteNumericNumber, _a70, SQLiteNumericBigIntBuilder, _a71, SQLiteNumericBigInt; +var init_numeric = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/numeric.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_utils2(); + init_common2(); + SQLiteNumericBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "string", "SQLiteNumeric"); + } + /** @internal */ + build(table3) { + return new SQLiteNumeric( + table3, + this.config + ); + } + }; + __name(SQLiteNumericBuilder, "SQLiteNumericBuilder"); + _a66 = entityKind; + __publicField(SQLiteNumericBuilder, _a66, "SQLiteNumericBuilder"); + SQLiteNumeric = class extends SQLiteColumn { + mapFromDriverValue(value) { + if (typeof value === "string") + return value; + return String(value); + } + getSQLType() { + return "numeric"; + } + }; + __name(SQLiteNumeric, "SQLiteNumeric"); + _a67 = entityKind; + __publicField(SQLiteNumeric, _a67, "SQLiteNumeric"); + SQLiteNumericNumberBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "number", "SQLiteNumericNumber"); + } + /** @internal */ + build(table3) { + return new SQLiteNumericNumber( + table3, + this.config + ); + } + }; + __name(SQLiteNumericNumberBuilder, "SQLiteNumericNumberBuilder"); + _a68 = entityKind; + __publicField(SQLiteNumericNumberBuilder, _a68, "SQLiteNumericNumberBuilder"); + SQLiteNumericNumber = class extends SQLiteColumn { + mapFromDriverValue(value) { + if (typeof value === "number") + return value; + return Number(value); + } + mapToDriverValue = String; + getSQLType() { + return "numeric"; + } + }; + __name(SQLiteNumericNumber, "SQLiteNumericNumber"); + _a69 = entityKind; + __publicField(SQLiteNumericNumber, _a69, "SQLiteNumericNumber"); + SQLiteNumericBigIntBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "bigint", "SQLiteNumericBigInt"); + } + /** @internal */ + build(table3) { + return new SQLiteNumericBigInt( + table3, + this.config + ); + } + }; + __name(SQLiteNumericBigIntBuilder, "SQLiteNumericBigIntBuilder"); + _a70 = entityKind; + __publicField(SQLiteNumericBigIntBuilder, _a70, "SQLiteNumericBigIntBuilder"); + SQLiteNumericBigInt = class extends SQLiteColumn { + mapFromDriverValue = BigInt; + mapToDriverValue = String; + getSQLType() { + return "numeric"; + } + }; + __name(SQLiteNumericBigInt, "SQLiteNumericBigInt"); + _a71 = entityKind; + __publicField(SQLiteNumericBigInt, _a71, "SQLiteNumericBigInt"); + __name(numeric, "numeric"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/real.js +function real(name) { + return new SQLiteRealBuilder(name ?? ""); +} +var _a72, SQLiteRealBuilder, _a73, SQLiteReal; +var init_real = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/real.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_common2(); + SQLiteRealBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "number", "SQLiteReal"); + } + /** @internal */ + build(table3) { + return new SQLiteReal(table3, this.config); + } + }; + __name(SQLiteRealBuilder, "SQLiteRealBuilder"); + _a72 = entityKind; + __publicField(SQLiteRealBuilder, _a72, "SQLiteRealBuilder"); + SQLiteReal = class extends SQLiteColumn { + getSQLType() { + return "real"; + } + }; + __name(SQLiteReal, "SQLiteReal"); + _a73 = entityKind; + __publicField(SQLiteReal, _a73, "SQLiteReal"); + __name(real, "real"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/text.js +function text(a2, b2 = {}) { + const { name, config: config3 } = getColumnNameAndConfig(a2, b2); + if (config3.mode === "json") { + return new SQLiteTextJsonBuilder(name); + } + return new SQLiteTextBuilder(name, config3); +} +var _a74, SQLiteTextBuilder, _a75, SQLiteText, _a76, SQLiteTextJsonBuilder, _a77, SQLiteTextJson; +var init_text = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/text.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_utils2(); + init_common2(); + SQLiteTextBuilder = class extends SQLiteColumnBuilder { + constructor(name, config3) { + super(name, "string", "SQLiteText"); + this.config.enumValues = config3.enum; + this.config.length = config3.length; + } + /** @internal */ + build(table3) { + return new SQLiteText( + table3, + this.config + ); + } + }; + __name(SQLiteTextBuilder, "SQLiteTextBuilder"); + _a74 = entityKind; + __publicField(SQLiteTextBuilder, _a74, "SQLiteTextBuilder"); + SQLiteText = class extends SQLiteColumn { + enumValues = this.config.enumValues; + length = this.config.length; + constructor(table3, config3) { + super(table3, config3); + } + getSQLType() { + return `text${this.config.length ? `(${this.config.length})` : ""}`; + } + }; + __name(SQLiteText, "SQLiteText"); + _a75 = entityKind; + __publicField(SQLiteText, _a75, "SQLiteText"); + SQLiteTextJsonBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "json", "SQLiteTextJson"); + } + /** @internal */ + build(table3) { + return new SQLiteTextJson( + table3, + this.config + ); + } + }; + __name(SQLiteTextJsonBuilder, "SQLiteTextJsonBuilder"); + _a76 = entityKind; + __publicField(SQLiteTextJsonBuilder, _a76, "SQLiteTextJsonBuilder"); + SQLiteTextJson = class extends SQLiteColumn { + getSQLType() { + return "text"; + } + mapFromDriverValue(value) { + return JSON.parse(value); + } + mapToDriverValue(value) { + return JSON.stringify(value); + } + }; + __name(SQLiteTextJson, "SQLiteTextJson"); + _a77 = entityKind; + __publicField(SQLiteTextJson, _a77, "SQLiteTextJson"); + __name(text, "text"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/all.js +function getSQLiteColumnBuilders() { + return { + blob, + customType, + integer, + numeric, + real, + text + }; +} +var init_all = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/all.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_blob(); + init_custom(); + init_integer(); + init_numeric(); + init_real(); + init_text(); + __name(getSQLiteColumnBuilders, "getSQLiteColumnBuilders"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/table.js +function sqliteTableBase(name, columns, extraConfig, schema, baseName = name) { + const rawTable = new SQLiteTable(name, schema, baseName); + const parsedColumns = typeof columns === "function" ? columns(getSQLiteColumnBuilders()) : columns; + const builtColumns = Object.fromEntries( + Object.entries(parsedColumns).map(([name2, colBuilderBase]) => { + const colBuilder = colBuilderBase; + colBuilder.setName(name2); + const column = colBuilder.build(rawTable); + rawTable[InlineForeignKeys2].push(...colBuilder.buildForeignKeys(column, rawTable)); + return [name2, column]; + }) + ); + const table3 = Object.assign(rawTable, builtColumns); + table3[Table.Symbol.Columns] = builtColumns; + table3[Table.Symbol.ExtraConfigColumns] = builtColumns; + if (extraConfig) { + table3[SQLiteTable.Symbol.ExtraConfigBuilder] = extraConfig; + } + return table3; +} +var InlineForeignKeys2, _a78, SQLiteTable, sqliteTable; +var init_table3 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/table.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table(); + init_all(); + InlineForeignKeys2 = Symbol.for("drizzle:SQLiteInlineForeignKeys"); + SQLiteTable = class extends Table { + /** @internal */ + [(_a78 = entityKind, Table.Symbol.Columns)]; + /** @internal */ + [InlineForeignKeys2] = []; + /** @internal */ + [Table.Symbol.ExtraConfigBuilder] = void 0; + }; + __name(SQLiteTable, "SQLiteTable"); + __publicField(SQLiteTable, _a78, "SQLiteTable"); + /** @internal */ + __publicField(SQLiteTable, "Symbol", Object.assign({}, Table.Symbol, { + InlineForeignKeys: InlineForeignKeys2 + })); + __name(sqliteTableBase, "sqliteTableBase"); + sqliteTable = /* @__PURE__ */ __name((name, columns, extraConfig) => { + return sqliteTableBase(name, columns, extraConfig); + }, "sqliteTable"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/checks.js +function check(name, value) { + return new CheckBuilder(name, value); +} +var _a79, CheckBuilder, _a80, Check; +var init_checks = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/checks.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + CheckBuilder = class { + constructor(name, value) { + this.name = name; + this.value = value; + } + brand; + build(table3) { + return new Check(table3, this); + } + }; + __name(CheckBuilder, "CheckBuilder"); + _a79 = entityKind; + __publicField(CheckBuilder, _a79, "SQLiteCheckBuilder"); + Check = class { + constructor(table3, builder) { + this.table = table3; + this.name = builder.name; + this.value = builder.value; + } + name; + value; + }; + __name(Check, "Check"); + _a80 = entityKind; + __publicField(Check, _a80, "SQLiteCheck"); + __name(check, "check"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/indexes.js +function uniqueIndex(name) { + return new IndexBuilderOn(name, true); +} +var _a81, IndexBuilderOn, _a82, IndexBuilder, _a83, Index; +var init_indexes = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/indexes.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + IndexBuilderOn = class { + constructor(name, unique) { + this.name = name; + this.unique = unique; + } + on(...columns) { + return new IndexBuilder(this.name, columns, this.unique); + } + }; + __name(IndexBuilderOn, "IndexBuilderOn"); + _a81 = entityKind; + __publicField(IndexBuilderOn, _a81, "SQLiteIndexBuilderOn"); + IndexBuilder = class { + /** @internal */ + config; + constructor(name, columns, unique) { + this.config = { + name, + columns, + unique, + where: void 0 + }; + } + /** + * Condition for partial index. + */ + where(condition) { + this.config.where = condition; + return this; + } + /** @internal */ + build(table3) { + return new Index(this.config, table3); + } + }; + __name(IndexBuilder, "IndexBuilder"); + _a82 = entityKind; + __publicField(IndexBuilder, _a82, "SQLiteIndexBuilder"); + Index = class { + config; + constructor(config3, table3) { + this.config = { ...config3, table: table3 }; + } + }; + __name(Index, "Index"); + _a83 = entityKind; + __publicField(Index, _a83, "SQLiteIndex"); + __name(uniqueIndex, "uniqueIndex"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/primary-keys.js +function primaryKey(...config3) { + if (config3[0].columns) { + return new PrimaryKeyBuilder2(config3[0].columns, config3[0].name); + } + return new PrimaryKeyBuilder2(config3); +} +var _a84, PrimaryKeyBuilder2, _a85, PrimaryKey2; +var init_primary_keys2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/primary-keys.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table3(); + __name(primaryKey, "primaryKey"); + PrimaryKeyBuilder2 = class { + /** @internal */ + columns; + /** @internal */ + name; + constructor(columns, name) { + this.columns = columns; + this.name = name; + } + /** @internal */ + build(table3) { + return new PrimaryKey2(table3, this.columns, this.name); + } + }; + __name(PrimaryKeyBuilder2, "PrimaryKeyBuilder"); + _a84 = entityKind; + __publicField(PrimaryKeyBuilder2, _a84, "SQLitePrimaryKeyBuilder"); + PrimaryKey2 = class { + constructor(table3, columns, name) { + this.table = table3; + this.columns = columns; + this.name = name; + } + columns; + name; + getName() { + return this.name ?? `${this.table[SQLiteTable.Symbol.Name]}_${this.columns.map((column) => column.name).join("_")}_pk`; + } + }; + __name(PrimaryKey2, "PrimaryKey"); + _a85 = entityKind; + __publicField(PrimaryKey2, _a85, "SQLitePrimaryKey"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/utils.js +function extractUsedTable(table3) { + if (is(table3, SQLiteTable)) { + return [`${table3[Table.Symbol.BaseName]}`]; + } + if (is(table3, Subquery)) { + return table3._.usedTables ?? []; + } + if (is(table3, SQL)) { + return table3.usedTables ?? []; + } + return []; +} +var init_utils3 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_sql(); + init_subquery(); + init_table(); + init_table3(); + __name(extractUsedTable, "extractUsedTable"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/delete.js +var _a86, SQLiteDeleteBase; +var init_delete = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/delete.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + init_selection_proxy(); + init_table3(); + init_table(); + init_utils2(); + init_utils3(); + SQLiteDeleteBase = class extends QueryPromise { + constructor(table3, session, dialect, withList) { + super(); + this.table = table3; + this.session = session; + this.dialect = dialect; + this.config = { table: table3, withList }; + } + /** @internal */ + config; + /** + * Adds a `where` clause to the query. + * + * Calling this method will delete only those rows that fulfill a specified condition. + * + * See docs: {@link https://orm.drizzle.team/docs/delete} + * + * @param where the `where` clause. + * + * @example + * You can use conditional operators and `sql function` to filter the rows to be deleted. + * + * ```ts + * // Delete all cars with green color + * db.delete(cars).where(eq(cars.color, 'green')); + * // or + * db.delete(cars).where(sql`${cars.color} = 'green'`) + * ``` + * + * You can logically combine conditional operators with `and()` and `or()` operators: + * + * ```ts + * // Delete all BMW cars with a green color + * db.delete(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW'))); + * + * // Delete all cars with the green or blue color + * db.delete(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue'))); + * ``` + */ + where(where) { + this.config.where = where; + return this; + } + orderBy(...columns) { + if (typeof columns[0] === "function") { + const orderBy = columns[0]( + new Proxy( + this.config.table[Table.Symbol.Columns], + new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" }) + ) + ); + const orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy]; + this.config.orderBy = orderByArray; + } else { + const orderByArray = columns; + this.config.orderBy = orderByArray; + } + return this; + } + limit(limit) { + this.config.limit = limit; + return this; + } + returning(fields = this.table[SQLiteTable.Symbol.Columns]) { + this.config.returning = orderSelectedFields(fields); + return this; + } + /** @internal */ + getSQL() { + return this.dialect.buildDeleteQuery(this.config); + } + toSQL() { + const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL()); + return rest; + } + /** @internal */ + _prepare(isOneTimeQuery = true) { + return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + this.dialect.sqlToQuery(this.getSQL()), + this.config.returning, + this.config.returning ? "all" : "run", + true, + void 0, + { + type: "delete", + tables: extractUsedTable(this.config.table) + } + ); + } + prepare() { + return this._prepare(false); + } + run = (placeholderValues) => { + return this._prepare().run(placeholderValues); + }; + all = (placeholderValues) => { + return this._prepare().all(placeholderValues); + }; + get = (placeholderValues) => { + return this._prepare().get(placeholderValues); + }; + values = (placeholderValues) => { + return this._prepare().values(placeholderValues); + }; + async execute(placeholderValues) { + return this._prepare().execute(placeholderValues); + } + $dynamic() { + return this; + } + }; + __name(SQLiteDeleteBase, "SQLiteDeleteBase"); + _a86 = entityKind; + __publicField(SQLiteDeleteBase, _a86, "SQLiteDelete"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/casing.js +function toSnakeCase(input) { + const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? []; + return words.map((word) => word.toLowerCase()).join("_"); +} +function toCamelCase(input) { + const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? []; + return words.reduce((acc, word, i2) => { + const formattedWord = i2 === 0 ? word.toLowerCase() : `${word[0].toUpperCase()}${word.slice(1)}`; + return acc + formattedWord; + }, ""); +} +function noopCase(input) { + return input; +} +var _a87, CasingCache; +var init_casing = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/casing.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table(); + __name(toSnakeCase, "toSnakeCase"); + __name(toCamelCase, "toCamelCase"); + __name(noopCase, "noopCase"); + CasingCache = class { + /** @internal */ + cache = {}; + cachedTables = {}; + convert; + constructor(casing) { + this.convert = casing === "snake_case" ? toSnakeCase : casing === "camelCase" ? toCamelCase : noopCase; + } + getColumnCasing(column) { + if (!column.keyAsName) + return column.name; + const schema = column.table[Table.Symbol.Schema] ?? "public"; + const tableName = column.table[Table.Symbol.OriginalName]; + const key = `${schema}.${tableName}.${column.name}`; + if (!this.cache[key]) { + this.cacheTable(column.table); + } + return this.cache[key]; + } + cacheTable(table3) { + const schema = table3[Table.Symbol.Schema] ?? "public"; + const tableName = table3[Table.Symbol.OriginalName]; + const tableKey = `${schema}.${tableName}`; + if (!this.cachedTables[tableKey]) { + for (const column of Object.values(table3[Table.Symbol.Columns])) { + const columnKey = `${tableKey}.${column.name}`; + this.cache[columnKey] = this.convert(column.name); + } + this.cachedTables[tableKey] = true; + } + } + clearCache() { + this.cache = {}; + this.cachedTables = {}; + } + }; + __name(CasingCache, "CasingCache"); + _a87 = entityKind; + __publicField(CasingCache, _a87, "CasingCache"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/errors.js +var _a88, DrizzleError, DrizzleQueryError, _a89, TransactionRollbackError; +var init_errors = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/errors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + DrizzleError = class extends Error { + constructor({ message: message2, cause }) { + super(message2); + this.name = "DrizzleError"; + this.cause = cause; + } + }; + __name(DrizzleError, "DrizzleError"); + _a88 = entityKind; + __publicField(DrizzleError, _a88, "DrizzleError"); + DrizzleQueryError = class extends Error { + constructor(query, params, cause) { + super(`Failed query: ${query} +params: ${params}`); + this.query = query; + this.params = params; + this.cause = cause; + Error.captureStackTrace(this, DrizzleQueryError); + if (cause) + this.cause = cause; + } + }; + __name(DrizzleQueryError, "DrizzleQueryError"); + TransactionRollbackError = class extends DrizzleError { + constructor() { + super({ message: "Rollback" }); + } + }; + __name(TransactionRollbackError, "TransactionRollbackError"); + _a89 = entityKind; + __publicField(TransactionRollbackError, _a89, "TransactionRollbackError"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/aggregate.js +function count3(expression) { + return sql`count(${expression || sql.raw("*")})`.mapWith(Number); +} +function max(expression) { + return sql`max(${expression})`.mapWith(is(expression, Column) ? expression : String); +} +var init_aggregate = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/aggregate.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column(); + init_entity(); + init_sql(); + __name(count3, "count"); + __name(max, "max"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/vector.js +var init_vector = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/vector.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/index.js +var init_functions = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_aggregate(); + init_vector(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/index.js +var init_sql2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_expressions(); + init_functions(); + init_sql(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/index.js +var init_columns = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_blob(); + init_common2(); + init_custom(); + init_integer(); + init_numeric(); + init_real(); + init_text(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/view-base.js +var _a90, SQLiteViewBase; +var init_view_base = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/view-base.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_sql(); + SQLiteViewBase = class extends View { + }; + __name(SQLiteViewBase, "SQLiteViewBase"); + _a90 = entityKind; + __publicField(SQLiteViewBase, _a90, "SQLiteViewBase"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/dialect.js +var _a91, SQLiteDialect, _a92, SQLiteSyncDialect, _a93, SQLiteAsyncDialect; +var init_dialect = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/dialect.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_alias(); + init_casing(); + init_column(); + init_entity(); + init_errors(); + init_relations(); + init_sql2(); + init_sql(); + init_columns(); + init_table3(); + init_subquery(); + init_table(); + init_utils2(); + init_view_common(); + init_view_base(); + SQLiteDialect = class { + /** @internal */ + casing; + constructor(config3) { + this.casing = new CasingCache(config3?.casing); + } + escapeName(name) { + return `"${name}"`; + } + escapeParam(_num) { + return "?"; + } + escapeString(str) { + return `'${str.replace(/'/g, "''")}'`; + } + buildWithCTE(queries) { + if (!queries?.length) + return void 0; + const withSqlChunks = [sql`with `]; + for (const [i2, w2] of queries.entries()) { + withSqlChunks.push(sql`${sql.identifier(w2._.alias)} as (${w2._.sql})`); + if (i2 < queries.length - 1) { + withSqlChunks.push(sql`, `); + } + } + withSqlChunks.push(sql` `); + return sql.join(withSqlChunks); + } + buildDeleteQuery({ table: table3, where, returning, withList, limit, orderBy }) { + const withSql = this.buildWithCTE(withList); + const returningSql = returning ? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}` : void 0; + const whereSql = where ? sql` where ${where}` : void 0; + const orderBySql = this.buildOrderBy(orderBy); + const limitSql = this.buildLimit(limit); + return sql`${withSql}delete from ${table3}${whereSql}${returningSql}${orderBySql}${limitSql}`; + } + buildUpdateSet(table3, set2) { + const tableColumns = table3[Table.Symbol.Columns]; + const columnNames = Object.keys(tableColumns).filter( + (colName) => set2[colName] !== void 0 || tableColumns[colName]?.onUpdateFn !== void 0 + ); + const setSize = columnNames.length; + return sql.join(columnNames.flatMap((colName, i2) => { + const col = tableColumns[colName]; + const value = set2[colName] ?? sql.param(col.onUpdateFn(), col); + const res = sql`${sql.identifier(this.casing.getColumnCasing(col))} = ${value}`; + if (i2 < setSize - 1) { + return [res, sql.raw(", ")]; + } + return [res]; + })); + } + buildUpdateQuery({ table: table3, set: set2, where, returning, withList, joins, from, limit, orderBy }) { + const withSql = this.buildWithCTE(withList); + const setSql = this.buildUpdateSet(table3, set2); + const fromSql = from && sql.join([sql.raw(" from "), this.buildFromTable(from)]); + const joinsSql = this.buildJoins(joins); + const returningSql = returning ? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}` : void 0; + const whereSql = where ? sql` where ${where}` : void 0; + const orderBySql = this.buildOrderBy(orderBy); + const limitSql = this.buildLimit(limit); + return sql`${withSql}update ${table3} set ${setSql}${fromSql}${joinsSql}${whereSql}${returningSql}${orderBySql}${limitSql}`; + } + /** + * Builds selection SQL with provided fields/expressions + * + * Examples: + * + * `select from` + * + * `insert ... returning ` + * + * If `isSingleTable` is true, then columns won't be prefixed with table name + */ + buildSelection(fields, { isSingleTable = false } = {}) { + const columnsLen = fields.length; + const chunks = fields.flatMap(({ field }, i2) => { + const chunk = []; + if (is(field, SQL.Aliased) && field.isSelectionField) { + chunk.push(sql.identifier(field.fieldAlias)); + } else if (is(field, SQL.Aliased) || is(field, SQL)) { + const query = is(field, SQL.Aliased) ? field.sql : field; + if (isSingleTable) { + chunk.push( + new SQL( + query.queryChunks.map((c2) => { + if (is(c2, Column)) { + return sql.identifier(this.casing.getColumnCasing(c2)); + } + return c2; + }) + ) + ); + } else { + chunk.push(query); + } + if (is(field, SQL.Aliased)) { + chunk.push(sql` as ${sql.identifier(field.fieldAlias)}`); + } + } else if (is(field, Column)) { + const tableName = field.table[Table.Symbol.Name]; + if (field.columnType === "SQLiteNumericBigInt") { + if (isSingleTable) { + chunk.push(sql`cast(${sql.identifier(this.casing.getColumnCasing(field))} as text)`); + } else { + chunk.push( + sql`cast(${sql.identifier(tableName)}.${sql.identifier(this.casing.getColumnCasing(field))} as text)` + ); + } + } else { + if (isSingleTable) { + chunk.push(sql.identifier(this.casing.getColumnCasing(field))); + } else { + chunk.push(sql`${sql.identifier(tableName)}.${sql.identifier(this.casing.getColumnCasing(field))}`); + } + } + } + if (i2 < columnsLen - 1) { + chunk.push(sql`, `); + } + return chunk; + }); + return sql.join(chunks); + } + buildJoins(joins) { + if (!joins || joins.length === 0) { + return void 0; + } + const joinsArray = []; + if (joins) { + for (const [index, joinMeta] of joins.entries()) { + if (index === 0) { + joinsArray.push(sql` `); + } + const table3 = joinMeta.table; + const onSql = joinMeta.on ? sql` on ${joinMeta.on}` : void 0; + if (is(table3, SQLiteTable)) { + const tableName = table3[SQLiteTable.Symbol.Name]; + const tableSchema = table3[SQLiteTable.Symbol.Schema]; + const origTableName = table3[SQLiteTable.Symbol.OriginalName]; + const alias = tableName === origTableName ? void 0 : joinMeta.alias; + joinsArray.push( + sql`${sql.raw(joinMeta.joinType)} join ${tableSchema ? sql`${sql.identifier(tableSchema)}.` : void 0}${sql.identifier(origTableName)}${alias && sql` ${sql.identifier(alias)}`}${onSql}` + ); + } else { + joinsArray.push( + sql`${sql.raw(joinMeta.joinType)} join ${table3}${onSql}` + ); + } + if (index < joins.length - 1) { + joinsArray.push(sql` `); + } + } + } + return sql.join(joinsArray); + } + buildLimit(limit) { + return typeof limit === "object" || typeof limit === "number" && limit >= 0 ? sql` limit ${limit}` : void 0; + } + buildOrderBy(orderBy) { + const orderByList = []; + if (orderBy) { + for (const [index, orderByValue] of orderBy.entries()) { + orderByList.push(orderByValue); + if (index < orderBy.length - 1) { + orderByList.push(sql`, `); + } + } + } + return orderByList.length > 0 ? sql` order by ${sql.join(orderByList)}` : void 0; + } + buildFromTable(table3) { + if (is(table3, Table) && table3[Table.Symbol.IsAlias]) { + return sql`${sql`${sql.identifier(table3[Table.Symbol.Schema] ?? "")}.`.if(table3[Table.Symbol.Schema])}${sql.identifier(table3[Table.Symbol.OriginalName])} ${sql.identifier(table3[Table.Symbol.Name])}`; + } + return table3; + } + buildSelectQuery({ + withList, + fields, + fieldsFlat, + where, + having, + table: table3, + joins, + orderBy, + groupBy, + limit, + offset, + distinct, + setOperators + }) { + const fieldsList = fieldsFlat ?? orderSelectedFields(fields); + for (const f2 of fieldsList) { + if (is(f2.field, Column) && getTableName(f2.field.table) !== (is(table3, Subquery) ? table3._.alias : is(table3, SQLiteViewBase) ? table3[ViewBaseConfig].name : is(table3, SQL) ? void 0 : getTableName(table3)) && !((table22) => joins?.some( + ({ alias }) => alias === (table22[Table.Symbol.IsAlias] ? getTableName(table22) : table22[Table.Symbol.BaseName]) + ))(f2.field.table)) { + const tableName = getTableName(f2.field.table); + throw new Error( + `Your "${f2.path.join("->")}" field references a column "${tableName}"."${f2.field.name}", but the table "${tableName}" is not part of the query! Did you forget to join it?` + ); + } + } + const isSingleTable = !joins || joins.length === 0; + const withSql = this.buildWithCTE(withList); + const distinctSql = distinct ? sql` distinct` : void 0; + const selection = this.buildSelection(fieldsList, { isSingleTable }); + const tableSql = this.buildFromTable(table3); + const joinsSql = this.buildJoins(joins); + const whereSql = where ? sql` where ${where}` : void 0; + const havingSql = having ? sql` having ${having}` : void 0; + const groupByList = []; + if (groupBy) { + for (const [index, groupByValue] of groupBy.entries()) { + groupByList.push(groupByValue); + if (index < groupBy.length - 1) { + groupByList.push(sql`, `); + } + } + } + const groupBySql = groupByList.length > 0 ? sql` group by ${sql.join(groupByList)}` : void 0; + const orderBySql = this.buildOrderBy(orderBy); + const limitSql = this.buildLimit(limit); + const offsetSql = offset ? sql` offset ${offset}` : void 0; + const finalQuery = sql`${withSql}select${distinctSql} ${selection} from ${tableSql}${joinsSql}${whereSql}${groupBySql}${havingSql}${orderBySql}${limitSql}${offsetSql}`; + if (setOperators.length > 0) { + return this.buildSetOperations(finalQuery, setOperators); + } + return finalQuery; + } + buildSetOperations(leftSelect, setOperators) { + const [setOperator, ...rest] = setOperators; + if (!setOperator) { + throw new Error("Cannot pass undefined values to any set operator"); + } + if (rest.length === 0) { + return this.buildSetOperationQuery({ leftSelect, setOperator }); + } + return this.buildSetOperations( + this.buildSetOperationQuery({ leftSelect, setOperator }), + rest + ); + } + buildSetOperationQuery({ + leftSelect, + setOperator: { type, isAll, rightSelect, limit, orderBy, offset } + }) { + const leftChunk = sql`${leftSelect.getSQL()} `; + const rightChunk = sql`${rightSelect.getSQL()}`; + let orderBySql; + if (orderBy && orderBy.length > 0) { + const orderByValues = []; + for (const singleOrderBy of orderBy) { + if (is(singleOrderBy, SQLiteColumn)) { + orderByValues.push(sql.identifier(singleOrderBy.name)); + } else if (is(singleOrderBy, SQL)) { + for (let i2 = 0; i2 < singleOrderBy.queryChunks.length; i2++) { + const chunk = singleOrderBy.queryChunks[i2]; + if (is(chunk, SQLiteColumn)) { + singleOrderBy.queryChunks[i2] = sql.identifier(this.casing.getColumnCasing(chunk)); + } + } + orderByValues.push(sql`${singleOrderBy}`); + } else { + orderByValues.push(sql`${singleOrderBy}`); + } + } + orderBySql = sql` order by ${sql.join(orderByValues, sql`, `)}`; + } + const limitSql = typeof limit === "object" || typeof limit === "number" && limit >= 0 ? sql` limit ${limit}` : void 0; + const operatorChunk = sql.raw(`${type} ${isAll ? "all " : ""}`); + const offsetSql = offset ? sql` offset ${offset}` : void 0; + return sql`${leftChunk}${operatorChunk}${rightChunk}${orderBySql}${limitSql}${offsetSql}`; + } + buildInsertQuery({ table: table3, values: valuesOrSelect, onConflict, returning, withList, select }) { + const valuesSqlList = []; + const columns = table3[Table.Symbol.Columns]; + const colEntries = Object.entries(columns).filter( + ([_, col]) => !col.shouldDisableInsert() + ); + const insertOrder = colEntries.map(([, column]) => sql.identifier(this.casing.getColumnCasing(column))); + if (select) { + const select2 = valuesOrSelect; + if (is(select2, SQL)) { + valuesSqlList.push(select2); + } else { + valuesSqlList.push(select2.getSQL()); + } + } else { + const values = valuesOrSelect; + valuesSqlList.push(sql.raw("values ")); + for (const [valueIndex, value] of values.entries()) { + const valueList = []; + for (const [fieldName, col] of colEntries) { + const colValue = value[fieldName]; + if (colValue === void 0 || is(colValue, Param) && colValue.value === void 0) { + let defaultValue; + if (col.default !== null && col.default !== void 0) { + defaultValue = is(col.default, SQL) ? col.default : sql.param(col.default, col); + } else if (col.defaultFn !== void 0) { + const defaultFnResult = col.defaultFn(); + defaultValue = is(defaultFnResult, SQL) ? defaultFnResult : sql.param(defaultFnResult, col); + } else if (!col.default && col.onUpdateFn !== void 0) { + const onUpdateFnResult = col.onUpdateFn(); + defaultValue = is(onUpdateFnResult, SQL) ? onUpdateFnResult : sql.param(onUpdateFnResult, col); + } else { + defaultValue = sql`null`; + } + valueList.push(defaultValue); + } else { + valueList.push(colValue); + } + } + valuesSqlList.push(valueList); + if (valueIndex < values.length - 1) { + valuesSqlList.push(sql`, `); + } + } + } + const withSql = this.buildWithCTE(withList); + const valuesSql = sql.join(valuesSqlList); + const returningSql = returning ? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}` : void 0; + const onConflictSql = onConflict?.length ? sql.join(onConflict) : void 0; + return sql`${withSql}insert into ${table3} ${insertOrder} ${valuesSql}${onConflictSql}${returningSql}`; + } + sqlToQuery(sql2, invokeSource) { + return sql2.toQuery({ + casing: this.casing, + escapeName: this.escapeName, + escapeParam: this.escapeParam, + escapeString: this.escapeString, + invokeSource + }); + } + buildRelationalQuery({ + fullSchema, + schema, + tableNamesMap, + table: table3, + tableConfig, + queryConfig: config3, + tableAlias, + nestedQueryRelation, + joinOn + }) { + let selection = []; + let limit, offset, orderBy = [], where; + const joins = []; + if (config3 === true) { + const selectionEntries = Object.entries(tableConfig.columns); + selection = selectionEntries.map(([key, value]) => ({ + dbKey: value.name, + tsKey: key, + field: aliasedTableColumn(value, tableAlias), + relationTableTsKey: void 0, + isJson: false, + selection: [] + })); + } else { + const aliasedColumns = Object.fromEntries( + Object.entries(tableConfig.columns).map(([key, value]) => [key, aliasedTableColumn(value, tableAlias)]) + ); + if (config3.where) { + const whereSql = typeof config3.where === "function" ? config3.where(aliasedColumns, getOperators()) : config3.where; + where = whereSql && mapColumnsInSQLToAlias(whereSql, tableAlias); + } + const fieldsSelection = []; + let selectedColumns = []; + if (config3.columns) { + let isIncludeMode = false; + for (const [field, value] of Object.entries(config3.columns)) { + if (value === void 0) { + continue; + } + if (field in tableConfig.columns) { + if (!isIncludeMode && value === true) { + isIncludeMode = true; + } + selectedColumns.push(field); + } + } + if (selectedColumns.length > 0) { + selectedColumns = isIncludeMode ? selectedColumns.filter((c2) => config3.columns?.[c2] === true) : Object.keys(tableConfig.columns).filter((key) => !selectedColumns.includes(key)); + } + } else { + selectedColumns = Object.keys(tableConfig.columns); + } + for (const field of selectedColumns) { + const column = tableConfig.columns[field]; + fieldsSelection.push({ tsKey: field, value: column }); + } + let selectedRelations = []; + if (config3.with) { + selectedRelations = Object.entries(config3.with).filter((entry) => !!entry[1]).map(([tsKey, queryConfig]) => ({ tsKey, queryConfig, relation: tableConfig.relations[tsKey] })); + } + let extras; + if (config3.extras) { + extras = typeof config3.extras === "function" ? config3.extras(aliasedColumns, { sql }) : config3.extras; + for (const [tsKey, value] of Object.entries(extras)) { + fieldsSelection.push({ + tsKey, + value: mapColumnsInAliasedSQLToAlias(value, tableAlias) + }); + } + } + for (const { tsKey, value } of fieldsSelection) { + selection.push({ + dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name, + tsKey, + field: is(value, Column) ? aliasedTableColumn(value, tableAlias) : value, + relationTableTsKey: void 0, + isJson: false, + selection: [] + }); + } + let orderByOrig = typeof config3.orderBy === "function" ? config3.orderBy(aliasedColumns, getOrderByOperators()) : config3.orderBy ?? []; + if (!Array.isArray(orderByOrig)) { + orderByOrig = [orderByOrig]; + } + orderBy = orderByOrig.map((orderByValue) => { + if (is(orderByValue, Column)) { + return aliasedTableColumn(orderByValue, tableAlias); + } + return mapColumnsInSQLToAlias(orderByValue, tableAlias); + }); + limit = config3.limit; + offset = config3.offset; + for (const { + tsKey: selectedRelationTsKey, + queryConfig: selectedRelationConfigValue, + relation + } of selectedRelations) { + const normalizedRelation = normalizeRelation(schema, tableNamesMap, relation); + const relationTableName = getTableUniqueName(relation.referencedTable); + const relationTableTsName = tableNamesMap[relationTableName]; + const relationTableAlias = `${tableAlias}_${selectedRelationTsKey}`; + const joinOn2 = and( + ...normalizedRelation.fields.map( + (field2, i2) => eq( + aliasedTableColumn(normalizedRelation.references[i2], relationTableAlias), + aliasedTableColumn(field2, tableAlias) + ) + ) + ); + const builtRelation = this.buildRelationalQuery({ + fullSchema, + schema, + tableNamesMap, + table: fullSchema[relationTableTsName], + tableConfig: schema[relationTableTsName], + queryConfig: is(relation, One) ? selectedRelationConfigValue === true ? { limit: 1 } : { ...selectedRelationConfigValue, limit: 1 } : selectedRelationConfigValue, + tableAlias: relationTableAlias, + joinOn: joinOn2, + nestedQueryRelation: relation + }); + const field = sql`(${builtRelation.sql})`.as(selectedRelationTsKey); + selection.push({ + dbKey: selectedRelationTsKey, + tsKey: selectedRelationTsKey, + field, + relationTableTsKey: relationTableTsName, + isJson: true, + selection: builtRelation.selection + }); + } + } + if (selection.length === 0) { + throw new DrizzleError({ + message: `No fields selected for table "${tableConfig.tsName}" ("${tableAlias}"). You need to have at least one item in "columns", "with" or "extras". If you need to select all columns, omit the "columns" key or set it to undefined.` + }); + } + let result; + where = and(joinOn, where); + if (nestedQueryRelation) { + let field = sql`json_array(${sql.join( + selection.map( + ({ field: field2 }) => is(field2, SQLiteColumn) ? sql.identifier(this.casing.getColumnCasing(field2)) : is(field2, SQL.Aliased) ? field2.sql : field2 + ), + sql`, ` + )})`; + if (is(nestedQueryRelation, Many)) { + field = sql`coalesce(json_group_array(${field}), json_array())`; + } + const nestedSelection = [{ + dbKey: "data", + tsKey: "data", + field: field.as("data"), + isJson: true, + relationTableTsKey: tableConfig.tsName, + selection + }]; + const needsSubquery = limit !== void 0 || offset !== void 0 || orderBy.length > 0; + if (needsSubquery) { + result = this.buildSelectQuery({ + table: aliasedTable(table3, tableAlias), + fields: {}, + fieldsFlat: [ + { + path: [], + field: sql.raw("*") + } + ], + where, + limit, + offset, + orderBy, + setOperators: [] + }); + where = void 0; + limit = void 0; + offset = void 0; + orderBy = void 0; + } else { + result = aliasedTable(table3, tableAlias); + } + result = this.buildSelectQuery({ + table: is(result, SQLiteTable) ? result : new Subquery(result, {}, tableAlias), + fields: {}, + fieldsFlat: nestedSelection.map(({ field: field2 }) => ({ + path: [], + field: is(field2, Column) ? aliasedTableColumn(field2, tableAlias) : field2 + })), + joins, + where, + limit, + offset, + orderBy, + setOperators: [] + }); + } else { + result = this.buildSelectQuery({ + table: aliasedTable(table3, tableAlias), + fields: {}, + fieldsFlat: selection.map(({ field }) => ({ + path: [], + field: is(field, Column) ? aliasedTableColumn(field, tableAlias) : field + })), + joins, + where, + limit, + offset, + orderBy, + setOperators: [] + }); + } + return { + tableTsKey: tableConfig.tsName, + sql: result, + selection + }; + } + }; + __name(SQLiteDialect, "SQLiteDialect"); + _a91 = entityKind; + __publicField(SQLiteDialect, _a91, "SQLiteDialect"); + SQLiteSyncDialect = class extends SQLiteDialect { + migrate(migrations, session, config3) { + const migrationsTable = config3 === void 0 ? "__drizzle_migrations" : typeof config3 === "string" ? "__drizzle_migrations" : config3.migrationsTable ?? "__drizzle_migrations"; + const migrationTableCreate = sql` + CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} ( + id SERIAL PRIMARY KEY, + hash text NOT NULL, + created_at numeric + ) + `; + session.run(migrationTableCreate); + const dbMigrations = session.values( + sql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1` + ); + const lastDbMigration = dbMigrations[0] ?? void 0; + session.run(sql`BEGIN`); + try { + for (const migration of migrations) { + if (!lastDbMigration || Number(lastDbMigration[2]) < migration.folderMillis) { + for (const stmt of migration.sql) { + session.run(sql.raw(stmt)); + } + session.run( + sql`INSERT INTO ${sql.identifier(migrationsTable)} ("hash", "created_at") VALUES(${migration.hash}, ${migration.folderMillis})` + ); + } + } + session.run(sql`COMMIT`); + } catch (e2) { + session.run(sql`ROLLBACK`); + throw e2; + } + } + }; + __name(SQLiteSyncDialect, "SQLiteSyncDialect"); + _a92 = entityKind; + __publicField(SQLiteSyncDialect, _a92, "SQLiteSyncDialect"); + SQLiteAsyncDialect = class extends SQLiteDialect { + async migrate(migrations, session, config3) { + const migrationsTable = config3 === void 0 ? "__drizzle_migrations" : typeof config3 === "string" ? "__drizzle_migrations" : config3.migrationsTable ?? "__drizzle_migrations"; + const migrationTableCreate = sql` + CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} ( + id SERIAL PRIMARY KEY, + hash text NOT NULL, + created_at numeric + ) + `; + await session.run(migrationTableCreate); + const dbMigrations = await session.values( + sql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1` + ); + const lastDbMigration = dbMigrations[0] ?? void 0; + await session.transaction(async (tx) => { + for (const migration of migrations) { + if (!lastDbMigration || Number(lastDbMigration[2]) < migration.folderMillis) { + for (const stmt of migration.sql) { + await tx.run(sql.raw(stmt)); + } + await tx.run( + sql`INSERT INTO ${sql.identifier(migrationsTable)} ("hash", "created_at") VALUES(${migration.hash}, ${migration.folderMillis})` + ); + } + } + }); + } + }; + __name(SQLiteAsyncDialect, "SQLiteAsyncDialect"); + _a93 = entityKind; + __publicField(SQLiteAsyncDialect, _a93, "SQLiteAsyncDialect"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/query-builders/query-builder.js +var _a94, TypedQueryBuilder; +var init_query_builder = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/query-builders/query-builder.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + TypedQueryBuilder = class { + /** @internal */ + getSelectedFields() { + return this._.selectedFields; + } + }; + __name(TypedQueryBuilder, "TypedQueryBuilder"); + _a94 = entityKind; + __publicField(TypedQueryBuilder, _a94, "TypedQueryBuilder"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.js +function createSetOperator(type, isAll) { + return (leftSelect, rightSelect, ...restSelects) => { + const setOperators = [rightSelect, ...restSelects].map((select) => ({ + type, + isAll, + rightSelect: select + })); + for (const setOperator of setOperators) { + if (!haveSameKeys(leftSelect.getSelectedFields(), setOperator.rightSelect.getSelectedFields())) { + throw new Error( + "Set operator error (union / intersect / except): selected fields are not the same or are in a different order" + ); + } + } + return leftSelect.addSetOperators(setOperators); + }; +} +var _a95, SQLiteSelectBuilder, _a96, SQLiteSelectQueryBuilderBase, _a97, SQLiteSelectBase, getSQLiteSetOperators, union, unionAll, intersect, except; +var init_select2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_builder(); + init_query_promise(); + init_selection_proxy(); + init_sql(); + init_subquery(); + init_table(); + init_utils2(); + init_view_common(); + init_utils3(); + init_view_base(); + SQLiteSelectBuilder = class { + fields; + session; + dialect; + withList; + distinct; + constructor(config3) { + this.fields = config3.fields; + this.session = config3.session; + this.dialect = config3.dialect; + this.withList = config3.withList; + this.distinct = config3.distinct; + } + from(source) { + const isPartialSelect = !!this.fields; + let fields; + if (this.fields) { + fields = this.fields; + } else if (is(source, Subquery)) { + fields = Object.fromEntries( + Object.keys(source._.selectedFields).map((key) => [key, source[key]]) + ); + } else if (is(source, SQLiteViewBase)) { + fields = source[ViewBaseConfig].selectedFields; + } else if (is(source, SQL)) { + fields = {}; + } else { + fields = getTableColumns(source); + } + return new SQLiteSelectBase({ + table: source, + fields, + isPartialSelect, + session: this.session, + dialect: this.dialect, + withList: this.withList, + distinct: this.distinct + }); + } + }; + __name(SQLiteSelectBuilder, "SQLiteSelectBuilder"); + _a95 = entityKind; + __publicField(SQLiteSelectBuilder, _a95, "SQLiteSelectBuilder"); + SQLiteSelectQueryBuilderBase = class extends TypedQueryBuilder { + _; + /** @internal */ + config; + joinsNotNullableMap; + tableName; + isPartialSelect; + session; + dialect; + cacheConfig = void 0; + usedTables = /* @__PURE__ */ new Set(); + constructor({ table: table3, fields, isPartialSelect, session, dialect, withList, distinct }) { + super(); + this.config = { + withList, + table: table3, + fields: { ...fields }, + distinct, + setOperators: [] + }; + this.isPartialSelect = isPartialSelect; + this.session = session; + this.dialect = dialect; + this._ = { + selectedFields: fields, + config: this.config + }; + this.tableName = getTableLikeName(table3); + this.joinsNotNullableMap = typeof this.tableName === "string" ? { [this.tableName]: true } : {}; + for (const item of extractUsedTable(table3)) + this.usedTables.add(item); + } + /** @internal */ + getUsedTables() { + return [...this.usedTables]; + } + createJoin(joinType) { + return (table3, on2) => { + const baseTableName = this.tableName; + const tableName = getTableLikeName(table3); + for (const item of extractUsedTable(table3)) + this.usedTables.add(item); + if (typeof tableName === "string" && this.config.joins?.some((join) => join.alias === tableName)) { + throw new Error(`Alias "${tableName}" is already used in this query`); + } + if (!this.isPartialSelect) { + if (Object.keys(this.joinsNotNullableMap).length === 1 && typeof baseTableName === "string") { + this.config.fields = { + [baseTableName]: this.config.fields + }; + } + if (typeof tableName === "string" && !is(table3, SQL)) { + const selection = is(table3, Subquery) ? table3._.selectedFields : is(table3, View) ? table3[ViewBaseConfig].selectedFields : table3[Table.Symbol.Columns]; + this.config.fields[tableName] = selection; + } + } + if (typeof on2 === "function") { + on2 = on2( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ) + ); + } + if (!this.config.joins) { + this.config.joins = []; + } + this.config.joins.push({ on: on2, table: table3, joinType, alias: tableName }); + if (typeof tableName === "string") { + switch (joinType) { + case "left": { + this.joinsNotNullableMap[tableName] = false; + break; + } + case "right": { + this.joinsNotNullableMap = Object.fromEntries( + Object.entries(this.joinsNotNullableMap).map(([key]) => [key, false]) + ); + this.joinsNotNullableMap[tableName] = true; + break; + } + case "cross": + case "inner": { + this.joinsNotNullableMap[tableName] = true; + break; + } + case "full": { + this.joinsNotNullableMap = Object.fromEntries( + Object.entries(this.joinsNotNullableMap).map(([key]) => [key, false]) + ); + this.joinsNotNullableMap[tableName] = false; + break; + } + } + } + return this; + }; + } + /** + * Executes a `left join` operation by adding another table to the current query. + * + * Calling this method associates each row of the table with the corresponding row from the joined table, if a match is found. If no matching row exists, it sets all columns of the joined table to null. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#left-join} + * + * @param table the table to join. + * @param on the `on` clause. + * + * @example + * + * ```ts + * // Select all users and their pets + * const usersWithPets: { user: User; pets: Pet | null; }[] = await db.select() + * .from(users) + * .leftJoin(pets, eq(users.id, pets.ownerId)) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number; petId: number | null; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .leftJoin(pets, eq(users.id, pets.ownerId)) + * ``` + */ + leftJoin = this.createJoin("left"); + /** + * Executes a `right join` operation by adding another table to the current query. + * + * Calling this method associates each row of the joined table with the corresponding row from the main table, if a match is found. If no matching row exists, it sets all columns of the main table to null. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#right-join} + * + * @param table the table to join. + * @param on the `on` clause. + * + * @example + * + * ```ts + * // Select all users and their pets + * const usersWithPets: { user: User | null; pets: Pet; }[] = await db.select() + * .from(users) + * .rightJoin(pets, eq(users.id, pets.ownerId)) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number | null; petId: number; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .rightJoin(pets, eq(users.id, pets.ownerId)) + * ``` + */ + rightJoin = this.createJoin("right"); + /** + * Executes an `inner join` operation, creating a new table by combining rows from two tables that have matching values. + * + * Calling this method retrieves rows that have corresponding entries in both joined tables. Rows without matching entries in either table are excluded, resulting in a table that includes only matching pairs. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#inner-join} + * + * @param table the table to join. + * @param on the `on` clause. + * + * @example + * + * ```ts + * // Select all users and their pets + * const usersWithPets: { user: User; pets: Pet; }[] = await db.select() + * .from(users) + * .innerJoin(pets, eq(users.id, pets.ownerId)) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number; petId: number; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .innerJoin(pets, eq(users.id, pets.ownerId)) + * ``` + */ + innerJoin = this.createJoin("inner"); + /** + * Executes a `full join` operation by combining rows from two tables into a new table. + * + * Calling this method retrieves all rows from both main and joined tables, merging rows with matching values and filling in `null` for non-matching columns. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#full-join} + * + * @param table the table to join. + * @param on the `on` clause. + * + * @example + * + * ```ts + * // Select all users and their pets + * const usersWithPets: { user: User | null; pets: Pet | null; }[] = await db.select() + * .from(users) + * .fullJoin(pets, eq(users.id, pets.ownerId)) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number | null; petId: number | null; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .fullJoin(pets, eq(users.id, pets.ownerId)) + * ``` + */ + fullJoin = this.createJoin("full"); + /** + * Executes a `cross join` operation by combining rows from two tables into a new table. + * + * Calling this method retrieves all rows from both main and joined tables, merging all rows from each table. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#cross-join} + * + * @param table the table to join. + * + * @example + * + * ```ts + * // Select all users, each user with every pet + * const usersWithPets: { user: User; pets: Pet; }[] = await db.select() + * .from(users) + * .crossJoin(pets) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number; petId: number; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .crossJoin(pets) + * ``` + */ + crossJoin = this.createJoin("cross"); + createSetOperator(type, isAll) { + return (rightSelection) => { + const rightSelect = typeof rightSelection === "function" ? rightSelection(getSQLiteSetOperators()) : rightSelection; + if (!haveSameKeys(this.getSelectedFields(), rightSelect.getSelectedFields())) { + throw new Error( + "Set operator error (union / intersect / except): selected fields are not the same or are in a different order" + ); + } + this.config.setOperators.push({ type, isAll, rightSelect }); + return this; + }; + } + /** + * Adds `union` set operator to the query. + * + * Calling this method will combine the result sets of the `select` statements and remove any duplicate rows that appear across them. + * + * See docs: {@link https://orm.drizzle.team/docs/set-operations#union} + * + * @example + * + * ```ts + * // Select all unique names from customers and users tables + * await db.select({ name: users.name }) + * .from(users) + * .union( + * db.select({ name: customers.name }).from(customers) + * ); + * // or + * import { union } from 'drizzle-orm/sqlite-core' + * + * await union( + * db.select({ name: users.name }).from(users), + * db.select({ name: customers.name }).from(customers) + * ); + * ``` + */ + union = this.createSetOperator("union", false); + /** + * Adds `union all` set operator to the query. + * + * Calling this method will combine the result-set of the `select` statements and keep all duplicate rows that appear across them. + * + * See docs: {@link https://orm.drizzle.team/docs/set-operations#union-all} + * + * @example + * + * ```ts + * // Select all transaction ids from both online and in-store sales + * await db.select({ transaction: onlineSales.transactionId }) + * .from(onlineSales) + * .unionAll( + * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales) + * ); + * // or + * import { unionAll } from 'drizzle-orm/sqlite-core' + * + * await unionAll( + * db.select({ transaction: onlineSales.transactionId }).from(onlineSales), + * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales) + * ); + * ``` + */ + unionAll = this.createSetOperator("union", true); + /** + * Adds `intersect` set operator to the query. + * + * Calling this method will retain only the rows that are present in both result sets and eliminate duplicates. + * + * See docs: {@link https://orm.drizzle.team/docs/set-operations#intersect} + * + * @example + * + * ```ts + * // Select course names that are offered in both departments A and B + * await db.select({ courseName: depA.courseName }) + * .from(depA) + * .intersect( + * db.select({ courseName: depB.courseName }).from(depB) + * ); + * // or + * import { intersect } from 'drizzle-orm/sqlite-core' + * + * await intersect( + * db.select({ courseName: depA.courseName }).from(depA), + * db.select({ courseName: depB.courseName }).from(depB) + * ); + * ``` + */ + intersect = this.createSetOperator("intersect", false); + /** + * Adds `except` set operator to the query. + * + * Calling this method will retrieve all unique rows from the left query, except for the rows that are present in the result set of the right query. + * + * See docs: {@link https://orm.drizzle.team/docs/set-operations#except} + * + * @example + * + * ```ts + * // Select all courses offered in department A but not in department B + * await db.select({ courseName: depA.courseName }) + * .from(depA) + * .except( + * db.select({ courseName: depB.courseName }).from(depB) + * ); + * // or + * import { except } from 'drizzle-orm/sqlite-core' + * + * await except( + * db.select({ courseName: depA.courseName }).from(depA), + * db.select({ courseName: depB.courseName }).from(depB) + * ); + * ``` + */ + except = this.createSetOperator("except", false); + /** @internal */ + addSetOperators(setOperators) { + this.config.setOperators.push(...setOperators); + return this; + } + /** + * Adds a `where` clause to the query. + * + * Calling this method will select only those rows that fulfill a specified condition. + * + * See docs: {@link https://orm.drizzle.team/docs/select#filtering} + * + * @param where the `where` clause. + * + * @example + * You can use conditional operators and `sql function` to filter the rows to be selected. + * + * ```ts + * // Select all cars with green color + * await db.select().from(cars).where(eq(cars.color, 'green')); + * // or + * await db.select().from(cars).where(sql`${cars.color} = 'green'`) + * ``` + * + * You can logically combine conditional operators with `and()` and `or()` operators: + * + * ```ts + * // Select all BMW cars with a green color + * await db.select().from(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW'))); + * + * // Select all cars with the green or blue color + * await db.select().from(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue'))); + * ``` + */ + where(where) { + if (typeof where === "function") { + where = where( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ) + ); + } + this.config.where = where; + return this; + } + /** + * Adds a `having` clause to the query. + * + * Calling this method will select only those rows that fulfill a specified condition. It is typically used with aggregate functions to filter the aggregated data based on a specified condition. + * + * See docs: {@link https://orm.drizzle.team/docs/select#aggregations} + * + * @param having the `having` clause. + * + * @example + * + * ```ts + * // Select all brands with more than one car + * await db.select({ + * brand: cars.brand, + * count: sql`cast(count(${cars.id}) as int)`, + * }) + * .from(cars) + * .groupBy(cars.brand) + * .having(({ count }) => gt(count, 1)); + * ``` + */ + having(having) { + if (typeof having === "function") { + having = having( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ) + ); + } + this.config.having = having; + return this; + } + groupBy(...columns) { + if (typeof columns[0] === "function") { + const groupBy = columns[0]( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" }) + ) + ); + this.config.groupBy = Array.isArray(groupBy) ? groupBy : [groupBy]; + } else { + this.config.groupBy = columns; + } + return this; + } + orderBy(...columns) { + if (typeof columns[0] === "function") { + const orderBy = columns[0]( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" }) + ) + ); + const orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy]; + if (this.config.setOperators.length > 0) { + this.config.setOperators.at(-1).orderBy = orderByArray; + } else { + this.config.orderBy = orderByArray; + } + } else { + const orderByArray = columns; + if (this.config.setOperators.length > 0) { + this.config.setOperators.at(-1).orderBy = orderByArray; + } else { + this.config.orderBy = orderByArray; + } + } + return this; + } + /** + * Adds a `limit` clause to the query. + * + * Calling this method will set the maximum number of rows that will be returned by this query. + * + * See docs: {@link https://orm.drizzle.team/docs/select#limit--offset} + * + * @param limit the `limit` clause. + * + * @example + * + * ```ts + * // Get the first 10 people from this query. + * await db.select().from(people).limit(10); + * ``` + */ + limit(limit) { + if (this.config.setOperators.length > 0) { + this.config.setOperators.at(-1).limit = limit; + } else { + this.config.limit = limit; + } + return this; + } + /** + * Adds an `offset` clause to the query. + * + * Calling this method will skip a number of rows when returning results from this query. + * + * See docs: {@link https://orm.drizzle.team/docs/select#limit--offset} + * + * @param offset the `offset` clause. + * + * @example + * + * ```ts + * // Get the 10th-20th people from this query. + * await db.select().from(people).offset(10).limit(10); + * ``` + */ + offset(offset) { + if (this.config.setOperators.length > 0) { + this.config.setOperators.at(-1).offset = offset; + } else { + this.config.offset = offset; + } + return this; + } + /** @internal */ + getSQL() { + return this.dialect.buildSelectQuery(this.config); + } + toSQL() { + const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL()); + return rest; + } + as(alias) { + const usedTables = []; + usedTables.push(...extractUsedTable(this.config.table)); + if (this.config.joins) { + for (const it of this.config.joins) + usedTables.push(...extractUsedTable(it.table)); + } + return new Proxy( + new Subquery(this.getSQL(), this.config.fields, alias, false, [...new Set(usedTables)]), + new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" }) + ); + } + /** @internal */ + getSelectedFields() { + return new Proxy( + this.config.fields, + new SelectionProxyHandler({ alias: this.tableName, sqlAliasedBehavior: "alias", sqlBehavior: "error" }) + ); + } + $dynamic() { + return this; + } + }; + __name(SQLiteSelectQueryBuilderBase, "SQLiteSelectQueryBuilderBase"); + _a96 = entityKind; + __publicField(SQLiteSelectQueryBuilderBase, _a96, "SQLiteSelectQueryBuilder"); + SQLiteSelectBase = class extends SQLiteSelectQueryBuilderBase { + /** @internal */ + _prepare(isOneTimeQuery = true) { + if (!this.session) { + throw new Error("Cannot execute a query on a query builder. Please use a database instance instead."); + } + const fieldsList = orderSelectedFields(this.config.fields); + const query = this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + this.dialect.sqlToQuery(this.getSQL()), + fieldsList, + "all", + true, + void 0, + { + type: "select", + tables: [...this.usedTables] + }, + this.cacheConfig + ); + query.joinsNotNullableMap = this.joinsNotNullableMap; + return query; + } + $withCache(config3) { + this.cacheConfig = config3 === void 0 ? { config: {}, enable: true, autoInvalidate: true } : config3 === false ? { enable: false } : { enable: true, autoInvalidate: true, ...config3 }; + return this; + } + prepare() { + return this._prepare(false); + } + run = (placeholderValues) => { + return this._prepare().run(placeholderValues); + }; + all = (placeholderValues) => { + return this._prepare().all(placeholderValues); + }; + get = (placeholderValues) => { + return this._prepare().get(placeholderValues); + }; + values = (placeholderValues) => { + return this._prepare().values(placeholderValues); + }; + async execute() { + return this.all(); + } + }; + __name(SQLiteSelectBase, "SQLiteSelectBase"); + _a97 = entityKind; + __publicField(SQLiteSelectBase, _a97, "SQLiteSelect"); + applyMixins(SQLiteSelectBase, [QueryPromise]); + __name(createSetOperator, "createSetOperator"); + getSQLiteSetOperators = /* @__PURE__ */ __name(() => ({ + union, + unionAll, + intersect, + except + }), "getSQLiteSetOperators"); + union = createSetOperator("union", false); + unionAll = createSetOperator("union", true); + intersect = createSetOperator("intersect", false); + except = createSetOperator("except", false); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/query-builder.js +var _a98, QueryBuilder; +var init_query_builder2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/query-builder.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_selection_proxy(); + init_dialect(); + init_subquery(); + init_select2(); + QueryBuilder = class { + dialect; + dialectConfig; + constructor(dialect) { + this.dialect = is(dialect, SQLiteDialect) ? dialect : void 0; + this.dialectConfig = is(dialect, SQLiteDialect) ? void 0 : dialect; + } + $with = (alias, selection) => { + const queryBuilder = this; + const as2 = /* @__PURE__ */ __name((qb) => { + if (typeof qb === "function") { + qb = qb(queryBuilder); + } + return new Proxy( + new WithSubquery( + qb.getSQL(), + selection ?? ("getSelectedFields" in qb ? qb.getSelectedFields() ?? {} : {}), + alias, + true + ), + new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" }) + ); + }, "as"); + return { as: as2 }; + }; + with(...queries) { + const self2 = this; + function select(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: void 0, + dialect: self2.getDialect(), + withList: queries + }); + } + __name(select, "select"); + function selectDistinct(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: void 0, + dialect: self2.getDialect(), + withList: queries, + distinct: true + }); + } + __name(selectDistinct, "selectDistinct"); + return { select, selectDistinct }; + } + select(fields) { + return new SQLiteSelectBuilder({ fields: fields ?? void 0, session: void 0, dialect: this.getDialect() }); + } + selectDistinct(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: void 0, + dialect: this.getDialect(), + distinct: true + }); + } + // Lazy load dialect to avoid circular dependency + getDialect() { + if (!this.dialect) { + this.dialect = new SQLiteSyncDialect(this.dialectConfig); + } + return this.dialect; + } + }; + __name(QueryBuilder, "QueryBuilder"); + _a98 = entityKind; + __publicField(QueryBuilder, _a98, "SQLiteQueryBuilder"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js +var _a99, SQLiteInsertBuilder, _a100, SQLiteInsertBase; +var init_insert = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + init_sql(); + init_table3(); + init_table(); + init_utils2(); + init_utils3(); + init_query_builder2(); + SQLiteInsertBuilder = class { + constructor(table3, session, dialect, withList) { + this.table = table3; + this.session = session; + this.dialect = dialect; + this.withList = withList; + } + values(values) { + values = Array.isArray(values) ? values : [values]; + if (values.length === 0) { + throw new Error("values() must be called with at least one value"); + } + const mappedValues = values.map((entry) => { + const result = {}; + const cols = this.table[Table.Symbol.Columns]; + for (const colKey of Object.keys(entry)) { + const colValue = entry[colKey]; + result[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]); + } + return result; + }); + return new SQLiteInsertBase(this.table, mappedValues, this.session, this.dialect, this.withList); + } + select(selectQuery) { + const select = typeof selectQuery === "function" ? selectQuery(new QueryBuilder()) : selectQuery; + if (!is(select, SQL) && !haveSameKeys(this.table[Columns], select._.selectedFields)) { + throw new Error( + "Insert select error: selected fields are not the same or are in a different order compared to the table definition" + ); + } + return new SQLiteInsertBase(this.table, select, this.session, this.dialect, this.withList, true); + } + }; + __name(SQLiteInsertBuilder, "SQLiteInsertBuilder"); + _a99 = entityKind; + __publicField(SQLiteInsertBuilder, _a99, "SQLiteInsertBuilder"); + SQLiteInsertBase = class extends QueryPromise { + constructor(table3, values, session, dialect, withList, select) { + super(); + this.session = session; + this.dialect = dialect; + this.config = { table: table3, values, withList, select }; + } + /** @internal */ + config; + returning(fields = this.config.table[SQLiteTable.Symbol.Columns]) { + this.config.returning = orderSelectedFields(fields); + return this; + } + /** + * Adds an `on conflict do nothing` clause to the query. + * + * Calling this method simply avoids inserting a row as its alternative action. + * + * See docs: {@link https://orm.drizzle.team/docs/insert#on-conflict-do-nothing} + * + * @param config The `target` and `where` clauses. + * + * @example + * ```ts + * // Insert one row and cancel the insert if there's a conflict + * await db.insert(cars) + * .values({ id: 1, brand: 'BMW' }) + * .onConflictDoNothing(); + * + * // Explicitly specify conflict target + * await db.insert(cars) + * .values({ id: 1, brand: 'BMW' }) + * .onConflictDoNothing({ target: cars.id }); + * ``` + */ + onConflictDoNothing(config3 = {}) { + if (!this.config.onConflict) + this.config.onConflict = []; + if (config3.target === void 0) { + this.config.onConflict.push(sql` on conflict do nothing`); + } else { + const targetSql = Array.isArray(config3.target) ? sql`${config3.target}` : sql`${[config3.target]}`; + const whereSql = config3.where ? sql` where ${config3.where}` : sql``; + this.config.onConflict.push(sql` on conflict ${targetSql} do nothing${whereSql}`); + } + return this; + } + /** + * Adds an `on conflict do update` clause to the query. + * + * Calling this method will update the existing row that conflicts with the row proposed for insertion as its alternative action. + * + * See docs: {@link https://orm.drizzle.team/docs/insert#upserts-and-conflicts} + * + * @param config The `target`, `set` and `where` clauses. + * + * @example + * ```ts + * // Update the row if there's a conflict + * await db.insert(cars) + * .values({ id: 1, brand: 'BMW' }) + * .onConflictDoUpdate({ + * target: cars.id, + * set: { brand: 'Porsche' } + * }); + * + * // Upsert with 'where' clause + * await db.insert(cars) + * .values({ id: 1, brand: 'BMW' }) + * .onConflictDoUpdate({ + * target: cars.id, + * set: { brand: 'newBMW' }, + * where: sql`${cars.createdAt} > '2023-01-01'::date`, + * }); + * ``` + */ + onConflictDoUpdate(config3) { + if (config3.where && (config3.targetWhere || config3.setWhere)) { + throw new Error( + 'You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.' + ); + } + if (!this.config.onConflict) + this.config.onConflict = []; + const whereSql = config3.where ? sql` where ${config3.where}` : void 0; + const targetWhereSql = config3.targetWhere ? sql` where ${config3.targetWhere}` : void 0; + const setWhereSql = config3.setWhere ? sql` where ${config3.setWhere}` : void 0; + const targetSql = Array.isArray(config3.target) ? sql`${config3.target}` : sql`${[config3.target]}`; + const setSql = this.dialect.buildUpdateSet(this.config.table, mapUpdateSet(this.config.table, config3.set)); + this.config.onConflict.push( + sql` on conflict ${targetSql}${targetWhereSql} do update set ${setSql}${whereSql}${setWhereSql}` + ); + return this; + } + /** @internal */ + getSQL() { + return this.dialect.buildInsertQuery(this.config); + } + toSQL() { + const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL()); + return rest; + } + /** @internal */ + _prepare(isOneTimeQuery = true) { + return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + this.dialect.sqlToQuery(this.getSQL()), + this.config.returning, + this.config.returning ? "all" : "run", + true, + void 0, + { + type: "insert", + tables: extractUsedTable(this.config.table) + } + ); + } + prepare() { + return this._prepare(false); + } + run = (placeholderValues) => { + return this._prepare().run(placeholderValues); + }; + all = (placeholderValues) => { + return this._prepare().all(placeholderValues); + }; + get = (placeholderValues) => { + return this._prepare().get(placeholderValues); + }; + values = (placeholderValues) => { + return this._prepare().values(placeholderValues); + }; + async execute() { + return this.config.returning ? this.all() : this.run(); + } + $dynamic() { + return this; + } + }; + __name(SQLiteInsertBase, "SQLiteInsertBase"); + _a100 = entityKind; + __publicField(SQLiteInsertBase, _a100, "SQLiteInsert"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.types.js +var init_select_types = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/update.js +var _a101, SQLiteUpdateBuilder, _a102, SQLiteUpdateBase; +var init_update = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/update.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + init_selection_proxy(); + init_table3(); + init_subquery(); + init_table(); + init_utils2(); + init_view_common(); + init_utils3(); + init_view_base(); + SQLiteUpdateBuilder = class { + constructor(table3, session, dialect, withList) { + this.table = table3; + this.session = session; + this.dialect = dialect; + this.withList = withList; + } + set(values) { + return new SQLiteUpdateBase( + this.table, + mapUpdateSet(this.table, values), + this.session, + this.dialect, + this.withList + ); + } + }; + __name(SQLiteUpdateBuilder, "SQLiteUpdateBuilder"); + _a101 = entityKind; + __publicField(SQLiteUpdateBuilder, _a101, "SQLiteUpdateBuilder"); + SQLiteUpdateBase = class extends QueryPromise { + constructor(table3, set2, session, dialect, withList) { + super(); + this.session = session; + this.dialect = dialect; + this.config = { set: set2, table: table3, withList, joins: [] }; + } + /** @internal */ + config; + from(source) { + this.config.from = source; + return this; + } + createJoin(joinType) { + return (table3, on2) => { + const tableName = getTableLikeName(table3); + if (typeof tableName === "string" && this.config.joins.some((join) => join.alias === tableName)) { + throw new Error(`Alias "${tableName}" is already used in this query`); + } + if (typeof on2 === "function") { + const from = this.config.from ? is(table3, SQLiteTable) ? table3[Table.Symbol.Columns] : is(table3, Subquery) ? table3._.selectedFields : is(table3, SQLiteViewBase) ? table3[ViewBaseConfig].selectedFields : void 0 : void 0; + on2 = on2( + new Proxy( + this.config.table[Table.Symbol.Columns], + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ), + from && new Proxy( + from, + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ) + ); + } + this.config.joins.push({ on: on2, table: table3, joinType, alias: tableName }); + return this; + }; + } + leftJoin = this.createJoin("left"); + rightJoin = this.createJoin("right"); + innerJoin = this.createJoin("inner"); + fullJoin = this.createJoin("full"); + /** + * Adds a 'where' clause to the query. + * + * Calling this method will update only those rows that fulfill a specified condition. + * + * See docs: {@link https://orm.drizzle.team/docs/update} + * + * @param where the 'where' clause. + * + * @example + * You can use conditional operators and `sql function` to filter the rows to be updated. + * + * ```ts + * // Update all cars with green color + * db.update(cars).set({ color: 'red' }) + * .where(eq(cars.color, 'green')); + * // or + * db.update(cars).set({ color: 'red' }) + * .where(sql`${cars.color} = 'green'`) + * ``` + * + * You can logically combine conditional operators with `and()` and `or()` operators: + * + * ```ts + * // Update all BMW cars with a green color + * db.update(cars).set({ color: 'red' }) + * .where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW'))); + * + * // Update all cars with the green or blue color + * db.update(cars).set({ color: 'red' }) + * .where(or(eq(cars.color, 'green'), eq(cars.color, 'blue'))); + * ``` + */ + where(where) { + this.config.where = where; + return this; + } + orderBy(...columns) { + if (typeof columns[0] === "function") { + const orderBy = columns[0]( + new Proxy( + this.config.table[Table.Symbol.Columns], + new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" }) + ) + ); + const orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy]; + this.config.orderBy = orderByArray; + } else { + const orderByArray = columns; + this.config.orderBy = orderByArray; + } + return this; + } + limit(limit) { + this.config.limit = limit; + return this; + } + returning(fields = this.config.table[SQLiteTable.Symbol.Columns]) { + this.config.returning = orderSelectedFields(fields); + return this; + } + /** @internal */ + getSQL() { + return this.dialect.buildUpdateQuery(this.config); + } + toSQL() { + const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL()); + return rest; + } + /** @internal */ + _prepare(isOneTimeQuery = true) { + return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + this.dialect.sqlToQuery(this.getSQL()), + this.config.returning, + this.config.returning ? "all" : "run", + true, + void 0, + { + type: "insert", + tables: extractUsedTable(this.config.table) + } + ); + } + prepare() { + return this._prepare(false); + } + run = (placeholderValues) => { + return this._prepare().run(placeholderValues); + }; + all = (placeholderValues) => { + return this._prepare().all(placeholderValues); + }; + get = (placeholderValues) => { + return this._prepare().get(placeholderValues); + }; + values = (placeholderValues) => { + return this._prepare().values(placeholderValues); + }; + async execute() { + return this.config.returning ? this.all() : this.run(); + } + $dynamic() { + return this; + } + }; + __name(SQLiteUpdateBase, "SQLiteUpdateBase"); + _a102 = entityKind; + __publicField(SQLiteUpdateBase, _a102, "SQLiteUpdate"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/index.js +var init_query_builders = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_delete(); + init_insert(); + init_query_builder2(); + init_select2(); + init_select_types(); + init_update(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/count.js +var _a103, _SQLiteCountBuilder, SQLiteCountBuilder; +var init_count = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/count.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_sql(); + _SQLiteCountBuilder = class extends SQL { + constructor(params) { + super(_SQLiteCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks); + this.params = params; + this.session = params.session; + this.sql = _SQLiteCountBuilder.buildCount( + params.source, + params.filters + ); + } + sql; + [(_a103 = entityKind, Symbol.toStringTag)] = "SQLiteCountBuilderAsync"; + session; + static buildEmbeddedCount(source, filters) { + return sql`(select count(*) from ${source}${sql.raw(" where ").if(filters)}${filters})`; + } + static buildCount(source, filters) { + return sql`select count(*) from ${source}${sql.raw(" where ").if(filters)}${filters}`; + } + then(onfulfilled, onrejected) { + return Promise.resolve(this.session.count(this.sql)).then( + onfulfilled, + onrejected + ); + } + catch(onRejected) { + return this.then(void 0, onRejected); + } + finally(onFinally) { + return this.then( + (value) => { + onFinally?.(); + return value; + }, + (reason) => { + onFinally?.(); + throw reason; + } + ); + } + }; + SQLiteCountBuilder = _SQLiteCountBuilder; + __name(SQLiteCountBuilder, "SQLiteCountBuilder"); + __publicField(SQLiteCountBuilder, _a103, "SQLiteCountBuilderAsync"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/query.js +var _a104, RelationalQueryBuilder, _a105, SQLiteRelationalQuery, _a106, SQLiteSyncRelationalQuery; +var init_query = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/query.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + init_relations(); + RelationalQueryBuilder = class { + constructor(mode, fullSchema, schema, tableNamesMap, table3, tableConfig, dialect, session) { + this.mode = mode; + this.fullSchema = fullSchema; + this.schema = schema; + this.tableNamesMap = tableNamesMap; + this.table = table3; + this.tableConfig = tableConfig; + this.dialect = dialect; + this.session = session; + } + findMany(config3) { + return this.mode === "sync" ? new SQLiteSyncRelationalQuery( + this.fullSchema, + this.schema, + this.tableNamesMap, + this.table, + this.tableConfig, + this.dialect, + this.session, + config3 ? config3 : {}, + "many" + ) : new SQLiteRelationalQuery( + this.fullSchema, + this.schema, + this.tableNamesMap, + this.table, + this.tableConfig, + this.dialect, + this.session, + config3 ? config3 : {}, + "many" + ); + } + findFirst(config3) { + return this.mode === "sync" ? new SQLiteSyncRelationalQuery( + this.fullSchema, + this.schema, + this.tableNamesMap, + this.table, + this.tableConfig, + this.dialect, + this.session, + config3 ? { ...config3, limit: 1 } : { limit: 1 }, + "first" + ) : new SQLiteRelationalQuery( + this.fullSchema, + this.schema, + this.tableNamesMap, + this.table, + this.tableConfig, + this.dialect, + this.session, + config3 ? { ...config3, limit: 1 } : { limit: 1 }, + "first" + ); + } + }; + __name(RelationalQueryBuilder, "RelationalQueryBuilder"); + _a104 = entityKind; + __publicField(RelationalQueryBuilder, _a104, "SQLiteAsyncRelationalQueryBuilder"); + SQLiteRelationalQuery = class extends QueryPromise { + constructor(fullSchema, schema, tableNamesMap, table3, tableConfig, dialect, session, config3, mode) { + super(); + this.fullSchema = fullSchema; + this.schema = schema; + this.tableNamesMap = tableNamesMap; + this.table = table3; + this.tableConfig = tableConfig; + this.dialect = dialect; + this.session = session; + this.config = config3; + this.mode = mode; + } + /** @internal */ + mode; + /** @internal */ + getSQL() { + return this.dialect.buildRelationalQuery({ + fullSchema: this.fullSchema, + schema: this.schema, + tableNamesMap: this.tableNamesMap, + table: this.table, + tableConfig: this.tableConfig, + queryConfig: this.config, + tableAlias: this.tableConfig.tsName + }).sql; + } + /** @internal */ + _prepare(isOneTimeQuery = false) { + const { query, builtQuery } = this._toSQL(); + return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + builtQuery, + void 0, + this.mode === "first" ? "get" : "all", + true, + (rawRows, mapColumnValue) => { + const rows = rawRows.map( + (row) => mapRelationalRow(this.schema, this.tableConfig, row, query.selection, mapColumnValue) + ); + if (this.mode === "first") { + return rows[0]; + } + return rows; + } + ); + } + prepare() { + return this._prepare(false); + } + _toSQL() { + const query = this.dialect.buildRelationalQuery({ + fullSchema: this.fullSchema, + schema: this.schema, + tableNamesMap: this.tableNamesMap, + table: this.table, + tableConfig: this.tableConfig, + queryConfig: this.config, + tableAlias: this.tableConfig.tsName + }); + const builtQuery = this.dialect.sqlToQuery(query.sql); + return { query, builtQuery }; + } + toSQL() { + return this._toSQL().builtQuery; + } + /** @internal */ + executeRaw() { + if (this.mode === "first") { + return this._prepare(false).get(); + } + return this._prepare(false).all(); + } + async execute() { + return this.executeRaw(); + } + }; + __name(SQLiteRelationalQuery, "SQLiteRelationalQuery"); + _a105 = entityKind; + __publicField(SQLiteRelationalQuery, _a105, "SQLiteAsyncRelationalQuery"); + SQLiteSyncRelationalQuery = class extends SQLiteRelationalQuery { + sync() { + return this.executeRaw(); + } + }; + __name(SQLiteSyncRelationalQuery, "SQLiteSyncRelationalQuery"); + _a106 = entityKind; + __publicField(SQLiteSyncRelationalQuery, _a106, "SQLiteSyncRelationalQuery"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/raw.js +var _a107, SQLiteRaw; +var init_raw = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/raw.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + SQLiteRaw = class extends QueryPromise { + constructor(execute, getSQL, action, dialect, mapBatchResult) { + super(); + this.execute = execute; + this.getSQL = getSQL; + this.dialect = dialect; + this.mapBatchResult = mapBatchResult; + this.config = { action }; + } + /** @internal */ + config; + getQuery() { + return { ...this.dialect.sqlToQuery(this.getSQL()), method: this.config.action }; + } + mapResult(result, isFromBatch) { + return isFromBatch ? this.mapBatchResult(result) : result; + } + _prepare() { + return this; + } + /** @internal */ + isResponseInArrayMode() { + return false; + } + }; + __name(SQLiteRaw, "SQLiteRaw"); + _a107 = entityKind; + __publicField(SQLiteRaw, _a107, "SQLiteRaw"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/db.js +var _a108, BaseSQLiteDatabase; +var init_db = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/db.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_selection_proxy(); + init_sql(); + init_query_builders(); + init_subquery(); + init_count(); + init_query(); + init_raw(); + BaseSQLiteDatabase = class { + constructor(resultKind, dialect, session, schema) { + this.resultKind = resultKind; + this.dialect = dialect; + this.session = session; + this._ = schema ? { + schema: schema.schema, + fullSchema: schema.fullSchema, + tableNamesMap: schema.tableNamesMap + } : { + schema: void 0, + fullSchema: {}, + tableNamesMap: {} + }; + this.query = {}; + const query = this.query; + if (this._.schema) { + for (const [tableName, columns] of Object.entries(this._.schema)) { + query[tableName] = new RelationalQueryBuilder( + resultKind, + schema.fullSchema, + this._.schema, + this._.tableNamesMap, + schema.fullSchema[tableName], + columns, + dialect, + session + ); + } + } + this.$cache = { invalidate: async (_params) => { + } }; + } + query; + /** + * Creates a subquery that defines a temporary named result set as a CTE. + * + * It is useful for breaking down complex queries into simpler parts and for reusing the result set in subsequent parts of the query. + * + * See docs: {@link https://orm.drizzle.team/docs/select#with-clause} + * + * @param alias The alias for the subquery. + * + * Failure to provide an alias will result in a DrizzleTypeError, preventing the subquery from being referenced in other queries. + * + * @example + * + * ```ts + * // Create a subquery with alias 'sq' and use it in the select query + * const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42))); + * + * const result = await db.with(sq).select().from(sq); + * ``` + * + * To select arbitrary SQL values as fields in a CTE and reference them in other CTEs or in the main query, you need to add aliases to them: + * + * ```ts + * // Select an arbitrary SQL value as a field in a CTE and reference it in the main query + * const sq = db.$with('sq').as(db.select({ + * name: sql`upper(${users.name})`.as('name'), + * }) + * .from(users)); + * + * const result = await db.with(sq).select({ name: sq.name }).from(sq); + * ``` + */ + $with = (alias, selection) => { + const self2 = this; + const as2 = /* @__PURE__ */ __name((qb) => { + if (typeof qb === "function") { + qb = qb(new QueryBuilder(self2.dialect)); + } + return new Proxy( + new WithSubquery( + qb.getSQL(), + selection ?? ("getSelectedFields" in qb ? qb.getSelectedFields() ?? {} : {}), + alias, + true + ), + new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" }) + ); + }, "as"); + return { as: as2 }; + }; + $count(source, filters) { + return new SQLiteCountBuilder({ source, filters, session: this.session }); + } + /** + * Incorporates a previously defined CTE (using `$with`) into the main query. + * + * This method allows the main query to reference a temporary named result set. + * + * See docs: {@link https://orm.drizzle.team/docs/select#with-clause} + * + * @param queries The CTEs to incorporate into the main query. + * + * @example + * + * ```ts + * // Define a subquery 'sq' as a CTE using $with + * const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42))); + * + * // Incorporate the CTE 'sq' into the main query and select from it + * const result = await db.with(sq).select().from(sq); + * ``` + */ + with(...queries) { + const self2 = this; + function select(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: self2.session, + dialect: self2.dialect, + withList: queries + }); + } + __name(select, "select"); + function selectDistinct(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: self2.session, + dialect: self2.dialect, + withList: queries, + distinct: true + }); + } + __name(selectDistinct, "selectDistinct"); + function update(table3) { + return new SQLiteUpdateBuilder(table3, self2.session, self2.dialect, queries); + } + __name(update, "update"); + function insert(into) { + return new SQLiteInsertBuilder(into, self2.session, self2.dialect, queries); + } + __name(insert, "insert"); + function delete_(from) { + return new SQLiteDeleteBase(from, self2.session, self2.dialect, queries); + } + __name(delete_, "delete_"); + return { select, selectDistinct, update, insert, delete: delete_ }; + } + select(fields) { + return new SQLiteSelectBuilder({ fields: fields ?? void 0, session: this.session, dialect: this.dialect }); + } + selectDistinct(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: this.session, + dialect: this.dialect, + distinct: true + }); + } + /** + * Creates an update query. + * + * Calling this method without `.where()` clause will update all rows in a table. The `.where()` clause specifies which rows should be updated. + * + * Use `.set()` method to specify which values to update. + * + * See docs: {@link https://orm.drizzle.team/docs/update} + * + * @param table The table to update. + * + * @example + * + * ```ts + * // Update all rows in the 'cars' table + * await db.update(cars).set({ color: 'red' }); + * + * // Update rows with filters and conditions + * await db.update(cars).set({ color: 'red' }).where(eq(cars.brand, 'BMW')); + * + * // Update with returning clause + * const updatedCar: Car[] = await db.update(cars) + * .set({ color: 'red' }) + * .where(eq(cars.id, 1)) + * .returning(); + * ``` + */ + update(table3) { + return new SQLiteUpdateBuilder(table3, this.session, this.dialect); + } + $cache; + /** + * Creates an insert query. + * + * Calling this method will create new rows in a table. Use `.values()` method to specify which values to insert. + * + * See docs: {@link https://orm.drizzle.team/docs/insert} + * + * @param table The table to insert into. + * + * @example + * + * ```ts + * // Insert one row + * await db.insert(cars).values({ brand: 'BMW' }); + * + * // Insert multiple rows + * await db.insert(cars).values([{ brand: 'BMW' }, { brand: 'Porsche' }]); + * + * // Insert with returning clause + * const insertedCar: Car[] = await db.insert(cars) + * .values({ brand: 'BMW' }) + * .returning(); + * ``` + */ + insert(into) { + return new SQLiteInsertBuilder(into, this.session, this.dialect); + } + /** + * Creates a delete query. + * + * Calling this method without `.where()` clause will delete all rows in a table. The `.where()` clause specifies which rows should be deleted. + * + * See docs: {@link https://orm.drizzle.team/docs/delete} + * + * @param table The table to delete from. + * + * @example + * + * ```ts + * // Delete all rows in the 'cars' table + * await db.delete(cars); + * + * // Delete rows with filters and conditions + * await db.delete(cars).where(eq(cars.color, 'green')); + * + * // Delete with returning clause + * const deletedCar: Car[] = await db.delete(cars) + * .where(eq(cars.id, 1)) + * .returning(); + * ``` + */ + delete(from) { + return new SQLiteDeleteBase(from, this.session, this.dialect); + } + run(query) { + const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL(); + if (this.resultKind === "async") { + return new SQLiteRaw( + async () => this.session.run(sequel), + () => sequel, + "run", + this.dialect, + this.session.extractRawRunValueFromBatchResult.bind(this.session) + ); + } + return this.session.run(sequel); + } + all(query) { + const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL(); + if (this.resultKind === "async") { + return new SQLiteRaw( + async () => this.session.all(sequel), + () => sequel, + "all", + this.dialect, + this.session.extractRawAllValueFromBatchResult.bind(this.session) + ); + } + return this.session.all(sequel); + } + get(query) { + const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL(); + if (this.resultKind === "async") { + return new SQLiteRaw( + async () => this.session.get(sequel), + () => sequel, + "get", + this.dialect, + this.session.extractRawGetValueFromBatchResult.bind(this.session) + ); + } + return this.session.get(sequel); + } + values(query) { + const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL(); + if (this.resultKind === "async") { + return new SQLiteRaw( + async () => this.session.values(sequel), + () => sequel, + "values", + this.dialect, + this.session.extractRawValuesValueFromBatchResult.bind(this.session) + ); + } + return this.session.values(sequel); + } + transaction(transaction, config3) { + return this.session.transaction(transaction, config3); + } + }; + __name(BaseSQLiteDatabase, "BaseSQLiteDatabase"); + _a108 = entityKind; + __publicField(BaseSQLiteDatabase, _a108, "BaseSQLiteDatabase"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/cache/core/cache.js +async function hashQuery(sql2, params) { + const dataToHash = `${sql2}-${JSON.stringify(params)}`; + const encoder2 = new TextEncoder(); + const data = encoder2.encode(dataToHash); + const hashBuffer = await crypto.subtle.digest("SHA-256", data); + const hashArray = [...new Uint8Array(hashBuffer)]; + const hashHex = hashArray.map((b2) => b2.toString(16).padStart(2, "0")).join(""); + return hashHex; +} +var _a109, Cache, _a110, NoopCache; +var init_cache = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/cache/core/cache.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + Cache = class { + }; + __name(Cache, "Cache"); + _a109 = entityKind; + __publicField(Cache, _a109, "Cache"); + NoopCache = class extends Cache { + strategy() { + return "all"; + } + async get(_key2) { + return void 0; + } + async put(_hashedQuery, _response, _tables, _config) { + } + async onMutate(_params) { + } + }; + __name(NoopCache, "NoopCache"); + _a110 = entityKind; + __publicField(NoopCache, _a110, "NoopCache"); + __name(hashQuery, "hashQuery"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/cache/core/index.js +var init_core = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/cache/core/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_cache(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/alias.js +var init_alias2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/alias.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/session.js +var _a111, ExecuteResultSync, _a112, SQLitePreparedQuery, _a113, SQLiteSession, _a114, SQLiteTransaction; +var init_session = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/session.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_cache(); + init_entity(); + init_errors(); + init_query_promise(); + init_db(); + ExecuteResultSync = class extends QueryPromise { + constructor(resultCb) { + super(); + this.resultCb = resultCb; + } + async execute() { + return this.resultCb(); + } + sync() { + return this.resultCb(); + } + }; + __name(ExecuteResultSync, "ExecuteResultSync"); + _a111 = entityKind; + __publicField(ExecuteResultSync, _a111, "ExecuteResultSync"); + SQLitePreparedQuery = class { + constructor(mode, executeMethod, query, cache3, queryMetadata, cacheConfig) { + this.mode = mode; + this.executeMethod = executeMethod; + this.query = query; + this.cache = cache3; + this.queryMetadata = queryMetadata; + this.cacheConfig = cacheConfig; + if (cache3 && cache3.strategy() === "all" && cacheConfig === void 0) { + this.cacheConfig = { enable: true, autoInvalidate: true }; + } + if (!this.cacheConfig?.enable) { + this.cacheConfig = void 0; + } + } + /** @internal */ + joinsNotNullableMap; + /** @internal */ + async queryWithCache(queryString, params, query) { + if (this.cache === void 0 || is(this.cache, NoopCache) || this.queryMetadata === void 0) { + try { + return await query(); + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + } + if (this.cacheConfig && !this.cacheConfig.enable) { + try { + return await query(); + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + } + if ((this.queryMetadata.type === "insert" || this.queryMetadata.type === "update" || this.queryMetadata.type === "delete") && this.queryMetadata.tables.length > 0) { + try { + const [res] = await Promise.all([ + query(), + this.cache.onMutate({ tables: this.queryMetadata.tables }) + ]); + return res; + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + } + if (!this.cacheConfig) { + try { + return await query(); + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + } + if (this.queryMetadata.type === "select") { + const fromCache = await this.cache.get( + this.cacheConfig.tag ?? await hashQuery(queryString, params), + this.queryMetadata.tables, + this.cacheConfig.tag !== void 0, + this.cacheConfig.autoInvalidate + ); + if (fromCache === void 0) { + let result; + try { + result = await query(); + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + await this.cache.put( + this.cacheConfig.tag ?? await hashQuery(queryString, params), + result, + // make sure we send tables that were used in a query only if user wants to invalidate it on each write + this.cacheConfig.autoInvalidate ? this.queryMetadata.tables : [], + this.cacheConfig.tag !== void 0, + this.cacheConfig.config + ); + return result; + } + return fromCache; + } + try { + return await query(); + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + } + getQuery() { + return this.query; + } + mapRunResult(result, _isFromBatch) { + return result; + } + mapAllResult(_result, _isFromBatch) { + throw new Error("Not implemented"); + } + mapGetResult(_result, _isFromBatch) { + throw new Error("Not implemented"); + } + execute(placeholderValues) { + if (this.mode === "async") { + return this[this.executeMethod](placeholderValues); + } + return new ExecuteResultSync(() => this[this.executeMethod](placeholderValues)); + } + mapResult(response, isFromBatch) { + switch (this.executeMethod) { + case "run": { + return this.mapRunResult(response, isFromBatch); + } + case "all": { + return this.mapAllResult(response, isFromBatch); + } + case "get": { + return this.mapGetResult(response, isFromBatch); + } + } + } + }; + __name(SQLitePreparedQuery, "SQLitePreparedQuery"); + _a112 = entityKind; + __publicField(SQLitePreparedQuery, _a112, "PreparedQuery"); + SQLiteSession = class { + constructor(dialect) { + this.dialect = dialect; + } + prepareOneTimeQuery(query, fields, executeMethod, isResponseInArrayMode, customResultMapper, queryMetadata, cacheConfig) { + return this.prepareQuery( + query, + fields, + executeMethod, + isResponseInArrayMode, + customResultMapper, + queryMetadata, + cacheConfig + ); + } + run(query) { + const staticQuery = this.dialect.sqlToQuery(query); + try { + return this.prepareOneTimeQuery(staticQuery, void 0, "run", false).run(); + } catch (err) { + throw new DrizzleError({ cause: err, message: `Failed to run the query '${staticQuery.sql}'` }); + } + } + /** @internal */ + extractRawRunValueFromBatchResult(result) { + return result; + } + all(query) { + return this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), void 0, "run", false).all(); + } + /** @internal */ + extractRawAllValueFromBatchResult(_result) { + throw new Error("Not implemented"); + } + get(query) { + return this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), void 0, "run", false).get(); + } + /** @internal */ + extractRawGetValueFromBatchResult(_result) { + throw new Error("Not implemented"); + } + values(query) { + return this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), void 0, "run", false).values(); + } + async count(sql2) { + const result = await this.values(sql2); + return result[0][0]; + } + /** @internal */ + extractRawValuesValueFromBatchResult(_result) { + throw new Error("Not implemented"); + } + }; + __name(SQLiteSession, "SQLiteSession"); + _a113 = entityKind; + __publicField(SQLiteSession, _a113, "SQLiteSession"); + SQLiteTransaction = class extends BaseSQLiteDatabase { + constructor(resultType, dialect, session, schema, nestedIndex = 0) { + super(resultType, dialect, session, schema); + this.schema = schema; + this.nestedIndex = nestedIndex; + } + rollback() { + throw new TransactionRollbackError(); + } + }; + __name(SQLiteTransaction, "SQLiteTransaction"); + _a114 = entityKind; + __publicField(SQLiteTransaction, _a114, "SQLiteTransaction"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/subquery.js +var init_subquery2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/subquery.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/view.js +var _a115, ViewBuilderCore, _a116, ViewBuilder, _a117, ManualViewBuilder, _a118, SQLiteView; +var init_view = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/view.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_selection_proxy(); + init_utils2(); + init_query_builder2(); + init_table3(); + init_view_base(); + ViewBuilderCore = class { + constructor(name) { + this.name = name; + } + config = {}; + }; + __name(ViewBuilderCore, "ViewBuilderCore"); + _a115 = entityKind; + __publicField(ViewBuilderCore, _a115, "SQLiteViewBuilderCore"); + ViewBuilder = class extends ViewBuilderCore { + as(qb) { + if (typeof qb === "function") { + qb = qb(new QueryBuilder()); + } + const selectionProxy = new SelectionProxyHandler({ + alias: this.name, + sqlBehavior: "error", + sqlAliasedBehavior: "alias", + replaceOriginalName: true + }); + const aliasedSelectedFields = qb.getSelectedFields(); + return new Proxy( + new SQLiteView({ + // sqliteConfig: this.config, + config: { + name: this.name, + schema: void 0, + selectedFields: aliasedSelectedFields, + query: qb.getSQL().inlineParams() + } + }), + selectionProxy + ); + } + }; + __name(ViewBuilder, "ViewBuilder"); + _a116 = entityKind; + __publicField(ViewBuilder, _a116, "SQLiteViewBuilder"); + ManualViewBuilder = class extends ViewBuilderCore { + columns; + constructor(name, columns) { + super(name); + this.columns = getTableColumns(sqliteTable(name, columns)); + } + existing() { + return new Proxy( + new SQLiteView({ + config: { + name: this.name, + schema: void 0, + selectedFields: this.columns, + query: void 0 + } + }), + new SelectionProxyHandler({ + alias: this.name, + sqlBehavior: "error", + sqlAliasedBehavior: "alias", + replaceOriginalName: true + }) + ); + } + as(query) { + return new Proxy( + new SQLiteView({ + config: { + name: this.name, + schema: void 0, + selectedFields: this.columns, + query: query.inlineParams() + } + }), + new SelectionProxyHandler({ + alias: this.name, + sqlBehavior: "error", + sqlAliasedBehavior: "alias", + replaceOriginalName: true + }) + ); + } + }; + __name(ManualViewBuilder, "ManualViewBuilder"); + _a117 = entityKind; + __publicField(ManualViewBuilder, _a117, "SQLiteManualViewBuilder"); + SQLiteView = class extends SQLiteViewBase { + constructor({ config: config3 }) { + super(config3); + } + }; + __name(SQLiteView, "SQLiteView"); + _a118 = entityKind; + __publicField(SQLiteView, _a118, "SQLiteView"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/index.js +var init_sqlite_core = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_alias2(); + init_checks(); + init_columns(); + init_db(); + init_dialect(); + init_foreign_keys2(); + init_indexes(); + init_primary_keys2(); + init_query_builders(); + init_session(); + init_subquery2(); + init_table3(); + init_unique_constraint2(); + init_utils3(); + init_view(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/session.js +function d1ToRawMapping(results) { + const rows = []; + for (const row of results) { + const entry = Object.keys(row).map((k2) => row[k2]); + rows.push(entry); + } + return rows; +} +var _a119, SQLiteD1Session, _a120, _D1Transaction, D1Transaction, _a121, D1PreparedQuery; +var init_session2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/session.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core(); + init_entity(); + init_logger2(); + init_sql(); + init_sqlite_core(); + init_session(); + init_utils2(); + SQLiteD1Session = class extends SQLiteSession { + constructor(client, dialect, schema, options = {}) { + super(dialect); + this.client = client; + this.schema = schema; + this.options = options; + this.logger = options.logger ?? new NoopLogger(); + this.cache = options.cache ?? new NoopCache(); + } + logger; + cache; + prepareQuery(query, fields, executeMethod, isResponseInArrayMode, customResultMapper, queryMetadata, cacheConfig) { + const stmt = this.client.prepare(query.sql); + return new D1PreparedQuery( + stmt, + query, + this.logger, + this.cache, + queryMetadata, + cacheConfig, + fields, + executeMethod, + isResponseInArrayMode, + customResultMapper + ); + } + async batch(queries) { + const preparedQueries = []; + const builtQueries = []; + for (const query of queries) { + const preparedQuery = query._prepare(); + const builtQuery = preparedQuery.getQuery(); + preparedQueries.push(preparedQuery); + if (builtQuery.params.length > 0) { + builtQueries.push(preparedQuery.stmt.bind(...builtQuery.params)); + } else { + const builtQuery2 = preparedQuery.getQuery(); + builtQueries.push( + this.client.prepare(builtQuery2.sql).bind(...builtQuery2.params) + ); + } + } + const batchResults = await this.client.batch(builtQueries); + return batchResults.map((result, i2) => preparedQueries[i2].mapResult(result, true)); + } + extractRawAllValueFromBatchResult(result) { + return result.results; + } + extractRawGetValueFromBatchResult(result) { + return result.results[0]; + } + extractRawValuesValueFromBatchResult(result) { + return d1ToRawMapping(result.results); + } + async transaction(transaction, config3) { + const tx = new D1Transaction("async", this.dialect, this, this.schema); + await this.run(sql.raw(`begin${config3?.behavior ? " " + config3.behavior : ""}`)); + try { + const result = await transaction(tx); + await this.run(sql`commit`); + return result; + } catch (err) { + await this.run(sql`rollback`); + throw err; + } + } + }; + __name(SQLiteD1Session, "SQLiteD1Session"); + _a119 = entityKind; + __publicField(SQLiteD1Session, _a119, "SQLiteD1Session"); + _D1Transaction = class extends SQLiteTransaction { + async transaction(transaction) { + const savepointName = `sp${this.nestedIndex}`; + const tx = new _D1Transaction("async", this.dialect, this.session, this.schema, this.nestedIndex + 1); + await this.session.run(sql.raw(`savepoint ${savepointName}`)); + try { + const result = await transaction(tx); + await this.session.run(sql.raw(`release savepoint ${savepointName}`)); + return result; + } catch (err) { + await this.session.run(sql.raw(`rollback to savepoint ${savepointName}`)); + throw err; + } + } + }; + D1Transaction = _D1Transaction; + __name(D1Transaction, "D1Transaction"); + _a120 = entityKind; + __publicField(D1Transaction, _a120, "D1Transaction"); + __name(d1ToRawMapping, "d1ToRawMapping"); + D1PreparedQuery = class extends SQLitePreparedQuery { + constructor(stmt, query, logger3, cache3, queryMetadata, cacheConfig, fields, executeMethod, _isResponseInArrayMode, customResultMapper) { + super("async", executeMethod, query, cache3, queryMetadata, cacheConfig); + this.logger = logger3; + this._isResponseInArrayMode = _isResponseInArrayMode; + this.customResultMapper = customResultMapper; + this.fields = fields; + this.stmt = stmt; + } + /** @internal */ + customResultMapper; + /** @internal */ + fields; + /** @internal */ + stmt; + async run(placeholderValues) { + const params = fillPlaceholders(this.query.params, placeholderValues ?? {}); + this.logger.logQuery(this.query.sql, params); + return await this.queryWithCache(this.query.sql, params, async () => { + return this.stmt.bind(...params).run(); + }); + } + async all(placeholderValues) { + const { fields, query, logger: logger3, stmt, customResultMapper } = this; + if (!fields && !customResultMapper) { + const params = fillPlaceholders(query.params, placeholderValues ?? {}); + logger3.logQuery(query.sql, params); + return await this.queryWithCache(query.sql, params, async () => { + return stmt.bind(...params).all().then(({ results }) => this.mapAllResult(results)); + }); + } + const rows = await this.values(placeholderValues); + return this.mapAllResult(rows); + } + mapAllResult(rows, isFromBatch) { + if (isFromBatch) { + rows = d1ToRawMapping(rows.results); + } + if (!this.fields && !this.customResultMapper) { + return rows; + } + if (this.customResultMapper) { + return this.customResultMapper(rows); + } + return rows.map((row) => mapResultRow(this.fields, row, this.joinsNotNullableMap)); + } + async get(placeholderValues) { + const { fields, joinsNotNullableMap, query, logger: logger3, stmt, customResultMapper } = this; + if (!fields && !customResultMapper) { + const params = fillPlaceholders(query.params, placeholderValues ?? {}); + logger3.logQuery(query.sql, params); + return await this.queryWithCache(query.sql, params, async () => { + return stmt.bind(...params).all().then(({ results }) => results[0]); + }); + } + const rows = await this.values(placeholderValues); + if (!rows[0]) { + return void 0; + } + if (customResultMapper) { + return customResultMapper(rows); + } + return mapResultRow(fields, rows[0], joinsNotNullableMap); + } + mapGetResult(result, isFromBatch) { + if (isFromBatch) { + result = d1ToRawMapping(result.results)[0]; + } + if (!this.fields && !this.customResultMapper) { + return result; + } + if (this.customResultMapper) { + return this.customResultMapper([result]); + } + return mapResultRow(this.fields, result, this.joinsNotNullableMap); + } + async values(placeholderValues) { + const params = fillPlaceholders(this.query.params, placeholderValues ?? {}); + this.logger.logQuery(this.query.sql, params); + return await this.queryWithCache(this.query.sql, params, async () => { + return this.stmt.bind(...params).raw(); + }); + } + /** @internal */ + isResponseInArrayMode() { + return this._isResponseInArrayMode; + } + }; + __name(D1PreparedQuery, "D1PreparedQuery"); + _a121 = entityKind; + __publicField(D1PreparedQuery, _a121, "D1PreparedQuery"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/driver.js +function drizzle(client, config3 = {}) { + const dialect = new SQLiteAsyncDialect({ casing: config3.casing }); + let logger3; + if (config3.logger === true) { + logger3 = new DefaultLogger(); + } else if (config3.logger !== false) { + logger3 = config3.logger; + } + let schema; + if (config3.schema) { + const tablesConfig = extractTablesRelationalConfig( + config3.schema, + createTableRelationsHelpers + ); + schema = { + fullSchema: config3.schema, + schema: tablesConfig.tables, + tableNamesMap: tablesConfig.tableNamesMap + }; + } + const session = new SQLiteD1Session(client, dialect, schema, { logger: logger3, cache: config3.cache }); + const db3 = new DrizzleD1Database("async", dialect, session, schema); + db3.$client = client; + db3.$cache = config3.cache; + if (db3.$cache) { + db3.$cache["invalidate"] = config3.cache?.onMutate; + } + return db3; +} +var _a122, DrizzleD1Database; +var init_driver = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/driver.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_logger2(); + init_relations(); + init_db(); + init_dialect(); + init_session2(); + DrizzleD1Database = class extends BaseSQLiteDatabase { + async batch(batch) { + return this.session.batch(batch); + } + }; + __name(DrizzleD1Database, "DrizzleD1Database"); + _a122 = entityKind; + __publicField(DrizzleD1Database, _a122, "D1Database"); + __name(drizzle, "drizzle"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/index.js +var init_d1 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_driver(); + init_session2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/operations.js +var init_operations = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/operations.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/index.js +var init_drizzle_orm = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_alias(); + init_column_builder(); + init_column(); + init_entity(); + init_errors(); + init_logger2(); + init_operations(); + init_query_promise(); + init_relations(); + init_sql2(); + init_subquery(); + init_table(); + init_utils2(); + init_view_common(); + } +}); + +// ../../packages/db_helper_sqlite/src/db/schema.ts +var schema_exports = {}; +__export(schema_exports, { + addressAreas: () => addressAreas, + addressAreasRelations: () => addressAreasRelations, + addressZones: () => addressZones, + addressZonesRelations: () => addressZonesRelations, + addresses: () => addresses, + addressesRelations: () => addressesRelations, + cartItems: () => cartItems, + cartItemsRelations: () => cartItemsRelations, + complaints: () => complaints, + complaintsRelations: () => complaintsRelations, + couponApplicableProducts: () => couponApplicableProducts, + couponApplicableProductsRelations: () => couponApplicableProductsRelations, + couponApplicableUsers: () => couponApplicableUsers, + couponApplicableUsersRelations: () => couponApplicableUsersRelations, + couponUsage: () => couponUsage, + couponUsageRelations: () => couponUsageRelations, + coupons: () => coupons, + couponsRelations: () => couponsRelations, + deliverySlotInfo: () => deliverySlotInfo, + deliverySlotInfoRelations: () => deliverySlotInfoRelations, + homeBanners: () => homeBanners, + homeBannersRelations: () => homeBannersRelations, + keyValStore: () => keyValStore, + notifCreds: () => notifCreds, + notifCredsRelations: () => notifCredsRelations, + notifications: () => notifications, + notificationsRelations: () => notificationsRelations, + orderItems: () => orderItems, + orderItemsRelations: () => orderItemsRelations, + orderStatus: () => orderStatus, + orderStatusRelations: () => orderStatusRelations, + orders: () => orders, + ordersRelations: () => ordersRelations, + paymentInfoRelations: () => paymentInfoRelations, + paymentInfoTable: () => paymentInfoTable, + paymentStatusEnum: () => paymentStatusEnum, + payments: () => payments, + paymentsRelations: () => paymentsRelations, + productCategories: () => productCategories, + productCategoriesRelations: () => productCategoriesRelations, + productGroupInfo: () => productGroupInfo, + productGroupInfoRelations: () => productGroupInfoRelations, + productGroupMembership: () => productGroupMembership, + productGroupMembershipRelations: () => productGroupMembershipRelations, + productInfo: () => productInfo, + productInfoRelations: () => productInfoRelations, + productReviews: () => productReviews, + productReviewsRelations: () => productReviewsRelations, + productSlots: () => productSlots, + productSlotsRelations: () => productSlotsRelations, + productTagInfo: () => productTagInfo, + productTagInfoRelations: () => productTagInfoRelations, + productTags: () => productTags, + productTagsRelations: () => productTagsRelations, + refunds: () => refunds, + refundsRelations: () => refundsRelations, + reservedCoupons: () => reservedCoupons, + reservedCouponsRelations: () => reservedCouponsRelations, + specialDeals: () => specialDeals, + specialDealsRelations: () => specialDealsRelations, + staffPermissionEnum: () => staffPermissionEnum, + staffPermissions: () => staffPermissions, + staffPermissionsRelations: () => staffPermissionsRelations, + staffRoleEnum: () => staffRoleEnum, + staffRolePermissions: () => staffRolePermissions, + staffRolePermissionsRelations: () => staffRolePermissionsRelations, + staffRoles: () => staffRoles, + staffRolesRelations: () => staffRolesRelations, + staffUsers: () => staffUsers, + staffUsersRelations: () => staffUsersRelations, + storeInfo: () => storeInfo, + storeInfoRelations: () => storeInfoRelations, + units: () => units, + unitsRelations: () => unitsRelations, + unloggedUserTokens: () => unloggedUserTokens, + uploadStatusEnum: () => uploadStatusEnum, + uploadUrlStatus: () => uploadUrlStatus, + userCreds: () => userCreds, + userCredsRelations: () => userCredsRelations, + userDetails: () => userDetails, + userDetailsRelations: () => userDetailsRelations, + userIncidents: () => userIncidents, + userIncidentsRelations: () => userIncidentsRelations, + userNotifications: () => userNotifications, + userNotificationsRelations: () => userNotificationsRelations, + users: () => users, + usersRelations: () => usersRelations, + vendorSnippets: () => vendorSnippets, + vendorSnippetsRelations: () => vendorSnippetsRelations +}); +var jsonText, numericText, staffRoleValues, staffPermissionValues, uploadStatusValues, paymentStatusValues, staffRoleEnum, staffPermissionEnum, uploadStatusEnum, paymentStatusEnum, users, userDetails, userCreds, addressZones, addressAreas, addresses, staffRoles, staffPermissions, staffRolePermissions, staffUsers, storeInfo, units, productInfo, productGroupInfo, productGroupMembership, homeBanners, productReviews, uploadUrlStatus, productTagInfo, productTags, deliverySlotInfo, vendorSnippets, productSlots, specialDeals, paymentInfoTable, orders, orderItems, orderStatus, payments, refunds, keyValStore, notifications, productCategories, cartItems, complaints, coupons, couponUsage, couponApplicableUsers, couponApplicableProducts, userIncidents, reservedCoupons, notifCreds, unloggedUserTokens, userNotifications, usersRelations, userCredsRelations, staffUsersRelations, addressesRelations, unitsRelations, productInfoRelations, productTagInfoRelations, productTagsRelations, deliverySlotInfoRelations, productSlotsRelations, specialDealsRelations, ordersRelations, orderItemsRelations, orderStatusRelations, paymentInfoRelations, paymentsRelations, refundsRelations, notificationsRelations, productCategoriesRelations, cartItemsRelations, complaintsRelations, couponsRelations, couponUsageRelations, userDetailsRelations, notifCredsRelations, userNotificationsRelations, storeInfoRelations, couponApplicableUsersRelations, couponApplicableProductsRelations, reservedCouponsRelations, productReviewsRelations, addressZonesRelations, addressAreasRelations, productGroupInfoRelations, productGroupMembershipRelations, homeBannersRelations, staffRolesRelations, staffPermissionsRelations, staffRolePermissionsRelations, userIncidentsRelations, vendorSnippetsRelations; +var init_schema = __esm({ + "../../packages/db_helper_sqlite/src/db/schema.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sqlite_core(); + init_drizzle_orm(); + jsonText = /* @__PURE__ */ __name((name) => customType({ + dataType() { + return "text"; + }, + toDriver(value) { + if (value === void 0 || value === null) + return null; + return JSON.stringify(value); + }, + fromDriver(value) { + if (value === null || value === void 0) + return null; + try { + return JSON.parse(String(value)); + } catch { + return null; + } + } + })(name), "jsonText"); + numericText = /* @__PURE__ */ __name((name) => customType({ + dataType() { + return "text"; + }, + toDriver(value) { + if (value === void 0 || value === null) + return null; + return String(value); + }, + fromDriver(value) { + if (value === null || value === void 0) + return null; + return String(value); + } + })(name), "numericText"); + staffRoleValues = ["super_admin", "admin", "marketer", "delivery_staff"]; + staffPermissionValues = ["crud_product", "make_coupon", "crud_staff_users"]; + uploadStatusValues = ["pending", "claimed"]; + paymentStatusValues = ["pending", "success", "cod", "failed"]; + staffRoleEnum = /* @__PURE__ */ __name((name) => text(name, { enum: staffRoleValues }), "staffRoleEnum"); + staffPermissionEnum = /* @__PURE__ */ __name((name) => text(name, { enum: staffPermissionValues }), "staffPermissionEnum"); + uploadStatusEnum = /* @__PURE__ */ __name((name) => text(name, { enum: uploadStatusValues }), "uploadStatusEnum"); + paymentStatusEnum = /* @__PURE__ */ __name((name) => text(name, { enum: paymentStatusValues }), "paymentStatusEnum"); + users = sqliteTable("users", { + id: integer().primaryKey({ autoIncrement: true }), + name: text(), + email: text(), + mobile: text(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_email: uniqueIndex("unique_email").on(t9.email) + })); + userDetails = sqliteTable("user_details", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id).unique(), + bio: text("bio"), + dateOfBirth: integer("date_of_birth", { mode: "timestamp" }), + gender: text("gender"), + occupation: text("occupation"), + profileImage: text("profile_image"), + isSuspended: integer("is_suspended", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + updatedAt: integer("updated_at", { mode: "timestamp" }).notNull().defaultNow() + }); + userCreds = sqliteTable("user_creds", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + userPassword: text("user_password").notNull(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + addressZones = sqliteTable("address_zones", { + id: integer().primaryKey({ autoIncrement: true }), + zoneName: text("zone_name").notNull(), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow() + }); + addressAreas = sqliteTable("address_areas", { + id: integer().primaryKey({ autoIncrement: true }), + placeName: text("place_name").notNull(), + zoneId: integer("zone_id").references(() => addressZones.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + addresses = sqliteTable("addresses", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + name: text("name").notNull(), + phone: text("phone").notNull(), + addressLine1: text("address_line1").notNull(), + addressLine2: text("address_line2"), + city: text("city").notNull(), + state: text("state").notNull(), + pincode: text("pincode").notNull(), + isDefault: integer("is_default", { mode: "boolean" }).notNull().default(false), + latitude: real("latitude"), + longitude: real("longitude"), + googleMapsUrl: text("google_maps_url"), + adminLatitude: real("admin_latitude"), + adminLongitude: real("admin_longitude"), + zoneId: integer("zone_id").references(() => addressZones.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + staffRoles = sqliteTable("staff_roles", { + id: integer().primaryKey({ autoIncrement: true }), + roleName: staffRoleEnum("role_name").notNull(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_role_name: uniqueIndex("unique_role_name").on(t9.roleName) + })); + staffPermissions = sqliteTable("staff_permissions", { + id: integer().primaryKey({ autoIncrement: true }), + permissionName: staffPermissionEnum("permission_name").notNull(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_permission_name: uniqueIndex("unique_permission_name").on(t9.permissionName) + })); + staffRolePermissions = sqliteTable("staff_role_permissions", { + id: integer().primaryKey({ autoIncrement: true }), + staffRoleId: integer("staff_role_id").notNull().references(() => staffRoles.id), + staffPermissionId: integer("staff_permission_id").notNull().references(() => staffPermissions.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_role_permission: uniqueIndex("unique_role_permission").on(t9.staffRoleId, t9.staffPermissionId) + })); + staffUsers = sqliteTable("staff_users", { + id: integer().primaryKey({ autoIncrement: true }), + name: text().notNull(), + password: text().notNull(), + staffRoleId: integer("staff_role_id").references(() => staffRoles.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + storeInfo = sqliteTable("store_info", { + id: integer().primaryKey({ autoIncrement: true }), + name: text().notNull(), + description: text(), + imageUrl: text("image_url"), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + owner: integer("owner").notNull().references(() => staffUsers.id) + }); + units = sqliteTable("units", { + id: integer().primaryKey({ autoIncrement: true }), + shortNotation: text("short_notation").notNull(), + fullName: text("full_name").notNull() + }, (t9) => ({ + unq_short_notation: uniqueIndex("unique_short_notation").on(t9.shortNotation) + })); + productInfo = sqliteTable("product_info", { + id: integer().primaryKey({ autoIncrement: true }), + name: text().notNull(), + shortDescription: text("short_description"), + longDescription: text("long_description"), + unitId: integer("unit_id").notNull().references(() => units.id), + price: numericText("price").notNull(), + marketPrice: numericText("market_price"), + images: jsonText("images"), + isOutOfStock: integer("is_out_of_stock", { mode: "boolean" }).notNull().default(false), + isSuspended: integer("is_suspended", { mode: "boolean" }).notNull().default(false), + isFlashAvailable: integer("is_flash_available", { mode: "boolean" }).notNull().default(false), + flashPrice: numericText("flash_price"), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + incrementStep: real("increment_step").notNull().default(1), + productQuantity: real("product_quantity").notNull().default(1), + storeId: integer("store_id").references(() => storeInfo.id) + }); + productGroupInfo = sqliteTable("product_group_info", { + id: integer().primaryKey({ autoIncrement: true }), + groupName: text("group_name").notNull(), + description: text(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + productGroupMembership = sqliteTable("product_group_membership", { + productId: integer("product_id").notNull().references(() => productInfo.id), + groupId: integer("group_id").notNull().references(() => productGroupInfo.id), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + pk: primaryKey({ columns: [t9.productId, t9.groupId], name: "product_group_membership_pk" }) + })); + homeBanners = sqliteTable("home_banners", { + id: integer().primaryKey({ autoIncrement: true }), + name: text("name").notNull(), + imageUrl: text("image_url").notNull(), + description: text("description"), + productIds: jsonText("product_ids"), + redirectUrl: text("redirect_url"), + serialNum: integer("serial_num"), + isActive: integer("is_active", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + lastUpdated: integer("last_updated", { mode: "timestamp" }).notNull().defaultNow() + }); + productReviews = sqliteTable("product_reviews", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + productId: integer("product_id").notNull().references(() => productInfo.id), + reviewBody: text("review_body").notNull(), + imageUrls: jsonText("image_urls").$defaultFn(() => []), + reviewTime: integer("review_time", { mode: "timestamp" }).notNull().defaultNow(), + ratings: real("ratings").notNull(), + adminResponse: text("admin_response"), + adminResponseImages: jsonText("admin_response_images").$defaultFn(() => []) + }, (t9) => ({ + ratingCheck: check("rating_check", sql`${t9.ratings} >= 1 AND ${t9.ratings} <= 5`) + })); + uploadUrlStatus = sqliteTable("upload_url_status", { + id: integer().primaryKey({ autoIncrement: true }), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + key: text("key").notNull(), + status: uploadStatusEnum("status").notNull().default("pending") + }); + productTagInfo = sqliteTable("product_tag_info", { + id: integer().primaryKey({ autoIncrement: true }), + tagName: text("tag_name").notNull().unique(), + tagDescription: text("tag_description"), + imageUrl: text("image_url"), + isDashboardTag: integer("is_dashboard_tag", { mode: "boolean" }).notNull().default(false), + relatedStores: jsonText("related_stores").$defaultFn(() => []), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + productTags = sqliteTable("product_tags", { + id: integer().primaryKey({ autoIncrement: true }), + productId: integer("product_id").notNull().references(() => productInfo.id), + tagId: integer("tag_id").notNull().references(() => productTagInfo.id), + assignedAt: integer("assigned_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_product_tag: uniqueIndex("unique_product_tag").on(t9.productId, t9.tagId) + })); + deliverySlotInfo = sqliteTable("delivery_slot_info", { + id: integer().primaryKey({ autoIncrement: true }), + deliveryTime: integer("delivery_time", { mode: "timestamp" }).notNull(), + freezeTime: integer("freeze_time", { mode: "timestamp" }).notNull(), + isActive: integer("is_active", { mode: "boolean" }).notNull().default(true), + isFlash: integer("is_flash", { mode: "boolean" }).notNull().default(false), + isCapacityFull: integer("is_capacity_full", { mode: "boolean" }).notNull().default(false), + deliverySequence: jsonText("delivery_sequence").$defaultFn(() => ({})), + groupIds: jsonText("group_ids").$defaultFn(() => []) + }); + vendorSnippets = sqliteTable("vendor_snippets", { + id: integer().primaryKey({ autoIncrement: true }), + snippetCode: text("snippet_code").notNull().unique(), + slotId: integer("slot_id").references(() => deliverySlotInfo.id), + isPermanent: integer("is_permanent", { mode: "boolean" }).notNull().default(false), + productIds: jsonText("product_ids").notNull(), + validTill: integer("valid_till", { mode: "timestamp" }), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + productSlots = sqliteTable("product_slots", { + productId: integer("product_id").notNull().references(() => productInfo.id), + slotId: integer("slot_id").notNull().references(() => deliverySlotInfo.id) + }, (t9) => ({ + pk: primaryKey({ columns: [t9.productId, t9.slotId], name: "product_slot_pk" }) + })); + specialDeals = sqliteTable("special_deals", { + id: integer().primaryKey({ autoIncrement: true }), + productId: integer("product_id").notNull().references(() => productInfo.id), + quantity: numericText("quantity").notNull(), + price: numericText("price").notNull(), + validTill: integer("valid_till", { mode: "timestamp" }).notNull() + }); + paymentInfoTable = sqliteTable("payment_info", { + id: integer().primaryKey({ autoIncrement: true }), + status: text().notNull(), + gateway: text().notNull(), + orderId: text("order_id"), + token: text("token"), + merchantOrderId: text("merchant_order_id").notNull().unique(), + payload: jsonText("payload") + }); + orders = sqliteTable("orders", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + addressId: integer("address_id").notNull().references(() => addresses.id), + slotId: integer("slot_id").references(() => deliverySlotInfo.id), + isCod: integer("is_cod", { mode: "boolean" }).notNull().default(false), + isOnlinePayment: integer("is_online_payment", { mode: "boolean" }).notNull().default(false), + paymentInfoId: integer("payment_info_id").references(() => paymentInfoTable.id), + totalAmount: numericText("total_amount").notNull(), + deliveryCharge: numericText("delivery_charge").notNull().default("0"), + readableId: integer("readable_id").notNull(), + adminNotes: text("admin_notes"), + userNotes: text("user_notes"), + orderGroupId: text("order_group_id"), + orderGroupProportion: numericText("order_group_proportion"), + isFlashDelivery: integer("is_flash_delivery", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + orderItems = sqliteTable("order_items", { + id: integer().primaryKey({ autoIncrement: true }), + orderId: integer("order_id").notNull().references(() => orders.id), + productId: integer("product_id").notNull().references(() => productInfo.id), + quantity: text("quantity").notNull(), + price: numericText("price").notNull(), + discountedPrice: numericText("discounted_price"), + is_packaged: integer("is_packaged", { mode: "boolean" }).notNull().default(false), + is_package_verified: integer("is_package_verified", { mode: "boolean" }).notNull().default(false) + }); + orderStatus = sqliteTable("order_status", { + id: integer().primaryKey({ autoIncrement: true }), + orderTime: integer("order_time", { mode: "timestamp" }).notNull().defaultNow(), + userId: integer("user_id").notNull().references(() => users.id), + orderId: integer("order_id").notNull().references(() => orders.id), + isPackaged: integer("is_packaged", { mode: "boolean" }).notNull().default(false), + isDelivered: integer("is_delivered", { mode: "boolean" }).notNull().default(false), + isCancelled: integer("is_cancelled", { mode: "boolean" }).notNull().default(false), + cancelReason: text("cancel_reason"), + isCancelledByAdmin: integer("is_cancelled_by_admin", { mode: "boolean" }), + paymentStatus: paymentStatusEnum("payment_state").notNull().default("pending"), + cancellationUserNotes: text("cancellation_user_notes"), + cancellationAdminNotes: text("cancellation_admin_notes"), + cancellationReviewed: integer("cancellation_reviewed", { mode: "boolean" }).notNull().default(false), + cancellationReviewedAt: integer("cancellation_reviewed_at", { mode: "timestamp" }), + refundCouponId: integer("refund_coupon_id").references(() => coupons.id) + }); + payments = sqliteTable("payments", { + id: integer().primaryKey({ autoIncrement: true }), + status: text().notNull(), + gateway: text().notNull(), + orderId: integer("order_id").notNull().references(() => orders.id), + token: text("token"), + merchantOrderId: text("merchant_order_id").notNull().unique(), + payload: jsonText("payload") + }); + refunds = sqliteTable("refunds", { + id: integer().primaryKey({ autoIncrement: true }), + orderId: integer("order_id").notNull().references(() => orders.id), + refundAmount: numericText("refund_amount"), + refundStatus: text("refund_status").default("none"), + merchantRefundId: text("merchant_refund_id"), + refundProcessedAt: integer("refund_processed_at", { mode: "timestamp" }), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + keyValStore = sqliteTable("key_val_store", { + key: text("key").primaryKey(), + value: jsonText("value") + }); + notifications = sqliteTable("notifications", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + title: text().notNull(), + body: text().notNull(), + type: text(), + isRead: integer("is_read", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + productCategories = sqliteTable("product_categories", { + id: integer().primaryKey({ autoIncrement: true }), + name: text().notNull(), + description: text() + }); + cartItems = sqliteTable("cart_items", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + productId: integer("product_id").notNull().references(() => productInfo.id), + quantity: numericText("quantity").notNull(), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_user_product: uniqueIndex("unique_user_product").on(t9.userId, t9.productId) + })); + complaints = sqliteTable("complaints", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + orderId: integer("order_id").references(() => orders.id), + complaintBody: text("complaint_body").notNull(), + images: jsonText("images"), + response: text("response"), + isResolved: integer("is_resolved", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + coupons = sqliteTable("coupons", { + id: integer().primaryKey({ autoIncrement: true }), + couponCode: text("coupon_code").notNull().unique(), + isUserBased: integer("is_user_based", { mode: "boolean" }).notNull().default(false), + discountPercent: numericText("discount_percent"), + flatDiscount: numericText("flat_discount"), + minOrder: numericText("min_order"), + productIds: jsonText("product_ids"), + createdBy: integer("created_by").notNull().references(() => staffUsers.id), + maxValue: numericText("max_value"), + isApplyForAll: integer("is_apply_for_all", { mode: "boolean" }).notNull().default(false), + validTill: integer("valid_till", { mode: "timestamp" }), + maxLimitForUser: integer("max_limit_for_user"), + isInvalidated: integer("is_invalidated", { mode: "boolean" }).notNull().default(false), + exclusiveApply: integer("exclusive_apply", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + couponUsage = sqliteTable("coupon_usage", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + couponId: integer("coupon_id").notNull().references(() => coupons.id), + orderId: integer("order_id").references(() => orders.id), + orderItemId: integer("order_item_id").references(() => orderItems.id), + usedAt: integer("used_at", { mode: "timestamp" }).notNull().defaultNow() + }); + couponApplicableUsers = sqliteTable("coupon_applicable_users", { + id: integer().primaryKey({ autoIncrement: true }), + couponId: integer("coupon_id").notNull().references(() => coupons.id), + userId: integer("user_id").notNull().references(() => users.id) + }, (t9) => ({ + unq_coupon_user: uniqueIndex("unique_coupon_user").on(t9.couponId, t9.userId) + })); + couponApplicableProducts = sqliteTable("coupon_applicable_products", { + id: integer().primaryKey({ autoIncrement: true }), + couponId: integer("coupon_id").notNull().references(() => coupons.id), + productId: integer("product_id").notNull().references(() => productInfo.id) + }, (t9) => ({ + unq_coupon_product: uniqueIndex("unique_coupon_product").on(t9.couponId, t9.productId) + })); + userIncidents = sqliteTable("user_incidents", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + orderId: integer("order_id").references(() => orders.id), + dateAdded: integer("date_added", { mode: "timestamp" }).notNull().defaultNow(), + adminComment: text("admin_comment"), + addedBy: integer("added_by").references(() => staffUsers.id), + negativityScore: integer("negativity_score") + }); + reservedCoupons = sqliteTable("reserved_coupons", { + id: integer().primaryKey({ autoIncrement: true }), + secretCode: text("secret_code").notNull().unique(), + couponCode: text("coupon_code").notNull(), + discountPercent: numericText("discount_percent"), + flatDiscount: numericText("flat_discount"), + minOrder: numericText("min_order"), + productIds: jsonText("product_ids"), + maxValue: numericText("max_value"), + validTill: integer("valid_till", { mode: "timestamp" }), + maxLimitForUser: integer("max_limit_for_user"), + exclusiveApply: integer("exclusive_apply", { mode: "boolean" }).notNull().default(false), + isRedeemed: integer("is_redeemed", { mode: "boolean" }).notNull().default(false), + redeemedBy: integer("redeemed_by").references(() => users.id), + redeemedAt: integer("redeemed_at", { mode: "timestamp" }), + createdBy: integer("created_by").notNull().references(() => staffUsers.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + notifCreds = sqliteTable("notif_creds", { + id: integer().primaryKey({ autoIncrement: true }), + token: text().notNull().unique(), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow(), + userId: integer("user_id").notNull().references(() => users.id), + lastVerified: integer("last_verified", { mode: "timestamp" }) + }); + unloggedUserTokens = sqliteTable("unlogged_user_tokens", { + id: integer().primaryKey({ autoIncrement: true }), + token: text().notNull().unique(), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow(), + lastVerified: integer("last_verified", { mode: "timestamp" }) + }); + userNotifications = sqliteTable("user_notifications", { + id: integer().primaryKey({ autoIncrement: true }), + title: text("title").notNull(), + imageUrl: text("image_url"), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + body: text("body").notNull(), + applicableUsers: jsonText("applicable_users") + }); + usersRelations = relations(users, ({ many, one }) => ({ + addresses: many(addresses), + orders: many(orders), + notifications: many(notifications), + cartItems: many(cartItems), + userCreds: one(userCreds), + coupons: many(coupons), + couponUsages: many(couponUsage), + applicableCoupons: many(couponApplicableUsers), + userDetails: one(userDetails), + notifCreds: many(notifCreds), + userIncidents: many(userIncidents) + })); + userCredsRelations = relations(userCreds, ({ one }) => ({ + user: one(users, { fields: [userCreds.userId], references: [users.id] }) + })); + staffUsersRelations = relations(staffUsers, ({ one, many }) => ({ + role: one(staffRoles, { fields: [staffUsers.staffRoleId], references: [staffRoles.id] }), + coupons: many(coupons), + stores: many(storeInfo) + })); + addressesRelations = relations(addresses, ({ one, many }) => ({ + user: one(users, { fields: [addresses.userId], references: [users.id] }), + orders: many(orders), + zone: one(addressZones, { fields: [addresses.zoneId], references: [addressZones.id] }) + })); + unitsRelations = relations(units, ({ many }) => ({ + products: many(productInfo) + })); + productInfoRelations = relations(productInfo, ({ one, many }) => ({ + unit: one(units, { fields: [productInfo.unitId], references: [units.id] }), + store: one(storeInfo, { fields: [productInfo.storeId], references: [storeInfo.id] }), + productSlots: many(productSlots), + specialDeals: many(specialDeals), + orderItems: many(orderItems), + cartItems: many(cartItems), + tags: many(productTags), + applicableCoupons: many(couponApplicableProducts), + reviews: many(productReviews), + groups: many(productGroupMembership) + })); + productTagInfoRelations = relations(productTagInfo, ({ many }) => ({ + products: many(productTags) + })); + productTagsRelations = relations(productTags, ({ one }) => ({ + product: one(productInfo, { fields: [productTags.productId], references: [productInfo.id] }), + tag: one(productTagInfo, { fields: [productTags.tagId], references: [productTagInfo.id] }) + })); + deliverySlotInfoRelations = relations(deliverySlotInfo, ({ many }) => ({ + productSlots: many(productSlots), + orders: many(orders), + vendorSnippets: many(vendorSnippets) + })); + productSlotsRelations = relations(productSlots, ({ one }) => ({ + product: one(productInfo, { fields: [productSlots.productId], references: [productInfo.id] }), + slot: one(deliverySlotInfo, { fields: [productSlots.slotId], references: [deliverySlotInfo.id] }) + })); + specialDealsRelations = relations(specialDeals, ({ one }) => ({ + product: one(productInfo, { fields: [specialDeals.productId], references: [productInfo.id] }) + })); + ordersRelations = relations(orders, ({ one, many }) => ({ + user: one(users, { fields: [orders.userId], references: [users.id] }), + address: one(addresses, { fields: [orders.addressId], references: [addresses.id] }), + slot: one(deliverySlotInfo, { fields: [orders.slotId], references: [deliverySlotInfo.id] }), + orderItems: many(orderItems), + payment: one(payments), + paymentInfo: one(paymentInfoTable, { fields: [orders.paymentInfoId], references: [paymentInfoTable.id] }), + orderStatus: many(orderStatus), + refunds: many(refunds), + couponUsages: many(couponUsage), + userIncidents: many(userIncidents) + })); + orderItemsRelations = relations(orderItems, ({ one }) => ({ + order: one(orders, { fields: [orderItems.orderId], references: [orders.id] }), + product: one(productInfo, { fields: [orderItems.productId], references: [productInfo.id] }) + })); + orderStatusRelations = relations(orderStatus, ({ one }) => ({ + order: one(orders, { fields: [orderStatus.orderId], references: [orders.id] }), + user: one(users, { fields: [orderStatus.userId], references: [users.id] }), + refundCoupon: one(coupons, { fields: [orderStatus.refundCouponId], references: [coupons.id] }) + })); + paymentInfoRelations = relations(paymentInfoTable, ({ one }) => ({ + order: one(orders, { fields: [paymentInfoTable.id], references: [orders.paymentInfoId] }) + })); + paymentsRelations = relations(payments, ({ one }) => ({ + order: one(orders, { fields: [payments.orderId], references: [orders.id] }) + })); + refundsRelations = relations(refunds, ({ one }) => ({ + order: one(orders, { fields: [refunds.orderId], references: [orders.id] }) + })); + notificationsRelations = relations(notifications, ({ one }) => ({ + user: one(users, { fields: [notifications.userId], references: [users.id] }) + })); + productCategoriesRelations = relations(productCategories, ({}) => ({})); + cartItemsRelations = relations(cartItems, ({ one }) => ({ + user: one(users, { fields: [cartItems.userId], references: [users.id] }), + product: one(productInfo, { fields: [cartItems.productId], references: [productInfo.id] }) + })); + complaintsRelations = relations(complaints, ({ one }) => ({ + user: one(users, { fields: [complaints.userId], references: [users.id] }), + order: one(orders, { fields: [complaints.orderId], references: [orders.id] }) + })); + couponsRelations = relations(coupons, ({ one, many }) => ({ + creator: one(staffUsers, { fields: [coupons.createdBy], references: [staffUsers.id] }), + usages: many(couponUsage), + applicableUsers: many(couponApplicableUsers), + applicableProducts: many(couponApplicableProducts) + })); + couponUsageRelations = relations(couponUsage, ({ one }) => ({ + user: one(users, { fields: [couponUsage.userId], references: [users.id] }), + coupon: one(coupons, { fields: [couponUsage.couponId], references: [coupons.id] }), + order: one(orders, { fields: [couponUsage.orderId], references: [orders.id] }), + orderItem: one(orderItems, { fields: [couponUsage.orderItemId], references: [orderItems.id] }) + })); + userDetailsRelations = relations(userDetails, ({ one }) => ({ + user: one(users, { fields: [userDetails.userId], references: [users.id] }) + })); + notifCredsRelations = relations(notifCreds, ({ one }) => ({ + user: one(users, { fields: [notifCreds.userId], references: [users.id] }) + })); + userNotificationsRelations = relations(userNotifications, ({}) => ({ + // No relations needed for now + })); + storeInfoRelations = relations(storeInfo, ({ one, many }) => ({ + owner: one(staffUsers, { fields: [storeInfo.owner], references: [staffUsers.id] }), + products: many(productInfo) + })); + couponApplicableUsersRelations = relations(couponApplicableUsers, ({ one }) => ({ + coupon: one(coupons, { fields: [couponApplicableUsers.couponId], references: [coupons.id] }), + user: one(users, { fields: [couponApplicableUsers.userId], references: [users.id] }) + })); + couponApplicableProductsRelations = relations(couponApplicableProducts, ({ one }) => ({ + coupon: one(coupons, { fields: [couponApplicableProducts.couponId], references: [coupons.id] }), + product: one(productInfo, { fields: [couponApplicableProducts.productId], references: [productInfo.id] }) + })); + reservedCouponsRelations = relations(reservedCoupons, ({ one }) => ({ + redeemedUser: one(users, { fields: [reservedCoupons.redeemedBy], references: [users.id] }), + creator: one(staffUsers, { fields: [reservedCoupons.createdBy], references: [staffUsers.id] }) + })); + productReviewsRelations = relations(productReviews, ({ one }) => ({ + user: one(users, { fields: [productReviews.userId], references: [users.id] }), + product: one(productInfo, { fields: [productReviews.productId], references: [productInfo.id] }) + })); + addressZonesRelations = relations(addressZones, ({ many }) => ({ + addresses: many(addresses), + areas: many(addressAreas) + })); + addressAreasRelations = relations(addressAreas, ({ one }) => ({ + zone: one(addressZones, { fields: [addressAreas.zoneId], references: [addressZones.id] }) + })); + productGroupInfoRelations = relations(productGroupInfo, ({ many }) => ({ + memberships: many(productGroupMembership) + })); + productGroupMembershipRelations = relations(productGroupMembership, ({ one }) => ({ + product: one(productInfo, { fields: [productGroupMembership.productId], references: [productInfo.id] }), + group: one(productGroupInfo, { fields: [productGroupMembership.groupId], references: [productGroupInfo.id] }) + })); + homeBannersRelations = relations(homeBanners, ({}) => ({ + // Relations for productIds array would be more complex, skipping for now + })); + staffRolesRelations = relations(staffRoles, ({ many }) => ({ + staffUsers: many(staffUsers), + rolePermissions: many(staffRolePermissions) + })); + staffPermissionsRelations = relations(staffPermissions, ({ many }) => ({ + rolePermissions: many(staffRolePermissions) + })); + staffRolePermissionsRelations = relations(staffRolePermissions, ({ one }) => ({ + role: one(staffRoles, { fields: [staffRolePermissions.staffRoleId], references: [staffRoles.id] }), + permission: one(staffPermissions, { fields: [staffRolePermissions.staffPermissionId], references: [staffPermissions.id] }) + })); + userIncidentsRelations = relations(userIncidents, ({ one }) => ({ + user: one(users, { fields: [userIncidents.userId], references: [users.id] }), + order: one(orders, { fields: [userIncidents.orderId], references: [orders.id] }), + addedBy: one(staffUsers, { fields: [userIncidents.addedBy], references: [staffUsers.id] }) + })); + vendorSnippetsRelations = relations(vendorSnippets, ({ one }) => ({ + slot: one(deliverySlotInfo, { fields: [vendorSnippets.slotId], references: [deliverySlotInfo.id] }) + })); + } +}); + +// ../../packages/db_helper_sqlite/src/db/db_index.ts +function initDb(database) { + const base = drizzle(database, { schema: schema_exports }); + dbInstance = Object.assign(base, { + transaction: async (handler) => { + return handler(base); + } + }); +} +var dbInstance, db; +var init_db_index = __esm({ + "../../packages/db_helper_sqlite/src/db/db_index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_d1(); + init_schema(); + dbInstance = null; + __name(initDb, "initDb"); + db = new Proxy({}, { + get(_target, prop) { + if (!dbInstance) { + throw new Error("D1 database not initialized. Call initDb(env.DB) before using db helpers."); + } + return dbInstance[prop]; + } + }); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/banner.ts +async function getBanners() { + const banners = await db.query.homeBanners.findMany({ + orderBy: desc(homeBanners.createdAt) + }); + return banners.map((banner) => ({ + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description, + productIds: banner.productIds || [], + redirectUrl: banner.redirectUrl, + serialNum: banner.serialNum, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + })); +} +async function getBannerById(id) { + const banner = await db.query.homeBanners.findFirst({ + where: eq(homeBanners.id, id) + }); + if (!banner) + return null; + return { + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description, + productIds: banner.productIds || [], + redirectUrl: banner.redirectUrl, + serialNum: banner.serialNum, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + }; +} +async function createBanner(input) { + const [banner] = await db.insert(homeBanners).values({ + name: input.name, + imageUrl: input.imageUrl, + description: input.description, + productIds: input.productIds || [], + redirectUrl: input.redirectUrl, + serialNum: input.serialNum, + isActive: input.isActive + }).returning(); + return { + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description, + productIds: banner.productIds || [], + redirectUrl: banner.redirectUrl, + serialNum: banner.serialNum, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + }; +} +async function updateBanner(id, input) { + const [banner] = await db.update(homeBanners).set({ + ...input, + lastUpdated: /* @__PURE__ */ new Date() + }).where(eq(homeBanners.id, id)).returning(); + return { + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description, + productIds: banner.productIds || [], + redirectUrl: banner.redirectUrl, + serialNum: banner.serialNum, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + }; +} +async function deleteBanner(id) { + await db.delete(homeBanners).where(eq(homeBanners.id, id)); +} +var init_banner = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/banner.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getBanners, "getBanners"); + __name(getBannerById, "getBannerById"); + __name(createBanner, "createBanner"); + __name(updateBanner, "updateBanner"); + __name(deleteBanner, "deleteBanner"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/complaint.ts +async function getComplaints(cursor, limit = 20) { + const whereCondition = cursor ? lt(complaints.id, cursor) : void 0; + const complaintsData = await db.select({ + id: complaints.id, + complaintBody: complaints.complaintBody, + userId: complaints.userId, + orderId: complaints.orderId, + isResolved: complaints.isResolved, + response: complaints.response, + createdAt: complaints.createdAt, + images: complaints.images, + userName: users.name, + userMobile: users.mobile + }).from(complaints).leftJoin(users, eq(complaints.userId, users.id)).where(whereCondition).orderBy(desc(complaints.id)).limit(limit + 1); + const hasMore = complaintsData.length > limit; + const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData; + return { + complaints: complaintsToReturn.map((c2) => ({ + id: c2.id, + complaintBody: c2.complaintBody, + userId: c2.userId, + orderId: c2.orderId, + isResolved: c2.isResolved, + response: c2.response, + createdAt: c2.createdAt, + images: c2.images, + userName: c2.userName, + userMobile: c2.userMobile + })), + hasMore + }; +} +async function resolveComplaint(id, response) { + await db.update(complaints).set({ isResolved: true, response }).where(eq(complaints.id, id)); +} +var init_complaint = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/complaint.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getComplaints, "getComplaints"); + __name(resolveComplaint, "resolveComplaint"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/const.ts +async function getAllConstants() { + const constants2 = await db.select().from(keyValStore); + return constants2.map((c2) => ({ + key: c2.key, + value: c2.value + })); +} +async function upsertConstants(constants2) { + await db.transaction(async (tx) => { + for (const { key, value } of constants2) { + await tx.insert(keyValStore).values({ key, value }).onConflictDoUpdate({ + target: keyValStore.key, + set: { value } + }); + } + }); +} +var init_const = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/const.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + __name(getAllConstants, "getAllConstants"); + __name(upsertConstants, "upsertConstants"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/coupon.ts +async function getAllCoupons(cursor, limit = 50, search) { + let whereCondition = void 0; + const conditions = []; + if (cursor) { + conditions.push(lt(coupons.id, cursor)); + } + if (search && search.trim()) { + conditions.push(like(coupons.couponCode, `%${search}%`)); + } + if (conditions.length > 0) { + whereCondition = and(...conditions); + } + const result = await db.query.coupons.findMany({ + where: whereCondition, + with: { + creator: true, + applicableUsers: { + with: { + user: true + } + }, + applicableProducts: { + with: { + product: true + } + } + }, + orderBy: desc(coupons.createdAt), + limit: limit + 1 + }); + const hasMore = result.length > limit; + const couponsList = hasMore ? result.slice(0, limit) : result; + return { coupons: couponsList, hasMore }; +} +async function getCouponById(id) { + return await db.query.coupons.findFirst({ + where: eq(coupons.id, id), + with: { + creator: true, + applicableUsers: { + with: { + user: true + } + }, + applicableProducts: { + with: { + product: true + } + } + } + }); +} +async function createCouponWithRelations(input, applicableUsers, applicableProducts) { + return await db.transaction(async (tx) => { + const [coupon] = await tx.insert(coupons).values({ + couponCode: input.couponCode, + isUserBased: input.isUserBased, + discountPercent: input.discountPercent, + flatDiscount: input.flatDiscount, + minOrder: input.minOrder, + productIds: input.productIds, + createdBy: input.createdBy, + maxValue: input.maxValue, + isApplyForAll: input.isApplyForAll, + validTill: input.validTill, + maxLimitForUser: input.maxLimitForUser, + exclusiveApply: input.exclusiveApply + }).returning(); + if (applicableUsers && applicableUsers.length > 0) { + await tx.insert(couponApplicableUsers).values( + applicableUsers.map((userId) => ({ + couponId: coupon.id, + userId + })) + ); + } + if (applicableProducts && applicableProducts.length > 0) { + await tx.insert(couponApplicableProducts).values( + applicableProducts.map((productId) => ({ + couponId: coupon.id, + productId + })) + ); + } + return coupon; + }); +} +async function updateCouponWithRelations(id, input, applicableUsers, applicableProducts) { + return await db.transaction(async (tx) => { + const [coupon] = await tx.update(coupons).set({ + ...input + }).where(eq(coupons.id, id)).returning(); + if (applicableUsers !== void 0) { + await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.couponId, id)); + if (applicableUsers.length > 0) { + await tx.insert(couponApplicableUsers).values( + applicableUsers.map((userId) => ({ + couponId: id, + userId + })) + ); + } + } + if (applicableProducts !== void 0) { + await tx.delete(couponApplicableProducts).where(eq(couponApplicableProducts.couponId, id)); + if (applicableProducts.length > 0) { + await tx.insert(couponApplicableProducts).values( + applicableProducts.map((productId) => ({ + couponId: id, + productId + })) + ); + } + } + return coupon; + }); +} +async function invalidateCoupon(id) { + const result = await db.update(coupons).set({ isInvalidated: true }).where(eq(coupons.id, id)).returning(); + return result[0]; +} +async function validateCoupon(code, userId, orderAmount) { + const coupon = await db.query.coupons.findFirst({ + where: and( + eq(coupons.couponCode, code.toUpperCase()), + eq(coupons.isInvalidated, false) + ) + }); + if (!coupon) { + return { valid: false, message: "Coupon not found or invalidated" }; + } + if (coupon.validTill && new Date(coupon.validTill) < /* @__PURE__ */ new Date()) { + return { valid: false, message: "Coupon has expired" }; + } + if (!coupon.isApplyForAll && !coupon.isUserBased) { + return { valid: false, message: "Coupon is not available for use" }; + } + const minOrderValue2 = coupon.minOrder ? parseFloat(coupon.minOrder) : 0; + if (minOrderValue2 > 0 && orderAmount < minOrderValue2) { + return { valid: false, message: `Minimum order amount is ${minOrderValue2}` }; + } + let discountAmount = 0; + if (coupon.discountPercent) { + const percent = parseFloat(coupon.discountPercent); + discountAmount = orderAmount * percent / 100; + } else if (coupon.flatDiscount) { + discountAmount = parseFloat(coupon.flatDiscount); + } + const maxValueLimit = coupon.maxValue ? parseFloat(coupon.maxValue) : 0; + if (maxValueLimit > 0 && discountAmount > maxValueLimit) { + discountAmount = maxValueLimit; + } + return { + valid: true, + discountAmount, + coupon: { + id: coupon.id, + discountPercent: coupon.discountPercent, + flatDiscount: coupon.flatDiscount, + maxValue: coupon.maxValue + } + }; +} +async function getReservedCoupons(cursor, limit = 50, search) { + let whereCondition = void 0; + const conditions = []; + if (cursor) { + conditions.push(lt(reservedCoupons.id, cursor)); + } + if (search && search.trim()) { + conditions.push(or( + like(reservedCoupons.secretCode, `%${search}%`), + like(reservedCoupons.couponCode, `%${search}%`) + )); + } + if (conditions.length > 0) { + whereCondition = and(...conditions); + } + const result = await db.query.reservedCoupons.findMany({ + where: whereCondition, + with: { + redeemedUser: true, + creator: true + }, + orderBy: desc(reservedCoupons.createdAt), + limit: limit + 1 + }); + const hasMore = result.length > limit; + const couponsList = hasMore ? result.slice(0, limit) : result; + return { coupons: couponsList, hasMore }; +} +async function createReservedCouponWithProducts(input, applicableProducts) { + return await db.transaction(async (tx) => { + const [coupon] = await tx.insert(reservedCoupons).values({ + secretCode: input.secretCode, + couponCode: input.couponCode, + discountPercent: input.discountPercent, + flatDiscount: input.flatDiscount, + minOrder: input.minOrder, + productIds: input.productIds, + maxValue: input.maxValue, + validTill: input.validTill, + maxLimitForUser: input.maxLimitForUser, + exclusiveApply: input.exclusiveApply, + createdBy: input.createdBy + }).returning(); + if (applicableProducts && applicableProducts.length > 0) { + await tx.insert(couponApplicableProducts).values( + applicableProducts.map((productId) => ({ + couponId: coupon.id, + productId + })) + ); + } + return coupon; + }); +} +async function checkUsersExist(userIds) { + const existingUsers = await db.query.users.findMany({ + where: inArray(users.id, userIds), + columns: { id: true } + }); + return existingUsers.length === userIds.length; +} +async function checkCouponExists(couponCode) { + const existing = await db.query.coupons.findFirst({ + where: eq(coupons.couponCode, couponCode) + }); + return !!existing; +} +async function checkReservedCouponExists(secretCode) { + const existing = await db.query.reservedCoupons.findFirst({ + where: eq(reservedCoupons.secretCode, secretCode) + }); + return !!existing; +} +async function generateCancellationCoupon(orderId, staffUserId, userId, orderAmount, couponCode) { + return await db.transaction(async (tx) => { + const expiryDate = /* @__PURE__ */ new Date(); + expiryDate.setDate(expiryDate.getDate() + 30); + const [coupon] = await tx.insert(coupons).values({ + couponCode, + isUserBased: true, + flatDiscount: orderAmount.toString(), + minOrder: orderAmount.toString(), + maxValue: orderAmount.toString(), + validTill: expiryDate, + maxLimitForUser: 1, + createdBy: staffUserId, + isApplyForAll: false + }).returning(); + await tx.insert(couponApplicableUsers).values({ + couponId: coupon.id, + userId + }); + await tx.update(orderStatus).set({ refundCouponId: coupon.id }).where(eq(orderStatus.orderId, orderId)); + return coupon; + }); +} +async function getOrderWithUser(orderId) { + return await db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + user: true + } + }); +} +async function createCouponForUser(mobile, couponCode, staffUserId) { + return await db.transaction(async (tx) => { + let user = await tx.query.users.findFirst({ + where: eq(users.mobile, mobile) + }); + if (!user) { + const [newUser] = await tx.insert(users).values({ + name: null, + email: null, + mobile + }).returning(); + user = newUser; + } + const [coupon] = await tx.insert(coupons).values({ + couponCode, + isUserBased: true, + discountPercent: "20", + minOrder: "1000", + maxValue: "500", + maxLimitForUser: 1, + isApplyForAll: false, + exclusiveApply: false, + createdBy: staffUserId, + validTill: new Date(Date.now() + 90 * 24 * 60 * 60 * 1e3) + }).returning(); + await tx.insert(couponApplicableUsers).values({ + couponId: coupon.id, + userId: user.id + }); + return { + coupon, + user: { + id: user.id, + mobile: user.mobile, + name: user.name + } + }; + }); +} +async function getUsersForCoupon(search, limit = 20, offset = 0) { + let whereCondition = void 0; + if (search && search.trim()) { + whereCondition = or( + like(users.name, `%${search}%`), + like(users.mobile, `%${search}%`) + ); + } + const userList = await db.query.users.findMany({ + where: whereCondition, + columns: { + id: true, + name: true, + mobile: true + }, + limit, + offset, + orderBy: asc(users.name) + }); + return { + users: userList.map((user) => ({ + id: user.id, + name: user.name || "Unknown", + mobile: user.mobile + })) + }; +} +var init_coupon = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/coupon.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getAllCoupons, "getAllCoupons"); + __name(getCouponById, "getCouponById"); + __name(createCouponWithRelations, "createCouponWithRelations"); + __name(updateCouponWithRelations, "updateCouponWithRelations"); + __name(invalidateCoupon, "invalidateCoupon"); + __name(validateCoupon, "validateCoupon"); + __name(getReservedCoupons, "getReservedCoupons"); + __name(createReservedCouponWithProducts, "createReservedCouponWithProducts"); + __name(checkUsersExist, "checkUsersExist"); + __name(checkCouponExists, "checkCouponExists"); + __name(checkReservedCouponExists, "checkReservedCouponExists"); + __name(generateCancellationCoupon, "generateCancellationCoupon"); + __name(getOrderWithUser, "getOrderWithUser"); + __name(createCouponForUser, "createCouponForUser"); + __name(getUsersForCoupon, "getUsersForCoupon"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/order.ts +async function updateOrderNotes(orderId, adminNotes) { + const [result] = await db.update(orders).set({ adminNotes }).where(eq(orders.id, orderId)).returning(); + return result || null; +} +async function updateOrderPackaged(orderId, isPackaged) { + const orderIdNumber = parseInt(orderId); + await db.update(orderItems).set({ is_packaged: isPackaged }).where(eq(orderItems.orderId, orderIdNumber)); + if (!isPackaged) { + await db.update(orderStatus).set({ isPackaged, isDelivered: false }).where(eq(orderStatus.orderId, orderIdNumber)); + } else { + await db.update(orderStatus).set({ isPackaged }).where(eq(orderStatus.orderId, orderIdNumber)); + } + const order = await db.query.orders.findFirst({ + where: eq(orders.id, orderIdNumber) + }); + return { success: true, userId: order?.userId ?? null }; +} +async function updateOrderDelivered(orderId, isDelivered) { + const orderIdNumber = parseInt(orderId); + await db.update(orderStatus).set({ isDelivered }).where(eq(orderStatus.orderId, orderIdNumber)); + const order = await db.query.orders.findFirst({ + where: eq(orders.id, orderIdNumber) + }); + return { success: true, userId: order?.userId ?? null }; +} +async function getOrderDetails(orderId) { + const orderData = await db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + user: true, + address: true, + slot: true, + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + }, + payment: true, + paymentInfo: true, + orderStatus: true, + refunds: true + } + }); + if (!orderData) { + return null; + } + const couponUsageData = await db.query.couponUsage.findMany({ + where: eq(couponUsage.orderId, orderData.id), + with: { + coupon: true + } + }); + let couponData = null; + if (couponUsageData.length > 0) { + let totalDiscountAmount = 0; + const orderTotal = parseFloat((orderData.totalAmount ?? "0").toString()); + for (const usage of couponUsageData) { + let discountAmount = 0; + if (usage.coupon.discountPercent) { + discountAmount = orderTotal * parseFloat(usage.coupon.discountPercent.toString()) / 100; + } else if (usage.coupon.flatDiscount) { + discountAmount = parseFloat(usage.coupon.flatDiscount.toString()); + } + if (usage.coupon.maxValue && discountAmount > parseFloat(usage.coupon.maxValue.toString())) { + discountAmount = parseFloat(usage.coupon.maxValue.toString()); + } + totalDiscountAmount += discountAmount; + } + couponData = { + couponCode: couponUsageData.map((u5) => u5.coupon.couponCode).join(", "), + couponDescription: `${couponUsageData.length} coupons applied`, + discountAmount: totalDiscountAmount + }; + } + const statusRecord = orderData.orderStatus?.[0]; + const orderStatusRecord = statusRecord ? mapOrderStatusRecord(statusRecord) : null; + let status = "pending"; + if (orderStatusRecord?.isCancelled) { + status = "cancelled"; + } else if (orderStatusRecord?.isDelivered) { + status = "delivered"; + } + const refund = orderData.refunds?.[0]; + const refundStatus = refund?.refundStatus && isRefundStatus(refund.refundStatus) ? refund.refundStatus : null; + const refundRecord = refund ? { + id: refund.id, + orderId: refund.orderId, + refundAmount: refund.refundAmount, + refundStatus, + merchantRefundId: refund.merchantRefundId, + refundProcessedAt: refund.refundProcessedAt, + createdAt: refund.createdAt + } : null; + return { + id: orderData.id, + readableId: orderData.id, + userId: orderData.user.id, + customerName: `${orderData.user.name}`, + customerEmail: orderData.user.email, + customerMobile: orderData.user.mobile, + address: { + name: orderData.address.name, + line1: orderData.address.addressLine1, + line2: orderData.address.addressLine2, + city: orderData.address.city, + state: orderData.address.state, + pincode: orderData.address.pincode, + phone: orderData.address.phone + }, + slotInfo: orderData.slot ? { + time: orderData.slot.deliveryTime.toISOString(), + sequence: orderData.slot.deliverySequence + } : null, + isCod: orderData.isCod, + isOnlinePayment: orderData.isOnlinePayment, + totalAmount: parseFloat(orderData.totalAmount?.toString() || "0") - parseFloat(orderData.deliveryCharge?.toString() || "0"), + deliveryCharge: parseFloat(orderData.deliveryCharge?.toString() || "0"), + adminNotes: orderData.adminNotes, + userNotes: orderData.userNotes, + createdAt: orderData.createdAt, + status, + isPackaged: orderStatusRecord?.isPackaged || false, + isDelivered: orderStatusRecord?.isDelivered || false, + items: orderData.orderItems.map((item) => ({ + id: item.id, + name: item.product.name, + quantity: item.quantity, + productSize: item.product.productQuantity, + price: item.price, + unit: item.product.unit?.shortNotation, + amount: parseFloat(item.price.toString()) * parseFloat(item.quantity || "0"), + isPackaged: item.is_packaged, + isPackageVerified: item.is_package_verified + })), + payment: orderData.payment ? { + status: orderData.payment.status, + gateway: orderData.payment.gateway, + merchantOrderId: orderData.payment.merchantOrderId + } : null, + paymentInfo: orderData.paymentInfo ? { + status: orderData.paymentInfo.status, + gateway: orderData.paymentInfo.gateway, + merchantOrderId: orderData.paymentInfo.merchantOrderId + } : null, + cancelReason: orderStatusRecord?.cancelReason || null, + cancellationReviewed: orderStatusRecord?.cancellationReviewed || false, + isRefundDone: refundStatus === "processed" || false, + refundStatus, + refundAmount: refund?.refundAmount ? parseFloat(refund.refundAmount.toString()) : null, + couponData, + couponCode: couponData?.couponCode || null, + couponDescription: couponData?.couponDescription || null, + discountAmount: couponData?.discountAmount || null, + orderStatus: orderStatusRecord, + refundRecord, + isFlashDelivery: orderData.isFlashDelivery + }; +} +async function updateOrderItemPackaging(orderItemId, isPackaged, isPackageVerified) { + const orderItem = await db.query.orderItems.findFirst({ + where: eq(orderItems.id, orderItemId) + }); + if (!orderItem) { + return { success: false, updated: false }; + } + const updateData = {}; + if (isPackaged !== void 0) { + updateData.is_packaged = isPackaged; + } + if (isPackageVerified !== void 0) { + updateData.is_package_verified = isPackageVerified; + } + await db.update(orderItems).set(updateData).where(eq(orderItems.id, orderItemId)); + return { success: true, updated: true }; +} +async function removeDeliveryCharge(orderId) { + const order = await db.query.orders.findFirst({ + where: eq(orders.id, orderId) + }); + if (!order) { + return null; + } + const currentDeliveryCharge = parseFloat(order.deliveryCharge?.toString() || "0"); + const currentTotalAmount = parseFloat(order.totalAmount?.toString() || "0"); + const newTotalAmount = currentTotalAmount - currentDeliveryCharge; + await db.update(orders).set({ + deliveryCharge: "0", + totalAmount: newTotalAmount.toString() + }).where(eq(orders.id, orderId)); + return { success: true, message: "Delivery charge removed" }; +} +async function getSlotOrders(slotId) { + const slotOrders = await db.query.orders.findMany({ + where: eq(orders.slotId, parseInt(slotId)), + with: { + user: true, + address: true, + slot: true, + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + }, + orderStatus: true + } + }); + const filteredOrders = slotOrders.filter((order) => { + const statusRecord = order.orderStatus[0]; + return order.isCod || statusRecord && statusRecord.paymentStatus === "success"; + }); + const formattedOrders = filteredOrders.map((order) => { + const statusRecord = order.orderStatus[0]; + let status = "pending"; + if (statusRecord?.isCancelled) { + status = "cancelled"; + } else if (statusRecord?.isDelivered) { + status = "delivered"; + } + const items = order.orderItems.map((item) => ({ + id: item.id, + name: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat(item.price.toString()), + amount: parseFloat(item.quantity) * parseFloat(item.price.toString()), + unit: item.product.unit?.shortNotation || "", + isPackaged: item.is_packaged, + isPackageVerified: item.is_package_verified + })); + const paymentMode = order.isCod ? "COD" : "Online"; + return { + id: order.id, + readableId: order.id, + customerName: order.user.name || order.user.mobile + "", + address: `${order.address.addressLine1}${order.address.addressLine2 ? `, ${order.address.addressLine2}` : ""}, ${order.address.city}, ${order.address.state} - ${order.address.pincode}, Phone: ${order.address.phone}`, + addressId: order.addressId, + latitude: order.address.adminLatitude ?? order.address.latitude, + longitude: order.address.adminLongitude ?? order.address.longitude, + totalAmount: parseFloat(order.totalAmount), + items, + deliveryTime: order.slot?.deliveryTime.toISOString() || null, + status, + isPackaged: order.orderItems.every((item) => item.is_packaged) || false, + isDelivered: statusRecord?.isDelivered || false, + isCod: order.isCod, + paymentMode, + paymentStatus: isPaymentStatus(statusRecord?.paymentStatus || "pending") ? statusRecord?.paymentStatus || "pending" : "pending", + slotId: order.slotId, + adminNotes: order.adminNotes, + userNotes: order.userNotes + }; + }); + return { success: true, data: formattedOrders }; +} +async function updateAddressCoords(addressId, latitude, longitude) { + const result = await db.update(addresses).set({ + adminLatitude: latitude, + adminLongitude: longitude + }).where(eq(addresses.id, addressId)).returning(); + return { success: result.length > 0 }; +} +async function getAllOrders(input) { + const { + cursor, + limit, + slotId, + packagedFilter, + deliveredFilter, + cancellationFilter, + flashDeliveryFilter + } = input; + let whereCondition = eq(orders.id, orders.id); + if (cursor) { + whereCondition = and(whereCondition, lt(orders.id, cursor)); + } + if (slotId) { + whereCondition = and(whereCondition, eq(orders.slotId, slotId)); + } + if (packagedFilter === "packaged") { + whereCondition = and(whereCondition, eq(orderStatus.isPackaged, true)); + } else if (packagedFilter === "not_packaged") { + whereCondition = and(whereCondition, eq(orderStatus.isPackaged, false)); + } + if (deliveredFilter === "delivered") { + whereCondition = and(whereCondition, eq(orderStatus.isDelivered, true)); + } else if (deliveredFilter === "not_delivered") { + whereCondition = and(whereCondition, eq(orderStatus.isDelivered, false)); + } + if (cancellationFilter === "cancelled") { + whereCondition = and(whereCondition, eq(orderStatus.isCancelled, true)); + } else if (cancellationFilter === "not_cancelled") { + whereCondition = and(whereCondition, eq(orderStatus.isCancelled, false)); + } + if (flashDeliveryFilter === "flash") { + whereCondition = and(whereCondition, eq(orders.isFlashDelivery, true)); + } else if (flashDeliveryFilter === "regular") { + whereCondition = and(whereCondition, eq(orders.isFlashDelivery, false)); + } + const allOrders = await db.query.orders.findMany({ + where: whereCondition, + orderBy: desc(orders.createdAt), + limit: limit + 1, + with: { + user: true, + address: true, + slot: true, + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + }, + orderStatus: true + } + }); + const hasMore = allOrders.length > limit; + const ordersToReturn = hasMore ? allOrders.slice(0, limit) : allOrders; + const filteredOrders = ordersToReturn.filter((order) => { + const statusRecord = order.orderStatus[0]; + return order.isCod || statusRecord && statusRecord.paymentStatus === "success"; + }); + const formattedOrders = filteredOrders.map((order) => { + const statusRecord = order.orderStatus[0]; + let status = "pending"; + if (statusRecord?.isCancelled) { + status = "cancelled"; + } else if (statusRecord?.isDelivered) { + status = "delivered"; + } + const items = order.orderItems.map((item) => ({ + id: item.id, + name: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat(item.price.toString()), + amount: parseFloat(item.quantity) * parseFloat(item.price.toString()), + unit: item.product.unit?.shortNotation || "", + productSize: item.product.productQuantity, + isPackaged: item.is_packaged, + isPackageVerified: item.is_package_verified + })).sort((first, second) => first.id - second.id); + return { + id: order.id, + orderId: order.id.toString(), + readableId: order.id, + customerName: order.user.name || order.user.mobile + "", + customerMobile: order.user.mobile, + address: `${order.address.addressLine1}${order.address.addressLine2 ? `, ${order.address.addressLine2}` : ""}, ${order.address.city}, ${order.address.state} - ${order.address.pincode}, Phone: ${order.address.phone}`, + addressId: order.addressId, + latitude: order.address.adminLatitude ?? order.address.latitude, + longitude: order.address.adminLongitude ?? order.address.longitude, + totalAmount: parseFloat(order.totalAmount), + deliveryCharge: parseFloat(order.deliveryCharge || "0"), + items, + createdAt: order.createdAt, + deliveryTime: order.slot?.deliveryTime.toISOString() || null, + status, + isPackaged: order.orderItems.every((item) => item.is_packaged) || false, + isDelivered: statusRecord?.isDelivered || false, + isCod: order.isCod, + isFlashDelivery: order.isFlashDelivery, + userNotes: order.userNotes, + adminNotes: order.adminNotes, + userNegativityScore: 0, + userId: order.userId + }; + }); + return { + orders: formattedOrders, + nextCursor: hasMore ? ordersToReturn[ordersToReturn.length - 1].id : void 0 + }; +} +async function rebalanceSlots(slotIds) { + const ordersList = await db.query.orders.findMany({ + where: inArray(orders.slotId, slotIds), + with: { + orderItems: { + with: { + product: true + } + }, + couponUsages: { + with: { + coupon: true + } + } + } + }); + const processedOrdersData = ordersList.map((order) => { + let newTotal = order.orderItems.reduce((acc, item) => { + const latestPrice = +item.product.price; + const amount = latestPrice * Number(item.quantity); + return acc + amount; + }, 0); + order.orderItems.forEach((item) => { + item.price = item.product.price; + item.discountedPrice = item.product.price; + }); + const coupon = order.couponUsages[0]?.coupon; + let discount = 0; + if (coupon && !coupon.isInvalidated && (!coupon.validTill || new Date(coupon.validTill) > /* @__PURE__ */ new Date())) { + const proportion = Number(order.orderGroupProportion || 1); + if (coupon.discountPercent) { + const maxDiscount = Number(coupon.maxValue || Infinity) * proportion; + discount = Math.min(newTotal * parseFloat(coupon.discountPercent) / 100, maxDiscount); + } else { + discount = Number(coupon.flatDiscount) * proportion; + } + } + newTotal -= discount; + const { couponUsages, orderItems: orderItemsRaw, ...rest } = order; + const updatedOrderItems = orderItemsRaw.map((item) => { + const { product, ...rawOrderItem } = item; + return rawOrderItem; + }); + return { order: rest, updatedOrderItems, newTotal }; + }); + const updatedOrderIds = []; + await db.transaction(async (tx) => { + for (const { order, updatedOrderItems, newTotal } of processedOrdersData) { + await tx.update(orders).set({ totalAmount: newTotal.toString() }).where(eq(orders.id, order.id)); + updatedOrderIds.push(order.id); + for (const item of updatedOrderItems) { + await tx.update(orderItems).set({ + price: item.price, + discountedPrice: item.discountedPrice + }).where(eq(orderItems.id, item.id)); + } + } + }); + return { + success: true, + updatedOrders: updatedOrderIds, + message: `Rebalanced ${updatedOrderIds.length} orders.` + }; +} +async function cancelOrder(orderId, reason) { + const order = await db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + orderStatus: true + } + }); + if (!order) { + return { success: false, message: "Order not found", error: "order_not_found" }; + } + const status = order.orderStatus[0]; + if (!status) { + return { success: false, message: "Order status not found", error: "status_not_found" }; + } + if (status.isCancelled) { + return { success: false, message: "Order is already cancelled", error: "already_cancelled" }; + } + if (status.isDelivered) { + return { success: false, message: "Cannot cancel delivered order", error: "already_delivered" }; + } + const result = await db.transaction(async (tx) => { + await tx.update(orderStatus).set({ + isCancelled: true, + isCancelledByAdmin: true, + cancelReason: reason, + cancellationAdminNotes: reason, + cancellationReviewed: true, + cancellationReviewedAt: /* @__PURE__ */ new Date() + }).where(eq(orderStatus.id, status.id)); + const refundStatus = order.isCod ? "na" : "pending"; + await tx.insert(refunds).values({ + orderId: order.id, + refundStatus + }); + return { orderId: order.id, userId: order.userId }; + }); + return { + success: true, + message: "Order cancelled successfully", + orderId: result.orderId, + userId: result.userId + }; +} +async function deleteOrderById(orderId) { + await db.transaction(async (tx) => { + await tx.delete(orderItems).where(eq(orderItems.orderId, orderId)); + await tx.delete(orderStatus).where(eq(orderStatus.orderId, orderId)); + await tx.delete(payments).where(eq(payments.orderId, orderId)); + await tx.delete(refunds).where(eq(refunds.orderId, orderId)); + await tx.delete(couponUsage).where(eq(couponUsage.orderId, orderId)); + await tx.delete(complaints).where(eq(complaints.orderId, orderId)); + await tx.delete(orders).where(eq(orders.id, orderId)); + }); +} +var isPaymentStatus, isRefundStatus, mapOrderStatusRecord; +var init_order = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/order.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + isPaymentStatus = /* @__PURE__ */ __name((value) => value === "pending" || value === "success" || value === "cod" || value === "failed", "isPaymentStatus"); + isRefundStatus = /* @__PURE__ */ __name((value) => value === "success" || value === "pending" || value === "failed" || value === "none" || value === "na" || value === "processed", "isRefundStatus"); + mapOrderStatusRecord = /* @__PURE__ */ __name((record2) => ({ + id: record2.id, + orderTime: record2.orderTime, + userId: record2.userId, + orderId: record2.orderId, + isPackaged: record2.isPackaged, + isDelivered: record2.isDelivered, + isCancelled: record2.isCancelled, + cancelReason: record2.cancelReason ?? null, + isCancelledByAdmin: record2.isCancelledByAdmin ?? null, + paymentStatus: isPaymentStatus(record2.paymentStatus) ? record2.paymentStatus : "pending", + cancellationUserNotes: record2.cancellationUserNotes ?? null, + cancellationAdminNotes: record2.cancellationAdminNotes ?? null, + cancellationReviewed: record2.cancellationReviewed, + cancellationReviewedAt: record2.cancellationReviewedAt ?? null, + refundCouponId: record2.refundCouponId ?? null + }), "mapOrderStatusRecord"); + __name(updateOrderNotes, "updateOrderNotes"); + __name(updateOrderPackaged, "updateOrderPackaged"); + __name(updateOrderDelivered, "updateOrderDelivered"); + __name(getOrderDetails, "getOrderDetails"); + __name(updateOrderItemPackaging, "updateOrderItemPackaging"); + __name(removeDeliveryCharge, "removeDeliveryCharge"); + __name(getSlotOrders, "getSlotOrders"); + __name(updateAddressCoords, "updateAddressCoords"); + __name(getAllOrders, "getAllOrders"); + __name(rebalanceSlots, "rebalanceSlots"); + __name(cancelOrder, "cancelOrder"); + __name(deleteOrderById, "deleteOrderById"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/product.ts +async function getAllProducts() { + const products = await db.query.productInfo.findMany({ + orderBy: productInfo.name, + with: { + unit: true, + store: true + } + }); + return products.map((product) => ({ + ...mapProduct(product), + unit: mapUnit(product.unit), + store: product.store ? mapStore(product.store) : null + })); +} +async function getProductById(id) { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.id, id), + with: { + unit: true + } + }); + if (!product) { + return null; + } + const deals = await db.query.specialDeals.findMany({ + where: eq(specialDeals.productId, id), + orderBy: specialDeals.quantity + }); + const productTagsData = await db.query.productTags.findMany({ + where: eq(productTags.productId, id), + with: { + tag: true + } + }); + return { + ...mapProduct(product), + unit: mapUnit(product.unit), + deals: deals.map(mapSpecialDeal), + tags: productTagsData.map((tag2) => mapTagInfo(tag2.tag)) + }; +} +async function deleteProduct(id) { + const [deletedProduct] = await db.delete(productInfo).where(eq(productInfo.id, id)).returning(); + if (!deletedProduct) { + return null; + } + return mapProduct(deletedProduct); +} +async function createProduct(input) { + const [product] = await db.insert(productInfo).values(input).returning(); + return mapProduct(product); +} +async function updateProduct(id, updates) { + const [product] = await db.update(productInfo).set(updates).where(eq(productInfo.id, id)).returning(); + if (!product) { + return null; + } + return mapProduct(product); +} +async function toggleProductOutOfStock(id) { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.id, id) + }); + if (!product) { + return null; + } + const [updatedProduct] = await db.update(productInfo).set({ + isOutOfStock: !product.isOutOfStock + }).where(eq(productInfo.id, id)).returning(); + if (!updatedProduct) { + return null; + } + return mapProduct(updatedProduct); +} +async function updateSlotProducts(slotId, productIds) { + const currentAssociations = await db.query.productSlots.findMany({ + where: eq(productSlots.slotId, parseInt(slotId)), + columns: { + productId: true + } + }); + const currentProductIds = currentAssociations.map((assoc) => assoc.productId); + const newProductIds = productIds.map((id) => parseInt(id)); + const productsToAdd = newProductIds.filter((id) => !currentProductIds.includes(id)); + const productsToRemove = currentProductIds.filter((id) => !newProductIds.includes(id)); + if (productsToRemove.length > 0) { + await db.delete(productSlots).where( + and( + eq(productSlots.slotId, parseInt(slotId)), + inArray(productSlots.productId, productsToRemove) + ) + ); + } + if (productsToAdd.length > 0) { + const newAssociations = productsToAdd.map((productId) => ({ + productId, + slotId: parseInt(slotId) + })); + await db.insert(productSlots).values(newAssociations); + } + return { + message: "Slot products updated successfully", + added: productsToAdd.length, + removed: productsToRemove.length + }; +} +async function getSlotProductIds(slotId) { + const associations = await db.query.productSlots.findMany({ + where: eq(productSlots.slotId, parseInt(slotId)), + columns: { + productId: true + } + }); + return associations.map((assoc) => assoc.productId); +} +async function getAllUnits() { + const allUnits = await db.query.units.findMany({ + orderBy: units.shortNotation + }); + return allUnits.map(mapUnit); +} +async function getAllProductTags() { + const tags = await db.query.productTagInfo.findMany({ + with: { + products: { + with: { + product: true + } + } + } + }); + return tags.map((tag2) => ({ + ...mapTagInfo(tag2), + products: tag2.products.map((assignment) => ({ + productId: assignment.productId, + tagId: assignment.tagId, + assignedAt: assignment.assignedAt, + product: mapProduct(assignment.product) + })) + })); +} +async function getAllProductTagInfos() { + const tags = await db.query.productTagInfo.findMany({ + orderBy: productTagInfo.tagName + }); + return tags.map(mapTagInfo); +} +async function getProductTagInfoById(tagId) { + const tag2 = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.id, tagId) + }); + if (!tag2) { + return null; + } + return mapTagInfo(tag2); +} +async function createProductTag(input) { + const [tag2] = await db.insert(productTagInfo).values({ + tagName: input.tagName, + tagDescription: input.tagDescription || null, + imageUrl: input.imageUrl || null, + isDashboardTag: input.isDashboardTag || false, + relatedStores: input.relatedStores || [] + }).returning(); + return { + ...mapTagInfo(tag2), + products: [] + }; +} +async function getProductTagById(tagId) { + const tag2 = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.id, tagId), + with: { + products: { + with: { + product: true + } + } + } + }); + if (!tag2) { + return null; + } + return { + ...mapTagInfo(tag2), + products: tag2.products.map((assignment) => ({ + productId: assignment.productId, + tagId: assignment.tagId, + assignedAt: assignment.assignedAt, + product: mapProduct(assignment.product) + })) + }; +} +async function updateProductTag(tagId, input) { + const [tag2] = await db.update(productTagInfo).set({ + ...input.tagName !== void 0 && { tagName: input.tagName }, + ...input.tagDescription !== void 0 && { tagDescription: input.tagDescription }, + ...input.imageUrl !== void 0 && { imageUrl: input.imageUrl }, + ...input.isDashboardTag !== void 0 && { isDashboardTag: input.isDashboardTag }, + ...input.relatedStores !== void 0 && { relatedStores: input.relatedStores } + }).where(eq(productTagInfo.id, tagId)).returning(); + const fullTag = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.id, tagId), + with: { + products: { + with: { + product: true + } + } + } + }); + return { + ...mapTagInfo(tag2), + products: fullTag?.products.map((assignment) => ({ + productId: assignment.productId, + tagId: assignment.tagId, + assignedAt: assignment.assignedAt, + product: mapProduct(assignment.product) + })) || [] + }; +} +async function deleteProductTag(tagId) { + await db.delete(productTagInfo).where(eq(productTagInfo.id, tagId)); +} +async function checkProductTagExistsByName(tagName) { + const tag2 = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.tagName, tagName) + }); + return !!tag2; +} +async function getSlotsProductIds(slotIds) { + if (slotIds.length === 0) { + return {}; + } + const associations = await db.query.productSlots.findMany({ + where: inArray(productSlots.slotId, slotIds), + columns: { + slotId: true, + productId: true + } + }); + const result = {}; + for (const assoc of associations) { + if (!result[assoc.slotId]) { + result[assoc.slotId] = []; + } + result[assoc.slotId].push(assoc.productId); + } + slotIds.forEach((slotId) => { + if (!result[slotId]) { + result[slotId] = []; + } + }); + return result; +} +async function getProductReviews(productId, limit, offset) { + const reviews = await db.select({ + id: productReviews.id, + reviewBody: productReviews.reviewBody, + ratings: productReviews.ratings, + imageUrls: productReviews.imageUrls, + reviewTime: productReviews.reviewTime, + adminResponse: productReviews.adminResponse, + adminResponseImages: productReviews.adminResponseImages, + userName: users.name + }).from(productReviews).innerJoin(users, eq(productReviews.userId, users.id)).where(eq(productReviews.productId, productId)).orderBy(desc(productReviews.reviewTime)).limit(limit).offset(offset); + const totalCountResult = await db.select({ count: sql`count(*)` }).from(productReviews).where(eq(productReviews.productId, productId)); + const totalCount = Number(totalCountResult[0].count); + const mappedReviews = reviews.map((review) => ({ + id: review.id, + reviewBody: review.reviewBody, + ratings: review.ratings, + imageUrls: review.imageUrls, + reviewTime: review.reviewTime, + adminResponse: review.adminResponse ?? null, + adminResponseImages: review.adminResponseImages, + userName: review.userName ?? null + })); + return { + reviews: mappedReviews, + totalCount + }; +} +async function respondToReview(reviewId, adminResponse, adminResponseImages) { + const [updatedReview] = await db.update(productReviews).set({ + adminResponse, + adminResponseImages + }).where(eq(productReviews.id, reviewId)).returning(); + if (!updatedReview) { + return null; + } + return { + id: updatedReview.id, + reviewBody: updatedReview.reviewBody, + ratings: updatedReview.ratings, + imageUrls: updatedReview.imageUrls, + reviewTime: updatedReview.reviewTime, + adminResponse: updatedReview.adminResponse ?? null, + adminResponseImages: updatedReview.adminResponseImages, + userName: null + }; +} +async function getAllProductGroups() { + const groups = await db.query.productGroupInfo.findMany({ + with: { + memberships: { + with: { + product: true + } + } + }, + orderBy: desc(productGroupInfo.createdAt) + }); + return groups.map((group6) => ({ + id: group6.id, + groupName: group6.groupName, + description: group6.description ?? null, + createdAt: group6.createdAt, + products: group6.memberships.map((membership) => mapProduct(membership.product)), + productCount: group6.memberships.length, + memberships: group6.memberships + })); +} +async function createProductGroup(groupName, description, productIds) { + const [newGroup] = await db.insert(productGroupInfo).values({ + groupName, + description + }).returning(); + if (productIds.length > 0) { + const memberships = productIds.map((productId) => ({ + productId, + groupId: newGroup.id + })); + await db.insert(productGroupMembership).values(memberships); + } + return { + id: newGroup.id, + groupName: newGroup.groupName, + description: newGroup.description ?? null, + createdAt: newGroup.createdAt + }; +} +async function updateProductGroup(id, groupName, description, productIds) { + const updateData = {}; + if (groupName !== void 0) + updateData.groupName = groupName; + if (description !== void 0) + updateData.description = description; + const [updatedGroup] = await db.update(productGroupInfo).set(updateData).where(eq(productGroupInfo.id, id)).returning(); + if (!updatedGroup) { + return null; + } + if (productIds !== void 0) { + await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id)); + if (productIds.length > 0) { + const memberships = productIds.map((productId) => ({ + productId, + groupId: id + })); + await db.insert(productGroupMembership).values(memberships); + } + } + return { + id: updatedGroup.id, + groupName: updatedGroup.groupName, + description: updatedGroup.description ?? null, + createdAt: updatedGroup.createdAt + }; +} +async function deleteProductGroup(id) { + await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id)); + const [deletedGroup] = await db.delete(productGroupInfo).where(eq(productGroupInfo.id, id)).returning(); + if (!deletedGroup) { + return null; + } + return { + id: deletedGroup.id, + groupName: deletedGroup.groupName, + description: deletedGroup.description ?? null, + createdAt: deletedGroup.createdAt + }; +} +async function addProductToGroup(groupId, productId) { + await db.insert(productGroupMembership).values({ groupId, productId }); +} +async function removeProductFromGroup(groupId, productId) { + await db.delete(productGroupMembership).where(and( + eq(productGroupMembership.groupId, groupId), + eq(productGroupMembership.productId, productId) + )); +} +async function updateProductPrices(updates) { + if (updates.length === 0) { + return { updatedCount: 0, invalidIds: [] }; + } + const productIds = updates.map((update) => update.productId); + const existingProducts = await db.query.productInfo.findMany({ + where: inArray(productInfo.id, productIds), + columns: { id: true } + }); + const existingIds = new Set(existingProducts.map((product) => product.id)); + const invalidIds = productIds.filter((id) => !existingIds.has(id)); + if (invalidIds.length > 0) { + return { updatedCount: 0, invalidIds }; + } + const updatePromises = updates.map((update) => { + const { productId, price, marketPrice, flashPrice, isFlashAvailable } = update; + const updateData = {}; + if (price !== void 0) + updateData.price = price.toString(); + if (marketPrice !== void 0) + updateData.marketPrice = marketPrice === null ? null : marketPrice.toString(); + if (flashPrice !== void 0) + updateData.flashPrice = flashPrice === null ? null : flashPrice.toString(); + if (isFlashAvailable !== void 0) + updateData.isFlashAvailable = isFlashAvailable; + return db.update(productInfo).set(updateData).where(eq(productInfo.id, productId)); + }); + await Promise.all(updatePromises); + return { updatedCount: updates.length, invalidIds: [] }; +} +async function checkProductExistsByName(name) { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.name, name), + columns: { id: true } + }); + return !!product; +} +async function checkUnitExists(unitId) { + const unit = await db.query.units.findFirst({ + where: eq(units.id, unitId), + columns: { id: true } + }); + return !!unit; +} +async function getProductImagesById(productId) { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId), + columns: { images: true } + }); + if (!product) { + return null; + } + return getStringArray(product.images) || []; +} +async function createSpecialDealsForProduct(productId, deals) { + if (deals.length === 0) { + return []; + } + const dealInserts = deals.map((deal) => ({ + productId, + quantity: deal.quantity.toString(), + price: deal.price.toString(), + validTill: new Date(deal.validTill) + })); + const createdDeals = await db.insert(specialDeals).values(dealInserts).returning(); + return createdDeals.map(mapSpecialDeal); +} +async function updateProductDeals(productId, deals) { + if (deals.length === 0) { + await db.delete(specialDeals).where(eq(specialDeals.productId, productId)); + return; + } + const existingDeals = await db.query.specialDeals.findMany({ + where: eq(specialDeals.productId, productId) + }); + const existingDealsMap = new Map( + existingDeals.map((deal) => [`${deal.quantity}-${deal.price}`, deal]) + ); + const newDealsMap = new Map( + deals.map((deal) => [`${deal.quantity}-${deal.price}`, deal]) + ); + const dealsToAdd = deals.filter((deal) => { + const key = `${deal.quantity}-${deal.price}`; + return !existingDealsMap.has(key); + }); + const dealsToRemove = existingDeals.filter((deal) => { + const key = `${deal.quantity}-${deal.price}`; + return !newDealsMap.has(key); + }); + const dealsToUpdate = deals.filter((deal) => { + const key = `${deal.quantity}-${deal.price}`; + const existing = existingDealsMap.get(key); + const nextValidTill = deal.validTill instanceof Date ? deal.validTill.toISOString().split("T")[0] : String(deal.validTill); + return existing && existing.validTill.toISOString().split("T")[0] !== nextValidTill; + }); + if (dealsToRemove.length > 0) { + await db.delete(specialDeals).where( + inArray(specialDeals.id, dealsToRemove.map((deal) => deal.id)) + ); + } + if (dealsToAdd.length > 0) { + const dealInserts = dealsToAdd.map((deal) => ({ + productId, + quantity: deal.quantity.toString(), + price: deal.price.toString(), + validTill: new Date(deal.validTill) + })); + await db.insert(specialDeals).values(dealInserts); + } + for (const deal of dealsToUpdate) { + const key = `${deal.quantity}-${deal.price}`; + const existingDeal = existingDealsMap.get(key); + if (existingDeal) { + await db.update(specialDeals).set({ validTill: new Date(deal.validTill) }).where(eq(specialDeals.id, existingDeal.id)); + } + } +} +async function replaceProductTags(productId, tagIds) { + await db.delete(productTags).where(eq(productTags.productId, productId)); + if (tagIds.length === 0) { + return; + } + const tagAssociations = tagIds.map((tagId) => ({ + productId, + tagId + })); + await db.insert(productTags).values(tagAssociations); +} +var getStringArray, mapUnit, mapStore, mapProduct, mapSpecialDeal, mapTagInfo; +var init_product = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/product.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + getStringArray = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return null; + return value.map((item) => String(item)); + }, "getStringArray"); + mapUnit = /* @__PURE__ */ __name((unit) => ({ + id: unit.id, + shortNotation: unit.shortNotation, + fullName: unit.fullName + }), "mapUnit"); + mapStore = /* @__PURE__ */ __name((store) => ({ + id: store.id, + name: store.name, + description: store.description, + imageUrl: store.imageUrl, + owner: store.owner, + createdAt: store.createdAt + // updatedAt: store.createdAt, + }), "mapStore"); + mapProduct = /* @__PURE__ */ __name((product) => ({ + id: product.id, + name: product.name, + shortDescription: product.shortDescription ?? null, + longDescription: product.longDescription ?? null, + unitId: product.unitId, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null, + images: getStringArray(product.images), + imageKeys: getStringArray(product.images), + isOutOfStock: product.isOutOfStock, + isSuspended: product.isSuspended, + isFlashAvailable: product.isFlashAvailable, + flashPrice: product.flashPrice ? String(product.flashPrice) : null, + createdAt: product.createdAt, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + storeId: product.storeId + }), "mapProduct"); + mapSpecialDeal = /* @__PURE__ */ __name((deal) => ({ + id: deal.id, + productId: deal.productId, + quantity: String(deal.quantity ?? "0"), + price: String(deal.price ?? "0"), + validTill: deal.validTill + }), "mapSpecialDeal"); + mapTagInfo = /* @__PURE__ */ __name((tag2) => ({ + id: tag2.id, + tagName: tag2.tagName, + tagDescription: tag2.tagDescription ?? null, + imageUrl: tag2.imageUrl ?? null, + isDashboardTag: tag2.isDashboardTag, + relatedStores: tag2.relatedStores, + createdAt: tag2.createdAt + }), "mapTagInfo"); + __name(getAllProducts, "getAllProducts"); + __name(getProductById, "getProductById"); + __name(deleteProduct, "deleteProduct"); + __name(createProduct, "createProduct"); + __name(updateProduct, "updateProduct"); + __name(toggleProductOutOfStock, "toggleProductOutOfStock"); + __name(updateSlotProducts, "updateSlotProducts"); + __name(getSlotProductIds, "getSlotProductIds"); + __name(getAllUnits, "getAllUnits"); + __name(getAllProductTags, "getAllProductTags"); + __name(getAllProductTagInfos, "getAllProductTagInfos"); + __name(getProductTagInfoById, "getProductTagInfoById"); + __name(createProductTag, "createProductTag"); + __name(getProductTagById, "getProductTagById"); + __name(updateProductTag, "updateProductTag"); + __name(deleteProductTag, "deleteProductTag"); + __name(checkProductTagExistsByName, "checkProductTagExistsByName"); + __name(getSlotsProductIds, "getSlotsProductIds"); + __name(getProductReviews, "getProductReviews"); + __name(respondToReview, "respondToReview"); + __name(getAllProductGroups, "getAllProductGroups"); + __name(createProductGroup, "createProductGroup"); + __name(updateProductGroup, "updateProductGroup"); + __name(deleteProductGroup, "deleteProductGroup"); + __name(addProductToGroup, "addProductToGroup"); + __name(removeProductFromGroup, "removeProductFromGroup"); + __name(updateProductPrices, "updateProductPrices"); + __name(checkProductExistsByName, "checkProductExistsByName"); + __name(checkUnitExists, "checkUnitExists"); + __name(getProductImagesById, "getProductImagesById"); + __name(createSpecialDealsForProduct, "createSpecialDealsForProduct"); + __name(updateProductDeals, "updateProductDeals"); + __name(replaceProductTags, "replaceProductTags"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/slots.ts +async function getActiveSlotsWithProducts() { + const slots = await db.query.deliverySlotInfo.findMany({ + where: eq(deliverySlotInfo.isActive, true), + orderBy: desc(deliverySlotInfo.deliveryTime), + with: { + productSlots: { + with: { + product: { + columns: { + id: true, + name: true, + images: true + } + } + } + } + } + }); + return slots.map((slot) => ({ + ...mapDeliverySlot(slot), + deliverySequence: getNumberArray(slot.deliverySequence), + products: slot.productSlots.map((ps) => mapSlotProductSummary(ps.product)) + })); +} +async function getActiveSlots() { + const slots = await db.query.deliverySlotInfo.findMany({ + where: eq(deliverySlotInfo.isActive, true) + }); + return slots.map(mapDeliverySlot); +} +async function getSlotsAfterDate(afterDate) { + const slots = await db.query.deliverySlotInfo.findMany({ + where: and( + eq(deliverySlotInfo.isActive, true), + gt(deliverySlotInfo.deliveryTime, afterDate) + ), + orderBy: asc(deliverySlotInfo.deliveryTime) + }); + return slots.map(mapDeliverySlot); +} +async function getSlotByIdWithRelations(id) { + const slot = await db.query.deliverySlotInfo.findFirst({ + where: eq(deliverySlotInfo.id, id), + with: { + productSlots: { + with: { + product: { + columns: { + id: true, + name: true, + images: true + } + } + } + }, + vendorSnippets: true + } + }); + if (!slot) { + return null; + } + return { + ...mapDeliverySlot(slot), + deliverySequence: getNumberArray(slot.deliverySequence), + groupIds: getNumberArray(slot.groupIds), + products: slot.productSlots.map((ps) => mapSlotProductSummary(ps.product)), + vendorSnippets: slot.vendorSnippets.map(mapVendorSnippet) + }; +} +async function createSlotWithRelations(input) { + const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input; + const result = await db.transaction(async (tx) => { + const [newSlot] = await tx.insert(deliverySlotInfo).values({ + deliveryTime: new Date(deliveryTime), + freezeTime: new Date(freezeTime), + isActive: isActive !== void 0 ? isActive : true, + groupIds: groupIds !== void 0 ? groupIds : [] + }).returning(); + if (productIds && productIds.length > 0) { + const associations = productIds.map((productId) => ({ + productId, + slotId: newSlot.id + })); + await tx.insert(productSlots).values(associations); + } + let createdSnippets = []; + if (snippets && snippets.length > 0) { + for (const snippet of snippets) { + const products = await tx.query.productInfo.findMany({ + where: inArray(productInfo.id, snippet.productIds) + }); + if (products.length !== snippet.productIds.length) { + throw new Error(`One or more invalid product IDs in snippet "${snippet.name}"`); + } + const existingSnippet = await tx.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.snippetCode, snippet.name) + }); + if (existingSnippet) { + throw new Error(`Snippet name "${snippet.name}" already exists`); + } + const [createdSnippet] = await tx.insert(vendorSnippets).values({ + snippetCode: snippet.name, + slotId: newSlot.id, + productIds: snippet.productIds, + validTill: snippet.validTill ? new Date(snippet.validTill) : void 0 + }).returning(); + createdSnippets.push(mapVendorSnippet(createdSnippet)); + } + } + return { + slot: mapDeliverySlot(newSlot), + createdSnippets, + message: "Slot created successfully" + }; + }); + return result; +} +async function updateSlotWithRelations(input) { + const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input; + let validGroupIds = groupIds; + if (groupIds && groupIds.length > 0) { + const existingGroups = await db.query.productGroupInfo.findMany({ + where: inArray(productGroupInfo.id, groupIds), + columns: { id: true } + }); + validGroupIds = existingGroups.map((group6) => group6.id); + } + const result = await db.transaction(async (tx) => { + const [updatedSlot] = await tx.update(deliverySlotInfo).set({ + deliveryTime: new Date(deliveryTime), + freezeTime: new Date(freezeTime), + isActive: isActive !== void 0 ? isActive : true, + groupIds: validGroupIds !== void 0 ? validGroupIds : [] + }).where(eq(deliverySlotInfo.id, id)).returning(); + if (!updatedSlot) { + return null; + } + if (productIds !== void 0) { + await tx.delete(productSlots).where(eq(productSlots.slotId, id)); + if (productIds.length > 0) { + const associations = productIds.map((productId) => ({ + productId, + slotId: id + })); + await tx.insert(productSlots).values(associations); + } + } + let createdSnippets = []; + if (snippets && snippets.length > 0) { + for (const snippet of snippets) { + const products = await tx.query.productInfo.findMany({ + where: inArray(productInfo.id, snippet.productIds) + }); + if (products.length !== snippet.productIds.length) { + throw new Error(`One or more invalid product IDs in snippet "${snippet.name}"`); + } + const existingSnippet = await tx.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.snippetCode, snippet.name) + }); + if (existingSnippet) { + throw new Error(`Snippet name "${snippet.name}" already exists`); + } + const [createdSnippet] = await tx.insert(vendorSnippets).values({ + snippetCode: snippet.name, + slotId: id, + productIds: snippet.productIds, + validTill: snippet.validTill ? new Date(snippet.validTill) : void 0 + }).returning(); + createdSnippets.push(mapVendorSnippet(createdSnippet)); + } + } + return { + slot: mapDeliverySlot(updatedSlot), + createdSnippets, + message: "Slot updated successfully" + }; + }); + return result; +} +async function deleteSlotById(id) { + const [deletedSlot] = await db.update(deliverySlotInfo).set({ isActive: false }).where(eq(deliverySlotInfo.id, id)).returning(); + if (!deletedSlot) { + return null; + } + return mapDeliverySlot(deletedSlot); +} +async function getSlotDeliverySequence(slotId) { + const slot = await db.query.deliverySlotInfo.findFirst({ + where: eq(deliverySlotInfo.id, slotId) + }); + if (!slot) { + return null; + } + return mapDeliverySlot(slot); +} +async function updateSlotDeliverySequence(slotId, sequence) { + const [updatedSlot] = await db.update(deliverySlotInfo).set({ deliverySequence: sequence }).where(eq(deliverySlotInfo.id, slotId)).returning({ + id: deliverySlotInfo.id, + deliverySequence: deliverySlotInfo.deliverySequence + }); + return updatedSlot || null; +} +async function updateSlotCapacity(slotId, isCapacityFull) { + const [updatedSlot] = await db.update(deliverySlotInfo).set({ isCapacityFull }).where(eq(deliverySlotInfo.id, slotId)).returning(); + if (!updatedSlot) { + return null; + } + return { + success: true, + slot: mapDeliverySlot(updatedSlot), + message: `Slot ${isCapacityFull ? "marked as full capacity" : "capacity reset"}` + }; +} +var getStringArray2, getNumberArray, mapDeliverySlot, mapSlotProductSummary, mapVendorSnippet; +var init_slots = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/slots.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + getStringArray2 = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return null; + return value.map((item) => String(item)); + }, "getStringArray"); + getNumberArray = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return []; + return value.map((item) => Number(item)); + }, "getNumberArray"); + mapDeliverySlot = /* @__PURE__ */ __name((slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isFlash: slot.isFlash, + isCapacityFull: slot.isCapacityFull, + deliverySequence: slot.deliverySequence, + groupIds: slot.groupIds + }), "mapDeliverySlot"); + mapSlotProductSummary = /* @__PURE__ */ __name((product) => ({ + id: product.id, + name: product.name, + images: getStringArray2(product.images) + }), "mapSlotProductSummary"); + mapVendorSnippet = /* @__PURE__ */ __name((snippet) => ({ + id: snippet.id, + snippetCode: snippet.snippetCode, + slotId: snippet.slotId ?? null, + productIds: snippet.productIds || [], + isPermanent: snippet.isPermanent, + validTill: snippet.validTill ?? null, + createdAt: snippet.createdAt + }), "mapVendorSnippet"); + __name(getActiveSlotsWithProducts, "getActiveSlotsWithProducts"); + __name(getActiveSlots, "getActiveSlots"); + __name(getSlotsAfterDate, "getSlotsAfterDate"); + __name(getSlotByIdWithRelations, "getSlotByIdWithRelations"); + __name(createSlotWithRelations, "createSlotWithRelations"); + __name(updateSlotWithRelations, "updateSlotWithRelations"); + __name(deleteSlotById, "deleteSlotById"); + __name(getSlotDeliverySequence, "getSlotDeliverySequence"); + __name(updateSlotDeliverySequence, "updateSlotDeliverySequence"); + __name(updateSlotCapacity, "updateSlotCapacity"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/staff-user.ts +async function getStaffUserByName(name) { + const staff = await db.query.staffUsers.findFirst({ + where: eq(staffUsers.name, name) + }); + return staff || null; +} +async function getStaffUserById(staffId) { + const staff = await db.query.staffUsers.findFirst({ + where: eq(staffUsers.id, staffId) + }); + return staff || null; +} +async function getAllStaff() { + const staff = await db.query.staffUsers.findMany({ + columns: { + id: true, + name: true + }, + with: { + role: { + with: { + rolePermissions: { + with: { + permission: true + } + } + } + } + } + }); + return staff; +} +async function getAllUsers(cursor, limit = 20, search) { + let whereCondition = void 0; + if (search) { + whereCondition = or( + like(users.name, `%${search}%`), + like(users.email, `%${search}%`), + like(users.mobile, `%${search}%`) + ); + } + if (cursor) { + const cursorCondition = lt(users.id, cursor); + whereCondition = whereCondition ? and(whereCondition, cursorCondition) : cursorCondition; + } + const allUsers = await db.query.users.findMany({ + where: whereCondition, + with: { + userDetails: true + }, + orderBy: desc(users.id), + limit: limit + 1 + }); + const hasMore = allUsers.length > limit; + const usersToReturn = hasMore ? allUsers.slice(0, limit) : allUsers; + return { users: usersToReturn, hasMore }; +} +async function getUserWithDetails(userId) { + const user = await db.query.users.findFirst({ + where: eq(users.id, userId), + with: { + userDetails: true, + orders: { + orderBy: desc(orders.createdAt), + limit: 1 + } + } + }); + return user || null; +} +async function updateUserSuspensionStatus(userId, isSuspended) { + await db.insert(userDetails).values({ userId, isSuspended }).onConflictDoUpdate({ + target: userDetails.userId, + set: { isSuspended } + }); +} +async function checkStaffUserExists(name) { + const existingUser = await db.query.staffUsers.findFirst({ + where: eq(staffUsers.name, name) + }); + return !!existingUser; +} +async function checkStaffRoleExists(roleId) { + const role = await db.query.staffRoles.findFirst({ + where: eq(staffRoles.id, roleId) + }); + return !!role; +} +async function createStaffUser(name, password, roleId) { + const [newUser] = await db.insert(staffUsers).values({ + name: name.trim(), + password, + staffRoleId: roleId + }).returning(); + return { + id: newUser.id, + name: newUser.name, + password: newUser.password, + staffRoleId: newUser.staffRoleId, + createdAt: newUser.createdAt + }; +} +async function getAllRoles() { + const roles = await db.query.staffRoles.findMany({ + columns: { + id: true, + roleName: true + } + }); + return roles; +} +var init_staff_user = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/staff-user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getStaffUserByName, "getStaffUserByName"); + __name(getStaffUserById, "getStaffUserById"); + __name(getAllStaff, "getAllStaff"); + __name(getAllUsers, "getAllUsers"); + __name(getUserWithDetails, "getUserWithDetails"); + __name(updateUserSuspensionStatus, "updateUserSuspensionStatus"); + __name(checkStaffUserExists, "checkStaffUserExists"); + __name(checkStaffRoleExists, "checkStaffRoleExists"); + __name(createStaffUser, "createStaffUser"); + __name(getAllRoles, "getAllRoles"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/store.ts +async function getAllStores() { + const stores = await db.query.storeInfo.findMany({ + with: { + owner: true + } + }); + return stores; +} +async function getStoreById(id) { + const store = await db.query.storeInfo.findFirst({ + where: eq(storeInfo.id, id), + with: { + owner: true + } + }); + return store || null; +} +async function createStore(input, products) { + const [newStore] = await db.insert(storeInfo).values({ + name: input.name, + description: input.description, + imageUrl: input.imageUrl, + owner: input.owner + }).returning(); + if (products && products.length > 0) { + await db.update(productInfo).set({ storeId: newStore.id }).where(inArray(productInfo.id, products)); + } + return { + id: newStore.id, + name: newStore.name, + description: newStore.description, + imageUrl: newStore.imageUrl, + owner: newStore.owner, + createdAt: newStore.createdAt + // updatedAt: newStore.updatedAt, + }; +} +async function updateStore(id, input, products) { + const [updatedStore] = await db.update(storeInfo).set({ + ...input + // updatedAt: new Date(), + }).where(eq(storeInfo.id, id)).returning(); + if (!updatedStore) { + throw new Error("Store not found"); + } + if (products !== void 0) { + await db.update(productInfo).set({ storeId: null }).where(eq(productInfo.storeId, id)); + if (products.length > 0) { + await db.update(productInfo).set({ storeId: id }).where(inArray(productInfo.id, products)); + } + } + return { + id: updatedStore.id, + name: updatedStore.name, + description: updatedStore.description, + imageUrl: updatedStore.imageUrl, + owner: updatedStore.owner, + createdAt: updatedStore.createdAt + // updatedAt: updatedStore.updatedAt, + }; +} +async function deleteStore(id) { + return await db.transaction(async (tx) => { + await tx.update(productInfo).set({ storeId: null }).where(eq(productInfo.storeId, id)); + const [deletedStore] = await tx.delete(storeInfo).where(eq(storeInfo.id, id)).returning(); + if (!deletedStore) { + throw new Error("Store not found"); + } + return { + message: "Store deleted successfully" + }; + }); +} +var init_store = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getAllStores, "getAllStores"); + __name(getStoreById, "getStoreById"); + __name(createStore, "createStore"); + __name(updateStore, "updateStore"); + __name(deleteStore, "deleteStore"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/user.ts +async function createUserByMobile(mobile) { + const [newUser] = await db.insert(users).values({ + name: null, + email: null, + mobile + }).returning(); + return newUser; +} +async function getUserByMobile(mobile) { + const [existingUser] = await db.select().from(users).where(eq(users.mobile, mobile)).limit(1); + return existingUser || null; +} +async function getUnresolvedComplaintsCount() { + const result = await db.select({ count: count3(complaints.id) }).from(complaints).where(eq(complaints.isResolved, false)); + return result[0]?.count || 0; +} +async function getAllUsersWithFilters(limit, cursor, search) { + const whereConditions = []; + if (search && search.trim()) { + whereConditions.push(sql`${users.mobile} LIKE ${`%${search.trim()}%`}`); + } + if (cursor) { + whereConditions.push(sql`${users.id} > ${cursor}`); + } + const usersList = await db.select({ + id: users.id, + name: users.name, + mobile: users.mobile, + createdAt: users.createdAt + }).from(users).where(whereConditions.length > 0 ? sql.join(whereConditions, sql` AND `) : void 0).orderBy(asc(users.id)).limit(limit + 1); + const hasMore = usersList.length > limit; + const usersToReturn = hasMore ? usersList.slice(0, limit) : usersList; + return { users: usersToReturn, hasMore }; +} +async function getOrderCountsByUserIds(userIds) { + if (userIds.length === 0) + return []; + return await db.select({ + userId: orders.userId, + totalOrders: count3(orders.id) + }).from(orders).where(sql`${orders.userId} IN (${sql.join(userIds, sql`, `)})`).groupBy(orders.userId); +} +async function getLastOrdersByUserIds(userIds) { + if (userIds.length === 0) + return []; + return await db.select({ + userId: orders.userId, + lastOrderDate: max(orders.createdAt) + }).from(orders).where(sql`${orders.userId} IN (${sql.join(userIds, sql`, `)})`).groupBy(orders.userId); +} +async function getSuspensionStatusesByUserIds(userIds) { + if (userIds.length === 0) + return []; + return await db.select({ + userId: userDetails.userId, + isSuspended: userDetails.isSuspended + }).from(userDetails).where(sql`${userDetails.userId} IN (${sql.join(userIds, sql`, `)})`); +} +async function getUserBasicInfo(userId) { + const user = await db.select({ + id: users.id, + name: users.name, + mobile: users.mobile, + createdAt: users.createdAt + }).from(users).where(eq(users.id, userId)).limit(1); + return user[0] || null; +} +async function getUserSuspensionStatus(userId) { + const userDetail = await db.select({ + isSuspended: userDetails.isSuspended + }).from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + return userDetail[0]?.isSuspended ?? false; +} +async function getUserOrders(userId) { + return await db.select({ + id: orders.id, + readableId: orders.readableId, + totalAmount: orders.totalAmount, + createdAt: orders.createdAt, + isFlashDelivery: orders.isFlashDelivery + }).from(orders).where(eq(orders.userId, userId)).orderBy(desc(orders.createdAt)); +} +async function getOrderStatusesByOrderIds(orderIds) { + if (orderIds.length === 0) + return []; + return await db.select({ + orderId: orderStatus.orderId, + isDelivered: orderStatus.isDelivered, + isCancelled: orderStatus.isCancelled + }).from(orderStatus).where(sql`${orderStatus.orderId} IN (${sql.join(orderIds, sql`, `)})`); +} +async function getItemCountsByOrderIds(orderIds) { + if (orderIds.length === 0) + return []; + return await db.select({ + orderId: orderItems.orderId, + itemCount: count3(orderItems.id) + }).from(orderItems).where(sql`${orderItems.orderId} IN (${sql.join(orderIds, sql`, `)})`).groupBy(orderItems.orderId); +} +async function upsertUserSuspension(userId, isSuspended) { + const existingDetail = await db.select({ id: userDetails.id }).from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + if (existingDetail.length > 0) { + await db.update(userDetails).set({ isSuspended }).where(eq(userDetails.userId, userId)); + } else { + await db.insert(userDetails).values({ + userId, + isSuspended + }); + } +} +async function searchUsers(search) { + if (search && search.trim()) { + return await db.select({ + id: users.id, + name: users.name, + mobile: users.mobile + }).from(users).where(sql`${users.mobile} LIKE ${`%${search.trim()}%`} OR ${users.name} LIKE ${`%${search.trim()}%`}`); + } else { + return await db.select({ + id: users.id, + name: users.name, + mobile: users.mobile + }).from(users); + } +} +async function getAllNotifCreds() { + return await db.select({ userId: notifCreds.userId, token: notifCreds.token }).from(notifCreds); +} +async function getAllUnloggedTokens() { + return await db.select({ token: unloggedUserTokens.token }).from(unloggedUserTokens); +} +async function getNotifTokensByUserIds(userIds) { + return await db.select({ token: notifCreds.token }).from(notifCreds).where(inArray(notifCreds.userId, userIds)); +} +async function getUserIncidentsWithRelations(userId) { + return await db.query.userIncidents.findMany({ + where: eq(userIncidents.userId, userId), + with: { + order: { + with: { + orderStatus: true + } + }, + addedBy: true + }, + orderBy: desc(userIncidents.dateAdded) + }); +} +async function createUserIncident(userId, orderId, adminComment, adminUserId, negativityScore) { + const [incident] = await db.insert(userIncidents).values({ + userId, + orderId, + adminComment, + addedBy: adminUserId, + negativityScore + }).returning(); + return incident; +} +var init_user = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(createUserByMobile, "createUserByMobile"); + __name(getUserByMobile, "getUserByMobile"); + __name(getUnresolvedComplaintsCount, "getUnresolvedComplaintsCount"); + __name(getAllUsersWithFilters, "getAllUsersWithFilters"); + __name(getOrderCountsByUserIds, "getOrderCountsByUserIds"); + __name(getLastOrdersByUserIds, "getLastOrdersByUserIds"); + __name(getSuspensionStatusesByUserIds, "getSuspensionStatusesByUserIds"); + __name(getUserBasicInfo, "getUserBasicInfo"); + __name(getUserSuspensionStatus, "getUserSuspensionStatus"); + __name(getUserOrders, "getUserOrders"); + __name(getOrderStatusesByOrderIds, "getOrderStatusesByOrderIds"); + __name(getItemCountsByOrderIds, "getItemCountsByOrderIds"); + __name(upsertUserSuspension, "upsertUserSuspension"); + __name(searchUsers, "searchUsers"); + __name(getAllNotifCreds, "getAllNotifCreds"); + __name(getAllUnloggedTokens, "getAllUnloggedTokens"); + __name(getNotifTokensByUserIds, "getNotifTokensByUserIds"); + __name(getUserIncidentsWithRelations, "getUserIncidentsWithRelations"); + __name(createUserIncident, "createUserIncident"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/vendor-snippets.ts +async function checkVendorSnippetExists(snippetCode) { + const existingSnippet = await db.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.snippetCode, snippetCode) + }); + return !!existingSnippet; +} +async function getVendorSnippetById(id) { + const snippet = await db.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.id, id), + with: { + slot: true + } + }); + if (!snippet) { + return null; + } + return { + ...mapVendorSnippet2(snippet), + slot: snippet.slot ? mapDeliverySlot2(snippet.slot) : null + }; +} +async function getVendorSnippetByCode(snippetCode) { + const snippet = await db.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.snippetCode, snippetCode) + }); + return snippet ? mapVendorSnippet2(snippet) : null; +} +async function getAllVendorSnippets() { + const snippets = await db.query.vendorSnippets.findMany({ + with: { + slot: true + }, + orderBy: desc(vendorSnippets.createdAt) + }); + return snippets.map((snippet) => ({ + ...mapVendorSnippet2(snippet), + slot: snippet.slot ? mapDeliverySlot2(snippet.slot) : null + })); +} +async function createVendorSnippet(input) { + const [result] = await db.insert(vendorSnippets).values({ + snippetCode: input.snippetCode, + slotId: input.slotId, + productIds: input.productIds, + isPermanent: input.isPermanent, + validTill: input.validTill + }).returning(); + return mapVendorSnippet2(result); +} +async function updateVendorSnippet(id, updates) { + const [result] = await db.update(vendorSnippets).set(updates).where(eq(vendorSnippets.id, id)).returning(); + return result ? mapVendorSnippet2(result) : null; +} +async function deleteVendorSnippet(id) { + const [result] = await db.delete(vendorSnippets).where(eq(vendorSnippets.id, id)).returning(); + return result ? mapVendorSnippet2(result) : null; +} +async function getProductsByIds(productIds) { + const products = await db.query.productInfo.findMany({ + where: inArray(productInfo.id, productIds), + columns: { id: true, name: true } + }); + const prods = products.map(mapProductSummary); + return prods; +} +async function getVendorSlotById(slotId) { + const slot = await db.query.deliverySlotInfo.findFirst({ + where: eq(deliverySlotInfo.id, slotId) + }); + return slot ? mapDeliverySlot2(slot) : null; +} +async function getVendorOrdersBySlotId(slotId) { + return await db.query.orders.findMany({ + where: eq(orders.slotId, slotId), + with: { + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + }, + orderStatus: true, + user: true, + slot: true + }, + orderBy: desc(orders.createdAt) + }); +} +async function getVendorOrders() { + return await db.query.orders.findMany({ + with: { + user: true, + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + } + }, + orderBy: desc(orders.createdAt) + }); +} +async function getOrderItemsByOrderIds(orderIds) { + return await db.query.orderItems.findMany({ + where: inArray(orderItems.orderId, orderIds), + with: { + product: { + with: { + unit: true + } + } + } + }); +} +async function getOrderStatusByOrderIds(orderIds) { + return await db.query.orderStatus.findMany({ + where: inArray(orderStatus.orderId, orderIds) + }); +} +async function updateVendorOrderItemPackaging(orderItemId, isPackaged) { + const orderItem = await db.query.orderItems.findFirst({ + where: eq(orderItems.id, orderItemId), + with: { + order: { + with: { + slot: true + } + } + } + }); + if (!orderItem) { + return { success: false, message: "Order item not found" }; + } + if (!orderItem.order.slotId) { + return { success: false, message: "Order item not associated with a vendor slot" }; + } + const snippetExists = await db.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.slotId, orderItem.order.slotId) + }); + if (!snippetExists) { + return { success: false, message: "No vendor snippet found for this order's slot" }; + } + const [updatedItem] = await db.update(orderItems).set({ + is_packaged: isPackaged + }).where(eq(orderItems.id, orderItemId)).returning({ id: orderItems.id }); + if (!updatedItem) { + return { success: false, message: "Failed to update packaging status" }; + } + return { success: true, orderItemId, is_packaged: isPackaged }; +} +var mapVendorSnippet2, mapDeliverySlot2, mapProductSummary; +var init_vendor_snippets = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/vendor-snippets.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + mapVendorSnippet2 = /* @__PURE__ */ __name((snippet) => ({ + id: snippet.id, + snippetCode: snippet.snippetCode, + slotId: snippet.slotId ?? null, + productIds: snippet.productIds || [], + isPermanent: snippet.isPermanent, + validTill: snippet.validTill ?? null, + createdAt: snippet.createdAt + }), "mapVendorSnippet"); + mapDeliverySlot2 = /* @__PURE__ */ __name((slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isFlash: slot.isFlash, + isCapacityFull: slot.isCapacityFull, + deliverySequence: slot.deliverySequence, + groupIds: slot.groupIds + }), "mapDeliverySlot"); + mapProductSummary = /* @__PURE__ */ __name((product) => ({ + id: product.id, + name: product.name + }), "mapProductSummary"); + __name(checkVendorSnippetExists, "checkVendorSnippetExists"); + __name(getVendorSnippetById, "getVendorSnippetById"); + __name(getVendorSnippetByCode, "getVendorSnippetByCode"); + __name(getAllVendorSnippets, "getAllVendorSnippets"); + __name(createVendorSnippet, "createVendorSnippet"); + __name(updateVendorSnippet, "updateVendorSnippet"); + __name(deleteVendorSnippet, "deleteVendorSnippet"); + __name(getProductsByIds, "getProductsByIds"); + __name(getVendorSlotById, "getVendorSlotById"); + __name(getVendorOrdersBySlotId, "getVendorOrdersBySlotId"); + __name(getVendorOrders, "getVendorOrders"); + __name(getOrderItemsByOrderIds, "getOrderItemsByOrderIds"); + __name(getOrderStatusByOrderIds, "getOrderStatusByOrderIds"); + __name(updateVendorOrderItemPackaging, "updateVendorOrderItemPackaging"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/address.ts +async function getDefaultAddress(userId) { + const [defaultAddress] = await db.select().from(addresses).where(and(eq(addresses.userId, userId), eq(addresses.isDefault, true))).limit(1); + return defaultAddress ? mapUserAddress(defaultAddress) : null; +} +async function getUserAddresses(userId) { + const userAddresses = await db.select().from(addresses).where(eq(addresses.userId, userId)); + return userAddresses.map(mapUserAddress); +} +async function getUserAddressById(userId, addressId) { + const [address] = await db.select().from(addresses).where(and(eq(addresses.id, addressId), eq(addresses.userId, userId))).limit(1); + return address ? mapUserAddress(address) : null; +} +async function clearDefaultAddress(userId) { + await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId)); +} +async function createUserAddress(input) { + const [newAddress] = await db.insert(addresses).values({ + userId: input.userId, + name: input.name, + phone: input.phone, + addressLine1: input.addressLine1, + addressLine2: input.addressLine2, + city: input.city, + state: input.state, + pincode: input.pincode, + isDefault: input.isDefault, + latitude: input.latitude, + longitude: input.longitude, + googleMapsUrl: input.googleMapsUrl + }).returning(); + return mapUserAddress(newAddress); +} +async function updateUserAddress(input) { + const [updatedAddress] = await db.update(addresses).set({ + name: input.name, + phone: input.phone, + addressLine1: input.addressLine1, + addressLine2: input.addressLine2, + city: input.city, + state: input.state, + pincode: input.pincode, + isDefault: input.isDefault, + googleMapsUrl: input.googleMapsUrl, + latitude: input.latitude, + longitude: input.longitude + }).where(and(eq(addresses.id, input.addressId), eq(addresses.userId, input.userId))).returning(); + return updatedAddress ? mapUserAddress(updatedAddress) : null; +} +async function deleteUserAddress(userId, addressId) { + const [deleted] = await db.delete(addresses).where(and(eq(addresses.id, addressId), eq(addresses.userId, userId))).returning({ id: addresses.id }); + return !!deleted; +} +async function hasOngoingOrdersForAddress(addressId) { + const ongoingOrders = await db.select({ + orderId: orders.id + }).from(orders).innerJoin(orderStatus, eq(orders.id, orderStatus.orderId)).innerJoin(deliverySlotInfo, eq(orders.slotId, deliverySlotInfo.id)).where(and( + eq(orders.addressId, addressId), + eq(orderStatus.isCancelled, false), + gte(deliverySlotInfo.deliveryTime, /* @__PURE__ */ new Date()) + )).limit(1); + return ongoingOrders.length > 0; +} +var mapUserAddress; +var init_address = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/address.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + mapUserAddress = /* @__PURE__ */ __name((address) => ({ + id: address.id, + userId: address.userId, + name: address.name, + phone: address.phone, + addressLine1: address.addressLine1, + addressLine2: address.addressLine2 ?? null, + city: address.city, + state: address.state, + pincode: address.pincode, + isDefault: address.isDefault, + latitude: address.latitude ?? null, + longitude: address.longitude ?? null, + googleMapsUrl: address.googleMapsUrl ?? null, + adminLatitude: address.adminLatitude ?? null, + adminLongitude: address.adminLongitude ?? null, + zoneId: address.zoneId ?? null, + createdAt: address.createdAt + }), "mapUserAddress"); + __name(getDefaultAddress, "getDefaultAddress"); + __name(getUserAddresses, "getUserAddresses"); + __name(getUserAddressById, "getUserAddressById"); + __name(clearDefaultAddress, "clearDefaultAddress"); + __name(createUserAddress, "createUserAddress"); + __name(updateUserAddress, "updateUserAddress"); + __name(deleteUserAddress, "deleteUserAddress"); + __name(hasOngoingOrdersForAddress, "hasOngoingOrdersForAddress"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/banners.ts +async function getActiveBanners() { + const banners = await db.query.homeBanners.findMany({ + where: isNotNull(homeBanners.serialNum), + orderBy: asc(homeBanners.serialNum) + }); + return banners.map(mapBanner); +} +var mapBanner; +var init_banners = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/banners.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + mapBanner = /* @__PURE__ */ __name((banner) => ({ + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description ?? null, + productIds: banner.productIds ?? null, + redirectUrl: banner.redirectUrl ?? null, + serialNum: banner.serialNum ?? null, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + }), "mapBanner"); + __name(getActiveBanners, "getActiveBanners"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/cart.ts +async function getCartItemsWithProducts(userId) { + const cartItemsWithProducts = await db.select({ + cartId: cartItems.id, + productId: productInfo.id, + productName: productInfo.name, + productPrice: productInfo.price, + productImages: productInfo.images, + productQuantity: productInfo.productQuantity, + isOutOfStock: productInfo.isOutOfStock, + unitShortNotation: units.shortNotation, + quantity: cartItems.quantity, + addedAt: cartItems.addedAt + }).from(cartItems).innerJoin(productInfo, eq(cartItems.productId, productInfo.id)).innerJoin(units, eq(productInfo.unitId, units.id)).where(eq(cartItems.userId, userId)); + return cartItemsWithProducts.map((item) => { + const priceValue = item.productPrice ?? "0"; + const quantityValue = item.quantity ?? "0"; + return { + id: item.cartId, + productId: item.productId, + quantity: parseFloat(quantityValue), + addedAt: item.addedAt, + product: { + id: item.productId, + name: item.productName, + price: priceValue.toString(), + productQuantity: item.productQuantity, + unit: item.unitShortNotation, + isOutOfStock: item.isOutOfStock, + images: getStringArray3(item.productImages) + }, + subtotal: parseFloat(priceValue.toString()) * parseFloat(quantityValue) + }; + }); +} +async function getProductById2(productId) { + return db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId) + }); +} +async function getCartItemByUserProduct(userId, productId) { + return db.query.cartItems.findFirst({ + where: and(eq(cartItems.userId, userId), eq(cartItems.productId, productId)) + }); +} +async function incrementCartItemQuantity(itemId, quantity) { + await db.update(cartItems).set({ + quantity: sql`${cartItems.quantity} + ${quantity}` + }).where(eq(cartItems.id, itemId)); +} +async function insertCartItem(userId, productId, quantity) { + await db.insert(cartItems).values({ + userId, + productId, + quantity: quantity.toString() + }); +} +async function updateCartItemQuantity(userId, itemId, quantity) { + const [updatedItem] = await db.update(cartItems).set({ quantity: quantity.toString() }).where(and(eq(cartItems.id, itemId), eq(cartItems.userId, userId))).returning({ id: cartItems.id }); + return !!updatedItem; +} +async function deleteCartItem(userId, itemId) { + const [deletedItem] = await db.delete(cartItems).where(and(eq(cartItems.id, itemId), eq(cartItems.userId, userId))).returning({ id: cartItems.id }); + return !!deletedItem; +} +async function clearUserCart(userId) { + await db.delete(cartItems).where(eq(cartItems.userId, userId)); +} +var getStringArray3; +var init_cart = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/cart.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + getStringArray3 = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return []; + return value.map((item) => String(item)); + }, "getStringArray"); + __name(getCartItemsWithProducts, "getCartItemsWithProducts"); + __name(getProductById2, "getProductById"); + __name(getCartItemByUserProduct, "getCartItemByUserProduct"); + __name(incrementCartItemQuantity, "incrementCartItemQuantity"); + __name(insertCartItem, "insertCartItem"); + __name(updateCartItemQuantity, "updateCartItemQuantity"); + __name(deleteCartItem, "deleteCartItem"); + __name(clearUserCart, "clearUserCart"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/complaint.ts +async function getUserComplaints(userId) { + const userComplaints = await db.select({ + id: complaints.id, + complaintBody: complaints.complaintBody, + response: complaints.response, + isResolved: complaints.isResolved, + createdAt: complaints.createdAt, + orderId: complaints.orderId + }).from(complaints).where(eq(complaints.userId, userId)).orderBy(asc(complaints.createdAt)); + return userComplaints.map((complaint) => ({ + id: complaint.id, + complaintBody: complaint.complaintBody, + response: complaint.response ?? null, + isResolved: complaint.isResolved, + createdAt: complaint.createdAt, + orderId: complaint.orderId ?? null + })); +} +async function createComplaint(userId, orderId, complaintBody, images) { + await db.insert(complaints).values({ + userId, + orderId, + complaintBody, + images: images || null + }); +} +var init_complaint2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/complaint.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getUserComplaints, "getUserComplaints"); + __name(createComplaint, "createComplaint"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/stores.ts +async function getStoreSummaries() { + const storesData = await db.select({ + id: storeInfo.id, + name: storeInfo.name, + description: storeInfo.description, + imageUrl: storeInfo.imageUrl, + productCount: sql`count(${productInfo.id})`.as("productCount") + }).from(storeInfo).leftJoin( + productInfo, + and(eq(productInfo.storeId, storeInfo.id), eq(productInfo.isSuspended, false)) + ).groupBy(storeInfo.id); + const storesWithDetails = await Promise.all( + storesData.map(async (store) => { + const sampleProducts = await db.select({ + id: productInfo.id, + name: productInfo.name, + images: productInfo.images + }).from(productInfo).where(and(eq(productInfo.storeId, store.id), eq(productInfo.isSuspended, false))).limit(3); + return { + id: store.id, + name: store.name, + description: store.description ?? null, + imageUrl: store.imageUrl ?? null, + productCount: store.productCount || 0, + sampleProducts: sampleProducts.map((product) => ({ + id: product.id, + name: product.name, + images: getStringArray4(product.images) + })) + }; + }) + ); + return storesWithDetails; +} +async function getStoreDetail(storeId) { + const storeData = await db.query.storeInfo.findFirst({ + where: eq(storeInfo.id, storeId), + columns: { + id: true, + name: true, + description: true, + imageUrl: true + } + }); + if (!storeData) { + return null; + } + const productsData = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + price: productInfo.price, + marketPrice: productInfo.marketPrice, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + incrementStep: productInfo.incrementStep, + unitShortNotation: units.shortNotation, + productQuantity: productInfo.productQuantity + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)).where(and(eq(productInfo.storeId, storeId), eq(productInfo.isSuspended, false))); + const products = productsData.map((product) => ({ + id: product.id, + name: product.name, + shortDescription: product.shortDescription ?? null, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null, + incrementStep: product.incrementStep, + unit: product.unitShortNotation, + unitNotation: product.unitShortNotation, + images: getStringArray4(product.images), + isOutOfStock: product.isOutOfStock, + productQuantity: product.productQuantity + })); + return { + store: { + id: storeData.id, + name: storeData.name, + description: storeData.description ?? null, + imageUrl: storeData.imageUrl ?? null + }, + products + }; +} +async function getStoresSummary() { + return db.query.storeInfo.findMany({ + columns: { + id: true, + name: true, + description: true + } + }); +} +var getStringArray4; +var init_stores = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/stores.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + getStringArray4 = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return null; + return value.map((item) => String(item)); + }, "getStringArray"); + __name(getStoreSummaries, "getStoreSummaries"); + __name(getStoreDetail, "getStoreDetail"); + __name(getStoresSummary, "getStoresSummary"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/product.ts +async function getProductDetailById(productId) { + const productData = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + longDescription: productInfo.longDescription, + price: productInfo.price, + marketPrice: productInfo.marketPrice, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + storeId: productInfo.storeId, + unitShortNotation: units.shortNotation, + incrementStep: productInfo.incrementStep, + productQuantity: productInfo.productQuantity, + isFlashAvailable: productInfo.isFlashAvailable, + flashPrice: productInfo.flashPrice + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)).where(eq(productInfo.id, productId)).limit(1); + if (productData.length === 0) { + return null; + } + const product = productData[0]; + const storeData = product.storeId ? await db.query.storeInfo.findFirst({ + where: eq(storeInfo.id, product.storeId), + columns: { id: true, name: true, description: true } + }) : null; + const deliverySlotsData = await db.select({ + id: deliverySlotInfo.id, + deliveryTime: deliverySlotInfo.deliveryTime, + freezeTime: deliverySlotInfo.freezeTime + }).from(productSlots).innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id)).where( + and( + eq(productSlots.productId, productId), + eq(deliverySlotInfo.isActive, true), + eq(deliverySlotInfo.isCapacityFull, false), + gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`), + gt(deliverySlotInfo.freezeTime, sql`CURRENT_TIMESTAMP`) + ) + ).orderBy(deliverySlotInfo.deliveryTime); + const specialDealsData = await db.select({ + quantity: specialDeals.quantity, + price: specialDeals.price, + validTill: specialDeals.validTill + }).from(specialDeals).where( + and( + eq(specialDeals.productId, productId), + gt(specialDeals.validTill, sql`CURRENT_TIMESTAMP`) + ) + ).orderBy(specialDeals.quantity); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription ?? null, + longDescription: product.longDescription ?? null, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null, + unitNotation: product.unitShortNotation, + images: getStringArray5(product.images), + isOutOfStock: product.isOutOfStock, + store: storeData ? { + id: storeData.id, + name: storeData.name, + description: storeData.description ?? null + } : null, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + isFlashAvailable: product.isFlashAvailable, + flashPrice: product.flashPrice?.toString() || null, + deliverySlots: deliverySlotsData, + specialDeals: specialDealsData.map((deal) => ({ + quantity: String(deal.quantity ?? "0"), + price: String(deal.price ?? "0"), + validTill: deal.validTill + })) + }; +} +async function getProductReviews2(productId, limit, offset) { + const reviews = await db.select({ + id: productReviews.id, + reviewBody: productReviews.reviewBody, + ratings: productReviews.ratings, + imageUrls: productReviews.imageUrls, + reviewTime: productReviews.reviewTime, + userName: users.name + }).from(productReviews).innerJoin(users, eq(productReviews.userId, users.id)).where(eq(productReviews.productId, productId)).orderBy(desc(productReviews.reviewTime)).limit(limit).offset(offset); + const totalCountResult = await db.select({ count: sql`count(*)` }).from(productReviews).where(eq(productReviews.productId, productId)); + const totalCount = Number(totalCountResult[0].count); + const mappedReviews = reviews.map((review) => ({ + id: review.id, + reviewBody: review.reviewBody, + ratings: review.ratings, + imageUrls: getStringArray5(review.imageUrls), + reviewTime: review.reviewTime, + userName: review.userName ?? null + })); + return { + reviews: mappedReviews, + totalCount + }; +} +async function getProductById3(productId) { + return db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId) + }); +} +async function createProductReview(userId, productId, reviewBody, ratings, imageUrls) { + const [newReview] = await db.insert(productReviews).values({ + userId, + productId, + reviewBody, + ratings, + imageUrls + }).returning({ + id: productReviews.id, + reviewBody: productReviews.reviewBody, + ratings: productReviews.ratings, + imageUrls: productReviews.imageUrls, + reviewTime: productReviews.reviewTime + }); + return { + id: newReview.id, + reviewBody: newReview.reviewBody, + ratings: newReview.ratings, + imageUrls: getStringArray5(newReview.imageUrls), + reviewTime: newReview.reviewTime, + userName: null + }; +} +async function getAllProductsWithUnits(tagId) { + let productIds = null; + if (tagId) { + const taggedProducts = await db.select({ productId: productTags.productId }).from(productTags).where(eq(productTags.tagId, tagId)); + productIds = taggedProducts.map((tp) => tp.productId); + } + let whereCondition = void 0; + if (productIds && productIds.length > 0) { + whereCondition = inArray(productInfo.id, productIds); + } + const results = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + price: productInfo.price, + marketPrice: productInfo.marketPrice, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + unitShortNotation: units.shortNotation, + productQuantity: productInfo.productQuantity + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)).where(whereCondition); + return results.map((product) => ({ + ...product, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null + })); +} +async function getSuspendedProductIds() { + const suspendedProducts = await db.select({ id: productInfo.id }).from(productInfo).where(eq(productInfo.isSuspended, true)); + return suspendedProducts.map((sp) => sp.id); +} +async function getNextDeliveryDateWithCapacity(productId) { + const result = await db.select({ deliveryTime: deliverySlotInfo.deliveryTime }).from(productSlots).innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id)).where( + and( + eq(productSlots.productId, productId), + eq(deliverySlotInfo.isActive, true), + eq(deliverySlotInfo.isCapacityFull, false), + gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`) + ) + ).orderBy(deliverySlotInfo.deliveryTime).limit(1); + return result[0]?.deliveryTime || null; +} +var getStringArray5; +var init_product2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/product.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + getStringArray5 = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return null; + return value.map((item) => String(item)); + }, "getStringArray"); + __name(getProductDetailById, "getProductDetailById"); + __name(getProductReviews2, "getProductReviews"); + __name(getProductById3, "getProductById"); + __name(createProductReview, "createProductReview"); + __name(getAllProductsWithUnits, "getAllProductsWithUnits"); + __name(getSuspendedProductIds, "getSuspendedProductIds"); + __name(getNextDeliveryDateWithCapacity, "getNextDeliveryDateWithCapacity"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/slots.ts +async function getActiveSlotsList() { + const slots = await db.query.deliverySlotInfo.findMany({ + where: eq(deliverySlotInfo.isActive, true), + orderBy: asc(deliverySlotInfo.deliveryTime) + }); + return slots.map(mapSlot); +} +async function getProductAvailability() { + const products = await db.select({ + id: productInfo.id, + name: productInfo.name, + isOutOfStock: productInfo.isOutOfStock, + isFlashAvailable: productInfo.isFlashAvailable + }).from(productInfo).where(eq(productInfo.isSuspended, false)); + return products.map((product) => ({ + id: product.id, + name: product.name, + isOutOfStock: product.isOutOfStock, + isFlashAvailable: product.isFlashAvailable + })); +} +var mapSlot; +var init_slots2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/slots.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + mapSlot = /* @__PURE__ */ __name((slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isFlash: slot.isFlash, + isCapacityFull: slot.isCapacityFull, + deliverySequence: slot.deliverySequence, + groupIds: slot.groupIds + }), "mapSlot"); + __name(getActiveSlotsList, "getActiveSlotsList"); + __name(getProductAvailability, "getProductAvailability"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/payments.ts +async function getOrderById(orderId) { + return db.query.orders.findFirst({ + where: eq(orders.id, orderId) + }); +} +async function getPaymentByOrderId(orderId) { + return db.query.payments.findFirst({ + where: eq(payments.orderId, orderId) + }); +} +async function getPaymentByMerchantOrderId(merchantOrderId) { + return db.query.payments.findFirst({ + where: eq(payments.merchantOrderId, merchantOrderId) + }); +} +async function updatePaymentSuccess(merchantOrderId, payload) { + const [updatedPayment] = await db.update(payments).set({ + status: "success", + payload + }).where(eq(payments.merchantOrderId, merchantOrderId)).returning({ + id: payments.id, + orderId: payments.orderId + }); + return updatedPayment || null; +} +async function updateOrderPaymentStatus(orderId, status) { + await db.update(orderStatus).set({ paymentStatus: status }).where(eq(orderStatus.orderId, orderId)); +} +async function markPaymentFailed(paymentId) { + await db.update(payments).set({ status: "failed" }).where(eq(payments.id, paymentId)); +} +var init_payments = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/payments.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getOrderById, "getOrderById"); + __name(getPaymentByOrderId, "getPaymentByOrderId"); + __name(getPaymentByMerchantOrderId, "getPaymentByMerchantOrderId"); + __name(updatePaymentSuccess, "updatePaymentSuccess"); + __name(updateOrderPaymentStatus, "updateOrderPaymentStatus"); + __name(markPaymentFailed, "markPaymentFailed"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/auth.ts +async function getUserByEmail(email3) { + const [user] = await db.select().from(users).where(eq(users.email, email3)).limit(1); + return user || null; +} +async function getUserByMobile2(mobile) { + const [user] = await db.select().from(users).where(eq(users.mobile, mobile)).limit(1); + return user || null; +} +async function getUserById(userId) { + const [user] = await db.select().from(users).where(eq(users.id, userId)).limit(1); + return user || null; +} +async function getUserCreds(userId) { + const [creds] = await db.select().from(userCreds).where(eq(userCreds.userId, userId)).limit(1); + return creds || null; +} +async function getUserDetails(userId) { + const [details] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + return details || null; +} +async function isUserSuspended(userId) { + const details = await getUserDetails(userId); + return details?.isSuspended ?? false; +} +async function createUserWithProfile(input) { + return db.transaction(async (tx) => { + const [user] = await tx.insert(users).values({ + name: input.name, + email: input.email, + mobile: input.mobile + }).returning(); + await tx.insert(userCreds).values({ + userId: user.id, + userPassword: input.hashedPassword + }); + await tx.insert(userDetails).values({ + userId: user.id, + profileImage: input.profileImage || null + }); + return user; + }); +} +async function getUserDetailsByUserId(userId) { + const [details] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + return details || null; +} +async function updateUserProfile(userId, data) { + return db.transaction(async (tx) => { + const userUpdate = {}; + if (data.name !== void 0) + userUpdate.name = data.name; + if (data.email !== void 0) + userUpdate.email = data.email; + if (data.mobile !== void 0) + userUpdate.mobile = data.mobile; + if (Object.keys(userUpdate).length > 0) { + await tx.update(users).set(userUpdate).where(eq(users.id, userId)); + } + if (data.hashedPassword) { + await tx.update(userCreds).set({ + userPassword: data.hashedPassword + }).where(eq(userCreds.userId, userId)); + } + const detailsUpdate = {}; + if (data.bio !== void 0) + detailsUpdate.bio = data.bio; + if (data.dateOfBirth !== void 0) + detailsUpdate.dateOfBirth = data.dateOfBirth; + if (data.gender !== void 0) + detailsUpdate.gender = data.gender; + if (data.occupation !== void 0) + detailsUpdate.occupation = data.occupation; + if (data.profileImage !== void 0) + detailsUpdate.profileImage = data.profileImage; + detailsUpdate.updatedAt = /* @__PURE__ */ new Date(); + const [existingDetails] = await tx.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + if (existingDetails) { + await tx.update(userDetails).set(detailsUpdate).where(eq(userDetails.userId, userId)); + } else { + await tx.insert(userDetails).values({ + userId, + ...detailsUpdate, + createdAt: /* @__PURE__ */ new Date() + }); + } + const [user] = await tx.select().from(users).where(eq(users.id, userId)).limit(1); + return user; + }); +} +async function createUserWithCreds(input) { + return db.transaction(async (tx) => { + const [user] = await tx.insert(users).values({ + name: input.name, + email: input.email, + mobile: input.mobile + }).returning(); + await tx.insert(userCreds).values({ + userId: user.id, + userPassword: input.hashedPassword + }); + return user; + }); +} +async function createUserWithMobile(mobile) { + const [user] = await db.insert(users).values({ + name: null, + email: null, + mobile + }).returning(); + return user; +} +async function upsertUserPassword(userId, hashedPassword) { + try { + await db.insert(userCreds).values({ + userId, + userPassword: hashedPassword + }); + return; + } catch (error50) { + if (error50.code === "23505") { + await db.update(userCreds).set({ + userPassword: hashedPassword + }).where(eq(userCreds.userId, userId)); + return; + } + throw error50; + } +} +async function deleteUserAccount(userId) { + await db.transaction(async (tx) => { + await tx.delete(notifCreds).where(eq(notifCreds.userId, userId)); + await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.userId, userId)); + await tx.delete(couponUsage).where(eq(couponUsage.userId, userId)); + await tx.delete(complaints).where(eq(complaints.userId, userId)); + await tx.delete(cartItems).where(eq(cartItems.userId, userId)); + await tx.delete(notifications).where(eq(notifications.userId, userId)); + await tx.delete(productReviews).where(eq(productReviews.userId, userId)); + await tx.update(reservedCoupons).set({ redeemedBy: null }).where(eq(reservedCoupons.redeemedBy, userId)); + const userOrders = await tx.select({ id: orders.id }).from(orders).where(eq(orders.userId, userId)); + for (const order of userOrders) { + await tx.delete(orderItems).where(eq(orderItems.orderId, order.id)); + await tx.delete(orderStatus).where(eq(orderStatus.orderId, order.id)); + await tx.delete(payments).where(eq(payments.orderId, order.id)); + await tx.delete(refunds).where(eq(refunds.orderId, order.id)); + await tx.delete(couponUsage).where(eq(couponUsage.orderId, order.id)); + await tx.delete(complaints).where(eq(complaints.orderId, order.id)); + } + await tx.delete(orders).where(eq(orders.userId, userId)); + await tx.delete(addresses).where(eq(addresses.userId, userId)); + await tx.delete(userDetails).where(eq(userDetails.userId, userId)); + await tx.delete(userCreds).where(eq(userCreds.userId, userId)); + await tx.delete(users).where(eq(users.id, userId)); + }); +} +var init_auth = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/auth.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getUserByEmail, "getUserByEmail"); + __name(getUserByMobile2, "getUserByMobile"); + __name(getUserById, "getUserById"); + __name(getUserCreds, "getUserCreds"); + __name(getUserDetails, "getUserDetails"); + __name(isUserSuspended, "isUserSuspended"); + __name(createUserWithProfile, "createUserWithProfile"); + __name(getUserDetailsByUserId, "getUserDetailsByUserId"); + __name(updateUserProfile, "updateUserProfile"); + __name(createUserWithCreds, "createUserWithCreds"); + __name(createUserWithMobile, "createUserWithMobile"); + __name(upsertUserPassword, "upsertUserPassword"); + __name(deleteUserAccount, "deleteUserAccount"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/coupon.ts +async function getActiveCouponsWithRelations(userId) { + const allCoupons = await db.query.coupons.findMany({ + where: and( + eq(coupons.isInvalidated, false), + or( + isNull(coupons.validTill), + gt(coupons.validTill, /* @__PURE__ */ new Date()) + ) + ), + with: { + usages: { + where: eq(couponUsage.userId, userId) + }, + applicableUsers: true, + applicableProducts: true + } + }); + return allCoupons.map(mapCouponWithRelations); +} +async function getAllCouponsWithRelations(userId) { + const allCoupons = await db.query.coupons.findMany({ + with: { + usages: { + where: eq(couponUsage.userId, userId) + }, + applicableUsers: true, + applicableProducts: true + } + }); + return allCoupons.map(mapCouponWithRelations); +} +async function getReservedCouponByCode(secretCode) { + const reserved = await db.query.reservedCoupons.findFirst({ + where: and( + eq(reservedCoupons.secretCode, secretCode.toUpperCase()), + eq(reservedCoupons.isRedeemed, false) + ) + }); + return reserved || null; +} +async function redeemReservedCoupon(userId, reservedCoupon) { + const couponResult = await db.transaction(async (tx) => { + const [coupon] = await tx.insert(coupons).values({ + couponCode: reservedCoupon.couponCode, + isUserBased: true, + discountPercent: reservedCoupon.discountPercent, + flatDiscount: reservedCoupon.flatDiscount, + minOrder: reservedCoupon.minOrder, + productIds: reservedCoupon.productIds, + maxValue: reservedCoupon.maxValue, + isApplyForAll: false, + validTill: reservedCoupon.validTill, + maxLimitForUser: reservedCoupon.maxLimitForUser, + exclusiveApply: reservedCoupon.exclusiveApply, + createdBy: reservedCoupon.createdBy + }).returning(); + await tx.insert(couponApplicableUsers).values({ + couponId: coupon.id, + userId + }); + await tx.update(reservedCoupons).set({ + isRedeemed: true, + redeemedBy: userId, + redeemedAt: /* @__PURE__ */ new Date() + }).where(eq(reservedCoupons.id, reservedCoupon.id)); + return coupon; + }); + return mapCoupon(couponResult); +} +var mapCoupon, mapUsage, mapApplicableUser, mapApplicableProduct, mapCouponWithRelations; +var init_coupon2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/coupon.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + mapCoupon = /* @__PURE__ */ __name((coupon) => ({ + id: coupon.id, + couponCode: coupon.couponCode, + isUserBased: coupon.isUserBased, + discountPercent: coupon.discountPercent ? coupon.discountPercent.toString() : null, + flatDiscount: coupon.flatDiscount ? coupon.flatDiscount.toString() : null, + minOrder: coupon.minOrder ? coupon.minOrder.toString() : null, + productIds: coupon.productIds, + maxValue: coupon.maxValue ? coupon.maxValue.toString() : null, + isApplyForAll: coupon.isApplyForAll, + validTill: coupon.validTill ?? null, + maxLimitForUser: coupon.maxLimitForUser ?? null, + isInvalidated: coupon.isInvalidated, + exclusiveApply: coupon.exclusiveApply, + createdAt: coupon.createdAt + }), "mapCoupon"); + mapUsage = /* @__PURE__ */ __name((usage) => ({ + id: usage.id, + userId: usage.userId, + couponId: usage.couponId, + orderId: usage.orderId ?? null, + orderItemId: usage.orderItemId ?? null, + usedAt: usage.usedAt + }), "mapUsage"); + mapApplicableUser = /* @__PURE__ */ __name((applicable) => ({ + id: applicable.id, + couponId: applicable.couponId, + userId: applicable.userId + }), "mapApplicableUser"); + mapApplicableProduct = /* @__PURE__ */ __name((applicable) => ({ + id: applicable.id, + couponId: applicable.couponId, + productId: applicable.productId + }), "mapApplicableProduct"); + mapCouponWithRelations = /* @__PURE__ */ __name((coupon) => ({ + ...mapCoupon(coupon), + usages: coupon.usages.map(mapUsage), + applicableUsers: coupon.applicableUsers.map(mapApplicableUser), + applicableProducts: coupon.applicableProducts.map(mapApplicableProduct) + }), "mapCouponWithRelations"); + __name(getActiveCouponsWithRelations, "getActiveCouponsWithRelations"); + __name(getAllCouponsWithRelations, "getAllCouponsWithRelations"); + __name(getReservedCouponByCode, "getReservedCouponByCode"); + __name(redeemReservedCoupon, "redeemReservedCoupon"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/user.ts +async function getUserById2(userId) { + const [user] = await db.select().from(users).where(eq(users.id, userId)).limit(1); + return user || null; +} +async function getUserDetailByUserId(userId) { + const [detail] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + return detail || null; +} +async function getUserWithCreds(userId) { + const result = await db.select().from(users).leftJoin(userCreds, eq(users.id, userCreds.userId)).where(eq(users.id, userId)).limit(1); + if (result.length === 0) + return null; + return { + user: result[0].users, + creds: result[0].user_creds + }; +} +async function getNotifCred(userId, token) { + return db.query.notifCreds.findFirst({ + where: and(eq(notifCreds.userId, userId), eq(notifCreds.token, token)) + }); +} +async function upsertNotifCred(userId, token) { + const existing = await getNotifCred(userId, token); + if (existing) { + await db.update(notifCreds).set({ lastVerified: /* @__PURE__ */ new Date() }).where(eq(notifCreds.id, existing.id)); + return; + } + await db.insert(notifCreds).values({ + userId, + token, + lastVerified: /* @__PURE__ */ new Date() + }); +} +async function deleteUnloggedToken(token) { + await db.delete(unloggedUserTokens).where(eq(unloggedUserTokens.token, token)); +} +async function getUnloggedToken(token) { + return db.query.unloggedUserTokens.findFirst({ + where: eq(unloggedUserTokens.token, token) + }); +} +async function upsertUnloggedToken(token) { + const existing = await getUnloggedToken(token); + if (existing) { + await db.update(unloggedUserTokens).set({ lastVerified: /* @__PURE__ */ new Date() }).where(eq(unloggedUserTokens.id, existing.id)); + return; + } + await db.insert(unloggedUserTokens).values({ + token, + lastVerified: /* @__PURE__ */ new Date() + }); +} +var init_user2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getUserById2, "getUserById"); + __name(getUserDetailByUserId, "getUserDetailByUserId"); + __name(getUserWithCreds, "getUserWithCreds"); + __name(getNotifCred, "getNotifCred"); + __name(upsertNotifCred, "upsertNotifCred"); + __name(deleteUnloggedToken, "deleteUnloggedToken"); + __name(getUnloggedToken, "getUnloggedToken"); + __name(upsertUnloggedToken, "upsertUnloggedToken"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/order.ts +async function validateAndGetCoupon(couponId, userId, totalAmount) { + if (!couponId) + return null; + const coupon = await db.query.coupons.findFirst({ + where: eq(coupons.id, couponId), + with: { + usages: { where: eq(couponUsage.userId, userId) } + } + }); + if (!coupon) + throw new Error("Invalid coupon"); + if (coupon.isInvalidated) + throw new Error("Coupon is no longer valid"); + if (coupon.validTill && new Date(coupon.validTill) < /* @__PURE__ */ new Date()) + throw new Error("Coupon has expired"); + if (coupon.maxLimitForUser && coupon.usages.length >= coupon.maxLimitForUser) + throw new Error("Coupon usage limit exceeded"); + if (coupon.minOrder && parseFloat(coupon.minOrder.toString()) > totalAmount) + throw new Error("Order amount does not meet coupon minimum requirement"); + return coupon; +} +function applyDiscountToOrder(orderTotal, appliedCoupon, proportion) { + let finalOrderTotal = orderTotal; + if (appliedCoupon) { + if (appliedCoupon.discountPercent) { + const discount = Math.min( + orderTotal * parseFloat(appliedCoupon.discountPercent.toString()) / 100, + appliedCoupon.maxValue ? parseFloat(appliedCoupon.maxValue.toString()) * proportion : Infinity + ); + finalOrderTotal -= discount; + } else if (appliedCoupon.flatDiscount) { + const discount = Math.min( + parseFloat(appliedCoupon.flatDiscount.toString()) * proportion, + appliedCoupon.maxValue ? parseFloat(appliedCoupon.maxValue.toString()) * proportion : finalOrderTotal + ); + finalOrderTotal -= discount; + } + } + return { finalOrderTotal, orderGroupProportion: proportion }; +} +async function getAddressByIdAndUser(addressId, userId) { + return db.query.addresses.findFirst({ + where: and(eq(addresses.userId, userId), eq(addresses.id, addressId)) + }); +} +async function getProductById4(productId) { + return db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId) + }); +} +async function checkUserSuspended(userId) { + const userDetail = await db.query.userDetails.findFirst({ + where: eq(userDetails.userId, userId) + }); + return userDetail?.isSuspended ?? false; +} +async function getSlotCapacityStatus(slotId) { + const slot = await db.query.deliverySlotInfo.findFirst({ + where: eq(deliverySlotInfo.id, slotId), + columns: { + isCapacityFull: true + } + }); + return slot?.isCapacityFull ?? false; +} +async function placeOrderTransaction(params) { + const { userId, ordersData, paymentMethod } = params; + return db.transaction(async (tx) => { + let sharedPaymentInfoId = null; + if (paymentMethod === "online") { + const [paymentInfo] = await tx.insert(paymentInfoTable).values({ + status: "pending", + gateway: "razorpay", + merchantOrderId: `multi_order_${Date.now()}` + }).returning(); + sharedPaymentInfoId = paymentInfo.id; + } + const ordersToInsert = ordersData.map((od) => ({ + ...od.order, + paymentInfoId: sharedPaymentInfoId + })); + const insertedOrders = await tx.insert(orders).values(ordersToInsert).returning(); + const allOrderItems = []; + const allOrderStatuses = []; + insertedOrders.forEach((order, index) => { + const od = ordersData[index]; + od.orderItems.forEach((item) => { + allOrderItems.push({ ...item, orderId: order.id }); + }); + allOrderStatuses.push({ + ...od.orderStatus, + orderId: order.id + }); + }); + await tx.insert(orderItems).values(allOrderItems); + await tx.insert(orderStatus).values(allOrderStatuses); + return insertedOrders; + }); +} +async function deleteCartItemsForOrder(userId, productIds) { + await db.delete(cartItems).where( + and( + eq(cartItems.userId, userId), + inArray(cartItems.productId, productIds) + ) + ); +} +async function recordCouponUsage(userId, couponId, orderId) { + await db.insert(couponUsage).values({ + userId, + couponId, + orderId, + orderItemId: null, + usedAt: /* @__PURE__ */ new Date() + }); +} +async function getOrdersWithRelations(userId, offset, pageSize) { + return db.query.orders.findMany({ + where: eq(orders.userId, userId), + with: { + orderItems: { + with: { + product: { + columns: { + id: true, + name: true, + images: true + } + } + } + }, + slot: { + columns: { + deliveryTime: true + } + }, + paymentInfo: { + columns: { + id: true, + status: true + } + }, + orderStatus: { + columns: { + id: true, + isCancelled: true, + isDelivered: true, + paymentStatus: true, + cancelReason: true + } + }, + refunds: { + columns: { + refundStatus: true, + refundAmount: true + } + } + }, + orderBy: [desc(orders.createdAt)], + limit: pageSize, + offset + }); +} +async function getOrderCount(userId) { + const result = await db.select({ count: sql`count(*)` }).from(orders).where(eq(orders.userId, userId)); + return Number(result[0]?.count ?? 0); +} +async function getOrderByIdWithRelations(orderId, userId) { + const order = await db.query.orders.findFirst({ + where: and(eq(orders.id, orderId), eq(orders.userId, userId)), + with: { + orderItems: { + with: { + product: { + columns: { + id: true, + name: true, + images: true + } + } + } + }, + slot: { + columns: { + deliveryTime: true + } + }, + paymentInfo: { + columns: { + id: true, + status: true + } + }, + orderStatus: { + columns: { + id: true, + isCancelled: true, + isDelivered: true, + paymentStatus: true, + cancelReason: true + }, + with: { + refundCoupon: { + columns: { + id: true, + couponCode: true + } + } + } + }, + refunds: { + columns: { + refundStatus: true, + refundAmount: true + } + } + } + }); + return order; +} +async function getCouponUsageForOrder(orderId) { + return db.query.couponUsage.findMany({ + where: eq(couponUsage.orderId, orderId), + with: { + coupon: { + columns: { + id: true, + couponCode: true, + discountPercent: true, + flatDiscount: true, + maxValue: true + } + } + } + }); +} +async function getOrderBasic(orderId) { + return db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + orderStatus: { + columns: { + id: true, + isCancelled: true, + isDelivered: true + } + } + } + }); +} +async function cancelOrderTransaction(orderId, statusId, reason, isCod) { + await db.transaction(async (tx) => { + await tx.update(orderStatus).set({ + isCancelled: true, + cancelReason: reason, + cancellationUserNotes: reason, + cancellationReviewed: false + }).where(eq(orderStatus.id, statusId)); + const refundStatus = isCod ? "na" : "pending"; + await tx.insert(refunds).values({ + orderId, + refundStatus + }); + }); +} +async function updateOrderNotes2(orderId, userNotes) { + await db.update(orders).set({ + userNotes: userNotes || null + }).where(eq(orders.id, orderId)); +} +async function getRecentlyDeliveredOrderIds(userId, limit, since) { + const recentOrders = await db.select({ id: orders.id }).from(orders).innerJoin(orderStatus, eq(orders.id, orderStatus.orderId)).where( + and( + eq(orders.userId, userId), + eq(orderStatus.isDelivered, true), + gte(orders.createdAt, since) + ) + ).orderBy(desc(orders.createdAt)).limit(limit); + return recentOrders.map((order) => order.id); +} +async function getProductIdsFromOrders(orderIds) { + const orderItemsResult = await db.select({ productId: orderItems.productId }).from(orderItems).where(inArray(orderItems.orderId, orderIds)); + return [...new Set(orderItemsResult.map((item) => item.productId))]; +} +async function getProductsForRecentOrders(productIds, limit) { + const results = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + price: productInfo.price, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + unitShortNotation: units.shortNotation, + incrementStep: productInfo.incrementStep + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)).where( + and( + inArray(productInfo.id, productIds), + eq(productInfo.isSuspended, false) + ) + ).orderBy(desc(productInfo.createdAt)).limit(limit); + return results.map((product) => ({ + ...product, + price: String(product.price ?? "0") + })); +} +async function getOrdersByIdsWithFullData(orderIds) { + return db.query.orders.findMany({ + where: inArray(orders.id, orderIds), + with: { + address: { + columns: { + name: true, + addressLine1: true, + addressLine2: true, + city: true, + state: true, + pincode: true, + phone: true + } + }, + orderItems: { + with: { + product: { + columns: { + name: true + } + } + } + }, + slot: { + columns: { + deliveryTime: true + } + } + } + }); +} +async function getOrderByIdWithFullData(orderId) { + return db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + address: { + columns: { + name: true, + addressLine1: true, + addressLine2: true, + city: true, + state: true, + pincode: true, + phone: true + } + }, + orderItems: { + with: { + product: { + columns: { + name: true + } + } + } + }, + slot: { + columns: { + deliveryTime: true + } + }, + refunds: { + columns: { + refundStatus: true + } + } + } + }); +} +var init_order2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/order.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(validateAndGetCoupon, "validateAndGetCoupon"); + __name(applyDiscountToOrder, "applyDiscountToOrder"); + __name(getAddressByIdAndUser, "getAddressByIdAndUser"); + __name(getProductById4, "getProductById"); + __name(checkUserSuspended, "checkUserSuspended"); + __name(getSlotCapacityStatus, "getSlotCapacityStatus"); + __name(placeOrderTransaction, "placeOrderTransaction"); + __name(deleteCartItemsForOrder, "deleteCartItemsForOrder"); + __name(recordCouponUsage, "recordCouponUsage"); + __name(getOrdersWithRelations, "getOrdersWithRelations"); + __name(getOrderCount, "getOrderCount"); + __name(getOrderByIdWithRelations, "getOrderByIdWithRelations"); + __name(getCouponUsageForOrder, "getCouponUsageForOrder"); + __name(getOrderBasic, "getOrderBasic"); + __name(cancelOrderTransaction, "cancelOrderTransaction"); + __name(updateOrderNotes2, "updateOrderNotes"); + __name(getRecentlyDeliveredOrderIds, "getRecentlyDeliveredOrderIds"); + __name(getProductIdsFromOrders, "getProductIdsFromOrders"); + __name(getProductsForRecentOrders, "getProductsForRecentOrders"); + __name(getOrdersByIdsWithFullData, "getOrdersByIdsWithFullData"); + __name(getOrderByIdWithFullData, "getOrderByIdWithFullData"); + } +}); + +// ../../packages/db_helper_sqlite/src/stores/store-helpers.ts +async function getAllBannersForCache() { + return db.query.homeBanners.findMany({ + where: isNotNull(homeBanners.serialNum), + orderBy: asc(homeBanners.serialNum) + }); +} +async function getAllProductsForCache() { + const results = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + longDescription: productInfo.longDescription, + price: productInfo.price, + marketPrice: productInfo.marketPrice, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + storeId: productInfo.storeId, + unitShortNotation: units.shortNotation, + incrementStep: productInfo.incrementStep, + productQuantity: productInfo.productQuantity, + isFlashAvailable: productInfo.isFlashAvailable, + flashPrice: productInfo.flashPrice + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)); + return results.map((product) => ({ + ...product, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null, + flashPrice: product.flashPrice ? String(product.flashPrice) : null + })); +} +async function getAllStoresForCache() { + return db.query.storeInfo.findMany({ + columns: { id: true, name: true, description: true } + }); +} +async function getAllDeliverySlotsForCache() { + return db.select({ + productId: productSlots.productId, + id: deliverySlotInfo.id, + deliveryTime: deliverySlotInfo.deliveryTime, + freezeTime: deliverySlotInfo.freezeTime, + isCapacityFull: deliverySlotInfo.isCapacityFull + }).from(productSlots).innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id)).where( + and( + eq(deliverySlotInfo.isActive, true), + eq(deliverySlotInfo.isCapacityFull, false), + gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`) + ) + ); +} +async function getAllSpecialDealsForCache() { + const results = await db.select({ + productId: specialDeals.productId, + quantity: specialDeals.quantity, + price: specialDeals.price, + validTill: specialDeals.validTill + }).from(specialDeals).where(gt(specialDeals.validTill, sql`CURRENT_TIMESTAMP`)); + return results.map((deal) => ({ + ...deal, + quantity: String(deal.quantity ?? "0"), + price: String(deal.price ?? "0") + })); +} +async function getAllProductTagsForCache() { + return db.select({ + productId: productTags.productId, + tagName: productTagInfo.tagName + }).from(productTags).innerJoin(productTagInfo, eq(productTags.tagId, productTagInfo.id)); +} +async function getAllTagsForCache() { + return db.select({ + id: productTagInfo.id, + tagName: productTagInfo.tagName, + tagDescription: productTagInfo.tagDescription, + imageUrl: productTagInfo.imageUrl, + isDashboardTag: productTagInfo.isDashboardTag, + relatedStores: productTagInfo.relatedStores + }).from(productTagInfo); +} +async function getAllTagProductMappings() { + return db.select({ + tagId: productTags.tagId, + productId: productTags.productId + }).from(productTags); +} +async function getAllSlotsWithProductsForCache() { + const now = /* @__PURE__ */ new Date(); + return db.query.deliverySlotInfo.findMany({ + where: and( + eq(deliverySlotInfo.isActive, true), + gt(deliverySlotInfo.deliveryTime, now) + ), + with: { + productSlots: { + with: { + product: { + with: { + unit: true, + store: true + } + } + } + } + }, + orderBy: asc(deliverySlotInfo.deliveryTime) + }); +} +async function getAllUserNegativityScores() { + const results = await db.select({ + userId: userIncidents.userId, + totalNegativityScore: sql`sum(${userIncidents.negativityScore})` + }).from(userIncidents).groupBy(userIncidents.userId); + return results.map((result) => ({ + userId: result.userId, + totalNegativityScore: Number(result.totalNegativityScore ?? 0) + })); +} +async function getUserNegativityScore(userId) { + const [result] = await db.select({ + totalNegativityScore: sql`sum(${userIncidents.negativityScore})` + }).from(userIncidents).where(eq(userIncidents.userId, userId)).limit(1); + return Number(result?.totalNegativityScore ?? 0); +} +var init_store_helpers = __esm({ + "../../packages/db_helper_sqlite/src/stores/store-helpers.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getAllBannersForCache, "getAllBannersForCache"); + __name(getAllProductsForCache, "getAllProductsForCache"); + __name(getAllStoresForCache, "getAllStoresForCache"); + __name(getAllDeliverySlotsForCache, "getAllDeliverySlotsForCache"); + __name(getAllSpecialDealsForCache, "getAllSpecialDealsForCache"); + __name(getAllProductTagsForCache, "getAllProductTagsForCache"); + __name(getAllTagsForCache, "getAllTagsForCache"); + __name(getAllTagProductMappings, "getAllTagProductMappings"); + __name(getAllSlotsWithProductsForCache, "getAllSlotsWithProductsForCache"); + __name(getAllUserNegativityScores, "getAllUserNegativityScores"); + __name(getUserNegativityScore, "getUserNegativityScore"); + } +}); + +// ../../packages/db_helper_sqlite/src/lib/automated-jobs.ts +async function toggleFlashDeliveryForItems(isAvailable, productIds) { + await db.update(productInfo).set({ isFlashAvailable: isAvailable }).where(inArray(productInfo.id, productIds)); +} +async function toggleKeyVal(key, value) { + await db.update(keyValStore).set({ value }).where(eq(keyValStore.key, key)); +} +async function getAllKeyValStore() { + return db.select().from(keyValStore); +} +var init_automated_jobs = __esm({ + "../../packages/db_helper_sqlite/src/lib/automated-jobs.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(toggleFlashDeliveryForItems, "toggleFlashDeliveryForItems"); + __name(toggleKeyVal, "toggleKeyVal"); + __name(getAllKeyValStore, "getAllKeyValStore"); + } +}); + +// ../../packages/db_helper_sqlite/src/lib/health-check.ts +async function healthCheck() { + try { + await db.select({ key: keyValStore.key }).from(keyValStore).limit(1); + return { status: "ok" }; + } catch { + await db.select({ name: productInfo.name }).from(productInfo).limit(1); + return { status: "ok" }; + } +} +var init_health_check = __esm({ + "../../packages/db_helper_sqlite/src/lib/health-check.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + __name(healthCheck, "healthCheck"); + } +}); + +// ../../packages/db_helper_sqlite/src/lib/delete-orders.ts +async function deleteOrdersWithRelations(orderIds) { + if (orderIds.length === 0) { + return; + } + await db.delete(couponUsage).where(inArray(couponUsage.orderId, orderIds)); + await db.delete(complaints).where(inArray(complaints.orderId, orderIds)); + await db.delete(refunds).where(inArray(refunds.orderId, orderIds)); + await db.delete(payments).where(inArray(payments.orderId, orderIds)); + await db.delete(orderStatus).where(inArray(orderStatus.orderId, orderIds)); + await db.delete(orderItems).where(inArray(orderItems.orderId, orderIds)); + await db.delete(orders).where(inArray(orders.id, orderIds)); +} +var init_delete_orders = __esm({ + "../../packages/db_helper_sqlite/src/lib/delete-orders.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(deleteOrdersWithRelations, "deleteOrdersWithRelations"); + } +}); + +// ../../packages/db_helper_sqlite/src/helper_methods/upload-url.ts +async function createUploadUrlStatus(key) { + await db.insert(uploadUrlStatus).values({ + key, + status: "pending" + }); +} +async function claimUploadUrlStatus(key) { + const result = await db.update(uploadUrlStatus).set({ status: "claimed" }).where(and(eq(uploadUrlStatus.key, key), eq(uploadUrlStatus.status, "pending"))).returning(); + return result.length > 0; +} +var init_upload_url = __esm({ + "../../packages/db_helper_sqlite/src/helper_methods/upload-url.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_drizzle_orm(); + init_db_index(); + init_schema(); + __name(createUploadUrlStatus, "createUploadUrlStatus"); + __name(claimUploadUrlStatus, "claimUploadUrlStatus"); + } +}); + +// ../../packages/db_helper_sqlite/src/lib/seed.ts +async function seedUnits(unitsToSeed) { + for (const unit of unitsToSeed) { + const { units: unitsTable } = await Promise.resolve().then(() => (init_schema(), schema_exports)); + const existingUnit = await db.query.units.findFirst({ + where: eq(unitsTable.shortNotation, unit.shortNotation) + }); + if (!existingUnit) { + await db.insert(unitsTable).values(unit); + } + } +} +async function seedStaffRoles(rolesToSeed) { + for (const roleName of rolesToSeed) { + const { staffRoles: staffRoles2 } = await Promise.resolve().then(() => (init_schema(), schema_exports)); + const existingRole = await db.query.staffRoles.findFirst({ + where: eq(staffRoles2.roleName, roleName) + }); + if (!existingRole) { + await db.insert(staffRoles2).values({ roleName }); + } + } +} +async function seedStaffPermissions(permissionsToSeed) { + for (const permissionName of permissionsToSeed) { + const { staffPermissions: staffPermissions2 } = await Promise.resolve().then(() => (init_schema(), schema_exports)); + const existingPermission = await db.query.staffPermissions.findFirst({ + where: eq(staffPermissions2.permissionName, permissionName) + }); + if (!existingPermission) { + await db.insert(staffPermissions2).values({ permissionName }); + } + } +} +async function seedRolePermissions(assignments) { + await db.transaction(async (tx) => { + const { staffRoles: staffRoles2, staffPermissions: staffPermissions2, staffRolePermissions: staffRolePermissions2 } = await Promise.resolve().then(() => (init_schema(), schema_exports)); + for (const assignment of assignments) { + const role = await tx.query.staffRoles.findFirst({ + where: eq(staffRoles2.roleName, assignment.roleName) + }); + const permission2 = await tx.query.staffPermissions.findFirst({ + where: eq(staffPermissions2.permissionName, assignment.permissionName) + }); + if (role && permission2) { + const existing = await tx.query.staffRolePermissions.findFirst({ + where: and( + eq(staffRolePermissions2.staffRoleId, role.id), + eq(staffRolePermissions2.staffPermissionId, permission2.id) + ) + }); + if (!existing) { + await tx.insert(staffRolePermissions2).values({ + staffRoleId: role.id, + staffPermissionId: permission2.id + }); + } + } + } + }); +} +async function seedKeyValStore(constantsToSeed) { + for (const constant of constantsToSeed) { + const { keyValStore: keyValStore2 } = await Promise.resolve().then(() => (init_schema(), schema_exports)); + const existing = await db.query.keyValStore.findFirst({ + where: eq(keyValStore2.key, constant.key) + }); + if (!existing) { + await db.insert(keyValStore2).values({ + key: constant.key, + value: constant.value + }); + } + } +} +var init_seed = __esm({ + "../../packages/db_helper_sqlite/src/lib/seed.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_drizzle_orm(); + __name(seedUnits, "seedUnits"); + __name(seedStaffRoles, "seedStaffRoles"); + __name(seedStaffPermissions, "seedStaffPermissions"); + __name(seedRolePermissions, "seedRolePermissions"); + __name(seedKeyValStore, "seedKeyValStore"); + } +}); + +// ../../packages/db_helper_sqlite/index.ts +var init_db_helper_sqlite = __esm({ + "../../packages/db_helper_sqlite/index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_schema(); + init_banner(); + init_complaint(); + init_const(); + init_coupon(); + init_order(); + init_product(); + init_slots(); + init_staff_user(); + init_store(); + init_user(); + init_vendor_snippets(); + init_address(); + init_banners(); + init_cart(); + init_complaint2(); + init_stores(); + init_product2(); + init_slots2(); + init_payments(); + init_auth(); + init_coupon2(); + init_user2(); + init_order2(); + init_store_helpers(); + init_automated_jobs(); + init_health_check(); + init_product2(); + init_stores(); + init_delete_orders(); + init_upload_url(); + init_seed(); + } +}); + +// src/sqliteImporter.ts +var init_sqliteImporter = __esm({ + "src/sqliteImporter.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_helper_sqlite(); + init_db_helper_sqlite(); + init_db_helper_sqlite(); + } +}); + +// src/dbService.ts +var dbService_exports = {}; +__export(dbService_exports, { + addProductToGroup: () => addProductToGroup, + addressAreas: () => addressAreas, + addressAreasRelations: () => addressAreasRelations, + addressZones: () => addressZones, + addressZonesRelations: () => addressZonesRelations, + addresses: () => addresses, + addressesRelations: () => addressesRelations, + applyDiscountToUserOrder: () => applyDiscountToOrder, + cancelOrder: () => cancelOrder, + cancelUserOrderTransaction: () => cancelOrderTransaction, + cartItems: () => cartItems, + cartItemsRelations: () => cartItemsRelations, + checkCouponExists: () => checkCouponExists, + checkProductExistsByName: () => checkProductExistsByName, + checkProductTagExistsByName: () => checkProductTagExistsByName, + checkReservedCouponExists: () => checkReservedCouponExists, + checkStaffRoleExists: () => checkStaffRoleExists, + checkStaffUserExists: () => checkStaffUserExists, + checkUnitExists: () => checkUnitExists, + checkUserSuspended: () => checkUserSuspended, + checkUsersExist: () => checkUsersExist, + checkVendorSnippetExists: () => checkVendorSnippetExists, + claimUploadUrlStatus: () => claimUploadUrlStatus, + clearUserCart: () => clearUserCart, + clearUserDefaultAddress: () => clearDefaultAddress, + complaints: () => complaints, + complaintsRelations: () => complaintsRelations, + couponApplicableProducts: () => couponApplicableProducts, + couponApplicableProductsRelations: () => couponApplicableProductsRelations, + couponApplicableUsers: () => couponApplicableUsers, + couponApplicableUsersRelations: () => couponApplicableUsersRelations, + couponUsage: () => couponUsage, + couponUsageRelations: () => couponUsageRelations, + coupons: () => coupons, + couponsRelations: () => couponsRelations, + createBanner: () => createBanner, + createCouponForUser: () => createCouponForUser, + createCouponWithRelations: () => createCouponWithRelations, + createProduct: () => createProduct, + createProductGroup: () => createProductGroup, + createProductTag: () => createProductTag, + createReservedCouponWithProducts: () => createReservedCouponWithProducts, + createSlotWithRelations: () => createSlotWithRelations, + createSpecialDealsForProduct: () => createSpecialDealsForProduct, + createStaffUser: () => createStaffUser, + createStore: () => createStore, + createUploadUrlStatus: () => createUploadUrlStatus, + createUserAddress: () => createUserAddress, + createUserAuthWithCreds: () => createUserWithCreds, + createUserAuthWithMobile: () => createUserWithMobile, + createUserByMobile: () => createUserByMobile, + createUserComplaint: () => createComplaint, + createUserIncident: () => createUserIncident, + createUserProductReview: () => createProductReview, + createUserWithProfile: () => createUserWithProfile, + createVendorSnippet: () => createVendorSnippet, + db: () => db, + deleteBanner: () => deleteBanner, + deleteOrderById: () => deleteOrderById, + deleteOrdersWithRelations: () => deleteOrdersWithRelations, + deleteProduct: () => deleteProduct, + deleteProductGroup: () => deleteProductGroup, + deleteProductTag: () => deleteProductTag, + deleteSlotById: () => deleteSlotById, + deleteStore: () => deleteStore, + deleteUserAddress: () => deleteUserAddress, + deleteUserAuthAccount: () => deleteUserAccount, + deleteUserCartItem: () => deleteCartItem, + deleteUserCartItemsForOrder: () => deleteCartItemsForOrder, + deleteUserUnloggedToken: () => deleteUnloggedToken, + deleteVendorSnippet: () => deleteVendorSnippet, + deliverySlotInfo: () => deliverySlotInfo, + deliverySlotInfoRelations: () => deliverySlotInfoRelations, + generateCancellationCoupon: () => generateCancellationCoupon, + getActiveSlots: () => getActiveSlots, + getActiveSlotsWithProducts: () => getActiveSlotsWithProducts, + getAllBannersForCache: () => getAllBannersForCache, + getAllConstants: () => getAllConstants, + getAllCoupons: () => getAllCoupons, + getAllDeliverySlotsForCache: () => getAllDeliverySlotsForCache, + getAllKeyValStore: () => getAllKeyValStore, + getAllNotifCreds: () => getAllNotifCreds, + getAllOrders: () => getAllOrders, + getAllProductGroups: () => getAllProductGroups, + getAllProductTagInfos: () => getAllProductTagInfos, + getAllProductTags: () => getAllProductTags, + getAllProductTagsForCache: () => getAllProductTagsForCache, + getAllProducts: () => getAllProducts, + getAllProductsForCache: () => getAllProductsForCache, + getAllProductsWithUnits: () => getAllProductsWithUnits, + getAllRoles: () => getAllRoles, + getAllSlotsWithProductsForCache: () => getAllSlotsWithProductsForCache, + getAllSpecialDealsForCache: () => getAllSpecialDealsForCache, + getAllStaff: () => getAllStaff, + getAllStores: () => getAllStores, + getAllStoresForCache: () => getAllStoresForCache, + getAllTagProductMappings: () => getAllTagProductMappings, + getAllTagsForCache: () => getAllTagsForCache, + getAllUnits: () => getAllUnits, + getAllUnloggedTokens: () => getAllUnloggedTokens, + getAllUserNegativityScores: () => getAllUserNegativityScores, + getAllUsers: () => getAllUsers, + getAllUsersWithFilters: () => getAllUsersWithFilters, + getAllVendorSnippets: () => getAllVendorSnippets, + getBannerById: () => getBannerById, + getBanners: () => getBanners, + getComplaints: () => getComplaints, + getCouponById: () => getCouponById, + getItemCountsByOrderIds: () => getItemCountsByOrderIds, + getLastOrdersByUserIds: () => getLastOrdersByUserIds, + getNextDeliveryDateWithCapacity: () => getNextDeliveryDateWithCapacity, + getNotifTokensByUserIds: () => getNotifTokensByUserIds, + getOrderByIdWithFullData: () => getOrderByIdWithFullData, + getOrderCountsByUserIds: () => getOrderCountsByUserIds, + getOrderDetails: () => getOrderDetails, + getOrderDetailsWrapper: () => getOrderDetailsWrapper, + getOrderItemsByOrderIds: () => getOrderItemsByOrderIds, + getOrderProductById: () => getProductById4, + getOrderStatusByOrderIds: () => getOrderStatusByOrderIds, + getOrderStatusesByOrderIds: () => getOrderStatusesByOrderIds, + getOrderWithUser: () => getOrderWithUser, + getOrdersByIdsWithFullData: () => getOrdersByIdsWithFullData, + getProductById: () => getProductById, + getProductImagesById: () => getProductImagesById, + getProductReviews: () => getProductReviews, + getProductTagById: () => getProductTagById, + getProductTagInfoById: () => getProductTagInfoById, + getProductsByIds: () => getProductsByIds, + getReservedCoupons: () => getReservedCoupons, + getSlotByIdWithRelations: () => getSlotByIdWithRelations, + getSlotDeliverySequence: () => getSlotDeliverySequence, + getSlotOrders: () => getSlotOrders, + getSlotProductIds: () => getSlotProductIds, + getSlotsAfterDate: () => getSlotsAfterDate, + getSlotsProductIds: () => getSlotsProductIds, + getStaffUserById: () => getStaffUserById, + getStaffUserByName: () => getStaffUserByName, + getStoreById: () => getStoreById, + getStoresSummary: () => getStoresSummary, + getSuspendedProductIds: () => getSuspendedProductIds, + getSuspensionStatusesByUserIds: () => getSuspensionStatusesByUserIds, + getUnresolvedComplaintsCount: () => getUnresolvedComplaintsCount, + getUserActiveBanners: () => getActiveBanners, + getUserActiveCouponsWithRelations: () => getActiveCouponsWithRelations, + getUserActiveSlotsList: () => getActiveSlotsList, + getUserAddressById: () => getUserAddressById, + getUserAddressByIdAndUser: () => getAddressByIdAndUser, + getUserAddresses: () => getUserAddresses, + getUserAllCouponsWithRelations: () => getAllCouponsWithRelations, + getUserAuthByEmail: () => getUserByEmail, + getUserAuthById: () => getUserById, + getUserAuthByMobile: () => getUserByMobile2, + getUserAuthCreds: () => getUserCreds, + getUserAuthDetails: () => getUserDetails, + getUserBasicInfo: () => getUserBasicInfo, + getUserByMobile: () => getUserByMobile, + getUserCartItemByUserProduct: () => getCartItemByUserProduct, + getUserCartItemsWithProducts: () => getCartItemsWithProducts, + getUserComplaints: () => getUserComplaints, + getUserCouponUsageForOrder: () => getCouponUsageForOrder, + getUserDefaultAddress: () => getDefaultAddress, + getUserDetailsByUserId: () => getUserDetailsByUserId, + getUserIncidentsWithRelations: () => getUserIncidentsWithRelations, + getUserNegativityScore: () => getUserNegativityScore, + getUserNotifCred: () => getNotifCred, + getUserOrderBasic: () => getOrderBasic, + getUserOrderByIdWithRelations: () => getOrderByIdWithRelations, + getUserOrderCount: () => getOrderCount, + getUserOrders: () => getUserOrders, + getUserOrdersWithRelations: () => getOrdersWithRelations, + getUserPaymentByMerchantOrderId: () => getPaymentByMerchantOrderId, + getUserPaymentByOrderId: () => getPaymentByOrderId, + getUserPaymentOrderById: () => getOrderById, + getUserProductAvailability: () => getProductAvailability, + getUserProductById: () => getProductById2, + getUserProductByIdBasic: () => getProductById3, + getUserProductDetailById: () => getProductDetailById, + getUserProductIdsFromOrders: () => getProductIdsFromOrders, + getUserProductReviews: () => getProductReviews2, + getUserProductsForRecentOrders: () => getProductsForRecentOrders, + getUserProfileById: () => getUserById2, + getUserProfileDetailById: () => getUserDetailByUserId, + getUserRecentlyDeliveredOrderIds: () => getRecentlyDeliveredOrderIds, + getUserReservedCouponByCode: () => getReservedCouponByCode, + getUserSlotCapacityStatus: () => getSlotCapacityStatus, + getUserStoreDetail: () => getStoreDetail, + getUserStoreSummaries: () => getStoreSummaries, + getUserSuspensionStatus: () => getUserSuspensionStatus, + getUserUnloggedToken: () => getUnloggedToken, + getUserWithCreds: () => getUserWithCreds, + getUserWithDetails: () => getUserWithDetails, + getUsersForCoupon: () => getUsersForCoupon, + getVendorOrders: () => getVendorOrders, + getVendorOrdersBySlotId: () => getVendorOrdersBySlotId, + getVendorSlotById: () => getVendorSlotById, + getVendorSnippetByCode: () => getVendorSnippetByCode, + getVendorSnippetById: () => getVendorSnippetById, + hasOngoingOrdersForAddress: () => hasOngoingOrdersForAddress, + healthCheck: () => healthCheck, + homeBanners: () => homeBanners, + homeBannersRelations: () => homeBannersRelations, + incrementUserCartItemQuantity: () => incrementCartItemQuantity, + initDb: () => initDb, + insertUserCartItem: () => insertCartItem, + invalidateCoupon: () => invalidateCoupon, + isUserSuspended: () => isUserSuspended, + keyValStore: () => keyValStore, + markUserPaymentFailed: () => markPaymentFailed, + notifCreds: () => notifCreds, + notifCredsRelations: () => notifCredsRelations, + notifications: () => notifications, + notificationsRelations: () => notificationsRelations, + orderItems: () => orderItems, + orderItemsRelations: () => orderItemsRelations, + orderStatus: () => orderStatus, + orderStatusRelations: () => orderStatusRelations, + orders: () => orders, + ordersRelations: () => ordersRelations, + paymentInfoRelations: () => paymentInfoRelations, + paymentInfoTable: () => paymentInfoTable, + paymentStatusEnum: () => paymentStatusEnum, + payments: () => payments, + paymentsRelations: () => paymentsRelations, + placeUserOrderTransaction: () => placeOrderTransaction, + productCategories: () => productCategories, + productCategoriesRelations: () => productCategoriesRelations, + productGroupInfo: () => productGroupInfo, + productGroupInfoRelations: () => productGroupInfoRelations, + productGroupMembership: () => productGroupMembership, + productGroupMembershipRelations: () => productGroupMembershipRelations, + productInfo: () => productInfo, + productInfoRelations: () => productInfoRelations, + productReviews: () => productReviews, + productReviewsRelations: () => productReviewsRelations, + productSlots: () => productSlots, + productSlotsRelations: () => productSlotsRelations, + productTagInfo: () => productTagInfo, + productTagInfoRelations: () => productTagInfoRelations, + productTags: () => productTags, + productTagsRelations: () => productTagsRelations, + rebalanceSlots: () => rebalanceSlots, + recordUserCouponUsage: () => recordCouponUsage, + redeemUserReservedCoupon: () => redeemReservedCoupon, + refunds: () => refunds, + refundsRelations: () => refundsRelations, + removeDeliveryCharge: () => removeDeliveryCharge, + removeProductFromGroup: () => removeProductFromGroup, + replaceProductTags: () => replaceProductTags, + reservedCoupons: () => reservedCoupons, + reservedCouponsRelations: () => reservedCouponsRelations, + resolveComplaint: () => resolveComplaint, + respondToReview: () => respondToReview, + searchUsers: () => searchUsers, + seedKeyValStore: () => seedKeyValStore, + seedRolePermissions: () => seedRolePermissions, + seedStaffPermissions: () => seedStaffPermissions, + seedStaffRoles: () => seedStaffRoles, + seedUnits: () => seedUnits, + specialDeals: () => specialDeals, + specialDealsRelations: () => specialDealsRelations, + staffPermissionEnum: () => staffPermissionEnum, + staffPermissions: () => staffPermissions, + staffPermissionsRelations: () => staffPermissionsRelations, + staffRoleEnum: () => staffRoleEnum, + staffRolePermissions: () => staffRolePermissions, + staffRolePermissionsRelations: () => staffRolePermissionsRelations, + staffRoles: () => staffRoles, + staffRolesRelations: () => staffRolesRelations, + staffUsers: () => staffUsers, + staffUsersRelations: () => staffUsersRelations, + storeInfo: () => storeInfo, + storeInfoRelations: () => storeInfoRelations, + toggleFlashDeliveryForItems: () => toggleFlashDeliveryForItems, + toggleKeyVal: () => toggleKeyVal, + toggleProductOutOfStock: () => toggleProductOutOfStock, + units: () => units, + unitsRelations: () => unitsRelations, + unloggedUserTokens: () => unloggedUserTokens, + updateAddressCoords: () => updateAddressCoords, + updateBanner: () => updateBanner, + updateCouponWithRelations: () => updateCouponWithRelations, + updateOrderDelivered: () => updateOrderDelivered, + updateOrderItemPackaging: () => updateOrderItemPackaging, + updateOrderNotes: () => updateOrderNotes, + updateOrderPackaged: () => updateOrderPackaged, + updateProduct: () => updateProduct, + updateProductDeals: () => updateProductDeals, + updateProductGroup: () => updateProductGroup, + updateProductPrices: () => updateProductPrices, + updateProductTag: () => updateProductTag, + updateSlotCapacity: () => updateSlotCapacity, + updateSlotDeliverySequence: () => updateSlotDeliverySequence, + updateSlotProducts: () => updateSlotProducts, + updateSlotWithRelations: () => updateSlotWithRelations, + updateStore: () => updateStore, + updateUserAddress: () => updateUserAddress, + updateUserCartItemQuantity: () => updateCartItemQuantity, + updateUserOrderNotes: () => updateOrderNotes2, + updateUserOrderPaymentStatus: () => updateOrderPaymentStatus, + updateUserPaymentSuccess: () => updatePaymentSuccess, + updateUserProfile: () => updateUserProfile, + updateUserSuspensionStatus: () => updateUserSuspensionStatus, + updateVendorOrderItemPackaging: () => updateVendorOrderItemPackaging, + updateVendorSnippet: () => updateVendorSnippet, + uploadStatusEnum: () => uploadStatusEnum, + uploadUrlStatus: () => uploadUrlStatus, + upsertConstants: () => upsertConstants, + upsertUserAuthPassword: () => upsertUserPassword, + upsertUserNotifCred: () => upsertNotifCred, + upsertUserSuspension: () => upsertUserSuspension, + upsertUserUnloggedToken: () => upsertUnloggedToken, + userCreds: () => userCreds, + userCredsRelations: () => userCredsRelations, + userDetails: () => userDetails, + userDetailsRelations: () => userDetailsRelations, + userIncidents: () => userIncidents, + userIncidentsRelations: () => userIncidentsRelations, + userNotifications: () => userNotifications, + userNotificationsRelations: () => userNotificationsRelations, + users: () => users, + usersRelations: () => usersRelations, + validateAndGetUserCoupon: () => validateAndGetCoupon, + validateCoupon: () => validateCoupon, + vendorSnippets: () => vendorSnippets, + vendorSnippetsRelations: () => vendorSnippetsRelations +}); +async function getOrderDetailsWrapper(orderId) { + return getOrderDetails(orderId); +} +var init_dbService = __esm({ + "src/dbService.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sqliteImporter(); + init_sqliteImporter(); + __name(getOrderDetailsWrapper, "getOrderDetailsWrapper"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/buffer_utils.js +function concat(...buffers) { + const size = buffers.reduce((acc, { length }) => acc + length, 0); + const buf = new Uint8Array(size); + let i2 = 0; + for (const buffer of buffers) { + buf.set(buffer, i2); + i2 += buffer.length; + } + return buf; +} +function encode(string4) { + const bytes = new Uint8Array(string4.length); + for (let i2 = 0; i2 < string4.length; i2++) { + const code = string4.charCodeAt(i2); + if (code > 127) { + throw new TypeError("non-ASCII string encountered in encode()"); + } + bytes[i2] = code; + } + return bytes; +} +var encoder, decoder, MAX_INT32; +var init_buffer_utils = __esm({ + "../../node_modules/jose/dist/webapi/lib/buffer_utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + encoder = new TextEncoder(); + decoder = new TextDecoder(); + MAX_INT32 = 2 ** 32; + __name(concat, "concat"); + __name(encode, "encode"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/base64.js +function encodeBase64(input) { + if (Uint8Array.prototype.toBase64) { + return input.toBase64(); + } + const CHUNK_SIZE = 32768; + const arr = []; + for (let i2 = 0; i2 < input.length; i2 += CHUNK_SIZE) { + arr.push(String.fromCharCode.apply(null, input.subarray(i2, i2 + CHUNK_SIZE))); + } + return btoa(arr.join("")); +} +function decodeBase64(encoded) { + if (Uint8Array.fromBase64) { + return Uint8Array.fromBase64(encoded); + } + const binary = atob(encoded); + const bytes = new Uint8Array(binary.length); + for (let i2 = 0; i2 < binary.length; i2++) { + bytes[i2] = binary.charCodeAt(i2); + } + return bytes; +} +var init_base64 = __esm({ + "../../node_modules/jose/dist/webapi/lib/base64.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(encodeBase64, "encodeBase64"); + __name(decodeBase64, "decodeBase64"); + } +}); + +// ../../node_modules/jose/dist/webapi/util/base64url.js +function decode(input) { + if (Uint8Array.fromBase64) { + return Uint8Array.fromBase64(typeof input === "string" ? input : decoder.decode(input), { + alphabet: "base64url" + }); + } + let encoded = input; + if (encoded instanceof Uint8Array) { + encoded = decoder.decode(encoded); + } + encoded = encoded.replace(/-/g, "+").replace(/_/g, "/"); + try { + return decodeBase64(encoded); + } catch { + throw new TypeError("The input to be decoded is not correctly encoded."); + } +} +function encode2(input) { + let unencoded = input; + if (typeof unencoded === "string") { + unencoded = encoder.encode(unencoded); + } + if (Uint8Array.prototype.toBase64) { + return unencoded.toBase64({ alphabet: "base64url", omitPadding: true }); + } + return encodeBase64(unencoded).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); +} +var init_base64url = __esm({ + "../../node_modules/jose/dist/webapi/util/base64url.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_buffer_utils(); + init_base64(); + __name(decode, "decode"); + __name(encode2, "encode"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/crypto_key.js +function getHashLength(hash4) { + return parseInt(hash4.name.slice(4), 10); +} +function checkHashLength(algorithm, expected) { + const actual = getHashLength(algorithm.hash); + if (actual !== expected) + throw unusable(`SHA-${expected}`, "algorithm.hash"); +} +function getNamedCurve(alg) { + switch (alg) { + case "ES256": + return "P-256"; + case "ES384": + return "P-384"; + case "ES512": + return "P-521"; + default: + throw new Error("unreachable"); + } +} +function checkUsage(key, usage) { + if (usage && !key.usages.includes(usage)) { + throw new TypeError(`CryptoKey does not support this operation, its usages must include ${usage}.`); + } +} +function checkSigCryptoKey(key, alg, usage) { + switch (alg) { + case "HS256": + case "HS384": + case "HS512": { + if (!isAlgorithm(key.algorithm, "HMAC")) + throw unusable("HMAC"); + checkHashLength(key.algorithm, parseInt(alg.slice(2), 10)); + break; + } + case "RS256": + case "RS384": + case "RS512": { + if (!isAlgorithm(key.algorithm, "RSASSA-PKCS1-v1_5")) + throw unusable("RSASSA-PKCS1-v1_5"); + checkHashLength(key.algorithm, parseInt(alg.slice(2), 10)); + break; + } + case "PS256": + case "PS384": + case "PS512": { + if (!isAlgorithm(key.algorithm, "RSA-PSS")) + throw unusable("RSA-PSS"); + checkHashLength(key.algorithm, parseInt(alg.slice(2), 10)); + break; + } + case "Ed25519": + case "EdDSA": { + if (!isAlgorithm(key.algorithm, "Ed25519")) + throw unusable("Ed25519"); + break; + } + case "ML-DSA-44": + case "ML-DSA-65": + case "ML-DSA-87": { + if (!isAlgorithm(key.algorithm, alg)) + throw unusable(alg); + break; + } + case "ES256": + case "ES384": + case "ES512": { + if (!isAlgorithm(key.algorithm, "ECDSA")) + throw unusable("ECDSA"); + const expected = getNamedCurve(alg); + const actual = key.algorithm.namedCurve; + if (actual !== expected) + throw unusable(expected, "algorithm.namedCurve"); + break; + } + default: + throw new TypeError("CryptoKey does not support this operation"); + } + checkUsage(key, usage); +} +var unusable, isAlgorithm; +var init_crypto_key = __esm({ + "../../node_modules/jose/dist/webapi/lib/crypto_key.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + unusable = /* @__PURE__ */ __name((name, prop = "algorithm.name") => new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`), "unusable"); + isAlgorithm = /* @__PURE__ */ __name((algorithm, name) => algorithm.name === name, "isAlgorithm"); + __name(getHashLength, "getHashLength"); + __name(checkHashLength, "checkHashLength"); + __name(getNamedCurve, "getNamedCurve"); + __name(checkUsage, "checkUsage"); + __name(checkSigCryptoKey, "checkSigCryptoKey"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/invalid_key_input.js +function message(msg, actual, ...types) { + types = types.filter(Boolean); + 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 (actual == null) { + msg += ` Received ${actual}`; + } else if (typeof actual === "function" && actual.name) { + msg += ` Received function ${actual.name}`; + } else if (typeof actual === "object" && actual != null) { + if (actual.constructor?.name) { + msg += ` Received an instance of ${actual.constructor.name}`; + } + } + return msg; +} +var invalidKeyInput, withAlg; +var init_invalid_key_input = __esm({ + "../../node_modules/jose/dist/webapi/lib/invalid_key_input.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(message, "message"); + invalidKeyInput = /* @__PURE__ */ __name((actual, ...types) => message("Key must be ", actual, ...types), "invalidKeyInput"); + withAlg = /* @__PURE__ */ __name((alg, actual, ...types) => message(`Key for the ${alg} algorithm must be `, actual, ...types), "withAlg"); + } +}); + +// ../../node_modules/jose/dist/webapi/util/errors.js +var JOSEError, JWTClaimValidationFailed, JWTExpired, JOSEAlgNotAllowed, JOSENotSupported, JWSInvalid, JWTInvalid, JWKSMultipleMatchingKeys, JWSSignatureVerificationFailed; +var init_errors2 = __esm({ + "../../node_modules/jose/dist/webapi/util/errors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + JOSEError = class extends Error { + code = "ERR_JOSE_GENERIC"; + constructor(message2, options) { + super(message2, options); + this.name = this.constructor.name; + Error.captureStackTrace?.(this, this.constructor); + } + }; + __name(JOSEError, "JOSEError"); + __publicField(JOSEError, "code", "ERR_JOSE_GENERIC"); + JWTClaimValidationFailed = class extends JOSEError { + code = "ERR_JWT_CLAIM_VALIDATION_FAILED"; + claim; + reason; + payload; + constructor(message2, payload, claim = "unspecified", reason = "unspecified") { + super(message2, { cause: { claim, reason, payload } }); + this.claim = claim; + this.reason = reason; + this.payload = payload; + } + }; + __name(JWTClaimValidationFailed, "JWTClaimValidationFailed"); + __publicField(JWTClaimValidationFailed, "code", "ERR_JWT_CLAIM_VALIDATION_FAILED"); + JWTExpired = class extends JOSEError { + code = "ERR_JWT_EXPIRED"; + claim; + reason; + payload; + constructor(message2, payload, claim = "unspecified", reason = "unspecified") { + super(message2, { cause: { claim, reason, payload } }); + this.claim = claim; + this.reason = reason; + this.payload = payload; + } + }; + __name(JWTExpired, "JWTExpired"); + __publicField(JWTExpired, "code", "ERR_JWT_EXPIRED"); + JOSEAlgNotAllowed = class extends JOSEError { + code = "ERR_JOSE_ALG_NOT_ALLOWED"; + }; + __name(JOSEAlgNotAllowed, "JOSEAlgNotAllowed"); + __publicField(JOSEAlgNotAllowed, "code", "ERR_JOSE_ALG_NOT_ALLOWED"); + JOSENotSupported = class extends JOSEError { + code = "ERR_JOSE_NOT_SUPPORTED"; + }; + __name(JOSENotSupported, "JOSENotSupported"); + __publicField(JOSENotSupported, "code", "ERR_JOSE_NOT_SUPPORTED"); + JWSInvalid = class extends JOSEError { + code = "ERR_JWS_INVALID"; + }; + __name(JWSInvalid, "JWSInvalid"); + __publicField(JWSInvalid, "code", "ERR_JWS_INVALID"); + JWTInvalid = class extends JOSEError { + code = "ERR_JWT_INVALID"; + }; + __name(JWTInvalid, "JWTInvalid"); + __publicField(JWTInvalid, "code", "ERR_JWT_INVALID"); + JWKSMultipleMatchingKeys = class extends JOSEError { + [Symbol.asyncIterator]; + code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS"; + constructor(message2 = "multiple matching keys found in the JSON Web Key Set", options) { + super(message2, options); + } + }; + __name(JWKSMultipleMatchingKeys, "JWKSMultipleMatchingKeys"); + __publicField(JWKSMultipleMatchingKeys, "code", "ERR_JWKS_MULTIPLE_MATCHING_KEYS"); + JWSSignatureVerificationFailed = class extends JOSEError { + code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED"; + constructor(message2 = "signature verification failed", options) { + super(message2, options); + } + }; + __name(JWSSignatureVerificationFailed, "JWSSignatureVerificationFailed"); + __publicField(JWSSignatureVerificationFailed, "code", "ERR_JWS_SIGNATURE_VERIFICATION_FAILED"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/is_key_like.js +var isCryptoKey, isKeyObject, isKeyLike; +var init_is_key_like = __esm({ + "../../node_modules/jose/dist/webapi/lib/is_key_like.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isCryptoKey = /* @__PURE__ */ __name((key) => { + if (key?.[Symbol.toStringTag] === "CryptoKey") + return true; + try { + return key instanceof CryptoKey; + } catch { + return false; + } + }, "isCryptoKey"); + isKeyObject = /* @__PURE__ */ __name((key) => key?.[Symbol.toStringTag] === "KeyObject", "isKeyObject"); + isKeyLike = /* @__PURE__ */ __name((key) => isCryptoKey(key) || isKeyObject(key), "isKeyLike"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/helpers.js +function assertNotSet(value, name) { + if (value) { + throw new TypeError(`${name} can only be called once`); + } +} +function decodeBase64url(value, label, ErrorClass) { + try { + return decode(value); + } catch { + throw new ErrorClass(`Failed to base64url decode the ${label}`); + } +} +var unprotected; +var init_helpers = __esm({ + "../../node_modules/jose/dist/webapi/lib/helpers.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_base64url(); + unprotected = Symbol(); + __name(assertNotSet, "assertNotSet"); + __name(decodeBase64url, "decodeBase64url"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/type_checks.js +function isObject2(input) { + if (!isObjectLike(input) || Object.prototype.toString.call(input) !== "[object Object]") { + return false; + } + if (Object.getPrototypeOf(input) === null) { + return true; + } + let proto = input; + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto); + } + return Object.getPrototypeOf(input) === proto; +} +function isDisjoint(...headers) { + const sources = headers.filter(Boolean); + if (sources.length === 0 || sources.length === 1) { + return true; + } + let acc; + for (const header of sources) { + const parameters = Object.keys(header); + if (!acc || acc.size === 0) { + acc = new Set(parameters); + continue; + } + for (const parameter of parameters) { + if (acc.has(parameter)) { + return false; + } + acc.add(parameter); + } + } + return true; +} +var isObjectLike, isJWK, isPrivateJWK, isPublicJWK, isSecretJWK; +var init_type_checks = __esm({ + "../../node_modules/jose/dist/webapi/lib/type_checks.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isObjectLike = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null, "isObjectLike"); + __name(isObject2, "isObject"); + __name(isDisjoint, "isDisjoint"); + isJWK = /* @__PURE__ */ __name((key) => isObject2(key) && typeof key.kty === "string", "isJWK"); + isPrivateJWK = /* @__PURE__ */ __name((key) => key.kty !== "oct" && (key.kty === "AKP" && typeof key.priv === "string" || typeof key.d === "string"), "isPrivateJWK"); + isPublicJWK = /* @__PURE__ */ __name((key) => key.kty !== "oct" && key.d === void 0 && key.priv === void 0, "isPublicJWK"); + isSecretJWK = /* @__PURE__ */ __name((key) => key.kty === "oct" && typeof key.k === "string", "isSecretJWK"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/signing.js +function checkKeyLength(alg, key) { + if (alg.startsWith("RS") || alg.startsWith("PS")) { + const { modulusLength } = key.algorithm; + if (typeof modulusLength !== "number" || modulusLength < 2048) { + throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`); + } + } +} +function subtleAlgorithm(alg, algorithm) { + const hash4 = `SHA-${alg.slice(-3)}`; + switch (alg) { + case "HS256": + case "HS384": + case "HS512": + return { hash: hash4, name: "HMAC" }; + case "PS256": + case "PS384": + case "PS512": + return { hash: hash4, name: "RSA-PSS", saltLength: parseInt(alg.slice(-3), 10) >> 3 }; + case "RS256": + case "RS384": + case "RS512": + return { hash: hash4, name: "RSASSA-PKCS1-v1_5" }; + case "ES256": + case "ES384": + case "ES512": + return { hash: hash4, name: "ECDSA", namedCurve: algorithm.namedCurve }; + case "Ed25519": + case "EdDSA": + return { name: "Ed25519" }; + case "ML-DSA-44": + case "ML-DSA-65": + case "ML-DSA-87": + return { name: alg }; + default: + throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); + } +} +async function getSigKey(alg, key, usage) { + if (key instanceof Uint8Array) { + if (!alg.startsWith("HS")) { + throw new TypeError(invalidKeyInput(key, "CryptoKey", "KeyObject", "JSON Web Key")); + } + return crypto.subtle.importKey("raw", key, { hash: `SHA-${alg.slice(-3)}`, name: "HMAC" }, false, [usage]); + } + checkSigCryptoKey(key, alg, usage); + return key; +} +async function sign(alg, key, data) { + const cryptoKey = await getSigKey(alg, key, "sign"); + checkKeyLength(alg, cryptoKey); + const signature = await crypto.subtle.sign(subtleAlgorithm(alg, cryptoKey.algorithm), cryptoKey, data); + return new Uint8Array(signature); +} +async function verify(alg, key, signature, data) { + const cryptoKey = await getSigKey(alg, key, "verify"); + checkKeyLength(alg, cryptoKey); + const algorithm = subtleAlgorithm(alg, cryptoKey.algorithm); + try { + return await crypto.subtle.verify(algorithm, cryptoKey, signature, data); + } catch { + return false; + } +} +var init_signing = __esm({ + "../../node_modules/jose/dist/webapi/lib/signing.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_errors2(); + init_crypto_key(); + init_invalid_key_input(); + __name(checkKeyLength, "checkKeyLength"); + __name(subtleAlgorithm, "subtleAlgorithm"); + __name(getSigKey, "getSigKey"); + __name(sign, "sign"); + __name(verify, "verify"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/jwk_to_key.js +function subtleMapping(jwk) { + let algorithm; + let keyUsages; + switch (jwk.kty) { + case "AKP": { + switch (jwk.alg) { + case "ML-DSA-44": + case "ML-DSA-65": + case "ML-DSA-87": + algorithm = { name: jwk.alg }; + keyUsages = jwk.priv ? ["sign"] : ["verify"]; + break; + default: + throw new JOSENotSupported(unsupportedAlg); + } + break; + } + case "RSA": { + switch (jwk.alg) { + case "PS256": + case "PS384": + case "PS512": + algorithm = { name: "RSA-PSS", hash: `SHA-${jwk.alg.slice(-3)}` }; + keyUsages = jwk.d ? ["sign"] : ["verify"]; + break; + case "RS256": + case "RS384": + case "RS512": + algorithm = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${jwk.alg.slice(-3)}` }; + keyUsages = jwk.d ? ["sign"] : ["verify"]; + break; + case "RSA-OAEP": + case "RSA-OAEP-256": + case "RSA-OAEP-384": + case "RSA-OAEP-512": + algorithm = { + name: "RSA-OAEP", + hash: `SHA-${parseInt(jwk.alg.slice(-3), 10) || 1}` + }; + keyUsages = jwk.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"]; + break; + default: + throw new JOSENotSupported(unsupportedAlg); + } + break; + } + case "EC": { + switch (jwk.alg) { + case "ES256": + case "ES384": + case "ES512": + algorithm = { + name: "ECDSA", + namedCurve: { ES256: "P-256", ES384: "P-384", ES512: "P-521" }[jwk.alg] + }; + keyUsages = jwk.d ? ["sign"] : ["verify"]; + break; + case "ECDH-ES": + case "ECDH-ES+A128KW": + case "ECDH-ES+A192KW": + case "ECDH-ES+A256KW": + algorithm = { name: "ECDH", namedCurve: jwk.crv }; + keyUsages = jwk.d ? ["deriveBits"] : []; + break; + default: + throw new JOSENotSupported(unsupportedAlg); + } + break; + } + case "OKP": { + switch (jwk.alg) { + case "Ed25519": + case "EdDSA": + algorithm = { name: "Ed25519" }; + keyUsages = jwk.d ? ["sign"] : ["verify"]; + break; + case "ECDH-ES": + case "ECDH-ES+A128KW": + case "ECDH-ES+A192KW": + case "ECDH-ES+A256KW": + algorithm = { name: jwk.crv }; + keyUsages = jwk.d ? ["deriveBits"] : []; + break; + default: + throw new JOSENotSupported(unsupportedAlg); + } + break; + } + default: + throw new JOSENotSupported('Invalid or unsupported JWK "kty" (Key Type) Parameter value'); + } + return { algorithm, keyUsages }; +} +async function jwkToKey(jwk) { + if (!jwk.alg) { + throw new TypeError('"alg" argument is required when "jwk.alg" is not present'); + } + const { algorithm, keyUsages } = subtleMapping(jwk); + const keyData = { ...jwk }; + if (keyData.kty !== "AKP") { + delete keyData.alg; + } + delete keyData.use; + return crypto.subtle.importKey("jwk", keyData, algorithm, jwk.ext ?? (jwk.d || jwk.priv ? false : true), jwk.key_ops ?? keyUsages); +} +var unsupportedAlg; +var init_jwk_to_key = __esm({ + "../../node_modules/jose/dist/webapi/lib/jwk_to_key.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_errors2(); + unsupportedAlg = 'Invalid or unsupported JWK "alg" (Algorithm) Parameter value'; + __name(subtleMapping, "subtleMapping"); + __name(jwkToKey, "jwkToKey"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/normalize_key.js +async function normalizeKey(key, alg) { + if (key instanceof Uint8Array) { + return key; + } + if (isCryptoKey(key)) { + return key; + } + if (isKeyObject(key)) { + if (key.type === "secret") { + return key.export(); + } + if ("toCryptoKey" in key && typeof key.toCryptoKey === "function") { + try { + return handleKeyObject(key, alg); + } catch (err) { + if (err instanceof TypeError) { + throw err; + } + } + } + let jwk = key.export({ format: "jwk" }); + return handleJWK(key, jwk, alg); + } + if (isJWK(key)) { + if (key.k) { + return decode(key.k); + } + return handleJWK(key, key, alg, true); + } + throw new Error("unreachable"); +} +var unusableForAlg, cache, handleJWK, handleKeyObject; +var init_normalize_key = __esm({ + "../../node_modules/jose/dist/webapi/lib/normalize_key.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_type_checks(); + init_base64url(); + init_jwk_to_key(); + init_is_key_like(); + unusableForAlg = "given KeyObject instance cannot be used for this algorithm"; + handleJWK = /* @__PURE__ */ __name(async (key, jwk, alg, freeze = false) => { + cache ||= /* @__PURE__ */ new WeakMap(); + let cached2 = cache.get(key); + if (cached2?.[alg]) { + return cached2[alg]; + } + const cryptoKey = await jwkToKey({ ...jwk, alg }); + if (freeze) + Object.freeze(key); + if (!cached2) { + cache.set(key, { [alg]: cryptoKey }); + } else { + cached2[alg] = cryptoKey; + } + return cryptoKey; + }, "handleJWK"); + handleKeyObject = /* @__PURE__ */ __name((keyObject, alg) => { + cache ||= /* @__PURE__ */ new WeakMap(); + let cached2 = cache.get(keyObject); + if (cached2?.[alg]) { + return cached2[alg]; + } + const isPublic = keyObject.type === "public"; + const extractable = isPublic ? true : false; + let cryptoKey; + if (keyObject.asymmetricKeyType === "x25519") { + switch (alg) { + case "ECDH-ES": + case "ECDH-ES+A128KW": + case "ECDH-ES+A192KW": + case "ECDH-ES+A256KW": + break; + default: + throw new TypeError(unusableForAlg); + } + cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, isPublic ? [] : ["deriveBits"]); + } + if (keyObject.asymmetricKeyType === "ed25519") { + if (alg !== "EdDSA" && alg !== "Ed25519") { + throw new TypeError(unusableForAlg); + } + cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [ + isPublic ? "verify" : "sign" + ]); + } + switch (keyObject.asymmetricKeyType) { + case "ml-dsa-44": + case "ml-dsa-65": + case "ml-dsa-87": { + if (alg !== keyObject.asymmetricKeyType.toUpperCase()) { + throw new TypeError(unusableForAlg); + } + cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [ + isPublic ? "verify" : "sign" + ]); + } + } + if (keyObject.asymmetricKeyType === "rsa") { + let hash4; + switch (alg) { + case "RSA-OAEP": + hash4 = "SHA-1"; + break; + case "RS256": + case "PS256": + case "RSA-OAEP-256": + hash4 = "SHA-256"; + break; + case "RS384": + case "PS384": + case "RSA-OAEP-384": + hash4 = "SHA-384"; + break; + case "RS512": + case "PS512": + case "RSA-OAEP-512": + hash4 = "SHA-512"; + break; + default: + throw new TypeError(unusableForAlg); + } + if (alg.startsWith("RSA-OAEP")) { + return keyObject.toCryptoKey({ + name: "RSA-OAEP", + hash: hash4 + }, extractable, isPublic ? ["encrypt"] : ["decrypt"]); + } + cryptoKey = keyObject.toCryptoKey({ + name: alg.startsWith("PS") ? "RSA-PSS" : "RSASSA-PKCS1-v1_5", + hash: hash4 + }, extractable, [isPublic ? "verify" : "sign"]); + } + if (keyObject.asymmetricKeyType === "ec") { + const nist = /* @__PURE__ */ new Map([ + ["prime256v1", "P-256"], + ["secp384r1", "P-384"], + ["secp521r1", "P-521"] + ]); + const namedCurve = nist.get(keyObject.asymmetricKeyDetails?.namedCurve); + if (!namedCurve) { + throw new TypeError(unusableForAlg); + } + const expectedCurve = { ES256: "P-256", ES384: "P-384", ES512: "P-521" }; + if (expectedCurve[alg] && namedCurve === expectedCurve[alg]) { + cryptoKey = keyObject.toCryptoKey({ + name: "ECDSA", + namedCurve + }, extractable, [isPublic ? "verify" : "sign"]); + } + if (alg.startsWith("ECDH-ES")) { + cryptoKey = keyObject.toCryptoKey({ + name: "ECDH", + namedCurve + }, extractable, isPublic ? [] : ["deriveBits"]); + } + } + if (!cryptoKey) { + throw new TypeError(unusableForAlg); + } + if (!cached2) { + cache.set(keyObject, { [alg]: cryptoKey }); + } else { + cached2[alg] = cryptoKey; + } + return cryptoKey; + }, "handleKeyObject"); + __name(normalizeKey, "normalizeKey"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/validate_crit.js +function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) { + if (joseHeader.crit !== void 0 && protectedHeader?.crit === void 0) { + throw new Err('"crit" (Critical) Header Parameter MUST be integrity protected'); + } + if (!protectedHeader || protectedHeader.crit === void 0) { + return /* @__PURE__ */ new Set(); + } + if (!Array.isArray(protectedHeader.crit) || protectedHeader.crit.length === 0 || protectedHeader.crit.some((input) => typeof input !== "string" || input.length === 0)) { + throw new Err('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present'); + } + let recognized; + if (recognizedOption !== void 0) { + recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]); + } else { + recognized = recognizedDefault; + } + for (const parameter of protectedHeader.crit) { + if (!recognized.has(parameter)) { + throw new JOSENotSupported(`Extension Header Parameter "${parameter}" is not recognized`); + } + if (joseHeader[parameter] === void 0) { + throw new Err(`Extension Header Parameter "${parameter}" is missing`); + } + if (recognized.get(parameter) && protectedHeader[parameter] === void 0) { + throw new Err(`Extension Header Parameter "${parameter}" MUST be integrity protected`); + } + } + return new Set(protectedHeader.crit); +} +var init_validate_crit = __esm({ + "../../node_modules/jose/dist/webapi/lib/validate_crit.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_errors2(); + __name(validateCrit, "validateCrit"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/validate_algorithms.js +function validateAlgorithms(option, algorithms) { + if (algorithms !== void 0 && (!Array.isArray(algorithms) || algorithms.some((s2) => typeof s2 !== "string"))) { + throw new TypeError(`"${option}" option must be an array of strings`); + } + if (!algorithms) { + return void 0; + } + return new Set(algorithms); +} +var init_validate_algorithms = __esm({ + "../../node_modules/jose/dist/webapi/lib/validate_algorithms.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(validateAlgorithms, "validateAlgorithms"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/check_key_type.js +function checkKeyType(alg, key, usage) { + switch (alg.substring(0, 2)) { + case "A1": + case "A2": + case "di": + case "HS": + case "PB": + symmetricTypeCheck(alg, key, usage); + break; + default: + asymmetricTypeCheck(alg, key, usage); + } +} +var tag, jwkMatchesOp, symmetricTypeCheck, asymmetricTypeCheck; +var init_check_key_type = __esm({ + "../../node_modules/jose/dist/webapi/lib/check_key_type.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_invalid_key_input(); + init_is_key_like(); + init_type_checks(); + tag = /* @__PURE__ */ __name((key) => key?.[Symbol.toStringTag], "tag"); + jwkMatchesOp = /* @__PURE__ */ __name((alg, key, usage) => { + if (key.use !== void 0) { + let expected; + switch (usage) { + case "sign": + case "verify": + expected = "sig"; + break; + case "encrypt": + case "decrypt": + expected = "enc"; + break; + } + if (key.use !== expected) { + throw new TypeError(`Invalid key for this operation, its "use" must be "${expected}" when present`); + } + } + if (key.alg !== void 0 && key.alg !== alg) { + throw new TypeError(`Invalid key for this operation, its "alg" must be "${alg}" when present`); + } + if (Array.isArray(key.key_ops)) { + let expectedKeyOp; + switch (true) { + case (usage === "sign" || usage === "verify"): + case alg === "dir": + case alg.includes("CBC-HS"): + expectedKeyOp = usage; + break; + case alg.startsWith("PBES2"): + expectedKeyOp = "deriveBits"; + break; + case /^A\d{3}(?:GCM)?(?:KW)?$/.test(alg): + if (!alg.includes("GCM") && alg.endsWith("KW")) { + expectedKeyOp = usage === "encrypt" ? "wrapKey" : "unwrapKey"; + } else { + expectedKeyOp = usage; + } + break; + case (usage === "encrypt" && alg.startsWith("RSA")): + expectedKeyOp = "wrapKey"; + break; + case usage === "decrypt": + expectedKeyOp = alg.startsWith("RSA") ? "unwrapKey" : "deriveBits"; + break; + } + if (expectedKeyOp && key.key_ops?.includes?.(expectedKeyOp) === false) { + throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${expectedKeyOp}" when present`); + } + } + return true; + }, "jwkMatchesOp"); + symmetricTypeCheck = /* @__PURE__ */ __name((alg, key, usage) => { + if (key instanceof Uint8Array) + return; + if (isJWK(key)) { + if (isSecretJWK(key) && jwkMatchesOp(alg, key, usage)) + return; + throw new TypeError(`JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present`); + } + if (!isKeyLike(key)) { + throw new TypeError(withAlg(alg, key, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array")); + } + if (key.type !== "secret") { + throw new TypeError(`${tag(key)} instances for symmetric algorithms must be of type "secret"`); + } + }, "symmetricTypeCheck"); + asymmetricTypeCheck = /* @__PURE__ */ __name((alg, key, usage) => { + if (isJWK(key)) { + switch (usage) { + case "decrypt": + case "sign": + if (isPrivateJWK(key) && jwkMatchesOp(alg, key, usage)) + return; + throw new TypeError(`JSON Web Key for this operation must be a private JWK`); + case "encrypt": + case "verify": + if (isPublicJWK(key) && jwkMatchesOp(alg, key, usage)) + return; + throw new TypeError(`JSON Web Key for this operation must be a public JWK`); + } + } + if (!isKeyLike(key)) { + throw new TypeError(withAlg(alg, key, "CryptoKey", "KeyObject", "JSON Web Key")); + } + if (key.type === "secret") { + throw new TypeError(`${tag(key)} instances for asymmetric algorithms must not be of type "secret"`); + } + if (key.type === "public") { + switch (usage) { + case "sign": + throw new TypeError(`${tag(key)} instances for asymmetric algorithm signing must be of type "private"`); + case "decrypt": + throw new TypeError(`${tag(key)} instances for asymmetric algorithm decryption must be of type "private"`); + } + } + if (key.type === "private") { + switch (usage) { + case "verify": + throw new TypeError(`${tag(key)} instances for asymmetric algorithm verifying must be of type "public"`); + case "encrypt": + throw new TypeError(`${tag(key)} instances for asymmetric algorithm encryption must be of type "public"`); + } + } + }, "asymmetricTypeCheck"); + __name(checkKeyType, "checkKeyType"); + } +}); + +// ../../node_modules/jose/dist/webapi/jws/flattened/verify.js +async function flattenedVerify(jws, key, options) { + if (!isObject2(jws)) { + throw new JWSInvalid("Flattened JWS must be an object"); + } + if (jws.protected === void 0 && jws.header === void 0) { + throw new JWSInvalid('Flattened JWS must have either of the "protected" or "header" members'); + } + if (jws.protected !== void 0 && typeof jws.protected !== "string") { + throw new JWSInvalid("JWS Protected Header incorrect type"); + } + if (jws.payload === void 0) { + throw new JWSInvalid("JWS Payload missing"); + } + if (typeof jws.signature !== "string") { + throw new JWSInvalid("JWS Signature missing or incorrect type"); + } + if (jws.header !== void 0 && !isObject2(jws.header)) { + throw new JWSInvalid("JWS Unprotected Header incorrect type"); + } + let parsedProt = {}; + if (jws.protected) { + try { + const protectedHeader = decode(jws.protected); + parsedProt = JSON.parse(decoder.decode(protectedHeader)); + } catch { + throw new JWSInvalid("JWS Protected Header is invalid"); + } + } + if (!isDisjoint(parsedProt, jws.header)) { + throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint"); + } + const joseHeader = { + ...parsedProt, + ...jws.header + }; + const extensions = validateCrit(JWSInvalid, /* @__PURE__ */ new Map([["b64", true]]), options?.crit, parsedProt, joseHeader); + let b64 = true; + if (extensions.has("b64")) { + b64 = parsedProt.b64; + if (typeof b64 !== "boolean") { + throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean'); + } + } + const { alg } = joseHeader; + if (typeof alg !== "string" || !alg) { + throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid'); + } + const algorithms = options && validateAlgorithms("algorithms", options.algorithms); + if (algorithms && !algorithms.has(alg)) { + throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter value not allowed'); + } + if (b64) { + if (typeof jws.payload !== "string") { + throw new JWSInvalid("JWS Payload must be a string"); + } + } else if (typeof jws.payload !== "string" && !(jws.payload instanceof Uint8Array)) { + throw new JWSInvalid("JWS Payload must be a string or an Uint8Array instance"); + } + let resolvedKey = false; + if (typeof key === "function") { + key = await key(parsedProt, jws); + resolvedKey = true; + } + checkKeyType(alg, key, "verify"); + const data = concat(jws.protected !== void 0 ? encode(jws.protected) : new Uint8Array(), encode("."), typeof jws.payload === "string" ? b64 ? encode(jws.payload) : encoder.encode(jws.payload) : jws.payload); + const signature = decodeBase64url(jws.signature, "signature", JWSInvalid); + const k2 = await normalizeKey(key, alg); + const verified = await verify(alg, k2, signature, data); + if (!verified) { + throw new JWSSignatureVerificationFailed(); + } + let payload; + if (b64) { + payload = decodeBase64url(jws.payload, "payload", JWSInvalid); + } else if (typeof jws.payload === "string") { + payload = encoder.encode(jws.payload); + } else { + payload = jws.payload; + } + const result = { payload }; + if (jws.protected !== void 0) { + result.protectedHeader = parsedProt; + } + if (jws.header !== void 0) { + result.unprotectedHeader = jws.header; + } + if (resolvedKey) { + return { ...result, key: k2 }; + } + return result; +} +var init_verify = __esm({ + "../../node_modules/jose/dist/webapi/jws/flattened/verify.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_base64url(); + init_signing(); + init_errors2(); + init_buffer_utils(); + init_helpers(); + init_type_checks(); + init_type_checks(); + init_check_key_type(); + init_validate_crit(); + init_validate_algorithms(); + init_normalize_key(); + __name(flattenedVerify, "flattenedVerify"); + } +}); + +// ../../node_modules/jose/dist/webapi/jws/compact/verify.js +async function compactVerify(jws, key, options) { + if (jws instanceof Uint8Array) { + jws = decoder.decode(jws); + } + if (typeof jws !== "string") { + throw new JWSInvalid("Compact JWS must be a string or Uint8Array"); + } + const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split("."); + if (length !== 3) { + throw new JWSInvalid("Invalid Compact JWS"); + } + const verified = await flattenedVerify({ payload, protected: protectedHeader, signature }, key, options); + const result = { payload: verified.payload, protectedHeader: verified.protectedHeader }; + if (typeof key === "function") { + return { ...result, key: verified.key }; + } + return result; +} +var init_verify2 = __esm({ + "../../node_modules/jose/dist/webapi/jws/compact/verify.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_verify(); + init_errors2(); + init_buffer_utils(); + __name(compactVerify, "compactVerify"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/jwt_claims_set.js +function secs(str) { + const matched = REGEX.exec(str); + if (!matched || matched[4] && matched[1]) { + throw new TypeError("Invalid time period format"); + } + const value = parseFloat(matched[2]); + const unit = matched[3].toLowerCase(); + let numericDate; + switch (unit) { + case "sec": + case "secs": + case "second": + case "seconds": + case "s": + numericDate = Math.round(value); + break; + case "minute": + case "minutes": + case "min": + case "mins": + case "m": + numericDate = Math.round(value * minute); + break; + case "hour": + case "hours": + case "hr": + case "hrs": + case "h": + numericDate = Math.round(value * hour); + break; + case "day": + case "days": + case "d": + numericDate = Math.round(value * day); + break; + case "week": + case "weeks": + case "w": + numericDate = Math.round(value * week); + break; + default: + numericDate = Math.round(value * year); + break; + } + if (matched[1] === "-" || matched[4] === "ago") { + return -numericDate; + } + return numericDate; +} +function validateInput(label, input) { + if (!Number.isFinite(input)) { + throw new TypeError(`Invalid ${label} input`); + } + return input; +} +function validateClaimsSet(protectedHeader, encodedPayload, options = {}) { + let payload; + try { + payload = JSON.parse(decoder.decode(encodedPayload)); + } catch { + } + if (!isObject2(payload)) { + throw new JWTInvalid("JWT Claims Set must be a top-level JSON object"); + } + const { typ } = options; + if (typ && (typeof protectedHeader.typ !== "string" || normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) { + throw new JWTClaimValidationFailed('unexpected "typ" JWT header value', payload, "typ", "check_failed"); + } + const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options; + const presenceCheck = [...requiredClaims]; + if (maxTokenAge !== void 0) + presenceCheck.push("iat"); + if (audience !== void 0) + presenceCheck.push("aud"); + if (subject !== void 0) + presenceCheck.push("sub"); + if (issuer !== void 0) + presenceCheck.push("iss"); + for (const claim of new Set(presenceCheck.reverse())) { + if (!(claim in payload)) { + throw new JWTClaimValidationFailed(`missing required "${claim}" claim`, payload, claim, "missing"); + } + } + if (issuer && !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) { + throw new JWTClaimValidationFailed('unexpected "iss" claim value', payload, "iss", "check_failed"); + } + if (subject && payload.sub !== subject) { + throw new JWTClaimValidationFailed('unexpected "sub" claim value', payload, "sub", "check_failed"); + } + if (audience && !checkAudiencePresence(payload.aud, typeof audience === "string" ? [audience] : audience)) { + throw new JWTClaimValidationFailed('unexpected "aud" claim value', payload, "aud", "check_failed"); + } + let tolerance; + switch (typeof options.clockTolerance) { + case "string": + tolerance = secs(options.clockTolerance); + break; + case "number": + tolerance = options.clockTolerance; + break; + case "undefined": + tolerance = 0; + break; + default: + throw new TypeError("Invalid clockTolerance option type"); + } + const { currentDate } = options; + const now = epoch(currentDate || /* @__PURE__ */ new Date()); + if ((payload.iat !== void 0 || maxTokenAge) && typeof payload.iat !== "number") { + throw new JWTClaimValidationFailed('"iat" claim must be a number', payload, "iat", "invalid"); + } + if (payload.nbf !== void 0) { + if (typeof payload.nbf !== "number") { + throw new JWTClaimValidationFailed('"nbf" claim must be a number', payload, "nbf", "invalid"); + } + if (payload.nbf > now + tolerance) { + throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed', payload, "nbf", "check_failed"); + } + } + if (payload.exp !== void 0) { + if (typeof payload.exp !== "number") { + throw new JWTClaimValidationFailed('"exp" claim must be a number', payload, "exp", "invalid"); + } + if (payload.exp <= now - tolerance) { + throw new JWTExpired('"exp" claim timestamp check failed', payload, "exp", "check_failed"); + } + } + if (maxTokenAge) { + const age = now - payload.iat; + const max2 = typeof maxTokenAge === "number" ? maxTokenAge : secs(maxTokenAge); + if (age - tolerance > max2) { + throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)', payload, "iat", "check_failed"); + } + if (age < 0 - tolerance) { + throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)', payload, "iat", "check_failed"); + } + } + return payload; +} +var epoch, minute, hour, day, week, year, REGEX, normalizeTyp, checkAudiencePresence, JWTClaimsBuilder; +var init_jwt_claims_set = __esm({ + "../../node_modules/jose/dist/webapi/lib/jwt_claims_set.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_errors2(); + init_buffer_utils(); + init_type_checks(); + epoch = /* @__PURE__ */ __name((date6) => Math.floor(date6.getTime() / 1e3), "epoch"); + minute = 60; + hour = minute * 60; + day = hour * 24; + week = day * 7; + year = day * 365.25; + REGEX = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i; + __name(secs, "secs"); + __name(validateInput, "validateInput"); + normalizeTyp = /* @__PURE__ */ __name((value) => { + if (value.includes("/")) { + return value.toLowerCase(); + } + return `application/${value.toLowerCase()}`; + }, "normalizeTyp"); + checkAudiencePresence = /* @__PURE__ */ __name((audPayload, audOption) => { + if (typeof audPayload === "string") { + return audOption.includes(audPayload); + } + if (Array.isArray(audPayload)) { + return audOption.some(Set.prototype.has.bind(new Set(audPayload))); + } + return false; + }, "checkAudiencePresence"); + __name(validateClaimsSet, "validateClaimsSet"); + JWTClaimsBuilder = class { + #payload; + constructor(payload) { + if (!isObject2(payload)) { + throw new TypeError("JWT Claims Set MUST be an object"); + } + this.#payload = structuredClone(payload); + } + data() { + return encoder.encode(JSON.stringify(this.#payload)); + } + get iss() { + return this.#payload.iss; + } + set iss(value) { + this.#payload.iss = value; + } + get sub() { + return this.#payload.sub; + } + set sub(value) { + this.#payload.sub = value; + } + get aud() { + return this.#payload.aud; + } + set aud(value) { + this.#payload.aud = value; + } + set jti(value) { + this.#payload.jti = value; + } + set nbf(value) { + if (typeof value === "number") { + this.#payload.nbf = validateInput("setNotBefore", value); + } else if (value instanceof Date) { + this.#payload.nbf = validateInput("setNotBefore", epoch(value)); + } else { + this.#payload.nbf = epoch(/* @__PURE__ */ new Date()) + secs(value); + } + } + set exp(value) { + if (typeof value === "number") { + this.#payload.exp = validateInput("setExpirationTime", value); + } else if (value instanceof Date) { + this.#payload.exp = validateInput("setExpirationTime", epoch(value)); + } else { + this.#payload.exp = epoch(/* @__PURE__ */ new Date()) + secs(value); + } + } + set iat(value) { + if (value === void 0) { + this.#payload.iat = epoch(/* @__PURE__ */ new Date()); + } else if (value instanceof Date) { + this.#payload.iat = validateInput("setIssuedAt", epoch(value)); + } else if (typeof value === "string") { + this.#payload.iat = validateInput("setIssuedAt", epoch(/* @__PURE__ */ new Date()) + secs(value)); + } else { + this.#payload.iat = validateInput("setIssuedAt", value); + } + } + }; + __name(JWTClaimsBuilder, "JWTClaimsBuilder"); + } +}); + +// ../../node_modules/jose/dist/webapi/jwt/verify.js +async function jwtVerify(jwt2, key, options) { + const verified = await compactVerify(jwt2, key, options); + if (verified.protectedHeader.crit?.includes("b64") && verified.protectedHeader.b64 === false) { + throw new JWTInvalid("JWTs MUST NOT use unencoded payload"); + } + const payload = validateClaimsSet(verified.protectedHeader, verified.payload, options); + const result = { payload, protectedHeader: verified.protectedHeader }; + if (typeof key === "function") { + return { ...result, key: verified.key }; + } + return result; +} +var init_verify3 = __esm({ + "../../node_modules/jose/dist/webapi/jwt/verify.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_verify2(); + init_jwt_claims_set(); + init_errors2(); + __name(jwtVerify, "jwtVerify"); + } +}); + +// ../../node_modules/jose/dist/webapi/jws/flattened/sign.js +var FlattenedSign; +var init_sign = __esm({ + "../../node_modules/jose/dist/webapi/jws/flattened/sign.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_base64url(); + init_signing(); + init_type_checks(); + init_errors2(); + init_buffer_utils(); + init_check_key_type(); + init_validate_crit(); + init_normalize_key(); + init_helpers(); + FlattenedSign = class { + #payload; + #protectedHeader; + #unprotectedHeader; + constructor(payload) { + if (!(payload instanceof Uint8Array)) { + throw new TypeError("payload must be an instance of Uint8Array"); + } + this.#payload = payload; + } + setProtectedHeader(protectedHeader) { + assertNotSet(this.#protectedHeader, "setProtectedHeader"); + this.#protectedHeader = protectedHeader; + return this; + } + setUnprotectedHeader(unprotectedHeader) { + assertNotSet(this.#unprotectedHeader, "setUnprotectedHeader"); + this.#unprotectedHeader = unprotectedHeader; + return this; + } + async sign(key, options) { + if (!this.#protectedHeader && !this.#unprotectedHeader) { + throw new JWSInvalid("either setProtectedHeader or setUnprotectedHeader must be called before #sign()"); + } + if (!isDisjoint(this.#protectedHeader, this.#unprotectedHeader)) { + throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint"); + } + const joseHeader = { + ...this.#protectedHeader, + ...this.#unprotectedHeader + }; + const extensions = validateCrit(JWSInvalid, /* @__PURE__ */ new Map([["b64", true]]), options?.crit, this.#protectedHeader, joseHeader); + let b64 = true; + if (extensions.has("b64")) { + b64 = this.#protectedHeader.b64; + if (typeof b64 !== "boolean") { + throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean'); + } + } + const { alg } = joseHeader; + if (typeof alg !== "string" || !alg) { + throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid'); + } + checkKeyType(alg, key, "sign"); + let payloadS; + let payloadB; + if (b64) { + payloadS = encode2(this.#payload); + payloadB = encode(payloadS); + } else { + payloadB = this.#payload; + payloadS = ""; + } + let protectedHeaderString; + let protectedHeaderBytes; + if (this.#protectedHeader) { + protectedHeaderString = encode2(JSON.stringify(this.#protectedHeader)); + protectedHeaderBytes = encode(protectedHeaderString); + } else { + protectedHeaderString = ""; + protectedHeaderBytes = new Uint8Array(); + } + const data = concat(protectedHeaderBytes, encode("."), payloadB); + const k2 = await normalizeKey(key, alg); + const signature = await sign(alg, k2, data); + const jws = { + signature: encode2(signature), + payload: payloadS + }; + if (this.#unprotectedHeader) { + jws.header = this.#unprotectedHeader; + } + if (this.#protectedHeader) { + jws.protected = protectedHeaderString; + } + return jws; + } + }; + __name(FlattenedSign, "FlattenedSign"); + } +}); + +// ../../node_modules/jose/dist/webapi/jws/compact/sign.js +var CompactSign; +var init_sign2 = __esm({ + "../../node_modules/jose/dist/webapi/jws/compact/sign.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sign(); + CompactSign = class { + #flattened; + constructor(payload) { + this.#flattened = new FlattenedSign(payload); + } + setProtectedHeader(protectedHeader) { + this.#flattened.setProtectedHeader(protectedHeader); + return this; + } + async sign(key, options) { + const jws = await this.#flattened.sign(key, options); + if (jws.payload === void 0) { + throw new TypeError("use the flattened module for creating JWS with b64: false"); + } + return `${jws.protected}.${jws.payload}.${jws.signature}`; + } + }; + __name(CompactSign, "CompactSign"); + } +}); + +// ../../node_modules/jose/dist/webapi/jwt/sign.js +var SignJWT; +var init_sign3 = __esm({ + "../../node_modules/jose/dist/webapi/jwt/sign.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sign2(); + init_errors2(); + init_jwt_claims_set(); + SignJWT = class { + #protectedHeader; + #jwt; + constructor(payload = {}) { + this.#jwt = new JWTClaimsBuilder(payload); + } + setIssuer(issuer) { + this.#jwt.iss = issuer; + return this; + } + setSubject(subject) { + this.#jwt.sub = subject; + return this; + } + setAudience(audience) { + this.#jwt.aud = audience; + return this; + } + setJti(jwtId) { + this.#jwt.jti = jwtId; + return this; + } + setNotBefore(input) { + this.#jwt.nbf = input; + return this; + } + setExpirationTime(input) { + this.#jwt.exp = input; + return this; + } + setIssuedAt(input) { + this.#jwt.iat = input; + return this; + } + setProtectedHeader(protectedHeader) { + this.#protectedHeader = protectedHeader; + return this; + } + async sign(key, options) { + const sig = new CompactSign(this.#jwt.data()); + sig.setProtectedHeader(this.#protectedHeader); + if (Array.isArray(this.#protectedHeader?.crit) && this.#protectedHeader.crit.includes("b64") && this.#protectedHeader.b64 === false) { + throw new JWTInvalid("JWTs MUST NOT use unencoded payload"); + } + return sig.sign(key, options); + } + }; + __name(SignJWT, "SignJWT"); + } +}); + +// ../../node_modules/jose/dist/webapi/index.js +var init_webapi = __esm({ + "../../node_modules/jose/dist/webapi/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_verify3(); + init_sign3(); + } +}); + +// src/lib/api-error.ts +var ApiError; +var init_api_error = __esm({ + "src/lib/api-error.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ApiError = class extends Error { + statusCode; + details; + constructor(message2, statusCode = 500, details) { + console.log(message2); + super(message2); + this.name = "ApiError"; + this.statusCode = statusCode; + this.details = details; + } + }; + __name(ApiError, "ApiError"); + } +}); + +// src/lib/env-exporter.ts +var getRuntimeEnv, runtimeEnv, appUrl, jwtSecret, getEncodedJwtSecret, s3AccessKeyId, s3SecretAccessKey, s3BucketName, s3Region, assetsDomain, apiCacheKey, cloudflareApiToken, cloudflareZoneId, s3Url, redisUrl, expoAccessToken, phonePeBaseUrl, phonePeClientId, phonePeClientVersion, phonePeClientSecret, phonePeMerchantId, razorpayId, razorpaySecret, otpSenderAuthToken, minOrderValue, deliveryCharge, telegramBotToken, telegramChatIds, isDevMode; +var init_env_exporter = __esm({ + "src/lib/env-exporter.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getRuntimeEnv = /* @__PURE__ */ __name(() => globalThis.ENV || globalThis.process?.env || {}, "getRuntimeEnv"); + runtimeEnv = getRuntimeEnv(); + appUrl = runtimeEnv.APP_URL; + jwtSecret = runtimeEnv.JWT_SECRET; + getEncodedJwtSecret = /* @__PURE__ */ __name(() => { + const env2 = getRuntimeEnv(); + const secret = env2.JWT_SECRET || ""; + return new TextEncoder().encode(secret); + }, "getEncodedJwtSecret"); + s3AccessKeyId = runtimeEnv.S3_ACCESS_KEY_ID; + s3SecretAccessKey = runtimeEnv.S3_SECRET_ACCESS_KEY; + s3BucketName = runtimeEnv.S3_BUCKET_NAME; + s3Region = runtimeEnv.S3_REGION; + assetsDomain = runtimeEnv.ASSETS_DOMAIN; + apiCacheKey = runtimeEnv.API_CACHE_KEY; + cloudflareApiToken = runtimeEnv.CLOUDFLARE_API_TOKEN; + cloudflareZoneId = runtimeEnv.CLOUDFLARE_ZONE_ID; + s3Url = runtimeEnv.S3_URL; + redisUrl = runtimeEnv.REDIS_URL; + expoAccessToken = runtimeEnv.EXPO_ACCESS_TOKEN; + phonePeBaseUrl = runtimeEnv.PHONE_PE_BASE_URL; + phonePeClientId = runtimeEnv.PHONE_PE_CLIENT_ID; + phonePeClientVersion = Number(runtimeEnv.PHONE_PE_CLIENT_VERSION); + phonePeClientSecret = runtimeEnv.PHONE_PE_CLIENT_SECRET; + phonePeMerchantId = runtimeEnv.PHONE_PE_MERCHANT_ID; + razorpayId = runtimeEnv.RAZORPAY_KEY; + razorpaySecret = runtimeEnv.RAZORPAY_SECRET; + otpSenderAuthToken = runtimeEnv.OTP_SENDER_AUTH_TOKEN; + minOrderValue = Number(runtimeEnv.MIN_ORDER_VALUE); + deliveryCharge = Number(runtimeEnv.DELIVERY_CHARGE); + telegramBotToken = runtimeEnv.TELEGRAM_BOT_TOKEN; + telegramChatIds = runtimeEnv.TELEGRAM_CHAT_IDS?.split(",").map((id) => id.trim()) || []; + isDevMode = runtimeEnv.ENV_MODE === "dev"; + } +}); + +// src/middleware/staff-auth.ts +var verifyStaffToken, authenticateStaff; +var init_staff_auth = __esm({ + "src/middleware/staff-auth.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_webapi(); + init_dbService(); + init_api_error(); + init_env_exporter(); + verifyStaffToken = /* @__PURE__ */ __name(async (token) => { + try { + const { payload } = await jwtVerify(token, getEncodedJwtSecret()); + return payload; + } catch (error50) { + throw new ApiError("Access denied. Invalid auth credentials", 401); + } + }, "verifyStaffToken"); + authenticateStaff = /* @__PURE__ */ __name(async (c2, next) => { + try { + const authHeader = c2.req.header("authorization"); + if (!authHeader || !authHeader.startsWith("Bearer ")) { + throw new ApiError("Staff authentication required", 401); + } + const token = authHeader.split(" ")[1]; + if (!token) { + throw new ApiError("Staff authentication token missing", 401); + } + const decoded = await verifyStaffToken(token); + if (!decoded.staffId) { + throw new ApiError("Invalid staff token format", 401); + } + const staff = await getStaffUserById(decoded.staffId); + if (!staff) { + throw new ApiError("Staff user not found", 401); + } + c2.set("staffUser", { + id: staff.id, + name: staff.name + }); + await next(); + } catch (error50) { + throw error50; + } + }, "authenticateStaff"); + } +}); + +// src/apis/admin-apis/apis/av-router.ts +var router, avRouter, av_router_default; +var init_av_router = __esm({ + "src/apis/admin-apis/apis/av-router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_staff_auth(); + router = new Hono2(); + router.use("*", authenticateStaff); + avRouter = router; + av_router_default = avRouter; + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js +var getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig; +var init_httpExtensionConfiguration = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + setHttpHandler(handler) { + runtimeConfig.httpHandler = handler; + }, + httpHandler() { + return runtimeConfig.httpHandler; + }, + updateHttpClientConfig(key, value) { + runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); + }, + httpHandlerConfigs() { + return runtimeConfig.httpHandler.httpHandlerConfigs(); + } + }; + }, "getHttpHandlerExtensionConfiguration"); + resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => { + return { + httpHandler: httpHandlerExtensionConfiguration.httpHandler() + }; + }, "resolveHttpHandlerRuntimeConfig"); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/extensions/index.js +var init_extensions = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/extensions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpExtensionConfiguration(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/abort.js +var init_abort = __esm({ + "../../node_modules/@smithy/types/dist-es/abort.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/auth.js +var HttpAuthLocation; +var init_auth2 = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/auth.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(HttpAuthLocation2) { + HttpAuthLocation2["HEADER"] = "header"; + HttpAuthLocation2["QUERY"] = "query"; + })(HttpAuthLocation || (HttpAuthLocation = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js +var HttpApiKeyAuthLocation; +var init_HttpApiKeyAuth = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(HttpApiKeyAuthLocation2) { + HttpApiKeyAuthLocation2["HEADER"] = "header"; + HttpApiKeyAuthLocation2["QUERY"] = "query"; + })(HttpApiKeyAuthLocation || (HttpApiKeyAuthLocation = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js +var init_HttpAuthScheme = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js +var init_HttpAuthSchemeProvider = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/HttpSigner.js +var init_HttpSigner = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/HttpSigner.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js +var init_IdentityProviderConfig = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/index.js +var init_auth3 = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_auth2(); + init_HttpApiKeyAuth(); + init_HttpAuthScheme(); + init_HttpAuthSchemeProvider(); + init_HttpSigner(); + init_IdentityProviderConfig(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js +var init_blob_payload_input_types = __esm({ + "../../node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/checksum.js +var init_checksum = __esm({ + "../../node_modules/@smithy/types/dist-es/checksum.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/client.js +var init_client = __esm({ + "../../node_modules/@smithy/types/dist-es/client.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/command.js +var init_command = __esm({ + "../../node_modules/@smithy/types/dist-es/command.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/connection/config.js +var init_config = __esm({ + "../../node_modules/@smithy/types/dist-es/connection/config.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/connection/manager.js +var init_manager = __esm({ + "../../node_modules/@smithy/types/dist-es/connection/manager.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/connection/pool.js +var init_pool = __esm({ + "../../node_modules/@smithy/types/dist-es/connection/pool.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/connection/index.js +var init_connection = __esm({ + "../../node_modules/@smithy/types/dist-es/connection/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_config(); + init_manager(); + init_pool(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/crypto.js +var init_crypto = __esm({ + "../../node_modules/@smithy/types/dist-es/crypto.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/encode.js +var init_encode = __esm({ + "../../node_modules/@smithy/types/dist-es/encode.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoint.js +var EndpointURLScheme; +var init_endpoint = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoint.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(EndpointURLScheme2) { + EndpointURLScheme2["HTTP"] = "http"; + EndpointURLScheme2["HTTPS"] = "https"; + })(EndpointURLScheme || (EndpointURLScheme = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js +var init_EndpointRuleObject = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js +var init_ErrorRuleObject = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js +var init_RuleSetObject = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/shared.js +var init_shared = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/shared.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js +var init_TreeRuleObject = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/index.js +var init_endpoints = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EndpointRuleObject(); + init_ErrorRuleObject(); + init_RuleSetObject(); + init_shared(); + init_TreeRuleObject(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/eventStream.js +var init_eventStream = __esm({ + "../../node_modules/@smithy/types/dist-es/eventStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/extensions/checksum.js +var AlgorithmId; +var init_checksum2 = __esm({ + "../../node_modules/@smithy/types/dist-es/extensions/checksum.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(AlgorithmId2) { + AlgorithmId2["MD5"] = "md5"; + AlgorithmId2["CRC32"] = "crc32"; + AlgorithmId2["CRC32C"] = "crc32c"; + AlgorithmId2["SHA1"] = "sha1"; + AlgorithmId2["SHA256"] = "sha256"; + })(AlgorithmId || (AlgorithmId = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js +var init_defaultClientConfiguration = __esm({ + "../../node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js +var init_defaultExtensionConfiguration = __esm({ + "../../node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/extensions/index.js +var init_extensions2 = __esm({ + "../../node_modules/@smithy/types/dist-es/extensions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_defaultClientConfiguration(); + init_defaultExtensionConfiguration(); + init_checksum2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/feature-ids.js +var init_feature_ids = __esm({ + "../../node_modules/@smithy/types/dist-es/feature-ids.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/http.js +var FieldPosition; +var init_http = __esm({ + "../../node_modules/@smithy/types/dist-es/http.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(FieldPosition2) { + FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER"; + FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER"; + })(FieldPosition || (FieldPosition = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js +var init_httpHandlerInitialization = __esm({ + "../../node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js +var init_apiKeyIdentity = __esm({ + "../../node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js +var init_awsCredentialIdentity = __esm({ + "../../node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/identity/identity.js +var init_identity = __esm({ + "../../node_modules/@smithy/types/dist-es/identity/identity.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/identity/tokenIdentity.js +var init_tokenIdentity = __esm({ + "../../node_modules/@smithy/types/dist-es/identity/tokenIdentity.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/identity/index.js +var init_identity2 = __esm({ + "../../node_modules/@smithy/types/dist-es/identity/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_apiKeyIdentity(); + init_awsCredentialIdentity(); + init_identity(); + init_tokenIdentity(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/logger.js +var init_logger3 = __esm({ + "../../node_modules/@smithy/types/dist-es/logger.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/middleware.js +var SMITHY_CONTEXT_KEY; +var init_middleware = __esm({ + "../../node_modules/@smithy/types/dist-es/middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SMITHY_CONTEXT_KEY = "__smithy_context"; + } +}); + +// ../../node_modules/@smithy/types/dist-es/pagination.js +var init_pagination = __esm({ + "../../node_modules/@smithy/types/dist-es/pagination.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/profile.js +var IniSectionType; +var init_profile = __esm({ + "../../node_modules/@smithy/types/dist-es/profile.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(IniSectionType2) { + IniSectionType2["PROFILE"] = "profile"; + IniSectionType2["SSO_SESSION"] = "sso-session"; + IniSectionType2["SERVICES"] = "services"; + })(IniSectionType || (IniSectionType = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/response.js +var init_response = __esm({ + "../../node_modules/@smithy/types/dist-es/response.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/retry.js +var init_retry = __esm({ + "../../node_modules/@smithy/types/dist-es/retry.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/schema/schema.js +var init_schema2 = __esm({ + "../../node_modules/@smithy/types/dist-es/schema/schema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/schema/traits.js +var init_traits = __esm({ + "../../node_modules/@smithy/types/dist-es/schema/traits.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/schema/schema-deprecated.js +var init_schema_deprecated = __esm({ + "../../node_modules/@smithy/types/dist-es/schema/schema-deprecated.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/schema/sentinels.js +var init_sentinels = __esm({ + "../../node_modules/@smithy/types/dist-es/schema/sentinels.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/schema/static-schemas.js +var init_static_schemas = __esm({ + "../../node_modules/@smithy/types/dist-es/schema/static-schemas.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/serde.js +var init_serde = __esm({ + "../../node_modules/@smithy/types/dist-es/serde.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/shapes.js +var init_shapes = __esm({ + "../../node_modules/@smithy/types/dist-es/shapes.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/signature.js +var init_signature = __esm({ + "../../node_modules/@smithy/types/dist-es/signature.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/stream.js +var init_stream = __esm({ + "../../node_modules/@smithy/types/dist-es/stream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js +var init_streaming_blob_common_types = __esm({ + "../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js +var init_streaming_blob_payload_input_types = __esm({ + "../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js +var init_streaming_blob_payload_output_types = __esm({ + "../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/transfer.js +var RequestHandlerProtocol; +var init_transfer = __esm({ + "../../node_modules/@smithy/types/dist-es/transfer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(RequestHandlerProtocol2) { + RequestHandlerProtocol2["HTTP_0_9"] = "http/0.9"; + RequestHandlerProtocol2["HTTP_1_0"] = "http/1.0"; + RequestHandlerProtocol2["TDS_8_0"] = "tds/8.0"; + })(RequestHandlerProtocol || (RequestHandlerProtocol = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js +var init_client_payload_blob_type_narrow = __esm({ + "../../node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/transform/mutable.js +var init_mutable = __esm({ + "../../node_modules/@smithy/types/dist-es/transform/mutable.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/transform/no-undefined.js +var init_no_undefined = __esm({ + "../../node_modules/@smithy/types/dist-es/transform/no-undefined.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/transform/type-transform.js +var init_type_transform = __esm({ + "../../node_modules/@smithy/types/dist-es/transform/type-transform.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/uri.js +var init_uri = __esm({ + "../../node_modules/@smithy/types/dist-es/uri.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/util.js +var init_util = __esm({ + "../../node_modules/@smithy/types/dist-es/util.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/waiter.js +var init_waiter = __esm({ + "../../node_modules/@smithy/types/dist-es/waiter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/index.js +var init_dist_es = __esm({ + "../../node_modules/@smithy/types/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_abort(); + init_auth3(); + init_blob_payload_input_types(); + init_checksum(); + init_client(); + init_command(); + init_connection(); + init_crypto(); + init_encode(); + init_endpoint(); + init_endpoints(); + init_eventStream(); + init_extensions2(); + init_feature_ids(); + init_http(); + init_httpHandlerInitialization(); + init_identity2(); + init_logger3(); + init_middleware(); + init_pagination(); + init_profile(); + init_response(); + init_retry(); + init_schema2(); + init_traits(); + init_schema_deprecated(); + init_sentinels(); + init_static_schemas(); + init_serde(); + init_shapes(); + init_signature(); + init_stream(); + init_streaming_blob_common_types(); + init_streaming_blob_payload_input_types(); + init_streaming_blob_payload_output_types(); + init_transfer(); + init_client_payload_blob_type_narrow(); + init_mutable(); + init_no_undefined(); + init_type_transform(); + init_uri(); + init_util(); + init_waiter(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/Field.js +var init_Field = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/Field.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/Fields.js +var init_Fields = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/Fields.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/httpHandler.js +var init_httpHandler = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/httpHandler.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/httpRequest.js +function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; + }, {}); +} +var HttpRequest; +var init_httpRequest = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/httpRequest.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + HttpRequest = class { + method; + protocol; + hostname; + port; + path; + query; + headers; + username; + password; + fragment; + body; + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; + this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; + } + static clone(request) { + const cloned = new HttpRequest({ + ...request, + headers: { ...request.headers } + }); + if (cloned.query) { + cloned.query = cloneQuery(cloned.query); + } + return cloned; + } + static isInstance(request) { + if (!request) { + return false; + } + const req = request; + return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; + } + clone() { + return HttpRequest.clone(this); + } + }; + __name(HttpRequest, "HttpRequest"); + __name(cloneQuery, "cloneQuery"); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/httpResponse.js +var HttpResponse; +var init_httpResponse = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/httpResponse.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + HttpResponse = class { + statusCode; + reason; + headers; + body; + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; + } + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + } + }; + __name(HttpResponse, "HttpResponse"); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/isValidHostname.js +var init_isValidHostname = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/isValidHostname.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/types.js +var init_types = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/index.js +var init_dist_es2 = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_extensions(); + init_Field(); + init_Fields(); + init_httpHandler(); + init_httpRequest(); + init_httpResponse(); + init_isValidHostname(); + init_types(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-expect-continue/dist-es/index.js +function addExpectContinueMiddleware(options) { + return (next) => async (args) => { + const { request } = args; + if (options.expectContinueHeader !== false && HttpRequest.isInstance(request) && request.body && options.runtime === "node" && options.requestHandler?.constructor?.name !== "FetchHttpHandler") { + let sendHeader = true; + if (typeof options.expectContinueHeader === "number") { + try { + const bodyLength = Number(request.headers?.["content-length"]) ?? options.bodyLengthChecker?.(request.body) ?? Infinity; + sendHeader = bodyLength >= options.expectContinueHeader; + } catch (e2) { + } + } else { + sendHeader = !!options.expectContinueHeader; + } + if (sendHeader) { + request.headers.Expect = "100-continue"; + } + } + return next({ + ...args, + request + }); + }; +} +var addExpectContinueMiddlewareOptions, getAddExpectContinuePlugin; +var init_dist_es3 = __esm({ + "../../node_modules/@aws-sdk/middleware-expect-continue/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + __name(addExpectContinueMiddleware, "addExpectContinueMiddleware"); + addExpectContinueMiddlewareOptions = { + step: "build", + tags: ["SET_EXPECT_HEADER", "EXPECT_HEADER"], + name: "addExpectContinueMiddleware", + override: true + }; + getAddExpectContinuePlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(addExpectContinueMiddleware(options), addExpectContinueMiddlewareOptions); + } + }), "getAddExpectContinuePlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/constants.js +var RequestChecksumCalculation, DEFAULT_REQUEST_CHECKSUM_CALCULATION, ResponseChecksumValidation, DEFAULT_RESPONSE_CHECKSUM_VALIDATION, ChecksumAlgorithm, ChecksumLocation, DEFAULT_CHECKSUM_ALGORITHM; +var init_constants3 = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + RequestChecksumCalculation = { + WHEN_SUPPORTED: "WHEN_SUPPORTED", + WHEN_REQUIRED: "WHEN_REQUIRED" + }; + DEFAULT_REQUEST_CHECKSUM_CALCULATION = RequestChecksumCalculation.WHEN_SUPPORTED; + ResponseChecksumValidation = { + WHEN_SUPPORTED: "WHEN_SUPPORTED", + WHEN_REQUIRED: "WHEN_REQUIRED" + }; + DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.WHEN_SUPPORTED; + (function(ChecksumAlgorithm2) { + ChecksumAlgorithm2["MD5"] = "MD5"; + ChecksumAlgorithm2["CRC32"] = "CRC32"; + ChecksumAlgorithm2["CRC32C"] = "CRC32C"; + ChecksumAlgorithm2["CRC64NVME"] = "CRC64NVME"; + ChecksumAlgorithm2["SHA1"] = "SHA1"; + ChecksumAlgorithm2["SHA256"] = "SHA256"; + })(ChecksumAlgorithm || (ChecksumAlgorithm = {})); + (function(ChecksumLocation2) { + ChecksumLocation2["HEADER"] = "header"; + ChecksumLocation2["TRAILER"] = "trailer"; + })(ChecksumLocation || (ChecksumLocation = {})); + DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.CRC32; + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS.js +var init_NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS.js +var init_NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js +var init_emitWarningIfUnsupportedVersion = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js +function setCredentialFeature(credentials, feature2, value) { + if (!credentials.$source) { + credentials.$source = {}; + } + credentials.$source[feature2] = value; + return credentials; +} +var init_setCredentialFeature = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(setCredentialFeature, "setCredentialFeature"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js +function setFeature(context2, feature2, value) { + if (!context2.__aws_sdk_context) { + context2.__aws_sdk_context = { + features: {} + }; + } else if (!context2.__aws_sdk_context.features) { + context2.__aws_sdk_context.features = {}; + } + context2.__aws_sdk_context.features[feature2] = value; +} +var init_setFeature = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(setFeature, "setFeature"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js +var init_setTokenFeature = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +var init_client2 = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/client/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_emitWarningIfUnsupportedVersion(); + init_setCredentialFeature(); + init_setFeature(); + init_setTokenFeature(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js +var getDateHeader; +var init_getDateHeader = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + getDateHeader = /* @__PURE__ */ __name((response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0, "getDateHeader"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js +var getSkewCorrectedDate; +var init_getSkewCorrectedDate = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getSkewCorrectedDate = /* @__PURE__ */ __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), "getSkewCorrectedDate"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js +var isClockSkewed; +var init_isClockSkewed = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getSkewCorrectedDate(); + isClockSkewed = /* @__PURE__ */ __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5, "isClockSkewed"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +var getUpdatedSystemClockOffset; +var init_getUpdatedSystemClockOffset = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_isClockSkewed(); + getUpdatedSystemClockOffset = /* @__PURE__ */ __name((clockTime, currentSystemClockOffset) => { + const clockTimeInMs = Date.parse(clockTime); + if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { + return clockTimeInMs - Date.now(); + } + return currentSystemClockOffset; + }, "getUpdatedSystemClockOffset"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js +var init_utils4 = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getDateHeader(); + init_getSkewCorrectedDate(); + init_getUpdatedSystemClockOffset(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +var throwSigningPropertyError, validateSigningProperties, AwsSdkSigV4Signer; +var init_AwsSdkSigV4Signer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_utils4(); + throwSigningPropertyError = /* @__PURE__ */ __name((name, property) => { + if (!property) { + throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); + } + return property; + }, "throwSigningPropertyError"); + validateSigningProperties = /* @__PURE__ */ __name(async (signingProperties) => { + const context2 = throwSigningPropertyError("context", signingProperties.context); + const config3 = throwSigningPropertyError("config", signingProperties.config); + const authScheme = context2.endpointV2?.properties?.authSchemes?.[0]; + const signerFunction = throwSigningPropertyError("signer", config3.signer); + const signer = await signerFunction(authScheme); + const signingRegion = signingProperties?.signingRegion; + const signingRegionSet = signingProperties?.signingRegionSet; + const signingName = signingProperties?.signingName; + return { + config: config3, + signer, + signingRegion, + signingRegionSet, + signingName + }; + }, "validateSigningProperties"); + AwsSdkSigV4Signer = class { + async sign(httpRequest, identity2, signingProperties) { + if (!HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const validatedProps = await validateSigningProperties(signingProperties); + const { config: config3, signer } = validatedProps; + let { signingRegion, signingName } = validatedProps; + const handlerExecutionContext = signingProperties.context; + if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) { + const [first, second] = handlerExecutionContext.authSchemes; + if (first?.name === "sigv4a" && second?.name === "sigv4") { + signingRegion = second?.signingRegion ?? signingRegion; + signingName = second?.signingName ?? signingName; + } + } + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config3.systemClockOffset), + signingRegion, + signingService: signingName + }); + return signedRequest; + } + errorHandler(signingProperties) { + return (error50) => { + const serverTime = error50.ServerTime ?? getDateHeader(error50.$response); + if (serverTime) { + const config3 = throwSigningPropertyError("config", signingProperties.config); + const initialSystemClockOffset = config3.systemClockOffset; + config3.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config3.systemClockOffset); + const clockSkewCorrected = config3.systemClockOffset !== initialSystemClockOffset; + if (clockSkewCorrected && error50.$metadata) { + error50.$metadata.clockSkewCorrected = true; + } + } + throw error50; + }; + } + successHandler(httpResponse, signingProperties) { + const dateHeader = getDateHeader(httpResponse); + if (dateHeader) { + const config3 = throwSigningPropertyError("config", signingProperties.config); + config3.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config3.systemClockOffset); + } + } + }; + __name(AwsSdkSigV4Signer, "AwsSdkSigV4Signer"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js +var AwsSdkSigV4ASigner; +var init_AwsSdkSigV4ASigner = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_utils4(); + init_AwsSdkSigV4Signer(); + AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer { + async sign(httpRequest, identity2, signingProperties) { + if (!HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const { config: config3, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties); + const configResolvedSigningRegionSet = await config3.sigv4aSigningRegionSet?.(); + const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(","); + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config3.systemClockOffset), + signingRegion: multiRegionOverride, + signingService: signingName + }); + return signedRequest; + } + }; + __name(AwsSdkSigV4ASigner, "AwsSdkSigV4ASigner"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js +var init_getBearerTokenEnvKey = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +var init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/getSmithyContext.js +var init_getSmithyContext = __esm({ + "../../node_modules/@smithy/core/dist-es/getSmithyContext.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js +var getSmithyContext; +var init_getSmithyContext2 = __esm({ + "../../node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es(); + getSmithyContext = /* @__PURE__ */ __name((context2) => context2[SMITHY_CONTEXT_KEY] || (context2[SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); + } +}); + +// ../../node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js +var normalizeProvider; +var init_normalizeProvider = __esm({ + "../../node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + normalizeProvider = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }, "normalizeProvider"); + } +}); + +// ../../node_modules/@smithy/util-middleware/dist-es/index.js +var init_dist_es4 = __esm({ + "../../node_modules/@smithy/util-middleware/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getSmithyContext2(); + init_normalizeProvider(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js +var resolveAuthOptions; +var init_resolveAuthOptions = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + resolveAuthOptions = /* @__PURE__ */ __name((candidateAuthOptions, authSchemePreference) => { + if (!authSchemePreference || authSchemePreference.length === 0) { + return candidateAuthOptions; + } + const preferredAuthOptions = []; + for (const preferredSchemeName of authSchemePreference) { + for (const candidateAuthOption of candidateAuthOptions) { + const candidateAuthSchemeName = candidateAuthOption.schemeId.split("#")[1]; + if (candidateAuthSchemeName === preferredSchemeName) { + preferredAuthOptions.push(candidateAuthOption); + } + } + } + for (const candidateAuthOption of candidateAuthOptions) { + if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) { + preferredAuthOptions.push(candidateAuthOption); + } + } + return preferredAuthOptions; + }, "resolveAuthOptions"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +function convertHttpAuthSchemesToMap(httpAuthSchemes) { + const map2 = /* @__PURE__ */ new Map(); + for (const scheme of httpAuthSchemes) { + map2.set(scheme.schemeId, scheme); + } + return map2; +} +var httpAuthSchemeMiddleware; +var init_httpAuthSchemeMiddleware = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es4(); + init_resolveAuthOptions(); + __name(convertHttpAuthSchemesToMap, "convertHttpAuthSchemesToMap"); + httpAuthSchemeMiddleware = /* @__PURE__ */ __name((config3, mwOptions) => (next, context2) => async (args) => { + const options = config3.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config3, context2, args.input)); + const authSchemePreference = config3.authSchemePreference ? await config3.authSchemePreference() : []; + const resolvedOptions = resolveAuthOptions(options, authSchemePreference); + const authSchemes = convertHttpAuthSchemesToMap(config3.httpAuthSchemes); + const smithyContext = getSmithyContext(context2); + const failureReasons = []; + for (const option of resolvedOptions) { + const scheme = authSchemes.get(option.schemeId); + if (!scheme) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`); + continue; + } + const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config3)); + if (!identityProvider) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); + continue; + } + const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config3, context2) || {}; + option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties); + option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties); + smithyContext.selectedHttpAuthScheme = { + httpAuthOption: option, + identity: await identityProvider(option.identityProperties), + signer: scheme.signer + }; + break; + } + if (!smithyContext.selectedHttpAuthScheme) { + throw new Error(failureReasons.join("\n")); + } + return next(args); + }, "httpAuthSchemeMiddleware"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +var httpAuthSchemeEndpointRuleSetMiddlewareOptions, getHttpAuthSchemeEndpointRuleSetPlugin; +var init_getHttpAuthSchemeEndpointRuleSetPlugin = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpAuthSchemeMiddleware(); + httpAuthSchemeEndpointRuleSetMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: "endpointV2Middleware" + }; + getHttpAuthSchemeEndpointRuleSetPlugin = /* @__PURE__ */ __name((config3, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config3, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), httpAuthSchemeEndpointRuleSetMiddlewareOptions); + } + }), "getHttpAuthSchemeEndpointRuleSetPlugin"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +var init_getHttpAuthSchemePlugin = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js +var init_middleware_http_auth_scheme = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpAuthSchemeMiddleware(); + init_getHttpAuthSchemeEndpointRuleSetPlugin(); + init_getHttpAuthSchemePlugin(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js +var defaultErrorHandler, defaultSuccessHandler, httpSigningMiddleware; +var init_httpSigningMiddleware = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es4(); + defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error50) => { + throw error50; + }, "defaultErrorHandler"); + defaultSuccessHandler = /* @__PURE__ */ __name((httpResponse, signingProperties) => { + }, "defaultSuccessHandler"); + httpSigningMiddleware = /* @__PURE__ */ __name((config3) => (next, context2) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + const smithyContext = getSmithyContext(context2); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + } + const { httpAuthOption: { signingProperties = {} }, identity: identity2, signer } = scheme; + const output = await next({ + ...args, + request: await signer.sign(args.request, identity2, signingProperties) + }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); + (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); + return output; + }, "httpSigningMiddleware"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js +var httpSigningMiddlewareOptions, getHttpSigningPlugin; +var init_getHttpSigningMiddleware = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpSigningMiddleware(); + httpSigningMiddlewareOptions = { + step: "finalizeRequest", + tags: ["HTTP_SIGNING"], + name: "httpSigningMiddleware", + aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], + override: true, + relation: "after", + toMiddleware: "retryMiddleware" + }; + getHttpSigningPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpSigningMiddleware(config3), httpSigningMiddlewareOptions); + } + }), "getHttpSigningPlugin"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-signing/index.js +var init_middleware_http_signing = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-signing/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpSigningMiddleware(); + init_getHttpSigningMiddleware(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/normalizeProvider.js +var normalizeProvider2; +var init_normalizeProvider2 = __esm({ + "../../node_modules/@smithy/core/dist-es/normalizeProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + normalizeProvider2 = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }, "normalizeProvider"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/pagination/createPaginator.js +function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { + return /* @__PURE__ */ __name(async function* paginateOperation(config3, input, ...additionalArguments) { + const _input = input; + let token = config3.startingToken ?? _input[inputTokenName]; + let hasNext = true; + let page; + while (hasNext) { + _input[inputTokenName] = token; + if (pageSizeTokenName) { + _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config3.pageSize; + } + if (config3.client instanceof ClientCtor) { + page = await makePagedClientRequest(CommandCtor, config3.client, input, config3.withCommand, ...additionalArguments); + } else { + throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`); + } + yield page; + const prevToken = token; + token = get(page, outputTokenName); + hasNext = !!(token && (!config3.stopOnSameToken || token !== prevToken)); + } + return void 0; + }, "paginateOperation"); +} +var makePagedClientRequest, get; +var init_createPaginator = __esm({ + "../../node_modules/@smithy/core/dist-es/pagination/createPaginator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + makePagedClientRequest = /* @__PURE__ */ __name(async (CommandCtor, client, input, withCommand = (_) => _, ...args) => { + let command = new CommandCtor(input); + command = withCommand(command) ?? command; + return await client.send(command, ...args); + }, "makePagedClientRequest"); + __name(createPaginator, "createPaginator"); + get = /* @__PURE__ */ __name((fromObject, path) => { + let cursor = fromObject; + const pathComponents = path.split("."); + for (const step of pathComponents) { + if (!cursor || typeof cursor !== "object") { + return void 0; + } + cursor = cursor[step]; + } + return cursor; + }, "get"); + } +}); + +// ../../node_modules/@smithy/util-base64/dist-es/constants.browser.js +var chars, alphabetByEncoding, alphabetByValue, bitsPerLetter, bitsPerByte, maxLetterValue; +var init_constants_browser = __esm({ + "../../node_modules/@smithy/util-base64/dist-es/constants.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`; + alphabetByEncoding = Object.entries(chars).reduce((acc, [i2, c2]) => { + acc[c2] = Number(i2); + return acc; + }, {}); + alphabetByValue = chars.split(""); + bitsPerLetter = 6; + bitsPerByte = 8; + maxLetterValue = 63; + } +}); + +// ../../node_modules/@smithy/util-base64/dist-es/fromBase64.browser.js +var fromBase64; +var init_fromBase64_browser = __esm({ + "../../node_modules/@smithy/util-base64/dist-es/fromBase64.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants_browser(); + fromBase64 = /* @__PURE__ */ __name((input) => { + let totalByteLength = input.length / 4 * 3; + if (input.slice(-2) === "==") { + totalByteLength -= 2; + } else if (input.slice(-1) === "=") { + totalByteLength--; + } + const out = new ArrayBuffer(totalByteLength); + const dataView = new DataView(out); + for (let i2 = 0; i2 < input.length; i2 += 4) { + let bits = 0; + let bitLength = 0; + for (let j2 = i2, limit = i2 + 3; j2 <= limit; j2++) { + if (input[j2] !== "=") { + if (!(input[j2] in alphabetByEncoding)) { + throw new TypeError(`Invalid character ${input[j2]} in base64 string.`); + } + bits |= alphabetByEncoding[input[j2]] << (limit - j2) * bitsPerLetter; + bitLength += bitsPerLetter; + } else { + bits >>= bitsPerLetter; + } + } + const chunkOffset = i2 / 4 * 3; + bits >>= bitLength % bitsPerByte; + const byteLength = Math.floor(bitLength / bitsPerByte); + for (let k2 = 0; k2 < byteLength; k2++) { + const offset = (byteLength - k2 - 1) * bitsPerByte; + dataView.setUint8(chunkOffset + k2, (bits & 255 << offset) >> offset); + } + } + return new Uint8Array(out); + }, "fromBase64"); + } +}); + +// ../../node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js +var fromUtf8; +var init_fromUtf8_browser = __esm({ + "../../node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fromUtf8 = /* @__PURE__ */ __name((input) => new TextEncoder().encode(input), "fromUtf8"); + } +}); + +// ../../node_modules/@smithy/util-utf8/dist-es/toUint8Array.js +var toUint8Array; +var init_toUint8Array = __esm({ + "../../node_modules/@smithy/util-utf8/dist-es/toUint8Array.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser(); + toUint8Array = /* @__PURE__ */ __name((data) => { + if (typeof data === "string") { + return fromUtf8(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); + }, "toUint8Array"); + } +}); + +// ../../node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +var toUtf8; +var init_toUtf8_browser = __esm({ + "../../node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + toUtf8 = /* @__PURE__ */ __name((input) => { + if (typeof input === "string") { + return input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); + } + return new TextDecoder("utf-8").decode(input); + }, "toUtf8"); + } +}); + +// ../../node_modules/@smithy/util-utf8/dist-es/index.js +var init_dist_es5 = __esm({ + "../../node_modules/@smithy/util-utf8/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser(); + init_toUint8Array(); + init_toUtf8_browser(); + } +}); + +// ../../node_modules/@smithy/util-base64/dist-es/toBase64.browser.js +function toBase64(_input) { + let input; + if (typeof _input === "string") { + input = fromUtf8(_input); + } else { + input = _input; + } + const isArrayLike = typeof input === "object" && typeof input.length === "number"; + const isUint8Array = typeof input === "object" && typeof input.byteOffset === "number" && typeof input.byteLength === "number"; + if (!isArrayLike && !isUint8Array) { + throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); + } + let str = ""; + for (let i2 = 0; i2 < input.length; i2 += 3) { + let bits = 0; + let bitLength = 0; + for (let j2 = i2, limit = Math.min(i2 + 3, input.length); j2 < limit; j2++) { + bits |= input[j2] << (limit - j2 - 1) * bitsPerByte; + bitLength += bitsPerByte; + } + const bitClusterCount = Math.ceil(bitLength / bitsPerLetter); + bits <<= bitClusterCount * bitsPerLetter - bitLength; + for (let k2 = 1; k2 <= bitClusterCount; k2++) { + const offset = (bitClusterCount - k2) * bitsPerLetter; + str += alphabetByValue[(bits & maxLetterValue << offset) >> offset]; + } + str += "==".slice(0, 4 - bitClusterCount); + } + return str; +} +var init_toBase64_browser = __esm({ + "../../node_modules/@smithy/util-base64/dist-es/toBase64.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es5(); + init_constants_browser(); + __name(toBase64, "toBase64"); + } +}); + +// ../../node_modules/@smithy/util-base64/dist-es/index.js +var init_dist_es6 = __esm({ + "../../node_modules/@smithy/util-base64/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromBase64_browser(); + init_toBase64_browser(); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js +var Uint8ArrayBlobAdapter; +var init_Uint8ArrayBlobAdapter = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es6(); + init_dist_es5(); + Uint8ArrayBlobAdapter = class extends Uint8Array { + static fromString(source, encoding = "utf-8") { + if (typeof source === "string") { + if (encoding === "base64") { + return Uint8ArrayBlobAdapter.mutate(fromBase64(source)); + } + return Uint8ArrayBlobAdapter.mutate(fromUtf8(source)); + } + throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); + } + static mutate(source) { + Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype); + return source; + } + transformToString(encoding = "utf-8") { + if (encoding === "base64") { + return toBase64(this); + } + return toUtf8(this); + } + }; + __name(Uint8ArrayBlobAdapter, "Uint8ArrayBlobAdapter"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/checksum/ChecksumStream.browser.js +var ReadableStreamRef, ChecksumStream; +var init_ChecksumStream_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/checksum/ChecksumStream.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() { + }; + ChecksumStream = class extends ReadableStreamRef { + }; + __name(ChecksumStream, "ChecksumStream"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/stream-type-check.js +var isReadableStream; +var init_stream_type_check = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/stream-type-check.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isReadableStream = /* @__PURE__ */ __name((stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream), "isReadableStream"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/checksum/createChecksumStream.browser.js +var createChecksumStream; +var init_createChecksumStream_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/checksum/createChecksumStream.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es6(); + init_stream_type_check(); + init_ChecksumStream_browser(); + createChecksumStream = /* @__PURE__ */ __name(({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => { + if (!isReadableStream(source)) { + throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); + } + const encoder2 = base64Encoder ?? toBase64; + if (typeof TransformStream !== "function") { + throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream."); + } + const transform2 = new TransformStream({ + start() { + }, + async transform(chunk, controller) { + checksum.update(chunk); + controller.enqueue(chunk); + }, + async flush(controller) { + const digest = await checksum.digest(); + const received = encoder2(digest); + if (expectedChecksum !== received) { + const error50 = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}" in response header "${checksumSourceLocation}".`); + controller.error(error50); + } else { + controller.terminate(); + } + } + }); + source.pipeThrough(transform2); + const readable = transform2.readable; + Object.setPrototypeOf(readable, ChecksumStream.prototype); + return readable; + }, "createChecksumStream"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/ByteArrayCollector.js +var ByteArrayCollector; +var init_ByteArrayCollector = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/ByteArrayCollector.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ByteArrayCollector = class { + allocByteArray; + byteLength = 0; + byteArrays = []; + constructor(allocByteArray) { + this.allocByteArray = allocByteArray; + } + push(byteArray) { + this.byteArrays.push(byteArray); + this.byteLength += byteArray.byteLength; + } + flush() { + if (this.byteArrays.length === 1) { + const bytes = this.byteArrays[0]; + this.reset(); + return bytes; + } + const aggregation = this.allocByteArray(this.byteLength); + let cursor = 0; + for (let i2 = 0; i2 < this.byteArrays.length; ++i2) { + const bytes = this.byteArrays[i2]; + aggregation.set(bytes, cursor); + cursor += bytes.byteLength; + } + this.reset(); + return aggregation; + } + reset() { + this.byteArrays = []; + this.byteLength = 0; + } + }; + __name(ByteArrayCollector, "ByteArrayCollector"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/createBufferedReadableStream.js +function createBufferedReadableStream(upstream, size, logger3) { + const reader = upstream.getReader(); + let streamBufferingLoggedWarning = false; + let bytesSeen = 0; + const buffers = ["", new ByteArrayCollector((size2) => new Uint8Array(size2))]; + let mode = -1; + const pull = /* @__PURE__ */ __name(async (controller) => { + const { value, done } = await reader.read(); + const chunk = value; + if (done) { + if (mode !== -1) { + const remainder = flush(buffers, mode); + if (sizeOf(remainder) > 0) { + controller.enqueue(remainder); + } + } + controller.close(); + } else { + const chunkMode = modeOf(chunk, false); + if (mode !== chunkMode) { + if (mode >= 0) { + controller.enqueue(flush(buffers, mode)); + } + mode = chunkMode; + } + if (mode === -1) { + controller.enqueue(chunk); + return; + } + const chunkSize = sizeOf(chunk); + bytesSeen += chunkSize; + const bufferSize = sizeOf(buffers[mode]); + if (chunkSize >= size && bufferSize === 0) { + controller.enqueue(chunk); + } else { + const newSize = merge(buffers, mode, chunk); + if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { + streamBufferingLoggedWarning = true; + logger3?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); + } + if (newSize >= size) { + controller.enqueue(flush(buffers, mode)); + } else { + await pull(controller); + } + } + } + }, "pull"); + return new ReadableStream({ + pull + }); +} +function merge(buffers, mode, chunk) { + switch (mode) { + case 0: + buffers[0] += chunk; + return sizeOf(buffers[0]); + case 1: + case 2: + buffers[mode].push(chunk); + return sizeOf(buffers[mode]); + } +} +function flush(buffers, mode) { + switch (mode) { + case 0: + const s2 = buffers[0]; + buffers[0] = ""; + return s2; + case 1: + case 2: + return buffers[mode].flush(); + } + throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`); +} +function sizeOf(chunk) { + return chunk?.byteLength ?? chunk?.length ?? 0; +} +function modeOf(chunk, allowBuffer = true) { + if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) { + return 2; + } + if (chunk instanceof Uint8Array) { + return 1; + } + if (typeof chunk === "string") { + return 0; + } + return -1; +} +var createBufferedReadable; +var init_createBufferedReadableStream = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/createBufferedReadableStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_ByteArrayCollector(); + __name(createBufferedReadableStream, "createBufferedReadableStream"); + createBufferedReadable = createBufferedReadableStream; + __name(merge, "merge"); + __name(flush, "flush"); + __name(sizeOf, "sizeOf"); + __name(modeOf, "modeOf"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/getAwsChunkedEncodingStream.browser.js +var getAwsChunkedEncodingStream; +var init_getAwsChunkedEncodingStream_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/getAwsChunkedEncodingStream.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getAwsChunkedEncodingStream = /* @__PURE__ */ __name((readableStream, options) => { + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== void 0 && bodyLengthChecker !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0; + const reader = readableStream.getReader(); + return new ReadableStream({ + async pull(controller) { + const { value, done } = await reader.read(); + if (done) { + controller.enqueue(`0\r +`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + controller.enqueue(`${checksumLocationName}:${checksum}\r +`); + controller.enqueue(`\r +`); + } + controller.close(); + } else { + controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\r +${value}\r +`); + } + } + }); + }, "getAwsChunkedEncodingStream"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/headStream.browser.js +async function headStream(stream, bytes) { + let byteLengthCounter = 0; + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + byteLengthCounter += value?.byteLength ?? 0; + } + if (byteLengthCounter >= bytes) { + break; + } + isDone = done; + } + reader.releaseLock(); + const collected = new Uint8Array(Math.min(bytes, byteLengthCounter)); + let offset = 0; + for (const chunk of chunks) { + if (chunk.byteLength > collected.byteLength - offset) { + collected.set(chunk.subarray(0, collected.byteLength - offset), offset); + break; + } else { + collected.set(chunk, offset); + } + offset += chunk.length; + } + return collected; +} +var init_headStream_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/headStream.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(headStream, "headStream"); + } +}); + +// ../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri.js +var escapeUri, hexEncode; +var init_escape_uri = __esm({ + "../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + escapeUri = /* @__PURE__ */ __name((uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode), "escapeUri"); + hexEncode = /* @__PURE__ */ __name((c2) => `%${c2.charCodeAt(0).toString(16).toUpperCase()}`, "hexEncode"); + } +}); + +// ../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri-path.js +var init_escape_uri_path = __esm({ + "../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri-path.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-uri-escape/dist-es/index.js +var init_dist_es7 = __esm({ + "../../node_modules/@smithy/util-uri-escape/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_escape_uri(); + init_escape_uri_path(); + } +}); + +// ../../node_modules/@smithy/querystring-builder/dist-es/index.js +function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = escapeUri(key); + if (Array.isArray(value)) { + for (let i2 = 0, iLen = value.length; i2 < iLen; i2++) { + parts.push(`${key}=${escapeUri(value[i2])}`); + } + } else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${escapeUri(value)}`; + } + parts.push(qsEntry); + } + } + return parts.join("&"); +} +var init_dist_es8 = __esm({ + "../../node_modules/@smithy/querystring-builder/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es7(); + __name(buildQueryString, "buildQueryString"); + } +}); + +// ../../node_modules/@smithy/fetch-http-handler/dist-es/create-request.js +function createRequest(url2, requestOptions) { + return new Request(url2, requestOptions); +} +var init_create_request = __esm({ + "../../node_modules/@smithy/fetch-http-handler/dist-es/create-request.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(createRequest, "createRequest"); + } +}); + +// ../../node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js +function requestTimeout(timeoutInMs = 0) { + return new Promise((resolve, reject) => { + if (timeoutInMs) { + setTimeout(() => { + const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); + timeoutError.name = "TimeoutError"; + reject(timeoutError); + }, timeoutInMs); + } + }); +} +var init_request_timeout = __esm({ + "../../node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(requestTimeout, "requestTimeout"); + } +}); + +// ../../node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +function buildAbortError(abortSignal) { + const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : void 0; + if (reason) { + if (reason instanceof Error) { + const abortError3 = new Error("Request aborted"); + abortError3.name = "AbortError"; + abortError3.cause = reason; + return abortError3; + } + const abortError2 = new Error(String(reason)); + abortError2.name = "AbortError"; + return abortError2; + } + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + return abortError; +} +var keepAliveSupport, FetchHttpHandler; +var init_fetch_http_handler = __esm({ + "../../node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es8(); + init_create_request(); + init_request_timeout(); + keepAliveSupport = { + supported: void 0 + }; + FetchHttpHandler = class { + config; + configProvider; + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new FetchHttpHandler(instanceOrOptions); + } + constructor(options) { + if (typeof options === "function") { + this.configProvider = options().then((opts) => opts || {}); + } else { + this.config = options ?? {}; + this.configProvider = Promise.resolve(this.config); + } + if (keepAliveSupport.supported === void 0) { + keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]")); + } + } + destroy() { + } + async handle(request, { abortSignal, requestTimeout: requestTimeout2 } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + const requestTimeoutInMs = requestTimeout2 ?? this.config.requestTimeout; + const keepAlive = this.config.keepAlive === true; + const credentials = this.config.credentials; + if (abortSignal?.aborted) { + const abortError = buildAbortError(abortSignal); + return Promise.reject(abortError); + } + let path = request.path; + const queryString = buildQueryString(request.query || {}); + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + const { port, method } = request; + const url2 = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`; + const body = method === "GET" || method === "HEAD" ? void 0 : request.body; + const requestOptions = { + body, + headers: new Headers(request.headers), + method, + credentials + }; + if (this.config?.cache) { + requestOptions.cache = this.config.cache; + } + if (body) { + requestOptions.duplex = "half"; + } + if (typeof AbortController !== "undefined") { + requestOptions.signal = abortSignal; + } + if (keepAliveSupport.supported) { + requestOptions.keepalive = keepAlive; + } + if (typeof this.config.requestInit === "function") { + Object.assign(requestOptions, this.config.requestInit(request)); + } + let removeSignalEventListener = /* @__PURE__ */ __name(() => { + }, "removeSignalEventListener"); + const fetchRequest = createRequest(url2, requestOptions); + const raceOfPromises = [ + fetch(fetchRequest).then((response) => { + const fetchHeaders = response.headers; + const transformedHeaders = {}; + for (const pair of fetchHeaders.entries()) { + transformedHeaders[pair[0]] = pair[1]; + } + const hasReadableStream = response.body != void 0; + if (!hasReadableStream) { + return response.blob().then((body2) => ({ + response: new HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: body2 + }) + })); + } + return { + response: new HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: response.body + }) + }; + }), + requestTimeout(requestTimeoutInMs) + ]; + if (abortSignal) { + raceOfPromises.push(new Promise((resolve, reject) => { + const onAbort = /* @__PURE__ */ __name(() => { + const abortError = buildAbortError(abortSignal); + reject(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener("abort", onAbort), "removeSignalEventListener"); + } else { + abortSignal.onabort = onAbort; + } + })); + } + return Promise.race(raceOfPromises).finally(removeSignalEventListener); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config3) => { + config3[key] = value; + return config3; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + }; + __name(FetchHttpHandler, "FetchHttpHandler"); + __name(buildAbortError, "buildAbortError"); + } +}); + +// ../../node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js +async function collectBlob(blob2) { + const base643 = await readToBase64(blob2); + const arrayBuffer = fromBase64(base643); + return new Uint8Array(arrayBuffer); +} +async function collectStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; +} +function readToBase64(blob2) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onloadend = () => { + if (reader.readyState !== 2) { + return reject(new Error("Reader aborted too early")); + } + const result = reader.result ?? ""; + const commaIndex = result.indexOf(","); + const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; + resolve(result.substring(dataOffset)); + }; + reader.onabort = () => reject(new Error("Read aborted")); + reader.onerror = () => reject(reader.error); + reader.readAsDataURL(blob2); + }); +} +var streamCollector; +var init_stream_collector = __esm({ + "../../node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es6(); + streamCollector = /* @__PURE__ */ __name(async (stream) => { + if (typeof Blob === "function" && stream instanceof Blob || stream.constructor?.name === "Blob") { + if (Blob.prototype.arrayBuffer !== void 0) { + return new Uint8Array(await stream.arrayBuffer()); + } + return collectBlob(stream); + } + return collectStream(stream); + }, "streamCollector"); + __name(collectBlob, "collectBlob"); + __name(collectStream, "collectStream"); + __name(readToBase64, "readToBase64"); + } +}); + +// ../../node_modules/@smithy/fetch-http-handler/dist-es/index.js +var init_dist_es9 = __esm({ + "../../node_modules/@smithy/fetch-http-handler/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fetch_http_handler(); + init_stream_collector(); + } +}); + +// ../../node_modules/@smithy/util-hex-encoding/dist-es/index.js +function fromHex(encoded) { + if (encoded.length % 2 !== 0) { + throw new Error("Hex encoded strings must have an even number length"); + } + const out = new Uint8Array(encoded.length / 2); + for (let i2 = 0; i2 < encoded.length; i2 += 2) { + const encodedByte = encoded.slice(i2, i2 + 2).toLowerCase(); + if (encodedByte in HEX_TO_SHORT) { + out[i2 / 2] = HEX_TO_SHORT[encodedByte]; + } else { + throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + } + } + return out; +} +function toHex(bytes) { + let out = ""; + for (let i2 = 0; i2 < bytes.byteLength; i2++) { + out += SHORT_TO_HEX[bytes[i2]]; + } + return out; +} +var SHORT_TO_HEX, HEX_TO_SHORT; +var init_dist_es10 = __esm({ + "../../node_modules/@smithy/util-hex-encoding/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SHORT_TO_HEX = {}; + HEX_TO_SHORT = {}; + for (let i2 = 0; i2 < 256; i2++) { + let encodedByte = i2.toString(16).toLowerCase(); + if (encodedByte.length === 1) { + encodedByte = `0${encodedByte}`; + } + SHORT_TO_HEX[i2] = encodedByte; + HEX_TO_SHORT[encodedByte] = i2; + } + __name(fromHex, "fromHex"); + __name(toHex, "toHex"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.browser.js +var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED, sdkStreamMixin, isBlobInstance; +var init_sdk_stream_mixin_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es9(); + init_dist_es6(); + init_dist_es10(); + init_dist_es5(); + init_stream_type_check(); + ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; + sdkStreamMixin = /* @__PURE__ */ __name((stream) => { + if (!isBlobInstance(stream) && !isReadableStream(stream)) { + const name = stream?.__proto__?.constructor?.name || stream; + throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); + } + let transformed = false; + const transformToByteArray = /* @__PURE__ */ __name(async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await streamCollector(stream); + }, "transformToByteArray"); + const blobToWebStream = /* @__PURE__ */ __name((blob2) => { + if (typeof blob2.stream !== "function") { + throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body"); + } + return blob2.stream(); + }, "blobToWebStream"); + return Object.assign(stream, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === "base64") { + return toBase64(buf); + } else if (encoding === "hex") { + return toHex(buf); + } else if (encoding === void 0 || encoding === "utf8" || encoding === "utf-8") { + return toUtf8(buf); + } else if (typeof TextDecoder === "function") { + return new TextDecoder(encoding).decode(buf); + } else { + throw new Error("TextDecoder is not available, please make sure polyfill is provided."); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + if (isBlobInstance(stream)) { + return blobToWebStream(stream); + } else if (isReadableStream(stream)) { + return stream; + } else { + throw new Error(`Cannot transform payload to web stream, got ${stream}`); + } + } + }); + }, "sdkStreamMixin"); + isBlobInstance = /* @__PURE__ */ __name((stream) => typeof Blob === "function" && stream instanceof Blob, "isBlobInstance"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/splitStream.browser.js +async function splitStream(stream) { + if (typeof stream.stream === "function") { + stream = stream.stream(); + } + const readableStream = stream; + return readableStream.tee(); +} +var init_splitStream_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/splitStream.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(splitStream, "splitStream"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/index.js +var init_dist_es11 = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Uint8ArrayBlobAdapter(); + init_ChecksumStream_browser(); + init_createChecksumStream_browser(); + init_createBufferedReadableStream(); + init_getAwsChunkedEncodingStream_browser(); + init_headStream_browser(); + init_sdk_stream_mixin_browser(); + init_splitStream_browser(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js +var collectBody; +var init_collect_stream_body = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es11(); + collectBody = /* @__PURE__ */ __name(async (streamBody = new Uint8Array(), context2) => { + if (streamBody instanceof Uint8Array) { + return Uint8ArrayBlobAdapter.mutate(streamBody); + } + if (!streamBody) { + return Uint8ArrayBlobAdapter.mutate(new Uint8Array()); + } + const fromContext = context2.streamCollector(streamBody); + return Uint8ArrayBlobAdapter.mutate(await fromContext); + }, "collectBody"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js +function extendedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c2) { + return "%" + c2.charCodeAt(0).toString(16).toUpperCase(); + }); +} +var init_extended_encode_uri_component = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(extendedEncodeURIComponent, "extendedEncodeURIComponent"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/deref.js +var deref; +var init_deref = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/deref.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + deref = /* @__PURE__ */ __name((schemaRef) => { + if (typeof schemaRef === "function") { + return schemaRef(); + } + return schemaRef; + }, "deref"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js +var operation; +var init_operation = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + operation = /* @__PURE__ */ __name((namespace, name, traits, input, output) => ({ + name, + namespace, + traits, + input, + output + }), "operation"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +var schemaDeserializationMiddleware, findHeader; +var init_schemaDeserializationMiddleware = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es4(); + init_operation(); + schemaDeserializationMiddleware = /* @__PURE__ */ __name((config3) => (next, context2) => async (args) => { + const { response } = await next(args); + const { operationSchema } = getSmithyContext(context2); + const [, ns, n2, t9, i2, o2] = operationSchema ?? []; + try { + const parsed = await config3.protocol.deserializeResponse(operation(ns, n2, t9, i2, o2), { + ...config3, + ...context2 + }, response); + return { + response, + output: parsed + }; + } catch (error50) { + Object.defineProperty(error50, "$response", { + value: response, + enumerable: false, + writable: false, + configurable: false + }); + if (!("$metadata" in error50)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + try { + error50.message += "\n " + hint; + } catch (e2) { + if (!context2.logger || context2.logger?.constructor?.name === "NoOpLogger") { + console.warn(hint); + } else { + context2.logger?.warn?.(hint); + } + } + if (typeof error50.$responseBodyText !== "undefined") { + if (error50.$response) { + error50.$response.body = error50.$responseBodyText; + } + } + try { + if (HttpResponse.isInstance(response)) { + const { headers = {} } = response; + const headerEntries = Object.entries(headers); + error50.$metadata = { + httpStatusCode: response.statusCode, + requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), + extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), + cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries) + }; + } + } catch (e2) { + } + } + throw error50; + } + }, "schemaDeserializationMiddleware"); + findHeader = /* @__PURE__ */ __name((pattern, headers) => { + return (headers.find(([k2]) => { + return k2.match(pattern); + }) || [void 0, void 0])[1]; + }, "findHeader"); + } +}); + +// ../../node_modules/@smithy/querystring-parser/dist-es/index.js +function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } else if (Array.isArray(query[key])) { + query[key].push(value); + } else { + query[key] = [query[key], value]; + } + } + } + return query; +} +var init_dist_es12 = __esm({ + "../../node_modules/@smithy/querystring-parser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(parseQueryString, "parseQueryString"); + } +}); + +// ../../node_modules/@smithy/url-parser/dist-es/index.js +var parseUrl; +var init_dist_es13 = __esm({ + "../../node_modules/@smithy/url-parser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es12(); + parseUrl = /* @__PURE__ */ __name((url2) => { + if (typeof url2 === "string") { + return parseUrl(new URL(url2)); + } + const { hostname: hostname3, pathname, port, protocol, search } = url2; + let query; + if (search) { + query = parseQueryString(search); + } + return { + hostname: hostname3, + port: port ? parseInt(port) : void 0, + protocol, + path: pathname, + query + }; + }, "parseUrl"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js +var toEndpointV1; +var init_toEndpointV1 = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es13(); + toEndpointV1 = /* @__PURE__ */ __name((endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + const v1Endpoint = parseUrl(endpoint.url); + if (endpoint.headers) { + v1Endpoint.headers = {}; + for (const [name, values] of Object.entries(endpoint.headers)) { + v1Endpoint.headers[name.toLowerCase()] = values.join(", "); + } + } + return v1Endpoint; + } + return endpoint; + } + return parseUrl(endpoint); + }, "toEndpointV1"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/endpoints/index.js +var init_endpoints2 = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/endpoints/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_toEndpointV1(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +var schemaSerializationMiddleware; +var init_schemaSerializationMiddleware = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_endpoints2(); + init_dist_es4(); + init_operation(); + schemaSerializationMiddleware = /* @__PURE__ */ __name((config3) => (next, context2) => async (args) => { + const { operationSchema } = getSmithyContext(context2); + const [, ns, n2, t9, i2, o2] = operationSchema ?? []; + const endpoint = context2.endpointV2 ? async () => toEndpointV1(context2.endpointV2) : config3.endpoint; + const request = await config3.protocol.serializeRequest(operation(ns, n2, t9, i2, o2), args.input, { + ...config3, + ...context2, + endpoint + }); + return next({ + ...args, + request + }); + }, "schemaSerializationMiddleware"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js +function getSchemaSerdePlugin(config3) { + return { + applyToStack: (commandStack) => { + commandStack.add(schemaSerializationMiddleware(config3), serializerMiddlewareOption); + commandStack.add(schemaDeserializationMiddleware(config3), deserializerMiddlewareOption); + config3.protocol.setSerdeContext(config3); + } + }; +} +var deserializerMiddlewareOption, serializerMiddlewareOption; +var init_getSchemaSerdePlugin = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schemaDeserializationMiddleware(); + init_schemaSerializationMiddleware(); + deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true + }; + serializerMiddlewareOption = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true + }; + __name(getSchemaSerdePlugin, "getSchemaSerdePlugin"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js +var Schema2; +var init_Schema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Schema2 = class { + name; + namespace; + traits; + static assign(instance, values) { + const schema = Object.assign(instance, values); + return schema; + } + static [Symbol.hasInstance](lhs) { + const isPrototype = this.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const list = lhs; + return list.symbol === this.symbol; + } + return isPrototype; + } + getName() { + return this.namespace + "#" + this.name; + } + }; + __name(Schema2, "Schema"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js +var _ListSchema, ListSchema; +var init_ListSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Schema(); + _ListSchema = class extends Schema2 { + name; + traits; + valueSchema; + symbol = _ListSchema.symbol; + }; + ListSchema = _ListSchema; + __name(ListSchema, "ListSchema"); + __publicField(ListSchema, "symbol", Symbol.for("@smithy/lis")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js +var _MapSchema, MapSchema; +var init_MapSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Schema(); + _MapSchema = class extends Schema2 { + name; + traits; + keySchema; + valueSchema; + symbol = _MapSchema.symbol; + }; + MapSchema = _MapSchema; + __name(MapSchema, "MapSchema"); + __publicField(MapSchema, "symbol", Symbol.for("@smithy/map")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js +var _OperationSchema, OperationSchema; +var init_OperationSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Schema(); + _OperationSchema = class extends Schema2 { + name; + traits; + input; + output; + symbol = _OperationSchema.symbol; + }; + OperationSchema = _OperationSchema; + __name(OperationSchema, "OperationSchema"); + __publicField(OperationSchema, "symbol", Symbol.for("@smithy/ope")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js +var _StructureSchema, StructureSchema; +var init_StructureSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Schema(); + _StructureSchema = class extends Schema2 { + name; + traits; + memberNames; + memberList; + symbol = _StructureSchema.symbol; + }; + StructureSchema = _StructureSchema; + __name(StructureSchema, "StructureSchema"); + __publicField(StructureSchema, "symbol", Symbol.for("@smithy/str")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js +var _ErrorSchema, ErrorSchema; +var init_ErrorSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_StructureSchema(); + _ErrorSchema = class extends StructureSchema { + ctor; + symbol = _ErrorSchema.symbol; + }; + ErrorSchema = _ErrorSchema; + __name(ErrorSchema, "ErrorSchema"); + __publicField(ErrorSchema, "symbol", Symbol.for("@smithy/err")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +function translateTraits(indicator) { + if (typeof indicator === "object") { + return indicator; + } + indicator = indicator | 0; + if (traitsCache[indicator]) { + return traitsCache[indicator]; + } + const traits = {}; + let i2 = 0; + for (const trait of [ + "httpLabel", + "idempotent", + "idempotencyToken", + "sensitive", + "httpPayload", + "httpResponseCode", + "httpQueryParams" + ]) { + if ((indicator >> i2++ & 1) === 1) { + traits[trait] = 1; + } + } + return traitsCache[indicator] = traits; +} +var traitsCache; +var init_translateTraits = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + traitsCache = []; + __name(translateTraits, "translateTraits"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +function member(memberSchema, memberName) { + if (memberSchema instanceof NormalizedSchema) { + return Object.assign(memberSchema, { + memberName, + _isMemberSchema: true + }); + } + const internalCtorAccess = NormalizedSchema; + return new internalCtorAccess(memberSchema, memberName); +} +var anno, simpleSchemaCacheN, simpleSchemaCacheS, _NormalizedSchema, NormalizedSchema, isMemberSchema, isStaticSchema; +var init_NormalizedSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_deref(); + init_translateTraits(); + anno = { + it: Symbol.for("@smithy/nor-struct-it"), + ns: Symbol.for("@smithy/ns") + }; + simpleSchemaCacheN = []; + simpleSchemaCacheS = {}; + _NormalizedSchema = class { + ref; + memberName; + symbol = _NormalizedSchema.symbol; + name; + schema; + _isMemberSchema; + traits; + memberTraits; + normalizedTraits; + constructor(ref, memberName) { + this.ref = ref; + this.memberName = memberName; + const traitStack = []; + let _ref = ref; + let schema = ref; + this._isMemberSchema = false; + while (isMemberSchema(_ref)) { + traitStack.push(_ref[1]); + _ref = _ref[0]; + schema = deref(_ref); + this._isMemberSchema = true; + } + if (traitStack.length > 0) { + this.memberTraits = {}; + for (let i2 = traitStack.length - 1; i2 >= 0; --i2) { + const traitSet = traitStack[i2]; + Object.assign(this.memberTraits, translateTraits(traitSet)); + } + } else { + this.memberTraits = 0; + } + if (schema instanceof _NormalizedSchema) { + const computedMemberTraits = this.memberTraits; + Object.assign(this, schema); + this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits()); + this.normalizedTraits = void 0; + this.memberName = memberName ?? schema.memberName; + return; + } + this.schema = deref(schema); + if (isStaticSchema(this.schema)) { + this.name = `${this.schema[1]}#${this.schema[2]}`; + this.traits = this.schema[3]; + } else { + this.name = this.memberName ?? String(schema); + this.traits = 0; + } + if (this._isMemberSchema && !memberName) { + throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`); + } + } + static [Symbol.hasInstance](lhs) { + const isPrototype = this.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const ns = lhs; + return ns.symbol === this.symbol; + } + return isPrototype; + } + static of(ref) { + const keyAble = typeof ref === "function" || typeof ref === "object" && ref !== null; + if (typeof ref === "number") { + if (simpleSchemaCacheN[ref]) { + return simpleSchemaCacheN[ref]; + } + } else if (typeof ref === "string") { + if (simpleSchemaCacheS[ref]) { + return simpleSchemaCacheS[ref]; + } + } else if (keyAble) { + if (ref[anno.ns]) { + return ref[anno.ns]; + } + } + const sc = deref(ref); + if (sc instanceof _NormalizedSchema) { + return sc; + } + if (isMemberSchema(sc)) { + const [ns2, traits] = sc; + if (ns2 instanceof _NormalizedSchema) { + Object.assign(ns2.getMergedTraits(), translateTraits(traits)); + return ns2; + } + throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`); + } + const ns = new _NormalizedSchema(sc); + if (keyAble) { + return ref[anno.ns] = ns; + } + if (typeof sc === "string") { + return simpleSchemaCacheS[sc] = ns; + } + if (typeof sc === "number") { + return simpleSchemaCacheN[sc] = ns; + } + return ns; + } + getSchema() { + const sc = this.schema; + if (Array.isArray(sc) && sc[0] === 0) { + return sc[4]; + } + return sc; + } + getName(withNamespace = false) { + const { name } = this; + const short = !withNamespace && name && name.includes("#"); + return short ? name.split("#")[1] : name || void 0; + } + getMemberName() { + return this.memberName; + } + isMemberSchema() { + return this._isMemberSchema; + } + isListSchema() { + const sc = this.getSchema(); + return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1; + } + isMapSchema() { + const sc = this.getSchema(); + return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2; + } + isStructSchema() { + const sc = this.getSchema(); + if (typeof sc !== "object") { + return false; + } + const id = sc[0]; + return id === 3 || id === -3 || id === 4; + } + isUnionSchema() { + const sc = this.getSchema(); + if (typeof sc !== "object") { + return false; + } + return sc[0] === 4; + } + isBlobSchema() { + const sc = this.getSchema(); + return sc === 21 || sc === 42; + } + isTimestampSchema() { + const sc = this.getSchema(); + return typeof sc === "number" && sc >= 4 && sc <= 7; + } + isUnitSchema() { + return this.getSchema() === "unit"; + } + isDocumentSchema() { + return this.getSchema() === 15; + } + isStringSchema() { + return this.getSchema() === 0; + } + isBooleanSchema() { + return this.getSchema() === 2; + } + isNumericSchema() { + return this.getSchema() === 1; + } + isBigIntegerSchema() { + return this.getSchema() === 17; + } + isBigDecimalSchema() { + return this.getSchema() === 19; + } + isStreaming() { + const { streaming } = this.getMergedTraits(); + return !!streaming || this.getSchema() === 42; + } + isIdempotencyToken() { + return !!this.getMergedTraits().idempotencyToken; + } + getMergedTraits() { + return this.normalizedTraits ?? (this.normalizedTraits = { + ...this.getOwnTraits(), + ...this.getMemberTraits() + }); + } + getMemberTraits() { + return translateTraits(this.memberTraits); + } + getOwnTraits() { + return translateTraits(this.traits); + } + getKeySchema() { + const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()]; + if (!isDoc && !isMap) { + throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`); + } + const schema = this.getSchema(); + const memberSchema = isDoc ? 15 : schema[4] ?? 0; + return member([memberSchema, 0], "key"); + } + getValueSchema() { + const sc = this.getSchema(); + const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()]; + const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap || isList) ? sc[3 + sc[0]] : isDoc ? 15 : void 0; + if (memberSchema != null) { + return member([memberSchema, 0], isMap ? "value" : "member"); + } + throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`); + } + getMemberSchema(memberName) { + const struct = this.getSchema(); + if (this.isStructSchema() && struct[4].includes(memberName)) { + const i2 = struct[4].indexOf(memberName); + const memberSchema = struct[5][i2]; + return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName); + } + if (this.isDocumentSchema()) { + return member([15, 0], memberName); + } + throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`); + } + getMemberSchemas() { + const buffer = {}; + try { + for (const [k2, v3] of this.structIterator()) { + buffer[k2] = v3; + } + } catch (ignored) { + } + return buffer; + } + getEventStreamMember() { + if (this.isStructSchema()) { + for (const [memberName, memberSchema] of this.structIterator()) { + if (memberSchema.isStreaming() && memberSchema.isStructSchema()) { + return memberName; + } + } + } + return ""; + } + *structIterator() { + if (this.isUnitSchema()) { + return; + } + if (!this.isStructSchema()) { + throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); + } + const struct = this.getSchema(); + const z3 = struct[4].length; + let it = struct[anno.it]; + if (it && z3 === it.length) { + yield* it; + return; + } + it = Array(z3); + for (let i2 = 0; i2 < z3; ++i2) { + const k2 = struct[4][i2]; + const v3 = member([struct[5][i2], 0], k2); + yield it[i2] = [k2, v3]; + } + struct[anno.it] = it; + } + }; + NormalizedSchema = _NormalizedSchema; + __name(NormalizedSchema, "NormalizedSchema"); + __publicField(NormalizedSchema, "symbol", Symbol.for("@smithy/nor")); + __name(member, "member"); + isMemberSchema = /* @__PURE__ */ __name((sc) => Array.isArray(sc) && sc.length === 2, "isMemberSchema"); + isStaticSchema = /* @__PURE__ */ __name((sc) => Array.isArray(sc) && sc.length >= 5, "isStaticSchema"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js +var _SimpleSchema, SimpleSchema; +var init_SimpleSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Schema(); + _SimpleSchema = class extends Schema2 { + name; + schemaRef; + traits; + symbol = _SimpleSchema.symbol; + }; + SimpleSchema = _SimpleSchema; + __name(SimpleSchema, "SimpleSchema"); + __publicField(SimpleSchema, "symbol", Symbol.for("@smithy/sim")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js +var init_sentinels2 = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +var _TypeRegistry, TypeRegistry; +var init_TypeRegistry = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + _TypeRegistry = class { + namespace; + schemas; + exceptions; + constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) { + this.namespace = namespace; + this.schemas = schemas; + this.exceptions = exceptions; + } + static for(namespace) { + if (!_TypeRegistry.registries.has(namespace)) { + _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace)); + } + return _TypeRegistry.registries.get(namespace); + } + copyFrom(other) { + const { schemas, exceptions } = this; + for (const [k2, v3] of other.schemas) { + if (!schemas.has(k2)) { + schemas.set(k2, v3); + } + } + for (const [k2, v3] of other.exceptions) { + if (!exceptions.has(k2)) { + exceptions.set(k2, v3); + } + } + } + register(shapeId, schema) { + const qualifiedName = this.normalizeShapeId(shapeId); + for (const r2 of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) { + r2.schemas.set(qualifiedName, schema); + } + } + getSchema(shapeId) { + const id = this.normalizeShapeId(shapeId); + if (!this.schemas.has(id)) { + throw new Error(`@smithy/core/schema - schema not found for ${id}`); + } + return this.schemas.get(id); + } + registerError(es, ctor) { + const $error = es; + const ns = $error[1]; + for (const r2 of [this, _TypeRegistry.for(ns)]) { + r2.schemas.set(ns + "#" + $error[2], $error); + r2.exceptions.set($error, ctor); + } + } + getErrorCtor(es) { + const $error = es; + if (this.exceptions.has($error)) { + return this.exceptions.get($error); + } + const registry2 = _TypeRegistry.for($error[1]); + return registry2.exceptions.get($error); + } + getBaseException() { + for (const exceptionKey of this.exceptions.keys()) { + if (Array.isArray(exceptionKey)) { + const [, ns, name] = exceptionKey; + const id = ns + "#" + name; + if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) { + return exceptionKey; + } + } + } + return void 0; + } + find(predicate) { + return [...this.schemas.values()].find(predicate); + } + clear() { + this.schemas.clear(); + this.exceptions.clear(); + } + normalizeShapeId(shapeId) { + if (shapeId.includes("#")) { + return shapeId; + } + return this.namespace + "#" + shapeId; + } + }; + TypeRegistry = _TypeRegistry; + __name(TypeRegistry, "TypeRegistry"); + __publicField(TypeRegistry, "registries", /* @__PURE__ */ new Map()); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/index.js +var init_schema3 = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_deref(); + init_getSchemaSerdePlugin(); + init_ListSchema(); + init_MapSchema(); + init_OperationSchema(); + init_operation(); + init_ErrorSchema(); + init_NormalizedSchema(); + init_Schema(); + init_SimpleSchema(); + init_StructureSchema(); + init_sentinels2(); + init_translateTraits(); + init_TypeRegistry(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js +var init_copyDocumentWithTransform = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +var expectNumber, MAX_FLOAT, expectFloat32, expectLong, expectShort, expectByte, expectSizedInt, castInt, strictParseFloat32, NUMBER_REGEX, parseNumber, strictParseShort, strictParseByte, stackTraceWarning, logger2; +var init_parse_utils = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + expectNumber = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "string") { + const parsed = parseFloat(value); + if (!Number.isNaN(parsed)) { + if (String(parsed) !== String(value)) { + logger2.warn(stackTraceWarning(`Expected number but observed string: ${value}`)); + } + return parsed; + } + } + if (typeof value === "number") { + return value; + } + throw new TypeError(`Expected number, got ${typeof value}: ${value}`); + }, "expectNumber"); + MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); + expectFloat32 = /* @__PURE__ */ __name((value) => { + const expected = expectNumber(value); + if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { + if (Math.abs(expected) > MAX_FLOAT) { + throw new TypeError(`Expected 32-bit float, got ${value}`); + } + } + return expected; + }, "expectFloat32"); + expectLong = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (Number.isInteger(value) && !Number.isNaN(value)) { + return value; + } + throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); + }, "expectLong"); + expectShort = /* @__PURE__ */ __name((value) => expectSizedInt(value, 16), "expectShort"); + expectByte = /* @__PURE__ */ __name((value) => expectSizedInt(value, 8), "expectByte"); + expectSizedInt = /* @__PURE__ */ __name((value, size) => { + const expected = expectLong(value); + if (expected !== void 0 && castInt(expected, size) !== expected) { + throw new TypeError(`Expected ${size}-bit integer, got ${value}`); + } + return expected; + }, "expectSizedInt"); + castInt = /* @__PURE__ */ __name((value, size) => { + switch (size) { + case 32: + return Int32Array.of(value)[0]; + case 16: + return Int16Array.of(value)[0]; + case 8: + return Int8Array.of(value)[0]; + } + }, "castInt"); + strictParseFloat32 = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return expectFloat32(parseNumber(value)); + } + return expectFloat32(value); + }, "strictParseFloat32"); + NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; + parseNumber = /* @__PURE__ */ __name((value) => { + const matches = value.match(NUMBER_REGEX); + if (matches === null || matches[0].length !== value.length) { + throw new TypeError(`Expected real number, got implicit NaN`); + } + return parseFloat(value); + }, "parseNumber"); + strictParseShort = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectShort(parseNumber(value)); + } + return expectShort(value); + }, "strictParseShort"); + strictParseByte = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectByte(parseNumber(value)); + } + return expectByte(value); + }, "strictParseByte"); + stackTraceWarning = /* @__PURE__ */ __name((message2) => { + return String(new TypeError(message2).stack || message2).split("\n").slice(0, 5).filter((s2) => !s2.includes("stackTraceWarning")).join("\n"); + }, "stackTraceWarning"); + logger2 = { + warn: console.warn + }; + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js +function dateToUtcString(date6) { + const year3 = date6.getUTCFullYear(); + const month = date6.getUTCMonth(); + const dayOfWeek = date6.getUTCDay(); + const dayOfMonthInt = date6.getUTCDate(); + const hoursInt = date6.getUTCHours(); + const minutesInt = date6.getUTCMinutes(); + const secondsInt = date6.getUTCSeconds(); + const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`; + const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`; + const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`; + const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`; + return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year3} ${hoursString}:${minutesString}:${secondsString} GMT`; +} +var DAYS, MONTHS, RFC3339, RFC3339_WITH_OFFSET, IMF_FIXDATE, RFC_850_DATE, ASC_TIME, parseRfc7231DateTime, buildDate, parseTwoDigitYear, FIFTY_YEARS_IN_MILLIS, adjustRfc850Year, parseMonthByShortName, DAYS_IN_MONTH, validateDayOfMonth, isLeapYear, parseDateValue, parseMilliseconds, stripLeadingZeroes; +var init_date_utils = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_parse_utils(); + DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; + MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + __name(dateToUtcString, "dateToUtcString"); + RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); + RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/); + IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); + RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); + ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/); + parseRfc7231DateTime = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-7231 date-times must be expressed as strings"); + } + let match2 = IMF_FIXDATE.exec(value); + if (match2) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match2; + return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + match2 = RFC_850_DATE.exec(value); + if (match2) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match2; + return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { + hours, + minutes, + seconds, + fractionalMilliseconds + })); + } + match2 = ASC_TIME.exec(value); + if (match2) { + const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match2; + return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + throw new TypeError("Invalid RFC-7231 date-time value"); + }, "parseRfc7231DateTime"); + buildDate = /* @__PURE__ */ __name((year3, month, day2, time7) => { + const adjustedMonth = month - 1; + validateDayOfMonth(year3, adjustedMonth, day2); + return new Date(Date.UTC(year3, adjustedMonth, day2, parseDateValue(time7.hours, "hour", 0, 23), parseDateValue(time7.minutes, "minute", 0, 59), parseDateValue(time7.seconds, "seconds", 0, 60), parseMilliseconds(time7.fractionalMilliseconds))); + }, "buildDate"); + parseTwoDigitYear = /* @__PURE__ */ __name((value) => { + const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear(); + const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value)); + if (valueInThisCentury < thisYear) { + return valueInThisCentury + 100; + } + return valueInThisCentury; + }, "parseTwoDigitYear"); + FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3; + adjustRfc850Year = /* @__PURE__ */ __name((input) => { + if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) { + return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds())); + } + return input; + }, "adjustRfc850Year"); + parseMonthByShortName = /* @__PURE__ */ __name((value) => { + const monthIdx = MONTHS.indexOf(value); + if (monthIdx < 0) { + throw new TypeError(`Invalid month: ${value}`); + } + return monthIdx + 1; + }, "parseMonthByShortName"); + DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + validateDayOfMonth = /* @__PURE__ */ __name((year3, month, day2) => { + let maxDays = DAYS_IN_MONTH[month]; + if (month === 1 && isLeapYear(year3)) { + maxDays = 29; + } + if (day2 > maxDays) { + throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year3}: ${day2}`); + } + }, "validateDayOfMonth"); + isLeapYear = /* @__PURE__ */ __name((year3) => { + return year3 % 4 === 0 && (year3 % 100 !== 0 || year3 % 400 === 0); + }, "isLeapYear"); + parseDateValue = /* @__PURE__ */ __name((value, type, lower, upper) => { + const dateVal = strictParseByte(stripLeadingZeroes(value)); + if (dateVal < lower || dateVal > upper) { + throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`); + } + return dateVal; + }, "parseDateValue"); + parseMilliseconds = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return 0; + } + return strictParseFloat32("0." + value) * 1e3; + }, "parseMilliseconds"); + stripLeadingZeroes = /* @__PURE__ */ __name((value) => { + let idx = 0; + while (idx < value.length - 1 && value.charAt(idx) === "0") { + idx++; + } + if (idx === 0) { + return value; + } + return value.slice(idx); + }, "stripLeadingZeroes"); + } +}); + +// ../../node_modules/@smithy/uuid/dist-es/randomUUID.browser.js +var randomUUID; +var init_randomUUID_browser = __esm({ + "../../node_modules/@smithy/uuid/dist-es/randomUUID.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto); + } +}); + +// ../../node_modules/@smithy/uuid/dist-es/v4.js +var decimalToHex, v4; +var init_v4 = __esm({ + "../../node_modules/@smithy/uuid/dist-es/v4.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_randomUUID_browser(); + decimalToHex = Array.from({ length: 256 }, (_, i2) => i2.toString(16).padStart(2, "0")); + v4 = /* @__PURE__ */ __name(() => { + if (randomUUID) { + return randomUUID(); + } + const rnds = new Uint8Array(16); + crypto.getRandomValues(rnds); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + return decimalToHex[rnds[0]] + decimalToHex[rnds[1]] + decimalToHex[rnds[2]] + decimalToHex[rnds[3]] + "-" + decimalToHex[rnds[4]] + decimalToHex[rnds[5]] + "-" + decimalToHex[rnds[6]] + decimalToHex[rnds[7]] + "-" + decimalToHex[rnds[8]] + decimalToHex[rnds[9]] + "-" + decimalToHex[rnds[10]] + decimalToHex[rnds[11]] + decimalToHex[rnds[12]] + decimalToHex[rnds[13]] + decimalToHex[rnds[14]] + decimalToHex[rnds[15]]; + }, "v4"); + } +}); + +// ../../node_modules/@smithy/uuid/dist-es/index.js +var init_dist_es14 = __esm({ + "../../node_modules/@smithy/uuid/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_v4(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/generateIdempotencyToken.js +var init_generateIdempotencyToken = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/generateIdempotencyToken.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es14(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js +var LazyJsonString; +var init_lazy_json = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + LazyJsonString = /* @__PURE__ */ __name(function LazyJsonString2(val) { + const str = Object.assign(new String(val), { + deserializeJSON() { + return JSON.parse(String(val)); + }, + toString() { + return String(val); + }, + toJSON() { + return String(val); + } + }); + return str; + }, "LazyJsonString"); + LazyJsonString.from = (object2) => { + if (object2 && typeof object2 === "object" && (object2 instanceof LazyJsonString || "deserializeJSON" in object2)) { + return object2; + } else if (typeof object2 === "string" || Object.getPrototypeOf(object2) === String.prototype) { + return LazyJsonString(String(object2)); + } + return LazyJsonString(JSON.stringify(object2)); + }; + LazyJsonString.fromObject = LazyJsonString.from; + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js +function quoteHeader(part) { + if (part.includes(",") || part.includes('"')) { + part = `"${part.replace(/"/g, '\\"')}"`; + } + return part; +} +var init_quote_header = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(quoteHeader, "quoteHeader"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js +function range(v3, min, max2) { + const _v = Number(v3); + if (_v < min || _v > max2) { + throw new Error(`Value ${_v} out of range [${min}, ${max2}]`); + } +} +var ddd, mmm, time4, date, year2, RFC3339_WITH_OFFSET2, IMF_FIXDATE2, RFC_850_DATE2, ASC_TIME2, months, _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime; +var init_schema_date_utils = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`; + mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`; + time4 = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`; + date = `(\\d?\\d)`; + year2 = `(\\d{4})`; + RFC3339_WITH_OFFSET2 = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/); + IMF_FIXDATE2 = new RegExp(`^${ddd}, ${date} ${mmm} ${year2} ${time4} GMT$`); + RFC_850_DATE2 = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time4} GMT$`); + ASC_TIME2 = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time4} ${year2}$`); + months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + _parseEpochTimestamp = /* @__PURE__ */ __name((value) => { + if (value == null) { + return void 0; + } + let num = NaN; + if (typeof value === "number") { + num = value; + } else if (typeof value === "string") { + if (!/^-?\d*\.?\d+$/.test(value)) { + throw new TypeError(`parseEpochTimestamp - numeric string invalid.`); + } + num = Number.parseFloat(value); + } else if (typeof value === "object" && value.tag === 1) { + num = value.value; + } + if (isNaN(num) || Math.abs(num) === Infinity) { + throw new TypeError("Epoch timestamps must be valid finite numbers."); + } + return new Date(Math.round(num * 1e3)); + }, "_parseEpochTimestamp"); + _parseRfc3339DateTimeWithOffset = /* @__PURE__ */ __name((value) => { + if (value == null) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC3339 timestamps must be strings"); + } + const matches = RFC3339_WITH_OFFSET2.exec(value); + if (!matches) { + throw new TypeError(`Invalid RFC3339 timestamp format ${value}`); + } + const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches; + range(monthStr, 1, 12); + range(dayStr, 1, 31); + range(hours, 0, 23); + range(minutes, 0, 59); + range(seconds, 0, 60); + const date6 = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1e3) : 0)); + date6.setUTCFullYear(Number(yearStr)); + if (offsetStr.toUpperCase() != "Z") { + const [, sign3, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [void 0, "+", 0, 0]; + const scalar = sign3 === "-" ? 1 : -1; + date6.setTime(date6.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1e3 + Number(offsetM) * 60 * 1e3)); + } + return date6; + }, "_parseRfc3339DateTimeWithOffset"); + _parseRfc7231DateTime = /* @__PURE__ */ __name((value) => { + if (value == null) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC7231 timestamps must be strings."); + } + let day2; + let month; + let year3; + let hour2; + let minute2; + let second; + let fraction; + let matches; + if (matches = IMF_FIXDATE2.exec(value)) { + [, day2, month, year3, hour2, minute2, second, fraction] = matches; + } else if (matches = RFC_850_DATE2.exec(value)) { + [, day2, month, year3, hour2, minute2, second, fraction] = matches; + year3 = (Number(year3) + 1900).toString(); + } else if (matches = ASC_TIME2.exec(value)) { + [, month, day2, hour2, minute2, second, fraction, year3] = matches; + } + if (year3 && second) { + const timestamp = Date.UTC(Number(year3), months.indexOf(month), Number(day2), Number(hour2), Number(minute2), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1e3) : 0); + range(day2, 1, 31); + range(hour2, 0, 23); + range(minute2, 0, 59); + range(second, 0, 60); + const date6 = new Date(timestamp); + date6.setUTCFullYear(Number(year3)); + return date6; + } + throw new TypeError(`Invalid RFC7231 date-time value ${value}.`); + }, "_parseRfc7231DateTime"); + __name(range, "range"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/split-every.js +function splitEvery(value, delimiter, numDelimiters) { + if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { + throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); + } + const segments = value.split(delimiter); + if (numDelimiters === 1) { + return segments; + } + const compoundSegments = []; + let currentSegment = ""; + for (let i2 = 0; i2 < segments.length; i2++) { + if (currentSegment === "") { + currentSegment = segments[i2]; + } else { + currentSegment += delimiter + segments[i2]; + } + if ((i2 + 1) % numDelimiters === 0) { + compoundSegments.push(currentSegment); + currentSegment = ""; + } + } + if (currentSegment !== "") { + compoundSegments.push(currentSegment); + } + return compoundSegments; +} +var init_split_every = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/split-every.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(splitEvery, "splitEvery"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js +var splitHeader; +var init_split_header = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + splitHeader = /* @__PURE__ */ __name((value) => { + const z3 = value.length; + const values = []; + let withinQuotes = false; + let prevChar = void 0; + let anchor = 0; + for (let i2 = 0; i2 < z3; ++i2) { + const char = value[i2]; + switch (char) { + case `"`: + if (prevChar !== "\\") { + withinQuotes = !withinQuotes; + } + break; + case ",": + if (!withinQuotes) { + values.push(value.slice(anchor, i2)); + anchor = i2 + 1; + } + break; + default: + } + prevChar = char; + } + values.push(value.slice(anchor)); + return values.map((v3) => { + v3 = v3.trim(); + const z4 = v3.length; + if (z4 < 2) { + return v3; + } + if (v3[0] === `"` && v3[z4 - 1] === `"`) { + v3 = v3.slice(1, z4 - 1); + } + return v3.replace(/\\"/g, '"'); + }); + }, "splitHeader"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +var format, NumericValue; +var init_NumericValue = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + format = /^-?\d*(\.\d+)?$/; + NumericValue = class { + string; + type; + constructor(string4, type) { + this.string = string4; + this.type = type; + if (!format.test(string4)) { + throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`); + } + } + toString() { + return this.string; + } + static [Symbol.hasInstance](object2) { + if (!object2 || typeof object2 !== "object") { + return false; + } + const _nv = object2; + return NumericValue.prototype.isPrototypeOf(object2) || _nv.type === "bigDecimal" && format.test(_nv.string); + } + }; + __name(NumericValue, "NumericValue"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/index.js +var init_serde2 = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_copyDocumentWithTransform(); + init_date_utils(); + init_generateIdempotencyToken(); + init_lazy_json(); + init_parse_utils(); + init_quote_header(); + init_schema_date_utils(); + init_split_every(); + init_split_header(); + init_NumericValue(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js +var SerdeContext; +var init_SerdeContext = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SerdeContext = class { + serdeContext; + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + }; + __name(SerdeContext, "SerdeContext"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +var EventStreamSerde; +var init_EventStreamSerde = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es5(); + EventStreamSerde = class { + marshaller; + serializer; + deserializer; + serdeContext; + defaultContentType; + constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType }) { + this.marshaller = marshaller; + this.serializer = serializer; + this.deserializer = deserializer; + this.serdeContext = serdeContext; + this.defaultContentType = defaultContentType; + } + async serializeEventStream({ eventStream, requestSchema, initialRequest }) { + const marshaller = this.marshaller; + const eventStreamMember = requestSchema.getEventStreamMember(); + const unionSchema = requestSchema.getMemberSchema(eventStreamMember); + const serializer = this.serializer; + const defaultContentType = this.defaultContentType; + const initialRequestMarker = Symbol("initialRequestMarker"); + const eventStreamIterable = { + async *[Symbol.asyncIterator]() { + if (initialRequest) { + const headers = { + ":event-type": { type: "string", value: "initial-request" }, + ":message-type": { type: "string", value: "event" }, + ":content-type": { type: "string", value: defaultContentType } + }; + serializer.write(requestSchema, initialRequest); + const body = serializer.flush(); + yield { + [initialRequestMarker]: true, + headers, + body + }; + } + for await (const page of eventStream) { + yield page; + } + } + }; + return marshaller.serialize(eventStreamIterable, (event) => { + if (event[initialRequestMarker]) { + return { + headers: event.headers, + body: event.body + }; + } + const unionMember = Object.keys(event).find((key) => { + return key !== "__type"; + }) ?? ""; + const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event); + const headers = { + ":event-type": { type: "string", value: eventType }, + ":message-type": { type: "string", value: "event" }, + ":content-type": { type: "string", value: explicitPayloadContentType ?? defaultContentType }, + ...additionalHeaders + }; + return { + headers, + body + }; + }); + } + async deserializeEventStream({ response, responseSchema, initialResponseContainer }) { + const marshaller = this.marshaller; + const eventStreamMember = responseSchema.getEventStreamMember(); + const unionSchema = responseSchema.getMemberSchema(eventStreamMember); + const memberSchemas = unionSchema.getMemberSchemas(); + const initialResponseMarker = Symbol("initialResponseMarker"); + const asyncIterable = marshaller.deserialize(response.body, async (event) => { + const unionMember = Object.keys(event).find((key) => { + return key !== "__type"; + }) ?? ""; + const body = event[unionMember].body; + if (unionMember === "initial-response") { + const dataObject = await this.deserializer.read(responseSchema, body); + delete dataObject[eventStreamMember]; + return { + [initialResponseMarker]: true, + ...dataObject + }; + } else if (unionMember in memberSchemas) { + const eventStreamSchema = memberSchemas[unionMember]; + if (eventStreamSchema.isStructSchema()) { + const out = {}; + let hasBindings = false; + for (const [name, member2] of eventStreamSchema.structIterator()) { + const { eventHeader, eventPayload } = member2.getMergedTraits(); + hasBindings = hasBindings || Boolean(eventHeader || eventPayload); + if (eventPayload) { + if (member2.isBlobSchema()) { + out[name] = body; + } else if (member2.isStringSchema()) { + out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body); + } else if (member2.isStructSchema()) { + out[name] = await this.deserializer.read(member2, body); + } + } else if (eventHeader) { + const value = event[unionMember].headers[name]?.value; + if (value != null) { + if (member2.isNumericSchema()) { + if (value && typeof value === "object" && "bytes" in value) { + out[name] = BigInt(value.toString()); + } else { + out[name] = Number(value); + } + } else { + out[name] = value; + } + } + } + } + if (hasBindings) { + return { + [unionMember]: out + }; + } + if (body.byteLength === 0) { + return { + [unionMember]: {} + }; + } + } + return { + [unionMember]: await this.deserializer.read(eventStreamSchema, body) + }; + } else { + return { + $unknown: event + }; + } + }); + const asyncIterator = asyncIterable[Symbol.asyncIterator](); + const firstEvent = await asyncIterator.next(); + if (firstEvent.done) { + return asyncIterable; + } + if (firstEvent.value?.[initialResponseMarker]) { + if (!responseSchema) { + throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given."); + } + for (const [key, value] of Object.entries(firstEvent.value)) { + initialResponseContainer[key] = value; + } + } + return { + async *[Symbol.asyncIterator]() { + if (!firstEvent?.value?.[initialResponseMarker]) { + yield firstEvent.value; + } + while (true) { + const { done, value } = await asyncIterator.next(); + if (done) { + break; + } + yield value; + } + } + }; + } + writeEventBody(unionMember, unionSchema, event) { + const serializer = this.serializer; + let eventType = unionMember; + let explicitPayloadMember = null; + let explicitPayloadContentType; + const isKnownSchema = (() => { + const struct = unionSchema.getSchema(); + return struct[4].includes(unionMember); + })(); + const additionalHeaders = {}; + if (!isKnownSchema) { + const [type, value] = event[unionMember]; + eventType = type; + serializer.write(15, value); + } else { + const eventSchema = unionSchema.getMemberSchema(unionMember); + if (eventSchema.isStructSchema()) { + for (const [memberName, memberSchema] of eventSchema.structIterator()) { + const { eventHeader, eventPayload } = memberSchema.getMergedTraits(); + if (eventPayload) { + explicitPayloadMember = memberName; + } else if (eventHeader) { + const value = event[unionMember][memberName]; + let type = "binary"; + if (memberSchema.isNumericSchema()) { + if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) { + type = "integer"; + } else { + type = "long"; + } + } else if (memberSchema.isTimestampSchema()) { + type = "timestamp"; + } else if (memberSchema.isStringSchema()) { + type = "string"; + } else if (memberSchema.isBooleanSchema()) { + type = "boolean"; + } + if (value != null) { + additionalHeaders[memberName] = { + type, + value + }; + delete event[unionMember][memberName]; + } + } + } + if (explicitPayloadMember !== null) { + const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember); + if (payloadSchema.isBlobSchema()) { + explicitPayloadContentType = "application/octet-stream"; + } else if (payloadSchema.isStringSchema()) { + explicitPayloadContentType = "text/plain"; + } + serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]); + } else { + serializer.write(eventSchema, event[unionMember]); + } + } else if (eventSchema.isUnitSchema()) { + serializer.write(eventSchema, {}); + } else { + throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union."); + } + } + const messageSerialization = serializer.flush() ?? new Uint8Array(); + const body = typeof messageSerialization === "string" ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization) : messageSerialization; + return { + body, + eventType, + explicitPayloadContentType, + additionalHeaders + }; + } + }; + __name(EventStreamSerde, "EventStreamSerde"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/event-streams/index.js +var event_streams_exports = {}; +__export(event_streams_exports, { + EventStreamSerde: () => EventStreamSerde +}); +var init_event_streams = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/event-streams/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamSerde(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +var HttpProtocol; +var init_HttpProtocol = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_dist_es2(); + init_SerdeContext(); + HttpProtocol = class extends SerdeContext { + options; + compositeErrorRegistry; + constructor(options) { + super(); + this.options = options; + this.compositeErrorRegistry = TypeRegistry.for(options.defaultNamespace); + for (const etr of options.errorTypeRegistries ?? []) { + this.compositeErrorRegistry.copyFrom(etr); + } + } + getRequestType() { + return HttpRequest; + } + getResponseType() { + return HttpResponse; + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + this.serializer.setSerdeContext(serdeContext); + this.deserializer.setSerdeContext(serdeContext); + if (this.getPayloadCodec()) { + this.getPayloadCodec().setSerdeContext(serdeContext); + } + } + updateServiceEndpoint(request, endpoint) { + if ("url" in endpoint) { + request.protocol = endpoint.url.protocol; + request.hostname = endpoint.url.hostname; + request.port = endpoint.url.port ? Number(endpoint.url.port) : void 0; + request.path = endpoint.url.pathname; + request.fragment = endpoint.url.hash || void 0; + request.username = endpoint.url.username || void 0; + request.password = endpoint.url.password || void 0; + if (!request.query) { + request.query = {}; + } + for (const [k2, v3] of endpoint.url.searchParams.entries()) { + request.query[k2] = v3; + } + if (endpoint.headers) { + for (const [name, values] of Object.entries(endpoint.headers)) { + request.headers[name] = values.join(", "); + } + } + return request; + } else { + request.protocol = endpoint.protocol; + request.hostname = endpoint.hostname; + request.port = endpoint.port ? Number(endpoint.port) : void 0; + request.path = endpoint.path; + request.query = { + ...endpoint.query + }; + if (endpoint.headers) { + for (const [name, value] of Object.entries(endpoint.headers)) { + request.headers[name] = value; + } + } + return request; + } + } + setHostPrefix(request, operationSchema, input) { + if (this.serdeContext?.disableHostPrefix) { + return; + } + const inputNs = NormalizedSchema.of(operationSchema.input); + const opTraits = translateTraits(operationSchema.traits ?? {}); + if (opTraits.endpoint) { + let hostPrefix = opTraits.endpoint?.[0]; + if (typeof hostPrefix === "string") { + const hostLabelInputs = [...inputNs.structIterator()].filter(([, member2]) => member2.getMergedTraits().hostLabel); + for (const [name] of hostLabelInputs) { + const replacement = input[name]; + if (typeof replacement !== "string") { + throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`); + } + hostPrefix = hostPrefix.replace(`{${name}}`, replacement); + } + request.hostname = hostPrefix + request.hostname; + } + } + } + deserializeMetadata(output) { + return { + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }; + } + async serializeEventStream({ eventStream, requestSchema, initialRequest }) { + const eventStreamSerde = await this.loadEventStreamCapability(); + return eventStreamSerde.serializeEventStream({ + eventStream, + requestSchema, + initialRequest + }); + } + async deserializeEventStream({ response, responseSchema, initialResponseContainer }) { + const eventStreamSerde = await this.loadEventStreamCapability(); + return eventStreamSerde.deserializeEventStream({ + response, + responseSchema, + initialResponseContainer + }); + } + async loadEventStreamCapability() { + const { EventStreamSerde: EventStreamSerde2 } = await Promise.resolve().then(() => (init_event_streams(), event_streams_exports)); + return new EventStreamSerde2({ + marshaller: this.getEventStreamMarshaller(), + serializer: this.serializer, + deserializer: this.deserializer, + serdeContext: this.serdeContext, + defaultContentType: this.getDefaultContentType() + }); + } + getDefaultContentType() { + throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`); + } + async deserializeHttpMessage(schema, context2, response, arg4, arg5) { + return []; + } + getEventStreamMarshaller() { + const context2 = this.serdeContext; + if (!context2.eventStreamMarshaller) { + throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext."); + } + return context2.eventStreamMarshaller; + } + }; + __name(HttpProtocol, "HttpProtocol"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +var HttpBindingProtocol; +var init_HttpBindingProtocol = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_serde2(); + init_dist_es2(); + init_dist_es11(); + init_collect_stream_body(); + init_extended_encode_uri_component(); + init_HttpProtocol(); + HttpBindingProtocol = class extends HttpProtocol { + async serializeRequest(operationSchema, _input, context2) { + const input = { + ..._input ?? {} + }; + const serializer = this.serializer; + const query = {}; + const headers = {}; + const endpoint = await context2.endpoint(); + const ns = NormalizedSchema.of(operationSchema?.input); + const payloadMemberNames = []; + const payloadMemberSchemas = []; + let hasNonHttpBindingMember = false; + let payload; + const request = new HttpRequest({ + protocol: "", + hostname: "", + port: void 0, + path: "", + fragment: void 0, + query, + headers, + body: void 0 + }); + if (endpoint) { + this.updateServiceEndpoint(request, endpoint); + this.setHostPrefix(request, operationSchema, input); + const opTraits = translateTraits(operationSchema.traits); + if (opTraits.http) { + request.method = opTraits.http[0]; + const [path, search] = opTraits.http[1].split("?"); + if (request.path == "/") { + request.path = path; + } else { + request.path += path; + } + const traitSearchParams = new URLSearchParams(search ?? ""); + Object.assign(query, Object.fromEntries(traitSearchParams)); + } + } + for (const [memberName, memberNs] of ns.structIterator()) { + const memberTraits = memberNs.getMergedTraits() ?? {}; + const inputMemberValue = input[memberName]; + if (inputMemberValue == null && !memberNs.isIdempotencyToken()) { + if (memberTraits.httpLabel) { + if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) { + throw new Error(`No value provided for input HTTP label: ${memberName}.`); + } + } + continue; + } + if (memberTraits.httpPayload) { + const isStreaming2 = memberNs.isStreaming(); + if (isStreaming2) { + const isEventStream = memberNs.isStructSchema(); + if (isEventStream) { + if (input[memberName]) { + payload = await this.serializeEventStream({ + eventStream: input[memberName], + requestSchema: ns + }); + } + } else { + payload = inputMemberValue; + } + } else { + serializer.write(memberNs, inputMemberValue); + payload = serializer.flush(); + } + delete input[memberName]; + } else if (memberTraits.httpLabel) { + serializer.write(memberNs, inputMemberValue); + const replacement = serializer.flush(); + if (request.path.includes(`{${memberName}+}`)) { + request.path = request.path.replace(`{${memberName}+}`, replacement.split("/").map(extendedEncodeURIComponent).join("/")); + } else if (request.path.includes(`{${memberName}}`)) { + request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement)); + } + delete input[memberName]; + } else if (memberTraits.httpHeader) { + serializer.write(memberNs, inputMemberValue); + headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush()); + delete input[memberName]; + } else if (typeof memberTraits.httpPrefixHeaders === "string") { + for (const [key, val] of Object.entries(inputMemberValue)) { + const amalgam = memberTraits.httpPrefixHeaders + key; + serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val); + headers[amalgam.toLowerCase()] = serializer.flush(); + } + delete input[memberName]; + } else if (memberTraits.httpQuery || memberTraits.httpQueryParams) { + this.serializeQuery(memberNs, inputMemberValue, query); + delete input[memberName]; + } else { + hasNonHttpBindingMember = true; + payloadMemberNames.push(memberName); + payloadMemberSchemas.push(memberNs); + } + } + if (hasNonHttpBindingMember && input) { + const [namespace, name] = (ns.getName(true) ?? "#Unknown").split("#"); + const requiredMembers = ns.getSchema()[6]; + const payloadSchema = [ + 3, + namespace, + name, + ns.getMergedTraits(), + payloadMemberNames, + payloadMemberSchemas, + void 0 + ]; + if (requiredMembers) { + payloadSchema[6] = requiredMembers; + } else { + payloadSchema.pop(); + } + serializer.write(payloadSchema, input); + payload = serializer.flush(); + } + request.headers = headers; + request.query = query; + request.body = payload; + return request; + } + serializeQuery(ns, data, query) { + const serializer = this.serializer; + const traits = ns.getMergedTraits(); + if (traits.httpQueryParams) { + for (const [key, val] of Object.entries(data)) { + if (!(key in query)) { + const valueSchema = ns.getValueSchema(); + Object.assign(valueSchema.getMergedTraits(), { + ...traits, + httpQuery: key, + httpQueryParams: void 0 + }); + this.serializeQuery(valueSchema, val, query); + } + } + return; + } + if (ns.isListSchema()) { + const sparse = !!ns.getMergedTraits().sparse; + const buffer = []; + for (const item of data) { + serializer.write([ns.getValueSchema(), traits], item); + const serializable = serializer.flush(); + if (sparse || serializable !== void 0) { + buffer.push(serializable); + } + } + query[traits.httpQuery] = buffer; + } else { + serializer.write([ns, traits], data); + query[traits.httpQuery] = serializer.flush(); + } + } + async deserializeResponse(operationSchema, context2, response) { + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(operationSchema.output); + const dataObject = {}; + if (response.statusCode >= 300) { + const bytes = await collectBody(response.body, context2); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(15, bytes)); + } + await this.handleError(operationSchema, context2, response, dataObject, this.deserializeMetadata(response)); + throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw."); + } + for (const header in response.headers) { + const value = response.headers[header]; + delete response.headers[header]; + response.headers[header.toLowerCase()] = value; + } + const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context2, response, dataObject); + if (nonHttpBindingMembers.length) { + const bytes = await collectBody(response.body, context2); + if (bytes.byteLength > 0) { + const dataFromBody = await deserializer.read(ns, bytes); + for (const member2 of nonHttpBindingMembers) { + if (dataFromBody[member2] != null) { + dataObject[member2] = dataFromBody[member2]; + } + } + } + } else if (nonHttpBindingMembers.discardResponseBody) { + await collectBody(response.body, context2); + } + dataObject.$metadata = this.deserializeMetadata(response); + return dataObject; + } + async deserializeHttpMessage(schema, context2, response, arg4, arg5) { + let dataObject; + if (arg4 instanceof Set) { + dataObject = arg5; + } else { + dataObject = arg4; + } + let discardResponseBody = true; + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(schema); + const nonHttpBindingMembers = []; + for (const [memberName, memberSchema] of ns.structIterator()) { + const memberTraits = memberSchema.getMemberTraits(); + if (memberTraits.httpPayload) { + discardResponseBody = false; + const isStreaming2 = memberSchema.isStreaming(); + if (isStreaming2) { + const isEventStream = memberSchema.isStructSchema(); + if (isEventStream) { + dataObject[memberName] = await this.deserializeEventStream({ + response, + responseSchema: ns + }); + } else { + dataObject[memberName] = sdkStreamMixin(response.body); + } + } else if (response.body) { + const bytes = await collectBody(response.body, context2); + if (bytes.byteLength > 0) { + dataObject[memberName] = await deserializer.read(memberSchema, bytes); + } + } + } else if (memberTraits.httpHeader) { + const key = String(memberTraits.httpHeader).toLowerCase(); + const value = response.headers[key]; + if (null != value) { + if (memberSchema.isListSchema()) { + const headerListValueSchema = memberSchema.getValueSchema(); + headerListValueSchema.getMergedTraits().httpHeader = key; + let sections; + if (headerListValueSchema.isTimestampSchema() && headerListValueSchema.getSchema() === 4) { + sections = splitEvery(value, ",", 2); + } else { + sections = splitHeader(value); + } + const list = []; + for (const section of sections) { + list.push(await deserializer.read(headerListValueSchema, section.trim())); + } + dataObject[memberName] = list; + } else { + dataObject[memberName] = await deserializer.read(memberSchema, value); + } + } + } else if (memberTraits.httpPrefixHeaders !== void 0) { + dataObject[memberName] = {}; + for (const [header, value] of Object.entries(response.headers)) { + if (header.startsWith(memberTraits.httpPrefixHeaders)) { + const valueSchema = memberSchema.getValueSchema(); + valueSchema.getMergedTraits().httpHeader = header; + dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value); + } + } + } else if (memberTraits.httpResponseCode) { + dataObject[memberName] = response.statusCode; + } else { + nonHttpBindingMembers.push(memberName); + } + } + nonHttpBindingMembers.discardResponseBody = discardResponseBody; + return nonHttpBindingMembers; + } + }; + __name(HttpBindingProtocol, "HttpBindingProtocol"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +var init_RpcProtocol = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js +var init_resolve_path = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js +var init_requestBuilder = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js +function determineTimestampFormat(ns, settings) { + if (settings.timestampFormat.useTrait) { + if (ns.isTimestampSchema() && (ns.getSchema() === 5 || ns.getSchema() === 6 || ns.getSchema() === 7)) { + return ns.getSchema(); + } + } + const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits(); + const bindingFormat = settings.httpBindings ? typeof httpPrefixHeaders === "string" || Boolean(httpHeader) ? 6 : Boolean(httpQuery) || Boolean(httpLabel) ? 5 : void 0 : void 0; + return bindingFormat ?? settings.timestampFormat.default; +} +var init_determineTimestampFormat = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(determineTimestampFormat, "determineTimestampFormat"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +var FromStringShapeDeserializer; +var init_FromStringShapeDeserializer = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_serde2(); + init_dist_es6(); + init_dist_es5(); + init_SerdeContext(); + init_determineTimestampFormat(); + FromStringShapeDeserializer = class extends SerdeContext { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + read(_schema, data) { + const ns = NormalizedSchema.of(_schema); + if (ns.isListSchema()) { + return splitHeader(data).map((item) => this.read(ns.getValueSchema(), item)); + } + if (ns.isBlobSchema()) { + return (this.serdeContext?.base64Decoder ?? fromBase64)(data); + } + if (ns.isTimestampSchema()) { + const format2 = determineTimestampFormat(ns, this.settings); + switch (format2) { + case 5: + return _parseRfc3339DateTimeWithOffset(data); + case 6: + return _parseRfc7231DateTime(data); + case 7: + return _parseEpochTimestamp(data); + default: + console.warn("Missing timestamp format, parsing value with Date constructor:", data); + return new Date(data); + } + } + if (ns.isStringSchema()) { + const mediaType = ns.getMergedTraits().mediaType; + let intermediateValue = data; + if (mediaType) { + if (ns.getMergedTraits().httpHeader) { + intermediateValue = this.base64ToUtf8(intermediateValue); + } + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + intermediateValue = LazyJsonString.from(intermediateValue); + } + return intermediateValue; + } + } + if (ns.isNumericSchema()) { + return Number(data); + } + if (ns.isBigIntegerSchema()) { + return BigInt(data); + } + if (ns.isBigDecimalSchema()) { + return new NumericValue(data, "bigDecimal"); + } + if (ns.isBooleanSchema()) { + return String(data).toLowerCase() === "true"; + } + return data; + } + base64ToUtf8(base64String) { + return (this.serdeContext?.utf8Encoder ?? toUtf8)((this.serdeContext?.base64Decoder ?? fromBase64)(base64String)); + } + }; + __name(FromStringShapeDeserializer, "FromStringShapeDeserializer"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js +var HttpInterceptingShapeDeserializer; +var init_HttpInterceptingShapeDeserializer = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_dist_es5(); + init_SerdeContext(); + init_FromStringShapeDeserializer(); + HttpInterceptingShapeDeserializer = class extends SerdeContext { + codecDeserializer; + stringDeserializer; + constructor(codecDeserializer, codecSettings) { + super(); + this.codecDeserializer = codecDeserializer; + this.stringDeserializer = new FromStringShapeDeserializer(codecSettings); + } + setSerdeContext(serdeContext) { + this.stringDeserializer.setSerdeContext(serdeContext); + this.codecDeserializer.setSerdeContext(serdeContext); + this.serdeContext = serdeContext; + } + read(schema, data) { + const ns = NormalizedSchema.of(schema); + const traits = ns.getMergedTraits(); + const toString3 = this.serdeContext?.utf8Encoder ?? toUtf8; + if (traits.httpHeader || traits.httpResponseCode) { + return this.stringDeserializer.read(ns, toString3(data)); + } + if (traits.httpPayload) { + if (ns.isBlobSchema()) { + const toBytes = this.serdeContext?.utf8Decoder ?? fromUtf8; + if (typeof data === "string") { + return toBytes(data); + } + return data; + } else if (ns.isStringSchema()) { + if ("byteLength" in data) { + return toString3(data); + } + return data; + } + } + return this.codecDeserializer.read(ns, data); + } + }; + __name(HttpInterceptingShapeDeserializer, "HttpInterceptingShapeDeserializer"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +var ToStringShapeSerializer; +var init_ToStringShapeSerializer = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_serde2(); + init_dist_es6(); + init_SerdeContext(); + init_determineTimestampFormat(); + ToStringShapeSerializer = class extends SerdeContext { + settings; + stringBuffer = ""; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + switch (typeof value) { + case "object": + if (value === null) { + this.stringBuffer = "null"; + return; + } + if (ns.isTimestampSchema()) { + if (!(value instanceof Date)) { + throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`); + } + const format2 = determineTimestampFormat(ns, this.settings); + switch (format2) { + case 5: + this.stringBuffer = value.toISOString().replace(".000Z", "Z"); + break; + case 6: + this.stringBuffer = dateToUtcString(value); + break; + case 7: + this.stringBuffer = String(value.getTime() / 1e3); + break; + default: + console.warn("Missing timestamp format, using epoch seconds", value); + this.stringBuffer = String(value.getTime() / 1e3); + } + return; + } + if (ns.isBlobSchema() && "byteLength" in value) { + this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(value); + return; + } + if (ns.isListSchema() && Array.isArray(value)) { + let buffer = ""; + for (const item of value) { + this.write([ns.getValueSchema(), ns.getMergedTraits()], item); + const headerItem = this.flush(); + const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : quoteHeader(headerItem); + if (buffer !== "") { + buffer += ", "; + } + buffer += serialized; + } + this.stringBuffer = buffer; + return; + } + this.stringBuffer = JSON.stringify(value, null, 2); + break; + case "string": + const mediaType = ns.getMergedTraits().mediaType; + let intermediateValue = value; + if (mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + intermediateValue = LazyJsonString.from(intermediateValue); + } + if (ns.getMergedTraits().httpHeader) { + this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(intermediateValue.toString()); + return; + } + } + this.stringBuffer = value; + break; + default: + if (ns.isIdempotencyToken()) { + this.stringBuffer = v4(); + } else { + this.stringBuffer = String(value); + } + } + } + flush() { + const buffer = this.stringBuffer; + this.stringBuffer = ""; + return buffer; + } + }; + __name(ToStringShapeSerializer, "ToStringShapeSerializer"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js +var HttpInterceptingShapeSerializer; +var init_HttpInterceptingShapeSerializer = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_ToStringShapeSerializer(); + HttpInterceptingShapeSerializer = class { + codecSerializer; + stringSerializer; + buffer; + constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) { + this.codecSerializer = codecSerializer; + this.stringSerializer = stringSerializer; + } + setSerdeContext(serdeContext) { + this.codecSerializer.setSerdeContext(serdeContext); + this.stringSerializer.setSerdeContext(serdeContext); + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + const traits = ns.getMergedTraits(); + if (traits.httpHeader || traits.httpLabel || traits.httpQuery) { + this.stringSerializer.write(ns, value); + this.buffer = this.stringSerializer.flush(); + return; + } + return this.codecSerializer.write(ns, value); + } + flush() { + if (this.buffer !== void 0) { + const buffer = this.buffer; + this.buffer = void 0; + return buffer; + } + return this.codecSerializer.flush(); + } + }; + __name(HttpInterceptingShapeSerializer, "HttpInterceptingShapeSerializer"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/index.js +var init_protocols = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_collect_stream_body(); + init_extended_encode_uri_component(); + init_HttpBindingProtocol(); + init_HttpProtocol(); + init_RpcProtocol(); + init_requestBuilder(); + init_resolve_path(); + init_FromStringShapeDeserializer(); + init_HttpInterceptingShapeDeserializer(); + init_HttpInterceptingShapeSerializer(); + init_ToStringShapeSerializer(); + init_determineTimestampFormat(); + init_SerdeContext(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js +var init_requestBuilder2 = __esm({ + "../../node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/setFeature.js +function setFeature2(context2, feature2, value) { + if (!context2.__smithy_context) { + context2.__smithy_context = { + features: {} + }; + } else if (!context2.__smithy_context.features) { + context2.__smithy_context.features = {}; + } + context2.__smithy_context.features[feature2] = value; +} +var init_setFeature2 = __esm({ + "../../node_modules/@smithy/core/dist-es/setFeature.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(setFeature2, "setFeature"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +var DefaultIdentityProviderConfig; +var init_DefaultIdentityProviderConfig = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + DefaultIdentityProviderConfig = class { + authSchemes = /* @__PURE__ */ new Map(); + constructor(config3) { + for (const [key, value] of Object.entries(config3)) { + if (value !== void 0) { + this.authSchemes.set(key, value); + } + } + } + getIdentityProvider(schemeId) { + return this.authSchemes.get(schemeId); + } + }; + __name(DefaultIdentityProviderConfig, "DefaultIdentityProviderConfig"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +var init_httpApiKeyAuth = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +var init_httpBearerAuth = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js +var init_noAuth = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js +var init_httpAuthSchemes = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpApiKeyAuth(); + init_httpBearerAuth(); + init_noAuth(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js +var createIsIdentityExpiredFunction, EXPIRATION_MS, isIdentityExpired, doesIdentityRequireRefresh, memoizeIdentityProvider; +var init_memoizeIdentityProvider = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + createIsIdentityExpiredFunction = /* @__PURE__ */ __name((expirationMs) => /* @__PURE__ */ __name(function isIdentityExpired2(identity2) { + return doesIdentityRequireRefresh(identity2) && identity2.expiration.getTime() - Date.now() < expirationMs; + }, "isIdentityExpired"), "createIsIdentityExpiredFunction"); + EXPIRATION_MS = 3e5; + isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); + doesIdentityRequireRefresh = /* @__PURE__ */ __name((identity2) => identity2.expiration !== void 0, "doesIdentityRequireRefresh"); + memoizeIdentityProvider = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { + if (provider === void 0) { + return void 0; + } + const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider; + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = /* @__PURE__ */ __name(async (options) => { + if (!pending) { + pending = normalizedProvider(options); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; + } + return resolved; + }, "coalesceProvider"); + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(options); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(options); + } + if (isConstant) { + return resolved; + } + if (!requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(options); + return resolved; + } + return resolved; + }; + }, "memoizeIdentityProvider"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js +var init_util_identity_and_auth = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_DefaultIdentityProviderConfig(); + init_httpAuthSchemes(); + init_memoizeIdentityProvider(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/index.js +var init_dist_es15 = __esm({ + "../../node_modules/@smithy/core/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getSmithyContext(); + init_middleware_http_auth_scheme(); + init_middleware_http_signing(); + init_normalizeProvider2(); + init_createPaginator(); + init_requestBuilder2(); + init_setFeature2(); + init_util_identity_and_auth(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/ProviderError.js +var init_ProviderError = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/ProviderError.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js +var init_CredentialsProviderError = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/TokenProviderError.js +var init_TokenProviderError = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/TokenProviderError.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/chain.js +var init_chain = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/chain.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/fromStatic.js +var init_fromStatic = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/fromStatic.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/memoize.js +var memoize; +var init_memoize = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/memoize.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = /* @__PURE__ */ __name(async () => { + if (!pending) { + pending = provider(); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; + } + return resolved; + }, "coalesceProvider"); + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + if (isConstant) { + return resolved; + } + if (requiresRefresh && !requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(); + return resolved; + } + return resolved; + }; + }, "memoize"); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/index.js +var init_dist_es16 = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_CredentialsProviderError(); + init_ProviderError(); + init_TokenProviderError(); + init_chain(); + init_fromStatic(); + init_memoize(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js +var resolveAwsSdkSigV4AConfig; +var init_resolveAwsSdkSigV4AConfig = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + resolveAwsSdkSigV4AConfig = /* @__PURE__ */ __name((config3) => { + config3.sigv4aSigningRegionSet = normalizeProvider2(config3.sigv4aSigningRegionSet); + return config3; + }, "resolveAwsSdkSigV4AConfig"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/constants.js +var ALGORITHM_QUERY_PARAM, CREDENTIAL_QUERY_PARAM, AMZ_DATE_QUERY_PARAM, SIGNED_HEADERS_QUERY_PARAM, EXPIRES_QUERY_PARAM, SIGNATURE_QUERY_PARAM, TOKEN_QUERY_PARAM, AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER, GENERATED_HEADERS, SIGNATURE_HEADER, SHA256_HEADER, TOKEN_HEADER, ALWAYS_UNSIGNABLE_HEADERS, PROXY_HEADER_PATTERN, SEC_HEADER_PATTERN, ALGORITHM_IDENTIFIER, EVENT_ALGORITHM_IDENTIFIER, UNSIGNED_PAYLOAD, MAX_CACHE_SIZE, KEY_TYPE_IDENTIFIER, MAX_PRESIGNED_TTL; +var init_constants4 = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; + CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; + AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; + SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; + EXPIRES_QUERY_PARAM = "X-Amz-Expires"; + SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; + TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; + AUTH_HEADER = "authorization"; + AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); + DATE_HEADER = "date"; + GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; + SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); + SHA256_HEADER = "x-amz-content-sha256"; + TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); + ALWAYS_UNSIGNABLE_HEADERS = { + authorization: true, + "cache-control": true, + connection: true, + expect: true, + from: true, + "keep-alive": true, + "max-forwards": true, + pragma: true, + referer: true, + te: true, + trailer: true, + "transfer-encoding": true, + upgrade: true, + "user-agent": true, + "x-amzn-trace-id": true + }; + PROXY_HEADER_PATTERN = /^proxy-/; + SEC_HEADER_PATTERN = /^sec-/; + ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; + EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; + UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; + MAX_CACHE_SIZE = 50; + KEY_TYPE_IDENTIFIER = "aws4_request"; + MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js +var signingKeyCache, cacheQueue, createScope, getSigningKey, hmac; +var init_credentialDerivation = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + init_dist_es5(); + init_constants4(); + signingKeyCache = {}; + cacheQueue = []; + createScope = /* @__PURE__ */ __name((shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, "createScope"); + getSigningKey = /* @__PURE__ */ __name(async (sha256Constructor, credentials, shortDate, region, service) => { + const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); + const cacheKey = `${shortDate}:${region}:${service}:${toHex(credsHash)}:${credentials.sessionToken}`; + if (cacheKey in signingKeyCache) { + return signingKeyCache[cacheKey]; + } + cacheQueue.push(cacheKey); + while (cacheQueue.length > MAX_CACHE_SIZE) { + delete signingKeyCache[cacheQueue.shift()]; + } + let key = `AWS4${credentials.secretAccessKey}`; + for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { + key = await hmac(sha256Constructor, key, signable); + } + return signingKeyCache[cacheKey] = key; + }, "getSigningKey"); + hmac = /* @__PURE__ */ __name((ctor, secret, data) => { + const hash4 = new ctor(secret); + hash4.update(toUint8Array(data)); + return hash4.digest(); + }, "hmac"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +var getCanonicalHeaders; +var init_getCanonicalHeaders = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants4(); + getCanonicalHeaders = /* @__PURE__ */ __name(({ headers }, unsignableHeaders, signableHeaders) => { + const canonical = {}; + for (const headerName of Object.keys(headers).sort()) { + if (headers[headerName] == void 0) { + continue; + } + const canonicalHeaderName = headerName.toLowerCase(); + if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) { + if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) { + continue; + } + } + canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); + } + return canonical; + }, "getCanonicalHeaders"); + } +}); + +// ../../node_modules/@smithy/is-array-buffer/dist-es/index.js +var isArrayBuffer; +var init_dist_es17 = __esm({ + "../../node_modules/@smithy/is-array-buffer/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +var getPayloadHash; +var init_getPayloadHash = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es17(); + init_dist_es10(); + init_dist_es5(); + init_constants4(); + getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => { + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase() === SHA256_HEADER) { + return headers[headerName]; + } + } + if (body == void 0) { + return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + } else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer(body)) { + const hashCtor = new hashConstructor(); + hashCtor.update(toUint8Array(body)); + return toHex(await hashCtor.digest()); + } + return UNSIGNED_PAYLOAD; + }, "getPayloadHash"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +function negate(bytes) { + for (let i2 = 0; i2 < 8; i2++) { + bytes[i2] ^= 255; + } + for (let i2 = 7; i2 > -1; i2--) { + bytes[i2]++; + if (bytes[i2] !== 0) + break; + } +} +var HeaderFormatter, HEADER_VALUE_TYPE, UUID_PATTERN, Int64; +var init_HeaderFormatter = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + init_dist_es5(); + HeaderFormatter = class { + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([header.value ? 0 : 1]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8(0, 3); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8(0, 4); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8(0, 6); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8(0, 7); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set(fromHex(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } + }; + __name(HeaderFormatter, "HeaderFormatter"); + (function(HEADER_VALUE_TYPE3) { + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["boolTrue"] = 0] = "boolTrue"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["boolFalse"] = 1] = "boolFalse"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["byte"] = 2] = "byte"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["short"] = 3] = "short"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["integer"] = 4] = "integer"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["long"] = 5] = "long"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["byteArray"] = 6] = "byteArray"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["string"] = 7] = "string"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["timestamp"] = 8] = "timestamp"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["uuid"] = 9] = "uuid"; + })(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {})); + UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; + Int64 = class { + bytes; + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static fromNumber(number4) { + if (number4 > 9223372036854776e3 || number4 < -9223372036854776e3) { + throw new Error(`${number4} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i2 = 7, remaining = Math.abs(Math.round(number4)); i2 > -1 && remaining > 0; i2--, remaining /= 256) { + bytes[i2] = remaining; + } + if (number4 < 0) { + negate(bytes); + } + return new Int64(bytes); + } + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate(bytes); + } + return parseInt(toHex(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } + }; + __name(Int64, "Int64"); + __name(negate, "negate"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/headerUtil.js +var hasHeader; +var init_headerUtil = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/headerUtil.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + hasHeader = /* @__PURE__ */ __name((soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; + }, "hasHeader"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +var moveHeadersToQuery; +var init_moveHeadersToQuery = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + moveHeadersToQuery = /* @__PURE__ */ __name((request, options = {}) => { + const { headers, query = {} } = HttpRequest.clone(request); + for (const name of Object.keys(headers)) { + const lname = name.toLowerCase(); + if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) { + query[name] = headers[name]; + delete headers[name]; + } + } + return { + ...request, + headers, + query + }; + }, "moveHeadersToQuery"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +var prepareRequest; +var init_prepareRequest = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/prepareRequest.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_constants4(); + prepareRequest = /* @__PURE__ */ __name((request) => { + request = HttpRequest.clone(request); + for (const headerName of Object.keys(request.headers)) { + if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { + delete request.headers[headerName]; + } + } + return request; + }, "prepareRequest"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +var getCanonicalQuery; +var init_getCanonicalQuery = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es7(); + init_constants4(); + getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => { + const keys = []; + const serialized = {}; + for (const key of Object.keys(query)) { + if (key.toLowerCase() === SIGNATURE_HEADER) { + continue; + } + const encodedKey = escapeUri(key); + keys.push(encodedKey); + const value = query[key]; + if (typeof value === "string") { + serialized[encodedKey] = `${encodedKey}=${escapeUri(value)}`; + } else if (Array.isArray(value)) { + serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${escapeUri(value2)}`]), []).sort().join("&"); + } + } + return keys.sort().map((key) => serialized[key]).filter((serialized2) => serialized2).join("&"); + }, "getCanonicalQuery"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/utilDate.js +var iso8601, toDate; +var init_utilDate = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/utilDate.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + iso8601 = /* @__PURE__ */ __name((time7) => toDate(time7).toISOString().replace(/\.\d{3}Z$/, "Z"), "iso8601"); + toDate = /* @__PURE__ */ __name((time7) => { + if (typeof time7 === "number") { + return new Date(time7 * 1e3); + } + if (typeof time7 === "string") { + if (Number(time7)) { + return new Date(Number(time7) * 1e3); + } + return new Date(time7); + } + return time7; + }, "toDate"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +var SignatureV4Base; +var init_SignatureV4Base = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + init_dist_es4(); + init_dist_es7(); + init_dist_es5(); + init_getCanonicalQuery(); + init_utilDate(); + SignatureV4Base = class { + service; + regionProvider; + credentialProvider; + sha256; + uriEscapePath; + applyChecksum; + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) { + this.service = service; + this.sha256 = sha256; + this.uriEscapePath = uriEscapePath; + this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; + this.regionProvider = normalizeProvider(region); + this.credentialProvider = normalizeProvider(credentials); + } + createCanonicalRequest(request, canonicalHeaders, payloadHash) { + const sortedHeaders = Object.keys(canonicalHeaders).sort(); + return `${request.method} +${this.getCanonicalPath(request)} +${getCanonicalQuery(request)} +${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")} + +${sortedHeaders.join(";")} +${payloadHash}`; + } + async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) { + const hash4 = new this.sha256(); + hash4.update(toUint8Array(canonicalRequest)); + const hashedRequest = await hash4.digest(); + return `${algorithmIdentifier} +${longDate} +${credentialScope} +${toHex(hashedRequest)}`; + } + getCanonicalPath({ path }) { + if (this.uriEscapePath) { + const normalizedPathSegments = []; + for (const pathSegment of path.split("/")) { + if (pathSegment?.length === 0) + continue; + if (pathSegment === ".") + continue; + if (pathSegment === "..") { + normalizedPathSegments.pop(); + } else { + normalizedPathSegments.push(pathSegment); + } + } + const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`; + const doubleEncoded = escapeUri(normalizedPath); + return doubleEncoded.replace(/%2F/g, "/"); + } + return path; + } + validateResolvedCredentials(credentials) { + if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") { + throw new Error("Resolved credential object is not valid"); + } + } + formatDate(now) { + const longDate = iso8601(now).replace(/[\-:]/g, ""); + return { + longDate, + shortDate: longDate.slice(0, 8) + }; + } + getCanonicalHeaderList(headers) { + return Object.keys(headers).sort().join(";"); + } + }; + __name(SignatureV4Base, "SignatureV4Base"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/SignatureV4.js +var SignatureV4; +var init_SignatureV4 = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/SignatureV4.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + init_dist_es5(); + init_constants4(); + init_credentialDerivation(); + init_getCanonicalHeaders(); + init_getPayloadHash(); + init_HeaderFormatter(); + init_headerUtil(); + init_moveHeadersToQuery(); + init_prepareRequest(); + init_SignatureV4Base(); + SignatureV4 = class extends SignatureV4Base { + headerFormatter = new HeaderFormatter(); + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) { + super({ + applyChecksum, + credentials, + region, + service, + sha256, + uriEscapePath + }); + } + async presign(originalRequest, options = {}) { + const { signingDate = /* @__PURE__ */ new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService } = options; + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { longDate, shortDate } = this.formatDate(signingDate); + if (expiresIn > MAX_PRESIGNED_TTL) { + return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future"); + } + const scope = createScope(shortDate, region, signingService ?? this.service); + const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders }); + if (credentials.sessionToken) { + request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken; + } + request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER; + request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; + request.query[AMZ_DATE_QUERY_PARAM] = longDate; + request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10); + const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders); + request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256))); + return request; + } + async sign(toSign, options) { + if (typeof toSign === "string") { + return this.signString(toSign, options); + } else if (toSign.headers && toSign.payload) { + return this.signEvent(toSign, options); + } else if (toSign.message) { + return this.signMessage(toSign, options); + } else { + return this.signRequest(toSign, options); + } + } + async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) { + const region = signingRegion ?? await this.regionProvider(); + const { shortDate, longDate } = this.formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256); + const hash4 = new this.sha256(); + hash4.update(headers); + const hashedHeaders = toHex(await hash4.digest()); + const stringToSign = [ + EVENT_ALGORITHM_IDENTIFIER, + longDate, + scope, + priorSignature, + hashedHeaders, + hashedPayload + ].join("\n"); + return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); + } + async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) { + const promise2 = this.signEvent({ + headers: this.headerFormatter.format(signableMessage.message.headers), + payload: signableMessage.message.body + }, { + signingDate, + signingRegion, + signingService, + priorSignature: signableMessage.priorSignature + }); + return promise2.then((signature) => { + return { message: signableMessage.message, signature }; + }); + } + async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { shortDate } = this.formatDate(signingDate); + const hash4 = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); + hash4.update(toUint8Array(stringToSign)); + return toHex(await hash4.digest()); + } + async signRequest(requestToSign, { signingDate = /* @__PURE__ */ new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const request = prepareRequest(requestToSign); + const { longDate, shortDate } = this.formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + request.headers[AMZ_DATE_HEADER] = longDate; + if (credentials.sessionToken) { + request.headers[TOKEN_HEADER] = credentials.sessionToken; + } + const payloadHash = await getPayloadHash(request, this.sha256); + if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) { + request.headers[SHA256_HEADER] = payloadHash; + } + const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash)); + request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`; + return request; + } + async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { + const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER); + const hash4 = new this.sha256(await keyPromise); + hash4.update(toUint8Array(stringToSign)); + return toHex(await hash4.digest()); + } + getSigningKey(credentials, region, shortDate, service) { + return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); + } + }; + __name(SignatureV4, "SignatureV4"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/signature-v4a-container.js +var signatureV4aContainer; +var init_signature_v4a_container = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/signature-v4a-container.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + signatureV4aContainer = { + SignatureV4a: null + }; + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/index.js +var init_dist_es18 = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_SignatureV4(); + init_constants4(); + init_credentialDerivation(); + init_signature_v4a_container(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js +function normalizeCredentialProvider(config3, { credentials, credentialDefaultProvider }) { + let credentialsProvider; + if (credentials) { + if (!credentials?.memoized) { + credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh); + } else { + credentialsProvider = credentials; + } + } else { + if (credentialDefaultProvider) { + credentialsProvider = normalizeProvider2(credentialDefaultProvider(Object.assign({}, config3, { + parentClientConfig: config3 + }))); + } else { + credentialsProvider = /* @__PURE__ */ __name(async () => { + throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured."); + }, "credentialsProvider"); + } + } + credentialsProvider.memoized = true; + return credentialsProvider; +} +function bindCallerConfig(config3, credentialsProvider) { + if (credentialsProvider.configBound) { + return credentialsProvider; + } + const fn = /* @__PURE__ */ __name(async (options) => credentialsProvider({ ...options, callerClientConfig: config3 }), "fn"); + fn.memoized = credentialsProvider.memoized; + fn.configBound = true; + return fn; +} +var resolveAwsSdkSigV4Config; +var init_resolveAwsSdkSigV4Config = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_client2(); + init_dist_es15(); + init_dist_es18(); + resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config3) => { + let inputCredentials = config3.credentials; + let isUserSupplied = !!config3.credentials; + let resolvedCredentials = void 0; + Object.defineProperty(config3, "credentials", { + set(credentials) { + if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) { + isUserSupplied = true; + } + inputCredentials = credentials; + const memoizedProvider = normalizeCredentialProvider(config3, { + credentials: inputCredentials, + credentialDefaultProvider: config3.credentialDefaultProvider + }); + const boundProvider = bindCallerConfig(config3, memoizedProvider); + if (isUserSupplied && !boundProvider.attributed) { + const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null; + resolvedCredentials = /* @__PURE__ */ __name(async (options) => { + const creds = await boundProvider(options); + const attributedCreds = creds; + if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) { + return setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e"); + } + return attributedCreds; + }, "resolvedCredentials"); + resolvedCredentials.memoized = boundProvider.memoized; + resolvedCredentials.configBound = boundProvider.configBound; + resolvedCredentials.attributed = true; + } else { + resolvedCredentials = boundProvider; + } + }, + get() { + return resolvedCredentials; + }, + enumerable: true, + configurable: true + }); + config3.credentials = inputCredentials; + const { signingEscapePath = true, systemClockOffset = config3.systemClockOffset || 0, sha256 } = config3; + let signer; + if (config3.signer) { + signer = normalizeProvider2(config3.signer); + } else if (config3.regionInfoProvider) { + signer = /* @__PURE__ */ __name(() => normalizeProvider2(config3.region)().then(async (region) => [ + await config3.regionInfoProvider(region, { + useFipsEndpoint: await config3.useFipsEndpoint(), + useDualstackEndpoint: await config3.useDualstackEndpoint() + }) || {}, + region + ]).then(([regionInfo, region]) => { + const { signingRegion, signingService } = regionInfo; + config3.signingRegion = config3.signingRegion || signingRegion || region; + config3.signingName = config3.signingName || signingService || config3.serviceId; + const params = { + ...config3, + credentials: config3.credentials, + region: config3.signingRegion, + service: config3.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config3.signerConstructor || SignatureV4; + return new SignerCtor(params); + }), "signer"); + } else { + signer = /* @__PURE__ */ __name(async (authScheme) => { + authScheme = Object.assign({}, { + name: "sigv4", + signingName: config3.signingName || config3.defaultSigningName, + signingRegion: await normalizeProvider2(config3.region)(), + properties: {} + }, authScheme); + const signingRegion = authScheme.signingRegion; + const signingService = authScheme.signingName; + config3.signingRegion = config3.signingRegion || signingRegion; + config3.signingName = config3.signingName || signingService || config3.serviceId; + const params = { + ...config3, + credentials: config3.credentials, + region: config3.signingRegion, + service: config3.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config3.signerConstructor || SignatureV4; + return new SignerCtor(params); + }, "signer"); + } + const resolvedConfig = Object.assign(config3, { + systemClockOffset, + signingEscapePath, + signer + }); + return resolvedConfig; + }, "resolveAwsSdkSigV4Config"); + __name(normalizeCredentialProvider, "normalizeCredentialProvider"); + __name(bindCallerConfig, "bindCallerConfig"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js +var init_aws_sdk = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AwsSdkSigV4Signer(); + init_AwsSdkSigV4ASigner(); + init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS(); + init_resolveAwsSdkSigV4AConfig(); + init_resolveAwsSdkSigV4Config(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js +var init_httpAuthSchemes2 = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_aws_sdk(); + init_getBearerTokenEnvKey(); + } +}); + +// ../../node_modules/@smithy/util-body-length-browser/dist-es/calculateBodyLength.js +var TEXT_ENCODER, calculateBodyLength; +var init_calculateBodyLength = __esm({ + "../../node_modules/@smithy/util-body-length-browser/dist-es/calculateBodyLength.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + TEXT_ENCODER = typeof TextEncoder == "function" ? new TextEncoder() : null; + calculateBodyLength = /* @__PURE__ */ __name((body) => { + if (typeof body === "string") { + if (TEXT_ENCODER) { + return TEXT_ENCODER.encode(body).byteLength; + } + let len = body.length; + for (let i2 = len - 1; i2 >= 0; i2--) { + const code = body.charCodeAt(i2); + if (code > 127 && code <= 2047) + len++; + else if (code > 2047 && code <= 65535) + len += 2; + if (code >= 56320 && code <= 57343) + i2--; + } + return len; + } else if (typeof body.byteLength === "number") { + return body.byteLength; + } else if (typeof body.size === "number") { + return body.size; + } + throw new Error(`Body Length computation failed for ${body}`); + }, "calculateBodyLength"); + } +}); + +// ../../node_modules/@smithy/util-body-length-browser/dist-es/index.js +var init_dist_es19 = __esm({ + "../../node_modules/@smithy/util-body-length-browser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_calculateBodyLength(); + } +}); + +// ../../node_modules/@smithy/middleware-stack/dist-es/MiddlewareStack.js +var getAllAliases, getMiddlewareNameWithAliases, constructStack, stepWeights, priorityWeights; +var init_MiddlewareStack = __esm({ + "../../node_modules/@smithy/middleware-stack/dist-es/MiddlewareStack.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getAllAliases = /* @__PURE__ */ __name((name, aliases) => { + const _aliases = []; + if (name) { + _aliases.push(name); + } + if (aliases) { + for (const alias of aliases) { + _aliases.push(alias); + } + } + return _aliases; + }, "getAllAliases"); + getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => { + return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; + }, "getMiddlewareNameWithAliases"); + constructStack = /* @__PURE__ */ __name(() => { + let absoluteEntries = []; + let relativeEntries = []; + let identifyOnResolve = false; + const entriesNameSet = /* @__PURE__ */ new Set(); + const sort = /* @__PURE__ */ __name((entries) => entries.sort((a2, b2) => stepWeights[b2.step] - stepWeights[a2.step] || priorityWeights[b2.priority || "normal"] - priorityWeights[a2.priority || "normal"]), "sort"); + const removeByName = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + const aliases = getAllAliases(entry.name, entry.aliases); + if (aliases.includes(toRemove)) { + isRemoved = true; + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByName"); + const removeByReference = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + if (entry.middleware === toRemove) { + isRemoved = true; + for (const alias of getAllAliases(entry.name, entry.aliases)) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByReference"); + const cloneTo = /* @__PURE__ */ __name((toStack) => { + absoluteEntries.forEach((entry) => { + toStack.add(entry.middleware, { ...entry }); + }); + relativeEntries.forEach((entry) => { + toStack.addRelativeTo(entry.middleware, { ...entry }); + }); + toStack.identifyOnResolve?.(stack.identifyOnResolve()); + return toStack; + }, "cloneTo"); + const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => { + const expandedMiddlewareList = []; + from.before.forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + expandedMiddlewareList.push(from); + from.after.reverse().forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + return expandedMiddlewareList; + }, "expandRelativeMiddlewareList"); + const getMiddlewareList = /* @__PURE__ */ __name((debug3 = false) => { + const normalizedAbsoluteEntries = []; + const normalizedRelativeEntries = []; + const normalizedEntriesNameMap = {}; + absoluteEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedAbsoluteEntries.push(normalizedEntry); + }); + relativeEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedRelativeEntries.push(normalizedEntry); + }); + normalizedRelativeEntries.forEach((entry) => { + if (entry.toMiddleware) { + const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; + if (toMiddleware === void 0) { + if (debug3) { + return; + } + throw new Error(`${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`); + } + if (entry.relation === "after") { + toMiddleware.after.push(entry); + } + if (entry.relation === "before") { + toMiddleware.before.push(entry); + } + } + }); + const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => { + wholeList.push(...expandedMiddlewareList); + return wholeList; + }, []); + return mainChain; + }, "getMiddlewareList"); + const stack = { + add: (middleware2, options = {}) => { + const { name, override, aliases: _aliases } = options; + const entry = { + step: "initialize", + priority: "normal", + middleware: middleware2, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = absoluteEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a2) => a2 === alias)); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = absoluteEntries[toOverrideIndex]; + if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ${entry.priority} priority in ${entry.step} step.`); + } + absoluteEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + absoluteEntries.push(entry); + }, + addRelativeTo: (middleware2, options) => { + const { name, override, aliases: _aliases } = options; + const entry = { + middleware: middleware2, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = relativeEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a2) => a2 === alias)); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = relativeEntries[toOverrideIndex]; + if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.`); + } + relativeEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + relativeEntries.push(entry); + }, + clone: () => cloneTo(constructStack()), + use: (plugin) => { + plugin.applyToStack(stack); + }, + remove: (toRemove) => { + if (typeof toRemove === "string") + return removeByName(toRemove); + else + return removeByReference(toRemove); + }, + removeByTag: (toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + const { tags, name, aliases: _aliases } = entry; + if (tags && tags.includes(toRemove)) { + const aliases = getAllAliases(name, _aliases); + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + isRemoved = true; + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, + concat: (from) => { + const cloned = cloneTo(constructStack()); + cloned.use(from); + cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false)); + return cloned; + }, + applyToStack: cloneTo, + identify: () => { + return getMiddlewareList(true).map((mw) => { + const step = mw.step ?? mw.relation + " " + mw.toMiddleware; + return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; + }); + }, + identifyOnResolve(toggle) { + if (typeof toggle === "boolean") + identifyOnResolve = toggle; + return identifyOnResolve; + }, + resolve: (handler, context2) => { + for (const middleware2 of getMiddlewareList().map((entry) => entry.middleware).reverse()) { + handler = middleware2(handler, context2); + } + if (identifyOnResolve) { + console.log(stack.identify()); + } + return handler; + } + }; + return stack; + }, "constructStack"); + stepWeights = { + initialize: 5, + serialize: 4, + build: 3, + finalizeRequest: 2, + deserialize: 1 + }; + priorityWeights = { + high: 3, + normal: 2, + low: 1 + }; + } +}); + +// ../../node_modules/@smithy/middleware-stack/dist-es/index.js +var init_dist_es20 = __esm({ + "../../node_modules/@smithy/middleware-stack/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_MiddlewareStack(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/client.js +var Client; +var init_client3 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/client.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es20(); + Client = class { + config; + middlewareStack = constructStack(); + initConfig; + handlers; + constructor(config3) { + this.config = config3; + const { protocol, protocolSettings } = config3; + if (protocolSettings) { + if (typeof protocol === "function") { + config3.protocol = new protocol(protocolSettings); + } + } + } + send(command, optionsOrCb, cb2) { + const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0; + const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb2; + const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true; + let handler; + if (useHandlerCache) { + if (!this.handlers) { + this.handlers = /* @__PURE__ */ new WeakMap(); + } + const handlers2 = this.handlers; + if (handlers2.has(command.constructor)) { + handler = handlers2.get(command.constructor); + } else { + handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + handlers2.set(command.constructor, handler); + } + } else { + delete this.handlers; + handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + } + if (callback) { + handler(command).then((result) => callback(null, result.output), (err) => callback(err)).catch(() => { + }); + } else { + return handler(command).then((result) => result.output); + } + } + destroy() { + this.config?.requestHandler?.destroy?.(); + delete this.handlers; + } + }; + __name(Client, "Client"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js +var init_collect_stream_body2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/schemaLogFilter.js +function schemaLogFilter(schema, data) { + if (data == null) { + return data; + } + const ns = NormalizedSchema.of(schema); + if (ns.getMergedTraits().sensitive) { + return SENSITIVE_STRING; + } + if (ns.isListSchema()) { + const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING; + } + } else if (ns.isMapSchema()) { + const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING; + } + } else if (ns.isStructSchema() && typeof data === "object") { + const object2 = data; + const newObject = {}; + for (const [member2, memberNs] of ns.structIterator()) { + if (object2[member2] != null) { + newObject[member2] = schemaLogFilter(memberNs, object2[member2]); + } + } + return newObject; + } + return data; +} +var SENSITIVE_STRING; +var init_schemaLogFilter = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/schemaLogFilter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + SENSITIVE_STRING = "***SensitiveInformation***"; + __name(schemaLogFilter, "schemaLogFilter"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/command.js +var Command, ClassBuilder; +var init_command2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/command.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es20(); + init_dist_es(); + init_schemaLogFilter(); + Command = class { + middlewareStack = constructStack(); + schema; + static classBuilder() { + return new ClassBuilder(); + } + resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) { + for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { + this.middlewareStack.use(mw); + } + const stack = clientStack.concat(this.middlewareStack); + const { logger: logger3 } = configuration; + const handlerExecutionContext = { + logger: logger3, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + commandInstance: this, + ...smithyContext + }, + ...additionalContext + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + }; + __name(Command, "Command"); + ClassBuilder = class { + _init = () => { + }; + _ep = {}; + _middlewareFn = () => []; + _commandName = ""; + _clientName = ""; + _additionalContext = {}; + _smithyContext = {}; + _inputFilterSensitiveLog = void 0; + _outputFilterSensitiveLog = void 0; + _serializer = null; + _deserializer = null; + _operationSchema; + init(cb2) { + this._init = cb2; + } + ep(endpointParameterInstructions) { + this._ep = endpointParameterInstructions; + return this; + } + m(middlewareSupplier) { + this._middlewareFn = middlewareSupplier; + return this; + } + s(service, operation2, smithyContext = {}) { + this._smithyContext = { + service, + operation: operation2, + ...smithyContext + }; + return this; + } + c(additionalContext = {}) { + this._additionalContext = additionalContext; + return this; + } + n(clientName, commandName) { + this._clientName = clientName; + this._commandName = commandName; + return this; + } + f(inputFilter = (_) => _, outputFilter = (_) => _) { + this._inputFilterSensitiveLog = inputFilter; + this._outputFilterSensitiveLog = outputFilter; + return this; + } + ser(serializer) { + this._serializer = serializer; + return this; + } + de(deserializer) { + this._deserializer = deserializer; + return this; + } + sc(operation2) { + this._operationSchema = operation2; + this._smithyContext.operationSchema = operation2; + return this; + } + build() { + const closure = this; + let CommandRef; + return CommandRef = /* @__PURE__ */ __name(class extends Command { + input; + static getEndpointParameterInstructions() { + return closure._ep; + } + constructor(...[input]) { + super(); + this.input = input ?? {}; + closure._init(this); + this.schema = closure._operationSchema; + } + resolveMiddleware(stack, configuration, options) { + const op = closure._operationSchema; + const input = op?.[4] ?? op?.input; + const output = op?.[5] ?? op?.output; + return this.resolveMiddlewareWithContext(stack, configuration, options, { + CommandCtor: CommandRef, + middlewareFn: closure._middlewareFn, + clientName: closure._clientName, + commandName: closure._commandName, + inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_) => _), + outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_) => _), + smithyContext: closure._smithyContext, + additionalContext: closure._additionalContext + }); + } + serialize = closure._serializer; + deserialize = closure._deserializer; + }, "CommandRef"); + } + }; + __name(ClassBuilder, "ClassBuilder"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/constants.js +var init_constants5 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js +var createAggregatedClient; +var init_create_aggregated_client = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + createAggregatedClient = /* @__PURE__ */ __name((commands2, Client2, options) => { + for (const [command, CommandCtor] of Object.entries(commands2)) { + const methodImpl = /* @__PURE__ */ __name(async function(args, optionsOrCb, cb2) { + const command2 = new CommandCtor(args); + if (typeof optionsOrCb === "function") { + this.send(command2, optionsOrCb); + } else if (typeof cb2 === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expected http options but got ${typeof optionsOrCb}`); + this.send(command2, optionsOrCb || {}, cb2); + } else { + return this.send(command2, optionsOrCb); + } + }, "methodImpl"); + const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); + Client2.prototype[methodName] = methodImpl; + } + const { paginators: paginators2 = {}, waiters: waiters2 = {} } = options ?? {}; + for (const [paginatorName, paginatorFn] of Object.entries(paginators2)) { + if (Client2.prototype[paginatorName] === void 0) { + Client2.prototype[paginatorName] = function(commandInput = {}, paginationConfiguration, ...rest) { + return paginatorFn({ + ...paginationConfiguration, + client: this + }, commandInput, ...rest); + }; + } + } + for (const [waiterName, waiterFn] of Object.entries(waiters2)) { + if (Client2.prototype[waiterName] === void 0) { + Client2.prototype[waiterName] = async function(commandInput = {}, waiterConfiguration, ...rest) { + let config3 = waiterConfiguration; + if (typeof waiterConfiguration === "number") { + config3 = { + maxWaitTime: waiterConfiguration + }; + } + return waiterFn({ + ...config3, + client: this + }, commandInput, ...rest); + }; + } + } + }, "createAggregatedClient"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/exceptions.js +var ServiceException, decorateServiceException; +var init_exceptions = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/exceptions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ServiceException = class extends Error { + $fault; + $response; + $retryable; + $metadata; + constructor(options) { + super(options.message); + Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype); + this.name = options.name; + this.$fault = options.$fault; + this.$metadata = options.$metadata; + } + static isInstance(value) { + if (!value) + return false; + const candidate = value; + return ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server"); + } + static [Symbol.hasInstance](instance) { + if (!instance) + return false; + const candidate = instance; + if (this === ServiceException) { + return ServiceException.isInstance(instance); + } + if (ServiceException.isInstance(instance)) { + if (candidate.name && this.name) { + return this.prototype.isPrototypeOf(instance) || candidate.name === this.name; + } + return this.prototype.isPrototypeOf(instance); + } + return false; + } + }; + __name(ServiceException, "ServiceException"); + decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => { + Object.entries(additions).filter(([, v3]) => v3 !== void 0).forEach(([k2, v3]) => { + if (exception[k2] == void 0 || exception[k2] === "") { + exception[k2] = v3; + } + }); + const message2 = exception.message || exception.Message || "UnknownError"; + exception.message = message2; + delete exception.Message; + return exception; + }, "decorateServiceException"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/default-error-handler.js +var init_default_error_handler = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/default-error-handler.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/defaults-mode.js +var loadConfigsForDefaultMode; +var init_defaults_mode = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/defaults-mode.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + loadConfigsForDefaultMode = /* @__PURE__ */ __name((mode) => { + switch (mode) { + case "standard": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "in-region": + return { + retryMode: "standard", + connectionTimeout: 1100 + }; + case "cross-region": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "mobile": + return { + retryMode: "standard", + connectionTimeout: 3e4 + }; + default: + return {}; + } + }, "loadConfigsForDefaultMode"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js +var init_emitWarningIfUnsupportedVersion2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js +var init_extended_encode_uri_component2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js +var knownAlgorithms, getChecksumConfiguration, resolveChecksumRuntimeConfig; +var init_checksum3 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es(); + knownAlgorithms = Object.values(AlgorithmId); + getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const checksumAlgorithms = []; + for (const id in AlgorithmId) { + const algorithmId = AlgorithmId[id]; + if (runtimeConfig[algorithmId] === void 0) { + continue; + } + checksumAlgorithms.push({ + algorithmId: () => algorithmId, + checksumConstructor: () => runtimeConfig[algorithmId] + }); + } + for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) { + checksumAlgorithms.push({ + algorithmId: () => id, + checksumConstructor: () => ChecksumCtor + }); + } + return { + addChecksumAlgorithm(algo) { + runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {}; + const id = algo.algorithmId(); + const ctor = algo.checksumConstructor(); + if (knownAlgorithms.includes(id)) { + runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor; + } else { + runtimeConfig.checksumAlgorithms[id] = ctor; + } + checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return checksumAlgorithms; + } + }; + }, "getChecksumConfiguration"); + resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + const id = checksumAlgorithm.algorithmId(); + if (knownAlgorithms.includes(id)) { + runtimeConfig[id] = checksumAlgorithm.checksumConstructor(); + } + }); + return runtimeConfig; + }, "resolveChecksumRuntimeConfig"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/extensions/retry.js +var getRetryConfiguration, resolveRetryRuntimeConfig; +var init_retry2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/extensions/retry.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + setRetryStrategy(retryStrategy) { + runtimeConfig.retryStrategy = retryStrategy; + }, + retryStrategy() { + return runtimeConfig.retryStrategy; + } + }; + }, "getRetryConfiguration"); + resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => { + const runtimeConfig = {}; + runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); + return runtimeConfig; + }, "resolveRetryRuntimeConfig"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js +var getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig; +var init_defaultExtensionConfiguration2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_checksum3(); + init_retry2(); + getDefaultExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig)); + }, "getDefaultExtensionConfiguration"); + resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config3) => { + return Object.assign(resolveChecksumRuntimeConfig(config3), resolveRetryRuntimeConfig(config3)); + }, "resolveDefaultRuntimeConfig"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/extensions/index.js +var init_extensions3 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/extensions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_defaultExtensionConfiguration2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/get-array-if-single-item.js +var init_get_array_if_single_item = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/get-array-if-single-item.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/get-value-from-text-node.js +var getValueFromTextNode; +var init_get_value_from_text_node = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/get-value-from-text-node.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getValueFromTextNode = /* @__PURE__ */ __name((obj) => { + const textNodeName = "#text"; + for (const key in obj) { + if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) { + obj[key] = obj[key][textNodeName]; + } else if (typeof obj[key] === "object" && obj[key] !== null) { + obj[key] = getValueFromTextNode(obj[key]); + } + } + return obj; + }, "getValueFromTextNode"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/is-serializable-header-value.js +var init_is_serializable_header_value = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/is-serializable-header-value.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js +var NoOpLogger; +var init_NoOpLogger = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + NoOpLogger = class { + trace() { + } + debug() { + } + info() { + } + warn() { + } + error() { + } + }; + __name(NoOpLogger, "NoOpLogger"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/object-mapping.js +var init_object_mapping = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/object-mapping.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/resolve-path.js +var init_resolve_path2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/resolve-path.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/ser-utils.js +var init_ser_utils = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/ser-utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/serde-json.js +var init_serde_json = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/serde-json.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/index.js +var init_dist_es21 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_client3(); + init_collect_stream_body2(); + init_command2(); + init_constants5(); + init_create_aggregated_client(); + init_default_error_handler(); + init_defaults_mode(); + init_emitWarningIfUnsupportedVersion2(); + init_exceptions(); + init_extended_encode_uri_component2(); + init_extensions3(); + init_get_array_if_single_item(); + init_get_value_from_text_node(); + init_is_serializable_header_value(); + init_NoOpLogger(); + init_object_mapping(); + init_resolve_path2(); + init_ser_utils(); + init_serde_json(); + init_serde2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js +var ProtocolLib; +var init_ProtocolLib = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_dist_es21(); + ProtocolLib = class { + queryCompat; + constructor(queryCompat = false) { + this.queryCompat = queryCompat; + } + resolveRestContentType(defaultContentType, inputSchema) { + const members = inputSchema.getMemberSchemas(); + const httpPayloadMember = Object.values(members).find((m2) => { + return !!m2.getMergedTraits().httpPayload; + }); + if (httpPayloadMember) { + const mediaType = httpPayloadMember.getMergedTraits().mediaType; + if (mediaType) { + return mediaType; + } else if (httpPayloadMember.isStringSchema()) { + return "text/plain"; + } else if (httpPayloadMember.isBlobSchema()) { + return "application/octet-stream"; + } else { + return defaultContentType; + } + } else if (!inputSchema.isUnitSchema()) { + const hasBody = Object.values(members).find((m2) => { + const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m2.getMergedTraits(); + const noPrefixHeaders = httpPrefixHeaders === void 0; + return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders; + }); + if (hasBody) { + return defaultContentType; + } + } + } + async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) { + let namespace = defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + const errorMetadata = { + $metadata: metadata, + $fault: response.statusCode < 500 ? "client" : "server" + }; + const registry2 = TypeRegistry.for(namespace); + try { + const errorSchema = getErrorSchema?.(registry2, errorName) ?? registry2.getSchema(errorIdentifier); + return { errorSchema, errorMetadata }; + } catch (e2) { + dataObject.message = dataObject.message ?? dataObject.Message ?? "UnknownError"; + const synthetic = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace); + const baseExceptionSchema = synthetic.getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error; + throw this.decorateServiceException(Object.assign(new ErrorCtor({ name: errorName }), errorMetadata), dataObject); + } + throw this.decorateServiceException(Object.assign(new Error(errorName), errorMetadata), dataObject); + } + } + decorateServiceException(exception, additions = {}) { + if (this.queryCompat) { + const msg = exception.Message ?? additions.Message; + const error50 = decorateServiceException(exception, additions); + if (msg) { + error50.message = msg; + } + error50.Error = { + ...error50.Error, + Type: error50.Error?.Type, + Code: error50.Error?.Code, + Message: error50.Error?.message ?? error50.Error?.Message ?? msg + }; + const reqId = error50.$metadata.requestId; + if (reqId) { + error50.RequestId = reqId; + } + return error50; + } + return decorateServiceException(exception, additions); + } + setQueryCompatError(output, response) { + const queryErrorHeader = response.headers?.["x-amzn-query-error"]; + if (output !== void 0 && queryErrorHeader != null) { + const [Code, Type] = queryErrorHeader.split(";"); + const entries = Object.entries(output); + const Error2 = { + Code, + Type + }; + Object.assign(output, Error2); + for (const [k2, v3] of entries) { + Error2[k2 === "message" ? "Message" : k2] = v3; + } + delete Error2.__type; + output.Error = Error2; + } + } + queryCompatOutput(queryCompatErrorData, errorData) { + if (queryCompatErrorData.Error) { + errorData.Error = queryCompatErrorData.Error; + } + if (queryCompatErrorData.Type) { + errorData.Type = queryCompatErrorData.Type; + } + if (queryCompatErrorData.Code) { + errorData.Code = queryCompatErrorData.Code; + } + } + findQueryCompatibleError(registry2, errorName) { + try { + return registry2.getSchema(errorName); + } catch (e2) { + return registry2.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName); + } + } + }; + __name(ProtocolLib, "ProtocolLib"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js +var init_AwsSmithyRpcV2CborProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js +var init_coercing_serializers = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js +var SerdeContextConfig; +var init_ConfigurableSerdeContext = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SerdeContextConfig = class { + serdeContext; + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + }; + __name(SerdeContextConfig, "SerdeContextConfig"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js +var UnionSerde; +var init_UnionSerde = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + UnionSerde = class { + from; + to; + keys; + constructor(from, to) { + this.from = from; + this.to = to; + this.keys = new Set(Object.keys(this.from).filter((k2) => k2 !== "__type")); + } + mark(key) { + this.keys.delete(key); + } + hasUnknown() { + return this.keys.size === 1 && Object.keys(this.to).length === 0; + } + writeUnknown() { + if (this.hasUnknown()) { + const k2 = this.keys.values().next().value; + const v3 = this.from[k2]; + this.to.$unknown = [k2, v3]; + } + } + }; + __name(UnionSerde, "UnionSerde"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +var init_parseJsonBody = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +var init_JsonShapeDeserializer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +var init_JsonShapeSerializer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js +var init_JsonCodec = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +var init_AwsJsonRpcProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js +var init_AwsJson1_0Protocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js +var init_AwsJson1_1Protocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +var init_AwsRestJsonProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js +var init_awsExpectUnion = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/escape-attribute.js +function escapeAttribute(value) { + return value.replace(/&/g, "&").replace(/
/g, ">").replace(/"/g, """); +} +var init_escape_attribute = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/escape-attribute.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(escapeAttribute, "escapeAttribute"); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/escape-element.js +function escapeElement(value) { + return value.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">").replace(/\r/g, " ").replace(/\n/g, " ").replace(/\u0085/g, "…").replace(/\u2028/, "
"); +} +var init_escape_element = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/escape-element.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(escapeElement, "escapeElement"); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/XmlText.js +var XmlText; +var init_XmlText = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/XmlText.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_escape_element(); + XmlText = class { + value; + constructor(value) { + this.value = value; + } + toString() { + return escapeElement("" + this.value); + } + }; + __name(XmlText, "XmlText"); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/XmlNode.js +var XmlNode; +var init_XmlNode = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/XmlNode.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_escape_attribute(); + init_XmlText(); + XmlNode = class { + name; + children; + attributes = {}; + static of(name, childText, withName) { + const node = new XmlNode(name); + if (childText !== void 0) { + node.addChildNode(new XmlText(childText)); + } + if (withName !== void 0) { + node.withName(withName); + } + return node; + } + constructor(name, children = []) { + this.name = name; + this.children = children; + } + withName(name) { + this.name = name; + return this; + } + addAttribute(name, value) { + this.attributes[name] = value; + return this; + } + addChildNode(child) { + this.children.push(child); + return this; + } + removeAttribute(name) { + delete this.attributes[name]; + return this; + } + n(name) { + this.name = name; + return this; + } + c(child) { + this.children.push(child); + return this; + } + a(name, value) { + if (value != null) { + this.attributes[name] = value; + } + return this; + } + cc(input, field, withName = field) { + if (input[field] != null) { + const node = XmlNode.of(field, input[field]).withName(withName); + this.c(node); + } + } + l(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + nodes.map((node) => { + node.withName(memberName); + this.c(node); + }); + } + } + lc(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + const containerNode = new XmlNode(memberName); + nodes.map((node) => { + containerNode.c(node); + }); + this.c(containerNode); + } + } + toString() { + const hasChildren2 = Boolean(this.children.length); + let xmlText = `<${this.name}`; + const attributes = this.attributes; + for (const attributeName of Object.keys(attributes)) { + const attribute = attributes[attributeName]; + if (attribute != null) { + xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`; + } + } + return xmlText += !hasChildren2 ? "/>" : `>${this.children.map((c2) => c2.toString()).join("")}`; + } + }; + __name(XmlNode, "XmlNode"); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.browser.js +function parseXML(xmlString) { + if (!parser) { + parser = new DOMParser(); + } + const xmlDocument = parser.parseFromString(xmlString, "application/xml"); + if (xmlDocument.getElementsByTagName("parsererror").length > 0) { + throw new Error("DOMParser XML parsing error."); + } + const xmlToObj = /* @__PURE__ */ __name((node) => { + if (node.nodeType === Node.TEXT_NODE) { + if (node.textContent?.trim()) { + return node.textContent; + } + } + if (node.nodeType === Node.ELEMENT_NODE) { + const element = node; + if (element.attributes.length === 0 && element.childNodes.length === 0) { + return ""; + } + const obj = {}; + const attributes = Array.from(element.attributes); + for (const attr of attributes) { + obj[`${attr.name}`] = attr.value; + } + const childNodes = Array.from(element.childNodes); + for (const child of childNodes) { + const childResult = xmlToObj(child); + if (childResult != null) { + const childName = child.nodeName; + if (childNodes.length === 1 && attributes.length === 0 && childName === "#text") { + return childResult; + } + if (obj[childName]) { + if (Array.isArray(obj[childName])) { + obj[childName].push(childResult); + } else { + obj[childName] = [obj[childName], childResult]; + } + } else { + obj[childName] = childResult; + } + } else if (childNodes.length === 1 && attributes.length === 0) { + return element.textContent; + } + } + return obj; + } + return null; + }, "xmlToObj"); + return { + [xmlDocument.documentElement.nodeName]: xmlToObj(xmlDocument.documentElement) + }; +} +var parser; +var init_xml_parser_browser = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(parseXML, "parseXML"); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/index.js +var init_dist_es22 = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_XmlNode(); + init_XmlText(); + init_xml_parser_browser(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js +var XmlShapeDeserializer; +var init_XmlShapeDeserializer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es22(); + init_protocols(); + init_schema3(); + init_dist_es21(); + init_dist_es5(); + init_ConfigurableSerdeContext(); + init_UnionSerde(); + XmlShapeDeserializer = class extends SerdeContextConfig { + settings; + stringDeserializer; + constructor(settings) { + super(); + this.settings = settings; + this.stringDeserializer = new FromStringShapeDeserializer(settings); + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + this.stringDeserializer.setSerdeContext(serdeContext); + } + read(schema, bytes, key) { + const ns = NormalizedSchema.of(schema); + const memberSchemas = ns.getMemberSchemas(); + const isEventPayload = ns.isStructSchema() && ns.isMemberSchema() && !!Object.values(memberSchemas).find((memberNs) => { + return !!memberNs.getMemberTraits().eventPayload; + }); + if (isEventPayload) { + const output = {}; + const memberName = Object.keys(memberSchemas)[0]; + const eventMemberSchema = memberSchemas[memberName]; + if (eventMemberSchema.isBlobSchema()) { + output[memberName] = bytes; + } else { + output[memberName] = this.read(memberSchemas[memberName], bytes); + } + return output; + } + const xmlString = (this.serdeContext?.utf8Encoder ?? toUtf8)(bytes); + const parsedObject = this.parseXml(xmlString); + return this.readSchema(schema, key ? parsedObject[key] : parsedObject); + } + readSchema(_schema, value) { + const ns = NormalizedSchema.of(_schema); + if (ns.isUnitSchema()) { + return; + } + const traits = ns.getMergedTraits(); + if (ns.isListSchema() && !Array.isArray(value)) { + return this.readSchema(ns, [value]); + } + if (value == null) { + return value; + } + if (typeof value === "object") { + const flat = !!traits.xmlFlattened; + if (ns.isListSchema()) { + const listValue = ns.getValueSchema(); + const buffer2 = []; + const sourceKey = listValue.getMergedTraits().xmlName ?? "member"; + const source = flat ? value : (value[0] ?? value)[sourceKey]; + if (source == null) { + return buffer2; + } + const sourceArray = Array.isArray(source) ? source : [source]; + for (const v3 of sourceArray) { + buffer2.push(this.readSchema(listValue, v3)); + } + return buffer2; + } + const buffer = {}; + if (ns.isMapSchema()) { + const keyNs = ns.getKeySchema(); + const memberNs = ns.getValueSchema(); + let entries; + if (flat) { + entries = Array.isArray(value) ? value : [value]; + } else { + entries = Array.isArray(value.entry) ? value.entry : [value.entry]; + } + const keyProperty = keyNs.getMergedTraits().xmlName ?? "key"; + const valueProperty = memberNs.getMergedTraits().xmlName ?? "value"; + for (const entry of entries) { + const key = entry[keyProperty]; + const value2 = entry[valueProperty]; + buffer[key] = this.readSchema(memberNs, value2); + } + return buffer; + } + if (ns.isStructSchema()) { + const union3 = ns.isUnionSchema(); + let unionSerde; + if (union3) { + unionSerde = new UnionSerde(value, buffer); + } + for (const [memberName, memberSchema] of ns.structIterator()) { + const memberTraits = memberSchema.getMergedTraits(); + const xmlObjectKey = !memberTraits.httpPayload ? memberSchema.getMemberTraits().xmlName ?? memberName : memberTraits.xmlName ?? memberSchema.getName(); + if (union3) { + unionSerde.mark(xmlObjectKey); + } + if (value[xmlObjectKey] != null) { + buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]); + } + } + if (union3) { + unionSerde.writeUnknown(); + } + return buffer; + } + if (ns.isDocumentSchema()) { + return value; + } + throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`); + } + if (ns.isListSchema()) { + return []; + } + if (ns.isMapSchema() || ns.isStructSchema()) { + return {}; + } + return this.stringDeserializer.read(ns, value); + } + parseXml(xml) { + if (xml.length) { + let parsedObj; + try { + parsedObj = parseXML(xml); + } catch (e2) { + if (e2 && typeof e2 === "object") { + Object.defineProperty(e2, "$responseBodyText", { + value: xml + }); + } + throw e2; + } + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; + } + return getValueFromTextNode(parsedObjToReturn); + } + return {}; + } + }; + __name(XmlShapeDeserializer, "XmlShapeDeserializer"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +var init_QueryShapeSerializer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +var init_AwsQueryProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js +var init_AwsEc2QueryProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QuerySerializerSettings.js +var init_QuerySerializerSettings = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QuerySerializerSettings.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js +var loadRestXmlErrorCode; +var init_parseXmlBody = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + loadRestXmlErrorCode = /* @__PURE__ */ __name((output, data) => { + if (data?.Error?.Code !== void 0) { + return data.Error.Code; + } + if (data?.Code !== void 0) { + return data.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } + }, "loadRestXmlErrorCode"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +var XmlShapeSerializer; +var init_XmlShapeSerializer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es22(); + init_protocols(); + init_schema3(); + init_serde2(); + init_dist_es21(); + init_dist_es6(); + init_ConfigurableSerdeContext(); + XmlShapeSerializer = class extends SerdeContextConfig { + settings; + stringBuffer; + byteBuffer; + buffer; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + if (ns.isStringSchema() && typeof value === "string") { + this.stringBuffer = value; + } else if (ns.isBlobSchema()) { + this.byteBuffer = "byteLength" in value ? value : (this.serdeContext?.base64Decoder ?? fromBase64)(value); + } else { + this.buffer = this.writeStruct(ns, value, void 0); + const traits = ns.getMergedTraits(); + if (traits.httpPayload && !traits.xmlName) { + this.buffer.withName(ns.getName()); + } + } + } + flush() { + if (this.byteBuffer !== void 0) { + const bytes = this.byteBuffer; + delete this.byteBuffer; + return bytes; + } + if (this.stringBuffer !== void 0) { + const str = this.stringBuffer; + delete this.stringBuffer; + return str; + } + const buffer = this.buffer; + if (this.settings.xmlNamespace) { + if (!buffer?.attributes?.["xmlns"]) { + buffer.addAttribute("xmlns", this.settings.xmlNamespace); + } + } + delete this.buffer; + return buffer.toString(); + } + writeStruct(ns, value, parentXmlns) { + const traits = ns.getMergedTraits(); + const name = ns.isMemberSchema() && !traits.httpPayload ? ns.getMemberTraits().xmlName ?? ns.getMemberName() : traits.xmlName ?? ns.getName(); + if (!name || !ns.isStructSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${ns.getName(true)}.`); + } + const structXmlNode = XmlNode.of(name); + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); + for (const [memberName, memberSchema] of ns.structIterator()) { + const val = value[memberName]; + if (val != null || memberSchema.isIdempotencyToken()) { + if (memberSchema.getMergedTraits().xmlAttribute) { + structXmlNode.addAttribute(memberSchema.getMergedTraits().xmlName ?? memberName, this.writeSimple(memberSchema, val)); + continue; + } + if (memberSchema.isListSchema()) { + this.writeList(memberSchema, val, structXmlNode, xmlns); + } else if (memberSchema.isMapSchema()) { + this.writeMap(memberSchema, val, structXmlNode, xmlns); + } else if (memberSchema.isStructSchema()) { + structXmlNode.addChildNode(this.writeStruct(memberSchema, val, xmlns)); + } else { + const memberNode = XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName()); + this.writeSimpleInto(memberSchema, val, memberNode, xmlns); + structXmlNode.addChildNode(memberNode); + } + } + } + const { $unknown } = value; + if ($unknown && ns.isUnionSchema() && Array.isArray($unknown) && Object.keys(value).length === 1) { + const [k2, v3] = $unknown; + const node = XmlNode.of(k2); + if (typeof v3 !== "string") { + if (value instanceof XmlNode || value instanceof XmlText) { + structXmlNode.addChildNode(value); + } else { + throw new Error(`@aws-sdk - $unknown union member in XML requires value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`); + } + } + this.writeSimpleInto(0, v3, node, xmlns); + structXmlNode.addChildNode(node); + } + if (xmlns) { + structXmlNode.addAttribute(xmlnsAttr, xmlns); + } + return structXmlNode; + } + writeList(listMember, array2, container, parentXmlns) { + if (!listMember.isMemberSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${listMember.getName(true)}`); + } + const listTraits = listMember.getMergedTraits(); + const listValueSchema = listMember.getValueSchema(); + const listValueTraits = listValueSchema.getMergedTraits(); + const sparse = !!listValueTraits.sparse; + const flat = !!listTraits.xmlFlattened; + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(listMember, parentXmlns); + const writeItem = /* @__PURE__ */ __name((container2, value) => { + if (listValueSchema.isListSchema()) { + this.writeList(listValueSchema, Array.isArray(value) ? value : [value], container2, xmlns); + } else if (listValueSchema.isMapSchema()) { + this.writeMap(listValueSchema, value, container2, xmlns); + } else if (listValueSchema.isStructSchema()) { + const struct = this.writeStruct(listValueSchema, value, xmlns); + container2.addChildNode(struct.withName(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member")); + } else { + const listItemNode = XmlNode.of(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member"); + this.writeSimpleInto(listValueSchema, value, listItemNode, xmlns); + container2.addChildNode(listItemNode); + } + }, "writeItem"); + if (flat) { + for (const value of array2) { + if (sparse || value != null) { + writeItem(container, value); + } + } + } else { + const listNode = XmlNode.of(listTraits.xmlName ?? listMember.getMemberName()); + if (xmlns) { + listNode.addAttribute(xmlnsAttr, xmlns); + } + for (const value of array2) { + if (sparse || value != null) { + writeItem(listNode, value); + } + } + container.addChildNode(listNode); + } + } + writeMap(mapMember, map2, container, parentXmlns, containerIsMap = false) { + if (!mapMember.isMemberSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}`); + } + const mapTraits = mapMember.getMergedTraits(); + const mapKeySchema = mapMember.getKeySchema(); + const mapKeyTraits = mapKeySchema.getMergedTraits(); + const keyTag = mapKeyTraits.xmlName ?? "key"; + const mapValueSchema = mapMember.getValueSchema(); + const mapValueTraits = mapValueSchema.getMergedTraits(); + const valueTag = mapValueTraits.xmlName ?? "value"; + const sparse = !!mapValueTraits.sparse; + const flat = !!mapTraits.xmlFlattened; + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(mapMember, parentXmlns); + const addKeyValue = /* @__PURE__ */ __name((entry, key, val) => { + const keyNode = XmlNode.of(keyTag, key); + const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns); + if (keyXmlns) { + keyNode.addAttribute(keyXmlnsAttr, keyXmlns); + } + entry.addChildNode(keyNode); + let valueNode = XmlNode.of(valueTag); + if (mapValueSchema.isListSchema()) { + this.writeList(mapValueSchema, val, valueNode, xmlns); + } else if (mapValueSchema.isMapSchema()) { + this.writeMap(mapValueSchema, val, valueNode, xmlns, true); + } else if (mapValueSchema.isStructSchema()) { + valueNode = this.writeStruct(mapValueSchema, val, xmlns); + } else { + this.writeSimpleInto(mapValueSchema, val, valueNode, xmlns); + } + entry.addChildNode(valueNode); + }, "addKeyValue"); + if (flat) { + for (const [key, val] of Object.entries(map2)) { + if (sparse || val != null) { + const entry = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); + addKeyValue(entry, key, val); + container.addChildNode(entry); + } + } + } else { + let mapNode; + if (!containerIsMap) { + mapNode = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); + if (xmlns) { + mapNode.addAttribute(xmlnsAttr, xmlns); + } + container.addChildNode(mapNode); + } + for (const [key, val] of Object.entries(map2)) { + if (sparse || val != null) { + const entry = XmlNode.of("entry"); + addKeyValue(entry, key, val); + (containerIsMap ? container : mapNode).addChildNode(entry); + } + } + } + } + writeSimple(_schema, value) { + if (null === value) { + throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value."); + } + const ns = NormalizedSchema.of(_schema); + let nodeContents = null; + if (value && typeof value === "object") { + if (ns.isBlobSchema()) { + nodeContents = (this.serdeContext?.base64Encoder ?? toBase64)(value); + } else if (ns.isTimestampSchema() && value instanceof Date) { + const format2 = determineTimestampFormat(ns, this.settings); + switch (format2) { + case 5: + nodeContents = value.toISOString().replace(".000Z", "Z"); + break; + case 6: + nodeContents = dateToUtcString(value); + break; + case 7: + nodeContents = String(value.getTime() / 1e3); + break; + default: + console.warn("Missing timestamp format, using http date", value); + nodeContents = dateToUtcString(value); + break; + } + } else if (ns.isBigDecimalSchema() && value) { + if (value instanceof NumericValue) { + return value.string; + } + return String(value); + } else if (ns.isMapSchema() || ns.isListSchema()) { + throw new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead."); + } else { + throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${ns.getName(true)}`); + } + } + if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) { + nodeContents = String(value); + } + if (ns.isStringSchema()) { + if (value === void 0 && ns.isIdempotencyToken()) { + nodeContents = v4(); + } else { + nodeContents = String(value); + } + } + if (nodeContents === null) { + throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`); + } + return nodeContents; + } + writeSimpleInto(_schema, value, into, parentXmlns) { + const nodeContents = this.writeSimple(_schema, value); + const ns = NormalizedSchema.of(_schema); + const content = new XmlText(nodeContents); + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); + if (xmlns) { + into.addAttribute(xmlnsAttr, xmlns); + } + into.addChildNode(content); + } + getXmlnsAttribute(ns, parentXmlns) { + const traits = ns.getMergedTraits(); + const [prefix, xmlns] = traits.xmlNamespace ?? []; + if (xmlns && xmlns !== parentXmlns) { + return [prefix ? `xmlns:${prefix}` : "xmlns", xmlns]; + } + return [void 0, void 0]; + } + }; + __name(XmlShapeSerializer, "XmlShapeSerializer"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js +var XmlCodec; +var init_XmlCodec = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_ConfigurableSerdeContext(); + init_XmlShapeDeserializer(); + init_XmlShapeSerializer(); + XmlCodec = class extends SerdeContextConfig { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + createSerializer() { + const serializer = new XmlShapeSerializer(this.settings); + serializer.setSerdeContext(this.serdeContext); + return serializer; + } + createDeserializer() { + const deserializer = new XmlShapeDeserializer(this.settings); + deserializer.setSerdeContext(this.serdeContext); + return deserializer; + } + }; + __name(XmlCodec, "XmlCodec"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +var AwsRestXmlProtocol; +var init_AwsRestXmlProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_protocols(); + init_schema3(); + init_ProtocolLib(); + init_parseXmlBody(); + init_XmlCodec(); + AwsRestXmlProtocol = class extends HttpBindingProtocol { + codec; + serializer; + deserializer; + mixin = new ProtocolLib(); + constructor(options) { + super(options); + const settings = { + timestampFormat: { + useTrait: true, + default: 5 + }, + httpBindings: true, + xmlNamespace: options.xmlNamespace, + serviceNamespace: options.defaultNamespace + }; + this.codec = new XmlCodec(settings); + this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); + this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings); + } + getPayloadCodec() { + return this.codec; + } + getShapeId() { + return "aws.protocols#restXml"; + } + async serializeRequest(operationSchema, input, context2) { + const request = await super.serializeRequest(operationSchema, input, context2); + const inputSchema = NormalizedSchema.of(operationSchema.input); + if (!request.headers["content-type"]) { + const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema); + if (contentType) { + request.headers["content-type"] = contentType; + } + } + if (typeof request.body === "string" && request.headers["content-type"] === this.getDefaultContentType() && !request.body.startsWith("' + request.body; + } + return request; + } + async deserializeResponse(operationSchema, context2, response) { + return super.deserializeResponse(operationSchema, context2, response); + } + async handleError(operationSchema, context2, response, dataObject, metadata) { + const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown"; + if (dataObject.Error && typeof dataObject.Error === "object") { + for (const key of Object.keys(dataObject.Error)) { + dataObject[key] = dataObject.Error[key]; + if (key.toLowerCase() === "message") { + dataObject.message = dataObject.Error[key]; + } + } + } + if (dataObject.RequestId && !metadata.requestId) { + metadata.requestId = dataObject.RequestId; + } + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); + const ns = NormalizedSchema.of(errorSchema); + const message2 = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown"; + const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; + const exception = new ErrorCtor(message2); + await this.deserializeHttpMessage(errorSchema, context2, response, dataObject); + const output = {}; + for (const [name, member2] of ns.structIterator()) { + const target = member2.getMergedTraits().xmlName ?? name; + const value = dataObject.Error?.[target] ?? dataObject[target]; + output[name] = this.codec.createDeserializer().readSchema(member2, value); + } + throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, { + $fault: ns.getMergedTraits().error, + message: message2 + }, output), dataObject); + } + getDefaultContentType() { + return "application/xml"; + } + hasUnstructuredPayloadBinding(ns) { + for (const [, member2] of ns.structIterator()) { + if (member2.getMergedTraits().httpPayload) { + return !(member2.isStructSchema() || member2.isMapSchema() || member2.isListSchema()); + } + } + return false; + } + }; + __name(AwsRestXmlProtocol, "AwsRestXmlProtocol"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +var init_protocols2 = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AwsSmithyRpcV2CborProtocol(); + init_coercing_serializers(); + init_AwsJson1_0Protocol(); + init_AwsJson1_1Protocol(); + init_AwsJsonRpcProtocol(); + init_AwsRestJsonProtocol(); + init_JsonCodec(); + init_JsonShapeDeserializer(); + init_JsonShapeSerializer(); + init_awsExpectUnion(); + init_parseJsonBody(); + init_AwsEc2QueryProtocol(); + init_AwsQueryProtocol(); + init_QuerySerializerSettings(); + init_QueryShapeSerializer(); + init_AwsRestXmlProtocol(); + init_XmlCodec(); + init_XmlShapeDeserializer(); + init_XmlShapeSerializer(); + init_parseXmlBody(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/index.js +var init_dist_es23 = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_client2(); + init_httpAuthSchemes2(); + init_protocols2(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmForRequest.js +var getChecksumAlgorithmForRequest; +var init_getChecksumAlgorithmForRequest = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmForRequest.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants3(); + getChecksumAlgorithmForRequest = /* @__PURE__ */ __name((input, { requestChecksumRequired, requestAlgorithmMember, requestChecksumCalculation }) => { + if (!requestAlgorithmMember) { + return requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired ? DEFAULT_CHECKSUM_ALGORITHM : void 0; + } + if (!input[requestAlgorithmMember]) { + return void 0; + } + const checksumAlgorithm = input[requestAlgorithmMember]; + return checksumAlgorithm; + }, "getChecksumAlgorithmForRequest"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumLocationName.js +var getChecksumLocationName; +var init_getChecksumLocationName = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumLocationName.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants3(); + getChecksumLocationName = /* @__PURE__ */ __name((algorithm) => algorithm === ChecksumAlgorithm.MD5 ? "content-md5" : `x-amz-checksum-${algorithm.toLowerCase()}`, "getChecksumLocationName"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeader.js +var hasHeader2; +var init_hasHeader = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeader.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + hasHeader2 = /* @__PURE__ */ __name((header, headers) => { + const soughtHeader = header.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; + }, "hasHeader"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeaderWithPrefix.js +var hasHeaderWithPrefix; +var init_hasHeaderWithPrefix = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeaderWithPrefix.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + hasHeaderWithPrefix = /* @__PURE__ */ __name((headerPrefix, headers) => { + const soughtHeaderPrefix = headerPrefix.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase().startsWith(soughtHeaderPrefix)) { + return true; + } + } + return false; + }, "hasHeaderWithPrefix"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isStreaming.js +var isStreaming; +var init_isStreaming = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isStreaming.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es17(); + isStreaming = /* @__PURE__ */ __name((body) => body !== void 0 && typeof body !== "string" && !ArrayBuffer.isView(body) && !isArrayBuffer(body), "isStreaming"); + } +}); + +// ../../node_modules/tslib/tslib.es6.mjs +function __awaiter(thisArg, _arguments, P2, generator) { + function adopt(value) { + return value instanceof P2 ? value : new P2(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P2 || (P2 = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e2) { + reject(e2); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e2) { + reject(e2); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t9[0] & 1) + throw t9[1]; + return t9[1]; + }, trys: [], ops: [] }, f2, y2, t9, g2 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g2.next = verb(0), g2["throw"] = verb(1), g2["return"] = verb(2), typeof Symbol === "function" && (g2[Symbol.iterator] = function() { + return this; + }), g2; + function verb(n2) { + return function(v3) { + return step([n2, v3]); + }; + } + __name(verb, "verb"); + function step(op) { + if (f2) + throw new TypeError("Generator is already executing."); + while (g2 && (g2 = 0, op[0] && (_ = 0)), _) + try { + if (f2 = 1, y2 && (t9 = op[0] & 2 ? y2["return"] : op[0] ? y2["throw"] || ((t9 = y2["return"]) && t9.call(y2), 0) : y2.next) && !(t9 = t9.call(y2, op[1])).done) + return t9; + if (y2 = 0, t9) + op = [op[0] & 2, t9.value]; + switch (op[0]) { + case 0: + case 1: + t9 = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y2 = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t9 = _.trys, t9 = t9.length > 0 && t9[t9.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t9 || op[1] > t9[0] && op[1] < t9[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t9[1]) { + _.label = t9[1]; + t9 = op; + break; + } + if (t9 && _.label < t9[2]) { + _.label = t9[2]; + _.ops.push(op); + break; + } + if (t9[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e2) { + op = [6, e2]; + y2 = 0; + } finally { + f2 = t9 = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + __name(step, "step"); +} +function __values(o2) { + var s2 = typeof Symbol === "function" && Symbol.iterator, m2 = s2 && o2[s2], i2 = 0; + if (m2) + return m2.call(o2); + if (o2 && typeof o2.length === "number") + return { + next: function() { + if (o2 && i2 >= o2.length) + o2 = void 0; + return { value: o2 && o2[i2++], done: !o2 }; + } + }; + throw new TypeError(s2 ? "Object is not iterable." : "Symbol.iterator is not defined."); +} +var init_tslib_es6 = __esm({ + "../../node_modules/tslib/tslib.es6.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(__awaiter, "__awaiter"); + __name(__generator, "__generator"); + __name(__values, "__values"); + } +}); + +// ../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js +var fromUtf82; +var init_fromUtf8_browser2 = __esm({ + "../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fromUtf82 = /* @__PURE__ */ __name((input) => new TextEncoder().encode(input), "fromUtf8"); + } +}); + +// ../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js +var init_toUint8Array2 = __esm({ + "../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser2(); + } +}); + +// ../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +var init_toUtf8_browser2 = __esm({ + "../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/index.js +var init_dist_es24 = __esm({ + "../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser2(); + init_toUint8Array2(); + init_toUtf8_browser2(); + } +}); + +// ../../node_modules/@aws-crypto/util/build/module/convertToBuffer.js +function convertToBuffer(data) { + if (data instanceof Uint8Array) + return data; + if (typeof data === "string") { + return fromUtf83(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); +} +var fromUtf83; +var init_convertToBuffer = __esm({ + "../../node_modules/@aws-crypto/util/build/module/convertToBuffer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es24(); + fromUtf83 = typeof Buffer !== "undefined" && Buffer.from ? function(input) { + return Buffer.from(input, "utf8"); + } : fromUtf82; + __name(convertToBuffer, "convertToBuffer"); + } +}); + +// ../../node_modules/@aws-crypto/util/build/module/isEmptyData.js +function isEmptyData(data) { + if (typeof data === "string") { + return data.length === 0; + } + return data.byteLength === 0; +} +var init_isEmptyData = __esm({ + "../../node_modules/@aws-crypto/util/build/module/isEmptyData.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(isEmptyData, "isEmptyData"); + } +}); + +// ../../node_modules/@aws-crypto/util/build/module/numToUint8.js +function numToUint8(num) { + return new Uint8Array([ + (num & 4278190080) >> 24, + (num & 16711680) >> 16, + (num & 65280) >> 8, + num & 255 + ]); +} +var init_numToUint8 = __esm({ + "../../node_modules/@aws-crypto/util/build/module/numToUint8.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(numToUint8, "numToUint8"); + } +}); + +// ../../node_modules/@aws-crypto/util/build/module/uint32ArrayFrom.js +function uint32ArrayFrom(a_lookUpTable2) { + if (!Uint32Array.from) { + var return_array = new Uint32Array(a_lookUpTable2.length); + var a_index = 0; + while (a_index < a_lookUpTable2.length) { + return_array[a_index] = a_lookUpTable2[a_index]; + a_index += 1; + } + return return_array; + } + return Uint32Array.from(a_lookUpTable2); +} +var init_uint32ArrayFrom = __esm({ + "../../node_modules/@aws-crypto/util/build/module/uint32ArrayFrom.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(uint32ArrayFrom, "uint32ArrayFrom"); + } +}); + +// ../../node_modules/@aws-crypto/util/build/module/index.js +var init_module = __esm({ + "../../node_modules/@aws-crypto/util/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_convertToBuffer(); + init_isEmptyData(); + init_numToUint8(); + init_uint32ArrayFrom(); + } +}); + +// ../../node_modules/@aws-crypto/crc32c/build/module/aws_crc32c.js +var AwsCrc32c; +var init_aws_crc32c = __esm({ + "../../node_modules/@aws-crypto/crc32c/build/module/aws_crc32c.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tslib_es6(); + init_module(); + init_module2(); + AwsCrc32c = /** @class */ + function() { + function AwsCrc32c2() { + this.crc32c = new Crc32c(); + } + __name(AwsCrc32c2, "AwsCrc32c"); + AwsCrc32c2.prototype.update = function(toHash) { + if (isEmptyData(toHash)) + return; + this.crc32c.update(convertToBuffer(toHash)); + }; + AwsCrc32c2.prototype.digest = function() { + return __awaiter(this, void 0, void 0, function() { + return __generator(this, function(_a124) { + return [2, numToUint8(this.crc32c.digest())]; + }); + }); + }; + AwsCrc32c2.prototype.reset = function() { + this.crc32c = new Crc32c(); + }; + return AwsCrc32c2; + }(); + } +}); + +// ../../node_modules/@aws-crypto/crc32c/build/module/index.js +var Crc32c, a_lookupTable, lookupTable; +var init_module2 = __esm({ + "../../node_modules/@aws-crypto/crc32c/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tslib_es6(); + init_module(); + init_aws_crc32c(); + Crc32c = /** @class */ + function() { + function Crc32c2() { + this.checksum = 4294967295; + } + __name(Crc32c2, "Crc32c"); + Crc32c2.prototype.update = function(data) { + var e_1, _a124; + try { + for (var data_1 = __values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { + var byte = data_1_1.value; + this.checksum = this.checksum >>> 8 ^ lookupTable[(this.checksum ^ byte) & 255]; + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (data_1_1 && !data_1_1.done && (_a124 = data_1.return)) + _a124.call(data_1); + } finally { + if (e_1) + throw e_1.error; + } + } + return this; + }; + Crc32c2.prototype.digest = function() { + return (this.checksum ^ 4294967295) >>> 0; + }; + return Crc32c2; + }(); + a_lookupTable = [ + 0, + 4067132163, + 3778769143, + 324072436, + 3348797215, + 904991772, + 648144872, + 3570033899, + 2329499855, + 2024987596, + 1809983544, + 2575936315, + 1296289744, + 3207089363, + 2893594407, + 1578318884, + 274646895, + 3795141740, + 4049975192, + 51262619, + 3619967088, + 632279923, + 922689671, + 3298075524, + 2592579488, + 1760304291, + 2075979607, + 2312596564, + 1562183871, + 2943781820, + 3156637768, + 1313733451, + 549293790, + 3537243613, + 3246849577, + 871202090, + 3878099393, + 357341890, + 102525238, + 4101499445, + 2858735121, + 1477399826, + 1264559846, + 3107202533, + 1845379342, + 2677391885, + 2361733625, + 2125378298, + 820201905, + 3263744690, + 3520608582, + 598981189, + 4151959214, + 85089709, + 373468761, + 3827903834, + 3124367742, + 1213305469, + 1526817161, + 2842354314, + 2107672161, + 2412447074, + 2627466902, + 1861252501, + 1098587580, + 3004210879, + 2688576843, + 1378610760, + 2262928035, + 1955203488, + 1742404180, + 2511436119, + 3416409459, + 969524848, + 714683780, + 3639785095, + 205050476, + 4266873199, + 3976438427, + 526918040, + 1361435347, + 2739821008, + 2954799652, + 1114974503, + 2529119692, + 1691668175, + 2005155131, + 2247081528, + 3690758684, + 697762079, + 986182379, + 3366744552, + 476452099, + 3993867776, + 4250756596, + 255256311, + 1640403810, + 2477592673, + 2164122517, + 1922457750, + 2791048317, + 1412925310, + 1197962378, + 3037525897, + 3944729517, + 427051182, + 170179418, + 4165941337, + 746937522, + 3740196785, + 3451792453, + 1070968646, + 1905808397, + 2213795598, + 2426610938, + 1657317369, + 3053634322, + 1147748369, + 1463399397, + 2773627110, + 4215344322, + 153784257, + 444234805, + 3893493558, + 1021025245, + 3467647198, + 3722505002, + 797665321, + 2197175160, + 1889384571, + 1674398607, + 2443626636, + 1164749927, + 3070701412, + 2757221520, + 1446797203, + 137323447, + 4198817972, + 3910406976, + 461344835, + 3484808360, + 1037989803, + 781091935, + 3705997148, + 2460548119, + 1623424788, + 1939049696, + 2180517859, + 1429367560, + 2807687179, + 3020495871, + 1180866812, + 410100952, + 3927582683, + 4182430767, + 186734380, + 3756733383, + 763408580, + 1053836080, + 3434856499, + 2722870694, + 1344288421, + 1131464017, + 2971354706, + 1708204729, + 2545590714, + 2229949006, + 1988219213, + 680717673, + 3673779818, + 3383336350, + 1002577565, + 4010310262, + 493091189, + 238226049, + 4233660802, + 2987750089, + 1082061258, + 1395524158, + 2705686845, + 1972364758, + 2279892693, + 2494862625, + 1725896226, + 952904198, + 3399985413, + 3656866545, + 731699698, + 4283874585, + 222117402, + 510512622, + 3959836397, + 3280807620, + 837199303, + 582374963, + 3504198960, + 68661723, + 4135334616, + 3844915500, + 390545967, + 1230274059, + 3141532936, + 2825850620, + 1510247935, + 2395924756, + 2091215383, + 1878366691, + 2644384480, + 3553878443, + 565732008, + 854102364, + 3229815391, + 340358836, + 3861050807, + 4117890627, + 119113024, + 1493875044, + 2875275879, + 3090270611, + 1247431312, + 2660249211, + 1828433272, + 2141937292, + 2378227087, + 3811616794, + 291187481, + 34330861, + 4032846830, + 615137029, + 3603020806, + 3314634738, + 939183345, + 1776939221, + 2609017814, + 2295496738, + 2058945313, + 2926798794, + 1545135305, + 1330124605, + 3173225534, + 4084100981, + 17165430, + 307568514, + 3762199681, + 888469610, + 3332340585, + 3587147933, + 665062302, + 2042050490, + 2346497209, + 2559330125, + 1793573966, + 3190661285, + 1279665062, + 1595330642, + 2910671697 + ]; + lookupTable = uint32ArrayFrom(a_lookupTable); + } +}); + +// ../../node_modules/@aws-sdk/crc64-nvme/dist-es/Crc64Nvme.js +var generateCRC64NVMETable, CRC64_NVME_REVERSED_TABLE, t0, t1, t2, t3, t4, t5, t6, t7, ensureTablesInitialized, Crc64Nvme; +var init_Crc64Nvme = __esm({ + "../../node_modules/@aws-sdk/crc64-nvme/dist-es/Crc64Nvme.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + generateCRC64NVMETable = /* @__PURE__ */ __name(() => { + const sliceLength = 8; + const tables = new Array(sliceLength); + for (let slice = 0; slice < sliceLength; slice++) { + const table3 = new Array(512); + for (let i2 = 0; i2 < 256; i2++) { + let crc = BigInt(i2); + for (let j2 = 0; j2 < 8 * (slice + 1); j2++) { + if (crc & 1n) { + crc = crc >> 1n ^ 0x9a6c9329ac4bc9b5n; + } else { + crc = crc >> 1n; + } + } + table3[i2 * 2] = Number(crc >> 32n & 0xffffffffn); + table3[i2 * 2 + 1] = Number(crc & 0xffffffffn); + } + tables[slice] = new Uint32Array(table3); + } + return tables; + }, "generateCRC64NVMETable"); + ensureTablesInitialized = /* @__PURE__ */ __name(() => { + if (!CRC64_NVME_REVERSED_TABLE) { + CRC64_NVME_REVERSED_TABLE = generateCRC64NVMETable(); + [t0, t1, t2, t3, t4, t5, t6, t7] = CRC64_NVME_REVERSED_TABLE; + } + }, "ensureTablesInitialized"); + Crc64Nvme = class { + c1 = 0; + c2 = 0; + constructor() { + ensureTablesInitialized(); + this.reset(); + } + update(data) { + const len = data.length; + let i2 = 0; + let crc1 = this.c1; + let crc2 = this.c2; + while (i2 + 8 <= len) { + const idx0 = ((crc2 ^ data[i2++]) & 255) << 1; + const idx1 = ((crc2 >>> 8 ^ data[i2++]) & 255) << 1; + const idx2 = ((crc2 >>> 16 ^ data[i2++]) & 255) << 1; + const idx3 = ((crc2 >>> 24 ^ data[i2++]) & 255) << 1; + const idx4 = ((crc1 ^ data[i2++]) & 255) << 1; + const idx5 = ((crc1 >>> 8 ^ data[i2++]) & 255) << 1; + const idx6 = ((crc1 >>> 16 ^ data[i2++]) & 255) << 1; + const idx7 = ((crc1 >>> 24 ^ data[i2++]) & 255) << 1; + crc1 = t7[idx0] ^ t6[idx1] ^ t5[idx2] ^ t4[idx3] ^ t3[idx4] ^ t2[idx5] ^ t1[idx6] ^ t0[idx7]; + crc2 = t7[idx0 + 1] ^ t6[idx1 + 1] ^ t5[idx2 + 1] ^ t4[idx3 + 1] ^ t3[idx4 + 1] ^ t2[idx5 + 1] ^ t1[idx6 + 1] ^ t0[idx7 + 1]; + } + while (i2 < len) { + const idx = ((crc2 ^ data[i2]) & 255) << 1; + crc2 = (crc2 >>> 8 | (crc1 & 255) << 24) >>> 0; + crc1 = crc1 >>> 8 ^ t0[idx]; + crc2 ^= t0[idx + 1]; + i2++; + } + this.c1 = crc1; + this.c2 = crc2; + } + async digest() { + const c1 = this.c1 ^ 4294967295; + const c2 = this.c2 ^ 4294967295; + return new Uint8Array([ + c1 >>> 24, + c1 >>> 16 & 255, + c1 >>> 8 & 255, + c1 & 255, + c2 >>> 24, + c2 >>> 16 & 255, + c2 >>> 8 & 255, + c2 & 255 + ]); + } + reset() { + this.c1 = 4294967295; + this.c2 = 4294967295; + } + }; + __name(Crc64Nvme, "Crc64Nvme"); + } +}); + +// ../../node_modules/@aws-sdk/crc64-nvme/dist-es/crc64-nvme-crt-container.js +var crc64NvmeCrtContainer; +var init_crc64_nvme_crt_container = __esm({ + "../../node_modules/@aws-sdk/crc64-nvme/dist-es/crc64-nvme-crt-container.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + crc64NvmeCrtContainer = { + CrtCrc64Nvme: null + }; + } +}); + +// ../../node_modules/@aws-sdk/crc64-nvme/dist-es/index.js +var init_dist_es25 = __esm({ + "../../node_modules/@aws-sdk/crc64-nvme/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Crc64Nvme(); + init_crc64_nvme_crt_container(); + } +}); + +// ../../node_modules/@aws-crypto/crc32/build/module/aws_crc32.js +var AwsCrc32; +var init_aws_crc32 = __esm({ + "../../node_modules/@aws-crypto/crc32/build/module/aws_crc32.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tslib_es6(); + init_module(); + init_module3(); + AwsCrc32 = /** @class */ + function() { + function AwsCrc322() { + this.crc32 = new Crc32(); + } + __name(AwsCrc322, "AwsCrc32"); + AwsCrc322.prototype.update = function(toHash) { + if (isEmptyData(toHash)) + return; + this.crc32.update(convertToBuffer(toHash)); + }; + AwsCrc322.prototype.digest = function() { + return __awaiter(this, void 0, void 0, function() { + return __generator(this, function(_a124) { + return [2, numToUint8(this.crc32.digest())]; + }); + }); + }; + AwsCrc322.prototype.reset = function() { + this.crc32 = new Crc32(); + }; + return AwsCrc322; + }(); + } +}); + +// ../../node_modules/@aws-crypto/crc32/build/module/index.js +var Crc32, a_lookUpTable, lookupTable2; +var init_module3 = __esm({ + "../../node_modules/@aws-crypto/crc32/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tslib_es6(); + init_module(); + init_aws_crc32(); + Crc32 = /** @class */ + function() { + function Crc322() { + this.checksum = 4294967295; + } + __name(Crc322, "Crc32"); + Crc322.prototype.update = function(data) { + var e_1, _a124; + try { + for (var data_1 = __values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { + var byte = data_1_1.value; + this.checksum = this.checksum >>> 8 ^ lookupTable2[(this.checksum ^ byte) & 255]; + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (data_1_1 && !data_1_1.done && (_a124 = data_1.return)) + _a124.call(data_1); + } finally { + if (e_1) + throw e_1.error; + } + } + return this; + }; + Crc322.prototype.digest = function() { + return (this.checksum ^ 4294967295) >>> 0; + }; + return Crc322; + }(); + a_lookUpTable = [ + 0, + 1996959894, + 3993919788, + 2567524794, + 124634137, + 1886057615, + 3915621685, + 2657392035, + 249268274, + 2044508324, + 3772115230, + 2547177864, + 162941995, + 2125561021, + 3887607047, + 2428444049, + 498536548, + 1789927666, + 4089016648, + 2227061214, + 450548861, + 1843258603, + 4107580753, + 2211677639, + 325883990, + 1684777152, + 4251122042, + 2321926636, + 335633487, + 1661365465, + 4195302755, + 2366115317, + 997073096, + 1281953886, + 3579855332, + 2724688242, + 1006888145, + 1258607687, + 3524101629, + 2768942443, + 901097722, + 1119000684, + 3686517206, + 2898065728, + 853044451, + 1172266101, + 3705015759, + 2882616665, + 651767980, + 1373503546, + 3369554304, + 3218104598, + 565507253, + 1454621731, + 3485111705, + 3099436303, + 671266974, + 1594198024, + 3322730930, + 2970347812, + 795835527, + 1483230225, + 3244367275, + 3060149565, + 1994146192, + 31158534, + 2563907772, + 4023717930, + 1907459465, + 112637215, + 2680153253, + 3904427059, + 2013776290, + 251722036, + 2517215374, + 3775830040, + 2137656763, + 141376813, + 2439277719, + 3865271297, + 1802195444, + 476864866, + 2238001368, + 4066508878, + 1812370925, + 453092731, + 2181625025, + 4111451223, + 1706088902, + 314042704, + 2344532202, + 4240017532, + 1658658271, + 366619977, + 2362670323, + 4224994405, + 1303535960, + 984961486, + 2747007092, + 3569037538, + 1256170817, + 1037604311, + 2765210733, + 3554079995, + 1131014506, + 879679996, + 2909243462, + 3663771856, + 1141124467, + 855842277, + 2852801631, + 3708648649, + 1342533948, + 654459306, + 3188396048, + 3373015174, + 1466479909, + 544179635, + 3110523913, + 3462522015, + 1591671054, + 702138776, + 2966460450, + 3352799412, + 1504918807, + 783551873, + 3082640443, + 3233442989, + 3988292384, + 2596254646, + 62317068, + 1957810842, + 3939845945, + 2647816111, + 81470997, + 1943803523, + 3814918930, + 2489596804, + 225274430, + 2053790376, + 3826175755, + 2466906013, + 167816743, + 2097651377, + 4027552580, + 2265490386, + 503444072, + 1762050814, + 4150417245, + 2154129355, + 426522225, + 1852507879, + 4275313526, + 2312317920, + 282753626, + 1742555852, + 4189708143, + 2394877945, + 397917763, + 1622183637, + 3604390888, + 2714866558, + 953729732, + 1340076626, + 3518719985, + 2797360999, + 1068828381, + 1219638859, + 3624741850, + 2936675148, + 906185462, + 1090812512, + 3747672003, + 2825379669, + 829329135, + 1181335161, + 3412177804, + 3160834842, + 628085408, + 1382605366, + 3423369109, + 3138078467, + 570562233, + 1426400815, + 3317316542, + 2998733608, + 733239954, + 1555261956, + 3268935591, + 3050360625, + 752459403, + 1541320221, + 2607071920, + 3965973030, + 1969922972, + 40735498, + 2617837225, + 3943577151, + 1913087877, + 83908371, + 2512341634, + 3803740692, + 2075208622, + 213261112, + 2463272603, + 3855990285, + 2094854071, + 198958881, + 2262029012, + 4057260610, + 1759359992, + 534414190, + 2176718541, + 4139329115, + 1873836001, + 414664567, + 2282248934, + 4279200368, + 1711684554, + 285281116, + 2405801727, + 4167216745, + 1634467795, + 376229701, + 2685067896, + 3608007406, + 1308918612, + 956543938, + 2808555105, + 3495958263, + 1231636301, + 1047427035, + 2932959818, + 3654703836, + 1088359270, + 936918e3, + 2847714899, + 3736837829, + 1202900863, + 817233897, + 3183342108, + 3401237130, + 1404277552, + 615818150, + 3134207493, + 3453421203, + 1423857449, + 601450431, + 3009837614, + 3294710456, + 1567103746, + 711928724, + 3020668471, + 3272380065, + 1510334235, + 755167117 + ]; + lookupTable2 = uint32ArrayFrom(a_lookUpTable); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getCrc32ChecksumAlgorithmFunction.browser.js +var getCrc32ChecksumAlgorithmFunction; +var init_getCrc32ChecksumAlgorithmFunction_browser = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getCrc32ChecksumAlgorithmFunction.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_module3(); + getCrc32ChecksumAlgorithmFunction = /* @__PURE__ */ __name(() => AwsCrc32, "getCrc32ChecksumAlgorithmFunction"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/types.js +var CLIENT_SUPPORTED_ALGORITHMS, PRIORITY_ORDER_ALGORITHMS; +var init_types2 = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants3(); + CLIENT_SUPPORTED_ALGORITHMS = [ + ChecksumAlgorithm.CRC32, + ChecksumAlgorithm.CRC32C, + ChecksumAlgorithm.CRC64NVME, + ChecksumAlgorithm.SHA1, + ChecksumAlgorithm.SHA256 + ]; + PRIORITY_ORDER_ALGORITHMS = [ + ChecksumAlgorithm.SHA256, + ChecksumAlgorithm.SHA1, + ChecksumAlgorithm.CRC32, + ChecksumAlgorithm.CRC32C, + ChecksumAlgorithm.CRC64NVME + ]; + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/selectChecksumAlgorithmFunction.js +var selectChecksumAlgorithmFunction; +var init_selectChecksumAlgorithmFunction = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/selectChecksumAlgorithmFunction.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_module2(); + init_dist_es25(); + init_constants3(); + init_getCrc32ChecksumAlgorithmFunction_browser(); + init_types2(); + selectChecksumAlgorithmFunction = /* @__PURE__ */ __name((checksumAlgorithm, config3) => { + const { checksumAlgorithms = {} } = config3; + switch (checksumAlgorithm) { + case ChecksumAlgorithm.MD5: + return checksumAlgorithms?.MD5 ?? config3.md5; + case ChecksumAlgorithm.CRC32: + return checksumAlgorithms?.CRC32 ?? getCrc32ChecksumAlgorithmFunction(); + case ChecksumAlgorithm.CRC32C: + return checksumAlgorithms?.CRC32C ?? AwsCrc32c; + case ChecksumAlgorithm.CRC64NVME: + if (typeof crc64NvmeCrtContainer.CrtCrc64Nvme !== "function") { + return checksumAlgorithms?.CRC64NVME ?? Crc64Nvme; + } + return checksumAlgorithms?.CRC64NVME ?? crc64NvmeCrtContainer.CrtCrc64Nvme; + case ChecksumAlgorithm.SHA1: + return checksumAlgorithms?.SHA1 ?? config3.sha1; + case ChecksumAlgorithm.SHA256: + return checksumAlgorithms?.SHA256 ?? config3.sha256; + default: + if (checksumAlgorithms?.[checksumAlgorithm]) { + return checksumAlgorithms[checksumAlgorithm]; + } + throw new Error(`The checksum algorithm "${checksumAlgorithm}" is not supported by the client. Select one of ${CLIENT_SUPPORTED_ALGORITHMS}, or provide an implementation to the client constructor checksums field.`); + } + }, "selectChecksumAlgorithmFunction"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/stringHasher.js +var stringHasher; +var init_stringHasher = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/stringHasher.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es5(); + stringHasher = /* @__PURE__ */ __name((checksumAlgorithmFn, body) => { + const hash4 = new checksumAlgorithmFn(); + hash4.update(toUint8Array(body || "")); + return hash4.digest(); + }, "stringHasher"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsMiddleware.js +var flexibleChecksumsMiddlewareOptions, flexibleChecksumsMiddleware; +var init_flexibleChecksumsMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_dist_es2(); + init_dist_es11(); + init_constants3(); + init_getChecksumAlgorithmForRequest(); + init_getChecksumLocationName(); + init_hasHeader(); + init_hasHeaderWithPrefix(); + init_isStreaming(); + init_selectChecksumAlgorithmFunction(); + init_stringHasher(); + flexibleChecksumsMiddlewareOptions = { + name: "flexibleChecksumsMiddleware", + step: "build", + tags: ["BODY_CHECKSUM"], + override: true + }; + flexibleChecksumsMiddleware = /* @__PURE__ */ __name((config3, middlewareConfig) => (next, context2) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + if (hasHeaderWithPrefix("x-amz-checksum-", args.request.headers)) { + return next(args); + } + const { request, input } = args; + const { body: requestBody, headers } = request; + const { base64Encoder, streamHasher } = config3; + const { requestChecksumRequired, requestAlgorithmMember } = middlewareConfig; + const requestChecksumCalculation = await config3.requestChecksumCalculation(); + const requestAlgorithmMemberName = requestAlgorithmMember?.name; + const requestAlgorithmMemberHttpHeader = requestAlgorithmMember?.httpHeader; + if (requestAlgorithmMemberName && !input[requestAlgorithmMemberName]) { + if (requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired) { + input[requestAlgorithmMemberName] = DEFAULT_CHECKSUM_ALGORITHM; + if (requestAlgorithmMemberHttpHeader) { + headers[requestAlgorithmMemberHttpHeader] = DEFAULT_CHECKSUM_ALGORITHM; + } + } + } + const checksumAlgorithm = getChecksumAlgorithmForRequest(input, { + requestChecksumRequired, + requestAlgorithmMember: requestAlgorithmMember?.name, + requestChecksumCalculation + }); + let updatedBody = requestBody; + let updatedHeaders = headers; + if (checksumAlgorithm) { + switch (checksumAlgorithm) { + case ChecksumAlgorithm.CRC32: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_CRC32", "U"); + break; + case ChecksumAlgorithm.CRC32C: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_CRC32C", "V"); + break; + case ChecksumAlgorithm.CRC64NVME: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_CRC64", "W"); + break; + case ChecksumAlgorithm.SHA1: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_SHA1", "X"); + break; + case ChecksumAlgorithm.SHA256: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_SHA256", "Y"); + break; + } + const checksumLocationName = getChecksumLocationName(checksumAlgorithm); + const checksumAlgorithmFn = selectChecksumAlgorithmFunction(checksumAlgorithm, config3); + if (isStreaming(requestBody)) { + const { getAwsChunkedEncodingStream: getAwsChunkedEncodingStream2, bodyLengthChecker } = config3; + updatedBody = getAwsChunkedEncodingStream2(typeof config3.requestStreamBufferSize === "number" && config3.requestStreamBufferSize >= 8 * 1024 ? createBufferedReadable(requestBody, config3.requestStreamBufferSize, context2.logger) : requestBody, { + base64Encoder, + bodyLengthChecker, + checksumLocationName, + checksumAlgorithmFn, + streamHasher + }); + updatedHeaders = { + ...headers, + "content-encoding": headers["content-encoding"] ? `${headers["content-encoding"]},aws-chunked` : "aws-chunked", + "transfer-encoding": "chunked", + "x-amz-decoded-content-length": headers["content-length"], + "x-amz-content-sha256": "STREAMING-UNSIGNED-PAYLOAD-TRAILER", + "x-amz-trailer": checksumLocationName + }; + delete updatedHeaders["content-length"]; + } else if (!hasHeader2(checksumLocationName, headers)) { + const rawChecksum = await stringHasher(checksumAlgorithmFn, requestBody); + updatedHeaders = { + ...headers, + [checksumLocationName]: base64Encoder(rawChecksum) + }; + } + } + try { + const result = await next({ + ...args, + request: { + ...request, + headers: updatedHeaders, + body: updatedBody + } + }); + return result; + } catch (e2) { + if (e2 instanceof Error && e2.name === "InvalidChunkSizeError") { + try { + if (!e2.message.endsWith(".")) { + e2.message += "."; + } + e2.message += " Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."; + } catch (ignored) { + } + } + throw e2; + } + }, "flexibleChecksumsMiddleware"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsInputMiddleware.js +var flexibleChecksumsInputMiddlewareOptions, flexibleChecksumsInputMiddleware; +var init_flexibleChecksumsInputMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsInputMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_constants3(); + flexibleChecksumsInputMiddlewareOptions = { + name: "flexibleChecksumsInputMiddleware", + toMiddleware: "serializerMiddleware", + relation: "before", + tags: ["BODY_CHECKSUM"], + override: true + }; + flexibleChecksumsInputMiddleware = /* @__PURE__ */ __name((config3, middlewareConfig) => (next, context2) => async (args) => { + const input = args.input; + const { requestValidationModeMember } = middlewareConfig; + const requestChecksumCalculation = await config3.requestChecksumCalculation(); + const responseChecksumValidation = await config3.responseChecksumValidation(); + switch (requestChecksumCalculation) { + case RequestChecksumCalculation.WHEN_REQUIRED: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED", "a"); + break; + case RequestChecksumCalculation.WHEN_SUPPORTED: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED", "Z"); + break; + } + switch (responseChecksumValidation) { + case ResponseChecksumValidation.WHEN_REQUIRED: + setFeature(context2, "FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED", "c"); + break; + case ResponseChecksumValidation.WHEN_SUPPORTED: + setFeature(context2, "FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED", "b"); + break; + } + if (requestValidationModeMember && !input[requestValidationModeMember]) { + if (responseChecksumValidation === ResponseChecksumValidation.WHEN_SUPPORTED) { + input[requestValidationModeMember] = "ENABLED"; + } + } + return next(args); + }, "flexibleChecksumsInputMiddleware"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmListForResponse.js +var getChecksumAlgorithmListForResponse; +var init_getChecksumAlgorithmListForResponse = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmListForResponse.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types2(); + getChecksumAlgorithmListForResponse = /* @__PURE__ */ __name((responseAlgorithms = []) => { + const validChecksumAlgorithms = []; + for (const algorithm of PRIORITY_ORDER_ALGORITHMS) { + if (!responseAlgorithms.includes(algorithm) || !CLIENT_SUPPORTED_ALGORITHMS.includes(algorithm)) { + continue; + } + validChecksumAlgorithms.push(algorithm); + } + return validChecksumAlgorithms; + }, "getChecksumAlgorithmListForResponse"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isChecksumWithPartNumber.js +var isChecksumWithPartNumber; +var init_isChecksumWithPartNumber = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isChecksumWithPartNumber.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isChecksumWithPartNumber = /* @__PURE__ */ __name((checksum) => { + const lastHyphenIndex = checksum.lastIndexOf("-"); + if (lastHyphenIndex !== -1) { + const numberPart = checksum.slice(lastHyphenIndex + 1); + if (!numberPart.startsWith("0")) { + const number4 = parseInt(numberPart, 10); + if (!isNaN(number4) && number4 >= 1 && number4 <= 1e4) { + return true; + } + } + } + return false; + }, "isChecksumWithPartNumber"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksum.js +var getChecksum; +var init_getChecksum = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksum.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_stringHasher(); + getChecksum = /* @__PURE__ */ __name(async (body, { checksumAlgorithmFn, base64Encoder }) => base64Encoder(await stringHasher(checksumAlgorithmFn, body)), "getChecksum"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/validateChecksumFromResponse.js +var validateChecksumFromResponse; +var init_validateChecksumFromResponse = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/validateChecksumFromResponse.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es11(); + init_constants3(); + init_getChecksum(); + init_getChecksumAlgorithmListForResponse(); + init_getChecksumLocationName(); + init_isStreaming(); + init_selectChecksumAlgorithmFunction(); + validateChecksumFromResponse = /* @__PURE__ */ __name(async (response, { config: config3, responseAlgorithms, logger: logger3 }) => { + const checksumAlgorithms = getChecksumAlgorithmListForResponse(responseAlgorithms); + const { body: responseBody, headers: responseHeaders } = response; + for (const algorithm of checksumAlgorithms) { + const responseHeader = getChecksumLocationName(algorithm); + const checksumFromResponse = responseHeaders[responseHeader]; + if (checksumFromResponse) { + let checksumAlgorithmFn; + try { + checksumAlgorithmFn = selectChecksumAlgorithmFunction(algorithm, config3); + } catch (error50) { + if (algorithm === ChecksumAlgorithm.CRC64NVME) { + logger3?.warn(`Skipping ${ChecksumAlgorithm.CRC64NVME} checksum validation: ${error50.message}`); + continue; + } + throw error50; + } + const { base64Encoder } = config3; + if (isStreaming(responseBody)) { + response.body = createChecksumStream({ + expectedChecksum: checksumFromResponse, + checksumSourceLocation: responseHeader, + checksum: new checksumAlgorithmFn(), + source: responseBody, + base64Encoder + }); + return; + } + const checksum = await getChecksum(responseBody, { checksumAlgorithmFn, base64Encoder }); + if (checksum === checksumFromResponse) { + break; + } + throw new Error(`Checksum mismatch: expected "${checksum}" but received "${checksumFromResponse}" in response header "${responseHeader}".`); + } + } + }, "validateChecksumFromResponse"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsResponseMiddleware.js +var flexibleChecksumsResponseMiddlewareOptions, flexibleChecksumsResponseMiddleware; +var init_flexibleChecksumsResponseMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsResponseMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_getChecksumAlgorithmListForResponse(); + init_getChecksumLocationName(); + init_isChecksumWithPartNumber(); + init_validateChecksumFromResponse(); + flexibleChecksumsResponseMiddlewareOptions = { + name: "flexibleChecksumsResponseMiddleware", + toMiddleware: "deserializerMiddleware", + relation: "after", + tags: ["BODY_CHECKSUM"], + override: true + }; + flexibleChecksumsResponseMiddleware = /* @__PURE__ */ __name((config3, middlewareConfig) => (next, context2) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + const input = args.input; + const result = await next(args); + const response = result.response; + const { requestValidationModeMember, responseAlgorithms } = middlewareConfig; + if (requestValidationModeMember && input[requestValidationModeMember] === "ENABLED") { + const { clientName, commandName } = context2; + const isS3WholeObjectMultipartGetResponseChecksum = clientName === "S3Client" && commandName === "GetObjectCommand" && getChecksumAlgorithmListForResponse(responseAlgorithms).every((algorithm) => { + const responseHeader = getChecksumLocationName(algorithm); + const checksumFromResponse = response.headers[responseHeader]; + return !checksumFromResponse || isChecksumWithPartNumber(checksumFromResponse); + }); + if (isS3WholeObjectMultipartGetResponseChecksum) { + return result; + } + await validateChecksumFromResponse(response, { + config: config3, + responseAlgorithms, + logger: context2.logger + }); + } + return result; + }, "flexibleChecksumsResponseMiddleware"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getFlexibleChecksumsPlugin.js +var getFlexibleChecksumsPlugin; +var init_getFlexibleChecksumsPlugin = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getFlexibleChecksumsPlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_flexibleChecksumsInputMiddleware(); + init_flexibleChecksumsMiddleware(); + init_flexibleChecksumsResponseMiddleware(); + getFlexibleChecksumsPlugin = /* @__PURE__ */ __name((config3, middlewareConfig) => ({ + applyToStack: (clientStack) => { + clientStack.add(flexibleChecksumsMiddleware(config3, middlewareConfig), flexibleChecksumsMiddlewareOptions); + clientStack.addRelativeTo(flexibleChecksumsInputMiddleware(config3, middlewareConfig), flexibleChecksumsInputMiddlewareOptions); + clientStack.addRelativeTo(flexibleChecksumsResponseMiddleware(config3, middlewareConfig), flexibleChecksumsResponseMiddlewareOptions); + } + }), "getFlexibleChecksumsPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/resolveFlexibleChecksumsConfig.js +var resolveFlexibleChecksumsConfig; +var init_resolveFlexibleChecksumsConfig = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/resolveFlexibleChecksumsConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es4(); + init_constants3(); + resolveFlexibleChecksumsConfig = /* @__PURE__ */ __name((input) => { + const { requestChecksumCalculation, responseChecksumValidation, requestStreamBufferSize } = input; + return Object.assign(input, { + requestChecksumCalculation: normalizeProvider(requestChecksumCalculation ?? DEFAULT_REQUEST_CHECKSUM_CALCULATION), + responseChecksumValidation: normalizeProvider(responseChecksumValidation ?? DEFAULT_RESPONSE_CHECKSUM_VALIDATION), + requestStreamBufferSize: Number(requestStreamBufferSize ?? 0), + checksumAlgorithms: input.checksumAlgorithms ?? {} + }); + }, "resolveFlexibleChecksumsConfig"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/index.js +var init_dist_es26 = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS(); + init_NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS(); + init_constants3(); + init_flexibleChecksumsMiddleware(); + init_getFlexibleChecksumsPlugin(); + init_resolveFlexibleChecksumsConfig(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-host-header/dist-es/index.js +function resolveHostHeaderConfig(input) { + return input; +} +var hostHeaderMiddleware, hostHeaderMiddlewareOptions, getHostHeaderPlugin; +var init_dist_es27 = __esm({ + "../../node_modules/@aws-sdk/middleware-host-header/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + __name(resolveHostHeaderConfig, "resolveHostHeaderConfig"); + hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { + if (!HttpRequest.isInstance(args.request)) + return next(args); + const { request } = args; + const { handlerProtocol = "" } = options.requestHandler.metadata || {}; + if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { + delete request.headers["host"]; + request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : ""); + } else if (!request.headers["host"]) { + let host = request.hostname; + if (request.port != null) + host += `:${request.port}`; + request.headers["host"] = host; + } + return next(args); + }, "hostHeaderMiddleware"); + hostHeaderMiddlewareOptions = { + name: "hostHeaderMiddleware", + step: "build", + priority: "low", + tags: ["HOST"], + override: true + }; + getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); + } + }), "getHostHeaderPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js +var loggerMiddleware, loggerMiddlewareOptions, getLoggerPlugin; +var init_loggerMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + loggerMiddleware = /* @__PURE__ */ __name(() => (next, context2) => async (args) => { + try { + const response = await next(args); + const { clientName, commandName, logger: logger3, dynamoDbDocumentClientOptions = {} } = context2; + const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context2.inputFilterSensitiveLog; + const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context2.outputFilterSensitiveLog; + const { $metadata, ...outputWithoutMetadata } = response.output; + logger3?.info?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + output: outputFilterSensitiveLog(outputWithoutMetadata), + metadata: $metadata + }); + return response; + } catch (error50) { + const { clientName, commandName, logger: logger3, dynamoDbDocumentClientOptions = {} } = context2; + const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context2.inputFilterSensitiveLog; + logger3?.error?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + error: error50, + metadata: error50.$metadata + }); + throw error50; + } + }, "loggerMiddleware"); + loggerMiddlewareOptions = { + name: "loggerMiddleware", + tags: ["LOGGER"], + step: "initialize", + override: true + }; + getLoggerPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); + } + }), "getLoggerPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-logger/dist-es/index.js +var init_dist_es28 = __esm({ + "../../node_modules/@aws-sdk/middleware-logger/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_loggerMiddleware(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/configuration.js +var recursionDetectionMiddlewareOptions; +var init_configuration = __esm({ + "../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/configuration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + recursionDetectionMiddlewareOptions = { + step: "build", + tags: ["RECURSION_DETECTION"], + name: "recursionDetectionMiddleware", + override: true, + priority: "low" + }; + } +}); + +// ../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/recursionDetectionMiddleware.browser.js +var recursionDetectionMiddleware; +var init_recursionDetectionMiddleware_browser = __esm({ + "../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/recursionDetectionMiddleware.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + recursionDetectionMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => next(args), "recursionDetectionMiddleware"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/getRecursionDetectionPlugin.js +var getRecursionDetectionPlugin; +var init_getRecursionDetectionPlugin = __esm({ + "../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/getRecursionDetectionPlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_configuration(); + init_recursionDetectionMiddleware_browser(); + getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions); + } + }), "getRecursionDetectionPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/index.js +var init_dist_es29 = __esm({ + "../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getRecursionDetectionPlugin(); + init_recursionDetectionMiddleware_browser(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/check-content-length-header.js +function checkContentLengthHeader() { + return (next, context2) => async (args) => { + const { request } = args; + if (HttpRequest.isInstance(request)) { + if (!(CONTENT_LENGTH_HEADER in request.headers) && !(DECODED_CONTENT_LENGTH_HEADER in request.headers)) { + const message2 = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`; + if (typeof context2?.logger?.warn === "function" && !(context2.logger instanceof NoOpLogger)) { + context2.logger.warn(message2); + } else { + console.warn(message2); + } + } + } + return next({ ...args }); + }; +} +var CONTENT_LENGTH_HEADER, DECODED_CONTENT_LENGTH_HEADER, checkContentLengthHeaderMiddlewareOptions, getCheckContentLengthHeaderPlugin; +var init_check_content_length_header = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/check-content-length-header.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es21(); + CONTENT_LENGTH_HEADER = "content-length"; + DECODED_CONTENT_LENGTH_HEADER = "x-amz-decoded-content-length"; + __name(checkContentLengthHeader, "checkContentLengthHeader"); + checkContentLengthHeaderMiddlewareOptions = { + step: "finalizeRequest", + tags: ["CHECK_CONTENT_LENGTH_HEADER"], + name: "getCheckContentLengthHeaderPlugin", + override: true + }; + getCheckContentLengthHeaderPlugin = /* @__PURE__ */ __name((unused) => ({ + applyToStack: (clientStack) => { + clientStack.add(checkContentLengthHeader(), checkContentLengthHeaderMiddlewareOptions); + } + }), "getCheckContentLengthHeaderPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-endpoint-middleware.js +var regionRedirectEndpointMiddleware, regionRedirectEndpointMiddlewareOptions; +var init_region_redirect_endpoint_middleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-endpoint-middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + regionRedirectEndpointMiddleware = /* @__PURE__ */ __name((config3) => { + return (next, context2) => async (args) => { + const originalRegion = await config3.region(); + const regionProviderRef = config3.region; + let unlock = /* @__PURE__ */ __name(() => { + }, "unlock"); + if (context2.__s3RegionRedirect) { + Object.defineProperty(config3, "region", { + writable: false, + value: async () => { + return context2.__s3RegionRedirect; + } + }); + unlock = /* @__PURE__ */ __name(() => Object.defineProperty(config3, "region", { + writable: true, + value: regionProviderRef + }), "unlock"); + } + try { + const result = await next(args); + if (context2.__s3RegionRedirect) { + unlock(); + const region = await config3.region(); + if (originalRegion !== region) { + throw new Error("Region was not restored following S3 region redirect."); + } + } + return result; + } catch (e2) { + unlock(); + throw e2; + } + }; + }, "regionRedirectEndpointMiddleware"); + regionRedirectEndpointMiddlewareOptions = { + tags: ["REGION_REDIRECT", "S3"], + name: "regionRedirectEndpointMiddleware", + override: true, + relation: "before", + toMiddleware: "endpointV2Middleware" + }; + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-middleware.js +function regionRedirectMiddleware(clientConfig) { + return (next, context2) => async (args) => { + try { + return await next(args); + } catch (err) { + if (clientConfig.followRegionRedirects) { + const statusCode = err?.$metadata?.httpStatusCode; + const isHeadBucket = context2.commandName === "HeadBucketCommand"; + const bucketRegionHeader = err?.$response?.headers?.["x-amz-bucket-region"]; + if (bucketRegionHeader) { + if (statusCode === 301 || statusCode === 400 && (err?.name === "IllegalLocationConstraintException" || isHeadBucket)) { + try { + const actualRegion = bucketRegionHeader; + context2.logger?.debug(`Redirecting from ${await clientConfig.region()} to ${actualRegion}`); + context2.__s3RegionRedirect = actualRegion; + } catch (e2) { + throw new Error("Region redirect failed: " + e2); + } + return next(args); + } + } + } + throw err; + } + }; +} +var regionRedirectMiddlewareOptions, getRegionRedirectMiddlewarePlugin; +var init_region_redirect_middleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_region_redirect_endpoint_middleware(); + __name(regionRedirectMiddleware, "regionRedirectMiddleware"); + regionRedirectMiddlewareOptions = { + step: "initialize", + tags: ["REGION_REDIRECT", "S3"], + name: "regionRedirectMiddleware", + override: true + }; + getRegionRedirectMiddlewarePlugin = /* @__PURE__ */ __name((clientConfig) => ({ + applyToStack: (clientStack) => { + clientStack.add(regionRedirectMiddleware(clientConfig), regionRedirectMiddlewareOptions); + clientStack.addRelativeTo(regionRedirectEndpointMiddleware(clientConfig), regionRedirectEndpointMiddlewareOptions); + } + }), "getRegionRedirectMiddlewarePlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-expires-middleware.js +var s3ExpiresMiddleware, s3ExpiresMiddlewareOptions, getS3ExpiresMiddlewarePlugin; +var init_s3_expires_middleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-expires-middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es21(); + s3ExpiresMiddleware = /* @__PURE__ */ __name((config3) => { + return (next, context2) => async (args) => { + const result = await next(args); + const { response } = result; + if (HttpResponse.isInstance(response)) { + if (response.headers.expires) { + response.headers.expiresstring = response.headers.expires; + try { + parseRfc7231DateTime(response.headers.expires); + } catch (e2) { + context2.logger?.warn(`AWS SDK Warning for ${context2.clientName}::${context2.commandName} response parsing (${response.headers.expires}): ${e2}`); + delete response.headers.expires; + } + } + } + return result; + }; + }, "s3ExpiresMiddleware"); + s3ExpiresMiddlewareOptions = { + tags: ["S3"], + name: "s3ExpiresMiddleware", + override: true, + relation: "after", + toMiddleware: "deserializerMiddleware" + }; + getS3ExpiresMiddlewarePlugin = /* @__PURE__ */ __name((clientConfig) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(s3ExpiresMiddleware(clientConfig), s3ExpiresMiddlewareOptions); + } + }), "getS3ExpiresMiddlewarePlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCache.js +var _S3ExpressIdentityCache, S3ExpressIdentityCache; +var init_S3ExpressIdentityCache = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCache.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + _S3ExpressIdentityCache = class { + data; + lastPurgeTime = Date.now(); + constructor(data = {}) { + this.data = data; + } + get(key) { + const entry = this.data[key]; + if (!entry) { + return; + } + return entry; + } + set(key, entry) { + this.data[key] = entry; + return entry; + } + delete(key) { + delete this.data[key]; + } + async purgeExpired() { + const now = Date.now(); + if (this.lastPurgeTime + _S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS > now) { + return; + } + for (const key in this.data) { + const entry = this.data[key]; + if (!entry.isRefreshing) { + const credential = await entry.identity; + if (credential.expiration) { + if (credential.expiration.getTime() < now) { + delete this.data[key]; + } + } + } + } + } + }; + S3ExpressIdentityCache = _S3ExpressIdentityCache; + __name(S3ExpressIdentityCache, "S3ExpressIdentityCache"); + __publicField(S3ExpressIdentityCache, "EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS", 3e4); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCacheEntry.js +var S3ExpressIdentityCacheEntry; +var init_S3ExpressIdentityCacheEntry = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCacheEntry.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + S3ExpressIdentityCacheEntry = class { + _identity; + isRefreshing; + accessed; + constructor(_identity, isRefreshing = false, accessed = Date.now()) { + this._identity = _identity; + this.isRefreshing = isRefreshing; + this.accessed = accessed; + } + get identity() { + this.accessed = Date.now(); + return this._identity; + } + }; + __name(S3ExpressIdentityCacheEntry, "S3ExpressIdentityCacheEntry"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityProviderImpl.js +var _S3ExpressIdentityProviderImpl, S3ExpressIdentityProviderImpl; +var init_S3ExpressIdentityProviderImpl = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityProviderImpl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_S3ExpressIdentityCache(); + init_S3ExpressIdentityCacheEntry(); + _S3ExpressIdentityProviderImpl = class { + createSessionFn; + cache; + constructor(createSessionFn, cache3 = new S3ExpressIdentityCache()) { + this.createSessionFn = createSessionFn; + this.cache = cache3; + } + async getS3ExpressIdentity(awsIdentity, identityProperties) { + const key = identityProperties.Bucket; + const { cache: cache3 } = this; + const entry = cache3.get(key); + if (entry) { + return entry.identity.then((identity2) => { + const isExpired = (identity2.expiration?.getTime() ?? 0) < Date.now(); + if (isExpired) { + return cache3.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity; + } + const isExpiringSoon = (identity2.expiration?.getTime() ?? 0) < Date.now() + _S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS; + if (isExpiringSoon && !entry.isRefreshing) { + entry.isRefreshing = true; + this.getIdentity(key).then((id) => { + cache3.set(key, new S3ExpressIdentityCacheEntry(Promise.resolve(id))); + }); + } + return identity2; + }); + } + return cache3.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity; + } + async getIdentity(key) { + await this.cache.purgeExpired().catch((error50) => { + console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n" + error50); + }); + const session = await this.createSessionFn(key); + if (!session.Credentials?.AccessKeyId || !session.Credentials?.SecretAccessKey) { + throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey."); + } + const identity2 = { + accessKeyId: session.Credentials.AccessKeyId, + secretAccessKey: session.Credentials.SecretAccessKey, + sessionToken: session.Credentials.SessionToken, + expiration: session.Credentials.Expiration ? new Date(session.Credentials.Expiration) : void 0 + }; + return identity2; + } + }; + S3ExpressIdentityProviderImpl = _S3ExpressIdentityProviderImpl; + __name(S3ExpressIdentityProviderImpl, "S3ExpressIdentityProviderImpl"); + __publicField(S3ExpressIdentityProviderImpl, "REFRESH_WINDOW_MS", 6e4); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/constants.js +var S3_EXPRESS_BUCKET_TYPE, S3_EXPRESS_BACKEND, S3_EXPRESS_AUTH_SCHEME, SESSION_TOKEN_QUERY_PARAM, SESSION_TOKEN_HEADER; +var init_constants6 = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + S3_EXPRESS_BUCKET_TYPE = "Directory"; + S3_EXPRESS_BACKEND = "S3Express"; + S3_EXPRESS_AUTH_SCHEME = "sigv4-s3express"; + SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token"; + SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/SignatureV4S3Express.js +function getCredentialsWithoutSessionToken(credentials) { + const credentialsWithoutSessionToken = { + accessKeyId: credentials.accessKeyId, + secretAccessKey: credentials.secretAccessKey, + expiration: credentials.expiration + }; + return credentialsWithoutSessionToken; +} +function setSingleOverride(privateAccess, credentialsWithoutSessionToken) { + const id = setTimeout(() => { + throw new Error("SignatureV4S3Express credential override was created but not called."); + }, 10); + const currentCredentialProvider = privateAccess.credentialProvider; + const overrideCredentialsProviderOnce = /* @__PURE__ */ __name(() => { + clearTimeout(id); + privateAccess.credentialProvider = currentCredentialProvider; + return Promise.resolve(credentialsWithoutSessionToken); + }, "overrideCredentialsProviderOnce"); + privateAccess.credentialProvider = overrideCredentialsProviderOnce; +} +var SignatureV4S3Express; +var init_SignatureV4S3Express = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/SignatureV4S3Express.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es18(); + init_constants6(); + SignatureV4S3Express = class extends SignatureV4 { + async signWithCredentials(requestToSign, credentials, options) { + const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); + requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken; + const privateAccess = this; + setSingleOverride(privateAccess, credentialsWithoutSessionToken); + return privateAccess.signRequest(requestToSign, options ?? {}); + } + async presignWithCredentials(requestToSign, credentials, options) { + const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); + delete requestToSign.headers[SESSION_TOKEN_HEADER]; + requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; + requestToSign.query = requestToSign.query ?? {}; + requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; + const privateAccess = this; + setSingleOverride(privateAccess, credentialsWithoutSessionToken); + return this.presign(requestToSign, options); + } + }; + __name(SignatureV4S3Express, "SignatureV4S3Express"); + __name(getCredentialsWithoutSessionToken, "getCredentialsWithoutSessionToken"); + __name(setSingleOverride, "setSingleOverride"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressMiddleware.js +var s3ExpressMiddleware, s3ExpressMiddlewareOptions, getS3ExpressPlugin; +var init_s3ExpressMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_dist_es2(); + init_constants6(); + s3ExpressMiddleware = /* @__PURE__ */ __name((options) => { + return (next, context2) => async (args) => { + if (context2.endpointV2) { + const endpoint = context2.endpointV2; + const isS3ExpressAuth = endpoint.properties?.authSchemes?.[0]?.name === S3_EXPRESS_AUTH_SCHEME; + const isS3ExpressBucket = endpoint.properties?.backend === S3_EXPRESS_BACKEND || endpoint.properties?.bucketType === S3_EXPRESS_BUCKET_TYPE; + if (isS3ExpressBucket) { + setFeature(context2, "S3_EXPRESS_BUCKET", "J"); + context2.isS3ExpressBucket = true; + } + if (isS3ExpressAuth) { + const requestBucket = args.input.Bucket; + if (requestBucket) { + const s3ExpressIdentity = await options.s3ExpressIdentityProvider.getS3ExpressIdentity(await options.credentials(), { + Bucket: requestBucket + }); + context2.s3ExpressIdentity = s3ExpressIdentity; + if (HttpRequest.isInstance(args.request) && s3ExpressIdentity.sessionToken) { + args.request.headers[SESSION_TOKEN_HEADER] = s3ExpressIdentity.sessionToken; + } + } + } + } + return next(args); + }; + }, "s3ExpressMiddleware"); + s3ExpressMiddlewareOptions = { + name: "s3ExpressMiddleware", + step: "build", + tags: ["S3", "S3_EXPRESS"], + override: true + }; + getS3ExpressPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(s3ExpressMiddleware(options), s3ExpressMiddlewareOptions); + } + }), "getS3ExpressPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/signS3Express.js +var signS3Express; +var init_signS3Express = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/signS3Express.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + signS3Express = /* @__PURE__ */ __name(async (s3ExpressIdentity, signingOptions, request, sigV4MultiRegionSigner) => { + const signedRequest = await sigV4MultiRegionSigner.signWithCredentials(request, s3ExpressIdentity, {}); + if (signedRequest.headers["X-Amz-Security-Token"] || signedRequest.headers["x-amz-security-token"]) { + throw new Error("X-Amz-Security-Token must not be set for s3-express requests."); + } + return signedRequest; + }, "signS3Express"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressHttpSigningMiddleware.js +var defaultErrorHandler2, defaultSuccessHandler2, s3ExpressHttpSigningMiddleware, getS3ExpressHttpSigningPlugin; +var init_s3ExpressHttpSigningMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressHttpSigningMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_dist_es2(); + init_dist_es4(); + init_signS3Express(); + defaultErrorHandler2 = /* @__PURE__ */ __name((signingProperties) => (error50) => { + throw error50; + }, "defaultErrorHandler"); + defaultSuccessHandler2 = /* @__PURE__ */ __name((httpResponse, signingProperties) => { + }, "defaultSuccessHandler"); + s3ExpressHttpSigningMiddleware = /* @__PURE__ */ __name((config3) => (next, context2) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + const smithyContext = getSmithyContext(context2); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + } + const { httpAuthOption: { signingProperties = {} }, identity: identity2, signer } = scheme; + let request; + if (context2.s3ExpressIdentity) { + request = await signS3Express(context2.s3ExpressIdentity, signingProperties, args.request, await config3.signer()); + } else { + request = await signer.sign(args.request, identity2, signingProperties); + } + const output = await next({ + ...args, + request + }).catch((signer.errorHandler || defaultErrorHandler2)(signingProperties)); + (signer.successHandler || defaultSuccessHandler2)(output.response, signingProperties); + return output; + }, "s3ExpressHttpSigningMiddleware"); + getS3ExpressHttpSigningPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(s3ExpressHttpSigningMiddleware(config3), httpSigningMiddlewareOptions); + } + }), "getS3ExpressHttpSigningPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/index.js +var init_s3_express = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_S3ExpressIdentityProviderImpl(); + init_SignatureV4S3Express(); + init_s3ExpressMiddleware(); + init_s3ExpressHttpSigningMiddleware(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3Configuration.js +var resolveS3Config; +var init_s3Configuration = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3Configuration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_s3_express(); + resolveS3Config = /* @__PURE__ */ __name((input, { session }) => { + const [s3ClientProvider, CreateSessionCommandCtor] = session; + const { forcePathStyle, useAccelerateEndpoint, disableMultiregionAccessPoints, followRegionRedirects, s3ExpressIdentityProvider, bucketEndpoint, expectContinueHeader } = input; + return Object.assign(input, { + forcePathStyle: forcePathStyle ?? false, + useAccelerateEndpoint: useAccelerateEndpoint ?? false, + disableMultiregionAccessPoints: disableMultiregionAccessPoints ?? false, + followRegionRedirects: followRegionRedirects ?? false, + s3ExpressIdentityProvider: s3ExpressIdentityProvider ?? new S3ExpressIdentityProviderImpl(async (key) => s3ClientProvider().send(new CreateSessionCommandCtor({ + Bucket: key + }))), + bucketEndpoint: bucketEndpoint ?? false, + expectContinueHeader: expectContinueHeader ?? 2097152 + }); + }, "resolveS3Config"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js +var THROW_IF_EMPTY_BODY, MAX_BYTES_TO_INSPECT, throw200ExceptionsMiddleware, collectBody2, throw200ExceptionsMiddlewareOptions, getThrow200ExceptionsPlugin; +var init_throw_200_exceptions = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es11(); + THROW_IF_EMPTY_BODY = { + CopyObjectCommand: true, + UploadPartCopyCommand: true, + CompleteMultipartUploadCommand: true + }; + MAX_BYTES_TO_INSPECT = 3e3; + throw200ExceptionsMiddleware = /* @__PURE__ */ __name((config3) => (next, context2) => async (args) => { + const result = await next(args); + const { response } = result; + if (!HttpResponse.isInstance(response)) { + return result; + } + const { statusCode, body: sourceBody } = response; + if (statusCode < 200 || statusCode >= 300) { + return result; + } + const isSplittableStream = typeof sourceBody?.stream === "function" || typeof sourceBody?.pipe === "function" || typeof sourceBody?.tee === "function"; + if (!isSplittableStream) { + return result; + } + let bodyCopy = sourceBody; + let body = sourceBody; + if (sourceBody && typeof sourceBody === "object" && !(sourceBody instanceof Uint8Array)) { + [bodyCopy, body] = await splitStream(sourceBody); + } + response.body = body; + const bodyBytes = await collectBody2(bodyCopy, { + streamCollector: async (stream) => { + return headStream(stream, MAX_BYTES_TO_INSPECT); + } + }); + if (typeof bodyCopy?.destroy === "function") { + bodyCopy.destroy(); + } + const bodyStringTail = config3.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16)); + if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context2.commandName]) { + const err = new Error("S3 aborted request"); + err.name = "InternalError"; + throw err; + } + if (bodyStringTail && bodyStringTail.endsWith("")) { + response.statusCode = 400; + } + return result; + }, "throw200ExceptionsMiddleware"); + collectBody2 = /* @__PURE__ */ __name((streamBody = new Uint8Array(), context2) => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context2.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); + }, "collectBody"); + throw200ExceptionsMiddlewareOptions = { + relation: "after", + toMiddleware: "deserializerMiddleware", + tags: ["THROW_200_EXCEPTIONS", "S3"], + name: "throw200ExceptionsMiddleware", + override: true + }; + getThrow200ExceptionsPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(throw200ExceptionsMiddleware(config3), throw200ExceptionsMiddlewareOptions); + } + }), "getThrow200ExceptionsPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/util-arn-parser/dist-es/index.js +var validate; +var init_dist_es30 = __esm({ + "../../node_modules/@aws-sdk/util-arn-parser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + validate = /* @__PURE__ */ __name((str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6, "validate"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/bucket-endpoint-middleware.js +function bucketEndpointMiddleware(options) { + return (next, context2) => async (args) => { + if (options.bucketEndpoint) { + const endpoint = context2.endpointV2; + if (endpoint) { + const bucket = args.input.Bucket; + if (typeof bucket === "string") { + try { + const bucketEndpointUrl = new URL(bucket); + context2.endpointV2 = { + ...endpoint, + url: bucketEndpointUrl + }; + } catch (e2) { + const warning = `@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${bucket} could not be parsed as URL.`; + if (context2.logger?.constructor?.name === "NoOpLogger") { + console.warn(warning); + } else { + context2.logger?.warn?.(warning); + } + throw e2; + } + } + } + } + return next(args); + }; +} +var bucketEndpointMiddlewareOptions; +var init_bucket_endpoint_middleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/bucket-endpoint-middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(bucketEndpointMiddleware, "bucketEndpointMiddleware"); + bucketEndpointMiddlewareOptions = { + name: "bucketEndpointMiddleware", + override: true, + relation: "after", + toMiddleware: "endpointV2Middleware" + }; + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/validate-bucket-name.js +function validateBucketNameMiddleware({ bucketEndpoint }) { + return (next) => async (args) => { + const { input: { Bucket } } = args; + if (!bucketEndpoint && typeof Bucket === "string" && !validate(Bucket) && Bucket.indexOf("/") >= 0) { + const err = new Error(`Bucket name shouldn't contain '/', received '${Bucket}'`); + err.name = "InvalidBucketName"; + throw err; + } + return next({ ...args }); + }; +} +var validateBucketNameMiddlewareOptions, getValidateBucketNamePlugin; +var init_validate_bucket_name = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/validate-bucket-name.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es30(); + init_bucket_endpoint_middleware(); + __name(validateBucketNameMiddleware, "validateBucketNameMiddleware"); + validateBucketNameMiddlewareOptions = { + step: "initialize", + tags: ["VALIDATE_BUCKET_NAME"], + name: "validateBucketNameMiddleware", + override: true + }; + getValidateBucketNamePlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(validateBucketNameMiddleware(options), validateBucketNameMiddlewareOptions); + clientStack.addRelativeTo(bucketEndpointMiddleware(options), bucketEndpointMiddlewareOptions); + } + }), "getValidateBucketNamePlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/index.js +var init_dist_es31 = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_check_content_length_header(); + init_region_redirect_endpoint_middleware(); + init_region_redirect_middleware(); + init_s3_expires_middleware(); + init_s3_express(); + init_s3Configuration(); + init_throw_200_exceptions(); + init_validate_bucket_name(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js +function isValidUserAgentAppId(appId) { + if (appId === void 0) { + return true; + } + return typeof appId === "string" && appId.length <= 50; +} +function resolveUserAgentConfig(input) { + const normalizedAppIdProvider = normalizeProvider2(input.userAgentAppId ?? DEFAULT_UA_APP_ID); + const { customUserAgent } = input; + return Object.assign(input, { + customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent, + userAgentAppId: async () => { + const appId = await normalizedAppIdProvider(); + if (!isValidUserAgentAppId(appId)) { + const logger3 = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger; + if (typeof appId !== "string") { + logger3?.warn("userAgentAppId must be a string or undefined."); + } else if (appId.length > 50) { + logger3?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters."); + } + } + return appId; + } + }); +} +var DEFAULT_UA_APP_ID; +var init_configurations = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + DEFAULT_UA_APP_ID = void 0; + __name(isValidUserAgentAppId, "isValidUserAgentAppId"); + __name(resolveUserAgentConfig, "resolveUserAgentConfig"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/cache/EndpointCache.js +var EndpointCache; +var init_EndpointCache = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/cache/EndpointCache.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + EndpointCache = class { + capacity; + data = /* @__PURE__ */ new Map(); + parameters = []; + constructor({ size, params }) { + this.capacity = size ?? 50; + if (params) { + this.parameters = params; + } + } + get(endpointParams, resolver) { + const key = this.hash(endpointParams); + if (key === false) { + return resolver(); + } + if (!this.data.has(key)) { + if (this.data.size > this.capacity + 10) { + const keys = this.data.keys(); + let i2 = 0; + while (true) { + const { value, done } = keys.next(); + this.data.delete(value); + if (done || ++i2 > 10) { + break; + } + } + } + this.data.set(key, resolver()); + } + return this.data.get(key); + } + size() { + return this.data.size; + } + hash(endpointParams) { + let buffer = ""; + const { parameters } = this; + if (parameters.length === 0) { + return false; + } + for (const param of parameters) { + const val = String(endpointParams[param] ?? ""); + if (val.includes("|;")) { + return false; + } + buffer += val + "|;"; + } + return buffer; + } + }; + __name(EndpointCache, "EndpointCache"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/isIpAddress.js +var IP_V4_REGEX, isIpAddress; +var init_isIpAddress = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/isIpAddress.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`); + isIpAddress = /* @__PURE__ */ __name((value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"), "isIpAddress"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/isValidHostLabel.js +var VALID_HOST_LABEL_REGEX, isValidHostLabel; +var init_isValidHostLabel = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/isValidHostLabel.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); + isValidHostLabel = /* @__PURE__ */ __name((value, allowSubDomains = false) => { + if (!allowSubDomains) { + return VALID_HOST_LABEL_REGEX.test(value); + } + const labels = value.split("."); + for (const label of labels) { + if (!isValidHostLabel(label)) { + return false; + } + } + return true; + }, "isValidHostLabel"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/customEndpointFunctions.js +var customEndpointFunctions; +var init_customEndpointFunctions = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/customEndpointFunctions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + customEndpointFunctions = {}; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/debug/debugId.js +var debugId; +var init_debugId = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/debug/debugId.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + debugId = "endpoints"; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/debug/toDebugString.js +function toDebugString(input) { + if (typeof input !== "object" || input == null) { + return input; + } + if ("ref" in input) { + return `$${toDebugString(input.ref)}`; + } + if ("fn" in input) { + return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; + } + return JSON.stringify(input, null, 2); +} +var init_toDebugString = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/debug/toDebugString.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(toDebugString, "toDebugString"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/debug/index.js +var init_debug = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/debug/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_debugId(); + init_toDebugString(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointError.js +var EndpointError; +var init_EndpointError = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointError.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + EndpointError = class extends Error { + constructor(message2) { + super(message2); + this.name = "EndpointError"; + } + }; + __name(EndpointError, "EndpointError"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointFunctions.js +var init_EndpointFunctions = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointFunctions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointRuleObject.js +var init_EndpointRuleObject2 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/ErrorRuleObject.js +var init_ErrorRuleObject2 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/ErrorRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/RuleSetObject.js +var init_RuleSetObject2 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/RuleSetObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/TreeRuleObject.js +var init_TreeRuleObject2 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/TreeRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/shared.js +var init_shared2 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/shared.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/index.js +var init_types3 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EndpointError(); + init_EndpointFunctions(); + init_EndpointRuleObject2(); + init_ErrorRuleObject2(); + init_RuleSetObject2(); + init_TreeRuleObject2(); + init_shared2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/booleanEquals.js +var booleanEquals; +var init_booleanEquals = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/booleanEquals.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + booleanEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "booleanEquals"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js +var getAttrPathList; +var init_getAttrPathList = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + getAttrPathList = /* @__PURE__ */ __name((path) => { + const parts = path.split("."); + const pathList = []; + for (const part of parts) { + const squareBracketIndex = part.indexOf("["); + if (squareBracketIndex !== -1) { + if (part.indexOf("]") !== part.length - 1) { + throw new EndpointError(`Path: '${path}' does not end with ']'`); + } + const arrayIndex = part.slice(squareBracketIndex + 1, -1); + if (Number.isNaN(parseInt(arrayIndex))) { + throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`); + } + if (squareBracketIndex !== 0) { + pathList.push(part.slice(0, squareBracketIndex)); + } + pathList.push(arrayIndex); + } else { + pathList.push(part); + } + } + return pathList; + }, "getAttrPathList"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js +var getAttr; +var init_getAttr = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_getAttrPathList(); + getAttr = /* @__PURE__ */ __name((value, path) => getAttrPathList(path).reduce((acc, index) => { + if (typeof acc !== "object") { + throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`); + } else if (Array.isArray(acc)) { + return acc[parseInt(index)]; + } + return acc[index]; + }, value), "getAttr"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/isSet.js +var isSet; +var init_isSet = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/isSet.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isSet = /* @__PURE__ */ __name((value) => value != null, "isSet"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/not.js +var not2; +var init_not = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/not.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + not2 = /* @__PURE__ */ __name((value) => !value, "not"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/parseURL.js +var DEFAULT_PORTS, parseURL; +var init_parseURL = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/parseURL.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es(); + init_isIpAddress(); + DEFAULT_PORTS = { + [EndpointURLScheme.HTTP]: 80, + [EndpointURLScheme.HTTPS]: 443 + }; + parseURL = /* @__PURE__ */ __name((value) => { + const whatwgURL = (() => { + try { + if (value instanceof URL) { + return value; + } + if (typeof value === "object" && "hostname" in value) { + const { hostname: hostname4, port, protocol: protocol2 = "", path = "", query = {} } = value; + const url2 = new URL(`${protocol2}//${hostname4}${port ? `:${port}` : ""}${path}`); + url2.search = Object.entries(query).map(([k2, v3]) => `${k2}=${v3}`).join("&"); + return url2; + } + return new URL(value); + } catch (error50) { + return null; + } + })(); + if (!whatwgURL) { + console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); + return null; + } + const urlString = whatwgURL.href; + const { host, hostname: hostname3, pathname, protocol, search } = whatwgURL; + if (search) { + return null; + } + const scheme = protocol.slice(0, -1); + if (!Object.values(EndpointURLScheme).includes(scheme)) { + return null; + } + const isIp = isIpAddress(hostname3); + const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`); + const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`; + return { + scheme, + authority, + path: pathname, + normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, + isIp + }; + }, "parseURL"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/stringEquals.js +var stringEquals; +var init_stringEquals = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/stringEquals.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + stringEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "stringEquals"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/substring.js +var substring; +var init_substring = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/substring.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + substring = /* @__PURE__ */ __name((input, start, stop, reverse) => { + if (start >= stop || input.length < stop || /[^\u0000-\u007f]/.test(input)) { + return null; + } + if (!reverse) { + return input.substring(start, stop); + } + return input.substring(input.length - stop, input.length - start); + }, "substring"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/uriEncode.js +var uriEncode; +var init_uriEncode = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/uriEncode.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + uriEncode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/[!*'()]/g, (c2) => `%${c2.charCodeAt(0).toString(16).toUpperCase()}`), "uriEncode"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/index.js +var init_lib = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_booleanEquals(); + init_getAttr(); + init_isSet(); + init_isValidHostLabel(); + init_not(); + init_parseURL(); + init_stringEquals(); + init_substring(); + init_uriEncode(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js +var endpointFunctions; +var init_endpointFunctions = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_lib(); + endpointFunctions = { + booleanEquals, + getAttr, + isSet, + isValidHostLabel, + not: not2, + parseURL, + stringEquals, + substring, + uriEncode + }; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js +var evaluateTemplate; +var init_evaluateTemplate = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_lib(); + evaluateTemplate = /* @__PURE__ */ __name((template, options) => { + const evaluatedTemplateArr = []; + const templateContext = { + ...options.endpointParams, + ...options.referenceRecord + }; + let currentIndex = 0; + while (currentIndex < template.length) { + const openingBraceIndex = template.indexOf("{", currentIndex); + if (openingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(currentIndex)); + break; + } + evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); + const closingBraceIndex = template.indexOf("}", openingBraceIndex); + if (closingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(openingBraceIndex)); + break; + } + if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { + evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); + currentIndex = closingBraceIndex + 2; + } + const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); + if (parameterName.includes("#")) { + const [refName, attrName] = parameterName.split("#"); + evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName)); + } else { + evaluatedTemplateArr.push(templateContext[parameterName]); + } + currentIndex = closingBraceIndex + 1; + } + return evaluatedTemplateArr.join(""); + }, "evaluateTemplate"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js +var getReferenceValue; +var init_getReferenceValue = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getReferenceValue = /* @__PURE__ */ __name(({ ref }, options) => { + const referenceRecord = { + ...options.endpointParams, + ...options.referenceRecord + }; + return referenceRecord[ref]; + }, "getReferenceValue"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js +var evaluateExpression, callFunction, group3; +var init_evaluateExpression = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_customEndpointFunctions(); + init_endpointFunctions(); + init_evaluateTemplate(); + init_getReferenceValue(); + evaluateExpression = /* @__PURE__ */ __name((obj, keyName, options) => { + if (typeof obj === "string") { + return evaluateTemplate(obj, options); + } else if (obj["fn"]) { + return group3.callFunction(obj, options); + } else if (obj["ref"]) { + return getReferenceValue(obj, options); + } + throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`); + }, "evaluateExpression"); + callFunction = /* @__PURE__ */ __name(({ fn, argv: argv2 }, options) => { + const evaluatedArgs = argv2.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : group3.evaluateExpression(arg, "arg", options)); + const fnSegments = fn.split("."); + if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) { + return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs); + } + return endpointFunctions[fn](...evaluatedArgs); + }, "callFunction"); + group3 = { + evaluateExpression, + callFunction + }; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/callFunction.js +var init_callFunction = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/callFunction.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_evaluateExpression(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js +var evaluateCondition; +var init_evaluateCondition = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_debug(); + init_types3(); + init_callFunction(); + evaluateCondition = /* @__PURE__ */ __name(({ assign, ...fnArgs }, options) => { + if (assign && assign in options.referenceRecord) { + throw new EndpointError(`'${assign}' is already defined in Reference Record.`); + } + const value = callFunction(fnArgs, options); + options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`); + return { + result: value === "" ? true : !!value, + ...assign != null && { toAssign: { name: assign, value } } + }; + }, "evaluateCondition"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js +var evaluateConditions; +var init_evaluateConditions = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_debug(); + init_evaluateCondition(); + evaluateConditions = /* @__PURE__ */ __name((conditions = [], options) => { + const conditionsReferenceRecord = {}; + for (const condition of conditions) { + const { result, toAssign } = evaluateCondition(condition, { + ...options, + referenceRecord: { + ...options.referenceRecord, + ...conditionsReferenceRecord + } + }); + if (!result) { + return { result }; + } + if (toAssign) { + conditionsReferenceRecord[toAssign.name] = toAssign.value; + options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`); + } + } + return { result: true, referenceRecord: conditionsReferenceRecord }; + }, "evaluateConditions"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js +var getEndpointHeaders; +var init_getEndpointHeaders = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_evaluateExpression(); + getEndpointHeaders = /* @__PURE__ */ __name((headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({ + ...acc, + [headerKey]: headerVal.map((headerValEntry) => { + const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options); + if (typeof processedExpr !== "string") { + throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`); + } + return processedExpr; + }) + }), {}), "getEndpointHeaders"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js +var getEndpointProperties, getEndpointProperty, group4; +var init_getEndpointProperties = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_evaluateTemplate(); + getEndpointProperties = /* @__PURE__ */ __name((properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({ + ...acc, + [propertyKey]: group4.getEndpointProperty(propertyVal, options) + }), {}), "getEndpointProperties"); + getEndpointProperty = /* @__PURE__ */ __name((property, options) => { + if (Array.isArray(property)) { + return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); + } + switch (typeof property) { + case "string": + return evaluateTemplate(property, options); + case "object": + if (property === null) { + throw new EndpointError(`Unexpected endpoint property: ${property}`); + } + return group4.getEndpointProperties(property, options); + case "boolean": + return property; + default: + throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`); + } + }, "getEndpointProperty"); + group4 = { + getEndpointProperty, + getEndpointProperties + }; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointUrl.js +var getEndpointUrl; +var init_getEndpointUrl = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointUrl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_evaluateExpression(); + getEndpointUrl = /* @__PURE__ */ __name((endpointUrl, options) => { + const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); + if (typeof expression === "string") { + try { + return new URL(expression); + } catch (error50) { + console.error(`Failed to construct URL with ${expression}`, error50); + throw error50; + } + } + throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`); + }, "getEndpointUrl"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js +var evaluateEndpointRule; +var init_evaluateEndpointRule = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_debug(); + init_evaluateConditions(); + init_getEndpointHeaders(); + init_getEndpointProperties(); + init_getEndpointUrl(); + evaluateEndpointRule = /* @__PURE__ */ __name((endpointRule, options) => { + const { conditions, endpoint } = endpointRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + const endpointRuleOptions = { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }; + const { url: url2, properties, headers } = endpoint; + options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`); + return { + ...headers != void 0 && { + headers: getEndpointHeaders(headers, endpointRuleOptions) + }, + ...properties != void 0 && { + properties: getEndpointProperties(properties, endpointRuleOptions) + }, + url: getEndpointUrl(url2, endpointRuleOptions) + }; + }, "evaluateEndpointRule"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js +var evaluateErrorRule; +var init_evaluateErrorRule = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_evaluateConditions(); + init_evaluateExpression(); + evaluateErrorRule = /* @__PURE__ */ __name((errorRule, options) => { + const { conditions, error: error50 } = errorRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + throw new EndpointError(evaluateExpression(error50, "Error", { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + })); + }, "evaluateErrorRule"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js +var evaluateRules, evaluateTreeRule, group5; +var init_evaluateRules = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_evaluateConditions(); + init_evaluateEndpointRule(); + init_evaluateErrorRule(); + evaluateRules = /* @__PURE__ */ __name((rules, options) => { + for (const rule of rules) { + if (rule.type === "endpoint") { + const endpointOrUndefined = evaluateEndpointRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else if (rule.type === "error") { + evaluateErrorRule(rule, options); + } else if (rule.type === "tree") { + const endpointOrUndefined = group5.evaluateTreeRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else { + throw new EndpointError(`Unknown endpoint rule: ${rule}`); + } + } + throw new EndpointError(`Rules evaluation failed`); + }, "evaluateRules"); + evaluateTreeRule = /* @__PURE__ */ __name((treeRule, options) => { + const { conditions, rules } = treeRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + return group5.evaluateRules(rules, { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }); + }, "evaluateTreeRule"); + group5 = { + evaluateRules, + evaluateTreeRule + }; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/index.js +var init_utils5 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_customEndpointFunctions(); + init_evaluateRules(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js +var resolveEndpoint; +var init_resolveEndpoint = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_debug(); + init_types3(); + init_utils5(); + resolveEndpoint = /* @__PURE__ */ __name((ruleSetObject, options) => { + const { endpointParams, logger: logger3 } = options; + const { parameters, rules } = ruleSetObject; + options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`); + const paramsWithDefault = Object.entries(parameters).filter(([, v3]) => v3.default != null).map(([k2, v3]) => [k2, v3.default]); + if (paramsWithDefault.length > 0) { + for (const [paramKey, paramDefaultValue] of paramsWithDefault) { + endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue; + } + } + const requiredParams = Object.entries(parameters).filter(([, v3]) => v3.required).map(([k2]) => k2); + for (const requiredParam of requiredParams) { + if (endpointParams[requiredParam] == null) { + throw new EndpointError(`Missing required parameter: '${requiredParam}'`); + } + } + const endpoint = evaluateRules(rules, { endpointParams, logger: logger3, referenceRecord: {} }); + options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`); + return endpoint; + }, "resolveEndpoint"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/index.js +var init_dist_es32 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EndpointCache(); + init_isIpAddress(); + init_isValidHostLabel(); + init_customEndpointFunctions(); + init_resolveEndpoint(); + init_types3(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js +var init_isIpAddress2 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es32(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js +var isVirtualHostableS3Bucket; +var init_isVirtualHostableS3Bucket = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es32(); + init_isIpAddress2(); + isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; + } + if (!isValidHostLabel(value)) { + return false; + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if (isIpAddress(value)) { + return false; + } + return true; + }, "isVirtualHostableS3Bucket"); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js +var ARN_DELIMITER, RESOURCE_DELIMITER, parseArn; +var init_parseArn = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ARN_DELIMITER = ":"; + RESOURCE_DELIMITER = "/"; + parseArn = /* @__PURE__ */ __name((value) => { + const segments = value.split(ARN_DELIMITER); + if (segments.length < 6) + return null; + const [arn, partition2, service, region, accountId, ...resourcePath] = segments; + if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") + return null; + const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); + return { + partition: partition2, + service, + region, + accountId, + resourceId + }; + }, "parseArn"); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json +var partitions_default; +var init_partitions = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json"() { + partitions_default = { + partitions: [{ + id: "aws", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-east-1", + name: "aws", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", + regions: { + "af-south-1": { + description: "Africa (Cape Town)" + }, + "ap-east-1": { + description: "Asia Pacific (Hong Kong)" + }, + "ap-east-2": { + description: "Asia Pacific (Taipei)" + }, + "ap-northeast-1": { + description: "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + description: "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + description: "Asia Pacific (Osaka)" + }, + "ap-south-1": { + description: "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + description: "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + description: "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + description: "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + description: "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + description: "Asia Pacific (Melbourne)" + }, + "ap-southeast-5": { + description: "Asia Pacific (Malaysia)" + }, + "ap-southeast-6": { + description: "Asia Pacific (New Zealand)" + }, + "ap-southeast-7": { + description: "Asia Pacific (Thailand)" + }, + "aws-global": { + description: "aws global region" + }, + "ca-central-1": { + description: "Canada (Central)" + }, + "ca-west-1": { + description: "Canada West (Calgary)" + }, + "eu-central-1": { + description: "Europe (Frankfurt)" + }, + "eu-central-2": { + description: "Europe (Zurich)" + }, + "eu-north-1": { + description: "Europe (Stockholm)" + }, + "eu-south-1": { + description: "Europe (Milan)" + }, + "eu-south-2": { + description: "Europe (Spain)" + }, + "eu-west-1": { + description: "Europe (Ireland)" + }, + "eu-west-2": { + description: "Europe (London)" + }, + "eu-west-3": { + description: "Europe (Paris)" + }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, + "me-central-1": { + description: "Middle East (UAE)" + }, + "me-south-1": { + description: "Middle East (Bahrain)" + }, + "mx-central-1": { + description: "Mexico (Central)" + }, + "sa-east-1": { + description: "South America (Sao Paulo)" + }, + "us-east-1": { + description: "US East (N. Virginia)" + }, + "us-east-2": { + description: "US East (Ohio)" + }, + "us-west-1": { + description: "US West (N. California)" + }, + "us-west-2": { + description: "US West (Oregon)" + } + } + }, { + id: "aws-cn", + outputs: { + dnsSuffix: "amazonaws.com.cn", + dualStackDnsSuffix: "api.amazonwebservices.com.cn", + implicitGlobalRegion: "cn-northwest-1", + name: "aws-cn", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^cn\\-\\w+\\-\\d+$", + regions: { + "aws-cn-global": { + description: "aws-cn global region" + }, + "cn-north-1": { + description: "China (Beijing)" + }, + "cn-northwest-1": { + description: "China (Ningxia)" + } + } + }, { + id: "aws-eusc", + outputs: { + dnsSuffix: "amazonaws.eu", + dualStackDnsSuffix: "api.amazonwebservices.eu", + implicitGlobalRegion: "eusc-de-east-1", + name: "aws-eusc", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", + regions: { + "eusc-de-east-1": { + description: "AWS European Sovereign Cloud (Germany)" + } + } + }, { + id: "aws-iso", + outputs: { + dnsSuffix: "c2s.ic.gov", + dualStackDnsSuffix: "api.aws.ic.gov", + implicitGlobalRegion: "us-iso-east-1", + name: "aws-iso", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + regions: { + "aws-iso-global": { + description: "aws-iso global region" + }, + "us-iso-east-1": { + description: "US ISO East" + }, + "us-iso-west-1": { + description: "US ISO WEST" + } + } + }, { + id: "aws-iso-b", + outputs: { + dnsSuffix: "sc2s.sgov.gov", + dualStackDnsSuffix: "api.aws.scloud", + implicitGlobalRegion: "us-isob-east-1", + name: "aws-iso-b", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + regions: { + "aws-iso-b-global": { + description: "aws-iso-b global region" + }, + "us-isob-east-1": { + description: "US ISOB East (Ohio)" + }, + "us-isob-west-1": { + description: "US ISOB West" + } + } + }, { + id: "aws-iso-e", + outputs: { + dnsSuffix: "cloud.adc-e.uk", + dualStackDnsSuffix: "api.cloud-aws.adc-e.uk", + implicitGlobalRegion: "eu-isoe-west-1", + name: "aws-iso-e", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + regions: { + "aws-iso-e-global": { + description: "aws-iso-e global region" + }, + "eu-isoe-west-1": { + description: "EU ISOE West" + } + } + }, { + id: "aws-iso-f", + outputs: { + dnsSuffix: "csp.hci.ic.gov", + dualStackDnsSuffix: "api.aws.hci.ic.gov", + implicitGlobalRegion: "us-isof-south-1", + name: "aws-iso-f", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + regions: { + "aws-iso-f-global": { + description: "aws-iso-f global region" + }, + "us-isof-east-1": { + description: "US ISOF EAST" + }, + "us-isof-south-1": { + description: "US ISOF SOUTH" + } + } + }, { + id: "aws-us-gov", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-gov-west-1", + name: "aws-us-gov", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + regions: { + "aws-us-gov-global": { + description: "aws-us-gov global region" + }, + "us-gov-east-1": { + description: "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + description: "AWS GovCloud (US-West)" + } + } + }], + version: "1.1" + }; + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js +var selectedPartitionsInfo, selectedUserAgentPrefix, partition, getUserAgentPrefix; +var init_partition = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_partitions(); + selectedPartitionsInfo = partitions_default; + selectedUserAgentPrefix = ""; + partition = /* @__PURE__ */ __name((value) => { + const { partitions } = selectedPartitionsInfo; + for (const partition2 of partitions) { + const { regions, outputs } = partition2; + for (const [region, regionData] of Object.entries(regions)) { + if (region === value) { + return { + ...outputs, + ...regionData + }; + } + } + } + for (const partition2 of partitions) { + const { regionRegex, outputs } = partition2; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs + }; + } + } + const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws"); + if (!DEFAULT_PARTITION) { + throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist."); + } + return { + ...DEFAULT_PARTITION.outputs + }; + }, "partition"); + getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, "getUserAgentPrefix"); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/aws.js +var awsEndpointFunctions; +var init_aws = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/aws.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es32(); + init_isVirtualHostableS3Bucket(); + init_parseArn(); + init_partition(); + awsEndpointFunctions = { + isVirtualHostableS3Bucket, + parseArn, + partition + }; + customEndpointFunctions.aws = awsEndpointFunctions; + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveDefaultAwsRegionalEndpointsConfig.js +var init_resolveDefaultAwsRegionalEndpointsConfig = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveDefaultAwsRegionalEndpointsConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js +var init_resolveEndpoint2 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js +var init_EndpointError2 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js +var init_EndpointRuleObject3 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js +var init_ErrorRuleObject3 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js +var init_RuleSetObject3 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js +var init_TreeRuleObject3 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js +var init_shared3 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js +var init_types4 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EndpointError2(); + init_EndpointRuleObject3(); + init_ErrorRuleObject3(); + init_RuleSetObject3(); + init_TreeRuleObject3(); + init_shared3(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/index.js +var init_dist_es33 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_aws(); + init_partition(); + init_isIpAddress2(); + init_resolveDefaultAwsRegionalEndpointsConfig(); + init_resolveEndpoint2(); + init_types4(); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/config.js +var RETRY_MODES, DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE; +var init_config2 = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/config.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(RETRY_MODES2) { + RETRY_MODES2["STANDARD"] = "standard"; + RETRY_MODES2["ADAPTIVE"] = "adaptive"; + })(RETRY_MODES || (RETRY_MODES = {})); + DEFAULT_MAX_ATTEMPTS = 3; + DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD; + } +}); + +// ../../node_modules/@smithy/service-error-classification/dist-es/constants.js +var THROTTLING_ERROR_CODES, TRANSIENT_ERROR_CODES, TRANSIENT_ERROR_STATUS_CODES, NODEJS_TIMEOUT_ERROR_CODES, NODEJS_NETWORK_ERROR_CODES; +var init_constants7 = __esm({ + "../../node_modules/@smithy/service-error-classification/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException" + ]; + TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; + TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; + NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; + NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"]; + } +}); + +// ../../node_modules/@smithy/service-error-classification/dist-es/index.js +var isRetryableByTrait, isClockSkewCorrectedError, isBrowserNetworkError, isThrottlingError, isTransientError, isServerError; +var init_dist_es34 = __esm({ + "../../node_modules/@smithy/service-error-classification/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants7(); + isRetryableByTrait = /* @__PURE__ */ __name((error50) => error50?.$retryable !== void 0, "isRetryableByTrait"); + isClockSkewCorrectedError = /* @__PURE__ */ __name((error50) => error50.$metadata?.clockSkewCorrected, "isClockSkewCorrectedError"); + isBrowserNetworkError = /* @__PURE__ */ __name((error50) => { + const errorMessages = /* @__PURE__ */ new Set([ + "Failed to fetch", + "NetworkError when attempting to fetch resource", + "The Internet connection appears to be offline", + "Load failed", + "Network request failed" + ]); + const isValid = error50 && error50 instanceof TypeError; + if (!isValid) { + return false; + } + return errorMessages.has(error50.message); + }, "isBrowserNetworkError"); + isThrottlingError = /* @__PURE__ */ __name((error50) => error50.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error50.name) || error50.$retryable?.throttling == true, "isThrottlingError"); + isTransientError = /* @__PURE__ */ __name((error50, depth = 0) => isRetryableByTrait(error50) || isClockSkewCorrectedError(error50) || TRANSIENT_ERROR_CODES.includes(error50.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error50?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error50?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error50.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error50) || error50.cause !== void 0 && depth <= 10 && isTransientError(error50.cause, depth + 1), "isTransientError"); + isServerError = /* @__PURE__ */ __name((error50) => { + if (error50.$metadata?.httpStatusCode !== void 0) { + const statusCode = error50.$metadata.httpStatusCode; + if (500 <= statusCode && statusCode <= 599 && !isTransientError(error50)) { + return true; + } + return false; + } + return false; + }, "isServerError"); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js +var _DefaultRateLimiter, DefaultRateLimiter; +var init_DefaultRateLimiter = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es34(); + _DefaultRateLimiter = class { + beta; + minCapacity; + minFillRate; + scaleConstant; + smooth; + currentCapacity = 0; + enabled = false; + lastMaxRate = 0; + measuredTxRate = 0; + requestCount = 0; + fillRate; + lastThrottleTime; + lastTimestamp = 0; + lastTxRateBucket; + maxCapacity; + timeWindow = 0; + constructor(options) { + this.beta = options?.beta ?? 0.7; + this.minCapacity = options?.minCapacity ?? 1; + this.minFillRate = options?.minFillRate ?? 0.5; + this.scaleConstant = options?.scaleConstant ?? 0.4; + this.smooth = options?.smooth ?? 0.8; + const currentTimeInSeconds = this.getCurrentTimeInSeconds(); + this.lastThrottleTime = currentTimeInSeconds; + this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); + this.fillRate = this.minFillRate; + this.maxCapacity = this.minCapacity; + } + getCurrentTimeInSeconds() { + return Date.now() / 1e3; + } + async getSendToken() { + return this.acquireTokenBucket(1); + } + async acquireTokenBucket(amount) { + if (!this.enabled) { + return; + } + this.refillTokenBucket(); + if (amount > this.currentCapacity) { + const delay = (amount - this.currentCapacity) / this.fillRate * 1e3; + await new Promise((resolve) => _DefaultRateLimiter.setTimeoutFn(resolve, delay)); + } + this.currentCapacity = this.currentCapacity - amount; + } + refillTokenBucket() { + const timestamp = this.getCurrentTimeInSeconds(); + if (!this.lastTimestamp) { + this.lastTimestamp = timestamp; + return; + } + const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; + this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount); + this.lastTimestamp = timestamp; + } + updateClientSendingRate(response) { + let calculatedRate; + this.updateMeasuredRate(); + if (isThrottlingError(response)) { + const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); + this.lastMaxRate = rateToUse; + this.calculateTimeWindow(); + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + calculatedRate = this.cubicThrottle(rateToUse); + this.enableTokenBucket(); + } else { + this.calculateTimeWindow(); + calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); + } + const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); + this.updateTokenBucketRate(newRate); + } + calculateTimeWindow() { + this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3)); + } + cubicThrottle(rateToUse) { + return this.getPrecise(rateToUse * this.beta); + } + cubicSuccess(timestamp) { + return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate); + } + enableTokenBucket() { + this.enabled = true; + } + updateTokenBucketRate(newRate) { + this.refillTokenBucket(); + this.fillRate = Math.max(newRate, this.minFillRate); + this.maxCapacity = Math.max(newRate, this.minCapacity); + this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity); + } + updateMeasuredRate() { + const t9 = this.getCurrentTimeInSeconds(); + const timeBucket = Math.floor(t9 * 2) / 2; + this.requestCount++; + if (timeBucket > this.lastTxRateBucket) { + const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); + this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); + this.requestCount = 0; + this.lastTxRateBucket = timeBucket; + } + } + getPrecise(num) { + return parseFloat(num.toFixed(8)); + } + }; + DefaultRateLimiter = _DefaultRateLimiter; + __name(DefaultRateLimiter, "DefaultRateLimiter"); + __publicField(DefaultRateLimiter, "setTimeoutFn", setTimeout); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/constants.js +var DEFAULT_RETRY_DELAY_BASE, MAXIMUM_RETRY_DELAY, THROTTLING_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, RETRY_COST, TIMEOUT_RETRY_COST, NO_RETRY_INCREMENT, INVOCATION_ID_HEADER, REQUEST_HEADER; +var init_constants8 = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + DEFAULT_RETRY_DELAY_BASE = 100; + MAXIMUM_RETRY_DELAY = 20 * 1e3; + THROTTLING_RETRY_DELAY_BASE = 500; + INITIAL_RETRY_TOKENS = 500; + RETRY_COST = 5; + TIMEOUT_RETRY_COST = 10; + NO_RETRY_INCREMENT = 1; + INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; + REQUEST_HEADER = "amz-sdk-request"; + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/defaultRetryBackoffStrategy.js +var getDefaultRetryBackoffStrategy; +var init_defaultRetryBackoffStrategy = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/defaultRetryBackoffStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants8(); + getDefaultRetryBackoffStrategy = /* @__PURE__ */ __name(() => { + let delayBase = DEFAULT_RETRY_DELAY_BASE; + const computeNextBackoffDelay = /* @__PURE__ */ __name((attempts) => { + return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); + }, "computeNextBackoffDelay"); + const setDelayBase = /* @__PURE__ */ __name((delay) => { + delayBase = delay; + }, "setDelayBase"); + return { + computeNextBackoffDelay, + setDelayBase + }; + }, "getDefaultRetryBackoffStrategy"); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/defaultRetryToken.js +var createDefaultRetryToken; +var init_defaultRetryToken = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/defaultRetryToken.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants8(); + createDefaultRetryToken = /* @__PURE__ */ __name(({ retryDelay, retryCount, retryCost }) => { + const getRetryCount = /* @__PURE__ */ __name(() => retryCount, "getRetryCount"); + const getRetryDelay = /* @__PURE__ */ __name(() => Math.min(MAXIMUM_RETRY_DELAY, retryDelay), "getRetryDelay"); + const getRetryCost = /* @__PURE__ */ __name(() => retryCost, "getRetryCost"); + return { + getRetryCount, + getRetryDelay, + getRetryCost + }; + }, "createDefaultRetryToken"); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js +var StandardRetryStrategy; +var init_StandardRetryStrategy = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_config2(); + init_constants8(); + init_defaultRetryBackoffStrategy(); + init_defaultRetryToken(); + StandardRetryStrategy = class { + maxAttempts; + mode = RETRY_MODES.STANDARD; + capacity = INITIAL_RETRY_TOKENS; + retryBackoffStrategy = getDefaultRetryBackoffStrategy(); + maxAttemptsProvider; + constructor(maxAttempts) { + this.maxAttempts = maxAttempts; + this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts; + } + async acquireInitialRetryToken(retryTokenScope) { + return createDefaultRetryToken({ + retryDelay: DEFAULT_RETRY_DELAY_BASE, + retryCount: 0 + }); + } + async refreshRetryTokenForRetry(token, errorInfo) { + const maxAttempts = await this.getMaxAttempts(); + if (this.shouldRetry(token, errorInfo, maxAttempts)) { + const errorType = errorInfo.errorType; + this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE); + const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); + const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType; + const capacityCost = this.getCapacityCost(errorType); + this.capacity -= capacityCost; + return createDefaultRetryToken({ + retryDelay, + retryCount: token.getRetryCount() + 1, + retryCost: capacityCost + }); + } + throw new Error("No retry token available"); + } + recordSuccess(token) { + this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); + } + getCapacity() { + return this.capacity; + } + async getMaxAttempts() { + try { + return await this.maxAttemptsProvider(); + } catch (error50) { + console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); + return DEFAULT_MAX_ATTEMPTS; + } + } + shouldRetry(tokenToRenew, errorInfo, maxAttempts) { + const attempts = tokenToRenew.getRetryCount() + 1; + return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType); + } + getCapacityCost(errorType) { + return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST; + } + isRetryableError(errorType) { + return errorType === "THROTTLING" || errorType === "TRANSIENT"; + } + }; + __name(StandardRetryStrategy, "StandardRetryStrategy"); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js +var AdaptiveRetryStrategy; +var init_AdaptiveRetryStrategy = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_config2(); + init_DefaultRateLimiter(); + init_StandardRetryStrategy(); + AdaptiveRetryStrategy = class { + maxAttemptsProvider; + rateLimiter; + standardRetryStrategy; + mode = RETRY_MODES.ADAPTIVE; + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + const { rateLimiter } = options ?? {}; + this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); + this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider); + } + async acquireInitialRetryToken(retryTokenScope) { + await this.rateLimiter.getSendToken(); + return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + this.rateLimiter.updateClientSendingRate(errorInfo); + return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + } + recordSuccess(token) { + this.rateLimiter.updateClientSendingRate({}); + this.standardRetryStrategy.recordSuccess(token); + } + }; + __name(AdaptiveRetryStrategy, "AdaptiveRetryStrategy"); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js +var init_ConfiguredRetryStrategy = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/types.js +var init_types5 = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/index.js +var init_dist_es35 = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AdaptiveRetryStrategy(); + init_ConfiguredRetryStrategy(); + init_DefaultRateLimiter(); + init_StandardRetryStrategy(); + init_config2(); + init_constants8(); + init_types5(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js +async function checkFeatures(context2, config3, args) { + const request = args.request; + if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") { + setFeature(context2, "PROTOCOL_RPC_V2_CBOR", "M"); + } + if (typeof config3.retryStrategy === "function") { + const retryStrategy = await config3.retryStrategy(); + if (typeof retryStrategy.mode === "string") { + switch (retryStrategy.mode) { + case RETRY_MODES.ADAPTIVE: + setFeature(context2, "RETRY_MODE_ADAPTIVE", "F"); + break; + case RETRY_MODES.STANDARD: + setFeature(context2, "RETRY_MODE_STANDARD", "E"); + break; + } + } + } + if (typeof config3.accountIdEndpointMode === "function") { + const endpointV2 = context2.endpointV2; + if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) { + setFeature(context2, "ACCOUNT_ID_ENDPOINT", "O"); + } + switch (await config3.accountIdEndpointMode?.()) { + case "disabled": + setFeature(context2, "ACCOUNT_ID_MODE_DISABLED", "Q"); + break; + case "preferred": + setFeature(context2, "ACCOUNT_ID_MODE_PREFERRED", "P"); + break; + case "required": + setFeature(context2, "ACCOUNT_ID_MODE_REQUIRED", "R"); + break; + } + } + const identity2 = context2.__smithy_context?.selectedHttpAuthScheme?.identity; + if (identity2?.$source) { + const credentials = identity2; + if (credentials.accountId) { + setFeature(context2, "RESOLVED_ACCOUNT_ID", "T"); + } + for (const [key, value] of Object.entries(credentials.$source ?? {})) { + setFeature(context2, key, value); + } + } +} +var ACCOUNT_ID_ENDPOINT_REGEX; +var init_check_features = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_dist_es35(); + ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/; + __name(checkFeatures, "checkFeatures"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js +var USER_AGENT, X_AMZ_USER_AGENT, SPACE, UA_NAME_SEPARATOR, UA_NAME_ESCAPE_REGEX, UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR; +var init_constants9 = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + USER_AGENT = "user-agent"; + X_AMZ_USER_AGENT = "x-amz-user-agent"; + SPACE = " "; + UA_NAME_SEPARATOR = "/"; + UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w]/g; + UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w#]/g; + UA_ESCAPE_CHAR = "-"; + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/encode-features.js +function encodeFeatures(features2) { + let buffer = ""; + for (const key in features2) { + const val = features2[key]; + if (buffer.length + val.length + 1 <= BYTE_LIMIT) { + if (buffer.length) { + buffer += "," + val; + } else { + buffer += val; + } + continue; + } + break; + } + return buffer; +} +var BYTE_LIMIT; +var init_encode_features = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/encode-features.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + BYTE_LIMIT = 1024; + __name(encodeFeatures, "encodeFeatures"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js +var userAgentMiddleware, escapeUserAgent, getUserAgentMiddlewareOptions, getUserAgentPlugin; +var init_user_agent_middleware = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es33(); + init_dist_es2(); + init_check_features(); + init_constants9(); + init_encode_features(); + userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context2) => async (args) => { + const { request } = args; + if (!HttpRequest.isInstance(request)) { + return next(args); + } + const { headers } = request; + const userAgent = context2?.userAgent?.map(escapeUserAgent) || []; + const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); + await checkFeatures(context2, options, args); + const awsContext = context2; + defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context2.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`); + const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || []; + const appId = await options.userAgentAppId(); + if (appId) { + defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`])); + } + const prefix = getUserAgentPrefix(); + const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE); + const normalUAValue = [ + ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), + ...customUserAgent + ].join(SPACE); + if (options.runtime !== "browser") { + if (normalUAValue) { + headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue; + } + headers[USER_AGENT] = sdkUserAgentValue; + } else { + headers[X_AMZ_USER_AGENT] = sdkUserAgentValue; + } + return next({ + ...args, + request + }); + }, "userAgentMiddleware"); + escapeUserAgent = /* @__PURE__ */ __name((userAgentPair) => { + const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR); + const version4 = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR); + const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR); + const prefix = name.substring(0, prefixSeparatorIndex); + let uaName = name.substring(prefixSeparatorIndex + 1); + if (prefix === "api") { + uaName = uaName.toLowerCase(); + } + return [prefix, uaName, version4].filter((item) => item && item.length > 0).reduce((acc, item, index) => { + switch (index) { + case 0: + return item; + case 1: + return `${acc}/${item}`; + default: + return `${acc}#${item}`; + } + }, ""); + }, "escapeUserAgent"); + getUserAgentMiddlewareOptions = { + name: "getUserAgentMiddleware", + step: "build", + priority: "low", + tags: ["SET_USER_AGENT", "USER_AGENT"], + override: true + }; + getUserAgentPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.add(userAgentMiddleware(config3), getUserAgentMiddlewareOptions); + } + }), "getUserAgentPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/index.js +var init_dist_es36 = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_configurations(); + init_user_agent_middleware(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js +var DEFAULT_USE_DUALSTACK_ENDPOINT; +var init_NodeUseDualstackEndpointConfigOptions = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + DEFAULT_USE_DUALSTACK_ENDPOINT = false; + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseFipsEndpointConfigOptions.js +var DEFAULT_USE_FIPS_ENDPOINT; +var init_NodeUseFipsEndpointConfigOptions = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseFipsEndpointConfigOptions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + DEFAULT_USE_FIPS_ENDPOINT = false; + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveCustomEndpointsConfig.js +var init_resolveCustomEndpointsConfig = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveCustomEndpointsConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveEndpointsConfig.js +var init_resolveEndpointsConfig = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveEndpointsConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/index.js +var init_endpointsConfig = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_NodeUseDualstackEndpointConfigOptions(); + init_NodeUseFipsEndpointConfigOptions(); + init_resolveCustomEndpointsConfig(); + init_resolveEndpointsConfig(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/config.js +var init_config3 = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/config.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/checkRegion.js +var validRegions, checkRegion; +var init_checkRegion = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/checkRegion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es32(); + validRegions = /* @__PURE__ */ new Set(); + checkRegion = /* @__PURE__ */ __name((region, check3 = isValidHostLabel) => { + if (!validRegions.has(region) && !check3(region)) { + if (region === "*") { + console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`); + } else { + throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`); + } + } else { + validRegions.add(region); + } + }, "checkRegion"); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/isFipsRegion.js +var isFipsRegion; +var init_isFipsRegion = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/isFipsRegion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/getRealRegion.js +var getRealRegion; +var init_getRealRegion = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/getRealRegion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_isFipsRegion(); + getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/resolveRegionConfig.js +var resolveRegionConfig; +var init_resolveRegionConfig = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/resolveRegionConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_checkRegion(); + init_getRealRegion(); + init_isFipsRegion(); + resolveRegionConfig = /* @__PURE__ */ __name((input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); + } + return Object.assign(input, { + region: async () => { + const providedRegion = typeof region === "function" ? await region() : region; + const realRegion = getRealRegion(providedRegion); + checkRegion(realRegion); + return realRegion; + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + } + }); + }, "resolveRegionConfig"); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/index.js +var init_regionConfig = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_config3(); + init_resolveRegionConfig(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionInfo/PartitionHash.js +var init_PartitionHash = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionInfo/PartitionHash.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionInfo/RegionHash.js +var init_RegionHash = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionInfo/RegionHash.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionInfo/getRegionInfo.js +var init_getRegionInfo = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionInfo/getRegionInfo.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionInfo/index.js +var init_regionInfo = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionInfo/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_PartitionHash(); + init_RegionHash(); + init_getRegionInfo(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/index.js +var init_dist_es37 = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_endpointsConfig(); + init_regionConfig(); + init_regionInfo(); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/EventStreamSerdeConfig.js +var resolveEventStreamSerdeConfig; +var init_EventStreamSerdeConfig = __esm({ + "../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/EventStreamSerdeConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + resolveEventStreamSerdeConfig = /* @__PURE__ */ __name((input) => Object.assign(input, { + eventStreamMarshaller: input.eventStreamSerdeProvider(input) + }), "resolveEventStreamSerdeConfig"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/index.js +var init_dist_es38 = __esm({ + "../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamSerdeConfig(); + } +}); + +// ../../node_modules/@smithy/middleware-content-length/dist-es/index.js +function contentLengthMiddleware(bodyLengthChecker) { + return (next) => async (args) => { + const request = args.request; + if (HttpRequest.isInstance(request)) { + const { body, headers } = request; + if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER2) === -1) { + try { + const length = bodyLengthChecker(body); + request.headers = { + ...request.headers, + [CONTENT_LENGTH_HEADER2]: String(length) + }; + } catch (error50) { + } + } + } + return next({ + ...args, + request + }); + }; +} +var CONTENT_LENGTH_HEADER2, contentLengthMiddlewareOptions, getContentLengthPlugin; +var init_dist_es39 = __esm({ + "../../node_modules/@smithy/middleware-content-length/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + CONTENT_LENGTH_HEADER2 = "content-length"; + __name(contentLengthMiddleware, "contentLengthMiddleware"); + contentLengthMiddlewareOptions = { + step: "build", + tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], + name: "contentLengthMiddleware", + override: true + }; + getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); + } + }), "getContentLengthPlugin"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/s3.js +var resolveParamsForS3, DOMAIN_PATTERN, IP_ADDRESS_PATTERN, DOTS_PATTERN, isDnsCompatibleBucketName, isArnBucketName; +var init_s3 = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/s3.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { + const bucket = endpointParams?.Bucket || ""; + if (typeof endpointParams.Bucket === "string") { + endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); + } + if (isArnBucketName(bucket)) { + if (endpointParams.ForcePathStyle === true) { + throw new Error("Path-style addressing cannot be used with ARN buckets"); + } + } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { + endpointParams.ForcePathStyle = true; + } + if (endpointParams.DisableMultiRegionAccessPoints) { + endpointParams.disableMultiRegionAccessPoints = true; + endpointParams.DisableMRAP = true; + } + return endpointParams; + }, "resolveParamsForS3"); + DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; + IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; + DOTS_PATTERN = /\.\./; + isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); + isArnBucketName = /* @__PURE__ */ __name((bucketName) => { + const [arn, partition2, service, , , bucket] = bucketName.split(":"); + const isArn = arn === "arn" && bucketName.split(":").length >= 6; + const isValidArn = Boolean(isArn && partition2 && service && bucket); + if (isArn && !isValidArn) { + throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); + } + return isValidArn; + }, "isArnBucketName"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/index.js +var init_service_customizations = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_s3(); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js +var createConfigValueProvider; +var init_createConfigValueProvider = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config3, isClientContextParam = false) => { + const configProvider = /* @__PURE__ */ __name(async () => { + let configValue; + if (isClientContextParam) { + const clientContextParams = config3.clientContextParams; + const nestedValue = clientContextParams?.[configKey]; + configValue = nestedValue ?? config3[configKey] ?? config3[canonicalEndpointParamKey]; + } else { + configValue = config3[configKey] ?? config3[canonicalEndpointParamKey]; + } + if (typeof configValue === "function") { + return configValue(); + } + return configValue; + }, "configProvider"); + if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { + return async () => { + const credentials = typeof config3.credentials === "function" ? await config3.credentials() : config3.credentials; + const configValue = credentials?.credentialScope ?? credentials?.CredentialScope; + return configValue; + }; + } + if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") { + return async () => { + const credentials = typeof config3.credentials === "function" ? await config3.credentials() : config3.credentials; + const configValue = credentials?.accountId ?? credentials?.AccountId; + return configValue; + }; + } + if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { + return async () => { + if (config3.isCustomEndpoint === false) { + return void 0; + } + const endpoint = await configProvider(); + if (endpoint && typeof endpoint === "object") { + if ("url" in endpoint) { + return endpoint.url.href; + } + if ("hostname" in endpoint) { + const { protocol, hostname: hostname3, port, path } = endpoint; + return `${protocol}//${hostname3}${port ? ":" + port : ""}${path}`; + } + } + return endpoint; + }; + } + return configProvider; + }, "createConfigValueProvider"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.browser.js +var getEndpointFromConfig; +var init_getEndpointFromConfig_browser = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getEndpointFromConfig = /* @__PURE__ */ __name(async (serviceId) => void 0, "getEndpointFromConfig"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js +var toEndpointV12; +var init_toEndpointV12 = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es13(); + toEndpointV12 = /* @__PURE__ */ __name((endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + const v1Endpoint = parseUrl(endpoint.url); + if (endpoint.headers) { + v1Endpoint.headers = {}; + for (const [name, values] of Object.entries(endpoint.headers)) { + v1Endpoint.headers[name.toLowerCase()] = values.join(", "); + } + } + return v1Endpoint; + } + return endpoint; + } + return parseUrl(endpoint); + }, "toEndpointV1"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js +var getEndpointFromInstructions, resolveParams; +var init_getEndpointFromInstructions = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_service_customizations(); + init_createConfigValueProvider(); + init_getEndpointFromConfig_browser(); + init_toEndpointV12(); + getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context2) => { + if (!clientConfig.isCustomEndpoint) { + let endpointFromConfig; + if (clientConfig.serviceConfiguredEndpoint) { + endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); + } else { + endpointFromConfig = await getEndpointFromConfig(clientConfig.serviceId); + } + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve(toEndpointV12(endpointFromConfig)); + clientConfig.isCustomEndpoint = true; + } + } + const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); + if (typeof clientConfig.endpointProvider !== "function") { + throw new Error("config.endpointProvider is not set."); + } + const endpoint = clientConfig.endpointProvider(endpointParams, context2); + if (clientConfig.isCustomEndpoint && clientConfig.endpoint) { + const customEndpoint = await clientConfig.endpoint(); + if (customEndpoint?.headers) { + endpoint.headers ??= {}; + for (const [name, value] of Object.entries(customEndpoint.headers)) { + endpoint.headers[name] = Array.isArray(value) ? value : [value]; + } + } + } + return endpoint; + }, "getEndpointFromInstructions"); + resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => { + const endpointParams = {}; + const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {}; + for (const [name, instruction] of Object.entries(instructions)) { + switch (instruction.type) { + case "staticContextParams": + endpointParams[name] = instruction.value; + break; + case "contextParams": + endpointParams[name] = commandInput[instruction.name]; + break; + case "clientContextParams": + case "builtInParams": + endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")(); + break; + case "operationContextParams": + endpointParams[name] = instruction.get(commandInput); + break; + default: + throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); + } + } + if (Object.keys(instructions).length === 0) { + Object.assign(endpointParams, clientConfig); + } + if (String(clientConfig.serviceId).toLowerCase() === "s3") { + await resolveParamsForS3(endpointParams); + } + return endpointParams; + }, "resolveParams"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/index.js +var init_adaptors = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getEndpointFromInstructions(); + init_toEndpointV12(); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js +var endpointMiddleware; +var init_endpointMiddleware = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_dist_es4(); + init_getEndpointFromInstructions(); + endpointMiddleware = /* @__PURE__ */ __name(({ config: config3, instructions }) => { + return (next, context2) => async (args) => { + if (config3.isCustomEndpoint) { + setFeature2(context2, "ENDPOINT_OVERRIDE", "N"); + } + const endpoint = await getEndpointFromInstructions(args.input, { + getEndpointParameterInstructions() { + return instructions; + } + }, { ...config3 }, context2); + context2.endpointV2 = endpoint; + context2.authSchemes = endpoint.properties?.authSchemes; + const authScheme = context2.authSchemes?.[0]; + if (authScheme) { + context2["signing_region"] = authScheme.signingRegion; + context2["signing_service"] = authScheme.signingName; + const smithyContext = getSmithyContext(context2); + const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption; + if (httpAuthOption) { + httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, { + signing_region: authScheme.signingRegion, + signingRegion: authScheme.signingRegion, + signing_service: authScheme.signingName, + signingName: authScheme.signingName, + signingRegionSet: authScheme.signingRegionSet + }, authScheme.properties); + } + } + return next({ + ...args + }); + }; + }, "endpointMiddleware"); + } +}); + +// ../../node_modules/@smithy/middleware-serde/dist-es/deserializerMiddleware.js +var init_deserializerMiddleware = __esm({ + "../../node_modules/@smithy/middleware-serde/dist-es/deserializerMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js +var init_serializerMiddleware = __esm({ + "../../node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-serde/dist-es/serdePlugin.js +var serializerMiddlewareOption2; +var init_serdePlugin = __esm({ + "../../node_modules/@smithy/middleware-serde/dist-es/serdePlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + serializerMiddlewareOption2 = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true + }; + } +}); + +// ../../node_modules/@smithy/middleware-serde/dist-es/index.js +var init_dist_es40 = __esm({ + "../../node_modules/@smithy/middleware-serde/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_deserializerMiddleware(); + init_serdePlugin(); + init_serializerMiddleware(); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js +var endpointMiddlewareOptions, getEndpointPlugin; +var init_getEndpointPlugin = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es40(); + init_endpointMiddleware(); + endpointMiddlewareOptions = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: serializerMiddlewareOption2.name + }; + getEndpointPlugin = /* @__PURE__ */ __name((config3, instructions) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(endpointMiddleware({ + config: config3, + instructions + }), endpointMiddlewareOptions); + } + }), "getEndpointPlugin"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js +var resolveEndpointConfig; +var init_resolveEndpointConfig = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es4(); + init_getEndpointFromConfig_browser(); + init_toEndpointV12(); + resolveEndpointConfig = /* @__PURE__ */ __name((input) => { + const tls = input.tls ?? true; + const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input; + const customEndpointProvider = endpoint != null ? async () => toEndpointV12(await normalizeProvider(endpoint)()) : void 0; + const isCustomEndpoint = !!endpoint; + const resolvedConfig = Object.assign(input, { + endpoint: customEndpointProvider, + tls, + isCustomEndpoint, + useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false), + useFipsEndpoint: normalizeProvider(useFipsEndpoint ?? false) + }); + let configuredEndpointPromise = void 0; + resolvedConfig.serviceConfiguredEndpoint = async () => { + if (input.serviceId && !configuredEndpointPromise) { + configuredEndpointPromise = getEndpointFromConfig(input.serviceId); + } + return configuredEndpointPromise; + }; + return resolvedConfig; + }, "resolveEndpointConfig"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointRequiredConfig.js +var init_resolveEndpointRequiredConfig = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointRequiredConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/types.js +var init_types6 = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/index.js +var init_dist_es41 = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_adaptors(); + init_endpointMiddleware(); + init_getEndpointPlugin(); + init_resolveEndpointConfig(); + init_resolveEndpointRequiredConfig(); + init_types6(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/delayDecider.js +var init_delayDecider = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/delayDecider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/retryDecider.js +var init_retryDecider = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/retryDecider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/util.js +var asSdkError; +var init_util2 = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/util.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + asSdkError = /* @__PURE__ */ __name((error50) => { + if (error50 instanceof Error) + return error50; + if (error50 instanceof Object) + return Object.assign(new Error(), error50); + if (typeof error50 === "string") + return new Error(error50); + return new Error(`AWS SDK error wrapper for ${error50}`); + }, "asSdkError"); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/StandardRetryStrategy.js +var init_StandardRetryStrategy2 = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/StandardRetryStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/AdaptiveRetryStrategy.js +var init_AdaptiveRetryStrategy2 = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/AdaptiveRetryStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/configurations.js +var resolveRetryConfig; +var init_configurations2 = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/configurations.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es4(); + init_dist_es35(); + resolveRetryConfig = /* @__PURE__ */ __name((input) => { + const { retryStrategy, retryMode } = input; + const maxAttempts = normalizeProvider(input.maxAttempts ?? DEFAULT_MAX_ATTEMPTS); + let controller = retryStrategy ? Promise.resolve(retryStrategy) : void 0; + const getDefault = /* @__PURE__ */ __name(async () => await normalizeProvider(retryMode)() === RETRY_MODES.ADAPTIVE ? new AdaptiveRetryStrategy(maxAttempts) : new StandardRetryStrategy(maxAttempts), "getDefault"); + return Object.assign(input, { + maxAttempts, + retryStrategy: () => controller ??= getDefault() + }); + }, "resolveRetryConfig"); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/omitRetryHeadersMiddleware.js +var init_omitRetryHeadersMiddleware = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/omitRetryHeadersMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/isStreamingPayload/isStreamingPayload.browser.js +var isStreamingPayload; +var init_isStreamingPayload_browser = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/isStreamingPayload/isStreamingPayload.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isStreamingPayload = /* @__PURE__ */ __name((request) => request?.body instanceof ReadableStream, "isStreamingPayload"); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js +var retryMiddleware, isRetryStrategyV2, getRetryErrorInfo, getRetryErrorType, retryMiddlewareOptions, getRetryPlugin, getRetryAfterHint; +var init_retryMiddleware = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es34(); + init_dist_es21(); + init_dist_es35(); + init_dist_es14(); + init_isStreamingPayload_browser(); + init_util2(); + retryMiddleware = /* @__PURE__ */ __name((options) => (next, context2) => async (args) => { + let retryStrategy = await options.retryStrategy(); + const maxAttempts = await options.maxAttempts(); + if (isRetryStrategyV2(retryStrategy)) { + retryStrategy = retryStrategy; + let retryToken = await retryStrategy.acquireInitialRetryToken(context2["partition_id"]); + let lastError = new Error(); + let attempts = 0; + let totalRetryDelay = 0; + const { request } = args; + const isRequest2 = HttpRequest.isInstance(request); + if (isRequest2) { + request.headers[INVOCATION_ID_HEADER] = v4(); + } + while (true) { + try { + if (isRequest2) { + request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + const { response, output } = await next(args); + retryStrategy.recordSuccess(retryToken); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalRetryDelay; + return { response, output }; + } catch (e2) { + const retryErrorInfo = getRetryErrorInfo(e2); + lastError = asSdkError(e2); + if (isRequest2 && isStreamingPayload(request)) { + (context2.logger instanceof NoOpLogger ? console : context2.logger)?.warn("An error was encountered in a non-retryable streaming request."); + throw lastError; + } + try { + retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); + } catch (refreshError) { + if (!lastError.$metadata) { + lastError.$metadata = {}; + } + lastError.$metadata.attempts = attempts + 1; + lastError.$metadata.totalRetryDelay = totalRetryDelay; + throw lastError; + } + attempts = retryToken.getRetryCount(); + const delay = retryToken.getRetryDelay(); + totalRetryDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); + } + } + } else { + retryStrategy = retryStrategy; + if (retryStrategy?.mode) + context2.userAgent = [...context2.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]]; + return retryStrategy.retry(next, args); + } + }, "retryMiddleware"); + isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined", "isRetryStrategyV2"); + getRetryErrorInfo = /* @__PURE__ */ __name((error50) => { + const errorInfo = { + error: error50, + errorType: getRetryErrorType(error50) + }; + const retryAfterHint = getRetryAfterHint(error50.$response); + if (retryAfterHint) { + errorInfo.retryAfterHint = retryAfterHint; + } + return errorInfo; + }, "getRetryErrorInfo"); + getRetryErrorType = /* @__PURE__ */ __name((error50) => { + if (isThrottlingError(error50)) + return "THROTTLING"; + if (isTransientError(error50)) + return "TRANSIENT"; + if (isServerError(error50)) + return "SERVER_ERROR"; + return "CLIENT_ERROR"; + }, "getRetryErrorType"); + retryMiddlewareOptions = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", + override: true + }; + getRetryPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(retryMiddleware(options), retryMiddlewareOptions); + } + }), "getRetryPlugin"); + getRetryAfterHint = /* @__PURE__ */ __name((response) => { + if (!HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return new Date(retryAfterSeconds * 1e3); + const retryAfterDate = new Date(retryAfter); + return retryAfterDate; + }, "getRetryAfterHint"); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/index.js +var init_dist_es42 = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AdaptiveRetryStrategy2(); + init_StandardRetryStrategy2(); + init_configurations2(); + init_delayDecider(); + init_omitRetryHeadersMiddleware(); + init_retryDecider(); + init_retryMiddleware(); + } +}); + +// ../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/signature-v4-crt-container.js +var signatureV4CrtContainer; +var init_signature_v4_crt_container = __esm({ + "../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/signature-v4-crt-container.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + signatureV4CrtContainer = { + CrtSignerV4: null + }; + } +}); + +// ../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4MultiRegion.js +var SignatureV4MultiRegion; +var init_SignatureV4MultiRegion = __esm({ + "../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4MultiRegion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es18(); + init_signature_v4_crt_container(); + SignatureV4MultiRegion = class { + sigv4aSigner; + sigv4Signer; + signerOptions; + static sigv4aDependency() { + if (typeof signatureV4CrtContainer.CrtSignerV4 === "function") { + return "crt"; + } else if (typeof signatureV4aContainer.SignatureV4a === "function") { + return "js"; + } + return "none"; + } + constructor(options) { + this.sigv4Signer = new SignatureV4S3Express(options); + this.signerOptions = options; + } + async sign(requestToSign, options = {}) { + if (options.signingRegion === "*") { + return this.getSigv4aSigner().sign(requestToSign, options); + } + return this.sigv4Signer.sign(requestToSign, options); + } + async signWithCredentials(requestToSign, credentials, options = {}) { + if (options.signingRegion === "*") { + const signer = this.getSigv4aSigner(); + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + if (CrtSignerV4 && signer instanceof CrtSignerV4) { + return signer.signWithCredentials(requestToSign, credentials, options); + } else { + throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`); + } + } + return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options); + } + async presign(originalRequest, options = {}) { + if (options.signingRegion === "*") { + const signer = this.getSigv4aSigner(); + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + if (CrtSignerV4 && signer instanceof CrtSignerV4) { + return signer.presign(originalRequest, options); + } else { + throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`); + } + } + return this.sigv4Signer.presign(originalRequest, options); + } + async presignWithCredentials(originalRequest, credentials, options = {}) { + if (options.signingRegion === "*") { + throw new Error("Method presignWithCredentials is not supported for [signingRegion=*]."); + } + return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options); + } + getSigv4aSigner() { + if (!this.sigv4aSigner) { + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + const JsSigV4aSigner = signatureV4aContainer.SignatureV4a; + if (this.signerOptions.runtime === "node") { + if (!CrtSignerV4 && !JsSigV4aSigner) { + throw new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"); + } + if (CrtSignerV4 && typeof CrtSignerV4 === "function") { + this.sigv4aSigner = new CrtSignerV4({ + ...this.signerOptions, + signingAlgorithm: 1 + }); + } else if (JsSigV4aSigner && typeof JsSigV4aSigner === "function") { + this.sigv4aSigner = new JsSigV4aSigner({ + ...this.signerOptions + }); + } else { + throw new Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"); + } + } else { + if (!JsSigV4aSigner || typeof JsSigV4aSigner !== "function") { + throw new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a"); + } + this.sigv4aSigner = new JsSigV4aSigner({ + ...this.signerOptions + }); + } + } + return this.sigv4aSigner; + } + }; + __name(SignatureV4MultiRegion, "SignatureV4MultiRegion"); + } +}); + +// ../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/index.js +var init_dist_es43 = __esm({ + "../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_SignatureV4MultiRegion(); + init_signature_v4_crt_container(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/ruleset.js +var cs, ct, cu, cv, cw, cx, cy, cz, cA, cB, cC, cD, cE, cF, cG, cH, cI, 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, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV, bW, bX, bY, bZ, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, cr, _data, ruleSet; +var init_ruleset = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/ruleset.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + cs = "required"; + ct = "type"; + cu = "rules"; + cv = "conditions"; + cw = "fn"; + cx = "argv"; + cy = "ref"; + cz = "assign"; + cA = "url"; + cB = "properties"; + cC = "backend"; + cD = "authSchemes"; + cE = "disableDoubleEncoding"; + cF = "signingName"; + cG = "signingRegion"; + cH = "headers"; + cI = "signingRegionSet"; + a = 6; + b = false; + c = true; + d = "isSet"; + e = "booleanEquals"; + f = "error"; + g = "aws.partition"; + h = "stringEquals"; + i = "getAttr"; + j = "name"; + k = "substring"; + l = "bucketSuffix"; + m = "parseURL"; + n = "endpoint"; + o = "tree"; + p = "aws.isVirtualHostableS3Bucket"; + q = "{url#scheme}://{Bucket}.{url#authority}{url#path}"; + r = "not"; + s = "accessPointSuffix"; + t = "{url#scheme}://{url#authority}{url#path}"; + u = "hardwareType"; + v = "regionPrefix"; + w = "bucketAliasSuffix"; + x = "outpostId"; + y = "isValidHostLabel"; + z = "sigv4a"; + A = "s3-outposts"; + B = "s3"; + C = "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}"; + D = "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}"; + E = "https://{Bucket}.s3.{partitionResult#dnsSuffix}"; + F = "aws.parseArn"; + G = "bucketArn"; + H = "arnType"; + I = ""; + J = "s3-object-lambda"; + K = "accesspoint"; + L = "accessPointName"; + M = "{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}"; + N = "mrapPartition"; + O = "outpostType"; + P = "arnPrefix"; + Q = "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}"; + R = "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}"; + S = "https://s3.{partitionResult#dnsSuffix}"; + T = { [cs]: false, [ct]: "string" }; + U = { [cs]: true, "default": false, [ct]: "boolean" }; + V = { [cs]: false, [ct]: "boolean" }; + W = { [cw]: e, [cx]: [{ [cy]: "Accelerate" }, true] }; + X = { [cw]: e, [cx]: [{ [cy]: "UseFIPS" }, true] }; + Y = { [cw]: e, [cx]: [{ [cy]: "UseDualStack" }, true] }; + Z = { [cw]: d, [cx]: [{ [cy]: "Endpoint" }] }; + aa = { [cw]: g, [cx]: [{ [cy]: "Region" }], [cz]: "partitionResult" }; + ab = { [cw]: h, [cx]: [{ [cw]: i, [cx]: [{ [cy]: "partitionResult" }, j] }, "aws-cn"] }; + ac = { [cw]: d, [cx]: [{ [cy]: "Bucket" }] }; + ad = { [cy]: "Bucket" }; + ae = { [cv]: [W], [f]: "S3Express does not support S3 Accelerate.", [ct]: f }; + af = { [cv]: [Z, { [cw]: m, [cx]: [{ [cy]: "Endpoint" }], [cz]: "url" }], [cu]: [{ [cv]: [{ [cw]: d, [cx]: [{ [cy]: "DisableS3ExpressSessionAuth" }] }, { [cw]: e, [cx]: [{ [cy]: "DisableS3ExpressSessionAuth" }, true] }], [cu]: [{ [cv]: [{ [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: "url" }, "isIp"] }, true] }], [cu]: [{ [cv]: [{ [cw]: "uriEncode", [cx]: [ad], [cz]: "uri_encoded_bucket" }], [cu]: [{ [n]: { [cA]: "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: p, [cx]: [ad, false] }], [cu]: [{ [n]: { [cA]: q, [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }], [ct]: o }, { [f]: "S3Express bucket name is not a valid virtual hostable name.", [ct]: f }], [ct]: o }, { [cv]: [{ [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: "url" }, "isIp"] }, true] }], [cu]: [{ [cv]: [{ [cw]: "uriEncode", [cx]: [ad], [cz]: "uri_encoded_bucket" }], [cu]: [{ [n]: { [cA]: "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: p, [cx]: [ad, false] }], [cu]: [{ [n]: { [cA]: q, [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }], [ct]: o }, { [f]: "S3Express bucket name is not a valid virtual hostable name.", [ct]: f }], [ct]: o }; + ag = { [cw]: m, [cx]: [{ [cy]: "Endpoint" }], [cz]: "url" }; + ah = { [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: "url" }, "isIp"] }, true] }; + ai = { [cy]: "url" }; + aj = { [cw]: "uriEncode", [cx]: [ad], [cz]: "uri_encoded_bucket" }; + ak = { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: "s3express", [cG]: "{Region}" }] }; + al = {}; + am = { [cw]: p, [cx]: [ad, false] }; + an = { [f]: "S3Express bucket name is not a valid virtual hostable name.", [ct]: f }; + ao = { [cw]: d, [cx]: [{ [cy]: "UseS3ExpressControlEndpoint" }] }; + ap = { [cw]: e, [cx]: [{ [cy]: "UseS3ExpressControlEndpoint" }, true] }; + aq = { [cw]: r, [cx]: [Z] }; + ar = { [cw]: e, [cx]: [{ [cy]: "UseDualStack" }, false] }; + as = { [cw]: e, [cx]: [{ [cy]: "UseFIPS" }, false] }; + at = { [f]: "Unrecognized S3Express bucket name format.", [ct]: f }; + au = { [cw]: r, [cx]: [ac] }; + av = { [cy]: u }; + aw = { [cv]: [aq], [f]: "Expected a endpoint to be specified but no endpoint was found", [ct]: f }; + ax = { [cD]: [{ [cE]: true, [j]: z, [cF]: A, [cI]: ["*"] }, { [cE]: true, [j]: "sigv4", [cF]: A, [cG]: "{Region}" }] }; + ay = { [cw]: e, [cx]: [{ [cy]: "ForcePathStyle" }, false] }; + az = { [cy]: "ForcePathStyle" }; + aA = { [cw]: e, [cx]: [{ [cy]: "Accelerate" }, false] }; + aB = { [cw]: h, [cx]: [{ [cy]: "Region" }, "aws-global"] }; + aC = { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: B, [cG]: "us-east-1" }] }; + aD = { [cw]: r, [cx]: [aB] }; + aE = { [cw]: e, [cx]: [{ [cy]: "UseGlobalEndpoint" }, true] }; + aF = { [cA]: "https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: B, [cG]: "{Region}" }] }, [cH]: {} }; + aG = { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: B, [cG]: "{Region}" }] }; + aH = { [cw]: e, [cx]: [{ [cy]: "UseGlobalEndpoint" }, false] }; + aI = { [cA]: "https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + aJ = { [cA]: "https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + aK = { [cA]: "https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + aL = { [cw]: e, [cx]: [{ [cw]: i, [cx]: [ai, "isIp"] }, false] }; + aM = { [cA]: C, [cB]: aG, [cH]: {} }; + aN = { [cA]: q, [cB]: aG, [cH]: {} }; + aO = { [n]: aN, [ct]: n }; + aP = { [cA]: D, [cB]: aG, [cH]: {} }; + aQ = { [cA]: "https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + aR = { [f]: "Invalid region: region was not a valid DNS name.", [ct]: f }; + aS = { [cy]: G }; + aT = { [cy]: H }; + aU = { [cw]: i, [cx]: [aS, "service"] }; + aV = { [cy]: L }; + aW = { [cv]: [Y], [f]: "S3 Object Lambda does not support Dual-stack", [ct]: f }; + aX = { [cv]: [W], [f]: "S3 Object Lambda does not support S3 Accelerate", [ct]: f }; + aY = { [cv]: [{ [cw]: d, [cx]: [{ [cy]: "DisableAccessPoints" }] }, { [cw]: e, [cx]: [{ [cy]: "DisableAccessPoints" }, true] }], [f]: "Access points are not supported for this operation", [ct]: f }; + aZ = { [cv]: [{ [cw]: d, [cx]: [{ [cy]: "UseArnRegion" }] }, { [cw]: e, [cx]: [{ [cy]: "UseArnRegion" }, false] }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [aS, "region"] }, "{Region}"] }] }], [f]: "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`", [ct]: f }; + ba = { [cw]: i, [cx]: [{ [cy]: "bucketPartition" }, j] }; + bb = { [cw]: i, [cx]: [aS, "accountId"] }; + bc = { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: J, [cG]: "{bucketArn#region}" }] }; + bd = { [f]: "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`", [ct]: f }; + be = { [f]: "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`", [ct]: f }; + bf = { [f]: "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)", [ct]: f }; + bg = { [f]: "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`", [ct]: f }; + bh = { [f]: "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.", [ct]: f }; + bi = { [f]: "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided", [ct]: f }; + bj = { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: B, [cG]: "{bucketArn#region}" }] }; + bk = { [cD]: [{ [cE]: true, [j]: z, [cF]: A, [cI]: ["*"] }, { [cE]: true, [j]: "sigv4", [cF]: A, [cG]: "{bucketArn#region}" }] }; + bl = { [cw]: F, [cx]: [ad] }; + bm = { [cA]: "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aG, [cH]: {} }; + bn = { [cA]: "https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aG, [cH]: {} }; + bo = { [cA]: "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aG, [cH]: {} }; + bp = { [cA]: Q, [cB]: aG, [cH]: {} }; + bq = { [cA]: "https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aG, [cH]: {} }; + br = { [cy]: "UseObjectLambdaEndpoint" }; + bs = { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: J, [cG]: "{Region}" }] }; + bt = { [cA]: "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + bu = { [cA]: "https://s3-fips.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + bv = { [cA]: "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + bw = { [cA]: t, [cB]: aG, [cH]: {} }; + bx = { [cA]: "https://s3.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + by = [{ [cy]: "Region" }]; + bz = [{ [cy]: "Endpoint" }]; + bA = [ad]; + bB = [W]; + bC = [Z, ag]; + bD = [{ [cw]: d, [cx]: [{ [cy]: "DisableS3ExpressSessionAuth" }] }, { [cw]: e, [cx]: [{ [cy]: "DisableS3ExpressSessionAuth" }, true] }]; + bE = [aj]; + bF = [am]; + bG = [aa]; + bH = [X, Y]; + bI = [X, ar]; + bJ = [as, Y]; + bK = [as, ar]; + bL = [{ [cw]: k, [cx]: [ad, 6, 14, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 14, 16, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bM = [{ [cv]: [X, Y], [n]: { [cA]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bI, [n]: { [cA]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bJ, [n]: { [cA]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bK, [n]: { [cA]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: {} }, [ct]: n }]; + bN = [{ [cw]: k, [cx]: [ad, 6, 15, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 15, 17, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bO = [{ [cw]: k, [cx]: [ad, 6, 19, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 19, 21, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bP = [{ [cw]: k, [cx]: [ad, 6, 20, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 20, 22, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bQ = [{ [cw]: k, [cx]: [ad, 6, 26, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 26, 28, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bR = [{ [cv]: [X, Y], [n]: { [cA]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }, { [cv]: bI, [n]: { [cA]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }, { [cv]: bJ, [n]: { [cA]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }, { [cv]: bK, [n]: { [cA]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }]; + bS = [ad, 0, 7, true]; + bT = [{ [cw]: k, [cx]: [ad, 7, 15, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 15, 17, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bU = [{ [cw]: k, [cx]: [ad, 7, 16, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 16, 18, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bV = [{ [cw]: k, [cx]: [ad, 7, 20, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 20, 22, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bW = [{ [cw]: k, [cx]: [ad, 7, 21, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 21, 23, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bX = [{ [cw]: k, [cx]: [ad, 7, 27, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 27, 29, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bY = [ac]; + bZ = [{ [cw]: y, [cx]: [{ [cy]: x }, false] }]; + ca = [{ [cw]: h, [cx]: [{ [cy]: v }, "beta"] }]; + cb = ["*"]; + cc = [{ [cw]: y, [cx]: [{ [cy]: "Region" }, false] }]; + cd = [{ [cw]: h, [cx]: [{ [cy]: "Region" }, "us-east-1"] }]; + ce = [{ [cw]: h, [cx]: [aT, K] }]; + cf = [{ [cw]: i, [cx]: [aS, "resourceId[1]"], [cz]: L }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [aV, I] }] }]; + cg = [aS, "resourceId[1]"]; + ch = [Y]; + ci = [{ [cw]: r, [cx]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [aS, "region"] }, I] }] }]; + cj = [{ [cw]: r, [cx]: [{ [cw]: d, [cx]: [{ [cw]: i, [cx]: [aS, "resourceId[2]"] }] }] }]; + ck = [aS, "resourceId[2]"]; + cl = [{ [cw]: g, [cx]: [{ [cw]: i, [cx]: [aS, "region"] }], [cz]: "bucketPartition" }]; + cm = [{ [cw]: h, [cx]: [ba, { [cw]: i, [cx]: [{ [cy]: "partitionResult" }, j] }] }]; + cn = [{ [cw]: y, [cx]: [{ [cw]: i, [cx]: [aS, "region"] }, true] }]; + co = [{ [cw]: y, [cx]: [bb, false] }]; + cp = [{ [cw]: y, [cx]: [aV, false] }]; + cq = [X]; + cr = [{ [cw]: y, [cx]: [{ [cy]: "Region" }, true] }]; + _data = { version: "1.0", parameters: { Bucket: T, Region: T, UseFIPS: U, UseDualStack: U, Endpoint: T, ForcePathStyle: U, Accelerate: U, UseGlobalEndpoint: U, UseObjectLambdaEndpoint: V, Key: T, Prefix: T, CopySource: T, DisableAccessPoints: V, DisableMultiRegionAccessPoints: U, UseArnRegion: V, UseS3ExpressControlEndpoint: V, DisableS3ExpressSessionAuth: V }, [cu]: [{ [cv]: [{ [cw]: d, [cx]: by }], [cu]: [{ [cv]: [W, X], error: "Accelerate cannot be used with FIPS", [ct]: f }, { [cv]: [Y, Z], error: "Cannot set dual-stack in combination with a custom endpoint.", [ct]: f }, { [cv]: [Z, X], error: "A custom endpoint cannot be combined with FIPS", [ct]: f }, { [cv]: [Z, W], error: "A custom endpoint cannot be combined with S3 Accelerate", [ct]: f }, { [cv]: [X, aa, ab], error: "Partition does not support FIPS", [ct]: f }, { [cv]: [ac, { [cw]: k, [cx]: [ad, 0, a, c], [cz]: l }, { [cw]: h, [cx]: [{ [cy]: l }, "--x-s3"] }], [cu]: [ae, af, { [cv]: [ao, ap], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [aj, aq], [cu]: [{ [cv]: bH, endpoint: { [cA]: "https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: "https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: "https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: ak, [cH]: al }, [ct]: n }], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: bF, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bD, [cu]: [{ [cv]: bL, [cu]: bM, [ct]: o }, { [cv]: bN, [cu]: bM, [ct]: o }, { [cv]: bO, [cu]: bM, [ct]: o }, { [cv]: bP, [cu]: bM, [ct]: o }, { [cv]: bQ, [cu]: bM, [ct]: o }, at], [ct]: o }, { [cv]: bL, [cu]: bR, [ct]: o }, { [cv]: bN, [cu]: bR, [ct]: o }, { [cv]: bO, [cu]: bR, [ct]: o }, { [cv]: bP, [cu]: bR, [ct]: o }, { [cv]: bQ, [cu]: bR, [ct]: o }, at], [ct]: o }], [ct]: o }, an], [ct]: o }, { [cv]: [ac, { [cw]: k, [cx]: bS, [cz]: s }, { [cw]: h, [cx]: [{ [cy]: s }, "--xa-s3"] }], [cu]: [ae, af, { [cv]: bF, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bD, [cu]: [{ [cv]: bT, [cu]: bM, [ct]: o }, { [cv]: bU, [cu]: bM, [ct]: o }, { [cv]: bV, [cu]: bM, [ct]: o }, { [cv]: bW, [cu]: bM, [ct]: o }, { [cv]: bX, [cu]: bM, [ct]: o }, at], [ct]: o }, { [cv]: bT, [cu]: bR, [ct]: o }, { [cv]: bU, [cu]: bR, [ct]: o }, { [cv]: bV, [cu]: bR, [ct]: o }, { [cv]: bW, [cu]: bR, [ct]: o }, { [cv]: bX, [cu]: bR, [ct]: o }, at], [ct]: o }], [ct]: o }, an], [ct]: o }, { [cv]: [au, ao, ap], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bC, endpoint: { [cA]: t, [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bH, endpoint: { [cA]: "https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: "https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: "https://s3express-control.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: al }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [ac, { [cw]: k, [cx]: [ad, 49, 50, c], [cz]: u }, { [cw]: k, [cx]: [ad, 8, 12, c], [cz]: v }, { [cw]: k, [cx]: bS, [cz]: w }, { [cw]: k, [cx]: [ad, 32, 49, c], [cz]: x }, { [cw]: g, [cx]: by, [cz]: "regionPartition" }, { [cw]: h, [cx]: [{ [cy]: w }, "--op-s3"] }], [cu]: [{ [cv]: bZ, [cu]: [{ [cv]: bF, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [av, "e"] }], [cu]: [{ [cv]: ca, [cu]: [aw, { [cv]: bC, endpoint: { [cA]: "https://{Bucket}.ec2.{url#authority}", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { endpoint: { [cA]: "https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { [cv]: [{ [cw]: h, [cx]: [av, "o"] }], [cu]: [{ [cv]: ca, [cu]: [aw, { [cv]: bC, endpoint: { [cA]: "https://{Bucket}.op-{outpostId}.{url#authority}", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { endpoint: { [cA]: "https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { error: 'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"', [ct]: f }], [ct]: o }, { error: "Invalid Outposts Bucket alias - it must be a valid bucket name.", [ct]: f }], [ct]: o }, { error: "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.", [ct]: f }], [ct]: o }, { [cv]: bY, [cu]: [{ [cv]: [Z, { [cw]: r, [cx]: [{ [cw]: d, [cx]: [{ [cw]: m, [cx]: bz }] }] }], error: "Custom endpoint `{Endpoint}` was not a valid URI", [ct]: f }, { [cv]: [ay, am], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cc, [cu]: [{ [cv]: [W, ab], error: "S3 Accelerate cannot be used in this region", [ct]: f }, { [cv]: [Y, X, aA, aq, aB], endpoint: { [cA]: "https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, X, aA, aq, aD, aE], [cu]: [{ endpoint: aF, [ct]: n }], [ct]: o }, { [cv]: [Y, X, aA, aq, aD, aH], endpoint: aF, [ct]: n }, { [cv]: [ar, X, aA, aq, aB], endpoint: { [cA]: "https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, X, aA, aq, aD, aE], [cu]: [{ endpoint: aI, [ct]: n }], [ct]: o }, { [cv]: [ar, X, aA, aq, aD, aH], endpoint: aI, [ct]: n }, { [cv]: [Y, as, W, aq, aB], endpoint: { [cA]: "https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, as, W, aq, aD, aE], [cu]: [{ endpoint: aJ, [ct]: n }], [ct]: o }, { [cv]: [Y, as, W, aq, aD, aH], endpoint: aJ, [ct]: n }, { [cv]: [Y, as, aA, aq, aB], endpoint: { [cA]: "https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, as, aA, aq, aD, aE], [cu]: [{ endpoint: aK, [ct]: n }], [ct]: o }, { [cv]: [Y, as, aA, aq, aD, aH], endpoint: aK, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, ah, aB], endpoint: { [cA]: C, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, aL, aB], endpoint: { [cA]: q, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, ah, aD, aE], [cu]: [{ [cv]: cd, endpoint: aM, [ct]: n }, { endpoint: aM, [ct]: n }], [ct]: o }, { [cv]: [ar, as, aA, Z, ag, aL, aD, aE], [cu]: [{ [cv]: cd, endpoint: aN, [ct]: n }, aO], [ct]: o }, { [cv]: [ar, as, aA, Z, ag, ah, aD, aH], endpoint: aM, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, aL, aD, aH], endpoint: aN, [ct]: n }, { [cv]: [ar, as, W, aq, aB], endpoint: { [cA]: D, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, W, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: aP, [ct]: n }, { endpoint: aP, [ct]: n }], [ct]: o }, { [cv]: [ar, as, W, aq, aD, aH], endpoint: aP, [ct]: n }, { [cv]: [ar, as, aA, aq, aB], endpoint: { [cA]: E, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: E, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: aQ, [ct]: n }], [ct]: o }, { [cv]: [ar, as, aA, aq, aD, aH], endpoint: aQ, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [Z, ag, { [cw]: h, [cx]: [{ [cw]: i, [cx]: [ai, "scheme"] }, "http"] }, { [cw]: p, [cx]: [ad, c] }, ay, as, ar, aA], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cc, [cu]: [aO], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [ay, { [cw]: F, [cx]: bA, [cz]: G }], [cu]: [{ [cv]: [{ [cw]: i, [cx]: [aS, "resourceId[0]"], [cz]: H }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [aT, I] }] }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [aU, J] }], [cu]: [{ [cv]: ce, [cu]: [{ [cv]: cf, [cu]: [aW, aX, { [cv]: ci, [cu]: [aY, { [cv]: cj, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cm, [cu]: [{ [cv]: cn, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [bb, I] }], error: "Invalid ARN: Missing account id", [ct]: f }, { [cv]: co, [cu]: [{ [cv]: cp, [cu]: [{ [cv]: bC, endpoint: { [cA]: M, [cB]: bc, [cH]: al }, [ct]: n }, { [cv]: cq, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bc, [cH]: al }, [ct]: n }, { endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bc, [cH]: al }, [ct]: n }], [ct]: o }, bd], [ct]: o }, be], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, bh], [ct]: o }, { error: "Invalid ARN: bucket ARN is missing a region", [ct]: f }], [ct]: o }, bi], [ct]: o }, { error: "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`", [ct]: f }], [ct]: o }, { [cv]: ce, [cu]: [{ [cv]: cf, [cu]: [{ [cv]: ci, [cu]: [{ [cv]: ce, [cu]: [{ [cv]: ci, [cu]: [aY, { [cv]: cj, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [ba, "{partitionResult#name}"] }], [cu]: [{ [cv]: cn, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [aU, B] }], [cu]: [{ [cv]: co, [cu]: [{ [cv]: cp, [cu]: [{ [cv]: bB, error: "Access Points do not support S3 Accelerate", [ct]: f }, { [cv]: bH, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: [as, ar, Z, ag], endpoint: { [cA]: M, [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bj, [cH]: al }, [ct]: n }], [ct]: o }, bd], [ct]: o }, be], [ct]: o }, { error: "Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}", [ct]: f }], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, bh], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: y, [cx]: [aV, c] }], [cu]: [{ [cv]: ch, error: "S3 MRAP does not support dual-stack", [ct]: f }, { [cv]: cq, error: "S3 MRAP does not support FIPS", [ct]: f }, { [cv]: bB, error: "S3 MRAP does not support S3 Accelerate", [ct]: f }, { [cv]: [{ [cw]: e, [cx]: [{ [cy]: "DisableMultiRegionAccessPoints" }, c] }], error: "Invalid configuration: Multi-Region Access Point ARNs are disabled.", [ct]: f }, { [cv]: [{ [cw]: g, [cx]: by, [cz]: N }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [{ [cy]: N }, j] }, { [cw]: i, [cx]: [aS, "partition"] }] }], [cu]: [{ endpoint: { [cA]: "https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}", [cB]: { [cD]: [{ [cE]: c, name: z, [cF]: B, [cI]: cb }] }, [cH]: al }, [ct]: n }], [ct]: o }, { error: "Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`", [ct]: f }], [ct]: o }], [ct]: o }, { error: "Invalid Access Point Name", [ct]: f }], [ct]: o }, bi], [ct]: o }, { [cv]: [{ [cw]: h, [cx]: [aU, A] }], [cu]: [{ [cv]: ch, error: "S3 Outposts does not support Dual-stack", [ct]: f }, { [cv]: cq, error: "S3 Outposts does not support FIPS", [ct]: f }, { [cv]: bB, error: "S3 Outposts does not support S3 Accelerate", [ct]: f }, { [cv]: [{ [cw]: d, [cx]: [{ [cw]: i, [cx]: [aS, "resourceId[4]"] }] }], error: "Invalid Arn: Outpost Access Point ARN contains sub resources", [ct]: f }, { [cv]: [{ [cw]: i, [cx]: cg, [cz]: x }], [cu]: [{ [cv]: bZ, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cm, [cu]: [{ [cv]: cn, [cu]: [{ [cv]: co, [cu]: [{ [cv]: [{ [cw]: i, [cx]: ck, [cz]: O }], [cu]: [{ [cv]: [{ [cw]: i, [cx]: [aS, "resourceId[3]"], [cz]: L }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [{ [cy]: O }, K] }], [cu]: [{ [cv]: bC, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}", [cB]: bk, [cH]: al }, [ct]: n }, { endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bk, [cH]: al }, [ct]: n }], [ct]: o }, { error: "Expected an outpost type `accesspoint`, found {outpostType}", [ct]: f }], [ct]: o }, { error: "Invalid ARN: expected an access point name", [ct]: f }], [ct]: o }, { error: "Invalid ARN: Expected a 4-component resource", [ct]: f }], [ct]: o }, be], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, { error: "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`", [ct]: f }], [ct]: o }, { error: "Invalid ARN: The Outpost Id was not set", [ct]: f }], [ct]: o }, { error: "Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})", [ct]: f }], [ct]: o }, { error: "Invalid ARN: No ARN type specified", [ct]: f }], [ct]: o }, { [cv]: [{ [cw]: k, [cx]: [ad, 0, 4, b], [cz]: P }, { [cw]: h, [cx]: [{ [cy]: P }, "arn:"] }, { [cw]: r, [cx]: [{ [cw]: d, [cx]: [bl] }] }], error: "Invalid ARN: `{Bucket}` was not a valid ARN", [ct]: f }, { [cv]: [{ [cw]: e, [cx]: [az, c] }, bl], error: "Path-style addressing cannot be used with ARN buckets", [ct]: f }, { [cv]: bE, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [aA], [cu]: [{ [cv]: [Y, aq, X, aB], endpoint: { [cA]: "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, aq, X, aD, aE], [cu]: [{ endpoint: bm, [ct]: n }], [ct]: o }, { [cv]: [Y, aq, X, aD, aH], endpoint: bm, [ct]: n }, { [cv]: [ar, aq, X, aB], endpoint: { [cA]: "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, aq, X, aD, aE], [cu]: [{ endpoint: bn, [ct]: n }], [ct]: o }, { [cv]: [ar, aq, X, aD, aH], endpoint: bn, [ct]: n }, { [cv]: [Y, aq, as, aB], endpoint: { [cA]: "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, aq, as, aD, aE], [cu]: [{ endpoint: bo, [ct]: n }], [ct]: o }, { [cv]: [Y, aq, as, aD, aH], endpoint: bo, [ct]: n }, { [cv]: [ar, Z, ag, as, aB], endpoint: { [cA]: Q, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, Z, ag, as, aD, aE], [cu]: [{ [cv]: cd, endpoint: bp, [ct]: n }, { endpoint: bp, [ct]: n }], [ct]: o }, { [cv]: [ar, Z, ag, as, aD, aH], endpoint: bp, [ct]: n }, { [cv]: [ar, aq, as, aB], endpoint: { [cA]: R, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, aq, as, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: R, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: bq, [ct]: n }], [ct]: o }, { [cv]: [ar, aq, as, aD, aH], endpoint: bq, [ct]: n }], [ct]: o }, { error: "Path-style addressing cannot be used with S3 Accelerate", [ct]: f }], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: d, [cx]: [br] }, { [cw]: e, [cx]: [br, c] }], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cr, [cu]: [aW, aX, { [cv]: bC, endpoint: { [cA]: t, [cB]: bs, [cH]: al }, [ct]: n }, { [cv]: cq, endpoint: { [cA]: "https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}", [cB]: bs, [cH]: al }, [ct]: n }, { endpoint: { [cA]: "https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}", [cB]: bs, [cH]: al }, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [au], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cr, [cu]: [{ [cv]: [X, Y, aq, aB], endpoint: { [cA]: "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [X, Y, aq, aD, aE], [cu]: [{ endpoint: bt, [ct]: n }], [ct]: o }, { [cv]: [X, Y, aq, aD, aH], endpoint: bt, [ct]: n }, { [cv]: [X, ar, aq, aB], endpoint: { [cA]: "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [X, ar, aq, aD, aE], [cu]: [{ endpoint: bu, [ct]: n }], [ct]: o }, { [cv]: [X, ar, aq, aD, aH], endpoint: bu, [ct]: n }, { [cv]: [as, Y, aq, aB], endpoint: { [cA]: "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, Y, aq, aD, aE], [cu]: [{ endpoint: bv, [ct]: n }], [ct]: o }, { [cv]: [as, Y, aq, aD, aH], endpoint: bv, [ct]: n }, { [cv]: [as, ar, Z, ag, aB], endpoint: { [cA]: t, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, ar, Z, ag, aD, aE], [cu]: [{ [cv]: cd, endpoint: bw, [ct]: n }, { endpoint: bw, [ct]: n }], [ct]: o }, { [cv]: [as, ar, Z, ag, aD, aH], endpoint: bw, [ct]: n }, { [cv]: [as, ar, aq, aB], endpoint: { [cA]: S, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, ar, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: S, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: bx, [ct]: n }], [ct]: o }, { [cv]: [as, ar, aq, aD, aH], endpoint: bx, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }], [ct]: o }, { error: "A region must be set when sending requests to S3.", [ct]: f }] }; + ruleSet = _data; + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/endpointResolver.js +var cache2, defaultEndpointResolver; +var init_endpointResolver = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/endpointResolver.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es33(); + init_dist_es32(); + init_ruleset(); + cache2 = new EndpointCache({ + size: 50, + params: [ + "Accelerate", + "Bucket", + "DisableAccessPoints", + "DisableMultiRegionAccessPoints", + "DisableS3ExpressSessionAuth", + "Endpoint", + "ForcePathStyle", + "Region", + "UseArnRegion", + "UseDualStack", + "UseFIPS", + "UseGlobalEndpoint", + "UseObjectLambdaEndpoint", + "UseS3ExpressControlEndpoint" + ] + }); + defaultEndpointResolver = /* @__PURE__ */ __name((endpointParams, context2 = {}) => { + return cache2.get(endpointParams, () => resolveEndpoint(ruleSet, { + endpointParams, + logger: context2.logger + })); + }, "defaultEndpointResolver"); + customEndpointFunctions.aws = awsEndpointFunctions; + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthSchemeProvider.js +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "s3", + region: authParameters.region + }, + propertiesExtractor: (config3, context2) => ({ + signingProperties: { + config: config3, + context: context2 + } + }) + }; +} +function createAwsAuthSigv4aHttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4a", + signingProperties: { + name: "s3", + region: authParameters.region + }, + propertiesExtractor: (config3, context2) => ({ + signingProperties: { + config: config3, + context: context2 + } + }) + }; +} +var createEndpointRuleSetHttpAuthSchemeParametersProvider, _defaultS3HttpAuthSchemeParametersProvider, defaultS3HttpAuthSchemeParametersProvider, createEndpointRuleSetHttpAuthSchemeProvider, _defaultS3HttpAuthSchemeProvider, defaultS3HttpAuthSchemeProvider, resolveHttpAuthSchemeConfig; +var init_httpAuthSchemeProvider = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthSchemeProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_dist_es43(); + init_dist_es41(); + init_dist_es4(); + init_endpointResolver(); + createEndpointRuleSetHttpAuthSchemeParametersProvider = /* @__PURE__ */ __name((defaultHttpAuthSchemeParametersProvider) => async (config3, context2, input) => { + if (!input) { + throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`"); + } + const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config3, context2, input); + const instructionsFn = getSmithyContext(context2)?.commandInstance?.constructor?.getEndpointParameterInstructions; + if (!instructionsFn) { + throw new Error(`getEndpointParameterInstructions() is not defined on '${context2.commandName}'`); + } + const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config3); + return Object.assign(defaultParameters, endpointParameters); + }, "createEndpointRuleSetHttpAuthSchemeParametersProvider"); + _defaultS3HttpAuthSchemeParametersProvider = /* @__PURE__ */ __name(async (config3, context2, input) => { + return { + operation: getSmithyContext(context2).operation, + region: await normalizeProvider(config3.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }, "_defaultS3HttpAuthSchemeParametersProvider"); + defaultS3HttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultS3HttpAuthSchemeParametersProvider); + __name(createAwsAuthSigv4HttpAuthOption, "createAwsAuthSigv4HttpAuthOption"); + __name(createAwsAuthSigv4aHttpAuthOption, "createAwsAuthSigv4aHttpAuthOption"); + createEndpointRuleSetHttpAuthSchemeProvider = /* @__PURE__ */ __name((defaultEndpointResolver2, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => { + const endpointRuleSetHttpAuthSchemeProvider = /* @__PURE__ */ __name((authParameters) => { + const endpoint = defaultEndpointResolver2(authParameters); + const authSchemes = endpoint.properties?.authSchemes; + if (!authSchemes) { + return defaultHttpAuthSchemeResolver(authParameters); + } + const options = []; + for (const scheme of authSchemes) { + const { name: resolvedName, properties = {}, ...rest } = scheme; + const name = resolvedName.toLowerCase(); + if (resolvedName !== name) { + console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`); + } + let schemeId; + if (name === "sigv4a") { + schemeId = "aws.auth#sigv4a"; + const sigv4Present = authSchemes.find((s2) => { + const name2 = s2.name.toLowerCase(); + return name2 !== "sigv4a" && name2.startsWith("sigv4"); + }); + if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) { + continue; + } + } else if (name.startsWith("sigv4")) { + schemeId = "aws.auth#sigv4"; + } else { + throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`); + } + const createOption = createHttpAuthOptionFunctions[schemeId]; + if (!createOption) { + throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`); + } + const option = createOption(authParameters); + option.schemeId = schemeId; + option.signingProperties = { ...option.signingProperties || {}, ...rest, ...properties }; + options.push(option); + } + return options; + }, "endpointRuleSetHttpAuthSchemeProvider"); + return endpointRuleSetHttpAuthSchemeProvider; + }, "createEndpointRuleSetHttpAuthSchemeProvider"); + _defaultS3HttpAuthSchemeProvider = /* @__PURE__ */ __name((authParameters) => { + const options = []; + switch (authParameters.operation) { + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + options.push(createAwsAuthSigv4aHttpAuthOption(authParameters)); + } + } + return options; + }, "_defaultS3HttpAuthSchemeProvider"); + defaultS3HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultS3HttpAuthSchemeProvider, { + "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption, + "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption + }); + resolveHttpAuthSchemeConfig = /* @__PURE__ */ __name((config3) => { + const config_0 = resolveAwsSdkSigV4Config(config3); + const config_1 = resolveAwsSdkSigV4AConfig(config_0); + return Object.assign(config_1, { + authSchemePreference: normalizeProvider(config3.authSchemePreference ?? []) + }); + }, "resolveHttpAuthSchemeConfig"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js +var resolveClientEndpointParameters, commonParams; +var init_EndpointParameters = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { + return Object.assign(options, { + useFipsEndpoint: options.useFipsEndpoint ?? false, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + forcePathStyle: options.forcePathStyle ?? false, + useAccelerateEndpoint: options.useAccelerateEndpoint ?? false, + useGlobalEndpoint: options.useGlobalEndpoint ?? false, + disableMultiregionAccessPoints: options.disableMultiregionAccessPoints ?? false, + defaultSigningName: "s3", + clientContextParams: options.clientContextParams ?? {} + }); + }, "resolveClientEndpointParameters"); + commonParams = { + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js +var S3ServiceException; +var init_S3ServiceException = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es21(); + S3ServiceException = class extends ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, S3ServiceException.prototype); + } + }; + __name(S3ServiceException, "S3ServiceException"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/errors.js +var NoSuchUpload, AccessDenied, ObjectNotInActiveTierError, BucketAlreadyExists, BucketAlreadyOwnedByYou, NoSuchBucket, InvalidObjectState, NoSuchKey, NotFound, EncryptionTypeMismatch, InvalidRequest, InvalidWriteOffset, TooManyParts, IdempotencyParameterMismatch, ObjectAlreadyInActiveTierError; +var init_errors3 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/models/errors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_S3ServiceException(); + NoSuchUpload = class extends S3ServiceException { + name = "NoSuchUpload"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoSuchUpload", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NoSuchUpload.prototype); + } + }; + __name(NoSuchUpload, "NoSuchUpload"); + AccessDenied = class extends S3ServiceException { + name = "AccessDenied"; + $fault = "client"; + constructor(opts) { + super({ + name: "AccessDenied", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AccessDenied.prototype); + } + }; + __name(AccessDenied, "AccessDenied"); + ObjectNotInActiveTierError = class extends S3ServiceException { + name = "ObjectNotInActiveTierError"; + $fault = "client"; + constructor(opts) { + super({ + name: "ObjectNotInActiveTierError", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ObjectNotInActiveTierError.prototype); + } + }; + __name(ObjectNotInActiveTierError, "ObjectNotInActiveTierError"); + BucketAlreadyExists = class extends S3ServiceException { + name = "BucketAlreadyExists"; + $fault = "client"; + constructor(opts) { + super({ + name: "BucketAlreadyExists", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, BucketAlreadyExists.prototype); + } + }; + __name(BucketAlreadyExists, "BucketAlreadyExists"); + BucketAlreadyOwnedByYou = class extends S3ServiceException { + name = "BucketAlreadyOwnedByYou"; + $fault = "client"; + constructor(opts) { + super({ + name: "BucketAlreadyOwnedByYou", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, BucketAlreadyOwnedByYou.prototype); + } + }; + __name(BucketAlreadyOwnedByYou, "BucketAlreadyOwnedByYou"); + NoSuchBucket = class extends S3ServiceException { + name = "NoSuchBucket"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoSuchBucket", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NoSuchBucket.prototype); + } + }; + __name(NoSuchBucket, "NoSuchBucket"); + InvalidObjectState = class extends S3ServiceException { + name = "InvalidObjectState"; + $fault = "client"; + StorageClass; + AccessTier; + constructor(opts) { + super({ + name: "InvalidObjectState", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidObjectState.prototype); + this.StorageClass = opts.StorageClass; + this.AccessTier = opts.AccessTier; + } + }; + __name(InvalidObjectState, "InvalidObjectState"); + NoSuchKey = class extends S3ServiceException { + name = "NoSuchKey"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoSuchKey", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NoSuchKey.prototype); + } + }; + __name(NoSuchKey, "NoSuchKey"); + NotFound = class extends S3ServiceException { + name = "NotFound"; + $fault = "client"; + constructor(opts) { + super({ + name: "NotFound", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NotFound.prototype); + } + }; + __name(NotFound, "NotFound"); + EncryptionTypeMismatch = class extends S3ServiceException { + name = "EncryptionTypeMismatch"; + $fault = "client"; + constructor(opts) { + super({ + name: "EncryptionTypeMismatch", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, EncryptionTypeMismatch.prototype); + } + }; + __name(EncryptionTypeMismatch, "EncryptionTypeMismatch"); + InvalidRequest = class extends S3ServiceException { + name = "InvalidRequest"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidRequest", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidRequest.prototype); + } + }; + __name(InvalidRequest, "InvalidRequest"); + InvalidWriteOffset = class extends S3ServiceException { + name = "InvalidWriteOffset"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidWriteOffset", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidWriteOffset.prototype); + } + }; + __name(InvalidWriteOffset, "InvalidWriteOffset"); + TooManyParts = class extends S3ServiceException { + name = "TooManyParts"; + $fault = "client"; + constructor(opts) { + super({ + name: "TooManyParts", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, TooManyParts.prototype); + } + }; + __name(TooManyParts, "TooManyParts"); + IdempotencyParameterMismatch = class extends S3ServiceException { + name = "IdempotencyParameterMismatch"; + $fault = "client"; + constructor(opts) { + super({ + name: "IdempotencyParameterMismatch", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, IdempotencyParameterMismatch.prototype); + } + }; + __name(IdempotencyParameterMismatch, "IdempotencyParameterMismatch"); + ObjectAlreadyInActiveTierError = class extends S3ServiceException { + name = "ObjectAlreadyInActiveTierError"; + $fault = "client"; + constructor(opts) { + super({ + name: "ObjectAlreadyInActiveTierError", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ObjectAlreadyInActiveTierError.prototype); + } + }; + __name(ObjectAlreadyInActiveTierError, "ObjectAlreadyInActiveTierError"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js +var _A, _AAO, _AC, _ACL, _ACL_, _ACLn, _ACP, _ACT, _ACn, _AD, _ADb, _AED, _AF, _AH, _AHl, _AI, _AIMU, _AKI, _AM, _AMU, _AMUO, _AMUR, _AMl, _AO, _AOl, _APA, _APAc, _AQRD, _AR, _ARI, _AS, _ASBD, _ASSEBD, _ASr, _AT, _An, _B, _BA, _BAE, _BAI, _BAOBY, _BET, _BGR, _BI, _BKE, _BLC, _BLN, _BLS, _BLT, _BN, _BNu, _BP, _BPA, _BPP, _BR, _BRy, _BS, _Bo, _Bu, _C, _CA, _CACL, _CB, _CBC, _CBMC, _CBMCR, _CBMTC, _CBMTCR, _CBO, _CBR, _CC, _CCRC, _CCRCC, _CCRCNVME, _CC_, _CD, _CD_, _CDo, _CE, _CE_, _CEo, _CF, _CFC, _CL, _CL_, _CL__, _CLo, _CM, _CMD, _CMU, _CMUO, _CMUOr, _CMUR, _CMURo, _CMURr, _CMUo, _CMUr, _CMh, _CO, _COO, _COR, _CORSC, _CORSR, _CORSRu, _CORo, _CP, _CPL, _CPLo, _CPR, _CPo, _CPom, _CR, _CRSBA, _CR_, _CS, _CSHA, _CSHAh, _CSIM, _CSIMS, _CSINM, _CSIUS, _CSO, _CSR, _CSRo, _CSRr, _CSSSECA, _CSSSECK, _CSSSECKMD, _CSV, _CSVI, _CSVIn, _CSVO, _CSo, _CSr, _CT, _CT_, _CTl, _CTo, _CTom, _CTon, _Co, _Cod, _Com, _Con, _Cont, _Cr, _D, _DAI, _DB, _DBAC, _DBACR, _DBC, _DBCR, _DBE, _DBER, _DBIC, _DBICR, _DBITC, _DBITCR, _DBL, _DBLR, _DBMC, _DBMCR, _DBMCRe, _DBMCe, _DBMTC, _DBMTCR, _DBOC, _DBOCR, _DBP, _DBPR, _DBR, _DBRR, _DBRe, _DBT, _DBTR, _DBW, _DBWR, _DE, _DIM, _DIMS, _DINM, _DIUS, _DM, _DME, _DMR, _DMVI, _DMe, _DN, _DO, _DOO, _DOOe, _DOR, _DORe, _DOT, _DOTO, _DOTR, _DOe, _DOel, _DOele, _DPAB, _DPABR, _DR, _DRe, _DRel, _DRes, _Da, _De, _Del, _Deli, _Des, _Desc, _Det, _E, _EA, _EBC, _EBO, _EC, _ECr, _ED, _EDr, _EE, _EH, _EHx, _EM, _EODM, _EOR, _ES, _ESBO, _ET, _ETL, _ETM, _ETa, _ETn, _ETv, _ETx, _En, _Ena, _End, _Er, _Err, _Ev, _Eve, _Ex, _Exp, _F, _FD, _FHI, _FO, _FR, _FRL, _FRi, _Fi, _Fo, _Fr, _G, _GBA, _GBAC, _GBACO, _GBACOe, _GBACR, _GBACRe, _GBACe, _GBAO, _GBAOe, _GBAR, _GBARe, _GBAe, _GBC, _GBCO, _GBCR, _GBE, _GBEO, _GBER, _GBIC, _GBICO, _GBICR, _GBITC, _GBITCO, _GBITCR, _GBL, _GBLC, _GBLCO, _GBLCR, _GBLO, _GBLOe, _GBLR, _GBLRe, _GBLe, _GBMC, _GBMCO, _GBMCOe, _GBMCR, _GBMCRe, _GBMCRet, _GBMCe, _GBMTC, _GBMTCO, _GBMTCR, _GBMTCRe, _GBNC, _GBNCR, _GBOC, _GBOCO, _GBOCR, _GBP, _GBPO, _GBPR, _GBPS, _GBPSO, _GBPSR, _GBR, _GBRO, _GBRP, _GBRPO, _GBRPR, _GBRR, _GBT, _GBTO, _GBTR, _GBV, _GBVO, _GBVR, _GBW, _GBWO, _GBWR, _GFC, _GJP, _GO, _GOA, _GOAO, _GOAOe, _GOAP, _GOAR, _GOARe, _GOARet, _GOAe, _GOLC, _GOLCO, _GOLCR, _GOLH, _GOLHO, _GOLHR, _GOO, _GOR, _GORO, _GORR, _GORe, _GOT, _GOTO, _GOTOe, _GOTR, _GOTRe, _GOTe, _GPAB, _GPABO, _GPABR, _GR, _GRACP, _GW, _GWACP, _Gr, _Gra, _HB, _HBO, _HBR, _HECRE, _HN, _HO, _HOO, _HOR, _HRC, _I, _IC, _ICL, _ID, _IDn, _IDnv, _IE, _IEn, _IF, _IL, _IM, _IMIT, _IMLMT, _IMS, _IMS_, _IMSf, _IMUR, _IM_, _INM, _INM_, _IOF, _IOS, _IOV, _IP, _IPA, _IPM, _IR, _IRIP, _IS, _ISBD, _ISn, _IT, _ITAO, _ITC, _ITCL, _ITCR, _ITCU, _ITCn, _ITF, _IUS, _IUS_, _IWO, _In, _Ini, _JSON, _JSONI, _JSONO, _JTC, _JTCR, _JTCU, _K, _KC, _KI, _KKA, _KM, _KMSC, _KMSKA, _KMSKI, _KMSMKID, _KPE, _L, _LAMBR, _LAMDBR, _LB, _LBAC, _LBACO, _LBACR, _LBACRi, _LBIC, _LBICO, _LBICR, _LBITC, _LBITCO, _LBITCR, _LBMC, _LBMCO, _LBMCR, _LBO, _LBR, _LBRi, _LC, _LCi, _LDB, _LDBO, _LDBR, _LE, _LEi, _LFA, _LFC, _LFCL, _LFCa, _LH, _LI, _LICR, _LM, _LMCR, _LMT, _LMU, _LMUO, _LMUR, _LMURi, _LM_, _LO, _LOO, _LOR, _LOV, _LOVO, _LOVOi, _LOVR, _LOVRi, _LOVi, _LP, _LPO, _LPR, _LPRi, _LR, _LRAO, _LRF, _LRi, _LVR, _M, _MAO, _MAS, _MB, _MC, _MCL, _MCR, _MCe, _MD, _MDB, _MDf, _ME, _MF, _MFA, _MFAD, _MK, _MM, _MOS, _MP, _MTC, _MTCR, _MTEC, _MU, _MUL, _MUa, _Ma, _Me, _Mes, _Mi, _Mo, _N, _NC, _NCF, _NCT, _ND, _NEKKAS, _NF, _NKM, _NM, _NNV, _NPNM, _NSB, _NSK, _NSU, _NUIM, _NVE, _NVIM, _NVT, _NVTL, _NVTo, _O, _OA, _OAIATE, _OC, _OCR, _OCRw, _OE, _OF, _OI, _OIL, _OL, _OLC, _OLE, _OLEFB, _OLLH, _OLLHS, _OLM, _OLR, _OLRUD, _OLRb, _OLb, _ONIATE, _OO, _OOA, _OP, _OPb, _OS, _OSGT, _OSLT, _OSV, _OSu, _OV, _OVL, _Ob, _Obj, _P, _PABC, _PBA, _PBAC, _PBACR, _PBACRu, _PBACu, _PBAR, _PBARu, _PBAu, _PBC, _PBCR, _PBE, _PBER, _PBIC, _PBICR, _PBITC, _PBITCR, _PBL, _PBLC, _PBLCO, _PBLCR, _PBLR, _PBMC, _PBMCR, _PBNC, _PBNCR, _PBOC, _PBOCR, _PBP, _PBPR, _PBR, _PBRP, _PBRPR, _PBRR, _PBT, _PBTR, _PBV, _PBVR, _PBW, _PBWR, _PC, _PDS, _PE, _PI, _PL, _PN, _PNM, _PO, _POA, _POAO, _POAR, _POLC, _POLCO, _POLCR, _POLH, _POLHO, _POLHR, _POO, _POR, _PORO, _PORR, _PORu, _POT, _POTO, _POTR, _PP, _PPAB, _PPABR, _PS, _Pa, _Par, _Parq, _Pay, _Payl, _Pe, _Po, _Pr, _Pri, _Pro, _Q, _QA, _QC, _QCL, _QCu, _QCue, _QEC, _QF, _Qu, _R, _RART, _RC, _RCC, _RCD, _RCE, _RCL, _RCT, _RCe, _RD, _RE, _RED, _REe, _REec, _RKKID, _RKPW, _RKW, _RM, _RO, _ROO, _ROOe, _ROP, _ROR, _RORe, _ROe, _RP, _RPB, _RPC, _RPe, _RR, _RRAO, _RRF, _RRe, _RRep, _RReq, _RRes, _RRo, _RS, _RSe, _RSen, _RT, _RTV, _RTe, _RUD, _Ra, _Re, _Rec, _Red, _Ret, _Ro, _Ru, _S, _SA, _SAK, _SAs, _SB, _SBD, _SC, _SCA, _SCADE, _SCV, _SCe, _SCt, _SDV, _SE, _SIM, _SIMS, _SINM, _SIUS, _SK, _SKEO, _SKF, _SKe, _SL, _SM, _SOC, _SOCES, _SOCO, _SOCR, _SP, _SPi, _SR, _SS, _SSC, _SSE, _SSEA, _SSEBD, _SSEC, _SSECA, _SSECK, _SSECKMD, _SSEKMS, _SSEKMSE, _SSEKMSEC, _SSEKMSKI, _SSER, _SSERe, _SSES, _ST, _STD, _STDR, _S_, _Sc, _Si, _St, _Sta, _Su, _T, _TA, _TAo, _TB, _TBA, _TBT, _TC, _TCL, _TCo, _TCop, _TD, _TDMOS, _TG, _TGa, _TL, _TLr, _TMP, _TN, _TNa, _TOKF, _TP, _TPC, _TS, _TSa, _Ta, _Tag, _Ti, _Tie, _Tier, _Tim, _To, _Top, _Tr, _Tra, _Ty, _U, _UBMITC, _UBMITCR, _UBMJTC, _UBMJTCR, _UI, _UIM, _UM, _UOE, _UOER, _UOERp, _UP, _UPC, _UPCO, _UPCR, _UPO, _UPR, _URI, _Up, _V, _VC, _VI, _VIM, _Ve, _Ver, _WC, _WGOR, _WGORR, _WOB, _WRL, _Y, _ar, _br, _c, _ct, _d, _e, _eP, _en, _et, _fo, _h, _hC, _hE, _hH, _hL, _hP, _hPH, _hQ, _hi, _i, _iT, _km, _m, _mb, _mdb, _mk, _mp, _mu, _p, _pN, _pnm, _rcc, _rcd, _rce, _rcl, _rct, _re, _s, _sa, _st, _uI, _uim, _vI, _vim, _x, _xA, _xF, _xN, _xNm, _xaa, _xaad, _xaapa, _xaari, _xaas, _xaba, _xabgr, _xabln, _xablt, _xabn, _xabole, _xabolt, _xabr, _xaca, _xacc, _xacc_, _xacc__, _xacm, _xacrsba, _xacs, _xacs_, _xacs__, _xacsim, _xacsims, _xacsinm, _xacsius, _xacsm, _xacsr, _xacssseca, _xacssseck, _xacssseckM, _xacsvi, _xact, _xact_, _xadm, _xae, _xaebo, _xafec, _xafem, _xafhCC, _xafhCD, _xafhCE, _xafhCL, _xafhCR, _xafhCT, _xafhE, _xafhE_, _xafhLM, _xafhar, _xafhxacc, _xafhxacc_, _xafhxacc__, _xafhxacs, _xafhxacs_, _xafhxadm, _xafhxae, _xafhxamm, _xafhxampc, _xafhxaollh, _xafhxaolm, _xafhxaolrud, _xafhxar, _xafhxarc, _xafhxars, _xafhxasc, _xafhxasse, _xafhxasseakki, _xafhxassebke, _xafhxasseca, _xafhxasseckM, _xafhxatc, _xafhxavi, _xafs, _xagfc, _xagr, _xagra, _xagw, _xagwa, _xaimit, _xaimlmt, _xaims, _xam, _xam_, _xamd, _xamm, _xamos, _xamp, _xampc, _xaoa, _xaollh, _xaolm, _xaolrud, _xaoo, _xaooa, _xaos, _xapnm, _xar, _xarc, _xarop, _xarp, _xarr, _xars, _xars_, _xarsim, _xarsims, _xarsinm, _xarsius, _xart, _xasc, _xasca, _xasdv, _xasebo, _xasse, _xasseakki, _xassebke, _xassec, _xasseca, _xasseck, _xasseckM, _xat, _xatc, _xatd, _xatdmos, _xavi, _xawob, _xawrl, _xs, n0, _s_registry, S3ServiceException$, n0_registry, AccessDenied$, BucketAlreadyExists$, BucketAlreadyOwnedByYou$, EncryptionTypeMismatch$, IdempotencyParameterMismatch$, InvalidObjectState$, InvalidRequest$, InvalidWriteOffset$, NoSuchBucket$, NoSuchKey$, NoSuchUpload$, NotFound$, ObjectAlreadyInActiveTierError$, ObjectNotInActiveTierError$, TooManyParts$, errorTypeRegistries, CopySourceSSECustomerKey, NonEmptyKmsKeyArnString, SessionCredentialValue, SSECustomerKey, SSEKMSEncryptionContext, SSEKMSKeyId, StreamingBlob, AbacStatus$, AbortIncompleteMultipartUpload$, AbortMultipartUploadOutput$, AbortMultipartUploadRequest$, AccelerateConfiguration$, AccessControlPolicy$, AccessControlTranslation$, AnalyticsAndOperator$, AnalyticsConfiguration$, AnalyticsExportDestination$, AnalyticsS3BucketDestination$, BlockedEncryptionTypes$, Bucket$, BucketInfo$, BucketLifecycleConfiguration$, BucketLoggingStatus$, Checksum$, CommonPrefix$, CompletedMultipartUpload$, CompletedPart$, CompleteMultipartUploadOutput$, CompleteMultipartUploadRequest$, Condition$, ContinuationEvent$, CopyObjectOutput$, CopyObjectRequest$, CopyObjectResult$, CopyPartResult$, CORSConfiguration$, CORSRule$, CreateBucketConfiguration$, CreateBucketMetadataConfigurationRequest$, CreateBucketMetadataTableConfigurationRequest$, CreateBucketOutput$, CreateBucketRequest$, CreateMultipartUploadOutput$, CreateMultipartUploadRequest$, CreateSessionOutput$, CreateSessionRequest$, CSVInput$, CSVOutput$, DefaultRetention$, Delete$, DeleteBucketAnalyticsConfigurationRequest$, DeleteBucketCorsRequest$, DeleteBucketEncryptionRequest$, DeleteBucketIntelligentTieringConfigurationRequest$, DeleteBucketInventoryConfigurationRequest$, DeleteBucketLifecycleRequest$, DeleteBucketMetadataConfigurationRequest$, DeleteBucketMetadataTableConfigurationRequest$, DeleteBucketMetricsConfigurationRequest$, DeleteBucketOwnershipControlsRequest$, DeleteBucketPolicyRequest$, DeleteBucketReplicationRequest$, DeleteBucketRequest$, DeleteBucketTaggingRequest$, DeleteBucketWebsiteRequest$, DeletedObject$, DeleteMarkerEntry$, DeleteMarkerReplication$, DeleteObjectOutput$, DeleteObjectRequest$, DeleteObjectsOutput$, DeleteObjectsRequest$, DeleteObjectTaggingOutput$, DeleteObjectTaggingRequest$, DeletePublicAccessBlockRequest$, Destination$, DestinationResult$, Encryption$, EncryptionConfiguration$, EndEvent$, _Error$, ErrorDetails$, ErrorDocument$, EventBridgeConfiguration$, ExistingObjectReplication$, FilterRule$, GetBucketAbacOutput$, GetBucketAbacRequest$, GetBucketAccelerateConfigurationOutput$, GetBucketAccelerateConfigurationRequest$, GetBucketAclOutput$, GetBucketAclRequest$, GetBucketAnalyticsConfigurationOutput$, GetBucketAnalyticsConfigurationRequest$, GetBucketCorsOutput$, GetBucketCorsRequest$, GetBucketEncryptionOutput$, GetBucketEncryptionRequest$, GetBucketIntelligentTieringConfigurationOutput$, GetBucketIntelligentTieringConfigurationRequest$, GetBucketInventoryConfigurationOutput$, GetBucketInventoryConfigurationRequest$, GetBucketLifecycleConfigurationOutput$, GetBucketLifecycleConfigurationRequest$, GetBucketLocationOutput$, GetBucketLocationRequest$, GetBucketLoggingOutput$, GetBucketLoggingRequest$, GetBucketMetadataConfigurationOutput$, GetBucketMetadataConfigurationRequest$, GetBucketMetadataConfigurationResult$, GetBucketMetadataTableConfigurationOutput$, GetBucketMetadataTableConfigurationRequest$, GetBucketMetadataTableConfigurationResult$, GetBucketMetricsConfigurationOutput$, GetBucketMetricsConfigurationRequest$, GetBucketNotificationConfigurationRequest$, GetBucketOwnershipControlsOutput$, GetBucketOwnershipControlsRequest$, GetBucketPolicyOutput$, GetBucketPolicyRequest$, GetBucketPolicyStatusOutput$, GetBucketPolicyStatusRequest$, GetBucketReplicationOutput$, GetBucketReplicationRequest$, GetBucketRequestPaymentOutput$, GetBucketRequestPaymentRequest$, GetBucketTaggingOutput$, GetBucketTaggingRequest$, GetBucketVersioningOutput$, GetBucketVersioningRequest$, GetBucketWebsiteOutput$, GetBucketWebsiteRequest$, GetObjectAclOutput$, GetObjectAclRequest$, GetObjectAttributesOutput$, GetObjectAttributesParts$, GetObjectAttributesRequest$, GetObjectLegalHoldOutput$, GetObjectLegalHoldRequest$, GetObjectLockConfigurationOutput$, GetObjectLockConfigurationRequest$, GetObjectOutput$, GetObjectRequest$, GetObjectRetentionOutput$, GetObjectRetentionRequest$, GetObjectTaggingOutput$, GetObjectTaggingRequest$, GetObjectTorrentOutput$, GetObjectTorrentRequest$, GetPublicAccessBlockOutput$, GetPublicAccessBlockRequest$, GlacierJobParameters$, Grant$, Grantee$, HeadBucketOutput$, HeadBucketRequest$, HeadObjectOutput$, HeadObjectRequest$, IndexDocument$, Initiator$, InputSerialization$, IntelligentTieringAndOperator$, IntelligentTieringConfiguration$, IntelligentTieringFilter$, InventoryConfiguration$, InventoryDestination$, InventoryEncryption$, InventoryFilter$, InventoryS3BucketDestination$, InventorySchedule$, InventoryTableConfiguration$, InventoryTableConfigurationResult$, InventoryTableConfigurationUpdates$, JournalTableConfiguration$, JournalTableConfigurationResult$, JournalTableConfigurationUpdates$, JSONInput$, JSONOutput$, LambdaFunctionConfiguration$, LifecycleExpiration$, LifecycleRule$, LifecycleRuleAndOperator$, LifecycleRuleFilter$, ListBucketAnalyticsConfigurationsOutput$, ListBucketAnalyticsConfigurationsRequest$, ListBucketIntelligentTieringConfigurationsOutput$, ListBucketIntelligentTieringConfigurationsRequest$, ListBucketInventoryConfigurationsOutput$, ListBucketInventoryConfigurationsRequest$, ListBucketMetricsConfigurationsOutput$, ListBucketMetricsConfigurationsRequest$, ListBucketsOutput$, ListBucketsRequest$, ListDirectoryBucketsOutput$, ListDirectoryBucketsRequest$, ListMultipartUploadsOutput$, ListMultipartUploadsRequest$, ListObjectsOutput$, ListObjectsRequest$, ListObjectsV2Output$, ListObjectsV2Request$, ListObjectVersionsOutput$, ListObjectVersionsRequest$, ListPartsOutput$, ListPartsRequest$, LocationInfo$, LoggingEnabled$, MetadataConfiguration$, MetadataConfigurationResult$, MetadataEntry$, MetadataTableConfiguration$, MetadataTableConfigurationResult$, MetadataTableEncryptionConfiguration$, Metrics$, MetricsAndOperator$, MetricsConfiguration$, MultipartUpload$, NoncurrentVersionExpiration$, NoncurrentVersionTransition$, NotificationConfiguration$, NotificationConfigurationFilter$, _Object$, ObjectIdentifier$, ObjectLockConfiguration$, ObjectLockLegalHold$, ObjectLockRetention$, ObjectLockRule$, ObjectPart$, ObjectVersion$, OutputLocation$, OutputSerialization$, Owner$, OwnershipControls$, OwnershipControlsRule$, ParquetInput$, Part$, PartitionedPrefix$, PolicyStatus$, Progress$, ProgressEvent$, PublicAccessBlockConfiguration$, PutBucketAbacRequest$, PutBucketAccelerateConfigurationRequest$, PutBucketAclRequest$, PutBucketAnalyticsConfigurationRequest$, PutBucketCorsRequest$, PutBucketEncryptionRequest$, PutBucketIntelligentTieringConfigurationRequest$, PutBucketInventoryConfigurationRequest$, PutBucketLifecycleConfigurationOutput$, PutBucketLifecycleConfigurationRequest$, PutBucketLoggingRequest$, PutBucketMetricsConfigurationRequest$, PutBucketNotificationConfigurationRequest$, PutBucketOwnershipControlsRequest$, PutBucketPolicyRequest$, PutBucketReplicationRequest$, PutBucketRequestPaymentRequest$, PutBucketTaggingRequest$, PutBucketVersioningRequest$, PutBucketWebsiteRequest$, PutObjectAclOutput$, PutObjectAclRequest$, PutObjectLegalHoldOutput$, PutObjectLegalHoldRequest$, PutObjectLockConfigurationOutput$, PutObjectLockConfigurationRequest$, PutObjectOutput$, PutObjectRequest$, PutObjectRetentionOutput$, PutObjectRetentionRequest$, PutObjectTaggingOutput$, PutObjectTaggingRequest$, PutPublicAccessBlockRequest$, QueueConfiguration$, RecordExpiration$, RecordsEvent$, Redirect$, RedirectAllRequestsTo$, RenameObjectOutput$, RenameObjectRequest$, ReplicaModifications$, ReplicationConfiguration$, ReplicationRule$, ReplicationRuleAndOperator$, ReplicationRuleFilter$, ReplicationTime$, ReplicationTimeValue$, RequestPaymentConfiguration$, RequestProgress$, RestoreObjectOutput$, RestoreObjectRequest$, RestoreRequest$, RestoreStatus$, RoutingRule$, S3KeyFilter$, S3Location$, S3TablesDestination$, S3TablesDestinationResult$, ScanRange$, SelectObjectContentOutput$, SelectObjectContentRequest$, SelectParameters$, ServerSideEncryptionByDefault$, ServerSideEncryptionConfiguration$, ServerSideEncryptionRule$, SessionCredentials$, SimplePrefix$, SourceSelectionCriteria$, SSEKMS$, SseKmsEncryptedObjects$, SSEKMSEncryption$, SSES3$, Stats$, StatsEvent$, StorageClassAnalysis$, StorageClassAnalysisDataExport$, Tag$, Tagging$, TargetGrant$, TargetObjectKeyFormat$, Tiering$, TopicConfiguration$, Transition$, UpdateBucketMetadataInventoryTableConfigurationRequest$, UpdateBucketMetadataJournalTableConfigurationRequest$, UpdateObjectEncryptionRequest$, UpdateObjectEncryptionResponse$, UploadPartCopyOutput$, UploadPartCopyRequest$, UploadPartOutput$, UploadPartRequest$, VersioningConfiguration$, WebsiteConfiguration$, WriteGetObjectResponseRequest$, __Unit, AllowedHeaders, AllowedMethods, AllowedOrigins, AnalyticsConfigurationList, Buckets, ChecksumAlgorithmList, CommonPrefixList, CompletedPartList, CORSRules, DeletedObjects, DeleteMarkers, EncryptionTypeList, Errors, EventList, ExposeHeaders, FilterRuleList, Grants, IntelligentTieringConfigurationList, InventoryConfigurationList, InventoryOptionalFields, LambdaFunctionConfigurationList, LifecycleRules, MetricsConfigurationList, MultipartUploadList, NoncurrentVersionTransitionList, ObjectAttributesList, ObjectIdentifierList, ObjectList, ObjectVersionList, OptionalObjectAttributesList, OwnershipControlsRules, Parts, PartsList, QueueConfigurationList, ReplicationRules, RoutingRules, ServerSideEncryptionRules, TagSet, TargetGrants, TieringList, TopicConfigurationList, TransitionList, UserMetadata, Metadata, AnalyticsFilter$, MetricsFilter$, ObjectEncryption$, SelectObjectContentEventStream$, AbortMultipartUpload$, CompleteMultipartUpload$, CopyObject$, CreateBucket$, CreateBucketMetadataConfiguration$, CreateBucketMetadataTableConfiguration$, CreateMultipartUpload$, CreateSession$, DeleteBucket$, DeleteBucketAnalyticsConfiguration$, DeleteBucketCors$, DeleteBucketEncryption$, DeleteBucketIntelligentTieringConfiguration$, DeleteBucketInventoryConfiguration$, DeleteBucketLifecycle$, DeleteBucketMetadataConfiguration$, DeleteBucketMetadataTableConfiguration$, DeleteBucketMetricsConfiguration$, DeleteBucketOwnershipControls$, DeleteBucketPolicy$, DeleteBucketReplication$, DeleteBucketTagging$, DeleteBucketWebsite$, DeleteObject$, DeleteObjects$, DeleteObjectTagging$, DeletePublicAccessBlock$, GetBucketAbac$, GetBucketAccelerateConfiguration$, GetBucketAcl$, GetBucketAnalyticsConfiguration$, GetBucketCors$, GetBucketEncryption$, GetBucketIntelligentTieringConfiguration$, GetBucketInventoryConfiguration$, GetBucketLifecycleConfiguration$, GetBucketLocation$, GetBucketLogging$, GetBucketMetadataConfiguration$, GetBucketMetadataTableConfiguration$, GetBucketMetricsConfiguration$, GetBucketNotificationConfiguration$, GetBucketOwnershipControls$, GetBucketPolicy$, GetBucketPolicyStatus$, GetBucketReplication$, GetBucketRequestPayment$, GetBucketTagging$, GetBucketVersioning$, GetBucketWebsite$, GetObject$, GetObjectAcl$, GetObjectAttributes$, GetObjectLegalHold$, GetObjectLockConfiguration$, GetObjectRetention$, GetObjectTagging$, GetObjectTorrent$, GetPublicAccessBlock$, HeadBucket$, HeadObject$, ListBucketAnalyticsConfigurations$, ListBucketIntelligentTieringConfigurations$, ListBucketInventoryConfigurations$, ListBucketMetricsConfigurations$, ListBuckets$, ListDirectoryBuckets$, ListMultipartUploads$, ListObjects$, ListObjectsV2$, ListObjectVersions$, ListParts$, PutBucketAbac$, PutBucketAccelerateConfiguration$, PutBucketAcl$, PutBucketAnalyticsConfiguration$, PutBucketCors$, PutBucketEncryption$, PutBucketIntelligentTieringConfiguration$, PutBucketInventoryConfiguration$, PutBucketLifecycleConfiguration$, PutBucketLogging$, PutBucketMetricsConfiguration$, PutBucketNotificationConfiguration$, PutBucketOwnershipControls$, PutBucketPolicy$, PutBucketReplication$, PutBucketRequestPayment$, PutBucketTagging$, PutBucketVersioning$, PutBucketWebsite$, PutObject$, PutObjectAcl$, PutObjectLegalHold$, PutObjectLockConfiguration$, PutObjectRetention$, PutObjectTagging$, PutPublicAccessBlock$, RenameObject$, RestoreObject$, SelectObjectContent$, UpdateBucketMetadataInventoryTableConfiguration$, UpdateBucketMetadataJournalTableConfiguration$, UpdateObjectEncryption$, UploadPart$, UploadPartCopy$, WriteGetObjectResponse$; +var init_schemas_0 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_errors3(); + init_S3ServiceException(); + _A = "Account"; + _AAO = "AnalyticsAndOperator"; + _AC = "AccelerateConfiguration"; + _ACL = "AccessControlList"; + _ACL_ = "ACL"; + _ACLn = "AnalyticsConfigurationList"; + _ACP = "AccessControlPolicy"; + _ACT = "AccessControlTranslation"; + _ACn = "AnalyticsConfiguration"; + _AD = "AccessDenied"; + _ADb = "AbortDate"; + _AED = "AnalyticsExportDestination"; + _AF = "AnalyticsFilter"; + _AH = "AllowedHeaders"; + _AHl = "AllowedHeader"; + _AI = "AccountId"; + _AIMU = "AbortIncompleteMultipartUpload"; + _AKI = "AccessKeyId"; + _AM = "AllowedMethods"; + _AMU = "AbortMultipartUpload"; + _AMUO = "AbortMultipartUploadOutput"; + _AMUR = "AbortMultipartUploadRequest"; + _AMl = "AllowedMethod"; + _AO = "AllowedOrigins"; + _AOl = "AllowedOrigin"; + _APA = "AccessPointAlias"; + _APAc = "AccessPointArn"; + _AQRD = "AllowQuotedRecordDelimiter"; + _AR = "AcceptRanges"; + _ARI = "AbortRuleId"; + _AS = "AbacStatus"; + _ASBD = "AnalyticsS3BucketDestination"; + _ASSEBD = "ApplyServerSideEncryptionByDefault"; + _ASr = "ArchiveStatus"; + _AT = "AccessTier"; + _An = "And"; + _B = "Bucket"; + _BA = "BucketArn"; + _BAE = "BucketAlreadyExists"; + _BAI = "BucketAccountId"; + _BAOBY = "BucketAlreadyOwnedByYou"; + _BET = "BlockedEncryptionTypes"; + _BGR = "BypassGovernanceRetention"; + _BI = "BucketInfo"; + _BKE = "BucketKeyEnabled"; + _BLC = "BucketLifecycleConfiguration"; + _BLN = "BucketLocationName"; + _BLS = "BucketLoggingStatus"; + _BLT = "BucketLocationType"; + _BN = "BucketNamespace"; + _BNu = "BucketName"; + _BP = "BytesProcessed"; + _BPA = "BlockPublicAcls"; + _BPP = "BlockPublicPolicy"; + _BR = "BucketRegion"; + _BRy = "BytesReturned"; + _BS = "BytesScanned"; + _Bo = "Body"; + _Bu = "Buckets"; + _C = "Checksum"; + _CA = "ChecksumAlgorithm"; + _CACL = "CannedACL"; + _CB = "CreateBucket"; + _CBC = "CreateBucketConfiguration"; + _CBMC = "CreateBucketMetadataConfiguration"; + _CBMCR = "CreateBucketMetadataConfigurationRequest"; + _CBMTC = "CreateBucketMetadataTableConfiguration"; + _CBMTCR = "CreateBucketMetadataTableConfigurationRequest"; + _CBO = "CreateBucketOutput"; + _CBR = "CreateBucketRequest"; + _CC = "CacheControl"; + _CCRC = "ChecksumCRC32"; + _CCRCC = "ChecksumCRC32C"; + _CCRCNVME = "ChecksumCRC64NVME"; + _CC_ = "Cache-Control"; + _CD = "CreationDate"; + _CD_ = "Content-Disposition"; + _CDo = "ContentDisposition"; + _CE = "ContinuationEvent"; + _CE_ = "Content-Encoding"; + _CEo = "ContentEncoding"; + _CF = "CloudFunction"; + _CFC = "CloudFunctionConfiguration"; + _CL = "ContentLanguage"; + _CL_ = "Content-Language"; + _CL__ = "Content-Length"; + _CLo = "ContentLength"; + _CM = "Content-MD5"; + _CMD = "ContentMD5"; + _CMU = "CompletedMultipartUpload"; + _CMUO = "CompleteMultipartUploadOutput"; + _CMUOr = "CreateMultipartUploadOutput"; + _CMUR = "CompleteMultipartUploadResult"; + _CMURo = "CompleteMultipartUploadRequest"; + _CMURr = "CreateMultipartUploadRequest"; + _CMUo = "CompleteMultipartUpload"; + _CMUr = "CreateMultipartUpload"; + _CMh = "ChecksumMode"; + _CO = "CopyObject"; + _COO = "CopyObjectOutput"; + _COR = "CopyObjectResult"; + _CORSC = "CORSConfiguration"; + _CORSR = "CORSRules"; + _CORSRu = "CORSRule"; + _CORo = "CopyObjectRequest"; + _CP = "CommonPrefix"; + _CPL = "CommonPrefixList"; + _CPLo = "CompletedPartList"; + _CPR = "CopyPartResult"; + _CPo = "CompletedPart"; + _CPom = "CommonPrefixes"; + _CR = "ContentRange"; + _CRSBA = "ConfirmRemoveSelfBucketAccess"; + _CR_ = "Content-Range"; + _CS = "CopySource"; + _CSHA = "ChecksumSHA1"; + _CSHAh = "ChecksumSHA256"; + _CSIM = "CopySourceIfMatch"; + _CSIMS = "CopySourceIfModifiedSince"; + _CSINM = "CopySourceIfNoneMatch"; + _CSIUS = "CopySourceIfUnmodifiedSince"; + _CSO = "CreateSessionOutput"; + _CSR = "CreateSessionResult"; + _CSRo = "CopySourceRange"; + _CSRr = "CreateSessionRequest"; + _CSSSECA = "CopySourceSSECustomerAlgorithm"; + _CSSSECK = "CopySourceSSECustomerKey"; + _CSSSECKMD = "CopySourceSSECustomerKeyMD5"; + _CSV = "CSV"; + _CSVI = "CopySourceVersionId"; + _CSVIn = "CSVInput"; + _CSVO = "CSVOutput"; + _CSo = "ConfigurationState"; + _CSr = "CreateSession"; + _CT = "ChecksumType"; + _CT_ = "Content-Type"; + _CTl = "ClientToken"; + _CTo = "ContentType"; + _CTom = "CompressionType"; + _CTon = "ContinuationToken"; + _Co = "Condition"; + _Cod = "Code"; + _Com = "Comments"; + _Con = "Contents"; + _Cont = "Cont"; + _Cr = "Credentials"; + _D = "Days"; + _DAI = "DaysAfterInitiation"; + _DB = "DeleteBucket"; + _DBAC = "DeleteBucketAnalyticsConfiguration"; + _DBACR = "DeleteBucketAnalyticsConfigurationRequest"; + _DBC = "DeleteBucketCors"; + _DBCR = "DeleteBucketCorsRequest"; + _DBE = "DeleteBucketEncryption"; + _DBER = "DeleteBucketEncryptionRequest"; + _DBIC = "DeleteBucketInventoryConfiguration"; + _DBICR = "DeleteBucketInventoryConfigurationRequest"; + _DBITC = "DeleteBucketIntelligentTieringConfiguration"; + _DBITCR = "DeleteBucketIntelligentTieringConfigurationRequest"; + _DBL = "DeleteBucketLifecycle"; + _DBLR = "DeleteBucketLifecycleRequest"; + _DBMC = "DeleteBucketMetadataConfiguration"; + _DBMCR = "DeleteBucketMetadataConfigurationRequest"; + _DBMCRe = "DeleteBucketMetricsConfigurationRequest"; + _DBMCe = "DeleteBucketMetricsConfiguration"; + _DBMTC = "DeleteBucketMetadataTableConfiguration"; + _DBMTCR = "DeleteBucketMetadataTableConfigurationRequest"; + _DBOC = "DeleteBucketOwnershipControls"; + _DBOCR = "DeleteBucketOwnershipControlsRequest"; + _DBP = "DeleteBucketPolicy"; + _DBPR = "DeleteBucketPolicyRequest"; + _DBR = "DeleteBucketRequest"; + _DBRR = "DeleteBucketReplicationRequest"; + _DBRe = "DeleteBucketReplication"; + _DBT = "DeleteBucketTagging"; + _DBTR = "DeleteBucketTaggingRequest"; + _DBW = "DeleteBucketWebsite"; + _DBWR = "DeleteBucketWebsiteRequest"; + _DE = "DataExport"; + _DIM = "DestinationIfMatch"; + _DIMS = "DestinationIfModifiedSince"; + _DINM = "DestinationIfNoneMatch"; + _DIUS = "DestinationIfUnmodifiedSince"; + _DM = "DeleteMarker"; + _DME = "DeleteMarkerEntry"; + _DMR = "DeleteMarkerReplication"; + _DMVI = "DeleteMarkerVersionId"; + _DMe = "DeleteMarkers"; + _DN = "DisplayName"; + _DO = "DeletedObject"; + _DOO = "DeleteObjectOutput"; + _DOOe = "DeleteObjectsOutput"; + _DOR = "DeleteObjectRequest"; + _DORe = "DeleteObjectsRequest"; + _DOT = "DeleteObjectTagging"; + _DOTO = "DeleteObjectTaggingOutput"; + _DOTR = "DeleteObjectTaggingRequest"; + _DOe = "DeletedObjects"; + _DOel = "DeleteObject"; + _DOele = "DeleteObjects"; + _DPAB = "DeletePublicAccessBlock"; + _DPABR = "DeletePublicAccessBlockRequest"; + _DR = "DataRedundancy"; + _DRe = "DefaultRetention"; + _DRel = "DeleteResult"; + _DRes = "DestinationResult"; + _Da = "Date"; + _De = "Delete"; + _Del = "Deleted"; + _Deli = "Delimiter"; + _Des = "Destination"; + _Desc = "Description"; + _Det = "Details"; + _E = "Expiration"; + _EA = "EmailAddress"; + _EBC = "EventBridgeConfiguration"; + _EBO = "ExpectedBucketOwner"; + _EC = "EncryptionConfiguration"; + _ECr = "ErrorCode"; + _ED = "ErrorDetails"; + _EDr = "ErrorDocument"; + _EE = "EndEvent"; + _EH = "ExposeHeaders"; + _EHx = "ExposeHeader"; + _EM = "ErrorMessage"; + _EODM = "ExpiredObjectDeleteMarker"; + _EOR = "ExistingObjectReplication"; + _ES = "ExpiresString"; + _ESBO = "ExpectedSourceBucketOwner"; + _ET = "EncryptionType"; + _ETL = "EncryptionTypeList"; + _ETM = "EncryptionTypeMismatch"; + _ETa = "ETag"; + _ETn = "EncodingType"; + _ETv = "EventThreshold"; + _ETx = "ExpressionType"; + _En = "Encryption"; + _Ena = "Enabled"; + _End = "End"; + _Er = "Errors"; + _Err = "Error"; + _Ev = "Events"; + _Eve = "Event"; + _Ex = "Expires"; + _Exp = "Expression"; + _F = "Filter"; + _FD = "FieldDelimiter"; + _FHI = "FileHeaderInfo"; + _FO = "FetchOwner"; + _FR = "FilterRule"; + _FRL = "FilterRuleList"; + _FRi = "FilterRules"; + _Fi = "Field"; + _Fo = "Format"; + _Fr = "Frequency"; + _G = "Grants"; + _GBA = "GetBucketAbac"; + _GBAC = "GetBucketAccelerateConfiguration"; + _GBACO = "GetBucketAccelerateConfigurationOutput"; + _GBACOe = "GetBucketAnalyticsConfigurationOutput"; + _GBACR = "GetBucketAccelerateConfigurationRequest"; + _GBACRe = "GetBucketAnalyticsConfigurationRequest"; + _GBACe = "GetBucketAnalyticsConfiguration"; + _GBAO = "GetBucketAbacOutput"; + _GBAOe = "GetBucketAclOutput"; + _GBAR = "GetBucketAbacRequest"; + _GBARe = "GetBucketAclRequest"; + _GBAe = "GetBucketAcl"; + _GBC = "GetBucketCors"; + _GBCO = "GetBucketCorsOutput"; + _GBCR = "GetBucketCorsRequest"; + _GBE = "GetBucketEncryption"; + _GBEO = "GetBucketEncryptionOutput"; + _GBER = "GetBucketEncryptionRequest"; + _GBIC = "GetBucketInventoryConfiguration"; + _GBICO = "GetBucketInventoryConfigurationOutput"; + _GBICR = "GetBucketInventoryConfigurationRequest"; + _GBITC = "GetBucketIntelligentTieringConfiguration"; + _GBITCO = "GetBucketIntelligentTieringConfigurationOutput"; + _GBITCR = "GetBucketIntelligentTieringConfigurationRequest"; + _GBL = "GetBucketLocation"; + _GBLC = "GetBucketLifecycleConfiguration"; + _GBLCO = "GetBucketLifecycleConfigurationOutput"; + _GBLCR = "GetBucketLifecycleConfigurationRequest"; + _GBLO = "GetBucketLocationOutput"; + _GBLOe = "GetBucketLoggingOutput"; + _GBLR = "GetBucketLocationRequest"; + _GBLRe = "GetBucketLoggingRequest"; + _GBLe = "GetBucketLogging"; + _GBMC = "GetBucketMetadataConfiguration"; + _GBMCO = "GetBucketMetadataConfigurationOutput"; + _GBMCOe = "GetBucketMetricsConfigurationOutput"; + _GBMCR = "GetBucketMetadataConfigurationResult"; + _GBMCRe = "GetBucketMetadataConfigurationRequest"; + _GBMCRet = "GetBucketMetricsConfigurationRequest"; + _GBMCe = "GetBucketMetricsConfiguration"; + _GBMTC = "GetBucketMetadataTableConfiguration"; + _GBMTCO = "GetBucketMetadataTableConfigurationOutput"; + _GBMTCR = "GetBucketMetadataTableConfigurationResult"; + _GBMTCRe = "GetBucketMetadataTableConfigurationRequest"; + _GBNC = "GetBucketNotificationConfiguration"; + _GBNCR = "GetBucketNotificationConfigurationRequest"; + _GBOC = "GetBucketOwnershipControls"; + _GBOCO = "GetBucketOwnershipControlsOutput"; + _GBOCR = "GetBucketOwnershipControlsRequest"; + _GBP = "GetBucketPolicy"; + _GBPO = "GetBucketPolicyOutput"; + _GBPR = "GetBucketPolicyRequest"; + _GBPS = "GetBucketPolicyStatus"; + _GBPSO = "GetBucketPolicyStatusOutput"; + _GBPSR = "GetBucketPolicyStatusRequest"; + _GBR = "GetBucketReplication"; + _GBRO = "GetBucketReplicationOutput"; + _GBRP = "GetBucketRequestPayment"; + _GBRPO = "GetBucketRequestPaymentOutput"; + _GBRPR = "GetBucketRequestPaymentRequest"; + _GBRR = "GetBucketReplicationRequest"; + _GBT = "GetBucketTagging"; + _GBTO = "GetBucketTaggingOutput"; + _GBTR = "GetBucketTaggingRequest"; + _GBV = "GetBucketVersioning"; + _GBVO = "GetBucketVersioningOutput"; + _GBVR = "GetBucketVersioningRequest"; + _GBW = "GetBucketWebsite"; + _GBWO = "GetBucketWebsiteOutput"; + _GBWR = "GetBucketWebsiteRequest"; + _GFC = "GrantFullControl"; + _GJP = "GlacierJobParameters"; + _GO = "GetObject"; + _GOA = "GetObjectAcl"; + _GOAO = "GetObjectAclOutput"; + _GOAOe = "GetObjectAttributesOutput"; + _GOAP = "GetObjectAttributesParts"; + _GOAR = "GetObjectAclRequest"; + _GOARe = "GetObjectAttributesResponse"; + _GOARet = "GetObjectAttributesRequest"; + _GOAe = "GetObjectAttributes"; + _GOLC = "GetObjectLockConfiguration"; + _GOLCO = "GetObjectLockConfigurationOutput"; + _GOLCR = "GetObjectLockConfigurationRequest"; + _GOLH = "GetObjectLegalHold"; + _GOLHO = "GetObjectLegalHoldOutput"; + _GOLHR = "GetObjectLegalHoldRequest"; + _GOO = "GetObjectOutput"; + _GOR = "GetObjectRequest"; + _GORO = "GetObjectRetentionOutput"; + _GORR = "GetObjectRetentionRequest"; + _GORe = "GetObjectRetention"; + _GOT = "GetObjectTagging"; + _GOTO = "GetObjectTaggingOutput"; + _GOTOe = "GetObjectTorrentOutput"; + _GOTR = "GetObjectTaggingRequest"; + _GOTRe = "GetObjectTorrentRequest"; + _GOTe = "GetObjectTorrent"; + _GPAB = "GetPublicAccessBlock"; + _GPABO = "GetPublicAccessBlockOutput"; + _GPABR = "GetPublicAccessBlockRequest"; + _GR = "GrantRead"; + _GRACP = "GrantReadACP"; + _GW = "GrantWrite"; + _GWACP = "GrantWriteACP"; + _Gr = "Grant"; + _Gra = "Grantee"; + _HB = "HeadBucket"; + _HBO = "HeadBucketOutput"; + _HBR = "HeadBucketRequest"; + _HECRE = "HttpErrorCodeReturnedEquals"; + _HN = "HostName"; + _HO = "HeadObject"; + _HOO = "HeadObjectOutput"; + _HOR = "HeadObjectRequest"; + _HRC = "HttpRedirectCode"; + _I = "Id"; + _IC = "InventoryConfiguration"; + _ICL = "InventoryConfigurationList"; + _ID = "ID"; + _IDn = "IndexDocument"; + _IDnv = "InventoryDestination"; + _IE = "IsEnabled"; + _IEn = "InventoryEncryption"; + _IF = "InventoryFilter"; + _IL = "IsLatest"; + _IM = "IfMatch"; + _IMIT = "IfMatchInitiatedTime"; + _IMLMT = "IfMatchLastModifiedTime"; + _IMS = "IfMatchSize"; + _IMS_ = "If-Modified-Since"; + _IMSf = "IfModifiedSince"; + _IMUR = "InitiateMultipartUploadResult"; + _IM_ = "If-Match"; + _INM = "IfNoneMatch"; + _INM_ = "If-None-Match"; + _IOF = "InventoryOptionalFields"; + _IOS = "InvalidObjectState"; + _IOV = "IncludedObjectVersions"; + _IP = "IsPublic"; + _IPA = "IgnorePublicAcls"; + _IPM = "IdempotencyParameterMismatch"; + _IR = "InvalidRequest"; + _IRIP = "IsRestoreInProgress"; + _IS = "InputSerialization"; + _ISBD = "InventoryS3BucketDestination"; + _ISn = "InventorySchedule"; + _IT = "IsTruncated"; + _ITAO = "IntelligentTieringAndOperator"; + _ITC = "IntelligentTieringConfiguration"; + _ITCL = "IntelligentTieringConfigurationList"; + _ITCR = "InventoryTableConfigurationResult"; + _ITCU = "InventoryTableConfigurationUpdates"; + _ITCn = "InventoryTableConfiguration"; + _ITF = "IntelligentTieringFilter"; + _IUS = "IfUnmodifiedSince"; + _IUS_ = "If-Unmodified-Since"; + _IWO = "InvalidWriteOffset"; + _In = "Initiator"; + _Ini = "Initiated"; + _JSON = "JSON"; + _JSONI = "JSONInput"; + _JSONO = "JSONOutput"; + _JTC = "JournalTableConfiguration"; + _JTCR = "JournalTableConfigurationResult"; + _JTCU = "JournalTableConfigurationUpdates"; + _K = "Key"; + _KC = "KeyCount"; + _KI = "KeyId"; + _KKA = "KmsKeyArn"; + _KM = "KeyMarker"; + _KMSC = "KMSContext"; + _KMSKA = "KMSKeyArn"; + _KMSKI = "KMSKeyId"; + _KMSMKID = "KMSMasterKeyID"; + _KPE = "KeyPrefixEquals"; + _L = "Location"; + _LAMBR = "ListAllMyBucketsResult"; + _LAMDBR = "ListAllMyDirectoryBucketsResult"; + _LB = "ListBuckets"; + _LBAC = "ListBucketAnalyticsConfigurations"; + _LBACO = "ListBucketAnalyticsConfigurationsOutput"; + _LBACR = "ListBucketAnalyticsConfigurationResult"; + _LBACRi = "ListBucketAnalyticsConfigurationsRequest"; + _LBIC = "ListBucketInventoryConfigurations"; + _LBICO = "ListBucketInventoryConfigurationsOutput"; + _LBICR = "ListBucketInventoryConfigurationsRequest"; + _LBITC = "ListBucketIntelligentTieringConfigurations"; + _LBITCO = "ListBucketIntelligentTieringConfigurationsOutput"; + _LBITCR = "ListBucketIntelligentTieringConfigurationsRequest"; + _LBMC = "ListBucketMetricsConfigurations"; + _LBMCO = "ListBucketMetricsConfigurationsOutput"; + _LBMCR = "ListBucketMetricsConfigurationsRequest"; + _LBO = "ListBucketsOutput"; + _LBR = "ListBucketsRequest"; + _LBRi = "ListBucketResult"; + _LC = "LocationConstraint"; + _LCi = "LifecycleConfiguration"; + _LDB = "ListDirectoryBuckets"; + _LDBO = "ListDirectoryBucketsOutput"; + _LDBR = "ListDirectoryBucketsRequest"; + _LE = "LoggingEnabled"; + _LEi = "LifecycleExpiration"; + _LFA = "LambdaFunctionArn"; + _LFC = "LambdaFunctionConfiguration"; + _LFCL = "LambdaFunctionConfigurationList"; + _LFCa = "LambdaFunctionConfigurations"; + _LH = "LegalHold"; + _LI = "LocationInfo"; + _LICR = "ListInventoryConfigurationsResult"; + _LM = "LastModified"; + _LMCR = "ListMetricsConfigurationsResult"; + _LMT = "LastModifiedTime"; + _LMU = "ListMultipartUploads"; + _LMUO = "ListMultipartUploadsOutput"; + _LMUR = "ListMultipartUploadsResult"; + _LMURi = "ListMultipartUploadsRequest"; + _LM_ = "Last-Modified"; + _LO = "ListObjects"; + _LOO = "ListObjectsOutput"; + _LOR = "ListObjectsRequest"; + _LOV = "ListObjectsV2"; + _LOVO = "ListObjectsV2Output"; + _LOVOi = "ListObjectVersionsOutput"; + _LOVR = "ListObjectsV2Request"; + _LOVRi = "ListObjectVersionsRequest"; + _LOVi = "ListObjectVersions"; + _LP = "ListParts"; + _LPO = "ListPartsOutput"; + _LPR = "ListPartsResult"; + _LPRi = "ListPartsRequest"; + _LR = "LifecycleRule"; + _LRAO = "LifecycleRuleAndOperator"; + _LRF = "LifecycleRuleFilter"; + _LRi = "LifecycleRules"; + _LVR = "ListVersionsResult"; + _M = "Metadata"; + _MAO = "MetricsAndOperator"; + _MAS = "MaxAgeSeconds"; + _MB = "MaxBuckets"; + _MC = "MetadataConfiguration"; + _MCL = "MetricsConfigurationList"; + _MCR = "MetadataConfigurationResult"; + _MCe = "MetricsConfiguration"; + _MD = "MetadataDirective"; + _MDB = "MaxDirectoryBuckets"; + _MDf = "MfaDelete"; + _ME = "MetadataEntry"; + _MF = "MetricsFilter"; + _MFA = "MFA"; + _MFAD = "MFADelete"; + _MK = "MaxKeys"; + _MM = "MissingMeta"; + _MOS = "MpuObjectSize"; + _MP = "MaxParts"; + _MTC = "MetadataTableConfiguration"; + _MTCR = "MetadataTableConfigurationResult"; + _MTEC = "MetadataTableEncryptionConfiguration"; + _MU = "MultipartUpload"; + _MUL = "MultipartUploadList"; + _MUa = "MaxUploads"; + _Ma = "Marker"; + _Me = "Metrics"; + _Mes = "Message"; + _Mi = "Minutes"; + _Mo = "Mode"; + _N = "Name"; + _NC = "NotificationConfiguration"; + _NCF = "NotificationConfigurationFilter"; + _NCT = "NextContinuationToken"; + _ND = "NoncurrentDays"; + _NEKKAS = "NonEmptyKmsKeyArnString"; + _NF = "NotFound"; + _NKM = "NextKeyMarker"; + _NM = "NextMarker"; + _NNV = "NewerNoncurrentVersions"; + _NPNM = "NextPartNumberMarker"; + _NSB = "NoSuchBucket"; + _NSK = "NoSuchKey"; + _NSU = "NoSuchUpload"; + _NUIM = "NextUploadIdMarker"; + _NVE = "NoncurrentVersionExpiration"; + _NVIM = "NextVersionIdMarker"; + _NVT = "NoncurrentVersionTransitions"; + _NVTL = "NoncurrentVersionTransitionList"; + _NVTo = "NoncurrentVersionTransition"; + _O = "Owner"; + _OA = "ObjectAttributes"; + _OAIATE = "ObjectAlreadyInActiveTierError"; + _OC = "OwnershipControls"; + _OCR = "OwnershipControlsRule"; + _OCRw = "OwnershipControlsRules"; + _OE = "ObjectEncryption"; + _OF = "OptionalFields"; + _OI = "ObjectIdentifier"; + _OIL = "ObjectIdentifierList"; + _OL = "OutputLocation"; + _OLC = "ObjectLockConfiguration"; + _OLE = "ObjectLockEnabled"; + _OLEFB = "ObjectLockEnabledForBucket"; + _OLLH = "ObjectLockLegalHold"; + _OLLHS = "ObjectLockLegalHoldStatus"; + _OLM = "ObjectLockMode"; + _OLR = "ObjectLockRetention"; + _OLRUD = "ObjectLockRetainUntilDate"; + _OLRb = "ObjectLockRule"; + _OLb = "ObjectList"; + _ONIATE = "ObjectNotInActiveTierError"; + _OO = "ObjectOwnership"; + _OOA = "OptionalObjectAttributes"; + _OP = "ObjectParts"; + _OPb = "ObjectPart"; + _OS = "ObjectSize"; + _OSGT = "ObjectSizeGreaterThan"; + _OSLT = "ObjectSizeLessThan"; + _OSV = "OutputSchemaVersion"; + _OSu = "OutputSerialization"; + _OV = "ObjectVersion"; + _OVL = "ObjectVersionList"; + _Ob = "Objects"; + _Obj = "Object"; + _P = "Prefix"; + _PABC = "PublicAccessBlockConfiguration"; + _PBA = "PutBucketAbac"; + _PBAC = "PutBucketAccelerateConfiguration"; + _PBACR = "PutBucketAccelerateConfigurationRequest"; + _PBACRu = "PutBucketAnalyticsConfigurationRequest"; + _PBACu = "PutBucketAnalyticsConfiguration"; + _PBAR = "PutBucketAbacRequest"; + _PBARu = "PutBucketAclRequest"; + _PBAu = "PutBucketAcl"; + _PBC = "PutBucketCors"; + _PBCR = "PutBucketCorsRequest"; + _PBE = "PutBucketEncryption"; + _PBER = "PutBucketEncryptionRequest"; + _PBIC = "PutBucketInventoryConfiguration"; + _PBICR = "PutBucketInventoryConfigurationRequest"; + _PBITC = "PutBucketIntelligentTieringConfiguration"; + _PBITCR = "PutBucketIntelligentTieringConfigurationRequest"; + _PBL = "PutBucketLogging"; + _PBLC = "PutBucketLifecycleConfiguration"; + _PBLCO = "PutBucketLifecycleConfigurationOutput"; + _PBLCR = "PutBucketLifecycleConfigurationRequest"; + _PBLR = "PutBucketLoggingRequest"; + _PBMC = "PutBucketMetricsConfiguration"; + _PBMCR = "PutBucketMetricsConfigurationRequest"; + _PBNC = "PutBucketNotificationConfiguration"; + _PBNCR = "PutBucketNotificationConfigurationRequest"; + _PBOC = "PutBucketOwnershipControls"; + _PBOCR = "PutBucketOwnershipControlsRequest"; + _PBP = "PutBucketPolicy"; + _PBPR = "PutBucketPolicyRequest"; + _PBR = "PutBucketReplication"; + _PBRP = "PutBucketRequestPayment"; + _PBRPR = "PutBucketRequestPaymentRequest"; + _PBRR = "PutBucketReplicationRequest"; + _PBT = "PutBucketTagging"; + _PBTR = "PutBucketTaggingRequest"; + _PBV = "PutBucketVersioning"; + _PBVR = "PutBucketVersioningRequest"; + _PBW = "PutBucketWebsite"; + _PBWR = "PutBucketWebsiteRequest"; + _PC = "PartsCount"; + _PDS = "PartitionDateSource"; + _PE = "ProgressEvent"; + _PI = "ParquetInput"; + _PL = "PartsList"; + _PN = "PartNumber"; + _PNM = "PartNumberMarker"; + _PO = "PutObject"; + _POA = "PutObjectAcl"; + _POAO = "PutObjectAclOutput"; + _POAR = "PutObjectAclRequest"; + _POLC = "PutObjectLockConfiguration"; + _POLCO = "PutObjectLockConfigurationOutput"; + _POLCR = "PutObjectLockConfigurationRequest"; + _POLH = "PutObjectLegalHold"; + _POLHO = "PutObjectLegalHoldOutput"; + _POLHR = "PutObjectLegalHoldRequest"; + _POO = "PutObjectOutput"; + _POR = "PutObjectRequest"; + _PORO = "PutObjectRetentionOutput"; + _PORR = "PutObjectRetentionRequest"; + _PORu = "PutObjectRetention"; + _POT = "PutObjectTagging"; + _POTO = "PutObjectTaggingOutput"; + _POTR = "PutObjectTaggingRequest"; + _PP = "PartitionedPrefix"; + _PPAB = "PutPublicAccessBlock"; + _PPABR = "PutPublicAccessBlockRequest"; + _PS = "PolicyStatus"; + _Pa = "Parts"; + _Par = "Part"; + _Parq = "Parquet"; + _Pay = "Payer"; + _Payl = "Payload"; + _Pe = "Permission"; + _Po = "Policy"; + _Pr = "Progress"; + _Pri = "Priority"; + _Pro = "Protocol"; + _Q = "Quiet"; + _QA = "QueueArn"; + _QC = "QuoteCharacter"; + _QCL = "QueueConfigurationList"; + _QCu = "QueueConfigurations"; + _QCue = "QueueConfiguration"; + _QEC = "QuoteEscapeCharacter"; + _QF = "QuoteFields"; + _Qu = "Queue"; + _R = "Rules"; + _RART = "RedirectAllRequestsTo"; + _RC = "RequestCharged"; + _RCC = "ResponseCacheControl"; + _RCD = "ResponseContentDisposition"; + _RCE = "ResponseContentEncoding"; + _RCL = "ResponseContentLanguage"; + _RCT = "ResponseContentType"; + _RCe = "ReplicationConfiguration"; + _RD = "RecordDelimiter"; + _RE = "ResponseExpires"; + _RED = "RestoreExpiryDate"; + _REe = "RecordExpiration"; + _REec = "RecordsEvent"; + _RKKID = "ReplicaKmsKeyID"; + _RKPW = "ReplaceKeyPrefixWith"; + _RKW = "ReplaceKeyWith"; + _RM = "ReplicaModifications"; + _RO = "RenameObject"; + _ROO = "RenameObjectOutput"; + _ROOe = "RestoreObjectOutput"; + _ROP = "RestoreOutputPath"; + _ROR = "RenameObjectRequest"; + _RORe = "RestoreObjectRequest"; + _ROe = "RestoreObject"; + _RP = "RequestPayer"; + _RPB = "RestrictPublicBuckets"; + _RPC = "RequestPaymentConfiguration"; + _RPe = "RequestProgress"; + _RR = "RoutingRules"; + _RRAO = "ReplicationRuleAndOperator"; + _RRF = "ReplicationRuleFilter"; + _RRe = "ReplicationRule"; + _RRep = "ReplicationRules"; + _RReq = "RequestRoute"; + _RRes = "RestoreRequest"; + _RRo = "RoutingRule"; + _RS = "ReplicationStatus"; + _RSe = "RestoreStatus"; + _RSen = "RenameSource"; + _RT = "ReplicationTime"; + _RTV = "ReplicationTimeValue"; + _RTe = "RequestToken"; + _RUD = "RetainUntilDate"; + _Ra = "Range"; + _Re = "Restore"; + _Rec = "Records"; + _Red = "Redirect"; + _Ret = "Retention"; + _Ro = "Role"; + _Ru = "Rule"; + _S = "Status"; + _SA = "StartAfter"; + _SAK = "SecretAccessKey"; + _SAs = "SseAlgorithm"; + _SB = "StreamingBlob"; + _SBD = "S3BucketDestination"; + _SC = "StorageClass"; + _SCA = "StorageClassAnalysis"; + _SCADE = "StorageClassAnalysisDataExport"; + _SCV = "SessionCredentialValue"; + _SCe = "SessionCredentials"; + _SCt = "StatusCode"; + _SDV = "SkipDestinationValidation"; + _SE = "StatsEvent"; + _SIM = "SourceIfMatch"; + _SIMS = "SourceIfModifiedSince"; + _SINM = "SourceIfNoneMatch"; + _SIUS = "SourceIfUnmodifiedSince"; + _SK = "SSE-KMS"; + _SKEO = "SseKmsEncryptedObjects"; + _SKF = "S3KeyFilter"; + _SKe = "S3Key"; + _SL = "S3Location"; + _SM = "SessionMode"; + _SOC = "SelectObjectContent"; + _SOCES = "SelectObjectContentEventStream"; + _SOCO = "SelectObjectContentOutput"; + _SOCR = "SelectObjectContentRequest"; + _SP = "SelectParameters"; + _SPi = "SimplePrefix"; + _SR = "ScanRange"; + _SS = "SSE-S3"; + _SSC = "SourceSelectionCriteria"; + _SSE = "ServerSideEncryption"; + _SSEA = "SSEAlgorithm"; + _SSEBD = "ServerSideEncryptionByDefault"; + _SSEC = "ServerSideEncryptionConfiguration"; + _SSECA = "SSECustomerAlgorithm"; + _SSECK = "SSECustomerKey"; + _SSECKMD = "SSECustomerKeyMD5"; + _SSEKMS = "SSEKMS"; + _SSEKMSE = "SSEKMSEncryption"; + _SSEKMSEC = "SSEKMSEncryptionContext"; + _SSEKMSKI = "SSEKMSKeyId"; + _SSER = "ServerSideEncryptionRule"; + _SSERe = "ServerSideEncryptionRules"; + _SSES = "SSES3"; + _ST = "SessionToken"; + _STD = "S3TablesDestination"; + _STDR = "S3TablesDestinationResult"; + _S_ = "S3"; + _Sc = "Schedule"; + _Si = "Size"; + _St = "Start"; + _Sta = "Stats"; + _Su = "Suffix"; + _T = "Tags"; + _TA = "TableArn"; + _TAo = "TopicArn"; + _TB = "TargetBucket"; + _TBA = "TableBucketArn"; + _TBT = "TableBucketType"; + _TC = "TagCount"; + _TCL = "TopicConfigurationList"; + _TCo = "TopicConfigurations"; + _TCop = "TopicConfiguration"; + _TD = "TaggingDirective"; + _TDMOS = "TransitionDefaultMinimumObjectSize"; + _TG = "TargetGrants"; + _TGa = "TargetGrant"; + _TL = "TieringList"; + _TLr = "TransitionList"; + _TMP = "TooManyParts"; + _TN = "TableNamespace"; + _TNa = "TableName"; + _TOKF = "TargetObjectKeyFormat"; + _TP = "TargetPrefix"; + _TPC = "TotalPartsCount"; + _TS = "TagSet"; + _TSa = "TableStatus"; + _Ta = "Tag"; + _Tag = "Tagging"; + _Ti = "Tier"; + _Tie = "Tierings"; + _Tier = "Tiering"; + _Tim = "Time"; + _To = "Token"; + _Top = "Topic"; + _Tr = "Transitions"; + _Tra = "Transition"; + _Ty = "Type"; + _U = "Uploads"; + _UBMITC = "UpdateBucketMetadataInventoryTableConfiguration"; + _UBMITCR = "UpdateBucketMetadataInventoryTableConfigurationRequest"; + _UBMJTC = "UpdateBucketMetadataJournalTableConfiguration"; + _UBMJTCR = "UpdateBucketMetadataJournalTableConfigurationRequest"; + _UI = "UploadId"; + _UIM = "UploadIdMarker"; + _UM = "UserMetadata"; + _UOE = "UpdateObjectEncryption"; + _UOER = "UpdateObjectEncryptionRequest"; + _UOERp = "UpdateObjectEncryptionResponse"; + _UP = "UploadPart"; + _UPC = "UploadPartCopy"; + _UPCO = "UploadPartCopyOutput"; + _UPCR = "UploadPartCopyRequest"; + _UPO = "UploadPartOutput"; + _UPR = "UploadPartRequest"; + _URI = "URI"; + _Up = "Upload"; + _V = "Value"; + _VC = "VersioningConfiguration"; + _VI = "VersionId"; + _VIM = "VersionIdMarker"; + _Ve = "Versions"; + _Ver = "Version"; + _WC = "WebsiteConfiguration"; + _WGOR = "WriteGetObjectResponse"; + _WGORR = "WriteGetObjectResponseRequest"; + _WOB = "WriteOffsetBytes"; + _WRL = "WebsiteRedirectLocation"; + _Y = "Years"; + _ar = "accept-ranges"; + _br = "bucket-region"; + _c = "client"; + _ct = "continuation-token"; + _d = "delimiter"; + _e = "error"; + _eP = "eventPayload"; + _en = "endpoint"; + _et = "encoding-type"; + _fo = "fetch-owner"; + _h = "http"; + _hC = "httpChecksum"; + _hE = "httpError"; + _hH = "httpHeader"; + _hL = "hostLabel"; + _hP = "httpPayload"; + _hPH = "httpPrefixHeaders"; + _hQ = "httpQuery"; + _hi = "http://www.w3.org/2001/XMLSchema-instance"; + _i = "id"; + _iT = "idempotencyToken"; + _km = "key-marker"; + _m = "marker"; + _mb = "max-buckets"; + _mdb = "max-directory-buckets"; + _mk = "max-keys"; + _mp = "max-parts"; + _mu = "max-uploads"; + _p = "prefix"; + _pN = "partNumber"; + _pnm = "part-number-marker"; + _rcc = "response-cache-control"; + _rcd = "response-content-disposition"; + _rce = "response-content-encoding"; + _rcl = "response-content-language"; + _rct = "response-content-type"; + _re = "response-expires"; + _s = "smithy.ts.sdk.synthetic.com.amazonaws.s3"; + _sa = "start-after"; + _st = "streaming"; + _uI = "uploadId"; + _uim = "upload-id-marker"; + _vI = "versionId"; + _vim = "version-id-marker"; + _x = "xsi"; + _xA = "xmlAttribute"; + _xF = "xmlFlattened"; + _xN = "xmlName"; + _xNm = "xmlNamespace"; + _xaa = "x-amz-acl"; + _xaad = "x-amz-abort-date"; + _xaapa = "x-amz-access-point-alias"; + _xaari = "x-amz-abort-rule-id"; + _xaas = "x-amz-archive-status"; + _xaba = "x-amz-bucket-arn"; + _xabgr = "x-amz-bypass-governance-retention"; + _xabln = "x-amz-bucket-location-name"; + _xablt = "x-amz-bucket-location-type"; + _xabn = "x-amz-bucket-namespace"; + _xabole = "x-amz-bucket-object-lock-enabled"; + _xabolt = "x-amz-bucket-object-lock-token"; + _xabr = "x-amz-bucket-region"; + _xaca = "x-amz-checksum-algorithm"; + _xacc = "x-amz-checksum-crc32"; + _xacc_ = "x-amz-checksum-crc32c"; + _xacc__ = "x-amz-checksum-crc64nvme"; + _xacm = "x-amz-checksum-mode"; + _xacrsba = "x-amz-confirm-remove-self-bucket-access"; + _xacs = "x-amz-checksum-sha1"; + _xacs_ = "x-amz-checksum-sha256"; + _xacs__ = "x-amz-copy-source"; + _xacsim = "x-amz-copy-source-if-match"; + _xacsims = "x-amz-copy-source-if-modified-since"; + _xacsinm = "x-amz-copy-source-if-none-match"; + _xacsius = "x-amz-copy-source-if-unmodified-since"; + _xacsm = "x-amz-create-session-mode"; + _xacsr = "x-amz-copy-source-range"; + _xacssseca = "x-amz-copy-source-server-side-encryption-customer-algorithm"; + _xacssseck = "x-amz-copy-source-server-side-encryption-customer-key"; + _xacssseckM = "x-amz-copy-source-server-side-encryption-customer-key-MD5"; + _xacsvi = "x-amz-copy-source-version-id"; + _xact = "x-amz-checksum-type"; + _xact_ = "x-amz-client-token"; + _xadm = "x-amz-delete-marker"; + _xae = "x-amz-expiration"; + _xaebo = "x-amz-expected-bucket-owner"; + _xafec = "x-amz-fwd-error-code"; + _xafem = "x-amz-fwd-error-message"; + _xafhCC = "x-amz-fwd-header-Cache-Control"; + _xafhCD = "x-amz-fwd-header-Content-Disposition"; + _xafhCE = "x-amz-fwd-header-Content-Encoding"; + _xafhCL = "x-amz-fwd-header-Content-Language"; + _xafhCR = "x-amz-fwd-header-Content-Range"; + _xafhCT = "x-amz-fwd-header-Content-Type"; + _xafhE = "x-amz-fwd-header-ETag"; + _xafhE_ = "x-amz-fwd-header-Expires"; + _xafhLM = "x-amz-fwd-header-Last-Modified"; + _xafhar = "x-amz-fwd-header-accept-ranges"; + _xafhxacc = "x-amz-fwd-header-x-amz-checksum-crc32"; + _xafhxacc_ = "x-amz-fwd-header-x-amz-checksum-crc32c"; + _xafhxacc__ = "x-amz-fwd-header-x-amz-checksum-crc64nvme"; + _xafhxacs = "x-amz-fwd-header-x-amz-checksum-sha1"; + _xafhxacs_ = "x-amz-fwd-header-x-amz-checksum-sha256"; + _xafhxadm = "x-amz-fwd-header-x-amz-delete-marker"; + _xafhxae = "x-amz-fwd-header-x-amz-expiration"; + _xafhxamm = "x-amz-fwd-header-x-amz-missing-meta"; + _xafhxampc = "x-amz-fwd-header-x-amz-mp-parts-count"; + _xafhxaollh = "x-amz-fwd-header-x-amz-object-lock-legal-hold"; + _xafhxaolm = "x-amz-fwd-header-x-amz-object-lock-mode"; + _xafhxaolrud = "x-amz-fwd-header-x-amz-object-lock-retain-until-date"; + _xafhxar = "x-amz-fwd-header-x-amz-restore"; + _xafhxarc = "x-amz-fwd-header-x-amz-request-charged"; + _xafhxars = "x-amz-fwd-header-x-amz-replication-status"; + _xafhxasc = "x-amz-fwd-header-x-amz-storage-class"; + _xafhxasse = "x-amz-fwd-header-x-amz-server-side-encryption"; + _xafhxasseakki = "x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"; + _xafhxassebke = "x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"; + _xafhxasseca = "x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"; + _xafhxasseckM = "x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5"; + _xafhxatc = "x-amz-fwd-header-x-amz-tagging-count"; + _xafhxavi = "x-amz-fwd-header-x-amz-version-id"; + _xafs = "x-amz-fwd-status"; + _xagfc = "x-amz-grant-full-control"; + _xagr = "x-amz-grant-read"; + _xagra = "x-amz-grant-read-acp"; + _xagw = "x-amz-grant-write"; + _xagwa = "x-amz-grant-write-acp"; + _xaimit = "x-amz-if-match-initiated-time"; + _xaimlmt = "x-amz-if-match-last-modified-time"; + _xaims = "x-amz-if-match-size"; + _xam = "x-amz-meta-"; + _xam_ = "x-amz-mfa"; + _xamd = "x-amz-metadata-directive"; + _xamm = "x-amz-missing-meta"; + _xamos = "x-amz-mp-object-size"; + _xamp = "x-amz-max-parts"; + _xampc = "x-amz-mp-parts-count"; + _xaoa = "x-amz-object-attributes"; + _xaollh = "x-amz-object-lock-legal-hold"; + _xaolm = "x-amz-object-lock-mode"; + _xaolrud = "x-amz-object-lock-retain-until-date"; + _xaoo = "x-amz-object-ownership"; + _xaooa = "x-amz-optional-object-attributes"; + _xaos = "x-amz-object-size"; + _xapnm = "x-amz-part-number-marker"; + _xar = "x-amz-restore"; + _xarc = "x-amz-request-charged"; + _xarop = "x-amz-restore-output-path"; + _xarp = "x-amz-request-payer"; + _xarr = "x-amz-request-route"; + _xars = "x-amz-replication-status"; + _xars_ = "x-amz-rename-source"; + _xarsim = "x-amz-rename-source-if-match"; + _xarsims = "x-amz-rename-source-if-modified-since"; + _xarsinm = "x-amz-rename-source-if-none-match"; + _xarsius = "x-amz-rename-source-if-unmodified-since"; + _xart = "x-amz-request-token"; + _xasc = "x-amz-storage-class"; + _xasca = "x-amz-sdk-checksum-algorithm"; + _xasdv = "x-amz-skip-destination-validation"; + _xasebo = "x-amz-source-expected-bucket-owner"; + _xasse = "x-amz-server-side-encryption"; + _xasseakki = "x-amz-server-side-encryption-aws-kms-key-id"; + _xassebke = "x-amz-server-side-encryption-bucket-key-enabled"; + _xassec = "x-amz-server-side-encryption-context"; + _xasseca = "x-amz-server-side-encryption-customer-algorithm"; + _xasseck = "x-amz-server-side-encryption-customer-key"; + _xasseckM = "x-amz-server-side-encryption-customer-key-MD5"; + _xat = "x-amz-tagging"; + _xatc = "x-amz-tagging-count"; + _xatd = "x-amz-tagging-directive"; + _xatdmos = "x-amz-transition-default-minimum-object-size"; + _xavi = "x-amz-version-id"; + _xawob = "x-amz-write-offset-bytes"; + _xawrl = "x-amz-website-redirect-location"; + _xs = "xsi:type"; + n0 = "com.amazonaws.s3"; + _s_registry = TypeRegistry.for(_s); + S3ServiceException$ = [-3, _s, "S3ServiceException", 0, [], []]; + _s_registry.registerError(S3ServiceException$, S3ServiceException); + n0_registry = TypeRegistry.for(n0); + AccessDenied$ = [ + -3, + n0, + _AD, + { [_e]: _c, [_hE]: 403 }, + [], + [] + ]; + n0_registry.registerError(AccessDenied$, AccessDenied); + BucketAlreadyExists$ = [ + -3, + n0, + _BAE, + { [_e]: _c, [_hE]: 409 }, + [], + [] + ]; + n0_registry.registerError(BucketAlreadyExists$, BucketAlreadyExists); + BucketAlreadyOwnedByYou$ = [ + -3, + n0, + _BAOBY, + { [_e]: _c, [_hE]: 409 }, + [], + [] + ]; + n0_registry.registerError(BucketAlreadyOwnedByYou$, BucketAlreadyOwnedByYou); + EncryptionTypeMismatch$ = [ + -3, + n0, + _ETM, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(EncryptionTypeMismatch$, EncryptionTypeMismatch); + IdempotencyParameterMismatch$ = [ + -3, + n0, + _IPM, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(IdempotencyParameterMismatch$, IdempotencyParameterMismatch); + InvalidObjectState$ = [ + -3, + n0, + _IOS, + { [_e]: _c, [_hE]: 403 }, + [_SC, _AT], + [0, 0] + ]; + n0_registry.registerError(InvalidObjectState$, InvalidObjectState); + InvalidRequest$ = [ + -3, + n0, + _IR, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(InvalidRequest$, InvalidRequest); + InvalidWriteOffset$ = [ + -3, + n0, + _IWO, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(InvalidWriteOffset$, InvalidWriteOffset); + NoSuchBucket$ = [ + -3, + n0, + _NSB, + { [_e]: _c, [_hE]: 404 }, + [], + [] + ]; + n0_registry.registerError(NoSuchBucket$, NoSuchBucket); + NoSuchKey$ = [ + -3, + n0, + _NSK, + { [_e]: _c, [_hE]: 404 }, + [], + [] + ]; + n0_registry.registerError(NoSuchKey$, NoSuchKey); + NoSuchUpload$ = [ + -3, + n0, + _NSU, + { [_e]: _c, [_hE]: 404 }, + [], + [] + ]; + n0_registry.registerError(NoSuchUpload$, NoSuchUpload); + NotFound$ = [ + -3, + n0, + _NF, + { [_e]: _c }, + [], + [] + ]; + n0_registry.registerError(NotFound$, NotFound); + ObjectAlreadyInActiveTierError$ = [ + -3, + n0, + _OAIATE, + { [_e]: _c, [_hE]: 403 }, + [], + [] + ]; + n0_registry.registerError(ObjectAlreadyInActiveTierError$, ObjectAlreadyInActiveTierError); + ObjectNotInActiveTierError$ = [ + -3, + n0, + _ONIATE, + { [_e]: _c, [_hE]: 403 }, + [], + [] + ]; + n0_registry.registerError(ObjectNotInActiveTierError$, ObjectNotInActiveTierError); + TooManyParts$ = [ + -3, + n0, + _TMP, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(TooManyParts$, TooManyParts); + errorTypeRegistries = [ + _s_registry, + n0_registry + ]; + CopySourceSSECustomerKey = [0, n0, _CSSSECK, 8, 0]; + NonEmptyKmsKeyArnString = [0, n0, _NEKKAS, 8, 0]; + SessionCredentialValue = [0, n0, _SCV, 8, 0]; + SSECustomerKey = [0, n0, _SSECK, 8, 0]; + SSEKMSEncryptionContext = [0, n0, _SSEKMSEC, 8, 0]; + SSEKMSKeyId = [0, n0, _SSEKMSKI, 8, 0]; + StreamingBlob = [0, n0, _SB, { [_st]: 1 }, 42]; + AbacStatus$ = [ + 3, + n0, + _AS, + 0, + [_S], + [0] + ]; + AbortIncompleteMultipartUpload$ = [ + 3, + n0, + _AIMU, + 0, + [_DAI], + [1] + ]; + AbortMultipartUploadOutput$ = [ + 3, + n0, + _AMUO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + AbortMultipartUploadRequest$ = [ + 3, + n0, + _AMUR, + 0, + [_B, _K, _UI, _RP, _EBO, _IMIT], + [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [6, { [_hH]: _xaimit }]], + 3 + ]; + AccelerateConfiguration$ = [ + 3, + n0, + _AC, + 0, + [_S], + [0] + ]; + AccessControlPolicy$ = [ + 3, + n0, + _ACP, + 0, + [_G, _O], + [[() => Grants, { [_xN]: _ACL }], () => Owner$] + ]; + AccessControlTranslation$ = [ + 3, + n0, + _ACT, + 0, + [_O], + [0], + 1 + ]; + AnalyticsAndOperator$ = [ + 3, + n0, + _AAO, + 0, + [_P, _T], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]] + ]; + AnalyticsConfiguration$ = [ + 3, + n0, + _ACn, + 0, + [_I, _SCA, _F], + [0, () => StorageClassAnalysis$, [() => AnalyticsFilter$, 0]], + 2 + ]; + AnalyticsExportDestination$ = [ + 3, + n0, + _AED, + 0, + [_SBD], + [() => AnalyticsS3BucketDestination$], + 1 + ]; + AnalyticsS3BucketDestination$ = [ + 3, + n0, + _ASBD, + 0, + [_Fo, _B, _BAI, _P], + [0, 0, 0, 0], + 2 + ]; + BlockedEncryptionTypes$ = [ + 3, + n0, + _BET, + 0, + [_ET], + [[() => EncryptionTypeList, { [_xF]: 1 }]] + ]; + Bucket$ = [ + 3, + n0, + _B, + 0, + [_N, _CD, _BR, _BA], + [0, 4, 0, 0] + ]; + BucketInfo$ = [ + 3, + n0, + _BI, + 0, + [_DR, _Ty], + [0, 0] + ]; + BucketLifecycleConfiguration$ = [ + 3, + n0, + _BLC, + 0, + [_R], + [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Ru }]], + 1 + ]; + BucketLoggingStatus$ = [ + 3, + n0, + _BLS, + 0, + [_LE], + [[() => LoggingEnabled$, 0]] + ]; + Checksum$ = [ + 3, + n0, + _C, + 0, + [_CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT], + [0, 0, 0, 0, 0, 0] + ]; + CommonPrefix$ = [ + 3, + n0, + _CP, + 0, + [_P], + [0] + ]; + CompletedMultipartUpload$ = [ + 3, + n0, + _CMU, + 0, + [_Pa], + [[() => CompletedPartList, { [_xF]: 1, [_xN]: _Par }]] + ]; + CompletedPart$ = [ + 3, + n0, + _CPo, + 0, + [_ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _PN], + [0, 0, 0, 0, 0, 0, 1] + ]; + CompleteMultipartUploadOutput$ = [ + 3, + n0, + _CMUO, + { [_xN]: _CMUR }, + [_L, _B, _K, _E, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _SSE, _VI, _SSEKMSKI, _BKE, _RC], + [0, 0, 0, [0, { [_hH]: _xae }], 0, 0, 0, 0, 0, 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] + ]; + CompleteMultipartUploadRequest$ = [ + 3, + n0, + _CMURo, + 0, + [_B, _K, _UI, _MU, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _MOS, _RP, _EBO, _IM, _INM, _SSECA, _SSECK, _SSECKMD], + [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [() => CompletedMultipartUpload$, { [_hP]: 1, [_xN]: _CMUo }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamos }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], + 3 + ]; + Condition$ = [ + 3, + n0, + _Co, + 0, + [_HECRE, _KPE], + [0, 0] + ]; + ContinuationEvent$ = [ + 3, + n0, + _CE, + 0, + [], + [] + ]; + CopyObjectOutput$ = [ + 3, + n0, + _COO, + 0, + [_COR, _E, _CSVI, _VI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC], + [[() => CopyObjectResult$, 16], [0, { [_hH]: _xae }], [0, { [_hH]: _xacsvi }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] + ]; + CopyObjectRequest$ = [ + 3, + n0, + _CORo, + 0, + [_B, _CS, _K, _ACL_, _CC, _CA, _CDo, _CEo, _CL, _CTo, _CSIM, _CSIMS, _CSINM, _CSIUS, _Ex, _GFC, _GR, _GRACP, _GWACP, _IM, _INM, _M, _MD, _TD, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _ESBO], + [[0, 1], [0, { [_hH]: _xacs__ }], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _xaca }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [4, { [_hH]: _Ex }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xamd }], [0, { [_hH]: _xatd }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], + 3 + ]; + CopyObjectResult$ = [ + 3, + n0, + _COR, + 0, + [_ETa, _LM, _CT, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh], + [0, 4, 0, 0, 0, 0, 0, 0] + ]; + CopyPartResult$ = [ + 3, + n0, + _CPR, + 0, + [_ETa, _LM, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh], + [0, 4, 0, 0, 0, 0, 0] + ]; + CORSConfiguration$ = [ + 3, + n0, + _CORSC, + 0, + [_CORSR], + [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]], + 1 + ]; + CORSRule$ = [ + 3, + n0, + _CORSRu, + 0, + [_AM, _AO, _ID, _AH, _EH, _MAS], + [[64 | 0, { [_xF]: 1, [_xN]: _AMl }], [64 | 0, { [_xF]: 1, [_xN]: _AOl }], 0, [64 | 0, { [_xF]: 1, [_xN]: _AHl }], [64 | 0, { [_xF]: 1, [_xN]: _EHx }], 1], + 2 + ]; + CreateBucketConfiguration$ = [ + 3, + n0, + _CBC, + 0, + [_LC, _L, _B, _T], + [0, () => LocationInfo$, () => BucketInfo$, [() => TagSet, 0]] + ]; + CreateBucketMetadataConfigurationRequest$ = [ + 3, + n0, + _CBMCR, + 0, + [_B, _MC, _CMD, _CA, _EBO], + [[0, 1], [() => MetadataConfiguration$, { [_hP]: 1, [_xN]: _MC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + CreateBucketMetadataTableConfigurationRequest$ = [ + 3, + n0, + _CBMTCR, + 0, + [_B, _MTC, _CMD, _CA, _EBO], + [[0, 1], [() => MetadataTableConfiguration$, { [_hP]: 1, [_xN]: _MTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + CreateBucketOutput$ = [ + 3, + n0, + _CBO, + 0, + [_L, _BA], + [[0, { [_hH]: _L }], [0, { [_hH]: _xaba }]] + ]; + CreateBucketRequest$ = [ + 3, + n0, + _CBR, + 0, + [_B, _ACL_, _CBC, _GFC, _GR, _GRACP, _GW, _GWACP, _OLEFB, _OO, _BN], + [[0, 1], [0, { [_hH]: _xaa }], [() => CreateBucketConfiguration$, { [_hP]: 1, [_xN]: _CBC }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [2, { [_hH]: _xabole }], [0, { [_hH]: _xaoo }], [0, { [_hH]: _xabn }]], + 1 + ]; + CreateMultipartUploadOutput$ = [ + 3, + n0, + _CMUOr, + { [_xN]: _IMUR }, + [_ADb, _ARI, _B, _K, _UI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC, _CA, _CT], + [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], [0, { [_xN]: _B }], 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]] + ]; + CreateMultipartUploadRequest$ = [ + 3, + n0, + _CMURr, + 0, + [_B, _K, _ACL_, _CC, _CDo, _CEo, _CL, _CTo, _Ex, _GFC, _GR, _GRACP, _GWACP, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _CA, _CT], + [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]], + 2 + ]; + CreateSessionOutput$ = [ + 3, + n0, + _CSO, + { [_xN]: _CSR }, + [_Cr, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE], + [[() => SessionCredentials$, { [_xN]: _Cr }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], + 1 + ]; + CreateSessionRequest$ = [ + 3, + n0, + _CSRr, + 0, + [_B, _SM, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE], + [[0, 1], [0, { [_hH]: _xacsm }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], + 1 + ]; + CSVInput$ = [ + 3, + n0, + _CSVIn, + 0, + [_FHI, _Com, _QEC, _RD, _FD, _QC, _AQRD], + [0, 0, 0, 0, 0, 0, 2] + ]; + CSVOutput$ = [ + 3, + n0, + _CSVO, + 0, + [_QF, _QEC, _RD, _FD, _QC], + [0, 0, 0, 0, 0] + ]; + DefaultRetention$ = [ + 3, + n0, + _DRe, + 0, + [_Mo, _D, _Y], + [0, 1, 1] + ]; + Delete$ = [ + 3, + n0, + _De, + 0, + [_Ob, _Q], + [[() => ObjectIdentifierList, { [_xF]: 1, [_xN]: _Obj }], 2], + 1 + ]; + DeleteBucketAnalyticsConfigurationRequest$ = [ + 3, + n0, + _DBACR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + DeleteBucketCorsRequest$ = [ + 3, + n0, + _DBCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketEncryptionRequest$ = [ + 3, + n0, + _DBER, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketIntelligentTieringConfigurationRequest$ = [ + 3, + n0, + _DBITCR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + DeleteBucketInventoryConfigurationRequest$ = [ + 3, + n0, + _DBICR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + DeleteBucketLifecycleRequest$ = [ + 3, + n0, + _DBLR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketMetadataConfigurationRequest$ = [ + 3, + n0, + _DBMCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketMetadataTableConfigurationRequest$ = [ + 3, + n0, + _DBMTCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketMetricsConfigurationRequest$ = [ + 3, + n0, + _DBMCRe, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + DeleteBucketOwnershipControlsRequest$ = [ + 3, + n0, + _DBOCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketPolicyRequest$ = [ + 3, + n0, + _DBPR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketReplicationRequest$ = [ + 3, + n0, + _DBRR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketRequest$ = [ + 3, + n0, + _DBR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketTaggingRequest$ = [ + 3, + n0, + _DBTR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketWebsiteRequest$ = [ + 3, + n0, + _DBWR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeletedObject$ = [ + 3, + n0, + _DO, + 0, + [_K, _VI, _DM, _DMVI], + [0, 0, 2, 0] + ]; + DeleteMarkerEntry$ = [ + 3, + n0, + _DME, + 0, + [_O, _K, _VI, _IL, _LM], + [() => Owner$, 0, 0, 2, 4] + ]; + DeleteMarkerReplication$ = [ + 3, + n0, + _DMR, + 0, + [_S], + [0] + ]; + DeleteObjectOutput$ = [ + 3, + n0, + _DOO, + 0, + [_DM, _VI, _RC], + [[2, { [_hH]: _xadm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }]] + ]; + DeleteObjectRequest$ = [ + 3, + n0, + _DOR, + 0, + [_B, _K, _MFA, _VI, _RP, _BGR, _EBO, _IM, _IMLMT, _IMS], + [[0, 1], [0, 1], [0, { [_hH]: _xam_ }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [6, { [_hH]: _xaimlmt }], [1, { [_hH]: _xaims }]], + 2 + ]; + DeleteObjectsOutput$ = [ + 3, + n0, + _DOOe, + { [_xN]: _DRel }, + [_Del, _RC, _Er], + [[() => DeletedObjects, { [_xF]: 1 }], [0, { [_hH]: _xarc }], [() => Errors, { [_xF]: 1, [_xN]: _Err }]] + ]; + DeleteObjectsRequest$ = [ + 3, + n0, + _DORe, + 0, + [_B, _De, _MFA, _RP, _BGR, _EBO, _CA], + [[0, 1], [() => Delete$, { [_hP]: 1, [_xN]: _De }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], + 2 + ]; + DeleteObjectTaggingOutput$ = [ + 3, + n0, + _DOTO, + 0, + [_VI], + [[0, { [_hH]: _xavi }]] + ]; + DeleteObjectTaggingRequest$ = [ + 3, + n0, + _DOTR, + 0, + [_B, _K, _VI, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], + 2 + ]; + DeletePublicAccessBlockRequest$ = [ + 3, + n0, + _DPABR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + Destination$ = [ + 3, + n0, + _Des, + 0, + [_B, _A, _SC, _ACT, _EC, _RT, _Me], + [0, 0, 0, () => AccessControlTranslation$, () => EncryptionConfiguration$, () => ReplicationTime$, () => Metrics$], + 1 + ]; + DestinationResult$ = [ + 3, + n0, + _DRes, + 0, + [_TBT, _TBA, _TN], + [0, 0, 0] + ]; + Encryption$ = [ + 3, + n0, + _En, + 0, + [_ET, _KMSKI, _KMSC], + [0, [() => SSEKMSKeyId, 0], 0], + 1 + ]; + EncryptionConfiguration$ = [ + 3, + n0, + _EC, + 0, + [_RKKID], + [0] + ]; + EndEvent$ = [ + 3, + n0, + _EE, + 0, + [], + [] + ]; + _Error$ = [ + 3, + n0, + _Err, + 0, + [_K, _VI, _Cod, _Mes], + [0, 0, 0, 0] + ]; + ErrorDetails$ = [ + 3, + n0, + _ED, + 0, + [_ECr, _EM], + [0, 0] + ]; + ErrorDocument$ = [ + 3, + n0, + _EDr, + 0, + [_K], + [0], + 1 + ]; + EventBridgeConfiguration$ = [ + 3, + n0, + _EBC, + 0, + [], + [] + ]; + ExistingObjectReplication$ = [ + 3, + n0, + _EOR, + 0, + [_S], + [0], + 1 + ]; + FilterRule$ = [ + 3, + n0, + _FR, + 0, + [_N, _V], + [0, 0] + ]; + GetBucketAbacOutput$ = [ + 3, + n0, + _GBAO, + 0, + [_AS], + [[() => AbacStatus$, 16]] + ]; + GetBucketAbacRequest$ = [ + 3, + n0, + _GBAR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketAccelerateConfigurationOutput$ = [ + 3, + n0, + _GBACO, + { [_xN]: _AC }, + [_S, _RC], + [0, [0, { [_hH]: _xarc }]] + ]; + GetBucketAccelerateConfigurationRequest$ = [ + 3, + n0, + _GBACR, + 0, + [_B, _EBO, _RP], + [[0, 1], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 1 + ]; + GetBucketAclOutput$ = [ + 3, + n0, + _GBAOe, + { [_xN]: _ACP }, + [_O, _G], + [() => Owner$, [() => Grants, { [_xN]: _ACL }]] + ]; + GetBucketAclRequest$ = [ + 3, + n0, + _GBARe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketAnalyticsConfigurationOutput$ = [ + 3, + n0, + _GBACOe, + 0, + [_ACn], + [[() => AnalyticsConfiguration$, 16]] + ]; + GetBucketAnalyticsConfigurationRequest$ = [ + 3, + n0, + _GBACRe, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetBucketCorsOutput$ = [ + 3, + n0, + _GBCO, + { [_xN]: _CORSC }, + [_CORSR], + [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]] + ]; + GetBucketCorsRequest$ = [ + 3, + n0, + _GBCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketEncryptionOutput$ = [ + 3, + n0, + _GBEO, + 0, + [_SSEC], + [[() => ServerSideEncryptionConfiguration$, 16]] + ]; + GetBucketEncryptionRequest$ = [ + 3, + n0, + _GBER, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketIntelligentTieringConfigurationOutput$ = [ + 3, + n0, + _GBITCO, + 0, + [_ITC], + [[() => IntelligentTieringConfiguration$, 16]] + ]; + GetBucketIntelligentTieringConfigurationRequest$ = [ + 3, + n0, + _GBITCR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetBucketInventoryConfigurationOutput$ = [ + 3, + n0, + _GBICO, + 0, + [_IC], + [[() => InventoryConfiguration$, 16]] + ]; + GetBucketInventoryConfigurationRequest$ = [ + 3, + n0, + _GBICR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetBucketLifecycleConfigurationOutput$ = [ + 3, + n0, + _GBLCO, + { [_xN]: _LCi }, + [_R, _TDMOS], + [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Ru }], [0, { [_hH]: _xatdmos }]] + ]; + GetBucketLifecycleConfigurationRequest$ = [ + 3, + n0, + _GBLCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketLocationOutput$ = [ + 3, + n0, + _GBLO, + { [_xN]: _LC }, + [_LC], + [0] + ]; + GetBucketLocationRequest$ = [ + 3, + n0, + _GBLR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketLoggingOutput$ = [ + 3, + n0, + _GBLOe, + { [_xN]: _BLS }, + [_LE], + [[() => LoggingEnabled$, 0]] + ]; + GetBucketLoggingRequest$ = [ + 3, + n0, + _GBLRe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketMetadataConfigurationOutput$ = [ + 3, + n0, + _GBMCO, + 0, + [_GBMCR], + [[() => GetBucketMetadataConfigurationResult$, 16]] + ]; + GetBucketMetadataConfigurationRequest$ = [ + 3, + n0, + _GBMCRe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketMetadataConfigurationResult$ = [ + 3, + n0, + _GBMCR, + 0, + [_MCR], + [() => MetadataConfigurationResult$], + 1 + ]; + GetBucketMetadataTableConfigurationOutput$ = [ + 3, + n0, + _GBMTCO, + 0, + [_GBMTCR], + [[() => GetBucketMetadataTableConfigurationResult$, 16]] + ]; + GetBucketMetadataTableConfigurationRequest$ = [ + 3, + n0, + _GBMTCRe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketMetadataTableConfigurationResult$ = [ + 3, + n0, + _GBMTCR, + 0, + [_MTCR, _S, _Err], + [() => MetadataTableConfigurationResult$, 0, () => ErrorDetails$], + 2 + ]; + GetBucketMetricsConfigurationOutput$ = [ + 3, + n0, + _GBMCOe, + 0, + [_MCe], + [[() => MetricsConfiguration$, 16]] + ]; + GetBucketMetricsConfigurationRequest$ = [ + 3, + n0, + _GBMCRet, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetBucketNotificationConfigurationRequest$ = [ + 3, + n0, + _GBNCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketOwnershipControlsOutput$ = [ + 3, + n0, + _GBOCO, + 0, + [_OC], + [[() => OwnershipControls$, 16]] + ]; + GetBucketOwnershipControlsRequest$ = [ + 3, + n0, + _GBOCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketPolicyOutput$ = [ + 3, + n0, + _GBPO, + 0, + [_Po], + [[0, 16]] + ]; + GetBucketPolicyRequest$ = [ + 3, + n0, + _GBPR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketPolicyStatusOutput$ = [ + 3, + n0, + _GBPSO, + 0, + [_PS], + [[() => PolicyStatus$, 16]] + ]; + GetBucketPolicyStatusRequest$ = [ + 3, + n0, + _GBPSR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketReplicationOutput$ = [ + 3, + n0, + _GBRO, + 0, + [_RCe], + [[() => ReplicationConfiguration$, 16]] + ]; + GetBucketReplicationRequest$ = [ + 3, + n0, + _GBRR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketRequestPaymentOutput$ = [ + 3, + n0, + _GBRPO, + { [_xN]: _RPC }, + [_Pay], + [0] + ]; + GetBucketRequestPaymentRequest$ = [ + 3, + n0, + _GBRPR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketTaggingOutput$ = [ + 3, + n0, + _GBTO, + { [_xN]: _Tag }, + [_TS], + [[() => TagSet, 0]], + 1 + ]; + GetBucketTaggingRequest$ = [ + 3, + n0, + _GBTR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketVersioningOutput$ = [ + 3, + n0, + _GBVO, + { [_xN]: _VC }, + [_S, _MFAD], + [0, [0, { [_xN]: _MDf }]] + ]; + GetBucketVersioningRequest$ = [ + 3, + n0, + _GBVR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketWebsiteOutput$ = [ + 3, + n0, + _GBWO, + { [_xN]: _WC }, + [_RART, _IDn, _EDr, _RR], + [() => RedirectAllRequestsTo$, () => IndexDocument$, () => ErrorDocument$, [() => RoutingRules, 0]] + ]; + GetBucketWebsiteRequest$ = [ + 3, + n0, + _GBWR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetObjectAclOutput$ = [ + 3, + n0, + _GOAO, + { [_xN]: _ACP }, + [_O, _G, _RC], + [() => Owner$, [() => Grants, { [_xN]: _ACL }], [0, { [_hH]: _xarc }]] + ]; + GetObjectAclRequest$ = [ + 3, + n0, + _GOAR, + 0, + [_B, _K, _VI, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetObjectAttributesOutput$ = [ + 3, + n0, + _GOAOe, + { [_xN]: _GOARe }, + [_DM, _LM, _VI, _RC, _ETa, _C, _OP, _SC, _OS], + [[2, { [_hH]: _xadm }], [4, { [_hH]: _LM_ }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }], 0, () => Checksum$, [() => GetObjectAttributesParts$, 0], 0, 1] + ]; + GetObjectAttributesParts$ = [ + 3, + n0, + _GOAP, + 0, + [_TPC, _PNM, _NPNM, _MP, _IT, _Pa], + [[1, { [_xN]: _PC }], 0, 0, 1, 2, [() => PartsList, { [_xF]: 1, [_xN]: _Par }]] + ]; + GetObjectAttributesRequest$ = [ + 3, + n0, + _GOARet, + 0, + [_B, _K, _OA, _VI, _MP, _PNM, _SSECA, _SSECK, _SSECKMD, _RP, _EBO], + [[0, 1], [0, 1], [64 | 0, { [_hH]: _xaoa }], [0, { [_hQ]: _vI }], [1, { [_hH]: _xamp }], [0, { [_hH]: _xapnm }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 3 + ]; + GetObjectLegalHoldOutput$ = [ + 3, + n0, + _GOLHO, + 0, + [_LH], + [[() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }]] + ]; + GetObjectLegalHoldRequest$ = [ + 3, + n0, + _GOLHR, + 0, + [_B, _K, _VI, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetObjectLockConfigurationOutput$ = [ + 3, + n0, + _GOLCO, + 0, + [_OLC], + [[() => ObjectLockConfiguration$, 16]] + ]; + GetObjectLockConfigurationRequest$ = [ + 3, + n0, + _GOLCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetObjectOutput$ = [ + 3, + n0, + _GOO, + 0, + [_Bo, _DM, _AR, _E, _Re, _LM, _CLo, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _MM, _VI, _CC, _CDo, _CEo, _CL, _CR, _CTo, _Ex, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS], + [[() => StreamingBlob, 16], [2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CR_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]] + ]; + GetObjectRequest$ = [ + 3, + n0, + _GOR, + 0, + [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh], + [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm }]], + 2 + ]; + GetObjectRetentionOutput$ = [ + 3, + n0, + _GORO, + 0, + [_Ret], + [[() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }]] + ]; + GetObjectRetentionRequest$ = [ + 3, + n0, + _GORR, + 0, + [_B, _K, _VI, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetObjectTaggingOutput$ = [ + 3, + n0, + _GOTO, + { [_xN]: _Tag }, + [_TS, _VI], + [[() => TagSet, 0], [0, { [_hH]: _xavi }]], + 1 + ]; + GetObjectTaggingRequest$ = [ + 3, + n0, + _GOTR, + 0, + [_B, _K, _VI, _EBO, _RP], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 2 + ]; + GetObjectTorrentOutput$ = [ + 3, + n0, + _GOTOe, + 0, + [_Bo, _RC], + [[() => StreamingBlob, 16], [0, { [_hH]: _xarc }]] + ]; + GetObjectTorrentRequest$ = [ + 3, + n0, + _GOTRe, + 0, + [_B, _K, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetPublicAccessBlockOutput$ = [ + 3, + n0, + _GPABO, + 0, + [_PABC], + [[() => PublicAccessBlockConfiguration$, 16]] + ]; + GetPublicAccessBlockRequest$ = [ + 3, + n0, + _GPABR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GlacierJobParameters$ = [ + 3, + n0, + _GJP, + 0, + [_Ti], + [0], + 1 + ]; + Grant$ = [ + 3, + n0, + _Gr, + 0, + [_Gra, _Pe], + [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0] + ]; + Grantee$ = [ + 3, + n0, + _Gra, + 0, + [_Ty, _DN, _EA, _ID, _URI], + [[0, { [_xA]: 1, [_xN]: _xs }], 0, 0, 0, 0], + 1 + ]; + HeadBucketOutput$ = [ + 3, + n0, + _HBO, + 0, + [_BA, _BLT, _BLN, _BR, _APA], + [[0, { [_hH]: _xaba }], [0, { [_hH]: _xablt }], [0, { [_hH]: _xabln }], [0, { [_hH]: _xabr }], [2, { [_hH]: _xaapa }]] + ]; + HeadBucketRequest$ = [ + 3, + n0, + _HBR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + HeadObjectOutput$ = [ + 3, + n0, + _HOO, + 0, + [_DM, _AR, _E, _Re, _ASr, _LM, _CLo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _ETa, _MM, _VI, _CC, _CDo, _CEo, _CL, _CTo, _CR, _Ex, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS], + [[2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [0, { [_hH]: _xaas }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [0, { [_hH]: _ETa }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _CR_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]] + ]; + HeadObjectRequest$ = [ + 3, + n0, + _HOR, + 0, + [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh], + [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm }]], + 2 + ]; + IndexDocument$ = [ + 3, + n0, + _IDn, + 0, + [_Su], + [0], + 1 + ]; + Initiator$ = [ + 3, + n0, + _In, + 0, + [_ID, _DN], + [0, 0] + ]; + InputSerialization$ = [ + 3, + n0, + _IS, + 0, + [_CSV, _CTom, _JSON, _Parq], + [() => CSVInput$, 0, () => JSONInput$, () => ParquetInput$] + ]; + IntelligentTieringAndOperator$ = [ + 3, + n0, + _ITAO, + 0, + [_P, _T], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]] + ]; + IntelligentTieringConfiguration$ = [ + 3, + n0, + _ITC, + 0, + [_I, _S, _Tie, _F], + [0, 0, [() => TieringList, { [_xF]: 1, [_xN]: _Tier }], [() => IntelligentTieringFilter$, 0]], + 3 + ]; + IntelligentTieringFilter$ = [ + 3, + n0, + _ITF, + 0, + [_P, _Ta, _An], + [0, () => Tag$, [() => IntelligentTieringAndOperator$, 0]] + ]; + InventoryConfiguration$ = [ + 3, + n0, + _IC, + 0, + [_Des, _IE, _I, _IOV, _Sc, _F, _OF], + [[() => InventoryDestination$, 0], 2, 0, 0, () => InventorySchedule$, () => InventoryFilter$, [() => InventoryOptionalFields, 0]], + 5 + ]; + InventoryDestination$ = [ + 3, + n0, + _IDnv, + 0, + [_SBD], + [[() => InventoryS3BucketDestination$, 0]], + 1 + ]; + InventoryEncryption$ = [ + 3, + n0, + _IEn, + 0, + [_SSES, _SSEKMS], + [[() => SSES3$, { [_xN]: _SS }], [() => SSEKMS$, { [_xN]: _SK }]] + ]; + InventoryFilter$ = [ + 3, + n0, + _IF, + 0, + [_P], + [0], + 1 + ]; + InventoryS3BucketDestination$ = [ + 3, + n0, + _ISBD, + 0, + [_B, _Fo, _AI, _P, _En], + [0, 0, 0, 0, [() => InventoryEncryption$, 0]], + 2 + ]; + InventorySchedule$ = [ + 3, + n0, + _ISn, + 0, + [_Fr], + [0], + 1 + ]; + InventoryTableConfiguration$ = [ + 3, + n0, + _ITCn, + 0, + [_CSo, _EC], + [0, () => MetadataTableEncryptionConfiguration$], + 1 + ]; + InventoryTableConfigurationResult$ = [ + 3, + n0, + _ITCR, + 0, + [_CSo, _TSa, _Err, _TNa, _TA], + [0, 0, () => ErrorDetails$, 0, 0], + 1 + ]; + InventoryTableConfigurationUpdates$ = [ + 3, + n0, + _ITCU, + 0, + [_CSo, _EC], + [0, () => MetadataTableEncryptionConfiguration$], + 1 + ]; + JournalTableConfiguration$ = [ + 3, + n0, + _JTC, + 0, + [_REe, _EC], + [() => RecordExpiration$, () => MetadataTableEncryptionConfiguration$], + 1 + ]; + JournalTableConfigurationResult$ = [ + 3, + n0, + _JTCR, + 0, + [_TSa, _TNa, _REe, _Err, _TA], + [0, 0, () => RecordExpiration$, () => ErrorDetails$, 0], + 3 + ]; + JournalTableConfigurationUpdates$ = [ + 3, + n0, + _JTCU, + 0, + [_REe], + [() => RecordExpiration$], + 1 + ]; + JSONInput$ = [ + 3, + n0, + _JSONI, + 0, + [_Ty], + [0] + ]; + JSONOutput$ = [ + 3, + n0, + _JSONO, + 0, + [_RD], + [0] + ]; + LambdaFunctionConfiguration$ = [ + 3, + n0, + _LFC, + 0, + [_LFA, _Ev, _I, _F], + [[0, { [_xN]: _CF }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], + 2 + ]; + LifecycleExpiration$ = [ + 3, + n0, + _LEi, + 0, + [_Da, _D, _EODM], + [5, 1, 2] + ]; + LifecycleRule$ = [ + 3, + n0, + _LR, + 0, + [_S, _E, _ID, _P, _F, _Tr, _NVT, _NVE, _AIMU], + [0, () => LifecycleExpiration$, 0, 0, [() => LifecycleRuleFilter$, 0], [() => TransitionList, { [_xF]: 1, [_xN]: _Tra }], [() => NoncurrentVersionTransitionList, { [_xF]: 1, [_xN]: _NVTo }], () => NoncurrentVersionExpiration$, () => AbortIncompleteMultipartUpload$], + 1 + ]; + LifecycleRuleAndOperator$ = [ + 3, + n0, + _LRAO, + 0, + [_P, _T, _OSGT, _OSLT], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 1, 1] + ]; + LifecycleRuleFilter$ = [ + 3, + n0, + _LRF, + 0, + [_P, _Ta, _OSGT, _OSLT, _An], + [0, () => Tag$, 1, 1, [() => LifecycleRuleAndOperator$, 0]] + ]; + ListBucketAnalyticsConfigurationsOutput$ = [ + 3, + n0, + _LBACO, + { [_xN]: _LBACR }, + [_IT, _CTon, _NCT, _ACLn], + [2, 0, 0, [() => AnalyticsConfigurationList, { [_xF]: 1, [_xN]: _ACn }]] + ]; + ListBucketAnalyticsConfigurationsRequest$ = [ + 3, + n0, + _LBACRi, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 + ]; + ListBucketIntelligentTieringConfigurationsOutput$ = [ + 3, + n0, + _LBITCO, + 0, + [_IT, _CTon, _NCT, _ITCL], + [2, 0, 0, [() => IntelligentTieringConfigurationList, { [_xF]: 1, [_xN]: _ITC }]] + ]; + ListBucketIntelligentTieringConfigurationsRequest$ = [ + 3, + n0, + _LBITCR, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 + ]; + ListBucketInventoryConfigurationsOutput$ = [ + 3, + n0, + _LBICO, + { [_xN]: _LICR }, + [_CTon, _ICL, _IT, _NCT], + [0, [() => InventoryConfigurationList, { [_xF]: 1, [_xN]: _IC }], 2, 0] + ]; + ListBucketInventoryConfigurationsRequest$ = [ + 3, + n0, + _LBICR, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 + ]; + ListBucketMetricsConfigurationsOutput$ = [ + 3, + n0, + _LBMCO, + { [_xN]: _LMCR }, + [_IT, _CTon, _NCT, _MCL], + [2, 0, 0, [() => MetricsConfigurationList, { [_xF]: 1, [_xN]: _MCe }]] + ]; + ListBucketMetricsConfigurationsRequest$ = [ + 3, + n0, + _LBMCR, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 + ]; + ListBucketsOutput$ = [ + 3, + n0, + _LBO, + { [_xN]: _LAMBR }, + [_Bu, _O, _CTon, _P], + [[() => Buckets, 0], () => Owner$, 0, 0] + ]; + ListBucketsRequest$ = [ + 3, + n0, + _LBR, + 0, + [_MB, _CTon, _P, _BR], + [[1, { [_hQ]: _mb }], [0, { [_hQ]: _ct }], [0, { [_hQ]: _p }], [0, { [_hQ]: _br }]] + ]; + ListDirectoryBucketsOutput$ = [ + 3, + n0, + _LDBO, + { [_xN]: _LAMDBR }, + [_Bu, _CTon], + [[() => Buckets, 0], 0] + ]; + ListDirectoryBucketsRequest$ = [ + 3, + n0, + _LDBR, + 0, + [_CTon, _MDB], + [[0, { [_hQ]: _ct }], [1, { [_hQ]: _mdb }]] + ]; + ListMultipartUploadsOutput$ = [ + 3, + n0, + _LMUO, + { [_xN]: _LMUR }, + [_B, _KM, _UIM, _NKM, _P, _Deli, _NUIM, _MUa, _IT, _U, _CPom, _ETn, _RC], + [0, 0, 0, 0, 0, 0, 0, 1, 2, [() => MultipartUploadList, { [_xF]: 1, [_xN]: _Up }], [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]] + ]; + ListMultipartUploadsRequest$ = [ + 3, + n0, + _LMURi, + 0, + [_B, _Deli, _ETn, _KM, _MUa, _P, _UIM, _EBO, _RP], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mu }], [0, { [_hQ]: _p }], [0, { [_hQ]: _uim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 1 + ]; + ListObjectsOutput$ = [ + 3, + n0, + _LOO, + { [_xN]: _LBRi }, + [_IT, _Ma, _NM, _Con, _N, _P, _Deli, _MK, _CPom, _ETn, _RC], + [2, 0, 0, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]] + ]; + ListObjectsRequest$ = [ + 3, + n0, + _LOR, + 0, + [_B, _Deli, _ETn, _Ma, _MK, _P, _RP, _EBO, _OOA], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _m }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], + 1 + ]; + ListObjectsV2Output$ = [ + 3, + n0, + _LOVO, + { [_xN]: _LBRi }, + [_IT, _Con, _N, _P, _Deli, _MK, _CPom, _ETn, _KC, _CTon, _NCT, _SA, _RC], + [2, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, 1, 0, 0, 0, [0, { [_hH]: _xarc }]] + ]; + ListObjectsV2Request$ = [ + 3, + n0, + _LOVR, + 0, + [_B, _Deli, _ETn, _MK, _P, _CTon, _FO, _SA, _RP, _EBO, _OOA], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _ct }], [2, { [_hQ]: _fo }], [0, { [_hQ]: _sa }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], + 1 + ]; + ListObjectVersionsOutput$ = [ + 3, + n0, + _LOVOi, + { [_xN]: _LVR }, + [_IT, _KM, _VIM, _NKM, _NVIM, _Ve, _DMe, _N, _P, _Deli, _MK, _CPom, _ETn, _RC], + [2, 0, 0, 0, 0, [() => ObjectVersionList, { [_xF]: 1, [_xN]: _Ver }], [() => DeleteMarkers, { [_xF]: 1, [_xN]: _DM }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]] + ]; + ListObjectVersionsRequest$ = [ + 3, + n0, + _LOVRi, + 0, + [_B, _Deli, _ETn, _KM, _MK, _P, _VIM, _EBO, _RP, _OOA], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _vim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }], [64 | 0, { [_hH]: _xaooa }]], + 1 + ]; + ListPartsOutput$ = [ + 3, + n0, + _LPO, + { [_xN]: _LPR }, + [_ADb, _ARI, _B, _K, _UI, _PNM, _NPNM, _MP, _IT, _Pa, _In, _O, _SC, _RC, _CA, _CT], + [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], 0, 0, 0, 0, 0, 1, 2, [() => Parts, { [_xF]: 1, [_xN]: _Par }], () => Initiator$, () => Owner$, 0, [0, { [_hH]: _xarc }], 0, 0] + ]; + ListPartsRequest$ = [ + 3, + n0, + _LPRi, + 0, + [_B, _K, _UI, _MP, _PNM, _RP, _EBO, _SSECA, _SSECK, _SSECKMD], + [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [1, { [_hQ]: _mp }], [0, { [_hQ]: _pnm }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], + 3 + ]; + LocationInfo$ = [ + 3, + n0, + _LI, + 0, + [_Ty, _N], + [0, 0] + ]; + LoggingEnabled$ = [ + 3, + n0, + _LE, + 0, + [_TB, _TP, _TG, _TOKF], + [0, 0, [() => TargetGrants, 0], [() => TargetObjectKeyFormat$, 0]], + 2 + ]; + MetadataConfiguration$ = [ + 3, + n0, + _MC, + 0, + [_JTC, _ITCn], + [() => JournalTableConfiguration$, () => InventoryTableConfiguration$], + 1 + ]; + MetadataConfigurationResult$ = [ + 3, + n0, + _MCR, + 0, + [_DRes, _JTCR, _ITCR], + [() => DestinationResult$, () => JournalTableConfigurationResult$, () => InventoryTableConfigurationResult$], + 1 + ]; + MetadataEntry$ = [ + 3, + n0, + _ME, + 0, + [_N, _V], + [0, 0] + ]; + MetadataTableConfiguration$ = [ + 3, + n0, + _MTC, + 0, + [_STD], + [() => S3TablesDestination$], + 1 + ]; + MetadataTableConfigurationResult$ = [ + 3, + n0, + _MTCR, + 0, + [_STDR], + [() => S3TablesDestinationResult$], + 1 + ]; + MetadataTableEncryptionConfiguration$ = [ + 3, + n0, + _MTEC, + 0, + [_SAs, _KKA], + [0, 0], + 1 + ]; + Metrics$ = [ + 3, + n0, + _Me, + 0, + [_S, _ETv], + [0, () => ReplicationTimeValue$], + 1 + ]; + MetricsAndOperator$ = [ + 3, + n0, + _MAO, + 0, + [_P, _T, _APAc], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 0] + ]; + MetricsConfiguration$ = [ + 3, + n0, + _MCe, + 0, + [_I, _F], + [0, [() => MetricsFilter$, 0]], + 1 + ]; + MultipartUpload$ = [ + 3, + n0, + _MU, + 0, + [_UI, _K, _Ini, _SC, _O, _In, _CA, _CT], + [0, 0, 4, 0, () => Owner$, () => Initiator$, 0, 0] + ]; + NoncurrentVersionExpiration$ = [ + 3, + n0, + _NVE, + 0, + [_ND, _NNV], + [1, 1] + ]; + NoncurrentVersionTransition$ = [ + 3, + n0, + _NVTo, + 0, + [_ND, _SC, _NNV], + [1, 0, 1] + ]; + NotificationConfiguration$ = [ + 3, + n0, + _NC, + 0, + [_TCo, _QCu, _LFCa, _EBC], + [[() => TopicConfigurationList, { [_xF]: 1, [_xN]: _TCop }], [() => QueueConfigurationList, { [_xF]: 1, [_xN]: _QCue }], [() => LambdaFunctionConfigurationList, { [_xF]: 1, [_xN]: _CFC }], () => EventBridgeConfiguration$] + ]; + NotificationConfigurationFilter$ = [ + 3, + n0, + _NCF, + 0, + [_K], + [[() => S3KeyFilter$, { [_xN]: _SKe }]] + ]; + _Object$ = [ + 3, + n0, + _Obj, + 0, + [_K, _LM, _ETa, _CA, _CT, _Si, _SC, _O, _RSe], + [0, 4, 0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, () => Owner$, () => RestoreStatus$] + ]; + ObjectIdentifier$ = [ + 3, + n0, + _OI, + 0, + [_K, _VI, _ETa, _LMT, _Si], + [0, 0, 0, 6, 1], + 1 + ]; + ObjectLockConfiguration$ = [ + 3, + n0, + _OLC, + 0, + [_OLE, _Ru], + [0, () => ObjectLockRule$] + ]; + ObjectLockLegalHold$ = [ + 3, + n0, + _OLLH, + 0, + [_S], + [0] + ]; + ObjectLockRetention$ = [ + 3, + n0, + _OLR, + 0, + [_Mo, _RUD], + [0, 5] + ]; + ObjectLockRule$ = [ + 3, + n0, + _OLRb, + 0, + [_DRe], + [() => DefaultRetention$] + ]; + ObjectPart$ = [ + 3, + n0, + _OPb, + 0, + [_PN, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh], + [1, 1, 0, 0, 0, 0, 0] + ]; + ObjectVersion$ = [ + 3, + n0, + _OV, + 0, + [_ETa, _CA, _CT, _Si, _SC, _K, _VI, _IL, _LM, _O, _RSe], + [0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, 0, 0, 2, 4, () => Owner$, () => RestoreStatus$] + ]; + OutputLocation$ = [ + 3, + n0, + _OL, + 0, + [_S_], + [[() => S3Location$, 0]] + ]; + OutputSerialization$ = [ + 3, + n0, + _OSu, + 0, + [_CSV, _JSON], + [() => CSVOutput$, () => JSONOutput$] + ]; + Owner$ = [ + 3, + n0, + _O, + 0, + [_DN, _ID], + [0, 0] + ]; + OwnershipControls$ = [ + 3, + n0, + _OC, + 0, + [_R], + [[() => OwnershipControlsRules, { [_xF]: 1, [_xN]: _Ru }]], + 1 + ]; + OwnershipControlsRule$ = [ + 3, + n0, + _OCR, + 0, + [_OO], + [0], + 1 + ]; + ParquetInput$ = [ + 3, + n0, + _PI, + 0, + [], + [] + ]; + Part$ = [ + 3, + n0, + _Par, + 0, + [_PN, _LM, _ETa, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh], + [1, 4, 0, 1, 0, 0, 0, 0, 0] + ]; + PartitionedPrefix$ = [ + 3, + n0, + _PP, + { [_xN]: _PP }, + [_PDS], + [0] + ]; + PolicyStatus$ = [ + 3, + n0, + _PS, + 0, + [_IP], + [[2, { [_xN]: _IP }]] + ]; + Progress$ = [ + 3, + n0, + _Pr, + 0, + [_BS, _BP, _BRy], + [1, 1, 1] + ]; + ProgressEvent$ = [ + 3, + n0, + _PE, + 0, + [_Det], + [[() => Progress$, { [_eP]: 1 }]] + ]; + PublicAccessBlockConfiguration$ = [ + 3, + n0, + _PABC, + 0, + [_BPA, _IPA, _BPP, _RPB], + [[2, { [_xN]: _BPA }], [2, { [_xN]: _IPA }], [2, { [_xN]: _BPP }], [2, { [_xN]: _RPB }]] + ]; + PutBucketAbacRequest$ = [ + 3, + n0, + _PBAR, + 0, + [_B, _AS, _CMD, _CA, _EBO], + [[0, 1], [() => AbacStatus$, { [_hP]: 1, [_xN]: _AS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketAccelerateConfigurationRequest$ = [ + 3, + n0, + _PBACR, + 0, + [_B, _AC, _EBO, _CA], + [[0, 1], [() => AccelerateConfiguration$, { [_hP]: 1, [_xN]: _AC }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], + 2 + ]; + PutBucketAclRequest$ = [ + 3, + n0, + _PBARu, + 0, + [_B, _ACL_, _ACP, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _EBO], + [[0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xaebo }]], + 1 + ]; + PutBucketAnalyticsConfigurationRequest$ = [ + 3, + n0, + _PBACRu, + 0, + [_B, _I, _ACn, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => AnalyticsConfiguration$, { [_hP]: 1, [_xN]: _ACn }], [0, { [_hH]: _xaebo }]], + 3 + ]; + PutBucketCorsRequest$ = [ + 3, + n0, + _PBCR, + 0, + [_B, _CORSC, _CMD, _CA, _EBO], + [[0, 1], [() => CORSConfiguration$, { [_hP]: 1, [_xN]: _CORSC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketEncryptionRequest$ = [ + 3, + n0, + _PBER, + 0, + [_B, _SSEC, _CMD, _CA, _EBO], + [[0, 1], [() => ServerSideEncryptionConfiguration$, { [_hP]: 1, [_xN]: _SSEC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketIntelligentTieringConfigurationRequest$ = [ + 3, + n0, + _PBITCR, + 0, + [_B, _I, _ITC, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => IntelligentTieringConfiguration$, { [_hP]: 1, [_xN]: _ITC }], [0, { [_hH]: _xaebo }]], + 3 + ]; + PutBucketInventoryConfigurationRequest$ = [ + 3, + n0, + _PBICR, + 0, + [_B, _I, _IC, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => InventoryConfiguration$, { [_hP]: 1, [_xN]: _IC }], [0, { [_hH]: _xaebo }]], + 3 + ]; + PutBucketLifecycleConfigurationOutput$ = [ + 3, + n0, + _PBLCO, + 0, + [_TDMOS], + [[0, { [_hH]: _xatdmos }]] + ]; + PutBucketLifecycleConfigurationRequest$ = [ + 3, + n0, + _PBLCR, + 0, + [_B, _CA, _LCi, _EBO, _TDMOS], + [[0, 1], [0, { [_hH]: _xasca }], [() => BucketLifecycleConfiguration$, { [_hP]: 1, [_xN]: _LCi }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xatdmos }]], + 1 + ]; + PutBucketLoggingRequest$ = [ + 3, + n0, + _PBLR, + 0, + [_B, _BLS, _CMD, _CA, _EBO], + [[0, 1], [() => BucketLoggingStatus$, { [_hP]: 1, [_xN]: _BLS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketMetricsConfigurationRequest$ = [ + 3, + n0, + _PBMCR, + 0, + [_B, _I, _MCe, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => MetricsConfiguration$, { [_hP]: 1, [_xN]: _MCe }], [0, { [_hH]: _xaebo }]], + 3 + ]; + PutBucketNotificationConfigurationRequest$ = [ + 3, + n0, + _PBNCR, + 0, + [_B, _NC, _EBO, _SDV], + [[0, 1], [() => NotificationConfiguration$, { [_hP]: 1, [_xN]: _NC }], [0, { [_hH]: _xaebo }], [2, { [_hH]: _xasdv }]], + 2 + ]; + PutBucketOwnershipControlsRequest$ = [ + 3, + n0, + _PBOCR, + 0, + [_B, _OC, _CMD, _EBO, _CA], + [[0, 1], [() => OwnershipControls$, { [_hP]: 1, [_xN]: _OC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], + 2 + ]; + PutBucketPolicyRequest$ = [ + 3, + n0, + _PBPR, + 0, + [_B, _Po, _CMD, _CA, _CRSBA, _EBO], + [[0, 1], [0, 16], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [2, { [_hH]: _xacrsba }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketReplicationRequest$ = [ + 3, + n0, + _PBRR, + 0, + [_B, _RCe, _CMD, _CA, _To, _EBO], + [[0, 1], [() => ReplicationConfiguration$, { [_hP]: 1, [_xN]: _RCe }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketRequestPaymentRequest$ = [ + 3, + n0, + _PBRPR, + 0, + [_B, _RPC, _CMD, _CA, _EBO], + [[0, 1], [() => RequestPaymentConfiguration$, { [_hP]: 1, [_xN]: _RPC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketTaggingRequest$ = [ + 3, + n0, + _PBTR, + 0, + [_B, _Tag, _CMD, _CA, _EBO], + [[0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketVersioningRequest$ = [ + 3, + n0, + _PBVR, + 0, + [_B, _VC, _CMD, _CA, _MFA, _EBO], + [[0, 1], [() => VersioningConfiguration$, { [_hP]: 1, [_xN]: _VC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketWebsiteRequest$ = [ + 3, + n0, + _PBWR, + 0, + [_B, _WC, _CMD, _CA, _EBO], + [[0, 1], [() => WebsiteConfiguration$, { [_hP]: 1, [_xN]: _WC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutObjectAclOutput$ = [ + 3, + n0, + _POAO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + PutObjectAclRequest$ = [ + 3, + n0, + _POAR, + 0, + [_B, _K, _ACL_, _ACP, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _RP, _VI, _EBO], + [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutObjectLegalHoldOutput$ = [ + 3, + n0, + _POLHO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + PutObjectLegalHoldRequest$ = [ + 3, + n0, + _POLHR, + 0, + [_B, _K, _LH, _RP, _VI, _CMD, _CA, _EBO], + [[0, 1], [0, 1], [() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutObjectLockConfigurationOutput$ = [ + 3, + n0, + _POLCO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + PutObjectLockConfigurationRequest$ = [ + 3, + n0, + _POLCR, + 0, + [_B, _OLC, _RP, _To, _CMD, _CA, _EBO], + [[0, 1], [() => ObjectLockConfiguration$, { [_hP]: 1, [_xN]: _OLC }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 1 + ]; + PutObjectOutput$ = [ + 3, + n0, + _POO, + 0, + [_E, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _SSE, _VI, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _Si, _RC], + [[0, { [_hH]: _xae }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [1, { [_hH]: _xaos }], [0, { [_hH]: _xarc }]] + ]; + PutObjectRequest$ = [ + 3, + n0, + _POR, + 0, + [_B, _K, _ACL_, _Bo, _CC, _CDo, _CEo, _CL, _CLo, _CMD, _CTo, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _Ex, _IM, _INM, _GFC, _GR, _GRACP, _GWACP, _WOB, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO], + [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => StreamingBlob, 16], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [1, { [_hH]: _xawob }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutObjectRetentionOutput$ = [ + 3, + n0, + _PORO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + PutObjectRetentionRequest$ = [ + 3, + n0, + _PORR, + 0, + [_B, _K, _Ret, _RP, _VI, _BGR, _CMD, _CA, _EBO], + [[0, 1], [0, 1], [() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutObjectTaggingOutput$ = [ + 3, + n0, + _POTO, + 0, + [_VI], + [[0, { [_hH]: _xavi }]] + ]; + PutObjectTaggingRequest$ = [ + 3, + n0, + _POTR, + 0, + [_B, _K, _Tag, _VI, _CMD, _CA, _EBO, _RP], + [[0, 1], [0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 3 + ]; + PutPublicAccessBlockRequest$ = [ + 3, + n0, + _PPABR, + 0, + [_B, _PABC, _CMD, _CA, _EBO], + [[0, 1], [() => PublicAccessBlockConfiguration$, { [_hP]: 1, [_xN]: _PABC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + QueueConfiguration$ = [ + 3, + n0, + _QCue, + 0, + [_QA, _Ev, _I, _F], + [[0, { [_xN]: _Qu }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], + 2 + ]; + RecordExpiration$ = [ + 3, + n0, + _REe, + 0, + [_E, _D], + [0, 1], + 1 + ]; + RecordsEvent$ = [ + 3, + n0, + _REec, + 0, + [_Payl], + [[21, { [_eP]: 1 }]] + ]; + Redirect$ = [ + 3, + n0, + _Red, + 0, + [_HN, _HRC, _Pro, _RKPW, _RKW], + [0, 0, 0, 0, 0] + ]; + RedirectAllRequestsTo$ = [ + 3, + n0, + _RART, + 0, + [_HN, _Pro], + [0, 0], + 1 + ]; + RenameObjectOutput$ = [ + 3, + n0, + _ROO, + 0, + [], + [] + ]; + RenameObjectRequest$ = [ + 3, + n0, + _ROR, + 0, + [_B, _K, _RSen, _DIM, _DINM, _DIMS, _DIUS, _SIM, _SINM, _SIMS, _SIUS, _CTl], + [[0, 1], [0, 1], [0, { [_hH]: _xars_ }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IMS_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _xarsim }], [0, { [_hH]: _xarsinm }], [6, { [_hH]: _xarsims }], [6, { [_hH]: _xarsius }], [0, { [_hH]: _xact_, [_iT]: 1 }]], + 3 + ]; + ReplicaModifications$ = [ + 3, + n0, + _RM, + 0, + [_S], + [0], + 1 + ]; + ReplicationConfiguration$ = [ + 3, + n0, + _RCe, + 0, + [_Ro, _R], + [0, [() => ReplicationRules, { [_xF]: 1, [_xN]: _Ru }]], + 2 + ]; + ReplicationRule$ = [ + 3, + n0, + _RRe, + 0, + [_S, _Des, _ID, _Pri, _P, _F, _SSC, _EOR, _DMR], + [0, () => Destination$, 0, 1, 0, [() => ReplicationRuleFilter$, 0], () => SourceSelectionCriteria$, () => ExistingObjectReplication$, () => DeleteMarkerReplication$], + 2 + ]; + ReplicationRuleAndOperator$ = [ + 3, + n0, + _RRAO, + 0, + [_P, _T], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]] + ]; + ReplicationRuleFilter$ = [ + 3, + n0, + _RRF, + 0, + [_P, _Ta, _An], + [0, () => Tag$, [() => ReplicationRuleAndOperator$, 0]] + ]; + ReplicationTime$ = [ + 3, + n0, + _RT, + 0, + [_S, _Tim], + [0, () => ReplicationTimeValue$], + 2 + ]; + ReplicationTimeValue$ = [ + 3, + n0, + _RTV, + 0, + [_Mi], + [1] + ]; + RequestPaymentConfiguration$ = [ + 3, + n0, + _RPC, + 0, + [_Pay], + [0], + 1 + ]; + RequestProgress$ = [ + 3, + n0, + _RPe, + 0, + [_Ena], + [2] + ]; + RestoreObjectOutput$ = [ + 3, + n0, + _ROOe, + 0, + [_RC, _ROP], + [[0, { [_hH]: _xarc }], [0, { [_hH]: _xarop }]] + ]; + RestoreObjectRequest$ = [ + 3, + n0, + _RORe, + 0, + [_B, _K, _VI, _RRes, _RP, _CA, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [() => RestoreRequest$, { [_hP]: 1, [_xN]: _RRes }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + RestoreRequest$ = [ + 3, + n0, + _RRes, + 0, + [_D, _GJP, _Ty, _Ti, _Desc, _SP, _OL], + [1, () => GlacierJobParameters$, 0, 0, 0, () => SelectParameters$, [() => OutputLocation$, 0]] + ]; + RestoreStatus$ = [ + 3, + n0, + _RSe, + 0, + [_IRIP, _RED], + [2, 4] + ]; + RoutingRule$ = [ + 3, + n0, + _RRo, + 0, + [_Red, _Co], + [() => Redirect$, () => Condition$], + 1 + ]; + S3KeyFilter$ = [ + 3, + n0, + _SKF, + 0, + [_FRi], + [[() => FilterRuleList, { [_xF]: 1, [_xN]: _FR }]] + ]; + S3Location$ = [ + 3, + n0, + _SL, + 0, + [_BNu, _P, _En, _CACL, _ACL, _Tag, _UM, _SC], + [0, 0, [() => Encryption$, 0], 0, [() => Grants, 0], [() => Tagging$, 0], [() => UserMetadata, 0], 0], + 2 + ]; + S3TablesDestination$ = [ + 3, + n0, + _STD, + 0, + [_TBA, _TNa], + [0, 0], + 2 + ]; + S3TablesDestinationResult$ = [ + 3, + n0, + _STDR, + 0, + [_TBA, _TNa, _TA, _TN], + [0, 0, 0, 0], + 4 + ]; + ScanRange$ = [ + 3, + n0, + _SR, + 0, + [_St, _End], + [1, 1] + ]; + SelectObjectContentOutput$ = [ + 3, + n0, + _SOCO, + 0, + [_Payl], + [[() => SelectObjectContentEventStream$, 16]] + ]; + SelectObjectContentRequest$ = [ + 3, + n0, + _SOCR, + 0, + [_B, _K, _Exp, _ETx, _IS, _OSu, _SSECA, _SSECK, _SSECKMD, _RPe, _SR, _EBO], + [[0, 1], [0, 1], 0, 0, () => InputSerialization$, () => OutputSerialization$, [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], () => RequestProgress$, () => ScanRange$, [0, { [_hH]: _xaebo }]], + 6 + ]; + SelectParameters$ = [ + 3, + n0, + _SP, + 0, + [_IS, _ETx, _Exp, _OSu], + [() => InputSerialization$, 0, 0, () => OutputSerialization$], + 4 + ]; + ServerSideEncryptionByDefault$ = [ + 3, + n0, + _SSEBD, + 0, + [_SSEA, _KMSMKID], + [0, [() => SSEKMSKeyId, 0]], + 1 + ]; + ServerSideEncryptionConfiguration$ = [ + 3, + n0, + _SSEC, + 0, + [_R], + [[() => ServerSideEncryptionRules, { [_xF]: 1, [_xN]: _Ru }]], + 1 + ]; + ServerSideEncryptionRule$ = [ + 3, + n0, + _SSER, + 0, + [_ASSEBD, _BKE, _BET], + [[() => ServerSideEncryptionByDefault$, 0], 2, [() => BlockedEncryptionTypes$, 0]] + ]; + SessionCredentials$ = [ + 3, + n0, + _SCe, + 0, + [_AKI, _SAK, _ST, _E], + [[0, { [_xN]: _AKI }], [() => SessionCredentialValue, { [_xN]: _SAK }], [() => SessionCredentialValue, { [_xN]: _ST }], [4, { [_xN]: _E }]], + 4 + ]; + SimplePrefix$ = [ + 3, + n0, + _SPi, + { [_xN]: _SPi }, + [], + [] + ]; + SourceSelectionCriteria$ = [ + 3, + n0, + _SSC, + 0, + [_SKEO, _RM], + [() => SseKmsEncryptedObjects$, () => ReplicaModifications$] + ]; + SSEKMS$ = [ + 3, + n0, + _SSEKMS, + { [_xN]: _SK }, + [_KI], + [[() => SSEKMSKeyId, 0]], + 1 + ]; + SseKmsEncryptedObjects$ = [ + 3, + n0, + _SKEO, + 0, + [_S], + [0], + 1 + ]; + SSEKMSEncryption$ = [ + 3, + n0, + _SSEKMSE, + { [_xN]: _SK }, + [_KMSKA, _BKE], + [[() => NonEmptyKmsKeyArnString, 0], 2], + 1 + ]; + SSES3$ = [ + 3, + n0, + _SSES, + { [_xN]: _SS }, + [], + [] + ]; + Stats$ = [ + 3, + n0, + _Sta, + 0, + [_BS, _BP, _BRy], + [1, 1, 1] + ]; + StatsEvent$ = [ + 3, + n0, + _SE, + 0, + [_Det], + [[() => Stats$, { [_eP]: 1 }]] + ]; + StorageClassAnalysis$ = [ + 3, + n0, + _SCA, + 0, + [_DE], + [() => StorageClassAnalysisDataExport$] + ]; + StorageClassAnalysisDataExport$ = [ + 3, + n0, + _SCADE, + 0, + [_OSV, _Des], + [0, () => AnalyticsExportDestination$], + 2 + ]; + Tag$ = [ + 3, + n0, + _Ta, + 0, + [_K, _V], + [0, 0], + 2 + ]; + Tagging$ = [ + 3, + n0, + _Tag, + 0, + [_TS], + [[() => TagSet, 0]], + 1 + ]; + TargetGrant$ = [ + 3, + n0, + _TGa, + 0, + [_Gra, _Pe], + [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0] + ]; + TargetObjectKeyFormat$ = [ + 3, + n0, + _TOKF, + 0, + [_SPi, _PP], + [[() => SimplePrefix$, { [_xN]: _SPi }], [() => PartitionedPrefix$, { [_xN]: _PP }]] + ]; + Tiering$ = [ + 3, + n0, + _Tier, + 0, + [_D, _AT], + [1, 0], + 2 + ]; + TopicConfiguration$ = [ + 3, + n0, + _TCop, + 0, + [_TAo, _Ev, _I, _F], + [[0, { [_xN]: _Top }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], + 2 + ]; + Transition$ = [ + 3, + n0, + _Tra, + 0, + [_Da, _D, _SC], + [5, 1, 0] + ]; + UpdateBucketMetadataInventoryTableConfigurationRequest$ = [ + 3, + n0, + _UBMITCR, + 0, + [_B, _ITCn, _CMD, _CA, _EBO], + [[0, 1], [() => InventoryTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _ITCn }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + UpdateBucketMetadataJournalTableConfigurationRequest$ = [ + 3, + n0, + _UBMJTCR, + 0, + [_B, _JTC, _CMD, _CA, _EBO], + [[0, 1], [() => JournalTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _JTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + UpdateObjectEncryptionRequest$ = [ + 3, + n0, + _UOER, + 0, + [_B, _K, _OE, _VI, _RP, _EBO, _CMD, _CA], + [[0, 1], [0, 1], [() => ObjectEncryption$, 16], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }]], + 3 + ]; + UpdateObjectEncryptionResponse$ = [ + 3, + n0, + _UOERp, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + UploadPartCopyOutput$ = [ + 3, + n0, + _UPCO, + 0, + [_CSVI, _CPR, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC], + [[0, { [_hH]: _xacsvi }], [() => CopyPartResult$, 16], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] + ]; + UploadPartCopyRequest$ = [ + 3, + n0, + _UPCR, + 0, + [_B, _CS, _K, _PN, _UI, _CSIM, _CSIMS, _CSINM, _CSIUS, _CSRo, _SSECA, _SSECK, _SSECKMD, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _EBO, _ESBO], + [[0, 1], [0, { [_hH]: _xacs__ }], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [0, { [_hH]: _xacsr }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], + 5 + ]; + UploadPartOutput$ = [ + 3, + n0, + _UPO, + 0, + [_SSE, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC], + [[0, { [_hH]: _xasse }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] + ]; + UploadPartRequest$ = [ + 3, + n0, + _UPR, + 0, + [_B, _K, _PN, _UI, _Bo, _CLo, _CMD, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _SSECA, _SSECK, _SSECKMD, _RP, _EBO], + [[0, 1], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [() => StreamingBlob, 16], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 4 + ]; + VersioningConfiguration$ = [ + 3, + n0, + _VC, + 0, + [_MFAD, _S], + [[0, { [_xN]: _MDf }], 0] + ]; + WebsiteConfiguration$ = [ + 3, + n0, + _WC, + 0, + [_EDr, _IDn, _RART, _RR], + [() => ErrorDocument$, () => IndexDocument$, () => RedirectAllRequestsTo$, [() => RoutingRules, 0]] + ]; + WriteGetObjectResponseRequest$ = [ + 3, + n0, + _WGORR, + 0, + [_RReq, _RTe, _Bo, _SCt, _ECr, _EM, _AR, _CC, _CDo, _CEo, _CL, _CLo, _CR, _CTo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _DM, _ETa, _Ex, _E, _LM, _MM, _M, _OLM, _OLLHS, _OLRUD, _PC, _RS, _RC, _Re, _SSE, _SSECA, _SSEKMSKI, _SSECKMD, _SC, _TC, _VI, _BKE], + [[0, { [_hL]: 1, [_hH]: _xarr }], [0, { [_hH]: _xart }], [() => StreamingBlob, 16], [1, { [_hH]: _xafs }], [0, { [_hH]: _xafec }], [0, { [_hH]: _xafem }], [0, { [_hH]: _xafhar }], [0, { [_hH]: _xafhCC }], [0, { [_hH]: _xafhCD }], [0, { [_hH]: _xafhCE }], [0, { [_hH]: _xafhCL }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xafhCR }], [0, { [_hH]: _xafhCT }], [0, { [_hH]: _xafhxacc }], [0, { [_hH]: _xafhxacc_ }], [0, { [_hH]: _xafhxacc__ }], [0, { [_hH]: _xafhxacs }], [0, { [_hH]: _xafhxacs_ }], [2, { [_hH]: _xafhxadm }], [0, { [_hH]: _xafhE }], [4, { [_hH]: _xafhE_ }], [0, { [_hH]: _xafhxae }], [4, { [_hH]: _xafhLM }], [1, { [_hH]: _xafhxamm }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xafhxaolm }], [0, { [_hH]: _xafhxaollh }], [5, { [_hH]: _xafhxaolrud }], [1, { [_hH]: _xafhxampc }], [0, { [_hH]: _xafhxars }], [0, { [_hH]: _xafhxarc }], [0, { [_hH]: _xafhxar }], [0, { [_hH]: _xafhxasse }], [0, { [_hH]: _xafhxasseca }], [() => SSEKMSKeyId, { [_hH]: _xafhxasseakki }], [0, { [_hH]: _xafhxasseckM }], [0, { [_hH]: _xafhxasc }], [1, { [_hH]: _xafhxatc }], [0, { [_hH]: _xafhxavi }], [2, { [_hH]: _xafhxassebke }]], + 2 + ]; + __Unit = "unit"; + AllowedHeaders = 64 | 0; + AllowedMethods = 64 | 0; + AllowedOrigins = 64 | 0; + AnalyticsConfigurationList = [ + 1, + n0, + _ACLn, + 0, + [ + () => AnalyticsConfiguration$, + 0 + ] + ]; + Buckets = [ + 1, + n0, + _Bu, + 0, + [ + () => Bucket$, + { [_xN]: _B } + ] + ]; + ChecksumAlgorithmList = 64 | 0; + CommonPrefixList = [ + 1, + n0, + _CPL, + 0, + () => CommonPrefix$ + ]; + CompletedPartList = [ + 1, + n0, + _CPLo, + 0, + () => CompletedPart$ + ]; + CORSRules = [ + 1, + n0, + _CORSR, + 0, + [ + () => CORSRule$, + 0 + ] + ]; + DeletedObjects = [ + 1, + n0, + _DOe, + 0, + () => DeletedObject$ + ]; + DeleteMarkers = [ + 1, + n0, + _DMe, + 0, + () => DeleteMarkerEntry$ + ]; + EncryptionTypeList = [ + 1, + n0, + _ETL, + 0, + [ + 0, + { [_xN]: _ET } + ] + ]; + Errors = [ + 1, + n0, + _Er, + 0, + () => _Error$ + ]; + EventList = 64 | 0; + ExposeHeaders = 64 | 0; + FilterRuleList = [ + 1, + n0, + _FRL, + 0, + () => FilterRule$ + ]; + Grants = [ + 1, + n0, + _G, + 0, + [ + () => Grant$, + { [_xN]: _Gr } + ] + ]; + IntelligentTieringConfigurationList = [ + 1, + n0, + _ITCL, + 0, + [ + () => IntelligentTieringConfiguration$, + 0 + ] + ]; + InventoryConfigurationList = [ + 1, + n0, + _ICL, + 0, + [ + () => InventoryConfiguration$, + 0 + ] + ]; + InventoryOptionalFields = [ + 1, + n0, + _IOF, + 0, + [ + 0, + { [_xN]: _Fi } + ] + ]; + LambdaFunctionConfigurationList = [ + 1, + n0, + _LFCL, + 0, + [ + () => LambdaFunctionConfiguration$, + 0 + ] + ]; + LifecycleRules = [ + 1, + n0, + _LRi, + 0, + [ + () => LifecycleRule$, + 0 + ] + ]; + MetricsConfigurationList = [ + 1, + n0, + _MCL, + 0, + [ + () => MetricsConfiguration$, + 0 + ] + ]; + MultipartUploadList = [ + 1, + n0, + _MUL, + 0, + () => MultipartUpload$ + ]; + NoncurrentVersionTransitionList = [ + 1, + n0, + _NVTL, + 0, + () => NoncurrentVersionTransition$ + ]; + ObjectAttributesList = 64 | 0; + ObjectIdentifierList = [ + 1, + n0, + _OIL, + 0, + () => ObjectIdentifier$ + ]; + ObjectList = [ + 1, + n0, + _OLb, + 0, + [ + () => _Object$, + 0 + ] + ]; + ObjectVersionList = [ + 1, + n0, + _OVL, + 0, + [ + () => ObjectVersion$, + 0 + ] + ]; + OptionalObjectAttributesList = 64 | 0; + OwnershipControlsRules = [ + 1, + n0, + _OCRw, + 0, + () => OwnershipControlsRule$ + ]; + Parts = [ + 1, + n0, + _Pa, + 0, + () => Part$ + ]; + PartsList = [ + 1, + n0, + _PL, + 0, + () => ObjectPart$ + ]; + QueueConfigurationList = [ + 1, + n0, + _QCL, + 0, + [ + () => QueueConfiguration$, + 0 + ] + ]; + ReplicationRules = [ + 1, + n0, + _RRep, + 0, + [ + () => ReplicationRule$, + 0 + ] + ]; + RoutingRules = [ + 1, + n0, + _RR, + 0, + [ + () => RoutingRule$, + { [_xN]: _RRo } + ] + ]; + ServerSideEncryptionRules = [ + 1, + n0, + _SSERe, + 0, + [ + () => ServerSideEncryptionRule$, + 0 + ] + ]; + TagSet = [ + 1, + n0, + _TS, + 0, + [ + () => Tag$, + { [_xN]: _Ta } + ] + ]; + TargetGrants = [ + 1, + n0, + _TG, + 0, + [ + () => TargetGrant$, + { [_xN]: _Gr } + ] + ]; + TieringList = [ + 1, + n0, + _TL, + 0, + () => Tiering$ + ]; + TopicConfigurationList = [ + 1, + n0, + _TCL, + 0, + [ + () => TopicConfiguration$, + 0 + ] + ]; + TransitionList = [ + 1, + n0, + _TLr, + 0, + () => Transition$ + ]; + UserMetadata = [ + 1, + n0, + _UM, + 0, + [ + () => MetadataEntry$, + { [_xN]: _ME } + ] + ]; + Metadata = 128 | 0; + AnalyticsFilter$ = [ + 4, + n0, + _AF, + 0, + [_P, _Ta, _An], + [0, () => Tag$, [() => AnalyticsAndOperator$, 0]] + ]; + MetricsFilter$ = [ + 4, + n0, + _MF, + 0, + [_P, _Ta, _APAc, _An], + [0, () => Tag$, 0, [() => MetricsAndOperator$, 0]] + ]; + ObjectEncryption$ = [ + 4, + n0, + _OE, + 0, + [_SSEKMS], + [[() => SSEKMSEncryption$, { [_xN]: _SK }]] + ]; + SelectObjectContentEventStream$ = [ + 4, + n0, + _SOCES, + { [_st]: 1 }, + [_Rec, _Sta, _Pr, _Cont, _End], + [[() => RecordsEvent$, 0], [() => StatsEvent$, 0], [() => ProgressEvent$, 0], () => ContinuationEvent$, () => EndEvent$] + ]; + AbortMultipartUpload$ = [ + 9, + n0, + _AMU, + { [_h]: ["DELETE", "/{Key+}?x-id=AbortMultipartUpload", 204] }, + () => AbortMultipartUploadRequest$, + () => AbortMultipartUploadOutput$ + ]; + CompleteMultipartUpload$ = [ + 9, + n0, + _CMUo, + { [_h]: ["POST", "/{Key+}", 200] }, + () => CompleteMultipartUploadRequest$, + () => CompleteMultipartUploadOutput$ + ]; + CopyObject$ = [ + 9, + n0, + _CO, + { [_h]: ["PUT", "/{Key+}?x-id=CopyObject", 200] }, + () => CopyObjectRequest$, + () => CopyObjectOutput$ + ]; + CreateBucket$ = [ + 9, + n0, + _CB, + { [_h]: ["PUT", "/", 200] }, + () => CreateBucketRequest$, + () => CreateBucketOutput$ + ]; + CreateBucketMetadataConfiguration$ = [ + 9, + n0, + _CBMC, + { [_hC]: "-", [_h]: ["POST", "/?metadataConfiguration", 200] }, + () => CreateBucketMetadataConfigurationRequest$, + () => __Unit + ]; + CreateBucketMetadataTableConfiguration$ = [ + 9, + n0, + _CBMTC, + { [_hC]: "-", [_h]: ["POST", "/?metadataTable", 200] }, + () => CreateBucketMetadataTableConfigurationRequest$, + () => __Unit + ]; + CreateMultipartUpload$ = [ + 9, + n0, + _CMUr, + { [_h]: ["POST", "/{Key+}?uploads", 200] }, + () => CreateMultipartUploadRequest$, + () => CreateMultipartUploadOutput$ + ]; + CreateSession$ = [ + 9, + n0, + _CSr, + { [_h]: ["GET", "/?session", 200] }, + () => CreateSessionRequest$, + () => CreateSessionOutput$ + ]; + DeleteBucket$ = [ + 9, + n0, + _DB, + { [_h]: ["DELETE", "/", 204] }, + () => DeleteBucketRequest$, + () => __Unit + ]; + DeleteBucketAnalyticsConfiguration$ = [ + 9, + n0, + _DBAC, + { [_h]: ["DELETE", "/?analytics", 204] }, + () => DeleteBucketAnalyticsConfigurationRequest$, + () => __Unit + ]; + DeleteBucketCors$ = [ + 9, + n0, + _DBC, + { [_h]: ["DELETE", "/?cors", 204] }, + () => DeleteBucketCorsRequest$, + () => __Unit + ]; + DeleteBucketEncryption$ = [ + 9, + n0, + _DBE, + { [_h]: ["DELETE", "/?encryption", 204] }, + () => DeleteBucketEncryptionRequest$, + () => __Unit + ]; + DeleteBucketIntelligentTieringConfiguration$ = [ + 9, + n0, + _DBITC, + { [_h]: ["DELETE", "/?intelligent-tiering", 204] }, + () => DeleteBucketIntelligentTieringConfigurationRequest$, + () => __Unit + ]; + DeleteBucketInventoryConfiguration$ = [ + 9, + n0, + _DBIC, + { [_h]: ["DELETE", "/?inventory", 204] }, + () => DeleteBucketInventoryConfigurationRequest$, + () => __Unit + ]; + DeleteBucketLifecycle$ = [ + 9, + n0, + _DBL, + { [_h]: ["DELETE", "/?lifecycle", 204] }, + () => DeleteBucketLifecycleRequest$, + () => __Unit + ]; + DeleteBucketMetadataConfiguration$ = [ + 9, + n0, + _DBMC, + { [_h]: ["DELETE", "/?metadataConfiguration", 204] }, + () => DeleteBucketMetadataConfigurationRequest$, + () => __Unit + ]; + DeleteBucketMetadataTableConfiguration$ = [ + 9, + n0, + _DBMTC, + { [_h]: ["DELETE", "/?metadataTable", 204] }, + () => DeleteBucketMetadataTableConfigurationRequest$, + () => __Unit + ]; + DeleteBucketMetricsConfiguration$ = [ + 9, + n0, + _DBMCe, + { [_h]: ["DELETE", "/?metrics", 204] }, + () => DeleteBucketMetricsConfigurationRequest$, + () => __Unit + ]; + DeleteBucketOwnershipControls$ = [ + 9, + n0, + _DBOC, + { [_h]: ["DELETE", "/?ownershipControls", 204] }, + () => DeleteBucketOwnershipControlsRequest$, + () => __Unit + ]; + DeleteBucketPolicy$ = [ + 9, + n0, + _DBP, + { [_h]: ["DELETE", "/?policy", 204] }, + () => DeleteBucketPolicyRequest$, + () => __Unit + ]; + DeleteBucketReplication$ = [ + 9, + n0, + _DBRe, + { [_h]: ["DELETE", "/?replication", 204] }, + () => DeleteBucketReplicationRequest$, + () => __Unit + ]; + DeleteBucketTagging$ = [ + 9, + n0, + _DBT, + { [_h]: ["DELETE", "/?tagging", 204] }, + () => DeleteBucketTaggingRequest$, + () => __Unit + ]; + DeleteBucketWebsite$ = [ + 9, + n0, + _DBW, + { [_h]: ["DELETE", "/?website", 204] }, + () => DeleteBucketWebsiteRequest$, + () => __Unit + ]; + DeleteObject$ = [ + 9, + n0, + _DOel, + { [_h]: ["DELETE", "/{Key+}?x-id=DeleteObject", 204] }, + () => DeleteObjectRequest$, + () => DeleteObjectOutput$ + ]; + DeleteObjects$ = [ + 9, + n0, + _DOele, + { [_hC]: "-", [_h]: ["POST", "/?delete", 200] }, + () => DeleteObjectsRequest$, + () => DeleteObjectsOutput$ + ]; + DeleteObjectTagging$ = [ + 9, + n0, + _DOT, + { [_h]: ["DELETE", "/{Key+}?tagging", 204] }, + () => DeleteObjectTaggingRequest$, + () => DeleteObjectTaggingOutput$ + ]; + DeletePublicAccessBlock$ = [ + 9, + n0, + _DPAB, + { [_h]: ["DELETE", "/?publicAccessBlock", 204] }, + () => DeletePublicAccessBlockRequest$, + () => __Unit + ]; + GetBucketAbac$ = [ + 9, + n0, + _GBA, + { [_h]: ["GET", "/?abac", 200] }, + () => GetBucketAbacRequest$, + () => GetBucketAbacOutput$ + ]; + GetBucketAccelerateConfiguration$ = [ + 9, + n0, + _GBAC, + { [_h]: ["GET", "/?accelerate", 200] }, + () => GetBucketAccelerateConfigurationRequest$, + () => GetBucketAccelerateConfigurationOutput$ + ]; + GetBucketAcl$ = [ + 9, + n0, + _GBAe, + { [_h]: ["GET", "/?acl", 200] }, + () => GetBucketAclRequest$, + () => GetBucketAclOutput$ + ]; + GetBucketAnalyticsConfiguration$ = [ + 9, + n0, + _GBACe, + { [_h]: ["GET", "/?analytics&x-id=GetBucketAnalyticsConfiguration", 200] }, + () => GetBucketAnalyticsConfigurationRequest$, + () => GetBucketAnalyticsConfigurationOutput$ + ]; + GetBucketCors$ = [ + 9, + n0, + _GBC, + { [_h]: ["GET", "/?cors", 200] }, + () => GetBucketCorsRequest$, + () => GetBucketCorsOutput$ + ]; + GetBucketEncryption$ = [ + 9, + n0, + _GBE, + { [_h]: ["GET", "/?encryption", 200] }, + () => GetBucketEncryptionRequest$, + () => GetBucketEncryptionOutput$ + ]; + GetBucketIntelligentTieringConfiguration$ = [ + 9, + n0, + _GBITC, + { [_h]: ["GET", "/?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", 200] }, + () => GetBucketIntelligentTieringConfigurationRequest$, + () => GetBucketIntelligentTieringConfigurationOutput$ + ]; + GetBucketInventoryConfiguration$ = [ + 9, + n0, + _GBIC, + { [_h]: ["GET", "/?inventory&x-id=GetBucketInventoryConfiguration", 200] }, + () => GetBucketInventoryConfigurationRequest$, + () => GetBucketInventoryConfigurationOutput$ + ]; + GetBucketLifecycleConfiguration$ = [ + 9, + n0, + _GBLC, + { [_h]: ["GET", "/?lifecycle", 200] }, + () => GetBucketLifecycleConfigurationRequest$, + () => GetBucketLifecycleConfigurationOutput$ + ]; + GetBucketLocation$ = [ + 9, + n0, + _GBL, + { [_h]: ["GET", "/?location", 200] }, + () => GetBucketLocationRequest$, + () => GetBucketLocationOutput$ + ]; + GetBucketLogging$ = [ + 9, + n0, + _GBLe, + { [_h]: ["GET", "/?logging", 200] }, + () => GetBucketLoggingRequest$, + () => GetBucketLoggingOutput$ + ]; + GetBucketMetadataConfiguration$ = [ + 9, + n0, + _GBMC, + { [_h]: ["GET", "/?metadataConfiguration", 200] }, + () => GetBucketMetadataConfigurationRequest$, + () => GetBucketMetadataConfigurationOutput$ + ]; + GetBucketMetadataTableConfiguration$ = [ + 9, + n0, + _GBMTC, + { [_h]: ["GET", "/?metadataTable", 200] }, + () => GetBucketMetadataTableConfigurationRequest$, + () => GetBucketMetadataTableConfigurationOutput$ + ]; + GetBucketMetricsConfiguration$ = [ + 9, + n0, + _GBMCe, + { [_h]: ["GET", "/?metrics&x-id=GetBucketMetricsConfiguration", 200] }, + () => GetBucketMetricsConfigurationRequest$, + () => GetBucketMetricsConfigurationOutput$ + ]; + GetBucketNotificationConfiguration$ = [ + 9, + n0, + _GBNC, + { [_h]: ["GET", "/?notification", 200] }, + () => GetBucketNotificationConfigurationRequest$, + () => NotificationConfiguration$ + ]; + GetBucketOwnershipControls$ = [ + 9, + n0, + _GBOC, + { [_h]: ["GET", "/?ownershipControls", 200] }, + () => GetBucketOwnershipControlsRequest$, + () => GetBucketOwnershipControlsOutput$ + ]; + GetBucketPolicy$ = [ + 9, + n0, + _GBP, + { [_h]: ["GET", "/?policy", 200] }, + () => GetBucketPolicyRequest$, + () => GetBucketPolicyOutput$ + ]; + GetBucketPolicyStatus$ = [ + 9, + n0, + _GBPS, + { [_h]: ["GET", "/?policyStatus", 200] }, + () => GetBucketPolicyStatusRequest$, + () => GetBucketPolicyStatusOutput$ + ]; + GetBucketReplication$ = [ + 9, + n0, + _GBR, + { [_h]: ["GET", "/?replication", 200] }, + () => GetBucketReplicationRequest$, + () => GetBucketReplicationOutput$ + ]; + GetBucketRequestPayment$ = [ + 9, + n0, + _GBRP, + { [_h]: ["GET", "/?requestPayment", 200] }, + () => GetBucketRequestPaymentRequest$, + () => GetBucketRequestPaymentOutput$ + ]; + GetBucketTagging$ = [ + 9, + n0, + _GBT, + { [_h]: ["GET", "/?tagging", 200] }, + () => GetBucketTaggingRequest$, + () => GetBucketTaggingOutput$ + ]; + GetBucketVersioning$ = [ + 9, + n0, + _GBV, + { [_h]: ["GET", "/?versioning", 200] }, + () => GetBucketVersioningRequest$, + () => GetBucketVersioningOutput$ + ]; + GetBucketWebsite$ = [ + 9, + n0, + _GBW, + { [_h]: ["GET", "/?website", 200] }, + () => GetBucketWebsiteRequest$, + () => GetBucketWebsiteOutput$ + ]; + GetObject$ = [ + 9, + n0, + _GO, + { [_hC]: "-", [_h]: ["GET", "/{Key+}?x-id=GetObject", 200] }, + () => GetObjectRequest$, + () => GetObjectOutput$ + ]; + GetObjectAcl$ = [ + 9, + n0, + _GOA, + { [_h]: ["GET", "/{Key+}?acl", 200] }, + () => GetObjectAclRequest$, + () => GetObjectAclOutput$ + ]; + GetObjectAttributes$ = [ + 9, + n0, + _GOAe, + { [_h]: ["GET", "/{Key+}?attributes", 200] }, + () => GetObjectAttributesRequest$, + () => GetObjectAttributesOutput$ + ]; + GetObjectLegalHold$ = [ + 9, + n0, + _GOLH, + { [_h]: ["GET", "/{Key+}?legal-hold", 200] }, + () => GetObjectLegalHoldRequest$, + () => GetObjectLegalHoldOutput$ + ]; + GetObjectLockConfiguration$ = [ + 9, + n0, + _GOLC, + { [_h]: ["GET", "/?object-lock", 200] }, + () => GetObjectLockConfigurationRequest$, + () => GetObjectLockConfigurationOutput$ + ]; + GetObjectRetention$ = [ + 9, + n0, + _GORe, + { [_h]: ["GET", "/{Key+}?retention", 200] }, + () => GetObjectRetentionRequest$, + () => GetObjectRetentionOutput$ + ]; + GetObjectTagging$ = [ + 9, + n0, + _GOT, + { [_h]: ["GET", "/{Key+}?tagging", 200] }, + () => GetObjectTaggingRequest$, + () => GetObjectTaggingOutput$ + ]; + GetObjectTorrent$ = [ + 9, + n0, + _GOTe, + { [_h]: ["GET", "/{Key+}?torrent", 200] }, + () => GetObjectTorrentRequest$, + () => GetObjectTorrentOutput$ + ]; + GetPublicAccessBlock$ = [ + 9, + n0, + _GPAB, + { [_h]: ["GET", "/?publicAccessBlock", 200] }, + () => GetPublicAccessBlockRequest$, + () => GetPublicAccessBlockOutput$ + ]; + HeadBucket$ = [ + 9, + n0, + _HB, + { [_h]: ["HEAD", "/", 200] }, + () => HeadBucketRequest$, + () => HeadBucketOutput$ + ]; + HeadObject$ = [ + 9, + n0, + _HO, + { [_h]: ["HEAD", "/{Key+}", 200] }, + () => HeadObjectRequest$, + () => HeadObjectOutput$ + ]; + ListBucketAnalyticsConfigurations$ = [ + 9, + n0, + _LBAC, + { [_h]: ["GET", "/?analytics&x-id=ListBucketAnalyticsConfigurations", 200] }, + () => ListBucketAnalyticsConfigurationsRequest$, + () => ListBucketAnalyticsConfigurationsOutput$ + ]; + ListBucketIntelligentTieringConfigurations$ = [ + 9, + n0, + _LBITC, + { [_h]: ["GET", "/?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", 200] }, + () => ListBucketIntelligentTieringConfigurationsRequest$, + () => ListBucketIntelligentTieringConfigurationsOutput$ + ]; + ListBucketInventoryConfigurations$ = [ + 9, + n0, + _LBIC, + { [_h]: ["GET", "/?inventory&x-id=ListBucketInventoryConfigurations", 200] }, + () => ListBucketInventoryConfigurationsRequest$, + () => ListBucketInventoryConfigurationsOutput$ + ]; + ListBucketMetricsConfigurations$ = [ + 9, + n0, + _LBMC, + { [_h]: ["GET", "/?metrics&x-id=ListBucketMetricsConfigurations", 200] }, + () => ListBucketMetricsConfigurationsRequest$, + () => ListBucketMetricsConfigurationsOutput$ + ]; + ListBuckets$ = [ + 9, + n0, + _LB, + { [_h]: ["GET", "/?x-id=ListBuckets", 200] }, + () => ListBucketsRequest$, + () => ListBucketsOutput$ + ]; + ListDirectoryBuckets$ = [ + 9, + n0, + _LDB, + { [_h]: ["GET", "/?x-id=ListDirectoryBuckets", 200] }, + () => ListDirectoryBucketsRequest$, + () => ListDirectoryBucketsOutput$ + ]; + ListMultipartUploads$ = [ + 9, + n0, + _LMU, + { [_h]: ["GET", "/?uploads", 200] }, + () => ListMultipartUploadsRequest$, + () => ListMultipartUploadsOutput$ + ]; + ListObjects$ = [ + 9, + n0, + _LO, + { [_h]: ["GET", "/", 200] }, + () => ListObjectsRequest$, + () => ListObjectsOutput$ + ]; + ListObjectsV2$ = [ + 9, + n0, + _LOV, + { [_h]: ["GET", "/?list-type=2", 200] }, + () => ListObjectsV2Request$, + () => ListObjectsV2Output$ + ]; + ListObjectVersions$ = [ + 9, + n0, + _LOVi, + { [_h]: ["GET", "/?versions", 200] }, + () => ListObjectVersionsRequest$, + () => ListObjectVersionsOutput$ + ]; + ListParts$ = [ + 9, + n0, + _LP, + { [_h]: ["GET", "/{Key+}?x-id=ListParts", 200] }, + () => ListPartsRequest$, + () => ListPartsOutput$ + ]; + PutBucketAbac$ = [ + 9, + n0, + _PBA, + { [_hC]: "-", [_h]: ["PUT", "/?abac", 200] }, + () => PutBucketAbacRequest$, + () => __Unit + ]; + PutBucketAccelerateConfiguration$ = [ + 9, + n0, + _PBAC, + { [_hC]: "-", [_h]: ["PUT", "/?accelerate", 200] }, + () => PutBucketAccelerateConfigurationRequest$, + () => __Unit + ]; + PutBucketAcl$ = [ + 9, + n0, + _PBAu, + { [_hC]: "-", [_h]: ["PUT", "/?acl", 200] }, + () => PutBucketAclRequest$, + () => __Unit + ]; + PutBucketAnalyticsConfiguration$ = [ + 9, + n0, + _PBACu, + { [_h]: ["PUT", "/?analytics", 200] }, + () => PutBucketAnalyticsConfigurationRequest$, + () => __Unit + ]; + PutBucketCors$ = [ + 9, + n0, + _PBC, + { [_hC]: "-", [_h]: ["PUT", "/?cors", 200] }, + () => PutBucketCorsRequest$, + () => __Unit + ]; + PutBucketEncryption$ = [ + 9, + n0, + _PBE, + { [_hC]: "-", [_h]: ["PUT", "/?encryption", 200] }, + () => PutBucketEncryptionRequest$, + () => __Unit + ]; + PutBucketIntelligentTieringConfiguration$ = [ + 9, + n0, + _PBITC, + { [_h]: ["PUT", "/?intelligent-tiering", 200] }, + () => PutBucketIntelligentTieringConfigurationRequest$, + () => __Unit + ]; + PutBucketInventoryConfiguration$ = [ + 9, + n0, + _PBIC, + { [_h]: ["PUT", "/?inventory", 200] }, + () => PutBucketInventoryConfigurationRequest$, + () => __Unit + ]; + PutBucketLifecycleConfiguration$ = [ + 9, + n0, + _PBLC, + { [_hC]: "-", [_h]: ["PUT", "/?lifecycle", 200] }, + () => PutBucketLifecycleConfigurationRequest$, + () => PutBucketLifecycleConfigurationOutput$ + ]; + PutBucketLogging$ = [ + 9, + n0, + _PBL, + { [_hC]: "-", [_h]: ["PUT", "/?logging", 200] }, + () => PutBucketLoggingRequest$, + () => __Unit + ]; + PutBucketMetricsConfiguration$ = [ + 9, + n0, + _PBMC, + { [_h]: ["PUT", "/?metrics", 200] }, + () => PutBucketMetricsConfigurationRequest$, + () => __Unit + ]; + PutBucketNotificationConfiguration$ = [ + 9, + n0, + _PBNC, + { [_h]: ["PUT", "/?notification", 200] }, + () => PutBucketNotificationConfigurationRequest$, + () => __Unit + ]; + PutBucketOwnershipControls$ = [ + 9, + n0, + _PBOC, + { [_hC]: "-", [_h]: ["PUT", "/?ownershipControls", 200] }, + () => PutBucketOwnershipControlsRequest$, + () => __Unit + ]; + PutBucketPolicy$ = [ + 9, + n0, + _PBP, + { [_hC]: "-", [_h]: ["PUT", "/?policy", 200] }, + () => PutBucketPolicyRequest$, + () => __Unit + ]; + PutBucketReplication$ = [ + 9, + n0, + _PBR, + { [_hC]: "-", [_h]: ["PUT", "/?replication", 200] }, + () => PutBucketReplicationRequest$, + () => __Unit + ]; + PutBucketRequestPayment$ = [ + 9, + n0, + _PBRP, + { [_hC]: "-", [_h]: ["PUT", "/?requestPayment", 200] }, + () => PutBucketRequestPaymentRequest$, + () => __Unit + ]; + PutBucketTagging$ = [ + 9, + n0, + _PBT, + { [_hC]: "-", [_h]: ["PUT", "/?tagging", 200] }, + () => PutBucketTaggingRequest$, + () => __Unit + ]; + PutBucketVersioning$ = [ + 9, + n0, + _PBV, + { [_hC]: "-", [_h]: ["PUT", "/?versioning", 200] }, + () => PutBucketVersioningRequest$, + () => __Unit + ]; + PutBucketWebsite$ = [ + 9, + n0, + _PBW, + { [_hC]: "-", [_h]: ["PUT", "/?website", 200] }, + () => PutBucketWebsiteRequest$, + () => __Unit + ]; + PutObject$ = [ + 9, + n0, + _PO, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?x-id=PutObject", 200] }, + () => PutObjectRequest$, + () => PutObjectOutput$ + ]; + PutObjectAcl$ = [ + 9, + n0, + _POA, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?acl", 200] }, + () => PutObjectAclRequest$, + () => PutObjectAclOutput$ + ]; + PutObjectLegalHold$ = [ + 9, + n0, + _POLH, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?legal-hold", 200] }, + () => PutObjectLegalHoldRequest$, + () => PutObjectLegalHoldOutput$ + ]; + PutObjectLockConfiguration$ = [ + 9, + n0, + _POLC, + { [_hC]: "-", [_h]: ["PUT", "/?object-lock", 200] }, + () => PutObjectLockConfigurationRequest$, + () => PutObjectLockConfigurationOutput$ + ]; + PutObjectRetention$ = [ + 9, + n0, + _PORu, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?retention", 200] }, + () => PutObjectRetentionRequest$, + () => PutObjectRetentionOutput$ + ]; + PutObjectTagging$ = [ + 9, + n0, + _POT, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?tagging", 200] }, + () => PutObjectTaggingRequest$, + () => PutObjectTaggingOutput$ + ]; + PutPublicAccessBlock$ = [ + 9, + n0, + _PPAB, + { [_hC]: "-", [_h]: ["PUT", "/?publicAccessBlock", 200] }, + () => PutPublicAccessBlockRequest$, + () => __Unit + ]; + RenameObject$ = [ + 9, + n0, + _RO, + { [_h]: ["PUT", "/{Key+}?renameObject", 200] }, + () => RenameObjectRequest$, + () => RenameObjectOutput$ + ]; + RestoreObject$ = [ + 9, + n0, + _ROe, + { [_hC]: "-", [_h]: ["POST", "/{Key+}?restore", 200] }, + () => RestoreObjectRequest$, + () => RestoreObjectOutput$ + ]; + SelectObjectContent$ = [ + 9, + n0, + _SOC, + { [_h]: ["POST", "/{Key+}?select&select-type=2", 200] }, + () => SelectObjectContentRequest$, + () => SelectObjectContentOutput$ + ]; + UpdateBucketMetadataInventoryTableConfiguration$ = [ + 9, + n0, + _UBMITC, + { [_hC]: "-", [_h]: ["PUT", "/?metadataInventoryTable", 200] }, + () => UpdateBucketMetadataInventoryTableConfigurationRequest$, + () => __Unit + ]; + UpdateBucketMetadataJournalTableConfiguration$ = [ + 9, + n0, + _UBMJTC, + { [_hC]: "-", [_h]: ["PUT", "/?metadataJournalTable", 200] }, + () => UpdateBucketMetadataJournalTableConfigurationRequest$, + () => __Unit + ]; + UpdateObjectEncryption$ = [ + 9, + n0, + _UOE, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?encryption", 200] }, + () => UpdateObjectEncryptionRequest$, + () => UpdateObjectEncryptionResponse$ + ]; + UploadPart$ = [ + 9, + n0, + _UP, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?x-id=UploadPart", 200] }, + () => UploadPartRequest$, + () => UploadPartOutput$ + ]; + UploadPartCopy$ = [ + 9, + n0, + _UPC, + { [_h]: ["PUT", "/{Key+}?x-id=UploadPartCopy", 200] }, + () => UploadPartCopyRequest$, + () => UploadPartCopyOutput$ + ]; + WriteGetObjectResponse$ = [ + 9, + n0, + _WGOR, + { [_en]: ["{RequestRoute}."], [_h]: ["POST", "/WriteGetObjectResponse", 200] }, + () => WriteGetObjectResponseRequest$, + () => __Unit + ]; + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateSessionCommand.js +var CreateSessionCommand; +var init_CreateSessionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateSessionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CreateSessionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "CreateSession", {}).n("S3Client", "CreateSessionCommand").sc(CreateSession$).build() { + }; + __name(CreateSessionCommand, "CreateSessionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/package.json +var package_default; +var init_package = __esm({ + "../../node_modules/@aws-sdk/client-s3/package.json"() { + package_default = { + name: "@aws-sdk/client-s3", + description: "AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native", + version: "3.1009.0", + scripts: { + build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs", + "build:cjs": "node ../../scripts/compilation/inline client-s3", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"', + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo s3", + test: "yarn g:vitest run", + "test:browser": "node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.mts", + "test:browser:watch": "node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.mts", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts && yarn test:browser", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", + "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs", + "test:integration": "yarn g:vitest run -c vitest.config.integ.mts", + "test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts", + "test:watch": "yarn g:vitest watch" + }, + main: "./dist-cjs/index.js", + types: "./dist-types/index.d.ts", + module: "./dist-es/index.js", + sideEffects: false, + dependencies: { + "@aws-crypto/sha1-browser": "5.2.0", + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "^3.973.20", + "@aws-sdk/credential-provider-node": "^3.972.21", + "@aws-sdk/middleware-bucket-endpoint": "^3.972.8", + "@aws-sdk/middleware-expect-continue": "^3.972.8", + "@aws-sdk/middleware-flexible-checksums": "^3.973.6", + "@aws-sdk/middleware-host-header": "^3.972.8", + "@aws-sdk/middleware-location-constraint": "^3.972.8", + "@aws-sdk/middleware-logger": "^3.972.8", + "@aws-sdk/middleware-recursion-detection": "^3.972.8", + "@aws-sdk/middleware-sdk-s3": "^3.972.20", + "@aws-sdk/middleware-ssec": "^3.972.8", + "@aws-sdk/middleware-user-agent": "^3.972.21", + "@aws-sdk/region-config-resolver": "^3.972.8", + "@aws-sdk/signature-v4-multi-region": "^3.996.8", + "@aws-sdk/types": "^3.973.6", + "@aws-sdk/util-endpoints": "^3.996.5", + "@aws-sdk/util-user-agent-browser": "^3.972.8", + "@aws-sdk/util-user-agent-node": "^3.973.7", + "@smithy/config-resolver": "^4.4.11", + "@smithy/core": "^3.23.11", + "@smithy/eventstream-serde-browser": "^4.2.12", + "@smithy/eventstream-serde-config-resolver": "^4.3.12", + "@smithy/eventstream-serde-node": "^4.2.12", + "@smithy/fetch-http-handler": "^5.3.15", + "@smithy/hash-blob-browser": "^4.2.13", + "@smithy/hash-node": "^4.2.12", + "@smithy/hash-stream-node": "^4.2.12", + "@smithy/invalid-dependency": "^4.2.12", + "@smithy/md5-js": "^4.2.12", + "@smithy/middleware-content-length": "^4.2.12", + "@smithy/middleware-endpoint": "^4.4.25", + "@smithy/middleware-retry": "^4.4.42", + "@smithy/middleware-serde": "^4.2.14", + "@smithy/middleware-stack": "^4.2.12", + "@smithy/node-config-provider": "^4.3.12", + "@smithy/node-http-handler": "^4.4.16", + "@smithy/protocol-http": "^5.3.12", + "@smithy/smithy-client": "^4.12.5", + "@smithy/types": "^4.13.1", + "@smithy/url-parser": "^4.2.12", + "@smithy/util-base64": "^4.3.2", + "@smithy/util-body-length-browser": "^4.2.2", + "@smithy/util-body-length-node": "^4.2.3", + "@smithy/util-defaults-mode-browser": "^4.3.41", + "@smithy/util-defaults-mode-node": "^4.2.44", + "@smithy/util-endpoints": "^3.3.3", + "@smithy/util-middleware": "^4.2.12", + "@smithy/util-retry": "^4.2.12", + "@smithy/util-stream": "^4.5.19", + "@smithy/util-utf8": "^4.2.2", + "@smithy/util-waiter": "^4.2.13", + tslib: "^2.6.2" + }, + devDependencies: { + "@aws-sdk/signature-v4-crt": "3.1009.0", + "@smithy/snapshot-testing": "^2.0.2", + "@tsconfig/node20": "20.1.8", + "@types/node": "^20.14.8", + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + premove: "4.0.0", + typescript: "~5.8.3", + vitest: "^4.0.17" + }, + engines: { + node: ">=20.0.0" + }, + typesVersions: { + "<4.5": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + files: [ + "dist-*/**" + ], + author: { + name: "AWS SDK for JavaScript Team", + url: "https://aws.amazon.com/javascript/" + }, + license: "Apache-2.0", + browser: { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "clients/client-s3" + } + }; + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js +var fromUtf84; +var init_fromUtf8_browser3 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fromUtf84 = /* @__PURE__ */ __name((input) => new TextEncoder().encode(input), "fromUtf8"); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js +var init_toUint8Array3 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser3(); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +var init_toUtf8_browser3 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/index.js +var init_dist_es44 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser3(); + init_toUint8Array3(); + init_toUtf8_browser3(); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/build/module/isEmptyData.js +function isEmptyData2(data) { + if (typeof data === "string") { + return data.length === 0; + } + return data.byteLength === 0; +} +var init_isEmptyData2 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/build/module/isEmptyData.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(isEmptyData2, "isEmptyData"); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/build/module/constants.js +var SHA_1_HASH, SHA_1_HMAC_ALGO, EMPTY_DATA_SHA_1; +var init_constants10 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/build/module/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SHA_1_HASH = { name: "SHA-1" }; + SHA_1_HMAC_ALGO = { + name: "HMAC", + hash: SHA_1_HASH + }; + EMPTY_DATA_SHA_1 = new Uint8Array([ + 218, + 57, + 163, + 238, + 94, + 107, + 75, + 13, + 50, + 85, + 191, + 239, + 149, + 96, + 24, + 144, + 175, + 216, + 7, + 9 + ]); + } +}); + +// ../../node_modules/@aws-sdk/util-locate-window/dist-es/index.js +function locateWindow() { + if (typeof window !== "undefined") { + return window; + } else if (typeof self !== "undefined") { + return self; + } + return fallbackWindow; +} +var fallbackWindow; +var init_dist_es45 = __esm({ + "../../node_modules/@aws-sdk/util-locate-window/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fallbackWindow = {}; + __name(locateWindow, "locateWindow"); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/build/module/webCryptoSha1.js +function convertToBuffer2(data) { + if (typeof data === "string") { + return fromUtf84(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); +} +var Sha1; +var init_webCryptoSha1 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/build/module/webCryptoSha1.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es44(); + init_isEmptyData2(); + init_constants10(); + init_dist_es45(); + Sha1 = /** @class */ + function() { + function Sha13(secret) { + this.toHash = new Uint8Array(0); + if (secret !== void 0) { + this.key = new Promise(function(resolve, reject) { + locateWindow().crypto.subtle.importKey("raw", convertToBuffer2(secret), SHA_1_HMAC_ALGO, false, ["sign"]).then(resolve, reject); + }); + this.key.catch(function() { + }); + } + } + __name(Sha13, "Sha1"); + Sha13.prototype.update = function(data) { + if (isEmptyData2(data)) { + return; + } + var update = convertToBuffer2(data); + var typedArray = new Uint8Array(this.toHash.byteLength + update.byteLength); + typedArray.set(this.toHash, 0); + typedArray.set(update, this.toHash.byteLength); + this.toHash = typedArray; + }; + Sha13.prototype.digest = function() { + var _this = this; + if (this.key) { + return this.key.then(function(key) { + return locateWindow().crypto.subtle.sign(SHA_1_HMAC_ALGO, key, _this.toHash).then(function(data) { + return new Uint8Array(data); + }); + }); + } + if (isEmptyData2(this.toHash)) { + return Promise.resolve(EMPTY_DATA_SHA_1); + } + return Promise.resolve().then(function() { + return locateWindow().crypto.subtle.digest(SHA_1_HASH, _this.toHash); + }).then(function(data) { + return Promise.resolve(new Uint8Array(data)); + }); + }; + Sha13.prototype.reset = function() { + this.toHash = new Uint8Array(0); + }; + return Sha13; + }(); + __name(convertToBuffer2, "convertToBuffer"); + } +}); + +// ../../node_modules/@aws-crypto/supports-web-crypto/build/module/supportsWebCrypto.js +function supportsWebCrypto(window2) { + if (supportsSecureRandom(window2) && typeof window2.crypto.subtle === "object") { + var subtle3 = window2.crypto.subtle; + return supportsSubtleCrypto(subtle3); + } + return false; +} +function supportsSecureRandom(window2) { + if (typeof window2 === "object" && typeof window2.crypto === "object") { + var getRandomValues2 = window2.crypto.getRandomValues; + return typeof getRandomValues2 === "function"; + } + return false; +} +function supportsSubtleCrypto(subtle3) { + return subtle3 && subtleCryptoMethods.every(function(methodName) { + return typeof subtle3[methodName] === "function"; + }); +} +var subtleCryptoMethods; +var init_supportsWebCrypto = __esm({ + "../../node_modules/@aws-crypto/supports-web-crypto/build/module/supportsWebCrypto.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + subtleCryptoMethods = [ + "decrypt", + "digest", + "encrypt", + "exportKey", + "generateKey", + "importKey", + "sign", + "verify" + ]; + __name(supportsWebCrypto, "supportsWebCrypto"); + __name(supportsSecureRandom, "supportsSecureRandom"); + __name(supportsSubtleCrypto, "supportsSubtleCrypto"); + } +}); + +// ../../node_modules/@aws-crypto/supports-web-crypto/build/module/index.js +var init_module4 = __esm({ + "../../node_modules/@aws-crypto/supports-web-crypto/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_supportsWebCrypto(); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/build/module/crossPlatformSha1.js +var Sha12; +var init_crossPlatformSha1 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/build/module/crossPlatformSha1.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_webCryptoSha1(); + init_module4(); + init_dist_es45(); + init_module(); + Sha12 = /** @class */ + function() { + function Sha13(secret) { + if (supportsWebCrypto(locateWindow())) { + this.hash = new Sha1(secret); + } else { + throw new Error("SHA1 not supported"); + } + } + __name(Sha13, "Sha1"); + Sha13.prototype.update = function(data, encoding) { + this.hash.update(convertToBuffer(data)); + }; + Sha13.prototype.digest = function() { + return this.hash.digest(); + }; + Sha13.prototype.reset = function() { + this.hash.reset(); + }; + return Sha13; + }(); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/build/module/index.js +var init_module5 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_crossPlatformSha1(); + init_webCryptoSha1(); + } +}); + +// ../../node_modules/@aws-crypto/sha256-browser/build/module/constants.js +var SHA_256_HASH, SHA_256_HMAC_ALGO, EMPTY_DATA_SHA_256; +var init_constants11 = __esm({ + "../../node_modules/@aws-crypto/sha256-browser/build/module/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SHA_256_HASH = { name: "SHA-256" }; + SHA_256_HMAC_ALGO = { + name: "HMAC", + hash: SHA_256_HASH + }; + EMPTY_DATA_SHA_256 = new Uint8Array([ + 227, + 176, + 196, + 66, + 152, + 252, + 28, + 20, + 154, + 251, + 244, + 200, + 153, + 111, + 185, + 36, + 39, + 174, + 65, + 228, + 100, + 155, + 147, + 76, + 164, + 149, + 153, + 27, + 120, + 82, + 184, + 85 + ]); + } +}); + +// ../../node_modules/@aws-crypto/sha256-browser/build/module/webCryptoSha256.js +var Sha256; +var init_webCryptoSha256 = __esm({ + "../../node_modules/@aws-crypto/sha256-browser/build/module/webCryptoSha256.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_module(); + init_constants11(); + init_dist_es45(); + Sha256 = /** @class */ + function() { + function Sha2564(secret) { + this.toHash = new Uint8Array(0); + this.secret = secret; + this.reset(); + } + __name(Sha2564, "Sha256"); + Sha2564.prototype.update = function(data) { + if (isEmptyData(data)) { + return; + } + var update = convertToBuffer(data); + var typedArray = new Uint8Array(this.toHash.byteLength + update.byteLength); + typedArray.set(this.toHash, 0); + typedArray.set(update, this.toHash.byteLength); + this.toHash = typedArray; + }; + Sha2564.prototype.digest = function() { + var _this = this; + if (this.key) { + return this.key.then(function(key) { + return locateWindow().crypto.subtle.sign(SHA_256_HMAC_ALGO, key, _this.toHash).then(function(data) { + return new Uint8Array(data); + }); + }); + } + if (isEmptyData(this.toHash)) { + return Promise.resolve(EMPTY_DATA_SHA_256); + } + return Promise.resolve().then(function() { + return locateWindow().crypto.subtle.digest(SHA_256_HASH, _this.toHash); + }).then(function(data) { + return Promise.resolve(new Uint8Array(data)); + }); + }; + Sha2564.prototype.reset = function() { + var _this = this; + this.toHash = new Uint8Array(0); + if (this.secret && this.secret !== void 0) { + this.key = new Promise(function(resolve, reject) { + locateWindow().crypto.subtle.importKey("raw", convertToBuffer(_this.secret), SHA_256_HMAC_ALGO, false, ["sign"]).then(resolve, reject); + }); + this.key.catch(function() { + }); + } + }; + return Sha2564; + }(); + } +}); + +// ../../node_modules/@aws-crypto/sha256-js/build/module/constants.js +var BLOCK_SIZE, DIGEST_LENGTH, KEY, INIT, MAX_HASHABLE_LENGTH; +var init_constants12 = __esm({ + "../../node_modules/@aws-crypto/sha256-js/build/module/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + BLOCK_SIZE = 64; + DIGEST_LENGTH = 32; + KEY = new Uint32Array([ + 1116352408, + 1899447441, + 3049323471, + 3921009573, + 961987163, + 1508970993, + 2453635748, + 2870763221, + 3624381080, + 310598401, + 607225278, + 1426881987, + 1925078388, + 2162078206, + 2614888103, + 3248222580, + 3835390401, + 4022224774, + 264347078, + 604807628, + 770255983, + 1249150122, + 1555081692, + 1996064986, + 2554220882, + 2821834349, + 2952996808, + 3210313671, + 3336571891, + 3584528711, + 113926993, + 338241895, + 666307205, + 773529912, + 1294757372, + 1396182291, + 1695183700, + 1986661051, + 2177026350, + 2456956037, + 2730485921, + 2820302411, + 3259730800, + 3345764771, + 3516065817, + 3600352804, + 4094571909, + 275423344, + 430227734, + 506948616, + 659060556, + 883997877, + 958139571, + 1322822218, + 1537002063, + 1747873779, + 1955562222, + 2024104815, + 2227730452, + 2361852424, + 2428436474, + 2756734187, + 3204031479, + 3329325298 + ]); + INIT = [ + 1779033703, + 3144134277, + 1013904242, + 2773480762, + 1359893119, + 2600822924, + 528734635, + 1541459225 + ]; + MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1; + } +}); + +// ../../node_modules/@aws-crypto/sha256-js/build/module/RawSha256.js +var RawSha256; +var init_RawSha256 = __esm({ + "../../node_modules/@aws-crypto/sha256-js/build/module/RawSha256.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants12(); + RawSha256 = /** @class */ + function() { + function RawSha2562() { + this.state = Int32Array.from(INIT); + this.temp = new Int32Array(64); + this.buffer = new Uint8Array(64); + this.bufferLength = 0; + this.bytesHashed = 0; + this.finished = false; + } + __name(RawSha2562, "RawSha256"); + RawSha2562.prototype.update = function(data) { + if (this.finished) { + throw new Error("Attempted to update an already finished hash."); + } + var position = 0; + var byteLength = data.byteLength; + this.bytesHashed += byteLength; + if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) { + throw new Error("Cannot hash more than 2^53 - 1 bits"); + } + while (byteLength > 0) { + this.buffer[this.bufferLength++] = data[position++]; + byteLength--; + if (this.bufferLength === BLOCK_SIZE) { + this.hashBuffer(); + this.bufferLength = 0; + } + } + }; + RawSha2562.prototype.digest = function() { + if (!this.finished) { + var bitsHashed = this.bytesHashed * 8; + var bufferView = new DataView(this.buffer.buffer, this.buffer.byteOffset, this.buffer.byteLength); + var undecoratedLength = this.bufferLength; + bufferView.setUint8(this.bufferLength++, 128); + if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) { + for (var i2 = this.bufferLength; i2 < BLOCK_SIZE; i2++) { + bufferView.setUint8(i2, 0); + } + this.hashBuffer(); + this.bufferLength = 0; + } + for (var i2 = this.bufferLength; i2 < BLOCK_SIZE - 8; i2++) { + bufferView.setUint8(i2, 0); + } + bufferView.setUint32(BLOCK_SIZE - 8, Math.floor(bitsHashed / 4294967296), true); + bufferView.setUint32(BLOCK_SIZE - 4, bitsHashed); + this.hashBuffer(); + this.finished = true; + } + var out = new Uint8Array(DIGEST_LENGTH); + for (var i2 = 0; i2 < 8; i2++) { + out[i2 * 4] = this.state[i2] >>> 24 & 255; + out[i2 * 4 + 1] = this.state[i2] >>> 16 & 255; + out[i2 * 4 + 2] = this.state[i2] >>> 8 & 255; + out[i2 * 4 + 3] = this.state[i2] >>> 0 & 255; + } + return out; + }; + RawSha2562.prototype.hashBuffer = function() { + var _a124 = this, buffer = _a124.buffer, state = _a124.state; + var state0 = state[0], state1 = state[1], state2 = state[2], state3 = state[3], state4 = state[4], state5 = state[5], state6 = state[6], state7 = state[7]; + for (var i2 = 0; i2 < BLOCK_SIZE; i2++) { + if (i2 < 16) { + this.temp[i2] = (buffer[i2 * 4] & 255) << 24 | (buffer[i2 * 4 + 1] & 255) << 16 | (buffer[i2 * 4 + 2] & 255) << 8 | buffer[i2 * 4 + 3] & 255; + } else { + var u5 = this.temp[i2 - 2]; + var t1_1 = (u5 >>> 17 | u5 << 15) ^ (u5 >>> 19 | u5 << 13) ^ u5 >>> 10; + u5 = this.temp[i2 - 15]; + var t2_1 = (u5 >>> 7 | u5 << 25) ^ (u5 >>> 18 | u5 << 14) ^ u5 >>> 3; + this.temp[i2] = (t1_1 + this.temp[i2 - 7] | 0) + (t2_1 + this.temp[i2 - 16] | 0); + } + var t12 = (((state4 >>> 6 | state4 << 26) ^ (state4 >>> 11 | state4 << 21) ^ (state4 >>> 25 | state4 << 7)) + (state4 & state5 ^ ~state4 & state6) | 0) + (state7 + (KEY[i2] + this.temp[i2] | 0) | 0) | 0; + var t22 = ((state0 >>> 2 | state0 << 30) ^ (state0 >>> 13 | state0 << 19) ^ (state0 >>> 22 | state0 << 10)) + (state0 & state1 ^ state0 & state2 ^ state1 & state2) | 0; + state7 = state6; + state6 = state5; + state5 = state4; + state4 = state3 + t12 | 0; + state3 = state2; + state2 = state1; + state1 = state0; + state0 = t12 + t22 | 0; + } + state[0] += state0; + state[1] += state1; + state[2] += state2; + state[3] += state3; + state[4] += state4; + state[5] += state5; + state[6] += state6; + state[7] += state7; + }; + return RawSha2562; + }(); + } +}); + +// ../../node_modules/@aws-crypto/sha256-js/build/module/jsSha256.js +function bufferFromSecret(secret) { + var input = convertToBuffer(secret); + if (input.byteLength > BLOCK_SIZE) { + var bufferHash = new RawSha256(); + bufferHash.update(input); + input = bufferHash.digest(); + } + var buffer = new Uint8Array(BLOCK_SIZE); + buffer.set(input); + return buffer; +} +var Sha2562; +var init_jsSha256 = __esm({ + "../../node_modules/@aws-crypto/sha256-js/build/module/jsSha256.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tslib_es6(); + init_constants12(); + init_RawSha256(); + init_module(); + Sha2562 = /** @class */ + function() { + function Sha2564(secret) { + this.secret = secret; + this.hash = new RawSha256(); + this.reset(); + } + __name(Sha2564, "Sha256"); + Sha2564.prototype.update = function(toHash) { + if (isEmptyData(toHash) || this.error) { + return; + } + try { + this.hash.update(convertToBuffer(toHash)); + } catch (e2) { + this.error = e2; + } + }; + Sha2564.prototype.digestSync = function() { + if (this.error) { + throw this.error; + } + if (this.outer) { + if (!this.outer.finished) { + this.outer.update(this.hash.digest()); + } + return this.outer.digest(); + } + return this.hash.digest(); + }; + Sha2564.prototype.digest = function() { + return __awaiter(this, void 0, void 0, function() { + return __generator(this, function(_a124) { + return [2, this.digestSync()]; + }); + }); + }; + Sha2564.prototype.reset = function() { + this.hash = new RawSha256(); + if (this.secret) { + this.outer = new RawSha256(); + var inner = bufferFromSecret(this.secret); + var outer = new Uint8Array(BLOCK_SIZE); + outer.set(inner); + for (var i2 = 0; i2 < BLOCK_SIZE; i2++) { + inner[i2] ^= 54; + outer[i2] ^= 92; + } + this.hash.update(inner); + this.outer.update(outer); + for (var i2 = 0; i2 < inner.byteLength; i2++) { + inner[i2] = 0; + } + } + }; + return Sha2564; + }(); + __name(bufferFromSecret, "bufferFromSecret"); + } +}); + +// ../../node_modules/@aws-crypto/sha256-js/build/module/index.js +var init_module6 = __esm({ + "../../node_modules/@aws-crypto/sha256-js/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_jsSha256(); + } +}); + +// ../../node_modules/@aws-crypto/sha256-browser/build/module/crossPlatformSha256.js +var Sha2563; +var init_crossPlatformSha256 = __esm({ + "../../node_modules/@aws-crypto/sha256-browser/build/module/crossPlatformSha256.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_webCryptoSha256(); + init_module6(); + init_module4(); + init_dist_es45(); + init_module(); + Sha2563 = /** @class */ + function() { + function Sha2564(secret) { + if (supportsWebCrypto(locateWindow())) { + this.hash = new Sha256(secret); + } else { + this.hash = new Sha2562(secret); + } + } + __name(Sha2564, "Sha256"); + Sha2564.prototype.update = function(data, encoding) { + this.hash.update(convertToBuffer(data)); + }; + Sha2564.prototype.digest = function() { + return this.hash.digest(); + }; + Sha2564.prototype.reset = function() { + this.hash.reset(); + }; + return Sha2564; + }(); + } +}); + +// ../../node_modules/@aws-crypto/sha256-browser/build/module/index.js +var init_module7 = __esm({ + "../../node_modules/@aws-crypto/sha256-browser/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_crossPlatformSha256(); + init_webCryptoSha256(); + } +}); + +// ../../node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js +var createDefaultUserAgentProvider, fallback; +var init_dist_es46 = __esm({ + "../../node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + createDefaultUserAgentProvider = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => async (config3) => { + const navigator2 = typeof window !== "undefined" ? window.navigator : void 0; + const uaString = navigator2?.userAgent ?? ""; + const osName = navigator2?.userAgentData?.platform ?? fallback.os(uaString) ?? "other"; + const osVersion = void 0; + const brands = navigator2?.userAgentData?.brands ?? []; + const brand = brands[brands.length - 1]; + const browserName = brand?.brand ?? fallback.browser(uaString) ?? "unknown"; + const browserVersion = brand?.version ?? "unknown"; + const sections = [ + ["aws-sdk-js", clientVersion], + ["ua", "2.1"], + [`os/${osName}`, osVersion], + ["lang/js"], + ["md/browser", `${browserName}_${browserVersion}`] + ]; + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); + } + const appId = await config3?.userAgentAppId?.(); + if (appId) { + sections.push([`app/${appId}`]); + } + return sections; + }, "createDefaultUserAgentProvider"); + fallback = { + os(ua) { + if (/iPhone|iPad|iPod/.test(ua)) + return "iOS"; + if (/Macintosh|Mac OS X/.test(ua)) + return "macOS"; + if (/Windows NT/.test(ua)) + return "Windows"; + if (/Android/.test(ua)) + return "Android"; + if (/Linux/.test(ua)) + return "Linux"; + return void 0; + }, + browser(ua) { + if (/EdgiOS|EdgA|Edg\//.test(ua)) + return "Microsoft Edge"; + if (/Firefox\//.test(ua)) + return "Firefox"; + if (/Chrome\//.test(ua)) + return "Chrome"; + if (/Safari\//.test(ua)) + return "Safari"; + return void 0; + } + }; + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/Int64.js +function negate2(bytes) { + for (let i2 = 0; i2 < 8; i2++) { + bytes[i2] ^= 255; + } + for (let i2 = 7; i2 > -1; i2--) { + bytes[i2]++; + if (bytes[i2] !== 0) + break; + } +} +var Int642; +var init_Int64 = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/Int64.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + Int642 = class { + bytes; + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static fromNumber(number4) { + if (number4 > 9223372036854776e3 || number4 < -9223372036854776e3) { + throw new Error(`${number4} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i2 = 7, remaining = Math.abs(Math.round(number4)); i2 > -1 && remaining > 0; i2--, remaining /= 256) { + bytes[i2] = remaining; + } + if (number4 < 0) { + negate2(bytes); + } + return new Int642(bytes); + } + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate2(bytes); + } + return parseInt(toHex(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } + }; + __name(Int642, "Int64"); + __name(negate2, "negate"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/HeaderMarshaller.js +var HeaderMarshaller, HEADER_VALUE_TYPE2, BOOLEAN_TAG, BYTE_TAG, SHORT_TAG, INT_TAG, LONG_TAG, BINARY_TAG, STRING_TAG, TIMESTAMP_TAG, UUID_TAG, UUID_PATTERN2; +var init_HeaderMarshaller = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/HeaderMarshaller.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + init_Int64(); + HeaderMarshaller = class { + toUtf8; + fromUtf8; + constructor(toUtf82, fromUtf85) { + this.toUtf8 = toUtf82; + this.fromUtf8 = fromUtf85; + } + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = this.fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([header.value ? 0 : 1]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8(0, 3); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8(0, 4); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8(0, 6); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = this.fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8(0, 7); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int642.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN2.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set(fromHex(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } + parse(headers) { + const out = {}; + let position = 0; + while (position < headers.byteLength) { + const nameLength = headers.getUint8(position++); + const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength)); + position += nameLength; + switch (headers.getUint8(position++)) { + case 0: + out[name] = { + type: BOOLEAN_TAG, + value: true + }; + break; + case 1: + out[name] = { + type: BOOLEAN_TAG, + value: false + }; + break; + case 2: + out[name] = { + type: BYTE_TAG, + value: headers.getInt8(position++) + }; + break; + case 3: + out[name] = { + type: SHORT_TAG, + value: headers.getInt16(position, false) + }; + position += 2; + break; + case 4: + out[name] = { + type: INT_TAG, + value: headers.getInt32(position, false) + }; + position += 4; + break; + case 5: + out[name] = { + type: LONG_TAG, + value: new Int642(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)) + }; + position += 8; + break; + case 6: + const binaryLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: BINARY_TAG, + value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength) + }; + position += binaryLength; + break; + case 7: + const stringLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: STRING_TAG, + value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)) + }; + position += stringLength; + break; + case 8: + out[name] = { + type: TIMESTAMP_TAG, + value: new Date(new Int642(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()) + }; + position += 8; + break; + case 9: + const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16); + position += 16; + out[name] = { + type: UUID_TAG, + value: `${toHex(uuidBytes.subarray(0, 4))}-${toHex(uuidBytes.subarray(4, 6))}-${toHex(uuidBytes.subarray(6, 8))}-${toHex(uuidBytes.subarray(8, 10))}-${toHex(uuidBytes.subarray(10))}` + }; + break; + default: + throw new Error(`Unrecognized header type tag`); + } + } + return out; + } + }; + __name(HeaderMarshaller, "HeaderMarshaller"); + (function(HEADER_VALUE_TYPE3) { + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["boolTrue"] = 0] = "boolTrue"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["boolFalse"] = 1] = "boolFalse"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["byte"] = 2] = "byte"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["short"] = 3] = "short"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["integer"] = 4] = "integer"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["long"] = 5] = "long"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["byteArray"] = 6] = "byteArray"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["string"] = 7] = "string"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["timestamp"] = 8] = "timestamp"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["uuid"] = 9] = "uuid"; + })(HEADER_VALUE_TYPE2 || (HEADER_VALUE_TYPE2 = {})); + BOOLEAN_TAG = "boolean"; + BYTE_TAG = "byte"; + SHORT_TAG = "short"; + INT_TAG = "integer"; + LONG_TAG = "long"; + BINARY_TAG = "binary"; + STRING_TAG = "string"; + TIMESTAMP_TAG = "timestamp"; + UUID_TAG = "uuid"; + UUID_PATTERN2 = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/splitMessage.js +function splitMessage({ byteLength, byteOffset, buffer }) { + if (byteLength < MINIMUM_MESSAGE_LENGTH) { + throw new Error("Provided message too short to accommodate event stream message overhead"); + } + const view = new DataView(buffer, byteOffset, byteLength); + const messageLength = view.getUint32(0, false); + if (byteLength !== messageLength) { + throw new Error("Reported message length does not match received message length"); + } + const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false); + const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false); + const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false); + const checksummer = new Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH)); + if (expectedPreludeChecksum !== checksummer.digest()) { + throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`); + } + checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH))); + if (expectedMessageChecksum !== checksummer.digest()) { + throw new Error(`The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`); + } + return { + headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength), + body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)) + }; +} +var PRELUDE_MEMBER_LENGTH, PRELUDE_LENGTH, CHECKSUM_LENGTH, MINIMUM_MESSAGE_LENGTH; +var init_splitMessage = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/splitMessage.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_module3(); + PRELUDE_MEMBER_LENGTH = 4; + PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; + CHECKSUM_LENGTH = 4; + MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; + __name(splitMessage, "splitMessage"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/EventStreamCodec.js +var EventStreamCodec; +var init_EventStreamCodec = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/EventStreamCodec.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_module3(); + init_HeaderMarshaller(); + init_splitMessage(); + EventStreamCodec = class { + headerMarshaller; + messageBuffer; + isEndOfStream; + constructor(toUtf82, fromUtf85) { + this.headerMarshaller = new HeaderMarshaller(toUtf82, fromUtf85); + this.messageBuffer = []; + this.isEndOfStream = false; + } + feed(message2) { + this.messageBuffer.push(this.decode(message2)); + } + endOfStream() { + this.isEndOfStream = true; + } + getMessage() { + const message2 = this.messageBuffer.pop(); + const isEndOfStream = this.isEndOfStream; + return { + getMessage() { + return message2; + }, + isEndOfStream() { + return isEndOfStream; + } + }; + } + getAvailableMessages() { + const messages = this.messageBuffer; + this.messageBuffer = []; + const isEndOfStream = this.isEndOfStream; + return { + getMessages() { + return messages; + }, + isEndOfStream() { + return isEndOfStream; + } + }; + } + encode({ headers: rawHeaders, body }) { + const headers = this.headerMarshaller.format(rawHeaders); + const length = headers.byteLength + body.byteLength + 16; + const out = new Uint8Array(length); + const view = new DataView(out.buffer, out.byteOffset, out.byteLength); + const checksum = new Crc32(); + view.setUint32(0, length, false); + view.setUint32(4, headers.byteLength, false); + view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false); + out.set(headers, 12); + out.set(body, headers.byteLength + 12); + view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false); + return out; + } + decode(message2) { + const { headers, body } = splitMessage(message2); + return { headers: this.headerMarshaller.parse(headers), body }; + } + formatHeaders(rawHeaders) { + return this.headerMarshaller.format(rawHeaders); + } + }; + __name(EventStreamCodec, "EventStreamCodec"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/Message.js +var init_Message = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/Message.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/MessageDecoderStream.js +var MessageDecoderStream; +var init_MessageDecoderStream = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/MessageDecoderStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + MessageDecoderStream = class { + options; + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const bytes of this.options.inputStream) { + const decoded = this.options.decoder.decode(bytes); + yield decoded; + } + } + }; + __name(MessageDecoderStream, "MessageDecoderStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/MessageEncoderStream.js +var MessageEncoderStream; +var init_MessageEncoderStream = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/MessageEncoderStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + MessageEncoderStream = class { + options; + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const msg of this.options.messageStream) { + const encoded = this.options.encoder.encode(msg); + yield encoded; + } + if (this.options.includeEndFrame) { + yield new Uint8Array(0); + } + } + }; + __name(MessageEncoderStream, "MessageEncoderStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageDecoderStream.js +var SmithyMessageDecoderStream; +var init_SmithyMessageDecoderStream = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageDecoderStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SmithyMessageDecoderStream = class { + options; + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const message2 of this.options.messageStream) { + const deserialized = await this.options.deserializer(message2); + if (deserialized === void 0) + continue; + yield deserialized; + } + } + }; + __name(SmithyMessageDecoderStream, "SmithyMessageDecoderStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageEncoderStream.js +var SmithyMessageEncoderStream; +var init_SmithyMessageEncoderStream = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageEncoderStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SmithyMessageEncoderStream = class { + options; + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const chunk of this.options.inputStream) { + const payloadBuf = this.options.serializer(chunk); + yield payloadBuf; + } + } + }; + __name(SmithyMessageEncoderStream, "SmithyMessageEncoderStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/index.js +var init_dist_es47 = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamCodec(); + init_HeaderMarshaller(); + init_Int64(); + init_Message(); + init_MessageDecoderStream(); + init_MessageEncoderStream(); + init_SmithyMessageDecoderStream(); + init_SmithyMessageEncoderStream(); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-universal/dist-es/getChunkedStream.js +function getChunkedStream(source) { + let currentMessageTotalLength = 0; + let currentMessagePendingLength = 0; + let currentMessage = null; + let messageLengthBuffer = null; + const allocateMessage = /* @__PURE__ */ __name((size) => { + if (typeof size !== "number") { + throw new Error("Attempted to allocate an event message where size was not a number: " + size); + } + currentMessageTotalLength = size; + currentMessagePendingLength = 4; + currentMessage = new Uint8Array(size); + const currentMessageView = new DataView(currentMessage.buffer); + currentMessageView.setUint32(0, size, false); + }, "allocateMessage"); + const iterator2 = /* @__PURE__ */ __name(async function* () { + const sourceIterator = source[Symbol.asyncIterator](); + while (true) { + const { value, done } = await sourceIterator.next(); + if (done) { + if (!currentMessageTotalLength) { + return; + } else if (currentMessageTotalLength === currentMessagePendingLength) { + yield currentMessage; + } else { + throw new Error("Truncated event message received."); + } + return; + } + const chunkLength = value.length; + let currentOffset = 0; + while (currentOffset < chunkLength) { + if (!currentMessage) { + const bytesRemaining = chunkLength - currentOffset; + if (!messageLengthBuffer) { + messageLengthBuffer = new Uint8Array(4); + } + const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining); + messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength); + currentMessagePendingLength += numBytesForTotal; + currentOffset += numBytesForTotal; + if (currentMessagePendingLength < 4) { + break; + } + allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false)); + messageLengthBuffer = null; + } + const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset); + currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength); + currentMessagePendingLength += numBytesToWrite; + currentOffset += numBytesToWrite; + if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) { + yield currentMessage; + currentMessage = null; + currentMessageTotalLength = 0; + currentMessagePendingLength = 0; + } + } + } + }, "iterator"); + return { + [Symbol.asyncIterator]: iterator2 + }; +} +var init_getChunkedStream = __esm({ + "../../node_modules/@smithy/eventstream-serde-universal/dist-es/getChunkedStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(getChunkedStream, "getChunkedStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-universal/dist-es/getUnmarshalledStream.js +function getMessageUnmarshaller(deserializer, toUtf82) { + return async function(message2) { + const { value: messageType } = message2.headers[":message-type"]; + if (messageType === "error") { + const unmodeledError = new Error(message2.headers[":error-message"].value || "UnknownError"); + unmodeledError.name = message2.headers[":error-code"].value; + throw unmodeledError; + } else if (messageType === "exception") { + const code = message2.headers[":exception-type"].value; + const exception = { [code]: message2 }; + const deserializedException = await deserializer(exception); + if (deserializedException.$unknown) { + const error50 = new Error(toUtf82(message2.body)); + error50.name = code; + throw error50; + } + throw deserializedException[code]; + } else if (messageType === "event") { + const event = { + [message2.headers[":event-type"].value]: message2 + }; + const deserialized = await deserializer(event); + if (deserialized.$unknown) + return; + return deserialized; + } else { + throw Error(`Unrecognizable event type: ${message2.headers[":event-type"].value}`); + } + }; +} +var init_getUnmarshalledStream = __esm({ + "../../node_modules/@smithy/eventstream-serde-universal/dist-es/getUnmarshalledStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(getMessageUnmarshaller, "getMessageUnmarshaller"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-universal/dist-es/EventStreamMarshaller.js +var EventStreamMarshaller; +var init_EventStreamMarshaller = __esm({ + "../../node_modules/@smithy/eventstream-serde-universal/dist-es/EventStreamMarshaller.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es47(); + init_getChunkedStream(); + init_getUnmarshalledStream(); + EventStreamMarshaller = class { + eventStreamCodec; + utfEncoder; + constructor({ utf8Encoder, utf8Decoder }) { + this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder); + this.utfEncoder = utf8Encoder; + } + deserialize(body, deserializer) { + const inputStream = getChunkedStream(body); + return new SmithyMessageDecoderStream({ + messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }), + deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder) + }); + } + serialize(inputStream, serializer) { + return new MessageEncoderStream({ + messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }), + encoder: this.eventStreamCodec, + includeEndFrame: true + }); + } + }; + __name(EventStreamMarshaller, "EventStreamMarshaller"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-universal/dist-es/provider.js +var init_provider = __esm({ + "../../node_modules/@smithy/eventstream-serde-universal/dist-es/provider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-universal/dist-es/index.js +var init_dist_es48 = __esm({ + "../../node_modules/@smithy/eventstream-serde-universal/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamMarshaller(); + init_provider(); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-browser/dist-es/utils.js +var readableStreamtoIterable, iterableToReadableStream; +var init_utils6 = __esm({ + "../../node_modules/@smithy/eventstream-serde-browser/dist-es/utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + readableStreamtoIterable = /* @__PURE__ */ __name((readableStream) => ({ + [Symbol.asyncIterator]: async function* () { + const reader = readableStream.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) + return; + yield value; + } + } finally { + reader.releaseLock(); + } + } + }), "readableStreamtoIterable"); + iterableToReadableStream = /* @__PURE__ */ __name((asyncIterable) => { + const iterator2 = asyncIterable[Symbol.asyncIterator](); + return new ReadableStream({ + async pull(controller) { + const { done, value } = await iterator2.next(); + if (done) { + return controller.close(); + } + controller.enqueue(value); + } + }); + }, "iterableToReadableStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-browser/dist-es/EventStreamMarshaller.js +var EventStreamMarshaller2, isReadableStream2; +var init_EventStreamMarshaller2 = __esm({ + "../../node_modules/@smithy/eventstream-serde-browser/dist-es/EventStreamMarshaller.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es48(); + init_utils6(); + EventStreamMarshaller2 = class { + universalMarshaller; + constructor({ utf8Encoder, utf8Decoder }) { + this.universalMarshaller = new EventStreamMarshaller({ + utf8Decoder, + utf8Encoder + }); + } + deserialize(body, deserializer) { + const bodyIterable = isReadableStream2(body) ? readableStreamtoIterable(body) : body; + return this.universalMarshaller.deserialize(bodyIterable, deserializer); + } + serialize(input, serializer) { + const serialziedIterable = this.universalMarshaller.serialize(input, serializer); + return typeof ReadableStream === "function" ? iterableToReadableStream(serialziedIterable) : serialziedIterable; + } + }; + __name(EventStreamMarshaller2, "EventStreamMarshaller"); + isReadableStream2 = /* @__PURE__ */ __name((body) => typeof ReadableStream === "function" && body instanceof ReadableStream, "isReadableStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-browser/dist-es/provider.js +var eventStreamSerdeProvider; +var init_provider2 = __esm({ + "../../node_modules/@smithy/eventstream-serde-browser/dist-es/provider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamMarshaller2(); + eventStreamSerdeProvider = /* @__PURE__ */ __name((options) => new EventStreamMarshaller2(options), "eventStreamSerdeProvider"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-browser/dist-es/index.js +var init_dist_es49 = __esm({ + "../../node_modules/@smithy/eventstream-serde-browser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamMarshaller2(); + init_provider2(); + init_utils6(); + } +}); + +// ../../node_modules/@smithy/chunked-blob-reader/dist-es/index.js +async function blobReader(blob2, onChunk, chunkSize = 1024 * 1024) { + const size = blob2.size; + let totalBytesRead = 0; + while (totalBytesRead < size) { + const slice = blob2.slice(totalBytesRead, Math.min(size, totalBytesRead + chunkSize)); + onChunk(new Uint8Array(await slice.arrayBuffer())); + totalBytesRead += slice.size; + } +} +var init_dist_es50 = __esm({ + "../../node_modules/@smithy/chunked-blob-reader/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(blobReader, "blobReader"); + } +}); + +// ../../node_modules/@smithy/hash-blob-browser/dist-es/index.js +var blobHasher; +var init_dist_es51 = __esm({ + "../../node_modules/@smithy/hash-blob-browser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es50(); + blobHasher = /* @__PURE__ */ __name(async function blobHasher2(hashCtor, blob2) { + const hash4 = new hashCtor(); + await blobReader(blob2, (chunk) => { + hash4.update(chunk); + }); + return hash4.digest(); + }, "blobHasher"); + } +}); + +// ../../node_modules/@smithy/invalid-dependency/dist-es/invalidFunction.js +var init_invalidFunction = __esm({ + "../../node_modules/@smithy/invalid-dependency/dist-es/invalidFunction.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/invalid-dependency/dist-es/invalidProvider.js +var invalidProvider; +var init_invalidProvider = __esm({ + "../../node_modules/@smithy/invalid-dependency/dist-es/invalidProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + invalidProvider = /* @__PURE__ */ __name((message2) => () => Promise.reject(message2), "invalidProvider"); + } +}); + +// ../../node_modules/@smithy/invalid-dependency/dist-es/index.js +var init_dist_es52 = __esm({ + "../../node_modules/@smithy/invalid-dependency/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_invalidFunction(); + init_invalidProvider(); + } +}); + +// ../../node_modules/@smithy/md5-js/dist-es/constants.js +var BLOCK_SIZE2, DIGEST_LENGTH2, INIT2; +var init_constants13 = __esm({ + "../../node_modules/@smithy/md5-js/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + BLOCK_SIZE2 = 64; + DIGEST_LENGTH2 = 16; + INIT2 = [1732584193, 4023233417, 2562383102, 271733878]; + } +}); + +// ../../node_modules/@smithy/md5-js/dist-es/index.js +function cmn(q2, a2, b2, x2, s2, t9) { + a2 = (a2 + q2 & 4294967295) + (x2 + t9 & 4294967295) & 4294967295; + return (a2 << s2 | a2 >>> 32 - s2) + b2 & 4294967295; +} +function ff(a2, b2, c2, d2, x2, s2, t9) { + return cmn(b2 & c2 | ~b2 & d2, a2, b2, x2, s2, t9); +} +function gg(a2, b2, c2, d2, x2, s2, t9) { + return cmn(b2 & d2 | c2 & ~d2, a2, b2, x2, s2, t9); +} +function hh(a2, b2, c2, d2, x2, s2, t9) { + return cmn(b2 ^ c2 ^ d2, a2, b2, x2, s2, t9); +} +function ii(a2, b2, c2, d2, x2, s2, t9) { + return cmn(c2 ^ (b2 | ~d2), a2, b2, x2, s2, t9); +} +function isEmptyData3(data) { + if (typeof data === "string") { + return data.length === 0; + } + return data.byteLength === 0; +} +function convertToBuffer3(data) { + if (typeof data === "string") { + return fromUtf8(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); +} +var Md5; +var init_dist_es53 = __esm({ + "../../node_modules/@smithy/md5-js/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es5(); + init_constants13(); + Md5 = class { + state; + buffer; + bufferLength; + bytesHashed; + finished; + constructor() { + this.reset(); + } + update(sourceData) { + if (isEmptyData3(sourceData)) { + return; + } else if (this.finished) { + throw new Error("Attempted to update an already finished hash."); + } + const data = convertToBuffer3(sourceData); + let position = 0; + let { byteLength } = data; + this.bytesHashed += byteLength; + while (byteLength > 0) { + this.buffer.setUint8(this.bufferLength++, data[position++]); + byteLength--; + if (this.bufferLength === BLOCK_SIZE2) { + this.hashBuffer(); + this.bufferLength = 0; + } + } + } + async digest() { + if (!this.finished) { + const { buffer, bufferLength: undecoratedLength, bytesHashed } = this; + const bitsHashed = bytesHashed * 8; + buffer.setUint8(this.bufferLength++, 128); + if (undecoratedLength % BLOCK_SIZE2 >= BLOCK_SIZE2 - 8) { + for (let i2 = this.bufferLength; i2 < BLOCK_SIZE2; i2++) { + buffer.setUint8(i2, 0); + } + this.hashBuffer(); + this.bufferLength = 0; + } + for (let i2 = this.bufferLength; i2 < BLOCK_SIZE2 - 8; i2++) { + buffer.setUint8(i2, 0); + } + buffer.setUint32(BLOCK_SIZE2 - 8, bitsHashed >>> 0, true); + buffer.setUint32(BLOCK_SIZE2 - 4, Math.floor(bitsHashed / 4294967296), true); + this.hashBuffer(); + this.finished = true; + } + const out = new DataView(new ArrayBuffer(DIGEST_LENGTH2)); + for (let i2 = 0; i2 < 4; i2++) { + out.setUint32(i2 * 4, this.state[i2], true); + } + return new Uint8Array(out.buffer, out.byteOffset, out.byteLength); + } + hashBuffer() { + const { buffer, state } = this; + let a2 = state[0], b2 = state[1], c2 = state[2], d2 = state[3]; + a2 = ff(a2, b2, c2, d2, buffer.getUint32(0, true), 7, 3614090360); + d2 = ff(d2, a2, b2, c2, buffer.getUint32(4, true), 12, 3905402710); + c2 = ff(c2, d2, a2, b2, buffer.getUint32(8, true), 17, 606105819); + b2 = ff(b2, c2, d2, a2, buffer.getUint32(12, true), 22, 3250441966); + a2 = ff(a2, b2, c2, d2, buffer.getUint32(16, true), 7, 4118548399); + d2 = ff(d2, a2, b2, c2, buffer.getUint32(20, true), 12, 1200080426); + c2 = ff(c2, d2, a2, b2, buffer.getUint32(24, true), 17, 2821735955); + b2 = ff(b2, c2, d2, a2, buffer.getUint32(28, true), 22, 4249261313); + a2 = ff(a2, b2, c2, d2, buffer.getUint32(32, true), 7, 1770035416); + d2 = ff(d2, a2, b2, c2, buffer.getUint32(36, true), 12, 2336552879); + c2 = ff(c2, d2, a2, b2, buffer.getUint32(40, true), 17, 4294925233); + b2 = ff(b2, c2, d2, a2, buffer.getUint32(44, true), 22, 2304563134); + a2 = ff(a2, b2, c2, d2, buffer.getUint32(48, true), 7, 1804603682); + d2 = ff(d2, a2, b2, c2, buffer.getUint32(52, true), 12, 4254626195); + c2 = ff(c2, d2, a2, b2, buffer.getUint32(56, true), 17, 2792965006); + b2 = ff(b2, c2, d2, a2, buffer.getUint32(60, true), 22, 1236535329); + a2 = gg(a2, b2, c2, d2, buffer.getUint32(4, true), 5, 4129170786); + d2 = gg(d2, a2, b2, c2, buffer.getUint32(24, true), 9, 3225465664); + c2 = gg(c2, d2, a2, b2, buffer.getUint32(44, true), 14, 643717713); + b2 = gg(b2, c2, d2, a2, buffer.getUint32(0, true), 20, 3921069994); + a2 = gg(a2, b2, c2, d2, buffer.getUint32(20, true), 5, 3593408605); + d2 = gg(d2, a2, b2, c2, buffer.getUint32(40, true), 9, 38016083); + c2 = gg(c2, d2, a2, b2, buffer.getUint32(60, true), 14, 3634488961); + b2 = gg(b2, c2, d2, a2, buffer.getUint32(16, true), 20, 3889429448); + a2 = gg(a2, b2, c2, d2, buffer.getUint32(36, true), 5, 568446438); + d2 = gg(d2, a2, b2, c2, buffer.getUint32(56, true), 9, 3275163606); + c2 = gg(c2, d2, a2, b2, buffer.getUint32(12, true), 14, 4107603335); + b2 = gg(b2, c2, d2, a2, buffer.getUint32(32, true), 20, 1163531501); + a2 = gg(a2, b2, c2, d2, buffer.getUint32(52, true), 5, 2850285829); + d2 = gg(d2, a2, b2, c2, buffer.getUint32(8, true), 9, 4243563512); + c2 = gg(c2, d2, a2, b2, buffer.getUint32(28, true), 14, 1735328473); + b2 = gg(b2, c2, d2, a2, buffer.getUint32(48, true), 20, 2368359562); + a2 = hh(a2, b2, c2, d2, buffer.getUint32(20, true), 4, 4294588738); + d2 = hh(d2, a2, b2, c2, buffer.getUint32(32, true), 11, 2272392833); + c2 = hh(c2, d2, a2, b2, buffer.getUint32(44, true), 16, 1839030562); + b2 = hh(b2, c2, d2, a2, buffer.getUint32(56, true), 23, 4259657740); + a2 = hh(a2, b2, c2, d2, buffer.getUint32(4, true), 4, 2763975236); + d2 = hh(d2, a2, b2, c2, buffer.getUint32(16, true), 11, 1272893353); + c2 = hh(c2, d2, a2, b2, buffer.getUint32(28, true), 16, 4139469664); + b2 = hh(b2, c2, d2, a2, buffer.getUint32(40, true), 23, 3200236656); + a2 = hh(a2, b2, c2, d2, buffer.getUint32(52, true), 4, 681279174); + d2 = hh(d2, a2, b2, c2, buffer.getUint32(0, true), 11, 3936430074); + c2 = hh(c2, d2, a2, b2, buffer.getUint32(12, true), 16, 3572445317); + b2 = hh(b2, c2, d2, a2, buffer.getUint32(24, true), 23, 76029189); + a2 = hh(a2, b2, c2, d2, buffer.getUint32(36, true), 4, 3654602809); + d2 = hh(d2, a2, b2, c2, buffer.getUint32(48, true), 11, 3873151461); + c2 = hh(c2, d2, a2, b2, buffer.getUint32(60, true), 16, 530742520); + b2 = hh(b2, c2, d2, a2, buffer.getUint32(8, true), 23, 3299628645); + a2 = ii(a2, b2, c2, d2, buffer.getUint32(0, true), 6, 4096336452); + d2 = ii(d2, a2, b2, c2, buffer.getUint32(28, true), 10, 1126891415); + c2 = ii(c2, d2, a2, b2, buffer.getUint32(56, true), 15, 2878612391); + b2 = ii(b2, c2, d2, a2, buffer.getUint32(20, true), 21, 4237533241); + a2 = ii(a2, b2, c2, d2, buffer.getUint32(48, true), 6, 1700485571); + d2 = ii(d2, a2, b2, c2, buffer.getUint32(12, true), 10, 2399980690); + c2 = ii(c2, d2, a2, b2, buffer.getUint32(40, true), 15, 4293915773); + b2 = ii(b2, c2, d2, a2, buffer.getUint32(4, true), 21, 2240044497); + a2 = ii(a2, b2, c2, d2, buffer.getUint32(32, true), 6, 1873313359); + d2 = ii(d2, a2, b2, c2, buffer.getUint32(60, true), 10, 4264355552); + c2 = ii(c2, d2, a2, b2, buffer.getUint32(24, true), 15, 2734768916); + b2 = ii(b2, c2, d2, a2, buffer.getUint32(52, true), 21, 1309151649); + a2 = ii(a2, b2, c2, d2, buffer.getUint32(16, true), 6, 4149444226); + d2 = ii(d2, a2, b2, c2, buffer.getUint32(44, true), 10, 3174756917); + c2 = ii(c2, d2, a2, b2, buffer.getUint32(8, true), 15, 718787259); + b2 = ii(b2, c2, d2, a2, buffer.getUint32(36, true), 21, 3951481745); + state[0] = a2 + state[0] & 4294967295; + state[1] = b2 + state[1] & 4294967295; + state[2] = c2 + state[2] & 4294967295; + state[3] = d2 + state[3] & 4294967295; + } + reset() { + this.state = Uint32Array.from(INIT2); + this.buffer = new DataView(new ArrayBuffer(BLOCK_SIZE2)); + this.bufferLength = 0; + this.bytesHashed = 0; + this.finished = false; + } + }; + __name(Md5, "Md5"); + __name(cmn, "cmn"); + __name(ff, "ff"); + __name(gg, "gg"); + __name(hh, "hh"); + __name(ii, "ii"); + __name(isEmptyData3, "isEmptyData"); + __name(convertToBuffer3, "convertToBuffer"); + } +}); + +// ../../node_modules/@smithy/util-defaults-mode-browser/dist-es/constants.js +var DEFAULTS_MODE_OPTIONS; +var init_constants14 = __esm({ + "../../node_modules/@smithy/util-defaults-mode-browser/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; + } +}); + +// ../../node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js +var resolveDefaultsModeConfig, useMobileConfiguration; +var init_resolveDefaultsModeConfig = __esm({ + "../../node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es16(); + init_constants14(); + resolveDefaultsModeConfig = /* @__PURE__ */ __name(({ defaultsMode } = {}) => memoize(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode?.toLowerCase()) { + case "auto": + return Promise.resolve(useMobileConfiguration() ? "mobile" : "standard"); + case "mobile": + case "in-region": + case "cross-region": + case "standard": + case "legacy": + return Promise.resolve(mode?.toLocaleLowerCase()); + case void 0: + return Promise.resolve("legacy"); + default: + throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`); + } + }), "resolveDefaultsModeConfig"); + useMobileConfiguration = /* @__PURE__ */ __name(() => { + const navigator2 = window?.navigator; + if (navigator2?.connection) { + const { effectiveType, rtt, downlink } = navigator2?.connection; + const slow = typeof effectiveType === "string" && effectiveType !== "4g" || Number(rtt) > 100 || Number(downlink) < 10; + if (slow) { + return true; + } + } + return navigator2?.userAgentData?.mobile || typeof navigator2?.maxTouchPoints === "number" && navigator2?.maxTouchPoints > 1; + }, "useMobileConfiguration"); + } +}); + +// ../../node_modules/@smithy/util-defaults-mode-browser/dist-es/index.js +var init_dist_es54 = __esm({ + "../../node_modules/@smithy/util-defaults-mode-browser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_resolveDefaultsModeConfig(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.shared.js +var getRuntimeConfig; +var init_runtimeConfig_shared = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.shared.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_protocols2(); + init_dist_es43(); + init_dist_es21(); + init_dist_es13(); + init_dist_es6(); + init_dist_es11(); + init_dist_es5(); + init_httpAuthSchemeProvider(); + init_endpointResolver(); + init_schemas_0(); + getRuntimeConfig = /* @__PURE__ */ __name((config3) => { + return { + apiVersion: "2006-03-01", + base64Decoder: config3?.base64Decoder ?? fromBase64, + base64Encoder: config3?.base64Encoder ?? toBase64, + disableHostPrefix: config3?.disableHostPrefix ?? false, + endpointProvider: config3?.endpointProvider ?? defaultEndpointResolver, + extensions: config3?.extensions ?? [], + getAwsChunkedEncodingStream: config3?.getAwsChunkedEncodingStream ?? getAwsChunkedEncodingStream, + httpAuthSchemeProvider: config3?.httpAuthSchemeProvider ?? defaultS3HttpAuthSchemeProvider, + httpAuthSchemes: config3?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer() + }, + { + schemeId: "aws.auth#sigv4a", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"), + signer: new AwsSdkSigV4ASigner() + } + ], + logger: config3?.logger ?? new NoOpLogger(), + protocol: config3?.protocol ?? AwsRestXmlProtocol, + protocolSettings: config3?.protocolSettings ?? { + defaultNamespace: "com.amazonaws.s3", + errorTypeRegistries, + xmlNamespace: "http://s3.amazonaws.com/doc/2006-03-01/", + version: "2006-03-01", + serviceTarget: "AmazonS3" + }, + sdkStreamMixin: config3?.sdkStreamMixin ?? sdkStreamMixin, + serviceId: config3?.serviceId ?? "S3", + signerConstructor: config3?.signerConstructor ?? SignatureV4MultiRegion, + signingEscapePath: config3?.signingEscapePath ?? false, + urlParser: config3?.urlParser ?? parseUrl, + useArnRegion: config3?.useArnRegion ?? void 0, + utf8Decoder: config3?.utf8Decoder ?? fromUtf8, + utf8Encoder: config3?.utf8Encoder ?? toUtf8 + }; + }, "getRuntimeConfig"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.browser.js +var getRuntimeConfig2; +var init_runtimeConfig_browser = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_package(); + init_module5(); + init_module7(); + init_dist_es46(); + init_dist_es37(); + init_dist_es49(); + init_dist_es9(); + init_dist_es51(); + init_dist_es52(); + init_dist_es53(); + init_dist_es21(); + init_dist_es19(); + init_dist_es54(); + init_dist_es35(); + init_runtimeConfig_shared(); + getRuntimeConfig2 = /* @__PURE__ */ __name((config3) => { + const defaultsMode = resolveDefaultsModeConfig(config3); + const defaultConfigProvider = /* @__PURE__ */ __name(() => defaultsMode().then(loadConfigsForDefaultMode), "defaultConfigProvider"); + const clientSharedValues = getRuntimeConfig(config3); + return { + ...clientSharedValues, + ...config3, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config3?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: config3?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: config3?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), + eventStreamSerdeProvider: config3?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, + maxAttempts: config3?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + md5: config3?.md5 ?? Md5, + region: config3?.region ?? invalidProvider("Region is missing"), + requestHandler: FetchHttpHandler.create(config3?.requestHandler ?? defaultConfigProvider), + retryMode: config3?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), + sha1: config3?.sha1 ?? Sha12, + sha256: config3?.sha256 ?? Sha2563, + streamCollector: config3?.streamCollector ?? streamCollector, + streamHasher: config3?.streamHasher ?? blobHasher, + useDualstackEndpoint: config3?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config3?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)) + }; + }, "getRuntimeConfig"); + } +}); + +// ../../node_modules/@aws-sdk/region-config-resolver/dist-es/extensions/index.js +var getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration; +var init_extensions4 = __esm({ + "../../node_modules/@aws-sdk/region-config-resolver/dist-es/extensions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + setRegion(region) { + runtimeConfig.region = region; + }, + region() { + return runtimeConfig.region; + } + }; + }, "getAwsRegionExtensionConfiguration"); + resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => { + return { + region: awsRegionExtensionConfiguration.region() + }; + }, "resolveAwsRegionExtensionConfiguration"); + } +}); + +// ../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/awsRegionConfig.js +var init_awsRegionConfig = __esm({ + "../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/awsRegionConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/stsRegionDefaultResolver.browser.js +var init_stsRegionDefaultResolver_browser = __esm({ + "../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/stsRegionDefaultResolver.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/region-config-resolver/dist-es/index.js +var init_dist_es55 = __esm({ + "../../node_modules/@aws-sdk/region-config-resolver/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_extensions4(); + init_awsRegionConfig(); + init_stsRegionDefaultResolver_browser(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthExtensionConfiguration.js +var getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig; +var init_httpAuthExtensionConfiguration = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthExtensionConfiguration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; + }, "getHttpAuthExtensionConfiguration"); + resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config3) => { + return { + httpAuthSchemes: config3.httpAuthSchemes(), + httpAuthSchemeProvider: config3.httpAuthSchemeProvider(), + credentials: config3.credentials() + }; + }, "resolveHttpAuthRuntimeConfig"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/runtimeExtensions.js +var resolveRuntimeExtensions; +var init_runtimeExtensions = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/runtimeExtensions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es55(); + init_dist_es2(); + init_dist_es21(); + init_httpAuthExtensionConfiguration(); + resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); + }, "resolveRuntimeExtensions"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/S3Client.js +var S3Client; +var init_S3Client = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/S3Client.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es3(); + init_dist_es26(); + init_dist_es27(); + init_dist_es28(); + init_dist_es29(); + init_dist_es31(); + init_dist_es36(); + init_dist_es37(); + init_dist_es15(); + init_schema3(); + init_dist_es38(); + init_dist_es39(); + init_dist_es41(); + init_dist_es42(); + init_dist_es21(); + init_httpAuthSchemeProvider(); + init_CreateSessionCommand(); + init_EndpointParameters(); + init_runtimeConfig_browser(); + init_runtimeExtensions(); + S3Client = class extends Client { + config; + constructor(...[configuration]) { + const _config_0 = getRuntimeConfig2(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveUserAgentConfig(_config_1); + const _config_3 = resolveFlexibleChecksumsConfig(_config_2); + const _config_4 = resolveRetryConfig(_config_3); + const _config_5 = resolveRegionConfig(_config_4); + const _config_6 = resolveHostHeaderConfig(_config_5); + const _config_7 = resolveEndpointConfig(_config_6); + const _config_8 = resolveEventStreamSerdeConfig(_config_7); + const _config_9 = resolveHttpAuthSchemeConfig(_config_8); + const _config_10 = resolveS3Config(_config_9, { session: [() => this, CreateSessionCommand] }); + const _config_11 = resolveRuntimeExtensions(_config_10, configuration?.extensions || []); + this.config = _config_11; + this.middlewareStack.use(getSchemaSerdePlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: defaultS3HttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config3) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config3.credentials, + "aws.auth#sigv4a": config3.credentials + }) + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + this.middlewareStack.use(getValidateBucketNamePlugin(this.config)); + this.middlewareStack.use(getAddExpectContinuePlugin(this.config)); + this.middlewareStack.use(getRegionRedirectMiddlewarePlugin(this.config)); + this.middlewareStack.use(getS3ExpressPlugin(this.config)); + this.middlewareStack.use(getS3ExpressHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } + }; + __name(S3Client, "S3Client"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/AbortMultipartUploadCommand.js +var AbortMultipartUploadCommand; +var init_AbortMultipartUploadCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/AbortMultipartUploadCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + AbortMultipartUploadCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "AbortMultipartUpload", {}).n("S3Client", "AbortMultipartUploadCommand").sc(AbortMultipartUpload$).build() { + }; + __name(AbortMultipartUploadCommand, "AbortMultipartUploadCommand"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-ssec/dist-es/index.js +function ssecMiddleware(options) { + return (next) => async (args) => { + const input = { ...args.input }; + const properties = [ + { + target: "SSECustomerKey", + hash: "SSECustomerKeyMD5" + }, + { + target: "CopySourceSSECustomerKey", + hash: "CopySourceSSECustomerKeyMD5" + } + ]; + for (const prop of properties) { + const value = input[prop.target]; + if (value) { + let valueForHash; + if (typeof value === "string") { + if (isValidBase64EncodedSSECustomerKey(value, options)) { + valueForHash = options.base64Decoder(value); + } else { + valueForHash = options.utf8Decoder(value); + input[prop.target] = options.base64Encoder(valueForHash); + } + } else { + valueForHash = ArrayBuffer.isView(value) ? new Uint8Array(value.buffer, value.byteOffset, value.byteLength) : new Uint8Array(value); + input[prop.target] = options.base64Encoder(valueForHash); + } + const hash4 = new options.md5(); + hash4.update(valueForHash); + input[prop.hash] = options.base64Encoder(await hash4.digest()); + } + } + return next({ + ...args, + input + }); + }; +} +function isValidBase64EncodedSSECustomerKey(str, options) { + const base64Regex = /^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/; + if (!base64Regex.test(str)) + return false; + try { + const decodedBytes = options.base64Decoder(str); + return decodedBytes.length === 32; + } catch { + return false; + } +} +var ssecMiddlewareOptions, getSsecPlugin; +var init_dist_es56 = __esm({ + "../../node_modules/@aws-sdk/middleware-ssec/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(ssecMiddleware, "ssecMiddleware"); + ssecMiddlewareOptions = { + name: "ssecMiddleware", + step: "initialize", + tags: ["SSE"], + override: true + }; + getSsecPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.add(ssecMiddleware(config3), ssecMiddlewareOptions); + } + }), "getSsecPlugin"); + __name(isValidBase64EncodedSSECustomerKey, "isValidBase64EncodedSSECustomerKey"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CompleteMultipartUploadCommand.js +var CompleteMultipartUploadCommand; +var init_CompleteMultipartUploadCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CompleteMultipartUploadCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CompleteMultipartUploadCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "CompleteMultipartUpload", {}).n("S3Client", "CompleteMultipartUploadCommand").sc(CompleteMultipartUpload$).build() { + }; + __name(CompleteMultipartUploadCommand, "CompleteMultipartUploadCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CopyObjectCommand.js +var CopyObjectCommand; +var init_CopyObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CopyObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CopyObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" }, + CopySource: { type: "contextParams", name: "CopySource" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "CopyObject", {}).n("S3Client", "CopyObjectCommand").sc(CopyObject$).build() { + }; + __name(CopyObjectCommand, "CopyObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-location-constraint/dist-es/index.js +function locationConstraintMiddleware(options) { + return (next) => async (args) => { + const { CreateBucketConfiguration } = args.input; + const region = await options.region(); + if (!CreateBucketConfiguration?.LocationConstraint && !CreateBucketConfiguration?.Location) { + if (region !== "us-east-1") { + args.input.CreateBucketConfiguration = args.input.CreateBucketConfiguration ?? {}; + args.input.CreateBucketConfiguration.LocationConstraint = region; + } + } + return next(args); + }; +} +var locationConstraintMiddlewareOptions, getLocationConstraintPlugin; +var init_dist_es57 = __esm({ + "../../node_modules/@aws-sdk/middleware-location-constraint/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(locationConstraintMiddleware, "locationConstraintMiddleware"); + locationConstraintMiddlewareOptions = { + step: "initialize", + tags: ["LOCATION_CONSTRAINT", "CREATE_BUCKET_CONFIGURATION"], + name: "locationConstraintMiddleware", + override: true + }; + getLocationConstraintPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.add(locationConstraintMiddleware(config3), locationConstraintMiddlewareOptions); + } + }), "getLocationConstraintPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketCommand.js +var CreateBucketCommand; +var init_CreateBucketCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es57(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CreateBucketCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + DisableAccessPoints: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getLocationConstraintPlugin(config3) + ]; + }).s("AmazonS3", "CreateBucket", {}).n("S3Client", "CreateBucketCommand").sc(CreateBucket$).build() { + }; + __name(CreateBucketCommand, "CreateBucketCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataConfigurationCommand.js +var CreateBucketMetadataConfigurationCommand; +var init_CreateBucketMetadataConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CreateBucketMetadataConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "CreateBucketMetadataConfiguration", {}).n("S3Client", "CreateBucketMetadataConfigurationCommand").sc(CreateBucketMetadataConfiguration$).build() { + }; + __name(CreateBucketMetadataConfigurationCommand, "CreateBucketMetadataConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataTableConfigurationCommand.js +var CreateBucketMetadataTableConfigurationCommand; +var init_CreateBucketMetadataTableConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataTableConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CreateBucketMetadataTableConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "CreateBucketMetadataTableConfiguration", {}).n("S3Client", "CreateBucketMetadataTableConfigurationCommand").sc(CreateBucketMetadataTableConfiguration$).build() { + }; + __name(CreateBucketMetadataTableConfigurationCommand, "CreateBucketMetadataTableConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateMultipartUploadCommand.js +var CreateMultipartUploadCommand; +var init_CreateMultipartUploadCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateMultipartUploadCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CreateMultipartUploadCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "CreateMultipartUpload", {}).n("S3Client", "CreateMultipartUploadCommand").sc(CreateMultipartUpload$).build() { + }; + __name(CreateMultipartUploadCommand, "CreateMultipartUploadCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketAnalyticsConfigurationCommand.js +var DeleteBucketAnalyticsConfigurationCommand; +var init_DeleteBucketAnalyticsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketAnalyticsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketAnalyticsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketAnalyticsConfiguration", {}).n("S3Client", "DeleteBucketAnalyticsConfigurationCommand").sc(DeleteBucketAnalyticsConfiguration$).build() { + }; + __name(DeleteBucketAnalyticsConfigurationCommand, "DeleteBucketAnalyticsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCommand.js +var DeleteBucketCommand; +var init_DeleteBucketCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucket", {}).n("S3Client", "DeleteBucketCommand").sc(DeleteBucket$).build() { + }; + __name(DeleteBucketCommand, "DeleteBucketCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCorsCommand.js +var DeleteBucketCorsCommand; +var init_DeleteBucketCorsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCorsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketCorsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketCors", {}).n("S3Client", "DeleteBucketCorsCommand").sc(DeleteBucketCors$).build() { + }; + __name(DeleteBucketCorsCommand, "DeleteBucketCorsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketEncryptionCommand.js +var DeleteBucketEncryptionCommand; +var init_DeleteBucketEncryptionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketEncryptionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketEncryptionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketEncryption", {}).n("S3Client", "DeleteBucketEncryptionCommand").sc(DeleteBucketEncryption$).build() { + }; + __name(DeleteBucketEncryptionCommand, "DeleteBucketEncryptionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketIntelligentTieringConfigurationCommand.js +var DeleteBucketIntelligentTieringConfigurationCommand; +var init_DeleteBucketIntelligentTieringConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketIntelligentTieringConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketIntelligentTieringConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketIntelligentTieringConfiguration", {}).n("S3Client", "DeleteBucketIntelligentTieringConfigurationCommand").sc(DeleteBucketIntelligentTieringConfiguration$).build() { + }; + __name(DeleteBucketIntelligentTieringConfigurationCommand, "DeleteBucketIntelligentTieringConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketInventoryConfigurationCommand.js +var DeleteBucketInventoryConfigurationCommand; +var init_DeleteBucketInventoryConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketInventoryConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketInventoryConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketInventoryConfiguration", {}).n("S3Client", "DeleteBucketInventoryConfigurationCommand").sc(DeleteBucketInventoryConfiguration$).build() { + }; + __name(DeleteBucketInventoryConfigurationCommand, "DeleteBucketInventoryConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketLifecycleCommand.js +var DeleteBucketLifecycleCommand; +var init_DeleteBucketLifecycleCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketLifecycleCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketLifecycleCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketLifecycle", {}).n("S3Client", "DeleteBucketLifecycleCommand").sc(DeleteBucketLifecycle$).build() { + }; + __name(DeleteBucketLifecycleCommand, "DeleteBucketLifecycleCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataConfigurationCommand.js +var DeleteBucketMetadataConfigurationCommand; +var init_DeleteBucketMetadataConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketMetadataConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketMetadataConfiguration", {}).n("S3Client", "DeleteBucketMetadataConfigurationCommand").sc(DeleteBucketMetadataConfiguration$).build() { + }; + __name(DeleteBucketMetadataConfigurationCommand, "DeleteBucketMetadataConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataTableConfigurationCommand.js +var DeleteBucketMetadataTableConfigurationCommand; +var init_DeleteBucketMetadataTableConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataTableConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketMetadataTableConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketMetadataTableConfiguration", {}).n("S3Client", "DeleteBucketMetadataTableConfigurationCommand").sc(DeleteBucketMetadataTableConfiguration$).build() { + }; + __name(DeleteBucketMetadataTableConfigurationCommand, "DeleteBucketMetadataTableConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetricsConfigurationCommand.js +var DeleteBucketMetricsConfigurationCommand; +var init_DeleteBucketMetricsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetricsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketMetricsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketMetricsConfiguration", {}).n("S3Client", "DeleteBucketMetricsConfigurationCommand").sc(DeleteBucketMetricsConfiguration$).build() { + }; + __name(DeleteBucketMetricsConfigurationCommand, "DeleteBucketMetricsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketOwnershipControlsCommand.js +var DeleteBucketOwnershipControlsCommand; +var init_DeleteBucketOwnershipControlsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketOwnershipControlsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketOwnershipControlsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketOwnershipControls", {}).n("S3Client", "DeleteBucketOwnershipControlsCommand").sc(DeleteBucketOwnershipControls$).build() { + }; + __name(DeleteBucketOwnershipControlsCommand, "DeleteBucketOwnershipControlsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketPolicyCommand.js +var DeleteBucketPolicyCommand; +var init_DeleteBucketPolicyCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketPolicyCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketPolicyCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketPolicy", {}).n("S3Client", "DeleteBucketPolicyCommand").sc(DeleteBucketPolicy$).build() { + }; + __name(DeleteBucketPolicyCommand, "DeleteBucketPolicyCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketReplicationCommand.js +var DeleteBucketReplicationCommand; +var init_DeleteBucketReplicationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketReplicationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketReplicationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketReplication", {}).n("S3Client", "DeleteBucketReplicationCommand").sc(DeleteBucketReplication$).build() { + }; + __name(DeleteBucketReplicationCommand, "DeleteBucketReplicationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketTaggingCommand.js +var DeleteBucketTaggingCommand; +var init_DeleteBucketTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketTagging", {}).n("S3Client", "DeleteBucketTaggingCommand").sc(DeleteBucketTagging$).build() { + }; + __name(DeleteBucketTaggingCommand, "DeleteBucketTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketWebsiteCommand.js +var DeleteBucketWebsiteCommand; +var init_DeleteBucketWebsiteCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketWebsiteCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketWebsiteCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketWebsite", {}).n("S3Client", "DeleteBucketWebsiteCommand").sc(DeleteBucketWebsite$).build() { + }; + __name(DeleteBucketWebsiteCommand, "DeleteBucketWebsiteCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectCommand.js +var DeleteObjectCommand; +var init_DeleteObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "DeleteObject", {}).n("S3Client", "DeleteObjectCommand").sc(DeleteObject$).build() { + }; + __name(DeleteObjectCommand, "DeleteObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectsCommand.js +var DeleteObjectsCommand; +var init_DeleteObjectsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteObjectsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "DeleteObjects", {}).n("S3Client", "DeleteObjectsCommand").sc(DeleteObjects$).build() { + }; + __name(DeleteObjectsCommand, "DeleteObjectsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectTaggingCommand.js +var DeleteObjectTaggingCommand; +var init_DeleteObjectTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteObjectTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "DeleteObjectTagging", {}).n("S3Client", "DeleteObjectTaggingCommand").sc(DeleteObjectTagging$).build() { + }; + __name(DeleteObjectTaggingCommand, "DeleteObjectTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeletePublicAccessBlockCommand.js +var DeletePublicAccessBlockCommand; +var init_DeletePublicAccessBlockCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeletePublicAccessBlockCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeletePublicAccessBlockCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeletePublicAccessBlock", {}).n("S3Client", "DeletePublicAccessBlockCommand").sc(DeletePublicAccessBlock$).build() { + }; + __name(DeletePublicAccessBlockCommand, "DeletePublicAccessBlockCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAbacCommand.js +var GetBucketAbacCommand; +var init_GetBucketAbacCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAbacCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketAbacCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketAbac", {}).n("S3Client", "GetBucketAbacCommand").sc(GetBucketAbac$).build() { + }; + __name(GetBucketAbacCommand, "GetBucketAbacCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAccelerateConfigurationCommand.js +var GetBucketAccelerateConfigurationCommand; +var init_GetBucketAccelerateConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAccelerateConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketAccelerateConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketAccelerateConfiguration", {}).n("S3Client", "GetBucketAccelerateConfigurationCommand").sc(GetBucketAccelerateConfiguration$).build() { + }; + __name(GetBucketAccelerateConfigurationCommand, "GetBucketAccelerateConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAclCommand.js +var GetBucketAclCommand; +var init_GetBucketAclCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAclCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketAclCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketAcl", {}).n("S3Client", "GetBucketAclCommand").sc(GetBucketAcl$).build() { + }; + __name(GetBucketAclCommand, "GetBucketAclCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAnalyticsConfigurationCommand.js +var GetBucketAnalyticsConfigurationCommand; +var init_GetBucketAnalyticsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAnalyticsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketAnalyticsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketAnalyticsConfiguration", {}).n("S3Client", "GetBucketAnalyticsConfigurationCommand").sc(GetBucketAnalyticsConfiguration$).build() { + }; + __name(GetBucketAnalyticsConfigurationCommand, "GetBucketAnalyticsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketCorsCommand.js +var GetBucketCorsCommand; +var init_GetBucketCorsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketCorsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketCorsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketCors", {}).n("S3Client", "GetBucketCorsCommand").sc(GetBucketCors$).build() { + }; + __name(GetBucketCorsCommand, "GetBucketCorsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketEncryptionCommand.js +var GetBucketEncryptionCommand; +var init_GetBucketEncryptionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketEncryptionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketEncryptionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketEncryption", {}).n("S3Client", "GetBucketEncryptionCommand").sc(GetBucketEncryption$).build() { + }; + __name(GetBucketEncryptionCommand, "GetBucketEncryptionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketIntelligentTieringConfigurationCommand.js +var GetBucketIntelligentTieringConfigurationCommand; +var init_GetBucketIntelligentTieringConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketIntelligentTieringConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketIntelligentTieringConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketIntelligentTieringConfiguration", {}).n("S3Client", "GetBucketIntelligentTieringConfigurationCommand").sc(GetBucketIntelligentTieringConfiguration$).build() { + }; + __name(GetBucketIntelligentTieringConfigurationCommand, "GetBucketIntelligentTieringConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketInventoryConfigurationCommand.js +var GetBucketInventoryConfigurationCommand; +var init_GetBucketInventoryConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketInventoryConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketInventoryConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketInventoryConfiguration", {}).n("S3Client", "GetBucketInventoryConfigurationCommand").sc(GetBucketInventoryConfiguration$).build() { + }; + __name(GetBucketInventoryConfigurationCommand, "GetBucketInventoryConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLifecycleConfigurationCommand.js +var GetBucketLifecycleConfigurationCommand; +var init_GetBucketLifecycleConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLifecycleConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketLifecycleConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketLifecycleConfiguration", {}).n("S3Client", "GetBucketLifecycleConfigurationCommand").sc(GetBucketLifecycleConfiguration$).build() { + }; + __name(GetBucketLifecycleConfigurationCommand, "GetBucketLifecycleConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLocationCommand.js +var GetBucketLocationCommand; +var init_GetBucketLocationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLocationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketLocationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketLocation", {}).n("S3Client", "GetBucketLocationCommand").sc(GetBucketLocation$).build() { + }; + __name(GetBucketLocationCommand, "GetBucketLocationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLoggingCommand.js +var GetBucketLoggingCommand; +var init_GetBucketLoggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLoggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketLoggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketLogging", {}).n("S3Client", "GetBucketLoggingCommand").sc(GetBucketLogging$).build() { + }; + __name(GetBucketLoggingCommand, "GetBucketLoggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataConfigurationCommand.js +var GetBucketMetadataConfigurationCommand; +var init_GetBucketMetadataConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketMetadataConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketMetadataConfiguration", {}).n("S3Client", "GetBucketMetadataConfigurationCommand").sc(GetBucketMetadataConfiguration$).build() { + }; + __name(GetBucketMetadataConfigurationCommand, "GetBucketMetadataConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataTableConfigurationCommand.js +var GetBucketMetadataTableConfigurationCommand; +var init_GetBucketMetadataTableConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataTableConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketMetadataTableConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketMetadataTableConfiguration", {}).n("S3Client", "GetBucketMetadataTableConfigurationCommand").sc(GetBucketMetadataTableConfiguration$).build() { + }; + __name(GetBucketMetadataTableConfigurationCommand, "GetBucketMetadataTableConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetricsConfigurationCommand.js +var GetBucketMetricsConfigurationCommand; +var init_GetBucketMetricsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetricsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketMetricsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketMetricsConfiguration", {}).n("S3Client", "GetBucketMetricsConfigurationCommand").sc(GetBucketMetricsConfiguration$).build() { + }; + __name(GetBucketMetricsConfigurationCommand, "GetBucketMetricsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketNotificationConfigurationCommand.js +var GetBucketNotificationConfigurationCommand; +var init_GetBucketNotificationConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketNotificationConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketNotificationConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketNotificationConfiguration", {}).n("S3Client", "GetBucketNotificationConfigurationCommand").sc(GetBucketNotificationConfiguration$).build() { + }; + __name(GetBucketNotificationConfigurationCommand, "GetBucketNotificationConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketOwnershipControlsCommand.js +var GetBucketOwnershipControlsCommand; +var init_GetBucketOwnershipControlsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketOwnershipControlsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketOwnershipControlsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketOwnershipControls", {}).n("S3Client", "GetBucketOwnershipControlsCommand").sc(GetBucketOwnershipControls$).build() { + }; + __name(GetBucketOwnershipControlsCommand, "GetBucketOwnershipControlsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyCommand.js +var GetBucketPolicyCommand; +var init_GetBucketPolicyCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketPolicyCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketPolicy", {}).n("S3Client", "GetBucketPolicyCommand").sc(GetBucketPolicy$).build() { + }; + __name(GetBucketPolicyCommand, "GetBucketPolicyCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyStatusCommand.js +var GetBucketPolicyStatusCommand; +var init_GetBucketPolicyStatusCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyStatusCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketPolicyStatusCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketPolicyStatus", {}).n("S3Client", "GetBucketPolicyStatusCommand").sc(GetBucketPolicyStatus$).build() { + }; + __name(GetBucketPolicyStatusCommand, "GetBucketPolicyStatusCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketReplicationCommand.js +var GetBucketReplicationCommand; +var init_GetBucketReplicationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketReplicationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketReplicationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketReplication", {}).n("S3Client", "GetBucketReplicationCommand").sc(GetBucketReplication$).build() { + }; + __name(GetBucketReplicationCommand, "GetBucketReplicationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketRequestPaymentCommand.js +var GetBucketRequestPaymentCommand; +var init_GetBucketRequestPaymentCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketRequestPaymentCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketRequestPaymentCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketRequestPayment", {}).n("S3Client", "GetBucketRequestPaymentCommand").sc(GetBucketRequestPayment$).build() { + }; + __name(GetBucketRequestPaymentCommand, "GetBucketRequestPaymentCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketTaggingCommand.js +var GetBucketTaggingCommand; +var init_GetBucketTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketTagging", {}).n("S3Client", "GetBucketTaggingCommand").sc(GetBucketTagging$).build() { + }; + __name(GetBucketTaggingCommand, "GetBucketTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketVersioningCommand.js +var GetBucketVersioningCommand; +var init_GetBucketVersioningCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketVersioningCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketVersioningCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketVersioning", {}).n("S3Client", "GetBucketVersioningCommand").sc(GetBucketVersioning$).build() { + }; + __name(GetBucketVersioningCommand, "GetBucketVersioningCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketWebsiteCommand.js +var GetBucketWebsiteCommand; +var init_GetBucketWebsiteCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketWebsiteCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketWebsiteCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketWebsite", {}).n("S3Client", "GetBucketWebsiteCommand").sc(GetBucketWebsite$).build() { + }; + __name(GetBucketWebsiteCommand, "GetBucketWebsiteCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAclCommand.js +var GetObjectAclCommand; +var init_GetObjectAclCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAclCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectAclCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectAcl", {}).n("S3Client", "GetObjectAclCommand").sc(GetObjectAcl$).build() { + }; + __name(GetObjectAclCommand, "GetObjectAclCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAttributesCommand.js +var GetObjectAttributesCommand; +var init_GetObjectAttributesCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAttributesCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectAttributesCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectAttributes", {}).n("S3Client", "GetObjectAttributesCommand").sc(GetObjectAttributes$).build() { + }; + __name(GetObjectAttributesCommand, "GetObjectAttributesCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectCommand.js +var GetObjectCommand; +var init_GetObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestChecksumRequired: false, + requestValidationModeMember: "ChecksumMode", + "responseAlgorithms": ["CRC64NVME", "CRC32", "CRC32C", "SHA256", "SHA1"] + }), + getSsecPlugin(config3), + getS3ExpiresMiddlewarePlugin(config3) + ]; + }).s("AmazonS3", "GetObject", {}).n("S3Client", "GetObjectCommand").sc(GetObject$).build() { + }; + __name(GetObjectCommand, "GetObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLegalHoldCommand.js +var GetObjectLegalHoldCommand; +var init_GetObjectLegalHoldCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLegalHoldCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectLegalHoldCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectLegalHold", {}).n("S3Client", "GetObjectLegalHoldCommand").sc(GetObjectLegalHold$).build() { + }; + __name(GetObjectLegalHoldCommand, "GetObjectLegalHoldCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLockConfigurationCommand.js +var GetObjectLockConfigurationCommand; +var init_GetObjectLockConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLockConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectLockConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectLockConfiguration", {}).n("S3Client", "GetObjectLockConfigurationCommand").sc(GetObjectLockConfiguration$).build() { + }; + __name(GetObjectLockConfigurationCommand, "GetObjectLockConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectRetentionCommand.js +var GetObjectRetentionCommand; +var init_GetObjectRetentionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectRetentionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectRetentionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectRetention", {}).n("S3Client", "GetObjectRetentionCommand").sc(GetObjectRetention$).build() { + }; + __name(GetObjectRetentionCommand, "GetObjectRetentionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTaggingCommand.js +var GetObjectTaggingCommand; +var init_GetObjectTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectTagging", {}).n("S3Client", "GetObjectTaggingCommand").sc(GetObjectTagging$).build() { + }; + __name(GetObjectTaggingCommand, "GetObjectTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTorrentCommand.js +var GetObjectTorrentCommand; +var init_GetObjectTorrentCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTorrentCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectTorrentCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "GetObjectTorrent", {}).n("S3Client", "GetObjectTorrentCommand").sc(GetObjectTorrent$).build() { + }; + __name(GetObjectTorrentCommand, "GetObjectTorrentCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetPublicAccessBlockCommand.js +var GetPublicAccessBlockCommand; +var init_GetPublicAccessBlockCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetPublicAccessBlockCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetPublicAccessBlockCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetPublicAccessBlock", {}).n("S3Client", "GetPublicAccessBlockCommand").sc(GetPublicAccessBlock$).build() { + }; + __name(GetPublicAccessBlockCommand, "GetPublicAccessBlockCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadBucketCommand.js +var HeadBucketCommand; +var init_HeadBucketCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadBucketCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + HeadBucketCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "HeadBucket", {}).n("S3Client", "HeadBucketCommand").sc(HeadBucket$).build() { + }; + __name(HeadBucketCommand, "HeadBucketCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadObjectCommand.js +var HeadObjectCommand; +var init_HeadObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + HeadObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3), + getS3ExpiresMiddlewarePlugin(config3) + ]; + }).s("AmazonS3", "HeadObject", {}).n("S3Client", "HeadObjectCommand").sc(HeadObject$).build() { + }; + __name(HeadObjectCommand, "HeadObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketAnalyticsConfigurationsCommand.js +var ListBucketAnalyticsConfigurationsCommand; +var init_ListBucketAnalyticsConfigurationsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketAnalyticsConfigurationsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListBucketAnalyticsConfigurationsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListBucketAnalyticsConfigurations", {}).n("S3Client", "ListBucketAnalyticsConfigurationsCommand").sc(ListBucketAnalyticsConfigurations$).build() { + }; + __name(ListBucketAnalyticsConfigurationsCommand, "ListBucketAnalyticsConfigurationsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketIntelligentTieringConfigurationsCommand.js +var ListBucketIntelligentTieringConfigurationsCommand; +var init_ListBucketIntelligentTieringConfigurationsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketIntelligentTieringConfigurationsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListBucketIntelligentTieringConfigurationsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListBucketIntelligentTieringConfigurations", {}).n("S3Client", "ListBucketIntelligentTieringConfigurationsCommand").sc(ListBucketIntelligentTieringConfigurations$).build() { + }; + __name(ListBucketIntelligentTieringConfigurationsCommand, "ListBucketIntelligentTieringConfigurationsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketInventoryConfigurationsCommand.js +var ListBucketInventoryConfigurationsCommand; +var init_ListBucketInventoryConfigurationsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketInventoryConfigurationsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListBucketInventoryConfigurationsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListBucketInventoryConfigurations", {}).n("S3Client", "ListBucketInventoryConfigurationsCommand").sc(ListBucketInventoryConfigurations$).build() { + }; + __name(ListBucketInventoryConfigurationsCommand, "ListBucketInventoryConfigurationsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketMetricsConfigurationsCommand.js +var ListBucketMetricsConfigurationsCommand; +var init_ListBucketMetricsConfigurationsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketMetricsConfigurationsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListBucketMetricsConfigurationsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListBucketMetricsConfigurations", {}).n("S3Client", "ListBucketMetricsConfigurationsCommand").sc(ListBucketMetricsConfigurations$).build() { + }; + __name(ListBucketMetricsConfigurationsCommand, "ListBucketMetricsConfigurationsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketsCommand.js +var ListBucketsCommand; +var init_ListBucketsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListBucketsCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListBuckets", {}).n("S3Client", "ListBucketsCommand").sc(ListBuckets$).build() { + }; + __name(ListBucketsCommand, "ListBucketsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListDirectoryBucketsCommand.js +var ListDirectoryBucketsCommand; +var init_ListDirectoryBucketsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListDirectoryBucketsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListDirectoryBucketsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListDirectoryBuckets", {}).n("S3Client", "ListDirectoryBucketsCommand").sc(ListDirectoryBuckets$).build() { + }; + __name(ListDirectoryBucketsCommand, "ListDirectoryBucketsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListMultipartUploadsCommand.js +var ListMultipartUploadsCommand; +var init_ListMultipartUploadsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListMultipartUploadsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListMultipartUploadsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListMultipartUploads", {}).n("S3Client", "ListMultipartUploadsCommand").sc(ListMultipartUploads$).build() { + }; + __name(ListMultipartUploadsCommand, "ListMultipartUploadsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsCommand.js +var ListObjectsCommand; +var init_ListObjectsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListObjectsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListObjects", {}).n("S3Client", "ListObjectsCommand").sc(ListObjects$).build() { + }; + __name(ListObjectsCommand, "ListObjectsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsV2Command.js +var ListObjectsV2Command; +var init_ListObjectsV2Command = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsV2Command.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListObjectsV2Command = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListObjectsV2", {}).n("S3Client", "ListObjectsV2Command").sc(ListObjectsV2$).build() { + }; + __name(ListObjectsV2Command, "ListObjectsV2Command"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectVersionsCommand.js +var ListObjectVersionsCommand; +var init_ListObjectVersionsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectVersionsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListObjectVersionsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListObjectVersions", {}).n("S3Client", "ListObjectVersionsCommand").sc(ListObjectVersions$).build() { + }; + __name(ListObjectVersionsCommand, "ListObjectVersionsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListPartsCommand.js +var ListPartsCommand; +var init_ListPartsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListPartsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListPartsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "ListParts", {}).n("S3Client", "ListPartsCommand").sc(ListParts$).build() { + }; + __name(ListPartsCommand, "ListPartsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAbacCommand.js +var PutBucketAbacCommand; +var init_PutBucketAbacCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAbacCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketAbacCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: false + }) + ]; + }).s("AmazonS3", "PutBucketAbac", {}).n("S3Client", "PutBucketAbacCommand").sc(PutBucketAbac$).build() { + }; + __name(PutBucketAbacCommand, "PutBucketAbacCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAccelerateConfigurationCommand.js +var PutBucketAccelerateConfigurationCommand; +var init_PutBucketAccelerateConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAccelerateConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketAccelerateConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: false + }) + ]; + }).s("AmazonS3", "PutBucketAccelerateConfiguration", {}).n("S3Client", "PutBucketAccelerateConfigurationCommand").sc(PutBucketAccelerateConfiguration$).build() { + }; + __name(PutBucketAccelerateConfigurationCommand, "PutBucketAccelerateConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAclCommand.js +var PutBucketAclCommand; +var init_PutBucketAclCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAclCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketAclCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketAcl", {}).n("S3Client", "PutBucketAclCommand").sc(PutBucketAcl$).build() { + }; + __name(PutBucketAclCommand, "PutBucketAclCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAnalyticsConfigurationCommand.js +var PutBucketAnalyticsConfigurationCommand; +var init_PutBucketAnalyticsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAnalyticsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketAnalyticsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "PutBucketAnalyticsConfiguration", {}).n("S3Client", "PutBucketAnalyticsConfigurationCommand").sc(PutBucketAnalyticsConfiguration$).build() { + }; + __name(PutBucketAnalyticsConfigurationCommand, "PutBucketAnalyticsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketCorsCommand.js +var PutBucketCorsCommand; +var init_PutBucketCorsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketCorsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketCorsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketCors", {}).n("S3Client", "PutBucketCorsCommand").sc(PutBucketCors$).build() { + }; + __name(PutBucketCorsCommand, "PutBucketCorsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketEncryptionCommand.js +var PutBucketEncryptionCommand; +var init_PutBucketEncryptionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketEncryptionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketEncryptionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketEncryption", {}).n("S3Client", "PutBucketEncryptionCommand").sc(PutBucketEncryption$).build() { + }; + __name(PutBucketEncryptionCommand, "PutBucketEncryptionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketIntelligentTieringConfigurationCommand.js +var PutBucketIntelligentTieringConfigurationCommand; +var init_PutBucketIntelligentTieringConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketIntelligentTieringConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketIntelligentTieringConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "PutBucketIntelligentTieringConfiguration", {}).n("S3Client", "PutBucketIntelligentTieringConfigurationCommand").sc(PutBucketIntelligentTieringConfiguration$).build() { + }; + __name(PutBucketIntelligentTieringConfigurationCommand, "PutBucketIntelligentTieringConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketInventoryConfigurationCommand.js +var PutBucketInventoryConfigurationCommand; +var init_PutBucketInventoryConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketInventoryConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketInventoryConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "PutBucketInventoryConfiguration", {}).n("S3Client", "PutBucketInventoryConfigurationCommand").sc(PutBucketInventoryConfiguration$).build() { + }; + __name(PutBucketInventoryConfigurationCommand, "PutBucketInventoryConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLifecycleConfigurationCommand.js +var PutBucketLifecycleConfigurationCommand; +var init_PutBucketLifecycleConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLifecycleConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketLifecycleConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutBucketLifecycleConfiguration", {}).n("S3Client", "PutBucketLifecycleConfigurationCommand").sc(PutBucketLifecycleConfiguration$).build() { + }; + __name(PutBucketLifecycleConfigurationCommand, "PutBucketLifecycleConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLoggingCommand.js +var PutBucketLoggingCommand; +var init_PutBucketLoggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLoggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketLoggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketLogging", {}).n("S3Client", "PutBucketLoggingCommand").sc(PutBucketLogging$).build() { + }; + __name(PutBucketLoggingCommand, "PutBucketLoggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketMetricsConfigurationCommand.js +var PutBucketMetricsConfigurationCommand; +var init_PutBucketMetricsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketMetricsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketMetricsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "PutBucketMetricsConfiguration", {}).n("S3Client", "PutBucketMetricsConfigurationCommand").sc(PutBucketMetricsConfiguration$).build() { + }; + __name(PutBucketMetricsConfigurationCommand, "PutBucketMetricsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketNotificationConfigurationCommand.js +var PutBucketNotificationConfigurationCommand; +var init_PutBucketNotificationConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketNotificationConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketNotificationConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "PutBucketNotificationConfiguration", {}).n("S3Client", "PutBucketNotificationConfigurationCommand").sc(PutBucketNotificationConfiguration$).build() { + }; + __name(PutBucketNotificationConfigurationCommand, "PutBucketNotificationConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketOwnershipControlsCommand.js +var PutBucketOwnershipControlsCommand; +var init_PutBucketOwnershipControlsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketOwnershipControlsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketOwnershipControlsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketOwnershipControls", {}).n("S3Client", "PutBucketOwnershipControlsCommand").sc(PutBucketOwnershipControls$).build() { + }; + __name(PutBucketOwnershipControlsCommand, "PutBucketOwnershipControlsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketPolicyCommand.js +var PutBucketPolicyCommand; +var init_PutBucketPolicyCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketPolicyCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketPolicyCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketPolicy", {}).n("S3Client", "PutBucketPolicyCommand").sc(PutBucketPolicy$).build() { + }; + __name(PutBucketPolicyCommand, "PutBucketPolicyCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketReplicationCommand.js +var PutBucketReplicationCommand; +var init_PutBucketReplicationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketReplicationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketReplicationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketReplication", {}).n("S3Client", "PutBucketReplicationCommand").sc(PutBucketReplication$).build() { + }; + __name(PutBucketReplicationCommand, "PutBucketReplicationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketRequestPaymentCommand.js +var PutBucketRequestPaymentCommand; +var init_PutBucketRequestPaymentCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketRequestPaymentCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketRequestPaymentCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketRequestPayment", {}).n("S3Client", "PutBucketRequestPaymentCommand").sc(PutBucketRequestPayment$).build() { + }; + __name(PutBucketRequestPaymentCommand, "PutBucketRequestPaymentCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketTaggingCommand.js +var PutBucketTaggingCommand; +var init_PutBucketTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketTagging", {}).n("S3Client", "PutBucketTaggingCommand").sc(PutBucketTagging$).build() { + }; + __name(PutBucketTaggingCommand, "PutBucketTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketVersioningCommand.js +var PutBucketVersioningCommand; +var init_PutBucketVersioningCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketVersioningCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketVersioningCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketVersioning", {}).n("S3Client", "PutBucketVersioningCommand").sc(PutBucketVersioning$).build() { + }; + __name(PutBucketVersioningCommand, "PutBucketVersioningCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketWebsiteCommand.js +var PutBucketWebsiteCommand; +var init_PutBucketWebsiteCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketWebsiteCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketWebsiteCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketWebsite", {}).n("S3Client", "PutBucketWebsiteCommand").sc(PutBucketWebsite$).build() { + }; + __name(PutBucketWebsiteCommand, "PutBucketWebsiteCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectAclCommand.js +var PutObjectAclCommand; +var init_PutObjectAclCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectAclCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectAclCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutObjectAcl", {}).n("S3Client", "PutObjectAclCommand").sc(PutObjectAcl$).build() { + }; + __name(PutObjectAclCommand, "PutObjectAclCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectCommand.js +var PutObjectCommand; +var init_PutObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: false + }), + getCheckContentLengthHeaderPlugin(config3), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "PutObject", {}).n("S3Client", "PutObjectCommand").sc(PutObject$).build() { + }; + __name(PutObjectCommand, "PutObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLegalHoldCommand.js +var PutObjectLegalHoldCommand; +var init_PutObjectLegalHoldCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLegalHoldCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectLegalHoldCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutObjectLegalHold", {}).n("S3Client", "PutObjectLegalHoldCommand").sc(PutObjectLegalHold$).build() { + }; + __name(PutObjectLegalHoldCommand, "PutObjectLegalHoldCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLockConfigurationCommand.js +var PutObjectLockConfigurationCommand; +var init_PutObjectLockConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLockConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectLockConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutObjectLockConfiguration", {}).n("S3Client", "PutObjectLockConfigurationCommand").sc(PutObjectLockConfiguration$).build() { + }; + __name(PutObjectLockConfigurationCommand, "PutObjectLockConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectRetentionCommand.js +var PutObjectRetentionCommand; +var init_PutObjectRetentionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectRetentionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectRetentionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutObjectRetention", {}).n("S3Client", "PutObjectRetentionCommand").sc(PutObjectRetention$).build() { + }; + __name(PutObjectRetentionCommand, "PutObjectRetentionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectTaggingCommand.js +var PutObjectTaggingCommand; +var init_PutObjectTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutObjectTagging", {}).n("S3Client", "PutObjectTaggingCommand").sc(PutObjectTagging$).build() { + }; + __name(PutObjectTaggingCommand, "PutObjectTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutPublicAccessBlockCommand.js +var PutPublicAccessBlockCommand; +var init_PutPublicAccessBlockCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutPublicAccessBlockCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutPublicAccessBlockCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutPublicAccessBlock", {}).n("S3Client", "PutPublicAccessBlockCommand").sc(PutPublicAccessBlock$).build() { + }; + __name(PutPublicAccessBlockCommand, "PutPublicAccessBlockCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/RenameObjectCommand.js +var RenameObjectCommand; +var init_RenameObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/RenameObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + RenameObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "RenameObject", {}).n("S3Client", "RenameObjectCommand").sc(RenameObject$).build() { + }; + __name(RenameObjectCommand, "RenameObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/RestoreObjectCommand.js +var RestoreObjectCommand; +var init_RestoreObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/RestoreObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + RestoreObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: false + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "RestoreObject", {}).n("S3Client", "RestoreObjectCommand").sc(RestoreObject$).build() { + }; + __name(RestoreObjectCommand, "RestoreObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/SelectObjectContentCommand.js +var SelectObjectContentCommand; +var init_SelectObjectContentCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/SelectObjectContentCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + SelectObjectContentCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "SelectObjectContent", { + eventStream: { + output: true + } + }).n("S3Client", "SelectObjectContentCommand").sc(SelectObjectContent$).build() { + }; + __name(SelectObjectContentCommand, "SelectObjectContentCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataInventoryTableConfigurationCommand.js +var UpdateBucketMetadataInventoryTableConfigurationCommand; +var init_UpdateBucketMetadataInventoryTableConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataInventoryTableConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + UpdateBucketMetadataInventoryTableConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "UpdateBucketMetadataInventoryTableConfiguration", {}).n("S3Client", "UpdateBucketMetadataInventoryTableConfigurationCommand").sc(UpdateBucketMetadataInventoryTableConfiguration$).build() { + }; + __name(UpdateBucketMetadataInventoryTableConfigurationCommand, "UpdateBucketMetadataInventoryTableConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataJournalTableConfigurationCommand.js +var UpdateBucketMetadataJournalTableConfigurationCommand; +var init_UpdateBucketMetadataJournalTableConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataJournalTableConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + UpdateBucketMetadataJournalTableConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "UpdateBucketMetadataJournalTableConfiguration", {}).n("S3Client", "UpdateBucketMetadataJournalTableConfigurationCommand").sc(UpdateBucketMetadataJournalTableConfiguration$).build() { + }; + __name(UpdateBucketMetadataJournalTableConfigurationCommand, "UpdateBucketMetadataJournalTableConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateObjectEncryptionCommand.js +var UpdateObjectEncryptionCommand; +var init_UpdateObjectEncryptionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateObjectEncryptionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + UpdateObjectEncryptionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "UpdateObjectEncryption", {}).n("S3Client", "UpdateObjectEncryptionCommand").sc(UpdateObjectEncryption$).build() { + }; + __name(UpdateObjectEncryptionCommand, "UpdateObjectEncryptionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCommand.js +var UploadPartCommand; +var init_UploadPartCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + UploadPartCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: false + }), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "UploadPart", {}).n("S3Client", "UploadPartCommand").sc(UploadPart$).build() { + }; + __name(UploadPartCommand, "UploadPartCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCopyCommand.js +var UploadPartCopyCommand; +var init_UploadPartCopyCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCopyCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + UploadPartCopyCommand = class extends Command.classBuilder().ep({ + ...commonParams, + DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "UploadPartCopy", {}).n("S3Client", "UploadPartCopyCommand").sc(UploadPartCopy$).build() { + }; + __name(UploadPartCopyCommand, "UploadPartCopyCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/WriteGetObjectResponseCommand.js +var WriteGetObjectResponseCommand; +var init_WriteGetObjectResponseCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/WriteGetObjectResponseCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + WriteGetObjectResponseCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseObjectLambdaEndpoint: { type: "staticContextParams", value: true } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "WriteGetObjectResponse", {}).n("S3Client", "WriteGetObjectResponseCommand").sc(WriteGetObjectResponse$).build() { + }; + __name(WriteGetObjectResponseCommand, "WriteGetObjectResponseCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListBucketsPaginator.js +var paginateListBuckets; +var init_ListBucketsPaginator = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListBucketsPaginator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_ListBucketsCommand(); + init_S3Client(); + paginateListBuckets = createPaginator(S3Client, ListBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxBuckets"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListDirectoryBucketsPaginator.js +var paginateListDirectoryBuckets; +var init_ListDirectoryBucketsPaginator = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListDirectoryBucketsPaginator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_ListDirectoryBucketsCommand(); + init_S3Client(); + paginateListDirectoryBuckets = createPaginator(S3Client, ListDirectoryBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxDirectoryBuckets"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListObjectsV2Paginator.js +var paginateListObjectsV2; +var init_ListObjectsV2Paginator = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListObjectsV2Paginator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_ListObjectsV2Command(); + init_S3Client(); + paginateListObjectsV2 = createPaginator(S3Client, ListObjectsV2Command, "ContinuationToken", "NextContinuationToken", "MaxKeys"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListPartsPaginator.js +var paginateListParts; +var init_ListPartsPaginator = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListPartsPaginator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_ListPartsCommand(); + init_S3Client(); + paginateListParts = createPaginator(S3Client, ListPartsCommand, "PartNumberMarker", "NextPartNumberMarker", "MaxParts"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/circularReplacer.js +var getCircularReplacer; +var init_circularReplacer = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/circularReplacer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getCircularReplacer = /* @__PURE__ */ __name(() => { + const seen = /* @__PURE__ */ new WeakSet(); + return (key, value) => { + if (typeof value === "object" && value !== null) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }; + }, "getCircularReplacer"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/utils/sleep.js +var sleep; +var init_sleep = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/utils/sleep.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + sleep = /* @__PURE__ */ __name((seconds) => { + return new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); + }, "sleep"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/waiter.js +var waiterServiceDefaults, WaiterState, checkExceptions; +var init_waiter2 = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/waiter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_circularReplacer(); + waiterServiceDefaults = { + minDelay: 2, + maxDelay: 120 + }; + (function(WaiterState2) { + WaiterState2["ABORTED"] = "ABORTED"; + WaiterState2["FAILURE"] = "FAILURE"; + WaiterState2["SUCCESS"] = "SUCCESS"; + WaiterState2["RETRY"] = "RETRY"; + WaiterState2["TIMEOUT"] = "TIMEOUT"; + })(WaiterState || (WaiterState = {})); + checkExceptions = /* @__PURE__ */ __name((result) => { + if (result.state === WaiterState.ABORTED) { + const abortError = new Error(`${JSON.stringify({ + ...result, + reason: "Request was aborted" + }, getCircularReplacer())}`); + abortError.name = "AbortError"; + throw abortError; + } else if (result.state === WaiterState.TIMEOUT) { + const timeoutError = new Error(`${JSON.stringify({ + ...result, + reason: "Waiter has timed out" + }, getCircularReplacer())}`); + timeoutError.name = "TimeoutError"; + throw timeoutError; + } else if (result.state !== WaiterState.SUCCESS) { + throw new Error(`${JSON.stringify(result, getCircularReplacer())}`); + } + return result; + }, "checkExceptions"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/poller.js +var exponentialBackoffWithJitter, randomInRange, runPolling, createMessageFromResponse; +var init_poller = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/poller.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_circularReplacer(); + init_sleep(); + init_waiter2(); + exponentialBackoffWithJitter = /* @__PURE__ */ __name((minDelay, maxDelay, attemptCeiling, attempt) => { + if (attempt > attemptCeiling) + return maxDelay; + const delay = minDelay * 2 ** (attempt - 1); + return randomInRange(minDelay, delay); + }, "exponentialBackoffWithJitter"); + randomInRange = /* @__PURE__ */ __name((min, max2) => min + Math.random() * (max2 - min), "randomInRange"); + runPolling = /* @__PURE__ */ __name(async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => { + const observedResponses = {}; + const { state, reason } = await acceptorChecks(client, input); + if (reason) { + const message2 = createMessageFromResponse(reason); + observedResponses[message2] |= 0; + observedResponses[message2] += 1; + } + if (state !== WaiterState.RETRY) { + return { state, reason, observedResponses }; + } + let currentAttempt = 1; + const waitUntil = Date.now() + maxWaitTime * 1e3; + const attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1; + while (true) { + if (abortController?.signal?.aborted || abortSignal?.aborted) { + const message2 = "AbortController signal aborted."; + observedResponses[message2] |= 0; + observedResponses[message2] += 1; + return { state: WaiterState.ABORTED, observedResponses }; + } + const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt); + if (Date.now() + delay * 1e3 > waitUntil) { + return { state: WaiterState.TIMEOUT, observedResponses }; + } + await sleep(delay); + const { state: state2, reason: reason2 } = await acceptorChecks(client, input); + if (reason2) { + const message2 = createMessageFromResponse(reason2); + observedResponses[message2] |= 0; + observedResponses[message2] += 1; + } + if (state2 !== WaiterState.RETRY) { + return { state: state2, reason: reason2, observedResponses }; + } + currentAttempt += 1; + } + }, "runPolling"); + createMessageFromResponse = /* @__PURE__ */ __name((reason) => { + if (reason?.$responseBodyText) { + return `Deserialization error for body: ${reason.$responseBodyText}`; + } + if (reason?.$metadata?.httpStatusCode) { + if (reason.$response || reason.message) { + return `${reason.$response?.statusCode ?? reason.$metadata.httpStatusCode ?? "Unknown"}: ${reason.message}`; + } + return `${reason.$metadata.httpStatusCode}: OK`; + } + return String(reason?.message ?? JSON.stringify(reason, getCircularReplacer()) ?? "Unknown"); + }, "createMessageFromResponse"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/utils/validate.js +var validateWaiterOptions; +var init_validate = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/utils/validate.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + validateWaiterOptions = /* @__PURE__ */ __name((options) => { + if (options.maxWaitTime <= 0) { + throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`); + } else if (options.minDelay <= 0) { + throw new Error(`WaiterConfiguration.minDelay must be greater than 0`); + } else if (options.maxDelay <= 0) { + throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`); + } else if (options.maxWaitTime <= options.minDelay) { + throw new Error(`WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`); + } else if (options.maxDelay < options.minDelay) { + throw new Error(`WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`); + } + }, "validateWaiterOptions"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/utils/index.js +var init_utils7 = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/utils/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sleep(); + init_validate(); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/createWaiter.js +var abortTimeout, createWaiter; +var init_createWaiter = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/createWaiter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_poller(); + init_utils7(); + init_waiter2(); + abortTimeout = /* @__PURE__ */ __name((abortSignal) => { + let onAbort; + const promise2 = new Promise((resolve) => { + onAbort = /* @__PURE__ */ __name(() => resolve({ state: WaiterState.ABORTED }), "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + abortSignal.addEventListener("abort", onAbort); + } else { + abortSignal.onabort = onAbort; + } + }); + return { + clearListener() { + if (typeof abortSignal.removeEventListener === "function") { + abortSignal.removeEventListener("abort", onAbort); + } + }, + aborted: promise2 + }; + }, "abortTimeout"); + createWaiter = /* @__PURE__ */ __name(async (options, input, acceptorChecks) => { + const params = { + ...waiterServiceDefaults, + ...options + }; + validateWaiterOptions(params); + const exitConditions = [runPolling(params, input, acceptorChecks)]; + const finalize2 = []; + if (options.abortSignal) { + const { aborted: aborted2, clearListener } = abortTimeout(options.abortSignal); + finalize2.push(clearListener); + exitConditions.push(aborted2); + } + if (options.abortController?.signal) { + const { aborted: aborted2, clearListener } = abortTimeout(options.abortController.signal); + finalize2.push(clearListener); + exitConditions.push(aborted2); + } + return Promise.race(exitConditions).then((result) => { + for (const fn of finalize2) { + fn(); + } + return result; + }); + }, "createWaiter"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/index.js +var init_dist_es58 = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_createWaiter(); + init_waiter2(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketExists.js +var checkState, waitUntilBucketExists; +var init_waitForBucketExists = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketExists.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es58(); + init_HeadBucketCommand(); + checkState = /* @__PURE__ */ __name(async (client, input) => { + let reason; + try { + let result = await client.send(new HeadBucketCommand(input)); + reason = result; + return { state: WaiterState.SUCCESS, reason }; + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "NotFound") { + return { state: WaiterState.RETRY, reason }; + } + } + return { state: WaiterState.RETRY, reason }; + }, "checkState"); + waitUntilBucketExists = /* @__PURE__ */ __name(async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); + }, "waitUntilBucketExists"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketNotExists.js +var checkState2, waitUntilBucketNotExists; +var init_waitForBucketNotExists = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketNotExists.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es58(); + init_HeadBucketCommand(); + checkState2 = /* @__PURE__ */ __name(async (client, input) => { + let reason; + try { + let result = await client.send(new HeadBucketCommand(input)); + reason = result; + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "NotFound") { + return { state: WaiterState.SUCCESS, reason }; + } + } + return { state: WaiterState.RETRY, reason }; + }, "checkState"); + waitUntilBucketNotExists = /* @__PURE__ */ __name(async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState2); + return checkExceptions(result); + }, "waitUntilBucketNotExists"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectExists.js +var checkState3, waitUntilObjectExists; +var init_waitForObjectExists = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectExists.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es58(); + init_HeadObjectCommand(); + checkState3 = /* @__PURE__ */ __name(async (client, input) => { + let reason; + try { + let result = await client.send(new HeadObjectCommand(input)); + reason = result; + return { state: WaiterState.SUCCESS, reason }; + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "NotFound") { + return { state: WaiterState.RETRY, reason }; + } + } + return { state: WaiterState.RETRY, reason }; + }, "checkState"); + waitUntilObjectExists = /* @__PURE__ */ __name(async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState3); + return checkExceptions(result); + }, "waitUntilObjectExists"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectNotExists.js +var checkState4, waitUntilObjectNotExists; +var init_waitForObjectNotExists = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectNotExists.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es58(); + init_HeadObjectCommand(); + checkState4 = /* @__PURE__ */ __name(async (client, input) => { + let reason; + try { + let result = await client.send(new HeadObjectCommand(input)); + reason = result; + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "NotFound") { + return { state: WaiterState.SUCCESS, reason }; + } + } + return { state: WaiterState.RETRY, reason }; + }, "checkState"); + waitUntilObjectNotExists = /* @__PURE__ */ __name(async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState4); + return checkExceptions(result); + }, "waitUntilObjectNotExists"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/S3.js +var commands, paginators, waiters, S3; +var init_S3 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/S3.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es21(); + init_AbortMultipartUploadCommand(); + init_CompleteMultipartUploadCommand(); + init_CopyObjectCommand(); + init_CreateBucketCommand(); + init_CreateBucketMetadataConfigurationCommand(); + init_CreateBucketMetadataTableConfigurationCommand(); + init_CreateMultipartUploadCommand(); + init_CreateSessionCommand(); + init_DeleteBucketAnalyticsConfigurationCommand(); + init_DeleteBucketCommand(); + init_DeleteBucketCorsCommand(); + init_DeleteBucketEncryptionCommand(); + init_DeleteBucketIntelligentTieringConfigurationCommand(); + init_DeleteBucketInventoryConfigurationCommand(); + init_DeleteBucketLifecycleCommand(); + init_DeleteBucketMetadataConfigurationCommand(); + init_DeleteBucketMetadataTableConfigurationCommand(); + init_DeleteBucketMetricsConfigurationCommand(); + init_DeleteBucketOwnershipControlsCommand(); + init_DeleteBucketPolicyCommand(); + init_DeleteBucketReplicationCommand(); + init_DeleteBucketTaggingCommand(); + init_DeleteBucketWebsiteCommand(); + init_DeleteObjectCommand(); + init_DeleteObjectsCommand(); + init_DeleteObjectTaggingCommand(); + init_DeletePublicAccessBlockCommand(); + init_GetBucketAbacCommand(); + init_GetBucketAccelerateConfigurationCommand(); + init_GetBucketAclCommand(); + init_GetBucketAnalyticsConfigurationCommand(); + init_GetBucketCorsCommand(); + init_GetBucketEncryptionCommand(); + init_GetBucketIntelligentTieringConfigurationCommand(); + init_GetBucketInventoryConfigurationCommand(); + init_GetBucketLifecycleConfigurationCommand(); + init_GetBucketLocationCommand(); + init_GetBucketLoggingCommand(); + init_GetBucketMetadataConfigurationCommand(); + init_GetBucketMetadataTableConfigurationCommand(); + init_GetBucketMetricsConfigurationCommand(); + init_GetBucketNotificationConfigurationCommand(); + init_GetBucketOwnershipControlsCommand(); + init_GetBucketPolicyCommand(); + init_GetBucketPolicyStatusCommand(); + init_GetBucketReplicationCommand(); + init_GetBucketRequestPaymentCommand(); + init_GetBucketTaggingCommand(); + init_GetBucketVersioningCommand(); + init_GetBucketWebsiteCommand(); + init_GetObjectAclCommand(); + init_GetObjectAttributesCommand(); + init_GetObjectCommand(); + init_GetObjectLegalHoldCommand(); + init_GetObjectLockConfigurationCommand(); + init_GetObjectRetentionCommand(); + init_GetObjectTaggingCommand(); + init_GetObjectTorrentCommand(); + init_GetPublicAccessBlockCommand(); + init_HeadBucketCommand(); + init_HeadObjectCommand(); + init_ListBucketAnalyticsConfigurationsCommand(); + init_ListBucketIntelligentTieringConfigurationsCommand(); + init_ListBucketInventoryConfigurationsCommand(); + init_ListBucketMetricsConfigurationsCommand(); + init_ListBucketsCommand(); + init_ListDirectoryBucketsCommand(); + init_ListMultipartUploadsCommand(); + init_ListObjectsCommand(); + init_ListObjectsV2Command(); + init_ListObjectVersionsCommand(); + init_ListPartsCommand(); + init_PutBucketAbacCommand(); + init_PutBucketAccelerateConfigurationCommand(); + init_PutBucketAclCommand(); + init_PutBucketAnalyticsConfigurationCommand(); + init_PutBucketCorsCommand(); + init_PutBucketEncryptionCommand(); + init_PutBucketIntelligentTieringConfigurationCommand(); + init_PutBucketInventoryConfigurationCommand(); + init_PutBucketLifecycleConfigurationCommand(); + init_PutBucketLoggingCommand(); + init_PutBucketMetricsConfigurationCommand(); + init_PutBucketNotificationConfigurationCommand(); + init_PutBucketOwnershipControlsCommand(); + init_PutBucketPolicyCommand(); + init_PutBucketReplicationCommand(); + init_PutBucketRequestPaymentCommand(); + init_PutBucketTaggingCommand(); + init_PutBucketVersioningCommand(); + init_PutBucketWebsiteCommand(); + init_PutObjectAclCommand(); + init_PutObjectCommand(); + init_PutObjectLegalHoldCommand(); + init_PutObjectLockConfigurationCommand(); + init_PutObjectRetentionCommand(); + init_PutObjectTaggingCommand(); + init_PutPublicAccessBlockCommand(); + init_RenameObjectCommand(); + init_RestoreObjectCommand(); + init_SelectObjectContentCommand(); + init_UpdateBucketMetadataInventoryTableConfigurationCommand(); + init_UpdateBucketMetadataJournalTableConfigurationCommand(); + init_UpdateObjectEncryptionCommand(); + init_UploadPartCommand(); + init_UploadPartCopyCommand(); + init_WriteGetObjectResponseCommand(); + init_ListBucketsPaginator(); + init_ListDirectoryBucketsPaginator(); + init_ListObjectsV2Paginator(); + init_ListPartsPaginator(); + init_S3Client(); + init_waitForBucketExists(); + init_waitForBucketNotExists(); + init_waitForObjectExists(); + init_waitForObjectNotExists(); + commands = { + AbortMultipartUploadCommand, + CompleteMultipartUploadCommand, + CopyObjectCommand, + CreateBucketCommand, + CreateBucketMetadataConfigurationCommand, + CreateBucketMetadataTableConfigurationCommand, + CreateMultipartUploadCommand, + CreateSessionCommand, + DeleteBucketCommand, + DeleteBucketAnalyticsConfigurationCommand, + DeleteBucketCorsCommand, + DeleteBucketEncryptionCommand, + DeleteBucketIntelligentTieringConfigurationCommand, + DeleteBucketInventoryConfigurationCommand, + DeleteBucketLifecycleCommand, + DeleteBucketMetadataConfigurationCommand, + DeleteBucketMetadataTableConfigurationCommand, + DeleteBucketMetricsConfigurationCommand, + DeleteBucketOwnershipControlsCommand, + DeleteBucketPolicyCommand, + DeleteBucketReplicationCommand, + DeleteBucketTaggingCommand, + DeleteBucketWebsiteCommand, + DeleteObjectCommand, + DeleteObjectsCommand, + DeleteObjectTaggingCommand, + DeletePublicAccessBlockCommand, + GetBucketAbacCommand, + GetBucketAccelerateConfigurationCommand, + GetBucketAclCommand, + GetBucketAnalyticsConfigurationCommand, + GetBucketCorsCommand, + GetBucketEncryptionCommand, + GetBucketIntelligentTieringConfigurationCommand, + GetBucketInventoryConfigurationCommand, + GetBucketLifecycleConfigurationCommand, + GetBucketLocationCommand, + GetBucketLoggingCommand, + GetBucketMetadataConfigurationCommand, + GetBucketMetadataTableConfigurationCommand, + GetBucketMetricsConfigurationCommand, + GetBucketNotificationConfigurationCommand, + GetBucketOwnershipControlsCommand, + GetBucketPolicyCommand, + GetBucketPolicyStatusCommand, + GetBucketReplicationCommand, + GetBucketRequestPaymentCommand, + GetBucketTaggingCommand, + GetBucketVersioningCommand, + GetBucketWebsiteCommand, + GetObjectCommand, + GetObjectAclCommand, + GetObjectAttributesCommand, + GetObjectLegalHoldCommand, + GetObjectLockConfigurationCommand, + GetObjectRetentionCommand, + GetObjectTaggingCommand, + GetObjectTorrentCommand, + GetPublicAccessBlockCommand, + HeadBucketCommand, + HeadObjectCommand, + ListBucketAnalyticsConfigurationsCommand, + ListBucketIntelligentTieringConfigurationsCommand, + ListBucketInventoryConfigurationsCommand, + ListBucketMetricsConfigurationsCommand, + ListBucketsCommand, + ListDirectoryBucketsCommand, + ListMultipartUploadsCommand, + ListObjectsCommand, + ListObjectsV2Command, + ListObjectVersionsCommand, + ListPartsCommand, + PutBucketAbacCommand, + PutBucketAccelerateConfigurationCommand, + PutBucketAclCommand, + PutBucketAnalyticsConfigurationCommand, + PutBucketCorsCommand, + PutBucketEncryptionCommand, + PutBucketIntelligentTieringConfigurationCommand, + PutBucketInventoryConfigurationCommand, + PutBucketLifecycleConfigurationCommand, + PutBucketLoggingCommand, + PutBucketMetricsConfigurationCommand, + PutBucketNotificationConfigurationCommand, + PutBucketOwnershipControlsCommand, + PutBucketPolicyCommand, + PutBucketReplicationCommand, + PutBucketRequestPaymentCommand, + PutBucketTaggingCommand, + PutBucketVersioningCommand, + PutBucketWebsiteCommand, + PutObjectCommand, + PutObjectAclCommand, + PutObjectLegalHoldCommand, + PutObjectLockConfigurationCommand, + PutObjectRetentionCommand, + PutObjectTaggingCommand, + PutPublicAccessBlockCommand, + RenameObjectCommand, + RestoreObjectCommand, + SelectObjectContentCommand, + UpdateBucketMetadataInventoryTableConfigurationCommand, + UpdateBucketMetadataJournalTableConfigurationCommand, + UpdateObjectEncryptionCommand, + UploadPartCommand, + UploadPartCopyCommand, + WriteGetObjectResponseCommand + }; + paginators = { + paginateListBuckets, + paginateListDirectoryBuckets, + paginateListObjectsV2, + paginateListParts + }; + waiters = { + waitUntilBucketExists, + waitUntilBucketNotExists, + waitUntilObjectExists, + waitUntilObjectNotExists + }; + S3 = class extends S3Client { + }; + __name(S3, "S3"); + createAggregatedClient(commands, S3, { paginators, waiters }); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/index.js +var init_commands = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AbortMultipartUploadCommand(); + init_CompleteMultipartUploadCommand(); + init_CopyObjectCommand(); + init_CreateBucketCommand(); + init_CreateBucketMetadataConfigurationCommand(); + init_CreateBucketMetadataTableConfigurationCommand(); + init_CreateMultipartUploadCommand(); + init_CreateSessionCommand(); + init_DeleteBucketAnalyticsConfigurationCommand(); + init_DeleteBucketCommand(); + init_DeleteBucketCorsCommand(); + init_DeleteBucketEncryptionCommand(); + init_DeleteBucketIntelligentTieringConfigurationCommand(); + init_DeleteBucketInventoryConfigurationCommand(); + init_DeleteBucketLifecycleCommand(); + init_DeleteBucketMetadataConfigurationCommand(); + init_DeleteBucketMetadataTableConfigurationCommand(); + init_DeleteBucketMetricsConfigurationCommand(); + init_DeleteBucketOwnershipControlsCommand(); + init_DeleteBucketPolicyCommand(); + init_DeleteBucketReplicationCommand(); + init_DeleteBucketTaggingCommand(); + init_DeleteBucketWebsiteCommand(); + init_DeleteObjectCommand(); + init_DeleteObjectTaggingCommand(); + init_DeleteObjectsCommand(); + init_DeletePublicAccessBlockCommand(); + init_GetBucketAbacCommand(); + init_GetBucketAccelerateConfigurationCommand(); + init_GetBucketAclCommand(); + init_GetBucketAnalyticsConfigurationCommand(); + init_GetBucketCorsCommand(); + init_GetBucketEncryptionCommand(); + init_GetBucketIntelligentTieringConfigurationCommand(); + init_GetBucketInventoryConfigurationCommand(); + init_GetBucketLifecycleConfigurationCommand(); + init_GetBucketLocationCommand(); + init_GetBucketLoggingCommand(); + init_GetBucketMetadataConfigurationCommand(); + init_GetBucketMetadataTableConfigurationCommand(); + init_GetBucketMetricsConfigurationCommand(); + init_GetBucketNotificationConfigurationCommand(); + init_GetBucketOwnershipControlsCommand(); + init_GetBucketPolicyCommand(); + init_GetBucketPolicyStatusCommand(); + init_GetBucketReplicationCommand(); + init_GetBucketRequestPaymentCommand(); + init_GetBucketTaggingCommand(); + init_GetBucketVersioningCommand(); + init_GetBucketWebsiteCommand(); + init_GetObjectAclCommand(); + init_GetObjectAttributesCommand(); + init_GetObjectCommand(); + init_GetObjectLegalHoldCommand(); + init_GetObjectLockConfigurationCommand(); + init_GetObjectRetentionCommand(); + init_GetObjectTaggingCommand(); + init_GetObjectTorrentCommand(); + init_GetPublicAccessBlockCommand(); + init_HeadBucketCommand(); + init_HeadObjectCommand(); + init_ListBucketAnalyticsConfigurationsCommand(); + init_ListBucketIntelligentTieringConfigurationsCommand(); + init_ListBucketInventoryConfigurationsCommand(); + init_ListBucketMetricsConfigurationsCommand(); + init_ListBucketsCommand(); + init_ListDirectoryBucketsCommand(); + init_ListMultipartUploadsCommand(); + init_ListObjectVersionsCommand(); + init_ListObjectsCommand(); + init_ListObjectsV2Command(); + init_ListPartsCommand(); + init_PutBucketAbacCommand(); + init_PutBucketAccelerateConfigurationCommand(); + init_PutBucketAclCommand(); + init_PutBucketAnalyticsConfigurationCommand(); + init_PutBucketCorsCommand(); + init_PutBucketEncryptionCommand(); + init_PutBucketIntelligentTieringConfigurationCommand(); + init_PutBucketInventoryConfigurationCommand(); + init_PutBucketLifecycleConfigurationCommand(); + init_PutBucketLoggingCommand(); + init_PutBucketMetricsConfigurationCommand(); + init_PutBucketNotificationConfigurationCommand(); + init_PutBucketOwnershipControlsCommand(); + init_PutBucketPolicyCommand(); + init_PutBucketReplicationCommand(); + init_PutBucketRequestPaymentCommand(); + init_PutBucketTaggingCommand(); + init_PutBucketVersioningCommand(); + init_PutBucketWebsiteCommand(); + init_PutObjectAclCommand(); + init_PutObjectCommand(); + init_PutObjectLegalHoldCommand(); + init_PutObjectLockConfigurationCommand(); + init_PutObjectRetentionCommand(); + init_PutObjectTaggingCommand(); + init_PutPublicAccessBlockCommand(); + init_RenameObjectCommand(); + init_RestoreObjectCommand(); + init_SelectObjectContentCommand(); + init_UpdateBucketMetadataInventoryTableConfigurationCommand(); + init_UpdateBucketMetadataJournalTableConfigurationCommand(); + init_UpdateObjectEncryptionCommand(); + init_UploadPartCommand(); + init_UploadPartCopyCommand(); + init_WriteGetObjectResponseCommand(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/Interfaces.js +var init_Interfaces = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/Interfaces.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/index.js +var init_pagination2 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Interfaces(); + init_ListBucketsPaginator(); + init_ListDirectoryBucketsPaginator(); + init_ListObjectsV2Paginator(); + init_ListPartsPaginator(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/waiters/index.js +var init_waiters = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/waiters/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_waitForBucketExists(); + init_waitForBucketNotExists(); + init_waitForObjectExists(); + init_waitForObjectNotExists(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/enums.js +var init_enums = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/models/enums.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/models_0.js +var init_models_0 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/models/models_0.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/models_1.js +var init_models_1 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/models/models_1.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/index.js +var init_dist_es59 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_S3Client(); + init_S3(); + init_commands(); + init_schemas_0(); + init_pagination2(); + init_waiters(); + init_enums(); + init_errors3(); + init_models_0(); + init_models_1(); + } +}); + +// ../../node_modules/@aws-sdk/util-format-url/dist-es/index.js +function formatUrl(request) { + const { port, query } = request; + let { protocol, path, hostname: hostname3 } = request; + if (protocol && protocol.slice(-1) !== ":") { + protocol += ":"; + } + if (port) { + hostname3 += `:${port}`; + } + if (path && path.charAt(0) !== "/") { + path = `/${path}`; + } + let queryString = query ? buildQueryString(query) : ""; + if (queryString && queryString[0] !== "?") { + queryString = `?${queryString}`; + } + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + let fragment = ""; + if (request.fragment) { + fragment = `#${request.fragment}`; + } + return `${protocol}//${auth}${hostname3}${path}${queryString}${fragment}`; +} +var init_dist_es60 = __esm({ + "../../node_modules/@aws-sdk/util-format-url/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es8(); + __name(formatUrl, "formatUrl"); + } +}); + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/constants.js +var UNSIGNED_PAYLOAD2, SHA256_HEADER2; +var init_constants15 = __esm({ + "../../node_modules/@aws-sdk/s3-request-presigner/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + UNSIGNED_PAYLOAD2 = "UNSIGNED-PAYLOAD"; + SHA256_HEADER2 = "X-Amz-Content-Sha256"; + } +}); + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/presigner.js +var S3RequestPresigner; +var init_presigner = __esm({ + "../../node_modules/@aws-sdk/s3-request-presigner/dist-es/presigner.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es43(); + init_constants15(); + S3RequestPresigner = class { + signer; + constructor(options) { + const resolvedOptions = { + service: options.signingName || options.service || "s3", + uriEscapePath: options.uriEscapePath || false, + applyChecksum: options.applyChecksum || false, + ...options + }; + this.signer = new SignatureV4MultiRegion(resolvedOptions); + } + presign(requestToSign, { unsignableHeaders = /* @__PURE__ */ new Set(), hoistableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), ...options } = {}) { + this.prepareRequest(requestToSign, { + unsignableHeaders, + unhoistableHeaders, + hoistableHeaders + }); + return this.signer.presign(requestToSign, { + expiresIn: 900, + unsignableHeaders, + unhoistableHeaders, + ...options + }); + } + presignWithCredentials(requestToSign, credentials, { unsignableHeaders = /* @__PURE__ */ new Set(), hoistableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), ...options } = {}) { + this.prepareRequest(requestToSign, { + unsignableHeaders, + unhoistableHeaders, + hoistableHeaders + }); + return this.signer.presignWithCredentials(requestToSign, credentials, { + expiresIn: 900, + unsignableHeaders, + unhoistableHeaders, + ...options + }); + } + prepareRequest(requestToSign, { unsignableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), hoistableHeaders = /* @__PURE__ */ new Set() } = {}) { + unsignableHeaders.add("content-type"); + Object.keys(requestToSign.headers).map((header) => header.toLowerCase()).filter((header) => header.startsWith("x-amz-server-side-encryption")).forEach((header) => { + if (!hoistableHeaders.has(header)) { + unhoistableHeaders.add(header); + } + }); + requestToSign.headers[SHA256_HEADER2] = UNSIGNED_PAYLOAD2; + const currentHostHeader = requestToSign.headers.host; + const port = requestToSign.port; + const expectedHostHeader = `${requestToSign.hostname}${requestToSign.port != null ? ":" + port : ""}`; + if (!currentHostHeader || currentHostHeader === requestToSign.hostname && requestToSign.port != null) { + requestToSign.headers.host = expectedHostHeader; + } + } + }; + __name(S3RequestPresigner, "S3RequestPresigner"); + } +}); + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/getSignedUrl.js +var getSignedUrl; +var init_getSignedUrl = __esm({ + "../../node_modules/@aws-sdk/s3-request-presigner/dist-es/getSignedUrl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es60(); + init_dist_es41(); + init_dist_es2(); + init_presigner(); + getSignedUrl = /* @__PURE__ */ __name(async (client, command, options = {}) => { + let s3Presigner; + let region; + if (typeof client.config.endpointProvider === "function") { + const endpointV2 = await getEndpointFromInstructions(command.input, command.constructor, client.config); + const authScheme = endpointV2.properties?.authSchemes?.[0]; + if (authScheme?.name === "sigv4a") { + region = authScheme?.signingRegionSet?.join(","); + } else { + region = authScheme?.signingRegion; + } + s3Presigner = new S3RequestPresigner({ + ...client.config, + signingName: authScheme?.signingName, + region: async () => region + }); + } else { + s3Presigner = new S3RequestPresigner(client.config); + } + const presignInterceptMiddleware = /* @__PURE__ */ __name((next, context2) => async (args) => { + const { request } = args; + if (!HttpRequest.isInstance(request)) { + throw new Error("Request to be presigned is not an valid HTTP request."); + } + delete request.headers["amz-sdk-invocation-id"]; + delete request.headers["amz-sdk-request"]; + delete request.headers["x-amz-user-agent"]; + let presigned2; + const presignerOptions = { + ...options, + signingRegion: options.signingRegion ?? context2["signing_region"] ?? region, + signingService: options.signingService ?? context2["signing_service"] + }; + if (context2.s3ExpressIdentity) { + presigned2 = await s3Presigner.presignWithCredentials(request, context2.s3ExpressIdentity, presignerOptions); + } else { + presigned2 = await s3Presigner.presign(request, presignerOptions); + } + return { + response: {}, + output: { + $metadata: { httpStatusCode: 200 }, + presigned: presigned2 + } + }; + }, "presignInterceptMiddleware"); + const middlewareName = "presignInterceptMiddleware"; + const clientStack = client.middlewareStack.clone(); + clientStack.addRelativeTo(presignInterceptMiddleware, { + name: middlewareName, + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true + }); + const handler = command.resolveMiddleware(clientStack, client.config, {}); + const { output } = await handler({ input: command.input }); + const { presigned } = output; + return formatUrl(presigned); + }, "getSignedUrl"); + } +}); + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/index.js +var init_dist_es61 = __esm({ + "../../node_modules/@aws-sdk/s3-request-presigner/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getSignedUrl(); + init_presigner(); + } +}); + +// src/lib/s3-client.ts +async function deleteImageUtil({ bucket = s3BucketName, keys }) { + if (keys.length === 0) { + return true; + } + try { + const deleteParams = { + Bucket: bucket, + Delete: { + Objects: keys.map((key) => ({ Key: key })), + Quiet: false + } + }; + const deleteCommand = new DeleteObjectsCommand(deleteParams); + await s3Client.send(deleteCommand); + return true; + } catch (error50) { + console.error("Error deleting image:", error50); + throw new Error("Failed to delete image"); + return false; + } +} +function scaffoldAssetUrl(input) { + if (Array.isArray(input)) { + return input.map((key) => scaffoldAssetUrl(key)); + } + if (!input) { + return ""; + } + const normalizedKey = input.replace(/^\/+/, ""); + const domain3 = assetsDomain.endsWith("/") ? assetsDomain.slice(0, -1) : assetsDomain; + return `${domain3}/${normalizedKey}`; +} +async function generateSignedUrlFromS3Url(s3UrlRaw, expiresIn = 259200) { + if (!s3UrlRaw) { + return ""; + } + const s3Url2 = s3UrlRaw; + try { + const command = new GetObjectCommand({ + Bucket: s3BucketName, + Key: s3Url2 + }); + const signedUrl = await getSignedUrl(s3Client, command, { expiresIn }); + return signedUrl; + } catch (error50) { + console.error("Error generating signed URL:", error50); + throw new Error("Failed to generate signed URL"); + } +} +async function generateSignedUrlsFromS3Urls(s3Urls, expiresIn = 259200) { + if (!s3Urls || !s3Urls.length) { + return []; + } + try { + const signedUrls = await Promise.all( + s3Urls.map((url2) => generateSignedUrlFromS3Url(url2, expiresIn).catch(() => "")) + ); + return signedUrls; + } catch (error50) { + console.error("Error generating multiple signed URLs:", error50); + return s3Urls.map(() => ""); + } +} +async function generateUploadUrl(key, mimeType, expiresIn = 180) { + try { + await createUploadUrlStatus(key); + const command = new PutObjectCommand({ + Bucket: s3BucketName, + Key: key, + ContentType: mimeType + }); + const signedUrl = await getSignedUrl(s3Client, command, { expiresIn }); + return signedUrl; + } catch (error50) { + console.error("Error generating upload URL:", error50); + throw new Error("Failed to generate upload URL"); + } +} +function extractKeyFromPresignedUrl(url2) { + const u5 = new URL(url2); + const rawKey = u5.pathname.replace(/^\/+/, ""); + const decodedKey = decodeURIComponent(rawKey); + const parts = decodedKey.split("/"); + parts.shift(); + return parts.join("/"); +} +async function claimUploadUrl(url2) { + try { + const semiKey = extractKeyFromPresignedUrl(url2); + const updated = await claimUploadUrlStatus(semiKey); + if (!updated) { + throw new Error("Upload URL not found or already claimed"); + } + } catch (error50) { + console.error("Error claiming upload URL:", error50); + throw new Error("Failed to claim upload URL"); + } +} +var s3Client, imageUploadS3; +var init_s3_client = __esm({ + "src/lib/s3-client.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es59(); + init_dist_es61(); + init_dbService(); + init_env_exporter(); + s3Client = new S3Client({ + region: s3Region, + endpoint: s3Url, + forcePathStyle: true, + credentials: { + accessKeyId: s3AccessKeyId, + secretAccessKey: s3SecretAccessKey + } + }); + imageUploadS3 = /* @__PURE__ */ __name(async (body, type, key) => { + const command = new PutObjectCommand({ + Bucket: s3BucketName, + Key: key, + Body: body, + ContentType: type + }); + const resp = await s3Client.send(command); + const imageUrl = `${key}`; + return imageUrl; + }, "imageUploadS3"); + __name(deleteImageUtil, "deleteImageUtil"); + __name(scaffoldAssetUrl, "scaffoldAssetUrl"); + __name(generateSignedUrlFromS3Url, "generateSignedUrlFromS3Url"); + __name(generateSignedUrlsFromS3Urls, "generateSignedUrlsFromS3Urls"); + __name(generateUploadUrl, "generateUploadUrl"); + __name(extractKeyFromPresignedUrl, "extractKeyFromPresignedUrl"); + __name(claimUploadUrl, "claimUploadUrl"); + } +}); + +// ../../node_modules/@trpc/server/dist/initTRPC-RoZMIBeA.mjs +function createMiddlewareFactory() { + function createMiddlewareInner(middlewares) { + return { + _middlewares: middlewares, + unstable_pipe(middlewareBuilderOrFn) { + const pipedMiddleware = "_middlewares" in middlewareBuilderOrFn ? middlewareBuilderOrFn._middlewares : [middlewareBuilderOrFn]; + return createMiddlewareInner([...middlewares, ...pipedMiddleware]); + } + }; + } + __name(createMiddlewareInner, "createMiddlewareInner"); + function createMiddleware(fn) { + return createMiddlewareInner([fn]); + } + __name(createMiddleware, "createMiddleware"); + return createMiddleware; +} +function createInputMiddleware(parse3) { + const inputMiddleware = /* @__PURE__ */ __name(async function inputValidatorMiddleware(opts) { + let parsedInput; + const rawInput = await opts.getRawInput(); + try { + parsedInput = await parse3(rawInput); + } catch (cause) { + throw new TRPCError({ + code: "BAD_REQUEST", + cause + }); + } + const combinedInput = isObject(opts.input) && isObject(parsedInput) ? (0, import_objectSpread2$2.default)((0, import_objectSpread2$2.default)({}, opts.input), parsedInput) : parsedInput; + return opts.next({ input: combinedInput }); + }, "inputValidatorMiddleware"); + inputMiddleware._type = "input"; + return inputMiddleware; +} +function createOutputMiddleware(parse3) { + const outputMiddleware = /* @__PURE__ */ __name(async function outputValidatorMiddleware({ next }) { + const result = await next(); + if (!result.ok) + return result; + try { + const data = await parse3(result.data); + return (0, import_objectSpread2$2.default)((0, import_objectSpread2$2.default)({}, result), {}, { data }); + } catch (cause) { + throw new TRPCError({ + message: "Output validation failed", + code: "INTERNAL_SERVER_ERROR", + cause + }); + } + }, "outputValidatorMiddleware"); + outputMiddleware._type = "output"; + return outputMiddleware; +} +function getParseFn(procedureParser) { + const parser2 = procedureParser; + const isStandardSchema = "~standard" in parser2; + if (typeof parser2 === "function" && typeof parser2.assert === "function") + return parser2.assert.bind(parser2); + if (typeof parser2 === "function" && !isStandardSchema) + return parser2; + if (typeof parser2.parseAsync === "function") + return parser2.parseAsync.bind(parser2); + if (typeof parser2.parse === "function") + return parser2.parse.bind(parser2); + if (typeof parser2.validateSync === "function") + return parser2.validateSync.bind(parser2); + if (typeof parser2.create === "function") + return parser2.create.bind(parser2); + if (typeof parser2.assert === "function") + return (value) => { + parser2.assert(value); + return value; + }; + if (isStandardSchema) + return async (value) => { + const result = await parser2["~standard"].validate(value); + if (result.issues) + throw new StandardSchemaV1Error(result.issues); + return result.value; + }; + throw new Error("Could not find a validator fn"); +} +function createNewBuilder(def1, def2) { + const { middlewares = [], inputs, meta: meta3 } = def2, rest = (0, import_objectWithoutProperties.default)(def2, _excluded); + return createBuilder((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, mergeWithoutOverrides(def1, rest)), {}, { + inputs: [...def1.inputs, ...inputs !== null && inputs !== void 0 ? inputs : []], + middlewares: [...def1.middlewares, ...middlewares], + meta: def1.meta && meta3 ? (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, def1.meta), meta3) : meta3 !== null && meta3 !== void 0 ? meta3 : def1.meta + })); +} +function createBuilder(initDef = {}) { + const _def = (0, import_objectSpread2$13.default)({ + procedure: true, + inputs: [], + middlewares: [] + }, initDef); + const builder = { + _def, + input(input) { + const parser2 = getParseFn(input); + return createNewBuilder(_def, { + inputs: [input], + middlewares: [createInputMiddleware(parser2)] + }); + }, + output(output) { + const parser2 = getParseFn(output); + return createNewBuilder(_def, { + output, + middlewares: [createOutputMiddleware(parser2)] + }); + }, + meta(meta3) { + return createNewBuilder(_def, { meta: meta3 }); + }, + use(middlewareBuilderOrFn) { + const middlewares = "_middlewares" in middlewareBuilderOrFn ? middlewareBuilderOrFn._middlewares : [middlewareBuilderOrFn]; + return createNewBuilder(_def, { middlewares }); + }, + unstable_concat(builder$1) { + return createNewBuilder(_def, builder$1._def); + }, + concat(builder$1) { + return createNewBuilder(_def, builder$1._def); + }, + query(resolver) { + return createResolver((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, _def), {}, { type: "query" }), resolver); + }, + mutation(resolver) { + return createResolver((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, _def), {}, { type: "mutation" }), resolver); + }, + subscription(resolver) { + return createResolver((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, _def), {}, { type: "subscription" }), resolver); + }, + experimental_caller(caller) { + return createNewBuilder(_def, { caller }); + } + }; + return builder; +} +function createResolver(_defIn, resolver) { + const finalBuilder = createNewBuilder(_defIn, { + resolver, + middlewares: [/* @__PURE__ */ __name(async function resolveMiddleware(opts) { + const data = await resolver(opts); + return { + marker: middlewareMarker, + ok: true, + data, + ctx: opts.ctx + }; + }, "resolveMiddleware")] + }); + const _def = (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, finalBuilder._def), {}, { + type: _defIn.type, + experimental_caller: Boolean(finalBuilder._def.caller), + meta: finalBuilder._def.meta, + $types: null + }); + const invoke = createProcedureCaller(finalBuilder._def); + const callerOverride = finalBuilder._def.caller; + if (!callerOverride) + return invoke; + const callerWrapper = /* @__PURE__ */ __name(async (...args) => { + return await callerOverride({ + args, + invoke, + _def + }); + }, "callerWrapper"); + callerWrapper._def = _def; + return callerWrapper; +} +async function callRecursive(index, _def, opts) { + try { + const middleware2 = _def.middlewares[index]; + const result = await middleware2((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, opts), {}, { + meta: _def.meta, + input: opts.input, + next(_nextOpts) { + var _nextOpts$getRawInput; + const nextOpts = _nextOpts; + return callRecursive(index + 1, _def, (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, opts), {}, { + ctx: (nextOpts === null || nextOpts === void 0 ? void 0 : nextOpts.ctx) ? (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, opts.ctx), nextOpts.ctx) : opts.ctx, + input: nextOpts && "input" in nextOpts ? nextOpts.input : opts.input, + getRawInput: (_nextOpts$getRawInput = nextOpts === null || nextOpts === void 0 ? void 0 : nextOpts.getRawInput) !== null && _nextOpts$getRawInput !== void 0 ? _nextOpts$getRawInput : opts.getRawInput + })); + } + })); + return result; + } catch (cause) { + return { + ok: false, + error: getTRPCErrorFromUnknown(cause), + marker: middlewareMarker + }; + } +} +function createProcedureCaller(_def) { + async function procedure(opts) { + if (!opts || !("getRawInput" in opts)) + throw new Error(codeblock); + const result = await callRecursive(0, _def, opts); + if (!result) + throw new TRPCError({ + code: "INTERNAL_SERVER_ERROR", + message: "No result from middlewares - did you forget to `return next()`?" + }); + if (!result.ok) + throw result.error; + return result.data; + } + __name(procedure, "procedure"); + procedure._def = _def; + procedure.procedure = true; + procedure.meta = _def.meta; + return procedure; +} +var import_objectSpread2$2, middlewareMarker, import_defineProperty3, StandardSchemaV1Error, require_objectWithoutPropertiesLoose, require_objectWithoutProperties, import_objectWithoutProperties, import_objectSpread2$13, _excluded, codeblock, _globalThis$process, _globalThis$process2, _globalThis$process3, isServerDefault, import_objectSpread25, TRPCBuilder, initTRPC; +var init_initTRPC_RoZMIBeA = __esm({ + "../../node_modules/@trpc/server/dist/initTRPC-RoZMIBeA.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getErrorShape_vC8mUXJD(); + init_codes_DagpWZLc(); + init_tracked_Bjtgv3wJ(); + import_objectSpread2$2 = __toESM2(require_objectSpread2(), 1); + middlewareMarker = "middlewareMarker"; + __name(createMiddlewareFactory, "createMiddlewareFactory"); + __name(createInputMiddleware, "createInputMiddleware"); + __name(createOutputMiddleware, "createOutputMiddleware"); + import_defineProperty3 = __toESM2(require_defineProperty(), 1); + StandardSchemaV1Error = /* @__PURE__ */ __name(class extends Error { + /** + * Creates a schema error with useful information. + * + * @param issues The schema issues. + */ + constructor(issues) { + var _issues$; + super((_issues$ = issues[0]) === null || _issues$ === void 0 ? void 0 : _issues$.message); + (0, import_defineProperty3.default)(this, "issues", void 0); + this.name = "SchemaError"; + this.issues = issues; + } + }, "StandardSchemaV1Error"); + __name(getParseFn, "getParseFn"); + require_objectWithoutPropertiesLoose = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(exports, module) { + function _objectWithoutPropertiesLoose(r2, e2) { + if (null == r2) + return {}; + var t9 = {}; + for (var n2 in r2) + if ({}.hasOwnProperty.call(r2, n2)) { + if (e2.includes(n2)) + continue; + t9[n2] = r2[n2]; + } + return t9; + } + __name(_objectWithoutPropertiesLoose, "_objectWithoutPropertiesLoose"); + module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_objectWithoutProperties = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(exports, module) { + var objectWithoutPropertiesLoose = require_objectWithoutPropertiesLoose(); + function _objectWithoutProperties$1(e2, t9) { + if (null == e2) + return {}; + var o2, r2, i2 = objectWithoutPropertiesLoose(e2, t9); + if (Object.getOwnPropertySymbols) { + var s2 = Object.getOwnPropertySymbols(e2); + for (r2 = 0; r2 < s2.length; r2++) + o2 = s2[r2], t9.includes(o2) || {}.propertyIsEnumerable.call(e2, o2) && (i2[o2] = e2[o2]); + } + return i2; + } + __name(_objectWithoutProperties$1, "_objectWithoutProperties$1"); + module.exports = _objectWithoutProperties$1, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + import_objectWithoutProperties = __toESM2(require_objectWithoutProperties(), 1); + import_objectSpread2$13 = __toESM2(require_objectSpread2(), 1); + _excluded = [ + "middlewares", + "inputs", + "meta" + ]; + __name(createNewBuilder, "createNewBuilder"); + __name(createBuilder, "createBuilder"); + __name(createResolver, "createResolver"); + codeblock = ` +This is a client-only function. +If you want to call this function on the server, see https://trpc.io/docs/v11/server/server-side-calls +`.trim(); + __name(callRecursive, "callRecursive"); + __name(createProcedureCaller, "createProcedureCaller"); + isServerDefault = typeof window === "undefined" || "Deno" in window || ((_globalThis$process = globalThis.process) === null || _globalThis$process === void 0 || (_globalThis$process = _globalThis$process.env) === null || _globalThis$process === void 0 ? void 0 : _globalThis$process["NODE_ENV"]) === "test" || !!((_globalThis$process2 = globalThis.process) === null || _globalThis$process2 === void 0 || (_globalThis$process2 = _globalThis$process2.env) === null || _globalThis$process2 === void 0 ? void 0 : _globalThis$process2["JEST_WORKER_ID"]) || !!((_globalThis$process3 = globalThis.process) === null || _globalThis$process3 === void 0 || (_globalThis$process3 = _globalThis$process3.env) === null || _globalThis$process3 === void 0 ? void 0 : _globalThis$process3["VITEST_WORKER_ID"]); + import_objectSpread25 = __toESM2(require_objectSpread2(), 1); + TRPCBuilder = /* @__PURE__ */ __name(class TRPCBuilder2 { + /** + * Add a context shape as a generic to the root object + * @see https://trpc.io/docs/v11/server/context + */ + context() { + return new TRPCBuilder2(); + } + /** + * Add a meta shape as a generic to the root object + * @see https://trpc.io/docs/v11/quickstart + */ + meta() { + return new TRPCBuilder2(); + } + /** + * Create the root object + * @see https://trpc.io/docs/v11/server/routers#initialize-trpc + */ + create(opts) { + var _opts$transformer, _opts$isDev, _globalThis$process$1, _opts$allowOutsideOfS, _opts$errorFormatter, _opts$isServer; + const config3 = (0, import_objectSpread25.default)((0, import_objectSpread25.default)({}, opts), {}, { + transformer: getDataTransformer((_opts$transformer = opts === null || opts === void 0 ? void 0 : opts.transformer) !== null && _opts$transformer !== void 0 ? _opts$transformer : defaultTransformer), + isDev: (_opts$isDev = opts === null || opts === void 0 ? void 0 : opts.isDev) !== null && _opts$isDev !== void 0 ? _opts$isDev : ((_globalThis$process$1 = globalThis.process) === null || _globalThis$process$1 === void 0 ? void 0 : _globalThis$process$1.env["NODE_ENV"]) !== "production", + allowOutsideOfServer: (_opts$allowOutsideOfS = opts === null || opts === void 0 ? void 0 : opts.allowOutsideOfServer) !== null && _opts$allowOutsideOfS !== void 0 ? _opts$allowOutsideOfS : false, + errorFormatter: (_opts$errorFormatter = opts === null || opts === void 0 ? void 0 : opts.errorFormatter) !== null && _opts$errorFormatter !== void 0 ? _opts$errorFormatter : defaultFormatter, + isServer: (_opts$isServer = opts === null || opts === void 0 ? void 0 : opts.isServer) !== null && _opts$isServer !== void 0 ? _opts$isServer : isServerDefault, + $types: null + }); + { + var _opts$isServer2; + const isServer = (_opts$isServer2 = opts === null || opts === void 0 ? void 0 : opts.isServer) !== null && _opts$isServer2 !== void 0 ? _opts$isServer2 : isServerDefault; + if (!isServer && (opts === null || opts === void 0 ? void 0 : opts.allowOutsideOfServer) !== true) + throw new Error(`You're trying to use @trpc/server in a non-server environment. This is not supported by default.`); + } + return { + _config: config3, + procedure: createBuilder({ meta: opts === null || opts === void 0 ? void 0 : opts.defaultMeta }), + middleware: createMiddlewareFactory(), + router: createRouterFactory(config3), + mergeRouters, + createCallerFactory: createCallerFactory() + }; + } + }, "TRPCBuilder"); + initTRPC = new TRPCBuilder(); + } +}); + +// ../../node_modules/@trpc/server/dist/index.mjs +var init_dist3 = __esm({ + "../../node_modules/@trpc/server/dist/index.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tracked_Bjtgv3wJ(); + init_initTRPC_RoZMIBeA(); + } +}); + +// src/trpc/trpc-index.ts +var t8, middleware, router2, errorLoggerMiddleware, publicProcedure, protectedProcedure, createCallerFactory2, createTRPCRouter; +var init_trpc_index = __esm({ + "src/trpc/trpc-index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist3(); + t8 = initTRPC.context().create(); + middleware = t8.middleware; + router2 = t8.router; + errorLoggerMiddleware = middleware(async ({ path, type, next, ctx }) => { + const start = Date.now(); + try { + const result = await next(); + const duration3 = Date.now() - start; + if (false) { + console.log(`\u2705 ${type} ${path} - ${duration3}ms`); + } + return result; + } catch (error50) { + const duration3 = Date.now() - start; + const err = error50; + console.error("\u{1F6A8} tRPC Error:", { + timestamp: (/* @__PURE__ */ new Date()).toISOString(), + path, + type, + duration: `${duration3}ms`, + userId: ctx?.user?.userId || ctx?.staffUser?.id || "anonymous", + error: { + name: err.name, + message: err.message, + code: err.code, + stack: err.stack + }, + // Add SQL-specific details if available + ...err.code && { sqlCode: err.code }, + ...err.meta && { sqlMeta: err.meta }, + ...err.sql && { sql: err.sql } + }); + throw error50; + } + }); + publicProcedure = t8.procedure.use(errorLoggerMiddleware); + protectedProcedure = t8.procedure.use(errorLoggerMiddleware).use( + middleware(async ({ ctx, next }) => { + if (!ctx.user && !ctx.staffUser) { + throw new TRPCError({ code: "UNAUTHORIZED" }); + } + return next(); + }) + ); + createCallerFactory2 = t8.createCallerFactory; + createTRPCRouter = t8.router; + } +}); + +// src/stores/product-store.ts +async function initializeProducts() { + try { + console.log("Initializing product store in Redis..."); + const productsData = await getAllProductsForCache(); + const allStores = await getAllStoresForCache(); + const storeMap = new Map(allStores.map((s2) => [s2.id, s2])); + const allDeliverySlots = await getAllDeliverySlotsForCache(); + const deliverySlotsMap = /* @__PURE__ */ new Map(); + for (const slot of allDeliverySlots) { + if (!deliverySlotsMap.has(slot.productId)) + deliverySlotsMap.set(slot.productId, []); + deliverySlotsMap.get(slot.productId).push(slot); + } + const allSpecialDeals = await getAllSpecialDealsForCache(); + const specialDealsMap = /* @__PURE__ */ new Map(); + for (const deal of allSpecialDeals) { + if (!specialDealsMap.has(deal.productId)) + specialDealsMap.set(deal.productId, []); + specialDealsMap.get(deal.productId).push(deal); + } + const allProductTags = await getAllProductTagsForCache(); + const productTagsMap = /* @__PURE__ */ new Map(); + for (const tag2 of allProductTags) { + if (!productTagsMap.has(tag2.productId)) + productTagsMap.set(tag2.productId, []); + productTagsMap.get(tag2.productId).push(tag2.tagName); + } + console.log("Product store initialized successfully"); + } catch (error50) { + console.error("Error initializing product store:", error50); + } +} +async function getProductById5(id) { + try { + const product = await getProductById(id); + if (!product) + return null; + const signedImages = scaffoldAssetUrl( + product.images || [] + ); + const allStores = await getAllStoresForCache(); + const store = product.storeId ? allStores.find((s2) => s2.id === product.storeId) || null : null; + const allDeliverySlots = await getAllDeliverySlotsForCache(); + const productSlots2 = allDeliverySlots.filter((s2) => s2.productId === id); + const allSpecialDeals = await getAllSpecialDealsForCache(); + const productDeals = allSpecialDeals.filter((d2) => d2.productId === id); + const allProductTags = await getAllProductTagsForCache(); + const productTagNames = allProductTags.filter((t9) => t9.productId === id).map((t9) => t9.tagName); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + longDescription: product.longDescription, + price: product.price.toString(), + marketPrice: product.marketPrice?.toString() || null, + unitNotation: product.unit.shortNotation, + images: signedImages, + isOutOfStock: product.isOutOfStock, + store: store ? { id: store.id, name: store.name, description: store.description } : null, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + isFlashAvailable: product.isFlashAvailable, + flashPrice: product.flashPrice?.toString() || null, + deliverySlots: productSlots2.map((s2) => ({ + id: s2.id, + deliveryTime: s2.deliveryTime, + freezeTime: s2.freezeTime, + isCapacityFull: s2.isCapacityFull + })), + specialDeals: productDeals.map((d2) => ({ + quantity: d2.quantity.toString(), + price: d2.price.toString(), + validTill: d2.validTill + })), + productTags: productTagNames + }; + } catch (error50) { + console.error(`Error getting product ${id}:`, error50); + return null; + } +} +async function getAllProducts2() { + try { + const productsData = await getAllProductsForCache(); + const allStores = await getAllStoresForCache(); + const storeMap = new Map(allStores.map((s2) => [s2.id, s2])); + const allDeliverySlots = await getAllDeliverySlotsForCache(); + const deliverySlotsMap = /* @__PURE__ */ new Map(); + for (const slot of allDeliverySlots) { + if (!deliverySlotsMap.has(slot.productId)) + deliverySlotsMap.set(slot.productId, []); + deliverySlotsMap.get(slot.productId).push(slot); + } + const allSpecialDeals = await getAllSpecialDealsForCache(); + const specialDealsMap = /* @__PURE__ */ new Map(); + for (const deal of allSpecialDeals) { + if (!specialDealsMap.has(deal.productId)) + specialDealsMap.set(deal.productId, []); + specialDealsMap.get(deal.productId).push(deal); + } + const allProductTags = await getAllProductTagsForCache(); + const productTagsMap = /* @__PURE__ */ new Map(); + for (const tag2 of allProductTags) { + if (!productTagsMap.has(tag2.productId)) + productTagsMap.set(tag2.productId, []); + productTagsMap.get(tag2.productId).push(tag2.tagName); + } + const products = []; + for (const product of productsData) { + const signedImages = scaffoldAssetUrl( + product.images || [] + ); + const store = product.storeId ? storeMap.get(product.storeId) || null : null; + const deliverySlots = deliverySlotsMap.get(product.id) || []; + const specialDeals2 = specialDealsMap.get(product.id) || []; + const productTags2 = productTagsMap.get(product.id) || []; + products.push({ + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + longDescription: product.longDescription, + price: product.price.toString(), + marketPrice: product.marketPrice?.toString() || null, + unitNotation: product.unitShortNotation, + images: signedImages, + isOutOfStock: product.isOutOfStock, + store: store ? { id: store.id, name: store.name, description: store.description } : null, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + isFlashAvailable: product.isFlashAvailable, + flashPrice: product.flashPrice?.toString() || null, + deliverySlots: deliverySlots.map((s2) => ({ + id: s2.id, + deliveryTime: s2.deliveryTime, + freezeTime: s2.freezeTime, + isCapacityFull: s2.isCapacityFull + })), + specialDeals: specialDeals2.map((d2) => ({ + quantity: d2.quantity.toString(), + price: d2.price.toString(), + validTill: d2.validTill + })), + productTags: productTags2 + }); + } + return products; + } catch (error50) { + console.error("Error getting all products:", error50); + return []; + } +} +var init_product_store = __esm({ + "src/stores/product-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_s3_client(); + __name(initializeProducts, "initializeProducts"); + __name(getProductById5, "getProductById"); + __name(getAllProducts2, "getAllProducts"); + } +}); + +// src/stores/product-tag-store.ts +async function transformTagToStoreTag(tag2) { + const signedImageUrl = tag2.imageUrl ? await generateSignedUrlFromS3Url(tag2.imageUrl) : null; + return { + id: tag2.id, + tagName: tag2.tagName, + tagDescription: tag2.tagDescription, + imageUrl: signedImageUrl, + isDashboardTag: tag2.isDashboardTag, + relatedStores: tag2.relatedStores || [], + productIds: tag2.products ? tag2.products.map((p2) => p2.productId) : [] + }; +} +async function initializeProductTagStore() { + try { + console.log("Initializing product tag store in Redis..."); + const tagsData = await getAllTagsForCache(); + const productTagsData = await getAllTagProductMappings(); + const productIdsByTag = /* @__PURE__ */ new Map(); + for (const pt of productTagsData) { + if (!productIdsByTag.has(pt.tagId)) { + productIdsByTag.set(pt.tagId, []); + } + productIdsByTag.get(pt.tagId).push(pt.productId); + } + console.log("Product tag store initialized successfully"); + } catch (error50) { + console.error("Error initializing product tag store:", error50); + } +} +async function getDashboardTags() { + try { + const tags = await getAllProductTags(); + const result = []; + for (const tag2 of tags) { + if (tag2.isDashboardTag) { + result.push(await transformTagToStoreTag(tag2)); + } + } + return result; + } catch (error50) { + console.error("Error getting dashboard tags:", error50); + return []; + } +} +async function getTagsByStoreId(storeId) { + try { + const tags = await getAllProductTags(); + const result = []; + for (const tag2 of tags) { + const relatedStores = tag2.relatedStores || []; + if (relatedStores.includes(storeId)) { + result.push(await transformTagToStoreTag(tag2)); + } + } + return result; + } catch (error50) { + console.error(`Error getting tags for store ${storeId}:`, error50); + return []; + } +} +var init_product_tag_store = __esm({ + "src/stores/product-tag-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_s3_client(); + __name(transformTagToStoreTag, "transformTagToStoreTag"); + __name(initializeProductTagStore, "initializeProductTagStore"); + __name(getDashboardTags, "getDashboardTags"); + __name(getTagsByStoreId, "getTagsByStoreId"); + } +}); + +// src/trpc/apis/common-apis/common.ts +async function scaffoldProducts() { + let products = await getAllProducts2(); + products = products.filter((item) => Boolean(item.id)); + const suspendedProductIds = new Set(await getSuspendedProductIds()); + products = products.filter((product) => !suspendedProductIds.has(product.id)); + const formattedProducts = await Promise.all( + products.map(async (product) => { + const nextDeliveryDate = await getNextDeliveryDateWithCapacity(product.id); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + price: parseFloat(product.price), + marketPrice: product.marketPrice ? parseFloat(product.marketPrice) : null, + unit: product.unitNotation, + unitNotation: product.unitNotation, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + storeId: product.store?.id || null, + isOutOfStock: product.isOutOfStock, + isFlashAvailable: product.isFlashAvailable, + nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null, + images: product.images, + flashPrice: product.flashPrice + }; + }) + ); + return { + products: formattedProducts, + count: formattedProducts.length + }; +} +var getNextDeliveryDate, commonRouter; +var init_common3 = __esm({ + "src/trpc/apis/common-apis/common.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_dbService(); + init_product_store(); + init_product_tag_store(); + getNextDeliveryDate = getNextDeliveryDateWithCapacity; + __name(scaffoldProducts, "scaffoldProducts"); + commonRouter = router2({ + getDashboardTags: publicProcedure.query(async () => { + const tags = await getDashboardTags(); + return { + tags + }; + }), + getAllProductsSummary: publicProcedure.query(async () => { + const response = await scaffoldProducts(); + return response; + }) + /* + // Old implementation - moved to common-trpc-index.ts: + getStoresSummary: publicProcedure + .query(async () => { + const stores = await getStoresSummary(); + return { stores }; + }), + + healthCheck: publicProcedure + .query(async () => { + const result = await healthCheck(); + return result; + }), + */ + }); + } +}); + +// src/apis/common-apis/apis/common-product.controller.ts +var getAllProductsSummary; +var init_common_product_controller = __esm({ + "src/apis/common-apis/apis/common-product.controller.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_s3_client(); + init_common3(); + init_dbService(); + getAllProductsSummary = /* @__PURE__ */ __name(async (c2) => { + try { + const tagId = c2.req.query("tagId"); + const tagIdNum = tagId ? parseInt(tagId) : void 0; + if (tagIdNum) { + const products = await getAllProductsWithUnits(tagIdNum); + if (products.length === 0) { + return c2.json({ + products: [], + count: 0 + }, 200); + } + } + const productsWithUnits = await getAllProductsWithUnits(tagIdNum); + const formattedProducts = await Promise.all( + productsWithUnits.map(async (product) => { + const nextDeliveryDate = await getNextDeliveryDate(product.id); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + price: product.price, + marketPrice: product.marketPrice, + unit: product.unitShortNotation, + productQuantity: product.productQuantity, + isOutOfStock: product.isOutOfStock, + nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null, + images: scaffoldAssetUrl(product.images || []) + }; + }) + ); + return c2.json({ + products: formattedProducts, + count: formattedProducts.length + }, 200); + } catch (error50) { + console.error("Get products summary error:", error50); + return c2.json({ error: "Failed to fetch products summary" }, 500); + } + }, "getAllProductsSummary"); + } +}); + +// src/apis/common-apis/apis/common-product.router.ts +var router3, commonProductsRouter, common_product_router_default; +var init_common_product_router = __esm({ + "src/apis/common-apis/apis/common-product.router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_common_product_controller(); + router3 = new Hono2(); + router3.get("/summary", getAllProductsSummary); + commonProductsRouter = router3; + common_product_router_default = commonProductsRouter; + } +}); + +// src/apis/common-apis/apis/common.router.ts +var router4, commonRouter2, common_router_default; +var init_common_router = __esm({ + "src/apis/common-apis/apis/common.router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_common_product_router(); + router4 = new Hono2(); + router4.route("/products", common_product_router_default); + commonRouter2 = router4; + common_router_default = commonRouter2; + } +}); + +// src/v1-router.ts +var router5, v1Router, v1_router_default; +var init_v1_router = __esm({ + "src/v1-router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_av_router(); + init_common_router(); + router5 = new Hono2(); + router5.route("/av", av_router_default); + router5.route("/cm", common_router_default); + v1Router = router5; + v1_router_default = v1Router; + } +}); + +// src/test-controller.ts +var router6, test_controller_default; +var init_test_controller = __esm({ + "src/test-controller.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + router6 = new Hono2(); + router6.get("/", (c2) => { + return c2.json({ + status: "ok", + message: "Health check passed", + timestamp: (/* @__PURE__ */ new Date()).toISOString() + }); + }); + test_controller_default = router6; + } +}); + +// src/middleware/auth.middleware.ts +var authenticateUser; +var init_auth_middleware = __esm({ + "src/middleware/auth.middleware.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_webapi(); + init_dbService(); + init_api_error(); + init_env_exporter(); + authenticateUser = /* @__PURE__ */ __name(async (c2, next) => { + try { + const authHeader = c2.req.header("authorization"); + if (!authHeader?.startsWith("Bearer ")) { + throw new ApiError("Authorization token required", 401); + } + const token = authHeader.substring(7); + console.log(c2.req.header); + const { payload } = await jwtVerify(token, getEncodedJwtSecret()); + const decoded = payload; + if (decoded.staffId) { + const staff = await getStaffUserById(decoded.staffId); + if (!staff) { + throw new ApiError("Invalid staff token", 401); + } + c2.set("staffUser", { + id: staff.id, + name: staff.name + }); + } else { + c2.set("user", decoded); + const suspended = await isUserSuspended(decoded.userId); + if (suspended) { + throw new ApiError("Account suspended", 403); + } + } + await next(); + } catch (error50) { + throw error50; + } + }, "authenticateUser"); + } +}); + +// src/main-router.ts +var router7, mainRouter, main_router_default; +var init_main_router = __esm({ + "src/main-router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_v1_router(); + init_test_controller(); + init_auth_middleware(); + router7 = new Hono2(); + router7.get("/health", (c2) => { + return c2.json({ + status: "OK", + timestamp: (/* @__PURE__ */ new Date()).toISOString(), + uptime: process.uptime(), + message: "Hello world" + }); + }); + router7.get("/seed", (c2) => { + return c2.json({ + status: "OK", + timestamp: (/* @__PURE__ */ new Date()).toISOString(), + uptime: process.uptime() + }); + }); + router7.use("*", authenticateUser); + router7.route("/v1", v1_router_default); + router7.route("/test", test_controller_default); + mainRouter = router7; + main_router_default = mainRouter; + } +}); + +// ../../node_modules/zod/v4/core/core.js +function $constructor(name, initializer3, params) { + function init(inst, def) { + if (!inst._zod) { + Object.defineProperty(inst, "_zod", { + value: { + def, + constr: _, + traits: /* @__PURE__ */ new Set() + }, + enumerable: false + }); + } + if (inst._zod.traits.has(name)) { + return; + } + inst._zod.traits.add(name); + initializer3(inst, def); + const proto = _.prototype; + const keys = Object.keys(proto); + for (let i2 = 0; i2 < keys.length; i2++) { + const k2 = keys[i2]; + if (!(k2 in inst)) { + inst[k2] = proto[k2].bind(inst); + } + } + } + __name(init, "init"); + const Parent = params?.Parent ?? Object; + class Definition extends Parent { + } + __name(Definition, "Definition"); + Object.defineProperty(Definition, "name", { value: name }); + function _(def) { + var _a124; + const inst = params?.Parent ? new Definition() : this; + init(inst, def); + (_a124 = inst._zod).deferred ?? (_a124.deferred = []); + for (const fn of inst._zod.deferred) { + fn(); + } + return inst; + } + __name(_, "_"); + Object.defineProperty(_, "init", { value: init }); + Object.defineProperty(_, Symbol.hasInstance, { + value: (inst) => { + if (params?.Parent && inst instanceof params.Parent) + return true; + return inst?._zod?.traits?.has(name); + } + }); + Object.defineProperty(_, "name", { value: name }); + return _; +} +function config2(newConfig) { + if (newConfig) + Object.assign(globalConfig, newConfig); + return globalConfig; +} +var NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig; +var init_core2 = __esm({ + "../../node_modules/zod/v4/core/core.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + NEVER = Object.freeze({ + status: "aborted" + }); + __name($constructor, "$constructor"); + $brand = Symbol("zod_brand"); + $ZodAsyncError = class extends Error { + constructor() { + super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); + } + }; + __name($ZodAsyncError, "$ZodAsyncError"); + $ZodEncodeError = class extends Error { + constructor(name) { + super(`Encountered unidirectional transform during encode: ${name}`); + this.name = "ZodEncodeError"; + } + }; + __name($ZodEncodeError, "$ZodEncodeError"); + globalConfig = {}; + __name(config2, "config"); + } +}); + +// ../../node_modules/zod/v4/core/util.js +var util_exports = {}; +__export(util_exports, { + BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES, + Class: () => Class, + NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES, + aborted: () => aborted, + allowsEval: () => allowsEval, + assert: () => assert3, + assertEqual: () => assertEqual, + assertIs: () => assertIs, + assertNever: () => assertNever, + assertNotEqual: () => assertNotEqual, + assignProp: () => assignProp, + base64ToUint8Array: () => base64ToUint8Array, + base64urlToUint8Array: () => base64urlToUint8Array, + cached: () => cached, + captureStackTrace: () => captureStackTrace, + cleanEnum: () => cleanEnum, + cleanRegex: () => cleanRegex, + clone: () => clone, + cloneDef: () => cloneDef, + createTransparentProxy: () => createTransparentProxy, + defineLazy: () => defineLazy, + esc: () => esc, + escapeRegex: () => escapeRegex, + extend: () => extend, + finalizeIssue: () => finalizeIssue, + floatSafeRemainder: () => floatSafeRemainder, + getElementAtPath: () => getElementAtPath, + getEnumValues: () => getEnumValues, + getLengthableOrigin: () => getLengthableOrigin, + getParsedType: () => getParsedType, + getSizableOrigin: () => getSizableOrigin, + hexToUint8Array: () => hexToUint8Array, + isObject: () => isObject3, + isPlainObject: () => isPlainObject2, + issue: () => issue, + joinValues: () => joinValues, + jsonStringifyReplacer: () => jsonStringifyReplacer, + merge: () => merge2, + mergeDefs: () => mergeDefs, + normalizeParams: () => normalizeParams, + nullish: () => nullish, + numKeys: () => numKeys, + objectClone: () => objectClone, + omit: () => omit, + optionalKeys: () => optionalKeys, + parsedType: () => parsedType, + partial: () => partial, + pick: () => pick, + prefixIssues: () => prefixIssues, + primitiveTypes: () => primitiveTypes, + promiseAllObject: () => promiseAllObject, + propertyKeyTypes: () => propertyKeyTypes, + randomString: () => randomString, + required: () => required, + safeExtend: () => safeExtend, + shallowClone: () => shallowClone, + slugify: () => slugify, + stringifyPrimitive: () => stringifyPrimitive, + uint8ArrayToBase64: () => uint8ArrayToBase64, + uint8ArrayToBase64url: () => uint8ArrayToBase64url, + uint8ArrayToHex: () => uint8ArrayToHex, + unwrapMessage: () => unwrapMessage +}); +function assertEqual(val) { + return val; +} +function assertNotEqual(val) { + return val; +} +function assertIs(_arg) { +} +function assertNever(_x2) { + throw new Error("Unexpected value in exhaustive check"); +} +function assert3(_) { +} +function getEnumValues(entries) { + const numericValues = Object.values(entries).filter((v3) => typeof v3 === "number"); + const values = Object.entries(entries).filter(([k2, _]) => numericValues.indexOf(+k2) === -1).map(([_, v3]) => v3); + return values; +} +function joinValues(array2, separator = "|") { + return array2.map((val) => stringifyPrimitive(val)).join(separator); +} +function jsonStringifyReplacer(_, value) { + if (typeof value === "bigint") + return value.toString(); + return value; +} +function cached(getter) { + const set2 = false; + return { + get value() { + if (!set2) { + const value = getter(); + Object.defineProperty(this, "value", { value }); + return value; + } + throw new Error("cached value already set"); + } + }; +} +function nullish(input) { + return input === null || input === void 0; +} +function cleanRegex(source) { + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + return source.slice(start, end); +} +function floatSafeRemainder(val, step) { + const valDecCount = (val.toString().split(".")[1] || "").length; + const stepString = step.toString(); + let stepDecCount = (stepString.split(".")[1] || "").length; + if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) { + const match2 = stepString.match(/\d?e-(\d?)/); + if (match2?.[1]) { + stepDecCount = Number.parseInt(match2[1]); + } + } + const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; + const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); + const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); + return valInt % stepInt / 10 ** decCount; +} +function defineLazy(object2, key, getter) { + let value = void 0; + Object.defineProperty(object2, key, { + get() { + if (value === EVALUATING) { + return void 0; + } + if (value === void 0) { + value = EVALUATING; + value = getter(); + } + return value; + }, + set(v3) { + Object.defineProperty(object2, key, { + value: v3 + // configurable: true, + }); + }, + configurable: true + }); +} +function objectClone(obj) { + return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj)); +} +function assignProp(target, prop, value) { + Object.defineProperty(target, prop, { + value, + writable: true, + enumerable: true, + configurable: true + }); +} +function mergeDefs(...defs) { + const mergedDescriptors = {}; + for (const def of defs) { + const descriptors = Object.getOwnPropertyDescriptors(def); + Object.assign(mergedDescriptors, descriptors); + } + return Object.defineProperties({}, mergedDescriptors); +} +function cloneDef(schema) { + return mergeDefs(schema._zod.def); +} +function getElementAtPath(obj, path) { + if (!path) + return obj; + return path.reduce((acc, key) => acc?.[key], obj); +} +function promiseAllObject(promisesObj) { + const keys = Object.keys(promisesObj); + const promises = keys.map((key) => promisesObj[key]); + return Promise.all(promises).then((results) => { + const resolvedObj = {}; + for (let i2 = 0; i2 < keys.length; i2++) { + resolvedObj[keys[i2]] = results[i2]; + } + return resolvedObj; + }); +} +function randomString(length = 10) { + const chars2 = "abcdefghijklmnopqrstuvwxyz"; + let str = ""; + for (let i2 = 0; i2 < length; i2++) { + str += chars2[Math.floor(Math.random() * chars2.length)]; + } + return str; +} +function esc(str) { + return JSON.stringify(str); +} +function slugify(input) { + return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, ""); +} +function isObject3(data) { + return typeof data === "object" && data !== null && !Array.isArray(data); +} +function isPlainObject2(o2) { + if (isObject3(o2) === false) + return false; + const ctor = o2.constructor; + if (ctor === void 0) + return true; + if (typeof ctor !== "function") + return true; + const prot = ctor.prototype; + if (isObject3(prot) === false) + return false; + if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) { + return false; + } + return true; +} +function shallowClone(o2) { + if (isPlainObject2(o2)) + return { ...o2 }; + if (Array.isArray(o2)) + return [...o2]; + return o2; +} +function numKeys(data) { + let keyCount = 0; + for (const key in data) { + if (Object.prototype.hasOwnProperty.call(data, key)) { + keyCount++; + } + } + return keyCount; +} +function escapeRegex(str) { + return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); +} +function clone(inst, def, params) { + const cl2 = new inst._zod.constr(def ?? inst._zod.def); + if (!def || params?.parent) + cl2._zod.parent = inst; + return cl2; +} +function normalizeParams(_params) { + const params = _params; + if (!params) + return {}; + if (typeof params === "string") + return { error: () => params }; + if (params?.message !== void 0) { + if (params?.error !== void 0) + throw new Error("Cannot specify both `message` and `error` params"); + params.error = params.message; + } + delete params.message; + if (typeof params.error === "string") + return { ...params, error: () => params.error }; + return params; +} +function createTransparentProxy(getter) { + let target; + return new Proxy({}, { + get(_, prop, receiver) { + target ?? (target = getter()); + return Reflect.get(target, prop, receiver); + }, + set(_, prop, value, receiver) { + target ?? (target = getter()); + return Reflect.set(target, prop, value, receiver); + }, + has(_, prop) { + target ?? (target = getter()); + return Reflect.has(target, prop); + }, + deleteProperty(_, prop) { + target ?? (target = getter()); + return Reflect.deleteProperty(target, prop); + }, + ownKeys(_) { + target ?? (target = getter()); + return Reflect.ownKeys(target); + }, + getOwnPropertyDescriptor(_, prop) { + target ?? (target = getter()); + return Reflect.getOwnPropertyDescriptor(target, prop); + }, + defineProperty(_, prop, descriptor) { + target ?? (target = getter()); + return Reflect.defineProperty(target, prop, descriptor); + } + }); +} +function stringifyPrimitive(value) { + if (typeof value === "bigint") + return value.toString() + "n"; + if (typeof value === "string") + return `"${value}"`; + return `${value}`; +} +function optionalKeys(shape) { + return Object.keys(shape).filter((k2) => { + return shape[k2]._zod.optin === "optional" && shape[k2]._zod.optout === "optional"; + }); +} +function pick(schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".pick() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const newShape = {}; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + newShape[key] = currDef.shape[key]; + } + assignProp(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone(schema, def); +} +function omit(schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".omit() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const newShape = { ...schema._zod.def.shape }; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + delete newShape[key]; + } + assignProp(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone(schema, def); +} +function extend(schema, shape) { + if (!isPlainObject2(shape)) { + throw new Error("Invalid input to extend: expected a plain object"); + } + const checks = schema._zod.def.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + const existingShape = schema._zod.def.shape; + for (const key in shape) { + if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) { + throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead."); + } + } + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + } + }); + return clone(schema, def); +} +function safeExtend(schema, shape) { + if (!isPlainObject2(shape)) { + throw new Error("Invalid input to safeExtend: expected a plain object"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + } + }); + return clone(schema, def); +} +function merge2(a2, b2) { + const def = mergeDefs(a2._zod.def, { + get shape() { + const _shape = { ...a2._zod.def.shape, ...b2._zod.def.shape }; + assignProp(this, "shape", _shape); + return _shape; + }, + get catchall() { + return b2._zod.def.catchall; + }, + checks: [] + // delete existing checks + }); + return clone(a2, def); +} +function partial(Class2, schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".partial() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const oldShape = schema._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in oldShape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = Class2 ? new Class2({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; + } + } else { + for (const key in oldShape) { + shape[key] = Class2 ? new Class2({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; + } + } + assignProp(this, "shape", shape); + return shape; + }, + checks: [] + }); + return clone(schema, def); +} +function required(Class2, schema, mask) { + const def = mergeDefs(schema._zod.def, { + get shape() { + const oldShape = schema._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = new Class2({ + type: "nonoptional", + innerType: oldShape[key] + }); + } + } else { + for (const key in oldShape) { + shape[key] = new Class2({ + type: "nonoptional", + innerType: oldShape[key] + }); + } + } + assignProp(this, "shape", shape); + return shape; + } + }); + return clone(schema, def); +} +function aborted(x2, startIndex = 0) { + if (x2.aborted === true) + return true; + for (let i2 = startIndex; i2 < x2.issues.length; i2++) { + if (x2.issues[i2]?.continue !== true) { + return true; + } + } + return false; +} +function prefixIssues(path, issues) { + return issues.map((iss) => { + var _a124; + (_a124 = iss).path ?? (_a124.path = []); + iss.path.unshift(path); + return iss; + }); +} +function unwrapMessage(message2) { + return typeof message2 === "string" ? message2 : message2?.message; +} +function finalizeIssue(iss, ctx, config3) { + const full = { ...iss, path: iss.path ?? [] }; + if (!iss.message) { + const message2 = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config3.customError?.(iss)) ?? unwrapMessage(config3.localeError?.(iss)) ?? "Invalid input"; + full.message = message2; + } + delete full.inst; + delete full.continue; + if (!ctx?.reportInput) { + delete full.input; + } + return full; +} +function getSizableOrigin(input) { + if (input instanceof Set) + return "set"; + if (input instanceof Map) + return "map"; + if (input instanceof File) + return "file"; + return "unknown"; +} +function getLengthableOrigin(input) { + if (Array.isArray(input)) + return "array"; + if (typeof input === "string") + return "string"; + return "unknown"; +} +function parsedType(data) { + const t9 = typeof data; + switch (t9) { + case "number": { + return Number.isNaN(data) ? "nan" : "number"; + } + case "object": { + if (data === null) { + return "null"; + } + if (Array.isArray(data)) { + return "array"; + } + const obj = data; + if (obj && Object.getPrototypeOf(obj) !== Object.prototype && "constructor" in obj && obj.constructor) { + return obj.constructor.name; + } + } + } + return t9; +} +function issue(...args) { + const [iss, input, inst] = args; + if (typeof iss === "string") { + return { + message: iss, + code: "custom", + input, + inst + }; + } + return { ...iss }; +} +function cleanEnum(obj) { + return Object.entries(obj).filter(([k2, _]) => { + return Number.isNaN(Number.parseInt(k2, 10)); + }).map((el) => el[1]); +} +function base64ToUint8Array(base643) { + const binaryString = atob(base643); + const bytes = new Uint8Array(binaryString.length); + for (let i2 = 0; i2 < binaryString.length; i2++) { + bytes[i2] = binaryString.charCodeAt(i2); + } + return bytes; +} +function uint8ArrayToBase64(bytes) { + let binaryString = ""; + for (let i2 = 0; i2 < bytes.length; i2++) { + binaryString += String.fromCharCode(bytes[i2]); + } + return btoa(binaryString); +} +function base64urlToUint8Array(base64url3) { + const base643 = base64url3.replace(/-/g, "+").replace(/_/g, "/"); + const padding = "=".repeat((4 - base643.length % 4) % 4); + return base64ToUint8Array(base643 + padding); +} +function uint8ArrayToBase64url(bytes) { + return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); +} +function hexToUint8Array(hex3) { + const cleanHex = hex3.replace(/^0x/, ""); + if (cleanHex.length % 2 !== 0) { + throw new Error("Invalid hex string length"); + } + const bytes = new Uint8Array(cleanHex.length / 2); + for (let i2 = 0; i2 < cleanHex.length; i2 += 2) { + bytes[i2 / 2] = Number.parseInt(cleanHex.slice(i2, i2 + 2), 16); + } + return bytes; +} +function uint8ArrayToHex(bytes) { + return Array.from(bytes).map((b2) => b2.toString(16).padStart(2, "0")).join(""); +} +var EVALUATING, captureStackTrace, allowsEval, getParsedType, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, Class; +var init_util3 = __esm({ + "../../node_modules/zod/v4/core/util.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(assertEqual, "assertEqual"); + __name(assertNotEqual, "assertNotEqual"); + __name(assertIs, "assertIs"); + __name(assertNever, "assertNever"); + __name(assert3, "assert"); + __name(getEnumValues, "getEnumValues"); + __name(joinValues, "joinValues"); + __name(jsonStringifyReplacer, "jsonStringifyReplacer"); + __name(cached, "cached"); + __name(nullish, "nullish"); + __name(cleanRegex, "cleanRegex"); + __name(floatSafeRemainder, "floatSafeRemainder"); + EVALUATING = Symbol("evaluating"); + __name(defineLazy, "defineLazy"); + __name(objectClone, "objectClone"); + __name(assignProp, "assignProp"); + __name(mergeDefs, "mergeDefs"); + __name(cloneDef, "cloneDef"); + __name(getElementAtPath, "getElementAtPath"); + __name(promiseAllObject, "promiseAllObject"); + __name(randomString, "randomString"); + __name(esc, "esc"); + __name(slugify, "slugify"); + captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => { + }; + __name(isObject3, "isObject"); + allowsEval = cached(() => { + if (typeof navigator !== "undefined" && "Cloudflare-Workers"?.includes("Cloudflare")) { + return false; + } + try { + const F2 = Function; + new F2(""); + return true; + } catch (_) { + return false; + } + }); + __name(isPlainObject2, "isPlainObject"); + __name(shallowClone, "shallowClone"); + __name(numKeys, "numKeys"); + getParsedType = /* @__PURE__ */ __name((data) => { + const t9 = typeof data; + switch (t9) { + case "undefined": + return "undefined"; + case "string": + return "string"; + case "number": + return Number.isNaN(data) ? "nan" : "number"; + case "boolean": + return "boolean"; + case "function": + return "function"; + case "bigint": + return "bigint"; + case "symbol": + return "symbol"; + case "object": + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { + return "promise"; + } + if (typeof Map !== "undefined" && data instanceof Map) { + return "map"; + } + if (typeof Set !== "undefined" && data instanceof Set) { + return "set"; + } + if (typeof Date !== "undefined" && data instanceof Date) { + return "date"; + } + if (typeof File !== "undefined" && data instanceof File) { + return "file"; + } + return "object"; + default: + throw new Error(`Unknown data type: ${t9}`); + } + }, "getParsedType"); + propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]); + primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]); + __name(escapeRegex, "escapeRegex"); + __name(clone, "clone"); + __name(normalizeParams, "normalizeParams"); + __name(createTransparentProxy, "createTransparentProxy"); + __name(stringifyPrimitive, "stringifyPrimitive"); + __name(optionalKeys, "optionalKeys"); + NUMBER_FORMAT_RANGES = { + safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], + int32: [-2147483648, 2147483647], + uint32: [0, 4294967295], + float32: [-34028234663852886e22, 34028234663852886e22], + float64: [-Number.MAX_VALUE, Number.MAX_VALUE] + }; + BIGINT_FORMAT_RANGES = { + int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")], + uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")] + }; + __name(pick, "pick"); + __name(omit, "omit"); + __name(extend, "extend"); + __name(safeExtend, "safeExtend"); + __name(merge2, "merge"); + __name(partial, "partial"); + __name(required, "required"); + __name(aborted, "aborted"); + __name(prefixIssues, "prefixIssues"); + __name(unwrapMessage, "unwrapMessage"); + __name(finalizeIssue, "finalizeIssue"); + __name(getSizableOrigin, "getSizableOrigin"); + __name(getLengthableOrigin, "getLengthableOrigin"); + __name(parsedType, "parsedType"); + __name(issue, "issue"); + __name(cleanEnum, "cleanEnum"); + __name(base64ToUint8Array, "base64ToUint8Array"); + __name(uint8ArrayToBase64, "uint8ArrayToBase64"); + __name(base64urlToUint8Array, "base64urlToUint8Array"); + __name(uint8ArrayToBase64url, "uint8ArrayToBase64url"); + __name(hexToUint8Array, "hexToUint8Array"); + __name(uint8ArrayToHex, "uint8ArrayToHex"); + Class = class { + constructor(..._args) { + } + }; + __name(Class, "Class"); + } +}); + +// ../../node_modules/zod/v4/core/errors.js +function flattenError(error50, mapper = (issue2) => issue2.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of error50.issues) { + if (sub.path.length > 0) { + fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; + fieldErrors[sub.path[0]].push(mapper(sub)); + } else { + formErrors.push(mapper(sub)); + } + } + return { formErrors, fieldErrors }; +} +function formatError(error50, mapper = (issue2) => issue2.message) { + const fieldErrors = { _errors: [] }; + const processError = /* @__PURE__ */ __name((error51) => { + for (const issue2 of error51.issues) { + if (issue2.code === "invalid_union" && issue2.errors.length) { + issue2.errors.map((issues) => processError({ issues })); + } else if (issue2.code === "invalid_key") { + processError({ issues: issue2.issues }); + } else if (issue2.code === "invalid_element") { + processError({ issues: issue2.issues }); + } else if (issue2.path.length === 0) { + fieldErrors._errors.push(mapper(issue2)); + } else { + let curr = fieldErrors; + let i2 = 0; + while (i2 < issue2.path.length) { + const el = issue2.path[i2]; + const terminal = i2 === issue2.path.length - 1; + if (!terminal) { + curr[el] = curr[el] || { _errors: [] }; + } else { + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue2)); + } + curr = curr[el]; + i2++; + } + } + } + }, "processError"); + processError(error50); + return fieldErrors; +} +function treeifyError(error50, mapper = (issue2) => issue2.message) { + const result = { errors: [] }; + const processError = /* @__PURE__ */ __name((error51, path = []) => { + var _a124, _b; + for (const issue2 of error51.issues) { + if (issue2.code === "invalid_union" && issue2.errors.length) { + issue2.errors.map((issues) => processError({ issues }, issue2.path)); + } else if (issue2.code === "invalid_key") { + processError({ issues: issue2.issues }, issue2.path); + } else if (issue2.code === "invalid_element") { + processError({ issues: issue2.issues }, issue2.path); + } else { + const fullpath = [...path, ...issue2.path]; + if (fullpath.length === 0) { + result.errors.push(mapper(issue2)); + continue; + } + let curr = result; + let i2 = 0; + while (i2 < fullpath.length) { + const el = fullpath[i2]; + const terminal = i2 === fullpath.length - 1; + if (typeof el === "string") { + curr.properties ?? (curr.properties = {}); + (_a124 = curr.properties)[el] ?? (_a124[el] = { errors: [] }); + curr = curr.properties[el]; + } else { + curr.items ?? (curr.items = []); + (_b = curr.items)[el] ?? (_b[el] = { errors: [] }); + curr = curr.items[el]; + } + if (terminal) { + curr.errors.push(mapper(issue2)); + } + i2++; + } + } + } + }, "processError"); + processError(error50); + return result; +} +function toDotPath(_path) { + const segs = []; + const path = _path.map((seg) => typeof seg === "object" ? seg.key : seg); + for (const seg of path) { + if (typeof seg === "number") + segs.push(`[${seg}]`); + else if (typeof seg === "symbol") + segs.push(`[${JSON.stringify(String(seg))}]`); + else if (/[^\w$]/.test(seg)) + segs.push(`[${JSON.stringify(seg)}]`); + else { + if (segs.length) + segs.push("."); + segs.push(seg); + } + } + return segs.join(""); +} +function prettifyError(error50) { + const lines = []; + const issues = [...error50.issues].sort((a2, b2) => (a2.path ?? []).length - (b2.path ?? []).length); + for (const issue2 of issues) { + lines.push(`\u2716 ${issue2.message}`); + if (issue2.path?.length) + lines.push(` \u2192 at ${toDotPath(issue2.path)}`); + } + return lines.join("\n"); +} +var initializer, $ZodError, $ZodRealError; +var init_errors4 = __esm({ + "../../node_modules/zod/v4/core/errors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core2(); + init_util3(); + initializer = /* @__PURE__ */ __name((inst, def) => { + inst.name = "$ZodError"; + Object.defineProperty(inst, "_zod", { + value: inst._zod, + enumerable: false + }); + Object.defineProperty(inst, "issues", { + value: def, + enumerable: false + }); + inst.message = JSON.stringify(def, jsonStringifyReplacer, 2); + Object.defineProperty(inst, "toString", { + value: () => inst.message, + enumerable: false + }); + }, "initializer"); + $ZodError = $constructor("$ZodError", initializer); + $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error }); + __name(flattenError, "flattenError"); + __name(formatError, "formatError"); + __name(treeifyError, "treeifyError"); + __name(toDotPath, "toDotPath"); + __name(prettifyError, "prettifyError"); + } +}); + +// ../../node_modules/zod/v4/core/parse.js +var _parse, parse, _parseAsync, parseAsync, _safeParse, safeParse, _safeParseAsync, safeParseAsync, _encode, encode3, _decode, decode2, _encodeAsync, encodeAsync, _decodeAsync, decodeAsync, _safeEncode, safeEncode, _safeDecode, safeDecode, _safeEncodeAsync, safeEncodeAsync, _safeDecodeAsync, safeDecodeAsync; +var init_parse = __esm({ + "../../node_modules/zod/v4/core/parse.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core2(); + init_errors4(); + init_util3(); + _parse = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx, _params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; + const result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) { + throw new $ZodAsyncError(); + } + if (result.issues.length) { + const e2 = new (_params?.Err ?? _Err2)(result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))); + captureStackTrace(e2, _params?.callee); + throw e2; + } + return result.value; + }, "_parse"); + parse = /* @__PURE__ */ _parse($ZodRealError); + _parseAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx, params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + if (result.issues.length) { + const e2 = new (params?.Err ?? _Err2)(result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))); + captureStackTrace(e2, params?.callee); + throw e2; + } + return result.value; + }, "_parseAsync"); + parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError); + _safeParse = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + const ctx = _ctx ? { ..._ctx, async: false } : { async: false }; + const result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) { + throw new $ZodAsyncError(); + } + return result.issues.length ? { + success: false, + error: new (_Err2 ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))) + } : { success: true, data: result.value }; + }, "_safeParse"); + safeParse = /* @__PURE__ */ _safeParse($ZodRealError); + _safeParseAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + return result.issues.length ? { + success: false, + error: new _Err2(result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))) + } : { success: true, data: result.value }; + }, "_safeParseAsync"); + safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError); + _encode = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parse(_Err2)(schema, value, ctx); + }, "_encode"); + encode3 = /* @__PURE__ */ _encode($ZodRealError); + _decode = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + return _parse(_Err2)(schema, value, _ctx); + }, "_decode"); + decode2 = /* @__PURE__ */ _decode($ZodRealError); + _encodeAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parseAsync(_Err2)(schema, value, ctx); + }, "_encodeAsync"); + encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError); + _decodeAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + return _parseAsync(_Err2)(schema, value, _ctx); + }, "_decodeAsync"); + decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError); + _safeEncode = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParse(_Err2)(schema, value, ctx); + }, "_safeEncode"); + safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError); + _safeDecode = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + return _safeParse(_Err2)(schema, value, _ctx); + }, "_safeDecode"); + safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError); + _safeEncodeAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParseAsync(_Err2)(schema, value, ctx); + }, "_safeEncodeAsync"); + safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError); + _safeDecodeAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + return _safeParseAsync(_Err2)(schema, value, _ctx); + }, "_safeDecodeAsync"); + safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError); + } +}); + +// ../../node_modules/zod/v4/core/regexes.js +var regexes_exports = {}; +__export(regexes_exports, { + base64: () => base64, + base64url: () => base64url, + bigint: () => bigint2, + boolean: () => boolean, + browserEmail: () => browserEmail, + cidrv4: () => cidrv4, + cidrv6: () => cidrv6, + cuid: () => cuid, + cuid2: () => cuid2, + date: () => date2, + datetime: () => datetime, + domain: () => domain2, + duration: () => duration, + e164: () => e164, + email: () => email, + emoji: () => emoji, + extendedDuration: () => extendedDuration, + guid: () => guid, + hex: () => hex, + hostname: () => hostname, + html5Email: () => html5Email, + idnEmail: () => idnEmail, + integer: () => integer2, + ipv4: () => ipv4, + ipv6: () => ipv6, + ksuid: () => ksuid, + lowercase: () => lowercase, + mac: () => mac, + md5_base64: () => md5_base64, + md5_base64url: () => md5_base64url, + md5_hex: () => md5_hex, + nanoid: () => nanoid, + null: () => _null, + number: () => number, + rfc5322Email: () => rfc5322Email, + sha1_base64: () => sha1_base64, + sha1_base64url: () => sha1_base64url, + sha1_hex: () => sha1_hex, + sha256_base64: () => sha256_base64, + sha256_base64url: () => sha256_base64url, + sha256_hex: () => sha256_hex, + sha384_base64: () => sha384_base64, + sha384_base64url: () => sha384_base64url, + sha384_hex: () => sha384_hex, + sha512_base64: () => sha512_base64, + sha512_base64url: () => sha512_base64url, + sha512_hex: () => sha512_hex, + string: () => string, + time: () => time5, + ulid: () => ulid, + undefined: () => _undefined, + unicodeEmail: () => unicodeEmail, + uppercase: () => uppercase, + uuid: () => uuid, + uuid4: () => uuid4, + uuid6: () => uuid6, + uuid7: () => uuid7, + xid: () => xid +}); +function emoji() { + return new RegExp(_emoji, "u"); +} +function timeSource(args) { + const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`; + const regex = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`; + return regex; +} +function time5(args) { + return new RegExp(`^${timeSource(args)}$`); +} +function datetime(args) { + const time7 = timeSource({ precision: args.precision }); + const opts = ["Z"]; + if (args.local) + opts.push(""); + if (args.offset) + opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`); + const timeRegex = `${time7}(?:${opts.join("|")})`; + return new RegExp(`^${dateSource}T(?:${timeRegex})$`); +} +function fixedBase64(bodyLength, padding) { + return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`); +} +function fixedBase64url(length) { + return new RegExp(`^[A-Za-z0-9_-]{${length}}$`); +} +var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji, ipv4, ipv6, mac, cidrv4, cidrv6, base64, base64url, hostname, domain2, e164, dateSource, date2, string, bigint2, integer2, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url; +var init_regexes = __esm({ + "../../node_modules/zod/v4/core/regexes.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + cuid = /^[cC][^\s-]{8,}$/; + cuid2 = /^[0-9a-z]+$/; + ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; + xid = /^[0-9a-vA-V]{20}$/; + ksuid = /^[A-Za-z0-9]{27}$/; + nanoid = /^[a-zA-Z0-9_-]{21}$/; + duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; + extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; + guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; + uuid = /* @__PURE__ */ __name((version4) => { + if (!version4) + return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; + return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version4}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); + }, "uuid"); + uuid4 = /* @__PURE__ */ uuid(4); + uuid6 = /* @__PURE__ */ uuid(6); + uuid7 = /* @__PURE__ */ uuid(7); + email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; + html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; + rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u; + idnEmail = unicodeEmail; + browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; + _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; + __name(emoji, "emoji"); + ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; + ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/; + mac = /* @__PURE__ */ __name((delimiter) => { + const escapedDelim = escapeRegex(delimiter ?? ":"); + return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`); + }, "mac"); + cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; + cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; + base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; + base64url = /^[A-Za-z0-9_-]*$/; + hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/; + domain2 = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/; + e164 = /^\+[1-9]\d{6,14}$/; + dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; + date2 = /* @__PURE__ */ new RegExp(`^${dateSource}$`); + __name(timeSource, "timeSource"); + __name(time5, "time"); + __name(datetime, "datetime"); + string = /* @__PURE__ */ __name((params) => { + const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; + return new RegExp(`^${regex}$`); + }, "string"); + bigint2 = /^-?\d+n?$/; + integer2 = /^-?\d+$/; + number = /^-?\d+(?:\.\d+)?$/; + boolean = /^(?:true|false)$/i; + _null = /^null$/i; + _undefined = /^undefined$/i; + lowercase = /^[^A-Z]*$/; + uppercase = /^[^a-z]*$/; + hex = /^[0-9a-fA-F]*$/; + __name(fixedBase64, "fixedBase64"); + __name(fixedBase64url, "fixedBase64url"); + md5_hex = /^[0-9a-fA-F]{32}$/; + md5_base64 = /* @__PURE__ */ fixedBase64(22, "=="); + md5_base64url = /* @__PURE__ */ fixedBase64url(22); + sha1_hex = /^[0-9a-fA-F]{40}$/; + sha1_base64 = /* @__PURE__ */ fixedBase64(27, "="); + sha1_base64url = /* @__PURE__ */ fixedBase64url(27); + sha256_hex = /^[0-9a-fA-F]{64}$/; + sha256_base64 = /* @__PURE__ */ fixedBase64(43, "="); + sha256_base64url = /* @__PURE__ */ fixedBase64url(43); + sha384_hex = /^[0-9a-fA-F]{96}$/; + sha384_base64 = /* @__PURE__ */ fixedBase64(64, ""); + sha384_base64url = /* @__PURE__ */ fixedBase64url(64); + sha512_hex = /^[0-9a-fA-F]{128}$/; + sha512_base64 = /* @__PURE__ */ fixedBase64(86, "=="); + sha512_base64url = /* @__PURE__ */ fixedBase64url(86); + } +}); + +// ../../node_modules/zod/v4/core/checks.js +function handleCheckPropertyResult(result, payload, property) { + if (result.issues.length) { + payload.issues.push(...prefixIssues(property, result.issues)); + } +} +var $ZodCheck, numericOriginMap, $ZodCheckLessThan, $ZodCheckGreaterThan, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckBigIntFormat, $ZodCheckMaxSize, $ZodCheckMinSize, $ZodCheckSizeEquals, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckLengthEquals, $ZodCheckStringFormat, $ZodCheckRegex, $ZodCheckLowerCase, $ZodCheckUpperCase, $ZodCheckIncludes, $ZodCheckStartsWith, $ZodCheckEndsWith, $ZodCheckProperty, $ZodCheckMimeType, $ZodCheckOverwrite; +var init_checks2 = __esm({ + "../../node_modules/zod/v4/core/checks.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core2(); + init_regexes(); + init_util3(); + $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { + var _a124; + inst._zod ?? (inst._zod = {}); + inst._zod.def = def; + (_a124 = inst._zod).onattach ?? (_a124.onattach = []); + }); + numericOriginMap = { + number: "number", + bigint: "bigint", + object: "date" + }; + $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => { + $ZodCheck.init(inst, def); + const origin2 = numericOriginMap[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; + if (def.value < curr) { + if (def.inclusive) + bag.maximum = def.value; + else + bag.exclusiveMaximum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value <= def.value : payload.value < def.value) { + return; + } + payload.issues.push({ + origin: origin2, + code: "too_big", + maximum: typeof def.value === "object" ? def.value.getTime() : def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => { + $ZodCheck.init(inst, def); + const origin2 = numericOriginMap[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; + if (def.value > curr) { + if (def.inclusive) + bag.minimum = def.value; + else + bag.exclusiveMinimum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value >= def.value : payload.value > def.value) { + return; + } + payload.issues.push({ + origin: origin2, + code: "too_small", + minimum: typeof def.value === "object" ? def.value.getTime() : def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.onattach.push((inst2) => { + var _a124; + (_a124 = inst2._zod.bag).multipleOf ?? (_a124.multipleOf = def.value); + }); + inst._zod.check = (payload) => { + if (typeof payload.value !== typeof def.value) + throw new Error("Cannot mix number and bigint in multiple_of check."); + const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0; + if (isMultiple) + return; + payload.issues.push({ + origin: typeof payload.value, + code: "not_multiple_of", + divisor: def.value, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => { + $ZodCheck.init(inst, def); + def.format = def.format || "float64"; + const isInt = def.format?.includes("int"); + const origin2 = isInt ? "int" : "number"; + const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + if (isInt) + bag.pattern = integer2; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (isInt) { + if (!Number.isInteger(input)) { + payload.issues.push({ + expected: origin2, + format: def.format, + code: "invalid_type", + continue: false, + input, + inst + }); + return; + } + if (!Number.isSafeInteger(input)) { + if (input > 0) { + payload.issues.push({ + input, + code: "too_big", + maximum: Number.MAX_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin: origin2, + inclusive: true, + continue: !def.abort + }); + } else { + payload.issues.push({ + input, + code: "too_small", + minimum: Number.MIN_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin: origin2, + inclusive: true, + continue: !def.abort + }); + } + return; + } + } + if (input < minimum) { + payload.issues.push({ + origin: "number", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "number", + input, + code: "too_big", + maximum, + inclusive: true, + inst, + continue: !def.abort + }); + } + }; + }); + $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat", (inst, def) => { + $ZodCheck.init(inst, def); + const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (input < minimum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_big", + maximum, + inclusive: true, + inst, + continue: !def.abort + }); + } + }; + }); + $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size <= def.maximum) + return; + payload.issues.push({ + origin: getSizableOrigin(input), + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size >= def.minimum) + return; + payload.issues.push({ + origin: getSizableOrigin(input), + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.size; + bag.maximum = def.size; + bag.size = def.size; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size === def.size) + return; + const tooBig = size > def.size; + payload.issues.push({ + origin: getSizableOrigin(input), + ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length <= def.maximum) + return; + const origin2 = getLengthableOrigin(input); + payload.issues.push({ + origin: origin2, + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length >= def.minimum) + return; + const origin2 = getLengthableOrigin(input); + payload.issues.push({ + origin: origin2, + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.length; + bag.maximum = def.length; + bag.length = def.length; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length === def.length) + return; + const origin2 = getLengthableOrigin(input); + const tooBig = length > def.length; + payload.issues.push({ + origin: origin2, + ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => { + var _a124, _b; + $ZodCheck.init(inst, def); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + if (def.pattern) { + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(def.pattern); + } + }); + if (def.pattern) + (_a124 = inst._zod).check ?? (_a124.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: def.format, + input: payload.value, + ...def.pattern ? { pattern: def.pattern.toString() } : {}, + inst, + continue: !def.abort + }); + }); + else + (_b = inst._zod).check ?? (_b.check = () => { + }); + }); + $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => { + $ZodCheckStringFormat.init(inst, def); + inst._zod.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "regex", + input: payload.value, + pattern: def.pattern.toString(), + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => { + def.pattern ?? (def.pattern = lowercase); + $ZodCheckStringFormat.init(inst, def); + }); + $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => { + def.pattern ?? (def.pattern = uppercase); + $ZodCheckStringFormat.init(inst, def); + }); + $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => { + $ZodCheck.init(inst, def); + const escapedRegex = escapeRegex(def.includes); + const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex); + def.pattern = pattern; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.includes(def.includes, def.position)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "includes", + includes: def.includes, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => { + $ZodCheck.init(inst, def); + const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.startsWith(def.prefix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "starts_with", + prefix: def.prefix, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => { + $ZodCheck.init(inst, def); + const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.endsWith(def.suffix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "ends_with", + suffix: def.suffix, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + __name(handleCheckPropertyResult, "handleCheckPropertyResult"); + $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.check = (payload) => { + const result = def.schema._zod.run({ + value: payload.value[def.property], + issues: [] + }, {}); + if (result instanceof Promise) { + return result.then((result2) => handleCheckPropertyResult(result2, payload, def.property)); + } + handleCheckPropertyResult(result, payload, def.property); + return; + }; + }); + $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => { + $ZodCheck.init(inst, def); + const mimeSet = new Set(def.mime); + inst._zod.onattach.push((inst2) => { + inst2._zod.bag.mime = def.mime; + }); + inst._zod.check = (payload) => { + if (mimeSet.has(payload.value.type)) + return; + payload.issues.push({ + code: "invalid_value", + values: def.mime, + input: payload.value.type, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.check = (payload) => { + payload.value = def.tx(payload.value); + }; + }); + } +}); + +// ../../node_modules/zod/v4/core/doc.js +var Doc; +var init_doc = __esm({ + "../../node_modules/zod/v4/core/doc.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Doc = class { + constructor(args = []) { + this.content = []; + this.indent = 0; + if (this) + this.args = args; + } + indented(fn) { + this.indent += 1; + fn(this); + this.indent -= 1; + } + write(arg) { + if (typeof arg === "function") { + arg(this, { execution: "sync" }); + arg(this, { execution: "async" }); + return; + } + const content = arg; + const lines = content.split("\n").filter((x2) => x2); + const minIndent = Math.min(...lines.map((x2) => x2.length - x2.trimStart().length)); + const dedented = lines.map((x2) => x2.slice(minIndent)).map((x2) => " ".repeat(this.indent * 2) + x2); + for (const line of dedented) { + this.content.push(line); + } + } + compile() { + const F2 = Function; + const args = this?.args; + const content = this?.content ?? [``]; + const lines = [...content.map((x2) => ` ${x2}`)]; + return new F2(...args, lines.join("\n")); + } + }; + __name(Doc, "Doc"); + } +}); + +// ../../node_modules/zod/v4/core/versions.js +var version3; +var init_versions = __esm({ + "../../node_modules/zod/v4/core/versions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + version3 = { + major: 4, + minor: 3, + patch: 6 + }; + } +}); + +// ../../node_modules/zod/v4/core/schemas.js +function isValidBase64(data) { + if (data === "") + return true; + if (data.length % 4 !== 0) + return false; + try { + atob(data); + return true; + } catch { + return false; + } +} +function isValidBase64URL(data) { + if (!base64url.test(data)) + return false; + const base643 = data.replace(/[-_]/g, (c2) => c2 === "-" ? "+" : "/"); + const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "="); + return isValidBase64(padded); +} +function isValidJWT(token, algorithm = null) { + try { + const tokensParts = token.split("."); + if (tokensParts.length !== 3) + return false; + const [header] = tokensParts; + if (!header) + return false; + const parsedHeader = JSON.parse(atob(header)); + if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") + return false; + if (!parsedHeader.alg) + return false; + if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) + return false; + return true; + } catch { + return false; + } +} +function handleArrayResult(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues(index, result.issues)); + } + final.value[index] = result.value; +} +function handlePropertyResult(result, final, key, input, isOptionalOut) { + if (result.issues.length) { + if (isOptionalOut && !(key in input)) { + return; + } + final.issues.push(...prefixIssues(key, result.issues)); + } + if (result.value === void 0) { + if (key in input) { + final.value[key] = void 0; + } + } else { + final.value[key] = result.value; + } +} +function normalizeDef(def) { + const keys = Object.keys(def.shape); + for (const k2 of keys) { + if (!def.shape?.[k2]?._zod?.traits?.has("$ZodType")) { + throw new Error(`Invalid element at key "${k2}": expected a Zod schema`); + } + } + const okeys = optionalKeys(def.shape); + return { + ...def, + keys, + keySet: new Set(keys), + numKeys: keys.length, + optionalKeys: new Set(okeys) + }; +} +function handleCatchall(proms, input, payload, ctx, def, inst) { + const unrecognized = []; + const keySet = def.keySet; + const _catchall = def.catchall._zod; + const t9 = _catchall.def.type; + const isOptionalOut = _catchall.optout === "optional"; + for (const key in input) { + if (keySet.has(key)) + continue; + if (t9 === "never") { + unrecognized.push(key); + continue; + } + const r2 = _catchall.run({ value: input[key], issues: [] }, ctx); + if (r2 instanceof Promise) { + proms.push(r2.then((r3) => handlePropertyResult(r3, payload, key, input, isOptionalOut))); + } else { + handlePropertyResult(r2, payload, key, input, isOptionalOut); + } + } + if (unrecognized.length) { + payload.issues.push({ + code: "unrecognized_keys", + keys: unrecognized, + input, + inst + }); + } + if (!proms.length) + return payload; + return Promise.all(proms).then(() => { + return payload; + }); +} +function handleUnionResults(results, final, inst, ctx) { + for (const result of results) { + if (result.issues.length === 0) { + final.value = result.value; + return final; + } + } + const nonaborted = results.filter((r2) => !aborted(r2)); + if (nonaborted.length === 1) { + final.value = nonaborted[0].value; + return nonaborted[0]; + } + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))) + }); + return final; +} +function handleExclusiveUnionResults(results, final, inst, ctx) { + const successes = results.filter((r2) => r2.issues.length === 0); + if (successes.length === 1) { + final.value = successes[0].value; + return final; + } + if (successes.length === 0) { + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))) + }); + } else { + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: [], + inclusive: false + }); + } + return final; +} +function mergeValues(a2, b2) { + if (a2 === b2) { + return { valid: true, data: a2 }; + } + if (a2 instanceof Date && b2 instanceof Date && +a2 === +b2) { + return { valid: true, data: a2 }; + } + if (isPlainObject2(a2) && isPlainObject2(b2)) { + const bKeys = Object.keys(b2); + const sharedKeys = Object.keys(a2).filter((key) => bKeys.indexOf(key) !== -1); + const newObj = { ...a2, ...b2 }; + for (const key of sharedKeys) { + const sharedValue = mergeValues(a2[key], b2[key]); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [key, ...sharedValue.mergeErrorPath] + }; + } + newObj[key] = sharedValue.data; + } + return { valid: true, data: newObj }; + } + if (Array.isArray(a2) && Array.isArray(b2)) { + if (a2.length !== b2.length) { + return { valid: false, mergeErrorPath: [] }; + } + const newArray = []; + for (let index = 0; index < a2.length; index++) { + const itemA = a2[index]; + const itemB = b2[index]; + const sharedValue = mergeValues(itemA, itemB); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [index, ...sharedValue.mergeErrorPath] + }; + } + newArray.push(sharedValue.data); + } + return { valid: true, data: newArray }; + } + return { valid: false, mergeErrorPath: [] }; +} +function handleIntersectionResults(result, left, right) { + const unrecKeys = /* @__PURE__ */ new Map(); + let unrecIssue; + for (const iss of left.issues) { + if (iss.code === "unrecognized_keys") { + unrecIssue ?? (unrecIssue = iss); + for (const k2 of iss.keys) { + if (!unrecKeys.has(k2)) + unrecKeys.set(k2, {}); + unrecKeys.get(k2).l = true; + } + } else { + result.issues.push(iss); + } + } + for (const iss of right.issues) { + if (iss.code === "unrecognized_keys") { + for (const k2 of iss.keys) { + if (!unrecKeys.has(k2)) + unrecKeys.set(k2, {}); + unrecKeys.get(k2).r = true; + } + } else { + result.issues.push(iss); + } + } + const bothKeys = [...unrecKeys].filter(([, f2]) => f2.l && f2.r).map(([k2]) => k2); + if (bothKeys.length && unrecIssue) { + result.issues.push({ ...unrecIssue, keys: bothKeys }); + } + if (aborted(result)) + return result; + const merged = mergeValues(left.value, right.value); + if (!merged.valid) { + throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`); + } + result.value = merged.data; + return result; +} +function handleTupleResult(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues(index, result.issues)); + } + final.value[index] = result.value; +} +function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) { + if (keyResult.issues.length) { + if (propertyKeyTypes.has(typeof key)) { + final.issues.push(...prefixIssues(key, keyResult.issues)); + } else { + final.issues.push({ + code: "invalid_key", + origin: "map", + input, + inst, + issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config2())) + }); + } + } + if (valueResult.issues.length) { + if (propertyKeyTypes.has(typeof key)) { + final.issues.push(...prefixIssues(key, valueResult.issues)); + } else { + final.issues.push({ + origin: "map", + code: "invalid_element", + input, + inst, + key, + issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config2())) + }); + } + } + final.value.set(keyResult.value, valueResult.value); +} +function handleSetResult(result, final) { + if (result.issues.length) { + final.issues.push(...result.issues); + } + final.value.add(result.value); +} +function handleOptionalResult(result, input) { + if (result.issues.length && input === void 0) { + return { issues: [], value: void 0 }; + } + return result; +} +function handleDefaultResult(payload, def) { + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return payload; +} +function handleNonOptionalResult(payload, inst) { + if (!payload.issues.length && payload.value === void 0) { + payload.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: payload.value, + inst + }); + } + return payload; +} +function handlePipeResult(left, next, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return next._zod.run({ value: left.value, issues: left.issues }, ctx); +} +function handleCodecAResult(result, def, ctx) { + if (result.issues.length) { + result.aborted = true; + return result; + } + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const transformed = def.transform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx)); + } + return handleCodecTxResult(result, transformed, def.out, ctx); + } else { + const transformed = def.reverseTransform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx)); + } + return handleCodecTxResult(result, transformed, def.in, ctx); + } +} +function handleCodecTxResult(left, value, nextSchema, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return nextSchema._zod.run({ value, issues: left.issues }, ctx); +} +function handleReadonlyResult(payload) { + payload.value = Object.freeze(payload.value); + return payload; +} +function handleRefineResult(result, payload, input, inst) { + if (!result) { + const _iss = { + code: "custom", + input, + inst, + // incorporates params.error into issue reporting + path: [...inst._zod.def.path ?? []], + // incorporates params.error into issue reporting + continue: !inst._zod.def.abort + // params: inst._zod.def.params, + }; + if (inst._zod.def.params) + _iss.params = inst._zod.def.params; + payload.issues.push(issue(_iss)); + } +} +var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom; +var init_schemas = __esm({ + "../../node_modules/zod/v4/core/schemas.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_checks2(); + init_core2(); + init_doc(); + init_parse(); + init_regexes(); + init_util3(); + init_versions(); + init_util3(); + $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { + var _a124; + inst ?? (inst = {}); + inst._zod.def = def; + inst._zod.bag = inst._zod.bag || {}; + inst._zod.version = version3; + const checks = [...inst._zod.def.checks ?? []]; + if (inst._zod.traits.has("$ZodCheck")) { + checks.unshift(inst); + } + for (const ch2 of checks) { + for (const fn of ch2._zod.onattach) { + fn(inst); + } + } + if (checks.length === 0) { + (_a124 = inst._zod).deferred ?? (_a124.deferred = []); + inst._zod.deferred?.push(() => { + inst._zod.run = inst._zod.parse; + }); + } else { + const runChecks = /* @__PURE__ */ __name((payload, checks2, ctx) => { + let isAborted = aborted(payload); + let asyncResult; + for (const ch2 of checks2) { + if (ch2._zod.def.when) { + const shouldRun = ch2._zod.def.when(payload); + if (!shouldRun) + continue; + } else if (isAborted) { + continue; + } + const currLen = payload.issues.length; + const _ = ch2._zod.check(payload); + if (_ instanceof Promise && ctx?.async === false) { + throw new $ZodAsyncError(); + } + if (asyncResult || _ instanceof Promise) { + asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { + await _; + const nextLen = payload.issues.length; + if (nextLen === currLen) + return; + if (!isAborted) + isAborted = aborted(payload, currLen); + }); + } else { + const nextLen = payload.issues.length; + if (nextLen === currLen) + continue; + if (!isAborted) + isAborted = aborted(payload, currLen); + } + } + if (asyncResult) { + return asyncResult.then(() => { + return payload; + }); + } + return payload; + }, "runChecks"); + const handleCanaryResult = /* @__PURE__ */ __name((canary, payload, ctx) => { + if (aborted(canary)) { + canary.aborted = true; + return canary; + } + const checkResult = runChecks(payload, checks, ctx); + if (checkResult instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx)); + } + return inst._zod.parse(checkResult, ctx); + }, "handleCanaryResult"); + inst._zod.run = (payload, ctx) => { + if (ctx.skipChecks) { + return inst._zod.parse(payload, ctx); + } + if (ctx.direction === "backward") { + const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true }); + if (canary instanceof Promise) { + return canary.then((canary2) => { + return handleCanaryResult(canary2, payload, ctx); + }); + } + return handleCanaryResult(canary, payload, ctx); + } + const result = inst._zod.parse(payload, ctx); + if (result instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return result.then((result2) => runChecks(result2, checks, ctx)); + } + return runChecks(result, checks, ctx); + }; + } + defineLazy(inst, "~standard", () => ({ + validate: (value) => { + try { + const r2 = safeParse(inst, value); + return r2.success ? { value: r2.data } : { issues: r2.error?.issues }; + } catch (_) { + return safeParseAsync(inst, value).then((r2) => r2.success ? { value: r2.data } : { issues: r2.error?.issues }); + } + }, + vendor: "zod", + version: 1 + })); + }); + $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag); + inst._zod.parse = (payload, _) => { + if (def.coerce) + try { + payload.value = String(payload.value); + } catch (_2) { + } + if (typeof payload.value === "string") + return payload; + payload.issues.push({ + expected: "string", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; + }); + $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => { + $ZodCheckStringFormat.init(inst, def); + $ZodString.init(inst, def); + }); + $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => { + def.pattern ?? (def.pattern = guid); + $ZodStringFormat.init(inst, def); + }); + $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => { + if (def.version) { + const versionMap = { + v1: 1, + v2: 2, + v3: 3, + v4: 4, + v5: 5, + v6: 6, + v7: 7, + v8: 8 + }; + const v3 = versionMap[def.version]; + if (v3 === void 0) + throw new Error(`Invalid UUID version: "${def.version}"`); + def.pattern ?? (def.pattern = uuid(v3)); + } else + def.pattern ?? (def.pattern = uuid()); + $ZodStringFormat.init(inst, def); + }); + $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => { + def.pattern ?? (def.pattern = email); + $ZodStringFormat.init(inst, def); + }); + $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + try { + const trimmed = payload.value.trim(); + const url2 = new URL(trimmed); + if (def.hostname) { + def.hostname.lastIndex = 0; + if (!def.hostname.test(url2.hostname)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid hostname", + pattern: def.hostname.source, + input: payload.value, + inst, + continue: !def.abort + }); + } + } + if (def.protocol) { + def.protocol.lastIndex = 0; + if (!def.protocol.test(url2.protocol.endsWith(":") ? url2.protocol.slice(0, -1) : url2.protocol)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid protocol", + pattern: def.protocol.source, + input: payload.value, + inst, + continue: !def.abort + }); + } + } + if (def.normalize) { + payload.value = url2.href; + } else { + payload.value = trimmed; + } + return; + } catch (_) { + payload.issues.push({ + code: "invalid_format", + format: "url", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; + }); + $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => { + def.pattern ?? (def.pattern = emoji()); + $ZodStringFormat.init(inst, def); + }); + $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => { + def.pattern ?? (def.pattern = nanoid); + $ZodStringFormat.init(inst, def); + }); + $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => { + def.pattern ?? (def.pattern = cuid); + $ZodStringFormat.init(inst, def); + }); + $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => { + def.pattern ?? (def.pattern = cuid2); + $ZodStringFormat.init(inst, def); + }); + $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => { + def.pattern ?? (def.pattern = ulid); + $ZodStringFormat.init(inst, def); + }); + $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => { + def.pattern ?? (def.pattern = xid); + $ZodStringFormat.init(inst, def); + }); + $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => { + def.pattern ?? (def.pattern = ksuid); + $ZodStringFormat.init(inst, def); + }); + $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => { + def.pattern ?? (def.pattern = datetime(def)); + $ZodStringFormat.init(inst, def); + }); + $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => { + def.pattern ?? (def.pattern = date2); + $ZodStringFormat.init(inst, def); + }); + $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => { + def.pattern ?? (def.pattern = time5(def)); + $ZodStringFormat.init(inst, def); + }); + $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => { + def.pattern ?? (def.pattern = duration); + $ZodStringFormat.init(inst, def); + }); + $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => { + def.pattern ?? (def.pattern = ipv4); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `ipv4`; + }); + $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => { + def.pattern ?? (def.pattern = ipv6); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `ipv6`; + inst._zod.check = (payload) => { + try { + new URL(`http://[${payload.value}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "ipv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; + }); + $ZodMAC = /* @__PURE__ */ $constructor("$ZodMAC", (inst, def) => { + def.pattern ?? (def.pattern = mac(def.delimiter)); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `mac`; + }); + $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => { + def.pattern ?? (def.pattern = cidrv4); + $ZodStringFormat.init(inst, def); + }); + $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => { + def.pattern ?? (def.pattern = cidrv6); + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + const parts = payload.value.split("/"); + try { + if (parts.length !== 2) + throw new Error(); + const [address, prefix] = parts; + if (!prefix) + throw new Error(); + const prefixNum = Number(prefix); + if (`${prefixNum}` !== prefix) + throw new Error(); + if (prefixNum < 0 || prefixNum > 128) + throw new Error(); + new URL(`http://[${address}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "cidrv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; + }); + __name(isValidBase64, "isValidBase64"); + $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => { + def.pattern ?? (def.pattern = base64); + $ZodStringFormat.init(inst, def); + inst._zod.bag.contentEncoding = "base64"; + inst._zod.check = (payload) => { + if (isValidBase64(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64", + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + __name(isValidBase64URL, "isValidBase64URL"); + $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => { + def.pattern ?? (def.pattern = base64url); + $ZodStringFormat.init(inst, def); + inst._zod.bag.contentEncoding = "base64url"; + inst._zod.check = (payload) => { + if (isValidBase64URL(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64url", + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => { + def.pattern ?? (def.pattern = e164); + $ZodStringFormat.init(inst, def); + }); + __name(isValidJWT, "isValidJWT"); + $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + if (isValidJWT(payload.value, def.alg)) + return; + payload.issues.push({ + code: "invalid_format", + format: "jwt", + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + if (def.fn(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: def.format, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = inst._zod.bag.pattern ?? number; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Number(payload.value); + } catch (_) { + } + const input = payload.value; + if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) { + return payload; + } + const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0; + payload.issues.push({ + expected: "number", + code: "invalid_type", + input, + inst, + ...received ? { received } : {} + }); + return payload; + }; + }); + $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst, def) => { + $ZodCheckNumberFormat.init(inst, def); + $ZodNumber.init(inst, def); + }); + $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = boolean; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Boolean(payload.value); + } catch (_) { + } + const input = payload.value; + if (typeof input === "boolean") + return payload; + payload.issues.push({ + expected: "boolean", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = bigint2; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = BigInt(payload.value); + } catch (_) { + } + if (typeof payload.value === "bigint") + return payload; + payload.issues.push({ + expected: "bigint", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; + }); + $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, def) => { + $ZodCheckBigIntFormat.init(inst, def); + $ZodBigInt.init(inst, def); + }); + $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "symbol") + return payload; + payload.issues.push({ + expected: "symbol", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = _undefined; + inst._zod.values = /* @__PURE__ */ new Set([void 0]); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "undefined", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = _null; + inst._zod.values = /* @__PURE__ */ new Set([null]); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input === null) + return payload; + payload.issues.push({ + expected: "null", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload) => payload; + }); + $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload) => payload; + }); + $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + payload.issues.push({ + expected: "never", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; + }); + $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "void", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) { + try { + payload.value = new Date(payload.value); + } catch (_err) { + } + } + const input = payload.value; + const isDate2 = input instanceof Date; + const isValidDate = isDate2 && !Number.isNaN(input.getTime()); + if (isValidDate) + return payload; + payload.issues.push({ + expected: "date", + code: "invalid_type", + input, + ...isDate2 ? { received: "Invalid Date" } : {}, + inst + }); + return payload; + }; + }); + __name(handleArrayResult, "handleArrayResult"); + $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + expected: "array", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = Array(input.length); + const proms = []; + for (let i2 = 0; i2 < input.length; i2++) { + const item = input[i2]; + const result = def.element._zod.run({ + value: item, + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleArrayResult(result2, payload, i2))); + } else { + handleArrayResult(result, payload, i2); + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; + }); + __name(handlePropertyResult, "handlePropertyResult"); + __name(normalizeDef, "normalizeDef"); + __name(handleCatchall, "handleCatchall"); + $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => { + $ZodType.init(inst, def); + const desc2 = Object.getOwnPropertyDescriptor(def, "shape"); + if (!desc2?.get) { + const sh = def.shape; + Object.defineProperty(def, "shape", { + get: () => { + const newSh = { ...sh }; + Object.defineProperty(def, "shape", { + value: newSh + }); + return newSh; + } + }); + } + const _normalized = cached(() => normalizeDef(def)); + defineLazy(inst._zod, "propValues", () => { + const shape = def.shape; + const propValues = {}; + for (const key in shape) { + const field = shape[key]._zod; + if (field.values) { + propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set()); + for (const v3 of field.values) + propValues[key].add(v3); + } + } + return propValues; + }); + const isObject5 = isObject3; + const catchall = def.catchall; + let value; + inst._zod.parse = (payload, ctx) => { + value ?? (value = _normalized.value); + const input = payload.value; + if (!isObject5(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = {}; + const proms = []; + const shape = value.shape; + for (const key of value.keys) { + const el = shape[key]; + const isOptionalOut = el._zod.optout === "optional"; + const r2 = el._zod.run({ value: input[key], issues: [] }, ctx); + if (r2 instanceof Promise) { + proms.push(r2.then((r3) => handlePropertyResult(r3, payload, key, input, isOptionalOut))); + } else { + handlePropertyResult(r2, payload, key, input, isOptionalOut); + } + } + if (!catchall) { + return proms.length ? Promise.all(proms).then(() => payload) : payload; + } + return handleCatchall(proms, input, payload, ctx, _normalized.value, inst); + }; + }); + $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => { + $ZodObject.init(inst, def); + const superParse = inst._zod.parse; + const _normalized = cached(() => normalizeDef(def)); + const generateFastpass = /* @__PURE__ */ __name((shape) => { + const doc = new Doc(["shape", "payload", "ctx"]); + const normalized = _normalized.value; + const parseStr = /* @__PURE__ */ __name((key) => { + const k2 = esc(key); + return `shape[${k2}]._zod.run({ value: input[${k2}], issues: [] }, ctx)`; + }, "parseStr"); + doc.write(`const input = payload.value;`); + const ids = /* @__PURE__ */ Object.create(null); + let counter = 0; + for (const key of normalized.keys) { + ids[key] = `key_${counter++}`; + } + doc.write(`const newResult = {};`); + for (const key of normalized.keys) { + const id = ids[key]; + const k2 = esc(key); + const schema = shape[key]; + const isOptionalOut = schema?._zod?.optout === "optional"; + doc.write(`const ${id} = ${parseStr(key)};`); + if (isOptionalOut) { + doc.write(` + if (${id}.issues.length) { + if (${k2} in input) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k2}, ...iss.path] : [${k2}] + }))); + } + } + + if (${id}.value === undefined) { + if (${k2} in input) { + newResult[${k2}] = undefined; + } + } else { + newResult[${k2}] = ${id}.value; + } + + `); + } else { + doc.write(` + if (${id}.issues.length) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k2}, ...iss.path] : [${k2}] + }))); + } + + if (${id}.value === undefined) { + if (${k2} in input) { + newResult[${k2}] = undefined; + } + } else { + newResult[${k2}] = ${id}.value; + } + + `); + } + } + doc.write(`payload.value = newResult;`); + doc.write(`return payload;`); + const fn = doc.compile(); + return (payload, ctx) => fn(shape, payload, ctx); + }, "generateFastpass"); + let fastpass; + const isObject5 = isObject3; + const jit = !globalConfig.jitless; + const allowsEval2 = allowsEval; + const fastEnabled = jit && allowsEval2.value; + const catchall = def.catchall; + let value; + inst._zod.parse = (payload, ctx) => { + value ?? (value = _normalized.value); + const input = payload.value; + if (!isObject5(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) { + if (!fastpass) + fastpass = generateFastpass(def.shape); + payload = fastpass(payload, ctx); + if (!catchall) + return payload; + return handleCatchall([], input, payload, ctx, value, inst); + } + return superParse(payload, ctx); + }; + }); + __name(handleUnionResults, "handleUnionResults"); + $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.options.some((o2) => o2._zod.optin === "optional") ? "optional" : void 0); + defineLazy(inst._zod, "optout", () => def.options.some((o2) => o2._zod.optout === "optional") ? "optional" : void 0); + defineLazy(inst._zod, "values", () => { + if (def.options.every((o2) => o2._zod.values)) { + return new Set(def.options.flatMap((option) => Array.from(option._zod.values))); + } + return void 0; + }); + defineLazy(inst._zod, "pattern", () => { + if (def.options.every((o2) => o2._zod.pattern)) { + const patterns = def.options.map((o2) => o2._zod.pattern); + return new RegExp(`^(${patterns.map((p2) => cleanRegex(p2.source)).join("|")})$`); + } + return void 0; + }); + const single = def.options.length === 1; + const first = def.options[0]._zod.run; + inst._zod.parse = (payload, ctx) => { + if (single) { + return first(payload, ctx); + } + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + if (result.issues.length === 0) + return result; + results.push(result); + } + } + if (!async) + return handleUnionResults(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleUnionResults(results2, payload, inst, ctx); + }); + }; + }); + __name(handleExclusiveUnionResults, "handleExclusiveUnionResults"); + $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => { + $ZodUnion.init(inst, def); + def.inclusive = false; + const single = def.options.length === 1; + const first = def.options[0]._zod.run; + inst._zod.parse = (payload, ctx) => { + if (single) { + return first(payload, ctx); + } + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + results.push(result); + } + } + if (!async) + return handleExclusiveUnionResults(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleExclusiveUnionResults(results2, payload, inst, ctx); + }); + }; + }); + $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => { + def.inclusive = false; + $ZodUnion.init(inst, def); + const _super = inst._zod.parse; + defineLazy(inst._zod, "propValues", () => { + const propValues = {}; + for (const option of def.options) { + const pv = option._zod.propValues; + if (!pv || Object.keys(pv).length === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`); + for (const [k2, v3] of Object.entries(pv)) { + if (!propValues[k2]) + propValues[k2] = /* @__PURE__ */ new Set(); + for (const val of v3) { + propValues[k2].add(val); + } + } + } + return propValues; + }); + const disc = cached(() => { + const opts = def.options; + const map2 = /* @__PURE__ */ new Map(); + for (const o2 of opts) { + const values = o2._zod.propValues?.[def.discriminator]; + if (!values || values.size === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o2)}"`); + for (const v3 of values) { + if (map2.has(v3)) { + throw new Error(`Duplicate discriminator value "${String(v3)}"`); + } + map2.set(v3, o2); + } + } + return map2; + }); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isObject3(input)) { + payload.issues.push({ + code: "invalid_type", + expected: "object", + input, + inst + }); + return payload; + } + const opt = disc.value.get(input?.[def.discriminator]); + if (opt) { + return opt._zod.run(payload, ctx); + } + if (def.unionFallback) { + return _super(payload, ctx); + } + payload.issues.push({ + code: "invalid_union", + errors: [], + note: "No matching discriminator", + discriminator: def.discriminator, + input, + path: [def.discriminator], + inst + }); + return payload; + }; + }); + $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + const left = def.left._zod.run({ value: input, issues: [] }, ctx); + const right = def.right._zod.run({ value: input, issues: [] }, ctx); + const async = left instanceof Promise || right instanceof Promise; + if (async) { + return Promise.all([left, right]).then(([left2, right2]) => { + return handleIntersectionResults(payload, left2, right2); + }); + } + return handleIntersectionResults(payload, left, right); + }; + }); + __name(mergeValues, "mergeValues"); + __name(handleIntersectionResults, "handleIntersectionResults"); + $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => { + $ZodType.init(inst, def); + const items = def.items; + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + input, + inst, + expected: "tuple", + code: "invalid_type" + }); + return payload; + } + payload.value = []; + const proms = []; + const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional"); + const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex; + if (!def.rest) { + const tooBig = input.length > items.length; + const tooSmall = input.length < optStart - 1; + if (tooBig || tooSmall) { + payload.issues.push({ + ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length }, + input, + inst, + origin: "array" + }); + return payload; + } + } + let i2 = -1; + for (const item of items) { + i2++; + if (i2 >= input.length) { + if (i2 >= optStart) + continue; + } + const result = item._zod.run({ + value: input[i2], + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleTupleResult(result2, payload, i2))); + } else { + handleTupleResult(result, payload, i2); + } + } + if (def.rest) { + const rest = input.slice(items.length); + for (const el of rest) { + i2++; + const result = def.rest._zod.run({ + value: el, + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleTupleResult(result2, payload, i2))); + } else { + handleTupleResult(result, payload, i2); + } + } + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; + }); + __name(handleTupleResult, "handleTupleResult"); + $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isPlainObject2(input)) { + payload.issues.push({ + expected: "record", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + const values = def.keyType._zod.values; + if (values) { + payload.value = {}; + const recordKeys = /* @__PURE__ */ new Set(); + for (const key of values) { + if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") { + recordKeys.add(typeof key === "number" ? key.toString() : key); + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues(key, result2.issues)); + } + payload.value[key] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues(key, result.issues)); + } + payload.value[key] = result.value; + } + } + } + let unrecognized; + for (const key in input) { + if (!recordKeys.has(key)) { + unrecognized = unrecognized ?? []; + unrecognized.push(key); + } + } + if (unrecognized && unrecognized.length > 0) { + payload.issues.push({ + code: "unrecognized_keys", + input, + inst, + keys: unrecognized + }); + } + } else { + payload.value = {}; + for (const key of Reflect.ownKeys(input)) { + if (key === "__proto__") + continue; + let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + if (keyResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + const checkNumericKey = typeof key === "string" && number.test(key) && keyResult.issues.length; + if (checkNumericKey) { + const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx); + if (retryResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + if (retryResult.issues.length === 0) { + keyResult = retryResult; + } + } + if (keyResult.issues.length) { + if (def.mode === "loose") { + payload.value[key] = input[key]; + } else { + payload.issues.push({ + code: "invalid_key", + origin: "record", + issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config2())), + input: key, + path: [key], + inst + }); + } + continue; + } + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues(key, result2.issues)); + } + payload.value[keyResult.value] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues(key, result.issues)); + } + payload.value[keyResult.value] = result.value; + } + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; + }); + $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Map)) { + payload.issues.push({ + expected: "map", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Map(); + for (const [key, value] of input) { + const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx); + if (keyResult instanceof Promise || valueResult instanceof Promise) { + proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => { + handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx); + })); + } else { + handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx); + } + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; + }); + __name(handleMapResult, "handleMapResult"); + $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Set)) { + payload.issues.push({ + input, + inst, + expected: "set", + code: "invalid_type" + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Set(); + for (const item of input) { + const result = def.valueType._zod.run({ value: item, issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleSetResult(result2, payload))); + } else + handleSetResult(result, payload); + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; + }); + __name(handleSetResult, "handleSetResult"); + $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => { + $ZodType.init(inst, def); + const values = getEnumValues(def.entries); + const valuesSet = new Set(values); + inst._zod.values = valuesSet; + inst._zod.pattern = new RegExp(`^(${values.filter((k2) => propertyKeyTypes.has(typeof k2)).map((o2) => typeof o2 === "string" ? escapeRegex(o2) : o2.toString()).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (valuesSet.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values, + input, + inst + }); + return payload; + }; + }); + $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => { + $ZodType.init(inst, def); + if (def.values.length === 0) { + throw new Error("Cannot create literal schema with no valid values"); + } + const values = new Set(def.values); + inst._zod.values = values; + inst._zod.pattern = new RegExp(`^(${def.values.map((o2) => typeof o2 === "string" ? escapeRegex(o2) : o2 ? escapeRegex(o2.toString()) : String(o2)).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (values.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values: def.values, + input, + inst + }); + return payload; + }; + }); + $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input instanceof File) + return payload; + payload.issues.push({ + expected: "file", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } + const _out = def.transform(payload.value, payload); + if (ctx.async) { + const output = _out instanceof Promise ? _out : Promise.resolve(_out); + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + if (_out instanceof Promise) { + throw new $ZodAsyncError(); + } + payload.value = _out; + return payload; + }; + }); + __name(handleOptionalResult, "handleOptionalResult"); + $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + defineLazy(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0; + }); + defineLazy(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (def.innerType._zod.optin === "optional") { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) + return result.then((r2) => handleOptionalResult(r2, payload.value)); + return handleOptionalResult(result, payload.value); + } + if (payload.value === void 0) { + return payload; + } + return def.innerType._zod.run(payload, ctx); + }; + }); + $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (inst, def) => { + $ZodOptional.init(inst, def); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern); + inst._zod.parse = (payload, ctx) => { + return def.innerType._zod.run(payload, ctx); + }; + }); + $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0; + }); + defineLazy(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (payload.value === null) + return payload; + return def.innerType._zod.run(payload, ctx); + }; + }); + $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + return payload; + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleDefaultResult(result2, def)); + } + return handleDefaultResult(result, def); + }; + }); + __name(handleDefaultResult, "handleDefaultResult"); + $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return def.innerType._zod.run(payload, ctx); + }; + }); + $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => { + const v3 = def.innerType._zod.values; + return v3 ? new Set([...v3].filter((x2) => x2 !== void 0)) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleNonOptionalResult(result2, inst)); + } + return handleNonOptionalResult(result, inst); + }; + }); + __name(handleNonOptionalResult, "handleNonOptionalResult"); + $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError("ZodSuccess"); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.issues.length === 0; + return payload; + }); + } + payload.value = result.issues.length === 0; + return payload; + }; + }); + $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.value; + if (result2.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config2())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }); + } + payload.value = result.value; + if (result.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config2())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }; + }); + $ZodNaN = /* @__PURE__ */ $constructor("$ZodNaN", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + expected: "nan", + code: "invalid_type" + }); + return payload; + } + return payload; + }; + }); + $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => def.in._zod.values); + defineLazy(inst._zod, "optin", () => def.in._zod.optin); + defineLazy(inst._zod, "optout", () => def.out._zod.optout); + defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handlePipeResult(right2, def.in, ctx)); + } + return handlePipeResult(right, def.in, ctx); + } + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handlePipeResult(left2, def.out, ctx)); + } + return handlePipeResult(left, def.out, ctx); + }; + }); + __name(handlePipeResult, "handlePipeResult"); + $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => def.in._zod.values); + defineLazy(inst._zod, "optin", () => def.in._zod.optin); + defineLazy(inst._zod, "optout", () => def.out._zod.optout); + defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handleCodecAResult(left2, def, ctx)); + } + return handleCodecAResult(left, def, ctx); + } else { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handleCodecAResult(right2, def, ctx)); + } + return handleCodecAResult(right, def, ctx); + } + }; + }); + __name(handleCodecAResult, "handleCodecAResult"); + __name(handleCodecTxResult, "handleCodecTxResult"); + $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin); + defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then(handleReadonlyResult); + } + return handleReadonlyResult(result); + }; + }); + __name(handleReadonlyResult, "handleReadonlyResult"); + $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (inst, def) => { + $ZodType.init(inst, def); + const regexParts = []; + for (const part of def.parts) { + if (typeof part === "object" && part !== null) { + if (!part._zod.pattern) { + throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`); + } + const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern; + if (!source) + throw new Error(`Invalid template literal part: ${part._zod.traits}`); + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + regexParts.push(source.slice(start, end)); + } else if (part === null || primitiveTypes.has(typeof part)) { + regexParts.push(escapeRegex(`${part}`)); + } else { + throw new Error(`Invalid template literal part: ${part}`); + } + } + inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "string") { + payload.issues.push({ + input: payload.value, + inst, + expected: "string", + code: "invalid_type" + }); + return payload; + } + inst._zod.pattern.lastIndex = 0; + if (!inst._zod.pattern.test(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + code: "invalid_format", + format: def.format ?? "template_literal", + pattern: inst._zod.pattern.source + }); + return payload; + } + return payload; + }; + }); + $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => { + $ZodType.init(inst, def); + inst._def = def; + inst._zod.def = def; + inst.implement = (func) => { + if (typeof func !== "function") { + throw new Error("implement() must be called with a function"); + } + return function(...args) { + const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args; + const result = Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return parse(inst._def.output, result); + } + return result; + }; + }; + inst.implementAsync = (func) => { + if (typeof func !== "function") { + throw new Error("implementAsync() must be called with a function"); + } + return async function(...args) { + const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args; + const result = await Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return await parseAsync(inst._def.output, result); + } + return result; + }; + }; + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "function") { + payload.issues.push({ + code: "invalid_type", + expected: "function", + input: payload.value, + inst + }); + return payload; + } + const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise"; + if (hasPromiseOutput) { + payload.value = inst.implementAsync(payload.value); + } else { + payload.value = inst.implement(payload.value); + } + return payload; + }; + inst.input = (...args) => { + const F2 = inst.constructor; + if (Array.isArray(args[0])) { + return new F2({ + type: "function", + input: new $ZodTuple({ + type: "tuple", + items: args[0], + rest: args[1] + }), + output: inst._def.output + }); + } + return new F2({ + type: "function", + input: args[0], + output: inst._def.output + }); + }; + inst.output = (output) => { + const F2 = inst.constructor; + return new F2({ + type: "function", + input: inst._def.input, + output + }); + }; + return inst; + }); + $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx)); + }; + }); + $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "innerType", () => def.getter()); + defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern); + defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues); + defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0); + defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0); + inst._zod.parse = (payload, ctx) => { + const inner = inst._zod.innerType; + return inner._zod.run(payload, ctx); + }; + }); + $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => { + $ZodCheck.init(inst, def); + $ZodType.init(inst, def); + inst._zod.parse = (payload, _) => { + return payload; + }; + inst._zod.check = (payload) => { + const input = payload.value; + const r2 = def.fn(input); + if (r2 instanceof Promise) { + return r2.then((r3) => handleRefineResult(r3, payload, input, inst)); + } + handleRefineResult(r2, payload, input, inst); + return; + }; + }); + __name(handleRefineResult, "handleRefineResult"); + } +}); + +// ../../node_modules/zod/v4/locales/ar.js +function ar_default() { + return { + localeError: error3() + }; +} +var error3; +var init_ar = __esm({ + "../../node_modules/zod/v4/locales/ar.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error3 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + file: { unit: "\u0628\u0627\u064A\u062A", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + array: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + set: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0645\u062F\u062E\u0644", + email: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A", + url: "\u0631\u0627\u0628\u0637", + emoji: "\u0625\u064A\u0645\u0648\u062C\u064A", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + date: "\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + time: "\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + duration: "\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + ipv4: "\u0639\u0646\u0648\u0627\u0646 IPv4", + ipv6: "\u0639\u0646\u0648\u0627\u0646 IPv6", + cidrv4: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4", + cidrv6: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6", + base64: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded", + base64url: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded", + json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON", + e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164", + jwt: "JWT", + template_literal: "\u0645\u062F\u062E\u0644" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${issue2.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; + } + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`; + return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue2.prefix}"`; + if (_issue.format === "ends_with") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`; + } + case "not_multiple_of": + return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue2.divisor}`; + case "unrecognized_keys": + return `\u0645\u0639\u0631\u0641${issue2.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue2.keys.length > 1 ? "\u0629" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; + case "invalid_key": + return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; + case "invalid_union": + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; + case "invalid_element": + return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; + default: + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; + } + }; + }, "error"); + __name(ar_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/az.js +function az_default() { + return { + localeError: error4() + }; +} +var error4; +var init_az = __esm({ + "../../node_modules/zod/v4/locales/az.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error4 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "element", verb: "olmal\u0131d\u0131r" }, + set: { unit: "element", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${issue2.expected}, daxil olan ${received}`; + } + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${expected}, daxil olan ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive(issue2.values[0])}`; + return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`; + if (_issue.format === "ends_with") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.suffix}" il\u0259 bitm\u0259lidir`; + if (_issue.format === "includes") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.includes}" daxil olmal\u0131d\u0131r`; + if (_issue.format === "regex") + return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`; + return `Yanl\u0131\u015F ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Yanl\u0131\u015F \u0259d\u0259d: ${issue2.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; + case "unrecognized_keys": + return `Tan\u0131nmayan a\xE7ar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; + case "invalid_union": + return "Yanl\u0131\u015F d\u0259y\u0259r"; + case "invalid_element": + return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; + default: + return `Yanl\u0131\u015F d\u0259y\u0259r`; + } + }; + }, "error"); + __name(az_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/be.js +function getBelarusianPlural(count4, one, few, many) { + const absCount = Math.abs(count4); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; + } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; +} +function be_default() { + return { + localeError: error5() + }; +} +var error5; +var init_be = __esm({ + "../../node_modules/zod/v4/locales/be.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + __name(getBelarusianPlural, "getBelarusianPlural"); + error5 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0456\u043C\u0432\u0430\u043B", + few: "\u0441\u0456\u043C\u0432\u0430\u043B\u044B", + many: "\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u044B", + many: "\u0431\u0430\u0439\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0443\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0430\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0447\u0430\u0441", + duration: "ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0430\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0430\u0441", + cidrv4: "IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + base64: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64", + base64url: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url", + json_string: "JSON \u0440\u0430\u0434\u043E\u043A", + e164: "\u043D\u0443\u043C\u0430\u0440 E.164", + jwt: "JWT", + template_literal: "\u0443\u0432\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u043B\u0456\u043A", + array: "\u043C\u0430\u0441\u0456\u045E" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${issue2.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; + } + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const maxValue = Number(issue2.maximum); + const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.maximum.toString()} ${unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const minValue = Number(issue2.minimum); + const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.minimum.toString()} ${unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue2.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"; + case "invalid_element": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue2.origin}`; + default: + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`; + } + }; + }, "error"); + __name(be_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/bg.js +function bg_default() { + return { + localeError: error6() + }; +} +var error6; +var init_bg = __esm({ + "../../node_modules/zod/v4/locales/bg.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error6 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0432\u0445\u043E\u0434", + email: "\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u0435\u043C\u043E\u0434\u0436\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + base64url: "base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + json_string: "JSON \u043D\u0438\u0437", + e164: "E.164 \u043D\u043E\u043C\u0435\u0440", + jwt: "JWT", + template_literal: "\u0432\u0445\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0438\u0432" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; + } + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`; + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`; + let invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D"; + if (_issue.format === "emoji") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "datetime") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "date") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + if (_issue.format === "time") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "duration") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue2.keys.length > 1 ? "\u0438" : ""} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u043E\u0432\u0435" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"; + case "invalid_element": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue2.origin}`; + default: + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`; + } + }; + }, "error"); + __name(bg_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ca.js +function ca_default() { + return { + localeError: error7() + }; +} +var error7; +var init_ca = __esm({ + "../../node_modules/zod/v4/locales/ca.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error7 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "car\xE0cters", verb: "contenir" }, + file: { unit: "bytes", verb: "contenir" }, + array: { unit: "elements", verb: "contenir" }, + set: { unit: "elements", verb: "contenir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "entrada", + email: "adre\xE7a electr\xF2nica", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "durada ISO", + ipv4: "adre\xE7a IPv4", + ipv6: "adre\xE7a IPv6", + cidrv4: "rang IPv4", + cidrv6: "rang IPv6", + base64: "cadena codificada en base64", + base64url: "cadena codificada en base64url", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Tipus inv\xE0lid: s'esperava instanceof ${issue2.expected}, s'ha rebut ${received}`; + } + return `Tipus inv\xE0lid: s'esperava ${expected}, s'ha rebut ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive(issue2.values[0])}`; + return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues(issue2.values, " o ")}`; + case "too_big": { + const adj = issue2.inclusive ? "com a m\xE0xim" : "menys de"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} contingu\xE9s ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} fos ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "com a m\xEDnim" : "m\xE9s de"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Massa petit: s'esperava que ${issue2.origin} contingu\xE9s ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Massa petit: s'esperava que ${issue2.origin} fos ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Format inv\xE0lid: ha d'acabar amb "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Format inv\xE0lid: ha d'incloure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${_issue.pattern}`; + return `Format inv\xE0lid per a ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Clau${issue2.keys.length > 1 ? "s" : ""} no reconeguda${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Clau inv\xE0lida a ${issue2.origin}`; + case "invalid_union": + return "Entrada inv\xE0lida"; + case "invalid_element": + return `Element inv\xE0lid a ${issue2.origin}`; + default: + return `Entrada inv\xE0lida`; + } + }; + }, "error"); + __name(ca_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/cs.js +function cs_default() { + return { + localeError: error8() + }; +} +var error8; +var init_cs = __esm({ + "../../node_modules/zod/v4/locales/cs.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error8 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "znak\u016F", verb: "m\xEDt" }, + file: { unit: "bajt\u016F", verb: "m\xEDt" }, + array: { unit: "prvk\u016F", verb: "m\xEDt" }, + set: { unit: "prvk\u016F", verb: "m\xEDt" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "regul\xE1rn\xED v\xFDraz", + email: "e-mailov\xE1 adresa", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "datum a \u010Das ve form\xE1tu ISO", + date: "datum ve form\xE1tu ISO", + time: "\u010Das ve form\xE1tu ISO", + duration: "doba trv\xE1n\xED ISO", + ipv4: "IPv4 adresa", + ipv6: "IPv6 adresa", + cidrv4: "rozsah IPv4", + cidrv6: "rozsah IPv6", + base64: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64", + base64url: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url", + json_string: "\u0159et\u011Bzec ve form\xE1tu JSON", + e164: "\u010D\xEDslo E.164", + jwt: "JWT", + template_literal: "vstup" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u010D\xEDslo", + string: "\u0159et\u011Bzec", + function: "funkce", + array: "pole" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${issue2.expected}, obdr\u017Eeno ${received}`; + } + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${expected}, obdr\u017Eeno ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive(issue2.values[0])}`; + return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${_issue.pattern}`; + return `Neplatn\xFD form\xE1t ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue2.divisor}`; + case "unrecognized_keys": + return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Neplatn\xFD kl\xED\u010D v ${issue2.origin}`; + case "invalid_union": + return "Neplatn\xFD vstup"; + case "invalid_element": + return `Neplatn\xE1 hodnota v ${issue2.origin}`; + default: + return `Neplatn\xFD vstup`; + } + }; + }, "error"); + __name(cs_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/da.js +function da_default() { + return { + localeError: error9() + }; +} +var error9; +var init_da = __esm({ + "../../node_modules/zod/v4/locales/da.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error9 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "tegn", verb: "havde" }, + file: { unit: "bytes", verb: "havde" }, + array: { unit: "elementer", verb: "indeholdt" }, + set: { unit: "elementer", verb: "indeholdt" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "e-mailadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkesl\xE6t", + date: "ISO-dato", + time: "ISO-klokkesl\xE6t", + duration: "ISO-varighed", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodet streng", + base64url: "base64url-kodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + string: "streng", + number: "tal", + boolean: "boolean", + array: "liste", + object: "objekt", + set: "s\xE6t", + file: "fil" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ugyldigt input: forventede instanceof ${issue2.expected}, fik ${received}`; + } + return `Ugyldigt input: forventede ${expected}, fik ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ugyldig v\xE6rdi: forventede ${stringifyPrimitive(issue2.values[0])}`; + return `Ugyldigt valg: forventede en af f\xF8lgende ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + if (sizing) + return `For stor: forventede ${origin2 ?? "value"} ${sizing.verb} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor: forventede ${origin2 ?? "value"} havde ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + if (sizing) { + return `For lille: forventede ${origin2} ${sizing.verb} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `For lille: forventede ${origin2} havde ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ugyldig streng: skal starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: skal ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: skal indeholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: skal matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ugyldigt tal: skal v\xE6re deleligt med ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ukendte n\xF8gler" : "Ukendt n\xF8gle"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8gle i ${issue2.origin}`; + case "invalid_union": + return "Ugyldigt input: matcher ingen af de tilladte typer"; + case "invalid_element": + return `Ugyldig v\xE6rdi i ${issue2.origin}`; + default: + return `Ugyldigt input`; + } + }; + }, "error"); + __name(da_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/de.js +function de_default() { + return { + localeError: error10() + }; +} +var error10; +var init_de = __esm({ + "../../node_modules/zod/v4/locales/de.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error10 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "Zeichen", verb: "zu haben" }, + file: { unit: "Bytes", verb: "zu haben" }, + array: { unit: "Elemente", verb: "zu haben" }, + set: { unit: "Elemente", verb: "zu haben" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "Eingabe", + email: "E-Mail-Adresse", + url: "URL", + emoji: "Emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-Datum und -Uhrzeit", + date: "ISO-Datum", + time: "ISO-Uhrzeit", + duration: "ISO-Dauer", + ipv4: "IPv4-Adresse", + ipv6: "IPv6-Adresse", + cidrv4: "IPv4-Bereich", + cidrv6: "IPv6-Bereich", + base64: "Base64-codierter String", + base64url: "Base64-URL-codierter String", + json_string: "JSON-String", + e164: "E.164-Nummer", + jwt: "JWT", + template_literal: "Eingabe" + }; + const TypeDictionary = { + nan: "NaN", + number: "Zahl", + array: "Array" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ung\xFCltige Eingabe: erwartet instanceof ${issue2.expected}, erhalten ${received}`; + } + return `Ung\xFCltige Eingabe: erwartet ${expected}, erhalten ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive(issue2.values[0])}`; + return `Ung\xFCltige Option: erwartet eine von ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; + return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ist`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} hat`; + } + return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ist`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`; + if (_issue.format === "ends_with") + return `Ung\xFCltiger String: muss mit "${_issue.suffix}" enden`; + if (_issue.format === "includes") + return `Ung\xFCltiger String: muss "${_issue.includes}" enthalten`; + if (_issue.format === "regex") + return `Ung\xFCltiger String: muss dem Muster ${_issue.pattern} entsprechen`; + return `Ung\xFCltig: ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue2.divisor} sein`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ung\xFCltiger Schl\xFCssel in ${issue2.origin}`; + case "invalid_union": + return "Ung\xFCltige Eingabe"; + case "invalid_element": + return `Ung\xFCltiger Wert in ${issue2.origin}`; + default: + return `Ung\xFCltige Eingabe`; + } + }; + }, "error"); + __name(de_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/en.js +function en_default() { + return { + localeError: error11() + }; +} +var error11; +var init_en = __esm({ + "../../node_modules/zod/v4/locales/en.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error11 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "characters", verb: "to have" }, + file: { unit: "bytes", verb: "to have" }, + array: { unit: "items", verb: "to have" }, + set: { unit: "items", verb: "to have" }, + map: { unit: "entries", verb: "to have" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + mac: "MAC address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + // Compatibility: "nan" -> "NaN" for display + nan: "NaN" + // All other type names omitted - they fall back to raw values via ?? operator + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + return `Invalid input: expected ${expected}, received ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; + return `Invalid option: expected one of ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Too big: expected ${issue2.origin ?? "value"} to have ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Too big: expected ${issue2.origin ?? "value"} to be ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Too small: expected ${issue2.origin} to have ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Too small: expected ${issue2.origin} to be ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Invalid string: must start with "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Invalid string: must end with "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Invalid string: must include "${_issue.includes}"`; + if (_issue.format === "regex") + return `Invalid string: must match pattern ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Invalid number: must be a multiple of ${issue2.divisor}`; + case "unrecognized_keys": + return `Unrecognized key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Invalid key in ${issue2.origin}`; + case "invalid_union": + return "Invalid input"; + case "invalid_element": + return `Invalid value in ${issue2.origin}`; + default: + return `Invalid input`; + } + }; + }, "error"); + __name(en_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/eo.js +function eo_default() { + return { + localeError: error12() + }; +} +var error12; +var init_eo = __esm({ + "../../node_modules/zod/v4/locales/eo.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error12 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "karaktrojn", verb: "havi" }, + file: { unit: "bajtojn", verb: "havi" }, + array: { unit: "elementojn", verb: "havi" }, + set: { unit: "elementojn", verb: "havi" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "enigo", + email: "retadreso", + url: "URL", + emoji: "emo\u011Dio", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datotempo", + date: "ISO-dato", + time: "ISO-tempo", + duration: "ISO-da\u016Dro", + ipv4: "IPv4-adreso", + ipv6: "IPv6-adreso", + cidrv4: "IPv4-rango", + cidrv6: "IPv6-rango", + base64: "64-ume kodita karaktraro", + base64url: "URL-64-ume kodita karaktraro", + json_string: "JSON-karaktraro", + e164: "E.164-nombro", + jwt: "JWT", + template_literal: "enigo" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombro", + array: "tabelo", + null: "senvalora" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Nevalida enigo: atendi\u011Dis instanceof ${issue2.expected}, ricevi\u011Dis ${received}`; + } + return `Nevalida enigo: atendi\u011Dis ${expected}, ricevi\u011Dis ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive(issue2.values[0])}`; + return `Nevalida opcio: atendi\u011Dis unu el ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementojn"}`; + return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} havu ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} estu ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nevalida karaktraro: devas fini\u011Di per "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`; + return `Nevalida ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Nevalida nombro: devas esti oblo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Nekonata${issue2.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue2.keys.length > 1 ? "j" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Nevalida \u015Dlosilo en ${issue2.origin}`; + case "invalid_union": + return "Nevalida enigo"; + case "invalid_element": + return `Nevalida valoro en ${issue2.origin}`; + default: + return `Nevalida enigo`; + } + }; + }, "error"); + __name(eo_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/es.js +function es_default() { + return { + localeError: error13() + }; +} +var error13; +var init_es = __esm({ + "../../node_modules/zod/v4/locales/es.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error13 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caracteres", verb: "tener" }, + file: { unit: "bytes", verb: "tener" }, + array: { unit: "elementos", verb: "tener" }, + set: { unit: "elementos", verb: "tener" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "entrada", + email: "direcci\xF3n de correo electr\xF3nico", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "fecha y hora ISO", + date: "fecha ISO", + time: "hora ISO", + duration: "duraci\xF3n ISO", + ipv4: "direcci\xF3n IPv4", + ipv6: "direcci\xF3n IPv6", + cidrv4: "rango IPv4", + cidrv6: "rango IPv6", + base64: "cadena codificada en base64", + base64url: "URL codificada en base64", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN", + string: "texto", + number: "n\xFAmero", + boolean: "booleano", + array: "arreglo", + object: "objeto", + set: "conjunto", + file: "archivo", + date: "fecha", + bigint: "n\xFAmero grande", + symbol: "s\xEDmbolo", + undefined: "indefinido", + null: "nulo", + function: "funci\xF3n", + map: "mapa", + record: "registro", + tuple: "tupla", + enum: "enumeraci\xF3n", + union: "uni\xF3n", + literal: "literal", + promise: "promesa", + void: "vac\xEDo", + never: "nunca", + unknown: "desconocido", + any: "cualquiera" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Entrada inv\xE1lida: se esperaba instanceof ${issue2.expected}, recibido ${received}`; + } + return `Entrada inv\xE1lida: se esperaba ${expected}, recibido ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive(issue2.values[0])}`; + return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + if (sizing) + return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} tuviera ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} fuera ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + if (sizing) { + return `Demasiado peque\xF1o: se esperaba que ${origin2} tuviera ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Demasiado peque\xF1o: se esperaba que ${origin2} fuera ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cadena inv\xE1lida: debe terminar en "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cadena inv\xE1lida: debe incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${_issue.pattern}`; + return `Inv\xE1lido ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Llave${issue2.keys.length > 1 ? "s" : ""} desconocida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Llave inv\xE1lida en ${TypeDictionary[issue2.origin] ?? issue2.origin}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido en ${TypeDictionary[issue2.origin] ?? issue2.origin}`; + default: + return `Entrada inv\xE1lida`; + } + }; + }, "error"); + __name(es_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/fa.js +function fa_default() { + return { + localeError: error14() + }; +} +var error14; +var init_fa = __esm({ + "../../node_modules/zod/v4/locales/fa.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error14 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + array: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + set: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0648\u0631\u0648\u062F\u06CC", + email: "\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644", + url: "URL", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + date: "\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648", + time: "\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + duration: "\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + ipv4: "IPv4 \u0622\u062F\u0631\u0633", + ipv6: "IPv6 \u0622\u062F\u0631\u0633", + cidrv4: "IPv4 \u062F\u0627\u0645\u0646\u0647", + cidrv6: "IPv6 \u062F\u0627\u0645\u0646\u0647", + base64: "base64-encoded \u0631\u0634\u062A\u0647", + base64url: "base64url-encoded \u0631\u0634\u062A\u0647", + json_string: "JSON \u0631\u0634\u062A\u0647", + e164: "E.164 \u0639\u062F\u062F", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u06CC" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0639\u062F\u062F", + array: "\u0622\u0631\u0627\u06CC\u0647" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${issue2.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + } + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + } + case "invalid_value": + if (issue2.values.length === 1) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive(issue2.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`; + } + return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues(issue2.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0628\u0627\u0634\u062F`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0628\u0627\u0634\u062F`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`; + } + if (_issue.format === "ends_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`; + } + if (_issue.format === "includes") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${_issue.includes}" \u0628\u0627\u0634\u062F`; + } + if (_issue.format === "regex") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`; + } + return `${FormatDictionary[_issue.format] ?? issue2.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + } + case "not_multiple_of": + return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue2.divisor} \u0628\u0627\u0634\u062F`; + case "unrecognized_keys": + return `\u06A9\u0644\u06CC\u062F${issue2.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue2.origin}`; + case "invalid_union": + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + case "invalid_element": + return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue2.origin}`; + default: + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + } + }; + }, "error"); + __name(fa_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/fi.js +function fi_default() { + return { + localeError: error15() + }; +} +var error15; +var init_fi = __esm({ + "../../node_modules/zod/v4/locales/fi.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error15 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "merkki\xE4", subject: "merkkijonon" }, + file: { unit: "tavua", subject: "tiedoston" }, + array: { unit: "alkiota", subject: "listan" }, + set: { unit: "alkiota", subject: "joukon" }, + number: { unit: "", subject: "luvun" }, + bigint: { unit: "", subject: "suuren kokonaisluvun" }, + int: { unit: "", subject: "kokonaisluvun" }, + date: { unit: "", subject: "p\xE4iv\xE4m\xE4\xE4r\xE4n" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "s\xE4\xE4nn\xF6llinen lauseke", + email: "s\xE4hk\xF6postiosoite", + url: "URL-osoite", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-aikaleima", + date: "ISO-p\xE4iv\xE4m\xE4\xE4r\xE4", + time: "ISO-aika", + duration: "ISO-kesto", + ipv4: "IPv4-osoite", + ipv6: "IPv6-osoite", + cidrv4: "IPv4-alue", + cidrv6: "IPv6-alue", + base64: "base64-koodattu merkkijono", + base64url: "base64url-koodattu merkkijono", + json_string: "JSON-merkkijono", + e164: "E.164-luku", + jwt: "JWT", + template_literal: "templaattimerkkijono" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Virheellinen tyyppi: odotettiin instanceof ${issue2.expected}, oli ${received}`; + } + return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive(issue2.values[0])}`; + return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.maximum.toString()} ${sizing.unit}`.trim(); + } + return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.minimum.toString()} ${sizing.unit}`.trim(); + } + return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Virheellinen sy\xF6te: t\xE4ytyy loppua "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${_issue.includes}"`; + if (_issue.format === "regex") { + return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`; + } + return `Virheellinen ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Virheellinen luku: t\xE4ytyy olla luvun ${issue2.divisor} monikerta`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return "Virheellinen avain tietueessa"; + case "invalid_union": + return "Virheellinen unioni"; + case "invalid_element": + return "Virheellinen arvo joukossa"; + default: + return `Virheellinen sy\xF6te`; + } + }; + }, "error"); + __name(fi_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/fr.js +function fr_default() { + return { + localeError: error16() + }; +} +var error16; +var init_fr = __esm({ + "../../node_modules/zod/v4/locales/fr.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error16 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "entr\xE9e", + email: "adresse e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date et heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombre", + array: "tableau" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Entr\xE9e invalide : instanceof ${issue2.expected} attendu, ${received} re\xE7u`; + } + return `Entr\xE9e invalide : ${expected} attendu, ${received} re\xE7u`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Entr\xE9e invalide : ${stringifyPrimitive(issue2.values[0])} attendu`; + return `Option invalide : une valeur parmi ${joinValues(issue2.values, "|")} attendue`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; + return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue2.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue2.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; + }, "error"); + __name(fr_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/fr-CA.js +function fr_CA_default() { + return { + localeError: error17() + }; +} +var error17; +var init_fr_CA = __esm({ + "../../node_modules/zod/v4/locales/fr-CA.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error17 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "entr\xE9e", + email: "adresse courriel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date-heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Entr\xE9e invalide : attendu instanceof ${issue2.expected}, re\xE7u ${received}`; + } + return `Entr\xE9e invalide : attendu ${expected}, re\xE7u ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Entr\xE9e invalide : attendu ${stringifyPrimitive(issue2.values[0])}`; + return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "\u2264" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} ait ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} soit ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u2265" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Trop petit : attendu que ${issue2.origin} ait ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : attendu que ${issue2.origin} soit ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue2.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue2.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; + }, "error"); + __name(fr_CA_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/he.js +function he_default() { + return { + localeError: error18() + }; +} +var error18; +var init_he = __esm({ + "../../node_modules/zod/v4/locales/he.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error18 = /* @__PURE__ */ __name(() => { + const TypeNames = { + string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" }, + number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" }, + boolean: { label: "\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9", gender: "m" }, + bigint: { label: "BigInt", gender: "m" }, + date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA", gender: "m" }, + array: { label: "\u05DE\u05E2\u05E8\u05DA", gender: "m" }, + object: { label: "\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8", gender: "m" }, + null: { label: "\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)", gender: "m" }, + undefined: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)", gender: "m" }, + symbol: { label: "\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)", gender: "m" }, + function: { label: "\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4", gender: "f" }, + map: { label: "\u05DE\u05E4\u05D4 (Map)", gender: "f" }, + set: { label: "\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)", gender: "f" }, + file: { label: "\u05E7\u05D5\u05D1\u05E5", gender: "m" }, + promise: { label: "Promise", gender: "m" }, + NaN: { label: "NaN", gender: "m" }, + unknown: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2", gender: "m" }, + value: { label: "\u05E2\u05E8\u05DA", gender: "m" } + }; + const Sizable = { + string: { unit: "\u05EA\u05D5\u05D5\u05D9\u05DD", shortLabel: "\u05E7\u05E6\u05E8", longLabel: "\u05D0\u05E8\u05D5\u05DA" }, + file: { unit: "\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" } + // no unit + }; + const typeEntry = /* @__PURE__ */ __name((t9) => t9 ? TypeNames[t9] : void 0, "typeEntry"); + const typeLabel = /* @__PURE__ */ __name((t9) => { + const e2 = typeEntry(t9); + if (e2) + return e2.label; + return t9 ?? TypeNames.unknown.label; + }, "typeLabel"); + const withDefinite = /* @__PURE__ */ __name((t9) => `\u05D4${typeLabel(t9)}`, "withDefinite"); + const verbFor = /* @__PURE__ */ __name((t9) => { + const e2 = typeEntry(t9); + const gender = e2?.gender ?? "m"; + return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"; + }, "verbFor"); + const getSizing = /* @__PURE__ */ __name((origin2) => { + if (!origin2) + return null; + return Sizable[origin2] ?? null; + }, "getSizing"); + const FormatDictionary = { + regex: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + email: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC", gender: "f" }, + url: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA", gender: "f" }, + emoji: { label: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9", gender: "m" }, + uuid: { label: "UUID", gender: "m" }, + nanoid: { label: "nanoid", gender: "m" }, + guid: { label: "GUID", gender: "m" }, + cuid: { label: "cuid", gender: "m" }, + cuid2: { label: "cuid2", gender: "m" }, + ulid: { label: "ULID", gender: "m" }, + xid: { label: "XID", gender: "m" }, + ksuid: { label: "KSUID", gender: "m" }, + datetime: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO", gender: "m" }, + date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA ISO", gender: "m" }, + time: { label: "\u05D6\u05DE\u05DF ISO", gender: "m" }, + duration: { label: "\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO", gender: "m" }, + ipv4: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv4", gender: "f" }, + ipv6: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv6", gender: "f" }, + cidrv4: { label: "\u05D8\u05D5\u05D5\u05D7 IPv4", gender: "m" }, + cidrv6: { label: "\u05D8\u05D5\u05D5\u05D7 IPv6", gender: "m" }, + base64: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64", gender: "f" }, + base64url: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA", gender: "f" }, + json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" }, + e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" }, + jwt: { label: "JWT", gender: "m" }, + ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + includes: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + lowercase: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + starts_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + uppercase: { label: "\u05E7\u05DC\u05D8", gender: "m" } + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expectedKey = issue2.expected; + const expected = TypeDictionary[expectedKey ?? ""] ?? typeLabel(expectedKey); + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue2.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; + } + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; + } + case "invalid_value": { + if (issue2.values.length === 1) { + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${stringifyPrimitive(issue2.values[0])}`; + } + const stringified = issue2.values.map((v3) => stringifyPrimitive(v3)); + if (issue2.values.length === 2) { + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`; + } + const lastValue = stringified[stringified.length - 1]; + const restValues = stringified.slice(0, -1).join(", "); + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`; + } + case "too_big": { + const sizing = getSizing(issue2.origin); + const subject = withDefinite(issue2.origin ?? "value"); + if (issue2.origin === "string") { + return `${sizing?.longLabel ?? "\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.maximum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA" : "\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim(); + } + if (issue2.origin === "number") { + const comparison = issue2.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue2.maximum}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; + } + if (issue2.origin === "array" || issue2.origin === "set") { + const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; + const comparison = issue2.inclusive ? `${issue2.maximum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA` : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue2.maximum} ${sizing?.unit ?? ""}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); + } + const adj = issue2.inclusive ? "<=" : "<"; + const be2 = verbFor(issue2.origin ?? "value"); + if (sizing?.unit) { + return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + } + return `${sizing?.longLabel ?? "\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const sizing = getSizing(issue2.origin); + const subject = withDefinite(issue2.origin ?? "value"); + if (issue2.origin === "string") { + return `${sizing?.shortLabel ?? "\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.minimum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8" : "\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim(); + } + if (issue2.origin === "number") { + const comparison = issue2.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue2.minimum}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; + } + if (issue2.origin === "array" || issue2.origin === "set") { + const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; + if (issue2.minimum === 1 && issue2.inclusive) { + const singularPhrase = issue2.origin === "set" ? "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3" : "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3"; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`; + } + const comparison = issue2.inclusive ? `${issue2.minimum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8` : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue2.minimum} ${sizing?.unit ?? ""}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); + } + const adj = issue2.inclusive ? ">=" : ">"; + const be2 = verbFor(issue2.origin ?? "value"); + if (sizing?.unit) { + return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `${sizing?.shortLabel ?? "\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`; + const nounEntry = FormatDictionary[_issue.format]; + const noun = nounEntry?.label ?? _issue.format; + const gender = nounEntry?.gender ?? "m"; + const adjective = gender === "f" ? "\u05EA\u05E7\u05D9\u05E0\u05D4" : "\u05EA\u05E7\u05D9\u05DF"; + return `${noun} \u05DC\u05D0 ${adjective}`; + } + case "not_multiple_of": + return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue2.divisor}`; + case "unrecognized_keys": + return `\u05DE\u05E4\u05EA\u05D7${issue2.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue2.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": { + return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`; + } + case "invalid_union": + return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"; + case "invalid_element": { + const place = withDefinite(issue2.origin ?? "array"); + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`; + } + default: + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; + } + }; + }, "error"); + __name(he_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/hu.js +function hu_default() { + return { + localeError: error19() + }; +} +var error19; +var init_hu = __esm({ + "../../node_modules/zod/v4/locales/hu.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error19 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "karakter", verb: "legyen" }, + file: { unit: "byte", verb: "legyen" }, + array: { unit: "elem", verb: "legyen" }, + set: { unit: "elem", verb: "legyen" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "bemenet", + email: "email c\xEDm", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO id\u0151b\xE9lyeg", + date: "ISO d\xE1tum", + time: "ISO id\u0151", + duration: "ISO id\u0151intervallum", + ipv4: "IPv4 c\xEDm", + ipv6: "IPv6 c\xEDm", + cidrv4: "IPv4 tartom\xE1ny", + cidrv6: "IPv6 tartom\xE1ny", + base64: "base64-k\xF3dolt string", + base64url: "base64url-k\xF3dolt string", + json_string: "JSON string", + e164: "E.164 sz\xE1m", + jwt: "JWT", + template_literal: "bemenet" + }; + const TypeDictionary = { + nan: "NaN", + number: "sz\xE1m", + array: "t\xF6mb" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`; + } + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`; + return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`; + return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`; + if (_issue.format === "ends_with") + return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`; + if (_issue.format === "includes") + return `\xC9rv\xE9nytelen string: "${_issue.includes}" \xE9rt\xE9ket kell tartalmaznia`; + if (_issue.format === "regex") + return `\xC9rv\xE9nytelen string: ${_issue.pattern} mint\xE1nak kell megfelelnie`; + return `\xC9rv\xE9nytelen ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\xC9rv\xE9nytelen sz\xE1m: ${issue2.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; + case "unrecognized_keys": + return `Ismeretlen kulcs${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\xC9rv\xE9nytelen kulcs ${issue2.origin}`; + case "invalid_union": + return "\xC9rv\xE9nytelen bemenet"; + case "invalid_element": + return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue2.origin}`; + default: + return `\xC9rv\xE9nytelen bemenet`; + } + }; + }, "error"); + __name(hu_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/hy.js +function getArmenianPlural(count4, one, many) { + return Math.abs(count4) === 1 ? one : many; +} +function withDefiniteArticle(word) { + if (!word) + return ""; + const vowels = ["\u0561", "\u0565", "\u0568", "\u056B", "\u0578", "\u0578\u0582", "\u0585"]; + const lastChar = word[word.length - 1]; + return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568"); +} +function hy_default() { + return { + localeError: error20() + }; +} +var error20; +var init_hy = __esm({ + "../../node_modules/zod/v4/locales/hy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + __name(getArmenianPlural, "getArmenianPlural"); + __name(withDefiniteArticle, "withDefiniteArticle"); + error20 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { + unit: { + one: "\u0576\u0577\u0561\u0576", + many: "\u0576\u0577\u0561\u0576\u0576\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + file: { + unit: { + one: "\u0562\u0561\u0575\u0569", + many: "\u0562\u0561\u0575\u0569\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + array: { + unit: { + one: "\u057F\u0561\u0580\u0580", + many: "\u057F\u0561\u0580\u0580\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + set: { + unit: { + one: "\u057F\u0561\u0580\u0580", + many: "\u057F\u0561\u0580\u0580\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0574\u0578\u0582\u057F\u0584", + email: "\u0567\u056C. \u0570\u0561\u057D\u0581\u0565", + url: "URL", + emoji: "\u0567\u0574\u0578\u057B\u056B", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574", + date: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E", + time: "ISO \u056A\u0561\u0574", + duration: "ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576", + ipv4: "IPv4 \u0570\u0561\u057D\u0581\u0565", + ipv6: "IPv6 \u0570\u0561\u057D\u0581\u0565", + cidrv4: "IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", + cidrv6: "IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", + base64: "base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", + base64url: "base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", + json_string: "JSON \u057F\u0578\u0572", + e164: "E.164 \u0570\u0561\u0574\u0561\u0580", + jwt: "JWT", + template_literal: "\u0574\u0578\u0582\u057F\u0584" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0569\u056B\u057E", + array: "\u0566\u0561\u0576\u0563\u057E\u0561\u056E" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${issue2.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; + } + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${stringifyPrimitive(issue2.values[1])}`; + return `\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const maxValue = Number(issue2.maximum); + const unit = getArmenianPlural(maxValue, sizing.unit.one, sizing.unit.many); + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue2.maximum.toString()} ${unit}`; + } + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const minValue = Number(issue2.minimum); + const unit = getArmenianPlural(minValue, sizing.unit.one, sizing.unit.many); + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue2.minimum.toString()} ${unit}`; + } + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin)} \u056C\u056B\u0576\u056B ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${_issue.prefix}"-\u0578\u057E`; + if (_issue.format === "ends_with") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${_issue.suffix}"-\u0578\u057E`; + if (_issue.format === "includes") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${_issue.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`; + return `\u054D\u056D\u0561\u056C ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${issue2.divisor}-\u056B`; + case "unrecognized_keys": + return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${issue2.keys.length > 1 ? "\u0576\u0565\u0580" : ""}. ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${withDefiniteArticle(issue2.origin)}-\u0578\u0582\u0574`; + case "invalid_union": + return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"; + case "invalid_element": + return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${withDefiniteArticle(issue2.origin)}-\u0578\u0582\u0574`; + default: + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574`; + } + }; + }, "error"); + __name(hy_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/id.js +function id_default() { + return { + localeError: error21() + }; +} +var error21; +var init_id = __esm({ + "../../node_modules/zod/v4/locales/id.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error21 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "karakter", verb: "memiliki" }, + file: { unit: "byte", verb: "memiliki" }, + array: { unit: "item", verb: "memiliki" }, + set: { unit: "item", verb: "memiliki" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "alamat email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tanggal dan waktu format ISO", + date: "tanggal format ISO", + time: "jam format ISO", + duration: "durasi format ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "rentang alamat IPv4", + cidrv6: "rentang alamat IPv6", + base64: "string dengan enkode base64", + base64url: "string dengan enkode base64url", + json_string: "string JSON", + e164: "angka E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Input tidak valid: diharapkan instanceof ${issue2.expected}, diterima ${received}`; + } + return `Input tidak valid: diharapkan ${expected}, diterima ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Input tidak valid: diharapkan ${stringifyPrimitive(issue2.values[0])}`; + return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} memiliki ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} menjadi ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Terlalu kecil: diharapkan ${issue2.origin} memiliki ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: diharapkan ${issue2.origin} menjadi ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak valid: harus menyertakan "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak valid: harus sesuai pola ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} tidak valid`; + } + case "not_multiple_of": + return `Angka tidak valid: harus kelipatan dari ${issue2.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak valid di ${issue2.origin}`; + case "invalid_union": + return "Input tidak valid"; + case "invalid_element": + return `Nilai tidak valid di ${issue2.origin}`; + default: + return `Input tidak valid`; + } + }; + }, "error"); + __name(id_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/is.js +function is_default() { + return { + localeError: error22() + }; +} +var error22; +var init_is = __esm({ + "../../node_modules/zod/v4/locales/is.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error22 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "stafi", verb: "a\xF0 hafa" }, + file: { unit: "b\xE6ti", verb: "a\xF0 hafa" }, + array: { unit: "hluti", verb: "a\xF0 hafa" }, + set: { unit: "hluti", verb: "a\xF0 hafa" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "gildi", + email: "netfang", + url: "vefsl\xF3\xF0", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dagsetning og t\xEDmi", + date: "ISO dagsetning", + time: "ISO t\xEDmi", + duration: "ISO t\xEDmalengd", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded strengur", + base64url: "base64url-encoded strengur", + json_string: "JSON strengur", + e164: "E.164 t\xF6lugildi", + jwt: "JWT", + template_literal: "gildi" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\xFAmer", + array: "fylki" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera instanceof ${issue2.expected}`; + } + return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera ${expected}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Rangt gildi: gert r\xE1\xF0 fyrir ${stringifyPrimitive(issue2.values[0])}`; + return `\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin ?? "gildi"} hafi ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "hluti"}`; + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin ?? "gildi"} s\xE9 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin} hafi ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin} s\xE9 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${_issue.includes}"`; + if (_issue.format === "regex") + return `\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${_issue.pattern}`; + return `Rangt ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${issue2.divisor}`; + case "unrecognized_keys": + return `\xD3\xFEekkt ${issue2.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Rangur lykill \xED ${issue2.origin}`; + case "invalid_union": + return "Rangt gildi"; + case "invalid_element": + return `Rangt gildi \xED ${issue2.origin}`; + default: + return `Rangt gildi`; + } + }; + }, "error"); + __name(is_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/it.js +function it_default() { + return { + localeError: error23() + }; +} +var error23; +var init_it = __esm({ + "../../node_modules/zod/v4/locales/it.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error23 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caratteri", verb: "avere" }, + file: { unit: "byte", verb: "avere" }, + array: { unit: "elementi", verb: "avere" }, + set: { unit: "elementi", verb: "avere" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "indirizzo email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e ora ISO", + date: "data ISO", + time: "ora ISO", + duration: "durata ISO", + ipv4: "indirizzo IPv4", + ipv6: "indirizzo IPv6", + cidrv4: "intervallo IPv4", + cidrv6: "intervallo IPv6", + base64: "stringa codificata in base64", + base64url: "URL codificata in base64", + json_string: "stringa JSON", + e164: "numero E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "numero", + array: "vettore" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Input non valido: atteso instanceof ${issue2.expected}, ricevuto ${received}`; + } + return `Input non valido: atteso ${expected}, ricevuto ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Input non valido: atteso ${stringifyPrimitive(issue2.values[0])}`; + return `Opzione non valida: atteso uno tra ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Troppo grande: ${issue2.origin ?? "valore"} deve avere ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementi"}`; + return `Troppo grande: ${issue2.origin ?? "valore"} deve essere ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Troppo piccolo: ${issue2.origin} deve avere ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Troppo piccolo: ${issue2.origin} deve essere ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Stringa non valida: deve iniziare con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Stringa non valida: deve terminare con "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Stringa non valida: deve includere "${_issue.includes}"`; + if (_issue.format === "regex") + return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`; + case "unrecognized_keys": + return `Chiav${issue2.keys.length > 1 ? "i" : "e"} non riconosciut${issue2.keys.length > 1 ? "e" : "a"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Chiave non valida in ${issue2.origin}`; + case "invalid_union": + return "Input non valido"; + case "invalid_element": + return `Valore non valido in ${issue2.origin}`; + default: + return `Input non valido`; + } + }; + }, "error"); + __name(it_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ja.js +function ja_default() { + return { + localeError: error24() + }; +} +var error24; +var init_ja = __esm({ + "../../node_modules/zod/v4/locales/ja.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error24 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, + file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" }, + array: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" }, + set: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u5165\u529B\u5024", + email: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9", + url: "URL", + emoji: "\u7D75\u6587\u5B57", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u6642", + date: "ISO\u65E5\u4ED8", + time: "ISO\u6642\u523B", + duration: "ISO\u671F\u9593", + ipv4: "IPv4\u30A2\u30C9\u30EC\u30B9", + ipv6: "IPv6\u30A2\u30C9\u30EC\u30B9", + cidrv4: "IPv4\u7BC4\u56F2", + cidrv6: "IPv6\u7BC4\u56F2", + base64: "base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + base64url: "base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + json_string: "JSON\u6587\u5B57\u5217", + e164: "E.164\u756A\u53F7", + jwt: "JWT", + template_literal: "\u5165\u529B\u5024" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u6570\u5024", + array: "\u914D\u5217" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u7121\u52B9\u306A\u5165\u529B: instanceof ${issue2.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + } + return `\u7121\u52B9\u306A\u5165\u529B: ${expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive(issue2.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; + return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues(issue2.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "too_big": { + const adj = issue2.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "ends_with") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "includes") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "regex") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u7121\u52B9\u306A${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u7121\u52B9\u306A\u6570\u5024: ${issue2.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "unrecognized_keys": + return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue2.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue2.keys, "\u3001")}`; + case "invalid_key": + return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; + case "invalid_union": + return "\u7121\u52B9\u306A\u5165\u529B"; + case "invalid_element": + return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; + default: + return `\u7121\u52B9\u306A\u5165\u529B`; + } + }; + }, "error"); + __name(ja_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ka.js +function ka_default() { + return { + localeError: error25() + }; +} +var error25; +var init_ka = __esm({ + "../../node_modules/zod/v4/locales/ka.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error25 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + array: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + set: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0", + email: "\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + url: "URL", + emoji: "\u10D4\u10DB\u10DD\u10EF\u10D8", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD", + date: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8", + time: "\u10D3\u10E0\u10DD", + duration: "\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0", + ipv4: "IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8", + jwt: "JWT", + template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8", + string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8", + function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0", + array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${issue2.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; + } + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${stringifyPrimitive(issue2.values[0])}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${joinValues(issue2.values, "|")}-\u10D3\u10D0\u10DC`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`; + } + if (_issue.format === "ends_with") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`; + if (_issue.format === "includes") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`; + if (_issue.format === "regex") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue2.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`; + case "unrecognized_keys": + return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue2.keys.length > 1 ? "\u10D4\u10D1\u10D8" : "\u10D8"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue2.origin}-\u10E8\u10D8`; + case "invalid_union": + return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"; + case "invalid_element": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue2.origin}-\u10E8\u10D8`; + default: + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`; + } + }; + }, "error"); + __name(ka_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/km.js +function km_default() { + return { + localeError: error26() + }; +} +var error26; +var init_km = __esm({ + "../../node_modules/zod/v4/locales/km.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error26 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + array: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + set: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B", + email: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B", + url: "URL", + emoji: "\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO", + date: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO", + time: "\u1798\u17C9\u17C4\u1784 ISO", + duration: "\u179A\u1799\u17C8\u1796\u17C1\u179B ISO", + ipv4: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + ipv6: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + cidrv4: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + cidrv6: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + base64: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64", + base64url: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url", + json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON", + e164: "\u179B\u17C1\u1781 E.164", + jwt: "JWT", + template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u179B\u17C1\u1781", + array: "\u17A2\u17B6\u179A\u17C1 (Array)", + null: "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${issue2.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; + } + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive(issue2.values[0])}`; + return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`; + return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue2.divisor}`; + case "unrecognized_keys": + return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`; + case "invalid_union": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; + case "invalid_element": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`; + default: + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; + } + }; + }, "error"); + __name(km_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/kh.js +function kh_default() { + return km_default(); +} +var init_kh = __esm({ + "../../node_modules/zod/v4/locales/kh.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_km(); + __name(kh_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ko.js +function ko_default() { + return { + localeError: error27() + }; +} +var error27; +var init_ko = __esm({ + "../../node_modules/zod/v4/locales/ko.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error27 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\uBB38\uC790", verb: "to have" }, + file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" }, + array: { unit: "\uAC1C", verb: "to have" }, + set: { unit: "\uAC1C", verb: "to have" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\uC785\uB825", + email: "\uC774\uBA54\uC77C \uC8FC\uC18C", + url: "URL", + emoji: "\uC774\uBAA8\uC9C0", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \uB0A0\uC9DC\uC2DC\uAC04", + date: "ISO \uB0A0\uC9DC", + time: "ISO \uC2DC\uAC04", + duration: "ISO \uAE30\uAC04", + ipv4: "IPv4 \uC8FC\uC18C", + ipv6: "IPv6 \uC8FC\uC18C", + cidrv4: "IPv4 \uBC94\uC704", + cidrv6: "IPv6 \uBC94\uC704", + base64: "base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + base64url: "base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + json_string: "JSON \uBB38\uC790\uC5F4", + e164: "E.164 \uBC88\uD638", + jwt: "JWT", + template_literal: "\uC785\uB825" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${issue2.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; + } + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive(issue2.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues(issue2.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "too_big": { + const adj = issue2.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; + const suffix = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue2.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()}${unit} ${adj}${suffix}`; + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()} ${adj}${suffix}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; + const suffix = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue2.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) { + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()}${unit} ${adj}${suffix}`; + } + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()} ${adj}${suffix}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`; + } + if (_issue.format === "ends_with") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "includes") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "regex") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue2.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "unrecognized_keys": + return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\uC798\uBABB\uB41C \uD0A4: ${issue2.origin}`; + case "invalid_union": + return `\uC798\uBABB\uB41C \uC785\uB825`; + case "invalid_element": + return `\uC798\uBABB\uB41C \uAC12: ${issue2.origin}`; + default: + return `\uC798\uBABB\uB41C \uC785\uB825`; + } + }; + }, "error"); + __name(ko_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/lt.js +function getUnitTypeFromNumber(number4) { + const abs = Math.abs(number4); + const last = abs % 10; + const last2 = abs % 100; + if (last2 >= 11 && last2 <= 19 || last === 0) + return "many"; + if (last === 1) + return "one"; + return "few"; +} +function lt_default() { + return { + localeError: error28() + }; +} +var capitalizeFirstCharacter, error28; +var init_lt = __esm({ + "../../node_modules/zod/v4/locales/lt.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + capitalizeFirstCharacter = /* @__PURE__ */ __name((text2) => { + return text2.charAt(0).toUpperCase() + text2.slice(1); + }, "capitalizeFirstCharacter"); + __name(getUnitTypeFromNumber, "getUnitTypeFromNumber"); + error28 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { + unit: { + one: "simbolis", + few: "simboliai", + many: "simboli\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne ilgesn\u0117 kaip", + notInclusive: "turi b\u016Bti trumpesn\u0117 kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne trumpesn\u0117 kaip", + notInclusive: "turi b\u016Bti ilgesn\u0117 kaip" + } + } + }, + file: { + unit: { + one: "baitas", + few: "baitai", + many: "bait\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne didesnis kaip", + notInclusive: "turi b\u016Bti ma\u017Eesnis kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne ma\u017Eesnis kaip", + notInclusive: "turi b\u016Bti didesnis kaip" + } + } + }, + array: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } + } + }, + set: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } + } + } + }; + function getSizing(origin2, unitType, inclusive, targetShouldBe) { + const result = Sizable[origin2] ?? null; + if (result === null) + return result; + return { + unit: result.unit[unitType], + verb: result.verb[targetShouldBe][inclusive ? "inclusive" : "notInclusive"] + }; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u012Fvestis", + email: "el. pa\u0161to adresas", + url: "URL", + emoji: "jaustukas", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO data ir laikas", + date: "ISO data", + time: "ISO laikas", + duration: "ISO trukm\u0117", + ipv4: "IPv4 adresas", + ipv6: "IPv6 adresas", + cidrv4: "IPv4 tinklo prefiksas (CIDR)", + cidrv6: "IPv6 tinklo prefiksas (CIDR)", + base64: "base64 u\u017Ekoduota eilut\u0117", + base64url: "base64url u\u017Ekoduota eilut\u0117", + json_string: "JSON eilut\u0117", + e164: "E.164 numeris", + jwt: "JWT", + template_literal: "\u012Fvestis" + }; + const TypeDictionary = { + nan: "NaN", + number: "skai\u010Dius", + bigint: "sveikasis skai\u010Dius", + string: "eilut\u0117", + boolean: "login\u0117 reik\u0161m\u0117", + undefined: "neapibr\u0117\u017Eta reik\u0161m\u0117", + function: "funkcija", + symbol: "simbolis", + array: "masyvas", + object: "objektas", + null: "nulin\u0117 reik\u0161m\u0117" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Gautas tipas ${received}, o tik\u0117tasi - instanceof ${issue2.expected}`; + } + return `Gautas tipas ${received}, o tik\u0117tasi - ${expected}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Privalo b\u016Bti ${stringifyPrimitive(issue2.values[0])}`; + return `Privalo b\u016Bti vienas i\u0161 ${joinValues(issue2.values, "|")} pasirinkim\u0173`; + case "too_big": { + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.maximum)), issue2.inclusive ?? false, "smaller"); + if (sizing?.verb) + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.maximum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue2.inclusive ? "ne didesnis kaip" : "ma\u017Eesnis kaip"; + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.maximum.toString()} ${sizing?.unit}`; + } + case "too_small": { + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.minimum)), issue2.inclusive ?? false, "bigger"); + if (sizing?.verb) + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.minimum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue2.inclusive ? "ne ma\u017Eesnis kaip" : "didesnis kaip"; + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.minimum.toString()} ${sizing?.unit}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Eilut\u0117 privalo prasid\u0117ti "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Eilut\u0117 privalo pasibaigti "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Eilut\u0117 privalo \u012Ftraukti "${_issue.includes}"`; + if (_issue.format === "regex") + return `Eilut\u0117 privalo atitikti ${_issue.pattern}`; + return `Neteisingas ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Skai\u010Dius privalo b\u016Bti ${issue2.divisor} kartotinis.`; + case "unrecognized_keys": + return `Neatpa\u017Eint${issue2.keys.length > 1 ? "i" : "as"} rakt${issue2.keys.length > 1 ? "ai" : "as"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return "Rastas klaidingas raktas"; + case "invalid_union": + return "Klaidinga \u012Fvestis"; + case "invalid_element": { + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`; + } + default: + return "Klaidinga \u012Fvestis"; + } + }; + }, "error"); + __name(lt_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/mk.js +function mk_default() { + return { + localeError: error29() + }; +} +var error29; +var init_mk = __esm({ + "../../node_modules/zod/v4/locales/mk.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error29 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + array: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + set: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0432\u043D\u0435\u0441", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430", + url: "URL", + emoji: "\u0435\u043C\u043E\u045F\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0443\u043C", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441\u0430", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441\u0430", + cidrv4: "IPv4 \u043E\u043F\u0441\u0435\u0433", + cidrv6: "IPv6 \u043E\u043F\u0441\u0435\u0433", + base64: "base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + base64url: "base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + json_string: "JSON \u043D\u0438\u0437\u0430", + e164: "E.164 \u0431\u0440\u043E\u0458", + jwt: "JWT", + template_literal: "\u0432\u043D\u0435\u0441" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0431\u0440\u043E\u0458", + array: "\u043D\u0438\u0437\u0430" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${issue2.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; + } + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; + return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue2.origin}`; + case "invalid_union": + return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"; + case "invalid_element": + return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue2.origin}`; + default: + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`; + } + }; + }, "error"); + __name(mk_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ms.js +function ms_default() { + return { + localeError: error30() + }; +} +var error30; +var init_ms = __esm({ + "../../node_modules/zod/v4/locales/ms.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error30 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "aksara", verb: "mempunyai" }, + file: { unit: "bait", verb: "mempunyai" }, + array: { unit: "elemen", verb: "mempunyai" }, + set: { unit: "elemen", verb: "mempunyai" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "alamat e-mel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tarikh masa ISO", + date: "tarikh ISO", + time: "masa ISO", + duration: "tempoh ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "julat IPv4", + cidrv6: "julat IPv6", + base64: "string dikodkan base64", + base64url: "string dikodkan base64url", + json_string: "string JSON", + e164: "nombor E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombor" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Input tidak sah: dijangka instanceof ${issue2.expected}, diterima ${received}`; + } + return `Input tidak sah: dijangka ${expected}, diterima ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Input tidak sah: dijangka ${stringifyPrimitive(issue2.values[0])}`; + return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} adalah ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Terlalu kecil: dijangka ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: dijangka ${issue2.origin} adalah ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak sah: mesti mengandungi "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} tidak sah`; + } + case "not_multiple_of": + return `Nombor tidak sah: perlu gandaan ${issue2.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak sah dalam ${issue2.origin}`; + case "invalid_union": + return "Input tidak sah"; + case "invalid_element": + return `Nilai tidak sah dalam ${issue2.origin}`; + default: + return `Input tidak sah`; + } + }; + }, "error"); + __name(ms_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/nl.js +function nl_default() { + return { + localeError: error31() + }; +} +var error31; +var init_nl = __esm({ + "../../node_modules/zod/v4/locales/nl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error31 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "tekens", verb: "heeft" }, + file: { unit: "bytes", verb: "heeft" }, + array: { unit: "elementen", verb: "heeft" }, + set: { unit: "elementen", verb: "heeft" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "invoer", + email: "emailadres", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum en tijd", + date: "ISO datum", + time: "ISO tijd", + duration: "ISO duur", + ipv4: "IPv4-adres", + ipv6: "IPv6-adres", + cidrv4: "IPv4-bereik", + cidrv6: "IPv6-bereik", + base64: "base64-gecodeerde tekst", + base64url: "base64 URL-gecodeerde tekst", + json_string: "JSON string", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "invoer" + }; + const TypeDictionary = { + nan: "NaN", + number: "getal" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ongeldige invoer: verwacht instanceof ${issue2.expected}, ontving ${received}`; + } + return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue2.values[0])}`; + return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + const longName = issue2.origin === "date" ? "laat" : issue2.origin === "string" ? "lang" : "groot"; + if (sizing) + return `Te ${longName}: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementen"} ${sizing.verb}`; + return `Te ${longName}: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} is`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + const shortName = issue2.origin === "date" ? "vroeg" : issue2.origin === "string" ? "kort" : "klein"; + if (sizing) { + return `Te ${shortName}: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} ${sizing.verb}`; + } + return `Te ${shortName}: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} is`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`; + } + if (_issue.format === "ends_with") + return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`; + if (_issue.format === "includes") + return `Ongeldige tekst: moet "${_issue.includes}" bevatten`; + if (_issue.format === "regex") + return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`; + return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ongeldig getal: moet een veelvoud van ${issue2.divisor} zijn`; + case "unrecognized_keys": + return `Onbekende key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ongeldige key in ${issue2.origin}`; + case "invalid_union": + return "Ongeldige invoer"; + case "invalid_element": + return `Ongeldige waarde in ${issue2.origin}`; + default: + return `Ongeldige invoer`; + } + }; + }, "error"); + __name(nl_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/no.js +function no_default() { + return { + localeError: error32() + }; +} +var error32; +var init_no = __esm({ + "../../node_modules/zod/v4/locales/no.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error32 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "tegn", verb: "\xE5 ha" }, + file: { unit: "bytes", verb: "\xE5 ha" }, + array: { unit: "elementer", verb: "\xE5 inneholde" }, + set: { unit: "elementer", verb: "\xE5 inneholde" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "e-postadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkeslett", + date: "ISO-dato", + time: "ISO-klokkeslett", + duration: "ISO-varighet", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spekter", + cidrv6: "IPv6-spekter", + base64: "base64-enkodet streng", + base64url: "base64url-enkodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "tall", + array: "liste" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ugyldig input: forventet instanceof ${issue2.expected}, fikk ${received}`; + } + return `Ugyldig input: forventet ${expected}, fikk ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ugyldig verdi: forventet ${stringifyPrimitive(issue2.values[0])}`; + return `Ugyldig valg: forventet en av ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: m\xE5 ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8kkel i ${issue2.origin}`; + case "invalid_union": + return "Ugyldig input"; + case "invalid_element": + return `Ugyldig verdi i ${issue2.origin}`; + default: + return `Ugyldig input`; + } + }; + }, "error"); + __name(no_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ota.js +function ota_default() { + return { + localeError: error33() + }; +} +var error33; +var init_ota = __esm({ + "../../node_modules/zod/v4/locales/ota.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error33 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "unsur", verb: "olmal\u0131d\u0131r" }, + set: { unit: "unsur", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "giren", + email: "epostag\xE2h", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO heng\xE2m\u0131", + date: "ISO tarihi", + time: "ISO zaman\u0131", + duration: "ISO m\xFCddeti", + ipv4: "IPv4 ni\u015F\xE2n\u0131", + ipv6: "IPv6 ni\u015F\xE2n\u0131", + cidrv4: "IPv4 menzili", + cidrv6: "IPv6 menzili", + base64: "base64-\u015Fifreli metin", + base64url: "base64url-\u015Fifreli metin", + json_string: "JSON metin", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "giren" + }; + const TypeDictionary = { + nan: "NaN", + number: "numara", + array: "saf", + null: "gayb" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `F\xE2sit giren: umulan instanceof ${issue2.expected}, al\u0131nan ${received}`; + } + return `F\xE2sit giren: umulan ${expected}, al\u0131nan ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `F\xE2sit giren: umulan ${stringifyPrimitive(issue2.values[0])}`; + return `F\xE2sit tercih: m\xFBteberler ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; + return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} olmal\u0131yd\u0131.`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; + } + return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} olmal\u0131yd\u0131.`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`; + if (_issue.format === "ends_with") + return `F\xE2sit metin: "${_issue.suffix}" ile bitmeli.`; + if (_issue.format === "includes") + return `F\xE2sit metin: "${_issue.includes}" ihtiv\xE2 etmeli.`; + if (_issue.format === "regex") + return `F\xE2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`; + return `F\xE2sit ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `F\xE2sit say\u0131: ${issue2.divisor} kat\u0131 olmal\u0131yd\u0131.`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} i\xE7in tan\u0131nmayan anahtar var.`; + case "invalid_union": + return "Giren tan\u0131namad\u0131."; + case "invalid_element": + return `${issue2.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; + default: + return `K\u0131ymet tan\u0131namad\u0131.`; + } + }; + }, "error"); + __name(ota_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ps.js +function ps_default() { + return { + localeError: error34() + }; +} +var error34; +var init_ps = __esm({ + "../../node_modules/zod/v4/locales/ps.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error34 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" }, + array: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + set: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0648\u0631\u0648\u062F\u064A", + email: "\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u0644", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u064A", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A", + date: "\u0646\u06D0\u067C\u0647", + time: "\u0648\u062E\u062A", + duration: "\u0645\u0648\u062F\u0647", + ipv4: "\u062F IPv4 \u067E\u062A\u0647", + ipv6: "\u062F IPv6 \u067E\u062A\u0647", + cidrv4: "\u062F IPv4 \u0633\u0627\u062D\u0647", + cidrv6: "\u062F IPv6 \u0633\u0627\u062D\u0647", + base64: "base64-encoded \u0645\u062A\u0646", + base64url: "base64url-encoded \u0645\u062A\u0646", + json_string: "JSON \u0645\u062A\u0646", + e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u064A" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0639\u062F\u062F", + array: "\u0627\u0631\u06D0" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${issue2.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + } + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + } + case "invalid_value": + if (issue2.values.length === 1) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive(issue2.values[0])} \u0648\u0627\u06CC`; + } + return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues(issue2.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0648\u064A`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0648\u064A`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`; + } + if (_issue.format === "ends_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`; + } + if (_issue.format === "includes") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${_issue.includes}" \u0648\u0644\u0631\u064A`; + } + if (_issue.format === "regex") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`; + } + return `${FormatDictionary[_issue.format] ?? issue2.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; + } + case "not_multiple_of": + return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue2.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; + case "unrecognized_keys": + return `\u0646\u0627\u0633\u0645 ${issue2.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; + case "invalid_union": + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + case "invalid_element": + return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; + default: + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + } + }; + }, "error"); + __name(ps_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/pl.js +function pl_default() { + return { + localeError: error35() + }; +} +var error35; +var init_pl = __esm({ + "../../node_modules/zod/v4/locales/pl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error35 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "znak\xF3w", verb: "mie\u0107" }, + file: { unit: "bajt\xF3w", verb: "mie\u0107" }, + array: { unit: "element\xF3w", verb: "mie\u0107" }, + set: { unit: "element\xF3w", verb: "mie\u0107" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "wyra\u017Cenie", + email: "adres email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i godzina w formacie ISO", + date: "data w formacie ISO", + time: "godzina w formacie ISO", + duration: "czas trwania ISO", + ipv4: "adres IPv4", + ipv6: "adres IPv6", + cidrv4: "zakres IPv4", + cidrv6: "zakres IPv6", + base64: "ci\u0105g znak\xF3w zakodowany w formacie base64", + base64url: "ci\u0105g znak\xF3w zakodowany w formacie base64url", + json_string: "ci\u0105g znak\xF3w w formacie JSON", + e164: "liczba E.164", + jwt: "JWT", + template_literal: "wej\u015Bcie" + }; + const TypeDictionary = { + nan: "NaN", + number: "liczba", + array: "tablica" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${issue2.expected}, otrzymano ${received}`; + } + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${expected}, otrzymano ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive(issue2.values[0])}`; + return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`; + return `Nieprawid\u0142ow(y/a/e) ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue2.divisor}`; + case "unrecognized_keys": + return `Nierozpoznane klucze${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Nieprawid\u0142owy klucz w ${issue2.origin}`; + case "invalid_union": + return "Nieprawid\u0142owe dane wej\u015Bciowe"; + case "invalid_element": + return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue2.origin}`; + default: + return `Nieprawid\u0142owe dane wej\u015Bciowe`; + } + }; + }, "error"); + __name(pl_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/pt.js +function pt_default() { + return { + localeError: error36() + }; +} +var error36; +var init_pt = __esm({ + "../../node_modules/zod/v4/locales/pt.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error36 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caracteres", verb: "ter" }, + file: { unit: "bytes", verb: "ter" }, + array: { unit: "itens", verb: "ter" }, + set: { unit: "itens", verb: "ter" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "padr\xE3o", + email: "endere\xE7o de e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "dura\xE7\xE3o ISO", + ipv4: "endere\xE7o IPv4", + ipv6: "endere\xE7o IPv6", + cidrv4: "faixa de IPv4", + cidrv6: "faixa de IPv6", + base64: "texto codificado em base64", + base64url: "URL codificada em base64", + json_string: "texto JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\xFAmero", + null: "nulo" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Tipo inv\xE1lido: esperado instanceof ${issue2.expected}, recebido ${received}`; + } + return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue2.values[0])}`; + return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} inv\xE1lido`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Chave inv\xE1lida em ${issue2.origin}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido em ${issue2.origin}`; + default: + return `Campo inv\xE1lido`; + } + }; + }, "error"); + __name(pt_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ru.js +function getRussianPlural(count4, one, few, many) { + const absCount = Math.abs(count4); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; + } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; +} +function ru_default() { + return { + localeError: error37() + }; +} +var error37; +var init_ru = __esm({ + "../../node_modules/zod/v4/locales/ru.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + __name(getRussianPlural, "getRussianPlural"); + error37 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0438\u043C\u0432\u043E\u043B", + few: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", + many: "\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u0430", + many: "\u0431\u0430\u0439\u0442" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0432\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u044F", + duration: "ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64", + base64url: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url", + json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0432\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0441\u0438\u0432" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; + } + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const maxValue = Number(issue2.maximum); + const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.maximum.toString()} ${unit}`; + } + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const minValue = Number(issue2.minimum); + const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.minimum.toString()} ${unit}`; + } + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue2.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0438" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"; + case "invalid_element": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue2.origin}`; + default: + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`; + } + }; + }, "error"); + __name(ru_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/sl.js +function sl_default() { + return { + localeError: error38() + }; +} +var error38; +var init_sl = __esm({ + "../../node_modules/zod/v4/locales/sl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error38 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "znakov", verb: "imeti" }, + file: { unit: "bajtov", verb: "imeti" }, + array: { unit: "elementov", verb: "imeti" }, + set: { unit: "elementov", verb: "imeti" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "vnos", + email: "e-po\u0161tni naslov", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum in \u010Das", + date: "ISO datum", + time: "ISO \u010Das", + duration: "ISO trajanje", + ipv4: "IPv4 naslov", + ipv6: "IPv6 naslov", + cidrv4: "obseg IPv4", + cidrv6: "obseg IPv6", + base64: "base64 kodiran niz", + base64url: "base64url kodiran niz", + json_string: "JSON niz", + e164: "E.164 \u0161tevilka", + jwt: "JWT", + template_literal: "vnos" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0161tevilo", + array: "tabela" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Neveljaven vnos: pri\u010Dakovano instanceof ${issue2.expected}, prejeto ${received}`; + } + return `Neveljaven vnos: pri\u010Dakovano ${expected}, prejeto ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive(issue2.values[0])}`; + return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} imelo ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementov"}`; + return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} imelo ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Neveljaven niz: mora se kon\u010Dati z "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neveljaven niz: mora vsebovati "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`; + return `Neveljaven ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue2.divisor}`; + case "unrecognized_keys": + return `Neprepoznan${issue2.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Neveljaven klju\u010D v ${issue2.origin}`; + case "invalid_union": + return "Neveljaven vnos"; + case "invalid_element": + return `Neveljavna vrednost v ${issue2.origin}`; + default: + return "Neveljaven vnos"; + } + }; + }, "error"); + __name(sl_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/sv.js +function sv_default() { + return { + localeError: error39() + }; +} +var error39; +var init_sv = __esm({ + "../../node_modules/zod/v4/locales/sv.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error39 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "tecken", verb: "att ha" }, + file: { unit: "bytes", verb: "att ha" }, + array: { unit: "objekt", verb: "att inneh\xE5lla" }, + set: { unit: "objekt", verb: "att inneh\xE5lla" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "regulj\xE4rt uttryck", + email: "e-postadress", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datum och tid", + date: "ISO-datum", + time: "ISO-tid", + duration: "ISO-varaktighet", + ipv4: "IPv4-intervall", + ipv6: "IPv6-intervall", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodad str\xE4ng", + base64url: "base64url-kodad str\xE4ng", + json_string: "JSON-str\xE4ng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "mall-literal" + }; + const TypeDictionary = { + nan: "NaN", + number: "antal", + array: "lista" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${issue2.expected}, fick ${received}`; + } + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${expected}, fick ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive(issue2.values[0])}`; + return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; + } + return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Ogiltig str\xE4ng: m\xE5ste sluta med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${_issue.pattern}"`; + return `Ogiltig(t) ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ogiltig nyckel i ${issue2.origin ?? "v\xE4rdet"}`; + case "invalid_union": + return "Ogiltig input"; + case "invalid_element": + return `Ogiltigt v\xE4rde i ${issue2.origin ?? "v\xE4rdet"}`; + default: + return `Ogiltig input`; + } + }; + }, "error"); + __name(sv_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ta.js +function ta_default() { + return { + localeError: error40() + }; +} +var error40; +var init_ta = __esm({ + "../../node_modules/zod/v4/locales/ta.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error40 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + array: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + set: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1", + email: "\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + date: "ISO \u0BA4\u0BC7\u0BA4\u0BBF", + time: "ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + duration: "ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1", + ipv4: "IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + ipv6: "IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + cidrv4: "IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + cidrv6: "IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + base64: "base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + base64url: "base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD", + e164: "E.164 \u0B8E\u0BA3\u0BCD", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0B8E\u0BA3\u0BCD", + array: "\u0B85\u0BA3\u0BBF", + null: "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${issue2.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; + } + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues(issue2.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "ends_with") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "includes") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "regex") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue2.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + case "unrecognized_keys": + return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue2.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`; + case "invalid_union": + return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"; + case "invalid_element": + return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`; + default: + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`; + } + }; + }, "error"); + __name(ta_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/th.js +function th_default() { + return { + localeError: error41() + }; +} +var error41; +var init_th = __esm({ + "../../node_modules/zod/v4/locales/th.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error41 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19", + email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25", + url: "URL", + emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO", + time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4", + ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6", + cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4", + cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6", + base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64", + base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL", + json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON", + e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)", + jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT", + template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02", + array: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)", + null: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue2.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; + } + return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${_issue.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`; + if (_issue.format === "regex") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`; + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue2.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`; + case "unrecognized_keys": + return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; + case "invalid_union": + return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49"; + case "invalid_element": + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; + default: + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`; + } + }; + }, "error"); + __name(th_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/tr.js +function tr_default() { + return { + localeError: error42() + }; +} +var error42; +var init_tr = __esm({ + "../../node_modules/zod/v4/locales/tr.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error42 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "karakter", verb: "olmal\u0131" }, + file: { unit: "bayt", verb: "olmal\u0131" }, + array: { unit: "\xF6\u011Fe", verb: "olmal\u0131" }, + set: { unit: "\xF6\u011Fe", verb: "olmal\u0131" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "girdi", + email: "e-posta adresi", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO tarih ve saat", + date: "ISO tarih", + time: "ISO saat", + duration: "ISO s\xFCre", + ipv4: "IPv4 adresi", + ipv6: "IPv6 adresi", + cidrv4: "IPv4 aral\u0131\u011F\u0131", + cidrv6: "IPv6 aral\u0131\u011F\u0131", + base64: "base64 ile \u015Fifrelenmi\u015F metin", + base64url: "base64url ile \u015Fifrelenmi\u015F metin", + json_string: "JSON dizesi", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "\u015Eablon dizesi" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ge\xE7ersiz de\u011Fer: beklenen instanceof ${issue2.expected}, al\u0131nan ${received}`; + } + return `Ge\xE7ersiz de\u011Fer: beklenen ${expected}, al\u0131nan ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive(issue2.values[0])}`; + return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; + return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`; + if (_issue.format === "ends_with") + return `Ge\xE7ersiz metin: "${_issue.suffix}" ile bitmeli`; + if (_issue.format === "includes") + return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`; + if (_issue.format === "regex") + return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`; + return `Ge\xE7ersiz ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ge\xE7ersiz say\u0131: ${issue2.divisor} ile tam b\xF6l\xFCnebilmeli`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} i\xE7inde ge\xE7ersiz anahtar`; + case "invalid_union": + return "Ge\xE7ersiz de\u011Fer"; + case "invalid_element": + return `${issue2.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; + default: + return `Ge\xE7ersiz de\u011Fer`; + } + }; + }, "error"); + __name(tr_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/uk.js +function uk_default() { + return { + localeError: error43() + }; +} +var error43; +var init_uk = __esm({ + "../../node_modules/zod/v4/locales/uk.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error43 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438", + url: "URL", + emoji: "\u0435\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO", + date: "\u0434\u0430\u0442\u0430 ISO", + time: "\u0447\u0430\u0441 ISO", + duration: "\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO", + ipv4: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv4", + ipv6: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv6", + cidrv4: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4", + cidrv6: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6", + base64: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64", + base64url: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url", + json_string: "\u0440\u044F\u0434\u043E\u043A JSON", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0438\u0432" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${issue2.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; + } + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} \u0431\u0443\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0456" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"; + case "invalid_element": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue2.origin}`; + default: + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`; + } + }; + }, "error"); + __name(uk_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ua.js +function ua_default() { + return uk_default(); +} +var init_ua = __esm({ + "../../node_modules/zod/v4/locales/ua.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_uk(); + __name(ua_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ur.js +function ur_default() { + return { + localeError: error44() + }; +} +var error44; +var init_ur = __esm({ + "../../node_modules/zod/v4/locales/ur.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error44 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, + file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" }, + array: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" }, + set: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0627\u0646 \u067E\u0679", + email: "\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + uuidv4: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4", + uuidv6: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6", + nanoid: "\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC", + guid: "\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid2: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2", + ulid: "\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC", + xid: "\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC", + ksuid: "\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + datetime: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645", + date: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E", + time: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A", + duration: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A", + ipv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633", + ipv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633", + cidrv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C", + cidrv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C", + base64: "\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + base64url: "\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF", + e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631", + jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC", + template_literal: "\u0627\u0646 \u067E\u0679" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0646\u0645\u0628\u0631", + array: "\u0622\u0631\u06D2", + null: "\u0646\u0644" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${issue2.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + } + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive(issue2.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues(issue2.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue2.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u06D2 ${adj}${issue2.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + } + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u0627 ${adj}${issue2.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + } + if (_issue.format === "ends_with") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "includes") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "regex") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + return `\u063A\u0644\u0637 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue2.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + case "unrecognized_keys": + return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue2.keys.length > 1 ? "\u0632" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; + case "invalid_key": + return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; + case "invalid_union": + return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"; + case "invalid_element": + return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; + default: + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`; + } + }; + }, "error"); + __name(ur_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/uz.js +function uz_default() { + return { + localeError: error45() + }; +} +var error45; +var init_uz = __esm({ + "../../node_modules/zod/v4/locales/uz.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error45 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "belgi", verb: "bo\u2018lishi kerak" }, + file: { unit: "bayt", verb: "bo\u2018lishi kerak" }, + array: { unit: "element", verb: "bo\u2018lishi kerak" }, + set: { unit: "element", verb: "bo\u2018lishi kerak" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "kirish", + email: "elektron pochta manzili", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO sana va vaqti", + date: "ISO sana", + time: "ISO vaqt", + duration: "ISO davomiylik", + ipv4: "IPv4 manzil", + ipv6: "IPv6 manzil", + mac: "MAC manzil", + cidrv4: "IPv4 diapazon", + cidrv6: "IPv6 diapazon", + base64: "base64 kodlangan satr", + base64url: "base64url kodlangan satr", + json_string: "JSON satr", + e164: "E.164 raqam", + jwt: "JWT", + template_literal: "kirish" + }; + const TypeDictionary = { + nan: "NaN", + number: "raqam", + array: "massiv" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Noto\u2018g\u2018ri kirish: kutilgan instanceof ${issue2.expected}, qabul qilingan ${received}`; + } + return `Noto\u2018g\u2018ri kirish: kutilgan ${expected}, qabul qilingan ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Noto\u2018g\u2018ri kirish: kutilgan ${stringifyPrimitive(issue2.values[0])}`; + return `Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Juda katta: kutilgan ${issue2.origin ?? "qiymat"} ${adj}${issue2.maximum.toString()} ${sizing.unit} ${sizing.verb}`; + return `Juda katta: kutilgan ${issue2.origin ?? "qiymat"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Juda kichik: kutilgan ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} ${sizing.verb}`; + } + return `Juda kichik: kutilgan ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Noto\u2018g\u2018ri satr: "${_issue.prefix}" bilan boshlanishi kerak`; + if (_issue.format === "ends_with") + return `Noto\u2018g\u2018ri satr: "${_issue.suffix}" bilan tugashi kerak`; + if (_issue.format === "includes") + return `Noto\u2018g\u2018ri satr: "${_issue.includes}" ni o\u2018z ichiga olishi kerak`; + if (_issue.format === "regex") + return `Noto\u2018g\u2018ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`; + return `Noto\u2018g\u2018ri ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Noto\u2018g\u2018ri raqam: ${issue2.divisor} ning karralisi bo\u2018lishi kerak`; + case "unrecognized_keys": + return `Noma\u2019lum kalit${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} dagi kalit noto\u2018g\u2018ri`; + case "invalid_union": + return "Noto\u2018g\u2018ri kirish"; + case "invalid_element": + return `${issue2.origin} da noto\u2018g\u2018ri qiymat`; + default: + return `Noto\u2018g\u2018ri kirish`; + } + }; + }, "error"); + __name(uz_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/vi.js +function vi_default() { + return { + localeError: error46() + }; +} +var error46; +var init_vi = __esm({ + "../../node_modules/zod/v4/locales/vi.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error46 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, + file: { unit: "byte", verb: "c\xF3" }, + array: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" }, + set: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0111\u1EA7u v\xE0o", + email: "\u0111\u1ECBa ch\u1EC9 email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ng\xE0y gi\u1EDD ISO", + date: "ng\xE0y ISO", + time: "gi\u1EDD ISO", + duration: "kho\u1EA3ng th\u1EDDi gian ISO", + ipv4: "\u0111\u1ECBa ch\u1EC9 IPv4", + ipv6: "\u0111\u1ECBa ch\u1EC9 IPv6", + cidrv4: "d\u1EA3i IPv4", + cidrv6: "d\u1EA3i IPv6", + base64: "chu\u1ED7i m\xE3 h\xF3a base64", + base64url: "chu\u1ED7i m\xE3 h\xF3a base64url", + json_string: "chu\u1ED7i JSON", + e164: "s\u1ED1 E.164", + jwt: "JWT", + template_literal: "\u0111\u1EA7u v\xE0o" + }; + const TypeDictionary = { + nan: "NaN", + number: "s\u1ED1", + array: "m\u1EA3ng" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${issue2.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; + } + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive(issue2.values[0])}`; + return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${_issue.includes}"`; + if (_issue.format === "regex") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} kh\xF4ng h\u1EE3p l\u1EC7`; + } + case "not_multiple_of": + return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue2.divisor}`; + case "unrecognized_keys": + return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; + case "invalid_union": + return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"; + case "invalid_element": + return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; + default: + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`; + } + }; + }, "error"); + __name(vi_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/zh-CN.js +function zh_CN_default() { + return { + localeError: error47() + }; +} +var error47; +var init_zh_CN = __esm({ + "../../node_modules/zod/v4/locales/zh-CN.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error47 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, + file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" }, + array: { unit: "\u9879", verb: "\u5305\u542B" }, + set: { unit: "\u9879", verb: "\u5305\u542B" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u8F93\u5165", + email: "\u7535\u5B50\u90AE\u4EF6", + url: "URL", + emoji: "\u8868\u60C5\u7B26\u53F7", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u671F\u65F6\u95F4", + date: "ISO\u65E5\u671F", + time: "ISO\u65F6\u95F4", + duration: "ISO\u65F6\u957F", + ipv4: "IPv4\u5730\u5740", + ipv6: "IPv6\u5730\u5740", + cidrv4: "IPv4\u7F51\u6BB5", + cidrv6: "IPv6\u7F51\u6BB5", + base64: "base64\u7F16\u7801\u5B57\u7B26\u4E32", + base64url: "base64url\u7F16\u7801\u5B57\u7B26\u4E32", + json_string: "JSON\u5B57\u7B26\u4E32", + e164: "E.164\u53F7\u7801", + jwt: "JWT", + template_literal: "\u8F93\u5165" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u6570\u5B57", + array: "\u6570\u7EC4", + null: "\u7A7A\u503C(null)" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${issue2.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; + } + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive(issue2.values[0])}`; + return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`; + if (_issue.format === "ends_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.suffix}" \u7ED3\u5C3E`; + if (_issue.format === "includes") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`; + return `\u65E0\u6548${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue2.divisor} \u7684\u500D\u6570`; + case "unrecognized_keys": + return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; + case "invalid_union": + return "\u65E0\u6548\u8F93\u5165"; + case "invalid_element": + return `${issue2.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; + default: + return `\u65E0\u6548\u8F93\u5165`; + } + }; + }, "error"); + __name(zh_CN_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/zh-TW.js +function zh_TW_default() { + return { + localeError: error48() + }; +} +var error48; +var init_zh_TW = __esm({ + "../../node_modules/zod/v4/locales/zh-TW.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error48 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, + file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" }, + array: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" }, + set: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u8F38\u5165", + email: "\u90F5\u4EF6\u5730\u5740", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u65E5\u671F\u6642\u9593", + date: "ISO \u65E5\u671F", + time: "ISO \u6642\u9593", + duration: "ISO \u671F\u9593", + ipv4: "IPv4 \u4F4D\u5740", + ipv6: "IPv6 \u4F4D\u5740", + cidrv4: "IPv4 \u7BC4\u570D", + cidrv6: "IPv6 \u7BC4\u570D", + base64: "base64 \u7DE8\u78BC\u5B57\u4E32", + base64url: "base64url \u7DE8\u78BC\u5B57\u4E32", + json_string: "JSON \u5B57\u4E32", + e164: "E.164 \u6578\u503C", + jwt: "JWT", + template_literal: "\u8F38\u5165" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${issue2.expected}\uFF0C\u4F46\u6536\u5230 ${received}`; + } + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${expected}\uFF0C\u4F46\u6536\u5230 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive(issue2.values[0])}`; + return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`; + } + if (_issue.format === "ends_with") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.suffix}" \u7D50\u5C3E`; + if (_issue.format === "includes") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`; + return `\u7121\u6548\u7684 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue2.divisor} \u7684\u500D\u6578`; + case "unrecognized_keys": + return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue2.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues(issue2.keys, "\u3001")}`; + case "invalid_key": + return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; + case "invalid_union": + return "\u7121\u6548\u7684\u8F38\u5165\u503C"; + case "invalid_element": + return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; + default: + return `\u7121\u6548\u7684\u8F38\u5165\u503C`; + } + }; + }, "error"); + __name(zh_TW_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/yo.js +function yo_default() { + return { + localeError: error49() + }; +} +var error49; +var init_yo = __esm({ + "../../node_modules/zod/v4/locales/yo.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error49 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\xE0mi", verb: "n\xED" }, + file: { unit: "bytes", verb: "n\xED" }, + array: { unit: "nkan", verb: "n\xED" }, + set: { unit: "nkan", verb: "n\xED" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9", + email: "\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\xE0k\xF3k\xF2 ISO", + date: "\u1ECDj\u1ECD\u0301 ISO", + time: "\xE0k\xF3k\xF2 ISO", + duration: "\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO", + ipv4: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv4", + ipv6: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv6", + cidrv4: "\xE0gb\xE8gb\xE8 IPv4", + cidrv6: "\xE0gb\xE8gb\xE8 IPv6", + base64: "\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64", + base64url: "\u1ECD\u0300r\u1ECD\u0300 base64url", + json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON", + e164: "n\u1ECD\u0301mb\xE0 E.164", + jwt: "JWT", + template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\u1ECD\u0301mb\xE0", + array: "akop\u1ECD" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${issue2.expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; + } + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${stringifyPrimitive(issue2.values[0])}`; + return `\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue2.origin ?? "iye"} ${sizing.verb} ${adj}${issue2.maximum} ${sizing.unit}`; + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue2.maximum}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum} ${sizing.unit}`; + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue2.minimum}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`; + return `A\u1E63\xEC\u1E63e: ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${issue2.divisor}`; + case "unrecognized_keys": + return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue2.origin}`; + case "invalid_union": + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + case "invalid_element": + return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue2.origin}`; + default: + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + } + }; + }, "error"); + __name(yo_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/index.js +var locales_exports = {}; +__export(locales_exports, { + ar: () => ar_default, + az: () => az_default, + be: () => be_default, + bg: () => bg_default, + ca: () => ca_default, + cs: () => cs_default, + da: () => da_default, + de: () => de_default, + en: () => en_default, + eo: () => eo_default, + es: () => es_default, + fa: () => fa_default, + fi: () => fi_default, + fr: () => fr_default, + frCA: () => fr_CA_default, + he: () => he_default, + hu: () => hu_default, + hy: () => hy_default, + id: () => id_default, + is: () => is_default, + it: () => it_default, + ja: () => ja_default, + ka: () => ka_default, + kh: () => kh_default, + km: () => km_default, + ko: () => ko_default, + lt: () => lt_default, + mk: () => mk_default, + ms: () => ms_default, + nl: () => nl_default, + no: () => no_default, + ota: () => ota_default, + pl: () => pl_default, + ps: () => ps_default, + pt: () => pt_default, + ru: () => ru_default, + sl: () => sl_default, + sv: () => sv_default, + ta: () => ta_default, + th: () => th_default, + tr: () => tr_default, + ua: () => ua_default, + uk: () => uk_default, + ur: () => ur_default, + uz: () => uz_default, + vi: () => vi_default, + yo: () => yo_default, + zhCN: () => zh_CN_default, + zhTW: () => zh_TW_default +}); +var init_locales = __esm({ + "../../node_modules/zod/v4/locales/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_ar(); + init_az(); + init_be(); + init_bg(); + init_ca(); + init_cs(); + init_da(); + init_de(); + init_en(); + init_eo(); + init_es(); + init_fa(); + init_fi(); + init_fr(); + init_fr_CA(); + init_he(); + init_hu(); + init_hy(); + init_id(); + init_is(); + init_it(); + init_ja(); + init_ka(); + init_kh(); + init_km(); + init_ko(); + init_lt(); + init_mk(); + init_ms(); + init_nl(); + init_no(); + init_ota(); + init_ps(); + init_pl(); + init_pt(); + init_ru(); + init_sl(); + init_sv(); + init_ta(); + init_th(); + init_tr(); + init_ua(); + init_uk(); + init_ur(); + init_uz(); + init_vi(); + init_zh_CN(); + init_zh_TW(); + init_yo(); + } +}); + +// ../../node_modules/zod/v4/core/registries.js +function registry() { + return new $ZodRegistry(); +} +var _a123, $output, $input, $ZodRegistry, globalRegistry; +var init_registries = __esm({ + "../../node_modules/zod/v4/core/registries.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + $output = Symbol("ZodOutput"); + $input = Symbol("ZodInput"); + $ZodRegistry = class { + constructor() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + } + add(schema, ..._meta) { + const meta3 = _meta[0]; + this._map.set(schema, meta3); + if (meta3 && typeof meta3 === "object" && "id" in meta3) { + this._idmap.set(meta3.id, schema); + } + return this; + } + clear() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + return this; + } + remove(schema) { + const meta3 = this._map.get(schema); + if (meta3 && typeof meta3 === "object" && "id" in meta3) { + this._idmap.delete(meta3.id); + } + this._map.delete(schema); + return this; + } + get(schema) { + const p2 = schema._zod.parent; + if (p2) { + const pm = { ...this.get(p2) ?? {} }; + delete pm.id; + const f2 = { ...pm, ...this._map.get(schema) }; + return Object.keys(f2).length ? f2 : void 0; + } + return this._map.get(schema); + } + has(schema) { + return this._map.has(schema); + } + }; + __name($ZodRegistry, "$ZodRegistry"); + __name(registry, "registry"); + (_a123 = globalThis).__zod_globalRegistry ?? (_a123.__zod_globalRegistry = registry()); + globalRegistry = globalThis.__zod_globalRegistry; + } +}); + +// ../../node_modules/zod/v4/core/api.js +function _string(Class2, params) { + return new Class2({ + type: "string", + ...normalizeParams(params) + }); +} +function _coercedString(Class2, params) { + return new Class2({ + type: "string", + coerce: true, + ...normalizeParams(params) + }); +} +function _email(Class2, params) { + return new Class2({ + type: "string", + format: "email", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _guid(Class2, params) { + return new Class2({ + type: "string", + format: "guid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _uuid(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _uuidv4(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v4", + ...normalizeParams(params) + }); +} +function _uuidv6(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v6", + ...normalizeParams(params) + }); +} +function _uuidv7(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v7", + ...normalizeParams(params) + }); +} +function _url(Class2, params) { + return new Class2({ + type: "string", + format: "url", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _emoji2(Class2, params) { + return new Class2({ + type: "string", + format: "emoji", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _nanoid(Class2, params) { + return new Class2({ + type: "string", + format: "nanoid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cuid(Class2, params) { + return new Class2({ + type: "string", + format: "cuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cuid2(Class2, params) { + return new Class2({ + type: "string", + format: "cuid2", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ulid(Class2, params) { + return new Class2({ + type: "string", + format: "ulid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _xid(Class2, params) { + return new Class2({ + type: "string", + format: "xid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ksuid(Class2, params) { + return new Class2({ + type: "string", + format: "ksuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ipv4(Class2, params) { + return new Class2({ + type: "string", + format: "ipv4", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ipv6(Class2, params) { + return new Class2({ + type: "string", + format: "ipv6", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _mac(Class2, params) { + return new Class2({ + type: "string", + format: "mac", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cidrv4(Class2, params) { + return new Class2({ + type: "string", + format: "cidrv4", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cidrv6(Class2, params) { + return new Class2({ + type: "string", + format: "cidrv6", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _base64(Class2, params) { + return new Class2({ + type: "string", + format: "base64", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _base64url(Class2, params) { + return new Class2({ + type: "string", + format: "base64url", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _e164(Class2, params) { + return new Class2({ + type: "string", + format: "e164", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _jwt(Class2, params) { + return new Class2({ + type: "string", + format: "jwt", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _isoDateTime(Class2, params) { + return new Class2({ + type: "string", + format: "datetime", + check: "string_format", + offset: false, + local: false, + precision: null, + ...normalizeParams(params) + }); +} +function _isoDate(Class2, params) { + return new Class2({ + type: "string", + format: "date", + check: "string_format", + ...normalizeParams(params) + }); +} +function _isoTime(Class2, params) { + return new Class2({ + type: "string", + format: "time", + check: "string_format", + precision: null, + ...normalizeParams(params) + }); +} +function _isoDuration(Class2, params) { + return new Class2({ + type: "string", + format: "duration", + check: "string_format", + ...normalizeParams(params) + }); +} +function _number(Class2, params) { + return new Class2({ + type: "number", + checks: [], + ...normalizeParams(params) + }); +} +function _coercedNumber(Class2, params) { + return new Class2({ + type: "number", + coerce: true, + checks: [], + ...normalizeParams(params) + }); +} +function _int(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "safeint", + ...normalizeParams(params) + }); +} +function _float32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "float32", + ...normalizeParams(params) + }); +} +function _float64(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "float64", + ...normalizeParams(params) + }); +} +function _int32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "int32", + ...normalizeParams(params) + }); +} +function _uint32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "uint32", + ...normalizeParams(params) + }); +} +function _boolean(Class2, params) { + return new Class2({ + type: "boolean", + ...normalizeParams(params) + }); +} +function _coercedBoolean(Class2, params) { + return new Class2({ + type: "boolean", + coerce: true, + ...normalizeParams(params) + }); +} +function _bigint(Class2, params) { + return new Class2({ + type: "bigint", + ...normalizeParams(params) + }); +} +function _coercedBigint(Class2, params) { + return new Class2({ + type: "bigint", + coerce: true, + ...normalizeParams(params) + }); +} +function _int64(Class2, params) { + return new Class2({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "int64", + ...normalizeParams(params) + }); +} +function _uint64(Class2, params) { + return new Class2({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "uint64", + ...normalizeParams(params) + }); +} +function _symbol(Class2, params) { + return new Class2({ + type: "symbol", + ...normalizeParams(params) + }); +} +function _undefined2(Class2, params) { + return new Class2({ + type: "undefined", + ...normalizeParams(params) + }); +} +function _null2(Class2, params) { + return new Class2({ + type: "null", + ...normalizeParams(params) + }); +} +function _any(Class2) { + return new Class2({ + type: "any" + }); +} +function _unknown(Class2) { + return new Class2({ + type: "unknown" + }); +} +function _never(Class2, params) { + return new Class2({ + type: "never", + ...normalizeParams(params) + }); +} +function _void(Class2, params) { + return new Class2({ + type: "void", + ...normalizeParams(params) + }); +} +function _date(Class2, params) { + return new Class2({ + type: "date", + ...normalizeParams(params) + }); +} +function _coercedDate(Class2, params) { + return new Class2({ + type: "date", + coerce: true, + ...normalizeParams(params) + }); +} +function _nan(Class2, params) { + return new Class2({ + type: "nan", + ...normalizeParams(params) + }); +} +function _lt(value, params) { + return new $ZodCheckLessThan({ + check: "less_than", + ...normalizeParams(params), + value, + inclusive: false + }); +} +function _lte(value, params) { + return new $ZodCheckLessThan({ + check: "less_than", + ...normalizeParams(params), + value, + inclusive: true + }); +} +function _gt(value, params) { + return new $ZodCheckGreaterThan({ + check: "greater_than", + ...normalizeParams(params), + value, + inclusive: false + }); +} +function _gte(value, params) { + return new $ZodCheckGreaterThan({ + check: "greater_than", + ...normalizeParams(params), + value, + inclusive: true + }); +} +function _positive(params) { + return _gt(0, params); +} +function _negative(params) { + return _lt(0, params); +} +function _nonpositive(params) { + return _lte(0, params); +} +function _nonnegative(params) { + return _gte(0, params); +} +function _multipleOf(value, params) { + return new $ZodCheckMultipleOf({ + check: "multiple_of", + ...normalizeParams(params), + value + }); +} +function _maxSize(maximum, params) { + return new $ZodCheckMaxSize({ + check: "max_size", + ...normalizeParams(params), + maximum + }); +} +function _minSize(minimum, params) { + return new $ZodCheckMinSize({ + check: "min_size", + ...normalizeParams(params), + minimum + }); +} +function _size(size, params) { + return new $ZodCheckSizeEquals({ + check: "size_equals", + ...normalizeParams(params), + size + }); +} +function _maxLength(maximum, params) { + const ch2 = new $ZodCheckMaxLength({ + check: "max_length", + ...normalizeParams(params), + maximum + }); + return ch2; +} +function _minLength(minimum, params) { + return new $ZodCheckMinLength({ + check: "min_length", + ...normalizeParams(params), + minimum + }); +} +function _length(length, params) { + return new $ZodCheckLengthEquals({ + check: "length_equals", + ...normalizeParams(params), + length + }); +} +function _regex(pattern, params) { + return new $ZodCheckRegex({ + check: "string_format", + format: "regex", + ...normalizeParams(params), + pattern + }); +} +function _lowercase(params) { + return new $ZodCheckLowerCase({ + check: "string_format", + format: "lowercase", + ...normalizeParams(params) + }); +} +function _uppercase(params) { + return new $ZodCheckUpperCase({ + check: "string_format", + format: "uppercase", + ...normalizeParams(params) + }); +} +function _includes(includes, params) { + return new $ZodCheckIncludes({ + check: "string_format", + format: "includes", + ...normalizeParams(params), + includes + }); +} +function _startsWith(prefix, params) { + return new $ZodCheckStartsWith({ + check: "string_format", + format: "starts_with", + ...normalizeParams(params), + prefix + }); +} +function _endsWith(suffix, params) { + return new $ZodCheckEndsWith({ + check: "string_format", + format: "ends_with", + ...normalizeParams(params), + suffix + }); +} +function _property(property, schema, params) { + return new $ZodCheckProperty({ + check: "property", + property, + schema, + ...normalizeParams(params) + }); +} +function _mime(types, params) { + return new $ZodCheckMimeType({ + check: "mime_type", + mime: types, + ...normalizeParams(params) + }); +} +function _overwrite(tx) { + return new $ZodCheckOverwrite({ + check: "overwrite", + tx + }); +} +function _normalize(form) { + return _overwrite((input) => input.normalize(form)); +} +function _trim() { + return _overwrite((input) => input.trim()); +} +function _toLowerCase() { + return _overwrite((input) => input.toLowerCase()); +} +function _toUpperCase() { + return _overwrite((input) => input.toUpperCase()); +} +function _slugify() { + return _overwrite((input) => slugify(input)); +} +function _array(Class2, element, params) { + return new Class2({ + type: "array", + element, + // get element() { + // return element; + // }, + ...normalizeParams(params) + }); +} +function _union(Class2, options, params) { + return new Class2({ + type: "union", + options, + ...normalizeParams(params) + }); +} +function _xor(Class2, options, params) { + return new Class2({ + type: "union", + options, + inclusive: false, + ...normalizeParams(params) + }); +} +function _discriminatedUnion(Class2, discriminator, options, params) { + return new Class2({ + type: "union", + options, + discriminator, + ...normalizeParams(params) + }); +} +function _intersection(Class2, left, right) { + return new Class2({ + type: "intersection", + left, + right + }); +} +function _tuple(Class2, items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new Class2({ + type: "tuple", + items, + rest, + ...normalizeParams(params) + }); +} +function _record(Class2, keyType, valueType, params) { + return new Class2({ + type: "record", + keyType, + valueType, + ...normalizeParams(params) + }); +} +function _map(Class2, keyType, valueType, params) { + return new Class2({ + type: "map", + keyType, + valueType, + ...normalizeParams(params) + }); +} +function _set(Class2, valueType, params) { + return new Class2({ + type: "set", + valueType, + ...normalizeParams(params) + }); +} +function _enum(Class2, values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v3) => [v3, v3])) : values; + return new Class2({ + type: "enum", + entries, + ...normalizeParams(params) + }); +} +function _nativeEnum(Class2, entries, params) { + return new Class2({ + type: "enum", + entries, + ...normalizeParams(params) + }); +} +function _literal(Class2, value, params) { + return new Class2({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...normalizeParams(params) + }); +} +function _file(Class2, params) { + return new Class2({ + type: "file", + ...normalizeParams(params) + }); +} +function _transform(Class2, fn) { + return new Class2({ + type: "transform", + transform: fn + }); +} +function _optional(Class2, innerType) { + return new Class2({ + type: "optional", + innerType + }); +} +function _nullable(Class2, innerType) { + return new Class2({ + type: "nullable", + innerType + }); +} +function _default(Class2, innerType, defaultValue) { + return new Class2({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue); + } + }); +} +function _nonoptional(Class2, innerType, params) { + return new Class2({ + type: "nonoptional", + innerType, + ...normalizeParams(params) + }); +} +function _success(Class2, innerType) { + return new Class2({ + type: "success", + innerType + }); +} +function _catch(Class2, innerType, catchValue) { + return new Class2({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +function _pipe(Class2, in_, out) { + return new Class2({ + type: "pipe", + in: in_, + out + }); +} +function _readonly(Class2, innerType) { + return new Class2({ + type: "readonly", + innerType + }); +} +function _templateLiteral(Class2, parts, params) { + return new Class2({ + type: "template_literal", + parts, + ...normalizeParams(params) + }); +} +function _lazy(Class2, getter) { + return new Class2({ + type: "lazy", + getter + }); +} +function _promise(Class2, innerType) { + return new Class2({ + type: "promise", + innerType + }); +} +function _custom(Class2, fn, _params) { + const norm = normalizeParams(_params); + norm.abort ?? (norm.abort = true); + const schema = new Class2({ + type: "custom", + check: "custom", + fn, + ...norm + }); + return schema; +} +function _refine(Class2, fn, _params) { + const schema = new Class2({ + type: "custom", + check: "custom", + fn, + ...normalizeParams(_params) + }); + return schema; +} +function _superRefine(fn) { + const ch2 = _check((payload) => { + payload.addIssue = (issue2) => { + if (typeof issue2 === "string") { + payload.issues.push(issue(issue2, payload.value, ch2._zod.def)); + } else { + const _issue = issue2; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = ch2); + _issue.continue ?? (_issue.continue = !ch2._zod.def.abort); + payload.issues.push(issue(_issue)); + } + }; + return fn(payload.value, payload); + }); + return ch2; +} +function _check(fn, params) { + const ch2 = new $ZodCheck({ + check: "custom", + ...normalizeParams(params) + }); + ch2._zod.check = fn; + return ch2; +} +function describe(description) { + const ch2 = new $ZodCheck({ check: "describe" }); + ch2._zod.onattach = [ + (inst) => { + const existing = globalRegistry.get(inst) ?? {}; + globalRegistry.add(inst, { ...existing, description }); + } + ]; + ch2._zod.check = () => { + }; + return ch2; +} +function meta(metadata) { + const ch2 = new $ZodCheck({ check: "meta" }); + ch2._zod.onattach = [ + (inst) => { + const existing = globalRegistry.get(inst) ?? {}; + globalRegistry.add(inst, { ...existing, ...metadata }); + } + ]; + ch2._zod.check = () => { + }; + return ch2; +} +function _stringbool(Classes, _params) { + const params = normalizeParams(_params); + let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"]; + let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"]; + if (params.case !== "sensitive") { + truthyArray = truthyArray.map((v3) => typeof v3 === "string" ? v3.toLowerCase() : v3); + falsyArray = falsyArray.map((v3) => typeof v3 === "string" ? v3.toLowerCase() : v3); + } + const truthySet = new Set(truthyArray); + const falsySet = new Set(falsyArray); + const _Codec = Classes.Codec ?? $ZodCodec; + const _Boolean = Classes.Boolean ?? $ZodBoolean; + const _String = Classes.String ?? $ZodString; + const stringSchema = new _String({ type: "string", error: params.error }); + const booleanSchema = new _Boolean({ type: "boolean", error: params.error }); + const codec2 = new _Codec({ + type: "pipe", + in: stringSchema, + out: booleanSchema, + transform: (input, payload) => { + let data = input; + if (params.case !== "sensitive") + data = data.toLowerCase(); + if (truthySet.has(data)) { + return true; + } else if (falsySet.has(data)) { + return false; + } else { + payload.issues.push({ + code: "invalid_value", + expected: "stringbool", + values: [...truthySet, ...falsySet], + input: payload.value, + inst: codec2, + continue: false + }); + return {}; + } + }, + reverseTransform: (input, _payload) => { + if (input === true) { + return truthyArray[0] || "true"; + } else { + return falsyArray[0] || "false"; + } + }, + error: params.error + }); + return codec2; +} +function _stringFormat(Class2, format2, fnOrRegex, _params = {}) { + const params = normalizeParams(_params); + const def = { + ...normalizeParams(_params), + check: "string_format", + type: "string", + format: format2, + fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val), + ...params + }; + if (fnOrRegex instanceof RegExp) { + def.pattern = fnOrRegex; + } + const inst = new Class2(def); + return inst; +} +var TimePrecision; +var init_api = __esm({ + "../../node_modules/zod/v4/core/api.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_checks2(); + init_registries(); + init_schemas(); + init_util3(); + __name(_string, "_string"); + __name(_coercedString, "_coercedString"); + __name(_email, "_email"); + __name(_guid, "_guid"); + __name(_uuid, "_uuid"); + __name(_uuidv4, "_uuidv4"); + __name(_uuidv6, "_uuidv6"); + __name(_uuidv7, "_uuidv7"); + __name(_url, "_url"); + __name(_emoji2, "_emoji"); + __name(_nanoid, "_nanoid"); + __name(_cuid, "_cuid"); + __name(_cuid2, "_cuid2"); + __name(_ulid, "_ulid"); + __name(_xid, "_xid"); + __name(_ksuid, "_ksuid"); + __name(_ipv4, "_ipv4"); + __name(_ipv6, "_ipv6"); + __name(_mac, "_mac"); + __name(_cidrv4, "_cidrv4"); + __name(_cidrv6, "_cidrv6"); + __name(_base64, "_base64"); + __name(_base64url, "_base64url"); + __name(_e164, "_e164"); + __name(_jwt, "_jwt"); + TimePrecision = { + Any: null, + Minute: -1, + Second: 0, + Millisecond: 3, + Microsecond: 6 + }; + __name(_isoDateTime, "_isoDateTime"); + __name(_isoDate, "_isoDate"); + __name(_isoTime, "_isoTime"); + __name(_isoDuration, "_isoDuration"); + __name(_number, "_number"); + __name(_coercedNumber, "_coercedNumber"); + __name(_int, "_int"); + __name(_float32, "_float32"); + __name(_float64, "_float64"); + __name(_int32, "_int32"); + __name(_uint32, "_uint32"); + __name(_boolean, "_boolean"); + __name(_coercedBoolean, "_coercedBoolean"); + __name(_bigint, "_bigint"); + __name(_coercedBigint, "_coercedBigint"); + __name(_int64, "_int64"); + __name(_uint64, "_uint64"); + __name(_symbol, "_symbol"); + __name(_undefined2, "_undefined"); + __name(_null2, "_null"); + __name(_any, "_any"); + __name(_unknown, "_unknown"); + __name(_never, "_never"); + __name(_void, "_void"); + __name(_date, "_date"); + __name(_coercedDate, "_coercedDate"); + __name(_nan, "_nan"); + __name(_lt, "_lt"); + __name(_lte, "_lte"); + __name(_gt, "_gt"); + __name(_gte, "_gte"); + __name(_positive, "_positive"); + __name(_negative, "_negative"); + __name(_nonpositive, "_nonpositive"); + __name(_nonnegative, "_nonnegative"); + __name(_multipleOf, "_multipleOf"); + __name(_maxSize, "_maxSize"); + __name(_minSize, "_minSize"); + __name(_size, "_size"); + __name(_maxLength, "_maxLength"); + __name(_minLength, "_minLength"); + __name(_length, "_length"); + __name(_regex, "_regex"); + __name(_lowercase, "_lowercase"); + __name(_uppercase, "_uppercase"); + __name(_includes, "_includes"); + __name(_startsWith, "_startsWith"); + __name(_endsWith, "_endsWith"); + __name(_property, "_property"); + __name(_mime, "_mime"); + __name(_overwrite, "_overwrite"); + __name(_normalize, "_normalize"); + __name(_trim, "_trim"); + __name(_toLowerCase, "_toLowerCase"); + __name(_toUpperCase, "_toUpperCase"); + __name(_slugify, "_slugify"); + __name(_array, "_array"); + __name(_union, "_union"); + __name(_xor, "_xor"); + __name(_discriminatedUnion, "_discriminatedUnion"); + __name(_intersection, "_intersection"); + __name(_tuple, "_tuple"); + __name(_record, "_record"); + __name(_map, "_map"); + __name(_set, "_set"); + __name(_enum, "_enum"); + __name(_nativeEnum, "_nativeEnum"); + __name(_literal, "_literal"); + __name(_file, "_file"); + __name(_transform, "_transform"); + __name(_optional, "_optional"); + __name(_nullable, "_nullable"); + __name(_default, "_default"); + __name(_nonoptional, "_nonoptional"); + __name(_success, "_success"); + __name(_catch, "_catch"); + __name(_pipe, "_pipe"); + __name(_readonly, "_readonly"); + __name(_templateLiteral, "_templateLiteral"); + __name(_lazy, "_lazy"); + __name(_promise, "_promise"); + __name(_custom, "_custom"); + __name(_refine, "_refine"); + __name(_superRefine, "_superRefine"); + __name(_check, "_check"); + __name(describe, "describe"); + __name(meta, "meta"); + __name(_stringbool, "_stringbool"); + __name(_stringFormat, "_stringFormat"); + } +}); + +// ../../node_modules/zod/v4/core/to-json-schema.js +function initializeContext(params) { + let target = params?.target ?? "draft-2020-12"; + if (target === "draft-4") + target = "draft-04"; + if (target === "draft-7") + target = "draft-07"; + return { + processors: params.processors ?? {}, + metadataRegistry: params?.metadata ?? globalRegistry, + target, + unrepresentable: params?.unrepresentable ?? "throw", + override: params?.override ?? (() => { + }), + io: params?.io ?? "output", + counter: 0, + seen: /* @__PURE__ */ new Map(), + cycles: params?.cycles ?? "ref", + reused: params?.reused ?? "inline", + external: params?.external ?? void 0 + }; +} +function process2(schema, ctx, _params = { path: [], schemaPath: [] }) { + var _a124; + const def = schema._zod.def; + const seen = ctx.seen.get(schema); + if (seen) { + seen.count++; + const isCycle = _params.schemaPath.includes(schema); + if (isCycle) { + seen.cycle = _params.path; + } + return seen.schema; + } + const result = { schema: {}, count: 1, cycle: void 0, path: _params.path }; + ctx.seen.set(schema, result); + const overrideSchema = schema._zod.toJSONSchema?.(); + if (overrideSchema) { + result.schema = overrideSchema; + } else { + const params = { + ..._params, + schemaPath: [..._params.schemaPath, schema], + path: _params.path + }; + if (schema._zod.processJSONSchema) { + schema._zod.processJSONSchema(ctx, result.schema, params); + } else { + const _json = result.schema; + const processor = ctx.processors[def.type]; + if (!processor) { + throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`); + } + processor(schema, ctx, _json, params); + } + const parent = schema._zod.parent; + if (parent) { + if (!result.ref) + result.ref = parent; + process2(parent, ctx, params); + ctx.seen.get(parent).isParent = true; + } + } + const meta3 = ctx.metadataRegistry.get(schema); + if (meta3) + Object.assign(result.schema, meta3); + if (ctx.io === "input" && isTransforming(schema)) { + delete result.schema.examples; + delete result.schema.default; + } + if (ctx.io === "input" && result.schema._prefault) + (_a124 = result.schema).default ?? (_a124.default = result.schema._prefault); + delete result.schema._prefault; + const _result = ctx.seen.get(schema); + return _result.schema; +} +function extractDefs(ctx, schema) { + const root = ctx.seen.get(schema); + if (!root) + throw new Error("Unprocessed schema. This is a bug in Zod."); + const idToSchema = /* @__PURE__ */ new Map(); + for (const entry of ctx.seen.entries()) { + const id = ctx.metadataRegistry.get(entry[0])?.id; + if (id) { + const existing = idToSchema.get(id); + if (existing && existing !== entry[0]) { + throw new Error(`Duplicate schema id "${id}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`); + } + idToSchema.set(id, entry[0]); + } + } + const makeURI = /* @__PURE__ */ __name((entry) => { + const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions"; + if (ctx.external) { + const externalId = ctx.external.registry.get(entry[0])?.id; + const uriGenerator = ctx.external.uri ?? ((id2) => id2); + if (externalId) { + return { ref: uriGenerator(externalId) }; + } + const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`; + entry[1].defId = id; + return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` }; + } + if (entry[1] === root) { + return { ref: "#" }; + } + const uriPrefix = `#`; + const defUriPrefix = `${uriPrefix}/${defsSegment}/`; + const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`; + return { defId, ref: defUriPrefix + defId }; + }, "makeURI"); + const extractToDef = /* @__PURE__ */ __name((entry) => { + if (entry[1].schema.$ref) { + return; + } + const seen = entry[1]; + const { ref, defId } = makeURI(entry); + seen.def = { ...seen.schema }; + if (defId) + seen.defId = defId; + const schema2 = seen.schema; + for (const key in schema2) { + delete schema2[key]; + } + schema2.$ref = ref; + }, "extractToDef"); + if (ctx.cycles === "throw") { + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (seen.cycle) { + throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); + } + } + } + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (schema === entry[0]) { + extractToDef(entry); + continue; + } + if (ctx.external) { + const ext = ctx.external.registry.get(entry[0])?.id; + if (schema !== entry[0] && ext) { + extractToDef(entry); + continue; + } + } + const id = ctx.metadataRegistry.get(entry[0])?.id; + if (id) { + extractToDef(entry); + continue; + } + if (seen.cycle) { + extractToDef(entry); + continue; + } + if (seen.count > 1) { + if (ctx.reused === "ref") { + extractToDef(entry); + continue; + } + } + } +} +function finalize(ctx, schema) { + const root = ctx.seen.get(schema); + if (!root) + throw new Error("Unprocessed schema. This is a bug in Zod."); + const flattenRef = /* @__PURE__ */ __name((zodSchema) => { + const seen = ctx.seen.get(zodSchema); + if (seen.ref === null) + return; + const schema2 = seen.def ?? seen.schema; + const _cached = { ...schema2 }; + const ref = seen.ref; + seen.ref = null; + if (ref) { + flattenRef(ref); + const refSeen = ctx.seen.get(ref); + const refSchema = refSeen.schema; + if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) { + schema2.allOf = schema2.allOf ?? []; + schema2.allOf.push(refSchema); + } else { + Object.assign(schema2, refSchema); + } + Object.assign(schema2, _cached); + const isParentRef = zodSchema._zod.parent === ref; + if (isParentRef) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (!(key in _cached)) { + delete schema2[key]; + } + } + } + if (refSchema.$ref && refSeen.def) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (key in refSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(refSeen.def[key])) { + delete schema2[key]; + } + } + } + } + const parent = zodSchema._zod.parent; + if (parent && parent !== ref) { + flattenRef(parent); + const parentSeen = ctx.seen.get(parent); + if (parentSeen?.schema.$ref) { + schema2.$ref = parentSeen.schema.$ref; + if (parentSeen.def) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (key in parentSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(parentSeen.def[key])) { + delete schema2[key]; + } + } + } + } + } + ctx.override({ + zodSchema, + jsonSchema: schema2, + path: seen.path ?? [] + }); + }, "flattenRef"); + for (const entry of [...ctx.seen.entries()].reverse()) { + flattenRef(entry[0]); + } + const result = {}; + if (ctx.target === "draft-2020-12") { + result.$schema = "https://json-schema.org/draft/2020-12/schema"; + } else if (ctx.target === "draft-07") { + result.$schema = "http://json-schema.org/draft-07/schema#"; + } else if (ctx.target === "draft-04") { + result.$schema = "http://json-schema.org/draft-04/schema#"; + } else if (ctx.target === "openapi-3.0") { + } else { + } + if (ctx.external?.uri) { + const id = ctx.external.registry.get(schema)?.id; + if (!id) + throw new Error("Schema is missing an `id` property"); + result.$id = ctx.external.uri(id); + } + Object.assign(result, root.def ?? root.schema); + const defs = ctx.external?.defs ?? {}; + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (seen.def && seen.defId) { + defs[seen.defId] = seen.def; + } + } + if (ctx.external) { + } else { + if (Object.keys(defs).length > 0) { + if (ctx.target === "draft-2020-12") { + result.$defs = defs; + } else { + result.definitions = defs; + } + } + } + try { + const finalized = JSON.parse(JSON.stringify(result)); + Object.defineProperty(finalized, "~standard", { + value: { + ...schema["~standard"], + jsonSchema: { + input: createStandardJSONSchemaMethod(schema, "input", ctx.processors), + output: createStandardJSONSchemaMethod(schema, "output", ctx.processors) + } + }, + enumerable: false, + writable: false + }); + return finalized; + } catch (_err) { + throw new Error("Error converting schema to JSON."); + } +} +function isTransforming(_schema, _ctx) { + const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() }; + if (ctx.seen.has(_schema)) + return false; + ctx.seen.add(_schema); + const def = _schema._zod.def; + if (def.type === "transform") + return true; + if (def.type === "array") + return isTransforming(def.element, ctx); + if (def.type === "set") + return isTransforming(def.valueType, ctx); + if (def.type === "lazy") + return isTransforming(def.getter(), ctx); + if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") { + return isTransforming(def.innerType, ctx); + } + if (def.type === "intersection") { + return isTransforming(def.left, ctx) || isTransforming(def.right, ctx); + } + if (def.type === "record" || def.type === "map") { + return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx); + } + if (def.type === "pipe") { + return isTransforming(def.in, ctx) || isTransforming(def.out, ctx); + } + if (def.type === "object") { + for (const key in def.shape) { + if (isTransforming(def.shape[key], ctx)) + return true; + } + return false; + } + if (def.type === "union") { + for (const option of def.options) { + if (isTransforming(option, ctx)) + return true; + } + return false; + } + if (def.type === "tuple") { + for (const item of def.items) { + if (isTransforming(item, ctx)) + return true; + } + if (def.rest && isTransforming(def.rest, ctx)) + return true; + return false; + } + return false; +} +var createToJSONSchemaMethod, createStandardJSONSchemaMethod; +var init_to_json_schema = __esm({ + "../../node_modules/zod/v4/core/to-json-schema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_registries(); + __name(initializeContext, "initializeContext"); + __name(process2, "process"); + __name(extractDefs, "extractDefs"); + __name(finalize, "finalize"); + __name(isTransforming, "isTransforming"); + createToJSONSchemaMethod = /* @__PURE__ */ __name((schema, processors = {}) => (params) => { + const ctx = initializeContext({ ...params, processors }); + process2(schema, ctx); + extractDefs(ctx, schema); + return finalize(ctx, schema); + }, "createToJSONSchemaMethod"); + createStandardJSONSchemaMethod = /* @__PURE__ */ __name((schema, io, processors = {}) => (params) => { + const { libraryOptions, target } = params ?? {}; + const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors }); + process2(schema, ctx); + extractDefs(ctx, schema); + return finalize(ctx, schema); + }, "createStandardJSONSchemaMethod"); + } +}); + +// ../../node_modules/zod/v4/core/json-schema-processors.js +function toJSONSchema(input, params) { + if ("_idmap" in input) { + const registry2 = input; + const ctx2 = initializeContext({ ...params, processors: allProcessors }); + const defs = {}; + for (const entry of registry2._idmap.entries()) { + const [_, schema] = entry; + process2(schema, ctx2); + } + const schemas = {}; + const external = { + registry: registry2, + uri: params?.uri, + defs + }; + ctx2.external = external; + for (const entry of registry2._idmap.entries()) { + const [key, schema] = entry; + extractDefs(ctx2, schema); + schemas[key] = finalize(ctx2, schema); + } + if (Object.keys(defs).length > 0) { + const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions"; + schemas.__shared = { + [defsSegment]: defs + }; + } + return { schemas }; + } + const ctx = initializeContext({ ...params, processors: allProcessors }); + process2(input, ctx); + extractDefs(ctx, input); + return finalize(ctx, input); +} +var formatMap, stringProcessor, numberProcessor, booleanProcessor, bigintProcessor, symbolProcessor, nullProcessor, undefinedProcessor, voidProcessor, neverProcessor, anyProcessor, unknownProcessor, dateProcessor, enumProcessor, literalProcessor, nanProcessor, templateLiteralProcessor, fileProcessor, successProcessor, customProcessor, functionProcessor, transformProcessor, mapProcessor, setProcessor, arrayProcessor, objectProcessor, unionProcessor, intersectionProcessor, tupleProcessor, recordProcessor, nullableProcessor, nonoptionalProcessor, defaultProcessor, prefaultProcessor, catchProcessor, pipeProcessor, readonlyProcessor, promiseProcessor, optionalProcessor, lazyProcessor, allProcessors; +var init_json_schema_processors = __esm({ + "../../node_modules/zod/v4/core/json-schema-processors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_to_json_schema(); + init_util3(); + formatMap = { + guid: "uuid", + url: "uri", + datetime: "date-time", + json_string: "json-string", + regex: "" + // do not set + }; + stringProcessor = /* @__PURE__ */ __name((schema, ctx, _json, _params) => { + const json2 = _json; + json2.type = "string"; + const { minimum, maximum, format: format2, patterns, contentEncoding } = schema._zod.bag; + if (typeof minimum === "number") + json2.minLength = minimum; + if (typeof maximum === "number") + json2.maxLength = maximum; + if (format2) { + json2.format = formatMap[format2] ?? format2; + if (json2.format === "") + delete json2.format; + if (format2 === "time") { + delete json2.format; + } + } + if (contentEncoding) + json2.contentEncoding = contentEncoding; + if (patterns && patterns.size > 0) { + const regexes = [...patterns]; + if (regexes.length === 1) + json2.pattern = regexes[0].source; + else if (regexes.length > 1) { + json2.allOf = [ + ...regexes.map((regex) => ({ + ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {}, + pattern: regex.source + })) + ]; + } + } + }, "stringProcessor"); + numberProcessor = /* @__PURE__ */ __name((schema, ctx, _json, _params) => { + const json2 = _json; + const { minimum, maximum, format: format2, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag; + if (typeof format2 === "string" && format2.includes("int")) + json2.type = "integer"; + else + json2.type = "number"; + if (typeof exclusiveMinimum === "number") { + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json2.minimum = exclusiveMinimum; + json2.exclusiveMinimum = true; + } else { + json2.exclusiveMinimum = exclusiveMinimum; + } + } + if (typeof minimum === "number") { + json2.minimum = minimum; + if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") { + if (exclusiveMinimum >= minimum) + delete json2.minimum; + else + delete json2.exclusiveMinimum; + } + } + if (typeof exclusiveMaximum === "number") { + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json2.maximum = exclusiveMaximum; + json2.exclusiveMaximum = true; + } else { + json2.exclusiveMaximum = exclusiveMaximum; + } + } + if (typeof maximum === "number") { + json2.maximum = maximum; + if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") { + if (exclusiveMaximum <= maximum) + delete json2.maximum; + else + delete json2.exclusiveMaximum; + } + } + if (typeof multipleOf === "number") + json2.multipleOf = multipleOf; + }, "numberProcessor"); + booleanProcessor = /* @__PURE__ */ __name((_schema, _ctx, json2, _params) => { + json2.type = "boolean"; + }, "booleanProcessor"); + bigintProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("BigInt cannot be represented in JSON Schema"); + } + }, "bigintProcessor"); + symbolProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Symbols cannot be represented in JSON Schema"); + } + }, "symbolProcessor"); + nullProcessor = /* @__PURE__ */ __name((_schema, ctx, json2, _params) => { + if (ctx.target === "openapi-3.0") { + json2.type = "string"; + json2.nullable = true; + json2.enum = [null]; + } else { + json2.type = "null"; + } + }, "nullProcessor"); + undefinedProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Undefined cannot be represented in JSON Schema"); + } + }, "undefinedProcessor"); + voidProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Void cannot be represented in JSON Schema"); + } + }, "voidProcessor"); + neverProcessor = /* @__PURE__ */ __name((_schema, _ctx, json2, _params) => { + json2.not = {}; + }, "neverProcessor"); + anyProcessor = /* @__PURE__ */ __name((_schema, _ctx, _json, _params) => { + }, "anyProcessor"); + unknownProcessor = /* @__PURE__ */ __name((_schema, _ctx, _json, _params) => { + }, "unknownProcessor"); + dateProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Date cannot be represented in JSON Schema"); + } + }, "dateProcessor"); + enumProcessor = /* @__PURE__ */ __name((schema, _ctx, json2, _params) => { + const def = schema._zod.def; + const values = getEnumValues(def.entries); + if (values.every((v3) => typeof v3 === "number")) + json2.type = "number"; + if (values.every((v3) => typeof v3 === "string")) + json2.type = "string"; + json2.enum = values; + }, "enumProcessor"); + literalProcessor = /* @__PURE__ */ __name((schema, ctx, json2, _params) => { + const def = schema._zod.def; + const vals = []; + for (const val of def.values) { + if (val === void 0) { + if (ctx.unrepresentable === "throw") { + throw new Error("Literal `undefined` cannot be represented in JSON Schema"); + } else { + } + } else if (typeof val === "bigint") { + if (ctx.unrepresentable === "throw") { + throw new Error("BigInt literals cannot be represented in JSON Schema"); + } else { + vals.push(Number(val)); + } + } else { + vals.push(val); + } + } + if (vals.length === 0) { + } else if (vals.length === 1) { + const val = vals[0]; + json2.type = val === null ? "null" : typeof val; + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json2.enum = [val]; + } else { + json2.const = val; + } + } else { + if (vals.every((v3) => typeof v3 === "number")) + json2.type = "number"; + if (vals.every((v3) => typeof v3 === "string")) + json2.type = "string"; + if (vals.every((v3) => typeof v3 === "boolean")) + json2.type = "boolean"; + if (vals.every((v3) => v3 === null)) + json2.type = "null"; + json2.enum = vals; + } + }, "literalProcessor"); + nanProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("NaN cannot be represented in JSON Schema"); + } + }, "nanProcessor"); + templateLiteralProcessor = /* @__PURE__ */ __name((schema, _ctx, json2, _params) => { + const _json = json2; + const pattern = schema._zod.pattern; + if (!pattern) + throw new Error("Pattern not found in template literal"); + _json.type = "string"; + _json.pattern = pattern.source; + }, "templateLiteralProcessor"); + fileProcessor = /* @__PURE__ */ __name((schema, _ctx, json2, _params) => { + const _json = json2; + const file2 = { + type: "string", + format: "binary", + contentEncoding: "binary" + }; + const { minimum, maximum, mime } = schema._zod.bag; + if (minimum !== void 0) + file2.minLength = minimum; + if (maximum !== void 0) + file2.maxLength = maximum; + if (mime) { + if (mime.length === 1) { + file2.contentMediaType = mime[0]; + Object.assign(_json, file2); + } else { + Object.assign(_json, file2); + _json.anyOf = mime.map((m2) => ({ contentMediaType: m2 })); + } + } else { + Object.assign(_json, file2); + } + }, "fileProcessor"); + successProcessor = /* @__PURE__ */ __name((_schema, _ctx, json2, _params) => { + json2.type = "boolean"; + }, "successProcessor"); + customProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Custom types cannot be represented in JSON Schema"); + } + }, "customProcessor"); + functionProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Function types cannot be represented in JSON Schema"); + } + }, "functionProcessor"); + transformProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Transforms cannot be represented in JSON Schema"); + } + }, "transformProcessor"); + mapProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Map cannot be represented in JSON Schema"); + } + }, "mapProcessor"); + setProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Set cannot be represented in JSON Schema"); + } + }, "setProcessor"); + arrayProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const json2 = _json; + const def = schema._zod.def; + const { minimum, maximum } = schema._zod.bag; + if (typeof minimum === "number") + json2.minItems = minimum; + if (typeof maximum === "number") + json2.maxItems = maximum; + json2.type = "array"; + json2.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] }); + }, "arrayProcessor"); + objectProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const json2 = _json; + const def = schema._zod.def; + json2.type = "object"; + json2.properties = {}; + const shape = def.shape; + for (const key in shape) { + json2.properties[key] = process2(shape[key], ctx, { + ...params, + path: [...params.path, "properties", key] + }); + } + const allKeys = new Set(Object.keys(shape)); + const requiredKeys = new Set([...allKeys].filter((key) => { + const v3 = def.shape[key]._zod; + if (ctx.io === "input") { + return v3.optin === void 0; + } else { + return v3.optout === void 0; + } + })); + if (requiredKeys.size > 0) { + json2.required = Array.from(requiredKeys); + } + if (def.catchall?._zod.def.type === "never") { + json2.additionalProperties = false; + } else if (!def.catchall) { + if (ctx.io === "output") + json2.additionalProperties = false; + } else if (def.catchall) { + json2.additionalProperties = process2(def.catchall, ctx, { + ...params, + path: [...params.path, "additionalProperties"] + }); + } + }, "objectProcessor"); + unionProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + const isExclusive = def.inclusive === false; + const options = def.options.map((x2, i2) => process2(x2, ctx, { + ...params, + path: [...params.path, isExclusive ? "oneOf" : "anyOf", i2] + })); + if (isExclusive) { + json2.oneOf = options; + } else { + json2.anyOf = options; + } + }, "unionProcessor"); + intersectionProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + const a2 = process2(def.left, ctx, { + ...params, + path: [...params.path, "allOf", 0] + }); + const b2 = process2(def.right, ctx, { + ...params, + path: [...params.path, "allOf", 1] + }); + const isSimpleIntersection = /* @__PURE__ */ __name((val) => "allOf" in val && Object.keys(val).length === 1, "isSimpleIntersection"); + const allOf = [ + ...isSimpleIntersection(a2) ? a2.allOf : [a2], + ...isSimpleIntersection(b2) ? b2.allOf : [b2] + ]; + json2.allOf = allOf; + }, "intersectionProcessor"); + tupleProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const json2 = _json; + const def = schema._zod.def; + json2.type = "array"; + const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items"; + const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems"; + const prefixItems = def.items.map((x2, i2) => process2(x2, ctx, { + ...params, + path: [...params.path, prefixPath, i2] + })); + const rest = def.rest ? process2(def.rest, ctx, { + ...params, + path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []] + }) : null; + if (ctx.target === "draft-2020-12") { + json2.prefixItems = prefixItems; + if (rest) { + json2.items = rest; + } + } else if (ctx.target === "openapi-3.0") { + json2.items = { + anyOf: prefixItems + }; + if (rest) { + json2.items.anyOf.push(rest); + } + json2.minItems = prefixItems.length; + if (!rest) { + json2.maxItems = prefixItems.length; + } + } else { + json2.items = prefixItems; + if (rest) { + json2.additionalItems = rest; + } + } + const { minimum, maximum } = schema._zod.bag; + if (typeof minimum === "number") + json2.minItems = minimum; + if (typeof maximum === "number") + json2.maxItems = maximum; + }, "tupleProcessor"); + recordProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const json2 = _json; + const def = schema._zod.def; + json2.type = "object"; + const keyType = def.keyType; + const keyBag = keyType._zod.bag; + const patterns = keyBag?.patterns; + if (def.mode === "loose" && patterns && patterns.size > 0) { + const valueSchema = process2(def.valueType, ctx, { + ...params, + path: [...params.path, "patternProperties", "*"] + }); + json2.patternProperties = {}; + for (const pattern of patterns) { + json2.patternProperties[pattern.source] = valueSchema; + } + } else { + if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") { + json2.propertyNames = process2(def.keyType, ctx, { + ...params, + path: [...params.path, "propertyNames"] + }); + } + json2.additionalProperties = process2(def.valueType, ctx, { + ...params, + path: [...params.path, "additionalProperties"] + }); + } + const keyValues = keyType._zod.values; + if (keyValues) { + const validKeyValues = [...keyValues].filter((v3) => typeof v3 === "string" || typeof v3 === "number"); + if (validKeyValues.length > 0) { + json2.required = validKeyValues; + } + } + }, "recordProcessor"); + nullableProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + const inner = process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + if (ctx.target === "openapi-3.0") { + seen.ref = def.innerType; + json2.nullable = true; + } else { + json2.anyOf = [inner, { type: "null" }]; + } + }, "nullableProcessor"); + nonoptionalProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + }, "nonoptionalProcessor"); + defaultProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + json2.default = JSON.parse(JSON.stringify(def.defaultValue)); + }, "defaultProcessor"); + prefaultProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + if (ctx.io === "input") + json2._prefault = JSON.parse(JSON.stringify(def.defaultValue)); + }, "prefaultProcessor"); + catchProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + let catchValue; + try { + catchValue = def.catchValue(void 0); + } catch { + throw new Error("Dynamic catch values are not supported in JSON Schema"); + } + json2.default = catchValue; + }, "catchProcessor"); + pipeProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const def = schema._zod.def; + const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out; + process2(innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = innerType; + }, "pipeProcessor"); + readonlyProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + json2.readOnly = true; + }, "readonlyProcessor"); + promiseProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + }, "promiseProcessor"); + optionalProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + }, "optionalProcessor"); + lazyProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const innerType = schema._zod.innerType; + process2(innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = innerType; + }, "lazyProcessor"); + allProcessors = { + string: stringProcessor, + number: numberProcessor, + boolean: booleanProcessor, + bigint: bigintProcessor, + symbol: symbolProcessor, + null: nullProcessor, + undefined: undefinedProcessor, + void: voidProcessor, + never: neverProcessor, + any: anyProcessor, + unknown: unknownProcessor, + date: dateProcessor, + enum: enumProcessor, + literal: literalProcessor, + nan: nanProcessor, + template_literal: templateLiteralProcessor, + file: fileProcessor, + success: successProcessor, + custom: customProcessor, + function: functionProcessor, + transform: transformProcessor, + map: mapProcessor, + set: setProcessor, + array: arrayProcessor, + object: objectProcessor, + union: unionProcessor, + intersection: intersectionProcessor, + tuple: tupleProcessor, + record: recordProcessor, + nullable: nullableProcessor, + nonoptional: nonoptionalProcessor, + default: defaultProcessor, + prefault: prefaultProcessor, + catch: catchProcessor, + pipe: pipeProcessor, + readonly: readonlyProcessor, + promise: promiseProcessor, + optional: optionalProcessor, + lazy: lazyProcessor + }; + __name(toJSONSchema, "toJSONSchema"); + } +}); + +// ../../node_modules/zod/v4/core/json-schema-generator.js +var JSONSchemaGenerator; +var init_json_schema_generator = __esm({ + "../../node_modules/zod/v4/core/json-schema-generator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_json_schema_processors(); + init_to_json_schema(); + JSONSchemaGenerator = class { + /** @deprecated Access via ctx instead */ + get metadataRegistry() { + return this.ctx.metadataRegistry; + } + /** @deprecated Access via ctx instead */ + get target() { + return this.ctx.target; + } + /** @deprecated Access via ctx instead */ + get unrepresentable() { + return this.ctx.unrepresentable; + } + /** @deprecated Access via ctx instead */ + get override() { + return this.ctx.override; + } + /** @deprecated Access via ctx instead */ + get io() { + return this.ctx.io; + } + /** @deprecated Access via ctx instead */ + get counter() { + return this.ctx.counter; + } + set counter(value) { + this.ctx.counter = value; + } + /** @deprecated Access via ctx instead */ + get seen() { + return this.ctx.seen; + } + constructor(params) { + let normalizedTarget = params?.target ?? "draft-2020-12"; + if (normalizedTarget === "draft-4") + normalizedTarget = "draft-04"; + if (normalizedTarget === "draft-7") + normalizedTarget = "draft-07"; + this.ctx = initializeContext({ + processors: allProcessors, + target: normalizedTarget, + ...params?.metadata && { metadata: params.metadata }, + ...params?.unrepresentable && { unrepresentable: params.unrepresentable }, + ...params?.override && { override: params.override }, + ...params?.io && { io: params.io } + }); + } + /** + * Process a schema to prepare it for JSON Schema generation. + * This must be called before emit(). + */ + process(schema, _params = { path: [], schemaPath: [] }) { + return process2(schema, this.ctx, _params); + } + /** + * Emit the final JSON Schema after processing. + * Must call process() first. + */ + emit(schema, _params) { + if (_params) { + if (_params.cycles) + this.ctx.cycles = _params.cycles; + if (_params.reused) + this.ctx.reused = _params.reused; + if (_params.external) + this.ctx.external = _params.external; + } + extractDefs(this.ctx, schema); + const result = finalize(this.ctx, schema); + const { "~standard": _, ...plainResult } = result; + return plainResult; + } + }; + __name(JSONSchemaGenerator, "JSONSchemaGenerator"); + } +}); + +// ../../node_modules/zod/v4/core/json-schema.js +var json_schema_exports = {}; +var init_json_schema = __esm({ + "../../node_modules/zod/v4/core/json-schema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/zod/v4/core/index.js +var core_exports2 = {}; +__export(core_exports2, { + $ZodAny: () => $ZodAny, + $ZodArray: () => $ZodArray, + $ZodAsyncError: () => $ZodAsyncError, + $ZodBase64: () => $ZodBase64, + $ZodBase64URL: () => $ZodBase64URL, + $ZodBigInt: () => $ZodBigInt, + $ZodBigIntFormat: () => $ZodBigIntFormat, + $ZodBoolean: () => $ZodBoolean, + $ZodCIDRv4: () => $ZodCIDRv4, + $ZodCIDRv6: () => $ZodCIDRv6, + $ZodCUID: () => $ZodCUID, + $ZodCUID2: () => $ZodCUID2, + $ZodCatch: () => $ZodCatch, + $ZodCheck: () => $ZodCheck, + $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat, + $ZodCheckEndsWith: () => $ZodCheckEndsWith, + $ZodCheckGreaterThan: () => $ZodCheckGreaterThan, + $ZodCheckIncludes: () => $ZodCheckIncludes, + $ZodCheckLengthEquals: () => $ZodCheckLengthEquals, + $ZodCheckLessThan: () => $ZodCheckLessThan, + $ZodCheckLowerCase: () => $ZodCheckLowerCase, + $ZodCheckMaxLength: () => $ZodCheckMaxLength, + $ZodCheckMaxSize: () => $ZodCheckMaxSize, + $ZodCheckMimeType: () => $ZodCheckMimeType, + $ZodCheckMinLength: () => $ZodCheckMinLength, + $ZodCheckMinSize: () => $ZodCheckMinSize, + $ZodCheckMultipleOf: () => $ZodCheckMultipleOf, + $ZodCheckNumberFormat: () => $ZodCheckNumberFormat, + $ZodCheckOverwrite: () => $ZodCheckOverwrite, + $ZodCheckProperty: () => $ZodCheckProperty, + $ZodCheckRegex: () => $ZodCheckRegex, + $ZodCheckSizeEquals: () => $ZodCheckSizeEquals, + $ZodCheckStartsWith: () => $ZodCheckStartsWith, + $ZodCheckStringFormat: () => $ZodCheckStringFormat, + $ZodCheckUpperCase: () => $ZodCheckUpperCase, + $ZodCodec: () => $ZodCodec, + $ZodCustom: () => $ZodCustom, + $ZodCustomStringFormat: () => $ZodCustomStringFormat, + $ZodDate: () => $ZodDate, + $ZodDefault: () => $ZodDefault, + $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion, + $ZodE164: () => $ZodE164, + $ZodEmail: () => $ZodEmail, + $ZodEmoji: () => $ZodEmoji, + $ZodEncodeError: () => $ZodEncodeError, + $ZodEnum: () => $ZodEnum, + $ZodError: () => $ZodError, + $ZodExactOptional: () => $ZodExactOptional, + $ZodFile: () => $ZodFile, + $ZodFunction: () => $ZodFunction, + $ZodGUID: () => $ZodGUID, + $ZodIPv4: () => $ZodIPv4, + $ZodIPv6: () => $ZodIPv6, + $ZodISODate: () => $ZodISODate, + $ZodISODateTime: () => $ZodISODateTime, + $ZodISODuration: () => $ZodISODuration, + $ZodISOTime: () => $ZodISOTime, + $ZodIntersection: () => $ZodIntersection, + $ZodJWT: () => $ZodJWT, + $ZodKSUID: () => $ZodKSUID, + $ZodLazy: () => $ZodLazy, + $ZodLiteral: () => $ZodLiteral, + $ZodMAC: () => $ZodMAC, + $ZodMap: () => $ZodMap, + $ZodNaN: () => $ZodNaN, + $ZodNanoID: () => $ZodNanoID, + $ZodNever: () => $ZodNever, + $ZodNonOptional: () => $ZodNonOptional, + $ZodNull: () => $ZodNull, + $ZodNullable: () => $ZodNullable, + $ZodNumber: () => $ZodNumber, + $ZodNumberFormat: () => $ZodNumberFormat, + $ZodObject: () => $ZodObject, + $ZodObjectJIT: () => $ZodObjectJIT, + $ZodOptional: () => $ZodOptional, + $ZodPipe: () => $ZodPipe, + $ZodPrefault: () => $ZodPrefault, + $ZodPromise: () => $ZodPromise, + $ZodReadonly: () => $ZodReadonly, + $ZodRealError: () => $ZodRealError, + $ZodRecord: () => $ZodRecord, + $ZodRegistry: () => $ZodRegistry, + $ZodSet: () => $ZodSet, + $ZodString: () => $ZodString, + $ZodStringFormat: () => $ZodStringFormat, + $ZodSuccess: () => $ZodSuccess, + $ZodSymbol: () => $ZodSymbol, + $ZodTemplateLiteral: () => $ZodTemplateLiteral, + $ZodTransform: () => $ZodTransform, + $ZodTuple: () => $ZodTuple, + $ZodType: () => $ZodType, + $ZodULID: () => $ZodULID, + $ZodURL: () => $ZodURL, + $ZodUUID: () => $ZodUUID, + $ZodUndefined: () => $ZodUndefined, + $ZodUnion: () => $ZodUnion, + $ZodUnknown: () => $ZodUnknown, + $ZodVoid: () => $ZodVoid, + $ZodXID: () => $ZodXID, + $ZodXor: () => $ZodXor, + $brand: () => $brand, + $constructor: () => $constructor, + $input: () => $input, + $output: () => $output, + Doc: () => Doc, + JSONSchema: () => json_schema_exports, + JSONSchemaGenerator: () => JSONSchemaGenerator, + NEVER: () => NEVER, + TimePrecision: () => TimePrecision, + _any: () => _any, + _array: () => _array, + _base64: () => _base64, + _base64url: () => _base64url, + _bigint: () => _bigint, + _boolean: () => _boolean, + _catch: () => _catch, + _check: () => _check, + _cidrv4: () => _cidrv4, + _cidrv6: () => _cidrv6, + _coercedBigint: () => _coercedBigint, + _coercedBoolean: () => _coercedBoolean, + _coercedDate: () => _coercedDate, + _coercedNumber: () => _coercedNumber, + _coercedString: () => _coercedString, + _cuid: () => _cuid, + _cuid2: () => _cuid2, + _custom: () => _custom, + _date: () => _date, + _decode: () => _decode, + _decodeAsync: () => _decodeAsync, + _default: () => _default, + _discriminatedUnion: () => _discriminatedUnion, + _e164: () => _e164, + _email: () => _email, + _emoji: () => _emoji2, + _encode: () => _encode, + _encodeAsync: () => _encodeAsync, + _endsWith: () => _endsWith, + _enum: () => _enum, + _file: () => _file, + _float32: () => _float32, + _float64: () => _float64, + _gt: () => _gt, + _gte: () => _gte, + _guid: () => _guid, + _includes: () => _includes, + _int: () => _int, + _int32: () => _int32, + _int64: () => _int64, + _intersection: () => _intersection, + _ipv4: () => _ipv4, + _ipv6: () => _ipv6, + _isoDate: () => _isoDate, + _isoDateTime: () => _isoDateTime, + _isoDuration: () => _isoDuration, + _isoTime: () => _isoTime, + _jwt: () => _jwt, + _ksuid: () => _ksuid, + _lazy: () => _lazy, + _length: () => _length, + _literal: () => _literal, + _lowercase: () => _lowercase, + _lt: () => _lt, + _lte: () => _lte, + _mac: () => _mac, + _map: () => _map, + _max: () => _lte, + _maxLength: () => _maxLength, + _maxSize: () => _maxSize, + _mime: () => _mime, + _min: () => _gte, + _minLength: () => _minLength, + _minSize: () => _minSize, + _multipleOf: () => _multipleOf, + _nan: () => _nan, + _nanoid: () => _nanoid, + _nativeEnum: () => _nativeEnum, + _negative: () => _negative, + _never: () => _never, + _nonnegative: () => _nonnegative, + _nonoptional: () => _nonoptional, + _nonpositive: () => _nonpositive, + _normalize: () => _normalize, + _null: () => _null2, + _nullable: () => _nullable, + _number: () => _number, + _optional: () => _optional, + _overwrite: () => _overwrite, + _parse: () => _parse, + _parseAsync: () => _parseAsync, + _pipe: () => _pipe, + _positive: () => _positive, + _promise: () => _promise, + _property: () => _property, + _readonly: () => _readonly, + _record: () => _record, + _refine: () => _refine, + _regex: () => _regex, + _safeDecode: () => _safeDecode, + _safeDecodeAsync: () => _safeDecodeAsync, + _safeEncode: () => _safeEncode, + _safeEncodeAsync: () => _safeEncodeAsync, + _safeParse: () => _safeParse, + _safeParseAsync: () => _safeParseAsync, + _set: () => _set, + _size: () => _size, + _slugify: () => _slugify, + _startsWith: () => _startsWith, + _string: () => _string, + _stringFormat: () => _stringFormat, + _stringbool: () => _stringbool, + _success: () => _success, + _superRefine: () => _superRefine, + _symbol: () => _symbol, + _templateLiteral: () => _templateLiteral, + _toLowerCase: () => _toLowerCase, + _toUpperCase: () => _toUpperCase, + _transform: () => _transform, + _trim: () => _trim, + _tuple: () => _tuple, + _uint32: () => _uint32, + _uint64: () => _uint64, + _ulid: () => _ulid, + _undefined: () => _undefined2, + _union: () => _union, + _unknown: () => _unknown, + _uppercase: () => _uppercase, + _url: () => _url, + _uuid: () => _uuid, + _uuidv4: () => _uuidv4, + _uuidv6: () => _uuidv6, + _uuidv7: () => _uuidv7, + _void: () => _void, + _xid: () => _xid, + _xor: () => _xor, + clone: () => clone, + config: () => config2, + createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod, + createToJSONSchemaMethod: () => createToJSONSchemaMethod, + decode: () => decode2, + decodeAsync: () => decodeAsync, + describe: () => describe, + encode: () => encode3, + encodeAsync: () => encodeAsync, + extractDefs: () => extractDefs, + finalize: () => finalize, + flattenError: () => flattenError, + formatError: () => formatError, + globalConfig: () => globalConfig, + globalRegistry: () => globalRegistry, + initializeContext: () => initializeContext, + isValidBase64: () => isValidBase64, + isValidBase64URL: () => isValidBase64URL, + isValidJWT: () => isValidJWT, + locales: () => locales_exports, + meta: () => meta, + parse: () => parse, + parseAsync: () => parseAsync, + prettifyError: () => prettifyError, + process: () => process2, + regexes: () => regexes_exports, + registry: () => registry, + safeDecode: () => safeDecode, + safeDecodeAsync: () => safeDecodeAsync, + safeEncode: () => safeEncode, + safeEncodeAsync: () => safeEncodeAsync, + safeParse: () => safeParse, + safeParseAsync: () => safeParseAsync, + toDotPath: () => toDotPath, + toJSONSchema: () => toJSONSchema, + treeifyError: () => treeifyError, + util: () => util_exports, + version: () => version3 +}); +var init_core3 = __esm({ + "../../node_modules/zod/v4/core/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core2(); + init_parse(); + init_errors4(); + init_schemas(); + init_checks2(); + init_versions(); + init_util3(); + init_regexes(); + init_locales(); + init_registries(); + init_doc(); + init_api(); + init_to_json_schema(); + init_json_schema_processors(); + init_json_schema_generator(); + init_json_schema(); + } +}); + +// ../../node_modules/zod/v4/classic/checks.js +var checks_exports2 = {}; +__export(checks_exports2, { + endsWith: () => _endsWith, + gt: () => _gt, + gte: () => _gte, + includes: () => _includes, + length: () => _length, + lowercase: () => _lowercase, + lt: () => _lt, + lte: () => _lte, + maxLength: () => _maxLength, + maxSize: () => _maxSize, + mime: () => _mime, + minLength: () => _minLength, + minSize: () => _minSize, + multipleOf: () => _multipleOf, + negative: () => _negative, + nonnegative: () => _nonnegative, + nonpositive: () => _nonpositive, + normalize: () => _normalize, + overwrite: () => _overwrite, + positive: () => _positive, + property: () => _property, + regex: () => _regex, + size: () => _size, + slugify: () => _slugify, + startsWith: () => _startsWith, + toLowerCase: () => _toLowerCase, + toUpperCase: () => _toUpperCase, + trim: () => _trim, + uppercase: () => _uppercase +}); +var init_checks3 = __esm({ + "../../node_modules/zod/v4/classic/checks.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + } +}); + +// ../../node_modules/zod/v4/classic/iso.js +var iso_exports = {}; +__export(iso_exports, { + ZodISODate: () => ZodISODate, + ZodISODateTime: () => ZodISODateTime, + ZodISODuration: () => ZodISODuration, + ZodISOTime: () => ZodISOTime, + date: () => date3, + datetime: () => datetime2, + duration: () => duration2, + time: () => time6 +}); +function datetime2(params) { + return _isoDateTime(ZodISODateTime, params); +} +function date3(params) { + return _isoDate(ZodISODate, params); +} +function time6(params) { + return _isoTime(ZodISOTime, params); +} +function duration2(params) { + return _isoDuration(ZodISODuration, params); +} +var ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration; +var init_iso = __esm({ + "../../node_modules/zod/v4/classic/iso.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_schemas2(); + ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => { + $ZodISODateTime.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(datetime2, "datetime"); + ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => { + $ZodISODate.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(date3, "date"); + ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => { + $ZodISOTime.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(time6, "time"); + ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => { + $ZodISODuration.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(duration2, "duration"); + } +}); + +// ../../node_modules/zod/v4/classic/errors.js +var initializer2, ZodError, ZodRealError; +var init_errors5 = __esm({ + "../../node_modules/zod/v4/classic/errors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_core3(); + init_util3(); + initializer2 = /* @__PURE__ */ __name((inst, issues) => { + $ZodError.init(inst, issues); + inst.name = "ZodError"; + Object.defineProperties(inst, { + format: { + value: (mapper) => formatError(inst, mapper) + // enumerable: false, + }, + flatten: { + value: (mapper) => flattenError(inst, mapper) + // enumerable: false, + }, + addIssue: { + value: (issue2) => { + inst.issues.push(issue2); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2); + } + // enumerable: false, + }, + addIssues: { + value: (issues2) => { + inst.issues.push(...issues2); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2); + } + // enumerable: false, + }, + isEmpty: { + get() { + return inst.issues.length === 0; + } + // enumerable: false, + } + }); + }, "initializer"); + ZodError = $constructor("ZodError", initializer2); + ZodRealError = $constructor("ZodError", initializer2, { + Parent: Error + }); + } +}); + +// ../../node_modules/zod/v4/classic/parse.js +var parse2, parseAsync2, safeParse2, safeParseAsync2, encode4, decode3, encodeAsync2, decodeAsync2, safeEncode2, safeDecode2, safeEncodeAsync2, safeDecodeAsync2; +var init_parse2 = __esm({ + "../../node_modules/zod/v4/classic/parse.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_errors5(); + parse2 = /* @__PURE__ */ _parse(ZodRealError); + parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError); + safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError); + safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError); + encode4 = /* @__PURE__ */ _encode(ZodRealError); + decode3 = /* @__PURE__ */ _decode(ZodRealError); + encodeAsync2 = /* @__PURE__ */ _encodeAsync(ZodRealError); + decodeAsync2 = /* @__PURE__ */ _decodeAsync(ZodRealError); + safeEncode2 = /* @__PURE__ */ _safeEncode(ZodRealError); + safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError); + safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError); + safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError); + } +}); + +// ../../node_modules/zod/v4/classic/schemas.js +var schemas_exports2 = {}; +__export(schemas_exports2, { + ZodAny: () => ZodAny, + ZodArray: () => ZodArray, + ZodBase64: () => ZodBase64, + ZodBase64URL: () => ZodBase64URL, + ZodBigInt: () => ZodBigInt, + ZodBigIntFormat: () => ZodBigIntFormat, + ZodBoolean: () => ZodBoolean, + ZodCIDRv4: () => ZodCIDRv4, + ZodCIDRv6: () => ZodCIDRv6, + ZodCUID: () => ZodCUID, + ZodCUID2: () => ZodCUID2, + ZodCatch: () => ZodCatch, + ZodCodec: () => ZodCodec, + ZodCustom: () => ZodCustom, + ZodCustomStringFormat: () => ZodCustomStringFormat, + ZodDate: () => ZodDate, + ZodDefault: () => ZodDefault, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, + ZodE164: () => ZodE164, + ZodEmail: () => ZodEmail, + ZodEmoji: () => ZodEmoji, + ZodEnum: () => ZodEnum, + ZodExactOptional: () => ZodExactOptional, + ZodFile: () => ZodFile, + ZodFunction: () => ZodFunction, + ZodGUID: () => ZodGUID, + ZodIPv4: () => ZodIPv4, + ZodIPv6: () => ZodIPv6, + ZodIntersection: () => ZodIntersection, + ZodJWT: () => ZodJWT, + ZodKSUID: () => ZodKSUID, + ZodLazy: () => ZodLazy, + ZodLiteral: () => ZodLiteral, + ZodMAC: () => ZodMAC, + ZodMap: () => ZodMap, + ZodNaN: () => ZodNaN, + ZodNanoID: () => ZodNanoID, + ZodNever: () => ZodNever, + ZodNonOptional: () => ZodNonOptional, + ZodNull: () => ZodNull, + ZodNullable: () => ZodNullable, + ZodNumber: () => ZodNumber, + ZodNumberFormat: () => ZodNumberFormat, + ZodObject: () => ZodObject, + ZodOptional: () => ZodOptional, + ZodPipe: () => ZodPipe, + ZodPrefault: () => ZodPrefault, + ZodPromise: () => ZodPromise, + ZodReadonly: () => ZodReadonly, + ZodRecord: () => ZodRecord, + ZodSet: () => ZodSet, + ZodString: () => ZodString, + ZodStringFormat: () => ZodStringFormat, + ZodSuccess: () => ZodSuccess, + ZodSymbol: () => ZodSymbol, + ZodTemplateLiteral: () => ZodTemplateLiteral, + ZodTransform: () => ZodTransform, + ZodTuple: () => ZodTuple, + ZodType: () => ZodType, + ZodULID: () => ZodULID, + ZodURL: () => ZodURL, + ZodUUID: () => ZodUUID, + ZodUndefined: () => ZodUndefined, + ZodUnion: () => ZodUnion, + ZodUnknown: () => ZodUnknown, + ZodVoid: () => ZodVoid, + ZodXID: () => ZodXID, + ZodXor: () => ZodXor, + _ZodString: () => _ZodString, + _default: () => _default2, + _function: () => _function, + any: () => any, + array: () => array, + base64: () => base642, + base64url: () => base64url2, + bigint: () => bigint3, + boolean: () => boolean2, + catch: () => _catch2, + check: () => check2, + cidrv4: () => cidrv42, + cidrv6: () => cidrv62, + codec: () => codec, + cuid: () => cuid3, + cuid2: () => cuid22, + custom: () => custom, + date: () => date4, + describe: () => describe2, + discriminatedUnion: () => discriminatedUnion, + e164: () => e1642, + email: () => email2, + emoji: () => emoji2, + enum: () => _enum2, + exactOptional: () => exactOptional, + file: () => file, + float32: () => float32, + float64: () => float64, + function: () => _function, + guid: () => guid2, + hash: () => hash, + hex: () => hex2, + hostname: () => hostname2, + httpUrl: () => httpUrl, + instanceof: () => _instanceof, + int: () => int, + int32: () => int32, + int64: () => int64, + intersection: () => intersection, + ipv4: () => ipv42, + ipv6: () => ipv62, + json: () => json, + jwt: () => jwt, + keyof: () => keyof, + ksuid: () => ksuid2, + lazy: () => lazy2, + literal: () => literal, + looseObject: () => looseObject, + looseRecord: () => looseRecord, + mac: () => mac2, + map: () => map, + meta: () => meta2, + nan: () => nan, + nanoid: () => nanoid2, + nativeEnum: () => nativeEnum, + never: () => never, + nonoptional: () => nonoptional, + null: () => _null3, + nullable: () => nullable, + nullish: () => nullish2, + number: () => number2, + object: () => object, + optional: () => optional, + partialRecord: () => partialRecord, + pipe: () => pipe, + prefault: () => prefault, + preprocess: () => preprocess, + promise: () => promise, + readonly: () => readonly, + record: () => record, + refine: () => refine, + set: () => set, + strictObject: () => strictObject, + string: () => string2, + stringFormat: () => stringFormat, + stringbool: () => stringbool, + success: () => success, + superRefine: () => superRefine, + symbol: () => symbol, + templateLiteral: () => templateLiteral, + transform: () => transform, + tuple: () => tuple, + uint32: () => uint32, + uint64: () => uint64, + ulid: () => ulid2, + undefined: () => _undefined3, + union: () => union2, + unknown: () => unknown, + url: () => url, + uuid: () => uuid2, + uuidv4: () => uuidv4, + uuidv6: () => uuidv6, + uuidv7: () => uuidv7, + void: () => _void2, + xid: () => xid2, + xor: () => xor +}); +function string2(params) { + return _string(ZodString, params); +} +function email2(params) { + return _email(ZodEmail, params); +} +function guid2(params) { + return _guid(ZodGUID, params); +} +function uuid2(params) { + return _uuid(ZodUUID, params); +} +function uuidv4(params) { + return _uuidv4(ZodUUID, params); +} +function uuidv6(params) { + return _uuidv6(ZodUUID, params); +} +function uuidv7(params) { + return _uuidv7(ZodUUID, params); +} +function url(params) { + return _url(ZodURL, params); +} +function httpUrl(params) { + return _url(ZodURL, { + protocol: /^https?$/, + hostname: regexes_exports.domain, + ...util_exports.normalizeParams(params) + }); +} +function emoji2(params) { + return _emoji2(ZodEmoji, params); +} +function nanoid2(params) { + return _nanoid(ZodNanoID, params); +} +function cuid3(params) { + return _cuid(ZodCUID, params); +} +function cuid22(params) { + return _cuid2(ZodCUID2, params); +} +function ulid2(params) { + return _ulid(ZodULID, params); +} +function xid2(params) { + return _xid(ZodXID, params); +} +function ksuid2(params) { + return _ksuid(ZodKSUID, params); +} +function ipv42(params) { + return _ipv4(ZodIPv4, params); +} +function mac2(params) { + return _mac(ZodMAC, params); +} +function ipv62(params) { + return _ipv6(ZodIPv6, params); +} +function cidrv42(params) { + return _cidrv4(ZodCIDRv4, params); +} +function cidrv62(params) { + return _cidrv6(ZodCIDRv6, params); +} +function base642(params) { + return _base64(ZodBase64, params); +} +function base64url2(params) { + return _base64url(ZodBase64URL, params); +} +function e1642(params) { + return _e164(ZodE164, params); +} +function jwt(params) { + return _jwt(ZodJWT, params); +} +function stringFormat(format2, fnOrRegex, _params = {}) { + return _stringFormat(ZodCustomStringFormat, format2, fnOrRegex, _params); +} +function hostname2(_params) { + return _stringFormat(ZodCustomStringFormat, "hostname", regexes_exports.hostname, _params); +} +function hex2(_params) { + return _stringFormat(ZodCustomStringFormat, "hex", regexes_exports.hex, _params); +} +function hash(alg, params) { + const enc = params?.enc ?? "hex"; + const format2 = `${alg}_${enc}`; + const regex = regexes_exports[format2]; + if (!regex) + throw new Error(`Unrecognized hash format: ${format2}`); + return _stringFormat(ZodCustomStringFormat, format2, regex, params); +} +function number2(params) { + return _number(ZodNumber, params); +} +function int(params) { + return _int(ZodNumberFormat, params); +} +function float32(params) { + return _float32(ZodNumberFormat, params); +} +function float64(params) { + return _float64(ZodNumberFormat, params); +} +function int32(params) { + return _int32(ZodNumberFormat, params); +} +function uint32(params) { + return _uint32(ZodNumberFormat, params); +} +function boolean2(params) { + return _boolean(ZodBoolean, params); +} +function bigint3(params) { + return _bigint(ZodBigInt, params); +} +function int64(params) { + return _int64(ZodBigIntFormat, params); +} +function uint64(params) { + return _uint64(ZodBigIntFormat, params); +} +function symbol(params) { + return _symbol(ZodSymbol, params); +} +function _undefined3(params) { + return _undefined2(ZodUndefined, params); +} +function _null3(params) { + return _null2(ZodNull, params); +} +function any() { + return _any(ZodAny); +} +function unknown() { + return _unknown(ZodUnknown); +} +function never(params) { + return _never(ZodNever, params); +} +function _void2(params) { + return _void(ZodVoid, params); +} +function date4(params) { + return _date(ZodDate, params); +} +function array(element, params) { + return _array(ZodArray, element, params); +} +function keyof(schema) { + const shape = schema._zod.def.shape; + return _enum2(Object.keys(shape)); +} +function object(shape, params) { + const def = { + type: "object", + shape: shape ?? {}, + ...util_exports.normalizeParams(params) + }; + return new ZodObject(def); +} +function strictObject(shape, params) { + return new ZodObject({ + type: "object", + shape, + catchall: never(), + ...util_exports.normalizeParams(params) + }); +} +function looseObject(shape, params) { + return new ZodObject({ + type: "object", + shape, + catchall: unknown(), + ...util_exports.normalizeParams(params) + }); +} +function union2(options, params) { + return new ZodUnion({ + type: "union", + options, + ...util_exports.normalizeParams(params) + }); +} +function xor(options, params) { + return new ZodXor({ + type: "union", + options, + inclusive: false, + ...util_exports.normalizeParams(params) + }); +} +function discriminatedUnion(discriminator, options, params) { + return new ZodDiscriminatedUnion({ + type: "union", + options, + discriminator, + ...util_exports.normalizeParams(params) + }); +} +function intersection(left, right) { + return new ZodIntersection({ + type: "intersection", + left, + right + }); +} +function tuple(items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new ZodTuple({ + type: "tuple", + items, + rest, + ...util_exports.normalizeParams(params) + }); +} +function record(keyType, valueType, params) { + return new ZodRecord({ + type: "record", + keyType, + valueType, + ...util_exports.normalizeParams(params) + }); +} +function partialRecord(keyType, valueType, params) { + const k2 = clone(keyType); + k2._zod.values = void 0; + return new ZodRecord({ + type: "record", + keyType: k2, + valueType, + ...util_exports.normalizeParams(params) + }); +} +function looseRecord(keyType, valueType, params) { + return new ZodRecord({ + type: "record", + keyType, + valueType, + mode: "loose", + ...util_exports.normalizeParams(params) + }); +} +function map(keyType, valueType, params) { + return new ZodMap({ + type: "map", + keyType, + valueType, + ...util_exports.normalizeParams(params) + }); +} +function set(valueType, params) { + return new ZodSet({ + type: "set", + valueType, + ...util_exports.normalizeParams(params) + }); +} +function _enum2(values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v3) => [v3, v3])) : values; + return new ZodEnum({ + type: "enum", + entries, + ...util_exports.normalizeParams(params) + }); +} +function nativeEnum(entries, params) { + return new ZodEnum({ + type: "enum", + entries, + ...util_exports.normalizeParams(params) + }); +} +function literal(value, params) { + return new ZodLiteral({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...util_exports.normalizeParams(params) + }); +} +function file(params) { + return _file(ZodFile, params); +} +function transform(fn) { + return new ZodTransform({ + type: "transform", + transform: fn + }); +} +function optional(innerType) { + return new ZodOptional({ + type: "optional", + innerType + }); +} +function exactOptional(innerType) { + return new ZodExactOptional({ + type: "optional", + innerType + }); +} +function nullable(innerType) { + return new ZodNullable({ + type: "nullable", + innerType + }); +} +function nullish2(innerType) { + return optional(nullable(innerType)); +} +function _default2(innerType, defaultValue) { + return new ZodDefault({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); + } + }); +} +function prefault(innerType, defaultValue) { + return new ZodPrefault({ + type: "prefault", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); + } + }); +} +function nonoptional(innerType, params) { + return new ZodNonOptional({ + type: "nonoptional", + innerType, + ...util_exports.normalizeParams(params) + }); +} +function success(innerType) { + return new ZodSuccess({ + type: "success", + innerType + }); +} +function _catch2(innerType, catchValue) { + return new ZodCatch({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +function nan(params) { + return _nan(ZodNaN, params); +} +function pipe(in_, out) { + return new ZodPipe({ + type: "pipe", + in: in_, + out + // ...util.normalizeParams(params), + }); +} +function codec(in_, out, params) { + return new ZodCodec({ + type: "pipe", + in: in_, + out, + transform: params.decode, + reverseTransform: params.encode + }); +} +function readonly(innerType) { + return new ZodReadonly({ + type: "readonly", + innerType + }); +} +function templateLiteral(parts, params) { + return new ZodTemplateLiteral({ + type: "template_literal", + parts, + ...util_exports.normalizeParams(params) + }); +} +function lazy2(getter) { + return new ZodLazy({ + type: "lazy", + getter + }); +} +function promise(innerType) { + return new ZodPromise({ + type: "promise", + innerType + }); +} +function _function(params) { + return new ZodFunction({ + type: "function", + input: Array.isArray(params?.input) ? tuple(params?.input) : params?.input ?? array(unknown()), + output: params?.output ?? unknown() + }); +} +function check2(fn) { + const ch2 = new $ZodCheck({ + check: "custom" + // ...util.normalizeParams(params), + }); + ch2._zod.check = fn; + return ch2; +} +function custom(fn, _params) { + return _custom(ZodCustom, fn ?? (() => true), _params); +} +function refine(fn, _params = {}) { + return _refine(ZodCustom, fn, _params); +} +function superRefine(fn) { + return _superRefine(fn); +} +function _instanceof(cls, params = {}) { + const inst = new ZodCustom({ + type: "custom", + check: "custom", + fn: (data) => data instanceof cls, + abort: true, + ...util_exports.normalizeParams(params) + }); + inst._zod.bag.Class = cls; + inst._zod.check = (payload) => { + if (!(payload.value instanceof cls)) { + payload.issues.push({ + code: "invalid_type", + expected: cls.name, + input: payload.value, + inst, + path: [...inst._zod.def.path ?? []] + }); + } + }; + return inst; +} +function json(params) { + const jsonSchema = lazy2(() => { + return union2([string2(params), number2(), boolean2(), _null3(), array(jsonSchema), record(string2(), jsonSchema)]); + }); + return jsonSchema; +} +function preprocess(fn, schema) { + return pipe(transform(fn), schema); +} +var ZodType, _ZodString, ZodString, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber, ZodNumberFormat, ZodBoolean, ZodBigInt, ZodBigIntFormat, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodDate, ZodArray, ZodObject, ZodUnion, ZodXor, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodEnum, ZodLiteral, ZodFile, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch, ZodNaN, ZodPipe, ZodCodec, ZodReadonly, ZodTemplateLiteral, ZodLazy, ZodPromise, ZodFunction, ZodCustom, describe2, meta2, stringbool; +var init_schemas2 = __esm({ + "../../node_modules/zod/v4/classic/schemas.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_core3(); + init_json_schema_processors(); + init_to_json_schema(); + init_checks3(); + init_iso(); + init_parse2(); + ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => { + $ZodType.init(inst, def); + Object.assign(inst["~standard"], { + jsonSchema: { + input: createStandardJSONSchemaMethod(inst, "input"), + output: createStandardJSONSchemaMethod(inst, "output") + } + }); + inst.toJSONSchema = createToJSONSchemaMethod(inst, {}); + inst.def = def; + inst.type = def.type; + Object.defineProperty(inst, "_def", { value: def }); + inst.check = (...checks) => { + return inst.clone(util_exports.mergeDefs(def, { + checks: [ + ...def.checks ?? [], + ...checks.map((ch2) => typeof ch2 === "function" ? { _zod: { check: ch2, def: { check: "custom" }, onattach: [] } } : ch2) + ] + }), { + parent: true + }); + }; + inst.with = inst.check; + inst.clone = (def2, params) => clone(inst, def2, params); + inst.brand = () => inst; + inst.register = (reg, meta3) => { + reg.add(inst, meta3); + return inst; + }; + inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse }); + inst.safeParse = (data, params) => safeParse2(inst, data, params); + inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync }); + inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params); + inst.spa = inst.safeParseAsync; + inst.encode = (data, params) => encode4(inst, data, params); + inst.decode = (data, params) => decode3(inst, data, params); + inst.encodeAsync = async (data, params) => encodeAsync2(inst, data, params); + inst.decodeAsync = async (data, params) => decodeAsync2(inst, data, params); + inst.safeEncode = (data, params) => safeEncode2(inst, data, params); + inst.safeDecode = (data, params) => safeDecode2(inst, data, params); + inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params); + inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params); + inst.refine = (check3, params) => inst.check(refine(check3, params)); + inst.superRefine = (refinement) => inst.check(superRefine(refinement)); + inst.overwrite = (fn) => inst.check(_overwrite(fn)); + inst.optional = () => optional(inst); + inst.exactOptional = () => exactOptional(inst); + inst.nullable = () => nullable(inst); + inst.nullish = () => optional(nullable(inst)); + inst.nonoptional = (params) => nonoptional(inst, params); + inst.array = () => array(inst); + inst.or = (arg) => union2([inst, arg]); + inst.and = (arg) => intersection(inst, arg); + inst.transform = (tx) => pipe(inst, transform(tx)); + inst.default = (def2) => _default2(inst, def2); + inst.prefault = (def2) => prefault(inst, def2); + inst.catch = (params) => _catch2(inst, params); + inst.pipe = (target) => pipe(inst, target); + inst.readonly = () => readonly(inst); + inst.describe = (description) => { + const cl2 = inst.clone(); + globalRegistry.add(cl2, { description }); + return cl2; + }; + Object.defineProperty(inst, "description", { + get() { + return globalRegistry.get(inst)?.description; + }, + configurable: true + }); + inst.meta = (...args) => { + if (args.length === 0) { + return globalRegistry.get(inst); + } + const cl2 = inst.clone(); + globalRegistry.add(cl2, args[0]); + return cl2; + }; + inst.isOptional = () => inst.safeParse(void 0).success; + inst.isNullable = () => inst.safeParse(null).success; + inst.apply = (fn) => fn(inst); + return inst; + }); + _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => { + $ZodString.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => stringProcessor(inst, ctx, json2, params); + const bag = inst._zod.bag; + inst.format = bag.format ?? null; + inst.minLength = bag.minimum ?? null; + inst.maxLength = bag.maximum ?? null; + inst.regex = (...args) => inst.check(_regex(...args)); + inst.includes = (...args) => inst.check(_includes(...args)); + inst.startsWith = (...args) => inst.check(_startsWith(...args)); + inst.endsWith = (...args) => inst.check(_endsWith(...args)); + inst.min = (...args) => inst.check(_minLength(...args)); + inst.max = (...args) => inst.check(_maxLength(...args)); + inst.length = (...args) => inst.check(_length(...args)); + inst.nonempty = (...args) => inst.check(_minLength(1, ...args)); + inst.lowercase = (params) => inst.check(_lowercase(params)); + inst.uppercase = (params) => inst.check(_uppercase(params)); + inst.trim = () => inst.check(_trim()); + inst.normalize = (...args) => inst.check(_normalize(...args)); + inst.toLowerCase = () => inst.check(_toLowerCase()); + inst.toUpperCase = () => inst.check(_toUpperCase()); + inst.slugify = () => inst.check(_slugify()); + }); + ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => { + $ZodString.init(inst, def); + _ZodString.init(inst, def); + inst.email = (params) => inst.check(_email(ZodEmail, params)); + inst.url = (params) => inst.check(_url(ZodURL, params)); + inst.jwt = (params) => inst.check(_jwt(ZodJWT, params)); + inst.emoji = (params) => inst.check(_emoji2(ZodEmoji, params)); + inst.guid = (params) => inst.check(_guid(ZodGUID, params)); + inst.uuid = (params) => inst.check(_uuid(ZodUUID, params)); + inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params)); + inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params)); + inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params)); + inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params)); + inst.guid = (params) => inst.check(_guid(ZodGUID, params)); + inst.cuid = (params) => inst.check(_cuid(ZodCUID, params)); + inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params)); + inst.ulid = (params) => inst.check(_ulid(ZodULID, params)); + inst.base64 = (params) => inst.check(_base64(ZodBase64, params)); + inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params)); + inst.xid = (params) => inst.check(_xid(ZodXID, params)); + inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params)); + inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params)); + inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params)); + inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params)); + inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params)); + inst.e164 = (params) => inst.check(_e164(ZodE164, params)); + inst.datetime = (params) => inst.check(datetime2(params)); + inst.date = (params) => inst.check(date3(params)); + inst.time = (params) => inst.check(time6(params)); + inst.duration = (params) => inst.check(duration2(params)); + }); + __name(string2, "string"); + ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => { + $ZodStringFormat.init(inst, def); + _ZodString.init(inst, def); + }); + ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => { + $ZodEmail.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(email2, "email"); + ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => { + $ZodGUID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(guid2, "guid"); + ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => { + $ZodUUID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(uuid2, "uuid"); + __name(uuidv4, "uuidv4"); + __name(uuidv6, "uuidv6"); + __name(uuidv7, "uuidv7"); + ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => { + $ZodURL.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(url, "url"); + __name(httpUrl, "httpUrl"); + ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => { + $ZodEmoji.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(emoji2, "emoji"); + ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => { + $ZodNanoID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(nanoid2, "nanoid"); + ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => { + $ZodCUID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(cuid3, "cuid"); + ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => { + $ZodCUID2.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(cuid22, "cuid2"); + ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => { + $ZodULID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(ulid2, "ulid"); + ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => { + $ZodXID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(xid2, "xid"); + ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => { + $ZodKSUID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(ksuid2, "ksuid"); + ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => { + $ZodIPv4.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(ipv42, "ipv4"); + ZodMAC = /* @__PURE__ */ $constructor("ZodMAC", (inst, def) => { + $ZodMAC.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(mac2, "mac"); + ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => { + $ZodIPv6.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(ipv62, "ipv6"); + ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => { + $ZodCIDRv4.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(cidrv42, "cidrv4"); + ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => { + $ZodCIDRv6.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(cidrv62, "cidrv6"); + ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => { + $ZodBase64.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(base642, "base64"); + ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => { + $ZodBase64URL.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(base64url2, "base64url"); + ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => { + $ZodE164.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(e1642, "e164"); + ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => { + $ZodJWT.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(jwt, "jwt"); + ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => { + $ZodCustomStringFormat.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(stringFormat, "stringFormat"); + __name(hostname2, "hostname"); + __name(hex2, "hex"); + __name(hash, "hash"); + ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => { + $ZodNumber.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params); + inst.gt = (value, params) => inst.check(_gt(value, params)); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.lt = (value, params) => inst.check(_lt(value, params)); + inst.lte = (value, params) => inst.check(_lte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + inst.int = (params) => inst.check(int(params)); + inst.safe = (params) => inst.check(int(params)); + inst.positive = (params) => inst.check(_gt(0, params)); + inst.nonnegative = (params) => inst.check(_gte(0, params)); + inst.negative = (params) => inst.check(_lt(0, params)); + inst.nonpositive = (params) => inst.check(_lte(0, params)); + inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); + inst.step = (value, params) => inst.check(_multipleOf(value, params)); + inst.finite = () => inst; + const bag = inst._zod.bag; + inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null; + inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null; + inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5); + inst.isFinite = true; + inst.format = bag.format ?? null; + }); + __name(number2, "number"); + ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => { + $ZodNumberFormat.init(inst, def); + ZodNumber.init(inst, def); + }); + __name(int, "int"); + __name(float32, "float32"); + __name(float64, "float64"); + __name(int32, "int32"); + __name(uint32, "uint32"); + ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => { + $ZodBoolean.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => booleanProcessor(inst, ctx, json2, params); + }); + __name(boolean2, "boolean"); + ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => { + $ZodBigInt.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => bigintProcessor(inst, ctx, json2, params); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.gt = (value, params) => inst.check(_gt(value, params)); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.lt = (value, params) => inst.check(_lt(value, params)); + inst.lte = (value, params) => inst.check(_lte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + inst.positive = (params) => inst.check(_gt(BigInt(0), params)); + inst.negative = (params) => inst.check(_lt(BigInt(0), params)); + inst.nonpositive = (params) => inst.check(_lte(BigInt(0), params)); + inst.nonnegative = (params) => inst.check(_gte(BigInt(0), params)); + inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); + const bag = inst._zod.bag; + inst.minValue = bag.minimum ?? null; + inst.maxValue = bag.maximum ?? null; + inst.format = bag.format ?? null; + }); + __name(bigint3, "bigint"); + ZodBigIntFormat = /* @__PURE__ */ $constructor("ZodBigIntFormat", (inst, def) => { + $ZodBigIntFormat.init(inst, def); + ZodBigInt.init(inst, def); + }); + __name(int64, "int64"); + __name(uint64, "uint64"); + ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => { + $ZodSymbol.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => symbolProcessor(inst, ctx, json2, params); + }); + __name(symbol, "symbol"); + ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => { + $ZodUndefined.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => undefinedProcessor(inst, ctx, json2, params); + }); + __name(_undefined3, "_undefined"); + ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => { + $ZodNull.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => nullProcessor(inst, ctx, json2, params); + }); + __name(_null3, "_null"); + ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => { + $ZodAny.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => anyProcessor(inst, ctx, json2, params); + }); + __name(any, "any"); + ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => { + $ZodUnknown.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => unknownProcessor(inst, ctx, json2, params); + }); + __name(unknown, "unknown"); + ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => { + $ZodNever.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => neverProcessor(inst, ctx, json2, params); + }); + __name(never, "never"); + ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => { + $ZodVoid.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => voidProcessor(inst, ctx, json2, params); + }); + __name(_void2, "_void"); + ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => { + $ZodDate.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => dateProcessor(inst, ctx, json2, params); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + const c2 = inst._zod.bag; + inst.minDate = c2.minimum ? new Date(c2.minimum) : null; + inst.maxDate = c2.maximum ? new Date(c2.maximum) : null; + }); + __name(date4, "date"); + ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => { + $ZodArray.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params); + inst.element = def.element; + inst.min = (minLength, params) => inst.check(_minLength(minLength, params)); + inst.nonempty = (params) => inst.check(_minLength(1, params)); + inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params)); + inst.length = (len, params) => inst.check(_length(len, params)); + inst.unwrap = () => inst.element; + }); + __name(array, "array"); + __name(keyof, "keyof"); + ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => { + $ZodObjectJIT.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => objectProcessor(inst, ctx, json2, params); + util_exports.defineLazy(inst, "shape", () => { + return def.shape; + }); + inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape)); + inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall }); + inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); + inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); + inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() }); + inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 }); + inst.extend = (incoming) => { + return util_exports.extend(inst, incoming); + }; + inst.safeExtend = (incoming) => { + return util_exports.safeExtend(inst, incoming); + }; + inst.merge = (other) => util_exports.merge(inst, other); + inst.pick = (mask) => util_exports.pick(inst, mask); + inst.omit = (mask) => util_exports.omit(inst, mask); + inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]); + inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]); + }); + __name(object, "object"); + __name(strictObject, "strictObject"); + __name(looseObject, "looseObject"); + ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => { + $ZodUnion.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor(inst, ctx, json2, params); + inst.options = def.options; + }); + __name(union2, "union"); + ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => { + ZodUnion.init(inst, def); + $ZodXor.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor(inst, ctx, json2, params); + inst.options = def.options; + }); + __name(xor, "xor"); + ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => { + ZodUnion.init(inst, def); + $ZodDiscriminatedUnion.init(inst, def); + }); + __name(discriminatedUnion, "discriminatedUnion"); + ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => { + $ZodIntersection.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => intersectionProcessor(inst, ctx, json2, params); + }); + __name(intersection, "intersection"); + ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => { + $ZodTuple.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => tupleProcessor(inst, ctx, json2, params); + inst.rest = (rest) => inst.clone({ + ...inst._zod.def, + rest + }); + }); + __name(tuple, "tuple"); + ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => { + $ZodRecord.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => recordProcessor(inst, ctx, json2, params); + inst.keyType = def.keyType; + inst.valueType = def.valueType; + }); + __name(record, "record"); + __name(partialRecord, "partialRecord"); + __name(looseRecord, "looseRecord"); + ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => { + $ZodMap.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => mapProcessor(inst, ctx, json2, params); + inst.keyType = def.keyType; + inst.valueType = def.valueType; + inst.min = (...args) => inst.check(_minSize(...args)); + inst.nonempty = (params) => inst.check(_minSize(1, params)); + inst.max = (...args) => inst.check(_maxSize(...args)); + inst.size = (...args) => inst.check(_size(...args)); + }); + __name(map, "map"); + ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => { + $ZodSet.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => setProcessor(inst, ctx, json2, params); + inst.min = (...args) => inst.check(_minSize(...args)); + inst.nonempty = (params) => inst.check(_minSize(1, params)); + inst.max = (...args) => inst.check(_maxSize(...args)); + inst.size = (...args) => inst.check(_size(...args)); + }); + __name(set, "set"); + ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => { + $ZodEnum.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => enumProcessor(inst, ctx, json2, params); + inst.enum = def.entries; + inst.options = Object.values(def.entries); + const keys = new Set(Object.keys(def.entries)); + inst.extract = (values, params) => { + const newEntries = {}; + for (const value of values) { + if (keys.has(value)) { + newEntries[value] = def.entries[value]; + } else + throw new Error(`Key ${value} not found in enum`); + } + return new ZodEnum({ + ...def, + checks: [], + ...util_exports.normalizeParams(params), + entries: newEntries + }); + }; + inst.exclude = (values, params) => { + const newEntries = { ...def.entries }; + for (const value of values) { + if (keys.has(value)) { + delete newEntries[value]; + } else + throw new Error(`Key ${value} not found in enum`); + } + return new ZodEnum({ + ...def, + checks: [], + ...util_exports.normalizeParams(params), + entries: newEntries + }); + }; + }); + __name(_enum2, "_enum"); + __name(nativeEnum, "nativeEnum"); + ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => { + $ZodLiteral.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => literalProcessor(inst, ctx, json2, params); + inst.values = new Set(def.values); + Object.defineProperty(inst, "value", { + get() { + if (def.values.length > 1) { + throw new Error("This schema contains multiple valid literal values. Use `.values` instead."); + } + return def.values[0]; + } + }); + }); + __name(literal, "literal"); + ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => { + $ZodFile.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => fileProcessor(inst, ctx, json2, params); + inst.min = (size, params) => inst.check(_minSize(size, params)); + inst.max = (size, params) => inst.check(_maxSize(size, params)); + inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params)); + }); + __name(file, "file"); + ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => { + $ZodTransform.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => transformProcessor(inst, ctx, json2, params); + inst._zod.parse = (payload, _ctx) => { + if (_ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } + payload.addIssue = (issue2) => { + if (typeof issue2 === "string") { + payload.issues.push(util_exports.issue(issue2, payload.value, def)); + } else { + const _issue = issue2; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = inst); + payload.issues.push(util_exports.issue(_issue)); + } + }; + const output = def.transform(payload.value, payload); + if (output instanceof Promise) { + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + payload.value = output; + return payload; + }; + }); + __name(transform, "transform"); + ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => { + $ZodOptional.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => optionalProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(optional, "optional"); + ZodExactOptional = /* @__PURE__ */ $constructor("ZodExactOptional", (inst, def) => { + $ZodExactOptional.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => optionalProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(exactOptional, "exactOptional"); + ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => { + $ZodNullable.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => nullableProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(nullable, "nullable"); + __name(nullish2, "nullish"); + ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => { + $ZodDefault.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => defaultProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeDefault = inst.unwrap; + }); + __name(_default2, "_default"); + ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => { + $ZodPrefault.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => prefaultProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(prefault, "prefault"); + ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => { + $ZodNonOptional.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => nonoptionalProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(nonoptional, "nonoptional"); + ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => { + $ZodSuccess.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => successProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(success, "success"); + ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => { + $ZodCatch.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => catchProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeCatch = inst.unwrap; + }); + __name(_catch2, "_catch"); + ZodNaN = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => { + $ZodNaN.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => nanProcessor(inst, ctx, json2, params); + }); + __name(nan, "nan"); + ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => { + $ZodPipe.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => pipeProcessor(inst, ctx, json2, params); + inst.in = def.in; + inst.out = def.out; + }); + __name(pipe, "pipe"); + ZodCodec = /* @__PURE__ */ $constructor("ZodCodec", (inst, def) => { + ZodPipe.init(inst, def); + $ZodCodec.init(inst, def); + }); + __name(codec, "codec"); + ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => { + $ZodReadonly.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => readonlyProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(readonly, "readonly"); + ZodTemplateLiteral = /* @__PURE__ */ $constructor("ZodTemplateLiteral", (inst, def) => { + $ZodTemplateLiteral.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => templateLiteralProcessor(inst, ctx, json2, params); + }); + __name(templateLiteral, "templateLiteral"); + ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => { + $ZodLazy.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => lazyProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.getter(); + }); + __name(lazy2, "lazy"); + ZodPromise = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => { + $ZodPromise.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => promiseProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(promise, "promise"); + ZodFunction = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => { + $ZodFunction.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => functionProcessor(inst, ctx, json2, params); + }); + __name(_function, "_function"); + ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => { + $ZodCustom.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => customProcessor(inst, ctx, json2, params); + }); + __name(check2, "check"); + __name(custom, "custom"); + __name(refine, "refine"); + __name(superRefine, "superRefine"); + describe2 = describe; + meta2 = meta; + __name(_instanceof, "_instanceof"); + stringbool = /* @__PURE__ */ __name((...args) => _stringbool({ + Codec: ZodCodec, + Boolean: ZodBoolean, + String: ZodString + }, ...args), "stringbool"); + __name(json, "json"); + __name(preprocess, "preprocess"); + } +}); + +// ../../node_modules/zod/v4/classic/compat.js +function setErrorMap(map2) { + config2({ + customError: map2 + }); +} +function getErrorMap() { + return config2().customError; +} +var ZodIssueCode, ZodFirstPartyTypeKind; +var init_compat = __esm({ + "../../node_modules/zod/v4/classic/compat.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_core3(); + ZodIssueCode = { + invalid_type: "invalid_type", + too_big: "too_big", + too_small: "too_small", + invalid_format: "invalid_format", + not_multiple_of: "not_multiple_of", + unrecognized_keys: "unrecognized_keys", + invalid_union: "invalid_union", + invalid_key: "invalid_key", + invalid_element: "invalid_element", + invalid_value: "invalid_value", + custom: "custom" + }; + __name(setErrorMap, "setErrorMap"); + __name(getErrorMap, "getErrorMap"); + (function(ZodFirstPartyTypeKind2) { + })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {})); + } +}); + +// ../../node_modules/zod/v4/classic/from-json-schema.js +function detectVersion(schema, defaultTarget) { + const $schema = schema.$schema; + if ($schema === "https://json-schema.org/draft/2020-12/schema") { + return "draft-2020-12"; + } + if ($schema === "http://json-schema.org/draft-07/schema#") { + return "draft-7"; + } + if ($schema === "http://json-schema.org/draft-04/schema#") { + return "draft-4"; + } + return defaultTarget ?? "draft-2020-12"; +} +function resolveRef(ref, ctx) { + if (!ref.startsWith("#")) { + throw new Error("External $ref is not supported, only local refs (#/...) are allowed"); + } + const path = ref.slice(1).split("/").filter(Boolean); + if (path.length === 0) { + return ctx.rootSchema; + } + const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions"; + if (path[0] === defsKey) { + const key = path[1]; + if (!key || !ctx.defs[key]) { + throw new Error(`Reference not found: ${ref}`); + } + return ctx.defs[key]; + } + throw new Error(`Reference not found: ${ref}`); +} +function convertBaseSchema(schema, ctx) { + if (schema.not !== void 0) { + if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) { + return z2.never(); + } + throw new Error("not is not supported in Zod (except { not: {} } for never)"); + } + if (schema.unevaluatedItems !== void 0) { + throw new Error("unevaluatedItems is not supported"); + } + if (schema.unevaluatedProperties !== void 0) { + throw new Error("unevaluatedProperties is not supported"); + } + if (schema.if !== void 0 || schema.then !== void 0 || schema.else !== void 0) { + throw new Error("Conditional schemas (if/then/else) are not supported"); + } + if (schema.dependentSchemas !== void 0 || schema.dependentRequired !== void 0) { + throw new Error("dependentSchemas and dependentRequired are not supported"); + } + if (schema.$ref) { + const refPath = schema.$ref; + if (ctx.refs.has(refPath)) { + return ctx.refs.get(refPath); + } + if (ctx.processing.has(refPath)) { + return z2.lazy(() => { + if (!ctx.refs.has(refPath)) { + throw new Error(`Circular reference not resolved: ${refPath}`); + } + return ctx.refs.get(refPath); + }); + } + ctx.processing.add(refPath); + const resolved = resolveRef(refPath, ctx); + const zodSchema2 = convertSchema(resolved, ctx); + ctx.refs.set(refPath, zodSchema2); + ctx.processing.delete(refPath); + return zodSchema2; + } + if (schema.enum !== void 0) { + const enumValues = schema.enum; + if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) { + return z2.null(); + } + if (enumValues.length === 0) { + return z2.never(); + } + if (enumValues.length === 1) { + return z2.literal(enumValues[0]); + } + if (enumValues.every((v3) => typeof v3 === "string")) { + return z2.enum(enumValues); + } + const literalSchemas = enumValues.map((v3) => z2.literal(v3)); + if (literalSchemas.length < 2) { + return literalSchemas[0]; + } + return z2.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]); + } + if (schema.const !== void 0) { + return z2.literal(schema.const); + } + const type = schema.type; + if (Array.isArray(type)) { + const typeSchemas = type.map((t9) => { + const typeSchema = { ...schema, type: t9 }; + return convertBaseSchema(typeSchema, ctx); + }); + if (typeSchemas.length === 0) { + return z2.never(); + } + if (typeSchemas.length === 1) { + return typeSchemas[0]; + } + return z2.union(typeSchemas); + } + if (!type) { + return z2.any(); + } + let zodSchema; + switch (type) { + case "string": { + let stringSchema = z2.string(); + if (schema.format) { + const format2 = schema.format; + if (format2 === "email") { + stringSchema = stringSchema.check(z2.email()); + } else if (format2 === "uri" || format2 === "uri-reference") { + stringSchema = stringSchema.check(z2.url()); + } else if (format2 === "uuid" || format2 === "guid") { + stringSchema = stringSchema.check(z2.uuid()); + } else if (format2 === "date-time") { + stringSchema = stringSchema.check(z2.iso.datetime()); + } else if (format2 === "date") { + stringSchema = stringSchema.check(z2.iso.date()); + } else if (format2 === "time") { + stringSchema = stringSchema.check(z2.iso.time()); + } else if (format2 === "duration") { + stringSchema = stringSchema.check(z2.iso.duration()); + } else if (format2 === "ipv4") { + stringSchema = stringSchema.check(z2.ipv4()); + } else if (format2 === "ipv6") { + stringSchema = stringSchema.check(z2.ipv6()); + } else if (format2 === "mac") { + stringSchema = stringSchema.check(z2.mac()); + } else if (format2 === "cidr") { + stringSchema = stringSchema.check(z2.cidrv4()); + } else if (format2 === "cidr-v6") { + stringSchema = stringSchema.check(z2.cidrv6()); + } else if (format2 === "base64") { + stringSchema = stringSchema.check(z2.base64()); + } else if (format2 === "base64url") { + stringSchema = stringSchema.check(z2.base64url()); + } else if (format2 === "e164") { + stringSchema = stringSchema.check(z2.e164()); + } else if (format2 === "jwt") { + stringSchema = stringSchema.check(z2.jwt()); + } else if (format2 === "emoji") { + stringSchema = stringSchema.check(z2.emoji()); + } else if (format2 === "nanoid") { + stringSchema = stringSchema.check(z2.nanoid()); + } else if (format2 === "cuid") { + stringSchema = stringSchema.check(z2.cuid()); + } else if (format2 === "cuid2") { + stringSchema = stringSchema.check(z2.cuid2()); + } else if (format2 === "ulid") { + stringSchema = stringSchema.check(z2.ulid()); + } else if (format2 === "xid") { + stringSchema = stringSchema.check(z2.xid()); + } else if (format2 === "ksuid") { + stringSchema = stringSchema.check(z2.ksuid()); + } + } + if (typeof schema.minLength === "number") { + stringSchema = stringSchema.min(schema.minLength); + } + if (typeof schema.maxLength === "number") { + stringSchema = stringSchema.max(schema.maxLength); + } + if (schema.pattern) { + stringSchema = stringSchema.regex(new RegExp(schema.pattern)); + } + zodSchema = stringSchema; + break; + } + case "number": + case "integer": { + let numberSchema = type === "integer" ? z2.number().int() : z2.number(); + if (typeof schema.minimum === "number") { + numberSchema = numberSchema.min(schema.minimum); + } + if (typeof schema.maximum === "number") { + numberSchema = numberSchema.max(schema.maximum); + } + if (typeof schema.exclusiveMinimum === "number") { + numberSchema = numberSchema.gt(schema.exclusiveMinimum); + } else if (schema.exclusiveMinimum === true && typeof schema.minimum === "number") { + numberSchema = numberSchema.gt(schema.minimum); + } + if (typeof schema.exclusiveMaximum === "number") { + numberSchema = numberSchema.lt(schema.exclusiveMaximum); + } else if (schema.exclusiveMaximum === true && typeof schema.maximum === "number") { + numberSchema = numberSchema.lt(schema.maximum); + } + if (typeof schema.multipleOf === "number") { + numberSchema = numberSchema.multipleOf(schema.multipleOf); + } + zodSchema = numberSchema; + break; + } + case "boolean": { + zodSchema = z2.boolean(); + break; + } + case "null": { + zodSchema = z2.null(); + break; + } + case "object": { + const shape = {}; + const properties = schema.properties || {}; + const requiredSet = new Set(schema.required || []); + for (const [key, propSchema] of Object.entries(properties)) { + const propZodSchema = convertSchema(propSchema, ctx); + shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional(); + } + if (schema.propertyNames) { + const keySchema = convertSchema(schema.propertyNames, ctx); + const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z2.any(); + if (Object.keys(shape).length === 0) { + zodSchema = z2.record(keySchema, valueSchema); + break; + } + const objectSchema2 = z2.object(shape).passthrough(); + const recordSchema = z2.looseRecord(keySchema, valueSchema); + zodSchema = z2.intersection(objectSchema2, recordSchema); + break; + } + if (schema.patternProperties) { + const patternProps = schema.patternProperties; + const patternKeys = Object.keys(patternProps); + const looseRecords = []; + for (const pattern of patternKeys) { + const patternValue = convertSchema(patternProps[pattern], ctx); + const keySchema = z2.string().regex(new RegExp(pattern)); + looseRecords.push(z2.looseRecord(keySchema, patternValue)); + } + const schemasToIntersect = []; + if (Object.keys(shape).length > 0) { + schemasToIntersect.push(z2.object(shape).passthrough()); + } + schemasToIntersect.push(...looseRecords); + if (schemasToIntersect.length === 0) { + zodSchema = z2.object({}).passthrough(); + } else if (schemasToIntersect.length === 1) { + zodSchema = schemasToIntersect[0]; + } else { + let result = z2.intersection(schemasToIntersect[0], schemasToIntersect[1]); + for (let i2 = 2; i2 < schemasToIntersect.length; i2++) { + result = z2.intersection(result, schemasToIntersect[i2]); + } + zodSchema = result; + } + break; + } + const objectSchema = z2.object(shape); + if (schema.additionalProperties === false) { + zodSchema = objectSchema.strict(); + } else if (typeof schema.additionalProperties === "object") { + zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx)); + } else { + zodSchema = objectSchema.passthrough(); + } + break; + } + case "array": { + const prefixItems = schema.prefixItems; + const items = schema.items; + if (prefixItems && Array.isArray(prefixItems)) { + const tupleItems = prefixItems.map((item) => convertSchema(item, ctx)); + const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0; + if (rest) { + zodSchema = z2.tuple(tupleItems).rest(rest); + } else { + zodSchema = z2.tuple(tupleItems); + } + if (typeof schema.minItems === "number") { + zodSchema = zodSchema.check(z2.minLength(schema.minItems)); + } + if (typeof schema.maxItems === "number") { + zodSchema = zodSchema.check(z2.maxLength(schema.maxItems)); + } + } else if (Array.isArray(items)) { + const tupleItems = items.map((item) => convertSchema(item, ctx)); + const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0; + if (rest) { + zodSchema = z2.tuple(tupleItems).rest(rest); + } else { + zodSchema = z2.tuple(tupleItems); + } + if (typeof schema.minItems === "number") { + zodSchema = zodSchema.check(z2.minLength(schema.minItems)); + } + if (typeof schema.maxItems === "number") { + zodSchema = zodSchema.check(z2.maxLength(schema.maxItems)); + } + } else if (items !== void 0) { + const element = convertSchema(items, ctx); + let arraySchema = z2.array(element); + if (typeof schema.minItems === "number") { + arraySchema = arraySchema.min(schema.minItems); + } + if (typeof schema.maxItems === "number") { + arraySchema = arraySchema.max(schema.maxItems); + } + zodSchema = arraySchema; + } else { + zodSchema = z2.array(z2.any()); + } + break; + } + default: + throw new Error(`Unsupported type: ${type}`); + } + if (schema.description) { + zodSchema = zodSchema.describe(schema.description); + } + if (schema.default !== void 0) { + zodSchema = zodSchema.default(schema.default); + } + return zodSchema; +} +function convertSchema(schema, ctx) { + if (typeof schema === "boolean") { + return schema ? z2.any() : z2.never(); + } + let baseSchema = convertBaseSchema(schema, ctx); + const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0; + if (schema.anyOf && Array.isArray(schema.anyOf)) { + const options = schema.anyOf.map((s2) => convertSchema(s2, ctx)); + const anyOfUnion = z2.union(options); + baseSchema = hasExplicitType ? z2.intersection(baseSchema, anyOfUnion) : anyOfUnion; + } + if (schema.oneOf && Array.isArray(schema.oneOf)) { + const options = schema.oneOf.map((s2) => convertSchema(s2, ctx)); + const oneOfUnion = z2.xor(options); + baseSchema = hasExplicitType ? z2.intersection(baseSchema, oneOfUnion) : oneOfUnion; + } + if (schema.allOf && Array.isArray(schema.allOf)) { + if (schema.allOf.length === 0) { + baseSchema = hasExplicitType ? baseSchema : z2.any(); + } else { + let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx); + const startIdx = hasExplicitType ? 0 : 1; + for (let i2 = startIdx; i2 < schema.allOf.length; i2++) { + result = z2.intersection(result, convertSchema(schema.allOf[i2], ctx)); + } + baseSchema = result; + } + } + if (schema.nullable === true && ctx.version === "openapi-3.0") { + baseSchema = z2.nullable(baseSchema); + } + if (schema.readOnly === true) { + baseSchema = z2.readonly(baseSchema); + } + const extraMeta = {}; + const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"]; + for (const key of coreMetadataKeys) { + if (key in schema) { + extraMeta[key] = schema[key]; + } + } + const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"]; + for (const key of contentMetadataKeys) { + if (key in schema) { + extraMeta[key] = schema[key]; + } + } + for (const key of Object.keys(schema)) { + if (!RECOGNIZED_KEYS.has(key)) { + extraMeta[key] = schema[key]; + } + } + if (Object.keys(extraMeta).length > 0) { + ctx.registry.add(baseSchema, extraMeta); + } + return baseSchema; +} +function fromJSONSchema(schema, params) { + if (typeof schema === "boolean") { + return schema ? z2.any() : z2.never(); + } + const version4 = detectVersion(schema, params?.defaultTarget); + const defs = schema.$defs || schema.definitions || {}; + const ctx = { + version: version4, + defs, + refs: /* @__PURE__ */ new Map(), + processing: /* @__PURE__ */ new Set(), + rootSchema: schema, + registry: params?.registry ?? globalRegistry + }; + return convertSchema(schema, ctx); +} +var z2, RECOGNIZED_KEYS; +var init_from_json_schema = __esm({ + "../../node_modules/zod/v4/classic/from-json-schema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_registries(); + init_checks3(); + init_iso(); + init_schemas2(); + z2 = { + ...schemas_exports2, + ...checks_exports2, + iso: iso_exports + }; + RECOGNIZED_KEYS = /* @__PURE__ */ new Set([ + // Schema identification + "$schema", + "$ref", + "$defs", + "definitions", + // Core schema keywords + "$id", + "id", + "$comment", + "$anchor", + "$vocabulary", + "$dynamicRef", + "$dynamicAnchor", + // Type + "type", + "enum", + "const", + // Composition + "anyOf", + "oneOf", + "allOf", + "not", + // Object + "properties", + "required", + "additionalProperties", + "patternProperties", + "propertyNames", + "minProperties", + "maxProperties", + // Array + "items", + "prefixItems", + "additionalItems", + "minItems", + "maxItems", + "uniqueItems", + "contains", + "minContains", + "maxContains", + // String + "minLength", + "maxLength", + "pattern", + "format", + // Number + "minimum", + "maximum", + "exclusiveMinimum", + "exclusiveMaximum", + "multipleOf", + // Already handled metadata + "description", + "default", + // Content + "contentEncoding", + "contentMediaType", + "contentSchema", + // Unsupported (error-throwing) + "unevaluatedItems", + "unevaluatedProperties", + "if", + "then", + "else", + "dependentSchemas", + "dependentRequired", + // OpenAPI + "nullable", + "readOnly" + ]); + __name(detectVersion, "detectVersion"); + __name(resolveRef, "resolveRef"); + __name(convertBaseSchema, "convertBaseSchema"); + __name(convertSchema, "convertSchema"); + __name(fromJSONSchema, "fromJSONSchema"); + } +}); + +// ../../node_modules/zod/v4/classic/coerce.js +var coerce_exports = {}; +__export(coerce_exports, { + bigint: () => bigint4, + boolean: () => boolean3, + date: () => date5, + number: () => number3, + string: () => string3 +}); +function string3(params) { + return _coercedString(ZodString, params); +} +function number3(params) { + return _coercedNumber(ZodNumber, params); +} +function boolean3(params) { + return _coercedBoolean(ZodBoolean, params); +} +function bigint4(params) { + return _coercedBigint(ZodBigInt, params); +} +function date5(params) { + return _coercedDate(ZodDate, params); +} +var init_coerce = __esm({ + "../../node_modules/zod/v4/classic/coerce.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_schemas2(); + __name(string3, "string"); + __name(number3, "number"); + __name(boolean3, "boolean"); + __name(bigint4, "bigint"); + __name(date5, "date"); + } +}); + +// ../../node_modules/zod/v4/classic/external.js +var external_exports = {}; +__export(external_exports, { + $brand: () => $brand, + $input: () => $input, + $output: () => $output, + NEVER: () => NEVER, + TimePrecision: () => TimePrecision, + ZodAny: () => ZodAny, + ZodArray: () => ZodArray, + ZodBase64: () => ZodBase64, + ZodBase64URL: () => ZodBase64URL, + ZodBigInt: () => ZodBigInt, + ZodBigIntFormat: () => ZodBigIntFormat, + ZodBoolean: () => ZodBoolean, + ZodCIDRv4: () => ZodCIDRv4, + ZodCIDRv6: () => ZodCIDRv6, + ZodCUID: () => ZodCUID, + ZodCUID2: () => ZodCUID2, + ZodCatch: () => ZodCatch, + ZodCodec: () => ZodCodec, + ZodCustom: () => ZodCustom, + ZodCustomStringFormat: () => ZodCustomStringFormat, + ZodDate: () => ZodDate, + ZodDefault: () => ZodDefault, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, + ZodE164: () => ZodE164, + ZodEmail: () => ZodEmail, + ZodEmoji: () => ZodEmoji, + ZodEnum: () => ZodEnum, + ZodError: () => ZodError, + ZodExactOptional: () => ZodExactOptional, + ZodFile: () => ZodFile, + ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind, + ZodFunction: () => ZodFunction, + ZodGUID: () => ZodGUID, + ZodIPv4: () => ZodIPv4, + ZodIPv6: () => ZodIPv6, + ZodISODate: () => ZodISODate, + ZodISODateTime: () => ZodISODateTime, + ZodISODuration: () => ZodISODuration, + ZodISOTime: () => ZodISOTime, + ZodIntersection: () => ZodIntersection, + ZodIssueCode: () => ZodIssueCode, + ZodJWT: () => ZodJWT, + ZodKSUID: () => ZodKSUID, + ZodLazy: () => ZodLazy, + ZodLiteral: () => ZodLiteral, + ZodMAC: () => ZodMAC, + ZodMap: () => ZodMap, + ZodNaN: () => ZodNaN, + ZodNanoID: () => ZodNanoID, + ZodNever: () => ZodNever, + ZodNonOptional: () => ZodNonOptional, + ZodNull: () => ZodNull, + ZodNullable: () => ZodNullable, + ZodNumber: () => ZodNumber, + ZodNumberFormat: () => ZodNumberFormat, + ZodObject: () => ZodObject, + ZodOptional: () => ZodOptional, + ZodPipe: () => ZodPipe, + ZodPrefault: () => ZodPrefault, + ZodPromise: () => ZodPromise, + ZodReadonly: () => ZodReadonly, + ZodRealError: () => ZodRealError, + ZodRecord: () => ZodRecord, + ZodSet: () => ZodSet, + ZodString: () => ZodString, + ZodStringFormat: () => ZodStringFormat, + ZodSuccess: () => ZodSuccess, + ZodSymbol: () => ZodSymbol, + ZodTemplateLiteral: () => ZodTemplateLiteral, + ZodTransform: () => ZodTransform, + ZodTuple: () => ZodTuple, + ZodType: () => ZodType, + ZodULID: () => ZodULID, + ZodURL: () => ZodURL, + ZodUUID: () => ZodUUID, + ZodUndefined: () => ZodUndefined, + ZodUnion: () => ZodUnion, + ZodUnknown: () => ZodUnknown, + ZodVoid: () => ZodVoid, + ZodXID: () => ZodXID, + ZodXor: () => ZodXor, + _ZodString: () => _ZodString, + _default: () => _default2, + _function: () => _function, + any: () => any, + array: () => array, + base64: () => base642, + base64url: () => base64url2, + bigint: () => bigint3, + boolean: () => boolean2, + catch: () => _catch2, + check: () => check2, + cidrv4: () => cidrv42, + cidrv6: () => cidrv62, + clone: () => clone, + codec: () => codec, + coerce: () => coerce_exports, + config: () => config2, + core: () => core_exports2, + cuid: () => cuid3, + cuid2: () => cuid22, + custom: () => custom, + date: () => date4, + decode: () => decode3, + decodeAsync: () => decodeAsync2, + describe: () => describe2, + discriminatedUnion: () => discriminatedUnion, + e164: () => e1642, + email: () => email2, + emoji: () => emoji2, + encode: () => encode4, + encodeAsync: () => encodeAsync2, + endsWith: () => _endsWith, + enum: () => _enum2, + exactOptional: () => exactOptional, + file: () => file, + flattenError: () => flattenError, + float32: () => float32, + float64: () => float64, + formatError: () => formatError, + fromJSONSchema: () => fromJSONSchema, + function: () => _function, + getErrorMap: () => getErrorMap, + globalRegistry: () => globalRegistry, + gt: () => _gt, + gte: () => _gte, + guid: () => guid2, + hash: () => hash, + hex: () => hex2, + hostname: () => hostname2, + httpUrl: () => httpUrl, + includes: () => _includes, + instanceof: () => _instanceof, + int: () => int, + int32: () => int32, + int64: () => int64, + intersection: () => intersection, + ipv4: () => ipv42, + ipv6: () => ipv62, + iso: () => iso_exports, + json: () => json, + jwt: () => jwt, + keyof: () => keyof, + ksuid: () => ksuid2, + lazy: () => lazy2, + length: () => _length, + literal: () => literal, + locales: () => locales_exports, + looseObject: () => looseObject, + looseRecord: () => looseRecord, + lowercase: () => _lowercase, + lt: () => _lt, + lte: () => _lte, + mac: () => mac2, + map: () => map, + maxLength: () => _maxLength, + maxSize: () => _maxSize, + meta: () => meta2, + mime: () => _mime, + minLength: () => _minLength, + minSize: () => _minSize, + multipleOf: () => _multipleOf, + nan: () => nan, + nanoid: () => nanoid2, + nativeEnum: () => nativeEnum, + negative: () => _negative, + never: () => never, + nonnegative: () => _nonnegative, + nonoptional: () => nonoptional, + nonpositive: () => _nonpositive, + normalize: () => _normalize, + null: () => _null3, + nullable: () => nullable, + nullish: () => nullish2, + number: () => number2, + object: () => object, + optional: () => optional, + overwrite: () => _overwrite, + parse: () => parse2, + parseAsync: () => parseAsync2, + partialRecord: () => partialRecord, + pipe: () => pipe, + positive: () => _positive, + prefault: () => prefault, + preprocess: () => preprocess, + prettifyError: () => prettifyError, + promise: () => promise, + property: () => _property, + readonly: () => readonly, + record: () => record, + refine: () => refine, + regex: () => _regex, + regexes: () => regexes_exports, + registry: () => registry, + safeDecode: () => safeDecode2, + safeDecodeAsync: () => safeDecodeAsync2, + safeEncode: () => safeEncode2, + safeEncodeAsync: () => safeEncodeAsync2, + safeParse: () => safeParse2, + safeParseAsync: () => safeParseAsync2, + set: () => set, + setErrorMap: () => setErrorMap, + size: () => _size, + slugify: () => _slugify, + startsWith: () => _startsWith, + strictObject: () => strictObject, + string: () => string2, + stringFormat: () => stringFormat, + stringbool: () => stringbool, + success: () => success, + superRefine: () => superRefine, + symbol: () => symbol, + templateLiteral: () => templateLiteral, + toJSONSchema: () => toJSONSchema, + toLowerCase: () => _toLowerCase, + toUpperCase: () => _toUpperCase, + transform: () => transform, + treeifyError: () => treeifyError, + trim: () => _trim, + tuple: () => tuple, + uint32: () => uint32, + uint64: () => uint64, + ulid: () => ulid2, + undefined: () => _undefined3, + union: () => union2, + unknown: () => unknown, + uppercase: () => _uppercase, + url: () => url, + util: () => util_exports, + uuid: () => uuid2, + uuidv4: () => uuidv4, + uuidv6: () => uuidv6, + uuidv7: () => uuidv7, + void: () => _void2, + xid: () => xid2, + xor: () => xor +}); +var init_external = __esm({ + "../../node_modules/zod/v4/classic/external.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_schemas2(); + init_checks3(); + init_errors5(); + init_parse2(); + init_compat(); + init_core3(); + init_en(); + init_core3(); + init_json_schema_processors(); + init_from_json_schema(); + init_locales(); + init_iso(); + init_iso(); + init_coerce(); + config2(en_default()); + } +}); + +// ../../node_modules/zod/index.js +var init_zod = __esm({ + "../../node_modules/zod/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_external(); + init_external(); + } +}); + +// src/trpc/apis/admin-apis/apis/complaint.ts +var complaintRouter; +var init_complaint3 = __esm({ + "src/trpc/apis/admin-apis/apis/complaint.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_s3_client(); + init_dbService(); + complaintRouter = router2({ + getAll: protectedProcedure.input(external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(20) + })).query(async ({ input }) => { + const { cursor, limit } = input; + const { complaints: complaintsData, hasMore } = await getComplaints(cursor, limit); + const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData; + const complaintsWithSignedImages = await Promise.all( + complaintsToReturn.map(async (c2) => { + const signedImages = c2.images ? await generateSignedUrlsFromS3Urls(c2.images) : []; + return { + id: c2.id, + text: c2.complaintBody, + userId: c2.userId, + userName: c2.userName, + userMobile: c2.userMobile, + orderId: c2.orderId, + status: c2.isResolved ? "resolved" : "pending", + createdAt: c2.createdAt, + images: signedImages + }; + }) + ); + return { + complaints: complaintsWithSignedImages, + nextCursor: hasMore ? complaintsToReturn[complaintsToReturn.length - 1].id : void 0 + }; + }), + resolve: protectedProcedure.input(external_exports.object({ id: external_exports.string(), response: external_exports.string().optional() })).mutation(async ({ input }) => { + await resolveComplaint(parseInt(input.id), input.response); + return { message: "Complaint resolved successfully" }; + }) + }); + } +}); + +// ../../node_modules/dayjs/dayjs.min.js +var require_dayjs_min = __commonJS({ + "../../node_modules/dayjs/dayjs.min.js"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + !function(t9, e2) { + "object" == typeof exports && "undefined" != typeof module ? module.exports = e2() : "function" == typeof define && define.amd ? define(e2) : (t9 = "undefined" != typeof globalThis ? globalThis : t9 || self).dayjs = e2(); + }(exports, function() { + "use strict"; + var t9 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i2 = "second", s2 = "minute", u5 = "hour", a2 = "day", o2 = "week", c2 = "month", f2 = "quarter", h2 = "year", d2 = "date", l2 = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y2 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M2 = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t10) { + var e3 = ["th", "st", "nd", "rd"], n3 = t10 % 100; + return "[" + t10 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]"; + } }, m2 = /* @__PURE__ */ __name(function(t10, e3, n3) { + var r3 = String(t10); + return !r3 || r3.length >= e3 ? t10 : "" + Array(e3 + 1 - r3.length).join(n3) + t10; + }, "m"), v3 = { s: m2, z: function(t10) { + var e3 = -t10.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i3 = n3 % 60; + return (e3 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i3, 2, "0"); + }, m: /* @__PURE__ */ __name(function t10(e3, n3) { + if (e3.date() < n3.date()) + return -t10(n3, e3); + var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i3 = e3.clone().add(r3, c2), s3 = n3 - i3 < 0, u6 = e3.clone().add(r3 + (s3 ? -1 : 1), c2); + return +(-(r3 + (n3 - i3) / (s3 ? i3 - u6 : u6 - i3)) || 0); + }, "t"), a: function(t10) { + return t10 < 0 ? Math.ceil(t10) || 0 : Math.floor(t10); + }, p: function(t10) { + return { M: c2, y: h2, w: o2, d: a2, D: d2, h: u5, m: s2, s: i2, ms: r2, Q: f2 }[t10] || String(t10 || "").toLowerCase().replace(/s$/, ""); + }, u: function(t10) { + return void 0 === t10; + } }, g2 = "en", D3 = {}; + D3[g2] = M2; + var p2 = "$isDayjsObject", S2 = /* @__PURE__ */ __name(function(t10) { + return t10 instanceof _ || !(!t10 || !t10[p2]); + }, "S"), w2 = /* @__PURE__ */ __name(function t10(e3, n3, r3) { + var i3; + if (!e3) + return g2; + if ("string" == typeof e3) { + var s3 = e3.toLowerCase(); + D3[s3] && (i3 = s3), n3 && (D3[s3] = n3, i3 = s3); + var u6 = e3.split("-"); + if (!i3 && u6.length > 1) + return t10(u6[0]); + } else { + var a3 = e3.name; + D3[a3] = e3, i3 = a3; + } + return !r3 && i3 && (g2 = i3), i3 || !r3 && g2; + }, "t"), O2 = /* @__PURE__ */ __name(function(t10, e3) { + if (S2(t10)) + return t10.clone(); + var n3 = "object" == typeof e3 ? e3 : {}; + return n3.date = t10, n3.args = arguments, new _(n3); + }, "O"), b2 = v3; + b2.l = w2, b2.i = S2, b2.w = function(t10, e3) { + return O2(t10, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset }); + }; + var _ = function() { + function M3(t10) { + this.$L = w2(t10.locale, null, true), this.parse(t10), this.$x = this.$x || t10.x || {}, this[p2] = true; + } + __name(M3, "M"); + var m3 = M3.prototype; + return m3.parse = function(t10) { + this.$d = function(t11) { + var e3 = t11.date, n3 = t11.utc; + if (null === e3) + return /* @__PURE__ */ new Date(NaN); + if (b2.u(e3)) + return /* @__PURE__ */ new Date(); + if (e3 instanceof Date) + return new Date(e3); + if ("string" == typeof e3 && !/Z$/i.test(e3)) { + var r3 = e3.match($); + if (r3) { + var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3); + return n3 ? new Date(Date.UTC(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3); + } + } + return new Date(e3); + }(t10), this.init(); + }, m3.init = function() { + var t10 = this.$d; + this.$y = t10.getFullYear(), this.$M = t10.getMonth(), this.$D = t10.getDate(), this.$W = t10.getDay(), this.$H = t10.getHours(), this.$m = t10.getMinutes(), this.$s = t10.getSeconds(), this.$ms = t10.getMilliseconds(); + }, m3.$utils = function() { + return b2; + }, m3.isValid = function() { + return !(this.$d.toString() === l2); + }, m3.isSame = function(t10, e3) { + var n3 = O2(t10); + return this.startOf(e3) <= n3 && n3 <= this.endOf(e3); + }, m3.isAfter = function(t10, e3) { + return O2(t10) < this.startOf(e3); + }, m3.isBefore = function(t10, e3) { + return this.endOf(e3) < O2(t10); + }, m3.$g = function(t10, e3, n3) { + return b2.u(t10) ? this[e3] : this.set(n3, t10); + }, m3.unix = function() { + return Math.floor(this.valueOf() / 1e3); + }, m3.valueOf = function() { + return this.$d.getTime(); + }, m3.startOf = function(t10, e3) { + var n3 = this, r3 = !!b2.u(e3) || e3, f3 = b2.p(t10), l3 = /* @__PURE__ */ __name(function(t11, e4) { + var i3 = b2.w(n3.$u ? Date.UTC(n3.$y, e4, t11) : new Date(n3.$y, e4, t11), n3); + return r3 ? i3 : i3.endOf(a2); + }, "l"), $2 = /* @__PURE__ */ __name(function(t11, e4) { + return b2.w(n3.toDate()[t11].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3); + }, "$"), y3 = this.$W, M4 = this.$M, m4 = this.$D, v5 = "set" + (this.$u ? "UTC" : ""); + switch (f3) { + case h2: + return r3 ? l3(1, 0) : l3(31, 11); + case c2: + return r3 ? l3(1, M4) : l3(0, M4 + 1); + case o2: + var g3 = this.$locale().weekStart || 0, D4 = (y3 < g3 ? y3 + 7 : y3) - g3; + return l3(r3 ? m4 - D4 : m4 + (6 - D4), M4); + case a2: + case d2: + return $2(v5 + "Hours", 0); + case u5: + return $2(v5 + "Minutes", 1); + case s2: + return $2(v5 + "Seconds", 2); + case i2: + return $2(v5 + "Milliseconds", 3); + default: + return this.clone(); + } + }, m3.endOf = function(t10) { + return this.startOf(t10, false); + }, m3.$set = function(t10, e3) { + var n3, o3 = b2.p(t10), f3 = "set" + (this.$u ? "UTC" : ""), l3 = (n3 = {}, n3[a2] = f3 + "Date", n3[d2] = f3 + "Date", n3[c2] = f3 + "Month", n3[h2] = f3 + "FullYear", n3[u5] = f3 + "Hours", n3[s2] = f3 + "Minutes", n3[i2] = f3 + "Seconds", n3[r2] = f3 + "Milliseconds", n3)[o3], $2 = o3 === a2 ? this.$D + (e3 - this.$W) : e3; + if (o3 === c2 || o3 === h2) { + var y3 = this.clone().set(d2, 1); + y3.$d[l3]($2), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d; + } else + l3 && this.$d[l3]($2); + return this.init(), this; + }, m3.set = function(t10, e3) { + return this.clone().$set(t10, e3); + }, m3.get = function(t10) { + return this[b2.p(t10)](); + }, m3.add = function(r3, f3) { + var d3, l3 = this; + r3 = Number(r3); + var $2 = b2.p(f3), y3 = /* @__PURE__ */ __name(function(t10) { + var e3 = O2(l3); + return b2.w(e3.date(e3.date() + Math.round(t10 * r3)), l3); + }, "y"); + if ($2 === c2) + return this.set(c2, this.$M + r3); + if ($2 === h2) + return this.set(h2, this.$y + r3); + if ($2 === a2) + return y3(1); + if ($2 === o2) + return y3(7); + var M4 = (d3 = {}, d3[s2] = e2, d3[u5] = n2, d3[i2] = t9, d3)[$2] || 1, m4 = this.$d.getTime() + r3 * M4; + return b2.w(m4, this); + }, m3.subtract = function(t10, e3) { + return this.add(-1 * t10, e3); + }, m3.format = function(t10) { + var e3 = this, n3 = this.$locale(); + if (!this.isValid()) + return n3.invalidDate || l2; + var r3 = t10 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b2.z(this), s3 = this.$H, u6 = this.$m, a3 = this.$M, o3 = n3.weekdays, c3 = n3.months, f3 = n3.meridiem, h3 = /* @__PURE__ */ __name(function(t11, n4, i4, s4) { + return t11 && (t11[n4] || t11(e3, r3)) || i4[n4].slice(0, s4); + }, "h"), d3 = /* @__PURE__ */ __name(function(t11) { + return b2.s(s3 % 12 || 12, t11, "0"); + }, "d"), $2 = f3 || function(t11, e4, n4) { + var r4 = t11 < 12 ? "AM" : "PM"; + return n4 ? r4.toLowerCase() : r4; + }; + return r3.replace(y2, function(t11, r4) { + return r4 || function(t12) { + switch (t12) { + case "YY": + return String(e3.$y).slice(-2); + case "YYYY": + return b2.s(e3.$y, 4, "0"); + case "M": + return a3 + 1; + case "MM": + return b2.s(a3 + 1, 2, "0"); + case "MMM": + return h3(n3.monthsShort, a3, c3, 3); + case "MMMM": + return h3(c3, a3); + case "D": + return e3.$D; + case "DD": + return b2.s(e3.$D, 2, "0"); + case "d": + return String(e3.$W); + case "dd": + return h3(n3.weekdaysMin, e3.$W, o3, 2); + case "ddd": + return h3(n3.weekdaysShort, e3.$W, o3, 3); + case "dddd": + return o3[e3.$W]; + case "H": + return String(s3); + case "HH": + return b2.s(s3, 2, "0"); + case "h": + return d3(1); + case "hh": + return d3(2); + case "a": + return $2(s3, u6, true); + case "A": + return $2(s3, u6, false); + case "m": + return String(u6); + case "mm": + return b2.s(u6, 2, "0"); + case "s": + return String(e3.$s); + case "ss": + return b2.s(e3.$s, 2, "0"); + case "SSS": + return b2.s(e3.$ms, 3, "0"); + case "Z": + return i3; + } + return null; + }(t11) || i3.replace(":", ""); + }); + }, m3.utcOffset = function() { + return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); + }, m3.diff = function(r3, d3, l3) { + var $2, y3 = this, M4 = b2.p(d3), m4 = O2(r3), v5 = (m4.utcOffset() - this.utcOffset()) * e2, g3 = this - m4, D4 = /* @__PURE__ */ __name(function() { + return b2.m(y3, m4); + }, "D"); + switch (M4) { + case h2: + $2 = D4() / 12; + break; + case c2: + $2 = D4(); + break; + case f2: + $2 = D4() / 3; + break; + case o2: + $2 = (g3 - v5) / 6048e5; + break; + case a2: + $2 = (g3 - v5) / 864e5; + break; + case u5: + $2 = g3 / n2; + break; + case s2: + $2 = g3 / e2; + break; + case i2: + $2 = g3 / t9; + break; + default: + $2 = g3; + } + return l3 ? $2 : b2.a($2); + }, m3.daysInMonth = function() { + return this.endOf(c2).$D; + }, m3.$locale = function() { + return D3[this.$L]; + }, m3.locale = function(t10, e3) { + if (!t10) + return this.$L; + var n3 = this.clone(), r3 = w2(t10, e3, true); + return r3 && (n3.$L = r3), n3; + }, m3.clone = function() { + return b2.w(this.$d, this); + }, m3.toDate = function() { + return new Date(this.valueOf()); + }, m3.toJSON = function() { + return this.isValid() ? this.toISOString() : null; + }, m3.toISOString = function() { + return this.$d.toISOString(); + }, m3.toString = function() { + return this.$d.toUTCString(); + }, M3; + }(), k2 = _.prototype; + return O2.prototype = k2, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u5], ["$W", a2], ["$M", c2], ["$y", h2], ["$D", d2]].forEach(function(t10) { + k2[t10[1]] = function(e3) { + return this.$g(e3, t10[0], t10[1]); + }; + }), O2.extend = function(t10, e3) { + return t10.$i || (t10(e3, _, O2), t10.$i = true), O2; + }, O2.locale = w2, O2.isDayjs = S2, O2.unix = function(t10) { + return O2(1e3 * t10); + }, O2.en = D3[g2], O2.Ls = D3, O2.p = {}, O2; + }); + } +}); + +// src/trpc/apis/admin-apis/apis/coupon.ts +var import_dayjs, createCouponBodySchema, validateCouponBodySchema, couponRouter; +var init_coupon3 = __esm({ + "src/trpc/apis/admin-apis/apis/coupon.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + import_dayjs = __toESM(require_dayjs_min()); + init_dbService(); + createCouponBodySchema = external_exports.object({ + couponCode: external_exports.string().optional(), + isUserBased: external_exports.boolean().optional(), + discountPercent: external_exports.number().optional(), + flatDiscount: external_exports.number().optional(), + minOrder: external_exports.number().optional(), + targetUser: external_exports.number().optional(), + productIds: external_exports.array(external_exports.number()).optional().nullable(), + applicableUsers: external_exports.array(external_exports.number()).optional(), + applicableProducts: external_exports.array(external_exports.number()).optional(), + maxValue: external_exports.number().optional(), + isApplyForAll: external_exports.boolean().optional(), + validTill: external_exports.string().optional(), + maxLimitForUser: external_exports.number().optional(), + exclusiveApply: external_exports.boolean().optional() + }); + validateCouponBodySchema = external_exports.object({ + code: external_exports.string(), + userId: external_exports.number(), + orderAmount: external_exports.number() + }); + couponRouter = router2({ + create: protectedProcedure.input(createCouponBodySchema).mutation(async ({ input, ctx }) => { + const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableUsers, applicableProducts, maxValue, isApplyForAll, validTill, maxLimitForUser, exclusiveApply } = input; + if (!discountPercent && !flatDiscount || discountPercent && flatDiscount) { + throw new Error("Either discountPercent or flatDiscount must be provided (but not both)"); + } + if (isUserBased && (!applicableUsers || applicableUsers.length === 0) && !isApplyForAll) { + throw new Error("applicableUsers is required for user-based coupons (or set isApplyForAll to true)"); + } + if (isUserBased && isApplyForAll) { + throw new Error("Cannot be both user-based and apply for all users"); + } + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + let finalCouponCode = couponCode; + if (!finalCouponCode) { + const timestamp = Date.now().toString().slice(-6); + const random = Math.random().toString(36).substring(2, 8).toUpperCase(); + finalCouponCode = `MF${timestamp}${random}`; + } + const codeExists = await checkCouponExists(finalCouponCode); + if (codeExists) { + throw new Error("Coupon code already exists"); + } + if (applicableUsers && applicableUsers.length > 0) { + const usersExist = await checkUsersExist(applicableUsers); + if (!usersExist) { + throw new Error("Some applicable users not found"); + } + } + const coupon = await createCouponWithRelations( + { + couponCode: finalCouponCode, + isUserBased: isUserBased || false, + discountPercent: discountPercent?.toString(), + flatDiscount: flatDiscount?.toString(), + minOrder: minOrder?.toString(), + productIds: productIds || null, + createdBy: staffUserId, + maxValue: maxValue?.toString(), + isApplyForAll: isApplyForAll || false, + validTill: validTill ? (0, import_dayjs.default)(validTill).toDate() : void 0, + maxLimitForUser, + exclusiveApply: exclusiveApply || false + }, + applicableUsers, + applicableProducts + ); + return coupon; + }), + getAll: protectedProcedure.input(external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(50), + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { cursor, limit, search } = input; + const { coupons: couponsList, hasMore } = await getAllCoupons(cursor, limit, search); + const nextCursor = hasMore ? couponsList[couponsList.length - 1].id : void 0; + return { coupons: couponsList, nextCursor }; + }), + getById: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).query(async ({ input }) => { + const couponId = input.id; + const result = await getCouponById(couponId); + if (!result) { + throw new Error("Coupon not found"); + } + return { + ...result, + productIds: result.productIds || void 0, + applicableUsers: result.applicableUsers.map((au2) => au2.user), + applicableProducts: result.applicableProducts.map((ap2) => ap2.product) + }; + }), + update: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + updates: createCouponBodySchema.extend({ + isInvalidated: external_exports.boolean().optional() + }) + })).mutation(async ({ input }) => { + const { id, updates } = input; + if (updates.discountPercent !== void 0 && updates.flatDiscount !== void 0) { + if (updates.discountPercent && updates.flatDiscount) { + throw new Error("Cannot have both discountPercent and flatDiscount"); + } + } + const updateData = {}; + if (updates.couponCode !== void 0) + updateData.couponCode = updates.couponCode; + if (updates.isUserBased !== void 0) + updateData.isUserBased = updates.isUserBased; + if (updates.discountPercent !== void 0) + updateData.discountPercent = updates.discountPercent?.toString(); + if (updates.flatDiscount !== void 0) + updateData.flatDiscount = updates.flatDiscount?.toString(); + if (updates.minOrder !== void 0) + updateData.minOrder = updates.minOrder?.toString(); + if (updates.maxValue !== void 0) + updateData.maxValue = updates.maxValue?.toString(); + if (updates.isApplyForAll !== void 0) + updateData.isApplyForAll = updates.isApplyForAll; + if (updates.validTill !== void 0) + updateData.validTill = updates.validTill ? (0, import_dayjs.default)(updates.validTill).toDate() : null; + if (updates.maxLimitForUser !== void 0) + updateData.maxLimitForUser = updates.maxLimitForUser; + if (updates.exclusiveApply !== void 0) + updateData.exclusiveApply = updates.exclusiveApply; + if (updates.isInvalidated !== void 0) + updateData.isInvalidated = updates.isInvalidated; + if (updates.productIds !== void 0) + updateData.productIds = updates.productIds; + const coupon = await updateCouponWithRelations( + id, + updateData, + updates.applicableUsers, + updates.applicableProducts + ); + return coupon; + }), + delete: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).mutation(async ({ input }) => { + const { id } = input; + await invalidateCoupon(id); + return { message: "Coupon invalidated successfully" }; + }), + validate: protectedProcedure.input(validateCouponBodySchema).query(async ({ input }) => { + const { code, userId, orderAmount } = input; + if (!code || typeof code !== "string") { + return { valid: false, message: "Invalid coupon code" }; + } + const result = await validateCoupon(code, userId, orderAmount); + return result; + }), + generateCancellationCoupon: protectedProcedure.input( + external_exports.object({ + orderId: external_exports.number() + }) + ).mutation(async ({ input, ctx }) => { + const { orderId } = input; + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + const order = await getOrderWithUser(orderId); + if (!order) { + throw new Error("Order not found"); + } + if (!order.user) { + throw new Error("User not found for this order"); + } + const userNamePrefix = (order.user.name || order.user.mobile || "USR").substring(0, 3).toUpperCase(); + const couponCode = `${userNamePrefix}${orderId}`; + const codeExists = await checkCouponExists(couponCode); + if (codeExists) { + throw new Error("Coupon code already exists"); + } + const orderAmount = parseFloat(order.totalAmount); + const coupon = await generateCancellationCoupon( + orderId, + staffUserId, + order.userId, + orderAmount, + couponCode + ); + return coupon; + }), + getReservedCoupons: protectedProcedure.input(external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(50), + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { cursor, limit, search } = input; + const { coupons: result, hasMore } = await getReservedCoupons(cursor, limit, search); + const nextCursor = hasMore ? result[result.length - 1].id : void 0; + return { + coupons: result, + nextCursor + }; + }), + createReservedCoupon: protectedProcedure.input(createCouponBodySchema).mutation(async ({ input, ctx }) => { + const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableProducts, maxValue, validTill, maxLimitForUser, exclusiveApply } = input; + if (!discountPercent && !flatDiscount || discountPercent && flatDiscount) { + throw new Error("Either discountPercent or flatDiscount must be provided (but not both)"); + } + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + let secretCode = couponCode || `SECRET${Date.now().toString().slice(-6)}${Math.random().toString(36).substring(2, 8).toUpperCase()}`; + const codeExists = await checkReservedCouponExists(secretCode); + if (codeExists) { + throw new Error("Secret code already exists"); + } + const coupon = await createReservedCouponWithProducts( + { + secretCode, + couponCode: couponCode || `RESERVED${Date.now().toString().slice(-6)}`, + discountPercent: discountPercent?.toString(), + flatDiscount: flatDiscount?.toString(), + minOrder: minOrder?.toString(), + productIds, + maxValue: maxValue?.toString(), + validTill: validTill ? (0, import_dayjs.default)(validTill).toDate() : void 0, + maxLimitForUser, + exclusiveApply: exclusiveApply || false, + createdBy: staffUserId + }, + applicableProducts + ); + return coupon; + }), + getUsersMiniInfo: protectedProcedure.input(external_exports.object({ + search: external_exports.string().optional(), + limit: external_exports.number().min(1).max(50).default(20), + offset: external_exports.number().min(0).default(0) + })).query(async ({ input }) => { + const { search, limit, offset } = input; + const result = await getUsersForCoupon(search, limit, offset); + return result; + }), + createCoupon: protectedProcedure.input(external_exports.object({ + mobile: external_exports.string().min(1, "Mobile number is required") + })).mutation(async ({ input, ctx }) => { + const { mobile } = input; + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + const cleanMobile = mobile.replace(/\D/g, ""); + if (cleanMobile.length !== 10) { + throw new Error("Mobile number must be exactly 10 digits"); + } + const timestamp = Date.now().toString().slice(-6); + const random = Math.random().toString(36).substring(2, 6).toUpperCase(); + const couponCode = `MF${cleanMobile.slice(-4)}${timestamp}${random}`; + const codeExists = await checkCouponExists(couponCode); + if (codeExists) { + throw new Error("Generated coupon code already exists - please try again"); + } + const { coupon, user } = await createCouponForUser(cleanMobile, couponCode, staffUserId); + return { + success: true, + coupon: { + id: coupon.id, + couponCode: coupon.couponCode, + userId: user.id, + userMobile: user.mobile, + discountPercent: 20, + minOrder: 1e3, + maxValue: 500, + maxLimitForUser: 1 + } + }; + }) + }); + } +}); + +// ../../node_modules/unenv/dist/runtime/npm/node-fetch.mjs +var node_fetch_exports = {}; +__export(node_fetch_exports, { + AbortController: () => AbortController2, + AbortError: () => AbortError, + FetchError: () => FetchError, + Headers: () => Headers2, + Request: () => Request2, + Response: () => Response2, + default: () => node_fetch_default, + fetch: () => fetch2, + isRedirect: () => isRedirect +}); +var fetch2, Headers2, Request2, Response2, AbortController2, FetchError, AbortError, redirectStatus, isRedirect, node_fetch_default; +var init_node_fetch = __esm({ + "../../node_modules/unenv/dist/runtime/npm/node-fetch.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fetch2 = /* @__PURE__ */ __name((...args) => globalThis.fetch(...args), "fetch"); + Headers2 = globalThis.Headers; + Request2 = globalThis.Request; + Response2 = globalThis.Response; + AbortController2 = globalThis.AbortController; + FetchError = Error; + AbortError = Error; + redirectStatus = /* @__PURE__ */ new Set([ + 301, + 302, + 303, + 307, + 308 + ]); + isRedirect = /* @__PURE__ */ __name((code) => redirectStatus.has(code), "isRedirect"); + fetch2.Promise = globalThis.Promise; + fetch2.isRedirect = isRedirect; + node_fetch_default = fetch2; + } +}); + +// required-unenv-alias:node-fetch +var require_node_fetch = __commonJS({ + "required-unenv-alias:node-fetch"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_node_fetch(); + module.exports = Object.entries(node_fetch_exports).filter(([k2]) => k2 !== "default").reduce( + (cjs, [k2, value]) => Object.defineProperty(cjs, k2, { value, enumerable: true }), + "default" in node_fetch_exports ? node_fetch_default : {} + ); + } +}); + +// node-built-in-modules:node:assert +import libDefault from "node:assert"; +var require_node_assert = __commonJS({ + "node-built-in-modules:node:assert"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module.exports = libDefault; + } +}); + +// node-built-in-modules:node:zlib +import libDefault2 from "node:zlib"; +var require_node_zlib = __commonJS({ + "node-built-in-modules:node:zlib"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module.exports = libDefault2; + } +}); + +// ../../node_modules/promise-limit/index.js +var require_promise_limit = __commonJS({ + "../../node_modules/promise-limit/index.js"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + function limiter(count4) { + var outstanding = 0; + var jobs = []; + function remove() { + outstanding--; + if (outstanding < count4) { + dequeue(); + } + } + __name(remove, "remove"); + function dequeue() { + var job = jobs.shift(); + semaphore.queue = jobs.length; + if (job) { + run2(job.fn).then(job.resolve).catch(job.reject); + } + } + __name(dequeue, "dequeue"); + function queue(fn) { + return new Promise(function(resolve, reject) { + jobs.push({ fn, resolve, reject }); + semaphore.queue = jobs.length; + }); + } + __name(queue, "queue"); + function run2(fn) { + outstanding++; + try { + return Promise.resolve(fn()).then(function(result) { + remove(); + return result; + }, function(error50) { + remove(); + throw error50; + }); + } catch (err) { + remove(); + return Promise.reject(err); + } + } + __name(run2, "run"); + var semaphore = /* @__PURE__ */ __name(function(fn) { + if (outstanding >= count4) { + return queue(fn); + } else { + return run2(fn); + } + }, "semaphore"); + return semaphore; + } + __name(limiter, "limiter"); + function map2(items, mapper) { + var failed = false; + var limit = this; + return Promise.all(items.map(function() { + var args = arguments; + return limit(function() { + if (!failed) { + return mapper.apply(void 0, args).catch(function(e2) { + failed = true; + throw e2; + }); + } + }); + })); + } + __name(map2, "map"); + function addExtras(fn) { + fn.queue = 0; + fn.map = map2; + return fn; + } + __name(addExtras, "addExtras"); + module.exports = function(count4) { + if (count4) { + return addExtras(limiter(count4)); + } else { + return addExtras(function(fn) { + return fn(); + }); + } + }; + } +}); + +// ../../node_modules/err-code/index.js +var require_err_code = __commonJS({ + "../../node_modules/err-code/index.js"(exports, module) { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + function assign(obj, props) { + for (const key in props) { + Object.defineProperty(obj, key, { + value: props[key], + enumerable: true, + configurable: true + }); + } + return obj; + } + __name(assign, "assign"); + function createError(err, code, props) { + if (!err || typeof err === "string") { + throw new TypeError("Please pass an Error to err-code"); + } + if (!props) { + props = {}; + } + if (typeof code === "object") { + props = code; + code = void 0; + } + if (code != null) { + props.code = code; + } + try { + return assign(err, props); + } catch (_) { + props.message = err.message; + props.stack = err.stack; + const ErrClass = /* @__PURE__ */ __name(function() { + }, "ErrClass"); + ErrClass.prototype = Object.create(Object.getPrototypeOf(err)); + return assign(new ErrClass(), props); + } + } + __name(createError, "createError"); + module.exports = createError; + } +}); + +// ../../node_modules/retry/lib/retry_operation.js +var require_retry_operation = __commonJS({ + "../../node_modules/retry/lib/retry_operation.js"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + function RetryOperation(timeouts, options) { + if (typeof options === "boolean") { + options = { forever: options }; + } + this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)); + this._timeouts = timeouts; + this._options = options || {}; + this._maxRetryTime = options && options.maxRetryTime || Infinity; + this._fn = null; + this._errors = []; + this._attempts = 1; + this._operationTimeout = null; + this._operationTimeoutCb = null; + this._timeout = null; + this._operationStart = null; + if (this._options.forever) { + this._cachedTimeouts = this._timeouts.slice(0); + } + } + __name(RetryOperation, "RetryOperation"); + module.exports = RetryOperation; + RetryOperation.prototype.reset = function() { + this._attempts = 1; + this._timeouts = this._originalTimeouts; + }; + RetryOperation.prototype.stop = function() { + if (this._timeout) { + clearTimeout(this._timeout); + } + this._timeouts = []; + this._cachedTimeouts = null; + }; + RetryOperation.prototype.retry = function(err) { + if (this._timeout) { + clearTimeout(this._timeout); + } + if (!err) { + return false; + } + var currentTime = (/* @__PURE__ */ new Date()).getTime(); + if (err && currentTime - this._operationStart >= this._maxRetryTime) { + this._errors.unshift(new Error("RetryOperation timeout occurred")); + return false; + } + this._errors.push(err); + var timeout = this._timeouts.shift(); + if (timeout === void 0) { + if (this._cachedTimeouts) { + this._errors.splice(this._errors.length - 1, this._errors.length); + this._timeouts = this._cachedTimeouts.slice(0); + timeout = this._timeouts.shift(); + } else { + return false; + } + } + var self2 = this; + var timer = setTimeout(function() { + self2._attempts++; + if (self2._operationTimeoutCb) { + self2._timeout = setTimeout(function() { + self2._operationTimeoutCb(self2._attempts); + }, self2._operationTimeout); + if (self2._options.unref) { + self2._timeout.unref(); + } + } + self2._fn(self2._attempts); + }, timeout); + if (this._options.unref) { + timer.unref(); + } + return true; + }; + RetryOperation.prototype.attempt = function(fn, timeoutOps) { + this._fn = fn; + if (timeoutOps) { + if (timeoutOps.timeout) { + this._operationTimeout = timeoutOps.timeout; + } + if (timeoutOps.cb) { + this._operationTimeoutCb = timeoutOps.cb; + } + } + var self2 = this; + if (this._operationTimeoutCb) { + this._timeout = setTimeout(function() { + self2._operationTimeoutCb(); + }, self2._operationTimeout); + } + this._operationStart = (/* @__PURE__ */ new Date()).getTime(); + this._fn(this._attempts); + }; + RetryOperation.prototype.try = function(fn) { + console.log("Using RetryOperation.try() is deprecated"); + this.attempt(fn); + }; + RetryOperation.prototype.start = function(fn) { + console.log("Using RetryOperation.start() is deprecated"); + this.attempt(fn); + }; + RetryOperation.prototype.start = RetryOperation.prototype.try; + RetryOperation.prototype.errors = function() { + return this._errors; + }; + RetryOperation.prototype.attempts = function() { + return this._attempts; + }; + RetryOperation.prototype.mainError = function() { + if (this._errors.length === 0) { + return null; + } + var counts = {}; + var mainError = null; + var mainErrorCount = 0; + for (var i2 = 0; i2 < this._errors.length; i2++) { + var error50 = this._errors[i2]; + var message2 = error50.message; + var count4 = (counts[message2] || 0) + 1; + counts[message2] = count4; + if (count4 >= mainErrorCount) { + mainError = error50; + mainErrorCount = count4; + } + } + return mainError; + }; + } +}); + +// ../../node_modules/retry/lib/retry.js +var require_retry = __commonJS({ + "../../node_modules/retry/lib/retry.js"(exports) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var RetryOperation = require_retry_operation(); + exports.operation = function(options) { + var timeouts = exports.timeouts(options); + return new RetryOperation(timeouts, { + forever: options && options.forever, + unref: options && options.unref, + maxRetryTime: options && options.maxRetryTime + }); + }; + exports.timeouts = function(options) { + if (options instanceof Array) { + return [].concat(options); + } + var opts = { + retries: 10, + factor: 2, + minTimeout: 1 * 1e3, + maxTimeout: Infinity, + randomize: false + }; + for (var key in options) { + opts[key] = options[key]; + } + if (opts.minTimeout > opts.maxTimeout) { + throw new Error("minTimeout is greater than maxTimeout"); + } + var timeouts = []; + for (var i2 = 0; i2 < opts.retries; i2++) { + timeouts.push(this.createTimeout(i2, opts)); + } + if (options && options.forever && !timeouts.length) { + timeouts.push(this.createTimeout(i2, opts)); + } + timeouts.sort(function(a2, b2) { + return a2 - b2; + }); + return timeouts; + }; + exports.createTimeout = function(attempt, opts) { + var random = opts.randomize ? Math.random() + 1 : 1; + var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt)); + timeout = Math.min(timeout, opts.maxTimeout); + return timeout; + }; + exports.wrap = function(obj, options, methods) { + if (options instanceof Array) { + methods = options; + options = null; + } + if (!methods) { + methods = []; + for (var key in obj) { + if (typeof obj[key] === "function") { + methods.push(key); + } + } + } + for (var i2 = 0; i2 < methods.length; i2++) { + var method = methods[i2]; + var original = obj[method]; + obj[method] = (/* @__PURE__ */ __name(function retryWrapper(original2) { + var op = exports.operation(options); + var args = Array.prototype.slice.call(arguments, 1); + var callback = args.pop(); + args.push(function(err) { + if (op.retry(err)) { + return; + } + if (err) { + arguments[0] = op.mainError(); + } + callback.apply(this, arguments); + }); + op.attempt(function() { + original2.apply(obj, args); + }); + }, "retryWrapper")).bind(obj, original); + obj[method].options = options; + } + }; + } +}); + +// ../../node_modules/retry/index.js +var require_retry2 = __commonJS({ + "../../node_modules/retry/index.js"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module.exports = require_retry(); + } +}); + +// ../../node_modules/promise-retry/index.js +var require_promise_retry = __commonJS({ + "../../node_modules/promise-retry/index.js"(exports, module) { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var errcode = require_err_code(); + var retry = require_retry2(); + var hasOwn = Object.prototype.hasOwnProperty; + function isRetryError(err) { + return err && err.code === "EPROMISERETRY" && hasOwn.call(err, "retried"); + } + __name(isRetryError, "isRetryError"); + function promiseRetry(fn, options) { + var temp; + var operation2; + if (typeof fn === "object" && typeof options === "function") { + temp = options; + options = fn; + fn = temp; + } + operation2 = retry.operation(options); + return new Promise(function(resolve, reject) { + operation2.attempt(function(number4) { + Promise.resolve().then(function() { + return fn(function(err) { + if (isRetryError(err)) { + err = err.retried; + } + throw errcode(new Error("Retrying"), "EPROMISERETRY", { retried: err }); + }, number4); + }).then(resolve, function(err) { + if (isRetryError(err)) { + err = err.retried; + if (operation2.retry(err || new Error())) { + return; + } + } + reject(err); + }); + }); + }); + } + __name(promiseRetry, "promiseRetry"); + module.exports = promiseRetry; + } +}); + +// node_modules/expo-server-sdk/build/ExpoClientValues.js +var require_ExpoClientValues = __commonJS({ + "node_modules/expo-server-sdk/build/ExpoClientValues.js"(exports) { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.requestRetryMinTimeout = exports.defaultConcurrentRequestLimit = exports.pushNotificationReceiptChunkLimit = exports.pushNotificationChunkLimit = exports.getReceiptsApiUrl = exports.sendApiUrl = void 0; + var baseUrl = process.env["EXPO_BASE_URL"] || "https://exp.host"; + exports.sendApiUrl = `${baseUrl}/--/api/v2/push/send`; + exports.getReceiptsApiUrl = `${baseUrl}/--/api/v2/push/getReceipts`; + exports.pushNotificationChunkLimit = 100; + exports.pushNotificationReceiptChunkLimit = 300; + exports.defaultConcurrentRequestLimit = 6; + exports.requestRetryMinTimeout = 1e3; + } +}); + +// node_modules/expo-server-sdk/package.json +var require_package = __commonJS({ + "node_modules/expo-server-sdk/package.json"(exports, module) { + module.exports = { + name: "expo-server-sdk", + version: "4.0.0", + description: "Server-side library for working with Expo using Node.js", + main: "build/ExpoClient.js", + types: "build/ExpoClient.d.ts", + files: [ + "build" + ], + engines: { + node: ">=20" + }, + scripts: { + build: "yarn prepack", + lint: "eslint", + prepack: "tsc --project tsconfig.build.json", + test: "jest", + tsc: "tsc", + watch: "tsc --watch" + }, + jest: { + coverageDirectory: "/../coverage", + coverageThreshold: { + global: { + branches: 100, + functions: 100, + lines: 100, + statements: 0 + } + }, + preset: "ts-jest", + rootDir: "src", + testEnvironment: "node" + }, + repository: { + type: "git", + url: "git+https://github.com/expo/expo-server-sdk-node.git" + }, + keywords: [ + "expo", + "push-notifications" + ], + author: "support@expo.dev", + license: "MIT", + bugs: { + url: "https://github.com/expo/expo-server-sdk-node/issues" + }, + homepage: "https://github.com/expo/expo-server-sdk-node#readme", + dependencies: { + "node-fetch": "^2.6.0", + "promise-limit": "^2.7.0", + "promise-retry": "^2.0.1" + }, + devDependencies: { + "@tsconfig/node20": "20.1.6", + "@tsconfig/strictest": "2.0.5", + "@types/node": "22.17.2", + "@types/node-fetch": "2.6.12", + "@types/promise-retry": "1.1.6", + eslint: "9.33.0", + "eslint-config-universe": "15.0.3", + jest: "29.7.0", + jiti: "2.4.2", + msw: "2.10.5", + prettier: "3.6.2", + "ts-jest": "29.4.1", + typescript: "5.9.2" + }, + packageManager: "yarn@4.9.2" + }; + } +}); + +// node_modules/expo-server-sdk/build/ExpoClient.js +var require_ExpoClient = __commonJS({ + "node_modules/expo-server-sdk/build/ExpoClient.js"(exports) { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) { + if (k22 === void 0) + k22 = k2; + var desc2 = Object.getOwnPropertyDescriptor(m2, k2); + if (!desc2 || ("get" in desc2 ? !m2.__esModule : desc2.writable || desc2.configurable)) { + desc2 = { enumerable: true, get: function() { + return m2[k2]; + } }; + } + Object.defineProperty(o2, k22, desc2); + } : function(o2, m2, k2, k22) { + if (k22 === void 0) + k22 = k2; + o2[k22] = m2[k2]; + }); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o2, v3) { + Object.defineProperty(o2, "default", { enumerable: true, value: v3 }); + } : function(o2, v3) { + o2["default"] = v3; + }); + var __importStar = exports && exports.__importStar || function() { + var ownKeys = /* @__PURE__ */ __name(function(o2) { + ownKeys = Object.getOwnPropertyNames || function(o3) { + var ar2 = []; + for (var k2 in o3) + if (Object.prototype.hasOwnProperty.call(o3, k2)) + ar2[ar2.length] = k2; + return ar2; + }; + return ownKeys(o2); + }, "ownKeys"); + return function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k2 = ownKeys(mod), i2 = 0; i2 < k2.length; i2++) + if (k2[i2] !== "default") + __createBinding(result, mod, k2[i2]); + } + __setModuleDefault(result, mod); + return result; + }; + }(); + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Expo = void 0; + var node_fetch_1 = __importStar(require_node_fetch()); + var node_assert_1 = __importDefault(require_node_assert()); + var node_zlib_1 = require_node_zlib(); + var promise_limit_1 = __importDefault(require_promise_limit()); + var promise_retry_1 = __importDefault(require_promise_retry()); + var ExpoClientValues_1 = require_ExpoClientValues(); + var _Expo = class { + httpAgent; + limitConcurrentRequests; + accessToken; + useFcmV1; + retryMinTimeout; + constructor(options = {}) { + this.httpAgent = options.httpAgent; + this.limitConcurrentRequests = (0, promise_limit_1.default)(options.maxConcurrentRequests ?? ExpoClientValues_1.defaultConcurrentRequestLimit); + this.retryMinTimeout = options.retryMinTimeout ?? ExpoClientValues_1.requestRetryMinTimeout; + this.accessToken = options.accessToken; + this.useFcmV1 = options.useFcmV1; + } + /** + * Returns `true` if the token is an Expo push token + */ + static isExpoPushToken(token) { + return typeof token === "string" && ((token.startsWith("ExponentPushToken[") || token.startsWith("ExpoPushToken[")) && token.endsWith("]") || /^[a-z\d]{8}-[a-z\d]{4}-[a-z\d]{4}-[a-z\d]{4}-[a-z\d]{12}$/i.test(token)); + } + /** + * Sends the given messages to their recipients via push notifications and returns an array of + * push tickets. Each ticket corresponds to the message at its respective index (the nth receipt + * is for the nth message) and contains a receipt ID. Later, after Expo attempts to deliver the + * messages to the underlying push notification services, the receipts with those IDs will be + * available for a period of time (approximately a day). + * + * There is a limit on the number of push notifications you can send at once. Use + * `chunkPushNotifications` to divide an array of push notification messages into appropriately + * sized chunks. + */ + async sendPushNotificationsAsync(messages) { + const url2 = new URL(ExpoClientValues_1.sendApiUrl); + if (this.useFcmV1 === false) { + url2.searchParams.append("useFcmV1", String(this.useFcmV1)); + } + const actualMessagesCount = _Expo._getActualMessageCount(messages); + const data = await this.limitConcurrentRequests(async () => { + return await (0, promise_retry_1.default)(async (retry) => { + try { + return await this.requestAsync(url2.toString(), { + httpMethod: "post", + body: messages, + shouldCompress(body) { + return body.length > 1024; + } + }); + } catch (e2) { + if (e2.statusCode === 429) { + return retry(e2); + } + throw e2; + } + }, { + retries: 2, + factor: 2, + minTimeout: this.retryMinTimeout + }); + }); + if (!Array.isArray(data) || data.length !== actualMessagesCount) { + const apiError = new Error(`Expected Expo to respond with ${actualMessagesCount} ${actualMessagesCount === 1 ? "ticket" : "tickets"} but got ${data.length}`); + apiError["data"] = data; + throw apiError; + } + return data; + } + async getPushNotificationReceiptsAsync(receiptIds) { + const data = await this.requestAsync(ExpoClientValues_1.getReceiptsApiUrl, { + httpMethod: "post", + body: { ids: receiptIds }, + shouldCompress(body) { + return body.length > 1024; + } + }); + if (!data || typeof data !== "object" || Array.isArray(data)) { + const apiError = new Error(`Expected Expo to respond with a map from receipt IDs to receipts but received data of another type`); + apiError["data"] = data; + throw apiError; + } + return data; + } + chunkPushNotifications(messages) { + const chunks = []; + let chunk = []; + let chunkMessagesCount = 0; + for (const message2 of messages) { + if (Array.isArray(message2.to)) { + let partialTo = []; + for (const recipient of message2.to) { + partialTo.push(recipient); + chunkMessagesCount++; + if (chunkMessagesCount >= ExpoClientValues_1.pushNotificationChunkLimit) { + chunk.push({ ...message2, to: partialTo }); + chunks.push(chunk); + chunk = []; + chunkMessagesCount = 0; + partialTo = []; + } + } + if (partialTo.length) { + chunk.push({ ...message2, to: partialTo }); + } + } else { + chunk.push(message2); + chunkMessagesCount++; + } + if (chunkMessagesCount >= ExpoClientValues_1.pushNotificationChunkLimit) { + chunks.push(chunk); + chunk = []; + chunkMessagesCount = 0; + } + } + if (chunkMessagesCount) { + chunks.push(chunk); + } + return chunks; + } + chunkPushNotificationReceiptIds(receiptIds) { + return this.chunkItems(receiptIds, ExpoClientValues_1.pushNotificationReceiptChunkLimit); + } + chunkItems(items, chunkSize) { + const chunks = []; + let chunk = []; + for (const item of items) { + chunk.push(item); + if (chunk.length >= chunkSize) { + chunks.push(chunk); + chunk = []; + } + } + if (chunk.length) { + chunks.push(chunk); + } + return chunks; + } + async requestAsync(url2, options) { + let requestBody; + const sdkVersion = require_package().version; + const requestHeaders = new node_fetch_1.Headers({ + Accept: "application/json", + "Accept-Encoding": "gzip, deflate", + "User-Agent": `expo-server-sdk-node/${sdkVersion}` + }); + if (this.accessToken) { + requestHeaders.set("Authorization", `Bearer ${this.accessToken}`); + } + if (options.body != null) { + const json2 = JSON.stringify(options.body); + (0, node_assert_1.default)(json2 != null, `JSON request body must not be null`); + if (options.shouldCompress(json2)) { + requestBody = (0, node_zlib_1.gzipSync)(Buffer.from(json2)); + requestHeaders.set("Content-Encoding", "gzip"); + } else { + requestBody = json2; + } + requestHeaders.set("Content-Type", "application/json"); + } + const response = await (0, node_fetch_1.default)(url2, { + method: options.httpMethod, + body: requestBody, + headers: requestHeaders, + agent: this.httpAgent + }); + if (response.status !== 200) { + const apiError = await this.parseErrorResponseAsync(response); + throw apiError; + } + const textBody = await response.text(); + let result; + try { + result = JSON.parse(textBody); + } catch { + const apiError = await this.getTextResponseErrorAsync(response, textBody); + throw apiError; + } + if (result.errors) { + const apiError = this.getErrorFromResult(response, result); + throw apiError; + } + return result.data; + } + async parseErrorResponseAsync(response) { + const textBody = await response.text(); + let result; + try { + result = JSON.parse(textBody); + } catch { + return await this.getTextResponseErrorAsync(response, textBody); + } + if (!result.errors || !Array.isArray(result.errors) || !result.errors.length) { + const apiError = await this.getTextResponseErrorAsync(response, textBody); + apiError["errorData"] = result; + return apiError; + } + return this.getErrorFromResult(response, result); + } + async getTextResponseErrorAsync(response, text2) { + const apiError = new Error(`Expo responded with an error with status code ${response.status}: ` + text2); + apiError["statusCode"] = response.status; + apiError["errorText"] = text2; + return apiError; + } + /** + * Returns an error for the first API error in the result, with an optional `others` field that + * contains any other errors. + */ + getErrorFromResult(response, result) { + const noErrorsMessage = `Expected at least one error from Expo`; + (0, node_assert_1.default)(result.errors, noErrorsMessage); + const [errorData, ...otherErrorData] = result.errors; + node_assert_1.default.ok(errorData, noErrorsMessage); + const error50 = this.getErrorFromResultError(errorData); + if (otherErrorData.length) { + error50["others"] = otherErrorData.map((data) => this.getErrorFromResultError(data)); + } + error50["statusCode"] = response.status; + return error50; + } + /** + * Returns an error for a single API error + */ + getErrorFromResultError(errorData) { + const error50 = new Error(errorData.message); + error50["code"] = errorData.code; + if (errorData.details != null) { + error50["details"] = errorData.details; + } + if (errorData.stack != null) { + error50["serverStack"] = errorData.stack; + } + return error50; + } + static _getActualMessageCount(messages) { + return messages.reduce((total, message2) => { + if (Array.isArray(message2.to)) { + total += message2.to.length; + } else { + total++; + } + return total; + }, 0); + } + }; + var Expo2 = _Expo; + __name(Expo2, "Expo"); + __publicField(Expo2, "pushNotificationChunkSizeLimit", ExpoClientValues_1.pushNotificationChunkLimit); + __publicField(Expo2, "pushNotificationReceiptChunkSizeLimit", ExpoClientValues_1.pushNotificationReceiptChunkLimit); + exports.Expo = Expo2; + exports.default = Expo2; + } +}); + +// src/lib/const-strings.ts +var ORDER_PLACED_MESSAGE, ORDER_PACKAGED_MESSAGE, ORDER_DELIVERED_MESSAGE, ORDER_CANCELLED_MESSAGE; +var init_const_strings = __esm({ + "src/lib/const-strings.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ORDER_PLACED_MESSAGE = "Your order has been placed successfully!"; + ORDER_PACKAGED_MESSAGE = "Your order has been packaged and is ready for delivery."; + ORDER_DELIVERED_MESSAGE = "Your order has been delivered."; + ORDER_CANCELLED_MESSAGE = "Your order has been cancelled."; + } +}); + +// src/lib/notif-job.ts +async function scheduleNotification(userId, payload, options) { + const jobData = { userId, ...payload }; + await notificationQueue.add("send-notification", jobData, options); +} +async function sendOrderPlacedNotification(userId, orderId) { + await scheduleNotification(userId, { + title: "Order Placed", + body: ORDER_PLACED_MESSAGE, + type: "order", + orderId + }); +} +async function sendOrderPackagedNotification(userId, orderId) { + await scheduleNotification(userId, { + title: "Order Packaged", + body: ORDER_PACKAGED_MESSAGE, + type: "order", + orderId + }); +} +async function sendOrderDeliveredNotification(userId, orderId) { + await scheduleNotification(userId, { + title: "Order Delivered", + body: ORDER_DELIVERED_MESSAGE, + type: "order", + orderId + }); +} +async function sendOrderCancelledNotification(userId, orderId) { + await scheduleNotification(userId, { + title: "Order Cancelled", + body: ORDER_CANCELLED_MESSAGE, + type: "order", + orderId + }); +} +var import_expo_server_sdk, notificationQueue; +var init_notif_job = __esm({ + "src/lib/notif-job.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + import_expo_server_sdk = __toESM(require_ExpoClient()); + init_s3_client(); + init_const_strings(); + notificationQueue = {}; + __name(scheduleNotification, "scheduleNotification"); + __name(sendOrderPlacedNotification, "sendOrderPlacedNotification"); + __name(sendOrderPackagedNotification, "sendOrderPackagedNotification"); + __name(sendOrderDeliveredNotification, "sendOrderDeliveredNotification"); + __name(sendOrderCancelledNotification, "sendOrderCancelledNotification"); + } +}); + +// src/lib/redis-client.ts +var createClient, RedisClient, redisClient, redis_client_default; +var init_redis_client = __esm({ + "src/lib/redis-client.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_env_exporter(); + createClient = /* @__PURE__ */ __name((args) => { + }, "createClient"); + RedisClient = class { + // private client: RedisClientType; + // private subscriberClient: RedisClientType | null = null; + // private isConnected: boolean = false; + // + client; + subscriberrlient; + isConnected = false; + constructor() { + this.client = createClient({ + url: redisUrl + }); + } + async set(key, value, ttlSeconds) { + if (ttlSeconds) { + return await this.client.setEx(key, ttlSeconds, value); + } else { + return await this.client.set(key, value); + } + } + async get(key) { + return await this.client.get(key); + } + async exists(key) { + const result = await this.client.exists(key); + return result === 1; + } + async delete(key) { + return await this.client.del(key); + } + async lPush(key, value) { + return await this.client.lPush(key, value); + } + async KEYS(pattern) { + return await this.client.KEYS(pattern); + } + async MGET(keys) { + return await this.client.MGET(keys); + } + // Publish message to a channel + async publish(channel2, message2) { + return await this.client.publish(channel2, message2); + } + // Subscribe to a channel with callback + async subscribe(channel2, callback) { + console.log(`Subscribed to channel: ${channel2}`); + } + // Unsubscribe from a channel + async unsubscribe(channel2) { + } + disconnect() { + } + get isClientConnected() { + return this.isConnected; + } + }; + __name(RedisClient, "RedisClient"); + redisClient = new RedisClient(); + redis_client_default = redisClient; + } +}); + +// ../../node_modules/axios/lib/helpers/bind.js +function bind(fn, thisArg) { + return /* @__PURE__ */ __name(function wrap() { + return fn.apply(thisArg, arguments); + }, "wrap"); +} +var init_bind = __esm({ + "../../node_modules/axios/lib/helpers/bind.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(bind, "bind"); + } +}); + +// ../../node_modules/axios/lib/utils.js +function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction2(val.constructor.isBuffer) && val.constructor.isBuffer(val); +} +function isArrayBufferView(val) { + let result; + if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) { + result = ArrayBuffer.isView(val); + } else { + result = val && val.buffer && isArrayBuffer2(val.buffer); + } + return result; +} +function getGlobal() { + if (typeof globalThis !== "undefined") + return globalThis; + if (typeof self !== "undefined") + return self; + if (typeof window !== "undefined") + return window; + if (typeof global !== "undefined") + return global; + return {}; +} +function forEach(obj, fn, { allOwnKeys = false } = {}) { + if (obj === null || typeof obj === "undefined") { + return; + } + let i2; + let l2; + if (typeof obj !== "object") { + obj = [obj]; + } + if (isArray(obj)) { + for (i2 = 0, l2 = obj.length; i2 < l2; i2++) { + fn.call(null, obj[i2], i2, obj); + } + } else { + if (isBuffer(obj)) { + return; + } + const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); + const len = keys.length; + let key; + for (i2 = 0; i2 < len; i2++) { + key = keys[i2]; + fn.call(null, obj[key], key, obj); + } + } +} +function findKey(obj, key) { + if (isBuffer(obj)) { + return null; + } + key = key.toLowerCase(); + const keys = Object.keys(obj); + let i2 = keys.length; + let _key2; + while (i2-- > 0) { + _key2 = keys[i2]; + if (key === _key2.toLowerCase()) { + return _key2; + } + } + return null; +} +function merge3() { + const { caseless, skipUndefined } = isContextDefined(this) && this || {}; + const result = {}; + const assignValue = /* @__PURE__ */ __name((val, key) => { + if (key === "__proto__" || key === "constructor" || key === "prototype") { + return; + } + const targetKey = caseless && findKey(result, key) || key; + if (isPlainObject3(result[targetKey]) && isPlainObject3(val)) { + result[targetKey] = merge3(result[targetKey], val); + } else if (isPlainObject3(val)) { + result[targetKey] = merge3({}, val); + } else if (isArray(val)) { + result[targetKey] = val.slice(); + } else if (!skipUndefined || !isUndefined(val)) { + result[targetKey] = val; + } + }, "assignValue"); + for (let i2 = 0, l2 = arguments.length; i2 < l2; i2++) { + arguments[i2] && forEach(arguments[i2], assignValue); + } + return result; +} +function isSpecCompliantForm(thing) { + return !!(thing && isFunction2(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]); +} +var toString, getPrototypeOf, iterator, toStringTag, kindOf, kindOfTest, typeOfTest, isArray, isUndefined, isArrayBuffer2, isString, isFunction2, isNumber, isObject4, isBoolean, isPlainObject3, isEmptyObject, isDate, isFile, isReactNativeBlob, isReactNative, isBlob, isFileList, isStream, G2, FormDataCtor, isFormData, isURLSearchParams, isReadableStream3, isRequest, isResponse, isHeaders, trim, _global, isContextDefined, extend2, stripBOM, inherits, toFlatObject, endsWith, toArray, isTypedArray, forEachEntry, matchAll, isHTMLForm, toCamelCase2, hasOwnProperty, isRegExp, reduceDescriptors, freezeMethods, toObjectSet, noop2, toFiniteNumber, toJSONObject, isAsyncFn, isThenable, _setImmediate, asap, isIterable, utils_default; +var init_utils8 = __esm({ + "../../node_modules/axios/lib/utils.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_bind(); + ({ toString } = Object.prototype); + ({ getPrototypeOf } = Object); + ({ iterator, toStringTag } = Symbol); + kindOf = ((cache3) => (thing) => { + const str = toString.call(thing); + return cache3[str] || (cache3[str] = str.slice(8, -1).toLowerCase()); + })(/* @__PURE__ */ Object.create(null)); + kindOfTest = /* @__PURE__ */ __name((type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type; + }, "kindOfTest"); + typeOfTest = /* @__PURE__ */ __name((type) => (thing) => typeof thing === type, "typeOfTest"); + ({ isArray } = Array); + isUndefined = typeOfTest("undefined"); + __name(isBuffer, "isBuffer"); + isArrayBuffer2 = kindOfTest("ArrayBuffer"); + __name(isArrayBufferView, "isArrayBufferView"); + isString = typeOfTest("string"); + isFunction2 = typeOfTest("function"); + isNumber = typeOfTest("number"); + isObject4 = /* @__PURE__ */ __name((thing) => thing !== null && typeof thing === "object", "isObject"); + isBoolean = /* @__PURE__ */ __name((thing) => thing === true || thing === false, "isBoolean"); + isPlainObject3 = /* @__PURE__ */ __name((val) => { + if (kindOf(val) !== "object") { + return false; + } + const prototype2 = getPrototypeOf(val); + return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val); + }, "isPlainObject"); + isEmptyObject = /* @__PURE__ */ __name((val) => { + if (!isObject4(val) || isBuffer(val)) { + return false; + } + try { + return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype; + } catch (e2) { + return false; + } + }, "isEmptyObject"); + isDate = kindOfTest("Date"); + isFile = kindOfTest("File"); + isReactNativeBlob = /* @__PURE__ */ __name((value) => { + return !!(value && typeof value.uri !== "undefined"); + }, "isReactNativeBlob"); + isReactNative = /* @__PURE__ */ __name((formData) => formData && typeof formData.getParts !== "undefined", "isReactNative"); + isBlob = kindOfTest("Blob"); + isFileList = kindOfTest("FileList"); + isStream = /* @__PURE__ */ __name((val) => isObject4(val) && isFunction2(val.pipe), "isStream"); + __name(getGlobal, "getGlobal"); + G2 = getGlobal(); + FormDataCtor = typeof G2.FormData !== "undefined" ? G2.FormData : void 0; + isFormData = /* @__PURE__ */ __name((thing) => { + let kind; + return thing && (FormDataCtor && thing instanceof FormDataCtor || isFunction2(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance + kind === "object" && isFunction2(thing.toString) && thing.toString() === "[object FormData]")); + }, "isFormData"); + isURLSearchParams = kindOfTest("URLSearchParams"); + [isReadableStream3, isRequest, isResponse, isHeaders] = [ + "ReadableStream", + "Request", + "Response", + "Headers" + ].map(kindOfTest); + trim = /* @__PURE__ */ __name((str) => { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); + }, "trim"); + __name(forEach, "forEach"); + __name(findKey, "findKey"); + _global = (() => { + if (typeof globalThis !== "undefined") + return globalThis; + return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global; + })(); + isContextDefined = /* @__PURE__ */ __name((context2) => !isUndefined(context2) && context2 !== _global, "isContextDefined"); + __name(merge3, "merge"); + extend2 = /* @__PURE__ */ __name((a2, b2, thisArg, { allOwnKeys } = {}) => { + forEach( + b2, + (val, key) => { + if (thisArg && isFunction2(val)) { + Object.defineProperty(a2, key, { + value: bind(val, thisArg), + writable: true, + enumerable: true, + configurable: true + }); + } else { + Object.defineProperty(a2, key, { + value: val, + writable: true, + enumerable: true, + configurable: true + }); + } + }, + { allOwnKeys } + ); + return a2; + }, "extend"); + stripBOM = /* @__PURE__ */ __name((content) => { + if (content.charCodeAt(0) === 65279) { + content = content.slice(1); + } + return content; + }, "stripBOM"); + inherits = /* @__PURE__ */ __name((constructor, superConstructor, props, descriptors) => { + constructor.prototype = Object.create(superConstructor.prototype, descriptors); + Object.defineProperty(constructor.prototype, "constructor", { + value: constructor, + writable: true, + enumerable: false, + configurable: true + }); + Object.defineProperty(constructor, "super", { + value: superConstructor.prototype + }); + props && Object.assign(constructor.prototype, props); + }, "inherits"); + toFlatObject = /* @__PURE__ */ __name((sourceObj, destObj, filter2, propFilter) => { + let props; + let i2; + let prop; + const merged = {}; + destObj = destObj || {}; + if (sourceObj == null) + return destObj; + do { + props = Object.getOwnPropertyNames(sourceObj); + i2 = props.length; + while (i2-- > 0) { + prop = props[i2]; + if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; + } + } + sourceObj = filter2 !== false && getPrototypeOf(sourceObj); + } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype); + return destObj; + }, "toFlatObject"); + endsWith = /* @__PURE__ */ __name((str, searchString, position) => { + str = String(str); + if (position === void 0 || position > str.length) { + position = str.length; + } + position -= searchString.length; + const lastIndex = str.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; + }, "endsWith"); + toArray = /* @__PURE__ */ __name((thing) => { + if (!thing) + return null; + if (isArray(thing)) + return thing; + let i2 = thing.length; + if (!isNumber(i2)) + return null; + const arr = new Array(i2); + while (i2-- > 0) { + arr[i2] = thing[i2]; + } + return arr; + }, "toArray"); + isTypedArray = ((TypedArray) => { + return (thing) => { + return TypedArray && thing instanceof TypedArray; + }; + })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array)); + forEachEntry = /* @__PURE__ */ __name((obj, fn) => { + const generator = obj && obj[iterator]; + const _iterator = generator.call(obj); + let result; + while ((result = _iterator.next()) && !result.done) { + const pair = result.value; + fn.call(obj, pair[0], pair[1]); + } + }, "forEachEntry"); + matchAll = /* @__PURE__ */ __name((regExp, str) => { + let matches; + const arr = []; + while ((matches = regExp.exec(str)) !== null) { + arr.push(matches); + } + return arr; + }, "matchAll"); + isHTMLForm = kindOfTest("HTMLFormElement"); + toCamelCase2 = /* @__PURE__ */ __name((str) => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, /* @__PURE__ */ __name(function replacer(m2, p1, p2) { + return p1.toUpperCase() + p2; + }, "replacer")); + }, "toCamelCase"); + hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype); + isRegExp = kindOfTest("RegExp"); + reduceDescriptors = /* @__PURE__ */ __name((obj, reducer) => { + const descriptors = Object.getOwnPropertyDescriptors(obj); + const reducedDescriptors = {}; + forEach(descriptors, (descriptor, name) => { + let ret; + if ((ret = reducer(descriptor, name, obj)) !== false) { + reducedDescriptors[name] = ret || descriptor; + } + }); + Object.defineProperties(obj, reducedDescriptors); + }, "reduceDescriptors"); + freezeMethods = /* @__PURE__ */ __name((obj) => { + reduceDescriptors(obj, (descriptor, name) => { + if (isFunction2(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) { + return false; + } + const value = obj[name]; + if (!isFunction2(value)) + return; + descriptor.enumerable = false; + if ("writable" in descriptor) { + descriptor.writable = false; + return; + } + if (!descriptor.set) { + descriptor.set = () => { + throw Error("Can not rewrite read-only method '" + name + "'"); + }; + } + }); + }, "freezeMethods"); + toObjectSet = /* @__PURE__ */ __name((arrayOrString, delimiter) => { + const obj = {}; + const define2 = /* @__PURE__ */ __name((arr) => { + arr.forEach((value) => { + obj[value] = true; + }); + }, "define"); + isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter)); + return obj; + }, "toObjectSet"); + noop2 = /* @__PURE__ */ __name(() => { + }, "noop"); + toFiniteNumber = /* @__PURE__ */ __name((value, defaultValue) => { + return value != null && Number.isFinite(value = +value) ? value : defaultValue; + }, "toFiniteNumber"); + __name(isSpecCompliantForm, "isSpecCompliantForm"); + toJSONObject = /* @__PURE__ */ __name((obj) => { + const stack = new Array(10); + const visit = /* @__PURE__ */ __name((source, i2) => { + if (isObject4(source)) { + if (stack.indexOf(source) >= 0) { + return; + } + if (isBuffer(source)) { + return source; + } + if (!("toJSON" in source)) { + stack[i2] = source; + const target = isArray(source) ? [] : {}; + forEach(source, (value, key) => { + const reducedValue = visit(value, i2 + 1); + !isUndefined(reducedValue) && (target[key] = reducedValue); + }); + stack[i2] = void 0; + return target; + } + } + return source; + }, "visit"); + return visit(obj, 0); + }, "toJSONObject"); + isAsyncFn = kindOfTest("AsyncFunction"); + isThenable = /* @__PURE__ */ __name((thing) => thing && (isObject4(thing) || isFunction2(thing)) && isFunction2(thing.then) && isFunction2(thing.catch), "isThenable"); + _setImmediate = ((setImmediateSupported, postMessageSupported) => { + if (setImmediateSupported) { + return setImmediate; + } + return postMessageSupported ? ((token, callbacks) => { + _global.addEventListener( + "message", + ({ source, data }) => { + if (source === _global && data === token) { + callbacks.length && callbacks.shift()(); + } + }, + false + ); + return (cb2) => { + callbacks.push(cb2); + _global.postMessage(token, "*"); + }; + })(`axios@${Math.random()}`, []) : (cb2) => setTimeout(cb2); + })(typeof setImmediate === "function", isFunction2(_global.postMessage)); + asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate; + isIterable = /* @__PURE__ */ __name((thing) => thing != null && isFunction2(thing[iterator]), "isIterable"); + utils_default = { + isArray, + isArrayBuffer: isArrayBuffer2, + isBuffer, + isFormData, + isArrayBufferView, + isString, + isNumber, + isBoolean, + isObject: isObject4, + isPlainObject: isPlainObject3, + isEmptyObject, + isReadableStream: isReadableStream3, + isRequest, + isResponse, + isHeaders, + isUndefined, + isDate, + isFile, + isReactNativeBlob, + isReactNative, + isBlob, + isRegExp, + isFunction: isFunction2, + isStream, + isURLSearchParams, + isTypedArray, + isFileList, + forEach, + merge: merge3, + extend: extend2, + trim, + stripBOM, + inherits, + toFlatObject, + kindOf, + kindOfTest, + endsWith, + toArray, + forEachEntry, + matchAll, + isHTMLForm, + hasOwnProperty, + hasOwnProp: hasOwnProperty, + // an alias to avoid ESLint no-prototype-builtins detection + reduceDescriptors, + freezeMethods, + toObjectSet, + toCamelCase: toCamelCase2, + noop: noop2, + toFiniteNumber, + findKey, + global: _global, + isContextDefined, + isSpecCompliantForm, + toJSONObject, + isAsyncFn, + isThenable, + setImmediate: _setImmediate, + asap, + isIterable + }; + } +}); + +// ../../node_modules/axios/lib/core/AxiosError.js +var AxiosError, AxiosError_default; +var init_AxiosError = __esm({ + "../../node_modules/axios/lib/core/AxiosError.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + AxiosError = class extends Error { + static from(error50, code, config3, request, response, customProps) { + const axiosError = new AxiosError(error50.message, code || error50.code, config3, request, response); + axiosError.cause = error50; + axiosError.name = error50.name; + if (error50.status != null && axiosError.status == null) { + axiosError.status = error50.status; + } + customProps && Object.assign(axiosError, customProps); + return axiosError; + } + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ + constructor(message2, code, config3, request, response) { + super(message2); + Object.defineProperty(this, "message", { + value: message2, + enumerable: true, + writable: true, + configurable: true + }); + this.name = "AxiosError"; + this.isAxiosError = true; + code && (this.code = code); + config3 && (this.config = config3); + request && (this.request = request); + if (response) { + this.response = response; + this.status = response.status; + } + } + toJSON() { + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: utils_default.toJSONObject(this.config), + code: this.code, + status: this.status + }; + } + }; + __name(AxiosError, "AxiosError"); + AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE"; + AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION"; + AxiosError.ECONNABORTED = "ECONNABORTED"; + AxiosError.ETIMEDOUT = "ETIMEDOUT"; + AxiosError.ERR_NETWORK = "ERR_NETWORK"; + AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS"; + AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED"; + AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE"; + AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST"; + AxiosError.ERR_CANCELED = "ERR_CANCELED"; + AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT"; + AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL"; + AxiosError_default = AxiosError; + } +}); + +// ../../node_modules/axios/lib/helpers/null.js +var null_default; +var init_null = __esm({ + "../../node_modules/axios/lib/helpers/null.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + null_default = null; + } +}); + +// ../../node_modules/axios/lib/helpers/toFormData.js +function isVisitable(thing) { + return utils_default.isPlainObject(thing) || utils_default.isArray(thing); +} +function removeBrackets(key) { + return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key; +} +function renderKey(path, key, dots) { + if (!path) + return key; + return path.concat(key).map(/* @__PURE__ */ __name(function each(token, i2) { + token = removeBrackets(token); + return !dots && i2 ? "[" + token + "]" : token; + }, "each")).join(dots ? "." : ""); +} +function isFlatArray(arr) { + return utils_default.isArray(arr) && !arr.some(isVisitable); +} +function toFormData(obj, formData, options) { + if (!utils_default.isObject(obj)) { + throw new TypeError("target must be an object"); + } + formData = formData || new (null_default || FormData)(); + options = utils_default.toFlatObject( + options, + { + metaTokens: true, + dots: false, + indexes: false + }, + false, + /* @__PURE__ */ __name(function defined(option, source) { + return !utils_default.isUndefined(source[option]); + }, "defined") + ); + const metaTokens = options.metaTokens; + const visitor = options.visitor || defaultVisitor; + const dots = options.dots; + const indexes = options.indexes; + const _Blob = options.Blob || typeof Blob !== "undefined" && Blob; + const useBlob = _Blob && utils_default.isSpecCompliantForm(formData); + if (!utils_default.isFunction(visitor)) { + throw new TypeError("visitor must be a function"); + } + function convertValue(value) { + if (value === null) + return ""; + if (utils_default.isDate(value)) { + return value.toISOString(); + } + if (utils_default.isBoolean(value)) { + return value.toString(); + } + if (!useBlob && utils_default.isBlob(value)) { + throw new AxiosError_default("Blob is not supported. Use a Buffer instead."); + } + if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) { + return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value); + } + return value; + } + __name(convertValue, "convertValue"); + function defaultVisitor(value, key, path) { + let arr = value; + if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) { + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + if (value && !path && typeof value === "object") { + if (utils_default.endsWith(key, "{}")) { + key = metaTokens ? key : key.slice(0, -2); + value = JSON.stringify(value); + } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) { + key = removeBrackets(key); + arr.forEach(/* @__PURE__ */ __name(function each(el, index) { + !(utils_default.isUndefined(el) || el === null) && formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", + convertValue(el) + ); + }, "each")); + return false; + } + } + if (isVisitable(value)) { + return true; + } + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + __name(defaultVisitor, "defaultVisitor"); + const stack = []; + const exposedHelpers = Object.assign(predicates, { + defaultVisitor, + convertValue, + isVisitable + }); + function build(value, path) { + if (utils_default.isUndefined(value)) + return; + if (stack.indexOf(value) !== -1) { + throw Error("Circular reference detected in " + path.join(".")); + } + stack.push(value); + utils_default.forEach(value, /* @__PURE__ */ __name(function each(el, key) { + const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers); + if (result === true) { + build(el, path ? path.concat(key) : [key]); + } + }, "each")); + stack.pop(); + } + __name(build, "build"); + if (!utils_default.isObject(obj)) { + throw new TypeError("data must be an object"); + } + build(obj); + return formData; +} +var predicates, toFormData_default; +var init_toFormData = __esm({ + "../../node_modules/axios/lib/helpers/toFormData.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_AxiosError(); + init_null(); + __name(isVisitable, "isVisitable"); + __name(removeBrackets, "removeBrackets"); + __name(renderKey, "renderKey"); + __name(isFlatArray, "isFlatArray"); + predicates = utils_default.toFlatObject(utils_default, {}, null, /* @__PURE__ */ __name(function filter(prop) { + return /^is[A-Z]/.test(prop); + }, "filter")); + __name(toFormData, "toFormData"); + toFormData_default = toFormData; + } +}); + +// ../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js +function encode5(str) { + const charMap = { + "!": "%21", + "'": "%27", + "(": "%28", + ")": "%29", + "~": "%7E", + "%20": "+", + "%00": "\0" + }; + return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, /* @__PURE__ */ __name(function replacer(match2) { + return charMap[match2]; + }, "replacer")); +} +function AxiosURLSearchParams(params, options) { + this._pairs = []; + params && toFormData_default(params, this, options); +} +var prototype, AxiosURLSearchParams_default; +var init_AxiosURLSearchParams = __esm({ + "../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_toFormData(); + __name(encode5, "encode"); + __name(AxiosURLSearchParams, "AxiosURLSearchParams"); + prototype = AxiosURLSearchParams.prototype; + prototype.append = /* @__PURE__ */ __name(function append(name, value) { + this._pairs.push([name, value]); + }, "append"); + prototype.toString = /* @__PURE__ */ __name(function toString2(encoder2) { + const _encode2 = encoder2 ? function(value) { + return encoder2.call(this, value, encode5); + } : encode5; + return this._pairs.map(/* @__PURE__ */ __name(function each(pair) { + return _encode2(pair[0]) + "=" + _encode2(pair[1]); + }, "each"), "").join("&"); + }, "toString"); + AxiosURLSearchParams_default = AxiosURLSearchParams; + } +}); + +// ../../node_modules/axios/lib/helpers/buildURL.js +function encode6(val) { + return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+"); +} +function buildURL(url2, params, options) { + if (!params) { + return url2; + } + const _encode2 = options && options.encode || encode6; + const _options = utils_default.isFunction(options) ? { + serialize: options + } : options; + const serializeFn = _options && _options.serialize; + let serializedParams; + if (serializeFn) { + serializedParams = serializeFn(params, _options); + } else { + serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, _options).toString(_encode2); + } + if (serializedParams) { + const hashmarkIndex = url2.indexOf("#"); + if (hashmarkIndex !== -1) { + url2 = url2.slice(0, hashmarkIndex); + } + url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams; + } + return url2; +} +var init_buildURL = __esm({ + "../../node_modules/axios/lib/helpers/buildURL.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_AxiosURLSearchParams(); + __name(encode6, "encode"); + __name(buildURL, "buildURL"); + } +}); + +// ../../node_modules/axios/lib/core/InterceptorManager.js +var InterceptorManager, InterceptorManager_default; +var init_InterceptorManager = __esm({ + "../../node_modules/axios/lib/core/InterceptorManager.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + InterceptorManager = class { + constructor() { + this.handlers = []; + } + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * @param {Object} options The options for the interceptor, synchronous and runWhen + * + * @return {Number} An ID used to remove interceptor later + */ + use(fulfilled, rejected, options) { + this.handlers.push({ + fulfilled, + rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null + }); + return this.handlers.length - 1; + } + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {void} + */ + eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } + } + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + clear() { + if (this.handlers) { + this.handlers = []; + } + } + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + forEach(fn) { + utils_default.forEach(this.handlers, /* @__PURE__ */ __name(function forEachHandler(h2) { + if (h2 !== null) { + fn(h2); + } + }, "forEachHandler")); + } + }; + __name(InterceptorManager, "InterceptorManager"); + InterceptorManager_default = InterceptorManager; + } +}); + +// ../../node_modules/axios/lib/defaults/transitional.js +var transitional_default; +var init_transitional = __esm({ + "../../node_modules/axios/lib/defaults/transitional.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + transitional_default = { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false, + legacyInterceptorReqResOrdering: true + }; + } +}); + +// ../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +var URLSearchParams_default; +var init_URLSearchParams = __esm({ + "../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AxiosURLSearchParams(); + URLSearchParams_default = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams_default; + } +}); + +// ../../node_modules/axios/lib/platform/browser/classes/FormData.js +var FormData_default; +var init_FormData = __esm({ + "../../node_modules/axios/lib/platform/browser/classes/FormData.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + FormData_default = typeof FormData !== "undefined" ? FormData : null; + } +}); + +// ../../node_modules/axios/lib/platform/browser/classes/Blob.js +var Blob_default; +var init_Blob = __esm({ + "../../node_modules/axios/lib/platform/browser/classes/Blob.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Blob_default = typeof Blob !== "undefined" ? Blob : null; + } +}); + +// ../../node_modules/axios/lib/platform/browser/index.js +var browser_default; +var init_browser = __esm({ + "../../node_modules/axios/lib/platform/browser/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_URLSearchParams(); + init_FormData(); + init_Blob(); + browser_default = { + isBrowser: true, + classes: { + URLSearchParams: URLSearchParams_default, + FormData: FormData_default, + Blob: Blob_default + }, + protocols: ["http", "https", "file", "blob", "url", "data"] + }; + } +}); + +// ../../node_modules/axios/lib/platform/common/utils.js +var utils_exports = {}; +__export(utils_exports, { + hasBrowserEnv: () => hasBrowserEnv, + hasStandardBrowserEnv: () => hasStandardBrowserEnv, + hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv, + navigator: () => _navigator, + origin: () => origin +}); +var hasBrowserEnv, _navigator, hasStandardBrowserEnv, hasStandardBrowserWebWorkerEnv, origin; +var init_utils9 = __esm({ + "../../node_modules/axios/lib/platform/common/utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined"; + _navigator = typeof navigator === "object" && navigator || void 0; + hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0); + hasStandardBrowserWebWorkerEnv = (() => { + return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && typeof self.importScripts === "function"; + })(); + origin = hasBrowserEnv && window.location.href || "http://localhost"; + } +}); + +// ../../node_modules/axios/lib/platform/index.js +var platform_default; +var init_platform = __esm({ + "../../node_modules/axios/lib/platform/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_browser(); + init_utils9(); + platform_default = { + ...utils_exports, + ...browser_default + }; + } +}); + +// ../../node_modules/axios/lib/helpers/toURLEncodedForm.js +function toURLEncodedForm(data, options) { + return toFormData_default(data, new platform_default.classes.URLSearchParams(), { + visitor: function(value, key, path, helpers) { + if (platform_default.isNode && utils_default.isBuffer(value)) { + this.append(key, value.toString("base64")); + return false; + } + return helpers.defaultVisitor.apply(this, arguments); + }, + ...options + }); +} +var init_toURLEncodedForm = __esm({ + "../../node_modules/axios/lib/helpers/toURLEncodedForm.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_toFormData(); + init_platform(); + __name(toURLEncodedForm, "toURLEncodedForm"); + } +}); + +// ../../node_modules/axios/lib/helpers/formDataToJSON.js +function parsePropPath(name) { + return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match2) => { + return match2[0] === "[]" ? "" : match2[1] || match2[0]; + }); +} +function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i2; + const len = keys.length; + let key; + for (i2 = 0; i2 < len; i2++) { + key = keys[i2]; + obj[key] = arr[key]; + } + return obj; +} +function formDataToJSON(formData) { + function buildPath(path, value, target, index) { + let name = path[index++]; + if (name === "__proto__") + return true; + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path.length; + name = !name && utils_default.isArray(target) ? target.length : name; + if (isLast) { + if (utils_default.hasOwnProp(target, name)) { + target[name] = [target[name], value]; + } else { + target[name] = value; + } + return !isNumericKey; + } + if (!target[name] || !utils_default.isObject(target[name])) { + target[name] = []; + } + const result = buildPath(path, value, target[name], index); + if (result && utils_default.isArray(target[name])) { + target[name] = arrayToObject(target[name]); + } + return !isNumericKey; + } + __name(buildPath, "buildPath"); + if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) { + const obj = {}; + utils_default.forEachEntry(formData, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); + return obj; + } + return null; +} +var formDataToJSON_default; +var init_formDataToJSON = __esm({ + "../../node_modules/axios/lib/helpers/formDataToJSON.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + __name(parsePropPath, "parsePropPath"); + __name(arrayToObject, "arrayToObject"); + __name(formDataToJSON, "formDataToJSON"); + formDataToJSON_default = formDataToJSON; + } +}); + +// ../../node_modules/axios/lib/defaults/index.js +function stringifySafely(rawValue, parser2, encoder2) { + if (utils_default.isString(rawValue)) { + try { + (parser2 || JSON.parse)(rawValue); + return utils_default.trim(rawValue); + } catch (e2) { + if (e2.name !== "SyntaxError") { + throw e2; + } + } + } + return (encoder2 || JSON.stringify)(rawValue); +} +var defaults, defaults_default; +var init_defaults = __esm({ + "../../node_modules/axios/lib/defaults/index.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_AxiosError(); + init_transitional(); + init_toFormData(); + init_toURLEncodedForm(); + init_platform(); + init_formDataToJSON(); + __name(stringifySafely, "stringifySafely"); + defaults = { + transitional: transitional_default, + adapter: ["xhr", "http", "fetch"], + transformRequest: [ + /* @__PURE__ */ __name(function transformRequest(data, headers) { + const contentType = headers.getContentType() || ""; + const hasJSONContentType = contentType.indexOf("application/json") > -1; + const isObjectPayload = utils_default.isObject(data); + if (isObjectPayload && utils_default.isHTMLForm(data)) { + data = new FormData(data); + } + const isFormData2 = utils_default.isFormData(data); + if (isFormData2) { + return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data; + } + if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) { + return data; + } + if (utils_default.isArrayBufferView(data)) { + return data.buffer; + } + if (utils_default.isURLSearchParams(data)) { + headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false); + return data.toString(); + } + let isFileList2; + if (isObjectPayload) { + if (contentType.indexOf("application/x-www-form-urlencoded") > -1) { + return toURLEncodedForm(data, this.formSerializer).toString(); + } + if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) { + const _FormData = this.env && this.env.FormData; + return toFormData_default( + isFileList2 ? { "files[]": data } : data, + _FormData && new _FormData(), + this.formSerializer + ); + } + } + if (isObjectPayload || hasJSONContentType) { + headers.setContentType("application/json", false); + return stringifySafely(data); + } + return data; + }, "transformRequest") + ], + transformResponse: [ + /* @__PURE__ */ __name(function transformResponse(data) { + const transitional2 = this.transitional || defaults.transitional; + const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing; + const JSONRequested = this.responseType === "json"; + if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) { + return data; + } + if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) { + const silentJSONParsing = transitional2 && transitional2.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; + try { + return JSON.parse(data, this.parseReviver); + } catch (e2) { + if (strictJSONParsing) { + if (e2.name === "SyntaxError") { + throw AxiosError_default.from(e2, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response); + } + throw e2; + } + } + } + return data; + }, "transformResponse") + ], + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + xsrfCookieName: "XSRF-TOKEN", + xsrfHeaderName: "X-XSRF-TOKEN", + maxContentLength: -1, + maxBodyLength: -1, + env: { + FormData: platform_default.classes.FormData, + Blob: platform_default.classes.Blob + }, + validateStatus: /* @__PURE__ */ __name(function validateStatus(status) { + return status >= 200 && status < 300; + }, "validateStatus"), + headers: { + common: { + Accept: "application/json, text/plain, */*", + "Content-Type": void 0 + } + } + }; + utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => { + defaults.headers[method] = {}; + }); + defaults_default = defaults; + } +}); + +// ../../node_modules/axios/lib/helpers/parseHeaders.js +var ignoreDuplicateOf, parseHeaders_default; +var init_parseHeaders = __esm({ + "../../node_modules/axios/lib/helpers/parseHeaders.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + ignoreDuplicateOf = utils_default.toObjectSet([ + "age", + "authorization", + "content-length", + "content-type", + "etag", + "expires", + "from", + "host", + "if-modified-since", + "if-unmodified-since", + "last-modified", + "location", + "max-forwards", + "proxy-authorization", + "referer", + "retry-after", + "user-agent" + ]); + parseHeaders_default = /* @__PURE__ */ __name((rawHeaders) => { + const parsed = {}; + let key; + let val; + let i2; + rawHeaders && rawHeaders.split("\n").forEach(/* @__PURE__ */ __name(function parser2(line) { + i2 = line.indexOf(":"); + key = line.substring(0, i2).trim().toLowerCase(); + val = line.substring(i2 + 1).trim(); + if (!key || parsed[key] && ignoreDuplicateOf[key]) { + return; + } + if (key === "set-cookie") { + if (parsed[key]) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = parsed[key] ? parsed[key] + ", " + val : val; + } + }, "parser")); + return parsed; + }, "default"); + } +}); + +// ../../node_modules/axios/lib/core/AxiosHeaders.js +function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); +} +function normalizeValue(value) { + if (value === false || value == null) { + return value; + } + return utils_default.isArray(value) ? value.map(normalizeValue) : String(value); +} +function parseTokens(str) { + const tokens = /* @__PURE__ */ Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match2; + while (match2 = tokensRE.exec(str)) { + tokens[match2[1]] = match2[2]; + } + return tokens; +} +function matchHeaderValue(context2, value, header, filter2, isHeaderNameFilter) { + if (utils_default.isFunction(filter2)) { + return filter2.call(this, value, header); + } + if (isHeaderNameFilter) { + value = header; + } + if (!utils_default.isString(value)) + return; + if (utils_default.isString(filter2)) { + return value.indexOf(filter2) !== -1; + } + if (utils_default.isRegExp(filter2)) { + return filter2.test(value); + } +} +function formatHeader(header) { + return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w2, char, str) => { + return char.toUpperCase() + str; + }); +} +function buildAccessors(obj, header) { + const accessorName = utils_default.toCamelCase(" " + header); + ["get", "set", "has"].forEach((methodName) => { + Object.defineProperty(obj, methodName + accessorName, { + value: function(arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true + }); + }); +} +var $internals, isValidHeaderName, AxiosHeaders, AxiosHeaders_default; +var init_AxiosHeaders = __esm({ + "../../node_modules/axios/lib/core/AxiosHeaders.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_parseHeaders(); + $internals = Symbol("internals"); + __name(normalizeHeader, "normalizeHeader"); + __name(normalizeValue, "normalizeValue"); + __name(parseTokens, "parseTokens"); + isValidHeaderName = /* @__PURE__ */ __name((str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()), "isValidHeaderName"); + __name(matchHeaderValue, "matchHeaderValue"); + __name(formatHeader, "formatHeader"); + __name(buildAccessors, "buildAccessors"); + AxiosHeaders = class { + constructor(headers) { + headers && this.set(headers); + } + set(header, valueOrRewrite, rewrite) { + const self2 = this; + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); + if (!lHeader) { + throw new Error("header name must be a non-empty string"); + } + const key = utils_default.findKey(self2, lHeader); + if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) { + self2[key || _header] = normalizeValue(_value); + } + } + __name(setHeader, "setHeader"); + const setHeaders = /* @__PURE__ */ __name((headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)), "setHeaders"); + if (utils_default.isPlainObject(header) || header instanceof this.constructor) { + setHeaders(header, valueOrRewrite); + } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + setHeaders(parseHeaders_default(header), valueOrRewrite); + } else if (utils_default.isObject(header) && utils_default.isIterable(header)) { + let obj = {}, dest, key; + for (const entry of header) { + if (!utils_default.isArray(entry)) { + throw TypeError("Object iterator must return a key-value pair"); + } + obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1]; + } + setHeaders(obj, valueOrRewrite); + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); + } + return this; + } + get(header, parser2) { + header = normalizeHeader(header); + if (header) { + const key = utils_default.findKey(this, header); + if (key) { + const value = this[key]; + if (!parser2) { + return value; + } + if (parser2 === true) { + return parseTokens(value); + } + if (utils_default.isFunction(parser2)) { + return parser2.call(this, value, key); + } + if (utils_default.isRegExp(parser2)) { + return parser2.exec(value); + } + throw new TypeError("parser must be boolean|regexp|function"); + } + } + } + has(header, matcher) { + header = normalizeHeader(header); + if (header) { + const key = utils_default.findKey(this, header); + return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher))); + } + return false; + } + delete(header, matcher) { + const self2 = this; + let deleted = false; + function deleteHeader(_header) { + _header = normalizeHeader(_header); + if (_header) { + const key = utils_default.findKey(self2, _header); + if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) { + delete self2[key]; + deleted = true; + } + } + } + __name(deleteHeader, "deleteHeader"); + if (utils_default.isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); + } + return deleted; + } + clear(matcher) { + const keys = Object.keys(this); + let i2 = keys.length; + let deleted = false; + while (i2--) { + const key = keys[i2]; + if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; + } + } + return deleted; + } + normalize(format2) { + const self2 = this; + const headers = {}; + utils_default.forEach(this, (value, header) => { + const key = utils_default.findKey(headers, header); + if (key) { + self2[key] = normalizeValue(value); + delete self2[header]; + return; + } + const normalized = format2 ? formatHeader(header) : String(header).trim(); + if (normalized !== header) { + delete self2[header]; + } + self2[normalized] = normalizeValue(value); + headers[normalized] = true; + }); + return this; + } + concat(...targets) { + return this.constructor.concat(this, ...targets); + } + toJSON(asStrings) { + const obj = /* @__PURE__ */ Object.create(null); + utils_default.forEach(this, (value, header) => { + value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value); + }); + return obj; + } + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + toString() { + return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n"); + } + getSetCookie() { + return this.get("set-cookie") || []; + } + get [Symbol.toStringTag]() { + return "AxiosHeaders"; + } + static from(thing) { + return thing instanceof this ? thing : new this(thing); + } + static concat(first, ...targets) { + const computed = new this(first); + targets.forEach((target) => computed.set(target)); + return computed; + } + static accessor(header) { + const internals = this[$internals] = this[$internals] = { + accessors: {} + }; + const accessors = internals.accessors; + const prototype2 = this.prototype; + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); + if (!accessors[lHeader]) { + buildAccessors(prototype2, _header); + accessors[lHeader] = true; + } + } + __name(defineAccessor, "defineAccessor"); + utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + return this; + } + }; + __name(AxiosHeaders, "AxiosHeaders"); + AxiosHeaders.accessor([ + "Content-Type", + "Content-Length", + "Accept", + "Accept-Encoding", + "User-Agent", + "Authorization" + ]); + utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); + return { + get: () => value, + set(headerValue) { + this[mapped] = headerValue; + } + }; + }); + utils_default.freezeMethods(AxiosHeaders); + AxiosHeaders_default = AxiosHeaders; + } +}); + +// ../../node_modules/axios/lib/core/transformData.js +function transformData(fns, response) { + const config3 = this || defaults_default; + const context2 = response || config3; + const headers = AxiosHeaders_default.from(context2.headers); + let data = context2.data; + utils_default.forEach(fns, /* @__PURE__ */ __name(function transform2(fn) { + data = fn.call(config3, data, headers.normalize(), response ? response.status : void 0); + }, "transform")); + headers.normalize(); + return data; +} +var init_transformData = __esm({ + "../../node_modules/axios/lib/core/transformData.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_defaults(); + init_AxiosHeaders(); + __name(transformData, "transformData"); + } +}); + +// ../../node_modules/axios/lib/cancel/isCancel.js +function isCancel(value) { + return !!(value && value.__CANCEL__); +} +var init_isCancel = __esm({ + "../../node_modules/axios/lib/cancel/isCancel.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(isCancel, "isCancel"); + } +}); + +// ../../node_modules/axios/lib/cancel/CanceledError.js +var CanceledError, CanceledError_default; +var init_CanceledError = __esm({ + "../../node_modules/axios/lib/cancel/CanceledError.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AxiosError(); + CanceledError = class extends AxiosError_default { + /** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ + constructor(message2, config3, request) { + super(message2 == null ? "canceled" : message2, AxiosError_default.ERR_CANCELED, config3, request); + this.name = "CanceledError"; + this.__CANCEL__ = true; + } + }; + __name(CanceledError, "CanceledError"); + CanceledError_default = CanceledError; + } +}); + +// ../../node_modules/axios/lib/core/settle.js +function settle(resolve, reject, response) { + const validateStatus2 = response.config.validateStatus; + if (!response.status || !validateStatus2 || validateStatus2(response.status)) { + resolve(response); + } else { + reject( + new AxiosError_default( + "Request failed with status code " + response.status, + [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], + response.config, + response.request, + response + ) + ); + } +} +var init_settle = __esm({ + "../../node_modules/axios/lib/core/settle.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AxiosError(); + __name(settle, "settle"); + } +}); + +// ../../node_modules/axios/lib/helpers/parseProtocol.js +function parseProtocol(url2) { + const match2 = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2); + return match2 && match2[1] || ""; +} +var init_parseProtocol = __esm({ + "../../node_modules/axios/lib/helpers/parseProtocol.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(parseProtocol, "parseProtocol"); + } +}); + +// ../../node_modules/axios/lib/helpers/speedometer.js +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; + min = min !== void 0 ? min : 1e3; + return /* @__PURE__ */ __name(function push(chunkLength) { + const now = Date.now(); + const startedAt = timestamps[tail]; + if (!firstSampleTS) { + firstSampleTS = now; + } + bytes[head] = chunkLength; + timestamps[head] = now; + let i2 = tail; + let bytesCount = 0; + while (i2 !== head) { + bytesCount += bytes[i2++]; + i2 = i2 % samplesCount; + } + head = (head + 1) % samplesCount; + if (head === tail) { + tail = (tail + 1) % samplesCount; + } + if (now - firstSampleTS < min) { + return; + } + const passed = startedAt && now - startedAt; + return passed ? Math.round(bytesCount * 1e3 / passed) : void 0; + }, "push"); +} +var speedometer_default; +var init_speedometer = __esm({ + "../../node_modules/axios/lib/helpers/speedometer.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(speedometer, "speedometer"); + speedometer_default = speedometer; + } +}); + +// ../../node_modules/axios/lib/helpers/throttle.js +function throttle(fn, freq) { + let timestamp = 0; + let threshold = 1e3 / freq; + let lastArgs; + let timer; + const invoke = /* @__PURE__ */ __name((args, now = Date.now()) => { + timestamp = now; + lastArgs = null; + if (timer) { + clearTimeout(timer); + timer = null; + } + fn(...args); + }, "invoke"); + const throttled = /* @__PURE__ */ __name((...args) => { + const now = Date.now(); + const passed = now - timestamp; + if (passed >= threshold) { + invoke(args, now); + } else { + lastArgs = args; + if (!timer) { + timer = setTimeout(() => { + timer = null; + invoke(lastArgs); + }, threshold - passed); + } + } + }, "throttled"); + const flush2 = /* @__PURE__ */ __name(() => lastArgs && invoke(lastArgs), "flush"); + return [throttled, flush2]; +} +var throttle_default; +var init_throttle = __esm({ + "../../node_modules/axios/lib/helpers/throttle.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(throttle, "throttle"); + throttle_default = throttle; + } +}); + +// ../../node_modules/axios/lib/helpers/progressEventReducer.js +var progressEventReducer, progressEventDecorator, asyncDecorator; +var init_progressEventReducer = __esm({ + "../../node_modules/axios/lib/helpers/progressEventReducer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_speedometer(); + init_throttle(); + init_utils8(); + progressEventReducer = /* @__PURE__ */ __name((listener, isDownloadStream, freq = 3) => { + let bytesNotified = 0; + const _speedometer = speedometer_default(50, 250); + return throttle_default((e2) => { + const loaded = e2.loaded; + const total = e2.lengthComputable ? e2.total : void 0; + const progressBytes = loaded - bytesNotified; + const rate = _speedometer(progressBytes); + const inRange = loaded <= total; + bytesNotified = loaded; + const data = { + loaded, + total, + progress: total ? loaded / total : void 0, + bytes: progressBytes, + rate: rate ? rate : void 0, + estimated: rate && total && inRange ? (total - loaded) / rate : void 0, + event: e2, + lengthComputable: total != null, + [isDownloadStream ? "download" : "upload"]: true + }; + listener(data); + }, freq); + }, "progressEventReducer"); + progressEventDecorator = /* @__PURE__ */ __name((total, throttled) => { + const lengthComputable = total != null; + return [ + (loaded) => throttled[0]({ + lengthComputable, + total, + loaded + }), + throttled[1] + ]; + }, "progressEventDecorator"); + asyncDecorator = /* @__PURE__ */ __name((fn) => (...args) => utils_default.asap(() => fn(...args)), "asyncDecorator"); + } +}); + +// ../../node_modules/axios/lib/helpers/isURLSameOrigin.js +var isURLSameOrigin_default; +var init_isURLSameOrigin = __esm({ + "../../node_modules/axios/lib/helpers/isURLSameOrigin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_platform(); + isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((origin2, isMSIE) => (url2) => { + url2 = new URL(url2, platform_default.origin); + return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port); + })( + new URL(platform_default.origin), + platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent) + ) : () => true; + } +}); + +// ../../node_modules/axios/lib/helpers/cookies.js +var cookies_default; +var init_cookies = __esm({ + "../../node_modules/axios/lib/helpers/cookies.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_platform(); + cookies_default = platform_default.hasStandardBrowserEnv ? ( + // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain3, secure, sameSite) { + if (typeof document === "undefined") + return; + const cookie = [`${name}=${encodeURIComponent(value)}`]; + if (utils_default.isNumber(expires)) { + cookie.push(`expires=${new Date(expires).toUTCString()}`); + } + if (utils_default.isString(path)) { + cookie.push(`path=${path}`); + } + if (utils_default.isString(domain3)) { + cookie.push(`domain=${domain3}`); + } + if (secure === true) { + cookie.push("secure"); + } + if (utils_default.isString(sameSite)) { + cookie.push(`SameSite=${sameSite}`); + } + document.cookie = cookie.join("; "); + }, + read(name) { + if (typeof document === "undefined") + return null; + const match2 = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)")); + return match2 ? decodeURIComponent(match2[1]) : null; + }, + remove(name) { + this.write(name, "", Date.now() - 864e5, "/"); + } + } + ) : ( + // Non-standard browser env (web workers, react-native) lack needed support. + { + write() { + }, + read() { + return null; + }, + remove() { + } + } + ); + } +}); + +// ../../node_modules/axios/lib/helpers/isAbsoluteURL.js +function isAbsoluteURL(url2) { + if (typeof url2 !== "string") { + return false; + } + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2); +} +var init_isAbsoluteURL = __esm({ + "../../node_modules/axios/lib/helpers/isAbsoluteURL.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(isAbsoluteURL, "isAbsoluteURL"); + } +}); + +// ../../node_modules/axios/lib/helpers/combineURLs.js +function combineURLs(baseURL, relativeURL) { + return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL; +} +var init_combineURLs = __esm({ + "../../node_modules/axios/lib/helpers/combineURLs.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(combineURLs, "combineURLs"); + } +}); + +// ../../node_modules/axios/lib/core/buildFullPath.js +function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { + let isRelativeUrl = !isAbsoluteURL(requestedURL); + if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { + return combineURLs(baseURL, requestedURL); + } + return requestedURL; +} +var init_buildFullPath = __esm({ + "../../node_modules/axios/lib/core/buildFullPath.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_isAbsoluteURL(); + init_combineURLs(); + __name(buildFullPath, "buildFullPath"); + } +}); + +// ../../node_modules/axios/lib/core/mergeConfig.js +function mergeConfig(config1, config22) { + config22 = config22 || {}; + const config3 = {}; + function getMergedValue(target, source, prop, caseless) { + if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) { + return utils_default.merge.call({ caseless }, target, source); + } else if (utils_default.isPlainObject(source)) { + return utils_default.merge({}, source); + } else if (utils_default.isArray(source)) { + return source.slice(); + } + return source; + } + __name(getMergedValue, "getMergedValue"); + function mergeDeepProperties(a2, b2, prop, caseless) { + if (!utils_default.isUndefined(b2)) { + return getMergedValue(a2, b2, prop, caseless); + } else if (!utils_default.isUndefined(a2)) { + return getMergedValue(void 0, a2, prop, caseless); + } + } + __name(mergeDeepProperties, "mergeDeepProperties"); + function valueFromConfig2(a2, b2) { + if (!utils_default.isUndefined(b2)) { + return getMergedValue(void 0, b2); + } + } + __name(valueFromConfig2, "valueFromConfig2"); + function defaultToConfig2(a2, b2) { + if (!utils_default.isUndefined(b2)) { + return getMergedValue(void 0, b2); + } else if (!utils_default.isUndefined(a2)) { + return getMergedValue(void 0, a2); + } + } + __name(defaultToConfig2, "defaultToConfig2"); + function mergeDirectKeys(a2, b2, prop) { + if (prop in config22) { + return getMergedValue(a2, b2); + } else if (prop in config1) { + return getMergedValue(void 0, a2); + } + } + __name(mergeDirectKeys, "mergeDirectKeys"); + const mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + withXSRFToken: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: (a2, b2, prop) => mergeDeepProperties(headersToObject(a2), headersToObject(b2), prop, true) + }; + utils_default.forEach(Object.keys({ ...config1, ...config22 }), /* @__PURE__ */ __name(function computeConfigValue(prop) { + if (prop === "__proto__" || prop === "constructor" || prop === "prototype") + return; + const merge4 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; + const configValue = merge4(config1[prop], config22[prop], prop); + utils_default.isUndefined(configValue) && merge4 !== mergeDirectKeys || (config3[prop] = configValue); + }, "computeConfigValue")); + return config3; +} +var headersToObject; +var init_mergeConfig = __esm({ + "../../node_modules/axios/lib/core/mergeConfig.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_AxiosHeaders(); + headersToObject = /* @__PURE__ */ __name((thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing, "headersToObject"); + __name(mergeConfig, "mergeConfig"); + } +}); + +// ../../node_modules/axios/lib/helpers/resolveConfig.js +var resolveConfig_default; +var init_resolveConfig = __esm({ + "../../node_modules/axios/lib/helpers/resolveConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_platform(); + init_utils8(); + init_isURLSameOrigin(); + init_cookies(); + init_buildFullPath(); + init_mergeConfig(); + init_AxiosHeaders(); + init_buildURL(); + resolveConfig_default = /* @__PURE__ */ __name((config3) => { + const newConfig = mergeConfig({}, config3); + let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig; + newConfig.headers = headers = AxiosHeaders_default.from(headers); + newConfig.url = buildURL( + buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), + config3.params, + config3.paramsSerializer + ); + if (auth) { + headers.set( + "Authorization", + "Basic " + btoa( + (auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "") + ) + ); + } + if (utils_default.isFormData(data)) { + if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) { + headers.setContentType(void 0); + } else if (utils_default.isFunction(data.getHeaders)) { + const formHeaders = data.getHeaders(); + const allowedHeaders = ["content-type", "content-length"]; + Object.entries(formHeaders).forEach(([key, val]) => { + if (allowedHeaders.includes(key.toLowerCase())) { + headers.set(key, val); + } + }); + } + } + if (platform_default.hasStandardBrowserEnv) { + withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); + if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) { + const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName); + if (xsrfValue) { + headers.set(xsrfHeaderName, xsrfValue); + } + } + } + return newConfig; + }, "default"); + } +}); + +// ../../node_modules/axios/lib/adapters/xhr.js +var isXHRAdapterSupported, xhr_default; +var init_xhr = __esm({ + "../../node_modules/axios/lib/adapters/xhr.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_settle(); + init_transitional(); + init_AxiosError(); + init_CanceledError(); + init_parseProtocol(); + init_platform(); + init_AxiosHeaders(); + init_progressEventReducer(); + init_resolveConfig(); + isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined"; + xhr_default = isXHRAdapterSupported && function(config3) { + return new Promise(/* @__PURE__ */ __name(function dispatchXhrRequest(resolve, reject) { + const _config = resolveConfig_default(config3); + let requestData = _config.data; + const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize(); + let { responseType, onUploadProgress, onDownloadProgress } = _config; + let onCanceled; + let uploadThrottled, downloadThrottled; + let flushUpload, flushDownload; + function done() { + flushUpload && flushUpload(); + flushDownload && flushDownload(); + _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); + _config.signal && _config.signal.removeEventListener("abort", onCanceled); + } + __name(done, "done"); + let request = new XMLHttpRequest(); + request.open(_config.method.toUpperCase(), _config.url, true); + request.timeout = _config.timeout; + function onloadend() { + if (!request) { + return; + } + const responseHeaders = AxiosHeaders_default.from( + "getAllResponseHeaders" in request && request.getAllResponseHeaders() + ); + const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response; + const response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config: config3, + request + }; + settle( + /* @__PURE__ */ __name(function _resolve(value) { + resolve(value); + done(); + }, "_resolve"), + /* @__PURE__ */ __name(function _reject(err) { + reject(err); + done(); + }, "_reject"), + response + ); + request = null; + } + __name(onloadend, "onloadend"); + if ("onloadend" in request) { + request.onloadend = onloadend; + } else { + request.onreadystatechange = /* @__PURE__ */ __name(function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) { + return; + } + setTimeout(onloadend); + }, "handleLoad"); + } + request.onabort = /* @__PURE__ */ __name(function handleAbort() { + if (!request) { + return; + } + reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config3, request)); + request = null; + }, "handleAbort"); + request.onerror = /* @__PURE__ */ __name(function handleError(event) { + const msg = event && event.message ? event.message : "Network Error"; + const err = new AxiosError_default(msg, AxiosError_default.ERR_NETWORK, config3, request); + err.event = event || null; + reject(err); + request = null; + }, "handleError"); + request.ontimeout = /* @__PURE__ */ __name(function handleTimeout() { + let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded"; + const transitional2 = _config.transitional || transitional_default; + if (_config.timeoutErrorMessage) { + timeoutErrorMessage = _config.timeoutErrorMessage; + } + reject( + new AxiosError_default( + timeoutErrorMessage, + transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, + config3, + request + ) + ); + request = null; + }, "handleTimeout"); + requestData === void 0 && requestHeaders.setContentType(null); + if ("setRequestHeader" in request) { + utils_default.forEach(requestHeaders.toJSON(), /* @__PURE__ */ __name(function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + }, "setRequestHeader")); + } + if (!utils_default.isUndefined(_config.withCredentials)) { + request.withCredentials = !!_config.withCredentials; + } + if (responseType && responseType !== "json") { + request.responseType = _config.responseType; + } + if (onDownloadProgress) { + [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true); + request.addEventListener("progress", downloadThrottled); + } + if (onUploadProgress && request.upload) { + [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress); + request.upload.addEventListener("progress", uploadThrottled); + request.upload.addEventListener("loadend", flushUpload); + } + if (_config.cancelToken || _config.signal) { + onCanceled = /* @__PURE__ */ __name((cancel) => { + if (!request) { + return; + } + reject(!cancel || cancel.type ? new CanceledError_default(null, config3, request) : cancel); + request.abort(); + request = null; + }, "onCanceled"); + _config.cancelToken && _config.cancelToken.subscribe(onCanceled); + if (_config.signal) { + _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled); + } + } + const protocol = parseProtocol(_config.url); + if (protocol && platform_default.protocols.indexOf(protocol) === -1) { + reject( + new AxiosError_default( + "Unsupported protocol " + protocol + ":", + AxiosError_default.ERR_BAD_REQUEST, + config3 + ) + ); + return; + } + request.send(requestData || null); + }, "dispatchXhrRequest")); + }; + } +}); + +// ../../node_modules/axios/lib/helpers/composeSignals.js +var composeSignals, composeSignals_default; +var init_composeSignals = __esm({ + "../../node_modules/axios/lib/helpers/composeSignals.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_CanceledError(); + init_AxiosError(); + init_utils8(); + composeSignals = /* @__PURE__ */ __name((signals, timeout) => { + const { length } = signals = signals ? signals.filter(Boolean) : []; + if (timeout || length) { + let controller = new AbortController(); + let aborted2; + const onabort = /* @__PURE__ */ __name(function(reason) { + if (!aborted2) { + aborted2 = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort( + err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err) + ); + } + }, "onabort"); + let timer = timeout && setTimeout(() => { + timer = null; + onabort(new AxiosError_default(`timeout of ${timeout}ms exceeded`, AxiosError_default.ETIMEDOUT)); + }, timeout); + const unsubscribe = /* @__PURE__ */ __name(() => { + if (signals) { + timer && clearTimeout(timer); + timer = null; + signals.forEach((signal2) => { + signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort); + }); + signals = null; + } + }, "unsubscribe"); + signals.forEach((signal2) => signal2.addEventListener("abort", onabort)); + const { signal } = controller; + signal.unsubscribe = () => utils_default.asap(unsubscribe); + return signal; + } + }, "composeSignals"); + composeSignals_default = composeSignals; + } +}); + +// ../../node_modules/axios/lib/helpers/trackStream.js +var streamChunk, readBytes, readStream, trackStream; +var init_trackStream = __esm({ + "../../node_modules/axios/lib/helpers/trackStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + streamChunk = /* @__PURE__ */ __name(function* (chunk, chunkSize) { + let len = chunk.byteLength; + if (!chunkSize || len < chunkSize) { + yield chunk; + return; + } + let pos = 0; + let end; + while (pos < len) { + end = pos + chunkSize; + yield chunk.slice(pos, end); + pos = end; + } + }, "streamChunk"); + readBytes = /* @__PURE__ */ __name(async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) { + yield* streamChunk(chunk, chunkSize); + } + }, "readBytes"); + readStream = /* @__PURE__ */ __name(async function* (stream) { + if (stream[Symbol.asyncIterator]) { + yield* stream; + return; + } + const reader = stream.getReader(); + try { + for (; ; ) { + const { done, value } = await reader.read(); + if (done) { + break; + } + yield value; + } + } finally { + await reader.cancel(); + } + }, "readStream"); + trackStream = /* @__PURE__ */ __name((stream, chunkSize, onProgress, onFinish) => { + const iterator2 = readBytes(stream, chunkSize); + let bytes = 0; + let done; + let _onFinish = /* @__PURE__ */ __name((e2) => { + if (!done) { + done = true; + onFinish && onFinish(e2); + } + }, "_onFinish"); + return new ReadableStream( + { + async pull(controller) { + try { + const { done: done2, value } = await iterator2.next(); + if (done2) { + _onFinish(); + controller.close(); + return; + } + let len = value.byteLength; + if (onProgress) { + let loadedBytes = bytes += len; + onProgress(loadedBytes); + } + controller.enqueue(new Uint8Array(value)); + } catch (err) { + _onFinish(err); + throw err; + } + }, + cancel(reason) { + _onFinish(reason); + return iterator2.return(); + } + }, + { + highWaterMark: 2 + } + ); + }, "trackStream"); + } +}); + +// ../../node_modules/axios/lib/adapters/fetch.js +var DEFAULT_CHUNK_SIZE, isFunction3, globalFetchAPI, ReadableStream2, TextEncoder2, test, factory, seedCache, getFetch, adapter; +var init_fetch2 = __esm({ + "../../node_modules/axios/lib/adapters/fetch.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_platform(); + init_utils8(); + init_AxiosError(); + init_composeSignals(); + init_trackStream(); + init_AxiosHeaders(); + init_progressEventReducer(); + init_resolveConfig(); + init_settle(); + DEFAULT_CHUNK_SIZE = 64 * 1024; + ({ isFunction: isFunction3 } = utils_default); + globalFetchAPI = (({ Request: Request3, Response: Response3 }) => ({ + Request: Request3, + Response: Response3 + }))(utils_default.global); + ({ ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = utils_default.global); + test = /* @__PURE__ */ __name((fn, ...args) => { + try { + return !!fn(...args); + } catch (e2) { + return false; + } + }, "test"); + factory = /* @__PURE__ */ __name((env2) => { + env2 = utils_default.merge.call( + { + skipUndefined: true + }, + globalFetchAPI, + env2 + ); + const { fetch: envFetch, Request: Request3, Response: Response3 } = env2; + const isFetchSupported = envFetch ? isFunction3(envFetch) : typeof fetch === "function"; + const isRequestSupported = isFunction3(Request3); + const isResponseSupported = isFunction3(Response3); + if (!isFetchSupported) { + return false; + } + const isReadableStreamSupported = isFetchSupported && isFunction3(ReadableStream2); + const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? ((encoder2) => (str) => encoder2.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request3(str).arrayBuffer())); + const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => { + let duplexAccessed = false; + const hasContentType = new Request3(platform_default.origin, { + body: new ReadableStream2(), + method: "POST", + get duplex() { + duplexAccessed = true; + return "half"; + } + }).headers.has("Content-Type"); + return duplexAccessed && !hasContentType; + }); + const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response3("").body)); + const resolvers = { + stream: supportsResponseStream && ((res) => res.body) + }; + isFetchSupported && (() => { + ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => { + !resolvers[type] && (resolvers[type] = (res, config3) => { + let method = res && res[type]; + if (method) { + return method.call(res); + } + throw new AxiosError_default( + `Response type '${type}' is not supported`, + AxiosError_default.ERR_NOT_SUPPORT, + config3 + ); + }); + }); + })(); + const getBodyLength = /* @__PURE__ */ __name(async (body) => { + if (body == null) { + return 0; + } + if (utils_default.isBlob(body)) { + return body.size; + } + if (utils_default.isSpecCompliantForm(body)) { + const _request = new Request3(platform_default.origin, { + method: "POST", + body + }); + return (await _request.arrayBuffer()).byteLength; + } + if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) { + return body.byteLength; + } + if (utils_default.isURLSearchParams(body)) { + body = body + ""; + } + if (utils_default.isString(body)) { + return (await encodeText(body)).byteLength; + } + }, "getBodyLength"); + const resolveBodyLength = /* @__PURE__ */ __name(async (headers, body) => { + const length = utils_default.toFiniteNumber(headers.getContentLength()); + return length == null ? getBodyLength(body) : length; + }, "resolveBodyLength"); + return async (config3) => { + let { + url: url2, + method, + data, + signal, + cancelToken, + timeout, + onDownloadProgress, + onUploadProgress, + responseType, + headers, + withCredentials = "same-origin", + fetchOptions + } = resolveConfig_default(config3); + let _fetch = envFetch || fetch; + responseType = responseType ? (responseType + "").toLowerCase() : "text"; + let composedSignal = composeSignals_default( + [signal, cancelToken && cancelToken.toAbortSignal()], + timeout + ); + let request = null; + const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { + composedSignal.unsubscribe(); + }); + let requestContentLength; + try { + if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) { + let _request = new Request3(url2, { + method: "POST", + body: data, + duplex: "half" + }); + let contentTypeHeader; + if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) { + headers.setContentType(contentTypeHeader); + } + if (_request.body) { + const [onProgress, flush2] = progressEventDecorator( + requestContentLength, + progressEventReducer(asyncDecorator(onUploadProgress)) + ); + data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush2); + } + } + if (!utils_default.isString(withCredentials)) { + withCredentials = withCredentials ? "include" : "omit"; + } + const isCredentialsSupported = isRequestSupported && "credentials" in Request3.prototype; + const resolvedOptions = { + ...fetchOptions, + signal: composedSignal, + method: method.toUpperCase(), + headers: headers.normalize().toJSON(), + body: data, + duplex: "half", + credentials: isCredentialsSupported ? withCredentials : void 0 + }; + request = isRequestSupported && new Request3(url2, resolvedOptions); + let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions)); + const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response"); + if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) { + const options = {}; + ["status", "statusText", "headers"].forEach((prop) => { + options[prop] = response[prop]; + }); + const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length")); + const [onProgress, flush2] = onDownloadProgress && progressEventDecorator( + responseContentLength, + progressEventReducer(asyncDecorator(onDownloadProgress), true) + ) || []; + response = new Response3( + trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { + flush2 && flush2(); + unsubscribe && unsubscribe(); + }), + options + ); + } + responseType = responseType || "text"; + let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"]( + response, + config3 + ); + !isStreamResponse && unsubscribe && unsubscribe(); + return await new Promise((resolve, reject) => { + settle(resolve, reject, { + data: responseData, + headers: AxiosHeaders_default.from(response.headers), + status: response.status, + statusText: response.statusText, + config: config3, + request + }); + }); + } catch (err) { + unsubscribe && unsubscribe(); + if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) { + throw Object.assign( + new AxiosError_default( + "Network Error", + AxiosError_default.ERR_NETWORK, + config3, + request, + err && err.response + ), + { + cause: err.cause || err + } + ); + } + throw AxiosError_default.from(err, err && err.code, config3, request, err && err.response); + } + }; + }, "factory"); + seedCache = /* @__PURE__ */ new Map(); + getFetch = /* @__PURE__ */ __name((config3) => { + let env2 = config3 && config3.env || {}; + const { fetch: fetch3, Request: Request3, Response: Response3 } = env2; + const seeds = [Request3, Response3, fetch3]; + let len = seeds.length, i2 = len, seed, target, map2 = seedCache; + while (i2--) { + seed = seeds[i2]; + target = map2.get(seed); + target === void 0 && map2.set(seed, target = i2 ? /* @__PURE__ */ new Map() : factory(env2)); + map2 = target; + } + return target; + }, "getFetch"); + adapter = getFetch(); + } +}); + +// ../../node_modules/axios/lib/adapters/adapters.js +function getAdapter(adapters, config3) { + adapters = utils_default.isArray(adapters) ? adapters : [adapters]; + const { length } = adapters; + let nameOrAdapter; + let adapter2; + const rejectedReasons = {}; + for (let i2 = 0; i2 < length; i2++) { + nameOrAdapter = adapters[i2]; + let id; + adapter2 = nameOrAdapter; + if (!isResolvedHandle(nameOrAdapter)) { + adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + if (adapter2 === void 0) { + throw new AxiosError_default(`Unknown adapter '${id}'`); + } + } + if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config3)))) { + break; + } + rejectedReasons[id || "#" + i2] = adapter2; + } + if (!adapter2) { + const reasons = Object.entries(rejectedReasons).map( + ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build") + ); + let s2 = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"; + throw new AxiosError_default( + `There is no suitable adapter to dispatch the request ` + s2, + "ERR_NOT_SUPPORT" + ); + } + return adapter2; +} +var knownAdapters, renderReason, isResolvedHandle, adapters_default; +var init_adapters = __esm({ + "../../node_modules/axios/lib/adapters/adapters.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_null(); + init_xhr(); + init_fetch2(); + init_AxiosError(); + knownAdapters = { + http: null_default, + xhr: xhr_default, + fetch: { + get: getFetch + } + }; + utils_default.forEach(knownAdapters, (fn, value) => { + if (fn) { + try { + Object.defineProperty(fn, "name", { value }); + } catch (e2) { + } + Object.defineProperty(fn, "adapterName", { value }); + } + }); + renderReason = /* @__PURE__ */ __name((reason) => `- ${reason}`, "renderReason"); + isResolvedHandle = /* @__PURE__ */ __name((adapter2) => utils_default.isFunction(adapter2) || adapter2 === null || adapter2 === false, "isResolvedHandle"); + __name(getAdapter, "getAdapter"); + adapters_default = { + /** + * Resolve an adapter from a list of adapter names or functions. + * @type {Function} + */ + getAdapter, + /** + * Exposes all known adapters + * @type {Object} + */ + adapters: knownAdapters + }; + } +}); + +// ../../node_modules/axios/lib/core/dispatchRequest.js +function throwIfCancellationRequested(config3) { + if (config3.cancelToken) { + config3.cancelToken.throwIfRequested(); + } + if (config3.signal && config3.signal.aborted) { + throw new CanceledError_default(null, config3); + } +} +function dispatchRequest(config3) { + throwIfCancellationRequested(config3); + config3.headers = AxiosHeaders_default.from(config3.headers); + config3.data = transformData.call(config3, config3.transformRequest); + if (["post", "put", "patch"].indexOf(config3.method) !== -1) { + config3.headers.setContentType("application/x-www-form-urlencoded", false); + } + const adapter2 = adapters_default.getAdapter(config3.adapter || defaults_default.adapter, config3); + return adapter2(config3).then( + /* @__PURE__ */ __name(function onAdapterResolution(response) { + throwIfCancellationRequested(config3); + response.data = transformData.call(config3, config3.transformResponse, response); + response.headers = AxiosHeaders_default.from(response.headers); + return response; + }, "onAdapterResolution"), + /* @__PURE__ */ __name(function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config3); + if (reason && reason.response) { + reason.response.data = transformData.call( + config3, + config3.transformResponse, + reason.response + ); + reason.response.headers = AxiosHeaders_default.from(reason.response.headers); + } + } + return Promise.reject(reason); + }, "onAdapterRejection") + ); +} +var init_dispatchRequest = __esm({ + "../../node_modules/axios/lib/core/dispatchRequest.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_transformData(); + init_isCancel(); + init_defaults(); + init_CanceledError(); + init_AxiosHeaders(); + init_adapters(); + __name(throwIfCancellationRequested, "throwIfCancellationRequested"); + __name(dispatchRequest, "dispatchRequest"); + } +}); + +// ../../node_modules/axios/lib/env/data.js +var VERSION; +var init_data = __esm({ + "../../node_modules/axios/lib/env/data.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + VERSION = "1.13.6"; + } +}); + +// ../../node_modules/axios/lib/helpers/validator.js +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== "object") { + throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE); + } + const keys = Object.keys(options); + let i2 = keys.length; + while (i2-- > 0) { + const opt = keys[i2]; + const validator = schema[opt]; + if (validator) { + const value = options[opt]; + const result = value === void 0 || validator(value, opt, options); + if (result !== true) { + throw new AxiosError_default( + "option " + opt + " must be " + result, + AxiosError_default.ERR_BAD_OPTION_VALUE + ); + } + continue; + } + if (allowUnknown !== true) { + throw new AxiosError_default("Unknown option " + opt, AxiosError_default.ERR_BAD_OPTION); + } + } +} +var validators, deprecatedWarnings, validator_default; +var init_validator = __esm({ + "../../node_modules/axios/lib/helpers/validator.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_data(); + init_AxiosError(); + validators = {}; + ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i2) => { + validators[type] = /* @__PURE__ */ __name(function validator(thing) { + return typeof thing === type || "a" + (i2 < 1 ? "n " : " ") + type; + }, "validator"); + }); + deprecatedWarnings = {}; + validators.transitional = /* @__PURE__ */ __name(function transitional(validator, version4, message2) { + function formatMessage(opt, desc2) { + return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc2 + (message2 ? ". " + message2 : ""); + } + __name(formatMessage, "formatMessage"); + return (value, opt, opts) => { + if (validator === false) { + throw new AxiosError_default( + formatMessage(opt, " has been removed" + (version4 ? " in " + version4 : "")), + AxiosError_default.ERR_DEPRECATED + ); + } + if (version4 && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + console.warn( + formatMessage( + opt, + " has been deprecated since v" + version4 + " and will be removed in the near future" + ) + ); + } + return validator ? validator(value, opt, opts) : true; + }; + }, "transitional"); + validators.spelling = /* @__PURE__ */ __name(function spelling(correctSpelling) { + return (value, opt) => { + console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); + return true; + }; + }, "spelling"); + __name(assertOptions, "assertOptions"); + validator_default = { + assertOptions, + validators + }; + } +}); + +// ../../node_modules/axios/lib/core/Axios.js +var validators2, Axios, Axios_default; +var init_Axios = __esm({ + "../../node_modules/axios/lib/core/Axios.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_buildURL(); + init_InterceptorManager(); + init_dispatchRequest(); + init_mergeConfig(); + init_buildFullPath(); + init_validator(); + init_AxiosHeaders(); + init_transitional(); + validators2 = validator_default.validators; + Axios = class { + constructor(instanceConfig) { + this.defaults = instanceConfig || {}; + this.interceptors = { + request: new InterceptorManager_default(), + response: new InterceptorManager_default() + }; + } + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ + async request(configOrUrl, config3) { + try { + return await this._request(configOrUrl, config3); + } catch (err) { + if (err instanceof Error) { + let dummy = {}; + Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error(); + const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : ""; + try { + if (!err.stack) { + err.stack = stack; + } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) { + err.stack += "\n" + stack; + } + } catch (e2) { + } + } + throw err; + } + } + _request(configOrUrl, config3) { + if (typeof configOrUrl === "string") { + config3 = config3 || {}; + config3.url = configOrUrl; + } else { + config3 = configOrUrl || {}; + } + config3 = mergeConfig(this.defaults, config3); + const { transitional: transitional2, paramsSerializer, headers } = config3; + if (transitional2 !== void 0) { + validator_default.assertOptions( + transitional2, + { + silentJSONParsing: validators2.transitional(validators2.boolean), + forcedJSONParsing: validators2.transitional(validators2.boolean), + clarifyTimeoutError: validators2.transitional(validators2.boolean), + legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean) + }, + false + ); + } + if (paramsSerializer != null) { + if (utils_default.isFunction(paramsSerializer)) { + config3.paramsSerializer = { + serialize: paramsSerializer + }; + } else { + validator_default.assertOptions( + paramsSerializer, + { + encode: validators2.function, + serialize: validators2.function + }, + true + ); + } + } + if (config3.allowAbsoluteUrls !== void 0) { + } else if (this.defaults.allowAbsoluteUrls !== void 0) { + config3.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; + } else { + config3.allowAbsoluteUrls = true; + } + validator_default.assertOptions( + config3, + { + baseUrl: validators2.spelling("baseURL"), + withXsrfToken: validators2.spelling("withXSRFToken") + }, + true + ); + config3.method = (config3.method || this.defaults.method || "get").toLowerCase(); + let contextHeaders = headers && utils_default.merge(headers.common, headers[config3.method]); + headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => { + delete headers[method]; + }); + config3.headers = AxiosHeaders_default.concat(contextHeaders, headers); + const requestInterceptorChain = []; + let synchronousRequestInterceptors = true; + this.interceptors.request.forEach(/* @__PURE__ */ __name(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config3) === false) { + return; + } + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + const transitional3 = config3.transitional || transitional_default; + const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering; + if (legacyInterceptorReqResOrdering) { + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + } else { + requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + } + }, "unshiftRequestInterceptors")); + const responseInterceptorChain = []; + this.interceptors.response.forEach(/* @__PURE__ */ __name(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }, "pushResponseInterceptors")); + let promise2; + let i2 = 0; + let len; + if (!synchronousRequestInterceptors) { + const chain = [dispatchRequest.bind(this), void 0]; + chain.unshift(...requestInterceptorChain); + chain.push(...responseInterceptorChain); + len = chain.length; + promise2 = Promise.resolve(config3); + while (i2 < len) { + promise2 = promise2.then(chain[i2++], chain[i2++]); + } + return promise2; + } + len = requestInterceptorChain.length; + let newConfig = config3; + while (i2 < len) { + const onFulfilled = requestInterceptorChain[i2++]; + const onRejected = requestInterceptorChain[i2++]; + try { + newConfig = onFulfilled(newConfig); + } catch (error50) { + onRejected.call(this, error50); + break; + } + } + try { + promise2 = dispatchRequest.call(this, newConfig); + } catch (error50) { + return Promise.reject(error50); + } + i2 = 0; + len = responseInterceptorChain.length; + while (i2 < len) { + promise2 = promise2.then(responseInterceptorChain[i2++], responseInterceptorChain[i2++]); + } + return promise2; + } + getUri(config3) { + config3 = mergeConfig(this.defaults, config3); + const fullPath = buildFullPath(config3.baseURL, config3.url, config3.allowAbsoluteUrls); + return buildURL(fullPath, config3.params, config3.paramsSerializer); + } + }; + __name(Axios, "Axios"); + utils_default.forEach(["delete", "get", "head", "options"], /* @__PURE__ */ __name(function forEachMethodNoData(method) { + Axios.prototype[method] = function(url2, config3) { + return this.request( + mergeConfig(config3 || {}, { + method, + url: url2, + data: (config3 || {}).data + }) + ); + }; + }, "forEachMethodNoData")); + utils_default.forEach(["post", "put", "patch"], /* @__PURE__ */ __name(function forEachMethodWithData(method) { + function generateHTTPMethod(isForm) { + return /* @__PURE__ */ __name(function httpMethod(url2, data, config3) { + return this.request( + mergeConfig(config3 || {}, { + method, + headers: isForm ? { + "Content-Type": "multipart/form-data" + } : {}, + url: url2, + data + }) + ); + }, "httpMethod"); + } + __name(generateHTTPMethod, "generateHTTPMethod"); + Axios.prototype[method] = generateHTTPMethod(); + Axios.prototype[method + "Form"] = generateHTTPMethod(true); + }, "forEachMethodWithData")); + Axios_default = Axios; + } +}); + +// ../../node_modules/axios/lib/cancel/CancelToken.js +var CancelToken, CancelToken_default; +var init_CancelToken = __esm({ + "../../node_modules/axios/lib/cancel/CancelToken.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_CanceledError(); + CancelToken = class { + constructor(executor) { + if (typeof executor !== "function") { + throw new TypeError("executor must be a function."); + } + let resolvePromise; + this.promise = new Promise(/* @__PURE__ */ __name(function promiseExecutor(resolve) { + resolvePromise = resolve; + }, "promiseExecutor")); + const token = this; + this.promise.then((cancel) => { + if (!token._listeners) + return; + let i2 = token._listeners.length; + while (i2-- > 0) { + token._listeners[i2](cancel); + } + token._listeners = null; + }); + this.promise.then = (onfulfilled) => { + let _resolve; + const promise2 = new Promise((resolve) => { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + promise2.cancel = /* @__PURE__ */ __name(function reject() { + token.unsubscribe(_resolve); + }, "reject"); + return promise2; + }; + executor(/* @__PURE__ */ __name(function cancel(message2, config3, request) { + if (token.reason) { + return; + } + token.reason = new CanceledError_default(message2, config3, request); + resolvePromise(token.reason); + }, "cancel")); + } + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + throwIfRequested() { + if (this.reason) { + throw this.reason; + } + } + /** + * Subscribe to the cancel signal + */ + subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; + } + } + /** + * Unsubscribe from the cancel signal + */ + unsubscribe(listener) { + if (!this._listeners) { + return; + } + const index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } + } + toAbortSignal() { + const controller = new AbortController(); + const abort2 = /* @__PURE__ */ __name((err) => { + controller.abort(err); + }, "abort"); + this.subscribe(abort2); + controller.signal.unsubscribe = () => this.unsubscribe(abort2); + return controller.signal; + } + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + static source() { + let cancel; + const token = new CancelToken(/* @__PURE__ */ __name(function executor(c2) { + cancel = c2; + }, "executor")); + return { + token, + cancel + }; + } + }; + __name(CancelToken, "CancelToken"); + CancelToken_default = CancelToken; + } +}); + +// ../../node_modules/axios/lib/helpers/spread.js +function spread(callback) { + return /* @__PURE__ */ __name(function wrap(arr) { + return callback.apply(null, arr); + }, "wrap"); +} +var init_spread = __esm({ + "../../node_modules/axios/lib/helpers/spread.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(spread, "spread"); + } +}); + +// ../../node_modules/axios/lib/helpers/isAxiosError.js +function isAxiosError(payload) { + return utils_default.isObject(payload) && payload.isAxiosError === true; +} +var init_isAxiosError = __esm({ + "../../node_modules/axios/lib/helpers/isAxiosError.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + __name(isAxiosError, "isAxiosError"); + } +}); + +// ../../node_modules/axios/lib/helpers/HttpStatusCode.js +var HttpStatusCode, HttpStatusCode_default; +var init_HttpStatusCode = __esm({ + "../../node_modules/axios/lib/helpers/HttpStatusCode.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + HttpStatusCode = { + Continue: 100, + SwitchingProtocols: 101, + Processing: 102, + EarlyHints: 103, + Ok: 200, + Created: 201, + Accepted: 202, + NonAuthoritativeInformation: 203, + NoContent: 204, + ResetContent: 205, + PartialContent: 206, + MultiStatus: 207, + AlreadyReported: 208, + ImUsed: 226, + MultipleChoices: 300, + MovedPermanently: 301, + Found: 302, + SeeOther: 303, + NotModified: 304, + UseProxy: 305, + Unused: 306, + TemporaryRedirect: 307, + PermanentRedirect: 308, + BadRequest: 400, + Unauthorized: 401, + PaymentRequired: 402, + Forbidden: 403, + NotFound: 404, + MethodNotAllowed: 405, + NotAcceptable: 406, + ProxyAuthenticationRequired: 407, + RequestTimeout: 408, + Conflict: 409, + Gone: 410, + LengthRequired: 411, + PreconditionFailed: 412, + PayloadTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + UnprocessableEntity: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, + WebServerIsDown: 521, + ConnectionTimedOut: 522, + OriginIsUnreachable: 523, + TimeoutOccurred: 524, + SslHandshakeFailed: 525, + InvalidSslCertificate: 526 + }; + Object.entries(HttpStatusCode).forEach(([key, value]) => { + HttpStatusCode[value] = key; + }); + HttpStatusCode_default = HttpStatusCode; + } +}); + +// ../../node_modules/axios/lib/axios.js +function createInstance(defaultConfig) { + const context2 = new Axios_default(defaultConfig); + const instance = bind(Axios_default.prototype.request, context2); + utils_default.extend(instance, Axios_default.prototype, context2, { allOwnKeys: true }); + utils_default.extend(instance, context2, null, { allOwnKeys: true }); + instance.create = /* @__PURE__ */ __name(function create(instanceConfig) { + return createInstance(mergeConfig(defaultConfig, instanceConfig)); + }, "create"); + return instance; +} +var axios, axios_default; +var init_axios = __esm({ + "../../node_modules/axios/lib/axios.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_bind(); + init_Axios(); + init_mergeConfig(); + init_defaults(); + init_formDataToJSON(); + init_CanceledError(); + init_CancelToken(); + init_isCancel(); + init_data(); + init_toFormData(); + init_AxiosError(); + init_spread(); + init_isAxiosError(); + init_AxiosHeaders(); + init_adapters(); + init_HttpStatusCode(); + __name(createInstance, "createInstance"); + axios = createInstance(defaults_default); + axios.Axios = Axios_default; + axios.CanceledError = CanceledError_default; + axios.CancelToken = CancelToken_default; + axios.isCancel = isCancel; + axios.VERSION = VERSION; + axios.toFormData = toFormData_default; + axios.AxiosError = AxiosError_default; + axios.Cancel = axios.CanceledError; + axios.all = /* @__PURE__ */ __name(function all(promises) { + return Promise.all(promises); + }, "all"); + axios.spread = spread; + axios.isAxiosError = isAxiosError; + axios.mergeConfig = mergeConfig; + axios.AxiosHeaders = AxiosHeaders_default; + axios.formToJSON = (thing) => formDataToJSON_default(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing); + axios.getAdapter = adapters_default.getAdapter; + axios.HttpStatusCode = HttpStatusCode_default; + axios.default = axios; + axios_default = axios; + } +}); + +// ../../node_modules/axios/index.js +var Axios2, AxiosError2, CanceledError2, isCancel2, CancelToken2, VERSION2, all2, Cancel, isAxiosError2, spread2, toFormData2, AxiosHeaders2, HttpStatusCode2, formToJSON, getAdapter2, mergeConfig2; +var init_axios2 = __esm({ + "../../node_modules/axios/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_axios(); + ({ + Axios: Axios2, + AxiosError: AxiosError2, + CanceledError: CanceledError2, + isCancel: isCancel2, + CancelToken: CancelToken2, + VERSION: VERSION2, + all: all2, + Cancel, + isAxiosError: isAxiosError2, + spread: spread2, + toFormData: toFormData2, + AxiosHeaders: AxiosHeaders2, + HttpStatusCode: HttpStatusCode2, + formToJSON, + getAdapter: getAdapter2, + mergeConfig: mergeConfig2 + } = axios_default); + } +}); + +// src/lib/telegram-service.ts +var BOT_TOKEN, TELEGRAM_API_URL; +var init_telegram_service = __esm({ + "src/lib/telegram-service.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_env_exporter(); + BOT_TOKEN = telegramBotToken; + TELEGRAM_API_URL = `https://api.telegram.org/bot${BOT_TOKEN}`; + } +}); + +// src/lib/post-order-handler.ts +var ORDER_CHANNEL, CANCELLED_CHANNEL, publishOrder, publishFormattedOrder, publishCancellation; +var init_post_order_handler = __esm({ + "src/lib/post-order-handler.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_redis_client(); + init_telegram_service(); + ORDER_CHANNEL = "orders:placed"; + CANCELLED_CHANNEL = "orders:cancelled"; + publishOrder = /* @__PURE__ */ __name(async (orderDetails) => { + try { + const message2 = JSON.stringify(orderDetails); + await redis_client_default.publish(ORDER_CHANNEL, message2); + return true; + } catch (error50) { + console.error("Failed to publish order:", error50); + return false; + } + }, "publishOrder"); + publishFormattedOrder = /* @__PURE__ */ __name(async (createdOrders, ordersBySlot) => { + try { + const orderIds = createdOrders.map((order) => order.id); + return await publishOrder({ orderIds }); + } catch (error50) { + console.error("Failed to format and publish order:", error50); + return false; + } + }, "publishFormattedOrder"); + publishCancellation = /* @__PURE__ */ __name(async (orderId, cancelledBy, reason) => { + try { + const message2 = { + orderId, + cancelledBy, + reason, + cancelledAt: (/* @__PURE__ */ new Date()).toISOString() + }; + await redis_client_default.publish(CANCELLED_CHANNEL, JSON.stringify(message2)); + console.log("Cancellation published to Redis:", orderId); + return true; + } catch (error50) { + console.error("Failed to publish cancellation:", error50); + return false; + } + }, "publishCancellation"); + } +}); + +// src/stores/user-negativity-store.ts +async function getMultipleUserNegativityScores(userIds) { + try { + if (userIds.length === 0) + return {}; + const result = {}; + for (const userId of userIds) { + result[userId] = await getUserNegativityScore(userId); + } + return result; + } catch (error50) { + console.error("Error getting multiple user negativity scores:", error50); + return {}; + } +} +async function recomputeUserNegativityScore(userId) { + try { + const totalScore = await getUserNegativityScore(userId); + } catch (error50) { + console.error(`Error recomputing negativity score for user ${userId}:`, error50); + throw error50; + } +} +var init_user_negativity_store = __esm({ + "src/stores/user-negativity-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + __name(getMultipleUserNegativityScores, "getMultipleUserNegativityScores"); + __name(recomputeUserNegativityScore, "recomputeUserNegativityScore"); + } +}); + +// src/trpc/apis/admin-apis/apis/order.ts +var updateOrderNotesSchema, getOrderDetailsSchema, updatePackagedSchema, updateDeliveredSchema, updateOrderItemPackagingSchema, getSlotOrdersSchema, getAllOrdersSchema, orderRouter; +var init_order3 = __esm({ + "src/trpc/apis/admin-apis/apis/order.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_notif_job(); + init_post_order_handler(); + init_user_negativity_store(); + init_dbService(); + updateOrderNotesSchema = external_exports.object({ + orderId: external_exports.number(), + adminNotes: external_exports.string() + }); + getOrderDetailsSchema = external_exports.object({ + orderId: external_exports.number() + }); + updatePackagedSchema = external_exports.object({ + orderId: external_exports.string(), + isPackaged: external_exports.boolean() + }); + updateDeliveredSchema = external_exports.object({ + orderId: external_exports.string(), + isDelivered: external_exports.boolean() + }); + updateOrderItemPackagingSchema = external_exports.object({ + orderItemId: external_exports.number(), + isPackaged: external_exports.boolean().optional(), + isPackageVerified: external_exports.boolean().optional() + }); + getSlotOrdersSchema = external_exports.object({ + slotId: external_exports.string() + }); + getAllOrdersSchema = external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(20), + slotId: external_exports.number().optional().nullable(), + packagedFilter: external_exports.enum(["all", "packaged", "not_packaged"]).optional().default("all"), + deliveredFilter: external_exports.enum(["all", "delivered", "not_delivered"]).optional().default("all"), + cancellationFilter: external_exports.enum(["all", "cancelled", "not_cancelled"]).optional().default("all"), + flashDeliveryFilter: external_exports.enum(["all", "flash", "regular"]).optional().default("all") + }); + orderRouter = router2({ + updateNotes: protectedProcedure.input(updateOrderNotesSchema).mutation(async ({ input }) => { + const { orderId, adminNotes } = input; + const result = await updateOrderNotes(orderId, adminNotes || null); + if (!result) { + throw new Error("Order not found"); + } + return result; + }), + getOrderDetails: protectedProcedure.input(getOrderDetailsSchema).query(async ({ input }) => { + const { orderId } = input; + const orderDetails = await getOrderDetails(orderId); + if (!orderDetails) { + throw new Error("Order not found"); + } + return orderDetails; + }), + updatePackaged: protectedProcedure.input(updatePackagedSchema).mutation(async ({ input }) => { + const { orderId, isPackaged } = input; + const result = await updateOrderPackaged(orderId, isPackaged); + if (result.userId) + await sendOrderPackagedNotification(result.userId, orderId); + return { success: true, userId: result.userId }; + }), + updateDelivered: protectedProcedure.input(updateDeliveredSchema).mutation(async ({ input }) => { + const { orderId, isDelivered } = input; + const result = await updateOrderDelivered(orderId, isDelivered); + if (result.userId) + await sendOrderDeliveredNotification(result.userId, orderId); + return { success: true, userId: result.userId }; + }), + updateOrderItemPackaging: protectedProcedure.input(updateOrderItemPackagingSchema).mutation(async ({ input }) => { + const { orderItemId, isPackaged, isPackageVerified } = input; + const result = await updateOrderItemPackaging(orderItemId, isPackaged, isPackageVerified); + if (!result.updated) { + throw new ApiError("Order item not found", 404); + } + return result; + }), + removeDeliveryCharge: protectedProcedure.input(external_exports.object({ orderId: external_exports.number() })).mutation(async ({ input }) => { + const { orderId } = input; + const result = await removeDeliveryCharge(orderId); + if (!result) { + throw new Error("Order not found"); + } + return result; + }), + getSlotOrders: protectedProcedure.input(getSlotOrdersSchema).query(async ({ input }) => { + const { slotId } = input; + const result = await getSlotOrders(slotId); + return result; + }), + updateAddressCoords: protectedProcedure.input( + external_exports.object({ + addressId: external_exports.number(), + latitude: external_exports.number(), + longitude: external_exports.number() + }) + ).mutation(async ({ input }) => { + const { addressId, latitude, longitude } = input; + const result = await updateAddressCoords(addressId, latitude, longitude); + if (!result.success) { + throw new ApiError("Address not found", 404); + } + return result; + }), + getAll: protectedProcedure.input(getAllOrdersSchema).query(async ({ input }) => { + try { + const result = await getAllOrders(input); + const userIds = [...new Set(result.orders.map((order) => order.userId))]; + const negativityScores = await getMultipleUserNegativityScores(userIds); + const orders3 = result.orders.map((order) => { + const { userId, userNegativityScore, ...rest } = order; + return { + ...rest, + userNegativityScore: negativityScores[userId] || 0 + }; + }); + return { + orders: orders3, + nextCursor: result.nextCursor + }; + } catch (e2) { + console.log({ e: e2 }); + } + }), + rebalanceSlots: protectedProcedure.input(external_exports.object({ slotIds: external_exports.array(external_exports.number()).min(1).max(50) })).mutation(async ({ input }) => { + const slotIds = input.slotIds; + const result = await rebalanceSlots(slotIds); + return result; + }), + cancelOrder: protectedProcedure.input(external_exports.object({ + orderId: external_exports.number(), + reason: external_exports.string().min(1, "Cancellation reason is required") + })).mutation(async ({ input }) => { + const { orderId, reason } = input; + const result = await cancelOrder(orderId, reason); + if (!result.success) { + if (result.error === "order_not_found") { + throw new ApiError(result.message, 404); + } + if (result.error === "status_not_found") { + throw new ApiError(result.message, 400); + } + if (result.error === "already_cancelled") { + throw new ApiError(result.message, 400); + } + if (result.error === "already_delivered") { + throw new ApiError(result.message, 400); + } + throw new ApiError(result.message, 400); + } + if (result.orderId) { + await publishCancellation(result.orderId, "admin", reason); + } + return { success: true, message: result.message }; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/vendor-snippets.ts +var import_dayjs2, createSnippetSchema, updateSnippetSchema, toApiDate, vendorSnippetsRouter; +var init_vendor_snippets2 = __esm({ + "src/trpc/apis/admin-apis/apis/vendor-snippets.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + import_dayjs2 = __toESM(require_dayjs_min()); + init_env_exporter(); + init_dbService(); + createSnippetSchema = external_exports.object({ + snippetCode: external_exports.string().min(1, "Snippet code is required"), + slotId: external_exports.number().optional(), + productIds: external_exports.array(external_exports.number().int().positive()).min(1, "At least one product is required"), + validTill: external_exports.string().optional(), + isPermanent: external_exports.boolean().default(false) + }); + updateSnippetSchema = external_exports.object({ + id: external_exports.number().int().positive(), + updates: createSnippetSchema.partial().extend({ + snippetCode: external_exports.string().min(1).optional(), + productIds: external_exports.array(external_exports.number().int().positive()).optional(), + isPermanent: external_exports.boolean().default(false) + }) + }); + toApiDate = /* @__PURE__ */ __name((value) => { + if (value instanceof Date) { + return Number.isNaN(value.getTime()) ? "" : value.toISOString(); + } + if (typeof value === "number") { + const date6 = new Date(value); + return Number.isNaN(date6.getTime()) ? "" : date6.toISOString(); + } + if (typeof value === "string") { + const date6 = new Date(value); + return Number.isNaN(date6.getTime()) ? value : date6.toISOString(); + } + return ""; + }, "toApiDate"); + vendorSnippetsRouter = router2({ + create: protectedProcedure.input(createSnippetSchema).mutation(async ({ input, ctx }) => { + const { snippetCode, slotId, productIds, validTill, isPermanent } = input; + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + if (slotId) { + const slot = await getVendorSlotById(slotId); + if (!slot) { + throw new Error("Invalid slot ID"); + } + } + const products = await getProductsByIds(productIds); + if (products.length !== productIds.length) { + throw new Error("One or more invalid product IDs"); + } + const existingSnippet = await checkVendorSnippetExists(snippetCode); + if (existingSnippet) { + throw new Error("Snippet code already exists"); + } + const result = await createVendorSnippet({ + snippetCode, + slotId, + productIds, + isPermanent, + validTill: validTill ? new Date(validTill) : void 0 + }); + return result; + }), + getAll: protectedProcedure.query(async () => { + console.log("from the vendor snipptes methods"); + try { + const result = await getAllVendorSnippets(); + const snippetsWithProducts = await Promise.all( + result.map(async (snippet) => { + const products = await getProductsByIds(snippet.productIds); + return { + ...snippet, + accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`, + products + }; + }) + ); + return snippetsWithProducts; + } catch (e2) { + console.log(e2); + } + return []; + }), + getById: protectedProcedure.input(external_exports.object({ id: external_exports.number().int().positive() })).query(async ({ input }) => { + const { id } = input; + const result = await getVendorSnippetById(id); + if (!result) { + throw new Error("Vendor snippet not found"); + } + return result; + }), + update: protectedProcedure.input(updateSnippetSchema).mutation(async ({ input }) => { + const { id, updates } = input; + const existingSnippet = await getVendorSnippetById(id); + if (!existingSnippet) { + throw new Error("Vendor snippet not found"); + } + if (updates.slotId) { + const slot = await getVendorSlotById(updates.slotId); + if (!slot) { + throw new Error("Invalid slot ID"); + } + } + if (updates.productIds) { + const products = await getProductsByIds(updates.productIds); + if (products.length !== updates.productIds.length) { + throw new Error("One or more invalid product IDs"); + } + } + if (updates.snippetCode && updates.snippetCode !== existingSnippet.snippetCode) { + const duplicateSnippet = await checkVendorSnippetExists(updates.snippetCode); + if (duplicateSnippet) { + throw new Error("Snippet code already exists"); + } + } + const updateData = { + ...updates, + validTill: updates.validTill !== void 0 ? updates.validTill ? new Date(updates.validTill) : null : void 0 + }; + const result = await updateVendorSnippet(id, updateData); + if (!result) { + throw new Error("Failed to update vendor snippet"); + } + return result; + }), + delete: protectedProcedure.input(external_exports.object({ id: external_exports.number().int().positive() })).mutation(async ({ input }) => { + const { id } = input; + const result = await deleteVendorSnippet(id); + if (!result) { + throw new Error("Vendor snippet not found"); + } + return { message: "Vendor snippet deleted successfully" }; + }), + getOrdersBySnippet: publicProcedure.input(external_exports.object({ + snippetCode: external_exports.string().min(1, "Snippet code is required") + })).query(async ({ input }) => { + const { snippetCode } = input; + const snippet = await getVendorSnippetByCode(snippetCode); + if (!snippet) { + throw new Error("Vendor snippet not found"); + } + if (snippet.validTill && new Date(snippet.validTill) < /* @__PURE__ */ new Date()) { + throw new Error("Vendor snippet has expired"); + } + if (!snippet.slotId) { + throw new Error("Vendor snippet not associated with a slot"); + } + const matchingOrders = await getVendorOrdersBySlotId(snippet.slotId); + const filteredOrders = matchingOrders.filter((order) => { + const status = order.orderStatus; + if (status[0].isCancelled) + return false; + const orderProductIds = order.orderItems.map((item) => item.productId); + return snippet.productIds.some((productId) => orderProductIds.includes(productId)); + }); + const formattedOrders = filteredOrders.map((order) => { + const attachedOrderItems = order.orderItems.filter( + (item) => snippet.productIds.includes(item.productId) + ); + const products = attachedOrderItems.map((item) => ({ + orderItemId: item.id, + productId: item.productId, + productName: item.product.name, + quantity: parseFloat(item.quantity), + productSize: item.product.productQuantity, + price: parseFloat((item.price ?? 0).toString()), + unit: item.product.unit?.shortNotation || "unit", + subtotal: parseFloat((item.price ?? 0).toString()) * parseFloat(item.quantity), + is_packaged: item.is_packaged, + is_package_verified: item.is_package_verified + })); + const orderTotal = products.reduce((sum2, p2) => sum2 + p2.subtotal, 0); + return { + orderId: `ORD${order.id}`, + orderDate: toApiDate(order.createdAt), + customerName: order.user.name || "", + totalAmount: orderTotal, + slotInfo: order.slot ? { + time: toApiDate(order.slot.deliveryTime), + sequence: order.slot.deliverySequence + } : null, + products, + matchedProducts: snippet.productIds, + // All snippet products are considered matched + snippetCode: snippet.snippetCode + }; + }); + return { + success: true, + data: formattedOrders, + snippet: { + id: snippet.id, + snippetCode: snippet.snippetCode, + slotId: snippet.slotId, + productIds: snippet.productIds, + validTill: toApiDate(snippet.validTill) || null, + createdAt: toApiDate(snippet.createdAt), + isPermanent: snippet.isPermanent + } + }; + }), + getVendorOrders: protectedProcedure.query(async () => { + const vendorOrders = await getVendorOrders(); + return vendorOrders.map((order) => ({ + id: order.id, + status: "pending", + orderDate: toApiDate(order.createdAt), + totalQuantity: order.orderItems.reduce((sum2, item) => sum2 + parseFloat(item.quantity || "0"), 0), + products: order.orderItems.map((item) => ({ + name: item.product.name, + quantity: parseFloat(item.quantity || "0"), + unit: item.product.unit?.shortNotation || "unit" + })) + })); + }), + getUpcomingSlots: publicProcedure.query(async () => { + const threeHoursAgo = (0, import_dayjs2.default)().subtract(3, "hour").toDate(); + const slots = await getSlotsAfterDate(threeHoursAgo); + return { + success: true, + data: slots.map((slot) => ({ + id: slot.id, + deliveryTime: toApiDate(slot.deliveryTime), + freezeTime: toApiDate(slot.freezeTime), + deliverySequence: slot.deliverySequence + })) + }; + }), + getOrdersBySnippetAndSlot: publicProcedure.input(external_exports.object({ + snippetCode: external_exports.string().min(1, "Snippet code is required"), + slotId: external_exports.number().int().positive("Valid slot ID is required") + })).query(async ({ input }) => { + const { snippetCode, slotId } = input; + const snippet = await getVendorSnippetByCode(snippetCode); + const slot = await getVendorSlotById(slotId); + if (!snippet) { + throw new Error("Vendor snippet not found"); + } + if (!slot) { + throw new Error("Slot not found"); + } + const matchingOrders = await getVendorOrdersBySlotId(slotId); + const filteredOrders = matchingOrders.filter((order) => { + const status = order.orderStatus; + if (status[0]?.isCancelled) + return false; + const orderProductIds = order.orderItems.map((item) => item.productId); + return snippet.productIds.some((productId) => orderProductIds.includes(productId)); + }); + const formattedOrders = filteredOrders.map((order) => { + const attachedOrderItems = order.orderItems.filter( + (item) => snippet.productIds.includes(item.productId) + ); + const products = attachedOrderItems.map((item) => ({ + orderItemId: item.id, + productId: item.productId, + productName: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat((item.price ?? 0).toString()), + unit: item.product.unit?.shortNotation || "unit", + subtotal: parseFloat((item.price ?? 0).toString()) * parseFloat(item.quantity), + productSize: item.product.productQuantity, + is_packaged: item.is_packaged, + is_package_verified: item.is_package_verified + })); + const orderTotal = products.reduce((sum2, p2) => sum2 + p2.subtotal, 0); + return { + orderId: `ORD${order.id}`, + orderDate: toApiDate(order.createdAt), + customerName: order.user.name || "", + totalAmount: orderTotal, + slotInfo: order.slot ? { + time: toApiDate(order.slot.deliveryTime), + sequence: order.slot.deliverySequence + } : null, + products, + matchedProducts: snippet.productIds, + snippetCode: snippet.snippetCode + }; + }); + return { + success: true, + data: formattedOrders, + snippet: { + id: snippet.id, + snippetCode: snippet.snippetCode, + slotId: snippet.slotId, + productIds: snippet.productIds, + validTill: toApiDate(snippet.validTill) || null, + createdAt: toApiDate(snippet.createdAt), + isPermanent: snippet.isPermanent + }, + selectedSlot: { + id: slot.id, + deliveryTime: toApiDate(slot.deliveryTime), + freezeTime: toApiDate(slot.freezeTime), + deliverySequence: slot.deliverySequence + } + }; + }), + updateOrderItemPackaging: publicProcedure.input(external_exports.object({ + orderItemId: external_exports.number().int().positive("Valid order item ID required"), + is_packaged: external_exports.boolean() + })).mutation(async ({ input, ctx }) => { + const { orderItemId, is_packaged } = input; + const result = await updateVendorOrderItemPackaging(orderItemId, is_packaged); + if (!result.success) { + throw new Error(result.message); + } + return result; + }) + }); + } +}); + +// src/lib/roles-manager.ts +var ROLE_NAMES, defaultRole, RoleManager, roleManager, roles_manager_default; +var init_roles_manager = __esm({ + "src/lib/roles-manager.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ROLE_NAMES = { + ADMIN: "admin", + GENERAL_USER: "gen_user", + HOSPITAL_ADMIN: "hospital_admin", + DOCTOR: "doctor", + RECEPTIONIST: "receptionist" + }; + defaultRole = ROLE_NAMES.GENERAL_USER; + RoleManager = class { + roles = /* @__PURE__ */ new Map(); + rolesByName = /* @__PURE__ */ new Map(); + isInitialized = false; + constructor() { + } + /** + * Fetch all roles from the database and cache them + * This should be called during application startup + */ + async fetchRoles() { + try { + } catch (error50) { + console.error("[RoleManager] Error fetching roles:", error50); + throw error50; + } + } + /** + * Get all roles from cache + * If not initialized, fetches roles from DB first + */ + async getRoles() { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return Array.from(this.roles.values()); + } + /** + * Get role by ID + * @param id Role ID + */ + async getRoleById(id) { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return this.roles.get(id); + } + /** + * Get role by name + * @param name Role name + */ + async getRoleByName(name) { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return this.rolesByName.get(name); + } + /** + * Check if a role exists by name + * @param name Role name + */ + async roleExists(name) { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return this.rolesByName.has(name); + } + /** + * Get business roles (roles that are not 'admin' or 'gen_user') + */ + async getBusinessRoles() { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return Array.from(this.roles.values()).filter( + (role) => role.name !== ROLE_NAMES.ADMIN && role.name !== ROLE_NAMES.GENERAL_USER + ); + } + /** + * Force refresh the roles cache + */ + async refreshRoles() { + await this.fetchRoles(); + } + }; + __name(RoleManager, "RoleManager"); + roleManager = new RoleManager(); + roles_manager_default = roleManager; + } +}); + +// src/lib/const-keys.ts +var CONST_KEYS, CONST_KEYS_ARRAY; +var init_const_keys = __esm({ + "src/lib/const-keys.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + CONST_KEYS = { + minRegularOrderValue: "minRegularOrderValue", + freeDeliveryThreshold: "freeDeliveryThreshold", + deliveryCharge: "deliveryCharge", + flashFreeDeliveryThreshold: "flashFreeDeliveryThreshold", + flashDeliveryCharge: "flashDeliveryCharge", + platformFeePercent: "platformFeePercent", + taxRate: "taxRate", + tester: "tester", + minOrderAmountForCoupon: "minOrderAmountForCoupon", + maxCouponDiscount: "maxCouponDiscount", + flashDeliverySlotId: "flashDeliverySlotId", + readableOrderId: "readableOrderId", + versionNum: "versionNum", + playStoreUrl: "playStoreUrl", + appStoreUrl: "appStoreUrl", + popularItems: "popularItems", + allItemsOrder: "allItemsOrder", + isFlashDeliveryEnabled: "isFlashDeliveryEnabled", + supportMobile: "supportMobile", + supportEmail: "supportEmail" + }; + CONST_KEYS_ARRAY = Object.values(CONST_KEYS); + } +}); + +// src/lib/const-store.ts +var computeConstants, getConstant, getConstants, getAllConstValues; +var init_const_store = __esm({ + "src/lib/const-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_const_keys(); + computeConstants = /* @__PURE__ */ __name(async () => { + try { + console.log("Computing constants from database..."); + const constants2 = await getAllKeyValStore(); + console.log(`Computed ${constants2.length} constants from DB`); + } catch (error50) { + console.error("Failed to compute constants:", error50); + throw error50; + } + }, "computeConstants"); + getConstant = /* @__PURE__ */ __name(async (key) => { + const constants2 = await getAllKeyValStore(); + const entry = constants2.find((c2) => c2.key === key); + if (!entry) { + return null; + } + return entry.value; + }, "getConstant"); + getConstants = /* @__PURE__ */ __name(async (keys) => { + const constants2 = await getAllKeyValStore(); + const constantsMap = new Map(constants2.map((c2) => [c2.key, c2.value])); + const result = {}; + for (const key of keys) { + const value = constantsMap.get(key); + result[key] = value !== void 0 ? value : null; + } + return result; + }, "getConstants"); + getAllConstValues = /* @__PURE__ */ __name(async () => { + const constants2 = await getAllKeyValStore(); + const constantsMap = new Map(constants2.map((c2) => [c2.key, c2.value])); + const result = {}; + for (const key of CONST_KEYS_ARRAY) { + result[key] = constantsMap.get(key) ?? null; + } + return result; + }, "getAllConstValues"); + } +}); + +// src/stores/slot-store.ts +async function transformSlotToStoreSlot(slot) { + return { + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isCapacityFull: slot.isCapacityFull, + products: slot.productSlots.map((productSlot) => ({ + id: productSlot.product.id, + name: productSlot.product.name, + productQuantity: productSlot.product.productQuantity, + shortDescription: productSlot.product.shortDescription, + price: productSlot.product.price.toString(), + marketPrice: productSlot.product.marketPrice?.toString() || null, + unit: productSlot.product.unit?.shortNotation || null, + images: scaffoldAssetUrl( + productSlot.product.images || [] + ), + isOutOfStock: productSlot.product.isOutOfStock, + storeId: productSlot.product.storeId, + nextDeliveryDate: slot.deliveryTime + })) + }; +} +function extractSlotInfo(slot) { + return { + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isCapacityFull: slot.isCapacityFull + }; +} +async function fetchAllTransformedSlots() { + const slots = await getAllSlotsWithProductsForCache(); + return Promise.all(slots.map(transformSlotToStoreSlot)); +} +async function initializeSlotStore() { + try { + console.log("Initializing slot store in Redis..."); + const slots = await getAllSlotsWithProductsForCache(); + const slotsWithProducts = await Promise.all( + slots.map(async (slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isCapacityFull: slot.isCapacityFull, + products: await Promise.all( + slot.productSlots.map(async (productSlot) => ({ + id: productSlot.product.id, + name: productSlot.product.name, + productQuantity: productSlot.product.productQuantity, + shortDescription: productSlot.product.shortDescription, + price: productSlot.product.price.toString(), + marketPrice: productSlot.product.marketPrice?.toString() || null, + unit: productSlot.product.unit?.shortNotation || null, + images: scaffoldAssetUrl( + productSlot.product.images || [] + ), + isOutOfStock: productSlot.product.isOutOfStock, + storeId: productSlot.product.storeId, + nextDeliveryDate: slot.deliveryTime + })) + ) + })) + ); + const productSlotsMap = {}; + for (const slot of slotsWithProducts) { + for (const product of slot.products) { + if (!productSlotsMap[product.id]) { + productSlotsMap[product.id] = []; + } + productSlotsMap[product.id].push({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isCapacityFull: slot.isCapacityFull + }); + } + } + console.log("Slot store initialized successfully"); + } catch (error50) { + console.error("Error initializing slot store:", error50); + } +} +async function getSlotById(slotId) { + try { + const slots = await getAllSlotsWithProductsForCache(); + const slot = slots.find((s2) => s2.id === slotId); + if (!slot) + return null; + return transformSlotToStoreSlot(slot); + } catch (error50) { + console.error(`Error getting slot ${slotId}:`, error50); + return null; + } +} +async function getAllSlots() { + try { + return fetchAllTransformedSlots(); + } catch (error50) { + console.error("Error getting all slots:", error50); + return []; + } +} +async function getMultipleProductsSlots(productIds) { + try { + if (productIds.length === 0) + return {}; + const slots = await getAllSlotsWithProductsForCache(); + const productIdSet = new Set(productIds); + const result = {}; + for (const productId of productIds) { + result[productId] = []; + } + for (const slot of slots) { + const slotInfo = extractSlotInfo(slot); + for (const productSlot of slot.productSlots) { + const pid2 = productSlot.product.id; + if (productIdSet.has(pid2) && !slot.isCapacityFull) { + result[pid2].push(slotInfo); + } + } + } + return result; + } catch (error50) { + console.error("Error getting products slots:", error50); + return {}; + } +} +var init_slot_store = __esm({ + "src/stores/slot-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_s3_client(); + __name(transformSlotToStoreSlot, "transformSlotToStoreSlot"); + __name(extractSlotInfo, "extractSlotInfo"); + __name(fetchAllTransformedSlots, "fetchAllTransformedSlots"); + __name(initializeSlotStore, "initializeSlotStore"); + __name(getSlotById, "getSlotById"); + __name(getAllSlots, "getAllSlots"); + __name(getMultipleProductsSlots, "getMultipleProductsSlots"); + } +}); + +// src/stores/banner-store.ts +async function initializeBannerStore() { + try { + console.log("Initializing banner store in Redis..."); + const banners = await getAllBannersForCache(); + console.log("Banner store initialized successfully"); + } catch (error50) { + console.error("Error initializing banner store:", error50); + } +} +var init_banner_store = __esm({ + "src/stores/banner-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_s3_client(); + __name(initializeBannerStore, "initializeBannerStore"); + } +}); + +// ../../node_modules/@turf/helpers/dist/esm/index.js +function feature(geom, properties, options = {}) { + const feat = { type: "Feature" }; + if (options.id === 0 || options.id) { + feat.id = options.id; + } + if (options.bbox) { + feat.bbox = options.bbox; + } + feat.properties = properties || {}; + feat.geometry = geom; + return feat; +} +function point(coordinates, properties, options = {}) { + if (!coordinates) { + throw new Error("coordinates is required"); + } + if (!Array.isArray(coordinates)) { + throw new Error("coordinates must be an Array"); + } + if (coordinates.length < 2) { + throw new Error("coordinates must be at least 2 numbers long"); + } + if (!isNumber2(coordinates[0]) || !isNumber2(coordinates[1])) { + throw new Error("coordinates must contain numbers"); + } + const geom = { + type: "Point", + coordinates + }; + return feature(geom, properties, options); +} +function polygon(coordinates, properties, options = {}) { + for (const ring of coordinates) { + if (ring.length < 4) { + throw new Error( + "Each LinearRing of a Polygon must have 4 or more Positions." + ); + } + if (ring[ring.length - 1].length !== ring[0].length) { + throw new Error("First and last Position are not equivalent."); + } + for (let j2 = 0; j2 < ring[ring.length - 1].length; j2++) { + if (ring[ring.length - 1][j2] !== ring[0][j2]) { + throw new Error("First and last Position are not equivalent."); + } + } + } + const geom = { + type: "Polygon", + coordinates + }; + return feature(geom, properties, options); +} +function isNumber2(num) { + return !isNaN(num) && num !== null && !Array.isArray(num); +} +var earthRadius, factors; +var init_esm = __esm({ + "../../node_modules/@turf/helpers/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + earthRadius = 63710088e-1; + factors = { + centimeters: earthRadius * 100, + centimetres: earthRadius * 100, + degrees: 360 / (2 * Math.PI), + feet: earthRadius * 3.28084, + inches: earthRadius * 39.37, + kilometers: earthRadius / 1e3, + kilometres: earthRadius / 1e3, + meters: earthRadius, + metres: earthRadius, + miles: earthRadius / 1609.344, + millimeters: earthRadius * 1e3, + millimetres: earthRadius * 1e3, + nauticalmiles: earthRadius / 1852, + radians: 1, + yards: earthRadius * 1.0936 + }; + __name(feature, "feature"); + __name(point, "point"); + __name(polygon, "polygon"); + __name(isNumber2, "isNumber"); + } +}); + +// ../../node_modules/@turf/invariant/dist/esm/index.js +function getCoord(coord) { + if (!coord) { + throw new Error("coord is required"); + } + if (!Array.isArray(coord)) { + if (coord.type === "Feature" && coord.geometry !== null && coord.geometry.type === "Point") { + return [...coord.geometry.coordinates]; + } + if (coord.type === "Point") { + return [...coord.coordinates]; + } + } + if (Array.isArray(coord) && coord.length >= 2 && !Array.isArray(coord[0]) && !Array.isArray(coord[1])) { + return [...coord]; + } + throw new Error("coord must be GeoJSON Point or an Array of numbers"); +} +function getGeom(geojson) { + if (geojson.type === "Feature") { + return geojson.geometry; + } + return geojson; +} +var init_esm2 = __esm({ + "../../node_modules/@turf/invariant/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(getCoord, "getCoord"); + __name(getGeom, "getGeom"); + } +}); + +// ../../node_modules/@turf/meta/dist/esm/index.js +var init_esm3 = __esm({ + "../../node_modules/@turf/meta/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/robust-predicates/esm/util.js +function sum(elen, e2, flen, f2, h2) { + let Q2, Qnew, hh2, bvirt; + let enow = e2[0]; + let fnow = f2[0]; + let eindex = 0; + let findex = 0; + if (fnow > enow === fnow > -enow) { + Q2 = enow; + enow = e2[++eindex]; + } else { + Q2 = fnow; + fnow = f2[++findex]; + } + let hindex = 0; + if (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = enow + Q2; + hh2 = Q2 - (Qnew - enow); + enow = e2[++eindex]; + } else { + Qnew = fnow + Q2; + hh2 = Q2 - (Qnew - fnow); + fnow = f2[++findex]; + } + Q2 = Qnew; + if (hh2 !== 0) { + h2[hindex++] = hh2; + } + while (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = Q2 + enow; + bvirt = Qnew - Q2; + hh2 = Q2 - (Qnew - bvirt) + (enow - bvirt); + enow = e2[++eindex]; + } else { + Qnew = Q2 + fnow; + bvirt = Qnew - Q2; + hh2 = Q2 - (Qnew - bvirt) + (fnow - bvirt); + fnow = f2[++findex]; + } + Q2 = Qnew; + if (hh2 !== 0) { + h2[hindex++] = hh2; + } + } + } + while (eindex < elen) { + Qnew = Q2 + enow; + bvirt = Qnew - Q2; + hh2 = Q2 - (Qnew - bvirt) + (enow - bvirt); + enow = e2[++eindex]; + Q2 = Qnew; + if (hh2 !== 0) { + h2[hindex++] = hh2; + } + } + while (findex < flen) { + Qnew = Q2 + fnow; + bvirt = Qnew - Q2; + hh2 = Q2 - (Qnew - bvirt) + (fnow - bvirt); + fnow = f2[++findex]; + Q2 = Qnew; + if (hh2 !== 0) { + h2[hindex++] = hh2; + } + } + if (Q2 !== 0 || hindex === 0) { + h2[hindex++] = Q2; + } + return hindex; +} +function estimate(elen, e2) { + let Q2 = e2[0]; + for (let i2 = 1; i2 < elen; i2++) + Q2 += e2[i2]; + return Q2; +} +function vec(n2) { + return new Float64Array(n2); +} +var epsilon, splitter, resulterrbound; +var init_util4 = __esm({ + "../../node_modules/robust-predicates/esm/util.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + epsilon = 11102230246251565e-32; + splitter = 134217729; + resulterrbound = (3 + 8 * epsilon) * epsilon; + __name(sum, "sum"); + __name(estimate, "estimate"); + __name(vec, "vec"); + } +}); + +// ../../node_modules/robust-predicates/esm/orient2d.js +function orient2dadapt(ax2, ay2, bx2, by2, cx2, cy2, detsum) { + let acxtail, acytail, bcxtail, bcytail; + let bvirt, c2, ahi, alo, bhi, blo, _i2, _j, _0, s1, s0, t12, t02, u32; + const acx = ax2 - cx2; + const bcx = bx2 - cx2; + const acy = ay2 - cy2; + const bcy = by2 - cy2; + s1 = acx * bcy; + c2 = splitter * acx; + ahi = c2 - (c2 - acx); + alo = acx - ahi; + c2 = splitter * bcy; + bhi = c2 - (c2 - bcy); + blo = bcy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t12 = acy * bcx; + c2 = splitter * acy; + ahi = c2 - (c2 - acy); + alo = acy - ahi; + c2 = splitter * bcx; + bhi = c2 - (c2 - bcx); + blo = bcx - bhi; + t02 = alo * blo - (t12 - ahi * bhi - alo * bhi - ahi * blo); + _i2 = s0 - t02; + bvirt = s0 - _i2; + B2[0] = s0 - (_i2 + bvirt) + (bvirt - t02); + _j = s1 + _i2; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i2 - bvirt); + _i2 = _0 - t12; + bvirt = _0 - _i2; + B2[1] = _0 - (_i2 + bvirt) + (bvirt - t12); + u32 = _j + _i2; + bvirt = u32 - _j; + B2[2] = _j - (u32 - bvirt) + (_i2 - bvirt); + B2[3] = u32; + let det = estimate(4, B2); + let errbound = ccwerrboundB * detsum; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax2 - acx; + acxtail = ax2 - (acx + bvirt) + (bvirt - cx2); + bvirt = bx2 - bcx; + bcxtail = bx2 - (bcx + bvirt) + (bvirt - cx2); + bvirt = ay2 - acy; + acytail = ay2 - (acy + bvirt) + (bvirt - cy2); + bvirt = by2 - bcy; + bcytail = by2 - (bcy + bvirt) + (bvirt - cy2); + if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) { + return det; + } + errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det); + det += acx * bcytail + bcy * acxtail - (acy * bcxtail + bcx * acytail); + if (det >= errbound || -det >= errbound) + return det; + s1 = acxtail * bcy; + c2 = splitter * acxtail; + ahi = c2 - (c2 - acxtail); + alo = acxtail - ahi; + c2 = splitter * bcy; + bhi = c2 - (c2 - bcy); + blo = bcy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t12 = acytail * bcx; + c2 = splitter * acytail; + ahi = c2 - (c2 - acytail); + alo = acytail - ahi; + c2 = splitter * bcx; + bhi = c2 - (c2 - bcx); + blo = bcx - bhi; + t02 = alo * blo - (t12 - ahi * bhi - alo * bhi - ahi * blo); + _i2 = s0 - t02; + bvirt = s0 - _i2; + u2[0] = s0 - (_i2 + bvirt) + (bvirt - t02); + _j = s1 + _i2; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i2 - bvirt); + _i2 = _0 - t12; + bvirt = _0 - _i2; + u2[1] = _0 - (_i2 + bvirt) + (bvirt - t12); + u32 = _j + _i2; + bvirt = u32 - _j; + u2[2] = _j - (u32 - bvirt) + (_i2 - bvirt); + u2[3] = u32; + const C1len = sum(4, B2, 4, u2, C1); + s1 = acx * bcytail; + c2 = splitter * acx; + ahi = c2 - (c2 - acx); + alo = acx - ahi; + c2 = splitter * bcytail; + bhi = c2 - (c2 - bcytail); + blo = bcytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t12 = acy * bcxtail; + c2 = splitter * acy; + ahi = c2 - (c2 - acy); + alo = acy - ahi; + c2 = splitter * bcxtail; + bhi = c2 - (c2 - bcxtail); + blo = bcxtail - bhi; + t02 = alo * blo - (t12 - ahi * bhi - alo * bhi - ahi * blo); + _i2 = s0 - t02; + bvirt = s0 - _i2; + u2[0] = s0 - (_i2 + bvirt) + (bvirt - t02); + _j = s1 + _i2; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i2 - bvirt); + _i2 = _0 - t12; + bvirt = _0 - _i2; + u2[1] = _0 - (_i2 + bvirt) + (bvirt - t12); + u32 = _j + _i2; + bvirt = u32 - _j; + u2[2] = _j - (u32 - bvirt) + (_i2 - bvirt); + u2[3] = u32; + const C2len = sum(C1len, C1, 4, u2, C2); + s1 = acxtail * bcytail; + c2 = splitter * acxtail; + ahi = c2 - (c2 - acxtail); + alo = acxtail - ahi; + c2 = splitter * bcytail; + bhi = c2 - (c2 - bcytail); + blo = bcytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t12 = acytail * bcxtail; + c2 = splitter * acytail; + ahi = c2 - (c2 - acytail); + alo = acytail - ahi; + c2 = splitter * bcxtail; + bhi = c2 - (c2 - bcxtail); + blo = bcxtail - bhi; + t02 = alo * blo - (t12 - ahi * bhi - alo * bhi - ahi * blo); + _i2 = s0 - t02; + bvirt = s0 - _i2; + u2[0] = s0 - (_i2 + bvirt) + (bvirt - t02); + _j = s1 + _i2; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i2 - bvirt); + _i2 = _0 - t12; + bvirt = _0 - _i2; + u2[1] = _0 - (_i2 + bvirt) + (bvirt - t12); + u32 = _j + _i2; + bvirt = u32 - _j; + u2[2] = _j - (u32 - bvirt) + (_i2 - bvirt); + u2[3] = u32; + const Dlen = sum(C2len, C2, 4, u2, D2); + return D2[Dlen - 1]; +} +function orient2d(ax2, ay2, bx2, by2, cx2, cy2) { + const detleft = (ay2 - cy2) * (bx2 - cx2); + const detright = (ax2 - cx2) * (by2 - cy2); + const det = detleft - detright; + const detsum = Math.abs(detleft + detright); + if (Math.abs(det) >= ccwerrboundA * detsum) + return det; + return -orient2dadapt(ax2, ay2, bx2, by2, cx2, cy2, detsum); +} +var ccwerrboundA, ccwerrboundB, ccwerrboundC, B2, C1, C2, D2, u2; +var init_orient2d = __esm({ + "../../node_modules/robust-predicates/esm/orient2d.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util4(); + ccwerrboundA = (3 + 16 * epsilon) * epsilon; + ccwerrboundB = (2 + 12 * epsilon) * epsilon; + ccwerrboundC = (9 + 64 * epsilon) * epsilon * epsilon; + B2 = vec(4); + C1 = vec(8); + C2 = vec(12); + D2 = vec(16); + u2 = vec(4); + __name(orient2dadapt, "orient2dadapt"); + __name(orient2d, "orient2d"); + } +}); + +// ../../node_modules/robust-predicates/esm/orient3d.js +var o3derrboundA, o3derrboundB, o3derrboundC, bc2, ca2, ab2, at_b, at_c, bt_c, bt_a, ct_a, ct_b, bct, cat, abt, u3, _8, _8b, _16, _12, fin, fin2; +var init_orient3d = __esm({ + "../../node_modules/robust-predicates/esm/orient3d.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util4(); + o3derrboundA = (7 + 56 * epsilon) * epsilon; + o3derrboundB = (3 + 28 * epsilon) * epsilon; + o3derrboundC = (26 + 288 * epsilon) * epsilon * epsilon; + bc2 = vec(4); + ca2 = vec(4); + ab2 = vec(4); + at_b = vec(4); + at_c = vec(4); + bt_c = vec(4); + bt_a = vec(4); + ct_a = vec(4); + ct_b = vec(4); + bct = vec(8); + cat = vec(8); + abt = vec(8); + u3 = vec(4); + _8 = vec(8); + _8b = vec(8); + _16 = vec(8); + _12 = vec(12); + fin = vec(192); + fin2 = vec(192); + } +}); + +// ../../node_modules/robust-predicates/esm/incircle.js +var iccerrboundA, iccerrboundB, iccerrboundC, bc3, ca3, ab3, aa2, bb2, cc2, u4, v2, axtbc, aytbc, bxtca, bytca, cxtab, cytab, abt2, bct2, cat2, abtt, bctt, catt, _82, _162, _16b, _16c, _32, _32b, _48, _64, fin3, fin22; +var init_incircle = __esm({ + "../../node_modules/robust-predicates/esm/incircle.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util4(); + iccerrboundA = (10 + 96 * epsilon) * epsilon; + iccerrboundB = (4 + 48 * epsilon) * epsilon; + iccerrboundC = (44 + 576 * epsilon) * epsilon * epsilon; + bc3 = vec(4); + ca3 = vec(4); + ab3 = vec(4); + aa2 = vec(4); + bb2 = vec(4); + cc2 = vec(4); + u4 = vec(4); + v2 = vec(4); + axtbc = vec(8); + aytbc = vec(8); + bxtca = vec(8); + bytca = vec(8); + cxtab = vec(8); + cytab = vec(8); + abt2 = vec(8); + bct2 = vec(8); + cat2 = vec(8); + abtt = vec(4); + bctt = vec(4); + catt = vec(4); + _82 = vec(8); + _162 = vec(16); + _16b = vec(16); + _16c = vec(16); + _32 = vec(32); + _32b = vec(32); + _48 = vec(48); + _64 = vec(64); + fin3 = vec(1152); + fin22 = vec(1152); + } +}); + +// ../../node_modules/robust-predicates/esm/insphere.js +var isperrboundA, isperrboundB, isperrboundC, ab4, bc4, cd2, de, ea, ac2, bd2, ce2, da, eb, abc, bcd, cde, dea, eab, abd, bce, cda, deb, eac, adet, bdet, cdet, ddet, edet, abdet, cddet, cdedet, deter, _83, _8b2, _8c, _163, _24, _482, _48b, _96, _192, _384x, _384y, _384z, _768, xdet, ydet, zdet, fin4; +var init_insphere = __esm({ + "../../node_modules/robust-predicates/esm/insphere.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util4(); + isperrboundA = (16 + 224 * epsilon) * epsilon; + isperrboundB = (5 + 72 * epsilon) * epsilon; + isperrboundC = (71 + 1408 * epsilon) * epsilon * epsilon; + ab4 = vec(4); + bc4 = vec(4); + cd2 = vec(4); + de = vec(4); + ea = vec(4); + ac2 = vec(4); + bd2 = vec(4); + ce2 = vec(4); + da = vec(4); + eb = vec(4); + abc = vec(24); + bcd = vec(24); + cde = vec(24); + dea = vec(24); + eab = vec(24); + abd = vec(24); + bce = vec(24); + cda = vec(24); + deb = vec(24); + eac = vec(24); + adet = vec(1152); + bdet = vec(1152); + cdet = vec(1152); + ddet = vec(1152); + edet = vec(1152); + abdet = vec(2304); + cddet = vec(2304); + cdedet = vec(3456); + deter = vec(5760); + _83 = vec(8); + _8b2 = vec(8); + _8c = vec(8); + _163 = vec(16); + _24 = vec(24); + _482 = vec(48); + _48b = vec(48); + _96 = vec(96); + _192 = vec(192); + _384x = vec(384); + _384y = vec(384); + _384z = vec(384); + _768 = vec(768); + xdet = vec(96); + ydet = vec(96); + zdet = vec(96); + fin4 = vec(1152); + } +}); + +// ../../node_modules/robust-predicates/index.js +var init_robust_predicates = __esm({ + "../../node_modules/robust-predicates/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_orient2d(); + init_orient3d(); + init_incircle(); + init_insphere(); + } +}); + +// ../../node_modules/point-in-polygon-hao/dist/esm/index.js +function pointInPolygon(p2, polygon3) { + var i2; + var ii2; + var k2 = 0; + var f2; + var u1; + var v1; + var u22; + var v22; + var currentP; + var nextP; + var x2 = p2[0]; + var y2 = p2[1]; + var numContours = polygon3.length; + for (i2 = 0; i2 < numContours; i2++) { + ii2 = 0; + var contour = polygon3[i2]; + var contourLen = contour.length - 1; + currentP = contour[0]; + if (currentP[0] !== contour[contourLen][0] && currentP[1] !== contour[contourLen][1]) { + throw new Error("First and last coordinates in a ring must be the same"); + } + u1 = currentP[0] - x2; + v1 = currentP[1] - y2; + for (ii2; ii2 < contourLen; ii2++) { + nextP = contour[ii2 + 1]; + u22 = nextP[0] - x2; + v22 = nextP[1] - y2; + if (v1 === 0 && v22 === 0) { + if (u22 <= 0 && u1 >= 0 || u1 <= 0 && u22 >= 0) { + return 0; + } + } else if (v22 >= 0 && v1 <= 0 || v22 <= 0 && v1 >= 0) { + f2 = orient2d(u1, u22, v1, v22, 0, 0); + if (f2 === 0) { + return 0; + } + if (f2 > 0 && v22 > 0 && v1 <= 0 || f2 < 0 && v22 <= 0 && v1 > 0) { + k2++; + } + } + currentP = nextP; + v1 = v22; + u1 = u22; + } + } + if (k2 % 2 === 0) { + return false; + } + return true; +} +var init_esm4 = __esm({ + "../../node_modules/point-in-polygon-hao/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_robust_predicates(); + __name(pointInPolygon, "pointInPolygon"); + } +}); + +// ../../node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +function booleanPointInPolygon(point2, polygon3, options = {}) { + if (!point2) { + throw new Error("point is required"); + } + if (!polygon3) { + throw new Error("polygon is required"); + } + const pt = getCoord(point2); + const geom = getGeom(polygon3); + const type = geom.type; + const bbox = polygon3.bbox; + let polys = geom.coordinates; + if (bbox && inBBox(pt, bbox) === false) { + return false; + } + if (type === "Polygon") { + polys = [polys]; + } + let result = false; + for (var i2 = 0; i2 < polys.length; ++i2) { + const polyResult = pointInPolygon(pt, polys[i2]); + if (polyResult === 0) + return options.ignoreBoundary ? false : true; + else if (polyResult) + result = true; + } + return result; +} +function inBBox(pt, bbox) { + return bbox[0] <= pt[0] && bbox[1] <= pt[1] && bbox[2] >= pt[0] && bbox[3] >= pt[1]; +} +var init_esm5 = __esm({ + "../../node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_esm4(); + init_esm2(); + __name(booleanPointInPolygon, "booleanPointInPolygon"); + __name(inBBox, "inBBox"); + } +}); + +// ../../node_modules/@turf/clone/dist/esm/index.js +var init_esm6 = __esm({ + "../../node_modules/@turf/clone/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/clusters/dist/esm/index.js +var init_esm7 = __esm({ + "../../node_modules/@turf/clusters/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js +var init_esm8 = __esm({ + "../../node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/projection/dist/esm/index.js +var init_esm9 = __esm({ + "../../node_modules/@turf/projection/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/quadrat-analysis/dist/esm/index.js +var init_esm10 = __esm({ + "../../node_modules/@turf/quadrat-analysis/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/random/dist/esm/index.js +var init_esm11 = __esm({ + "../../node_modules/@turf/random/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/turf/dist/esm/index.js +var init_esm12 = __esm({ + "../../node_modules/@turf/turf/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_esm5(); + init_esm6(); + init_esm7(); + init_esm(); + init_esm2(); + init_esm3(); + init_esm8(); + init_esm9(); + init_esm10(); + init_esm11(); + } +}); + +// src/lib/mbnr-geojson.ts +var mbnrGeoJson; +var init_mbnr_geojson = __esm({ + "src/lib/mbnr-geojson.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + mbnrGeoJson = { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + [ + [ + 78.0540565157155, + 16.750355644371382 + ], + [ + 78.02147549424018, + 16.72066473405593 + ], + [ + 78.03026125246384, + 16.71696749930787 + ], + [ + 78.0438058450269, + 16.72191442229257 + ], + [ + 78.01378723066603, + 16.729427120762438 + ], + [ + 78.01192390645633, + 16.767270033080678 + ], + [ + 77.98897480599248, + 16.78383139678816 + ], + [ + 77.98650506846502, + 16.779477610410623 + ], + [ + 77.99211289459566, + 16.764294442899583 + ], + [ + 77.9917733766166, + 16.760247911187193 + ], + [ + 77.9871626670851, + 16.762487176781022 + ], + [ + 77.98216269568468, + 16.762520539253813 + ], + [ + 77.9728079653313, + 16.75895746646411 + ], + [ + 77.97076993211158, + 16.749241850772236 + ], + [ + 77.97290869571145, + 16.714289841456335 + ], + [ + 77.98673742913684, + 16.716189282573396 + ], + [ + 78.00286970994557, + 16.718191131206893 + ], + [ + 78.02757966423519, + 16.720603921728966 + ], + [ + 78.01653780770818, + 16.73184590223127 + ], + [ + 78.0064695230268, + 16.760236966033375 + ], + [ + 78.0148831108591, + 16.760801801995825 + ], + [ + 78.01488756695255, + 16.75827980335133 + ], + [ + 78.0244311364159, + 16.744778942163208 + ], + [ + 78.03342267256608, + 16.760773251410058 + ], + [ + 78.05078586709863, + 16.763902127913653 + ], + [ + 78.0540565157155, + 16.750355644371382 + ] + ] + ], + "type": "Polygon" + } + } + ] + }; + } +}); + +// src/trpc/apis/common-apis/common-trpc-index.ts +async function scaffoldEssentialConsts() { + const consts = await getAllConstValues(); + return { + freeDeliveryThreshold: consts[CONST_KEYS.freeDeliveryThreshold] ?? 200, + deliveryCharge: consts[CONST_KEYS.deliveryCharge] ?? 0, + flashFreeDeliveryThreshold: consts[CONST_KEYS.flashFreeDeliveryThreshold] ?? 500, + flashDeliveryCharge: consts[CONST_KEYS.flashDeliveryCharge] ?? 69, + popularItems: consts[CONST_KEYS.popularItems] ?? "5,3,2,4,1", + versionNum: consts[CONST_KEYS.versionNum] ?? "1.1.0", + playStoreUrl: consts[CONST_KEYS.playStoreUrl] ?? "https://play.google.com/store/apps/details?id=in.freshyo.app", + appStoreUrl: consts[CONST_KEYS.appStoreUrl] ?? "https://apps.apple.com/in/app/freshyo/id6756889077", + webViewHtml: null, + isWebviewClosable: true, + isFlashDeliveryEnabled: consts[CONST_KEYS.isFlashDeliveryEnabled] ?? true, + supportMobile: consts[CONST_KEYS.supportMobile] ?? "", + supportEmail: consts[CONST_KEYS.supportEmail] ?? "", + assetsDomain, + apiCacheKey + }; +} +var polygon2, commonApiRouter; +var init_common_trpc_index = __esm({ + "src/trpc/apis/common-apis/common-trpc-index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_common3(); + init_dbService(); + init_esm12(); + init_zod(); + init_mbnr_geojson(); + init_s3_client(); + init_api_error(); + init_const_store(); + init_const_keys(); + init_env_exporter(); + polygon2 = polygon(mbnrGeoJson.features[0].geometry.coordinates); + __name(scaffoldEssentialConsts, "scaffoldEssentialConsts"); + commonApiRouter = router2({ + product: commonRouter, + getStoresSummary: publicProcedure.query(async () => { + const stores = await getStoresSummary(); + return { + stores + }; + }), + checkLocationInPolygon: publicProcedure.input(external_exports.object({ + lat: external_exports.number().min(-90).max(90), + lng: external_exports.number().min(-180).max(180) + })).query(({ input }) => { + try { + const { lat, lng } = input; + const point2 = point([lng, lat]); + const isInside = booleanPointInPolygon(point2, polygon2); + return { isInside }; + } catch (error50) { + throw new Error("Invalid coordinates or polygon data"); + } + }), + generateUploadUrls: protectedProcedure.input(external_exports.object({ + contextString: external_exports.enum(["review", "review_response", "product_info", "notification", "store", "complaint", "profile", "tags"]), + mimeTypes: external_exports.array(external_exports.string()) + })).mutation(async ({ input }) => { + const { contextString, mimeTypes } = input; + const uploadUrls = []; + const keys = []; + for (const mimeType of mimeTypes) { + let folder; + if (contextString === "review") { + folder = "review-images"; + } else if (contextString === "product_info") { + folder = "product-images"; + } else if (contextString === "store") { + folder = "store-images"; + } else if (contextString === "review_response") { + folder = "review-response-images"; + } else if (contextString === "complaint") { + folder = "complaint-images"; + } else if (contextString === "profile") { + folder = "profile-images"; + } else if (contextString === "tags") { + folder = "tags"; + } else { + folder = ""; + } + const extension = mimeType === "image/jpeg" ? ".jpg" : mimeType === "image/png" ? ".png" : mimeType === "image/gif" ? ".gif" : ".jpg"; + const key = `${folder}/${Date.now()}${extension}`; + try { + const uploadUrl = await generateUploadUrl(key, mimeType); + uploadUrls.push(uploadUrl); + keys.push(key); + } catch (error50) { + console.error("Error generating upload URL:", error50); + throw new ApiError("Failed to generate upload URL", 500); + } + } + return { uploadUrls }; + }), + healthCheck: publicProcedure.query(async () => { + const result = await healthCheck(); + return result; + }), + essentialConsts: publicProcedure.query(async () => { + const response = await scaffoldEssentialConsts(); + return response; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/stores.ts +async function scaffoldStores() { + const storesData = await getStoreSummaries(); + const storesWithDetails = storesData.map((store) => { + const signedImageUrl = store.imageUrl ? scaffoldAssetUrl(store.imageUrl) : null; + const sampleProducts = store.sampleProducts.map((product) => ({ + id: product.id, + name: product.name, + signedImageUrl: product.images && product.images.length > 0 ? scaffoldAssetUrl(product.images[0]) : null + })); + return { + id: store.id, + name: store.name, + description: store.description, + signedImageUrl, + productCount: store.productCount, + sampleProducts + }; + }); + return { + stores: storesWithDetails + }; +} +async function scaffoldStoreWithProducts(storeId) { + const storeDetail = await getStoreDetail(storeId); + if (!storeDetail) { + throw new ApiError("Store not found", 404); + } + const signedImageUrl = storeDetail.store.imageUrl ? scaffoldAssetUrl(storeDetail.store.imageUrl) : null; + const productsWithSignedUrls = storeDetail.products.map((product) => ({ + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + price: product.price, + marketPrice: product.marketPrice, + incrementStep: product.incrementStep, + unit: product.unit, + unitNotation: product.unitNotation, + images: scaffoldAssetUrl(product.images || []), + isOutOfStock: product.isOutOfStock, + productQuantity: product.productQuantity + })); + const tags = await getTagsByStoreId(storeId); + return { + store: { + id: storeDetail.store.id, + name: storeDetail.store.name, + description: storeDetail.store.description, + signedImageUrl + }, + products: productsWithSignedUrls, + tags: tags.map((tag2) => ({ + id: tag2.id, + tagName: tag2.tagName, + tagDescription: tag2.tagDescription, + imageUrl: tag2.imageUrl, + productIds: tag2.productIds + })) + }; +} +var storesRouter; +var init_stores2 = __esm({ + "src/trpc/apis/user-apis/apis/stores.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_s3_client(); + init_api_error(); + init_product_tag_store(); + init_dbService(); + __name(scaffoldStores, "scaffoldStores"); + __name(scaffoldStoreWithProducts, "scaffoldStoreWithProducts"); + storesRouter = router2({ + getStores: publicProcedure.query(async () => { + const response = await scaffoldStores(); + return response; + }), + getStoreWithProducts: publicProcedure.input(external_exports.object({ + storeId: external_exports.number() + })).query(async ({ input }) => { + const { storeId } = input; + const response = await scaffoldStoreWithProducts(storeId); + return response; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/slots.ts +async function getSlotData(slotId) { + const slot = await getSlotById(slotId); + if (!slot) { + return null; + } + const currentTime = /* @__PURE__ */ new Date(); + if ((0, import_dayjs3.default)(slot.freezeTime).isBefore(currentTime)) { + return null; + } + return { + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + slotId: slot.id, + products: slot.products.filter((product) => !product.isOutOfStock) + }; +} +async function scaffoldSlotsWithProducts() { + const allSlots = await getAllSlots(); + const currentTime = /* @__PURE__ */ new Date(); + const validSlots = allSlots.filter((slot) => { + return (0, import_dayjs3.default)(slot.freezeTime).isAfter(currentTime) && (0, import_dayjs3.default)(slot.deliveryTime).isAfter(currentTime) && !slot.isCapacityFull; + }).sort((a2, b2) => (0, import_dayjs3.default)(a2.deliveryTime).valueOf() - (0, import_dayjs3.default)(b2.deliveryTime).valueOf()); + const productAvailability = await getProductAvailability(); + return { + slots: validSlots, + productAvailability, + count: validSlots.length + }; +} +var import_dayjs3, slotsRouter; +var init_slots3 = __esm({ + "src/trpc/apis/user-apis/apis/slots.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_slot_store(); + import_dayjs3 = __toESM(require_dayjs_min()); + init_dbService(); + __name(getSlotData, "getSlotData"); + __name(scaffoldSlotsWithProducts, "scaffoldSlotsWithProducts"); + slotsRouter = router2({ + getSlots: publicProcedure.query(async () => { + const slots = await getActiveSlotsList(); + return { + slots, + count: slots.length + }; + }), + getSlotsWithProducts: publicProcedure.query(async () => { + const response = await scaffoldSlotsWithProducts(); + return response; + }), + getSlotById: publicProcedure.input(external_exports.object({ slotId: external_exports.number() })).query(async ({ input }) => { + return await getSlotData(input.slotId); + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/banners.ts +async function scaffoldBanners() { + const banners = await getActiveBanners(); + const bannersWithSignedUrls = banners.map((banner) => ({ + ...banner, + imageUrl: banner.imageUrl ? scaffoldAssetUrl(banner.imageUrl) : banner.imageUrl + })); + return { + banners: bannersWithSignedUrls + }; +} +var bannerRouter; +var init_banners2 = __esm({ + "src/trpc/apis/user-apis/apis/banners.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_s3_client(); + init_dbService(); + __name(scaffoldBanners, "scaffoldBanners"); + bannerRouter = router2({ + getBanners: publicProcedure.query(async () => { + const response = await scaffoldBanners(); + return response; + }) + }); + } +}); + +// ../../packages/shared/types/index.ts +var init_types7 = __esm({ + "../../packages/shared/types/index.ts"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/shared/index.ts +var CACHE_FILENAMES; +var init_shared4 = __esm({ + "../../packages/shared/index.ts"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types7(); + CACHE_FILENAMES = { + products: "products.json", + stores: "stores.json", + slots: "slots.json", + essentialConsts: "essential-consts.json", + banners: "banners.json" + }; + } +}); + +// src/lib/retry.ts +async function retryWithExponentialBackoff(fn, maxRetries = 3, delayMs = 1e3) { + let lastError; + for (let attempt = 1; attempt <= maxRetries; attempt++) { + try { + return await fn(); + } catch (error50) { + lastError = error50 instanceof Error ? error50 : new Error(String(error50)); + if (attempt < maxRetries) { + console.log(`Attempt ${attempt} failed, retrying in ${delayMs}ms...`); + await new Promise((resolve) => setTimeout(resolve, delayMs)); + delayMs *= 2; + } + } + } + throw lastError; +} +var init_retry3 = __esm({ + "src/lib/retry.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(retryWithExponentialBackoff, "retryWithExponentialBackoff"); + } +}); + +// src/lib/cloud_cache.ts +function constructCacheUrl(path) { + return `${assetsDomain}${apiCacheKey}/${path}`; +} +async function createAllCacheFiles() { + console.log("Starting creation of all cache files..."); + const [ + productsKey, + essentialConstsKey, + storesKey, + slotsKey, + bannersKey, + individualStoreKeys + ] = await Promise.all([ + createProductsFileInternal(), + createEssentialConstsFileInternal(), + createStoresFileInternal(), + createSlotsFileInternal(), + createBannersFileInternal(), + createAllStoresFilesInternal() + ]); + const urls = [ + constructCacheUrl(CACHE_FILENAMES.products), + constructCacheUrl(CACHE_FILENAMES.essentialConsts), + constructCacheUrl(CACHE_FILENAMES.stores), + constructCacheUrl(CACHE_FILENAMES.slots), + constructCacheUrl(CACHE_FILENAMES.banners), + ...individualStoreKeys.map((_, index) => constructCacheUrl(`stores/${index + 1}.json`)) + ]; + try { + await retryWithExponentialBackoff(() => clearUrlCache(urls)); + console.log(`Cache purged for all ${urls.length} files`); + } catch (error50) { + console.error(`Failed to purge cache for all files after 3 retries`, error50); + } + console.log("All cache files created successfully"); + return { + products: productsKey, + essentialConsts: essentialConstsKey, + stores: storesKey, + slots: slotsKey, + banners: bannersKey, + individualStores: individualStoreKeys + }; +} +async function createProductsFileInternal() { + const productsData = await scaffoldProducts(); + const jsonContent = JSON.stringify(productsData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.products}`); +} +async function createEssentialConstsFileInternal() { + const essentialConstsData = await scaffoldEssentialConsts(); + const jsonContent = JSON.stringify(essentialConstsData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.essentialConsts}`); +} +async function createStoresFileInternal() { + const storesData = await scaffoldStores(); + const jsonContent = JSON.stringify(storesData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.stores}`); +} +async function createSlotsFileInternal() { + const slotsData = await scaffoldSlotsWithProducts(); + const jsonContent = JSON.stringify(slotsData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.slots}`); +} +async function createBannersFileInternal() { + const bannersData = await scaffoldBanners(); + const jsonContent = JSON.stringify(bannersData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.banners}`); +} +async function createAllStoresFilesInternal() { + const stores = await getStoresSummary(); + const results = []; + for (const store of stores) { + const storeData = await scaffoldStoreWithProducts(store.id); + const jsonContent = JSON.stringify(storeData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + const s3Key = await imageUploadS3(buffer, "application/json", `${apiCacheKey}/stores/${store.id}.json`); + results.push(s3Key); + } + console.log(`Created ${results.length} store cache files`); + return results; +} +async function clearUrlCache(urls) { + if (!cloudflareApiToken || !cloudflareZoneId) { + console.warn("Cloudflare credentials not configured, skipping cache clear"); + return { success: false, errors: ["Cloudflare credentials not configured"] }; + } + try { + const response = await axios_default.post( + `https://api.cloudflare.com/client/v4/zones/${cloudflareZoneId}/purge_cache`, + { files: urls }, + { + headers: { + "Authorization": `Bearer ${cloudflareApiToken}`, + "Content-Type": "application/json" + } + } + ); + const result = response.data; + if (!result.success) { + const errorMessages = result.errors?.map((e2) => e2.message) || ["Unknown error"]; + console.error(`Cloudflare cache purge failed for URLs: ${urls.join(", ")}`, errorMessages); + return { success: false, errors: errorMessages }; + } + console.log(`Successfully purged ${urls.length} URLs from Cloudflare cache: ${urls.join(", ")}`); + return { success: true }; + } catch (error50) { + console.log(error50); + const errorMessage = error50 instanceof Error ? error50.message : "Unknown error"; + console.error(`Error clearing Cloudflare cache for URLs: ${urls.join(", ")}`, errorMessage); + return { success: false, errors: [errorMessage] }; + } +} +var init_cloud_cache = __esm({ + "src/lib/cloud_cache.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_axios2(); + init_common3(); + init_common_trpc_index(); + init_stores2(); + init_slots3(); + init_banners2(); + init_stores2(); + init_dbService(); + init_s3_client(); + init_env_exporter(); + init_shared4(); + init_retry3(); + __name(constructCacheUrl, "constructCacheUrl"); + __name(createAllCacheFiles, "createAllCacheFiles"); + __name(createProductsFileInternal, "createProductsFileInternal"); + __name(createEssentialConstsFileInternal, "createEssentialConstsFileInternal"); + __name(createStoresFileInternal, "createStoresFileInternal"); + __name(createSlotsFileInternal, "createSlotsFileInternal"); + __name(createBannersFileInternal, "createBannersFileInternal"); + __name(createAllStoresFilesInternal, "createAllStoresFilesInternal"); + __name(clearUrlCache, "clearUrlCache"); + } +}); + +// src/stores/store-initializer.ts +var STORE_INIT_DELAY_MS, storeInitializationTimeout, initializeAllStores, scheduleStoreInitialization; +var init_store_initializer = __esm({ + "src/stores/store-initializer.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_roles_manager(); + init_const_store(); + init_product_store(); + init_product_tag_store(); + init_slot_store(); + init_banner_store(); + init_cloud_cache(); + STORE_INIT_DELAY_MS = 3 * 60 * 1e3; + storeInitializationTimeout = null; + initializeAllStores = /* @__PURE__ */ __name(async () => { + try { + console.log("Starting application stores initialization..."); + await Promise.all([ + roles_manager_default.fetchRoles(), + computeConstants(), + initializeProducts(), + initializeProductTagStore(), + initializeSlotStore(), + initializeBannerStore() + ]); + console.log("All application stores initialized successfully"); + createAllCacheFiles().catch((error50) => { + console.error("Failed to regenerate cache files during store initialization:", error50); + }); + } catch (error50) { + console.error("Application stores initialization failed:", error50); + throw error50; + } + }, "initializeAllStores"); + scheduleStoreInitialization = /* @__PURE__ */ __name(() => { + if (storeInitializationTimeout) { + clearTimeout(storeInitializationTimeout); + storeInitializationTimeout = null; + } + storeInitializationTimeout = setTimeout(() => { + storeInitializationTimeout = null; + initializeAllStores().catch((error50) => { + console.error("Scheduled store initialization failed:", error50); + }); + }, STORE_INIT_DELAY_MS); + }, "scheduleStoreInitialization"); + } +}); + +// src/trpc/apis/admin-apis/apis/slots.ts +var cachedSequenceSchema, createSlotSchema, getSlotByIdSchema, updateSlotSchema, deleteSlotSchema, getDeliverySequenceSchema, updateDeliverySequenceSchema, slotsRouter2; +var init_slots4 = __esm({ + "src/trpc/apis/admin-apis/apis/slots.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_dist3(); + init_zod(); + init_api_error(); + init_env_exporter(); + init_store_initializer(); + init_dbService(); + cachedSequenceSchema = external_exports.record(external_exports.string(), external_exports.array(external_exports.number())); + createSlotSchema = external_exports.object({ + deliveryTime: external_exports.string(), + freezeTime: external_exports.string(), + isActive: external_exports.boolean().optional(), + productIds: external_exports.array(external_exports.number()).optional(), + vendorSnippets: external_exports.array(external_exports.object({ + name: external_exports.string().min(1), + productIds: external_exports.array(external_exports.number().int().positive()).min(1), + validTill: external_exports.string().optional() + })).optional(), + groupIds: external_exports.array(external_exports.number()).optional() + }); + getSlotByIdSchema = external_exports.object({ + id: external_exports.number() + }); + updateSlotSchema = external_exports.object({ + id: external_exports.number(), + deliveryTime: external_exports.string(), + freezeTime: external_exports.string(), + isActive: external_exports.boolean().optional(), + productIds: external_exports.array(external_exports.number()).optional(), + vendorSnippets: external_exports.array(external_exports.object({ + name: external_exports.string().min(1), + productIds: external_exports.array(external_exports.number().int().positive()).min(1), + validTill: external_exports.string().optional() + })).optional(), + groupIds: external_exports.array(external_exports.number()).optional() + }); + deleteSlotSchema = external_exports.object({ + id: external_exports.number() + }); + getDeliverySequenceSchema = external_exports.object({ + id: external_exports.string() + }); + updateDeliverySequenceSchema = external_exports.object({ + id: external_exports.number(), + // deliverySequence: z.array(z.number()), + deliverySequence: external_exports.any() + }); + slotsRouter2 = router2({ + // Exact replica of GET /av/slots + getAll: protectedProcedure.query(async ({ ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const slots = await getActiveSlotsWithProducts(); + return { + slots, + count: slots.length + }; + }), + // Exact replica of POST /av/products/slots/product-ids + getSlotsProductIds: protectedProcedure.input(external_exports.object({ slotIds: external_exports.array(external_exports.number()) })).query(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { slotIds } = input; + if (!Array.isArray(slotIds)) { + throw new TRPCError({ + code: "BAD_REQUEST", + message: "slotIds must be an array" + }); + } + const result = await getSlotsProductIds(slotIds); + return result; + }), + // Exact replica of PUT /av/products/slots/:slotId/products + updateSlotProducts: protectedProcedure.input( + external_exports.object({ + slotId: external_exports.number(), + productIds: external_exports.array(external_exports.number()) + }) + ).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { slotId, productIds } = input; + if (!Array.isArray(productIds)) { + throw new TRPCError({ + code: "BAD_REQUEST", + message: "productIds must be an array" + }); + } + const result = await updateSlotProducts(String(slotId), productIds.map(String)); + scheduleStoreInitialization(); + return { + message: result.message, + added: result.added, + removed: result.removed + }; + }), + createSlot: protectedProcedure.input(createSlotSchema).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input; + if (!deliveryTime || !freezeTime) { + throw new ApiError("Delivery time and orders close time are required", 400); + } + const result = await createSlotWithRelations({ + deliveryTime, + freezeTime, + isActive, + productIds, + vendorSnippets: snippets, + groupIds + }); + scheduleStoreInitialization(); + return result; + }), + getSlots: protectedProcedure.query(async ({ ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const slots = await getActiveSlots(); + return { + slots, + count: slots.length + }; + }), + getSlotById: protectedProcedure.input(getSlotByIdSchema).query(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { id } = input; + const slot = await getSlotByIdWithRelations(id); + if (!slot) { + throw new ApiError("Slot not found", 404); + } + return { + slot: { + ...slot, + vendorSnippets: slot.vendorSnippets.map((snippet) => ({ + ...snippet, + accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}` + })) + } + }; + }), + updateSlot: protectedProcedure.input(updateSlotSchema).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + try { + const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input; + if (!deliveryTime || !freezeTime) { + throw new ApiError("Delivery time and orders close time are required", 400); + } + const result = await updateSlotWithRelations({ + id, + deliveryTime, + freezeTime, + isActive, + productIds, + vendorSnippets: snippets, + groupIds + }); + if (!result) { + throw new ApiError("Slot not found", 404); + } + scheduleStoreInitialization(); + return result; + } catch (e2) { + console.log(e2); + throw new ApiError("Unable to Update Slot"); + } + }), + deleteSlot: protectedProcedure.input(deleteSlotSchema).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { id } = input; + const deletedSlot = await deleteSlotById(id); + if (!deletedSlot) { + throw new ApiError("Slot not found", 404); + } + scheduleStoreInitialization(); + return { + message: "Slot deleted successfully" + }; + }), + getDeliverySequence: protectedProcedure.input(getDeliverySequenceSchema).query(async ({ input, ctx }) => { + const { id } = input; + const slotId = parseInt(id); + const slot = await getSlotDeliverySequence(slotId); + if (!slot) { + throw new ApiError("Slot not found", 404); + } + const sequence = slot.deliverySequence || {}; + return { deliverySequence: sequence }; + }), + updateDeliverySequence: protectedProcedure.input(updateDeliverySequenceSchema).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { id, deliverySequence } = input; + const updatedSlot = await updateSlotDeliverySequence(id, deliverySequence); + if (!updatedSlot) { + throw new ApiError("Slot not found", 404); + } + return { + slot: updatedSlot, + message: "Delivery sequence updated successfully" + }; + }), + updateSlotCapacity: protectedProcedure.input(external_exports.object({ + slotId: external_exports.number(), + isCapacityFull: external_exports.boolean() + })).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { slotId, isCapacityFull } = input; + const result = await updateSlotCapacity(slotId, isCapacityFull); + if (!result) { + throw new ApiError("Slot not found", 404); + } + scheduleStoreInitialization(); + return result; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/product.ts +var productRouter; +var init_product3 = __esm({ + "src/trpc/apis/admin-apis/apis/product.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_s3_client(); + init_store_initializer(); + init_dbService(); + productRouter = router2({ + getProducts: protectedProcedure.query(async () => { + const products = await getAllProducts(); + const productsWithSignedUrls = await Promise.all( + products.map(async (product) => ({ + ...product, + images: await generateSignedUrlsFromS3Urls(product.images || []) + })) + ); + return { + products: productsWithSignedUrls, + count: productsWithSignedUrls.length + }; + }), + getProductById: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).query(async ({ input }) => { + const { id } = input; + const product = await getProductById(id); + if (!product) { + throw new ApiError("Product not found", 404); + } + const productWithSignedUrls = { + ...product, + images: await generateSignedUrlsFromS3Urls(product.images || []) + }; + return { + product: productWithSignedUrls + }; + }), + deleteProduct: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).mutation(async ({ input }) => { + const { id } = input; + const deletedProduct = await deleteProduct(id); + if (!deletedProduct) { + throw new ApiError("Product not found", 404); + } + scheduleStoreInitialization(); + return { + message: "Product deleted successfully" + }; + }), + toggleOutOfStock: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).mutation(async ({ input }) => { + const { id } = input; + const updatedProduct = await toggleProductOutOfStock(id); + if (!updatedProduct) { + throw new ApiError("Product not found", 404); + } + scheduleStoreInitialization(); + return { + product: updatedProduct, + message: `Product marked as ${updatedProduct.isOutOfStock ? "out of stock" : "in stock"}` + }; + }), + createProduct: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + shortDescription: external_exports.string().optional(), + longDescription: external_exports.string().optional(), + unitId: external_exports.number().min(1, "Unit is required"), + storeId: external_exports.number().min(1, "Store is required"), + price: external_exports.number().positive("Price must be positive"), + marketPrice: external_exports.number().optional(), + incrementStep: external_exports.number().optional().default(1), + productQuantity: external_exports.number().optional().default(1), + isSuspended: external_exports.boolean().optional().default(false), + isFlashAvailable: external_exports.boolean().optional().default(false), + flashPrice: external_exports.number().optional(), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]), + deals: external_exports.array(external_exports.object({ + quantity: external_exports.number(), + price: external_exports.number(), + validTill: external_exports.string() + })).optional(), + tagIds: external_exports.array(external_exports.number()).optional().default([]) + })).mutation(async ({ input }) => { + const { name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, uploadUrls, deals, tagIds } = input; + const existingProduct = await checkProductExistsByName(name.trim()); + if (existingProduct) { + throw new ApiError("A product with this name already exists", 400); + } + const unitExists = await checkUnitExists(unitId); + if (!unitExists) { + throw new ApiError("Invalid unit ID", 400); + } + const imageKeys = uploadUrls.map((url2) => extractKeyFromPresignedUrl(url2)); + const newProduct = await createProduct({ + name, + shortDescription, + longDescription, + unitId, + storeId, + price: price.toString(), + marketPrice: marketPrice?.toString(), + incrementStep, + productQuantity, + isSuspended, + isFlashAvailable, + flashPrice: flashPrice?.toString(), + images: imageKeys + }); + let createdDeals = []; + if (deals && deals.length > 0) { + createdDeals = await createSpecialDealsForProduct(newProduct.id, deals); + } + if (tagIds.length > 0) { + await replaceProductTags(newProduct.id, tagIds); + } + if (uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + scheduleStoreInitialization(); + return { + product: newProduct, + deals: createdDeals, + message: "Product created successfully" + }; + }), + updateProduct: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + name: external_exports.string().min(1, "Name is required"), + shortDescription: external_exports.string().optional(), + longDescription: external_exports.string().optional(), + unitId: external_exports.number().min(1, "Unit is required"), + storeId: external_exports.number().min(1, "Store is required"), + price: external_exports.number().positive("Price must be positive"), + marketPrice: external_exports.number().optional(), + incrementStep: external_exports.number().optional().default(1), + productQuantity: external_exports.number().optional().default(1), + isSuspended: external_exports.boolean().optional().default(false), + isFlashAvailable: external_exports.boolean().optional().default(false), + flashPrice: external_exports.number().nullable().optional(), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]), + imagesToDelete: external_exports.array(external_exports.string()).optional().default([]), + deals: external_exports.array(external_exports.object({ + quantity: external_exports.number(), + price: external_exports.number(), + validTill: external_exports.string() + })).optional(), + tagIds: external_exports.array(external_exports.number()).optional().default([]) + })).mutation(async ({ input }) => { + const { id, name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, uploadUrls, imagesToDelete, deals, tagIds } = input; + const unitExists = await checkUnitExists(unitId); + if (!unitExists) { + throw new ApiError("Invalid unit ID", 400); + } + const currentImages = await getProductImagesById(id); + if (!currentImages) { + throw new ApiError("Product not found", 404); + } + let updatedImages = currentImages || []; + if (imagesToDelete.length > 0) { + const imagesToRemove = updatedImages.filter((img) => imagesToDelete.includes(img)); + await deleteImageUtil({ keys: imagesToRemove }); + updatedImages = updatedImages.filter((img) => !imagesToRemove.includes(img)); + } + const newImageKeys = uploadUrls.map((url2) => extractKeyFromPresignedUrl(url2)); + const finalImages = [...updatedImages, ...newImageKeys]; + const updatedProduct = await updateProduct(id, { + name, + shortDescription, + longDescription, + unitId, + storeId, + price: price.toString(), + marketPrice: marketPrice?.toString(), + incrementStep, + productQuantity, + isSuspended, + isFlashAvailable, + flashPrice: flashPrice?.toString() ?? null, + images: finalImages + }); + if (!updatedProduct) { + throw new ApiError("Product not found", 404); + } + if (deals && deals.length > 0) { + await updateProductDeals(id, deals); + } + if (tagIds.length > 0) { + await replaceProductTags(id, tagIds); + } + if (uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + scheduleStoreInitialization(); + return { + product: updatedProduct, + message: "Product updated successfully" + }; + }), + updateSlotProducts: protectedProcedure.input(external_exports.object({ + slotId: external_exports.string(), + productIds: external_exports.array(external_exports.string()) + })).mutation(async ({ input }) => { + const { slotId, productIds } = input; + if (!Array.isArray(productIds)) { + throw new ApiError("productIds must be an array", 400); + } + const result = await updateSlotProducts(slotId, productIds); + scheduleStoreInitialization(); + return { + message: "Slot products updated successfully", + added: result.added, + removed: result.removed + }; + }), + getSlotProductIds: protectedProcedure.input(external_exports.object({ + slotId: external_exports.string() + })).query(async ({ input }) => { + const { slotId } = input; + const productIds = await getSlotProductIds(slotId); + return { + productIds + }; + }), + getSlotsProductIds: protectedProcedure.input(external_exports.object({ + slotIds: external_exports.array(external_exports.number()) + })).query(async ({ input }) => { + const { slotIds } = input; + if (!Array.isArray(slotIds)) { + throw new ApiError("slotIds must be an array", 400); + } + const result = await getSlotsProductIds(slotIds); + return result; + }), + getProductReviews: protectedProcedure.input(external_exports.object({ + productId: external_exports.number().int().positive(), + limit: external_exports.number().int().min(1).max(50).optional().default(10), + offset: external_exports.number().int().min(0).optional().default(0) + })).query(async ({ input }) => { + const { productId, limit, offset } = input; + const { reviews, totalCount } = await getProductReviews(productId, limit, offset); + const reviewsWithSignedUrls = await Promise.all( + reviews.map(async (review) => ({ + ...review, + signedImageUrls: await generateSignedUrlsFromS3Urls(review.imageUrls || []), + signedAdminImageUrls: await generateSignedUrlsFromS3Urls(review.adminResponseImages || []) + })) + ); + const hasMore = offset + limit < totalCount; + return { reviews: reviewsWithSignedUrls, hasMore }; + }), + respondToReview: protectedProcedure.input(external_exports.object({ + reviewId: external_exports.number().int().positive(), + adminResponse: external_exports.string().optional(), + adminResponseImages: external_exports.array(external_exports.string()).optional().default([]), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]) + })).mutation(async ({ input }) => { + const { reviewId, adminResponse, adminResponseImages, uploadUrls } = input; + const updatedReview = await respondToReview(reviewId, adminResponse, adminResponseImages); + if (!updatedReview) { + throw new ApiError("Review not found", 404); + } + if (uploadUrls && uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + return { success: true, review: updatedReview }; + }), + getGroups: protectedProcedure.query(async () => { + const groups = await getAllProductGroups(); + return { + groups: groups.map((group6) => ({ + ...group6, + products: group6.memberships.map((m2) => ({ + ...m2.product, + images: m2.product.images || null + })), + productCount: group6.memberships.length + })) + }; + }), + createGroup: protectedProcedure.input(external_exports.object({ + group_name: external_exports.string().min(1), + description: external_exports.string().optional(), + product_ids: external_exports.array(external_exports.number()).default([]) + })).mutation(async ({ input }) => { + const { group_name, description, product_ids } = input; + const newGroup = await createProductGroup(group_name, description, product_ids); + scheduleStoreInitialization(); + return { + group: newGroup, + message: "Group created successfully" + }; + }), + updateGroup: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + group_name: external_exports.string().optional(), + description: external_exports.string().optional(), + product_ids: external_exports.array(external_exports.number()).optional() + })).mutation(async ({ input }) => { + const { id, group_name, description, product_ids } = input; + const updatedGroup = await updateProductGroup(id, group_name, description, product_ids); + if (!updatedGroup) { + throw new ApiError("Group not found", 404); + } + scheduleStoreInitialization(); + return { + group: updatedGroup, + message: "Group updated successfully" + }; + }), + deleteGroup: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).mutation(async ({ input }) => { + const { id } = input; + const deletedGroup = await deleteProductGroup(id); + if (!deletedGroup) { + throw new ApiError("Group not found", 404); + } + scheduleStoreInitialization(); + return { + message: "Group deleted successfully" + }; + }), + updateProductPrices: protectedProcedure.input(external_exports.object({ + updates: external_exports.array(external_exports.object({ + productId: external_exports.number(), + price: external_exports.number().optional(), + marketPrice: external_exports.number().nullable().optional(), + flashPrice: external_exports.number().nullable().optional(), + isFlashAvailable: external_exports.boolean().optional() + })) + })).mutation(async ({ input }) => { + const { updates } = input; + if (updates.length === 0) { + throw new ApiError("No updates provided", 400); + } + const result = await updateProductPrices(updates); + if (result.invalidIds.length > 0) { + throw new ApiError(`Invalid product IDs: ${result.invalidIds.join(", ")}`, 400); + } + scheduleStoreInitialization(); + return { + message: `Updated prices for ${result.updatedCount} product(s)`, + updatedCount: result.updatedCount + }; + }), + getProductTags: protectedProcedure.query(async () => { + const tags = await getAllProductTagInfos(); + const tagsWithSignedUrls = await Promise.all( + tags.map(async (tag2) => ({ + ...tag2, + imageUrl: tag2.imageUrl ? await generateSignedUrlFromS3Url(tag2.imageUrl) : null + })) + ); + return { + tags: tagsWithSignedUrls, + message: "Tags retrieved successfully" + }; + }), + getProductTagById: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).query(async ({ input }) => { + const tag2 = await getProductTagInfoById(input.id); + if (!tag2) { + throw new ApiError("Tag not found", 404); + } + const tagWithSignedUrl = { + ...tag2, + imageUrl: tag2.imageUrl ? await generateSignedUrlFromS3Url(tag2.imageUrl) : null + }; + return { + tag: tagWithSignedUrl, + message: "Tag retrieved successfully" + }; + }), + createProductTag: protectedProcedure.input(external_exports.object({ + tagName: external_exports.string().min(1, "Tag name is required"), + tagDescription: external_exports.string().optional(), + imageUrl: external_exports.string().optional().nullable(), + isDashboardTag: external_exports.boolean().optional().default(false), + relatedStores: external_exports.array(external_exports.number()).optional().default([]), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]) + })).mutation(async ({ input }) => { + const { tagName, tagDescription, imageUrl, isDashboardTag, relatedStores, uploadUrls } = input; + const existingTag = await checkProductTagExistsByName(tagName.trim()); + if (existingTag) { + throw new ApiError("A tag with this name already exists", 400); + } + const createdTag = await createProductTag({ + tagName: tagName.trim(), + tagDescription, + imageUrl: imageUrl ?? null, + isDashboardTag, + relatedStores + }); + if (uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + scheduleStoreInitialization(); + const { products, ...createdTagInfo } = createdTag; + return { + tag: { + ...createdTagInfo, + imageUrl: createdTagInfo.imageUrl ? await generateSignedUrlFromS3Url(createdTagInfo.imageUrl) : null + }, + message: "Tag created successfully" + }; + }), + updateProductTag: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + tagName: external_exports.string().min(1).optional(), + tagDescription: external_exports.string().optional().nullable(), + imageUrl: external_exports.string().optional().nullable(), + isDashboardTag: external_exports.boolean().optional(), + relatedStores: external_exports.array(external_exports.number()).optional(), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]) + })).mutation(async ({ input }) => { + const { id, tagName, tagDescription, imageUrl, isDashboardTag, relatedStores, uploadUrls } = input; + const currentTag = await getProductTagInfoById(id); + if (!currentTag) { + throw new ApiError("Tag not found", 404); + } + if (imageUrl !== void 0 && imageUrl !== currentTag.imageUrl) { + if (currentTag.imageUrl) { + await deleteImageUtil({ keys: [currentTag.imageUrl] }); + } + } + const updatedTag = await updateProductTag(id, { + tagName: tagName?.trim(), + tagDescription: tagDescription ?? void 0, + imageUrl: imageUrl ?? void 0, + isDashboardTag, + relatedStores + }); + if (uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + scheduleStoreInitialization(); + const { products, ...updatedTagInfo } = updatedTag; + return { + tag: { + ...updatedTagInfo, + imageUrl: updatedTagInfo.imageUrl ? await generateSignedUrlFromS3Url(updatedTagInfo.imageUrl) : null + }, + message: "Tag updated successfully" + }; + }), + deleteProductTag: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).mutation(async ({ input }) => { + const tag2 = await getProductTagInfoById(input.id); + if (!tag2) { + throw new ApiError("Tag not found", 404); + } + if (tag2.imageUrl) { + await deleteImageUtil({ keys: [tag2.imageUrl] }); + } + await deleteProductTag(input.id); + scheduleStoreInitialization(); + return { message: "Tag deleted successfully" }; + }) + }); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/crypto/web.mjs +var subtle; +var init_web = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/crypto/web.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + subtle = globalThis.crypto?.subtle; + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/crypto/node.mjs +var webcrypto, createCipher, createDecipher, pseudoRandomBytes, createCipheriv, createDecipheriv, createECDH, createSign, createVerify, diffieHellman, getCipherInfo, privateDecrypt, privateEncrypt, publicDecrypt, publicEncrypt, sign2, verify2, hash2, Cipher, Cipheriv, Decipher, Decipheriv, ECDH, Sign, Verify; +var init_node3 = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/crypto/node.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils(); + webcrypto = new Proxy(globalThis.crypto, { get(_, key) { + if (key === "CryptoKey") { + return globalThis.CryptoKey; + } + if (typeof globalThis.crypto[key] === "function") { + return globalThis.crypto[key].bind(globalThis.crypto); + } + return globalThis.crypto[key]; + } }); + createCipher = /* @__PURE__ */ notImplemented("crypto.createCipher"); + createDecipher = /* @__PURE__ */ notImplemented("crypto.createDecipher"); + pseudoRandomBytes = /* @__PURE__ */ notImplemented("crypto.pseudoRandomBytes"); + createCipheriv = /* @__PURE__ */ notImplemented("crypto.createCipheriv"); + createDecipheriv = /* @__PURE__ */ notImplemented("crypto.createDecipheriv"); + createECDH = /* @__PURE__ */ notImplemented("crypto.createECDH"); + createSign = /* @__PURE__ */ notImplemented("crypto.createSign"); + createVerify = /* @__PURE__ */ notImplemented("crypto.createVerify"); + diffieHellman = /* @__PURE__ */ notImplemented("crypto.diffieHellman"); + getCipherInfo = /* @__PURE__ */ notImplemented("crypto.getCipherInfo"); + privateDecrypt = /* @__PURE__ */ notImplemented("crypto.privateDecrypt"); + privateEncrypt = /* @__PURE__ */ notImplemented("crypto.privateEncrypt"); + publicDecrypt = /* @__PURE__ */ notImplemented("crypto.publicDecrypt"); + publicEncrypt = /* @__PURE__ */ notImplemented("crypto.publicEncrypt"); + sign2 = /* @__PURE__ */ notImplemented("crypto.sign"); + verify2 = /* @__PURE__ */ notImplemented("crypto.verify"); + hash2 = /* @__PURE__ */ notImplemented("crypto.hash"); + Cipher = /* @__PURE__ */ notImplementedClass("crypto.Cipher"); + Cipheriv = /* @__PURE__ */ notImplementedClass( + "crypto.Cipheriv" + // @ts-expect-error not typed yet + ); + Decipher = /* @__PURE__ */ notImplementedClass("crypto.Decipher"); + Decipheriv = /* @__PURE__ */ notImplementedClass( + "crypto.Decipheriv" + // @ts-expect-error not typed yet + ); + ECDH = /* @__PURE__ */ notImplementedClass("crypto.ECDH"); + Sign = /* @__PURE__ */ notImplementedClass("crypto.Sign"); + Verify = /* @__PURE__ */ notImplementedClass("crypto.Verify"); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/crypto/constants.mjs +var SSL_OP_ALL, SSL_OP_ALLOW_NO_DHE_KEX, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION, SSL_OP_CIPHER_SERVER_PREFERENCE, SSL_OP_CISCO_ANYCONNECT, SSL_OP_COOKIE_EXCHANGE, SSL_OP_CRYPTOPRO_TLSEXT_BUG, SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS, SSL_OP_LEGACY_SERVER_CONNECT, SSL_OP_NO_COMPRESSION, SSL_OP_NO_ENCRYPT_THEN_MAC, SSL_OP_NO_QUERY_MTU, SSL_OP_NO_RENEGOTIATION, SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION, SSL_OP_NO_SSLv2, SSL_OP_NO_SSLv3, SSL_OP_NO_TICKET, SSL_OP_NO_TLSv1, SSL_OP_NO_TLSv1_1, SSL_OP_NO_TLSv1_2, SSL_OP_NO_TLSv1_3, SSL_OP_PRIORITIZE_CHACHA, SSL_OP_TLS_ROLLBACK_BUG, ENGINE_METHOD_RSA, ENGINE_METHOD_DSA, ENGINE_METHOD_DH, ENGINE_METHOD_RAND, ENGINE_METHOD_EC, ENGINE_METHOD_CIPHERS, ENGINE_METHOD_DIGESTS, ENGINE_METHOD_PKEY_METHS, ENGINE_METHOD_PKEY_ASN1_METHS, ENGINE_METHOD_ALL, ENGINE_METHOD_NONE, DH_CHECK_P_NOT_SAFE_PRIME, DH_CHECK_P_NOT_PRIME, DH_UNABLE_TO_CHECK_GENERATOR, DH_NOT_SUITABLE_GENERATOR, RSA_PKCS1_PADDING, RSA_NO_PADDING, RSA_PKCS1_OAEP_PADDING, RSA_X931_PADDING, RSA_PKCS1_PSS_PADDING, RSA_PSS_SALTLEN_DIGEST, RSA_PSS_SALTLEN_MAX_SIGN, RSA_PSS_SALTLEN_AUTO, POINT_CONVERSION_COMPRESSED, POINT_CONVERSION_UNCOMPRESSED, POINT_CONVERSION_HYBRID, defaultCoreCipherList, defaultCipherList, OPENSSL_VERSION_NUMBER, TLS1_VERSION, TLS1_1_VERSION, TLS1_2_VERSION, TLS1_3_VERSION; +var init_constants16 = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/crypto/constants.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SSL_OP_ALL = 2147485776; + 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_LEGACY_SERVER_CONNECT = 4; + 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_PRIORITIZE_CHACHA = 2097152; + 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; + RSA_PKCS1_PADDING = 1; + 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; + POINT_CONVERSION_COMPRESSED = 2; + POINT_CONVERSION_UNCOMPRESSED = 4; + POINT_CONVERSION_HYBRID = 6; + defaultCoreCipherList = ""; + defaultCipherList = ""; + OPENSSL_VERSION_NUMBER = 0; + TLS1_VERSION = 0; + TLS1_1_VERSION = 0; + TLS1_2_VERSION = 0; + TLS1_3_VERSION = 0; + } +}); + +// ../../node_modules/unenv/dist/runtime/node/crypto.mjs +var constants; +var init_crypto2 = __esm({ + "../../node_modules/unenv/dist/runtime/node/crypto.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants16(); + init_web(); + init_node3(); + constants = { + OPENSSL_VERSION_NUMBER, + SSL_OP_ALL, + SSL_OP_ALLOW_NO_DHE_KEX, + SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION, + SSL_OP_CIPHER_SERVER_PREFERENCE, + SSL_OP_CISCO_ANYCONNECT, + SSL_OP_COOKIE_EXCHANGE, + SSL_OP_CRYPTOPRO_TLSEXT_BUG, + SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS, + SSL_OP_LEGACY_SERVER_CONNECT, + SSL_OP_NO_COMPRESSION, + SSL_OP_NO_ENCRYPT_THEN_MAC, + SSL_OP_NO_QUERY_MTU, + SSL_OP_NO_RENEGOTIATION, + SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION, + SSL_OP_NO_SSLv2, + SSL_OP_NO_SSLv3, + SSL_OP_NO_TICKET, + SSL_OP_NO_TLSv1, + SSL_OP_NO_TLSv1_1, + SSL_OP_NO_TLSv1_2, + SSL_OP_NO_TLSv1_3, + SSL_OP_PRIORITIZE_CHACHA, + SSL_OP_TLS_ROLLBACK_BUG, + ENGINE_METHOD_RSA, + ENGINE_METHOD_DSA, + ENGINE_METHOD_DH, + ENGINE_METHOD_RAND, + ENGINE_METHOD_EC, + ENGINE_METHOD_CIPHERS, + ENGINE_METHOD_DIGESTS, + ENGINE_METHOD_PKEY_METHS, + ENGINE_METHOD_PKEY_ASN1_METHS, + ENGINE_METHOD_ALL, + ENGINE_METHOD_NONE, + DH_CHECK_P_NOT_SAFE_PRIME, + DH_CHECK_P_NOT_PRIME, + DH_UNABLE_TO_CHECK_GENERATOR, + DH_NOT_SUITABLE_GENERATOR, + RSA_PKCS1_PADDING, + RSA_NO_PADDING, + RSA_PKCS1_OAEP_PADDING, + RSA_X931_PADDING, + RSA_PKCS1_PSS_PADDING, + RSA_PSS_SALTLEN_DIGEST, + RSA_PSS_SALTLEN_MAX_SIGN, + RSA_PSS_SALTLEN_AUTO, + defaultCoreCipherList, + TLS1_VERSION, + TLS1_1_VERSION, + TLS1_2_VERSION, + TLS1_3_VERSION, + POINT_CONVERSION_COMPRESSED, + POINT_CONVERSION_UNCOMPRESSED, + POINT_CONVERSION_HYBRID, + defaultCipherList + }; + } +}); + +// ../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.mjs +var workerdCrypto, Certificate, DiffieHellman, DiffieHellmanGroup, Hash, Hmac, KeyObject, X509Certificate, checkPrime, checkPrimeSync, createDiffieHellman, createDiffieHellmanGroup, createHash, createHmac, createPrivateKey, createPublicKey, createSecretKey, generateKey, generateKeyPair, generateKeyPairSync, generateKeySync, generatePrime, generatePrimeSync, getCiphers, getCurves, getDiffieHellman, getFips, getHashes, hkdf, hkdfSync, pbkdf2, pbkdf2Sync, randomBytes, randomFill, randomFillSync, randomInt, randomUUID2, scrypt, scryptSync, secureHeapUsed, setEngine, setFips, subtle2, timingSafeEqual, getRandomValues, webcrypto2, fips, crypto_default; +var init_crypto3 = __esm({ + "../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_crypto2(); + workerdCrypto = process.getBuiltinModule("node:crypto"); + ({ + Certificate, + DiffieHellman, + DiffieHellmanGroup, + Hash, + Hmac, + KeyObject, + X509Certificate, + checkPrime, + checkPrimeSync, + createDiffieHellman, + createDiffieHellmanGroup, + createHash, + createHmac, + createPrivateKey, + createPublicKey, + createSecretKey, + generateKey, + generateKeyPair, + generateKeyPairSync, + generateKeySync, + generatePrime, + generatePrimeSync, + getCiphers, + getCurves, + getDiffieHellman, + getFips, + getHashes, + hkdf, + hkdfSync, + pbkdf2, + pbkdf2Sync, + randomBytes, + randomFill, + randomFillSync, + randomInt, + randomUUID: randomUUID2, + scrypt, + scryptSync, + secureHeapUsed, + setEngine, + setFips, + subtle: subtle2, + timingSafeEqual + } = workerdCrypto); + getRandomValues = workerdCrypto.getRandomValues.bind( + workerdCrypto.webcrypto + ); + webcrypto2 = { + // @ts-expect-error unenv has unknown type + CryptoKey: webcrypto.CryptoKey, + getRandomValues, + randomUUID: randomUUID2, + subtle: subtle2 + }; + fips = workerdCrypto.fips; + crypto_default = { + /** + * manually unroll unenv-polyfilled-symbols to make it tree-shakeable + */ + Certificate, + Cipher, + Cipheriv, + Decipher, + Decipheriv, + ECDH, + Sign, + Verify, + X509Certificate, + // @ts-expect-error @types/node is out of date - this is a bug in typings + constants, + // @ts-expect-error unenv has unknown type + createCipheriv, + // @ts-expect-error unenv has unknown type + createDecipheriv, + // @ts-expect-error unenv has unknown type + createECDH, + // @ts-expect-error unenv has unknown type + createSign, + // @ts-expect-error unenv has unknown type + createVerify, + // @ts-expect-error unenv has unknown type + diffieHellman, + // @ts-expect-error unenv has unknown type + getCipherInfo, + // @ts-expect-error unenv has unknown type + hash: hash2, + // @ts-expect-error unenv has unknown type + privateDecrypt, + // @ts-expect-error unenv has unknown type + privateEncrypt, + // @ts-expect-error unenv has unknown type + publicDecrypt, + // @ts-expect-error unenv has unknown type + publicEncrypt, + scrypt, + scryptSync, + // @ts-expect-error unenv has unknown type + sign: sign2, + // @ts-expect-error unenv has unknown type + verify: verify2, + // default-only export from unenv + // @ts-expect-error unenv has unknown type + createCipher, + // @ts-expect-error unenv has unknown type + createDecipher, + // @ts-expect-error unenv has unknown type + pseudoRandomBytes, + /** + * manually unroll workerd-polyfilled-symbols to make it tree-shakeable + */ + DiffieHellman, + DiffieHellmanGroup, + Hash, + Hmac, + KeyObject, + checkPrime, + checkPrimeSync, + createDiffieHellman, + createDiffieHellmanGroup, + createHash, + createHmac, + createPrivateKey, + createPublicKey, + createSecretKey, + generateKey, + generateKeyPair, + generateKeyPairSync, + generateKeySync, + generatePrime, + generatePrimeSync, + getCiphers, + getCurves, + getDiffieHellman, + getFips, + getHashes, + getRandomValues, + hkdf, + hkdfSync, + pbkdf2, + pbkdf2Sync, + randomBytes, + randomFill, + randomFillSync, + randomInt, + randomUUID: randomUUID2, + secureHeapUsed, + setEngine, + setFips, + subtle: subtle2, + timingSafeEqual, + // default-only export from workerd + fips, + // special-cased deep merged symbols + webcrypto: webcrypto2 + }; + } +}); + +// ../../node_modules/bcryptjs/index.js +function randomBytes2(len) { + try { + return crypto.getRandomValues(new Uint8Array(len)); + } catch { + } + try { + return crypto_default.randomBytes(len); + } catch { + } + if (!randomFallback) { + throw Error( + "Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative" + ); + } + return randomFallback(len); +} +function setRandomFallback(random) { + randomFallback = random; +} +function genSaltSync(rounds, seed_length) { + rounds = rounds || GENSALT_DEFAULT_LOG2_ROUNDS; + if (typeof rounds !== "number") + throw Error( + "Illegal arguments: " + typeof rounds + ", " + typeof seed_length + ); + if (rounds < 4) + rounds = 4; + else if (rounds > 31) + rounds = 31; + var salt = []; + salt.push("$2b$"); + if (rounds < 10) + salt.push("0"); + salt.push(rounds.toString()); + salt.push("$"); + salt.push(base64_encode(randomBytes2(BCRYPT_SALT_LEN), BCRYPT_SALT_LEN)); + return salt.join(""); +} +function genSalt(rounds, seed_length, callback) { + if (typeof seed_length === "function") + callback = seed_length, seed_length = void 0; + if (typeof rounds === "function") + callback = rounds, rounds = void 0; + if (typeof rounds === "undefined") + rounds = GENSALT_DEFAULT_LOG2_ROUNDS; + else if (typeof rounds !== "number") + throw Error("illegal arguments: " + typeof rounds); + function _async(callback2) { + nextTick2(function() { + try { + callback2(null, genSaltSync(rounds)); + } catch (err) { + callback2(err); + } + }); + } + __name(_async, "_async"); + if (callback) { + if (typeof callback !== "function") + throw Error("Illegal callback: " + typeof callback); + _async(callback); + } else + return new Promise(function(resolve, reject) { + _async(function(err, res) { + if (err) { + reject(err); + return; + } + resolve(res); + }); + }); +} +function hashSync(password, salt) { + if (typeof salt === "undefined") + salt = GENSALT_DEFAULT_LOG2_ROUNDS; + if (typeof salt === "number") + salt = genSaltSync(salt); + if (typeof password !== "string" || typeof salt !== "string") + throw Error("Illegal arguments: " + typeof password + ", " + typeof salt); + return _hash(password, salt); +} +function hash3(password, salt, callback, progressCallback) { + function _async(callback2) { + if (typeof password === "string" && typeof salt === "number") + genSalt(salt, function(err, salt2) { + _hash(password, salt2, callback2, progressCallback); + }); + else if (typeof password === "string" && typeof salt === "string") + _hash(password, salt, callback2, progressCallback); + else + nextTick2( + callback2.bind( + this, + Error("Illegal arguments: " + typeof password + ", " + typeof salt) + ) + ); + } + __name(_async, "_async"); + if (callback) { + if (typeof callback !== "function") + throw Error("Illegal callback: " + typeof callback); + _async(callback); + } else + return new Promise(function(resolve, reject) { + _async(function(err, res) { + if (err) { + reject(err); + return; + } + resolve(res); + }); + }); +} +function safeStringCompare(known, unknown2) { + var diff = known.length ^ unknown2.length; + for (var i2 = 0; i2 < known.length; ++i2) { + diff |= known.charCodeAt(i2) ^ unknown2.charCodeAt(i2); + } + return diff === 0; +} +function compareSync(password, hash4) { + if (typeof password !== "string" || typeof hash4 !== "string") + throw Error("Illegal arguments: " + typeof password + ", " + typeof hash4); + if (hash4.length !== 60) + return false; + return safeStringCompare( + hashSync(password, hash4.substring(0, hash4.length - 31)), + hash4 + ); +} +function compare(password, hashValue, callback, progressCallback) { + function _async(callback2) { + if (typeof password !== "string" || typeof hashValue !== "string") { + nextTick2( + callback2.bind( + this, + Error( + "Illegal arguments: " + typeof password + ", " + typeof hashValue + ) + ) + ); + return; + } + if (hashValue.length !== 60) { + nextTick2(callback2.bind(this, null, false)); + return; + } + hash3( + password, + hashValue.substring(0, 29), + function(err, comp) { + if (err) + callback2(err); + else + callback2(null, safeStringCompare(comp, hashValue)); + }, + progressCallback + ); + } + __name(_async, "_async"); + if (callback) { + if (typeof callback !== "function") + throw Error("Illegal callback: " + typeof callback); + _async(callback); + } else + return new Promise(function(resolve, reject) { + _async(function(err, res) { + if (err) { + reject(err); + return; + } + resolve(res); + }); + }); +} +function getRounds(hash4) { + if (typeof hash4 !== "string") + throw Error("Illegal arguments: " + typeof hash4); + return parseInt(hash4.split("$")[2], 10); +} +function getSalt(hash4) { + if (typeof hash4 !== "string") + throw Error("Illegal arguments: " + typeof hash4); + if (hash4.length !== 60) + throw Error("Illegal hash length: " + hash4.length + " != 60"); + return hash4.substring(0, 29); +} +function truncates(password) { + if (typeof password !== "string") + throw Error("Illegal arguments: " + typeof password); + return utf8Length(password) > 72; +} +function utf8Length(string4) { + var len = 0, c2 = 0; + for (var i2 = 0; i2 < string4.length; ++i2) { + c2 = string4.charCodeAt(i2); + if (c2 < 128) + len += 1; + else if (c2 < 2048) + len += 2; + else if ((c2 & 64512) === 55296 && (string4.charCodeAt(i2 + 1) & 64512) === 56320) { + ++i2; + len += 4; + } else + len += 3; + } + return len; +} +function utf8Array(string4) { + var offset = 0, c1, c2; + var buffer = new Array(utf8Length(string4)); + for (var i2 = 0, k2 = string4.length; i2 < k2; ++i2) { + c1 = string4.charCodeAt(i2); + if (c1 < 128) { + buffer[offset++] = c1; + } else if (c1 < 2048) { + buffer[offset++] = c1 >> 6 | 192; + buffer[offset++] = c1 & 63 | 128; + } else if ((c1 & 64512) === 55296 && ((c2 = string4.charCodeAt(i2 + 1)) & 64512) === 56320) { + c1 = 65536 + ((c1 & 1023) << 10) + (c2 & 1023); + ++i2; + buffer[offset++] = c1 >> 18 | 240; + buffer[offset++] = c1 >> 12 & 63 | 128; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } else { + buffer[offset++] = c1 >> 12 | 224; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } + } + return buffer; +} +function base64_encode(b2, len) { + var off2 = 0, rs = [], c1, c2; + if (len <= 0 || len > b2.length) + throw Error("Illegal len: " + len); + while (off2 < len) { + c1 = b2[off2++] & 255; + rs.push(BASE64_CODE[c1 >> 2 & 63]); + c1 = (c1 & 3) << 4; + if (off2 >= len) { + rs.push(BASE64_CODE[c1 & 63]); + break; + } + c2 = b2[off2++] & 255; + c1 |= c2 >> 4 & 15; + rs.push(BASE64_CODE[c1 & 63]); + c1 = (c2 & 15) << 2; + if (off2 >= len) { + rs.push(BASE64_CODE[c1 & 63]); + break; + } + c2 = b2[off2++] & 255; + c1 |= c2 >> 6 & 3; + rs.push(BASE64_CODE[c1 & 63]); + rs.push(BASE64_CODE[c2 & 63]); + } + return rs.join(""); +} +function base64_decode(s2, len) { + var off2 = 0, slen = s2.length, olen = 0, rs = [], c1, c2, c3, c4, o2, code; + if (len <= 0) + throw Error("Illegal len: " + len); + while (off2 < slen - 1 && olen < len) { + code = s2.charCodeAt(off2++); + c1 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + code = s2.charCodeAt(off2++); + c2 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + if (c1 == -1 || c2 == -1) + break; + o2 = c1 << 2 >>> 0; + o2 |= (c2 & 48) >> 4; + rs.push(String.fromCharCode(o2)); + if (++olen >= len || off2 >= slen) + break; + code = s2.charCodeAt(off2++); + c3 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + if (c3 == -1) + break; + o2 = (c2 & 15) << 4 >>> 0; + o2 |= (c3 & 60) >> 2; + rs.push(String.fromCharCode(o2)); + if (++olen >= len || off2 >= slen) + break; + code = s2.charCodeAt(off2++); + c4 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + o2 = (c3 & 3) << 6 >>> 0; + o2 |= c4; + rs.push(String.fromCharCode(o2)); + ++olen; + } + var res = []; + for (off2 = 0; off2 < olen; off2++) + res.push(rs[off2].charCodeAt(0)); + return res; +} +function _encipher(lr, off2, P2, S2) { + var n2, l2 = lr[off2], r2 = lr[off2 + 1]; + l2 ^= P2[0]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[1]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[2]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[3]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[4]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[5]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[6]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[7]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[8]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[9]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[10]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[11]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[12]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[13]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[14]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[15]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[16]; + lr[off2] = r2 ^ P2[BLOWFISH_NUM_ROUNDS + 1]; + lr[off2 + 1] = l2; + return lr; +} +function _streamtoword(data, offp) { + for (var i2 = 0, word = 0; i2 < 4; ++i2) + word = word << 8 | data[offp] & 255, offp = (offp + 1) % data.length; + return { key: word, offp }; +} +function _key(key, P2, S2) { + var offset = 0, lr = [0, 0], plen = P2.length, slen = S2.length, sw; + for (var i2 = 0; i2 < plen; i2++) + sw = _streamtoword(key, offset), offset = sw.offp, P2[i2] = P2[i2] ^ sw.key; + for (i2 = 0; i2 < plen; i2 += 2) + lr = _encipher(lr, 0, P2, S2), P2[i2] = lr[0], P2[i2 + 1] = lr[1]; + for (i2 = 0; i2 < slen; i2 += 2) + lr = _encipher(lr, 0, P2, S2), S2[i2] = lr[0], S2[i2 + 1] = lr[1]; +} +function _ekskey(data, key, P2, S2) { + var offp = 0, lr = [0, 0], plen = P2.length, slen = S2.length, sw; + for (var i2 = 0; i2 < plen; i2++) + sw = _streamtoword(key, offp), offp = sw.offp, P2[i2] = P2[i2] ^ sw.key; + offp = 0; + for (i2 = 0; i2 < plen; i2 += 2) + sw = _streamtoword(data, offp), offp = sw.offp, lr[0] ^= sw.key, sw = _streamtoword(data, offp), offp = sw.offp, lr[1] ^= sw.key, lr = _encipher(lr, 0, P2, S2), P2[i2] = lr[0], P2[i2 + 1] = lr[1]; + for (i2 = 0; i2 < slen; i2 += 2) + sw = _streamtoword(data, offp), offp = sw.offp, lr[0] ^= sw.key, sw = _streamtoword(data, offp), offp = sw.offp, lr[1] ^= sw.key, lr = _encipher(lr, 0, P2, S2), S2[i2] = lr[0], S2[i2 + 1] = lr[1]; +} +function _crypt(b2, salt, rounds, callback, progressCallback) { + var cdata = C_ORIG.slice(), clen = cdata.length, err; + if (rounds < 4 || rounds > 31) { + err = Error("Illegal number of rounds (4-31): " + rounds); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + if (salt.length !== BCRYPT_SALT_LEN) { + err = Error( + "Illegal salt length: " + salt.length + " != " + BCRYPT_SALT_LEN + ); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + rounds = 1 << rounds >>> 0; + var P2, S2, i2 = 0, j2; + if (typeof Int32Array === "function") { + P2 = new Int32Array(P_ORIG); + S2 = new Int32Array(S_ORIG); + } else { + P2 = P_ORIG.slice(); + S2 = S_ORIG.slice(); + } + _ekskey(salt, b2, P2, S2); + function next() { + if (progressCallback) + progressCallback(i2 / rounds); + if (i2 < rounds) { + var start = Date.now(); + for (; i2 < rounds; ) { + i2 = i2 + 1; + _key(b2, P2, S2); + _key(salt, P2, S2); + if (Date.now() - start > MAX_EXECUTION_TIME) + break; + } + } else { + for (i2 = 0; i2 < 64; i2++) + for (j2 = 0; j2 < clen >> 1; j2++) + _encipher(cdata, j2 << 1, P2, S2); + var ret = []; + for (i2 = 0; i2 < clen; i2++) + ret.push((cdata[i2] >> 24 & 255) >>> 0), ret.push((cdata[i2] >> 16 & 255) >>> 0), ret.push((cdata[i2] >> 8 & 255) >>> 0), ret.push((cdata[i2] & 255) >>> 0); + if (callback) { + callback(null, ret); + return; + } else + return ret; + } + if (callback) + nextTick2(next); + } + __name(next, "next"); + if (typeof callback !== "undefined") { + next(); + } else { + var res; + while (true) + if (typeof (res = next()) !== "undefined") + return res || []; + } +} +function _hash(password, salt, callback, progressCallback) { + var err; + if (typeof password !== "string" || typeof salt !== "string") { + err = Error("Invalid string / salt: Not a string"); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + var minor, offset; + if (salt.charAt(0) !== "$" || salt.charAt(1) !== "2") { + err = Error("Invalid salt version: " + salt.substring(0, 2)); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + if (salt.charAt(2) === "$") + minor = String.fromCharCode(0), offset = 3; + else { + minor = salt.charAt(2); + if (minor !== "a" && minor !== "b" && minor !== "y" || salt.charAt(3) !== "$") { + err = Error("Invalid salt revision: " + salt.substring(2, 4)); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + offset = 4; + } + if (salt.charAt(offset + 2) > "$") { + err = Error("Missing salt rounds"); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + var r1 = parseInt(salt.substring(offset, offset + 1), 10) * 10, r2 = parseInt(salt.substring(offset + 1, offset + 2), 10), rounds = r1 + r2, real_salt = salt.substring(offset + 3, offset + 25); + password += minor >= "a" ? "\0" : ""; + var passwordb = utf8Array(password), saltb = base64_decode(real_salt, BCRYPT_SALT_LEN); + function finish(bytes) { + var res = []; + res.push("$2"); + if (minor >= "a") + res.push(minor); + res.push("$"); + if (rounds < 10) + res.push("0"); + res.push(rounds.toString()); + res.push("$"); + res.push(base64_encode(saltb, saltb.length)); + res.push(base64_encode(bytes, C_ORIG.length * 4 - 1)); + return res.join(""); + } + __name(finish, "finish"); + if (typeof callback == "undefined") + return finish(_crypt(passwordb, saltb, rounds)); + else { + _crypt( + passwordb, + saltb, + rounds, + function(err2, bytes) { + if (err2) + callback(err2, null); + else + callback(null, finish(bytes)); + }, + progressCallback + ); + } +} +function encodeBase642(bytes, length) { + return base64_encode(bytes, length); +} +function decodeBase642(string4, length) { + return base64_decode(string4, length); +} +var randomFallback, nextTick2, BASE64_CODE, BASE64_INDEX, BCRYPT_SALT_LEN, GENSALT_DEFAULT_LOG2_ROUNDS, BLOWFISH_NUM_ROUNDS, MAX_EXECUTION_TIME, P_ORIG, S_ORIG, C_ORIG, bcryptjs_default; +var init_bcryptjs = __esm({ + "../../node_modules/bcryptjs/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_crypto3(); + randomFallback = null; + __name(randomBytes2, "randomBytes"); + __name(setRandomFallback, "setRandomFallback"); + __name(genSaltSync, "genSaltSync"); + __name(genSalt, "genSalt"); + __name(hashSync, "hashSync"); + __name(hash3, "hash"); + __name(safeStringCompare, "safeStringCompare"); + __name(compareSync, "compareSync"); + __name(compare, "compare"); + __name(getRounds, "getRounds"); + __name(getSalt, "getSalt"); + __name(truncates, "truncates"); + nextTick2 = typeof setImmediate === "function" ? setImmediate : typeof scheduler === "object" && typeof scheduler.postTask === "function" ? scheduler.postTask.bind(scheduler) : setTimeout; + __name(utf8Length, "utf8Length"); + __name(utf8Array, "utf8Array"); + BASE64_CODE = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""); + BASE64_INDEX = [ + -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, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + -1, + -1, + -1, + -1, + -1, + -1, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + -1, + -1, + -1, + -1, + -1 + ]; + __name(base64_encode, "base64_encode"); + __name(base64_decode, "base64_decode"); + BCRYPT_SALT_LEN = 16; + GENSALT_DEFAULT_LOG2_ROUNDS = 10; + BLOWFISH_NUM_ROUNDS = 16; + MAX_EXECUTION_TIME = 100; + P_ORIG = [ + 608135816, + 2242054355, + 320440878, + 57701188, + 2752067618, + 698298832, + 137296536, + 3964562569, + 1160258022, + 953160567, + 3193202383, + 887688300, + 3232508343, + 3380367581, + 1065670069, + 3041331479, + 2450970073, + 2306472731 + ]; + S_ORIG = [ + 3509652390, + 2564797868, + 805139163, + 3491422135, + 3101798381, + 1780907670, + 3128725573, + 4046225305, + 614570311, + 3012652279, + 134345442, + 2240740374, + 1667834072, + 1901547113, + 2757295779, + 4103290238, + 227898511, + 1921955416, + 1904987480, + 2182433518, + 2069144605, + 3260701109, + 2620446009, + 720527379, + 3318853667, + 677414384, + 3393288472, + 3101374703, + 2390351024, + 1614419982, + 1822297739, + 2954791486, + 3608508353, + 3174124327, + 2024746970, + 1432378464, + 3864339955, + 2857741204, + 1464375394, + 1676153920, + 1439316330, + 715854006, + 3033291828, + 289532110, + 2706671279, + 2087905683, + 3018724369, + 1668267050, + 732546397, + 1947742710, + 3462151702, + 2609353502, + 2950085171, + 1814351708, + 2050118529, + 680887927, + 999245976, + 1800124847, + 3300911131, + 1713906067, + 1641548236, + 4213287313, + 1216130144, + 1575780402, + 4018429277, + 3917837745, + 3693486850, + 3949271944, + 596196993, + 3549867205, + 258830323, + 2213823033, + 772490370, + 2760122372, + 1774776394, + 2652871518, + 566650946, + 4142492826, + 1728879713, + 2882767088, + 1783734482, + 3629395816, + 2517608232, + 2874225571, + 1861159788, + 326777828, + 3124490320, + 2130389656, + 2716951837, + 967770486, + 1724537150, + 2185432712, + 2364442137, + 1164943284, + 2105845187, + 998989502, + 3765401048, + 2244026483, + 1075463327, + 1455516326, + 1322494562, + 910128902, + 469688178, + 1117454909, + 936433444, + 3490320968, + 3675253459, + 1240580251, + 122909385, + 2157517691, + 634681816, + 4142456567, + 3825094682, + 3061402683, + 2540495037, + 79693498, + 3249098678, + 1084186820, + 1583128258, + 426386531, + 1761308591, + 1047286709, + 322548459, + 995290223, + 1845252383, + 2603652396, + 3431023940, + 2942221577, + 3202600964, + 3727903485, + 1712269319, + 422464435, + 3234572375, + 1170764815, + 3523960633, + 3117677531, + 1434042557, + 442511882, + 3600875718, + 1076654713, + 1738483198, + 4213154764, + 2393238008, + 3677496056, + 1014306527, + 4251020053, + 793779912, + 2902807211, + 842905082, + 4246964064, + 1395751752, + 1040244610, + 2656851899, + 3396308128, + 445077038, + 3742853595, + 3577915638, + 679411651, + 2892444358, + 2354009459, + 1767581616, + 3150600392, + 3791627101, + 3102740896, + 284835224, + 4246832056, + 1258075500, + 768725851, + 2589189241, + 3069724005, + 3532540348, + 1274779536, + 3789419226, + 2764799539, + 1660621633, + 3471099624, + 4011903706, + 913787905, + 3497959166, + 737222580, + 2514213453, + 2928710040, + 3937242737, + 1804850592, + 3499020752, + 2949064160, + 2386320175, + 2390070455, + 2415321851, + 4061277028, + 2290661394, + 2416832540, + 1336762016, + 1754252060, + 3520065937, + 3014181293, + 791618072, + 3188594551, + 3933548030, + 2332172193, + 3852520463, + 3043980520, + 413987798, + 3465142937, + 3030929376, + 4245938359, + 2093235073, + 3534596313, + 375366246, + 2157278981, + 2479649556, + 555357303, + 3870105701, + 2008414854, + 3344188149, + 4221384143, + 3956125452, + 2067696032, + 3594591187, + 2921233993, + 2428461, + 544322398, + 577241275, + 1471733935, + 610547355, + 4027169054, + 1432588573, + 1507829418, + 2025931657, + 3646575487, + 545086370, + 48609733, + 2200306550, + 1653985193, + 298326376, + 1316178497, + 3007786442, + 2064951626, + 458293330, + 2589141269, + 3591329599, + 3164325604, + 727753846, + 2179363840, + 146436021, + 1461446943, + 4069977195, + 705550613, + 3059967265, + 3887724982, + 4281599278, + 3313849956, + 1404054877, + 2845806497, + 146425753, + 1854211946, + 1266315497, + 3048417604, + 3681880366, + 3289982499, + 290971e4, + 1235738493, + 2632868024, + 2414719590, + 3970600049, + 1771706367, + 1449415276, + 3266420449, + 422970021, + 1963543593, + 2690192192, + 3826793022, + 1062508698, + 1531092325, + 1804592342, + 2583117782, + 2714934279, + 4024971509, + 1294809318, + 4028980673, + 1289560198, + 2221992742, + 1669523910, + 35572830, + 157838143, + 1052438473, + 1016535060, + 1802137761, + 1753167236, + 1386275462, + 3080475397, + 2857371447, + 1040679964, + 2145300060, + 2390574316, + 1461121720, + 2956646967, + 4031777805, + 4028374788, + 33600511, + 2920084762, + 1018524850, + 629373528, + 3691585981, + 3515945977, + 2091462646, + 2486323059, + 586499841, + 988145025, + 935516892, + 3367335476, + 2599673255, + 2839830854, + 265290510, + 3972581182, + 2759138881, + 3795373465, + 1005194799, + 847297441, + 406762289, + 1314163512, + 1332590856, + 1866599683, + 4127851711, + 750260880, + 613907577, + 1450815602, + 3165620655, + 3734664991, + 3650291728, + 3012275730, + 3704569646, + 1427272223, + 778793252, + 1343938022, + 2676280711, + 2052605720, + 1946737175, + 3164576444, + 3914038668, + 3967478842, + 3682934266, + 1661551462, + 3294938066, + 4011595847, + 840292616, + 3712170807, + 616741398, + 312560963, + 711312465, + 1351876610, + 322626781, + 1910503582, + 271666773, + 2175563734, + 1594956187, + 70604529, + 3617834859, + 1007753275, + 1495573769, + 4069517037, + 2549218298, + 2663038764, + 504708206, + 2263041392, + 3941167025, + 2249088522, + 1514023603, + 1998579484, + 1312622330, + 694541497, + 2582060303, + 2151582166, + 1382467621, + 776784248, + 2618340202, + 3323268794, + 2497899128, + 2784771155, + 503983604, + 4076293799, + 907881277, + 423175695, + 432175456, + 1378068232, + 4145222326, + 3954048622, + 3938656102, + 3820766613, + 2793130115, + 2977904593, + 26017576, + 3274890735, + 3194772133, + 1700274565, + 1756076034, + 4006520079, + 3677328699, + 720338349, + 1533947780, + 354530856, + 688349552, + 3973924725, + 1637815568, + 332179504, + 3949051286, + 53804574, + 2852348879, + 3044236432, + 1282449977, + 3583942155, + 3416972820, + 4006381244, + 1617046695, + 2628476075, + 3002303598, + 1686838959, + 431878346, + 2686675385, + 1700445008, + 1080580658, + 1009431731, + 832498133, + 3223435511, + 2605976345, + 2271191193, + 2516031870, + 1648197032, + 4164389018, + 2548247927, + 300782431, + 375919233, + 238389289, + 3353747414, + 2531188641, + 2019080857, + 1475708069, + 455242339, + 2609103871, + 448939670, + 3451063019, + 1395535956, + 2413381860, + 1841049896, + 1491858159, + 885456874, + 4264095073, + 4001119347, + 1565136089, + 3898914787, + 1108368660, + 540939232, + 1173283510, + 2745871338, + 3681308437, + 4207628240, + 3343053890, + 4016749493, + 1699691293, + 1103962373, + 3625875870, + 2256883143, + 3830138730, + 1031889488, + 3479347698, + 1535977030, + 4236805024, + 3251091107, + 2132092099, + 1774941330, + 1199868427, + 1452454533, + 157007616, + 2904115357, + 342012276, + 595725824, + 1480756522, + 206960106, + 497939518, + 591360097, + 863170706, + 2375253569, + 3596610801, + 1814182875, + 2094937945, + 3421402208, + 1082520231, + 3463918190, + 2785509508, + 435703966, + 3908032597, + 1641649973, + 2842273706, + 3305899714, + 1510255612, + 2148256476, + 2655287854, + 3276092548, + 4258621189, + 236887753, + 3681803219, + 274041037, + 1734335097, + 3815195456, + 3317970021, + 1899903192, + 1026095262, + 4050517792, + 356393447, + 2410691914, + 3873677099, + 3682840055, + 3913112168, + 2491498743, + 4132185628, + 2489919796, + 1091903735, + 1979897079, + 3170134830, + 3567386728, + 3557303409, + 857797738, + 1136121015, + 1342202287, + 507115054, + 2535736646, + 337727348, + 3213592640, + 1301675037, + 2528481711, + 1895095763, + 1721773893, + 3216771564, + 62756741, + 2142006736, + 835421444, + 2531993523, + 1442658625, + 3659876326, + 2882144922, + 676362277, + 1392781812, + 170690266, + 3921047035, + 1759253602, + 3611846912, + 1745797284, + 664899054, + 1329594018, + 3901205900, + 3045908486, + 2062866102, + 2865634940, + 3543621612, + 3464012697, + 1080764994, + 553557557, + 3656615353, + 3996768171, + 991055499, + 499776247, + 1265440854, + 648242737, + 3940784050, + 980351604, + 3713745714, + 1749149687, + 3396870395, + 4211799374, + 3640570775, + 1161844396, + 3125318951, + 1431517754, + 545492359, + 4268468663, + 3499529547, + 1437099964, + 2702547544, + 3433638243, + 2581715763, + 2787789398, + 1060185593, + 1593081372, + 2418618748, + 4260947970, + 69676912, + 2159744348, + 86519011, + 2512459080, + 3838209314, + 1220612927, + 3339683548, + 133810670, + 1090789135, + 1078426020, + 1569222167, + 845107691, + 3583754449, + 4072456591, + 1091646820, + 628848692, + 1613405280, + 3757631651, + 526609435, + 236106946, + 48312990, + 2942717905, + 3402727701, + 1797494240, + 859738849, + 992217954, + 4005476642, + 2243076622, + 3870952857, + 3732016268, + 765654824, + 3490871365, + 2511836413, + 1685915746, + 3888969200, + 1414112111, + 2273134842, + 3281911079, + 4080962846, + 172450625, + 2569994100, + 980381355, + 4109958455, + 2819808352, + 2716589560, + 2568741196, + 3681446669, + 3329971472, + 1835478071, + 660984891, + 3704678404, + 4045999559, + 3422617507, + 3040415634, + 1762651403, + 1719377915, + 3470491036, + 2693910283, + 3642056355, + 3138596744, + 1364962596, + 2073328063, + 1983633131, + 926494387, + 3423689081, + 2150032023, + 4096667949, + 1749200295, + 3328846651, + 309677260, + 2016342300, + 1779581495, + 3079819751, + 111262694, + 1274766160, + 443224088, + 298511866, + 1025883608, + 3806446537, + 1145181785, + 168956806, + 3641502830, + 3584813610, + 1689216846, + 3666258015, + 3200248200, + 1692713982, + 2646376535, + 4042768518, + 1618508792, + 1610833997, + 3523052358, + 4130873264, + 2001055236, + 3610705100, + 2202168115, + 4028541809, + 2961195399, + 1006657119, + 2006996926, + 3186142756, + 1430667929, + 3210227297, + 1314452623, + 4074634658, + 4101304120, + 2273951170, + 1399257539, + 3367210612, + 3027628629, + 1190975929, + 2062231137, + 2333990788, + 2221543033, + 2438960610, + 1181637006, + 548689776, + 2362791313, + 3372408396, + 3104550113, + 3145860560, + 296247880, + 1970579870, + 3078560182, + 3769228297, + 1714227617, + 3291629107, + 3898220290, + 166772364, + 1251581989, + 493813264, + 448347421, + 195405023, + 2709975567, + 677966185, + 3703036547, + 1463355134, + 2715995803, + 1338867538, + 1343315457, + 2802222074, + 2684532164, + 233230375, + 2599980071, + 2000651841, + 3277868038, + 1638401717, + 4028070440, + 3237316320, + 6314154, + 819756386, + 300326615, + 590932579, + 1405279636, + 3267499572, + 3150704214, + 2428286686, + 3959192993, + 3461946742, + 1862657033, + 1266418056, + 963775037, + 2089974820, + 2263052895, + 1917689273, + 448879540, + 3550394620, + 3981727096, + 150775221, + 3627908307, + 1303187396, + 508620638, + 2975983352, + 2726630617, + 1817252668, + 1876281319, + 1457606340, + 908771278, + 3720792119, + 3617206836, + 2455994898, + 1729034894, + 1080033504, + 976866871, + 3556439503, + 2881648439, + 1522871579, + 1555064734, + 1336096578, + 3548522304, + 2579274686, + 3574697629, + 3205460757, + 3593280638, + 3338716283, + 3079412587, + 564236357, + 2993598910, + 1781952180, + 1464380207, + 3163844217, + 3332601554, + 1699332808, + 1393555694, + 1183702653, + 3581086237, + 1288719814, + 691649499, + 2847557200, + 2895455976, + 3193889540, + 2717570544, + 1781354906, + 1676643554, + 2592534050, + 3230253752, + 1126444790, + 2770207658, + 2633158820, + 2210423226, + 2615765581, + 2414155088, + 3127139286, + 673620729, + 2805611233, + 1269405062, + 4015350505, + 3341807571, + 4149409754, + 1057255273, + 2012875353, + 2162469141, + 2276492801, + 2601117357, + 993977747, + 3918593370, + 2654263191, + 753973209, + 36408145, + 2530585658, + 25011837, + 3520020182, + 2088578344, + 530523599, + 2918365339, + 1524020338, + 1518925132, + 3760827505, + 3759777254, + 1202760957, + 3985898139, + 3906192525, + 674977740, + 4174734889, + 2031300136, + 2019492241, + 3983892565, + 4153806404, + 3822280332, + 352677332, + 2297720250, + 60907813, + 90501309, + 3286998549, + 1016092578, + 2535922412, + 2839152426, + 457141659, + 509813237, + 4120667899, + 652014361, + 1966332200, + 2975202805, + 55981186, + 2327461051, + 676427537, + 3255491064, + 2882294119, + 3433927263, + 1307055953, + 942726286, + 933058658, + 2468411793, + 3933900994, + 4215176142, + 1361170020, + 2001714738, + 2830558078, + 3274259782, + 1222529897, + 1679025792, + 2729314320, + 3714953764, + 1770335741, + 151462246, + 3013232138, + 1682292957, + 1483529935, + 471910574, + 1539241949, + 458788160, + 3436315007, + 1807016891, + 3718408830, + 978976581, + 1043663428, + 3165965781, + 1927990952, + 4200891579, + 2372276910, + 3208408903, + 3533431907, + 1412390302, + 2931980059, + 4132332400, + 1947078029, + 3881505623, + 4168226417, + 2941484381, + 1077988104, + 1320477388, + 886195818, + 18198404, + 3786409e3, + 2509781533, + 112762804, + 3463356488, + 1866414978, + 891333506, + 18488651, + 661792760, + 1628790961, + 3885187036, + 3141171499, + 876946877, + 2693282273, + 1372485963, + 791857591, + 2686433993, + 3759982718, + 3167212022, + 3472953795, + 2716379847, + 445679433, + 3561995674, + 3504004811, + 3574258232, + 54117162, + 3331405415, + 2381918588, + 3769707343, + 4154350007, + 1140177722, + 4074052095, + 668550556, + 3214352940, + 367459370, + 261225585, + 2610173221, + 4209349473, + 3468074219, + 3265815641, + 314222801, + 3066103646, + 3808782860, + 282218597, + 3406013506, + 3773591054, + 379116347, + 1285071038, + 846784868, + 2669647154, + 3771962079, + 3550491691, + 2305946142, + 453669953, + 1268987020, + 3317592352, + 3279303384, + 3744833421, + 2610507566, + 3859509063, + 266596637, + 3847019092, + 517658769, + 3462560207, + 3443424879, + 370717030, + 4247526661, + 2224018117, + 4143653529, + 4112773975, + 2788324899, + 2477274417, + 1456262402, + 2901442914, + 1517677493, + 1846949527, + 2295493580, + 3734397586, + 2176403920, + 1280348187, + 1908823572, + 3871786941, + 846861322, + 1172426758, + 3287448474, + 3383383037, + 1655181056, + 3139813346, + 901632758, + 1897031941, + 2986607138, + 3066810236, + 3447102507, + 1393639104, + 373351379, + 950779232, + 625454576, + 3124240540, + 4148612726, + 2007998917, + 544563296, + 2244738638, + 2330496472, + 2058025392, + 1291430526, + 424198748, + 50039436, + 29584100, + 3605783033, + 2429876329, + 2791104160, + 1057563949, + 3255363231, + 3075367218, + 3463963227, + 1469046755, + 985887462 + ]; + C_ORIG = [ + 1332899944, + 1700884034, + 1701343084, + 1684370003, + 1668446532, + 1869963892 + ]; + __name(_encipher, "_encipher"); + __name(_streamtoword, "_streamtoword"); + __name(_key, "_key"); + __name(_ekskey, "_ekskey"); + __name(_crypt, "_crypt"); + __name(_hash, "_hash"); + __name(encodeBase642, "encodeBase64"); + __name(decodeBase642, "decodeBase64"); + bcryptjs_default = { + setRandomFallback, + genSaltSync, + genSalt, + hashSync, + hash: hash3, + compareSync, + compare, + getRounds, + getSalt, + truncates, + encodeBase64: encodeBase642, + decodeBase64: decodeBase642 + }; + } +}); + +// src/trpc/apis/admin-apis/apis/staff-user.ts +var staffUserRouter; +var init_staff_user2 = __esm({ + "src/trpc/apis/admin-apis/apis/staff-user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_bcryptjs(); + init_webapi(); + init_env_exporter(); + init_api_error(); + init_dbService(); + staffUserRouter = router2({ + login: publicProcedure.input(external_exports.object({ + name: external_exports.string(), + password: external_exports.string() + })).mutation(async ({ input }) => { + const { name, password } = input; + if (!name || !password) { + throw new ApiError("Name and password are required", 400); + } + const staff = await getStaffUserByName(name); + if (!staff) { + throw new ApiError("Invalid credentials", 401); + } + const isPasswordValid = await bcryptjs_default.compare(password, staff.password); + if (!isPasswordValid) { + throw new ApiError("Invalid credentials", 401); + } + const token = await new SignJWT({ staffId: staff.id, name: staff.name }).setProtectedHeader({ alg: "HS256" }).setExpirationTime("30d").sign(getEncodedJwtSecret()); + return { + message: "Login successful", + token, + staff: { id: staff.id, name: staff.name } + }; + }), + getStaff: protectedProcedure.query(async ({ ctx }) => { + const staff = await getAllStaff(); + const transformedStaff = staff.map((user) => ({ + id: user.id, + name: user.name, + role: user.role ? { + id: user.role.id, + name: user.role.roleName + } : null, + permissions: user.role?.rolePermissions.map((rp) => ({ + id: rp.permission.id, + name: rp.permission.permissionName + })) || [] + })); + return { + staff: transformedStaff + }; + }), + getUsers: protectedProcedure.input(external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(20), + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { cursor, limit, search } = input; + const { users: usersToReturn, hasMore } = await getAllUsers(cursor, limit, search); + const formattedUsers = usersToReturn.map((user) => ({ + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile, + image: user.userDetails?.profileImage || null + })); + return { + users: formattedUsers, + nextCursor: hasMore ? usersToReturn[usersToReturn.length - 1].id : void 0 + }; + }), + getUserDetails: protectedProcedure.input(external_exports.object({ userId: external_exports.number() })).query(async ({ input }) => { + const { userId } = input; + const user = await getUserWithDetails(userId); + if (!user) { + throw new ApiError("User not found", 404); + } + const lastOrder = user.orders[0]; + return { + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile, + addedOn: user.createdAt, + lastOrdered: lastOrder?.createdAt || null, + isSuspended: user.userDetails?.isSuspended || false + }; + }), + updateUserSuspension: protectedProcedure.input(external_exports.object({ userId: external_exports.number(), isSuspended: external_exports.boolean() })).mutation(async ({ input }) => { + const { userId, isSuspended } = input; + await upsertUserSuspension(userId, isSuspended); + return { success: true }; + }), + createStaffUser: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + password: external_exports.string().min(6, "Password must be at least 6 characters"), + roleId: external_exports.number().int().positive("Role is required") + })).mutation(async ({ input, ctx }) => { + const { name, password, roleId } = input; + const existingUser = await checkStaffUserExists(name); + if (existingUser) { + throw new ApiError("Staff user with this name already exists", 409); + } + const roleExists = await checkStaffRoleExists(roleId); + if (!roleExists) { + throw new ApiError("Invalid role selected", 400); + } + const hashedPassword = await bcryptjs_default.hash(password, 12); + const newUser = await createStaffUser(name, hashedPassword, roleId); + return { success: true, user: { id: newUser.id, name: newUser.name } }; + }), + getRoles: protectedProcedure.query(async ({ ctx }) => { + const roles = await getAllRoles(); + return { + roles: roles.map((role) => ({ + id: role.id, + name: role.roleName + })) + }; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/store.ts +var storeRouter; +var init_store2 = __esm({ + "src/trpc/apis/admin-apis/apis/store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_s3_client(); + init_store_initializer(); + init_dbService(); + storeRouter = router2({ + getStores: protectedProcedure.query(async ({ ctx }) => { + const stores = await getAllStores(); + await Promise.all(stores.map(async (store) => { + if (store.imageUrl) + store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl); + })).catch((e2) => { + throw new ApiError("Unable to find store image urls"); + }); + return { + stores, + count: stores.length + }; + }), + getStoreById: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).query(async ({ input, ctx }) => { + const { id } = input; + const store = await getStoreById(id); + if (!store) { + throw new ApiError("Store not found", 404); + } + store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl); + return { + store + }; + }), + createStore: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + description: external_exports.string().optional(), + imageUrl: external_exports.string().optional(), + owner: external_exports.number().min(1, "Owner is required"), + products: external_exports.array(external_exports.number()).optional() + })).mutation(async ({ input, ctx }) => { + const { name, description, imageUrl, owner, products } = input; + const imageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : void 0; + const newStore = await createStore( + { + name, + description, + imageUrl: imageKey, + owner + }, + products + ); + scheduleStoreInitialization(); + return { + store: newStore, + message: "Store created successfully" + }; + }), + updateStore: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + name: external_exports.string().min(1, "Name is required"), + description: external_exports.string().optional(), + imageUrl: external_exports.string().optional(), + owner: external_exports.number().min(1, "Owner is required"), + products: external_exports.array(external_exports.number()).optional() + })).mutation(async ({ input, ctx }) => { + const { id, name, description, imageUrl, owner, products } = input; + const existingStore = await getStoreById(id); + if (!existingStore) { + throw new ApiError("Store not found", 404); + } + const oldImageKey = existingStore.imageUrl; + const newImageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : oldImageKey; + if (oldImageKey && (newImageKey && newImageKey !== oldImageKey || !newImageKey)) { + try { + await deleteImageUtil({ keys: [oldImageKey] }); + } catch (error50) { + console.error("Failed to delete old image:", error50); + } + } + const updatedStore = await updateStore( + id, + { + name, + description, + imageUrl: newImageKey, + owner + }, + products + ); + scheduleStoreInitialization(); + return { + store: updatedStore, + message: "Store updated successfully" + }; + }), + deleteStore: protectedProcedure.input(external_exports.object({ + storeId: external_exports.number() + })).mutation(async ({ input, ctx }) => { + const { storeId } = input; + const result = await deleteStore(storeId); + scheduleStoreInitialization(); + return result; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/payments.ts +var initiateRefundSchema, adminPaymentsRouter; +var init_payments2 = __esm({ + "src/trpc/apis/admin-apis/apis/payments.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + initiateRefundSchema = external_exports.object({ + orderId: external_exports.number(), + refundPercent: external_exports.number().min(0).max(100).optional(), + refundAmount: external_exports.number().min(0).optional() + }).refine( + (data) => { + const hasPercent = data.refundPercent !== void 0; + const hasAmount = data.refundAmount !== void 0; + return hasPercent && !hasAmount || !hasPercent && hasAmount; + }, + { + message: "Provide either refundPercent or refundAmount, not both or neither" + } + ); + adminPaymentsRouter = router2({ + initiateRefund: protectedProcedure.input(initiateRefundSchema).mutation(async ({ input }) => { + return {}; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/banner.ts +var bannerRouter2; +var init_banner2 = __esm({ + "src/trpc/apis/admin-apis/apis/banner.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_zod(); + init_trpc_index(); + init_s3_client(); + init_api_error(); + init_store_initializer(); + init_dbService(); + bannerRouter2 = router2({ + // Get all banners + getBanners: protectedProcedure.query(async () => { + try { + const banners = await getBanners(); + const bannersWithSignedUrls = await Promise.all( + banners.map(async (banner) => { + try { + return { + ...banner, + imageUrl: banner.imageUrl ? await generateSignedUrlFromS3Url(banner.imageUrl) : banner.imageUrl, + // Ensure productIds is always an array + productIds: banner.productIds || [] + }; + } catch (error50) { + console.error(`Failed to generate signed URL for banner ${banner.id}:`, error50); + return { + ...banner, + imageUrl: banner.imageUrl, + // Keep original on error + // Ensure productIds is always an array + productIds: banner.productIds || [] + }; + } + }) + ); + return { + banners: bannersWithSignedUrls + }; + } catch (e2) { + console.log(e2); + throw new ApiError(e2.message); + } + }), + // Get single banner by ID + getBanner: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).query(async ({ input }) => { + const banner = await getBannerById(input.id); + if (banner) { + try { + if (banner.imageUrl) { + banner.imageUrl = await generateSignedUrlFromS3Url(banner.imageUrl); + } + } catch (error50) { + console.error(`Failed to generate signed URL for banner ${banner.id}:`, error50); + } + if (!banner.productIds) { + banner.productIds = []; + } + } + return banner; + }), + // Create new banner + createBanner: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1), + imageUrl: external_exports.string().url(), + description: external_exports.string().optional(), + productIds: external_exports.array(external_exports.number()).optional(), + redirectUrl: external_exports.string().url().optional() + // serialNum removed completely + })).mutation(async ({ input }) => { + try { + const imageUrl = extractKeyFromPresignedUrl(input.imageUrl); + const banner = await createBanner({ + name: input.name, + imageUrl, + description: input.description ?? null, + productIds: input.productIds || [], + redirectUrl: input.redirectUrl ?? null, + serialNum: 999, + // Default value, not used + isActive: false + // Default to inactive + }); + scheduleStoreInitialization(); + return banner; + } catch (error50) { + console.error("Error creating banner:", error50); + throw error50; + } + }), + // Update banner + updateBanner: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + name: external_exports.string().min(1).optional(), + imageUrl: external_exports.string().url().optional(), + description: external_exports.string().optional(), + productIds: external_exports.array(external_exports.number()).optional(), + redirectUrl: external_exports.string().url().optional(), + serialNum: external_exports.number().nullable().optional(), + isActive: external_exports.boolean().optional() + })).mutation(async ({ input }) => { + try { + const { id, ...updateData } = input; + const processedData = { + ...updateData, + ...updateData.imageUrl && { + imageUrl: extractKeyFromPresignedUrl(updateData.imageUrl) + } + }; + if ("serialNum" in processedData && processedData.serialNum === null) { + processedData.serialNum = null; + } + const banner = await updateBanner(id, processedData); + scheduleStoreInitialization(); + return banner; + } catch (error50) { + console.error("Error updating banner:", error50); + throw error50; + } + }), + // Delete banner + deleteBanner: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).mutation(async ({ input }) => { + await deleteBanner(input.id); + scheduleStoreInitialization(); + return { success: true }; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/user.ts +var userRouter; +var init_user3 = __esm({ + "src/trpc/apis/admin-apis/apis/user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_notif_job(); + init_user_negativity_store(); + init_dbService(); + userRouter = { + createUserByMobile: protectedProcedure.input(external_exports.object({ + mobile: external_exports.string().min(1, "Mobile number is required") + })).mutation(async ({ input }) => { + const cleanMobile = input.mobile.replace(/\D/g, ""); + if (cleanMobile.length !== 10) { + throw new ApiError("Mobile number must be exactly 10 digits", 400); + } + const existingUser = await getUserByMobile(cleanMobile); + if (existingUser) { + throw new ApiError("User with this mobile number already exists", 409); + } + const newUser = await createUserByMobile(cleanMobile); + return { + success: true, + data: newUser + }; + }), + getEssentials: protectedProcedure.query(async () => { + const count4 = await getUnresolvedComplaintsCount(); + return { + unresolvedComplaints: count4 + }; + }), + getAllUsers: protectedProcedure.input(external_exports.object({ + limit: external_exports.number().min(1).max(100).default(50), + cursor: external_exports.number().optional(), + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { limit, cursor, search } = input; + const { users: usersToReturn, hasMore } = await getAllUsersWithFilters(limit, cursor, search); + const userIds = usersToReturn.map((u5) => u5.id); + const orderCounts = await getOrderCountsByUserIds(userIds); + const lastOrders = await getLastOrdersByUserIds(userIds); + const suspensionStatuses = await getSuspensionStatusesByUserIds(userIds); + const orderCountMap = new Map(orderCounts.map((o2) => [o2.userId, o2.totalOrders])); + const lastOrderMap = new Map(lastOrders.map((o2) => [o2.userId, o2.lastOrderDate])); + const suspensionMap = new Map(suspensionStatuses.map((s2) => [s2.userId, s2.isSuspended])); + const usersWithStats = usersToReturn.map((user) => ({ + ...user, + totalOrders: orderCountMap.get(user.id) || 0, + lastOrderDate: lastOrderMap.get(user.id) || null, + isSuspended: suspensionMap.get(user.id) ?? false + })); + const nextCursor = hasMore ? usersToReturn[usersToReturn.length - 1].id : void 0; + return { + users: usersWithStats, + nextCursor, + hasMore + }; + }), + getUserDetails: protectedProcedure.input(external_exports.object({ + userId: external_exports.number() + })).query(async ({ input }) => { + const { userId } = input; + const user = await getUserBasicInfo(userId); + if (!user) { + throw new ApiError("User not found", 404); + } + const isSuspended = await getUserSuspensionStatus(userId); + const userOrders = await getUserOrders(userId); + const orderIds = userOrders.map((o2) => o2.id); + const orderStatuses = await getOrderStatusesByOrderIds(orderIds); + const itemCounts = await getItemCountsByOrderIds(orderIds); + const statusMap = new Map(orderStatuses.map((s2) => [s2.orderId, s2])); + const itemCountMap = new Map(itemCounts.map((c2) => [c2.orderId, c2.itemCount])); + const getStatus = /* @__PURE__ */ __name((status) => { + if (!status) + return "pending"; + if (status.isCancelled) + return "cancelled"; + if (status.isDelivered) + return "delivered"; + return "pending"; + }, "getStatus"); + const ordersWithDetails = userOrders.map((order) => { + const status = statusMap.get(order.id); + return { + id: order.id, + readableId: order.readableId, + totalAmount: order.totalAmount, + createdAt: order.createdAt, + isFlashDelivery: order.isFlashDelivery, + status: getStatus(status), + itemCount: itemCountMap.get(order.id) || 0 + }; + }); + return { + user: { + ...user, + isSuspended + }, + orders: ordersWithDetails + }; + }), + updateUserSuspension: protectedProcedure.input(external_exports.object({ + userId: external_exports.number(), + isSuspended: external_exports.boolean() + })).mutation(async ({ input }) => { + const { userId, isSuspended } = input; + await upsertUserSuspension(userId, isSuspended); + return { + success: true, + message: `User ${isSuspended ? "suspended" : "unsuspended"} successfully` + }; + }), + getUsersForNotification: protectedProcedure.input(external_exports.object({ + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { search } = input; + const usersList = await searchUsers(search); + const eligibleUsers = await getAllNotifCreds(); + const eligibleSet = new Set(eligibleUsers.map((u5) => u5.userId)); + return { + users: usersList.map((user) => ({ + id: user.id, + name: user.name, + mobile: user.mobile, + isEligibleForNotif: eligibleSet.has(user.id) + })) + }; + }), + sendNotification: protectedProcedure.input(external_exports.object({ + userIds: external_exports.array(external_exports.number()).default([]), + title: external_exports.string().min(1, "Title is required"), + text: external_exports.string().min(1, "Message is required"), + imageUrl: external_exports.string().optional() + })).mutation(async ({ input }) => { + const { userIds, title: title2, text: text2, imageUrl } = input; + let tokens = []; + if (userIds.length === 0) { + const loggedInTokens = await getAllNotifCreds(); + const unloggedTokens = await getAllUnloggedTokens(); + tokens = [ + ...loggedInTokens.map((t9) => t9.token), + ...unloggedTokens.map((t9) => t9.token) + ]; + } else { + const userTokens = await getNotifTokensByUserIds(userIds); + tokens = userTokens.map((t9) => t9.token); + } + let queuedCount = 0; + for (const token of tokens) { + try { + await notificationQueue.add("send-admin-notification", { + token, + title: title2, + body: text2, + imageUrl: imageUrl || null + }, { + attempts: 3, + backoff: { + type: "exponential", + delay: 2e3 + } + }); + queuedCount++; + } catch (error50) { + console.error(`Failed to queue notification for token:`, error50); + } + } + return { + success: true, + message: `Notification queued for ${queuedCount} users` + }; + }), + getUserIncidents: protectedProcedure.input(external_exports.object({ + userId: external_exports.number() + })).query(async ({ input }) => { + const { userId } = input; + const incidents = await getUserIncidentsWithRelations(userId); + return { + incidents: incidents.map((incident) => ({ + id: incident.id, + userId: incident.userId, + orderId: incident.orderId, + dateAdded: incident.dateAdded, + adminComment: incident.adminComment, + addedBy: incident.addedBy?.name || "Unknown", + negativityScore: incident.negativityScore, + orderStatus: incident.order?.orderStatus?.[0]?.isCancelled ? "cancelled" : "active" + })) + }; + }), + addUserIncident: protectedProcedure.input(external_exports.object({ + userId: external_exports.number(), + orderId: external_exports.number().optional(), + adminComment: external_exports.string().optional(), + negativityScore: external_exports.number().optional() + })).mutation(async ({ input, ctx }) => { + const { userId, orderId, adminComment, negativityScore } = input; + const adminUserId = ctx.staffUser?.id; + if (!adminUserId) { + throw new ApiError("Admin user not authenticated", 401); + } + const incident = await createUserIncident( + userId, + orderId, + adminComment, + adminUserId, + negativityScore + ); + recomputeUserNegativityScore(userId); + return { + success: true, + data: incident + }; + }) + }; + } +}); + +// src/trpc/apis/admin-apis/apis/const.ts +var constRouter; +var init_const2 = __esm({ + "src/trpc/apis/admin-apis/apis/const.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_const_store(); + init_const_keys(); + init_dbService(); + constRouter = router2({ + getConstants: protectedProcedure.query(async () => { + const constants2 = await getAllConstants(); + return constants2; + }), + updateConstants: protectedProcedure.input(external_exports.object({ + constants: external_exports.array(external_exports.object({ + key: external_exports.string(), + value: external_exports.any() + })) + })).mutation(async ({ input }) => { + const { constants: constants2 } = input; + const validKeys = Object.values(CONST_KEYS); + const invalidKeys = constants2.filter((c2) => !validKeys.includes(c2.key)).map((c2) => c2.key); + if (invalidKeys.length > 0) { + throw new Error(`Invalid constant keys: ${invalidKeys.join(", ")}`); + } + await upsertConstants(constants2); + await computeConstants(); + return { + success: true, + updatedCount: constants2.length, + keys: constants2.map((c2) => c2.key) + }; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/admin-trpc-index.ts +var adminRouter; +var init_admin_trpc_index = __esm({ + "src/trpc/apis/admin-apis/apis/admin-trpc-index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_complaint3(); + init_coupon3(); + init_order3(); + init_vendor_snippets2(); + init_slots4(); + init_product3(); + init_staff_user2(); + init_store2(); + init_payments2(); + init_banner2(); + init_user3(); + init_const2(); + adminRouter = router2({ + complaint: complaintRouter, + coupon: couponRouter, + order: orderRouter, + vendorSnippets: vendorSnippetsRouter, + slots: slotsRouter2, + product: productRouter, + staffUser: staffUserRouter, + store: storeRouter, + payments: adminPaymentsRouter, + banner: bannerRouter2, + user: userRouter, + const: constRouter + }); + } +}); + +// src/lib/license-util.ts +async function extractCoordsFromRedirectUrl(url2) { + try { + await axios_default.get(url2, { maxRedirects: 0 }); + return null; + } catch (error50) { + if (error50.response?.status === 302 || error50.response?.status === 301) { + const redirectUrl = error50.response.headers.location; + const coordsMatch = redirectUrl.match(/!3d([-\d.]+)!4d([-\d.]+)/); + if (coordsMatch) { + return { + latitude: coordsMatch[1], + longitude: coordsMatch[2] + }; + } + } + return null; + } +} +var init_license_util = __esm({ + "src/lib/license-util.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_axios2(); + __name(extractCoordsFromRedirectUrl, "extractCoordsFromRedirectUrl"); + } +}); + +// src/trpc/apis/user-apis/apis/address.ts +var addressRouter; +var init_address2 = __esm({ + "src/trpc/apis/user-apis/apis/address.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_license_util(); + init_dbService(); + addressRouter = router2({ + getDefaultAddress: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + const defaultAddress = await getDefaultAddress(userId); + return { success: true, data: defaultAddress }; + }), + getUserAddresses: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + const userAddresses = await getUserAddresses(userId); + return { success: true, data: userAddresses }; + }), + createAddress: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + phone: external_exports.string().min(1, "Phone is required"), + addressLine1: external_exports.string().min(1, "Address line 1 is required"), + addressLine2: external_exports.string().optional(), + city: external_exports.string().min(1, "City is required"), + state: external_exports.string().min(1, "State is required"), + pincode: external_exports.string().min(1, "Pincode is required"), + isDefault: external_exports.boolean().optional(), + latitude: external_exports.number().optional(), + longitude: external_exports.number().optional(), + googleMapsUrl: external_exports.string().optional() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { name, phone, addressLine1, addressLine2, city, state, pincode, isDefault, googleMapsUrl } = input; + let { latitude, longitude } = input; + if (googleMapsUrl && latitude === void 0 && longitude === void 0) { + const coords = await extractCoordsFromRedirectUrl(googleMapsUrl); + if (coords) { + latitude = Number(coords.latitude); + longitude = Number(coords.longitude); + } + } + if (!name || !phone || !addressLine1 || !city || !state || !pincode) { + throw new Error("Missing required fields"); + } + if (isDefault) { + await clearDefaultAddress(userId); + } + const newAddress = await createUserAddress({ + userId, + name, + phone, + addressLine1, + addressLine2, + city, + state, + pincode, + isDefault: isDefault || false, + latitude, + longitude, + googleMapsUrl + }); + return { success: true, data: newAddress }; + }), + updateAddress: protectedProcedure.input(external_exports.object({ + id: external_exports.number().int().positive(), + name: external_exports.string().min(1, "Name is required"), + phone: external_exports.string().min(1, "Phone is required"), + addressLine1: external_exports.string().min(1, "Address line 1 is required"), + addressLine2: external_exports.string().optional(), + city: external_exports.string().min(1, "City is required"), + state: external_exports.string().min(1, "State is required"), + pincode: external_exports.string().min(1, "Pincode is required"), + isDefault: external_exports.boolean().optional(), + latitude: external_exports.number().optional(), + longitude: external_exports.number().optional(), + googleMapsUrl: external_exports.string().optional() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { id, name, phone, addressLine1, addressLine2, city, state, pincode, isDefault, googleMapsUrl } = input; + let { latitude, longitude } = input; + if (googleMapsUrl && latitude === void 0 && longitude === void 0) { + const coords = await extractCoordsFromRedirectUrl(googleMapsUrl); + if (coords) { + latitude = Number(coords.latitude); + longitude = Number(coords.longitude); + } + } + const existingAddress = await getUserAddressById(userId, id); + if (!existingAddress) { + throw new Error("Address not found"); + } + if (isDefault) { + await clearDefaultAddress(userId); + } + const updatedAddress = await updateUserAddress({ + userId, + addressId: id, + name, + phone, + addressLine1, + addressLine2, + city, + state, + pincode, + isDefault: isDefault || false, + googleMapsUrl, + latitude, + longitude + }); + return { success: true, data: updatedAddress }; + }), + deleteAddress: protectedProcedure.input(external_exports.object({ + id: external_exports.number().int().positive() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { id } = input; + const existingAddress = await getUserAddressById(userId, id); + if (!existingAddress) { + throw new Error("Address not found or does not belong to user"); + } + const hasOngoingOrders = await hasOngoingOrdersForAddress(id); + if (hasOngoingOrders) { + throw new Error("Address is attached to an ongoing order. Please cancel the order first."); + } + if (existingAddress.isDefault) { + throw new Error("Cannot delete default address. Please set another address as default first."); + } + const deleted = await deleteUserAddress(userId, id); + if (!deleted) { + throw new Error("Address not found or does not belong to user"); + } + return { success: true, message: "Address deleted successfully" }; + }) + }); + } +}); + +// src/lib/otp-utils.ts +function getOtpCreds(mobile) { + const authKey = otpStore.get(mobile); + return authKey || null; +} +async function verifyOtpUtil(mobile, otp, verifId) { + const reqUrl = `https://cpaas.messagecentral.com/verification/v3/validateOtp?&verificationId=${verifId}&code=${otp}`; + const resp = await fetch(reqUrl, { + method: "GET", + headers: { + authToken: otpSenderAuthToken + } + }); + const rawData = await resp.json(); + if (rawData.data?.verificationStatus === "VERIFICATION_COMPLETED") { + return true; + } + return false; +} +var otpStore, setOtpCreds, sendOtp; +var init_otp_utils = __esm({ + "src/lib/otp-utils.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_api_error(); + init_env_exporter(); + otpStore = /* @__PURE__ */ new Map(); + setOtpCreds = /* @__PURE__ */ __name((phone, verificationId) => { + otpStore.set(phone, verificationId); + }, "setOtpCreds"); + __name(getOtpCreds, "getOtpCreds"); + sendOtp = /* @__PURE__ */ __name(async (phone) => { + if (!phone) { + throw new ApiError("Phone number is required", 400); + } + const reqUrl = `https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=${phone}&timeout=300`; + const resp = await fetch(reqUrl, { + headers: { + authToken: otpSenderAuthToken + }, + method: "POST" + }); + const data = await resp.json(); + if (data.message === "SUCCESS") { + setOtpCreds(phone, data.data.verificationId); + return { success: true, message: "OTP sent successfully", verificationId: data.data.verificationId }; + } + if (data.message === "REQUEST_ALREADY_EXISTS") { + return { success: true, message: "OTP already sent. Last OTP is still valid" }; + } + throw new ApiError("Error while sending OTP. Please try again", 500); + }, "sendOtp"); + __name(verifyOtpUtil, "verifyOtpUtil"); + } +}); + +// src/trpc/apis/user-apis/apis/auth.ts +var generateToken, authRouter; +var init_auth4 = __esm({ + "src/trpc/apis/user-apis/apis/auth.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_bcryptjs(); + init_webapi(); + init_s3_client(); + init_api_error(); + init_env_exporter(); + init_otp_utils(); + init_dbService(); + generateToken = /* @__PURE__ */ __name(async (userId) => { + return await new SignJWT({ userId }).setProtectedHeader({ alg: "HS256" }).setExpirationTime("7d").sign(getEncodedJwtSecret()); + }, "generateToken"); + authRouter = router2({ + login: publicProcedure.input(external_exports.object({ + identifier: external_exports.string().min(1, "Email/mobile is required"), + password: external_exports.string().min(1, "Password is required") + })).mutation(async ({ input }) => { + const { identifier, password } = input; + if (!identifier || !password) { + throw new ApiError("Email/mobile and password are required", 400); + } + const user = await getUserByEmail(identifier.toLowerCase()); + let foundUser = user || null; + if (!foundUser) { + const userByMobile = await getUserByMobile2(identifier); + foundUser = userByMobile || null; + } + if (!foundUser) { + throw new ApiError("Invalid credentials", 401); + } + const userCredentials = await getUserCreds(foundUser.id); + if (!userCredentials) { + throw new ApiError("Account setup incomplete. Please contact support.", 401); + } + const userDetail = await getUserDetails(foundUser.id); + const profileImageSignedUrl = userDetail?.profileImage ? await generateSignedUrlFromS3Url(userDetail.profileImage) : null; + const isPasswordValid = await bcryptjs_default.compare(password, userCredentials.userPassword); + if (!isPasswordValid) { + throw new ApiError("Invalid credentials", 401); + } + const token = await generateToken(foundUser.id); + const response = { + token, + user: { + id: foundUser.id, + name: foundUser.name, + email: foundUser.email, + mobile: foundUser.mobile, + createdAt: foundUser.createdAt.toISOString(), + profileImage: profileImageSignedUrl, + bio: userDetail?.bio || null, + dateOfBirth: userDetail?.dateOfBirth ? new Date(userDetail.dateOfBirth).toISOString() : null, + gender: userDetail?.gender || null, + occupation: userDetail?.occupation || null + } + }; + return { + success: true, + data: response + }; + }), + register: publicProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + email: external_exports.string().email("Invalid email format"), + mobile: external_exports.string().min(1, "Mobile is required"), + password: external_exports.string().min(1, "Password is required"), + profileImageUrl: external_exports.string().nullable().optional() + })).mutation(async ({ input }) => { + const { name, email: email3, mobile, password, profileImageUrl } = input; + if (!name || !email3 || !mobile || !password) { + throw new ApiError("All fields are required", 400); + } + const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + if (!emailRegex.test(email3)) { + throw new ApiError("Invalid email format", 400); + } + const cleanMobile = mobile.replace(/\D/g, ""); + if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) { + throw new ApiError("Invalid mobile number", 400); + } + const existingEmail = await getUserByEmail(email3.toLowerCase()); + if (existingEmail) { + throw new ApiError("Email already registered", 409); + } + const existingMobile = await getUserByMobile2(cleanMobile); + if (existingMobile) { + throw new ApiError("Mobile number already registered", 409); + } + const hashedPassword = await bcryptjs_default.hash(password, 12); + const newUser = await createUserWithProfile({ + name: name.trim(), + email: email3.toLowerCase().trim(), + mobile: cleanMobile, + hashedPassword, + profileImage: profileImageUrl ?? null + }); + const token = await generateToken(newUser.id); + const profileImageSignedUrl = profileImageUrl ? await generateSignedUrlFromS3Url(profileImageUrl) : null; + const response = { + token, + user: { + id: newUser.id, + name: newUser.name, + email: newUser.email, + mobile: newUser.mobile, + createdAt: newUser.createdAt.toISOString(), + profileImage: profileImageSignedUrl + } + }; + return { + success: true, + data: response + }; + }), + sendOtp: publicProcedure.input(external_exports.object({ + mobile: external_exports.string() + })).mutation(async ({ input }) => { + return await sendOtp(input.mobile); + }), + verifyOtp: publicProcedure.input(external_exports.object({ + mobile: external_exports.string(), + otp: external_exports.string() + })).mutation(async ({ input }) => { + const verificationId = getOtpCreds(input.mobile); + if (!verificationId) { + throw new ApiError("OTP not sent or expired", 400); + } + const isVerified = await verifyOtpUtil(input.mobile, input.otp, verificationId); + if (!isVerified) { + throw new ApiError("Invalid OTP", 400); + } + let user = await getUserByMobile2(input.mobile); + if (!user) { + user = await createUserWithMobile(input.mobile); + } + const token = await generateToken(user.id); + return { + success: true, + token, + user: { + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile, + createdAt: user.createdAt.toISOString(), + profileImage: null + } + }; + }), + updatePassword: protectedProcedure.input(external_exports.object({ + password: external_exports.string().min(6, "Password must be at least 6 characters") + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const hashedPassword = await bcryptjs_default.hash(input.password, 10); + await upsertUserPassword(userId, hashedPassword); + return { success: true, message: "Password updated successfully" }; + }), + updateProfile: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1).optional(), + email: external_exports.string().email("Invalid email format").optional(), + mobile: external_exports.string().min(1).optional(), + password: external_exports.string().min(6, "Password must be at least 6 characters").optional(), + bio: external_exports.string().optional().nullable(), + dateOfBirth: external_exports.string().optional().nullable(), + gender: external_exports.string().optional().nullable(), + occupation: external_exports.string().optional().nullable(), + profileImageUrl: external_exports.string().optional().nullable() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const { name, email: email3, mobile, password, bio, dateOfBirth, gender, occupation, profileImageUrl } = input; + if (email3) { + const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + if (!emailRegex.test(email3)) { + throw new ApiError("Invalid email format", 400); + } + } + if (mobile) { + const cleanMobile = mobile.replace(/\D/g, ""); + if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) { + throw new ApiError("Invalid mobile number", 400); + } + } + if (email3) { + const existingEmail = await getUserByEmail(email3.toLowerCase()); + if (existingEmail && existingEmail.id !== userId) { + throw new ApiError("Email already registered", 409); + } + } + if (mobile) { + const cleanMobile = mobile.replace(/\D/g, ""); + const existingMobile = await getUserByMobile2(cleanMobile); + if (existingMobile && existingMobile.id !== userId) { + throw new ApiError("Mobile number already registered", 409); + } + } + let hashedPassword; + if (password) { + hashedPassword = await bcryptjs_default.hash(password, 12); + } + const updatedUser = await updateUserProfile(userId, { + name: name?.trim(), + email: email3?.toLowerCase().trim(), + mobile: mobile?.replace(/\D/g, ""), + hashedPassword, + profileImage: profileImageUrl ?? void 0, + bio: bio ?? void 0, + dateOfBirth: dateOfBirth ? new Date(dateOfBirth) : void 0, + gender: gender ?? void 0, + occupation: occupation ?? void 0 + }); + const userDetail = await getUserDetailsByUserId(userId); + const profileImageSignedUrl = userDetail?.profileImage ? await generateSignedUrlFromS3Url(userDetail.profileImage) : null; + const authHeader = ctx.req.header("authorization"); + const token = authHeader?.replace("Bearer ", "") || ""; + const response = { + token, + user: { + id: updatedUser.id, + name: updatedUser.name, + email: updatedUser.email, + mobile: updatedUser.mobile, + createdAt: updatedUser.createdAt?.toISOString?.() || (/* @__PURE__ */ new Date()).toISOString(), + profileImage: profileImageSignedUrl, + bio: userDetail?.bio || null, + dateOfBirth: userDetail?.dateOfBirth ? new Date(userDetail.dateOfBirth).toISOString() : null, + gender: userDetail?.gender || null, + occupation: userDetail?.occupation || null + } + }; + return { + success: true, + data: response + }; + }), + getProfile: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const user = await getUserById(userId); + if (!user) { + throw new ApiError("User not found", 404); + } + return { + success: true, + data: { + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile + } + }; + }), + deleteAccount: protectedProcedure.input(external_exports.object({ + mobile: external_exports.string().min(10, "Mobile number is required") + })).mutation(async ({ ctx, input }) => { + const userId = ctx.user.userId; + const { mobile } = input; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const existingUser = await getUserById(userId); + if (!existingUser) { + throw new ApiError("User not found", 404); + } + if (existingUser.id !== userId) { + throw new ApiError("Unauthorized: Cannot delete another user's account", 403); + } + const cleanInputMobile = mobile.replace(/\D/g, ""); + const cleanUserMobile = existingUser.mobile?.replace(/\D/g, ""); + if (cleanInputMobile !== cleanUserMobile) { + throw new ApiError("Mobile number does not match your registered number", 400); + } + await deleteUserAccount(userId); + return { success: true, message: "Account deleted successfully" }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/cart.ts +var getCartData, cartRouter; +var init_cart2 = __esm({ + "src/trpc/apis/user-apis/apis/cart.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_s3_client(); + init_slot_store(); + init_dbService(); + getCartData = /* @__PURE__ */ __name(async (userId) => { + const cartItemsWithProducts = await getCartItemsWithProducts(userId); + const cartWithSignedUrls = cartItemsWithProducts.map((item) => ({ + ...item, + product: { + ...item.product, + images: scaffoldAssetUrl(item.product.images || []) + } + })); + const totalAmount = cartWithSignedUrls.reduce((sum2, item) => sum2 + item.subtotal, 0); + return { + items: cartWithSignedUrls, + totalItems: cartWithSignedUrls.length, + totalAmount + }; + }, "getCartData"); + cartRouter = router2({ + getCart: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + return await getCartData(userId); + }), + addToCart: protectedProcedure.input(external_exports.object({ + productId: external_exports.number().int().positive(), + quantity: external_exports.number().int().positive() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { productId, quantity } = input; + if (!productId || !quantity || quantity <= 0) { + throw new ApiError("Product ID and positive quantity required", 400); + } + const product = await getProductById2(productId); + if (!product) { + throw new ApiError("Product not found", 404); + } + const existingItem = await getCartItemByUserProduct(userId, productId); + if (existingItem) { + await incrementCartItemQuantity(existingItem.id, quantity); + } else { + await insertCartItem(userId, productId, quantity); + } + return await getCartData(userId); + }), + updateCartItem: protectedProcedure.input(external_exports.object({ + itemId: external_exports.number().int().positive(), + quantity: external_exports.number().int().min(0) + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { itemId, quantity } = input; + if (!quantity || quantity <= 0) { + throw new ApiError("Positive quantity required", 400); + } + const updated = await updateCartItemQuantity(userId, itemId, quantity); + if (!updated) { + throw new ApiError("Cart item not found", 404); + } + return await getCartData(userId); + }), + removeFromCart: protectedProcedure.input(external_exports.object({ + itemId: external_exports.number().int().positive() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { itemId } = input; + const deleted = await deleteCartItem(userId, itemId); + if (!deleted) { + throw new ApiError("Cart item not found", 404); + } + return await getCartData(userId); + }), + clearCart: protectedProcedure.mutation(async ({ ctx }) => { + const userId = ctx.user.userId; + await clearUserCart(userId); + return { + items: [], + totalItems: 0, + totalAmount: 0, + message: "Cart cleared successfully" + }; + }), + // Original DB-based getCartSlots (commented out) + // getCartSlots: publicProcedure + // .input(z.object({ + // productIds: z.array(z.number().int().positive()) + // })) + // .query(async ({ input }) => { + // const { productIds } = input; + // + // if (productIds.length === 0) { + // return {}; + // } + // + // // Get slots for these products where freeze time is after current time + // const slotsData = await db + // .select({ + // productId: productSlots.productId, + // slotId: deliverySlotInfo.id, + // deliveryTime: deliverySlotInfo.deliveryTime, + // freezeTime: deliverySlotInfo.freezeTime, + // isActive: deliverySlotInfo.isActive, + // }) + // .from(productSlots) + // .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id)) + // .where(and( + // inArray(productSlots.productId, productIds), + // gt(deliverySlotInfo.freezeTime, sql`NOW()`), + // eq(deliverySlotInfo.isActive, true) + // )); + // + // // Group by productId + // const result: Record = {}; + // slotsData.forEach(slot => { + // if (!result[slot.productId]) { + // result[slot.productId] = []; + // } + // result[slot.productId].push({ + // id: slot.slotId, + // deliveryTime: slot.deliveryTime, + // freezeTime: slot.freezeTime, + // }); + // }); + // + // return result; + // }), + // Cache-based getCartSlots + getCartSlots: publicProcedure.input(external_exports.object({ + productIds: external_exports.array(external_exports.number().int().positive()) + })).query(async ({ input }) => { + const { productIds } = input; + if (productIds.length === 0) { + return {}; + } + return await getMultipleProductsSlots(productIds); + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/complaint.ts +var complaintRouter2; +var init_complaint4 = __esm({ + "src/trpc/apis/user-apis/apis/complaint.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_dbService(); + complaintRouter2 = router2({ + getAll: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + const userComplaints = await getUserComplaints(userId); + return { + complaints: userComplaints + }; + }), + raise: protectedProcedure.input(external_exports.object({ + orderId: external_exports.string().optional(), + complaintBody: external_exports.string().min(1, "Complaint body is required"), + imageUrls: external_exports.array(external_exports.string()).optional() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { orderId, complaintBody, imageUrls } = input; + let orderIdNum = null; + if (orderId) { + const readableIdMatch = orderId.match(/^ORD(\d+)$/); + if (readableIdMatch) { + orderIdNum = parseInt(readableIdMatch[1]); + } + } + await createComplaint( + userId, + orderIdNum, + complaintBody.trim(), + imageUrls && imageUrls.length > 0 ? imageUrls : null + ); + return { success: true, message: "Complaint raised successfully" }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/order.ts +var toApiDate2, placeOrderUtil, orderRouter2; +var init_order4 = __esm({ + "src/trpc/apis/user-apis/apis/order.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_dbService(); + init_common3(); + init_s3_client(); + init_api_error(); + init_notif_job(); + init_const_store(); + init_post_order_handler(); + toApiDate2 = /* @__PURE__ */ __name((value) => { + if (value instanceof Date) { + return Number.isNaN(value.getTime()) ? "" : value.toISOString(); + } + if (typeof value === "number") { + const date6 = new Date(value); + return Number.isNaN(date6.getTime()) ? "" : date6.toISOString(); + } + if (typeof value === "string") { + const date6 = new Date(value); + return Number.isNaN(date6.getTime()) ? value : date6.toISOString(); + } + return ""; + }, "toApiDate"); + placeOrderUtil = /* @__PURE__ */ __name(async (params) => { + const { + userId, + selectedItems, + addressId, + paymentMethod, + couponId, + userNotes + } = params; + const constants2 = await getConstants([ + CONST_KEYS.minRegularOrderValue, + CONST_KEYS.deliveryCharge, + CONST_KEYS.flashFreeDeliveryThreshold, + CONST_KEYS.flashDeliveryCharge + ]); + const isFlashDelivery = params.isFlash; + const minOrderValue2 = (isFlashDelivery ? constants2[CONST_KEYS.flashFreeDeliveryThreshold] : constants2[CONST_KEYS.minRegularOrderValue]) || 0; + const deliveryCharge2 = (isFlashDelivery ? constants2[CONST_KEYS.flashDeliveryCharge] : constants2[CONST_KEYS.deliveryCharge]) || 0; + const orderGroupId = `${Date.now()}-${userId}`; + const address = await getAddressByIdAndUser(addressId, userId); + if (!address) { + throw new ApiError("Invalid address", 400); + } + const ordersBySlot = /* @__PURE__ */ new Map(); + for (const item of selectedItems) { + const product = await getProductById4(item.productId); + if (!product) { + throw new ApiError(`Product ${item.productId} not found`, 400); + } + if (!ordersBySlot.has(item.slotId)) { + ordersBySlot.set(item.slotId, []); + } + ordersBySlot.get(item.slotId).push({ ...item, product }); + } + if (params.isFlash) { + for (const item of selectedItems) { + const product = await getProductById4(item.productId); + if (!product?.isFlashAvailable) { + throw new ApiError(`Product ${item.productId} is not available for flash delivery`, 400); + } + } + } + let totalAmount = 0; + for (const [slotId, items] of ordersBySlot) { + const orderTotal = items.reduce( + (sum2, item) => { + if (!item.product) + return sum2; + const basePrice = params.isFlash ? item.product.flashPrice ?? item.product.price : item.product.price; + const itemPrice = parseFloat((basePrice ?? 0).toString()); + return sum2 + itemPrice * item.quantity; + }, + 0 + ); + totalAmount += orderTotal; + } + const appliedCoupon = await validateAndGetCoupon(couponId, userId, totalAmount); + const expectedDeliveryCharge = totalAmount < minOrderValue2 ? deliveryCharge2 : 0; + const totalWithDelivery = totalAmount + expectedDeliveryCharge; + const ordersData = []; + let isFirstOrder = true; + for (const [slotId, items] of ordersBySlot) { + const subOrderTotal = items.reduce( + (sum2, item) => { + if (!item.product) + return sum2; + const basePrice = params.isFlash ? item.product.flashPrice ?? item.product.price : item.product.price; + const itemPrice = parseFloat((basePrice ?? 0).toString()); + return sum2 + itemPrice * item.quantity; + }, + 0 + ); + const subOrderTotalWithDelivery = subOrderTotal + expectedDeliveryCharge; + const orderGroupProportion = subOrderTotal / totalAmount; + const orderTotalAmount = isFirstOrder ? subOrderTotalWithDelivery : subOrderTotal; + const { finalOrderTotal: finalOrderAmount } = applyDiscountToOrder( + orderTotalAmount, + appliedCoupon, + orderGroupProportion + ); + const order = { + userId, + addressId, + slotId: params.isFlash ? null : slotId, + isCod: paymentMethod === "cod", + isOnlinePayment: paymentMethod === "online", + paymentInfoId: null, + totalAmount: finalOrderAmount.toString(), + deliveryCharge: isFirstOrder ? expectedDeliveryCharge.toString() : "0", + readableId: -1, + userNotes: userNotes || null, + orderGroupId, + orderGroupProportion: orderGroupProportion.toString(), + isFlashDelivery: params.isFlash + }; + const validItems = items.filter( + (item) => item.product !== null && item.product !== void 0 + ); + const orderItemsData = validItems.map( + (item) => { + const basePrice = params.isFlash ? item.product.flashPrice ?? item.product.price : item.product.price; + const priceString = (basePrice ?? 0).toString(); + return { + orderId: 0, + productId: item.productId, + quantity: item.quantity.toString(), + price: priceString, + discountedPrice: priceString + }; + } + ); + const orderStatusData = { + userId, + orderId: 0, + paymentStatus: paymentMethod === "cod" ? "cod" : "pending" + }; + ordersData.push({ order, orderItems: orderItemsData, orderStatus: orderStatusData }); + isFirstOrder = false; + } + const createdOrders = await placeOrderTransaction({ + userId, + ordersData, + paymentMethod, + totalWithDelivery + }); + await deleteCartItemsForOrder( + userId, + selectedItems.map((item) => item.productId) + ); + if (appliedCoupon && createdOrders.length > 0) { + await recordCouponUsage( + userId, + appliedCoupon.id, + createdOrders[0].id + ); + } + for (const order of createdOrders) { + sendOrderPlacedNotification(userId, order.id.toString()); + } + await publishFormattedOrder(createdOrders, ordersBySlot); + return { success: true, data: createdOrders }; + }, "placeOrderUtil"); + orderRouter2 = router2({ + placeOrder: protectedProcedure.input( + external_exports.object({ + selectedItems: external_exports.array( + external_exports.object({ + productId: external_exports.number().int().positive(), + quantity: external_exports.number().int().positive(), + slotId: external_exports.union([external_exports.number().int(), external_exports.null()]) + }) + ), + addressId: external_exports.number().int().positive(), + paymentMethod: external_exports.enum(["online", "cod"]), + couponId: external_exports.number().int().positive().optional(), + userNotes: external_exports.string().optional(), + isFlashDelivery: external_exports.boolean().optional().default(false) + }) + ).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const isSuspended = await checkUserSuspended(userId); + if (isSuspended) { + throw new ApiError("Unable to place order", 403); + } + const { + selectedItems, + addressId, + paymentMethod, + couponId, + userNotes, + isFlashDelivery + } = input; + if (isFlashDelivery) { + const isFlashDeliveryEnabled = await getConstant(CONST_KEYS.isFlashDeliveryEnabled); + if (!isFlashDeliveryEnabled) { + throw new ApiError("Flash delivery is currently unavailable. Please opt for scheduled delivery.", 403); + } + } + if (!isFlashDelivery) { + const slotIds = [...new Set(selectedItems.filter((i2) => i2.slotId !== null).map((i2) => i2.slotId))]; + for (const slotId of slotIds) { + const isCapacityFull = await getSlotCapacityStatus(slotId); + if (isCapacityFull) { + throw new ApiError("Selected delivery slot is at full capacity. Please choose another slot.", 403); + } + } + } + let processedItems = selectedItems; + if (isFlashDelivery) { + processedItems = selectedItems.map((item) => ({ + ...item, + slotId: null + })); + } + return await placeOrderUtil({ + userId, + selectedItems: processedItems, + addressId, + paymentMethod, + couponId, + userNotes, + isFlash: isFlashDelivery + }); + }), + getOrders: protectedProcedure.input( + external_exports.object({ + page: external_exports.number().min(1).default(1), + pageSize: external_exports.number().min(1).max(50).default(10) + }).optional() + ).query(async ({ input, ctx }) => { + const { page = 1, pageSize = 10 } = input || {}; + const userId = ctx.user.userId; + const offset = (page - 1) * pageSize; + const totalCount = await getOrderCount(userId); + const userOrders = await getOrdersWithRelations(userId, offset, pageSize); + const mappedOrders = await Promise.all( + userOrders.map(async (order) => { + const status = order.orderStatus[0]; + const refund = order.refunds[0]; + let deliveryStatus; + let orderStatus3; + const allItemsPackaged = order.orderItems.every( + (item) => item.is_packaged + ); + if (status?.isCancelled) { + deliveryStatus = "cancelled"; + orderStatus3 = "cancelled"; + } else if (status?.isDelivered) { + deliveryStatus = "success"; + orderStatus3 = "success"; + } else if (allItemsPackaged) { + deliveryStatus = "packaged"; + orderStatus3 = "success"; + } else { + deliveryStatus = "pending"; + orderStatus3 = "success"; + } + const paymentMode = order.isCod ? "CoD" : "Online"; + const paymentStatus = status?.paymentStatus || "pending"; + const refundStatus = refund?.refundStatus || "none"; + const refundAmount = refund?.refundAmount ? parseFloat(refund.refundAmount.toString()) : null; + const items = await Promise.all( + order.orderItems.map(async (item) => { + const signedImages = item.product.images ? scaffoldAssetUrl( + item.product.images + ) : []; + return { + productName: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat(item.price.toString()), + discountedPrice: parseFloat( + item.discountedPrice?.toString() || item.price.toString() + ), + amount: parseFloat(item.price.toString()) * parseFloat(item.quantity), + image: signedImages[0] || null + }; + }) + ); + return { + id: order.id, + orderId: `ORD${order.id}`, + orderDate: toApiDate2(order.createdAt), + deliveryStatus, + deliveryDate: toApiDate2(order.slot?.deliveryTime) || void 0, + orderStatus: orderStatus3, + cancelReason: status?.cancelReason || null, + paymentMode, + totalAmount: Number(order.totalAmount), + deliveryCharge: Number(order.deliveryCharge), + paymentStatus, + refundStatus, + refundAmount, + userNotes: order.userNotes || null, + items, + isFlashDelivery: order.isFlashDelivery, + createdAt: toApiDate2(order.createdAt) + }; + }) + ); + return { + success: true, + data: mappedOrders, + pagination: { + page, + pageSize, + totalCount, + totalPages: Math.ceil(totalCount / pageSize) + } + }; + }), + getOrderById: protectedProcedure.input(external_exports.object({ orderId: external_exports.string() })).query(async ({ input, ctx }) => { + const { orderId } = input; + const userId = ctx.user.userId; + const order = await getOrderByIdWithRelations(parseInt(orderId), userId); + if (!order) { + throw new Error("Order not found"); + } + const couponUsageData = await getCouponUsageForOrder(order.id); + let couponData = null; + if (couponUsageData.length > 0) { + let totalDiscountAmount = 0; + const orderTotal = parseFloat(order.totalAmount.toString()); + for (const usage of couponUsageData) { + let discountAmount = 0; + if (usage.coupon.discountPercent) { + discountAmount = orderTotal * parseFloat(usage.coupon.discountPercent.toString()) / 100; + } else if (usage.coupon.flatDiscount) { + discountAmount = parseFloat(usage.coupon.flatDiscount.toString()); + } + if (usage.coupon.maxValue && discountAmount > parseFloat(usage.coupon.maxValue.toString())) { + discountAmount = parseFloat(usage.coupon.maxValue.toString()); + } + totalDiscountAmount += discountAmount; + } + couponData = { + couponCode: couponUsageData.map((u5) => u5.coupon.couponCode).join(", "), + couponDescription: `${couponUsageData.length} coupons applied`, + discountAmount: totalDiscountAmount + }; + } + const status = order.orderStatus[0]; + const refund = order.refunds[0]; + let deliveryStatus; + let orderStatusResult; + const allItemsPackaged = order.orderItems.every( + (item) => item.is_packaged + ); + if (status?.isCancelled) { + deliveryStatus = "cancelled"; + orderStatusResult = "cancelled"; + } else if (status?.isDelivered) { + deliveryStatus = "success"; + orderStatusResult = "success"; + } else if (allItemsPackaged) { + deliveryStatus = "packaged"; + orderStatusResult = "success"; + } else { + deliveryStatus = "pending"; + orderStatusResult = "success"; + } + const paymentMode = order.isCod ? "CoD" : "Online"; + const paymentStatus = status?.paymentStatus || "pending"; + const refundStatus = refund?.refundStatus || "none"; + const refundAmount = refund?.refundAmount ? parseFloat(refund.refundAmount.toString()) : null; + const items = await Promise.all( + order.orderItems.map(async (item) => { + const signedImages = item.product.images ? scaffoldAssetUrl( + item.product.images + ) : []; + return { + productName: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat(item.price.toString()), + discountedPrice: parseFloat( + item.discountedPrice?.toString() || item.price.toString() + ), + amount: parseFloat(item.price.toString()) * parseFloat(item.quantity), + image: signedImages[0] || null + }; + }) + ); + return { + id: order.id, + orderId: `ORD${order.id}`, + orderDate: toApiDate2(order.createdAt), + deliveryStatus, + deliveryDate: toApiDate2(order.slot?.deliveryTime) || void 0, + orderStatus: orderStatusResult, + cancellationStatus: orderStatusResult, + cancelReason: status?.cancelReason || null, + paymentMode, + paymentStatus, + refundStatus, + refundAmount, + userNotes: order.userNotes || null, + items, + couponCode: couponData?.couponCode || null, + couponDescription: couponData?.couponDescription || null, + discountAmount: couponData?.discountAmount || null, + orderAmount: parseFloat(order.totalAmount.toString()), + isFlashDelivery: order.isFlashDelivery, + createdAt: toApiDate2(order.createdAt), + totalAmount: parseFloat(order.totalAmount.toString()), + deliveryCharge: parseFloat(order.deliveryCharge.toString()) + }; + }), + cancelOrder: protectedProcedure.input( + external_exports.object({ + id: external_exports.number(), + reason: external_exports.string().min(1, "Cancellation reason is required") + }) + ).mutation(async ({ input, ctx }) => { + try { + const userId = ctx.user.userId; + const { id, reason } = input; + const order = await getOrderBasic(id); + if (!order) { + console.error("Order not found:", id); + throw new ApiError("Order not found", 404); + } + if (order.userId !== userId) { + console.error("Order does not belong to user:", { + orderId: id, + orderUserId: order.userId, + requestUserId: userId + }); + throw new ApiError("Order not found", 404); + } + const status = order.orderStatus[0]; + if (!status) { + console.error("Order status not found for order:", id); + throw new ApiError("Order status not found", 400); + } + if (status.isCancelled) { + console.error("Order is already cancelled:", id); + throw new ApiError("Order is already cancelled", 400); + } + if (status.isDelivered) { + console.error("Cannot cancel delivered order:", id); + throw new ApiError("Cannot cancel delivered order", 400); + } + await cancelOrderTransaction(id, status.id, reason, order.isCod); + await sendOrderCancelledNotification(userId, id.toString()); + await publishCancellation(id, "user", reason); + return { success: true, message: "Order cancelled successfully" }; + } catch (e2) { + console.log(e2); + throw new ApiError("failed to cancel order"); + } + }), + updateUserNotes: protectedProcedure.input( + external_exports.object({ + id: external_exports.number(), + userNotes: external_exports.string() + }) + ).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { id, userNotes } = input; + const order = await getOrderBasic(id); + if (!order) { + console.error("Order not found:", id); + throw new ApiError("Order not found", 404); + } + if (order.userId !== userId) { + console.error("Order does not belong to user:", { + orderId: id, + orderUserId: order.userId, + requestUserId: userId + }); + throw new ApiError("Order not found", 404); + } + const status = order.orderStatus[0]; + if (!status) { + console.error("Order status not found for order:", id); + throw new ApiError("Order status not found", 400); + } + if (status.isDelivered) { + console.error("Cannot update notes for delivered order:", id); + throw new ApiError("Cannot update notes for delivered order", 400); + } + if (status.isCancelled) { + console.error("Cannot update notes for cancelled order:", id); + throw new ApiError("Cannot update notes for cancelled order", 400); + } + await updateOrderNotes2(id, userNotes); + return { success: true, message: "Notes updated successfully" }; + }), + getRecentlyOrderedProducts: protectedProcedure.input( + external_exports.object({ + limit: external_exports.number().min(1).max(50).default(20) + }).optional() + ).query(async ({ input, ctx }) => { + const { limit = 20 } = input || {}; + const userId = ctx.user.userId; + const thirtyDaysAgo = /* @__PURE__ */ new Date(); + thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30); + const recentOrderIds = await getRecentlyDeliveredOrderIds(userId, 10, thirtyDaysAgo); + if (recentOrderIds.length === 0) { + return { success: true, products: [] }; + } + const productIds = await getProductIdsFromOrders(recentOrderIds); + if (productIds.length === 0) { + return { success: true, products: [] }; + } + const productsWithUnits = await getProductsForRecentOrders(productIds, limit); + const formattedProducts = await Promise.all( + productsWithUnits.map(async (product) => { + const nextDeliveryDate = await getNextDeliveryDate(product.id); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + price: product.price, + unit: product.unitShortNotation, + incrementStep: product.incrementStep, + isOutOfStock: product.isOutOfStock, + nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null, + images: scaffoldAssetUrl( + product.images || [] + ) + }; + }) + ); + return { + success: true, + products: formattedProducts + }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/product.ts +var import_dayjs4, signProductImages, productRouter2; +var init_product4 = __esm({ + "src/trpc/apis/user-apis/apis/product.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_s3_client(); + init_api_error(); + init_product_store(); + import_dayjs4 = __toESM(require_dayjs_min()); + init_dbService(); + signProductImages = /* @__PURE__ */ __name((product) => ({ + ...product, + images: scaffoldAssetUrl(product.images || []) + }), "signProductImages"); + productRouter2 = router2({ + getProductDetails: publicProcedure.input(external_exports.object({ + id: external_exports.string().regex(/^\d+$/, "Invalid product ID") + })).query(async ({ input }) => { + const { id } = input; + const productId = parseInt(id); + if (isNaN(productId)) { + throw new Error("Invalid product ID"); + } + console.log("from the api to get product details"); + const cachedProduct = await getProductById5(productId); + if (cachedProduct) { + const currentTime = /* @__PURE__ */ new Date(); + const filteredSlots = cachedProduct.deliverySlots.filter( + (slot) => (0, import_dayjs4.default)(slot.freezeTime).isAfter(currentTime) && !slot.isCapacityFull + ); + return { + ...cachedProduct, + deliverySlots: filteredSlots + }; + } + const productData = await getProductDetailById(productId); + if (!productData) { + throw new Error("Product not found"); + } + return signProductImages(productData); + }), + getProductReviews: publicProcedure.input(external_exports.object({ + productId: external_exports.number().int().positive(), + limit: external_exports.number().int().min(1).max(50).optional().default(10), + offset: external_exports.number().int().min(0).optional().default(0) + })).query(async ({ input }) => { + const { productId, limit, offset } = input; + const { reviews, totalCount } = await getProductReviews2(productId, limit, offset); + const reviewsWithSignedUrls = reviews.map((review) => ({ + ...review, + signedImageUrls: scaffoldAssetUrl(review.imageUrls || []) + })); + const hasMore = offset + limit < totalCount; + return { reviews: reviewsWithSignedUrls, hasMore }; + }), + createReview: protectedProcedure.input(external_exports.object({ + productId: external_exports.number().int().positive(), + reviewBody: external_exports.string().min(1, "Review body is required"), + ratings: external_exports.number().int().min(1).max(5), + imageUrls: external_exports.array(external_exports.string()).optional().default([]), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]) + })).mutation(async ({ input, ctx }) => { + const { productId, reviewBody, ratings, imageUrls, uploadUrls } = input; + const userId = ctx.user.userId; + const product = await getProductById3(productId); + if (!product) { + throw new ApiError("Product not found", 404); + } + const imageKeys = uploadUrls.map((item) => extractKeyFromPresignedUrl(item)); + const newReview = await createProductReview(userId, productId, reviewBody, ratings, imageKeys); + if (uploadUrls && uploadUrls.length > 0) { + try { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } catch (error50) { + console.error("Error claiming upload URLs:", error50); + } + } + return { success: true, review: newReview }; + }), + getAllProductsSummary: publicProcedure.query(async () => { + const allCachedProducts = await getAllProducts2(); + const transformedProducts = allCachedProducts.map((product) => ({ + ...product, + images: product.images || [], + deliverySlots: [], + specialDeals: [] + })); + return transformedProducts; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/user.ts +var userRouter2; +var init_user4 = __esm({ + "src/trpc/apis/user-apis/apis/user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_env_exporter(); + init_s3_client(); + init_dbService(); + userRouter2 = router2({ + getSelfData: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const user = await getUserById2(userId); + if (!user) { + throw new ApiError("User not found", 404); + } + const userDetail = await getUserDetailByUserId(userId); + const profileImageSignedUrl = userDetail?.profileImage ? await generateSignedUrlFromS3Url(userDetail.profileImage) : null; + return { + success: true, + data: { + user: { + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile, + profileImage: profileImageSignedUrl, + bio: userDetail?.bio || null, + dateOfBirth: userDetail?.dateOfBirth ? new Date(userDetail.dateOfBirth).toISOString() : null, + gender: userDetail?.gender || null, + occupation: userDetail?.occupation || null + } + } + }; + }), + checkProfileComplete: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const result = await getUserWithCreds(userId); + if (!result) { + throw new ApiError("User not found", 404); + } + return { + isComplete: !!(result.user.name && result.user.email && result.creds) + }; + }), + savePushToken: publicProcedure.input(external_exports.object({ token: external_exports.string() })).mutation(async ({ input, ctx }) => { + const { token } = input; + const userId = ctx.user?.userId; + if (userId) { + await upsertNotifCred(userId, token); + await deleteUnloggedToken(token); + } else { + const existing = await getUnloggedToken(token); + if (existing) { + await upsertUnloggedToken(token); + } else { + await upsertUnloggedToken(token); + } + } + return { success: true }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/coupon.ts +var generateCouponDescription, userCouponRouter; +var init_coupon4 = __esm({ + "src/trpc/apis/user-apis/apis/coupon.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_dbService(); + generateCouponDescription = /* @__PURE__ */ __name((coupon) => { + let desc2 = ""; + if (coupon.discountPercent) { + desc2 += `${coupon.discountPercent}% off`; + } else if (coupon.flatDiscount) { + desc2 += `\u20B9${coupon.flatDiscount} off`; + } + if (coupon.minOrder) { + desc2 += ` on orders above \u20B9${coupon.minOrder}`; + } + if (coupon.maxValue) { + desc2 += ` (max discount \u20B9${coupon.maxValue})`; + } + return desc2; + }, "generateCouponDescription"); + userCouponRouter = router2({ + getEligible: protectedProcedure.query(async ({ ctx }) => { + try { + const userId = ctx.user.userId; + const allCoupons = await getActiveCouponsWithRelations(userId); + const applicableCoupons = allCoupons.filter((coupon) => { + if (!coupon.isUserBased) + return true; + const applicableUsers = coupon.applicableUsers || []; + return applicableUsers.some((au2) => au2.userId === userId); + }); + return { success: true, data: applicableCoupons }; + } catch (e2) { + console.log(e2); + throw new ApiError("Unable to get coupons"); + } + }), + getProductCoupons: protectedProcedure.input(external_exports.object({ productId: external_exports.number().int().positive() })).query(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { productId } = input; + const allCoupons = await getActiveCouponsWithRelations(userId); + const applicableCoupons = allCoupons.filter((coupon) => { + const applicableUsers = coupon.applicableUsers || []; + const userApplicable = !coupon.isUserBased || applicableUsers.some((au2) => au2.userId === userId); + const applicableProducts = coupon.applicableProducts || []; + const productApplicable = applicableProducts.length === 0 || applicableProducts.some((ap2) => ap2.productId === productId); + return userApplicable && productApplicable; + }); + return { success: true, data: applicableCoupons }; + }), + getMyCoupons: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + const allCoupons = await getAllCouponsWithRelations(userId); + const applicableCoupons = allCoupons.filter((coupon) => { + const isNotInvalidated = !coupon.isInvalidated; + const applicableUsers = coupon.applicableUsers || []; + const isApplicable = coupon.isApplyForAll || applicableUsers.some((au2) => au2.userId === userId); + const isNotExpired = !coupon.validTill || new Date(coupon.validTill) > /* @__PURE__ */ new Date(); + return isNotInvalidated && isApplicable && isNotExpired; + }); + const personalCoupons = []; + const generalCoupons = []; + applicableCoupons.forEach((coupon) => { + const usageCount = coupon.usages.length; + const isExpired = false; + const isUsedUp = Boolean(coupon.maxLimitForUser && usageCount >= coupon.maxLimitForUser); + const couponDisplay = { + id: coupon.id, + code: coupon.couponCode, + discountType: coupon.discountPercent ? "percentage" : "flat", + discountValue: parseFloat(coupon.discountPercent || coupon.flatDiscount || "0"), + maxValue: coupon.maxValue ? parseFloat(coupon.maxValue) : void 0, + minOrder: coupon.minOrder ? parseFloat(coupon.minOrder) : void 0, + description: generateCouponDescription(coupon), + validTill: coupon.validTill ? new Date(coupon.validTill) : void 0, + usageCount, + maxLimitForUser: coupon.maxLimitForUser ? parseInt(coupon.maxLimitForUser.toString()) : void 0, + isExpired, + isUsedUp + }; + if ((coupon.applicableUsers || []).some((au2) => au2.userId === userId) && !coupon.isApplyForAll) { + personalCoupons.push(couponDisplay); + } else if (coupon.isApplyForAll) { + generalCoupons.push(couponDisplay); + } + }); + return { + success: true, + data: { + personal: personalCoupons, + general: generalCoupons + } + }; + }), + redeemReservedCoupon: protectedProcedure.input(external_exports.object({ secretCode: external_exports.string() })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { secretCode } = input; + const reservedCoupon = await getReservedCouponByCode(secretCode); + if (!reservedCoupon) { + throw new ApiError("Invalid or already redeemed coupon code", 400); + } + if (reservedCoupon.redeemedBy === userId) { + throw new ApiError("You have already redeemed this coupon", 400); + } + const couponResult = await redeemReservedCoupon(userId, reservedCoupon); + return { success: true, coupon: couponResult }; + }) + }); + } +}); + +// src/lib/payments-utils.ts +var RazorpayPaymentService; +var init_payments_utils = __esm({ + "src/lib/payments-utils.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + RazorpayPaymentService = class { + // private static instance = new Razorpay({ + // key_id: razorpayId, + // key_secret: razorpaySecret, + // }); + // + static async createOrder(orderId, amount) { + } + static async insertPaymentRecord(orderId, razorpayOrder, tx) { + } + static async initiateRefund(paymentId, amount) { + } + static async fetchRefund(refundId) { + } + }; + __name(RazorpayPaymentService, "RazorpayPaymentService"); + } +}); + +// src/trpc/apis/user-apis/apis/payments.ts +var paymentRouter; +var init_payments3 = __esm({ + "src/trpc/apis/user-apis/apis/payments.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_crypto3(); + init_env_exporter(); + init_payments_utils(); + init_dbService(); + paymentRouter = router2({ + createRazorpayOrder: protectedProcedure.input(external_exports.object({ + orderId: external_exports.string() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { orderId } = input; + const order = await getOrderById(parseInt(orderId)); + if (!order) { + throw new ApiError("Order not found", 404); + } + if (order.userId !== userId) { + throw new ApiError("Order does not belong to user", 403); + } + const existingPayment = await getPaymentByOrderId(parseInt(orderId)); + if (existingPayment && existingPayment.status === "pending") { + return { + razorpayOrderId: existingPayment.merchantOrderId, + key: razorpayId + }; + } + if (order.totalAmount === null) { + throw new ApiError("Order total is missing", 400); + } + const razorpayOrder = await RazorpayPaymentService.createOrder(parseInt(orderId), order.totalAmount); + await RazorpayPaymentService.insertPaymentRecord(parseInt(orderId), razorpayOrder); + return { + razorpayOrderId: 0, + key: razorpayId + }; + }), + verifyPayment: protectedProcedure.input(external_exports.object({ + razorpay_payment_id: external_exports.string(), + razorpay_order_id: external_exports.string(), + razorpay_signature: external_exports.string() + })).mutation(async ({ input, ctx }) => { + const { razorpay_payment_id, razorpay_order_id, razorpay_signature } = input; + const expectedSignature = crypto_default.createHmac("sha256", razorpaySecret).update(razorpay_order_id + "|" + razorpay_payment_id).digest("hex"); + if (expectedSignature !== razorpay_signature) { + throw new ApiError("Invalid payment signature", 400); + } + const currentPayment = await getPaymentByMerchantOrderId(razorpay_order_id); + if (!currentPayment) { + throw new ApiError("Payment record not found", 404); + } + const updatedPayload = { + ...currentPayment.payload || {}, + payment_id: razorpay_payment_id, + signature: razorpay_signature + }; + const updatedPayment = await updatePaymentSuccess(razorpay_order_id, updatedPayload); + if (!updatedPayment) { + throw new ApiError("Payment record not found", 404); + } + await updateOrderPaymentStatus(updatedPayment.orderId, "success"); + return { + success: true, + message: "Payment verified successfully" + }; + }), + markPaymentFailed: protectedProcedure.input(external_exports.object({ + merchantOrderId: external_exports.string() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { merchantOrderId } = input; + const payment = await getPaymentByMerchantOrderId(merchantOrderId); + if (!payment) { + throw new ApiError("Payment not found", 404); + } + const order = await getOrderById(payment.orderId); + if (!order || order.userId !== userId) { + throw new ApiError("Payment does not belong to user", 403); + } + await markPaymentFailed(payment.id); + return { + success: true, + message: "Payment marked as failed" + }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/file-upload.ts +var fileUploadRouter; +var init_file_upload = __esm({ + "src/trpc/apis/user-apis/apis/file-upload.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_s3_client(); + init_api_error(); + fileUploadRouter = router2({ + generateUploadUrls: protectedProcedure.input(external_exports.object({ + contextString: external_exports.enum(["review", "product_info", "notification", "complaint", "profile", "tags"]), + mimeTypes: external_exports.array(external_exports.string()) + })).mutation(async ({ input }) => { + const { contextString, mimeTypes } = input; + const uploadUrls = []; + const keys = []; + for (const mimeType of mimeTypes) { + let folder; + if (contextString === "review") { + folder = "review-images"; + } else if (contextString === "product_info") { + folder = "product-images"; + } else if (contextString === "notification") { + folder = "notification-images"; + } else if (contextString === "complaint") { + folder = "complaint-images"; + } else if (contextString === "profile") { + folder = "profile-images"; + } else if (contextString === "tags") { + folder = "tags"; + } else { + folder = ""; + } + const extension = mimeType === "image/jpeg" ? ".jpg" : mimeType === "image/png" ? ".png" : mimeType === "image/gif" ? ".gif" : ".jpg"; + const key = `${folder}/${Date.now()}${extension}`; + try { + const uploadUrl = await generateUploadUrl(key, mimeType); + uploadUrls.push(uploadUrl); + keys.push(key); + } catch (error50) { + console.error("Error generating upload URL:", error50); + throw new ApiError("Failed to generate upload URL", 500); + } + } + return { uploadUrls }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/tags.ts +var tagsRouter; +var init_tags = __esm({ + "src/trpc/apis/user-apis/apis/tags.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_product_tag_store(); + tagsRouter = router2({ + getTagsByStore: publicProcedure.input(external_exports.object({ + storeId: external_exports.number() + })).query(async ({ input }) => { + const { storeId } = input; + const tags = await getTagsByStoreId(storeId); + return { + tags: tags.map((tag2) => ({ + id: tag2.id, + tagName: tag2.tagName, + tagDescription: tag2.tagDescription, + imageUrl: tag2.imageUrl, + productIds: tag2.productIds + })) + }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/user-trpc-index.ts +var userRouter3; +var init_user_trpc_index = __esm({ + "src/trpc/apis/user-apis/apis/user-trpc-index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_address2(); + init_auth4(); + init_banners2(); + init_cart2(); + init_complaint4(); + init_order4(); + init_product4(); + init_slots3(); + init_user4(); + init_coupon4(); + init_payments3(); + init_stores2(); + init_file_upload(); + init_tags(); + userRouter3 = router2({ + address: addressRouter, + auth: authRouter, + banner: bannerRouter, + cart: cartRouter, + complaint: complaintRouter2, + order: orderRouter2, + product: productRouter2, + slots: slotsRouter, + user: userRouter2, + coupon: userCouponRouter, + payment: paymentRouter, + stores: storesRouter, + fileUpload: fileUploadRouter, + tags: tagsRouter + }); + } +}); + +// src/trpc/router.ts +var appRouter; +var init_router5 = __esm({ + "src/trpc/router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_admin_trpc_index(); + init_user_trpc_index(); + init_common_trpc_index(); + appRouter = router2({ + hello: publicProcedure.input(external_exports.object({ name: external_exports.string() })).query(({ input }) => { + return { greeting: `Hello ${input.name}!` }; + }), + admin: adminRouter, + user: userRouter3, + common: commonApiRouter + }); + } +}); + +// src/app.ts +var app_exports = {}; +__export(app_exports, { + createApp: () => createApp +}); +var createApp; +var init_app = __esm({ + "src/app.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_cors(); + init_logger(); + init_dist2(); + init_dbService(); + init_main_router(); + init_router5(); + init_dist3(); + init_webapi(); + init_env_exporter(); + createApp = /* @__PURE__ */ __name(() => { + const app = new Hono2(); + app.use(cors({ + origin: "http://localhost:5174", + allowMethods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], + allowHeaders: ["Origin", "X-Requested-With", "Content-Type", "Accept", "Authorization"], + credentials: true + })); + app.use(logger()); + app.use("/api/trpc/*", trpcServer({ + router: appRouter, + createContext: async ({ req }) => { + let user = null; + let staffUser = null; + const authHeader = req.headers.get("authorization"); + if (authHeader?.startsWith("Bearer ")) { + const token = authHeader.substring(7); + try { + const { payload } = await jwtVerify(token, getEncodedJwtSecret()); + const decoded = payload; + if (decoded.staffId) { + const staff = await getStaffUserById(decoded.staffId); + if (staff) { + user = staffUser; + staffUser = { + id: staff.id, + name: staff.name + }; + } + } else { + user = decoded; + const suspended = await isUserSuspended(user.userId); + if (suspended) { + throw new TRPCError({ + code: "FORBIDDEN", + message: "Account suspended" + }); + } + } + } catch (err) { + } + } + return { req, user, staffUser }; + }, + onError({ error: error50, path, type, ctx }) { + console.error("\u{1F6A8} tRPC Error :", { + path, + type, + code: error50.code, + message: error50.message, + userId: ctx?.user?.userId, + stack: error50.stack + }); + } + })); + app.route("/api", main_router_default); + app.onError((err, c2) => { + console.error(err); + let status = 500; + let message2 = "Internal Server Error"; + if (err instanceof TRPCError) { + const trpcStatusMap = { + BAD_REQUEST: 400, + UNAUTHORIZED: 401, + FORBIDDEN: 403, + NOT_FOUND: 404, + TIMEOUT: 408, + CONFLICT: 409, + PRECONDITION_FAILED: 412, + PAYLOAD_TOO_LARGE: 413, + METHOD_NOT_SUPPORTED: 405, + UNPROCESSABLE_CONTENT: 422, + TOO_MANY_REQUESTS: 429, + INTERNAL_SERVER_ERROR: 500 + }; + status = trpcStatusMap[err.code] || 500; + message2 = err.message; + } else if (err.statusCode) { + status = err.statusCode; + message2 = err.message; + } else if (err.status) { + status = err.status; + message2 = err.message; + } else if (err.message) { + message2 = err.message; + } + return c2.json({ message: message2 }, status); + }); + return app; + }, "createApp"); + } +}); + +// .wrangler/tmp/bundle-GYbPT2/middleware-loader.entry.ts +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// .wrangler/tmp/bundle-GYbPT2/middleware-insertion-facade.js +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// worker.ts +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var worker_default = { + async fetch(request, env2, ctx) { + ; + globalThis.ENV = env2; + const { createApp: createApp2 } = await Promise.resolve().then(() => (init_app(), app_exports)); + const { initDb: initDb2 } = await Promise.resolve().then(() => (init_dbService(), dbService_exports)); + if (env2.DB) { + initDb2(env2.DB); + } + const app = createApp2(); + return app.fetch(request, env2, ctx); + } +}; + +// ../../node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var drainBody = /* @__PURE__ */ __name(async (request, env2, _ctx, middlewareCtx) => { + try { + return await middlewareCtx.next(request, env2); + } finally { + try { + if (request.body !== null && !request.bodyUsed) { + const reader = request.body.getReader(); + while (!(await reader.read()).done) { + } + } + } catch (e2) { + console.error("Failed to drain the unused request body.", e2); + } + } +}, "drainBody"); +var middleware_ensure_req_body_drained_default = drainBody; + +// ../../node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function reduceError(e2) { + return { + name: e2?.name, + message: e2?.message ?? String(e2), + stack: e2?.stack, + cause: e2?.cause === void 0 ? void 0 : reduceError(e2.cause) + }; +} +__name(reduceError, "reduceError"); +var jsonError = /* @__PURE__ */ __name(async (request, env2, _ctx, middlewareCtx) => { + try { + return await middlewareCtx.next(request, env2); + } catch (e2) { + const error50 = reduceError(e2); + return Response.json(error50, { + status: 500, + headers: { "MF-Experimental-Error-Stack": "true" } + }); + } +}, "jsonError"); +var middleware_miniflare3_json_error_default = jsonError; + +// .wrangler/tmp/bundle-GYbPT2/middleware-insertion-facade.js +var __INTERNAL_WRANGLER_MIDDLEWARE__ = [ + middleware_ensure_req_body_drained_default, + middleware_miniflare3_json_error_default +]; +var middleware_insertion_facade_default = worker_default; + +// ../../node_modules/wrangler/templates/middleware/common.ts +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var __facade_middleware__ = []; +function __facade_register__(...args) { + __facade_middleware__.push(...args.flat()); +} +__name(__facade_register__, "__facade_register__"); +function __facade_invokeChain__(request, env2, ctx, dispatch, middlewareChain) { + const [head, ...tail] = middlewareChain; + const middlewareCtx = { + dispatch, + next(newRequest, newEnv) { + return __facade_invokeChain__(newRequest, newEnv, ctx, dispatch, tail); + } + }; + return head(request, env2, ctx, middlewareCtx); +} +__name(__facade_invokeChain__, "__facade_invokeChain__"); +function __facade_invoke__(request, env2, ctx, dispatch, finalMiddleware) { + return __facade_invokeChain__(request, env2, ctx, dispatch, [ + ...__facade_middleware__, + finalMiddleware + ]); +} +__name(__facade_invoke__, "__facade_invoke__"); + +// .wrangler/tmp/bundle-GYbPT2/middleware-loader.entry.ts +var __Facade_ScheduledController__ = class { + constructor(scheduledTime, cron, noRetry) { + this.scheduledTime = scheduledTime; + this.cron = cron; + this.#noRetry = noRetry; + } + #noRetry; + noRetry() { + if (!(this instanceof __Facade_ScheduledController__)) { + throw new TypeError("Illegal invocation"); + } + this.#noRetry(); + } +}; +__name(__Facade_ScheduledController__, "__Facade_ScheduledController__"); +function wrapExportedHandler(worker) { + if (__INTERNAL_WRANGLER_MIDDLEWARE__ === void 0 || __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0) { + return worker; + } + for (const middleware2 of __INTERNAL_WRANGLER_MIDDLEWARE__) { + __facade_register__(middleware2); + } + const fetchDispatcher = /* @__PURE__ */ __name(function(request, env2, ctx) { + if (worker.fetch === void 0) { + throw new Error("Handler does not export a fetch() function."); + } + return worker.fetch(request, env2, ctx); + }, "fetchDispatcher"); + return { + ...worker, + fetch(request, env2, ctx) { + const dispatcher = /* @__PURE__ */ __name(function(type, init) { + if (type === "scheduled" && worker.scheduled !== void 0) { + const controller = new __Facade_ScheduledController__( + Date.now(), + init.cron ?? "", + () => { + } + ); + return worker.scheduled(controller, env2, ctx); + } + }, "dispatcher"); + return __facade_invoke__(request, env2, ctx, dispatcher, fetchDispatcher); + } + }; +} +__name(wrapExportedHandler, "wrapExportedHandler"); +function wrapWorkerEntrypoint(klass) { + if (__INTERNAL_WRANGLER_MIDDLEWARE__ === void 0 || __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0) { + return klass; + } + for (const middleware2 of __INTERNAL_WRANGLER_MIDDLEWARE__) { + __facade_register__(middleware2); + } + return class extends klass { + #fetchDispatcher = (request, env2, ctx) => { + this.env = env2; + this.ctx = ctx; + if (super.fetch === void 0) { + throw new Error("Entrypoint class does not define a fetch() function."); + } + return super.fetch(request); + }; + #dispatcher = (type, init) => { + if (type === "scheduled" && super.scheduled !== void 0) { + const controller = new __Facade_ScheduledController__( + Date.now(), + init.cron ?? "", + () => { + } + ); + return super.scheduled(controller); + } + }; + fetch(request) { + return __facade_invoke__( + request, + this.env, + this.ctx, + this.#dispatcher, + this.#fetchDispatcher + ); + } + }; +} +__name(wrapWorkerEntrypoint, "wrapWorkerEntrypoint"); +var WRAPPED_ENTRY; +if (typeof middleware_insertion_facade_default === "object") { + WRAPPED_ENTRY = wrapExportedHandler(middleware_insertion_facade_default); +} else if (typeof middleware_insertion_facade_default === "function") { + WRAPPED_ENTRY = wrapWorkerEntrypoint(middleware_insertion_facade_default); +} +var middleware_loader_entry_default = WRAPPED_ENTRY; +export { + __INTERNAL_WRANGLER_MIDDLEWARE__, + middleware_loader_entry_default as default +}; +/*! Bundled license information: + +@trpc/server/dist/resolveResponse-CHqBlAgR.mjs: + (* istanbul ignore if -- @preserve *) + (*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + *) +*/ +//# sourceMappingURL=worker.js.map diff --git a/apps/backend/.wrangler/tmp/dev-knF4eP/worker.js.map b/apps/backend/.wrangler/tmp/dev-knF4eP/worker.js.map new file mode 100644 index 0000000..9eb963f --- /dev/null +++ b/apps/backend/.wrangler/tmp/dev-knF4eP/worker.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "sources": ["../bundle-GYbPT2/strip-cf-connecting-ip-header.js", "../../../../../node_modules/unenv/dist/runtime/_internal/utils.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/perf_hooks/performance.mjs", "../../../../../node_modules/unenv/dist/runtime/node/perf_hooks.mjs", "../../../../../node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs", "../../../../../node_modules/unenv/dist/runtime/mock/noop.mjs", "../../../../../node_modules/unenv/dist/runtime/node/console.mjs", "../../../../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs", "../../../../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-console", "../../../../../node_modules/unenv/dist/runtime/node/internal/process/hrtime.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/tty/read-stream.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/tty/write-stream.mjs", "../../../../../node_modules/unenv/dist/runtime/node/tty.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/process/process.mjs", "../../../../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs", "../../../../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-process", "wrangler-modules-watch:wrangler:modules-watch", "../../../../../node_modules/wrangler/templates/modules-watch-stub.js", "../../../../../node_modules/hono/dist/compose.js", "../../../../../node_modules/hono/dist/http-exception.js", "../../../../../node_modules/hono/dist/request/constants.js", "../../../../../node_modules/hono/dist/utils/body.js", "../../../../../node_modules/hono/dist/utils/url.js", "../../../../../node_modules/hono/dist/request.js", "../../../../../node_modules/hono/dist/utils/html.js", "../../../../../node_modules/hono/dist/context.js", "../../../../../node_modules/hono/dist/router.js", "../../../../../node_modules/hono/dist/utils/constants.js", "../../../../../node_modules/hono/dist/hono-base.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/matcher.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/node.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/trie.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/router.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/prepared-router.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/index.js", "../../../../../node_modules/hono/dist/router/smart-router/router.js", "../../../../../node_modules/hono/dist/router/smart-router/index.js", "../../../../../node_modules/hono/dist/router/trie-router/node.js", "../../../../../node_modules/hono/dist/router/trie-router/router.js", "../../../../../node_modules/hono/dist/router/trie-router/index.js", "../../../../../node_modules/hono/dist/hono.js", "../../../../../node_modules/hono/dist/index.js", "../../../../../node_modules/hono/dist/middleware/cors/index.js", "../../../../../node_modules/hono/dist/utils/color.js", "../../../../../node_modules/hono/dist/middleware/logger/index.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/utils.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/rpc/codes.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/createProxy.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/error/getErrorShape.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/error/formatter.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/error/TRPCError.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/transformer.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/router.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/tracked.ts", "../../../../../node_modules/@trpc/server/src/observable/observable.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/parseConnectionParams.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/contentType.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/abortError.ts", "../../../../../node_modules/@trpc/server/src/vendor/is-plain-object.ts", "../../../../../node_modules/@trpc/server/src/vendor/unpromise/unpromise.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/disposable.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/timerResource.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/createDeferred.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/mergeAsyncIterables.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/readableStreamFrom.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/withPing.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/jsonl.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/sse.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/resolveResponse.ts", "../../../../../node_modules/@trpc/server/src/adapters/fetch/fetchRequestHandler.ts", "../../../../../node_modules/hono/dist/helper/route/index.js", "../../../../../node_modules/@hono/trpc-server/src/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/entity.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/logger.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/table.utils.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/table.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/column.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/column-builder.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/foreign-keys.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/tracing-utils.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/unique-constraint.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/utils/array.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/columns/common.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/columns/enum.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/subquery.ts", "../../../../../packages/db_helper_sqlite/node_modules/drizzle-orm/version.js", "../../../../../packages/db_helper_sqlite/node_modules/src/tracing.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/view-common.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/sql.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/utils.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/table.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/primary-keys.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/expressions/conditions.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/expressions/select.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/expressions/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/relations.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/alias.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/selection-proxy.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/query-promise.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/foreign-keys.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/unique-constraint.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/common.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/blob.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/custom.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/integer.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/numeric.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/real.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/text.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/all.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/table.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/checks.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/indexes.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/primary-keys.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/utils.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/delete.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/casing.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/errors.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/functions/aggregate.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/functions/vector.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/functions/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/view-base.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/dialect.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/query-builders/query-builder.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/select.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/query-builder.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/insert.ts", "../../../../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.types.js", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/update.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/count.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/query.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/raw.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/db.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/cache/core/cache.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/cache/core/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/alias.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/session.ts", "../../../../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/subquery.js", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/view.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/d1/session.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/d1/driver.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/d1/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/drizzle-orm/operations.js", "../../../../../packages/db_helper_sqlite/node_modules/src/index.ts", "../../../../../packages/db_helper_sqlite/src/db/schema.ts", "../../../../../packages/db_helper_sqlite/src/db/db_index.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/banner.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/complaint.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/const.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/coupon.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/order.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/product.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/slots.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/staff-user.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/store.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/user.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/vendor-snippets.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/address.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/banners.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/cart.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/complaint.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/stores.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/product.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/slots.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/payments.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/auth.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/coupon.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/user.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/order.ts", "../../../../../packages/db_helper_sqlite/src/stores/store-helpers.ts", "../../../../../packages/db_helper_sqlite/src/lib/automated-jobs.ts", "../../../../../packages/db_helper_sqlite/src/lib/health-check.ts", "../../../../../packages/db_helper_sqlite/src/lib/delete-orders.ts", "../../../../../packages/db_helper_sqlite/src/helper_methods/upload-url.ts", "../../../../../packages/db_helper_sqlite/src/lib/seed.ts", "../../../../../packages/db_helper_sqlite/index.ts", "../../../src/sqliteImporter.ts", "../../../src/dbService.ts", "../../../../../node_modules/jose/dist/webapi/lib/buffer_utils.js", "../../../../../node_modules/jose/dist/webapi/lib/base64.js", "../../../../../node_modules/jose/dist/webapi/util/base64url.js", "../../../../../node_modules/jose/dist/webapi/lib/crypto_key.js", "../../../../../node_modules/jose/dist/webapi/lib/invalid_key_input.js", "../../../../../node_modules/jose/dist/webapi/util/errors.js", "../../../../../node_modules/jose/dist/webapi/lib/is_key_like.js", "../../../../../node_modules/jose/dist/webapi/lib/helpers.js", "../../../../../node_modules/jose/dist/webapi/lib/type_checks.js", "../../../../../node_modules/jose/dist/webapi/lib/signing.js", "../../../../../node_modules/jose/dist/webapi/lib/jwk_to_key.js", "../../../../../node_modules/jose/dist/webapi/lib/normalize_key.js", "../../../../../node_modules/jose/dist/webapi/lib/validate_crit.js", "../../../../../node_modules/jose/dist/webapi/lib/validate_algorithms.js", "../../../../../node_modules/jose/dist/webapi/lib/check_key_type.js", "../../../../../node_modules/jose/dist/webapi/jws/flattened/verify.js", "../../../../../node_modules/jose/dist/webapi/jws/compact/verify.js", "../../../../../node_modules/jose/dist/webapi/lib/jwt_claims_set.js", "../../../../../node_modules/jose/dist/webapi/jwt/verify.js", "../../../../../node_modules/jose/dist/webapi/jws/flattened/sign.js", "../../../../../node_modules/jose/dist/webapi/jws/compact/sign.js", "../../../../../node_modules/jose/dist/webapi/jwt/sign.js", "../../../../../node_modules/jose/dist/webapi/index.js", "../../../src/lib/api-error.ts", "../../../src/lib/env-exporter.ts", "../../../src/middleware/staff-auth.ts", "../../../src/apis/admin-apis/apis/av-router.ts", "../../../../../node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/extensions/index.js", "../../../../../node_modules/@smithy/types/dist-es/abort.js", "../../../../../node_modules/@smithy/types/dist-es/auth/auth.js", "../../../../../node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js", "../../../../../node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js", "../../../../../node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js", "../../../../../node_modules/@smithy/types/dist-es/auth/HttpSigner.js", "../../../../../node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js", "../../../../../node_modules/@smithy/types/dist-es/auth/index.js", "../../../../../node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js", "../../../../../node_modules/@smithy/types/dist-es/checksum.js", "../../../../../node_modules/@smithy/types/dist-es/client.js", "../../../../../node_modules/@smithy/types/dist-es/command.js", "../../../../../node_modules/@smithy/types/dist-es/connection/config.js", "../../../../../node_modules/@smithy/types/dist-es/connection/manager.js", "../../../../../node_modules/@smithy/types/dist-es/connection/pool.js", "../../../../../node_modules/@smithy/types/dist-es/connection/index.js", "../../../../../node_modules/@smithy/types/dist-es/crypto.js", "../../../../../node_modules/@smithy/types/dist-es/encode.js", "../../../../../node_modules/@smithy/types/dist-es/endpoint.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/shared.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/index.js", "../../../../../node_modules/@smithy/types/dist-es/eventStream.js", "../../../../../node_modules/@smithy/types/dist-es/extensions/checksum.js", "../../../../../node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js", "../../../../../node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js", "../../../../../node_modules/@smithy/types/dist-es/extensions/index.js", "../../../../../node_modules/@smithy/types/dist-es/feature-ids.js", "../../../../../node_modules/@smithy/types/dist-es/http.js", "../../../../../node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js", "../../../../../node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js", "../../../../../node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js", "../../../../../node_modules/@smithy/types/dist-es/identity/identity.js", "../../../../../node_modules/@smithy/types/dist-es/identity/tokenIdentity.js", "../../../../../node_modules/@smithy/types/dist-es/identity/index.js", "../../../../../node_modules/@smithy/types/dist-es/logger.js", "../../../../../node_modules/@smithy/types/dist-es/middleware.js", "../../../../../node_modules/@smithy/types/dist-es/pagination.js", "../../../../../node_modules/@smithy/types/dist-es/profile.js", "../../../../../node_modules/@smithy/types/dist-es/response.js", "../../../../../node_modules/@smithy/types/dist-es/retry.js", "../../../../../node_modules/@smithy/types/dist-es/schema/schema.js", "../../../../../node_modules/@smithy/types/dist-es/schema/traits.js", "../../../../../node_modules/@smithy/types/dist-es/schema/schema-deprecated.js", "../../../../../node_modules/@smithy/types/dist-es/schema/sentinels.js", "../../../../../node_modules/@smithy/types/dist-es/schema/static-schemas.js", "../../../../../node_modules/@smithy/types/dist-es/serde.js", "../../../../../node_modules/@smithy/types/dist-es/shapes.js", "../../../../../node_modules/@smithy/types/dist-es/signature.js", "../../../../../node_modules/@smithy/types/dist-es/stream.js", "../../../../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js", "../../../../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js", "../../../../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js", "../../../../../node_modules/@smithy/types/dist-es/transfer.js", "../../../../../node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js", "../../../../../node_modules/@smithy/types/dist-es/transform/mutable.js", "../../../../../node_modules/@smithy/types/dist-es/transform/no-undefined.js", "../../../../../node_modules/@smithy/types/dist-es/transform/type-transform.js", "../../../../../node_modules/@smithy/types/dist-es/uri.js", "../../../../../node_modules/@smithy/types/dist-es/util.js", "../../../../../node_modules/@smithy/types/dist-es/waiter.js", "../../../../../node_modules/@smithy/types/dist-es/index.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/Field.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/Fields.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/httpHandler.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/httpRequest.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/httpResponse.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/isValidHostname.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/types.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-expect-continue/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/constants.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/client/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js", "../../../../../node_modules/@smithy/core/dist-es/getSmithyContext.js", "../../../../../node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js", "../../../../../node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js", "../../../../../node_modules/@smithy/util-middleware/dist-es/index.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-signing/index.js", "../../../../../node_modules/@smithy/core/dist-es/normalizeProvider.js", "../../../../../node_modules/@smithy/core/dist-es/pagination/createPaginator.js", "../../../../../node_modules/@smithy/util-base64/dist-es/constants.browser.js", "../../../../../node_modules/@smithy/util-base64/dist-es/fromBase64.browser.js", "../../../../../node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js", "../../../../../node_modules/@smithy/util-utf8/dist-es/toUint8Array.js", "../../../../../node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js", "../../../../../node_modules/@smithy/util-utf8/dist-es/index.js", "../../../../../node_modules/@smithy/util-base64/dist-es/toBase64.browser.js", "../../../../../node_modules/@smithy/util-base64/dist-es/index.js", "../../../../../node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js", "../../../../../node_modules/@smithy/util-stream/dist-es/checksum/ChecksumStream.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/stream-type-check.js", "../../../../../node_modules/@smithy/util-stream/dist-es/checksum/createChecksumStream.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/ByteArrayCollector.js", "../../../../../node_modules/@smithy/util-stream/dist-es/createBufferedReadableStream.js", "../../../../../node_modules/@smithy/util-stream/dist-es/getAwsChunkedEncodingStream.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/headStream.browser.js", "../../../../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri.js", "../../../../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri-path.js", "../../../../../node_modules/@smithy/util-uri-escape/dist-es/index.js", "../../../../../node_modules/@smithy/querystring-builder/dist-es/index.js", "../../../../../node_modules/@smithy/fetch-http-handler/dist-es/create-request.js", "../../../../../node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js", "../../../../../node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js", "../../../../../node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js", "../../../../../node_modules/@smithy/fetch-http-handler/dist-es/index.js", "../../../../../node_modules/@smithy/util-hex-encoding/dist-es/index.js", "../../../../../node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/splitStream.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/deref.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js", "../../../../../node_modules/@smithy/querystring-parser/dist-es/index.js", "../../../../../node_modules/@smithy/url-parser/dist-es/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/endpoints/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js", "../../../../../node_modules/@smithy/uuid/dist-es/randomUUID.browser.js", "../../../../../node_modules/@smithy/uuid/dist-es/v4.js", "../../../../../node_modules/@smithy/uuid/dist-es/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/generateIdempotencyToken.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/split-every.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/event-streams/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/index.js", "../../../../../node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js", "../../../../../node_modules/@smithy/core/dist-es/setFeature.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js", "../../../../../node_modules/@smithy/core/dist-es/index.js", "../../../../../node_modules/@smithy/property-provider/dist-es/ProviderError.js", "../../../../../node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js", "../../../../../node_modules/@smithy/property-provider/dist-es/TokenProviderError.js", "../../../../../node_modules/@smithy/property-provider/dist-es/chain.js", "../../../../../node_modules/@smithy/property-provider/dist-es/fromStatic.js", "../../../../../node_modules/@smithy/property-provider/dist-es/memoize.js", "../../../../../node_modules/@smithy/property-provider/dist-es/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/constants.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js", "../../../../../node_modules/@smithy/is-array-buffer/dist-es/index.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/headerUtil.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/prepareRequest.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/utilDate.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/SignatureV4.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/signature-v4a-container.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js", "../../../../../node_modules/@smithy/util-body-length-browser/dist-es/calculateBodyLength.js", "../../../../../node_modules/@smithy/util-body-length-browser/dist-es/index.js", "../../../../../node_modules/@smithy/middleware-stack/dist-es/MiddlewareStack.js", "../../../../../node_modules/@smithy/middleware-stack/dist-es/index.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/client.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/schemaLogFilter.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/command.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/constants.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/exceptions.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/default-error-handler.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/defaults-mode.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/extensions/retry.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/extensions/index.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/get-array-if-single-item.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/get-value-from-text-node.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/is-serializable-header-value.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/object-mapping.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/resolve-path.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/ser-utils.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/serde-json.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/escape-attribute.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/escape-element.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/XmlText.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/XmlNode.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.browser.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QuerySerializerSettings.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmForRequest.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumLocationName.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeader.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeaderWithPrefix.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isStreaming.js", "../../../../../node_modules/tslib/tslib.es6.mjs", "../../../../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js", "../../../../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js", "../../../../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js", "../../../../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/index.js", "../../../../../node_modules/@aws-crypto/util/src/convertToBuffer.ts", "../../../../../node_modules/@aws-crypto/util/src/isEmptyData.ts", "../../../../../node_modules/@aws-crypto/util/src/numToUint8.ts", "../../../../../node_modules/@aws-crypto/util/src/uint32ArrayFrom.ts", "../../../../../node_modules/@aws-crypto/util/src/index.ts", "../../../../../node_modules/@aws-crypto/crc32c/src/aws_crc32c.ts", "../../../../../node_modules/@aws-crypto/crc32c/src/index.ts", "../../../../../node_modules/@aws-sdk/crc64-nvme/dist-es/Crc64Nvme.js", "../../../../../node_modules/@aws-sdk/crc64-nvme/dist-es/crc64-nvme-crt-container.js", "../../../../../node_modules/@aws-sdk/crc64-nvme/dist-es/index.js", "../../../../../node_modules/@aws-crypto/crc32/src/aws_crc32.ts", "../../../../../node_modules/@aws-crypto/crc32/src/index.ts", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getCrc32ChecksumAlgorithmFunction.browser.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/types.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/selectChecksumAlgorithmFunction.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/stringHasher.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsInputMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmListForResponse.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isChecksumWithPartNumber.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksum.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/validateChecksumFromResponse.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsResponseMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getFlexibleChecksumsPlugin.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/resolveFlexibleChecksumsConfig.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-host-header/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-logger/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/configuration.js", "../../../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/recursionDetectionMiddleware.browser.js", "../../../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/getRecursionDetectionPlugin.js", "../../../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/check-content-length-header.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-endpoint-middleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-middleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-expires-middleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCache.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCacheEntry.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityProviderImpl.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/constants.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/SignatureV4S3Express.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/signS3Express.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressHttpSigningMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/index.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3Configuration.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js", "../../../../../node_modules/@aws-sdk/util-arn-parser/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/bucket-endpoint-middleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/validate-bucket-name.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/cache/EndpointCache.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/isIpAddress.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/isValidHostLabel.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/customEndpointFunctions.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/debug/debugId.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/debug/toDebugString.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/debug/index.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointError.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointFunctions.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointRuleObject.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/ErrorRuleObject.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/RuleSetObject.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/TreeRuleObject.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/shared.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/index.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/booleanEquals.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/isSet.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/not.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/parseURL.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/stringEquals.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/substring.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/uriEncode.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/index.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/callFunction.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointUrl.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/index.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/index.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/aws.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveDefaultAwsRegionalEndpointsConfig.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/index.js", "../../../../../node_modules/@smithy/util-retry/dist-es/config.js", "../../../../../node_modules/@smithy/service-error-classification/dist-es/constants.js", "../../../../../node_modules/@smithy/service-error-classification/dist-es/index.js", "../../../../../node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js", "../../../../../node_modules/@smithy/util-retry/dist-es/constants.js", "../../../../../node_modules/@smithy/util-retry/dist-es/defaultRetryBackoffStrategy.js", "../../../../../node_modules/@smithy/util-retry/dist-es/defaultRetryToken.js", "../../../../../node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js", "../../../../../node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js", "../../../../../node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js", "../../../../../node_modules/@smithy/util-retry/dist-es/types.js", "../../../../../node_modules/@smithy/util-retry/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/encode-features.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/index.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseFipsEndpointConfigOptions.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveCustomEndpointsConfig.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveEndpointsConfig.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/index.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/config.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/checkRegion.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/isFipsRegion.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/getRealRegion.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/resolveRegionConfig.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/index.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionInfo/PartitionHash.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionInfo/RegionHash.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionInfo/getRegionInfo.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionInfo/index.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/index.js", "../../../../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/EventStreamSerdeConfig.js", "../../../../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/index.js", "../../../../../node_modules/@smithy/middleware-content-length/dist-es/index.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/s3.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/index.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.browser.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/index.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js", "../../../../../node_modules/@smithy/middleware-serde/dist-es/deserializerMiddleware.js", "../../../../../node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js", "../../../../../node_modules/@smithy/middleware-serde/dist-es/serdePlugin.js", "../../../../../node_modules/@smithy/middleware-serde/dist-es/index.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointRequiredConfig.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/types.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/index.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/delayDecider.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/retryDecider.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/util.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/StandardRetryStrategy.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/AdaptiveRetryStrategy.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/configurations.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/omitRetryHeadersMiddleware.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/isStreamingPayload/isStreamingPayload.browser.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/index.js", "../../../../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/signature-v4-crt-container.js", "../../../../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4MultiRegion.js", "../../../../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/ruleset.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/endpointResolver.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthSchemeProvider.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/errors.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateSessionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/package.json", "../../../../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js", "../../../../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js", "../../../../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js", "../../../../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/index.js", "../../../../../node_modules/@aws-crypto/sha1-browser/src/isEmptyData.ts", "../../../../../node_modules/@aws-crypto/sha1-browser/src/constants.ts", "../../../../../node_modules/@aws-sdk/util-locate-window/dist-es/index.js", "../../../../../node_modules/@aws-crypto/sha1-browser/src/webCryptoSha1.ts", "../../../../../node_modules/@aws-crypto/supports-web-crypto/src/supportsWebCrypto.ts", "../../../../../node_modules/@aws-crypto/supports-web-crypto/src/index.ts", "../../../../../node_modules/@aws-crypto/sha1-browser/src/crossPlatformSha1.ts", "../../../../../node_modules/@aws-crypto/sha1-browser/src/index.ts", "../../../../../node_modules/@aws-crypto/sha256-browser/src/constants.ts", "../../../../../node_modules/@aws-crypto/sha256-browser/src/webCryptoSha256.ts", "../../../../../node_modules/@aws-crypto/sha256-js/src/constants.ts", "../../../../../node_modules/@aws-crypto/sha256-js/src/RawSha256.ts", "../../../../../node_modules/@aws-crypto/sha256-js/src/jsSha256.ts", "../../../../../node_modules/@aws-crypto/sha256-js/src/index.ts", "../../../../../node_modules/@aws-crypto/sha256-browser/src/crossPlatformSha256.ts", "../../../../../node_modules/@aws-crypto/sha256-browser/src/index.ts", "../../../../../node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/Int64.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/HeaderMarshaller.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/splitMessage.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/EventStreamCodec.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/Message.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/MessageDecoderStream.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/MessageEncoderStream.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageDecoderStream.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageEncoderStream.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/index.js", "../../../../../node_modules/@smithy/eventstream-serde-universal/dist-es/getChunkedStream.js", "../../../../../node_modules/@smithy/eventstream-serde-universal/dist-es/getUnmarshalledStream.js", "../../../../../node_modules/@smithy/eventstream-serde-universal/dist-es/EventStreamMarshaller.js", "../../../../../node_modules/@smithy/eventstream-serde-universal/dist-es/provider.js", "../../../../../node_modules/@smithy/eventstream-serde-universal/dist-es/index.js", "../../../../../node_modules/@smithy/eventstream-serde-browser/dist-es/utils.js", "../../../../../node_modules/@smithy/eventstream-serde-browser/dist-es/EventStreamMarshaller.js", "../../../../../node_modules/@smithy/eventstream-serde-browser/dist-es/provider.js", "../../../../../node_modules/@smithy/eventstream-serde-browser/dist-es/index.js", "../../../../../node_modules/@smithy/chunked-blob-reader/dist-es/index.js", "../../../../../node_modules/@smithy/hash-blob-browser/dist-es/index.js", "../../../../../node_modules/@smithy/invalid-dependency/dist-es/invalidFunction.js", "../../../../../node_modules/@smithy/invalid-dependency/dist-es/invalidProvider.js", "../../../../../node_modules/@smithy/invalid-dependency/dist-es/index.js", "../../../../../node_modules/@smithy/md5-js/dist-es/constants.js", "../../../../../node_modules/@smithy/md5-js/dist-es/index.js", "../../../../../node_modules/@smithy/util-defaults-mode-browser/dist-es/constants.js", "../../../../../node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js", "../../../../../node_modules/@smithy/util-defaults-mode-browser/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.shared.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.browser.js", "../../../../../node_modules/@aws-sdk/region-config-resolver/dist-es/extensions/index.js", "../../../../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/awsRegionConfig.js", "../../../../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/stsRegionDefaultResolver.browser.js", "../../../../../node_modules/@aws-sdk/region-config-resolver/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthExtensionConfiguration.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/runtimeExtensions.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/S3Client.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/AbortMultipartUploadCommand.js", "../../../../../node_modules/@aws-sdk/middleware-ssec/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CompleteMultipartUploadCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CopyObjectCommand.js", "../../../../../node_modules/@aws-sdk/middleware-location-constraint/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataTableConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateMultipartUploadCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketAnalyticsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCorsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketEncryptionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketIntelligentTieringConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketInventoryConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketLifecycleCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataTableConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetricsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketOwnershipControlsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketPolicyCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketReplicationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketWebsiteCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeletePublicAccessBlockCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAbacCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAccelerateConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAclCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAnalyticsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketCorsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketEncryptionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketIntelligentTieringConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketInventoryConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLifecycleConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLocationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLoggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataTableConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetricsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketNotificationConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketOwnershipControlsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyStatusCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketReplicationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketRequestPaymentCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketVersioningCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketWebsiteCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAclCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAttributesCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLegalHoldCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLockConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectRetentionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTorrentCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetPublicAccessBlockCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadBucketCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketAnalyticsConfigurationsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketIntelligentTieringConfigurationsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketInventoryConfigurationsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketMetricsConfigurationsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListDirectoryBucketsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListMultipartUploadsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsV2Command.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectVersionsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListPartsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAbacCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAccelerateConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAclCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAnalyticsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketCorsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketEncryptionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketIntelligentTieringConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketInventoryConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLifecycleConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLoggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketMetricsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketNotificationConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketOwnershipControlsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketPolicyCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketReplicationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketRequestPaymentCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketVersioningCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketWebsiteCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectAclCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLegalHoldCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLockConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectRetentionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutPublicAccessBlockCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/RenameObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/RestoreObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/SelectObjectContentCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataInventoryTableConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataJournalTableConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateObjectEncryptionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCopyCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/WriteGetObjectResponseCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListBucketsPaginator.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListDirectoryBucketsPaginator.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListObjectsV2Paginator.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListPartsPaginator.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/circularReplacer.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/utils/sleep.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/waiter.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/poller.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/utils/validate.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/utils/index.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/createWaiter.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketExists.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketNotExists.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectExists.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectNotExists.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/S3.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/Interfaces.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/waiters/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/enums.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/models_0.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/models_1.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/index.js", "../../../../../node_modules/@aws-sdk/util-format-url/dist-es/index.js", "../../../../../node_modules/@aws-sdk/s3-request-presigner/dist-es/constants.js", "../../../../../node_modules/@aws-sdk/s3-request-presigner/dist-es/presigner.js", "../../../../../node_modules/@aws-sdk/s3-request-presigner/dist-es/getSignedUrl.js", "../../../../../node_modules/@aws-sdk/s3-request-presigner/dist-es/index.js", "../../../src/lib/s3-client.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/middleware.ts", "../../../../../node_modules/@trpc/server/src/vendor/standard-schema-v1/error.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/parser.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/procedureBuilder.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/rootConfig.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/initTRPC.ts", "../../../../../node_modules/@trpc/server/dist/index.mjs", "../../../src/trpc/trpc-index.ts", "../../../src/stores/product-store.ts", "../../../src/stores/product-tag-store.ts", "../../../src/trpc/apis/common-apis/common.ts", "../../../src/apis/common-apis/apis/common-product.controller.ts", "../../../src/apis/common-apis/apis/common-product.router.ts", "../../../src/apis/common-apis/apis/common.router.ts", "../../../src/v1-router.ts", "../../../src/test-controller.ts", "../../../src/middleware/auth.middleware.ts", "../../../src/main-router.ts", "../../../../../node_modules/zod/v4/core/core.js", "../../../../../node_modules/zod/v4/core/util.js", "../../../../../node_modules/zod/v4/core/errors.js", "../../../../../node_modules/zod/v4/core/parse.js", "../../../../../node_modules/zod/v4/core/regexes.js", "../../../../../node_modules/zod/v4/core/checks.js", "../../../../../node_modules/zod/v4/core/doc.js", "../../../../../node_modules/zod/v4/core/versions.js", "../../../../../node_modules/zod/v4/core/schemas.js", "../../../../../node_modules/zod/v4/locales/ar.js", "../../../../../node_modules/zod/v4/locales/az.js", "../../../../../node_modules/zod/v4/locales/be.js", "../../../../../node_modules/zod/v4/locales/bg.js", "../../../../../node_modules/zod/v4/locales/ca.js", "../../../../../node_modules/zod/v4/locales/cs.js", "../../../../../node_modules/zod/v4/locales/da.js", "../../../../../node_modules/zod/v4/locales/de.js", "../../../../../node_modules/zod/v4/locales/en.js", "../../../../../node_modules/zod/v4/locales/eo.js", "../../../../../node_modules/zod/v4/locales/es.js", "../../../../../node_modules/zod/v4/locales/fa.js", "../../../../../node_modules/zod/v4/locales/fi.js", "../../../../../node_modules/zod/v4/locales/fr.js", "../../../../../node_modules/zod/v4/locales/fr-CA.js", "../../../../../node_modules/zod/v4/locales/he.js", "../../../../../node_modules/zod/v4/locales/hu.js", "../../../../../node_modules/zod/v4/locales/hy.js", "../../../../../node_modules/zod/v4/locales/id.js", "../../../../../node_modules/zod/v4/locales/is.js", "../../../../../node_modules/zod/v4/locales/it.js", "../../../../../node_modules/zod/v4/locales/ja.js", "../../../../../node_modules/zod/v4/locales/ka.js", "../../../../../node_modules/zod/v4/locales/km.js", "../../../../../node_modules/zod/v4/locales/kh.js", "../../../../../node_modules/zod/v4/locales/ko.js", "../../../../../node_modules/zod/v4/locales/lt.js", "../../../../../node_modules/zod/v4/locales/mk.js", "../../../../../node_modules/zod/v4/locales/ms.js", "../../../../../node_modules/zod/v4/locales/nl.js", "../../../../../node_modules/zod/v4/locales/no.js", "../../../../../node_modules/zod/v4/locales/ota.js", "../../../../../node_modules/zod/v4/locales/ps.js", "../../../../../node_modules/zod/v4/locales/pl.js", "../../../../../node_modules/zod/v4/locales/pt.js", "../../../../../node_modules/zod/v4/locales/ru.js", "../../../../../node_modules/zod/v4/locales/sl.js", "../../../../../node_modules/zod/v4/locales/sv.js", "../../../../../node_modules/zod/v4/locales/ta.js", "../../../../../node_modules/zod/v4/locales/th.js", "../../../../../node_modules/zod/v4/locales/tr.js", "../../../../../node_modules/zod/v4/locales/uk.js", "../../../../../node_modules/zod/v4/locales/ua.js", "../../../../../node_modules/zod/v4/locales/ur.js", "../../../../../node_modules/zod/v4/locales/uz.js", "../../../../../node_modules/zod/v4/locales/vi.js", "../../../../../node_modules/zod/v4/locales/zh-CN.js", "../../../../../node_modules/zod/v4/locales/zh-TW.js", "../../../../../node_modules/zod/v4/locales/yo.js", "../../../../../node_modules/zod/v4/locales/index.js", "../../../../../node_modules/zod/v4/core/registries.js", "../../../../../node_modules/zod/v4/core/api.js", "../../../../../node_modules/zod/v4/core/to-json-schema.js", "../../../../../node_modules/zod/v4/core/json-schema-processors.js", "../../../../../node_modules/zod/v4/core/json-schema-generator.js", "../../../../../node_modules/zod/v4/core/json-schema.js", "../../../../../node_modules/zod/v4/core/index.js", "../../../../../node_modules/zod/v4/classic/checks.js", "../../../../../node_modules/zod/v4/classic/iso.js", "../../../../../node_modules/zod/v4/classic/errors.js", "../../../../../node_modules/zod/v4/classic/parse.js", "../../../../../node_modules/zod/v4/classic/schemas.js", "../../../../../node_modules/zod/v4/classic/compat.js", "../../../../../node_modules/zod/v4/classic/from-json-schema.js", "../../../../../node_modules/zod/v4/classic/coerce.js", "../../../../../node_modules/zod/v4/classic/external.js", "../../../../../node_modules/zod/index.js", "../../../src/trpc/apis/admin-apis/apis/complaint.ts", "../../../../../node_modules/dayjs/dayjs.min.js", "../../../src/trpc/apis/admin-apis/apis/coupon.ts", "../../../../../node_modules/unenv/dist/runtime/npm/node-fetch.mjs", "required-unenv-alias:node-fetch", "node-built-in-modules:node:assert", "node-built-in-modules:node:zlib", "../../../../../node_modules/promise-limit/index.js", "../../../../../node_modules/err-code/index.js", "../../../../../node_modules/retry/lib/retry_operation.js", "../../../../../node_modules/retry/lib/retry.js", "../../../../../node_modules/retry/index.js", "../../../../../node_modules/promise-retry/index.js", "../../../node_modules/expo-server-sdk/src/ExpoClientValues.ts", "../../../node_modules/expo-server-sdk/package.json", "../../../node_modules/expo-server-sdk/src/ExpoClient.ts", "../../../src/lib/const-strings.ts", "../../../src/lib/notif-job.ts", "../../../src/lib/redis-client.ts", "../../../../../node_modules/axios/lib/helpers/bind.js", "../../../../../node_modules/axios/lib/utils.js", "../../../../../node_modules/axios/lib/core/AxiosError.js", "../../../../../node_modules/axios/lib/helpers/null.js", "../../../../../node_modules/axios/lib/helpers/toFormData.js", "../../../../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js", "../../../../../node_modules/axios/lib/helpers/buildURL.js", "../../../../../node_modules/axios/lib/core/InterceptorManager.js", "../../../../../node_modules/axios/lib/defaults/transitional.js", "../../../../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js", "../../../../../node_modules/axios/lib/platform/browser/classes/FormData.js", "../../../../../node_modules/axios/lib/platform/browser/classes/Blob.js", "../../../../../node_modules/axios/lib/platform/browser/index.js", "../../../../../node_modules/axios/lib/platform/common/utils.js", "../../../../../node_modules/axios/lib/platform/index.js", "../../../../../node_modules/axios/lib/helpers/toURLEncodedForm.js", "../../../../../node_modules/axios/lib/helpers/formDataToJSON.js", "../../../../../node_modules/axios/lib/defaults/index.js", "../../../../../node_modules/axios/lib/helpers/parseHeaders.js", "../../../../../node_modules/axios/lib/core/AxiosHeaders.js", "../../../../../node_modules/axios/lib/core/transformData.js", "../../../../../node_modules/axios/lib/cancel/isCancel.js", "../../../../../node_modules/axios/lib/cancel/CanceledError.js", "../../../../../node_modules/axios/lib/core/settle.js", "../../../../../node_modules/axios/lib/helpers/parseProtocol.js", "../../../../../node_modules/axios/lib/helpers/speedometer.js", "../../../../../node_modules/axios/lib/helpers/throttle.js", "../../../../../node_modules/axios/lib/helpers/progressEventReducer.js", "../../../../../node_modules/axios/lib/helpers/isURLSameOrigin.js", "../../../../../node_modules/axios/lib/helpers/cookies.js", "../../../../../node_modules/axios/lib/helpers/isAbsoluteURL.js", "../../../../../node_modules/axios/lib/helpers/combineURLs.js", "../../../../../node_modules/axios/lib/core/buildFullPath.js", "../../../../../node_modules/axios/lib/core/mergeConfig.js", "../../../../../node_modules/axios/lib/helpers/resolveConfig.js", "../../../../../node_modules/axios/lib/adapters/xhr.js", "../../../../../node_modules/axios/lib/helpers/composeSignals.js", "../../../../../node_modules/axios/lib/helpers/trackStream.js", "../../../../../node_modules/axios/lib/adapters/fetch.js", "../../../../../node_modules/axios/lib/adapters/adapters.js", "../../../../../node_modules/axios/lib/core/dispatchRequest.js", "../../../../../node_modules/axios/lib/env/data.js", "../../../../../node_modules/axios/lib/helpers/validator.js", "../../../../../node_modules/axios/lib/core/Axios.js", "../../../../../node_modules/axios/lib/cancel/CancelToken.js", "../../../../../node_modules/axios/lib/helpers/spread.js", "../../../../../node_modules/axios/lib/helpers/isAxiosError.js", "../../../../../node_modules/axios/lib/helpers/HttpStatusCode.js", "../../../../../node_modules/axios/lib/axios.js", "../../../../../node_modules/axios/index.js", "../../../src/lib/telegram-service.ts", "../../../src/lib/post-order-handler.ts", "../../../src/stores/user-negativity-store.ts", "../../../src/trpc/apis/admin-apis/apis/order.ts", "../../../src/trpc/apis/admin-apis/apis/vendor-snippets.ts", "../../../src/lib/roles-manager.ts", "../../../src/lib/const-keys.ts", "../../../src/lib/const-store.ts", "../../../src/stores/slot-store.ts", "../../../src/stores/banner-store.ts", "../../../../../node_modules/@turf/helpers/index.ts", "../../../../../node_modules/@turf/invariant/index.ts", "../../../../../node_modules/robust-predicates/esm/util.js", "../../../../../node_modules/robust-predicates/esm/orient2d.js", "../../../../../node_modules/robust-predicates/esm/orient3d.js", "../../../../../node_modules/robust-predicates/esm/incircle.js", "../../../../../node_modules/robust-predicates/esm/insphere.js", "../../../../../node_modules/robust-predicates/index.js", "../../../../../node_modules/point-in-polygon-hao/dist/esm/index.js", "../../../../../node_modules/@turf/boolean-point-in-polygon/index.ts", "../../../../../node_modules/@turf/turf/index.ts", "../../../src/lib/mbnr-geojson.ts", "../../../src/trpc/apis/common-apis/common-trpc-index.ts", "../../../src/trpc/apis/user-apis/apis/stores.ts", "../../../src/trpc/apis/user-apis/apis/slots.ts", "../../../src/trpc/apis/user-apis/apis/banners.ts", "../../../../../packages/shared/types/index.ts", "../../../../../packages/shared/index.ts", "../../../src/lib/retry.ts", "../../../src/lib/cloud_cache.ts", "../../../src/stores/store-initializer.ts", "../../../src/trpc/apis/admin-apis/apis/slots.ts", "../../../src/trpc/apis/admin-apis/apis/product.ts", "../../../../../node_modules/unenv/dist/runtime/node/internal/crypto/web.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/crypto/node.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/crypto/constants.mjs", "../../../../../node_modules/unenv/dist/runtime/node/crypto.mjs", "../../../../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.mjs", "../../../../../node_modules/bcryptjs/index.js", "../../../src/trpc/apis/admin-apis/apis/staff-user.ts", "../../../src/trpc/apis/admin-apis/apis/store.ts", "../../../src/trpc/apis/admin-apis/apis/payments.ts", "../../../src/trpc/apis/admin-apis/apis/banner.ts", "../../../src/trpc/apis/admin-apis/apis/user.ts", "../../../src/trpc/apis/admin-apis/apis/const.ts", "../../../src/trpc/apis/admin-apis/apis/admin-trpc-index.ts", "../../../src/lib/license-util.ts", "../../../src/trpc/apis/user-apis/apis/address.ts", "../../../src/lib/otp-utils.ts", "../../../src/trpc/apis/user-apis/apis/auth.ts", "../../../src/trpc/apis/user-apis/apis/cart.ts", "../../../src/trpc/apis/user-apis/apis/complaint.ts", "../../../src/trpc/apis/user-apis/apis/order.ts", "../../../src/trpc/apis/user-apis/apis/product.ts", "../../../src/trpc/apis/user-apis/apis/user.ts", "../../../src/trpc/apis/user-apis/apis/coupon.ts", "../../../src/lib/payments-utils.ts", "../../../src/trpc/apis/user-apis/apis/payments.ts", "../../../src/trpc/apis/user-apis/apis/file-upload.ts", "../../../src/trpc/apis/user-apis/apis/tags.ts", "../../../src/trpc/apis/user-apis/apis/user-trpc-index.ts", "../../../src/trpc/router.ts", "../../../src/app.ts", "../bundle-GYbPT2/middleware-loader.entry.ts", "../bundle-GYbPT2/middleware-insertion-facade.js", "../../../worker.ts", "../../../../../node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts", "../../../../../node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts", "../../../../../node_modules/wrangler/templates/middleware/common.ts"], + "sourceRoot": "/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/dev-knF4eP", + "sourcesContent": ["function stripCfConnectingIPHeader(input, init) {\n\tconst request = new Request(input, init);\n\trequest.headers.delete(\"CF-Connecting-IP\");\n\treturn request;\n}\n\nglobalThis.fetch = new Proxy(globalThis.fetch, {\n\tapply(target, thisArg, argArray) {\n\t\treturn Reflect.apply(target, thisArg, [\n\t\t\tstripCfConnectingIPHeader.apply(null, argArray),\n\t\t]);\n\t},\n});\n", "/*@__NO_SIDE_EFFECTS__*/ export function rawHeaders(headers) {\n\tconst rawHeaders = [];\n\tfor (const key in headers) {\n\t\tif (Array.isArray(headers[key])) {\n\t\t\tfor (const h of headers[key]) {\n\t\t\t\trawHeaders.push(key, h);\n\t\t\t}\n\t\t} else {\n\t\t\trawHeaders.push(key, headers[key]);\n\t\t}\n\t}\n\treturn rawHeaders;\n}\n/*@__NO_SIDE_EFFECTS__*/ export function mergeFns(...functions) {\n\treturn function(...args) {\n\t\tfor (const fn of functions) {\n\t\t\tfn(...args);\n\t\t}\n\t};\n}\n/*@__NO_SIDE_EFFECTS__*/ export function createNotImplementedError(name) {\n\treturn new Error(`[unenv] ${name} is not implemented yet!`);\n}\n/*@__NO_SIDE_EFFECTS__*/ export function notImplemented(name) {\n\tconst fn = () => {\n\t\tthrow createNotImplementedError(name);\n\t};\n\treturn Object.assign(fn, { __unenv__: true });\n}\n/*@__NO_SIDE_EFFECTS__*/ export function notImplementedAsync(name) {\n\tconst fn = notImplemented(name);\n\tfn.__promisify__ = () => notImplemented(name + \".__promisify__\");\n\tfn.native = fn;\n\treturn fn;\n}\n/*@__NO_SIDE_EFFECTS__*/ export function notImplementedClass(name) {\n\treturn class {\n\t\t__unenv__ = true;\n\t\tconstructor() {\n\t\t\tthrow new Error(`[unenv] ${name} is not implemented yet!`);\n\t\t}\n\t};\n}\n", "import { createNotImplementedError } from \"../../../_internal/utils.mjs\";\nconst _timeOrigin = globalThis.performance?.timeOrigin ?? Date.now();\nconst _performanceNow = globalThis.performance?.now ? globalThis.performance.now.bind(globalThis.performance) : () => Date.now() - _timeOrigin;\nconst nodeTiming = {\n\tname: \"node\",\n\tentryType: \"node\",\n\tstartTime: 0,\n\tduration: 0,\n\tnodeStart: 0,\n\tv8Start: 0,\n\tbootstrapComplete: 0,\n\tenvironment: 0,\n\tloopStart: 0,\n\tloopExit: 0,\n\tidleTime: 0,\n\tuvMetricsInfo: {\n\t\tloopCount: 0,\n\t\tevents: 0,\n\t\teventsWaiting: 0\n\t},\n\tdetail: undefined,\n\ttoJSON() {\n\t\treturn this;\n\t}\n};\nexport class PerformanceEntry {\n\t__unenv__ = true;\n\tdetail;\n\tentryType = \"event\";\n\tname;\n\tstartTime;\n\tconstructor(name, options) {\n\t\tthis.name = name;\n\t\tthis.startTime = options?.startTime || _performanceNow();\n\t\tthis.detail = options?.detail;\n\t}\n\tget duration() {\n\t\treturn _performanceNow() - this.startTime;\n\t}\n\ttoJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tentryType: this.entryType,\n\t\t\tstartTime: this.startTime,\n\t\t\tduration: this.duration,\n\t\t\tdetail: this.detail\n\t\t};\n\t}\n}\nexport const PerformanceMark = class PerformanceMark extends PerformanceEntry {\n\tentryType = \"mark\";\n\tconstructor() {\n\t\tsuper(...arguments);\n\t}\n\tget duration() {\n\t\treturn 0;\n\t}\n};\nexport class PerformanceMeasure extends PerformanceEntry {\n\tentryType = \"measure\";\n}\nexport class PerformanceResourceTiming extends PerformanceEntry {\n\tentryType = \"resource\";\n\tserverTiming = [];\n\tconnectEnd = 0;\n\tconnectStart = 0;\n\tdecodedBodySize = 0;\n\tdomainLookupEnd = 0;\n\tdomainLookupStart = 0;\n\tencodedBodySize = 0;\n\tfetchStart = 0;\n\tinitiatorType = \"\";\n\tname = \"\";\n\tnextHopProtocol = \"\";\n\tredirectEnd = 0;\n\tredirectStart = 0;\n\trequestStart = 0;\n\tresponseEnd = 0;\n\tresponseStart = 0;\n\tsecureConnectionStart = 0;\n\tstartTime = 0;\n\ttransferSize = 0;\n\tworkerStart = 0;\n\tresponseStatus = 0;\n}\nexport class PerformanceObserverEntryList {\n\t__unenv__ = true;\n\tgetEntries() {\n\t\treturn [];\n\t}\n\tgetEntriesByName(_name, _type) {\n\t\treturn [];\n\t}\n\tgetEntriesByType(type) {\n\t\treturn [];\n\t}\n}\nexport class Performance {\n\t__unenv__ = true;\n\ttimeOrigin = _timeOrigin;\n\teventCounts = new Map();\n\t_entries = [];\n\t_resourceTimingBufferSize = 0;\n\tnavigation = undefined;\n\ttiming = undefined;\n\ttimerify(_fn, _options) {\n\t\tthrow createNotImplementedError(\"Performance.timerify\");\n\t}\n\tget nodeTiming() {\n\t\treturn nodeTiming;\n\t}\n\teventLoopUtilization() {\n\t\treturn {};\n\t}\n\tmarkResourceTiming() {\n\t\treturn new PerformanceResourceTiming(\"\");\n\t}\n\tonresourcetimingbufferfull = null;\n\tnow() {\n\t\tif (this.timeOrigin === _timeOrigin) {\n\t\t\treturn _performanceNow();\n\t\t}\n\t\treturn Date.now() - this.timeOrigin;\n\t}\n\tclearMarks(markName) {\n\t\tthis._entries = markName ? this._entries.filter((e) => e.name !== markName) : this._entries.filter((e) => e.entryType !== \"mark\");\n\t}\n\tclearMeasures(measureName) {\n\t\tthis._entries = measureName ? this._entries.filter((e) => e.name !== measureName) : this._entries.filter((e) => e.entryType !== \"measure\");\n\t}\n\tclearResourceTimings() {\n\t\tthis._entries = this._entries.filter((e) => e.entryType !== \"resource\" || e.entryType !== \"navigation\");\n\t}\n\tgetEntries() {\n\t\treturn this._entries;\n\t}\n\tgetEntriesByName(name, type) {\n\t\treturn this._entries.filter((e) => e.name === name && (!type || e.entryType === type));\n\t}\n\tgetEntriesByType(type) {\n\t\treturn this._entries.filter((e) => e.entryType === type);\n\t}\n\tmark(name, options) {\n\t\tconst entry = new PerformanceMark(name, options);\n\t\tthis._entries.push(entry);\n\t\treturn entry;\n\t}\n\tmeasure(measureName, startOrMeasureOptions, endMark) {\n\t\tlet start;\n\t\tlet end;\n\t\tif (typeof startOrMeasureOptions === \"string\") {\n\t\t\tstart = this.getEntriesByName(startOrMeasureOptions, \"mark\")[0]?.startTime;\n\t\t\tend = this.getEntriesByName(endMark, \"mark\")[0]?.startTime;\n\t\t} else {\n\t\t\tstart = Number.parseFloat(startOrMeasureOptions?.start) || this.now();\n\t\t\tend = Number.parseFloat(startOrMeasureOptions?.end) || this.now();\n\t\t}\n\t\tconst entry = new PerformanceMeasure(measureName, {\n\t\t\tstartTime: start,\n\t\t\tdetail: {\n\t\t\t\tstart,\n\t\t\t\tend\n\t\t\t}\n\t\t});\n\t\tthis._entries.push(entry);\n\t\treturn entry;\n\t}\n\tsetResourceTimingBufferSize(maxSize) {\n\t\tthis._resourceTimingBufferSize = maxSize;\n\t}\n\taddEventListener(type, listener, options) {\n\t\tthrow createNotImplementedError(\"Performance.addEventListener\");\n\t}\n\tremoveEventListener(type, listener, options) {\n\t\tthrow createNotImplementedError(\"Performance.removeEventListener\");\n\t}\n\tdispatchEvent(event) {\n\t\tthrow createNotImplementedError(\"Performance.dispatchEvent\");\n\t}\n\ttoJSON() {\n\t\treturn this;\n\t}\n}\nexport class PerformanceObserver {\n\t__unenv__ = true;\n\tstatic supportedEntryTypes = [];\n\t_callback = null;\n\tconstructor(callback) {\n\t\tthis._callback = callback;\n\t}\n\ttakeRecords() {\n\t\treturn [];\n\t}\n\tdisconnect() {\n\t\tthrow createNotImplementedError(\"PerformanceObserver.disconnect\");\n\t}\n\tobserve(options) {\n\t\tthrow createNotImplementedError(\"PerformanceObserver.observe\");\n\t}\n\tbind(fn) {\n\t\treturn fn;\n\t}\n\trunInAsyncScope(fn, thisArg, ...args) {\n\t\treturn fn.call(thisArg, ...args);\n\t}\n\tasyncId() {\n\t\treturn 0;\n\t}\n\ttriggerAsyncId() {\n\t\treturn 0;\n\t}\n\temitDestroy() {\n\t\treturn this;\n\t}\n}\nexport const performance = globalThis.performance && \"addEventListener\" in globalThis.performance ? globalThis.performance : new Performance();\n", "import { IntervalHistogram, RecordableHistogram } from \"./internal/perf_hooks/histogram.mjs\";\nimport { performance, Performance, PerformanceEntry, PerformanceMark, PerformanceMeasure, PerformanceObserverEntryList, PerformanceObserver, PerformanceResourceTiming } from \"./internal/perf_hooks/performance.mjs\";\nexport * from \"./internal/perf_hooks/performance.mjs\";\nimport { NODE_PERFORMANCE_GC_MAJOR, NODE_PERFORMANCE_GC_MINOR, NODE_PERFORMANCE_GC_INCREMENTAL, NODE_PERFORMANCE_GC_WEAKCB, NODE_PERFORMANCE_GC_FLAGS_NO, NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED, NODE_PERFORMANCE_GC_FLAGS_FORCED, NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING, NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE, NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY, NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE, NODE_PERFORMANCE_ENTRY_TYPE_GC, NODE_PERFORMANCE_ENTRY_TYPE_HTTP, NODE_PERFORMANCE_ENTRY_TYPE_HTTP2, NODE_PERFORMANCE_ENTRY_TYPE_NET, NODE_PERFORMANCE_ENTRY_TYPE_DNS, NODE_PERFORMANCE_MILESTONE_TIME_ORIGIN_TIMESTAMP, NODE_PERFORMANCE_MILESTONE_TIME_ORIGIN, NODE_PERFORMANCE_MILESTONE_ENVIRONMENT, NODE_PERFORMANCE_MILESTONE_NODE_START, NODE_PERFORMANCE_MILESTONE_V8_START, NODE_PERFORMANCE_MILESTONE_LOOP_START, NODE_PERFORMANCE_MILESTONE_LOOP_EXIT, NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE } from \"./internal/perf_hooks/constants.mjs\";\nexport const constants = {\n\tNODE_PERFORMANCE_GC_MAJOR,\n\tNODE_PERFORMANCE_GC_MINOR,\n\tNODE_PERFORMANCE_GC_INCREMENTAL,\n\tNODE_PERFORMANCE_GC_WEAKCB,\n\tNODE_PERFORMANCE_GC_FLAGS_NO,\n\tNODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED,\n\tNODE_PERFORMANCE_GC_FLAGS_FORCED,\n\tNODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING,\n\tNODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE,\n\tNODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY,\n\tNODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE,\n\tNODE_PERFORMANCE_ENTRY_TYPE_GC,\n\tNODE_PERFORMANCE_ENTRY_TYPE_HTTP,\n\tNODE_PERFORMANCE_ENTRY_TYPE_HTTP2,\n\tNODE_PERFORMANCE_ENTRY_TYPE_NET,\n\tNODE_PERFORMANCE_ENTRY_TYPE_DNS,\n\tNODE_PERFORMANCE_MILESTONE_TIME_ORIGIN_TIMESTAMP,\n\tNODE_PERFORMANCE_MILESTONE_TIME_ORIGIN,\n\tNODE_PERFORMANCE_MILESTONE_ENVIRONMENT,\n\tNODE_PERFORMANCE_MILESTONE_NODE_START,\n\tNODE_PERFORMANCE_MILESTONE_V8_START,\n\tNODE_PERFORMANCE_MILESTONE_LOOP_START,\n\tNODE_PERFORMANCE_MILESTONE_LOOP_EXIT,\n\tNODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE\n};\nexport const monitorEventLoopDelay = function(_options) {\n\treturn new IntervalHistogram();\n};\nexport const createHistogram = function(_options) {\n\treturn new RecordableHistogram();\n};\nexport default {\n\tPerformance,\n\tPerformanceMark,\n\tPerformanceEntry,\n\tPerformanceMeasure,\n\tPerformanceObserverEntryList,\n\tPerformanceObserver,\n\tPerformanceResourceTiming,\n\tperformance,\n\tconstants,\n\tcreateHistogram,\n\tmonitorEventLoopDelay\n};\n", "import {\n performance,\n Performance,\n PerformanceEntry,\n PerformanceMark,\n PerformanceMeasure,\n PerformanceObserver,\n PerformanceObserverEntryList,\n PerformanceResourceTiming\n} from \"node:perf_hooks\";\nglobalThis.performance = performance;\nglobalThis.Performance = Performance;\nglobalThis.PerformanceEntry = PerformanceEntry;\nglobalThis.PerformanceMark = PerformanceMark;\nglobalThis.PerformanceMeasure = PerformanceMeasure;\nglobalThis.PerformanceObserver = PerformanceObserver;\nglobalThis.PerformanceObserverEntryList = PerformanceObserverEntryList;\nglobalThis.PerformanceResourceTiming = PerformanceResourceTiming;\n", "export default Object.assign(() => {}, { __unenv__: true });\n", "import { Writable } from \"node:stream\";\nimport noop from \"../mock/noop.mjs\";\nimport { notImplemented, notImplementedClass } from \"../_internal/utils.mjs\";\nconst _console = globalThis.console;\nexport const _ignoreErrors = true;\nexport const _stderr = new Writable();\nexport const _stdout = new Writable();\nexport const log = _console?.log ?? noop;\nexport const info = _console?.info ?? log;\nexport const trace = _console?.trace ?? info;\nexport const debug = _console?.debug ?? log;\nexport const table = _console?.table ?? log;\nexport const error = _console?.error ?? log;\nexport const warn = _console?.warn ?? error;\nexport const createTask = _console?.createTask ?? /*@__PURE__*/ notImplemented(\"console.createTask\");\nexport const assert = /*@__PURE__*/ notImplemented(\"console.assert\");\nexport const clear = _console?.clear ?? noop;\nexport const count = _console?.count ?? noop;\nexport const countReset = _console?.countReset ?? noop;\nexport const dir = _console?.dir ?? noop;\nexport const dirxml = _console?.dirxml ?? noop;\nexport const group = _console?.group ?? noop;\nexport const groupEnd = _console?.groupEnd ?? noop;\nexport const groupCollapsed = _console?.groupCollapsed ?? noop;\nexport const profile = _console?.profile ?? noop;\nexport const profileEnd = _console?.profileEnd ?? noop;\nexport const time = _console?.time ?? noop;\nexport const timeEnd = _console?.timeEnd ?? noop;\nexport const timeLog = _console?.timeLog ?? noop;\nexport const timeStamp = _console?.timeStamp ?? noop;\nexport const Console = _console?.Console ?? /*@__PURE__*/ notImplementedClass(\"console.Console\");\nexport const _times = /*@__PURE__*/ new Map();\nexport function context() {\n\treturn _console;\n}\nexport const _stdoutErrorHandler = noop;\nexport const _stderrErrorHandler = noop;\nexport default {\n\t_times,\n\t_ignoreErrors,\n\t_stdoutErrorHandler,\n\t_stderrErrorHandler,\n\t_stdout,\n\t_stderr,\n\tassert,\n\tclear,\n\tConsole,\n\tcount,\n\tcountReset,\n\tdebug,\n\tdir,\n\tdirxml,\n\terror,\n\tcontext,\n\tcreateTask,\n\tgroup,\n\tgroupEnd,\n\tgroupCollapsed,\n\tinfo,\n\tlog,\n\tprofile,\n\tprofileEnd,\n\ttable,\n\ttime,\n\ttimeEnd,\n\ttimeLog,\n\ttimeStamp,\n\ttrace,\n\twarn\n};\n", "import {\n _ignoreErrors,\n _stderr,\n _stderrErrorHandler,\n _stdout,\n _stdoutErrorHandler,\n _times,\n Console\n} from \"unenv/node/console\";\nexport {\n Console,\n _ignoreErrors,\n _stderr,\n _stderrErrorHandler,\n _stdout,\n _stdoutErrorHandler,\n _times\n} from \"unenv/node/console\";\nconst workerdConsole = globalThis[\"console\"];\nexport const {\n assert,\n clear,\n // @ts-expect-error undocumented public API\n context,\n count,\n countReset,\n // @ts-expect-error undocumented public API\n createTask,\n debug,\n dir,\n dirxml,\n error,\n group,\n groupCollapsed,\n groupEnd,\n info,\n log,\n profile,\n profileEnd,\n table,\n time,\n timeEnd,\n timeLog,\n timeStamp,\n trace,\n warn\n} = workerdConsole;\nObject.assign(workerdConsole, {\n Console,\n _ignoreErrors,\n _stderr,\n _stderrErrorHandler,\n _stdout,\n _stdoutErrorHandler,\n _times\n});\nexport default workerdConsole;\n", "import { default as defaultExport } from \"@cloudflare/unenv-preset/node/console\";\nglobalThis.console = defaultExport;", "export const hrtime = /*@__PURE__*/ Object.assign(function hrtime(startTime) {\n\tconst now = Date.now();\n\tconst seconds = Math.trunc(now / 1e3);\n\tconst nanos = now % 1e3 * 1e6;\n\tif (startTime) {\n\t\tlet diffSeconds = seconds - startTime[0];\n\t\tlet diffNanos = nanos - startTime[0];\n\t\tif (diffNanos < 0) {\n\t\t\tdiffSeconds = diffSeconds - 1;\n\t\t\tdiffNanos = 1e9 + diffNanos;\n\t\t}\n\t\treturn [diffSeconds, diffNanos];\n\t}\n\treturn [seconds, nanos];\n}, { bigint: function bigint() {\n\treturn BigInt(Date.now() * 1e6);\n} });\n", "import { Socket } from \"node:net\";\nexport class ReadStream extends Socket {\n\tfd;\n\tconstructor(fd) {\n\t\tsuper();\n\t\tthis.fd = fd;\n\t}\n\tisRaw = false;\n\tsetRawMode(mode) {\n\t\tthis.isRaw = mode;\n\t\treturn this;\n\t}\n\tisTTY = false;\n}\n", "import { Socket } from \"node:net\";\nexport class WriteStream extends Socket {\n\tfd;\n\tconstructor(fd) {\n\t\tsuper();\n\t\tthis.fd = fd;\n\t}\n\tclearLine(dir, callback) {\n\t\tcallback && callback();\n\t\treturn false;\n\t}\n\tclearScreenDown(callback) {\n\t\tcallback && callback();\n\t\treturn false;\n\t}\n\tcursorTo(x, y, callback) {\n\t\tcallback && typeof callback === \"function\" && callback();\n\t\treturn false;\n\t}\n\tmoveCursor(dx, dy, callback) {\n\t\tcallback && callback();\n\t\treturn false;\n\t}\n\tgetColorDepth(env) {\n\t\treturn 1;\n\t}\n\thasColors(count, env) {\n\t\treturn false;\n\t}\n\tgetWindowSize() {\n\t\treturn [this.columns, this.rows];\n\t}\n\tcolumns = 80;\n\trows = 24;\n\tisTTY = false;\n}\n", "import { ReadStream } from \"./internal/tty/read-stream.mjs\";\nimport { WriteStream } from \"./internal/tty/write-stream.mjs\";\nexport { ReadStream } from \"./internal/tty/read-stream.mjs\";\nexport { WriteStream } from \"./internal/tty/write-stream.mjs\";\nexport const isatty = function() {\n\treturn false;\n};\nexport default {\n\tReadStream,\n\tWriteStream,\n\tisatty\n};\n", "import { EventEmitter } from \"node:events\";\nimport { ReadStream, WriteStream } from \"node:tty\";\nimport { notImplemented, createNotImplementedError } from \"../../../_internal/utils.mjs\";\nexport class Process extends EventEmitter {\n\tenv;\n\thrtime;\n\tnextTick;\n\tconstructor(impl) {\n\t\tsuper();\n\t\tthis.env = impl.env;\n\t\tthis.hrtime = impl.hrtime;\n\t\tthis.nextTick = impl.nextTick;\n\t\tfor (const prop of [...Object.getOwnPropertyNames(Process.prototype), ...Object.getOwnPropertyNames(EventEmitter.prototype)]) {\n\t\t\tconst value = this[prop];\n\t\t\tif (typeof value === \"function\") {\n\t\t\t\tthis[prop] = value.bind(this);\n\t\t\t}\n\t\t}\n\t}\n\temitWarning(warning, type, code) {\n\t\tconsole.warn(`${code ? `[${code}] ` : \"\"}${type ? `${type}: ` : \"\"}${warning}`);\n\t}\n\temit(...args) {\n\t\treturn super.emit(...args);\n\t}\n\tlisteners(eventName) {\n\t\treturn super.listeners(eventName);\n\t}\n\t#stdin;\n\t#stdout;\n\t#stderr;\n\tget stdin() {\n\t\treturn this.#stdin ??= new ReadStream(0);\n\t}\n\tget stdout() {\n\t\treturn this.#stdout ??= new WriteStream(1);\n\t}\n\tget stderr() {\n\t\treturn this.#stderr ??= new WriteStream(2);\n\t}\n\t#cwd = \"/\";\n\tchdir(cwd) {\n\t\tthis.#cwd = cwd;\n\t}\n\tcwd() {\n\t\treturn this.#cwd;\n\t}\n\tarch = \"\";\n\tplatform = \"\";\n\targv = [];\n\targv0 = \"\";\n\texecArgv = [];\n\texecPath = \"\";\n\ttitle = \"\";\n\tpid = 200;\n\tppid = 100;\n\tget version() {\n\t\treturn \"\";\n\t}\n\tget versions() {\n\t\treturn {};\n\t}\n\tget allowedNodeEnvironmentFlags() {\n\t\treturn new Set();\n\t}\n\tget sourceMapsEnabled() {\n\t\treturn false;\n\t}\n\tget debugPort() {\n\t\treturn 0;\n\t}\n\tget throwDeprecation() {\n\t\treturn false;\n\t}\n\tget traceDeprecation() {\n\t\treturn false;\n\t}\n\tget features() {\n\t\treturn {};\n\t}\n\tget release() {\n\t\treturn {};\n\t}\n\tget connected() {\n\t\treturn false;\n\t}\n\tget config() {\n\t\treturn {};\n\t}\n\tget moduleLoadList() {\n\t\treturn [];\n\t}\n\tconstrainedMemory() {\n\t\treturn 0;\n\t}\n\tavailableMemory() {\n\t\treturn 0;\n\t}\n\tuptime() {\n\t\treturn 0;\n\t}\n\tresourceUsage() {\n\t\treturn {};\n\t}\n\tref() {}\n\tunref() {}\n\tumask() {\n\t\tthrow createNotImplementedError(\"process.umask\");\n\t}\n\tgetBuiltinModule() {\n\t\treturn undefined;\n\t}\n\tgetActiveResourcesInfo() {\n\t\tthrow createNotImplementedError(\"process.getActiveResourcesInfo\");\n\t}\n\texit() {\n\t\tthrow createNotImplementedError(\"process.exit\");\n\t}\n\treallyExit() {\n\t\tthrow createNotImplementedError(\"process.reallyExit\");\n\t}\n\tkill() {\n\t\tthrow createNotImplementedError(\"process.kill\");\n\t}\n\tabort() {\n\t\tthrow createNotImplementedError(\"process.abort\");\n\t}\n\tdlopen() {\n\t\tthrow createNotImplementedError(\"process.dlopen\");\n\t}\n\tsetSourceMapsEnabled() {\n\t\tthrow createNotImplementedError(\"process.setSourceMapsEnabled\");\n\t}\n\tloadEnvFile() {\n\t\tthrow createNotImplementedError(\"process.loadEnvFile\");\n\t}\n\tdisconnect() {\n\t\tthrow createNotImplementedError(\"process.disconnect\");\n\t}\n\tcpuUsage() {\n\t\tthrow createNotImplementedError(\"process.cpuUsage\");\n\t}\n\tsetUncaughtExceptionCaptureCallback() {\n\t\tthrow createNotImplementedError(\"process.setUncaughtExceptionCaptureCallback\");\n\t}\n\thasUncaughtExceptionCaptureCallback() {\n\t\tthrow createNotImplementedError(\"process.hasUncaughtExceptionCaptureCallback\");\n\t}\n\tinitgroups() {\n\t\tthrow createNotImplementedError(\"process.initgroups\");\n\t}\n\topenStdin() {\n\t\tthrow createNotImplementedError(\"process.openStdin\");\n\t}\n\tassert() {\n\t\tthrow createNotImplementedError(\"process.assert\");\n\t}\n\tbinding() {\n\t\tthrow createNotImplementedError(\"process.binding\");\n\t}\n\tpermission = { has: /*@__PURE__*/ notImplemented(\"process.permission.has\") };\n\treport = {\n\t\tdirectory: \"\",\n\t\tfilename: \"\",\n\t\tsignal: \"SIGUSR2\",\n\t\tcompact: false,\n\t\treportOnFatalError: false,\n\t\treportOnSignal: false,\n\t\treportOnUncaughtException: false,\n\t\tgetReport: /*@__PURE__*/ notImplemented(\"process.report.getReport\"),\n\t\twriteReport: /*@__PURE__*/ notImplemented(\"process.report.writeReport\")\n\t};\n\tfinalization = {\n\t\tregister: /*@__PURE__*/ notImplemented(\"process.finalization.register\"),\n\t\tunregister: /*@__PURE__*/ notImplemented(\"process.finalization.unregister\"),\n\t\tregisterBeforeExit: /*@__PURE__*/ notImplemented(\"process.finalization.registerBeforeExit\")\n\t};\n\tmemoryUsage = Object.assign(() => ({\n\t\tarrayBuffers: 0,\n\t\trss: 0,\n\t\texternal: 0,\n\t\theapTotal: 0,\n\t\theapUsed: 0\n\t}), { rss: () => 0 });\n\tmainModule = undefined;\n\tdomain = undefined;\n\tsend = undefined;\n\texitCode = undefined;\n\tchannel = undefined;\n\tgetegid = undefined;\n\tgeteuid = undefined;\n\tgetgid = undefined;\n\tgetgroups = undefined;\n\tgetuid = undefined;\n\tsetegid = undefined;\n\tseteuid = undefined;\n\tsetgid = undefined;\n\tsetgroups = undefined;\n\tsetuid = undefined;\n\t_events = undefined;\n\t_eventsCount = undefined;\n\t_exiting = undefined;\n\t_maxListeners = undefined;\n\t_debugEnd = undefined;\n\t_debugProcess = undefined;\n\t_fatalException = undefined;\n\t_getActiveHandles = undefined;\n\t_getActiveRequests = undefined;\n\t_kill = undefined;\n\t_preload_modules = undefined;\n\t_rawDebug = undefined;\n\t_startProfilerIdleNotifier = undefined;\n\t_stopProfilerIdleNotifier = undefined;\n\t_tickCallback = undefined;\n\t_disconnect = undefined;\n\t_handleQueue = undefined;\n\t_pendingMessage = undefined;\n\t_channel = undefined;\n\t_send = undefined;\n\t_linkedBinding = undefined;\n}\n", "import { hrtime as UnenvHrTime } from \"unenv/node/internal/process/hrtime\";\nimport { Process as UnenvProcess } from \"unenv/node/internal/process/process\";\nconst globalProcess = globalThis[\"process\"];\nexport const getBuiltinModule = globalProcess.getBuiltinModule;\nexport const { exit, platform, nextTick } = getBuiltinModule(\n \"node:process\"\n);\nconst unenvProcess = new UnenvProcess({\n env: globalProcess.env,\n hrtime: UnenvHrTime,\n nextTick\n});\nexport const {\n abort,\n addListener,\n allowedNodeEnvironmentFlags,\n hasUncaughtExceptionCaptureCallback,\n setUncaughtExceptionCaptureCallback,\n loadEnvFile,\n sourceMapsEnabled,\n arch,\n argv,\n argv0,\n chdir,\n config,\n connected,\n constrainedMemory,\n availableMemory,\n cpuUsage,\n cwd,\n debugPort,\n dlopen,\n disconnect,\n emit,\n emitWarning,\n env,\n eventNames,\n execArgv,\n execPath,\n finalization,\n features,\n getActiveResourcesInfo,\n getMaxListeners,\n hrtime,\n kill,\n listeners,\n listenerCount,\n memoryUsage,\n on,\n off,\n once,\n pid,\n ppid,\n prependListener,\n prependOnceListener,\n rawListeners,\n release,\n removeAllListeners,\n removeListener,\n report,\n resourceUsage,\n setMaxListeners,\n setSourceMapsEnabled,\n stderr,\n stdin,\n stdout,\n title,\n throwDeprecation,\n traceDeprecation,\n umask,\n uptime,\n version,\n versions,\n domain,\n initgroups,\n moduleLoadList,\n reallyExit,\n openStdin,\n assert,\n binding,\n send,\n exitCode,\n channel,\n getegid,\n geteuid,\n getgid,\n getgroups,\n getuid,\n setegid,\n seteuid,\n setgid,\n setgroups,\n setuid,\n permission,\n mainModule,\n _events,\n _eventsCount,\n _exiting,\n _maxListeners,\n _debugEnd,\n _debugProcess,\n _fatalException,\n _getActiveHandles,\n _getActiveRequests,\n _kill,\n _preload_modules,\n _rawDebug,\n _startProfilerIdleNotifier,\n _stopProfilerIdleNotifier,\n _tickCallback,\n _disconnect,\n _handleQueue,\n _pendingMessage,\n _channel,\n _send,\n _linkedBinding\n} = unenvProcess;\nconst _process = {\n abort,\n addListener,\n allowedNodeEnvironmentFlags,\n hasUncaughtExceptionCaptureCallback,\n setUncaughtExceptionCaptureCallback,\n loadEnvFile,\n sourceMapsEnabled,\n arch,\n argv,\n argv0,\n chdir,\n config,\n connected,\n constrainedMemory,\n availableMemory,\n cpuUsage,\n cwd,\n debugPort,\n dlopen,\n disconnect,\n emit,\n emitWarning,\n env,\n eventNames,\n execArgv,\n execPath,\n exit,\n finalization,\n features,\n getBuiltinModule,\n getActiveResourcesInfo,\n getMaxListeners,\n hrtime,\n kill,\n listeners,\n listenerCount,\n memoryUsage,\n nextTick,\n on,\n off,\n once,\n pid,\n platform,\n ppid,\n prependListener,\n prependOnceListener,\n rawListeners,\n release,\n removeAllListeners,\n removeListener,\n report,\n resourceUsage,\n setMaxListeners,\n setSourceMapsEnabled,\n stderr,\n stdin,\n stdout,\n title,\n throwDeprecation,\n traceDeprecation,\n umask,\n uptime,\n version,\n versions,\n // @ts-expect-error old API\n domain,\n initgroups,\n moduleLoadList,\n reallyExit,\n openStdin,\n assert,\n binding,\n send,\n exitCode,\n channel,\n getegid,\n geteuid,\n getgid,\n getgroups,\n getuid,\n setegid,\n seteuid,\n setgid,\n setgroups,\n setuid,\n permission,\n mainModule,\n _events,\n _eventsCount,\n _exiting,\n _maxListeners,\n _debugEnd,\n _debugProcess,\n _fatalException,\n _getActiveHandles,\n _getActiveRequests,\n _kill,\n _preload_modules,\n _rawDebug,\n _startProfilerIdleNotifier,\n _stopProfilerIdleNotifier,\n _tickCallback,\n _disconnect,\n _handleQueue,\n _pendingMessage,\n _channel,\n _send,\n _linkedBinding\n};\nexport default _process;\n", "import { default as defaultExport } from \"@cloudflare/unenv-preset/node/process\";\nglobalThis.process = defaultExport;", "", "// `esbuild` doesn't support returning `watch*` options from `onStart()`\n// plugin callbacks. Instead, we define an empty virtual module that is\n// imported by this injected file. Importing the module registers watchers.\nimport \"wrangler:modules-watch\";\n", "// src/compose.ts\nvar compose = (middleware, onError, onNotFound) => {\n return (context, next) => {\n let index = -1;\n return dispatch(0);\n async function dispatch(i) {\n if (i <= index) {\n throw new Error(\"next() called multiple times\");\n }\n index = i;\n let res;\n let isError = false;\n let handler;\n if (middleware[i]) {\n handler = middleware[i][0][0];\n context.req.routeIndex = i;\n } else {\n handler = i === middleware.length && next || void 0;\n }\n if (handler) {\n try {\n res = await handler(context, () => dispatch(i + 1));\n } catch (err) {\n if (err instanceof Error && onError) {\n context.error = err;\n res = await onError(err, context);\n isError = true;\n } else {\n throw err;\n }\n }\n } else {\n if (context.finalized === false && onNotFound) {\n res = await onNotFound(context);\n }\n }\n if (res && (context.finalized === false || isError)) {\n context.res = res;\n }\n return context;\n }\n };\n};\nexport {\n compose\n};\n", "// src/http-exception.ts\nvar HTTPException = class extends Error {\n res;\n status;\n /**\n * Creates an instance of `HTTPException`.\n * @param status - HTTP status code for the exception. Defaults to 500.\n * @param options - Additional options for the exception.\n */\n constructor(status = 500, options) {\n super(options?.message, { cause: options?.cause });\n this.res = options?.res;\n this.status = status;\n }\n /**\n * Returns the response object associated with the exception.\n * If a response object is not provided, a new response is created with the error message and status code.\n * @returns The response object.\n */\n getResponse() {\n if (this.res) {\n const newResponse = new Response(this.res.body, {\n status: this.status,\n headers: this.res.headers\n });\n return newResponse;\n }\n return new Response(this.message, {\n status: this.status\n });\n }\n};\nexport {\n HTTPException\n};\n", "// src/request/constants.ts\nvar GET_MATCH_RESULT = /* @__PURE__ */ Symbol();\nexport {\n GET_MATCH_RESULT\n};\n", "// src/utils/body.ts\nimport { HonoRequest } from \"../request.js\";\nvar parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) => {\n const { all = false, dot = false } = options;\n const headers = request instanceof HonoRequest ? request.raw.headers : request.headers;\n const contentType = headers.get(\"Content-Type\");\n if (contentType?.startsWith(\"multipart/form-data\") || contentType?.startsWith(\"application/x-www-form-urlencoded\")) {\n return parseFormData(request, { all, dot });\n }\n return {};\n};\nasync function parseFormData(request, options) {\n const formData = await request.formData();\n if (formData) {\n return convertFormDataToBodyData(formData, options);\n }\n return {};\n}\nfunction convertFormDataToBodyData(formData, options) {\n const form = /* @__PURE__ */ Object.create(null);\n formData.forEach((value, key) => {\n const shouldParseAllValues = options.all || key.endsWith(\"[]\");\n if (!shouldParseAllValues) {\n form[key] = value;\n } else {\n handleParsingAllValues(form, key, value);\n }\n });\n if (options.dot) {\n Object.entries(form).forEach(([key, value]) => {\n const shouldParseDotValues = key.includes(\".\");\n if (shouldParseDotValues) {\n handleParsingNestedValues(form, key, value);\n delete form[key];\n }\n });\n }\n return form;\n}\nvar handleParsingAllValues = (form, key, value) => {\n if (form[key] !== void 0) {\n if (Array.isArray(form[key])) {\n ;\n form[key].push(value);\n } else {\n form[key] = [form[key], value];\n }\n } else {\n if (!key.endsWith(\"[]\")) {\n form[key] = value;\n } else {\n form[key] = [value];\n }\n }\n};\nvar handleParsingNestedValues = (form, key, value) => {\n if (/(?:^|\\.)__proto__\\./.test(key)) {\n return;\n }\n let nestedForm = form;\n const keys = key.split(\".\");\n keys.forEach((key2, index) => {\n if (index === keys.length - 1) {\n nestedForm[key2] = value;\n } else {\n if (!nestedForm[key2] || typeof nestedForm[key2] !== \"object\" || Array.isArray(nestedForm[key2]) || nestedForm[key2] instanceof File) {\n nestedForm[key2] = /* @__PURE__ */ Object.create(null);\n }\n nestedForm = nestedForm[key2];\n }\n });\n};\nexport {\n parseBody\n};\n", "// src/utils/url.ts\nvar splitPath = (path) => {\n const paths = path.split(\"/\");\n if (paths[0] === \"\") {\n paths.shift();\n }\n return paths;\n};\nvar splitRoutingPath = (routePath) => {\n const { groups, path } = extractGroupsFromPath(routePath);\n const paths = splitPath(path);\n return replaceGroupMarks(paths, groups);\n};\nvar extractGroupsFromPath = (path) => {\n const groups = [];\n path = path.replace(/\\{[^}]+\\}/g, (match, index) => {\n const mark = `@${index}`;\n groups.push([mark, match]);\n return mark;\n });\n return { groups, path };\n};\nvar replaceGroupMarks = (paths, groups) => {\n for (let i = groups.length - 1; i >= 0; i--) {\n const [mark] = groups[i];\n for (let j = paths.length - 1; j >= 0; j--) {\n if (paths[j].includes(mark)) {\n paths[j] = paths[j].replace(mark, groups[i][1]);\n break;\n }\n }\n }\n return paths;\n};\nvar patternCache = {};\nvar getPattern = (label, next) => {\n if (label === \"*\") {\n return \"*\";\n }\n const match = label.match(/^\\:([^\\{\\}]+)(?:\\{(.+)\\})?$/);\n if (match) {\n const cacheKey = `${label}#${next}`;\n if (!patternCache[cacheKey]) {\n if (match[2]) {\n patternCache[cacheKey] = next && next[0] !== \":\" && next[0] !== \"*\" ? [cacheKey, match[1], new RegExp(`^${match[2]}(?=/${next})`)] : [label, match[1], new RegExp(`^${match[2]}$`)];\n } else {\n patternCache[cacheKey] = [label, match[1], true];\n }\n }\n return patternCache[cacheKey];\n }\n return null;\n};\nvar tryDecode = (str, decoder) => {\n try {\n return decoder(str);\n } catch {\n return str.replace(/(?:%[0-9A-Fa-f]{2})+/g, (match) => {\n try {\n return decoder(match);\n } catch {\n return match;\n }\n });\n }\n};\nvar tryDecodeURI = (str) => tryDecode(str, decodeURI);\nvar getPath = (request) => {\n const url = request.url;\n const start = url.indexOf(\"/\", url.indexOf(\":\") + 4);\n let i = start;\n for (; i < url.length; i++) {\n const charCode = url.charCodeAt(i);\n if (charCode === 37) {\n const queryIndex = url.indexOf(\"?\", i);\n const hashIndex = url.indexOf(\"#\", i);\n const end = queryIndex === -1 ? hashIndex === -1 ? void 0 : hashIndex : hashIndex === -1 ? queryIndex : Math.min(queryIndex, hashIndex);\n const path = url.slice(start, end);\n return tryDecodeURI(path.includes(\"%25\") ? path.replace(/%25/g, \"%2525\") : path);\n } else if (charCode === 63 || charCode === 35) {\n break;\n }\n }\n return url.slice(start, i);\n};\nvar getQueryStrings = (url) => {\n const queryIndex = url.indexOf(\"?\", 8);\n return queryIndex === -1 ? \"\" : \"?\" + url.slice(queryIndex + 1);\n};\nvar getPathNoStrict = (request) => {\n const result = getPath(request);\n return result.length > 1 && result.at(-1) === \"/\" ? result.slice(0, -1) : result;\n};\nvar mergePath = (base, sub, ...rest) => {\n if (rest.length) {\n sub = mergePath(sub, ...rest);\n }\n return `${base?.[0] === \"/\" ? \"\" : \"/\"}${base}${sub === \"/\" ? \"\" : `${base?.at(-1) === \"/\" ? \"\" : \"/\"}${sub?.[0] === \"/\" ? sub.slice(1) : sub}`}`;\n};\nvar checkOptionalParameter = (path) => {\n if (path.charCodeAt(path.length - 1) !== 63 || !path.includes(\":\")) {\n return null;\n }\n const segments = path.split(\"/\");\n const results = [];\n let basePath = \"\";\n segments.forEach((segment) => {\n if (segment !== \"\" && !/\\:/.test(segment)) {\n basePath += \"/\" + segment;\n } else if (/\\:/.test(segment)) {\n if (/\\?/.test(segment)) {\n if (results.length === 0 && basePath === \"\") {\n results.push(\"/\");\n } else {\n results.push(basePath);\n }\n const optionalSegment = segment.replace(\"?\", \"\");\n basePath += \"/\" + optionalSegment;\n results.push(basePath);\n } else {\n basePath += \"/\" + segment;\n }\n }\n });\n return results.filter((v, i, a) => a.indexOf(v) === i);\n};\nvar _decodeURI = (value) => {\n if (!/[%+]/.test(value)) {\n return value;\n }\n if (value.indexOf(\"+\") !== -1) {\n value = value.replace(/\\+/g, \" \");\n }\n return value.indexOf(\"%\") !== -1 ? tryDecode(value, decodeURIComponent_) : value;\n};\nvar _getQueryParam = (url, key, multiple) => {\n let encoded;\n if (!multiple && key && !/[%+]/.test(key)) {\n let keyIndex2 = url.indexOf(\"?\", 8);\n if (keyIndex2 === -1) {\n return void 0;\n }\n if (!url.startsWith(key, keyIndex2 + 1)) {\n keyIndex2 = url.indexOf(`&${key}`, keyIndex2 + 1);\n }\n while (keyIndex2 !== -1) {\n const trailingKeyCode = url.charCodeAt(keyIndex2 + key.length + 1);\n if (trailingKeyCode === 61) {\n const valueIndex = keyIndex2 + key.length + 2;\n const endIndex = url.indexOf(\"&\", valueIndex);\n return _decodeURI(url.slice(valueIndex, endIndex === -1 ? void 0 : endIndex));\n } else if (trailingKeyCode == 38 || isNaN(trailingKeyCode)) {\n return \"\";\n }\n keyIndex2 = url.indexOf(`&${key}`, keyIndex2 + 1);\n }\n encoded = /[%+]/.test(url);\n if (!encoded) {\n return void 0;\n }\n }\n const results = {};\n encoded ??= /[%+]/.test(url);\n let keyIndex = url.indexOf(\"?\", 8);\n while (keyIndex !== -1) {\n const nextKeyIndex = url.indexOf(\"&\", keyIndex + 1);\n let valueIndex = url.indexOf(\"=\", keyIndex);\n if (valueIndex > nextKeyIndex && nextKeyIndex !== -1) {\n valueIndex = -1;\n }\n let name = url.slice(\n keyIndex + 1,\n valueIndex === -1 ? nextKeyIndex === -1 ? void 0 : nextKeyIndex : valueIndex\n );\n if (encoded) {\n name = _decodeURI(name);\n }\n keyIndex = nextKeyIndex;\n if (name === \"\") {\n continue;\n }\n let value;\n if (valueIndex === -1) {\n value = \"\";\n } else {\n value = url.slice(valueIndex + 1, nextKeyIndex === -1 ? void 0 : nextKeyIndex);\n if (encoded) {\n value = _decodeURI(value);\n }\n }\n if (multiple) {\n if (!(results[name] && Array.isArray(results[name]))) {\n results[name] = [];\n }\n ;\n results[name].push(value);\n } else {\n results[name] ??= value;\n }\n }\n return key ? results[key] : results;\n};\nvar getQueryParam = _getQueryParam;\nvar getQueryParams = (url, key) => {\n return _getQueryParam(url, key, true);\n};\nvar decodeURIComponent_ = decodeURIComponent;\nexport {\n checkOptionalParameter,\n decodeURIComponent_,\n getPath,\n getPathNoStrict,\n getPattern,\n getQueryParam,\n getQueryParams,\n getQueryStrings,\n mergePath,\n splitPath,\n splitRoutingPath,\n tryDecode,\n tryDecodeURI\n};\n", "// src/request.ts\nimport { HTTPException } from \"./http-exception.js\";\nimport { GET_MATCH_RESULT } from \"./request/constants.js\";\nimport { parseBody } from \"./utils/body.js\";\nimport { decodeURIComponent_, getQueryParam, getQueryParams, tryDecode } from \"./utils/url.js\";\nvar tryDecodeURIComponent = (str) => tryDecode(str, decodeURIComponent_);\nvar HonoRequest = class {\n /**\n * `.raw` can get the raw Request object.\n *\n * @see {@link https://hono.dev/docs/api/request#raw}\n *\n * @example\n * ```ts\n * // For Cloudflare Workers\n * app.post('/', async (c) => {\n * const metadata = c.req.raw.cf?.hostMetadata?\n * ...\n * })\n * ```\n */\n raw;\n #validatedData;\n // Short name of validatedData\n #matchResult;\n routeIndex = 0;\n /**\n * `.path` can get the pathname of the request.\n *\n * @see {@link https://hono.dev/docs/api/request#path}\n *\n * @example\n * ```ts\n * app.get('/about/me', (c) => {\n * const pathname = c.req.path // `/about/me`\n * })\n * ```\n */\n path;\n bodyCache = {};\n constructor(request, path = \"/\", matchResult = [[]]) {\n this.raw = request;\n this.path = path;\n this.#matchResult = matchResult;\n this.#validatedData = {};\n }\n param(key) {\n return key ? this.#getDecodedParam(key) : this.#getAllDecodedParams();\n }\n #getDecodedParam(key) {\n const paramKey = this.#matchResult[0][this.routeIndex][1][key];\n const param = this.#getParamValue(paramKey);\n return param && /\\%/.test(param) ? tryDecodeURIComponent(param) : param;\n }\n #getAllDecodedParams() {\n const decoded = {};\n const keys = Object.keys(this.#matchResult[0][this.routeIndex][1]);\n for (const key of keys) {\n const value = this.#getParamValue(this.#matchResult[0][this.routeIndex][1][key]);\n if (value !== void 0) {\n decoded[key] = /\\%/.test(value) ? tryDecodeURIComponent(value) : value;\n }\n }\n return decoded;\n }\n #getParamValue(paramKey) {\n return this.#matchResult[1] ? this.#matchResult[1][paramKey] : paramKey;\n }\n query(key) {\n return getQueryParam(this.url, key);\n }\n queries(key) {\n return getQueryParams(this.url, key);\n }\n header(name) {\n if (name) {\n return this.raw.headers.get(name) ?? void 0;\n }\n const headerData = {};\n this.raw.headers.forEach((value, key) => {\n headerData[key] = value;\n });\n return headerData;\n }\n async parseBody(options) {\n return parseBody(this, options);\n }\n #cachedBody = (key) => {\n const { bodyCache, raw } = this;\n const cachedBody = bodyCache[key];\n if (cachedBody) {\n return cachedBody;\n }\n const anyCachedKey = Object.keys(bodyCache)[0];\n if (anyCachedKey) {\n return bodyCache[anyCachedKey].then((body) => {\n if (anyCachedKey === \"json\") {\n body = JSON.stringify(body);\n }\n return new Response(body)[key]();\n });\n }\n return bodyCache[key] = raw[key]();\n };\n /**\n * `.json()` can parse Request body of type `application/json`\n *\n * @see {@link https://hono.dev/docs/api/request#json}\n *\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.json()\n * })\n * ```\n */\n json() {\n return this.#cachedBody(\"text\").then((text) => JSON.parse(text));\n }\n /**\n * `.text()` can parse Request body of type `text/plain`\n *\n * @see {@link https://hono.dev/docs/api/request#text}\n *\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.text()\n * })\n * ```\n */\n text() {\n return this.#cachedBody(\"text\");\n }\n /**\n * `.arrayBuffer()` parse Request body as an `ArrayBuffer`\n *\n * @see {@link https://hono.dev/docs/api/request#arraybuffer}\n *\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.arrayBuffer()\n * })\n * ```\n */\n arrayBuffer() {\n return this.#cachedBody(\"arrayBuffer\");\n }\n /**\n * Parses the request body as a `Blob`.\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.blob();\n * });\n * ```\n * @see https://hono.dev/docs/api/request#blob\n */\n blob() {\n return this.#cachedBody(\"blob\");\n }\n /**\n * Parses the request body as `FormData`.\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.formData();\n * });\n * ```\n * @see https://hono.dev/docs/api/request#formdata\n */\n formData() {\n return this.#cachedBody(\"formData\");\n }\n /**\n * Adds validated data to the request.\n *\n * @param target - The target of the validation.\n * @param data - The validated data to add.\n */\n addValidatedData(target, data) {\n this.#validatedData[target] = data;\n }\n valid(target) {\n return this.#validatedData[target];\n }\n /**\n * `.url()` can get the request url strings.\n *\n * @see {@link https://hono.dev/docs/api/request#url}\n *\n * @example\n * ```ts\n * app.get('/about/me', (c) => {\n * const url = c.req.url // `http://localhost:8787/about/me`\n * ...\n * })\n * ```\n */\n get url() {\n return this.raw.url;\n }\n /**\n * `.method()` can get the method name of the request.\n *\n * @see {@link https://hono.dev/docs/api/request#method}\n *\n * @example\n * ```ts\n * app.get('/about/me', (c) => {\n * const method = c.req.method // `GET`\n * })\n * ```\n */\n get method() {\n return this.raw.method;\n }\n get [GET_MATCH_RESULT]() {\n return this.#matchResult;\n }\n /**\n * `.matchedRoutes()` can return a matched route in the handler\n *\n * @deprecated\n *\n * Use matchedRoutes helper defined in \"hono/route\" instead.\n *\n * @see {@link https://hono.dev/docs/api/request#matchedroutes}\n *\n * @example\n * ```ts\n * app.use('*', async function logger(c, next) {\n * await next()\n * c.req.matchedRoutes.forEach(({ handler, method, path }, i) => {\n * const name = handler.name || (handler.length < 2 ? '[handler]' : '[middleware]')\n * console.log(\n * method,\n * ' ',\n * path,\n * ' '.repeat(Math.max(10 - path.length, 0)),\n * name,\n * i === c.req.routeIndex ? '<- respond from here' : ''\n * )\n * })\n * })\n * ```\n */\n get matchedRoutes() {\n return this.#matchResult[0].map(([[, route]]) => route);\n }\n /**\n * `routePath()` can retrieve the path registered within the handler\n *\n * @deprecated\n *\n * Use routePath helper defined in \"hono/route\" instead.\n *\n * @see {@link https://hono.dev/docs/api/request#routepath}\n *\n * @example\n * ```ts\n * app.get('/posts/:id', (c) => {\n * return c.json({ path: c.req.routePath })\n * })\n * ```\n */\n get routePath() {\n return this.#matchResult[0].map(([[, route]]) => route)[this.routeIndex].path;\n }\n};\nvar cloneRawRequest = async (req) => {\n if (!req.raw.bodyUsed) {\n return req.raw.clone();\n }\n const cacheKey = Object.keys(req.bodyCache)[0];\n if (!cacheKey) {\n throw new HTTPException(500, {\n message: \"Cannot clone request: body was already consumed and not cached. Please use HonoRequest methods (e.g., req.json(), req.text()) instead of consuming req.raw directly.\"\n });\n }\n const requestInit = {\n body: await req[cacheKey](),\n cache: req.raw.cache,\n credentials: req.raw.credentials,\n headers: req.header(),\n integrity: req.raw.integrity,\n keepalive: req.raw.keepalive,\n method: req.method,\n mode: req.raw.mode,\n redirect: req.raw.redirect,\n referrer: req.raw.referrer,\n referrerPolicy: req.raw.referrerPolicy,\n signal: req.raw.signal\n };\n return new Request(req.url, requestInit);\n};\nexport {\n HonoRequest,\n cloneRawRequest\n};\n", "// src/utils/html.ts\nvar HtmlEscapedCallbackPhase = {\n Stringify: 1,\n BeforeStream: 2,\n Stream: 3\n};\nvar raw = (value, callbacks) => {\n const escapedString = new String(value);\n escapedString.isEscaped = true;\n escapedString.callbacks = callbacks;\n return escapedString;\n};\nvar escapeRe = /[&<>'\"]/;\nvar stringBufferToString = async (buffer, callbacks) => {\n let str = \"\";\n callbacks ||= [];\n const resolvedBuffer = await Promise.all(buffer);\n for (let i = resolvedBuffer.length - 1; ; i--) {\n str += resolvedBuffer[i];\n i--;\n if (i < 0) {\n break;\n }\n let r = resolvedBuffer[i];\n if (typeof r === \"object\") {\n callbacks.push(...r.callbacks || []);\n }\n const isEscaped = r.isEscaped;\n r = await (typeof r === \"object\" ? r.toString() : r);\n if (typeof r === \"object\") {\n callbacks.push(...r.callbacks || []);\n }\n if (r.isEscaped ?? isEscaped) {\n str += r;\n } else {\n const buf = [str];\n escapeToBuffer(r, buf);\n str = buf[0];\n }\n }\n return raw(str, callbacks);\n};\nvar escapeToBuffer = (str, buffer) => {\n const match = str.search(escapeRe);\n if (match === -1) {\n buffer[0] += str;\n return;\n }\n let escape;\n let index;\n let lastIndex = 0;\n for (index = match; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n escape = \""\";\n break;\n case 39:\n escape = \"'\";\n break;\n case 38:\n escape = \"&\";\n break;\n case 60:\n escape = \"<\";\n break;\n case 62:\n escape = \">\";\n break;\n default:\n continue;\n }\n buffer[0] += str.substring(lastIndex, index) + escape;\n lastIndex = index + 1;\n }\n buffer[0] += str.substring(lastIndex, index);\n};\nvar resolveCallbackSync = (str) => {\n const callbacks = str.callbacks;\n if (!callbacks?.length) {\n return str;\n }\n const buffer = [str];\n const context = {};\n callbacks.forEach((c) => c({ phase: HtmlEscapedCallbackPhase.Stringify, buffer, context }));\n return buffer[0];\n};\nvar resolveCallback = async (str, phase, preserveCallbacks, context, buffer) => {\n if (typeof str === \"object\" && !(str instanceof String)) {\n if (!(str instanceof Promise)) {\n str = str.toString();\n }\n if (str instanceof Promise) {\n str = await str;\n }\n }\n const callbacks = str.callbacks;\n if (!callbacks?.length) {\n return Promise.resolve(str);\n }\n if (buffer) {\n buffer[0] += str;\n } else {\n buffer = [str];\n }\n const resStr = Promise.all(callbacks.map((c) => c({ phase, buffer, context }))).then(\n (res) => Promise.all(\n res.filter(Boolean).map((str2) => resolveCallback(str2, phase, false, context, buffer))\n ).then(() => buffer[0])\n );\n if (preserveCallbacks) {\n return raw(await resStr, callbacks);\n } else {\n return resStr;\n }\n};\nexport {\n HtmlEscapedCallbackPhase,\n escapeToBuffer,\n raw,\n resolveCallback,\n resolveCallbackSync,\n stringBufferToString\n};\n", "// src/context.ts\nimport { HonoRequest } from \"./request.js\";\nimport { HtmlEscapedCallbackPhase, resolveCallback } from \"./utils/html.js\";\nvar TEXT_PLAIN = \"text/plain; charset=UTF-8\";\nvar setDefaultContentType = (contentType, headers) => {\n return {\n \"Content-Type\": contentType,\n ...headers\n };\n};\nvar createResponseInstance = (body, init) => new Response(body, init);\nvar Context = class {\n #rawRequest;\n #req;\n /**\n * `.env` can get bindings (environment variables, secrets, KV namespaces, D1 database, R2 bucket etc.) in Cloudflare Workers.\n *\n * @see {@link https://hono.dev/docs/api/context#env}\n *\n * @example\n * ```ts\n * // Environment object for Cloudflare Workers\n * app.get('*', async c => {\n * const counter = c.env.COUNTER\n * })\n * ```\n */\n env = {};\n #var;\n finalized = false;\n /**\n * `.error` can get the error object from the middleware if the Handler throws an error.\n *\n * @see {@link https://hono.dev/docs/api/context#error}\n *\n * @example\n * ```ts\n * app.use('*', async (c, next) => {\n * await next()\n * if (c.error) {\n * // do something...\n * }\n * })\n * ```\n */\n error;\n #status;\n #executionCtx;\n #res;\n #layout;\n #renderer;\n #notFoundHandler;\n #preparedHeaders;\n #matchResult;\n #path;\n /**\n * Creates an instance of the Context class.\n *\n * @param req - The Request object.\n * @param options - Optional configuration options for the context.\n */\n constructor(req, options) {\n this.#rawRequest = req;\n if (options) {\n this.#executionCtx = options.executionCtx;\n this.env = options.env;\n this.#notFoundHandler = options.notFoundHandler;\n this.#path = options.path;\n this.#matchResult = options.matchResult;\n }\n }\n /**\n * `.req` is the instance of {@link HonoRequest}.\n */\n get req() {\n this.#req ??= new HonoRequest(this.#rawRequest, this.#path, this.#matchResult);\n return this.#req;\n }\n /**\n * @see {@link https://hono.dev/docs/api/context#event}\n * The FetchEvent associated with the current request.\n *\n * @throws Will throw an error if the context does not have a FetchEvent.\n */\n get event() {\n if (this.#executionCtx && \"respondWith\" in this.#executionCtx) {\n return this.#executionCtx;\n } else {\n throw Error(\"This context has no FetchEvent\");\n }\n }\n /**\n * @see {@link https://hono.dev/docs/api/context#executionctx}\n * The ExecutionContext associated with the current request.\n *\n * @throws Will throw an error if the context does not have an ExecutionContext.\n */\n get executionCtx() {\n if (this.#executionCtx) {\n return this.#executionCtx;\n } else {\n throw Error(\"This context has no ExecutionContext\");\n }\n }\n /**\n * @see {@link https://hono.dev/docs/api/context#res}\n * The Response object for the current request.\n */\n get res() {\n return this.#res ||= createResponseInstance(null, {\n headers: this.#preparedHeaders ??= new Headers()\n });\n }\n /**\n * Sets the Response object for the current request.\n *\n * @param _res - The Response object to set.\n */\n set res(_res) {\n if (this.#res && _res) {\n _res = createResponseInstance(_res.body, _res);\n for (const [k, v] of this.#res.headers.entries()) {\n if (k === \"content-type\") {\n continue;\n }\n if (k === \"set-cookie\") {\n const cookies = this.#res.headers.getSetCookie();\n _res.headers.delete(\"set-cookie\");\n for (const cookie of cookies) {\n _res.headers.append(\"set-cookie\", cookie);\n }\n } else {\n _res.headers.set(k, v);\n }\n }\n }\n this.#res = _res;\n this.finalized = true;\n }\n /**\n * `.render()` can create a response within a layout.\n *\n * @see {@link https://hono.dev/docs/api/context#render-setrenderer}\n *\n * @example\n * ```ts\n * app.get('/', (c) => {\n * return c.render('Hello!')\n * })\n * ```\n */\n render = (...args) => {\n this.#renderer ??= (content) => this.html(content);\n return this.#renderer(...args);\n };\n /**\n * Sets the layout for the response.\n *\n * @param layout - The layout to set.\n * @returns The layout function.\n */\n setLayout = (layout) => this.#layout = layout;\n /**\n * Gets the current layout for the response.\n *\n * @returns The current layout function.\n */\n getLayout = () => this.#layout;\n /**\n * `.setRenderer()` can set the layout in the custom middleware.\n *\n * @see {@link https://hono.dev/docs/api/context#render-setrenderer}\n *\n * @example\n * ```tsx\n * app.use('*', async (c, next) => {\n * c.setRenderer((content) => {\n * return c.html(\n * \n * \n *

{content}

\n * \n * \n * )\n * })\n * await next()\n * })\n * ```\n */\n setRenderer = (renderer) => {\n this.#renderer = renderer;\n };\n /**\n * `.header()` can set headers.\n *\n * @see {@link https://hono.dev/docs/api/context#header}\n *\n * @example\n * ```ts\n * app.get('/welcome', (c) => {\n * // Set headers\n * c.header('X-Message', 'Hello!')\n * c.header('Content-Type', 'text/plain')\n *\n * return c.body('Thank you for coming')\n * })\n * ```\n */\n header = (name, value, options) => {\n if (this.finalized) {\n this.#res = createResponseInstance(this.#res.body, this.#res);\n }\n const headers = this.#res ? this.#res.headers : this.#preparedHeaders ??= new Headers();\n if (value === void 0) {\n headers.delete(name);\n } else if (options?.append) {\n headers.append(name, value);\n } else {\n headers.set(name, value);\n }\n };\n status = (status) => {\n this.#status = status;\n };\n /**\n * `.set()` can set the value specified by the key.\n *\n * @see {@link https://hono.dev/docs/api/context#set-get}\n *\n * @example\n * ```ts\n * app.use('*', async (c, next) => {\n * c.set('message', 'Hono is hot!!')\n * await next()\n * })\n * ```\n */\n set = (key, value) => {\n this.#var ??= /* @__PURE__ */ new Map();\n this.#var.set(key, value);\n };\n /**\n * `.get()` can use the value specified by the key.\n *\n * @see {@link https://hono.dev/docs/api/context#set-get}\n *\n * @example\n * ```ts\n * app.get('/', (c) => {\n * const message = c.get('message')\n * return c.text(`The message is \"${message}\"`)\n * })\n * ```\n */\n get = (key) => {\n return this.#var ? this.#var.get(key) : void 0;\n };\n /**\n * `.var` can access the value of a variable.\n *\n * @see {@link https://hono.dev/docs/api/context#var}\n *\n * @example\n * ```ts\n * const result = c.var.client.oneMethod()\n * ```\n */\n // c.var.propName is a read-only\n get var() {\n if (!this.#var) {\n return {};\n }\n return Object.fromEntries(this.#var);\n }\n #newResponse(data, arg, headers) {\n const responseHeaders = this.#res ? new Headers(this.#res.headers) : this.#preparedHeaders ?? new Headers();\n if (typeof arg === \"object\" && \"headers\" in arg) {\n const argHeaders = arg.headers instanceof Headers ? arg.headers : new Headers(arg.headers);\n for (const [key, value] of argHeaders) {\n if (key.toLowerCase() === \"set-cookie\") {\n responseHeaders.append(key, value);\n } else {\n responseHeaders.set(key, value);\n }\n }\n }\n if (headers) {\n for (const [k, v] of Object.entries(headers)) {\n if (typeof v === \"string\") {\n responseHeaders.set(k, v);\n } else {\n responseHeaders.delete(k);\n for (const v2 of v) {\n responseHeaders.append(k, v2);\n }\n }\n }\n }\n const status = typeof arg === \"number\" ? arg : arg?.status ?? this.#status;\n return createResponseInstance(data, { status, headers: responseHeaders });\n }\n newResponse = (...args) => this.#newResponse(...args);\n /**\n * `.body()` can return the HTTP response.\n * You can set headers with `.header()` and set HTTP status code with `.status`.\n * This can also be set in `.text()`, `.json()` and so on.\n *\n * @see {@link https://hono.dev/docs/api/context#body}\n *\n * @example\n * ```ts\n * app.get('/welcome', (c) => {\n * // Set headers\n * c.header('X-Message', 'Hello!')\n * c.header('Content-Type', 'text/plain')\n * // Set HTTP status code\n * c.status(201)\n *\n * // Return the response body\n * return c.body('Thank you for coming')\n * })\n * ```\n */\n body = (data, arg, headers) => this.#newResponse(data, arg, headers);\n /**\n * `.text()` can render text as `Content-Type:text/plain`.\n *\n * @see {@link https://hono.dev/docs/api/context#text}\n *\n * @example\n * ```ts\n * app.get('/say', (c) => {\n * return c.text('Hello!')\n * })\n * ```\n */\n text = (text, arg, headers) => {\n return !this.#preparedHeaders && !this.#status && !arg && !headers && !this.finalized ? new Response(text) : this.#newResponse(\n text,\n arg,\n setDefaultContentType(TEXT_PLAIN, headers)\n );\n };\n /**\n * `.json()` can render JSON as `Content-Type:application/json`.\n *\n * @see {@link https://hono.dev/docs/api/context#json}\n *\n * @example\n * ```ts\n * app.get('/api', (c) => {\n * return c.json({ message: 'Hello!' })\n * })\n * ```\n */\n json = (object, arg, headers) => {\n return this.#newResponse(\n JSON.stringify(object),\n arg,\n setDefaultContentType(\"application/json\", headers)\n );\n };\n html = (html, arg, headers) => {\n const res = (html2) => this.#newResponse(html2, arg, setDefaultContentType(\"text/html; charset=UTF-8\", headers));\n return typeof html === \"object\" ? resolveCallback(html, HtmlEscapedCallbackPhase.Stringify, false, {}).then(res) : res(html);\n };\n /**\n * `.redirect()` can Redirect, default status code is 302.\n *\n * @see {@link https://hono.dev/docs/api/context#redirect}\n *\n * @example\n * ```ts\n * app.get('/redirect', (c) => {\n * return c.redirect('/')\n * })\n * app.get('/redirect-permanently', (c) => {\n * return c.redirect('/', 301)\n * })\n * ```\n */\n redirect = (location, status) => {\n const locationString = String(location);\n this.header(\n \"Location\",\n // Multibyes should be encoded\n // eslint-disable-next-line no-control-regex\n !/[^\\x00-\\xFF]/.test(locationString) ? locationString : encodeURI(locationString)\n );\n return this.newResponse(null, status ?? 302);\n };\n /**\n * `.notFound()` can return the Not Found Response.\n *\n * @see {@link https://hono.dev/docs/api/context#notfound}\n *\n * @example\n * ```ts\n * app.get('/notfound', (c) => {\n * return c.notFound()\n * })\n * ```\n */\n notFound = () => {\n this.#notFoundHandler ??= () => createResponseInstance();\n return this.#notFoundHandler(this);\n };\n};\nexport {\n Context,\n TEXT_PLAIN\n};\n", "// src/router.ts\nvar METHOD_NAME_ALL = \"ALL\";\nvar METHOD_NAME_ALL_LOWERCASE = \"all\";\nvar METHODS = [\"get\", \"post\", \"put\", \"delete\", \"options\", \"patch\"];\nvar MESSAGE_MATCHER_IS_ALREADY_BUILT = \"Can not add a route since the matcher is already built.\";\nvar UnsupportedPathError = class extends Error {\n};\nexport {\n MESSAGE_MATCHER_IS_ALREADY_BUILT,\n METHODS,\n METHOD_NAME_ALL,\n METHOD_NAME_ALL_LOWERCASE,\n UnsupportedPathError\n};\n", "// src/utils/constants.ts\nvar COMPOSED_HANDLER = \"__COMPOSED_HANDLER\";\nexport {\n COMPOSED_HANDLER\n};\n", "// src/hono-base.ts\nimport { compose } from \"./compose.js\";\nimport { Context } from \"./context.js\";\nimport { METHODS, METHOD_NAME_ALL, METHOD_NAME_ALL_LOWERCASE } from \"./router.js\";\nimport { COMPOSED_HANDLER } from \"./utils/constants.js\";\nimport { getPath, getPathNoStrict, mergePath } from \"./utils/url.js\";\nvar notFoundHandler = (c) => {\n return c.text(\"404 Not Found\", 404);\n};\nvar errorHandler = (err, c) => {\n if (\"getResponse\" in err) {\n const res = err.getResponse();\n return c.newResponse(res.body, res);\n }\n console.error(err);\n return c.text(\"Internal Server Error\", 500);\n};\nvar Hono = class _Hono {\n get;\n post;\n put;\n delete;\n options;\n patch;\n all;\n on;\n use;\n /*\n This class is like an abstract class and does not have a router.\n To use it, inherit the class and implement router in the constructor.\n */\n router;\n getPath;\n // Cannot use `#` because it requires visibility at JavaScript runtime.\n _basePath = \"/\";\n #path = \"/\";\n routes = [];\n constructor(options = {}) {\n const allMethods = [...METHODS, METHOD_NAME_ALL_LOWERCASE];\n allMethods.forEach((method) => {\n this[method] = (args1, ...args) => {\n if (typeof args1 === \"string\") {\n this.#path = args1;\n } else {\n this.#addRoute(method, this.#path, args1);\n }\n args.forEach((handler) => {\n this.#addRoute(method, this.#path, handler);\n });\n return this;\n };\n });\n this.on = (method, path, ...handlers) => {\n for (const p of [path].flat()) {\n this.#path = p;\n for (const m of [method].flat()) {\n handlers.map((handler) => {\n this.#addRoute(m.toUpperCase(), this.#path, handler);\n });\n }\n }\n return this;\n };\n this.use = (arg1, ...handlers) => {\n if (typeof arg1 === \"string\") {\n this.#path = arg1;\n } else {\n this.#path = \"*\";\n handlers.unshift(arg1);\n }\n handlers.forEach((handler) => {\n this.#addRoute(METHOD_NAME_ALL, this.#path, handler);\n });\n return this;\n };\n const { strict, ...optionsWithoutStrict } = options;\n Object.assign(this, optionsWithoutStrict);\n this.getPath = strict ?? true ? options.getPath ?? getPath : getPathNoStrict;\n }\n #clone() {\n const clone = new _Hono({\n router: this.router,\n getPath: this.getPath\n });\n clone.errorHandler = this.errorHandler;\n clone.#notFoundHandler = this.#notFoundHandler;\n clone.routes = this.routes;\n return clone;\n }\n #notFoundHandler = notFoundHandler;\n // Cannot use `#` because it requires visibility at JavaScript runtime.\n errorHandler = errorHandler;\n /**\n * `.route()` allows grouping other Hono instance in routes.\n *\n * @see {@link https://hono.dev/docs/api/routing#grouping}\n *\n * @param {string} path - base Path\n * @param {Hono} app - other Hono instance\n * @returns {Hono} routed Hono instance\n *\n * @example\n * ```ts\n * const app = new Hono()\n * const app2 = new Hono()\n *\n * app2.get(\"/user\", (c) => c.text(\"user\"))\n * app.route(\"/api\", app2) // GET /api/user\n * ```\n */\n route(path, app) {\n const subApp = this.basePath(path);\n app.routes.map((r) => {\n let handler;\n if (app.errorHandler === errorHandler) {\n handler = r.handler;\n } else {\n handler = async (c, next) => (await compose([], app.errorHandler)(c, () => r.handler(c, next))).res;\n handler[COMPOSED_HANDLER] = r.handler;\n }\n subApp.#addRoute(r.method, r.path, handler);\n });\n return this;\n }\n /**\n * `.basePath()` allows base paths to be specified.\n *\n * @see {@link https://hono.dev/docs/api/routing#base-path}\n *\n * @param {string} path - base Path\n * @returns {Hono} changed Hono instance\n *\n * @example\n * ```ts\n * const api = new Hono().basePath('/api')\n * ```\n */\n basePath(path) {\n const subApp = this.#clone();\n subApp._basePath = mergePath(this._basePath, path);\n return subApp;\n }\n /**\n * `.onError()` handles an error and returns a customized Response.\n *\n * @see {@link https://hono.dev/docs/api/hono#error-handling}\n *\n * @param {ErrorHandler} handler - request Handler for error\n * @returns {Hono} changed Hono instance\n *\n * @example\n * ```ts\n * app.onError((err, c) => {\n * console.error(`${err}`)\n * return c.text('Custom Error Message', 500)\n * })\n * ```\n */\n onError = (handler) => {\n this.errorHandler = handler;\n return this;\n };\n /**\n * `.notFound()` allows you to customize a Not Found Response.\n *\n * @see {@link https://hono.dev/docs/api/hono#not-found}\n *\n * @param {NotFoundHandler} handler - request handler for not-found\n * @returns {Hono} changed Hono instance\n *\n * @example\n * ```ts\n * app.notFound((c) => {\n * return c.text('Custom 404 Message', 404)\n * })\n * ```\n */\n notFound = (handler) => {\n this.#notFoundHandler = handler;\n return this;\n };\n /**\n * `.mount()` allows you to mount applications built with other frameworks into your Hono application.\n *\n * @see {@link https://hono.dev/docs/api/hono#mount}\n *\n * @param {string} path - base Path\n * @param {Function} applicationHandler - other Request Handler\n * @param {MountOptions} [options] - options of `.mount()`\n * @returns {Hono} mounted Hono instance\n *\n * @example\n * ```ts\n * import { Router as IttyRouter } from 'itty-router'\n * import { Hono } from 'hono'\n * // Create itty-router application\n * const ittyRouter = IttyRouter()\n * // GET /itty-router/hello\n * ittyRouter.get('/hello', () => new Response('Hello from itty-router'))\n *\n * const app = new Hono()\n * app.mount('/itty-router', ittyRouter.handle)\n * ```\n *\n * @example\n * ```ts\n * const app = new Hono()\n * // Send the request to another application without modification.\n * app.mount('/app', anotherApp, {\n * replaceRequest: (req) => req,\n * })\n * ```\n */\n mount(path, applicationHandler, options) {\n let replaceRequest;\n let optionHandler;\n if (options) {\n if (typeof options === \"function\") {\n optionHandler = options;\n } else {\n optionHandler = options.optionHandler;\n if (options.replaceRequest === false) {\n replaceRequest = (request) => request;\n } else {\n replaceRequest = options.replaceRequest;\n }\n }\n }\n const getOptions = optionHandler ? (c) => {\n const options2 = optionHandler(c);\n return Array.isArray(options2) ? options2 : [options2];\n } : (c) => {\n let executionContext = void 0;\n try {\n executionContext = c.executionCtx;\n } catch {\n }\n return [c.env, executionContext];\n };\n replaceRequest ||= (() => {\n const mergedPath = mergePath(this._basePath, path);\n const pathPrefixLength = mergedPath === \"/\" ? 0 : mergedPath.length;\n return (request) => {\n const url = new URL(request.url);\n url.pathname = url.pathname.slice(pathPrefixLength) || \"/\";\n return new Request(url, request);\n };\n })();\n const handler = async (c, next) => {\n const res = await applicationHandler(replaceRequest(c.req.raw), ...getOptions(c));\n if (res) {\n return res;\n }\n await next();\n };\n this.#addRoute(METHOD_NAME_ALL, mergePath(path, \"*\"), handler);\n return this;\n }\n #addRoute(method, path, handler) {\n method = method.toUpperCase();\n path = mergePath(this._basePath, path);\n const r = { basePath: this._basePath, path, method, handler };\n this.router.add(method, path, [handler, r]);\n this.routes.push(r);\n }\n #handleError(err, c) {\n if (err instanceof Error) {\n return this.errorHandler(err, c);\n }\n throw err;\n }\n #dispatch(request, executionCtx, env, method) {\n if (method === \"HEAD\") {\n return (async () => new Response(null, await this.#dispatch(request, executionCtx, env, \"GET\")))();\n }\n const path = this.getPath(request, { env });\n const matchResult = this.router.match(method, path);\n const c = new Context(request, {\n path,\n matchResult,\n env,\n executionCtx,\n notFoundHandler: this.#notFoundHandler\n });\n if (matchResult[0].length === 1) {\n let res;\n try {\n res = matchResult[0][0][0][0](c, async () => {\n c.res = await this.#notFoundHandler(c);\n });\n } catch (err) {\n return this.#handleError(err, c);\n }\n return res instanceof Promise ? res.then(\n (resolved) => resolved || (c.finalized ? c.res : this.#notFoundHandler(c))\n ).catch((err) => this.#handleError(err, c)) : res ?? this.#notFoundHandler(c);\n }\n const composed = compose(matchResult[0], this.errorHandler, this.#notFoundHandler);\n return (async () => {\n try {\n const context = await composed(c);\n if (!context.finalized) {\n throw new Error(\n \"Context is not finalized. Did you forget to return a Response object or `await next()`?\"\n );\n }\n return context.res;\n } catch (err) {\n return this.#handleError(err, c);\n }\n })();\n }\n /**\n * `.fetch()` will be entry point of your app.\n *\n * @see {@link https://hono.dev/docs/api/hono#fetch}\n *\n * @param {Request} request - request Object of request\n * @param {Env} Env - env Object\n * @param {ExecutionContext} - context of execution\n * @returns {Response | Promise} response of request\n *\n */\n fetch = (request, ...rest) => {\n return this.#dispatch(request, rest[1], rest[0], request.method);\n };\n /**\n * `.request()` is a useful method for testing.\n * You can pass a URL or pathname to send a GET request.\n * app will return a Response object.\n * ```ts\n * test('GET /hello is ok', async () => {\n * const res = await app.request('/hello')\n * expect(res.status).toBe(200)\n * })\n * ```\n * @see https://hono.dev/docs/api/hono#request\n */\n request = (input, requestInit, Env, executionCtx) => {\n if (input instanceof Request) {\n return this.fetch(requestInit ? new Request(input, requestInit) : input, Env, executionCtx);\n }\n input = input.toString();\n return this.fetch(\n new Request(\n /^https?:\\/\\//.test(input) ? input : `http://localhost${mergePath(\"/\", input)}`,\n requestInit\n ),\n Env,\n executionCtx\n );\n };\n /**\n * `.fire()` automatically adds a global fetch event listener.\n * This can be useful for environments that adhere to the Service Worker API, such as non-ES module Cloudflare Workers.\n * @deprecated\n * Use `fire` from `hono/service-worker` instead.\n * ```ts\n * import { Hono } from 'hono'\n * import { fire } from 'hono/service-worker'\n *\n * const app = new Hono()\n * // ...\n * fire(app)\n * ```\n * @see https://hono.dev/docs/api/hono#fire\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API\n * @see https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/\n */\n fire = () => {\n addEventListener(\"fetch\", (event) => {\n event.respondWith(this.#dispatch(event.request, event, void 0, event.request.method));\n });\n };\n};\nexport {\n Hono as HonoBase\n};\n", "// src/router/reg-exp-router/matcher.ts\nimport { METHOD_NAME_ALL } from \"../../router.js\";\nvar emptyParam = [];\nfunction match(method, path) {\n const matchers = this.buildAllMatchers();\n const match2 = ((method2, path2) => {\n const matcher = matchers[method2] || matchers[METHOD_NAME_ALL];\n const staticMatch = matcher[2][path2];\n if (staticMatch) {\n return staticMatch;\n }\n const match3 = path2.match(matcher[0]);\n if (!match3) {\n return [[], emptyParam];\n }\n const index = match3.indexOf(\"\", 1);\n return [matcher[1][index], match3];\n });\n this.match = match2;\n return match2(method, path);\n}\nexport {\n emptyParam,\n match\n};\n", "// src/router/reg-exp-router/node.ts\nvar LABEL_REG_EXP_STR = \"[^/]+\";\nvar ONLY_WILDCARD_REG_EXP_STR = \".*\";\nvar TAIL_WILDCARD_REG_EXP_STR = \"(?:|/.*)\";\nvar PATH_ERROR = /* @__PURE__ */ Symbol();\nvar regExpMetaChars = new Set(\".\\\\+*[^]$()\");\nfunction compareKey(a, b) {\n if (a.length === 1) {\n return b.length === 1 ? a < b ? -1 : 1 : -1;\n }\n if (b.length === 1) {\n return 1;\n }\n if (a === ONLY_WILDCARD_REG_EXP_STR || a === TAIL_WILDCARD_REG_EXP_STR) {\n return 1;\n } else if (b === ONLY_WILDCARD_REG_EXP_STR || b === TAIL_WILDCARD_REG_EXP_STR) {\n return -1;\n }\n if (a === LABEL_REG_EXP_STR) {\n return 1;\n } else if (b === LABEL_REG_EXP_STR) {\n return -1;\n }\n return a.length === b.length ? a < b ? -1 : 1 : b.length - a.length;\n}\nvar Node = class _Node {\n #index;\n #varIndex;\n #children = /* @__PURE__ */ Object.create(null);\n insert(tokens, index, paramMap, context, pathErrorCheckOnly) {\n if (tokens.length === 0) {\n if (this.#index !== void 0) {\n throw PATH_ERROR;\n }\n if (pathErrorCheckOnly) {\n return;\n }\n this.#index = index;\n return;\n }\n const [token, ...restTokens] = tokens;\n const pattern = token === \"*\" ? restTokens.length === 0 ? [\"\", \"\", ONLY_WILDCARD_REG_EXP_STR] : [\"\", \"\", LABEL_REG_EXP_STR] : token === \"/*\" ? [\"\", \"\", TAIL_WILDCARD_REG_EXP_STR] : token.match(/^\\:([^\\{\\}]+)(?:\\{(.+)\\})?$/);\n let node;\n if (pattern) {\n const name = pattern[1];\n let regexpStr = pattern[2] || LABEL_REG_EXP_STR;\n if (name && pattern[2]) {\n if (regexpStr === \".*\") {\n throw PATH_ERROR;\n }\n regexpStr = regexpStr.replace(/^\\((?!\\?:)(?=[^)]+\\)$)/, \"(?:\");\n if (/\\((?!\\?:)/.test(regexpStr)) {\n throw PATH_ERROR;\n }\n }\n node = this.#children[regexpStr];\n if (!node) {\n if (Object.keys(this.#children).some(\n (k) => k !== ONLY_WILDCARD_REG_EXP_STR && k !== TAIL_WILDCARD_REG_EXP_STR\n )) {\n throw PATH_ERROR;\n }\n if (pathErrorCheckOnly) {\n return;\n }\n node = this.#children[regexpStr] = new _Node();\n if (name !== \"\") {\n node.#varIndex = context.varIndex++;\n }\n }\n if (!pathErrorCheckOnly && name !== \"\") {\n paramMap.push([name, node.#varIndex]);\n }\n } else {\n node = this.#children[token];\n if (!node) {\n if (Object.keys(this.#children).some(\n (k) => k.length > 1 && k !== ONLY_WILDCARD_REG_EXP_STR && k !== TAIL_WILDCARD_REG_EXP_STR\n )) {\n throw PATH_ERROR;\n }\n if (pathErrorCheckOnly) {\n return;\n }\n node = this.#children[token] = new _Node();\n }\n }\n node.insert(restTokens, index, paramMap, context, pathErrorCheckOnly);\n }\n buildRegExpStr() {\n const childKeys = Object.keys(this.#children).sort(compareKey);\n const strList = childKeys.map((k) => {\n const c = this.#children[k];\n return (typeof c.#varIndex === \"number\" ? `(${k})@${c.#varIndex}` : regExpMetaChars.has(k) ? `\\\\${k}` : k) + c.buildRegExpStr();\n });\n if (typeof this.#index === \"number\") {\n strList.unshift(`#${this.#index}`);\n }\n if (strList.length === 0) {\n return \"\";\n }\n if (strList.length === 1) {\n return strList[0];\n }\n return \"(?:\" + strList.join(\"|\") + \")\";\n }\n};\nexport {\n Node,\n PATH_ERROR\n};\n", "// src/router/reg-exp-router/trie.ts\nimport { Node } from \"./node.js\";\nvar Trie = class {\n #context = { varIndex: 0 };\n #root = new Node();\n insert(path, index, pathErrorCheckOnly) {\n const paramAssoc = [];\n const groups = [];\n for (let i = 0; ; ) {\n let replaced = false;\n path = path.replace(/\\{[^}]+\\}/g, (m) => {\n const mark = `@\\\\${i}`;\n groups[i] = [mark, m];\n i++;\n replaced = true;\n return mark;\n });\n if (!replaced) {\n break;\n }\n }\n const tokens = path.match(/(?::[^\\/]+)|(?:\\/\\*$)|./g) || [];\n for (let i = groups.length - 1; i >= 0; i--) {\n const [mark] = groups[i];\n for (let j = tokens.length - 1; j >= 0; j--) {\n if (tokens[j].indexOf(mark) !== -1) {\n tokens[j] = tokens[j].replace(mark, groups[i][1]);\n break;\n }\n }\n }\n this.#root.insert(tokens, index, paramAssoc, this.#context, pathErrorCheckOnly);\n return paramAssoc;\n }\n buildRegExp() {\n let regexp = this.#root.buildRegExpStr();\n if (regexp === \"\") {\n return [/^$/, [], []];\n }\n let captureIndex = 0;\n const indexReplacementMap = [];\n const paramReplacementMap = [];\n regexp = regexp.replace(/#(\\d+)|@(\\d+)|\\.\\*\\$/g, (_, handlerIndex, paramIndex) => {\n if (handlerIndex !== void 0) {\n indexReplacementMap[++captureIndex] = Number(handlerIndex);\n return \"$()\";\n }\n if (paramIndex !== void 0) {\n paramReplacementMap[Number(paramIndex)] = ++captureIndex;\n return \"\";\n }\n return \"\";\n });\n return [new RegExp(`^${regexp}`), indexReplacementMap, paramReplacementMap];\n }\n};\nexport {\n Trie\n};\n", "// src/router/reg-exp-router/router.ts\nimport {\n MESSAGE_MATCHER_IS_ALREADY_BUILT,\n METHOD_NAME_ALL,\n UnsupportedPathError\n} from \"../../router.js\";\nimport { checkOptionalParameter } from \"../../utils/url.js\";\nimport { match, emptyParam } from \"./matcher.js\";\nimport { PATH_ERROR } from \"./node.js\";\nimport { Trie } from \"./trie.js\";\nvar nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];\nvar wildcardRegExpCache = /* @__PURE__ */ Object.create(null);\nfunction buildWildcardRegExp(path) {\n return wildcardRegExpCache[path] ??= new RegExp(\n path === \"*\" ? \"\" : `^${path.replace(\n /\\/\\*$|([.\\\\+*[^\\]$()])/g,\n (_, metaChar) => metaChar ? `\\\\${metaChar}` : \"(?:|/.*)\"\n )}$`\n );\n}\nfunction clearWildcardRegExpCache() {\n wildcardRegExpCache = /* @__PURE__ */ Object.create(null);\n}\nfunction buildMatcherFromPreprocessedRoutes(routes) {\n const trie = new Trie();\n const handlerData = [];\n if (routes.length === 0) {\n return nullMatcher;\n }\n const routesWithStaticPathFlag = routes.map(\n (route) => [!/\\*|\\/:/.test(route[0]), ...route]\n ).sort(\n ([isStaticA, pathA], [isStaticB, pathB]) => isStaticA ? 1 : isStaticB ? -1 : pathA.length - pathB.length\n );\n const staticMap = /* @__PURE__ */ Object.create(null);\n for (let i = 0, j = -1, len = routesWithStaticPathFlag.length; i < len; i++) {\n const [pathErrorCheckOnly, path, handlers] = routesWithStaticPathFlag[i];\n if (pathErrorCheckOnly) {\n staticMap[path] = [handlers.map(([h]) => [h, /* @__PURE__ */ Object.create(null)]), emptyParam];\n } else {\n j++;\n }\n let paramAssoc;\n try {\n paramAssoc = trie.insert(path, j, pathErrorCheckOnly);\n } catch (e) {\n throw e === PATH_ERROR ? new UnsupportedPathError(path) : e;\n }\n if (pathErrorCheckOnly) {\n continue;\n }\n handlerData[j] = handlers.map(([h, paramCount]) => {\n const paramIndexMap = /* @__PURE__ */ Object.create(null);\n paramCount -= 1;\n for (; paramCount >= 0; paramCount--) {\n const [key, value] = paramAssoc[paramCount];\n paramIndexMap[key] = value;\n }\n return [h, paramIndexMap];\n });\n }\n const [regexp, indexReplacementMap, paramReplacementMap] = trie.buildRegExp();\n for (let i = 0, len = handlerData.length; i < len; i++) {\n for (let j = 0, len2 = handlerData[i].length; j < len2; j++) {\n const map = handlerData[i][j]?.[1];\n if (!map) {\n continue;\n }\n const keys = Object.keys(map);\n for (let k = 0, len3 = keys.length; k < len3; k++) {\n map[keys[k]] = paramReplacementMap[map[keys[k]]];\n }\n }\n }\n const handlerMap = [];\n for (const i in indexReplacementMap) {\n handlerMap[i] = handlerData[indexReplacementMap[i]];\n }\n return [regexp, handlerMap, staticMap];\n}\nfunction findMiddleware(middleware, path) {\n if (!middleware) {\n return void 0;\n }\n for (const k of Object.keys(middleware).sort((a, b) => b.length - a.length)) {\n if (buildWildcardRegExp(k).test(path)) {\n return [...middleware[k]];\n }\n }\n return void 0;\n}\nvar RegExpRouter = class {\n name = \"RegExpRouter\";\n #middleware;\n #routes;\n constructor() {\n this.#middleware = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) };\n this.#routes = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) };\n }\n add(method, path, handler) {\n const middleware = this.#middleware;\n const routes = this.#routes;\n if (!middleware || !routes) {\n throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT);\n }\n if (!middleware[method]) {\n ;\n [middleware, routes].forEach((handlerMap) => {\n handlerMap[method] = /* @__PURE__ */ Object.create(null);\n Object.keys(handlerMap[METHOD_NAME_ALL]).forEach((p) => {\n handlerMap[method][p] = [...handlerMap[METHOD_NAME_ALL][p]];\n });\n });\n }\n if (path === \"/*\") {\n path = \"*\";\n }\n const paramCount = (path.match(/\\/:/g) || []).length;\n if (/\\*$/.test(path)) {\n const re = buildWildcardRegExp(path);\n if (method === METHOD_NAME_ALL) {\n Object.keys(middleware).forEach((m) => {\n middleware[m][path] ||= findMiddleware(middleware[m], path) || findMiddleware(middleware[METHOD_NAME_ALL], path) || [];\n });\n } else {\n middleware[method][path] ||= findMiddleware(middleware[method], path) || findMiddleware(middleware[METHOD_NAME_ALL], path) || [];\n }\n Object.keys(middleware).forEach((m) => {\n if (method === METHOD_NAME_ALL || method === m) {\n Object.keys(middleware[m]).forEach((p) => {\n re.test(p) && middleware[m][p].push([handler, paramCount]);\n });\n }\n });\n Object.keys(routes).forEach((m) => {\n if (method === METHOD_NAME_ALL || method === m) {\n Object.keys(routes[m]).forEach(\n (p) => re.test(p) && routes[m][p].push([handler, paramCount])\n );\n }\n });\n return;\n }\n const paths = checkOptionalParameter(path) || [path];\n for (let i = 0, len = paths.length; i < len; i++) {\n const path2 = paths[i];\n Object.keys(routes).forEach((m) => {\n if (method === METHOD_NAME_ALL || method === m) {\n routes[m][path2] ||= [\n ...findMiddleware(middleware[m], path2) || findMiddleware(middleware[METHOD_NAME_ALL], path2) || []\n ];\n routes[m][path2].push([handler, paramCount - len + i + 1]);\n }\n });\n }\n }\n match = match;\n buildAllMatchers() {\n const matchers = /* @__PURE__ */ Object.create(null);\n Object.keys(this.#routes).concat(Object.keys(this.#middleware)).forEach((method) => {\n matchers[method] ||= this.#buildMatcher(method);\n });\n this.#middleware = this.#routes = void 0;\n clearWildcardRegExpCache();\n return matchers;\n }\n #buildMatcher(method) {\n const routes = [];\n let hasOwnRoute = method === METHOD_NAME_ALL;\n [this.#middleware, this.#routes].forEach((r) => {\n const ownRoute = r[method] ? Object.keys(r[method]).map((path) => [path, r[method][path]]) : [];\n if (ownRoute.length !== 0) {\n hasOwnRoute ||= true;\n routes.push(...ownRoute);\n } else if (method !== METHOD_NAME_ALL) {\n routes.push(\n ...Object.keys(r[METHOD_NAME_ALL]).map((path) => [path, r[METHOD_NAME_ALL][path]])\n );\n }\n });\n if (!hasOwnRoute) {\n return null;\n } else {\n return buildMatcherFromPreprocessedRoutes(routes);\n }\n }\n};\nexport {\n RegExpRouter\n};\n", "// src/router/reg-exp-router/prepared-router.ts\nimport { METHOD_NAME_ALL } from \"../../router.js\";\nimport { match, emptyParam } from \"./matcher.js\";\nimport { RegExpRouter } from \"./router.js\";\nvar PreparedRegExpRouter = class {\n name = \"PreparedRegExpRouter\";\n #matchers;\n #relocateMap;\n constructor(matchers, relocateMap) {\n this.#matchers = matchers;\n this.#relocateMap = relocateMap;\n }\n #addWildcard(method, handlerData) {\n const matcher = this.#matchers[method];\n matcher[1].forEach((list) => list && list.push(handlerData));\n Object.values(matcher[2]).forEach((list) => list[0].push(handlerData));\n }\n #addPath(method, path, handler, indexes, map) {\n const matcher = this.#matchers[method];\n if (!map) {\n matcher[2][path][0].push([handler, {}]);\n } else {\n indexes.forEach((index) => {\n if (typeof index === \"number\") {\n matcher[1][index].push([handler, map]);\n } else {\n ;\n matcher[2][index || path][0].push([handler, map]);\n }\n });\n }\n }\n add(method, path, handler) {\n if (!this.#matchers[method]) {\n const all = this.#matchers[METHOD_NAME_ALL];\n const staticMap = {};\n for (const key in all[2]) {\n staticMap[key] = [all[2][key][0].slice(), emptyParam];\n }\n this.#matchers[method] = [\n all[0],\n all[1].map((list) => Array.isArray(list) ? list.slice() : 0),\n staticMap\n ];\n }\n if (path === \"/*\" || path === \"*\") {\n const handlerData = [handler, {}];\n if (method === METHOD_NAME_ALL) {\n for (const m in this.#matchers) {\n this.#addWildcard(m, handlerData);\n }\n } else {\n this.#addWildcard(method, handlerData);\n }\n return;\n }\n const data = this.#relocateMap[path];\n if (!data) {\n throw new Error(`Path ${path} is not registered`);\n }\n for (const [indexes, map] of data) {\n if (method === METHOD_NAME_ALL) {\n for (const m in this.#matchers) {\n this.#addPath(m, path, handler, indexes, map);\n }\n } else {\n this.#addPath(method, path, handler, indexes, map);\n }\n }\n }\n buildAllMatchers() {\n return this.#matchers;\n }\n match = match;\n};\nvar buildInitParams = ({ paths }) => {\n const RegExpRouterWithMatcherExport = class extends RegExpRouter {\n buildAndExportAllMatchers() {\n return this.buildAllMatchers();\n }\n };\n const router = new RegExpRouterWithMatcherExport();\n for (const path of paths) {\n router.add(METHOD_NAME_ALL, path, path);\n }\n const matchers = router.buildAndExportAllMatchers();\n const all = matchers[METHOD_NAME_ALL];\n const relocateMap = {};\n for (const path of paths) {\n if (path === \"/*\" || path === \"*\") {\n continue;\n }\n all[1].forEach((list, i) => {\n list.forEach(([p, map]) => {\n if (p === path) {\n if (relocateMap[path]) {\n relocateMap[path][0][1] = {\n ...relocateMap[path][0][1],\n ...map\n };\n } else {\n relocateMap[path] = [[[], map]];\n }\n if (relocateMap[path][0][0].findIndex((j) => j === i) === -1) {\n relocateMap[path][0][0].push(i);\n }\n }\n });\n });\n for (const path2 in all[2]) {\n all[2][path2][0].forEach(([p]) => {\n if (p === path) {\n relocateMap[path] ||= [[[]]];\n const value = path2 === path ? \"\" : path2;\n if (relocateMap[path][0][0].findIndex((v) => v === value) === -1) {\n relocateMap[path][0][0].push(value);\n }\n }\n });\n }\n }\n for (let i = 0, len = all[1].length; i < len; i++) {\n all[1][i] = all[1][i] ? [] : 0;\n }\n for (const path in all[2]) {\n all[2][path][0] = [];\n }\n return [matchers, relocateMap];\n};\nvar serializeInitParams = ([matchers, relocateMap]) => {\n const matchersStr = JSON.stringify(\n matchers,\n (_, value) => value instanceof RegExp ? `##${value.toString()}##` : value\n ).replace(/\"##(.+?)##\"/g, (_, str) => str.replace(/\\\\\\\\/g, \"\\\\\"));\n const relocateMapStr = JSON.stringify(relocateMap);\n return `[${matchersStr},${relocateMapStr}]`;\n};\nexport {\n PreparedRegExpRouter,\n buildInitParams,\n serializeInitParams\n};\n", "// src/router/reg-exp-router/index.ts\nimport { RegExpRouter } from \"./router.js\";\nimport { PreparedRegExpRouter, buildInitParams, serializeInitParams } from \"./prepared-router.js\";\nexport {\n PreparedRegExpRouter,\n RegExpRouter,\n buildInitParams,\n serializeInitParams\n};\n", "// src/router/smart-router/router.ts\nimport { MESSAGE_MATCHER_IS_ALREADY_BUILT, UnsupportedPathError } from \"../../router.js\";\nvar SmartRouter = class {\n name = \"SmartRouter\";\n #routers = [];\n #routes = [];\n constructor(init) {\n this.#routers = init.routers;\n }\n add(method, path, handler) {\n if (!this.#routes) {\n throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT);\n }\n this.#routes.push([method, path, handler]);\n }\n match(method, path) {\n if (!this.#routes) {\n throw new Error(\"Fatal error\");\n }\n const routers = this.#routers;\n const routes = this.#routes;\n const len = routers.length;\n let i = 0;\n let res;\n for (; i < len; i++) {\n const router = routers[i];\n try {\n for (let i2 = 0, len2 = routes.length; i2 < len2; i2++) {\n router.add(...routes[i2]);\n }\n res = router.match(method, path);\n } catch (e) {\n if (e instanceof UnsupportedPathError) {\n continue;\n }\n throw e;\n }\n this.match = router.match.bind(router);\n this.#routers = [router];\n this.#routes = void 0;\n break;\n }\n if (i === len) {\n throw new Error(\"Fatal error\");\n }\n this.name = `SmartRouter + ${this.activeRouter.name}`;\n return res;\n }\n get activeRouter() {\n if (this.#routes || this.#routers.length !== 1) {\n throw new Error(\"No active router has been determined yet.\");\n }\n return this.#routers[0];\n }\n};\nexport {\n SmartRouter\n};\n", "// src/router/smart-router/index.ts\nimport { SmartRouter } from \"./router.js\";\nexport {\n SmartRouter\n};\n", "// src/router/trie-router/node.ts\nimport { METHOD_NAME_ALL } from \"../../router.js\";\nimport { getPattern, splitPath, splitRoutingPath } from \"../../utils/url.js\";\nvar emptyParams = /* @__PURE__ */ Object.create(null);\nvar hasChildren = (children) => {\n for (const _ in children) {\n return true;\n }\n return false;\n};\nvar Node = class _Node {\n #methods;\n #children;\n #patterns;\n #order = 0;\n #params = emptyParams;\n constructor(method, handler, children) {\n this.#children = children || /* @__PURE__ */ Object.create(null);\n this.#methods = [];\n if (method && handler) {\n const m = /* @__PURE__ */ Object.create(null);\n m[method] = { handler, possibleKeys: [], score: 0 };\n this.#methods = [m];\n }\n this.#patterns = [];\n }\n insert(method, path, handler) {\n this.#order = ++this.#order;\n let curNode = this;\n const parts = splitRoutingPath(path);\n const possibleKeys = [];\n for (let i = 0, len = parts.length; i < len; i++) {\n const p = parts[i];\n const nextP = parts[i + 1];\n const pattern = getPattern(p, nextP);\n const key = Array.isArray(pattern) ? pattern[0] : p;\n if (key in curNode.#children) {\n curNode = curNode.#children[key];\n if (pattern) {\n possibleKeys.push(pattern[1]);\n }\n continue;\n }\n curNode.#children[key] = new _Node();\n if (pattern) {\n curNode.#patterns.push(pattern);\n possibleKeys.push(pattern[1]);\n }\n curNode = curNode.#children[key];\n }\n curNode.#methods.push({\n [method]: {\n handler,\n possibleKeys: possibleKeys.filter((v, i, a) => a.indexOf(v) === i),\n score: this.#order\n }\n });\n return curNode;\n }\n #pushHandlerSets(handlerSets, node, method, nodeParams, params) {\n for (let i = 0, len = node.#methods.length; i < len; i++) {\n const m = node.#methods[i];\n const handlerSet = m[method] || m[METHOD_NAME_ALL];\n const processedSet = {};\n if (handlerSet !== void 0) {\n handlerSet.params = /* @__PURE__ */ Object.create(null);\n handlerSets.push(handlerSet);\n if (nodeParams !== emptyParams || params && params !== emptyParams) {\n for (let i2 = 0, len2 = handlerSet.possibleKeys.length; i2 < len2; i2++) {\n const key = handlerSet.possibleKeys[i2];\n const processed = processedSet[handlerSet.score];\n handlerSet.params[key] = params?.[key] && !processed ? params[key] : nodeParams[key] ?? params?.[key];\n processedSet[handlerSet.score] = true;\n }\n }\n }\n }\n }\n search(method, path) {\n const handlerSets = [];\n this.#params = emptyParams;\n const curNode = this;\n let curNodes = [curNode];\n const parts = splitPath(path);\n const curNodesQueue = [];\n const len = parts.length;\n let partOffsets = null;\n for (let i = 0; i < len; i++) {\n const part = parts[i];\n const isLast = i === len - 1;\n const tempNodes = [];\n for (let j = 0, len2 = curNodes.length; j < len2; j++) {\n const node = curNodes[j];\n const nextNode = node.#children[part];\n if (nextNode) {\n nextNode.#params = node.#params;\n if (isLast) {\n if (nextNode.#children[\"*\"]) {\n this.#pushHandlerSets(handlerSets, nextNode.#children[\"*\"], method, node.#params);\n }\n this.#pushHandlerSets(handlerSets, nextNode, method, node.#params);\n } else {\n tempNodes.push(nextNode);\n }\n }\n for (let k = 0, len3 = node.#patterns.length; k < len3; k++) {\n const pattern = node.#patterns[k];\n const params = node.#params === emptyParams ? {} : { ...node.#params };\n if (pattern === \"*\") {\n const astNode = node.#children[\"*\"];\n if (astNode) {\n this.#pushHandlerSets(handlerSets, astNode, method, node.#params);\n astNode.#params = params;\n tempNodes.push(astNode);\n }\n continue;\n }\n const [key, name, matcher] = pattern;\n if (!part && !(matcher instanceof RegExp)) {\n continue;\n }\n const child = node.#children[key];\n if (matcher instanceof RegExp) {\n if (partOffsets === null) {\n partOffsets = new Array(len);\n let offset = path[0] === \"/\" ? 1 : 0;\n for (let p = 0; p < len; p++) {\n partOffsets[p] = offset;\n offset += parts[p].length + 1;\n }\n }\n const restPathString = path.substring(partOffsets[i]);\n const m = matcher.exec(restPathString);\n if (m) {\n params[name] = m[0];\n this.#pushHandlerSets(handlerSets, child, method, node.#params, params);\n if (hasChildren(child.#children)) {\n child.#params = params;\n const componentCount = m[0].match(/\\//)?.length ?? 0;\n const targetCurNodes = curNodesQueue[componentCount] ||= [];\n targetCurNodes.push(child);\n }\n continue;\n }\n }\n if (matcher === true || matcher.test(part)) {\n params[name] = part;\n if (isLast) {\n this.#pushHandlerSets(handlerSets, child, method, params, node.#params);\n if (child.#children[\"*\"]) {\n this.#pushHandlerSets(\n handlerSets,\n child.#children[\"*\"],\n method,\n params,\n node.#params\n );\n }\n } else {\n child.#params = params;\n tempNodes.push(child);\n }\n }\n }\n }\n const shifted = curNodesQueue.shift();\n curNodes = shifted ? tempNodes.concat(shifted) : tempNodes;\n }\n if (handlerSets.length > 1) {\n handlerSets.sort((a, b) => {\n return a.score - b.score;\n });\n }\n return [handlerSets.map(({ handler, params }) => [handler, params])];\n }\n};\nexport {\n Node\n};\n", "// src/router/trie-router/router.ts\nimport { checkOptionalParameter } from \"../../utils/url.js\";\nimport { Node } from \"./node.js\";\nvar TrieRouter = class {\n name = \"TrieRouter\";\n #node;\n constructor() {\n this.#node = new Node();\n }\n add(method, path, handler) {\n const results = checkOptionalParameter(path);\n if (results) {\n for (let i = 0, len = results.length; i < len; i++) {\n this.#node.insert(method, results[i], handler);\n }\n return;\n }\n this.#node.insert(method, path, handler);\n }\n match(method, path) {\n return this.#node.search(method, path);\n }\n};\nexport {\n TrieRouter\n};\n", "// src/router/trie-router/index.ts\nimport { TrieRouter } from \"./router.js\";\nexport {\n TrieRouter\n};\n", "// src/hono.ts\nimport { HonoBase } from \"./hono-base.js\";\nimport { RegExpRouter } from \"./router/reg-exp-router/index.js\";\nimport { SmartRouter } from \"./router/smart-router/index.js\";\nimport { TrieRouter } from \"./router/trie-router/index.js\";\nvar Hono = class extends HonoBase {\n /**\n * Creates an instance of the Hono class.\n *\n * @param options - Optional configuration options for the Hono instance.\n */\n constructor(options = {}) {\n super(options);\n this.router = options.router ?? new SmartRouter({\n routers: [new RegExpRouter(), new TrieRouter()]\n });\n }\n};\nexport {\n Hono\n};\n", "// src/index.ts\nimport { Hono } from \"./hono.js\";\nexport {\n Hono\n};\n", "// src/middleware/cors/index.ts\nvar cors = (options) => {\n const defaults = {\n origin: \"*\",\n allowMethods: [\"GET\", \"HEAD\", \"PUT\", \"POST\", \"DELETE\", \"PATCH\"],\n allowHeaders: [],\n exposeHeaders: []\n };\n const opts = {\n ...defaults,\n ...options\n };\n const findAllowOrigin = ((optsOrigin) => {\n if (typeof optsOrigin === \"string\") {\n if (optsOrigin === \"*\") {\n if (opts.credentials) {\n return (origin) => origin || null;\n }\n return () => optsOrigin;\n } else {\n return (origin) => optsOrigin === origin ? origin : null;\n }\n } else if (typeof optsOrigin === \"function\") {\n return optsOrigin;\n } else {\n return (origin) => optsOrigin.includes(origin) ? origin : null;\n }\n })(opts.origin);\n const findAllowMethods = ((optsAllowMethods) => {\n if (typeof optsAllowMethods === \"function\") {\n return optsAllowMethods;\n } else if (Array.isArray(optsAllowMethods)) {\n return () => optsAllowMethods;\n } else {\n return () => [];\n }\n })(opts.allowMethods);\n return async function cors2(c, next) {\n function set(key, value) {\n c.res.headers.set(key, value);\n }\n const allowOrigin = await findAllowOrigin(c.req.header(\"origin\") || \"\", c);\n if (allowOrigin) {\n set(\"Access-Control-Allow-Origin\", allowOrigin);\n }\n if (opts.credentials) {\n set(\"Access-Control-Allow-Credentials\", \"true\");\n }\n if (opts.exposeHeaders?.length) {\n set(\"Access-Control-Expose-Headers\", opts.exposeHeaders.join(\",\"));\n }\n if (c.req.method === \"OPTIONS\") {\n if (opts.origin !== \"*\" || opts.credentials) {\n set(\"Vary\", \"Origin\");\n }\n if (opts.maxAge != null) {\n set(\"Access-Control-Max-Age\", opts.maxAge.toString());\n }\n const allowMethods = await findAllowMethods(c.req.header(\"origin\") || \"\", c);\n if (allowMethods.length) {\n set(\"Access-Control-Allow-Methods\", allowMethods.join(\",\"));\n }\n let headers = opts.allowHeaders;\n if (!headers?.length) {\n const requestHeaders = c.req.header(\"Access-Control-Request-Headers\");\n if (requestHeaders) {\n headers = requestHeaders.split(/\\s*,\\s*/);\n }\n }\n if (headers?.length) {\n set(\"Access-Control-Allow-Headers\", headers.join(\",\"));\n c.res.headers.append(\"Vary\", \"Access-Control-Request-Headers\");\n }\n c.res.headers.delete(\"Content-Length\");\n c.res.headers.delete(\"Content-Type\");\n return new Response(null, {\n headers: c.res.headers,\n status: 204,\n statusText: \"No Content\"\n });\n }\n await next();\n if (opts.origin !== \"*\" || opts.credentials) {\n c.header(\"Vary\", \"Origin\", { append: true });\n }\n };\n};\nexport {\n cors\n};\n", "// src/utils/color.ts\nfunction getColorEnabled() {\n const { process, Deno } = globalThis;\n const isNoColor = typeof Deno?.noColor === \"boolean\" ? Deno.noColor : process !== void 0 ? (\n // eslint-disable-next-line no-unsafe-optional-chaining\n \"NO_COLOR\" in process?.env\n ) : false;\n return !isNoColor;\n}\nasync function getColorEnabledAsync() {\n const { navigator } = globalThis;\n const cfWorkers = \"cloudflare:workers\";\n const isNoColor = navigator !== void 0 && navigator.userAgent === \"Cloudflare-Workers\" ? await (async () => {\n try {\n return \"NO_COLOR\" in ((await import(cfWorkers)).env ?? {});\n } catch {\n return false;\n }\n })() : !getColorEnabled();\n return !isNoColor;\n}\nexport {\n getColorEnabled,\n getColorEnabledAsync\n};\n", "// src/middleware/logger/index.ts\nimport { getColorEnabledAsync } from \"../../utils/color.js\";\nvar humanize = (times) => {\n const [delimiter, separator] = [\",\", \".\"];\n const orderTimes = times.map((v) => v.replace(/(\\d)(?=(\\d\\d\\d)+(?!\\d))/g, \"$1\" + delimiter));\n return orderTimes.join(separator);\n};\nvar time = (start) => {\n const delta = Date.now() - start;\n return humanize([delta < 1e3 ? delta + \"ms\" : Math.round(delta / 1e3) + \"s\"]);\n};\nvar colorStatus = async (status) => {\n const colorEnabled = await getColorEnabledAsync();\n if (colorEnabled) {\n switch (status / 100 | 0) {\n case 5:\n return `\\x1B[31m${status}\\x1B[0m`;\n case 4:\n return `\\x1B[33m${status}\\x1B[0m`;\n case 3:\n return `\\x1B[36m${status}\\x1B[0m`;\n case 2:\n return `\\x1B[32m${status}\\x1B[0m`;\n }\n }\n return `${status}`;\n};\nasync function log(fn, prefix, method, path, status = 0, elapsed) {\n const out = prefix === \"<--\" /* Incoming */ ? `${prefix} ${method} ${path}` : `${prefix} ${method} ${path} ${await colorStatus(status)} ${elapsed}`;\n fn(out);\n}\nvar logger = (fn = console.log) => {\n return async function logger2(c, next) {\n const { method, url } = c.req;\n const path = url.slice(url.indexOf(\"/\", 8));\n await log(fn, \"<--\" /* Incoming */, method, path);\n const start = Date.now();\n await next();\n await log(fn, \"-->\" /* Outgoing */, method, path, c.res.status, time(start));\n };\n};\nexport {\n logger\n};\n", "/** @internal */\nexport type UnsetMarker = 'unsetMarker' & {\n __brand: 'unsetMarker';\n};\n\n/**\n * Ensures there are no duplicate keys when building a procedure.\n * @internal\n */\nexport function mergeWithoutOverrides>(\n obj1: TType,\n ...objs: Partial[]\n): TType {\n const newObj: TType = Object.assign(emptyObject(), obj1);\n\n for (const overrides of objs) {\n for (const key in overrides) {\n if (key in newObj && newObj[key] !== overrides[key]) {\n throw new Error(`Duplicate key ${key}`);\n }\n newObj[key as keyof TType] = overrides[key] as TType[keyof TType];\n }\n }\n return newObj;\n}\n\n/**\n * Check that value is object\n * @internal\n */\nexport function isObject(value: unknown): value is Record {\n return !!value && !Array.isArray(value) && typeof value === 'object';\n}\n\ntype AnyFn = ((...args: any[]) => unknown) & Record;\nexport function isFunction(fn: unknown): fn is AnyFn {\n return typeof fn === 'function';\n}\n\n/**\n * Create an object without inheriting anything from `Object.prototype`\n * @internal\n */\nexport function emptyObject>(): TObj {\n return Object.create(null);\n}\n\nconst asyncIteratorsSupported =\n typeof Symbol === 'function' && !!Symbol.asyncIterator;\n\nexport function isAsyncIterable(\n value: unknown,\n): value is AsyncIterable {\n return (\n asyncIteratorsSupported && isObject(value) && Symbol.asyncIterator in value\n );\n}\n\n/**\n * Run an IIFE\n */\nexport const run = (fn: () => TValue): TValue => fn();\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nexport function noop(): void {}\n\nexport function identity(it: T): T {\n return it;\n}\n\n/**\n * Generic runtime assertion function. Throws, if the condition is not `true`.\n *\n * Can be used as a slightly less dangerous variant of type assertions. Code\n * mistakes would be revealed at runtime then (hopefully during testing).\n */\nexport function assert(\n condition: boolean,\n msg = 'no additional info',\n): asserts condition {\n if (!condition) {\n throw new Error(`AssertionError: ${msg}`);\n }\n}\n\nexport function sleep(ms = 0): Promise {\n return new Promise((res) => setTimeout(res, ms));\n}\n\n/**\n * Ponyfill for\n * [`AbortSignal.any`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/any_static).\n */\nexport function abortSignalsAnyPonyfill(signals: AbortSignal[]): AbortSignal {\n if (typeof AbortSignal.any === 'function') {\n return AbortSignal.any(signals);\n }\n\n const ac = new AbortController();\n\n for (const signal of signals) {\n if (signal.aborted) {\n trigger();\n break;\n }\n signal.addEventListener('abort', trigger, { once: true });\n }\n\n return ac.signal;\n\n function trigger() {\n ac.abort();\n for (const signal of signals) {\n signal.removeEventListener('abort', trigger);\n }\n }\n}\n", "import type { InvertKeyValue, ValueOf } from '../types';\n\n// reference: https://www.jsonrpc.org/specification\n\n/**\n * JSON-RPC 2.0 Error codes\n *\n * `-32000` to `-32099` are reserved for implementation-defined server-errors.\n * For tRPC we're copying the last digits of HTTP 4XX errors.\n */\nexport const TRPC_ERROR_CODES_BY_KEY = {\n /**\n * Invalid JSON was received by the server.\n * An error occurred on the server while parsing the JSON text.\n */\n PARSE_ERROR: -32700,\n /**\n * The JSON sent is not a valid Request object.\n */\n BAD_REQUEST: -32600, // 400\n\n // Internal JSON-RPC error\n INTERNAL_SERVER_ERROR: -32603, // 500\n NOT_IMPLEMENTED: -32603, // 501\n BAD_GATEWAY: -32603, // 502\n SERVICE_UNAVAILABLE: -32603, // 503\n GATEWAY_TIMEOUT: -32603, // 504\n\n // Implementation specific errors\n UNAUTHORIZED: -32001, // 401\n PAYMENT_REQUIRED: -32002, // 402\n FORBIDDEN: -32003, // 403\n NOT_FOUND: -32004, // 404\n METHOD_NOT_SUPPORTED: -32005, // 405\n TIMEOUT: -32008, // 408\n CONFLICT: -32009, // 409\n PRECONDITION_FAILED: -32012, // 412\n PAYLOAD_TOO_LARGE: -32013, // 413\n UNSUPPORTED_MEDIA_TYPE: -32015, // 415\n UNPROCESSABLE_CONTENT: -32022, // 422\n PRECONDITION_REQUIRED: -32028, // 428\n TOO_MANY_REQUESTS: -32029, // 429\n CLIENT_CLOSED_REQUEST: -32099, // 499\n} as const;\n\n// pure\nexport const TRPC_ERROR_CODES_BY_NUMBER: InvertKeyValue<\n typeof TRPC_ERROR_CODES_BY_KEY\n> = {\n [-32700]: 'PARSE_ERROR',\n [-32600]: 'BAD_REQUEST',\n [-32603]: 'INTERNAL_SERVER_ERROR',\n [-32001]: 'UNAUTHORIZED',\n [-32002]: 'PAYMENT_REQUIRED',\n [-32003]: 'FORBIDDEN',\n [-32004]: 'NOT_FOUND',\n [-32005]: 'METHOD_NOT_SUPPORTED',\n [-32008]: 'TIMEOUT',\n [-32009]: 'CONFLICT',\n [-32012]: 'PRECONDITION_FAILED',\n [-32013]: 'PAYLOAD_TOO_LARGE',\n [-32015]: 'UNSUPPORTED_MEDIA_TYPE',\n [-32022]: 'UNPROCESSABLE_CONTENT',\n [-32028]: 'PRECONDITION_REQUIRED',\n [-32029]: 'TOO_MANY_REQUESTS',\n [-32099]: 'CLIENT_CLOSED_REQUEST',\n};\n\nexport type TRPC_ERROR_CODE_NUMBER = ValueOf;\nexport type TRPC_ERROR_CODE_KEY = keyof typeof TRPC_ERROR_CODES_BY_KEY;\n\n/**\n * tRPC error codes that are considered retryable\n * With out of the box SSE, the client will reconnect when these errors are encountered\n */\nexport const retryableRpcCodes: TRPC_ERROR_CODE_NUMBER[] = [\n TRPC_ERROR_CODES_BY_KEY.BAD_GATEWAY,\n TRPC_ERROR_CODES_BY_KEY.SERVICE_UNAVAILABLE,\n TRPC_ERROR_CODES_BY_KEY.GATEWAY_TIMEOUT,\n TRPC_ERROR_CODES_BY_KEY.INTERNAL_SERVER_ERROR,\n];\n", "import { emptyObject } from './utils';\n\ninterface ProxyCallbackOptions {\n path: readonly string[];\n args: readonly unknown[];\n}\ntype ProxyCallback = (opts: ProxyCallbackOptions) => unknown;\n\nconst noop = () => {\n // noop\n};\n\nconst freezeIfAvailable = (obj: object) => {\n if (Object.freeze) {\n Object.freeze(obj);\n }\n};\n\nfunction createInnerProxy(\n callback: ProxyCallback,\n path: readonly string[],\n memo: Record,\n) {\n const cacheKey = path.join('.');\n\n memo[cacheKey] ??= new Proxy(noop, {\n get(_obj, key) {\n if (typeof key !== 'string' || key === 'then') {\n // special case for if the proxy is accidentally treated\n // like a PromiseLike (like in `Promise.resolve(proxy)`)\n return undefined;\n }\n return createInnerProxy(callback, [...path, key], memo);\n },\n apply(_1, _2, args) {\n const lastOfPath = path[path.length - 1];\n\n let opts = { args, path };\n // special handling for e.g. `trpc.hello.call(this, 'there')` and `trpc.hello.apply(this, ['there'])\n if (lastOfPath === 'call') {\n opts = {\n args: args.length >= 2 ? [args[1]] : [],\n path: path.slice(0, -1),\n };\n } else if (lastOfPath === 'apply') {\n opts = {\n args: args.length >= 2 ? args[1] : [],\n path: path.slice(0, -1),\n };\n }\n freezeIfAvailable(opts.args);\n freezeIfAvailable(opts.path);\n return callback(opts);\n },\n });\n\n return memo[cacheKey];\n}\n\n/**\n * Creates a proxy that calls the callback with the path and arguments\n *\n * @internal\n */\nexport const createRecursiveProxy = (\n callback: ProxyCallback,\n): TFaux => createInnerProxy(callback, [], emptyObject()) as TFaux;\n\n/**\n * Used in place of `new Proxy` where each handler will map 1 level deep to another value.\n *\n * @internal\n */\nexport const createFlatProxy = (\n callback: (path: keyof TFaux) => any,\n): TFaux => {\n return new Proxy(noop, {\n get(_obj, name) {\n if (name === 'then') {\n // special case for if the proxy is accidentally treated\n // like a PromiseLike (like in `Promise.resolve(proxy)`)\n return undefined;\n }\n return callback(name as any);\n },\n }) as TFaux;\n};\n", "import type { TRPCError } from '../error/TRPCError';\nimport type { TRPC_ERROR_CODES_BY_KEY, TRPCResponse } from '../rpc';\nimport { TRPC_ERROR_CODES_BY_NUMBER } from '../rpc';\nimport type { InvertKeyValue, ValueOf } from '../types';\nimport { isObject } from '../utils';\n\nexport const JSONRPC2_TO_HTTP_CODE: Record<\n keyof typeof TRPC_ERROR_CODES_BY_KEY,\n number\n> = {\n PARSE_ERROR: 400,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n PAYMENT_REQUIRED: 402,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n METHOD_NOT_SUPPORTED: 405,\n TIMEOUT: 408,\n CONFLICT: 409,\n PRECONDITION_FAILED: 412,\n PAYLOAD_TOO_LARGE: 413,\n UNSUPPORTED_MEDIA_TYPE: 415,\n UNPROCESSABLE_CONTENT: 422,\n PRECONDITION_REQUIRED: 428,\n TOO_MANY_REQUESTS: 429,\n CLIENT_CLOSED_REQUEST: 499,\n INTERNAL_SERVER_ERROR: 500,\n NOT_IMPLEMENTED: 501,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n};\n\nexport const HTTP_CODE_TO_JSONRPC2: InvertKeyValue<\n typeof JSONRPC2_TO_HTTP_CODE\n> = {\n 400: 'BAD_REQUEST',\n 401: 'UNAUTHORIZED',\n 402: 'PAYMENT_REQUIRED',\n 403: 'FORBIDDEN',\n 404: 'NOT_FOUND',\n 405: 'METHOD_NOT_SUPPORTED',\n 408: 'TIMEOUT',\n 409: 'CONFLICT',\n 412: 'PRECONDITION_FAILED',\n 413: 'PAYLOAD_TOO_LARGE',\n 415: 'UNSUPPORTED_MEDIA_TYPE',\n 422: 'UNPROCESSABLE_CONTENT',\n 428: 'PRECONDITION_REQUIRED',\n 429: 'TOO_MANY_REQUESTS',\n 499: 'CLIENT_CLOSED_REQUEST',\n 500: 'INTERNAL_SERVER_ERROR',\n 501: 'NOT_IMPLEMENTED',\n 502: 'BAD_GATEWAY',\n 503: 'SERVICE_UNAVAILABLE',\n 504: 'GATEWAY_TIMEOUT',\n} as const;\n\nexport function getStatusCodeFromKey(\n code: keyof typeof TRPC_ERROR_CODES_BY_KEY,\n) {\n return JSONRPC2_TO_HTTP_CODE[code] ?? 500;\n}\n\nexport function getStatusKeyFromCode(\n code: keyof typeof HTTP_CODE_TO_JSONRPC2,\n): ValueOf {\n return HTTP_CODE_TO_JSONRPC2[code] ?? 'INTERNAL_SERVER_ERROR';\n}\n\nexport function getHTTPStatusCode(json: TRPCResponse | TRPCResponse[]) {\n const arr = Array.isArray(json) ? json : [json];\n const httpStatuses = new Set(\n arr.map((res) => {\n if ('error' in res && isObject(res.error.data)) {\n if (typeof res.error.data?.['httpStatus'] === 'number') {\n return res.error.data['httpStatus'];\n }\n const code = TRPC_ERROR_CODES_BY_NUMBER[res.error.code];\n return getStatusCodeFromKey(code);\n }\n return 200;\n }),\n );\n\n if (httpStatuses.size !== 1) {\n return 207;\n }\n\n const httpStatus = httpStatuses.values().next().value;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return httpStatus!;\n}\n\nexport function getHTTPStatusCodeFromError(error: TRPCError) {\n return getStatusCodeFromKey(error.code);\n}\n", "function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var defineProperty = require(\"./defineProperty.js\");\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nmodule.exports = _objectSpread2, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import { getHTTPStatusCodeFromError } from '../http/getHTTPStatusCode';\nimport type { ProcedureType } from '../procedure';\nimport type { AnyRootTypes, RootConfig } from '../rootConfig';\nimport { TRPC_ERROR_CODES_BY_KEY } from '../rpc';\nimport type { DefaultErrorShape } from './formatter';\nimport type { TRPCError } from './TRPCError';\n\n/**\n * @internal\n */\nexport function getErrorShape(opts: {\n config: RootConfig;\n error: TRPCError;\n type: ProcedureType | 'unknown';\n path: string | undefined;\n input: unknown;\n ctx: TRoot['ctx'] | undefined;\n}): TRoot['errorShape'] {\n const { path, error, config } = opts;\n const { code } = opts.error;\n const shape: DefaultErrorShape = {\n message: error.message,\n code: TRPC_ERROR_CODES_BY_KEY[code],\n data: {\n code,\n httpStatus: getHTTPStatusCodeFromError(error),\n },\n };\n if (config.isDev && typeof opts.error.stack === 'string') {\n shape.data.stack = opts.error.stack;\n }\n if (typeof path === 'string') {\n shape.data.path = path;\n }\n return config.errorFormatter({ ...opts, shape });\n}\n", "import type { ProcedureType } from '../procedure';\nimport type {\n TRPC_ERROR_CODE_KEY,\n TRPC_ERROR_CODE_NUMBER,\n TRPCErrorShape,\n} from '../rpc';\nimport type { TRPCError } from './TRPCError';\n\n/**\n * @internal\n */\nexport type ErrorFormatter = (opts: {\n error: TRPCError;\n type: ProcedureType | 'unknown';\n path: string | undefined;\n input: unknown;\n ctx: TContext | undefined;\n shape: DefaultErrorShape;\n}) => TShape;\n\n/**\n * @internal\n */\nexport type DefaultErrorData = {\n code: TRPC_ERROR_CODE_KEY;\n httpStatus: number;\n /**\n * Path to the procedure that threw the error\n */\n path?: string;\n /**\n * Stack trace of the error (only in development)\n */\n stack?: string;\n};\n\n/**\n * @internal\n */\nexport interface DefaultErrorShape extends TRPCErrorShape {\n message: string;\n code: TRPC_ERROR_CODE_NUMBER;\n}\n\nexport const defaultFormatter: ErrorFormatter = ({ shape }) => {\n return shape;\n};\n", "import type { TRPC_ERROR_CODE_KEY } from '../rpc/codes';\nimport { isObject } from '../utils';\n\nclass UnknownCauseError extends Error {\n [key: string]: unknown;\n}\nexport function getCauseFromUnknown(cause: unknown): Error | undefined {\n if (cause instanceof Error) {\n return cause;\n }\n\n const type = typeof cause;\n if (type === 'undefined' || type === 'function' || cause === null) {\n return undefined;\n }\n\n // Primitive types just get wrapped in an error\n if (type !== 'object') {\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n return new Error(String(cause));\n }\n\n // If it's an object, we'll create a synthetic error\n if (isObject(cause)) {\n return Object.assign(new UnknownCauseError(), cause);\n }\n\n return undefined;\n}\n\nexport function getTRPCErrorFromUnknown(cause: unknown): TRPCError {\n if (cause instanceof TRPCError) {\n return cause;\n }\n if (cause instanceof Error && cause.name === 'TRPCError') {\n // https://github.com/trpc/trpc/pull/4848\n return cause as TRPCError;\n }\n\n const trpcError = new TRPCError({\n code: 'INTERNAL_SERVER_ERROR',\n cause,\n });\n\n // Inherit stack from error\n if (cause instanceof Error && cause.stack) {\n trpcError.stack = cause.stack;\n }\n\n return trpcError;\n}\n\nexport class TRPCError extends Error {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore override doesn't work in all environments due to \"This member cannot have an 'override' modifier because it is not declared in the base class 'Error'\"\n public override readonly cause?: Error;\n public readonly code;\n\n constructor(opts: {\n message?: string;\n code: TRPC_ERROR_CODE_KEY;\n cause?: unknown;\n }) {\n const cause = getCauseFromUnknown(opts.cause);\n const message = opts.message ?? cause?.message ?? opts.code;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore https://github.com/tc39/proposal-error-cause\n super(message, { cause });\n\n this.code = opts.code;\n this.name = 'TRPCError';\n this.cause ??= cause;\n }\n}\n", "import type { AnyRootTypes, RootConfig } from './rootConfig';\nimport type { AnyRouter, inferRouterError } from './router';\nimport type {\n TRPCResponse,\n TRPCResponseMessage,\n TRPCResultMessage,\n} from './rpc';\nimport { isObject } from './utils';\n\n/**\n * @public\n */\nexport interface DataTransformer {\n serialize(object: any): any;\n deserialize(object: any): any;\n}\n\ninterface InputDataTransformer extends DataTransformer {\n /**\n * This function runs **on the client** before sending the data to the server.\n */\n serialize(object: any): any;\n /**\n * This function runs **on the server** to transform the data before it is passed to the resolver\n */\n deserialize(object: any): any;\n}\n\ninterface OutputDataTransformer extends DataTransformer {\n /**\n * This function runs **on the server** before sending the data to the client.\n */\n serialize(object: any): any;\n /**\n * This function runs **only on the client** to transform the data sent from the server.\n */\n deserialize(object: any): any;\n}\n\n/**\n * @public\n */\nexport interface CombinedDataTransformer {\n /**\n * Specify how the data sent from the client to the server should be transformed.\n */\n input: InputDataTransformer;\n /**\n * Specify how the data sent from the server to the client should be transformed.\n */\n output: OutputDataTransformer;\n}\n\n/**\n * @public\n */\nexport type CombinedDataTransformerClient = {\n input: Pick;\n output: Pick;\n};\n\n/**\n * @public\n */\nexport type DataTransformerOptions = CombinedDataTransformer | DataTransformer;\n\n/**\n * @internal\n */\nexport function getDataTransformer(\n transformer: DataTransformerOptions,\n): CombinedDataTransformer {\n if ('input' in transformer) {\n return transformer;\n }\n return { input: transformer, output: transformer };\n}\n\n/**\n * @internal\n */\nexport const defaultTransformer: CombinedDataTransformer = {\n input: { serialize: (obj) => obj, deserialize: (obj) => obj },\n output: { serialize: (obj) => obj, deserialize: (obj) => obj },\n};\n\nfunction transformTRPCResponseItem<\n TResponseItem extends TRPCResponse | TRPCResponseMessage,\n>(config: RootConfig, item: TResponseItem): TResponseItem {\n if ('error' in item) {\n return {\n ...item,\n error: config.transformer.output.serialize(item.error),\n };\n }\n\n if ('data' in item.result) {\n return {\n ...item,\n result: {\n ...item.result,\n data: config.transformer.output.serialize(item.result.data),\n },\n };\n }\n\n return item;\n}\n\n/**\n * Takes a unserialized `TRPCResponse` and serializes it with the router's transformers\n **/\nexport function transformTRPCResponse<\n TResponse extends\n | TRPCResponse\n | TRPCResponse[]\n | TRPCResponseMessage\n | TRPCResponseMessage[],\n>(config: RootConfig, itemOrItems: TResponse) {\n return Array.isArray(itemOrItems)\n ? itemOrItems.map((item) => transformTRPCResponseItem(config, item))\n : transformTRPCResponseItem(config, itemOrItems);\n}\n\n// FIXME:\n// - the generics here are probably unnecessary\n// - the RPC-spec could probably be simplified to combine HTTP + WS\n/** @internal */\nfunction transformResultInner(\n response:\n | TRPCResponse>\n | TRPCResponseMessage>,\n transformer: DataTransformer,\n) {\n if ('error' in response) {\n const error = transformer.deserialize(\n response.error,\n ) as inferRouterError;\n return {\n ok: false,\n error: {\n ...response,\n error,\n },\n } as const;\n }\n\n const result = {\n ...response.result,\n ...((!response.result.type || response.result.type === 'data') && {\n type: 'data',\n data: transformer.deserialize(response.result.data),\n }),\n } as TRPCResultMessage['result'];\n return { ok: true, result } as const;\n}\n\nclass TransformResultError extends Error {\n constructor() {\n super('Unable to transform response from server');\n }\n}\n\n/**\n * Transforms and validates that the result is a valid TRPCResponse\n * @internal\n */\nexport function transformResult(\n response:\n | TRPCResponse>\n | TRPCResponseMessage>,\n transformer: DataTransformer,\n): ReturnType {\n let result: ReturnType;\n try {\n // Use the data transformers on the JSON-response\n result = transformResultInner(response, transformer);\n } catch {\n throw new TransformResultError();\n }\n\n // check that output of the transformers is a valid TRPCResponse\n if (\n !result.ok &&\n (!isObject(result.error.error) ||\n typeof result.error.error['code'] !== 'number')\n ) {\n throw new TransformResultError();\n }\n if (result.ok && !isObject(result.result)) {\n throw new TransformResultError();\n }\n return result;\n}\n", "import type { Observable } from '../observable';\nimport { createRecursiveProxy } from './createProxy';\nimport { defaultFormatter } from './error/formatter';\nimport { getTRPCErrorFromUnknown, TRPCError } from './error/TRPCError';\nimport type {\n AnyProcedure,\n ErrorHandlerOptions,\n inferProcedureInput,\n inferProcedureOutput,\n LegacyObservableSubscriptionProcedure,\n} from './procedure';\nimport type { ProcedureCallOptions } from './procedureBuilder';\nimport type { AnyRootTypes, RootConfig } from './rootConfig';\nimport { defaultTransformer } from './transformer';\nimport type { MaybePromise, ValueOf } from './types';\nimport {\n emptyObject,\n isFunction,\n isObject,\n mergeWithoutOverrides,\n} from './utils';\n\nexport interface RouterRecord {\n [key: string]: AnyProcedure | RouterRecord;\n}\n\ntype DecorateProcedure = (\n input: inferProcedureInput,\n) => Promise<\n TProcedure['_def']['type'] extends 'subscription'\n ? TProcedure extends LegacyObservableSubscriptionProcedure\n ? Observable, TRPCError>\n : inferProcedureOutput\n : inferProcedureOutput\n>;\n\n/**\n * @internal\n */\nexport type DecorateRouterRecord = {\n [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value\n ? $Value extends AnyProcedure\n ? DecorateProcedure<$Value>\n : $Value extends RouterRecord\n ? DecorateRouterRecord<$Value>\n : never\n : never;\n};\n\n/**\n * @internal\n */\n\nexport type RouterCallerErrorHandler = (\n opts: ErrorHandlerOptions,\n) => void;\n\n/**\n * @internal\n */\nexport type RouterCaller<\n TRoot extends AnyRootTypes,\n TRecord extends RouterRecord,\n> = (\n /**\n * @note\n * If passing a function, we recommend it's a cached function\n * e.g. wrapped in `React.cache` to avoid unnecessary computations\n */\n ctx: TRoot['ctx'] | (() => MaybePromise),\n options?: {\n onError?: RouterCallerErrorHandler;\n signal?: AbortSignal;\n },\n) => DecorateRouterRecord;\n\n/**\n * @internal\n */\nconst lazyMarker = 'lazyMarker' as 'lazyMarker' & {\n __brand: 'lazyMarker';\n};\nexport type Lazy = (() => Promise) & { [lazyMarker]: true };\n\ntype LazyLoader = {\n load: () => Promise;\n ref: Lazy;\n};\n\nfunction once(fn: () => T): () => T {\n const uncalled = Symbol();\n let result: T | typeof uncalled = uncalled;\n return (): T => {\n if (result === uncalled) {\n result = fn();\n }\n return result;\n };\n}\n\n/**\n * Lazy load a router\n * @see https://trpc.io/docs/server/merging-routers#lazy-load\n */\nexport function lazy(\n importRouter: () => Promise<\n | TRouter\n | {\n [key: string]: TRouter;\n }\n >,\n): Lazy> {\n async function resolve(): Promise {\n const mod = await importRouter();\n\n // if the module is a router, return it\n if (isRouter(mod)) {\n return mod;\n }\n\n const routers = Object.values(mod);\n\n if (routers.length !== 1 || !isRouter(routers[0])) {\n throw new Error(\n \"Invalid router module - either define exactly 1 export or return the router directly.\\nExample: `lazy(() => import('./slow.js').then((m) => m.slowRouter))`\",\n );\n }\n\n return routers[0];\n }\n\n (resolve as Lazy>)[lazyMarker] = true as const;\n\n return resolve as Lazy>;\n}\n\nfunction isLazy(input: unknown): input is Lazy {\n return typeof input === 'function' && lazyMarker in input;\n}\n\n/**\n * @internal\n */\nexport interface RouterDef<\n TRoot extends AnyRootTypes,\n TRecord extends RouterRecord,\n> {\n _config: RootConfig;\n router: true;\n procedure?: never;\n procedures: TRecord;\n record: TRecord;\n lazy: Record>;\n}\n\nexport interface Router<\n TRoot extends AnyRootTypes,\n TRecord extends RouterRecord,\n> {\n _def: RouterDef;\n /**\n * @see https://trpc.io/docs/v11/server/server-side-calls\n */\n createCaller: RouterCaller;\n}\n\nexport type BuiltRouter<\n TRoot extends AnyRootTypes,\n TRecord extends RouterRecord,\n> = Router & TRecord;\n\nexport interface RouterBuilder {\n (\n _: TIn,\n ): BuiltRouter>;\n}\n\nexport type AnyRouter = Router;\n\nexport type inferRouterRootTypes =\n TRouter['_def']['_config']['$types'];\n\nexport type inferRouterContext =\n inferRouterRootTypes['ctx'];\nexport type inferRouterError =\n inferRouterRootTypes['errorShape'];\nexport type inferRouterMeta =\n inferRouterRootTypes['meta'];\n\nfunction isRouter(value: unknown): value is AnyRouter {\n return (\n isObject(value) && isObject(value['_def']) && 'router' in value['_def']\n );\n}\n\nconst emptyRouter = {\n _ctx: null as any,\n _errorShape: null as any,\n _meta: null as any,\n queries: {},\n mutations: {},\n subscriptions: {},\n errorFormatter: defaultFormatter,\n transformer: defaultTransformer,\n};\n\n/**\n * Reserved words that can't be used as router or procedure names\n */\nconst reservedWords = [\n /**\n * Then is a reserved word because otherwise we can't return a promise that returns a Proxy\n * since JS will think that `.then` is something that exists\n */\n 'then',\n /**\n * `fn.call()` and `fn.apply()` are reserved words because otherwise we can't call a function using `.call` or `.apply`\n */\n 'call',\n 'apply',\n];\n\n/** @internal */\nexport type CreateRouterOptions = {\n [key: string]:\n | AnyProcedure\n | AnyRouter\n | CreateRouterOptions\n | Lazy;\n};\n\n/** @internal */\nexport type DecorateCreateRouterOptions<\n TRouterOptions extends CreateRouterOptions,\n> = {\n [K in keyof TRouterOptions]: TRouterOptions[K] extends infer $Value\n ? $Value extends AnyProcedure\n ? $Value\n : $Value extends Router\n ? TRecord\n : $Value extends Lazy>\n ? TRecord\n : $Value extends CreateRouterOptions\n ? DecorateCreateRouterOptions<$Value>\n : never\n : never;\n};\n\n/**\n * @internal\n */\nexport function createRouterFactory(\n config: RootConfig,\n) {\n function createRouterInner(\n input: TInput,\n ): BuiltRouter> {\n const reservedWordsUsed = new Set(\n Object.keys(input).filter((v) => reservedWords.includes(v)),\n );\n if (reservedWordsUsed.size > 0) {\n throw new Error(\n 'Reserved words used in `router({})` call: ' +\n Array.from(reservedWordsUsed).join(', '),\n );\n }\n\n const procedures: Record = emptyObject();\n const lazy: Record> = emptyObject();\n\n function createLazyLoader(opts: {\n ref: Lazy;\n path: readonly string[];\n key: string;\n aggregate: RouterRecord;\n }): LazyLoader {\n return {\n ref: opts.ref,\n load: once(async () => {\n const router = await opts.ref();\n const lazyPath = [...opts.path, opts.key];\n const lazyKey = lazyPath.join('.');\n\n opts.aggregate[opts.key] = step(router._def.record, lazyPath);\n\n delete lazy[lazyKey];\n\n // add lazy loaders for nested routers\n for (const [nestedKey, nestedItem] of Object.entries(\n router._def.lazy,\n )) {\n const nestedRouterKey = [...lazyPath, nestedKey].join('.');\n\n // console.log('adding lazy', nestedRouterKey);\n lazy[nestedRouterKey] = createLazyLoader({\n ref: nestedItem.ref,\n path: lazyPath,\n key: nestedKey,\n aggregate: opts.aggregate[opts.key] as RouterRecord,\n });\n }\n }),\n };\n }\n\n function step(from: CreateRouterOptions, path: readonly string[] = []) {\n const aggregate: RouterRecord = emptyObject();\n for (const [key, item] of Object.entries(from ?? {})) {\n if (isLazy(item)) {\n lazy[[...path, key].join('.')] = createLazyLoader({\n path,\n ref: item,\n key,\n aggregate,\n });\n continue;\n }\n if (isRouter(item)) {\n aggregate[key] = step(item._def.record, [...path, key]);\n continue;\n }\n if (!isProcedure(item)) {\n // RouterRecord\n aggregate[key] = step(item, [...path, key]);\n continue;\n }\n\n const newPath = [...path, key].join('.');\n\n if (procedures[newPath]) {\n throw new Error(`Duplicate key: ${newPath}`);\n }\n\n procedures[newPath] = item;\n aggregate[key] = item;\n }\n\n return aggregate;\n }\n const record = step(input);\n\n const _def: AnyRouter['_def'] = {\n _config: config,\n router: true,\n procedures,\n lazy,\n ...emptyRouter,\n record,\n };\n\n const router: BuiltRouter = {\n ...(record as {}),\n _def,\n createCaller: createCallerFactory()({\n _def,\n }),\n };\n return router as BuiltRouter>;\n }\n\n return createRouterInner;\n}\n\nfunction isProcedure(\n procedureOrRouter: ValueOf,\n): procedureOrRouter is AnyProcedure {\n return typeof procedureOrRouter === 'function';\n}\n\n/**\n * @internal\n */\nexport async function getProcedureAtPath(\n router: Pick, '_def'>,\n path: string,\n): Promise {\n const { _def } = router;\n let procedure = _def.procedures[path];\n\n while (!procedure) {\n const key = Object.keys(_def.lazy).find((key) => path.startsWith(key));\n // console.log(`found lazy: ${key ?? 'NOPE'} (fullPath: ${fullPath})`);\n\n if (!key) {\n return null;\n }\n // console.log('loading', key, '.......');\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const lazyRouter = _def.lazy[key]!;\n await lazyRouter.load();\n\n procedure = _def.procedures[path];\n }\n\n return procedure;\n}\n\n/**\n * @internal\n */\nexport async function callProcedure(\n opts: ProcedureCallOptions & {\n router: AnyRouter;\n allowMethodOverride?: boolean;\n },\n) {\n const { type, path } = opts;\n const proc = await getProcedureAtPath(opts.router, path);\n if (\n !proc ||\n !isProcedure(proc) ||\n (proc._def.type !== type && !opts.allowMethodOverride)\n ) {\n throw new TRPCError({\n code: 'NOT_FOUND',\n message: `No \"${type}\"-procedure on path \"${path}\"`,\n });\n }\n\n /* istanbul ignore if -- @preserve */\n if (\n proc._def.type !== type &&\n opts.allowMethodOverride &&\n proc._def.type === 'subscription'\n ) {\n throw new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message: `Method override is not supported for subscriptions`,\n });\n }\n\n return proc(opts);\n}\n\nexport interface RouterCallerFactory {\n (\n router: Pick, '_def'>,\n ): RouterCaller;\n}\n\nexport function createCallerFactory<\n TRoot extends AnyRootTypes,\n>(): RouterCallerFactory {\n return function createCallerInner(\n router: Pick, '_def'>,\n ): RouterCaller {\n const { _def } = router;\n type Context = TRoot['ctx'];\n\n return function createCaller(ctxOrCallback, opts) {\n return createRecursiveProxy>>(\n async (innerOpts) => {\n const { path, args } = innerOpts;\n const fullPath = path.join('.');\n\n if (path.length === 1 && path[0] === '_def') {\n return _def;\n }\n\n const procedure = await getProcedureAtPath(router, fullPath);\n\n let ctx: Context | undefined = undefined;\n try {\n if (!procedure) {\n throw new TRPCError({\n code: 'NOT_FOUND',\n message: `No procedure found on path \"${path}\"`,\n });\n }\n ctx = isFunction(ctxOrCallback)\n ? await Promise.resolve(ctxOrCallback())\n : ctxOrCallback;\n\n return await procedure({\n path: fullPath,\n getRawInput: async () => args[0],\n ctx,\n type: procedure._def.type,\n signal: opts?.signal,\n batchIndex: 0,\n });\n } catch (cause) {\n opts?.onError?.({\n ctx,\n error: getTRPCErrorFromUnknown(cause),\n input: args[0],\n path: fullPath,\n type: procedure?._def.type ?? 'unknown',\n });\n throw cause;\n }\n },\n );\n };\n };\n}\n\n/** @internal */\nexport type MergeRouters<\n TRouters extends AnyRouter[],\n TRoot extends AnyRootTypes = TRouters[0]['_def']['_config']['$types'],\n TRecord extends RouterRecord = {},\n> = TRouters extends [\n infer Head extends AnyRouter,\n ...infer Tail extends AnyRouter[],\n]\n ? MergeRouters\n : BuiltRouter;\n\nexport function mergeRouters(\n ...routerList: [...TRouters]\n): MergeRouters {\n const record = mergeWithoutOverrides(\n {},\n ...routerList.map((r) => r._def.record),\n );\n const errorFormatter = routerList.reduce(\n (currentErrorFormatter, nextRouter) => {\n if (\n nextRouter._def._config.errorFormatter &&\n nextRouter._def._config.errorFormatter !== defaultFormatter\n ) {\n if (\n currentErrorFormatter !== defaultFormatter &&\n currentErrorFormatter !== nextRouter._def._config.errorFormatter\n ) {\n throw new Error('You seem to have several error formatters');\n }\n return nextRouter._def._config.errorFormatter;\n }\n return currentErrorFormatter;\n },\n defaultFormatter,\n );\n\n const transformer = routerList.reduce((prev, current) => {\n if (\n current._def._config.transformer &&\n current._def._config.transformer !== defaultTransformer\n ) {\n if (\n prev !== defaultTransformer &&\n prev !== current._def._config.transformer\n ) {\n throw new Error('You seem to have several transformers');\n }\n return current._def._config.transformer;\n }\n return prev;\n }, defaultTransformer);\n\n const router = createRouterFactory({\n errorFormatter,\n transformer,\n isDev: routerList.every((r) => r._def._config.isDev),\n allowOutsideOfServer: routerList.every(\n (r) => r._def._config.allowOutsideOfServer,\n ),\n isServer: routerList.every((r) => r._def._config.isServer),\n $types: routerList[0]?._def._config.$types,\n sse: routerList[0]?._def._config.sse,\n })(record);\n\n return router as MergeRouters;\n}\n", "const trackedSymbol = Symbol();\n\ntype TrackedId = string & {\n __brand: 'TrackedId';\n};\nexport type TrackedEnvelope = [TrackedId, TData, typeof trackedSymbol];\n\nexport interface TrackedData {\n /**\n * The id of the message to keep track of in case the connection gets lost\n */\n id: string;\n /**\n * The data field of the message\n */\n data: TData;\n}\n/**\n * Produce a typed server-sent event message\n * @deprecated use `tracked(id, data)` instead\n */\nexport function sse(event: { id: string; data: TData }) {\n return tracked(event.id, event.data);\n}\n\nexport function isTrackedEnvelope(\n value: unknown,\n): value is TrackedEnvelope {\n return Array.isArray(value) && value[2] === trackedSymbol;\n}\n\n/**\n * Automatically track an event so that it can be resumed from a given id if the connection is lost\n */\nexport function tracked(\n id: string,\n data: TData,\n): TrackedEnvelope {\n if (id === '') {\n // This limitation could be removed by using different SSE event names / channels for tracked event and non-tracked event\n throw new Error(\n '`id` must not be an empty string as empty string is the same as not setting the id at all',\n );\n }\n return [id as TrackedId, data, trackedSymbol];\n}\n\nexport type inferTrackedOutput =\n TData extends TrackedEnvelope ? TrackedData<$Data> : TData;\n", "import type { Result } from '../unstable-core-do-not-import';\nimport type {\n Observable,\n Observer,\n OperatorFunction,\n TeardownLogic,\n UnaryFunction,\n Unsubscribable,\n} from './types';\n\n/** @public */\nexport type inferObservableValue =\n TObservable extends Observable ? TValue : never;\n\n/** @public */\nexport function isObservable(x: unknown): x is Observable {\n return typeof x === 'object' && x !== null && 'subscribe' in x;\n}\n\n/** @public */\nexport function observable(\n subscribe: (observer: Observer) => TeardownLogic,\n): Observable {\n const self: Observable = {\n subscribe(observer) {\n let teardownRef: TeardownLogic | null = null;\n let isDone = false;\n let unsubscribed = false;\n let teardownImmediately = false;\n function unsubscribe() {\n if (teardownRef === null) {\n teardownImmediately = true;\n return;\n }\n if (unsubscribed) {\n return;\n }\n unsubscribed = true;\n\n if (typeof teardownRef === 'function') {\n teardownRef();\n } else if (teardownRef) {\n teardownRef.unsubscribe();\n }\n }\n teardownRef = subscribe({\n next(value) {\n if (isDone) {\n return;\n }\n observer.next?.(value);\n },\n error(err) {\n if (isDone) {\n return;\n }\n isDone = true;\n observer.error?.(err);\n unsubscribe();\n },\n complete() {\n if (isDone) {\n return;\n }\n isDone = true;\n observer.complete?.();\n unsubscribe();\n },\n });\n if (teardownImmediately) {\n unsubscribe();\n }\n return {\n unsubscribe,\n };\n },\n pipe(\n ...operations: OperatorFunction[]\n ): Observable {\n return operations.reduce(pipeReducer, self);\n },\n };\n return self;\n}\n\nfunction pipeReducer(prev: any, fn: UnaryFunction) {\n return fn(prev);\n}\n\n/** @internal */\nexport function observableToPromise(\n observable: Observable,\n) {\n const ac = new AbortController();\n const promise = new Promise((resolve, reject) => {\n let isDone = false;\n function onDone() {\n if (isDone) {\n return;\n }\n isDone = true;\n obs$.unsubscribe();\n }\n ac.signal.addEventListener('abort', () => {\n reject(ac.signal.reason);\n });\n const obs$ = observable.subscribe({\n next(data) {\n isDone = true;\n resolve(data);\n onDone();\n },\n error(data) {\n reject(data);\n },\n complete() {\n ac.abort();\n onDone();\n },\n });\n });\n return promise;\n}\n\n/**\n * @internal\n */\nfunction observableToReadableStream(\n observable: Observable,\n signal: AbortSignal,\n): ReadableStream> {\n let unsub: Unsubscribable | null = null;\n\n const onAbort = () => {\n unsub?.unsubscribe();\n unsub = null;\n signal.removeEventListener('abort', onAbort);\n };\n\n return new ReadableStream>({\n start(controller) {\n unsub = observable.subscribe({\n next(data) {\n controller.enqueue({ ok: true, value: data });\n },\n error(error) {\n controller.enqueue({ ok: false, error });\n controller.close();\n },\n complete() {\n controller.close();\n },\n });\n\n if (signal.aborted) {\n onAbort();\n } else {\n signal.addEventListener('abort', onAbort, { once: true });\n }\n },\n cancel() {\n onAbort();\n },\n });\n}\n\n/** @internal */\nexport function observableToAsyncIterable(\n observable: Observable,\n signal: AbortSignal,\n): AsyncIterable {\n const stream = observableToReadableStream(observable, signal);\n\n const reader = stream.getReader();\n const iterator: AsyncIterator = {\n async next() {\n const value = await reader.read();\n if (value.done) {\n return {\n value: undefined,\n done: true,\n };\n }\n const { value: result } = value;\n if (!result.ok) {\n throw result.error;\n }\n return {\n value: result.value,\n done: false,\n };\n },\n async return() {\n await reader.cancel();\n return {\n value: undefined,\n done: true,\n };\n },\n };\n return {\n [Symbol.asyncIterator]() {\n return iterator;\n },\n };\n}\n", "import { TRPCError } from '../error/TRPCError';\nimport { isObject } from '../utils';\nimport type { TRPCRequestInfo } from './types';\n\nexport function parseConnectionParamsFromUnknown(\n parsed: unknown,\n): TRPCRequestInfo['connectionParams'] {\n try {\n if (parsed === null) {\n return null;\n }\n if (!isObject(parsed)) {\n throw new Error('Expected object');\n }\n const nonStringValues = Object.entries(parsed).filter(\n ([_key, value]) => typeof value !== 'string',\n );\n\n if (nonStringValues.length > 0) {\n throw new Error(\n `Expected connectionParams to be string values. Got ${nonStringValues\n .map(([key, value]) => `${key}: ${typeof value}`)\n .join(', ')}`,\n );\n }\n return parsed as Record;\n } catch (cause) {\n throw new TRPCError({\n code: 'PARSE_ERROR',\n message: 'Invalid connection params shape',\n cause,\n });\n }\n}\nexport function parseConnectionParamsFromString(\n str: string,\n): TRPCRequestInfo['connectionParams'] {\n let parsed: unknown;\n try {\n parsed = JSON.parse(str);\n } catch (cause) {\n throw new TRPCError({\n code: 'PARSE_ERROR',\n message: 'Not JSON-parsable query params',\n cause,\n });\n }\n return parseConnectionParamsFromUnknown(parsed);\n}\n", "import { TRPCError } from '../error/TRPCError';\nimport type { ProcedureType } from '../procedure';\nimport { getProcedureAtPath, type AnyRouter } from '../router';\nimport { emptyObject, isObject } from '../utils';\nimport { parseConnectionParamsFromString } from './parseConnectionParams';\nimport type { TRPCAcceptHeader, TRPCRequestInfo } from './types';\n\nexport function getAcceptHeader(headers: Headers): TRPCAcceptHeader | null {\n return (\n (headers.get('trpc-accept') as TRPCAcceptHeader | null) ??\n (headers\n .get('accept')\n ?.split(',')\n .some((t) => t.trim() === 'application/jsonl')\n ? ('application/jsonl' as TRPCAcceptHeader)\n : null)\n );\n}\n\ntype GetRequestInfoOptions = {\n path: string;\n req: Request;\n url: URL | null;\n searchParams: URLSearchParams;\n headers: Headers;\n router: AnyRouter;\n};\n\ntype ContentTypeHandler = {\n isMatch: (opts: Request) => boolean;\n parse: (opts: GetRequestInfoOptions) => Promise;\n};\n\n/**\n * Memoize a function that takes no arguments\n * @internal\n */\nfunction memo(fn: () => Promise) {\n let promise: Promise | null = null;\n const sym = Symbol.for('@trpc/server/http/memo');\n let value: TReturn | typeof sym = sym;\n return {\n /**\n * Lazily read the value\n */\n read: async (): Promise => {\n if (value !== sym) {\n return value;\n }\n\n // dedupes promises and catches errors\n promise ??= fn().catch((cause) => {\n if (cause instanceof TRPCError) {\n throw cause;\n }\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: cause instanceof Error ? cause.message : 'Invalid input',\n cause,\n });\n });\n\n value = await promise;\n promise = null;\n\n return value;\n },\n /**\n * Get an already stored result\n */\n result: (): TReturn | undefined => {\n return value !== sym ? value : undefined;\n },\n };\n}\n\nconst jsonContentTypeHandler: ContentTypeHandler = {\n isMatch(req) {\n return !!req.headers.get('content-type')?.startsWith('application/json');\n },\n async parse(opts) {\n const { req } = opts;\n const isBatchCall = opts.searchParams.get('batch') === '1';\n const paths = isBatchCall ? opts.path.split(',') : [opts.path];\n\n type InputRecord = Record;\n const getInputs = memo(async (): Promise => {\n let inputs: unknown = undefined;\n if (req.method === 'GET') {\n const queryInput = opts.searchParams.get('input');\n if (queryInput) {\n inputs = JSON.parse(queryInput);\n }\n } else {\n inputs = await req.json();\n }\n if (inputs === undefined) {\n return emptyObject();\n }\n\n if (!isBatchCall) {\n const result: InputRecord = emptyObject();\n result[0] =\n opts.router._def._config.transformer.input.deserialize(inputs);\n return result;\n }\n\n if (!isObject(inputs)) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: '\"input\" needs to be an object when doing a batch call',\n });\n }\n const acc: InputRecord = emptyObject();\n for (const index of paths.keys()) {\n const input = inputs[index];\n if (input !== undefined) {\n acc[index] =\n opts.router._def._config.transformer.input.deserialize(input);\n }\n }\n\n return acc;\n });\n\n const calls = await Promise.all(\n paths.map(\n async (path, index): Promise => {\n const procedure = await getProcedureAtPath(opts.router, path);\n return {\n batchIndex: index,\n path,\n procedure,\n getRawInput: async () => {\n const inputs = await getInputs.read();\n let input = inputs[index];\n\n if (procedure?._def.type === 'subscription') {\n const lastEventId =\n opts.headers.get('last-event-id') ??\n opts.searchParams.get('lastEventId') ??\n opts.searchParams.get('Last-Event-Id');\n\n if (lastEventId) {\n if (isObject(input)) {\n input = {\n ...input,\n lastEventId: lastEventId,\n };\n } else {\n input ??= {\n lastEventId: lastEventId,\n };\n }\n }\n }\n return input;\n },\n result: () => {\n return getInputs.result()?.[index];\n },\n };\n },\n ),\n );\n\n const types = new Set(\n calls.map((call) => call.procedure?._def.type).filter(Boolean),\n );\n\n /* istanbul ignore if -- @preserve */\n if (types.size > 1) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: `Cannot mix procedure types in call: ${Array.from(types).join(\n ', ',\n )}`,\n });\n }\n const type: ProcedureType | 'unknown' =\n types.values().next().value ?? 'unknown';\n\n const connectionParamsStr = opts.searchParams.get('connectionParams');\n\n const info: TRPCRequestInfo = {\n isBatchCall,\n accept: getAcceptHeader(req.headers),\n calls,\n type,\n connectionParams:\n connectionParamsStr === null\n ? null\n : parseConnectionParamsFromString(connectionParamsStr),\n signal: req.signal,\n url: opts.url,\n };\n return info;\n },\n};\n\nconst formDataContentTypeHandler: ContentTypeHandler = {\n isMatch(req) {\n return !!req.headers.get('content-type')?.startsWith('multipart/form-data');\n },\n async parse(opts) {\n const { req } = opts;\n if (req.method !== 'POST') {\n throw new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message:\n 'Only POST requests are supported for multipart/form-data requests',\n });\n }\n const getInputs = memo(async () => {\n const fd = await req.formData();\n return fd;\n });\n const procedure = await getProcedureAtPath(opts.router, opts.path);\n return {\n accept: null,\n calls: [\n {\n batchIndex: 0,\n path: opts.path,\n getRawInput: getInputs.read,\n result: getInputs.result,\n procedure,\n },\n ],\n isBatchCall: false,\n type: 'mutation',\n connectionParams: null,\n signal: req.signal,\n url: opts.url,\n };\n },\n};\n\nconst octetStreamContentTypeHandler: ContentTypeHandler = {\n isMatch(req) {\n return !!req.headers\n .get('content-type')\n ?.startsWith('application/octet-stream');\n },\n async parse(opts) {\n const { req } = opts;\n if (req.method !== 'POST') {\n throw new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message:\n 'Only POST requests are supported for application/octet-stream requests',\n });\n }\n const getInputs = memo(async () => {\n return req.body;\n });\n return {\n calls: [\n {\n batchIndex: 0,\n path: opts.path,\n getRawInput: getInputs.read,\n result: getInputs.result,\n procedure: await getProcedureAtPath(opts.router, opts.path),\n },\n ],\n isBatchCall: false,\n accept: null,\n type: 'mutation',\n connectionParams: null,\n signal: req.signal,\n url: opts.url,\n };\n },\n};\n\nconst handlers = [\n jsonContentTypeHandler,\n formDataContentTypeHandler,\n octetStreamContentTypeHandler,\n];\n\nfunction getContentTypeHandler(req: Request): ContentTypeHandler {\n const handler = handlers.find((handler) => handler.isMatch(req));\n if (handler) {\n return handler;\n }\n\n if (!handler && req.method === 'GET') {\n // fallback to JSON for get requests so GET-requests can be opened in browser easily\n return jsonContentTypeHandler;\n }\n\n throw new TRPCError({\n code: 'UNSUPPORTED_MEDIA_TYPE',\n message: req.headers.has('content-type')\n ? `Unsupported content-type \"${req.headers.get('content-type')}`\n : 'Missing content-type header',\n });\n}\n\nexport async function getRequestInfo(\n opts: GetRequestInfoOptions,\n): Promise {\n const handler = getContentTypeHandler(opts.req);\n return await handler.parse(opts);\n}\n", "import { isObject } from '../utils';\n\nexport function isAbortError(\n error: unknown,\n): error is DOMException | Error | { name: 'AbortError' } {\n return isObject(error) && error['name'] === 'AbortError';\n}\n\nexport function throwAbortError(message = 'AbortError'): never {\n throw new DOMException(message, 'AbortError');\n}\n", "/*!\n * is-plain-object \n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o: unknown): o is Record {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n \nexport function isPlainObject(o: unknown): o is Record {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n};\n", "/* eslint-disable @typescript-eslint/unbound-method */\n \n \n\nimport type {\n PromiseExecutor,\n PromiseWithResolvers,\n ProxyPromise,\n SubscribedPromise,\n} from \"./types\";\n\n/** Memory safe (weakmapped) cache of the ProxyPromise for each Promise,\n * which is retained for the lifetime of the original Promise.\n */\nconst subscribableCache = new WeakMap<\n PromiseLike,\n ProxyPromise\n>();\n\n/** A NOOP function allowing a consistent interface for settled\n * SubscribedPromises (settled promises are not subscribed - they resolve\n * immediately). */\nconst NOOP = () => {\n // noop\n};\n\n/**\n * Every `Promise` can be shadowed by a single `ProxyPromise`. It is\n * created once, cached and reused throughout the lifetime of the Promise. Get a\n * Promise's ProxyPromise using `Unpromise.proxy(promise)`.\n *\n * The `ProxyPromise` attaches handlers to the original `Promise`\n * `.then()` and `.catch()` just once. Promises derived from it use a\n * subscription- (and unsubscription-) based mechanism that monitors these\n * handlers.\n *\n * Every time you call `.subscribe()`, `.then()` `.catch()` or `.finally()` on a\n * `ProxyPromise` it returns a `SubscribedPromise` having an additional\n * `unsubscribe()` method. Calling `unsubscribe()` detaches reference chains\n * from the original, potentially long-lived Promise, eliminating memory leaks.\n *\n * This approach can eliminate the memory leaks that otherwise come about from\n * repeated `race()` or `any()` calls invoking `.then()` and `.catch()` multiple\n * times on the same long-lived native Promise (subscriptions which can never be\n * cleaned up).\n *\n * `Unpromise.race(promises)` is a reference implementation of `Promise.race`\n * avoiding memory leaks when using long-lived unsettled Promises.\n *\n * `Unpromise.any(promises)` is a reference implementation of `Promise.any`\n * avoiding memory leaks when using long-lived unsettled Promises.\n *\n * `Unpromise.resolve(promise)` returns an ephemeral `SubscribedPromise` for\n * any given `Promise` facilitating arbitrary async/await patterns. Behind\n * the scenes, `resolve` is implemented simply as\n * `Unpromise.proxy(promise).subscribe()`. Don't forget to call `.unsubscribe()`\n * to tidy up!\n *\n */\nexport class Unpromise implements ProxyPromise {\n /** INSTANCE IMPLEMENTATION */\n\n /** The promise shadowed by this Unpromise */\n protected readonly promise: Promise | PromiseLike;\n\n /** Promises expecting eventual settlement (unless unsubscribed first). This list is deleted\n * after the original promise settles - no further notifications will be issued. */\n protected subscribers: ReadonlyArray> | null = [];\n\n /** The Promise's settlement (recorded when it fulfils or rejects). This is consulted when\n * calling .subscribe() .then() .catch() .finally() to see if an immediately-resolving Promise\n * can be returned, and therefore subscription can be bypassed. */\n protected settlement: PromiseSettledResult | null = null;\n\n /** Constructor accepts a normal Promise executor function like `new\n * Unpromise((resolve, reject) => {...})` or accepts a pre-existing Promise\n * like `new Unpromise(existingPromise)`. Adds `.then()` and `.catch()`\n * handlers to the Promise. These handlers pass fulfilment and rejection\n * notifications to downstream subscribers and maintains records of value\n * or error if the Promise ever settles. */\n protected constructor(promise: Promise);\n protected constructor(promise: PromiseLike);\n protected constructor(executor: PromiseExecutor);\n protected constructor(arg: Promise | PromiseLike | PromiseExecutor) {\n // handle either a Promise or a Promise executor function\n if (typeof arg === \"function\") {\n this.promise = new Promise(arg);\n } else {\n this.promise = arg;\n }\n\n // subscribe for eventual fulfilment and rejection\n\n // handle PromiseLike objects (that at least have .then)\n const thenReturn = this.promise.then((value) => {\n // atomically record fulfilment and detach subscriber list\n const { subscribers } = this;\n this.subscribers = null;\n this.settlement = {\n status: \"fulfilled\",\n value,\n };\n // notify fulfilment to subscriber list\n subscribers?.forEach(({ resolve }) => {\n resolve(value);\n });\n });\n\n // handle Promise (that also have a .catch behaviour)\n if (\"catch\" in thenReturn) {\n thenReturn.catch((reason) => {\n // atomically record rejection and detach subscriber list\n const { subscribers } = this;\n this.subscribers = null;\n this.settlement = {\n status: \"rejected\",\n reason,\n };\n // notify rejection to subscriber list\n subscribers?.forEach(({ reject }) => {\n reject(reason);\n });\n });\n }\n }\n\n /** Create a promise that mitigates uncontrolled subscription to a long-lived\n * Promise via .then() and .catch() - otherwise a source of memory leaks.\n *\n * The returned promise has an `unsubscribe()` method which can be called when\n * the Promise is no longer being tracked by application logic, and which\n * ensures that there is no reference chain from the original promise to the\n * new one, and therefore no memory leak.\n *\n * If original promise has not yet settled, this adds a new unique promise\n * that listens to then/catch events, along with an `unsubscribe()` method to\n * detach it.\n *\n * If original promise has settled, then creates a new Promise.resolve() or\n * Promise.reject() and provided unsubscribe is a noop.\n *\n * If you call `unsubscribe()` before the returned Promise has settled, it\n * will never settle.\n */\n subscribe(): SubscribedPromise {\n // in all cases we will combine some promise with its unsubscribe function\n let promise: Promise;\n let unsubscribe: () => void;\n\n const { settlement } = this;\n if (settlement === null) {\n // not yet settled - subscribe new promise. Expect eventual settlement\n if (this.subscribers === null) {\n // invariant - it is not settled, so it must have subscribers\n throw new Error(\"Unpromise settled but still has subscribers\");\n }\n const subscriber = withResolvers();\n this.subscribers = listWithMember(this.subscribers, subscriber);\n promise = subscriber.promise;\n unsubscribe = () => {\n if (this.subscribers !== null) {\n this.subscribers = listWithoutMember(this.subscribers, subscriber);\n }\n };\n } else {\n // settled - don't create subscribed promise. Just resolve or reject\n const { status } = settlement;\n if (status === \"fulfilled\") {\n promise = Promise.resolve(settlement.value);\n } else {\n promise = Promise.reject(settlement.reason);\n }\n unsubscribe = NOOP;\n }\n\n // extend promise signature with the extra method\n return Object.assign(promise, { unsubscribe });\n }\n\n /** STANDARD PROMISE METHODS (but returning a SubscribedPromise) */\n\n then(\n onfulfilled?:\n | ((value: T) => TResult1 | PromiseLike)\n | null\n ,\n onrejected?:\n | ((reason: any) => TResult2 | PromiseLike)\n | null\n \n ): SubscribedPromise {\n const subscribed = this.subscribe();\n const { unsubscribe } = subscribed;\n return Object.assign(subscribed.then(onfulfilled, onrejected), {\n unsubscribe,\n });\n }\n\n catch(\n onrejected?:\n | ((reason: any) => TResult | PromiseLike)\n | null\n \n ): SubscribedPromise {\n const subscribed = this.subscribe();\n const { unsubscribe } = subscribed;\n return Object.assign(subscribed.catch(onrejected), {\n unsubscribe,\n });\n }\n\n finally(onfinally?: (() => void) | null ): SubscribedPromise {\n const subscribed = this.subscribe();\n const { unsubscribe } = subscribed;\n return Object.assign(subscribed.finally(onfinally), {\n unsubscribe,\n });\n }\n\n /** TOSTRING SUPPORT */\n\n readonly [Symbol.toStringTag] = \"Unpromise\";\n\n /** Unpromise STATIC METHODS */\n\n /** Create or Retrieve the proxy Unpromise (a re-used Unpromise for the VM lifetime\n * of the provided Promise reference) */\n static proxy(promise: PromiseLike): ProxyPromise {\n const cached = Unpromise.getSubscribablePromise(promise);\n return typeof cached !== \"undefined\"\n ? cached\n : Unpromise.createSubscribablePromise(promise);\n }\n\n /** Create and store an Unpromise keyed by an original Promise. */\n protected static createSubscribablePromise(promise: PromiseLike) {\n const created = new Unpromise(promise);\n subscribableCache.set(promise, created as Unpromise); // resolve promise to unpromise\n subscribableCache.set(created, created as Unpromise); // resolve the unpromise to itself\n return created;\n }\n\n /** Retrieve a previously-created Unpromise keyed by an original Promise. */\n protected static getSubscribablePromise(promise: PromiseLike) {\n return subscribableCache.get(promise) as ProxyPromise | undefined;\n }\n\n /** Promise STATIC METHODS */\n\n /** Lookup the Unpromise for this promise, and derive a SubscribedPromise from\n * it (that can be later unsubscribed to eliminate Memory leaks) */\n static resolve(value: T | PromiseLike) {\n const promise: PromiseLike =\n typeof value === \"object\" &&\n value !== null &&\n \"then\" in value &&\n typeof value.then === \"function\"\n ? value\n : Promise.resolve(value);\n return Unpromise.proxy(promise).subscribe() as SubscribedPromise<\n Awaited\n >;\n }\n\n /** Perform Promise.any() via SubscribedPromises, then unsubscribe them.\n * Equivalent to Promise.any but eliminates memory leaks from long-lived\n * promises accumulating .then() and .catch() subscribers. */\n static async any(\n values: T\n ): Promise>;\n static async any(\n values: Iterable>\n ): Promise> {\n const valuesArray = Array.isArray(values) ? values : [...values];\n const subscribedPromises = valuesArray.map(Unpromise.resolve);\n try {\n return await Promise.any(subscribedPromises);\n } finally {\n subscribedPromises.forEach(({ unsubscribe }) => {\n unsubscribe();\n });\n }\n }\n\n /** Perform Promise.race via SubscribedPromises, then unsubscribe them.\n * Equivalent to Promise.race but eliminates memory leaks from long-lived\n * promises accumulating .then() and .catch() subscribers. */\n static async race(\n values: T\n ): Promise>;\n static async race(\n values: Iterable>\n ): Promise> {\n const valuesArray = Array.isArray(values) ? values : [...values];\n const subscribedPromises = valuesArray.map(Unpromise.resolve);\n try {\n return await Promise.race(subscribedPromises);\n } finally {\n subscribedPromises.forEach(({ unsubscribe }) => {\n unsubscribe();\n });\n }\n }\n\n /** Create a race of SubscribedPromises that will fulfil to a single winning\n * Promise (in a 1-Tuple). Eliminates memory leaks from long-lived promises\n * accumulating .then() and .catch() subscribers. Allows simple logic to\n * consume the result, like...\n * ```ts\n * const [ winner ] = await Unpromise.race([ promiseA, promiseB ]);\n * if(winner === promiseB){\n * const result = await promiseB;\n * // do the thing\n * }\n * ```\n * */\n static async raceReferences>(\n promises: readonly TPromise[]\n ) {\n // map each promise to an eventual 1-tuple containing itself\n const selfPromises = promises.map(resolveSelfTuple);\n\n // now race them. They will fulfil to a readonly [P] or reject.\n try {\n return await Promise.race(selfPromises);\n } finally {\n for (const promise of selfPromises) {\n // unsubscribe proxy promises when the race is over to mitigate memory leaks\n promise.unsubscribe();\n }\n }\n }\n}\n\n/** Promises a 1-tuple containing the original promise when it resolves. Allows\n * awaiting the eventual Promise ***reference*** (easy to destructure and\n * exactly compare with ===). Avoids resolving to the Promise ***value*** (which\n * may be ambiguous and therefore hard to identify as the winner of a race).\n * You can call unsubscribe on the Promise to mitigate memory leaks.\n * */\nexport function resolveSelfTuple>(\n promise: TPromise\n): SubscribedPromise {\n return Unpromise.proxy(promise).then(() => [promise] as const);\n}\n\n/** VENDORED (Future) PROMISE UTILITIES */\n\n/** Reference implementation of https://github.com/tc39/proposal-promise-with-resolvers */\nfunction withResolvers(): PromiseWithResolvers {\n let resolve!: PromiseWithResolvers[\"resolve\"];\n let reject!: PromiseWithResolvers[\"reject\"];\n const promise = new Promise((_resolve, _reject) => {\n resolve = _resolve;\n reject = _reject;\n });\n return {\n promise,\n resolve,\n reject,\n };\n}\n\n/** IMMUTABLE LIST OPERATIONS */\n\nfunction listWithMember(arr: readonly T[], member: T): readonly T[] {\n return [...arr, member];\n}\n\nfunction listWithoutIndex(arr: readonly T[], index: number) {\n return [...arr.slice(0, index), ...arr.slice(index + 1)];\n}\n\nfunction listWithoutMember(arr: readonly T[], member: unknown) {\n const index = arr.indexOf(member as T);\n if (index !== -1) {\n return listWithoutIndex(arr, index);\n }\n return arr;\n}\n", "// @ts-expect-error - polyfilling symbol\n// eslint-disable-next-line no-restricted-syntax\nSymbol.dispose ??= Symbol();\n\n// @ts-expect-error - polyfilling symbol\n// eslint-disable-next-line no-restricted-syntax\nSymbol.asyncDispose ??= Symbol();\n\n/**\n * Takes a value and a dispose function and returns a new object that implements the Disposable interface.\n * The returned object is the original value augmented with a Symbol.dispose method.\n * @param thing The value to make disposable\n * @param dispose Function to call when disposing the resource\n * @returns The original value with Symbol.dispose method added\n */\nexport function makeResource(thing: T, dispose: () => void): T & Disposable {\n const it = thing as T & Partial;\n\n // eslint-disable-next-line no-restricted-syntax\n const existing = it[Symbol.dispose];\n\n // eslint-disable-next-line no-restricted-syntax\n it[Symbol.dispose] = () => {\n dispose();\n existing?.();\n };\n\n return it as T & Disposable;\n}\n\n/**\n * Takes a value and an async dispose function and returns a new object that implements the AsyncDisposable interface.\n * The returned object is the original value augmented with a Symbol.asyncDispose method.\n * @param thing The value to make async disposable\n * @param dispose Async function to call when disposing the resource\n * @returns The original value with Symbol.asyncDispose method added\n */\nexport function makeAsyncResource(\n thing: T,\n dispose: () => Promise,\n): T & AsyncDisposable {\n const it = thing as T & Partial;\n\n // eslint-disable-next-line no-restricted-syntax\n const existing = it[Symbol.asyncDispose];\n\n // eslint-disable-next-line no-restricted-syntax\n it[Symbol.asyncDispose] = async () => {\n await dispose();\n await existing?.();\n };\n\n return it as T & AsyncDisposable;\n}\n", "import { makeResource } from './disposable';\n\nexport const disposablePromiseTimerResult = Symbol();\n\nexport function timerResource(ms: number) {\n let timer: ReturnType | null = null;\n\n return makeResource(\n {\n start() {\n if (timer) {\n throw new Error('Timer already started');\n }\n\n const promise = new Promise(\n (resolve) => {\n timer = setTimeout(() => resolve(disposablePromiseTimerResult), ms);\n },\n );\n return promise;\n },\n },\n () => {\n if (timer) {\n clearTimeout(timer);\n }\n },\n );\n}\n", "function _usingCtx() {\n var r = \"function\" == typeof SuppressedError ? SuppressedError : function (r, e) {\n var n = Error();\n return n.name = \"SuppressedError\", n.error = r, n.suppressed = e, n;\n },\n e = {},\n n = [];\n function using(r, e) {\n if (null != e) {\n if (Object(e) !== e) throw new TypeError(\"using declarations can only be used with objects, functions, null, or undefined.\");\n if (r) var o = e[Symbol.asyncDispose || Symbol[\"for\"](\"Symbol.asyncDispose\")];\n if (void 0 === o && (o = e[Symbol.dispose || Symbol[\"for\"](\"Symbol.dispose\")], r)) var t = o;\n if (\"function\" != typeof o) throw new TypeError(\"Object is not disposable.\");\n t && (o = function o() {\n try {\n t.call(e);\n } catch (r) {\n return Promise.reject(r);\n }\n }), n.push({\n v: e,\n d: o,\n a: r\n });\n } else r && n.push({\n d: e,\n a: r\n });\n return e;\n }\n return {\n e: e,\n u: using.bind(null, !1),\n a: using.bind(null, !0),\n d: function d() {\n var o,\n t = this.e,\n s = 0;\n function next() {\n for (; o = n.pop();) try {\n if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next);\n if (o.d) {\n var r = o.d.call(o.v);\n if (o.a) return s |= 2, Promise.resolve(r).then(next, err);\n } else s |= 1;\n } catch (r) {\n return err(r);\n }\n if (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve();\n if (t !== e) throw t;\n }\n function err(n) {\n return t = t !== e ? new r(n, t) : n, next();\n }\n return next();\n }\n };\n}\nmodule.exports = _usingCtx, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "function _OverloadYield(e, d) {\n this.v = e, this.k = d;\n}\nmodule.exports = _OverloadYield, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var OverloadYield = require(\"./OverloadYield.js\");\nfunction _awaitAsyncGenerator(e) {\n return new OverloadYield(e, 0);\n}\nmodule.exports = _awaitAsyncGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var OverloadYield = require(\"./OverloadYield.js\");\nfunction _wrapAsyncGenerator(e) {\n return function () {\n return new AsyncGenerator(e.apply(this, arguments));\n };\n}\nfunction AsyncGenerator(e) {\n var r, t;\n function resume(r, t) {\n try {\n var n = e[r](t),\n o = n.value,\n u = o instanceof OverloadYield;\n Promise.resolve(u ? o.v : o).then(function (t) {\n if (u) {\n var i = \"return\" === r ? \"return\" : \"next\";\n if (!o.k || t.done) return resume(i, t);\n t = e[i](t).value;\n }\n settle(n.done ? \"return\" : \"normal\", t);\n }, function (e) {\n resume(\"throw\", e);\n });\n } catch (e) {\n settle(\"throw\", e);\n }\n }\n function settle(e, n) {\n switch (e) {\n case \"return\":\n r.resolve({\n value: n,\n done: !0\n });\n break;\n case \"throw\":\n r.reject(n);\n break;\n default:\n r.resolve({\n value: n,\n done: !1\n });\n }\n (r = r.next) ? resume(r.key, r.arg) : t = null;\n }\n this._invoke = function (e, n) {\n return new Promise(function (o, u) {\n var i = {\n key: e,\n arg: n,\n resolve: o,\n reject: u,\n next: null\n };\n t ? t = t.next = i : (r = t = i, resume(e, n));\n });\n }, \"function\" != typeof e[\"return\"] && (this[\"return\"] = void 0);\n}\nAsyncGenerator.prototype[\"function\" == typeof Symbol && Symbol.asyncIterator || \"@@asyncIterator\"] = function () {\n return this;\n}, AsyncGenerator.prototype.next = function (e) {\n return this._invoke(\"next\", e);\n}, AsyncGenerator.prototype[\"throw\"] = function (e) {\n return this._invoke(\"throw\", e);\n}, AsyncGenerator.prototype[\"return\"] = function (e) {\n return this._invoke(\"return\", e);\n};\nmodule.exports = _wrapAsyncGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import { Unpromise } from '../../../vendor/unpromise';\nimport { throwAbortError } from '../../http/abortError';\nimport { makeAsyncResource } from './disposable';\nimport { disposablePromiseTimerResult, timerResource } from './timerResource';\n\nexport function iteratorResource(\n iterable: AsyncIterable,\n): AsyncIterator & AsyncDisposable {\n const iterator = iterable[Symbol.asyncIterator]();\n\n // @ts-expect-error - this is added in node 24 which we don't officially support yet\n // eslint-disable-next-line no-restricted-syntax\n if (iterator[Symbol.asyncDispose]) {\n return iterator as AsyncIterator & AsyncDisposable;\n }\n\n return makeAsyncResource(iterator, async () => {\n await iterator.return?.();\n });\n}\n\n/**\n * Derives a new {@link AsyncGenerator} based of {@link iterable}, that yields its first\n * {@link count} values. Then, a grace period of {@link gracePeriodMs} is started in which further\n * values may still come through. After this period, the generator aborts.\n */\nexport async function* takeWithGrace(\n iterable: AsyncIterable,\n opts: {\n count: number;\n gracePeriodMs: number;\n },\n): AsyncGenerator {\n await using iterator = iteratorResource(iterable);\n\n // declaration outside the loop for garbage collection reasons\n let result: null | IteratorResult | typeof disposablePromiseTimerResult;\n\n using timer = timerResource(opts.gracePeriodMs);\n\n let count = opts.count;\n\n let timerPromise = new Promise(() => {\n // never resolves\n });\n\n while (true) {\n result = await Unpromise.race([iterator.next(), timerPromise]);\n if (result === disposablePromiseTimerResult) {\n throwAbortError();\n }\n if (result.done) {\n return result.value;\n }\n yield result.value;\n if (--count === 0) {\n timerPromise = timer.start();\n }\n // free up reference for garbage collection\n result = null;\n }\n}\n", "/* eslint-disable @typescript-eslint/no-non-null-assertion */\nexport function createDeferred() {\n let resolve: (value: TValue) => void;\n let reject: (error: unknown) => void;\n const promise = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n return { promise, resolve: resolve!, reject: reject! };\n}\nexport type Deferred = ReturnType>;\n", "import { createDeferred } from './createDeferred';\nimport { makeAsyncResource } from './disposable';\n\ntype ManagedIteratorResult =\n | { status: 'yield'; value: TYield }\n | { status: 'return'; value: TReturn }\n | { status: 'error'; error: unknown };\nfunction createManagedIterator(\n iterable: AsyncIterable,\n onResult: (result: ManagedIteratorResult) => void,\n) {\n const iterator = iterable[Symbol.asyncIterator]();\n let state: 'idle' | 'pending' | 'done' = 'idle';\n\n function cleanup() {\n state = 'done';\n onResult = () => {\n // noop\n };\n }\n\n function pull() {\n if (state !== 'idle') {\n return;\n }\n state = 'pending';\n\n const next = iterator.next();\n next\n .then((result) => {\n if (result.done) {\n state = 'done';\n onResult({ status: 'return', value: result.value });\n cleanup();\n return;\n }\n state = 'idle';\n onResult({ status: 'yield', value: result.value });\n })\n .catch((cause) => {\n onResult({ status: 'error', error: cause });\n cleanup();\n });\n }\n\n return {\n pull,\n destroy: async () => {\n cleanup();\n await iterator.return?.();\n },\n };\n}\ntype ManagedIterator = ReturnType<\n typeof createManagedIterator\n>;\n\ninterface MergedAsyncIterables\n extends AsyncIterable {\n add(iterable: AsyncIterable): void;\n}\n\n/**\n * Creates a new async iterable that merges multiple async iterables into a single stream.\n * Values from the input iterables are yielded in the order they resolve, similar to Promise.race().\n *\n * New iterables can be added dynamically using the returned {@link MergedAsyncIterables.add} method, even after iteration has started.\n *\n * If any of the input iterables throws an error, that error will be propagated through the merged stream.\n * Other iterables will not continue to be processed.\n *\n * @template TYield The type of values yielded by the input iterables\n */\nexport function mergeAsyncIterables(): MergedAsyncIterables {\n let state: 'idle' | 'pending' | 'done' = 'idle';\n let flushSignal = createDeferred();\n\n /**\n * used while {@link state} is `idle`\n */\n const iterables: AsyncIterable[] = [];\n /**\n * used while {@link state} is `pending`\n */\n const iterators = new Set>();\n\n const buffer: Array<\n [\n iterator: ManagedIterator,\n result: Exclude<\n ManagedIteratorResult,\n { status: 'return' }\n >,\n ]\n > = [];\n\n function initIterable(iterable: AsyncIterable) {\n if (state !== 'pending') {\n // shouldn't happen\n return;\n }\n const iterator = createManagedIterator(iterable, (result) => {\n if (state !== 'pending') {\n // shouldn't happen\n return;\n }\n switch (result.status) {\n case 'yield':\n buffer.push([iterator, result]);\n break;\n case 'return':\n iterators.delete(iterator);\n break;\n case 'error':\n buffer.push([iterator, result]);\n iterators.delete(iterator);\n break;\n }\n flushSignal.resolve();\n });\n iterators.add(iterator);\n iterator.pull();\n }\n\n return {\n add(iterable: AsyncIterable) {\n switch (state) {\n case 'idle':\n iterables.push(iterable);\n break;\n case 'pending':\n initIterable(iterable);\n break;\n case 'done': {\n // shouldn't happen\n break;\n }\n }\n },\n async *[Symbol.asyncIterator]() {\n if (state !== 'idle') {\n throw new Error('Cannot iterate twice');\n }\n state = 'pending';\n\n await using _finally = makeAsyncResource({}, async () => {\n state = 'done';\n\n const errors: unknown[] = [];\n await Promise.all(\n Array.from(iterators.values()).map(async (it) => {\n try {\n await it.destroy();\n } catch (cause) {\n errors.push(cause);\n }\n }),\n );\n buffer.length = 0;\n iterators.clear();\n flushSignal.resolve();\n\n if (errors.length > 0) {\n throw new AggregateError(errors);\n }\n });\n\n while (iterables.length > 0) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n initIterable(iterables.shift()!);\n }\n\n while (iterators.size > 0) {\n await flushSignal.promise;\n\n while (buffer.length > 0) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const [iterator, result] = buffer.shift()!;\n\n switch (result.status) {\n case 'yield':\n yield result.value;\n iterator.pull();\n break;\n case 'error':\n throw result.error;\n }\n }\n flushSignal = createDeferred();\n }\n },\n };\n}\n", "/**\n * Creates a ReadableStream from an AsyncIterable.\n *\n * @param iterable - The source AsyncIterable to stream from\n * @returns A ReadableStream that yields values from the AsyncIterable\n */\nexport function readableStreamFrom(\n iterable: AsyncIterable,\n): ReadableStream {\n const iterator = iterable[Symbol.asyncIterator]();\n\n return new ReadableStream({\n async cancel() {\n await iterator.return?.();\n },\n\n async pull(controller) {\n const result = await iterator.next();\n\n if (result.done) {\n controller.close();\n return;\n }\n\n controller.enqueue(result.value);\n },\n });\n}\n", "import { Unpromise } from '../../../vendor/unpromise';\nimport { iteratorResource } from './asyncIterable';\nimport { disposablePromiseTimerResult, timerResource } from './timerResource';\n\nexport const PING_SYM = Symbol('ping');\n\n/**\n * Derives a new {@link AsyncGenerator} based of {@link iterable}, that yields {@link PING_SYM}\n * whenever no value has been yielded for {@link pingIntervalMs}.\n */\nexport async function* withPing(\n iterable: AsyncIterable,\n pingIntervalMs: number,\n): AsyncGenerator {\n await using iterator = iteratorResource(iterable);\n\n // declaration outside the loop for garbage collection reasons\n let result:\n | null\n | IteratorResult\n | typeof disposablePromiseTimerResult;\n\n let nextPromise = iterator.next();\n\n while (true) {\n using pingPromise = timerResource(pingIntervalMs);\n\n result = await Unpromise.race([nextPromise, pingPromise.start()]);\n\n if (result === disposablePromiseTimerResult) {\n // cancelled\n\n yield PING_SYM;\n continue;\n }\n\n if (result.done) {\n return result.value;\n }\n\n nextPromise = iterator.next();\n yield result.value;\n\n // free up reference for garbage collection\n result = null;\n }\n}\n", "function _asyncIterator(r) {\n var n,\n t,\n o,\n e = 2;\n for (\"undefined\" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) {\n if (t && null != (n = r[t])) return n.call(r);\n if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r));\n t = \"@@asyncIterator\", o = \"@@iterator\";\n }\n throw new TypeError(\"Object is not async iterable\");\n}\nfunction AsyncFromSyncIterator(r) {\n function AsyncFromSyncIteratorContinuation(r) {\n if (Object(r) !== r) return Promise.reject(new TypeError(r + \" is not an object.\"));\n var n = r.done;\n return Promise.resolve(r.value).then(function (r) {\n return {\n value: r,\n done: n\n };\n });\n }\n return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) {\n this.s = r, this.n = r.next;\n }, AsyncFromSyncIterator.prototype = {\n s: null,\n n: null,\n next: function next() {\n return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));\n },\n \"return\": function _return(r) {\n var n = this.s[\"return\"];\n return void 0 === n ? Promise.resolve({\n value: r,\n done: !0\n }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));\n },\n \"throw\": function _throw(r) {\n var n = this.s[\"return\"];\n return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));\n }\n }, new AsyncFromSyncIterator(r);\n}\nmodule.exports = _asyncIterator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import { isPlainObject } from '@trpc/server/vendor/is-plain-object';\nimport {\n emptyObject,\n isAsyncIterable,\n isFunction,\n isObject,\n run,\n} from '../utils';\nimport { iteratorResource } from './utils/asyncIterable';\nimport type { Deferred } from './utils/createDeferred';\nimport { createDeferred } from './utils/createDeferred';\nimport { makeResource } from './utils/disposable';\nimport { mergeAsyncIterables } from './utils/mergeAsyncIterables';\nimport { readableStreamFrom } from './utils/readableStreamFrom';\nimport { PING_SYM, withPing } from './utils/withPing';\n\n/**\n * A subset of the standard ReadableStream properties needed by tRPC internally.\n * @see ReadableStream from lib.dom.d.ts\n */\nexport type WebReadableStreamEsque = {\n getReader: () => ReadableStreamDefaultReader;\n};\n\nexport type NodeJSReadableStreamEsque = {\n on(\n eventName: string | symbol,\n listener: (...args: any[]) => void,\n ): NodeJSReadableStreamEsque;\n};\n\n// ---------- types\nconst CHUNK_VALUE_TYPE_PROMISE = 0;\ntype CHUNK_VALUE_TYPE_PROMISE = typeof CHUNK_VALUE_TYPE_PROMISE;\nconst CHUNK_VALUE_TYPE_ASYNC_ITERABLE = 1;\ntype CHUNK_VALUE_TYPE_ASYNC_ITERABLE = typeof CHUNK_VALUE_TYPE_ASYNC_ITERABLE;\n\nconst PROMISE_STATUS_FULFILLED = 0;\ntype PROMISE_STATUS_FULFILLED = typeof PROMISE_STATUS_FULFILLED;\nconst PROMISE_STATUS_REJECTED = 1;\ntype PROMISE_STATUS_REJECTED = typeof PROMISE_STATUS_REJECTED;\n\nconst ASYNC_ITERABLE_STATUS_RETURN = 0;\ntype ASYNC_ITERABLE_STATUS_RETURN = typeof ASYNC_ITERABLE_STATUS_RETURN;\nconst ASYNC_ITERABLE_STATUS_YIELD = 1;\ntype ASYNC_ITERABLE_STATUS_YIELD = typeof ASYNC_ITERABLE_STATUS_YIELD;\nconst ASYNC_ITERABLE_STATUS_ERROR = 2;\ntype ASYNC_ITERABLE_STATUS_ERROR = typeof ASYNC_ITERABLE_STATUS_ERROR;\n\ntype ChunkDefinitionKey =\n // root should be replaced\n | null\n // at array path\n | number\n // at key path\n | string;\n\ntype ChunkIndex = number & { __chunkIndex: true };\ntype ChunkValueType =\n | CHUNK_VALUE_TYPE_PROMISE\n | CHUNK_VALUE_TYPE_ASYNC_ITERABLE;\ntype ChunkDefinition = [\n key: ChunkDefinitionKey,\n type: ChunkValueType,\n chunkId: ChunkIndex,\n];\ntype EncodedValue = [\n // data\n [unknown] | [],\n // chunk descriptions\n ...ChunkDefinition[],\n];\n\ntype Head = Record;\ntype PromiseChunk =\n | [\n chunkIndex: ChunkIndex,\n status: PROMISE_STATUS_FULFILLED,\n value: EncodedValue,\n ]\n | [chunkIndex: ChunkIndex, status: PROMISE_STATUS_REJECTED, error: unknown];\ntype IterableChunk =\n | [\n chunkIndex: ChunkIndex,\n status: ASYNC_ITERABLE_STATUS_RETURN,\n value: EncodedValue,\n ]\n | [\n chunkIndex: ChunkIndex,\n status: ASYNC_ITERABLE_STATUS_YIELD,\n value: EncodedValue,\n ]\n | [\n chunkIndex: ChunkIndex,\n status: ASYNC_ITERABLE_STATUS_ERROR,\n error: unknown,\n ];\ntype ChunkData = PromiseChunk | IterableChunk;\ntype PlaceholderValue = 0 & { __placeholder: true };\nexport function isPromise(value: unknown): value is Promise {\n return (\n (isObject(value) || isFunction(value)) &&\n typeof value?.['then'] === 'function' &&\n typeof value?.['catch'] === 'function'\n );\n}\n\ntype Serialize = (value: any) => any;\ntype Deserialize = (value: any) => any;\n\ntype PathArray = readonly (string | number)[];\nexport type ProducerOnError = (opts: {\n error: unknown;\n path: PathArray;\n}) => void;\nexport interface JSONLProducerOptions {\n serialize?: Serialize;\n data: Record | unknown[];\n onError?: ProducerOnError;\n formatError?: (opts: { error: unknown; path: PathArray }) => unknown;\n maxDepth?: number;\n /**\n * Interval in milliseconds to send a ping to the client to keep the connection alive\n * This will be sent as a whitespace character\n * @default undefined\n */\n pingMs?: number;\n}\n\nclass MaxDepthError extends Error {\n constructor(public path: (string | number)[]) {\n super('Max depth reached at path: ' + path.join('.'));\n }\n}\n\nasync function* createBatchStreamProducer(\n opts: JSONLProducerOptions,\n): AsyncIterable {\n const { data } = opts;\n let counter = 0 as ChunkIndex;\n const placeholder = 0 as PlaceholderValue;\n\n const mergedIterables = mergeAsyncIterables();\n function registerAsync(\n callback: (idx: ChunkIndex) => AsyncIterable,\n ) {\n const idx = counter++ as ChunkIndex;\n\n const iterable = callback(idx);\n mergedIterables.add(iterable);\n\n return idx;\n }\n\n function encodePromise(promise: Promise, path: (string | number)[]) {\n return registerAsync(async function* (idx) {\n const error = checkMaxDepth(path);\n if (error) {\n // Catch any errors from the original promise to ensure they're reported\n promise.catch((cause) => {\n opts.onError?.({ error: cause, path });\n });\n // Replace the promise with a rejected one containing the max depth error\n promise = Promise.reject(error);\n }\n try {\n const next = await promise;\n yield [idx, PROMISE_STATUS_FULFILLED, encode(next, path)];\n } catch (cause) {\n opts.onError?.({ error: cause, path });\n yield [\n idx,\n PROMISE_STATUS_REJECTED,\n opts.formatError?.({ error: cause, path }),\n ];\n }\n });\n }\n function encodeAsyncIterable(\n iterable: AsyncIterable,\n path: (string | number)[],\n ) {\n return registerAsync(async function* (idx) {\n const error = checkMaxDepth(path);\n if (error) {\n throw error;\n }\n await using iterator = iteratorResource(iterable);\n\n try {\n while (true) {\n const next = await iterator.next();\n if (next.done) {\n yield [idx, ASYNC_ITERABLE_STATUS_RETURN, encode(next.value, path)];\n break;\n }\n yield [idx, ASYNC_ITERABLE_STATUS_YIELD, encode(next.value, path)];\n }\n } catch (cause) {\n opts.onError?.({ error: cause, path });\n\n yield [\n idx,\n ASYNC_ITERABLE_STATUS_ERROR,\n opts.formatError?.({ error: cause, path }),\n ];\n }\n });\n }\n function checkMaxDepth(path: (string | number)[]) {\n if (opts.maxDepth && path.length > opts.maxDepth) {\n return new MaxDepthError(path);\n }\n return null;\n }\n function encodeAsync(\n value: unknown,\n path: (string | number)[],\n ): null | [type: ChunkValueType, chunkId: ChunkIndex] {\n if (isPromise(value)) {\n return [CHUNK_VALUE_TYPE_PROMISE, encodePromise(value, path)];\n }\n if (isAsyncIterable(value)) {\n if (opts.maxDepth && path.length >= opts.maxDepth) {\n throw new Error('Max depth reached');\n }\n return [\n CHUNK_VALUE_TYPE_ASYNC_ITERABLE,\n encodeAsyncIterable(value, path),\n ];\n }\n return null;\n }\n function encode(value: unknown, path: (string | number)[]): EncodedValue {\n if (value === undefined) {\n return [[]];\n }\n const reg = encodeAsync(value, path);\n if (reg) {\n return [[placeholder], [null, ...reg]];\n }\n\n if (!isPlainObject(value)) {\n return [[value]];\n }\n\n const newObj: Record = emptyObject();\n const asyncValues: ChunkDefinition[] = [];\n for (const [key, item] of Object.entries(value)) {\n const transformed = encodeAsync(item, [...path, key]);\n if (!transformed) {\n newObj[key] = item;\n continue;\n }\n newObj[key] = placeholder;\n asyncValues.push([key, ...transformed]);\n }\n return [[newObj], ...asyncValues];\n }\n\n const newHead: Head = emptyObject();\n for (const [key, item] of Object.entries(data)) {\n newHead[key] = encode(item, [key]);\n }\n\n yield newHead;\n\n let iterable: AsyncIterable =\n mergedIterables;\n if (opts.pingMs) {\n iterable = withPing(mergedIterables, opts.pingMs);\n }\n\n for await (const value of iterable) {\n yield value;\n }\n}\n/**\n * JSON Lines stream producer\n * @see https://jsonlines.org/\n */\nexport function jsonlStreamProducer(opts: JSONLProducerOptions) {\n let stream = readableStreamFrom(createBatchStreamProducer(opts));\n\n const { serialize } = opts;\n if (serialize) {\n stream = stream.pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n if (chunk === PING_SYM) {\n controller.enqueue(PING_SYM);\n } else {\n controller.enqueue(serialize(chunk));\n }\n },\n }),\n );\n }\n\n return stream\n .pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n if (chunk === PING_SYM) {\n controller.enqueue(' ');\n } else {\n controller.enqueue(JSON.stringify(chunk) + '\\n');\n }\n },\n }),\n )\n .pipeThrough(new TextEncoderStream());\n}\n\nclass AsyncError extends Error {\n constructor(public readonly data: unknown) {\n super('Received error from server');\n }\n}\nexport type ConsumerOnError = (opts: { error: unknown }) => void;\n\nconst nodeJsStreamToReaderEsque = (source: NodeJSReadableStreamEsque) => {\n return {\n getReader() {\n const stream = new ReadableStream({\n start(controller) {\n source.on('data', (chunk) => {\n controller.enqueue(chunk);\n });\n source.on('end', () => {\n controller.close();\n });\n source.on('error', (error) => {\n controller.error(error);\n });\n },\n });\n return stream.getReader();\n },\n };\n};\n\nfunction createLineAccumulator(\n from: NodeJSReadableStreamEsque | WebReadableStreamEsque,\n) {\n const reader =\n 'getReader' in from\n ? from.getReader()\n : nodeJsStreamToReaderEsque(from).getReader();\n\n let lineAggregate = '';\n\n return new ReadableStream({\n async pull(controller) {\n const { done, value } = await reader.read();\n\n if (done) {\n controller.close();\n } else {\n controller.enqueue(value);\n }\n },\n cancel() {\n return reader.cancel();\n },\n })\n .pipeThrough(new TextDecoderStream())\n .pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n lineAggregate += chunk;\n const parts = lineAggregate.split('\\n');\n lineAggregate = parts.pop() ?? '';\n for (const part of parts) {\n controller.enqueue(part);\n }\n },\n }),\n );\n}\nfunction createConsumerStream(\n from: NodeJSReadableStreamEsque | WebReadableStreamEsque,\n) {\n const stream = createLineAccumulator(from);\n\n let sentHead = false;\n return stream.pipeThrough(\n new TransformStream({\n transform(line, controller) {\n if (!sentHead) {\n const head = JSON.parse(line);\n controller.enqueue(head as THead);\n sentHead = true;\n } else {\n const chunk: ChunkData = JSON.parse(line);\n controller.enqueue(chunk);\n }\n },\n }),\n );\n}\n\n/**\n * Creates a handler for managing stream controllers and their lifecycle\n */\nfunction createStreamsManager(abortController: AbortController) {\n const controllerMap = new Map<\n ChunkIndex,\n ReturnType\n >();\n\n /**\n * Checks if there are no pending controllers or deferred promises\n */\n function isEmpty() {\n return Array.from(controllerMap.values()).every((c) => c.closed);\n }\n\n /**\n * Creates a stream controller\n */\n function createStreamController() {\n let originalController: ReadableStreamDefaultController;\n const stream = new ReadableStream({\n start(controller) {\n originalController = controller;\n },\n });\n\n const streamController = {\n enqueue: (v: ChunkData) => originalController.enqueue(v),\n close: () => {\n originalController.close();\n\n clear();\n\n if (isEmpty()) {\n abortController.abort();\n }\n },\n closed: false,\n getReaderResource: () => {\n const reader = stream.getReader();\n\n return makeResource(reader, () => {\n streamController.close();\n reader.releaseLock();\n });\n },\n error: (reason: unknown) => {\n originalController.error(reason);\n\n clear();\n },\n };\n function clear() {\n Object.assign(streamController, {\n closed: true,\n close: () => {\n // noop\n },\n enqueue: () => {\n // noop\n },\n getReaderResource: null,\n error: () => {\n // noop\n },\n });\n }\n\n return streamController;\n }\n\n /**\n * Gets or creates a stream controller\n */\n function getOrCreate(chunkId: ChunkIndex) {\n let c = controllerMap.get(chunkId);\n if (!c) {\n c = createStreamController();\n controllerMap.set(chunkId, c);\n }\n return c;\n }\n\n /**\n * Cancels all pending controllers and rejects deferred promises\n */\n function cancelAll(reason: unknown) {\n for (const controller of controllerMap.values()) {\n controller.error(reason);\n }\n }\n\n return {\n getOrCreate,\n cancelAll,\n };\n}\n\n/**\n * JSON Lines stream consumer\n * @see https://jsonlines.org/\n */\nexport async function jsonlStreamConsumer(opts: {\n from: NodeJSReadableStreamEsque | WebReadableStreamEsque;\n deserialize?: Deserialize;\n onError?: ConsumerOnError;\n formatError?: (opts: { error: unknown }) => Error;\n /**\n * This `AbortController` will be triggered when there are no more listeners to the stream.\n */\n abortController: AbortController;\n}) {\n const { deserialize = (v) => v } = opts;\n\n let source = createConsumerStream(opts.from);\n if (deserialize) {\n source = source.pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n controller.enqueue(deserialize(chunk));\n },\n }),\n );\n }\n let headDeferred: null | Deferred = createDeferred();\n\n const streamManager = createStreamsManager(opts.abortController);\n\n function decodeChunkDefinition(value: ChunkDefinition) {\n const [_path, type, chunkId] = value;\n\n const controller = streamManager.getOrCreate(chunkId);\n\n switch (type) {\n case CHUNK_VALUE_TYPE_PROMISE: {\n return run(async () => {\n using reader = controller.getReaderResource();\n\n const { value } = await reader.read();\n const [_chunkId, status, data] = value as PromiseChunk;\n switch (status) {\n case PROMISE_STATUS_FULFILLED:\n return decode(data);\n case PROMISE_STATUS_REJECTED:\n throw opts.formatError?.({ error: data }) ?? new AsyncError(data);\n }\n });\n }\n case CHUNK_VALUE_TYPE_ASYNC_ITERABLE: {\n return run(async function* () {\n using reader = controller.getReaderResource();\n\n while (true) {\n const { value } = await reader.read();\n\n const [_chunkId, status, data] = value as IterableChunk;\n\n switch (status) {\n case ASYNC_ITERABLE_STATUS_YIELD:\n yield decode(data);\n break;\n case ASYNC_ITERABLE_STATUS_RETURN:\n return decode(data);\n case ASYNC_ITERABLE_STATUS_ERROR:\n throw (\n opts.formatError?.({ error: data }) ?? new AsyncError(data)\n );\n }\n }\n });\n }\n }\n }\n\n function decode(value: EncodedValue): unknown {\n const [[data], ...asyncProps] = value;\n\n for (const value of asyncProps) {\n const [key] = value;\n const decoded = decodeChunkDefinition(value);\n\n if (key === null) {\n return decoded;\n }\n\n (data as any)[key] = decoded;\n }\n return data;\n }\n\n const closeOrAbort = (reason?: unknown) => {\n headDeferred?.reject(reason);\n streamManager.cancelAll(reason);\n };\n\n source\n .pipeTo(\n new WritableStream({\n write(chunkOrHead) {\n if (headDeferred) {\n const head = chunkOrHead as Record;\n\n for (const [key, value] of Object.entries(chunkOrHead)) {\n const parsed = decode(value as any);\n head[key] = parsed;\n }\n headDeferred.resolve(head as THead);\n headDeferred = null;\n\n return;\n }\n const chunk = chunkOrHead as ChunkData;\n const [idx] = chunk;\n\n const controller = streamManager.getOrCreate(idx);\n controller.enqueue(chunk);\n },\n close: closeOrAbort,\n abort: closeOrAbort,\n }),\n )\n .catch((error) => {\n opts.onError?.({ error });\n closeOrAbort(error);\n });\n\n return [await headDeferred.promise] as const;\n}\n", "var OverloadYield = require(\"./OverloadYield.js\");\nfunction _asyncGeneratorDelegate(t) {\n var e = {},\n n = !1;\n function pump(e, r) {\n return n = !0, r = new Promise(function (n) {\n n(t[e](r));\n }), {\n done: !1,\n value: new OverloadYield(r, 1)\n };\n }\n return e[\"undefined\" != typeof Symbol && Symbol.iterator || \"@@iterator\"] = function () {\n return this;\n }, e.next = function (t) {\n return n ? (n = !1, t) : pump(\"next\", t);\n }, \"function\" == typeof t[\"throw\"] && (e[\"throw\"] = function (t) {\n if (n) throw n = !1, t;\n return pump(\"throw\", t);\n }), \"function\" == typeof t[\"return\"] && (e[\"return\"] = function (t) {\n return n ? (n = !1, t) : pump(\"return\", t);\n }), e;\n}\nmodule.exports = _asyncGeneratorDelegate, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import { Unpromise } from '../../vendor/unpromise';\nimport { getTRPCErrorFromUnknown } from '../error/TRPCError';\nimport { isAbortError } from '../http/abortError';\nimport type { MaybePromise } from '../types';\nimport { emptyObject, identity, run } from '../utils';\nimport type { EventSourceLike } from './sse.types';\nimport type { inferTrackedOutput } from './tracked';\nimport { isTrackedEnvelope } from './tracked';\nimport { takeWithGrace } from './utils/asyncIterable';\nimport { makeAsyncResource } from './utils/disposable';\nimport { readableStreamFrom } from './utils/readableStreamFrom';\nimport {\n disposablePromiseTimerResult,\n timerResource,\n} from './utils/timerResource';\nimport { PING_SYM, withPing } from './utils/withPing';\n\ntype Serialize = (value: any) => any;\ntype Deserialize = (value: any) => any;\n\n/**\n * @internal\n */\nexport interface SSEPingOptions {\n /**\n * Enable ping comments sent from the server\n * @default false\n */\n enabled: boolean;\n /**\n * Interval in milliseconds\n * @default 1000\n */\n intervalMs?: number;\n}\n\nexport interface SSEClientOptions {\n /**\n * Timeout and reconnect after inactivity in milliseconds\n * @default undefined\n */\n reconnectAfterInactivityMs?: number;\n}\n\nexport interface SSEStreamProducerOptions {\n serialize?: Serialize;\n data: AsyncIterable;\n\n maxDepth?: number;\n ping?: SSEPingOptions;\n /**\n * Maximum duration in milliseconds for the request before ending the stream\n * @default undefined\n */\n maxDurationMs?: number;\n /**\n * End the request immediately after data is sent\n * Only useful for serverless runtimes that do not support streaming responses\n * @default false\n */\n emitAndEndImmediately?: boolean;\n formatError?: (opts: { error: unknown }) => unknown;\n /**\n * Client-specific options - these will be sent to the client as part of the first message\n * @default {}\n */\n client?: SSEClientOptions;\n}\n\nconst PING_EVENT = 'ping';\nconst SERIALIZED_ERROR_EVENT = 'serialized-error';\nconst CONNECTED_EVENT = 'connected';\nconst RETURN_EVENT = 'return';\n\ninterface SSEvent {\n id?: string;\n data: unknown;\n comment?: string;\n event?: string;\n}\n/**\n *\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html\n */\nexport function sseStreamProducer(\n opts: SSEStreamProducerOptions,\n) {\n const { serialize = identity } = opts;\n\n const ping: Required = {\n enabled: opts.ping?.enabled ?? false,\n intervalMs: opts.ping?.intervalMs ?? 1000,\n };\n const client: SSEClientOptions = opts.client ?? {};\n\n if (\n ping.enabled &&\n client.reconnectAfterInactivityMs &&\n ping.intervalMs > client.reconnectAfterInactivityMs\n ) {\n throw new Error(\n `Ping interval must be less than client reconnect interval to prevent unnecessary reconnection - ping.intervalMs: ${ping.intervalMs} client.reconnectAfterInactivityMs: ${client.reconnectAfterInactivityMs}`,\n );\n }\n\n async function* generator(): AsyncIterable {\n yield {\n event: CONNECTED_EVENT,\n data: JSON.stringify(client),\n };\n\n type TIteratorValue = Awaited | typeof PING_SYM;\n\n let iterable: AsyncIterable = opts.data;\n\n if (opts.emitAndEndImmediately) {\n iterable = takeWithGrace(iterable, {\n count: 1,\n gracePeriodMs: 1,\n });\n }\n\n if (ping.enabled && ping.intervalMs !== Infinity && ping.intervalMs > 0) {\n iterable = withPing(iterable, ping.intervalMs);\n }\n\n // We need those declarations outside the loop for garbage collection reasons. If they were\n // declared inside, they would not be freed until the next value is present.\n let value: null | TIteratorValue;\n let chunk: null | SSEvent;\n\n for await (value of iterable) {\n if (value === PING_SYM) {\n yield { event: PING_EVENT, data: '' };\n continue;\n }\n\n chunk = isTrackedEnvelope(value)\n ? { id: value[0], data: value[1] }\n : { data: value };\n\n chunk.data = JSON.stringify(serialize(chunk.data));\n\n yield chunk;\n\n // free up references for garbage collection\n value = null;\n chunk = null;\n }\n }\n\n async function* generatorWithErrorHandling(): AsyncIterable {\n try {\n yield* generator();\n\n yield {\n event: RETURN_EVENT,\n data: '',\n };\n } catch (cause) {\n if (isAbortError(cause)) {\n // ignore abort errors, send any other errors\n return;\n }\n // `err` must be caused by `opts.data`, `JSON.stringify` or `serialize`.\n // So, a user error in any case.\n const error = getTRPCErrorFromUnknown(cause);\n const data = opts.formatError?.({ error }) ?? null;\n yield {\n event: SERIALIZED_ERROR_EVENT,\n data: JSON.stringify(serialize(data)),\n };\n }\n }\n\n const stream = readableStreamFrom(generatorWithErrorHandling());\n\n return stream\n .pipeThrough(\n new TransformStream({\n transform(chunk, controller: TransformStreamDefaultController) {\n if ('event' in chunk) {\n controller.enqueue(`event: ${chunk.event}\\n`);\n }\n if ('data' in chunk) {\n controller.enqueue(`data: ${chunk.data}\\n`);\n }\n if ('id' in chunk) {\n controller.enqueue(`id: ${chunk.id}\\n`);\n }\n if ('comment' in chunk) {\n controller.enqueue(`: ${chunk.comment}\\n`);\n }\n controller.enqueue('\\n\\n');\n },\n }),\n )\n .pipeThrough(new TextEncoderStream());\n}\n\ninterface ConsumerStreamResultBase {\n eventSource: InstanceType | null;\n}\n\ninterface ConsumerStreamResultData\n extends ConsumerStreamResultBase {\n type: 'data';\n data: inferTrackedOutput;\n}\n\ninterface ConsumerStreamResultError\n extends ConsumerStreamResultBase {\n type: 'serialized-error';\n error: TConfig['error'];\n}\n\ninterface ConsumerStreamResultConnecting\n extends ConsumerStreamResultBase {\n type: 'connecting';\n event: EventSourceLike.EventOf | null;\n}\ninterface ConsumerStreamResultTimeout\n extends ConsumerStreamResultBase {\n type: 'timeout';\n ms: number;\n}\ninterface ConsumerStreamResultPing\n extends ConsumerStreamResultBase {\n type: 'ping';\n}\n\ninterface ConsumerStreamResultConnected\n extends ConsumerStreamResultBase {\n type: 'connected';\n options: SSEClientOptions;\n}\n\ntype ConsumerStreamResult =\n | ConsumerStreamResultData\n | ConsumerStreamResultError\n | ConsumerStreamResultConnecting\n | ConsumerStreamResultTimeout\n | ConsumerStreamResultPing\n | ConsumerStreamResultConnected;\n\nexport interface SSEStreamConsumerOptions {\n url: () => MaybePromise;\n init: () =>\n | MaybePromise>\n | undefined;\n signal: AbortSignal;\n deserialize?: Deserialize;\n EventSource: TConfig['EventSource'];\n}\n\ninterface ConsumerConfig {\n data: unknown;\n error: unknown;\n EventSource: EventSourceLike.AnyConstructor;\n}\n\nasync function withTimeout(opts: {\n promise: Promise;\n timeoutMs: number;\n onTimeout: () => Promise>;\n}): Promise {\n using timeoutPromise = timerResource(opts.timeoutMs);\n const res = await Unpromise.race([opts.promise, timeoutPromise.start()]);\n\n if (res === disposablePromiseTimerResult) {\n return await opts.onTimeout();\n }\n return res;\n}\n\n/**\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html\n */\nexport function sseStreamConsumer(\n opts: SSEStreamConsumerOptions,\n): AsyncIterable> {\n const { deserialize = (v) => v } = opts;\n\n let clientOptions: SSEClientOptions = emptyObject();\n\n const signal = opts.signal;\n\n let _es: InstanceType | null = null;\n\n const createStream = () =>\n new ReadableStream>({\n async start(controller) {\n const [url, init] = await Promise.all([opts.url(), opts.init()]);\n const eventSource = (_es = new opts.EventSource(\n url,\n init,\n ) as InstanceType);\n\n controller.enqueue({\n type: 'connecting',\n eventSource: _es,\n event: null,\n });\n\n eventSource.addEventListener(CONNECTED_EVENT, (_msg) => {\n const msg = _msg as EventSourceLike.MessageEvent;\n\n const options: SSEClientOptions = JSON.parse(msg.data);\n\n clientOptions = options;\n controller.enqueue({\n type: 'connected',\n options,\n eventSource,\n });\n });\n\n eventSource.addEventListener(SERIALIZED_ERROR_EVENT, (_msg) => {\n const msg = _msg as EventSourceLike.MessageEvent;\n\n controller.enqueue({\n type: 'serialized-error',\n error: deserialize(JSON.parse(msg.data)),\n eventSource,\n });\n });\n eventSource.addEventListener(PING_EVENT, () => {\n controller.enqueue({\n type: 'ping',\n eventSource,\n });\n });\n eventSource.addEventListener(RETURN_EVENT, () => {\n eventSource.close();\n controller.close();\n _es = null;\n });\n eventSource.addEventListener('error', (event) => {\n if (eventSource.readyState === eventSource.CLOSED) {\n controller.error(event);\n } else {\n controller.enqueue({\n type: 'connecting',\n eventSource,\n event,\n });\n }\n });\n eventSource.addEventListener('message', (_msg) => {\n const msg = _msg as EventSourceLike.MessageEvent;\n\n const chunk = deserialize(JSON.parse(msg.data));\n\n const def: SSEvent = {\n data: chunk,\n };\n if (msg.lastEventId) {\n def.id = msg.lastEventId;\n }\n controller.enqueue({\n type: 'data',\n data: def as inferTrackedOutput,\n eventSource,\n });\n });\n\n const onAbort = () => {\n try {\n eventSource.close();\n controller.close();\n } catch {\n // ignore errors in case the controller is already closed\n }\n };\n if (signal.aborted) {\n onAbort();\n } else {\n signal.addEventListener('abort', onAbort);\n }\n },\n cancel() {\n _es?.close();\n },\n });\n\n const getStreamResource = () => {\n let stream = createStream();\n let reader = stream.getReader();\n\n async function dispose() {\n await reader.cancel();\n _es = null;\n }\n\n return makeAsyncResource(\n {\n read() {\n return reader.read();\n },\n async recreate() {\n await dispose();\n\n stream = createStream();\n reader = stream.getReader();\n },\n },\n dispose,\n );\n };\n\n return run(async function* () {\n await using stream = getStreamResource();\n\n while (true) {\n let promise = stream.read();\n\n const timeoutMs = clientOptions.reconnectAfterInactivityMs;\n if (timeoutMs) {\n promise = withTimeout({\n promise,\n timeoutMs,\n onTimeout: async () => {\n const res: Awaited = {\n value: {\n type: 'timeout',\n ms: timeoutMs,\n eventSource: _es,\n },\n done: false,\n };\n // Close and release old reader\n await stream.recreate();\n\n return res;\n },\n });\n }\n\n const result = await promise;\n\n if (result.done) {\n return result.value;\n }\n yield result.value;\n }\n });\n}\n\nexport const sseHeaders = {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache, no-transform',\n 'X-Accel-Buffering': 'no',\n Connection: 'keep-alive',\n} as const;\n", "/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport {\n isObservable,\n observableToAsyncIterable,\n} from '../../observable/observable';\nimport { getErrorShape } from '../error/getErrorShape';\nimport { getTRPCErrorFromUnknown, TRPCError } from '../error/TRPCError';\nimport type { ProcedureType } from '../procedure';\nimport {\n type AnyRouter,\n type inferRouterContext,\n type inferRouterError,\n} from '../router';\nimport type { TRPCResponse } from '../rpc';\nimport { isPromise, jsonlStreamProducer } from '../stream/jsonl';\nimport { sseHeaders, sseStreamProducer } from '../stream/sse';\nimport { transformTRPCResponse } from '../transformer';\nimport {\n abortSignalsAnyPonyfill,\n isAsyncIterable,\n isObject,\n run,\n} from '../utils';\nimport { getAcceptHeader, getRequestInfo } from './contentType';\nimport { getHTTPStatusCode } from './getHTTPStatusCode';\nimport type {\n HTTPBaseHandlerOptions,\n ResolveHTTPRequestOptionsContextFn,\n TRPCRequestInfo,\n} from './types';\n\nfunction errorToAsyncIterable(err: TRPCError): AsyncIterable {\n return run(async function* () {\n throw err;\n });\n}\ntype HTTPMethods =\n | 'GET'\n | 'POST'\n | 'HEAD'\n | 'OPTIONS'\n | 'PUT'\n | 'DELETE'\n | 'PATCH';\n\nfunction combinedAbortController(signal: AbortSignal) {\n const controller = new AbortController();\n const combinedSignal = abortSignalsAnyPonyfill([signal, controller.signal]);\n return {\n signal: combinedSignal,\n controller,\n };\n}\n\nconst TYPE_ACCEPTED_METHOD_MAP: Record = {\n mutation: ['POST'],\n query: ['GET'],\n subscription: ['GET'],\n};\nconst TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE: Record<\n ProcedureType,\n HTTPMethods[]\n> = {\n // never allow GET to do a mutation\n mutation: ['POST'],\n query: ['GET', 'POST'],\n subscription: ['GET', 'POST'],\n};\n\ninterface ResolveHTTPRequestOptions\n extends HTTPBaseHandlerOptions {\n createContext: ResolveHTTPRequestOptionsContextFn;\n req: Request;\n path: string;\n /**\n * If the request had an issue before reaching the handler\n */\n error: TRPCError | null;\n}\n\nfunction initResponse(initOpts: {\n ctx: inferRouterContext | undefined;\n info: TRPCRequestInfo | undefined;\n responseMeta?: HTTPBaseHandlerOptions['responseMeta'];\n untransformedJSON:\n | TRPCResponse>\n | TRPCResponse>[]\n | null;\n errors: TRPCError[];\n headers: Headers;\n}) {\n const {\n ctx,\n info,\n responseMeta,\n untransformedJSON,\n errors = [],\n headers,\n } = initOpts;\n\n let status = untransformedJSON ? getHTTPStatusCode(untransformedJSON) : 200;\n\n const eagerGeneration = !untransformedJSON;\n const data = eagerGeneration\n ? []\n : Array.isArray(untransformedJSON)\n ? untransformedJSON\n : [untransformedJSON];\n\n const meta =\n responseMeta?.({\n ctx,\n info,\n paths: info?.calls.map((call) => call.path),\n data,\n errors,\n eagerGeneration,\n type:\n info?.calls.find((call) => call.procedure?._def.type)?.procedure?._def\n .type ?? 'unknown',\n }) ?? {};\n\n if (meta.headers) {\n if (meta.headers instanceof Headers) {\n for (const [key, value] of meta.headers.entries()) {\n headers.append(key, value);\n }\n } else {\n /**\n * @deprecated, delete in v12\n */\n for (const [key, value] of Object.entries(meta.headers)) {\n if (Array.isArray(value)) {\n for (const v of value) {\n headers.append(key, v);\n }\n } else if (typeof value === 'string') {\n headers.set(key, value);\n }\n }\n }\n }\n if (meta.status) {\n status = meta.status;\n }\n\n return {\n status,\n };\n}\n\nfunction caughtErrorToData(\n cause: unknown,\n errorOpts: {\n opts: Pick<\n ResolveHTTPRequestOptions,\n 'onError' | 'req' | 'router'\n >;\n ctx: inferRouterContext | undefined;\n type: ProcedureType | 'unknown';\n path?: string;\n input?: unknown;\n },\n) {\n const { router, req, onError } = errorOpts.opts;\n const error = getTRPCErrorFromUnknown(cause);\n onError?.({\n error,\n path: errorOpts.path,\n input: errorOpts.input,\n ctx: errorOpts.ctx,\n type: errorOpts.type,\n req,\n });\n const untransformedJSON = {\n error: getErrorShape({\n config: router._def._config,\n error,\n type: errorOpts.type,\n path: errorOpts.path,\n input: errorOpts.input,\n ctx: errorOpts.ctx,\n }),\n };\n const transformedJSON = transformTRPCResponse(\n router._def._config,\n untransformedJSON,\n );\n const body = JSON.stringify(transformedJSON);\n return {\n error,\n untransformedJSON,\n body,\n };\n}\n\n/**\n * Check if a value is a stream-like object\n * - if it's an async iterable\n * - if it's an object with async iterables or promises\n */\nfunction isDataStream(v: unknown) {\n if (!isObject(v)) {\n return false;\n }\n\n if (isAsyncIterable(v)) {\n return true;\n }\n\n return (\n Object.values(v).some(isPromise) || Object.values(v).some(isAsyncIterable)\n );\n}\n\ntype ResultTuple = [undefined, T] | [TRPCError, undefined];\n\nexport async function resolveResponse(\n opts: ResolveHTTPRequestOptions,\n): Promise {\n const { router, req } = opts;\n const headers = new Headers([['vary', 'trpc-accept, accept']]);\n const config = router._def._config;\n\n const url = new URL(req.url);\n\n if (req.method === 'HEAD') {\n // can be used for lambda warmup\n return new Response(null, {\n status: 204,\n });\n }\n\n const allowBatching = opts.allowBatching ?? opts.batching?.enabled ?? true;\n const allowMethodOverride =\n (opts.allowMethodOverride ?? false) && req.method === 'POST';\n\n type $Context = inferRouterContext;\n\n const infoTuple: ResultTuple = await run(async () => {\n try {\n return [\n undefined,\n await getRequestInfo({\n req,\n path: decodeURIComponent(opts.path),\n router,\n searchParams: url.searchParams,\n headers: opts.req.headers,\n url,\n }),\n ];\n } catch (cause) {\n return [getTRPCErrorFromUnknown(cause), undefined];\n }\n });\n\n interface ContextManager {\n valueOrUndefined: () => $Context | undefined;\n value: () => $Context;\n create: (info: TRPCRequestInfo) => Promise;\n }\n const ctxManager: ContextManager = run(() => {\n let result: ResultTuple<$Context> | undefined = undefined;\n return {\n valueOrUndefined: () => {\n if (!result) {\n return undefined;\n }\n return result[1];\n },\n value: () => {\n const [err, ctx] = result!;\n if (err) {\n throw err;\n }\n return ctx;\n },\n create: async (info) => {\n if (result) {\n throw new Error(\n 'This should only be called once - report a bug in tRPC',\n );\n }\n try {\n const ctx = await opts.createContext({\n info,\n });\n result = [undefined, ctx];\n } catch (cause) {\n result = [getTRPCErrorFromUnknown(cause), undefined];\n }\n },\n };\n });\n\n const methodMapper = allowMethodOverride\n ? TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE\n : TYPE_ACCEPTED_METHOD_MAP;\n\n /**\n * @deprecated\n */\n const isStreamCall = getAcceptHeader(req.headers) === 'application/jsonl';\n\n const experimentalSSE = config.sse?.enabled ?? true;\n try {\n const [infoError, info] = infoTuple;\n if (infoError) {\n throw infoError;\n }\n if (info.isBatchCall && !allowBatching) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: `Batching is not enabled on the server`,\n });\n }\n /* istanbul ignore if -- @preserve */\n if (isStreamCall && !info.isBatchCall) {\n throw new TRPCError({\n message: `Streaming requests must be batched (you can do a batch of 1)`,\n code: 'BAD_REQUEST',\n });\n }\n await ctxManager.create(info);\n\n interface RPCResultOk {\n data: unknown;\n signal?: AbortSignal;\n }\n type RPCResult = ResultTuple;\n const rpcCalls = info.calls.map(async (call): Promise => {\n const proc = call.procedure;\n const combinedAbort = combinedAbortController(opts.req.signal);\n try {\n if (opts.error) {\n throw opts.error;\n }\n\n if (!proc) {\n throw new TRPCError({\n code: 'NOT_FOUND',\n message: `No procedure found on path \"${call.path}\"`,\n });\n }\n\n if (!methodMapper[proc._def.type].includes(req.method as HTTPMethods)) {\n throw new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message: `Unsupported ${req.method}-request to ${proc._def.type} procedure at path \"${call.path}\"`,\n });\n }\n\n if (proc._def.type === 'subscription') {\n /* istanbul ignore if -- @preserve */\n if (info.isBatchCall) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: `Cannot batch subscription calls`,\n });\n }\n\n if (config.sse?.maxDurationMs) {\n function cleanup() {\n clearTimeout(timer);\n combinedAbort.signal.removeEventListener('abort', cleanup);\n\n combinedAbort.controller.abort();\n }\n const timer = setTimeout(cleanup, config.sse.maxDurationMs);\n combinedAbort.signal.addEventListener('abort', cleanup);\n }\n }\n const data: unknown = await proc({\n path: call.path,\n getRawInput: call.getRawInput,\n ctx: ctxManager.value(),\n type: proc._def.type,\n signal: combinedAbort.signal,\n batchIndex: call.batchIndex,\n });\n return [\n undefined,\n {\n data,\n signal:\n proc._def.type === 'subscription'\n ? combinedAbort.signal\n : undefined,\n },\n ];\n } catch (cause) {\n const error = getTRPCErrorFromUnknown(cause);\n const input = call.result();\n\n opts.onError?.({\n error,\n path: call.path,\n input,\n ctx: ctxManager.valueOrUndefined(),\n type: call.procedure?._def.type ?? 'unknown',\n req: opts.req,\n });\n\n return [error, undefined];\n }\n });\n\n // ----------- response handlers -----------\n if (!info.isBatchCall) {\n const [call] = info.calls;\n const [error, result] = await rpcCalls[0]!;\n\n switch (info.type) {\n case 'unknown':\n case 'mutation':\n case 'query': {\n // httpLink\n headers.set('content-type', 'application/json');\n\n if (isDataStream(result?.data)) {\n throw new TRPCError({\n code: 'UNSUPPORTED_MEDIA_TYPE',\n message:\n 'Cannot use stream-like response in non-streaming request - use httpBatchStreamLink',\n });\n }\n const res: TRPCResponse> = error\n ? {\n error: getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input: call!.result(),\n path: call!.path,\n type: info.type,\n }),\n }\n : { result: { data: result.data } };\n\n const headResponse = initResponse({\n ctx: ctxManager.valueOrUndefined(),\n info,\n responseMeta: opts.responseMeta,\n errors: error ? [error] : [],\n headers,\n untransformedJSON: [res],\n });\n return new Response(\n JSON.stringify(transformTRPCResponse(config, res)),\n {\n status: headResponse.status,\n headers,\n },\n );\n }\n case 'subscription': {\n // httpSubscriptionLink\n\n const iterable: AsyncIterable = run(() => {\n if (error) {\n return errorToAsyncIterable(error);\n }\n if (!experimentalSSE) {\n return errorToAsyncIterable(\n new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message: 'Missing experimental flag \"sseSubscriptions\"',\n }),\n );\n }\n\n if (!isObservable(result.data) && !isAsyncIterable(result.data)) {\n return errorToAsyncIterable(\n new TRPCError({\n message: `Subscription ${\n call!.path\n } did not return an observable or a AsyncGenerator`,\n code: 'INTERNAL_SERVER_ERROR',\n }),\n );\n }\n const dataAsIterable = isObservable(result.data)\n ? observableToAsyncIterable(result.data, opts.req.signal)\n : result.data;\n return dataAsIterable;\n });\n\n const stream = sseStreamProducer({\n ...config.sse,\n data: iterable,\n serialize: (v) => config.transformer.output.serialize(v),\n formatError(errorOpts) {\n const error = getTRPCErrorFromUnknown(errorOpts.error);\n const input = call?.result();\n const path = call?.path;\n const type = call?.procedure?._def.type ?? 'unknown';\n\n opts.onError?.({\n error,\n path,\n input,\n ctx: ctxManager.valueOrUndefined(),\n req: opts.req,\n type,\n });\n\n const shape = getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input,\n path,\n type,\n });\n\n return shape;\n },\n });\n for (const [key, value] of Object.entries(sseHeaders)) {\n headers.set(key, value);\n }\n\n const headResponse = initResponse({\n ctx: ctxManager.valueOrUndefined(),\n info,\n responseMeta: opts.responseMeta,\n errors: [],\n headers,\n untransformedJSON: null,\n });\n\n const abortSignal = result?.signal;\n let responseBody: ReadableStream = stream;\n\n // Fixes: https://github.com/trpc/trpc/issues/7094\n if (abortSignal) {\n const reader = stream.getReader();\n const onAbort = () => void reader.cancel();\n if (abortSignal.aborted) {\n onAbort();\n } else {\n abortSignal.addEventListener('abort', onAbort, { once: true });\n }\n\n responseBody = new ReadableStream({\n async pull(controller) {\n const chunk = await reader.read();\n if (chunk.done) {\n abortSignal.removeEventListener('abort', onAbort);\n controller.close();\n } else {\n controller.enqueue(chunk.value);\n }\n },\n cancel() {\n abortSignal.removeEventListener('abort', onAbort);\n return reader.cancel();\n },\n });\n }\n\n return new Response(responseBody, {\n headers,\n status: headResponse.status,\n });\n }\n }\n }\n\n // batch response handlers\n if (info.accept === 'application/jsonl') {\n // httpBatchStreamLink\n headers.set('content-type', 'application/json');\n headers.set('transfer-encoding', 'chunked');\n const headResponse = initResponse({\n ctx: ctxManager.valueOrUndefined(),\n info,\n responseMeta: opts.responseMeta,\n errors: [],\n headers,\n untransformedJSON: null,\n });\n const stream = jsonlStreamProducer({\n ...config.jsonl,\n /**\n * Example structure for `maxDepth: 4`:\n * {\n * // 1\n * 0: {\n * // 2\n * result: {\n * // 3\n * data: // 4\n * }\n * }\n * }\n */\n maxDepth: Infinity,\n data: rpcCalls.map(async (res) => {\n const [error, result] = await res;\n\n const call = info.calls[0];\n\n if (error) {\n return {\n error: getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input: call!.result(),\n path: call!.path,\n type: call!.procedure?._def.type ?? 'unknown',\n }),\n };\n }\n\n /**\n * Not very pretty, but we need to wrap nested data in promises\n * Our stream producer will only resolve top-level async values or async values that are directly nested in another async value\n */\n const iterable = isObservable(result.data)\n ? observableToAsyncIterable(result.data, opts.req.signal)\n : Promise.resolve(result.data);\n return {\n result: Promise.resolve({\n data: iterable,\n }),\n };\n }),\n serialize: (data) => config.transformer.output.serialize(data),\n onError: (cause) => {\n opts.onError?.({\n error: getTRPCErrorFromUnknown(cause),\n path: undefined,\n input: undefined,\n ctx: ctxManager.valueOrUndefined(),\n req: opts.req,\n type: info?.type ?? 'unknown',\n });\n },\n\n formatError(errorOpts) {\n const call = info?.calls[errorOpts.path[0] as any];\n\n const error = getTRPCErrorFromUnknown(errorOpts.error);\n const input = call?.result();\n const path = call?.path;\n const type = call?.procedure?._def.type ?? 'unknown';\n\n // no need to call `onError` here as it will be propagated through the stream itself\n\n const shape = getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input,\n path,\n type,\n });\n\n return shape;\n },\n });\n\n return new Response(stream, {\n headers,\n status: headResponse.status,\n });\n }\n\n // httpBatchLink\n /**\n * Non-streaming response:\n * - await all responses in parallel, blocking on the slowest one\n * - create headers with known response body\n * - return a complete HTTPResponse\n */\n headers.set('content-type', 'application/json');\n const results: RPCResult[] = (await Promise.all(rpcCalls)).map(\n (res): RPCResult => {\n const [error, result] = res;\n if (error) {\n return res;\n }\n\n if (isDataStream(result.data)) {\n return [\n new TRPCError({\n code: 'UNSUPPORTED_MEDIA_TYPE',\n message:\n 'Cannot use stream-like response in non-streaming request - use httpBatchStreamLink',\n }),\n undefined,\n ];\n }\n return res;\n },\n );\n const resultAsRPCResponse = results.map(\n (\n [error, result],\n index,\n ): TRPCResponse> => {\n const call = info.calls[index]!;\n if (error) {\n return {\n error: getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input: call.result(),\n path: call.path,\n type: call.procedure?._def.type ?? 'unknown',\n }),\n };\n }\n return {\n result: { data: result.data },\n };\n },\n );\n\n const errors = results\n .map(([error]) => error)\n .filter(Boolean) as TRPCError[];\n\n const headResponse = initResponse({\n ctx: ctxManager.valueOrUndefined(),\n info,\n responseMeta: opts.responseMeta,\n untransformedJSON: resultAsRPCResponse,\n errors,\n headers,\n });\n\n return new Response(\n JSON.stringify(transformTRPCResponse(config, resultAsRPCResponse)),\n {\n status: headResponse.status,\n headers,\n },\n );\n } catch (cause) {\n const [_infoError, info] = infoTuple;\n const ctx = ctxManager.valueOrUndefined();\n // we get here if\n // - batching is called when it's not enabled\n // - `createContext()` throws\n // - `router._def._config.transformer.output.serialize()` throws\n // - post body is too large\n // - input deserialization fails\n // - `errorFormatter` return value is malformed\n const { error, untransformedJSON, body } = caughtErrorToData(cause, {\n opts,\n ctx: ctxManager.valueOrUndefined(),\n type: info?.type ?? 'unknown',\n });\n\n const headResponse = initResponse({\n ctx,\n info,\n responseMeta: opts.responseMeta,\n untransformedJSON,\n errors: [error],\n headers,\n });\n\n return new Response(body, {\n status: headResponse.status,\n headers,\n });\n }\n}\n", "/**\n * If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`\n *\n * @example\n * ```ts\n * import type { AnyTRPCRouter } from '@trpc/server'\n * import type { HTTPBaseHandlerOptions } from '@trpc/server/http'\n * ```\n */\n// @trpc/server\n\nimport type { AnyRouter } from '../../@trpc/server';\nimport type { ResolveHTTPRequestOptionsContextFn } from '../../@trpc/server/http';\nimport { resolveResponse } from '../../@trpc/server/http';\nimport type { FetchHandlerRequestOptions } from './types';\n\nconst trimSlashes = (path: string): string => {\n path = path.startsWith('/') ? path.slice(1) : path;\n path = path.endsWith('/') ? path.slice(0, -1) : path;\n\n return path;\n};\n\nexport async function fetchRequestHandler(\n opts: FetchHandlerRequestOptions,\n): Promise {\n const resHeaders = new Headers();\n\n const createContext: ResolveHTTPRequestOptionsContextFn = async (\n innerOpts,\n ) => {\n return opts.createContext?.({ req: opts.req, resHeaders, ...innerOpts });\n };\n\n const url = new URL(opts.req.url);\n\n const pathname = trimSlashes(url.pathname);\n const endpoint = trimSlashes(opts.endpoint);\n const path = trimSlashes(pathname.slice(endpoint.length));\n\n return await resolveResponse({\n ...opts,\n req: opts.req,\n createContext,\n path,\n error: null,\n onError(o) {\n opts?.onError?.({ ...o, req: opts.req });\n },\n responseMeta(data) {\n const meta = opts.responseMeta?.(data);\n\n if (meta?.headers) {\n if (meta.headers instanceof Headers) {\n for (const [key, value] of meta.headers.entries()) {\n resHeaders.append(key, value);\n }\n } else {\n /**\n * @deprecated, delete in v12\n */\n for (const [key, value] of Object.entries(meta.headers)) {\n if (Array.isArray(value)) {\n for (const v of value) {\n resHeaders.append(key, v);\n }\n } else if (typeof value === 'string') {\n resHeaders.set(key, value);\n }\n }\n }\n }\n\n return {\n headers: resHeaders,\n status: meta?.status,\n };\n },\n });\n}\n", "// src/helper/route/index.ts\nimport { GET_MATCH_RESULT } from \"../../request/constants.js\";\nimport { getPattern, splitRoutingPath } from \"../../utils/url.js\";\nvar matchedRoutes = (c) => (\n // @ts-expect-error c.req[GET_MATCH_RESULT] is not typed\n c.req[GET_MATCH_RESULT][0].map(([[, route]]) => route)\n);\nvar routePath = (c, index) => matchedRoutes(c).at(index ?? c.req.routeIndex)?.path ?? \"\";\nvar baseRoutePath = (c, index) => matchedRoutes(c).at(index ?? c.req.routeIndex)?.basePath ?? \"\";\nvar basePathCacheMap = /* @__PURE__ */ new WeakMap();\nvar basePath = (c, index) => {\n index ??= c.req.routeIndex;\n const cache = basePathCacheMap.get(c) || [];\n if (typeof cache[index] === \"string\") {\n return cache[index];\n }\n let result;\n const rp = baseRoutePath(c, index);\n if (!/[:*]/.test(rp)) {\n result = rp;\n } else {\n const paths = splitRoutingPath(rp);\n const reqPath = c.req.path;\n let basePathLength = 0;\n for (let i = 0, len = paths.length; i < len; i++) {\n const pattern = getPattern(paths[i], paths[i + 1]);\n if (pattern) {\n const re = pattern[2] === true || pattern === \"*\" ? /[^\\/]+/ : pattern[2];\n basePathLength += reqPath.substring(basePathLength + 1).match(re)?.[0].length || 0;\n } else {\n basePathLength += paths[i].length;\n }\n basePathLength += 1;\n }\n result = reqPath.substring(0, basePathLength);\n }\n cache[index] = result;\n basePathCacheMap.set(c, cache);\n return result;\n};\nexport {\n basePath,\n baseRoutePath,\n matchedRoutes,\n routePath\n};\n", "import type { AnyRouter } from '@trpc/server'\nimport type {\n FetchCreateContextFnOptions,\n FetchHandlerRequestOptions,\n} from '@trpc/server/adapters/fetch'\nimport { fetchRequestHandler } from '@trpc/server/adapters/fetch'\nimport type { Context, MiddlewareHandler } from 'hono'\nimport { routePath } from 'hono/route'\n\ntype tRPCOptions = Omit<\n FetchHandlerRequestOptions,\n 'req' | 'endpoint' | 'createContext'\n> &\n Partial, 'endpoint'>> & {\n createContext?(\n opts: FetchCreateContextFnOptions,\n c: Context\n ): Record | Promise>\n }\n\nexport const trpcServer = ({\n endpoint,\n createContext,\n ...rest\n}: tRPCOptions): MiddlewareHandler => {\n const bodyProps = new Set(['arrayBuffer', 'blob', 'formData', 'json', 'text'] as const)\n type BodyProp = typeof bodyProps extends Set ? T : never\n return async (c) => {\n const canWithBody = c.req.method === 'GET' || c.req.method === 'HEAD'\n\n // Auto-detect endpoint from route path if not explicitly provided\n let resolvedEndpoint = endpoint\n if (!endpoint) {\n const path = routePath(c)\n if (path) {\n // Remove wildcard suffix (e.g., \"/v1/*\" -> \"/v1\")\n resolvedEndpoint = path.replace(/\\/\\*+$/, '') || '/trpc'\n } else {\n resolvedEndpoint = '/trpc'\n }\n }\n\n const res = await fetchRequestHandler({\n ...rest,\n createContext: async (opts) => ({\n ...(createContext ? await createContext(opts, c) : {}),\n // propagate env by default\n env: c.env,\n }),\n endpoint: resolvedEndpoint!,\n req: canWithBody\n ? c.req.raw\n : new Proxy(c.req.raw, {\n get(t, p, _r) {\n if (bodyProps.has(p as BodyProp)) {\n return () => c.req[p as BodyProp]()\n }\n return Reflect.get(t, p, t)\n },\n }),\n })\n return res\n }\n}\n", "export const entityKind = Symbol.for('drizzle:entityKind');\nexport const hasOwnEntityKind = Symbol.for('drizzle:hasOwnEntityKind');\n\nexport interface DrizzleEntity {\n\t[entityKind]: string;\n}\n\nexport type DrizzleEntityClass =\n\t& ((abstract new(...args: any[]) => T) | (new(...args: any[]) => T))\n\t& DrizzleEntity;\n\nexport function is>(value: any, type: T): value is InstanceType {\n\tif (!value || typeof value !== 'object') {\n\t\treturn false;\n\t}\n\n\tif (value instanceof type) { // eslint-disable-line no-instanceof/no-instanceof\n\t\treturn true;\n\t}\n\n\tif (!Object.prototype.hasOwnProperty.call(type, entityKind)) {\n\t\tthrow new Error(\n\t\t\t`Class \"${\n\t\t\t\ttype.name ?? ''\n\t\t\t}\" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`,\n\t\t);\n\t}\n\n\tlet cls = Object.getPrototypeOf(value).constructor;\n\tif (cls) {\n\t\t// Traverse the prototype chain to find the entityKind\n\t\twhile (cls) {\n\t\t\tif (entityKind in cls && cls[entityKind] === type[entityKind]) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tcls = Object.getPrototypeOf(cls);\n\t\t}\n\t}\n\n\treturn false;\n}\n", "import { entityKind } from '~/entity.ts';\n\nexport interface Logger {\n\tlogQuery(query: string, params: unknown[]): void;\n}\n\nexport interface LogWriter {\n\twrite(message: string): void;\n}\n\nexport class ConsoleLogWriter implements LogWriter {\n\tstatic readonly [entityKind]: string = 'ConsoleLogWriter';\n\n\twrite(message: string) {\n\t\tconsole.log(message);\n\t}\n}\n\nexport class DefaultLogger implements Logger {\n\tstatic readonly [entityKind]: string = 'DefaultLogger';\n\n\treadonly writer: LogWriter;\n\n\tconstructor(config?: { writer: LogWriter }) {\n\t\tthis.writer = config?.writer ?? new ConsoleLogWriter();\n\t}\n\n\tlogQuery(query: string, params: unknown[]): void {\n\t\tconst stringifiedParams = params.map((p) => {\n\t\t\ttry {\n\t\t\t\treturn JSON.stringify(p);\n\t\t\t} catch {\n\t\t\t\treturn String(p);\n\t\t\t}\n\t\t});\n\t\tconst paramsStr = stringifiedParams.length ? ` -- params: [${stringifiedParams.join(', ')}]` : '';\n\t\tthis.writer.write(`Query: ${query}${paramsStr}`);\n\t}\n}\n\nexport class NoopLogger implements Logger {\n\tstatic readonly [entityKind]: string = 'NoopLogger';\n\n\tlogQuery(): void {\n\t\t// noop\n\t}\n}\n", "/** @internal */\nexport const TableName = Symbol.for('drizzle:Name');\n", "import type { Column, GetColumnData } from './column.ts';\nimport { entityKind } from './entity.ts';\nimport type { OptionalKeyOnly, RequiredKeyOnly } from './operations.ts';\nimport type { SQLWrapper } from './sql/sql.ts';\nimport { TableName } from './table.utils.ts';\nimport type { Simplify, Update } from './utils.ts';\n\nexport interface TableConfig> {\n\tname: string;\n\tschema: string | undefined;\n\tcolumns: Record;\n\tdialect: string;\n}\n\nexport type UpdateTableConfig> = Required<\n\tUpdate\n>;\n\n/** @internal */\nexport const Schema = Symbol.for('drizzle:Schema');\n\n/** @internal */\nexport const Columns = Symbol.for('drizzle:Columns');\n\n/** @internal */\nexport const ExtraConfigColumns = Symbol.for('drizzle:ExtraConfigColumns');\n\n/** @internal */\nexport const OriginalName = Symbol.for('drizzle:OriginalName');\n\n/** @internal */\nexport const BaseName = Symbol.for('drizzle:BaseName');\n\n/** @internal */\nexport const IsAlias = Symbol.for('drizzle:IsAlias');\n\n/** @internal */\nexport const ExtraConfigBuilder = Symbol.for('drizzle:ExtraConfigBuilder');\n\nconst IsDrizzleTable = Symbol.for('drizzle:IsDrizzleTable');\n\nexport interface Table<\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tT extends TableConfig = TableConfig,\n> extends SQLWrapper {\n\t// SQLWrapper runtime implementation is defined in 'sql/sql.ts'\n}\n\nexport class Table implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Table';\n\n\tdeclare readonly _: {\n\t\treadonly brand: 'Table';\n\t\treadonly config: T;\n\t\treadonly name: T['name'];\n\t\treadonly schema: T['schema'];\n\t\treadonly columns: T['columns'];\n\t\treadonly inferSelect: InferSelectModel>;\n\t\treadonly inferInsert: InferInsertModel>;\n\t};\n\n\tdeclare readonly $inferSelect: InferSelectModel>;\n\tdeclare readonly $inferInsert: InferInsertModel>;\n\n\t/** @internal */\n\tstatic readonly Symbol = {\n\t\tName: TableName as typeof TableName,\n\t\tSchema: Schema as typeof Schema,\n\t\tOriginalName: OriginalName as typeof OriginalName,\n\t\tColumns: Columns as typeof Columns,\n\t\tExtraConfigColumns: ExtraConfigColumns as typeof ExtraConfigColumns,\n\t\tBaseName: BaseName as typeof BaseName,\n\t\tIsAlias: IsAlias as typeof IsAlias,\n\t\tExtraConfigBuilder: ExtraConfigBuilder as typeof ExtraConfigBuilder,\n\t};\n\n\t/**\n\t * @internal\n\t * Can be changed if the table is aliased.\n\t */\n\t[TableName]: string;\n\n\t/**\n\t * @internal\n\t * Used to store the original name of the table, before any aliasing.\n\t */\n\t[OriginalName]: string;\n\n\t/** @internal */\n\t[Schema]: string | undefined;\n\n\t/** @internal */\n\t[Columns]!: T['columns'];\n\n\t/** @internal */\n\t[ExtraConfigColumns]!: Record;\n\n\t/**\n\t * @internal\n\t * Used to store the table name before the transformation via the `tableCreator` functions.\n\t */\n\t[BaseName]: string;\n\n\t/** @internal */\n\t[IsAlias] = false;\n\n\t/** @internal */\n\t[IsDrizzleTable] = true;\n\n\t/** @internal */\n\t[ExtraConfigBuilder]: ((self: any) => Record | unknown[]) | undefined = undefined;\n\n\tconstructor(name: string, schema: string | undefined, baseName: string) {\n\t\tthis[TableName] = this[OriginalName] = name;\n\t\tthis[Schema] = schema;\n\t\tthis[BaseName] = baseName;\n\t}\n}\n\nexport function isTable(table: unknown): table is Table {\n\treturn typeof table === 'object' && table !== null && IsDrizzleTable in table;\n}\n\n/**\n * Any table with a specified boundary.\n *\n * @example\n\t```ts\n\t// Any table with a specific name\n\ttype AnyUsersTable = AnyTable<{ name: 'users' }>;\n\t```\n *\n * To describe any table with any config, simply use `Table` without any type arguments, like this:\n *\n\t```ts\n\tfunction needsTable(table: Table) {\n\t\t...\n\t}\n\t```\n */\nexport type AnyTable> = Table>;\n\nexport function getTableName(table: T): T['_']['name'] {\n\treturn table[TableName];\n}\n\nexport function getTableUniqueName(table: T): `${T['_']['schema']}.${T['_']['name']}` {\n\treturn `${table[Schema] ?? 'public'}.${table[TableName]}`;\n}\n\nexport type MapColumnName =\n\tTDBColumNames extends true ? TColumn['_']['name']\n\t\t: TName;\n\nexport type InferModelFromColumns<\n\tTColumns extends Record,\n\tTInferMode extends 'select' | 'insert' = 'select',\n\tTConfig extends { dbColumnNames: boolean; override?: boolean } = { dbColumnNames: false; override: false },\n> = Simplify<\n\tTInferMode extends 'insert' ?\n\t\t\t& {\n\t\t\t\t[\n\t\t\t\t\tKey in keyof TColumns & string as RequiredKeyOnly<\n\t\t\t\t\t\tMapColumnName,\n\t\t\t\t\t\tTColumns[Key]\n\t\t\t\t\t>\n\t\t\t\t]: GetColumnData;\n\t\t\t}\n\t\t\t& {\n\t\t\t\t[\n\t\t\t\t\tKey in keyof TColumns & string as OptionalKeyOnly<\n\t\t\t\t\t\tMapColumnName,\n\t\t\t\t\t\tTColumns[Key],\n\t\t\t\t\t\tTConfig['override']\n\t\t\t\t\t>\n\t\t\t\t]?: GetColumnData | undefined;\n\t\t\t}\n\t\t: {\n\t\t\t[\n\t\t\t\tKey in keyof TColumns & string as MapColumnName<\n\t\t\t\t\tKey,\n\t\t\t\t\tTColumns[Key],\n\t\t\t\t\tTConfig['dbColumnNames']\n\t\t\t\t>\n\t\t\t]: GetColumnData;\n\t\t}\n>;\n\n/** @deprecated Use one of the alternatives: {@link InferSelectModel} / {@link InferInsertModel}, or `table.$inferSelect` / `table.$inferInsert`\n */\nexport type InferModel<\n\tTTable extends Table,\n\tTInferMode extends 'select' | 'insert' = 'select',\n\tTConfig extends { dbColumnNames: boolean } = { dbColumnNames: false },\n> = InferModelFromColumns;\n\nexport type InferSelectModel<\n\tTTable extends Table,\n\tTConfig extends { dbColumnNames: boolean } = { dbColumnNames: false },\n> = InferModelFromColumns;\n\nexport type InferInsertModel<\n\tTTable extends Table,\n\tTConfig extends { dbColumnNames: boolean; override?: boolean } = { dbColumnNames: false; override: false },\n> = InferModelFromColumns;\n\nexport type InferEnum = T extends { enumValues: readonly (infer U)[] } ? U\n\t: never;\n", "import type {\n\tColumnBuilderBaseConfig,\n\tColumnBuilderRuntimeConfig,\n\tColumnDataType,\n\tGeneratedColumnConfig,\n\tGeneratedIdentityConfig,\n} from './column-builder.ts';\nimport { entityKind } from './entity.ts';\nimport type { DriverValueMapper, SQL, SQLWrapper } from './sql/sql.ts';\nimport type { Table } from './table.ts';\nimport type { Update } from './utils.ts';\n\nexport interface ColumnBaseConfig<\n\tTDataType extends ColumnDataType,\n\tTColumnType extends string,\n> extends ColumnBuilderBaseConfig {\n\ttableName: string;\n\tnotNull: boolean;\n\thasDefault: boolean;\n\tisPrimaryKey: boolean;\n\tisAutoincrement: boolean;\n\thasRuntimeDefault: boolean;\n}\n\nexport type ColumnTypeConfig, TTypeConfig extends object> = T & {\n\tbrand: 'Column';\n\ttableName: T['tableName'];\n\tname: T['name'];\n\tdataType: T['dataType'];\n\tcolumnType: T['columnType'];\n\tdata: T['data'];\n\tdriverParam: T['driverParam'];\n\tnotNull: T['notNull'];\n\thasDefault: T['hasDefault'];\n\tisPrimaryKey: T['isPrimaryKey'];\n\tisAutoincrement: T['isAutoincrement'];\n\thasRuntimeDefault: T['hasRuntimeDefault'];\n\tenumValues: T['enumValues'];\n\tbaseColumn: T extends { baseColumn: infer U } ? U : unknown;\n\tgenerated: GeneratedColumnConfig | undefined;\n\tidentity: undefined | 'always' | 'byDefault';\n} & TTypeConfig;\n\nexport type ColumnRuntimeConfig = ColumnBuilderRuntimeConfig<\n\tTData,\n\tTRuntimeConfig\n>;\n\nexport interface Column<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTRuntimeConfig extends object = object,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTTypeConfig extends object = object,\n> extends DriverValueMapper, SQLWrapper {\n\t// SQLWrapper runtime implementation is defined in 'sql/sql.ts'\n}\n/*\n\t`Column` only accepts a full `ColumnConfig` as its generic.\n\tTo infer parts of the config, use `AnyColumn` that accepts a partial config.\n\tSee `GetColumnData` for example usage of inferring.\n*/\nexport abstract class Column<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n\tTRuntimeConfig extends object = object,\n\tTTypeConfig extends object = object,\n> implements DriverValueMapper, SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Column';\n\n\tdeclare readonly _: ColumnTypeConfig;\n\n\treadonly name: string;\n\treadonly keyAsName: boolean;\n\treadonly primary: boolean;\n\treadonly notNull: boolean;\n\treadonly default: T['data'] | SQL | undefined;\n\treadonly defaultFn: (() => T['data'] | SQL) | undefined;\n\treadonly onUpdateFn: (() => T['data'] | SQL) | undefined;\n\treadonly hasDefault: boolean;\n\treadonly isUnique: boolean;\n\treadonly uniqueName: string | undefined;\n\treadonly uniqueType: string | undefined;\n\treadonly dataType: T['dataType'];\n\treadonly columnType: T['columnType'];\n\treadonly enumValues: T['enumValues'] = undefined;\n\treadonly generated: GeneratedColumnConfig | undefined = undefined;\n\treadonly generatedIdentity: GeneratedIdentityConfig | undefined = undefined;\n\n\tprotected config: ColumnRuntimeConfig;\n\n\tconstructor(\n\t\treadonly table: Table,\n\t\tconfig: ColumnRuntimeConfig,\n\t) {\n\t\tthis.config = config;\n\t\tthis.name = config.name;\n\t\tthis.keyAsName = config.keyAsName;\n\t\tthis.notNull = config.notNull;\n\t\tthis.default = config.default;\n\t\tthis.defaultFn = config.defaultFn;\n\t\tthis.onUpdateFn = config.onUpdateFn;\n\t\tthis.hasDefault = config.hasDefault;\n\t\tthis.primary = config.primaryKey;\n\t\tthis.isUnique = config.isUnique;\n\t\tthis.uniqueName = config.uniqueName;\n\t\tthis.uniqueType = config.uniqueType;\n\t\tthis.dataType = config.dataType as T['dataType'];\n\t\tthis.columnType = config.columnType;\n\t\tthis.generated = config.generated;\n\t\tthis.generatedIdentity = config.generatedIdentity;\n\t}\n\n\tabstract getSQLType(): string;\n\n\tmapFromDriverValue(value: unknown): unknown {\n\t\treturn value;\n\t}\n\n\tmapToDriverValue(value: unknown): unknown {\n\t\treturn value;\n\t}\n\n\t// ** @internal */\n\tshouldDisableInsert(): boolean {\n\t\treturn this.config.generated !== undefined && this.config.generated.type !== 'byDefault';\n\t}\n}\n\nexport type UpdateColConfig<\n\tT extends ColumnBaseConfig,\n\tTUpdate extends Partial>,\n> = Update;\n\nexport type AnyColumn> = {}> = Column<\n\tRequired, TPartial>>\n>;\n\nexport type GetColumnData =\n\t// dprint-ignore\n\tTInferMode extends 'raw' // Raw mode\n\t\t? TColumn['_']['data'] // Just return the underlying type\n\t\t: TColumn['_']['notNull'] extends true // Query mode\n\t\t? TColumn['_']['data'] // Query mode, not null\n\t\t: TColumn['_']['data'] | null; // Query mode, nullable\n\nexport type InferColumnsDataTypes> = {\n\t[Key in keyof TColumns]: GetColumnData;\n};\n", "import { entityKind } from '~/entity.ts';\nimport type { Column } from './column.ts';\nimport type { GelColumn, GelExtraConfigColumn } from './gel-core/index.ts';\nimport type { MySqlColumn } from './mysql-core/index.ts';\nimport type { ExtraConfigColumn, PgColumn, PgSequenceOptions } from './pg-core/index.ts';\nimport type { SingleStoreColumn } from './singlestore-core/index.ts';\nimport type { SQL } from './sql/sql.ts';\nimport type { SQLiteColumn } from './sqlite-core/index.ts';\nimport type { Assume, Simplify } from './utils.ts';\n\nexport type ColumnDataType =\n\t| 'string'\n\t| 'number'\n\t| 'boolean'\n\t| 'array'\n\t| 'json'\n\t| 'date'\n\t| 'bigint'\n\t| 'custom'\n\t| 'buffer'\n\t| 'dateDuration'\n\t| 'duration'\n\t| 'relDuration'\n\t| 'localTime'\n\t| 'localDate'\n\t| 'localDateTime';\n\nexport type Dialect = 'pg' | 'mysql' | 'sqlite' | 'singlestore' | 'common' | 'gel';\n\nexport type GeneratedStorageMode = 'virtual' | 'stored';\n\nexport type GeneratedType = 'always' | 'byDefault';\n\nexport type GeneratedColumnConfig = {\n\tas: TDataType | SQL | (() => SQL);\n\ttype?: GeneratedType;\n\tmode?: GeneratedStorageMode;\n};\n\nexport type GeneratedIdentityConfig = {\n\tsequenceName?: string;\n\tsequenceOptions?: PgSequenceOptions;\n\ttype: 'always' | 'byDefault';\n};\n\nexport interface ColumnBuilderBaseConfig {\n\tname: string;\n\tdataType: TDataType;\n\tcolumnType: TColumnType;\n\tdata: unknown;\n\tdriverParam: unknown;\n\tenumValues: string[] | undefined;\n}\n\nexport type MakeColumnConfig<\n\tT extends ColumnBuilderBaseConfig,\n\tTTableName extends string,\n\tTData = T extends { $type: infer U } ? U : T['data'],\n> = {\n\tname: T['name'];\n\ttableName: TTableName;\n\tdataType: T['dataType'];\n\tcolumnType: T['columnType'];\n\tdata: TData;\n\tdriverParam: T['driverParam'];\n\tnotNull: T extends { notNull: true } ? true : false;\n\thasDefault: T extends { hasDefault: true } ? true : false;\n\tisPrimaryKey: T extends { isPrimaryKey: true } ? true : false;\n\tisAutoincrement: T extends { isAutoincrement: true } ? true : false;\n\thasRuntimeDefault: T extends { hasRuntimeDefault: true } ? true : false;\n\tenumValues: T['enumValues'];\n\tbaseColumn: T extends { baseBuilder: infer U extends ColumnBuilderBase } ? BuildColumn\n\t\t: never;\n\tidentity: T extends { identity: 'always' } ? 'always' : T extends { identity: 'byDefault' } ? 'byDefault' : undefined;\n\tgenerated: T extends { generated: infer G } ? unknown extends G ? undefined\n\t\t: G extends undefined ? undefined\n\t\t: G\n\t\t: undefined;\n} & {};\n\nexport type ColumnBuilderTypeConfig<\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tT extends ColumnBuilderBaseConfig,\n\tTTypeConfig extends object = object,\n> = Simplify<\n\t& {\n\t\tbrand: 'ColumnBuilder';\n\t\tname: T['name'];\n\t\tdataType: T['dataType'];\n\t\tcolumnType: T['columnType'];\n\t\tdata: T['data'];\n\t\tdriverParam: T['driverParam'];\n\t\tnotNull: T extends { notNull: infer U } ? U : boolean;\n\t\thasDefault: T extends { hasDefault: infer U } ? U : boolean;\n\t\tenumValues: T['enumValues'];\n\t\tidentity: T extends { identity: infer U } ? U : unknown;\n\t\tgenerated: T extends { generated: infer G } ? G extends undefined ? unknown : G : unknown;\n\t}\n\t& TTypeConfig\n>;\n\nexport type ColumnBuilderRuntimeConfig = {\n\tname: string;\n\tkeyAsName: boolean;\n\tnotNull: boolean;\n\tdefault: TData | SQL | undefined;\n\tdefaultFn: (() => TData | SQL) | undefined;\n\tonUpdateFn: (() => TData | SQL) | undefined;\n\thasDefault: boolean;\n\tprimaryKey: boolean;\n\tisUnique: boolean;\n\tuniqueName: string | undefined;\n\tuniqueType: string | undefined;\n\tdataType: string;\n\tcolumnType: string;\n\tgenerated: GeneratedColumnConfig | undefined;\n\tgeneratedIdentity: GeneratedIdentityConfig | undefined;\n} & TRuntimeConfig;\n\nexport interface ColumnBuilderExtraConfig {\n\tprimaryKeyHasDefault?: boolean;\n}\n\nexport type NotNull = T & {\n\t_: {\n\t\tnotNull: true;\n\t};\n};\n\nexport type HasDefault = T & {\n\t_: {\n\t\thasDefault: true;\n\t};\n};\n\nexport type IsPrimaryKey = T & {\n\t_: {\n\t\tisPrimaryKey: true;\n\t};\n};\n\nexport type IsAutoincrement = T & {\n\t_: {\n\t\tisAutoincrement: true;\n\t};\n};\n\nexport type HasRuntimeDefault = T & {\n\t_: {\n\t\thasRuntimeDefault: true;\n\t};\n};\n\nexport type $Type = T & {\n\t_: {\n\t\t$type: TType;\n\t};\n};\n\nexport type HasGenerated = T & {\n\t_: {\n\t\thasDefault: true;\n\t\tgenerated: TGenerated;\n\t};\n};\n\nexport type IsIdentity<\n\tT extends ColumnBuilderBase,\n\tTType extends 'always' | 'byDefault',\n> = T & {\n\t_: {\n\t\tnotNull: true;\n\t\thasDefault: true;\n\t\tidentity: TType;\n\t};\n};\nexport interface ColumnBuilderBase<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTTypeConfig extends object = object,\n> {\n\t_: ColumnBuilderTypeConfig;\n}\n\n// To understand how to use `ColumnBuilder` and `AnyColumnBuilder`, see `Column` and `AnyColumn` documentation.\nexport abstract class ColumnBuilder<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTRuntimeConfig extends object = object,\n\tTTypeConfig extends object = object,\n\tTExtraConfig extends ColumnBuilderExtraConfig = ColumnBuilderExtraConfig,\n> implements ColumnBuilderBase {\n\tstatic readonly [entityKind]: string = 'ColumnBuilder';\n\n\tdeclare _: ColumnBuilderTypeConfig;\n\n\tprotected config: ColumnBuilderRuntimeConfig;\n\n\tconstructor(name: T['name'], dataType: T['dataType'], columnType: T['columnType']) {\n\t\tthis.config = {\n\t\t\tname,\n\t\t\tkeyAsName: name === '',\n\t\t\tnotNull: false,\n\t\t\tdefault: undefined,\n\t\t\thasDefault: false,\n\t\t\tprimaryKey: false,\n\t\t\tisUnique: false,\n\t\t\tuniqueName: undefined,\n\t\t\tuniqueType: undefined,\n\t\t\tdataType,\n\t\t\tcolumnType,\n\t\t\tgenerated: undefined,\n\t\t} as ColumnBuilderRuntimeConfig;\n\t}\n\n\t/**\n\t * Changes the data type of the column. Commonly used with `json` columns. Also, useful for branded types.\n\t *\n\t * @example\n\t * ```ts\n\t * const users = pgTable('users', {\n\t * \tid: integer('id').$type().primaryKey(),\n\t * \tdetails: json('details').$type().notNull(),\n\t * });\n\t * ```\n\t */\n\t$type(): $Type {\n\t\treturn this as $Type;\n\t}\n\n\t/**\n\t * Adds a `not null` clause to the column definition.\n\t *\n\t * Affects the `select` model of the table - columns *without* `not null` will be nullable on select.\n\t */\n\tnotNull(): NotNull {\n\t\tthis.config.notNull = true;\n\t\treturn this as NotNull;\n\t}\n\n\t/**\n\t * Adds a `default ` clause to the column definition.\n\t *\n\t * Affects the `insert` model of the table - columns *with* `default` are optional on insert.\n\t *\n\t * If you need to set a dynamic default value, use {@link $defaultFn} instead.\n\t */\n\tdefault(value: (this['_'] extends { $type: infer U } ? U : this['_']['data']) | SQL): HasDefault {\n\t\tthis.config.default = value;\n\t\tthis.config.hasDefault = true;\n\t\treturn this as HasDefault;\n\t}\n\n\t/**\n\t * Adds a dynamic default value to the column.\n\t * The function will be called when the row is inserted, and the returned value will be used as the column value.\n\t *\n\t * **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`.\n\t */\n\t$defaultFn(\n\t\tfn: () => (this['_'] extends { $type: infer U } ? U : this['_']['data']) | SQL,\n\t): HasRuntimeDefault> {\n\t\tthis.config.defaultFn = fn;\n\t\tthis.config.hasDefault = true;\n\t\treturn this as HasRuntimeDefault>;\n\t}\n\n\t/**\n\t * Alias for {@link $defaultFn}.\n\t */\n\t$default = this.$defaultFn;\n\n\t/**\n\t * Adds a dynamic update value to the column.\n\t * The function will be called when the row is updated, and the returned value will be used as the column value if none is provided.\n\t * If no `default` (or `$defaultFn`) value is provided, the function will be called when the row is inserted as well, and the returned value will be used as the column value.\n\t *\n\t * **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`.\n\t */\n\t$onUpdateFn(\n\t\tfn: () => (this['_'] extends { $type: infer U } ? U : this['_']['data']) | SQL,\n\t): HasDefault {\n\t\tthis.config.onUpdateFn = fn;\n\t\tthis.config.hasDefault = true;\n\t\treturn this as HasDefault;\n\t}\n\n\t/**\n\t * Alias for {@link $onUpdateFn}.\n\t */\n\t$onUpdate = this.$onUpdateFn;\n\n\t/**\n\t * Adds a `primary key` clause to the column definition. This implicitly makes the column `not null`.\n\t *\n\t * In SQLite, `integer primary key` implicitly makes the column auto-incrementing.\n\t */\n\tprimaryKey(): TExtraConfig['primaryKeyHasDefault'] extends true ? IsPrimaryKey>>\n\t\t: IsPrimaryKey>\n\t{\n\t\tthis.config.primaryKey = true;\n\t\tthis.config.notNull = true;\n\t\treturn this as TExtraConfig['primaryKeyHasDefault'] extends true ? IsPrimaryKey>>\n\t\t\t: IsPrimaryKey>;\n\t}\n\n\tabstract generatedAlwaysAs(\n\t\tas: SQL | T['data'] | (() => SQL),\n\t\tconfig?: Partial>,\n\t): HasGenerated;\n\n\t/** @internal Sets the name of the column to the key within the table definition if a name was not given. */\n\tsetName(name: string) {\n\t\tif (this.config.name !== '') return;\n\t\tthis.config.name = name;\n\t}\n}\n\nexport type BuildColumn<\n\tTTableName extends string,\n\tTBuilder extends ColumnBuilderBase,\n\tTDialect extends Dialect,\n> = TDialect extends 'pg' ? PgColumn<\n\t\tMakeColumnConfig,\n\t\t{},\n\t\tSimplify | 'brand' | 'dialect'>>\n\t>\n\t: TDialect extends 'mysql' ? MySqlColumn<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify<\n\t\t\t\tOmit<\n\t\t\t\t\tTBuilder['_'],\n\t\t\t\t\t| keyof MakeColumnConfig\n\t\t\t\t\t| 'brand'\n\t\t\t\t\t| 'dialect'\n\t\t\t\t\t| 'primaryKeyHasDefault'\n\t\t\t\t\t| 'mysqlColumnBuilderBrand'\n\t\t\t\t>\n\t\t\t>\n\t\t>\n\t: TDialect extends 'sqlite' ? SQLiteColumn<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify | 'brand' | 'dialect'>>\n\t\t>\n\t: TDialect extends 'common' ? Column<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify | 'brand' | 'dialect'>>\n\t\t>\n\t: TDialect extends 'singlestore' ? SingleStoreColumn<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify<\n\t\t\t\tOmit<\n\t\t\t\t\tTBuilder['_'],\n\t\t\t\t\t| keyof MakeColumnConfig\n\t\t\t\t\t| 'brand'\n\t\t\t\t\t| 'dialect'\n\t\t\t\t\t| 'primaryKeyHasDefault'\n\t\t\t\t\t| 'singlestoreColumnBuilderBrand'\n\t\t\t\t>\n\t\t\t>\n\t\t>\n\t: TDialect extends 'gel' ? GelColumn<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify | 'brand' | 'dialect'>>\n\t\t>\n\t: never;\n\nexport type BuildIndexColumn<\n\tTDialect extends Dialect,\n> = TDialect extends 'pg' ? ExtraConfigColumn\n\t: TDialect extends 'gel' ? GelExtraConfigColumn\n\t: never;\n\n// TODO\n// try to make sql as well + indexRaw\n\n// optional after everything will be working as expected\n// also try to leave only needed methods for extraConfig\n// make an error if I pass .asc() to fk and so on\n\nexport type BuildColumns<\n\tTTableName extends string,\n\tTConfigMap extends Record,\n\tTDialect extends Dialect,\n> =\n\t& {\n\t\t[Key in keyof TConfigMap]: BuildColumn\n\t\t\t\t& { name: TConfigMap[Key]['_']['name'] extends '' ? Assume : TConfigMap[Key]['_']['name'] };\n\t\t}, TDialect>;\n\t}\n\t& {};\n\nexport type BuildExtraConfigColumns<\n\t_TTableName extends string,\n\tTConfigMap extends Record,\n\tTDialect extends Dialect,\n> =\n\t& {\n\t\t[Key in keyof TConfigMap]: BuildIndexColumn;\n\t}\n\t& {};\n\nexport type ChangeColumnTableName =\n\tTDialect extends 'pg' ? PgColumn>\n\t\t: TDialect extends 'mysql' ? MySqlColumn>\n\t\t: TDialect extends 'singlestore' ? SingleStoreColumn>\n\t\t: TDialect extends 'sqlite' ? SQLiteColumn>\n\t\t: TDialect extends 'gel' ? GelColumn>\n\t\t: never;\n", "import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { AnyPgColumn, PgColumn } from './columns/index.ts';\nimport type { PgTable } from './table.ts';\n\nexport type UpdateDeleteAction = 'cascade' | 'restrict' | 'no action' | 'set null' | 'set default';\n\nexport type Reference = () => {\n\treadonly name?: string;\n\treadonly columns: PgColumn[];\n\treadonly foreignTable: PgTable;\n\treadonly foreignColumns: PgColumn[];\n};\n\nexport class ForeignKeyBuilder {\n\tstatic readonly [entityKind]: string = 'PgForeignKeyBuilder';\n\n\t/** @internal */\n\treference: Reference;\n\n\t/** @internal */\n\t_onUpdate: UpdateDeleteAction | undefined = 'no action';\n\n\t/** @internal */\n\t_onDelete: UpdateDeleteAction | undefined = 'no action';\n\n\tconstructor(\n\t\tconfig: () => {\n\t\t\tname?: string;\n\t\t\tcolumns: PgColumn[];\n\t\t\tforeignColumns: PgColumn[];\n\t\t},\n\t\tactions?: {\n\t\t\tonUpdate?: UpdateDeleteAction;\n\t\t\tonDelete?: UpdateDeleteAction;\n\t\t} | undefined,\n\t) {\n\t\tthis.reference = () => {\n\t\t\tconst { name, columns, foreignColumns } = config();\n\t\t\treturn { name, columns, foreignTable: foreignColumns[0]!.table as PgTable, foreignColumns };\n\t\t};\n\t\tif (actions) {\n\t\t\tthis._onUpdate = actions.onUpdate;\n\t\t\tthis._onDelete = actions.onDelete;\n\t\t}\n\t}\n\n\tonUpdate(action: UpdateDeleteAction): this {\n\t\tthis._onUpdate = action === undefined ? 'no action' : action;\n\t\treturn this;\n\t}\n\n\tonDelete(action: UpdateDeleteAction): this {\n\t\tthis._onDelete = action === undefined ? 'no action' : action;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: PgTable): ForeignKey {\n\t\treturn new ForeignKey(table, this);\n\t}\n}\n\nexport type AnyForeignKeyBuilder = ForeignKeyBuilder;\n\nexport class ForeignKey {\n\tstatic readonly [entityKind]: string = 'PgForeignKey';\n\n\treadonly reference: Reference;\n\treadonly onUpdate: UpdateDeleteAction | undefined;\n\treadonly onDelete: UpdateDeleteAction | undefined;\n\n\tconstructor(readonly table: PgTable, builder: ForeignKeyBuilder) {\n\t\tthis.reference = builder.reference;\n\t\tthis.onUpdate = builder._onUpdate;\n\t\tthis.onDelete = builder._onDelete;\n\t}\n\n\tgetName(): string {\n\t\tconst { name, columns, foreignColumns } = this.reference();\n\t\tconst columnNames = columns.map((column) => column.name);\n\t\tconst foreignColumnNames = foreignColumns.map((column) => column.name);\n\t\tconst chunks = [\n\t\t\tthis.table[TableName],\n\t\t\t...columnNames,\n\t\t\tforeignColumns[0]!.table[TableName],\n\t\t\t...foreignColumnNames,\n\t\t];\n\t\treturn name ?? `${chunks.join('_')}_fk`;\n\t}\n}\n\ntype ColumnsWithTable<\n\tTTableName extends string,\n\tTColumns extends PgColumn[],\n> = { [Key in keyof TColumns]: AnyPgColumn<{ tableName: TTableName }> };\n\nexport function foreignKey<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends [AnyPgColumn<{ tableName: TTableName }>, ...AnyPgColumn<{ tableName: TTableName }>[]],\n>(\n\tconfig: {\n\t\tname?: string;\n\t\tcolumns: TColumns;\n\t\tforeignColumns: ColumnsWithTable;\n\t},\n): ForeignKeyBuilder {\n\tfunction mappedConfig() {\n\t\tconst { name, columns, foreignColumns } = config;\n\t\treturn {\n\t\t\tname,\n\t\t\tcolumns,\n\t\t\tforeignColumns,\n\t\t};\n\t}\n\n\treturn new ForeignKeyBuilder(mappedConfig);\n}\n", "export function iife(fn: (...args: T) => U, ...args: T): U {\n\treturn fn(...args);\n}\n", "import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { PgColumn } from './columns/index.ts';\nimport type { PgTable } from './table.ts';\n\nexport function unique(name?: string): UniqueOnConstraintBuilder {\n\treturn new UniqueOnConstraintBuilder(name);\n}\n\nexport function uniqueKeyName(table: PgTable, columns: string[]) {\n\treturn `${table[TableName]}_${columns.join('_')}_unique`;\n}\n\nexport class UniqueConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'PgUniqueConstraintBuilder';\n\n\t/** @internal */\n\tcolumns: PgColumn[];\n\t/** @internal */\n\tnullsNotDistinctConfig = false;\n\n\tconstructor(\n\t\tcolumns: PgColumn[],\n\t\tprivate name?: string,\n\t) {\n\t\tthis.columns = columns;\n\t}\n\n\tnullsNotDistinct() {\n\t\tthis.nullsNotDistinctConfig = true;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: PgTable): UniqueConstraint {\n\t\treturn new UniqueConstraint(table, this.columns, this.nullsNotDistinctConfig, this.name);\n\t}\n}\n\nexport class UniqueOnConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'PgUniqueOnConstraintBuilder';\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tname?: string,\n\t) {\n\t\tthis.name = name;\n\t}\n\n\ton(...columns: [PgColumn, ...PgColumn[]]) {\n\t\treturn new UniqueConstraintBuilder(columns, this.name);\n\t}\n}\n\nexport class UniqueConstraint {\n\tstatic readonly [entityKind]: string = 'PgUniqueConstraint';\n\n\treadonly columns: PgColumn[];\n\treadonly name?: string;\n\treadonly nullsNotDistinct: boolean = false;\n\n\tconstructor(readonly table: PgTable, columns: PgColumn[], nullsNotDistinct: boolean, name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name));\n\t\tthis.nullsNotDistinct = nullsNotDistinct;\n\t}\n\n\tgetName() {\n\t\treturn this.name;\n\t}\n}\n", "function parsePgArrayValue(arrayString: string, startFrom: number, inQuotes: boolean): [string, number] {\n\tfor (let i = startFrom; i < arrayString.length; i++) {\n\t\tconst char = arrayString[i];\n\n\t\tif (char === '\\\\') {\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === '\"') {\n\t\t\treturn [arrayString.slice(startFrom, i).replace(/\\\\/g, ''), i + 1];\n\t\t}\n\n\t\tif (inQuotes) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === ',' || char === '}') {\n\t\t\treturn [arrayString.slice(startFrom, i).replace(/\\\\/g, ''), i];\n\t\t}\n\t}\n\n\treturn [arrayString.slice(startFrom).replace(/\\\\/g, ''), arrayString.length];\n}\n\nexport function parsePgNestedArray(arrayString: string, startFrom = 0): [any[], number] {\n\tconst result: any[] = [];\n\tlet i = startFrom;\n\tlet lastCharIsComma = false;\n\n\twhile (i < arrayString.length) {\n\t\tconst char = arrayString[i];\n\n\t\tif (char === ',') {\n\t\t\tif (lastCharIsComma || i === startFrom) {\n\t\t\t\tresult.push('');\n\t\t\t}\n\t\t\tlastCharIsComma = true;\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tlastCharIsComma = false;\n\n\t\tif (char === '\\\\') {\n\t\t\ti += 2;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === '\"') {\n\t\t\tconst [value, startFrom] = parsePgArrayValue(arrayString, i + 1, true);\n\t\t\tresult.push(value);\n\t\t\ti = startFrom;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === '}') {\n\t\t\treturn [result, i + 1];\n\t\t}\n\n\t\tif (char === '{') {\n\t\t\tconst [value, startFrom] = parsePgNestedArray(arrayString, i + 1);\n\t\t\tresult.push(value);\n\t\t\ti = startFrom;\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst [value, newStartFrom] = parsePgArrayValue(arrayString, i, false);\n\t\tresult.push(value);\n\t\ti = newStartFrom;\n\t}\n\n\treturn [result, i];\n}\n\nexport function parsePgArray(arrayString: string): any[] {\n\tconst [result] = parsePgNestedArray(arrayString, 1);\n\treturn result;\n}\n\nexport function makePgArray(array: any[]): string {\n\treturn `{${\n\t\tarray.map((item) => {\n\t\t\tif (Array.isArray(item)) {\n\t\t\t\treturn makePgArray(item);\n\t\t\t}\n\n\t\t\tif (typeof item === 'string') {\n\t\t\t\treturn `\"${item.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"')}\"`;\n\t\t\t}\n\n\t\t\treturn `${item}`;\n\t\t}).join(',')\n\t}}`;\n}\n", "import type {\n\tColumnBuilderBase,\n\tColumnBuilderBaseConfig,\n\tColumnBuilderExtraConfig,\n\tColumnBuilderRuntimeConfig,\n\tColumnDataType,\n\tHasGenerated,\n\tMakeColumnConfig,\n} from '~/column-builder.ts';\nimport { ColumnBuilder } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { Column } from '~/column.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport type { Simplify, Update } from '~/utils.ts';\n\nimport type { ForeignKey, UpdateDeleteAction } from '~/pg-core/foreign-keys.ts';\nimport { ForeignKeyBuilder } from '~/pg-core/foreign-keys.ts';\nimport type { AnyPgTable, PgTable } from '~/pg-core/table.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport { iife } from '~/tracing-utils.ts';\nimport type { PgIndexOpClass } from '../indexes.ts';\nimport { uniqueKeyName } from '../unique-constraint.ts';\nimport { makePgArray, parsePgArray } from '../utils/array.ts';\n\nexport interface ReferenceConfig {\n\tref: () => PgColumn;\n\tactions: {\n\t\tonUpdate?: UpdateDeleteAction;\n\t\tonDelete?: UpdateDeleteAction;\n\t};\n}\n\nexport interface PgColumnBuilderBase<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTTypeConfig extends object = object,\n> extends ColumnBuilderBase {}\n\nexport abstract class PgColumnBuilder<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTRuntimeConfig extends object = object,\n\tTTypeConfig extends object = object,\n\tTExtraConfig extends ColumnBuilderExtraConfig = ColumnBuilderExtraConfig,\n> extends ColumnBuilder\n\timplements PgColumnBuilderBase\n{\n\tprivate foreignKeyConfigs: ReferenceConfig[] = [];\n\n\tstatic override readonly [entityKind]: string = 'PgColumnBuilder';\n\n\tarray(size?: TSize): PgArrayBuilder<\n\t\t& {\n\t\t\tname: T['name'];\n\t\t\tdataType: 'array';\n\t\t\tcolumnType: 'PgArray';\n\t\t\tdata: T['data'][];\n\t\t\tdriverParam: T['driverParam'][] | string;\n\t\t\tenumValues: T['enumValues'];\n\t\t\tsize: TSize;\n\t\t\tbaseBuilder: T;\n\t\t}\n\t\t& (T extends { notNull: true } ? { notNull: true } : {})\n\t\t& (T extends { hasDefault: true } ? { hasDefault: true } : {}),\n\t\tT\n\t> {\n\t\treturn new PgArrayBuilder(this.config.name, this as PgColumnBuilder, size as any);\n\t}\n\n\treferences(\n\t\tref: ReferenceConfig['ref'],\n\t\tactions: ReferenceConfig['actions'] = {},\n\t): this {\n\t\tthis.foreignKeyConfigs.push({ ref, actions });\n\t\treturn this;\n\t}\n\n\tunique(\n\t\tname?: string,\n\t\tconfig?: { nulls: 'distinct' | 'not distinct' },\n\t): this {\n\t\tthis.config.isUnique = true;\n\t\tthis.config.uniqueName = name;\n\t\tthis.config.uniqueType = config?.nulls;\n\t\treturn this;\n\t}\n\n\tgeneratedAlwaysAs(as: SQL | T['data'] | (() => SQL)): HasGenerated {\n\t\tthis.config.generated = {\n\t\t\tas,\n\t\t\ttype: 'always',\n\t\t\tmode: 'stored',\n\t\t};\n\t\treturn this as HasGenerated;\n\t}\n\n\t/** @internal */\n\tbuildForeignKeys(column: PgColumn, table: PgTable): ForeignKey[] {\n\t\treturn this.foreignKeyConfigs.map(({ ref, actions }) => {\n\t\t\treturn iife(\n\t\t\t\t(ref, actions) => {\n\t\t\t\t\tconst builder = new ForeignKeyBuilder(() => {\n\t\t\t\t\t\tconst foreignColumn = ref();\n\t\t\t\t\t\treturn { columns: [column], foreignColumns: [foreignColumn] };\n\t\t\t\t\t});\n\t\t\t\t\tif (actions.onUpdate) {\n\t\t\t\t\t\tbuilder.onUpdate(actions.onUpdate);\n\t\t\t\t\t}\n\t\t\t\t\tif (actions.onDelete) {\n\t\t\t\t\t\tbuilder.onDelete(actions.onDelete);\n\t\t\t\t\t}\n\t\t\t\t\treturn builder.build(table);\n\t\t\t\t},\n\t\t\t\tref,\n\t\t\t\tactions,\n\t\t\t);\n\t\t});\n\t}\n\n\t/** @internal */\n\tabstract build(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgColumn>;\n\n\t/** @internal */\n\tbuildExtraConfigColumn(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): ExtraConfigColumn {\n\t\treturn new ExtraConfigColumn(table, this.config);\n\t}\n}\n\n// To understand how to use `PgColumn` and `PgColumn`, see `Column` and `AnyColumn` documentation.\nexport abstract class PgColumn<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n\tTRuntimeConfig extends object = {},\n\tTTypeConfig extends object = {},\n> extends Column {\n\tstatic override readonly [entityKind]: string = 'PgColumn';\n\n\tconstructor(\n\t\toverride readonly table: PgTable,\n\t\tconfig: ColumnBuilderRuntimeConfig,\n\t) {\n\t\tif (!config.uniqueName) {\n\t\t\tconfig.uniqueName = uniqueKeyName(table, [config.name]);\n\t\t}\n\t\tsuper(table, config);\n\t}\n}\n\nexport type IndexedExtraConfigType = { order?: 'asc' | 'desc'; nulls?: 'first' | 'last'; opClass?: string };\n\nexport class ExtraConfigColumn<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n> extends PgColumn {\n\tstatic override readonly [entityKind]: string = 'ExtraConfigColumn';\n\n\toverride getSQLType(): string {\n\t\treturn this.getSQLType();\n\t}\n\n\tindexConfig: IndexedExtraConfigType = {\n\t\torder: this.config.order ?? 'asc',\n\t\tnulls: this.config.nulls ?? 'last',\n\t\topClass: this.config.opClass,\n\t};\n\tdefaultConfig: IndexedExtraConfigType = {\n\t\torder: 'asc',\n\t\tnulls: 'last',\n\t\topClass: undefined,\n\t};\n\n\tasc(): Omit {\n\t\tthis.indexConfig.order = 'asc';\n\t\treturn this;\n\t}\n\n\tdesc(): Omit {\n\t\tthis.indexConfig.order = 'desc';\n\t\treturn this;\n\t}\n\n\tnullsFirst(): Omit {\n\t\tthis.indexConfig.nulls = 'first';\n\t\treturn this;\n\t}\n\n\tnullsLast(): Omit {\n\t\tthis.indexConfig.nulls = 'last';\n\t\treturn this;\n\t}\n\n\t/**\n\t * ### PostgreSQL documentation quote\n\t *\n\t * > An operator class with optional parameters can be specified for each column of an index.\n\t * The operator class identifies the operators to be used by the index for that column.\n\t * For example, a B-tree index on four-byte integers would use the int4_ops class;\n\t * this operator class includes comparison functions for four-byte integers.\n\t * In practice the default operator class for the column's data type is usually sufficient.\n\t * The main point of having operator classes is that for some data types, there could be more than one meaningful ordering.\n\t * For example, we might want to sort a complex-number data type either by absolute value or by real part.\n\t * We could do this by defining two operator classes for the data type and then selecting the proper class when creating an index.\n\t * More information about operator classes check:\n\t *\n\t * ### Useful links\n\t * https://www.postgresql.org/docs/current/sql-createindex.html\n\t *\n\t * https://www.postgresql.org/docs/current/indexes-opclass.html\n\t *\n\t * https://www.postgresql.org/docs/current/xindex.html\n\t *\n\t * ### Additional types\n\t * If you have the `pg_vector` extension installed in your database, you can use the\n\t * `vector_l2_ops`, `vector_ip_ops`, `vector_cosine_ops`, `vector_l1_ops`, `bit_hamming_ops`, `bit_jaccard_ops`, `halfvec_l2_ops`, `sparsevec_l2_ops` options, which are predefined types.\n\t *\n\t * **You can always specify any string you want in the operator class, in case Drizzle doesn't have it natively in its types**\n\t *\n\t * @param opClass\n\t * @returns\n\t */\n\top(opClass: PgIndexOpClass): Omit {\n\t\tthis.indexConfig.opClass = opClass;\n\t\treturn this;\n\t}\n}\n\nexport class IndexedColumn {\n\tstatic readonly [entityKind]: string = 'IndexedColumn';\n\tconstructor(\n\t\tname: string | undefined,\n\t\tkeyAsName: boolean,\n\t\ttype: string,\n\t\tindexConfig: IndexedExtraConfigType,\n\t) {\n\t\tthis.name = name;\n\t\tthis.keyAsName = keyAsName;\n\t\tthis.type = type;\n\t\tthis.indexConfig = indexConfig;\n\t}\n\n\tname: string | undefined;\n\tkeyAsName: boolean;\n\ttype: string;\n\tindexConfig: IndexedExtraConfigType;\n}\n\nexport type AnyPgColumn> = {}> = PgColumn<\n\tRequired, TPartial>>\n>;\n\nexport type PgArrayColumnBuilderBaseConfig = ColumnBuilderBaseConfig<'array', 'PgArray'> & {\n\tsize: number | undefined;\n\tbaseBuilder: ColumnBuilderBaseConfig;\n};\n\nexport class PgArrayBuilder<\n\tT extends PgArrayColumnBuilderBaseConfig,\n\tTBase extends ColumnBuilderBaseConfig | PgArrayColumnBuilderBaseConfig,\n> extends PgColumnBuilder<\n\tT,\n\t{\n\t\tbaseBuilder: TBase extends PgArrayColumnBuilderBaseConfig ? PgArrayBuilder<\n\t\t\t\tTBase,\n\t\t\t\tTBase extends { baseBuilder: infer TBaseBuilder extends ColumnBuilderBaseConfig } ? TBaseBuilder\n\t\t\t\t\t: never\n\t\t\t>\n\t\t\t: PgColumnBuilder>>>;\n\t\tsize: T['size'];\n\t},\n\t{\n\t\tbaseBuilder: TBase extends PgArrayColumnBuilderBaseConfig ? PgArrayBuilder<\n\t\t\t\tTBase,\n\t\t\t\tTBase extends { baseBuilder: infer TBaseBuilder extends ColumnBuilderBaseConfig } ? TBaseBuilder\n\t\t\t\t\t: never\n\t\t\t>\n\t\t\t: PgColumnBuilder>>>;\n\t\tsize: T['size'];\n\t}\n> {\n\tstatic override readonly [entityKind] = 'PgArrayBuilder';\n\n\tconstructor(\n\t\tname: string,\n\t\tbaseBuilder: PgArrayBuilder['config']['baseBuilder'],\n\t\tsize: T['size'],\n\t) {\n\t\tsuper(name, 'array', 'PgArray');\n\t\tthis.config.baseBuilder = baseBuilder;\n\t\tthis.config.size = size;\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgArray & { size: T['size']; baseBuilder: T['baseBuilder'] }, TBase> {\n\t\tconst baseColumn = this.config.baseBuilder.build(table);\n\t\treturn new PgArray & { size: T['size']; baseBuilder: T['baseBuilder'] }, TBase>(\n\t\t\ttable as AnyPgTable<{ name: MakeColumnConfig['tableName'] }>,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t\tbaseColumn,\n\t\t);\n\t}\n}\n\nexport class PgArray<\n\tT extends ColumnBaseConfig<'array', 'PgArray'> & {\n\t\tsize: number | undefined;\n\t\tbaseBuilder: ColumnBuilderBaseConfig;\n\t},\n\tTBase extends ColumnBuilderBaseConfig,\n> extends PgColumn {\n\treadonly size: T['size'];\n\n\tstatic override readonly [entityKind]: string = 'PgArray';\n\n\tconstructor(\n\t\ttable: AnyPgTable<{ name: T['tableName'] }>,\n\t\tconfig: PgArrayBuilder['config'],\n\t\treadonly baseColumn: PgColumn,\n\t\treadonly range?: [number | undefined, number | undefined],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.size = config.size;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn `${this.baseColumn.getSQLType()}[${typeof this.size === 'number' ? this.size : ''}]`;\n\t}\n\n\toverride mapFromDriverValue(value: unknown[] | string): T['data'] {\n\t\tif (typeof value === 'string') {\n\t\t\t// Thank you node-postgres for not parsing enum arrays\n\t\t\tvalue = parsePgArray(value);\n\t\t}\n\t\treturn value.map((v) => this.baseColumn.mapFromDriverValue(v));\n\t}\n\n\toverride mapToDriverValue(value: unknown[], isNestedArray = false): unknown[] | string {\n\t\tconst a = value.map((v) =>\n\t\t\tv === null\n\t\t\t\t? null\n\t\t\t\t: is(this.baseColumn, PgArray)\n\t\t\t\t? this.baseColumn.mapToDriverValue(v as unknown[], true)\n\t\t\t\t: this.baseColumn.mapToDriverValue(v)\n\t\t);\n\t\tif (isNestedArray) return a;\n\t\treturn makePgArray(a);\n\t}\n}\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport type { NonArray, Writable } from '~/utils.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\n// Enum as ts enum\n\nexport type PgEnumObjectColumnBuilderInitial = PgEnumObjectColumnBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgEnumObjectColumn';\n\tdata: TValues[keyof TValues];\n\tenumValues: string[];\n\tdriverParam: string;\n}>;\n\nexport interface PgEnumObject {\n\t(): PgEnumObjectColumnBuilderInitial<'', TValues>;\n\t(name: TName): PgEnumObjectColumnBuilderInitial;\n\t(name?: TName): PgEnumObjectColumnBuilderInitial;\n\n\treadonly enumName: string;\n\treadonly enumValues: string[];\n\treadonly schema: string | undefined;\n\t/** @internal */\n\t[isPgEnumSym]: true;\n}\n\nexport class PgEnumObjectColumnBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'PgEnumObjectColumn'> & { enumValues: string[] },\n> extends PgColumnBuilder }> {\n\tstatic override readonly [entityKind]: string = 'PgEnumObjectColumnBuilder';\n\n\tconstructor(name: T['name'], enumInstance: PgEnumObject) {\n\t\tsuper(name, 'string', 'PgEnumObjectColumn');\n\t\tthis.config.enum = enumInstance;\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgEnumObjectColumn> {\n\t\treturn new PgEnumObjectColumn>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class PgEnumObjectColumn & { enumValues: object }>\n\textends PgColumn }>\n{\n\tstatic override readonly [entityKind]: string = 'PgEnumObjectColumn';\n\n\treadonly enum;\n\toverride readonly enumValues = this.config.enum.enumValues;\n\n\tconstructor(\n\t\ttable: AnyPgTable<{ name: T['tableName'] }>,\n\t\tconfig: PgEnumObjectColumnBuilder['config'],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.enum = config.enum;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn this.enum.enumName;\n\t}\n}\n\n// Enum as string union\n\nexport type PgEnumColumnBuilderInitial =\n\tPgEnumColumnBuilder<{\n\t\tname: TName;\n\t\tdataType: 'string';\n\t\tcolumnType: 'PgEnumColumn';\n\t\tdata: TValues[number];\n\t\tenumValues: TValues;\n\t\tdriverParam: string;\n\t}>;\n\nconst isPgEnumSym = Symbol.for('drizzle:isPgEnum');\nexport interface PgEnum {\n\t(): PgEnumColumnBuilderInitial<'', TValues>;\n\t(name: TName): PgEnumColumnBuilderInitial;\n\t(name?: TName): PgEnumColumnBuilderInitial;\n\n\treadonly enumName: string;\n\treadonly enumValues: TValues;\n\treadonly schema: string | undefined;\n\t/** @internal */\n\t[isPgEnumSym]: true;\n}\n\nexport function isPgEnum(obj: unknown): obj is PgEnum<[string, ...string[]]> {\n\treturn !!obj && typeof obj === 'function' && isPgEnumSym in obj && obj[isPgEnumSym] === true;\n}\n\nexport class PgEnumColumnBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'PgEnumColumn'> & { enumValues: [string, ...string[]] },\n> extends PgColumnBuilder }> {\n\tstatic override readonly [entityKind]: string = 'PgEnumColumnBuilder';\n\n\tconstructor(name: T['name'], enumInstance: PgEnum) {\n\t\tsuper(name, 'string', 'PgEnumColumn');\n\t\tthis.config.enum = enumInstance;\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgEnumColumn> {\n\t\treturn new PgEnumColumn>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class PgEnumColumn & { enumValues: [string, ...string[]] }>\n\textends PgColumn }>\n{\n\tstatic override readonly [entityKind]: string = 'PgEnumColumn';\n\n\treadonly enum = this.config.enum;\n\toverride readonly enumValues = this.config.enum.enumValues;\n\n\tconstructor(\n\t\ttable: AnyPgTable<{ name: T['tableName'] }>,\n\t\tconfig: PgEnumColumnBuilder['config'],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.enum = config.enum;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn this.enum.enumName;\n\t}\n}\n\nexport function pgEnum>(\n\tenumName: string,\n\tvalues: T | Writable,\n): PgEnum>;\n\nexport function pgEnum>(\n\tenumName: string,\n\tenumObj: NonArray,\n): PgEnumObject;\n\nexport function pgEnum(\n\tenumName: any,\n\tinput: any,\n): any {\n\treturn Array.isArray(input)\n\t\t? pgEnumWithSchema(enumName, [...input] as [string, ...string[]], undefined)\n\t\t: pgEnumObjectWithSchema(enumName, input, undefined);\n}\n\n/** @internal */\nexport function pgEnumWithSchema>(\n\tenumName: string,\n\tvalues: T | Writable,\n\tschema?: string,\n): PgEnum> {\n\tconst enumInstance: PgEnum> = Object.assign(\n\t\t(name?: TName): PgEnumColumnBuilderInitial> =>\n\t\t\tnew PgEnumColumnBuilder(name ?? '' as TName, enumInstance),\n\t\t{\n\t\t\tenumName,\n\t\t\tenumValues: values,\n\t\t\tschema,\n\t\t\t[isPgEnumSym]: true,\n\t\t} as const,\n\t);\n\n\treturn enumInstance;\n}\n\n/** @internal */\nexport function pgEnumObjectWithSchema(\n\tenumName: string,\n\tvalues: T,\n\tschema?: string,\n): PgEnumObject {\n\tconst enumInstance: PgEnumObject = Object.assign(\n\t\t(name?: TName): PgEnumObjectColumnBuilderInitial =>\n\t\t\tnew PgEnumObjectColumnBuilder(name ?? '' as TName, enumInstance),\n\t\t{\n\t\t\tenumName,\n\t\t\tenumValues: Object.values(values),\n\t\t\tschema,\n\t\t\t[isPgEnumSym]: true,\n\t\t} as const,\n\t);\n\n\treturn enumInstance;\n}\n", "import { entityKind } from './entity.ts';\nimport type { SQL, SQLWrapper } from './sql/sql.ts';\n\nexport interface Subquery<\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTAlias extends string = string,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTSelectedFields extends Record = Record,\n> extends SQLWrapper {\n\t// SQLWrapper runtime implementation is defined in 'sql/sql.ts'\n}\nexport class Subquery<\n\tTAlias extends string = string,\n\tTSelectedFields extends Record = Record,\n> implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Subquery';\n\n\tdeclare _: {\n\t\tbrand: 'Subquery';\n\t\tsql: SQL;\n\t\tselectedFields: TSelectedFields;\n\t\talias: TAlias;\n\t\tisWith: boolean;\n\t\tusedTables?: string[];\n\t};\n\n\tconstructor(sql: SQL, fields: TSelectedFields, alias: string, isWith = false, usedTables: string[] = []) {\n\t\tthis._ = {\n\t\t\tbrand: 'Subquery',\n\t\t\tsql,\n\t\t\tselectedFields: fields as TSelectedFields,\n\t\t\talias: alias as TAlias,\n\t\t\tisWith,\n\t\t\tusedTables,\n\t\t};\n\t}\n\n\t// getSQL(): SQL {\n\t// \treturn new SQL([this]);\n\t// }\n}\n\nexport class WithSubquery<\n\tTAlias extends string = string,\n\tTSelection extends Record = Record,\n> extends Subquery {\n\tstatic override readonly [entityKind]: string = 'WithSubquery';\n}\n\nexport type WithSubqueryWithoutSelection = WithSubquery;\n", "// package.json\nvar version = \"0.44.7\";\n\n// src/version.ts\nvar compatibilityVersion = 10;\nexport {\n compatibilityVersion,\n version as npmVersion\n};\n", "import type { Span, Tracer } from '@opentelemetry/api';\nimport { iife } from '~/tracing-utils.ts';\nimport { npmVersion } from '~/version.ts';\n\nlet otel: typeof import('@opentelemetry/api') | undefined;\nlet rawTracer: Tracer | undefined;\n// try {\n// \totel = await import('@opentelemetry/api');\n// } catch (err: any) {\n// \tif (err.code !== 'MODULE_NOT_FOUND' && err.code !== 'ERR_MODULE_NOT_FOUND') {\n// \t\tthrow err;\n// \t}\n// }\n\ntype SpanName =\n\t| 'drizzle.operation'\n\t| 'drizzle.prepareQuery'\n\t| 'drizzle.buildSQL'\n\t| 'drizzle.execute'\n\t| 'drizzle.driver.execute'\n\t| 'drizzle.mapResponse';\n\n/** @internal */\nexport const tracer = {\n\tstartActiveSpan unknown>(name: SpanName, fn: F): ReturnType {\n\t\tif (!otel) {\n\t\t\treturn fn() as ReturnType;\n\t\t}\n\n\t\tif (!rawTracer) {\n\t\t\trawTracer = otel.trace.getTracer('drizzle-orm', npmVersion);\n\t\t}\n\n\t\treturn iife(\n\t\t\t(otel, rawTracer) =>\n\t\t\t\trawTracer.startActiveSpan(\n\t\t\t\t\tname,\n\t\t\t\t\t((span: Span) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn fn(span);\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tspan.setStatus({\n\t\t\t\t\t\t\t\tcode: otel.SpanStatusCode.ERROR,\n\t\t\t\t\t\t\t\tmessage: e instanceof Error ? e.message : 'Unknown error', // eslint-disable-line no-instanceof/no-instanceof\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tthrow e;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tspan.end();\n\t\t\t\t\t\t}\n\t\t\t\t\t}) as F,\n\t\t\t\t),\n\t\t\totel,\n\t\t\trawTracer,\n\t\t);\n\t},\n};\n", "export const ViewBaseConfig = Symbol.for('drizzle:ViewBaseConfig');\n", "import type { CasingCache } from '~/casing.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport { isPgEnum } from '~/pg-core/columns/enum.ts';\nimport type { SelectResult } from '~/query-builders/select.types.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { tracer } from '~/tracing.ts';\nimport type { Assume, Equal } from '~/utils.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport type { AnyColumn } from '../column.ts';\nimport { Column } from '../column.ts';\nimport { IsAlias, Table } from '../table.ts';\n\n/**\n * This class is used to indicate a primitive param value that is used in `sql` tag.\n * It is only used on type level and is never instantiated at runtime.\n * If you see a value of this type in the code, its runtime value is actually the primitive param value.\n */\nexport class FakePrimitiveParam {\n\tstatic readonly [entityKind]: string = 'FakePrimitiveParam';\n}\n\nexport type Chunk =\n\t| string\n\t| Table\n\t| View\n\t| AnyColumn\n\t| Name\n\t| Param\n\t| Placeholder\n\t| SQL;\n\nexport interface BuildQueryConfig {\n\tcasing: CasingCache;\n\tescapeName(name: string): string;\n\tescapeParam(num: number, value: unknown): string;\n\tescapeString(str: string): string;\n\tprepareTyping?: (encoder: DriverValueEncoder) => QueryTypingsValue;\n\tparamStartIndex?: { value: number };\n\tinlineParams?: boolean;\n\tinvokeSource?: 'indexes' | undefined;\n}\n\nexport type QueryTypingsValue = 'json' | 'decimal' | 'time' | 'timestamp' | 'uuid' | 'date' | 'none';\n\nexport interface Query {\n\tsql: string;\n\tparams: unknown[];\n}\n\nexport interface QueryWithTypings extends Query {\n\ttypings?: QueryTypingsValue[];\n}\n\n/**\n * Any value that implements the `getSQL` method. The implementations include:\n * - `Table`\n * - `Column`\n * - `View`\n * - `Subquery`\n * - `SQL`\n * - `SQL.Aliased`\n * - `Placeholder`\n * - `Param`\n */\nexport interface SQLWrapper {\n\tgetSQL(): SQL;\n\tshouldOmitSQLParens?(): boolean;\n}\n\nexport function isSQLWrapper(value: unknown): value is SQLWrapper {\n\treturn value !== null && value !== undefined && typeof (value as any).getSQL === 'function';\n}\n\nfunction mergeQueries(queries: QueryWithTypings[]): QueryWithTypings {\n\tconst result: QueryWithTypings = { sql: '', params: [] };\n\tfor (const query of queries) {\n\t\tresult.sql += query.sql;\n\t\tresult.params.push(...query.params);\n\t\tif (query.typings?.length) {\n\t\t\tif (!result.typings) {\n\t\t\t\tresult.typings = [];\n\t\t\t}\n\t\t\tresult.typings.push(...query.typings);\n\t\t}\n\t}\n\treturn result;\n}\n\nexport class StringChunk implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'StringChunk';\n\n\treadonly value: string[];\n\n\tconstructor(value: string | string[]) {\n\t\tthis.value = Array.isArray(value) ? value : [value];\n\t}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\nexport class SQL implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'SQL';\n\n\tdeclare _: {\n\t\tbrand: 'SQL';\n\t\ttype: T;\n\t};\n\n\t/** @internal */\n\tdecoder: DriverValueDecoder = noopDecoder;\n\tprivate shouldInlineParams = false;\n\n\t/** @internal */\n\tusedTables: string[] = [];\n\n\tconstructor(readonly queryChunks: SQLChunk[]) {\n\t\tfor (const chunk of queryChunks) {\n\t\t\tif (is(chunk, Table)) {\n\t\t\t\tconst schemaName = chunk[Table.Symbol.Schema];\n\n\t\t\t\tthis.usedTables.push(\n\t\t\t\t\tschemaName === undefined\n\t\t\t\t\t\t? chunk[Table.Symbol.Name]\n\t\t\t\t\t\t: schemaName + '.' + chunk[Table.Symbol.Name],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tappend(query: SQL): this {\n\t\tthis.queryChunks.push(...query.queryChunks);\n\t\treturn this;\n\t}\n\n\ttoQuery(config: BuildQueryConfig): QueryWithTypings {\n\t\treturn tracer.startActiveSpan('drizzle.buildSQL', (span) => {\n\t\t\tconst query = this.buildQueryFromSourceParams(this.queryChunks, config);\n\t\t\tspan?.setAttributes({\n\t\t\t\t'drizzle.query.text': query.sql,\n\t\t\t\t'drizzle.query.params': JSON.stringify(query.params),\n\t\t\t});\n\t\t\treturn query;\n\t\t});\n\t}\n\n\tbuildQueryFromSourceParams(chunks: SQLChunk[], _config: BuildQueryConfig): Query {\n\t\tconst config = Object.assign({}, _config, {\n\t\t\tinlineParams: _config.inlineParams || this.shouldInlineParams,\n\t\t\tparamStartIndex: _config.paramStartIndex || { value: 0 },\n\t\t});\n\n\t\tconst {\n\t\t\tcasing,\n\t\t\tescapeName,\n\t\t\tescapeParam,\n\t\t\tprepareTyping,\n\t\t\tinlineParams,\n\t\t\tparamStartIndex,\n\t\t} = config;\n\n\t\treturn mergeQueries(chunks.map((chunk): QueryWithTypings => {\n\t\t\tif (is(chunk, StringChunk)) {\n\t\t\t\treturn { sql: chunk.value.join(''), params: [] };\n\t\t\t}\n\n\t\t\tif (is(chunk, Name)) {\n\t\t\t\treturn { sql: escapeName(chunk.value), params: [] };\n\t\t\t}\n\n\t\t\tif (chunk === undefined) {\n\t\t\t\treturn { sql: '', params: [] };\n\t\t\t}\n\n\t\t\tif (Array.isArray(chunk)) {\n\t\t\t\tconst result: SQLChunk[] = [new StringChunk('(')];\n\t\t\t\tfor (const [i, p] of chunk.entries()) {\n\t\t\t\t\tresult.push(p);\n\t\t\t\t\tif (i < chunk.length - 1) {\n\t\t\t\t\t\tresult.push(new StringChunk(', '));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult.push(new StringChunk(')'));\n\t\t\t\treturn this.buildQueryFromSourceParams(result, config);\n\t\t\t}\n\n\t\t\tif (is(chunk, SQL)) {\n\t\t\t\treturn this.buildQueryFromSourceParams(chunk.queryChunks, {\n\t\t\t\t\t...config,\n\t\t\t\t\tinlineParams: inlineParams || chunk.shouldInlineParams,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (is(chunk, Table)) {\n\t\t\t\tconst schemaName = chunk[Table.Symbol.Schema];\n\t\t\t\tconst tableName = chunk[Table.Symbol.Name];\n\t\t\t\treturn {\n\t\t\t\t\tsql: schemaName === undefined || chunk[IsAlias]\n\t\t\t\t\t\t? escapeName(tableName)\n\t\t\t\t\t\t: escapeName(schemaName) + '.' + escapeName(tableName),\n\t\t\t\t\tparams: [],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (is(chunk, Column)) {\n\t\t\t\tconst columnName = casing.getColumnCasing(chunk);\n\t\t\t\tif (_config.invokeSource === 'indexes') {\n\t\t\t\t\treturn { sql: escapeName(columnName), params: [] };\n\t\t\t\t}\n\n\t\t\t\tconst schemaName = chunk.table[Table.Symbol.Schema];\n\t\t\t\treturn {\n\t\t\t\t\tsql: chunk.table[IsAlias] || schemaName === undefined\n\t\t\t\t\t\t? escapeName(chunk.table[Table.Symbol.Name]) + '.' + escapeName(columnName)\n\t\t\t\t\t\t: escapeName(schemaName) + '.' + escapeName(chunk.table[Table.Symbol.Name]) + '.'\n\t\t\t\t\t\t\t+ escapeName(columnName),\n\t\t\t\t\tparams: [],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (is(chunk, View)) {\n\t\t\t\tconst schemaName = chunk[ViewBaseConfig].schema;\n\t\t\t\tconst viewName = chunk[ViewBaseConfig].name;\n\t\t\t\treturn {\n\t\t\t\t\tsql: schemaName === undefined || chunk[ViewBaseConfig].isAlias\n\t\t\t\t\t\t? escapeName(viewName)\n\t\t\t\t\t\t: escapeName(schemaName) + '.' + escapeName(viewName),\n\t\t\t\t\tparams: [],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (is(chunk, Param)) {\n\t\t\t\tif (is(chunk.value, Placeholder)) {\n\t\t\t\t\treturn { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ['none'] };\n\t\t\t\t}\n\n\t\t\t\tconst mappedValue = chunk.value === null ? null : chunk.encoder.mapToDriverValue(chunk.value);\n\n\t\t\t\tif (is(mappedValue, SQL)) {\n\t\t\t\t\treturn this.buildQueryFromSourceParams([mappedValue], config);\n\t\t\t\t}\n\n\t\t\t\tif (inlineParams) {\n\t\t\t\t\treturn { sql: this.mapInlineParam(mappedValue, config), params: [] };\n\t\t\t\t}\n\n\t\t\t\tlet typings: QueryTypingsValue[] = ['none'];\n\t\t\t\tif (prepareTyping) {\n\t\t\t\t\ttypings = [prepareTyping(chunk.encoder)];\n\t\t\t\t}\n\n\t\t\t\treturn { sql: escapeParam(paramStartIndex.value++, mappedValue), params: [mappedValue], typings };\n\t\t\t}\n\n\t\t\tif (is(chunk, Placeholder)) {\n\t\t\t\treturn { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ['none'] };\n\t\t\t}\n\n\t\t\tif (is(chunk, SQL.Aliased) && chunk.fieldAlias !== undefined) {\n\t\t\t\treturn { sql: escapeName(chunk.fieldAlias), params: [] };\n\t\t\t}\n\n\t\t\tif (is(chunk, Subquery)) {\n\t\t\t\tif (chunk._.isWith) {\n\t\t\t\t\treturn { sql: escapeName(chunk._.alias), params: [] };\n\t\t\t\t}\n\t\t\t\treturn this.buildQueryFromSourceParams([\n\t\t\t\t\tnew StringChunk('('),\n\t\t\t\t\tchunk._.sql,\n\t\t\t\t\tnew StringChunk(') '),\n\t\t\t\t\tnew Name(chunk._.alias),\n\t\t\t\t], config);\n\t\t\t}\n\n\t\t\tif (isPgEnum(chunk)) {\n\t\t\t\tif (chunk.schema) {\n\t\t\t\t\treturn { sql: escapeName(chunk.schema) + '.' + escapeName(chunk.enumName), params: [] };\n\t\t\t\t}\n\t\t\t\treturn { sql: escapeName(chunk.enumName), params: [] };\n\t\t\t}\n\n\t\t\tif (isSQLWrapper(chunk)) {\n\t\t\t\tif (chunk.shouldOmitSQLParens?.()) {\n\t\t\t\t\treturn this.buildQueryFromSourceParams([chunk.getSQL()], config);\n\t\t\t\t}\n\t\t\t\treturn this.buildQueryFromSourceParams([\n\t\t\t\t\tnew StringChunk('('),\n\t\t\t\t\tchunk.getSQL(),\n\t\t\t\t\tnew StringChunk(')'),\n\t\t\t\t], config);\n\t\t\t}\n\n\t\t\tif (inlineParams) {\n\t\t\t\treturn { sql: this.mapInlineParam(chunk, config), params: [] };\n\t\t\t}\n\n\t\t\treturn { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ['none'] };\n\t\t}));\n\t}\n\n\tprivate mapInlineParam(\n\t\tchunk: unknown,\n\t\t{ escapeString }: BuildQueryConfig,\n\t): string {\n\t\tif (chunk === null) {\n\t\t\treturn 'null';\n\t\t}\n\t\tif (typeof chunk === 'number' || typeof chunk === 'boolean') {\n\t\t\treturn chunk.toString();\n\t\t}\n\t\tif (typeof chunk === 'string') {\n\t\t\treturn escapeString(chunk);\n\t\t}\n\t\tif (typeof chunk === 'object') {\n\t\t\tconst mappedValueAsString = chunk.toString();\n\t\t\tif (mappedValueAsString === '[object Object]') {\n\t\t\t\treturn escapeString(JSON.stringify(chunk));\n\t\t\t}\n\t\t\treturn escapeString(mappedValueAsString);\n\t\t}\n\t\tthrow new Error('Unexpected param value: ' + chunk);\n\t}\n\n\tgetSQL(): SQL {\n\t\treturn this;\n\t}\n\n\tas(alias: string): SQL.Aliased;\n\t/**\n\t * @deprecated\n\t * Use ``sql`query`.as(alias)`` instead.\n\t */\n\tas(): SQL;\n\t/**\n\t * @deprecated\n\t * Use ``sql`query`.as(alias)`` instead.\n\t */\n\tas(alias: string): SQL.Aliased;\n\tas(alias?: string): SQL | SQL.Aliased {\n\t\t// TODO: remove with deprecated overloads\n\t\tif (alias === undefined) {\n\t\t\treturn this;\n\t\t}\n\n\t\treturn new SQL.Aliased(this, alias);\n\t}\n\n\tmapWith<\n\t\tTDecoder extends\n\t\t\t| DriverValueDecoder\n\t\t\t| DriverValueDecoder['mapFromDriverValue'],\n\t>(decoder: TDecoder): SQL> {\n\t\tthis.decoder = typeof decoder === 'function' ? { mapFromDriverValue: decoder } : decoder;\n\t\treturn this as SQL>;\n\t}\n\n\tinlineParams(): this {\n\t\tthis.shouldInlineParams = true;\n\t\treturn this;\n\t}\n\n\t/**\n\t * This method is used to conditionally include a part of the query.\n\t *\n\t * @param condition - Condition to check\n\t * @returns itself if the condition is `true`, otherwise `undefined`\n\t */\n\tif(condition: any | undefined): this | undefined {\n\t\treturn condition ? this : undefined;\n\t}\n}\n\nexport type GetDecoderResult = T extends Column ? T['_']['data'] : T extends\n\t| DriverValueDecoder\n\t| DriverValueDecoder['mapFromDriverValue'] ? TData\n: never;\n\n/**\n * Any DB name (table, column, index etc.)\n */\nexport class Name implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Name';\n\n\tprotected brand!: 'Name';\n\n\tconstructor(readonly value: string) {}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\n/**\n * Any DB name (table, column, index etc.)\n * @deprecated Use `sql.identifier` instead.\n */\nexport function name(value: string): Name {\n\treturn new Name(value);\n}\n\nexport interface DriverValueDecoder {\n\tmapFromDriverValue(value: TDriverParam): TData;\n}\n\nexport interface DriverValueEncoder {\n\tmapToDriverValue(value: TData): TDriverParam | SQL;\n}\n\nexport function isDriverValueEncoder(value: unknown): value is DriverValueEncoder {\n\treturn typeof value === 'object' && value !== null && 'mapToDriverValue' in value\n\t\t&& typeof (value as any).mapToDriverValue === 'function';\n}\n\nexport const noopDecoder: DriverValueDecoder = {\n\tmapFromDriverValue: (value) => value,\n};\n\nexport const noopEncoder: DriverValueEncoder = {\n\tmapToDriverValue: (value) => value,\n};\n\nexport interface DriverValueMapper\n\textends DriverValueDecoder, DriverValueEncoder\n{}\n\nexport const noopMapper: DriverValueMapper = {\n\t...noopDecoder,\n\t...noopEncoder,\n};\n\n/** Parameter value that is optionally bound to an encoder (for example, a column). */\nexport class Param implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Param';\n\n\tprotected brand!: 'BoundParamValue';\n\n\t/**\n\t * @param value - Parameter value\n\t * @param encoder - Encoder to convert the value to a driver parameter\n\t */\n\tconstructor(\n\t\treadonly value: TDataType,\n\t\treadonly encoder: DriverValueEncoder = noopEncoder,\n\t) {}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\n/** @deprecated Use `sql.param` instead. */\nexport function param(\n\tvalue: TData,\n\tencoder?: DriverValueEncoder,\n): Param {\n\treturn new Param(value, encoder);\n}\n\n/**\n * Anything that can be passed to the `` sql`...` `` tagged function.\n */\nexport type SQLChunk =\n\t| StringChunk\n\t| SQLChunk[]\n\t| SQLWrapper\n\t| SQL\n\t| Table\n\t| View\n\t| Subquery\n\t| AnyColumn\n\t| Param\n\t| Name\n\t| undefined\n\t| FakePrimitiveParam\n\t| Placeholder;\n\nexport function sql(strings: TemplateStringsArray, ...params: any[]): SQL;\n/*\n\tThe type of `params` is specified as `SQLChunk[]`, but that's slightly incorrect -\n\tin runtime, users won't pass `FakePrimitiveParam` instances as `params` - they will pass primitive values\n\twhich will be wrapped in `Param`. That's why the overload specifies `params` as `any[]` and not as `SQLSourceParam[]`.\n\tThis type is used to make our lives easier and the type checker happy.\n*/\nexport function sql(strings: TemplateStringsArray, ...params: SQLChunk[]): SQL {\n\tconst queryChunks: SQLChunk[] = [];\n\tif (params.length > 0 || (strings.length > 0 && strings[0] !== '')) {\n\t\tqueryChunks.push(new StringChunk(strings[0]!));\n\t}\n\tfor (const [paramIndex, param] of params.entries()) {\n\t\tqueryChunks.push(param, new StringChunk(strings[paramIndex + 1]!));\n\t}\n\n\treturn new SQL(queryChunks);\n}\n\nexport namespace sql {\n\texport function empty(): SQL {\n\t\treturn new SQL([]);\n\t}\n\n\t/** @deprecated - use `sql.join()` */\n\texport function fromList(list: SQLChunk[]): SQL {\n\t\treturn new SQL(list);\n\t}\n\n\t/**\n\t * Convenience function to create an SQL query from a raw string.\n\t * @param str The raw SQL query string.\n\t */\n\texport function raw(str: string): SQL {\n\t\treturn new SQL([new StringChunk(str)]);\n\t}\n\n\t/**\n\t * Join a list of SQL chunks with a separator.\n\t * @example\n\t * ```ts\n\t * const query = sql.join([sql`a`, sql`b`, sql`c`]);\n\t * // sql`abc`\n\t * ```\n\t * @example\n\t * ```ts\n\t * const query = sql.join([sql`a`, sql`b`, sql`c`], sql`, `);\n\t * // sql`a, b, c`\n\t * ```\n\t */\n\texport function join(chunks: SQLChunk[], separator?: SQLChunk): SQL {\n\t\tconst result: SQLChunk[] = [];\n\t\tfor (const [i, chunk] of chunks.entries()) {\n\t\t\tif (i > 0 && separator !== undefined) {\n\t\t\t\tresult.push(separator);\n\t\t\t}\n\t\t\tresult.push(chunk);\n\t\t}\n\t\treturn new SQL(result);\n\t}\n\n\t/**\n\t * Create a SQL chunk that represents a DB identifier (table, column, index etc.).\n\t * When used in a query, the identifier will be escaped based on the DB engine.\n\t * For example, in PostgreSQL, identifiers are escaped with double quotes.\n\t *\n\t * **WARNING: This function does not offer any protection against SQL injections, so you must validate any user input beforehand.**\n\t *\n\t * @example ```ts\n\t * const query = sql`SELECT * FROM ${sql.identifier('my-table')}`;\n\t * // 'SELECT * FROM \"my-table\"'\n\t * ```\n\t */\n\texport function identifier(value: string): Name {\n\t\treturn new Name(value);\n\t}\n\n\texport function placeholder(name: TName): Placeholder {\n\t\treturn new Placeholder(name);\n\t}\n\n\texport function param(\n\t\tvalue: TData,\n\t\tencoder?: DriverValueEncoder,\n\t): Param {\n\t\treturn new Param(value, encoder);\n\t}\n}\n\nexport namespace SQL {\n\texport class Aliased implements SQLWrapper {\n\t\tstatic readonly [entityKind]: string = 'SQL.Aliased';\n\n\t\tdeclare _: {\n\t\t\tbrand: 'SQL.Aliased';\n\t\t\ttype: T;\n\t\t};\n\n\t\t/** @internal */\n\t\tisSelectionField = false;\n\n\t\tconstructor(\n\t\t\treadonly sql: SQL,\n\t\t\treadonly fieldAlias: string,\n\t\t) {}\n\n\t\tgetSQL(): SQL {\n\t\t\treturn this.sql;\n\t\t}\n\n\t\t/** @internal */\n\t\tclone() {\n\t\t\treturn new Aliased(this.sql, this.fieldAlias);\n\t\t}\n\t}\n}\n\nexport class Placeholder implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Placeholder';\n\n\tdeclare protected: TValue;\n\n\tconstructor(readonly name: TName) {}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\n/** @deprecated Use `sql.placeholder` instead. */\nexport function placeholder(name: TName): Placeholder {\n\treturn new Placeholder(name);\n}\n\nexport function fillPlaceholders(params: unknown[], values: Record): unknown[] {\n\treturn params.map((p) => {\n\t\tif (is(p, Placeholder)) {\n\t\t\tif (!(p.name in values)) {\n\t\t\t\tthrow new Error(`No value for placeholder \"${p.name}\" was provided`);\n\t\t\t}\n\n\t\t\treturn values[p.name];\n\t\t}\n\n\t\tif (is(p, Param) && is(p.value, Placeholder)) {\n\t\t\tif (!(p.value.name in values)) {\n\t\t\t\tthrow new Error(`No value for placeholder \"${p.value.name}\" was provided`);\n\t\t\t}\n\n\t\t\treturn p.encoder.mapToDriverValue(values[p.value.name]);\n\t\t}\n\n\t\treturn p;\n\t});\n}\n\nexport type ColumnsSelection = Record;\n\nconst IsDrizzleView = Symbol.for('drizzle:IsDrizzleView');\n\nexport abstract class View<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n\tTSelection extends ColumnsSelection = ColumnsSelection,\n> implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'View';\n\n\tdeclare _: {\n\t\tbrand: 'View';\n\t\tviewBrand: string;\n\t\tname: TName;\n\t\texisting: TExisting;\n\t\tselectedFields: TSelection;\n\t};\n\n\t/** @internal */\n\t[ViewBaseConfig]: {\n\t\tname: TName;\n\t\toriginalName: TName;\n\t\tschema: string | undefined;\n\t\tselectedFields: ColumnsSelection;\n\t\tisExisting: TExisting;\n\t\tquery: TExisting extends true ? undefined : SQL;\n\t\tisAlias: boolean;\n\t};\n\n\t/** @internal */\n\t[IsDrizzleView] = true;\n\n\tdeclare readonly $inferSelect: InferSelectViewModel, TExisting, TSelection>>;\n\n\tconstructor(\n\t\t{ name, schema, selectedFields, query }: {\n\t\t\tname: TName;\n\t\t\tschema: string | undefined;\n\t\t\tselectedFields: ColumnsSelection;\n\t\t\tquery: SQL | undefined;\n\t\t},\n\t) {\n\t\tthis[ViewBaseConfig] = {\n\t\t\tname,\n\t\t\toriginalName: name,\n\t\t\tschema,\n\t\t\tselectedFields,\n\t\t\tquery: query as (TExisting extends true ? undefined : SQL),\n\t\t\tisExisting: !query as TExisting,\n\t\t\tisAlias: false,\n\t\t};\n\t}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\nexport function isView(view: unknown): view is View {\n\treturn typeof view === 'object' && view !== null && IsDrizzleView in view;\n}\n\nexport function getViewName(view: T): T['_']['name'] {\n\treturn view[ViewBaseConfig].name;\n}\n\nexport type InferSelectViewModel =\n\tEqual extends true ? { [x: string]: unknown }\n\t\t: SelectResult<\n\t\t\tTView['_']['selectedFields'],\n\t\t\t'single',\n\t\t\tRecord\n\t\t>;\n\n// Defined separately from the Column class to resolve circular dependency\nColumn.prototype.getSQL = function() {\n\treturn new SQL([this]);\n};\n\n// Defined separately from the Table class to resolve circular dependency\nTable.prototype.getSQL = function() {\n\treturn new SQL([this]);\n};\n\n// Defined separately from the Column class to resolve circular dependency\nSubquery.prototype.getSQL = function() {\n\treturn new SQL([this]);\n};\n", "import type { Cache } from './cache/core/cache.ts';\nimport type { AnyColumn } from './column.ts';\nimport { Column } from './column.ts';\nimport { is } from './entity.ts';\nimport type { Logger } from './logger.ts';\nimport type { SelectedFieldsOrdered } from './operations.ts';\nimport type { TableLike } from './query-builders/select.types.ts';\nimport { Param, SQL, View } from './sql/sql.ts';\nimport type { DriverValueDecoder } from './sql/sql.ts';\nimport { Subquery } from './subquery.ts';\nimport { getTableName, Table } from './table.ts';\nimport { ViewBaseConfig } from './view-common.ts';\n\n/** @internal */\nexport function mapResultRow(\n\tcolumns: SelectedFieldsOrdered,\n\trow: unknown[],\n\tjoinsNotNullableMap: Record | undefined,\n): TResult {\n\t// Key -> nested object key, value -> table name if all fields in the nested object are from the same table, false otherwise\n\tconst nullifyMap: Record = {};\n\n\tconst result = columns.reduce>(\n\t\t(result, { path, field }, columnIndex) => {\n\t\t\tlet decoder: DriverValueDecoder;\n\t\t\tif (is(field, Column)) {\n\t\t\t\tdecoder = field;\n\t\t\t} else if (is(field, SQL)) {\n\t\t\t\tdecoder = field.decoder;\n\t\t\t} else {\n\t\t\t\tdecoder = field.sql.decoder;\n\t\t\t}\n\t\t\tlet node = result;\n\t\t\tfor (const [pathChunkIndex, pathChunk] of path.entries()) {\n\t\t\t\tif (pathChunkIndex < path.length - 1) {\n\t\t\t\t\tif (!(pathChunk in node)) {\n\t\t\t\t\t\tnode[pathChunk] = {};\n\t\t\t\t\t}\n\t\t\t\t\tnode = node[pathChunk];\n\t\t\t\t} else {\n\t\t\t\t\tconst rawValue = row[columnIndex]!;\n\t\t\t\t\tconst value = node[pathChunk] = rawValue === null ? null : decoder.mapFromDriverValue(rawValue);\n\n\t\t\t\t\tif (joinsNotNullableMap && is(field, Column) && path.length === 2) {\n\t\t\t\t\t\tconst objectName = path[0]!;\n\t\t\t\t\t\tif (!(objectName in nullifyMap)) {\n\t\t\t\t\t\t\tnullifyMap[objectName] = value === null ? getTableName(field.table) : false;\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\ttypeof nullifyMap[objectName] === 'string' && nullifyMap[objectName] !== getTableName(field.table)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tnullifyMap[objectName] = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t},\n\t\t{},\n\t);\n\n\t// Nullify all nested objects from nullifyMap that are nullable\n\tif (joinsNotNullableMap && Object.keys(nullifyMap).length > 0) {\n\t\tfor (const [objectName, tableName] of Object.entries(nullifyMap)) {\n\t\t\tif (typeof tableName === 'string' && !joinsNotNullableMap[tableName]) {\n\t\t\t\tresult[objectName] = null;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result as TResult;\n}\n\n/** @internal */\nexport function orderSelectedFields(\n\tfields: Record,\n\tpathPrefix?: string[],\n): SelectedFieldsOrdered {\n\treturn Object.entries(fields).reduce>((result, [name, field]) => {\n\t\tif (typeof name !== 'string') {\n\t\t\treturn result;\n\t\t}\n\n\t\tconst newPath = pathPrefix ? [...pathPrefix, name] : [name];\n\t\tif (is(field, Column) || is(field, SQL) || is(field, SQL.Aliased)) {\n\t\t\tresult.push({ path: newPath, field });\n\t\t} else if (is(field, Table)) {\n\t\t\tresult.push(...orderSelectedFields(field[Table.Symbol.Columns], newPath));\n\t\t} else {\n\t\t\tresult.push(...orderSelectedFields(field as Record, newPath));\n\t\t}\n\t\treturn result;\n\t}, []) as SelectedFieldsOrdered;\n}\n\nexport function haveSameKeys(left: Record, right: Record) {\n\tconst leftKeys = Object.keys(left);\n\tconst rightKeys = Object.keys(right);\n\n\tif (leftKeys.length !== rightKeys.length) {\n\t\treturn false;\n\t}\n\n\tfor (const [index, key] of leftKeys.entries()) {\n\t\tif (key !== rightKeys[index]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/** @internal */\nexport function mapUpdateSet(table: Table, values: Record): UpdateSet {\n\tconst entries: [string, UpdateSet[string]][] = Object.entries(values)\n\t\t.filter(([, value]) => value !== undefined)\n\t\t.map(([key, value]) => {\n\t\t\t// eslint-disable-next-line unicorn/prefer-ternary\n\t\t\tif (is(value, SQL) || is(value, Column)) {\n\t\t\t\treturn [key, value];\n\t\t\t} else {\n\t\t\t\treturn [key, new Param(value, table[Table.Symbol.Columns][key])];\n\t\t\t}\n\t\t});\n\n\tif (entries.length === 0) {\n\t\tthrow new Error('No values to set');\n\t}\n\n\treturn Object.fromEntries(entries);\n}\n\nexport type UpdateSet = Record;\n\nexport type OneOrMany = T | T[];\n\nexport type Update =\n\t& {\n\t\t[K in Exclude]: T[K];\n\t}\n\t& TUpdate;\n\nexport type Simplify =\n\t& {\n\t\t// @ts-ignore - \"Type parameter 'K' has a circular constraint\", not sure why\n\t\t[K in keyof T]: T[K];\n\t}\n\t& {};\n\nexport type SimplifyMappedType = [T] extends [unknown] ? T : never;\n\nexport type ShallowRecord = SimplifyMappedType<{ [P in K]: T }>;\n\nexport type Assume = T extends U ? T : U;\n\nexport type Equal = (() => T extends X ? 1 : 2) extends (() => T extends Y ? 1 : 2) ? true : false;\n\nexport interface DrizzleTypeError {\n\t$drizzleTypeError: T;\n}\n\nexport type ValueOrArray = T | T[];\n\n/** @internal */\nexport function applyMixins(baseClass: any, extendedClasses: any[]) {\n\tfor (const extendedClass of extendedClasses) {\n\t\tfor (const name of Object.getOwnPropertyNames(extendedClass.prototype)) {\n\t\t\tif (name === 'constructor') continue;\n\n\t\t\tObject.defineProperty(\n\t\t\t\tbaseClass.prototype,\n\t\t\t\tname,\n\t\t\t\tObject.getOwnPropertyDescriptor(extendedClass.prototype, name) || Object.create(null),\n\t\t\t);\n\t\t}\n\t}\n}\n\nexport type Or = T1 extends true ? true : T2 extends true ? true : false;\n\nexport type IfThenElse = If extends true ? Then : Else;\n\nexport type PromiseOf = T extends Promise ? U : T;\n\nexport type Writable = {\n\t-readonly [P in keyof T]: T[P];\n};\n\nexport type NonArray = T extends any[] ? never : T;\n\nexport function getTableColumns(table: T): T['_']['columns'] {\n\treturn table[Table.Symbol.Columns];\n}\n\nexport function getViewSelectedFields(view: T): T['_']['selectedFields'] {\n\treturn view[ViewBaseConfig].selectedFields;\n}\n\n/** @internal */\nexport function getTableLikeName(table: TableLike): string | undefined {\n\treturn is(table, Subquery)\n\t\t? table._.alias\n\t\t: is(table, View)\n\t\t? table[ViewBaseConfig].name\n\t\t: is(table, SQL)\n\t\t? undefined\n\t\t: table[Table.Symbol.IsAlias]\n\t\t? table[Table.Symbol.Name]\n\t\t: table[Table.Symbol.BaseName];\n}\n\nexport type ColumnsWithTable<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends AnyColumn<{ tableName: TTableName }>[],\n> = { [Key in keyof TColumns]: AnyColumn<{ tableName: TForeignTableName }> };\n\nexport type Casing = 'snake_case' | 'camelCase';\n\nexport interface DrizzleConfig = Record> {\n\tlogger?: boolean | Logger;\n\tschema?: TSchema;\n\tcasing?: Casing;\n\tcache?: Cache;\n}\nexport type ValidateShape = T extends ValidShape\n\t? Exclude extends never ? TResult\n\t: DrizzleTypeError<\n\t\t`Invalid key(s): ${Exclude<(keyof T) & (string | number | bigint | boolean | null | undefined), keyof ValidShape>}`\n\t>\n\t: never;\n\nexport type KnownKeysOnly = {\n\t[K in keyof T]: K extends keyof U ? T[K] : never;\n};\n\nexport type IsAny = 0 extends (1 & T) ? true : false;\n\n/** @internal */\nexport function getColumnNameAndConfig<\n\tTConfig extends Record | undefined,\n>(a: string | TConfig | undefined, b: TConfig | undefined) {\n\treturn {\n\t\tname: typeof a === 'string' && a.length > 0 ? a : '' as string,\n\t\tconfig: typeof a === 'object' ? a : b as TConfig,\n\t};\n}\n\nexport type IfNotImported = unknown extends T ? Y : N;\n\nexport type ImportTypeError =\n\t`Please install \\`${TPackageName}\\` to allow Drizzle ORM to connect to the database`;\n\nexport type RequireAtLeastOne = Keys extends any\n\t? Required> & Partial>\n\t: never;\n\ntype ExpectedConfigShape = {\n\tlogger?: boolean | {\n\t\tlogQuery(query: string, params: unknown[]): void;\n\t};\n\tschema?: Record;\n\tcasing?: 'snake_case' | 'camelCase';\n};\n\n// If this errors, you must update config shape checker function with new config specs\nconst _: DrizzleConfig = {} as ExpectedConfigShape;\nconst __: ExpectedConfigShape = {} as DrizzleConfig;\n\nexport function isConfig(data: any): boolean {\n\tif (typeof data !== 'object' || data === null) return false;\n\n\tif (data.constructor.name !== 'Object') return false;\n\n\tif ('logger' in data) {\n\t\tconst type = typeof data['logger'];\n\t\tif (\n\t\t\ttype !== 'boolean' && (type !== 'object' || typeof data['logger']['logQuery'] !== 'function')\n\t\t\t&& type !== 'undefined'\n\t\t) return false;\n\n\t\treturn true;\n\t}\n\n\tif ('schema' in data) {\n\t\tconst type = typeof data['schema'];\n\t\tif (type !== 'object' && type !== 'undefined') return false;\n\n\t\treturn true;\n\t}\n\n\tif ('casing' in data) {\n\t\tconst type = typeof data['casing'];\n\t\tif (type !== 'string' && type !== 'undefined') return false;\n\n\t\treturn true;\n\t}\n\n\tif ('mode' in data) {\n\t\tif (data['mode'] !== 'default' || data['mode'] !== 'planetscale' || data['mode'] !== undefined) return false;\n\n\t\treturn true;\n\t}\n\n\tif ('connection' in data) {\n\t\tconst type = typeof data['connection'];\n\t\tif (type !== 'string' && type !== 'object' && type !== 'undefined') return false;\n\n\t\treturn true;\n\t}\n\n\tif ('client' in data) {\n\t\tconst type = typeof data['client'];\n\t\tif (type !== 'object' && type !== 'function' && type !== 'undefined') return false;\n\n\t\treturn true;\n\t}\n\n\tif (Object.keys(data).length === 0) return true;\n\n\treturn false;\n}\n\nexport type NeonAuthToken = string | (() => string | Promise);\n\nexport const textDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder();\n", "import type { BuildColumns, BuildExtraConfigColumns } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport { Table, type TableConfig as TableConfigBase, type UpdateTableConfig } from '~/table.ts';\nimport type { CheckBuilder } from './checks.ts';\nimport { getPgColumnBuilders, type PgColumnsBuilders } from './columns/all.ts';\nimport type { ExtraConfigColumn, PgColumn, PgColumnBuilder, PgColumnBuilderBase } from './columns/common.ts';\nimport type { ForeignKey, ForeignKeyBuilder } from './foreign-keys.ts';\nimport type { AnyIndexBuilder } from './indexes.ts';\nimport type { PgPolicy } from './policies.ts';\nimport type { PrimaryKeyBuilder } from './primary-keys.ts';\nimport type { UniqueConstraintBuilder } from './unique-constraint.ts';\n\nexport type PgTableExtraConfigValue =\n\t| AnyIndexBuilder\n\t| CheckBuilder\n\t| ForeignKeyBuilder\n\t| PrimaryKeyBuilder\n\t| UniqueConstraintBuilder\n\t| PgPolicy;\n\nexport type PgTableExtraConfig = Record<\n\tstring,\n\tPgTableExtraConfigValue\n>;\n\nexport type TableConfig = TableConfigBase;\n\n/** @internal */\nexport const InlineForeignKeys = Symbol.for('drizzle:PgInlineForeignKeys');\n/** @internal */\nexport const EnableRLS = Symbol.for('drizzle:EnableRLS');\n\nexport class PgTable extends Table {\n\tstatic override readonly [entityKind]: string = 'PgTable';\n\n\t/** @internal */\n\tstatic override readonly Symbol = Object.assign({}, Table.Symbol, {\n\t\tInlineForeignKeys: InlineForeignKeys as typeof InlineForeignKeys,\n\t\tEnableRLS: EnableRLS as typeof EnableRLS,\n\t});\n\n\t/**@internal */\n\t[InlineForeignKeys]: ForeignKey[] = [];\n\n\t/** @internal */\n\t[EnableRLS]: boolean = false;\n\n\t/** @internal */\n\toverride [Table.Symbol.ExtraConfigBuilder]: ((self: Record) => PgTableExtraConfig) | undefined =\n\t\tundefined;\n\n\t/** @internal */\n\toverride [Table.Symbol.ExtraConfigColumns]: Record = {};\n}\n\nexport type AnyPgTable = {}> = PgTable>;\n\nexport type PgTableWithColumns =\n\t& PgTable\n\t& {\n\t\t[Key in keyof T['columns']]: T['columns'][Key];\n\t}\n\t& {\n\t\tenableRLS: () => Omit<\n\t\t\tPgTableWithColumns,\n\t\t\t'enableRLS'\n\t\t>;\n\t};\n\n/** @internal */\nexport function pgTableWithSchema<\n\tTTableName extends string,\n\tTSchemaName extends string | undefined,\n\tTColumnsMap extends Record,\n>(\n\tname: TTableName,\n\tcolumns: TColumnsMap | ((columnTypes: PgColumnsBuilders) => TColumnsMap),\n\textraConfig:\n\t\t| ((self: BuildExtraConfigColumns) => PgTableExtraConfig | PgTableExtraConfigValue[])\n\t\t| undefined,\n\tschema: TSchemaName,\n\tbaseName = name,\n): PgTableWithColumns<{\n\tname: TTableName;\n\tschema: TSchemaName;\n\tcolumns: BuildColumns;\n\tdialect: 'pg';\n}> {\n\tconst rawTable = new PgTable<{\n\t\tname: TTableName;\n\t\tschema: TSchemaName;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>(name, schema, baseName);\n\n\tconst parsedColumns: TColumnsMap = typeof columns === 'function' ? columns(getPgColumnBuilders()) : columns;\n\n\tconst builtColumns = Object.fromEntries(\n\t\tObject.entries(parsedColumns).map(([name, colBuilderBase]) => {\n\t\t\tconst colBuilder = colBuilderBase as PgColumnBuilder;\n\t\t\tcolBuilder.setName(name);\n\t\t\tconst column = colBuilder.build(rawTable);\n\t\t\trawTable[InlineForeignKeys].push(...colBuilder.buildForeignKeys(column, rawTable));\n\t\t\treturn [name, column];\n\t\t}),\n\t) as unknown as BuildColumns;\n\n\tconst builtColumnsForExtraConfig = Object.fromEntries(\n\t\tObject.entries(parsedColumns).map(([name, colBuilderBase]) => {\n\t\t\tconst colBuilder = colBuilderBase as PgColumnBuilder;\n\t\t\tcolBuilder.setName(name);\n\t\t\tconst column = colBuilder.buildExtraConfigColumn(rawTable);\n\t\t\treturn [name, column];\n\t\t}),\n\t) as unknown as BuildExtraConfigColumns;\n\n\tconst table = Object.assign(rawTable, builtColumns);\n\n\ttable[Table.Symbol.Columns] = builtColumns;\n\ttable[Table.Symbol.ExtraConfigColumns] = builtColumnsForExtraConfig;\n\n\tif (extraConfig) {\n\t\ttable[PgTable.Symbol.ExtraConfigBuilder] = extraConfig as any;\n\t}\n\n\treturn Object.assign(table, {\n\t\tenableRLS: () => {\n\t\t\ttable[PgTable.Symbol.EnableRLS] = true;\n\t\t\treturn table as PgTableWithColumns<{\n\t\t\t\tname: TTableName;\n\t\t\t\tschema: TSchemaName;\n\t\t\t\tcolumns: BuildColumns;\n\t\t\t\tdialect: 'pg';\n\t\t\t}>;\n\t\t},\n\t});\n}\n\nexport interface PgTableFn {\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: TColumnsMap,\n\t\textraConfig?: (\n\t\t\tself: BuildExtraConfigColumns,\n\t\t) => PgTableExtraConfigValue[],\n\t): PgTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>;\n\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: (columnTypes: PgColumnsBuilders) => TColumnsMap,\n\t\textraConfig?: (self: BuildExtraConfigColumns) => PgTableExtraConfigValue[],\n\t): PgTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>;\n\t/**\n\t * @deprecated The third parameter of pgTable is changing and will only accept an array instead of an object\n\t *\n\t * @example\n\t * Deprecated version:\n\t * ```ts\n\t * export const users = pgTable(\"users\", {\n\t * \tid: integer(),\n\t * }, (t) => ({\n\t * \tidx: index('custom_name').on(t.id)\n\t * }));\n\t * ```\n\t *\n\t * New API:\n\t * ```ts\n\t * export const users = pgTable(\"users\", {\n\t * \tid: integer(),\n\t * }, (t) => [\n\t * \tindex('custom_name').on(t.id)\n\t * ]);\n\t * ```\n\t */\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: TColumnsMap,\n\t\textraConfig: (\n\t\t\tself: BuildExtraConfigColumns,\n\t\t) => PgTableExtraConfig,\n\t): PgTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>;\n\n\t/**\n\t * @deprecated The third parameter of pgTable is changing and will only accept an array instead of an object\n\t *\n\t * @example\n\t * Deprecated version:\n\t * ```ts\n\t * export const users = pgTable(\"users\", {\n\t * \tid: integer(),\n\t * }, (t) => ({\n\t * \tidx: index('custom_name').on(t.id)\n\t * }));\n\t * ```\n\t *\n\t * New API:\n\t * ```ts\n\t * export const users = pgTable(\"users\", {\n\t * \tid: integer(),\n\t * }, (t) => [\n\t * \tindex('custom_name').on(t.id)\n\t * ]);\n\t * ```\n\t */\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: (columnTypes: PgColumnsBuilders) => TColumnsMap,\n\t\textraConfig: (self: BuildExtraConfigColumns) => PgTableExtraConfig,\n\t): PgTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>;\n}\n\nexport const pgTable: PgTableFn = (name, columns, extraConfig) => {\n\treturn pgTableWithSchema(name, columns, extraConfig, undefined);\n};\n\nexport function pgTableCreator(customizeTableName: (name: string) => string): PgTableFn {\n\treturn (name, columns, extraConfig) => {\n\t\treturn pgTableWithSchema(customizeTableName(name) as typeof name, columns, extraConfig, undefined, name);\n\t};\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { AnyPgColumn, PgColumn } from './columns/index.ts';\nimport { PgTable } from './table.ts';\n\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumn extends AnyPgColumn<{ tableName: TTableName }>,\n\tTColumns extends AnyPgColumn<{ tableName: TTableName }>[],\n>(config: { name?: string; columns: [TColumn, ...TColumns] }): PrimaryKeyBuilder;\n/**\n * @deprecated: Please use primaryKey({ columns: [] }) instead of this function\n * @param columns\n */\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumns extends AnyPgColumn<{ tableName: TTableName }>[],\n>(...columns: TColumns): PrimaryKeyBuilder;\nexport function primaryKey(...config: any) {\n\tif (config[0].columns) {\n\t\treturn new PrimaryKeyBuilder(config[0].columns, config[0].name);\n\t}\n\treturn new PrimaryKeyBuilder(config);\n}\n\nexport class PrimaryKeyBuilder {\n\tstatic readonly [entityKind]: string = 'PgPrimaryKeyBuilder';\n\n\t/** @internal */\n\tcolumns: PgColumn[];\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tcolumns: PgColumn[],\n\t\tname?: string,\n\t) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\t/** @internal */\n\tbuild(table: PgTable): PrimaryKey {\n\t\treturn new PrimaryKey(table, this.columns, this.name);\n\t}\n}\n\nexport class PrimaryKey {\n\tstatic readonly [entityKind]: string = 'PgPrimaryKey';\n\n\treadonly columns: AnyPgColumn<{}>[];\n\treadonly name?: string;\n\n\tconstructor(readonly table: PgTable, columns: AnyPgColumn<{}>[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\tgetName(): string {\n\t\treturn this.name ?? `${this.table[PgTable.Symbol.Name]}_${this.columns.map((column) => column.name).join('_')}_pk`;\n\t}\n}\n", "import { type AnyColumn, Column, type GetColumnData } from '~/column.ts';\nimport { is } from '~/entity.ts';\nimport { Table } from '~/table.ts';\nimport {\n\tisDriverValueEncoder,\n\tisSQLWrapper,\n\tParam,\n\tPlaceholder,\n\tSQL,\n\tsql,\n\ttype SQLChunk,\n\ttype SQLWrapper,\n\tStringChunk,\n\tView,\n} from '../sql.ts';\n\nexport function bindIfParam(value: unknown, column: SQLWrapper): SQLChunk {\n\tif (\n\t\tisDriverValueEncoder(column)\n\t\t&& !isSQLWrapper(value)\n\t\t&& !is(value, Param)\n\t\t&& !is(value, Placeholder)\n\t\t&& !is(value, Column)\n\t\t&& !is(value, Table)\n\t\t&& !is(value, View)\n\t) {\n\t\treturn new Param(value, column);\n\t}\n\treturn value as SQLChunk;\n}\n\nexport interface BinaryOperator {\n\t(\n\t\tleft: TColumn,\n\t\tright: GetColumnData | SQLWrapper,\n\t): SQL;\n\t(left: SQL.Aliased, right: T | SQLWrapper): SQL;\n\t(\n\t\tleft: Exclude,\n\t\tright: unknown,\n\t): SQL;\n}\n\n/**\n * Test that two values are equal.\n *\n * Remember that the SQL standard dictates that\n * two NULL values are not equal, so if you want to test\n * whether a value is null, you may want to use\n * `isNull` instead.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made by Ford\n * db.select().from(cars)\n * .where(eq(cars.make, 'Ford'))\n * ```\n *\n * @see isNull for a way to test equality to NULL.\n */\nexport const eq: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} = ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test that two values are not equal.\n *\n * Remember that the SQL standard dictates that\n * two NULL values are not equal, so if you want to test\n * whether a value is not null, you may want to use\n * `isNotNull` instead.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars not made by Ford\n * db.select().from(cars)\n * .where(ne(cars.make, 'Ford'))\n * ```\n *\n * @see isNotNull for a way to test whether a value is not null.\n */\nexport const ne: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} <> ${bindIfParam(right, left)}`;\n};\n\n/**\n * Combine a list of conditions with the `and` operator. Conditions\n * that are equal `undefined` are automatically ignored.\n *\n * ## Examples\n *\n * ```ts\n * db.select().from(cars)\n * .where(\n * and(\n * eq(cars.make, 'Volvo'),\n * eq(cars.year, 1950),\n * )\n * )\n * ```\n */\nexport function and(...conditions: (SQLWrapper | undefined)[]): SQL | undefined;\nexport function and(\n\t...unfilteredConditions: (SQLWrapper | undefined)[]\n): SQL | undefined {\n\tconst conditions = unfilteredConditions.filter(\n\t\t(c): c is Exclude => c !== undefined,\n\t);\n\n\tif (conditions.length === 0) {\n\t\treturn undefined;\n\t}\n\n\tif (conditions.length === 1) {\n\t\treturn new SQL(conditions);\n\t}\n\n\treturn new SQL([\n\t\tnew StringChunk('('),\n\t\tsql.join(conditions, new StringChunk(' and ')),\n\t\tnew StringChunk(')'),\n\t]);\n}\n\n/**\n * Combine a list of conditions with the `or` operator. Conditions\n * that are equal `undefined` are automatically ignored.\n *\n * ## Examples\n *\n * ```ts\n * db.select().from(cars)\n * .where(\n * or(\n * eq(cars.make, 'GM'),\n * eq(cars.make, 'Ford'),\n * )\n * )\n * ```\n */\nexport function or(...conditions: (SQLWrapper | undefined)[]): SQL | undefined;\nexport function or(\n\t...unfilteredConditions: (SQLWrapper | undefined)[]\n): SQL | undefined {\n\tconst conditions = unfilteredConditions.filter(\n\t\t(c): c is Exclude => c !== undefined,\n\t);\n\n\tif (conditions.length === 0) {\n\t\treturn undefined;\n\t}\n\n\tif (conditions.length === 1) {\n\t\treturn new SQL(conditions);\n\t}\n\n\treturn new SQL([\n\t\tnew StringChunk('('),\n\t\tsql.join(conditions, new StringChunk(' or ')),\n\t\tnew StringChunk(')'),\n\t]);\n}\n\n/**\n * Negate the meaning of an expression using the `not` keyword.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars _not_ made by GM or Ford.\n * db.select().from(cars)\n * .where(not(inArray(cars.make, ['GM', 'Ford'])))\n * ```\n */\nexport function not(condition: SQLWrapper): SQL {\n\treturn sql`not ${condition}`;\n}\n\n/**\n * Test that the first expression passed is greater than\n * the second expression.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made after 2000.\n * db.select().from(cars)\n * .where(gt(cars.year, 2000))\n * ```\n *\n * @see gte for greater-than-or-equal\n */\nexport const gt: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} > ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test that the first expression passed is greater than\n * or equal to the second expression. Use `gt` to\n * test whether an expression is strictly greater\n * than another.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made on or after 2000.\n * db.select().from(cars)\n * .where(gte(cars.year, 2000))\n * ```\n *\n * @see gt for a strictly greater-than condition\n */\nexport const gte: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} >= ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test that the first expression passed is less than\n * the second expression.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made before 2000.\n * db.select().from(cars)\n * .where(lt(cars.year, 2000))\n * ```\n *\n * @see lte for less-than-or-equal\n */\nexport const lt: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} < ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test that the first expression passed is less than\n * or equal to the second expression.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made before 2000.\n * db.select().from(cars)\n * .where(lte(cars.year, 2000))\n * ```\n *\n * @see lt for a strictly less-than condition\n */\nexport const lte: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} <= ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test whether the first parameter, a column or expression,\n * has a value from a list passed as the second argument.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made by Ford or GM.\n * db.select().from(cars)\n * .where(inArray(cars.make, ['Ford', 'GM']))\n * ```\n *\n * @see notInArray for the inverse of this test\n */\nexport function inArray(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function inArray(\n\tcolumn: TColumn,\n\tvalues: ReadonlyArray | Placeholder> | SQLWrapper,\n): SQL;\nexport function inArray(\n\tcolumn: Exclude,\n\tvalues: ReadonlyArray | SQLWrapper,\n): SQL;\nexport function inArray(\n\tcolumn: SQLWrapper,\n\tvalues: ReadonlyArray | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\treturn sql`false`;\n\t\t}\n\t\treturn sql`${column} in ${values.map((v) => bindIfParam(v, column))}`;\n\t}\n\n\treturn sql`${column} in ${bindIfParam(values, column)}`;\n}\n\n/**\n * Test whether the first parameter, a column or expression,\n * has a value that is not present in a list passed as the\n * second argument.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made by any company except Ford or GM.\n * db.select().from(cars)\n * .where(notInArray(cars.make, ['Ford', 'GM']))\n * ```\n *\n * @see inArray for the inverse of this test\n */\nexport function notInArray(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function notInArray(\n\tcolumn: TColumn,\n\tvalues: (GetColumnData | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function notInArray(\n\tcolumn: Exclude,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function notInArray(\n\tcolumn: SQLWrapper,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\treturn sql`true`;\n\t\t}\n\t\treturn sql`${column} not in ${values.map((v) => bindIfParam(v, column))}`;\n\t}\n\n\treturn sql`${column} not in ${bindIfParam(values, column)}`;\n}\n\n/**\n * Test whether an expression is NULL. By the SQL standard,\n * NULL is neither equal nor not equal to itself, so\n * it's recommended to use `isNull` and `notIsNull` for\n * comparisons to NULL.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars that have no discontinuedAt date.\n * db.select().from(cars)\n * .where(isNull(cars.discontinuedAt))\n * ```\n *\n * @see isNotNull for the inverse of this test\n */\nexport function isNull(value: SQLWrapper): SQL {\n\treturn sql`${value} is null`;\n}\n\n/**\n * Test whether an expression is not NULL. By the SQL standard,\n * NULL is neither equal nor not equal to itself, so\n * it's recommended to use `isNull` and `notIsNull` for\n * comparisons to NULL.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars that have been discontinued.\n * db.select().from(cars)\n * .where(isNotNull(cars.discontinuedAt))\n * ```\n *\n * @see isNull for the inverse of this test\n */\nexport function isNotNull(value: SQLWrapper): SQL {\n\treturn sql`${value} is not null`;\n}\n\n/**\n * Test whether a subquery evaluates to have any rows.\n *\n * ## Examples\n *\n * ```ts\n * // Users whose `homeCity` column has a match in a cities\n * // table.\n * db\n * .select()\n * .from(users)\n * .where(\n * exists(db.select()\n * .from(cities)\n * .where(eq(users.homeCity, cities.id))),\n * );\n * ```\n *\n * @see notExists for the inverse of this test\n */\nexport function exists(subquery: SQLWrapper): SQL {\n\treturn sql`exists ${subquery}`;\n}\n\n/**\n * Test whether a subquery doesn't include any result\n * rows.\n *\n * ## Examples\n *\n * ```ts\n * // Users whose `homeCity` column doesn't match\n * // a row in the cities table.\n * db\n * .select()\n * .from(users)\n * .where(\n * notExists(db.select()\n * .from(cities)\n * .where(eq(users.homeCity, cities.id))),\n * );\n * ```\n *\n * @see exists for the inverse of this test\n */\nexport function notExists(subquery: SQLWrapper): SQL {\n\treturn sql`not exists ${subquery}`;\n}\n\n/**\n * Test whether an expression is between two values. This\n * is an easier way to express range tests, which would be\n * expressed mathematically as `x <= a <= y` but in SQL\n * would have to be like `a >= x AND a <= y`.\n *\n * Between is inclusive of the endpoints: if `column`\n * is equal to `min` or `max`, it will be TRUE.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made between 1990 and 2000\n * db.select().from(cars)\n * .where(between(cars.year, 1990, 2000))\n * ```\n *\n * @see notBetween for the inverse of this test\n */\nexport function between(\n\tcolumn: SQL.Aliased,\n\tmin: T | SQLWrapper,\n\tmax: T | SQLWrapper,\n): SQL;\nexport function between(\n\tcolumn: TColumn,\n\tmin: GetColumnData | SQLWrapper,\n\tmax: GetColumnData | SQLWrapper,\n): SQL;\nexport function between(\n\tcolumn: Exclude,\n\tmin: unknown,\n\tmax: unknown,\n): SQL;\nexport function between(column: SQLWrapper, min: unknown, max: unknown): SQL {\n\treturn sql`${column} between ${bindIfParam(min, column)} and ${\n\t\tbindIfParam(\n\t\t\tmax,\n\t\t\tcolumn,\n\t\t)\n\t}`;\n}\n\n/**\n * Test whether an expression is not between two values.\n *\n * This, like `between`, includes its endpoints, so if\n * the `column` is equal to `min` or `max`, in this case\n * it will evaluate to FALSE.\n *\n * ## Examples\n *\n * ```ts\n * // Exclude cars made in the 1970s\n * db.select().from(cars)\n * .where(notBetween(cars.year, 1970, 1979))\n * ```\n *\n * @see between for the inverse of this test\n */\nexport function notBetween(\n\tcolumn: SQL.Aliased,\n\tmin: T | SQLWrapper,\n\tmax: T | SQLWrapper,\n): SQL;\nexport function notBetween(\n\tcolumn: TColumn,\n\tmin: GetColumnData | SQLWrapper,\n\tmax: GetColumnData | SQLWrapper,\n): SQL;\nexport function notBetween(\n\tcolumn: Exclude,\n\tmin: unknown,\n\tmax: unknown,\n): SQL;\nexport function notBetween(\n\tcolumn: SQLWrapper,\n\tmin: unknown,\n\tmax: unknown,\n): SQL {\n\treturn sql`${column} not between ${\n\t\tbindIfParam(\n\t\t\tmin,\n\t\t\tcolumn,\n\t\t)\n\t} and ${bindIfParam(max, column)}`;\n}\n\n/**\n * Compare a column to a pattern, which can include `%` and `_`\n * characters to match multiple variations. Including `%`\n * in the pattern matches zero or more characters, and including\n * `_` will match a single character.\n *\n * ## Examples\n *\n * ```ts\n * // Select all cars with 'Turbo' in their names.\n * db.select().from(cars)\n * .where(like(cars.name, '%Turbo%'))\n * ```\n *\n * @see ilike for a case-insensitive version of this condition\n */\nexport function like(column: Column | SQL.Aliased | SQL, value: string | SQLWrapper): SQL {\n\treturn sql`${column} like ${value}`;\n}\n\n/**\n * The inverse of like - this tests that a given column\n * does not match a pattern, which can include `%` and `_`\n * characters to match multiple variations. Including `%`\n * in the pattern matches zero or more characters, and including\n * `_` will match a single character.\n *\n * ## Examples\n *\n * ```ts\n * // Select all cars that don't have \"ROver\" in their name.\n * db.select().from(cars)\n * .where(notLike(cars.name, '%Rover%'))\n * ```\n *\n * @see like for the inverse condition\n * @see notIlike for a case-insensitive version of this condition\n */\nexport function notLike(column: Column | SQL.Aliased | SQL, value: string | SQLWrapper): SQL {\n\treturn sql`${column} not like ${value}`;\n}\n\n/**\n * Case-insensitively compare a column to a pattern,\n * which can include `%` and `_`\n * characters to match multiple variations. Including `%`\n * in the pattern matches zero or more characters, and including\n * `_` will match a single character.\n *\n * Unlike like, this performs a case-insensitive comparison.\n *\n * ## Examples\n *\n * ```ts\n * // Select all cars with 'Turbo' in their names.\n * db.select().from(cars)\n * .where(ilike(cars.name, '%Turbo%'))\n * ```\n *\n * @see like for a case-sensitive version of this condition\n */\nexport function ilike(column: Column | SQL.Aliased | SQL, value: string | SQLWrapper): SQL {\n\treturn sql`${column} ilike ${value}`;\n}\n\n/**\n * The inverse of ilike - this case-insensitively tests that a given column\n * does not match a pattern, which can include `%` and `_`\n * characters to match multiple variations. Including `%`\n * in the pattern matches zero or more characters, and including\n * `_` will match a single character.\n *\n * ## Examples\n *\n * ```ts\n * // Select all cars that don't have \"Rover\" in their name.\n * db.select().from(cars)\n * .where(notLike(cars.name, '%Rover%'))\n * ```\n *\n * @see ilike for the inverse condition\n * @see notLike for a case-sensitive version of this condition\n */\nexport function notIlike(column: Column | SQL.Aliased | SQL, value: string | SQLWrapper): SQL {\n\treturn sql`${column} not ilike ${value}`;\n}\n\n/**\n * Test that a column or expression contains all elements of\n * the list passed as the second argument.\n *\n * ## Throws\n *\n * The argument passed in the second array can't be empty:\n * if an empty is provided, this method will throw.\n *\n * ## Examples\n *\n * ```ts\n * // Select posts where its tags contain \"Typescript\" and \"ORM\".\n * db.select().from(posts)\n * .where(arrayContains(posts.tags, ['Typescript', 'ORM']))\n * ```\n *\n * @see arrayContained to find if an array contains all elements of a column or expression\n * @see arrayOverlaps to find if a column or expression contains any elements of an array\n */\nexport function arrayContains(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayContains(\n\tcolumn: TColumn,\n\tvalues: (GetColumnData | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayContains(\n\tcolumn: Exclude,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function arrayContains(\n\tcolumn: SQLWrapper,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\tthrow new Error('arrayContains requires at least one value');\n\t\t}\n\t\tconst array = sql`${bindIfParam(values, column)}`;\n\t\treturn sql`${column} @> ${array}`;\n\t}\n\n\treturn sql`${column} @> ${bindIfParam(values, column)}`;\n}\n\n/**\n * Test that the list passed as the second argument contains\n * all elements of a column or expression.\n *\n * ## Throws\n *\n * The argument passed in the second array can't be empty:\n * if an empty is provided, this method will throw.\n *\n * ## Examples\n *\n * ```ts\n * // Select posts where its tags contain \"Typescript\", \"ORM\" or both,\n * // but filtering posts that have additional tags.\n * db.select().from(posts)\n * .where(arrayContained(posts.tags, ['Typescript', 'ORM']))\n * ```\n *\n * @see arrayContains to find if a column or expression contains all elements of an array\n * @see arrayOverlaps to find if a column or expression contains any elements of an array\n */\nexport function arrayContained(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayContained(\n\tcolumn: TColumn,\n\tvalues: (GetColumnData | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayContained(\n\tcolumn: Exclude,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function arrayContained(\n\tcolumn: SQLWrapper,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\tthrow new Error('arrayContained requires at least one value');\n\t\t}\n\t\tconst array = sql`${bindIfParam(values, column)}`;\n\t\treturn sql`${column} <@ ${array}`;\n\t}\n\n\treturn sql`${column} <@ ${bindIfParam(values, column)}`;\n}\n\n/**\n * Test that a column or expression contains any elements of\n * the list passed as the second argument.\n *\n * ## Throws\n *\n * The argument passed in the second array can't be empty:\n * if an empty is provided, this method will throw.\n *\n * ## Examples\n *\n * ```ts\n * // Select posts where its tags contain \"Typescript\", \"ORM\" or both.\n * db.select().from(posts)\n * .where(arrayOverlaps(posts.tags, ['Typescript', 'ORM']))\n * ```\n *\n * @see arrayContains to find if a column or expression contains all elements of an array\n * @see arrayContained to find if an array contains all elements of a column or expression\n */\nexport function arrayOverlaps(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayOverlaps(\n\tcolumn: TColumn,\n\tvalues: (GetColumnData | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayOverlaps(\n\tcolumn: Exclude,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function arrayOverlaps(\n\tcolumn: SQLWrapper,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\tthrow new Error('arrayOverlaps requires at least one value');\n\t\t}\n\t\tconst array = sql`${bindIfParam(values, column)}`;\n\t\treturn sql`${column} && ${array}`;\n\t}\n\n\treturn sql`${column} && ${bindIfParam(values, column)}`;\n}\n", "import type { AnyColumn } from '../../column.ts';\nimport type { SQL, SQLWrapper } from '../sql.ts';\nimport { sql } from '../sql.ts';\n\n/**\n * Used in sorting, this specifies that the given\n * column or expression should be sorted in ascending\n * order. By the SQL standard, ascending order is the\n * default, so it is not usually necessary to specify\n * ascending sort order.\n *\n * ## Examples\n *\n * ```ts\n * // Return cars, starting with the oldest models\n * // and going in ascending order to the newest.\n * db.select().from(cars)\n * .orderBy(asc(cars.year));\n * ```\n *\n * @see desc to sort in descending order\n */\nexport function asc(column: AnyColumn | SQLWrapper): SQL {\n\treturn sql`${column} asc`;\n}\n\n/**\n * Used in sorting, this specifies that the given\n * column or expression should be sorted in descending\n * order.\n *\n * ## Examples\n *\n * ```ts\n * // Select users, with the most recently created\n * // records coming first.\n * db.select().from(users)\n * .orderBy(desc(users.createdAt));\n * ```\n *\n * @see asc to sort in ascending order\n */\nexport function desc(column: AnyColumn | SQLWrapper): SQL {\n\treturn sql`${column} desc`;\n}\n", "export * from './conditions.ts';\nexport * from './select.ts';\n", "import { type AnyTable, getTableUniqueName, type InferModelFromColumns, Table } from '~/table.ts';\nimport { type AnyColumn, Column } from './column.ts';\nimport { entityKind, is } from './entity.ts';\nimport { PrimaryKeyBuilder } from './pg-core/primary-keys.ts';\nimport {\n\tand,\n\tasc,\n\tbetween,\n\tdesc,\n\teq,\n\texists,\n\tgt,\n\tgte,\n\tilike,\n\tinArray,\n\tisNotNull,\n\tisNull,\n\tlike,\n\tlt,\n\tlte,\n\tne,\n\tnot,\n\tnotBetween,\n\tnotExists,\n\tnotIlike,\n\tnotInArray,\n\tnotLike,\n\tor,\n} from './sql/expressions/index.ts';\nimport { type Placeholder, SQL, sql } from './sql/sql.ts';\nimport type { Assume, ColumnsWithTable, Equal, Simplify, ValueOrArray } from './utils.ts';\n\nexport abstract class Relation {\n\tstatic readonly [entityKind]: string = 'Relation';\n\n\tdeclare readonly $brand: 'Relation';\n\treadonly referencedTableName: TTableName;\n\tfieldName!: string;\n\n\tconstructor(\n\t\treadonly sourceTable: Table,\n\t\treadonly referencedTable: AnyTable<{ name: TTableName }>,\n\t\treadonly relationName: string | undefined,\n\t) {\n\t\tthis.referencedTableName = referencedTable[Table.Symbol.Name] as TTableName;\n\t}\n\n\tabstract withFieldName(fieldName: string): Relation;\n}\n\nexport class Relations<\n\tTTableName extends string = string,\n\tTConfig extends Record = Record,\n> {\n\tstatic readonly [entityKind]: string = 'Relations';\n\n\tdeclare readonly $brand: 'Relations';\n\n\tconstructor(\n\t\treadonly table: AnyTable<{ name: TTableName }>,\n\t\treadonly config: (helpers: TableRelationsHelpers) => TConfig,\n\t) {}\n}\n\nexport class One<\n\tTTableName extends string = string,\n\tTIsNullable extends boolean = boolean,\n> extends Relation {\n\tstatic override readonly [entityKind]: string = 'One';\n\n\tdeclare protected $relationBrand: 'One';\n\n\tconstructor(\n\t\tsourceTable: Table,\n\t\treferencedTable: AnyTable<{ name: TTableName }>,\n\t\treadonly config:\n\t\t\t| RelationConfig<\n\t\t\t\tTTableName,\n\t\t\t\tstring,\n\t\t\t\tAnyColumn<{ tableName: TTableName }>[]\n\t\t\t>\n\t\t\t| undefined,\n\t\treadonly isNullable: TIsNullable,\n\t) {\n\t\tsuper(sourceTable, referencedTable, config?.relationName);\n\t}\n\n\twithFieldName(fieldName: string): One {\n\t\tconst relation = new One(\n\t\t\tthis.sourceTable,\n\t\t\tthis.referencedTable,\n\t\t\tthis.config,\n\t\t\tthis.isNullable,\n\t\t);\n\t\trelation.fieldName = fieldName;\n\t\treturn relation;\n\t}\n}\n\nexport class Many extends Relation {\n\tstatic override readonly [entityKind]: string = 'Many';\n\n\tdeclare protected $relationBrand: 'Many';\n\n\tconstructor(\n\t\tsourceTable: Table,\n\t\treferencedTable: AnyTable<{ name: TTableName }>,\n\t\treadonly config: { relationName: string } | undefined,\n\t) {\n\t\tsuper(sourceTable, referencedTable, config?.relationName);\n\t}\n\n\twithFieldName(fieldName: string): Many {\n\t\tconst relation = new Many(\n\t\t\tthis.sourceTable,\n\t\t\tthis.referencedTable,\n\t\t\tthis.config,\n\t\t);\n\t\trelation.fieldName = fieldName;\n\t\treturn relation;\n\t}\n}\n\nexport type TableRelationsKeysOnly<\n\tTSchema extends Record,\n\tTTableName extends string,\n\tK extends keyof TSchema,\n> = TSchema[K] extends Relations ? K : never;\n\nexport type ExtractTableRelationsFromSchema<\n\tTSchema extends Record,\n\tTTableName extends string,\n> = ExtractObjectValues<\n\t{\n\t\t[\n\t\t\tK in keyof TSchema as TableRelationsKeysOnly<\n\t\t\t\tTSchema,\n\t\t\t\tTTableName,\n\t\t\t\tK\n\t\t\t>\n\t\t]: TSchema[K] extends Relations ? TConfig : never;\n\t}\n>;\n\nexport type ExtractObjectValues = T[keyof T];\n\nexport type ExtractRelationsFromTableExtraConfigSchema<\n\tTConfig extends unknown[],\n> = ExtractObjectValues<\n\t{\n\t\t[\n\t\t\tK in keyof TConfig as TConfig[K] extends Relations ? K\n\t\t\t\t: never\n\t\t]: TConfig[K] extends Relations ? TRelationConfig\n\t\t\t: never;\n\t}\n>;\n\nexport function getOperators() {\n\treturn {\n\t\tand,\n\t\tbetween,\n\t\teq,\n\t\texists,\n\t\tgt,\n\t\tgte,\n\t\tilike,\n\t\tinArray,\n\t\tisNull,\n\t\tisNotNull,\n\t\tlike,\n\t\tlt,\n\t\tlte,\n\t\tne,\n\t\tnot,\n\t\tnotBetween,\n\t\tnotExists,\n\t\tnotLike,\n\t\tnotIlike,\n\t\tnotInArray,\n\t\tor,\n\t\tsql,\n\t};\n}\n\nexport type Operators = ReturnType;\n\nexport function getOrderByOperators() {\n\treturn {\n\t\tsql,\n\t\tasc,\n\t\tdesc,\n\t};\n}\n\nexport type OrderByOperators = ReturnType;\n\nexport type FindTableByDBName<\n\tTSchema extends TablesRelationalConfig,\n\tTTableName extends string,\n> = ExtractObjectValues<\n\t{\n\t\t[\n\t\t\tK in keyof TSchema as TSchema[K]['dbName'] extends TTableName ? K\n\t\t\t\t: never\n\t\t]: TSchema[K];\n\t}\n>;\n\nexport type DBQueryConfig<\n\tTRelationType extends 'one' | 'many' = 'one' | 'many',\n\tTIsRoot extends boolean = boolean,\n\tTSchema extends TablesRelationalConfig = TablesRelationalConfig,\n\tTTableConfig extends TableRelationalConfig = TableRelationalConfig,\n> =\n\t& {\n\t\tcolumns?:\n\t\t\t| {\n\t\t\t\t[K in keyof TTableConfig['columns']]?: boolean;\n\t\t\t}\n\t\t\t| undefined;\n\t\twith?:\n\t\t\t| {\n\t\t\t\t[K in keyof TTableConfig['relations']]?:\n\t\t\t\t\t| true\n\t\t\t\t\t| DBQueryConfig<\n\t\t\t\t\t\tTTableConfig['relations'][K] extends One ? 'one' : 'many',\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\tTSchema,\n\t\t\t\t\t\tFindTableByDBName<\n\t\t\t\t\t\t\tTSchema,\n\t\t\t\t\t\t\tTTableConfig['relations'][K]['referencedTableName']\n\t\t\t\t\t\t>\n\t\t\t\t\t>\n\t\t\t\t\t| undefined;\n\t\t\t}\n\t\t\t| undefined;\n\t\textras?:\n\t\t\t| Record\n\t\t\t| ((\n\t\t\t\tfields: Simplify<\n\t\t\t\t\t[TTableConfig['columns']] extends [never] ? {}\n\t\t\t\t\t\t: TTableConfig['columns']\n\t\t\t\t>,\n\t\t\t\toperators: { sql: Operators['sql'] },\n\t\t\t) => Record)\n\t\t\t| undefined;\n\t}\n\t& (TRelationType extends 'many' ?\n\t\t\t& {\n\t\t\t\twhere?:\n\t\t\t\t\t| SQL\n\t\t\t\t\t| undefined\n\t\t\t\t\t| ((\n\t\t\t\t\t\tfields: Simplify<\n\t\t\t\t\t\t\t[TTableConfig['columns']] extends [never] ? {}\n\t\t\t\t\t\t\t\t: TTableConfig['columns']\n\t\t\t\t\t\t>,\n\t\t\t\t\t\toperators: Operators,\n\t\t\t\t\t) => SQL | undefined);\n\t\t\t\torderBy?:\n\t\t\t\t\t| ValueOrArray\n\t\t\t\t\t| ((\n\t\t\t\t\t\tfields: Simplify<\n\t\t\t\t\t\t\t[TTableConfig['columns']] extends [never] ? {}\n\t\t\t\t\t\t\t\t: TTableConfig['columns']\n\t\t\t\t\t\t>,\n\t\t\t\t\t\toperators: OrderByOperators,\n\t\t\t\t\t) => ValueOrArray)\n\t\t\t\t\t| undefined;\n\t\t\t\tlimit?: number | Placeholder | undefined;\n\t\t\t}\n\t\t\t& (TIsRoot extends true ? {\n\t\t\t\t\toffset?: number | Placeholder | undefined;\n\t\t\t\t}\n\t\t\t\t: {})\n\t\t: {});\n\nexport interface TableRelationalConfig {\n\ttsName: string;\n\tdbName: string;\n\tcolumns: Record;\n\trelations: Record;\n\tprimaryKey: AnyColumn[];\n\tschema?: string;\n}\n\nexport type TablesRelationalConfig = Record;\n\nexport interface RelationalSchemaConfig<\n\tTSchema extends TablesRelationalConfig,\n> {\n\tfullSchema: Record;\n\tschema: TSchema;\n\ttableNamesMap: Record;\n}\n\nexport type ExtractTablesWithRelations<\n\tTSchema extends Record,\n> = {\n\t[\n\t\tK in keyof TSchema as TSchema[K] extends Table ? K\n\t\t\t: never\n\t]: TSchema[K] extends Table ? {\n\t\t\ttsName: K & string;\n\t\t\tdbName: TSchema[K]['_']['name'];\n\t\t\tcolumns: TSchema[K]['_']['columns'];\n\t\t\trelations: ExtractTableRelationsFromSchema<\n\t\t\t\tTSchema,\n\t\t\t\tTSchema[K]['_']['name']\n\t\t\t>;\n\t\t\tprimaryKey: AnyColumn[];\n\t\t}\n\t\t: never;\n};\n\nexport type ReturnTypeOrValue = T extends (...args: any[]) => infer R ? R\n\t: T;\n\nexport type BuildRelationResult<\n\tTSchema extends TablesRelationalConfig,\n\tTInclude,\n\tTRelations extends Record,\n> = {\n\t[\n\t\tK in\n\t\t\t& NonUndefinedKeysOnly\n\t\t\t& keyof TRelations\n\t]: TRelations[K] extends infer TRel extends Relation ? BuildQueryResult<\n\t\t\tTSchema,\n\t\t\tFindTableByDBName,\n\t\t\tAssume>\n\t\t> extends infer TResult ? TRel extends One ?\n\t\t\t\t\t| TResult\n\t\t\t\t\t| (Equal extends true ? null : never)\n\t\t\t: TResult[]\n\t\t: never\n\t\t: never;\n};\n\nexport type NonUndefinedKeysOnly =\n\t& ExtractObjectValues<\n\t\t{\n\t\t\t[K in keyof T as T[K] extends undefined ? never : K]: K;\n\t\t}\n\t>\n\t& keyof T;\n\nexport type BuildQueryResult<\n\tTSchema extends TablesRelationalConfig,\n\tTTableConfig extends TableRelationalConfig,\n\tTFullSelection extends true | Record,\n> = Equal extends true ? InferModelFromColumns\n\t: TFullSelection extends Record ? Simplify<\n\t\t\t& (TFullSelection['columns'] extends Record ? InferModelFromColumns<\n\t\t\t\t\t{\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\tK in Equal<\n\t\t\t\t\t\t\t\tExclude<\n\t\t\t\t\t\t\t\t\tTFullSelection['columns'][\n\t\t\t\t\t\t\t\t\t\t& keyof TFullSelection['columns']\n\t\t\t\t\t\t\t\t\t\t& keyof TTableConfig['columns']\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\tundefined\n\t\t\t\t\t\t\t\t>,\n\t\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t\t> extends true ? Exclude<\n\t\t\t\t\t\t\t\t\tkeyof TTableConfig['columns'],\n\t\t\t\t\t\t\t\t\tNonUndefinedKeysOnly\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t\t\t& {\n\t\t\t\t\t\t\t\t\t\t[K in keyof TFullSelection['columns']]: Equal<\n\t\t\t\t\t\t\t\t\t\t\tTFullSelection['columns'][K],\n\t\t\t\t\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t\t\t\t\t> extends true ? K\n\t\t\t\t\t\t\t\t\t\t\t: never;\n\t\t\t\t\t\t\t\t\t}[keyof TFullSelection['columns']]\n\t\t\t\t\t\t\t\t\t& keyof TTableConfig['columns']\n\t\t\t\t\t\t]: TTableConfig['columns'][K];\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t: InferModelFromColumns)\n\t\t\t& (TFullSelection['extras'] extends\n\t\t\t\t| Record\n\t\t\t\t| ((...args: any[]) => Record) ? {\n\t\t\t\t\t[\n\t\t\t\t\t\tK in NonUndefinedKeysOnly<\n\t\t\t\t\t\t\tReturnTypeOrValue\n\t\t\t\t\t\t>\n\t\t\t\t\t]: Assume<\n\t\t\t\t\t\tReturnTypeOrValue[K],\n\t\t\t\t\t\tSQL.Aliased\n\t\t\t\t\t>['_']['type'];\n\t\t\t\t}\n\t\t\t\t: {})\n\t\t\t& (TFullSelection['with'] extends Record ? BuildRelationResult<\n\t\t\t\t\tTSchema,\n\t\t\t\t\tTFullSelection['with'],\n\t\t\t\t\tTTableConfig['relations']\n\t\t\t\t>\n\t\t\t\t: {})\n\t\t>\n\t: never;\n\nexport interface RelationConfig<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends AnyColumn<{ tableName: TTableName }>[],\n> {\n\trelationName?: string;\n\tfields: TColumns;\n\treferences: ColumnsWithTable;\n}\n\nexport function extractTablesRelationalConfig<\n\tTTables extends TablesRelationalConfig,\n>(\n\tschema: Record,\n\tconfigHelpers: (table: Table) => any,\n): { tables: TTables; tableNamesMap: Record } {\n\tif (\n\t\tObject.keys(schema).length === 1\n\t\t&& 'default' in schema\n\t\t&& !is(schema['default'], Table)\n\t) {\n\t\tschema = schema['default'] as Record;\n\t}\n\n\t// table DB name -> schema table key\n\tconst tableNamesMap: Record = {};\n\t// Table relations found before their tables - need to buffer them until we know the schema table key\n\tconst relationsBuffer: Record<\n\t\tstring,\n\t\t{ relations: Record; primaryKey?: AnyColumn[] }\n\t> = {};\n\tconst tablesConfig: TablesRelationalConfig = {};\n\tfor (const [key, value] of Object.entries(schema)) {\n\t\tif (is(value, Table)) {\n\t\t\tconst dbName = getTableUniqueName(value);\n\t\t\tconst bufferedRelations = relationsBuffer[dbName];\n\t\t\ttableNamesMap[dbName] = key;\n\t\t\ttablesConfig[key] = {\n\t\t\t\ttsName: key,\n\t\t\t\tdbName: value[Table.Symbol.Name],\n\t\t\t\tschema: value[Table.Symbol.Schema],\n\t\t\t\tcolumns: value[Table.Symbol.Columns],\n\t\t\t\trelations: bufferedRelations?.relations ?? {},\n\t\t\t\tprimaryKey: bufferedRelations?.primaryKey ?? [],\n\t\t\t};\n\n\t\t\t// Fill in primary keys\n\t\t\tfor (\n\t\t\t\tconst column of Object.values(\n\t\t\t\t\t(value as Table)[Table.Symbol.Columns],\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tif (column.primary) {\n\t\t\t\t\ttablesConfig[key]!.primaryKey.push(column);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst extraConfig = value[Table.Symbol.ExtraConfigBuilder]?.((value as Table)[Table.Symbol.ExtraConfigColumns]);\n\t\t\tif (extraConfig) {\n\t\t\t\tfor (const configEntry of Object.values(extraConfig)) {\n\t\t\t\t\tif (is(configEntry, PrimaryKeyBuilder)) {\n\t\t\t\t\t\ttablesConfig[key]!.primaryKey.push(...configEntry.columns);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (is(value, Relations)) {\n\t\t\tconst dbName = getTableUniqueName(value.table);\n\t\t\tconst tableName = tableNamesMap[dbName];\n\t\t\tconst relations: Record = value.config(\n\t\t\t\tconfigHelpers(value.table),\n\t\t\t);\n\t\t\tlet primaryKey: AnyColumn[] | undefined;\n\n\t\t\tfor (const [relationName, relation] of Object.entries(relations)) {\n\t\t\t\tif (tableName) {\n\t\t\t\t\tconst tableConfig = tablesConfig[tableName]!;\n\t\t\t\t\ttableConfig.relations[relationName] = relation;\n\t\t\t\t\tif (primaryKey) {\n\t\t\t\t\t\ttableConfig.primaryKey.push(...primaryKey);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (!(dbName in relationsBuffer)) {\n\t\t\t\t\t\trelationsBuffer[dbName] = {\n\t\t\t\t\t\t\trelations: {},\n\t\t\t\t\t\t\tprimaryKey,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\trelationsBuffer[dbName]!.relations[relationName] = relation;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { tables: tablesConfig as TTables, tableNamesMap };\n}\n\nexport function relations<\n\tTTableName extends string,\n\tTRelations extends Record>,\n>(\n\ttable: AnyTable<{ name: TTableName }>,\n\trelations: (helpers: TableRelationsHelpers) => TRelations,\n): Relations {\n\treturn new Relations(\n\t\ttable,\n\t\t(helpers: TableRelationsHelpers) =>\n\t\t\tObject.fromEntries(\n\t\t\t\tObject.entries(relations(helpers)).map(([key, value]) => [\n\t\t\t\t\tkey,\n\t\t\t\t\tvalue.withFieldName(key),\n\t\t\t\t]),\n\t\t\t) as TRelations,\n\t);\n}\n\nexport function createOne(sourceTable: Table) {\n\treturn function one<\n\t\tTForeignTable extends Table,\n\t\tTColumns extends [\n\t\t\tAnyColumn<{ tableName: TTableName }>,\n\t\t\t...AnyColumn<{ tableName: TTableName }>[],\n\t\t],\n\t>(\n\t\ttable: TForeignTable,\n\t\tconfig?: RelationConfig,\n\t): One<\n\t\tTForeignTable['_']['name'],\n\t\tEqual\n\t> {\n\t\treturn new One(\n\t\t\tsourceTable,\n\t\t\ttable,\n\t\t\tconfig,\n\t\t\t(config?.fields.reduce((res, f) => res && f.notNull, true)\n\t\t\t\t?? false) as Equal,\n\t\t);\n\t};\n}\n\nexport function createMany(sourceTable: Table) {\n\treturn function many(\n\t\treferencedTable: TForeignTable,\n\t\tconfig?: { relationName: string },\n\t): Many {\n\t\treturn new Many(sourceTable, referencedTable, config);\n\t};\n}\n\nexport interface NormalizedRelation {\n\tfields: AnyColumn[];\n\treferences: AnyColumn[];\n}\n\nexport function normalizeRelation(\n\tschema: TablesRelationalConfig,\n\ttableNamesMap: Record,\n\trelation: Relation,\n): NormalizedRelation {\n\tif (is(relation, One) && relation.config) {\n\t\treturn {\n\t\t\tfields: relation.config.fields,\n\t\t\treferences: relation.config.references,\n\t\t};\n\t}\n\n\tconst referencedTableTsName = tableNamesMap[getTableUniqueName(relation.referencedTable)];\n\tif (!referencedTableTsName) {\n\t\tthrow new Error(\n\t\t\t`Table \"${relation.referencedTable[Table.Symbol.Name]}\" not found in schema`,\n\t\t);\n\t}\n\n\tconst referencedTableConfig = schema[referencedTableTsName];\n\tif (!referencedTableConfig) {\n\t\tthrow new Error(`Table \"${referencedTableTsName}\" not found in schema`);\n\t}\n\n\tconst sourceTable = relation.sourceTable;\n\tconst sourceTableTsName = tableNamesMap[getTableUniqueName(sourceTable)];\n\tif (!sourceTableTsName) {\n\t\tthrow new Error(\n\t\t\t`Table \"${sourceTable[Table.Symbol.Name]}\" not found in schema`,\n\t\t);\n\t}\n\n\tconst reverseRelations: Relation[] = [];\n\tfor (\n\t\tconst referencedTableRelation of Object.values(\n\t\t\treferencedTableConfig.relations,\n\t\t)\n\t) {\n\t\tif (\n\t\t\t(relation.relationName\n\t\t\t\t&& relation !== referencedTableRelation\n\t\t\t\t&& referencedTableRelation.relationName === relation.relationName)\n\t\t\t|| (!relation.relationName\n\t\t\t\t&& referencedTableRelation.referencedTable === relation.sourceTable)\n\t\t) {\n\t\t\treverseRelations.push(referencedTableRelation);\n\t\t}\n\t}\n\n\tif (reverseRelations.length > 1) {\n\t\tthrow relation.relationName\n\t\t\t? new Error(\n\t\t\t\t`There are multiple relations with name \"${relation.relationName}\" in table \"${referencedTableTsName}\"`,\n\t\t\t)\n\t\t\t: new Error(\n\t\t\t\t`There are multiple relations between \"${referencedTableTsName}\" and \"${\n\t\t\t\t\trelation.sourceTable[Table.Symbol.Name]\n\t\t\t\t}\". Please specify relation name`,\n\t\t\t);\n\t}\n\n\tif (\n\t\treverseRelations[0]\n\t\t&& is(reverseRelations[0], One)\n\t\t&& reverseRelations[0].config\n\t) {\n\t\treturn {\n\t\t\tfields: reverseRelations[0].config.references,\n\t\t\treferences: reverseRelations[0].config.fields,\n\t\t};\n\t}\n\n\tthrow new Error(\n\t\t`There is not enough information to infer relation \"${sourceTableTsName}.${relation.fieldName}\"`,\n\t);\n}\n\nexport function createTableRelationsHelpers(\n\tsourceTable: AnyTable<{ name: TTableName }>,\n) {\n\treturn {\n\t\tone: createOne(sourceTable),\n\t\tmany: createMany(sourceTable),\n\t};\n}\n\nexport type TableRelationsHelpers = ReturnType<\n\ttypeof createTableRelationsHelpers\n>;\n\nexport interface BuildRelationalQueryResult<\n\tTTable extends Table = Table,\n\tTColumn extends Column = Column,\n> {\n\ttableTsKey: string;\n\tselection: {\n\t\tdbKey: string;\n\t\ttsKey: string;\n\t\tfield: TColumn | SQL | SQL.Aliased;\n\t\trelationTableTsKey: string | undefined;\n\t\tisJson: boolean;\n\t\tisExtra?: boolean;\n\t\tselection: BuildRelationalQueryResult['selection'];\n\t}[];\n\tsql: TTable | SQL;\n}\n\nexport function mapRelationalRow(\n\ttablesConfig: TablesRelationalConfig,\n\ttableConfig: TableRelationalConfig,\n\trow: unknown[],\n\tbuildQueryResultSelection: BuildRelationalQueryResult['selection'],\n\tmapColumnValue: (value: unknown) => unknown = (value) => value,\n): Record {\n\tconst result: Record = {};\n\n\tfor (\n\t\tconst [\n\t\t\tselectionItemIndex,\n\t\t\tselectionItem,\n\t\t] of buildQueryResultSelection.entries()\n\t) {\n\t\tif (selectionItem.isJson) {\n\t\t\tconst relation = tableConfig.relations[selectionItem.tsKey]!;\n\t\t\tconst rawSubRows = row[selectionItemIndex] as\n\t\t\t\t| unknown[]\n\t\t\t\t| null\n\t\t\t\t| [null]\n\t\t\t\t| string;\n\t\t\tconst subRows = typeof rawSubRows === 'string'\n\t\t\t\t? (JSON.parse(rawSubRows) as unknown[])\n\t\t\t\t: rawSubRows;\n\t\t\tresult[selectionItem.tsKey] = is(relation, One)\n\t\t\t\t? subRows\n\t\t\t\t\t&& mapRelationalRow(\n\t\t\t\t\t\ttablesConfig,\n\t\t\t\t\t\ttablesConfig[selectionItem.relationTableTsKey!]!,\n\t\t\t\t\t\tsubRows,\n\t\t\t\t\t\tselectionItem.selection,\n\t\t\t\t\t\tmapColumnValue,\n\t\t\t\t\t)\n\t\t\t\t: (subRows as unknown[][]).map((subRow) =>\n\t\t\t\t\tmapRelationalRow(\n\t\t\t\t\t\ttablesConfig,\n\t\t\t\t\t\ttablesConfig[selectionItem.relationTableTsKey!]!,\n\t\t\t\t\t\tsubRow,\n\t\t\t\t\t\tselectionItem.selection,\n\t\t\t\t\t\tmapColumnValue,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t} else {\n\t\t\tconst value = mapColumnValue(row[selectionItemIndex]);\n\t\t\tconst field = selectionItem.field!;\n\t\t\tlet decoder;\n\t\t\tif (is(field, Column)) {\n\t\t\t\tdecoder = field;\n\t\t\t} else if (is(field, SQL)) {\n\t\t\t\tdecoder = field.decoder;\n\t\t\t} else {\n\t\t\t\tdecoder = field.sql.decoder;\n\t\t\t}\n\t\t\tresult[selectionItem.tsKey] = value === null ? null : decoder.mapFromDriverValue(value);\n\t\t}\n\t}\n\n\treturn result;\n}\n", "import type { AnyColumn } from './column.ts';\nimport { Column } from './column.ts';\nimport { entityKind, is } from './entity.ts';\nimport type { Relation } from './relations.ts';\nimport type { View } from './sql/sql.ts';\nimport { SQL, sql } from './sql/sql.ts';\nimport { Table } from './table.ts';\nimport { ViewBaseConfig } from './view-common.ts';\n\nexport class ColumnAliasProxyHandler implements ProxyHandler {\n\tstatic readonly [entityKind]: string = 'ColumnAliasProxyHandler';\n\n\tconstructor(private table: Table | View) {}\n\n\tget(columnObj: TColumn, prop: string | symbol): any {\n\t\tif (prop === 'table') {\n\t\t\treturn this.table;\n\t\t}\n\n\t\treturn columnObj[prop as keyof TColumn];\n\t}\n}\n\nexport class TableAliasProxyHandler implements ProxyHandler {\n\tstatic readonly [entityKind]: string = 'TableAliasProxyHandler';\n\n\tconstructor(private alias: string, private replaceOriginalName: boolean) {}\n\n\tget(target: T, prop: string | symbol): any {\n\t\tif (prop === Table.Symbol.IsAlias) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (prop === Table.Symbol.Name) {\n\t\t\treturn this.alias;\n\t\t}\n\n\t\tif (this.replaceOriginalName && prop === Table.Symbol.OriginalName) {\n\t\t\treturn this.alias;\n\t\t}\n\n\t\tif (prop === ViewBaseConfig) {\n\t\t\treturn {\n\t\t\t\t...target[ViewBaseConfig as keyof typeof target],\n\t\t\t\tname: this.alias,\n\t\t\t\tisAlias: true,\n\t\t\t};\n\t\t}\n\n\t\tif (prop === Table.Symbol.Columns) {\n\t\t\tconst columns = (target as Table)[Table.Symbol.Columns];\n\t\t\tif (!columns) {\n\t\t\t\treturn columns;\n\t\t\t}\n\n\t\t\tconst proxiedColumns: { [key: string]: any } = {};\n\n\t\t\tObject.keys(columns).map((key) => {\n\t\t\t\tproxiedColumns[key] = new Proxy(\n\t\t\t\t\tcolumns[key]!,\n\t\t\t\t\tnew ColumnAliasProxyHandler(new Proxy(target, this)),\n\t\t\t\t);\n\t\t\t});\n\n\t\t\treturn proxiedColumns;\n\t\t}\n\n\t\tconst value = target[prop as keyof typeof target];\n\t\tif (is(value, Column)) {\n\t\t\treturn new Proxy(value as AnyColumn, new ColumnAliasProxyHandler(new Proxy(target, this)));\n\t\t}\n\n\t\treturn value;\n\t}\n}\n\nexport class RelationTableAliasProxyHandler implements ProxyHandler {\n\tstatic readonly [entityKind]: string = 'RelationTableAliasProxyHandler';\n\n\tconstructor(private alias: string) {}\n\n\tget(target: T, prop: string | symbol): any {\n\t\tif (prop === 'sourceTable') {\n\t\t\treturn aliasedTable(target.sourceTable, this.alias);\n\t\t}\n\n\t\treturn target[prop as keyof typeof target];\n\t}\n}\n\nexport function aliasedTable(\n\ttable: T,\n\ttableAlias: string,\n): T {\n\treturn new Proxy(table, new TableAliasProxyHandler(tableAlias, false)) as any;\n}\n\nexport function aliasedRelation(relation: T, tableAlias: string): T {\n\treturn new Proxy(relation, new RelationTableAliasProxyHandler(tableAlias));\n}\n\nexport function aliasedTableColumn(column: T, tableAlias: string): T {\n\treturn new Proxy(\n\t\tcolumn,\n\t\tnew ColumnAliasProxyHandler(new Proxy(column.table, new TableAliasProxyHandler(tableAlias, false))),\n\t);\n}\n\nexport function mapColumnsInAliasedSQLToAlias(query: SQL.Aliased, alias: string): SQL.Aliased {\n\treturn new SQL.Aliased(mapColumnsInSQLToAlias(query.sql, alias), query.fieldAlias);\n}\n\nexport function mapColumnsInSQLToAlias(query: SQL, alias: string): SQL {\n\treturn sql.join(query.queryChunks.map((c) => {\n\t\tif (is(c, Column)) {\n\t\t\treturn aliasedTableColumn(c, alias);\n\t\t}\n\t\tif (is(c, SQL)) {\n\t\t\treturn mapColumnsInSQLToAlias(c, alias);\n\t\t}\n\t\tif (is(c, SQL.Aliased)) {\n\t\t\treturn mapColumnsInAliasedSQLToAlias(c, alias);\n\t\t}\n\t\treturn c;\n\t}));\n}\n", "import { ColumnAliasProxyHandler, TableAliasProxyHandler } from './alias.ts';\nimport { Column } from './column.ts';\nimport { entityKind, is } from './entity.ts';\nimport { SQL, View } from './sql/sql.ts';\nimport { Subquery } from './subquery.ts';\nimport { ViewBaseConfig } from './view-common.ts';\n\nexport class SelectionProxyHandler | View>\n\timplements ProxyHandler | View>\n{\n\tstatic readonly [entityKind]: string = 'SelectionProxyHandler';\n\n\tprivate config: {\n\t\t/**\n\t\t * Table alias for the columns\n\t\t */\n\t\talias?: string;\n\t\t/**\n\t\t * What to do when a field is an instance of `SQL.Aliased` and it's not a selection field (from a subquery)\n\t\t *\n\t\t * `sql` - return the underlying SQL expression\n\t\t *\n\t\t * `alias` - return the field alias\n\t\t */\n\t\tsqlAliasedBehavior: 'sql' | 'alias';\n\t\t/**\n\t\t * What to do when a field is an instance of `SQL` and it doesn't have an alias declared\n\t\t *\n\t\t * `sql` - return the underlying SQL expression\n\t\t *\n\t\t * `error` - return a DrizzleTypeError on type level and throw an error on runtime\n\t\t */\n\t\tsqlBehavior: 'sql' | 'error';\n\n\t\t/**\n\t\t * Whether to replace the original name of the column with the alias\n\t\t * Should be set to `true` for views creation\n\t\t * @default false\n\t\t */\n\t\treplaceOriginalName?: boolean;\n\t};\n\n\tconstructor(config: SelectionProxyHandler['config']) {\n\t\tthis.config = { ...config };\n\t}\n\n\tget(subquery: T, prop: string | symbol): any {\n\t\tif (prop === '_') {\n\t\t\treturn {\n\t\t\t\t...subquery['_' as keyof typeof subquery],\n\t\t\t\tselectedFields: new Proxy(\n\t\t\t\t\t(subquery as Subquery)._.selectedFields,\n\t\t\t\t\tthis as ProxyHandler>,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\n\t\tif (prop === ViewBaseConfig) {\n\t\t\treturn {\n\t\t\t\t...subquery[ViewBaseConfig as keyof typeof subquery],\n\t\t\t\tselectedFields: new Proxy(\n\t\t\t\t\t(subquery as View)[ViewBaseConfig].selectedFields,\n\t\t\t\t\tthis as ProxyHandler>,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\n\t\tif (typeof prop === 'symbol') {\n\t\t\treturn subquery[prop as keyof typeof subquery];\n\t\t}\n\n\t\tconst columns = is(subquery, Subquery)\n\t\t\t? subquery._.selectedFields\n\t\t\t: is(subquery, View)\n\t\t\t? subquery[ViewBaseConfig].selectedFields\n\t\t\t: subquery;\n\t\tconst value: unknown = columns[prop as keyof typeof columns];\n\n\t\tif (is(value, SQL.Aliased)) {\n\t\t\t// Never return the underlying SQL expression for a field previously selected in a subquery\n\t\t\tif (this.config.sqlAliasedBehavior === 'sql' && !value.isSelectionField) {\n\t\t\t\treturn value.sql;\n\t\t\t}\n\n\t\t\tconst newValue = value.clone();\n\t\t\tnewValue.isSelectionField = true;\n\t\t\treturn newValue;\n\t\t}\n\n\t\tif (is(value, SQL)) {\n\t\t\tif (this.config.sqlBehavior === 'sql') {\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\tthrow new Error(\n\t\t\t\t`You tried to reference \"${prop}\" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using \".as('alias')\" method.`,\n\t\t\t);\n\t\t}\n\n\t\tif (is(value, Column)) {\n\t\t\tif (this.config.alias) {\n\t\t\t\treturn new Proxy(\n\t\t\t\t\tvalue,\n\t\t\t\t\tnew ColumnAliasProxyHandler(\n\t\t\t\t\t\tnew Proxy(\n\t\t\t\t\t\t\tvalue.table,\n\t\t\t\t\t\t\tnew TableAliasProxyHandler(this.config.alias, this.config.replaceOriginalName ?? false),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\n\t\tif (typeof value !== 'object' || value === null) {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn new Proxy(value, new SelectionProxyHandler(this.config));\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\n\nexport abstract class QueryPromise implements Promise {\n\tstatic readonly [entityKind]: string = 'QueryPromise';\n\n\t[Symbol.toStringTag] = 'QueryPromise';\n\n\tcatch(\n\t\tonRejected?: ((reason: any) => TResult | PromiseLike) | null | undefined,\n\t): Promise {\n\t\treturn this.then(undefined, onRejected);\n\t}\n\n\tfinally(onFinally?: (() => void) | null | undefined): Promise {\n\t\treturn this.then(\n\t\t\t(value) => {\n\t\t\t\tonFinally?.();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\t(reason) => {\n\t\t\t\tonFinally?.();\n\t\t\t\tthrow reason;\n\t\t\t},\n\t\t);\n\t}\n\n\tthen(\n\t\tonFulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null,\n\t\tonRejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null,\n\t): Promise {\n\t\treturn this.execute().then(onFulfilled, onRejected);\n\t}\n\n\tabstract execute(): Promise;\n}\n", "import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { AnySQLiteColumn, SQLiteColumn } from './columns/index.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport type UpdateDeleteAction = 'cascade' | 'restrict' | 'no action' | 'set null' | 'set default';\n\nexport type Reference = () => {\n\treadonly name?: string;\n\treadonly columns: SQLiteColumn[];\n\treadonly foreignTable: SQLiteTable;\n\treadonly foreignColumns: SQLiteColumn[];\n};\n\nexport class ForeignKeyBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteForeignKeyBuilder';\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteForeignKeyBuilder';\n\t\tforeignTableName: 'TForeignTableName';\n\t};\n\n\t/** @internal */\n\treference: Reference;\n\n\t/** @internal */\n\t_onUpdate: UpdateDeleteAction | undefined;\n\n\t/** @internal */\n\t_onDelete: UpdateDeleteAction | undefined;\n\n\tconstructor(\n\t\tconfig: () => {\n\t\t\tname?: string;\n\t\t\tcolumns: SQLiteColumn[];\n\t\t\tforeignColumns: SQLiteColumn[];\n\t\t},\n\t\tactions?: {\n\t\t\tonUpdate?: UpdateDeleteAction;\n\t\t\tonDelete?: UpdateDeleteAction;\n\t\t} | undefined,\n\t) {\n\t\tthis.reference = () => {\n\t\t\tconst { name, columns, foreignColumns } = config();\n\t\t\treturn { name, columns, foreignTable: foreignColumns[0]!.table as SQLiteTable, foreignColumns };\n\t\t};\n\t\tif (actions) {\n\t\t\tthis._onUpdate = actions.onUpdate;\n\t\t\tthis._onDelete = actions.onDelete;\n\t\t}\n\t}\n\n\tonUpdate(action: UpdateDeleteAction): this {\n\t\tthis._onUpdate = action;\n\t\treturn this;\n\t}\n\n\tonDelete(action: UpdateDeleteAction): this {\n\t\tthis._onDelete = action;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): ForeignKey {\n\t\treturn new ForeignKey(table, this);\n\t}\n}\n\nexport class ForeignKey {\n\tstatic readonly [entityKind]: string = 'SQLiteForeignKey';\n\n\treadonly reference: Reference;\n\treadonly onUpdate: UpdateDeleteAction | undefined;\n\treadonly onDelete: UpdateDeleteAction | undefined;\n\n\tconstructor(readonly table: SQLiteTable, builder: ForeignKeyBuilder) {\n\t\tthis.reference = builder.reference;\n\t\tthis.onUpdate = builder._onUpdate;\n\t\tthis.onDelete = builder._onDelete;\n\t}\n\n\tgetName(): string {\n\t\tconst { name, columns, foreignColumns } = this.reference();\n\t\tconst columnNames = columns.map((column) => column.name);\n\t\tconst foreignColumnNames = foreignColumns.map((column) => column.name);\n\t\tconst chunks = [\n\t\t\tthis.table[TableName],\n\t\t\t...columnNames,\n\t\t\tforeignColumns[0]!.table[TableName],\n\t\t\t...foreignColumnNames,\n\t\t];\n\t\treturn name ?? `${chunks.join('_')}_fk`;\n\t}\n}\n\ntype ColumnsWithTable<\n\tTTableName extends string,\n\tTColumns extends SQLiteColumn[],\n> = { [Key in keyof TColumns]: AnySQLiteColumn<{ tableName: TTableName }> };\n\n/**\n * @deprecated please use `foreignKey({ columns: [], foreignColumns: [] })` syntax without callback\n * @param config\n * @returns\n */\nexport function foreignKey<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends [AnySQLiteColumn<{ tableName: TTableName }>, ...AnySQLiteColumn<{ tableName: TTableName }>[]],\n>(\n\tconfig: () => {\n\t\tname?: string;\n\t\tcolumns: TColumns;\n\t\tforeignColumns: ColumnsWithTable;\n\t},\n): ForeignKeyBuilder;\nexport function foreignKey<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends [AnySQLiteColumn<{ tableName: TTableName }>, ...AnySQLiteColumn<{ tableName: TTableName }>[]],\n>(\n\tconfig: {\n\t\tname?: string;\n\t\tcolumns: TColumns;\n\t\tforeignColumns: ColumnsWithTable;\n\t},\n): ForeignKeyBuilder;\nexport function foreignKey(\n\tconfig: any,\n): ForeignKeyBuilder {\n\tfunction mappedConfig() {\n\t\tif (typeof config === 'function') {\n\t\t\tconst { name, columns, foreignColumns } = config();\n\t\t\treturn {\n\t\t\t\tname,\n\t\t\t\tcolumns,\n\t\t\t\tforeignColumns,\n\t\t\t};\n\t\t}\n\t\treturn config;\n\t}\n\n\treturn new ForeignKeyBuilder(mappedConfig);\n}\n", "import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { SQLiteColumn } from './columns/common.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport function uniqueKeyName(table: SQLiteTable, columns: string[]) {\n\treturn `${table[TableName]}_${columns.join('_')}_unique`;\n}\n\nexport function unique(name?: string): UniqueOnConstraintBuilder {\n\treturn new UniqueOnConstraintBuilder(name);\n}\n\nexport class UniqueConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueConstraintBuilder';\n\n\t/** @internal */\n\tcolumns: SQLiteColumn[];\n\n\tconstructor(\n\t\tcolumns: SQLiteColumn[],\n\t\tprivate name?: string,\n\t) {\n\t\tthis.columns = columns;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): UniqueConstraint {\n\t\treturn new UniqueConstraint(table, this.columns, this.name);\n\t}\n}\n\nexport class UniqueOnConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueOnConstraintBuilder';\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tname?: string,\n\t) {\n\t\tthis.name = name;\n\t}\n\n\ton(...columns: [SQLiteColumn, ...SQLiteColumn[]]) {\n\t\treturn new UniqueConstraintBuilder(columns, this.name);\n\t}\n}\n\nexport class UniqueConstraint {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueConstraint';\n\n\treadonly columns: SQLiteColumn[];\n\treadonly name?: string;\n\n\tconstructor(readonly table: SQLiteTable, columns: SQLiteColumn[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name));\n\t}\n\n\tgetName() {\n\t\treturn this.name;\n\t}\n}\n", "import type {\n\tColumnBuilderBase,\n\tColumnBuilderBaseConfig,\n\tColumnBuilderExtraConfig,\n\tColumnBuilderRuntimeConfig,\n\tColumnDataType,\n\tHasGenerated,\n\tMakeColumnConfig,\n} from '~/column-builder.ts';\nimport { ColumnBuilder } from '~/column-builder.ts';\nimport { Column } from '~/column.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { ForeignKey, UpdateDeleteAction } from '~/sqlite-core/foreign-keys.ts';\nimport { ForeignKeyBuilder } from '~/sqlite-core/foreign-keys.ts';\nimport type { AnySQLiteTable, SQLiteTable } from '~/sqlite-core/table.ts';\nimport type { Update } from '~/utils.ts';\nimport { uniqueKeyName } from '../unique-constraint.ts';\n\nexport interface ReferenceConfig {\n\tref: () => SQLiteColumn;\n\tactions: {\n\t\tonUpdate?: UpdateDeleteAction;\n\t\tonDelete?: UpdateDeleteAction;\n\t};\n}\n\nexport interface SQLiteColumnBuilderBase<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTTypeConfig extends object = object,\n> extends ColumnBuilderBase {}\n\nexport interface SQLiteGeneratedColumnConfig {\n\tmode?: 'virtual' | 'stored';\n}\n\nexport abstract class SQLiteColumnBuilder<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTRuntimeConfig extends object = object,\n\tTTypeConfig extends object = object,\n\tTExtraConfig extends ColumnBuilderExtraConfig = object,\n> extends ColumnBuilder\n\timplements SQLiteColumnBuilderBase\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteColumnBuilder';\n\n\tprivate foreignKeyConfigs: ReferenceConfig[] = [];\n\n\treferences(\n\t\tref: ReferenceConfig['ref'],\n\t\tactions: ReferenceConfig['actions'] = {},\n\t): this {\n\t\tthis.foreignKeyConfigs.push({ ref, actions });\n\t\treturn this;\n\t}\n\n\tunique(\n\t\tname?: string,\n\t): this {\n\t\tthis.config.isUnique = true;\n\t\tthis.config.uniqueName = name;\n\t\treturn this;\n\t}\n\n\tgeneratedAlwaysAs(as: SQL | T['data'] | (() => SQL), config?: SQLiteGeneratedColumnConfig): HasGenerated {\n\t\tthis.config.generated = {\n\t\t\tas,\n\t\t\ttype: 'always',\n\t\t\tmode: config?.mode ?? 'virtual',\n\t\t};\n\t\treturn this as any;\n\t}\n\n\t/** @internal */\n\tbuildForeignKeys(column: SQLiteColumn, table: SQLiteTable): ForeignKey[] {\n\t\treturn this.foreignKeyConfigs.map(({ ref, actions }) => {\n\t\t\treturn ((ref, actions) => {\n\t\t\t\tconst builder = new ForeignKeyBuilder(() => {\n\t\t\t\t\tconst foreignColumn = ref();\n\t\t\t\t\treturn { columns: [column], foreignColumns: [foreignColumn] };\n\t\t\t\t});\n\t\t\t\tif (actions.onUpdate) {\n\t\t\t\t\tbuilder.onUpdate(actions.onUpdate);\n\t\t\t\t}\n\t\t\t\tif (actions.onDelete) {\n\t\t\t\t\tbuilder.onDelete(actions.onDelete);\n\t\t\t\t}\n\t\t\t\treturn builder.build(table);\n\t\t\t})(ref, actions);\n\t\t});\n\t}\n\n\t/** @internal */\n\tabstract build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteColumn>;\n}\n\n// To understand how to use `SQLiteColumn` and `AnySQLiteColumn`, see `Column` and `AnyColumn` documentation.\nexport abstract class SQLiteColumn<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n\tTRuntimeConfig extends object = {},\n\tTTypeConfig extends object = {},\n> extends Column {\n\tstatic override readonly [entityKind]: string = 'SQLiteColumn';\n\n\tconstructor(\n\t\toverride readonly table: SQLiteTable,\n\t\tconfig: ColumnBuilderRuntimeConfig,\n\t) {\n\t\tif (!config.uniqueName) {\n\t\t\tconfig.uniqueName = uniqueKeyName(table, [config.name]);\n\t\t}\n\t\tsuper(table, config);\n\t}\n}\n\nexport type AnySQLiteColumn> = {}> = SQLiteColumn<\n\tRequired, TPartial>>\n>;\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySQLiteTable } from '~/sqlite-core/table.ts';\nimport { type Equal, getColumnNameAndConfig, textDecoder } from '~/utils.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\ntype BlobMode = 'buffer' | 'json' | 'bigint';\n\nexport type SQLiteBigIntBuilderInitial = SQLiteBigIntBuilder<{\n\tname: TName;\n\tdataType: 'bigint';\n\tcolumnType: 'SQLiteBigInt';\n\tdata: bigint;\n\tdriverParam: Buffer;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteBigIntBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBigIntBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'bigint', 'SQLiteBigInt');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBigInt> {\n\t\treturn new SQLiteBigInt>(table, this.config as ColumnBuilderRuntimeConfig);\n\t}\n}\n\nexport class SQLiteBigInt> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteBigInt';\n\n\tgetSQLType(): string {\n\t\treturn 'blob';\n\t}\n\n\toverride mapFromDriverValue(value: Buffer | Uint8Array | ArrayBuffer): bigint {\n\t\tif (typeof Buffer !== 'undefined' && Buffer.from) {\n\t\t\tconst buf = Buffer.isBuffer(value)\n\t\t\t\t? value\n\t\t\t\t// eslint-disable-next-line no-instanceof/no-instanceof\n\t\t\t\t: value instanceof ArrayBuffer\n\t\t\t\t? Buffer.from(value)\n\t\t\t\t: value.buffer\n\t\t\t\t? Buffer.from(value.buffer, value.byteOffset, value.byteLength)\n\t\t\t\t: Buffer.from(value);\n\t\t\treturn BigInt(buf.toString('utf8'));\n\t\t}\n\n\t\treturn BigInt(textDecoder!.decode(value));\n\t}\n\n\toverride mapToDriverValue(value: bigint): Buffer {\n\t\treturn Buffer.from(value.toString());\n\t}\n}\n\nexport type SQLiteBlobJsonBuilderInitial = SQLiteBlobJsonBuilder<{\n\tname: TName;\n\tdataType: 'json';\n\tcolumnType: 'SQLiteBlobJson';\n\tdata: unknown;\n\tdriverParam: Buffer;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteBlobJsonBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBlobJsonBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'json', 'SQLiteBlobJson');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBlobJson> {\n\t\treturn new SQLiteBlobJson>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteBlobJson> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteBlobJson';\n\n\tgetSQLType(): string {\n\t\treturn 'blob';\n\t}\n\n\toverride mapFromDriverValue(value: Buffer | Uint8Array | ArrayBuffer): T['data'] {\n\t\tif (typeof Buffer !== 'undefined' && Buffer.from) {\n\t\t\tconst buf = Buffer.isBuffer(value)\n\t\t\t\t? value\n\t\t\t\t// eslint-disable-next-line no-instanceof/no-instanceof\n\t\t\t\t: value instanceof ArrayBuffer\n\t\t\t\t? Buffer.from(value)\n\t\t\t\t: value.buffer\n\t\t\t\t? Buffer.from(value.buffer, value.byteOffset, value.byteLength)\n\t\t\t\t: Buffer.from(value);\n\t\t\treturn JSON.parse(buf.toString('utf8'));\n\t\t}\n\n\t\treturn JSON.parse(textDecoder!.decode(value));\n\t}\n\n\toverride mapToDriverValue(value: T['data']): Buffer {\n\t\treturn Buffer.from(JSON.stringify(value));\n\t}\n}\n\nexport type SQLiteBlobBufferBuilderInitial = SQLiteBlobBufferBuilder<{\n\tname: TName;\n\tdataType: 'buffer';\n\tcolumnType: 'SQLiteBlobBuffer';\n\tdata: Buffer;\n\tdriverParam: Buffer;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteBlobBufferBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBlobBufferBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'buffer', 'SQLiteBlobBuffer');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBlobBuffer> {\n\t\treturn new SQLiteBlobBuffer>(table, this.config as ColumnBuilderRuntimeConfig);\n\t}\n}\n\nexport class SQLiteBlobBuffer> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteBlobBuffer';\n\n\toverride mapFromDriverValue(value: Buffer | Uint8Array | ArrayBuffer): T['data'] {\n\t\tif (Buffer.isBuffer(value)) {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn Buffer.from(value as Uint8Array);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn 'blob';\n\t}\n}\n\nexport interface BlobConfig {\n\tmode: TMode;\n}\n\n/**\n * It's recommended to use `text('...', { mode: 'json' })` instead of `blob` in JSON mode, because it supports JSON functions:\n * >All JSON functions currently throw an error if any of their arguments are BLOBs because BLOBs are reserved for a future enhancement in which BLOBs will store the binary encoding for JSON.\n *\n * https://www.sqlite.org/json1.html\n */\nexport function blob(): SQLiteBlobJsonBuilderInitial<''>;\nexport function blob(\n\tconfig?: BlobConfig,\n): Equal extends true ? SQLiteBigIntBuilderInitial<''>\n\t: Equal extends true ? SQLiteBlobBufferBuilderInitial<''>\n\t: SQLiteBlobJsonBuilderInitial<''>;\nexport function blob(\n\tname: TName,\n\tconfig?: BlobConfig,\n): Equal extends true ? SQLiteBigIntBuilderInitial\n\t: Equal extends true ? SQLiteBlobBufferBuilderInitial\n\t: SQLiteBlobJsonBuilderInitial;\nexport function blob(a?: string | BlobConfig, b?: BlobConfig) {\n\tconst { name, config } = getColumnNameAndConfig(a, b);\n\tif (config?.mode === 'json') {\n\t\treturn new SQLiteBlobJsonBuilder(name);\n\t}\n\tif (config?.mode === 'bigint') {\n\t\treturn new SQLiteBigIntBuilder(name);\n\t}\n\treturn new SQLiteBlobBufferBuilder(name);\n}\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { AnySQLiteTable } from '~/sqlite-core/table.ts';\nimport { type Equal, getColumnNameAndConfig } from '~/utils.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport type ConvertCustomConfig> =\n\t& {\n\t\tname: TName;\n\t\tdataType: 'custom';\n\t\tcolumnType: 'SQLiteCustomColumn';\n\t\tdata: T['data'];\n\t\tdriverParam: T['driverData'];\n\t\tenumValues: undefined;\n\t}\n\t& (T['notNull'] extends true ? { notNull: true } : {})\n\t& (T['default'] extends true ? { hasDefault: true } : {});\n\nexport interface SQLiteCustomColumnInnerConfig {\n\tcustomTypeValues: CustomTypeValues;\n}\n\nexport class SQLiteCustomColumnBuilder>\n\textends SQLiteColumnBuilder<\n\t\tT,\n\t\t{\n\t\t\tfieldConfig: CustomTypeValues['config'];\n\t\t\tcustomTypeParams: CustomTypeParams;\n\t\t},\n\t\t{\n\t\t\tsqliteColumnBuilderBrand: 'SQLiteCustomColumnBuilderBrand';\n\t\t}\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteCustomColumnBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t\tfieldConfig: CustomTypeValues['config'],\n\t\tcustomTypeParams: CustomTypeParams,\n\t) {\n\t\tsuper(name, 'custom', 'SQLiteCustomColumn');\n\t\tthis.config.fieldConfig = fieldConfig;\n\t\tthis.config.customTypeParams = customTypeParams;\n\t}\n\n\t/** @internal */\n\tbuild(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteCustomColumn> {\n\t\treturn new SQLiteCustomColumn>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteCustomColumn> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteCustomColumn';\n\n\tprivate sqlName: string;\n\tprivate mapTo?: (value: T['data']) => T['driverParam'];\n\tprivate mapFrom?: (value: T['driverParam']) => T['data'];\n\n\tconstructor(\n\t\ttable: AnySQLiteTable<{ name: T['tableName'] }>,\n\t\tconfig: SQLiteCustomColumnBuilder['config'],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.sqlName = config.customTypeParams.dataType(config.fieldConfig);\n\t\tthis.mapTo = config.customTypeParams.toDriver;\n\t\tthis.mapFrom = config.customTypeParams.fromDriver;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn this.sqlName;\n\t}\n\n\toverride mapFromDriverValue(value: T['driverParam']): T['data'] {\n\t\treturn typeof this.mapFrom === 'function' ? this.mapFrom(value) : value as T['data'];\n\t}\n\n\toverride mapToDriverValue(value: T['data']): T['driverParam'] {\n\t\treturn typeof this.mapTo === 'function' ? this.mapTo(value) : value as T['data'];\n\t}\n}\n\nexport type CustomTypeValues = {\n\t/**\n\t * Required type for custom column, that will infer proper type model\n\t *\n\t * Examples:\n\t *\n\t * If you want your column to be `string` type after selecting/or on inserting - use `data: string`. Like `text`, `varchar`\n\t *\n\t * If you want your column to be `number` type after selecting/or on inserting - use `data: number`. Like `integer`\n\t */\n\tdata: unknown;\n\n\t/**\n\t * Type helper, that represents what type database driver is accepting for specific database data type\n\t */\n\tdriverData?: unknown;\n\n\t/**\n\t * What config type should be used for {@link CustomTypeParams} `dataType` generation\n\t */\n\tconfig?: Record;\n\n\t/**\n\t * Whether the config argument should be required or not\n\t * @default false\n\t */\n\tconfigRequired?: boolean;\n\n\t/**\n\t * If your custom data type should be notNull by default you can use `notNull: true`\n\t *\n\t * @example\n\t * const customSerial = customType<{ data: number, notNull: true, default: true }>({\n\t * \t dataType() {\n\t * \t return 'serial';\n\t * },\n\t * });\n\t */\n\tnotNull?: boolean;\n\n\t/**\n\t * If your custom data type has default you can use `default: true`\n\t *\n\t * @example\n\t * const customSerial = customType<{ data: number, notNull: true, default: true }>({\n\t * \t dataType() {\n\t * \t return 'serial';\n\t * },\n\t * });\n\t */\n\tdefault?: boolean;\n};\n\nexport interface CustomTypeParams {\n\t/**\n\t * Database data type string representation, that is used for migrations\n\t * @example\n\t * ```\n\t * `jsonb`, `text`\n\t * ```\n\t *\n\t * If database data type needs additional params you can use them from `config` param\n\t * @example\n\t * ```\n\t * `varchar(256)`, `numeric(2,3)`\n\t * ```\n\t *\n\t * To make `config` be of specific type please use config generic in {@link CustomTypeValues}\n\t *\n\t * @example\n\t * Usage example\n\t * ```\n\t * dataType() {\n\t * return 'boolean';\n\t * },\n\t * ```\n\t * Or\n\t * ```\n\t * dataType(config) {\n\t * \t return typeof config.length !== 'undefined' ? `varchar(${config.length})` : `varchar`;\n\t * \t }\n\t * ```\n\t */\n\tdataType: (config: T['config'] | (Equal extends true ? never : undefined)) => string;\n\n\t/**\n\t * Optional mapping function, between user input and driver\n\t * @example\n\t * For example, when using jsonb we need to map JS/TS object to string before writing to database\n\t * ```\n\t * toDriver(value: TData): string {\n\t * \t return JSON.stringify(value);\n\t * }\n\t * ```\n\t */\n\ttoDriver?: (value: T['data']) => T['driverData'] | SQL;\n\n\t/**\n\t * Optional mapping function, that is responsible for data mapping from database to JS/TS code\n\t * @example\n\t * For example, when using timestamp we need to map string Date representation to JS Date\n\t * ```\n\t * fromDriver(value: string): Date {\n\t * \treturn new Date(value);\n\t * },\n\t * ```\n\t */\n\tfromDriver?: (value: T['driverData']) => T['data'];\n}\n\n/**\n * Custom sqlite database data type generator\n */\nexport function customType(\n\tcustomTypeParams: CustomTypeParams,\n): Equal extends true ? {\n\t\t & T['config']>(\n\t\t\tfieldConfig: TConfig,\n\t\t): SQLiteCustomColumnBuilder>;\n\t\t(\n\t\t\tdbName: TName,\n\t\t\tfieldConfig: T['config'],\n\t\t): SQLiteCustomColumnBuilder>;\n\t}\n\t: {\n\t\t(): SQLiteCustomColumnBuilder>;\n\t\t & T['config']>(\n\t\t\tfieldConfig?: TConfig,\n\t\t): SQLiteCustomColumnBuilder>;\n\t\t(\n\t\t\tdbName: TName,\n\t\t\tfieldConfig?: T['config'],\n\t\t): SQLiteCustomColumnBuilder>;\n\t}\n{\n\treturn (\n\t\ta?: TName | T['config'],\n\t\tb?: T['config'],\n\t): SQLiteCustomColumnBuilder> => {\n\t\tconst { name, config } = getColumnNameAndConfig(a, b);\n\t\treturn new SQLiteCustomColumnBuilder(\n\t\t\tname as ConvertCustomConfig['name'],\n\t\t\tconfig,\n\t\t\tcustomTypeParams,\n\t\t);\n\t};\n}\n", "import type {\n\tColumnBuilderBaseConfig,\n\tColumnBuilderRuntimeConfig,\n\tColumnDataType,\n\tHasDefault,\n\tIsPrimaryKey,\n\tMakeColumnConfig,\n\tNotNull,\n} from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport { sql } from '~/sql/sql.ts';\nimport type { OnConflict } from '~/sqlite-core/utils.ts';\nimport { type Equal, getColumnNameAndConfig, type Or } from '~/utils.ts';\nimport type { AnySQLiteTable } from '../table.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport interface PrimaryKeyConfig {\n\tautoIncrement?: boolean;\n\tonConflict?: OnConflict;\n}\n\nexport abstract class SQLiteBaseIntegerBuilder<\n\tT extends ColumnBuilderBaseConfig,\n\tTRuntimeConfig extends object = object,\n> extends SQLiteColumnBuilder<\n\tT,\n\tTRuntimeConfig & { autoIncrement: boolean },\n\t{},\n\t{ primaryKeyHasDefault: true }\n> {\n\tstatic override readonly [entityKind]: string = 'SQLiteBaseIntegerBuilder';\n\n\tconstructor(name: T['name'], dataType: T['dataType'], columnType: T['columnType']) {\n\t\tsuper(name, dataType, columnType);\n\t\tthis.config.autoIncrement = false;\n\t}\n\n\toverride primaryKey(config?: PrimaryKeyConfig): IsPrimaryKey>> {\n\t\tif (config?.autoIncrement) {\n\t\t\tthis.config.autoIncrement = true;\n\t\t}\n\t\tthis.config.hasDefault = true;\n\t\treturn super.primaryKey() as IsPrimaryKey>>;\n\t}\n\n\t/** @internal */\n\tabstract override build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBaseInteger>;\n}\n\nexport abstract class SQLiteBaseInteger<\n\tT extends ColumnBaseConfig,\n\tTRuntimeConfig extends object = object,\n> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteBaseInteger';\n\n\treadonly autoIncrement: boolean = this.config.autoIncrement;\n\n\tgetSQLType(): string {\n\t\treturn 'integer';\n\t}\n}\n\nexport type SQLiteIntegerBuilderInitial = SQLiteIntegerBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'SQLiteInteger';\n\tdata: number;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteIntegerBuilder>\n\textends SQLiteBaseIntegerBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteIntegerBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'SQLiteInteger');\n\t}\n\n\tbuild(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteInteger> {\n\t\treturn new SQLiteInteger>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteInteger> extends SQLiteBaseInteger {\n\tstatic override readonly [entityKind]: string = 'SQLiteInteger';\n}\n\nexport type SQLiteTimestampBuilderInitial = SQLiteTimestampBuilder<{\n\tname: TName;\n\tdataType: 'date';\n\tcolumnType: 'SQLiteTimestamp';\n\tdata: Date;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteTimestampBuilder>\n\textends SQLiteBaseIntegerBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteTimestampBuilder';\n\n\tconstructor(name: T['name'], mode: 'timestamp' | 'timestamp_ms') {\n\t\tsuper(name, 'date', 'SQLiteTimestamp');\n\t\tthis.config.mode = mode;\n\t}\n\n\t/**\n\t * @deprecated Use `default()` with your own expression instead.\n\t *\n\t * Adds `DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer))` to the column, which is the current epoch timestamp in milliseconds.\n\t */\n\tdefaultNow(): HasDefault {\n\t\treturn this.default(sql`(cast((julianday('now') - 2440587.5)*86400000 as integer))`) as any;\n\t}\n\n\tbuild(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteTimestamp> {\n\t\treturn new SQLiteTimestamp>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteTimestamp>\n\textends SQLiteBaseInteger\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteTimestamp';\n\n\treadonly mode: 'timestamp' | 'timestamp_ms' = this.config.mode;\n\n\toverride mapFromDriverValue(value: number): Date {\n\t\tif (this.config.mode === 'timestamp') {\n\t\t\treturn new Date(value * 1000);\n\t\t}\n\t\treturn new Date(value);\n\t}\n\n\toverride mapToDriverValue(value: Date): number {\n\t\tconst unix = value.getTime();\n\t\tif (this.config.mode === 'timestamp') {\n\t\t\treturn Math.floor(unix / 1000);\n\t\t}\n\t\treturn unix;\n\t}\n}\n\nexport type SQLiteBooleanBuilderInitial = SQLiteBooleanBuilder<{\n\tname: TName;\n\tdataType: 'boolean';\n\tcolumnType: 'SQLiteBoolean';\n\tdata: boolean;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteBooleanBuilder>\n\textends SQLiteBaseIntegerBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBooleanBuilder';\n\n\tconstructor(name: T['name'], mode: 'boolean') {\n\t\tsuper(name, 'boolean', 'SQLiteBoolean');\n\t\tthis.config.mode = mode;\n\t}\n\n\tbuild(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBoolean> {\n\t\treturn new SQLiteBoolean>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteBoolean>\n\textends SQLiteBaseInteger\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBoolean';\n\n\treadonly mode: 'boolean' = this.config.mode;\n\n\toverride mapFromDriverValue(value: number): boolean {\n\t\treturn Number(value) === 1;\n\t}\n\n\toverride mapToDriverValue(value: boolean): number {\n\t\treturn value ? 1 : 0;\n\t}\n}\n\nexport interface IntegerConfig<\n\tTMode extends 'number' | 'timestamp' | 'timestamp_ms' | 'boolean' =\n\t\t| 'number'\n\t\t| 'timestamp'\n\t\t| 'timestamp_ms'\n\t\t| 'boolean',\n> {\n\tmode: TMode;\n}\n\nexport function integer(): SQLiteIntegerBuilderInitial<''>;\nexport function integer(\n\tconfig?: IntegerConfig,\n): Or, Equal> extends true ? SQLiteTimestampBuilderInitial<''>\n\t: Equal extends true ? SQLiteBooleanBuilderInitial<''>\n\t: SQLiteIntegerBuilderInitial<''>;\nexport function integer(\n\tname: TName,\n\tconfig?: IntegerConfig,\n): Or, Equal> extends true ? SQLiteTimestampBuilderInitial\n\t: Equal extends true ? SQLiteBooleanBuilderInitial\n\t: SQLiteIntegerBuilderInitial;\nexport function integer(a?: string | IntegerConfig, b?: IntegerConfig) {\n\tconst { name, config } = getColumnNameAndConfig(a, b);\n\tif (config?.mode === 'timestamp' || config?.mode === 'timestamp_ms') {\n\t\treturn new SQLiteTimestampBuilder(name, config.mode);\n\t}\n\tif (config?.mode === 'boolean') {\n\t\treturn new SQLiteBooleanBuilder(name, config.mode);\n\t}\n\treturn new SQLiteIntegerBuilder(name);\n}\n\nexport const int = integer;\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySQLiteTable } from '~/sqlite-core/table.ts';\nimport { type Equal, getColumnNameAndConfig } from '~/utils.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport type SQLiteNumericBuilderInitial = SQLiteNumericBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'SQLiteNumeric';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteNumericBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'string', 'SQLiteNumeric');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteNumeric> {\n\t\treturn new SQLiteNumeric>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteNumeric> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteNumeric';\n\n\toverride mapFromDriverValue(value: unknown): string {\n\t\tif (typeof value === 'string') return value;\n\n\t\treturn String(value);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn 'numeric';\n\t}\n}\n\nexport type SQLiteNumericNumberBuilderInitial = SQLiteNumericNumberBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'SQLiteNumericNumber';\n\tdata: number;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteNumericNumberBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericNumberBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'SQLiteNumericNumber');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteNumericNumber> {\n\t\treturn new SQLiteNumericNumber>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteNumericNumber> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericNumber';\n\n\toverride mapFromDriverValue(value: unknown): number {\n\t\tif (typeof value === 'number') return value;\n\n\t\treturn Number(value);\n\t}\n\n\toverride mapToDriverValue = String;\n\n\tgetSQLType(): string {\n\t\treturn 'numeric';\n\t}\n}\n\nexport type SQLiteNumericBigIntBuilderInitial = SQLiteNumericBigIntBuilder<{\n\tname: TName;\n\tdataType: 'bigint';\n\tcolumnType: 'SQLiteNumericBigInt';\n\tdata: bigint;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteNumericBigIntBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericBigIntBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'bigint', 'SQLiteNumericBigInt');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteNumericBigInt> {\n\t\treturn new SQLiteNumericBigInt>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteNumericBigInt> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericBigInt';\n\n\toverride mapFromDriverValue = BigInt;\n\n\toverride mapToDriverValue = String;\n\n\tgetSQLType(): string {\n\t\treturn 'numeric';\n\t}\n}\n\nexport type SQLiteNumericConfig = {\n\tmode: T;\n};\n\nexport function numeric(\n\tconfig?: SQLiteNumericConfig,\n): Equal extends true ? SQLiteNumericNumberBuilderInitial<''>\n\t: Equal extends true ? SQLiteNumericBigIntBuilderInitial<''>\n\t: SQLiteNumericBuilderInitial<''>;\nexport function numeric(\n\tname: TName,\n\tconfig?: SQLiteNumericConfig,\n): Equal extends true ? SQLiteNumericNumberBuilderInitial\n\t: Equal extends true ? SQLiteNumericBigIntBuilderInitial\n\t: SQLiteNumericBuilderInitial;\nexport function numeric(a?: string | SQLiteNumericConfig, b?: SQLiteNumericConfig) {\n\tconst { name, config } = getColumnNameAndConfig(a, b);\n\tconst mode = config?.mode;\n\treturn mode === 'number'\n\t\t? new SQLiteNumericNumberBuilder(name)\n\t\t: mode === 'bigint'\n\t\t? new SQLiteNumericBigIntBuilder(name)\n\t\t: new SQLiteNumericBuilder(name);\n}\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySQLiteTable } from '../table.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport type SQLiteRealBuilderInitial = SQLiteRealBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'SQLiteReal';\n\tdata: number;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteRealBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteRealBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'SQLiteReal');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteReal> {\n\t\treturn new SQLiteReal>(table, this.config as ColumnBuilderRuntimeConfig);\n\t}\n}\n\nexport class SQLiteReal> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteReal';\n\n\tgetSQLType(): string {\n\t\treturn 'real';\n\t}\n}\n\nexport function real(): SQLiteRealBuilderInitial<''>;\nexport function real(name: TName): SQLiteRealBuilderInitial;\nexport function real(name?: string) {\n\treturn new SQLiteRealBuilder(name ?? '');\n}\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySQLiteTable } from '~/sqlite-core/table.ts';\nimport { type Equal, getColumnNameAndConfig, type Writable } from '~/utils.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport type SQLiteTextBuilderInitial<\n\tTName extends string,\n\tTEnum extends [string, ...string[]],\n\tTLength extends number | undefined,\n> = SQLiteTextBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'SQLiteText';\n\tdata: TEnum[number];\n\tdriverParam: string;\n\tenumValues: TEnum;\n\tlength: TLength;\n}>;\n\nexport class SQLiteTextBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'SQLiteText'> & { length?: number | undefined },\n> extends SQLiteColumnBuilder<\n\tT,\n\t{ length: T['length']; enumValues: T['enumValues'] },\n\t{ length: T['length'] }\n> {\n\tstatic override readonly [entityKind]: string = 'SQLiteTextBuilder';\n\n\tconstructor(name: T['name'], config: SQLiteTextConfig<'text', T['enumValues'], T['length']>) {\n\t\tsuper(name, 'string', 'SQLiteText');\n\t\tthis.config.enumValues = config.enum;\n\t\tthis.config.length = config.length;\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteText & { length: T['length'] }> {\n\t\treturn new SQLiteText & { length: T['length'] }>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteText & { length?: number | undefined }>\n\textends SQLiteColumn\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteText';\n\n\toverride readonly enumValues = this.config.enumValues;\n\n\treadonly length: T['length'] = this.config.length;\n\n\tconstructor(\n\t\ttable: AnySQLiteTable<{ name: T['tableName'] }>,\n\t\tconfig: SQLiteTextBuilder['config'],\n\t) {\n\t\tsuper(table, config);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn `text${this.config.length ? `(${this.config.length})` : ''}`;\n\t}\n}\n\nexport type SQLiteTextJsonBuilderInitial = SQLiteTextJsonBuilder<{\n\tname: TName;\n\tdataType: 'json';\n\tcolumnType: 'SQLiteTextJson';\n\tdata: unknown;\n\tdriverParam: string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class SQLiteTextJsonBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteTextJsonBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'json', 'SQLiteTextJson');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteTextJson> {\n\t\treturn new SQLiteTextJson>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteTextJson>\n\textends SQLiteColumn\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteTextJson';\n\n\tgetSQLType(): string {\n\t\treturn 'text';\n\t}\n\n\toverride mapFromDriverValue(value: string): T['data'] {\n\t\treturn JSON.parse(value);\n\t}\n\n\toverride mapToDriverValue(value: T['data']): string {\n\t\treturn JSON.stringify(value);\n\t}\n}\n\nexport type SQLiteTextConfig<\n\tTMode extends 'text' | 'json' = 'text' | 'json',\n\tTEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined,\n\tTLength extends number | undefined = number | undefined,\n> = TMode extends 'text' ? {\n\t\tmode?: TMode;\n\t\tlength?: TLength;\n\t\tenum?: TEnum;\n\t}\n\t: {\n\t\tmode?: TMode;\n\t};\n\nexport function text(): SQLiteTextBuilderInitial<'', [string, ...string[]], undefined>;\nexport function text<\n\tU extends string,\n\tT extends Readonly<[U, ...U[]]>,\n\tL extends number | undefined,\n\tTMode extends 'text' | 'json' = 'text' | 'json',\n>(\n\tconfig?: SQLiteTextConfig, L>,\n): Equal extends true ? SQLiteTextJsonBuilderInitial<''>\n\t: SQLiteTextBuilderInitial<'', Writable, L>;\nexport function text<\n\tTName extends string,\n\tU extends string,\n\tT extends Readonly<[U, ...U[]]>,\n\tL extends number | undefined,\n\tTMode extends 'text' | 'json' = 'text' | 'json',\n>(\n\tname: TName,\n\tconfig?: SQLiteTextConfig, L>,\n): Equal extends true ? SQLiteTextJsonBuilderInitial\n\t: SQLiteTextBuilderInitial, L>;\nexport function text(a?: string | SQLiteTextConfig, b: SQLiteTextConfig = {}): any {\n\tconst { name, config } = getColumnNameAndConfig(a, b);\n\tif (config.mode === 'json') {\n\t\treturn new SQLiteTextJsonBuilder(name);\n\t}\n\treturn new SQLiteTextBuilder(name, config as any);\n}\n", "import { blob } from './blob.ts';\nimport { customType } from './custom.ts';\nimport { integer } from './integer.ts';\nimport { numeric } from './numeric.ts';\nimport { real } from './real.ts';\nimport { text } from './text.ts';\n\nexport function getSQLiteColumnBuilders() {\n\treturn {\n\t\tblob,\n\t\tcustomType,\n\t\tinteger,\n\t\tnumeric,\n\t\treal,\n\t\ttext,\n\t};\n}\n\nexport type SQLiteColumnBuilders = ReturnType;\n", "import type { BuildColumns, BuildExtraConfigColumns } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport { Table, type TableConfig as TableConfigBase, type UpdateTableConfig } from '~/table.ts';\nimport type { CheckBuilder } from './checks.ts';\nimport { getSQLiteColumnBuilders, type SQLiteColumnBuilders } from './columns/all.ts';\nimport type { SQLiteColumn, SQLiteColumnBuilder, SQLiteColumnBuilderBase } from './columns/common.ts';\nimport type { ForeignKey, ForeignKeyBuilder } from './foreign-keys.ts';\nimport type { IndexBuilder } from './indexes.ts';\nimport type { PrimaryKeyBuilder } from './primary-keys.ts';\nimport type { UniqueConstraintBuilder } from './unique-constraint.ts';\n\nexport type SQLiteTableExtraConfigValue =\n\t| IndexBuilder\n\t| CheckBuilder\n\t| ForeignKeyBuilder\n\t| PrimaryKeyBuilder\n\t| UniqueConstraintBuilder;\n\nexport type SQLiteTableExtraConfig = Record<\n\tstring,\n\tSQLiteTableExtraConfigValue\n>;\n\nexport type TableConfig = TableConfigBase>;\n\n/** @internal */\nexport const InlineForeignKeys = Symbol.for('drizzle:SQLiteInlineForeignKeys');\n\nexport class SQLiteTable extends Table {\n\tstatic override readonly [entityKind]: string = 'SQLiteTable';\n\n\t/** @internal */\n\tstatic override readonly Symbol = Object.assign({}, Table.Symbol, {\n\t\tInlineForeignKeys: InlineForeignKeys as typeof InlineForeignKeys,\n\t});\n\n\t/** @internal */\n\toverride [Table.Symbol.Columns]!: NonNullable;\n\n\t/** @internal */\n\t[InlineForeignKeys]: ForeignKey[] = [];\n\n\t/** @internal */\n\toverride [Table.Symbol.ExtraConfigBuilder]:\n\t\t| ((self: Record) => SQLiteTableExtraConfig)\n\t\t| undefined = undefined;\n}\n\nexport type AnySQLiteTable = {}> = SQLiteTable<\n\tUpdateTableConfig\n>;\n\nexport type SQLiteTableWithColumns =\n\t& SQLiteTable\n\t& {\n\t\t[Key in keyof T['columns']]: T['columns'][Key];\n\t};\n\nexport interface SQLiteTableFn {\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: TColumnsMap,\n\t\textraConfig?: (\n\t\t\tself: BuildColumns,\n\t\t) => SQLiteTableExtraConfigValue[],\n\t): SQLiteTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>;\n\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: (columnTypes: SQLiteColumnBuilders) => TColumnsMap,\n\t\textraConfig?: (self: BuildColumns) => SQLiteTableExtraConfigValue[],\n\t): SQLiteTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>;\n\t/**\n\t * @deprecated The third parameter of sqliteTable is changing and will only accept an array instead of an object\n\t *\n\t * @example\n\t * Deprecated version:\n\t * ```ts\n\t * export const users = sqliteTable(\"users\", {\n\t * \tid: int(),\n\t * }, (t) => ({\n\t * \tidx: index('custom_name').on(t.id)\n\t * }));\n\t * ```\n\t *\n\t * New API:\n\t * ```ts\n\t * export const users = sqliteTable(\"users\", {\n\t * \tid: int(),\n\t * }, (t) => [\n\t * \tindex('custom_name').on(t.id)\n\t * ]);\n\t * ```\n\t */\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: TColumnsMap,\n\t\textraConfig?: (self: BuildColumns) => SQLiteTableExtraConfig,\n\t): SQLiteTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>;\n\n\t/**\n\t * @deprecated The third parameter of sqliteTable is changing and will only accept an array instead of an object\n\t *\n\t * @example\n\t * Deprecated version:\n\t * ```ts\n\t * export const users = sqliteTable(\"users\", {\n\t * \tid: int(),\n\t * }, (t) => ({\n\t * \tidx: index('custom_name').on(t.id)\n\t * }));\n\t * ```\n\t *\n\t * New API:\n\t * ```ts\n\t * export const users = sqliteTable(\"users\", {\n\t * \tid: int(),\n\t * }, (t) => [\n\t * \tindex('custom_name').on(t.id)\n\t * ]);\n\t * ```\n\t */\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: (columnTypes: SQLiteColumnBuilders) => TColumnsMap,\n\t\textraConfig?: (self: BuildColumns) => SQLiteTableExtraConfig,\n\t): SQLiteTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>;\n}\n\nfunction sqliteTableBase<\n\tTTableName extends string,\n\tTColumnsMap extends Record,\n\tTSchema extends string | undefined,\n>(\n\tname: TTableName,\n\tcolumns: TColumnsMap | ((columnTypes: SQLiteColumnBuilders) => TColumnsMap),\n\textraConfig:\n\t\t| ((\n\t\t\tself: BuildColumns,\n\t\t) => SQLiteTableExtraConfig | SQLiteTableExtraConfigValue[])\n\t\t| undefined,\n\tschema?: TSchema,\n\tbaseName = name,\n): SQLiteTableWithColumns<{\n\tname: TTableName;\n\tschema: TSchema;\n\tcolumns: BuildColumns;\n\tdialect: 'sqlite';\n}> {\n\tconst rawTable = new SQLiteTable<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>(name, schema, baseName);\n\n\tconst parsedColumns: TColumnsMap = typeof columns === 'function' ? columns(getSQLiteColumnBuilders()) : columns;\n\n\tconst builtColumns = Object.fromEntries(\n\t\tObject.entries(parsedColumns).map(([name, colBuilderBase]) => {\n\t\t\tconst colBuilder = colBuilderBase as SQLiteColumnBuilder;\n\t\t\tcolBuilder.setName(name);\n\t\t\tconst column = colBuilder.build(rawTable);\n\t\t\trawTable[InlineForeignKeys].push(...colBuilder.buildForeignKeys(column, rawTable));\n\t\t\treturn [name, column];\n\t\t}),\n\t) as unknown as BuildColumns;\n\n\tconst table = Object.assign(rawTable, builtColumns);\n\n\ttable[Table.Symbol.Columns] = builtColumns;\n\ttable[Table.Symbol.ExtraConfigColumns] = builtColumns as unknown as BuildExtraConfigColumns<\n\t\tTTableName,\n\t\tTColumnsMap,\n\t\t'sqlite'\n\t>;\n\n\tif (extraConfig) {\n\t\ttable[SQLiteTable.Symbol.ExtraConfigBuilder] = extraConfig as (\n\t\t\tself: Record,\n\t\t) => SQLiteTableExtraConfig;\n\t}\n\n\treturn table;\n}\n\nexport const sqliteTable: SQLiteTableFn = (name, columns, extraConfig) => {\n\treturn sqliteTableBase(name, columns, extraConfig);\n};\n\nexport function sqliteTableCreator(customizeTableName: (name: string) => string): SQLiteTableFn {\n\treturn (name, columns, extraConfig) => {\n\t\treturn sqliteTableBase(customizeTableName(name) as typeof name, columns, extraConfig, undefined, name);\n\t};\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport class CheckBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteCheckBuilder';\n\n\tprotected brand!: 'SQLiteConstraintBuilder';\n\n\tconstructor(public name: string, public value: SQL) {}\n\n\tbuild(table: SQLiteTable): Check {\n\t\treturn new Check(table, this);\n\t}\n}\n\nexport class Check {\n\tstatic readonly [entityKind]: string = 'SQLiteCheck';\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteCheck';\n\t};\n\n\treadonly name: string;\n\treadonly value: SQL;\n\n\tconstructor(public table: SQLiteTable, builder: CheckBuilder) {\n\t\tthis.name = builder.name;\n\t\tthis.value = builder.value;\n\t}\n}\n\nexport function check(name: string, value: SQL): CheckBuilder {\n\treturn new CheckBuilder(name, value);\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { SQLiteColumn } from './columns/index.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport interface IndexConfig {\n\tname: string;\n\tcolumns: IndexColumn[];\n\tunique: boolean;\n\twhere: SQL | undefined;\n}\n\nexport type IndexColumn = SQLiteColumn | SQL;\n\nexport class IndexBuilderOn {\n\tstatic readonly [entityKind]: string = 'SQLiteIndexBuilderOn';\n\n\tconstructor(private name: string, private unique: boolean) {}\n\n\ton(...columns: [IndexColumn, ...IndexColumn[]]): IndexBuilder {\n\t\treturn new IndexBuilder(this.name, columns, this.unique);\n\t}\n}\n\nexport class IndexBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteIndexBuilder';\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteIndexBuilder';\n\t};\n\n\t/** @internal */\n\tconfig: IndexConfig;\n\n\tconstructor(name: string, columns: IndexColumn[], unique: boolean) {\n\t\tthis.config = {\n\t\t\tname,\n\t\t\tcolumns,\n\t\t\tunique,\n\t\t\twhere: undefined,\n\t\t};\n\t}\n\n\t/**\n\t * Condition for partial index.\n\t */\n\twhere(condition: SQL): this {\n\t\tthis.config.where = condition;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): Index {\n\t\treturn new Index(this.config, table);\n\t}\n}\n\nexport class Index {\n\tstatic readonly [entityKind]: string = 'SQLiteIndex';\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteIndex';\n\t};\n\n\treadonly config: IndexConfig & { table: SQLiteTable };\n\n\tconstructor(config: IndexConfig, table: SQLiteTable) {\n\t\tthis.config = { ...config, table };\n\t}\n}\n\nexport function index(name: string): IndexBuilderOn {\n\treturn new IndexBuilderOn(name, false);\n}\n\nexport function uniqueIndex(name: string): IndexBuilderOn {\n\treturn new IndexBuilderOn(name, true);\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { AnySQLiteColumn, SQLiteColumn } from './columns/index.ts';\nimport { SQLiteTable } from './table.ts';\n\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumn extends AnySQLiteColumn<{ tableName: TTableName }>,\n\tTColumns extends AnySQLiteColumn<{ tableName: TTableName }>[],\n>(config: { name?: string; columns: [TColumn, ...TColumns] }): PrimaryKeyBuilder;\n/**\n * @deprecated: Please use primaryKey({ columns: [] }) instead of this function\n * @param columns\n */\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumns extends AnySQLiteColumn<{ tableName: TTableName }>[],\n>(...columns: TColumns): PrimaryKeyBuilder;\nexport function primaryKey(...config: any) {\n\tif (config[0].columns) {\n\t\treturn new PrimaryKeyBuilder(config[0].columns, config[0].name);\n\t}\n\treturn new PrimaryKeyBuilder(config);\n}\nexport class PrimaryKeyBuilder {\n\tstatic readonly [entityKind]: string = 'SQLitePrimaryKeyBuilder';\n\n\tdeclare _: {\n\t\tbrand: 'SQLitePrimaryKeyBuilder';\n\t};\n\n\t/** @internal */\n\tcolumns: SQLiteColumn[];\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tcolumns: SQLiteColumn[],\n\t\tname?: string,\n\t) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): PrimaryKey {\n\t\treturn new PrimaryKey(table, this.columns, this.name);\n\t}\n}\n\nexport class PrimaryKey {\n\tstatic readonly [entityKind]: string = 'SQLitePrimaryKey';\n\n\treadonly columns: SQLiteColumn[];\n\treadonly name?: string;\n\n\tconstructor(readonly table: SQLiteTable, columns: SQLiteColumn[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\tgetName(): string {\n\t\treturn this.name\n\t\t\t?? `${this.table[SQLiteTable.Symbol.Name]}_${this.columns.map((column) => column.name).join('_')}_pk`;\n\t}\n}\n", "import { is } from '~/entity.ts';\nimport { SQL } from '~/sql/sql.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { Table } from '~/table.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport type { Check } from './checks.ts';\nimport { CheckBuilder } from './checks.ts';\nimport type { ForeignKey } from './foreign-keys.ts';\nimport { ForeignKeyBuilder } from './foreign-keys.ts';\nimport type { Index } from './indexes.ts';\nimport { IndexBuilder } from './indexes.ts';\nimport type { PrimaryKey } from './primary-keys.ts';\nimport { PrimaryKeyBuilder } from './primary-keys.ts';\nimport { SQLiteTable } from './table.ts';\nimport { type UniqueConstraint, UniqueConstraintBuilder } from './unique-constraint.ts';\nimport type { SQLiteViewBase } from './view-base.ts';\nimport type { SQLiteView } from './view.ts';\n\nexport function getTableConfig(table: TTable) {\n\tconst columns = Object.values(table[SQLiteTable.Symbol.Columns]);\n\tconst indexes: Index[] = [];\n\tconst checks: Check[] = [];\n\tconst primaryKeys: PrimaryKey[] = [];\n\tconst uniqueConstraints: UniqueConstraint[] = [];\n\tconst foreignKeys: ForeignKey[] = Object.values(table[SQLiteTable.Symbol.InlineForeignKeys]);\n\tconst name = table[Table.Symbol.Name];\n\n\tconst extraConfigBuilder = table[SQLiteTable.Symbol.ExtraConfigBuilder];\n\n\tif (extraConfigBuilder !== undefined) {\n\t\tconst extraConfig = extraConfigBuilder(table[SQLiteTable.Symbol.Columns]);\n\t\tconst extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) as any[] : Object.values(extraConfig);\n\t\tfor (const builder of Object.values(extraValues)) {\n\t\t\tif (is(builder, IndexBuilder)) {\n\t\t\t\tindexes.push(builder.build(table));\n\t\t\t} else if (is(builder, CheckBuilder)) {\n\t\t\t\tchecks.push(builder.build(table));\n\t\t\t} else if (is(builder, UniqueConstraintBuilder)) {\n\t\t\t\tuniqueConstraints.push(builder.build(table));\n\t\t\t} else if (is(builder, PrimaryKeyBuilder)) {\n\t\t\t\tprimaryKeys.push(builder.build(table));\n\t\t\t} else if (is(builder, ForeignKeyBuilder)) {\n\t\t\t\tforeignKeys.push(builder.build(table));\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tcolumns,\n\t\tindexes,\n\t\tforeignKeys,\n\t\tchecks,\n\t\tprimaryKeys,\n\t\tuniqueConstraints,\n\t\tname,\n\t};\n}\n\nexport function extractUsedTable(table: SQLiteTable | Subquery | SQLiteViewBase | SQL): string[] {\n\tif (is(table, SQLiteTable)) {\n\t\treturn [`${table[Table.Symbol.BaseName]}`];\n\t}\n\tif (is(table, Subquery)) {\n\t\treturn table._.usedTables ?? [];\n\t}\n\tif (is(table, SQL)) {\n\t\treturn table.usedTables ?? [];\n\t}\n\treturn [];\n}\n\nexport type OnConflict = 'rollback' | 'abort' | 'fail' | 'ignore' | 'replace';\n\nexport function getViewConfig<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n>(view: SQLiteView) {\n\treturn {\n\t\t...view[ViewBaseConfig],\n\t\t// ...view[SQLiteViewConfig],\n\t};\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { SelectResultFields } from '~/query-builders/select.types.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { Placeholder, Query, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteDialect } from '~/sqlite-core/dialect.ts';\nimport type { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/session.ts';\nimport { SQLiteTable } from '~/sqlite-core/table.ts';\nimport type { Subquery } from '~/subquery.ts';\nimport { Table } from '~/table.ts';\nimport { type DrizzleTypeError, orderSelectedFields, type ValueOrArray } from '~/utils.ts';\nimport type { SQLiteColumn } from '../columns/common.ts';\nimport { extractUsedTable } from '../utils.ts';\nimport type { SelectedFieldsFlat, SelectedFieldsOrdered } from './select.types.ts';\n\nexport type SQLiteDeleteWithout<\n\tT extends AnySQLiteDeleteBase,\n\tTDynamic extends boolean,\n\tK extends keyof T & string,\n> = TDynamic extends true ? T\n\t: Omit<\n\t\tSQLiteDeleteBase<\n\t\t\tT['_']['table'],\n\t\t\tT['_']['resultType'],\n\t\t\tT['_']['runResult'],\n\t\t\tT['_']['returning'],\n\t\t\tTDynamic,\n\t\t\tT['_']['excludedMethods'] | K\n\t\t>,\n\t\tT['_']['excludedMethods'] | K\n\t>;\n\nexport type SQLiteDelete<\n\tTTable extends SQLiteTable = SQLiteTable,\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = unknown,\n\tTReturning extends Record | undefined = undefined,\n> = SQLiteDeleteBase;\n\nexport interface SQLiteDeleteConfig {\n\twhere?: SQL | undefined;\n\tlimit?: number | Placeholder;\n\torderBy?: (SQLiteColumn | SQL | SQL.Aliased)[];\n\ttable: SQLiteTable;\n\treturning?: SelectedFieldsOrdered;\n\twithList?: Subquery[];\n}\n\nexport type SQLiteDeleteReturningAll<\n\tT extends AnySQLiteDeleteBase,\n\tTDynamic extends boolean,\n> = SQLiteDeleteWithout<\n\tSQLiteDeleteBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['table']['$inferSelect'],\n\t\tT['_']['dynamic'],\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteDeleteReturning<\n\tT extends AnySQLiteDeleteBase,\n\tTDynamic extends boolean,\n\tTSelectedFields extends SelectedFieldsFlat,\n> = SQLiteDeleteWithout<\n\tSQLiteDeleteBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tSelectResultFields,\n\t\tT['_']['dynamic'],\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteDeleteExecute = T['_']['returning'] extends undefined\n\t? T['_']['runResult']\n\t: T['_']['returning'][];\n\nexport type SQLiteDeletePrepare = SQLitePreparedQuery<{\n\ttype: T['_']['resultType'];\n\trun: T['_']['runResult'];\n\tall: T['_']['returning'] extends undefined ? DrizzleTypeError<'.all() cannot be used without .returning()'>\n\t\t: T['_']['returning'][];\n\tget: T['_']['returning'] extends undefined ? DrizzleTypeError<'.get() cannot be used without .returning()'>\n\t\t: T['_']['returning'] | undefined;\n\tvalues: T['_']['returning'] extends undefined ? DrizzleTypeError<'.values() cannot be used without .returning()'>\n\t\t: any[][];\n\texecute: SQLiteDeleteExecute;\n}>;\n\nexport type SQLiteDeleteDynamic = SQLiteDelete<\n\tT['_']['table'],\n\tT['_']['resultType'],\n\tT['_']['runResult'],\n\tT['_']['returning']\n>;\n\nexport type AnySQLiteDeleteBase = SQLiteDeleteBase;\n\nexport interface SQLiteDeleteBase<\n\tTTable extends SQLiteTable,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTReturning extends Record | undefined = undefined,\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n> extends\n\tQueryPromise,\n\tRunnableQuery,\n\tSQLWrapper\n{\n\treadonly _: {\n\t\tdialect: 'sqlite';\n\t\treadonly table: TTable;\n\t\treadonly resultType: TResultType;\n\t\treadonly runResult: TRunResult;\n\t\treadonly returning: TReturning;\n\t\treadonly dynamic: TDynamic;\n\t\treadonly excludedMethods: TExcludedMethods;\n\t\treadonly result: TReturning extends undefined ? TRunResult : TReturning[];\n\t};\n}\n\nexport class SQLiteDeleteBase<\n\tTTable extends SQLiteTable,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTReturning extends Record | undefined = undefined,\n\tTDynamic extends boolean = false,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTExcludedMethods extends string = never,\n> extends QueryPromise\n\timplements RunnableQuery, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteDelete';\n\n\t/** @internal */\n\tconfig: SQLiteDeleteConfig;\n\n\tconstructor(\n\t\tprivate table: TTable,\n\t\tprivate session: SQLiteSession,\n\t\tprivate dialect: SQLiteDialect,\n\t\twithList?: Subquery[],\n\t) {\n\t\tsuper();\n\t\tthis.config = { table, withList };\n\t}\n\n\t/**\n\t * Adds a `where` clause to the query.\n\t *\n\t * Calling this method will delete only those rows that fulfill a specified condition.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/delete}\n\t *\n\t * @param where the `where` clause.\n\t *\n\t * @example\n\t * You can use conditional operators and `sql function` to filter the rows to be deleted.\n\t *\n\t * ```ts\n\t * // Delete all cars with green color\n\t * db.delete(cars).where(eq(cars.color, 'green'));\n\t * // or\n\t * db.delete(cars).where(sql`${cars.color} = 'green'`)\n\t * ```\n\t *\n\t * You can logically combine conditional operators with `and()` and `or()` operators:\n\t *\n\t * ```ts\n\t * // Delete all BMW cars with a green color\n\t * db.delete(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW')));\n\t *\n\t * // Delete all cars with the green or blue color\n\t * db.delete(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue')));\n\t * ```\n\t */\n\twhere(where: SQL | undefined): SQLiteDeleteWithout {\n\t\tthis.config.where = where;\n\t\treturn this as any;\n\t}\n\n\torderBy(\n\t\tbuilder: (deleteTable: TTable) => ValueOrArray,\n\t): SQLiteDeleteWithout;\n\torderBy(...columns: (SQLiteColumn | SQL | SQL.Aliased)[]): SQLiteDeleteWithout;\n\torderBy(\n\t\t...columns:\n\t\t\t| [(deleteTable: TTable) => ValueOrArray]\n\t\t\t| (SQLiteColumn | SQL | SQL.Aliased)[]\n\t): SQLiteDeleteWithout {\n\t\tif (typeof columns[0] === 'function') {\n\t\t\tconst orderBy = columns[0](\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.table[Table.Symbol.Columns],\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'alias', sqlBehavior: 'sql' }),\n\t\t\t\t) as any,\n\t\t\t);\n\n\t\t\tconst orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy];\n\t\t\tthis.config.orderBy = orderByArray;\n\t\t} else {\n\t\t\tconst orderByArray = columns as (SQLiteColumn | SQL | SQL.Aliased)[];\n\t\t\tthis.config.orderBy = orderByArray;\n\t\t}\n\t\treturn this as any;\n\t}\n\n\tlimit(limit: number | Placeholder): SQLiteDeleteWithout {\n\t\tthis.config.limit = limit;\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `returning` clause to the query.\n\t *\n\t * Calling this method will return the specified fields of the deleted rows. If no fields are specified, all fields will be returned.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/delete#delete-with-return}\n\t *\n\t * @example\n\t * ```ts\n\t * // Delete all cars with the green color and return all fields\n\t * const deletedCars: Car[] = await db.delete(cars)\n\t * .where(eq(cars.color, 'green'))\n\t * .returning();\n\t *\n\t * // Delete all cars with the green color and return only their id and brand fields\n\t * const deletedCarsIdsAndBrands: { id: number, brand: string }[] = await db.delete(cars)\n\t * .where(eq(cars.color, 'green'))\n\t * .returning({ id: cars.id, brand: cars.brand });\n\t * ```\n\t */\n\treturning(): SQLiteDeleteReturningAll;\n\treturning(\n\t\tfields: TSelectedFields,\n\t): SQLiteDeleteReturning;\n\treturning(\n\t\tfields: SelectedFieldsFlat = this.table[SQLiteTable.Symbol.Columns],\n\t): SQLiteDeleteReturning {\n\t\tthis.config.returning = orderSelectedFields(fields);\n\t\treturn this as any;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildDeleteQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\t/** @internal */\n\t_prepare(isOneTimeQuery = true): SQLiteDeletePrepare {\n\t\treturn this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tthis.dialect.sqlToQuery(this.getSQL()),\n\t\t\tthis.config.returning,\n\t\t\tthis.config.returning ? 'all' : 'run',\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\ttype: 'delete',\n\t\t\t\ttables: extractUsedTable(this.config.table),\n\t\t\t},\n\t\t) as SQLiteDeletePrepare;\n\t}\n\n\tprepare(): SQLiteDeletePrepare {\n\t\treturn this._prepare(false);\n\t}\n\n\trun: ReturnType['run'] = (placeholderValues) => {\n\t\treturn this._prepare().run(placeholderValues);\n\t};\n\n\tall: ReturnType['all'] = (placeholderValues) => {\n\t\treturn this._prepare().all(placeholderValues);\n\t};\n\n\tget: ReturnType['get'] = (placeholderValues) => {\n\t\treturn this._prepare().get(placeholderValues);\n\t};\n\n\tvalues: ReturnType['values'] = (placeholderValues) => {\n\t\treturn this._prepare().values(placeholderValues);\n\t};\n\n\toverride async execute(placeholderValues?: Record): Promise> {\n\t\treturn this._prepare().execute(placeholderValues) as SQLiteDeleteExecute;\n\t}\n\n\t$dynamic(): SQLiteDeleteDynamic {\n\t\treturn this as any;\n\t}\n}\n", "import type { Column } from '~/column.ts';\nimport { entityKind } from './entity.ts';\nimport { Table } from './table.ts';\nimport type { Casing } from './utils.ts';\n\nexport function toSnakeCase(input: string) {\n\tconst words = input\n\t\t.replace(/['\\u2019]/g, '')\n\t\t.match(/[\\da-z]+|[A-Z]+(?![a-z])|[A-Z][\\da-z]+/g) ?? [];\n\n\treturn words.map((word) => word.toLowerCase()).join('_');\n}\n\nexport function toCamelCase(input: string) {\n\tconst words = input\n\t\t.replace(/['\\u2019]/g, '')\n\t\t.match(/[\\da-z]+|[A-Z]+(?![a-z])|[A-Z][\\da-z]+/g) ?? [];\n\n\treturn words.reduce((acc, word, i) => {\n\t\tconst formattedWord = i === 0 ? word.toLowerCase() : `${word[0]!.toUpperCase()}${word.slice(1)}`;\n\t\treturn acc + formattedWord;\n\t}, '');\n}\n\nfunction noopCase(input: string) {\n\treturn input;\n}\n\nexport class CasingCache {\n\tstatic readonly [entityKind]: string = 'CasingCache';\n\n\t/** @internal */\n\tcache: Record = {};\n\tprivate cachedTables: Record = {};\n\tprivate convert: (input: string) => string;\n\n\tconstructor(casing?: Casing) {\n\t\tthis.convert = casing === 'snake_case'\n\t\t\t? toSnakeCase\n\t\t\t: casing === 'camelCase'\n\t\t\t? toCamelCase\n\t\t\t: noopCase;\n\t}\n\n\tgetColumnCasing(column: Column): string {\n\t\tif (!column.keyAsName) return column.name;\n\n\t\tconst schema = column.table[Table.Symbol.Schema] ?? 'public';\n\t\tconst tableName = column.table[Table.Symbol.OriginalName];\n\t\tconst key = `${schema}.${tableName}.${column.name}`;\n\n\t\tif (!this.cache[key]) {\n\t\t\tthis.cacheTable(column.table);\n\t\t}\n\t\treturn this.cache[key]!;\n\t}\n\n\tprivate cacheTable(table: Table) {\n\t\tconst schema = table[Table.Symbol.Schema] ?? 'public';\n\t\tconst tableName = table[Table.Symbol.OriginalName];\n\t\tconst tableKey = `${schema}.${tableName}`;\n\n\t\tif (!this.cachedTables[tableKey]) {\n\t\t\tfor (const column of Object.values(table[Table.Symbol.Columns])) {\n\t\t\t\tconst columnKey = `${tableKey}.${column.name}`;\n\t\t\t\tthis.cache[columnKey] = this.convert(column.name);\n\t\t\t}\n\t\t\tthis.cachedTables[tableKey] = true;\n\t\t}\n\t}\n\n\tclearCache() {\n\t\tthis.cache = {};\n\t\tthis.cachedTables = {};\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\n\nexport class DrizzleError extends Error {\n\tstatic readonly [entityKind]: string = 'DrizzleError';\n\n\tconstructor({ message, cause }: { message?: string; cause?: unknown }) {\n\t\tsuper(message);\n\t\tthis.name = 'DrizzleError';\n\t\tthis.cause = cause;\n\t}\n}\n\nexport class DrizzleQueryError extends Error {\n\tconstructor(\n\t\tpublic query: string,\n\t\tpublic params: any[],\n\t\tpublic override cause?: Error,\n\t) {\n\t\tsuper(`Failed query: ${query}\\nparams: ${params}`);\n\t\tError.captureStackTrace(this, DrizzleQueryError);\n\n\t\t// ES2022+: preserves original error on `.cause`\n\t\tif (cause) (this as any).cause = cause;\n\t}\n}\n\nexport class TransactionRollbackError extends DrizzleError {\n\tstatic override readonly [entityKind]: string = 'TransactionRollbackError';\n\n\tconstructor() {\n\t\tsuper({ message: 'Rollback' });\n\t}\n}\n", "import { type AnyColumn, Column } from '~/column.ts';\nimport { is } from '~/entity.ts';\nimport { type SQL, sql, type SQLWrapper } from '../sql.ts';\n\n/**\n * Returns the number of values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Number employees with null values\n * db.select({ value: count() }).from(employees)\n * // Number of employees where `name` is not null\n * db.select({ value: count(employees.name) }).from(employees)\n * ```\n *\n * @see countDistinct to get the number of non-duplicate values in `expression`\n */\nexport function count(expression?: SQLWrapper): SQL {\n\treturn sql`count(${expression || sql.raw('*')})`.mapWith(Number);\n}\n\n/**\n * Returns the number of non-duplicate values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Number of employees where `name` is distinct\n * db.select({ value: countDistinct(employees.name) }).from(employees)\n * ```\n *\n * @see count to get the number of values in `expression`, including duplicates\n */\nexport function countDistinct(expression: SQLWrapper): SQL {\n\treturn sql`count(distinct ${expression})`.mapWith(Number);\n}\n\n/**\n * Returns the average (arithmetic mean) of all non-null values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Average salary of an employee\n * db.select({ value: avg(employees.salary) }).from(employees)\n * ```\n *\n * @see avgDistinct to get the average of all non-null and non-duplicate values in `expression`\n */\nexport function avg(expression: SQLWrapper): SQL {\n\treturn sql`avg(${expression})`.mapWith(String);\n}\n\n/**\n * Returns the average (arithmetic mean) of all non-null and non-duplicate values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Average salary of an employee where `salary` is distinct\n * db.select({ value: avgDistinct(employees.salary) }).from(employees)\n * ```\n *\n * @see avg to get the average of all non-null values in `expression`, including duplicates\n */\nexport function avgDistinct(expression: SQLWrapper): SQL {\n\treturn sql`avg(distinct ${expression})`.mapWith(String);\n}\n\n/**\n * Returns the sum of all non-null values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Sum of every employee's salary\n * db.select({ value: sum(employees.salary) }).from(employees)\n * ```\n *\n * @see sumDistinct to get the sum of all non-null and non-duplicate values in `expression`\n */\nexport function sum(expression: SQLWrapper): SQL {\n\treturn sql`sum(${expression})`.mapWith(String);\n}\n\n/**\n * Returns the sum of all non-null and non-duplicate values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Sum of every employee's salary where `salary` is distinct (no duplicates)\n * db.select({ value: sumDistinct(employees.salary) }).from(employees)\n * ```\n *\n * @see sum to get the sum of all non-null values in `expression`, including duplicates\n */\nexport function sumDistinct(expression: SQLWrapper): SQL {\n\treturn sql`sum(distinct ${expression})`.mapWith(String);\n}\n\n/**\n * Returns the maximum value in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // The employee with the highest salary\n * db.select({ value: max(employees.salary) }).from(employees)\n * ```\n */\nexport function max(expression: T): SQL<(T extends AnyColumn ? T['_']['data'] : string) | null> {\n\treturn sql`max(${expression})`.mapWith(is(expression, Column) ? expression : String) as any;\n}\n\n/**\n * Returns the minimum value in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // The employee with the lowest salary\n * db.select({ value: min(employees.salary) }).from(employees)\n * ```\n */\nexport function min(expression: T): SQL<(T extends AnyColumn ? T['_']['data'] : string) | null> {\n\treturn sql`min(${expression})`.mapWith(is(expression, Column) ? expression : String) as any;\n}\n", "import type { AnyColumn } from '~/column.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport { type SQL, sql, type SQLWrapper } from '../sql.ts';\n\nfunction toSql(value: number[] | string[]): string {\n\treturn JSON.stringify(value);\n}\n\n/**\n * Used in sorting and in querying, if used in sorting,\n * this specifies that the given column or expression should be sorted in an order\n * that minimizes the L2 distance to the given value.\n * If used in querying, this specifies that it should return the L2 distance\n * between the given column or expression and the given value.\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(l2Distance(cars.embedding, embedding));\n * ```\n *\n * ```ts\n * // Select distance of cars and embedding\n * // to the given embedding\n * db.select({distance: l2Distance(cars.embedding, embedding)}).from(cars)\n * ```\n */\nexport function l2Distance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <-> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <-> ${value}`;\n}\n\n/**\n * L1 distance is one of the possible distance measures between two probability distribution vectors and it is\n * calculated as the sum of the absolute differences.\n * The smaller the distance between the observed probability vectors, the higher the accuracy of the synthetic data\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(l1Distance(cars.embedding, embedding));\n * ```\n *\n * ```ts\n * // Select distance of cars and embedding\n * // to the given embedding\n * db.select({distance: l1Distance(cars.embedding, embedding)}).from(cars)\n * ```\n */\nexport function l1Distance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <+> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <+> ${value}`;\n}\n\n/**\n * Used in sorting and in querying, if used in sorting,\n * this specifies that the given column or expression should be sorted in an order\n * that minimizes the inner product distance to the given value.\n * If used in querying, this specifies that it should return the inner product distance\n * between the given column or expression and the given value.\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(innerProduct(cars.embedding, embedding));\n * ```\n *\n * ```ts\n * // Select distance of cars and embedding\n * // to the given embedding\n * db.select({ distance: innerProduct(cars.embedding, embedding) }).from(cars)\n * ```\n */\nexport function innerProduct(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <#> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <#> ${value}`;\n}\n\n/**\n * Used in sorting and in querying, if used in sorting,\n * this specifies that the given column or expression should be sorted in an order\n * that minimizes the cosine distance to the given value.\n * If used in querying, this specifies that it should return the cosine distance\n * between the given column or expression and the given value.\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(cosineDistance(cars.embedding, embedding));\n * ```\n *\n * ```ts\n * // Select distance of cars and embedding\n * // to the given embedding\n * db.select({distance: cosineDistance(cars.embedding, embedding)}).from(cars)\n * ```\n */\nexport function cosineDistance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <=> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <=> ${value}`;\n}\n\n/**\n * Hamming distance between two strings or vectors of equal length is the number of positions at which the\n * corresponding symbols are different. In other words, it measures the minimum number of\n * substitutions required to change one string into the other, or equivalently,\n * the minimum number of errors that could have transformed one string into the other\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(hammingDistance(cars.embedding, embedding));\n * ```\n */\nexport function hammingDistance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <~> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <~> ${value}`;\n}\n\n/**\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(jaccardDistance(cars.embedding, embedding));\n * ```\n */\nexport function jaccardDistance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <%> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <%> ${value}`;\n}\n", "export * from './aggregate.ts';\nexport * from './vector.ts';\n", "export * from './expressions/index.ts';\nexport * from './functions/index.ts';\nexport * from './sql.ts';\n", "export * from './blob.ts';\nexport * from './common.ts';\nexport * from './custom.ts';\nexport * from './integer.ts';\nexport * from './numeric.ts';\nexport * from './real.ts';\nexport * from './text.ts';\n", "import { entityKind } from '~/entity.ts';\nimport type { ColumnsSelection } from '~/sql/sql.ts';\nimport { View } from '~/sql/sql.ts';\n\nexport abstract class SQLiteViewBase<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n\tTSelection extends ColumnsSelection = ColumnsSelection,\n> extends View {\n\tstatic override readonly [entityKind]: string = 'SQLiteViewBase';\n\n\tdeclare _: View['_'] & {\n\t\tviewBrand: 'SQLiteView';\n\t};\n}\n", "import { aliasedTable, aliasedTableColumn, mapColumnsInAliasedSQLToAlias, mapColumnsInSQLToAlias } from '~/alias.ts';\nimport { CasingCache } from '~/casing.ts';\nimport type { AnyColumn } from '~/column.ts';\nimport { Column } from '~/column.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport { DrizzleError } from '~/errors.ts';\nimport type { MigrationConfig, MigrationMeta } from '~/migrator.ts';\nimport {\n\ttype BuildRelationalQueryResult,\n\ttype DBQueryConfig,\n\tgetOperators,\n\tgetOrderByOperators,\n\tMany,\n\tnormalizeRelation,\n\tOne,\n\ttype Relation,\n\ttype TableRelationalConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport type { Name, Placeholder } from '~/sql/index.ts';\nimport { and, eq } from '~/sql/index.ts';\nimport { Param, type QueryWithTypings, SQL, sql, type SQLChunk } from '~/sql/sql.ts';\nimport { SQLiteColumn } from '~/sqlite-core/columns/index.ts';\nimport type {\n\tAnySQLiteSelectQueryBuilder,\n\tSQLiteDeleteConfig,\n\tSQLiteInsertConfig,\n\tSQLiteUpdateConfig,\n} from '~/sqlite-core/query-builders/index.ts';\nimport { SQLiteTable } from '~/sqlite-core/table.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { getTableName, getTableUniqueName, Table } from '~/table.ts';\nimport { type Casing, orderSelectedFields, type UpdateSet } from '~/utils.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport type {\n\tSelectedFieldsOrdered,\n\tSQLiteSelectConfig,\n\tSQLiteSelectJoinConfig,\n} from './query-builders/select.types.ts';\nimport type { SQLiteSession } from './session.ts';\nimport { SQLiteViewBase } from './view-base.ts';\n\nexport interface SQLiteDialectConfig {\n\tcasing?: Casing;\n}\n\nexport abstract class SQLiteDialect {\n\tstatic readonly [entityKind]: string = 'SQLiteDialect';\n\n\t/** @internal */\n\treadonly casing: CasingCache;\n\n\tconstructor(config?: SQLiteDialectConfig) {\n\t\tthis.casing = new CasingCache(config?.casing);\n\t}\n\n\tescapeName(name: string): string {\n\t\treturn `\"${name}\"`;\n\t}\n\n\tescapeParam(_num: number): string {\n\t\treturn '?';\n\t}\n\n\tescapeString(str: string): string {\n\t\treturn `'${str.replace(/'/g, \"''\")}'`;\n\t}\n\n\tprivate buildWithCTE(queries: Subquery[] | undefined): SQL | undefined {\n\t\tif (!queries?.length) return undefined;\n\n\t\tconst withSqlChunks = [sql`with `];\n\t\tfor (const [i, w] of queries.entries()) {\n\t\t\twithSqlChunks.push(sql`${sql.identifier(w._.alias)} as (${w._.sql})`);\n\t\t\tif (i < queries.length - 1) {\n\t\t\t\twithSqlChunks.push(sql`, `);\n\t\t\t}\n\t\t}\n\t\twithSqlChunks.push(sql` `);\n\t\treturn sql.join(withSqlChunks);\n\t}\n\n\tbuildDeleteQuery({ table, where, returning, withList, limit, orderBy }: SQLiteDeleteConfig): SQL {\n\t\tconst withSql = this.buildWithCTE(withList);\n\n\t\tconst returningSql = returning\n\t\t\t? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}`\n\t\t\t: undefined;\n\n\t\tconst whereSql = where ? sql` where ${where}` : undefined;\n\n\t\tconst orderBySql = this.buildOrderBy(orderBy);\n\n\t\tconst limitSql = this.buildLimit(limit);\n\n\t\treturn sql`${withSql}delete from ${table}${whereSql}${returningSql}${orderBySql}${limitSql}`;\n\t}\n\n\tbuildUpdateSet(table: SQLiteTable, set: UpdateSet): SQL {\n\t\tconst tableColumns = table[Table.Symbol.Columns];\n\n\t\tconst columnNames = Object.keys(tableColumns).filter((colName) =>\n\t\t\tset[colName] !== undefined || tableColumns[colName]?.onUpdateFn !== undefined\n\t\t);\n\n\t\tconst setSize = columnNames.length;\n\t\treturn sql.join(columnNames.flatMap((colName, i) => {\n\t\t\tconst col = tableColumns[colName]!;\n\n\t\t\tconst value = set[colName] ?? sql.param(col.onUpdateFn!(), col);\n\t\t\tconst res = sql`${sql.identifier(this.casing.getColumnCasing(col))} = ${value}`;\n\n\t\t\tif (i < setSize - 1) {\n\t\t\t\treturn [res, sql.raw(', ')];\n\t\t\t}\n\t\t\treturn [res];\n\t\t}));\n\t}\n\n\tbuildUpdateQuery({ table, set, where, returning, withList, joins, from, limit, orderBy }: SQLiteUpdateConfig): SQL {\n\t\tconst withSql = this.buildWithCTE(withList);\n\n\t\tconst setSql = this.buildUpdateSet(table, set);\n\n\t\tconst fromSql = from && sql.join([sql.raw(' from '), this.buildFromTable(from)]);\n\n\t\tconst joinsSql = this.buildJoins(joins);\n\n\t\tconst returningSql = returning\n\t\t\t? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}`\n\t\t\t: undefined;\n\n\t\tconst whereSql = where ? sql` where ${where}` : undefined;\n\n\t\tconst orderBySql = this.buildOrderBy(orderBy);\n\n\t\tconst limitSql = this.buildLimit(limit);\n\n\t\treturn sql`${withSql}update ${table} set ${setSql}${fromSql}${joinsSql}${whereSql}${returningSql}${orderBySql}${limitSql}`;\n\t}\n\n\t/**\n\t * Builds selection SQL with provided fields/expressions\n\t *\n\t * Examples:\n\t *\n\t * `select from`\n\t *\n\t * `insert ... returning `\n\t *\n\t * If `isSingleTable` is true, then columns won't be prefixed with table name\n\t */\n\tprivate buildSelection(\n\t\tfields: SelectedFieldsOrdered,\n\t\t{ isSingleTable = false }: { isSingleTable?: boolean } = {},\n\t): SQL {\n\t\tconst columnsLen = fields.length;\n\n\t\tconst chunks = fields\n\t\t\t.flatMap(({ field }, i) => {\n\t\t\t\tconst chunk: SQLChunk[] = [];\n\n\t\t\t\tif (is(field, SQL.Aliased) && field.isSelectionField) {\n\t\t\t\t\tchunk.push(sql.identifier(field.fieldAlias));\n\t\t\t\t} else if (is(field, SQL.Aliased) || is(field, SQL)) {\n\t\t\t\t\tconst query = is(field, SQL.Aliased) ? field.sql : field;\n\n\t\t\t\t\tif (isSingleTable) {\n\t\t\t\t\t\tchunk.push(\n\t\t\t\t\t\t\tnew SQL(\n\t\t\t\t\t\t\t\tquery.queryChunks.map((c) => {\n\t\t\t\t\t\t\t\t\tif (is(c, Column)) {\n\t\t\t\t\t\t\t\t\t\treturn sql.identifier(this.casing.getColumnCasing(c));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn c;\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchunk.push(query);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (is(field, SQL.Aliased)) {\n\t\t\t\t\t\tchunk.push(sql` as ${sql.identifier(field.fieldAlias)}`);\n\t\t\t\t\t}\n\t\t\t\t} else if (is(field, Column)) {\n\t\t\t\t\tconst tableName = field.table[Table.Symbol.Name];\n\t\t\t\t\tif (field.columnType === 'SQLiteNumericBigInt') {\n\t\t\t\t\t\tif (isSingleTable) {\n\t\t\t\t\t\t\tchunk.push(sql`cast(${sql.identifier(this.casing.getColumnCasing(field))} as text)`);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchunk.push(\n\t\t\t\t\t\t\t\tsql`cast(${sql.identifier(tableName)}.${sql.identifier(this.casing.getColumnCasing(field))} as text)`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (isSingleTable) {\n\t\t\t\t\t\t\tchunk.push(sql.identifier(this.casing.getColumnCasing(field)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchunk.push(sql`${sql.identifier(tableName)}.${sql.identifier(this.casing.getColumnCasing(field))}`);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (i < columnsLen - 1) {\n\t\t\t\t\tchunk.push(sql`, `);\n\t\t\t\t}\n\n\t\t\t\treturn chunk;\n\t\t\t});\n\n\t\treturn sql.join(chunks);\n\t}\n\n\tprivate buildJoins(joins: SQLiteSelectJoinConfig[] | undefined): SQL | undefined {\n\t\tif (!joins || joins.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst joinsArray: SQL[] = [];\n\n\t\tif (joins) {\n\t\t\tfor (const [index, joinMeta] of joins.entries()) {\n\t\t\t\tif (index === 0) {\n\t\t\t\t\tjoinsArray.push(sql` `);\n\t\t\t\t}\n\t\t\t\tconst table = joinMeta.table;\n\t\t\t\tconst onSql = joinMeta.on ? sql` on ${joinMeta.on}` : undefined;\n\n\t\t\t\tif (is(table, SQLiteTable)) {\n\t\t\t\t\tconst tableName = table[SQLiteTable.Symbol.Name];\n\t\t\t\t\tconst tableSchema = table[SQLiteTable.Symbol.Schema];\n\t\t\t\t\tconst origTableName = table[SQLiteTable.Symbol.OriginalName];\n\t\t\t\t\tconst alias = tableName === origTableName ? undefined : joinMeta.alias;\n\t\t\t\t\tjoinsArray.push(\n\t\t\t\t\t\tsql`${sql.raw(joinMeta.joinType)} join ${tableSchema ? sql`${sql.identifier(tableSchema)}.` : undefined}${\n\t\t\t\t\t\t\tsql.identifier(origTableName)\n\t\t\t\t\t\t}${alias && sql` ${sql.identifier(alias)}`}${onSql}`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tjoinsArray.push(\n\t\t\t\t\t\tsql`${sql.raw(joinMeta.joinType)} join ${table}${onSql}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (index < joins.length - 1) {\n\t\t\t\t\tjoinsArray.push(sql` `);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn sql.join(joinsArray);\n\t}\n\n\tprivate buildLimit(limit: number | Placeholder | undefined): SQL | undefined {\n\t\treturn typeof limit === 'object' || (typeof limit === 'number' && limit >= 0)\n\t\t\t? sql` limit ${limit}`\n\t\t\t: undefined;\n\t}\n\n\tprivate buildOrderBy(orderBy: (SQLiteColumn | SQL | SQL.Aliased)[] | undefined): SQL | undefined {\n\t\tconst orderByList: (SQLiteColumn | SQL | SQL.Aliased)[] = [];\n\n\t\tif (orderBy) {\n\t\t\tfor (const [index, orderByValue] of orderBy.entries()) {\n\t\t\t\torderByList.push(orderByValue);\n\n\t\t\t\tif (index < orderBy.length - 1) {\n\t\t\t\t\torderByList.push(sql`, `);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn orderByList.length > 0 ? sql` order by ${sql.join(orderByList)}` : undefined;\n\t}\n\n\tprivate buildFromTable(\n\t\ttable: SQL | Subquery | SQLiteViewBase | SQLiteTable | undefined,\n\t): SQL | Subquery | SQLiteViewBase | SQLiteTable | undefined {\n\t\tif (is(table, Table) && table[Table.Symbol.IsAlias]) {\n\t\t\treturn sql`${sql`${sql.identifier(table[Table.Symbol.Schema] ?? '')}.`.if(table[Table.Symbol.Schema])}${\n\t\t\t\tsql.identifier(table[Table.Symbol.OriginalName])\n\t\t\t} ${sql.identifier(table[Table.Symbol.Name])}`;\n\t\t}\n\n\t\treturn table;\n\t}\n\n\tbuildSelectQuery(\n\t\t{\n\t\t\twithList,\n\t\t\tfields,\n\t\t\tfieldsFlat,\n\t\t\twhere,\n\t\t\thaving,\n\t\t\ttable,\n\t\t\tjoins,\n\t\t\torderBy,\n\t\t\tgroupBy,\n\t\t\tlimit,\n\t\t\toffset,\n\t\t\tdistinct,\n\t\t\tsetOperators,\n\t\t}: SQLiteSelectConfig,\n\t): SQL {\n\t\tconst fieldsList = fieldsFlat ?? orderSelectedFields(fields);\n\t\tfor (const f of fieldsList) {\n\t\t\tif (\n\t\t\t\tis(f.field, Column)\n\t\t\t\t&& getTableName(f.field.table)\n\t\t\t\t\t!== (is(table, Subquery)\n\t\t\t\t\t\t? table._.alias\n\t\t\t\t\t\t: is(table, SQLiteViewBase)\n\t\t\t\t\t\t? table[ViewBaseConfig].name\n\t\t\t\t\t\t: is(table, SQL)\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: getTableName(table))\n\t\t\t\t&& !((table) =>\n\t\t\t\t\tjoins?.some(({ alias }) =>\n\t\t\t\t\t\talias === (table[Table.Symbol.IsAlias] ? getTableName(table) : table[Table.Symbol.BaseName])\n\t\t\t\t\t))(f.field.table)\n\t\t\t) {\n\t\t\t\tconst tableName = getTableName(f.field.table);\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Your \"${\n\t\t\t\t\t\tf.path.join('->')\n\t\t\t\t\t}\" field references a column \"${tableName}\".\"${f.field.name}\", but the table \"${tableName}\" is not part of the query! Did you forget to join it?`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst isSingleTable = !joins || joins.length === 0;\n\n\t\tconst withSql = this.buildWithCTE(withList);\n\n\t\tconst distinctSql = distinct ? sql` distinct` : undefined;\n\n\t\tconst selection = this.buildSelection(fieldsList, { isSingleTable });\n\n\t\tconst tableSql = this.buildFromTable(table);\n\n\t\tconst joinsSql = this.buildJoins(joins);\n\n\t\tconst whereSql = where ? sql` where ${where}` : undefined;\n\n\t\tconst havingSql = having ? sql` having ${having}` : undefined;\n\n\t\tconst groupByList: (SQL | AnyColumn | SQL.Aliased)[] = [];\n\t\tif (groupBy) {\n\t\t\tfor (const [index, groupByValue] of groupBy.entries()) {\n\t\t\t\tgroupByList.push(groupByValue);\n\n\t\t\t\tif (index < groupBy.length - 1) {\n\t\t\t\t\tgroupByList.push(sql`, `);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst groupBySql = groupByList.length > 0 ? sql` group by ${sql.join(groupByList)}` : undefined;\n\n\t\tconst orderBySql = this.buildOrderBy(orderBy);\n\n\t\tconst limitSql = this.buildLimit(limit);\n\n\t\tconst offsetSql = offset ? sql` offset ${offset}` : undefined;\n\n\t\tconst finalQuery =\n\t\t\tsql`${withSql}select${distinctSql} ${selection} from ${tableSql}${joinsSql}${whereSql}${groupBySql}${havingSql}${orderBySql}${limitSql}${offsetSql}`;\n\n\t\tif (setOperators.length > 0) {\n\t\t\treturn this.buildSetOperations(finalQuery, setOperators);\n\t\t}\n\n\t\treturn finalQuery;\n\t}\n\n\tbuildSetOperations(leftSelect: SQL, setOperators: SQLiteSelectConfig['setOperators']): SQL {\n\t\tconst [setOperator, ...rest] = setOperators;\n\n\t\tif (!setOperator) {\n\t\t\tthrow new Error('Cannot pass undefined values to any set operator');\n\t\t}\n\n\t\tif (rest.length === 0) {\n\t\t\treturn this.buildSetOperationQuery({ leftSelect, setOperator });\n\t\t}\n\n\t\t// Some recursive magic here\n\t\treturn this.buildSetOperations(\n\t\t\tthis.buildSetOperationQuery({ leftSelect, setOperator }),\n\t\t\trest,\n\t\t);\n\t}\n\n\tbuildSetOperationQuery({\n\t\tleftSelect,\n\t\tsetOperator: { type, isAll, rightSelect, limit, orderBy, offset },\n\t}: { leftSelect: SQL; setOperator: SQLiteSelectConfig['setOperators'][number] }): SQL {\n\t\t// SQLite doesn't support parenthesis in set operations\n\t\tconst leftChunk = sql`${leftSelect.getSQL()} `;\n\t\tconst rightChunk = sql`${rightSelect.getSQL()}`;\n\n\t\tlet orderBySql;\n\t\tif (orderBy && orderBy.length > 0) {\n\t\t\tconst orderByValues: (SQL | Name)[] = [];\n\n\t\t\t// The next bit is necessary because the sql operator replaces ${table.column} with `table`.`column`\n\t\t\t// which is invalid Sql syntax, Table from one of the SELECTs cannot be used in global ORDER clause\n\t\t\tfor (const singleOrderBy of orderBy) {\n\t\t\t\tif (is(singleOrderBy, SQLiteColumn)) {\n\t\t\t\t\torderByValues.push(sql.identifier(singleOrderBy.name));\n\t\t\t\t} else if (is(singleOrderBy, SQL)) {\n\t\t\t\t\tfor (let i = 0; i < singleOrderBy.queryChunks.length; i++) {\n\t\t\t\t\t\tconst chunk = singleOrderBy.queryChunks[i];\n\n\t\t\t\t\t\tif (is(chunk, SQLiteColumn)) {\n\t\t\t\t\t\t\tsingleOrderBy.queryChunks[i] = sql.identifier(this.casing.getColumnCasing(chunk));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\torderByValues.push(sql`${singleOrderBy}`);\n\t\t\t\t} else {\n\t\t\t\t\torderByValues.push(sql`${singleOrderBy}`);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\torderBySql = sql` order by ${sql.join(orderByValues, sql`, `)}`;\n\t\t}\n\n\t\tconst limitSql = typeof limit === 'object' || (typeof limit === 'number' && limit >= 0)\n\t\t\t? sql` limit ${limit}`\n\t\t\t: undefined;\n\n\t\tconst operatorChunk = sql.raw(`${type} ${isAll ? 'all ' : ''}`);\n\n\t\tconst offsetSql = offset ? sql` offset ${offset}` : undefined;\n\n\t\treturn sql`${leftChunk}${operatorChunk}${rightChunk}${orderBySql}${limitSql}${offsetSql}`;\n\t}\n\n\tbuildInsertQuery(\n\t\t{ table, values: valuesOrSelect, onConflict, returning, withList, select }: SQLiteInsertConfig,\n\t): SQL {\n\t\t// const isSingleValue = values.length === 1;\n\t\tconst valuesSqlList: ((SQLChunk | SQL)[] | SQL)[] = [];\n\t\tconst columns: Record = table[Table.Symbol.Columns];\n\n\t\tconst colEntries: [string, SQLiteColumn][] = Object.entries(columns).filter(([_, col]) =>\n\t\t\t!col.shouldDisableInsert()\n\t\t);\n\t\tconst insertOrder = colEntries.map(([, column]) => sql.identifier(this.casing.getColumnCasing(column)));\n\n\t\tif (select) {\n\t\t\tconst select = valuesOrSelect as AnySQLiteSelectQueryBuilder | SQL;\n\n\t\t\tif (is(select, SQL)) {\n\t\t\t\tvaluesSqlList.push(select);\n\t\t\t} else {\n\t\t\t\tvaluesSqlList.push(select.getSQL());\n\t\t\t}\n\t\t} else {\n\t\t\tconst values = valuesOrSelect as Record[];\n\t\t\tvaluesSqlList.push(sql.raw('values '));\n\n\t\t\tfor (const [valueIndex, value] of values.entries()) {\n\t\t\t\tconst valueList: (SQLChunk | SQL)[] = [];\n\t\t\t\tfor (const [fieldName, col] of colEntries) {\n\t\t\t\t\tconst colValue = value[fieldName];\n\t\t\t\t\tif (colValue === undefined || (is(colValue, Param) && colValue.value === undefined)) {\n\t\t\t\t\t\tlet defaultValue;\n\t\t\t\t\t\tif (col.default !== null && col.default !== undefined) {\n\t\t\t\t\t\t\tdefaultValue = is(col.default, SQL) ? col.default : sql.param(col.default, col);\n\t\t\t\t\t\t\t// eslint-disable-next-line unicorn/no-negated-condition\n\t\t\t\t\t\t} else if (col.defaultFn !== undefined) {\n\t\t\t\t\t\t\tconst defaultFnResult = col.defaultFn();\n\t\t\t\t\t\t\tdefaultValue = is(defaultFnResult, SQL) ? defaultFnResult : sql.param(defaultFnResult, col);\n\t\t\t\t\t\t\t// eslint-disable-next-line unicorn/no-negated-condition\n\t\t\t\t\t\t} else if (!col.default && col.onUpdateFn !== undefined) {\n\t\t\t\t\t\t\tconst onUpdateFnResult = col.onUpdateFn();\n\t\t\t\t\t\t\tdefaultValue = is(onUpdateFnResult, SQL) ? onUpdateFnResult : sql.param(onUpdateFnResult, col);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdefaultValue = sql`null`;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalueList.push(defaultValue);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalueList.push(colValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvaluesSqlList.push(valueList);\n\t\t\t\tif (valueIndex < values.length - 1) {\n\t\t\t\t\tvaluesSqlList.push(sql`, `);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst withSql = this.buildWithCTE(withList);\n\n\t\tconst valuesSql = sql.join(valuesSqlList);\n\n\t\tconst returningSql = returning\n\t\t\t? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}`\n\t\t\t: undefined;\n\n\t\tconst onConflictSql = onConflict?.length\n\t\t\t? sql.join(onConflict)\n\t\t\t: undefined;\n\n\t\t// if (isSingleValue && valuesSqlList.length === 0){\n\t\t// \treturn sql`insert into ${table} default values ${onConflictSql}${returningSql}`;\n\t\t// }\n\n\t\treturn sql`${withSql}insert into ${table} ${insertOrder} ${valuesSql}${onConflictSql}${returningSql}`;\n\t}\n\n\tsqlToQuery(sql: SQL, invokeSource?: 'indexes' | undefined): QueryWithTypings {\n\t\treturn sql.toQuery({\n\t\t\tcasing: this.casing,\n\t\t\tescapeName: this.escapeName,\n\t\t\tescapeParam: this.escapeParam,\n\t\t\tescapeString: this.escapeString,\n\t\t\tinvokeSource,\n\t\t});\n\t}\n\n\tbuildRelationalQuery({\n\t\tfullSchema,\n\t\tschema,\n\t\ttableNamesMap,\n\t\ttable,\n\t\ttableConfig,\n\t\tqueryConfig: config,\n\t\ttableAlias,\n\t\tnestedQueryRelation,\n\t\tjoinOn,\n\t}: {\n\t\tfullSchema: Record;\n\t\tschema: TablesRelationalConfig;\n\t\ttableNamesMap: Record;\n\t\ttable: SQLiteTable;\n\t\ttableConfig: TableRelationalConfig;\n\t\tqueryConfig: true | DBQueryConfig<'many', true>;\n\t\ttableAlias: string;\n\t\tnestedQueryRelation?: Relation;\n\t\tjoinOn?: SQL;\n\t}): BuildRelationalQueryResult {\n\t\tlet selection: BuildRelationalQueryResult['selection'] = [];\n\t\tlet limit, offset, orderBy: SQLiteSelectConfig['orderBy'] = [], where;\n\t\tconst joins: SQLiteSelectJoinConfig[] = [];\n\n\t\tif (config === true) {\n\t\t\tconst selectionEntries = Object.entries(tableConfig.columns);\n\t\t\tselection = selectionEntries.map((\n\t\t\t\t[key, value],\n\t\t\t) => ({\n\t\t\t\tdbKey: value.name,\n\t\t\t\ttsKey: key,\n\t\t\t\tfield: aliasedTableColumn(value as SQLiteColumn, tableAlias),\n\t\t\t\trelationTableTsKey: undefined,\n\t\t\t\tisJson: false,\n\t\t\t\tselection: [],\n\t\t\t}));\n\t\t} else {\n\t\t\tconst aliasedColumns = Object.fromEntries(\n\t\t\t\tObject.entries(tableConfig.columns).map(([key, value]) => [key, aliasedTableColumn(value, tableAlias)]),\n\t\t\t);\n\n\t\t\tif (config.where) {\n\t\t\t\tconst whereSql = typeof config.where === 'function'\n\t\t\t\t\t? config.where(aliasedColumns, getOperators())\n\t\t\t\t\t: config.where;\n\t\t\t\twhere = whereSql && mapColumnsInSQLToAlias(whereSql, tableAlias);\n\t\t\t}\n\n\t\t\tconst fieldsSelection: { tsKey: string; value: SQLiteColumn | SQL.Aliased }[] = [];\n\t\t\tlet selectedColumns: string[] = [];\n\n\t\t\t// Figure out which columns to select\n\t\t\tif (config.columns) {\n\t\t\t\tlet isIncludeMode = false;\n\n\t\t\t\tfor (const [field, value] of Object.entries(config.columns)) {\n\t\t\t\t\tif (value === undefined) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (field in tableConfig.columns) {\n\t\t\t\t\t\tif (!isIncludeMode && value === true) {\n\t\t\t\t\t\t\tisIncludeMode = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tselectedColumns.push(field);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (selectedColumns.length > 0) {\n\t\t\t\t\tselectedColumns = isIncludeMode\n\t\t\t\t\t\t? selectedColumns.filter((c) => config.columns?.[c] === true)\n\t\t\t\t\t\t: Object.keys(tableConfig.columns).filter((key) => !selectedColumns.includes(key));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Select all columns if selection is not specified\n\t\t\t\tselectedColumns = Object.keys(tableConfig.columns);\n\t\t\t}\n\n\t\t\tfor (const field of selectedColumns) {\n\t\t\t\tconst column = tableConfig.columns[field]! as SQLiteColumn;\n\t\t\t\tfieldsSelection.push({ tsKey: field, value: column });\n\t\t\t}\n\n\t\t\tlet selectedRelations: {\n\t\t\t\ttsKey: string;\n\t\t\t\tqueryConfig: true | DBQueryConfig<'many', false>;\n\t\t\t\trelation: Relation;\n\t\t\t}[] = [];\n\n\t\t\t// Figure out which relations to select\n\t\t\tif (config.with) {\n\t\t\t\tselectedRelations = Object.entries(config.with)\n\t\t\t\t\t.filter((entry): entry is [typeof entry[0], NonNullable] => !!entry[1])\n\t\t\t\t\t.map(([tsKey, queryConfig]) => ({ tsKey, queryConfig, relation: tableConfig.relations[tsKey]! }));\n\t\t\t}\n\n\t\t\tlet extras;\n\n\t\t\t// Figure out which extras to select\n\t\t\tif (config.extras) {\n\t\t\t\textras = typeof config.extras === 'function'\n\t\t\t\t\t? config.extras(aliasedColumns, { sql })\n\t\t\t\t\t: config.extras;\n\t\t\t\tfor (const [tsKey, value] of Object.entries(extras)) {\n\t\t\t\t\tfieldsSelection.push({\n\t\t\t\t\t\ttsKey,\n\t\t\t\t\t\tvalue: mapColumnsInAliasedSQLToAlias(value, tableAlias),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Transform `fieldsSelection` into `selection`\n\t\t\t// `fieldsSelection` shouldn't be used after this point\n\t\t\tfor (const { tsKey, value } of fieldsSelection) {\n\t\t\t\tselection.push({\n\t\t\t\t\tdbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey]!.name,\n\t\t\t\t\ttsKey,\n\t\t\t\t\tfield: is(value, Column) ? aliasedTableColumn(value, tableAlias) : value,\n\t\t\t\t\trelationTableTsKey: undefined,\n\t\t\t\t\tisJson: false,\n\t\t\t\t\tselection: [],\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tlet orderByOrig = typeof config.orderBy === 'function'\n\t\t\t\t? config.orderBy(aliasedColumns, getOrderByOperators())\n\t\t\t\t: config.orderBy ?? [];\n\t\t\tif (!Array.isArray(orderByOrig)) {\n\t\t\t\torderByOrig = [orderByOrig];\n\t\t\t}\n\t\t\torderBy = orderByOrig.map((orderByValue) => {\n\t\t\t\tif (is(orderByValue, Column)) {\n\t\t\t\t\treturn aliasedTableColumn(orderByValue, tableAlias) as SQLiteColumn;\n\t\t\t\t}\n\t\t\t\treturn mapColumnsInSQLToAlias(orderByValue, tableAlias);\n\t\t\t});\n\n\t\t\tlimit = config.limit;\n\t\t\toffset = config.offset;\n\n\t\t\t// Process all relations\n\t\t\tfor (\n\t\t\t\tconst {\n\t\t\t\t\ttsKey: selectedRelationTsKey,\n\t\t\t\t\tqueryConfig: selectedRelationConfigValue,\n\t\t\t\t\trelation,\n\t\t\t\t} of selectedRelations\n\t\t\t) {\n\t\t\t\tconst normalizedRelation = normalizeRelation(schema, tableNamesMap, relation);\n\t\t\t\tconst relationTableName = getTableUniqueName(relation.referencedTable);\n\t\t\t\tconst relationTableTsName = tableNamesMap[relationTableName]!;\n\t\t\t\tconst relationTableAlias = `${tableAlias}_${selectedRelationTsKey}`;\n\t\t\t\t// const relationTable = schema[relationTableTsName]!;\n\t\t\t\tconst joinOn = and(\n\t\t\t\t\t...normalizedRelation.fields.map((field, i) =>\n\t\t\t\t\t\teq(\n\t\t\t\t\t\t\taliasedTableColumn(normalizedRelation.references[i]!, relationTableAlias),\n\t\t\t\t\t\t\taliasedTableColumn(field, tableAlias),\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tconst builtRelation = this.buildRelationalQuery({\n\t\t\t\t\tfullSchema,\n\t\t\t\t\tschema,\n\t\t\t\t\ttableNamesMap,\n\t\t\t\t\ttable: fullSchema[relationTableTsName] as SQLiteTable,\n\t\t\t\t\ttableConfig: schema[relationTableTsName]!,\n\t\t\t\t\tqueryConfig: is(relation, One)\n\t\t\t\t\t\t? (selectedRelationConfigValue === true\n\t\t\t\t\t\t\t? { limit: 1 }\n\t\t\t\t\t\t\t: { ...selectedRelationConfigValue, limit: 1 })\n\t\t\t\t\t\t: selectedRelationConfigValue,\n\t\t\t\t\ttableAlias: relationTableAlias,\n\t\t\t\t\tjoinOn,\n\t\t\t\t\tnestedQueryRelation: relation,\n\t\t\t\t});\n\t\t\t\tconst field = (sql`(${builtRelation.sql})`).as(selectedRelationTsKey);\n\t\t\t\tselection.push({\n\t\t\t\t\tdbKey: selectedRelationTsKey,\n\t\t\t\t\ttsKey: selectedRelationTsKey,\n\t\t\t\t\tfield,\n\t\t\t\t\trelationTableTsKey: relationTableTsName,\n\t\t\t\t\tisJson: true,\n\t\t\t\t\tselection: builtRelation.selection,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (selection.length === 0) {\n\t\t\tthrow new DrizzleError({\n\t\t\t\tmessage:\n\t\t\t\t\t`No fields selected for table \"${tableConfig.tsName}\" (\"${tableAlias}\"). You need to have at least one item in \"columns\", \"with\" or \"extras\". If you need to select all columns, omit the \"columns\" key or set it to undefined.`,\n\t\t\t});\n\t\t}\n\n\t\tlet result;\n\n\t\twhere = and(joinOn, where);\n\n\t\tif (nestedQueryRelation) {\n\t\t\tlet field = sql`json_array(${\n\t\t\t\tsql.join(\n\t\t\t\t\tselection.map(({ field }) =>\n\t\t\t\t\t\tis(field, SQLiteColumn)\n\t\t\t\t\t\t\t? sql.identifier(this.casing.getColumnCasing(field))\n\t\t\t\t\t\t\t: is(field, SQL.Aliased)\n\t\t\t\t\t\t\t? field.sql\n\t\t\t\t\t\t\t: field\n\t\t\t\t\t),\n\t\t\t\t\tsql`, `,\n\t\t\t\t)\n\t\t\t})`;\n\t\t\tif (is(nestedQueryRelation, Many)) {\n\t\t\t\tfield = sql`coalesce(json_group_array(${field}), json_array())`;\n\t\t\t}\n\t\t\tconst nestedSelection = [{\n\t\t\t\tdbKey: 'data',\n\t\t\t\ttsKey: 'data',\n\t\t\t\tfield: field.as('data'),\n\t\t\t\tisJson: true,\n\t\t\t\trelationTableTsKey: tableConfig.tsName,\n\t\t\t\tselection,\n\t\t\t}];\n\n\t\t\tconst needsSubquery = limit !== undefined || offset !== undefined || orderBy.length > 0;\n\n\t\t\tif (needsSubquery) {\n\t\t\t\tresult = this.buildSelectQuery({\n\t\t\t\t\ttable: aliasedTable(table, tableAlias),\n\t\t\t\t\tfields: {},\n\t\t\t\t\tfieldsFlat: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpath: [],\n\t\t\t\t\t\t\tfield: sql.raw('*'),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\twhere,\n\t\t\t\t\tlimit,\n\t\t\t\t\toffset,\n\t\t\t\t\torderBy,\n\t\t\t\t\tsetOperators: [],\n\t\t\t\t});\n\n\t\t\t\twhere = undefined;\n\t\t\t\tlimit = undefined;\n\t\t\t\toffset = undefined;\n\t\t\t\torderBy = undefined;\n\t\t\t} else {\n\t\t\t\tresult = aliasedTable(table, tableAlias);\n\t\t\t}\n\n\t\t\tresult = this.buildSelectQuery({\n\t\t\t\ttable: is(result, SQLiteTable) ? result : new Subquery(result, {}, tableAlias),\n\t\t\t\tfields: {},\n\t\t\t\tfieldsFlat: nestedSelection.map(({ field }) => ({\n\t\t\t\t\tpath: [],\n\t\t\t\t\tfield: is(field, Column) ? aliasedTableColumn(field, tableAlias) : field,\n\t\t\t\t})),\n\t\t\t\tjoins,\n\t\t\t\twhere,\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t\torderBy,\n\t\t\t\tsetOperators: [],\n\t\t\t});\n\t\t} else {\n\t\t\tresult = this.buildSelectQuery({\n\t\t\t\ttable: aliasedTable(table, tableAlias),\n\t\t\t\tfields: {},\n\t\t\t\tfieldsFlat: selection.map(({ field }) => ({\n\t\t\t\t\tpath: [],\n\t\t\t\t\tfield: is(field, Column) ? aliasedTableColumn(field, tableAlias) : field,\n\t\t\t\t})),\n\t\t\t\tjoins,\n\t\t\t\twhere,\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t\torderBy,\n\t\t\t\tsetOperators: [],\n\t\t\t});\n\t\t}\n\n\t\treturn {\n\t\t\ttableTsKey: tableConfig.tsName,\n\t\t\tsql: result,\n\t\t\tselection,\n\t\t};\n\t}\n}\n\nexport class SQLiteSyncDialect extends SQLiteDialect {\n\tstatic override readonly [entityKind]: string = 'SQLiteSyncDialect';\n\n\tmigrate(\n\t\tmigrations: MigrationMeta[],\n\t\tsession: SQLiteSession<'sync', unknown, Record, TablesRelationalConfig>,\n\t\tconfig?: string | MigrationConfig,\n\t): void {\n\t\tconst migrationsTable = config === undefined\n\t\t\t? '__drizzle_migrations'\n\t\t\t: typeof config === 'string'\n\t\t\t? '__drizzle_migrations'\n\t\t\t: config.migrationsTable ?? '__drizzle_migrations';\n\n\t\tconst migrationTableCreate = sql`\n\t\t\tCREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (\n\t\t\t\tid SERIAL PRIMARY KEY,\n\t\t\t\thash text NOT NULL,\n\t\t\t\tcreated_at numeric\n\t\t\t)\n\t\t`;\n\t\tsession.run(migrationTableCreate);\n\n\t\tconst dbMigrations = session.values<[number, string, string]>(\n\t\t\tsql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1`,\n\t\t);\n\n\t\tconst lastDbMigration = dbMigrations[0] ?? undefined;\n\t\tsession.run(sql`BEGIN`);\n\n\t\ttry {\n\t\t\tfor (const migration of migrations) {\n\t\t\t\tif (!lastDbMigration || Number(lastDbMigration[2])! < migration.folderMillis) {\n\t\t\t\t\tfor (const stmt of migration.sql) {\n\t\t\t\t\t\tsession.run(sql.raw(stmt));\n\t\t\t\t\t}\n\t\t\t\t\tsession.run(\n\t\t\t\t\t\tsql`INSERT INTO ${\n\t\t\t\t\t\t\tsql.identifier(migrationsTable)\n\t\t\t\t\t\t} (\"hash\", \"created_at\") VALUES(${migration.hash}, ${migration.folderMillis})`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsession.run(sql`COMMIT`);\n\t\t} catch (e) {\n\t\t\tsession.run(sql`ROLLBACK`);\n\t\t\tthrow e;\n\t\t}\n\t}\n}\n\nexport class SQLiteAsyncDialect extends SQLiteDialect {\n\tstatic override readonly [entityKind]: string = 'SQLiteAsyncDialect';\n\n\tasync migrate(\n\t\tmigrations: MigrationMeta[],\n\t\tsession: SQLiteSession<'async', any, any, any>,\n\t\tconfig?: string | MigrationConfig,\n\t): Promise {\n\t\tconst migrationsTable = config === undefined\n\t\t\t? '__drizzle_migrations'\n\t\t\t: typeof config === 'string'\n\t\t\t? '__drizzle_migrations'\n\t\t\t: config.migrationsTable ?? '__drizzle_migrations';\n\n\t\tconst migrationTableCreate = sql`\n\t\t\tCREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (\n\t\t\t\tid SERIAL PRIMARY KEY,\n\t\t\t\thash text NOT NULL,\n\t\t\t\tcreated_at numeric\n\t\t\t)\n\t\t`;\n\t\tawait session.run(migrationTableCreate);\n\n\t\tconst dbMigrations = await session.values<[number, string, string]>(\n\t\t\tsql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1`,\n\t\t);\n\n\t\tconst lastDbMigration = dbMigrations[0] ?? undefined;\n\n\t\tawait session.transaction(async (tx) => {\n\t\t\tfor (const migration of migrations) {\n\t\t\t\tif (!lastDbMigration || Number(lastDbMigration[2])! < migration.folderMillis) {\n\t\t\t\t\tfor (const stmt of migration.sql) {\n\t\t\t\t\t\tawait tx.run(sql.raw(stmt));\n\t\t\t\t\t}\n\t\t\t\t\tawait tx.run(\n\t\t\t\t\t\tsql`INSERT INTO ${\n\t\t\t\t\t\t\tsql.identifier(migrationsTable)\n\t\t\t\t\t\t} (\"hash\", \"created_at\") VALUES(${migration.hash}, ${migration.folderMillis})`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { SQL, SQLWrapper } from '~/sql/index.ts';\n\nexport abstract class TypedQueryBuilder implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'TypedQueryBuilder';\n\n\tdeclare _: {\n\t\tselectedFields: TSelection;\n\t\tresult: TResult;\n\t\tconfig?: TConfig;\n\t};\n\n\t/** @internal */\n\tgetSelectedFields(): TSelection {\n\t\treturn this._.selectedFields;\n\t}\n\n\tabstract getSQL(): SQL;\n}\n", "import type { CacheConfig, WithCacheConfig } from '~/cache/core/types.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type {\n\tBuildSubquerySelection,\n\tGetSelectTableName,\n\tGetSelectTableSelection,\n\tJoinNullability,\n\tJoinType,\n\tSelectMode,\n\tSelectResult,\n\tSetOperator,\n} from '~/query-builders/select.types.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport { SQL, View } from '~/sql/sql.ts';\nimport type { ColumnsSelection, Placeholder, Query, SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteColumn } from '~/sqlite-core/columns/index.ts';\nimport type { SQLiteDialect } from '~/sqlite-core/dialect.ts';\nimport type { SQLiteSession } from '~/sqlite-core/session.ts';\nimport type { SubqueryWithSelection } from '~/sqlite-core/subquery.ts';\nimport type { SQLiteTable } from '~/sqlite-core/table.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { Table } from '~/table.ts';\nimport {\n\tapplyMixins,\n\tgetTableColumns,\n\tgetTableLikeName,\n\thaveSameKeys,\n\torderSelectedFields,\n\ttype ValueOrArray,\n} from '~/utils.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport { extractUsedTable } from '../utils.ts';\nimport { SQLiteViewBase } from '../view-base.ts';\nimport type {\n\tAnySQLiteSelect,\n\tCreateSQLiteSelectFromBuilderMode,\n\tGetSQLiteSetOperators,\n\tSelectedFields,\n\tSetOperatorRightSelect,\n\tSQLiteCreateSetOperatorFn,\n\tSQLiteSelectConfig,\n\tSQLiteSelectCrossJoinFn,\n\tSQLiteSelectDynamic,\n\tSQLiteSelectExecute,\n\tSQLiteSelectHKT,\n\tSQLiteSelectHKTBase,\n\tSQLiteSelectJoinFn,\n\tSQLiteSelectPrepare,\n\tSQLiteSelectWithout,\n\tSQLiteSetOperatorExcludedMethods,\n\tSQLiteSetOperatorWithResult,\n} from './select.types.ts';\n\nexport class SQLiteSelectBuilder<\n\tTSelection extends SelectedFields | undefined,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTBuilderMode extends 'db' | 'qb' = 'db',\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteSelectBuilder';\n\n\tprivate fields: TSelection;\n\tprivate session: SQLiteSession | undefined;\n\tprivate dialect: SQLiteDialect;\n\tprivate withList: Subquery[] | undefined;\n\tprivate distinct: boolean | undefined;\n\n\tconstructor(\n\t\tconfig: {\n\t\t\tfields: TSelection;\n\t\t\tsession: SQLiteSession | undefined;\n\t\t\tdialect: SQLiteDialect;\n\t\t\twithList?: Subquery[];\n\t\t\tdistinct?: boolean;\n\t\t},\n\t) {\n\t\tthis.fields = config.fields;\n\t\tthis.session = config.session;\n\t\tthis.dialect = config.dialect;\n\t\tthis.withList = config.withList;\n\t\tthis.distinct = config.distinct;\n\t}\n\n\tfrom(\n\t\tsource: TFrom,\n\t): CreateSQLiteSelectFromBuilderMode<\n\t\tTBuilderMode,\n\t\tGetSelectTableName,\n\t\tTResultType,\n\t\tTRunResult,\n\t\tTSelection extends undefined ? GetSelectTableSelection : TSelection,\n\t\tTSelection extends undefined ? 'single' : 'partial'\n\t> {\n\t\tconst isPartialSelect = !!this.fields;\n\n\t\tlet fields: SelectedFields;\n\t\tif (this.fields) {\n\t\t\tfields = this.fields;\n\t\t} else if (is(source, Subquery)) {\n\t\t\t// This is required to use the proxy handler to get the correct field values from the subquery\n\t\t\tfields = Object.fromEntries(\n\t\t\t\tObject.keys(source._.selectedFields).map((\n\t\t\t\t\tkey,\n\t\t\t\t) => [key, source[key as unknown as keyof typeof source] as unknown as SelectedFields[string]]),\n\t\t\t);\n\t\t} else if (is(source, SQLiteViewBase)) {\n\t\t\tfields = source[ViewBaseConfig].selectedFields as SelectedFields;\n\t\t} else if (is(source, SQL)) {\n\t\t\tfields = {};\n\t\t} else {\n\t\t\tfields = getTableColumns(source);\n\t\t}\n\n\t\treturn new SQLiteSelectBase({\n\t\t\ttable: source,\n\t\t\tfields,\n\t\t\tisPartialSelect,\n\t\t\tsession: this.session,\n\t\t\tdialect: this.dialect,\n\t\t\twithList: this.withList,\n\t\t\tdistinct: this.distinct,\n\t\t}) as any;\n\t}\n}\n\nexport abstract class SQLiteSelectQueryBuilderBase<\n\tTHKT extends SQLiteSelectHKTBase,\n\tTTableName extends string | undefined,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTSelection extends ColumnsSelection,\n\tTSelectMode extends SelectMode,\n\tTNullabilityMap extends Record = TTableName extends string ? Record\n\t\t: {},\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n\tTResult extends any[] = SelectResult[],\n\tTSelectedFields extends ColumnsSelection = BuildSubquerySelection,\n> extends TypedQueryBuilder {\n\tstatic override readonly [entityKind]: string = 'SQLiteSelectQueryBuilder';\n\n\toverride readonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly hkt: THKT;\n\t\treadonly tableName: TTableName;\n\t\treadonly resultType: TResultType;\n\t\treadonly runResult: TRunResult;\n\t\treadonly selection: TSelection;\n\t\treadonly selectMode: TSelectMode;\n\t\treadonly nullabilityMap: TNullabilityMap;\n\t\treadonly dynamic: TDynamic;\n\t\treadonly excludedMethods: TExcludedMethods;\n\t\treadonly result: TResult;\n\t\treadonly selectedFields: TSelectedFields;\n\t\treadonly config: SQLiteSelectConfig;\n\t};\n\n\t/** @internal */\n\tconfig: SQLiteSelectConfig;\n\tprotected joinsNotNullableMap: Record;\n\tprivate tableName: string | undefined;\n\tprivate isPartialSelect: boolean;\n\tprotected session: SQLiteSession | undefined;\n\tprotected dialect: SQLiteDialect;\n\tprotected cacheConfig?: WithCacheConfig = undefined;\n\tprotected usedTables: Set = new Set();\n\n\tconstructor(\n\t\t{ table, fields, isPartialSelect, session, dialect, withList, distinct }: {\n\t\t\ttable: SQLiteSelectConfig['table'];\n\t\t\tfields: SQLiteSelectConfig['fields'];\n\t\t\tisPartialSelect: boolean;\n\t\t\tsession: SQLiteSession | undefined;\n\t\t\tdialect: SQLiteDialect;\n\t\t\twithList: Subquery[] | undefined;\n\t\t\tdistinct: boolean | undefined;\n\t\t},\n\t) {\n\t\tsuper();\n\t\tthis.config = {\n\t\t\twithList,\n\t\t\ttable,\n\t\t\tfields: { ...fields },\n\t\t\tdistinct,\n\t\t\tsetOperators: [],\n\t\t};\n\t\tthis.isPartialSelect = isPartialSelect;\n\t\tthis.session = session;\n\t\tthis.dialect = dialect;\n\t\tthis._ = {\n\t\t\tselectedFields: fields as TSelectedFields,\n\t\t\tconfig: this.config,\n\t\t} as this['_'];\n\t\tthis.tableName = getTableLikeName(table);\n\t\tthis.joinsNotNullableMap = typeof this.tableName === 'string' ? { [this.tableName]: true } : {};\n\t\tfor (const item of extractUsedTable(table)) this.usedTables.add(item);\n\t}\n\n\t/** @internal */\n\tgetUsedTables() {\n\t\treturn [...this.usedTables];\n\t}\n\n\tprivate createJoin(\n\t\tjoinType: TJoinType,\n\t): 'cross' extends TJoinType ? SQLiteSelectCrossJoinFn\n\t\t: SQLiteSelectJoinFn\n\t{\n\t\treturn (\n\t\t\ttable: SQLiteTable | Subquery | SQLiteViewBase | SQL,\n\t\t\ton?: ((aliases: TSelection) => SQL | undefined) | SQL | undefined,\n\t\t) => {\n\t\t\tconst baseTableName = this.tableName;\n\t\t\tconst tableName = getTableLikeName(table);\n\n\t\t\t// store all tables used in a query\n\t\t\tfor (const item of extractUsedTable(table)) this.usedTables.add(item);\n\n\t\t\tif (typeof tableName === 'string' && this.config.joins?.some((join) => join.alias === tableName)) {\n\t\t\t\tthrow new Error(`Alias \"${tableName}\" is already used in this query`);\n\t\t\t}\n\n\t\t\tif (!this.isPartialSelect) {\n\t\t\t\t// If this is the first join and this is not a partial select and we're not selecting from raw SQL, \"move\" the fields from the main table to the nested object\n\t\t\t\tif (Object.keys(this.joinsNotNullableMap).length === 1 && typeof baseTableName === 'string') {\n\t\t\t\t\tthis.config.fields = {\n\t\t\t\t\t\t[baseTableName]: this.config.fields,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif (typeof tableName === 'string' && !is(table, SQL)) {\n\t\t\t\t\tconst selection = is(table, Subquery)\n\t\t\t\t\t\t? table._.selectedFields\n\t\t\t\t\t\t: is(table, View)\n\t\t\t\t\t\t? table[ViewBaseConfig].selectedFields\n\t\t\t\t\t\t: table[Table.Symbol.Columns];\n\t\t\t\t\tthis.config.fields[tableName] = selection;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof on === 'function') {\n\t\t\t\ton = on(\n\t\t\t\t\tnew Proxy(\n\t\t\t\t\t\tthis.config.fields,\n\t\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t\t) as TSelection,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (!this.config.joins) {\n\t\t\t\tthis.config.joins = [];\n\t\t\t}\n\t\t\tthis.config.joins.push({ on, table, joinType, alias: tableName });\n\n\t\t\tif (typeof tableName === 'string') {\n\t\t\t\tswitch (joinType) {\n\t\t\t\t\tcase 'left': {\n\t\t\t\t\t\tthis.joinsNotNullableMap[tableName] = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'right': {\n\t\t\t\t\t\tthis.joinsNotNullableMap = Object.fromEntries(\n\t\t\t\t\t\t\tObject.entries(this.joinsNotNullableMap).map(([key]) => [key, false]),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.joinsNotNullableMap[tableName] = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'cross':\n\t\t\t\t\tcase 'inner': {\n\t\t\t\t\t\tthis.joinsNotNullableMap[tableName] = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'full': {\n\t\t\t\t\t\tthis.joinsNotNullableMap = Object.fromEntries(\n\t\t\t\t\t\t\tObject.entries(this.joinsNotNullableMap).map(([key]) => [key, false]),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.joinsNotNullableMap[tableName] = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this as any;\n\t\t};\n\t}\n\n\t/**\n\t * Executes a `left join` operation by adding another table to the current query.\n\t *\n\t * Calling this method associates each row of the table with the corresponding row from the joined table, if a match is found. If no matching row exists, it sets all columns of the joined table to null.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#left-join}\n\t *\n\t * @param table the table to join.\n\t * @param on the `on` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users and their pets\n\t * const usersWithPets: { user: User; pets: Pet | null; }[] = await db.select()\n\t * .from(users)\n\t * .leftJoin(pets, eq(users.id, pets.ownerId))\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number; petId: number | null; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .leftJoin(pets, eq(users.id, pets.ownerId))\n\t * ```\n\t */\n\tleftJoin = this.createJoin('left');\n\n\t/**\n\t * Executes a `right join` operation by adding another table to the current query.\n\t *\n\t * Calling this method associates each row of the joined table with the corresponding row from the main table, if a match is found. If no matching row exists, it sets all columns of the main table to null.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#right-join}\n\t *\n\t * @param table the table to join.\n\t * @param on the `on` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users and their pets\n\t * const usersWithPets: { user: User | null; pets: Pet; }[] = await db.select()\n\t * .from(users)\n\t * .rightJoin(pets, eq(users.id, pets.ownerId))\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number | null; petId: number; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .rightJoin(pets, eq(users.id, pets.ownerId))\n\t * ```\n\t */\n\trightJoin = this.createJoin('right');\n\n\t/**\n\t * Executes an `inner join` operation, creating a new table by combining rows from two tables that have matching values.\n\t *\n\t * Calling this method retrieves rows that have corresponding entries in both joined tables. Rows without matching entries in either table are excluded, resulting in a table that includes only matching pairs.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#inner-join}\n\t *\n\t * @param table the table to join.\n\t * @param on the `on` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users and their pets\n\t * const usersWithPets: { user: User; pets: Pet; }[] = await db.select()\n\t * .from(users)\n\t * .innerJoin(pets, eq(users.id, pets.ownerId))\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number; petId: number; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .innerJoin(pets, eq(users.id, pets.ownerId))\n\t * ```\n\t */\n\tinnerJoin = this.createJoin('inner');\n\n\t/**\n\t * Executes a `full join` operation by combining rows from two tables into a new table.\n\t *\n\t * Calling this method retrieves all rows from both main and joined tables, merging rows with matching values and filling in `null` for non-matching columns.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#full-join}\n\t *\n\t * @param table the table to join.\n\t * @param on the `on` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users and their pets\n\t * const usersWithPets: { user: User | null; pets: Pet | null; }[] = await db.select()\n\t * .from(users)\n\t * .fullJoin(pets, eq(users.id, pets.ownerId))\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number | null; petId: number | null; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .fullJoin(pets, eq(users.id, pets.ownerId))\n\t * ```\n\t */\n\tfullJoin = this.createJoin('full');\n\n\t/**\n\t * Executes a `cross join` operation by combining rows from two tables into a new table.\n\t *\n\t * Calling this method retrieves all rows from both main and joined tables, merging all rows from each table.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#cross-join}\n\t *\n\t * @param table the table to join.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users, each user with every pet\n\t * const usersWithPets: { user: User; pets: Pet; }[] = await db.select()\n\t * .from(users)\n\t * .crossJoin(pets)\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number; petId: number; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .crossJoin(pets)\n\t * ```\n\t */\n\tcrossJoin = this.createJoin('cross');\n\n\tprivate createSetOperator(\n\t\ttype: SetOperator,\n\t\tisAll: boolean,\n\t): >(\n\t\trightSelection:\n\t\t\t| ((setOperators: GetSQLiteSetOperators) => SetOperatorRightSelect)\n\t\t\t| SetOperatorRightSelect,\n\t) => SQLiteSelectWithout<\n\t\tthis,\n\t\tTDynamic,\n\t\tSQLiteSetOperatorExcludedMethods,\n\t\ttrue\n\t> {\n\t\treturn (rightSelection) => {\n\t\t\tconst rightSelect = (typeof rightSelection === 'function'\n\t\t\t\t? rightSelection(getSQLiteSetOperators())\n\t\t\t\t: rightSelection) as TypedQueryBuilder<\n\t\t\t\t\tany,\n\t\t\t\t\tTResult\n\t\t\t\t>;\n\n\t\t\tif (!haveSameKeys(this.getSelectedFields(), rightSelect.getSelectedFields())) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'Set operator error (union / intersect / except): selected fields are not the same or are in a different order',\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.config.setOperators.push({ type, isAll, rightSelect });\n\t\t\treturn this as any;\n\t\t};\n\t}\n\n\t/**\n\t * Adds `union` set operator to the query.\n\t *\n\t * Calling this method will combine the result sets of the `select` statements and remove any duplicate rows that appear across them.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/set-operations#union}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all unique names from customers and users tables\n\t * await db.select({ name: users.name })\n\t * .from(users)\n\t * .union(\n\t * db.select({ name: customers.name }).from(customers)\n\t * );\n\t * // or\n\t * import { union } from 'drizzle-orm/sqlite-core'\n\t *\n\t * await union(\n\t * db.select({ name: users.name }).from(users),\n\t * db.select({ name: customers.name }).from(customers)\n\t * );\n\t * ```\n\t */\n\tunion = this.createSetOperator('union', false);\n\n\t/**\n\t * Adds `union all` set operator to the query.\n\t *\n\t * Calling this method will combine the result-set of the `select` statements and keep all duplicate rows that appear across them.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/set-operations#union-all}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all transaction ids from both online and in-store sales\n\t * await db.select({ transaction: onlineSales.transactionId })\n\t * .from(onlineSales)\n\t * .unionAll(\n\t * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)\n\t * );\n\t * // or\n\t * import { unionAll } from 'drizzle-orm/sqlite-core'\n\t *\n\t * await unionAll(\n\t * db.select({ transaction: onlineSales.transactionId }).from(onlineSales),\n\t * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)\n\t * );\n\t * ```\n\t */\n\tunionAll = this.createSetOperator('union', true);\n\n\t/**\n\t * Adds `intersect` set operator to the query.\n\t *\n\t * Calling this method will retain only the rows that are present in both result sets and eliminate duplicates.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/set-operations#intersect}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select course names that are offered in both departments A and B\n\t * await db.select({ courseName: depA.courseName })\n\t * .from(depA)\n\t * .intersect(\n\t * db.select({ courseName: depB.courseName }).from(depB)\n\t * );\n\t * // or\n\t * import { intersect } from 'drizzle-orm/sqlite-core'\n\t *\n\t * await intersect(\n\t * db.select({ courseName: depA.courseName }).from(depA),\n\t * db.select({ courseName: depB.courseName }).from(depB)\n\t * );\n\t * ```\n\t */\n\tintersect = this.createSetOperator('intersect', false);\n\n\t/**\n\t * Adds `except` set operator to the query.\n\t *\n\t * Calling this method will retrieve all unique rows from the left query, except for the rows that are present in the result set of the right query.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/set-operations#except}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all courses offered in department A but not in department B\n\t * await db.select({ courseName: depA.courseName })\n\t * .from(depA)\n\t * .except(\n\t * db.select({ courseName: depB.courseName }).from(depB)\n\t * );\n\t * // or\n\t * import { except } from 'drizzle-orm/sqlite-core'\n\t *\n\t * await except(\n\t * db.select({ courseName: depA.courseName }).from(depA),\n\t * db.select({ courseName: depB.courseName }).from(depB)\n\t * );\n\t * ```\n\t */\n\texcept = this.createSetOperator('except', false);\n\n\t/** @internal */\n\taddSetOperators(setOperators: SQLiteSelectConfig['setOperators']): SQLiteSelectWithout<\n\t\tthis,\n\t\tTDynamic,\n\t\tSQLiteSetOperatorExcludedMethods,\n\t\ttrue\n\t> {\n\t\tthis.config.setOperators.push(...setOperators);\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `where` clause to the query.\n\t *\n\t * Calling this method will select only those rows that fulfill a specified condition.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#filtering}\n\t *\n\t * @param where the `where` clause.\n\t *\n\t * @example\n\t * You can use conditional operators and `sql function` to filter the rows to be selected.\n\t *\n\t * ```ts\n\t * // Select all cars with green color\n\t * await db.select().from(cars).where(eq(cars.color, 'green'));\n\t * // or\n\t * await db.select().from(cars).where(sql`${cars.color} = 'green'`)\n\t * ```\n\t *\n\t * You can logically combine conditional operators with `and()` and `or()` operators:\n\t *\n\t * ```ts\n\t * // Select all BMW cars with a green color\n\t * await db.select().from(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW')));\n\t *\n\t * // Select all cars with the green or blue color\n\t * await db.select().from(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue')));\n\t * ```\n\t */\n\twhere(\n\t\twhere: ((aliases: TSelection) => SQL | undefined) | SQL | undefined,\n\t): SQLiteSelectWithout {\n\t\tif (typeof where === 'function') {\n\t\t\twhere = where(\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.fields,\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t) as TSelection,\n\t\t\t);\n\t\t}\n\t\tthis.config.where = where;\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `having` clause to the query.\n\t *\n\t * Calling this method will select only those rows that fulfill a specified condition. It is typically used with aggregate functions to filter the aggregated data based on a specified condition.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#aggregations}\n\t *\n\t * @param having the `having` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all brands with more than one car\n\t * await db.select({\n\t * \tbrand: cars.brand,\n\t * \tcount: sql`cast(count(${cars.id}) as int)`,\n\t * })\n\t * .from(cars)\n\t * .groupBy(cars.brand)\n\t * .having(({ count }) => gt(count, 1));\n\t * ```\n\t */\n\thaving(\n\t\thaving: ((aliases: this['_']['selection']) => SQL | undefined) | SQL | undefined,\n\t): SQLiteSelectWithout {\n\t\tif (typeof having === 'function') {\n\t\t\thaving = having(\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.fields,\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t) as TSelection,\n\t\t\t);\n\t\t}\n\t\tthis.config.having = having;\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `group by` clause to the query.\n\t *\n\t * Calling this method will group rows that have the same values into summary rows, often used for aggregation purposes.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#aggregations}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Group and count people by their last names\n\t * await db.select({\n\t * lastName: people.lastName,\n\t * count: sql`cast(count(*) as int)`\n\t * })\n\t * .from(people)\n\t * .groupBy(people.lastName);\n\t * ```\n\t */\n\tgroupBy(\n\t\tbuilder: (aliases: this['_']['selection']) => ValueOrArray,\n\t): SQLiteSelectWithout;\n\tgroupBy(...columns: (SQLiteColumn | SQL)[]): SQLiteSelectWithout;\n\tgroupBy(\n\t\t...columns:\n\t\t\t| [(aliases: this['_']['selection']) => ValueOrArray]\n\t\t\t| (SQLiteColumn | SQL | SQL.Aliased)[]\n\t): SQLiteSelectWithout {\n\t\tif (typeof columns[0] === 'function') {\n\t\t\tconst groupBy = columns[0](\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.fields,\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'alias', sqlBehavior: 'sql' }),\n\t\t\t\t) as TSelection,\n\t\t\t);\n\t\t\tthis.config.groupBy = Array.isArray(groupBy) ? groupBy : [groupBy];\n\t\t} else {\n\t\t\tthis.config.groupBy = columns as (SQLiteColumn | SQL | SQL.Aliased)[];\n\t\t}\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds an `order by` clause to the query.\n\t *\n\t * Calling this method will sort the result-set in ascending or descending order. By default, the sort order is ascending.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#order-by}\n\t *\n\t * @example\n\t *\n\t * ```\n\t * // Select cars ordered by year\n\t * await db.select().from(cars).orderBy(cars.year);\n\t * ```\n\t *\n\t * You can specify whether results are in ascending or descending order with the `asc()` and `desc()` operators.\n\t *\n\t * ```ts\n\t * // Select cars ordered by year in descending order\n\t * await db.select().from(cars).orderBy(desc(cars.year));\n\t *\n\t * // Select cars ordered by year and price\n\t * await db.select().from(cars).orderBy(asc(cars.year), desc(cars.price));\n\t * ```\n\t */\n\torderBy(\n\t\tbuilder: (aliases: this['_']['selection']) => ValueOrArray,\n\t): SQLiteSelectWithout;\n\torderBy(...columns: (SQLiteColumn | SQL)[]): SQLiteSelectWithout;\n\torderBy(\n\t\t...columns:\n\t\t\t| [(aliases: this['_']['selection']) => ValueOrArray]\n\t\t\t| (SQLiteColumn | SQL | SQL.Aliased)[]\n\t): SQLiteSelectWithout {\n\t\tif (typeof columns[0] === 'function') {\n\t\t\tconst orderBy = columns[0](\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.fields,\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'alias', sqlBehavior: 'sql' }),\n\t\t\t\t) as TSelection,\n\t\t\t);\n\n\t\t\tconst orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy];\n\n\t\t\tif (this.config.setOperators.length > 0) {\n\t\t\t\tthis.config.setOperators.at(-1)!.orderBy = orderByArray;\n\t\t\t} else {\n\t\t\t\tthis.config.orderBy = orderByArray;\n\t\t\t}\n\t\t} else {\n\t\t\tconst orderByArray = columns as (SQLiteColumn | SQL | SQL.Aliased)[];\n\n\t\t\tif (this.config.setOperators.length > 0) {\n\t\t\t\tthis.config.setOperators.at(-1)!.orderBy = orderByArray;\n\t\t\t} else {\n\t\t\t\tthis.config.orderBy = orderByArray;\n\t\t\t}\n\t\t}\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `limit` clause to the query.\n\t *\n\t * Calling this method will set the maximum number of rows that will be returned by this query.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#limit--offset}\n\t *\n\t * @param limit the `limit` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Get the first 10 people from this query.\n\t * await db.select().from(people).limit(10);\n\t * ```\n\t */\n\tlimit(limit: number | Placeholder): SQLiteSelectWithout {\n\t\tif (this.config.setOperators.length > 0) {\n\t\t\tthis.config.setOperators.at(-1)!.limit = limit;\n\t\t} else {\n\t\t\tthis.config.limit = limit;\n\t\t}\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds an `offset` clause to the query.\n\t *\n\t * Calling this method will skip a number of rows when returning results from this query.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#limit--offset}\n\t *\n\t * @param offset the `offset` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Get the 10th-20th people from this query.\n\t * await db.select().from(people).offset(10).limit(10);\n\t * ```\n\t */\n\toffset(offset: number | Placeholder): SQLiteSelectWithout {\n\t\tif (this.config.setOperators.length > 0) {\n\t\t\tthis.config.setOperators.at(-1)!.offset = offset;\n\t\t} else {\n\t\t\tthis.config.offset = offset;\n\t\t}\n\t\treturn this as any;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildSelectQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\tas(\n\t\talias: TAlias,\n\t): SubqueryWithSelection {\n\t\tconst usedTables: string[] = [];\n\t\tusedTables.push(...extractUsedTable(this.config.table));\n\t\tif (this.config.joins) { for (const it of this.config.joins) usedTables.push(...extractUsedTable(it.table)); }\n\n\t\treturn new Proxy(\n\t\t\tnew Subquery(this.getSQL(), this.config.fields, alias, false, [...new Set(usedTables)]),\n\t\t\tnew SelectionProxyHandler({ alias, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t) as SubqueryWithSelection;\n\t}\n\n\t/** @internal */\n\toverride getSelectedFields(): this['_']['selectedFields'] {\n\t\treturn new Proxy(\n\t\t\tthis.config.fields,\n\t\t\tnew SelectionProxyHandler({ alias: this.tableName, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t) as this['_']['selectedFields'];\n\t}\n\n\t$dynamic(): SQLiteSelectDynamic {\n\t\treturn this;\n\t}\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface SQLiteSelectBase<\n\tTTableName extends string | undefined,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTSelection extends ColumnsSelection,\n\tTSelectMode extends SelectMode = 'single',\n\tTNullabilityMap extends Record = TTableName extends string ? Record\n\t\t: {},\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n\tTResult extends any[] = SelectResult[],\n\tTSelectedFields extends ColumnsSelection = BuildSubquerySelection,\n> extends\n\tSQLiteSelectQueryBuilderBase<\n\t\tSQLiteSelectHKT,\n\t\tTTableName,\n\t\tTResultType,\n\t\tTRunResult,\n\t\tTSelection,\n\t\tTSelectMode,\n\t\tTNullabilityMap,\n\t\tTDynamic,\n\t\tTExcludedMethods,\n\t\tTResult,\n\t\tTSelectedFields\n\t>,\n\tQueryPromise\n{}\n\nexport class SQLiteSelectBase<\n\tTTableName extends string | undefined,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTSelection,\n\tTSelectMode extends SelectMode = 'single',\n\tTNullabilityMap extends Record = TTableName extends string ? Record\n\t\t: {},\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n\tTResult = SelectResult[],\n\tTSelectedFields extends ColumnsSelection = BuildSubquerySelection,\n> extends SQLiteSelectQueryBuilderBase<\n\tSQLiteSelectHKT,\n\tTTableName,\n\tTResultType,\n\tTRunResult,\n\tTSelection,\n\tTSelectMode,\n\tTNullabilityMap,\n\tTDynamic,\n\tTExcludedMethods,\n\tTResult,\n\tTSelectedFields\n> implements RunnableQuery, SQLWrapper {\n\tstatic override readonly [entityKind]: string = 'SQLiteSelect';\n\n\t/** @internal */\n\t_prepare(isOneTimeQuery = true): SQLiteSelectPrepare {\n\t\tif (!this.session) {\n\t\t\tthrow new Error('Cannot execute a query on a query builder. Please use a database instance instead.');\n\t\t}\n\t\tconst fieldsList = orderSelectedFields(this.config.fields);\n\t\tconst query = this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tthis.dialect.sqlToQuery(this.getSQL()),\n\t\t\tfieldsList,\n\t\t\t'all',\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\ttype: 'select',\n\t\t\t\ttables: [...this.usedTables],\n\t\t\t},\n\t\t\tthis.cacheConfig,\n\t\t);\n\t\tquery.joinsNotNullableMap = this.joinsNotNullableMap;\n\t\treturn query as ReturnType;\n\t}\n\n\t$withCache(config?: { config?: CacheConfig; tag?: string; autoInvalidate?: boolean } | false) {\n\t\tthis.cacheConfig = config === undefined\n\t\t\t? { config: {}, enable: true, autoInvalidate: true }\n\t\t\t: config === false\n\t\t\t? { enable: false }\n\t\t\t: { enable: true, autoInvalidate: true, ...config };\n\t\treturn this;\n\t}\n\n\tprepare(): SQLiteSelectPrepare {\n\t\treturn this._prepare(false);\n\t}\n\n\trun: ReturnType['run'] = (placeholderValues) => {\n\t\treturn this._prepare().run(placeholderValues);\n\t};\n\n\tall: ReturnType['all'] = (placeholderValues) => {\n\t\treturn this._prepare().all(placeholderValues);\n\t};\n\n\tget: ReturnType['get'] = (placeholderValues) => {\n\t\treturn this._prepare().get(placeholderValues);\n\t};\n\n\tvalues: ReturnType['values'] = (placeholderValues) => {\n\t\treturn this._prepare().values(placeholderValues);\n\t};\n\n\tasync execute(): Promise> {\n\t\treturn this.all() as SQLiteSelectExecute;\n\t}\n}\n\napplyMixins(SQLiteSelectBase, [QueryPromise]);\n\nfunction createSetOperator(type: SetOperator, isAll: boolean): SQLiteCreateSetOperatorFn {\n\treturn (leftSelect, rightSelect, ...restSelects) => {\n\t\tconst setOperators = [rightSelect, ...restSelects].map((select) => ({\n\t\t\ttype,\n\t\t\tisAll,\n\t\t\trightSelect: select as AnySQLiteSelect,\n\t\t}));\n\n\t\tfor (const setOperator of setOperators) {\n\t\t\tif (!haveSameKeys((leftSelect as any).getSelectedFields(), setOperator.rightSelect.getSelectedFields())) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'Set operator error (union / intersect / except): selected fields are not the same or are in a different order',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn (leftSelect as AnySQLiteSelect).addSetOperators(setOperators) as any;\n\t};\n}\n\nconst getSQLiteSetOperators = () => ({\n\tunion,\n\tunionAll,\n\tintersect,\n\texcept,\n});\n\n/**\n * Adds `union` set operator to the query.\n *\n * Calling this method will combine the result sets of the `select` statements and remove any duplicate rows that appear across them.\n *\n * See docs: {@link https://orm.drizzle.team/docs/set-operations#union}\n *\n * @example\n *\n * ```ts\n * // Select all unique names from customers and users tables\n * import { union } from 'drizzle-orm/sqlite-core'\n *\n * await union(\n * db.select({ name: users.name }).from(users),\n * db.select({ name: customers.name }).from(customers)\n * );\n * // or\n * await db.select({ name: users.name })\n * .from(users)\n * .union(\n * db.select({ name: customers.name }).from(customers)\n * );\n * ```\n */\nexport const union = createSetOperator('union', false);\n\n/**\n * Adds `union all` set operator to the query.\n *\n * Calling this method will combine the result-set of the `select` statements and keep all duplicate rows that appear across them.\n *\n * See docs: {@link https://orm.drizzle.team/docs/set-operations#union-all}\n *\n * @example\n *\n * ```ts\n * // Select all transaction ids from both online and in-store sales\n * import { unionAll } from 'drizzle-orm/sqlite-core'\n *\n * await unionAll(\n * db.select({ transaction: onlineSales.transactionId }).from(onlineSales),\n * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)\n * );\n * // or\n * await db.select({ transaction: onlineSales.transactionId })\n * .from(onlineSales)\n * .unionAll(\n * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)\n * );\n * ```\n */\nexport const unionAll = createSetOperator('union', true);\n\n/**\n * Adds `intersect` set operator to the query.\n *\n * Calling this method will retain only the rows that are present in both result sets and eliminate duplicates.\n *\n * See docs: {@link https://orm.drizzle.team/docs/set-operations#intersect}\n *\n * @example\n *\n * ```ts\n * // Select course names that are offered in both departments A and B\n * import { intersect } from 'drizzle-orm/sqlite-core'\n *\n * await intersect(\n * db.select({ courseName: depA.courseName }).from(depA),\n * db.select({ courseName: depB.courseName }).from(depB)\n * );\n * // or\n * await db.select({ courseName: depA.courseName })\n * .from(depA)\n * .intersect(\n * db.select({ courseName: depB.courseName }).from(depB)\n * );\n * ```\n */\nexport const intersect = createSetOperator('intersect', false);\n\n/**\n * Adds `except` set operator to the query.\n *\n * Calling this method will retrieve all unique rows from the left query, except for the rows that are present in the result set of the right query.\n *\n * See docs: {@link https://orm.drizzle.team/docs/set-operations#except}\n *\n * @example\n *\n * ```ts\n * // Select all courses offered in department A but not in department B\n * import { except } from 'drizzle-orm/sqlite-core'\n *\n * await except(\n * db.select({ courseName: depA.courseName }).from(depA),\n * db.select({ courseName: depB.courseName }).from(depB)\n * );\n * // or\n * await db.select({ courseName: depA.courseName })\n * .from(depA)\n * .except(\n * db.select({ courseName: depB.courseName }).from(depB)\n * );\n * ```\n */\nexport const except = createSetOperator('except', false);\n", "import { entityKind, is } from '~/entity.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { ColumnsSelection, SQL } from '~/sql/sql.ts';\nimport type { SQLiteDialectConfig } from '~/sqlite-core/dialect.ts';\nimport { SQLiteDialect, SQLiteSyncDialect } from '~/sqlite-core/dialect.ts';\nimport type { WithBuilder } from '~/sqlite-core/subquery.ts';\nimport { WithSubquery } from '~/subquery.ts';\nimport { SQLiteSelectBuilder } from './select.ts';\nimport type { SelectedFields } from './select.types.ts';\n\nexport class QueryBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteQueryBuilder';\n\n\tprivate dialect: SQLiteDialect | undefined;\n\tprivate dialectConfig: SQLiteDialectConfig | undefined;\n\n\tconstructor(dialect?: SQLiteDialect | SQLiteDialectConfig) {\n\t\tthis.dialect = is(dialect, SQLiteDialect) ? dialect : undefined;\n\t\tthis.dialectConfig = is(dialect, SQLiteDialect) ? undefined : dialect;\n\t}\n\n\t$with: WithBuilder = (alias: string, selection?: ColumnsSelection) => {\n\t\tconst queryBuilder = this;\n\t\tconst as = (\n\t\t\tqb:\n\t\t\t\t| TypedQueryBuilder\n\t\t\t\t| SQL\n\t\t\t\t| ((qb: QueryBuilder) => TypedQueryBuilder | SQL),\n\t\t) => {\n\t\t\tif (typeof qb === 'function') {\n\t\t\t\tqb = qb(queryBuilder);\n\t\t\t}\n\n\t\t\treturn new Proxy(\n\t\t\t\tnew WithSubquery(\n\t\t\t\t\tqb.getSQL(),\n\t\t\t\t\tselection ?? ('getSelectedFields' in qb ? qb.getSelectedFields() ?? {} : {}) as SelectedFields,\n\t\t\t\t\talias,\n\t\t\t\t\ttrue,\n\t\t\t\t),\n\t\t\t\tnew SelectionProxyHandler({ alias, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t\t) as any;\n\t\t};\n\t\treturn { as };\n\t};\n\n\twith(...queries: WithSubquery[]) {\n\t\tconst self = this;\n\n\t\tfunction select(): SQLiteSelectBuilder;\n\t\tfunction select(\n\t\t\tfields: TSelection,\n\t\t): SQLiteSelectBuilder;\n\t\tfunction select(\n\t\t\tfields?: TSelection,\n\t\t): SQLiteSelectBuilder {\n\t\t\treturn new SQLiteSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: undefined,\n\t\t\t\tdialect: self.getDialect(),\n\t\t\t\twithList: queries,\n\t\t\t});\n\t\t}\n\n\t\tfunction selectDistinct(): SQLiteSelectBuilder;\n\t\tfunction selectDistinct(\n\t\t\tfields: TSelection,\n\t\t): SQLiteSelectBuilder;\n\t\tfunction selectDistinct(\n\t\t\tfields?: TSelection,\n\t\t): SQLiteSelectBuilder {\n\t\t\treturn new SQLiteSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: undefined,\n\t\t\t\tdialect: self.getDialect(),\n\t\t\t\twithList: queries,\n\t\t\t\tdistinct: true,\n\t\t\t});\n\t\t}\n\n\t\treturn { select, selectDistinct };\n\t}\n\n\tselect(): SQLiteSelectBuilder;\n\tselect(\n\t\tfields: TSelection,\n\t): SQLiteSelectBuilder;\n\tselect(\n\t\tfields?: TSelection,\n\t): SQLiteSelectBuilder {\n\t\treturn new SQLiteSelectBuilder({ fields: fields ?? undefined, session: undefined, dialect: this.getDialect() });\n\t}\n\n\tselectDistinct(): SQLiteSelectBuilder;\n\tselectDistinct(\n\t\tfields: TSelection,\n\t): SQLiteSelectBuilder;\n\tselectDistinct(\n\t\tfields?: TSelection,\n\t): SQLiteSelectBuilder {\n\t\treturn new SQLiteSelectBuilder({\n\t\t\tfields: fields ?? undefined,\n\t\t\tsession: undefined,\n\t\t\tdialect: this.getDialect(),\n\t\t\tdistinct: true,\n\t\t});\n\t}\n\n\t// Lazy load dialect to avoid circular dependency\n\tprivate getDialect() {\n\t\tif (!this.dialect) {\n\t\t\tthis.dialect = new SQLiteSyncDialect(this.dialectConfig);\n\t\t}\n\n\t\treturn this.dialect;\n\t}\n}\n", "import { entityKind, is } from '~/entity.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type { SelectResultFields } from '~/query-builders/select.types.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { Placeholder, Query, SQLWrapper } from '~/sql/sql.ts';\nimport { Param, SQL, sql } from '~/sql/sql.ts';\nimport type { SQLiteDialect } from '~/sqlite-core/dialect.ts';\nimport type { IndexColumn } from '~/sqlite-core/indexes.ts';\nimport type { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/session.ts';\nimport { SQLiteTable } from '~/sqlite-core/table.ts';\nimport type { Subquery } from '~/subquery.ts';\nimport { Columns, Table } from '~/table.ts';\nimport { type DrizzleTypeError, haveSameKeys, mapUpdateSet, orderSelectedFields, type Simplify } from '~/utils.ts';\nimport type { AnySQLiteColumn, SQLiteColumn } from '../columns/common.ts';\nimport { extractUsedTable } from '../utils.ts';\nimport { QueryBuilder } from './query-builder.ts';\nimport type { SelectedFieldsFlat, SelectedFieldsOrdered } from './select.types.ts';\nimport type { SQLiteUpdateSetSource } from './update.ts';\n\nexport interface SQLiteInsertConfig {\n\ttable: TTable;\n\tvalues: Record[] | SQLiteInsertSelectQueryBuilder | SQL;\n\twithList?: Subquery[];\n\tonConflict?: SQL[];\n\treturning?: SelectedFieldsOrdered;\n\tselect?: boolean;\n}\n\nexport type SQLiteInsertValue = Simplify<\n\t{\n\t\t[Key in keyof TTable['$inferInsert']]: TTable['$inferInsert'][Key] | SQL | Placeholder;\n\t}\n>;\n\nexport type SQLiteInsertSelectQueryBuilder = TypedQueryBuilder<\n\t{ [K in keyof TTable['$inferInsert']]: AnySQLiteColumn | SQL | SQL.Aliased | TTable['$inferInsert'][K] }\n>;\n\nexport class SQLiteInsertBuilder<\n\tTTable extends SQLiteTable,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteInsertBuilder';\n\n\tconstructor(\n\t\tprotected table: TTable,\n\t\tprotected session: SQLiteSession,\n\t\tprotected dialect: SQLiteDialect,\n\t\tprivate withList?: Subquery[],\n\t) {}\n\n\tvalues(value: SQLiteInsertValue): SQLiteInsertBase;\n\tvalues(values: SQLiteInsertValue[]): SQLiteInsertBase;\n\tvalues(\n\t\tvalues: SQLiteInsertValue | SQLiteInsertValue[],\n\t): SQLiteInsertBase {\n\t\tvalues = Array.isArray(values) ? values : [values];\n\t\tif (values.length === 0) {\n\t\t\tthrow new Error('values() must be called with at least one value');\n\t\t}\n\t\tconst mappedValues = values.map((entry) => {\n\t\t\tconst result: Record = {};\n\t\t\tconst cols = this.table[Table.Symbol.Columns];\n\t\t\tfor (const colKey of Object.keys(entry)) {\n\t\t\t\tconst colValue = entry[colKey as keyof typeof entry];\n\t\t\t\tresult[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]);\n\t\t\t}\n\t\t\treturn result;\n\t\t});\n\n\t\t// if (mappedValues.length > 1 && mappedValues.some((t) => Object.keys(t).length === 0)) {\n\t\t// \tthrow new Error(\n\t\t// \t\t`One of the values you want to insert is empty. In SQLite you can insert only one empty object per statement. For this case Drizzle with use \"INSERT INTO ... DEFAULT VALUES\" syntax`,\n\t\t// \t);\n\t\t// }\n\n\t\treturn new SQLiteInsertBase(this.table, mappedValues, this.session, this.dialect, this.withList);\n\t}\n\n\tselect(\n\t\tselectQuery: (qb: QueryBuilder) => SQLiteInsertSelectQueryBuilder,\n\t): SQLiteInsertBase;\n\tselect(selectQuery: (qb: QueryBuilder) => SQL): SQLiteInsertBase;\n\tselect(selectQuery: SQL): SQLiteInsertBase;\n\tselect(selectQuery: SQLiteInsertSelectQueryBuilder): SQLiteInsertBase;\n\tselect(\n\t\tselectQuery:\n\t\t\t| SQL\n\t\t\t| SQLiteInsertSelectQueryBuilder\n\t\t\t| ((qb: QueryBuilder) => SQLiteInsertSelectQueryBuilder | SQL),\n\t): SQLiteInsertBase {\n\t\tconst select = typeof selectQuery === 'function' ? selectQuery(new QueryBuilder()) : selectQuery;\n\n\t\tif (\n\t\t\t!is(select, SQL)\n\t\t\t&& !haveSameKeys(this.table[Columns], select._.selectedFields)\n\t\t) {\n\t\t\tthrow new Error(\n\t\t\t\t'Insert select error: selected fields are not the same or are in a different order compared to the table definition',\n\t\t\t);\n\t\t}\n\n\t\treturn new SQLiteInsertBase(this.table, select, this.session, this.dialect, this.withList, true);\n\t}\n}\n\nexport type SQLiteInsertWithout =\n\tTDynamic extends true ? T\n\t\t: Omit<\n\t\t\tSQLiteInsertBase<\n\t\t\t\tT['_']['table'],\n\t\t\t\tT['_']['resultType'],\n\t\t\t\tT['_']['runResult'],\n\t\t\t\tT['_']['returning'],\n\t\t\t\tTDynamic,\n\t\t\t\tT['_']['excludedMethods'] | K\n\t\t\t>,\n\t\t\tT['_']['excludedMethods'] | K\n\t\t>;\n\nexport type SQLiteInsertReturning<\n\tT extends AnySQLiteInsert,\n\tTDynamic extends boolean,\n\tTSelectedFields extends SelectedFieldsFlat,\n> = SQLiteInsertWithout<\n\tSQLiteInsertBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tSelectResultFields,\n\t\tTDynamic,\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteInsertReturningAll<\n\tT extends AnySQLiteInsert,\n\tTDynamic extends boolean,\n> = SQLiteInsertWithout<\n\tSQLiteInsertBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['table']['$inferSelect'],\n\t\tTDynamic,\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteInsertOnConflictDoUpdateConfig = {\n\ttarget: IndexColumn | IndexColumn[];\n\t/** @deprecated - use either `targetWhere` or `setWhere` */\n\twhere?: SQL;\n\t// TODO: add tests for targetWhere and setWhere\n\ttargetWhere?: SQL;\n\tsetWhere?: SQL;\n\tset: SQLiteUpdateSetSource;\n};\n\nexport type SQLiteInsertDynamic = SQLiteInsert<\n\tT['_']['table'],\n\tT['_']['resultType'],\n\tT['_']['runResult'],\n\tT['_']['returning']\n>;\n\nexport type SQLiteInsertExecute = T['_']['returning'] extends undefined ? T['_']['runResult']\n\t: T['_']['returning'][];\n\nexport type SQLiteInsertPrepare = SQLitePreparedQuery<\n\t{\n\t\ttype: T['_']['resultType'];\n\t\trun: T['_']['runResult'];\n\t\tall: T['_']['returning'] extends undefined ? DrizzleTypeError<'.all() cannot be used without .returning()'>\n\t\t\t: T['_']['returning'][];\n\t\tget: T['_']['returning'] extends undefined ? DrizzleTypeError<'.get() cannot be used without .returning()'>\n\t\t\t: T['_']['returning'];\n\t\tvalues: T['_']['returning'] extends undefined ? DrizzleTypeError<'.values() cannot be used without .returning()'>\n\t\t\t: any[][];\n\t\texecute: SQLiteInsertExecute;\n\t}\n>;\n\nexport type AnySQLiteInsert = SQLiteInsertBase;\n\nexport type SQLiteInsert<\n\tTTable extends SQLiteTable = SQLiteTable,\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = unknown,\n\tTReturning = any,\n> = SQLiteInsertBase;\n\nexport interface SQLiteInsertBase<\n\tTTable extends SQLiteTable,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTReturning = undefined,\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n> extends\n\tSQLWrapper,\n\tQueryPromise,\n\tRunnableQuery\n{\n\treadonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly table: TTable;\n\t\treadonly resultType: TResultType;\n\t\treadonly runResult: TRunResult;\n\t\treadonly returning: TReturning;\n\t\treadonly dynamic: TDynamic;\n\t\treadonly excludedMethods: TExcludedMethods;\n\t\treadonly result: TReturning extends undefined ? TRunResult : TReturning[];\n\t};\n}\n\nexport class SQLiteInsertBase<\n\tTTable extends SQLiteTable,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTReturning = undefined,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTDynamic extends boolean = false,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTExcludedMethods extends string = never,\n> extends QueryPromise\n\timplements RunnableQuery, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteInsert';\n\n\t/** @internal */\n\tconfig: SQLiteInsertConfig;\n\n\tconstructor(\n\t\ttable: TTable,\n\t\tvalues: SQLiteInsertConfig['values'],\n\t\tprivate session: SQLiteSession,\n\t\tprivate dialect: SQLiteDialect,\n\t\twithList?: Subquery[],\n\t\tselect?: boolean,\n\t) {\n\t\tsuper();\n\t\tthis.config = { table, values: values as any, withList, select };\n\t}\n\n\t/**\n\t * Adds a `returning` clause to the query.\n\t *\n\t * Calling this method will return the specified fields of the inserted rows. If no fields are specified, all fields will be returned.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/insert#insert-returning}\n\t *\n\t * @example\n\t * ```ts\n\t * // Insert one row and return all fields\n\t * const insertedCar: Car[] = await db.insert(cars)\n\t * .values({ brand: 'BMW' })\n\t * .returning();\n\t *\n\t * // Insert one row and return only the id\n\t * const insertedCarId: { id: number }[] = await db.insert(cars)\n\t * .values({ brand: 'BMW' })\n\t * .returning({ id: cars.id });\n\t * ```\n\t */\n\treturning(): SQLiteInsertReturningAll;\n\treturning(\n\t\tfields: TSelectedFields,\n\t): SQLiteInsertReturning;\n\treturning(\n\t\tfields: SelectedFieldsFlat = this.config.table[SQLiteTable.Symbol.Columns],\n\t): SQLiteInsertWithout {\n\t\tthis.config.returning = orderSelectedFields(fields);\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds an `on conflict do nothing` clause to the query.\n\t *\n\t * Calling this method simply avoids inserting a row as its alternative action.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/insert#on-conflict-do-nothing}\n\t *\n\t * @param config The `target` and `where` clauses.\n\t *\n\t * @example\n\t * ```ts\n\t * // Insert one row and cancel the insert if there's a conflict\n\t * await db.insert(cars)\n\t * .values({ id: 1, brand: 'BMW' })\n\t * .onConflictDoNothing();\n\t *\n\t * // Explicitly specify conflict target\n\t * await db.insert(cars)\n\t * .values({ id: 1, brand: 'BMW' })\n\t * .onConflictDoNothing({ target: cars.id });\n\t * ```\n\t */\n\tonConflictDoNothing(config: { target?: IndexColumn | IndexColumn[]; where?: SQL } = {}): this {\n\t\tif (!this.config.onConflict) this.config.onConflict = [];\n\n\t\tif (config.target === undefined) {\n\t\t\tthis.config.onConflict.push(sql` on conflict do nothing`);\n\t\t} else {\n\t\t\tconst targetSql = Array.isArray(config.target) ? sql`${config.target}` : sql`${[config.target]}`;\n\t\t\tconst whereSql = config.where ? sql` where ${config.where}` : sql``;\n\t\t\tthis.config.onConflict.push(sql` on conflict ${targetSql} do nothing${whereSql}`);\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds an `on conflict do update` clause to the query.\n\t *\n\t * Calling this method will update the existing row that conflicts with the row proposed for insertion as its alternative action.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/insert#upserts-and-conflicts}\n\t *\n\t * @param config The `target`, `set` and `where` clauses.\n\t *\n\t * @example\n\t * ```ts\n\t * // Update the row if there's a conflict\n\t * await db.insert(cars)\n\t * .values({ id: 1, brand: 'BMW' })\n\t * .onConflictDoUpdate({\n\t * target: cars.id,\n\t * set: { brand: 'Porsche' }\n\t * });\n\t *\n\t * // Upsert with 'where' clause\n\t * await db.insert(cars)\n\t * .values({ id: 1, brand: 'BMW' })\n\t * .onConflictDoUpdate({\n\t * target: cars.id,\n\t * set: { brand: 'newBMW' },\n\t * where: sql`${cars.createdAt} > '2023-01-01'::date`,\n\t * });\n\t * ```\n\t */\n\tonConflictDoUpdate(config: SQLiteInsertOnConflictDoUpdateConfig): this {\n\t\tif (config.where && (config.targetWhere || config.setWhere)) {\n\t\t\tthrow new Error(\n\t\t\t\t'You cannot use both \"where\" and \"targetWhere\"/\"setWhere\" at the same time - \"where\" is deprecated, use \"targetWhere\" or \"setWhere\" instead.',\n\t\t\t);\n\t\t}\n\n\t\tif (!this.config.onConflict) this.config.onConflict = [];\n\n\t\tconst whereSql = config.where ? sql` where ${config.where}` : undefined;\n\t\tconst targetWhereSql = config.targetWhere ? sql` where ${config.targetWhere}` : undefined;\n\t\tconst setWhereSql = config.setWhere ? sql` where ${config.setWhere}` : undefined;\n\t\tconst targetSql = Array.isArray(config.target) ? sql`${config.target}` : sql`${[config.target]}`;\n\t\tconst setSql = this.dialect.buildUpdateSet(this.config.table, mapUpdateSet(this.config.table, config.set));\n\t\tthis.config.onConflict.push(\n\t\t\tsql` on conflict ${targetSql}${targetWhereSql} do update set ${setSql}${whereSql}${setWhereSql}`,\n\t\t);\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildInsertQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\t/** @internal */\n\t_prepare(isOneTimeQuery = true): SQLiteInsertPrepare {\n\t\treturn this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tthis.dialect.sqlToQuery(this.getSQL()),\n\t\t\tthis.config.returning,\n\t\t\tthis.config.returning ? 'all' : 'run',\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\ttype: 'insert',\n\t\t\t\ttables: extractUsedTable(this.config.table),\n\t\t\t},\n\t\t) as SQLiteInsertPrepare;\n\t}\n\n\tprepare(): SQLiteInsertPrepare {\n\t\treturn this._prepare(false);\n\t}\n\n\trun: ReturnType['run'] = (placeholderValues) => {\n\t\treturn this._prepare().run(placeholderValues);\n\t};\n\n\tall: ReturnType['all'] = (placeholderValues) => {\n\t\treturn this._prepare().all(placeholderValues);\n\t};\n\n\tget: ReturnType['get'] = (placeholderValues) => {\n\t\treturn this._prepare().get(placeholderValues);\n\t};\n\n\tvalues: ReturnType['values'] = (placeholderValues) => {\n\t\treturn this._prepare().values(placeholderValues);\n\t};\n\n\toverride async execute(): Promise> {\n\t\treturn (this.config.returning ? this.all() : this.run()) as SQLiteInsertExecute;\n\t}\n\n\t$dynamic(): SQLiteInsertDynamic {\n\t\treturn this as any;\n\t}\n}\n", "//# sourceMappingURL=select.types.js.map", "import type { GetColumnData } from '~/column.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport type { JoinType, SelectResultFields } from '~/query-builders/select.types.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { Placeholder, Query, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteDialect } from '~/sqlite-core/dialect.ts';\nimport type { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/session.ts';\nimport { SQLiteTable } from '~/sqlite-core/table.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { Table } from '~/table.ts';\nimport {\n\ttype DrizzleTypeError,\n\tgetTableLikeName,\n\tmapUpdateSet,\n\torderSelectedFields,\n\ttype UpdateSet,\n\ttype ValueOrArray,\n} from '~/utils.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport type { SQLiteColumn } from '../columns/common.ts';\nimport { extractUsedTable } from '../utils.ts';\nimport { SQLiteViewBase } from '../view-base.ts';\nimport type { SelectedFields, SelectedFieldsOrdered, SQLiteSelectJoinConfig } from './select.types.ts';\n\nexport interface SQLiteUpdateConfig {\n\twhere?: SQL | undefined;\n\tlimit?: number | Placeholder;\n\torderBy?: (SQLiteColumn | SQL | SQL.Aliased)[];\n\tset: UpdateSet;\n\ttable: SQLiteTable;\n\tfrom?: SQLiteTable | Subquery | SQLiteViewBase | SQL;\n\tjoins: SQLiteSelectJoinConfig[];\n\treturning?: SelectedFieldsOrdered;\n\twithList?: Subquery[];\n}\n\nexport type SQLiteUpdateSetSource =\n\t& {\n\t\t[Key in keyof TTable['$inferInsert']]?:\n\t\t\t| GetColumnData\n\t\t\t| SQL\n\t\t\t| SQLiteColumn\n\t\t\t| undefined;\n\t}\n\t& {};\n\nexport class SQLiteUpdateBuilder<\n\tTTable extends SQLiteTable,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteUpdateBuilder';\n\n\tdeclare readonly _: {\n\t\treadonly table: TTable;\n\t};\n\n\tconstructor(\n\t\tprotected table: TTable,\n\t\tprotected session: SQLiteSession,\n\t\tprotected dialect: SQLiteDialect,\n\t\tprivate withList?: Subquery[],\n\t) {}\n\n\tset(\n\t\tvalues: SQLiteUpdateSetSource,\n\t): SQLiteUpdateWithout<\n\t\tSQLiteUpdateBase,\n\t\tfalse,\n\t\t'leftJoin' | 'rightJoin' | 'innerJoin' | 'fullJoin'\n\t> {\n\t\treturn new SQLiteUpdateBase(\n\t\t\tthis.table,\n\t\t\tmapUpdateSet(this.table, values),\n\t\t\tthis.session,\n\t\t\tthis.dialect,\n\t\t\tthis.withList,\n\t\t) as any;\n\t}\n}\n\nexport type SQLiteUpdateWithout<\n\tT extends AnySQLiteUpdate,\n\tTDynamic extends boolean,\n\tK extends keyof T & string,\n> = TDynamic extends true ? T : Omit<\n\tSQLiteUpdateBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['from'],\n\t\tT['_']['returning'],\n\t\tTDynamic,\n\t\tT['_']['excludedMethods'] | K\n\t>,\n\tT['_']['excludedMethods'] | K\n>;\n\nexport type SQLiteUpdateWithJoins<\n\tT extends AnySQLiteUpdate,\n\tTDynamic extends boolean,\n\tTFrom extends SQLiteTable | Subquery | SQLiteViewBase | SQL,\n> = TDynamic extends true ? T : Omit<\n\tSQLiteUpdateBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tTFrom,\n\t\tT['_']['returning'],\n\t\tTDynamic,\n\t\tExclude\n\t>,\n\tExclude\n>;\n\nexport type SQLiteUpdateReturningAll = SQLiteUpdateWithout<\n\tSQLiteUpdateBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['from'],\n\t\tT['_']['table']['$inferSelect'],\n\t\tTDynamic,\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteUpdateReturning<\n\tT extends AnySQLiteUpdate,\n\tTDynamic extends boolean,\n\tTSelectedFields extends SelectedFields,\n> = SQLiteUpdateWithout<\n\tSQLiteUpdateBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['from'],\n\t\tSelectResultFields,\n\t\tTDynamic,\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteUpdateExecute = T['_']['returning'] extends undefined ? T['_']['runResult']\n\t: T['_']['returning'][];\n\nexport type SQLiteUpdatePrepare = SQLitePreparedQuery<\n\t{\n\t\ttype: T['_']['resultType'];\n\t\trun: T['_']['runResult'];\n\t\tall: T['_']['returning'] extends undefined ? DrizzleTypeError<'.all() cannot be used without .returning()'>\n\t\t\t: T['_']['returning'][];\n\t\tget: T['_']['returning'] extends undefined ? DrizzleTypeError<'.get() cannot be used without .returning()'>\n\t\t\t: T['_']['returning'];\n\t\tvalues: T['_']['returning'] extends undefined ? DrizzleTypeError<'.values() cannot be used without .returning()'>\n\t\t\t: any[][];\n\t\texecute: SQLiteUpdateExecute;\n\t}\n>;\n\nexport type SQLiteUpdateJoinFn<\n\tT extends AnySQLiteUpdate,\n> = <\n\tTJoinedTable extends SQLiteTable | Subquery | SQLiteViewBase | SQL,\n>(\n\ttable: TJoinedTable,\n\ton:\n\t\t| (\n\t\t\t(\n\t\t\t\tupdateTable: T['_']['table']['_']['columns'],\n\t\t\t\tfrom: T['_']['from'] extends SQLiteTable ? T['_']['from']['_']['columns']\n\t\t\t\t\t: T['_']['from'] extends Subquery | SQLiteViewBase ? T['_']['from']['_']['selectedFields']\n\t\t\t\t\t: never,\n\t\t\t) => SQL | undefined\n\t\t)\n\t\t| SQL\n\t\t| undefined,\n) => T;\n\nexport type SQLiteUpdateDynamic = SQLiteUpdate<\n\tT['_']['table'],\n\tT['_']['resultType'],\n\tT['_']['runResult'],\n\tT['_']['returning']\n>;\n\nexport type SQLiteUpdate<\n\tTTable extends SQLiteTable = SQLiteTable,\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = any,\n\tTFrom extends SQLiteTable | Subquery | SQLiteViewBase | SQL | undefined = undefined,\n\tTReturning extends Record | undefined = Record | undefined,\n> = SQLiteUpdateBase;\n\nexport type AnySQLiteUpdate = SQLiteUpdateBase;\n\nexport interface SQLiteUpdateBase<\n\tTTable extends SQLiteTable = SQLiteTable,\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = unknown,\n\tTFrom extends SQLiteTable | Subquery | SQLiteViewBase | SQL | undefined = undefined,\n\tTReturning = undefined,\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n> extends SQLWrapper, QueryPromise {\n\treadonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly table: TTable;\n\t\treadonly resultType: TResultType;\n\t\treadonly runResult: TRunResult;\n\t\treadonly from: TFrom;\n\t\treadonly returning: TReturning;\n\t\treadonly dynamic: TDynamic;\n\t\treadonly excludedMethods: TExcludedMethods;\n\t\treadonly result: TReturning extends undefined ? TRunResult : TReturning[];\n\t};\n}\n\nexport class SQLiteUpdateBase<\n\tTTable extends SQLiteTable = SQLiteTable,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = unknown,\n\tTFrom extends SQLiteTable | Subquery | SQLiteViewBase | SQL | undefined = undefined,\n\tTReturning = undefined,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTDynamic extends boolean = false,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTExcludedMethods extends string = never,\n> extends QueryPromise\n\timplements RunnableQuery, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteUpdate';\n\n\t/** @internal */\n\tconfig: SQLiteUpdateConfig;\n\n\tconstructor(\n\t\ttable: TTable,\n\t\tset: UpdateSet,\n\t\tprivate session: SQLiteSession,\n\t\tprivate dialect: SQLiteDialect,\n\t\twithList?: Subquery[],\n\t) {\n\t\tsuper();\n\t\tthis.config = { set, table, withList, joins: [] };\n\t}\n\n\tfrom(\n\t\tsource: TFrom,\n\t): SQLiteUpdateWithJoins {\n\t\tthis.config.from = source;\n\t\treturn this as any;\n\t}\n\n\tprivate createJoin(\n\t\tjoinType: TJoinType,\n\t): SQLiteUpdateJoinFn {\n\t\treturn ((\n\t\t\ttable: SQLiteTable | Subquery | SQLiteViewBase | SQL,\n\t\t\ton: ((updateTable: TTable, from: TFrom) => SQL | undefined) | SQL | undefined,\n\t\t) => {\n\t\t\tconst tableName = getTableLikeName(table);\n\n\t\t\tif (typeof tableName === 'string' && this.config.joins.some((join) => join.alias === tableName)) {\n\t\t\t\tthrow new Error(`Alias \"${tableName}\" is already used in this query`);\n\t\t\t}\n\n\t\t\tif (typeof on === 'function') {\n\t\t\t\tconst from = this.config.from\n\t\t\t\t\t? is(table, SQLiteTable)\n\t\t\t\t\t\t? table[Table.Symbol.Columns]\n\t\t\t\t\t\t: is(table, Subquery)\n\t\t\t\t\t\t? table._.selectedFields\n\t\t\t\t\t\t: is(table, SQLiteViewBase)\n\t\t\t\t\t\t? table[ViewBaseConfig].selectedFields\n\t\t\t\t\t\t: undefined\n\t\t\t\t\t: undefined;\n\t\t\t\ton = on(\n\t\t\t\t\tnew Proxy(\n\t\t\t\t\t\tthis.config.table[Table.Symbol.Columns],\n\t\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t\t) as any,\n\t\t\t\t\tfrom && new Proxy(\n\t\t\t\t\t\tfrom,\n\t\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t\t) as any,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.config.joins.push({ on, table, joinType, alias: tableName });\n\n\t\t\treturn this as any;\n\t\t}) as any;\n\t}\n\n\tleftJoin = this.createJoin('left');\n\n\trightJoin = this.createJoin('right');\n\n\tinnerJoin = this.createJoin('inner');\n\n\tfullJoin = this.createJoin('full');\n\n\t/**\n\t * Adds a 'where' clause to the query.\n\t *\n\t * Calling this method will update only those rows that fulfill a specified condition.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/update}\n\t *\n\t * @param where the 'where' clause.\n\t *\n\t * @example\n\t * You can use conditional operators and `sql function` to filter the rows to be updated.\n\t *\n\t * ```ts\n\t * // Update all cars with green color\n\t * db.update(cars).set({ color: 'red' })\n\t * .where(eq(cars.color, 'green'));\n\t * // or\n\t * db.update(cars).set({ color: 'red' })\n\t * .where(sql`${cars.color} = 'green'`)\n\t * ```\n\t *\n\t * You can logically combine conditional operators with `and()` and `or()` operators:\n\t *\n\t * ```ts\n\t * // Update all BMW cars with a green color\n\t * db.update(cars).set({ color: 'red' })\n\t * .where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW')));\n\t *\n\t * // Update all cars with the green or blue color\n\t * db.update(cars).set({ color: 'red' })\n\t * .where(or(eq(cars.color, 'green'), eq(cars.color, 'blue')));\n\t * ```\n\t */\n\twhere(where: SQL | undefined): SQLiteUpdateWithout {\n\t\tthis.config.where = where;\n\t\treturn this as any;\n\t}\n\n\torderBy(\n\t\tbuilder: (updateTable: TTable) => ValueOrArray,\n\t): SQLiteUpdateWithout;\n\torderBy(...columns: (SQLiteColumn | SQL | SQL.Aliased)[]): SQLiteUpdateWithout;\n\torderBy(\n\t\t...columns:\n\t\t\t| [(updateTable: TTable) => ValueOrArray]\n\t\t\t| (SQLiteColumn | SQL | SQL.Aliased)[]\n\t): SQLiteUpdateWithout {\n\t\tif (typeof columns[0] === 'function') {\n\t\t\tconst orderBy = columns[0](\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.table[Table.Symbol.Columns],\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'alias', sqlBehavior: 'sql' }),\n\t\t\t\t) as any,\n\t\t\t);\n\n\t\t\tconst orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy];\n\t\t\tthis.config.orderBy = orderByArray;\n\t\t} else {\n\t\t\tconst orderByArray = columns as (SQLiteColumn | SQL | SQL.Aliased)[];\n\t\t\tthis.config.orderBy = orderByArray;\n\t\t}\n\t\treturn this as any;\n\t}\n\n\tlimit(limit: number | Placeholder): SQLiteUpdateWithout {\n\t\tthis.config.limit = limit;\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `returning` clause to the query.\n\t *\n\t * Calling this method will return the specified fields of the updated rows. If no fields are specified, all fields will be returned.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/update#update-with-returning}\n\t *\n\t * @example\n\t * ```ts\n\t * // Update all cars with the green color and return all fields\n\t * const updatedCars: Car[] = await db.update(cars)\n\t * .set({ color: 'red' })\n\t * .where(eq(cars.color, 'green'))\n\t * .returning();\n\t *\n\t * // Update all cars with the green color and return only their id and brand fields\n\t * const updatedCarsIdsAndBrands: { id: number, brand: string }[] = await db.update(cars)\n\t * .set({ color: 'red' })\n\t * .where(eq(cars.color, 'green'))\n\t * .returning({ id: cars.id, brand: cars.brand });\n\t * ```\n\t */\n\treturning(): SQLiteUpdateReturningAll;\n\treturning(\n\t\tfields: TSelectedFields,\n\t): SQLiteUpdateReturning;\n\treturning(\n\t\tfields: SelectedFields = this.config.table[SQLiteTable.Symbol.Columns],\n\t): SQLiteUpdateWithout {\n\t\tthis.config.returning = orderSelectedFields(fields);\n\t\treturn this as any;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildUpdateQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\t/** @internal */\n\t_prepare(isOneTimeQuery = true): SQLiteUpdatePrepare {\n\t\treturn this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tthis.dialect.sqlToQuery(this.getSQL()),\n\t\t\tthis.config.returning,\n\t\t\tthis.config.returning ? 'all' : 'run',\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\ttype: 'insert',\n\t\t\t\ttables: extractUsedTable(this.config.table),\n\t\t\t},\n\t\t) as SQLiteUpdatePrepare;\n\t}\n\n\tprepare(): SQLiteUpdatePrepare {\n\t\treturn this._prepare(false);\n\t}\n\n\trun: ReturnType['run'] = (placeholderValues) => {\n\t\treturn this._prepare().run(placeholderValues);\n\t};\n\n\tall: ReturnType['all'] = (placeholderValues) => {\n\t\treturn this._prepare().all(placeholderValues);\n\t};\n\n\tget: ReturnType['get'] = (placeholderValues) => {\n\t\treturn this._prepare().get(placeholderValues);\n\t};\n\n\tvalues: ReturnType['values'] = (placeholderValues) => {\n\t\treturn this._prepare().values(placeholderValues);\n\t};\n\n\toverride async execute(): Promise> {\n\t\treturn (this.config.returning ? this.all() : this.run()) as SQLiteUpdateExecute;\n\t}\n\n\t$dynamic(): SQLiteUpdateDynamic {\n\t\treturn this as any;\n\t}\n}\n", "export * from './delete.ts';\nexport * from './insert.ts';\nexport * from './query-builder.ts';\nexport * from './select.ts';\nexport * from './select.types.ts';\nexport * from './update.ts';\n", "import { entityKind } from '~/entity.ts';\nimport { SQL, sql, type SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteSession } from '../session.ts';\nimport type { SQLiteTable } from '../table.ts';\nimport type { SQLiteView } from '../view.ts';\n\nexport class SQLiteCountBuilder<\n\tTSession extends SQLiteSession,\n> extends SQL implements Promise, SQLWrapper {\n\tprivate sql: SQL;\n\n\tstatic override readonly [entityKind] = 'SQLiteCountBuilderAsync';\n\t[Symbol.toStringTag] = 'SQLiteCountBuilderAsync';\n\n\tprivate session: TSession;\n\n\tprivate static buildEmbeddedCount(\n\t\tsource: SQLiteTable | SQLiteView | SQL | SQLWrapper,\n\t\tfilters?: SQL,\n\t): SQL {\n\t\treturn sql`(select count(*) from ${source}${sql.raw(' where ').if(filters)}${filters})`;\n\t}\n\n\tprivate static buildCount(\n\t\tsource: SQLiteTable | SQLiteView | SQL | SQLWrapper,\n\t\tfilters?: SQL,\n\t): SQL {\n\t\treturn sql`select count(*) from ${source}${sql.raw(' where ').if(filters)}${filters}`;\n\t}\n\n\tconstructor(\n\t\treadonly params: {\n\t\t\tsource: SQLiteTable | SQLiteView | SQL | SQLWrapper;\n\t\t\tfilters?: SQL;\n\t\t\tsession: TSession;\n\t\t},\n\t) {\n\t\tsuper(SQLiteCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);\n\n\t\tthis.session = params.session;\n\n\t\tthis.sql = SQLiteCountBuilder.buildCount(\n\t\t\tparams.source,\n\t\t\tparams.filters,\n\t\t);\n\t}\n\n\tthen(\n\t\tonfulfilled?: ((value: number) => TResult1 | PromiseLike) | null | undefined,\n\t\tonrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined,\n\t): Promise {\n\t\treturn Promise.resolve(this.session.count(this.sql)).then(\n\t\t\tonfulfilled,\n\t\t\tonrejected,\n\t\t);\n\t}\n\n\tcatch(\n\t\tonRejected?: ((reason: any) => never | PromiseLike) | null | undefined,\n\t): Promise {\n\t\treturn this.then(undefined, onRejected);\n\t}\n\n\tfinally(onFinally?: (() => void) | null | undefined): Promise {\n\t\treturn this.then(\n\t\t\t(value) => {\n\t\t\t\tonFinally?.();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\t(reason) => {\n\t\t\t\tonFinally?.();\n\t\t\t\tthrow reason;\n\t\t\t},\n\t\t);\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport {\n\ttype BuildQueryResult,\n\ttype BuildRelationalQueryResult,\n\ttype DBQueryConfig,\n\tmapRelationalRow,\n\ttype TableRelationalConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { Query, QueryWithTypings, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport type { KnownKeysOnly } from '~/utils.ts';\nimport type { SQLiteDialect } from '../dialect.ts';\nimport type { PreparedQueryConfig, SQLitePreparedQuery, SQLiteSession } from '../session.ts';\nimport type { SQLiteTable } from '../table.ts';\n\nexport type SQLiteRelationalQueryKind = TMode extends 'async'\n\t? SQLiteRelationalQuery\n\t: SQLiteSyncRelationalQuery;\n\nexport class RelationalQueryBuilder<\n\tTMode extends 'sync' | 'async',\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n\tTFields extends TableRelationalConfig,\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteAsyncRelationalQueryBuilder';\n\n\tconstructor(\n\t\tprotected mode: TMode,\n\t\tprotected fullSchema: Record,\n\t\tprotected schema: TSchema,\n\t\tprotected tableNamesMap: Record,\n\t\tprotected table: SQLiteTable,\n\t\tprotected tableConfig: TableRelationalConfig,\n\t\tprotected dialect: SQLiteDialect,\n\t\tprotected session: SQLiteSession<'async', unknown, TFullSchema, TSchema>,\n\t) {}\n\n\tfindMany>(\n\t\tconfig?: KnownKeysOnly>,\n\t): SQLiteRelationalQueryKind[]> {\n\t\treturn (this.mode === 'sync'\n\t\t\t? new SQLiteSyncRelationalQuery(\n\t\t\t\tthis.fullSchema,\n\t\t\t\tthis.schema,\n\t\t\t\tthis.tableNamesMap,\n\t\t\t\tthis.table,\n\t\t\t\tthis.tableConfig,\n\t\t\t\tthis.dialect,\n\t\t\t\tthis.session,\n\t\t\t\tconfig ? (config as DBQueryConfig<'many', true>) : {},\n\t\t\t\t'many',\n\t\t\t)\n\t\t\t: new SQLiteRelationalQuery(\n\t\t\t\tthis.fullSchema,\n\t\t\t\tthis.schema,\n\t\t\t\tthis.tableNamesMap,\n\t\t\t\tthis.table,\n\t\t\t\tthis.tableConfig,\n\t\t\t\tthis.dialect,\n\t\t\t\tthis.session,\n\t\t\t\tconfig ? (config as DBQueryConfig<'many', true>) : {},\n\t\t\t\t'many',\n\t\t\t)) as SQLiteRelationalQueryKind[]>;\n\t}\n\n\tfindFirst, 'limit'>>(\n\t\tconfig?: KnownKeysOnly, 'limit'>>,\n\t): SQLiteRelationalQueryKind | undefined> {\n\t\treturn (this.mode === 'sync'\n\t\t\t? new SQLiteSyncRelationalQuery(\n\t\t\t\tthis.fullSchema,\n\t\t\t\tthis.schema,\n\t\t\t\tthis.tableNamesMap,\n\t\t\t\tthis.table,\n\t\t\t\tthis.tableConfig,\n\t\t\t\tthis.dialect,\n\t\t\t\tthis.session,\n\t\t\t\tconfig ? { ...(config as DBQueryConfig<'many', true> | undefined), limit: 1 } : { limit: 1 },\n\t\t\t\t'first',\n\t\t\t)\n\t\t\t: new SQLiteRelationalQuery(\n\t\t\t\tthis.fullSchema,\n\t\t\t\tthis.schema,\n\t\t\t\tthis.tableNamesMap,\n\t\t\t\tthis.table,\n\t\t\t\tthis.tableConfig,\n\t\t\t\tthis.dialect,\n\t\t\t\tthis.session,\n\t\t\t\tconfig ? { ...(config as DBQueryConfig<'many', true> | undefined), limit: 1 } : { limit: 1 },\n\t\t\t\t'first',\n\t\t\t)) as SQLiteRelationalQueryKind | undefined>;\n\t}\n}\n\nexport class SQLiteRelationalQuery extends QueryPromise\n\timplements RunnableQuery, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteAsyncRelationalQuery';\n\n\tdeclare readonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly type: TType;\n\t\treadonly result: TResult;\n\t};\n\n\t/** @internal */\n\tmode: 'many' | 'first';\n\n\tconstructor(\n\t\tprivate fullSchema: Record,\n\t\tprivate schema: TablesRelationalConfig,\n\t\tprivate tableNamesMap: Record,\n\t\t/** @internal */\n\t\tpublic table: SQLiteTable,\n\t\tprivate tableConfig: TableRelationalConfig,\n\t\tprivate dialect: SQLiteDialect,\n\t\tprivate session: SQLiteSession<'sync' | 'async', unknown, Record, TablesRelationalConfig>,\n\t\tprivate config: DBQueryConfig<'many', true> | true,\n\t\tmode: 'many' | 'first',\n\t) {\n\t\tsuper();\n\t\tthis.mode = mode;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildRelationalQuery({\n\t\t\tfullSchema: this.fullSchema,\n\t\t\tschema: this.schema,\n\t\t\ttableNamesMap: this.tableNamesMap,\n\t\t\ttable: this.table,\n\t\t\ttableConfig: this.tableConfig,\n\t\t\tqueryConfig: this.config,\n\t\t\ttableAlias: this.tableConfig.tsName,\n\t\t}).sql as SQL;\n\t}\n\n\t/** @internal */\n\t_prepare(\n\t\tisOneTimeQuery = false,\n\t): SQLitePreparedQuery {\n\t\tconst { query, builtQuery } = this._toSQL();\n\n\t\treturn this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tbuiltQuery,\n\t\t\tundefined,\n\t\t\tthis.mode === 'first' ? 'get' : 'all',\n\t\t\ttrue,\n\t\t\t(rawRows, mapColumnValue) => {\n\t\t\t\tconst rows = rawRows.map((row) =>\n\t\t\t\t\tmapRelationalRow(this.schema, this.tableConfig, row, query.selection, mapColumnValue)\n\t\t\t\t);\n\t\t\t\tif (this.mode === 'first') {\n\t\t\t\t\treturn rows[0] as TResult;\n\t\t\t\t}\n\t\t\t\treturn rows as TResult;\n\t\t\t},\n\t\t) as SQLitePreparedQuery;\n\t}\n\n\tprepare(): SQLitePreparedQuery {\n\t\treturn this._prepare(false);\n\t}\n\n\tprivate _toSQL(): { query: BuildRelationalQueryResult; builtQuery: QueryWithTypings } {\n\t\tconst query = this.dialect.buildRelationalQuery({\n\t\t\tfullSchema: this.fullSchema,\n\t\t\tschema: this.schema,\n\t\t\ttableNamesMap: this.tableNamesMap,\n\t\t\ttable: this.table,\n\t\t\ttableConfig: this.tableConfig,\n\t\t\tqueryConfig: this.config,\n\t\t\ttableAlias: this.tableConfig.tsName,\n\t\t});\n\n\t\tconst builtQuery = this.dialect.sqlToQuery(query.sql as SQL);\n\n\t\treturn { query, builtQuery };\n\t}\n\n\ttoSQL(): Query {\n\t\treturn this._toSQL().builtQuery;\n\t}\n\n\t/** @internal */\n\texecuteRaw(): TResult {\n\t\tif (this.mode === 'first') {\n\t\t\treturn this._prepare(false).get() as TResult;\n\t\t}\n\t\treturn this._prepare(false).all() as TResult;\n\t}\n\n\toverride async execute(): Promise {\n\t\treturn this.executeRaw();\n\t}\n}\n\nexport class SQLiteSyncRelationalQuery extends SQLiteRelationalQuery<'sync', TResult> {\n\tstatic override readonly [entityKind]: string = 'SQLiteSyncRelationalQuery';\n\n\tsync(): TResult {\n\t\treturn this.executeRaw();\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { PreparedQuery } from '~/session.ts';\nimport type { SQL, SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteAsyncDialect } from '../dialect.ts';\n\ntype SQLiteRawAction = 'all' | 'get' | 'values' | 'run';\nexport interface SQLiteRawConfig {\n\taction: SQLiteRawAction;\n}\n\nexport interface SQLiteRaw extends QueryPromise, RunnableQuery, SQLWrapper {}\n\nexport class SQLiteRaw extends QueryPromise\n\timplements RunnableQuery, SQLWrapper, PreparedQuery\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteRaw';\n\n\tdeclare readonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly result: TResult;\n\t};\n\n\t/** @internal */\n\tconfig: SQLiteRawConfig;\n\n\tconstructor(\n\t\tpublic execute: () => Promise,\n\t\t/** @internal */\n\t\tpublic getSQL: () => SQL,\n\t\taction: SQLiteRawAction,\n\t\tprivate dialect: SQLiteAsyncDialect,\n\t\tprivate mapBatchResult: (result: unknown) => unknown,\n\t) {\n\t\tsuper();\n\t\tthis.config = { action };\n\t}\n\n\tgetQuery() {\n\t\treturn { ...this.dialect.sqlToQuery(this.getSQL()), method: this.config.action };\n\t}\n\n\tmapResult(result: unknown, isFromBatch?: boolean) {\n\t\treturn isFromBatch ? this.mapBatchResult(result) : result;\n\t}\n\n\t_prepare(): PreparedQuery {\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tisResponseInArrayMode(): boolean {\n\t\treturn false;\n\t}\n}\n", "import type { Cache } from '~/cache/core/cache.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type { ExtractTablesWithRelations, RelationalSchemaConfig, TablesRelationalConfig } from '~/relations.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport { type ColumnsSelection, type SQL, sql, type SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteAsyncDialect, SQLiteSyncDialect } from '~/sqlite-core/dialect.ts';\nimport {\n\tQueryBuilder,\n\tSQLiteDeleteBase,\n\tSQLiteInsertBuilder,\n\tSQLiteSelectBuilder,\n\tSQLiteUpdateBuilder,\n} from '~/sqlite-core/query-builders/index.ts';\nimport type {\n\tDBResult,\n\tResult,\n\tSQLiteSession,\n\tSQLiteTransaction,\n\tSQLiteTransactionConfig,\n} from '~/sqlite-core/session.ts';\nimport type { SQLiteTable } from '~/sqlite-core/table.ts';\nimport { WithSubquery } from '~/subquery.ts';\nimport type { DrizzleTypeError } from '~/utils.ts';\nimport { SQLiteCountBuilder } from './query-builders/count.ts';\nimport { RelationalQueryBuilder } from './query-builders/query.ts';\nimport { SQLiteRaw } from './query-builders/raw.ts';\nimport type { SelectedFields } from './query-builders/select.types.ts';\nimport type { WithBuilder } from './subquery.ts';\nimport type { SQLiteViewBase } from './view-base.ts';\n\nexport class BaseSQLiteDatabase<\n\tTResultKind extends 'sync' | 'async',\n\tTRunResult,\n\tTFullSchema extends Record = Record,\n\tTSchema extends TablesRelationalConfig = ExtractTablesWithRelations,\n> {\n\tstatic readonly [entityKind]: string = 'BaseSQLiteDatabase';\n\n\tdeclare readonly _: {\n\t\treadonly schema: TSchema | undefined;\n\t\treadonly fullSchema: TFullSchema;\n\t\treadonly tableNamesMap: Record;\n\t};\n\n\tquery: TFullSchema extends Record\n\t\t? DrizzleTypeError<'Seems like the schema generic is missing - did you forget to add it to your DB type?'>\n\t\t: {\n\t\t\t[K in keyof TSchema]: RelationalQueryBuilder;\n\t\t};\n\n\tconstructor(\n\t\tprivate resultKind: TResultKind,\n\t\t/** @internal */\n\t\treadonly dialect: { sync: SQLiteSyncDialect; async: SQLiteAsyncDialect }[TResultKind],\n\t\t/** @internal */\n\t\treadonly session: SQLiteSession,\n\t\tschema: RelationalSchemaConfig | undefined,\n\t) {\n\t\tthis._ = schema\n\t\t\t? {\n\t\t\t\tschema: schema.schema,\n\t\t\t\tfullSchema: schema.fullSchema as TFullSchema,\n\t\t\t\ttableNamesMap: schema.tableNamesMap,\n\t\t\t}\n\t\t\t: {\n\t\t\t\tschema: undefined,\n\t\t\t\tfullSchema: {} as TFullSchema,\n\t\t\t\ttableNamesMap: {},\n\t\t\t};\n\t\tthis.query = {} as typeof this['query'];\n\t\tconst query = this.query as {\n\t\t\t[K in keyof TSchema]: RelationalQueryBuilder;\n\t\t};\n\t\tif (this._.schema) {\n\t\t\tfor (const [tableName, columns] of Object.entries(this._.schema)) {\n\t\t\t\tquery[tableName as keyof TSchema] = new RelationalQueryBuilder(\n\t\t\t\t\tresultKind,\n\t\t\t\t\tschema!.fullSchema,\n\t\t\t\t\tthis._.schema,\n\t\t\t\t\tthis._.tableNamesMap,\n\t\t\t\t\tschema!.fullSchema[tableName] as SQLiteTable,\n\t\t\t\t\tcolumns,\n\t\t\t\t\tdialect,\n\t\t\t\t\tsession as SQLiteSession as any,\n\t\t\t\t) as typeof query[keyof TSchema];\n\t\t\t}\n\t\t}\n\t\tthis.$cache = { invalidate: async (_params: any) => {} };\n\t}\n\n\t/**\n\t * Creates a subquery that defines a temporary named result set as a CTE.\n\t *\n\t * It is useful for breaking down complex queries into simpler parts and for reusing the result set in subsequent parts of the query.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#with-clause}\n\t *\n\t * @param alias The alias for the subquery.\n\t *\n\t * Failure to provide an alias will result in a DrizzleTypeError, preventing the subquery from being referenced in other queries.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Create a subquery with alias 'sq' and use it in the select query\n\t * const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42)));\n\t *\n\t * const result = await db.with(sq).select().from(sq);\n\t * ```\n\t *\n\t * To select arbitrary SQL values as fields in a CTE and reference them in other CTEs or in the main query, you need to add aliases to them:\n\t *\n\t * ```ts\n\t * // Select an arbitrary SQL value as a field in a CTE and reference it in the main query\n\t * const sq = db.$with('sq').as(db.select({\n\t * name: sql`upper(${users.name})`.as('name'),\n\t * })\n\t * .from(users));\n\t *\n\t * const result = await db.with(sq).select({ name: sq.name }).from(sq);\n\t * ```\n\t */\n\t$with: WithBuilder = (alias: string, selection?: ColumnsSelection) => {\n\t\tconst self = this;\n\t\tconst as = (\n\t\t\tqb:\n\t\t\t\t| TypedQueryBuilder\n\t\t\t\t| SQL\n\t\t\t\t| ((qb: QueryBuilder) => TypedQueryBuilder | SQL),\n\t\t) => {\n\t\t\tif (typeof qb === 'function') {\n\t\t\t\tqb = qb(new QueryBuilder(self.dialect));\n\t\t\t}\n\n\t\t\treturn new Proxy(\n\t\t\t\tnew WithSubquery(\n\t\t\t\t\tqb.getSQL(),\n\t\t\t\t\tselection ?? ('getSelectedFields' in qb ? qb.getSelectedFields() ?? {} : {}) as SelectedFields,\n\t\t\t\t\talias,\n\t\t\t\t\ttrue,\n\t\t\t\t),\n\t\t\t\tnew SelectionProxyHandler({ alias, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t\t);\n\t\t};\n\t\treturn { as };\n\t};\n\n\t$count(\n\t\tsource: SQLiteTable | SQLiteViewBase | SQL | SQLWrapper,\n\t\tfilters?: SQL,\n\t) {\n\t\treturn new SQLiteCountBuilder({ source, filters, session: this.session });\n\t}\n\n\t/**\n\t * Incorporates a previously defined CTE (using `$with`) into the main query.\n\t *\n\t * This method allows the main query to reference a temporary named result set.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#with-clause}\n\t *\n\t * @param queries The CTEs to incorporate into the main query.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Define a subquery 'sq' as a CTE using $with\n\t * const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42)));\n\t *\n\t * // Incorporate the CTE 'sq' into the main query and select from it\n\t * const result = await db.with(sq).select().from(sq);\n\t * ```\n\t */\n\twith(...queries: WithSubquery[]) {\n\t\tconst self = this;\n\n\t\t/**\n\t\t * Creates a select query.\n\t\t *\n\t\t * Calling this method with no arguments will select all columns from the table. Pass a selection object to specify the columns you want to select.\n\t\t *\n\t\t * Use `.from()` method to specify which table to select from.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/select}\n\t\t *\n\t\t * @param fields The selection object.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Select all columns and all rows from the 'cars' table\n\t\t * const allCars: Car[] = await db.select().from(cars);\n\t\t *\n\t\t * // Select specific columns and all rows from the 'cars' table\n\t\t * const carsIdsAndBrands: { id: number; brand: string }[] = await db.select({\n\t\t * id: cars.id,\n\t\t * brand: cars.brand\n\t\t * })\n\t\t * .from(cars);\n\t\t * ```\n\t\t *\n\t\t * Like in SQL, you can use arbitrary expressions as selection fields, not just table columns:\n\t\t *\n\t\t * ```ts\n\t\t * // Select specific columns along with expression and all rows from the 'cars' table\n\t\t * const carsIdsAndLowerNames: { id: number; lowerBrand: string }[] = await db.select({\n\t\t * id: cars.id,\n\t\t * lowerBrand: sql`lower(${cars.brand})`,\n\t\t * })\n\t\t * .from(cars);\n\t\t * ```\n\t\t */\n\t\tfunction select(): SQLiteSelectBuilder;\n\t\tfunction select(\n\t\t\tfields: TSelection,\n\t\t): SQLiteSelectBuilder;\n\t\tfunction select(\n\t\t\tfields?: SelectedFields,\n\t\t): SQLiteSelectBuilder {\n\t\t\treturn new SQLiteSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: self.session,\n\t\t\t\tdialect: self.dialect,\n\t\t\t\twithList: queries,\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Adds `distinct` expression to the select query.\n\t\t *\n\t\t * Calling this method will return only unique values. When multiple columns are selected, it returns rows with unique combinations of values in these columns.\n\t\t *\n\t\t * Use `.from()` method to specify which table to select from.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/select#distinct}\n\t\t *\n\t\t * @param fields The selection object.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Select all unique rows from the 'cars' table\n\t\t * await db.selectDistinct()\n\t\t * .from(cars)\n\t\t * .orderBy(cars.id, cars.brand, cars.color);\n\t\t *\n\t\t * // Select all unique brands from the 'cars' table\n\t\t * await db.selectDistinct({ brand: cars.brand })\n\t\t * .from(cars)\n\t\t * .orderBy(cars.brand);\n\t\t * ```\n\t\t */\n\t\tfunction selectDistinct(): SQLiteSelectBuilder;\n\t\tfunction selectDistinct(\n\t\t\tfields: TSelection,\n\t\t): SQLiteSelectBuilder;\n\t\tfunction selectDistinct(\n\t\t\tfields?: SelectedFields,\n\t\t): SQLiteSelectBuilder {\n\t\t\treturn new SQLiteSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: self.session,\n\t\t\t\tdialect: self.dialect,\n\t\t\t\twithList: queries,\n\t\t\t\tdistinct: true,\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Creates an update query.\n\t\t *\n\t\t * Calling this method without `.where()` clause will update all rows in a table. The `.where()` clause specifies which rows should be updated.\n\t\t *\n\t\t * Use `.set()` method to specify which values to update.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/update}\n\t\t *\n\t\t * @param table The table to update.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Update all rows in the 'cars' table\n\t\t * await db.update(cars).set({ color: 'red' });\n\t\t *\n\t\t * // Update rows with filters and conditions\n\t\t * await db.update(cars).set({ color: 'red' }).where(eq(cars.brand, 'BMW'));\n\t\t *\n\t\t * // Update with returning clause\n\t\t * const updatedCar: Car[] = await db.update(cars)\n\t\t * .set({ color: 'red' })\n\t\t * .where(eq(cars.id, 1))\n\t\t * .returning();\n\t\t * ```\n\t\t */\n\t\tfunction update(table: TTable): SQLiteUpdateBuilder {\n\t\t\treturn new SQLiteUpdateBuilder(table, self.session, self.dialect, queries);\n\t\t}\n\n\t\t/**\n\t\t * Creates an insert query.\n\t\t *\n\t\t * Calling this method will create new rows in a table. Use `.values()` method to specify which values to insert.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/insert}\n\t\t *\n\t\t * @param table The table to insert into.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Insert one row\n\t\t * await db.insert(cars).values({ brand: 'BMW' });\n\t\t *\n\t\t * // Insert multiple rows\n\t\t * await db.insert(cars).values([{ brand: 'BMW' }, { brand: 'Porsche' }]);\n\t\t *\n\t\t * // Insert with returning clause\n\t\t * const insertedCar: Car[] = await db.insert(cars)\n\t\t * .values({ brand: 'BMW' })\n\t\t * .returning();\n\t\t * ```\n\t\t */\n\t\tfunction insert(into: TTable): SQLiteInsertBuilder {\n\t\t\treturn new SQLiteInsertBuilder(into, self.session, self.dialect, queries);\n\t\t}\n\n\t\t/**\n\t\t * Creates a delete query.\n\t\t *\n\t\t * Calling this method without `.where()` clause will delete all rows in a table. The `.where()` clause specifies which rows should be deleted.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/delete}\n\t\t *\n\t\t * @param table The table to delete from.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Delete all rows in the 'cars' table\n\t\t * await db.delete(cars);\n\t\t *\n\t\t * // Delete rows with filters and conditions\n\t\t * await db.delete(cars).where(eq(cars.color, 'green'));\n\t\t *\n\t\t * // Delete with returning clause\n\t\t * const deletedCar: Car[] = await db.delete(cars)\n\t\t * .where(eq(cars.id, 1))\n\t\t * .returning();\n\t\t * ```\n\t\t */\n\t\tfunction delete_(from: TTable): SQLiteDeleteBase {\n\t\t\treturn new SQLiteDeleteBase(from, self.session, self.dialect, queries);\n\t\t}\n\n\t\treturn { select, selectDistinct, update, insert, delete: delete_ };\n\t}\n\n\t/**\n\t * Creates a select query.\n\t *\n\t * Calling this method with no arguments will select all columns from the table. Pass a selection object to specify the columns you want to select.\n\t *\n\t * Use `.from()` method to specify which table to select from.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select}\n\t *\n\t * @param fields The selection object.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all columns and all rows from the 'cars' table\n\t * const allCars: Car[] = await db.select().from(cars);\n\t *\n\t * // Select specific columns and all rows from the 'cars' table\n\t * const carsIdsAndBrands: { id: number; brand: string }[] = await db.select({\n\t * id: cars.id,\n\t * brand: cars.brand\n\t * })\n\t * .from(cars);\n\t * ```\n\t *\n\t * Like in SQL, you can use arbitrary expressions as selection fields, not just table columns:\n\t *\n\t * ```ts\n\t * // Select specific columns along with expression and all rows from the 'cars' table\n\t * const carsIdsAndLowerNames: { id: number; lowerBrand: string }[] = await db.select({\n\t * id: cars.id,\n\t * lowerBrand: sql`lower(${cars.brand})`,\n\t * })\n\t * .from(cars);\n\t * ```\n\t */\n\tselect(): SQLiteSelectBuilder;\n\tselect(\n\t\tfields: TSelection,\n\t): SQLiteSelectBuilder;\n\tselect(fields?: SelectedFields): SQLiteSelectBuilder {\n\t\treturn new SQLiteSelectBuilder({ fields: fields ?? undefined, session: this.session, dialect: this.dialect });\n\t}\n\n\t/**\n\t * Adds `distinct` expression to the select query.\n\t *\n\t * Calling this method will return only unique values. When multiple columns are selected, it returns rows with unique combinations of values in these columns.\n\t *\n\t * Use `.from()` method to specify which table to select from.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#distinct}\n\t *\n\t * @param fields The selection object.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all unique rows from the 'cars' table\n\t * await db.selectDistinct()\n\t * .from(cars)\n\t * .orderBy(cars.id, cars.brand, cars.color);\n\t *\n\t * // Select all unique brands from the 'cars' table\n\t * await db.selectDistinct({ brand: cars.brand })\n\t * .from(cars)\n\t * .orderBy(cars.brand);\n\t * ```\n\t */\n\tselectDistinct(): SQLiteSelectBuilder;\n\tselectDistinct(\n\t\tfields: TSelection,\n\t): SQLiteSelectBuilder;\n\tselectDistinct(\n\t\tfields?: SelectedFields,\n\t): SQLiteSelectBuilder {\n\t\treturn new SQLiteSelectBuilder({\n\t\t\tfields: fields ?? undefined,\n\t\t\tsession: this.session,\n\t\t\tdialect: this.dialect,\n\t\t\tdistinct: true,\n\t\t});\n\t}\n\n\t/**\n\t * Creates an update query.\n\t *\n\t * Calling this method without `.where()` clause will update all rows in a table. The `.where()` clause specifies which rows should be updated.\n\t *\n\t * Use `.set()` method to specify which values to update.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/update}\n\t *\n\t * @param table The table to update.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Update all rows in the 'cars' table\n\t * await db.update(cars).set({ color: 'red' });\n\t *\n\t * // Update rows with filters and conditions\n\t * await db.update(cars).set({ color: 'red' }).where(eq(cars.brand, 'BMW'));\n\t *\n\t * // Update with returning clause\n\t * const updatedCar: Car[] = await db.update(cars)\n\t * .set({ color: 'red' })\n\t * .where(eq(cars.id, 1))\n\t * .returning();\n\t * ```\n\t */\n\tupdate(table: TTable): SQLiteUpdateBuilder {\n\t\treturn new SQLiteUpdateBuilder(table, this.session, this.dialect);\n\t}\n\n\t$cache: { invalidate: Cache['onMutate'] };\n\n\t/**\n\t * Creates an insert query.\n\t *\n\t * Calling this method will create new rows in a table. Use `.values()` method to specify which values to insert.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/insert}\n\t *\n\t * @param table The table to insert into.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Insert one row\n\t * await db.insert(cars).values({ brand: 'BMW' });\n\t *\n\t * // Insert multiple rows\n\t * await db.insert(cars).values([{ brand: 'BMW' }, { brand: 'Porsche' }]);\n\t *\n\t * // Insert with returning clause\n\t * const insertedCar: Car[] = await db.insert(cars)\n\t * .values({ brand: 'BMW' })\n\t * .returning();\n\t * ```\n\t */\n\tinsert(into: TTable): SQLiteInsertBuilder {\n\t\treturn new SQLiteInsertBuilder(into, this.session, this.dialect);\n\t}\n\n\t/**\n\t * Creates a delete query.\n\t *\n\t * Calling this method without `.where()` clause will delete all rows in a table. The `.where()` clause specifies which rows should be deleted.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/delete}\n\t *\n\t * @param table The table to delete from.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Delete all rows in the 'cars' table\n\t * await db.delete(cars);\n\t *\n\t * // Delete rows with filters and conditions\n\t * await db.delete(cars).where(eq(cars.color, 'green'));\n\t *\n\t * // Delete with returning clause\n\t * const deletedCar: Car[] = await db.delete(cars)\n\t * .where(eq(cars.id, 1))\n\t * .returning();\n\t * ```\n\t */\n\tdelete(from: TTable): SQLiteDeleteBase {\n\t\treturn new SQLiteDeleteBase(from, this.session, this.dialect);\n\t}\n\n\trun(query: SQLWrapper | string): DBResult {\n\t\tconst sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();\n\t\tif (this.resultKind === 'async') {\n\t\t\treturn new SQLiteRaw(\n\t\t\t\tasync () => this.session.run(sequel),\n\t\t\t\t() => sequel,\n\t\t\t\t'run',\n\t\t\t\tthis.dialect as SQLiteAsyncDialect,\n\t\t\t\tthis.session.extractRawRunValueFromBatchResult.bind(this.session),\n\t\t\t) as DBResult;\n\t\t}\n\t\treturn this.session.run(sequel) as DBResult;\n\t}\n\n\tall(query: SQLWrapper | string): DBResult {\n\t\tconst sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();\n\t\tif (this.resultKind === 'async') {\n\t\t\treturn new SQLiteRaw(\n\t\t\t\tasync () => this.session.all(sequel),\n\t\t\t\t() => sequel,\n\t\t\t\t'all',\n\t\t\t\tthis.dialect as SQLiteAsyncDialect,\n\t\t\t\tthis.session.extractRawAllValueFromBatchResult.bind(this.session),\n\t\t\t) as any;\n\t\t}\n\t\treturn this.session.all(sequel) as DBResult;\n\t}\n\n\tget(query: SQLWrapper | string): DBResult {\n\t\tconst sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();\n\t\tif (this.resultKind === 'async') {\n\t\t\treturn new SQLiteRaw(\n\t\t\t\tasync () => this.session.get(sequel),\n\t\t\t\t() => sequel,\n\t\t\t\t'get',\n\t\t\t\tthis.dialect as SQLiteAsyncDialect,\n\t\t\t\tthis.session.extractRawGetValueFromBatchResult.bind(this.session),\n\t\t\t) as DBResult;\n\t\t}\n\t\treturn this.session.get(sequel) as DBResult;\n\t}\n\n\tvalues(query: SQLWrapper | string): DBResult {\n\t\tconst sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();\n\t\tif (this.resultKind === 'async') {\n\t\t\treturn new SQLiteRaw(\n\t\t\t\tasync () => this.session.values(sequel),\n\t\t\t\t() => sequel,\n\t\t\t\t'values',\n\t\t\t\tthis.dialect as SQLiteAsyncDialect,\n\t\t\t\tthis.session.extractRawValuesValueFromBatchResult.bind(this.session),\n\t\t\t) as any;\n\t\t}\n\t\treturn this.session.values(sequel) as DBResult;\n\t}\n\n\ttransaction(\n\t\ttransaction: (tx: SQLiteTransaction) => Result,\n\t\tconfig?: SQLiteTransactionConfig,\n\t): Result {\n\t\treturn this.session.transaction(transaction, config);\n\t}\n}\n\nexport type SQLiteWithReplicas = Q & { $primary: Q; $replicas: Q[] };\n\nexport const withReplicas = <\n\tTResultKind extends 'sync' | 'async',\n\tTRunResult,\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n\tQ extends BaseSQLiteDatabase<\n\t\tTResultKind,\n\t\tTRunResult,\n\t\tTFullSchema,\n\t\tTSchema extends Record ? ExtractTablesWithRelations : TSchema\n\t>,\n>(\n\tprimary: Q,\n\treplicas: [Q, ...Q[]],\n\tgetReplica: (replicas: Q[]) => Q = () => replicas[Math.floor(Math.random() * replicas.length)]!,\n): SQLiteWithReplicas => {\n\tconst select: Q['select'] = (...args: []) => getReplica(replicas).select(...args);\n\tconst selectDistinct: Q['selectDistinct'] = (...args: []) => getReplica(replicas).selectDistinct(...args);\n\tconst $count: Q['$count'] = (...args: [any]) => getReplica(replicas).$count(...args);\n\tconst $with: Q['with'] = (...args: []) => getReplica(replicas).with(...args);\n\n\tconst update: Q['update'] = (...args: [any]) => primary.update(...args);\n\tconst insert: Q['insert'] = (...args: [any]) => primary.insert(...args);\n\tconst $delete: Q['delete'] = (...args: [any]) => primary.delete(...args);\n\tconst run: Q['run'] = (...args: [any]) => primary.run(...args);\n\tconst all: Q['all'] = (...args: [any]) => primary.all(...args);\n\tconst get: Q['get'] = (...args: [any]) => primary.get(...args);\n\tconst values: Q['values'] = (...args: [any]) => primary.values(...args);\n\tconst transaction: Q['transaction'] = (...args: [any]) => primary.transaction(...args);\n\n\treturn {\n\t\t...primary,\n\t\tupdate,\n\t\tinsert,\n\t\tdelete: $delete,\n\t\trun,\n\t\tall,\n\t\tget,\n\t\tvalues,\n\t\ttransaction,\n\t\t$primary: primary,\n\t\t$replicas: replicas,\n\t\tselect,\n\t\tselectDistinct,\n\t\t$count,\n\t\twith: $with,\n\t\tget query() {\n\t\t\treturn getReplica(replicas).query;\n\t\t},\n\t};\n};\n", "import { entityKind } from '~/entity.ts';\nimport type { Table } from '~/index.ts';\nimport type { CacheConfig } from './types.ts';\n\nexport abstract class Cache {\n\tstatic readonly [entityKind]: string = 'Cache';\n\n\tabstract strategy(): 'explicit' | 'all';\n\n\t/**\n\t * Invoked if we should check cache for cached response\n\t * @param sql\n\t * @param tables\n\t */\n\tabstract get(\n\t\tkey: string,\n\t\ttables: string[],\n\t\tisTag: boolean,\n\t\tisAutoInvalidate?: boolean,\n\t): Promise;\n\n\t/**\n\t * Invoked if new query should be inserted to cache\n\t * @param sql\n\t * @param tables\n\t */\n\tabstract put(\n\t\thashedQuery: string,\n\t\tresponse: any,\n\t\ttables: string[],\n\t\tisTag: boolean,\n\t\tconfig?: CacheConfig,\n\t): Promise;\n\n\t/**\n\t * Invoked if insert, update, delete was invoked\n\t * @param tables\n\t */\n\tabstract onMutate(\n\t\tparams: MutationOption,\n\t): Promise;\n}\n\nexport class NoopCache extends Cache {\n\toverride strategy() {\n\t\treturn 'all' as const;\n\t}\n\n\tstatic override readonly [entityKind]: string = 'NoopCache';\n\n\toverride async get(_key: string): Promise {\n\t\treturn undefined;\n\t}\n\toverride async put(\n\t\t_hashedQuery: string,\n\t\t_response: any,\n\t\t_tables: string[],\n\t\t_config?: any,\n\t): Promise {\n\t\t// noop\n\t}\n\toverride async onMutate(_params: MutationOption): Promise {\n\t\t// noop\n\t}\n}\n\nexport type MutationOption = { tags?: string | string[]; tables?: Table | Table[] | string | string[] };\n\nexport async function hashQuery(sql: string, params?: any[]) {\n\tconst dataToHash = `${sql}-${JSON.stringify(params)}`;\n\tconst encoder = new TextEncoder();\n\tconst data = encoder.encode(dataToHash);\n\tconst hashBuffer = await crypto.subtle.digest('SHA-256', data);\n\tconst hashArray = [...new Uint8Array(hashBuffer)];\n\tconst hashHex = hashArray.map((b) => b.toString(16).padStart(2, '0')).join('');\n\n\treturn hashHex;\n}\n", "export * from './cache.ts';\n", "import { TableAliasProxyHandler } from '~/alias.ts';\nimport type { BuildAliasTable } from './query-builders/select.types.ts';\n\nimport type { SQLiteTable } from './table.ts';\nimport type { SQLiteViewBase } from './view-base.ts';\n\nexport function alias(\n\ttable: TTable,\n\talias: TAlias,\n): BuildAliasTable {\n\treturn new Proxy(table, new TableAliasProxyHandler(alias, false)) as any;\n}\n", "import { type Cache, hashQuery, NoopCache } from '~/cache/core/cache.ts';\nimport type { WithCacheConfig } from '~/cache/core/types.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport { DrizzleError, DrizzleQueryError, TransactionRollbackError } from '~/errors.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { TablesRelationalConfig } from '~/relations.ts';\nimport type { PreparedQuery } from '~/session.ts';\nimport type { Query, SQL } from '~/sql/sql.ts';\nimport type { SQLiteAsyncDialect, SQLiteSyncDialect } from '~/sqlite-core/dialect.ts';\nimport { BaseSQLiteDatabase } from './db.ts';\nimport type { SQLiteRaw } from './query-builders/raw.ts';\nimport type { SelectedFieldsOrdered } from './query-builders/select.types.ts';\n\nexport interface PreparedQueryConfig {\n\ttype: 'sync' | 'async';\n\trun: unknown;\n\tall: unknown;\n\tget: unknown;\n\tvalues: unknown;\n\texecute: unknown;\n}\n\nexport class ExecuteResultSync extends QueryPromise {\n\tstatic override readonly [entityKind]: string = 'ExecuteResultSync';\n\n\tconstructor(private resultCb: () => T) {\n\t\tsuper();\n\t}\n\n\toverride async execute(): Promise {\n\t\treturn this.resultCb();\n\t}\n\n\tsync(): T {\n\t\treturn this.resultCb();\n\t}\n}\n\nexport type ExecuteResult = TType extends 'async' ? Promise\n\t: ExecuteResultSync;\n\nexport abstract class SQLitePreparedQuery implements PreparedQuery {\n\tstatic readonly [entityKind]: string = 'PreparedQuery';\n\n\t/** @internal */\n\tjoinsNotNullableMap?: Record;\n\n\tconstructor(\n\t\tprivate mode: 'sync' | 'async',\n\t\tprivate executeMethod: SQLiteExecuteMethod,\n\t\tprotected query: Query,\n\t\tprivate cache?: Cache,\n\t\t// per query related metadata\n\t\tprivate queryMetadata?: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t} | undefined,\n\t\t// config that was passed through $withCache\n\t\tprivate cacheConfig?: WithCacheConfig,\n\t) {\n\t\t// it means that no $withCache options were passed and it should be just enabled\n\t\tif (cache && cache.strategy() === 'all' && cacheConfig === undefined) {\n\t\t\tthis.cacheConfig = { enable: true, autoInvalidate: true };\n\t\t}\n\t\tif (!this.cacheConfig?.enable) {\n\t\t\tthis.cacheConfig = undefined;\n\t\t}\n\t}\n\n\t/** @internal */\n\tprotected async queryWithCache(\n\t\tqueryString: string,\n\t\tparams: any[],\n\t\tquery: () => Promise,\n\t): Promise {\n\t\tif (this.cache === undefined || is(this.cache, NoopCache) || this.queryMetadata === undefined) {\n\t\t\ttry {\n\t\t\t\treturn await query();\n\t\t\t} catch (e) {\n\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t}\n\t\t}\n\n\t\t// don't do any mutations, if globally is false\n\t\tif (this.cacheConfig && !this.cacheConfig.enable) {\n\t\t\ttry {\n\t\t\t\treturn await query();\n\t\t\t} catch (e) {\n\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t}\n\t\t}\n\n\t\t// For mutate queries, we should query the database, wait for a response, and then perform invalidation\n\t\tif (\n\t\t\t(\n\t\t\t\tthis.queryMetadata.type === 'insert' || this.queryMetadata.type === 'update'\n\t\t\t\t|| this.queryMetadata.type === 'delete'\n\t\t\t) && this.queryMetadata.tables.length > 0\n\t\t) {\n\t\t\ttry {\n\t\t\t\tconst [res] = await Promise.all([\n\t\t\t\t\tquery(),\n\t\t\t\t\tthis.cache.onMutate({ tables: this.queryMetadata.tables }),\n\t\t\t\t]);\n\t\t\t\treturn res;\n\t\t\t} catch (e) {\n\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t}\n\t\t}\n\n\t\t// don't do any reads if globally disabled\n\t\tif (!this.cacheConfig) {\n\t\t\ttry {\n\t\t\t\treturn await query();\n\t\t\t} catch (e) {\n\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t}\n\t\t}\n\n\t\tif (this.queryMetadata.type === 'select') {\n\t\t\tconst fromCache = await this.cache.get(\n\t\t\t\tthis.cacheConfig.tag ?? await hashQuery(queryString, params),\n\t\t\t\tthis.queryMetadata.tables,\n\t\t\t\tthis.cacheConfig.tag !== undefined,\n\t\t\t\tthis.cacheConfig.autoInvalidate,\n\t\t\t);\n\t\t\tif (fromCache === undefined) {\n\t\t\t\tlet result;\n\t\t\t\ttry {\n\t\t\t\t\tresult = await query();\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t\t}\n\n\t\t\t\t// put actual key\n\t\t\t\tawait this.cache.put(\n\t\t\t\t\tthis.cacheConfig.tag ?? await hashQuery(queryString, params),\n\t\t\t\t\tresult,\n\t\t\t\t\t// make sure we send tables that were used in a query only if user wants to invalidate it on each write\n\t\t\t\t\tthis.cacheConfig.autoInvalidate ? this.queryMetadata.tables : [],\n\t\t\t\t\tthis.cacheConfig.tag !== undefined,\n\t\t\t\t\tthis.cacheConfig.config,\n\t\t\t\t);\n\t\t\t\t// put flag if we should invalidate or not\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\treturn fromCache as unknown as T;\n\t\t}\n\t\ttry {\n\t\t\treturn await query();\n\t\t} catch (e) {\n\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t}\n\t}\n\n\tgetQuery(): Query {\n\t\treturn this.query;\n\t}\n\n\tabstract run(placeholderValues?: Record): Result;\n\n\tmapRunResult(result: unknown, _isFromBatch?: boolean): unknown {\n\t\treturn result;\n\t}\n\n\tabstract all(placeholderValues?: Record): Result;\n\n\tmapAllResult(_result: unknown, _isFromBatch?: boolean): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n\n\tabstract get(placeholderValues?: Record): Result;\n\n\tmapGetResult(_result: unknown, _isFromBatch?: boolean): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n\n\tabstract values(placeholderValues?: Record): Result;\n\n\texecute(placeholderValues?: Record): ExecuteResult {\n\t\tif (this.mode === 'async') {\n\t\t\treturn this[this.executeMethod](placeholderValues) as ExecuteResult;\n\t\t}\n\t\treturn new ExecuteResultSync(() => this[this.executeMethod](placeholderValues));\n\t}\n\n\tmapResult(response: unknown, isFromBatch?: boolean) {\n\t\tswitch (this.executeMethod) {\n\t\t\tcase 'run': {\n\t\t\t\treturn this.mapRunResult(response, isFromBatch);\n\t\t\t}\n\t\t\tcase 'all': {\n\t\t\t\treturn this.mapAllResult(response, isFromBatch);\n\t\t\t}\n\t\t\tcase 'get': {\n\t\t\t\treturn this.mapGetResult(response, isFromBatch);\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @internal */\n\tabstract isResponseInArrayMode(): boolean;\n}\n\nexport interface SQLiteTransactionConfig {\n\tbehavior?: 'deferred' | 'immediate' | 'exclusive';\n}\n\nexport type SQLiteExecuteMethod = 'run' | 'all' | 'get';\n\nexport abstract class SQLiteSession<\n\tTResultKind extends 'sync' | 'async',\n\tTRunResult,\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteSession';\n\n\tconstructor(\n\t\t/** @internal */\n\t\treadonly dialect: { sync: SQLiteSyncDialect; async: SQLiteAsyncDialect }[TResultKind],\n\t) {}\n\n\tabstract prepareQuery(\n\t\tquery: Query,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t\tisResponseInArrayMode: boolean,\n\t\tcustomResultMapper?: (rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => unknown,\n\t\tqueryMetadata?: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t},\n\t\tcacheConfig?: WithCacheConfig,\n\t): SQLitePreparedQuery;\n\n\tprepareOneTimeQuery(\n\t\tquery: Query,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t\tisResponseInArrayMode: boolean,\n\t\tcustomResultMapper?: (rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => unknown,\n\t\tqueryMetadata?: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t},\n\t\tcacheConfig?: WithCacheConfig,\n\t): SQLitePreparedQuery {\n\t\treturn this.prepareQuery(\n\t\t\tquery,\n\t\t\tfields,\n\t\t\texecuteMethod,\n\t\t\tisResponseInArrayMode,\n\t\t\tcustomResultMapper,\n\t\t\tqueryMetadata,\n\t\t\tcacheConfig,\n\t\t);\n\t}\n\n\tabstract transaction(\n\t\ttransaction: (tx: SQLiteTransaction) => Result,\n\t\tconfig?: SQLiteTransactionConfig,\n\t): Result;\n\n\trun(query: SQL): Result {\n\t\tconst staticQuery = this.dialect.sqlToQuery(query);\n\t\ttry {\n\t\t\treturn this.prepareOneTimeQuery(staticQuery, undefined, 'run', false).run() as Result;\n\t\t} catch (err) {\n\t\t\tthrow new DrizzleError({ cause: err, message: `Failed to run the query '${staticQuery.sql}'` });\n\t\t}\n\t}\n\n\t/** @internal */\n\textractRawRunValueFromBatchResult(result: unknown) {\n\t\treturn result;\n\t}\n\n\tall(query: SQL): Result {\n\t\treturn this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), undefined, 'run', false).all() as Result<\n\t\t\tTResultKind,\n\t\t\tT[]\n\t\t>;\n\t}\n\n\t/** @internal */\n\textractRawAllValueFromBatchResult(_result: unknown): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n\n\tget(query: SQL): Result {\n\t\treturn this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), undefined, 'run', false).get() as Result<\n\t\t\tTResultKind,\n\t\t\tT\n\t\t>;\n\t}\n\n\t/** @internal */\n\textractRawGetValueFromBatchResult(_result: unknown): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n\n\tvalues(\n\t\tquery: SQL,\n\t): Result {\n\t\treturn this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), undefined, 'run', false).values() as Result<\n\t\t\tTResultKind,\n\t\t\tT[]\n\t\t>;\n\t}\n\n\tasync count(sql: SQL) {\n\t\tconst result = await this.values(sql) as [[number]];\n\n\t\treturn result[0][0];\n\t}\n\n\t/** @internal */\n\textractRawValuesValueFromBatchResult(_result: unknown): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n}\n\nexport type Result = { sync: TResult; async: Promise }[TKind];\n\nexport type DBResult = { sync: TResult; async: SQLiteRaw }[TKind];\n\nexport abstract class SQLiteTransaction<\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n> extends BaseSQLiteDatabase {\n\tstatic override readonly [entityKind]: string = 'SQLiteTransaction';\n\n\tconstructor(\n\t\tresultType: TResultType,\n\t\tdialect: { sync: SQLiteSyncDialect; async: SQLiteAsyncDialect }[TResultType],\n\t\tsession: SQLiteSession,\n\t\tprotected schema: {\n\t\t\tfullSchema: Record;\n\t\t\tschema: TSchema;\n\t\t\ttableNamesMap: Record;\n\t\t} | undefined,\n\t\tprotected readonly nestedIndex = 0,\n\t) {\n\t\tsuper(resultType, dialect, session, schema);\n\t}\n\n\trollback(): never {\n\t\tthrow new TransactionRollbackError();\n\t}\n}\n", "//# sourceMappingURL=subquery.js.map", "import type { BuildColumns } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type { AddAliasToSelection } from '~/query-builders/select.types.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { ColumnsSelection, SQL } from '~/sql/sql.ts';\nimport { getTableColumns } from '~/utils.ts';\nimport type { SQLiteColumn, SQLiteColumnBuilderBase } from './columns/common.ts';\nimport { QueryBuilder } from './query-builders/query-builder.ts';\nimport { sqliteTable } from './table.ts';\nimport { SQLiteViewBase } from './view-base.ts';\n\nexport interface ViewBuilderConfig {\n\talgorithm?: 'undefined' | 'merge' | 'temptable';\n\tdefiner?: string;\n\tsqlSecurity?: 'definer' | 'invoker';\n\twithCheckOption?: 'cascaded' | 'local';\n}\n\nexport class ViewBuilderCore<\n\tTConfig extends { name: string; columns?: unknown },\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteViewBuilderCore';\n\n\tdeclare readonly _: {\n\t\treadonly name: TConfig['name'];\n\t\treadonly columns: TConfig['columns'];\n\t};\n\n\tconstructor(\n\t\tprotected name: TConfig['name'],\n\t) {}\n\n\tprotected config: ViewBuilderConfig = {};\n}\n\nexport class ViewBuilder extends ViewBuilderCore<{ name: TName }> {\n\tstatic override readonly [entityKind]: string = 'SQLiteViewBuilder';\n\n\tas(\n\t\tqb: TypedQueryBuilder | ((qb: QueryBuilder) => TypedQueryBuilder),\n\t): SQLiteViewWithSelection> {\n\t\tif (typeof qb === 'function') {\n\t\t\tqb = qb(new QueryBuilder());\n\t\t}\n\t\tconst selectionProxy = new SelectionProxyHandler({\n\t\t\talias: this.name,\n\t\t\tsqlBehavior: 'error',\n\t\t\tsqlAliasedBehavior: 'alias',\n\t\t\treplaceOriginalName: true,\n\t\t});\n\t\t// const aliasedSelectedFields = new Proxy(qb.getSelectedFields(), selectionProxy);\n\t\tconst aliasedSelectedFields = qb.getSelectedFields();\n\t\treturn new Proxy(\n\t\t\tnew SQLiteView({\n\t\t\t\t// sqliteConfig: this.config,\n\t\t\t\tconfig: {\n\t\t\t\t\tname: this.name,\n\t\t\t\t\tschema: undefined,\n\t\t\t\t\tselectedFields: aliasedSelectedFields,\n\t\t\t\t\tquery: qb.getSQL().inlineParams(),\n\t\t\t\t},\n\t\t\t}),\n\t\t\tselectionProxy as any,\n\t\t) as SQLiteViewWithSelection>;\n\t}\n}\n\nexport class ManualViewBuilder<\n\tTName extends string = string,\n\tTColumns extends Record = Record,\n> extends ViewBuilderCore<\n\t{ name: TName; columns: TColumns }\n> {\n\tstatic override readonly [entityKind]: string = 'SQLiteManualViewBuilder';\n\n\tprivate columns: Record;\n\n\tconstructor(\n\t\tname: TName,\n\t\tcolumns: TColumns,\n\t) {\n\t\tsuper(name);\n\t\tthis.columns = getTableColumns(sqliteTable(name, columns)) as BuildColumns;\n\t}\n\n\texisting(): SQLiteViewWithSelection> {\n\t\treturn new Proxy(\n\t\t\tnew SQLiteView({\n\t\t\t\tconfig: {\n\t\t\t\t\tname: this.name,\n\t\t\t\t\tschema: undefined,\n\t\t\t\t\tselectedFields: this.columns,\n\t\t\t\t\tquery: undefined,\n\t\t\t\t},\n\t\t\t}),\n\t\t\tnew SelectionProxyHandler({\n\t\t\t\talias: this.name,\n\t\t\t\tsqlBehavior: 'error',\n\t\t\t\tsqlAliasedBehavior: 'alias',\n\t\t\t\treplaceOriginalName: true,\n\t\t\t}),\n\t\t) as SQLiteViewWithSelection>;\n\t}\n\n\tas(query: SQL): SQLiteViewWithSelection> {\n\t\treturn new Proxy(\n\t\t\tnew SQLiteView({\n\t\t\t\tconfig: {\n\t\t\t\t\tname: this.name,\n\t\t\t\t\tschema: undefined,\n\t\t\t\t\tselectedFields: this.columns,\n\t\t\t\t\tquery: query.inlineParams(),\n\t\t\t\t},\n\t\t\t}),\n\t\t\tnew SelectionProxyHandler({\n\t\t\t\talias: this.name,\n\t\t\t\tsqlBehavior: 'error',\n\t\t\t\tsqlAliasedBehavior: 'alias',\n\t\t\t\treplaceOriginalName: true,\n\t\t\t}),\n\t\t) as SQLiteViewWithSelection>;\n\t}\n}\n\nexport class SQLiteView<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n\tTSelection extends ColumnsSelection = ColumnsSelection,\n> extends SQLiteViewBase {\n\tstatic override readonly [entityKind]: string = 'SQLiteView';\n\n\tconstructor({ config }: {\n\t\tconfig: {\n\t\t\tname: TName;\n\t\t\tschema: string | undefined;\n\t\t\tselectedFields: ColumnsSelection;\n\t\t\tquery: SQL | undefined;\n\t\t};\n\t}) {\n\t\tsuper(config);\n\t}\n}\n\nexport type SQLiteViewWithSelection<\n\tTName extends string,\n\tTExisting extends boolean,\n\tTSelection extends ColumnsSelection,\n> = SQLiteView & TSelection;\n\nexport function sqliteView(name: TName): ViewBuilder;\nexport function sqliteView>(\n\tname: TName,\n\tcolumns: TColumns,\n): ManualViewBuilder;\nexport function sqliteView(\n\tname: string,\n\tselection?: Record,\n): ViewBuilder | ManualViewBuilder {\n\tif (selection) {\n\t\treturn new ManualViewBuilder(name, selection);\n\t}\n\treturn new ViewBuilder(name);\n}\n\nexport const view = sqliteView;\n", "export * from './alias.ts';\nexport * from './checks.ts';\nexport * from './columns/index.ts';\nexport * from './db.ts';\nexport * from './dialect.ts';\nexport * from './foreign-keys.ts';\nexport * from './indexes.ts';\nexport * from './primary-keys.ts';\nexport * from './query-builders/index.ts';\nexport * from './session.ts';\nexport * from './subquery.ts';\nexport * from './table.ts';\nexport * from './unique-constraint.ts';\nexport * from './utils.ts';\nexport * from './view.ts';\n", "/// \n\nimport type { BatchItem } from '~/batch.ts';\nimport { type Cache, NoopCache } from '~/cache/core/index.ts';\nimport type { WithCacheConfig } from '~/cache/core/types.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { Logger } from '~/logger.ts';\nimport { NoopLogger } from '~/logger.ts';\nimport type { RelationalSchemaConfig, TablesRelationalConfig } from '~/relations.ts';\nimport type { PreparedQuery } from '~/session.ts';\nimport { fillPlaceholders, type Query, sql } from '~/sql/sql.ts';\nimport type { SQLiteAsyncDialect } from '~/sqlite-core/dialect.ts';\nimport { SQLiteTransaction } from '~/sqlite-core/index.ts';\nimport type { SelectedFieldsOrdered } from '~/sqlite-core/query-builders/select.types.ts';\nimport type {\n\tPreparedQueryConfig as PreparedQueryConfigBase,\n\tSQLiteExecuteMethod,\n\tSQLiteTransactionConfig,\n} from '~/sqlite-core/session.ts';\nimport { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/session.ts';\nimport { mapResultRow } from '~/utils.ts';\n\nexport interface SQLiteD1SessionOptions {\n\tlogger?: Logger;\n\tcache?: Cache;\n}\n\ntype PreparedQueryConfig = Omit;\n\nexport class SQLiteD1Session<\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n> extends SQLiteSession<'async', D1Result, TFullSchema, TSchema> {\n\tstatic override readonly [entityKind]: string = 'SQLiteD1Session';\n\n\tprivate logger: Logger;\n\tprivate cache: Cache;\n\n\tconstructor(\n\t\tprivate client: D1Database,\n\t\tdialect: SQLiteAsyncDialect,\n\t\tprivate schema: RelationalSchemaConfig | undefined,\n\t\tprivate options: SQLiteD1SessionOptions = {},\n\t) {\n\t\tsuper(dialect);\n\t\tthis.logger = options.logger ?? new NoopLogger();\n\t\tthis.cache = options.cache ?? new NoopCache();\n\t}\n\n\tprepareQuery(\n\t\tquery: Query,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t\tisResponseInArrayMode: boolean,\n\t\tcustomResultMapper?: (rows: unknown[][]) => unknown,\n\t\tqueryMetadata?: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t},\n\t\tcacheConfig?: WithCacheConfig,\n\t): D1PreparedQuery {\n\t\tconst stmt = this.client.prepare(query.sql);\n\t\treturn new D1PreparedQuery(\n\t\t\tstmt,\n\t\t\tquery,\n\t\t\tthis.logger,\n\t\t\tthis.cache,\n\t\t\tqueryMetadata,\n\t\t\tcacheConfig,\n\t\t\tfields,\n\t\t\texecuteMethod,\n\t\t\tisResponseInArrayMode,\n\t\t\tcustomResultMapper,\n\t\t);\n\t}\n\n\tasync batch[] | readonly BatchItem<'sqlite'>[]>(queries: T) {\n\t\tconst preparedQueries: PreparedQuery[] = [];\n\t\tconst builtQueries: D1PreparedStatement[] = [];\n\n\t\tfor (const query of queries) {\n\t\t\tconst preparedQuery = query._prepare();\n\t\t\tconst builtQuery = preparedQuery.getQuery();\n\t\t\tpreparedQueries.push(preparedQuery);\n\t\t\tif (builtQuery.params.length > 0) {\n\t\t\t\tbuiltQueries.push((preparedQuery as D1PreparedQuery).stmt.bind(...builtQuery.params));\n\t\t\t} else {\n\t\t\t\tconst builtQuery = preparedQuery.getQuery();\n\t\t\t\tbuiltQueries.push(\n\t\t\t\t\tthis.client.prepare(builtQuery.sql).bind(...builtQuery.params),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst batchResults = await this.client.batch(builtQueries);\n\t\treturn batchResults.map((result, i) => preparedQueries[i]!.mapResult(result, true));\n\t}\n\n\toverride extractRawAllValueFromBatchResult(result: unknown): unknown {\n\t\treturn (result as D1Result).results;\n\t}\n\n\toverride extractRawGetValueFromBatchResult(result: unknown): unknown {\n\t\treturn (result as D1Result).results[0];\n\t}\n\n\toverride extractRawValuesValueFromBatchResult(result: unknown): unknown {\n\t\treturn d1ToRawMapping((result as D1Result).results);\n\t}\n\n\toverride async transaction(\n\t\ttransaction: (tx: D1Transaction) => T | Promise,\n\t\tconfig?: SQLiteTransactionConfig,\n\t): Promise {\n\t\tconst tx = new D1Transaction('async', this.dialect, this, this.schema);\n\t\tawait this.run(sql.raw(`begin${config?.behavior ? ' ' + config.behavior : ''}`));\n\t\ttry {\n\t\t\tconst result = await transaction(tx);\n\t\t\tawait this.run(sql`commit`);\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tawait this.run(sql`rollback`);\n\t\t\tthrow err;\n\t\t}\n\t}\n}\n\nexport class D1Transaction<\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n> extends SQLiteTransaction<'async', D1Result, TFullSchema, TSchema> {\n\tstatic override readonly [entityKind]: string = 'D1Transaction';\n\n\toverride async transaction(transaction: (tx: D1Transaction) => Promise): Promise {\n\t\tconst savepointName = `sp${this.nestedIndex}`;\n\t\tconst tx = new D1Transaction('async', this.dialect, this.session, this.schema, this.nestedIndex + 1);\n\t\tawait this.session.run(sql.raw(`savepoint ${savepointName}`));\n\t\ttry {\n\t\t\tconst result = await transaction(tx);\n\t\t\tawait this.session.run(sql.raw(`release savepoint ${savepointName}`));\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tawait this.session.run(sql.raw(`rollback to savepoint ${savepointName}`));\n\t\t\tthrow err;\n\t\t}\n\t}\n}\n\n/**\n * This function was taken from the D1 implementation: https://github.com/cloudflare/workerd/blob/4aae9f4c7ae30a59a88ca868c4aff88bda85c956/src/cloudflare/internal/d1-api.ts#L287\n * It may cause issues with duplicated column names in join queries, which should be fixed on the D1 side.\n * @param results\n * @returns\n */\nfunction d1ToRawMapping(results: any) {\n\tconst rows: unknown[][] = [];\n\tfor (const row of results) {\n\t\tconst entry = Object.keys(row).map((k) => row[k]);\n\t\trows.push(entry);\n\t}\n\treturn rows;\n}\n\nexport class D1PreparedQuery extends SQLitePreparedQuery<\n\t{ type: 'async'; run: D1Response; all: T['all']; get: T['get']; values: T['values']; execute: T['execute'] }\n> {\n\tstatic override readonly [entityKind]: string = 'D1PreparedQuery';\n\n\t/** @internal */\n\tcustomResultMapper?: (rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => unknown;\n\n\t/** @internal */\n\tfields?: SelectedFieldsOrdered;\n\n\t/** @internal */\n\tstmt: D1PreparedStatement;\n\n\tconstructor(\n\t\tstmt: D1PreparedStatement,\n\t\tquery: Query,\n\t\tprivate logger: Logger,\n\t\tcache: Cache,\n\t\tqueryMetadata: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t} | undefined,\n\t\tcacheConfig: WithCacheConfig | undefined,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t\tprivate _isResponseInArrayMode: boolean,\n\t\tcustomResultMapper?: (rows: unknown[][]) => unknown,\n\t) {\n\t\tsuper('async', executeMethod, query, cache, queryMetadata, cacheConfig);\n\t\tthis.customResultMapper = customResultMapper;\n\t\tthis.fields = fields;\n\t\tthis.stmt = stmt;\n\t}\n\n\tasync run(placeholderValues?: Record): Promise {\n\t\tconst params = fillPlaceholders(this.query.params, placeholderValues ?? {});\n\t\tthis.logger.logQuery(this.query.sql, params);\n\t\treturn await this.queryWithCache(this.query.sql, params, async () => {\n\t\t\treturn this.stmt.bind(...params).run();\n\t\t});\n\t}\n\n\tasync all(placeholderValues?: Record): Promise {\n\t\tconst { fields, query, logger, stmt, customResultMapper } = this;\n\t\tif (!fields && !customResultMapper) {\n\t\t\tconst params = fillPlaceholders(query.params, placeholderValues ?? {});\n\t\t\tlogger.logQuery(query.sql, params);\n\t\t\treturn await this.queryWithCache(query.sql, params, async () => {\n\t\t\t\treturn stmt.bind(...params).all().then(({ results }) => this.mapAllResult(results!));\n\t\t\t});\n\t\t}\n\n\t\tconst rows = await this.values(placeholderValues);\n\n\t\treturn this.mapAllResult(rows);\n\t}\n\n\toverride mapAllResult(rows: unknown, isFromBatch?: boolean): unknown {\n\t\tif (isFromBatch) {\n\t\t\trows = d1ToRawMapping((rows as D1Result).results);\n\t\t}\n\n\t\tif (!this.fields && !this.customResultMapper) {\n\t\t\treturn rows;\n\t\t}\n\n\t\tif (this.customResultMapper) {\n\t\t\treturn this.customResultMapper(rows as unknown[][]);\n\t\t}\n\n\t\treturn (rows as unknown[][]).map((row) => mapResultRow(this.fields!, row, this.joinsNotNullableMap));\n\t}\n\n\tasync get(placeholderValues?: Record): Promise {\n\t\tconst { fields, joinsNotNullableMap, query, logger, stmt, customResultMapper } = this;\n\t\tif (!fields && !customResultMapper) {\n\t\t\tconst params = fillPlaceholders(query.params, placeholderValues ?? {});\n\t\t\tlogger.logQuery(query.sql, params);\n\t\t\treturn await this.queryWithCache(query.sql, params, async () => {\n\t\t\t\treturn stmt.bind(...params).all().then(({ results }) => results![0]);\n\t\t\t});\n\t\t}\n\n\t\tconst rows = await this.values(placeholderValues);\n\n\t\tif (!rows[0]) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (customResultMapper) {\n\t\t\treturn customResultMapper(rows) as T['all'];\n\t\t}\n\n\t\treturn mapResultRow(fields!, rows[0], joinsNotNullableMap);\n\t}\n\n\toverride mapGetResult(result: unknown, isFromBatch?: boolean): unknown {\n\t\tif (isFromBatch) {\n\t\t\tresult = d1ToRawMapping((result as D1Result).results)[0];\n\t\t}\n\n\t\tif (!this.fields && !this.customResultMapper) {\n\t\t\treturn result;\n\t\t}\n\n\t\tif (this.customResultMapper) {\n\t\t\treturn this.customResultMapper([result as unknown[]]) as T['all'];\n\t\t}\n\n\t\treturn mapResultRow(this.fields!, result as unknown[], this.joinsNotNullableMap);\n\t}\n\n\tasync values(placeholderValues?: Record): Promise {\n\t\tconst params = fillPlaceholders(this.query.params, placeholderValues ?? {});\n\t\tthis.logger.logQuery(this.query.sql, params);\n\t\treturn await this.queryWithCache(this.query.sql, params, async () => {\n\t\t\treturn this.stmt.bind(...params).raw();\n\t\t});\n\t}\n\n\t/** @internal */\n\tisResponseInArrayMode(): boolean {\n\t\treturn this._isResponseInArrayMode;\n\t}\n}\n", "/// \nimport type { D1Database as MiniflareD1Database } from '@miniflare/d1';\nimport type { BatchItem, BatchResponse } from '~/batch.ts';\nimport { entityKind } from '~/entity.ts';\nimport { DefaultLogger } from '~/logger.ts';\nimport {\n\tcreateTableRelationsHelpers,\n\textractTablesRelationalConfig,\n\ttype ExtractTablesWithRelations,\n\ttype RelationalSchemaConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport { BaseSQLiteDatabase } from '~/sqlite-core/db.ts';\nimport { SQLiteAsyncDialect } from '~/sqlite-core/dialect.ts';\nimport type { DrizzleConfig, IfNotImported } from '~/utils.ts';\nimport { SQLiteD1Session } from './session.ts';\n\nexport type AnyD1Database = IfNotImported<\n\tD1Database,\n\tMiniflareD1Database,\n\tD1Database | IfNotImported\n>;\n\nexport class DrizzleD1Database<\n\tTSchema extends Record = Record,\n> extends BaseSQLiteDatabase<'async', D1Result, TSchema> {\n\tstatic override readonly [entityKind]: string = 'D1Database';\n\n\t/** @internal */\n\tdeclare readonly session: SQLiteD1Session>;\n\n\tasync batch, T extends Readonly<[U, ...U[]]>>(\n\t\tbatch: T,\n\t): Promise> {\n\t\treturn this.session.batch(batch) as Promise>;\n\t}\n}\n\nexport function drizzle<\n\tTSchema extends Record = Record,\n\tTClient extends AnyD1Database = AnyD1Database,\n>(\n\tclient: TClient,\n\tconfig: DrizzleConfig = {},\n): DrizzleD1Database & {\n\t$client: TClient;\n} {\n\tconst dialect = new SQLiteAsyncDialect({ casing: config.casing });\n\tlet logger;\n\tif (config.logger === true) {\n\t\tlogger = new DefaultLogger();\n\t} else if (config.logger !== false) {\n\t\tlogger = config.logger;\n\t}\n\n\tlet schema: RelationalSchemaConfig | undefined;\n\tif (config.schema) {\n\t\tconst tablesConfig = extractTablesRelationalConfig(\n\t\t\tconfig.schema,\n\t\t\tcreateTableRelationsHelpers,\n\t\t);\n\t\tschema = {\n\t\t\tfullSchema: config.schema,\n\t\t\tschema: tablesConfig.tables,\n\t\t\ttableNamesMap: tablesConfig.tableNamesMap,\n\t\t};\n\t}\n\n\tconst session = new SQLiteD1Session(client as D1Database, dialect, schema, { logger, cache: config.cache });\n\tconst db = new DrizzleD1Database('async', dialect, session, schema) as DrizzleD1Database;\n\t( db).$client = client;\n\t( db).$cache = config.cache;\n\tif (( db).$cache) {\n\t\t( db).$cache['invalidate'] = config.cache?.onMutate;\n\t}\n\n\treturn db as any;\n}\n", "export * from './driver.ts';\nexport * from './session.ts';\n", "//# sourceMappingURL=operations.js.map", "export * from './alias.ts';\nexport * from './column-builder.ts';\nexport * from './column.ts';\nexport * from './entity.ts';\nexport * from './errors.ts';\nexport * from './logger.ts';\nexport * from './operations.ts';\nexport * from './query-promise.ts';\nexport * from './relations.ts';\nexport * from './sql/index.ts';\nexport * from './subquery.ts';\nexport * from './table.ts';\nexport * from './utils.ts';\nexport * from './view-common.ts';\n", "import {\n sqliteTable,\n integer,\n text,\n real,\n uniqueIndex,\n primaryKey,\n check,\n customType,\n} from 'drizzle-orm/sqlite-core'\nimport { relations, sql } from 'drizzle-orm'\n\nconst jsonText = (name: string) =>\n customType<{ data: T | null; driverData: string | null }>({\n dataType() {\n return 'text'\n },\n toDriver(value) {\n if (value === undefined || value === null) return null\n return JSON.stringify(value)\n },\n fromDriver(value) {\n if (value === null || value === undefined) return null\n try {\n return JSON.parse(String(value)) as T\n } catch {\n return null\n }\n },\n })(name)\n\nconst numericText = (name: string) =>\n customType<{ data: string | null; driverData: string | null }>({\n dataType() {\n return 'text'\n },\n toDriver(value) {\n if (value === undefined || value === null) return null\n return String(value)\n },\n fromDriver(value) {\n if (value === null || value === undefined) return null\n return String(value)\n },\n })(name)\n\nconst staffRoleValues = ['super_admin', 'admin', 'marketer', 'delivery_staff'] as const\nconst staffPermissionValues = ['crud_product', 'make_coupon', 'crud_staff_users'] as const\nconst uploadStatusValues = ['pending', 'claimed'] as const\nconst paymentStatusValues = ['pending', 'success', 'cod', 'failed'] as const\n\nexport const staffRoleEnum = (name: string) => text(name, { enum: staffRoleValues })\nexport const staffPermissionEnum = (name: string) => text(name, { enum: staffPermissionValues })\nexport const uploadStatusEnum = (name: string) => text(name, { enum: uploadStatusValues })\nexport const paymentStatusEnum = (name: string) => text(name, { enum: paymentStatusValues })\n\nexport const users = sqliteTable('users', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text(),\n email: text(),\n mobile: text(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_email: uniqueIndex('unique_email').on(t.email),\n}))\n\nexport const userDetails = sqliteTable('user_details', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id).unique(),\n bio: text('bio'),\n dateOfBirth: integer('date_of_birth', { mode: 'timestamp' }),\n gender: text('gender'),\n occupation: text('occupation'),\n profileImage: text('profile_image'),\n isSuspended: integer('is_suspended', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const userCreds = sqliteTable('user_creds', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n userPassword: text('user_password').notNull(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const addressZones = sqliteTable('address_zones', {\n id: integer().primaryKey({ autoIncrement: true }),\n zoneName: text('zone_name').notNull(),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const addressAreas = sqliteTable('address_areas', {\n id: integer().primaryKey({ autoIncrement: true }),\n placeName: text('place_name').notNull(),\n zoneId: integer('zone_id').references(() => addressZones.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const addresses = sqliteTable('addresses', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n name: text('name').notNull(),\n phone: text('phone').notNull(),\n addressLine1: text('address_line1').notNull(),\n addressLine2: text('address_line2'),\n city: text('city').notNull(),\n state: text('state').notNull(),\n pincode: text('pincode').notNull(),\n isDefault: integer('is_default', { mode: 'boolean' }).notNull().default(false),\n latitude: real('latitude'),\n longitude: real('longitude'),\n googleMapsUrl: text('google_maps_url'),\n adminLatitude: real('admin_latitude'),\n adminLongitude: real('admin_longitude'),\n zoneId: integer('zone_id').references(() => addressZones.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const staffRoles = sqliteTable('staff_roles', {\n id: integer().primaryKey({ autoIncrement: true }),\n roleName: staffRoleEnum('role_name').notNull(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_role_name: uniqueIndex('unique_role_name').on(t.roleName),\n}))\n\nexport const staffPermissions = sqliteTable('staff_permissions', {\n id: integer().primaryKey({ autoIncrement: true }),\n permissionName: staffPermissionEnum('permission_name').notNull(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_permission_name: uniqueIndex('unique_permission_name').on(t.permissionName),\n}))\n\nexport const staffRolePermissions = sqliteTable('staff_role_permissions', {\n id: integer().primaryKey({ autoIncrement: true }),\n staffRoleId: integer('staff_role_id').notNull().references(() => staffRoles.id),\n staffPermissionId: integer('staff_permission_id').notNull().references(() => staffPermissions.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_role_permission: uniqueIndex('unique_role_permission').on(t.staffRoleId, t.staffPermissionId),\n}))\n\nexport const staffUsers = sqliteTable('staff_users', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text().notNull(),\n password: text().notNull(),\n staffRoleId: integer('staff_role_id').references(() => staffRoles.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const storeInfo = sqliteTable('store_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text().notNull(),\n description: text(),\n imageUrl: text('image_url'),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n owner: integer('owner').notNull().references(() => staffUsers.id),\n})\n\nexport const units = sqliteTable('units', {\n id: integer().primaryKey({ autoIncrement: true }),\n shortNotation: text('short_notation').notNull(),\n fullName: text('full_name').notNull(),\n}, (t) => ({\n unq_short_notation: uniqueIndex('unique_short_notation').on(t.shortNotation),\n}))\n\nexport const productInfo = sqliteTable('product_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text().notNull(),\n shortDescription: text('short_description'),\n longDescription: text('long_description'),\n unitId: integer('unit_id').notNull().references(() => units.id),\n price: numericText('price').notNull(),\n marketPrice: numericText('market_price'),\n images: jsonText('images'),\n isOutOfStock: integer('is_out_of_stock', { mode: 'boolean' }).notNull().default(false),\n isSuspended: integer('is_suspended', { mode: 'boolean' }).notNull().default(false),\n isFlashAvailable: integer('is_flash_available', { mode: 'boolean' }).notNull().default(false),\n flashPrice: numericText('flash_price'),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n incrementStep: real('increment_step').notNull().default(1),\n productQuantity: real('product_quantity').notNull().default(1),\n storeId: integer('store_id').references(() => storeInfo.id),\n})\n\nexport const productGroupInfo = sqliteTable('product_group_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n groupName: text('group_name').notNull(),\n description: text(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productGroupMembership = sqliteTable('product_group_membership', {\n productId: integer('product_id').notNull().references(() => productInfo.id),\n groupId: integer('group_id').notNull().references(() => productGroupInfo.id),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n pk: primaryKey({ columns: [t.productId, t.groupId], name: 'product_group_membership_pk' }),\n}))\n\nexport const homeBanners = sqliteTable('home_banners', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text('name').notNull(),\n imageUrl: text('image_url').notNull(),\n description: text('description'),\n productIds: jsonText('product_ids'),\n redirectUrl: text('redirect_url'),\n serialNum: integer('serial_num'),\n isActive: integer('is_active', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n lastUpdated: integer('last_updated', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productReviews = sqliteTable('product_reviews', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n reviewBody: text('review_body').notNull(),\n imageUrls: jsonText('image_urls').$defaultFn(() => []),\n reviewTime: integer('review_time', { mode: 'timestamp' }).notNull().defaultNow(),\n ratings: real('ratings').notNull(),\n adminResponse: text('admin_response'),\n adminResponseImages: jsonText('admin_response_images').$defaultFn(() => []),\n}, (t) => ({\n ratingCheck: check('rating_check', sql`${t.ratings} >= 1 AND ${t.ratings} <= 5`),\n}))\n\nexport const uploadUrlStatus = sqliteTable('upload_url_status', {\n id: integer().primaryKey({ autoIncrement: true }),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n key: text('key').notNull(),\n status: uploadStatusEnum('status').notNull().default('pending'),\n})\n\nexport const productTagInfo = sqliteTable('product_tag_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n tagName: text('tag_name').notNull().unique(),\n tagDescription: text('tag_description'),\n imageUrl: text('image_url'),\n isDashboardTag: integer('is_dashboard_tag', { mode: 'boolean' }).notNull().default(false),\n relatedStores: jsonText('related_stores').$defaultFn(() => []),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productTags = sqliteTable('product_tags', {\n id: integer().primaryKey({ autoIncrement: true }),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n tagId: integer('tag_id').notNull().references(() => productTagInfo.id),\n assignedAt: integer('assigned_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_product_tag: uniqueIndex('unique_product_tag').on(t.productId, t.tagId),\n}))\n\nexport const deliverySlotInfo = sqliteTable('delivery_slot_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n deliveryTime: integer('delivery_time', { mode: 'timestamp' }).notNull(),\n freezeTime: integer('freeze_time', { mode: 'timestamp' }).notNull(),\n isActive: integer('is_active', { mode: 'boolean' }).notNull().default(true),\n isFlash: integer('is_flash', { mode: 'boolean' }).notNull().default(false),\n isCapacityFull: integer('is_capacity_full', { mode: 'boolean' }).notNull().default(false),\n deliverySequence: jsonText>('delivery_sequence').$defaultFn(() => ({})),\n groupIds: jsonText('group_ids').$defaultFn(() => []),\n})\n\nexport const vendorSnippets = sqliteTable('vendor_snippets', {\n id: integer().primaryKey({ autoIncrement: true }),\n snippetCode: text('snippet_code').notNull().unique(),\n slotId: integer('slot_id').references(() => deliverySlotInfo.id),\n isPermanent: integer('is_permanent', { mode: 'boolean' }).notNull().default(false),\n productIds: jsonText('product_ids').notNull(),\n validTill: integer('valid_till', { mode: 'timestamp' }),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productSlots = sqliteTable('product_slots', {\n productId: integer('product_id').notNull().references(() => productInfo.id),\n slotId: integer('slot_id').notNull().references(() => deliverySlotInfo.id),\n}, (t) => ({\n pk: primaryKey({ columns: [t.productId, t.slotId], name: 'product_slot_pk' }),\n}))\n\nexport const specialDeals = sqliteTable('special_deals', {\n id: integer().primaryKey({ autoIncrement: true }),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n quantity: numericText('quantity').notNull(),\n price: numericText('price').notNull(),\n validTill: integer('valid_till', { mode: 'timestamp' }).notNull(),\n})\n\nexport const paymentInfoTable = sqliteTable('payment_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n status: text().notNull(),\n gateway: text().notNull(),\n orderId: text('order_id'),\n token: text('token'),\n merchantOrderId: text('merchant_order_id').notNull().unique(),\n payload: jsonText('payload'),\n})\n\nexport const orders = sqliteTable('orders', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n addressId: integer('address_id').notNull().references(() => addresses.id),\n slotId: integer('slot_id').references(() => deliverySlotInfo.id),\n isCod: integer('is_cod', { mode: 'boolean' }).notNull().default(false),\n isOnlinePayment: integer('is_online_payment', { mode: 'boolean' }).notNull().default(false),\n paymentInfoId: integer('payment_info_id').references(() => paymentInfoTable.id),\n totalAmount: numericText('total_amount').notNull(),\n deliveryCharge: numericText('delivery_charge').notNull().default('0'),\n readableId: integer('readable_id').notNull(),\n adminNotes: text('admin_notes'),\n userNotes: text('user_notes'),\n orderGroupId: text('order_group_id'),\n orderGroupProportion: numericText('order_group_proportion'),\n isFlashDelivery: integer('is_flash_delivery', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const orderItems = sqliteTable('order_items', {\n id: integer().primaryKey({ autoIncrement: true }),\n orderId: integer('order_id').notNull().references(() => orders.id),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n quantity: text('quantity').notNull(),\n price: numericText('price').notNull(),\n discountedPrice: numericText('discounted_price'),\n is_packaged: integer('is_packaged', { mode: 'boolean' }).notNull().default(false),\n is_package_verified: integer('is_package_verified', { mode: 'boolean' }).notNull().default(false),\n})\n\nexport const orderStatus = sqliteTable('order_status', {\n id: integer().primaryKey({ autoIncrement: true }),\n orderTime: integer('order_time', { mode: 'timestamp' }).notNull().defaultNow(),\n userId: integer('user_id').notNull().references(() => users.id),\n orderId: integer('order_id').notNull().references(() => orders.id),\n isPackaged: integer('is_packaged', { mode: 'boolean' }).notNull().default(false),\n isDelivered: integer('is_delivered', { mode: 'boolean' }).notNull().default(false),\n isCancelled: integer('is_cancelled', { mode: 'boolean' }).notNull().default(false),\n cancelReason: text('cancel_reason'),\n isCancelledByAdmin: integer('is_cancelled_by_admin', { mode: 'boolean' }),\n paymentStatus: paymentStatusEnum('payment_state').notNull().default('pending'),\n cancellationUserNotes: text('cancellation_user_notes'),\n cancellationAdminNotes: text('cancellation_admin_notes'),\n cancellationReviewed: integer('cancellation_reviewed', { mode: 'boolean' }).notNull().default(false),\n cancellationReviewedAt: integer('cancellation_reviewed_at', { mode: 'timestamp' }),\n refundCouponId: integer('refund_coupon_id').references(() => coupons.id),\n})\n\nexport const payments = sqliteTable('payments', {\n id: integer().primaryKey({ autoIncrement: true }),\n status: text().notNull(),\n gateway: text().notNull(),\n orderId: integer('order_id').notNull().references(() => orders.id),\n token: text('token'),\n merchantOrderId: text('merchant_order_id').notNull().unique(),\n payload: jsonText('payload'),\n})\n\nexport const refunds = sqliteTable('refunds', {\n id: integer().primaryKey({ autoIncrement: true }),\n orderId: integer('order_id').notNull().references(() => orders.id),\n refundAmount: numericText('refund_amount'),\n refundStatus: text('refund_status').default('none'),\n merchantRefundId: text('merchant_refund_id'),\n refundProcessedAt: integer('refund_processed_at', { mode: 'timestamp' }),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const keyValStore = sqliteTable('key_val_store', {\n key: text('key').primaryKey(),\n value: jsonText('value'),\n})\n\nexport const notifications = sqliteTable('notifications', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n title: text().notNull(),\n body: text().notNull(),\n type: text(),\n isRead: integer('is_read', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productCategories = sqliteTable('product_categories', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text().notNull(),\n description: text(),\n})\n\nexport const cartItems = sqliteTable('cart_items', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n quantity: numericText('quantity').notNull(),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_user_product: uniqueIndex('unique_user_product').on(t.userId, t.productId),\n}))\n\nexport const complaints = sqliteTable('complaints', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n orderId: integer('order_id').references(() => orders.id),\n complaintBody: text('complaint_body').notNull(),\n images: jsonText('images'),\n response: text('response'),\n isResolved: integer('is_resolved', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const coupons = sqliteTable('coupons', {\n id: integer().primaryKey({ autoIncrement: true }),\n couponCode: text('coupon_code').notNull().unique(),\n isUserBased: integer('is_user_based', { mode: 'boolean' }).notNull().default(false),\n discountPercent: numericText('discount_percent'),\n flatDiscount: numericText('flat_discount'),\n minOrder: numericText('min_order'),\n productIds: jsonText('product_ids'),\n createdBy: integer('created_by').notNull().references(() => staffUsers.id),\n maxValue: numericText('max_value'),\n isApplyForAll: integer('is_apply_for_all', { mode: 'boolean' }).notNull().default(false),\n validTill: integer('valid_till', { mode: 'timestamp' }),\n maxLimitForUser: integer('max_limit_for_user'),\n isInvalidated: integer('is_invalidated', { mode: 'boolean' }).notNull().default(false),\n exclusiveApply: integer('exclusive_apply', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const couponUsage = sqliteTable('coupon_usage', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n couponId: integer('coupon_id').notNull().references(() => coupons.id),\n orderId: integer('order_id').references(() => orders.id),\n orderItemId: integer('order_item_id').references(() => orderItems.id),\n usedAt: integer('used_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const couponApplicableUsers = sqliteTable('coupon_applicable_users', {\n id: integer().primaryKey({ autoIncrement: true }),\n couponId: integer('coupon_id').notNull().references(() => coupons.id),\n userId: integer('user_id').notNull().references(() => users.id),\n}, (t) => ({\n unq_coupon_user: uniqueIndex('unique_coupon_user').on(t.couponId, t.userId),\n}))\n\nexport const couponApplicableProducts = sqliteTable('coupon_applicable_products', {\n id: integer().primaryKey({ autoIncrement: true }),\n couponId: integer('coupon_id').notNull().references(() => coupons.id),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n}, (t) => ({\n unq_coupon_product: uniqueIndex('unique_coupon_product').on(t.couponId, t.productId),\n}))\n\nexport const userIncidents = sqliteTable('user_incidents', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n orderId: integer('order_id').references(() => orders.id),\n dateAdded: integer('date_added', { mode: 'timestamp' }).notNull().defaultNow(),\n adminComment: text('admin_comment'),\n addedBy: integer('added_by').references(() => staffUsers.id),\n negativityScore: integer('negativity_score'),\n})\n\nexport const reservedCoupons = sqliteTable('reserved_coupons', {\n id: integer().primaryKey({ autoIncrement: true }),\n secretCode: text('secret_code').notNull().unique(),\n couponCode: text('coupon_code').notNull(),\n discountPercent: numericText('discount_percent'),\n flatDiscount: numericText('flat_discount'),\n minOrder: numericText('min_order'),\n productIds: jsonText('product_ids'),\n maxValue: numericText('max_value'),\n validTill: integer('valid_till', { mode: 'timestamp' }),\n maxLimitForUser: integer('max_limit_for_user'),\n exclusiveApply: integer('exclusive_apply', { mode: 'boolean' }).notNull().default(false),\n isRedeemed: integer('is_redeemed', { mode: 'boolean' }).notNull().default(false),\n redeemedBy: integer('redeemed_by').references(() => users.id),\n redeemedAt: integer('redeemed_at', { mode: 'timestamp' }),\n createdBy: integer('created_by').notNull().references(() => staffUsers.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const notifCreds = sqliteTable('notif_creds', {\n id: integer().primaryKey({ autoIncrement: true }),\n token: text().notNull().unique(),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n userId: integer('user_id').notNull().references(() => users.id),\n lastVerified: integer('last_verified', { mode: 'timestamp' }),\n})\n\nexport const unloggedUserTokens = sqliteTable('unlogged_user_tokens', {\n id: integer().primaryKey({ autoIncrement: true }),\n token: text().notNull().unique(),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n lastVerified: integer('last_verified', { mode: 'timestamp' }),\n})\n\nexport const userNotifications = sqliteTable('user_notifications', {\n id: integer().primaryKey({ autoIncrement: true }),\n title: text('title').notNull(),\n imageUrl: text('image_url'),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n body: text('body').notNull(),\n applicableUsers: jsonText('applicable_users'),\n})\n\n// Relations\nexport const usersRelations = relations(users, ({ many, one }) => ({\n addresses: many(addresses),\n orders: many(orders),\n notifications: many(notifications),\n cartItems: many(cartItems),\n userCreds: one(userCreds),\n coupons: many(coupons),\n couponUsages: many(couponUsage),\n applicableCoupons: many(couponApplicableUsers),\n userDetails: one(userDetails),\n notifCreds: many(notifCreds),\n userIncidents: many(userIncidents),\n}))\n\nexport const userCredsRelations = relations(userCreds, ({ one }) => ({\n user: one(users, { fields: [userCreds.userId], references: [users.id] }),\n}))\n\nexport const staffUsersRelations = relations(staffUsers, ({ one, many }) => ({\n role: one(staffRoles, { fields: [staffUsers.staffRoleId], references: [staffRoles.id] }),\n coupons: many(coupons),\n stores: many(storeInfo),\n}))\n\nexport const addressesRelations = relations(addresses, ({ one, many }) => ({\n user: one(users, { fields: [addresses.userId], references: [users.id] }),\n orders: many(orders),\n zone: one(addressZones, { fields: [addresses.zoneId], references: [addressZones.id] }),\n}))\n\nexport const unitsRelations = relations(units, ({ many }) => ({\n products: many(productInfo),\n}))\n\nexport const productInfoRelations = relations(productInfo, ({ one, many }) => ({\n unit: one(units, { fields: [productInfo.unitId], references: [units.id] }),\n store: one(storeInfo, { fields: [productInfo.storeId], references: [storeInfo.id] }),\n productSlots: many(productSlots),\n specialDeals: many(specialDeals),\n orderItems: many(orderItems),\n cartItems: many(cartItems),\n tags: many(productTags),\n applicableCoupons: many(couponApplicableProducts),\n reviews: many(productReviews),\n groups: many(productGroupMembership),\n}))\n\nexport const productTagInfoRelations = relations(productTagInfo, ({ many }) => ({\n products: many(productTags),\n}))\n\nexport const productTagsRelations = relations(productTags, ({ one }) => ({\n product: one(productInfo, { fields: [productTags.productId], references: [productInfo.id] }),\n tag: one(productTagInfo, { fields: [productTags.tagId], references: [productTagInfo.id] }),\n}))\n\nexport const deliverySlotInfoRelations = relations(deliverySlotInfo, ({ many }) => ({\n productSlots: many(productSlots),\n orders: many(orders),\n vendorSnippets: many(vendorSnippets),\n}))\n\nexport const productSlotsRelations = relations(productSlots, ({ one }) => ({\n product: one(productInfo, { fields: [productSlots.productId], references: [productInfo.id] }),\n slot: one(deliverySlotInfo, { fields: [productSlots.slotId], references: [deliverySlotInfo.id] }),\n}))\n\nexport const specialDealsRelations = relations(specialDeals, ({ one }) => ({\n product: one(productInfo, { fields: [specialDeals.productId], references: [productInfo.id] }),\n}))\n\nexport const ordersRelations = relations(orders, ({ one, many }) => ({\n user: one(users, { fields: [orders.userId], references: [users.id] }),\n address: one(addresses, { fields: [orders.addressId], references: [addresses.id] }),\n slot: one(deliverySlotInfo, { fields: [orders.slotId], references: [deliverySlotInfo.id] }),\n orderItems: many(orderItems),\n payment: one(payments),\n paymentInfo: one(paymentInfoTable, { fields: [orders.paymentInfoId], references: [paymentInfoTable.id] }),\n orderStatus: many(orderStatus),\n refunds: many(refunds),\n couponUsages: many(couponUsage),\n userIncidents: many(userIncidents),\n}))\n\nexport const orderItemsRelations = relations(orderItems, ({ one }) => ({\n order: one(orders, { fields: [orderItems.orderId], references: [orders.id] }),\n product: one(productInfo, { fields: [orderItems.productId], references: [productInfo.id] }),\n}))\n\nexport const orderStatusRelations = relations(orderStatus, ({ one }) => ({\n order: one(orders, { fields: [orderStatus.orderId], references: [orders.id] }),\n user: one(users, { fields: [orderStatus.userId], references: [users.id] }),\n refundCoupon: one(coupons, { fields: [orderStatus.refundCouponId], references: [coupons.id] }),\n}))\n\nexport const paymentInfoRelations = relations(paymentInfoTable, ({ one }) => ({\n order: one(orders, { fields: [paymentInfoTable.id], references: [orders.paymentInfoId] }),\n}))\n\nexport const paymentsRelations = relations(payments, ({ one }) => ({\n order: one(orders, { fields: [payments.orderId], references: [orders.id] }),\n}))\n\nexport const refundsRelations = relations(refunds, ({ one }) => ({\n order: one(orders, { fields: [refunds.orderId], references: [orders.id] }),\n}))\n\nexport const notificationsRelations = relations(notifications, ({ one }) => ({\n user: one(users, { fields: [notifications.userId], references: [users.id] }),\n}))\n\nexport const productCategoriesRelations = relations(productCategories, ({}) => ({}))\n\nexport const cartItemsRelations = relations(cartItems, ({ one }) => ({\n user: one(users, { fields: [cartItems.userId], references: [users.id] }),\n product: one(productInfo, { fields: [cartItems.productId], references: [productInfo.id] }),\n}))\n\nexport const complaintsRelations = relations(complaints, ({ one }) => ({\n user: one(users, { fields: [complaints.userId], references: [users.id] }),\n order: one(orders, { fields: [complaints.orderId], references: [orders.id] }),\n}))\n\nexport const couponsRelations = relations(coupons, ({ one, many }) => ({\n creator: one(staffUsers, { fields: [coupons.createdBy], references: [staffUsers.id] }),\n usages: many(couponUsage),\n applicableUsers: many(couponApplicableUsers),\n applicableProducts: many(couponApplicableProducts),\n}))\n\nexport const couponUsageRelations = relations(couponUsage, ({ one }) => ({\n user: one(users, { fields: [couponUsage.userId], references: [users.id] }),\n coupon: one(coupons, { fields: [couponUsage.couponId], references: [coupons.id] }),\n order: one(orders, { fields: [couponUsage.orderId], references: [orders.id] }),\n orderItem: one(orderItems, { fields: [couponUsage.orderItemId], references: [orderItems.id] }),\n}))\n\nexport const userDetailsRelations = relations(userDetails, ({ one }) => ({\n user: one(users, { fields: [userDetails.userId], references: [users.id] }),\n}))\n\nexport const notifCredsRelations = relations(notifCreds, ({ one }) => ({\n user: one(users, { fields: [notifCreds.userId], references: [users.id] }),\n}))\n\nexport const userNotificationsRelations = relations(userNotifications, ({}) => ({\n // No relations needed for now\n}))\n\nexport const storeInfoRelations = relations(storeInfo, ({ one, many }) => ({\n owner: one(staffUsers, { fields: [storeInfo.owner], references: [staffUsers.id] }),\n products: many(productInfo),\n}))\n\nexport const couponApplicableUsersRelations = relations(couponApplicableUsers, ({ one }) => ({\n coupon: one(coupons, { fields: [couponApplicableUsers.couponId], references: [coupons.id] }),\n user: one(users, { fields: [couponApplicableUsers.userId], references: [users.id] }),\n}))\n\nexport const couponApplicableProductsRelations = relations(couponApplicableProducts, ({ one }) => ({\n coupon: one(coupons, { fields: [couponApplicableProducts.couponId], references: [coupons.id] }),\n product: one(productInfo, { fields: [couponApplicableProducts.productId], references: [productInfo.id] }),\n}))\n\nexport const reservedCouponsRelations = relations(reservedCoupons, ({ one }) => ({\n redeemedUser: one(users, { fields: [reservedCoupons.redeemedBy], references: [users.id] }),\n creator: one(staffUsers, { fields: [reservedCoupons.createdBy], references: [staffUsers.id] }),\n}))\n\nexport const productReviewsRelations = relations(productReviews, ({ one }) => ({\n user: one(users, { fields: [productReviews.userId], references: [users.id] }),\n product: one(productInfo, { fields: [productReviews.productId], references: [productInfo.id] }),\n}))\n\nexport const addressZonesRelations = relations(addressZones, ({ many }) => ({\n addresses: many(addresses),\n areas: many(addressAreas),\n}))\n\nexport const addressAreasRelations = relations(addressAreas, ({ one }) => ({\n zone: one(addressZones, { fields: [addressAreas.zoneId], references: [addressZones.id] }),\n}))\n\nexport const productGroupInfoRelations = relations(productGroupInfo, ({ many }) => ({\n memberships: many(productGroupMembership),\n}))\n\nexport const productGroupMembershipRelations = relations(productGroupMembership, ({ one }) => ({\n product: one(productInfo, { fields: [productGroupMembership.productId], references: [productInfo.id] }),\n group: one(productGroupInfo, { fields: [productGroupMembership.groupId], references: [productGroupInfo.id] }),\n}))\n\nexport const homeBannersRelations = relations(homeBanners, ({}) => ({\n // Relations for productIds array would be more complex, skipping for now\n}))\n\nexport const staffRolesRelations = relations(staffRoles, ({ many }) => ({\n staffUsers: many(staffUsers),\n rolePermissions: many(staffRolePermissions),\n}))\n\nexport const staffPermissionsRelations = relations(staffPermissions, ({ many }) => ({\n rolePermissions: many(staffRolePermissions),\n}))\n\nexport const staffRolePermissionsRelations = relations(staffRolePermissions, ({ one }) => ({\n role: one(staffRoles, { fields: [staffRolePermissions.staffRoleId], references: [staffRoles.id] }),\n permission: one(staffPermissions, { fields: [staffRolePermissions.staffPermissionId], references: [staffPermissions.id] }),\n}))\n\nexport const userIncidentsRelations = relations(userIncidents, ({ one }) => ({\n user: one(users, { fields: [userIncidents.userId], references: [users.id] }),\n order: one(orders, { fields: [userIncidents.orderId], references: [orders.id] }),\n addedBy: one(staffUsers, { fields: [userIncidents.addedBy], references: [staffUsers.id] }),\n}))\n\nexport const vendorSnippetsRelations = relations(vendorSnippets, ({ one }) => ({\n slot: one(deliverySlotInfo, { fields: [vendorSnippets.slotId], references: [deliverySlotInfo.id] }),\n}))\n", "import type { D1Database } from '@cloudflare/workers-types'\nimport { drizzle, type DrizzleD1Database } from 'drizzle-orm/d1'\nimport * as schema from './schema'\n\ntype DbClient = DrizzleD1Database\n\nlet dbInstance: DbClient | null = null\n\nexport function initDb(database: D1Database): void {\n const base = drizzle(database, { schema }) as DbClient\n dbInstance = Object.assign(base, {\n transaction: async (handler: (tx: DbClient) => Promise): Promise => {\n return handler(base)\n },\n })\n}\n\nexport const db = new Proxy({} as DbClient, {\n get(_target, prop: keyof DbClient) {\n if (!dbInstance) {\n throw new Error('D1 database not initialized. Call initDb(env.DB) before using db helpers.')\n }\n\n return dbInstance[prop]\n },\n})\n", "import { db } from '../db/db_index'\nimport { homeBanners, staffUsers } from '../db/schema'\nimport { eq, desc } from 'drizzle-orm'\n\n\nexport interface Banner {\n id: number\n name: string\n imageUrl: string\n description: string | null\n productIds: number[] | null\n redirectUrl: string | null\n serialNum: number | null\n isActive: boolean\n createdAt: Date\n lastUpdated: Date\n}\n\ntype BannerRow = typeof homeBanners.$inferSelect\n\nexport async function getBanners(): Promise {\n const banners = await db.query.homeBanners.findMany({\n orderBy: desc(homeBanners.createdAt),\n }) as BannerRow[]\n\n return banners.map((banner) => ({\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description,\n productIds: banner.productIds || [],\n redirectUrl: banner.redirectUrl,\n serialNum: banner.serialNum,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n }))\n}\n\nexport async function getBannerById(id: number): Promise {\n const banner = await db.query.homeBanners.findFirst({\n where: eq(homeBanners.id, id),\n })\n\n if (!banner) return null\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description,\n productIds: banner.productIds || [],\n redirectUrl: banner.redirectUrl,\n serialNum: banner.serialNum,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n }\n}\n\nexport type CreateBannerInput = Omit\n\nexport async function createBanner(input: CreateBannerInput): Promise {\n const [banner] = await db.insert(homeBanners).values({\n name: input.name,\n imageUrl: input.imageUrl,\n description: input.description,\n productIds: input.productIds || [],\n redirectUrl: input.redirectUrl,\n serialNum: input.serialNum,\n isActive: input.isActive,\n }).returning()\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description,\n productIds: banner.productIds || [],\n redirectUrl: banner.redirectUrl,\n serialNum: banner.serialNum,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n }\n}\n\nexport type UpdateBannerInput = Partial>\n\nexport async function updateBanner(id: number, input: UpdateBannerInput): Promise {\n const [banner] = await db.update(homeBanners)\n .set({\n ...input,\n lastUpdated: new Date(),\n })\n .where(eq(homeBanners.id, id))\n .returning()\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description,\n productIds: banner.productIds || [],\n redirectUrl: banner.redirectUrl,\n serialNum: banner.serialNum,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n }\n}\n\nexport async function deleteBanner(id: number): Promise {\n await db.delete(homeBanners).where(eq(homeBanners.id, id))\n}\n", "import { db } from '../db/db_index'\nimport { complaints, users } from '../db/schema'\nimport { eq, desc, lt } from 'drizzle-orm'\n\nexport interface Complaint {\n id: number\n complaintBody: string\n userId: number\n orderId: number | null\n isResolved: boolean\n response: string | null\n createdAt: Date\n images: string[] | null\n}\n\nexport interface ComplaintWithUser extends Complaint {\n userName: string | null\n userMobile: string | null\n}\n\nexport async function getComplaints(\n cursor?: number,\n limit: number = 20\n): Promise<{ complaints: ComplaintWithUser[]; hasMore: boolean }> {\n const whereCondition = cursor ? lt(complaints.id, cursor) : undefined\n\n const complaintsData = await db\n .select({\n id: complaints.id,\n complaintBody: complaints.complaintBody,\n userId: complaints.userId,\n orderId: complaints.orderId,\n isResolved: complaints.isResolved,\n response: complaints.response,\n createdAt: complaints.createdAt,\n images: complaints.images,\n userName: users.name,\n userMobile: users.mobile,\n })\n .from(complaints)\n .leftJoin(users, eq(complaints.userId, users.id))\n .where(whereCondition)\n .orderBy(desc(complaints.id))\n .limit(limit + 1)\n\n const hasMore = complaintsData.length > limit\n const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData\n\n return {\n complaints: complaintsToReturn.map((c) => ({\n id: c.id,\n complaintBody: c.complaintBody,\n userId: c.userId,\n orderId: c.orderId,\n isResolved: c.isResolved,\n response: c.response,\n createdAt: c.createdAt,\n images: c.images as string[],\n userName: c.userName,\n userMobile: c.userMobile,\n })),\n hasMore,\n }\n}\n\nexport async function resolveComplaint(\n id: number,\n response?: string\n): Promise {\n await db\n .update(complaints)\n .set({ isResolved: true, response })\n .where(eq(complaints.id, id))\n}\n", "import { db } from '../db/db_index'\nimport { keyValStore } from '../db/schema'\n\nexport interface Constant {\n key: string\n value: any\n}\n\nexport async function getAllConstants(): Promise {\n const constants = await db.select().from(keyValStore)\n\n return constants.map(c => ({\n key: c.key,\n value: c.value,\n }))\n}\n\nexport async function upsertConstants(constants: Constant[]): Promise {\n await db.transaction(async (tx) => {\n for (const { key, value } of constants) {\n await tx.insert(keyValStore)\n .values({ key, value })\n .onConflictDoUpdate({\n target: keyValStore.key,\n set: { value },\n })\n }\n })\n}\n", "import { db } from '../db/db_index'\nimport { coupons, reservedCoupons, users, orders, orderStatus, couponApplicableUsers, couponApplicableProducts } from '../db/schema'\nimport { eq, and, like, or, inArray, lt, desc, asc } from 'drizzle-orm'\n\nexport interface Coupon {\n id: number\n couponCode: string\n isUserBased: boolean\n discountPercent: string | null\n flatDiscount: string | null\n minOrder: string | null\n productIds: number[] | null\n maxValue: string | null\n isApplyForAll: boolean\n validTill: Date | null\n maxLimitForUser: number | null\n exclusiveApply: boolean\n isInvalidated: boolean\n createdAt: Date\n createdBy: number\n}\n\nexport async function getAllCoupons(\n cursor?: number,\n limit: number = 50,\n search?: string\n): Promise<{ coupons: any[]; hasMore: boolean }> {\n let whereCondition = undefined\n const conditions = []\n \n if (cursor) {\n conditions.push(lt(coupons.id, cursor))\n }\n \n if (search && search.trim()) {\n conditions.push(like(coupons.couponCode, `%${search}%`))\n }\n \n if (conditions.length > 0) {\n whereCondition = and(...conditions)\n }\n \n const result = await db.query.coupons.findMany({\n where: whereCondition,\n with: {\n creator: true,\n applicableUsers: {\n with: {\n user: true,\n },\n },\n applicableProducts: {\n with: {\n product: true,\n },\n },\n },\n orderBy: desc(coupons.createdAt),\n limit: limit + 1,\n })\n \n const hasMore = result.length > limit\n const couponsList = hasMore ? result.slice(0, limit) : result\n \n return { coupons: couponsList, hasMore }\n}\n\nexport async function getCouponById(id: number): Promise {\n return await db.query.coupons.findFirst({\n where: eq(coupons.id, id),\n with: {\n creator: true,\n applicableUsers: {\n with: {\n user: true,\n },\n },\n applicableProducts: {\n with: {\n product: true,\n },\n },\n },\n })\n}\n\nexport interface CreateCouponInput {\n couponCode: string\n isUserBased: boolean\n discountPercent?: string\n flatDiscount?: string\n minOrder?: string\n productIds?: number[] | null\n maxValue?: string\n isApplyForAll: boolean\n validTill?: Date\n maxLimitForUser?: number\n exclusiveApply: boolean\n createdBy: number\n}\n\nexport async function createCouponWithRelations(\n input: CreateCouponInput,\n applicableUsers?: number[],\n applicableProducts?: number[]\n): Promise {\n return await db.transaction(async (tx) => {\n const [coupon] = await tx.insert(coupons).values({\n couponCode: input.couponCode,\n isUserBased: input.isUserBased,\n discountPercent: input.discountPercent,\n flatDiscount: input.flatDiscount,\n minOrder: input.minOrder,\n productIds: input.productIds,\n createdBy: input.createdBy,\n maxValue: input.maxValue,\n isApplyForAll: input.isApplyForAll,\n validTill: input.validTill,\n maxLimitForUser: input.maxLimitForUser,\n exclusiveApply: input.exclusiveApply,\n }).returning()\n\n if (applicableUsers && applicableUsers.length > 0) {\n await tx.insert(couponApplicableUsers).values(\n applicableUsers.map(userId => ({\n couponId: coupon.id,\n userId,\n }))\n )\n }\n\n if (applicableProducts && applicableProducts.length > 0) {\n await tx.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: coupon.id,\n productId,\n }))\n )\n }\n\n return coupon as Coupon\n })\n}\n\nexport interface UpdateCouponInput {\n couponCode?: string\n isUserBased?: boolean\n discountPercent?: string\n flatDiscount?: string\n minOrder?: string\n productIds?: number[] | null\n maxValue?: string\n isApplyForAll?: boolean\n validTill?: Date | null\n maxLimitForUser?: number\n exclusiveApply?: boolean\n isInvalidated?: boolean\n}\n\nexport async function updateCouponWithRelations(\n id: number,\n input: UpdateCouponInput,\n applicableUsers?: number[],\n applicableProducts?: number[]\n): Promise {\n return await db.transaction(async (tx) => {\n const [coupon] = await tx.update(coupons)\n .set({\n ...input,\n })\n .where(eq(coupons.id, id))\n .returning()\n\n if (applicableUsers !== undefined) {\n await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.couponId, id))\n if (applicableUsers.length > 0) {\n await tx.insert(couponApplicableUsers).values(\n applicableUsers.map(userId => ({\n couponId: id,\n userId,\n }))\n )\n }\n }\n\n if (applicableProducts !== undefined) {\n await tx.delete(couponApplicableProducts).where(eq(couponApplicableProducts.couponId, id))\n if (applicableProducts.length > 0) {\n await tx.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: id,\n productId,\n }))\n )\n }\n }\n\n return coupon as Coupon\n })\n}\n\nexport async function invalidateCoupon(id: number): Promise {\n const result = await db.update(coupons)\n .set({ isInvalidated: true })\n .where(eq(coupons.id, id))\n .returning()\n\n return result[0] as Coupon\n}\n\nexport interface CouponValidationResult {\n valid: boolean\n message?: string\n discountAmount?: number\n coupon?: Partial\n}\n\nexport async function validateCoupon(\n code: string,\n userId: number,\n orderAmount: number\n): Promise {\n const coupon = await db.query.coupons.findFirst({\n where: and(\n eq(coupons.couponCode, code.toUpperCase()),\n eq(coupons.isInvalidated, false)\n ),\n })\n\n if (!coupon) {\n return { valid: false, message: 'Coupon not found or invalidated' }\n }\n\n if (coupon.validTill && new Date(coupon.validTill) < new Date()) {\n return { valid: false, message: 'Coupon has expired' }\n }\n\n if (!coupon.isApplyForAll && !coupon.isUserBased) {\n return { valid: false, message: 'Coupon is not available for use' }\n }\n\n const minOrderValue = coupon.minOrder ? parseFloat(coupon.minOrder) : 0\n if (minOrderValue > 0 && orderAmount < minOrderValue) {\n return { valid: false, message: `Minimum order amount is ${minOrderValue}` }\n }\n\n let discountAmount = 0\n if (coupon.discountPercent) {\n const percent = parseFloat(coupon.discountPercent)\n discountAmount = (orderAmount * percent) / 100\n } else if (coupon.flatDiscount) {\n discountAmount = parseFloat(coupon.flatDiscount)\n }\n\n const maxValueLimit = coupon.maxValue ? parseFloat(coupon.maxValue) : 0\n if (maxValueLimit > 0 && discountAmount > maxValueLimit) {\n discountAmount = maxValueLimit\n }\n\n return {\n valid: true,\n discountAmount,\n coupon: {\n id: coupon.id,\n discountPercent: coupon.discountPercent,\n flatDiscount: coupon.flatDiscount,\n maxValue: coupon.maxValue,\n }\n }\n}\n\nexport async function getReservedCoupons(\n cursor?: number,\n limit: number = 50,\n search?: string\n): Promise<{ coupons: any[]; hasMore: boolean }> {\n let whereCondition = undefined\n const conditions = []\n \n if (cursor) {\n conditions.push(lt(reservedCoupons.id, cursor))\n }\n \n if (search && search.trim()) {\n conditions.push(or(\n like(reservedCoupons.secretCode, `%${search}%`),\n like(reservedCoupons.couponCode, `%${search}%`)\n ))\n }\n \n if (conditions.length > 0) {\n whereCondition = and(...conditions)\n }\n\n const result = await db.query.reservedCoupons.findMany({\n where: whereCondition,\n with: {\n redeemedUser: true,\n creator: true,\n },\n orderBy: desc(reservedCoupons.createdAt),\n limit: limit + 1,\n })\n\n const hasMore = result.length > limit\n const couponsList = hasMore ? result.slice(0, limit) : result\n\n return { coupons: couponsList, hasMore }\n}\n\nexport async function createReservedCouponWithProducts(\n input: any,\n applicableProducts?: number[]\n): Promise {\n return await db.transaction(async (tx) => {\n const [coupon] = await tx.insert(reservedCoupons).values({\n secretCode: input.secretCode,\n couponCode: input.couponCode,\n discountPercent: input.discountPercent,\n flatDiscount: input.flatDiscount,\n minOrder: input.minOrder,\n productIds: input.productIds,\n maxValue: input.maxValue,\n validTill: input.validTill,\n maxLimitForUser: input.maxLimitForUser,\n exclusiveApply: input.exclusiveApply,\n createdBy: input.createdBy,\n }).returning()\n\n if (applicableProducts && applicableProducts.length > 0) {\n await tx.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: coupon.id,\n productId,\n }))\n )\n }\n\n return coupon\n })\n}\n\nexport async function checkUsersExist(userIds: number[]): Promise {\n const existingUsers = await db.query.users.findMany({\n where: inArray(users.id, userIds),\n columns: { id: true },\n })\n return existingUsers.length === userIds.length\n}\n\nexport async function checkCouponExists(couponCode: string): Promise {\n const existing = await db.query.coupons.findFirst({\n where: eq(coupons.couponCode, couponCode),\n })\n return !!existing\n}\n\nexport async function checkReservedCouponExists(secretCode: string): Promise {\n const existing = await db.query.reservedCoupons.findFirst({\n where: eq(reservedCoupons.secretCode, secretCode),\n })\n return !!existing\n}\n\nexport async function generateCancellationCoupon(\n orderId: number,\n staffUserId: number,\n userId: number,\n orderAmount: number,\n couponCode: string\n): Promise {\n return await db.transaction(async (tx) => {\n const expiryDate = new Date()\n expiryDate.setDate(expiryDate.getDate() + 30)\n\n const [coupon] = await tx.insert(coupons).values({\n couponCode,\n isUserBased: true,\n flatDiscount: orderAmount.toString(),\n minOrder: orderAmount.toString(),\n maxValue: orderAmount.toString(),\n validTill: expiryDate,\n maxLimitForUser: 1,\n createdBy: staffUserId,\n isApplyForAll: false,\n }).returning()\n\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId,\n })\n\n await tx.update(orderStatus)\n .set({ refundCouponId: coupon.id })\n .where(eq(orderStatus.orderId, orderId))\n\n return coupon as Coupon\n })\n}\n\nexport async function getOrderWithUser(orderId: number): Promise {\n return await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n user: true,\n },\n })\n}\n\nexport async function createCouponForUser(\n mobile: string,\n couponCode: string,\n staffUserId: number\n): Promise<{ coupon: Coupon; user: { id: number; mobile: string; name: string | null } }> {\n return await db.transaction(async (tx) => {\n let user = await tx.query.users.findFirst({\n where: eq(users.mobile, mobile),\n })\n\n if (!user) {\n const [newUser] = await tx.insert(users).values({\n name: null,\n email: null,\n mobile,\n }).returning()\n user = newUser\n }\n\n const [coupon] = await tx.insert(coupons).values({\n couponCode,\n isUserBased: true,\n discountPercent: '20',\n minOrder: '1000',\n maxValue: '500',\n maxLimitForUser: 1,\n isApplyForAll: false,\n exclusiveApply: false,\n createdBy: staffUserId,\n validTill: new Date(Date.now() + 90 * 24 * 60 * 60 * 1000),\n }).returning()\n\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId: user.id,\n })\n\n return {\n coupon: coupon as Coupon,\n user: {\n id: user.id,\n mobile: user.mobile as string,\n name: user.name,\n },\n }\n })\n}\n\nexport interface UserMiniInfo {\n id: number\n name: string\n mobile: string | null\n}\n\nexport async function getUsersForCoupon(\n search?: string,\n limit: number = 20,\n offset: number = 0\n): Promise<{ users: UserMiniInfo[] }> {\n let whereCondition = undefined\n if (search && search.trim()) {\n whereCondition = or(\n like(users.name, `%${search}%`),\n like(users.mobile, `%${search}%`)\n )\n }\n\n const userList = await db.query.users.findMany({\n where: whereCondition,\n columns: {\n id: true,\n name: true,\n mobile: true,\n },\n limit: limit,\n offset: offset,\n orderBy: asc(users.name),\n })\n\n return {\n users: userList.map((user) => ({\n id: user.id,\n name: user.name || 'Unknown',\n mobile: user.mobile,\n }))\n }\n}\n", "import { db } from '../db/db_index'\nimport {\n addresses,\n complaints,\n couponUsage,\n orderItems,\n orders,\n orderStatus,\n payments,\n refunds,\n} from '../db/schema'\nimport { and, desc, eq, inArray, lt, SQL } from 'drizzle-orm'\nimport type {\n AdminOrderDetails,\n AdminOrderRow,\n AdminOrderStatusRecord,\n AdminOrderUpdateResult,\n AdminOrderItemPackagingResult,\n AdminOrderMessageResult,\n AdminOrderBasicResult,\n AdminGetSlotOrdersResult,\n AdminGetAllOrdersResultWithUserId,\n AdminRebalanceSlotsResult,\n AdminCancelOrderResult,\n AdminRefundRecord,\n RefundStatus,\n PaymentStatus,\n} from '@packages/shared'\nimport type { InferSelectModel } from 'drizzle-orm'\n\nconst isPaymentStatus = (value: string): value is PaymentStatus =>\n value === 'pending' || value === 'success' || value === 'cod' || value === 'failed'\n\nconst isRefundStatus = (value: string): value is RefundStatus =>\n value === 'success' || value === 'pending' || value === 'failed' || value === 'none' || value === 'na' || value === 'processed'\n\ntype OrderStatusRow = InferSelectModel\n\nconst mapOrderStatusRecord = (record: OrderStatusRow): AdminOrderStatusRecord => ({\n id: record.id,\n orderTime: record.orderTime,\n userId: record.userId,\n orderId: record.orderId,\n isPackaged: record.isPackaged,\n isDelivered: record.isDelivered,\n isCancelled: record.isCancelled,\n cancelReason: record.cancelReason ?? null,\n isCancelledByAdmin: record.isCancelledByAdmin ?? null,\n paymentStatus: isPaymentStatus(record.paymentStatus) ? record.paymentStatus : 'pending',\n cancellationUserNotes: record.cancellationUserNotes ?? null,\n cancellationAdminNotes: record.cancellationAdminNotes ?? null,\n cancellationReviewed: record.cancellationReviewed,\n cancellationReviewedAt: record.cancellationReviewedAt ?? null,\n refundCouponId: record.refundCouponId ?? null,\n})\n\nexport async function updateOrderNotes(orderId: number, adminNotes: string | null): Promise {\n const [result] = await db\n .update(orders)\n .set({ adminNotes })\n .where(eq(orders.id, orderId))\n .returning()\n return (result || null) as AdminOrderRow | null\n}\n\nexport async function updateOrderPackaged(orderId: string, isPackaged: boolean): Promise {\n const orderIdNumber = parseInt(orderId)\n\n await db\n .update(orderItems)\n .set({ is_packaged: isPackaged })\n .where(eq(orderItems.orderId, orderIdNumber))\n\n if (!isPackaged) {\n await db\n .update(orderStatus)\n .set({ isPackaged, isDelivered: false })\n .where(eq(orderStatus.orderId, orderIdNumber))\n } else {\n await db\n .update(orderStatus)\n .set({ isPackaged })\n .where(eq(orderStatus.orderId, orderIdNumber))\n }\n\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderIdNumber),\n })\n\n return { success: true, userId: order?.userId ?? null }\n}\n\nexport async function updateOrderDelivered(orderId: string, isDelivered: boolean): Promise {\n const orderIdNumber = parseInt(orderId)\n\n await db\n .update(orderStatus)\n .set({ isDelivered })\n .where(eq(orderStatus.orderId, orderIdNumber))\n\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderIdNumber),\n })\n\n return { success: true, userId: order?.userId ?? null }\n}\n\nexport async function getOrderDetails(orderId: number): Promise {\n // Single optimized query with all relations\n const orderData = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n payment: true,\n paymentInfo: true,\n orderStatus: true,\n refunds: true,\n },\n })\n\n if (!orderData) {\n return null\n }\n\n const couponUsageData = await db.query.couponUsage.findMany({\n where: eq(couponUsage.orderId, orderData.id),\n with: {\n coupon: true,\n },\n })\n\n let couponData = null\n if (couponUsageData.length > 0) {\n let totalDiscountAmount = 0\n const orderTotal = parseFloat((orderData.totalAmount ?? '0').toString())\n\n for (const usage of couponUsageData) {\n let discountAmount = 0\n\n if (usage.coupon.discountPercent) {\n discountAmount =\n (orderTotal * parseFloat(usage.coupon.discountPercent.toString())) /\n 100\n } else if (usage.coupon.flatDiscount) {\n discountAmount = parseFloat(usage.coupon.flatDiscount.toString())\n }\n\n if (\n usage.coupon.maxValue &&\n discountAmount > parseFloat(usage.coupon.maxValue.toString())\n ) {\n discountAmount = parseFloat(usage.coupon.maxValue.toString())\n }\n\n totalDiscountAmount += discountAmount\n }\n\n couponData = {\n couponCode: couponUsageData.map((u: any) => u.coupon.couponCode).join(', '),\n couponDescription: `${couponUsageData.length} coupons applied`,\n discountAmount: totalDiscountAmount,\n }\n }\n\n const statusRecord = orderData.orderStatus?.[0]\n const orderStatusRecord = statusRecord ? mapOrderStatusRecord(statusRecord) : null\n let status: 'pending' | 'delivered' | 'cancelled' = 'pending'\n if (orderStatusRecord?.isCancelled) {\n status = 'cancelled'\n } else if (orderStatusRecord?.isDelivered) {\n status = 'delivered'\n }\n\n const refund = orderData.refunds?.[0]\n const refundStatus = refund?.refundStatus && isRefundStatus(refund.refundStatus)\n ? refund.refundStatus\n : null\n const refundRecord: AdminRefundRecord | null = refund\n ? {\n id: refund.id,\n orderId: refund.orderId,\n refundAmount: refund.refundAmount,\n refundStatus,\n merchantRefundId: refund.merchantRefundId,\n refundProcessedAt: refund.refundProcessedAt,\n createdAt: refund.createdAt,\n }\n : null\n\n return {\n id: orderData.id,\n readableId: orderData.id,\n userId: orderData.user.id,\n customerName: `${orderData.user.name}`,\n customerEmail: orderData.user.email,\n customerMobile: orderData.user.mobile,\n address: {\n name: orderData.address.name,\n line1: orderData.address.addressLine1,\n line2: orderData.address.addressLine2,\n city: orderData.address.city,\n state: orderData.address.state,\n pincode: orderData.address.pincode,\n phone: orderData.address.phone,\n },\n slotInfo: orderData.slot\n ? {\n time: orderData.slot.deliveryTime.toISOString(),\n sequence: orderData.slot.deliverySequence,\n }\n : null,\n isCod: orderData.isCod,\n isOnlinePayment: orderData.isOnlinePayment,\n totalAmount:\n parseFloat(orderData.totalAmount?.toString() || '0') -\n parseFloat(orderData.deliveryCharge?.toString() || '0'),\n deliveryCharge: parseFloat(orderData.deliveryCharge?.toString() || '0'),\n adminNotes: orderData.adminNotes,\n userNotes: orderData.userNotes,\n createdAt: orderData.createdAt,\n status,\n isPackaged: orderStatusRecord?.isPackaged || false,\n isDelivered: orderStatusRecord?.isDelivered || false,\n items: orderData.orderItems.map((item: any) => ({\n id: item.id,\n name: item.product.name,\n quantity: item.quantity,\n productSize: item.product.productQuantity,\n price: item.price,\n unit: item.product.unit?.shortNotation,\n amount: parseFloat(item.price.toString()) * parseFloat(item.quantity || '0'),\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n })),\n payment: orderData.payment\n ? {\n status: orderData.payment.status,\n gateway: orderData.payment.gateway,\n merchantOrderId: orderData.payment.merchantOrderId,\n }\n : null,\n paymentInfo: orderData.paymentInfo\n ? {\n status: orderData.paymentInfo.status,\n gateway: orderData.paymentInfo.gateway,\n merchantOrderId: orderData.paymentInfo.merchantOrderId,\n }\n : null,\n cancelReason: orderStatusRecord?.cancelReason || null,\n cancellationReviewed: orderStatusRecord?.cancellationReviewed || false,\n isRefundDone: refundStatus === 'processed' || false,\n refundStatus,\n refundAmount: refund?.refundAmount\n ? parseFloat(refund.refundAmount.toString())\n : null,\n couponData,\n couponCode: couponData?.couponCode || null,\n couponDescription: couponData?.couponDescription || null,\n discountAmount: couponData?.discountAmount || null,\n orderStatus: orderStatusRecord,\n refundRecord,\n isFlashDelivery: orderData.isFlashDelivery,\n }\n}\n\nexport async function updateOrderItemPackaging(\n orderItemId: number,\n isPackaged?: boolean,\n isPackageVerified?: boolean\n): Promise {\n const orderItem = await db.query.orderItems.findFirst({\n where: eq(orderItems.id, orderItemId),\n })\n\n if (!orderItem) {\n return { success: false, updated: false }\n }\n\n const updateData: Partial<{\n is_packaged: boolean\n is_package_verified: boolean\n }> = {}\n\n if (isPackaged !== undefined) {\n updateData.is_packaged = isPackaged\n }\n if (isPackageVerified !== undefined) {\n updateData.is_package_verified = isPackageVerified\n }\n\n await db\n .update(orderItems)\n .set(updateData)\n .where(eq(orderItems.id, orderItemId))\n\n return { success: true, updated: true }\n}\n\nexport async function removeDeliveryCharge(orderId: number): Promise {\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n })\n\n if (!order) {\n return null\n }\n\n const currentDeliveryCharge = parseFloat(order.deliveryCharge?.toString() || '0')\n const currentTotalAmount = parseFloat(order.totalAmount?.toString() || '0')\n const newTotalAmount = currentTotalAmount - currentDeliveryCharge\n\n await db\n .update(orders)\n .set({\n deliveryCharge: '0',\n totalAmount: newTotalAmount.toString(),\n })\n .where(eq(orders.id, orderId))\n\n return { success: true, message: 'Delivery charge removed' }\n}\n\nexport async function getSlotOrders(slotId: string): Promise {\n const slotOrders = await db.query.orders.findMany({\n where: eq(orders.slotId, parseInt(slotId)),\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n },\n })\n\n const filteredOrders = slotOrders.filter((order: any) => {\n const statusRecord = order.orderStatus[0]\n return order.isCod || (statusRecord && statusRecord.paymentStatus === 'success')\n })\n\n const formattedOrders = filteredOrders.map((order: any) => {\n const statusRecord = order.orderStatus[0]\n let status: 'pending' | 'delivered' | 'cancelled' = 'pending'\n if (statusRecord?.isCancelled) {\n status = 'cancelled'\n } else if (statusRecord?.isDelivered) {\n status = 'delivered'\n }\n\n const items = order.orderItems.map((item: any) => ({\n id: item.id,\n name: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n amount: parseFloat(item.quantity) * parseFloat(item.price.toString()),\n unit: item.product.unit?.shortNotation || '',\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n }))\n\n const paymentMode: 'COD' | 'Online' = order.isCod ? 'COD' : 'Online'\n\n return {\n id: order.id,\n readableId: order.id,\n customerName: order.user.name || order.user.mobile+'',\n address: `${order.address.addressLine1}${\n order.address.addressLine2 ? `, ${order.address.addressLine2}` : ''\n }, ${order.address.city}, ${order.address.state} - ${\n order.address.pincode\n }, Phone: ${order.address.phone}`,\n addressId: order.addressId,\n latitude: order.address.adminLatitude ?? order.address.latitude,\n longitude: order.address.adminLongitude ?? order.address.longitude,\n totalAmount: parseFloat(order.totalAmount),\n items,\n deliveryTime: order.slot?.deliveryTime.toISOString() || null,\n status,\n isPackaged: order.orderItems.every((item: any) => item.is_packaged) || false,\n isDelivered: statusRecord?.isDelivered || false,\n isCod: order.isCod,\n paymentMode,\n paymentStatus: isPaymentStatus(statusRecord?.paymentStatus || 'pending')\n ? statusRecord?.paymentStatus || 'pending'\n : 'pending',\n slotId: order.slotId,\n adminNotes: order.adminNotes,\n userNotes: order.userNotes,\n }\n })\n\n return { success: true, data: formattedOrders }\n}\n\nexport async function updateAddressCoords(\n addressId: number,\n latitude: number,\n longitude: number\n): Promise {\n const result = await db\n .update(addresses)\n .set({\n adminLatitude: latitude,\n adminLongitude: longitude,\n })\n .where(eq(addresses.id, addressId))\n .returning()\n\n return { success: result.length > 0 }\n}\n\ntype GetAllOrdersInput = {\n cursor?: number\n limit: number\n slotId?: number | null\n packagedFilter?: 'all' | 'packaged' | 'not_packaged'\n deliveredFilter?: 'all' | 'delivered' | 'not_delivered'\n cancellationFilter?: 'all' | 'cancelled' | 'not_cancelled'\n flashDeliveryFilter?: 'all' | 'flash' | 'regular'\n}\n\nexport async function getAllOrders(input: GetAllOrdersInput): Promise {\n const {\n cursor,\n limit,\n slotId,\n packagedFilter,\n deliveredFilter,\n cancellationFilter,\n flashDeliveryFilter,\n } = input\n\n let whereCondition: SQL | undefined = eq(orders.id, orders.id)\n if (cursor) {\n whereCondition = and(whereCondition, lt(orders.id, cursor))\n }\n if (slotId) {\n whereCondition = and(whereCondition, eq(orders.slotId, slotId))\n }\n if (packagedFilter === 'packaged') {\n whereCondition = and(whereCondition, eq(orderStatus.isPackaged, true))\n } else if (packagedFilter === 'not_packaged') {\n whereCondition = and(whereCondition, eq(orderStatus.isPackaged, false))\n }\n if (deliveredFilter === 'delivered') {\n whereCondition = and(whereCondition, eq(orderStatus.isDelivered, true))\n } else if (deliveredFilter === 'not_delivered') {\n whereCondition = and(whereCondition, eq(orderStatus.isDelivered, false))\n }\n if (cancellationFilter === 'cancelled') {\n whereCondition = and(whereCondition, eq(orderStatus.isCancelled, true))\n } else if (cancellationFilter === 'not_cancelled') {\n whereCondition = and(whereCondition, eq(orderStatus.isCancelled, false))\n }\n if (flashDeliveryFilter === 'flash') {\n whereCondition = and(whereCondition, eq(orders.isFlashDelivery, true))\n } else if (flashDeliveryFilter === 'regular') {\n whereCondition = and(whereCondition, eq(orders.isFlashDelivery, false))\n }\n\n const allOrders = await db.query.orders.findMany({\n where: whereCondition,\n orderBy: desc(orders.createdAt),\n limit: limit + 1,\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n },\n })\n\n const hasMore = allOrders.length > limit\n const ordersToReturn = hasMore ? allOrders.slice(0, limit) : allOrders\n\n const filteredOrders = ordersToReturn.filter((order: any) => {\n const statusRecord = order.orderStatus[0]\n return order.isCod || (statusRecord && statusRecord.paymentStatus === 'success')\n })\n\n const formattedOrders = filteredOrders.map((order: any) => {\n const statusRecord = order.orderStatus[0]\n let status: 'pending' | 'delivered' | 'cancelled' = 'pending'\n if (statusRecord?.isCancelled) {\n status = 'cancelled'\n } else if (statusRecord?.isDelivered) {\n status = 'delivered'\n }\n\n const items = order.orderItems\n .map((item: any) => ({\n id: item.id,\n name: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n amount: parseFloat(item.quantity) * parseFloat(item.price.toString()),\n unit: item.product.unit?.shortNotation || '',\n productSize: item.product.productQuantity,\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n }))\n .sort((first: any, second: any) => first.id - second.id)\n\n return {\n id: order.id,\n orderId: order.id.toString(),\n readableId: order.id,\n customerName: order.user.name || order.user.mobile + '',\n customerMobile: order.user.mobile,\n address: `${order.address.addressLine1}${\n order.address.addressLine2 ? `, ${order.address.addressLine2}` : ''\n }, ${order.address.city}, ${order.address.state} - ${\n order.address.pincode\n }, Phone: ${order.address.phone}`,\n addressId: order.addressId,\n latitude: order.address.adminLatitude ?? order.address.latitude,\n longitude: order.address.adminLongitude ?? order.address.longitude,\n totalAmount: parseFloat(order.totalAmount),\n deliveryCharge: parseFloat(order.deliveryCharge || '0'),\n items,\n createdAt: order.createdAt,\n deliveryTime: order.slot?.deliveryTime.toISOString() || null,\n status,\n isPackaged: order.orderItems.every((item: any) => item.is_packaged) || false,\n isDelivered: statusRecord?.isDelivered || false,\n isCod: order.isCod,\n isFlashDelivery: order.isFlashDelivery,\n userNotes: order.userNotes,\n adminNotes: order.adminNotes,\n userNegativityScore: 0,\n userId: order.userId,\n }\n })\n\n return {\n orders: formattedOrders,\n nextCursor: hasMore ? ordersToReturn[ordersToReturn.length - 1].id : undefined,\n }\n}\n\nexport async function rebalanceSlots(slotIds: number[]): Promise {\n const ordersList = await db.query.orders.findMany({\n where: inArray(orders.slotId, slotIds),\n with: {\n orderItems: {\n with: {\n product: true,\n },\n },\n couponUsages: {\n with: {\n coupon: true,\n },\n },\n },\n })\n\n const processedOrdersData = ordersList.map((order: any) => {\n let newTotal = order.orderItems.reduce((acc: number, item: any) => {\n const latestPrice = +item.product.price\n const amount = latestPrice * Number(item.quantity)\n return acc + amount\n }, 0)\n\n order.orderItems.forEach((item: any) => {\n item.price = item.product.price\n item.discountedPrice = item.product.price\n })\n\n const coupon = order.couponUsages[0]?.coupon\n\n let discount = 0\n if (coupon && !coupon.isInvalidated && (!coupon.validTill || new Date(coupon.validTill) > new Date())) {\n const proportion = Number(order.orderGroupProportion || 1)\n if (coupon.discountPercent) {\n const maxDiscount = Number(coupon.maxValue || Infinity) * proportion\n discount = Math.min((newTotal * parseFloat(coupon.discountPercent)) / 100, maxDiscount)\n } else {\n discount = Number(coupon.flatDiscount) * proportion\n }\n }\n newTotal -= discount\n\n const { couponUsages, orderItems: orderItemsRaw, ...rest } = order\n const updatedOrderItems = orderItemsRaw.map((item: any) => {\n const { product, ...rawOrderItem } = item\n return rawOrderItem\n })\n return { order: rest, updatedOrderItems, newTotal }\n })\n\n const updatedOrderIds: number[] = []\n await db.transaction(async (tx) => {\n for (const { order, updatedOrderItems, newTotal } of processedOrdersData) {\n await tx.update(orders).set({ totalAmount: newTotal.toString() }).where(eq(orders.id, order.id))\n updatedOrderIds.push(order.id)\n\n for (const item of updatedOrderItems) {\n await tx\n .update(orderItems)\n .set({\n price: item.price,\n discountedPrice: item.discountedPrice,\n })\n .where(eq(orderItems.id, item.id))\n }\n }\n })\n\n return {\n success: true,\n updatedOrders: updatedOrderIds,\n message: `Rebalanced ${updatedOrderIds.length} orders.`,\n }\n}\n\nexport async function cancelOrder(orderId: number, reason: string): Promise {\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n orderStatus: true,\n },\n })\n\n if (!order) {\n return { success: false, message: 'Order not found', error: 'order_not_found' }\n }\n\n const status = order.orderStatus[0]\n if (!status) {\n return { success: false, message: 'Order status not found', error: 'status_not_found' }\n }\n\n if (status.isCancelled) {\n return { success: false, message: 'Order is already cancelled', error: 'already_cancelled' }\n }\n\n if (status.isDelivered) {\n return { success: false, message: 'Cannot cancel delivered order', error: 'already_delivered' }\n }\n\n const result = await db.transaction(async (tx) => {\n await tx\n .update(orderStatus)\n .set({\n isCancelled: true,\n isCancelledByAdmin: true,\n cancelReason: reason,\n cancellationAdminNotes: reason,\n cancellationReviewed: true,\n cancellationReviewedAt: new Date(),\n })\n .where(eq(orderStatus.id, status.id))\n\n const refundStatus = order.isCod ? 'na' : 'pending'\n\n await tx.insert(refunds).values({\n orderId: order.id,\n refundStatus,\n })\n\n return { orderId: order.id, userId: order.userId }\n })\n\n return {\n success: true,\n message: 'Order cancelled successfully',\n orderId: result.orderId,\n userId: result.userId,\n }\n}\n\nexport async function deleteOrderById(orderId: number): Promise {\n await db.transaction(async (tx) => {\n await tx.delete(orderItems).where(eq(orderItems.orderId, orderId))\n await tx.delete(orderStatus).where(eq(orderStatus.orderId, orderId))\n await tx.delete(payments).where(eq(payments.orderId, orderId))\n await tx.delete(refunds).where(eq(refunds.orderId, orderId))\n await tx.delete(couponUsage).where(eq(couponUsage.orderId, orderId))\n await tx.delete(complaints).where(eq(complaints.orderId, orderId))\n await tx.delete(orders).where(eq(orders.id, orderId))\n })\n}\n", "import { db } from '../db/db_index'\nimport {\n productInfo,\n units,\n specialDeals,\n productSlots,\n productTags,\n productReviews,\n productGroupInfo,\n productGroupMembership,\n productTagInfo,\n users,\n storeInfo,\n} from '../db/schema'\nimport { and, desc, eq, inArray, sql } from 'drizzle-orm'\nimport type { InferInsertModel, InferSelectModel } from 'drizzle-orm'\nimport type {\n AdminProduct,\n AdminProductGroupInfo,\n AdminProductTagInfo,\n AdminProductTagWithProducts,\n AdminProductReview,\n AdminProductWithDetails,\n AdminProductWithRelations,\n AdminSpecialDeal,\n AdminUnit,\n AdminUpdateSlotProductsResult,\n Store,\n} from '@packages/shared'\n\ntype ProductRow = InferSelectModel\ntype UnitRow = InferSelectModel\ntype StoreRow = InferSelectModel\ntype SpecialDealRow = InferSelectModel\ntype ProductTagInfoRow = InferSelectModel\ntype ProductTagRow = InferSelectModel\ntype ProductGroupRow = InferSelectModel\ntype ProductGroupMembershipRow = InferSelectModel\ntype ProductReviewRow = InferSelectModel\n\nconst getStringArray = (value: unknown): string[] | null => {\n if (!Array.isArray(value)) return null\n return value.map((item) => String(item))\n}\n\nconst mapUnit = (unit: UnitRow): AdminUnit => ({\n id: unit.id,\n shortNotation: unit.shortNotation,\n fullName: unit.fullName,\n})\n\nconst mapStore = (store: StoreRow): Store => ({\n id: store.id,\n name: store.name,\n description: store.description,\n imageUrl: store.imageUrl,\n owner: store.owner,\n createdAt: store.createdAt,\n // updatedAt: store.createdAt,\n})\n\nconst mapProduct = (product: ProductRow): AdminProduct => ({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription ?? null,\n longDescription: product.longDescription ?? null,\n unitId: product.unitId,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n images: getStringArray(product.images),\n imageKeys: getStringArray(product.images),\n isOutOfStock: product.isOutOfStock,\n isSuspended: product.isSuspended,\n isFlashAvailable: product.isFlashAvailable,\n flashPrice: product.flashPrice ? String(product.flashPrice) : null,\n createdAt: product.createdAt,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n storeId: product.storeId,\n})\n\nconst mapSpecialDeal = (deal: SpecialDealRow): AdminSpecialDeal => ({\n id: deal.id,\n productId: deal.productId,\n quantity: String(deal.quantity ?? '0'),\n price: String(deal.price ?? '0'),\n validTill: deal.validTill,\n})\n\nconst mapTagInfo = (tag: ProductTagInfoRow): AdminProductTagInfo => ({\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription ?? null,\n imageUrl: tag.imageUrl ?? null,\n isDashboardTag: tag.isDashboardTag,\n relatedStores: tag.relatedStores,\n createdAt: tag.createdAt,\n})\n\nexport async function getAllProducts(): Promise {\n type ProductWithRelationsRow = ProductRow & { unit: UnitRow; store: StoreRow | null }\n const products = await db.query.productInfo.findMany({\n orderBy: productInfo.name,\n with: {\n unit: true,\n store: true,\n },\n }) as ProductWithRelationsRow[]\n\n return products.map((product) => ({\n ...mapProduct(product),\n unit: mapUnit(product.unit),\n store: product.store ? mapStore(product.store) : null,\n }))\n}\n\nexport async function getProductById(id: number): Promise {\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, id),\n with: {\n unit: true,\n },\n })\n\n if (!product) {\n return null\n }\n\n const deals = await db.query.specialDeals.findMany({\n where: eq(specialDeals.productId, id),\n orderBy: specialDeals.quantity,\n })\n\n const productTagsData = await db.query.productTags.findMany({\n where: eq(productTags.productId, id),\n with: {\n tag: true,\n },\n }) as Array\n\n return {\n ...mapProduct(product),\n unit: mapUnit(product.unit),\n deals: deals.map(mapSpecialDeal),\n tags: productTagsData.map((tag) => mapTagInfo(tag.tag)),\n }\n}\n\nexport async function deleteProduct(id: number): Promise {\n const [deletedProduct] = await db\n .delete(productInfo)\n .where(eq(productInfo.id, id))\n .returning()\n\n if (!deletedProduct) {\n return null\n }\n\n return mapProduct(deletedProduct)\n}\n\ntype ProductInfoInsert = InferInsertModel\ntype ProductInfoUpdate = Partial\n\nexport async function createProduct(input: ProductInfoInsert): Promise {\n const [product] = await db.insert(productInfo).values(input).returning()\n return mapProduct(product)\n}\n\nexport async function updateProduct(id: number, updates: ProductInfoUpdate): Promise {\n const [product] = await db.update(productInfo)\n .set(updates)\n .where(eq(productInfo.id, id))\n .returning()\n if (!product) {\n return null\n }\n\n return mapProduct(product)\n}\n\nexport async function toggleProductOutOfStock(id: number): Promise {\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, id),\n })\n\n if (!product) {\n return null\n }\n\n const [updatedProduct] = await db\n .update(productInfo)\n .set({\n isOutOfStock: !product.isOutOfStock,\n })\n .where(eq(productInfo.id, id))\n .returning()\n\n if (!updatedProduct) {\n return null\n }\n\n return mapProduct(updatedProduct)\n}\n\nexport async function updateSlotProducts(slotId: string, productIds: string[]): Promise {\n const currentAssociations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, parseInt(slotId)),\n columns: {\n productId: true,\n },\n }) as Array<{ productId: number }>\n\n const currentProductIds = currentAssociations.map((assoc: { productId: number }) => assoc.productId)\n const newProductIds = productIds.map((id: string) => parseInt(id))\n\n const productsToAdd = newProductIds.filter((id: number) => !currentProductIds.includes(id))\n const productsToRemove = currentProductIds.filter((id: number) => !newProductIds.includes(id))\n\n if (productsToRemove.length > 0) {\n await db.delete(productSlots).where(\n and(\n eq(productSlots.slotId, parseInt(slotId)),\n inArray(productSlots.productId, productsToRemove)\n )\n )\n }\n\n if (productsToAdd.length > 0) {\n const newAssociations = productsToAdd.map((productId) => ({\n productId,\n slotId: parseInt(slotId),\n }))\n\n await db.insert(productSlots).values(newAssociations)\n }\n\n return {\n message: 'Slot products updated successfully',\n added: productsToAdd.length,\n removed: productsToRemove.length,\n }\n}\n\nexport async function getSlotProductIds(slotId: string): Promise {\n const associations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, parseInt(slotId)),\n columns: {\n productId: true,\n },\n })\n\n return associations.map((assoc: { productId: number }) => assoc.productId)\n}\n\nexport async function getAllUnits(): Promise {\n const allUnits = await db.query.units.findMany({\n orderBy: units.shortNotation,\n })\n\n return allUnits.map(mapUnit)\n}\n\nexport async function getAllProductTags(): Promise {\n const tags = await db.query.productTagInfo.findMany({\n with: {\n products: {\n with: {\n product: true,\n },\n },\n },\n }) as Array }>\n\n return tags.map((tag: ProductTagInfoRow & { products: Array }) => ({\n ...mapTagInfo(tag),\n products: tag.products.map((assignment: ProductTagRow & { product: ProductRow }) => ({\n productId: assignment.productId,\n tagId: assignment.tagId,\n assignedAt: assignment.assignedAt,\n product: mapProduct(assignment.product),\n })),\n }))\n}\n\nexport async function getAllProductTagInfos(): Promise {\n const tags = await db.query.productTagInfo.findMany({\n orderBy: productTagInfo.tagName,\n })\n\n return tags.map(mapTagInfo)\n}\n\nexport async function getProductTagInfoById(tagId: number): Promise {\n const tag = await db.query.productTagInfo.findFirst({\n where: eq(productTagInfo.id, tagId),\n })\n\n if (!tag) {\n return null\n }\n\n return mapTagInfo(tag)\n}\n\nexport interface CreateProductTagInput {\n tagName: string\n tagDescription?: string | null\n imageUrl?: string | null\n isDashboardTag?: boolean\n relatedStores?: number[]\n}\n\nexport async function createProductTag(input: CreateProductTagInput): Promise {\n const [tag] = await db.insert(productTagInfo).values({\n tagName: input.tagName,\n tagDescription: input.tagDescription || null,\n imageUrl: input.imageUrl || null,\n isDashboardTag: input.isDashboardTag || false,\n relatedStores: input.relatedStores || [],\n }).returning()\n\n return {\n ...mapTagInfo(tag),\n products: [],\n }\n}\n\nexport async function getProductTagById(tagId: number): Promise {\n const tag = await db.query.productTagInfo.findFirst({\n where: eq(productTagInfo.id, tagId),\n with: {\n products: {\n with: {\n product: true,\n },\n },\n },\n })\n\n if (!tag) {\n return null\n }\n\n return {\n ...mapTagInfo(tag),\n products: tag.products.map((assignment: ProductTagRow & { product: ProductRow }) => ({\n productId: assignment.productId,\n tagId: assignment.tagId,\n assignedAt: assignment.assignedAt,\n product: mapProduct(assignment.product),\n })),\n }\n}\n\nexport interface UpdateProductTagInput {\n tagName?: string\n tagDescription?: string | null\n imageUrl?: string | null\n isDashboardTag?: boolean\n relatedStores?: number[]\n}\n\nexport async function updateProductTag(tagId: number, input: UpdateProductTagInput): Promise {\n const [tag] = await db.update(productTagInfo).set({\n ...(input.tagName !== undefined && { tagName: input.tagName }),\n ...(input.tagDescription !== undefined && { tagDescription: input.tagDescription }),\n ...(input.imageUrl !== undefined && { imageUrl: input.imageUrl }),\n ...(input.isDashboardTag !== undefined && { isDashboardTag: input.isDashboardTag }),\n ...(input.relatedStores !== undefined && { relatedStores: input.relatedStores }),\n }).where(eq(productTagInfo.id, tagId)).returning()\n\n const fullTag = await db.query.productTagInfo.findFirst({\n where: eq(productTagInfo.id, tagId),\n with: {\n products: {\n with: {\n product: true,\n },\n },\n },\n })\n\n return {\n ...mapTagInfo(tag),\n products: fullTag?.products.map((assignment: ProductTagRow & { product: ProductRow }) => ({\n productId: assignment.productId,\n tagId: assignment.tagId,\n assignedAt: assignment.assignedAt,\n product: mapProduct(assignment.product),\n })) || [],\n }\n}\n\nexport async function deleteProductTag(tagId: number): Promise {\n await db.delete(productTagInfo).where(eq(productTagInfo.id, tagId))\n}\n\nexport async function checkProductTagExistsByName(tagName: string): Promise {\n const tag = await db.query.productTagInfo.findFirst({\n where: eq(productTagInfo.tagName, tagName),\n })\n return !!tag\n}\n\nexport async function getSlotsProductIds(slotIds: number[]): Promise> {\n if (slotIds.length === 0) {\n return {}\n }\n\n const associations = await db.query.productSlots.findMany({\n where: inArray(productSlots.slotId, slotIds),\n columns: {\n slotId: true,\n productId: true,\n },\n }) as Array<{ slotId: number; productId: number }>\n\n const result: Record = {}\n for (const assoc of associations) {\n if (!result[assoc.slotId]) {\n result[assoc.slotId] = []\n }\n result[assoc.slotId].push(assoc.productId)\n }\n\n slotIds.forEach((slotId) => {\n if (!result[slotId]) {\n result[slotId] = []\n }\n })\n\n return result\n}\n\nexport async function getProductReviews(productId: number, limit: number, offset: number) {\n const reviews = await db\n .select({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n adminResponse: productReviews.adminResponse,\n adminResponseImages: productReviews.adminResponseImages,\n userName: users.name,\n })\n .from(productReviews)\n .innerJoin(users, eq(productReviews.userId, users.id))\n .where(eq(productReviews.productId, productId))\n .orderBy(desc(productReviews.reviewTime))\n .limit(limit)\n .offset(offset)\n\n const totalCountResult = await db\n .select({ count: sql`count(*)` })\n .from(productReviews)\n .where(eq(productReviews.productId, productId))\n\n const totalCount = Number(totalCountResult[0].count)\n\n const mappedReviews: AdminProductReview[] = reviews.map((review: any) => ({\n id: review.id,\n reviewBody: review.reviewBody,\n ratings: review.ratings,\n imageUrls: review.imageUrls,\n reviewTime: review.reviewTime,\n adminResponse: review.adminResponse ?? null,\n adminResponseImages: review.adminResponseImages,\n userName: review.userName ?? null,\n }))\n\n return {\n reviews: mappedReviews,\n totalCount,\n }\n}\n\nexport async function respondToReview(\n reviewId: number,\n adminResponse: string | undefined,\n adminResponseImages: string[]\n): Promise {\n const [updatedReview] = await db\n .update(productReviews)\n .set({\n adminResponse,\n adminResponseImages,\n })\n .where(eq(productReviews.id, reviewId))\n .returning()\n\n if (!updatedReview) {\n return null\n }\n\n return {\n id: updatedReview.id,\n reviewBody: updatedReview.reviewBody,\n ratings: updatedReview.ratings,\n imageUrls: updatedReview.imageUrls,\n reviewTime: updatedReview.reviewTime,\n adminResponse: updatedReview.adminResponse ?? null,\n adminResponseImages: updatedReview.adminResponseImages,\n userName: null,\n }\n}\n\nexport async function getAllProductGroups() {\n const groups = await db.query.productGroupInfo.findMany({\n with: {\n memberships: {\n with: {\n product: true,\n },\n },\n },\n orderBy: desc(productGroupInfo.createdAt),\n })\n\n return groups.map((group: any) => ({\n id: group.id,\n groupName: group.groupName,\n description: group.description ?? null,\n createdAt: group.createdAt,\n products: group.memberships.map((membership: any) => mapProduct(membership.product)),\n productCount: group.memberships.length,\n memberships: group.memberships\n }))\n}\n\nexport async function createProductGroup(\n groupName: string,\n description: string | undefined,\n productIds: number[]\n): Promise {\n const [newGroup] = await db\n .insert(productGroupInfo)\n .values({\n groupName,\n description,\n })\n .returning()\n\n if (productIds.length > 0) {\n const memberships = productIds.map((productId) => ({\n productId,\n groupId: newGroup.id,\n }))\n\n await db.insert(productGroupMembership).values(memberships)\n }\n\n return {\n id: newGroup.id,\n groupName: newGroup.groupName,\n description: newGroup.description ?? null,\n createdAt: newGroup.createdAt,\n }\n}\n\nexport async function updateProductGroup(\n id: number,\n groupName: string | undefined,\n description: string | undefined,\n productIds: number[] | undefined\n): Promise {\n const updateData: Partial<{\n groupName: string\n description: string | null\n }> = {}\n\n if (groupName !== undefined) updateData.groupName = groupName\n if (description !== undefined) updateData.description = description\n\n const [updatedGroup] = await db\n .update(productGroupInfo)\n .set(updateData)\n .where(eq(productGroupInfo.id, id))\n .returning()\n\n if (!updatedGroup) {\n return null\n }\n\n if (productIds !== undefined) {\n await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id))\n\n if (productIds.length > 0) {\n const memberships = productIds.map((productId) => ({\n productId,\n groupId: id,\n }))\n\n await db.insert(productGroupMembership).values(memberships)\n }\n }\n\n return {\n id: updatedGroup.id,\n groupName: updatedGroup.groupName,\n description: updatedGroup.description ?? null,\n createdAt: updatedGroup.createdAt,\n }\n}\n\nexport async function deleteProductGroup(id: number): Promise {\n await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id))\n\n const [deletedGroup] = await db\n .delete(productGroupInfo)\n .where(eq(productGroupInfo.id, id))\n .returning()\n\n if (!deletedGroup) {\n return null\n }\n\n return {\n id: deletedGroup.id,\n groupName: deletedGroup.groupName,\n description: deletedGroup.description ?? null,\n createdAt: deletedGroup.createdAt,\n }\n}\n\nexport async function addProductToGroup(groupId: number, productId: number): Promise {\n await db.insert(productGroupMembership).values({ groupId, productId })\n}\n\nexport async function removeProductFromGroup(groupId: number, productId: number): Promise {\n await db.delete(productGroupMembership)\n .where(and(\n eq(productGroupMembership.groupId, groupId),\n eq(productGroupMembership.productId, productId)\n ))\n}\n\nexport async function updateProductPrices(updates: Array<{\n productId: number\n price?: number\n marketPrice?: number | null\n flashPrice?: number | null\n isFlashAvailable?: boolean\n}>) {\n if (updates.length === 0) {\n return { updatedCount: 0, invalidIds: [] }\n }\n\n const productIds = updates.map((update) => update.productId)\n const existingProducts = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, productIds),\n columns: { id: true },\n }) as Array<{ id: number }>\n\n const existingIds = new Set(existingProducts.map((product: { id: number }) => product.id))\n const invalidIds = productIds.filter((id) => !existingIds.has(id))\n\n if (invalidIds.length > 0) {\n return { updatedCount: 0, invalidIds }\n }\n\n const updatePromises = updates.map((update) => {\n const { productId, price, marketPrice, flashPrice, isFlashAvailable } = update\n const updateData: Partial> = {}\n\n if (price !== undefined) updateData.price = price.toString()\n if (marketPrice !== undefined) updateData.marketPrice = marketPrice === null ? null : marketPrice.toString()\n if (flashPrice !== undefined) updateData.flashPrice = flashPrice === null ? null : flashPrice.toString()\n if (isFlashAvailable !== undefined) updateData.isFlashAvailable = isFlashAvailable\n\n return db\n .update(productInfo)\n .set(updateData)\n .where(eq(productInfo.id, productId))\n })\n\n await Promise.all(updatePromises)\n\n return { updatedCount: updates.length, invalidIds: [] }\n}\n\n\n// ==========================================================================\n// Product Helpers for Admin Controller\n// ==========================================================================\n\nexport async function checkProductExistsByName(name: string): Promise {\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.name, name),\n columns: { id: true },\n })\n\n return !!product\n}\n\nexport async function checkUnitExists(unitId: number): Promise {\n const unit = await db.query.units.findFirst({\n where: eq(units.id, unitId),\n columns: { id: true },\n })\n\n return !!unit\n}\n\nexport async function getProductImagesById(productId: number): Promise {\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n columns: { images: true },\n })\n\n if (!product) {\n return null\n }\n\n return getStringArray(product.images) || []\n}\n\nexport interface CreateSpecialDealInput {\n quantity: number\n price: number\n validTill: string | Date\n}\n\nexport async function createSpecialDealsForProduct(\n productId: number,\n deals: CreateSpecialDealInput[]\n): Promise {\n if (deals.length === 0) {\n return []\n }\n\n const dealInserts = deals.map((deal) => ({\n productId,\n quantity: deal.quantity.toString(),\n price: deal.price.toString(),\n validTill: new Date(deal.validTill),\n }))\n\n const createdDeals = await db\n .insert(specialDeals)\n .values(dealInserts)\n .returning()\n\n return createdDeals.map(mapSpecialDeal)\n}\n\nexport async function updateProductDeals(\n productId: number,\n deals: CreateSpecialDealInput[]\n): Promise {\n if (deals.length === 0) {\n await db.delete(specialDeals).where(eq(specialDeals.productId, productId))\n return\n }\n\n const existingDeals = await db.query.specialDeals.findMany({\n where: eq(specialDeals.productId, productId),\n })\n\n const existingDealsMap = new Map(\n existingDeals.map((deal: SpecialDealRow) => [`${deal.quantity}-${deal.price}`, deal])\n )\n const newDealsMap = new Map(\n deals.map((deal) => [`${deal.quantity}-${deal.price}`, deal])\n )\n\n const dealsToAdd = deals.filter((deal) => {\n const key = `${deal.quantity}-${deal.price}`\n return !existingDealsMap.has(key)\n })\n\n const dealsToRemove = existingDeals.filter((deal: SpecialDealRow) => {\n const key = `${deal.quantity}-${deal.price}`\n return !newDealsMap.has(key)\n })\n\n const dealsToUpdate = deals.filter((deal: CreateSpecialDealInput) => {\n const key = `${deal.quantity}-${deal.price}`\n const existing = existingDealsMap.get(key)\n const nextValidTill = deal.validTill instanceof Date\n ? deal.validTill.toISOString().split('T')[0]\n : String(deal.validTill)\n return existing && existing.validTill.toISOString().split('T')[0] !== nextValidTill\n })\n\n if (dealsToRemove.length > 0) {\n await db.delete(specialDeals).where(\n inArray(specialDeals.id, dealsToRemove.map((deal: SpecialDealRow) => deal.id))\n )\n }\n\n if (dealsToAdd.length > 0) {\n const dealInserts = dealsToAdd.map((deal) => ({\n productId,\n quantity: deal.quantity.toString(),\n price: deal.price.toString(),\n validTill: new Date(deal.validTill),\n }))\n await db.insert(specialDeals).values(dealInserts)\n }\n\n for (const deal of dealsToUpdate) {\n const key = `${deal.quantity}-${deal.price}`\n const existingDeal = existingDealsMap.get(key)\n if (existingDeal) {\n await db.update(specialDeals)\n .set({ validTill: new Date(deal.validTill) })\n .where(eq(specialDeals.id, existingDeal.id))\n }\n }\n}\n\nexport async function replaceProductTags(productId: number, tagIds: number[]): Promise {\n await db.delete(productTags).where(eq(productTags.productId, productId))\n\n if (tagIds.length === 0) {\n return\n }\n\n const tagAssociations = tagIds.map((tagId) => ({\n productId,\n tagId,\n }))\n\n await db.insert(productTags).values(tagAssociations)\n}\n", "import { db } from '../db/db_index'\nimport {\n deliverySlotInfo,\n productSlots,\n productInfo,\n vendorSnippets,\n productGroupInfo,\n} from '../db/schema'\nimport { and, asc, desc, eq, gt, inArray } from 'drizzle-orm'\nimport type {\n AdminDeliverySlot,\n AdminSlotWithProducts,\n AdminSlotWithProductsAndSnippetsBase,\n AdminSlotCreateResult,\n AdminSlotUpdateResult,\n AdminVendorSnippet,\n AdminSlotProductSummary,\n AdminUpdateSlotCapacityResult,\n} from '@packages/shared'\n\ntype SlotSnippetInput = {\n name: string\n productIds: number[]\n validTill?: string\n}\n\nconst getStringArray = (value: unknown): string[] | null => {\n if (!Array.isArray(value)) return null\n return value.map((item) => String(item))\n}\n\nconst getNumberArray = (value: unknown): number[] => {\n if (!Array.isArray(value)) return []\n return value.map((item) => Number(item))\n}\n\nconst mapDeliverySlot = (slot: typeof deliverySlotInfo.$inferSelect): AdminDeliverySlot => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isFlash: slot.isFlash,\n isCapacityFull: slot.isCapacityFull,\n deliverySequence: slot.deliverySequence,\n groupIds: slot.groupIds,\n})\n\nconst mapSlotProductSummary = (product: { id: number; name: string; images: unknown }): AdminSlotProductSummary => ({\n id: product.id,\n name: product.name,\n images: getStringArray(product.images),\n})\n\nconst mapVendorSnippet = (snippet: typeof vendorSnippets.$inferSelect): AdminVendorSnippet => ({\n id: snippet.id,\n snippetCode: snippet.snippetCode,\n slotId: snippet.slotId ?? null,\n productIds: snippet.productIds || [],\n isPermanent: snippet.isPermanent,\n validTill: snippet.validTill ?? null,\n createdAt: snippet.createdAt,\n})\n\nexport async function getActiveSlotsWithProducts(): Promise {\n const slots = await db.query.deliverySlotInfo\n .findMany({\n where: eq(deliverySlotInfo.isActive, true),\n orderBy: desc(deliverySlotInfo.deliveryTime),\n with: {\n productSlots: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n },\n })\n\n return slots.map((slot: any) => ({\n ...mapDeliverySlot(slot),\n deliverySequence: getNumberArray(slot.deliverySequence),\n products: slot.productSlots.map((ps: any) => mapSlotProductSummary(ps.product)),\n }))\n}\n\nexport async function getActiveSlots(): Promise {\n const slots = await db.query.deliverySlotInfo.findMany({\n where: eq(deliverySlotInfo.isActive, true),\n })\n\n return slots.map(mapDeliverySlot)\n}\n\nexport async function getSlotsAfterDate(afterDate: Date): Promise {\n const slots = await db.query.deliverySlotInfo.findMany({\n where: and(\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, afterDate)\n ),\n orderBy: asc(deliverySlotInfo.deliveryTime),\n })\n\n return slots.map(mapDeliverySlot)\n}\n\nexport async function getSlotByIdWithRelations(id: number): Promise {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, id),\n with: {\n productSlots: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n vendorSnippets: true,\n },\n })\n\n if (!slot) {\n return null\n }\n\n return {\n ...mapDeliverySlot(slot),\n deliverySequence: getNumberArray(slot.deliverySequence),\n groupIds: getNumberArray(slot.groupIds),\n products: slot.productSlots.map((ps: any) => mapSlotProductSummary(ps.product)),\n vendorSnippets: slot.vendorSnippets.map(mapVendorSnippet),\n }\n}\n\nexport async function createSlotWithRelations(input: {\n deliveryTime: string\n freezeTime: string\n isActive?: boolean\n productIds?: number[]\n vendorSnippets?: SlotSnippetInput[]\n groupIds?: number[]\n}): Promise {\n const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input\n\n const result = await db.transaction(async (tx) => {\n const [newSlot] = await tx\n .insert(deliverySlotInfo)\n .values({\n deliveryTime: new Date(deliveryTime),\n freezeTime: new Date(freezeTime),\n isActive: isActive !== undefined ? isActive : true,\n groupIds: groupIds !== undefined ? groupIds : [],\n })\n .returning()\n\n if (productIds && productIds.length > 0) {\n const associations = productIds.map((productId) => ({\n productId,\n slotId: newSlot.id,\n }))\n await tx.insert(productSlots).values(associations)\n }\n\n let createdSnippets: AdminVendorSnippet[] = []\n if (snippets && snippets.length > 0) {\n for (const snippet of snippets) {\n const products = await tx.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n })\n if (products.length !== snippet.productIds.length) {\n throw new Error(`One or more invalid product IDs in snippet \"${snippet.name}\"`)\n }\n\n const existingSnippet = await tx.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippet.name),\n })\n if (existingSnippet) {\n throw new Error(`Snippet name \"${snippet.name}\" already exists`)\n }\n\n const [createdSnippet] = await tx.insert(vendorSnippets).values({\n snippetCode: snippet.name,\n slotId: newSlot.id,\n productIds: snippet.productIds,\n validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,\n }).returning()\n\n createdSnippets.push(mapVendorSnippet(createdSnippet))\n }\n }\n\n return {\n slot: mapDeliverySlot(newSlot),\n createdSnippets,\n message: 'Slot created successfully',\n }\n })\n\n return result\n}\n\nexport async function updateSlotWithRelations(input: {\n id: number\n deliveryTime: string\n freezeTime: string\n isActive?: boolean\n productIds?: number[]\n vendorSnippets?: SlotSnippetInput[]\n groupIds?: number[]\n}): Promise {\n const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input\n\n let validGroupIds = groupIds\n if (groupIds && groupIds.length > 0) {\n const existingGroups = await db.query.productGroupInfo.findMany({\n where: inArray(productGroupInfo.id, groupIds),\n columns: { id: true },\n })\n validGroupIds = existingGroups.map((group: { id: number }) => group.id)\n }\n\n const result = await db.transaction(async (tx) => {\n const [updatedSlot] = await tx\n .update(deliverySlotInfo)\n .set({\n deliveryTime: new Date(deliveryTime),\n freezeTime: new Date(freezeTime),\n isActive: isActive !== undefined ? isActive : true,\n groupIds: validGroupIds !== undefined ? validGroupIds : [],\n })\n .where(eq(deliverySlotInfo.id, id))\n .returning()\n\n if (!updatedSlot) {\n return null\n }\n\n if (productIds !== undefined) {\n await tx.delete(productSlots).where(eq(productSlots.slotId, id))\n\n if (productIds.length > 0) {\n const associations = productIds.map((productId) => ({\n productId,\n slotId: id,\n }))\n await tx.insert(productSlots).values(associations)\n }\n }\n\n let createdSnippets: AdminVendorSnippet[] = []\n if (snippets && snippets.length > 0) {\n for (const snippet of snippets) {\n const products = await tx.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n })\n if (products.length !== snippet.productIds.length) {\n throw new Error(`One or more invalid product IDs in snippet \"${snippet.name}\"`)\n }\n\n const existingSnippet = await tx.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippet.name),\n })\n if (existingSnippet) {\n throw new Error(`Snippet name \"${snippet.name}\" already exists`)\n }\n\n const [createdSnippet] = await tx.insert(vendorSnippets).values({\n snippetCode: snippet.name,\n slotId: id,\n productIds: snippet.productIds,\n validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,\n }).returning()\n\n createdSnippets.push(mapVendorSnippet(createdSnippet))\n }\n }\n\n return {\n slot: mapDeliverySlot(updatedSlot),\n createdSnippets,\n message: 'Slot updated successfully',\n }\n })\n\n return result\n}\n\nexport async function deleteSlotById(id: number): Promise {\n const [deletedSlot] = await db\n .update(deliverySlotInfo)\n .set({ isActive: false })\n .where(eq(deliverySlotInfo.id, id))\n .returning()\n\n if (!deletedSlot) {\n return null\n }\n\n return mapDeliverySlot(deletedSlot)\n}\n\nexport async function getSlotDeliverySequence(slotId: number): Promise {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n })\n\n if (!slot) {\n return null\n }\n\n return mapDeliverySlot(slot)\n}\n\nexport async function updateSlotDeliverySequence(slotId: number, sequence: unknown) {\n const [updatedSlot] = await db\n .update(deliverySlotInfo)\n .set({ deliverySequence: sequence as Record })\n .where(eq(deliverySlotInfo.id, slotId))\n .returning({\n id: deliverySlotInfo.id,\n deliverySequence: deliverySlotInfo.deliverySequence,\n })\n\n return updatedSlot || null\n}\n\nexport async function updateSlotCapacity(slotId: number, isCapacityFull: boolean): Promise {\n const [updatedSlot] = await db\n .update(deliverySlotInfo)\n .set({ isCapacityFull })\n .where(eq(deliverySlotInfo.id, slotId))\n .returning()\n\n if (!updatedSlot) {\n return null\n }\n\n return {\n success: true,\n slot: mapDeliverySlot(updatedSlot),\n message: `Slot ${isCapacityFull ? 'marked as full capacity' : 'capacity reset'}`,\n }\n}\n", "import { db } from '../db/db_index'\nimport { staffUsers, staffRoles, users, userDetails, orders } from '../db/schema'\nimport { eq, or, like, and, lt, desc } from 'drizzle-orm'\n\nexport interface StaffUser {\n id: number\n name: string\n password: string\n staffRoleId: number | null\n createdAt: Date\n}\n\nexport async function getStaffUserByName(name: string): Promise {\n const staff = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.name, name),\n })\n\n return staff || null\n}\n\nexport async function getStaffUserById(staffId: number): Promise {\n const staff = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.id, staffId),\n })\n\n return staff || null\n}\n\nexport async function getAllStaff(): Promise {\n const staff = await db.query.staffUsers.findMany({\n columns: {\n id: true,\n name: true,\n },\n with: {\n role: {\n with: {\n rolePermissions: {\n with: {\n permission: true,\n },\n },\n },\n },\n },\n })\n\n return staff\n}\n\nexport async function getAllUsers(\n cursor?: number,\n limit: number = 20,\n search?: string\n): Promise<{ users: any[]; hasMore: boolean }> {\n let whereCondition = undefined\n\n if (search) {\n whereCondition = or(\n like(users.name, `%${search}%`),\n like(users.email, `%${search}%`),\n like(users.mobile, `%${search}%`)\n )\n }\n\n if (cursor) {\n const cursorCondition = lt(users.id, cursor)\n whereCondition = whereCondition ? and(whereCondition, cursorCondition) : cursorCondition\n }\n\n const allUsers = await db.query.users.findMany({\n where: whereCondition,\n with: {\n userDetails: true,\n },\n orderBy: desc(users.id),\n limit: limit + 1,\n })\n\n const hasMore = allUsers.length > limit\n const usersToReturn = hasMore ? allUsers.slice(0, limit) : allUsers\n\n return { users: usersToReturn, hasMore }\n}\n\nexport async function getUserWithDetails(userId: number): Promise {\n const user = await db.query.users.findFirst({\n where: eq(users.id, userId),\n with: {\n userDetails: true,\n orders: {\n orderBy: desc(orders.createdAt),\n limit: 1,\n },\n },\n })\n\n return user || null\n}\n\nexport async function updateUserSuspensionStatus(userId: number, isSuspended: boolean): Promise {\n await db\n .insert(userDetails)\n .values({ userId, isSuspended })\n .onConflictDoUpdate({\n target: userDetails.userId,\n set: { isSuspended },\n })\n}\n\nexport async function checkStaffUserExists(name: string): Promise {\n const existingUser = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.name, name),\n })\n return !!existingUser\n}\n\nexport async function checkStaffRoleExists(roleId: number): Promise {\n const role = await db.query.staffRoles.findFirst({\n where: eq(staffRoles.id, roleId),\n })\n return !!role\n}\n\nexport async function createStaffUser(\n name: string,\n password: string,\n roleId: number\n): Promise {\n const [newUser] = await db.insert(staffUsers).values({\n name: name.trim(),\n password,\n staffRoleId: roleId,\n }).returning()\n\n return {\n id: newUser.id,\n name: newUser.name,\n password: newUser.password,\n staffRoleId: newUser.staffRoleId,\n createdAt: newUser.createdAt,\n }\n}\n\nexport async function getAllRoles(): Promise {\n const roles = await db.query.staffRoles.findMany({\n columns: {\n id: true,\n roleName: true,\n },\n })\n\n return roles\n}\n", "import { db } from '../db/db_index'\nimport { storeInfo, productInfo } from '../db/schema'\nimport { eq, inArray } from 'drizzle-orm'\n\nexport interface Store {\n id: number\n name: string\n description: string | null\n imageUrl: string | null\n owner: number\n createdAt: Date\n // updatedAt: Date\n}\n\nexport async function getAllStores(): Promise {\n const stores = await db.query.storeInfo.findMany({\n with: {\n owner: true,\n },\n })\n\n return stores\n}\n\nexport async function getStoreById(id: number): Promise {\n const store = await db.query.storeInfo.findFirst({\n where: eq(storeInfo.id, id),\n with: {\n owner: true,\n },\n })\n\n return store || null\n}\n\nexport interface CreateStoreInput {\n name: string\n description?: string\n imageUrl?: string\n owner: number\n}\n\nexport async function createStore(\n input: CreateStoreInput,\n products?: number[]\n): Promise {\n const [newStore] = await db\n .insert(storeInfo)\n .values({\n name: input.name,\n description: input.description,\n imageUrl: input.imageUrl,\n owner: input.owner,\n })\n .returning()\n\n if (products && products.length > 0) {\n await db\n .update(productInfo)\n .set({ storeId: newStore.id })\n .where(inArray(productInfo.id, products))\n }\n\n return {\n id: newStore.id,\n name: newStore.name,\n description: newStore.description,\n imageUrl: newStore.imageUrl,\n owner: newStore.owner,\n createdAt: newStore.createdAt,\n // updatedAt: newStore.updatedAt,\n }\n}\n\nexport interface UpdateStoreInput {\n name?: string\n description?: string\n imageUrl?: string\n owner?: number\n}\n\nexport async function updateStore(\n id: number,\n input: UpdateStoreInput,\n products?: number[]\n): Promise {\n const [updatedStore] = await db\n .update(storeInfo)\n .set({\n ...input,\n // updatedAt: new Date(),\n })\n .where(eq(storeInfo.id, id))\n .returning()\n\n if (!updatedStore) {\n throw new Error('Store not found')\n }\n\n if (products !== undefined) {\n await db\n .update(productInfo)\n .set({ storeId: null })\n .where(eq(productInfo.storeId, id))\n\n if (products.length > 0) {\n await db\n .update(productInfo)\n .set({ storeId: id })\n .where(inArray(productInfo.id, products))\n }\n }\n\n return {\n id: updatedStore.id,\n name: updatedStore.name,\n description: updatedStore.description,\n imageUrl: updatedStore.imageUrl,\n owner: updatedStore.owner,\n createdAt: updatedStore.createdAt,\n // updatedAt: updatedStore.updatedAt,\n }\n}\n\nexport async function deleteStore(id: number): Promise<{ message: string }> {\n return await db.transaction(async (tx) => {\n await tx\n .update(productInfo)\n .set({ storeId: null })\n .where(eq(productInfo.storeId, id))\n\n const [deletedStore] = await tx\n .delete(storeInfo)\n .where(eq(storeInfo.id, id))\n .returning()\n\n if (!deletedStore) {\n throw new Error('Store not found')\n }\n\n return {\n message: 'Store deleted successfully',\n }\n })\n}\n", "import { db } from '../db/db_index'\nimport { users, userDetails, orders, orderItems, complaints, notifCreds, unloggedUserTokens, userIncidents, orderStatus } from '../db/schema'\nimport { eq, sql, desc, asc, count, max, inArray } from 'drizzle-orm'\n\nexport async function createUserByMobile(mobile: string): Promise {\n const [newUser] = await db\n .insert(users)\n .values({\n name: null,\n email: null,\n mobile,\n })\n .returning()\n\n return newUser\n}\n\nexport async function getUserByMobile(mobile: string): Promise {\n const [existingUser] = await db\n .select()\n .from(users)\n .where(eq(users.mobile, mobile))\n .limit(1)\n\n return existingUser || null\n}\n\nexport async function getUnresolvedComplaintsCount(): Promise {\n const result = await db\n .select({ count: count(complaints.id) })\n .from(complaints)\n .where(eq(complaints.isResolved, false))\n \n return result[0]?.count || 0\n}\n\nexport async function getAllUsersWithFilters(\n limit: number,\n cursor?: number,\n search?: string\n): Promise<{ users: any[]; hasMore: boolean }> {\n const whereConditions = []\n \n if (search && search.trim()) {\n whereConditions.push(sql`${users.mobile} LIKE ${`%${search.trim()}%`}`)\n }\n \n if (cursor) {\n whereConditions.push(sql`${users.id} > ${cursor}`)\n }\n\n const usersList = await db\n .select({\n id: users.id,\n name: users.name,\n mobile: users.mobile,\n createdAt: users.createdAt,\n })\n .from(users)\n .where(whereConditions.length > 0 ? sql.join(whereConditions, sql` AND `) : undefined)\n .orderBy(asc(users.id))\n .limit(limit + 1)\n\n const hasMore = usersList.length > limit\n const usersToReturn = hasMore ? usersList.slice(0, limit) : usersList\n\n return { users: usersToReturn, hasMore }\n}\n\nexport async function getOrderCountsByUserIds(userIds: number[]): Promise<{ userId: number; totalOrders: number }[]> {\n if (userIds.length === 0) return []\n \n return await db\n .select({\n userId: orders.userId,\n totalOrders: count(orders.id),\n })\n .from(orders)\n .where(sql`${orders.userId} IN (${sql.join(userIds, sql`, `)})`)\n .groupBy(orders.userId)\n}\n\nexport async function getLastOrdersByUserIds(userIds: number[]): Promise<{ userId: number; lastOrderDate: Date | null }[]> {\n if (userIds.length === 0) return []\n \n return await db\n .select({\n userId: orders.userId,\n lastOrderDate: max(orders.createdAt),\n })\n .from(orders)\n .where(sql`${orders.userId} IN (${sql.join(userIds, sql`, `)})`)\n .groupBy(orders.userId)\n}\n\nexport async function getSuspensionStatusesByUserIds(userIds: number[]): Promise<{ userId: number; isSuspended: boolean }[]> {\n if (userIds.length === 0) return []\n \n return await db\n .select({\n userId: userDetails.userId,\n isSuspended: userDetails.isSuspended,\n })\n .from(userDetails)\n .where(sql`${userDetails.userId} IN (${sql.join(userIds, sql`, `)})`)\n}\n\nexport async function getUserBasicInfo(userId: number): Promise {\n const user = await db\n .select({\n id: users.id,\n name: users.name,\n mobile: users.mobile,\n createdAt: users.createdAt,\n })\n .from(users)\n .where(eq(users.id, userId))\n .limit(1)\n\n return user[0] || null\n}\n\nexport async function getUserSuspensionStatus(userId: number): Promise {\n const userDetail = await db\n .select({\n isSuspended: userDetails.isSuspended,\n })\n .from(userDetails)\n .where(eq(userDetails.userId, userId))\n .limit(1)\n\n return userDetail[0]?.isSuspended ?? false\n}\n\nexport async function getUserOrders(userId: number): Promise {\n return await db\n .select({\n id: orders.id,\n readableId: orders.readableId,\n totalAmount: orders.totalAmount,\n createdAt: orders.createdAt,\n isFlashDelivery: orders.isFlashDelivery,\n })\n .from(orders)\n .where(eq(orders.userId, userId))\n .orderBy(desc(orders.createdAt))\n}\n\nexport async function getOrderStatusesByOrderIds(orderIds: number[]): Promise<{ orderId: number; isDelivered: boolean; isCancelled: boolean }[]> {\n if (orderIds.length === 0) return []\n \n return await db\n .select({\n orderId: orderStatus.orderId,\n isDelivered: orderStatus.isDelivered,\n isCancelled: orderStatus.isCancelled,\n })\n .from(orderStatus)\n .where(sql`${orderStatus.orderId} IN (${sql.join(orderIds, sql`, `)})`)\n}\n\nexport async function getItemCountsByOrderIds(orderIds: number[]): Promise<{ orderId: number; itemCount: number }[]> {\n if (orderIds.length === 0) return []\n \n return await db\n .select({\n orderId: orderItems.orderId,\n itemCount: count(orderItems.id),\n })\n .from(orderItems)\n .where(sql`${orderItems.orderId} IN (${sql.join(orderIds, sql`, `)})`)\n .groupBy(orderItems.orderId)\n}\n\nexport async function upsertUserSuspension(userId: number, isSuspended: boolean): Promise {\n const existingDetail = await db\n .select({ id: userDetails.id })\n .from(userDetails)\n .where(eq(userDetails.userId, userId))\n .limit(1)\n\n if (existingDetail.length > 0) {\n await db\n .update(userDetails)\n .set({ isSuspended })\n .where(eq(userDetails.userId, userId))\n } else {\n await db\n .insert(userDetails)\n .values({\n userId,\n isSuspended,\n })\n }\n}\n\nexport async function searchUsers(search?: string): Promise {\n if (search && search.trim()) {\n return await db\n .select({\n id: users.id,\n name: users.name,\n mobile: users.mobile,\n })\n .from(users)\n .where(sql`${users.mobile} LIKE ${`%${search.trim()}%`} OR ${users.name} LIKE ${`%${search.trim()}%`}`)\n } else {\n return await db\n .select({\n id: users.id,\n name: users.name,\n mobile: users.mobile,\n })\n .from(users)\n }\n}\n\nexport async function getAllNotifCreds(): Promise<{ userId: number, token: string }[]> {\n return await db\n .select({ userId: notifCreds.userId, token: notifCreds.token })\n .from(notifCreds)\n}\n\nexport async function getAllUnloggedTokens(): Promise<{ token: string }[]> {\n return await db\n .select({ token: unloggedUserTokens.token })\n .from(unloggedUserTokens)\n}\n\nexport async function getNotifTokensByUserIds(userIds: number[]): Promise<{ token: string }[]> {\n return await db\n .select({ token: notifCreds.token })\n .from(notifCreds)\n .where(inArray(notifCreds.userId, userIds))\n}\n\nexport async function getUserIncidentsWithRelations(userId: number): Promise {\n return await db.query.userIncidents.findMany({\n where: eq(userIncidents.userId, userId),\n with: {\n order: {\n with: {\n orderStatus: true,\n },\n },\n addedBy: true,\n },\n orderBy: desc(userIncidents.dateAdded),\n })\n}\n\nexport async function createUserIncident(\n userId: number,\n orderId: number | undefined,\n adminComment: string | undefined,\n adminUserId: number,\n negativityScore: number | undefined\n): Promise {\n const [incident] = await db.insert(userIncidents)\n .values({\n userId,\n orderId,\n adminComment,\n addedBy: adminUserId,\n negativityScore,\n })\n .returning()\n\n return incident\n}\n", "import { db } from '../db/db_index'\nimport { vendorSnippets, deliverySlotInfo, productInfo, orders, orderItems, orderStatus } from '../db/schema'\nimport { desc, eq, inArray } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type {\n AdminDeliverySlot,\n AdminVendorSnippet,\n AdminVendorSnippetWithSlot,\n AdminVendorSnippetProduct,\n AdminVendorUpdatePackagingResult,\n} from '@packages/shared'\n\ntype VendorSnippetRow = InferSelectModel\ntype DeliverySlotRow = InferSelectModel\ntype ProductRow = InferSelectModel\n\nconst mapVendorSnippet = (snippet: VendorSnippetRow): AdminVendorSnippet => ({\n id: snippet.id,\n snippetCode: snippet.snippetCode,\n slotId: snippet.slotId ?? null,\n productIds: snippet.productIds || [],\n isPermanent: snippet.isPermanent,\n validTill: snippet.validTill ?? null,\n createdAt: snippet.createdAt,\n})\n\nconst mapDeliverySlot = (slot: DeliverySlotRow): AdminDeliverySlot => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isFlash: slot.isFlash,\n isCapacityFull: slot.isCapacityFull,\n deliverySequence: slot.deliverySequence,\n groupIds: slot.groupIds,\n})\n\nconst mapProductSummary = (product: { id: number; name: string }): AdminVendorSnippetProduct => ({\n id: product.id,\n name: product.name,\n})\n\nexport async function checkVendorSnippetExists(snippetCode: string): Promise {\n const existingSnippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n })\n return !!existingSnippet\n}\n\nexport async function getVendorSnippetById(id: number): Promise {\n const snippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.id, id),\n with: {\n slot: true,\n },\n })\n\n if (!snippet) {\n return null\n }\n\n return {\n ...mapVendorSnippet(snippet),\n slot: snippet.slot ? mapDeliverySlot(snippet.slot) : null,\n }\n}\n\nexport async function getVendorSnippetByCode(snippetCode: string): Promise {\n const snippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n })\n\n return snippet ? mapVendorSnippet(snippet) : null\n}\n\nexport async function getAllVendorSnippets(): Promise {\n const snippets = await db.query.vendorSnippets.findMany({\n with: {\n slot: true,\n },\n orderBy: desc(vendorSnippets.createdAt),\n })\n\n return snippets.map((snippet: VendorSnippetRow & { slot: DeliverySlotRow | null }) => ({\n ...mapVendorSnippet(snippet),\n slot: snippet.slot ? mapDeliverySlot(snippet.slot) : null,\n }))\n}\n\nexport async function createVendorSnippet(input: {\n snippetCode: string\n slotId?: number\n productIds: number[]\n isPermanent: boolean\n validTill?: Date\n}): Promise {\n const [result] = await db.insert(vendorSnippets).values({\n snippetCode: input.snippetCode,\n slotId: input.slotId,\n productIds: input.productIds,\n isPermanent: input.isPermanent,\n validTill: input.validTill,\n }).returning()\n\n return mapVendorSnippet(result)\n}\n\nexport async function updateVendorSnippet(id: number, updates: {\n snippetCode?: string\n slotId?: number | null\n productIds?: number[]\n isPermanent?: boolean\n validTill?: Date | null\n}): Promise {\n const [result] = await db.update(vendorSnippets)\n .set(updates)\n .where(eq(vendorSnippets.id, id))\n .returning()\n\n return result ? mapVendorSnippet(result) : null\n}\n\nexport async function deleteVendorSnippet(id: number): Promise {\n const [result] = await db.delete(vendorSnippets)\n .where(eq(vendorSnippets.id, id))\n .returning()\n\n return result ? mapVendorSnippet(result) : null\n}\n\nexport async function getProductsByIds(productIds: number[]): Promise {\n const products = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, productIds),\n columns: { id: true, name: true },\n })\n\n const prods = products.map(mapProductSummary)\n return prods\n}\n\nexport async function getVendorSlotById(slotId: number): Promise {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n })\n\n return slot ? mapDeliverySlot(slot) : null\n}\n\nexport async function getVendorOrdersBySlotId(slotId: number) {\n return await db.query.orders.findMany({\n where: eq(orders.slotId, slotId),\n with: {\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n user: true,\n slot: true,\n },\n orderBy: desc(orders.createdAt),\n })\n}\n\nexport async function getVendorOrders() {\n return await db.query.orders.findMany({\n with: {\n user: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n },\n orderBy: desc(orders.createdAt),\n })\n}\n\nexport async function getOrderItemsByOrderIds(orderIds: number[]) {\n return await db.query.orderItems.findMany({\n where: inArray(orderItems.orderId, orderIds),\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n })\n}\n\nexport async function getOrderStatusByOrderIds(orderIds: number[]) {\n return await db.query.orderStatus.findMany({\n where: inArray(orderStatus.orderId, orderIds),\n })\n}\n\nexport async function updateVendorOrderItemPackaging(\n orderItemId: number,\n isPackaged: boolean\n): Promise {\n const orderItem = await db.query.orderItems.findFirst({\n where: eq(orderItems.id, orderItemId),\n with: {\n order: {\n with: {\n slot: true,\n },\n },\n },\n })\n\n if (!orderItem) {\n return { success: false, message: 'Order item not found' }\n }\n\n if (!orderItem.order.slotId) {\n return { success: false, message: 'Order item not associated with a vendor slot' }\n }\n\n const snippetExists = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.slotId, orderItem.order.slotId),\n })\n\n if (!snippetExists) {\n return { success: false, message: \"No vendor snippet found for this order's slot\" }\n }\n\n const [updatedItem] = await db.update(orderItems)\n .set({\n is_packaged: isPackaged,\n })\n .where(eq(orderItems.id, orderItemId))\n .returning({ id: orderItems.id })\n\n if (!updatedItem) {\n return { success: false, message: 'Failed to update packaging status' }\n }\n\n return { success: true, orderItemId, is_packaged: isPackaged }\n}\n", "import { db } from '../db/db_index'\nimport { addresses, deliverySlotInfo, orders, orderStatus } from '../db/schema'\nimport { and, eq, gte } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserAddress } from '@packages/shared'\n\ntype AddressRow = InferSelectModel\n\nconst mapUserAddress = (address: AddressRow): UserAddress => ({\n id: address.id,\n userId: address.userId,\n name: address.name,\n phone: address.phone,\n addressLine1: address.addressLine1,\n addressLine2: address.addressLine2 ?? null,\n city: address.city,\n state: address.state,\n pincode: address.pincode,\n isDefault: address.isDefault,\n latitude: address.latitude ?? null,\n longitude: address.longitude ?? null,\n googleMapsUrl: address.googleMapsUrl ?? null,\n adminLatitude: address.adminLatitude ?? null,\n adminLongitude: address.adminLongitude ?? null,\n zoneId: address.zoneId ?? null,\n createdAt: address.createdAt,\n})\n\nexport async function getDefaultAddress(userId: number): Promise {\n const [defaultAddress] = await db\n .select()\n .from(addresses)\n .where(and(eq(addresses.userId, userId), eq(addresses.isDefault, true)))\n .limit(1)\n\n return defaultAddress ? mapUserAddress(defaultAddress) : null\n}\n\nexport async function getUserAddresses(userId: number): Promise {\n const userAddresses = await db.select().from(addresses).where(eq(addresses.userId, userId))\n return userAddresses.map(mapUserAddress)\n}\n\nexport async function getUserAddressById(userId: number, addressId: number): Promise {\n const [address] = await db\n .select()\n .from(addresses)\n .where(and(eq(addresses.id, addressId), eq(addresses.userId, userId)))\n .limit(1)\n\n return address ? mapUserAddress(address) : null\n}\n\nexport async function clearDefaultAddress(userId: number): Promise {\n await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId))\n}\n\nexport async function createUserAddress(input: {\n userId: number\n name: string\n phone: string\n addressLine1: string\n addressLine2?: string\n city: string\n state: string\n pincode: string\n isDefault: boolean\n latitude?: number\n longitude?: number\n googleMapsUrl?: string\n}): Promise {\n const [newAddress] = await db.insert(addresses).values({\n userId: input.userId,\n name: input.name,\n phone: input.phone,\n addressLine1: input.addressLine1,\n addressLine2: input.addressLine2,\n city: input.city,\n state: input.state,\n pincode: input.pincode,\n isDefault: input.isDefault,\n latitude: input.latitude,\n longitude: input.longitude,\n googleMapsUrl: input.googleMapsUrl,\n }).returning()\n\n return mapUserAddress(newAddress)\n}\n\nexport async function updateUserAddress(input: {\n userId: number\n addressId: number\n name: string\n phone: string\n addressLine1: string\n addressLine2?: string\n city: string\n state: string\n pincode: string\n isDefault: boolean\n latitude?: number\n longitude?: number\n googleMapsUrl?: string\n}): Promise {\n const [updatedAddress] = await db.update(addresses)\n .set({\n name: input.name,\n phone: input.phone,\n addressLine1: input.addressLine1,\n addressLine2: input.addressLine2,\n city: input.city,\n state: input.state,\n pincode: input.pincode,\n isDefault: input.isDefault,\n googleMapsUrl: input.googleMapsUrl,\n latitude: input.latitude,\n longitude: input.longitude,\n })\n .where(and(eq(addresses.id, input.addressId), eq(addresses.userId, input.userId)))\n .returning()\n\n return updatedAddress ? mapUserAddress(updatedAddress) : null\n}\n\nexport async function deleteUserAddress(userId: number, addressId: number): Promise {\n const [deleted] = await db.delete(addresses)\n .where(and(eq(addresses.id, addressId), eq(addresses.userId, userId)))\n .returning({ id: addresses.id })\n\n return !!deleted\n}\n\nexport async function hasOngoingOrdersForAddress(addressId: number): Promise {\n const ongoingOrders = await db.select({\n orderId: orders.id,\n })\n .from(orders)\n .innerJoin(orderStatus, eq(orders.id, orderStatus.orderId))\n .innerJoin(deliverySlotInfo, eq(orders.slotId, deliverySlotInfo.id))\n .where(and(\n eq(orders.addressId, addressId),\n eq(orderStatus.isCancelled, false),\n gte(deliverySlotInfo.deliveryTime, new Date())\n ))\n .limit(1)\n\n return ongoingOrders.length > 0\n}\n", "import { db } from '../db/db_index'\nimport { homeBanners } from '../db/schema'\nimport { asc, isNotNull } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserBanner } from '@packages/shared'\n\ntype BannerRow = InferSelectModel\n\nconst mapBanner = (banner: BannerRow): UserBanner => ({\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description ?? null,\n productIds: banner.productIds ?? null,\n redirectUrl: banner.redirectUrl ?? null,\n serialNum: banner.serialNum ?? null,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n})\n\nexport async function getActiveBanners(): Promise {\n const banners = await db.query.homeBanners.findMany({\n where: isNotNull(homeBanners.serialNum),\n orderBy: asc(homeBanners.serialNum),\n })\n\n return banners.map(mapBanner)\n}\n", "import { db } from '../db/db_index'\nimport { cartItems, productInfo, units } from '../db/schema'\nimport { and, eq, sql } from 'drizzle-orm'\nimport type { UserCartItem } from '@packages/shared'\n\nconst getStringArray = (value: unknown): string[] => {\n if (!Array.isArray(value)) return []\n return value.map((item) => String(item))\n}\n\nexport async function getCartItemsWithProducts(userId: number): Promise {\n const cartItemsWithProducts = await db\n .select({\n cartId: cartItems.id,\n productId: productInfo.id,\n productName: productInfo.name,\n productPrice: productInfo.price,\n productImages: productInfo.images,\n productQuantity: productInfo.productQuantity,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n quantity: cartItems.quantity,\n addedAt: cartItems.addedAt,\n })\n .from(cartItems)\n .innerJoin(productInfo, eq(cartItems.productId, productInfo.id))\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(eq(cartItems.userId, userId))\n\n return cartItemsWithProducts.map((item) => {\n const priceValue = item.productPrice ?? '0'\n const quantityValue = item.quantity ?? '0'\n return {\n id: item.cartId,\n productId: item.productId,\n quantity: parseFloat(quantityValue),\n addedAt: item.addedAt,\n product: {\n id: item.productId,\n name: item.productName,\n price: priceValue.toString(),\n productQuantity: item.productQuantity,\n unit: item.unitShortNotation,\n isOutOfStock: item.isOutOfStock,\n images: getStringArray(item.productImages),\n },\n subtotal: parseFloat(priceValue.toString()) * parseFloat(quantityValue),\n }\n })\n}\n\nexport async function getProductById(productId: number) {\n return db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n })\n}\n\nexport async function getCartItemByUserProduct(userId: number, productId: number) {\n return db.query.cartItems.findFirst({\n where: and(eq(cartItems.userId, userId), eq(cartItems.productId, productId)),\n })\n}\n\nexport async function incrementCartItemQuantity(itemId: number, quantity: number): Promise {\n await db.update(cartItems)\n .set({\n quantity: sql`${cartItems.quantity} + ${quantity}`,\n })\n .where(eq(cartItems.id, itemId))\n}\n\nexport async function insertCartItem(userId: number, productId: number, quantity: number): Promise {\n await db.insert(cartItems).values({\n userId,\n productId,\n quantity: quantity.toString(),\n })\n}\n\nexport async function updateCartItemQuantity(userId: number, itemId: number, quantity: number) {\n const [updatedItem] = await db.update(cartItems)\n .set({ quantity: quantity.toString() })\n .where(and(eq(cartItems.id, itemId), eq(cartItems.userId, userId)))\n .returning({ id: cartItems.id })\n\n return !!updatedItem\n}\n\nexport async function deleteCartItem(userId: number, itemId: number): Promise {\n const [deletedItem] = await db.delete(cartItems)\n .where(and(eq(cartItems.id, itemId), eq(cartItems.userId, userId)))\n .returning({ id: cartItems.id })\n\n return !!deletedItem\n}\n\nexport async function clearUserCart(userId: number): Promise {\n await db.delete(cartItems).where(eq(cartItems.userId, userId))\n}\n", "import { db } from '../db/db_index'\nimport { complaints } from '../db/schema'\nimport { asc, eq } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserComplaint } from '@packages/shared'\n\ntype ComplaintRow = InferSelectModel\n\nexport async function getUserComplaints(userId: number): Promise {\n const userComplaints = await db\n .select({\n id: complaints.id,\n complaintBody: complaints.complaintBody,\n response: complaints.response,\n isResolved: complaints.isResolved,\n createdAt: complaints.createdAt,\n orderId: complaints.orderId,\n })\n .from(complaints)\n .where(eq(complaints.userId, userId))\n .orderBy(asc(complaints.createdAt))\n\n return userComplaints.map((complaint) => ({\n id: complaint.id,\n complaintBody: complaint.complaintBody,\n response: complaint.response ?? null,\n isResolved: complaint.isResolved,\n createdAt: complaint.createdAt,\n orderId: complaint.orderId ?? null,\n }))\n}\n\nexport async function createComplaint(\n userId: number,\n orderId: number | null,\n complaintBody: string,\n images?: string[] | null\n): Promise {\n await db.insert(complaints).values({\n userId,\n orderId,\n complaintBody,\n images: images || null,\n })\n}\n", "import { db } from '../db/db_index'\nimport { productInfo, storeInfo, units } from '../db/schema'\nimport { and, eq, sql } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserStoreDetailData, UserStoreProductData, UserStoreSummaryData, StoreSummary } from '@packages/shared'\n\ntype StoreRow = InferSelectModel\ntype StoreProductRow = {\n id: number\n name: string\n shortDescription: string | null\n price: string | null\n marketPrice: string | null\n images: unknown\n isOutOfStock: boolean\n incrementStep: number\n unitShortNotation: string\n productQuantity: number\n}\n\nconst getStringArray = (value: unknown): string[] | null => {\n if (!Array.isArray(value)) return null\n return value.map((item) => String(item))\n}\n\nexport async function getStoreSummaries(): Promise {\n const storesData = await db\n .select({\n id: storeInfo.id,\n name: storeInfo.name,\n description: storeInfo.description,\n imageUrl: storeInfo.imageUrl,\n productCount: sql`count(${productInfo.id})`.as('productCount'),\n })\n .from(storeInfo)\n .leftJoin(\n productInfo,\n and(eq(productInfo.storeId, storeInfo.id), eq(productInfo.isSuspended, false))\n )\n .groupBy(storeInfo.id)\n\n const storesWithDetails = await Promise.all(\n storesData.map(async (store) => {\n const sampleProducts = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n images: productInfo.images,\n })\n .from(productInfo)\n .where(and(eq(productInfo.storeId, store.id), eq(productInfo.isSuspended, false)))\n .limit(3)\n\n return {\n id: store.id,\n name: store.name,\n description: store.description ?? null,\n imageUrl: store.imageUrl ?? null,\n productCount: store.productCount || 0,\n sampleProducts: sampleProducts.map((product) => ({\n id: product.id,\n name: product.name,\n images: getStringArray(product.images),\n })),\n }\n })\n )\n\n return storesWithDetails\n}\n\nexport async function getStoreDetail(storeId: number): Promise {\n const storeData = await db.query.storeInfo.findFirst({\n where: eq(storeInfo.id, storeId),\n columns: {\n id: true,\n name: true,\n description: true,\n imageUrl: true,\n },\n })\n\n if (!storeData) {\n return null\n }\n\n const productsData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n incrementStep: productInfo.incrementStep,\n unitShortNotation: units.shortNotation,\n productQuantity: productInfo.productQuantity,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(and(eq(productInfo.storeId, storeId), eq(productInfo.isSuspended, false)))\n\n const products = productsData.map((product: StoreProductRow): UserStoreProductData => ({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription ?? null,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n incrementStep: product.incrementStep,\n unit: product.unitShortNotation,\n unitNotation: product.unitShortNotation,\n images: getStringArray(product.images),\n isOutOfStock: product.isOutOfStock,\n productQuantity: product.productQuantity,\n }))\n\n return {\n store: {\n id: storeData.id,\n name: storeData.name,\n description: storeData.description ?? null,\n imageUrl: storeData.imageUrl ?? null,\n },\n products,\n }\n}\n\n/**\n * Get simple store summary (id, name, description only)\n * Used for common API endpoints\n */\nexport async function getStoresSummary(): Promise {\n return db.query.storeInfo.findMany({\n columns: {\n id: true,\n name: true,\n description: true,\n },\n })\n}\n", "import { db } from '../db/db_index'\nimport { deliverySlotInfo, productInfo, productReviews, productSlots, productTags, specialDeals, storeInfo, units, users } from '../db/schema'\nimport { and, desc, eq, gt, inArray, sql } from 'drizzle-orm'\nimport type { UserProductDetailData, UserProductReview } from '@packages/shared'\n\nconst getStringArray = (value: unknown): string[] | null => {\n if (!Array.isArray(value)) return null\n return value.map((item) => String(item))\n}\n\nexport async function getProductDetailById(productId: number): Promise {\n const productData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n longDescription: productInfo.longDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n storeId: productInfo.storeId,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n productQuantity: productInfo.productQuantity,\n isFlashAvailable: productInfo.isFlashAvailable,\n flashPrice: productInfo.flashPrice,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(eq(productInfo.id, productId))\n .limit(1)\n\n if (productData.length === 0) {\n return null\n }\n\n const product = productData[0]\n\n const storeData = product.storeId ? await db.query.storeInfo.findFirst({\n where: eq(storeInfo.id, product.storeId),\n columns: { id: true, name: true, description: true },\n }) : null\n\n const deliverySlotsData = await db\n .select({\n id: deliverySlotInfo.id,\n deliveryTime: deliverySlotInfo.deliveryTime,\n freezeTime: deliverySlotInfo.freezeTime,\n })\n .from(productSlots)\n .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n .where(\n and(\n eq(productSlots.productId, productId),\n eq(deliverySlotInfo.isActive, true),\n eq(deliverySlotInfo.isCapacityFull, false),\n gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`),\n gt(deliverySlotInfo.freezeTime, sql`CURRENT_TIMESTAMP`)\n )\n )\n .orderBy(deliverySlotInfo.deliveryTime)\n\n const specialDealsData = await db\n .select({\n quantity: specialDeals.quantity,\n price: specialDeals.price,\n validTill: specialDeals.validTill,\n })\n .from(specialDeals)\n .where(\n and(\n eq(specialDeals.productId, productId),\n gt(specialDeals.validTill, sql`CURRENT_TIMESTAMP`)\n )\n )\n .orderBy(specialDeals.quantity)\n\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription ?? null,\n longDescription: product.longDescription ?? null,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n unitNotation: product.unitShortNotation,\n images: getStringArray(product.images),\n isOutOfStock: product.isOutOfStock,\n store: storeData ? {\n id: storeData.id,\n name: storeData.name,\n description: storeData.description ?? null,\n } : null,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n isFlashAvailable: product.isFlashAvailable,\n flashPrice: product.flashPrice?.toString() || null,\n deliverySlots: deliverySlotsData,\n specialDeals: specialDealsData.map((deal) => ({\n quantity: String(deal.quantity ?? '0'),\n price: String(deal.price ?? '0'),\n validTill: deal.validTill,\n })),\n }\n}\n\nexport async function getProductReviews(productId: number, limit: number, offset: number) {\n const reviews = await db\n .select({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n userName: users.name,\n })\n .from(productReviews)\n .innerJoin(users, eq(productReviews.userId, users.id))\n .where(eq(productReviews.productId, productId))\n .orderBy(desc(productReviews.reviewTime))\n .limit(limit)\n .offset(offset)\n\n const totalCountResult = await db\n .select({ count: sql`count(*)` })\n .from(productReviews)\n .where(eq(productReviews.productId, productId))\n\n const totalCount = Number(totalCountResult[0].count)\n\n const mappedReviews: UserProductReview[] = reviews.map((review) => ({\n id: review.id,\n reviewBody: review.reviewBody,\n ratings: review.ratings,\n imageUrls: getStringArray(review.imageUrls),\n reviewTime: review.reviewTime,\n userName: review.userName ?? null,\n }))\n\n return {\n reviews: mappedReviews,\n totalCount,\n }\n}\n\nexport async function getProductById(productId: number) {\n return db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n })\n}\n\nexport async function createProductReview(\n userId: number,\n productId: number,\n reviewBody: string,\n ratings: number,\n imageUrls: string[]\n): Promise {\n const [newReview] = await db.insert(productReviews).values({\n userId,\n productId,\n reviewBody,\n ratings,\n imageUrls,\n }).returning({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n })\n\n return {\n id: newReview.id,\n reviewBody: newReview.reviewBody,\n ratings: newReview.ratings,\n imageUrls: getStringArray(newReview.imageUrls),\n reviewTime: newReview.reviewTime,\n userName: null,\n }\n}\n\nexport interface ProductSummaryData {\n id: number\n name: string\n shortDescription: string | null\n price: string\n marketPrice: string | null\n images: unknown\n isOutOfStock: boolean\n unitShortNotation: string\n productQuantity: number\n}\n\nexport async function getAllProductsWithUnits(tagId?: number): Promise {\n let productIds: number[] | null = null\n\n // If tagId is provided, get products that have this tag\n if (tagId) {\n const taggedProducts = await db\n .select({ productId: productTags.productId })\n .from(productTags)\n .where(eq(productTags.tagId, tagId))\n\n productIds = taggedProducts.map(tp => tp.productId)\n }\n\n let whereCondition = undefined\n\n // Filter by product IDs if tag filtering is applied\n if (productIds && productIds.length > 0) {\n whereCondition = inArray(productInfo.id, productIds)\n }\n\n const results = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n productQuantity: productInfo.productQuantity,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(whereCondition)\n\n return results.map((product) => ({\n ...product,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n }))\n}\n\n/**\n * Get all suspended product IDs\n */\nexport async function getSuspendedProductIds(): Promise {\n const suspendedProducts = await db\n .select({ id: productInfo.id })\n .from(productInfo)\n .where(eq(productInfo.isSuspended, true))\n\n return suspendedProducts.map(sp => sp.id)\n}\n\n/**\n * Get next delivery date for a product (with capacity check)\n * This version filters by both isActive AND isCapacityFull\n */\nexport async function getNextDeliveryDateWithCapacity(productId: number): Promise {\n const result = await db\n .select({ deliveryTime: deliverySlotInfo.deliveryTime })\n .from(productSlots)\n .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n .where(\n and(\n eq(productSlots.productId, productId),\n eq(deliverySlotInfo.isActive, true),\n eq(deliverySlotInfo.isCapacityFull, false),\n gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`)\n )\n )\n .orderBy(deliverySlotInfo.deliveryTime)\n .limit(1)\n\n return result[0]?.deliveryTime || null\n}\n", "import { db } from '../db/db_index'\nimport { deliverySlotInfo, productInfo } from '../db/schema'\nimport { asc, eq } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserDeliverySlot, UserSlotAvailability } from '@packages/shared'\n\ntype SlotRow = InferSelectModel\n\nconst mapSlot = (slot: SlotRow): UserDeliverySlot => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isFlash: slot.isFlash,\n isCapacityFull: slot.isCapacityFull,\n deliverySequence: slot.deliverySequence,\n groupIds: slot.groupIds,\n})\n\nexport async function getActiveSlotsList(): Promise {\n const slots = await db.query.deliverySlotInfo.findMany({\n where: eq(deliverySlotInfo.isActive, true),\n orderBy: asc(deliverySlotInfo.deliveryTime),\n })\n\n return slots.map(mapSlot)\n}\n\nexport async function getProductAvailability(): Promise {\n const products = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n isOutOfStock: productInfo.isOutOfStock,\n isFlashAvailable: productInfo.isFlashAvailable,\n })\n .from(productInfo)\n .where(eq(productInfo.isSuspended, false))\n\n return products.map((product) => ({\n id: product.id,\n name: product.name,\n isOutOfStock: product.isOutOfStock,\n isFlashAvailable: product.isFlashAvailable,\n }))\n}\n", "import { db } from '../db/db_index'\nimport { orders, payments, orderStatus } from '../db/schema'\nimport { eq } from 'drizzle-orm'\n\nexport async function getOrderById(orderId: number) {\n return db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n })\n}\n\nexport async function getPaymentByOrderId(orderId: number) {\n return db.query.payments.findFirst({\n where: eq(payments.orderId, orderId),\n })\n}\n\nexport async function getPaymentByMerchantOrderId(merchantOrderId: string) {\n return db.query.payments.findFirst({\n where: eq(payments.merchantOrderId, merchantOrderId),\n })\n}\n\nexport async function updatePaymentSuccess(merchantOrderId: string, payload: unknown) {\n const [updatedPayment] = await db\n .update(payments)\n .set({\n status: 'success',\n payload,\n })\n .where(eq(payments.merchantOrderId, merchantOrderId))\n .returning({\n id: payments.id,\n orderId: payments.orderId,\n })\n\n return updatedPayment || null\n}\n\nexport async function updateOrderPaymentStatus(orderId: number, status: 'pending' | 'success' | 'cod' | 'failed') {\n await db\n .update(orderStatus)\n .set({ paymentStatus: status })\n .where(eq(orderStatus.orderId, orderId))\n}\n\nexport async function markPaymentFailed(paymentId: number) {\n await db\n .update(payments)\n .set({ status: 'failed' })\n .where(eq(payments.id, paymentId))\n}\n", "import { db } from '../db/db_index'\nimport {\n users,\n userCreds,\n userDetails,\n addresses,\n cartItems,\n complaints,\n couponApplicableUsers,\n couponUsage,\n notifCreds,\n notifications,\n orderItems,\n orderStatus,\n orders,\n payments,\n refunds,\n productReviews,\n reservedCoupons,\n} from '../db/schema'\nimport { eq } from 'drizzle-orm'\n\nexport async function getUserByEmail(email: string) {\n const [user] = await db.select().from(users).where(eq(users.email, email)).limit(1)\n return user || null\n}\n\nexport async function getUserByMobile(mobile: string) {\n const [user] = await db.select().from(users).where(eq(users.mobile, mobile)).limit(1)\n return user || null\n}\n\nexport async function getUserById(userId: number) {\n const [user] = await db.select().from(users).where(eq(users.id, userId)).limit(1)\n return user || null\n}\n\nexport async function getUserCreds(userId: number) {\n const [creds] = await db.select().from(userCreds).where(eq(userCreds.userId, userId)).limit(1)\n return creds || null\n}\n\nexport async function getUserDetails(userId: number) {\n const [details] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1)\n return details || null\n}\n\nexport async function isUserSuspended(userId: number): Promise {\n const details = await getUserDetails(userId)\n return details?.isSuspended ?? false\n}\n\nexport async function createUserWithProfile(input: {\n name: string\n email: string\n mobile: string\n hashedPassword: string\n profileImage?: string | null\n}) {\n return db.transaction(async (tx) => {\n // Create user\n const [user] = await tx.insert(users).values({\n name: input.name,\n email: input.email,\n mobile: input.mobile,\n }).returning()\n\n // Create user credentials\n await tx.insert(userCreds).values({\n userId: user.id,\n userPassword: input.hashedPassword,\n })\n\n // Create user details with profile image\n await tx.insert(userDetails).values({\n userId: user.id,\n profileImage: input.profileImage || null,\n })\n\n return user\n })\n}\n\nexport async function getUserDetailsByUserId(userId: number) {\n const [details] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1)\n return details || null\n}\n\nexport async function updateUserProfile(userId: number, data: {\n name?: string\n email?: string\n mobile?: string\n hashedPassword?: string\n profileImage?: string\n bio?: string\n dateOfBirth?: Date | null\n gender?: string\n occupation?: string\n}) {\n return db.transaction(async (tx) => {\n // Update user table\n const userUpdate: any = {}\n if (data.name !== undefined) userUpdate.name = data.name\n if (data.email !== undefined) userUpdate.email = data.email\n if (data.mobile !== undefined) userUpdate.mobile = data.mobile\n\n if (Object.keys(userUpdate).length > 0) {\n await tx.update(users).set(userUpdate).where(eq(users.id, userId))\n }\n\n // Update password if provided\n if (data.hashedPassword) {\n await tx.update(userCreds).set({\n userPassword: data.hashedPassword,\n }).where(eq(userCreds.userId, userId))\n }\n\n // Update or insert user details\n const detailsUpdate: any = {}\n if (data.bio !== undefined) detailsUpdate.bio = data.bio\n if (data.dateOfBirth !== undefined) detailsUpdate.dateOfBirth = data.dateOfBirth\n if (data.gender !== undefined) detailsUpdate.gender = data.gender\n if (data.occupation !== undefined) detailsUpdate.occupation = data.occupation\n if (data.profileImage !== undefined) detailsUpdate.profileImage = data.profileImage\n detailsUpdate.updatedAt = new Date()\n\n const [existingDetails] = await tx.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1)\n\n if (existingDetails) {\n await tx.update(userDetails).set(detailsUpdate).where(eq(userDetails.userId, userId))\n } else {\n await tx.insert(userDetails).values({\n userId,\n ...detailsUpdate,\n createdAt: new Date(),\n })\n }\n\n // Return updated user\n const [user] = await tx.select().from(users).where(eq(users.id, userId)).limit(1)\n return user\n })\n}\n\nexport async function createUserWithCreds(input: {\n name: string\n email: string\n mobile: string\n hashedPassword: string\n}) {\n return db.transaction(async (tx) => {\n const [user] = await tx.insert(users).values({\n name: input.name,\n email: input.email,\n mobile: input.mobile,\n }).returning()\n\n await tx.insert(userCreds).values({\n userId: user.id,\n userPassword: input.hashedPassword,\n })\n\n return user\n })\n}\n\nexport async function createUserWithMobile(mobile: string) {\n const [user] = await db.insert(users).values({\n name: null,\n email: null,\n mobile,\n }).returning()\n\n return user\n}\n\nexport async function upsertUserPassword(userId: number, hashedPassword: string) {\n try {\n await db.insert(userCreds).values({\n userId,\n userPassword: hashedPassword,\n })\n return\n } catch (error: any) {\n if (error.code === '23505') {\n await db.update(userCreds).set({\n userPassword: hashedPassword,\n }).where(eq(userCreds.userId, userId))\n return\n }\n throw error\n }\n}\n\nexport async function deleteUserAccount(userId: number) {\n await db.transaction(async (tx) => {\n await tx.delete(notifCreds).where(eq(notifCreds.userId, userId))\n await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.userId, userId))\n await tx.delete(couponUsage).where(eq(couponUsage.userId, userId))\n await tx.delete(complaints).where(eq(complaints.userId, userId))\n await tx.delete(cartItems).where(eq(cartItems.userId, userId))\n await tx.delete(notifications).where(eq(notifications.userId, userId))\n await tx.delete(productReviews).where(eq(productReviews.userId, userId))\n\n await tx.update(reservedCoupons)\n .set({ redeemedBy: null })\n .where(eq(reservedCoupons.redeemedBy, userId))\n\n const userOrders = await tx\n .select({ id: orders.id })\n .from(orders)\n .where(eq(orders.userId, userId))\n\n for (const order of userOrders) {\n await tx.delete(orderItems).where(eq(orderItems.orderId, order.id))\n await tx.delete(orderStatus).where(eq(orderStatus.orderId, order.id))\n await tx.delete(payments).where(eq(payments.orderId, order.id))\n await tx.delete(refunds).where(eq(refunds.orderId, order.id))\n await tx.delete(couponUsage).where(eq(couponUsage.orderId, order.id))\n await tx.delete(complaints).where(eq(complaints.orderId, order.id))\n }\n\n await tx.delete(orders).where(eq(orders.userId, userId))\n await tx.delete(addresses).where(eq(addresses.userId, userId))\n await tx.delete(userDetails).where(eq(userDetails.userId, userId))\n await tx.delete(userCreds).where(eq(userCreds.userId, userId))\n await tx.delete(users).where(eq(users.id, userId))\n })\n}\n", "import { db } from '../db/db_index'\nimport {\n couponApplicableProducts,\n couponApplicableUsers,\n couponUsage,\n coupons,\n reservedCoupons,\n} from '../db/schema'\nimport { and, eq, gt, isNull, or } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserCoupon, UserCouponApplicableProduct, UserCouponApplicableUser, UserCouponUsage, UserCouponWithRelations } from '@packages/shared'\n\ntype CouponRow = InferSelectModel\ntype CouponUsageRow = InferSelectModel\ntype CouponApplicableUserRow = InferSelectModel\ntype CouponApplicableProductRow = InferSelectModel\ntype ReservedCouponRow = InferSelectModel\n\nconst mapCoupon = (coupon: CouponRow): UserCoupon => ({\n id: coupon.id,\n couponCode: coupon.couponCode,\n isUserBased: coupon.isUserBased,\n discountPercent: coupon.discountPercent ? coupon.discountPercent.toString() : null,\n flatDiscount: coupon.flatDiscount ? coupon.flatDiscount.toString() : null,\n minOrder: coupon.minOrder ? coupon.minOrder.toString() : null,\n productIds: coupon.productIds,\n maxValue: coupon.maxValue ? coupon.maxValue.toString() : null,\n isApplyForAll: coupon.isApplyForAll,\n validTill: coupon.validTill ?? null,\n maxLimitForUser: coupon.maxLimitForUser ?? null,\n isInvalidated: coupon.isInvalidated,\n exclusiveApply: coupon.exclusiveApply,\n createdAt: coupon.createdAt,\n})\n\nconst mapUsage = (usage: CouponUsageRow): UserCouponUsage => ({\n id: usage.id,\n userId: usage.userId,\n couponId: usage.couponId,\n orderId: usage.orderId ?? null,\n orderItemId: usage.orderItemId ?? null,\n usedAt: usage.usedAt,\n})\n\nconst mapApplicableUser = (applicable: CouponApplicableUserRow): UserCouponApplicableUser => ({\n id: applicable.id,\n couponId: applicable.couponId,\n userId: applicable.userId,\n})\n\nconst mapApplicableProduct = (applicable: CouponApplicableProductRow): UserCouponApplicableProduct => ({\n id: applicable.id,\n couponId: applicable.couponId,\n productId: applicable.productId,\n})\n\nconst mapCouponWithRelations = (coupon: CouponRow & {\n usages: CouponUsageRow[]\n applicableUsers: CouponApplicableUserRow[]\n applicableProducts: CouponApplicableProductRow[]\n}): UserCouponWithRelations => ({\n ...mapCoupon(coupon),\n usages: coupon.usages.map(mapUsage),\n applicableUsers: coupon.applicableUsers.map(mapApplicableUser),\n applicableProducts: coupon.applicableProducts.map(mapApplicableProduct),\n})\n\nexport async function getActiveCouponsWithRelations(userId: number): Promise {\n const allCoupons = await db.query.coupons.findMany({\n where: and(\n eq(coupons.isInvalidated, false),\n or(\n isNull(coupons.validTill),\n gt(coupons.validTill, new Date())\n )\n ),\n with: {\n usages: {\n where: eq(couponUsage.userId, userId),\n },\n applicableUsers: true,\n applicableProducts: true,\n },\n })\n\n return allCoupons.map(mapCouponWithRelations)\n}\n\nexport async function getAllCouponsWithRelations(userId: number): Promise {\n const allCoupons = await db.query.coupons.findMany({\n with: {\n usages: {\n where: eq(couponUsage.userId, userId),\n },\n applicableUsers: true,\n applicableProducts: true,\n },\n })\n\n return allCoupons.map(mapCouponWithRelations)\n}\n\nexport async function getReservedCouponByCode(secretCode: string): Promise {\n const reserved = await db.query.reservedCoupons.findFirst({\n where: and(\n eq(reservedCoupons.secretCode, secretCode.toUpperCase()),\n eq(reservedCoupons.isRedeemed, false)\n ),\n })\n\n return reserved || null\n}\n\nexport async function redeemReservedCoupon(userId: number, reservedCoupon: ReservedCouponRow): Promise {\n const couponResult = await db.transaction(async (tx) => {\n const [coupon] = await tx.insert(coupons).values({\n couponCode: reservedCoupon.couponCode,\n isUserBased: true,\n discountPercent: reservedCoupon.discountPercent,\n flatDiscount: reservedCoupon.flatDiscount,\n minOrder: reservedCoupon.minOrder,\n productIds: reservedCoupon.productIds,\n maxValue: reservedCoupon.maxValue,\n isApplyForAll: false,\n validTill: reservedCoupon.validTill,\n maxLimitForUser: reservedCoupon.maxLimitForUser,\n exclusiveApply: reservedCoupon.exclusiveApply,\n createdBy: reservedCoupon.createdBy,\n }).returning()\n\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId,\n })\n\n await tx.update(reservedCoupons).set({\n isRedeemed: true,\n redeemedBy: userId,\n redeemedAt: new Date(),\n }).where(eq(reservedCoupons.id, reservedCoupon.id))\n\n return coupon\n })\n\n return mapCoupon(couponResult)\n}\n", "import { db } from '../db/db_index'\nimport { notifCreds, unloggedUserTokens, userCreds, userDetails, users } from '../db/schema'\nimport { and, eq } from 'drizzle-orm'\n\nexport async function getUserById(userId: number) {\n const [user] = await db.select().from(users).where(eq(users.id, userId)).limit(1)\n return user || null\n}\n\nexport async function getUserDetailByUserId(userId: number) {\n const [detail] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1)\n return detail || null\n}\n\nexport async function getUserWithCreds(userId: number) {\n const result = await db\n .select()\n .from(users)\n .leftJoin(userCreds, eq(users.id, userCreds.userId))\n .where(eq(users.id, userId))\n .limit(1)\n\n if (result.length === 0) return null\n return {\n user: result[0].users,\n creds: result[0].user_creds,\n }\n}\n\nexport async function getNotifCred(userId: number, token: string) {\n return db.query.notifCreds.findFirst({\n where: and(eq(notifCreds.userId, userId), eq(notifCreds.token, token)),\n })\n}\n\nexport async function upsertNotifCred(userId: number, token: string): Promise {\n const existing = await getNotifCred(userId, token)\n if (existing) {\n await db.update(notifCreds)\n .set({ lastVerified: new Date() })\n .where(eq(notifCreds.id, existing.id))\n return\n }\n\n await db.insert(notifCreds).values({\n userId,\n token,\n lastVerified: new Date(),\n })\n}\n\nexport async function deleteUnloggedToken(token: string): Promise {\n await db.delete(unloggedUserTokens).where(eq(unloggedUserTokens.token, token))\n}\n\nexport async function getUnloggedToken(token: string) {\n return db.query.unloggedUserTokens.findFirst({\n where: eq(unloggedUserTokens.token, token),\n })\n}\n\nexport async function upsertUnloggedToken(token: string): Promise {\n const existing = await getUnloggedToken(token)\n if (existing) {\n await db.update(unloggedUserTokens)\n .set({ lastVerified: new Date() })\n .where(eq(unloggedUserTokens.id, existing.id))\n return\n }\n\n await db.insert(unloggedUserTokens).values({\n token,\n lastVerified: new Date(),\n })\n}\n", "import { db } from '../db/db_index'\nimport {\n orders,\n orderItems,\n orderStatus,\n addresses,\n productInfo,\n paymentInfoTable,\n coupons,\n couponUsage,\n cartItems,\n refunds,\n units,\n userDetails,\n deliverySlotInfo,\n} from '../db/schema'\nimport { and, eq, inArray, desc, gte, sql } from 'drizzle-orm'\nimport type {\n UserOrderSummary,\n UserOrderDetail,\n UserRecentProduct,\n} from '@packages/shared'\n\nexport interface OrderItemInput {\n productId: number\n quantity: number\n slotId: number | null\n}\n\nexport interface PlaceOrderInput {\n userId: number\n selectedItems: OrderItemInput[]\n addressId: number\n paymentMethod: 'online' | 'cod'\n couponId?: number\n userNotes?: string\n isFlash?: boolean\n}\n\nexport interface OrderGroupData {\n slotId: number | null\n items: Array<{\n productId: number\n quantity: number\n slotId: number | null\n product: typeof productInfo.$inferSelect\n }>\n}\n\nexport interface PlacedOrder {\n id: number\n userId: number\n addressId: number\n slotId: number | null\n totalAmount: string\n deliveryCharge: string\n isCod: boolean\n isOnlinePayment: boolean\n paymentInfoId: number | null\n readableId: number\n userNotes: string | null\n orderGroupId: string\n orderGroupProportion: string\n isFlashDelivery: boolean\n createdAt: Date\n}\n\nexport interface OrderWithRelations {\n id: number\n userId: number\n addressId: number\n slotId: number | null\n totalAmount: string\n deliveryCharge: string\n isCod: boolean\n isOnlinePayment: boolean\n isFlashDelivery: boolean\n userNotes: string | null\n createdAt: Date\n orderItems: Array<{\n id: number\n productId: number\n quantity: string\n price: string\n discountedPrice: string | null\n is_packaged: boolean\n product: {\n id: number\n name: string\n images: unknown\n }\n }>\n slot: {\n deliveryTime: Date\n } | null\n paymentInfo: {\n id: number\n status: string\n } | null\n orderStatus: Array<{\n id: number\n isCancelled: boolean\n isDelivered: boolean\n paymentStatus: string\n cancelReason: string | null\n }>\n refunds: Array<{\n refundStatus: string\n refundAmount: string | null\n }>\n}\n\nexport interface OrderDetailWithRelations {\n id: number\n userId: number\n addressId: number\n slotId: number | null\n totalAmount: string\n deliveryCharge: string\n isCod: boolean\n isOnlinePayment: boolean\n isFlashDelivery: boolean\n userNotes: string | null\n createdAt: Date\n orderItems: Array<{\n id: number\n productId: number\n quantity: string\n price: string\n discountedPrice: string | null\n is_packaged: boolean\n product: {\n id: number\n name: string\n images: unknown\n }\n }>\n slot: {\n deliveryTime: Date\n } | null\n paymentInfo: {\n id: number\n status: string\n } | null\n orderStatus: Array<{\n id: number\n isCancelled: boolean\n isDelivered: boolean\n paymentStatus: string\n cancelReason: string | null\n }>\n refunds: Array<{\n refundStatus: string\n refundAmount: string | null\n }>\n}\n\nexport interface CouponValidationResult {\n id: number\n couponCode: string\n isInvalidated: boolean\n validTill: Date | null\n maxLimitForUser: number | null\n minOrder: string | null\n discountPercent: string | null\n flatDiscount: string | null\n maxValue: string | null\n usages: Array<{\n id: number\n userId: number\n }>\n}\n\nexport interface CouponUsageWithCoupon {\n id: number\n couponId: number\n orderId: number | null\n coupon: {\n id: number\n couponCode: string\n discountPercent: string | null\n flatDiscount: string | null\n maxValue: string | null\n }\n}\n\nexport async function validateAndGetCoupon(\n couponId: number | undefined,\n userId: number,\n totalAmount: number\n): Promise {\n if (!couponId) return null\n\n const coupon = await db.query.coupons.findFirst({\n where: eq(coupons.id, couponId),\n with: {\n usages: { where: eq(couponUsage.userId, userId) },\n },\n })\n\n if (!coupon) throw new Error('Invalid coupon')\n if (coupon.isInvalidated) throw new Error('Coupon is no longer valid')\n if (coupon.validTill && new Date(coupon.validTill) < new Date())\n throw new Error('Coupon has expired')\n if (\n coupon.maxLimitForUser &&\n coupon.usages.length >= coupon.maxLimitForUser\n )\n throw new Error('Coupon usage limit exceeded')\n if (\n coupon.minOrder &&\n parseFloat(coupon.minOrder.toString()) > totalAmount\n )\n throw new Error('Order amount does not meet coupon minimum requirement')\n\n return coupon as CouponValidationResult\n}\n\nexport function applyDiscountToOrder(\n orderTotal: number,\n appliedCoupon: CouponValidationResult | null,\n proportion: number\n): { finalOrderTotal: number; orderGroupProportion: number } {\n let finalOrderTotal = orderTotal\n \n if (appliedCoupon) {\n if (appliedCoupon.discountPercent) {\n const discount = Math.min(\n (orderTotal *\n parseFloat(appliedCoupon.discountPercent.toString())) /\n 100,\n appliedCoupon.maxValue\n ? parseFloat(appliedCoupon.maxValue.toString()) * proportion\n : Infinity\n )\n finalOrderTotal -= discount\n } else if (appliedCoupon.flatDiscount) {\n const discount = Math.min(\n parseFloat(appliedCoupon.flatDiscount.toString()) * proportion,\n appliedCoupon.maxValue\n ? parseFloat(appliedCoupon.maxValue.toString()) * proportion\n : finalOrderTotal\n )\n finalOrderTotal -= discount\n }\n }\n\n return { finalOrderTotal, orderGroupProportion: proportion }\n}\n\nexport async function getAddressByIdAndUser(\n addressId: number,\n userId: number\n) {\n return db.query.addresses.findFirst({\n where: and(eq(addresses.userId, userId), eq(addresses.id, addressId)),\n })\n}\n\nexport async function getProductById(productId: number) {\n return db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n })\n}\n\nexport async function checkUserSuspended(userId: number): Promise {\n const userDetail = await db.query.userDetails.findFirst({\n where: eq(userDetails.userId, userId),\n })\n return userDetail?.isSuspended ?? false\n}\n\nexport async function getSlotCapacityStatus(slotId: number): Promise {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n columns: {\n isCapacityFull: true,\n },\n })\n return slot?.isCapacityFull ?? false\n}\n\nexport async function placeOrderTransaction(params: {\n userId: number\n ordersData: Array<{\n order: Omit\n orderItems: Omit[]\n orderStatus: Omit\n }>\n paymentMethod: 'online' | 'cod'\n totalWithDelivery: number\n}): Promise {\n const { userId, ordersData, paymentMethod } = params\n\n return db.transaction(async (tx) => {\n let sharedPaymentInfoId: number | null = null\n if (paymentMethod === 'online') {\n const [paymentInfo] = await tx\n .insert(paymentInfoTable)\n .values({\n status: 'pending',\n gateway: 'razorpay',\n merchantOrderId: `multi_order_${Date.now()}`,\n })\n .returning()\n sharedPaymentInfoId = paymentInfo.id\n }\n\n const ordersToInsert: Omit[] =\n ordersData.map((od) => ({\n ...od.order,\n paymentInfoId: sharedPaymentInfoId,\n }))\n\n const insertedOrders = await tx.insert(orders).values(ordersToInsert).returning()\n\n const allOrderItems: Omit[] = []\n const allOrderStatuses: Omit[] = []\n\n insertedOrders.forEach((order, index) => {\n const od = ordersData[index]\n od.orderItems.forEach((item) => {\n allOrderItems.push({ ...item, orderId: order.id })\n })\n allOrderStatuses.push({\n ...od.orderStatus,\n orderId: order.id,\n })\n })\n\n await tx.insert(orderItems).values(allOrderItems)\n await tx.insert(orderStatus).values(allOrderStatuses)\n\n return insertedOrders as PlacedOrder[]\n })\n}\n\nexport async function deleteCartItemsForOrder(\n userId: number,\n productIds: number[]\n): Promise {\n await db.delete(cartItems).where(\n and(\n eq(cartItems.userId, userId),\n inArray(cartItems.productId, productIds)\n )\n )\n}\n\nexport async function recordCouponUsage(\n userId: number,\n couponId: number,\n orderId: number\n): Promise {\n await db.insert(couponUsage).values({\n userId,\n couponId,\n orderId,\n orderItemId: null,\n usedAt: new Date(),\n })\n}\n\nexport async function getOrdersWithRelations(\n userId: number,\n offset: number,\n pageSize: number\n): Promise {\n return db.query.orders.findMany({\n where: eq(orders.userId, userId),\n with: {\n orderItems: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n slot: {\n columns: {\n deliveryTime: true,\n },\n },\n paymentInfo: {\n columns: {\n id: true,\n status: true,\n },\n },\n orderStatus: {\n columns: {\n id: true,\n isCancelled: true,\n isDelivered: true,\n paymentStatus: true,\n cancelReason: true,\n },\n },\n refunds: {\n columns: {\n refundStatus: true,\n refundAmount: true,\n },\n },\n },\n orderBy: [desc(orders.createdAt)],\n limit: pageSize,\n offset: offset,\n }) as Promise\n}\n\nexport async function getOrderCount(userId: number): Promise {\n const result = await db\n .select({ count: sql`count(*)` })\n .from(orders)\n .where(eq(orders.userId, userId))\n\n return Number(result[0]?.count ?? 0)\n}\n\nexport async function getOrderByIdWithRelations(\n orderId: number,\n userId: number\n): Promise {\n const order = await db.query.orders.findFirst({\n where: and(eq(orders.id, orderId), eq(orders.userId, userId)),\n with: {\n orderItems: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n slot: {\n columns: {\n deliveryTime: true,\n },\n },\n paymentInfo: {\n columns: {\n id: true,\n status: true,\n },\n },\n orderStatus: {\n columns: {\n id: true,\n isCancelled: true,\n isDelivered: true,\n paymentStatus: true,\n cancelReason: true,\n },\n with: {\n refundCoupon: {\n columns: {\n id: true,\n couponCode: true,\n },\n },\n },\n },\n refunds: {\n columns: {\n refundStatus: true,\n refundAmount: true,\n },\n },\n },\n })\n\n return order as OrderDetailWithRelations | null\n}\n\nexport async function getCouponUsageForOrder(\n orderId: number\n): Promise {\n return db.query.couponUsage.findMany({\n where: eq(couponUsage.orderId, orderId),\n with: {\n coupon: {\n columns: {\n id: true,\n couponCode: true,\n discountPercent: true,\n flatDiscount: true,\n maxValue: true,\n },\n },\n },\n }) as Promise\n}\n\nexport async function getOrderBasic(orderId: number) {\n return db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n orderStatus: {\n columns: {\n id: true,\n isCancelled: true,\n isDelivered: true,\n },\n },\n },\n })\n}\n\nexport async function cancelOrderTransaction(\n orderId: number,\n statusId: number,\n reason: string,\n isCod: boolean\n): Promise {\n await db.transaction(async (tx) => {\n await tx\n .update(orderStatus)\n .set({\n isCancelled: true,\n cancelReason: reason,\n cancellationUserNotes: reason,\n cancellationReviewed: false,\n })\n .where(eq(orderStatus.id, statusId))\n\n const refundStatus = isCod ? 'na' : 'pending'\n\n await tx.insert(refunds).values({\n orderId,\n refundStatus,\n })\n })\n}\n\nexport async function updateOrderNotes(\n orderId: number,\n userNotes: string\n): Promise {\n await db\n .update(orders)\n .set({\n userNotes: userNotes || null,\n })\n .where(eq(orders.id, orderId))\n}\n\nexport async function getRecentlyDeliveredOrderIds(\n userId: number,\n limit: number,\n since: Date\n): Promise {\n const recentOrders = await db\n .select({ id: orders.id })\n .from(orders)\n .innerJoin(orderStatus, eq(orders.id, orderStatus.orderId))\n .where(\n and(\n eq(orders.userId, userId),\n eq(orderStatus.isDelivered, true),\n gte(orders.createdAt, since)\n )\n )\n .orderBy(desc(orders.createdAt))\n .limit(limit)\n\n return recentOrders.map((order) => order.id)\n}\n\nexport async function getProductIdsFromOrders(\n orderIds: number[]\n): Promise {\n const orderItemsResult = await db\n .select({ productId: orderItems.productId })\n .from(orderItems)\n .where(inArray(orderItems.orderId, orderIds))\n\n return [...new Set(orderItemsResult.map((item) => item.productId))]\n}\n\nexport interface RecentProductData {\n id: number\n name: string\n shortDescription: string | null\n price: string\n images: unknown\n isOutOfStock: boolean\n unitShortNotation: string\n incrementStep: number\n}\n\nexport async function getProductsForRecentOrders(\n productIds: number[],\n limit: number\n): Promise {\n const results = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(\n and(\n inArray(productInfo.id, productIds),\n eq(productInfo.isSuspended, false)\n )\n )\n .orderBy(desc(productInfo.createdAt))\n .limit(limit)\n\n return results.map((product) => ({\n ...product,\n price: String(product.price ?? '0'),\n }))\n}\n\n// ============================================================================\n// Post-Order Handler Helpers (for Telegram notifications)\n// ============================================================================\n\nexport interface OrderWithFullData {\n id: number\n totalAmount: string\n isFlashDelivery: boolean\n address: {\n name: string | null\n addressLine1: string | null\n addressLine2: string | null\n city: string | null\n state: string | null\n pincode: string | null\n phone: string | null\n } | null\n orderItems: Array<{\n quantity: string\n product: {\n name: string\n } | null\n }>\n slot: {\n deliveryTime: Date\n } | null\n}\n\nexport async function getOrdersByIdsWithFullData(\n orderIds: number[]\n): Promise {\n return db.query.orders.findMany({\n where: inArray(orders.id, orderIds),\n with: {\n address: {\n columns: {\n name: true,\n addressLine1: true,\n addressLine2: true,\n city: true,\n state: true,\n pincode: true,\n phone: true,\n },\n },\n orderItems: {\n with: {\n product: {\n columns: {\n name: true,\n },\n },\n },\n },\n slot: {\n columns: {\n deliveryTime: true,\n },\n },\n },\n }) as Promise\n}\n\nexport interface OrderWithCancellationData extends OrderWithFullData {\n refunds: Array<{\n refundStatus: string\n }>\n}\n\nexport async function getOrderByIdWithFullData(\n orderId: number\n): Promise {\n return db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n address: {\n columns: {\n name: true,\n addressLine1: true,\n addressLine2: true,\n city: true,\n state: true,\n pincode: true,\n phone: true,\n },\n },\n orderItems: {\n with: {\n product: {\n columns: {\n name: true,\n },\n },\n },\n },\n slot: {\n columns: {\n deliveryTime: true,\n },\n },\n refunds: {\n columns: {\n refundStatus: true,\n },\n },\n },\n }) as Promise\n}\n", "// Store Helpers - Database operations for cache initialization\n// These are used by stores in apps/backend/src/stores/\n\nimport { db } from '../db/db_index'\nimport {\n homeBanners,\n productInfo,\n units,\n productSlots,\n deliverySlotInfo,\n specialDeals,\n storeInfo,\n productTags,\n productTagInfo,\n userIncidents,\n} from '../db/schema'\nimport { eq, and, gt, sql, isNotNull, asc } from 'drizzle-orm'\n\n// ============================================================================\n// BANNER STORE HELPERS\n// ============================================================================\n\nexport interface BannerData {\n id: number\n name: string\n imageUrl: string | null\n serialNum: number | null\n productIds: number[] | null\n createdAt: Date\n}\n\nexport async function getAllBannersForCache(): Promise {\n return db.query.homeBanners.findMany({\n where: isNotNull(homeBanners.serialNum),\n orderBy: asc(homeBanners.serialNum),\n })\n}\n\n// ============================================================================\n// PRODUCT STORE HELPERS\n// ============================================================================\n\nexport interface ProductBasicData {\n id: number\n name: string\n shortDescription: string | null\n longDescription: string | null\n price: string\n marketPrice: string | null\n images: unknown\n isOutOfStock: boolean\n storeId: number | null\n unitShortNotation: string\n incrementStep: number\n productQuantity: number\n isFlashAvailable: boolean\n flashPrice: string | null\n}\n\nexport interface StoreBasicData {\n id: number\n name: string\n description: string | null\n}\n\nexport interface DeliverySlotData {\n productId: number\n id: number\n deliveryTime: Date\n freezeTime: Date\n isCapacityFull: boolean\n}\n\nexport interface SpecialDealData {\n productId: number\n quantity: string\n price: string\n validTill: Date\n}\n\nexport interface ProductTagData {\n productId: number\n tagName: string\n}\n\nexport async function getAllProductsForCache(): Promise {\n const results = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n longDescription: productInfo.longDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n storeId: productInfo.storeId,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n productQuantity: productInfo.productQuantity,\n isFlashAvailable: productInfo.isFlashAvailable,\n flashPrice: productInfo.flashPrice,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n\n return results.map((product) => ({\n ...product,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n flashPrice: product.flashPrice ? String(product.flashPrice) : null,\n }))\n}\n\nexport async function getAllStoresForCache(): Promise {\n return db.query.storeInfo.findMany({\n columns: { id: true, name: true, description: true },\n })\n}\n\nexport async function getAllDeliverySlotsForCache(): Promise {\n return db\n .select({\n productId: productSlots.productId,\n id: deliverySlotInfo.id,\n deliveryTime: deliverySlotInfo.deliveryTime,\n freezeTime: deliverySlotInfo.freezeTime,\n isCapacityFull: deliverySlotInfo.isCapacityFull,\n })\n .from(productSlots)\n .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n .where(\n and(\n eq(deliverySlotInfo.isActive, true),\n eq(deliverySlotInfo.isCapacityFull, false),\n gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`)\n )\n )\n}\n\nexport async function getAllSpecialDealsForCache(): Promise {\n const results = await db\n .select({\n productId: specialDeals.productId,\n quantity: specialDeals.quantity,\n price: specialDeals.price,\n validTill: specialDeals.validTill,\n })\n .from(specialDeals)\n .where(gt(specialDeals.validTill, sql`CURRENT_TIMESTAMP`))\n\n return results.map((deal) => ({\n ...deal,\n quantity: String(deal.quantity ?? '0'),\n price: String(deal.price ?? '0'),\n }))\n}\n\nexport async function getAllProductTagsForCache(): Promise {\n return db\n .select({\n productId: productTags.productId,\n tagName: productTagInfo.tagName,\n })\n .from(productTags)\n .innerJoin(productTagInfo, eq(productTags.tagId, productTagInfo.id))\n}\n\n// ============================================================================\n// PRODUCT TAG STORE HELPERS\n// ============================================================================\n\nexport interface TagBasicData {\n id: number\n tagName: string\n tagDescription: string | null\n imageUrl: string | null\n isDashboardTag: boolean\n relatedStores: unknown\n}\n\nexport interface TagProductMapping {\n tagId: number\n productId: number\n}\n\nexport async function getAllTagsForCache(): Promise {\n return db\n .select({\n id: productTagInfo.id,\n tagName: productTagInfo.tagName,\n tagDescription: productTagInfo.tagDescription,\n imageUrl: productTagInfo.imageUrl,\n isDashboardTag: productTagInfo.isDashboardTag,\n relatedStores: productTagInfo.relatedStores,\n })\n .from(productTagInfo)\n}\n\nexport async function getAllTagProductMappings(): Promise {\n return db\n .select({\n tagId: productTags.tagId,\n productId: productTags.productId,\n })\n .from(productTags)\n}\n\n// ============================================================================\n// SLOT STORE HELPERS\n// ============================================================================\n\nexport interface SlotWithProductsData {\n id: number\n deliveryTime: Date\n freezeTime: Date\n isActive: boolean\n isCapacityFull: boolean\n productSlots: Array<{\n product: {\n id: number\n name: string\n productQuantity: number\n shortDescription: string | null\n price: string\n marketPrice: string | null\n unit: { shortNotation: string } | null\n store: { id: number; name: string; description: string | null } | null\n images: unknown\n isOutOfStock: boolean\n storeId: number | null\n }\n }>\n}\n\nexport async function getAllSlotsWithProductsForCache(): Promise {\n const now = new Date()\n \n return db.query.deliverySlotInfo.findMany({\n where: and(\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, now)\n ),\n with: {\n productSlots: {\n with: {\n product: {\n with: {\n unit: true,\n store: true,\n },\n },\n },\n },\n },\n orderBy: asc(deliverySlotInfo.deliveryTime),\n }) as Promise\n}\n\n// ============================================================================\n// USER NEGATIVITY STORE HELPERS\n// ============================================================================\n\nexport interface UserNegativityData {\n userId: number\n totalNegativityScore: number\n}\n\nexport async function getAllUserNegativityScores(): Promise {\n const results = await db\n .select({\n userId: userIncidents.userId,\n totalNegativityScore: sql`sum(${userIncidents.negativityScore})`,\n })\n .from(userIncidents)\n .groupBy(userIncidents.userId)\n\n return results.map((result) => ({\n userId: result.userId,\n totalNegativityScore: Number(result.totalNegativityScore ?? 0),\n }))\n}\n\nexport async function getUserNegativityScore(userId: number): Promise {\n const [result] = await db\n .select({\n totalNegativityScore: sql`sum(${userIncidents.negativityScore})`,\n })\n .from(userIncidents)\n .where(eq(userIncidents.userId, userId))\n .limit(1)\n\n return Number(result?.totalNegativityScore ?? 0)\n}\n", "import { db } from '../db/db_index'\nimport { productInfo, keyValStore } from '../db/schema'\nimport { inArray, eq } from 'drizzle-orm'\n\n/**\n * Toggle flash delivery availability for specific products\n * @param isAvailable - Whether flash delivery should be available\n * @param productIds - Array of product IDs to update\n */\nexport async function toggleFlashDeliveryForItems(\n isAvailable: boolean,\n productIds: number[]\n): Promise {\n await db\n .update(productInfo)\n .set({ isFlashAvailable: isAvailable })\n .where(inArray(productInfo.id, productIds))\n}\n\n/**\n * Update key-value store\n * @param key - The key to update\n * @param value - The boolean value to set\n */\nexport async function toggleKeyVal(\n key: string,\n value: boolean\n): Promise {\n await db\n .update(keyValStore)\n .set({ value })\n .where(eq(keyValStore.key, key))\n}\n\n/**\n * Get all key-value store constants\n * @returns Array of all key-value pairs\n */\nexport async function getAllKeyValStore(): Promise> {\n return db.select().from(keyValStore)\n}\n", "import { db } from '../db/db_index'\nimport { keyValStore, productInfo } from '../db/schema'\n\n/**\n * Health check - test database connectivity\n * Tries to select from keyValStore first, falls back to productInfo\n */\nexport async function healthCheck(): Promise<{ status: string }> {\n try {\n // Try keyValStore first (smaller table)\n await db.select({ key: keyValStore.key }).from(keyValStore).limit(1)\n return { status: 'ok' }\n } catch {\n // Fallback to productInfo\n await db.select({ name: productInfo.name }).from(productInfo).limit(1)\n return { status: 'ok' }\n }\n}\n", "import { db } from '../db/db_index'\nimport { orders, orderItems, orderStatus, payments, refunds, couponUsage, complaints } from '../db/schema'\nimport { inArray } from 'drizzle-orm'\n\n/**\n * Delete orders and all their related records\n * @param orderIds Array of order IDs to delete\n * @returns Promise\n * @throws Error if deletion fails\n */\nexport async function deleteOrdersWithRelations(orderIds: number[]): Promise {\n if (orderIds.length === 0) {\n return\n }\n\n // Delete child records first (in correct order to avoid FK constraint errors)\n\n // 1. Delete coupon usage records\n await db.delete(couponUsage).where(inArray(couponUsage.orderId, orderIds))\n\n // 2. Delete complaints related to these orders\n await db.delete(complaints).where(inArray(complaints.orderId, orderIds))\n\n // 3. Delete refunds\n await db.delete(refunds).where(inArray(refunds.orderId, orderIds))\n\n // 4. Delete payments\n await db.delete(payments).where(inArray(payments.orderId, orderIds))\n\n // 5. Delete order status records\n await db.delete(orderStatus).where(inArray(orderStatus.orderId, orderIds))\n\n // 6. Delete order items\n await db.delete(orderItems).where(inArray(orderItems.orderId, orderIds))\n\n // 7. Finally delete the orders themselves\n await db.delete(orders).where(inArray(orders.id, orderIds))\n}\n", "import { and, eq } from 'drizzle-orm'\nimport { db } from '../db/db_index'\nimport { uploadUrlStatus } from '../db/schema'\n\nexport async function createUploadUrlStatus(key: string): Promise {\n await db.insert(uploadUrlStatus).values({\n key,\n status: 'pending',\n })\n}\n\nexport async function claimUploadUrlStatus(key: string): Promise {\n const result = await db\n .update(uploadUrlStatus)\n .set({ status: 'claimed' })\n .where(and(eq(uploadUrlStatus.key, key), eq(uploadUrlStatus.status, 'pending')))\n .returning()\n\n return result.length > 0\n}\n", "import { db } from '../db/db_index'\nimport { eq, and } from 'drizzle-orm'\n\n// ============================================================================\n// Unit Seed Helper\n// ============================================================================\n\nexport interface UnitSeedData {\n shortNotation: string\n fullName: string\n}\n\nexport async function seedUnits(unitsToSeed: UnitSeedData[]): Promise {\n for (const unit of unitsToSeed) {\n const { units: unitsTable } = await import('../db/schema')\n const existingUnit = await db.query.units.findFirst({\n where: eq(unitsTable.shortNotation, unit.shortNotation),\n })\n if (!existingUnit) {\n await db.insert(unitsTable).values(unit)\n }\n }\n}\n\n// ============================================================================\n// Staff Role Seed Helper\n// ============================================================================\n\n// Type for staff role names based on the enum values in schema\nexport type StaffRoleName = 'super_admin' | 'admin' | 'marketer' | 'delivery_staff'\n\nexport async function seedStaffRoles(rolesToSeed: StaffRoleName[]): Promise {\n for (const roleName of rolesToSeed) {\n const { staffRoles } = await import('../db/schema')\n const existingRole = await db.query.staffRoles.findFirst({\n where: eq(staffRoles.roleName, roleName),\n })\n if (!existingRole) {\n await db.insert(staffRoles).values({ roleName })\n }\n }\n}\n\n// ============================================================================\n// Staff Permission Seed Helper\n// ============================================================================\n\n// Type for staff permission names based on the enum values in schema\nexport type StaffPermissionName = 'crud_product' | 'make_coupon' | 'crud_staff_users'\n\nexport async function seedStaffPermissions(permissionsToSeed: StaffPermissionName[]): Promise {\n for (const permissionName of permissionsToSeed) {\n const { staffPermissions } = await import('../db/schema')\n const existingPermission = await db.query.staffPermissions.findFirst({\n where: eq(staffPermissions.permissionName, permissionName),\n })\n if (!existingPermission) {\n await db.insert(staffPermissions).values({ permissionName })\n }\n }\n}\n\n// ============================================================================\n// Role-Permission Assignment Helper\n// ============================================================================\n\nexport interface RolePermissionAssignment {\n roleName: StaffRoleName\n permissionName: StaffPermissionName\n}\n\nexport async function seedRolePermissions(assignments: RolePermissionAssignment[]): Promise {\n await db.transaction(async (tx) => {\n const { staffRoles, staffPermissions, staffRolePermissions } = await import('../db/schema')\n\n for (const assignment of assignments) {\n // Get role ID\n const role = await tx.query.staffRoles.findFirst({\n where: eq(staffRoles.roleName, assignment.roleName),\n })\n\n // Get permission ID\n const permission = await tx.query.staffPermissions.findFirst({\n where: eq(staffPermissions.permissionName, assignment.permissionName),\n })\n\n if (role && permission) {\n const existing = await tx.query.staffRolePermissions.findFirst({\n where: and(\n eq(staffRolePermissions.staffRoleId, role.id),\n eq(staffRolePermissions.staffPermissionId, permission.id)\n ),\n })\n if (!existing) {\n await tx.insert(staffRolePermissions).values({\n staffRoleId: role.id,\n staffPermissionId: permission.id,\n })\n }\n }\n }\n })\n}\n\n// ============================================================================\n// Key-Value Store Seed Helper\n// ============================================================================\n\nexport interface KeyValSeedData {\n key: string\n value: any\n}\n\nexport async function seedKeyValStore(constantsToSeed: KeyValSeedData[]): Promise {\n for (const constant of constantsToSeed) {\n const { keyValStore } = await import('../db/schema')\n const existing = await db.query.keyValStore.findFirst({\n where: eq(keyValStore.key, constant.key),\n })\n if (!existing) {\n await db.insert(keyValStore).values({\n key: constant.key,\n value: constant.value,\n })\n }\n }\n}\n", "// Database Helper - SQLite (Cloudflare D1)\n// Main entry point for the package\n\n// Re-export database connection\nexport { db, initDb } from './src/db/db_index'\n// Re-export schema\nexport * from './src/db/schema'\n\n// Export enum types for type safety\nexport { staffRoleEnum, staffPermissionEnum } from './src/db/schema'\n\n// Admin API helpers - explicitly namespaced exports to avoid duplicates\nexport {\n // Banner\n getBanners,\n getBannerById,\n createBanner,\n updateBanner,\n deleteBanner,\n} from './src/admin-apis/banner'\n\nexport {\n // Complaint\n getComplaints,\n resolveComplaint,\n} from './src/admin-apis/complaint'\n\nexport {\n // Constants\n getAllConstants,\n upsertConstants,\n} from './src/admin-apis/const'\n\nexport {\n // Coupon\n getAllCoupons,\n getCouponById,\n invalidateCoupon,\n validateCoupon,\n getReservedCoupons,\n getUsersForCoupon,\n createCouponWithRelations,\n updateCouponWithRelations,\n generateCancellationCoupon,\n createReservedCouponWithProducts,\n createCouponForUser,\n checkUsersExist,\n checkCouponExists,\n checkReservedCouponExists,\n getOrderWithUser,\n} from './src/admin-apis/coupon'\n\nexport {\n // Order\n updateOrderNotes,\n getOrderDetails,\n updateOrderPackaged,\n updateOrderDelivered,\n updateOrderItemPackaging,\n removeDeliveryCharge,\n getSlotOrders,\n updateAddressCoords,\n getAllOrders,\n rebalanceSlots,\n cancelOrder,\n deleteOrderById,\n} from './src/admin-apis/order'\n\nexport {\n // Product\n getAllProducts,\n getProductById,\n deleteProduct,\n createProduct,\n updateProduct,\n checkProductExistsByName,\n checkUnitExists,\n getProductImagesById,\n createSpecialDealsForProduct,\n updateProductDeals,\n replaceProductTags,\n toggleProductOutOfStock,\n updateSlotProducts,\n getSlotProductIds,\n getSlotsProductIds,\n getAllUnits,\n getAllProductTags,\n getAllProductTagInfos,\n getProductTagInfoById,\n createProductTag,\n getProductTagById,\n updateProductTag,\n deleteProductTag,\n checkProductTagExistsByName,\n getProductReviews,\n respondToReview,\n getAllProductGroups,\n createProductGroup,\n updateProductGroup,\n deleteProductGroup,\n addProductToGroup,\n removeProductFromGroup,\n updateProductPrices,\n} from './src/admin-apis/product'\n\nexport {\n // Slots\n getActiveSlotsWithProducts,\n getActiveSlots,\n getSlotsAfterDate,\n getSlotByIdWithRelations,\n createSlotWithRelations,\n updateSlotWithRelations,\n deleteSlotById,\n updateSlotCapacity,\n getSlotDeliverySequence,\n updateSlotDeliverySequence,\n} from './src/admin-apis/slots'\n\nexport {\n // Staff User\n getStaffUserByName,\n getStaffUserById,\n getAllStaff,\n getAllUsers,\n getUserWithDetails,\n updateUserSuspensionStatus,\n checkStaffUserExists,\n checkStaffRoleExists,\n createStaffUser,\n getAllRoles,\n} from './src/admin-apis/staff-user'\n\nexport {\n // Store\n getAllStores,\n getStoreById,\n createStore,\n updateStore,\n deleteStore,\n} from './src/admin-apis/store'\n\nexport {\n // User\n createUserByMobile,\n getUserByMobile,\n getUnresolvedComplaintsCount,\n getAllUsersWithFilters,\n getOrderCountsByUserIds,\n getLastOrdersByUserIds,\n getSuspensionStatusesByUserIds,\n getUserBasicInfo,\n getUserSuspensionStatus,\n getUserOrders,\n getOrderStatusesByOrderIds,\n getItemCountsByOrderIds,\n upsertUserSuspension,\n searchUsers,\n getAllNotifCreds,\n getAllUnloggedTokens,\n getNotifTokensByUserIds,\n getUserIncidentsWithRelations,\n createUserIncident,\n} from './src/admin-apis/user'\n\nexport {\n // Vendor Snippets\n checkVendorSnippetExists,\n getVendorSnippetById,\n getVendorSnippetByCode,\n getAllVendorSnippets,\n createVendorSnippet,\n updateVendorSnippet,\n deleteVendorSnippet,\n getProductsByIds,\n getVendorSlotById,\n getVendorOrdersBySlotId,\n getOrderItemsByOrderIds,\n getOrderStatusByOrderIds,\n updateVendorOrderItemPackaging,\n getVendorOrders,\n} from './src/admin-apis/vendor-snippets'\n\nexport {\n // User Address\n getDefaultAddress as getUserDefaultAddress,\n getUserAddresses,\n getUserAddressById,\n clearDefaultAddress as clearUserDefaultAddress,\n createUserAddress,\n updateUserAddress,\n deleteUserAddress,\n hasOngoingOrdersForAddress,\n} from './src/user-apis/address'\n\nexport {\n // User Banners\n getActiveBanners as getUserActiveBanners,\n} from './src/user-apis/banners'\n\nexport {\n // User Cart\n getCartItemsWithProducts as getUserCartItemsWithProducts,\n getProductById as getUserProductById,\n getCartItemByUserProduct as getUserCartItemByUserProduct,\n incrementCartItemQuantity as incrementUserCartItemQuantity,\n insertCartItem as insertUserCartItem,\n updateCartItemQuantity as updateUserCartItemQuantity,\n deleteCartItem as deleteUserCartItem,\n clearUserCart,\n} from './src/user-apis/cart'\n\nexport {\n // User Complaint\n getUserComplaints as getUserComplaints,\n createComplaint as createUserComplaint,\n} from './src/user-apis/complaint'\n\nexport {\n // User Stores\n getStoreSummaries as getUserStoreSummaries,\n getStoreDetail as getUserStoreDetail,\n} from './src/user-apis/stores'\n\nexport {\n // User Product\n getProductDetailById as getUserProductDetailById,\n getProductReviews as getUserProductReviews,\n getProductById as getUserProductByIdBasic,\n createProductReview as createUserProductReview,\n getAllProductsWithUnits,\n type ProductSummaryData,\n} from './src/user-apis/product'\n\nexport {\n // User Slots\n getActiveSlotsList as getUserActiveSlotsList,\n getProductAvailability as getUserProductAvailability,\n} from './src/user-apis/slots'\n\nexport {\n // User Payments\n getOrderById as getUserPaymentOrderById,\n getPaymentByOrderId as getUserPaymentByOrderId,\n getPaymentByMerchantOrderId as getUserPaymentByMerchantOrderId,\n updatePaymentSuccess as updateUserPaymentSuccess,\n updateOrderPaymentStatus as updateUserOrderPaymentStatus,\n markPaymentFailed as markUserPaymentFailed,\n} from './src/user-apis/payments'\n\nexport {\n // User Auth\n getUserByEmail as getUserAuthByEmail,\n getUserByMobile as getUserAuthByMobile,\n getUserById as getUserAuthById,\n getUserCreds as getUserAuthCreds,\n getUserDetails as getUserAuthDetails,\n isUserSuspended,\n createUserWithCreds as createUserAuthWithCreds,\n createUserWithMobile as createUserAuthWithMobile,\n upsertUserPassword as upsertUserAuthPassword,\n deleteUserAccount as deleteUserAuthAccount,\n // UV API helpers\n createUserWithProfile,\n getUserDetailsByUserId,\n updateUserProfile,\n} from './src/user-apis/auth'\n\nexport {\n // User Coupon\n getActiveCouponsWithRelations as getUserActiveCouponsWithRelations,\n getAllCouponsWithRelations as getUserAllCouponsWithRelations,\n getReservedCouponByCode as getUserReservedCouponByCode,\n redeemReservedCoupon as redeemUserReservedCoupon,\n} from './src/user-apis/coupon'\n\nexport {\n // User Profile\n getUserById as getUserProfileById,\n getUserDetailByUserId as getUserProfileDetailById,\n getUserWithCreds as getUserWithCreds,\n getNotifCred as getUserNotifCred,\n upsertNotifCred as upsertUserNotifCred,\n deleteUnloggedToken as deleteUserUnloggedToken,\n getUnloggedToken as getUserUnloggedToken,\n upsertUnloggedToken as upsertUserUnloggedToken,\n} from './src/user-apis/user'\n\nexport {\n // User Order\n validateAndGetCoupon as validateAndGetUserCoupon,\n applyDiscountToOrder as applyDiscountToUserOrder,\n getAddressByIdAndUser as getUserAddressByIdAndUser,\n getProductById as getOrderProductById,\n checkUserSuspended,\n getSlotCapacityStatus as getUserSlotCapacityStatus,\n placeOrderTransaction as placeUserOrderTransaction,\n deleteCartItemsForOrder as deleteUserCartItemsForOrder,\n recordCouponUsage as recordUserCouponUsage,\n getOrdersWithRelations as getUserOrdersWithRelations,\n getOrderCount as getUserOrderCount,\n getOrderByIdWithRelations as getUserOrderByIdWithRelations,\n getCouponUsageForOrder as getUserCouponUsageForOrder,\n getOrderBasic as getUserOrderBasic,\n cancelOrderTransaction as cancelUserOrderTransaction,\n updateOrderNotes as updateUserOrderNotes,\n getRecentlyDeliveredOrderIds as getUserRecentlyDeliveredOrderIds,\n getProductIdsFromOrders as getUserProductIdsFromOrders,\n getProductsForRecentOrders as getUserProductsForRecentOrders,\n // Post-order handler helpers\n getOrdersByIdsWithFullData,\n getOrderByIdWithFullData,\n type OrderWithFullData,\n type OrderWithCancellationData,\n} from './src/user-apis/order'\n\n// Store Helpers (for cache initialization)\nexport {\n // Banner Store\n getAllBannersForCache,\n type BannerData,\n // Product Store\n getAllProductsForCache,\n getAllStoresForCache,\n getAllDeliverySlotsForCache,\n getAllSpecialDealsForCache,\n getAllProductTagsForCache,\n type ProductBasicData,\n type StoreBasicData,\n type DeliverySlotData,\n type SpecialDealData,\n type ProductTagData,\n // Product Tag Store\n getAllTagsForCache,\n getAllTagProductMappings,\n type TagBasicData,\n type TagProductMapping,\n // Slot Store\n getAllSlotsWithProductsForCache,\n type SlotWithProductsData,\n // User Negativity Store\n getAllUserNegativityScores,\n getUserNegativityScore,\n type UserNegativityData,\n} from './src/stores/store-helpers'\n\n// Automated Jobs Helpers\nexport {\n toggleFlashDeliveryForItems,\n toggleKeyVal,\n getAllKeyValStore,\n} from './src/lib/automated-jobs'\n\n// Health Check\nexport {\n healthCheck,\n} from './src/lib/health-check'\n\n// Common API Helpers\nexport {\n getSuspendedProductIds,\n getNextDeliveryDateWithCapacity,\n} from './src/user-apis/product'\n\nexport {\n getStoresSummary,\n} from './src/user-apis/stores'\n\n// Delete Orders Helper\nexport {\n deleteOrdersWithRelations,\n} from './src/lib/delete-orders'\n\n// Upload URL Helpers\nexport {\n createUploadUrlStatus,\n claimUploadUrlStatus,\n} from './src/helper_methods/upload-url'\n\n// Seed Helpers\nexport {\n seedUnits,\n seedStaffRoles,\n seedStaffPermissions,\n seedRolePermissions,\n seedKeyValStore,\n type UnitSeedData,\n type RolePermissionAssignment,\n type KeyValSeedData,\n type StaffRoleName,\n type StaffPermissionName,\n} from './src/lib/seed'\n", "// SQLite Importer - Intermediate layer to avoid direct db_helper_sqlite imports in dbService\n// This file re-exports everything from sqliteService\n\n// Re-export database connection\nexport { db, initDb } from 'sqliteService'\n\n// Re-export all schema exports\nexport * from 'sqliteService'\n\n// Re-export all helper methods from sqliteService\nexport {\n // Admin - Banner\n getBanners,\n getBannerById,\n createBanner,\n updateBanner,\n deleteBanner,\n // Admin - Complaint\n getComplaints,\n resolveComplaint,\n // Admin - Constants\n getAllConstants,\n upsertConstants,\n // Admin - Coupon\n getAllCoupons,\n getCouponById,\n invalidateCoupon,\n validateCoupon,\n getReservedCoupons,\n getUsersForCoupon,\n createCouponWithRelations,\n updateCouponWithRelations,\n generateCancellationCoupon,\n createReservedCouponWithProducts,\n createCouponForUser,\n checkUsersExist,\n checkCouponExists,\n checkReservedCouponExists,\n getOrderWithUser,\n // Admin - Order\n updateOrderNotes,\n getOrderDetails,\n updateOrderPackaged,\n updateOrderDelivered,\n updateOrderItemPackaging,\n removeDeliveryCharge,\n getSlotOrders,\n updateAddressCoords,\n getAllOrders,\n rebalanceSlots,\n cancelOrder,\n deleteOrderById,\n // Admin - Product\n getAllProducts,\n getProductById,\n deleteProduct,\n createProduct,\n updateProduct,\n checkProductExistsByName,\n checkUnitExists,\n getProductImagesById,\n createSpecialDealsForProduct,\n updateProductDeals,\n replaceProductTags,\n toggleProductOutOfStock,\n updateSlotProducts,\n getSlotProductIds,\n getSlotsProductIds,\n getAllUnits,\n getAllProductTags,\n getAllProductTagInfos,\n getProductTagInfoById,\n createProductTag,\n getProductTagById,\n updateProductTag,\n deleteProductTag,\n checkProductTagExistsByName,\n getProductReviews,\n respondToReview,\n getAllProductGroups,\n createProductGroup,\n updateProductGroup,\n deleteProductGroup,\n addProductToGroup,\n removeProductFromGroup,\n updateProductPrices,\n // Admin - Slots\n getActiveSlotsWithProducts,\n getActiveSlots,\n getSlotsAfterDate,\n getSlotByIdWithRelations,\n createSlotWithRelations,\n updateSlotWithRelations,\n deleteSlotById,\n updateSlotCapacity,\n getSlotDeliverySequence,\n updateSlotDeliverySequence,\n // Admin - Staff User\n getStaffUserByName,\n getStaffUserById,\n getAllStaff,\n getAllUsers,\n getUserWithDetails,\n updateUserSuspensionStatus,\n checkStaffUserExists,\n checkStaffRoleExists,\n createStaffUser,\n getAllRoles,\n // Admin - Store\n getAllStores,\n getStoreById,\n createStore,\n updateStore,\n deleteStore,\n // Admin - User\n createUserByMobile,\n getUserByMobile,\n getUnresolvedComplaintsCount,\n getAllUsersWithFilters,\n getOrderCountsByUserIds,\n getLastOrdersByUserIds,\n getSuspensionStatusesByUserIds,\n getUserBasicInfo,\n getUserSuspensionStatus,\n getUserOrders,\n getOrderStatusesByOrderIds,\n getItemCountsByOrderIds,\n upsertUserSuspension,\n searchUsers,\n getAllNotifCreds,\n getAllUnloggedTokens,\n getNotifTokensByUserIds,\n getUserIncidentsWithRelations,\n createUserIncident,\n // Admin - Vendor Snippets\n checkVendorSnippetExists,\n getVendorSnippetById,\n getVendorSnippetByCode,\n getAllVendorSnippets,\n createVendorSnippet,\n updateVendorSnippet,\n deleteVendorSnippet,\n getProductsByIds,\n getVendorSlotById,\n getVendorOrdersBySlotId,\n getOrderItemsByOrderIds,\n getOrderStatusByOrderIds,\n updateVendorOrderItemPackaging,\n getVendorOrders,\n // User - Address\n getUserDefaultAddress,\n getUserAddresses,\n getUserAddressById,\n clearUserDefaultAddress,\n createUserAddress,\n updateUserAddress,\n deleteUserAddress,\n hasOngoingOrdersForAddress,\n // User - Banners\n getUserActiveBanners,\n // User - Cart\n getUserCartItemsWithProducts,\n getUserProductById,\n getUserCartItemByUserProduct,\n incrementUserCartItemQuantity,\n insertUserCartItem,\n updateUserCartItemQuantity,\n deleteUserCartItem,\n clearUserCart,\n // User - Complaint\n getUserComplaints,\n createUserComplaint,\n // User - Stores\n getUserStoreSummaries,\n getUserStoreDetail,\n // User - Product\n getUserProductDetailById,\n getUserProductReviews,\n getUserProductByIdBasic,\n createUserProductReview,\n getAllProductsWithUnits,\n type ProductSummaryData,\n // User - Slots\n getUserActiveSlotsList,\n getUserProductAvailability,\n // User - Payments\n getUserPaymentOrderById,\n getUserPaymentByOrderId,\n getUserPaymentByMerchantOrderId,\n updateUserPaymentSuccess,\n updateUserOrderPaymentStatus,\n markUserPaymentFailed,\n // User - Auth\n getUserAuthByEmail,\n getUserAuthByMobile,\n getUserAuthById,\n getUserAuthCreds,\n getUserAuthDetails,\n isUserSuspended,\n createUserAuthWithCreds,\n createUserAuthWithMobile,\n upsertUserAuthPassword,\n deleteUserAuthAccount,\n // UV API helpers\n createUserWithProfile,\n getUserDetailsByUserId,\n updateUserProfile,\n // User - Coupon\n getUserActiveCouponsWithRelations,\n getUserAllCouponsWithRelations,\n getUserReservedCouponByCode,\n redeemUserReservedCoupon,\n // User - Profile\n getUserProfileById,\n getUserProfileDetailById,\n getUserWithCreds,\n getUserNotifCred,\n upsertUserNotifCred,\n deleteUserUnloggedToken,\n getUserUnloggedToken,\n upsertUserUnloggedToken,\n // User - Order\n validateAndGetUserCoupon,\n applyDiscountToUserOrder,\n getUserAddressByIdAndUser,\n getOrderProductById,\n checkUserSuspended,\n getUserSlotCapacityStatus,\n placeUserOrderTransaction,\n deleteUserCartItemsForOrder,\n recordUserCouponUsage,\n getUserOrdersWithRelations,\n getUserOrderCount,\n getUserOrderByIdWithRelations,\n getUserCouponUsageForOrder,\n getUserOrderBasic,\n cancelUserOrderTransaction,\n updateUserOrderNotes,\n getUserRecentlyDeliveredOrderIds,\n getUserProductIdsFromOrders,\n getUserProductsForRecentOrders,\n // Store Helpers\n getAllBannersForCache,\n getAllProductsForCache,\n getAllStoresForCache,\n getAllDeliverySlotsForCache,\n getAllSpecialDealsForCache,\n getAllProductTagsForCache,\n getAllTagsForCache,\n getAllTagProductMappings,\n getAllSlotsWithProductsForCache,\n getAllUserNegativityScores,\n getUserNegativityScore,\n type BannerData,\n type ProductBasicData,\n type StoreBasicData,\n type DeliverySlotData,\n type SpecialDealData,\n type ProductTagData,\n type TagBasicData,\n type TagProductMapping,\n type SlotWithProductsData,\n type UserNegativityData,\n // Automated Jobs\n toggleFlashDeliveryForItems,\n toggleKeyVal,\n getAllKeyValStore,\n // Post-order handler helpers\n getOrdersByIdsWithFullData,\n getOrderByIdWithFullData,\n type OrderWithFullData,\n type OrderWithCancellationData,\n // Common API helpers\n getSuspendedProductIds,\n getNextDeliveryDateWithCapacity,\n getStoresSummary,\n healthCheck,\n // Delete orders helper\n deleteOrdersWithRelations,\n // Seed helpers\n seedUnits,\n seedStaffRoles,\n seedStaffPermissions,\n seedRolePermissions,\n seedKeyValStore,\n type UnitSeedData,\n type RolePermissionAssignment,\n type KeyValSeedData,\n type StaffRoleName,\n type StaffPermissionName,\n // Upload URL Helpers\n createUploadUrlStatus,\n claimUploadUrlStatus,\n} from 'sqliteService'\n", "// Database Service - Central export for all database-related imports\n// This file re-exports everything from postgresImporter to provide a clean abstraction layer\n\nimport type { AdminOrderDetails } from '@packages/shared'\n// import { getOrderDetails } from '@/src/postgresImporter'\nimport { getOrderDetails, initDb } from '@/src/sqliteImporter'\n\n// Re-export everything from postgresImporter\n// export * from '@/src/postgresImporter'\n\nexport * from '@/src/sqliteImporter'\n\nexport { initDb }\n\n// Re-export getOrderDetails with the correct signature\nexport async function getOrderDetailsWrapper(orderId: number): Promise {\n return getOrderDetails(orderId)\n}\n\n// Re-export all types from shared package\nexport type {\n // Admin types\n Banner,\n Complaint,\n ComplaintWithUser,\n Constant,\n ConstantUpdateResult,\n Coupon,\n CouponValidationResult,\n UserMiniInfo,\n Store,\n StaffUser,\n StaffRole,\n AdminOrderRow,\n AdminOrderDetails,\n AdminOrderUpdateResult,\n AdminOrderItemPackagingResult,\n AdminOrderMessageResult,\n AdminOrderBasicResult,\n AdminGetSlotOrdersResult,\n AdminGetAllOrdersResult,\n AdminGetAllOrdersResultWithUserId,\n AdminRebalanceSlotsResult,\n AdminCancelOrderResult,\n AdminUnit,\n AdminProduct,\n AdminProductWithRelations,\n AdminProductWithDetails,\n AdminProductTagInfo,\n AdminProductTagWithProducts,\n AdminProductListResponse,\n AdminProductResponse,\n AdminDeleteProductResult,\n AdminToggleOutOfStockResult,\n AdminUpdateSlotProductsResult,\n AdminSlotProductIdsResult,\n AdminSlotsProductIdsResult,\n AdminProductReview,\n AdminProductReviewWithSignedUrls,\n AdminProductReviewsResult,\n AdminProductReviewResponse,\n AdminProductGroup,\n AdminProductGroupsResult,\n AdminProductGroupResponse,\n AdminProductGroupInfo,\n AdminUpdateProductPricesResult,\n AdminDeliverySlot,\n AdminSlotProductSummary,\n AdminSlotWithProducts,\n AdminSlotWithProductsAndSnippets,\n AdminSlotWithProductsAndSnippetsBase,\n AdminSlotsResult,\n AdminSlotsListResult,\n AdminSlotResult,\n AdminSlotCreateResult,\n AdminSlotUpdateResult,\n AdminSlotDeleteResult,\n AdminDeliverySequence,\n AdminDeliverySequenceResult,\n AdminUpdateDeliverySequenceResult,\n AdminUpdateSlotCapacityResult,\n AdminVendorSnippet,\n AdminVendorSnippetWithAccess,\n AdminVendorSnippetWithSlot,\n AdminVendorSnippetProduct,\n AdminVendorSnippetWithProducts,\n AdminVendorSnippetCreateInput,\n AdminVendorSnippetUpdateInput,\n AdminVendorSnippetDeleteResult,\n AdminVendorSnippetOrderProduct,\n AdminVendorSnippetOrderSummary,\n AdminVendorSnippetOrdersResult,\n AdminVendorSnippetOrdersWithSlotResult,\n AdminVendorOrderSummary,\n AdminUpcomingSlotsResult,\n AdminVendorUpdatePackagingResult,\n UserAddress,\n UserAddressResponse,\n UserAddressesResponse,\n UserAddressDeleteResponse,\n UserBanner,\n UserBannersResponse,\n UserCartProduct,\n UserCartItem,\n UserCartResponse,\n UserComplaint,\n UserComplaintsResponse,\n UserRaiseComplaintResponse,\n UserStoreSummary,\n UserStoreSummaryData,\n UserStoresResponse,\n UserStoreSampleProduct,\n UserStoreSampleProductData,\n UserStoreDetail,\n UserStoreDetailData,\n UserStoreProduct,\n UserStoreProductData,\n UserTagSummary,\n UserProductDetail,\n UserProductDetailData,\n UserProductReview,\n UserProductReviewWithSignedUrls,\n UserProductReviewsResponse,\n UserCreateReviewResponse,\n UserSlotProduct,\n UserSlotWithProducts,\n UserSlotData,\n UserSlotAvailability,\n UserDeliverySlot,\n UserSlotsResponse,\n UserSlotsWithProductsResponse,\n UserSlotsListResponse,\n UserPaymentOrderResponse,\n UserPaymentVerifyResponse,\n UserPaymentFailResponse,\n UserAuthProfile,\n UserAuthResponse,\n UserAuthResult,\n UserOtpVerifyResponse,\n UserPasswordUpdateResponse,\n UserProfileResponse,\n UserDeleteAccountResponse,\n UserCouponUsage,\n UserCouponApplicableUser,\n UserCouponApplicableProduct,\n UserCoupon,\n UserCouponWithRelations,\n UserEligibleCouponsResponse,\n UserCouponDisplay,\n UserMyCouponsResponse,\n UserRedeemCouponResponse,\n UserSelfDataResponse,\n UserProfileCompleteResponse,\n UserSavePushTokenResponse,\n UserOrderItemSummary,\n UserOrderSummary,\n UserOrdersResponse,\n UserOrderDetail,\n UserCancelOrderResponse,\n UserUpdateNotesResponse,\n UserRecentProduct,\n UserRecentProductsResponse,\n // Store types\n StoreSummary,\n StoresSummaryResponse,\n} from '@packages/shared';\n\nexport type {\n // User types\n User,\n UserDetails,\n Address,\n Product,\n CartItem,\n Order,\n OrderItem,\n Payment,\n} from '@packages/shared';\n", "export const encoder = new TextEncoder();\nexport const decoder = new TextDecoder();\nconst MAX_INT32 = 2 ** 32;\nexport function concat(...buffers) {\n const size = buffers.reduce((acc, { length }) => acc + length, 0);\n const buf = new Uint8Array(size);\n let i = 0;\n for (const buffer of buffers) {\n buf.set(buffer, i);\n i += buffer.length;\n }\n return buf;\n}\nfunction writeUInt32BE(buf, value, offset) {\n if (value < 0 || value >= MAX_INT32) {\n throw new RangeError(`value must be >= 0 and <= ${MAX_INT32 - 1}. Received ${value}`);\n }\n buf.set([value >>> 24, value >>> 16, value >>> 8, value & 0xff], offset);\n}\nexport function uint64be(value) {\n const high = Math.floor(value / MAX_INT32);\n const low = value % MAX_INT32;\n const buf = new Uint8Array(8);\n writeUInt32BE(buf, high, 0);\n writeUInt32BE(buf, low, 4);\n return buf;\n}\nexport function uint32be(value) {\n const buf = new Uint8Array(4);\n writeUInt32BE(buf, value);\n return buf;\n}\nexport function encode(string) {\n const bytes = new Uint8Array(string.length);\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code > 127) {\n throw new TypeError('non-ASCII string encountered in encode()');\n }\n bytes[i] = code;\n }\n return bytes;\n}\n", "export function encodeBase64(input) {\n if (Uint8Array.prototype.toBase64) {\n return input.toBase64();\n }\n const CHUNK_SIZE = 0x8000;\n const arr = [];\n for (let i = 0; i < input.length; i += CHUNK_SIZE) {\n arr.push(String.fromCharCode.apply(null, input.subarray(i, i + CHUNK_SIZE)));\n }\n return btoa(arr.join(''));\n}\nexport function decodeBase64(encoded) {\n if (Uint8Array.fromBase64) {\n return Uint8Array.fromBase64(encoded);\n }\n const binary = atob(encoded);\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i);\n }\n return bytes;\n}\n", "import { encoder, decoder } from '../lib/buffer_utils.js';\nimport { encodeBase64, decodeBase64 } from '../lib/base64.js';\nexport function decode(input) {\n if (Uint8Array.fromBase64) {\n return Uint8Array.fromBase64(typeof input === 'string' ? input : decoder.decode(input), {\n alphabet: 'base64url',\n });\n }\n let encoded = input;\n if (encoded instanceof Uint8Array) {\n encoded = decoder.decode(encoded);\n }\n encoded = encoded.replace(/-/g, '+').replace(/_/g, '/');\n try {\n return decodeBase64(encoded);\n }\n catch {\n throw new TypeError('The input to be decoded is not correctly encoded.');\n }\n}\nexport function encode(input) {\n let unencoded = input;\n if (typeof unencoded === 'string') {\n unencoded = encoder.encode(unencoded);\n }\n if (Uint8Array.prototype.toBase64) {\n return unencoded.toBase64({ alphabet: 'base64url', omitPadding: true });\n }\n return encodeBase64(unencoded).replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n}\n", "const unusable = (name, prop = 'algorithm.name') => new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`);\nconst isAlgorithm = (algorithm, name) => algorithm.name === name;\nfunction getHashLength(hash) {\n return parseInt(hash.name.slice(4), 10);\n}\nfunction checkHashLength(algorithm, expected) {\n const actual = getHashLength(algorithm.hash);\n if (actual !== expected)\n throw unusable(`SHA-${expected}`, 'algorithm.hash');\n}\nfunction getNamedCurve(alg) {\n switch (alg) {\n case 'ES256':\n return 'P-256';\n case 'ES384':\n return 'P-384';\n case 'ES512':\n return 'P-521';\n default:\n throw new Error('unreachable');\n }\n}\nfunction checkUsage(key, usage) {\n if (usage && !key.usages.includes(usage)) {\n throw new TypeError(`CryptoKey does not support this operation, its usages must include ${usage}.`);\n }\n}\nexport function checkSigCryptoKey(key, alg, usage) {\n switch (alg) {\n case 'HS256':\n case 'HS384':\n case 'HS512': {\n if (!isAlgorithm(key.algorithm, 'HMAC'))\n throw unusable('HMAC');\n checkHashLength(key.algorithm, parseInt(alg.slice(2), 10));\n break;\n }\n case 'RS256':\n case 'RS384':\n case 'RS512': {\n if (!isAlgorithm(key.algorithm, 'RSASSA-PKCS1-v1_5'))\n throw unusable('RSASSA-PKCS1-v1_5');\n checkHashLength(key.algorithm, parseInt(alg.slice(2), 10));\n break;\n }\n case 'PS256':\n case 'PS384':\n case 'PS512': {\n if (!isAlgorithm(key.algorithm, 'RSA-PSS'))\n throw unusable('RSA-PSS');\n checkHashLength(key.algorithm, parseInt(alg.slice(2), 10));\n break;\n }\n case 'Ed25519':\n case 'EdDSA': {\n if (!isAlgorithm(key.algorithm, 'Ed25519'))\n throw unusable('Ed25519');\n break;\n }\n case 'ML-DSA-44':\n case 'ML-DSA-65':\n case 'ML-DSA-87': {\n if (!isAlgorithm(key.algorithm, alg))\n throw unusable(alg);\n break;\n }\n case 'ES256':\n case 'ES384':\n case 'ES512': {\n if (!isAlgorithm(key.algorithm, 'ECDSA'))\n throw unusable('ECDSA');\n const expected = getNamedCurve(alg);\n const actual = key.algorithm.namedCurve;\n if (actual !== expected)\n throw unusable(expected, 'algorithm.namedCurve');\n break;\n }\n default:\n throw new TypeError('CryptoKey does not support this operation');\n }\n checkUsage(key, usage);\n}\nexport function checkEncCryptoKey(key, alg, usage) {\n switch (alg) {\n case 'A128GCM':\n case 'A192GCM':\n case 'A256GCM': {\n if (!isAlgorithm(key.algorithm, 'AES-GCM'))\n throw unusable('AES-GCM');\n const expected = parseInt(alg.slice(1, 4), 10);\n const actual = key.algorithm.length;\n if (actual !== expected)\n throw unusable(expected, 'algorithm.length');\n break;\n }\n case 'A128KW':\n case 'A192KW':\n case 'A256KW': {\n if (!isAlgorithm(key.algorithm, 'AES-KW'))\n throw unusable('AES-KW');\n const expected = parseInt(alg.slice(1, 4), 10);\n const actual = key.algorithm.length;\n if (actual !== expected)\n throw unusable(expected, 'algorithm.length');\n break;\n }\n case 'ECDH': {\n switch (key.algorithm.name) {\n case 'ECDH':\n case 'X25519':\n break;\n default:\n throw unusable('ECDH or X25519');\n }\n break;\n }\n case 'PBES2-HS256+A128KW':\n case 'PBES2-HS384+A192KW':\n case 'PBES2-HS512+A256KW':\n if (!isAlgorithm(key.algorithm, 'PBKDF2'))\n throw unusable('PBKDF2');\n break;\n case 'RSA-OAEP':\n case 'RSA-OAEP-256':\n case 'RSA-OAEP-384':\n case 'RSA-OAEP-512': {\n if (!isAlgorithm(key.algorithm, 'RSA-OAEP'))\n throw unusable('RSA-OAEP');\n checkHashLength(key.algorithm, parseInt(alg.slice(9), 10) || 1);\n break;\n }\n default:\n throw new TypeError('CryptoKey does not support this operation');\n }\n checkUsage(key, usage);\n}\n", "function message(msg, actual, ...types) {\n types = types.filter(Boolean);\n if (types.length > 2) {\n const last = types.pop();\n msg += `one of type ${types.join(', ')}, or ${last}.`;\n }\n else if (types.length === 2) {\n msg += `one of type ${types[0]} or ${types[1]}.`;\n }\n else {\n msg += `of type ${types[0]}.`;\n }\n if (actual == null) {\n msg += ` Received ${actual}`;\n }\n else if (typeof actual === 'function' && actual.name) {\n msg += ` Received function ${actual.name}`;\n }\n else if (typeof actual === 'object' && actual != null) {\n if (actual.constructor?.name) {\n msg += ` Received an instance of ${actual.constructor.name}`;\n }\n }\n return msg;\n}\nexport const invalidKeyInput = (actual, ...types) => message('Key must be ', actual, ...types);\nexport const withAlg = (alg, actual, ...types) => message(`Key for the ${alg} algorithm must be `, actual, ...types);\n", "export class JOSEError extends Error {\n static code = 'ERR_JOSE_GENERIC';\n code = 'ERR_JOSE_GENERIC';\n constructor(message, options) {\n super(message, options);\n this.name = this.constructor.name;\n Error.captureStackTrace?.(this, this.constructor);\n }\n}\nexport class JWTClaimValidationFailed extends JOSEError {\n static code = 'ERR_JWT_CLAIM_VALIDATION_FAILED';\n code = 'ERR_JWT_CLAIM_VALIDATION_FAILED';\n claim;\n reason;\n payload;\n constructor(message, payload, claim = 'unspecified', reason = 'unspecified') {\n super(message, { cause: { claim, reason, payload } });\n this.claim = claim;\n this.reason = reason;\n this.payload = payload;\n }\n}\nexport class JWTExpired extends JOSEError {\n static code = 'ERR_JWT_EXPIRED';\n code = 'ERR_JWT_EXPIRED';\n claim;\n reason;\n payload;\n constructor(message, payload, claim = 'unspecified', reason = 'unspecified') {\n super(message, { cause: { claim, reason, payload } });\n this.claim = claim;\n this.reason = reason;\n this.payload = payload;\n }\n}\nexport class JOSEAlgNotAllowed extends JOSEError {\n static code = 'ERR_JOSE_ALG_NOT_ALLOWED';\n code = 'ERR_JOSE_ALG_NOT_ALLOWED';\n}\nexport class JOSENotSupported extends JOSEError {\n static code = 'ERR_JOSE_NOT_SUPPORTED';\n code = 'ERR_JOSE_NOT_SUPPORTED';\n}\nexport class JWEDecryptionFailed extends JOSEError {\n static code = 'ERR_JWE_DECRYPTION_FAILED';\n code = 'ERR_JWE_DECRYPTION_FAILED';\n constructor(message = 'decryption operation failed', options) {\n super(message, options);\n }\n}\nexport class JWEInvalid extends JOSEError {\n static code = 'ERR_JWE_INVALID';\n code = 'ERR_JWE_INVALID';\n}\nexport class JWSInvalid extends JOSEError {\n static code = 'ERR_JWS_INVALID';\n code = 'ERR_JWS_INVALID';\n}\nexport class JWTInvalid extends JOSEError {\n static code = 'ERR_JWT_INVALID';\n code = 'ERR_JWT_INVALID';\n}\nexport class JWKInvalid extends JOSEError {\n static code = 'ERR_JWK_INVALID';\n code = 'ERR_JWK_INVALID';\n}\nexport class JWKSInvalid extends JOSEError {\n static code = 'ERR_JWKS_INVALID';\n code = 'ERR_JWKS_INVALID';\n}\nexport class JWKSNoMatchingKey extends JOSEError {\n static code = 'ERR_JWKS_NO_MATCHING_KEY';\n code = 'ERR_JWKS_NO_MATCHING_KEY';\n constructor(message = 'no applicable key found in the JSON Web Key Set', options) {\n super(message, options);\n }\n}\nexport class JWKSMultipleMatchingKeys extends JOSEError {\n [Symbol.asyncIterator];\n static code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';\n code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';\n constructor(message = 'multiple matching keys found in the JSON Web Key Set', options) {\n super(message, options);\n }\n}\nexport class JWKSTimeout extends JOSEError {\n static code = 'ERR_JWKS_TIMEOUT';\n code = 'ERR_JWKS_TIMEOUT';\n constructor(message = 'request timed out', options) {\n super(message, options);\n }\n}\nexport class JWSSignatureVerificationFailed extends JOSEError {\n static code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED';\n code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED';\n constructor(message = 'signature verification failed', options) {\n super(message, options);\n }\n}\n", "export function assertCryptoKey(key) {\n if (!isCryptoKey(key)) {\n throw new Error('CryptoKey instance expected');\n }\n}\nexport const isCryptoKey = (key) => {\n if (key?.[Symbol.toStringTag] === 'CryptoKey')\n return true;\n try {\n return key instanceof CryptoKey;\n }\n catch {\n return false;\n }\n};\nexport const isKeyObject = (key) => key?.[Symbol.toStringTag] === 'KeyObject';\nexport const isKeyLike = (key) => isCryptoKey(key) || isKeyObject(key);\n", "import { decode } from '../util/base64url.js';\nexport const unprotected = Symbol();\nexport function assertNotSet(value, name) {\n if (value) {\n throw new TypeError(`${name} can only be called once`);\n }\n}\nexport function decodeBase64url(value, label, ErrorClass) {\n try {\n return decode(value);\n }\n catch {\n throw new ErrorClass(`Failed to base64url decode the ${label}`);\n }\n}\nexport async function digest(algorithm, data) {\n const subtleDigest = `SHA-${algorithm.slice(-3)}`;\n return new Uint8Array(await crypto.subtle.digest(subtleDigest, data));\n}\n", "const isObjectLike = (value) => typeof value === 'object' && value !== null;\nexport function isObject(input) {\n if (!isObjectLike(input) || Object.prototype.toString.call(input) !== '[object Object]') {\n return false;\n }\n if (Object.getPrototypeOf(input) === null) {\n return true;\n }\n let proto = input;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(input) === proto;\n}\nexport function isDisjoint(...headers) {\n const sources = headers.filter(Boolean);\n if (sources.length === 0 || sources.length === 1) {\n return true;\n }\n let acc;\n for (const header of sources) {\n const parameters = Object.keys(header);\n if (!acc || acc.size === 0) {\n acc = new Set(parameters);\n continue;\n }\n for (const parameter of parameters) {\n if (acc.has(parameter)) {\n return false;\n }\n acc.add(parameter);\n }\n }\n return true;\n}\nexport const isJWK = (key) => isObject(key) && typeof key.kty === 'string';\nexport const isPrivateJWK = (key) => key.kty !== 'oct' &&\n ((key.kty === 'AKP' && typeof key.priv === 'string') || typeof key.d === 'string');\nexport const isPublicJWK = (key) => key.kty !== 'oct' && key.d === undefined && key.priv === undefined;\nexport const isSecretJWK = (key) => key.kty === 'oct' && typeof key.k === 'string';\n", "import { JOSENotSupported } from '../util/errors.js';\nimport { checkSigCryptoKey } from './crypto_key.js';\nimport { invalidKeyInput } from './invalid_key_input.js';\nexport function checkKeyLength(alg, key) {\n if (alg.startsWith('RS') || alg.startsWith('PS')) {\n const { modulusLength } = key.algorithm;\n if (typeof modulusLength !== 'number' || modulusLength < 2048) {\n throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);\n }\n }\n}\nfunction subtleAlgorithm(alg, algorithm) {\n const hash = `SHA-${alg.slice(-3)}`;\n switch (alg) {\n case 'HS256':\n case 'HS384':\n case 'HS512':\n return { hash, name: 'HMAC' };\n case 'PS256':\n case 'PS384':\n case 'PS512':\n return { hash, name: 'RSA-PSS', saltLength: parseInt(alg.slice(-3), 10) >> 3 };\n case 'RS256':\n case 'RS384':\n case 'RS512':\n return { hash, name: 'RSASSA-PKCS1-v1_5' };\n case 'ES256':\n case 'ES384':\n case 'ES512':\n return { hash, name: 'ECDSA', namedCurve: algorithm.namedCurve };\n case 'Ed25519':\n case 'EdDSA':\n return { name: 'Ed25519' };\n case 'ML-DSA-44':\n case 'ML-DSA-65':\n case 'ML-DSA-87':\n return { name: alg };\n default:\n throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);\n }\n}\nasync function getSigKey(alg, key, usage) {\n if (key instanceof Uint8Array) {\n if (!alg.startsWith('HS')) {\n throw new TypeError(invalidKeyInput(key, 'CryptoKey', 'KeyObject', 'JSON Web Key'));\n }\n return crypto.subtle.importKey('raw', key, { hash: `SHA-${alg.slice(-3)}`, name: 'HMAC' }, false, [usage]);\n }\n checkSigCryptoKey(key, alg, usage);\n return key;\n}\nexport async function sign(alg, key, data) {\n const cryptoKey = await getSigKey(alg, key, 'sign');\n checkKeyLength(alg, cryptoKey);\n const signature = await crypto.subtle.sign(subtleAlgorithm(alg, cryptoKey.algorithm), cryptoKey, data);\n return new Uint8Array(signature);\n}\nexport async function verify(alg, key, signature, data) {\n const cryptoKey = await getSigKey(alg, key, 'verify');\n checkKeyLength(alg, cryptoKey);\n const algorithm = subtleAlgorithm(alg, cryptoKey.algorithm);\n try {\n return await crypto.subtle.verify(algorithm, cryptoKey, signature, data);\n }\n catch {\n return false;\n }\n}\n", "import { JOSENotSupported } from '../util/errors.js';\nconst unsupportedAlg = 'Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value';\nfunction subtleMapping(jwk) {\n let algorithm;\n let keyUsages;\n switch (jwk.kty) {\n case 'AKP': {\n switch (jwk.alg) {\n case 'ML-DSA-44':\n case 'ML-DSA-65':\n case 'ML-DSA-87':\n algorithm = { name: jwk.alg };\n keyUsages = jwk.priv ? ['sign'] : ['verify'];\n break;\n default:\n throw new JOSENotSupported(unsupportedAlg);\n }\n break;\n }\n case 'RSA': {\n switch (jwk.alg) {\n case 'PS256':\n case 'PS384':\n case 'PS512':\n algorithm = { name: 'RSA-PSS', hash: `SHA-${jwk.alg.slice(-3)}` };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'RS256':\n case 'RS384':\n case 'RS512':\n algorithm = { name: 'RSASSA-PKCS1-v1_5', hash: `SHA-${jwk.alg.slice(-3)}` };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'RSA-OAEP':\n case 'RSA-OAEP-256':\n case 'RSA-OAEP-384':\n case 'RSA-OAEP-512':\n algorithm = {\n name: 'RSA-OAEP',\n hash: `SHA-${parseInt(jwk.alg.slice(-3), 10) || 1}`,\n };\n keyUsages = jwk.d ? ['decrypt', 'unwrapKey'] : ['encrypt', 'wrapKey'];\n break;\n default:\n throw new JOSENotSupported(unsupportedAlg);\n }\n break;\n }\n case 'EC': {\n switch (jwk.alg) {\n case 'ES256':\n case 'ES384':\n case 'ES512':\n algorithm = {\n name: 'ECDSA',\n namedCurve: { ES256: 'P-256', ES384: 'P-384', ES512: 'P-521' }[jwk.alg],\n };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'ECDH-ES':\n case 'ECDH-ES+A128KW':\n case 'ECDH-ES+A192KW':\n case 'ECDH-ES+A256KW':\n algorithm = { name: 'ECDH', namedCurve: jwk.crv };\n keyUsages = jwk.d ? ['deriveBits'] : [];\n break;\n default:\n throw new JOSENotSupported(unsupportedAlg);\n }\n break;\n }\n case 'OKP': {\n switch (jwk.alg) {\n case 'Ed25519':\n case 'EdDSA':\n algorithm = { name: 'Ed25519' };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'ECDH-ES':\n case 'ECDH-ES+A128KW':\n case 'ECDH-ES+A192KW':\n case 'ECDH-ES+A256KW':\n algorithm = { name: jwk.crv };\n keyUsages = jwk.d ? ['deriveBits'] : [];\n break;\n default:\n throw new JOSENotSupported(unsupportedAlg);\n }\n break;\n }\n default:\n throw new JOSENotSupported('Invalid or unsupported JWK \"kty\" (Key Type) Parameter value');\n }\n return { algorithm, keyUsages };\n}\nexport async function jwkToKey(jwk) {\n if (!jwk.alg) {\n throw new TypeError('\"alg\" argument is required when \"jwk.alg\" is not present');\n }\n const { algorithm, keyUsages } = subtleMapping(jwk);\n const keyData = { ...jwk };\n if (keyData.kty !== 'AKP') {\n delete keyData.alg;\n }\n delete keyData.use;\n return crypto.subtle.importKey('jwk', keyData, algorithm, jwk.ext ?? (jwk.d || jwk.priv ? false : true), jwk.key_ops ?? keyUsages);\n}\n", "import { isJWK } from './type_checks.js';\nimport { decode } from '../util/base64url.js';\nimport { jwkToKey } from './jwk_to_key.js';\nimport { isCryptoKey, isKeyObject } from './is_key_like.js';\nconst unusableForAlg = 'given KeyObject instance cannot be used for this algorithm';\nlet cache;\nconst handleJWK = async (key, jwk, alg, freeze = false) => {\n cache ||= new WeakMap();\n let cached = cache.get(key);\n if (cached?.[alg]) {\n return cached[alg];\n }\n const cryptoKey = await jwkToKey({ ...jwk, alg });\n if (freeze)\n Object.freeze(key);\n if (!cached) {\n cache.set(key, { [alg]: cryptoKey });\n }\n else {\n cached[alg] = cryptoKey;\n }\n return cryptoKey;\n};\nconst handleKeyObject = (keyObject, alg) => {\n cache ||= new WeakMap();\n let cached = cache.get(keyObject);\n if (cached?.[alg]) {\n return cached[alg];\n }\n const isPublic = keyObject.type === 'public';\n const extractable = isPublic ? true : false;\n let cryptoKey;\n if (keyObject.asymmetricKeyType === 'x25519') {\n switch (alg) {\n case 'ECDH-ES':\n case 'ECDH-ES+A128KW':\n case 'ECDH-ES+A192KW':\n case 'ECDH-ES+A256KW':\n break;\n default:\n throw new TypeError(unusableForAlg);\n }\n cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, isPublic ? [] : ['deriveBits']);\n }\n if (keyObject.asymmetricKeyType === 'ed25519') {\n if (alg !== 'EdDSA' && alg !== 'Ed25519') {\n throw new TypeError(unusableForAlg);\n }\n cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [\n isPublic ? 'verify' : 'sign',\n ]);\n }\n switch (keyObject.asymmetricKeyType) {\n case 'ml-dsa-44':\n case 'ml-dsa-65':\n case 'ml-dsa-87': {\n if (alg !== keyObject.asymmetricKeyType.toUpperCase()) {\n throw new TypeError(unusableForAlg);\n }\n cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [\n isPublic ? 'verify' : 'sign',\n ]);\n }\n }\n if (keyObject.asymmetricKeyType === 'rsa') {\n let hash;\n switch (alg) {\n case 'RSA-OAEP':\n hash = 'SHA-1';\n break;\n case 'RS256':\n case 'PS256':\n case 'RSA-OAEP-256':\n hash = 'SHA-256';\n break;\n case 'RS384':\n case 'PS384':\n case 'RSA-OAEP-384':\n hash = 'SHA-384';\n break;\n case 'RS512':\n case 'PS512':\n case 'RSA-OAEP-512':\n hash = 'SHA-512';\n break;\n default:\n throw new TypeError(unusableForAlg);\n }\n if (alg.startsWith('RSA-OAEP')) {\n return keyObject.toCryptoKey({\n name: 'RSA-OAEP',\n hash,\n }, extractable, isPublic ? ['encrypt'] : ['decrypt']);\n }\n cryptoKey = keyObject.toCryptoKey({\n name: alg.startsWith('PS') ? 'RSA-PSS' : 'RSASSA-PKCS1-v1_5',\n hash,\n }, extractable, [isPublic ? 'verify' : 'sign']);\n }\n if (keyObject.asymmetricKeyType === 'ec') {\n const nist = new Map([\n ['prime256v1', 'P-256'],\n ['secp384r1', 'P-384'],\n ['secp521r1', 'P-521'],\n ]);\n const namedCurve = nist.get(keyObject.asymmetricKeyDetails?.namedCurve);\n if (!namedCurve) {\n throw new TypeError(unusableForAlg);\n }\n const expectedCurve = { ES256: 'P-256', ES384: 'P-384', ES512: 'P-521' };\n if (expectedCurve[alg] && namedCurve === expectedCurve[alg]) {\n cryptoKey = keyObject.toCryptoKey({\n name: 'ECDSA',\n namedCurve,\n }, extractable, [isPublic ? 'verify' : 'sign']);\n }\n if (alg.startsWith('ECDH-ES')) {\n cryptoKey = keyObject.toCryptoKey({\n name: 'ECDH',\n namedCurve,\n }, extractable, isPublic ? [] : ['deriveBits']);\n }\n }\n if (!cryptoKey) {\n throw new TypeError(unusableForAlg);\n }\n if (!cached) {\n cache.set(keyObject, { [alg]: cryptoKey });\n }\n else {\n cached[alg] = cryptoKey;\n }\n return cryptoKey;\n};\nexport async function normalizeKey(key, alg) {\n if (key instanceof Uint8Array) {\n return key;\n }\n if (isCryptoKey(key)) {\n return key;\n }\n if (isKeyObject(key)) {\n if (key.type === 'secret') {\n return key.export();\n }\n if ('toCryptoKey' in key && typeof key.toCryptoKey === 'function') {\n try {\n return handleKeyObject(key, alg);\n }\n catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n }\n }\n let jwk = key.export({ format: 'jwk' });\n return handleJWK(key, jwk, alg);\n }\n if (isJWK(key)) {\n if (key.k) {\n return decode(key.k);\n }\n return handleJWK(key, key, alg, true);\n }\n throw new Error('unreachable');\n}\n", "import { JOSENotSupported, JWEInvalid, JWSInvalid } from '../util/errors.js';\nexport function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) {\n if (joseHeader.crit !== undefined && protectedHeader?.crit === undefined) {\n throw new Err('\"crit\" (Critical) Header Parameter MUST be integrity protected');\n }\n if (!protectedHeader || protectedHeader.crit === undefined) {\n return new Set();\n }\n if (!Array.isArray(protectedHeader.crit) ||\n protectedHeader.crit.length === 0 ||\n protectedHeader.crit.some((input) => typeof input !== 'string' || input.length === 0)) {\n throw new Err('\"crit\" (Critical) Header Parameter MUST be an array of non-empty strings when present');\n }\n let recognized;\n if (recognizedOption !== undefined) {\n recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]);\n }\n else {\n recognized = recognizedDefault;\n }\n for (const parameter of protectedHeader.crit) {\n if (!recognized.has(parameter)) {\n throw new JOSENotSupported(`Extension Header Parameter \"${parameter}\" is not recognized`);\n }\n if (joseHeader[parameter] === undefined) {\n throw new Err(`Extension Header Parameter \"${parameter}\" is missing`);\n }\n if (recognized.get(parameter) && protectedHeader[parameter] === undefined) {\n throw new Err(`Extension Header Parameter \"${parameter}\" MUST be integrity protected`);\n }\n }\n return new Set(protectedHeader.crit);\n}\n", "export function validateAlgorithms(option, algorithms) {\n if (algorithms !== undefined &&\n (!Array.isArray(algorithms) || algorithms.some((s) => typeof s !== 'string'))) {\n throw new TypeError(`\"${option}\" option must be an array of strings`);\n }\n if (!algorithms) {\n return undefined;\n }\n return new Set(algorithms);\n}\n", "import { withAlg as invalidKeyInput } from './invalid_key_input.js';\nimport { isKeyLike } from './is_key_like.js';\nimport * as jwk from './type_checks.js';\nconst tag = (key) => key?.[Symbol.toStringTag];\nconst jwkMatchesOp = (alg, key, usage) => {\n if (key.use !== undefined) {\n let expected;\n switch (usage) {\n case 'sign':\n case 'verify':\n expected = 'sig';\n break;\n case 'encrypt':\n case 'decrypt':\n expected = 'enc';\n break;\n }\n if (key.use !== expected) {\n throw new TypeError(`Invalid key for this operation, its \"use\" must be \"${expected}\" when present`);\n }\n }\n if (key.alg !== undefined && key.alg !== alg) {\n throw new TypeError(`Invalid key for this operation, its \"alg\" must be \"${alg}\" when present`);\n }\n if (Array.isArray(key.key_ops)) {\n let expectedKeyOp;\n switch (true) {\n case usage === 'sign' || usage === 'verify':\n case alg === 'dir':\n case alg.includes('CBC-HS'):\n expectedKeyOp = usage;\n break;\n case alg.startsWith('PBES2'):\n expectedKeyOp = 'deriveBits';\n break;\n case /^A\\d{3}(?:GCM)?(?:KW)?$/.test(alg):\n if (!alg.includes('GCM') && alg.endsWith('KW')) {\n expectedKeyOp = usage === 'encrypt' ? 'wrapKey' : 'unwrapKey';\n }\n else {\n expectedKeyOp = usage;\n }\n break;\n case usage === 'encrypt' && alg.startsWith('RSA'):\n expectedKeyOp = 'wrapKey';\n break;\n case usage === 'decrypt':\n expectedKeyOp = alg.startsWith('RSA') ? 'unwrapKey' : 'deriveBits';\n break;\n }\n if (expectedKeyOp && key.key_ops?.includes?.(expectedKeyOp) === false) {\n throw new TypeError(`Invalid key for this operation, its \"key_ops\" must include \"${expectedKeyOp}\" when present`);\n }\n }\n return true;\n};\nconst symmetricTypeCheck = (alg, key, usage) => {\n if (key instanceof Uint8Array)\n return;\n if (jwk.isJWK(key)) {\n if (jwk.isSecretJWK(key) && jwkMatchesOp(alg, key, usage))\n return;\n throw new TypeError(`JSON Web Key for symmetric algorithms must have JWK \"kty\" (Key Type) equal to \"oct\" and the JWK \"k\" (Key Value) present`);\n }\n if (!isKeyLike(key)) {\n throw new TypeError(invalidKeyInput(alg, key, 'CryptoKey', 'KeyObject', 'JSON Web Key', 'Uint8Array'));\n }\n if (key.type !== 'secret') {\n throw new TypeError(`${tag(key)} instances for symmetric algorithms must be of type \"secret\"`);\n }\n};\nconst asymmetricTypeCheck = (alg, key, usage) => {\n if (jwk.isJWK(key)) {\n switch (usage) {\n case 'decrypt':\n case 'sign':\n if (jwk.isPrivateJWK(key) && jwkMatchesOp(alg, key, usage))\n return;\n throw new TypeError(`JSON Web Key for this operation must be a private JWK`);\n case 'encrypt':\n case 'verify':\n if (jwk.isPublicJWK(key) && jwkMatchesOp(alg, key, usage))\n return;\n throw new TypeError(`JSON Web Key for this operation must be a public JWK`);\n }\n }\n if (!isKeyLike(key)) {\n throw new TypeError(invalidKeyInput(alg, key, 'CryptoKey', 'KeyObject', 'JSON Web Key'));\n }\n if (key.type === 'secret') {\n throw new TypeError(`${tag(key)} instances for asymmetric algorithms must not be of type \"secret\"`);\n }\n if (key.type === 'public') {\n switch (usage) {\n case 'sign':\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm signing must be of type \"private\"`);\n case 'decrypt':\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm decryption must be of type \"private\"`);\n }\n }\n if (key.type === 'private') {\n switch (usage) {\n case 'verify':\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm verifying must be of type \"public\"`);\n case 'encrypt':\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm encryption must be of type \"public\"`);\n }\n }\n};\nexport function checkKeyType(alg, key, usage) {\n switch (alg.substring(0, 2)) {\n case 'A1':\n case 'A2':\n case 'di':\n case 'HS':\n case 'PB':\n symmetricTypeCheck(alg, key, usage);\n break;\n default:\n asymmetricTypeCheck(alg, key, usage);\n }\n}\n", "import { decode as b64u } from '../../util/base64url.js';\nimport { verify } from '../../lib/signing.js';\nimport { JOSEAlgNotAllowed, JWSInvalid, JWSSignatureVerificationFailed } from '../../util/errors.js';\nimport { concat, encoder, decoder, encode } from '../../lib/buffer_utils.js';\nimport { decodeBase64url } from '../../lib/helpers.js';\nimport { isDisjoint } from '../../lib/type_checks.js';\nimport { isObject } from '../../lib/type_checks.js';\nimport { checkKeyType } from '../../lib/check_key_type.js';\nimport { validateCrit } from '../../lib/validate_crit.js';\nimport { validateAlgorithms } from '../../lib/validate_algorithms.js';\nimport { normalizeKey } from '../../lib/normalize_key.js';\nexport async function flattenedVerify(jws, key, options) {\n if (!isObject(jws)) {\n throw new JWSInvalid('Flattened JWS must be an object');\n }\n if (jws.protected === undefined && jws.header === undefined) {\n throw new JWSInvalid('Flattened JWS must have either of the \"protected\" or \"header\" members');\n }\n if (jws.protected !== undefined && typeof jws.protected !== 'string') {\n throw new JWSInvalid('JWS Protected Header incorrect type');\n }\n if (jws.payload === undefined) {\n throw new JWSInvalid('JWS Payload missing');\n }\n if (typeof jws.signature !== 'string') {\n throw new JWSInvalid('JWS Signature missing or incorrect type');\n }\n if (jws.header !== undefined && !isObject(jws.header)) {\n throw new JWSInvalid('JWS Unprotected Header incorrect type');\n }\n let parsedProt = {};\n if (jws.protected) {\n try {\n const protectedHeader = b64u(jws.protected);\n parsedProt = JSON.parse(decoder.decode(protectedHeader));\n }\n catch {\n throw new JWSInvalid('JWS Protected Header is invalid');\n }\n }\n if (!isDisjoint(parsedProt, jws.header)) {\n throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');\n }\n const joseHeader = {\n ...parsedProt,\n ...jws.header,\n };\n const extensions = validateCrit(JWSInvalid, new Map([['b64', true]]), options?.crit, parsedProt, joseHeader);\n let b64 = true;\n if (extensions.has('b64')) {\n b64 = parsedProt.b64;\n if (typeof b64 !== 'boolean') {\n throw new JWSInvalid('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean');\n }\n }\n const { alg } = joseHeader;\n if (typeof alg !== 'string' || !alg) {\n throw new JWSInvalid('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');\n }\n const algorithms = options && validateAlgorithms('algorithms', options.algorithms);\n if (algorithms && !algorithms.has(alg)) {\n throw new JOSEAlgNotAllowed('\"alg\" (Algorithm) Header Parameter value not allowed');\n }\n if (b64) {\n if (typeof jws.payload !== 'string') {\n throw new JWSInvalid('JWS Payload must be a string');\n }\n }\n else if (typeof jws.payload !== 'string' && !(jws.payload instanceof Uint8Array)) {\n throw new JWSInvalid('JWS Payload must be a string or an Uint8Array instance');\n }\n let resolvedKey = false;\n if (typeof key === 'function') {\n key = await key(parsedProt, jws);\n resolvedKey = true;\n }\n checkKeyType(alg, key, 'verify');\n const data = concat(jws.protected !== undefined ? encode(jws.protected) : new Uint8Array(), encode('.'), typeof jws.payload === 'string'\n ? b64\n ? encode(jws.payload)\n : encoder.encode(jws.payload)\n : jws.payload);\n const signature = decodeBase64url(jws.signature, 'signature', JWSInvalid);\n const k = await normalizeKey(key, alg);\n const verified = await verify(alg, k, signature, data);\n if (!verified) {\n throw new JWSSignatureVerificationFailed();\n }\n let payload;\n if (b64) {\n payload = decodeBase64url(jws.payload, 'payload', JWSInvalid);\n }\n else if (typeof jws.payload === 'string') {\n payload = encoder.encode(jws.payload);\n }\n else {\n payload = jws.payload;\n }\n const result = { payload };\n if (jws.protected !== undefined) {\n result.protectedHeader = parsedProt;\n }\n if (jws.header !== undefined) {\n result.unprotectedHeader = jws.header;\n }\n if (resolvedKey) {\n return { ...result, key: k };\n }\n return result;\n}\n", "import { flattenedVerify } from '../flattened/verify.js';\nimport { JWSInvalid } from '../../util/errors.js';\nimport { decoder } from '../../lib/buffer_utils.js';\nexport async function compactVerify(jws, key, options) {\n if (jws instanceof Uint8Array) {\n jws = decoder.decode(jws);\n }\n if (typeof jws !== 'string') {\n throw new JWSInvalid('Compact JWS must be a string or Uint8Array');\n }\n const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split('.');\n if (length !== 3) {\n throw new JWSInvalid('Invalid Compact JWS');\n }\n const verified = await flattenedVerify({ payload, protected: protectedHeader, signature }, key, options);\n const result = { payload: verified.payload, protectedHeader: verified.protectedHeader };\n if (typeof key === 'function') {\n return { ...result, key: verified.key };\n }\n return result;\n}\n", "import { JWTClaimValidationFailed, JWTExpired, JWTInvalid } from '../util/errors.js';\nimport { encoder, decoder } from './buffer_utils.js';\nimport { isObject } from './type_checks.js';\nconst epoch = (date) => Math.floor(date.getTime() / 1000);\nconst minute = 60;\nconst hour = minute * 60;\nconst day = hour * 24;\nconst week = day * 7;\nconst year = day * 365.25;\nconst REGEX = /^(\\+|\\-)? ?(\\d+|\\d+\\.\\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;\nexport function secs(str) {\n const matched = REGEX.exec(str);\n if (!matched || (matched[4] && matched[1])) {\n throw new TypeError('Invalid time period format');\n }\n const value = parseFloat(matched[2]);\n const unit = matched[3].toLowerCase();\n let numericDate;\n switch (unit) {\n case 'sec':\n case 'secs':\n case 'second':\n case 'seconds':\n case 's':\n numericDate = Math.round(value);\n break;\n case 'minute':\n case 'minutes':\n case 'min':\n case 'mins':\n case 'm':\n numericDate = Math.round(value * minute);\n break;\n case 'hour':\n case 'hours':\n case 'hr':\n case 'hrs':\n case 'h':\n numericDate = Math.round(value * hour);\n break;\n case 'day':\n case 'days':\n case 'd':\n numericDate = Math.round(value * day);\n break;\n case 'week':\n case 'weeks':\n case 'w':\n numericDate = Math.round(value * week);\n break;\n default:\n numericDate = Math.round(value * year);\n break;\n }\n if (matched[1] === '-' || matched[4] === 'ago') {\n return -numericDate;\n }\n return numericDate;\n}\nfunction validateInput(label, input) {\n if (!Number.isFinite(input)) {\n throw new TypeError(`Invalid ${label} input`);\n }\n return input;\n}\nconst normalizeTyp = (value) => {\n if (value.includes('/')) {\n return value.toLowerCase();\n }\n return `application/${value.toLowerCase()}`;\n};\nconst checkAudiencePresence = (audPayload, audOption) => {\n if (typeof audPayload === 'string') {\n return audOption.includes(audPayload);\n }\n if (Array.isArray(audPayload)) {\n return audOption.some(Set.prototype.has.bind(new Set(audPayload)));\n }\n return false;\n};\nexport function validateClaimsSet(protectedHeader, encodedPayload, options = {}) {\n let payload;\n try {\n payload = JSON.parse(decoder.decode(encodedPayload));\n }\n catch {\n }\n if (!isObject(payload)) {\n throw new JWTInvalid('JWT Claims Set must be a top-level JSON object');\n }\n const { typ } = options;\n if (typ &&\n (typeof protectedHeader.typ !== 'string' ||\n normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) {\n throw new JWTClaimValidationFailed('unexpected \"typ\" JWT header value', payload, 'typ', 'check_failed');\n }\n const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options;\n const presenceCheck = [...requiredClaims];\n if (maxTokenAge !== undefined)\n presenceCheck.push('iat');\n if (audience !== undefined)\n presenceCheck.push('aud');\n if (subject !== undefined)\n presenceCheck.push('sub');\n if (issuer !== undefined)\n presenceCheck.push('iss');\n for (const claim of new Set(presenceCheck.reverse())) {\n if (!(claim in payload)) {\n throw new JWTClaimValidationFailed(`missing required \"${claim}\" claim`, payload, claim, 'missing');\n }\n }\n if (issuer &&\n !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) {\n throw new JWTClaimValidationFailed('unexpected \"iss\" claim value', payload, 'iss', 'check_failed');\n }\n if (subject && payload.sub !== subject) {\n throw new JWTClaimValidationFailed('unexpected \"sub\" claim value', payload, 'sub', 'check_failed');\n }\n if (audience &&\n !checkAudiencePresence(payload.aud, typeof audience === 'string' ? [audience] : audience)) {\n throw new JWTClaimValidationFailed('unexpected \"aud\" claim value', payload, 'aud', 'check_failed');\n }\n let tolerance;\n switch (typeof options.clockTolerance) {\n case 'string':\n tolerance = secs(options.clockTolerance);\n break;\n case 'number':\n tolerance = options.clockTolerance;\n break;\n case 'undefined':\n tolerance = 0;\n break;\n default:\n throw new TypeError('Invalid clockTolerance option type');\n }\n const { currentDate } = options;\n const now = epoch(currentDate || new Date());\n if ((payload.iat !== undefined || maxTokenAge) && typeof payload.iat !== 'number') {\n throw new JWTClaimValidationFailed('\"iat\" claim must be a number', payload, 'iat', 'invalid');\n }\n if (payload.nbf !== undefined) {\n if (typeof payload.nbf !== 'number') {\n throw new JWTClaimValidationFailed('\"nbf\" claim must be a number', payload, 'nbf', 'invalid');\n }\n if (payload.nbf > now + tolerance) {\n throw new JWTClaimValidationFailed('\"nbf\" claim timestamp check failed', payload, 'nbf', 'check_failed');\n }\n }\n if (payload.exp !== undefined) {\n if (typeof payload.exp !== 'number') {\n throw new JWTClaimValidationFailed('\"exp\" claim must be a number', payload, 'exp', 'invalid');\n }\n if (payload.exp <= now - tolerance) {\n throw new JWTExpired('\"exp\" claim timestamp check failed', payload, 'exp', 'check_failed');\n }\n }\n if (maxTokenAge) {\n const age = now - payload.iat;\n const max = typeof maxTokenAge === 'number' ? maxTokenAge : secs(maxTokenAge);\n if (age - tolerance > max) {\n throw new JWTExpired('\"iat\" claim timestamp check failed (too far in the past)', payload, 'iat', 'check_failed');\n }\n if (age < 0 - tolerance) {\n throw new JWTClaimValidationFailed('\"iat\" claim timestamp check failed (it should be in the past)', payload, 'iat', 'check_failed');\n }\n }\n return payload;\n}\nexport class JWTClaimsBuilder {\n #payload;\n constructor(payload) {\n if (!isObject(payload)) {\n throw new TypeError('JWT Claims Set MUST be an object');\n }\n this.#payload = structuredClone(payload);\n }\n data() {\n return encoder.encode(JSON.stringify(this.#payload));\n }\n get iss() {\n return this.#payload.iss;\n }\n set iss(value) {\n this.#payload.iss = value;\n }\n get sub() {\n return this.#payload.sub;\n }\n set sub(value) {\n this.#payload.sub = value;\n }\n get aud() {\n return this.#payload.aud;\n }\n set aud(value) {\n this.#payload.aud = value;\n }\n set jti(value) {\n this.#payload.jti = value;\n }\n set nbf(value) {\n if (typeof value === 'number') {\n this.#payload.nbf = validateInput('setNotBefore', value);\n }\n else if (value instanceof Date) {\n this.#payload.nbf = validateInput('setNotBefore', epoch(value));\n }\n else {\n this.#payload.nbf = epoch(new Date()) + secs(value);\n }\n }\n set exp(value) {\n if (typeof value === 'number') {\n this.#payload.exp = validateInput('setExpirationTime', value);\n }\n else if (value instanceof Date) {\n this.#payload.exp = validateInput('setExpirationTime', epoch(value));\n }\n else {\n this.#payload.exp = epoch(new Date()) + secs(value);\n }\n }\n set iat(value) {\n if (value === undefined) {\n this.#payload.iat = epoch(new Date());\n }\n else if (value instanceof Date) {\n this.#payload.iat = validateInput('setIssuedAt', epoch(value));\n }\n else if (typeof value === 'string') {\n this.#payload.iat = validateInput('setIssuedAt', epoch(new Date()) + secs(value));\n }\n else {\n this.#payload.iat = validateInput('setIssuedAt', value);\n }\n }\n}\n", "import { compactVerify } from '../jws/compact/verify.js';\nimport { validateClaimsSet } from '../lib/jwt_claims_set.js';\nimport { JWTInvalid } from '../util/errors.js';\nexport async function jwtVerify(jwt, key, options) {\n const verified = await compactVerify(jwt, key, options);\n if (verified.protectedHeader.crit?.includes('b64') && verified.protectedHeader.b64 === false) {\n throw new JWTInvalid('JWTs MUST NOT use unencoded payload');\n }\n const payload = validateClaimsSet(verified.protectedHeader, verified.payload, options);\n const result = { payload, protectedHeader: verified.protectedHeader };\n if (typeof key === 'function') {\n return { ...result, key: verified.key };\n }\n return result;\n}\n", "import { encode as b64u } from '../../util/base64url.js';\nimport { sign } from '../../lib/signing.js';\nimport { isDisjoint } from '../../lib/type_checks.js';\nimport { JWSInvalid } from '../../util/errors.js';\nimport { concat, encode } from '../../lib/buffer_utils.js';\nimport { checkKeyType } from '../../lib/check_key_type.js';\nimport { validateCrit } from '../../lib/validate_crit.js';\nimport { normalizeKey } from '../../lib/normalize_key.js';\nimport { assertNotSet } from '../../lib/helpers.js';\nexport class FlattenedSign {\n #payload;\n #protectedHeader;\n #unprotectedHeader;\n constructor(payload) {\n if (!(payload instanceof Uint8Array)) {\n throw new TypeError('payload must be an instance of Uint8Array');\n }\n this.#payload = payload;\n }\n setProtectedHeader(protectedHeader) {\n assertNotSet(this.#protectedHeader, 'setProtectedHeader');\n this.#protectedHeader = protectedHeader;\n return this;\n }\n setUnprotectedHeader(unprotectedHeader) {\n assertNotSet(this.#unprotectedHeader, 'setUnprotectedHeader');\n this.#unprotectedHeader = unprotectedHeader;\n return this;\n }\n async sign(key, options) {\n if (!this.#protectedHeader && !this.#unprotectedHeader) {\n throw new JWSInvalid('either setProtectedHeader or setUnprotectedHeader must be called before #sign()');\n }\n if (!isDisjoint(this.#protectedHeader, this.#unprotectedHeader)) {\n throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');\n }\n const joseHeader = {\n ...this.#protectedHeader,\n ...this.#unprotectedHeader,\n };\n const extensions = validateCrit(JWSInvalid, new Map([['b64', true]]), options?.crit, this.#protectedHeader, joseHeader);\n let b64 = true;\n if (extensions.has('b64')) {\n b64 = this.#protectedHeader.b64;\n if (typeof b64 !== 'boolean') {\n throw new JWSInvalid('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean');\n }\n }\n const { alg } = joseHeader;\n if (typeof alg !== 'string' || !alg) {\n throw new JWSInvalid('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');\n }\n checkKeyType(alg, key, 'sign');\n let payloadS;\n let payloadB;\n if (b64) {\n payloadS = b64u(this.#payload);\n payloadB = encode(payloadS);\n }\n else {\n payloadB = this.#payload;\n payloadS = '';\n }\n let protectedHeaderString;\n let protectedHeaderBytes;\n if (this.#protectedHeader) {\n protectedHeaderString = b64u(JSON.stringify(this.#protectedHeader));\n protectedHeaderBytes = encode(protectedHeaderString);\n }\n else {\n protectedHeaderString = '';\n protectedHeaderBytes = new Uint8Array();\n }\n const data = concat(protectedHeaderBytes, encode('.'), payloadB);\n const k = await normalizeKey(key, alg);\n const signature = await sign(alg, k, data);\n const jws = {\n signature: b64u(signature),\n payload: payloadS,\n };\n if (this.#unprotectedHeader) {\n jws.header = this.#unprotectedHeader;\n }\n if (this.#protectedHeader) {\n jws.protected = protectedHeaderString;\n }\n return jws;\n }\n}\n", "import { FlattenedSign } from '../flattened/sign.js';\nexport class CompactSign {\n #flattened;\n constructor(payload) {\n this.#flattened = new FlattenedSign(payload);\n }\n setProtectedHeader(protectedHeader) {\n this.#flattened.setProtectedHeader(protectedHeader);\n return this;\n }\n async sign(key, options) {\n const jws = await this.#flattened.sign(key, options);\n if (jws.payload === undefined) {\n throw new TypeError('use the flattened module for creating JWS with b64: false');\n }\n return `${jws.protected}.${jws.payload}.${jws.signature}`;\n }\n}\n", "import { CompactSign } from '../jws/compact/sign.js';\nimport { JWTInvalid } from '../util/errors.js';\nimport { JWTClaimsBuilder } from '../lib/jwt_claims_set.js';\nexport class SignJWT {\n #protectedHeader;\n #jwt;\n constructor(payload = {}) {\n this.#jwt = new JWTClaimsBuilder(payload);\n }\n setIssuer(issuer) {\n this.#jwt.iss = issuer;\n return this;\n }\n setSubject(subject) {\n this.#jwt.sub = subject;\n return this;\n }\n setAudience(audience) {\n this.#jwt.aud = audience;\n return this;\n }\n setJti(jwtId) {\n this.#jwt.jti = jwtId;\n return this;\n }\n setNotBefore(input) {\n this.#jwt.nbf = input;\n return this;\n }\n setExpirationTime(input) {\n this.#jwt.exp = input;\n return this;\n }\n setIssuedAt(input) {\n this.#jwt.iat = input;\n return this;\n }\n setProtectedHeader(protectedHeader) {\n this.#protectedHeader = protectedHeader;\n return this;\n }\n async sign(key, options) {\n const sig = new CompactSign(this.#jwt.data());\n sig.setProtectedHeader(this.#protectedHeader);\n if (Array.isArray(this.#protectedHeader?.crit) &&\n this.#protectedHeader.crit.includes('b64') &&\n this.#protectedHeader.b64 === false) {\n throw new JWTInvalid('JWTs MUST NOT use unencoded payload');\n }\n return sig.sign(key, options);\n }\n}\n", "export { compactDecrypt } from './jwe/compact/decrypt.js';\nexport { flattenedDecrypt } from './jwe/flattened/decrypt.js';\nexport { generalDecrypt } from './jwe/general/decrypt.js';\nexport { GeneralEncrypt } from './jwe/general/encrypt.js';\nexport { compactVerify } from './jws/compact/verify.js';\nexport { flattenedVerify } from './jws/flattened/verify.js';\nexport { generalVerify } from './jws/general/verify.js';\nexport { jwtVerify } from './jwt/verify.js';\nexport { jwtDecrypt } from './jwt/decrypt.js';\nexport { CompactEncrypt } from './jwe/compact/encrypt.js';\nexport { FlattenedEncrypt } from './jwe/flattened/encrypt.js';\nexport { CompactSign } from './jws/compact/sign.js';\nexport { FlattenedSign } from './jws/flattened/sign.js';\nexport { GeneralSign } from './jws/general/sign.js';\nexport { SignJWT } from './jwt/sign.js';\nexport { EncryptJWT } from './jwt/encrypt.js';\nexport { calculateJwkThumbprint, calculateJwkThumbprintUri } from './jwk/thumbprint.js';\nexport { EmbeddedJWK } from './jwk/embedded.js';\nexport { createLocalJWKSet } from './jwks/local.js';\nexport { createRemoteJWKSet, jwksCache, customFetch } from './jwks/remote.js';\nexport { UnsecuredJWT } from './jwt/unsecured.js';\nexport { exportPKCS8, exportSPKI, exportJWK } from './key/export.js';\nexport { importSPKI, importPKCS8, importX509, importJWK } from './key/import.js';\nexport { decodeProtectedHeader } from './util/decode_protected_header.js';\nexport { decodeJwt } from './util/decode_jwt.js';\nimport * as errors from './util/errors.js';\nexport { errors };\nexport { generateKeyPair } from './key/generate_key_pair.js';\nexport { generateSecret } from './key/generate_secret.js';\nimport * as base64url from './util/base64url.js';\nexport { base64url };\nexport const cryptoRuntime = 'WebCryptoAPI';\n", "export class ApiError extends Error {\n public statusCode: number;\n public details?: any;\n\n constructor(message: string, statusCode: number = 500, details?: any) {\n console.log(message)\n \n super(message);\n this.name = 'ApiError';\n this.statusCode = statusCode;\n this.details = details;\n // Error.captureStackTrace?.(this, ApiError);\n }\n}\n", "\n// Old env loading (Node only)\n// export const appUrl = process.env.APP_URL as string;\n//\n// export const jwtSecret: string = process.env.JWT_SECRET as string\n//\n// export const defaultRoleName = 'gen_user';\n//\n// export const encodedJwtSecret = new TextEncoder().encode(jwtSecret)\n//\n// export const s3AccessKeyId = process.env.S3_ACCESS_KEY_ID as string\n//\n// export const s3SecretAccessKey = process.env.S3_SECRET_ACCESS_KEY as string\n//\n// export const s3BucketName = process.env.S3_BUCKET_NAME as string\n//\n// export const s3Region = process.env.S3_REGION as string\n//\n// export const assetsDomain = process.env.ASSETS_DOMAIN as string;\n//\n// export const apiCacheKey = process.env.API_CACHE_KEY as string;\n//\n// export const cloudflareApiToken = process.env.CLOUDFLARE_API_TOKEN as string;\n//\n// export const cloudflareZoneId = process.env.CLOUDFLARE_ZONE_ID as string;\n//\n// export const s3Url = process.env.S3_URL as string\n//\n// export const redisUrl = process.env.REDIS_URL as string\n//\n//\n// export const expoAccessToken = process.env.EXPO_ACCESS_TOKEN as string;\n//\n// export const phonePeBaseUrl = process.env.PHONE_PE_BASE_URL as string;\n//\n// export const phonePeClientId = process.env.PHONE_PE_CLIENT_ID as string;\n//\n// export const phonePeClientVersion = Number(process.env.PHONE_PE_CLIENT_VERSION as string);\n//\n// export const phonePeClientSecret = process.env.PHONE_PE_CLIENT_SECRET as string;\n//\n// export const phonePeMerchantId = process.env.PHONE_PE_MERCHANT_ID as string;\n//\n// export const razorpayId = process.env.RAZORPAY_KEY as string;\n//\n// export const razorpaySecret = process.env.RAZORPAY_SECRET as string;\n//\n// export const otpSenderAuthToken = process.env.OTP_SENDER_AUTH_TOKEN as string;\n//\n// export const minOrderValue = Number(process.env.MIN_ORDER_VALUE as string);\n//\n// export const deliveryCharge = Number(process.env.DELIVERY_CHARGE as string);\n//\n// export const telegramBotToken = process.env.TELEGRAM_BOT_TOKEN as string;\n//\n// export const telegramChatIds = (process.env.TELEGRAM_CHAT_IDS as string)?.split(',').map(id => id.trim()) || [];\n//\n// export const isDevMode = (process.env.ENV_MODE as string) === 'dev';\n\nconst getRuntimeEnv = () => (globalThis as any).ENV || (globalThis as any).process?.env || {}\n\nconst runtimeEnv = getRuntimeEnv()\n\nexport const appUrl = runtimeEnv.APP_URL as string\n\nexport const jwtSecret: string = runtimeEnv.JWT_SECRET as string\n\nexport const defaultRoleName = 'gen_user';\n\nexport const getEncodedJwtSecret = () => {\n const env = getRuntimeEnv()\n const secret = (env.JWT_SECRET as string) || ''\n return new TextEncoder().encode(secret)\n}\n\nexport const s3AccessKeyId = runtimeEnv.S3_ACCESS_KEY_ID as string\n\nexport const s3SecretAccessKey = runtimeEnv.S3_SECRET_ACCESS_KEY as string\n\nexport const s3BucketName = runtimeEnv.S3_BUCKET_NAME as string\n\nexport const s3Region = runtimeEnv.S3_REGION as string\n\nexport const assetsDomain = runtimeEnv.ASSETS_DOMAIN as string\n\nexport const apiCacheKey = runtimeEnv.API_CACHE_KEY as string\n\nexport const cloudflareApiToken = runtimeEnv.CLOUDFLARE_API_TOKEN as string\n\nexport const cloudflareZoneId = runtimeEnv.CLOUDFLARE_ZONE_ID as string\n\nexport const s3Url = runtimeEnv.S3_URL as string\n\nexport const redisUrl = runtimeEnv.REDIS_URL as string\n\nexport const expoAccessToken = runtimeEnv.EXPO_ACCESS_TOKEN as string\n\nexport const phonePeBaseUrl = runtimeEnv.PHONE_PE_BASE_URL as string\n\nexport const phonePeClientId = runtimeEnv.PHONE_PE_CLIENT_ID as string\n\nexport const phonePeClientVersion = Number(runtimeEnv.PHONE_PE_CLIENT_VERSION as string)\n\nexport const phonePeClientSecret = runtimeEnv.PHONE_PE_CLIENT_SECRET as string\n\nexport const phonePeMerchantId = runtimeEnv.PHONE_PE_MERCHANT_ID as string\n\nexport const razorpayId = runtimeEnv.RAZORPAY_KEY as string\n\nexport const razorpaySecret = runtimeEnv.RAZORPAY_SECRET as string\n\nexport const otpSenderAuthToken = runtimeEnv.OTP_SENDER_AUTH_TOKEN as string\n\nexport const minOrderValue = Number(runtimeEnv.MIN_ORDER_VALUE as string)\n\nexport const deliveryCharge = Number(runtimeEnv.DELIVERY_CHARGE as string)\n\nexport const telegramBotToken = runtimeEnv.TELEGRAM_BOT_TOKEN as string\n\nexport const telegramChatIds = (runtimeEnv.TELEGRAM_CHAT_IDS as string)?.split(',').map(id => id.trim()) || []\n\nexport const isDevMode = (runtimeEnv.ENV_MODE as string) === 'dev'\n", "import { Context, Next } from 'hono';\nimport { jwtVerify } from 'jose';\nimport { getStaffUserById } from '@/src/dbService';\nimport { ApiError } from '@/src/lib/api-error';\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter';\n\n/**\n * Verify JWT token and extract payload\n */\nconst verifyStaffToken = async (token: string) => {\n try {\n const { payload } = await jwtVerify(token, getEncodedJwtSecret());\n return payload;\n } catch (error) {\n throw new ApiError('Access denied. Invalid auth credentials', 401);\n }\n};\n\n/**\n * Middleware to authenticate staff users and attach staffUser to context\n */\nexport const authenticateStaff = async (c: Context, next: Next) => {\n try {\n // Extract token from Authorization header\n const authHeader = c.req.header('authorization');\n\n if (!authHeader || !authHeader.startsWith('Bearer ')) {\n throw new ApiError('Staff authentication required', 401);\n }\n\n const token = authHeader.split(' ')[1];\n\n if (!token) {\n throw new ApiError('Staff authentication token missing', 401);\n }\n\n // Verify token and extract payload\n const decoded = await verifyStaffToken(token) as any;\n\n // Verify staffId exists in token\n if (!decoded.staffId) {\n throw new ApiError('Invalid staff token format', 401);\n }\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { staffUsers } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n const staff = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.id, decoded.staffId),\n });\n */\n\n // Fetch staff user from database\n const staff = await getStaffUserById(decoded.staffId);\n\n if (!staff) {\n throw new ApiError('Staff user not found', 401);\n }\n\n // Attach staff user to context\n c.set('staffUser', {\n id: staff.id,\n name: staff.name,\n });\n\n await next();\n } catch (error) {\n throw error;\n }\n};\n", "import { Hono } from 'hono';\nimport { authenticateStaff } from \"@/src/middleware/staff-auth\";\n\nconst router = new Hono();\n\n// Apply staff authentication to all admin routes\nrouter.use('*', authenticateStaff);\n\nconst avRouter = router;\n\nexport default avRouter;\n", "export const getHttpHandlerExtensionConfiguration = (runtimeConfig) => {\n return {\n setHttpHandler(handler) {\n runtimeConfig.httpHandler = handler;\n },\n httpHandler() {\n return runtimeConfig.httpHandler;\n },\n updateHttpClientConfig(key, value) {\n runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);\n },\n httpHandlerConfigs() {\n return runtimeConfig.httpHandler.httpHandlerConfigs();\n },\n };\n};\nexport const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {\n return {\n httpHandler: httpHandlerExtensionConfiguration.httpHandler(),\n };\n};\n", "export * from \"./httpExtensionConfiguration\";\n", "export {};\n", "export var HttpAuthLocation;\n(function (HttpAuthLocation) {\n HttpAuthLocation[\"HEADER\"] = \"header\";\n HttpAuthLocation[\"QUERY\"] = \"query\";\n})(HttpAuthLocation || (HttpAuthLocation = {}));\n", "export var HttpApiKeyAuthLocation;\n(function (HttpApiKeyAuthLocation) {\n HttpApiKeyAuthLocation[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation[\"QUERY\"] = \"query\";\n})(HttpApiKeyAuthLocation || (HttpApiKeyAuthLocation = {}));\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./auth\";\nexport * from \"./HttpApiKeyAuth\";\nexport * from \"./HttpAuthScheme\";\nexport * from \"./HttpAuthSchemeProvider\";\nexport * from \"./HttpSigner\";\nexport * from \"./IdentityProviderConfig\";\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./config\";\nexport * from \"./manager\";\nexport * from \"./pool\";\n", "export {};\n", "export {};\n", "export var EndpointURLScheme;\n(function (EndpointURLScheme) {\n EndpointURLScheme[\"HTTP\"] = \"http\";\n EndpointURLScheme[\"HTTPS\"] = \"https\";\n})(EndpointURLScheme || (EndpointURLScheme = {}));\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./EndpointRuleObject\";\nexport * from \"./ErrorRuleObject\";\nexport * from \"./RuleSetObject\";\nexport * from \"./shared\";\nexport * from \"./TreeRuleObject\";\n", "export {};\n", "export var AlgorithmId;\n(function (AlgorithmId) {\n AlgorithmId[\"MD5\"] = \"md5\";\n AlgorithmId[\"CRC32\"] = \"crc32\";\n AlgorithmId[\"CRC32C\"] = \"crc32c\";\n AlgorithmId[\"SHA1\"] = \"sha1\";\n AlgorithmId[\"SHA256\"] = \"sha256\";\n})(AlgorithmId || (AlgorithmId = {}));\nexport const getChecksumConfiguration = (runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== undefined) {\n checksumAlgorithms.push({\n algorithmId: () => AlgorithmId.SHA256,\n checksumConstructor: () => runtimeConfig.sha256,\n });\n }\n if (runtimeConfig.md5 != undefined) {\n checksumAlgorithms.push({\n algorithmId: () => AlgorithmId.MD5,\n checksumConstructor: () => runtimeConfig.md5,\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n },\n };\n};\nexport const resolveChecksumRuntimeConfig = (clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n};\n", "import { getChecksumConfiguration, resolveChecksumRuntimeConfig } from \"./checksum\";\nexport const getDefaultClientConfiguration = (runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n};\nexport const resolveDefaultRuntimeConfig = (config) => {\n return resolveChecksumRuntimeConfig(config);\n};\n", "export {};\n", "export * from \"./defaultClientConfiguration\";\nexport * from \"./defaultExtensionConfiguration\";\nexport { AlgorithmId } from \"./checksum\";\n", "export {};\n", "export var FieldPosition;\n(function (FieldPosition) {\n FieldPosition[FieldPosition[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition[FieldPosition[\"TRAILER\"] = 1] = \"TRAILER\";\n})(FieldPosition || (FieldPosition = {}));\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./apiKeyIdentity\";\nexport * from \"./awsCredentialIdentity\";\nexport * from \"./identity\";\nexport * from \"./tokenIdentity\";\n", "export {};\n", "export const SMITHY_CONTEXT_KEY = \"__smithy_context\";\n", "export {};\n", "export var IniSectionType;\n(function (IniSectionType) {\n IniSectionType[\"PROFILE\"] = \"profile\";\n IniSectionType[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType[\"SERVICES\"] = \"services\";\n})(IniSectionType || (IniSectionType = {}));\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export var RequestHandlerProtocol;\n(function (RequestHandlerProtocol) {\n RequestHandlerProtocol[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol[\"TDS_8_0\"] = \"tds/8.0\";\n})(RequestHandlerProtocol || (RequestHandlerProtocol = {}));\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./abort\";\nexport * from \"./auth\";\nexport * from \"./blob/blob-payload-input-types\";\nexport * from \"./checksum\";\nexport * from \"./client\";\nexport * from \"./command\";\nexport * from \"./connection\";\nexport * from \"./crypto\";\nexport * from \"./encode\";\nexport * from \"./endpoint\";\nexport * from \"./endpoints\";\nexport * from \"./eventStream\";\nexport * from \"./extensions\";\nexport * from \"./feature-ids\";\nexport * from \"./http\";\nexport * from \"./http/httpHandlerInitialization\";\nexport * from \"./identity\";\nexport * from \"./logger\";\nexport * from \"./middleware\";\nexport * from \"./pagination\";\nexport * from \"./profile\";\nexport * from \"./response\";\nexport * from \"./retry\";\nexport * from \"./schema/schema\";\nexport * from \"./schema/traits\";\nexport * from \"./schema/schema-deprecated\";\nexport * from \"./schema/sentinels\";\nexport * from \"./schema/static-schemas\";\nexport * from \"./serde\";\nexport * from \"./shapes\";\nexport * from \"./signature\";\nexport * from \"./stream\";\nexport * from \"./streaming-payload/streaming-blob-common-types\";\nexport * from \"./streaming-payload/streaming-blob-payload-input-types\";\nexport * from \"./streaming-payload/streaming-blob-payload-output-types\";\nexport * from \"./transfer\";\nexport * from \"./transform/client-payload-blob-type-narrow\";\nexport * from \"./transform/mutable\";\nexport * from \"./transform/no-undefined\";\nexport * from \"./transform/type-transform\";\nexport * from \"./uri\";\nexport * from \"./util\";\nexport * from \"./waiter\";\n", "import { FieldPosition } from \"@smithy/types\";\nexport class Field {\n name;\n kind;\n values;\n constructor({ name, kind = FieldPosition.HEADER, values = [] }) {\n this.name = name;\n this.kind = kind;\n this.values = values;\n }\n add(value) {\n this.values.push(value);\n }\n set(values) {\n this.values = values;\n }\n remove(value) {\n this.values = this.values.filter((v) => v !== value);\n }\n toString() {\n return this.values.map((v) => (v.includes(\",\") || v.includes(\" \") ? `\"${v}\"` : v)).join(\", \");\n }\n get() {\n return this.values;\n }\n}\n", "export class Fields {\n entries = {};\n encoding;\n constructor({ fields = [], encoding = \"utf-8\" }) {\n fields.forEach(this.setField.bind(this));\n this.encoding = encoding;\n }\n setField(field) {\n this.entries[field.name.toLowerCase()] = field;\n }\n getField(name) {\n return this.entries[name.toLowerCase()];\n }\n removeField(name) {\n delete this.entries[name.toLowerCase()];\n }\n getByType(kind) {\n return Object.values(this.entries).filter((field) => field.kind === kind);\n }\n}\n", "export {};\n", "export class HttpRequest {\n method;\n protocol;\n hostname;\n port;\n path;\n query;\n headers;\n username;\n password;\n fragment;\n body;\n constructor(options) {\n this.method = options.method || \"GET\";\n this.hostname = options.hostname || \"localhost\";\n this.port = options.port;\n this.query = options.query || {};\n this.headers = options.headers || {};\n this.body = options.body;\n this.protocol = options.protocol\n ? options.protocol.slice(-1) !== \":\"\n ? `${options.protocol}:`\n : options.protocol\n : \"https:\";\n this.path = options.path ? (options.path.charAt(0) !== \"/\" ? `/${options.path}` : options.path) : \"/\";\n this.username = options.username;\n this.password = options.password;\n this.fragment = options.fragment;\n }\n static clone(request) {\n const cloned = new HttpRequest({\n ...request,\n headers: { ...request.headers },\n });\n if (cloned.query) {\n cloned.query = cloneQuery(cloned.query);\n }\n return cloned;\n }\n static isInstance(request) {\n if (!request) {\n return false;\n }\n const req = request;\n return (\"method\" in req &&\n \"protocol\" in req &&\n \"hostname\" in req &&\n \"path\" in req &&\n typeof req[\"query\"] === \"object\" &&\n typeof req[\"headers\"] === \"object\");\n }\n clone() {\n return HttpRequest.clone(this);\n }\n}\nfunction cloneQuery(query) {\n return Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param,\n };\n }, {});\n}\n", "export class HttpResponse {\n statusCode;\n reason;\n headers;\n body;\n constructor(options) {\n this.statusCode = options.statusCode;\n this.reason = options.reason;\n this.headers = options.headers || {};\n this.body = options.body;\n }\n static isInstance(response) {\n if (!response)\n return false;\n const resp = response;\n return typeof resp.statusCode === \"number\" && typeof resp.headers === \"object\";\n }\n}\n", "export function isValidHostname(hostname) {\n const hostPattern = /^[a-z0-9][a-z0-9\\.\\-]*[a-z0-9]$/;\n return hostPattern.test(hostname);\n}\n", "export {};\n", "export * from \"./extensions\";\nexport * from \"./Field\";\nexport * from \"./Fields\";\nexport * from \"./httpHandler\";\nexport * from \"./httpRequest\";\nexport * from \"./httpResponse\";\nexport * from \"./isValidHostname\";\nexport * from \"./types\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nexport function addExpectContinueMiddleware(options) {\n return (next) => async (args) => {\n const { request } = args;\n if (options.expectContinueHeader !== false &&\n HttpRequest.isInstance(request) &&\n request.body &&\n options.runtime === \"node\" &&\n options.requestHandler?.constructor?.name !== \"FetchHttpHandler\") {\n let sendHeader = true;\n if (typeof options.expectContinueHeader === \"number\") {\n try {\n const bodyLength = Number(request.headers?.[\"content-length\"]) ?? options.bodyLengthChecker?.(request.body) ?? Infinity;\n sendHeader = bodyLength >= options.expectContinueHeader;\n }\n catch (e) { }\n }\n else {\n sendHeader = !!options.expectContinueHeader;\n }\n if (sendHeader) {\n request.headers.Expect = \"100-continue\";\n }\n }\n return next({\n ...args,\n request,\n });\n };\n}\nexport const addExpectContinueMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_EXPECT_HEADER\", \"EXPECT_HEADER\"],\n name: \"addExpectContinueMiddleware\",\n override: true,\n};\nexport const getAddExpectContinuePlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(addExpectContinueMiddleware(options), addExpectContinueMiddlewareOptions);\n },\n});\n", "export const RequestChecksumCalculation = {\n WHEN_SUPPORTED: \"WHEN_SUPPORTED\",\n WHEN_REQUIRED: \"WHEN_REQUIRED\",\n};\nexport const DEFAULT_REQUEST_CHECKSUM_CALCULATION = RequestChecksumCalculation.WHEN_SUPPORTED;\nexport const ResponseChecksumValidation = {\n WHEN_SUPPORTED: \"WHEN_SUPPORTED\",\n WHEN_REQUIRED: \"WHEN_REQUIRED\",\n};\nexport const DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.WHEN_SUPPORTED;\nexport var ChecksumAlgorithm;\n(function (ChecksumAlgorithm) {\n ChecksumAlgorithm[\"MD5\"] = \"MD5\";\n ChecksumAlgorithm[\"CRC32\"] = \"CRC32\";\n ChecksumAlgorithm[\"CRC32C\"] = \"CRC32C\";\n ChecksumAlgorithm[\"CRC64NVME\"] = \"CRC64NVME\";\n ChecksumAlgorithm[\"SHA1\"] = \"SHA1\";\n ChecksumAlgorithm[\"SHA256\"] = \"SHA256\";\n})(ChecksumAlgorithm || (ChecksumAlgorithm = {}));\nexport var ChecksumLocation;\n(function (ChecksumLocation) {\n ChecksumLocation[\"HEADER\"] = \"header\";\n ChecksumLocation[\"TRAILER\"] = \"trailer\";\n})(ChecksumLocation || (ChecksumLocation = {}));\nexport const DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.CRC32;\n", "import { DEFAULT_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation } from \"./constants\";\nimport { SelectorType, stringUnionSelector } from \"./stringUnionSelector\";\nexport const ENV_REQUEST_CHECKSUM_CALCULATION = \"AWS_REQUEST_CHECKSUM_CALCULATION\";\nexport const CONFIG_REQUEST_CHECKSUM_CALCULATION = \"request_checksum_calculation\";\nexport const NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => stringUnionSelector(env, ENV_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.ENV),\n configFileSelector: (profile) => stringUnionSelector(profile, CONFIG_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.CONFIG),\n default: DEFAULT_REQUEST_CHECKSUM_CALCULATION,\n};\n", "import { DEFAULT_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation } from \"./constants\";\nimport { SelectorType, stringUnionSelector } from \"./stringUnionSelector\";\nexport const ENV_RESPONSE_CHECKSUM_VALIDATION = \"AWS_RESPONSE_CHECKSUM_VALIDATION\";\nexport const CONFIG_RESPONSE_CHECKSUM_VALIDATION = \"response_checksum_validation\";\nexport const NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => stringUnionSelector(env, ENV_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.ENV),\n configFileSelector: (profile) => stringUnionSelector(profile, CONFIG_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.CONFIG),\n default: DEFAULT_RESPONSE_CHECKSUM_VALIDATION,\n};\n", "export const state = {\n warningEmitted: false,\n};\nexport const emitWarningIfUnsupportedVersion = (version) => {\n if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 20) {\n state.warningEmitted = true;\n process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js ${version} in January 2026.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to a supported Node.js LTS version.\n\nMore information can be found at: https://a.co/c895JFp`);\n }\n};\n", "export function setCredentialFeature(credentials, feature, value) {\n if (!credentials.$source) {\n credentials.$source = {};\n }\n credentials.$source[feature] = value;\n return credentials;\n}\n", "export function setFeature(context, feature, value) {\n if (!context.__aws_sdk_context) {\n context.__aws_sdk_context = {\n features: {},\n };\n }\n else if (!context.__aws_sdk_context.features) {\n context.__aws_sdk_context.features = {};\n }\n context.__aws_sdk_context.features[feature] = value;\n}\n", "export function setTokenFeature(token, feature, value) {\n if (!token.$source) {\n token.$source = {};\n }\n token.$source[feature] = value;\n return token;\n}\n", "export * from \"./emitWarningIfUnsupportedVersion\";\nexport * from \"./setCredentialFeature\";\nexport * from \"./setFeature\";\nexport * from \"./setTokenFeature\";\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nexport const getDateHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined;\n", "export const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);\n", "import { getSkewCorrectedDate } from \"./getSkewCorrectedDate\";\nexport const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000;\n", "import { isClockSkewed } from \"./isClockSkewed\";\nexport const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {\n const clockTimeInMs = Date.parse(clockTime);\n if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {\n return clockTimeInMs - Date.now();\n }\n return currentSystemClockOffset;\n};\n", "export * from \"./getDateHeader\";\nexport * from \"./getSkewCorrectedDate\";\nexport * from \"./getUpdatedSystemClockOffset\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { getDateHeader, getSkewCorrectedDate, getUpdatedSystemClockOffset } from \"../utils\";\nconst throwSigningPropertyError = (name, property) => {\n if (!property) {\n throw new Error(`Property \\`${name}\\` is not resolved for AWS SDK SigV4Auth`);\n }\n return property;\n};\nexport const validateSigningProperties = async (signingProperties) => {\n const context = throwSigningPropertyError(\"context\", signingProperties.context);\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const authScheme = context.endpointV2?.properties?.authSchemes?.[0];\n const signerFunction = throwSigningPropertyError(\"signer\", config.signer);\n const signer = await signerFunction(authScheme);\n const signingRegion = signingProperties?.signingRegion;\n const signingRegionSet = signingProperties?.signingRegionSet;\n const signingName = signingProperties?.signingName;\n return {\n config,\n signer,\n signingRegion,\n signingRegionSet,\n signingName,\n };\n};\nexport class AwsSdkSigV4Signer {\n async sign(httpRequest, identity, signingProperties) {\n if (!HttpRequest.isInstance(httpRequest)) {\n throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n }\n const validatedProps = await validateSigningProperties(signingProperties);\n const { config, signer } = validatedProps;\n let { signingRegion, signingName } = validatedProps;\n const handlerExecutionContext = signingProperties.context;\n if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {\n const [first, second] = handlerExecutionContext.authSchemes;\n if (first?.name === \"sigv4a\" && second?.name === \"sigv4\") {\n signingRegion = second?.signingRegion ?? signingRegion;\n signingName = second?.signingName ?? signingName;\n }\n }\n const signedRequest = await signer.sign(httpRequest, {\n signingDate: getSkewCorrectedDate(config.systemClockOffset),\n signingRegion: signingRegion,\n signingService: signingName,\n });\n return signedRequest;\n }\n errorHandler(signingProperties) {\n return (error) => {\n const serverTime = error.ServerTime ?? getDateHeader(error.$response);\n if (serverTime) {\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const initialSystemClockOffset = config.systemClockOffset;\n config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);\n const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;\n if (clockSkewCorrected && error.$metadata) {\n error.$metadata.clockSkewCorrected = true;\n }\n }\n throw error;\n };\n }\n successHandler(httpResponse, signingProperties) {\n const dateHeader = getDateHeader(httpResponse);\n if (dateHeader) {\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);\n }\n }\n}\nexport const AWSSDKSigV4Signer = AwsSdkSigV4Signer;\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { getSkewCorrectedDate } from \"../utils\";\nimport { AwsSdkSigV4Signer, validateSigningProperties } from \"./AwsSdkSigV4Signer\";\nexport class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer {\n async sign(httpRequest, identity, signingProperties) {\n if (!HttpRequest.isInstance(httpRequest)) {\n throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n }\n const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties);\n const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.();\n const multiRegionOverride = (configResolvedSigningRegionSet ??\n signingRegionSet ?? [signingRegion]).join(\",\");\n const signedRequest = await signer.sign(httpRequest, {\n signingDate: getSkewCorrectedDate(config.systemClockOffset),\n signingRegion: multiRegionOverride,\n signingService: signingName,\n });\n return signedRequest;\n }\n}\n", "export const getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\\s-]/g, \"_\").toUpperCase()}`;\n", "import { getArrayForCommaSeparatedString } from \"../utils/getArrayForCommaSeparatedString\";\nimport { getBearerTokenEnvKey } from \"../utils/getBearerTokenEnvKey\";\nconst NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = \"AWS_AUTH_SCHEME_PREFERENCE\";\nconst NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = \"auth_scheme_preference\";\nexport const NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {\n environmentVariableSelector: (env, options) => {\n if (options?.signingName) {\n const bearerTokenKey = getBearerTokenEnvKey(options.signingName);\n if (bearerTokenKey in env)\n return [\"httpBearerAuth\"];\n }\n if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env))\n return undefined;\n return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);\n },\n configFileSelector: (profile) => {\n if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile))\n return undefined;\n return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);\n },\n default: [],\n};\n", "import { SMITHY_CONTEXT_KEY } from \"@smithy/types\";\nexport const getSmithyContext = (context) => context[SMITHY_CONTEXT_KEY] || (context[SMITHY_CONTEXT_KEY] = {});\n", "import { SMITHY_CONTEXT_KEY } from \"@smithy/types\";\nexport const getSmithyContext = (context) => context[SMITHY_CONTEXT_KEY] || (context[SMITHY_CONTEXT_KEY] = {});\n", "export const normalizeProvider = (input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n};\n", "export * from \"./getSmithyContext\";\nexport * from \"./normalizeProvider\";\n", "export const resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => {\n if (!authSchemePreference || authSchemePreference.length === 0) {\n return candidateAuthOptions;\n }\n const preferredAuthOptions = [];\n for (const preferredSchemeName of authSchemePreference) {\n for (const candidateAuthOption of candidateAuthOptions) {\n const candidateAuthSchemeName = candidateAuthOption.schemeId.split(\"#\")[1];\n if (candidateAuthSchemeName === preferredSchemeName) {\n preferredAuthOptions.push(candidateAuthOption);\n }\n }\n }\n for (const candidateAuthOption of candidateAuthOptions) {\n if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) {\n preferredAuthOptions.push(candidateAuthOption);\n }\n }\n return preferredAuthOptions;\n};\n", "import { getSmithyContext } from \"@smithy/util-middleware\";\nimport { resolveAuthOptions } from \"./resolveAuthOptions\";\nfunction convertHttpAuthSchemesToMap(httpAuthSchemes) {\n const map = new Map();\n for (const scheme of httpAuthSchemes) {\n map.set(scheme.schemeId, scheme);\n }\n return map;\n}\nexport const httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => {\n const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input));\n const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];\n const resolvedOptions = resolveAuthOptions(options, authSchemePreference);\n const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);\n const smithyContext = getSmithyContext(context);\n const failureReasons = [];\n for (const option of resolvedOptions) {\n const scheme = authSchemes.get(option.schemeId);\n if (!scheme) {\n failureReasons.push(`HttpAuthScheme \\`${option.schemeId}\\` was not enabled for this service.`);\n continue;\n }\n const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config));\n if (!identityProvider) {\n failureReasons.push(`HttpAuthScheme \\`${option.schemeId}\\` did not have an IdentityProvider configured.`);\n continue;\n }\n const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {};\n option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);\n option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);\n smithyContext.selectedHttpAuthScheme = {\n httpAuthOption: option,\n identity: await identityProvider(option.identityProperties),\n signer: scheme.signer,\n };\n break;\n }\n if (!smithyContext.selectedHttpAuthScheme) {\n throw new Error(failureReasons.join(\"\\n\"));\n }\n return next(args);\n};\n", "import { httpAuthSchemeMiddleware } from \"./httpAuthSchemeMiddleware\";\nexport const httpAuthSchemeEndpointRuleSetMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"HTTP_AUTH_SCHEME\"],\n name: \"httpAuthSchemeMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: \"endpointV2Middleware\",\n};\nexport const getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider,\n }), httpAuthSchemeEndpointRuleSetMiddlewareOptions);\n },\n});\n", "import { httpAuthSchemeMiddleware } from \"./httpAuthSchemeMiddleware\";\nexport const httpAuthSchemeMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"HTTP_AUTH_SCHEME\"],\n name: \"httpAuthSchemeMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: \"serializerMiddleware\",\n};\nexport const getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider,\n }), httpAuthSchemeMiddlewareOptions);\n },\n});\n", "export * from \"./httpAuthSchemeMiddleware\";\nexport * from \"./getHttpAuthSchemeEndpointRuleSetPlugin\";\nexport * from \"./getHttpAuthSchemePlugin\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { getSmithyContext } from \"@smithy/util-middleware\";\nconst defaultErrorHandler = (signingProperties) => (error) => {\n throw error;\n};\nconst defaultSuccessHandler = (httpResponse, signingProperties) => { };\nexport const httpSigningMiddleware = (config) => (next, context) => async (args) => {\n if (!HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n const smithyContext = getSmithyContext(context);\n const scheme = smithyContext.selectedHttpAuthScheme;\n if (!scheme) {\n throw new Error(`No HttpAuthScheme was selected: unable to sign request`);\n }\n const { httpAuthOption: { signingProperties = {} }, identity, signer, } = scheme;\n const output = await next({\n ...args,\n request: await signer.sign(args.request, identity, signingProperties),\n }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));\n (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);\n return output;\n};\n", "import { httpSigningMiddleware } from \"./httpSigningMiddleware\";\nexport const httpSigningMiddlewareOptions = {\n step: \"finalizeRequest\",\n tags: [\"HTTP_SIGNING\"],\n name: \"httpSigningMiddleware\",\n aliases: [\"apiKeyMiddleware\", \"tokenMiddleware\", \"awsAuthMiddleware\"],\n override: true,\n relation: \"after\",\n toMiddleware: \"retryMiddleware\",\n};\nexport const getHttpSigningPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions);\n },\n});\n", "export * from \"./httpSigningMiddleware\";\nexport * from \"./getHttpSigningMiddleware\";\n", "export const normalizeProvider = (input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n};\n", "const makePagedClientRequest = async (CommandCtor, client, input, withCommand = (_) => _, ...args) => {\n let command = new CommandCtor(input);\n command = withCommand(command) ?? command;\n return await client.send(command, ...args);\n};\nexport function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) {\n return async function* paginateOperation(config, input, ...additionalArguments) {\n const _input = input;\n let token = config.startingToken ?? _input[inputTokenName];\n let hasNext = true;\n let page;\n while (hasNext) {\n _input[inputTokenName] = token;\n if (pageSizeTokenName) {\n _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config.pageSize;\n }\n if (config.client instanceof ClientCtor) {\n page = await makePagedClientRequest(CommandCtor, config.client, input, config.withCommand, ...additionalArguments);\n }\n else {\n throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`);\n }\n yield page;\n const prevToken = token;\n token = get(page, outputTokenName);\n hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));\n }\n return undefined;\n };\n}\nconst get = (fromObject, path) => {\n let cursor = fromObject;\n const pathComponents = path.split(\".\");\n for (const step of pathComponents) {\n if (!cursor || typeof cursor !== \"object\") {\n return undefined;\n }\n cursor = cursor[step];\n }\n return cursor;\n};\n", "const chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;\nexport const alphabetByEncoding = Object.entries(chars).reduce((acc, [i, c]) => {\n acc[c] = Number(i);\n return acc;\n}, {});\nexport const alphabetByValue = chars.split(\"\");\nexport const bitsPerLetter = 6;\nexport const bitsPerByte = 8;\nexport const maxLetterValue = 0b111111;\n", "import { alphabetByEncoding, bitsPerByte, bitsPerLetter } from \"./constants.browser\";\nexport const fromBase64 = (input) => {\n let totalByteLength = (input.length / 4) * 3;\n if (input.slice(-2) === \"==\") {\n totalByteLength -= 2;\n }\n else if (input.slice(-1) === \"=\") {\n totalByteLength--;\n }\n const out = new ArrayBuffer(totalByteLength);\n const dataView = new DataView(out);\n for (let i = 0; i < input.length; i += 4) {\n let bits = 0;\n let bitLength = 0;\n for (let j = i, limit = i + 3; j <= limit; j++) {\n if (input[j] !== \"=\") {\n if (!(input[j] in alphabetByEncoding)) {\n throw new TypeError(`Invalid character ${input[j]} in base64 string.`);\n }\n bits |= alphabetByEncoding[input[j]] << ((limit - j) * bitsPerLetter);\n bitLength += bitsPerLetter;\n }\n else {\n bits >>= bitsPerLetter;\n }\n }\n const chunkOffset = (i / 4) * 3;\n bits >>= bitLength % bitsPerByte;\n const byteLength = Math.floor(bitLength / bitsPerByte);\n for (let k = 0; k < byteLength; k++) {\n const offset = (byteLength - k - 1) * bitsPerByte;\n dataView.setUint8(chunkOffset + k, (bits & (255 << offset)) >> offset);\n }\n }\n return new Uint8Array(out);\n};\n", "export const fromUtf8 = (input) => new TextEncoder().encode(input);\n", "import { fromUtf8 } from \"./fromUtf8\";\nexport const toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n", "export const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return new TextDecoder(\"utf-8\").decode(input);\n};\n", "export * from \"./fromUtf8\";\nexport * from \"./toUint8Array\";\nexport * from \"./toUtf8\";\n", "import { fromUtf8 } from \"@smithy/util-utf8\";\nimport { alphabetByValue, bitsPerByte, bitsPerLetter, maxLetterValue } from \"./constants.browser\";\nexport function toBase64(_input) {\n let input;\n if (typeof _input === \"string\") {\n input = fromUtf8(_input);\n }\n else {\n input = _input;\n }\n const isArrayLike = typeof input === \"object\" && typeof input.length === \"number\";\n const isUint8Array = typeof input === \"object\" &&\n typeof input.byteOffset === \"number\" &&\n typeof input.byteLength === \"number\";\n if (!isArrayLike && !isUint8Array) {\n throw new Error(\"@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.\");\n }\n let str = \"\";\n for (let i = 0; i < input.length; i += 3) {\n let bits = 0;\n let bitLength = 0;\n for (let j = i, limit = Math.min(i + 3, input.length); j < limit; j++) {\n bits |= input[j] << ((limit - j - 1) * bitsPerByte);\n bitLength += bitsPerByte;\n }\n const bitClusterCount = Math.ceil(bitLength / bitsPerLetter);\n bits <<= bitClusterCount * bitsPerLetter - bitLength;\n for (let k = 1; k <= bitClusterCount; k++) {\n const offset = (bitClusterCount - k) * bitsPerLetter;\n str += alphabetByValue[(bits & (maxLetterValue << offset)) >> offset];\n }\n str += \"==\".slice(0, 4 - bitClusterCount);\n }\n return str;\n}\n", "export * from \"./fromBase64\";\nexport * from \"./toBase64\";\n", "import { fromBase64, toBase64 } from \"@smithy/util-base64\";\nimport { fromUtf8, toUtf8 } from \"@smithy/util-utf8\";\nexport class Uint8ArrayBlobAdapter extends Uint8Array {\n static fromString(source, encoding = \"utf-8\") {\n if (typeof source === \"string\") {\n if (encoding === \"base64\") {\n return Uint8ArrayBlobAdapter.mutate(fromBase64(source));\n }\n return Uint8ArrayBlobAdapter.mutate(fromUtf8(source));\n }\n throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);\n }\n static mutate(source) {\n Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype);\n return source;\n }\n transformToString(encoding = \"utf-8\") {\n if (encoding === \"base64\") {\n return toBase64(this);\n }\n return toUtf8(this);\n }\n}\n", "const ReadableStreamRef = typeof ReadableStream === \"function\" ? ReadableStream : function () { };\nexport class ChecksumStream extends ReadableStreamRef {\n}\n", "export const isReadableStream = (stream) => typeof ReadableStream === \"function\" &&\n (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream);\nexport const isBlob = (blob) => {\n return typeof Blob === \"function\" && (blob?.constructor?.name === Blob.name || blob instanceof Blob);\n};\n", "import { toBase64 } from \"@smithy/util-base64\";\nimport { isReadableStream } from \"../stream-type-check\";\nimport { ChecksumStream } from \"./ChecksumStream.browser\";\nexport const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => {\n if (!isReadableStream(source)) {\n throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);\n }\n const encoder = base64Encoder ?? toBase64;\n if (typeof TransformStream !== \"function\") {\n throw new Error(\"@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.\");\n }\n const transform = new TransformStream({\n start() { },\n async transform(chunk, controller) {\n checksum.update(chunk);\n controller.enqueue(chunk);\n },\n async flush(controller) {\n const digest = await checksum.digest();\n const received = encoder(digest);\n if (expectedChecksum !== received) {\n const error = new Error(`Checksum mismatch: expected \"${expectedChecksum}\" but received \"${received}\"` +\n ` in response header \"${checksumSourceLocation}\".`);\n controller.error(error);\n }\n else {\n controller.terminate();\n }\n },\n });\n source.pipeThrough(transform);\n const readable = transform.readable;\n Object.setPrototypeOf(readable, ChecksumStream.prototype);\n return readable;\n};\n", "export class ByteArrayCollector {\n allocByteArray;\n byteLength = 0;\n byteArrays = [];\n constructor(allocByteArray) {\n this.allocByteArray = allocByteArray;\n }\n push(byteArray) {\n this.byteArrays.push(byteArray);\n this.byteLength += byteArray.byteLength;\n }\n flush() {\n if (this.byteArrays.length === 1) {\n const bytes = this.byteArrays[0];\n this.reset();\n return bytes;\n }\n const aggregation = this.allocByteArray(this.byteLength);\n let cursor = 0;\n for (let i = 0; i < this.byteArrays.length; ++i) {\n const bytes = this.byteArrays[i];\n aggregation.set(bytes, cursor);\n cursor += bytes.byteLength;\n }\n this.reset();\n return aggregation;\n }\n reset() {\n this.byteArrays = [];\n this.byteLength = 0;\n }\n}\n", "import { ByteArrayCollector } from \"./ByteArrayCollector\";\nexport function createBufferedReadableStream(upstream, size, logger) {\n const reader = upstream.getReader();\n let streamBufferingLoggedWarning = false;\n let bytesSeen = 0;\n const buffers = [\"\", new ByteArrayCollector((size) => new Uint8Array(size))];\n let mode = -1;\n const pull = async (controller) => {\n const { value, done } = await reader.read();\n const chunk = value;\n if (done) {\n if (mode !== -1) {\n const remainder = flush(buffers, mode);\n if (sizeOf(remainder) > 0) {\n controller.enqueue(remainder);\n }\n }\n controller.close();\n }\n else {\n const chunkMode = modeOf(chunk, false);\n if (mode !== chunkMode) {\n if (mode >= 0) {\n controller.enqueue(flush(buffers, mode));\n }\n mode = chunkMode;\n }\n if (mode === -1) {\n controller.enqueue(chunk);\n return;\n }\n const chunkSize = sizeOf(chunk);\n bytesSeen += chunkSize;\n const bufferSize = sizeOf(buffers[mode]);\n if (chunkSize >= size && bufferSize === 0) {\n controller.enqueue(chunk);\n }\n else {\n const newSize = merge(buffers, mode, chunk);\n if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {\n streamBufferingLoggedWarning = true;\n logger?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);\n }\n if (newSize >= size) {\n controller.enqueue(flush(buffers, mode));\n }\n else {\n await pull(controller);\n }\n }\n }\n };\n return new ReadableStream({\n pull,\n });\n}\nexport const createBufferedReadable = createBufferedReadableStream;\nexport function merge(buffers, mode, chunk) {\n switch (mode) {\n case 0:\n buffers[0] += chunk;\n return sizeOf(buffers[0]);\n case 1:\n case 2:\n buffers[mode].push(chunk);\n return sizeOf(buffers[mode]);\n }\n}\nexport function flush(buffers, mode) {\n switch (mode) {\n case 0:\n const s = buffers[0];\n buffers[0] = \"\";\n return s;\n case 1:\n case 2:\n return buffers[mode].flush();\n }\n throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`);\n}\nexport function sizeOf(chunk) {\n return chunk?.byteLength ?? chunk?.length ?? 0;\n}\nexport function modeOf(chunk, allowBuffer = true) {\n if (allowBuffer && typeof Buffer !== \"undefined\" && chunk instanceof Buffer) {\n return 2;\n }\n if (chunk instanceof Uint8Array) {\n return 1;\n }\n if (typeof chunk === \"string\") {\n return 0;\n }\n return -1;\n}\n", "export const getAwsChunkedEncodingStream = (readableStream, options) => {\n const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;\n const checksumRequired = base64Encoder !== undefined &&\n bodyLengthChecker !== undefined &&\n checksumAlgorithmFn !== undefined &&\n checksumLocationName !== undefined &&\n streamHasher !== undefined;\n const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;\n const reader = readableStream.getReader();\n return new ReadableStream({\n async pull(controller) {\n const { value, done } = await reader.read();\n if (done) {\n controller.enqueue(`0\\r\\n`);\n if (checksumRequired) {\n const checksum = base64Encoder(await digest);\n controller.enqueue(`${checksumLocationName}:${checksum}\\r\\n`);\n controller.enqueue(`\\r\\n`);\n }\n controller.close();\n }\n else {\n controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\\r\\n${value}\\r\\n`);\n }\n },\n });\n};\n", "export async function headStream(stream, bytes) {\n let byteLengthCounter = 0;\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n byteLengthCounter += value?.byteLength ?? 0;\n }\n if (byteLengthCounter >= bytes) {\n break;\n }\n isDone = done;\n }\n reader.releaseLock();\n const collected = new Uint8Array(Math.min(bytes, byteLengthCounter));\n let offset = 0;\n for (const chunk of chunks) {\n if (chunk.byteLength > collected.byteLength - offset) {\n collected.set(chunk.subarray(0, collected.byteLength - offset), offset);\n break;\n }\n else {\n collected.set(chunk, offset);\n }\n offset += chunk.length;\n }\n return collected;\n}\n", "export const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);\nconst hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;\n", "import { escapeUri } from \"./escape-uri\";\nexport const escapeUriPath = (uri) => uri.split(\"/\").map(escapeUri).join(\"/\");\n", "export * from \"./escape-uri\";\nexport * from \"./escape-uri-path\";\n", "import { escapeUri } from \"@smithy/util-uri-escape\";\nexport function buildQueryString(query) {\n const parts = [];\n for (let key of Object.keys(query).sort()) {\n const value = query[key];\n key = escapeUri(key);\n if (Array.isArray(value)) {\n for (let i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(`${key}=${escapeUri(value[i])}`);\n }\n }\n else {\n let qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += `=${escapeUri(value)}`;\n }\n parts.push(qsEntry);\n }\n }\n return parts.join(\"&\");\n}\n", "export function createRequest(url, requestOptions) {\n return new Request(url, requestOptions);\n}\n", "export function requestTimeout(timeoutInMs = 0) {\n return new Promise((resolve, reject) => {\n if (timeoutInMs) {\n setTimeout(() => {\n const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);\n timeoutError.name = \"TimeoutError\";\n reject(timeoutError);\n }, timeoutInMs);\n }\n });\n}\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nimport { buildQueryString } from \"@smithy/querystring-builder\";\nimport { createRequest } from \"./create-request\";\nimport { requestTimeout as requestTimeoutFn } from \"./request-timeout\";\nexport const keepAliveSupport = {\n supported: undefined,\n};\nexport class FetchHttpHandler {\n config;\n configProvider;\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new FetchHttpHandler(instanceOrOptions);\n }\n constructor(options) {\n if (typeof options === \"function\") {\n this.configProvider = options().then((opts) => opts || {});\n }\n else {\n this.config = options ?? {};\n this.configProvider = Promise.resolve(this.config);\n }\n if (keepAliveSupport.supported === undefined) {\n keepAliveSupport.supported = Boolean(typeof Request !== \"undefined\" && \"keepalive\" in createRequest(\"https://[::1]\"));\n }\n }\n destroy() {\n }\n async handle(request, { abortSignal, requestTimeout } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n const requestTimeoutInMs = requestTimeout ?? this.config.requestTimeout;\n const keepAlive = this.config.keepAlive === true;\n const credentials = this.config.credentials;\n if (abortSignal?.aborted) {\n const abortError = buildAbortError(abortSignal);\n return Promise.reject(abortError);\n }\n let path = request.path;\n const queryString = buildQueryString(request.query || {});\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const { port, method } = request;\n const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : \"\"}${path}`;\n const body = method === \"GET\" || method === \"HEAD\" ? undefined : request.body;\n const requestOptions = {\n body,\n headers: new Headers(request.headers),\n method: method,\n credentials,\n };\n if (this.config?.cache) {\n requestOptions.cache = this.config.cache;\n }\n if (body) {\n requestOptions.duplex = \"half\";\n }\n if (typeof AbortController !== \"undefined\") {\n requestOptions.signal = abortSignal;\n }\n if (keepAliveSupport.supported) {\n requestOptions.keepalive = keepAlive;\n }\n if (typeof this.config.requestInit === \"function\") {\n Object.assign(requestOptions, this.config.requestInit(request));\n }\n let removeSignalEventListener = () => { };\n const fetchRequest = createRequest(url, requestOptions);\n const raceOfPromises = [\n fetch(fetchRequest).then((response) => {\n const fetchHeaders = response.headers;\n const transformedHeaders = {};\n for (const pair of fetchHeaders.entries()) {\n transformedHeaders[pair[0]] = pair[1];\n }\n const hasReadableStream = response.body != undefined;\n if (!hasReadableStream) {\n return response.blob().then((body) => ({\n response: new HttpResponse({\n headers: transformedHeaders,\n reason: response.statusText,\n statusCode: response.status,\n body,\n }),\n }));\n }\n return {\n response: new HttpResponse({\n headers: transformedHeaders,\n reason: response.statusText,\n statusCode: response.status,\n body: response.body,\n }),\n };\n }),\n requestTimeoutFn(requestTimeoutInMs),\n ];\n if (abortSignal) {\n raceOfPromises.push(new Promise((resolve, reject) => {\n const onAbort = () => {\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n };\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n removeSignalEventListener = () => signal.removeEventListener(\"abort\", onAbort);\n }\n else {\n abortSignal.onabort = onAbort;\n }\n }));\n }\n return Promise.race(raceOfPromises).finally(removeSignalEventListener);\n }\n updateHttpClientConfig(key, value) {\n this.config = undefined;\n this.configProvider = this.configProvider.then((config) => {\n config[key] = value;\n return config;\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n}\nfunction buildAbortError(abortSignal) {\n const reason = abortSignal && typeof abortSignal === \"object\" && \"reason\" in abortSignal\n ? abortSignal.reason\n : undefined;\n if (reason) {\n if (reason instanceof Error) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n abortError.cause = reason;\n return abortError;\n }\n const abortError = new Error(String(reason));\n abortError.name = \"AbortError\";\n return abortError;\n }\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n return abortError;\n}\n", "import { fromBase64 } from \"@smithy/util-base64\";\nexport const streamCollector = async (stream) => {\n if ((typeof Blob === \"function\" && stream instanceof Blob) || stream.constructor?.name === \"Blob\") {\n if (Blob.prototype.arrayBuffer !== undefined) {\n return new Uint8Array(await stream.arrayBuffer());\n }\n return collectBlob(stream);\n }\n return collectStream(stream);\n};\nasync function collectBlob(blob) {\n const base64 = await readToBase64(blob);\n const arrayBuffer = fromBase64(base64);\n return new Uint8Array(arrayBuffer);\n}\nasync function collectStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n let length = 0;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n isDone = done;\n }\n const collected = new Uint8Array(length);\n let offset = 0;\n for (const chunk of chunks) {\n collected.set(chunk, offset);\n offset += chunk.length;\n }\n return collected;\n}\nfunction readToBase64(blob) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n if (reader.readyState !== 2) {\n return reject(new Error(\"Reader aborted too early\"));\n }\n const result = (reader.result ?? \"\");\n const commaIndex = result.indexOf(\",\");\n const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;\n resolve(result.substring(dataOffset));\n };\n reader.onabort = () => reject(new Error(\"Read aborted\"));\n reader.onerror = () => reject(reader.error);\n reader.readAsDataURL(blob);\n });\n}\n", "export * from \"./fetch-http-handler\";\nexport * from \"./stream-collector\";\n", "const SHORT_TO_HEX = {};\nconst HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\nexport function fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n }\n else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n}\nexport function toHex(bytes) {\n let out = \"\";\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n}\n", "import { streamCollector } from \"@smithy/fetch-http-handler\";\nimport { toBase64 } from \"@smithy/util-base64\";\nimport { toHex } from \"@smithy/util-hex-encoding\";\nimport { toUtf8 } from \"@smithy/util-utf8\";\nimport { isReadableStream } from \"./stream-type-check\";\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nexport const sdkStreamMixin = (stream) => {\n if (!isBlobInstance(stream) && !isReadableStream(stream)) {\n const name = stream?.__proto__?.constructor?.name || stream;\n throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await streamCollector(stream);\n };\n const blobToWebStream = (blob) => {\n if (typeof blob.stream !== \"function\") {\n throw new Error(\"Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\\n\" +\n \"If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body\");\n }\n return blob.stream();\n };\n return Object.assign(stream, {\n transformToByteArray: transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === \"base64\") {\n return toBase64(buf);\n }\n else if (encoding === \"hex\") {\n return toHex(buf);\n }\n else if (encoding === undefined || encoding === \"utf8\" || encoding === \"utf-8\") {\n return toUtf8(buf);\n }\n else if (typeof TextDecoder === \"function\") {\n return new TextDecoder(encoding).decode(buf);\n }\n else {\n throw new Error(\"TextDecoder is not available, please make sure polyfill is provided.\");\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n if (isBlobInstance(stream)) {\n return blobToWebStream(stream);\n }\n else if (isReadableStream(stream)) {\n return stream;\n }\n else {\n throw new Error(`Cannot transform payload to web stream, got ${stream}`);\n }\n },\n });\n};\nconst isBlobInstance = (stream) => typeof Blob === \"function\" && stream instanceof Blob;\n", "export async function splitStream(stream) {\n if (typeof stream.stream === \"function\") {\n stream = stream.stream();\n }\n const readableStream = stream;\n return readableStream.tee();\n}\n", "export * from \"./blob/Uint8ArrayBlobAdapter\";\nexport * from \"./checksum/ChecksumStream\";\nexport * from \"./checksum/createChecksumStream\";\nexport * from \"./createBufferedReadable\";\nexport * from \"./getAwsChunkedEncodingStream\";\nexport * from \"./headStream\";\nexport * from \"./sdk-stream-mixin\";\nexport * from \"./splitStream\";\nexport { isReadableStream, isBlob } from \"./stream-type-check\";\n", "import { Uint8ArrayBlobAdapter } from \"@smithy/util-stream\";\nexport const collectBody = async (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return Uint8ArrayBlobAdapter.mutate(streamBody);\n }\n if (!streamBody) {\n return Uint8ArrayBlobAdapter.mutate(new Uint8Array());\n }\n const fromContext = context.streamCollector(streamBody);\n return Uint8ArrayBlobAdapter.mutate(await fromContext);\n};\n", "export function extendedEncodeURIComponent(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n", "export const deref = (schemaRef) => {\n if (typeof schemaRef === \"function\") {\n return schemaRef();\n }\n return schemaRef;\n};\n", "export const operation = (namespace, name, traits, input, output) => ({\n name,\n namespace,\n traits,\n input,\n output,\n});\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nimport { getSmithyContext } from \"@smithy/util-middleware\";\nimport { operation } from \"../schemas/operation\";\nexport const schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {\n const { response } = await next(args);\n const { operationSchema } = getSmithyContext(context);\n const [, ns, n, t, i, o] = operationSchema ?? [];\n try {\n const parsed = await config.protocol.deserializeResponse(operation(ns, n, t, i, o), {\n ...config,\n ...context,\n }, response);\n return {\n response,\n output: parsed,\n };\n }\n catch (error) {\n Object.defineProperty(error, \"$response\", {\n value: response,\n enumerable: false,\n writable: false,\n configurable: false,\n });\n if (!(\"$metadata\" in error)) {\n const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;\n try {\n error.message += \"\\n \" + hint;\n }\n catch (e) {\n if (!context.logger || context.logger?.constructor?.name === \"NoOpLogger\") {\n console.warn(hint);\n }\n else {\n context.logger?.warn?.(hint);\n }\n }\n if (typeof error.$responseBodyText !== \"undefined\") {\n if (error.$response) {\n error.$response.body = error.$responseBodyText;\n }\n }\n try {\n if (HttpResponse.isInstance(response)) {\n const { headers = {} } = response;\n const headerEntries = Object.entries(headers);\n error.$metadata = {\n httpStatusCode: response.statusCode,\n requestId: findHeader(/^x-[\\w-]+-request-?id$/, headerEntries),\n extendedRequestId: findHeader(/^x-[\\w-]+-id-2$/, headerEntries),\n cfId: findHeader(/^x-[\\w-]+-cf-id$/, headerEntries),\n };\n }\n }\n catch (e) {\n }\n }\n throw error;\n }\n};\nconst findHeader = (pattern, headers) => {\n return (headers.find(([k]) => {\n return k.match(pattern);\n }) || [void 0, void 1])[1];\n};\n", "export function parseQueryString(querystring) {\n const query = {};\n querystring = querystring.replace(/^\\?/, \"\");\n if (querystring) {\n for (const pair of querystring.split(\"&\")) {\n let [key, value = null] = pair.split(\"=\");\n key = decodeURIComponent(key);\n if (value) {\n value = decodeURIComponent(value);\n }\n if (!(key in query)) {\n query[key] = value;\n }\n else if (Array.isArray(query[key])) {\n query[key].push(value);\n }\n else {\n query[key] = [query[key], value];\n }\n }\n }\n return query;\n}\n", "import { parseQueryString } from \"@smithy/querystring-parser\";\nexport const parseUrl = (url) => {\n if (typeof url === \"string\") {\n return parseUrl(new URL(url));\n }\n const { hostname, pathname, port, protocol, search } = url;\n let query;\n if (search) {\n query = parseQueryString(search);\n }\n return {\n hostname,\n port: port ? parseInt(port) : undefined,\n protocol,\n path: pathname,\n query,\n };\n};\n", "import { parseUrl } from \"@smithy/url-parser\";\nexport const toEndpointV1 = (endpoint) => {\n if (typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n const v1Endpoint = parseUrl(endpoint.url);\n if (endpoint.headers) {\n v1Endpoint.headers = {};\n for (const [name, values] of Object.entries(endpoint.headers)) {\n v1Endpoint.headers[name.toLowerCase()] = values.join(\", \");\n }\n }\n return v1Endpoint;\n }\n return endpoint;\n }\n return parseUrl(endpoint);\n};\n", "export * from \"./toEndpointV1\";\n", "import { toEndpointV1 } from \"@smithy/core/endpoints\";\nimport { getSmithyContext } from \"@smithy/util-middleware\";\nimport { operation } from \"../schemas/operation\";\nexport const schemaSerializationMiddleware = (config) => (next, context) => async (args) => {\n const { operationSchema } = getSmithyContext(context);\n const [, ns, n, t, i, o] = operationSchema ?? [];\n const endpoint = context.endpointV2\n ? async () => toEndpointV1(context.endpointV2)\n : config.endpoint;\n const request = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, {\n ...config,\n ...context,\n endpoint,\n });\n return next({\n ...args,\n request,\n });\n};\n", "import { schemaDeserializationMiddleware } from \"./schemaDeserializationMiddleware\";\nimport { schemaSerializationMiddleware } from \"./schemaSerializationMiddleware\";\nexport const deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true,\n};\nexport const serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true,\n};\nexport function getSchemaSerdePlugin(config) {\n return {\n applyToStack: (commandStack) => {\n commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption);\n commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption);\n config.protocol.setSerdeContext(config);\n },\n };\n}\n", "export class Schema {\n name;\n namespace;\n traits;\n static assign(instance, values) {\n const schema = Object.assign(instance, values);\n return schema;\n }\n static [Symbol.hasInstance](lhs) {\n const isPrototype = this.prototype.isPrototypeOf(lhs);\n if (!isPrototype && typeof lhs === \"object\" && lhs !== null) {\n const list = lhs;\n return list.symbol === this.symbol;\n }\n return isPrototype;\n }\n getName() {\n return this.namespace + \"#\" + this.name;\n }\n}\n", "import { Schema } from \"./Schema\";\nexport class ListSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/lis\");\n name;\n traits;\n valueSchema;\n symbol = ListSchema.symbol;\n}\nexport const list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), {\n name,\n namespace,\n traits,\n valueSchema,\n});\n", "import { Schema } from \"./Schema\";\nexport class MapSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/map\");\n name;\n traits;\n keySchema;\n valueSchema;\n symbol = MapSchema.symbol;\n}\nexport const map = (namespace, name, traits, keySchema, valueSchema) => Schema.assign(new MapSchema(), {\n name,\n namespace,\n traits,\n keySchema,\n valueSchema,\n});\n", "import { Schema } from \"./Schema\";\nexport class OperationSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/ope\");\n name;\n traits;\n input;\n output;\n symbol = OperationSchema.symbol;\n}\nexport const op = (namespace, name, traits, input, output) => Schema.assign(new OperationSchema(), {\n name,\n namespace,\n traits,\n input,\n output,\n});\n", "import { Schema } from \"./Schema\";\nexport class StructureSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/str\");\n name;\n traits;\n memberNames;\n memberList;\n symbol = StructureSchema.symbol;\n}\nexport const struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), {\n name,\n namespace,\n traits,\n memberNames,\n memberList,\n});\n", "import { Schema } from \"./Schema\";\nimport { StructureSchema } from \"./StructureSchema\";\nexport class ErrorSchema extends StructureSchema {\n static symbol = Symbol.for(\"@smithy/err\");\n ctor;\n symbol = ErrorSchema.symbol;\n}\nexport const error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), {\n name,\n namespace,\n traits,\n memberNames,\n memberList,\n ctor: null,\n});\n", "export const traitsCache = [];\nexport function translateTraits(indicator) {\n if (typeof indicator === \"object\") {\n return indicator;\n }\n indicator = indicator | 0;\n if (traitsCache[indicator]) {\n return traitsCache[indicator];\n }\n const traits = {};\n let i = 0;\n for (const trait of [\n \"httpLabel\",\n \"idempotent\",\n \"idempotencyToken\",\n \"sensitive\",\n \"httpPayload\",\n \"httpResponseCode\",\n \"httpQueryParams\",\n ]) {\n if (((indicator >> i++) & 1) === 1) {\n traits[trait] = 1;\n }\n }\n return (traitsCache[indicator] = traits);\n}\n", "import { deref } from \"../deref\";\nimport { translateTraits } from \"./translateTraits\";\nconst anno = {\n it: Symbol.for(\"@smithy/nor-struct-it\"),\n ns: Symbol.for(\"@smithy/ns\"),\n};\nexport const simpleSchemaCacheN = [];\nexport const simpleSchemaCacheS = {};\nexport class NormalizedSchema {\n ref;\n memberName;\n static symbol = Symbol.for(\"@smithy/nor\");\n symbol = NormalizedSchema.symbol;\n name;\n schema;\n _isMemberSchema;\n traits;\n memberTraits;\n normalizedTraits;\n constructor(ref, memberName) {\n this.ref = ref;\n this.memberName = memberName;\n const traitStack = [];\n let _ref = ref;\n let schema = ref;\n this._isMemberSchema = false;\n while (isMemberSchema(_ref)) {\n traitStack.push(_ref[1]);\n _ref = _ref[0];\n schema = deref(_ref);\n this._isMemberSchema = true;\n }\n if (traitStack.length > 0) {\n this.memberTraits = {};\n for (let i = traitStack.length - 1; i >= 0; --i) {\n const traitSet = traitStack[i];\n Object.assign(this.memberTraits, translateTraits(traitSet));\n }\n }\n else {\n this.memberTraits = 0;\n }\n if (schema instanceof NormalizedSchema) {\n const computedMemberTraits = this.memberTraits;\n Object.assign(this, schema);\n this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits());\n this.normalizedTraits = void 0;\n this.memberName = memberName ?? schema.memberName;\n return;\n }\n this.schema = deref(schema);\n if (isStaticSchema(this.schema)) {\n this.name = `${this.schema[1]}#${this.schema[2]}`;\n this.traits = this.schema[3];\n }\n else {\n this.name = this.memberName ?? String(schema);\n this.traits = 0;\n }\n if (this._isMemberSchema && !memberName) {\n throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`);\n }\n }\n static [Symbol.hasInstance](lhs) {\n const isPrototype = this.prototype.isPrototypeOf(lhs);\n if (!isPrototype && typeof lhs === \"object\" && lhs !== null) {\n const ns = lhs;\n return ns.symbol === this.symbol;\n }\n return isPrototype;\n }\n static of(ref) {\n const keyAble = typeof ref === \"function\" || (typeof ref === \"object\" && ref !== null);\n if (typeof ref === \"number\") {\n if (simpleSchemaCacheN[ref]) {\n return simpleSchemaCacheN[ref];\n }\n }\n else if (typeof ref === \"string\") {\n if (simpleSchemaCacheS[ref]) {\n return simpleSchemaCacheS[ref];\n }\n }\n else if (keyAble) {\n if (ref[anno.ns]) {\n return ref[anno.ns];\n }\n }\n const sc = deref(ref);\n if (sc instanceof NormalizedSchema) {\n return sc;\n }\n if (isMemberSchema(sc)) {\n const [ns, traits] = sc;\n if (ns instanceof NormalizedSchema) {\n Object.assign(ns.getMergedTraits(), translateTraits(traits));\n return ns;\n }\n throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`);\n }\n const ns = new NormalizedSchema(sc);\n if (keyAble) {\n return (ref[anno.ns] = ns);\n }\n if (typeof sc === \"string\") {\n return (simpleSchemaCacheS[sc] = ns);\n }\n if (typeof sc === \"number\") {\n return (simpleSchemaCacheN[sc] = ns);\n }\n return ns;\n }\n getSchema() {\n const sc = this.schema;\n if (Array.isArray(sc) && sc[0] === 0) {\n return sc[4];\n }\n return sc;\n }\n getName(withNamespace = false) {\n const { name } = this;\n const short = !withNamespace && name && name.includes(\"#\");\n return short ? name.split(\"#\")[1] : name || undefined;\n }\n getMemberName() {\n return this.memberName;\n }\n isMemberSchema() {\n return this._isMemberSchema;\n }\n isListSchema() {\n const sc = this.getSchema();\n return typeof sc === \"number\"\n ? sc >= 64 && sc < 128\n : sc[0] === 1;\n }\n isMapSchema() {\n const sc = this.getSchema();\n return typeof sc === \"number\"\n ? sc >= 128 && sc <= 0b1111_1111\n : sc[0] === 2;\n }\n isStructSchema() {\n const sc = this.getSchema();\n if (typeof sc !== \"object\") {\n return false;\n }\n const id = sc[0];\n return (id === 3 ||\n id === -3 ||\n id === 4);\n }\n isUnionSchema() {\n const sc = this.getSchema();\n if (typeof sc !== \"object\") {\n return false;\n }\n return sc[0] === 4;\n }\n isBlobSchema() {\n const sc = this.getSchema();\n return sc === 21 || sc === 42;\n }\n isTimestampSchema() {\n const sc = this.getSchema();\n return (typeof sc === \"number\" &&\n sc >= 4 &&\n sc <= 7);\n }\n isUnitSchema() {\n return this.getSchema() === \"unit\";\n }\n isDocumentSchema() {\n return this.getSchema() === 15;\n }\n isStringSchema() {\n return this.getSchema() === 0;\n }\n isBooleanSchema() {\n return this.getSchema() === 2;\n }\n isNumericSchema() {\n return this.getSchema() === 1;\n }\n isBigIntegerSchema() {\n return this.getSchema() === 17;\n }\n isBigDecimalSchema() {\n return this.getSchema() === 19;\n }\n isStreaming() {\n const { streaming } = this.getMergedTraits();\n return !!streaming || this.getSchema() === 42;\n }\n isIdempotencyToken() {\n return !!this.getMergedTraits().idempotencyToken;\n }\n getMergedTraits() {\n return (this.normalizedTraits ??\n (this.normalizedTraits = {\n ...this.getOwnTraits(),\n ...this.getMemberTraits(),\n }));\n }\n getMemberTraits() {\n return translateTraits(this.memberTraits);\n }\n getOwnTraits() {\n return translateTraits(this.traits);\n }\n getKeySchema() {\n const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()];\n if (!isDoc && !isMap) {\n throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`);\n }\n const schema = this.getSchema();\n const memberSchema = isDoc\n ? 15\n : schema[4] ?? 0;\n return member([memberSchema, 0], \"key\");\n }\n getValueSchema() {\n const sc = this.getSchema();\n const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()];\n const memberSchema = typeof sc === \"number\"\n ? 0b0011_1111 & sc\n : sc && typeof sc === \"object\" && (isMap || isList)\n ? sc[3 + sc[0]]\n : isDoc\n ? 15\n : void 0;\n if (memberSchema != null) {\n return member([memberSchema, 0], isMap ? \"value\" : \"member\");\n }\n throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`);\n }\n getMemberSchema(memberName) {\n const struct = this.getSchema();\n if (this.isStructSchema() && struct[4].includes(memberName)) {\n const i = struct[4].indexOf(memberName);\n const memberSchema = struct[5][i];\n return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName);\n }\n if (this.isDocumentSchema()) {\n return member([15, 0], memberName);\n }\n throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`);\n }\n getMemberSchemas() {\n const buffer = {};\n try {\n for (const [k, v] of this.structIterator()) {\n buffer[k] = v;\n }\n }\n catch (ignored) { }\n return buffer;\n }\n getEventStreamMember() {\n if (this.isStructSchema()) {\n for (const [memberName, memberSchema] of this.structIterator()) {\n if (memberSchema.isStreaming() && memberSchema.isStructSchema()) {\n return memberName;\n }\n }\n }\n return \"\";\n }\n *structIterator() {\n if (this.isUnitSchema()) {\n return;\n }\n if (!this.isStructSchema()) {\n throw new Error(\"@smithy/core/schema - cannot iterate non-struct schema.\");\n }\n const struct = this.getSchema();\n const z = struct[4].length;\n let it = struct[anno.it];\n if (it && z === it.length) {\n yield* it;\n return;\n }\n it = Array(z);\n for (let i = 0; i < z; ++i) {\n const k = struct[4][i];\n const v = member([struct[5][i], 0], k);\n yield (it[i] = [k, v]);\n }\n struct[anno.it] = it;\n }\n}\nfunction member(memberSchema, memberName) {\n if (memberSchema instanceof NormalizedSchema) {\n return Object.assign(memberSchema, {\n memberName,\n _isMemberSchema: true,\n });\n }\n const internalCtorAccess = NormalizedSchema;\n return new internalCtorAccess(memberSchema, memberName);\n}\nconst isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2;\nexport const isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5;\n", "import { Schema } from \"./Schema\";\nexport class SimpleSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/sim\");\n name;\n schemaRef;\n traits;\n symbol = SimpleSchema.symbol;\n}\nexport const sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), {\n name,\n namespace,\n traits,\n schemaRef,\n});\nexport const simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), {\n name,\n namespace,\n traits,\n schemaRef,\n});\n", "export const SCHEMA = {\n BLOB: 0b0001_0101,\n STREAMING_BLOB: 0b0010_1010,\n BOOLEAN: 0b0000_0010,\n STRING: 0b0000_0000,\n NUMERIC: 0b0000_0001,\n BIG_INTEGER: 0b0001_0001,\n BIG_DECIMAL: 0b0001_0011,\n DOCUMENT: 0b0000_1111,\n TIMESTAMP_DEFAULT: 0b0000_0100,\n TIMESTAMP_DATE_TIME: 0b0000_0101,\n TIMESTAMP_HTTP_DATE: 0b0000_0110,\n TIMESTAMP_EPOCH_SECONDS: 0b0000_0111,\n LIST_MODIFIER: 0b0100_0000,\n MAP_MODIFIER: 0b1000_0000,\n};\n", "export class TypeRegistry {\n namespace;\n schemas;\n exceptions;\n static registries = new Map();\n constructor(namespace, schemas = new Map(), exceptions = new Map()) {\n this.namespace = namespace;\n this.schemas = schemas;\n this.exceptions = exceptions;\n }\n static for(namespace) {\n if (!TypeRegistry.registries.has(namespace)) {\n TypeRegistry.registries.set(namespace, new TypeRegistry(namespace));\n }\n return TypeRegistry.registries.get(namespace);\n }\n copyFrom(other) {\n const { schemas, exceptions } = this;\n for (const [k, v] of other.schemas) {\n if (!schemas.has(k)) {\n schemas.set(k, v);\n }\n }\n for (const [k, v] of other.exceptions) {\n if (!exceptions.has(k)) {\n exceptions.set(k, v);\n }\n }\n }\n register(shapeId, schema) {\n const qualifiedName = this.normalizeShapeId(shapeId);\n for (const r of [this, TypeRegistry.for(qualifiedName.split(\"#\")[0])]) {\n r.schemas.set(qualifiedName, schema);\n }\n }\n getSchema(shapeId) {\n const id = this.normalizeShapeId(shapeId);\n if (!this.schemas.has(id)) {\n throw new Error(`@smithy/core/schema - schema not found for ${id}`);\n }\n return this.schemas.get(id);\n }\n registerError(es, ctor) {\n const $error = es;\n const ns = $error[1];\n for (const r of [this, TypeRegistry.for(ns)]) {\n r.schemas.set(ns + \"#\" + $error[2], $error);\n r.exceptions.set($error, ctor);\n }\n }\n getErrorCtor(es) {\n const $error = es;\n if (this.exceptions.has($error)) {\n return this.exceptions.get($error);\n }\n const registry = TypeRegistry.for($error[1]);\n return registry.exceptions.get($error);\n }\n getBaseException() {\n for (const exceptionKey of this.exceptions.keys()) {\n if (Array.isArray(exceptionKey)) {\n const [, ns, name] = exceptionKey;\n const id = ns + \"#\" + name;\n if (id.startsWith(\"smithy.ts.sdk.synthetic.\") && id.endsWith(\"ServiceException\")) {\n return exceptionKey;\n }\n }\n }\n return undefined;\n }\n find(predicate) {\n return [...this.schemas.values()].find(predicate);\n }\n clear() {\n this.schemas.clear();\n this.exceptions.clear();\n }\n normalizeShapeId(shapeId) {\n if (shapeId.includes(\"#\")) {\n return shapeId;\n }\n return this.namespace + \"#\" + shapeId;\n }\n}\n", "export * from \"./deref\";\nexport * from \"./middleware/getSchemaSerdePlugin\";\nexport * from \"./schemas/ListSchema\";\nexport * from \"./schemas/MapSchema\";\nexport * from \"./schemas/OperationSchema\";\nexport * from \"./schemas/operation\";\nexport * from \"./schemas/ErrorSchema\";\nexport * from \"./schemas/NormalizedSchema\";\nexport * from \"./schemas/Schema\";\nexport * from \"./schemas/SimpleSchema\";\nexport * from \"./schemas/StructureSchema\";\nexport * from \"./schemas/sentinels\";\nexport * from \"./schemas/translateTraits\";\nexport * from \"./TypeRegistry\";\n", "export const copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source;\n", "export const parseBoolean = (value) => {\n switch (value) {\n case \"true\":\n return true;\n case \"false\":\n return false;\n default:\n throw new Error(`Unable to parse boolean value \"${value}\"`);\n }\n};\nexport const expectBoolean = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"number\") {\n if (value === 0 || value === 1) {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (value === 0) {\n return false;\n }\n if (value === 1) {\n return true;\n }\n }\n if (typeof value === \"string\") {\n const lower = value.toLowerCase();\n if (lower === \"false\" || lower === \"true\") {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (lower === \"false\") {\n return false;\n }\n if (lower === \"true\") {\n return true;\n }\n }\n if (typeof value === \"boolean\") {\n return value;\n }\n throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);\n};\nexport const expectNumber = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"string\") {\n const parsed = parseFloat(value);\n if (!Number.isNaN(parsed)) {\n if (String(parsed) !== String(value)) {\n logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));\n }\n return parsed;\n }\n }\n if (typeof value === \"number\") {\n return value;\n }\n throw new TypeError(`Expected number, got ${typeof value}: ${value}`);\n};\nconst MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));\nexport const expectFloat32 = (value) => {\n const expected = expectNumber(value);\n if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {\n if (Math.abs(expected) > MAX_FLOAT) {\n throw new TypeError(`Expected 32-bit float, got ${value}`);\n }\n }\n return expected;\n};\nexport const expectLong = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (Number.isInteger(value) && !Number.isNaN(value)) {\n return value;\n }\n throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);\n};\nexport const expectInt = expectLong;\nexport const expectInt32 = (value) => expectSizedInt(value, 32);\nexport const expectShort = (value) => expectSizedInt(value, 16);\nexport const expectByte = (value) => expectSizedInt(value, 8);\nconst expectSizedInt = (value, size) => {\n const expected = expectLong(value);\n if (expected !== undefined && castInt(expected, size) !== expected) {\n throw new TypeError(`Expected ${size}-bit integer, got ${value}`);\n }\n return expected;\n};\nconst castInt = (value, size) => {\n switch (size) {\n case 32:\n return Int32Array.of(value)[0];\n case 16:\n return Int16Array.of(value)[0];\n case 8:\n return Int8Array.of(value)[0];\n }\n};\nexport const expectNonNull = (value, location) => {\n if (value === null || value === undefined) {\n if (location) {\n throw new TypeError(`Expected a non-null value for ${location}`);\n }\n throw new TypeError(\"Expected a non-null value\");\n }\n return value;\n};\nexport const expectObject = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"object\" && !Array.isArray(value)) {\n return value;\n }\n const receivedType = Array.isArray(value) ? \"array\" : typeof value;\n throw new TypeError(`Expected object, got ${receivedType}: ${value}`);\n};\nexport const expectString = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"string\") {\n return value;\n }\n if ([\"boolean\", \"number\", \"bigint\"].includes(typeof value)) {\n logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));\n return String(value);\n }\n throw new TypeError(`Expected string, got ${typeof value}: ${value}`);\n};\nexport const expectUnion = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n const asObject = expectObject(value);\n const setKeys = Object.entries(asObject)\n .filter(([, v]) => v != null)\n .map(([k]) => k);\n if (setKeys.length === 0) {\n throw new TypeError(`Unions must have exactly one non-null member. None were found.`);\n }\n if (setKeys.length > 1) {\n throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);\n }\n return asObject;\n};\nexport const strictParseDouble = (value) => {\n if (typeof value == \"string\") {\n return expectNumber(parseNumber(value));\n }\n return expectNumber(value);\n};\nexport const strictParseFloat = strictParseDouble;\nexport const strictParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return expectFloat32(parseNumber(value));\n }\n return expectFloat32(value);\n};\nconst NUMBER_REGEX = /(-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)|(-?Infinity)|(NaN)/g;\nconst parseNumber = (value) => {\n const matches = value.match(NUMBER_REGEX);\n if (matches === null || matches[0].length !== value.length) {\n throw new TypeError(`Expected real number, got implicit NaN`);\n }\n return parseFloat(value);\n};\nexport const limitedParseDouble = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectNumber(value);\n};\nexport const handleFloat = limitedParseDouble;\nexport const limitedParseFloat = limitedParseDouble;\nexport const limitedParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectFloat32(value);\n};\nconst parseFloatString = (value) => {\n switch (value) {\n case \"NaN\":\n return NaN;\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n default:\n throw new Error(`Unable to parse float value: ${value}`);\n }\n};\nexport const strictParseLong = (value) => {\n if (typeof value === \"string\") {\n return expectLong(parseNumber(value));\n }\n return expectLong(value);\n};\nexport const strictParseInt = strictParseLong;\nexport const strictParseInt32 = (value) => {\n if (typeof value === \"string\") {\n return expectInt32(parseNumber(value));\n }\n return expectInt32(value);\n};\nexport const strictParseShort = (value) => {\n if (typeof value === \"string\") {\n return expectShort(parseNumber(value));\n }\n return expectShort(value);\n};\nexport const strictParseByte = (value) => {\n if (typeof value === \"string\") {\n return expectByte(parseNumber(value));\n }\n return expectByte(value);\n};\nconst stackTraceWarning = (message) => {\n return String(new TypeError(message).stack || message)\n .split(\"\\n\")\n .slice(0, 5)\n .filter((s) => !s.includes(\"stackTraceWarning\"))\n .join(\"\\n\");\n};\nexport const logger = {\n warn: console.warn,\n};\n", "import { strictParseByte, strictParseDouble, strictParseFloat32, strictParseShort } from \"./parse-utils\";\nconst DAYS = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\nconst MONTHS = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nexport function dateToUtcString(date) {\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const dayOfWeek = date.getUTCDay();\n const dayOfMonthInt = date.getUTCDate();\n const hoursInt = date.getUTCHours();\n const minutesInt = date.getUTCMinutes();\n const secondsInt = date.getUTCSeconds();\n const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;\n const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;\n const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;\n const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;\n return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;\n}\nconst RFC3339 = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?[zZ]$/);\nexport const parseRfc3339DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n};\nconst RFC3339_WITH_OFFSET = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?(([-+]\\d{2}\\:\\d{2})|[zZ])$/);\nexport const parseRfc3339DateTimeWithOffset = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339_WITH_OFFSET.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n if (offsetStr.toUpperCase() != \"Z\") {\n date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));\n }\n return date;\n};\nconst IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/);\nconst RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/);\nconst ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? (\\d{4})$/);\nexport const parseRfc7231DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-7231 date-times must be expressed as strings\");\n }\n let match = IMF_FIXDATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });\n }\n match = RFC_850_DATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), {\n hours,\n minutes,\n seconds,\n fractionalMilliseconds,\n }));\n }\n match = ASC_TIME.exec(value);\n if (match) {\n const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;\n return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), \"day\", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });\n }\n throw new TypeError(\"Invalid RFC-7231 date-time value\");\n};\nexport const parseEpochTimestamp = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n let valueAsDouble;\n if (typeof value === \"number\") {\n valueAsDouble = value;\n }\n else if (typeof value === \"string\") {\n valueAsDouble = strictParseDouble(value);\n }\n else if (typeof value === \"object\" && value.tag === 1) {\n valueAsDouble = value.value;\n }\n else {\n throw new TypeError(\"Epoch timestamps must be expressed as floating point numbers or their string representation\");\n }\n if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid, non-Infinite, non-NaN numerics\");\n }\n return new Date(Math.round(valueAsDouble * 1000));\n};\nconst buildDate = (year, month, day, time) => {\n const adjustedMonth = month - 1;\n validateDayOfMonth(year, adjustedMonth, day);\n return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, \"hour\", 0, 23), parseDateValue(time.minutes, \"minute\", 0, 59), parseDateValue(time.seconds, \"seconds\", 0, 60), parseMilliseconds(time.fractionalMilliseconds)));\n};\nconst parseTwoDigitYear = (value) => {\n const thisYear = new Date().getUTCFullYear();\n const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));\n if (valueInThisCentury < thisYear) {\n return valueInThisCentury + 100;\n }\n return valueInThisCentury;\n};\nconst FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000;\nconst adjustRfc850Year = (input) => {\n if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) {\n return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));\n }\n return input;\n};\nconst parseMonthByShortName = (value) => {\n const monthIdx = MONTHS.indexOf(value);\n if (monthIdx < 0) {\n throw new TypeError(`Invalid month: ${value}`);\n }\n return monthIdx + 1;\n};\nconst DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst validateDayOfMonth = (year, month, day) => {\n let maxDays = DAYS_IN_MONTH[month];\n if (month === 1 && isLeapYear(year)) {\n maxDays = 29;\n }\n if (day > maxDays) {\n throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);\n }\n};\nconst isLeapYear = (year) => {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n};\nconst parseDateValue = (value, type, lower, upper) => {\n const dateVal = strictParseByte(stripLeadingZeroes(value));\n if (dateVal < lower || dateVal > upper) {\n throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);\n }\n return dateVal;\n};\nconst parseMilliseconds = (value) => {\n if (value === null || value === undefined) {\n return 0;\n }\n return strictParseFloat32(\"0.\" + value) * 1000;\n};\nconst parseOffsetToMilliseconds = (value) => {\n const directionStr = value[0];\n let direction = 1;\n if (directionStr == \"+\") {\n direction = 1;\n }\n else if (directionStr == \"-\") {\n direction = -1;\n }\n else {\n throw new TypeError(`Offset direction, ${directionStr}, must be \"+\" or \"-\"`);\n }\n const hour = Number(value.substring(1, 3));\n const minute = Number(value.substring(4, 6));\n return direction * (hour * 60 + minute) * 60 * 1000;\n};\nconst stripLeadingZeroes = (value) => {\n let idx = 0;\n while (idx < value.length - 1 && value.charAt(idx) === \"0\") {\n idx++;\n }\n if (idx === 0) {\n return value;\n }\n return value.slice(idx);\n};\n", "export const randomUUID = typeof crypto !== \"undefined\" && crypto.randomUUID && crypto.randomUUID.bind(crypto);\n", "import { randomUUID } from \"./randomUUID\";\nconst decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, \"0\"));\nexport const v4 = () => {\n if (randomUUID) {\n return randomUUID();\n }\n const rnds = new Uint8Array(16);\n crypto.getRandomValues(rnds);\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n return (decimalToHex[rnds[0]] +\n decimalToHex[rnds[1]] +\n decimalToHex[rnds[2]] +\n decimalToHex[rnds[3]] +\n \"-\" +\n decimalToHex[rnds[4]] +\n decimalToHex[rnds[5]] +\n \"-\" +\n decimalToHex[rnds[6]] +\n decimalToHex[rnds[7]] +\n \"-\" +\n decimalToHex[rnds[8]] +\n decimalToHex[rnds[9]] +\n \"-\" +\n decimalToHex[rnds[10]] +\n decimalToHex[rnds[11]] +\n decimalToHex[rnds[12]] +\n decimalToHex[rnds[13]] +\n decimalToHex[rnds[14]] +\n decimalToHex[rnds[15]]);\n};\n", "export * from \"./v4\";\n", "import { v4 as generateIdempotencyToken } from \"@smithy/uuid\";\nexport { generateIdempotencyToken };\n", "export const LazyJsonString = function LazyJsonString(val) {\n const str = Object.assign(new String(val), {\n deserializeJSON() {\n return JSON.parse(String(val));\n },\n toString() {\n return String(val);\n },\n toJSON() {\n return String(val);\n },\n });\n return str;\n};\nLazyJsonString.from = (object) => {\n if (object && typeof object === \"object\" && (object instanceof LazyJsonString || \"deserializeJSON\" in object)) {\n return object;\n }\n else if (typeof object === \"string\" || Object.getPrototypeOf(object) === String.prototype) {\n return LazyJsonString(String(object));\n }\n return LazyJsonString(JSON.stringify(object));\n};\nLazyJsonString.fromObject = LazyJsonString.from;\n", "export function quoteHeader(part) {\n if (part.includes(\",\") || part.includes('\"')) {\n part = `\"${part.replace(/\"/g, '\\\\\"')}\"`;\n }\n return part;\n}\n", "const ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;\nconst mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;\nconst time = `(\\\\d?\\\\d):(\\\\d{2}):(\\\\d{2})(?:\\\\.(\\\\d+))?`;\nconst date = `(\\\\d?\\\\d)`;\nconst year = `(\\\\d{4})`;\nconst RFC3339_WITH_OFFSET = new RegExp(/^(\\d{4})-(\\d\\d)-(\\d\\d)[tT](\\d\\d):(\\d\\d):(\\d\\d)(\\.(\\d+))?(([-+]\\d\\d:\\d\\d)|[zZ])$/);\nconst IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`);\nconst RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\\\d\\\\d) ${time} GMT$`);\nconst ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\\\d\\\\d) ${time} ${year}$`);\nconst months = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nexport const _parseEpochTimestamp = (value) => {\n if (value == null) {\n return void 0;\n }\n let num = NaN;\n if (typeof value === \"number\") {\n num = value;\n }\n else if (typeof value === \"string\") {\n if (!/^-?\\d*\\.?\\d+$/.test(value)) {\n throw new TypeError(`parseEpochTimestamp - numeric string invalid.`);\n }\n num = Number.parseFloat(value);\n }\n else if (typeof value === \"object\" && value.tag === 1) {\n num = value.value;\n }\n if (isNaN(num) || Math.abs(num) === Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid finite numbers.\");\n }\n return new Date(Math.round(num * 1000));\n};\nexport const _parseRfc3339DateTimeWithOffset = (value) => {\n if (value == null) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC3339 timestamps must be strings\");\n }\n const matches = RFC3339_WITH_OFFSET.exec(value);\n if (!matches) {\n throw new TypeError(`Invalid RFC3339 timestamp format ${value}`);\n }\n const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches;\n range(monthStr, 1, 12);\n range(dayStr, 1, 31);\n range(hours, 0, 23);\n range(minutes, 0, 59);\n range(seconds, 0, 60);\n const date = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1000) : 0));\n date.setUTCFullYear(Number(yearStr));\n if (offsetStr.toUpperCase() != \"Z\") {\n const [, sign, offsetH, offsetM] = /([+-])(\\d\\d):(\\d\\d)/.exec(offsetStr) || [void 0, \"+\", 0, 0];\n const scalar = sign === \"-\" ? 1 : -1;\n date.setTime(date.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1000 + Number(offsetM) * 60 * 1000));\n }\n return date;\n};\nexport const _parseRfc7231DateTime = (value) => {\n if (value == null) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC7231 timestamps must be strings.\");\n }\n let day;\n let month;\n let year;\n let hour;\n let minute;\n let second;\n let fraction;\n let matches;\n if ((matches = IMF_FIXDATE.exec(value))) {\n [, day, month, year, hour, minute, second, fraction] = matches;\n }\n else if ((matches = RFC_850_DATE.exec(value))) {\n [, day, month, year, hour, minute, second, fraction] = matches;\n year = (Number(year) + 1900).toString();\n }\n else if ((matches = ASC_TIME.exec(value))) {\n [, month, day, hour, minute, second, fraction, year] = matches;\n }\n if (year && second) {\n const timestamp = Date.UTC(Number(year), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1000) : 0);\n range(day, 1, 31);\n range(hour, 0, 23);\n range(minute, 0, 59);\n range(second, 0, 60);\n const date = new Date(timestamp);\n date.setUTCFullYear(Number(year));\n return date;\n }\n throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);\n};\nfunction range(v, min, max) {\n const _v = Number(v);\n if (_v < min || _v > max) {\n throw new Error(`Value ${_v} out of range [${min}, ${max}]`);\n }\n}\n", "export function splitEvery(value, delimiter, numDelimiters) {\n if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {\n throw new Error(\"Invalid number of delimiters (\" + numDelimiters + \") for splitEvery.\");\n }\n const segments = value.split(delimiter);\n if (numDelimiters === 1) {\n return segments;\n }\n const compoundSegments = [];\n let currentSegment = \"\";\n for (let i = 0; i < segments.length; i++) {\n if (currentSegment === \"\") {\n currentSegment = segments[i];\n }\n else {\n currentSegment += delimiter + segments[i];\n }\n if ((i + 1) % numDelimiters === 0) {\n compoundSegments.push(currentSegment);\n currentSegment = \"\";\n }\n }\n if (currentSegment !== \"\") {\n compoundSegments.push(currentSegment);\n }\n return compoundSegments;\n}\n", "export const splitHeader = (value) => {\n const z = value.length;\n const values = [];\n let withinQuotes = false;\n let prevChar = undefined;\n let anchor = 0;\n for (let i = 0; i < z; ++i) {\n const char = value[i];\n switch (char) {\n case `\"`:\n if (prevChar !== \"\\\\\") {\n withinQuotes = !withinQuotes;\n }\n break;\n case \",\":\n if (!withinQuotes) {\n values.push(value.slice(anchor, i));\n anchor = i + 1;\n }\n break;\n default:\n }\n prevChar = char;\n }\n values.push(value.slice(anchor));\n return values.map((v) => {\n v = v.trim();\n const z = v.length;\n if (z < 2) {\n return v;\n }\n if (v[0] === `\"` && v[z - 1] === `\"`) {\n v = v.slice(1, z - 1);\n }\n return v.replace(/\\\\\"/g, '\"');\n });\n};\n", "const format = /^-?\\d*(\\.\\d+)?$/;\nexport class NumericValue {\n string;\n type;\n constructor(string, type) {\n this.string = string;\n this.type = type;\n if (!format.test(string)) {\n throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point \".\", and an optional negation prefix \"-\".`);\n }\n }\n toString() {\n return this.string;\n }\n static [Symbol.hasInstance](object) {\n if (!object || typeof object !== \"object\") {\n return false;\n }\n const _nv = object;\n return NumericValue.prototype.isPrototypeOf(object) || (_nv.type === \"bigDecimal\" && format.test(_nv.string));\n }\n}\nexport function nv(input) {\n return new NumericValue(String(input), \"bigDecimal\");\n}\n", "export * from \"./copyDocumentWithTransform\";\nexport * from \"./date-utils\";\nexport * from \"./generateIdempotencyToken\";\nexport * from \"./lazy-json\";\nexport * from \"./parse-utils\";\nexport * from \"./quote-header\";\nexport * from \"./schema-serde-lib/schema-date-utils\";\nexport * from \"./split-every\";\nexport * from \"./split-header\";\nexport * from \"./value/NumericValue\";\n", "export class SerdeContext {\n serdeContext;\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n }\n}\n", "import { fromUtf8, toUtf8 } from \"@smithy/util-utf8\";\nexport class EventStreamSerde {\n marshaller;\n serializer;\n deserializer;\n serdeContext;\n defaultContentType;\n constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }) {\n this.marshaller = marshaller;\n this.serializer = serializer;\n this.deserializer = deserializer;\n this.serdeContext = serdeContext;\n this.defaultContentType = defaultContentType;\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = requestSchema.getEventStreamMember();\n const unionSchema = requestSchema.getMemberSchema(eventStreamMember);\n const serializer = this.serializer;\n const defaultContentType = this.defaultContentType;\n const initialRequestMarker = Symbol(\"initialRequestMarker\");\n const eventStreamIterable = {\n async *[Symbol.asyncIterator]() {\n if (initialRequest) {\n const headers = {\n \":event-type\": { type: \"string\", value: \"initial-request\" },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: defaultContentType },\n };\n serializer.write(requestSchema, initialRequest);\n const body = serializer.flush();\n yield {\n [initialRequestMarker]: true,\n headers,\n body,\n };\n }\n for await (const page of eventStream) {\n yield page;\n }\n },\n };\n return marshaller.serialize(eventStreamIterable, (event) => {\n if (event[initialRequestMarker]) {\n return {\n headers: event.headers,\n body: event.body,\n };\n }\n const unionMember = Object.keys(event).find((key) => {\n return key !== \"__type\";\n }) ?? \"\";\n const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);\n const headers = {\n \":event-type\": { type: \"string\", value: eventType },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: explicitPayloadContentType ?? defaultContentType },\n ...additionalHeaders,\n };\n return {\n headers,\n body,\n };\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = responseSchema.getEventStreamMember();\n const unionSchema = responseSchema.getMemberSchema(eventStreamMember);\n const memberSchemas = unionSchema.getMemberSchemas();\n const initialResponseMarker = Symbol(\"initialResponseMarker\");\n const asyncIterable = marshaller.deserialize(response.body, async (event) => {\n const unionMember = Object.keys(event).find((key) => {\n return key !== \"__type\";\n }) ?? \"\";\n const body = event[unionMember].body;\n if (unionMember === \"initial-response\") {\n const dataObject = await this.deserializer.read(responseSchema, body);\n delete dataObject[eventStreamMember];\n return {\n [initialResponseMarker]: true,\n ...dataObject,\n };\n }\n else if (unionMember in memberSchemas) {\n const eventStreamSchema = memberSchemas[unionMember];\n if (eventStreamSchema.isStructSchema()) {\n const out = {};\n let hasBindings = false;\n for (const [name, member] of eventStreamSchema.structIterator()) {\n const { eventHeader, eventPayload } = member.getMergedTraits();\n hasBindings = hasBindings || Boolean(eventHeader || eventPayload);\n if (eventPayload) {\n if (member.isBlobSchema()) {\n out[name] = body;\n }\n else if (member.isStringSchema()) {\n out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body);\n }\n else if (member.isStructSchema()) {\n out[name] = await this.deserializer.read(member, body);\n }\n }\n else if (eventHeader) {\n const value = event[unionMember].headers[name]?.value;\n if (value != null) {\n if (member.isNumericSchema()) {\n if (value && typeof value === \"object\" && \"bytes\" in value) {\n out[name] = BigInt(value.toString());\n }\n else {\n out[name] = Number(value);\n }\n }\n else {\n out[name] = value;\n }\n }\n }\n }\n if (hasBindings) {\n return {\n [unionMember]: out,\n };\n }\n if (body.byteLength === 0) {\n return {\n [unionMember]: {},\n };\n }\n }\n return {\n [unionMember]: await this.deserializer.read(eventStreamSchema, body),\n };\n }\n else {\n return {\n $unknown: event,\n };\n }\n });\n const asyncIterator = asyncIterable[Symbol.asyncIterator]();\n const firstEvent = await asyncIterator.next();\n if (firstEvent.done) {\n return asyncIterable;\n }\n if (firstEvent.value?.[initialResponseMarker]) {\n if (!responseSchema) {\n throw new Error(\"@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.\");\n }\n for (const [key, value] of Object.entries(firstEvent.value)) {\n initialResponseContainer[key] = value;\n }\n }\n return {\n async *[Symbol.asyncIterator]() {\n if (!firstEvent?.value?.[initialResponseMarker]) {\n yield firstEvent.value;\n }\n while (true) {\n const { done, value } = await asyncIterator.next();\n if (done) {\n break;\n }\n yield value;\n }\n },\n };\n }\n writeEventBody(unionMember, unionSchema, event) {\n const serializer = this.serializer;\n let eventType = unionMember;\n let explicitPayloadMember = null;\n let explicitPayloadContentType;\n const isKnownSchema = (() => {\n const struct = unionSchema.getSchema();\n return struct[4].includes(unionMember);\n })();\n const additionalHeaders = {};\n if (!isKnownSchema) {\n const [type, value] = event[unionMember];\n eventType = type;\n serializer.write(15, value);\n }\n else {\n const eventSchema = unionSchema.getMemberSchema(unionMember);\n if (eventSchema.isStructSchema()) {\n for (const [memberName, memberSchema] of eventSchema.structIterator()) {\n const { eventHeader, eventPayload } = memberSchema.getMergedTraits();\n if (eventPayload) {\n explicitPayloadMember = memberName;\n }\n else if (eventHeader) {\n const value = event[unionMember][memberName];\n let type = \"binary\";\n if (memberSchema.isNumericSchema()) {\n if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) {\n type = \"integer\";\n }\n else {\n type = \"long\";\n }\n }\n else if (memberSchema.isTimestampSchema()) {\n type = \"timestamp\";\n }\n else if (memberSchema.isStringSchema()) {\n type = \"string\";\n }\n else if (memberSchema.isBooleanSchema()) {\n type = \"boolean\";\n }\n if (value != null) {\n additionalHeaders[memberName] = {\n type,\n value,\n };\n delete event[unionMember][memberName];\n }\n }\n }\n if (explicitPayloadMember !== null) {\n const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember);\n if (payloadSchema.isBlobSchema()) {\n explicitPayloadContentType = \"application/octet-stream\";\n }\n else if (payloadSchema.isStringSchema()) {\n explicitPayloadContentType = \"text/plain\";\n }\n serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]);\n }\n else {\n serializer.write(eventSchema, event[unionMember]);\n }\n }\n else if (eventSchema.isUnitSchema()) {\n serializer.write(eventSchema, {});\n }\n else {\n throw new Error(\"@smithy/core/event-streams - non-struct member not supported in event stream union.\");\n }\n }\n const messageSerialization = serializer.flush() ?? new Uint8Array();\n const body = typeof messageSerialization === \"string\"\n ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization)\n : messageSerialization;\n return {\n body,\n eventType,\n explicitPayloadContentType,\n additionalHeaders,\n };\n }\n}\n", "export * from \"./EventStreamSerde\";\n", "import { NormalizedSchema, translateTraits, TypeRegistry } from \"@smithy/core/schema\";\nimport { HttpRequest, HttpResponse } from \"@smithy/protocol-http\";\nimport { SerdeContext } from \"./SerdeContext\";\nexport class HttpProtocol extends SerdeContext {\n options;\n compositeErrorRegistry;\n constructor(options) {\n super();\n this.options = options;\n this.compositeErrorRegistry = TypeRegistry.for(options.defaultNamespace);\n for (const etr of options.errorTypeRegistries ?? []) {\n this.compositeErrorRegistry.copyFrom(etr);\n }\n }\n getRequestType() {\n return HttpRequest;\n }\n getResponseType() {\n return HttpResponse;\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n this.serializer.setSerdeContext(serdeContext);\n this.deserializer.setSerdeContext(serdeContext);\n if (this.getPayloadCodec()) {\n this.getPayloadCodec().setSerdeContext(serdeContext);\n }\n }\n updateServiceEndpoint(request, endpoint) {\n if (\"url\" in endpoint) {\n request.protocol = endpoint.url.protocol;\n request.hostname = endpoint.url.hostname;\n request.port = endpoint.url.port ? Number(endpoint.url.port) : undefined;\n request.path = endpoint.url.pathname;\n request.fragment = endpoint.url.hash || void 0;\n request.username = endpoint.url.username || void 0;\n request.password = endpoint.url.password || void 0;\n if (!request.query) {\n request.query = {};\n }\n for (const [k, v] of endpoint.url.searchParams.entries()) {\n request.query[k] = v;\n }\n if (endpoint.headers) {\n for (const [name, values] of Object.entries(endpoint.headers)) {\n request.headers[name] = values.join(\", \");\n }\n }\n return request;\n }\n else {\n request.protocol = endpoint.protocol;\n request.hostname = endpoint.hostname;\n request.port = endpoint.port ? Number(endpoint.port) : undefined;\n request.path = endpoint.path;\n request.query = {\n ...endpoint.query,\n };\n if (endpoint.headers) {\n for (const [name, value] of Object.entries(endpoint.headers)) {\n request.headers[name] = value;\n }\n }\n return request;\n }\n }\n setHostPrefix(request, operationSchema, input) {\n if (this.serdeContext?.disableHostPrefix) {\n return;\n }\n const inputNs = NormalizedSchema.of(operationSchema.input);\n const opTraits = translateTraits(operationSchema.traits ?? {});\n if (opTraits.endpoint) {\n let hostPrefix = opTraits.endpoint?.[0];\n if (typeof hostPrefix === \"string\") {\n const hostLabelInputs = [...inputNs.structIterator()].filter(([, member]) => member.getMergedTraits().hostLabel);\n for (const [name] of hostLabelInputs) {\n const replacement = input[name];\n if (typeof replacement !== \"string\") {\n throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);\n }\n hostPrefix = hostPrefix.replace(`{${name}}`, replacement);\n }\n request.hostname = hostPrefix + request.hostname;\n }\n }\n }\n deserializeMetadata(output) {\n return {\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n };\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const eventStreamSerde = await this.loadEventStreamCapability();\n return eventStreamSerde.serializeEventStream({\n eventStream,\n requestSchema,\n initialRequest,\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const eventStreamSerde = await this.loadEventStreamCapability();\n return eventStreamSerde.deserializeEventStream({\n response,\n responseSchema,\n initialResponseContainer,\n });\n }\n async loadEventStreamCapability() {\n const { EventStreamSerde } = await import(\"@smithy/core/event-streams\");\n return new EventStreamSerde({\n marshaller: this.getEventStreamMarshaller(),\n serializer: this.serializer,\n deserializer: this.deserializer,\n serdeContext: this.serdeContext,\n defaultContentType: this.getDefaultContentType(),\n });\n }\n getDefaultContentType() {\n throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);\n }\n async deserializeHttpMessage(schema, context, response, arg4, arg5) {\n void schema;\n void context;\n void response;\n void arg4;\n void arg5;\n return [];\n }\n getEventStreamMarshaller() {\n const context = this.serdeContext;\n if (!context.eventStreamMarshaller) {\n throw new Error(\"@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.\");\n }\n return context.eventStreamMarshaller;\n }\n}\n", "import { NormalizedSchema, translateTraits } from \"@smithy/core/schema\";\nimport { splitEvery, splitHeader } from \"@smithy/core/serde\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { sdkStreamMixin } from \"@smithy/util-stream\";\nimport { collectBody } from \"./collect-stream-body\";\nimport { extendedEncodeURIComponent } from \"./extended-encode-uri-component\";\nimport { HttpProtocol } from \"./HttpProtocol\";\nexport class HttpBindingProtocol extends HttpProtocol {\n async serializeRequest(operationSchema, _input, context) {\n const input = {\n ...(_input ?? {}),\n };\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = NormalizedSchema.of(operationSchema?.input);\n const payloadMemberNames = [];\n const payloadMemberSchemas = [];\n let hasNonHttpBindingMember = false;\n let payload;\n const request = new HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: undefined,\n path: \"\",\n fragment: undefined,\n query: query,\n headers: headers,\n body: undefined,\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n const opTraits = translateTraits(operationSchema.traits);\n if (opTraits.http) {\n request.method = opTraits.http[0];\n const [path, search] = opTraits.http[1].split(\"?\");\n if (request.path == \"/\") {\n request.path = path;\n }\n else {\n request.path += path;\n }\n const traitSearchParams = new URLSearchParams(search ?? \"\");\n Object.assign(query, Object.fromEntries(traitSearchParams));\n }\n }\n for (const [memberName, memberNs] of ns.structIterator()) {\n const memberTraits = memberNs.getMergedTraits() ?? {};\n const inputMemberValue = input[memberName];\n if (inputMemberValue == null && !memberNs.isIdempotencyToken()) {\n if (memberTraits.httpLabel) {\n if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) {\n throw new Error(`No value provided for input HTTP label: ${memberName}.`);\n }\n }\n continue;\n }\n if (memberTraits.httpPayload) {\n const isStreaming = memberNs.isStreaming();\n if (isStreaming) {\n const isEventStream = memberNs.isStructSchema();\n if (isEventStream) {\n if (input[memberName]) {\n payload = await this.serializeEventStream({\n eventStream: input[memberName],\n requestSchema: ns,\n });\n }\n }\n else {\n payload = inputMemberValue;\n }\n }\n else {\n serializer.write(memberNs, inputMemberValue);\n payload = serializer.flush();\n }\n delete input[memberName];\n }\n else if (memberTraits.httpLabel) {\n serializer.write(memberNs, inputMemberValue);\n const replacement = serializer.flush();\n if (request.path.includes(`{${memberName}+}`)) {\n request.path = request.path.replace(`{${memberName}+}`, replacement.split(\"/\").map(extendedEncodeURIComponent).join(\"/\"));\n }\n else if (request.path.includes(`{${memberName}}`)) {\n request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));\n }\n delete input[memberName];\n }\n else if (memberTraits.httpHeader) {\n serializer.write(memberNs, inputMemberValue);\n headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());\n delete input[memberName];\n }\n else if (typeof memberTraits.httpPrefixHeaders === \"string\") {\n for (const [key, val] of Object.entries(inputMemberValue)) {\n const amalgam = memberTraits.httpPrefixHeaders + key;\n serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);\n headers[amalgam.toLowerCase()] = serializer.flush();\n }\n delete input[memberName];\n }\n else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {\n this.serializeQuery(memberNs, inputMemberValue, query);\n delete input[memberName];\n }\n else {\n hasNonHttpBindingMember = true;\n payloadMemberNames.push(memberName);\n payloadMemberSchemas.push(memberNs);\n }\n }\n if (hasNonHttpBindingMember && input) {\n const [namespace, name] = (ns.getName(true) ?? \"#Unknown\").split(\"#\");\n const requiredMembers = ns.getSchema()[6];\n const payloadSchema = [\n 3,\n namespace,\n name,\n ns.getMergedTraits(),\n payloadMemberNames,\n payloadMemberSchemas,\n undefined,\n ];\n if (requiredMembers) {\n payloadSchema[6] = requiredMembers;\n }\n else {\n payloadSchema.pop();\n }\n serializer.write(payloadSchema, input);\n payload = serializer.flush();\n }\n request.headers = headers;\n request.query = query;\n request.body = payload;\n return request;\n }\n serializeQuery(ns, data, query) {\n const serializer = this.serializer;\n const traits = ns.getMergedTraits();\n if (traits.httpQueryParams) {\n for (const [key, val] of Object.entries(data)) {\n if (!(key in query)) {\n const valueSchema = ns.getValueSchema();\n Object.assign(valueSchema.getMergedTraits(), {\n ...traits,\n httpQuery: key,\n httpQueryParams: undefined,\n });\n this.serializeQuery(valueSchema, val, query);\n }\n }\n return;\n }\n if (ns.isListSchema()) {\n const sparse = !!ns.getMergedTraits().sparse;\n const buffer = [];\n for (const item of data) {\n serializer.write([ns.getValueSchema(), traits], item);\n const serializable = serializer.flush();\n if (sparse || serializable !== undefined) {\n buffer.push(serializable);\n }\n }\n query[traits.httpQuery] = buffer;\n }\n else {\n serializer.write([ns, traits], data);\n query[traits.httpQuery] = serializer.flush();\n }\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - HTTP Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);\n if (nonHttpBindingMembers.length) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n const dataFromBody = await deserializer.read(ns, bytes);\n for (const member of nonHttpBindingMembers) {\n if (dataFromBody[member] != null) {\n dataObject[member] = dataFromBody[member];\n }\n }\n }\n }\n else if (nonHttpBindingMembers.discardResponseBody) {\n await collectBody(response.body, context);\n }\n dataObject.$metadata = this.deserializeMetadata(response);\n return dataObject;\n }\n async deserializeHttpMessage(schema, context, response, arg4, arg5) {\n let dataObject;\n if (arg4 instanceof Set) {\n dataObject = arg5;\n }\n else {\n dataObject = arg4;\n }\n let discardResponseBody = true;\n const deserializer = this.deserializer;\n const ns = NormalizedSchema.of(schema);\n const nonHttpBindingMembers = [];\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const memberTraits = memberSchema.getMemberTraits();\n if (memberTraits.httpPayload) {\n discardResponseBody = false;\n const isStreaming = memberSchema.isStreaming();\n if (isStreaming) {\n const isEventStream = memberSchema.isStructSchema();\n if (isEventStream) {\n dataObject[memberName] = await this.deserializeEventStream({\n response,\n responseSchema: ns,\n });\n }\n else {\n dataObject[memberName] = sdkStreamMixin(response.body);\n }\n }\n else if (response.body) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n dataObject[memberName] = await deserializer.read(memberSchema, bytes);\n }\n }\n }\n else if (memberTraits.httpHeader) {\n const key = String(memberTraits.httpHeader).toLowerCase();\n const value = response.headers[key];\n if (null != value) {\n if (memberSchema.isListSchema()) {\n const headerListValueSchema = memberSchema.getValueSchema();\n headerListValueSchema.getMergedTraits().httpHeader = key;\n let sections;\n if (headerListValueSchema.isTimestampSchema() &&\n headerListValueSchema.getSchema() === 4) {\n sections = splitEvery(value, \",\", 2);\n }\n else {\n sections = splitHeader(value);\n }\n const list = [];\n for (const section of sections) {\n list.push(await deserializer.read(headerListValueSchema, section.trim()));\n }\n dataObject[memberName] = list;\n }\n else {\n dataObject[memberName] = await deserializer.read(memberSchema, value);\n }\n }\n }\n else if (memberTraits.httpPrefixHeaders !== undefined) {\n dataObject[memberName] = {};\n for (const [header, value] of Object.entries(response.headers)) {\n if (header.startsWith(memberTraits.httpPrefixHeaders)) {\n const valueSchema = memberSchema.getValueSchema();\n valueSchema.getMergedTraits().httpHeader = header;\n dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);\n }\n }\n }\n else if (memberTraits.httpResponseCode) {\n dataObject[memberName] = response.statusCode;\n }\n else {\n nonHttpBindingMembers.push(memberName);\n }\n }\n nonHttpBindingMembers.discardResponseBody = discardResponseBody;\n return nonHttpBindingMembers;\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { collectBody } from \"./collect-stream-body\";\nimport { HttpProtocol } from \"./HttpProtocol\";\nexport class RpcProtocol extends HttpProtocol {\n async serializeRequest(operationSchema, input, context) {\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = NormalizedSchema.of(operationSchema?.input);\n const schema = ns.getSchema();\n let payload;\n const request = new HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: undefined,\n path: \"/\",\n fragment: undefined,\n query: query,\n headers: headers,\n body: undefined,\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n }\n const _input = {\n ...input,\n };\n if (input) {\n const eventStreamMember = ns.getEventStreamMember();\n if (eventStreamMember) {\n if (_input[eventStreamMember]) {\n const initialRequest = {};\n for (const [memberName, memberSchema] of ns.structIterator()) {\n if (memberName !== eventStreamMember && _input[memberName]) {\n serializer.write(memberSchema, _input[memberName]);\n initialRequest[memberName] = serializer.flush();\n }\n }\n payload = await this.serializeEventStream({\n eventStream: _input[eventStreamMember],\n requestSchema: ns,\n initialRequest,\n });\n }\n }\n else {\n serializer.write(schema, _input);\n payload = serializer.flush();\n }\n }\n request.headers = Object.assign(request.headers, headers);\n request.query = query;\n request.body = payload;\n request.method = \"POST\";\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - RPC Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const eventStreamMember = ns.getEventStreamMember();\n if (eventStreamMember) {\n dataObject[eventStreamMember] = await this.deserializeEventStream({\n response,\n responseSchema: ns,\n initialResponseContainer: dataObject,\n });\n }\n else {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(ns, bytes));\n }\n }\n dataObject.$metadata = this.deserializeMetadata(response);\n return dataObject;\n }\n}\n", "import { extendedEncodeURIComponent } from \"./extended-encode-uri-component\";\nexport const resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {\n if (input != null && input[memberName] !== undefined) {\n const labelValue = labelValueProvider();\n if (labelValue == null || labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: \" + memberName + \".\");\n }\n resolvedPath = resolvedPath.replace(uriLabel, isGreedyLabel\n ? labelValue\n .split(\"/\")\n .map((segment) => extendedEncodeURIComponent(segment))\n .join(\"/\")\n : extendedEncodeURIComponent(labelValue));\n }\n else {\n throw new Error(\"No value provided for input HTTP label: \" + memberName + \".\");\n }\n return resolvedPath;\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { resolvedPath } from \"./resolve-path\";\nexport function requestBuilder(input, context) {\n return new RequestBuilder(input, context);\n}\nexport class RequestBuilder {\n input;\n context;\n query = {};\n method = \"\";\n headers = {};\n path = \"\";\n body = null;\n hostname = \"\";\n resolvePathStack = [];\n constructor(input, context) {\n this.input = input;\n this.context = context;\n }\n async build() {\n const { hostname, protocol = \"https\", port, path: basePath } = await this.context.endpoint();\n this.path = basePath;\n for (const resolvePath of this.resolvePathStack) {\n resolvePath(this.path);\n }\n return new HttpRequest({\n protocol,\n hostname: this.hostname || hostname,\n port,\n method: this.method,\n path: this.path,\n query: this.query,\n body: this.body,\n headers: this.headers,\n });\n }\n hn(hostname) {\n this.hostname = hostname;\n return this;\n }\n bp(uriLabel) {\n this.resolvePathStack.push((basePath) => {\n this.path = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + uriLabel;\n });\n return this;\n }\n p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {\n this.resolvePathStack.push((path) => {\n this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);\n });\n return this;\n }\n h(headers) {\n this.headers = headers;\n return this;\n }\n q(query) {\n this.query = query;\n return this;\n }\n b(body) {\n this.body = body;\n return this;\n }\n m(method) {\n this.method = method;\n return this;\n }\n}\n", "export function determineTimestampFormat(ns, settings) {\n if (settings.timestampFormat.useTrait) {\n if (ns.isTimestampSchema() &&\n (ns.getSchema() === 5 ||\n ns.getSchema() === 6 ||\n ns.getSchema() === 7)) {\n return ns.getSchema();\n }\n }\n const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits();\n const bindingFormat = settings.httpBindings\n ? typeof httpPrefixHeaders === \"string\" || Boolean(httpHeader)\n ? 6\n : Boolean(httpQuery) || Boolean(httpLabel)\n ? 5\n : undefined\n : undefined;\n return bindingFormat ?? settings.timestampFormat.default;\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime, LazyJsonString, NumericValue, splitHeader, } from \"@smithy/core/serde\";\nimport { fromBase64 } from \"@smithy/util-base64\";\nimport { toUtf8 } from \"@smithy/util-utf8\";\nimport { SerdeContext } from \"../SerdeContext\";\nimport { determineTimestampFormat } from \"./determineTimestampFormat\";\nexport class FromStringShapeDeserializer extends SerdeContext {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n read(_schema, data) {\n const ns = NormalizedSchema.of(_schema);\n if (ns.isListSchema()) {\n return splitHeader(data).map((item) => this.read(ns.getValueSchema(), item));\n }\n if (ns.isBlobSchema()) {\n return (this.serdeContext?.base64Decoder ?? fromBase64)(data);\n }\n if (ns.isTimestampSchema()) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return _parseRfc3339DateTimeWithOffset(data);\n case 6:\n return _parseRfc7231DateTime(data);\n case 7:\n return _parseEpochTimestamp(data);\n default:\n console.warn(\"Missing timestamp format, parsing value with Date constructor:\", data);\n return new Date(data);\n }\n }\n if (ns.isStringSchema()) {\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = data;\n if (mediaType) {\n if (ns.getMergedTraits().httpHeader) {\n intermediateValue = this.base64ToUtf8(intermediateValue);\n }\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = LazyJsonString.from(intermediateValue);\n }\n return intermediateValue;\n }\n }\n if (ns.isNumericSchema()) {\n return Number(data);\n }\n if (ns.isBigIntegerSchema()) {\n return BigInt(data);\n }\n if (ns.isBigDecimalSchema()) {\n return new NumericValue(data, \"bigDecimal\");\n }\n if (ns.isBooleanSchema()) {\n return String(data).toLowerCase() === \"true\";\n }\n return data;\n }\n base64ToUtf8(base64String) {\n return (this.serdeContext?.utf8Encoder ?? toUtf8)((this.serdeContext?.base64Decoder ?? fromBase64)(base64String));\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { fromUtf8, toUtf8 } from \"@smithy/util-utf8\";\nimport { SerdeContext } from \"../SerdeContext\";\nimport { FromStringShapeDeserializer } from \"./FromStringShapeDeserializer\";\nexport class HttpInterceptingShapeDeserializer extends SerdeContext {\n codecDeserializer;\n stringDeserializer;\n constructor(codecDeserializer, codecSettings) {\n super();\n this.codecDeserializer = codecDeserializer;\n this.stringDeserializer = new FromStringShapeDeserializer(codecSettings);\n }\n setSerdeContext(serdeContext) {\n this.stringDeserializer.setSerdeContext(serdeContext);\n this.codecDeserializer.setSerdeContext(serdeContext);\n this.serdeContext = serdeContext;\n }\n read(schema, data) {\n const ns = NormalizedSchema.of(schema);\n const traits = ns.getMergedTraits();\n const toString = this.serdeContext?.utf8Encoder ?? toUtf8;\n if (traits.httpHeader || traits.httpResponseCode) {\n return this.stringDeserializer.read(ns, toString(data));\n }\n if (traits.httpPayload) {\n if (ns.isBlobSchema()) {\n const toBytes = this.serdeContext?.utf8Decoder ?? fromUtf8;\n if (typeof data === \"string\") {\n return toBytes(data);\n }\n return data;\n }\n else if (ns.isStringSchema()) {\n if (\"byteLength\" in data) {\n return toString(data);\n }\n return data;\n }\n }\n return this.codecDeserializer.read(ns, data);\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { dateToUtcString, generateIdempotencyToken, LazyJsonString, quoteHeader } from \"@smithy/core/serde\";\nimport { toBase64 } from \"@smithy/util-base64\";\nimport { SerdeContext } from \"../SerdeContext\";\nimport { determineTimestampFormat } from \"./determineTimestampFormat\";\nexport class ToStringShapeSerializer extends SerdeContext {\n settings;\n stringBuffer = \"\";\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value) {\n const ns = NormalizedSchema.of(schema);\n switch (typeof value) {\n case \"object\":\n if (value === null) {\n this.stringBuffer = \"null\";\n return;\n }\n if (ns.isTimestampSchema()) {\n if (!(value instanceof Date)) {\n throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`);\n }\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n this.stringBuffer = value.toISOString().replace(\".000Z\", \"Z\");\n break;\n case 6:\n this.stringBuffer = dateToUtcString(value);\n break;\n case 7:\n this.stringBuffer = String(value.getTime() / 1000);\n break;\n default:\n console.warn(\"Missing timestamp format, using epoch seconds\", value);\n this.stringBuffer = String(value.getTime() / 1000);\n }\n return;\n }\n if (ns.isBlobSchema() && \"byteLength\" in value) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(value);\n return;\n }\n if (ns.isListSchema() && Array.isArray(value)) {\n let buffer = \"\";\n for (const item of value) {\n this.write([ns.getValueSchema(), ns.getMergedTraits()], item);\n const headerItem = this.flush();\n const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : quoteHeader(headerItem);\n if (buffer !== \"\") {\n buffer += \", \";\n }\n buffer += serialized;\n }\n this.stringBuffer = buffer;\n return;\n }\n this.stringBuffer = JSON.stringify(value, null, 2);\n break;\n case \"string\":\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = value;\n if (mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = LazyJsonString.from(intermediateValue);\n }\n if (ns.getMergedTraits().httpHeader) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(intermediateValue.toString());\n return;\n }\n }\n this.stringBuffer = value;\n break;\n default:\n if (ns.isIdempotencyToken()) {\n this.stringBuffer = generateIdempotencyToken();\n }\n else {\n this.stringBuffer = String(value);\n }\n }\n }\n flush() {\n const buffer = this.stringBuffer;\n this.stringBuffer = \"\";\n return buffer;\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { ToStringShapeSerializer } from \"./ToStringShapeSerializer\";\nexport class HttpInterceptingShapeSerializer {\n codecSerializer;\n stringSerializer;\n buffer;\n constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) {\n this.codecSerializer = codecSerializer;\n this.stringSerializer = stringSerializer;\n }\n setSerdeContext(serdeContext) {\n this.codecSerializer.setSerdeContext(serdeContext);\n this.stringSerializer.setSerdeContext(serdeContext);\n }\n write(schema, value) {\n const ns = NormalizedSchema.of(schema);\n const traits = ns.getMergedTraits();\n if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {\n this.stringSerializer.write(ns, value);\n this.buffer = this.stringSerializer.flush();\n return;\n }\n return this.codecSerializer.write(ns, value);\n }\n flush() {\n if (this.buffer !== undefined) {\n const buffer = this.buffer;\n this.buffer = undefined;\n return buffer;\n }\n return this.codecSerializer.flush();\n }\n}\n", "export * from \"./collect-stream-body\";\nexport * from \"./extended-encode-uri-component\";\nexport * from \"./HttpBindingProtocol\";\nexport * from \"./HttpProtocol\";\nexport * from \"./RpcProtocol\";\nexport * from \"./requestBuilder\";\nexport * from \"./resolve-path\";\nexport * from \"./serde/FromStringShapeDeserializer\";\nexport * from \"./serde/HttpInterceptingShapeDeserializer\";\nexport * from \"./serde/HttpInterceptingShapeSerializer\";\nexport * from \"./serde/ToStringShapeSerializer\";\nexport * from \"./serde/determineTimestampFormat\";\nexport * from \"./SerdeContext\";\n", "export { requestBuilder } from \"@smithy/core/protocols\";\n", "export function setFeature(context, feature, value) {\n if (!context.__smithy_context) {\n context.__smithy_context = {\n features: {},\n };\n }\n else if (!context.__smithy_context.features) {\n context.__smithy_context.features = {};\n }\n context.__smithy_context.features[feature] = value;\n}\n", "export class DefaultIdentityProviderConfig {\n authSchemes = new Map();\n constructor(config) {\n for (const [key, value] of Object.entries(config)) {\n if (value !== undefined) {\n this.authSchemes.set(key, value);\n }\n }\n }\n getIdentityProvider(schemeId) {\n return this.authSchemes.get(schemeId);\n }\n}\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { HttpApiKeyAuthLocation } from \"@smithy/types\";\nexport class HttpApiKeyAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n if (!signingProperties) {\n throw new Error(\"request could not be signed with `apiKey` since the `name` and `in` signer properties are missing\");\n }\n if (!signingProperties.name) {\n throw new Error(\"request could not be signed with `apiKey` since the `name` signer property is missing\");\n }\n if (!signingProperties.in) {\n throw new Error(\"request could not be signed with `apiKey` since the `in` signer property is missing\");\n }\n if (!identity.apiKey) {\n throw new Error(\"request could not be signed with `apiKey` since the `apiKey` is not defined\");\n }\n const clonedRequest = HttpRequest.clone(httpRequest);\n if (signingProperties.in === HttpApiKeyAuthLocation.QUERY) {\n clonedRequest.query[signingProperties.name] = identity.apiKey;\n }\n else if (signingProperties.in === HttpApiKeyAuthLocation.HEADER) {\n clonedRequest.headers[signingProperties.name] = signingProperties.scheme\n ? `${signingProperties.scheme} ${identity.apiKey}`\n : identity.apiKey;\n }\n else {\n throw new Error(\"request can only be signed with `apiKey` locations `query` or `header`, \" +\n \"but found: `\" +\n signingProperties.in +\n \"`\");\n }\n return clonedRequest;\n }\n}\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nexport class HttpBearerAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n const clonedRequest = HttpRequest.clone(httpRequest);\n if (!identity.token) {\n throw new Error(\"request could not be signed with `token` since the `token` is not defined\");\n }\n clonedRequest.headers[\"Authorization\"] = `Bearer ${identity.token}`;\n return clonedRequest;\n }\n}\n", "export class NoAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n return httpRequest;\n }\n}\n", "export * from \"./httpApiKeyAuth\";\nexport * from \"./httpBearerAuth\";\nexport * from \"./noAuth\";\n", "export const createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired(identity) {\n return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs;\n};\nexport const EXPIRATION_MS = 300_000;\nexport const isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);\nexport const doesIdentityRequireRefresh = (identity) => identity.expiration !== undefined;\nexport const memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => {\n if (provider === undefined) {\n return undefined;\n }\n const normalizedProvider = typeof provider !== \"function\" ? async () => Promise.resolve(provider) : provider;\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = async (options) => {\n if (!pending) {\n pending = normalizedProvider(options);\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n }\n finally {\n pending = undefined;\n }\n return resolved;\n };\n if (isExpired === undefined) {\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider(options);\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider(options);\n }\n if (isConstant) {\n return resolved;\n }\n if (!requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider(options);\n return resolved;\n }\n return resolved;\n };\n};\n", "export * from \"./DefaultIdentityProviderConfig\";\nexport * from \"./httpAuthSchemes\";\nexport * from \"./memoizeIdentityProvider\";\n", "export * from \"./getSmithyContext\";\nexport * from \"./middleware-http-auth-scheme\";\nexport * from \"./middleware-http-signing\";\nexport * from \"./normalizeProvider\";\nexport { createPaginator } from \"./pagination/createPaginator\";\nexport * from \"./request-builder/requestBuilder\";\nexport * from \"./setFeature\";\nexport * from \"./util-identity-and-auth\";\n", "export class ProviderError extends Error {\n name = \"ProviderError\";\n tryNextLink;\n constructor(message, options = true) {\n let logger;\n let tryNextLink = true;\n if (typeof options === \"boolean\") {\n logger = undefined;\n tryNextLink = options;\n }\n else if (options != null && typeof options === \"object\") {\n logger = options.logger;\n tryNextLink = options.tryNextLink ?? true;\n }\n super(message);\n this.tryNextLink = tryNextLink;\n Object.setPrototypeOf(this, ProviderError.prototype);\n logger?.debug?.(`@smithy/property-provider ${tryNextLink ? \"->\" : \"(!)\"} ${message}`);\n }\n static from(error, options = true) {\n return Object.assign(new this(error.message, options), error);\n }\n}\n", "import { ProviderError } from \"./ProviderError\";\nexport class CredentialsProviderError extends ProviderError {\n name = \"CredentialsProviderError\";\n constructor(message, options = true) {\n super(message, options);\n Object.setPrototypeOf(this, CredentialsProviderError.prototype);\n }\n}\n", "import { ProviderError } from \"./ProviderError\";\nexport class TokenProviderError extends ProviderError {\n name = \"TokenProviderError\";\n constructor(message, options = true) {\n super(message, options);\n Object.setPrototypeOf(this, TokenProviderError.prototype);\n }\n}\n", "import { ProviderError } from \"./ProviderError\";\nexport const chain = (...providers) => async () => {\n if (providers.length === 0) {\n throw new ProviderError(\"No providers in chain\");\n }\n let lastProviderError;\n for (const provider of providers) {\n try {\n const credentials = await provider();\n return credentials;\n }\n catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n};\n", "export const fromStatic = (staticValue) => () => Promise.resolve(staticValue);\n", "export const memoize = (provider, isExpired, requiresRefresh) => {\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = async () => {\n if (!pending) {\n pending = provider();\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n }\n finally {\n pending = undefined;\n }\n return resolved;\n };\n if (isExpired === undefined) {\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider();\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider();\n }\n if (isConstant) {\n return resolved;\n }\n if (requiresRefresh && !requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider();\n return resolved;\n }\n return resolved;\n };\n};\n", "export * from \"./CredentialsProviderError\";\nexport * from \"./ProviderError\";\nexport * from \"./TokenProviderError\";\nexport * from \"./chain\";\nexport * from \"./fromStatic\";\nexport * from \"./memoize\";\n", "import { normalizeProvider } from \"@smithy/core\";\nimport { ProviderError } from \"@smithy/property-provider\";\nexport const resolveAwsSdkSigV4AConfig = (config) => {\n config.sigv4aSigningRegionSet = normalizeProvider(config.sigv4aSigningRegionSet);\n return config;\n};\nexport const NODE_SIGV4A_CONFIG_OPTIONS = {\n environmentVariableSelector(env) {\n if (env.AWS_SIGV4A_SIGNING_REGION_SET) {\n return env.AWS_SIGV4A_SIGNING_REGION_SET.split(\",\").map((_) => _.trim());\n }\n throw new ProviderError(\"AWS_SIGV4A_SIGNING_REGION_SET not set in env.\", {\n tryNextLink: true,\n });\n },\n configFileSelector(profile) {\n if (profile.sigv4a_signing_region_set) {\n return (profile.sigv4a_signing_region_set ?? \"\").split(\",\").map((_) => _.trim());\n }\n throw new ProviderError(\"sigv4a_signing_region_set not set in profile.\", {\n tryNextLink: true,\n });\n },\n default: undefined,\n};\n", "export const ALGORITHM_QUERY_PARAM = \"X-Amz-Algorithm\";\nexport const CREDENTIAL_QUERY_PARAM = \"X-Amz-Credential\";\nexport const AMZ_DATE_QUERY_PARAM = \"X-Amz-Date\";\nexport const SIGNED_HEADERS_QUERY_PARAM = \"X-Amz-SignedHeaders\";\nexport const EXPIRES_QUERY_PARAM = \"X-Amz-Expires\";\nexport const SIGNATURE_QUERY_PARAM = \"X-Amz-Signature\";\nexport const TOKEN_QUERY_PARAM = \"X-Amz-Security-Token\";\nexport const REGION_SET_PARAM = \"X-Amz-Region-Set\";\nexport const AUTH_HEADER = \"authorization\";\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();\nexport const DATE_HEADER = \"date\";\nexport const GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];\nexport const SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();\nexport const SHA256_HEADER = \"x-amz-content-sha256\";\nexport const TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();\nexport const HOST_HEADER = \"host\";\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n \"cache-control\": true,\n connection: true,\n expect: true,\n from: true,\n \"keep-alive\": true,\n \"max-forwards\": true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n \"transfer-encoding\": true,\n upgrade: true,\n \"user-agent\": true,\n \"x-amzn-trace-id\": true,\n};\nexport const PROXY_HEADER_PATTERN = /^proxy-/;\nexport const SEC_HEADER_PATTERN = /^sec-/;\nexport const UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i];\nexport const ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256\";\nexport const ALGORITHM_IDENTIFIER_V4A = \"AWS4-ECDSA-P256-SHA256\";\nexport const EVENT_ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256-PAYLOAD\";\nexport const UNSIGNED_PAYLOAD = \"UNSIGNED-PAYLOAD\";\nexport const MAX_CACHE_SIZE = 50;\nexport const KEY_TYPE_IDENTIFIER = \"aws4_request\";\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;\n", "import { toHex } from \"@smithy/util-hex-encoding\";\nimport { toUint8Array } from \"@smithy/util-utf8\";\nimport { KEY_TYPE_IDENTIFIER, MAX_CACHE_SIZE } from \"./constants\";\nconst signingKeyCache = {};\nconst cacheQueue = [];\nexport const createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`;\nexport const getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => {\n const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);\n const cacheKey = `${shortDate}:${region}:${service}:${toHex(credsHash)}:${credentials.sessionToken}`;\n if (cacheKey in signingKeyCache) {\n return signingKeyCache[cacheKey];\n }\n cacheQueue.push(cacheKey);\n while (cacheQueue.length > MAX_CACHE_SIZE) {\n delete signingKeyCache[cacheQueue.shift()];\n }\n let key = `AWS4${credentials.secretAccessKey}`;\n for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) {\n key = await hmac(sha256Constructor, key, signable);\n }\n return (signingKeyCache[cacheKey] = key);\n};\nexport const clearCredentialCache = () => {\n cacheQueue.length = 0;\n Object.keys(signingKeyCache).forEach((cacheKey) => {\n delete signingKeyCache[cacheKey];\n });\n};\nconst hmac = (ctor, secret, data) => {\n const hash = new ctor(secret);\n hash.update(toUint8Array(data));\n return hash.digest();\n};\n", "import { ALWAYS_UNSIGNABLE_HEADERS, PROXY_HEADER_PATTERN, SEC_HEADER_PATTERN } from \"./constants\";\nexport const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => {\n const canonical = {};\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue;\n }\n const canonicalHeaderName = headerName.toLowerCase();\n if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName) ||\n PROXY_HEADER_PATTERN.test(canonicalHeaderName) ||\n SEC_HEADER_PATTERN.test(canonicalHeaderName)) {\n if (!signableHeaders || (signableHeaders && !signableHeaders.has(canonicalHeaderName))) {\n continue;\n }\n }\n canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\\s+/g, \" \");\n }\n return canonical;\n};\n", "export const isArrayBuffer = (arg) => (typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer) ||\n Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\";\n", "import { isArrayBuffer } from \"@smithy/is-array-buffer\";\nimport { toHex } from \"@smithy/util-hex-encoding\";\nimport { toUint8Array } from \"@smithy/util-utf8\";\nimport { SHA256_HEADER, UNSIGNED_PAYLOAD } from \"./constants\";\nexport const getPayloadHash = async ({ headers, body }, hashConstructor) => {\n for (const headerName of Object.keys(headers)) {\n if (headerName.toLowerCase() === SHA256_HEADER) {\n return headers[headerName];\n }\n }\n if (body == undefined) {\n return \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\";\n }\n else if (typeof body === \"string\" || ArrayBuffer.isView(body) || isArrayBuffer(body)) {\n const hashCtor = new hashConstructor();\n hashCtor.update(toUint8Array(body));\n return toHex(await hashCtor.digest());\n }\n return UNSIGNED_PAYLOAD;\n};\n", "import { fromHex, toHex } from \"@smithy/util-hex-encoding\";\nimport { fromUtf8 } from \"@smithy/util-utf8\";\nexport class HeaderFormatter {\n format(headers) {\n const chunks = [];\n for (const headerName of Object.keys(headers)) {\n const bytes = fromUtf8(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? 0 : 1]);\n case \"byte\":\n return Uint8Array.from([2, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, 3);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, 4);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = 5;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, 6);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = fromUtf8(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, 7);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = 8;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = 9;\n uuidBytes.set(fromHex(header.value.replace(/\\-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n}\nvar HEADER_VALUE_TYPE;\n(function (HEADER_VALUE_TYPE) {\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolTrue\"] = 0] = \"boolTrue\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolFalse\"] = 1] = \"boolFalse\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byte\"] = 2] = \"byte\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"short\"] = 3] = \"short\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"integer\"] = 4] = \"integer\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"long\"] = 5] = \"long\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byteArray\"] = 6] = \"byteArray\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"string\"] = 7] = \"string\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"timestamp\"] = 8] = \"timestamp\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"uuid\"] = 9] = \"uuid\";\n})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));\nconst UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\nexport class Int64 {\n bytes;\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static fromNumber(number) {\n if (number > 9_223_372_036_854_775_807 || number < -9_223_372_036_854_775_808) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new Int64(bytes);\n }\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 0b10000000;\n if (negative) {\n negate(bytes);\n }\n return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n}\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 0xff;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n", "export const hasHeader = (soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true;\n }\n }\n return false;\n};\nexport const getHeaderValue = (soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return headers[headerName];\n }\n }\n return undefined;\n};\nexport const deleteHeader = (soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n delete headers[headerName];\n }\n }\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nexport const moveHeadersToQuery = (request, options = {}) => {\n const { headers, query = {} } = HttpRequest.clone(request);\n for (const name of Object.keys(headers)) {\n const lname = name.toLowerCase();\n if ((lname.slice(0, 6) === \"x-amz-\" && !options.unhoistableHeaders?.has(lname)) ||\n options.hoistableHeaders?.has(lname)) {\n query[name] = headers[name];\n delete headers[name];\n }\n }\n return {\n ...request,\n headers,\n query,\n };\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { GENERATED_HEADERS } from \"./constants\";\nexport const prepareRequest = (request) => {\n request = HttpRequest.clone(request);\n for (const headerName of Object.keys(request.headers)) {\n if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName];\n }\n }\n return request;\n};\n", "import { escapeUri } from \"@smithy/util-uri-escape\";\nimport { SIGNATURE_HEADER } from \"./constants\";\nexport const getCanonicalQuery = ({ query = {} }) => {\n const keys = [];\n const serialized = {};\n for (const key of Object.keys(query)) {\n if (key.toLowerCase() === SIGNATURE_HEADER) {\n continue;\n }\n const encodedKey = escapeUri(key);\n keys.push(encodedKey);\n const value = query[key];\n if (typeof value === \"string\") {\n serialized[encodedKey] = `${encodedKey}=${escapeUri(value)}`;\n }\n else if (Array.isArray(value)) {\n serialized[encodedKey] = value\n .slice(0)\n .reduce((encoded, value) => encoded.concat([`${encodedKey}=${escapeUri(value)}`]), [])\n .sort()\n .join(\"&\");\n }\n }\n return keys\n .sort()\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join(\"&\");\n};\n", "export const iso8601 = (time) => toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, \"Z\");\nexport const toDate = (time) => {\n if (typeof time === \"number\") {\n return new Date(time * 1000);\n }\n if (typeof time === \"string\") {\n if (Number(time)) {\n return new Date(Number(time) * 1000);\n }\n return new Date(time);\n }\n return time;\n};\n", "import { toHex } from \"@smithy/util-hex-encoding\";\nimport { normalizeProvider } from \"@smithy/util-middleware\";\nimport { escapeUri } from \"@smithy/util-uri-escape\";\nimport { toUint8Array } from \"@smithy/util-utf8\";\nimport { getCanonicalQuery } from \"./getCanonicalQuery\";\nimport { iso8601 } from \"./utilDate\";\nexport class SignatureV4Base {\n service;\n regionProvider;\n credentialProvider;\n sha256;\n uriEscapePath;\n applyChecksum;\n constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) {\n this.service = service;\n this.sha256 = sha256;\n this.uriEscapePath = uriEscapePath;\n this.applyChecksum = typeof applyChecksum === \"boolean\" ? applyChecksum : true;\n this.regionProvider = normalizeProvider(region);\n this.credentialProvider = normalizeProvider(credentials);\n }\n createCanonicalRequest(request, canonicalHeaders, payloadHash) {\n const sortedHeaders = Object.keys(canonicalHeaders).sort();\n return `${request.method}\n${this.getCanonicalPath(request)}\n${getCanonicalQuery(request)}\n${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join(\"\\n\")}\n\n${sortedHeaders.join(\";\")}\n${payloadHash}`;\n }\n async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {\n const hash = new this.sha256();\n hash.update(toUint8Array(canonicalRequest));\n const hashedRequest = await hash.digest();\n return `${algorithmIdentifier}\n${longDate}\n${credentialScope}\n${toHex(hashedRequest)}`;\n }\n getCanonicalPath({ path }) {\n if (this.uriEscapePath) {\n const normalizedPathSegments = [];\n for (const pathSegment of path.split(\"/\")) {\n if (pathSegment?.length === 0)\n continue;\n if (pathSegment === \".\")\n continue;\n if (pathSegment === \"..\") {\n normalizedPathSegments.pop();\n }\n else {\n normalizedPathSegments.push(pathSegment);\n }\n }\n const normalizedPath = `${path?.startsWith(\"/\") ? \"/\" : \"\"}${normalizedPathSegments.join(\"/\")}${normalizedPathSegments.length > 0 && path?.endsWith(\"/\") ? \"/\" : \"\"}`;\n const doubleEncoded = escapeUri(normalizedPath);\n return doubleEncoded.replace(/%2F/g, \"/\");\n }\n return path;\n }\n validateResolvedCredentials(credentials) {\n if (typeof credentials !== \"object\" ||\n typeof credentials.accessKeyId !== \"string\" ||\n typeof credentials.secretAccessKey !== \"string\") {\n throw new Error(\"Resolved credential object is not valid\");\n }\n }\n formatDate(now) {\n const longDate = iso8601(now).replace(/[\\-:]/g, \"\");\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n };\n }\n getCanonicalHeaderList(headers) {\n return Object.keys(headers).sort().join(\";\");\n }\n}\n", "import { toHex } from \"@smithy/util-hex-encoding\";\nimport { toUint8Array } from \"@smithy/util-utf8\";\nimport { ALGORITHM_IDENTIFIER, ALGORITHM_QUERY_PARAM, AMZ_DATE_HEADER, AMZ_DATE_QUERY_PARAM, AUTH_HEADER, CREDENTIAL_QUERY_PARAM, EVENT_ALGORITHM_IDENTIFIER, EXPIRES_QUERY_PARAM, MAX_PRESIGNED_TTL, SHA256_HEADER, SIGNATURE_QUERY_PARAM, SIGNED_HEADERS_QUERY_PARAM, TOKEN_HEADER, TOKEN_QUERY_PARAM, } from \"./constants\";\nimport { createScope, getSigningKey } from \"./credentialDerivation\";\nimport { getCanonicalHeaders } from \"./getCanonicalHeaders\";\nimport { getPayloadHash } from \"./getPayloadHash\";\nimport { HeaderFormatter } from \"./HeaderFormatter\";\nimport { hasHeader } from \"./headerUtil\";\nimport { moveHeadersToQuery } from \"./moveHeadersToQuery\";\nimport { prepareRequest } from \"./prepareRequest\";\nimport { SignatureV4Base } from \"./SignatureV4Base\";\nexport class SignatureV4 extends SignatureV4Base {\n headerFormatter = new HeaderFormatter();\n constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) {\n super({\n applyChecksum,\n credentials,\n region,\n service,\n sha256,\n uriEscapePath,\n });\n }\n async presign(originalRequest, options = {}) {\n const { signingDate = new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService, } = options;\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? (await this.regionProvider());\n const { longDate, shortDate } = this.formatDate(signingDate);\n if (expiresIn > MAX_PRESIGNED_TTL) {\n return Promise.reject(\"Signature version 4 presigned URLs\" + \" must have an expiration date less than one week in\" + \" the future\");\n }\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders });\n if (credentials.sessionToken) {\n request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;\n }\n request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;\n request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;\n request.query[AMZ_DATE_QUERY_PARAM] = longDate;\n request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders);\n request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)));\n return request;\n }\n async sign(toSign, options) {\n if (typeof toSign === \"string\") {\n return this.signString(toSign, options);\n }\n else if (toSign.headers && toSign.payload) {\n return this.signEvent(toSign, options);\n }\n else if (toSign.message) {\n return this.signMessage(toSign, options);\n }\n else {\n return this.signRequest(toSign, options);\n }\n }\n async signEvent({ headers, payload }, { signingDate = new Date(), priorSignature, signingRegion, signingService }) {\n const region = signingRegion ?? (await this.regionProvider());\n const { shortDate, longDate } = this.formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256);\n const hash = new this.sha256();\n hash.update(headers);\n const hashedHeaders = toHex(await hash.digest());\n const stringToSign = [\n EVENT_ALGORITHM_IDENTIFIER,\n longDate,\n scope,\n priorSignature,\n hashedHeaders,\n hashedPayload,\n ].join(\"\\n\");\n return this.signString(stringToSign, { signingDate, signingRegion: region, signingService });\n }\n async signMessage(signableMessage, { signingDate = new Date(), signingRegion, signingService }) {\n const promise = this.signEvent({\n headers: this.headerFormatter.format(signableMessage.message.headers),\n payload: signableMessage.message.body,\n }, {\n signingDate,\n signingRegion,\n signingService,\n priorSignature: signableMessage.priorSignature,\n });\n return promise.then((signature) => {\n return { message: signableMessage.message, signature };\n });\n }\n async signString(stringToSign, { signingDate = new Date(), signingRegion, signingService } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? (await this.regionProvider());\n const { shortDate } = this.formatDate(signingDate);\n const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));\n hash.update(toUint8Array(stringToSign));\n return toHex(await hash.digest());\n }\n async signRequest(requestToSign, { signingDate = new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService, } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? (await this.regionProvider());\n const request = prepareRequest(requestToSign);\n const { longDate, shortDate } = this.formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n request.headers[AMZ_DATE_HEADER] = longDate;\n if (credentials.sessionToken) {\n request.headers[TOKEN_HEADER] = credentials.sessionToken;\n }\n const payloadHash = await getPayloadHash(request, this.sha256);\n if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) {\n request.headers[SHA256_HEADER] = payloadHash;\n }\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash));\n request.headers[AUTH_HEADER] =\n `${ALGORITHM_IDENTIFIER} ` +\n `Credential=${credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, ` +\n `Signature=${signature}`;\n return request;\n }\n async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {\n const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER);\n const hash = new this.sha256(await keyPromise);\n hash.update(toUint8Array(stringToSign));\n return toHex(await hash.digest());\n }\n getSigningKey(credentials, region, shortDate, service) {\n return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);\n }\n}\n", "export const signatureV4aContainer = {\n SignatureV4a: null,\n};\n", "export * from \"./SignatureV4\";\nexport * from \"./constants\";\nexport { getCanonicalHeaders } from \"./getCanonicalHeaders\";\nexport { getCanonicalQuery } from \"./getCanonicalQuery\";\nexport { getPayloadHash } from \"./getPayloadHash\";\nexport { moveHeadersToQuery } from \"./moveHeadersToQuery\";\nexport { prepareRequest } from \"./prepareRequest\";\nexport * from \"./credentialDerivation\";\nexport { SignatureV4Base } from \"./SignatureV4Base\";\nexport { hasHeader } from \"./headerUtil\";\nexport * from \"./signature-v4a-container\";\n", "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { doesIdentityRequireRefresh, isIdentityExpired, memoizeIdentityProvider, normalizeProvider, } from \"@smithy/core\";\nimport { SignatureV4 } from \"@smithy/signature-v4\";\nexport const resolveAwsSdkSigV4Config = (config) => {\n let inputCredentials = config.credentials;\n let isUserSupplied = !!config.credentials;\n let resolvedCredentials = undefined;\n Object.defineProperty(config, \"credentials\", {\n set(credentials) {\n if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {\n isUserSupplied = true;\n }\n inputCredentials = credentials;\n const memoizedProvider = normalizeCredentialProvider(config, {\n credentials: inputCredentials,\n credentialDefaultProvider: config.credentialDefaultProvider,\n });\n const boundProvider = bindCallerConfig(config, memoizedProvider);\n if (isUserSupplied && !boundProvider.attributed) {\n const isCredentialObject = typeof inputCredentials === \"object\" && inputCredentials !== null;\n resolvedCredentials = async (options) => {\n const creds = await boundProvider(options);\n const attributedCreds = creds;\n if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) {\n return setCredentialFeature(attributedCreds, \"CREDENTIALS_CODE\", \"e\");\n }\n return attributedCreds;\n };\n resolvedCredentials.memoized = boundProvider.memoized;\n resolvedCredentials.configBound = boundProvider.configBound;\n resolvedCredentials.attributed = true;\n }\n else {\n resolvedCredentials = boundProvider;\n }\n },\n get() {\n return resolvedCredentials;\n },\n enumerable: true,\n configurable: true,\n });\n config.credentials = inputCredentials;\n const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256, } = config;\n let signer;\n if (config.signer) {\n signer = normalizeProvider(config.signer);\n }\n else if (config.regionInfoProvider) {\n signer = () => normalizeProvider(config.region)()\n .then(async (region) => [\n (await config.regionInfoProvider(region, {\n useFipsEndpoint: await config.useFipsEndpoint(),\n useDualstackEndpoint: await config.useDualstackEndpoint(),\n })) || {},\n region,\n ])\n .then(([regionInfo, region]) => {\n const { signingRegion, signingService } = regionInfo;\n config.signingRegion = config.signingRegion || signingRegion || region;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: config.credentials,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath,\n };\n const SignerCtor = config.signerConstructor || SignatureV4;\n return new SignerCtor(params);\n });\n }\n else {\n signer = async (authScheme) => {\n authScheme = Object.assign({}, {\n name: \"sigv4\",\n signingName: config.signingName || config.defaultSigningName,\n signingRegion: await normalizeProvider(config.region)(),\n properties: {},\n }, authScheme);\n const signingRegion = authScheme.signingRegion;\n const signingService = authScheme.signingName;\n config.signingRegion = config.signingRegion || signingRegion;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: config.credentials,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath,\n };\n const SignerCtor = config.signerConstructor || SignatureV4;\n return new SignerCtor(params);\n };\n }\n const resolvedConfig = Object.assign(config, {\n systemClockOffset,\n signingEscapePath,\n signer,\n });\n return resolvedConfig;\n};\nexport const resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;\nfunction normalizeCredentialProvider(config, { credentials, credentialDefaultProvider, }) {\n let credentialsProvider;\n if (credentials) {\n if (!credentials?.memoized) {\n credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh);\n }\n else {\n credentialsProvider = credentials;\n }\n }\n else {\n if (credentialDefaultProvider) {\n credentialsProvider = normalizeProvider(credentialDefaultProvider(Object.assign({}, config, {\n parentClientConfig: config,\n })));\n }\n else {\n credentialsProvider = async () => {\n throw new Error(\"@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.\");\n };\n }\n }\n credentialsProvider.memoized = true;\n return credentialsProvider;\n}\nfunction bindCallerConfig(config, credentialsProvider) {\n if (credentialsProvider.configBound) {\n return credentialsProvider;\n }\n const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config });\n fn.memoized = credentialsProvider.memoized;\n fn.configBound = true;\n return fn;\n}\n", "export { AwsSdkSigV4Signer, AWSSDKSigV4Signer, validateSigningProperties } from \"./AwsSdkSigV4Signer\";\nexport { AwsSdkSigV4ASigner } from \"./AwsSdkSigV4ASigner\";\nexport * from \"./NODE_AUTH_SCHEME_PREFERENCE_OPTIONS\";\nexport * from \"./resolveAwsSdkSigV4AConfig\";\nexport * from \"./resolveAwsSdkSigV4Config\";\n", "export * from \"./aws_sdk\";\nexport * from \"./utils/getBearerTokenEnvKey\";\n", "const TEXT_ENCODER = typeof TextEncoder == \"function\" ? new TextEncoder() : null;\nexport const calculateBodyLength = (body) => {\n if (typeof body === \"string\") {\n if (TEXT_ENCODER) {\n return TEXT_ENCODER.encode(body).byteLength;\n }\n let len = body.length;\n for (let i = len - 1; i >= 0; i--) {\n const code = body.charCodeAt(i);\n if (code > 0x7f && code <= 0x7ff)\n len++;\n else if (code > 0x7ff && code <= 0xffff)\n len += 2;\n if (code >= 0xdc00 && code <= 0xdfff)\n i--;\n }\n return len;\n }\n else if (typeof body.byteLength === \"number\") {\n return body.byteLength;\n }\n else if (typeof body.size === \"number\") {\n return body.size;\n }\n throw new Error(`Body Length computation failed for ${body}`);\n};\n", "export * from \"./calculateBodyLength\";\n", "const getAllAliases = (name, aliases) => {\n const _aliases = [];\n if (name) {\n _aliases.push(name);\n }\n if (aliases) {\n for (const alias of aliases) {\n _aliases.push(alias);\n }\n }\n return _aliases;\n};\nconst getMiddlewareNameWithAliases = (name, aliases) => {\n return `${name || \"anonymous\"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(\",\")})` : \"\"}`;\n};\nexport const constructStack = () => {\n let absoluteEntries = [];\n let relativeEntries = [];\n let identifyOnResolve = false;\n const entriesNameSet = new Set();\n const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] ||\n priorityWeights[b.priority || \"normal\"] - priorityWeights[a.priority || \"normal\"]);\n const removeByName = (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n const aliases = getAllAliases(entry.name, entry.aliases);\n if (aliases.includes(toRemove)) {\n isRemoved = true;\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n };\n const removeByReference = (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n if (entry.middleware === toRemove) {\n isRemoved = true;\n for (const alias of getAllAliases(entry.name, entry.aliases)) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n };\n const cloneTo = (toStack) => {\n absoluteEntries.forEach((entry) => {\n toStack.add(entry.middleware, { ...entry });\n });\n relativeEntries.forEach((entry) => {\n toStack.addRelativeTo(entry.middleware, { ...entry });\n });\n toStack.identifyOnResolve?.(stack.identifyOnResolve());\n return toStack;\n };\n const expandRelativeMiddlewareList = (from) => {\n const expandedMiddlewareList = [];\n from.before.forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n }\n else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n expandedMiddlewareList.push(from);\n from.after.reverse().forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n }\n else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n return expandedMiddlewareList;\n };\n const getMiddlewareList = (debug = false) => {\n const normalizedAbsoluteEntries = [];\n const normalizedRelativeEntries = [];\n const normalizedEntriesNameMap = {};\n absoluteEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: [],\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedAbsoluteEntries.push(normalizedEntry);\n });\n relativeEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: [],\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedRelativeEntries.push(normalizedEntry);\n });\n normalizedRelativeEntries.forEach((entry) => {\n if (entry.toMiddleware) {\n const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];\n if (toMiddleware === undefined) {\n if (debug) {\n return;\n }\n throw new Error(`${entry.toMiddleware} is not found when adding ` +\n `${getMiddlewareNameWithAliases(entry.name, entry.aliases)} ` +\n `middleware ${entry.relation} ${entry.toMiddleware}`);\n }\n if (entry.relation === \"after\") {\n toMiddleware.after.push(entry);\n }\n if (entry.relation === \"before\") {\n toMiddleware.before.push(entry);\n }\n }\n });\n const mainChain = sort(normalizedAbsoluteEntries)\n .map(expandRelativeMiddlewareList)\n .reduce((wholeList, expandedMiddlewareList) => {\n wholeList.push(...expandedMiddlewareList);\n return wholeList;\n }, []);\n return mainChain;\n };\n const stack = {\n add: (middleware, options = {}) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n step: \"initialize\",\n priority: \"normal\",\n middleware,\n ...options,\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = absoluteEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias));\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = absoluteEntries[toOverrideIndex];\n if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {\n throw new Error(`\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware with ` +\n `${toOverride.priority} priority in ${toOverride.step} step cannot ` +\n `be overridden by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware with ` +\n `${entry.priority} priority in ${entry.step} step.`);\n }\n absoluteEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n absoluteEntries.push(entry);\n },\n addRelativeTo: (middleware, options) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n middleware,\n ...options,\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = relativeEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias));\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = relativeEntries[toOverrideIndex];\n if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {\n throw new Error(`\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware ` +\n `${toOverride.relation} \"${toOverride.toMiddleware}\" middleware cannot be overridden ` +\n `by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware ${entry.relation} ` +\n `\"${entry.toMiddleware}\" middleware.`);\n }\n relativeEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n relativeEntries.push(entry);\n },\n clone: () => cloneTo(constructStack()),\n use: (plugin) => {\n plugin.applyToStack(stack);\n },\n remove: (toRemove) => {\n if (typeof toRemove === \"string\")\n return removeByName(toRemove);\n else\n return removeByReference(toRemove);\n },\n removeByTag: (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n const { tags, name, aliases: _aliases } = entry;\n if (tags && tags.includes(toRemove)) {\n const aliases = getAllAliases(name, _aliases);\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n isRemoved = true;\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n },\n concat: (from) => {\n const cloned = cloneTo(constructStack());\n cloned.use(from);\n cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false));\n return cloned;\n },\n applyToStack: cloneTo,\n identify: () => {\n return getMiddlewareList(true).map((mw) => {\n const step = mw.step ??\n mw.relation +\n \" \" +\n mw.toMiddleware;\n return getMiddlewareNameWithAliases(mw.name, mw.aliases) + \" - \" + step;\n });\n },\n identifyOnResolve(toggle) {\n if (typeof toggle === \"boolean\")\n identifyOnResolve = toggle;\n return identifyOnResolve;\n },\n resolve: (handler, context) => {\n for (const middleware of getMiddlewareList()\n .map((entry) => entry.middleware)\n .reverse()) {\n handler = middleware(handler, context);\n }\n if (identifyOnResolve) {\n console.log(stack.identify());\n }\n return handler;\n },\n };\n return stack;\n};\nconst stepWeights = {\n initialize: 5,\n serialize: 4,\n build: 3,\n finalizeRequest: 2,\n deserialize: 1,\n};\nconst priorityWeights = {\n high: 3,\n normal: 2,\n low: 1,\n};\n", "export * from \"./MiddlewareStack\";\n", "import { constructStack } from \"@smithy/middleware-stack\";\nexport class Client {\n config;\n middlewareStack = constructStack();\n initConfig;\n handlers;\n constructor(config) {\n this.config = config;\n const { protocol, protocolSettings } = config;\n if (protocolSettings) {\n if (typeof protocol === \"function\") {\n config.protocol = new protocol(protocolSettings);\n }\n }\n }\n send(command, optionsOrCb, cb) {\n const options = typeof optionsOrCb !== \"function\" ? optionsOrCb : undefined;\n const callback = typeof optionsOrCb === \"function\" ? optionsOrCb : cb;\n const useHandlerCache = options === undefined && this.config.cacheMiddleware === true;\n let handler;\n if (useHandlerCache) {\n if (!this.handlers) {\n this.handlers = new WeakMap();\n }\n const handlers = this.handlers;\n if (handlers.has(command.constructor)) {\n handler = handlers.get(command.constructor);\n }\n else {\n handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n handlers.set(command.constructor, handler);\n }\n }\n else {\n delete this.handlers;\n handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n }\n if (callback) {\n handler(command)\n .then((result) => callback(null, result.output), (err) => callback(err))\n .catch(() => { });\n }\n else {\n return handler(command).then((result) => result.output);\n }\n }\n destroy() {\n this.config?.requestHandler?.destroy?.();\n delete this.handlers;\n }\n}\n", "export { collectBody } from \"@smithy/core/protocols\";\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nconst SENSITIVE_STRING = \"***SensitiveInformation***\";\nexport function schemaLogFilter(schema, data) {\n if (data == null) {\n return data;\n }\n const ns = NormalizedSchema.of(schema);\n if (ns.getMergedTraits().sensitive) {\n return SENSITIVE_STRING;\n }\n if (ns.isListSchema()) {\n const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive;\n if (isSensitive) {\n return SENSITIVE_STRING;\n }\n }\n else if (ns.isMapSchema()) {\n const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive;\n if (isSensitive) {\n return SENSITIVE_STRING;\n }\n }\n else if (ns.isStructSchema() && typeof data === \"object\") {\n const object = data;\n const newObject = {};\n for (const [member, memberNs] of ns.structIterator()) {\n if (object[member] != null) {\n newObject[member] = schemaLogFilter(memberNs, object[member]);\n }\n }\n return newObject;\n }\n return data;\n}\n", "import { constructStack } from \"@smithy/middleware-stack\";\nimport { SMITHY_CONTEXT_KEY } from \"@smithy/types\";\nimport { schemaLogFilter } from \"./schemaLogFilter\";\nexport class Command {\n middlewareStack = constructStack();\n schema;\n static classBuilder() {\n return new ClassBuilder();\n }\n resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor, }) {\n for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {\n this.middlewareStack.use(mw);\n }\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog,\n outputFilterSensitiveLog,\n [SMITHY_CONTEXT_KEY]: {\n commandInstance: this,\n ...smithyContext,\n },\n ...additionalContext,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n}\nclass ClassBuilder {\n _init = () => { };\n _ep = {};\n _middlewareFn = () => [];\n _commandName = \"\";\n _clientName = \"\";\n _additionalContext = {};\n _smithyContext = {};\n _inputFilterSensitiveLog = undefined;\n _outputFilterSensitiveLog = undefined;\n _serializer = null;\n _deserializer = null;\n _operationSchema;\n init(cb) {\n this._init = cb;\n }\n ep(endpointParameterInstructions) {\n this._ep = endpointParameterInstructions;\n return this;\n }\n m(middlewareSupplier) {\n this._middlewareFn = middlewareSupplier;\n return this;\n }\n s(service, operation, smithyContext = {}) {\n this._smithyContext = {\n service,\n operation,\n ...smithyContext,\n };\n return this;\n }\n c(additionalContext = {}) {\n this._additionalContext = additionalContext;\n return this;\n }\n n(clientName, commandName) {\n this._clientName = clientName;\n this._commandName = commandName;\n return this;\n }\n f(inputFilter = (_) => _, outputFilter = (_) => _) {\n this._inputFilterSensitiveLog = inputFilter;\n this._outputFilterSensitiveLog = outputFilter;\n return this;\n }\n ser(serializer) {\n this._serializer = serializer;\n return this;\n }\n de(deserializer) {\n this._deserializer = deserializer;\n return this;\n }\n sc(operation) {\n this._operationSchema = operation;\n this._smithyContext.operationSchema = operation;\n return this;\n }\n build() {\n const closure = this;\n let CommandRef;\n return (CommandRef = class extends Command {\n input;\n static getEndpointParameterInstructions() {\n return closure._ep;\n }\n constructor(...[input]) {\n super();\n this.input = input ?? {};\n closure._init(this);\n this.schema = closure._operationSchema;\n }\n resolveMiddleware(stack, configuration, options) {\n const op = closure._operationSchema;\n const input = op?.[4] ?? op?.input;\n const output = op?.[5] ?? op?.output;\n return this.resolveMiddlewareWithContext(stack, configuration, options, {\n CommandCtor: CommandRef,\n middlewareFn: closure._middlewareFn,\n clientName: closure._clientName,\n commandName: closure._commandName,\n inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_) => _),\n outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_) => _),\n smithyContext: closure._smithyContext,\n additionalContext: closure._additionalContext,\n });\n }\n serialize = closure._serializer;\n deserialize = closure._deserializer;\n });\n }\n}\n", "export const SENSITIVE_STRING = \"***SensitiveInformation***\";\n", "export const createAggregatedClient = (commands, Client, options) => {\n for (const [command, CommandCtor] of Object.entries(commands)) {\n const methodImpl = async function (args, optionsOrCb, cb) {\n const command = new CommandCtor(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expected http options but got ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n };\n const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, \"\");\n Client.prototype[methodName] = methodImpl;\n }\n const { paginators = {}, waiters = {} } = options ?? {};\n for (const [paginatorName, paginatorFn] of Object.entries(paginators)) {\n if (Client.prototype[paginatorName] === void 0) {\n Client.prototype[paginatorName] = function (commandInput = {}, paginationConfiguration, ...rest) {\n return paginatorFn({\n ...paginationConfiguration,\n client: this,\n }, commandInput, ...rest);\n };\n }\n }\n for (const [waiterName, waiterFn] of Object.entries(waiters)) {\n if (Client.prototype[waiterName] === void 0) {\n Client.prototype[waiterName] = async function (commandInput = {}, waiterConfiguration, ...rest) {\n let config = waiterConfiguration;\n if (typeof waiterConfiguration === \"number\") {\n config = {\n maxWaitTime: waiterConfiguration,\n };\n }\n return waiterFn({\n ...config,\n client: this,\n }, commandInput, ...rest);\n };\n }\n }\n};\n", "export class ServiceException extends Error {\n $fault;\n $response;\n $retryable;\n $metadata;\n constructor(options) {\n super(options.message);\n Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype);\n this.name = options.name;\n this.$fault = options.$fault;\n this.$metadata = options.$metadata;\n }\n static isInstance(value) {\n if (!value)\n return false;\n const candidate = value;\n return (ServiceException.prototype.isPrototypeOf(candidate) ||\n (Boolean(candidate.$fault) &&\n Boolean(candidate.$metadata) &&\n (candidate.$fault === \"client\" || candidate.$fault === \"server\")));\n }\n static [Symbol.hasInstance](instance) {\n if (!instance)\n return false;\n const candidate = instance;\n if (this === ServiceException) {\n return ServiceException.isInstance(instance);\n }\n if (ServiceException.isInstance(instance)) {\n if (candidate.name && this.name) {\n return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;\n }\n return this.prototype.isPrototypeOf(instance);\n }\n return false;\n }\n}\nexport const decorateServiceException = (exception, additions = {}) => {\n Object.entries(additions)\n .filter(([, v]) => v !== undefined)\n .forEach(([k, v]) => {\n if (exception[k] == undefined || exception[k] === \"\") {\n exception[k] = v;\n }\n });\n const message = exception.message || exception.Message || \"UnknownError\";\n exception.message = message;\n delete exception.Message;\n return exception;\n};\n", "import { decorateServiceException } from \"./exceptions\";\nexport const throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => {\n const $metadata = deserializeMetadata(output);\n const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + \"\" : undefined;\n const response = new exceptionCtor({\n name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || \"UnknownError\",\n $fault: \"client\",\n $metadata,\n });\n throw decorateServiceException(response, parsedBody);\n};\nexport const withBaseException = (ExceptionCtor) => {\n return ({ output, parsedBody, errorCode }) => {\n throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });\n };\n};\nconst deserializeMetadata = (output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n});\n", "export const loadConfigsForDefaultMode = (mode) => {\n switch (mode) {\n case \"standard\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100,\n };\n case \"in-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 1100,\n };\n case \"cross-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100,\n };\n case \"mobile\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 30000,\n };\n default:\n return {};\n }\n};\n", "let warningEmitted = false;\nexport const emitWarningIfUnsupportedVersion = (version) => {\n if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 16) {\n warningEmitted = true;\n }\n};\n", "export { extendedEncodeURIComponent } from \"@smithy/core/protocols\";\n", "import { AlgorithmId } from \"@smithy/types\";\nexport { AlgorithmId };\nconst knownAlgorithms = Object.values(AlgorithmId);\nexport const getChecksumConfiguration = (runtimeConfig) => {\n const checksumAlgorithms = [];\n for (const id in AlgorithmId) {\n const algorithmId = AlgorithmId[id];\n if (runtimeConfig[algorithmId] === undefined) {\n continue;\n }\n checksumAlgorithms.push({\n algorithmId: () => algorithmId,\n checksumConstructor: () => runtimeConfig[algorithmId],\n });\n }\n for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) {\n checksumAlgorithms.push({\n algorithmId: () => id,\n checksumConstructor: () => ChecksumCtor,\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {};\n const id = algo.algorithmId();\n const ctor = algo.checksumConstructor();\n if (knownAlgorithms.includes(id)) {\n runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor;\n }\n else {\n runtimeConfig.checksumAlgorithms[id] = ctor;\n }\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n },\n };\n};\nexport const resolveChecksumRuntimeConfig = (clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n const id = checksumAlgorithm.algorithmId();\n if (knownAlgorithms.includes(id)) {\n runtimeConfig[id] = checksumAlgorithm.checksumConstructor();\n }\n });\n return runtimeConfig;\n};\n", "export const getRetryConfiguration = (runtimeConfig) => {\n return {\n setRetryStrategy(retryStrategy) {\n runtimeConfig.retryStrategy = retryStrategy;\n },\n retryStrategy() {\n return runtimeConfig.retryStrategy;\n },\n };\n};\nexport const resolveRetryRuntimeConfig = (retryStrategyConfiguration) => {\n const runtimeConfig = {};\n runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();\n return runtimeConfig;\n};\n", "import { getChecksumConfiguration, resolveChecksumRuntimeConfig } from \"./checksum\";\nimport { getRetryConfiguration, resolveRetryRuntimeConfig } from \"./retry\";\nexport const getDefaultExtensionConfiguration = (runtimeConfig) => {\n return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig));\n};\nexport const getDefaultClientConfiguration = getDefaultExtensionConfiguration;\nexport const resolveDefaultRuntimeConfig = (config) => {\n return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config));\n};\n", "export * from \"./defaultExtensionConfiguration\";\n", "export const getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray];\n", "export const getValueFromTextNode = (obj) => {\n const textNodeName = \"#text\";\n for (const key in obj) {\n if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== undefined) {\n obj[key] = obj[key][textNodeName];\n }\n else if (typeof obj[key] === \"object\" && obj[key] !== null) {\n obj[key] = getValueFromTextNode(obj[key]);\n }\n }\n return obj;\n};\n", "export const isSerializableHeaderValue = (value) => {\n return value != null;\n};\n", "export class NoOpLogger {\n trace() { }\n debug() { }\n info() { }\n warn() { }\n error() { }\n}\n", "export function map(arg0, arg1, arg2) {\n let target;\n let filter;\n let instructions;\n if (typeof arg1 === \"undefined\" && typeof arg2 === \"undefined\") {\n target = {};\n instructions = arg0;\n }\n else {\n target = arg0;\n if (typeof arg1 === \"function\") {\n filter = arg1;\n instructions = arg2;\n return mapWithFilter(target, filter, instructions);\n }\n else {\n instructions = arg1;\n }\n }\n for (const key of Object.keys(instructions)) {\n if (!Array.isArray(instructions[key])) {\n target[key] = instructions[key];\n continue;\n }\n applyInstruction(target, null, instructions, key);\n }\n return target;\n}\nexport const convertMap = (target) => {\n const output = {};\n for (const [k, v] of Object.entries(target || {})) {\n output[k] = [, v];\n }\n return output;\n};\nexport const take = (source, instructions) => {\n const out = {};\n for (const key in instructions) {\n applyInstruction(out, source, instructions, key);\n }\n return out;\n};\nconst mapWithFilter = (target, filter, instructions) => {\n return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => {\n if (Array.isArray(value)) {\n _instructions[key] = value;\n }\n else {\n if (typeof value === \"function\") {\n _instructions[key] = [filter, value()];\n }\n else {\n _instructions[key] = [filter, value];\n }\n }\n return _instructions;\n }, {}));\n};\nconst applyInstruction = (target, source, instructions, targetKey) => {\n if (source !== null) {\n let instruction = instructions[targetKey];\n if (typeof instruction === \"function\") {\n instruction = [, instruction];\n }\n const [filter = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;\n if ((typeof filter === \"function\" && filter(source[sourceKey])) || (typeof filter !== \"function\" && !!filter)) {\n target[targetKey] = valueFn(source[sourceKey]);\n }\n return;\n }\n let [filter, value] = instructions[targetKey];\n if (typeof value === \"function\") {\n let _value;\n const defaultFilterPassed = filter === undefined && (_value = value()) != null;\n const customFilterPassed = (typeof filter === \"function\" && !!filter(void 0)) || (typeof filter !== \"function\" && !!filter);\n if (defaultFilterPassed) {\n target[targetKey] = _value;\n }\n else if (customFilterPassed) {\n target[targetKey] = value();\n }\n }\n else {\n const defaultFilterPassed = filter === undefined && value != null;\n const customFilterPassed = (typeof filter === \"function\" && !!filter(value)) || (typeof filter !== \"function\" && !!filter);\n if (defaultFilterPassed || customFilterPassed) {\n target[targetKey] = value;\n }\n }\n};\nconst nonNullish = (_) => _ != null;\nconst pass = (_) => _;\n", "export { resolvedPath } from \"@smithy/core/protocols\";\n", "export const serializeFloat = (value) => {\n if (value !== value) {\n return \"NaN\";\n }\n switch (value) {\n case Infinity:\n return \"Infinity\";\n case -Infinity:\n return \"-Infinity\";\n default:\n return value;\n }\n};\nexport const serializeDateTime = (date) => date.toISOString().replace(\".000Z\", \"Z\");\n", "export const _json = (obj) => {\n if (obj == null) {\n return {};\n }\n if (Array.isArray(obj)) {\n return obj.filter((_) => _ != null).map(_json);\n }\n if (typeof obj === \"object\") {\n const target = {};\n for (const key of Object.keys(obj)) {\n if (obj[key] == null) {\n continue;\n }\n target[key] = _json(obj[key]);\n }\n return target;\n }\n return obj;\n};\n", "export * from \"./client\";\nexport * from \"./collect-stream-body\";\nexport * from \"./command\";\nexport * from \"./constants\";\nexport * from \"./create-aggregated-client\";\nexport * from \"./default-error-handler\";\nexport * from \"./defaults-mode\";\nexport * from \"./emitWarningIfUnsupportedVersion\";\nexport * from \"./exceptions\";\nexport * from \"./extended-encode-uri-component\";\nexport * from \"./extensions\";\nexport * from \"./get-array-if-single-item\";\nexport * from \"./get-value-from-text-node\";\nexport * from \"./is-serializable-header-value\";\nexport * from \"./NoOpLogger\";\nexport * from \"./object-mapping\";\nexport * from \"./resolve-path\";\nexport * from \"./ser-utils\";\nexport * from \"./serde-json\";\nexport * from \"@smithy/core/serde\";\n", "import { NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { decorateServiceException } from \"@smithy/smithy-client\";\nexport class ProtocolLib {\n queryCompat;\n constructor(queryCompat = false) {\n this.queryCompat = queryCompat;\n }\n resolveRestContentType(defaultContentType, inputSchema) {\n const members = inputSchema.getMemberSchemas();\n const httpPayloadMember = Object.values(members).find((m) => {\n return !!m.getMergedTraits().httpPayload;\n });\n if (httpPayloadMember) {\n const mediaType = httpPayloadMember.getMergedTraits().mediaType;\n if (mediaType) {\n return mediaType;\n }\n else if (httpPayloadMember.isStringSchema()) {\n return \"text/plain\";\n }\n else if (httpPayloadMember.isBlobSchema()) {\n return \"application/octet-stream\";\n }\n else {\n return defaultContentType;\n }\n }\n else if (!inputSchema.isUnitSchema()) {\n const hasBody = Object.values(members).find((m) => {\n const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits();\n const noPrefixHeaders = httpPrefixHeaders === void 0;\n return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders;\n });\n if (hasBody) {\n return defaultContentType;\n }\n }\n }\n async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) {\n let namespace = defaultNamespace;\n let errorName = errorIdentifier;\n if (errorIdentifier.includes(\"#\")) {\n [namespace, errorName] = errorIdentifier.split(\"#\");\n }\n const errorMetadata = {\n $metadata: metadata,\n $fault: response.statusCode < 500 ? \"client\" : \"server\",\n };\n const registry = TypeRegistry.for(namespace);\n try {\n const errorSchema = getErrorSchema?.(registry, errorName) ?? registry.getSchema(errorIdentifier);\n return { errorSchema, errorMetadata };\n }\n catch (e) {\n dataObject.message = dataObject.message ?? dataObject.Message ?? \"UnknownError\";\n const synthetic = TypeRegistry.for(\"smithy.ts.sdk.synthetic.\" + namespace);\n const baseExceptionSchema = synthetic.getBaseException();\n if (baseExceptionSchema) {\n const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error;\n throw this.decorateServiceException(Object.assign(new ErrorCtor({ name: errorName }), errorMetadata), dataObject);\n }\n throw this.decorateServiceException(Object.assign(new Error(errorName), errorMetadata), dataObject);\n }\n }\n decorateServiceException(exception, additions = {}) {\n if (this.queryCompat) {\n const msg = exception.Message ?? additions.Message;\n const error = decorateServiceException(exception, additions);\n if (msg) {\n error.message = msg;\n }\n error.Error = {\n ...error.Error,\n Type: error.Error?.Type,\n Code: error.Error?.Code,\n Message: error.Error?.message ?? error.Error?.Message ?? msg,\n };\n const reqId = error.$metadata.requestId;\n if (reqId) {\n error.RequestId = reqId;\n }\n return error;\n }\n return decorateServiceException(exception, additions);\n }\n setQueryCompatError(output, response) {\n const queryErrorHeader = response.headers?.[\"x-amzn-query-error\"];\n if (output !== undefined && queryErrorHeader != null) {\n const [Code, Type] = queryErrorHeader.split(\";\");\n const entries = Object.entries(output);\n const Error = {\n Code,\n Type,\n };\n Object.assign(output, Error);\n for (const [k, v] of entries) {\n Error[k === \"message\" ? \"Message\" : k] = v;\n }\n delete Error.__type;\n output.Error = Error;\n }\n }\n queryCompatOutput(queryCompatErrorData, errorData) {\n if (queryCompatErrorData.Error) {\n errorData.Error = queryCompatErrorData.Error;\n }\n if (queryCompatErrorData.Type) {\n errorData.Type = queryCompatErrorData.Type;\n }\n if (queryCompatErrorData.Code) {\n errorData.Code = queryCompatErrorData.Code;\n }\n }\n findQueryCompatibleError(registry, errorName) {\n try {\n return registry.getSchema(errorName);\n }\n catch (e) {\n return registry.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName);\n }\n }\n}\n", "import { loadSmithyRpcV2CborErrorCode, SmithyRpcV2CborProtocol } from \"@smithy/core/cbor\";\nimport { NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nexport class AwsSmithyRpcV2CborProtocol extends SmithyRpcV2CborProtocol {\n awsQueryCompatible;\n mixin;\n constructor({ defaultNamespace, awsQueryCompatible, }) {\n super({ defaultNamespace });\n this.awsQueryCompatible = !!awsQueryCompatible;\n this.mixin = new ProtocolLib(this.awsQueryCompatible);\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n if (this.awsQueryCompatible) {\n request.headers[\"x-amzn-query-mode\"] = \"true\";\n }\n return request;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n if (this.awsQueryCompatible) {\n this.mixin.setQueryCompatError(dataObject, response);\n }\n const errorName = (() => {\n const compatHeader = response.headers[\"x-amzn-query-error\"];\n if (compatHeader && this.awsQueryCompatible) {\n return compatHeader.split(\";\")[0];\n }\n return loadSmithyRpcV2CborErrorCode(response, dataObject) ?? \"Unknown\";\n })();\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);\n const ns = NormalizedSchema.of(errorSchema);\n const message = dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor(message);\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n if (dataObject[name] != null) {\n output[name] = this.deserializer.readValue(member, dataObject[name]);\n }\n }\n if (this.awsQueryCompatible) {\n this.mixin.queryCompatOutput(dataObject, output);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n}\n", "export const _toStr = (val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"number\" || typeof val === \"bigint\") {\n const warning = new Error(`Received number ${val} where a string was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return String(val);\n }\n if (typeof val === \"boolean\") {\n const warning = new Error(`Received boolean ${val} where a string was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return String(val);\n }\n return val;\n};\nexport const _toBool = (val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"number\") {\n }\n if (typeof val === \"string\") {\n const lowercase = val.toLowerCase();\n if (val !== \"\" && lowercase !== \"false\" && lowercase !== \"true\") {\n const warning = new Error(`Received string \"${val}\" where a boolean was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n }\n return val !== \"\" && lowercase !== \"false\";\n }\n return val;\n};\nexport const _toNum = (val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"boolean\") {\n }\n if (typeof val === \"string\") {\n const num = Number(val);\n if (num.toString() !== val) {\n const warning = new Error(`Received string \"${val}\" where a number was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return val;\n }\n return num;\n }\n return val;\n};\n", "export class SerdeContextConfig {\n serdeContext;\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n }\n}\n", "export class UnionSerde {\n from;\n to;\n keys;\n constructor(from, to) {\n this.from = from;\n this.to = to;\n this.keys = new Set(Object.keys(this.from).filter((k) => k !== \"__type\"));\n }\n mark(key) {\n this.keys.delete(key);\n }\n hasUnknown() {\n return this.keys.size === 1 && Object.keys(this.to).length === 0;\n }\n writeUnknown() {\n if (this.hasUnknown()) {\n const k = this.keys.values().next().value;\n const v = this.from[k];\n this.to.$unknown = [k, v];\n }\n }\n}\n", "import { collectBodyString } from \"../common\";\nexport const parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n try {\n return JSON.parse(encoded);\n }\n catch (e) {\n if (e?.name === \"SyntaxError\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: encoded,\n });\n }\n throw e;\n }\n }\n return {};\n});\nexport const parseJsonErrorBody = async (errorBody, context) => {\n const value = await parseJsonBody(errorBody, context);\n value.message = value.message ?? value.Message;\n return value;\n};\nexport const loadRestJsonErrorCode = (output, data) => {\n const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());\n const sanitizeErrorCode = (rawValue) => {\n let cleanValue = rawValue;\n if (typeof cleanValue === \"number\") {\n cleanValue = cleanValue.toString();\n }\n if (cleanValue.indexOf(\",\") >= 0) {\n cleanValue = cleanValue.split(\",\")[0];\n }\n if (cleanValue.indexOf(\":\") >= 0) {\n cleanValue = cleanValue.split(\":\")[0];\n }\n if (cleanValue.indexOf(\"#\") >= 0) {\n cleanValue = cleanValue.split(\"#\")[1];\n }\n return cleanValue;\n };\n const headerKey = findKey(output.headers, \"x-amzn-errortype\");\n if (headerKey !== undefined) {\n return sanitizeErrorCode(output.headers[headerKey]);\n }\n if (data && typeof data === \"object\") {\n const codeKey = findKey(data, \"code\");\n if (codeKey && data[codeKey] !== undefined) {\n return sanitizeErrorCode(data[codeKey]);\n }\n if (data[\"__type\"] !== undefined) {\n return sanitizeErrorCode(data[\"__type\"]);\n }\n }\n};\n", "import { determineTimestampFormat } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { LazyJsonString, NumericValue, parseEpochTimestamp, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, } from \"@smithy/core/serde\";\nimport { fromBase64 } from \"@smithy/util-base64\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { UnionSerde } from \"../UnionSerde\";\nimport { jsonReviver } from \"./jsonReviver\";\nimport { parseJsonBody } from \"./parseJsonBody\";\nexport class JsonShapeDeserializer extends SerdeContextConfig {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n async read(schema, data) {\n return this._read(schema, typeof data === \"string\" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext));\n }\n readObject(schema, data) {\n return this._read(schema, data);\n }\n _read(schema, value) {\n const isObject = value !== null && typeof value === \"object\";\n const ns = NormalizedSchema.of(schema);\n if (isObject) {\n if (ns.isStructSchema()) {\n const record = value;\n const union = ns.isUnionSchema();\n const out = {};\n let nameMap = void 0;\n const { jsonName } = this.settings;\n if (jsonName) {\n nameMap = {};\n }\n let unionSerde;\n if (union) {\n unionSerde = new UnionSerde(record, out);\n }\n for (const [memberName, memberSchema] of ns.structIterator()) {\n let fromKey = memberName;\n if (jsonName) {\n fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;\n nameMap[fromKey] = memberName;\n }\n if (union) {\n unionSerde.mark(fromKey);\n }\n if (record[fromKey] != null) {\n out[memberName] = this._read(memberSchema, record[fromKey]);\n }\n }\n if (union) {\n unionSerde.writeUnknown();\n }\n else if (typeof record.__type === \"string\") {\n for (const [k, v] of Object.entries(record)) {\n const t = jsonName ? nameMap[k] ?? k : k;\n if (!(t in out)) {\n out[t] = v;\n }\n }\n }\n return out;\n }\n if (Array.isArray(value) && ns.isListSchema()) {\n const listMember = ns.getValueSchema();\n const out = [];\n for (const item of value) {\n out.push(this._read(listMember, item));\n }\n return out;\n }\n if (ns.isMapSchema()) {\n const mapMember = ns.getValueSchema();\n const out = {};\n for (const [_k, _v] of Object.entries(value)) {\n out[_k] = this._read(mapMember, _v);\n }\n return out;\n }\n }\n if (ns.isBlobSchema() && typeof value === \"string\") {\n return fromBase64(value);\n }\n const mediaType = ns.getMergedTraits().mediaType;\n if (ns.isStringSchema() && typeof value === \"string\" && mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n return LazyJsonString.from(value);\n }\n return value;\n }\n if (ns.isTimestampSchema() && value != null) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return parseRfc3339DateTimeWithOffset(value);\n case 6:\n return parseRfc7231DateTime(value);\n case 7:\n return parseEpochTimestamp(value);\n default:\n console.warn(\"Missing timestamp format, parsing value with Date constructor:\", value);\n return new Date(value);\n }\n }\n if (ns.isBigIntegerSchema() && (typeof value === \"number\" || typeof value === \"string\")) {\n return BigInt(value);\n }\n if (ns.isBigDecimalSchema() && value != undefined) {\n if (value instanceof NumericValue) {\n return value;\n }\n const untyped = value;\n if (untyped.type === \"bigDecimal\" && \"string\" in untyped) {\n return new NumericValue(untyped.string, untyped.type);\n }\n return new NumericValue(String(value), \"bigDecimal\");\n }\n if (ns.isNumericSchema() && typeof value === \"string\") {\n switch (value) {\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n case \"NaN\":\n return NaN;\n }\n return value;\n }\n if (ns.isDocumentSchema()) {\n if (isObject) {\n const out = Array.isArray(value) ? [] : {};\n for (const [k, v] of Object.entries(value)) {\n if (v instanceof NumericValue) {\n out[k] = v;\n }\n else {\n out[k] = this._read(ns, v);\n }\n }\n return out;\n }\n else {\n return structuredClone(value);\n }\n }\n return value;\n }\n}\n", "import { determineTimestampFormat } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { dateToUtcString, generateIdempotencyToken, LazyJsonString, NumericValue } from \"@smithy/core/serde\";\nimport { toBase64 } from \"@smithy/util-base64\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { JsonReplacer } from \"./jsonReplacer\";\nexport class JsonShapeSerializer extends SerdeContextConfig {\n settings;\n buffer;\n useReplacer = false;\n rootSchema;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value) {\n this.rootSchema = NormalizedSchema.of(schema);\n this.buffer = this._write(this.rootSchema, value);\n }\n writeDiscriminatedDocument(schema, value) {\n this.write(schema, value);\n if (typeof this.buffer === \"object\") {\n this.buffer.__type = NormalizedSchema.of(schema).getName(true);\n }\n }\n flush() {\n const { rootSchema, useReplacer } = this;\n this.rootSchema = undefined;\n this.useReplacer = false;\n if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) {\n if (!useReplacer) {\n return JSON.stringify(this.buffer);\n }\n const replacer = new JsonReplacer();\n return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0));\n }\n return this.buffer;\n }\n _write(schema, value, container) {\n const isObject = value !== null && typeof value === \"object\";\n const ns = NormalizedSchema.of(schema);\n if (isObject) {\n if (ns.isStructSchema()) {\n const record = value;\n const out = {};\n const { jsonName } = this.settings;\n let nameMap = void 0;\n if (jsonName) {\n nameMap = {};\n }\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const serializableValue = this._write(memberSchema, record[memberName], ns);\n if (serializableValue !== undefined) {\n let targetKey = memberName;\n if (jsonName) {\n targetKey = memberSchema.getMergedTraits().jsonName ?? memberName;\n nameMap[memberName] = targetKey;\n }\n out[targetKey] = serializableValue;\n }\n }\n if (ns.isUnionSchema() && Object.keys(out).length === 0) {\n const { $unknown } = record;\n if (Array.isArray($unknown)) {\n const [k, v] = $unknown;\n out[k] = this._write(15, v);\n }\n }\n else if (typeof record.__type === \"string\") {\n for (const [k, v] of Object.entries(record)) {\n const targetKey = jsonName ? nameMap[k] ?? k : k;\n if (!(targetKey in out)) {\n out[targetKey] = this._write(15, v);\n }\n }\n }\n return out;\n }\n if (Array.isArray(value) && ns.isListSchema()) {\n const listMember = ns.getValueSchema();\n const out = [];\n const sparse = !!ns.getMergedTraits().sparse;\n for (const item of value) {\n if (sparse || item != null) {\n out.push(this._write(listMember, item));\n }\n }\n return out;\n }\n if (ns.isMapSchema()) {\n const mapMember = ns.getValueSchema();\n const out = {};\n const sparse = !!ns.getMergedTraits().sparse;\n for (const [_k, _v] of Object.entries(value)) {\n if (sparse || _v != null) {\n out[_k] = this._write(mapMember, _v);\n }\n }\n return out;\n }\n if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) {\n if (ns === this.rootSchema) {\n return value;\n }\n return (this.serdeContext?.base64Encoder ?? toBase64)(value);\n }\n if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return value.toISOString().replace(\".000Z\", \"Z\");\n case 6:\n return dateToUtcString(value);\n case 7:\n return value.getTime() / 1000;\n default:\n console.warn(\"Missing timestamp format, using epoch seconds\", value);\n return value.getTime() / 1000;\n }\n }\n if (value instanceof NumericValue) {\n this.useReplacer = true;\n }\n }\n if (value === null && container?.isStructSchema()) {\n return void 0;\n }\n if (ns.isStringSchema()) {\n if (typeof value === \"undefined\" && ns.isIdempotencyToken()) {\n return generateIdempotencyToken();\n }\n const mediaType = ns.getMergedTraits().mediaType;\n if (value != null && mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n return LazyJsonString.from(value);\n }\n }\n return value;\n }\n if (typeof value === \"number\" && ns.isNumericSchema()) {\n if (Math.abs(value) === Infinity || isNaN(value)) {\n return String(value);\n }\n return value;\n }\n if (typeof value === \"string\" && ns.isBlobSchema()) {\n if (ns === this.rootSchema) {\n return value;\n }\n return (this.serdeContext?.base64Encoder ?? toBase64)(value);\n }\n if (typeof value === \"bigint\") {\n this.useReplacer = true;\n }\n if (ns.isDocumentSchema()) {\n if (isObject) {\n const out = Array.isArray(value) ? [] : {};\n for (const [k, v] of Object.entries(value)) {\n if (v instanceof NumericValue) {\n this.useReplacer = true;\n out[k] = v;\n }\n else {\n out[k] = this._write(ns, v);\n }\n }\n return out;\n }\n else {\n return structuredClone(value);\n }\n }\n return value;\n }\n}\n", "import { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { JsonShapeDeserializer } from \"./JsonShapeDeserializer\";\nimport { JsonShapeSerializer } from \"./JsonShapeSerializer\";\nexport class JsonCodec extends SerdeContextConfig {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n createSerializer() {\n const serializer = new JsonShapeSerializer(this.settings);\n serializer.setSerdeContext(this.serdeContext);\n return serializer;\n }\n createDeserializer() {\n const deserializer = new JsonShapeDeserializer(this.settings);\n deserializer.setSerdeContext(this.serdeContext);\n return deserializer;\n }\n}\n", "import { RpcProtocol } from \"@smithy/core/protocols\";\nimport { deref, NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { JsonCodec } from \"./JsonCodec\";\nimport { loadRestJsonErrorCode } from \"./parseJsonBody\";\nexport class AwsJsonRpcProtocol extends RpcProtocol {\n serializer;\n deserializer;\n serviceTarget;\n codec;\n mixin;\n awsQueryCompatible;\n constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {\n super({\n defaultNamespace,\n });\n this.serviceTarget = serviceTarget;\n this.codec =\n jsonCodec ??\n new JsonCodec({\n timestampFormat: {\n useTrait: true,\n default: 7,\n },\n jsonName: false,\n });\n this.serializer = this.codec.createSerializer();\n this.deserializer = this.codec.createDeserializer();\n this.awsQueryCompatible = !!awsQueryCompatible;\n this.mixin = new ProtocolLib(this.awsQueryCompatible);\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n if (!request.path.endsWith(\"/\")) {\n request.path += \"/\";\n }\n Object.assign(request.headers, {\n \"content-type\": `application/x-amz-json-${this.getJsonRpcVersion()}`,\n \"x-amz-target\": `${this.serviceTarget}.${operationSchema.name}`,\n });\n if (this.awsQueryCompatible) {\n request.headers[\"x-amzn-query-mode\"] = \"true\";\n }\n if (deref(operationSchema.input) === \"unit\" || !request.body) {\n request.body = \"{}\";\n }\n return request;\n }\n getPayloadCodec() {\n return this.codec;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n if (this.awsQueryCompatible) {\n this.mixin.setQueryCompatError(dataObject, response);\n }\n const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? \"Unknown\";\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);\n const ns = NormalizedSchema.of(errorSchema);\n const message = dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor(message);\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n if (dataObject[name] != null) {\n output[name] = this.codec.createDeserializer().readObject(member, dataObject[name]);\n }\n }\n if (this.awsQueryCompatible) {\n this.mixin.queryCompatOutput(dataObject, output);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n}\n", "import { AwsJsonRpcProtocol } from \"./AwsJsonRpcProtocol\";\nexport class AwsJson1_0Protocol extends AwsJsonRpcProtocol {\n constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {\n super({\n defaultNamespace,\n serviceTarget,\n awsQueryCompatible,\n jsonCodec,\n });\n }\n getShapeId() {\n return \"aws.protocols#awsJson1_0\";\n }\n getJsonRpcVersion() {\n return \"1.0\";\n }\n getDefaultContentType() {\n return \"application/x-amz-json-1.0\";\n }\n}\n", "import { AwsJsonRpcProtocol } from \"./AwsJsonRpcProtocol\";\nexport class AwsJson1_1Protocol extends AwsJsonRpcProtocol {\n constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {\n super({\n defaultNamespace,\n serviceTarget,\n awsQueryCompatible,\n jsonCodec,\n });\n }\n getShapeId() {\n return \"aws.protocols#awsJson1_1\";\n }\n getJsonRpcVersion() {\n return \"1.1\";\n }\n getDefaultContentType() {\n return \"application/x-amz-json-1.1\";\n }\n}\n", "import { HttpBindingProtocol, HttpInterceptingShapeDeserializer, HttpInterceptingShapeSerializer, } from \"@smithy/core/protocols\";\nimport { NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { JsonCodec } from \"./JsonCodec\";\nimport { loadRestJsonErrorCode } from \"./parseJsonBody\";\nexport class AwsRestJsonProtocol extends HttpBindingProtocol {\n serializer;\n deserializer;\n codec;\n mixin = new ProtocolLib();\n constructor({ defaultNamespace }) {\n super({\n defaultNamespace,\n });\n const settings = {\n timestampFormat: {\n useTrait: true,\n default: 7,\n },\n httpBindings: true,\n jsonName: true,\n };\n this.codec = new JsonCodec(settings);\n this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);\n this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);\n }\n getShapeId() {\n return \"aws.protocols#restJson1\";\n }\n getPayloadCodec() {\n return this.codec;\n }\n setSerdeContext(serdeContext) {\n this.codec.setSerdeContext(serdeContext);\n super.setSerdeContext(serdeContext);\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n const inputSchema = NormalizedSchema.of(operationSchema.input);\n if (!request.headers[\"content-type\"]) {\n const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);\n if (contentType) {\n request.headers[\"content-type\"] = contentType;\n }\n }\n if (request.body == null && request.headers[\"content-type\"] === this.getDefaultContentType()) {\n request.body = \"{}\";\n }\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const output = await super.deserializeResponse(operationSchema, context, response);\n const outputSchema = NormalizedSchema.of(operationSchema.output);\n for (const [name, member] of outputSchema.structIterator()) {\n if (member.getMemberTraits().httpPayload && !(name in output)) {\n output[name] = null;\n }\n }\n return output;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? \"Unknown\";\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);\n const ns = NormalizedSchema.of(errorSchema);\n const message = dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor(message);\n await this.deserializeHttpMessage(errorSchema, context, response, dataObject);\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n const target = member.getMergedTraits().jsonName ?? name;\n output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n getDefaultContentType() {\n return \"application/json\";\n }\n}\n", "import { expectUnion } from \"@smithy/smithy-client\";\nexport const awsExpectUnion = (value) => {\n if (value == null) {\n return undefined;\n }\n if (typeof value === \"object\" && \"__type\" in value) {\n delete value.__type;\n }\n return expectUnion(value);\n};\n", "export function escapeAttribute(value) {\n return value.replace(/&/g, \"&\").replace(//g, \">\").replace(/\"/g, \""\");\n}\n", "export function escapeElement(value) {\n return value\n .replace(/&/g, \"&\")\n .replace(/\"/g, \""\")\n .replace(/'/g, \"'\")\n .replace(//g, \">\")\n .replace(/\\r/g, \" \")\n .replace(/\\n/g, \" \")\n .replace(/\\u0085/g, \"…\")\n .replace(/\\u2028/, \"
\");\n}\n", "import { escapeElement } from \"./escape-element\";\nexport class XmlText {\n value;\n constructor(value) {\n this.value = value;\n }\n toString() {\n return escapeElement(\"\" + this.value);\n }\n}\n", "import { escapeAttribute } from \"./escape-attribute\";\nimport { XmlText } from \"./XmlText\";\nexport class XmlNode {\n name;\n children;\n attributes = {};\n static of(name, childText, withName) {\n const node = new XmlNode(name);\n if (childText !== undefined) {\n node.addChildNode(new XmlText(childText));\n }\n if (withName !== undefined) {\n node.withName(withName);\n }\n return node;\n }\n constructor(name, children = []) {\n this.name = name;\n this.children = children;\n }\n withName(name) {\n this.name = name;\n return this;\n }\n addAttribute(name, value) {\n this.attributes[name] = value;\n return this;\n }\n addChildNode(child) {\n this.children.push(child);\n return this;\n }\n removeAttribute(name) {\n delete this.attributes[name];\n return this;\n }\n n(name) {\n this.name = name;\n return this;\n }\n c(child) {\n this.children.push(child);\n return this;\n }\n a(name, value) {\n if (value != null) {\n this.attributes[name] = value;\n }\n return this;\n }\n cc(input, field, withName = field) {\n if (input[field] != null) {\n const node = XmlNode.of(field, input[field]).withName(withName);\n this.c(node);\n }\n }\n l(input, listName, memberName, valueProvider) {\n if (input[listName] != null) {\n const nodes = valueProvider();\n nodes.map((node) => {\n node.withName(memberName);\n this.c(node);\n });\n }\n }\n lc(input, listName, memberName, valueProvider) {\n if (input[listName] != null) {\n const nodes = valueProvider();\n const containerNode = new XmlNode(memberName);\n nodes.map((node) => {\n containerNode.c(node);\n });\n this.c(containerNode);\n }\n }\n toString() {\n const hasChildren = Boolean(this.children.length);\n let xmlText = `<${this.name}`;\n const attributes = this.attributes;\n for (const attributeName of Object.keys(attributes)) {\n const attribute = attributes[attributeName];\n if (attribute != null) {\n xmlText += ` ${attributeName}=\"${escapeAttribute(\"\" + attribute)}\"`;\n }\n }\n return (xmlText += !hasChildren ? \"/>\" : `>${this.children.map((c) => c.toString()).join(\"\")}`);\n }\n}\n", "let parser;\nexport function parseXML(xmlString) {\n if (!parser) {\n parser = new DOMParser();\n }\n const xmlDocument = parser.parseFromString(xmlString, \"application/xml\");\n if (xmlDocument.getElementsByTagName(\"parsererror\").length > 0) {\n throw new Error(\"DOMParser XML parsing error.\");\n }\n const xmlToObj = (node) => {\n if (node.nodeType === Node.TEXT_NODE) {\n if (node.textContent?.trim()) {\n return node.textContent;\n }\n }\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node;\n if (element.attributes.length === 0 && element.childNodes.length === 0) {\n return \"\";\n }\n const obj = {};\n const attributes = Array.from(element.attributes);\n for (const attr of attributes) {\n obj[`${attr.name}`] = attr.value;\n }\n const childNodes = Array.from(element.childNodes);\n for (const child of childNodes) {\n const childResult = xmlToObj(child);\n if (childResult != null) {\n const childName = child.nodeName;\n if (childNodes.length === 1 && attributes.length === 0 && childName === \"#text\") {\n return childResult;\n }\n if (obj[childName]) {\n if (Array.isArray(obj[childName])) {\n obj[childName].push(childResult);\n }\n else {\n obj[childName] = [obj[childName], childResult];\n }\n }\n else {\n obj[childName] = childResult;\n }\n }\n else if (childNodes.length === 1 && attributes.length === 0) {\n return element.textContent;\n }\n }\n return obj;\n }\n return null;\n };\n return {\n [xmlDocument.documentElement.nodeName]: xmlToObj(xmlDocument.documentElement),\n };\n}\n", "export * from \"./XmlNode\";\nexport * from \"./XmlText\";\nexport { parseXML } from \"./xml-parser\";\n", "import { parseXML } from \"@aws-sdk/xml-builder\";\nimport { FromStringShapeDeserializer } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { getValueFromTextNode } from \"@smithy/smithy-client\";\nimport { toUtf8 } from \"@smithy/util-utf8\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { UnionSerde } from \"../UnionSerde\";\nexport class XmlShapeDeserializer extends SerdeContextConfig {\n settings;\n stringDeserializer;\n constructor(settings) {\n super();\n this.settings = settings;\n this.stringDeserializer = new FromStringShapeDeserializer(settings);\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n this.stringDeserializer.setSerdeContext(serdeContext);\n }\n read(schema, bytes, key) {\n const ns = NormalizedSchema.of(schema);\n const memberSchemas = ns.getMemberSchemas();\n const isEventPayload = ns.isStructSchema() &&\n ns.isMemberSchema() &&\n !!Object.values(memberSchemas).find((memberNs) => {\n return !!memberNs.getMemberTraits().eventPayload;\n });\n if (isEventPayload) {\n const output = {};\n const memberName = Object.keys(memberSchemas)[0];\n const eventMemberSchema = memberSchemas[memberName];\n if (eventMemberSchema.isBlobSchema()) {\n output[memberName] = bytes;\n }\n else {\n output[memberName] = this.read(memberSchemas[memberName], bytes);\n }\n return output;\n }\n const xmlString = (this.serdeContext?.utf8Encoder ?? toUtf8)(bytes);\n const parsedObject = this.parseXml(xmlString);\n return this.readSchema(schema, key ? parsedObject[key] : parsedObject);\n }\n readSchema(_schema, value) {\n const ns = NormalizedSchema.of(_schema);\n if (ns.isUnitSchema()) {\n return;\n }\n const traits = ns.getMergedTraits();\n if (ns.isListSchema() && !Array.isArray(value)) {\n return this.readSchema(ns, [value]);\n }\n if (value == null) {\n return value;\n }\n if (typeof value === \"object\") {\n const flat = !!traits.xmlFlattened;\n if (ns.isListSchema()) {\n const listValue = ns.getValueSchema();\n const buffer = [];\n const sourceKey = listValue.getMergedTraits().xmlName ?? \"member\";\n const source = flat ? value : (value[0] ?? value)[sourceKey];\n if (source == null) {\n return buffer;\n }\n const sourceArray = Array.isArray(source) ? source : [source];\n for (const v of sourceArray) {\n buffer.push(this.readSchema(listValue, v));\n }\n return buffer;\n }\n const buffer = {};\n if (ns.isMapSchema()) {\n const keyNs = ns.getKeySchema();\n const memberNs = ns.getValueSchema();\n let entries;\n if (flat) {\n entries = Array.isArray(value) ? value : [value];\n }\n else {\n entries = Array.isArray(value.entry) ? value.entry : [value.entry];\n }\n const keyProperty = keyNs.getMergedTraits().xmlName ?? \"key\";\n const valueProperty = memberNs.getMergedTraits().xmlName ?? \"value\";\n for (const entry of entries) {\n const key = entry[keyProperty];\n const value = entry[valueProperty];\n buffer[key] = this.readSchema(memberNs, value);\n }\n return buffer;\n }\n if (ns.isStructSchema()) {\n const union = ns.isUnionSchema();\n let unionSerde;\n if (union) {\n unionSerde = new UnionSerde(value, buffer);\n }\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const memberTraits = memberSchema.getMergedTraits();\n const xmlObjectKey = !memberTraits.httpPayload\n ? memberSchema.getMemberTraits().xmlName ?? memberName\n : memberTraits.xmlName ?? memberSchema.getName();\n if (union) {\n unionSerde.mark(xmlObjectKey);\n }\n if (value[xmlObjectKey] != null) {\n buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]);\n }\n }\n if (union) {\n unionSerde.writeUnknown();\n }\n return buffer;\n }\n if (ns.isDocumentSchema()) {\n return value;\n }\n throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`);\n }\n if (ns.isListSchema()) {\n return [];\n }\n if (ns.isMapSchema() || ns.isStructSchema()) {\n return {};\n }\n return this.stringDeserializer.read(ns, value);\n }\n parseXml(xml) {\n if (xml.length) {\n let parsedObj;\n try {\n parsedObj = parseXML(xml);\n }\n catch (e) {\n if (e && typeof e === \"object\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: xml,\n });\n }\n throw e;\n }\n const textNodeName = \"#text\";\n const key = Object.keys(parsedObj)[0];\n const parsedObjToReturn = parsedObj[key];\n if (parsedObjToReturn[textNodeName]) {\n parsedObjToReturn[key] = parsedObjToReturn[textNodeName];\n delete parsedObjToReturn[textNodeName];\n }\n return getValueFromTextNode(parsedObjToReturn);\n }\n return {};\n }\n}\n", "import { determineTimestampFormat, extendedEncodeURIComponent } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { generateIdempotencyToken, NumericValue } from \"@smithy/core/serde\";\nimport { dateToUtcString } from \"@smithy/smithy-client\";\nimport { toBase64 } from \"@smithy/util-base64\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nexport class QueryShapeSerializer extends SerdeContextConfig {\n settings;\n buffer;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value, prefix = \"\") {\n if (this.buffer === undefined) {\n this.buffer = \"\";\n }\n const ns = NormalizedSchema.of(schema);\n if (prefix && !prefix.endsWith(\".\")) {\n prefix += \".\";\n }\n if (ns.isBlobSchema()) {\n if (typeof value === \"string\" || value instanceof Uint8Array) {\n this.writeKey(prefix);\n this.writeValue((this.serdeContext?.base64Encoder ?? toBase64)(value));\n }\n }\n else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) {\n if (value != null) {\n this.writeKey(prefix);\n this.writeValue(String(value));\n }\n else if (ns.isIdempotencyToken()) {\n this.writeKey(prefix);\n this.writeValue(generateIdempotencyToken());\n }\n }\n else if (ns.isBigIntegerSchema()) {\n if (value != null) {\n this.writeKey(prefix);\n this.writeValue(String(value));\n }\n }\n else if (ns.isBigDecimalSchema()) {\n if (value != null) {\n this.writeKey(prefix);\n this.writeValue(value instanceof NumericValue ? value.string : String(value));\n }\n }\n else if (ns.isTimestampSchema()) {\n if (value instanceof Date) {\n this.writeKey(prefix);\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n this.writeValue(value.toISOString().replace(\".000Z\", \"Z\"));\n break;\n case 6:\n this.writeValue(dateToUtcString(value));\n break;\n case 7:\n this.writeValue(String(value.getTime() / 1000));\n break;\n }\n }\n }\n else if (ns.isDocumentSchema()) {\n if (Array.isArray(value)) {\n this.write(64 | 15, value, prefix);\n }\n else if (value instanceof Date) {\n this.write(4, value, prefix);\n }\n else if (value instanceof Uint8Array) {\n this.write(21, value, prefix);\n }\n else if (value && typeof value === \"object\") {\n this.write(128 | 15, value, prefix);\n }\n else {\n this.writeKey(prefix);\n this.writeValue(String(value));\n }\n }\n else if (ns.isListSchema()) {\n if (Array.isArray(value)) {\n if (value.length === 0) {\n if (this.settings.serializeEmptyLists) {\n this.writeKey(prefix);\n this.writeValue(\"\");\n }\n }\n else {\n const member = ns.getValueSchema();\n const flat = this.settings.flattenLists || ns.getMergedTraits().xmlFlattened;\n let i = 1;\n for (const item of value) {\n if (item == null) {\n continue;\n }\n const traits = member.getMergedTraits();\n const suffix = this.getKey(\"member\", traits.xmlName, traits.ec2QueryName);\n const key = flat ? `${prefix}${i}` : `${prefix}${suffix}.${i}`;\n this.write(member, item, key);\n ++i;\n }\n }\n }\n }\n else if (ns.isMapSchema()) {\n if (value && typeof value === \"object\") {\n const keySchema = ns.getKeySchema();\n const memberSchema = ns.getValueSchema();\n const flat = ns.getMergedTraits().xmlFlattened;\n let i = 1;\n for (const [k, v] of Object.entries(value)) {\n if (v == null) {\n continue;\n }\n const keyTraits = keySchema.getMergedTraits();\n const keySuffix = this.getKey(\"key\", keyTraits.xmlName, keyTraits.ec2QueryName);\n const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`;\n const valTraits = memberSchema.getMergedTraits();\n const valueSuffix = this.getKey(\"value\", valTraits.xmlName, valTraits.ec2QueryName);\n const valueKey = flat ? `${prefix}${i}.${valueSuffix}` : `${prefix}entry.${i}.${valueSuffix}`;\n this.write(keySchema, k, key);\n this.write(memberSchema, v, valueKey);\n ++i;\n }\n }\n }\n else if (ns.isStructSchema()) {\n if (value && typeof value === \"object\") {\n let didWriteMember = false;\n for (const [memberName, member] of ns.structIterator()) {\n if (value[memberName] == null && !member.isIdempotencyToken()) {\n continue;\n }\n const traits = member.getMergedTraits();\n const suffix = this.getKey(memberName, traits.xmlName, traits.ec2QueryName, \"struct\");\n const key = `${prefix}${suffix}`;\n this.write(member, value[memberName], key);\n didWriteMember = true;\n }\n if (!didWriteMember && ns.isUnionSchema()) {\n const { $unknown } = value;\n if (Array.isArray($unknown)) {\n const [k, v] = $unknown;\n const key = `${prefix}${k}`;\n this.write(15, v, key);\n }\n }\n }\n }\n else if (ns.isUnitSchema()) {\n }\n else {\n throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`);\n }\n }\n flush() {\n if (this.buffer === undefined) {\n throw new Error(\"@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.\");\n }\n const str = this.buffer;\n delete this.buffer;\n return str;\n }\n getKey(memberName, xmlName, ec2QueryName, keySource) {\n const { ec2, capitalizeKeys } = this.settings;\n if (ec2 && ec2QueryName) {\n return ec2QueryName;\n }\n const key = xmlName ?? memberName;\n if (capitalizeKeys && keySource === \"struct\") {\n return key[0].toUpperCase() + key.slice(1);\n }\n return key;\n }\n writeKey(key) {\n if (key.endsWith(\".\")) {\n key = key.slice(0, key.length - 1);\n }\n this.buffer += `&${extendedEncodeURIComponent(key)}=`;\n }\n writeValue(value) {\n this.buffer += extendedEncodeURIComponent(value);\n }\n}\n", "import { collectBody, RpcProtocol } from \"@smithy/core/protocols\";\nimport { deref, NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { XmlShapeDeserializer } from \"../xml/XmlShapeDeserializer\";\nimport { QueryShapeSerializer } from \"./QueryShapeSerializer\";\nexport class AwsQueryProtocol extends RpcProtocol {\n options;\n serializer;\n deserializer;\n mixin = new ProtocolLib();\n constructor(options) {\n super({\n defaultNamespace: options.defaultNamespace,\n });\n this.options = options;\n const settings = {\n timestampFormat: {\n useTrait: true,\n default: 5,\n },\n httpBindings: false,\n xmlNamespace: options.xmlNamespace,\n serviceNamespace: options.defaultNamespace,\n serializeEmptyLists: true,\n };\n this.serializer = new QueryShapeSerializer(settings);\n this.deserializer = new XmlShapeDeserializer(settings);\n }\n getShapeId() {\n return \"aws.protocols#awsQuery\";\n }\n setSerdeContext(serdeContext) {\n this.serializer.setSerdeContext(serdeContext);\n this.deserializer.setSerdeContext(serdeContext);\n }\n getPayloadCodec() {\n throw new Error(\"AWSQuery protocol has no payload codec.\");\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n if (!request.path.endsWith(\"/\")) {\n request.path += \"/\";\n }\n Object.assign(request.headers, {\n \"content-type\": `application/x-www-form-urlencoded`,\n });\n if (deref(operationSchema.input) === \"unit\" || !request.body) {\n request.body = \"\";\n }\n const action = operationSchema.name.split(\"#\")[1] ?? operationSchema.name;\n request.body = `Action=${action}&Version=${this.options.version}` + request.body;\n if (request.body.endsWith(\"&\")) {\n request.body = request.body.slice(-1);\n }\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const shortName = operationSchema.name.split(\"#\")[1] ?? operationSchema.name;\n const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + \"Result\" : undefined;\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));\n }\n const output = {\n $metadata: this.deserializeMetadata(response),\n ...dataObject,\n };\n return output;\n }\n useNestedResult() {\n return true;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? \"Unknown\";\n const errorData = this.loadQueryError(dataObject) ?? {};\n const message = this.loadQueryErrorMessage(dataObject);\n errorData.message = message;\n errorData.Error = {\n Type: errorData.Type,\n Code: errorData.Code,\n Message: message,\n };\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, this.mixin.findQueryCompatibleError);\n const ns = NormalizedSchema.of(errorSchema);\n const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor(message);\n const output = {\n Type: errorData.Error.Type,\n Code: errorData.Error.Code,\n Error: errorData.Error,\n };\n for (const [name, member] of ns.structIterator()) {\n const target = member.getMergedTraits().xmlName ?? name;\n const value = errorData[target] ?? dataObject[target];\n output[name] = this.deserializer.readSchema(member, value);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n loadQueryErrorCode(output, data) {\n const code = (data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error)?.Code;\n if (code !== undefined) {\n return code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n }\n loadQueryError(data) {\n return data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error;\n }\n loadQueryErrorMessage(data) {\n const errorData = this.loadQueryError(data);\n return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? \"Unknown\";\n }\n getDefaultContentType() {\n return \"application/x-www-form-urlencoded\";\n }\n}\n", "import { AwsQueryProtocol } from \"./AwsQueryProtocol\";\nexport class AwsEc2QueryProtocol extends AwsQueryProtocol {\n options;\n constructor(options) {\n super(options);\n this.options = options;\n const ec2Settings = {\n capitalizeKeys: true,\n flattenLists: true,\n serializeEmptyLists: false,\n ec2: true,\n };\n Object.assign(this.serializer.settings, ec2Settings);\n }\n getShapeId() {\n return \"aws.protocols#ec2Query\";\n }\n useNestedResult() {\n return false;\n }\n}\n", "export {};\n", "import { parseXML } from \"@aws-sdk/xml-builder\";\nimport { getValueFromTextNode } from \"@smithy/smithy-client\";\nimport { collectBodyString } from \"../common\";\nexport const parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n let parsedObj;\n try {\n parsedObj = parseXML(encoded);\n }\n catch (e) {\n if (e && typeof e === \"object\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: encoded,\n });\n }\n throw e;\n }\n const textNodeName = \"#text\";\n const key = Object.keys(parsedObj)[0];\n const parsedObjToReturn = parsedObj[key];\n if (parsedObjToReturn[textNodeName]) {\n parsedObjToReturn[key] = parsedObjToReturn[textNodeName];\n delete parsedObjToReturn[textNodeName];\n }\n return getValueFromTextNode(parsedObjToReturn);\n }\n return {};\n});\nexport const parseXmlErrorBody = async (errorBody, context) => {\n const value = await parseXmlBody(errorBody, context);\n if (value.Error) {\n value.Error.message = value.Error.message ?? value.Error.Message;\n }\n return value;\n};\nexport const loadRestXmlErrorCode = (output, data) => {\n if (data?.Error?.Code !== undefined) {\n return data.Error.Code;\n }\n if (data?.Code !== undefined) {\n return data.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n};\n", "import { XmlNode, XmlText } from \"@aws-sdk/xml-builder\";\nimport { determineTimestampFormat } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { generateIdempotencyToken, NumericValue } from \"@smithy/core/serde\";\nimport { dateToUtcString } from \"@smithy/smithy-client\";\nimport { fromBase64, toBase64 } from \"@smithy/util-base64\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nexport class XmlShapeSerializer extends SerdeContextConfig {\n settings;\n stringBuffer;\n byteBuffer;\n buffer;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value) {\n const ns = NormalizedSchema.of(schema);\n if (ns.isStringSchema() && typeof value === \"string\") {\n this.stringBuffer = value;\n }\n else if (ns.isBlobSchema()) {\n this.byteBuffer =\n \"byteLength\" in value\n ? value\n : (this.serdeContext?.base64Decoder ?? fromBase64)(value);\n }\n else {\n this.buffer = this.writeStruct(ns, value, undefined);\n const traits = ns.getMergedTraits();\n if (traits.httpPayload && !traits.xmlName) {\n this.buffer.withName(ns.getName());\n }\n }\n }\n flush() {\n if (this.byteBuffer !== undefined) {\n const bytes = this.byteBuffer;\n delete this.byteBuffer;\n return bytes;\n }\n if (this.stringBuffer !== undefined) {\n const str = this.stringBuffer;\n delete this.stringBuffer;\n return str;\n }\n const buffer = this.buffer;\n if (this.settings.xmlNamespace) {\n if (!buffer?.attributes?.[\"xmlns\"]) {\n buffer.addAttribute(\"xmlns\", this.settings.xmlNamespace);\n }\n }\n delete this.buffer;\n return buffer.toString();\n }\n writeStruct(ns, value, parentXmlns) {\n const traits = ns.getMergedTraits();\n const name = ns.isMemberSchema() && !traits.httpPayload\n ? ns.getMemberTraits().xmlName ?? ns.getMemberName()\n : traits.xmlName ?? ns.getName();\n if (!name || !ns.isStructSchema()) {\n throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${ns.getName(true)}.`);\n }\n const structXmlNode = XmlNode.of(name);\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const val = value[memberName];\n if (val != null || memberSchema.isIdempotencyToken()) {\n if (memberSchema.getMergedTraits().xmlAttribute) {\n structXmlNode.addAttribute(memberSchema.getMergedTraits().xmlName ?? memberName, this.writeSimple(memberSchema, val));\n continue;\n }\n if (memberSchema.isListSchema()) {\n this.writeList(memberSchema, val, structXmlNode, xmlns);\n }\n else if (memberSchema.isMapSchema()) {\n this.writeMap(memberSchema, val, structXmlNode, xmlns);\n }\n else if (memberSchema.isStructSchema()) {\n structXmlNode.addChildNode(this.writeStruct(memberSchema, val, xmlns));\n }\n else {\n const memberNode = XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName());\n this.writeSimpleInto(memberSchema, val, memberNode, xmlns);\n structXmlNode.addChildNode(memberNode);\n }\n }\n }\n const { $unknown } = value;\n if ($unknown && ns.isUnionSchema() && Array.isArray($unknown) && Object.keys(value).length === 1) {\n const [k, v] = $unknown;\n const node = XmlNode.of(k);\n if (typeof v !== \"string\") {\n if (value instanceof XmlNode || value instanceof XmlText) {\n structXmlNode.addChildNode(value);\n }\n else {\n throw new Error(`@aws-sdk - $unknown union member in XML requires ` +\n `value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`);\n }\n }\n this.writeSimpleInto(0, v, node, xmlns);\n structXmlNode.addChildNode(node);\n }\n if (xmlns) {\n structXmlNode.addAttribute(xmlnsAttr, xmlns);\n }\n return structXmlNode;\n }\n writeList(listMember, array, container, parentXmlns) {\n if (!listMember.isMemberSchema()) {\n throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${listMember.getName(true)}`);\n }\n const listTraits = listMember.getMergedTraits();\n const listValueSchema = listMember.getValueSchema();\n const listValueTraits = listValueSchema.getMergedTraits();\n const sparse = !!listValueTraits.sparse;\n const flat = !!listTraits.xmlFlattened;\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(listMember, parentXmlns);\n const writeItem = (container, value) => {\n if (listValueSchema.isListSchema()) {\n this.writeList(listValueSchema, Array.isArray(value) ? value : [value], container, xmlns);\n }\n else if (listValueSchema.isMapSchema()) {\n this.writeMap(listValueSchema, value, container, xmlns);\n }\n else if (listValueSchema.isStructSchema()) {\n const struct = this.writeStruct(listValueSchema, value, xmlns);\n container.addChildNode(struct.withName(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? \"member\"));\n }\n else {\n const listItemNode = XmlNode.of(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? \"member\");\n this.writeSimpleInto(listValueSchema, value, listItemNode, xmlns);\n container.addChildNode(listItemNode);\n }\n };\n if (flat) {\n for (const value of array) {\n if (sparse || value != null) {\n writeItem(container, value);\n }\n }\n }\n else {\n const listNode = XmlNode.of(listTraits.xmlName ?? listMember.getMemberName());\n if (xmlns) {\n listNode.addAttribute(xmlnsAttr, xmlns);\n }\n for (const value of array) {\n if (sparse || value != null) {\n writeItem(listNode, value);\n }\n }\n container.addChildNode(listNode);\n }\n }\n writeMap(mapMember, map, container, parentXmlns, containerIsMap = false) {\n if (!mapMember.isMemberSchema()) {\n throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}`);\n }\n const mapTraits = mapMember.getMergedTraits();\n const mapKeySchema = mapMember.getKeySchema();\n const mapKeyTraits = mapKeySchema.getMergedTraits();\n const keyTag = mapKeyTraits.xmlName ?? \"key\";\n const mapValueSchema = mapMember.getValueSchema();\n const mapValueTraits = mapValueSchema.getMergedTraits();\n const valueTag = mapValueTraits.xmlName ?? \"value\";\n const sparse = !!mapValueTraits.sparse;\n const flat = !!mapTraits.xmlFlattened;\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(mapMember, parentXmlns);\n const addKeyValue = (entry, key, val) => {\n const keyNode = XmlNode.of(keyTag, key);\n const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns);\n if (keyXmlns) {\n keyNode.addAttribute(keyXmlnsAttr, keyXmlns);\n }\n entry.addChildNode(keyNode);\n let valueNode = XmlNode.of(valueTag);\n if (mapValueSchema.isListSchema()) {\n this.writeList(mapValueSchema, val, valueNode, xmlns);\n }\n else if (mapValueSchema.isMapSchema()) {\n this.writeMap(mapValueSchema, val, valueNode, xmlns, true);\n }\n else if (mapValueSchema.isStructSchema()) {\n valueNode = this.writeStruct(mapValueSchema, val, xmlns);\n }\n else {\n this.writeSimpleInto(mapValueSchema, val, valueNode, xmlns);\n }\n entry.addChildNode(valueNode);\n };\n if (flat) {\n for (const [key, val] of Object.entries(map)) {\n if (sparse || val != null) {\n const entry = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());\n addKeyValue(entry, key, val);\n container.addChildNode(entry);\n }\n }\n }\n else {\n let mapNode;\n if (!containerIsMap) {\n mapNode = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());\n if (xmlns) {\n mapNode.addAttribute(xmlnsAttr, xmlns);\n }\n container.addChildNode(mapNode);\n }\n for (const [key, val] of Object.entries(map)) {\n if (sparse || val != null) {\n const entry = XmlNode.of(\"entry\");\n addKeyValue(entry, key, val);\n (containerIsMap ? container : mapNode).addChildNode(entry);\n }\n }\n }\n }\n writeSimple(_schema, value) {\n if (null === value) {\n throw new Error(\"@aws-sdk/core/protocols - (XML serializer) cannot write null value.\");\n }\n const ns = NormalizedSchema.of(_schema);\n let nodeContents = null;\n if (value && typeof value === \"object\") {\n if (ns.isBlobSchema()) {\n nodeContents = (this.serdeContext?.base64Encoder ?? toBase64)(value);\n }\n else if (ns.isTimestampSchema() && value instanceof Date) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n nodeContents = value.toISOString().replace(\".000Z\", \"Z\");\n break;\n case 6:\n nodeContents = dateToUtcString(value);\n break;\n case 7:\n nodeContents = String(value.getTime() / 1000);\n break;\n default:\n console.warn(\"Missing timestamp format, using http date\", value);\n nodeContents = dateToUtcString(value);\n break;\n }\n }\n else if (ns.isBigDecimalSchema() && value) {\n if (value instanceof NumericValue) {\n return value.string;\n }\n return String(value);\n }\n else if (ns.isMapSchema() || ns.isListSchema()) {\n throw new Error(\"@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead.\");\n }\n else {\n throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${ns.getName(true)}`);\n }\n }\n if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {\n nodeContents = String(value);\n }\n if (ns.isStringSchema()) {\n if (value === undefined && ns.isIdempotencyToken()) {\n nodeContents = generateIdempotencyToken();\n }\n else {\n nodeContents = String(value);\n }\n }\n if (nodeContents === null) {\n throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`);\n }\n return nodeContents;\n }\n writeSimpleInto(_schema, value, into, parentXmlns) {\n const nodeContents = this.writeSimple(_schema, value);\n const ns = NormalizedSchema.of(_schema);\n const content = new XmlText(nodeContents);\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);\n if (xmlns) {\n into.addAttribute(xmlnsAttr, xmlns);\n }\n into.addChildNode(content);\n }\n getXmlnsAttribute(ns, parentXmlns) {\n const traits = ns.getMergedTraits();\n const [prefix, xmlns] = traits.xmlNamespace ?? [];\n if (xmlns && xmlns !== parentXmlns) {\n return [prefix ? `xmlns:${prefix}` : \"xmlns\", xmlns];\n }\n return [void 0, void 0];\n }\n}\n", "import { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { XmlShapeDeserializer } from \"./XmlShapeDeserializer\";\nimport { XmlShapeSerializer } from \"./XmlShapeSerializer\";\nexport class XmlCodec extends SerdeContextConfig {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n createSerializer() {\n const serializer = new XmlShapeSerializer(this.settings);\n serializer.setSerdeContext(this.serdeContext);\n return serializer;\n }\n createDeserializer() {\n const deserializer = new XmlShapeDeserializer(this.settings);\n deserializer.setSerdeContext(this.serdeContext);\n return deserializer;\n }\n}\n", "import { HttpBindingProtocol, HttpInterceptingShapeDeserializer, HttpInterceptingShapeSerializer, } from \"@smithy/core/protocols\";\nimport { NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { loadRestXmlErrorCode } from \"./parseXmlBody\";\nimport { XmlCodec } from \"./XmlCodec\";\nexport class AwsRestXmlProtocol extends HttpBindingProtocol {\n codec;\n serializer;\n deserializer;\n mixin = new ProtocolLib();\n constructor(options) {\n super(options);\n const settings = {\n timestampFormat: {\n useTrait: true,\n default: 5,\n },\n httpBindings: true,\n xmlNamespace: options.xmlNamespace,\n serviceNamespace: options.defaultNamespace,\n };\n this.codec = new XmlCodec(settings);\n this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);\n this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);\n }\n getPayloadCodec() {\n return this.codec;\n }\n getShapeId() {\n return \"aws.protocols#restXml\";\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n const inputSchema = NormalizedSchema.of(operationSchema.input);\n if (!request.headers[\"content-type\"]) {\n const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);\n if (contentType) {\n request.headers[\"content-type\"] = contentType;\n }\n }\n if (typeof request.body === \"string\" &&\n request.headers[\"content-type\"] === this.getDefaultContentType() &&\n !request.body.startsWith(\"' + request.body;\n }\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n return super.deserializeResponse(operationSchema, context, response);\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? \"Unknown\";\n if (dataObject.Error && typeof dataObject.Error === \"object\") {\n for (const key of Object.keys(dataObject.Error)) {\n dataObject[key] = dataObject.Error[key];\n if (key.toLowerCase() === \"message\") {\n dataObject.message = dataObject.Error[key];\n }\n }\n }\n if (dataObject.RequestId && !metadata.requestId) {\n metadata.requestId = dataObject.RequestId;\n }\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);\n const ns = NormalizedSchema.of(errorSchema);\n const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor(message);\n await this.deserializeHttpMessage(errorSchema, context, response, dataObject);\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n const target = member.getMergedTraits().xmlName ?? name;\n const value = dataObject.Error?.[target] ?? dataObject[target];\n output[name] = this.codec.createDeserializer().readSchema(member, value);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n getDefaultContentType() {\n return \"application/xml\";\n }\n hasUnstructuredPayloadBinding(ns) {\n for (const [, member] of ns.structIterator()) {\n if (member.getMergedTraits().httpPayload) {\n return !(member.isStructSchema() || member.isMapSchema() || member.isListSchema());\n }\n }\n return false;\n }\n}\n", "export * from \"./cbor/AwsSmithyRpcV2CborProtocol\";\nexport * from \"./coercing-serializers\";\nexport * from \"./json/AwsJson1_0Protocol\";\nexport * from \"./json/AwsJson1_1Protocol\";\nexport * from \"./json/AwsJsonRpcProtocol\";\nexport * from \"./json/AwsRestJsonProtocol\";\nexport * from \"./json/JsonCodec\";\nexport * from \"./json/JsonShapeDeserializer\";\nexport * from \"./json/JsonShapeSerializer\";\nexport * from \"./json/awsExpectUnion\";\nexport * from \"./json/parseJsonBody\";\nexport * from \"./query/AwsEc2QueryProtocol\";\nexport * from \"./query/AwsQueryProtocol\";\nexport * from \"./query/QuerySerializerSettings\";\nexport * from \"./query/QueryShapeSerializer\";\nexport * from \"./xml/AwsRestXmlProtocol\";\nexport * from \"./xml/XmlCodec\";\nexport * from \"./xml/XmlShapeDeserializer\";\nexport * from \"./xml/XmlShapeSerializer\";\nexport * from \"./xml/parseXmlBody\";\n", "export * from \"./submodules/client/index\";\nexport * from \"./submodules/httpAuthSchemes/index\";\nexport * from \"./submodules/protocols/index\";\n", "import { DEFAULT_CHECKSUM_ALGORITHM, RequestChecksumCalculation } from \"./constants\";\nexport const getChecksumAlgorithmForRequest = (input, { requestChecksumRequired, requestAlgorithmMember, requestChecksumCalculation }) => {\n if (!requestAlgorithmMember) {\n return requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired\n ? DEFAULT_CHECKSUM_ALGORITHM\n : undefined;\n }\n if (!input[requestAlgorithmMember]) {\n return undefined;\n }\n const checksumAlgorithm = input[requestAlgorithmMember];\n return checksumAlgorithm;\n};\n", "import { ChecksumAlgorithm } from \"./constants\";\nexport const getChecksumLocationName = (algorithm) => algorithm === ChecksumAlgorithm.MD5 ? \"content-md5\" : `x-amz-checksum-${algorithm.toLowerCase()}`;\n", "export const hasHeader = (header, headers) => {\n const soughtHeader = header.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true;\n }\n }\n return false;\n};\n", "export const hasHeaderWithPrefix = (headerPrefix, headers) => {\n const soughtHeaderPrefix = headerPrefix.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (headerName.toLowerCase().startsWith(soughtHeaderPrefix)) {\n return true;\n }\n }\n return false;\n};\n", "import { isArrayBuffer } from \"@smithy/is-array-buffer\";\nexport const isStreaming = (body) => body !== undefined && typeof body !== \"string\" && !ArrayBuffer.isView(body) && !isArrayBuffer(body);\n", "/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n", "export const fromUtf8 = (input) => new TextEncoder().encode(input);\n", "import { fromUtf8 } from \"./fromUtf8\";\nexport const toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n", "export const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return new TextDecoder(\"utf-8\").decode(input);\n};\n", "export * from \"./fromUtf8\";\nexport * from \"./toUint8Array\";\nexport * from \"./toUtf8\";\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SourceData } from \"@aws-sdk/types\";\nimport { fromUtf8 as fromUtf8Browser } from \"@smithy/util-utf8\";\n\n// Quick polyfill\nconst fromUtf8 =\n typeof Buffer !== \"undefined\" && Buffer.from\n ? (input: string) => Buffer.from(input, \"utf8\")\n : fromUtf8Browser;\n\nexport function convertToBuffer(data: SourceData): Uint8Array {\n // Already a Uint8, do nothing\n if (data instanceof Uint8Array) return data;\n\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(\n data.buffer,\n data.byteOffset,\n data.byteLength / Uint8Array.BYTES_PER_ELEMENT\n );\n }\n\n return new Uint8Array(data);\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SourceData } from \"@aws-sdk/types\";\n\nexport function isEmptyData(data: SourceData): boolean {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n\n return data.byteLength === 0;\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function numToUint8(num: number) {\n return new Uint8Array([\n (num & 0xff000000) >> 24,\n (num & 0x00ff0000) >> 16,\n (num & 0x0000ff00) >> 8,\n num & 0x000000ff,\n ]);\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n// IE 11 does not support Array.from, so we do it manually\nexport function uint32ArrayFrom(a_lookUpTable: Array): Uint32Array {\n if (!Uint32Array.from) {\n const return_array = new Uint32Array(a_lookUpTable.length)\n let a_index = 0\n while (a_index < a_lookUpTable.length) {\n return_array[a_index] = a_lookUpTable[a_index]\n a_index += 1\n }\n return return_array\n }\n return Uint32Array.from(a_lookUpTable)\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport { convertToBuffer } from \"./convertToBuffer\";\nexport { isEmptyData } from \"./isEmptyData\";\nexport { numToUint8 } from \"./numToUint8\";\nexport {uint32ArrayFrom} from './uint32ArrayFrom';\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { convertToBuffer, isEmptyData, numToUint8 } from \"@aws-crypto/util\";\nimport { Crc32c } from \"./index\";\n\nexport class AwsCrc32c implements Checksum {\n private crc32c = new Crc32c();\n\n update(toHash: SourceData) {\n if (isEmptyData(toHash)) return;\n\n this.crc32c.update(convertToBuffer(toHash));\n }\n\n async digest(): Promise {\n return numToUint8(this.crc32c.digest());\n }\n\n reset(): void {\n this.crc32c = new Crc32c();\n }\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport {uint32ArrayFrom} from \"@aws-crypto/util\";\n\nexport function crc32c(data: Uint8Array): number {\n return new Crc32c().update(data).digest();\n}\n\nexport class Crc32c {\n private checksum = 0xffffffff;\n\n update(data: Uint8Array): this {\n for (const byte of data) {\n this.checksum =\n (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff];\n }\n\n return this;\n }\n\n digest(): number {\n return (this.checksum ^ 0xffffffff) >>> 0;\n }\n}\n\n// prettier-ignore\nconst a_lookupTable = [\n 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB,\n 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24,\n 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B, 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384,\n 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B,\n 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A, 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35,\n 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5, 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA,\n 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45, 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A,\n 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595,\n 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957,\n 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198,\n 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38,\n 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8, 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7,\n 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096, 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789,\n 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859, 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46,\n 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6,\n 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829,\n 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93,\n 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C,\n 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3, 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC,\n 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C, 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033,\n 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652, 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D,\n 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982,\n 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622,\n 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED,\n 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F,\n 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF, 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0,\n 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F, 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540,\n 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90, 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F,\n 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1,\n 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E,\n 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E,\n 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351,\n];\n\nconst lookupTable: Uint32Array = uint32ArrayFrom(a_lookupTable)\nexport { AwsCrc32c } from \"./aws_crc32c\";\n", "const generateCRC64NVMETable = () => {\n const sliceLength = 8;\n const tables = new Array(sliceLength);\n for (let slice = 0; slice < sliceLength; slice++) {\n const table = new Array(512);\n for (let i = 0; i < 256; i++) {\n let crc = BigInt(i);\n for (let j = 0; j < 8 * (slice + 1); j++) {\n if (crc & 1n) {\n crc = (crc >> 1n) ^ 0x9a6c9329ac4bc9b5n;\n }\n else {\n crc = crc >> 1n;\n }\n }\n table[i * 2] = Number((crc >> 32n) & 0xffffffffn);\n table[i * 2 + 1] = Number(crc & 0xffffffffn);\n }\n tables[slice] = new Uint32Array(table);\n }\n return tables;\n};\nlet CRC64_NVME_REVERSED_TABLE;\nlet t0, t1, t2, t3;\nlet t4, t5, t6, t7;\nconst ensureTablesInitialized = () => {\n if (!CRC64_NVME_REVERSED_TABLE) {\n CRC64_NVME_REVERSED_TABLE = generateCRC64NVMETable();\n [t0, t1, t2, t3, t4, t5, t6, t7] = CRC64_NVME_REVERSED_TABLE;\n }\n};\nexport class Crc64Nvme {\n c1 = 0;\n c2 = 0;\n constructor() {\n ensureTablesInitialized();\n this.reset();\n }\n update(data) {\n const len = data.length;\n let i = 0;\n let crc1 = this.c1;\n let crc2 = this.c2;\n while (i + 8 <= len) {\n const idx0 = ((crc2 ^ data[i++]) & 255) << 1;\n const idx1 = (((crc2 >>> 8) ^ data[i++]) & 255) << 1;\n const idx2 = (((crc2 >>> 16) ^ data[i++]) & 255) << 1;\n const idx3 = (((crc2 >>> 24) ^ data[i++]) & 255) << 1;\n const idx4 = ((crc1 ^ data[i++]) & 255) << 1;\n const idx5 = (((crc1 >>> 8) ^ data[i++]) & 255) << 1;\n const idx6 = (((crc1 >>> 16) ^ data[i++]) & 255) << 1;\n const idx7 = (((crc1 >>> 24) ^ data[i++]) & 255) << 1;\n crc1 = t7[idx0] ^ t6[idx1] ^ t5[idx2] ^ t4[idx3] ^ t3[idx4] ^ t2[idx5] ^ t1[idx6] ^ t0[idx7];\n crc2 =\n t7[idx0 + 1] ^\n t6[idx1 + 1] ^\n t5[idx2 + 1] ^\n t4[idx3 + 1] ^\n t3[idx4 + 1] ^\n t2[idx5 + 1] ^\n t1[idx6 + 1] ^\n t0[idx7 + 1];\n }\n while (i < len) {\n const idx = ((crc2 ^ data[i]) & 255) << 1;\n crc2 = ((crc2 >>> 8) | ((crc1 & 255) << 24)) >>> 0;\n crc1 = (crc1 >>> 8) ^ t0[idx];\n crc2 ^= t0[idx + 1];\n i++;\n }\n this.c1 = crc1;\n this.c2 = crc2;\n }\n async digest() {\n const c1 = this.c1 ^ 4294967295;\n const c2 = this.c2 ^ 4294967295;\n return new Uint8Array([\n c1 >>> 24,\n (c1 >>> 16) & 255,\n (c1 >>> 8) & 255,\n c1 & 255,\n c2 >>> 24,\n (c2 >>> 16) & 255,\n (c2 >>> 8) & 255,\n c2 & 255,\n ]);\n }\n reset() {\n this.c1 = 4294967295;\n this.c2 = 4294967295;\n }\n}\n", "export const crc64NvmeCrtContainer = {\n CrtCrc64Nvme: null,\n};\n", "export * from \"./Crc64Nvme\";\nexport * from \"./crc64-nvme-crt-container\";\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SourceData, Checksum } from \"@aws-sdk/types\";\nimport { convertToBuffer, isEmptyData, numToUint8 } from \"@aws-crypto/util\";\nimport { Crc32 } from \"./index\";\n\nexport class AwsCrc32 implements Checksum {\n private crc32 = new Crc32();\n\n update(toHash: SourceData) {\n if (isEmptyData(toHash)) return;\n\n this.crc32.update(convertToBuffer(toHash));\n }\n\n async digest(): Promise {\n return numToUint8(this.crc32.digest());\n }\n\n reset(): void {\n this.crc32 = new Crc32();\n }\n}\n", "import {uint32ArrayFrom} from \"@aws-crypto/util\";\n\nexport function crc32(data: Uint8Array): number {\n return new Crc32().update(data).digest();\n}\n\nexport class Crc32 {\n private checksum = 0xffffffff;\n\n update(data: Uint8Array): this {\n for (const byte of data) {\n this.checksum =\n (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff];\n }\n\n return this;\n }\n\n digest(): number {\n return (this.checksum ^ 0xffffffff) >>> 0;\n }\n}\n\n// prettier-ignore\nconst a_lookUpTable = [\n 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,\n 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,\n 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,\n 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,\n 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,\n 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,\n 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,\n 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,\n 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,\n 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,\n 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,\n 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,\n 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,\n 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,\n 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,\n 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,\n 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,\n 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,\n 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,\n 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,\n 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,\n 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,\n 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,\n 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,\n 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,\n 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,\n 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,\n 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,\n 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,\n 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,\n 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,\n 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,\n 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,\n 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,\n 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,\n 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,\n 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,\n 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,\n 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,\n 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,\n 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,\n 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,\n 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,\n 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,\n 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,\n 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,\n 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,\n 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,\n 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,\n 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,\n 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,\n 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,\n 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,\n 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,\n 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,\n 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,\n 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,\n 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,\n 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,\n 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,\n 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,\n 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,\n 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,\n 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D,\n];\nconst lookupTable: Uint32Array = uint32ArrayFrom(a_lookUpTable)\nexport { AwsCrc32 } from \"./aws_crc32\";\n", "import { AwsCrc32 } from \"@aws-crypto/crc32\";\nexport const getCrc32ChecksumAlgorithmFunction = () => AwsCrc32;\n", "import { ChecksumAlgorithm } from \"./constants\";\nexport const CLIENT_SUPPORTED_ALGORITHMS = [\n ChecksumAlgorithm.CRC32,\n ChecksumAlgorithm.CRC32C,\n ChecksumAlgorithm.CRC64NVME,\n ChecksumAlgorithm.SHA1,\n ChecksumAlgorithm.SHA256,\n];\nexport const PRIORITY_ORDER_ALGORITHMS = [\n ChecksumAlgorithm.SHA256,\n ChecksumAlgorithm.SHA1,\n ChecksumAlgorithm.CRC32,\n ChecksumAlgorithm.CRC32C,\n ChecksumAlgorithm.CRC64NVME,\n];\n", "import { AwsCrc32c } from \"@aws-crypto/crc32c\";\nimport { Crc64Nvme, crc64NvmeCrtContainer } from \"@aws-sdk/crc64-nvme\";\nimport { ChecksumAlgorithm } from \"./constants\";\nimport { getCrc32ChecksumAlgorithmFunction } from \"./getCrc32ChecksumAlgorithmFunction\";\nimport { CLIENT_SUPPORTED_ALGORITHMS } from \"./types\";\nexport const selectChecksumAlgorithmFunction = (checksumAlgorithm, config) => {\n const { checksumAlgorithms = {} } = config;\n switch (checksumAlgorithm) {\n case ChecksumAlgorithm.MD5:\n return checksumAlgorithms?.MD5 ?? config.md5;\n case ChecksumAlgorithm.CRC32:\n return checksumAlgorithms?.CRC32 ?? getCrc32ChecksumAlgorithmFunction();\n case ChecksumAlgorithm.CRC32C:\n return checksumAlgorithms?.CRC32C ?? AwsCrc32c;\n case ChecksumAlgorithm.CRC64NVME:\n if (typeof crc64NvmeCrtContainer.CrtCrc64Nvme !== \"function\") {\n return checksumAlgorithms?.CRC64NVME ?? Crc64Nvme;\n }\n return checksumAlgorithms?.CRC64NVME ?? crc64NvmeCrtContainer.CrtCrc64Nvme;\n case ChecksumAlgorithm.SHA1:\n return checksumAlgorithms?.SHA1 ?? config.sha1;\n case ChecksumAlgorithm.SHA256:\n return checksumAlgorithms?.SHA256 ?? config.sha256;\n default:\n if (checksumAlgorithms?.[checksumAlgorithm]) {\n return checksumAlgorithms[checksumAlgorithm];\n }\n throw new Error(`The checksum algorithm \"${checksumAlgorithm}\" is not supported by the client.` +\n ` Select one of ${CLIENT_SUPPORTED_ALGORITHMS}, or provide an implementation to ` +\n ` the client constructor checksums field.`);\n }\n};\n", "import { toUint8Array } from \"@smithy/util-utf8\";\nexport const stringHasher = (checksumAlgorithmFn, body) => {\n const hash = new checksumAlgorithmFn();\n hash.update(toUint8Array(body || \"\"));\n return hash.digest();\n};\n", "import { setFeature } from \"@aws-sdk/core\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { createBufferedReadable } from \"@smithy/util-stream\";\nimport { ChecksumAlgorithm, DEFAULT_CHECKSUM_ALGORITHM, RequestChecksumCalculation } from \"./constants\";\nimport { getChecksumAlgorithmForRequest } from \"./getChecksumAlgorithmForRequest\";\nimport { getChecksumLocationName } from \"./getChecksumLocationName\";\nimport { hasHeader } from \"./hasHeader\";\nimport { hasHeaderWithPrefix } from \"./hasHeaderWithPrefix\";\nimport { isStreaming } from \"./isStreaming\";\nimport { selectChecksumAlgorithmFunction } from \"./selectChecksumAlgorithmFunction\";\nimport { stringHasher } from \"./stringHasher\";\nexport const flexibleChecksumsMiddlewareOptions = {\n name: \"flexibleChecksumsMiddleware\",\n step: \"build\",\n tags: [\"BODY_CHECKSUM\"],\n override: true,\n};\nexport const flexibleChecksumsMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {\n if (!HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n if (hasHeaderWithPrefix(\"x-amz-checksum-\", args.request.headers)) {\n return next(args);\n }\n const { request, input } = args;\n const { body: requestBody, headers } = request;\n const { base64Encoder, streamHasher } = config;\n const { requestChecksumRequired, requestAlgorithmMember } = middlewareConfig;\n const requestChecksumCalculation = await config.requestChecksumCalculation();\n const requestAlgorithmMemberName = requestAlgorithmMember?.name;\n const requestAlgorithmMemberHttpHeader = requestAlgorithmMember?.httpHeader;\n if (requestAlgorithmMemberName && !input[requestAlgorithmMemberName]) {\n if (requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired) {\n input[requestAlgorithmMemberName] = DEFAULT_CHECKSUM_ALGORITHM;\n if (requestAlgorithmMemberHttpHeader) {\n headers[requestAlgorithmMemberHttpHeader] = DEFAULT_CHECKSUM_ALGORITHM;\n }\n }\n }\n const checksumAlgorithm = getChecksumAlgorithmForRequest(input, {\n requestChecksumRequired,\n requestAlgorithmMember: requestAlgorithmMember?.name,\n requestChecksumCalculation,\n });\n let updatedBody = requestBody;\n let updatedHeaders = headers;\n if (checksumAlgorithm) {\n switch (checksumAlgorithm) {\n case ChecksumAlgorithm.CRC32:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_CRC32\", \"U\");\n break;\n case ChecksumAlgorithm.CRC32C:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_CRC32C\", \"V\");\n break;\n case ChecksumAlgorithm.CRC64NVME:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_CRC64\", \"W\");\n break;\n case ChecksumAlgorithm.SHA1:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_SHA1\", \"X\");\n break;\n case ChecksumAlgorithm.SHA256:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_SHA256\", \"Y\");\n break;\n }\n const checksumLocationName = getChecksumLocationName(checksumAlgorithm);\n const checksumAlgorithmFn = selectChecksumAlgorithmFunction(checksumAlgorithm, config);\n if (isStreaming(requestBody)) {\n const { getAwsChunkedEncodingStream, bodyLengthChecker } = config;\n updatedBody = getAwsChunkedEncodingStream(typeof config.requestStreamBufferSize === \"number\" && config.requestStreamBufferSize >= 8 * 1024\n ? createBufferedReadable(requestBody, config.requestStreamBufferSize, context.logger)\n : requestBody, {\n base64Encoder,\n bodyLengthChecker,\n checksumLocationName,\n checksumAlgorithmFn,\n streamHasher,\n });\n updatedHeaders = {\n ...headers,\n \"content-encoding\": headers[\"content-encoding\"]\n ? `${headers[\"content-encoding\"]},aws-chunked`\n : \"aws-chunked\",\n \"transfer-encoding\": \"chunked\",\n \"x-amz-decoded-content-length\": headers[\"content-length\"],\n \"x-amz-content-sha256\": \"STREAMING-UNSIGNED-PAYLOAD-TRAILER\",\n \"x-amz-trailer\": checksumLocationName,\n };\n delete updatedHeaders[\"content-length\"];\n }\n else if (!hasHeader(checksumLocationName, headers)) {\n const rawChecksum = await stringHasher(checksumAlgorithmFn, requestBody);\n updatedHeaders = {\n ...headers,\n [checksumLocationName]: base64Encoder(rawChecksum),\n };\n }\n }\n try {\n const result = await next({\n ...args,\n request: {\n ...request,\n headers: updatedHeaders,\n body: updatedBody,\n },\n });\n return result;\n }\n catch (e) {\n if (e instanceof Error && e.name === \"InvalidChunkSizeError\") {\n try {\n if (!e.message.endsWith(\".\")) {\n e.message += \".\";\n }\n e.message +=\n \" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream.\";\n }\n catch (ignored) {\n }\n }\n throw e;\n }\n};\n", "import { setFeature } from \"@aws-sdk/core\";\nimport { RequestChecksumCalculation, ResponseChecksumValidation } from \"./constants\";\nexport const flexibleChecksumsInputMiddlewareOptions = {\n name: \"flexibleChecksumsInputMiddleware\",\n toMiddleware: \"serializerMiddleware\",\n relation: \"before\",\n tags: [\"BODY_CHECKSUM\"],\n override: true,\n};\nexport const flexibleChecksumsInputMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {\n const input = args.input;\n const { requestValidationModeMember } = middlewareConfig;\n const requestChecksumCalculation = await config.requestChecksumCalculation();\n const responseChecksumValidation = await config.responseChecksumValidation();\n switch (requestChecksumCalculation) {\n case RequestChecksumCalculation.WHEN_REQUIRED:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED\", \"a\");\n break;\n case RequestChecksumCalculation.WHEN_SUPPORTED:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED\", \"Z\");\n break;\n }\n switch (responseChecksumValidation) {\n case ResponseChecksumValidation.WHEN_REQUIRED:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED\", \"c\");\n break;\n case ResponseChecksumValidation.WHEN_SUPPORTED:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED\", \"b\");\n break;\n }\n if (requestValidationModeMember && !input[requestValidationModeMember]) {\n if (responseChecksumValidation === ResponseChecksumValidation.WHEN_SUPPORTED) {\n input[requestValidationModeMember] = \"ENABLED\";\n }\n }\n return next(args);\n};\n", "import { CLIENT_SUPPORTED_ALGORITHMS, PRIORITY_ORDER_ALGORITHMS } from \"./types\";\nexport const getChecksumAlgorithmListForResponse = (responseAlgorithms = []) => {\n const validChecksumAlgorithms = [];\n for (const algorithm of PRIORITY_ORDER_ALGORITHMS) {\n if (!responseAlgorithms.includes(algorithm) || !CLIENT_SUPPORTED_ALGORITHMS.includes(algorithm)) {\n continue;\n }\n validChecksumAlgorithms.push(algorithm);\n }\n return validChecksumAlgorithms;\n};\n", "export const isChecksumWithPartNumber = (checksum) => {\n const lastHyphenIndex = checksum.lastIndexOf(\"-\");\n if (lastHyphenIndex !== -1) {\n const numberPart = checksum.slice(lastHyphenIndex + 1);\n if (!numberPart.startsWith(\"0\")) {\n const number = parseInt(numberPart, 10);\n if (!isNaN(number) && number >= 1 && number <= 10000) {\n return true;\n }\n }\n }\n return false;\n};\n", "import { stringHasher } from \"./stringHasher\";\nexport const getChecksum = async (body, { checksumAlgorithmFn, base64Encoder }) => base64Encoder(await stringHasher(checksumAlgorithmFn, body));\n", "import { createChecksumStream } from \"@smithy/util-stream\";\nimport { ChecksumAlgorithm } from \"./constants\";\nimport { getChecksum } from \"./getChecksum\";\nimport { getChecksumAlgorithmListForResponse } from \"./getChecksumAlgorithmListForResponse\";\nimport { getChecksumLocationName } from \"./getChecksumLocationName\";\nimport { isStreaming } from \"./isStreaming\";\nimport { selectChecksumAlgorithmFunction } from \"./selectChecksumAlgorithmFunction\";\nexport const validateChecksumFromResponse = async (response, { config, responseAlgorithms, logger }) => {\n const checksumAlgorithms = getChecksumAlgorithmListForResponse(responseAlgorithms);\n const { body: responseBody, headers: responseHeaders } = response;\n for (const algorithm of checksumAlgorithms) {\n const responseHeader = getChecksumLocationName(algorithm);\n const checksumFromResponse = responseHeaders[responseHeader];\n if (checksumFromResponse) {\n let checksumAlgorithmFn;\n try {\n checksumAlgorithmFn = selectChecksumAlgorithmFunction(algorithm, config);\n }\n catch (error) {\n if (algorithm === ChecksumAlgorithm.CRC64NVME) {\n logger?.warn(`Skipping ${ChecksumAlgorithm.CRC64NVME} checksum validation: ${error.message}`);\n continue;\n }\n throw error;\n }\n const { base64Encoder } = config;\n if (isStreaming(responseBody)) {\n response.body = createChecksumStream({\n expectedChecksum: checksumFromResponse,\n checksumSourceLocation: responseHeader,\n checksum: new checksumAlgorithmFn(),\n source: responseBody,\n base64Encoder,\n });\n return;\n }\n const checksum = await getChecksum(responseBody, { checksumAlgorithmFn, base64Encoder });\n if (checksum === checksumFromResponse) {\n break;\n }\n throw new Error(`Checksum mismatch: expected \"${checksum}\" but received \"${checksumFromResponse}\"` +\n ` in response header \"${responseHeader}\".`);\n }\n }\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { getChecksumAlgorithmListForResponse } from \"./getChecksumAlgorithmListForResponse\";\nimport { getChecksumLocationName } from \"./getChecksumLocationName\";\nimport { isChecksumWithPartNumber } from \"./isChecksumWithPartNumber\";\nimport { validateChecksumFromResponse } from \"./validateChecksumFromResponse\";\nexport const flexibleChecksumsResponseMiddlewareOptions = {\n name: \"flexibleChecksumsResponseMiddleware\",\n toMiddleware: \"deserializerMiddleware\",\n relation: \"after\",\n tags: [\"BODY_CHECKSUM\"],\n override: true,\n};\nexport const flexibleChecksumsResponseMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {\n if (!HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n const input = args.input;\n const result = await next(args);\n const response = result.response;\n const { requestValidationModeMember, responseAlgorithms } = middlewareConfig;\n if (requestValidationModeMember && input[requestValidationModeMember] === \"ENABLED\") {\n const { clientName, commandName } = context;\n const isS3WholeObjectMultipartGetResponseChecksum = clientName === \"S3Client\" &&\n commandName === \"GetObjectCommand\" &&\n getChecksumAlgorithmListForResponse(responseAlgorithms).every((algorithm) => {\n const responseHeader = getChecksumLocationName(algorithm);\n const checksumFromResponse = response.headers[responseHeader];\n return !checksumFromResponse || isChecksumWithPartNumber(checksumFromResponse);\n });\n if (isS3WholeObjectMultipartGetResponseChecksum) {\n return result;\n }\n await validateChecksumFromResponse(response, {\n config,\n responseAlgorithms,\n logger: context.logger,\n });\n }\n return result;\n};\n", "import { flexibleChecksumsInputMiddleware, flexibleChecksumsInputMiddlewareOptions, } from \"./flexibleChecksumsInputMiddleware\";\nimport { flexibleChecksumsMiddleware, flexibleChecksumsMiddlewareOptions } from \"./flexibleChecksumsMiddleware\";\nimport { flexibleChecksumsResponseMiddleware, flexibleChecksumsResponseMiddlewareOptions, } from \"./flexibleChecksumsResponseMiddleware\";\nexport const getFlexibleChecksumsPlugin = (config, middlewareConfig) => ({\n applyToStack: (clientStack) => {\n clientStack.add(flexibleChecksumsMiddleware(config, middlewareConfig), flexibleChecksumsMiddlewareOptions);\n clientStack.addRelativeTo(flexibleChecksumsInputMiddleware(config, middlewareConfig), flexibleChecksumsInputMiddlewareOptions);\n clientStack.addRelativeTo(flexibleChecksumsResponseMiddleware(config, middlewareConfig), flexibleChecksumsResponseMiddlewareOptions);\n },\n});\n", "import { normalizeProvider } from \"@smithy/util-middleware\";\nimport { DEFAULT_REQUEST_CHECKSUM_CALCULATION, DEFAULT_RESPONSE_CHECKSUM_VALIDATION } from \"./constants\";\nexport const resolveFlexibleChecksumsConfig = (input) => {\n const { requestChecksumCalculation, responseChecksumValidation, requestStreamBufferSize } = input;\n return Object.assign(input, {\n requestChecksumCalculation: normalizeProvider(requestChecksumCalculation ?? DEFAULT_REQUEST_CHECKSUM_CALCULATION),\n responseChecksumValidation: normalizeProvider(responseChecksumValidation ?? DEFAULT_RESPONSE_CHECKSUM_VALIDATION),\n requestStreamBufferSize: Number(requestStreamBufferSize ?? 0),\n checksumAlgorithms: input.checksumAlgorithms ?? {},\n });\n};\n", "export * from \"./NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS\";\nexport * from \"./NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS\";\nexport * from \"./constants\";\nexport * from \"./flexibleChecksumsMiddleware\";\nexport * from \"./getFlexibleChecksumsPlugin\";\nexport * from \"./resolveFlexibleChecksumsConfig\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nexport function resolveHostHeaderConfig(input) {\n return input;\n}\nexport const hostHeaderMiddleware = (options) => (next) => async (args) => {\n if (!HttpRequest.isInstance(args.request))\n return next(args);\n const { request } = args;\n const { handlerProtocol = \"\" } = options.requestHandler.metadata || {};\n if (handlerProtocol.indexOf(\"h2\") >= 0 && !request.headers[\":authority\"]) {\n delete request.headers[\"host\"];\n request.headers[\":authority\"] = request.hostname + (request.port ? \":\" + request.port : \"\");\n }\n else if (!request.headers[\"host\"]) {\n let host = request.hostname;\n if (request.port != null)\n host += `:${request.port}`;\n request.headers[\"host\"] = host;\n }\n return next(args);\n};\nexport const hostHeaderMiddlewareOptions = {\n name: \"hostHeaderMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"HOST\"],\n override: true,\n};\nexport const getHostHeaderPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);\n },\n});\n", "export const loggerMiddleware = () => (next, context) => async (args) => {\n try {\n const response = await next(args);\n const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;\n const { $metadata, ...outputWithoutMetadata } = response.output;\n logger?.info?.({\n clientName,\n commandName,\n input: inputFilterSensitiveLog(args.input),\n output: outputFilterSensitiveLog(outputWithoutMetadata),\n metadata: $metadata,\n });\n return response;\n }\n catch (error) {\n const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n logger?.error?.({\n clientName,\n commandName,\n input: inputFilterSensitiveLog(args.input),\n error,\n metadata: error.$metadata,\n });\n throw error;\n }\n};\nexport const loggerMiddlewareOptions = {\n name: \"loggerMiddleware\",\n tags: [\"LOGGER\"],\n step: \"initialize\",\n override: true,\n};\nexport const getLoggerPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);\n },\n});\n", "export * from \"./loggerMiddleware\";\n", "export const recursionDetectionMiddlewareOptions = {\n step: \"build\",\n tags: [\"RECURSION_DETECTION\"],\n name: \"recursionDetectionMiddleware\",\n override: true,\n priority: \"low\",\n};\n", "export const recursionDetectionMiddleware = () => (next) => async (args) => next(args);\n", "import { recursionDetectionMiddlewareOptions } from \"./configuration\";\nimport { recursionDetectionMiddleware } from \"./recursionDetectionMiddleware\";\nexport const getRecursionDetectionPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions);\n },\n});\n", "export * from \"./getRecursionDetectionPlugin\";\nexport * from \"./recursionDetectionMiddleware\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { NoOpLogger } from \"@smithy/smithy-client\";\nconst CONTENT_LENGTH_HEADER = \"content-length\";\nconst DECODED_CONTENT_LENGTH_HEADER = \"x-amz-decoded-content-length\";\nexport function checkContentLengthHeader() {\n return (next, context) => async (args) => {\n const { request } = args;\n if (HttpRequest.isInstance(request)) {\n if (!(CONTENT_LENGTH_HEADER in request.headers) && !(DECODED_CONTENT_LENGTH_HEADER in request.headers)) {\n const message = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`;\n if (typeof context?.logger?.warn === \"function\" && !(context.logger instanceof NoOpLogger)) {\n context.logger.warn(message);\n }\n else {\n console.warn(message);\n }\n }\n }\n return next({ ...args });\n };\n}\nexport const checkContentLengthHeaderMiddlewareOptions = {\n step: \"finalizeRequest\",\n tags: [\"CHECK_CONTENT_LENGTH_HEADER\"],\n name: \"getCheckContentLengthHeaderPlugin\",\n override: true,\n};\nexport const getCheckContentLengthHeaderPlugin = (unused) => ({\n applyToStack: (clientStack) => {\n clientStack.add(checkContentLengthHeader(), checkContentLengthHeaderMiddlewareOptions);\n },\n});\n", "export const regionRedirectEndpointMiddleware = (config) => {\n return (next, context) => async (args) => {\n const originalRegion = await config.region();\n const regionProviderRef = config.region;\n let unlock = () => { };\n if (context.__s3RegionRedirect) {\n Object.defineProperty(config, \"region\", {\n writable: false,\n value: async () => {\n return context.__s3RegionRedirect;\n },\n });\n unlock = () => Object.defineProperty(config, \"region\", {\n writable: true,\n value: regionProviderRef,\n });\n }\n try {\n const result = await next(args);\n if (context.__s3RegionRedirect) {\n unlock();\n const region = await config.region();\n if (originalRegion !== region) {\n throw new Error(\"Region was not restored following S3 region redirect.\");\n }\n }\n return result;\n }\n catch (e) {\n unlock();\n throw e;\n }\n };\n};\nexport const regionRedirectEndpointMiddlewareOptions = {\n tags: [\"REGION_REDIRECT\", \"S3\"],\n name: \"regionRedirectEndpointMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: \"endpointV2Middleware\",\n};\n", "import { regionRedirectEndpointMiddleware, regionRedirectEndpointMiddlewareOptions, } from \"./region-redirect-endpoint-middleware\";\nexport function regionRedirectMiddleware(clientConfig) {\n return (next, context) => async (args) => {\n try {\n return await next(args);\n }\n catch (err) {\n if (clientConfig.followRegionRedirects) {\n const statusCode = err?.$metadata?.httpStatusCode;\n const isHeadBucket = context.commandName === \"HeadBucketCommand\";\n const bucketRegionHeader = err?.$response?.headers?.[\"x-amz-bucket-region\"];\n if (bucketRegionHeader) {\n if (statusCode === 301 ||\n (statusCode === 400 && (err?.name === \"IllegalLocationConstraintException\" || isHeadBucket))) {\n try {\n const actualRegion = bucketRegionHeader;\n context.logger?.debug(`Redirecting from ${await clientConfig.region()} to ${actualRegion}`);\n context.__s3RegionRedirect = actualRegion;\n }\n catch (e) {\n throw new Error(\"Region redirect failed: \" + e);\n }\n return next(args);\n }\n }\n }\n throw err;\n }\n };\n}\nexport const regionRedirectMiddlewareOptions = {\n step: \"initialize\",\n tags: [\"REGION_REDIRECT\", \"S3\"],\n name: \"regionRedirectMiddleware\",\n override: true,\n};\nexport const getRegionRedirectMiddlewarePlugin = (clientConfig) => ({\n applyToStack: (clientStack) => {\n clientStack.add(regionRedirectMiddleware(clientConfig), regionRedirectMiddlewareOptions);\n clientStack.addRelativeTo(regionRedirectEndpointMiddleware(clientConfig), regionRedirectEndpointMiddlewareOptions);\n },\n});\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nimport { parseRfc7231DateTime } from \"@smithy/smithy-client\";\nexport const s3ExpiresMiddleware = (config) => {\n return (next, context) => async (args) => {\n const result = await next(args);\n const { response } = result;\n if (HttpResponse.isInstance(response)) {\n if (response.headers.expires) {\n response.headers.expiresstring = response.headers.expires;\n try {\n parseRfc7231DateTime(response.headers.expires);\n }\n catch (e) {\n context.logger?.warn(`AWS SDK Warning for ${context.clientName}::${context.commandName} response parsing (${response.headers.expires}): ${e}`);\n delete response.headers.expires;\n }\n }\n }\n return result;\n };\n};\nexport const s3ExpiresMiddlewareOptions = {\n tags: [\"S3\"],\n name: \"s3ExpiresMiddleware\",\n override: true,\n relation: \"after\",\n toMiddleware: \"deserializerMiddleware\",\n};\nexport const getS3ExpiresMiddlewarePlugin = (clientConfig) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(s3ExpiresMiddleware(clientConfig), s3ExpiresMiddlewareOptions);\n },\n});\n", "export class S3ExpressIdentityCache {\n data;\n lastPurgeTime = Date.now();\n static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS = 30_000;\n constructor(data = {}) {\n this.data = data;\n }\n get(key) {\n const entry = this.data[key];\n if (!entry) {\n return;\n }\n return entry;\n }\n set(key, entry) {\n this.data[key] = entry;\n return entry;\n }\n delete(key) {\n delete this.data[key];\n }\n async purgeExpired() {\n const now = Date.now();\n if (this.lastPurgeTime + S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS > now) {\n return;\n }\n for (const key in this.data) {\n const entry = this.data[key];\n if (!entry.isRefreshing) {\n const credential = await entry.identity;\n if (credential.expiration) {\n if (credential.expiration.getTime() < now) {\n delete this.data[key];\n }\n }\n }\n }\n }\n}\n", "export class S3ExpressIdentityCacheEntry {\n _identity;\n isRefreshing;\n accessed;\n constructor(_identity, isRefreshing = false, accessed = Date.now()) {\n this._identity = _identity;\n this.isRefreshing = isRefreshing;\n this.accessed = accessed;\n }\n get identity() {\n this.accessed = Date.now();\n return this._identity;\n }\n}\n", "import { S3ExpressIdentityCache } from \"./S3ExpressIdentityCache\";\nimport { S3ExpressIdentityCacheEntry } from \"./S3ExpressIdentityCacheEntry\";\nexport class S3ExpressIdentityProviderImpl {\n createSessionFn;\n cache;\n static REFRESH_WINDOW_MS = 60_000;\n constructor(createSessionFn, cache = new S3ExpressIdentityCache()) {\n this.createSessionFn = createSessionFn;\n this.cache = cache;\n }\n async getS3ExpressIdentity(awsIdentity, identityProperties) {\n const key = identityProperties.Bucket;\n const { cache } = this;\n const entry = cache.get(key);\n if (entry) {\n return entry.identity.then((identity) => {\n const isExpired = (identity.expiration?.getTime() ?? 0) < Date.now();\n if (isExpired) {\n return cache.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity;\n }\n const isExpiringSoon = (identity.expiration?.getTime() ?? 0) < Date.now() + S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS;\n if (isExpiringSoon && !entry.isRefreshing) {\n entry.isRefreshing = true;\n this.getIdentity(key).then((id) => {\n cache.set(key, new S3ExpressIdentityCacheEntry(Promise.resolve(id)));\n });\n }\n return identity;\n });\n }\n return cache.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity;\n }\n async getIdentity(key) {\n await this.cache.purgeExpired().catch((error) => {\n console.warn(\"Error while clearing expired entries in S3ExpressIdentityCache: \\n\" + error);\n });\n const session = await this.createSessionFn(key);\n if (!session.Credentials?.AccessKeyId || !session.Credentials?.SecretAccessKey) {\n throw new Error(\"s3#createSession response credential missing AccessKeyId or SecretAccessKey.\");\n }\n const identity = {\n accessKeyId: session.Credentials.AccessKeyId,\n secretAccessKey: session.Credentials.SecretAccessKey,\n sessionToken: session.Credentials.SessionToken,\n expiration: session.Credentials.Expiration ? new Date(session.Credentials.Expiration) : undefined,\n };\n return identity;\n }\n}\n", "import { booleanSelector, SelectorType } from \"@smithy/util-config-provider\";\nexport const S3_EXPRESS_BUCKET_TYPE = \"Directory\";\nexport const S3_EXPRESS_BACKEND = \"S3Express\";\nexport const S3_EXPRESS_AUTH_SCHEME = \"sigv4-s3express\";\nexport const SESSION_TOKEN_QUERY_PARAM = \"X-Amz-S3session-Token\";\nexport const SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase();\nexport const NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME = \"AWS_S3_DISABLE_EXPRESS_SESSION_AUTH\";\nexport const NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME = \"s3_disable_express_session_auth\";\nexport const NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = {\n environmentVariableSelector: (env) => booleanSelector(env, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME, SelectorType.ENV),\n configFileSelector: (profile) => booleanSelector(profile, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME, SelectorType.CONFIG),\n default: false,\n};\n", "import { SignatureV4 } from \"@smithy/signature-v4\";\nimport { SESSION_TOKEN_HEADER, SESSION_TOKEN_QUERY_PARAM } from \"../constants\";\nexport class SignatureV4S3Express extends SignatureV4 {\n async signWithCredentials(requestToSign, credentials, options) {\n const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);\n requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken;\n const privateAccess = this;\n setSingleOverride(privateAccess, credentialsWithoutSessionToken);\n return privateAccess.signRequest(requestToSign, options ?? {});\n }\n async presignWithCredentials(requestToSign, credentials, options) {\n const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);\n delete requestToSign.headers[SESSION_TOKEN_HEADER];\n requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;\n requestToSign.query = requestToSign.query ?? {};\n requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;\n const privateAccess = this;\n setSingleOverride(privateAccess, credentialsWithoutSessionToken);\n return this.presign(requestToSign, options);\n }\n}\nfunction getCredentialsWithoutSessionToken(credentials) {\n const credentialsWithoutSessionToken = {\n accessKeyId: credentials.accessKeyId,\n secretAccessKey: credentials.secretAccessKey,\n expiration: credentials.expiration,\n };\n return credentialsWithoutSessionToken;\n}\nfunction setSingleOverride(privateAccess, credentialsWithoutSessionToken) {\n const id = setTimeout(() => {\n throw new Error(\"SignatureV4S3Express credential override was created but not called.\");\n }, 10);\n const currentCredentialProvider = privateAccess.credentialProvider;\n const overrideCredentialsProviderOnce = () => {\n clearTimeout(id);\n privateAccess.credentialProvider = currentCredentialProvider;\n return Promise.resolve(credentialsWithoutSessionToken);\n };\n privateAccess.credentialProvider = overrideCredentialsProviderOnce;\n}\n", "import { setFeature } from \"@aws-sdk/core\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { S3_EXPRESS_AUTH_SCHEME, S3_EXPRESS_BACKEND, S3_EXPRESS_BUCKET_TYPE, SESSION_TOKEN_HEADER } from \"../constants\";\nexport const s3ExpressMiddleware = (options) => {\n return (next, context) => async (args) => {\n if (context.endpointV2) {\n const endpoint = context.endpointV2;\n const isS3ExpressAuth = endpoint.properties?.authSchemes?.[0]?.name === S3_EXPRESS_AUTH_SCHEME;\n const isS3ExpressBucket = endpoint.properties?.backend === S3_EXPRESS_BACKEND ||\n endpoint.properties?.bucketType === S3_EXPRESS_BUCKET_TYPE;\n if (isS3ExpressBucket) {\n setFeature(context, \"S3_EXPRESS_BUCKET\", \"J\");\n context.isS3ExpressBucket = true;\n }\n if (isS3ExpressAuth) {\n const requestBucket = args.input.Bucket;\n if (requestBucket) {\n const s3ExpressIdentity = await options.s3ExpressIdentityProvider.getS3ExpressIdentity(await options.credentials(), {\n Bucket: requestBucket,\n });\n context.s3ExpressIdentity = s3ExpressIdentity;\n if (HttpRequest.isInstance(args.request) && s3ExpressIdentity.sessionToken) {\n args.request.headers[SESSION_TOKEN_HEADER] = s3ExpressIdentity.sessionToken;\n }\n }\n }\n }\n return next(args);\n };\n};\nexport const s3ExpressMiddlewareOptions = {\n name: \"s3ExpressMiddleware\",\n step: \"build\",\n tags: [\"S3\", \"S3_EXPRESS\"],\n override: true,\n};\nexport const getS3ExpressPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(s3ExpressMiddleware(options), s3ExpressMiddlewareOptions);\n },\n});\n", "export const signS3Express = async (s3ExpressIdentity, signingOptions, request, sigV4MultiRegionSigner) => {\n const signedRequest = await sigV4MultiRegionSigner.signWithCredentials(request, s3ExpressIdentity, {});\n if (signedRequest.headers[\"X-Amz-Security-Token\"] || signedRequest.headers[\"x-amz-security-token\"]) {\n throw new Error(\"X-Amz-Security-Token must not be set for s3-express requests.\");\n }\n return signedRequest;\n};\n", "import { httpSigningMiddlewareOptions } from \"@smithy/core\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { getSmithyContext } from \"@smithy/util-middleware\";\nimport { signS3Express } from \"./signS3Express\";\nconst defaultErrorHandler = (signingProperties) => (error) => {\n throw error;\n};\nconst defaultSuccessHandler = (httpResponse, signingProperties) => { };\nexport const s3ExpressHttpSigningMiddlewareOptions = httpSigningMiddlewareOptions;\nexport const s3ExpressHttpSigningMiddleware = (config) => (next, context) => async (args) => {\n if (!HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n const smithyContext = getSmithyContext(context);\n const scheme = smithyContext.selectedHttpAuthScheme;\n if (!scheme) {\n throw new Error(`No HttpAuthScheme was selected: unable to sign request`);\n }\n const { httpAuthOption: { signingProperties = {} }, identity, signer, } = scheme;\n let request;\n if (context.s3ExpressIdentity) {\n request = await signS3Express(context.s3ExpressIdentity, signingProperties, args.request, await config.signer());\n }\n else {\n request = await signer.sign(args.request, identity, signingProperties);\n }\n const output = await next({\n ...args,\n request,\n }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));\n (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);\n return output;\n};\nexport const getS3ExpressHttpSigningPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(s3ExpressHttpSigningMiddleware(config), httpSigningMiddlewareOptions);\n },\n});\n", "export { S3ExpressIdentityCache } from \"./classes/S3ExpressIdentityCache\";\nexport { S3ExpressIdentityCacheEntry } from \"./classes/S3ExpressIdentityCacheEntry\";\nexport { S3ExpressIdentityProviderImpl } from \"./classes/S3ExpressIdentityProviderImpl\";\nexport { SignatureV4S3Express } from \"./classes/SignatureV4S3Express\";\nexport { NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS } from \"./constants\";\nexport { getS3ExpressPlugin, s3ExpressMiddleware, s3ExpressMiddlewareOptions } from \"./functions/s3ExpressMiddleware\";\nexport { getS3ExpressHttpSigningPlugin, s3ExpressHttpSigningMiddleware, s3ExpressHttpSigningMiddlewareOptions, } from \"./functions/s3ExpressHttpSigningMiddleware\";\n", "import { S3ExpressIdentityProviderImpl } from \"./s3-express\";\nexport const resolveS3Config = (input, { session, }) => {\n const [s3ClientProvider, CreateSessionCommandCtor] = session;\n const { forcePathStyle, useAccelerateEndpoint, disableMultiregionAccessPoints, followRegionRedirects, s3ExpressIdentityProvider, bucketEndpoint, expectContinueHeader, } = input;\n return Object.assign(input, {\n forcePathStyle: forcePathStyle ?? false,\n useAccelerateEndpoint: useAccelerateEndpoint ?? false,\n disableMultiregionAccessPoints: disableMultiregionAccessPoints ?? false,\n followRegionRedirects: followRegionRedirects ?? false,\n s3ExpressIdentityProvider: s3ExpressIdentityProvider ??\n new S3ExpressIdentityProviderImpl(async (key) => s3ClientProvider().send(new CreateSessionCommandCtor({\n Bucket: key,\n }))),\n bucketEndpoint: bucketEndpoint ?? false,\n expectContinueHeader: expectContinueHeader ?? 2_097_152,\n });\n};\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nimport { headStream, splitStream } from \"@smithy/util-stream\";\nconst THROW_IF_EMPTY_BODY = {\n CopyObjectCommand: true,\n UploadPartCopyCommand: true,\n CompleteMultipartUploadCommand: true,\n};\nconst MAX_BYTES_TO_INSPECT = 3000;\nexport const throw200ExceptionsMiddleware = (config) => (next, context) => async (args) => {\n const result = await next(args);\n const { response } = result;\n if (!HttpResponse.isInstance(response)) {\n return result;\n }\n const { statusCode, body: sourceBody } = response;\n if (statusCode < 200 || statusCode >= 300) {\n return result;\n }\n const isSplittableStream = typeof sourceBody?.stream === \"function\" ||\n typeof sourceBody?.pipe === \"function\" ||\n typeof sourceBody?.tee === \"function\";\n if (!isSplittableStream) {\n return result;\n }\n let bodyCopy = sourceBody;\n let body = sourceBody;\n if (sourceBody && typeof sourceBody === \"object\" && !(sourceBody instanceof Uint8Array)) {\n [bodyCopy, body] = await splitStream(sourceBody);\n }\n response.body = body;\n const bodyBytes = await collectBody(bodyCopy, {\n streamCollector: async (stream) => {\n return headStream(stream, MAX_BYTES_TO_INSPECT);\n },\n });\n if (typeof bodyCopy?.destroy === \"function\") {\n bodyCopy.destroy();\n }\n const bodyStringTail = config.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16));\n if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context.commandName]) {\n const err = new Error(\"S3 aborted request\");\n err.name = \"InternalError\";\n throw err;\n }\n if (bodyStringTail && bodyStringTail.endsWith(\"\")) {\n response.statusCode = 400;\n }\n return result;\n};\nconst collectBody = (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return Promise.resolve(streamBody);\n }\n return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());\n};\nexport const throw200ExceptionsMiddlewareOptions = {\n relation: \"after\",\n toMiddleware: \"deserializerMiddleware\",\n tags: [\"THROW_200_EXCEPTIONS\", \"S3\"],\n name: \"throw200ExceptionsMiddleware\",\n override: true,\n};\nexport const getThrow200ExceptionsPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(throw200ExceptionsMiddleware(config), throw200ExceptionsMiddlewareOptions);\n },\n});\n", "export const validate = (str) => typeof str === \"string\" && str.indexOf(\"arn:\") === 0 && str.split(\":\").length >= 6;\nexport const parse = (arn) => {\n const segments = arn.split(\":\");\n if (segments.length < 6 || segments[0] !== \"arn\")\n throw new Error(\"Malformed ARN\");\n const [, partition, service, region, accountId, ...resource] = segments;\n return {\n partition,\n service,\n region,\n accountId,\n resource: resource.join(\":\"),\n };\n};\nexport const build = (arnObject) => {\n const { partition = \"aws\", service, region, accountId, resource } = arnObject;\n if ([service, region, accountId, resource].some((segment) => typeof segment !== \"string\")) {\n throw new Error(\"Input ARN object is invalid\");\n }\n return `arn:${partition}:${service}:${region}:${accountId}:${resource}`;\n};\n", "export function bucketEndpointMiddleware(options) {\n return (next, context) => async (args) => {\n if (options.bucketEndpoint) {\n const endpoint = context.endpointV2;\n if (endpoint) {\n const bucket = args.input.Bucket;\n if (typeof bucket === \"string\") {\n try {\n const bucketEndpointUrl = new URL(bucket);\n context.endpointV2 = {\n ...endpoint,\n url: bucketEndpointUrl,\n };\n }\n catch (e) {\n const warning = `@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${bucket} could not be parsed as URL.`;\n if (context.logger?.constructor?.name === \"NoOpLogger\") {\n console.warn(warning);\n }\n else {\n context.logger?.warn?.(warning);\n }\n throw e;\n }\n }\n }\n }\n return next(args);\n };\n}\nexport const bucketEndpointMiddlewareOptions = {\n name: \"bucketEndpointMiddleware\",\n override: true,\n relation: \"after\",\n toMiddleware: \"endpointV2Middleware\",\n};\n", "import { validate as validateArn } from \"@aws-sdk/util-arn-parser\";\nimport { bucketEndpointMiddleware, bucketEndpointMiddlewareOptions } from \"./bucket-endpoint-middleware\";\nexport function validateBucketNameMiddleware({ bucketEndpoint }) {\n return (next) => async (args) => {\n const { input: { Bucket }, } = args;\n if (!bucketEndpoint && typeof Bucket === \"string\" && !validateArn(Bucket) && Bucket.indexOf(\"/\") >= 0) {\n const err = new Error(`Bucket name shouldn't contain '/', received '${Bucket}'`);\n err.name = \"InvalidBucketName\";\n throw err;\n }\n return next({ ...args });\n };\n}\nexport const validateBucketNameMiddlewareOptions = {\n step: \"initialize\",\n tags: [\"VALIDATE_BUCKET_NAME\"],\n name: \"validateBucketNameMiddleware\",\n override: true,\n};\nexport const getValidateBucketNamePlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(validateBucketNameMiddleware(options), validateBucketNameMiddlewareOptions);\n clientStack.addRelativeTo(bucketEndpointMiddleware(options), bucketEndpointMiddlewareOptions);\n },\n});\n", "export * from \"./check-content-length-header\";\nexport * from \"./region-redirect-endpoint-middleware\";\nexport * from \"./region-redirect-middleware\";\nexport * from \"./s3-expires-middleware\";\nexport * from \"./s3-express/index\";\nexport * from \"./s3Configuration\";\nexport * from \"./throw-200-exceptions\";\nexport * from \"./validate-bucket-name\";\n", "import { normalizeProvider } from \"@smithy/core\";\nexport const DEFAULT_UA_APP_ID = undefined;\nfunction isValidUserAgentAppId(appId) {\n if (appId === undefined) {\n return true;\n }\n return typeof appId === \"string\" && appId.length <= 50;\n}\nexport function resolveUserAgentConfig(input) {\n const normalizedAppIdProvider = normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID);\n const { customUserAgent } = input;\n return Object.assign(input, {\n customUserAgent: typeof customUserAgent === \"string\" ? [[customUserAgent]] : customUserAgent,\n userAgentAppId: async () => {\n const appId = await normalizedAppIdProvider();\n if (!isValidUserAgentAppId(appId)) {\n const logger = input.logger?.constructor?.name === \"NoOpLogger\" || !input.logger ? console : input.logger;\n if (typeof appId !== \"string\") {\n logger?.warn(\"userAgentAppId must be a string or undefined.\");\n }\n else if (appId.length > 50) {\n logger?.warn(\"The provided userAgentAppId exceeds the maximum length of 50 characters.\");\n }\n }\n return appId;\n },\n });\n}\n", "export class EndpointCache {\n capacity;\n data = new Map();\n parameters = [];\n constructor({ size, params }) {\n this.capacity = size ?? 50;\n if (params) {\n this.parameters = params;\n }\n }\n get(endpointParams, resolver) {\n const key = this.hash(endpointParams);\n if (key === false) {\n return resolver();\n }\n if (!this.data.has(key)) {\n if (this.data.size > this.capacity + 10) {\n const keys = this.data.keys();\n let i = 0;\n while (true) {\n const { value, done } = keys.next();\n this.data.delete(value);\n if (done || ++i > 10) {\n break;\n }\n }\n }\n this.data.set(key, resolver());\n }\n return this.data.get(key);\n }\n size() {\n return this.data.size;\n }\n hash(endpointParams) {\n let buffer = \"\";\n const { parameters } = this;\n if (parameters.length === 0) {\n return false;\n }\n for (const param of parameters) {\n const val = String(endpointParams[param] ?? \"\");\n if (val.includes(\"|;\")) {\n return false;\n }\n buffer += val + \"|;\";\n }\n return buffer;\n }\n}\n", "const IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}$`);\nexport const isIpAddress = (value) => IP_V4_REGEX.test(value) || (value.startsWith(\"[\") && value.endsWith(\"]\"));\n", "const VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);\nexport const isValidHostLabel = (value, allowSubDomains = false) => {\n if (!allowSubDomains) {\n return VALID_HOST_LABEL_REGEX.test(value);\n }\n const labels = value.split(\".\");\n for (const label of labels) {\n if (!isValidHostLabel(label)) {\n return false;\n }\n }\n return true;\n};\n", "export const customEndpointFunctions = {};\n", "export const debugId = \"endpoints\";\n", "export function toDebugString(input) {\n if (typeof input !== \"object\" || input == null) {\n return input;\n }\n if (\"ref\" in input) {\n return `$${toDebugString(input.ref)}`;\n }\n if (\"fn\" in input) {\n return `${input.fn}(${(input.argv || []).map(toDebugString).join(\", \")})`;\n }\n return JSON.stringify(input, null, 2);\n}\n", "export * from \"./debugId\";\nexport * from \"./toDebugString\";\n", "export class EndpointError extends Error {\n constructor(message) {\n super(message);\n this.name = \"EndpointError\";\n }\n}\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./EndpointError\";\nexport * from \"./EndpointFunctions\";\nexport * from \"./EndpointRuleObject\";\nexport * from \"./ErrorRuleObject\";\nexport * from \"./RuleSetObject\";\nexport * from \"./TreeRuleObject\";\nexport * from \"./shared\";\n", "export const booleanEquals = (value1, value2) => value1 === value2;\n", "import { EndpointError } from \"../types\";\nexport const getAttrPathList = (path) => {\n const parts = path.split(\".\");\n const pathList = [];\n for (const part of parts) {\n const squareBracketIndex = part.indexOf(\"[\");\n if (squareBracketIndex !== -1) {\n if (part.indexOf(\"]\") !== part.length - 1) {\n throw new EndpointError(`Path: '${path}' does not end with ']'`);\n }\n const arrayIndex = part.slice(squareBracketIndex + 1, -1);\n if (Number.isNaN(parseInt(arrayIndex))) {\n throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`);\n }\n if (squareBracketIndex !== 0) {\n pathList.push(part.slice(0, squareBracketIndex));\n }\n pathList.push(arrayIndex);\n }\n else {\n pathList.push(part);\n }\n }\n return pathList;\n};\n", "import { EndpointError } from \"../types\";\nimport { getAttrPathList } from \"./getAttrPathList\";\nexport const getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => {\n if (typeof acc !== \"object\") {\n throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`);\n }\n else if (Array.isArray(acc)) {\n return acc[parseInt(index)];\n }\n return acc[index];\n}, value);\n", "export const isSet = (value) => value != null;\n", "export const not = (value) => !value;\n", "import { EndpointURLScheme } from \"@smithy/types\";\nimport { isIpAddress } from \"./isIpAddress\";\nconst DEFAULT_PORTS = {\n [EndpointURLScheme.HTTP]: 80,\n [EndpointURLScheme.HTTPS]: 443,\n};\nexport const parseURL = (value) => {\n const whatwgURL = (() => {\n try {\n if (value instanceof URL) {\n return value;\n }\n if (typeof value === \"object\" && \"hostname\" in value) {\n const { hostname, port, protocol = \"\", path = \"\", query = {} } = value;\n const url = new URL(`${protocol}//${hostname}${port ? `:${port}` : \"\"}${path}`);\n url.search = Object.entries(query)\n .map(([k, v]) => `${k}=${v}`)\n .join(\"&\");\n return url;\n }\n return new URL(value);\n }\n catch (error) {\n return null;\n }\n })();\n if (!whatwgURL) {\n console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`);\n return null;\n }\n const urlString = whatwgURL.href;\n const { host, hostname, pathname, protocol, search } = whatwgURL;\n if (search) {\n return null;\n }\n const scheme = protocol.slice(0, -1);\n if (!Object.values(EndpointURLScheme).includes(scheme)) {\n return null;\n }\n const isIp = isIpAddress(hostname);\n const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) ||\n (typeof value === \"string\" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`));\n const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`;\n return {\n scheme,\n authority,\n path: pathname,\n normalizedPath: pathname.endsWith(\"/\") ? pathname : `${pathname}/`,\n isIp,\n };\n};\n", "export const stringEquals = (value1, value2) => value1 === value2;\n", "export const substring = (input, start, stop, reverse) => {\n if (start >= stop || input.length < stop || /[^\\u0000-\\u007f]/.test(input)) {\n return null;\n }\n if (!reverse) {\n return input.substring(start, stop);\n }\n return input.substring(input.length - stop, input.length - start);\n};\n", "export const uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);\n", "export * from \"./booleanEquals\";\nexport * from \"./getAttr\";\nexport * from \"./isSet\";\nexport * from \"./isValidHostLabel\";\nexport * from \"./not\";\nexport * from \"./parseURL\";\nexport * from \"./stringEquals\";\nexport * from \"./substring\";\nexport * from \"./uriEncode\";\n", "import { booleanEquals, getAttr, isSet, isValidHostLabel, not, parseURL, stringEquals, substring, uriEncode, } from \"../lib\";\nexport const endpointFunctions = {\n booleanEquals,\n getAttr,\n isSet,\n isValidHostLabel,\n not,\n parseURL,\n stringEquals,\n substring,\n uriEncode,\n};\n", "import { getAttr } from \"../lib\";\nexport const evaluateTemplate = (template, options) => {\n const evaluatedTemplateArr = [];\n const templateContext = {\n ...options.endpointParams,\n ...options.referenceRecord,\n };\n let currentIndex = 0;\n while (currentIndex < template.length) {\n const openingBraceIndex = template.indexOf(\"{\", currentIndex);\n if (openingBraceIndex === -1) {\n evaluatedTemplateArr.push(template.slice(currentIndex));\n break;\n }\n evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex));\n const closingBraceIndex = template.indexOf(\"}\", openingBraceIndex);\n if (closingBraceIndex === -1) {\n evaluatedTemplateArr.push(template.slice(openingBraceIndex));\n break;\n }\n if (template[openingBraceIndex + 1] === \"{\" && template[closingBraceIndex + 1] === \"}\") {\n evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex));\n currentIndex = closingBraceIndex + 2;\n }\n const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex);\n if (parameterName.includes(\"#\")) {\n const [refName, attrName] = parameterName.split(\"#\");\n evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName));\n }\n else {\n evaluatedTemplateArr.push(templateContext[parameterName]);\n }\n currentIndex = closingBraceIndex + 1;\n }\n return evaluatedTemplateArr.join(\"\");\n};\n", "export const getReferenceValue = ({ ref }, options) => {\n const referenceRecord = {\n ...options.endpointParams,\n ...options.referenceRecord,\n };\n return referenceRecord[ref];\n};\n", "import { EndpointError } from \"../types\";\nimport { customEndpointFunctions } from \"./customEndpointFunctions\";\nimport { endpointFunctions } from \"./endpointFunctions\";\nimport { evaluateTemplate } from \"./evaluateTemplate\";\nimport { getReferenceValue } from \"./getReferenceValue\";\nexport const evaluateExpression = (obj, keyName, options) => {\n if (typeof obj === \"string\") {\n return evaluateTemplate(obj, options);\n }\n else if (obj[\"fn\"]) {\n return group.callFunction(obj, options);\n }\n else if (obj[\"ref\"]) {\n return getReferenceValue(obj, options);\n }\n throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);\n};\nexport const callFunction = ({ fn, argv }, options) => {\n const evaluatedArgs = argv.map((arg) => [\"boolean\", \"number\"].includes(typeof arg) ? arg : group.evaluateExpression(arg, \"arg\", options));\n const fnSegments = fn.split(\".\");\n if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) {\n return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs);\n }\n return endpointFunctions[fn](...evaluatedArgs);\n};\nexport const group = {\n evaluateExpression,\n callFunction,\n};\n", "export { callFunction } from \"./evaluateExpression\";\n", "import { debugId, toDebugString } from \"../debug\";\nimport { EndpointError } from \"../types\";\nimport { callFunction } from \"./callFunction\";\nexport const evaluateCondition = ({ assign, ...fnArgs }, options) => {\n if (assign && assign in options.referenceRecord) {\n throw new EndpointError(`'${assign}' is already defined in Reference Record.`);\n }\n const value = callFunction(fnArgs, options);\n options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`);\n return {\n result: value === \"\" ? true : !!value,\n ...(assign != null && { toAssign: { name: assign, value } }),\n };\n};\n", "import { debugId, toDebugString } from \"../debug\";\nimport { evaluateCondition } from \"./evaluateCondition\";\nexport const evaluateConditions = (conditions = [], options) => {\n const conditionsReferenceRecord = {};\n for (const condition of conditions) {\n const { result, toAssign } = evaluateCondition(condition, {\n ...options,\n referenceRecord: {\n ...options.referenceRecord,\n ...conditionsReferenceRecord,\n },\n });\n if (!result) {\n return { result };\n }\n if (toAssign) {\n conditionsReferenceRecord[toAssign.name] = toAssign.value;\n options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`);\n }\n }\n return { result: true, referenceRecord: conditionsReferenceRecord };\n};\n", "import { EndpointError } from \"../types\";\nimport { evaluateExpression } from \"./evaluateExpression\";\nexport const getEndpointHeaders = (headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({\n ...acc,\n [headerKey]: headerVal.map((headerValEntry) => {\n const processedExpr = evaluateExpression(headerValEntry, \"Header value entry\", options);\n if (typeof processedExpr !== \"string\") {\n throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`);\n }\n return processedExpr;\n }),\n}), {});\n", "import { EndpointError } from \"../types\";\nimport { evaluateTemplate } from \"./evaluateTemplate\";\nexport const getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({\n ...acc,\n [propertyKey]: group.getEndpointProperty(propertyVal, options),\n}), {});\nexport const getEndpointProperty = (property, options) => {\n if (Array.isArray(property)) {\n return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));\n }\n switch (typeof property) {\n case \"string\":\n return evaluateTemplate(property, options);\n case \"object\":\n if (property === null) {\n throw new EndpointError(`Unexpected endpoint property: ${property}`);\n }\n return group.getEndpointProperties(property, options);\n case \"boolean\":\n return property;\n default:\n throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`);\n }\n};\nexport const group = {\n getEndpointProperty,\n getEndpointProperties,\n};\n", "import { EndpointError } from \"../types\";\nimport { evaluateExpression } from \"./evaluateExpression\";\nexport const getEndpointUrl = (endpointUrl, options) => {\n const expression = evaluateExpression(endpointUrl, \"Endpoint URL\", options);\n if (typeof expression === \"string\") {\n try {\n return new URL(expression);\n }\n catch (error) {\n console.error(`Failed to construct URL with ${expression}`, error);\n throw error;\n }\n }\n throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`);\n};\n", "import { debugId, toDebugString } from \"../debug\";\nimport { evaluateConditions } from \"./evaluateConditions\";\nimport { getEndpointHeaders } from \"./getEndpointHeaders\";\nimport { getEndpointProperties } from \"./getEndpointProperties\";\nimport { getEndpointUrl } from \"./getEndpointUrl\";\nexport const evaluateEndpointRule = (endpointRule, options) => {\n const { conditions, endpoint } = endpointRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n const endpointRuleOptions = {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord },\n };\n const { url, properties, headers } = endpoint;\n options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`);\n return {\n ...(headers != undefined && {\n headers: getEndpointHeaders(headers, endpointRuleOptions),\n }),\n ...(properties != undefined && {\n properties: getEndpointProperties(properties, endpointRuleOptions),\n }),\n url: getEndpointUrl(url, endpointRuleOptions),\n };\n};\n", "import { EndpointError } from \"../types\";\nimport { evaluateConditions } from \"./evaluateConditions\";\nimport { evaluateExpression } from \"./evaluateExpression\";\nexport const evaluateErrorRule = (errorRule, options) => {\n const { conditions, error } = errorRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n throw new EndpointError(evaluateExpression(error, \"Error\", {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord },\n }));\n};\n", "import { EndpointError } from \"../types\";\nimport { evaluateConditions } from \"./evaluateConditions\";\nimport { evaluateEndpointRule } from \"./evaluateEndpointRule\";\nimport { evaluateErrorRule } from \"./evaluateErrorRule\";\nexport const evaluateRules = (rules, options) => {\n for (const rule of rules) {\n if (rule.type === \"endpoint\") {\n const endpointOrUndefined = evaluateEndpointRule(rule, options);\n if (endpointOrUndefined) {\n return endpointOrUndefined;\n }\n }\n else if (rule.type === \"error\") {\n evaluateErrorRule(rule, options);\n }\n else if (rule.type === \"tree\") {\n const endpointOrUndefined = group.evaluateTreeRule(rule, options);\n if (endpointOrUndefined) {\n return endpointOrUndefined;\n }\n }\n else {\n throw new EndpointError(`Unknown endpoint rule: ${rule}`);\n }\n }\n throw new EndpointError(`Rules evaluation failed`);\n};\nexport const evaluateTreeRule = (treeRule, options) => {\n const { conditions, rules } = treeRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n return group.evaluateRules(rules, {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord },\n });\n};\nexport const group = {\n evaluateRules,\n evaluateTreeRule,\n};\n", "export * from \"./customEndpointFunctions\";\nexport * from \"./evaluateRules\";\n", "import { debugId, toDebugString } from \"./debug\";\nimport { EndpointError } from \"./types\";\nimport { evaluateRules } from \"./utils\";\nexport const resolveEndpoint = (ruleSetObject, options) => {\n const { endpointParams, logger } = options;\n const { parameters, rules } = ruleSetObject;\n options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);\n const paramsWithDefault = Object.entries(parameters)\n .filter(([, v]) => v.default != null)\n .map(([k, v]) => [k, v.default]);\n if (paramsWithDefault.length > 0) {\n for (const [paramKey, paramDefaultValue] of paramsWithDefault) {\n endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue;\n }\n }\n const requiredParams = Object.entries(parameters)\n .filter(([, v]) => v.required)\n .map(([k]) => k);\n for (const requiredParam of requiredParams) {\n if (endpointParams[requiredParam] == null) {\n throw new EndpointError(`Missing required parameter: '${requiredParam}'`);\n }\n }\n const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} });\n options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`);\n return endpoint;\n};\n", "export * from \"./cache/EndpointCache\";\nexport * from \"./lib/isIpAddress\";\nexport * from \"./lib/isValidHostLabel\";\nexport * from \"./utils/customEndpointFunctions\";\nexport * from \"./resolveEndpoint\";\nexport * from \"./types\";\n", "export { isIpAddress } from \"@smithy/util-endpoints\";\n", "import { isValidHostLabel } from \"@smithy/util-endpoints\";\nimport { isIpAddress } from \"../isIpAddress\";\nexport const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {\n if (allowSubDomains) {\n for (const label of value.split(\".\")) {\n if (!isVirtualHostableS3Bucket(label)) {\n return false;\n }\n }\n return true;\n }\n if (!isValidHostLabel(value)) {\n return false;\n }\n if (value.length < 3 || value.length > 63) {\n return false;\n }\n if (value !== value.toLowerCase()) {\n return false;\n }\n if (isIpAddress(value)) {\n return false;\n }\n return true;\n};\n", "const ARN_DELIMITER = \":\";\nconst RESOURCE_DELIMITER = \"/\";\nexport const parseArn = (value) => {\n const segments = value.split(ARN_DELIMITER);\n if (segments.length < 6)\n return null;\n const [arn, partition, service, region, accountId, ...resourcePath] = segments;\n if (arn !== \"arn\" || partition === \"\" || service === \"\" || resourcePath.join(ARN_DELIMITER) === \"\")\n return null;\n const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat();\n return {\n partition,\n service,\n region,\n accountId,\n resourceId,\n };\n};\n", "{\n \"partitions\": [{\n \"id\": \"aws\",\n \"outputs\": {\n \"dnsSuffix\": \"amazonaws.com\",\n \"dualStackDnsSuffix\": \"api.aws\",\n \"implicitGlobalRegion\": \"us-east-1\",\n \"name\": \"aws\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"af-south-1\": {\n \"description\": \"Africa (Cape Town)\"\n },\n \"ap-east-1\": {\n \"description\": \"Asia Pacific (Hong Kong)\"\n },\n \"ap-east-2\": {\n \"description\": \"Asia Pacific (Taipei)\"\n },\n \"ap-northeast-1\": {\n \"description\": \"Asia Pacific (Tokyo)\"\n },\n \"ap-northeast-2\": {\n \"description\": \"Asia Pacific (Seoul)\"\n },\n \"ap-northeast-3\": {\n \"description\": \"Asia Pacific (Osaka)\"\n },\n \"ap-south-1\": {\n \"description\": \"Asia Pacific (Mumbai)\"\n },\n \"ap-south-2\": {\n \"description\": \"Asia Pacific (Hyderabad)\"\n },\n \"ap-southeast-1\": {\n \"description\": \"Asia Pacific (Singapore)\"\n },\n \"ap-southeast-2\": {\n \"description\": \"Asia Pacific (Sydney)\"\n },\n \"ap-southeast-3\": {\n \"description\": \"Asia Pacific (Jakarta)\"\n },\n \"ap-southeast-4\": {\n \"description\": \"Asia Pacific (Melbourne)\"\n },\n \"ap-southeast-5\": {\n \"description\": \"Asia Pacific (Malaysia)\"\n },\n \"ap-southeast-6\": {\n \"description\": \"Asia Pacific (New Zealand)\"\n },\n \"ap-southeast-7\": {\n \"description\": \"Asia Pacific (Thailand)\"\n },\n \"aws-global\": {\n \"description\": \"aws global region\"\n },\n \"ca-central-1\": {\n \"description\": \"Canada (Central)\"\n },\n \"ca-west-1\": {\n \"description\": \"Canada West (Calgary)\"\n },\n \"eu-central-1\": {\n \"description\": \"Europe (Frankfurt)\"\n },\n \"eu-central-2\": {\n \"description\": \"Europe (Zurich)\"\n },\n \"eu-north-1\": {\n \"description\": \"Europe (Stockholm)\"\n },\n \"eu-south-1\": {\n \"description\": \"Europe (Milan)\"\n },\n \"eu-south-2\": {\n \"description\": \"Europe (Spain)\"\n },\n \"eu-west-1\": {\n \"description\": \"Europe (Ireland)\"\n },\n \"eu-west-2\": {\n \"description\": \"Europe (London)\"\n },\n \"eu-west-3\": {\n \"description\": \"Europe (Paris)\"\n },\n \"il-central-1\": {\n \"description\": \"Israel (Tel Aviv)\"\n },\n \"me-central-1\": {\n \"description\": \"Middle East (UAE)\"\n },\n \"me-south-1\": {\n \"description\": \"Middle East (Bahrain)\"\n },\n \"mx-central-1\": {\n \"description\": \"Mexico (Central)\"\n },\n \"sa-east-1\": {\n \"description\": \"South America (Sao Paulo)\"\n },\n \"us-east-1\": {\n \"description\": \"US East (N. Virginia)\"\n },\n \"us-east-2\": {\n \"description\": \"US East (Ohio)\"\n },\n \"us-west-1\": {\n \"description\": \"US West (N. California)\"\n },\n \"us-west-2\": {\n \"description\": \"US West (Oregon)\"\n }\n }\n }, {\n \"id\": \"aws-cn\",\n \"outputs\": {\n \"dnsSuffix\": \"amazonaws.com.cn\",\n \"dualStackDnsSuffix\": \"api.amazonwebservices.com.cn\",\n \"implicitGlobalRegion\": \"cn-northwest-1\",\n \"name\": \"aws-cn\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^cn\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-cn-global\": {\n \"description\": \"aws-cn global region\"\n },\n \"cn-north-1\": {\n \"description\": \"China (Beijing)\"\n },\n \"cn-northwest-1\": {\n \"description\": \"China (Ningxia)\"\n }\n }\n }, {\n \"id\": \"aws-eusc\",\n \"outputs\": {\n \"dnsSuffix\": \"amazonaws.eu\",\n \"dualStackDnsSuffix\": \"api.amazonwebservices.eu\",\n \"implicitGlobalRegion\": \"eusc-de-east-1\",\n \"name\": \"aws-eusc\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"eusc-de-east-1\": {\n \"description\": \"AWS European Sovereign Cloud (Germany)\"\n }\n }\n }, {\n \"id\": \"aws-iso\",\n \"outputs\": {\n \"dnsSuffix\": \"c2s.ic.gov\",\n \"dualStackDnsSuffix\": \"api.aws.ic.gov\",\n \"implicitGlobalRegion\": \"us-iso-east-1\",\n \"name\": \"aws-iso\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-iso-global\": {\n \"description\": \"aws-iso global region\"\n },\n \"us-iso-east-1\": {\n \"description\": \"US ISO East\"\n },\n \"us-iso-west-1\": {\n \"description\": \"US ISO WEST\"\n }\n }\n }, {\n \"id\": \"aws-iso-b\",\n \"outputs\": {\n \"dnsSuffix\": \"sc2s.sgov.gov\",\n \"dualStackDnsSuffix\": \"api.aws.scloud\",\n \"implicitGlobalRegion\": \"us-isob-east-1\",\n \"name\": \"aws-iso-b\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-iso-b-global\": {\n \"description\": \"aws-iso-b global region\"\n },\n \"us-isob-east-1\": {\n \"description\": \"US ISOB East (Ohio)\"\n },\n \"us-isob-west-1\": {\n \"description\": \"US ISOB West\"\n }\n }\n }, {\n \"id\": \"aws-iso-e\",\n \"outputs\": {\n \"dnsSuffix\": \"cloud.adc-e.uk\",\n \"dualStackDnsSuffix\": \"api.cloud-aws.adc-e.uk\",\n \"implicitGlobalRegion\": \"eu-isoe-west-1\",\n \"name\": \"aws-iso-e\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-iso-e-global\": {\n \"description\": \"aws-iso-e global region\"\n },\n \"eu-isoe-west-1\": {\n \"description\": \"EU ISOE West\"\n }\n }\n }, {\n \"id\": \"aws-iso-f\",\n \"outputs\": {\n \"dnsSuffix\": \"csp.hci.ic.gov\",\n \"dualStackDnsSuffix\": \"api.aws.hci.ic.gov\",\n \"implicitGlobalRegion\": \"us-isof-south-1\",\n \"name\": \"aws-iso-f\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-iso-f-global\": {\n \"description\": \"aws-iso-f global region\"\n },\n \"us-isof-east-1\": {\n \"description\": \"US ISOF EAST\"\n },\n \"us-isof-south-1\": {\n \"description\": \"US ISOF SOUTH\"\n }\n }\n }, {\n \"id\": \"aws-us-gov\",\n \"outputs\": {\n \"dnsSuffix\": \"amazonaws.com\",\n \"dualStackDnsSuffix\": \"api.aws\",\n \"implicitGlobalRegion\": \"us-gov-west-1\",\n \"name\": \"aws-us-gov\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-us-gov-global\": {\n \"description\": \"aws-us-gov global region\"\n },\n \"us-gov-east-1\": {\n \"description\": \"AWS GovCloud (US-East)\"\n },\n \"us-gov-west-1\": {\n \"description\": \"AWS GovCloud (US-West)\"\n }\n }\n }],\n \"version\": \"1.1\"\n}\n", "import partitionsInfo from \"./partitions.json\";\nlet selectedPartitionsInfo = partitionsInfo;\nlet selectedUserAgentPrefix = \"\";\nexport const partition = (value) => {\n const { partitions } = selectedPartitionsInfo;\n for (const partition of partitions) {\n const { regions, outputs } = partition;\n for (const [region, regionData] of Object.entries(regions)) {\n if (region === value) {\n return {\n ...outputs,\n ...regionData,\n };\n }\n }\n }\n for (const partition of partitions) {\n const { regionRegex, outputs } = partition;\n if (new RegExp(regionRegex).test(value)) {\n return {\n ...outputs,\n };\n }\n }\n const DEFAULT_PARTITION = partitions.find((partition) => partition.id === \"aws\");\n if (!DEFAULT_PARTITION) {\n throw new Error(\"Provided region was not found in the partition array or regex,\" +\n \" and default partition with id 'aws' doesn't exist.\");\n }\n return {\n ...DEFAULT_PARTITION.outputs,\n };\n};\nexport const setPartitionInfo = (partitionsInfo, userAgentPrefix = \"\") => {\n selectedPartitionsInfo = partitionsInfo;\n selectedUserAgentPrefix = userAgentPrefix;\n};\nexport const useDefaultPartitionInfo = () => {\n setPartitionInfo(partitionsInfo, \"\");\n};\nexport const getUserAgentPrefix = () => selectedUserAgentPrefix;\n", "import { customEndpointFunctions } from \"@smithy/util-endpoints\";\nimport { isVirtualHostableS3Bucket } from \"./lib/aws/isVirtualHostableS3Bucket\";\nimport { parseArn } from \"./lib/aws/parseArn\";\nimport { partition } from \"./lib/aws/partition\";\nexport const awsEndpointFunctions = {\n isVirtualHostableS3Bucket: isVirtualHostableS3Bucket,\n parseArn: parseArn,\n partition: partition,\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n", "import { parseUrl } from \"@smithy/url-parser\";\nexport const resolveDefaultAwsRegionalEndpointsConfig = (input) => {\n if (typeof input.endpointProvider !== \"function\") {\n throw new Error(\"@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.\");\n }\n const { endpoint } = input;\n if (endpoint === undefined) {\n input.endpoint = async () => {\n return toEndpointV1(input.endpointProvider({\n Region: typeof input.region === \"function\" ? await input.region() : input.region,\n UseDualStack: typeof input.useDualstackEndpoint === \"function\"\n ? await input.useDualstackEndpoint()\n : input.useDualstackEndpoint,\n UseFIPS: typeof input.useFipsEndpoint === \"function\" ? await input.useFipsEndpoint() : input.useFipsEndpoint,\n Endpoint: undefined,\n }, { logger: input.logger }));\n };\n }\n return input;\n};\nexport const toEndpointV1 = (endpoint) => parseUrl(endpoint.url);\n", "export { resolveEndpoint } from \"@smithy/util-endpoints\";\n", "export { EndpointError } from \"@smithy/util-endpoints\";\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./EndpointError\";\nexport * from \"./EndpointRuleObject\";\nexport * from \"./ErrorRuleObject\";\nexport * from \"./RuleSetObject\";\nexport * from \"./TreeRuleObject\";\nexport * from \"./shared\";\n", "export * from \"./aws\";\nexport * from \"./lib/aws/partition\";\nexport * from \"./lib/isIpAddress\";\nexport * from \"./resolveDefaultAwsRegionalEndpointsConfig\";\nexport * from \"./resolveEndpoint\";\nexport * from \"./types\";\n", "export var RETRY_MODES;\n(function (RETRY_MODES) {\n RETRY_MODES[\"STANDARD\"] = \"standard\";\n RETRY_MODES[\"ADAPTIVE\"] = \"adaptive\";\n})(RETRY_MODES || (RETRY_MODES = {}));\nexport const DEFAULT_MAX_ATTEMPTS = 3;\nexport const DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD;\n", "export const CLOCK_SKEW_ERROR_CODES = [\n \"AuthFailure\",\n \"InvalidSignatureException\",\n \"RequestExpired\",\n \"RequestInTheFuture\",\n \"RequestTimeTooSkewed\",\n \"SignatureDoesNotMatch\",\n];\nexport const THROTTLING_ERROR_CODES = [\n \"BandwidthLimitExceeded\",\n \"EC2ThrottledException\",\n \"LimitExceededException\",\n \"PriorRequestNotComplete\",\n \"ProvisionedThroughputExceededException\",\n \"RequestLimitExceeded\",\n \"RequestThrottled\",\n \"RequestThrottledException\",\n \"SlowDown\",\n \"ThrottledException\",\n \"Throttling\",\n \"ThrottlingException\",\n \"TooManyRequestsException\",\n \"TransactionInProgressException\",\n];\nexport const TRANSIENT_ERROR_CODES = [\"TimeoutError\", \"RequestTimeout\", \"RequestTimeoutException\"];\nexport const TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];\nexport const NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"ECONNREFUSED\", \"EPIPE\", \"ETIMEDOUT\"];\nexport const NODEJS_NETWORK_ERROR_CODES = [\"EHOSTUNREACH\", \"ENETUNREACH\", \"ENOTFOUND\"];\n", "import { CLOCK_SKEW_ERROR_CODES, NODEJS_NETWORK_ERROR_CODES, NODEJS_TIMEOUT_ERROR_CODES, THROTTLING_ERROR_CODES, TRANSIENT_ERROR_CODES, TRANSIENT_ERROR_STATUS_CODES, } from \"./constants\";\nexport const isRetryableByTrait = (error) => error?.$retryable !== undefined;\nexport const isClockSkewError = (error) => CLOCK_SKEW_ERROR_CODES.includes(error.name);\nexport const isClockSkewCorrectedError = (error) => error.$metadata?.clockSkewCorrected;\nexport const isBrowserNetworkError = (error) => {\n const errorMessages = new Set([\n \"Failed to fetch\",\n \"NetworkError when attempting to fetch resource\",\n \"The Internet connection appears to be offline\",\n \"Load failed\",\n \"Network request failed\",\n ]);\n const isValid = error && error instanceof TypeError;\n if (!isValid) {\n return false;\n }\n return errorMessages.has(error.message);\n};\nexport const isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 ||\n THROTTLING_ERROR_CODES.includes(error.name) ||\n error.$retryable?.throttling == true;\nexport const isTransientError = (error, depth = 0) => isRetryableByTrait(error) ||\n isClockSkewCorrectedError(error) ||\n TRANSIENT_ERROR_CODES.includes(error.name) ||\n NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || \"\") ||\n NODEJS_NETWORK_ERROR_CODES.includes(error?.code || \"\") ||\n TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) ||\n isBrowserNetworkError(error) ||\n (error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1));\nexport const isServerError = (error) => {\n if (error.$metadata?.httpStatusCode !== undefined) {\n const statusCode = error.$metadata.httpStatusCode;\n if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) {\n return true;\n }\n return false;\n }\n return false;\n};\n", "import { isThrottlingError } from \"@smithy/service-error-classification\";\nexport class DefaultRateLimiter {\n static setTimeoutFn = setTimeout;\n beta;\n minCapacity;\n minFillRate;\n scaleConstant;\n smooth;\n currentCapacity = 0;\n enabled = false;\n lastMaxRate = 0;\n measuredTxRate = 0;\n requestCount = 0;\n fillRate;\n lastThrottleTime;\n lastTimestamp = 0;\n lastTxRateBucket;\n maxCapacity;\n timeWindow = 0;\n constructor(options) {\n this.beta = options?.beta ?? 0.7;\n this.minCapacity = options?.minCapacity ?? 1;\n this.minFillRate = options?.minFillRate ?? 0.5;\n this.scaleConstant = options?.scaleConstant ?? 0.4;\n this.smooth = options?.smooth ?? 0.8;\n const currentTimeInSeconds = this.getCurrentTimeInSeconds();\n this.lastThrottleTime = currentTimeInSeconds;\n this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());\n this.fillRate = this.minFillRate;\n this.maxCapacity = this.minCapacity;\n }\n getCurrentTimeInSeconds() {\n return Date.now() / 1000;\n }\n async getSendToken() {\n return this.acquireTokenBucket(1);\n }\n async acquireTokenBucket(amount) {\n if (!this.enabled) {\n return;\n }\n this.refillTokenBucket();\n if (amount > this.currentCapacity) {\n const delay = ((amount - this.currentCapacity) / this.fillRate) * 1000;\n await new Promise((resolve) => DefaultRateLimiter.setTimeoutFn(resolve, delay));\n }\n this.currentCapacity = this.currentCapacity - amount;\n }\n refillTokenBucket() {\n const timestamp = this.getCurrentTimeInSeconds();\n if (!this.lastTimestamp) {\n this.lastTimestamp = timestamp;\n return;\n }\n const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate;\n this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount);\n this.lastTimestamp = timestamp;\n }\n updateClientSendingRate(response) {\n let calculatedRate;\n this.updateMeasuredRate();\n if (isThrottlingError(response)) {\n const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);\n this.lastMaxRate = rateToUse;\n this.calculateTimeWindow();\n this.lastThrottleTime = this.getCurrentTimeInSeconds();\n calculatedRate = this.cubicThrottle(rateToUse);\n this.enableTokenBucket();\n }\n else {\n this.calculateTimeWindow();\n calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());\n }\n const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);\n this.updateTokenBucketRate(newRate);\n }\n calculateTimeWindow() {\n this.timeWindow = this.getPrecise(Math.pow((this.lastMaxRate * (1 - this.beta)) / this.scaleConstant, 1 / 3));\n }\n cubicThrottle(rateToUse) {\n return this.getPrecise(rateToUse * this.beta);\n }\n cubicSuccess(timestamp) {\n return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate);\n }\n enableTokenBucket() {\n this.enabled = true;\n }\n updateTokenBucketRate(newRate) {\n this.refillTokenBucket();\n this.fillRate = Math.max(newRate, this.minFillRate);\n this.maxCapacity = Math.max(newRate, this.minCapacity);\n this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity);\n }\n updateMeasuredRate() {\n const t = this.getCurrentTimeInSeconds();\n const timeBucket = Math.floor(t * 2) / 2;\n this.requestCount++;\n if (timeBucket > this.lastTxRateBucket) {\n const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);\n this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));\n this.requestCount = 0;\n this.lastTxRateBucket = timeBucket;\n }\n }\n getPrecise(num) {\n return parseFloat(num.toFixed(8));\n }\n}\n", "export const DEFAULT_RETRY_DELAY_BASE = 100;\nexport const MAXIMUM_RETRY_DELAY = 20 * 1000;\nexport const THROTTLING_RETRY_DELAY_BASE = 500;\nexport const INITIAL_RETRY_TOKENS = 500;\nexport const RETRY_COST = 5;\nexport const TIMEOUT_RETRY_COST = 10;\nexport const NO_RETRY_INCREMENT = 1;\nexport const INVOCATION_ID_HEADER = \"amz-sdk-invocation-id\";\nexport const REQUEST_HEADER = \"amz-sdk-request\";\n", "import { DEFAULT_RETRY_DELAY_BASE, MAXIMUM_RETRY_DELAY } from \"./constants\";\nexport const getDefaultRetryBackoffStrategy = () => {\n let delayBase = DEFAULT_RETRY_DELAY_BASE;\n const computeNextBackoffDelay = (attempts) => {\n return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));\n };\n const setDelayBase = (delay) => {\n delayBase = delay;\n };\n return {\n computeNextBackoffDelay,\n setDelayBase,\n };\n};\n", "import { MAXIMUM_RETRY_DELAY } from \"./constants\";\nexport const createDefaultRetryToken = ({ retryDelay, retryCount, retryCost, }) => {\n const getRetryCount = () => retryCount;\n const getRetryDelay = () => Math.min(MAXIMUM_RETRY_DELAY, retryDelay);\n const getRetryCost = () => retryCost;\n return {\n getRetryCount,\n getRetryDelay,\n getRetryCost,\n };\n};\n", "import { DEFAULT_MAX_ATTEMPTS, RETRY_MODES } from \"./config\";\nimport { DEFAULT_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, NO_RETRY_INCREMENT, RETRY_COST, THROTTLING_RETRY_DELAY_BASE, TIMEOUT_RETRY_COST, } from \"./constants\";\nimport { getDefaultRetryBackoffStrategy } from \"./defaultRetryBackoffStrategy\";\nimport { createDefaultRetryToken } from \"./defaultRetryToken\";\nexport class StandardRetryStrategy {\n maxAttempts;\n mode = RETRY_MODES.STANDARD;\n capacity = INITIAL_RETRY_TOKENS;\n retryBackoffStrategy = getDefaultRetryBackoffStrategy();\n maxAttemptsProvider;\n constructor(maxAttempts) {\n this.maxAttempts = maxAttempts;\n this.maxAttemptsProvider = typeof maxAttempts === \"function\" ? maxAttempts : async () => maxAttempts;\n }\n async acquireInitialRetryToken(retryTokenScope) {\n return createDefaultRetryToken({\n retryDelay: DEFAULT_RETRY_DELAY_BASE,\n retryCount: 0,\n });\n }\n async refreshRetryTokenForRetry(token, errorInfo) {\n const maxAttempts = await this.getMaxAttempts();\n if (this.shouldRetry(token, errorInfo, maxAttempts)) {\n const errorType = errorInfo.errorType;\n this.retryBackoffStrategy.setDelayBase(errorType === \"THROTTLING\" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE);\n const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount());\n const retryDelay = errorInfo.retryAfterHint\n ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType)\n : delayFromErrorType;\n const capacityCost = this.getCapacityCost(errorType);\n this.capacity -= capacityCost;\n return createDefaultRetryToken({\n retryDelay,\n retryCount: token.getRetryCount() + 1,\n retryCost: capacityCost,\n });\n }\n throw new Error(\"No retry token available\");\n }\n recordSuccess(token) {\n this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT));\n }\n getCapacity() {\n return this.capacity;\n }\n async getMaxAttempts() {\n try {\n return await this.maxAttemptsProvider();\n }\n catch (error) {\n console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);\n return DEFAULT_MAX_ATTEMPTS;\n }\n }\n shouldRetry(tokenToRenew, errorInfo, maxAttempts) {\n const attempts = tokenToRenew.getRetryCount() + 1;\n return (attempts < maxAttempts &&\n this.capacity >= this.getCapacityCost(errorInfo.errorType) &&\n this.isRetryableError(errorInfo.errorType));\n }\n getCapacityCost(errorType) {\n return errorType === \"TRANSIENT\" ? TIMEOUT_RETRY_COST : RETRY_COST;\n }\n isRetryableError(errorType) {\n return errorType === \"THROTTLING\" || errorType === \"TRANSIENT\";\n }\n}\n", "import { RETRY_MODES } from \"./config\";\nimport { DefaultRateLimiter } from \"./DefaultRateLimiter\";\nimport { StandardRetryStrategy } from \"./StandardRetryStrategy\";\nexport class AdaptiveRetryStrategy {\n maxAttemptsProvider;\n rateLimiter;\n standardRetryStrategy;\n mode = RETRY_MODES.ADAPTIVE;\n constructor(maxAttemptsProvider, options) {\n this.maxAttemptsProvider = maxAttemptsProvider;\n const { rateLimiter } = options ?? {};\n this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();\n this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider);\n }\n async acquireInitialRetryToken(retryTokenScope) {\n await this.rateLimiter.getSendToken();\n return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);\n }\n async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {\n this.rateLimiter.updateClientSendingRate(errorInfo);\n return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);\n }\n recordSuccess(token) {\n this.rateLimiter.updateClientSendingRate({});\n this.standardRetryStrategy.recordSuccess(token);\n }\n}\n", "import { DEFAULT_RETRY_DELAY_BASE } from \"./constants\";\nimport { StandardRetryStrategy } from \"./StandardRetryStrategy\";\nexport class ConfiguredRetryStrategy extends StandardRetryStrategy {\n computeNextBackoffDelay;\n constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) {\n super(typeof maxAttempts === \"function\" ? maxAttempts : async () => maxAttempts);\n if (typeof computeNextBackoffDelay === \"number\") {\n this.computeNextBackoffDelay = () => computeNextBackoffDelay;\n }\n else {\n this.computeNextBackoffDelay = computeNextBackoffDelay;\n }\n }\n async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {\n const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo);\n token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount());\n return token;\n }\n}\n", "export {};\n", "export * from \"./AdaptiveRetryStrategy\";\nexport * from \"./ConfiguredRetryStrategy\";\nexport * from \"./DefaultRateLimiter\";\nexport * from \"./StandardRetryStrategy\";\nexport * from \"./config\";\nexport * from \"./constants\";\nexport * from \"./types\";\n", "import { setFeature } from \"@aws-sdk/core\";\nimport { RETRY_MODES } from \"@smithy/util-retry\";\nconst ACCOUNT_ID_ENDPOINT_REGEX = /\\d{12}\\.ddb/;\nexport async function checkFeatures(context, config, args) {\n const request = args.request;\n if (request?.headers?.[\"smithy-protocol\"] === \"rpc-v2-cbor\") {\n setFeature(context, \"PROTOCOL_RPC_V2_CBOR\", \"M\");\n }\n if (typeof config.retryStrategy === \"function\") {\n const retryStrategy = await config.retryStrategy();\n if (typeof retryStrategy.mode === \"string\") {\n switch (retryStrategy.mode) {\n case RETRY_MODES.ADAPTIVE:\n setFeature(context, \"RETRY_MODE_ADAPTIVE\", \"F\");\n break;\n case RETRY_MODES.STANDARD:\n setFeature(context, \"RETRY_MODE_STANDARD\", \"E\");\n break;\n }\n }\n }\n if (typeof config.accountIdEndpointMode === \"function\") {\n const endpointV2 = context.endpointV2;\n if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {\n setFeature(context, \"ACCOUNT_ID_ENDPOINT\", \"O\");\n }\n switch (await config.accountIdEndpointMode?.()) {\n case \"disabled\":\n setFeature(context, \"ACCOUNT_ID_MODE_DISABLED\", \"Q\");\n break;\n case \"preferred\":\n setFeature(context, \"ACCOUNT_ID_MODE_PREFERRED\", \"P\");\n break;\n case \"required\":\n setFeature(context, \"ACCOUNT_ID_MODE_REQUIRED\", \"R\");\n break;\n }\n }\n const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity;\n if (identity?.$source) {\n const credentials = identity;\n if (credentials.accountId) {\n setFeature(context, \"RESOLVED_ACCOUNT_ID\", \"T\");\n }\n for (const [key, value] of Object.entries(credentials.$source ?? {})) {\n setFeature(context, key, value);\n }\n }\n}\n", "export const USER_AGENT = \"user-agent\";\nexport const X_AMZ_USER_AGENT = \"x-amz-user-agent\";\nexport const SPACE = \" \";\nexport const UA_NAME_SEPARATOR = \"/\";\nexport const UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\\-.^_`|~\\w]/g;\nexport const UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\\-.^_`|~\\w#]/g;\nexport const UA_ESCAPE_CHAR = \"-\";\n", "const BYTE_LIMIT = 1024;\nexport function encodeFeatures(features) {\n let buffer = \"\";\n for (const key in features) {\n const val = features[key];\n if (buffer.length + val.length + 1 <= BYTE_LIMIT) {\n if (buffer.length) {\n buffer += \",\" + val;\n }\n else {\n buffer += val;\n }\n continue;\n }\n break;\n }\n return buffer;\n}\n", "import { getUserAgentPrefix } from \"@aws-sdk/util-endpoints\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { checkFeatures } from \"./check-features\";\nimport { SPACE, UA_ESCAPE_CHAR, UA_NAME_ESCAPE_REGEX, UA_NAME_SEPARATOR, UA_VALUE_ESCAPE_REGEX, USER_AGENT, X_AMZ_USER_AGENT, } from \"./constants\";\nimport { encodeFeatures } from \"./encode-features\";\nexport const userAgentMiddleware = (options) => (next, context) => async (args) => {\n const { request } = args;\n if (!HttpRequest.isInstance(request)) {\n return next(args);\n }\n const { headers } = request;\n const userAgent = context?.userAgent?.map(escapeUserAgent) || [];\n const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);\n await checkFeatures(context, options, args);\n const awsContext = context;\n defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);\n const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];\n const appId = await options.userAgentAppId();\n if (appId) {\n defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`]));\n }\n const prefix = getUserAgentPrefix();\n const sdkUserAgentValue = (prefix ? [prefix] : [])\n .concat([...defaultUserAgent, ...userAgent, ...customUserAgent])\n .join(SPACE);\n const normalUAValue = [\n ...defaultUserAgent.filter((section) => section.startsWith(\"aws-sdk-\")),\n ...customUserAgent,\n ].join(SPACE);\n if (options.runtime !== \"browser\") {\n if (normalUAValue) {\n headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT]\n ? `${headers[USER_AGENT]} ${normalUAValue}`\n : normalUAValue;\n }\n headers[USER_AGENT] = sdkUserAgentValue;\n }\n else {\n headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;\n }\n return next({\n ...args,\n request,\n });\n};\nconst escapeUserAgent = (userAgentPair) => {\n const name = userAgentPair[0]\n .split(UA_NAME_SEPARATOR)\n .map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR))\n .join(UA_NAME_SEPARATOR);\n const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);\n const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);\n const prefix = name.substring(0, prefixSeparatorIndex);\n let uaName = name.substring(prefixSeparatorIndex + 1);\n if (prefix === \"api\") {\n uaName = uaName.toLowerCase();\n }\n return [prefix, uaName, version]\n .filter((item) => item && item.length > 0)\n .reduce((acc, item, index) => {\n switch (index) {\n case 0:\n return item;\n case 1:\n return `${acc}/${item}`;\n default:\n return `${acc}#${item}`;\n }\n }, \"\");\n};\nexport const getUserAgentMiddlewareOptions = {\n name: \"getUserAgentMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"SET_USER_AGENT\", \"USER_AGENT\"],\n override: true,\n};\nexport const getUserAgentPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);\n },\n});\n", "export * from \"./configurations\";\nexport * from \"./user-agent-middleware\";\n", "import { booleanSelector, SelectorType } from \"@smithy/util-config-provider\";\nexport const ENV_USE_DUALSTACK_ENDPOINT = \"AWS_USE_DUALSTACK_ENDPOINT\";\nexport const CONFIG_USE_DUALSTACK_ENDPOINT = \"use_dualstack_endpoint\";\nexport const DEFAULT_USE_DUALSTACK_ENDPOINT = false;\nexport const NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV),\n configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG),\n default: false,\n};\n", "import { booleanSelector, SelectorType } from \"@smithy/util-config-provider\";\nexport const ENV_USE_FIPS_ENDPOINT = \"AWS_USE_FIPS_ENDPOINT\";\nexport const CONFIG_USE_FIPS_ENDPOINT = \"use_fips_endpoint\";\nexport const DEFAULT_USE_FIPS_ENDPOINT = false;\nexport const NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV),\n configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG),\n default: false,\n};\n", "import { normalizeProvider } from \"@smithy/util-middleware\";\nexport const resolveCustomEndpointsConfig = (input) => {\n const { tls, endpoint, urlParser, useDualstackEndpoint } = input;\n return Object.assign(input, {\n tls: tls ?? true,\n endpoint: normalizeProvider(typeof endpoint === \"string\" ? urlParser(endpoint) : endpoint),\n isCustomEndpoint: true,\n useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false),\n });\n};\n", "import { normalizeProvider } from \"@smithy/util-middleware\";\nimport { getEndpointFromRegion } from \"./utils/getEndpointFromRegion\";\nexport const resolveEndpointsConfig = (input) => {\n const useDualstackEndpoint = normalizeProvider(input.useDualstackEndpoint ?? false);\n const { endpoint, useFipsEndpoint, urlParser, tls } = input;\n return Object.assign(input, {\n tls: tls ?? true,\n endpoint: endpoint\n ? normalizeProvider(typeof endpoint === \"string\" ? urlParser(endpoint) : endpoint)\n : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }),\n isCustomEndpoint: !!endpoint,\n useDualstackEndpoint,\n });\n};\n", "export * from \"./NodeUseDualstackEndpointConfigOptions\";\nexport * from \"./NodeUseFipsEndpointConfigOptions\";\nexport * from \"./resolveCustomEndpointsConfig\";\nexport * from \"./resolveEndpointsConfig\";\n", "export const REGION_ENV_NAME = \"AWS_REGION\";\nexport const REGION_INI_NAME = \"region\";\nexport const NODE_REGION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[REGION_ENV_NAME],\n configFileSelector: (profile) => profile[REGION_INI_NAME],\n default: () => {\n throw new Error(\"Region is missing\");\n },\n};\nexport const NODE_REGION_CONFIG_FILE_OPTIONS = {\n preferredFile: \"credentials\",\n};\n", "import { isValidHostLabel } from \"@smithy/util-endpoints\";\nconst validRegions = new Set();\nexport const checkRegion = (region, check = isValidHostLabel) => {\n if (!validRegions.has(region) && !check(region)) {\n if (region === \"*\") {\n console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of \"*\". See \"sigv4a\" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);\n }\n else {\n throw new Error(`Region not accepted: region=\"${region}\" is not a valid hostname component.`);\n }\n }\n else {\n validRegions.add(region);\n }\n};\n", "export const isFipsRegion = (region) => typeof region === \"string\" && (region.startsWith(\"fips-\") || region.endsWith(\"-fips\"));\n", "import { isFipsRegion } from \"./isFipsRegion\";\nexport const getRealRegion = (region) => isFipsRegion(region)\n ? [\"fips-aws-global\", \"aws-fips\"].includes(region)\n ? \"us-east-1\"\n : region.replace(/fips-(dkr-|prod-)?|-fips/, \"\")\n : region;\n", "import { checkRegion } from \"./checkRegion\";\nimport { getRealRegion } from \"./getRealRegion\";\nimport { isFipsRegion } from \"./isFipsRegion\";\nexport const resolveRegionConfig = (input) => {\n const { region, useFipsEndpoint } = input;\n if (!region) {\n throw new Error(\"Region is missing\");\n }\n return Object.assign(input, {\n region: async () => {\n const providedRegion = typeof region === \"function\" ? await region() : region;\n const realRegion = getRealRegion(providedRegion);\n checkRegion(realRegion);\n return realRegion;\n },\n useFipsEndpoint: async () => {\n const providedRegion = typeof region === \"string\" ? region : await region();\n if (isFipsRegion(providedRegion)) {\n return true;\n }\n return typeof useFipsEndpoint !== \"function\" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();\n },\n });\n};\n", "export * from \"./config\";\nexport * from \"./resolveRegionConfig\";\n", "export {};\n", "export {};\n", "import { getHostnameFromVariants } from \"./getHostnameFromVariants\";\nimport { getResolvedHostname } from \"./getResolvedHostname\";\nimport { getResolvedPartition } from \"./getResolvedPartition\";\nimport { getResolvedSigningRegion } from \"./getResolvedSigningRegion\";\nexport const getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash, }) => {\n const partition = getResolvedPartition(region, { partitionHash });\n const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region;\n const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };\n const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions);\n const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions);\n const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });\n if (hostname === undefined) {\n throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);\n }\n const signingRegion = getResolvedSigningRegion(hostname, {\n signingRegion: regionHash[resolvedRegion]?.signingRegion,\n regionRegex: partitionHash[partition].regionRegex,\n useFipsEndpoint,\n });\n return {\n partition,\n signingService,\n hostname,\n ...(signingRegion && { signingRegion }),\n ...(regionHash[resolvedRegion]?.signingService && {\n signingService: regionHash[resolvedRegion].signingService,\n }),\n };\n};\n", "export * from \"./PartitionHash\";\nexport * from \"./RegionHash\";\nexport * from \"./getRegionInfo\";\n", "export * from \"./endpointsConfig\";\nexport * from \"./regionConfig\";\nexport * from \"./regionInfo\";\n", "export const resolveEventStreamSerdeConfig = (input) => Object.assign(input, {\n eventStreamMarshaller: input.eventStreamSerdeProvider(input),\n});\n", "export * from \"./EventStreamSerdeConfig\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nconst CONTENT_LENGTH_HEADER = \"content-length\";\nexport function contentLengthMiddleware(bodyLengthChecker) {\n return (next) => async (args) => {\n const request = args.request;\n if (HttpRequest.isInstance(request)) {\n const { body, headers } = request;\n if (body &&\n Object.keys(headers)\n .map((str) => str.toLowerCase())\n .indexOf(CONTENT_LENGTH_HEADER) === -1) {\n try {\n const length = bodyLengthChecker(body);\n request.headers = {\n ...request.headers,\n [CONTENT_LENGTH_HEADER]: String(length),\n };\n }\n catch (error) {\n }\n }\n }\n return next({\n ...args,\n request,\n });\n };\n}\nexport const contentLengthMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_CONTENT_LENGTH\", \"CONTENT_LENGTH\"],\n name: \"contentLengthMiddleware\",\n override: true,\n};\nexport const getContentLengthPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);\n },\n});\n", "export const resolveParamsForS3 = async (endpointParams) => {\n const bucket = endpointParams?.Bucket || \"\";\n if (typeof endpointParams.Bucket === \"string\") {\n endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent(\"#\")).replace(/\\?/g, encodeURIComponent(\"?\"));\n }\n if (isArnBucketName(bucket)) {\n if (endpointParams.ForcePathStyle === true) {\n throw new Error(\"Path-style addressing cannot be used with ARN buckets\");\n }\n }\n else if (!isDnsCompatibleBucketName(bucket) ||\n (bucket.indexOf(\".\") !== -1 && !String(endpointParams.Endpoint).startsWith(\"http:\")) ||\n bucket.toLowerCase() !== bucket ||\n bucket.length < 3) {\n endpointParams.ForcePathStyle = true;\n }\n if (endpointParams.DisableMultiRegionAccessPoints) {\n endpointParams.disableMultiRegionAccessPoints = true;\n endpointParams.DisableMRAP = true;\n }\n return endpointParams;\n};\nconst DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\\.\\-]{1,61}[a-z0-9]$/;\nconst IP_ADDRESS_PATTERN = /(\\d+\\.){3}\\d+/;\nconst DOTS_PATTERN = /\\.\\./;\nexport const DOT_PATTERN = /\\./;\nexport const S3_HOSTNAME_PATTERN = /^(.+\\.)?s3(-fips)?(\\.dualstack)?[.-]([a-z0-9-]+)\\./;\nexport const isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName);\nexport const isArnBucketName = (bucketName) => {\n const [arn, partition, service, , , bucket] = bucketName.split(\":\");\n const isArn = arn === \"arn\" && bucketName.split(\":\").length >= 6;\n const isValidArn = Boolean(isArn && partition && service && bucket);\n if (isArn && !isValidArn) {\n throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);\n }\n return isValidArn;\n};\n", "export * from \"./s3\";\n", "export const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => {\n const configProvider = async () => {\n let configValue;\n if (isClientContextParam) {\n const clientContextParams = config.clientContextParams;\n const nestedValue = clientContextParams?.[configKey];\n configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey];\n }\n else {\n configValue = config[configKey] ?? config[canonicalEndpointParamKey];\n }\n if (typeof configValue === \"function\") {\n return configValue();\n }\n return configValue;\n };\n if (configKey === \"credentialScope\" || canonicalEndpointParamKey === \"CredentialScope\") {\n return async () => {\n const credentials = typeof config.credentials === \"function\" ? await config.credentials() : config.credentials;\n const configValue = credentials?.credentialScope ?? credentials?.CredentialScope;\n return configValue;\n };\n }\n if (configKey === \"accountId\" || canonicalEndpointParamKey === \"AccountId\") {\n return async () => {\n const credentials = typeof config.credentials === \"function\" ? await config.credentials() : config.credentials;\n const configValue = credentials?.accountId ?? credentials?.AccountId;\n return configValue;\n };\n }\n if (configKey === \"endpoint\" || canonicalEndpointParamKey === \"endpoint\") {\n return async () => {\n if (config.isCustomEndpoint === false) {\n return undefined;\n }\n const endpoint = await configProvider();\n if (endpoint && typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n return endpoint.url.href;\n }\n if (\"hostname\" in endpoint) {\n const { protocol, hostname, port, path } = endpoint;\n return `${protocol}//${hostname}${port ? \":\" + port : \"\"}${path}`;\n }\n }\n return endpoint;\n };\n }\n return configProvider;\n};\n", "export const getEndpointFromConfig = async (serviceId) => undefined;\n", "import { parseUrl } from \"@smithy/url-parser\";\nexport const toEndpointV1 = (endpoint) => {\n if (typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n const v1Endpoint = parseUrl(endpoint.url);\n if (endpoint.headers) {\n v1Endpoint.headers = {};\n for (const [name, values] of Object.entries(endpoint.headers)) {\n v1Endpoint.headers[name.toLowerCase()] = values.join(\", \");\n }\n }\n return v1Endpoint;\n }\n return endpoint;\n }\n return parseUrl(endpoint);\n};\n", "import { resolveParamsForS3 } from \"../service-customizations\";\nimport { createConfigValueProvider } from \"./createConfigValueProvider\";\nimport { getEndpointFromConfig } from \"./getEndpointFromConfig\";\nimport { toEndpointV1 } from \"./toEndpointV1\";\nexport const getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => {\n if (!clientConfig.isCustomEndpoint) {\n let endpointFromConfig;\n if (clientConfig.serviceConfiguredEndpoint) {\n endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();\n }\n else {\n endpointFromConfig = await getEndpointFromConfig(clientConfig.serviceId);\n }\n if (endpointFromConfig) {\n clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));\n clientConfig.isCustomEndpoint = true;\n }\n }\n const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);\n if (typeof clientConfig.endpointProvider !== \"function\") {\n throw new Error(\"config.endpointProvider is not set.\");\n }\n const endpoint = clientConfig.endpointProvider(endpointParams, context);\n if (clientConfig.isCustomEndpoint && clientConfig.endpoint) {\n const customEndpoint = await clientConfig.endpoint();\n if (customEndpoint?.headers) {\n endpoint.headers ??= {};\n for (const [name, value] of Object.entries(customEndpoint.headers)) {\n endpoint.headers[name] = Array.isArray(value) ? value : [value];\n }\n }\n }\n return endpoint;\n};\nexport const resolveParams = async (commandInput, instructionsSupplier, clientConfig) => {\n const endpointParams = {};\n const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {};\n for (const [name, instruction] of Object.entries(instructions)) {\n switch (instruction.type) {\n case \"staticContextParams\":\n endpointParams[name] = instruction.value;\n break;\n case \"contextParams\":\n endpointParams[name] = commandInput[instruction.name];\n break;\n case \"clientContextParams\":\n case \"builtInParams\":\n endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== \"builtInParams\")();\n break;\n case \"operationContextParams\":\n endpointParams[name] = instruction.get(commandInput);\n break;\n default:\n throw new Error(\"Unrecognized endpoint parameter instruction: \" + JSON.stringify(instruction));\n }\n }\n if (Object.keys(instructions).length === 0) {\n Object.assign(endpointParams, clientConfig);\n }\n if (String(clientConfig.serviceId).toLowerCase() === \"s3\") {\n await resolveParamsForS3(endpointParams);\n }\n return endpointParams;\n};\n", "export * from \"./getEndpointFromInstructions\";\nexport * from \"./toEndpointV1\";\n", "import { setFeature } from \"@smithy/core\";\nimport { getSmithyContext } from \"@smithy/util-middleware\";\nimport { getEndpointFromInstructions } from \"./adaptors/getEndpointFromInstructions\";\nexport const endpointMiddleware = ({ config, instructions, }) => {\n return (next, context) => async (args) => {\n if (config.isCustomEndpoint) {\n setFeature(context, \"ENDPOINT_OVERRIDE\", \"N\");\n }\n const endpoint = await getEndpointFromInstructions(args.input, {\n getEndpointParameterInstructions() {\n return instructions;\n },\n }, { ...config }, context);\n context.endpointV2 = endpoint;\n context.authSchemes = endpoint.properties?.authSchemes;\n const authScheme = context.authSchemes?.[0];\n if (authScheme) {\n context[\"signing_region\"] = authScheme.signingRegion;\n context[\"signing_service\"] = authScheme.signingName;\n const smithyContext = getSmithyContext(context);\n const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;\n if (httpAuthOption) {\n httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {\n signing_region: authScheme.signingRegion,\n signingRegion: authScheme.signingRegion,\n signing_service: authScheme.signingName,\n signingName: authScheme.signingName,\n signingRegionSet: authScheme.signingRegionSet,\n }, authScheme.properties);\n }\n }\n return next({\n ...args,\n });\n };\n};\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nexport const deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => {\n const { response } = await next(args);\n try {\n const parsed = await deserializer(response, options);\n return {\n response,\n output: parsed,\n };\n }\n catch (error) {\n Object.defineProperty(error, \"$response\", {\n value: response,\n enumerable: false,\n writable: false,\n configurable: false,\n });\n if (!(\"$metadata\" in error)) {\n const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;\n try {\n error.message += \"\\n \" + hint;\n }\n catch (e) {\n if (!context.logger || context.logger?.constructor?.name === \"NoOpLogger\") {\n console.warn(hint);\n }\n else {\n context.logger?.warn?.(hint);\n }\n }\n if (typeof error.$responseBodyText !== \"undefined\") {\n if (error.$response) {\n error.$response.body = error.$responseBodyText;\n }\n }\n try {\n if (HttpResponse.isInstance(response)) {\n const { headers = {} } = response;\n const headerEntries = Object.entries(headers);\n error.$metadata = {\n httpStatusCode: response.statusCode,\n requestId: findHeader(/^x-[\\w-]+-request-?id$/, headerEntries),\n extendedRequestId: findHeader(/^x-[\\w-]+-id-2$/, headerEntries),\n cfId: findHeader(/^x-[\\w-]+-cf-id$/, headerEntries),\n };\n }\n }\n catch (e) {\n }\n }\n throw error;\n }\n};\nconst findHeader = (pattern, headers) => {\n return (headers.find(([k]) => {\n return k.match(pattern);\n }) || [void 0, void 1])[1];\n};\n", "import { toEndpointV1 } from \"@smithy/core/endpoints\";\nexport const serializerMiddleware = (options, serializer) => (next, context) => async (args) => {\n const endpointConfig = options;\n const endpoint = context.endpointV2\n ? async () => toEndpointV1(context.endpointV2)\n : endpointConfig.endpoint;\n if (!endpoint) {\n throw new Error(\"No valid endpoint provider available.\");\n }\n const request = await serializer(args.input, { ...options, endpoint });\n return next({\n ...args,\n request,\n });\n};\n", "import { deserializerMiddleware } from \"./deserializerMiddleware\";\nimport { serializerMiddleware } from \"./serializerMiddleware\";\nexport const deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true,\n};\nexport const serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true,\n};\nexport function getSerdePlugin(config, serializer, deserializer) {\n return {\n applyToStack: (commandStack) => {\n commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);\n commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);\n },\n };\n}\n", "export * from \"./deserializerMiddleware\";\nexport * from \"./serdePlugin\";\nexport * from \"./serializerMiddleware\";\n", "import { serializerMiddlewareOption } from \"@smithy/middleware-serde\";\nimport { endpointMiddleware } from \"./endpointMiddleware\";\nexport const endpointMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"ENDPOINT_PARAMETERS\", \"ENDPOINT_V2\", \"ENDPOINT\"],\n name: \"endpointV2Middleware\",\n override: true,\n relation: \"before\",\n toMiddleware: serializerMiddlewareOption.name,\n};\nexport const getEndpointPlugin = (config, instructions) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(endpointMiddleware({\n config,\n instructions,\n }), endpointMiddlewareOptions);\n },\n});\n", "import { normalizeProvider } from \"@smithy/util-middleware\";\nimport { getEndpointFromConfig } from \"./adaptors/getEndpointFromConfig\";\nimport { toEndpointV1 } from \"./adaptors/toEndpointV1\";\nexport const resolveEndpointConfig = (input) => {\n const tls = input.tls ?? true;\n const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input;\n const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await normalizeProvider(endpoint)()) : undefined;\n const isCustomEndpoint = !!endpoint;\n const resolvedConfig = Object.assign(input, {\n endpoint: customEndpointProvider,\n tls,\n isCustomEndpoint,\n useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false),\n useFipsEndpoint: normalizeProvider(useFipsEndpoint ?? false),\n });\n let configuredEndpointPromise = undefined;\n resolvedConfig.serviceConfiguredEndpoint = async () => {\n if (input.serviceId && !configuredEndpointPromise) {\n configuredEndpointPromise = getEndpointFromConfig(input.serviceId);\n }\n return configuredEndpointPromise;\n };\n return resolvedConfig;\n};\n", "export const resolveEndpointRequiredConfig = (input) => {\n const { endpoint } = input;\n if (endpoint === undefined) {\n input.endpoint = async () => {\n throw new Error(\"@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.\");\n };\n }\n return input;\n};\n", "export {};\n", "export * from \"./adaptors\";\nexport * from \"./endpointMiddleware\";\nexport * from \"./getEndpointPlugin\";\nexport * from \"./resolveEndpointConfig\";\nexport * from \"./resolveEndpointRequiredConfig\";\nexport * from \"./types\";\n", "import { MAXIMUM_RETRY_DELAY } from \"@smithy/util-retry\";\nexport const defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));\n", "import { isClockSkewError, isRetryableByTrait, isThrottlingError, isTransientError, } from \"@smithy/service-error-classification\";\nexport const defaultRetryDecider = (error) => {\n if (!error) {\n return false;\n }\n return isRetryableByTrait(error) || isClockSkewError(error) || isThrottlingError(error) || isTransientError(error);\n};\n", "export const asSdkError = (error) => {\n if (error instanceof Error)\n return error;\n if (error instanceof Object)\n return Object.assign(new Error(), error);\n if (typeof error === \"string\")\n return new Error(error);\n return new Error(`AWS SDK error wrapper for ${error}`);\n};\n", "import { HttpRequest, HttpResponse } from \"@smithy/protocol-http\";\nimport { isThrottlingError } from \"@smithy/service-error-classification\";\nimport { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, INVOCATION_ID_HEADER, REQUEST_HEADER, RETRY_MODES, THROTTLING_RETRY_DELAY_BASE, } from \"@smithy/util-retry\";\nimport { v4 } from \"@smithy/uuid\";\nimport { getDefaultRetryQuota } from \"./defaultRetryQuota\";\nimport { defaultDelayDecider } from \"./delayDecider\";\nimport { defaultRetryDecider } from \"./retryDecider\";\nimport { asSdkError } from \"./util\";\nexport class StandardRetryStrategy {\n maxAttemptsProvider;\n retryDecider;\n delayDecider;\n retryQuota;\n mode = RETRY_MODES.STANDARD;\n constructor(maxAttemptsProvider, options) {\n this.maxAttemptsProvider = maxAttemptsProvider;\n this.retryDecider = options?.retryDecider ?? defaultRetryDecider;\n this.delayDecider = options?.delayDecider ?? defaultDelayDecider;\n this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(INITIAL_RETRY_TOKENS);\n }\n shouldRetry(error, attempts, maxAttempts) {\n return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);\n }\n async getMaxAttempts() {\n let maxAttempts;\n try {\n maxAttempts = await this.maxAttemptsProvider();\n }\n catch (error) {\n maxAttempts = DEFAULT_MAX_ATTEMPTS;\n }\n return maxAttempts;\n }\n async retry(next, args, options) {\n let retryTokenAmount;\n let attempts = 0;\n let totalDelay = 0;\n const maxAttempts = await this.getMaxAttempts();\n const { request } = args;\n if (HttpRequest.isInstance(request)) {\n request.headers[INVOCATION_ID_HEADER] = v4();\n }\n while (true) {\n try {\n if (HttpRequest.isInstance(request)) {\n request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n if (options?.beforeRequest) {\n await options.beforeRequest();\n }\n const { response, output } = await next(args);\n if (options?.afterRequest) {\n options.afterRequest(response);\n }\n this.retryQuota.releaseRetryTokens(retryTokenAmount);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalDelay;\n return { response, output };\n }\n catch (e) {\n const err = asSdkError(e);\n attempts++;\n if (this.shouldRetry(err, attempts, maxAttempts)) {\n retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);\n const delayFromDecider = this.delayDecider(isThrottlingError(err) ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE, attempts);\n const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);\n const delay = Math.max(delayFromResponse || 0, delayFromDecider);\n totalDelay += delay;\n await new Promise((resolve) => setTimeout(resolve, delay));\n continue;\n }\n if (!err.$metadata) {\n err.$metadata = {};\n }\n err.$metadata.attempts = attempts;\n err.$metadata.totalRetryDelay = totalDelay;\n throw err;\n }\n }\n }\n}\nconst getDelayFromRetryAfterHeader = (response) => {\n if (!HttpResponse.isInstance(response))\n return;\n const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === \"retry-after\");\n if (!retryAfterHeaderName)\n return;\n const retryAfter = response.headers[retryAfterHeaderName];\n const retryAfterSeconds = Number(retryAfter);\n if (!Number.isNaN(retryAfterSeconds))\n return retryAfterSeconds * 1000;\n const retryAfterDate = new Date(retryAfter);\n return retryAfterDate.getTime() - Date.now();\n};\n", "import { DefaultRateLimiter, RETRY_MODES } from \"@smithy/util-retry\";\nimport { StandardRetryStrategy } from \"./StandardRetryStrategy\";\nexport class AdaptiveRetryStrategy extends StandardRetryStrategy {\n rateLimiter;\n constructor(maxAttemptsProvider, options) {\n const { rateLimiter, ...superOptions } = options ?? {};\n super(maxAttemptsProvider, superOptions);\n this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();\n this.mode = RETRY_MODES.ADAPTIVE;\n }\n async retry(next, args) {\n return super.retry(next, args, {\n beforeRequest: async () => {\n return this.rateLimiter.getSendToken();\n },\n afterRequest: (response) => {\n this.rateLimiter.updateClientSendingRate(response);\n },\n });\n }\n}\n", "import { normalizeProvider } from \"@smithy/util-middleware\";\nimport { AdaptiveRetryStrategy, DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, RETRY_MODES, StandardRetryStrategy, } from \"@smithy/util-retry\";\nexport const ENV_MAX_ATTEMPTS = \"AWS_MAX_ATTEMPTS\";\nexport const CONFIG_MAX_ATTEMPTS = \"max_attempts\";\nexport const NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => {\n const value = env[ENV_MAX_ATTEMPTS];\n if (!value)\n return undefined;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n configFileSelector: (profile) => {\n const value = profile[CONFIG_MAX_ATTEMPTS];\n if (!value)\n return undefined;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n default: DEFAULT_MAX_ATTEMPTS,\n};\nexport const resolveRetryConfig = (input) => {\n const { retryStrategy, retryMode } = input;\n const maxAttempts = normalizeProvider(input.maxAttempts ?? DEFAULT_MAX_ATTEMPTS);\n let controller = retryStrategy\n ? Promise.resolve(retryStrategy)\n : undefined;\n const getDefault = async () => (await normalizeProvider(retryMode)()) === RETRY_MODES.ADAPTIVE\n ? new AdaptiveRetryStrategy(maxAttempts)\n : new StandardRetryStrategy(maxAttempts);\n return Object.assign(input, {\n maxAttempts,\n retryStrategy: () => (controller ??= getDefault()),\n });\n};\nexport const ENV_RETRY_MODE = \"AWS_RETRY_MODE\";\nexport const CONFIG_RETRY_MODE = \"retry_mode\";\nexport const NODE_RETRY_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_RETRY_MODE],\n configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],\n default: DEFAULT_RETRY_MODE,\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { INVOCATION_ID_HEADER, REQUEST_HEADER } from \"@smithy/util-retry\";\nexport const omitRetryHeadersMiddleware = () => (next) => async (args) => {\n const { request } = args;\n if (HttpRequest.isInstance(request)) {\n delete request.headers[INVOCATION_ID_HEADER];\n delete request.headers[REQUEST_HEADER];\n }\n return next(args);\n};\nexport const omitRetryHeadersMiddlewareOptions = {\n name: \"omitRetryHeadersMiddleware\",\n tags: [\"RETRY\", \"HEADERS\", \"OMIT_RETRY_HEADERS\"],\n relation: \"before\",\n toMiddleware: \"awsAuthMiddleware\",\n override: true,\n};\nexport const getOmitRetryHeadersPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);\n },\n});\n", "export const isStreamingPayload = (request) => request?.body instanceof ReadableStream;\n", "import { HttpRequest, HttpResponse } from \"@smithy/protocol-http\";\nimport { isServerError, isThrottlingError, isTransientError } from \"@smithy/service-error-classification\";\nimport { NoOpLogger } from \"@smithy/smithy-client\";\nimport { INVOCATION_ID_HEADER, REQUEST_HEADER } from \"@smithy/util-retry\";\nimport { v4 } from \"@smithy/uuid\";\nimport { isStreamingPayload } from \"./isStreamingPayload/isStreamingPayload\";\nimport { asSdkError } from \"./util\";\nexport const retryMiddleware = (options) => (next, context) => async (args) => {\n let retryStrategy = await options.retryStrategy();\n const maxAttempts = await options.maxAttempts();\n if (isRetryStrategyV2(retryStrategy)) {\n retryStrategy = retryStrategy;\n let retryToken = await retryStrategy.acquireInitialRetryToken(context[\"partition_id\"]);\n let lastError = new Error();\n let attempts = 0;\n let totalRetryDelay = 0;\n const { request } = args;\n const isRequest = HttpRequest.isInstance(request);\n if (isRequest) {\n request.headers[INVOCATION_ID_HEADER] = v4();\n }\n while (true) {\n try {\n if (isRequest) {\n request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n const { response, output } = await next(args);\n retryStrategy.recordSuccess(retryToken);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalRetryDelay;\n return { response, output };\n }\n catch (e) {\n const retryErrorInfo = getRetryErrorInfo(e);\n lastError = asSdkError(e);\n if (isRequest && isStreamingPayload(request)) {\n (context.logger instanceof NoOpLogger ? console : context.logger)?.warn(\"An error was encountered in a non-retryable streaming request.\");\n throw lastError;\n }\n try {\n retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);\n }\n catch (refreshError) {\n if (!lastError.$metadata) {\n lastError.$metadata = {};\n }\n lastError.$metadata.attempts = attempts + 1;\n lastError.$metadata.totalRetryDelay = totalRetryDelay;\n throw lastError;\n }\n attempts = retryToken.getRetryCount();\n const delay = retryToken.getRetryDelay();\n totalRetryDelay += delay;\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n }\n }\n else {\n retryStrategy = retryStrategy;\n if (retryStrategy?.mode)\n context.userAgent = [...(context.userAgent || []), [\"cfg/retry-mode\", retryStrategy.mode]];\n return retryStrategy.retry(next, args);\n }\n};\nconst isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== \"undefined\" &&\n typeof retryStrategy.refreshRetryTokenForRetry !== \"undefined\" &&\n typeof retryStrategy.recordSuccess !== \"undefined\";\nconst getRetryErrorInfo = (error) => {\n const errorInfo = {\n error,\n errorType: getRetryErrorType(error),\n };\n const retryAfterHint = getRetryAfterHint(error.$response);\n if (retryAfterHint) {\n errorInfo.retryAfterHint = retryAfterHint;\n }\n return errorInfo;\n};\nconst getRetryErrorType = (error) => {\n if (isThrottlingError(error))\n return \"THROTTLING\";\n if (isTransientError(error))\n return \"TRANSIENT\";\n if (isServerError(error))\n return \"SERVER_ERROR\";\n return \"CLIENT_ERROR\";\n};\nexport const retryMiddlewareOptions = {\n name: \"retryMiddleware\",\n tags: [\"RETRY\"],\n step: \"finalizeRequest\",\n priority: \"high\",\n override: true,\n};\nexport const getRetryPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(retryMiddleware(options), retryMiddlewareOptions);\n },\n});\nexport const getRetryAfterHint = (response) => {\n if (!HttpResponse.isInstance(response))\n return;\n const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === \"retry-after\");\n if (!retryAfterHeaderName)\n return;\n const retryAfter = response.headers[retryAfterHeaderName];\n const retryAfterSeconds = Number(retryAfter);\n if (!Number.isNaN(retryAfterSeconds))\n return new Date(retryAfterSeconds * 1000);\n const retryAfterDate = new Date(retryAfter);\n return retryAfterDate;\n};\n", "export * from \"./AdaptiveRetryStrategy\";\nexport * from \"./StandardRetryStrategy\";\nexport * from \"./configurations\";\nexport * from \"./delayDecider\";\nexport * from \"./omitRetryHeadersMiddleware\";\nexport * from \"./retryDecider\";\nexport * from \"./retryMiddleware\";\n", "export const signatureV4CrtContainer = {\n CrtSignerV4: null,\n};\n", "import { SignatureV4S3Express } from \"@aws-sdk/middleware-sdk-s3\";\nimport { signatureV4aContainer } from \"@smithy/signature-v4\";\nimport { signatureV4CrtContainer } from \"./signature-v4-crt-container\";\nexport class SignatureV4MultiRegion {\n sigv4aSigner;\n sigv4Signer;\n signerOptions;\n static sigv4aDependency() {\n if (typeof signatureV4CrtContainer.CrtSignerV4 === \"function\") {\n return \"crt\";\n }\n else if (typeof signatureV4aContainer.SignatureV4a === \"function\") {\n return \"js\";\n }\n return \"none\";\n }\n constructor(options) {\n this.sigv4Signer = new SignatureV4S3Express(options);\n this.signerOptions = options;\n }\n async sign(requestToSign, options = {}) {\n if (options.signingRegion === \"*\") {\n return this.getSigv4aSigner().sign(requestToSign, options);\n }\n return this.sigv4Signer.sign(requestToSign, options);\n }\n async signWithCredentials(requestToSign, credentials, options = {}) {\n if (options.signingRegion === \"*\") {\n const signer = this.getSigv4aSigner();\n const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;\n if (CrtSignerV4 && signer instanceof CrtSignerV4) {\n return signer.signWithCredentials(requestToSign, credentials, options);\n }\n else {\n throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. ` +\n `Please check whether you have installed the \"@aws-sdk/signature-v4-crt\" package explicitly. ` +\n `You must also register the package by calling [require(\"@aws-sdk/signature-v4-crt\");] ` +\n `or an ESM equivalent such as [import \"@aws-sdk/signature-v4-crt\";]. ` +\n `For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);\n }\n }\n return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options);\n }\n async presign(originalRequest, options = {}) {\n if (options.signingRegion === \"*\") {\n const signer = this.getSigv4aSigner();\n const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;\n if (CrtSignerV4 && signer instanceof CrtSignerV4) {\n return signer.presign(originalRequest, options);\n }\n else {\n throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. ` +\n `Please check whether you have installed the \"@aws-sdk/signature-v4-crt\" package explicitly. ` +\n `You must also register the package by calling [require(\"@aws-sdk/signature-v4-crt\");] ` +\n `or an ESM equivalent such as [import \"@aws-sdk/signature-v4-crt\";]. ` +\n `For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);\n }\n }\n return this.sigv4Signer.presign(originalRequest, options);\n }\n async presignWithCredentials(originalRequest, credentials, options = {}) {\n if (options.signingRegion === \"*\") {\n throw new Error(\"Method presignWithCredentials is not supported for [signingRegion=*].\");\n }\n return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options);\n }\n getSigv4aSigner() {\n if (!this.sigv4aSigner) {\n const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;\n const JsSigV4aSigner = signatureV4aContainer.SignatureV4a;\n if (this.signerOptions.runtime === \"node\") {\n if (!CrtSignerV4 && !JsSigV4aSigner) {\n throw new Error(\"Neither CRT nor JS SigV4a implementation is available. \" +\n \"Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. \" +\n \"For more information please go to \" +\n \"https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt\");\n }\n if (CrtSignerV4 && typeof CrtSignerV4 === \"function\") {\n this.sigv4aSigner = new CrtSignerV4({\n ...this.signerOptions,\n signingAlgorithm: 1,\n });\n }\n else if (JsSigV4aSigner && typeof JsSigV4aSigner === \"function\") {\n this.sigv4aSigner = new JsSigV4aSigner({\n ...this.signerOptions,\n });\n }\n else {\n throw new Error(\"Available SigV4a implementation is not a valid constructor. \" +\n \"Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.\" +\n \"For more information please go to \" +\n \"https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt\");\n }\n }\n else {\n if (!JsSigV4aSigner || typeof JsSigV4aSigner !== \"function\") {\n throw new Error(\"JS SigV4a implementation is not available or not a valid constructor. \" +\n \"Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. \" +\n \"You must also register the package by calling [require('@aws-sdk/signature-v4a');] \" +\n \"or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. \" +\n \"For more information please go to \" +\n \"https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a\");\n }\n this.sigv4aSigner = new JsSigV4aSigner({\n ...this.signerOptions,\n });\n }\n }\n return this.sigv4aSigner;\n }\n}\n", "export * from \"./SignatureV4MultiRegion\";\nexport * from \"./signature-v4-crt-container\";\n", "const cs = \"required\", ct = \"type\", cu = \"rules\", cv = \"conditions\", cw = \"fn\", cx = \"argv\", cy = \"ref\", cz = \"assign\", cA = \"url\", cB = \"properties\", cC = \"backend\", cD = \"authSchemes\", cE = \"disableDoubleEncoding\", cF = \"signingName\", cG = \"signingRegion\", cH = \"headers\", cI = \"signingRegionSet\";\nconst a = 6, b = false, c = true, d = \"isSet\", e = \"booleanEquals\", f = \"error\", g = \"aws.partition\", h = \"stringEquals\", i = \"getAttr\", j = \"name\", k = \"substring\", l = \"bucketSuffix\", m = \"parseURL\", n = \"endpoint\", o = \"tree\", p = \"aws.isVirtualHostableS3Bucket\", q = \"{url#scheme}://{Bucket}.{url#authority}{url#path}\", r = \"not\", s = \"accessPointSuffix\", t = \"{url#scheme}://{url#authority}{url#path}\", u = \"hardwareType\", v = \"regionPrefix\", w = \"bucketAliasSuffix\", x = \"outpostId\", y = \"isValidHostLabel\", z = \"sigv4a\", A = \"s3-outposts\", B = \"s3\", C = \"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}\", D = \"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}\", E = \"https://{Bucket}.s3.{partitionResult#dnsSuffix}\", F = \"aws.parseArn\", G = \"bucketArn\", H = \"arnType\", I = \"\", J = \"s3-object-lambda\", K = \"accesspoint\", L = \"accessPointName\", M = \"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}\", N = \"mrapPartition\", O = \"outpostType\", P = \"arnPrefix\", Q = \"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}\", R = \"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", S = \"https://s3.{partitionResult#dnsSuffix}\", T = { [cs]: false, [ct]: \"string\" }, U = { [cs]: true, \"default\": false, [ct]: \"boolean\" }, V = { [cs]: false, [ct]: \"boolean\" }, W = { [cw]: e, [cx]: [{ [cy]: \"Accelerate\" }, true] }, X = { [cw]: e, [cx]: [{ [cy]: \"UseFIPS\" }, true] }, Y = { [cw]: e, [cx]: [{ [cy]: \"UseDualStack\" }, true] }, Z = { [cw]: d, [cx]: [{ [cy]: \"Endpoint\" }] }, aa = { [cw]: g, [cx]: [{ [cy]: \"Region\" }], [cz]: \"partitionResult\" }, ab = { [cw]: h, [cx]: [{ [cw]: i, [cx]: [{ [cy]: \"partitionResult\" }, j] }, \"aws-cn\"] }, ac = { [cw]: d, [cx]: [{ [cy]: \"Bucket\" }] }, ad = { [cy]: \"Bucket\" }, ae = { [cv]: [W], [f]: \"S3Express does not support S3 Accelerate.\", [ct]: f }, af = { [cv]: [Z, { [cw]: m, [cx]: [{ [cy]: \"Endpoint\" }], [cz]: \"url\" }], [cu]: [{ [cv]: [{ [cw]: d, [cx]: [{ [cy]: \"DisableS3ExpressSessionAuth\" }] }, { [cw]: e, [cx]: [{ [cy]: \"DisableS3ExpressSessionAuth\" }, true] }], [cu]: [{ [cv]: [{ [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: \"url\" }, \"isIp\"] }, true] }], [cu]: [{ [cv]: [{ [cw]: \"uriEncode\", [cx]: [ad], [cz]: \"uri_encoded_bucket\" }], [cu]: [{ [n]: { [cA]: \"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: p, [cx]: [ad, false] }], [cu]: [{ [n]: { [cA]: q, [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }], [ct]: o }, { [f]: \"S3Express bucket name is not a valid virtual hostable name.\", [ct]: f }], [ct]: o }, { [cv]: [{ [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: \"url\" }, \"isIp\"] }, true] }], [cu]: [{ [cv]: [{ [cw]: \"uriEncode\", [cx]: [ad], [cz]: \"uri_encoded_bucket\" }], [cu]: [{ [n]: { [cA]: \"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: p, [cx]: [ad, false] }], [cu]: [{ [n]: { [cA]: q, [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }], [ct]: o }, { [f]: \"S3Express bucket name is not a valid virtual hostable name.\", [ct]: f }], [ct]: o }, ag = { [cw]: m, [cx]: [{ [cy]: \"Endpoint\" }], [cz]: \"url\" }, ah = { [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: \"url\" }, \"isIp\"] }, true] }, ai = { [cy]: \"url\" }, aj = { [cw]: \"uriEncode\", [cx]: [ad], [cz]: \"uri_encoded_bucket\" }, ak = { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, al = {}, am = { [cw]: p, [cx]: [ad, false] }, an = { [f]: \"S3Express bucket name is not a valid virtual hostable name.\", [ct]: f }, ao = { [cw]: d, [cx]: [{ [cy]: \"UseS3ExpressControlEndpoint\" }] }, ap = { [cw]: e, [cx]: [{ [cy]: \"UseS3ExpressControlEndpoint\" }, true] }, aq = { [cw]: r, [cx]: [Z] }, ar = { [cw]: e, [cx]: [{ [cy]: \"UseDualStack\" }, false] }, as = { [cw]: e, [cx]: [{ [cy]: \"UseFIPS\" }, false] }, at = { [f]: \"Unrecognized S3Express bucket name format.\", [ct]: f }, au = { [cw]: r, [cx]: [ac] }, av = { [cy]: u }, aw = { [cv]: [aq], [f]: \"Expected a endpoint to be specified but no endpoint was found\", [ct]: f }, ax = { [cD]: [{ [cE]: true, [j]: z, [cF]: A, [cI]: [\"*\"] }, { [cE]: true, [j]: \"sigv4\", [cF]: A, [cG]: \"{Region}\" }] }, ay = { [cw]: e, [cx]: [{ [cy]: \"ForcePathStyle\" }, false] }, az = { [cy]: \"ForcePathStyle\" }, aA = { [cw]: e, [cx]: [{ [cy]: \"Accelerate\" }, false] }, aB = { [cw]: h, [cx]: [{ [cy]: \"Region\" }, \"aws-global\"] }, aC = { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: B, [cG]: \"us-east-1\" }] }, aD = { [cw]: r, [cx]: [aB] }, aE = { [cw]: e, [cx]: [{ [cy]: \"UseGlobalEndpoint\" }, true] }, aF = { [cA]: \"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: B, [cG]: \"{Region}\" }] }, [cH]: {} }, aG = { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: B, [cG]: \"{Region}\" }] }, aH = { [cw]: e, [cx]: [{ [cy]: \"UseGlobalEndpoint\" }, false] }, aI = { [cA]: \"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, aJ = { [cA]: \"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, aK = { [cA]: \"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, aL = { [cw]: e, [cx]: [{ [cw]: i, [cx]: [ai, \"isIp\"] }, false] }, aM = { [cA]: C, [cB]: aG, [cH]: {} }, aN = { [cA]: q, [cB]: aG, [cH]: {} }, aO = { [n]: aN, [ct]: n }, aP = { [cA]: D, [cB]: aG, [cH]: {} }, aQ = { [cA]: \"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, aR = { [f]: \"Invalid region: region was not a valid DNS name.\", [ct]: f }, aS = { [cy]: G }, aT = { [cy]: H }, aU = { [cw]: i, [cx]: [aS, \"service\"] }, aV = { [cy]: L }, aW = { [cv]: [Y], [f]: \"S3 Object Lambda does not support Dual-stack\", [ct]: f }, aX = { [cv]: [W], [f]: \"S3 Object Lambda does not support S3 Accelerate\", [ct]: f }, aY = { [cv]: [{ [cw]: d, [cx]: [{ [cy]: \"DisableAccessPoints\" }] }, { [cw]: e, [cx]: [{ [cy]: \"DisableAccessPoints\" }, true] }], [f]: \"Access points are not supported for this operation\", [ct]: f }, aZ = { [cv]: [{ [cw]: d, [cx]: [{ [cy]: \"UseArnRegion\" }] }, { [cw]: e, [cx]: [{ [cy]: \"UseArnRegion\" }, false] }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [aS, \"region\"] }, \"{Region}\"] }] }], [f]: \"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`\", [ct]: f }, ba = { [cw]: i, [cx]: [{ [cy]: \"bucketPartition\" }, j] }, bb = { [cw]: i, [cx]: [aS, \"accountId\"] }, bc = { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: J, [cG]: \"{bucketArn#region}\" }] }, bd = { [f]: \"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`\", [ct]: f }, be = { [f]: \"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`\", [ct]: f }, bf = { [f]: \"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)\", [ct]: f }, bg = { [f]: \"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`\", [ct]: f }, bh = { [f]: \"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.\", [ct]: f }, bi = { [f]: \"Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided\", [ct]: f }, bj = { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: B, [cG]: \"{bucketArn#region}\" }] }, bk = { [cD]: [{ [cE]: true, [j]: z, [cF]: A, [cI]: [\"*\"] }, { [cE]: true, [j]: \"sigv4\", [cF]: A, [cG]: \"{bucketArn#region}\" }] }, bl = { [cw]: F, [cx]: [ad] }, bm = { [cA]: \"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aG, [cH]: {} }, bn = { [cA]: \"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aG, [cH]: {} }, bo = { [cA]: \"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aG, [cH]: {} }, bp = { [cA]: Q, [cB]: aG, [cH]: {} }, bq = { [cA]: \"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aG, [cH]: {} }, br = { [cy]: \"UseObjectLambdaEndpoint\" }, bs = { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: J, [cG]: \"{Region}\" }] }, bt = { [cA]: \"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, bu = { [cA]: \"https://s3-fips.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, bv = { [cA]: \"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, bw = { [cA]: t, [cB]: aG, [cH]: {} }, bx = { [cA]: \"https://s3.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, by = [{ [cy]: \"Region\" }], bz = [{ [cy]: \"Endpoint\" }], bA = [ad], bB = [W], bC = [Z, ag], bD = [{ [cw]: d, [cx]: [{ [cy]: \"DisableS3ExpressSessionAuth\" }] }, { [cw]: e, [cx]: [{ [cy]: \"DisableS3ExpressSessionAuth\" }, true] }], bE = [aj], bF = [am], bG = [aa], bH = [X, Y], bI = [X, ar], bJ = [as, Y], bK = [as, ar], bL = [{ [cw]: k, [cx]: [ad, 6, 14, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 14, 16, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bM = [{ [cv]: [X, Y], [n]: { [cA]: \"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bI, [n]: { [cA]: \"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bJ, [n]: { [cA]: \"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bK, [n]: { [cA]: \"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: {} }, [ct]: n }], bN = [{ [cw]: k, [cx]: [ad, 6, 15, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 15, 17, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bO = [{ [cw]: k, [cx]: [ad, 6, 19, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 19, 21, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bP = [{ [cw]: k, [cx]: [ad, 6, 20, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 20, 22, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bQ = [{ [cw]: k, [cx]: [ad, 6, 26, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 26, 28, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bR = [{ [cv]: [X, Y], [n]: { [cA]: \"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }, { [cv]: bI, [n]: { [cA]: \"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }, { [cv]: bJ, [n]: { [cA]: \"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }, { [cv]: bK, [n]: { [cA]: \"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }], bS = [ad, 0, 7, true], bT = [{ [cw]: k, [cx]: [ad, 7, 15, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 15, 17, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bU = [{ [cw]: k, [cx]: [ad, 7, 16, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 16, 18, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bV = [{ [cw]: k, [cx]: [ad, 7, 20, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 20, 22, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bW = [{ [cw]: k, [cx]: [ad, 7, 21, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 21, 23, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bX = [{ [cw]: k, [cx]: [ad, 7, 27, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 27, 29, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bY = [ac], bZ = [{ [cw]: y, [cx]: [{ [cy]: x }, false] }], ca = [{ [cw]: h, [cx]: [{ [cy]: v }, \"beta\"] }], cb = [\"*\"], cc = [{ [cw]: y, [cx]: [{ [cy]: \"Region\" }, false] }], cd = [{ [cw]: h, [cx]: [{ [cy]: \"Region\" }, \"us-east-1\"] }], ce = [{ [cw]: h, [cx]: [aT, K] }], cf = [{ [cw]: i, [cx]: [aS, \"resourceId[1]\"], [cz]: L }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [aV, I] }] }], cg = [aS, \"resourceId[1]\"], ch = [Y], ci = [{ [cw]: r, [cx]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [aS, \"region\"] }, I] }] }], cj = [{ [cw]: r, [cx]: [{ [cw]: d, [cx]: [{ [cw]: i, [cx]: [aS, \"resourceId[2]\"] }] }] }], ck = [aS, \"resourceId[2]\"], cl = [{ [cw]: g, [cx]: [{ [cw]: i, [cx]: [aS, \"region\"] }], [cz]: \"bucketPartition\" }], cm = [{ [cw]: h, [cx]: [ba, { [cw]: i, [cx]: [{ [cy]: \"partitionResult\" }, j] }] }], cn = [{ [cw]: y, [cx]: [{ [cw]: i, [cx]: [aS, \"region\"] }, true] }], co = [{ [cw]: y, [cx]: [bb, false] }], cp = [{ [cw]: y, [cx]: [aV, false] }], cq = [X], cr = [{ [cw]: y, [cx]: [{ [cy]: \"Region\" }, true] }];\nconst _data = { version: \"1.0\", parameters: { Bucket: T, Region: T, UseFIPS: U, UseDualStack: U, Endpoint: T, ForcePathStyle: U, Accelerate: U, UseGlobalEndpoint: U, UseObjectLambdaEndpoint: V, Key: T, Prefix: T, CopySource: T, DisableAccessPoints: V, DisableMultiRegionAccessPoints: U, UseArnRegion: V, UseS3ExpressControlEndpoint: V, DisableS3ExpressSessionAuth: V }, [cu]: [{ [cv]: [{ [cw]: d, [cx]: by }], [cu]: [{ [cv]: [W, X], error: \"Accelerate cannot be used with FIPS\", [ct]: f }, { [cv]: [Y, Z], error: \"Cannot set dual-stack in combination with a custom endpoint.\", [ct]: f }, { [cv]: [Z, X], error: \"A custom endpoint cannot be combined with FIPS\", [ct]: f }, { [cv]: [Z, W], error: \"A custom endpoint cannot be combined with S3 Accelerate\", [ct]: f }, { [cv]: [X, aa, ab], error: \"Partition does not support FIPS\", [ct]: f }, { [cv]: [ac, { [cw]: k, [cx]: [ad, 0, a, c], [cz]: l }, { [cw]: h, [cx]: [{ [cy]: l }, \"--x-s3\"] }], [cu]: [ae, af, { [cv]: [ao, ap], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [aj, aq], [cu]: [{ [cv]: bH, endpoint: { [cA]: \"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: \"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: \"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: \"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: ak, [cH]: al }, [ct]: n }], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: bF, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bD, [cu]: [{ [cv]: bL, [cu]: bM, [ct]: o }, { [cv]: bN, [cu]: bM, [ct]: o }, { [cv]: bO, [cu]: bM, [ct]: o }, { [cv]: bP, [cu]: bM, [ct]: o }, { [cv]: bQ, [cu]: bM, [ct]: o }, at], [ct]: o }, { [cv]: bL, [cu]: bR, [ct]: o }, { [cv]: bN, [cu]: bR, [ct]: o }, { [cv]: bO, [cu]: bR, [ct]: o }, { [cv]: bP, [cu]: bR, [ct]: o }, { [cv]: bQ, [cu]: bR, [ct]: o }, at], [ct]: o }], [ct]: o }, an], [ct]: o }, { [cv]: [ac, { [cw]: k, [cx]: bS, [cz]: s }, { [cw]: h, [cx]: [{ [cy]: s }, \"--xa-s3\"] }], [cu]: [ae, af, { [cv]: bF, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bD, [cu]: [{ [cv]: bT, [cu]: bM, [ct]: o }, { [cv]: bU, [cu]: bM, [ct]: o }, { [cv]: bV, [cu]: bM, [ct]: o }, { [cv]: bW, [cu]: bM, [ct]: o }, { [cv]: bX, [cu]: bM, [ct]: o }, at], [ct]: o }, { [cv]: bT, [cu]: bR, [ct]: o }, { [cv]: bU, [cu]: bR, [ct]: o }, { [cv]: bV, [cu]: bR, [ct]: o }, { [cv]: bW, [cu]: bR, [ct]: o }, { [cv]: bX, [cu]: bR, [ct]: o }, at], [ct]: o }], [ct]: o }, an], [ct]: o }, { [cv]: [au, ao, ap], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bC, endpoint: { [cA]: t, [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bH, endpoint: { [cA]: \"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: \"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: \"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: \"https://s3express-control.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: al }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [ac, { [cw]: k, [cx]: [ad, 49, 50, c], [cz]: u }, { [cw]: k, [cx]: [ad, 8, 12, c], [cz]: v }, { [cw]: k, [cx]: bS, [cz]: w }, { [cw]: k, [cx]: [ad, 32, 49, c], [cz]: x }, { [cw]: g, [cx]: by, [cz]: \"regionPartition\" }, { [cw]: h, [cx]: [{ [cy]: w }, \"--op-s3\"] }], [cu]: [{ [cv]: bZ, [cu]: [{ [cv]: bF, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [av, \"e\"] }], [cu]: [{ [cv]: ca, [cu]: [aw, { [cv]: bC, endpoint: { [cA]: \"https://{Bucket}.ec2.{url#authority}\", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { endpoint: { [cA]: \"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}\", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { [cv]: [{ [cw]: h, [cx]: [av, \"o\"] }], [cu]: [{ [cv]: ca, [cu]: [aw, { [cv]: bC, endpoint: { [cA]: \"https://{Bucket}.op-{outpostId}.{url#authority}\", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { endpoint: { [cA]: \"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}\", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { error: \"Unrecognized hardware type: \\\"Expected hardware type o or e but got {hardwareType}\\\"\", [ct]: f }], [ct]: o }, { error: \"Invalid Outposts Bucket alias - it must be a valid bucket name.\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.\", [ct]: f }], [ct]: o }, { [cv]: bY, [cu]: [{ [cv]: [Z, { [cw]: r, [cx]: [{ [cw]: d, [cx]: [{ [cw]: m, [cx]: bz }] }] }], error: \"Custom endpoint `{Endpoint}` was not a valid URI\", [ct]: f }, { [cv]: [ay, am], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cc, [cu]: [{ [cv]: [W, ab], error: \"S3 Accelerate cannot be used in this region\", [ct]: f }, { [cv]: [Y, X, aA, aq, aB], endpoint: { [cA]: \"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, X, aA, aq, aD, aE], [cu]: [{ endpoint: aF, [ct]: n }], [ct]: o }, { [cv]: [Y, X, aA, aq, aD, aH], endpoint: aF, [ct]: n }, { [cv]: [ar, X, aA, aq, aB], endpoint: { [cA]: \"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, X, aA, aq, aD, aE], [cu]: [{ endpoint: aI, [ct]: n }], [ct]: o }, { [cv]: [ar, X, aA, aq, aD, aH], endpoint: aI, [ct]: n }, { [cv]: [Y, as, W, aq, aB], endpoint: { [cA]: \"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, as, W, aq, aD, aE], [cu]: [{ endpoint: aJ, [ct]: n }], [ct]: o }, { [cv]: [Y, as, W, aq, aD, aH], endpoint: aJ, [ct]: n }, { [cv]: [Y, as, aA, aq, aB], endpoint: { [cA]: \"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, as, aA, aq, aD, aE], [cu]: [{ endpoint: aK, [ct]: n }], [ct]: o }, { [cv]: [Y, as, aA, aq, aD, aH], endpoint: aK, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, ah, aB], endpoint: { [cA]: C, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, aL, aB], endpoint: { [cA]: q, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, ah, aD, aE], [cu]: [{ [cv]: cd, endpoint: aM, [ct]: n }, { endpoint: aM, [ct]: n }], [ct]: o }, { [cv]: [ar, as, aA, Z, ag, aL, aD, aE], [cu]: [{ [cv]: cd, endpoint: aN, [ct]: n }, aO], [ct]: o }, { [cv]: [ar, as, aA, Z, ag, ah, aD, aH], endpoint: aM, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, aL, aD, aH], endpoint: aN, [ct]: n }, { [cv]: [ar, as, W, aq, aB], endpoint: { [cA]: D, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, W, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: aP, [ct]: n }, { endpoint: aP, [ct]: n }], [ct]: o }, { [cv]: [ar, as, W, aq, aD, aH], endpoint: aP, [ct]: n }, { [cv]: [ar, as, aA, aq, aB], endpoint: { [cA]: E, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: E, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: aQ, [ct]: n }], [ct]: o }, { [cv]: [ar, as, aA, aq, aD, aH], endpoint: aQ, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [Z, ag, { [cw]: h, [cx]: [{ [cw]: i, [cx]: [ai, \"scheme\"] }, \"http\"] }, { [cw]: p, [cx]: [ad, c] }, ay, as, ar, aA], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cc, [cu]: [aO], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [ay, { [cw]: F, [cx]: bA, [cz]: G }], [cu]: [{ [cv]: [{ [cw]: i, [cx]: [aS, \"resourceId[0]\"], [cz]: H }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [aT, I] }] }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [aU, J] }], [cu]: [{ [cv]: ce, [cu]: [{ [cv]: cf, [cu]: [aW, aX, { [cv]: ci, [cu]: [aY, { [cv]: cj, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cm, [cu]: [{ [cv]: cn, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [bb, I] }], error: \"Invalid ARN: Missing account id\", [ct]: f }, { [cv]: co, [cu]: [{ [cv]: cp, [cu]: [{ [cv]: bC, endpoint: { [cA]: M, [cB]: bc, [cH]: al }, [ct]: n }, { [cv]: cq, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bc, [cH]: al }, [ct]: n }, { endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bc, [cH]: al }, [ct]: n }], [ct]: o }, bd], [ct]: o }, be], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, bh], [ct]: o }, { error: \"Invalid ARN: bucket ARN is missing a region\", [ct]: f }], [ct]: o }, bi], [ct]: o }, { error: \"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`\", [ct]: f }], [ct]: o }, { [cv]: ce, [cu]: [{ [cv]: cf, [cu]: [{ [cv]: ci, [cu]: [{ [cv]: ce, [cu]: [{ [cv]: ci, [cu]: [aY, { [cv]: cj, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [ba, \"{partitionResult#name}\"] }], [cu]: [{ [cv]: cn, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [aU, B] }], [cu]: [{ [cv]: co, [cu]: [{ [cv]: cp, [cu]: [{ [cv]: bB, error: \"Access Points do not support S3 Accelerate\", [ct]: f }, { [cv]: bH, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: [as, ar, Z, ag], endpoint: { [cA]: M, [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bj, [cH]: al }, [ct]: n }], [ct]: o }, bd], [ct]: o }, be], [ct]: o }, { error: \"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}\", [ct]: f }], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, bh], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: y, [cx]: [aV, c] }], [cu]: [{ [cv]: ch, error: \"S3 MRAP does not support dual-stack\", [ct]: f }, { [cv]: cq, error: \"S3 MRAP does not support FIPS\", [ct]: f }, { [cv]: bB, error: \"S3 MRAP does not support S3 Accelerate\", [ct]: f }, { [cv]: [{ [cw]: e, [cx]: [{ [cy]: \"DisableMultiRegionAccessPoints\" }, c] }], error: \"Invalid configuration: Multi-Region Access Point ARNs are disabled.\", [ct]: f }, { [cv]: [{ [cw]: g, [cx]: by, [cz]: N }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [{ [cy]: N }, j] }, { [cw]: i, [cx]: [aS, \"partition\"] }] }], [cu]: [{ endpoint: { [cA]: \"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}\", [cB]: { [cD]: [{ [cE]: c, name: z, [cF]: B, [cI]: cb }] }, [cH]: al }, [ct]: n }], [ct]: o }, { error: \"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`\", [ct]: f }], [ct]: o }], [ct]: o }, { error: \"Invalid Access Point Name\", [ct]: f }], [ct]: o }, bi], [ct]: o }, { [cv]: [{ [cw]: h, [cx]: [aU, A] }], [cu]: [{ [cv]: ch, error: \"S3 Outposts does not support Dual-stack\", [ct]: f }, { [cv]: cq, error: \"S3 Outposts does not support FIPS\", [ct]: f }, { [cv]: bB, error: \"S3 Outposts does not support S3 Accelerate\", [ct]: f }, { [cv]: [{ [cw]: d, [cx]: [{ [cw]: i, [cx]: [aS, \"resourceId[4]\"] }] }], error: \"Invalid Arn: Outpost Access Point ARN contains sub resources\", [ct]: f }, { [cv]: [{ [cw]: i, [cx]: cg, [cz]: x }], [cu]: [{ [cv]: bZ, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cm, [cu]: [{ [cv]: cn, [cu]: [{ [cv]: co, [cu]: [{ [cv]: [{ [cw]: i, [cx]: ck, [cz]: O }], [cu]: [{ [cv]: [{ [cw]: i, [cx]: [aS, \"resourceId[3]\"], [cz]: L }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [{ [cy]: O }, K] }], [cu]: [{ [cv]: bC, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}\", [cB]: bk, [cH]: al }, [ct]: n }, { endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bk, [cH]: al }, [ct]: n }], [ct]: o }, { error: \"Expected an outpost type `accesspoint`, found {outpostType}\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: expected an access point name\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: Expected a 4-component resource\", [ct]: f }], [ct]: o }, be], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, { error: \"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: The Outpost Id was not set\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: No ARN type specified\", [ct]: f }], [ct]: o }, { [cv]: [{ [cw]: k, [cx]: [ad, 0, 4, b], [cz]: P }, { [cw]: h, [cx]: [{ [cy]: P }, \"arn:\"] }, { [cw]: r, [cx]: [{ [cw]: d, [cx]: [bl] }] }], error: \"Invalid ARN: `{Bucket}` was not a valid ARN\", [ct]: f }, { [cv]: [{ [cw]: e, [cx]: [az, c] }, bl], error: \"Path-style addressing cannot be used with ARN buckets\", [ct]: f }, { [cv]: bE, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [aA], [cu]: [{ [cv]: [Y, aq, X, aB], endpoint: { [cA]: \"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, aq, X, aD, aE], [cu]: [{ endpoint: bm, [ct]: n }], [ct]: o }, { [cv]: [Y, aq, X, aD, aH], endpoint: bm, [ct]: n }, { [cv]: [ar, aq, X, aB], endpoint: { [cA]: \"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, aq, X, aD, aE], [cu]: [{ endpoint: bn, [ct]: n }], [ct]: o }, { [cv]: [ar, aq, X, aD, aH], endpoint: bn, [ct]: n }, { [cv]: [Y, aq, as, aB], endpoint: { [cA]: \"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, aq, as, aD, aE], [cu]: [{ endpoint: bo, [ct]: n }], [ct]: o }, { [cv]: [Y, aq, as, aD, aH], endpoint: bo, [ct]: n }, { [cv]: [ar, Z, ag, as, aB], endpoint: { [cA]: Q, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, Z, ag, as, aD, aE], [cu]: [{ [cv]: cd, endpoint: bp, [ct]: n }, { endpoint: bp, [ct]: n }], [ct]: o }, { [cv]: [ar, Z, ag, as, aD, aH], endpoint: bp, [ct]: n }, { [cv]: [ar, aq, as, aB], endpoint: { [cA]: R, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, aq, as, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: R, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: bq, [ct]: n }], [ct]: o }, { [cv]: [ar, aq, as, aD, aH], endpoint: bq, [ct]: n }], [ct]: o }, { error: \"Path-style addressing cannot be used with S3 Accelerate\", [ct]: f }], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: d, [cx]: [br] }, { [cw]: e, [cx]: [br, c] }], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cr, [cu]: [aW, aX, { [cv]: bC, endpoint: { [cA]: t, [cB]: bs, [cH]: al }, [ct]: n }, { [cv]: cq, endpoint: { [cA]: \"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}\", [cB]: bs, [cH]: al }, [ct]: n }, { endpoint: { [cA]: \"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}\", [cB]: bs, [cH]: al }, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [au], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cr, [cu]: [{ [cv]: [X, Y, aq, aB], endpoint: { [cA]: \"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [X, Y, aq, aD, aE], [cu]: [{ endpoint: bt, [ct]: n }], [ct]: o }, { [cv]: [X, Y, aq, aD, aH], endpoint: bt, [ct]: n }, { [cv]: [X, ar, aq, aB], endpoint: { [cA]: \"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [X, ar, aq, aD, aE], [cu]: [{ endpoint: bu, [ct]: n }], [ct]: o }, { [cv]: [X, ar, aq, aD, aH], endpoint: bu, [ct]: n }, { [cv]: [as, Y, aq, aB], endpoint: { [cA]: \"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, Y, aq, aD, aE], [cu]: [{ endpoint: bv, [ct]: n }], [ct]: o }, { [cv]: [as, Y, aq, aD, aH], endpoint: bv, [ct]: n }, { [cv]: [as, ar, Z, ag, aB], endpoint: { [cA]: t, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, ar, Z, ag, aD, aE], [cu]: [{ [cv]: cd, endpoint: bw, [ct]: n }, { endpoint: bw, [ct]: n }], [ct]: o }, { [cv]: [as, ar, Z, ag, aD, aH], endpoint: bw, [ct]: n }, { [cv]: [as, ar, aq, aB], endpoint: { [cA]: S, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, ar, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: S, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: bx, [ct]: n }], [ct]: o }, { [cv]: [as, ar, aq, aD, aH], endpoint: bx, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }], [ct]: o }, { error: \"A region must be set when sending requests to S3.\", [ct]: f }] };\nexport const ruleSet = _data;\n", "import { awsEndpointFunctions } from \"@aws-sdk/util-endpoints\";\nimport { customEndpointFunctions, EndpointCache, resolveEndpoint } from \"@smithy/util-endpoints\";\nimport { ruleSet } from \"./ruleset\";\nconst cache = new EndpointCache({\n size: 50,\n params: [\n \"Accelerate\",\n \"Bucket\",\n \"DisableAccessPoints\",\n \"DisableMultiRegionAccessPoints\",\n \"DisableS3ExpressSessionAuth\",\n \"Endpoint\",\n \"ForcePathStyle\",\n \"Region\",\n \"UseArnRegion\",\n \"UseDualStack\",\n \"UseFIPS\",\n \"UseGlobalEndpoint\",\n \"UseObjectLambdaEndpoint\",\n \"UseS3ExpressControlEndpoint\",\n ],\n});\nexport const defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n", "import { resolveAwsSdkSigV4AConfig, resolveAwsSdkSigV4Config, } from \"@aws-sdk/core\";\nimport { SignatureV4MultiRegion } from \"@aws-sdk/signature-v4-multi-region\";\nimport { resolveParams } from \"@smithy/middleware-endpoint\";\nimport { getSmithyContext, normalizeProvider } from \"@smithy/util-middleware\";\nimport { defaultEndpointResolver } from \"../endpoint/endpointResolver\";\nconst createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {\n if (!input) {\n throw new Error(\"Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`\");\n }\n const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);\n const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor\n ?.getEndpointParameterInstructions;\n if (!instructionsFn) {\n throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);\n }\n const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);\n return Object.assign(defaultParameters, endpointParameters);\n};\nconst _defaultS3HttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: getSmithyContext(context).operation,\n region: await normalizeProvider(config.region)() || (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexport const defaultS3HttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultS3HttpAuthSchemeParametersProvider);\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"s3\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createAwsAuthSigv4aHttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4a\",\n signingProperties: {\n name: \"s3\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nconst createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {\n const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {\n const endpoint = defaultEndpointResolver(authParameters);\n const authSchemes = endpoint.properties?.authSchemes;\n if (!authSchemes) {\n return defaultHttpAuthSchemeResolver(authParameters);\n }\n const options = [];\n for (const scheme of authSchemes) {\n const { name: resolvedName, properties = {}, ...rest } = scheme;\n const name = resolvedName.toLowerCase();\n if (resolvedName !== name) {\n console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);\n }\n let schemeId;\n if (name === \"sigv4a\") {\n schemeId = \"aws.auth#sigv4a\";\n const sigv4Present = authSchemes.find((s) => {\n const name = s.name.toLowerCase();\n return name !== \"sigv4a\" && name.startsWith(\"sigv4\");\n });\n if (SignatureV4MultiRegion.sigv4aDependency() === \"none\" && sigv4Present) {\n continue;\n }\n }\n else if (name.startsWith(\"sigv4\")) {\n schemeId = \"aws.auth#sigv4\";\n }\n else {\n throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`);\n }\n const createOption = createHttpAuthOptionFunctions[schemeId];\n if (!createOption) {\n throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);\n }\n const option = createOption(authParameters);\n option.schemeId = schemeId;\n option.signingProperties = { ...(option.signingProperties || {}), ...rest, ...properties };\n options.push(option);\n }\n return options;\n };\n return endpointRuleSetHttpAuthSchemeProvider;\n};\nconst _defaultS3HttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexport const defaultS3HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultS3HttpAuthSchemeProvider, {\n \"aws.auth#sigv4\": createAwsAuthSigv4HttpAuthOption,\n \"aws.auth#sigv4a\": createAwsAuthSigv4aHttpAuthOption,\n});\nexport const resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = resolveAwsSdkSigV4Config(config);\n const config_1 = resolveAwsSdkSigV4AConfig(config_0);\n return Object.assign(config_1, {\n authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n", "const clientContextParamDefaults = {};\nexport const resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n forcePathStyle: options.forcePathStyle ?? false,\n useAccelerateEndpoint: options.useAccelerateEndpoint ?? false,\n useGlobalEndpoint: options.useGlobalEndpoint ?? false,\n disableMultiregionAccessPoints: options.disableMultiregionAccessPoints ?? false,\n defaultSigningName: \"s3\",\n clientContextParams: options.clientContextParams ?? {},\n });\n};\nexport const commonParams = {\n ForcePathStyle: { type: \"clientContextParams\", name: \"forcePathStyle\" },\n UseArnRegion: { type: \"clientContextParams\", name: \"useArnRegion\" },\n DisableMultiRegionAccessPoints: { type: \"clientContextParams\", name: \"disableMultiregionAccessPoints\" },\n Accelerate: { type: \"clientContextParams\", name: \"useAccelerateEndpoint\" },\n DisableS3ExpressSessionAuth: { type: \"clientContextParams\", name: \"disableS3ExpressSessionAuth\" },\n UseGlobalEndpoint: { type: \"builtInParams\", name: \"useGlobalEndpoint\" },\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n", "import { ServiceException as __ServiceException, } from \"@smithy/smithy-client\";\nexport { __ServiceException };\nexport class S3ServiceException extends __ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, S3ServiceException.prototype);\n }\n}\n", "import { S3ServiceException as __BaseException } from \"./S3ServiceException\";\nexport class NoSuchUpload extends __BaseException {\n name = \"NoSuchUpload\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NoSuchUpload\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NoSuchUpload.prototype);\n }\n}\nexport class AccessDenied extends __BaseException {\n name = \"AccessDenied\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"AccessDenied\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AccessDenied.prototype);\n }\n}\nexport class ObjectNotInActiveTierError extends __BaseException {\n name = \"ObjectNotInActiveTierError\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ObjectNotInActiveTierError\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ObjectNotInActiveTierError.prototype);\n }\n}\nexport class BucketAlreadyExists extends __BaseException {\n name = \"BucketAlreadyExists\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"BucketAlreadyExists\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, BucketAlreadyExists.prototype);\n }\n}\nexport class BucketAlreadyOwnedByYou extends __BaseException {\n name = \"BucketAlreadyOwnedByYou\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"BucketAlreadyOwnedByYou\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, BucketAlreadyOwnedByYou.prototype);\n }\n}\nexport class NoSuchBucket extends __BaseException {\n name = \"NoSuchBucket\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NoSuchBucket\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NoSuchBucket.prototype);\n }\n}\nexport class InvalidObjectState extends __BaseException {\n name = \"InvalidObjectState\";\n $fault = \"client\";\n StorageClass;\n AccessTier;\n constructor(opts) {\n super({\n name: \"InvalidObjectState\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidObjectState.prototype);\n this.StorageClass = opts.StorageClass;\n this.AccessTier = opts.AccessTier;\n }\n}\nexport class NoSuchKey extends __BaseException {\n name = \"NoSuchKey\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NoSuchKey\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NoSuchKey.prototype);\n }\n}\nexport class NotFound extends __BaseException {\n name = \"NotFound\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NotFound\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NotFound.prototype);\n }\n}\nexport class EncryptionTypeMismatch extends __BaseException {\n name = \"EncryptionTypeMismatch\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"EncryptionTypeMismatch\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, EncryptionTypeMismatch.prototype);\n }\n}\nexport class InvalidRequest extends __BaseException {\n name = \"InvalidRequest\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidRequest\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidRequest.prototype);\n }\n}\nexport class InvalidWriteOffset extends __BaseException {\n name = \"InvalidWriteOffset\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidWriteOffset\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidWriteOffset.prototype);\n }\n}\nexport class TooManyParts extends __BaseException {\n name = \"TooManyParts\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyParts\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyParts.prototype);\n }\n}\nexport class IdempotencyParameterMismatch extends __BaseException {\n name = \"IdempotencyParameterMismatch\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"IdempotencyParameterMismatch\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, IdempotencyParameterMismatch.prototype);\n }\n}\nexport class ObjectAlreadyInActiveTierError extends __BaseException {\n name = \"ObjectAlreadyInActiveTierError\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ObjectAlreadyInActiveTierError\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ObjectAlreadyInActiveTierError.prototype);\n }\n}\n", "const _A = \"Account\";\nconst _AAO = \"AnalyticsAndOperator\";\nconst _AC = \"AccelerateConfiguration\";\nconst _ACL = \"AccessControlList\";\nconst _ACL_ = \"ACL\";\nconst _ACLn = \"AnalyticsConfigurationList\";\nconst _ACP = \"AccessControlPolicy\";\nconst _ACT = \"AccessControlTranslation\";\nconst _ACn = \"AnalyticsConfiguration\";\nconst _AD = \"AccessDenied\";\nconst _ADb = \"AbortDate\";\nconst _AED = \"AnalyticsExportDestination\";\nconst _AF = \"AnalyticsFilter\";\nconst _AH = \"AllowedHeaders\";\nconst _AHl = \"AllowedHeader\";\nconst _AI = \"AccountId\";\nconst _AIMU = \"AbortIncompleteMultipartUpload\";\nconst _AKI = \"AccessKeyId\";\nconst _AM = \"AllowedMethods\";\nconst _AMU = \"AbortMultipartUpload\";\nconst _AMUO = \"AbortMultipartUploadOutput\";\nconst _AMUR = \"AbortMultipartUploadRequest\";\nconst _AMl = \"AllowedMethod\";\nconst _AO = \"AllowedOrigins\";\nconst _AOl = \"AllowedOrigin\";\nconst _APA = \"AccessPointAlias\";\nconst _APAc = \"AccessPointArn\";\nconst _AQRD = \"AllowQuotedRecordDelimiter\";\nconst _AR = \"AcceptRanges\";\nconst _ARI = \"AbortRuleId\";\nconst _AS = \"AbacStatus\";\nconst _ASBD = \"AnalyticsS3BucketDestination\";\nconst _ASSEBD = \"ApplyServerSideEncryptionByDefault\";\nconst _ASr = \"ArchiveStatus\";\nconst _AT = \"AccessTier\";\nconst _An = \"And\";\nconst _B = \"Bucket\";\nconst _BA = \"BucketArn\";\nconst _BAE = \"BucketAlreadyExists\";\nconst _BAI = \"BucketAccountId\";\nconst _BAOBY = \"BucketAlreadyOwnedByYou\";\nconst _BET = \"BlockedEncryptionTypes\";\nconst _BGR = \"BypassGovernanceRetention\";\nconst _BI = \"BucketInfo\";\nconst _BKE = \"BucketKeyEnabled\";\nconst _BLC = \"BucketLifecycleConfiguration\";\nconst _BLN = \"BucketLocationName\";\nconst _BLS = \"BucketLoggingStatus\";\nconst _BLT = \"BucketLocationType\";\nconst _BN = \"BucketNamespace\";\nconst _BNu = \"BucketName\";\nconst _BP = \"BytesProcessed\";\nconst _BPA = \"BlockPublicAcls\";\nconst _BPP = \"BlockPublicPolicy\";\nconst _BR = \"BucketRegion\";\nconst _BRy = \"BytesReturned\";\nconst _BS = \"BytesScanned\";\nconst _Bo = \"Body\";\nconst _Bu = \"Buckets\";\nconst _C = \"Checksum\";\nconst _CA = \"ChecksumAlgorithm\";\nconst _CACL = \"CannedACL\";\nconst _CB = \"CreateBucket\";\nconst _CBC = \"CreateBucketConfiguration\";\nconst _CBMC = \"CreateBucketMetadataConfiguration\";\nconst _CBMCR = \"CreateBucketMetadataConfigurationRequest\";\nconst _CBMTC = \"CreateBucketMetadataTableConfiguration\";\nconst _CBMTCR = \"CreateBucketMetadataTableConfigurationRequest\";\nconst _CBO = \"CreateBucketOutput\";\nconst _CBR = \"CreateBucketRequest\";\nconst _CC = \"CacheControl\";\nconst _CCRC = \"ChecksumCRC32\";\nconst _CCRCC = \"ChecksumCRC32C\";\nconst _CCRCNVME = \"ChecksumCRC64NVME\";\nconst _CC_ = \"Cache-Control\";\nconst _CD = \"CreationDate\";\nconst _CD_ = \"Content-Disposition\";\nconst _CDo = \"ContentDisposition\";\nconst _CE = \"ContinuationEvent\";\nconst _CE_ = \"Content-Encoding\";\nconst _CEo = \"ContentEncoding\";\nconst _CF = \"CloudFunction\";\nconst _CFC = \"CloudFunctionConfiguration\";\nconst _CL = \"ContentLanguage\";\nconst _CL_ = \"Content-Language\";\nconst _CL__ = \"Content-Length\";\nconst _CLo = \"ContentLength\";\nconst _CM = \"Content-MD5\";\nconst _CMD = \"ContentMD5\";\nconst _CMU = \"CompletedMultipartUpload\";\nconst _CMUO = \"CompleteMultipartUploadOutput\";\nconst _CMUOr = \"CreateMultipartUploadOutput\";\nconst _CMUR = \"CompleteMultipartUploadResult\";\nconst _CMURo = \"CompleteMultipartUploadRequest\";\nconst _CMURr = \"CreateMultipartUploadRequest\";\nconst _CMUo = \"CompleteMultipartUpload\";\nconst _CMUr = \"CreateMultipartUpload\";\nconst _CMh = \"ChecksumMode\";\nconst _CO = \"CopyObject\";\nconst _COO = \"CopyObjectOutput\";\nconst _COR = \"CopyObjectResult\";\nconst _CORSC = \"CORSConfiguration\";\nconst _CORSR = \"CORSRules\";\nconst _CORSRu = \"CORSRule\";\nconst _CORo = \"CopyObjectRequest\";\nconst _CP = \"CommonPrefix\";\nconst _CPL = \"CommonPrefixList\";\nconst _CPLo = \"CompletedPartList\";\nconst _CPR = \"CopyPartResult\";\nconst _CPo = \"CompletedPart\";\nconst _CPom = \"CommonPrefixes\";\nconst _CR = \"ContentRange\";\nconst _CRSBA = \"ConfirmRemoveSelfBucketAccess\";\nconst _CR_ = \"Content-Range\";\nconst _CS = \"CopySource\";\nconst _CSHA = \"ChecksumSHA1\";\nconst _CSHAh = \"ChecksumSHA256\";\nconst _CSIM = \"CopySourceIfMatch\";\nconst _CSIMS = \"CopySourceIfModifiedSince\";\nconst _CSINM = \"CopySourceIfNoneMatch\";\nconst _CSIUS = \"CopySourceIfUnmodifiedSince\";\nconst _CSO = \"CreateSessionOutput\";\nconst _CSR = \"CreateSessionResult\";\nconst _CSRo = \"CopySourceRange\";\nconst _CSRr = \"CreateSessionRequest\";\nconst _CSSSECA = \"CopySourceSSECustomerAlgorithm\";\nconst _CSSSECK = \"CopySourceSSECustomerKey\";\nconst _CSSSECKMD = \"CopySourceSSECustomerKeyMD5\";\nconst _CSV = \"CSV\";\nconst _CSVI = \"CopySourceVersionId\";\nconst _CSVIn = \"CSVInput\";\nconst _CSVO = \"CSVOutput\";\nconst _CSo = \"ConfigurationState\";\nconst _CSr = \"CreateSession\";\nconst _CT = \"ChecksumType\";\nconst _CT_ = \"Content-Type\";\nconst _CTl = \"ClientToken\";\nconst _CTo = \"ContentType\";\nconst _CTom = \"CompressionType\";\nconst _CTon = \"ContinuationToken\";\nconst _Co = \"Condition\";\nconst _Cod = \"Code\";\nconst _Com = \"Comments\";\nconst _Con = \"Contents\";\nconst _Cont = \"Cont\";\nconst _Cr = \"Credentials\";\nconst _D = \"Days\";\nconst _DAI = \"DaysAfterInitiation\";\nconst _DB = \"DeleteBucket\";\nconst _DBAC = \"DeleteBucketAnalyticsConfiguration\";\nconst _DBACR = \"DeleteBucketAnalyticsConfigurationRequest\";\nconst _DBC = \"DeleteBucketCors\";\nconst _DBCR = \"DeleteBucketCorsRequest\";\nconst _DBE = \"DeleteBucketEncryption\";\nconst _DBER = \"DeleteBucketEncryptionRequest\";\nconst _DBIC = \"DeleteBucketInventoryConfiguration\";\nconst _DBICR = \"DeleteBucketInventoryConfigurationRequest\";\nconst _DBITC = \"DeleteBucketIntelligentTieringConfiguration\";\nconst _DBITCR = \"DeleteBucketIntelligentTieringConfigurationRequest\";\nconst _DBL = \"DeleteBucketLifecycle\";\nconst _DBLR = \"DeleteBucketLifecycleRequest\";\nconst _DBMC = \"DeleteBucketMetadataConfiguration\";\nconst _DBMCR = \"DeleteBucketMetadataConfigurationRequest\";\nconst _DBMCRe = \"DeleteBucketMetricsConfigurationRequest\";\nconst _DBMCe = \"DeleteBucketMetricsConfiguration\";\nconst _DBMTC = \"DeleteBucketMetadataTableConfiguration\";\nconst _DBMTCR = \"DeleteBucketMetadataTableConfigurationRequest\";\nconst _DBOC = \"DeleteBucketOwnershipControls\";\nconst _DBOCR = \"DeleteBucketOwnershipControlsRequest\";\nconst _DBP = \"DeleteBucketPolicy\";\nconst _DBPR = \"DeleteBucketPolicyRequest\";\nconst _DBR = \"DeleteBucketRequest\";\nconst _DBRR = \"DeleteBucketReplicationRequest\";\nconst _DBRe = \"DeleteBucketReplication\";\nconst _DBT = \"DeleteBucketTagging\";\nconst _DBTR = \"DeleteBucketTaggingRequest\";\nconst _DBW = \"DeleteBucketWebsite\";\nconst _DBWR = \"DeleteBucketWebsiteRequest\";\nconst _DE = \"DataExport\";\nconst _DIM = \"DestinationIfMatch\";\nconst _DIMS = \"DestinationIfModifiedSince\";\nconst _DINM = \"DestinationIfNoneMatch\";\nconst _DIUS = \"DestinationIfUnmodifiedSince\";\nconst _DM = \"DeleteMarker\";\nconst _DME = \"DeleteMarkerEntry\";\nconst _DMR = \"DeleteMarkerReplication\";\nconst _DMVI = \"DeleteMarkerVersionId\";\nconst _DMe = \"DeleteMarkers\";\nconst _DN = \"DisplayName\";\nconst _DO = \"DeletedObject\";\nconst _DOO = \"DeleteObjectOutput\";\nconst _DOOe = \"DeleteObjectsOutput\";\nconst _DOR = \"DeleteObjectRequest\";\nconst _DORe = \"DeleteObjectsRequest\";\nconst _DOT = \"DeleteObjectTagging\";\nconst _DOTO = \"DeleteObjectTaggingOutput\";\nconst _DOTR = \"DeleteObjectTaggingRequest\";\nconst _DOe = \"DeletedObjects\";\nconst _DOel = \"DeleteObject\";\nconst _DOele = \"DeleteObjects\";\nconst _DPAB = \"DeletePublicAccessBlock\";\nconst _DPABR = \"DeletePublicAccessBlockRequest\";\nconst _DR = \"DataRedundancy\";\nconst _DRe = \"DefaultRetention\";\nconst _DRel = \"DeleteResult\";\nconst _DRes = \"DestinationResult\";\nconst _Da = \"Date\";\nconst _De = \"Delete\";\nconst _Del = \"Deleted\";\nconst _Deli = \"Delimiter\";\nconst _Des = \"Destination\";\nconst _Desc = \"Description\";\nconst _Det = \"Details\";\nconst _E = \"Expiration\";\nconst _EA = \"EmailAddress\";\nconst _EBC = \"EventBridgeConfiguration\";\nconst _EBO = \"ExpectedBucketOwner\";\nconst _EC = \"EncryptionConfiguration\";\nconst _ECr = \"ErrorCode\";\nconst _ED = \"ErrorDetails\";\nconst _EDr = \"ErrorDocument\";\nconst _EE = \"EndEvent\";\nconst _EH = \"ExposeHeaders\";\nconst _EHx = \"ExposeHeader\";\nconst _EM = \"ErrorMessage\";\nconst _EODM = \"ExpiredObjectDeleteMarker\";\nconst _EOR = \"ExistingObjectReplication\";\nconst _ES = \"ExpiresString\";\nconst _ESBO = \"ExpectedSourceBucketOwner\";\nconst _ET = \"EncryptionType\";\nconst _ETL = \"EncryptionTypeList\";\nconst _ETM = \"EncryptionTypeMismatch\";\nconst _ETa = \"ETag\";\nconst _ETn = \"EncodingType\";\nconst _ETv = \"EventThreshold\";\nconst _ETx = \"ExpressionType\";\nconst _En = \"Encryption\";\nconst _Ena = \"Enabled\";\nconst _End = \"End\";\nconst _Er = \"Errors\";\nconst _Err = \"Error\";\nconst _Ev = \"Events\";\nconst _Eve = \"Event\";\nconst _Ex = \"Expires\";\nconst _Exp = \"Expression\";\nconst _F = \"Filter\";\nconst _FD = \"FieldDelimiter\";\nconst _FHI = \"FileHeaderInfo\";\nconst _FO = \"FetchOwner\";\nconst _FR = \"FilterRule\";\nconst _FRL = \"FilterRuleList\";\nconst _FRi = \"FilterRules\";\nconst _Fi = \"Field\";\nconst _Fo = \"Format\";\nconst _Fr = \"Frequency\";\nconst _G = \"Grants\";\nconst _GBA = \"GetBucketAbac\";\nconst _GBAC = \"GetBucketAccelerateConfiguration\";\nconst _GBACO = \"GetBucketAccelerateConfigurationOutput\";\nconst _GBACOe = \"GetBucketAnalyticsConfigurationOutput\";\nconst _GBACR = \"GetBucketAccelerateConfigurationRequest\";\nconst _GBACRe = \"GetBucketAnalyticsConfigurationRequest\";\nconst _GBACe = \"GetBucketAnalyticsConfiguration\";\nconst _GBAO = \"GetBucketAbacOutput\";\nconst _GBAOe = \"GetBucketAclOutput\";\nconst _GBAR = \"GetBucketAbacRequest\";\nconst _GBARe = \"GetBucketAclRequest\";\nconst _GBAe = \"GetBucketAcl\";\nconst _GBC = \"GetBucketCors\";\nconst _GBCO = \"GetBucketCorsOutput\";\nconst _GBCR = \"GetBucketCorsRequest\";\nconst _GBE = \"GetBucketEncryption\";\nconst _GBEO = \"GetBucketEncryptionOutput\";\nconst _GBER = \"GetBucketEncryptionRequest\";\nconst _GBIC = \"GetBucketInventoryConfiguration\";\nconst _GBICO = \"GetBucketInventoryConfigurationOutput\";\nconst _GBICR = \"GetBucketInventoryConfigurationRequest\";\nconst _GBITC = \"GetBucketIntelligentTieringConfiguration\";\nconst _GBITCO = \"GetBucketIntelligentTieringConfigurationOutput\";\nconst _GBITCR = \"GetBucketIntelligentTieringConfigurationRequest\";\nconst _GBL = \"GetBucketLocation\";\nconst _GBLC = \"GetBucketLifecycleConfiguration\";\nconst _GBLCO = \"GetBucketLifecycleConfigurationOutput\";\nconst _GBLCR = \"GetBucketLifecycleConfigurationRequest\";\nconst _GBLO = \"GetBucketLocationOutput\";\nconst _GBLOe = \"GetBucketLoggingOutput\";\nconst _GBLR = \"GetBucketLocationRequest\";\nconst _GBLRe = \"GetBucketLoggingRequest\";\nconst _GBLe = \"GetBucketLogging\";\nconst _GBMC = \"GetBucketMetadataConfiguration\";\nconst _GBMCO = \"GetBucketMetadataConfigurationOutput\";\nconst _GBMCOe = \"GetBucketMetricsConfigurationOutput\";\nconst _GBMCR = \"GetBucketMetadataConfigurationResult\";\nconst _GBMCRe = \"GetBucketMetadataConfigurationRequest\";\nconst _GBMCRet = \"GetBucketMetricsConfigurationRequest\";\nconst _GBMCe = \"GetBucketMetricsConfiguration\";\nconst _GBMTC = \"GetBucketMetadataTableConfiguration\";\nconst _GBMTCO = \"GetBucketMetadataTableConfigurationOutput\";\nconst _GBMTCR = \"GetBucketMetadataTableConfigurationResult\";\nconst _GBMTCRe = \"GetBucketMetadataTableConfigurationRequest\";\nconst _GBNC = \"GetBucketNotificationConfiguration\";\nconst _GBNCR = \"GetBucketNotificationConfigurationRequest\";\nconst _GBOC = \"GetBucketOwnershipControls\";\nconst _GBOCO = \"GetBucketOwnershipControlsOutput\";\nconst _GBOCR = \"GetBucketOwnershipControlsRequest\";\nconst _GBP = \"GetBucketPolicy\";\nconst _GBPO = \"GetBucketPolicyOutput\";\nconst _GBPR = \"GetBucketPolicyRequest\";\nconst _GBPS = \"GetBucketPolicyStatus\";\nconst _GBPSO = \"GetBucketPolicyStatusOutput\";\nconst _GBPSR = \"GetBucketPolicyStatusRequest\";\nconst _GBR = \"GetBucketReplication\";\nconst _GBRO = \"GetBucketReplicationOutput\";\nconst _GBRP = \"GetBucketRequestPayment\";\nconst _GBRPO = \"GetBucketRequestPaymentOutput\";\nconst _GBRPR = \"GetBucketRequestPaymentRequest\";\nconst _GBRR = \"GetBucketReplicationRequest\";\nconst _GBT = \"GetBucketTagging\";\nconst _GBTO = \"GetBucketTaggingOutput\";\nconst _GBTR = \"GetBucketTaggingRequest\";\nconst _GBV = \"GetBucketVersioning\";\nconst _GBVO = \"GetBucketVersioningOutput\";\nconst _GBVR = \"GetBucketVersioningRequest\";\nconst _GBW = \"GetBucketWebsite\";\nconst _GBWO = \"GetBucketWebsiteOutput\";\nconst _GBWR = \"GetBucketWebsiteRequest\";\nconst _GFC = \"GrantFullControl\";\nconst _GJP = \"GlacierJobParameters\";\nconst _GO = \"GetObject\";\nconst _GOA = \"GetObjectAcl\";\nconst _GOAO = \"GetObjectAclOutput\";\nconst _GOAOe = \"GetObjectAttributesOutput\";\nconst _GOAP = \"GetObjectAttributesParts\";\nconst _GOAR = \"GetObjectAclRequest\";\nconst _GOARe = \"GetObjectAttributesResponse\";\nconst _GOARet = \"GetObjectAttributesRequest\";\nconst _GOAe = \"GetObjectAttributes\";\nconst _GOLC = \"GetObjectLockConfiguration\";\nconst _GOLCO = \"GetObjectLockConfigurationOutput\";\nconst _GOLCR = \"GetObjectLockConfigurationRequest\";\nconst _GOLH = \"GetObjectLegalHold\";\nconst _GOLHO = \"GetObjectLegalHoldOutput\";\nconst _GOLHR = \"GetObjectLegalHoldRequest\";\nconst _GOO = \"GetObjectOutput\";\nconst _GOR = \"GetObjectRequest\";\nconst _GORO = \"GetObjectRetentionOutput\";\nconst _GORR = \"GetObjectRetentionRequest\";\nconst _GORe = \"GetObjectRetention\";\nconst _GOT = \"GetObjectTagging\";\nconst _GOTO = \"GetObjectTaggingOutput\";\nconst _GOTOe = \"GetObjectTorrentOutput\";\nconst _GOTR = \"GetObjectTaggingRequest\";\nconst _GOTRe = \"GetObjectTorrentRequest\";\nconst _GOTe = \"GetObjectTorrent\";\nconst _GPAB = \"GetPublicAccessBlock\";\nconst _GPABO = \"GetPublicAccessBlockOutput\";\nconst _GPABR = \"GetPublicAccessBlockRequest\";\nconst _GR = \"GrantRead\";\nconst _GRACP = \"GrantReadACP\";\nconst _GW = \"GrantWrite\";\nconst _GWACP = \"GrantWriteACP\";\nconst _Gr = \"Grant\";\nconst _Gra = \"Grantee\";\nconst _HB = \"HeadBucket\";\nconst _HBO = \"HeadBucketOutput\";\nconst _HBR = \"HeadBucketRequest\";\nconst _HECRE = \"HttpErrorCodeReturnedEquals\";\nconst _HN = \"HostName\";\nconst _HO = \"HeadObject\";\nconst _HOO = \"HeadObjectOutput\";\nconst _HOR = \"HeadObjectRequest\";\nconst _HRC = \"HttpRedirectCode\";\nconst _I = \"Id\";\nconst _IC = \"InventoryConfiguration\";\nconst _ICL = \"InventoryConfigurationList\";\nconst _ID = \"ID\";\nconst _IDn = \"IndexDocument\";\nconst _IDnv = \"InventoryDestination\";\nconst _IE = \"IsEnabled\";\nconst _IEn = \"InventoryEncryption\";\nconst _IF = \"InventoryFilter\";\nconst _IL = \"IsLatest\";\nconst _IM = \"IfMatch\";\nconst _IMIT = \"IfMatchInitiatedTime\";\nconst _IMLMT = \"IfMatchLastModifiedTime\";\nconst _IMS = \"IfMatchSize\";\nconst _IMS_ = \"If-Modified-Since\";\nconst _IMSf = \"IfModifiedSince\";\nconst _IMUR = \"InitiateMultipartUploadResult\";\nconst _IM_ = \"If-Match\";\nconst _INM = \"IfNoneMatch\";\nconst _INM_ = \"If-None-Match\";\nconst _IOF = \"InventoryOptionalFields\";\nconst _IOS = \"InvalidObjectState\";\nconst _IOV = \"IncludedObjectVersions\";\nconst _IP = \"IsPublic\";\nconst _IPA = \"IgnorePublicAcls\";\nconst _IPM = \"IdempotencyParameterMismatch\";\nconst _IR = \"InvalidRequest\";\nconst _IRIP = \"IsRestoreInProgress\";\nconst _IS = \"InputSerialization\";\nconst _ISBD = \"InventoryS3BucketDestination\";\nconst _ISn = \"InventorySchedule\";\nconst _IT = \"IsTruncated\";\nconst _ITAO = \"IntelligentTieringAndOperator\";\nconst _ITC = \"IntelligentTieringConfiguration\";\nconst _ITCL = \"IntelligentTieringConfigurationList\";\nconst _ITCR = \"InventoryTableConfigurationResult\";\nconst _ITCU = \"InventoryTableConfigurationUpdates\";\nconst _ITCn = \"InventoryTableConfiguration\";\nconst _ITF = \"IntelligentTieringFilter\";\nconst _IUS = \"IfUnmodifiedSince\";\nconst _IUS_ = \"If-Unmodified-Since\";\nconst _IWO = \"InvalidWriteOffset\";\nconst _In = \"Initiator\";\nconst _Ini = \"Initiated\";\nconst _JSON = \"JSON\";\nconst _JSONI = \"JSONInput\";\nconst _JSONO = \"JSONOutput\";\nconst _JTC = \"JournalTableConfiguration\";\nconst _JTCR = \"JournalTableConfigurationResult\";\nconst _JTCU = \"JournalTableConfigurationUpdates\";\nconst _K = \"Key\";\nconst _KC = \"KeyCount\";\nconst _KI = \"KeyId\";\nconst _KKA = \"KmsKeyArn\";\nconst _KM = \"KeyMarker\";\nconst _KMSC = \"KMSContext\";\nconst _KMSKA = \"KMSKeyArn\";\nconst _KMSKI = \"KMSKeyId\";\nconst _KMSMKID = \"KMSMasterKeyID\";\nconst _KPE = \"KeyPrefixEquals\";\nconst _L = \"Location\";\nconst _LAMBR = \"ListAllMyBucketsResult\";\nconst _LAMDBR = \"ListAllMyDirectoryBucketsResult\";\nconst _LB = \"ListBuckets\";\nconst _LBAC = \"ListBucketAnalyticsConfigurations\";\nconst _LBACO = \"ListBucketAnalyticsConfigurationsOutput\";\nconst _LBACR = \"ListBucketAnalyticsConfigurationResult\";\nconst _LBACRi = \"ListBucketAnalyticsConfigurationsRequest\";\nconst _LBIC = \"ListBucketInventoryConfigurations\";\nconst _LBICO = \"ListBucketInventoryConfigurationsOutput\";\nconst _LBICR = \"ListBucketInventoryConfigurationsRequest\";\nconst _LBITC = \"ListBucketIntelligentTieringConfigurations\";\nconst _LBITCO = \"ListBucketIntelligentTieringConfigurationsOutput\";\nconst _LBITCR = \"ListBucketIntelligentTieringConfigurationsRequest\";\nconst _LBMC = \"ListBucketMetricsConfigurations\";\nconst _LBMCO = \"ListBucketMetricsConfigurationsOutput\";\nconst _LBMCR = \"ListBucketMetricsConfigurationsRequest\";\nconst _LBO = \"ListBucketsOutput\";\nconst _LBR = \"ListBucketsRequest\";\nconst _LBRi = \"ListBucketResult\";\nconst _LC = \"LocationConstraint\";\nconst _LCi = \"LifecycleConfiguration\";\nconst _LDB = \"ListDirectoryBuckets\";\nconst _LDBO = \"ListDirectoryBucketsOutput\";\nconst _LDBR = \"ListDirectoryBucketsRequest\";\nconst _LE = \"LoggingEnabled\";\nconst _LEi = \"LifecycleExpiration\";\nconst _LFA = \"LambdaFunctionArn\";\nconst _LFC = \"LambdaFunctionConfiguration\";\nconst _LFCL = \"LambdaFunctionConfigurationList\";\nconst _LFCa = \"LambdaFunctionConfigurations\";\nconst _LH = \"LegalHold\";\nconst _LI = \"LocationInfo\";\nconst _LICR = \"ListInventoryConfigurationsResult\";\nconst _LM = \"LastModified\";\nconst _LMCR = \"ListMetricsConfigurationsResult\";\nconst _LMT = \"LastModifiedTime\";\nconst _LMU = \"ListMultipartUploads\";\nconst _LMUO = \"ListMultipartUploadsOutput\";\nconst _LMUR = \"ListMultipartUploadsResult\";\nconst _LMURi = \"ListMultipartUploadsRequest\";\nconst _LM_ = \"Last-Modified\";\nconst _LO = \"ListObjects\";\nconst _LOO = \"ListObjectsOutput\";\nconst _LOR = \"ListObjectsRequest\";\nconst _LOV = \"ListObjectsV2\";\nconst _LOVO = \"ListObjectsV2Output\";\nconst _LOVOi = \"ListObjectVersionsOutput\";\nconst _LOVR = \"ListObjectsV2Request\";\nconst _LOVRi = \"ListObjectVersionsRequest\";\nconst _LOVi = \"ListObjectVersions\";\nconst _LP = \"ListParts\";\nconst _LPO = \"ListPartsOutput\";\nconst _LPR = \"ListPartsResult\";\nconst _LPRi = \"ListPartsRequest\";\nconst _LR = \"LifecycleRule\";\nconst _LRAO = \"LifecycleRuleAndOperator\";\nconst _LRF = \"LifecycleRuleFilter\";\nconst _LRi = \"LifecycleRules\";\nconst _LVR = \"ListVersionsResult\";\nconst _M = \"Metadata\";\nconst _MAO = \"MetricsAndOperator\";\nconst _MAS = \"MaxAgeSeconds\";\nconst _MB = \"MaxBuckets\";\nconst _MC = \"MetadataConfiguration\";\nconst _MCL = \"MetricsConfigurationList\";\nconst _MCR = \"MetadataConfigurationResult\";\nconst _MCe = \"MetricsConfiguration\";\nconst _MD = \"MetadataDirective\";\nconst _MDB = \"MaxDirectoryBuckets\";\nconst _MDf = \"MfaDelete\";\nconst _ME = \"MetadataEntry\";\nconst _MF = \"MetricsFilter\";\nconst _MFA = \"MFA\";\nconst _MFAD = \"MFADelete\";\nconst _MK = \"MaxKeys\";\nconst _MM = \"MissingMeta\";\nconst _MOS = \"MpuObjectSize\";\nconst _MP = \"MaxParts\";\nconst _MTC = \"MetadataTableConfiguration\";\nconst _MTCR = \"MetadataTableConfigurationResult\";\nconst _MTEC = \"MetadataTableEncryptionConfiguration\";\nconst _MU = \"MultipartUpload\";\nconst _MUL = \"MultipartUploadList\";\nconst _MUa = \"MaxUploads\";\nconst _Ma = \"Marker\";\nconst _Me = \"Metrics\";\nconst _Mes = \"Message\";\nconst _Mi = \"Minutes\";\nconst _Mo = \"Mode\";\nconst _N = \"Name\";\nconst _NC = \"NotificationConfiguration\";\nconst _NCF = \"NotificationConfigurationFilter\";\nconst _NCT = \"NextContinuationToken\";\nconst _ND = \"NoncurrentDays\";\nconst _NEKKAS = \"NonEmptyKmsKeyArnString\";\nconst _NF = \"NotFound\";\nconst _NKM = \"NextKeyMarker\";\nconst _NM = \"NextMarker\";\nconst _NNV = \"NewerNoncurrentVersions\";\nconst _NPNM = \"NextPartNumberMarker\";\nconst _NSB = \"NoSuchBucket\";\nconst _NSK = \"NoSuchKey\";\nconst _NSU = \"NoSuchUpload\";\nconst _NUIM = \"NextUploadIdMarker\";\nconst _NVE = \"NoncurrentVersionExpiration\";\nconst _NVIM = \"NextVersionIdMarker\";\nconst _NVT = \"NoncurrentVersionTransitions\";\nconst _NVTL = \"NoncurrentVersionTransitionList\";\nconst _NVTo = \"NoncurrentVersionTransition\";\nconst _O = \"Owner\";\nconst _OA = \"ObjectAttributes\";\nconst _OAIATE = \"ObjectAlreadyInActiveTierError\";\nconst _OC = \"OwnershipControls\";\nconst _OCR = \"OwnershipControlsRule\";\nconst _OCRw = \"OwnershipControlsRules\";\nconst _OE = \"ObjectEncryption\";\nconst _OF = \"OptionalFields\";\nconst _OI = \"ObjectIdentifier\";\nconst _OIL = \"ObjectIdentifierList\";\nconst _OL = \"OutputLocation\";\nconst _OLC = \"ObjectLockConfiguration\";\nconst _OLE = \"ObjectLockEnabled\";\nconst _OLEFB = \"ObjectLockEnabledForBucket\";\nconst _OLLH = \"ObjectLockLegalHold\";\nconst _OLLHS = \"ObjectLockLegalHoldStatus\";\nconst _OLM = \"ObjectLockMode\";\nconst _OLR = \"ObjectLockRetention\";\nconst _OLRUD = \"ObjectLockRetainUntilDate\";\nconst _OLRb = \"ObjectLockRule\";\nconst _OLb = \"ObjectList\";\nconst _ONIATE = \"ObjectNotInActiveTierError\";\nconst _OO = \"ObjectOwnership\";\nconst _OOA = \"OptionalObjectAttributes\";\nconst _OP = \"ObjectParts\";\nconst _OPb = \"ObjectPart\";\nconst _OS = \"ObjectSize\";\nconst _OSGT = \"ObjectSizeGreaterThan\";\nconst _OSLT = \"ObjectSizeLessThan\";\nconst _OSV = \"OutputSchemaVersion\";\nconst _OSu = \"OutputSerialization\";\nconst _OV = \"ObjectVersion\";\nconst _OVL = \"ObjectVersionList\";\nconst _Ob = \"Objects\";\nconst _Obj = \"Object\";\nconst _P = \"Prefix\";\nconst _PABC = \"PublicAccessBlockConfiguration\";\nconst _PBA = \"PutBucketAbac\";\nconst _PBAC = \"PutBucketAccelerateConfiguration\";\nconst _PBACR = \"PutBucketAccelerateConfigurationRequest\";\nconst _PBACRu = \"PutBucketAnalyticsConfigurationRequest\";\nconst _PBACu = \"PutBucketAnalyticsConfiguration\";\nconst _PBAR = \"PutBucketAbacRequest\";\nconst _PBARu = \"PutBucketAclRequest\";\nconst _PBAu = \"PutBucketAcl\";\nconst _PBC = \"PutBucketCors\";\nconst _PBCR = \"PutBucketCorsRequest\";\nconst _PBE = \"PutBucketEncryption\";\nconst _PBER = \"PutBucketEncryptionRequest\";\nconst _PBIC = \"PutBucketInventoryConfiguration\";\nconst _PBICR = \"PutBucketInventoryConfigurationRequest\";\nconst _PBITC = \"PutBucketIntelligentTieringConfiguration\";\nconst _PBITCR = \"PutBucketIntelligentTieringConfigurationRequest\";\nconst _PBL = \"PutBucketLogging\";\nconst _PBLC = \"PutBucketLifecycleConfiguration\";\nconst _PBLCO = \"PutBucketLifecycleConfigurationOutput\";\nconst _PBLCR = \"PutBucketLifecycleConfigurationRequest\";\nconst _PBLR = \"PutBucketLoggingRequest\";\nconst _PBMC = \"PutBucketMetricsConfiguration\";\nconst _PBMCR = \"PutBucketMetricsConfigurationRequest\";\nconst _PBNC = \"PutBucketNotificationConfiguration\";\nconst _PBNCR = \"PutBucketNotificationConfigurationRequest\";\nconst _PBOC = \"PutBucketOwnershipControls\";\nconst _PBOCR = \"PutBucketOwnershipControlsRequest\";\nconst _PBP = \"PutBucketPolicy\";\nconst _PBPR = \"PutBucketPolicyRequest\";\nconst _PBR = \"PutBucketReplication\";\nconst _PBRP = \"PutBucketRequestPayment\";\nconst _PBRPR = \"PutBucketRequestPaymentRequest\";\nconst _PBRR = \"PutBucketReplicationRequest\";\nconst _PBT = \"PutBucketTagging\";\nconst _PBTR = \"PutBucketTaggingRequest\";\nconst _PBV = \"PutBucketVersioning\";\nconst _PBVR = \"PutBucketVersioningRequest\";\nconst _PBW = \"PutBucketWebsite\";\nconst _PBWR = \"PutBucketWebsiteRequest\";\nconst _PC = \"PartsCount\";\nconst _PDS = \"PartitionDateSource\";\nconst _PE = \"ProgressEvent\";\nconst _PI = \"ParquetInput\";\nconst _PL = \"PartsList\";\nconst _PN = \"PartNumber\";\nconst _PNM = \"PartNumberMarker\";\nconst _PO = \"PutObject\";\nconst _POA = \"PutObjectAcl\";\nconst _POAO = \"PutObjectAclOutput\";\nconst _POAR = \"PutObjectAclRequest\";\nconst _POLC = \"PutObjectLockConfiguration\";\nconst _POLCO = \"PutObjectLockConfigurationOutput\";\nconst _POLCR = \"PutObjectLockConfigurationRequest\";\nconst _POLH = \"PutObjectLegalHold\";\nconst _POLHO = \"PutObjectLegalHoldOutput\";\nconst _POLHR = \"PutObjectLegalHoldRequest\";\nconst _POO = \"PutObjectOutput\";\nconst _POR = \"PutObjectRequest\";\nconst _PORO = \"PutObjectRetentionOutput\";\nconst _PORR = \"PutObjectRetentionRequest\";\nconst _PORu = \"PutObjectRetention\";\nconst _POT = \"PutObjectTagging\";\nconst _POTO = \"PutObjectTaggingOutput\";\nconst _POTR = \"PutObjectTaggingRequest\";\nconst _PP = \"PartitionedPrefix\";\nconst _PPAB = \"PutPublicAccessBlock\";\nconst _PPABR = \"PutPublicAccessBlockRequest\";\nconst _PS = \"PolicyStatus\";\nconst _Pa = \"Parts\";\nconst _Par = \"Part\";\nconst _Parq = \"Parquet\";\nconst _Pay = \"Payer\";\nconst _Payl = \"Payload\";\nconst _Pe = \"Permission\";\nconst _Po = \"Policy\";\nconst _Pr = \"Progress\";\nconst _Pri = \"Priority\";\nconst _Pro = \"Protocol\";\nconst _Q = \"Quiet\";\nconst _QA = \"QueueArn\";\nconst _QC = \"QuoteCharacter\";\nconst _QCL = \"QueueConfigurationList\";\nconst _QCu = \"QueueConfigurations\";\nconst _QCue = \"QueueConfiguration\";\nconst _QEC = \"QuoteEscapeCharacter\";\nconst _QF = \"QuoteFields\";\nconst _Qu = \"Queue\";\nconst _R = \"Rules\";\nconst _RART = \"RedirectAllRequestsTo\";\nconst _RC = \"RequestCharged\";\nconst _RCC = \"ResponseCacheControl\";\nconst _RCD = \"ResponseContentDisposition\";\nconst _RCE = \"ResponseContentEncoding\";\nconst _RCL = \"ResponseContentLanguage\";\nconst _RCT = \"ResponseContentType\";\nconst _RCe = \"ReplicationConfiguration\";\nconst _RD = \"RecordDelimiter\";\nconst _RE = \"ResponseExpires\";\nconst _RED = \"RestoreExpiryDate\";\nconst _REe = \"RecordExpiration\";\nconst _REec = \"RecordsEvent\";\nconst _RKKID = \"ReplicaKmsKeyID\";\nconst _RKPW = \"ReplaceKeyPrefixWith\";\nconst _RKW = \"ReplaceKeyWith\";\nconst _RM = \"ReplicaModifications\";\nconst _RO = \"RenameObject\";\nconst _ROO = \"RenameObjectOutput\";\nconst _ROOe = \"RestoreObjectOutput\";\nconst _ROP = \"RestoreOutputPath\";\nconst _ROR = \"RenameObjectRequest\";\nconst _RORe = \"RestoreObjectRequest\";\nconst _ROe = \"RestoreObject\";\nconst _RP = \"RequestPayer\";\nconst _RPB = \"RestrictPublicBuckets\";\nconst _RPC = \"RequestPaymentConfiguration\";\nconst _RPe = \"RequestProgress\";\nconst _RR = \"RoutingRules\";\nconst _RRAO = \"ReplicationRuleAndOperator\";\nconst _RRF = \"ReplicationRuleFilter\";\nconst _RRe = \"ReplicationRule\";\nconst _RRep = \"ReplicationRules\";\nconst _RReq = \"RequestRoute\";\nconst _RRes = \"RestoreRequest\";\nconst _RRo = \"RoutingRule\";\nconst _RS = \"ReplicationStatus\";\nconst _RSe = \"RestoreStatus\";\nconst _RSen = \"RenameSource\";\nconst _RT = \"ReplicationTime\";\nconst _RTV = \"ReplicationTimeValue\";\nconst _RTe = \"RequestToken\";\nconst _RUD = \"RetainUntilDate\";\nconst _Ra = \"Range\";\nconst _Re = \"Restore\";\nconst _Rec = \"Records\";\nconst _Red = \"Redirect\";\nconst _Ret = \"Retention\";\nconst _Ro = \"Role\";\nconst _Ru = \"Rule\";\nconst _S = \"Status\";\nconst _SA = \"StartAfter\";\nconst _SAK = \"SecretAccessKey\";\nconst _SAs = \"SseAlgorithm\";\nconst _SB = \"StreamingBlob\";\nconst _SBD = \"S3BucketDestination\";\nconst _SC = \"StorageClass\";\nconst _SCA = \"StorageClassAnalysis\";\nconst _SCADE = \"StorageClassAnalysisDataExport\";\nconst _SCV = \"SessionCredentialValue\";\nconst _SCe = \"SessionCredentials\";\nconst _SCt = \"StatusCode\";\nconst _SDV = \"SkipDestinationValidation\";\nconst _SE = \"StatsEvent\";\nconst _SIM = \"SourceIfMatch\";\nconst _SIMS = \"SourceIfModifiedSince\";\nconst _SINM = \"SourceIfNoneMatch\";\nconst _SIUS = \"SourceIfUnmodifiedSince\";\nconst _SK = \"SSE-KMS\";\nconst _SKEO = \"SseKmsEncryptedObjects\";\nconst _SKF = \"S3KeyFilter\";\nconst _SKe = \"S3Key\";\nconst _SL = \"S3Location\";\nconst _SM = \"SessionMode\";\nconst _SOC = \"SelectObjectContent\";\nconst _SOCES = \"SelectObjectContentEventStream\";\nconst _SOCO = \"SelectObjectContentOutput\";\nconst _SOCR = \"SelectObjectContentRequest\";\nconst _SP = \"SelectParameters\";\nconst _SPi = \"SimplePrefix\";\nconst _SR = \"ScanRange\";\nconst _SS = \"SSE-S3\";\nconst _SSC = \"SourceSelectionCriteria\";\nconst _SSE = \"ServerSideEncryption\";\nconst _SSEA = \"SSEAlgorithm\";\nconst _SSEBD = \"ServerSideEncryptionByDefault\";\nconst _SSEC = \"ServerSideEncryptionConfiguration\";\nconst _SSECA = \"SSECustomerAlgorithm\";\nconst _SSECK = \"SSECustomerKey\";\nconst _SSECKMD = \"SSECustomerKeyMD5\";\nconst _SSEKMS = \"SSEKMS\";\nconst _SSEKMSE = \"SSEKMSEncryption\";\nconst _SSEKMSEC = \"SSEKMSEncryptionContext\";\nconst _SSEKMSKI = \"SSEKMSKeyId\";\nconst _SSER = \"ServerSideEncryptionRule\";\nconst _SSERe = \"ServerSideEncryptionRules\";\nconst _SSES = \"SSES3\";\nconst _ST = \"SessionToken\";\nconst _STD = \"S3TablesDestination\";\nconst _STDR = \"S3TablesDestinationResult\";\nconst _S_ = \"S3\";\nconst _Sc = \"Schedule\";\nconst _Si = \"Size\";\nconst _St = \"Start\";\nconst _Sta = \"Stats\";\nconst _Su = \"Suffix\";\nconst _T = \"Tags\";\nconst _TA = \"TableArn\";\nconst _TAo = \"TopicArn\";\nconst _TB = \"TargetBucket\";\nconst _TBA = \"TableBucketArn\";\nconst _TBT = \"TableBucketType\";\nconst _TC = \"TagCount\";\nconst _TCL = \"TopicConfigurationList\";\nconst _TCo = \"TopicConfigurations\";\nconst _TCop = \"TopicConfiguration\";\nconst _TD = \"TaggingDirective\";\nconst _TDMOS = \"TransitionDefaultMinimumObjectSize\";\nconst _TG = \"TargetGrants\";\nconst _TGa = \"TargetGrant\";\nconst _TL = \"TieringList\";\nconst _TLr = \"TransitionList\";\nconst _TMP = \"TooManyParts\";\nconst _TN = \"TableNamespace\";\nconst _TNa = \"TableName\";\nconst _TOKF = \"TargetObjectKeyFormat\";\nconst _TP = \"TargetPrefix\";\nconst _TPC = \"TotalPartsCount\";\nconst _TS = \"TagSet\";\nconst _TSa = \"TableStatus\";\nconst _Ta = \"Tag\";\nconst _Tag = \"Tagging\";\nconst _Ti = \"Tier\";\nconst _Tie = \"Tierings\";\nconst _Tier = \"Tiering\";\nconst _Tim = \"Time\";\nconst _To = \"Token\";\nconst _Top = \"Topic\";\nconst _Tr = \"Transitions\";\nconst _Tra = \"Transition\";\nconst _Ty = \"Type\";\nconst _U = \"Uploads\";\nconst _UBMITC = \"UpdateBucketMetadataInventoryTableConfiguration\";\nconst _UBMITCR = \"UpdateBucketMetadataInventoryTableConfigurationRequest\";\nconst _UBMJTC = \"UpdateBucketMetadataJournalTableConfiguration\";\nconst _UBMJTCR = \"UpdateBucketMetadataJournalTableConfigurationRequest\";\nconst _UI = \"UploadId\";\nconst _UIM = \"UploadIdMarker\";\nconst _UM = \"UserMetadata\";\nconst _UOE = \"UpdateObjectEncryption\";\nconst _UOER = \"UpdateObjectEncryptionRequest\";\nconst _UOERp = \"UpdateObjectEncryptionResponse\";\nconst _UP = \"UploadPart\";\nconst _UPC = \"UploadPartCopy\";\nconst _UPCO = \"UploadPartCopyOutput\";\nconst _UPCR = \"UploadPartCopyRequest\";\nconst _UPO = \"UploadPartOutput\";\nconst _UPR = \"UploadPartRequest\";\nconst _URI = \"URI\";\nconst _Up = \"Upload\";\nconst _V = \"Value\";\nconst _VC = \"VersioningConfiguration\";\nconst _VI = \"VersionId\";\nconst _VIM = \"VersionIdMarker\";\nconst _Ve = \"Versions\";\nconst _Ver = \"Version\";\nconst _WC = \"WebsiteConfiguration\";\nconst _WGOR = \"WriteGetObjectResponse\";\nconst _WGORR = \"WriteGetObjectResponseRequest\";\nconst _WOB = \"WriteOffsetBytes\";\nconst _WRL = \"WebsiteRedirectLocation\";\nconst _Y = \"Years\";\nconst _ar = \"accept-ranges\";\nconst _br = \"bucket-region\";\nconst _c = \"client\";\nconst _ct = \"continuation-token\";\nconst _d = \"delimiter\";\nconst _e = \"error\";\nconst _eP = \"eventPayload\";\nconst _en = \"endpoint\";\nconst _et = \"encoding-type\";\nconst _fo = \"fetch-owner\";\nconst _h = \"http\";\nconst _hC = \"httpChecksum\";\nconst _hE = \"httpError\";\nconst _hH = \"httpHeader\";\nconst _hL = \"hostLabel\";\nconst _hP = \"httpPayload\";\nconst _hPH = \"httpPrefixHeaders\";\nconst _hQ = \"httpQuery\";\nconst _hi = \"http://www.w3.org/2001/XMLSchema-instance\";\nconst _i = \"id\";\nconst _iT = \"idempotencyToken\";\nconst _km = \"key-marker\";\nconst _m = \"marker\";\nconst _mb = \"max-buckets\";\nconst _mdb = \"max-directory-buckets\";\nconst _mk = \"max-keys\";\nconst _mp = \"max-parts\";\nconst _mu = \"max-uploads\";\nconst _p = \"prefix\";\nconst _pN = \"partNumber\";\nconst _pnm = \"part-number-marker\";\nconst _rcc = \"response-cache-control\";\nconst _rcd = \"response-content-disposition\";\nconst _rce = \"response-content-encoding\";\nconst _rcl = \"response-content-language\";\nconst _rct = \"response-content-type\";\nconst _re = \"response-expires\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.s3\";\nconst _sa = \"start-after\";\nconst _st = \"streaming\";\nconst _uI = \"uploadId\";\nconst _uim = \"upload-id-marker\";\nconst _vI = \"versionId\";\nconst _vim = \"version-id-marker\";\nconst _x = \"xsi\";\nconst _xA = \"xmlAttribute\";\nconst _xF = \"xmlFlattened\";\nconst _xN = \"xmlName\";\nconst _xNm = \"xmlNamespace\";\nconst _xaa = \"x-amz-acl\";\nconst _xaad = \"x-amz-abort-date\";\nconst _xaapa = \"x-amz-access-point-alias\";\nconst _xaari = \"x-amz-abort-rule-id\";\nconst _xaas = \"x-amz-archive-status\";\nconst _xaba = \"x-amz-bucket-arn\";\nconst _xabgr = \"x-amz-bypass-governance-retention\";\nconst _xabln = \"x-amz-bucket-location-name\";\nconst _xablt = \"x-amz-bucket-location-type\";\nconst _xabn = \"x-amz-bucket-namespace\";\nconst _xabole = \"x-amz-bucket-object-lock-enabled\";\nconst _xabolt = \"x-amz-bucket-object-lock-token\";\nconst _xabr = \"x-amz-bucket-region\";\nconst _xaca = \"x-amz-checksum-algorithm\";\nconst _xacc = \"x-amz-checksum-crc32\";\nconst _xacc_ = \"x-amz-checksum-crc32c\";\nconst _xacc__ = \"x-amz-checksum-crc64nvme\";\nconst _xacm = \"x-amz-checksum-mode\";\nconst _xacrsba = \"x-amz-confirm-remove-self-bucket-access\";\nconst _xacs = \"x-amz-checksum-sha1\";\nconst _xacs_ = \"x-amz-checksum-sha256\";\nconst _xacs__ = \"x-amz-copy-source\";\nconst _xacsim = \"x-amz-copy-source-if-match\";\nconst _xacsims = \"x-amz-copy-source-if-modified-since\";\nconst _xacsinm = \"x-amz-copy-source-if-none-match\";\nconst _xacsius = \"x-amz-copy-source-if-unmodified-since\";\nconst _xacsm = \"x-amz-create-session-mode\";\nconst _xacsr = \"x-amz-copy-source-range\";\nconst _xacssseca = \"x-amz-copy-source-server-side-encryption-customer-algorithm\";\nconst _xacssseck = \"x-amz-copy-source-server-side-encryption-customer-key\";\nconst _xacssseckM = \"x-amz-copy-source-server-side-encryption-customer-key-MD5\";\nconst _xacsvi = \"x-amz-copy-source-version-id\";\nconst _xact = \"x-amz-checksum-type\";\nconst _xact_ = \"x-amz-client-token\";\nconst _xadm = \"x-amz-delete-marker\";\nconst _xae = \"x-amz-expiration\";\nconst _xaebo = \"x-amz-expected-bucket-owner\";\nconst _xafec = \"x-amz-fwd-error-code\";\nconst _xafem = \"x-amz-fwd-error-message\";\nconst _xafhCC = \"x-amz-fwd-header-Cache-Control\";\nconst _xafhCD = \"x-amz-fwd-header-Content-Disposition\";\nconst _xafhCE = \"x-amz-fwd-header-Content-Encoding\";\nconst _xafhCL = \"x-amz-fwd-header-Content-Language\";\nconst _xafhCR = \"x-amz-fwd-header-Content-Range\";\nconst _xafhCT = \"x-amz-fwd-header-Content-Type\";\nconst _xafhE = \"x-amz-fwd-header-ETag\";\nconst _xafhE_ = \"x-amz-fwd-header-Expires\";\nconst _xafhLM = \"x-amz-fwd-header-Last-Modified\";\nconst _xafhar = \"x-amz-fwd-header-accept-ranges\";\nconst _xafhxacc = \"x-amz-fwd-header-x-amz-checksum-crc32\";\nconst _xafhxacc_ = \"x-amz-fwd-header-x-amz-checksum-crc32c\";\nconst _xafhxacc__ = \"x-amz-fwd-header-x-amz-checksum-crc64nvme\";\nconst _xafhxacs = \"x-amz-fwd-header-x-amz-checksum-sha1\";\nconst _xafhxacs_ = \"x-amz-fwd-header-x-amz-checksum-sha256\";\nconst _xafhxadm = \"x-amz-fwd-header-x-amz-delete-marker\";\nconst _xafhxae = \"x-amz-fwd-header-x-amz-expiration\";\nconst _xafhxamm = \"x-amz-fwd-header-x-amz-missing-meta\";\nconst _xafhxampc = \"x-amz-fwd-header-x-amz-mp-parts-count\";\nconst _xafhxaollh = \"x-amz-fwd-header-x-amz-object-lock-legal-hold\";\nconst _xafhxaolm = \"x-amz-fwd-header-x-amz-object-lock-mode\";\nconst _xafhxaolrud = \"x-amz-fwd-header-x-amz-object-lock-retain-until-date\";\nconst _xafhxar = \"x-amz-fwd-header-x-amz-restore\";\nconst _xafhxarc = \"x-amz-fwd-header-x-amz-request-charged\";\nconst _xafhxars = \"x-amz-fwd-header-x-amz-replication-status\";\nconst _xafhxasc = \"x-amz-fwd-header-x-amz-storage-class\";\nconst _xafhxasse = \"x-amz-fwd-header-x-amz-server-side-encryption\";\nconst _xafhxasseakki = \"x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id\";\nconst _xafhxassebke = \"x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled\";\nconst _xafhxasseca = \"x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm\";\nconst _xafhxasseckM = \"x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5\";\nconst _xafhxatc = \"x-amz-fwd-header-x-amz-tagging-count\";\nconst _xafhxavi = \"x-amz-fwd-header-x-amz-version-id\";\nconst _xafs = \"x-amz-fwd-status\";\nconst _xagfc = \"x-amz-grant-full-control\";\nconst _xagr = \"x-amz-grant-read\";\nconst _xagra = \"x-amz-grant-read-acp\";\nconst _xagw = \"x-amz-grant-write\";\nconst _xagwa = \"x-amz-grant-write-acp\";\nconst _xaimit = \"x-amz-if-match-initiated-time\";\nconst _xaimlmt = \"x-amz-if-match-last-modified-time\";\nconst _xaims = \"x-amz-if-match-size\";\nconst _xam = \"x-amz-meta-\";\nconst _xam_ = \"x-amz-mfa\";\nconst _xamd = \"x-amz-metadata-directive\";\nconst _xamm = \"x-amz-missing-meta\";\nconst _xamos = \"x-amz-mp-object-size\";\nconst _xamp = \"x-amz-max-parts\";\nconst _xampc = \"x-amz-mp-parts-count\";\nconst _xaoa = \"x-amz-object-attributes\";\nconst _xaollh = \"x-amz-object-lock-legal-hold\";\nconst _xaolm = \"x-amz-object-lock-mode\";\nconst _xaolrud = \"x-amz-object-lock-retain-until-date\";\nconst _xaoo = \"x-amz-object-ownership\";\nconst _xaooa = \"x-amz-optional-object-attributes\";\nconst _xaos = \"x-amz-object-size\";\nconst _xapnm = \"x-amz-part-number-marker\";\nconst _xar = \"x-amz-restore\";\nconst _xarc = \"x-amz-request-charged\";\nconst _xarop = \"x-amz-restore-output-path\";\nconst _xarp = \"x-amz-request-payer\";\nconst _xarr = \"x-amz-request-route\";\nconst _xars = \"x-amz-replication-status\";\nconst _xars_ = \"x-amz-rename-source\";\nconst _xarsim = \"x-amz-rename-source-if-match\";\nconst _xarsims = \"x-amz-rename-source-if-modified-since\";\nconst _xarsinm = \"x-amz-rename-source-if-none-match\";\nconst _xarsius = \"x-amz-rename-source-if-unmodified-since\";\nconst _xart = \"x-amz-request-token\";\nconst _xasc = \"x-amz-storage-class\";\nconst _xasca = \"x-amz-sdk-checksum-algorithm\";\nconst _xasdv = \"x-amz-skip-destination-validation\";\nconst _xasebo = \"x-amz-source-expected-bucket-owner\";\nconst _xasse = \"x-amz-server-side-encryption\";\nconst _xasseakki = \"x-amz-server-side-encryption-aws-kms-key-id\";\nconst _xassebke = \"x-amz-server-side-encryption-bucket-key-enabled\";\nconst _xassec = \"x-amz-server-side-encryption-context\";\nconst _xasseca = \"x-amz-server-side-encryption-customer-algorithm\";\nconst _xasseck = \"x-amz-server-side-encryption-customer-key\";\nconst _xasseckM = \"x-amz-server-side-encryption-customer-key-MD5\";\nconst _xat = \"x-amz-tagging\";\nconst _xatc = \"x-amz-tagging-count\";\nconst _xatd = \"x-amz-tagging-directive\";\nconst _xatdmos = \"x-amz-transition-default-minimum-object-size\";\nconst _xavi = \"x-amz-version-id\";\nconst _xawob = \"x-amz-write-offset-bytes\";\nconst _xawrl = \"x-amz-website-redirect-location\";\nconst _xs = \"xsi:type\";\nconst n0 = \"com.amazonaws.s3\";\nimport { TypeRegistry } from \"@smithy/core/schema\";\nimport { AccessDenied, BucketAlreadyExists, BucketAlreadyOwnedByYou, EncryptionTypeMismatch, IdempotencyParameterMismatch, InvalidObjectState, InvalidRequest, InvalidWriteOffset, NoSuchBucket, NoSuchKey, NoSuchUpload, NotFound, ObjectAlreadyInActiveTierError, ObjectNotInActiveTierError, TooManyParts, } from \"../models/errors\";\nimport { S3ServiceException } from \"../models/S3ServiceException\";\nconst _s_registry = TypeRegistry.for(_s);\nexport var S3ServiceException$ = [-3, _s, \"S3ServiceException\", 0, [], []];\n_s_registry.registerError(S3ServiceException$, S3ServiceException);\nconst n0_registry = TypeRegistry.for(n0);\nexport var AccessDenied$ = [-3, n0, _AD,\n { [_e]: _c, [_hE]: 403 },\n [],\n []\n];\nn0_registry.registerError(AccessDenied$, AccessDenied);\nexport var BucketAlreadyExists$ = [-3, n0, _BAE,\n { [_e]: _c, [_hE]: 409 },\n [],\n []\n];\nn0_registry.registerError(BucketAlreadyExists$, BucketAlreadyExists);\nexport var BucketAlreadyOwnedByYou$ = [-3, n0, _BAOBY,\n { [_e]: _c, [_hE]: 409 },\n [],\n []\n];\nn0_registry.registerError(BucketAlreadyOwnedByYou$, BucketAlreadyOwnedByYou);\nexport var EncryptionTypeMismatch$ = [-3, n0, _ETM,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(EncryptionTypeMismatch$, EncryptionTypeMismatch);\nexport var IdempotencyParameterMismatch$ = [-3, n0, _IPM,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(IdempotencyParameterMismatch$, IdempotencyParameterMismatch);\nexport var InvalidObjectState$ = [-3, n0, _IOS,\n { [_e]: _c, [_hE]: 403 },\n [_SC, _AT],\n [0, 0]\n];\nn0_registry.registerError(InvalidObjectState$, InvalidObjectState);\nexport var InvalidRequest$ = [-3, n0, _IR,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(InvalidRequest$, InvalidRequest);\nexport var InvalidWriteOffset$ = [-3, n0, _IWO,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(InvalidWriteOffset$, InvalidWriteOffset);\nexport var NoSuchBucket$ = [-3, n0, _NSB,\n { [_e]: _c, [_hE]: 404 },\n [],\n []\n];\nn0_registry.registerError(NoSuchBucket$, NoSuchBucket);\nexport var NoSuchKey$ = [-3, n0, _NSK,\n { [_e]: _c, [_hE]: 404 },\n [],\n []\n];\nn0_registry.registerError(NoSuchKey$, NoSuchKey);\nexport var NoSuchUpload$ = [-3, n0, _NSU,\n { [_e]: _c, [_hE]: 404 },\n [],\n []\n];\nn0_registry.registerError(NoSuchUpload$, NoSuchUpload);\nexport var NotFound$ = [-3, n0, _NF,\n { [_e]: _c },\n [],\n []\n];\nn0_registry.registerError(NotFound$, NotFound);\nexport var ObjectAlreadyInActiveTierError$ = [-3, n0, _OAIATE,\n { [_e]: _c, [_hE]: 403 },\n [],\n []\n];\nn0_registry.registerError(ObjectAlreadyInActiveTierError$, ObjectAlreadyInActiveTierError);\nexport var ObjectNotInActiveTierError$ = [-3, n0, _ONIATE,\n { [_e]: _c, [_hE]: 403 },\n [],\n []\n];\nn0_registry.registerError(ObjectNotInActiveTierError$, ObjectNotInActiveTierError);\nexport var TooManyParts$ = [-3, n0, _TMP,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(TooManyParts$, TooManyParts);\nexport const errorTypeRegistries = [\n _s_registry,\n n0_registry,\n];\nvar CopySourceSSECustomerKey = [0, n0, _CSSSECK, 8, 0];\nvar NonEmptyKmsKeyArnString = [0, n0, _NEKKAS, 8, 0];\nvar SessionCredentialValue = [0, n0, _SCV, 8, 0];\nvar SSECustomerKey = [0, n0, _SSECK, 8, 0];\nvar SSEKMSEncryptionContext = [0, n0, _SSEKMSEC, 8, 0];\nvar SSEKMSKeyId = [0, n0, _SSEKMSKI, 8, 0];\nvar StreamingBlob = [0, n0, _SB, { [_st]: 1 }, 42];\nexport var AbacStatus$ = [3, n0, _AS,\n 0,\n [_S],\n [0]\n];\nexport var AbortIncompleteMultipartUpload$ = [3, n0, _AIMU,\n 0,\n [_DAI],\n [1]\n];\nexport var AbortMultipartUploadOutput$ = [3, n0, _AMUO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var AbortMultipartUploadRequest$ = [3, n0, _AMUR,\n 0,\n [_B, _K, _UI, _RP, _EBO, _IMIT],\n [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [6, { [_hH]: _xaimit }]], 3\n];\nexport var AccelerateConfiguration$ = [3, n0, _AC,\n 0,\n [_S],\n [0]\n];\nexport var AccessControlPolicy$ = [3, n0, _ACP,\n 0,\n [_G, _O],\n [[() => Grants, { [_xN]: _ACL }], () => Owner$]\n];\nexport var AccessControlTranslation$ = [3, n0, _ACT,\n 0,\n [_O],\n [0], 1\n];\nexport var AnalyticsAndOperator$ = [3, n0, _AAO,\n 0,\n [_P, _T],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]]\n];\nexport var AnalyticsConfiguration$ = [3, n0, _ACn,\n 0,\n [_I, _SCA, _F],\n [0, () => StorageClassAnalysis$, [() => AnalyticsFilter$, 0]], 2\n];\nexport var AnalyticsExportDestination$ = [3, n0, _AED,\n 0,\n [_SBD],\n [() => AnalyticsS3BucketDestination$], 1\n];\nexport var AnalyticsS3BucketDestination$ = [3, n0, _ASBD,\n 0,\n [_Fo, _B, _BAI, _P],\n [0, 0, 0, 0], 2\n];\nexport var BlockedEncryptionTypes$ = [3, n0, _BET,\n 0,\n [_ET],\n [[() => EncryptionTypeList, { [_xF]: 1 }]]\n];\nexport var Bucket$ = [3, n0, _B,\n 0,\n [_N, _CD, _BR, _BA],\n [0, 4, 0, 0]\n];\nexport var BucketInfo$ = [3, n0, _BI,\n 0,\n [_DR, _Ty],\n [0, 0]\n];\nexport var BucketLifecycleConfiguration$ = [3, n0, _BLC,\n 0,\n [_R],\n [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Ru }]], 1\n];\nexport var BucketLoggingStatus$ = [3, n0, _BLS,\n 0,\n [_LE],\n [[() => LoggingEnabled$, 0]]\n];\nexport var Checksum$ = [3, n0, _C,\n 0,\n [_CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT],\n [0, 0, 0, 0, 0, 0]\n];\nexport var CommonPrefix$ = [3, n0, _CP,\n 0,\n [_P],\n [0]\n];\nexport var CompletedMultipartUpload$ = [3, n0, _CMU,\n 0,\n [_Pa],\n [[() => CompletedPartList, { [_xF]: 1, [_xN]: _Par }]]\n];\nexport var CompletedPart$ = [3, n0, _CPo,\n 0,\n [_ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _PN],\n [0, 0, 0, 0, 0, 0, 1]\n];\nexport var CompleteMultipartUploadOutput$ = [3, n0, _CMUO,\n { [_xN]: _CMUR },\n [_L, _B, _K, _E, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _SSE, _VI, _SSEKMSKI, _BKE, _RC],\n [0, 0, 0, [0, { [_hH]: _xae }], 0, 0, 0, 0, 0, 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]]\n];\nexport var CompleteMultipartUploadRequest$ = [3, n0, _CMURo,\n 0,\n [_B, _K, _UI, _MU, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _MOS, _RP, _EBO, _IM, _INM, _SSECA, _SSECK, _SSECKMD],\n [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [() => CompletedMultipartUpload$, { [_hP]: 1, [_xN]: _CMUo }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamos }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], 3\n];\nexport var Condition$ = [3, n0, _Co,\n 0,\n [_HECRE, _KPE],\n [0, 0]\n];\nexport var ContinuationEvent$ = [3, n0, _CE,\n 0,\n [],\n []\n];\nexport var CopyObjectOutput$ = [3, n0, _COO,\n 0,\n [_COR, _E, _CSVI, _VI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC],\n [[() => CopyObjectResult$, 16], [0, { [_hH]: _xae }], [0, { [_hH]: _xacsvi }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]]\n];\nexport var CopyObjectRequest$ = [3, n0, _CORo,\n 0,\n [_B, _CS, _K, _ACL_, _CC, _CA, _CDo, _CEo, _CL, _CTo, _CSIM, _CSIMS, _CSINM, _CSIUS, _Ex, _GFC, _GR, _GRACP, _GWACP, _IM, _INM, _M, _MD, _TD, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _ESBO],\n [[0, 1], [0, { [_hH]: _xacs__ }], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _xaca }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [4, { [_hH]: _Ex }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xamd }], [0, { [_hH]: _xatd }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], 3\n];\nexport var CopyObjectResult$ = [3, n0, _COR,\n 0,\n [_ETa, _LM, _CT, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh],\n [0, 4, 0, 0, 0, 0, 0, 0]\n];\nexport var CopyPartResult$ = [3, n0, _CPR,\n 0,\n [_ETa, _LM, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh],\n [0, 4, 0, 0, 0, 0, 0]\n];\nexport var CORSConfiguration$ = [3, n0, _CORSC,\n 0,\n [_CORSR],\n [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]], 1\n];\nexport var CORSRule$ = [3, n0, _CORSRu,\n 0,\n [_AM, _AO, _ID, _AH, _EH, _MAS],\n [[64 | 0, { [_xF]: 1, [_xN]: _AMl }], [64 | 0, { [_xF]: 1, [_xN]: _AOl }], 0, [64 | 0, { [_xF]: 1, [_xN]: _AHl }], [64 | 0, { [_xF]: 1, [_xN]: _EHx }], 1], 2\n];\nexport var CreateBucketConfiguration$ = [3, n0, _CBC,\n 0,\n [_LC, _L, _B, _T],\n [0, () => LocationInfo$, () => BucketInfo$, [() => TagSet, 0]]\n];\nexport var CreateBucketMetadataConfigurationRequest$ = [3, n0, _CBMCR,\n 0,\n [_B, _MC, _CMD, _CA, _EBO],\n [[0, 1], [() => MetadataConfiguration$, { [_hP]: 1, [_xN]: _MC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var CreateBucketMetadataTableConfigurationRequest$ = [3, n0, _CBMTCR,\n 0,\n [_B, _MTC, _CMD, _CA, _EBO],\n [[0, 1], [() => MetadataTableConfiguration$, { [_hP]: 1, [_xN]: _MTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var CreateBucketOutput$ = [3, n0, _CBO,\n 0,\n [_L, _BA],\n [[0, { [_hH]: _L }], [0, { [_hH]: _xaba }]]\n];\nexport var CreateBucketRequest$ = [3, n0, _CBR,\n 0,\n [_B, _ACL_, _CBC, _GFC, _GR, _GRACP, _GW, _GWACP, _OLEFB, _OO, _BN],\n [[0, 1], [0, { [_hH]: _xaa }], [() => CreateBucketConfiguration$, { [_hP]: 1, [_xN]: _CBC }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [2, { [_hH]: _xabole }], [0, { [_hH]: _xaoo }], [0, { [_hH]: _xabn }]], 1\n];\nexport var CreateMultipartUploadOutput$ = [3, n0, _CMUOr,\n { [_xN]: _IMUR },\n [_ADb, _ARI, _B, _K, _UI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC, _CA, _CT],\n [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], [0, { [_xN]: _B }], 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]]\n];\nexport var CreateMultipartUploadRequest$ = [3, n0, _CMURr,\n 0,\n [_B, _K, _ACL_, _CC, _CDo, _CEo, _CL, _CTo, _Ex, _GFC, _GR, _GRACP, _GWACP, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _CA, _CT],\n [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]], 2\n];\nexport var CreateSessionOutput$ = [3, n0, _CSO,\n { [_xN]: _CSR },\n [_Cr, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE],\n [[() => SessionCredentials$, { [_xN]: _Cr }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], 1\n];\nexport var CreateSessionRequest$ = [3, n0, _CSRr,\n 0,\n [_B, _SM, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE],\n [[0, 1], [0, { [_hH]: _xacsm }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], 1\n];\nexport var CSVInput$ = [3, n0, _CSVIn,\n 0,\n [_FHI, _Com, _QEC, _RD, _FD, _QC, _AQRD],\n [0, 0, 0, 0, 0, 0, 2]\n];\nexport var CSVOutput$ = [3, n0, _CSVO,\n 0,\n [_QF, _QEC, _RD, _FD, _QC],\n [0, 0, 0, 0, 0]\n];\nexport var DefaultRetention$ = [3, n0, _DRe,\n 0,\n [_Mo, _D, _Y],\n [0, 1, 1]\n];\nexport var Delete$ = [3, n0, _De,\n 0,\n [_Ob, _Q],\n [[() => ObjectIdentifierList, { [_xF]: 1, [_xN]: _Obj }], 2], 1\n];\nexport var DeleteBucketAnalyticsConfigurationRequest$ = [3, n0, _DBACR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeleteBucketCorsRequest$ = [3, n0, _DBCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketEncryptionRequest$ = [3, n0, _DBER,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketIntelligentTieringConfigurationRequest$ = [3, n0, _DBITCR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeleteBucketInventoryConfigurationRequest$ = [3, n0, _DBICR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeleteBucketLifecycleRequest$ = [3, n0, _DBLR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketMetadataConfigurationRequest$ = [3, n0, _DBMCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketMetadataTableConfigurationRequest$ = [3, n0, _DBMTCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketMetricsConfigurationRequest$ = [3, n0, _DBMCRe,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeleteBucketOwnershipControlsRequest$ = [3, n0, _DBOCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketPolicyRequest$ = [3, n0, _DBPR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketReplicationRequest$ = [3, n0, _DBRR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketRequest$ = [3, n0, _DBR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketTaggingRequest$ = [3, n0, _DBTR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketWebsiteRequest$ = [3, n0, _DBWR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeletedObject$ = [3, n0, _DO,\n 0,\n [_K, _VI, _DM, _DMVI],\n [0, 0, 2, 0]\n];\nexport var DeleteMarkerEntry$ = [3, n0, _DME,\n 0,\n [_O, _K, _VI, _IL, _LM],\n [() => Owner$, 0, 0, 2, 4]\n];\nexport var DeleteMarkerReplication$ = [3, n0, _DMR,\n 0,\n [_S],\n [0]\n];\nexport var DeleteObjectOutput$ = [3, n0, _DOO,\n 0,\n [_DM, _VI, _RC],\n [[2, { [_hH]: _xadm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }]]\n];\nexport var DeleteObjectRequest$ = [3, n0, _DOR,\n 0,\n [_B, _K, _MFA, _VI, _RP, _BGR, _EBO, _IM, _IMLMT, _IMS],\n [[0, 1], [0, 1], [0, { [_hH]: _xam_ }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [6, { [_hH]: _xaimlmt }], [1, { [_hH]: _xaims }]], 2\n];\nexport var DeleteObjectsOutput$ = [3, n0, _DOOe,\n { [_xN]: _DRel },\n [_Del, _RC, _Er],\n [[() => DeletedObjects, { [_xF]: 1 }], [0, { [_hH]: _xarc }], [() => Errors, { [_xF]: 1, [_xN]: _Err }]]\n];\nexport var DeleteObjectsRequest$ = [3, n0, _DORe,\n 0,\n [_B, _De, _MFA, _RP, _BGR, _EBO, _CA],\n [[0, 1], [() => Delete$, { [_hP]: 1, [_xN]: _De }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], 2\n];\nexport var DeleteObjectTaggingOutput$ = [3, n0, _DOTO,\n 0,\n [_VI],\n [[0, { [_hH]: _xavi }]]\n];\nexport var DeleteObjectTaggingRequest$ = [3, n0, _DOTR,\n 0,\n [_B, _K, _VI, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeletePublicAccessBlockRequest$ = [3, n0, _DPABR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var Destination$ = [3, n0, _Des,\n 0,\n [_B, _A, _SC, _ACT, _EC, _RT, _Me],\n [0, 0, 0, () => AccessControlTranslation$, () => EncryptionConfiguration$, () => ReplicationTime$, () => Metrics$], 1\n];\nexport var DestinationResult$ = [3, n0, _DRes,\n 0,\n [_TBT, _TBA, _TN],\n [0, 0, 0]\n];\nexport var Encryption$ = [3, n0, _En,\n 0,\n [_ET, _KMSKI, _KMSC],\n [0, [() => SSEKMSKeyId, 0], 0], 1\n];\nexport var EncryptionConfiguration$ = [3, n0, _EC,\n 0,\n [_RKKID],\n [0]\n];\nexport var EndEvent$ = [3, n0, _EE,\n 0,\n [],\n []\n];\nexport var _Error$ = [3, n0, _Err,\n 0,\n [_K, _VI, _Cod, _Mes],\n [0, 0, 0, 0]\n];\nexport var ErrorDetails$ = [3, n0, _ED,\n 0,\n [_ECr, _EM],\n [0, 0]\n];\nexport var ErrorDocument$ = [3, n0, _EDr,\n 0,\n [_K],\n [0], 1\n];\nexport var EventBridgeConfiguration$ = [3, n0, _EBC,\n 0,\n [],\n []\n];\nexport var ExistingObjectReplication$ = [3, n0, _EOR,\n 0,\n [_S],\n [0], 1\n];\nexport var FilterRule$ = [3, n0, _FR,\n 0,\n [_N, _V],\n [0, 0]\n];\nexport var GetBucketAbacOutput$ = [3, n0, _GBAO,\n 0,\n [_AS],\n [[() => AbacStatus$, 16]]\n];\nexport var GetBucketAbacRequest$ = [3, n0, _GBAR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketAccelerateConfigurationOutput$ = [3, n0, _GBACO,\n { [_xN]: _AC },\n [_S, _RC],\n [0, [0, { [_hH]: _xarc }]]\n];\nexport var GetBucketAccelerateConfigurationRequest$ = [3, n0, _GBACR,\n 0,\n [_B, _EBO, _RP],\n [[0, 1], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], 1\n];\nexport var GetBucketAclOutput$ = [3, n0, _GBAOe,\n { [_xN]: _ACP },\n [_O, _G],\n [() => Owner$, [() => Grants, { [_xN]: _ACL }]]\n];\nexport var GetBucketAclRequest$ = [3, n0, _GBARe,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketAnalyticsConfigurationOutput$ = [3, n0, _GBACOe,\n 0,\n [_ACn],\n [[() => AnalyticsConfiguration$, 16]]\n];\nexport var GetBucketAnalyticsConfigurationRequest$ = [3, n0, _GBACRe,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetBucketCorsOutput$ = [3, n0, _GBCO,\n { [_xN]: _CORSC },\n [_CORSR],\n [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]]\n];\nexport var GetBucketCorsRequest$ = [3, n0, _GBCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketEncryptionOutput$ = [3, n0, _GBEO,\n 0,\n [_SSEC],\n [[() => ServerSideEncryptionConfiguration$, 16]]\n];\nexport var GetBucketEncryptionRequest$ = [3, n0, _GBER,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketIntelligentTieringConfigurationOutput$ = [3, n0, _GBITCO,\n 0,\n [_ITC],\n [[() => IntelligentTieringConfiguration$, 16]]\n];\nexport var GetBucketIntelligentTieringConfigurationRequest$ = [3, n0, _GBITCR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetBucketInventoryConfigurationOutput$ = [3, n0, _GBICO,\n 0,\n [_IC],\n [[() => InventoryConfiguration$, 16]]\n];\nexport var GetBucketInventoryConfigurationRequest$ = [3, n0, _GBICR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetBucketLifecycleConfigurationOutput$ = [3, n0, _GBLCO,\n { [_xN]: _LCi },\n [_R, _TDMOS],\n [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Ru }], [0, { [_hH]: _xatdmos }]]\n];\nexport var GetBucketLifecycleConfigurationRequest$ = [3, n0, _GBLCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketLocationOutput$ = [3, n0, _GBLO,\n { [_xN]: _LC },\n [_LC],\n [0]\n];\nexport var GetBucketLocationRequest$ = [3, n0, _GBLR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketLoggingOutput$ = [3, n0, _GBLOe,\n { [_xN]: _BLS },\n [_LE],\n [[() => LoggingEnabled$, 0]]\n];\nexport var GetBucketLoggingRequest$ = [3, n0, _GBLRe,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketMetadataConfigurationOutput$ = [3, n0, _GBMCO,\n 0,\n [_GBMCR],\n [[() => GetBucketMetadataConfigurationResult$, 16]]\n];\nexport var GetBucketMetadataConfigurationRequest$ = [3, n0, _GBMCRe,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketMetadataConfigurationResult$ = [3, n0, _GBMCR,\n 0,\n [_MCR],\n [() => MetadataConfigurationResult$], 1\n];\nexport var GetBucketMetadataTableConfigurationOutput$ = [3, n0, _GBMTCO,\n 0,\n [_GBMTCR],\n [[() => GetBucketMetadataTableConfigurationResult$, 16]]\n];\nexport var GetBucketMetadataTableConfigurationRequest$ = [3, n0, _GBMTCRe,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketMetadataTableConfigurationResult$ = [3, n0, _GBMTCR,\n 0,\n [_MTCR, _S, _Err],\n [() => MetadataTableConfigurationResult$, 0, () => ErrorDetails$], 2\n];\nexport var GetBucketMetricsConfigurationOutput$ = [3, n0, _GBMCOe,\n 0,\n [_MCe],\n [[() => MetricsConfiguration$, 16]]\n];\nexport var GetBucketMetricsConfigurationRequest$ = [3, n0, _GBMCRet,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetBucketNotificationConfigurationRequest$ = [3, n0, _GBNCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketOwnershipControlsOutput$ = [3, n0, _GBOCO,\n 0,\n [_OC],\n [[() => OwnershipControls$, 16]]\n];\nexport var GetBucketOwnershipControlsRequest$ = [3, n0, _GBOCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketPolicyOutput$ = [3, n0, _GBPO,\n 0,\n [_Po],\n [[0, 16]]\n];\nexport var GetBucketPolicyRequest$ = [3, n0, _GBPR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketPolicyStatusOutput$ = [3, n0, _GBPSO,\n 0,\n [_PS],\n [[() => PolicyStatus$, 16]]\n];\nexport var GetBucketPolicyStatusRequest$ = [3, n0, _GBPSR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketReplicationOutput$ = [3, n0, _GBRO,\n 0,\n [_RCe],\n [[() => ReplicationConfiguration$, 16]]\n];\nexport var GetBucketReplicationRequest$ = [3, n0, _GBRR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketRequestPaymentOutput$ = [3, n0, _GBRPO,\n { [_xN]: _RPC },\n [_Pay],\n [0]\n];\nexport var GetBucketRequestPaymentRequest$ = [3, n0, _GBRPR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketTaggingOutput$ = [3, n0, _GBTO,\n { [_xN]: _Tag },\n [_TS],\n [[() => TagSet, 0]], 1\n];\nexport var GetBucketTaggingRequest$ = [3, n0, _GBTR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketVersioningOutput$ = [3, n0, _GBVO,\n { [_xN]: _VC },\n [_S, _MFAD],\n [0, [0, { [_xN]: _MDf }]]\n];\nexport var GetBucketVersioningRequest$ = [3, n0, _GBVR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketWebsiteOutput$ = [3, n0, _GBWO,\n { [_xN]: _WC },\n [_RART, _IDn, _EDr, _RR],\n [() => RedirectAllRequestsTo$, () => IndexDocument$, () => ErrorDocument$, [() => RoutingRules, 0]]\n];\nexport var GetBucketWebsiteRequest$ = [3, n0, _GBWR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetObjectAclOutput$ = [3, n0, _GOAO,\n { [_xN]: _ACP },\n [_O, _G, _RC],\n [() => Owner$, [() => Grants, { [_xN]: _ACL }], [0, { [_hH]: _xarc }]]\n];\nexport var GetObjectAclRequest$ = [3, n0, _GOAR,\n 0,\n [_B, _K, _VI, _RP, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetObjectAttributesOutput$ = [3, n0, _GOAOe,\n { [_xN]: _GOARe },\n [_DM, _LM, _VI, _RC, _ETa, _C, _OP, _SC, _OS],\n [[2, { [_hH]: _xadm }], [4, { [_hH]: _LM_ }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }], 0, () => Checksum$, [() => GetObjectAttributesParts$, 0], 0, 1]\n];\nexport var GetObjectAttributesParts$ = [3, n0, _GOAP,\n 0,\n [_TPC, _PNM, _NPNM, _MP, _IT, _Pa],\n [[1, { [_xN]: _PC }], 0, 0, 1, 2, [() => PartsList, { [_xF]: 1, [_xN]: _Par }]]\n];\nexport var GetObjectAttributesRequest$ = [3, n0, _GOARet,\n 0,\n [_B, _K, _OA, _VI, _MP, _PNM, _SSECA, _SSECK, _SSECKMD, _RP, _EBO],\n [[0, 1], [0, 1], [64 | 0, { [_hH]: _xaoa }], [0, { [_hQ]: _vI }], [1, { [_hH]: _xamp }], [0, { [_hH]: _xapnm }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var GetObjectLegalHoldOutput$ = [3, n0, _GOLHO,\n 0,\n [_LH],\n [[() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }]]\n];\nexport var GetObjectLegalHoldRequest$ = [3, n0, _GOLHR,\n 0,\n [_B, _K, _VI, _RP, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetObjectLockConfigurationOutput$ = [3, n0, _GOLCO,\n 0,\n [_OLC],\n [[() => ObjectLockConfiguration$, 16]]\n];\nexport var GetObjectLockConfigurationRequest$ = [3, n0, _GOLCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetObjectOutput$ = [3, n0, _GOO,\n 0,\n [_Bo, _DM, _AR, _E, _Re, _LM, _CLo, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _MM, _VI, _CC, _CDo, _CEo, _CL, _CR, _CTo, _Ex, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS],\n [[() => StreamingBlob, 16], [2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CR_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]]\n];\nexport var GetObjectRequest$ = [3, n0, _GOR,\n 0,\n [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh],\n [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm }]], 2\n];\nexport var GetObjectRetentionOutput$ = [3, n0, _GORO,\n 0,\n [_Ret],\n [[() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }]]\n];\nexport var GetObjectRetentionRequest$ = [3, n0, _GORR,\n 0,\n [_B, _K, _VI, _RP, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetObjectTaggingOutput$ = [3, n0, _GOTO,\n { [_xN]: _Tag },\n [_TS, _VI],\n [[() => TagSet, 0], [0, { [_hH]: _xavi }]], 1\n];\nexport var GetObjectTaggingRequest$ = [3, n0, _GOTR,\n 0,\n [_B, _K, _VI, _EBO, _RP],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], 2\n];\nexport var GetObjectTorrentOutput$ = [3, n0, _GOTOe,\n 0,\n [_Bo, _RC],\n [[() => StreamingBlob, 16], [0, { [_hH]: _xarc }]]\n];\nexport var GetObjectTorrentRequest$ = [3, n0, _GOTRe,\n 0,\n [_B, _K, _RP, _EBO],\n [[0, 1], [0, 1], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetPublicAccessBlockOutput$ = [3, n0, _GPABO,\n 0,\n [_PABC],\n [[() => PublicAccessBlockConfiguration$, 16]]\n];\nexport var GetPublicAccessBlockRequest$ = [3, n0, _GPABR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GlacierJobParameters$ = [3, n0, _GJP,\n 0,\n [_Ti],\n [0], 1\n];\nexport var Grant$ = [3, n0, _Gr,\n 0,\n [_Gra, _Pe],\n [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0]\n];\nexport var Grantee$ = [3, n0, _Gra,\n 0,\n [_Ty, _DN, _EA, _ID, _URI],\n [[0, { [_xA]: 1, [_xN]: _xs }], 0, 0, 0, 0], 1\n];\nexport var HeadBucketOutput$ = [3, n0, _HBO,\n 0,\n [_BA, _BLT, _BLN, _BR, _APA],\n [[0, { [_hH]: _xaba }], [0, { [_hH]: _xablt }], [0, { [_hH]: _xabln }], [0, { [_hH]: _xabr }], [2, { [_hH]: _xaapa }]]\n];\nexport var HeadBucketRequest$ = [3, n0, _HBR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var HeadObjectOutput$ = [3, n0, _HOO,\n 0,\n [_DM, _AR, _E, _Re, _ASr, _LM, _CLo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _ETa, _MM, _VI, _CC, _CDo, _CEo, _CL, _CTo, _CR, _Ex, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS],\n [[2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [0, { [_hH]: _xaas }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [0, { [_hH]: _ETa }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _CR_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]]\n];\nexport var HeadObjectRequest$ = [3, n0, _HOR,\n 0,\n [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh],\n [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm }]], 2\n];\nexport var IndexDocument$ = [3, n0, _IDn,\n 0,\n [_Su],\n [0], 1\n];\nexport var Initiator$ = [3, n0, _In,\n 0,\n [_ID, _DN],\n [0, 0]\n];\nexport var InputSerialization$ = [3, n0, _IS,\n 0,\n [_CSV, _CTom, _JSON, _Parq],\n [() => CSVInput$, 0, () => JSONInput$, () => ParquetInput$]\n];\nexport var IntelligentTieringAndOperator$ = [3, n0, _ITAO,\n 0,\n [_P, _T],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]]\n];\nexport var IntelligentTieringConfiguration$ = [3, n0, _ITC,\n 0,\n [_I, _S, _Tie, _F],\n [0, 0, [() => TieringList, { [_xF]: 1, [_xN]: _Tier }], [() => IntelligentTieringFilter$, 0]], 3\n];\nexport var IntelligentTieringFilter$ = [3, n0, _ITF,\n 0,\n [_P, _Ta, _An],\n [0, () => Tag$, [() => IntelligentTieringAndOperator$, 0]]\n];\nexport var InventoryConfiguration$ = [3, n0, _IC,\n 0,\n [_Des, _IE, _I, _IOV, _Sc, _F, _OF],\n [[() => InventoryDestination$, 0], 2, 0, 0, () => InventorySchedule$, () => InventoryFilter$, [() => InventoryOptionalFields, 0]], 5\n];\nexport var InventoryDestination$ = [3, n0, _IDnv,\n 0,\n [_SBD],\n [[() => InventoryS3BucketDestination$, 0]], 1\n];\nexport var InventoryEncryption$ = [3, n0, _IEn,\n 0,\n [_SSES, _SSEKMS],\n [[() => SSES3$, { [_xN]: _SS }], [() => SSEKMS$, { [_xN]: _SK }]]\n];\nexport var InventoryFilter$ = [3, n0, _IF,\n 0,\n [_P],\n [0], 1\n];\nexport var InventoryS3BucketDestination$ = [3, n0, _ISBD,\n 0,\n [_B, _Fo, _AI, _P, _En],\n [0, 0, 0, 0, [() => InventoryEncryption$, 0]], 2\n];\nexport var InventorySchedule$ = [3, n0, _ISn,\n 0,\n [_Fr],\n [0], 1\n];\nexport var InventoryTableConfiguration$ = [3, n0, _ITCn,\n 0,\n [_CSo, _EC],\n [0, () => MetadataTableEncryptionConfiguration$], 1\n];\nexport var InventoryTableConfigurationResult$ = [3, n0, _ITCR,\n 0,\n [_CSo, _TSa, _Err, _TNa, _TA],\n [0, 0, () => ErrorDetails$, 0, 0], 1\n];\nexport var InventoryTableConfigurationUpdates$ = [3, n0, _ITCU,\n 0,\n [_CSo, _EC],\n [0, () => MetadataTableEncryptionConfiguration$], 1\n];\nexport var JournalTableConfiguration$ = [3, n0, _JTC,\n 0,\n [_REe, _EC],\n [() => RecordExpiration$, () => MetadataTableEncryptionConfiguration$], 1\n];\nexport var JournalTableConfigurationResult$ = [3, n0, _JTCR,\n 0,\n [_TSa, _TNa, _REe, _Err, _TA],\n [0, 0, () => RecordExpiration$, () => ErrorDetails$, 0], 3\n];\nexport var JournalTableConfigurationUpdates$ = [3, n0, _JTCU,\n 0,\n [_REe],\n [() => RecordExpiration$], 1\n];\nexport var JSONInput$ = [3, n0, _JSONI,\n 0,\n [_Ty],\n [0]\n];\nexport var JSONOutput$ = [3, n0, _JSONO,\n 0,\n [_RD],\n [0]\n];\nexport var LambdaFunctionConfiguration$ = [3, n0, _LFC,\n 0,\n [_LFA, _Ev, _I, _F],\n [[0, { [_xN]: _CF }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], 2\n];\nexport var LifecycleExpiration$ = [3, n0, _LEi,\n 0,\n [_Da, _D, _EODM],\n [5, 1, 2]\n];\nexport var LifecycleRule$ = [3, n0, _LR,\n 0,\n [_S, _E, _ID, _P, _F, _Tr, _NVT, _NVE, _AIMU],\n [0, () => LifecycleExpiration$, 0, 0, [() => LifecycleRuleFilter$, 0], [() => TransitionList, { [_xF]: 1, [_xN]: _Tra }], [() => NoncurrentVersionTransitionList, { [_xF]: 1, [_xN]: _NVTo }], () => NoncurrentVersionExpiration$, () => AbortIncompleteMultipartUpload$], 1\n];\nexport var LifecycleRuleAndOperator$ = [3, n0, _LRAO,\n 0,\n [_P, _T, _OSGT, _OSLT],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 1, 1]\n];\nexport var LifecycleRuleFilter$ = [3, n0, _LRF,\n 0,\n [_P, _Ta, _OSGT, _OSLT, _An],\n [0, () => Tag$, 1, 1, [() => LifecycleRuleAndOperator$, 0]]\n];\nexport var ListBucketAnalyticsConfigurationsOutput$ = [3, n0, _LBACO,\n { [_xN]: _LBACR },\n [_IT, _CTon, _NCT, _ACLn],\n [2, 0, 0, [() => AnalyticsConfigurationList, { [_xF]: 1, [_xN]: _ACn }]]\n];\nexport var ListBucketAnalyticsConfigurationsRequest$ = [3, n0, _LBACRi,\n 0,\n [_B, _CTon, _EBO],\n [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var ListBucketIntelligentTieringConfigurationsOutput$ = [3, n0, _LBITCO,\n 0,\n [_IT, _CTon, _NCT, _ITCL],\n [2, 0, 0, [() => IntelligentTieringConfigurationList, { [_xF]: 1, [_xN]: _ITC }]]\n];\nexport var ListBucketIntelligentTieringConfigurationsRequest$ = [3, n0, _LBITCR,\n 0,\n [_B, _CTon, _EBO],\n [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var ListBucketInventoryConfigurationsOutput$ = [3, n0, _LBICO,\n { [_xN]: _LICR },\n [_CTon, _ICL, _IT, _NCT],\n [0, [() => InventoryConfigurationList, { [_xF]: 1, [_xN]: _IC }], 2, 0]\n];\nexport var ListBucketInventoryConfigurationsRequest$ = [3, n0, _LBICR,\n 0,\n [_B, _CTon, _EBO],\n [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var ListBucketMetricsConfigurationsOutput$ = [3, n0, _LBMCO,\n { [_xN]: _LMCR },\n [_IT, _CTon, _NCT, _MCL],\n [2, 0, 0, [() => MetricsConfigurationList, { [_xF]: 1, [_xN]: _MCe }]]\n];\nexport var ListBucketMetricsConfigurationsRequest$ = [3, n0, _LBMCR,\n 0,\n [_B, _CTon, _EBO],\n [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var ListBucketsOutput$ = [3, n0, _LBO,\n { [_xN]: _LAMBR },\n [_Bu, _O, _CTon, _P],\n [[() => Buckets, 0], () => Owner$, 0, 0]\n];\nexport var ListBucketsRequest$ = [3, n0, _LBR,\n 0,\n [_MB, _CTon, _P, _BR],\n [[1, { [_hQ]: _mb }], [0, { [_hQ]: _ct }], [0, { [_hQ]: _p }], [0, { [_hQ]: _br }]]\n];\nexport var ListDirectoryBucketsOutput$ = [3, n0, _LDBO,\n { [_xN]: _LAMDBR },\n [_Bu, _CTon],\n [[() => Buckets, 0], 0]\n];\nexport var ListDirectoryBucketsRequest$ = [3, n0, _LDBR,\n 0,\n [_CTon, _MDB],\n [[0, { [_hQ]: _ct }], [1, { [_hQ]: _mdb }]]\n];\nexport var ListMultipartUploadsOutput$ = [3, n0, _LMUO,\n { [_xN]: _LMUR },\n [_B, _KM, _UIM, _NKM, _P, _Deli, _NUIM, _MUa, _IT, _U, _CPom, _ETn, _RC],\n [0, 0, 0, 0, 0, 0, 0, 1, 2, [() => MultipartUploadList, { [_xF]: 1, [_xN]: _Up }], [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]]\n];\nexport var ListMultipartUploadsRequest$ = [3, n0, _LMURi,\n 0,\n [_B, _Deli, _ETn, _KM, _MUa, _P, _UIM, _EBO, _RP],\n [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mu }], [0, { [_hQ]: _p }], [0, { [_hQ]: _uim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], 1\n];\nexport var ListObjectsOutput$ = [3, n0, _LOO,\n { [_xN]: _LBRi },\n [_IT, _Ma, _NM, _Con, _N, _P, _Deli, _MK, _CPom, _ETn, _RC],\n [2, 0, 0, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]]\n];\nexport var ListObjectsRequest$ = [3, n0, _LOR,\n 0,\n [_B, _Deli, _ETn, _Ma, _MK, _P, _RP, _EBO, _OOA],\n [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _m }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], 1\n];\nexport var ListObjectsV2Output$ = [3, n0, _LOVO,\n { [_xN]: _LBRi },\n [_IT, _Con, _N, _P, _Deli, _MK, _CPom, _ETn, _KC, _CTon, _NCT, _SA, _RC],\n [2, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, 1, 0, 0, 0, [0, { [_hH]: _xarc }]]\n];\nexport var ListObjectsV2Request$ = [3, n0, _LOVR,\n 0,\n [_B, _Deli, _ETn, _MK, _P, _CTon, _FO, _SA, _RP, _EBO, _OOA],\n [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _ct }], [2, { [_hQ]: _fo }], [0, { [_hQ]: _sa }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], 1\n];\nexport var ListObjectVersionsOutput$ = [3, n0, _LOVOi,\n { [_xN]: _LVR },\n [_IT, _KM, _VIM, _NKM, _NVIM, _Ve, _DMe, _N, _P, _Deli, _MK, _CPom, _ETn, _RC],\n [2, 0, 0, 0, 0, [() => ObjectVersionList, { [_xF]: 1, [_xN]: _Ver }], [() => DeleteMarkers, { [_xF]: 1, [_xN]: _DM }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]]\n];\nexport var ListObjectVersionsRequest$ = [3, n0, _LOVRi,\n 0,\n [_B, _Deli, _ETn, _KM, _MK, _P, _VIM, _EBO, _RP, _OOA],\n [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _vim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }], [64 | 0, { [_hH]: _xaooa }]], 1\n];\nexport var ListPartsOutput$ = [3, n0, _LPO,\n { [_xN]: _LPR },\n [_ADb, _ARI, _B, _K, _UI, _PNM, _NPNM, _MP, _IT, _Pa, _In, _O, _SC, _RC, _CA, _CT],\n [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], 0, 0, 0, 0, 0, 1, 2, [() => Parts, { [_xF]: 1, [_xN]: _Par }], () => Initiator$, () => Owner$, 0, [0, { [_hH]: _xarc }], 0, 0]\n];\nexport var ListPartsRequest$ = [3, n0, _LPRi,\n 0,\n [_B, _K, _UI, _MP, _PNM, _RP, _EBO, _SSECA, _SSECK, _SSECKMD],\n [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [1, { [_hQ]: _mp }], [0, { [_hQ]: _pnm }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], 3\n];\nexport var LocationInfo$ = [3, n0, _LI,\n 0,\n [_Ty, _N],\n [0, 0]\n];\nexport var LoggingEnabled$ = [3, n0, _LE,\n 0,\n [_TB, _TP, _TG, _TOKF],\n [0, 0, [() => TargetGrants, 0], [() => TargetObjectKeyFormat$, 0]], 2\n];\nexport var MetadataConfiguration$ = [3, n0, _MC,\n 0,\n [_JTC, _ITCn],\n [() => JournalTableConfiguration$, () => InventoryTableConfiguration$], 1\n];\nexport var MetadataConfigurationResult$ = [3, n0, _MCR,\n 0,\n [_DRes, _JTCR, _ITCR],\n [() => DestinationResult$, () => JournalTableConfigurationResult$, () => InventoryTableConfigurationResult$], 1\n];\nexport var MetadataEntry$ = [3, n0, _ME,\n 0,\n [_N, _V],\n [0, 0]\n];\nexport var MetadataTableConfiguration$ = [3, n0, _MTC,\n 0,\n [_STD],\n [() => S3TablesDestination$], 1\n];\nexport var MetadataTableConfigurationResult$ = [3, n0, _MTCR,\n 0,\n [_STDR],\n [() => S3TablesDestinationResult$], 1\n];\nexport var MetadataTableEncryptionConfiguration$ = [3, n0, _MTEC,\n 0,\n [_SAs, _KKA],\n [0, 0], 1\n];\nexport var Metrics$ = [3, n0, _Me,\n 0,\n [_S, _ETv],\n [0, () => ReplicationTimeValue$], 1\n];\nexport var MetricsAndOperator$ = [3, n0, _MAO,\n 0,\n [_P, _T, _APAc],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 0]\n];\nexport var MetricsConfiguration$ = [3, n0, _MCe,\n 0,\n [_I, _F],\n [0, [() => MetricsFilter$, 0]], 1\n];\nexport var MultipartUpload$ = [3, n0, _MU,\n 0,\n [_UI, _K, _Ini, _SC, _O, _In, _CA, _CT],\n [0, 0, 4, 0, () => Owner$, () => Initiator$, 0, 0]\n];\nexport var NoncurrentVersionExpiration$ = [3, n0, _NVE,\n 0,\n [_ND, _NNV],\n [1, 1]\n];\nexport var NoncurrentVersionTransition$ = [3, n0, _NVTo,\n 0,\n [_ND, _SC, _NNV],\n [1, 0, 1]\n];\nexport var NotificationConfiguration$ = [3, n0, _NC,\n 0,\n [_TCo, _QCu, _LFCa, _EBC],\n [[() => TopicConfigurationList, { [_xF]: 1, [_xN]: _TCop }], [() => QueueConfigurationList, { [_xF]: 1, [_xN]: _QCue }], [() => LambdaFunctionConfigurationList, { [_xF]: 1, [_xN]: _CFC }], () => EventBridgeConfiguration$]\n];\nexport var NotificationConfigurationFilter$ = [3, n0, _NCF,\n 0,\n [_K],\n [[() => S3KeyFilter$, { [_xN]: _SKe }]]\n];\nexport var _Object$ = [3, n0, _Obj,\n 0,\n [_K, _LM, _ETa, _CA, _CT, _Si, _SC, _O, _RSe],\n [0, 4, 0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, () => Owner$, () => RestoreStatus$]\n];\nexport var ObjectIdentifier$ = [3, n0, _OI,\n 0,\n [_K, _VI, _ETa, _LMT, _Si],\n [0, 0, 0, 6, 1], 1\n];\nexport var ObjectLockConfiguration$ = [3, n0, _OLC,\n 0,\n [_OLE, _Ru],\n [0, () => ObjectLockRule$]\n];\nexport var ObjectLockLegalHold$ = [3, n0, _OLLH,\n 0,\n [_S],\n [0]\n];\nexport var ObjectLockRetention$ = [3, n0, _OLR,\n 0,\n [_Mo, _RUD],\n [0, 5]\n];\nexport var ObjectLockRule$ = [3, n0, _OLRb,\n 0,\n [_DRe],\n [() => DefaultRetention$]\n];\nexport var ObjectPart$ = [3, n0, _OPb,\n 0,\n [_PN, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh],\n [1, 1, 0, 0, 0, 0, 0]\n];\nexport var ObjectVersion$ = [3, n0, _OV,\n 0,\n [_ETa, _CA, _CT, _Si, _SC, _K, _VI, _IL, _LM, _O, _RSe],\n [0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, 0, 0, 2, 4, () => Owner$, () => RestoreStatus$]\n];\nexport var OutputLocation$ = [3, n0, _OL,\n 0,\n [_S_],\n [[() => S3Location$, 0]]\n];\nexport var OutputSerialization$ = [3, n0, _OSu,\n 0,\n [_CSV, _JSON],\n [() => CSVOutput$, () => JSONOutput$]\n];\nexport var Owner$ = [3, n0, _O,\n 0,\n [_DN, _ID],\n [0, 0]\n];\nexport var OwnershipControls$ = [3, n0, _OC,\n 0,\n [_R],\n [[() => OwnershipControlsRules, { [_xF]: 1, [_xN]: _Ru }]], 1\n];\nexport var OwnershipControlsRule$ = [3, n0, _OCR,\n 0,\n [_OO],\n [0], 1\n];\nexport var ParquetInput$ = [3, n0, _PI,\n 0,\n [],\n []\n];\nexport var Part$ = [3, n0, _Par,\n 0,\n [_PN, _LM, _ETa, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh],\n [1, 4, 0, 1, 0, 0, 0, 0, 0]\n];\nexport var PartitionedPrefix$ = [3, n0, _PP,\n { [_xN]: _PP },\n [_PDS],\n [0]\n];\nexport var PolicyStatus$ = [3, n0, _PS,\n 0,\n [_IP],\n [[2, { [_xN]: _IP }]]\n];\nexport var Progress$ = [3, n0, _Pr,\n 0,\n [_BS, _BP, _BRy],\n [1, 1, 1]\n];\nexport var ProgressEvent$ = [3, n0, _PE,\n 0,\n [_Det],\n [[() => Progress$, { [_eP]: 1 }]]\n];\nexport var PublicAccessBlockConfiguration$ = [3, n0, _PABC,\n 0,\n [_BPA, _IPA, _BPP, _RPB],\n [[2, { [_xN]: _BPA }], [2, { [_xN]: _IPA }], [2, { [_xN]: _BPP }], [2, { [_xN]: _RPB }]]\n];\nexport var PutBucketAbacRequest$ = [3, n0, _PBAR,\n 0,\n [_B, _AS, _CMD, _CA, _EBO],\n [[0, 1], [() => AbacStatus$, { [_hP]: 1, [_xN]: _AS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketAccelerateConfigurationRequest$ = [3, n0, _PBACR,\n 0,\n [_B, _AC, _EBO, _CA],\n [[0, 1], [() => AccelerateConfiguration$, { [_hP]: 1, [_xN]: _AC }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], 2\n];\nexport var PutBucketAclRequest$ = [3, n0, _PBARu,\n 0,\n [_B, _ACL_, _ACP, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _EBO],\n [[0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var PutBucketAnalyticsConfigurationRequest$ = [3, n0, _PBACRu,\n 0,\n [_B, _I, _ACn, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [() => AnalyticsConfiguration$, { [_hP]: 1, [_xN]: _ACn }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var PutBucketCorsRequest$ = [3, n0, _PBCR,\n 0,\n [_B, _CORSC, _CMD, _CA, _EBO],\n [[0, 1], [() => CORSConfiguration$, { [_hP]: 1, [_xN]: _CORSC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketEncryptionRequest$ = [3, n0, _PBER,\n 0,\n [_B, _SSEC, _CMD, _CA, _EBO],\n [[0, 1], [() => ServerSideEncryptionConfiguration$, { [_hP]: 1, [_xN]: _SSEC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketIntelligentTieringConfigurationRequest$ = [3, n0, _PBITCR,\n 0,\n [_B, _I, _ITC, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [() => IntelligentTieringConfiguration$, { [_hP]: 1, [_xN]: _ITC }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var PutBucketInventoryConfigurationRequest$ = [3, n0, _PBICR,\n 0,\n [_B, _I, _IC, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [() => InventoryConfiguration$, { [_hP]: 1, [_xN]: _IC }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var PutBucketLifecycleConfigurationOutput$ = [3, n0, _PBLCO,\n 0,\n [_TDMOS],\n [[0, { [_hH]: _xatdmos }]]\n];\nexport var PutBucketLifecycleConfigurationRequest$ = [3, n0, _PBLCR,\n 0,\n [_B, _CA, _LCi, _EBO, _TDMOS],\n [[0, 1], [0, { [_hH]: _xasca }], [() => BucketLifecycleConfiguration$, { [_hP]: 1, [_xN]: _LCi }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xatdmos }]], 1\n];\nexport var PutBucketLoggingRequest$ = [3, n0, _PBLR,\n 0,\n [_B, _BLS, _CMD, _CA, _EBO],\n [[0, 1], [() => BucketLoggingStatus$, { [_hP]: 1, [_xN]: _BLS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketMetricsConfigurationRequest$ = [3, n0, _PBMCR,\n 0,\n [_B, _I, _MCe, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [() => MetricsConfiguration$, { [_hP]: 1, [_xN]: _MCe }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var PutBucketNotificationConfigurationRequest$ = [3, n0, _PBNCR,\n 0,\n [_B, _NC, _EBO, _SDV],\n [[0, 1], [() => NotificationConfiguration$, { [_hP]: 1, [_xN]: _NC }], [0, { [_hH]: _xaebo }], [2, { [_hH]: _xasdv }]], 2\n];\nexport var PutBucketOwnershipControlsRequest$ = [3, n0, _PBOCR,\n 0,\n [_B, _OC, _CMD, _EBO, _CA],\n [[0, 1], [() => OwnershipControls$, { [_hP]: 1, [_xN]: _OC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], 2\n];\nexport var PutBucketPolicyRequest$ = [3, n0, _PBPR,\n 0,\n [_B, _Po, _CMD, _CA, _CRSBA, _EBO],\n [[0, 1], [0, 16], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [2, { [_hH]: _xacrsba }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketReplicationRequest$ = [3, n0, _PBRR,\n 0,\n [_B, _RCe, _CMD, _CA, _To, _EBO],\n [[0, 1], [() => ReplicationConfiguration$, { [_hP]: 1, [_xN]: _RCe }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketRequestPaymentRequest$ = [3, n0, _PBRPR,\n 0,\n [_B, _RPC, _CMD, _CA, _EBO],\n [[0, 1], [() => RequestPaymentConfiguration$, { [_hP]: 1, [_xN]: _RPC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketTaggingRequest$ = [3, n0, _PBTR,\n 0,\n [_B, _Tag, _CMD, _CA, _EBO],\n [[0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketVersioningRequest$ = [3, n0, _PBVR,\n 0,\n [_B, _VC, _CMD, _CA, _MFA, _EBO],\n [[0, 1], [() => VersioningConfiguration$, { [_hP]: 1, [_xN]: _VC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketWebsiteRequest$ = [3, n0, _PBWR,\n 0,\n [_B, _WC, _CMD, _CA, _EBO],\n [[0, 1], [() => WebsiteConfiguration$, { [_hP]: 1, [_xN]: _WC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectAclOutput$ = [3, n0, _POAO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var PutObjectAclRequest$ = [3, n0, _POAR,\n 0,\n [_B, _K, _ACL_, _ACP, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _RP, _VI, _EBO],\n [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectLegalHoldOutput$ = [3, n0, _POLHO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var PutObjectLegalHoldRequest$ = [3, n0, _POLHR,\n 0,\n [_B, _K, _LH, _RP, _VI, _CMD, _CA, _EBO],\n [[0, 1], [0, 1], [() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectLockConfigurationOutput$ = [3, n0, _POLCO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var PutObjectLockConfigurationRequest$ = [3, n0, _POLCR,\n 0,\n [_B, _OLC, _RP, _To, _CMD, _CA, _EBO],\n [[0, 1], [() => ObjectLockConfiguration$, { [_hP]: 1, [_xN]: _OLC }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var PutObjectOutput$ = [3, n0, _POO,\n 0,\n [_E, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _SSE, _VI, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _Si, _RC],\n [[0, { [_hH]: _xae }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [1, { [_hH]: _xaos }], [0, { [_hH]: _xarc }]]\n];\nexport var PutObjectRequest$ = [3, n0, _POR,\n 0,\n [_B, _K, _ACL_, _Bo, _CC, _CDo, _CEo, _CL, _CLo, _CMD, _CTo, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _Ex, _IM, _INM, _GFC, _GR, _GRACP, _GWACP, _WOB, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO],\n [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => StreamingBlob, 16], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [1, { [_hH]: _xawob }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectRetentionOutput$ = [3, n0, _PORO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var PutObjectRetentionRequest$ = [3, n0, _PORR,\n 0,\n [_B, _K, _Ret, _RP, _VI, _BGR, _CMD, _CA, _EBO],\n [[0, 1], [0, 1], [() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectTaggingOutput$ = [3, n0, _POTO,\n 0,\n [_VI],\n [[0, { [_hH]: _xavi }]]\n];\nexport var PutObjectTaggingRequest$ = [3, n0, _POTR,\n 0,\n [_B, _K, _Tag, _VI, _CMD, _CA, _EBO, _RP],\n [[0, 1], [0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], 3\n];\nexport var PutPublicAccessBlockRequest$ = [3, n0, _PPABR,\n 0,\n [_B, _PABC, _CMD, _CA, _EBO],\n [[0, 1], [() => PublicAccessBlockConfiguration$, { [_hP]: 1, [_xN]: _PABC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var QueueConfiguration$ = [3, n0, _QCue,\n 0,\n [_QA, _Ev, _I, _F],\n [[0, { [_xN]: _Qu }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], 2\n];\nexport var RecordExpiration$ = [3, n0, _REe,\n 0,\n [_E, _D],\n [0, 1], 1\n];\nexport var RecordsEvent$ = [3, n0, _REec,\n 0,\n [_Payl],\n [[21, { [_eP]: 1 }]]\n];\nexport var Redirect$ = [3, n0, _Red,\n 0,\n [_HN, _HRC, _Pro, _RKPW, _RKW],\n [0, 0, 0, 0, 0]\n];\nexport var RedirectAllRequestsTo$ = [3, n0, _RART,\n 0,\n [_HN, _Pro],\n [0, 0], 1\n];\nexport var RenameObjectOutput$ = [3, n0, _ROO,\n 0,\n [],\n []\n];\nexport var RenameObjectRequest$ = [3, n0, _ROR,\n 0,\n [_B, _K, _RSen, _DIM, _DINM, _DIMS, _DIUS, _SIM, _SINM, _SIMS, _SIUS, _CTl],\n [[0, 1], [0, 1], [0, { [_hH]: _xars_ }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IMS_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _xarsim }], [0, { [_hH]: _xarsinm }], [6, { [_hH]: _xarsims }], [6, { [_hH]: _xarsius }], [0, { [_hH]: _xact_, [_iT]: 1 }]], 3\n];\nexport var ReplicaModifications$ = [3, n0, _RM,\n 0,\n [_S],\n [0], 1\n];\nexport var ReplicationConfiguration$ = [3, n0, _RCe,\n 0,\n [_Ro, _R],\n [0, [() => ReplicationRules, { [_xF]: 1, [_xN]: _Ru }]], 2\n];\nexport var ReplicationRule$ = [3, n0, _RRe,\n 0,\n [_S, _Des, _ID, _Pri, _P, _F, _SSC, _EOR, _DMR],\n [0, () => Destination$, 0, 1, 0, [() => ReplicationRuleFilter$, 0], () => SourceSelectionCriteria$, () => ExistingObjectReplication$, () => DeleteMarkerReplication$], 2\n];\nexport var ReplicationRuleAndOperator$ = [3, n0, _RRAO,\n 0,\n [_P, _T],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]]\n];\nexport var ReplicationRuleFilter$ = [3, n0, _RRF,\n 0,\n [_P, _Ta, _An],\n [0, () => Tag$, [() => ReplicationRuleAndOperator$, 0]]\n];\nexport var ReplicationTime$ = [3, n0, _RT,\n 0,\n [_S, _Tim],\n [0, () => ReplicationTimeValue$], 2\n];\nexport var ReplicationTimeValue$ = [3, n0, _RTV,\n 0,\n [_Mi],\n [1]\n];\nexport var RequestPaymentConfiguration$ = [3, n0, _RPC,\n 0,\n [_Pay],\n [0], 1\n];\nexport var RequestProgress$ = [3, n0, _RPe,\n 0,\n [_Ena],\n [2]\n];\nexport var RestoreObjectOutput$ = [3, n0, _ROOe,\n 0,\n [_RC, _ROP],\n [[0, { [_hH]: _xarc }], [0, { [_hH]: _xarop }]]\n];\nexport var RestoreObjectRequest$ = [3, n0, _RORe,\n 0,\n [_B, _K, _VI, _RRes, _RP, _CA, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [() => RestoreRequest$, { [_hP]: 1, [_xN]: _RRes }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var RestoreRequest$ = [3, n0, _RRes,\n 0,\n [_D, _GJP, _Ty, _Ti, _Desc, _SP, _OL],\n [1, () => GlacierJobParameters$, 0, 0, 0, () => SelectParameters$, [() => OutputLocation$, 0]]\n];\nexport var RestoreStatus$ = [3, n0, _RSe,\n 0,\n [_IRIP, _RED],\n [2, 4]\n];\nexport var RoutingRule$ = [3, n0, _RRo,\n 0,\n [_Red, _Co],\n [() => Redirect$, () => Condition$], 1\n];\nexport var S3KeyFilter$ = [3, n0, _SKF,\n 0,\n [_FRi],\n [[() => FilterRuleList, { [_xF]: 1, [_xN]: _FR }]]\n];\nexport var S3Location$ = [3, n0, _SL,\n 0,\n [_BNu, _P, _En, _CACL, _ACL, _Tag, _UM, _SC],\n [0, 0, [() => Encryption$, 0], 0, [() => Grants, 0], [() => Tagging$, 0], [() => UserMetadata, 0], 0], 2\n];\nexport var S3TablesDestination$ = [3, n0, _STD,\n 0,\n [_TBA, _TNa],\n [0, 0], 2\n];\nexport var S3TablesDestinationResult$ = [3, n0, _STDR,\n 0,\n [_TBA, _TNa, _TA, _TN],\n [0, 0, 0, 0], 4\n];\nexport var ScanRange$ = [3, n0, _SR,\n 0,\n [_St, _End],\n [1, 1]\n];\nexport var SelectObjectContentOutput$ = [3, n0, _SOCO,\n 0,\n [_Payl],\n [[() => SelectObjectContentEventStream$, 16]]\n];\nexport var SelectObjectContentRequest$ = [3, n0, _SOCR,\n 0,\n [_B, _K, _Exp, _ETx, _IS, _OSu, _SSECA, _SSECK, _SSECKMD, _RPe, _SR, _EBO],\n [[0, 1], [0, 1], 0, 0, () => InputSerialization$, () => OutputSerialization$, [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], () => RequestProgress$, () => ScanRange$, [0, { [_hH]: _xaebo }]], 6\n];\nexport var SelectParameters$ = [3, n0, _SP,\n 0,\n [_IS, _ETx, _Exp, _OSu],\n [() => InputSerialization$, 0, 0, () => OutputSerialization$], 4\n];\nexport var ServerSideEncryptionByDefault$ = [3, n0, _SSEBD,\n 0,\n [_SSEA, _KMSMKID],\n [0, [() => SSEKMSKeyId, 0]], 1\n];\nexport var ServerSideEncryptionConfiguration$ = [3, n0, _SSEC,\n 0,\n [_R],\n [[() => ServerSideEncryptionRules, { [_xF]: 1, [_xN]: _Ru }]], 1\n];\nexport var ServerSideEncryptionRule$ = [3, n0, _SSER,\n 0,\n [_ASSEBD, _BKE, _BET],\n [[() => ServerSideEncryptionByDefault$, 0], 2, [() => BlockedEncryptionTypes$, 0]]\n];\nexport var SessionCredentials$ = [3, n0, _SCe,\n 0,\n [_AKI, _SAK, _ST, _E],\n [[0, { [_xN]: _AKI }], [() => SessionCredentialValue, { [_xN]: _SAK }], [() => SessionCredentialValue, { [_xN]: _ST }], [4, { [_xN]: _E }]], 4\n];\nexport var SimplePrefix$ = [3, n0, _SPi,\n { [_xN]: _SPi },\n [],\n []\n];\nexport var SourceSelectionCriteria$ = [3, n0, _SSC,\n 0,\n [_SKEO, _RM],\n [() => SseKmsEncryptedObjects$, () => ReplicaModifications$]\n];\nexport var SSEKMS$ = [3, n0, _SSEKMS,\n { [_xN]: _SK },\n [_KI],\n [[() => SSEKMSKeyId, 0]], 1\n];\nexport var SseKmsEncryptedObjects$ = [3, n0, _SKEO,\n 0,\n [_S],\n [0], 1\n];\nexport var SSEKMSEncryption$ = [3, n0, _SSEKMSE,\n { [_xN]: _SK },\n [_KMSKA, _BKE],\n [[() => NonEmptyKmsKeyArnString, 0], 2], 1\n];\nexport var SSES3$ = [3, n0, _SSES,\n { [_xN]: _SS },\n [],\n []\n];\nexport var Stats$ = [3, n0, _Sta,\n 0,\n [_BS, _BP, _BRy],\n [1, 1, 1]\n];\nexport var StatsEvent$ = [3, n0, _SE,\n 0,\n [_Det],\n [[() => Stats$, { [_eP]: 1 }]]\n];\nexport var StorageClassAnalysis$ = [3, n0, _SCA,\n 0,\n [_DE],\n [() => StorageClassAnalysisDataExport$]\n];\nexport var StorageClassAnalysisDataExport$ = [3, n0, _SCADE,\n 0,\n [_OSV, _Des],\n [0, () => AnalyticsExportDestination$], 2\n];\nexport var Tag$ = [3, n0, _Ta,\n 0,\n [_K, _V],\n [0, 0], 2\n];\nexport var Tagging$ = [3, n0, _Tag,\n 0,\n [_TS],\n [[() => TagSet, 0]], 1\n];\nexport var TargetGrant$ = [3, n0, _TGa,\n 0,\n [_Gra, _Pe],\n [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0]\n];\nexport var TargetObjectKeyFormat$ = [3, n0, _TOKF,\n 0,\n [_SPi, _PP],\n [[() => SimplePrefix$, { [_xN]: _SPi }], [() => PartitionedPrefix$, { [_xN]: _PP }]]\n];\nexport var Tiering$ = [3, n0, _Tier,\n 0,\n [_D, _AT],\n [1, 0], 2\n];\nexport var TopicConfiguration$ = [3, n0, _TCop,\n 0,\n [_TAo, _Ev, _I, _F],\n [[0, { [_xN]: _Top }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], 2\n];\nexport var Transition$ = [3, n0, _Tra,\n 0,\n [_Da, _D, _SC],\n [5, 1, 0]\n];\nexport var UpdateBucketMetadataInventoryTableConfigurationRequest$ = [3, n0, _UBMITCR,\n 0,\n [_B, _ITCn, _CMD, _CA, _EBO],\n [[0, 1], [() => InventoryTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _ITCn }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var UpdateBucketMetadataJournalTableConfigurationRequest$ = [3, n0, _UBMJTCR,\n 0,\n [_B, _JTC, _CMD, _CA, _EBO],\n [[0, 1], [() => JournalTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _JTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var UpdateObjectEncryptionRequest$ = [3, n0, _UOER,\n 0,\n [_B, _K, _OE, _VI, _RP, _EBO, _CMD, _CA],\n [[0, 1], [0, 1], [() => ObjectEncryption$, 16], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }]], 3\n];\nexport var UpdateObjectEncryptionResponse$ = [3, n0, _UOERp,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var UploadPartCopyOutput$ = [3, n0, _UPCO,\n 0,\n [_CSVI, _CPR, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC],\n [[0, { [_hH]: _xacsvi }], [() => CopyPartResult$, 16], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]]\n];\nexport var UploadPartCopyRequest$ = [3, n0, _UPCR,\n 0,\n [_B, _CS, _K, _PN, _UI, _CSIM, _CSIMS, _CSINM, _CSIUS, _CSRo, _SSECA, _SSECK, _SSECKMD, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _EBO, _ESBO],\n [[0, 1], [0, { [_hH]: _xacs__ }], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [0, { [_hH]: _xacsr }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], 5\n];\nexport var UploadPartOutput$ = [3, n0, _UPO,\n 0,\n [_SSE, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC],\n [[0, { [_hH]: _xasse }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]]\n];\nexport var UploadPartRequest$ = [3, n0, _UPR,\n 0,\n [_B, _K, _PN, _UI, _Bo, _CLo, _CMD, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _SSECA, _SSECK, _SSECKMD, _RP, _EBO],\n [[0, 1], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [() => StreamingBlob, 16], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 4\n];\nexport var VersioningConfiguration$ = [3, n0, _VC,\n 0,\n [_MFAD, _S],\n [[0, { [_xN]: _MDf }], 0]\n];\nexport var WebsiteConfiguration$ = [3, n0, _WC,\n 0,\n [_EDr, _IDn, _RART, _RR],\n [() => ErrorDocument$, () => IndexDocument$, () => RedirectAllRequestsTo$, [() => RoutingRules, 0]]\n];\nexport var WriteGetObjectResponseRequest$ = [3, n0, _WGORR,\n 0,\n [_RReq, _RTe, _Bo, _SCt, _ECr, _EM, _AR, _CC, _CDo, _CEo, _CL, _CLo, _CR, _CTo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _DM, _ETa, _Ex, _E, _LM, _MM, _M, _OLM, _OLLHS, _OLRUD, _PC, _RS, _RC, _Re, _SSE, _SSECA, _SSEKMSKI, _SSECKMD, _SC, _TC, _VI, _BKE],\n [[0, { [_hL]: 1, [_hH]: _xarr }], [0, { [_hH]: _xart }], [() => StreamingBlob, 16], [1, { [_hH]: _xafs }], [0, { [_hH]: _xafec }], [0, { [_hH]: _xafem }], [0, { [_hH]: _xafhar }], [0, { [_hH]: _xafhCC }], [0, { [_hH]: _xafhCD }], [0, { [_hH]: _xafhCE }], [0, { [_hH]: _xafhCL }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xafhCR }], [0, { [_hH]: _xafhCT }], [0, { [_hH]: _xafhxacc }], [0, { [_hH]: _xafhxacc_ }], [0, { [_hH]: _xafhxacc__ }], [0, { [_hH]: _xafhxacs }], [0, { [_hH]: _xafhxacs_ }], [2, { [_hH]: _xafhxadm }], [0, { [_hH]: _xafhE }], [4, { [_hH]: _xafhE_ }], [0, { [_hH]: _xafhxae }], [4, { [_hH]: _xafhLM }], [1, { [_hH]: _xafhxamm }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xafhxaolm }], [0, { [_hH]: _xafhxaollh }], [5, { [_hH]: _xafhxaolrud }], [1, { [_hH]: _xafhxampc }], [0, { [_hH]: _xafhxars }], [0, { [_hH]: _xafhxarc }], [0, { [_hH]: _xafhxar }], [0, { [_hH]: _xafhxasse }], [0, { [_hH]: _xafhxasseca }], [() => SSEKMSKeyId, { [_hH]: _xafhxasseakki }], [0, { [_hH]: _xafhxasseckM }], [0, { [_hH]: _xafhxasc }], [1, { [_hH]: _xafhxatc }], [0, { [_hH]: _xafhxavi }], [2, { [_hH]: _xafhxassebke }]], 2\n];\nvar __Unit = \"unit\";\nvar AllowedHeaders = 64 | 0;\nvar AllowedMethods = 64 | 0;\nvar AllowedOrigins = 64 | 0;\nvar AnalyticsConfigurationList = [1, n0, _ACLn,\n 0, [() => AnalyticsConfiguration$,\n 0]\n];\nvar Buckets = [1, n0, _Bu,\n 0, [() => Bucket$,\n { [_xN]: _B }]\n];\nvar ChecksumAlgorithmList = 64 | 0;\nvar CommonPrefixList = [1, n0, _CPL,\n 0, () => CommonPrefix$\n];\nvar CompletedPartList = [1, n0, _CPLo,\n 0, () => CompletedPart$\n];\nvar CORSRules = [1, n0, _CORSR,\n 0, [() => CORSRule$,\n 0]\n];\nvar DeletedObjects = [1, n0, _DOe,\n 0, () => DeletedObject$\n];\nvar DeleteMarkers = [1, n0, _DMe,\n 0, () => DeleteMarkerEntry$\n];\nvar EncryptionTypeList = [1, n0, _ETL,\n 0, [0,\n { [_xN]: _ET }]\n];\nvar Errors = [1, n0, _Er,\n 0, () => _Error$\n];\nvar EventList = 64 | 0;\nvar ExposeHeaders = 64 | 0;\nvar FilterRuleList = [1, n0, _FRL,\n 0, () => FilterRule$\n];\nvar Grants = [1, n0, _G,\n 0, [() => Grant$,\n { [_xN]: _Gr }]\n];\nvar IntelligentTieringConfigurationList = [1, n0, _ITCL,\n 0, [() => IntelligentTieringConfiguration$,\n 0]\n];\nvar InventoryConfigurationList = [1, n0, _ICL,\n 0, [() => InventoryConfiguration$,\n 0]\n];\nvar InventoryOptionalFields = [1, n0, _IOF,\n 0, [0,\n { [_xN]: _Fi }]\n];\nvar LambdaFunctionConfigurationList = [1, n0, _LFCL,\n 0, [() => LambdaFunctionConfiguration$,\n 0]\n];\nvar LifecycleRules = [1, n0, _LRi,\n 0, [() => LifecycleRule$,\n 0]\n];\nvar MetricsConfigurationList = [1, n0, _MCL,\n 0, [() => MetricsConfiguration$,\n 0]\n];\nvar MultipartUploadList = [1, n0, _MUL,\n 0, () => MultipartUpload$\n];\nvar NoncurrentVersionTransitionList = [1, n0, _NVTL,\n 0, () => NoncurrentVersionTransition$\n];\nvar ObjectAttributesList = 64 | 0;\nvar ObjectIdentifierList = [1, n0, _OIL,\n 0, () => ObjectIdentifier$\n];\nvar ObjectList = [1, n0, _OLb,\n 0, [() => _Object$,\n 0]\n];\nvar ObjectVersionList = [1, n0, _OVL,\n 0, [() => ObjectVersion$,\n 0]\n];\nvar OptionalObjectAttributesList = 64 | 0;\nvar OwnershipControlsRules = [1, n0, _OCRw,\n 0, () => OwnershipControlsRule$\n];\nvar Parts = [1, n0, _Pa,\n 0, () => Part$\n];\nvar PartsList = [1, n0, _PL,\n 0, () => ObjectPart$\n];\nvar QueueConfigurationList = [1, n0, _QCL,\n 0, [() => QueueConfiguration$,\n 0]\n];\nvar ReplicationRules = [1, n0, _RRep,\n 0, [() => ReplicationRule$,\n 0]\n];\nvar RoutingRules = [1, n0, _RR,\n 0, [() => RoutingRule$,\n { [_xN]: _RRo }]\n];\nvar ServerSideEncryptionRules = [1, n0, _SSERe,\n 0, [() => ServerSideEncryptionRule$,\n 0]\n];\nvar TagSet = [1, n0, _TS,\n 0, [() => Tag$,\n { [_xN]: _Ta }]\n];\nvar TargetGrants = [1, n0, _TG,\n 0, [() => TargetGrant$,\n { [_xN]: _Gr }]\n];\nvar TieringList = [1, n0, _TL,\n 0, () => Tiering$\n];\nvar TopicConfigurationList = [1, n0, _TCL,\n 0, [() => TopicConfiguration$,\n 0]\n];\nvar TransitionList = [1, n0, _TLr,\n 0, () => Transition$\n];\nvar UserMetadata = [1, n0, _UM,\n 0, [() => MetadataEntry$,\n { [_xN]: _ME }]\n];\nvar Metadata = 128 | 0;\nexport var AnalyticsFilter$ = [4, n0, _AF,\n 0,\n [_P, _Ta, _An],\n [0, () => Tag$, [() => AnalyticsAndOperator$, 0]]\n];\nexport var MetricsFilter$ = [4, n0, _MF,\n 0,\n [_P, _Ta, _APAc, _An],\n [0, () => Tag$, 0, [() => MetricsAndOperator$, 0]]\n];\nexport var ObjectEncryption$ = [4, n0, _OE,\n 0,\n [_SSEKMS],\n [[() => SSEKMSEncryption$, { [_xN]: _SK }]]\n];\nexport var SelectObjectContentEventStream$ = [4, n0, _SOCES,\n { [_st]: 1 },\n [_Rec, _Sta, _Pr, _Cont, _End],\n [[() => RecordsEvent$, 0], [() => StatsEvent$, 0], [() => ProgressEvent$, 0], () => ContinuationEvent$, () => EndEvent$]\n];\nexport var AbortMultipartUpload$ = [9, n0, _AMU,\n { [_h]: [\"DELETE\", \"/{Key+}?x-id=AbortMultipartUpload\", 204] }, () => AbortMultipartUploadRequest$, () => AbortMultipartUploadOutput$\n];\nexport var CompleteMultipartUpload$ = [9, n0, _CMUo,\n { [_h]: [\"POST\", \"/{Key+}\", 200] }, () => CompleteMultipartUploadRequest$, () => CompleteMultipartUploadOutput$\n];\nexport var CopyObject$ = [9, n0, _CO,\n { [_h]: [\"PUT\", \"/{Key+}?x-id=CopyObject\", 200] }, () => CopyObjectRequest$, () => CopyObjectOutput$\n];\nexport var CreateBucket$ = [9, n0, _CB,\n { [_h]: [\"PUT\", \"/\", 200] }, () => CreateBucketRequest$, () => CreateBucketOutput$\n];\nexport var CreateBucketMetadataConfiguration$ = [9, n0, _CBMC,\n { [_hC]: \"-\", [_h]: [\"POST\", \"/?metadataConfiguration\", 200] }, () => CreateBucketMetadataConfigurationRequest$, () => __Unit\n];\nexport var CreateBucketMetadataTableConfiguration$ = [9, n0, _CBMTC,\n { [_hC]: \"-\", [_h]: [\"POST\", \"/?metadataTable\", 200] }, () => CreateBucketMetadataTableConfigurationRequest$, () => __Unit\n];\nexport var CreateMultipartUpload$ = [9, n0, _CMUr,\n { [_h]: [\"POST\", \"/{Key+}?uploads\", 200] }, () => CreateMultipartUploadRequest$, () => CreateMultipartUploadOutput$\n];\nexport var CreateSession$ = [9, n0, _CSr,\n { [_h]: [\"GET\", \"/?session\", 200] }, () => CreateSessionRequest$, () => CreateSessionOutput$\n];\nexport var DeleteBucket$ = [9, n0, _DB,\n { [_h]: [\"DELETE\", \"/\", 204] }, () => DeleteBucketRequest$, () => __Unit\n];\nexport var DeleteBucketAnalyticsConfiguration$ = [9, n0, _DBAC,\n { [_h]: [\"DELETE\", \"/?analytics\", 204] }, () => DeleteBucketAnalyticsConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketCors$ = [9, n0, _DBC,\n { [_h]: [\"DELETE\", \"/?cors\", 204] }, () => DeleteBucketCorsRequest$, () => __Unit\n];\nexport var DeleteBucketEncryption$ = [9, n0, _DBE,\n { [_h]: [\"DELETE\", \"/?encryption\", 204] }, () => DeleteBucketEncryptionRequest$, () => __Unit\n];\nexport var DeleteBucketIntelligentTieringConfiguration$ = [9, n0, _DBITC,\n { [_h]: [\"DELETE\", \"/?intelligent-tiering\", 204] }, () => DeleteBucketIntelligentTieringConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketInventoryConfiguration$ = [9, n0, _DBIC,\n { [_h]: [\"DELETE\", \"/?inventory\", 204] }, () => DeleteBucketInventoryConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketLifecycle$ = [9, n0, _DBL,\n { [_h]: [\"DELETE\", \"/?lifecycle\", 204] }, () => DeleteBucketLifecycleRequest$, () => __Unit\n];\nexport var DeleteBucketMetadataConfiguration$ = [9, n0, _DBMC,\n { [_h]: [\"DELETE\", \"/?metadataConfiguration\", 204] }, () => DeleteBucketMetadataConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketMetadataTableConfiguration$ = [9, n0, _DBMTC,\n { [_h]: [\"DELETE\", \"/?metadataTable\", 204] }, () => DeleteBucketMetadataTableConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketMetricsConfiguration$ = [9, n0, _DBMCe,\n { [_h]: [\"DELETE\", \"/?metrics\", 204] }, () => DeleteBucketMetricsConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketOwnershipControls$ = [9, n0, _DBOC,\n { [_h]: [\"DELETE\", \"/?ownershipControls\", 204] }, () => DeleteBucketOwnershipControlsRequest$, () => __Unit\n];\nexport var DeleteBucketPolicy$ = [9, n0, _DBP,\n { [_h]: [\"DELETE\", \"/?policy\", 204] }, () => DeleteBucketPolicyRequest$, () => __Unit\n];\nexport var DeleteBucketReplication$ = [9, n0, _DBRe,\n { [_h]: [\"DELETE\", \"/?replication\", 204] }, () => DeleteBucketReplicationRequest$, () => __Unit\n];\nexport var DeleteBucketTagging$ = [9, n0, _DBT,\n { [_h]: [\"DELETE\", \"/?tagging\", 204] }, () => DeleteBucketTaggingRequest$, () => __Unit\n];\nexport var DeleteBucketWebsite$ = [9, n0, _DBW,\n { [_h]: [\"DELETE\", \"/?website\", 204] }, () => DeleteBucketWebsiteRequest$, () => __Unit\n];\nexport var DeleteObject$ = [9, n0, _DOel,\n { [_h]: [\"DELETE\", \"/{Key+}?x-id=DeleteObject\", 204] }, () => DeleteObjectRequest$, () => DeleteObjectOutput$\n];\nexport var DeleteObjects$ = [9, n0, _DOele,\n { [_hC]: \"-\", [_h]: [\"POST\", \"/?delete\", 200] }, () => DeleteObjectsRequest$, () => DeleteObjectsOutput$\n];\nexport var DeleteObjectTagging$ = [9, n0, _DOT,\n { [_h]: [\"DELETE\", \"/{Key+}?tagging\", 204] }, () => DeleteObjectTaggingRequest$, () => DeleteObjectTaggingOutput$\n];\nexport var DeletePublicAccessBlock$ = [9, n0, _DPAB,\n { [_h]: [\"DELETE\", \"/?publicAccessBlock\", 204] }, () => DeletePublicAccessBlockRequest$, () => __Unit\n];\nexport var GetBucketAbac$ = [9, n0, _GBA,\n { [_h]: [\"GET\", \"/?abac\", 200] }, () => GetBucketAbacRequest$, () => GetBucketAbacOutput$\n];\nexport var GetBucketAccelerateConfiguration$ = [9, n0, _GBAC,\n { [_h]: [\"GET\", \"/?accelerate\", 200] }, () => GetBucketAccelerateConfigurationRequest$, () => GetBucketAccelerateConfigurationOutput$\n];\nexport var GetBucketAcl$ = [9, n0, _GBAe,\n { [_h]: [\"GET\", \"/?acl\", 200] }, () => GetBucketAclRequest$, () => GetBucketAclOutput$\n];\nexport var GetBucketAnalyticsConfiguration$ = [9, n0, _GBACe,\n { [_h]: [\"GET\", \"/?analytics&x-id=GetBucketAnalyticsConfiguration\", 200] }, () => GetBucketAnalyticsConfigurationRequest$, () => GetBucketAnalyticsConfigurationOutput$\n];\nexport var GetBucketCors$ = [9, n0, _GBC,\n { [_h]: [\"GET\", \"/?cors\", 200] }, () => GetBucketCorsRequest$, () => GetBucketCorsOutput$\n];\nexport var GetBucketEncryption$ = [9, n0, _GBE,\n { [_h]: [\"GET\", \"/?encryption\", 200] }, () => GetBucketEncryptionRequest$, () => GetBucketEncryptionOutput$\n];\nexport var GetBucketIntelligentTieringConfiguration$ = [9, n0, _GBITC,\n { [_h]: [\"GET\", \"/?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration\", 200] }, () => GetBucketIntelligentTieringConfigurationRequest$, () => GetBucketIntelligentTieringConfigurationOutput$\n];\nexport var GetBucketInventoryConfiguration$ = [9, n0, _GBIC,\n { [_h]: [\"GET\", \"/?inventory&x-id=GetBucketInventoryConfiguration\", 200] }, () => GetBucketInventoryConfigurationRequest$, () => GetBucketInventoryConfigurationOutput$\n];\nexport var GetBucketLifecycleConfiguration$ = [9, n0, _GBLC,\n { [_h]: [\"GET\", \"/?lifecycle\", 200] }, () => GetBucketLifecycleConfigurationRequest$, () => GetBucketLifecycleConfigurationOutput$\n];\nexport var GetBucketLocation$ = [9, n0, _GBL,\n { [_h]: [\"GET\", \"/?location\", 200] }, () => GetBucketLocationRequest$, () => GetBucketLocationOutput$\n];\nexport var GetBucketLogging$ = [9, n0, _GBLe,\n { [_h]: [\"GET\", \"/?logging\", 200] }, () => GetBucketLoggingRequest$, () => GetBucketLoggingOutput$\n];\nexport var GetBucketMetadataConfiguration$ = [9, n0, _GBMC,\n { [_h]: [\"GET\", \"/?metadataConfiguration\", 200] }, () => GetBucketMetadataConfigurationRequest$, () => GetBucketMetadataConfigurationOutput$\n];\nexport var GetBucketMetadataTableConfiguration$ = [9, n0, _GBMTC,\n { [_h]: [\"GET\", \"/?metadataTable\", 200] }, () => GetBucketMetadataTableConfigurationRequest$, () => GetBucketMetadataTableConfigurationOutput$\n];\nexport var GetBucketMetricsConfiguration$ = [9, n0, _GBMCe,\n { [_h]: [\"GET\", \"/?metrics&x-id=GetBucketMetricsConfiguration\", 200] }, () => GetBucketMetricsConfigurationRequest$, () => GetBucketMetricsConfigurationOutput$\n];\nexport var GetBucketNotificationConfiguration$ = [9, n0, _GBNC,\n { [_h]: [\"GET\", \"/?notification\", 200] }, () => GetBucketNotificationConfigurationRequest$, () => NotificationConfiguration$\n];\nexport var GetBucketOwnershipControls$ = [9, n0, _GBOC,\n { [_h]: [\"GET\", \"/?ownershipControls\", 200] }, () => GetBucketOwnershipControlsRequest$, () => GetBucketOwnershipControlsOutput$\n];\nexport var GetBucketPolicy$ = [9, n0, _GBP,\n { [_h]: [\"GET\", \"/?policy\", 200] }, () => GetBucketPolicyRequest$, () => GetBucketPolicyOutput$\n];\nexport var GetBucketPolicyStatus$ = [9, n0, _GBPS,\n { [_h]: [\"GET\", \"/?policyStatus\", 200] }, () => GetBucketPolicyStatusRequest$, () => GetBucketPolicyStatusOutput$\n];\nexport var GetBucketReplication$ = [9, n0, _GBR,\n { [_h]: [\"GET\", \"/?replication\", 200] }, () => GetBucketReplicationRequest$, () => GetBucketReplicationOutput$\n];\nexport var GetBucketRequestPayment$ = [9, n0, _GBRP,\n { [_h]: [\"GET\", \"/?requestPayment\", 200] }, () => GetBucketRequestPaymentRequest$, () => GetBucketRequestPaymentOutput$\n];\nexport var GetBucketTagging$ = [9, n0, _GBT,\n { [_h]: [\"GET\", \"/?tagging\", 200] }, () => GetBucketTaggingRequest$, () => GetBucketTaggingOutput$\n];\nexport var GetBucketVersioning$ = [9, n0, _GBV,\n { [_h]: [\"GET\", \"/?versioning\", 200] }, () => GetBucketVersioningRequest$, () => GetBucketVersioningOutput$\n];\nexport var GetBucketWebsite$ = [9, n0, _GBW,\n { [_h]: [\"GET\", \"/?website\", 200] }, () => GetBucketWebsiteRequest$, () => GetBucketWebsiteOutput$\n];\nexport var GetObject$ = [9, n0, _GO,\n { [_hC]: \"-\", [_h]: [\"GET\", \"/{Key+}?x-id=GetObject\", 200] }, () => GetObjectRequest$, () => GetObjectOutput$\n];\nexport var GetObjectAcl$ = [9, n0, _GOA,\n { [_h]: [\"GET\", \"/{Key+}?acl\", 200] }, () => GetObjectAclRequest$, () => GetObjectAclOutput$\n];\nexport var GetObjectAttributes$ = [9, n0, _GOAe,\n { [_h]: [\"GET\", \"/{Key+}?attributes\", 200] }, () => GetObjectAttributesRequest$, () => GetObjectAttributesOutput$\n];\nexport var GetObjectLegalHold$ = [9, n0, _GOLH,\n { [_h]: [\"GET\", \"/{Key+}?legal-hold\", 200] }, () => GetObjectLegalHoldRequest$, () => GetObjectLegalHoldOutput$\n];\nexport var GetObjectLockConfiguration$ = [9, n0, _GOLC,\n { [_h]: [\"GET\", \"/?object-lock\", 200] }, () => GetObjectLockConfigurationRequest$, () => GetObjectLockConfigurationOutput$\n];\nexport var GetObjectRetention$ = [9, n0, _GORe,\n { [_h]: [\"GET\", \"/{Key+}?retention\", 200] }, () => GetObjectRetentionRequest$, () => GetObjectRetentionOutput$\n];\nexport var GetObjectTagging$ = [9, n0, _GOT,\n { [_h]: [\"GET\", \"/{Key+}?tagging\", 200] }, () => GetObjectTaggingRequest$, () => GetObjectTaggingOutput$\n];\nexport var GetObjectTorrent$ = [9, n0, _GOTe,\n { [_h]: [\"GET\", \"/{Key+}?torrent\", 200] }, () => GetObjectTorrentRequest$, () => GetObjectTorrentOutput$\n];\nexport var GetPublicAccessBlock$ = [9, n0, _GPAB,\n { [_h]: [\"GET\", \"/?publicAccessBlock\", 200] }, () => GetPublicAccessBlockRequest$, () => GetPublicAccessBlockOutput$\n];\nexport var HeadBucket$ = [9, n0, _HB,\n { [_h]: [\"HEAD\", \"/\", 200] }, () => HeadBucketRequest$, () => HeadBucketOutput$\n];\nexport var HeadObject$ = [9, n0, _HO,\n { [_h]: [\"HEAD\", \"/{Key+}\", 200] }, () => HeadObjectRequest$, () => HeadObjectOutput$\n];\nexport var ListBucketAnalyticsConfigurations$ = [9, n0, _LBAC,\n { [_h]: [\"GET\", \"/?analytics&x-id=ListBucketAnalyticsConfigurations\", 200] }, () => ListBucketAnalyticsConfigurationsRequest$, () => ListBucketAnalyticsConfigurationsOutput$\n];\nexport var ListBucketIntelligentTieringConfigurations$ = [9, n0, _LBITC,\n { [_h]: [\"GET\", \"/?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations\", 200] }, () => ListBucketIntelligentTieringConfigurationsRequest$, () => ListBucketIntelligentTieringConfigurationsOutput$\n];\nexport var ListBucketInventoryConfigurations$ = [9, n0, _LBIC,\n { [_h]: [\"GET\", \"/?inventory&x-id=ListBucketInventoryConfigurations\", 200] }, () => ListBucketInventoryConfigurationsRequest$, () => ListBucketInventoryConfigurationsOutput$\n];\nexport var ListBucketMetricsConfigurations$ = [9, n0, _LBMC,\n { [_h]: [\"GET\", \"/?metrics&x-id=ListBucketMetricsConfigurations\", 200] }, () => ListBucketMetricsConfigurationsRequest$, () => ListBucketMetricsConfigurationsOutput$\n];\nexport var ListBuckets$ = [9, n0, _LB,\n { [_h]: [\"GET\", \"/?x-id=ListBuckets\", 200] }, () => ListBucketsRequest$, () => ListBucketsOutput$\n];\nexport var ListDirectoryBuckets$ = [9, n0, _LDB,\n { [_h]: [\"GET\", \"/?x-id=ListDirectoryBuckets\", 200] }, () => ListDirectoryBucketsRequest$, () => ListDirectoryBucketsOutput$\n];\nexport var ListMultipartUploads$ = [9, n0, _LMU,\n { [_h]: [\"GET\", \"/?uploads\", 200] }, () => ListMultipartUploadsRequest$, () => ListMultipartUploadsOutput$\n];\nexport var ListObjects$ = [9, n0, _LO,\n { [_h]: [\"GET\", \"/\", 200] }, () => ListObjectsRequest$, () => ListObjectsOutput$\n];\nexport var ListObjectsV2$ = [9, n0, _LOV,\n { [_h]: [\"GET\", \"/?list-type=2\", 200] }, () => ListObjectsV2Request$, () => ListObjectsV2Output$\n];\nexport var ListObjectVersions$ = [9, n0, _LOVi,\n { [_h]: [\"GET\", \"/?versions\", 200] }, () => ListObjectVersionsRequest$, () => ListObjectVersionsOutput$\n];\nexport var ListParts$ = [9, n0, _LP,\n { [_h]: [\"GET\", \"/{Key+}?x-id=ListParts\", 200] }, () => ListPartsRequest$, () => ListPartsOutput$\n];\nexport var PutBucketAbac$ = [9, n0, _PBA,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?abac\", 200] }, () => PutBucketAbacRequest$, () => __Unit\n];\nexport var PutBucketAccelerateConfiguration$ = [9, n0, _PBAC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?accelerate\", 200] }, () => PutBucketAccelerateConfigurationRequest$, () => __Unit\n];\nexport var PutBucketAcl$ = [9, n0, _PBAu,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?acl\", 200] }, () => PutBucketAclRequest$, () => __Unit\n];\nexport var PutBucketAnalyticsConfiguration$ = [9, n0, _PBACu,\n { [_h]: [\"PUT\", \"/?analytics\", 200] }, () => PutBucketAnalyticsConfigurationRequest$, () => __Unit\n];\nexport var PutBucketCors$ = [9, n0, _PBC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?cors\", 200] }, () => PutBucketCorsRequest$, () => __Unit\n];\nexport var PutBucketEncryption$ = [9, n0, _PBE,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?encryption\", 200] }, () => PutBucketEncryptionRequest$, () => __Unit\n];\nexport var PutBucketIntelligentTieringConfiguration$ = [9, n0, _PBITC,\n { [_h]: [\"PUT\", \"/?intelligent-tiering\", 200] }, () => PutBucketIntelligentTieringConfigurationRequest$, () => __Unit\n];\nexport var PutBucketInventoryConfiguration$ = [9, n0, _PBIC,\n { [_h]: [\"PUT\", \"/?inventory\", 200] }, () => PutBucketInventoryConfigurationRequest$, () => __Unit\n];\nexport var PutBucketLifecycleConfiguration$ = [9, n0, _PBLC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?lifecycle\", 200] }, () => PutBucketLifecycleConfigurationRequest$, () => PutBucketLifecycleConfigurationOutput$\n];\nexport var PutBucketLogging$ = [9, n0, _PBL,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?logging\", 200] }, () => PutBucketLoggingRequest$, () => __Unit\n];\nexport var PutBucketMetricsConfiguration$ = [9, n0, _PBMC,\n { [_h]: [\"PUT\", \"/?metrics\", 200] }, () => PutBucketMetricsConfigurationRequest$, () => __Unit\n];\nexport var PutBucketNotificationConfiguration$ = [9, n0, _PBNC,\n { [_h]: [\"PUT\", \"/?notification\", 200] }, () => PutBucketNotificationConfigurationRequest$, () => __Unit\n];\nexport var PutBucketOwnershipControls$ = [9, n0, _PBOC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?ownershipControls\", 200] }, () => PutBucketOwnershipControlsRequest$, () => __Unit\n];\nexport var PutBucketPolicy$ = [9, n0, _PBP,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?policy\", 200] }, () => PutBucketPolicyRequest$, () => __Unit\n];\nexport var PutBucketReplication$ = [9, n0, _PBR,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?replication\", 200] }, () => PutBucketReplicationRequest$, () => __Unit\n];\nexport var PutBucketRequestPayment$ = [9, n0, _PBRP,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?requestPayment\", 200] }, () => PutBucketRequestPaymentRequest$, () => __Unit\n];\nexport var PutBucketTagging$ = [9, n0, _PBT,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?tagging\", 200] }, () => PutBucketTaggingRequest$, () => __Unit\n];\nexport var PutBucketVersioning$ = [9, n0, _PBV,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?versioning\", 200] }, () => PutBucketVersioningRequest$, () => __Unit\n];\nexport var PutBucketWebsite$ = [9, n0, _PBW,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?website\", 200] }, () => PutBucketWebsiteRequest$, () => __Unit\n];\nexport var PutObject$ = [9, n0, _PO,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?x-id=PutObject\", 200] }, () => PutObjectRequest$, () => PutObjectOutput$\n];\nexport var PutObjectAcl$ = [9, n0, _POA,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?acl\", 200] }, () => PutObjectAclRequest$, () => PutObjectAclOutput$\n];\nexport var PutObjectLegalHold$ = [9, n0, _POLH,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?legal-hold\", 200] }, () => PutObjectLegalHoldRequest$, () => PutObjectLegalHoldOutput$\n];\nexport var PutObjectLockConfiguration$ = [9, n0, _POLC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?object-lock\", 200] }, () => PutObjectLockConfigurationRequest$, () => PutObjectLockConfigurationOutput$\n];\nexport var PutObjectRetention$ = [9, n0, _PORu,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?retention\", 200] }, () => PutObjectRetentionRequest$, () => PutObjectRetentionOutput$\n];\nexport var PutObjectTagging$ = [9, n0, _POT,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?tagging\", 200] }, () => PutObjectTaggingRequest$, () => PutObjectTaggingOutput$\n];\nexport var PutPublicAccessBlock$ = [9, n0, _PPAB,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?publicAccessBlock\", 200] }, () => PutPublicAccessBlockRequest$, () => __Unit\n];\nexport var RenameObject$ = [9, n0, _RO,\n { [_h]: [\"PUT\", \"/{Key+}?renameObject\", 200] }, () => RenameObjectRequest$, () => RenameObjectOutput$\n];\nexport var RestoreObject$ = [9, n0, _ROe,\n { [_hC]: \"-\", [_h]: [\"POST\", \"/{Key+}?restore\", 200] }, () => RestoreObjectRequest$, () => RestoreObjectOutput$\n];\nexport var SelectObjectContent$ = [9, n0, _SOC,\n { [_h]: [\"POST\", \"/{Key+}?select&select-type=2\", 200] }, () => SelectObjectContentRequest$, () => SelectObjectContentOutput$\n];\nexport var UpdateBucketMetadataInventoryTableConfiguration$ = [9, n0, _UBMITC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?metadataInventoryTable\", 200] }, () => UpdateBucketMetadataInventoryTableConfigurationRequest$, () => __Unit\n];\nexport var UpdateBucketMetadataJournalTableConfiguration$ = [9, n0, _UBMJTC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?metadataJournalTable\", 200] }, () => UpdateBucketMetadataJournalTableConfigurationRequest$, () => __Unit\n];\nexport var UpdateObjectEncryption$ = [9, n0, _UOE,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?encryption\", 200] }, () => UpdateObjectEncryptionRequest$, () => UpdateObjectEncryptionResponse$\n];\nexport var UploadPart$ = [9, n0, _UP,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?x-id=UploadPart\", 200] }, () => UploadPartRequest$, () => UploadPartOutput$\n];\nexport var UploadPartCopy$ = [9, n0, _UPC,\n { [_h]: [\"PUT\", \"/{Key+}?x-id=UploadPartCopy\", 200] }, () => UploadPartCopyRequest$, () => UploadPartCopyOutput$\n];\nexport var WriteGetObjectResponse$ = [9, n0, _WGOR,\n { [_en]: [\"{RequestRoute}.\"], [_h]: [\"POST\", \"/WriteGetObjectResponse\", 200] }, () => WriteGetObjectResponseRequest$, () => __Unit\n];\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CreateSession$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CreateSessionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n DisableS3ExpressSessionAuth: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"CreateSession\", {})\n .n(\"S3Client\", \"CreateSessionCommand\")\n .sc(CreateSession$)\n .build() {\n}\n", "{\n \"name\": \"@aws-sdk/client-s3\",\n \"description\": \"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native\",\n \"version\": \"3.1009.0\",\n \"scripts\": {\n \"build\": \"concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs\",\n \"build:cjs\": \"node ../../scripts/compilation/inline client-s3\",\n \"build:es\": \"tsc -p tsconfig.es.json\",\n \"build:include:deps\": \"yarn g:turbo run build -F=\\\"$npm_package_name\\\"\",\n \"build:types\": \"tsc -p tsconfig.types.json\",\n \"build:types:downlevel\": \"downlevel-dts dist-types dist-types/ts3.4\",\n \"clean\": \"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo\",\n \"extract:docs\": \"api-extractor run --local\",\n \"generate:client\": \"node ../../scripts/generate-clients/single-service --solo s3\",\n \"test\": \"yarn g:vitest run\",\n \"test:browser\": \"node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.mts\",\n \"test:browser:watch\": \"node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.mts\",\n \"test:e2e\": \"yarn g:vitest run -c vitest.config.e2e.mts && yarn test:browser\",\n \"test:e2e:watch\": \"yarn g:vitest watch -c vitest.config.e2e.mts\",\n \"test:index\": \"tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs\",\n \"test:integration\": \"yarn g:vitest run -c vitest.config.integ.mts\",\n \"test:integration:watch\": \"yarn g:vitest watch -c vitest.config.integ.mts\",\n \"test:watch\": \"yarn g:vitest watch\"\n },\n \"main\": \"./dist-cjs/index.js\",\n \"types\": \"./dist-types/index.d.ts\",\n \"module\": \"./dist-es/index.js\",\n \"sideEffects\": false,\n \"dependencies\": {\n \"@aws-crypto/sha1-browser\": \"5.2.0\",\n \"@aws-crypto/sha256-browser\": \"5.2.0\",\n \"@aws-crypto/sha256-js\": \"5.2.0\",\n \"@aws-sdk/core\": \"^3.973.20\",\n \"@aws-sdk/credential-provider-node\": \"^3.972.21\",\n \"@aws-sdk/middleware-bucket-endpoint\": \"^3.972.8\",\n \"@aws-sdk/middleware-expect-continue\": \"^3.972.8\",\n \"@aws-sdk/middleware-flexible-checksums\": \"^3.973.6\",\n \"@aws-sdk/middleware-host-header\": \"^3.972.8\",\n \"@aws-sdk/middleware-location-constraint\": \"^3.972.8\",\n \"@aws-sdk/middleware-logger\": \"^3.972.8\",\n \"@aws-sdk/middleware-recursion-detection\": \"^3.972.8\",\n \"@aws-sdk/middleware-sdk-s3\": \"^3.972.20\",\n \"@aws-sdk/middleware-ssec\": \"^3.972.8\",\n \"@aws-sdk/middleware-user-agent\": \"^3.972.21\",\n \"@aws-sdk/region-config-resolver\": \"^3.972.8\",\n \"@aws-sdk/signature-v4-multi-region\": \"^3.996.8\",\n \"@aws-sdk/types\": \"^3.973.6\",\n \"@aws-sdk/util-endpoints\": \"^3.996.5\",\n \"@aws-sdk/util-user-agent-browser\": \"^3.972.8\",\n \"@aws-sdk/util-user-agent-node\": \"^3.973.7\",\n \"@smithy/config-resolver\": \"^4.4.11\",\n \"@smithy/core\": \"^3.23.11\",\n \"@smithy/eventstream-serde-browser\": \"^4.2.12\",\n \"@smithy/eventstream-serde-config-resolver\": \"^4.3.12\",\n \"@smithy/eventstream-serde-node\": \"^4.2.12\",\n \"@smithy/fetch-http-handler\": \"^5.3.15\",\n \"@smithy/hash-blob-browser\": \"^4.2.13\",\n \"@smithy/hash-node\": \"^4.2.12\",\n \"@smithy/hash-stream-node\": \"^4.2.12\",\n \"@smithy/invalid-dependency\": \"^4.2.12\",\n \"@smithy/md5-js\": \"^4.2.12\",\n \"@smithy/middleware-content-length\": \"^4.2.12\",\n \"@smithy/middleware-endpoint\": \"^4.4.25\",\n \"@smithy/middleware-retry\": \"^4.4.42\",\n \"@smithy/middleware-serde\": \"^4.2.14\",\n \"@smithy/middleware-stack\": \"^4.2.12\",\n \"@smithy/node-config-provider\": \"^4.3.12\",\n \"@smithy/node-http-handler\": \"^4.4.16\",\n \"@smithy/protocol-http\": \"^5.3.12\",\n \"@smithy/smithy-client\": \"^4.12.5\",\n \"@smithy/types\": \"^4.13.1\",\n \"@smithy/url-parser\": \"^4.2.12\",\n \"@smithy/util-base64\": \"^4.3.2\",\n \"@smithy/util-body-length-browser\": \"^4.2.2\",\n \"@smithy/util-body-length-node\": \"^4.2.3\",\n \"@smithy/util-defaults-mode-browser\": \"^4.3.41\",\n \"@smithy/util-defaults-mode-node\": \"^4.2.44\",\n \"@smithy/util-endpoints\": \"^3.3.3\",\n \"@smithy/util-middleware\": \"^4.2.12\",\n \"@smithy/util-retry\": \"^4.2.12\",\n \"@smithy/util-stream\": \"^4.5.19\",\n \"@smithy/util-utf8\": \"^4.2.2\",\n \"@smithy/util-waiter\": \"^4.2.13\",\n \"tslib\": \"^2.6.2\"\n },\n \"devDependencies\": {\n \"@aws-sdk/signature-v4-crt\": \"3.1009.0\",\n \"@smithy/snapshot-testing\": \"^2.0.2\",\n \"@tsconfig/node20\": \"20.1.8\",\n \"@types/node\": \"^20.14.8\",\n \"concurrently\": \"7.0.0\",\n \"downlevel-dts\": \"0.10.1\",\n \"premove\": \"4.0.0\",\n \"typescript\": \"~5.8.3\",\n \"vitest\": \"^4.0.17\"\n },\n \"engines\": {\n \"node\": \">=20.0.0\"\n },\n \"typesVersions\": {\n \"<4.5\": {\n \"dist-types/*\": [\n \"dist-types/ts3.4/*\"\n ]\n }\n },\n \"files\": [\n \"dist-*/**\"\n ],\n \"author\": {\n \"name\": \"AWS SDK for JavaScript Team\",\n \"url\": \"https://aws.amazon.com/javascript/\"\n },\n \"license\": \"Apache-2.0\",\n \"browser\": {\n \"./dist-es/runtimeConfig\": \"./dist-es/runtimeConfig.browser\"\n },\n \"react-native\": {\n \"./dist-es/runtimeConfig\": \"./dist-es/runtimeConfig.native\"\n },\n \"homepage\": \"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/aws/aws-sdk-js-v3.git\",\n \"directory\": \"clients/client-s3\"\n }\n}\n", "export const fromUtf8 = (input) => new TextEncoder().encode(input);\n", "import { fromUtf8 } from \"./fromUtf8\";\nexport const toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n", "export const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return new TextDecoder(\"utf-8\").decode(input);\n};\n", "export * from \"./fromUtf8\";\nexport * from \"./toUint8Array\";\nexport * from \"./toUtf8\";\n", "import { SourceData } from \"@aws-sdk/types\";\n\nexport function isEmptyData(data: SourceData): boolean {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n\n return data.byteLength === 0;\n}\n", "export const SHA_1_HASH: { name: \"SHA-1\" } = { name: \"SHA-1\" };\n\nexport const SHA_1_HMAC_ALGO: { name: \"HMAC\"; hash: { name: \"SHA-1\" } } = {\n name: \"HMAC\",\n hash: SHA_1_HASH,\n};\n\nexport const EMPTY_DATA_SHA_1 = new Uint8Array([\n 218,\n 57,\n 163,\n 238,\n 94,\n 107,\n 75,\n 13,\n 50,\n 85,\n 191,\n 239,\n 149,\n 96,\n 24,\n 144,\n 175,\n 216,\n 7,\n 9,\n]);\n", "const fallbackWindow = {};\nexport function locateWindow() {\n if (typeof window !== \"undefined\") {\n return window;\n }\n else if (typeof self !== \"undefined\") {\n return self;\n }\n return fallbackWindow;\n}\n", "import { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { fromUtf8 } from \"@smithy/util-utf8\";\nimport { isEmptyData } from \"./isEmptyData\";\nimport { EMPTY_DATA_SHA_1, SHA_1_HASH, SHA_1_HMAC_ALGO } from \"./constants\";\nimport { locateWindow } from \"@aws-sdk/util-locate-window\";\n\nexport class Sha1 implements Checksum {\n private readonly key: Promise | undefined;\n private toHash: Uint8Array = new Uint8Array(0);\n\n constructor(secret?: SourceData) {\n if (secret !== void 0) {\n this.key = new Promise((resolve, reject) => {\n locateWindow()\n .crypto.subtle.importKey(\n \"raw\",\n convertToBuffer(secret),\n SHA_1_HMAC_ALGO,\n false,\n [\"sign\"]\n )\n .then(resolve, reject);\n });\n this.key.catch(() => {});\n }\n }\n\n update(data: SourceData): void {\n if (isEmptyData(data)) {\n return;\n }\n\n const update = convertToBuffer(data);\n const typedArray = new Uint8Array(\n this.toHash.byteLength + update.byteLength\n );\n typedArray.set(this.toHash, 0);\n typedArray.set(update, this.toHash.byteLength);\n this.toHash = typedArray;\n }\n\n digest(): Promise {\n if (this.key) {\n return this.key.then((key) =>\n locateWindow()\n .crypto.subtle.sign(SHA_1_HMAC_ALGO, key, this.toHash)\n .then((data) => new Uint8Array(data))\n );\n }\n\n if (isEmptyData(this.toHash)) {\n return Promise.resolve(EMPTY_DATA_SHA_1);\n }\n\n return Promise.resolve()\n .then(() => locateWindow().crypto.subtle.digest(SHA_1_HASH, this.toHash))\n .then((data) => Promise.resolve(new Uint8Array(data)));\n }\n\n reset(): void {\n this.toHash = new Uint8Array(0);\n }\n}\n\nfunction convertToBuffer(data: SourceData): Uint8Array {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(\n data.buffer,\n data.byteOffset,\n data.byteLength / Uint8Array.BYTES_PER_ELEMENT\n );\n }\n\n return new Uint8Array(data);\n}\n", "type SubtleCryptoMethod =\n | \"decrypt\"\n | \"digest\"\n | \"encrypt\"\n | \"exportKey\"\n | \"generateKey\"\n | \"importKey\"\n | \"sign\"\n | \"verify\";\n\nconst subtleCryptoMethods: Array = [\n \"decrypt\",\n \"digest\",\n \"encrypt\",\n \"exportKey\",\n \"generateKey\",\n \"importKey\",\n \"sign\",\n \"verify\"\n];\n\nexport function supportsWebCrypto(window: Window): boolean {\n if (\n supportsSecureRandom(window) &&\n typeof window.crypto.subtle === \"object\"\n ) {\n const { subtle } = window.crypto;\n\n return supportsSubtleCrypto(subtle);\n }\n\n return false;\n}\n\nexport function supportsSecureRandom(window: Window): boolean {\n if (typeof window === \"object\" && typeof window.crypto === \"object\") {\n const { getRandomValues } = window.crypto;\n\n return typeof getRandomValues === \"function\";\n }\n\n return false;\n}\n\nexport function supportsSubtleCrypto(subtle: SubtleCrypto) {\n return (\n subtle &&\n subtleCryptoMethods.every(\n methodName => typeof subtle[methodName] === \"function\"\n )\n );\n}\n\nexport async function supportsZeroByteGCM(subtle: SubtleCrypto) {\n if (!supportsSubtleCrypto(subtle)) return false;\n try {\n const key = await subtle.generateKey(\n { name: \"AES-GCM\", length: 128 },\n false,\n [\"encrypt\"]\n );\n const zeroByteAuthTag = await subtle.encrypt(\n {\n name: \"AES-GCM\",\n iv: new Uint8Array(Array(12)),\n additionalData: new Uint8Array(Array(16)),\n tagLength: 128\n },\n key,\n new Uint8Array(0)\n );\n return zeroByteAuthTag.byteLength === 16;\n } catch {\n return false;\n }\n}\n", "export * from \"./supportsWebCrypto\";\n", "import { Sha1 as WebCryptoSha1 } from \"./webCryptoSha1\";\nimport { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { supportsWebCrypto } from \"@aws-crypto/supports-web-crypto\";\nimport { locateWindow } from \"@aws-sdk/util-locate-window\";\nimport { convertToBuffer } from \"@aws-crypto/util\";\n\nexport class Sha1 implements Checksum {\n private hash: Checksum;\n\n constructor(secret?: SourceData) {\n if (supportsWebCrypto(locateWindow())) {\n this.hash = new WebCryptoSha1(secret);\n } else {\n throw new Error(\"SHA1 not supported\");\n }\n }\n\n update(data: SourceData, encoding?: \"utf8\" | \"ascii\" | \"latin1\"): void {\n this.hash.update(convertToBuffer(data));\n }\n\n digest(): Promise {\n return this.hash.digest();\n }\n\n reset(): void {\n this.hash.reset();\n }\n}\n", "export * from \"./crossPlatformSha1\";\nexport { Sha1 as WebCryptoSha1 } from \"./webCryptoSha1\";\n", "export const SHA_256_HASH: { name: \"SHA-256\" } = { name: \"SHA-256\" };\n\nexport const SHA_256_HMAC_ALGO: { name: \"HMAC\"; hash: { name: \"SHA-256\" } } = {\n name: \"HMAC\",\n hash: SHA_256_HASH\n};\n\nexport const EMPTY_DATA_SHA_256 = new Uint8Array([\n 227,\n 176,\n 196,\n 66,\n 152,\n 252,\n 28,\n 20,\n 154,\n 251,\n 244,\n 200,\n 153,\n 111,\n 185,\n 36,\n 39,\n 174,\n 65,\n 228,\n 100,\n 155,\n 147,\n 76,\n 164,\n 149,\n 153,\n 27,\n 120,\n 82,\n 184,\n 85\n]);\n", "import { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { isEmptyData, convertToBuffer } from \"@aws-crypto/util\";\nimport {\n EMPTY_DATA_SHA_256,\n SHA_256_HASH,\n SHA_256_HMAC_ALGO,\n} from \"./constants\";\nimport { locateWindow } from \"@aws-sdk/util-locate-window\";\n\nexport class Sha256 implements Checksum {\n private readonly secret?: SourceData;\n private key: Promise | undefined;\n private toHash: Uint8Array = new Uint8Array(0);\n\n constructor(secret?: SourceData) {\n this.secret = secret;\n this.reset();\n }\n\n update(data: SourceData): void {\n if (isEmptyData(data)) {\n return;\n }\n\n const update = convertToBuffer(data);\n const typedArray = new Uint8Array(\n this.toHash.byteLength + update.byteLength\n );\n typedArray.set(this.toHash, 0);\n typedArray.set(update, this.toHash.byteLength);\n this.toHash = typedArray;\n }\n\n digest(): Promise {\n if (this.key) {\n return this.key.then((key) =>\n locateWindow()\n .crypto.subtle.sign(SHA_256_HMAC_ALGO, key, this.toHash)\n .then((data) => new Uint8Array(data))\n );\n }\n\n if (isEmptyData(this.toHash)) {\n return Promise.resolve(EMPTY_DATA_SHA_256);\n }\n\n return Promise.resolve()\n .then(() =>\n locateWindow().crypto.subtle.digest(SHA_256_HASH, this.toHash)\n )\n .then((data) => Promise.resolve(new Uint8Array(data)));\n }\n\n reset(): void {\n this.toHash = new Uint8Array(0);\n if (this.secret && this.secret !== void 0) {\n this.key = new Promise((resolve, reject) => {\n locateWindow()\n .crypto.subtle.importKey(\n \"raw\",\n convertToBuffer(this.secret as SourceData),\n SHA_256_HMAC_ALGO,\n false,\n [\"sign\"]\n )\n .then(resolve, reject);\n });\n this.key.catch(() => {});\n }\n }\n}\n", "/**\n * @internal\n */\nexport const BLOCK_SIZE: number = 64;\n\n/**\n * @internal\n */\nexport const DIGEST_LENGTH: number = 32;\n\n/**\n * @internal\n */\nexport const KEY = new Uint32Array([\n 0x428a2f98,\n 0x71374491,\n 0xb5c0fbcf,\n 0xe9b5dba5,\n 0x3956c25b,\n 0x59f111f1,\n 0x923f82a4,\n 0xab1c5ed5,\n 0xd807aa98,\n 0x12835b01,\n 0x243185be,\n 0x550c7dc3,\n 0x72be5d74,\n 0x80deb1fe,\n 0x9bdc06a7,\n 0xc19bf174,\n 0xe49b69c1,\n 0xefbe4786,\n 0x0fc19dc6,\n 0x240ca1cc,\n 0x2de92c6f,\n 0x4a7484aa,\n 0x5cb0a9dc,\n 0x76f988da,\n 0x983e5152,\n 0xa831c66d,\n 0xb00327c8,\n 0xbf597fc7,\n 0xc6e00bf3,\n 0xd5a79147,\n 0x06ca6351,\n 0x14292967,\n 0x27b70a85,\n 0x2e1b2138,\n 0x4d2c6dfc,\n 0x53380d13,\n 0x650a7354,\n 0x766a0abb,\n 0x81c2c92e,\n 0x92722c85,\n 0xa2bfe8a1,\n 0xa81a664b,\n 0xc24b8b70,\n 0xc76c51a3,\n 0xd192e819,\n 0xd6990624,\n 0xf40e3585,\n 0x106aa070,\n 0x19a4c116,\n 0x1e376c08,\n 0x2748774c,\n 0x34b0bcb5,\n 0x391c0cb3,\n 0x4ed8aa4a,\n 0x5b9cca4f,\n 0x682e6ff3,\n 0x748f82ee,\n 0x78a5636f,\n 0x84c87814,\n 0x8cc70208,\n 0x90befffa,\n 0xa4506ceb,\n 0xbef9a3f7,\n 0xc67178f2\n]);\n\n/**\n * @internal\n */\nexport const INIT = [\n 0x6a09e667,\n 0xbb67ae85,\n 0x3c6ef372,\n 0xa54ff53a,\n 0x510e527f,\n 0x9b05688c,\n 0x1f83d9ab,\n 0x5be0cd19\n];\n\n/**\n * @internal\n */\nexport const MAX_HASHABLE_LENGTH = 2 ** 53 - 1;\n", "import {\n BLOCK_SIZE,\n DIGEST_LENGTH,\n INIT,\n KEY,\n MAX_HASHABLE_LENGTH\n} from \"./constants\";\n\n/**\n * @internal\n */\nexport class RawSha256 {\n private state: Int32Array = Int32Array.from(INIT);\n private temp: Int32Array = new Int32Array(64);\n private buffer: Uint8Array = new Uint8Array(64);\n private bufferLength: number = 0;\n private bytesHashed: number = 0;\n\n /**\n * @internal\n */\n finished: boolean = false;\n\n update(data: Uint8Array): void {\n if (this.finished) {\n throw new Error(\"Attempted to update an already finished hash.\");\n }\n\n let position = 0;\n let { byteLength } = data;\n this.bytesHashed += byteLength;\n\n if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) {\n throw new Error(\"Cannot hash more than 2^53 - 1 bits\");\n }\n\n while (byteLength > 0) {\n this.buffer[this.bufferLength++] = data[position++];\n byteLength--;\n\n if (this.bufferLength === BLOCK_SIZE) {\n this.hashBuffer();\n this.bufferLength = 0;\n }\n }\n }\n\n digest(): Uint8Array {\n if (!this.finished) {\n const bitsHashed = this.bytesHashed * 8;\n const bufferView = new DataView(\n this.buffer.buffer,\n this.buffer.byteOffset,\n this.buffer.byteLength\n );\n\n const undecoratedLength = this.bufferLength;\n bufferView.setUint8(this.bufferLength++, 0x80);\n\n // Ensure the final block has enough room for the hashed length\n if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) {\n for (let i = this.bufferLength; i < BLOCK_SIZE; i++) {\n bufferView.setUint8(i, 0);\n }\n this.hashBuffer();\n this.bufferLength = 0;\n }\n\n for (let i = this.bufferLength; i < BLOCK_SIZE - 8; i++) {\n bufferView.setUint8(i, 0);\n }\n bufferView.setUint32(\n BLOCK_SIZE - 8,\n Math.floor(bitsHashed / 0x100000000),\n true\n );\n bufferView.setUint32(BLOCK_SIZE - 4, bitsHashed);\n\n this.hashBuffer();\n\n this.finished = true;\n }\n\n // The value in state is little-endian rather than big-endian, so flip\n // each word into a new Uint8Array\n const out = new Uint8Array(DIGEST_LENGTH);\n for (let i = 0; i < 8; i++) {\n out[i * 4] = (this.state[i] >>> 24) & 0xff;\n out[i * 4 + 1] = (this.state[i] >>> 16) & 0xff;\n out[i * 4 + 2] = (this.state[i] >>> 8) & 0xff;\n out[i * 4 + 3] = (this.state[i] >>> 0) & 0xff;\n }\n\n return out;\n }\n\n private hashBuffer(): void {\n const { buffer, state } = this;\n\n let state0 = state[0],\n state1 = state[1],\n state2 = state[2],\n state3 = state[3],\n state4 = state[4],\n state5 = state[5],\n state6 = state[6],\n state7 = state[7];\n\n for (let i = 0; i < BLOCK_SIZE; i++) {\n if (i < 16) {\n this.temp[i] =\n ((buffer[i * 4] & 0xff) << 24) |\n ((buffer[i * 4 + 1] & 0xff) << 16) |\n ((buffer[i * 4 + 2] & 0xff) << 8) |\n (buffer[i * 4 + 3] & 0xff);\n } else {\n let u = this.temp[i - 2];\n const t1 =\n ((u >>> 17) | (u << 15)) ^ ((u >>> 19) | (u << 13)) ^ (u >>> 10);\n\n u = this.temp[i - 15];\n const t2 =\n ((u >>> 7) | (u << 25)) ^ ((u >>> 18) | (u << 14)) ^ (u >>> 3);\n\n this.temp[i] =\n ((t1 + this.temp[i - 7]) | 0) + ((t2 + this.temp[i - 16]) | 0);\n }\n\n const t1 =\n ((((((state4 >>> 6) | (state4 << 26)) ^\n ((state4 >>> 11) | (state4 << 21)) ^\n ((state4 >>> 25) | (state4 << 7))) +\n ((state4 & state5) ^ (~state4 & state6))) |\n 0) +\n ((state7 + ((KEY[i] + this.temp[i]) | 0)) | 0)) |\n 0;\n\n const t2 =\n ((((state0 >>> 2) | (state0 << 30)) ^\n ((state0 >>> 13) | (state0 << 19)) ^\n ((state0 >>> 22) | (state0 << 10))) +\n ((state0 & state1) ^ (state0 & state2) ^ (state1 & state2))) |\n 0;\n\n state7 = state6;\n state6 = state5;\n state5 = state4;\n state4 = (state3 + t1) | 0;\n state3 = state2;\n state2 = state1;\n state1 = state0;\n state0 = (t1 + t2) | 0;\n }\n\n state[0] += state0;\n state[1] += state1;\n state[2] += state2;\n state[3] += state3;\n state[4] += state4;\n state[5] += state5;\n state[6] += state6;\n state[7] += state7;\n }\n}\n", "import { BLOCK_SIZE } from \"./constants\";\nimport { RawSha256 } from \"./RawSha256\";\nimport { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { isEmptyData, convertToBuffer } from \"@aws-crypto/util\";\n\nexport class Sha256 implements Checksum {\n private readonly secret?: SourceData;\n private hash: RawSha256;\n private outer?: RawSha256;\n private error: any;\n\n constructor(secret?: SourceData) {\n this.secret = secret;\n this.hash = new RawSha256();\n this.reset();\n }\n\n update(toHash: SourceData): void {\n if (isEmptyData(toHash) || this.error) {\n return;\n }\n\n try {\n this.hash.update(convertToBuffer(toHash));\n } catch (e) {\n this.error = e;\n }\n }\n\n /* This synchronous method keeps compatibility\n * with the v2 aws-sdk.\n */\n digestSync(): Uint8Array {\n if (this.error) {\n throw this.error;\n }\n\n if (this.outer) {\n if (!this.outer.finished) {\n this.outer.update(this.hash.digest());\n }\n\n return this.outer.digest();\n }\n\n return this.hash.digest();\n }\n\n /* The underlying digest method here is synchronous.\n * To keep the same interface with the other hash functions\n * the default is to expose this as an async method.\n * However, it can sometimes be useful to have a sync method.\n */\n async digest(): Promise {\n return this.digestSync();\n }\n\n reset(): void {\n this.hash = new RawSha256();\n if (this.secret) {\n this.outer = new RawSha256();\n const inner = bufferFromSecret(this.secret);\n const outer = new Uint8Array(BLOCK_SIZE);\n outer.set(inner);\n\n for (let i = 0; i < BLOCK_SIZE; i++) {\n inner[i] ^= 0x36;\n outer[i] ^= 0x5c;\n }\n\n this.hash.update(inner);\n this.outer.update(outer);\n\n // overwrite the copied key in memory\n for (let i = 0; i < inner.byteLength; i++) {\n inner[i] = 0;\n }\n }\n }\n}\n\nfunction bufferFromSecret(secret: SourceData): Uint8Array {\n let input = convertToBuffer(secret);\n\n if (input.byteLength > BLOCK_SIZE) {\n const bufferHash = new RawSha256();\n bufferHash.update(input);\n input = bufferHash.digest();\n }\n\n const buffer = new Uint8Array(BLOCK_SIZE);\n buffer.set(input);\n return buffer;\n}\n", "export * from \"./jsSha256\";\n", "import { Sha256 as WebCryptoSha256 } from \"./webCryptoSha256\";\nimport { Sha256 as JsSha256 } from \"@aws-crypto/sha256-js\";\nimport { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { supportsWebCrypto } from \"@aws-crypto/supports-web-crypto\";\nimport { locateWindow } from \"@aws-sdk/util-locate-window\";\nimport { convertToBuffer } from \"@aws-crypto/util\";\n\nexport class Sha256 implements Checksum {\n private hash: Checksum;\n\n constructor(secret?: SourceData) {\n if (supportsWebCrypto(locateWindow())) {\n this.hash = new WebCryptoSha256(secret);\n } else {\n this.hash = new JsSha256(secret);\n }\n }\n\n update(data: SourceData, encoding?: \"utf8\" | \"ascii\" | \"latin1\"): void {\n this.hash.update(convertToBuffer(data));\n }\n\n digest(): Promise {\n return this.hash.digest();\n }\n\n reset(): void {\n this.hash.reset();\n }\n}\n", "export * from \"./crossPlatformSha256\";\nexport { Sha256 as WebCryptoSha256 } from \"./webCryptoSha256\";\n", "export { createUserAgentStringParsingProvider } from \"./createUserAgentStringParsingProvider\";\nexport const createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => async (config) => {\n const navigator = typeof window !== \"undefined\" ? window.navigator : undefined;\n const uaString = navigator?.userAgent ?? \"\";\n const osName = navigator?.userAgentData?.platform ?? fallback.os(uaString) ?? \"other\";\n const osVersion = undefined;\n const brands = navigator?.userAgentData?.brands ?? [];\n const brand = brands[brands.length - 1];\n const browserName = brand?.brand ?? fallback.browser(uaString) ?? \"unknown\";\n const browserVersion = brand?.version ?? \"unknown\";\n const sections = [\n [\"aws-sdk-js\", clientVersion],\n [\"ua\", \"2.1\"],\n [`os/${osName}`, osVersion],\n [\"lang/js\"],\n [\"md/browser\", `${browserName}_${browserVersion}`],\n ];\n if (serviceId) {\n sections.push([`api/${serviceId}`, clientVersion]);\n }\n const appId = await config?.userAgentAppId?.();\n if (appId) {\n sections.push([`app/${appId}`]);\n }\n return sections;\n};\nexport const fallback = {\n os(ua) {\n if (/iPhone|iPad|iPod/.test(ua))\n return \"iOS\";\n if (/Macintosh|Mac OS X/.test(ua))\n return \"macOS\";\n if (/Windows NT/.test(ua))\n return \"Windows\";\n if (/Android/.test(ua))\n return \"Android\";\n if (/Linux/.test(ua))\n return \"Linux\";\n return undefined;\n },\n browser(ua) {\n if (/EdgiOS|EdgA|Edg\\//.test(ua))\n return \"Microsoft Edge\";\n if (/Firefox\\//.test(ua))\n return \"Firefox\";\n if (/Chrome\\//.test(ua))\n return \"Chrome\";\n if (/Safari\\//.test(ua))\n return \"Safari\";\n return undefined;\n },\n};\nexport const defaultUserAgent = createDefaultUserAgentProvider;\n", "import { toHex } from \"@smithy/util-hex-encoding\";\nexport class Int64 {\n bytes;\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static fromNumber(number) {\n if (number > 9_223_372_036_854_775_807 || number < -9_223_372_036_854_775_808) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new Int64(bytes);\n }\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 0b10000000;\n if (negative) {\n negate(bytes);\n }\n return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n}\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 0xff;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n", "import { fromHex, toHex } from \"@smithy/util-hex-encoding\";\nimport { Int64 } from \"./Int64\";\nexport class HeaderMarshaller {\n toUtf8;\n fromUtf8;\n constructor(toUtf8, fromUtf8) {\n this.toUtf8 = toUtf8;\n this.fromUtf8 = fromUtf8;\n }\n format(headers) {\n const chunks = [];\n for (const headerName of Object.keys(headers)) {\n const bytes = this.fromUtf8(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? 0 : 1]);\n case \"byte\":\n return Uint8Array.from([2, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, 3);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, 4);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = 5;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, 6);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = this.fromUtf8(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, 7);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = 8;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = 9;\n uuidBytes.set(fromHex(header.value.replace(/\\-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n parse(headers) {\n const out = {};\n let position = 0;\n while (position < headers.byteLength) {\n const nameLength = headers.getUint8(position++);\n const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));\n position += nameLength;\n switch (headers.getUint8(position++)) {\n case 0:\n out[name] = {\n type: BOOLEAN_TAG,\n value: true,\n };\n break;\n case 1:\n out[name] = {\n type: BOOLEAN_TAG,\n value: false,\n };\n break;\n case 2:\n out[name] = {\n type: BYTE_TAG,\n value: headers.getInt8(position++),\n };\n break;\n case 3:\n out[name] = {\n type: SHORT_TAG,\n value: headers.getInt16(position, false),\n };\n position += 2;\n break;\n case 4:\n out[name] = {\n type: INT_TAG,\n value: headers.getInt32(position, false),\n };\n position += 4;\n break;\n case 5:\n out[name] = {\n type: LONG_TAG,\n value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)),\n };\n position += 8;\n break;\n case 6:\n const binaryLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: BINARY_TAG,\n value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength),\n };\n position += binaryLength;\n break;\n case 7:\n const stringLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: STRING_TAG,\n value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)),\n };\n position += stringLength;\n break;\n case 8:\n out[name] = {\n type: TIMESTAMP_TAG,\n value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()),\n };\n position += 8;\n break;\n case 9:\n const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);\n position += 16;\n out[name] = {\n type: UUID_TAG,\n value: `${toHex(uuidBytes.subarray(0, 4))}-${toHex(uuidBytes.subarray(4, 6))}-${toHex(uuidBytes.subarray(6, 8))}-${toHex(uuidBytes.subarray(8, 10))}-${toHex(uuidBytes.subarray(10))}`,\n };\n break;\n default:\n throw new Error(`Unrecognized header type tag`);\n }\n }\n return out;\n }\n}\nvar HEADER_VALUE_TYPE;\n(function (HEADER_VALUE_TYPE) {\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolTrue\"] = 0] = \"boolTrue\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolFalse\"] = 1] = \"boolFalse\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byte\"] = 2] = \"byte\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"short\"] = 3] = \"short\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"integer\"] = 4] = \"integer\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"long\"] = 5] = \"long\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byteArray\"] = 6] = \"byteArray\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"string\"] = 7] = \"string\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"timestamp\"] = 8] = \"timestamp\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"uuid\"] = 9] = \"uuid\";\n})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));\nconst BOOLEAN_TAG = \"boolean\";\nconst BYTE_TAG = \"byte\";\nconst SHORT_TAG = \"short\";\nconst INT_TAG = \"integer\";\nconst LONG_TAG = \"long\";\nconst BINARY_TAG = \"binary\";\nconst STRING_TAG = \"string\";\nconst TIMESTAMP_TAG = \"timestamp\";\nconst UUID_TAG = \"uuid\";\nconst UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\n", "import { Crc32 } from \"@aws-crypto/crc32\";\nconst PRELUDE_MEMBER_LENGTH = 4;\nconst PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;\nconst CHECKSUM_LENGTH = 4;\nconst MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;\nexport function splitMessage({ byteLength, byteOffset, buffer }) {\n if (byteLength < MINIMUM_MESSAGE_LENGTH) {\n throw new Error(\"Provided message too short to accommodate event stream message overhead\");\n }\n const view = new DataView(buffer, byteOffset, byteLength);\n const messageLength = view.getUint32(0, false);\n if (byteLength !== messageLength) {\n throw new Error(\"Reported message length does not match received message length\");\n }\n const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);\n const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);\n const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);\n const checksummer = new Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH));\n if (expectedPreludeChecksum !== checksummer.digest()) {\n throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`);\n }\n checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)));\n if (expectedMessageChecksum !== checksummer.digest()) {\n throw new Error(`The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`);\n }\n return {\n headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength),\n body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)),\n };\n}\n", "import { Crc32 } from \"@aws-crypto/crc32\";\nimport { HeaderMarshaller } from \"./HeaderMarshaller\";\nimport { splitMessage } from \"./splitMessage\";\nexport class EventStreamCodec {\n headerMarshaller;\n messageBuffer;\n isEndOfStream;\n constructor(toUtf8, fromUtf8) {\n this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8);\n this.messageBuffer = [];\n this.isEndOfStream = false;\n }\n feed(message) {\n this.messageBuffer.push(this.decode(message));\n }\n endOfStream() {\n this.isEndOfStream = true;\n }\n getMessage() {\n const message = this.messageBuffer.pop();\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessage() {\n return message;\n },\n isEndOfStream() {\n return isEndOfStream;\n },\n };\n }\n getAvailableMessages() {\n const messages = this.messageBuffer;\n this.messageBuffer = [];\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessages() {\n return messages;\n },\n isEndOfStream() {\n return isEndOfStream;\n },\n };\n }\n encode({ headers: rawHeaders, body }) {\n const headers = this.headerMarshaller.format(rawHeaders);\n const length = headers.byteLength + body.byteLength + 16;\n const out = new Uint8Array(length);\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n const checksum = new Crc32();\n view.setUint32(0, length, false);\n view.setUint32(4, headers.byteLength, false);\n view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false);\n out.set(headers, 12);\n out.set(body, headers.byteLength + 12);\n view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false);\n return out;\n }\n decode(message) {\n const { headers, body } = splitMessage(message);\n return { headers: this.headerMarshaller.parse(headers), body };\n }\n formatHeaders(rawHeaders) {\n return this.headerMarshaller.format(rawHeaders);\n }\n}\n", "export {};\n", "export class MessageDecoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const bytes of this.options.inputStream) {\n const decoded = this.options.decoder.decode(bytes);\n yield decoded;\n }\n }\n}\n", "export class MessageEncoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const msg of this.options.messageStream) {\n const encoded = this.options.encoder.encode(msg);\n yield encoded;\n }\n if (this.options.includeEndFrame) {\n yield new Uint8Array(0);\n }\n }\n}\n", "export class SmithyMessageDecoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const message of this.options.messageStream) {\n const deserialized = await this.options.deserializer(message);\n if (deserialized === undefined)\n continue;\n yield deserialized;\n }\n }\n}\n", "export class SmithyMessageEncoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const chunk of this.options.inputStream) {\n const payloadBuf = this.options.serializer(chunk);\n yield payloadBuf;\n }\n }\n}\n", "export * from \"./EventStreamCodec\";\nexport * from \"./HeaderMarshaller\";\nexport * from \"./Int64\";\nexport * from \"./Message\";\nexport * from \"./MessageDecoderStream\";\nexport * from \"./MessageEncoderStream\";\nexport * from \"./SmithyMessageDecoderStream\";\nexport * from \"./SmithyMessageEncoderStream\";\n", "export function getChunkedStream(source) {\n let currentMessageTotalLength = 0;\n let currentMessagePendingLength = 0;\n let currentMessage = null;\n let messageLengthBuffer = null;\n const allocateMessage = (size) => {\n if (typeof size !== \"number\") {\n throw new Error(\"Attempted to allocate an event message where size was not a number: \" + size);\n }\n currentMessageTotalLength = size;\n currentMessagePendingLength = 4;\n currentMessage = new Uint8Array(size);\n const currentMessageView = new DataView(currentMessage.buffer);\n currentMessageView.setUint32(0, size, false);\n };\n const iterator = async function* () {\n const sourceIterator = source[Symbol.asyncIterator]();\n while (true) {\n const { value, done } = await sourceIterator.next();\n if (done) {\n if (!currentMessageTotalLength) {\n return;\n }\n else if (currentMessageTotalLength === currentMessagePendingLength) {\n yield currentMessage;\n }\n else {\n throw new Error(\"Truncated event message received.\");\n }\n return;\n }\n const chunkLength = value.length;\n let currentOffset = 0;\n while (currentOffset < chunkLength) {\n if (!currentMessage) {\n const bytesRemaining = chunkLength - currentOffset;\n if (!messageLengthBuffer) {\n messageLengthBuffer = new Uint8Array(4);\n }\n const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining);\n messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength);\n currentMessagePendingLength += numBytesForTotal;\n currentOffset += numBytesForTotal;\n if (currentMessagePendingLength < 4) {\n break;\n }\n allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false));\n messageLengthBuffer = null;\n }\n const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset);\n currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength);\n currentMessagePendingLength += numBytesToWrite;\n currentOffset += numBytesToWrite;\n if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) {\n yield currentMessage;\n currentMessage = null;\n currentMessageTotalLength = 0;\n currentMessagePendingLength = 0;\n }\n }\n }\n };\n return {\n [Symbol.asyncIterator]: iterator,\n };\n}\n", "export function getUnmarshalledStream(source, options) {\n const messageUnmarshaller = getMessageUnmarshaller(options.deserializer, options.toUtf8);\n return {\n [Symbol.asyncIterator]: async function* () {\n for await (const chunk of source) {\n const message = options.eventStreamCodec.decode(chunk);\n const type = await messageUnmarshaller(message);\n if (type === undefined)\n continue;\n yield type;\n }\n },\n };\n}\nexport function getMessageUnmarshaller(deserializer, toUtf8) {\n return async function (message) {\n const { value: messageType } = message.headers[\":message-type\"];\n if (messageType === \"error\") {\n const unmodeledError = new Error(message.headers[\":error-message\"].value || \"UnknownError\");\n unmodeledError.name = message.headers[\":error-code\"].value;\n throw unmodeledError;\n }\n else if (messageType === \"exception\") {\n const code = message.headers[\":exception-type\"].value;\n const exception = { [code]: message };\n const deserializedException = await deserializer(exception);\n if (deserializedException.$unknown) {\n const error = new Error(toUtf8(message.body));\n error.name = code;\n throw error;\n }\n throw deserializedException[code];\n }\n else if (messageType === \"event\") {\n const event = {\n [message.headers[\":event-type\"].value]: message,\n };\n const deserialized = await deserializer(event);\n if (deserialized.$unknown)\n return;\n return deserialized;\n }\n else {\n throw Error(`Unrecognizable event type: ${message.headers[\":event-type\"].value}`);\n }\n };\n}\n", "import { EventStreamCodec, MessageDecoderStream, MessageEncoderStream, SmithyMessageDecoderStream, SmithyMessageEncoderStream, } from \"@smithy/eventstream-codec\";\nimport { getChunkedStream } from \"./getChunkedStream\";\nimport { getMessageUnmarshaller } from \"./getUnmarshalledStream\";\nexport class EventStreamMarshaller {\n eventStreamCodec;\n utfEncoder;\n constructor({ utf8Encoder, utf8Decoder }) {\n this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder);\n this.utfEncoder = utf8Encoder;\n }\n deserialize(body, deserializer) {\n const inputStream = getChunkedStream(body);\n return new SmithyMessageDecoderStream({\n messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }),\n deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder),\n });\n }\n serialize(inputStream, serializer) {\n return new MessageEncoderStream({\n messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }),\n encoder: this.eventStreamCodec,\n includeEndFrame: true,\n });\n }\n}\n", "import { EventStreamMarshaller } from \"./EventStreamMarshaller\";\nexport const eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);\n", "export * from \"./EventStreamMarshaller\";\nexport * from \"./provider\";\n", "export const readableStreamtoIterable = (readableStream) => ({\n [Symbol.asyncIterator]: async function* () {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done)\n return;\n yield value;\n }\n }\n finally {\n reader.releaseLock();\n }\n },\n});\nexport const iterableToReadableStream = (asyncIterable) => {\n const iterator = asyncIterable[Symbol.asyncIterator]();\n return new ReadableStream({\n async pull(controller) {\n const { done, value } = await iterator.next();\n if (done) {\n return controller.close();\n }\n controller.enqueue(value);\n },\n });\n};\n", "import { EventStreamMarshaller as UniversalEventStreamMarshaller } from \"@smithy/eventstream-serde-universal\";\nimport { iterableToReadableStream, readableStreamtoIterable } from \"./utils\";\nexport class EventStreamMarshaller {\n universalMarshaller;\n constructor({ utf8Encoder, utf8Decoder }) {\n this.universalMarshaller = new UniversalEventStreamMarshaller({\n utf8Decoder,\n utf8Encoder,\n });\n }\n deserialize(body, deserializer) {\n const bodyIterable = isReadableStream(body) ? readableStreamtoIterable(body) : body;\n return this.universalMarshaller.deserialize(bodyIterable, deserializer);\n }\n serialize(input, serializer) {\n const serialziedIterable = this.universalMarshaller.serialize(input, serializer);\n return typeof ReadableStream === \"function\" ? iterableToReadableStream(serialziedIterable) : serialziedIterable;\n }\n}\nconst isReadableStream = (body) => typeof ReadableStream === \"function\" && body instanceof ReadableStream;\n", "import { EventStreamMarshaller } from \"./EventStreamMarshaller\";\nexport const eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);\n", "export * from \"./EventStreamMarshaller\";\nexport * from \"./provider\";\nexport * from \"./utils\";\n", "export async function blobReader(blob, onChunk, chunkSize = 1024 * 1024) {\n const size = blob.size;\n let totalBytesRead = 0;\n while (totalBytesRead < size) {\n const slice = blob.slice(totalBytesRead, Math.min(size, totalBytesRead + chunkSize));\n onChunk(new Uint8Array(await slice.arrayBuffer()));\n totalBytesRead += slice.size;\n }\n}\n", "import { blobReader } from \"@smithy/chunked-blob-reader\";\nexport const blobHasher = async function blobHasher(hashCtor, blob) {\n const hash = new hashCtor();\n await blobReader(blob, (chunk) => {\n hash.update(chunk);\n });\n return hash.digest();\n};\n", "export const invalidFunction = (message) => () => {\n throw new Error(message);\n};\n", "export const invalidProvider = (message) => () => Promise.reject(message);\n", "export * from \"./invalidFunction\";\nexport * from \"./invalidProvider\";\n", "export const BLOCK_SIZE = 64;\nexport const DIGEST_LENGTH = 16;\nexport const INIT = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476];\n", "import { fromUtf8 } from \"@smithy/util-utf8\";\nimport { BLOCK_SIZE, DIGEST_LENGTH, INIT } from \"./constants\";\nexport class Md5 {\n state;\n buffer;\n bufferLength;\n bytesHashed;\n finished;\n constructor() {\n this.reset();\n }\n update(sourceData) {\n if (isEmptyData(sourceData)) {\n return;\n }\n else if (this.finished) {\n throw new Error(\"Attempted to update an already finished hash.\");\n }\n const data = convertToBuffer(sourceData);\n let position = 0;\n let { byteLength } = data;\n this.bytesHashed += byteLength;\n while (byteLength > 0) {\n this.buffer.setUint8(this.bufferLength++, data[position++]);\n byteLength--;\n if (this.bufferLength === BLOCK_SIZE) {\n this.hashBuffer();\n this.bufferLength = 0;\n }\n }\n }\n async digest() {\n if (!this.finished) {\n const { buffer, bufferLength: undecoratedLength, bytesHashed } = this;\n const bitsHashed = bytesHashed * 8;\n buffer.setUint8(this.bufferLength++, 0b10000000);\n if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) {\n for (let i = this.bufferLength; i < BLOCK_SIZE; i++) {\n buffer.setUint8(i, 0);\n }\n this.hashBuffer();\n this.bufferLength = 0;\n }\n for (let i = this.bufferLength; i < BLOCK_SIZE - 8; i++) {\n buffer.setUint8(i, 0);\n }\n buffer.setUint32(BLOCK_SIZE - 8, bitsHashed >>> 0, true);\n buffer.setUint32(BLOCK_SIZE - 4, Math.floor(bitsHashed / 0x100000000), true);\n this.hashBuffer();\n this.finished = true;\n }\n const out = new DataView(new ArrayBuffer(DIGEST_LENGTH));\n for (let i = 0; i < 4; i++) {\n out.setUint32(i * 4, this.state[i], true);\n }\n return new Uint8Array(out.buffer, out.byteOffset, out.byteLength);\n }\n hashBuffer() {\n const { buffer, state } = this;\n let a = state[0], b = state[1], c = state[2], d = state[3];\n a = ff(a, b, c, d, buffer.getUint32(0, true), 7, 0xd76aa478);\n d = ff(d, a, b, c, buffer.getUint32(4, true), 12, 0xe8c7b756);\n c = ff(c, d, a, b, buffer.getUint32(8, true), 17, 0x242070db);\n b = ff(b, c, d, a, buffer.getUint32(12, true), 22, 0xc1bdceee);\n a = ff(a, b, c, d, buffer.getUint32(16, true), 7, 0xf57c0faf);\n d = ff(d, a, b, c, buffer.getUint32(20, true), 12, 0x4787c62a);\n c = ff(c, d, a, b, buffer.getUint32(24, true), 17, 0xa8304613);\n b = ff(b, c, d, a, buffer.getUint32(28, true), 22, 0xfd469501);\n a = ff(a, b, c, d, buffer.getUint32(32, true), 7, 0x698098d8);\n d = ff(d, a, b, c, buffer.getUint32(36, true), 12, 0x8b44f7af);\n c = ff(c, d, a, b, buffer.getUint32(40, true), 17, 0xffff5bb1);\n b = ff(b, c, d, a, buffer.getUint32(44, true), 22, 0x895cd7be);\n a = ff(a, b, c, d, buffer.getUint32(48, true), 7, 0x6b901122);\n d = ff(d, a, b, c, buffer.getUint32(52, true), 12, 0xfd987193);\n c = ff(c, d, a, b, buffer.getUint32(56, true), 17, 0xa679438e);\n b = ff(b, c, d, a, buffer.getUint32(60, true), 22, 0x49b40821);\n a = gg(a, b, c, d, buffer.getUint32(4, true), 5, 0xf61e2562);\n d = gg(d, a, b, c, buffer.getUint32(24, true), 9, 0xc040b340);\n c = gg(c, d, a, b, buffer.getUint32(44, true), 14, 0x265e5a51);\n b = gg(b, c, d, a, buffer.getUint32(0, true), 20, 0xe9b6c7aa);\n a = gg(a, b, c, d, buffer.getUint32(20, true), 5, 0xd62f105d);\n d = gg(d, a, b, c, buffer.getUint32(40, true), 9, 0x02441453);\n c = gg(c, d, a, b, buffer.getUint32(60, true), 14, 0xd8a1e681);\n b = gg(b, c, d, a, buffer.getUint32(16, true), 20, 0xe7d3fbc8);\n a = gg(a, b, c, d, buffer.getUint32(36, true), 5, 0x21e1cde6);\n d = gg(d, a, b, c, buffer.getUint32(56, true), 9, 0xc33707d6);\n c = gg(c, d, a, b, buffer.getUint32(12, true), 14, 0xf4d50d87);\n b = gg(b, c, d, a, buffer.getUint32(32, true), 20, 0x455a14ed);\n a = gg(a, b, c, d, buffer.getUint32(52, true), 5, 0xa9e3e905);\n d = gg(d, a, b, c, buffer.getUint32(8, true), 9, 0xfcefa3f8);\n c = gg(c, d, a, b, buffer.getUint32(28, true), 14, 0x676f02d9);\n b = gg(b, c, d, a, buffer.getUint32(48, true), 20, 0x8d2a4c8a);\n a = hh(a, b, c, d, buffer.getUint32(20, true), 4, 0xfffa3942);\n d = hh(d, a, b, c, buffer.getUint32(32, true), 11, 0x8771f681);\n c = hh(c, d, a, b, buffer.getUint32(44, true), 16, 0x6d9d6122);\n b = hh(b, c, d, a, buffer.getUint32(56, true), 23, 0xfde5380c);\n a = hh(a, b, c, d, buffer.getUint32(4, true), 4, 0xa4beea44);\n d = hh(d, a, b, c, buffer.getUint32(16, true), 11, 0x4bdecfa9);\n c = hh(c, d, a, b, buffer.getUint32(28, true), 16, 0xf6bb4b60);\n b = hh(b, c, d, a, buffer.getUint32(40, true), 23, 0xbebfbc70);\n a = hh(a, b, c, d, buffer.getUint32(52, true), 4, 0x289b7ec6);\n d = hh(d, a, b, c, buffer.getUint32(0, true), 11, 0xeaa127fa);\n c = hh(c, d, a, b, buffer.getUint32(12, true), 16, 0xd4ef3085);\n b = hh(b, c, d, a, buffer.getUint32(24, true), 23, 0x04881d05);\n a = hh(a, b, c, d, buffer.getUint32(36, true), 4, 0xd9d4d039);\n d = hh(d, a, b, c, buffer.getUint32(48, true), 11, 0xe6db99e5);\n c = hh(c, d, a, b, buffer.getUint32(60, true), 16, 0x1fa27cf8);\n b = hh(b, c, d, a, buffer.getUint32(8, true), 23, 0xc4ac5665);\n a = ii(a, b, c, d, buffer.getUint32(0, true), 6, 0xf4292244);\n d = ii(d, a, b, c, buffer.getUint32(28, true), 10, 0x432aff97);\n c = ii(c, d, a, b, buffer.getUint32(56, true), 15, 0xab9423a7);\n b = ii(b, c, d, a, buffer.getUint32(20, true), 21, 0xfc93a039);\n a = ii(a, b, c, d, buffer.getUint32(48, true), 6, 0x655b59c3);\n d = ii(d, a, b, c, buffer.getUint32(12, true), 10, 0x8f0ccc92);\n c = ii(c, d, a, b, buffer.getUint32(40, true), 15, 0xffeff47d);\n b = ii(b, c, d, a, buffer.getUint32(4, true), 21, 0x85845dd1);\n a = ii(a, b, c, d, buffer.getUint32(32, true), 6, 0x6fa87e4f);\n d = ii(d, a, b, c, buffer.getUint32(60, true), 10, 0xfe2ce6e0);\n c = ii(c, d, a, b, buffer.getUint32(24, true), 15, 0xa3014314);\n b = ii(b, c, d, a, buffer.getUint32(52, true), 21, 0x4e0811a1);\n a = ii(a, b, c, d, buffer.getUint32(16, true), 6, 0xf7537e82);\n d = ii(d, a, b, c, buffer.getUint32(44, true), 10, 0xbd3af235);\n c = ii(c, d, a, b, buffer.getUint32(8, true), 15, 0x2ad7d2bb);\n b = ii(b, c, d, a, buffer.getUint32(36, true), 21, 0xeb86d391);\n state[0] = (a + state[0]) & 0xffffffff;\n state[1] = (b + state[1]) & 0xffffffff;\n state[2] = (c + state[2]) & 0xffffffff;\n state[3] = (d + state[3]) & 0xffffffff;\n }\n reset() {\n this.state = Uint32Array.from(INIT);\n this.buffer = new DataView(new ArrayBuffer(BLOCK_SIZE));\n this.bufferLength = 0;\n this.bytesHashed = 0;\n this.finished = false;\n }\n}\nfunction cmn(q, a, b, x, s, t) {\n a = (((a + q) & 0xffffffff) + ((x + t) & 0xffffffff)) & 0xffffffff;\n return (((a << s) | (a >>> (32 - s))) + b) & 0xffffffff;\n}\nfunction ff(a, b, c, d, x, s, t) {\n return cmn((b & c) | (~b & d), a, b, x, s, t);\n}\nfunction gg(a, b, c, d, x, s, t) {\n return cmn((b & d) | (c & ~d), a, b, x, s, t);\n}\nfunction hh(a, b, c, d, x, s, t) {\n return cmn(b ^ c ^ d, a, b, x, s, t);\n}\nfunction ii(a, b, c, d, x, s, t) {\n return cmn(c ^ (b | ~d), a, b, x, s, t);\n}\nfunction isEmptyData(data) {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n return data.byteLength === 0;\n}\nfunction convertToBuffer(data) {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}\n", "export const DEFAULTS_MODE_OPTIONS = [\"in-region\", \"cross-region\", \"mobile\", \"standard\", \"legacy\"];\n", "import { memoize } from \"@smithy/property-provider\";\nimport { DEFAULTS_MODE_OPTIONS } from \"./constants\";\nexport const resolveDefaultsModeConfig = ({ defaultsMode, } = {}) => memoize(async () => {\n const mode = typeof defaultsMode === \"function\" ? await defaultsMode() : defaultsMode;\n switch (mode?.toLowerCase()) {\n case \"auto\":\n return Promise.resolve(useMobileConfiguration() ? \"mobile\" : \"standard\");\n case \"mobile\":\n case \"in-region\":\n case \"cross-region\":\n case \"standard\":\n case \"legacy\":\n return Promise.resolve(mode?.toLocaleLowerCase());\n case undefined:\n return Promise.resolve(\"legacy\");\n default:\n throw new Error(`Invalid parameter for \"defaultsMode\", expect ${DEFAULTS_MODE_OPTIONS.join(\", \")}, got ${mode}`);\n }\n});\nconst useMobileConfiguration = () => {\n const navigator = window?.navigator;\n if (navigator?.connection) {\n const { effectiveType, rtt, downlink } = navigator?.connection;\n const slow = (typeof effectiveType === \"string\" && effectiveType !== \"4g\") || Number(rtt) > 100 || Number(downlink) < 10;\n if (slow) {\n return true;\n }\n }\n return (navigator?.userAgentData?.mobile || (typeof navigator?.maxTouchPoints === \"number\" && navigator?.maxTouchPoints > 1));\n};\n", "export * from \"./resolveDefaultsModeConfig\";\n", "import { AwsSdkSigV4ASigner, AwsSdkSigV4Signer } from \"@aws-sdk/core\";\nimport { AwsRestXmlProtocol } from \"@aws-sdk/core/protocols\";\nimport { SignatureV4MultiRegion } from \"@aws-sdk/signature-v4-multi-region\";\nimport { NoOpLogger } from \"@smithy/smithy-client\";\nimport { parseUrl } from \"@smithy/url-parser\";\nimport { fromBase64, toBase64 } from \"@smithy/util-base64\";\nimport { getAwsChunkedEncodingStream, sdkStreamMixin } from \"@smithy/util-stream\";\nimport { fromUtf8, toUtf8 } from \"@smithy/util-utf8\";\nimport { defaultS3HttpAuthSchemeProvider } from \"./auth/httpAuthSchemeProvider\";\nimport { defaultEndpointResolver } from \"./endpoint/endpointResolver\";\nimport { errorTypeRegistries } from \"./schemas/schemas_0\";\nexport const getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2006-03-01\",\n base64Decoder: config?.base64Decoder ?? fromBase64,\n base64Encoder: config?.base64Encoder ?? toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n getAwsChunkedEncodingStream: config?.getAwsChunkedEncodingStream ?? getAwsChunkedEncodingStream,\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultS3HttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"aws.auth#sigv4a\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4a\"),\n signer: new AwsSdkSigV4ASigner(),\n },\n ],\n logger: config?.logger ?? new NoOpLogger(),\n protocol: config?.protocol ?? AwsRestXmlProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.s3\",\n errorTypeRegistries,\n xmlNamespace: \"http://s3.amazonaws.com/doc/2006-03-01/\",\n version: \"2006-03-01\",\n serviceTarget: \"AmazonS3\",\n },\n sdkStreamMixin: config?.sdkStreamMixin ?? sdkStreamMixin,\n serviceId: config?.serviceId ?? \"S3\",\n signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,\n signingEscapePath: config?.signingEscapePath ?? false,\n urlParser: config?.urlParser ?? parseUrl,\n useArnRegion: config?.useArnRegion ?? undefined,\n utf8Decoder: config?.utf8Decoder ?? fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? toUtf8,\n };\n};\n", "import packageInfo from \"../package.json\";\nimport { Sha1 } from \"@aws-crypto/sha1-browser\";\nimport { Sha256 } from \"@aws-crypto/sha256-browser\";\nimport { createDefaultUserAgentProvider } from \"@aws-sdk/util-user-agent-browser\";\nimport { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from \"@smithy/config-resolver\";\nimport { eventStreamSerdeProvider } from \"@smithy/eventstream-serde-browser\";\nimport { FetchHttpHandler as RequestHandler, streamCollector } from \"@smithy/fetch-http-handler\";\nimport { blobHasher as streamHasher } from \"@smithy/hash-blob-browser\";\nimport { invalidProvider } from \"@smithy/invalid-dependency\";\nimport { Md5 } from \"@smithy/md5-js\";\nimport { loadConfigsForDefaultMode } from \"@smithy/smithy-client\";\nimport { calculateBodyLength } from \"@smithy/util-body-length-browser\";\nimport { resolveDefaultsModeConfig } from \"@smithy/util-defaults-mode-browser\";\nimport { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from \"@smithy/util-retry\";\nimport { getRuntimeConfig as getSharedRuntimeConfig } from \"./runtimeConfig.shared\";\nexport const getRuntimeConfig = (config) => {\n const defaultsMode = resolveDefaultsModeConfig(config);\n const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);\n const clientSharedValues = getSharedRuntimeConfig(config);\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"browser\",\n defaultsMode,\n bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,\n credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error(\"Credential is missing\"))),\n defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,\n maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,\n md5: config?.md5 ?? Md5,\n region: config?.region ?? invalidProvider(\"Region is missing\"),\n requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),\n sha1: config?.sha1 ?? Sha1,\n sha256: config?.sha256 ?? Sha256,\n streamCollector: config?.streamCollector ?? streamCollector,\n streamHasher: config?.streamHasher ?? streamHasher,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),\n useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),\n };\n};\n", "export const getAwsRegionExtensionConfiguration = (runtimeConfig) => {\n return {\n setRegion(region) {\n runtimeConfig.region = region;\n },\n region() {\n return runtimeConfig.region;\n },\n };\n};\nexport const resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => {\n return {\n region: awsRegionExtensionConfiguration.region(),\n };\n};\n", "export { REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, } from \"@smithy/config-resolver\";\nexport { resolveRegionConfig } from \"@smithy/config-resolver\";\n", "export function stsRegionDefaultResolver() {\n return async () => \"us-east-1\";\n}\n", "export * from \"./extensions\";\nexport * from \"./regionConfig/awsRegionConfig\";\nexport * from \"./regionConfig/stsRegionDefaultResolver\";\n", "export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nexport const resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n", "import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from \"@aws-sdk/region-config-resolver\";\nimport { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from \"@smithy/protocol-http\";\nimport { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from \"@smithy/smithy-client\";\nimport { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from \"./auth/httpAuthExtensionConfiguration\";\nexport const resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n", "import { getAddExpectContinuePlugin } from \"@aws-sdk/middleware-expect-continue\";\nimport { resolveFlexibleChecksumsConfig, } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getHostHeaderPlugin, resolveHostHeaderConfig, } from \"@aws-sdk/middleware-host-header\";\nimport { getLoggerPlugin } from \"@aws-sdk/middleware-logger\";\nimport { getRecursionDetectionPlugin } from \"@aws-sdk/middleware-recursion-detection\";\nimport { getRegionRedirectMiddlewarePlugin, getS3ExpressHttpSigningPlugin, getS3ExpressPlugin, getValidateBucketNamePlugin, resolveS3Config, } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getUserAgentPlugin, resolveUserAgentConfig, } from \"@aws-sdk/middleware-user-agent\";\nimport { resolveRegionConfig } from \"@smithy/config-resolver\";\nimport { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from \"@smithy/core\";\nimport { getSchemaSerdePlugin } from \"@smithy/core/schema\";\nimport { resolveEventStreamSerdeConfig, } from \"@smithy/eventstream-serde-config-resolver\";\nimport { getContentLengthPlugin } from \"@smithy/middleware-content-length\";\nimport { resolveEndpointConfig, } from \"@smithy/middleware-endpoint\";\nimport { getRetryPlugin, resolveRetryConfig, } from \"@smithy/middleware-retry\";\nimport { Client as __Client, } from \"@smithy/smithy-client\";\nimport { defaultS3HttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from \"./auth/httpAuthSchemeProvider\";\nimport { CreateSessionCommand, } from \"./commands/CreateSessionCommand\";\nimport { resolveClientEndpointParameters, } from \"./endpoint/EndpointParameters\";\nimport { getRuntimeConfig as __getRuntimeConfig } from \"./runtimeConfig\";\nimport { resolveRuntimeExtensions } from \"./runtimeExtensions\";\nexport { __Client };\nexport class S3Client extends __Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = __getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = resolveUserAgentConfig(_config_1);\n const _config_3 = resolveFlexibleChecksumsConfig(_config_2);\n const _config_4 = resolveRetryConfig(_config_3);\n const _config_5 = resolveRegionConfig(_config_4);\n const _config_6 = resolveHostHeaderConfig(_config_5);\n const _config_7 = resolveEndpointConfig(_config_6);\n const _config_8 = resolveEventStreamSerdeConfig(_config_7);\n const _config_9 = resolveHttpAuthSchemeConfig(_config_8);\n const _config_10 = resolveS3Config(_config_9, { session: [() => this, CreateSessionCommand] });\n const _config_11 = resolveRuntimeExtensions(_config_10, configuration?.extensions || []);\n this.config = _config_11;\n this.middlewareStack.use(getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(getUserAgentPlugin(this.config));\n this.middlewareStack.use(getRetryPlugin(this.config));\n this.middlewareStack.use(getContentLengthPlugin(this.config));\n this.middlewareStack.use(getHostHeaderPlugin(this.config));\n this.middlewareStack.use(getLoggerPlugin(this.config));\n this.middlewareStack.use(getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultS3HttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n \"aws.auth#sigv4a\": config.credentials,\n }),\n }));\n this.middlewareStack.use(getHttpSigningPlugin(this.config));\n this.middlewareStack.use(getValidateBucketNamePlugin(this.config));\n this.middlewareStack.use(getAddExpectContinuePlugin(this.config));\n this.middlewareStack.use(getRegionRedirectMiddlewarePlugin(this.config));\n this.middlewareStack.use(getS3ExpressPlugin(this.config));\n this.middlewareStack.use(getS3ExpressHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { AbortMultipartUpload$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class AbortMultipartUploadCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"AbortMultipartUpload\", {})\n .n(\"S3Client\", \"AbortMultipartUploadCommand\")\n .sc(AbortMultipartUpload$)\n .build() {\n}\n", "export function ssecMiddleware(options) {\n return (next) => async (args) => {\n const input = { ...args.input };\n const properties = [\n {\n target: \"SSECustomerKey\",\n hash: \"SSECustomerKeyMD5\",\n },\n {\n target: \"CopySourceSSECustomerKey\",\n hash: \"CopySourceSSECustomerKeyMD5\",\n },\n ];\n for (const prop of properties) {\n const value = input[prop.target];\n if (value) {\n let valueForHash;\n if (typeof value === \"string\") {\n if (isValidBase64EncodedSSECustomerKey(value, options)) {\n valueForHash = options.base64Decoder(value);\n }\n else {\n valueForHash = options.utf8Decoder(value);\n input[prop.target] = options.base64Encoder(valueForHash);\n }\n }\n else {\n valueForHash = ArrayBuffer.isView(value)\n ? new Uint8Array(value.buffer, value.byteOffset, value.byteLength)\n : new Uint8Array(value);\n input[prop.target] = options.base64Encoder(valueForHash);\n }\n const hash = new options.md5();\n hash.update(valueForHash);\n input[prop.hash] = options.base64Encoder(await hash.digest());\n }\n }\n return next({\n ...args,\n input,\n });\n };\n}\nexport const ssecMiddlewareOptions = {\n name: \"ssecMiddleware\",\n step: \"initialize\",\n tags: [\"SSE\"],\n override: true,\n};\nexport const getSsecPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.add(ssecMiddleware(config), ssecMiddlewareOptions);\n },\n});\nexport function isValidBase64EncodedSSECustomerKey(str, options) {\n const base64Regex = /^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;\n if (!base64Regex.test(str))\n return false;\n try {\n const decodedBytes = options.base64Decoder(str);\n return decodedBytes.length === 32;\n }\n catch {\n return false;\n }\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CompleteMultipartUpload$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CompleteMultipartUploadCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"CompleteMultipartUpload\", {})\n .n(\"S3Client\", \"CompleteMultipartUploadCommand\")\n .sc(CompleteMultipartUpload$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CopyObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CopyObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n DisableS3ExpressSessionAuth: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n CopySource: { type: \"contextParams\", name: \"CopySource\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"CopyObject\", {})\n .n(\"S3Client\", \"CopyObjectCommand\")\n .sc(CopyObject$)\n .build() {\n}\n", "export function locationConstraintMiddleware(options) {\n return (next) => async (args) => {\n const { CreateBucketConfiguration } = args.input;\n const region = await options.region();\n if (!CreateBucketConfiguration?.LocationConstraint && !CreateBucketConfiguration?.Location) {\n if (region !== \"us-east-1\") {\n args.input.CreateBucketConfiguration = args.input.CreateBucketConfiguration ?? {};\n args.input.CreateBucketConfiguration.LocationConstraint = region;\n }\n }\n return next(args);\n };\n}\nexport const locationConstraintMiddlewareOptions = {\n step: \"initialize\",\n tags: [\"LOCATION_CONSTRAINT\", \"CREATE_BUCKET_CONFIGURATION\"],\n name: \"locationConstraintMiddleware\",\n override: true,\n};\nexport const getLocationConstraintPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.add(locationConstraintMiddleware(config), locationConstraintMiddlewareOptions);\n },\n});\n", "import { getLocationConstraintPlugin } from \"@aws-sdk/middleware-location-constraint\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CreateBucket$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CreateBucketCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n DisableAccessPoints: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getLocationConstraintPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"CreateBucket\", {})\n .n(\"S3Client\", \"CreateBucketCommand\")\n .sc(CreateBucket$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CreateBucketMetadataConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CreateBucketMetadataConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"CreateBucketMetadataConfiguration\", {})\n .n(\"S3Client\", \"CreateBucketMetadataConfigurationCommand\")\n .sc(CreateBucketMetadataConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CreateBucketMetadataTableConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CreateBucketMetadataTableConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"CreateBucketMetadataTableConfiguration\", {})\n .n(\"S3Client\", \"CreateBucketMetadataTableConfigurationCommand\")\n .sc(CreateBucketMetadataTableConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CreateMultipartUpload$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CreateMultipartUploadCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"CreateMultipartUpload\", {})\n .n(\"S3Client\", \"CreateMultipartUploadCommand\")\n .sc(CreateMultipartUpload$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketAnalyticsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketAnalyticsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketAnalyticsConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketAnalyticsConfigurationCommand\")\n .sc(DeleteBucketAnalyticsConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucket$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucket\", {})\n .n(\"S3Client\", \"DeleteBucketCommand\")\n .sc(DeleteBucket$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketCors$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketCorsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketCors\", {})\n .n(\"S3Client\", \"DeleteBucketCorsCommand\")\n .sc(DeleteBucketCors$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketEncryption$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketEncryptionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketEncryption\", {})\n .n(\"S3Client\", \"DeleteBucketEncryptionCommand\")\n .sc(DeleteBucketEncryption$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketIntelligentTieringConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketIntelligentTieringConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketIntelligentTieringConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketIntelligentTieringConfigurationCommand\")\n .sc(DeleteBucketIntelligentTieringConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketInventoryConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketInventoryConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketInventoryConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketInventoryConfigurationCommand\")\n .sc(DeleteBucketInventoryConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketLifecycle$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketLifecycleCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketLifecycle\", {})\n .n(\"S3Client\", \"DeleteBucketLifecycleCommand\")\n .sc(DeleteBucketLifecycle$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketMetadataConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketMetadataConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketMetadataConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketMetadataConfigurationCommand\")\n .sc(DeleteBucketMetadataConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketMetadataTableConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketMetadataTableConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketMetadataTableConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketMetadataTableConfigurationCommand\")\n .sc(DeleteBucketMetadataTableConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketMetricsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketMetricsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketMetricsConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketMetricsConfigurationCommand\")\n .sc(DeleteBucketMetricsConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketOwnershipControls$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketOwnershipControlsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketOwnershipControls\", {})\n .n(\"S3Client\", \"DeleteBucketOwnershipControlsCommand\")\n .sc(DeleteBucketOwnershipControls$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketPolicy$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketPolicyCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketPolicy\", {})\n .n(\"S3Client\", \"DeleteBucketPolicyCommand\")\n .sc(DeleteBucketPolicy$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketReplication$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketReplicationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketReplication\", {})\n .n(\"S3Client\", \"DeleteBucketReplicationCommand\")\n .sc(DeleteBucketReplication$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketTagging\", {})\n .n(\"S3Client\", \"DeleteBucketTaggingCommand\")\n .sc(DeleteBucketTagging$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketWebsite$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketWebsiteCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketWebsite\", {})\n .n(\"S3Client\", \"DeleteBucketWebsiteCommand\")\n .sc(DeleteBucketWebsite$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"DeleteObject\", {})\n .n(\"S3Client\", \"DeleteObjectCommand\")\n .sc(DeleteObject$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteObjects$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteObjectsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"DeleteObjects\", {})\n .n(\"S3Client\", \"DeleteObjectsCommand\")\n .sc(DeleteObjects$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteObjectTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteObjectTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"DeleteObjectTagging\", {})\n .n(\"S3Client\", \"DeleteObjectTaggingCommand\")\n .sc(DeleteObjectTagging$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeletePublicAccessBlock$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeletePublicAccessBlockCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeletePublicAccessBlock\", {})\n .n(\"S3Client\", \"DeletePublicAccessBlockCommand\")\n .sc(DeletePublicAccessBlock$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketAbac$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketAbacCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketAbac\", {})\n .n(\"S3Client\", \"GetBucketAbacCommand\")\n .sc(GetBucketAbac$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketAccelerateConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketAccelerateConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketAccelerateConfiguration\", {})\n .n(\"S3Client\", \"GetBucketAccelerateConfigurationCommand\")\n .sc(GetBucketAccelerateConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketAcl$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketAclCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketAcl\", {})\n .n(\"S3Client\", \"GetBucketAclCommand\")\n .sc(GetBucketAcl$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketAnalyticsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketAnalyticsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketAnalyticsConfiguration\", {})\n .n(\"S3Client\", \"GetBucketAnalyticsConfigurationCommand\")\n .sc(GetBucketAnalyticsConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketCors$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketCorsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketCors\", {})\n .n(\"S3Client\", \"GetBucketCorsCommand\")\n .sc(GetBucketCors$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketEncryption$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketEncryptionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketEncryption\", {})\n .n(\"S3Client\", \"GetBucketEncryptionCommand\")\n .sc(GetBucketEncryption$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketIntelligentTieringConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketIntelligentTieringConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketIntelligentTieringConfiguration\", {})\n .n(\"S3Client\", \"GetBucketIntelligentTieringConfigurationCommand\")\n .sc(GetBucketIntelligentTieringConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketInventoryConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketInventoryConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketInventoryConfiguration\", {})\n .n(\"S3Client\", \"GetBucketInventoryConfigurationCommand\")\n .sc(GetBucketInventoryConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketLifecycleConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketLifecycleConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketLifecycleConfiguration\", {})\n .n(\"S3Client\", \"GetBucketLifecycleConfigurationCommand\")\n .sc(GetBucketLifecycleConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketLocation$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketLocationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketLocation\", {})\n .n(\"S3Client\", \"GetBucketLocationCommand\")\n .sc(GetBucketLocation$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketLogging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketLoggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketLogging\", {})\n .n(\"S3Client\", \"GetBucketLoggingCommand\")\n .sc(GetBucketLogging$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketMetadataConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketMetadataConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketMetadataConfiguration\", {})\n .n(\"S3Client\", \"GetBucketMetadataConfigurationCommand\")\n .sc(GetBucketMetadataConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketMetadataTableConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketMetadataTableConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketMetadataTableConfiguration\", {})\n .n(\"S3Client\", \"GetBucketMetadataTableConfigurationCommand\")\n .sc(GetBucketMetadataTableConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketMetricsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketMetricsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketMetricsConfiguration\", {})\n .n(\"S3Client\", \"GetBucketMetricsConfigurationCommand\")\n .sc(GetBucketMetricsConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketNotificationConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketNotificationConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketNotificationConfiguration\", {})\n .n(\"S3Client\", \"GetBucketNotificationConfigurationCommand\")\n .sc(GetBucketNotificationConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketOwnershipControls$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketOwnershipControlsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketOwnershipControls\", {})\n .n(\"S3Client\", \"GetBucketOwnershipControlsCommand\")\n .sc(GetBucketOwnershipControls$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketPolicy$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketPolicyCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketPolicy\", {})\n .n(\"S3Client\", \"GetBucketPolicyCommand\")\n .sc(GetBucketPolicy$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketPolicyStatus$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketPolicyStatusCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketPolicyStatus\", {})\n .n(\"S3Client\", \"GetBucketPolicyStatusCommand\")\n .sc(GetBucketPolicyStatus$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketReplication$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketReplicationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketReplication\", {})\n .n(\"S3Client\", \"GetBucketReplicationCommand\")\n .sc(GetBucketReplication$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketRequestPayment$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketRequestPaymentCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketRequestPayment\", {})\n .n(\"S3Client\", \"GetBucketRequestPaymentCommand\")\n .sc(GetBucketRequestPayment$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketTagging\", {})\n .n(\"S3Client\", \"GetBucketTaggingCommand\")\n .sc(GetBucketTagging$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketVersioning$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketVersioningCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketVersioning\", {})\n .n(\"S3Client\", \"GetBucketVersioningCommand\")\n .sc(GetBucketVersioning$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketWebsite$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketWebsiteCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketWebsite\", {})\n .n(\"S3Client\", \"GetBucketWebsiteCommand\")\n .sc(GetBucketWebsite$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectAcl$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectAclCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectAcl\", {})\n .n(\"S3Client\", \"GetObjectAclCommand\")\n .sc(GetObjectAcl$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectAttributes$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectAttributesCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectAttributes\", {})\n .n(\"S3Client\", \"GetObjectAttributesCommand\")\n .sc(GetObjectAttributes$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getS3ExpiresMiddlewarePlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestChecksumRequired: false,\n requestValidationModeMember: 'ChecksumMode',\n 'responseAlgorithms': ['CRC64NVME', 'CRC32', 'CRC32C', 'SHA256', 'SHA1'],\n }),\n getSsecPlugin(config),\n getS3ExpiresMiddlewarePlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObject\", {})\n .n(\"S3Client\", \"GetObjectCommand\")\n .sc(GetObject$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectLegalHold$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectLegalHoldCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectLegalHold\", {})\n .n(\"S3Client\", \"GetObjectLegalHoldCommand\")\n .sc(GetObjectLegalHold$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectLockConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectLockConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectLockConfiguration\", {})\n .n(\"S3Client\", \"GetObjectLockConfigurationCommand\")\n .sc(GetObjectLockConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectRetention$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectRetentionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectRetention\", {})\n .n(\"S3Client\", \"GetObjectRetentionCommand\")\n .sc(GetObjectRetention$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectTagging\", {})\n .n(\"S3Client\", \"GetObjectTaggingCommand\")\n .sc(GetObjectTagging$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectTorrent$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectTorrentCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"GetObjectTorrent\", {})\n .n(\"S3Client\", \"GetObjectTorrentCommand\")\n .sc(GetObjectTorrent$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetPublicAccessBlock$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetPublicAccessBlockCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetPublicAccessBlock\", {})\n .n(\"S3Client\", \"GetPublicAccessBlockCommand\")\n .sc(GetPublicAccessBlock$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { HeadBucket$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class HeadBucketCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"HeadBucket\", {})\n .n(\"S3Client\", \"HeadBucketCommand\")\n .sc(HeadBucket$)\n .build() {\n}\n", "import { getS3ExpiresMiddlewarePlugin, getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { HeadObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class HeadObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n getS3ExpiresMiddlewarePlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"HeadObject\", {})\n .n(\"S3Client\", \"HeadObjectCommand\")\n .sc(HeadObject$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListBucketAnalyticsConfigurations$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListBucketAnalyticsConfigurationsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListBucketAnalyticsConfigurations\", {})\n .n(\"S3Client\", \"ListBucketAnalyticsConfigurationsCommand\")\n .sc(ListBucketAnalyticsConfigurations$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListBucketIntelligentTieringConfigurations$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListBucketIntelligentTieringConfigurationsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListBucketIntelligentTieringConfigurations\", {})\n .n(\"S3Client\", \"ListBucketIntelligentTieringConfigurationsCommand\")\n .sc(ListBucketIntelligentTieringConfigurations$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListBucketInventoryConfigurations$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListBucketInventoryConfigurationsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListBucketInventoryConfigurations\", {})\n .n(\"S3Client\", \"ListBucketInventoryConfigurationsCommand\")\n .sc(ListBucketInventoryConfigurations$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListBucketMetricsConfigurations$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListBucketMetricsConfigurationsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListBucketMetricsConfigurations\", {})\n .n(\"S3Client\", \"ListBucketMetricsConfigurationsCommand\")\n .sc(ListBucketMetricsConfigurations$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListBuckets$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListBucketsCommand extends $Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListBuckets\", {})\n .n(\"S3Client\", \"ListBucketsCommand\")\n .sc(ListBuckets$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListDirectoryBuckets$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListDirectoryBucketsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListDirectoryBuckets\", {})\n .n(\"S3Client\", \"ListDirectoryBucketsCommand\")\n .sc(ListDirectoryBuckets$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListMultipartUploads$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListMultipartUploadsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Prefix: { type: \"contextParams\", name: \"Prefix\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListMultipartUploads\", {})\n .n(\"S3Client\", \"ListMultipartUploadsCommand\")\n .sc(ListMultipartUploads$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListObjects$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListObjectsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Prefix: { type: \"contextParams\", name: \"Prefix\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListObjects\", {})\n .n(\"S3Client\", \"ListObjectsCommand\")\n .sc(ListObjects$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListObjectsV2$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListObjectsV2Command extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Prefix: { type: \"contextParams\", name: \"Prefix\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListObjectsV2\", {})\n .n(\"S3Client\", \"ListObjectsV2Command\")\n .sc(ListObjectsV2$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListObjectVersions$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListObjectVersionsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Prefix: { type: \"contextParams\", name: \"Prefix\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListObjectVersions\", {})\n .n(\"S3Client\", \"ListObjectVersionsCommand\")\n .sc(ListObjectVersions$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListParts$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListPartsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListParts\", {})\n .n(\"S3Client\", \"ListPartsCommand\")\n .sc(ListParts$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketAbac$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketAbacCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: false,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketAbac\", {})\n .n(\"S3Client\", \"PutBucketAbacCommand\")\n .sc(PutBucketAbac$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketAccelerateConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketAccelerateConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: false,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketAccelerateConfiguration\", {})\n .n(\"S3Client\", \"PutBucketAccelerateConfigurationCommand\")\n .sc(PutBucketAccelerateConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketAcl$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketAclCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketAcl\", {})\n .n(\"S3Client\", \"PutBucketAclCommand\")\n .sc(PutBucketAcl$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketAnalyticsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketAnalyticsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"PutBucketAnalyticsConfiguration\", {})\n .n(\"S3Client\", \"PutBucketAnalyticsConfigurationCommand\")\n .sc(PutBucketAnalyticsConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketCors$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketCorsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketCors\", {})\n .n(\"S3Client\", \"PutBucketCorsCommand\")\n .sc(PutBucketCors$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketEncryption$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketEncryptionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketEncryption\", {})\n .n(\"S3Client\", \"PutBucketEncryptionCommand\")\n .sc(PutBucketEncryption$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketIntelligentTieringConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketIntelligentTieringConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"PutBucketIntelligentTieringConfiguration\", {})\n .n(\"S3Client\", \"PutBucketIntelligentTieringConfigurationCommand\")\n .sc(PutBucketIntelligentTieringConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketInventoryConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketInventoryConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"PutBucketInventoryConfiguration\", {})\n .n(\"S3Client\", \"PutBucketInventoryConfigurationCommand\")\n .sc(PutBucketInventoryConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketLifecycleConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketLifecycleConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketLifecycleConfiguration\", {})\n .n(\"S3Client\", \"PutBucketLifecycleConfigurationCommand\")\n .sc(PutBucketLifecycleConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketLogging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketLoggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketLogging\", {})\n .n(\"S3Client\", \"PutBucketLoggingCommand\")\n .sc(PutBucketLogging$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketMetricsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketMetricsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"PutBucketMetricsConfiguration\", {})\n .n(\"S3Client\", \"PutBucketMetricsConfigurationCommand\")\n .sc(PutBucketMetricsConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketNotificationConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketNotificationConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"PutBucketNotificationConfiguration\", {})\n .n(\"S3Client\", \"PutBucketNotificationConfigurationCommand\")\n .sc(PutBucketNotificationConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketOwnershipControls$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketOwnershipControlsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketOwnershipControls\", {})\n .n(\"S3Client\", \"PutBucketOwnershipControlsCommand\")\n .sc(PutBucketOwnershipControls$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketPolicy$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketPolicyCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketPolicy\", {})\n .n(\"S3Client\", \"PutBucketPolicyCommand\")\n .sc(PutBucketPolicy$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketReplication$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketReplicationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketReplication\", {})\n .n(\"S3Client\", \"PutBucketReplicationCommand\")\n .sc(PutBucketReplication$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketRequestPayment$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketRequestPaymentCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketRequestPayment\", {})\n .n(\"S3Client\", \"PutBucketRequestPaymentCommand\")\n .sc(PutBucketRequestPayment$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketTagging\", {})\n .n(\"S3Client\", \"PutBucketTaggingCommand\")\n .sc(PutBucketTagging$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketVersioning$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketVersioningCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketVersioning\", {})\n .n(\"S3Client\", \"PutBucketVersioningCommand\")\n .sc(PutBucketVersioning$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketWebsite$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketWebsiteCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketWebsite\", {})\n .n(\"S3Client\", \"PutBucketWebsiteCommand\")\n .sc(PutBucketWebsite$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObjectAcl$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectAclCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObjectAcl\", {})\n .n(\"S3Client\", \"PutObjectAclCommand\")\n .sc(PutObjectAcl$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getCheckContentLengthHeaderPlugin, getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: false,\n }),\n getCheckContentLengthHeaderPlugin(config),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObject\", {})\n .n(\"S3Client\", \"PutObjectCommand\")\n .sc(PutObject$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObjectLegalHold$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectLegalHoldCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObjectLegalHold\", {})\n .n(\"S3Client\", \"PutObjectLegalHoldCommand\")\n .sc(PutObjectLegalHold$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObjectLockConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectLockConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObjectLockConfiguration\", {})\n .n(\"S3Client\", \"PutObjectLockConfigurationCommand\")\n .sc(PutObjectLockConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObjectRetention$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectRetentionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObjectRetention\", {})\n .n(\"S3Client\", \"PutObjectRetentionCommand\")\n .sc(PutObjectRetention$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObjectTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObjectTagging\", {})\n .n(\"S3Client\", \"PutObjectTaggingCommand\")\n .sc(PutObjectTagging$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutPublicAccessBlock$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutPublicAccessBlockCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutPublicAccessBlock\", {})\n .n(\"S3Client\", \"PutPublicAccessBlockCommand\")\n .sc(PutPublicAccessBlock$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { RenameObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class RenameObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"RenameObject\", {})\n .n(\"S3Client\", \"RenameObjectCommand\")\n .sc(RenameObject$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { RestoreObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class RestoreObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: false,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"RestoreObject\", {})\n .n(\"S3Client\", \"RestoreObjectCommand\")\n .sc(RestoreObject$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { SelectObjectContent$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class SelectObjectContentCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"SelectObjectContent\", {\n eventStream: {\n output: true,\n },\n})\n .n(\"S3Client\", \"SelectObjectContentCommand\")\n .sc(SelectObjectContent$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { UpdateBucketMetadataInventoryTableConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class UpdateBucketMetadataInventoryTableConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"UpdateBucketMetadataInventoryTableConfiguration\", {})\n .n(\"S3Client\", \"UpdateBucketMetadataInventoryTableConfigurationCommand\")\n .sc(UpdateBucketMetadataInventoryTableConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { UpdateBucketMetadataJournalTableConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class UpdateBucketMetadataJournalTableConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"UpdateBucketMetadataJournalTableConfiguration\", {})\n .n(\"S3Client\", \"UpdateBucketMetadataJournalTableConfigurationCommand\")\n .sc(UpdateBucketMetadataJournalTableConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { UpdateObjectEncryption$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class UpdateObjectEncryptionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"UpdateObjectEncryption\", {})\n .n(\"S3Client\", \"UpdateObjectEncryptionCommand\")\n .sc(UpdateObjectEncryption$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { UploadPart$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class UploadPartCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: false,\n }),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"UploadPart\", {})\n .n(\"S3Client\", \"UploadPartCommand\")\n .sc(UploadPart$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { UploadPartCopy$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class UploadPartCopyCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n DisableS3ExpressSessionAuth: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"UploadPartCopy\", {})\n .n(\"S3Client\", \"UploadPartCopyCommand\")\n .sc(UploadPartCopy$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { WriteGetObjectResponse$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class WriteGetObjectResponseCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseObjectLambdaEndpoint: { type: \"staticContextParams\", value: true },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"WriteGetObjectResponse\", {})\n .n(\"S3Client\", \"WriteGetObjectResponseCommand\")\n .sc(WriteGetObjectResponse$)\n .build() {\n}\n", "import { createPaginator } from \"@smithy/core\";\nimport { ListBucketsCommand } from \"../commands/ListBucketsCommand\";\nimport { S3Client } from \"../S3Client\";\nexport const paginateListBuckets = createPaginator(S3Client, ListBucketsCommand, \"ContinuationToken\", \"ContinuationToken\", \"MaxBuckets\");\n", "import { createPaginator } from \"@smithy/core\";\nimport { ListDirectoryBucketsCommand, } from \"../commands/ListDirectoryBucketsCommand\";\nimport { S3Client } from \"../S3Client\";\nexport const paginateListDirectoryBuckets = createPaginator(S3Client, ListDirectoryBucketsCommand, \"ContinuationToken\", \"ContinuationToken\", \"MaxDirectoryBuckets\");\n", "import { createPaginator } from \"@smithy/core\";\nimport { ListObjectsV2Command, } from \"../commands/ListObjectsV2Command\";\nimport { S3Client } from \"../S3Client\";\nexport const paginateListObjectsV2 = createPaginator(S3Client, ListObjectsV2Command, \"ContinuationToken\", \"NextContinuationToken\", \"MaxKeys\");\n", "import { createPaginator } from \"@smithy/core\";\nimport { ListPartsCommand } from \"../commands/ListPartsCommand\";\nimport { S3Client } from \"../S3Client\";\nexport const paginateListParts = createPaginator(S3Client, ListPartsCommand, \"PartNumberMarker\", \"NextPartNumberMarker\", \"MaxParts\");\n", "export const getCircularReplacer = () => {\n const seen = new WeakSet();\n return (key, value) => {\n if (typeof value === \"object\" && value !== null) {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n }\n return value;\n };\n};\n", "export const sleep = (seconds) => {\n return new Promise((resolve) => setTimeout(resolve, seconds * 1000));\n};\n", "import { getCircularReplacer } from \"./circularReplacer\";\nexport const waiterServiceDefaults = {\n minDelay: 2,\n maxDelay: 120,\n};\nexport var WaiterState;\n(function (WaiterState) {\n WaiterState[\"ABORTED\"] = \"ABORTED\";\n WaiterState[\"FAILURE\"] = \"FAILURE\";\n WaiterState[\"SUCCESS\"] = \"SUCCESS\";\n WaiterState[\"RETRY\"] = \"RETRY\";\n WaiterState[\"TIMEOUT\"] = \"TIMEOUT\";\n})(WaiterState || (WaiterState = {}));\nexport const checkExceptions = (result) => {\n if (result.state === WaiterState.ABORTED) {\n const abortError = new Error(`${JSON.stringify({\n ...result,\n reason: \"Request was aborted\",\n }, getCircularReplacer())}`);\n abortError.name = \"AbortError\";\n throw abortError;\n }\n else if (result.state === WaiterState.TIMEOUT) {\n const timeoutError = new Error(`${JSON.stringify({\n ...result,\n reason: \"Waiter has timed out\",\n }, getCircularReplacer())}`);\n timeoutError.name = \"TimeoutError\";\n throw timeoutError;\n }\n else if (result.state !== WaiterState.SUCCESS) {\n throw new Error(`${JSON.stringify(result, getCircularReplacer())}`);\n }\n return result;\n};\n", "import { getCircularReplacer } from \"./circularReplacer\";\nimport { sleep } from \"./utils/sleep\";\nimport { WaiterState } from \"./waiter\";\nconst exponentialBackoffWithJitter = (minDelay, maxDelay, attemptCeiling, attempt) => {\n if (attempt > attemptCeiling)\n return maxDelay;\n const delay = minDelay * 2 ** (attempt - 1);\n return randomInRange(minDelay, delay);\n};\nconst randomInRange = (min, max) => min + Math.random() * (max - min);\nexport const runPolling = async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => {\n const observedResponses = {};\n const { state, reason } = await acceptorChecks(client, input);\n if (reason) {\n const message = createMessageFromResponse(reason);\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n }\n if (state !== WaiterState.RETRY) {\n return { state, reason, observedResponses };\n }\n let currentAttempt = 1;\n const waitUntil = Date.now() + maxWaitTime * 1000;\n const attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1;\n while (true) {\n if (abortController?.signal?.aborted || abortSignal?.aborted) {\n const message = \"AbortController signal aborted.\";\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n return { state: WaiterState.ABORTED, observedResponses };\n }\n const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt);\n if (Date.now() + delay * 1000 > waitUntil) {\n return { state: WaiterState.TIMEOUT, observedResponses };\n }\n await sleep(delay);\n const { state, reason } = await acceptorChecks(client, input);\n if (reason) {\n const message = createMessageFromResponse(reason);\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n }\n if (state !== WaiterState.RETRY) {\n return { state, reason, observedResponses };\n }\n currentAttempt += 1;\n }\n};\nconst createMessageFromResponse = (reason) => {\n if (reason?.$responseBodyText) {\n return `Deserialization error for body: ${reason.$responseBodyText}`;\n }\n if (reason?.$metadata?.httpStatusCode) {\n if (reason.$response || reason.message) {\n return `${reason.$response?.statusCode ?? reason.$metadata.httpStatusCode ?? \"Unknown\"}: ${reason.message}`;\n }\n return `${reason.$metadata.httpStatusCode}: OK`;\n }\n return String(reason?.message ?? JSON.stringify(reason, getCircularReplacer()) ?? \"Unknown\");\n};\n", "export const validateWaiterOptions = (options) => {\n if (options.maxWaitTime <= 0) {\n throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`);\n }\n else if (options.minDelay <= 0) {\n throw new Error(`WaiterConfiguration.minDelay must be greater than 0`);\n }\n else if (options.maxDelay <= 0) {\n throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`);\n }\n else if (options.maxWaitTime <= options.minDelay) {\n throw new Error(`WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`);\n }\n else if (options.maxDelay < options.minDelay) {\n throw new Error(`WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`);\n }\n};\n", "export * from \"./sleep\";\nexport * from \"./validate\";\n", "import { runPolling } from \"./poller\";\nimport { validateWaiterOptions } from \"./utils\";\nimport { waiterServiceDefaults, WaiterState } from \"./waiter\";\nconst abortTimeout = (abortSignal) => {\n let onAbort;\n const promise = new Promise((resolve) => {\n onAbort = () => resolve({ state: WaiterState.ABORTED });\n if (typeof abortSignal.addEventListener === \"function\") {\n abortSignal.addEventListener(\"abort\", onAbort);\n }\n else {\n abortSignal.onabort = onAbort;\n }\n });\n return {\n clearListener() {\n if (typeof abortSignal.removeEventListener === \"function\") {\n abortSignal.removeEventListener(\"abort\", onAbort);\n }\n },\n aborted: promise,\n };\n};\nexport const createWaiter = async (options, input, acceptorChecks) => {\n const params = {\n ...waiterServiceDefaults,\n ...options,\n };\n validateWaiterOptions(params);\n const exitConditions = [runPolling(params, input, acceptorChecks)];\n const finalize = [];\n if (options.abortSignal) {\n const { aborted, clearListener } = abortTimeout(options.abortSignal);\n finalize.push(clearListener);\n exitConditions.push(aborted);\n }\n if (options.abortController?.signal) {\n const { aborted, clearListener } = abortTimeout(options.abortController.signal);\n finalize.push(clearListener);\n exitConditions.push(aborted);\n }\n return Promise.race(exitConditions).then((result) => {\n for (const fn of finalize) {\n fn();\n }\n return result;\n });\n};\n", "export * from \"./createWaiter\";\nexport * from \"./waiter\";\n", "import { checkExceptions, createWaiter, WaiterState } from \"@smithy/util-waiter\";\nimport { HeadBucketCommand } from \"../commands/HeadBucketCommand\";\nconst checkState = async (client, input) => {\n let reason;\n try {\n let result = await client.send(new HeadBucketCommand(input));\n reason = result;\n return { state: WaiterState.SUCCESS, reason };\n }\n catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"NotFound\") {\n return { state: WaiterState.RETRY, reason };\n }\n }\n return { state: WaiterState.RETRY, reason };\n};\nexport const waitForBucketExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n return createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n};\nexport const waitUntilBucketExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n return checkExceptions(result);\n};\n", "import { checkExceptions, createWaiter, WaiterState } from \"@smithy/util-waiter\";\nimport { HeadBucketCommand } from \"../commands/HeadBucketCommand\";\nconst checkState = async (client, input) => {\n let reason;\n try {\n let result = await client.send(new HeadBucketCommand(input));\n reason = result;\n }\n catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"NotFound\") {\n return { state: WaiterState.SUCCESS, reason };\n }\n }\n return { state: WaiterState.RETRY, reason };\n};\nexport const waitForBucketNotExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n return createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n};\nexport const waitUntilBucketNotExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n return checkExceptions(result);\n};\n", "import { checkExceptions, createWaiter, WaiterState } from \"@smithy/util-waiter\";\nimport { HeadObjectCommand } from \"../commands/HeadObjectCommand\";\nconst checkState = async (client, input) => {\n let reason;\n try {\n let result = await client.send(new HeadObjectCommand(input));\n reason = result;\n return { state: WaiterState.SUCCESS, reason };\n }\n catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"NotFound\") {\n return { state: WaiterState.RETRY, reason };\n }\n }\n return { state: WaiterState.RETRY, reason };\n};\nexport const waitForObjectExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n return createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n};\nexport const waitUntilObjectExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n return checkExceptions(result);\n};\n", "import { checkExceptions, createWaiter, WaiterState } from \"@smithy/util-waiter\";\nimport { HeadObjectCommand } from \"../commands/HeadObjectCommand\";\nconst checkState = async (client, input) => {\n let reason;\n try {\n let result = await client.send(new HeadObjectCommand(input));\n reason = result;\n }\n catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"NotFound\") {\n return { state: WaiterState.SUCCESS, reason };\n }\n }\n return { state: WaiterState.RETRY, reason };\n};\nexport const waitForObjectNotExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n return createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n};\nexport const waitUntilObjectNotExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n return checkExceptions(result);\n};\n", "import { createAggregatedClient } from \"@smithy/smithy-client\";\nimport { AbortMultipartUploadCommand, } from \"./commands/AbortMultipartUploadCommand\";\nimport { CompleteMultipartUploadCommand, } from \"./commands/CompleteMultipartUploadCommand\";\nimport { CopyObjectCommand } from \"./commands/CopyObjectCommand\";\nimport { CreateBucketCommand, } from \"./commands/CreateBucketCommand\";\nimport { CreateBucketMetadataConfigurationCommand, } from \"./commands/CreateBucketMetadataConfigurationCommand\";\nimport { CreateBucketMetadataTableConfigurationCommand, } from \"./commands/CreateBucketMetadataTableConfigurationCommand\";\nimport { CreateMultipartUploadCommand, } from \"./commands/CreateMultipartUploadCommand\";\nimport { CreateSessionCommand, } from \"./commands/CreateSessionCommand\";\nimport { DeleteBucketAnalyticsConfigurationCommand, } from \"./commands/DeleteBucketAnalyticsConfigurationCommand\";\nimport { DeleteBucketCommand, } from \"./commands/DeleteBucketCommand\";\nimport { DeleteBucketCorsCommand, } from \"./commands/DeleteBucketCorsCommand\";\nimport { DeleteBucketEncryptionCommand, } from \"./commands/DeleteBucketEncryptionCommand\";\nimport { DeleteBucketIntelligentTieringConfigurationCommand, } from \"./commands/DeleteBucketIntelligentTieringConfigurationCommand\";\nimport { DeleteBucketInventoryConfigurationCommand, } from \"./commands/DeleteBucketInventoryConfigurationCommand\";\nimport { DeleteBucketLifecycleCommand, } from \"./commands/DeleteBucketLifecycleCommand\";\nimport { DeleteBucketMetadataConfigurationCommand, } from \"./commands/DeleteBucketMetadataConfigurationCommand\";\nimport { DeleteBucketMetadataTableConfigurationCommand, } from \"./commands/DeleteBucketMetadataTableConfigurationCommand\";\nimport { DeleteBucketMetricsConfigurationCommand, } from \"./commands/DeleteBucketMetricsConfigurationCommand\";\nimport { DeleteBucketOwnershipControlsCommand, } from \"./commands/DeleteBucketOwnershipControlsCommand\";\nimport { DeleteBucketPolicyCommand, } from \"./commands/DeleteBucketPolicyCommand\";\nimport { DeleteBucketReplicationCommand, } from \"./commands/DeleteBucketReplicationCommand\";\nimport { DeleteBucketTaggingCommand, } from \"./commands/DeleteBucketTaggingCommand\";\nimport { DeleteBucketWebsiteCommand, } from \"./commands/DeleteBucketWebsiteCommand\";\nimport { DeleteObjectCommand, } from \"./commands/DeleteObjectCommand\";\nimport { DeleteObjectsCommand, } from \"./commands/DeleteObjectsCommand\";\nimport { DeleteObjectTaggingCommand, } from \"./commands/DeleteObjectTaggingCommand\";\nimport { DeletePublicAccessBlockCommand, } from \"./commands/DeletePublicAccessBlockCommand\";\nimport { GetBucketAbacCommand, } from \"./commands/GetBucketAbacCommand\";\nimport { GetBucketAccelerateConfigurationCommand, } from \"./commands/GetBucketAccelerateConfigurationCommand\";\nimport { GetBucketAclCommand, } from \"./commands/GetBucketAclCommand\";\nimport { GetBucketAnalyticsConfigurationCommand, } from \"./commands/GetBucketAnalyticsConfigurationCommand\";\nimport { GetBucketCorsCommand, } from \"./commands/GetBucketCorsCommand\";\nimport { GetBucketEncryptionCommand, } from \"./commands/GetBucketEncryptionCommand\";\nimport { GetBucketIntelligentTieringConfigurationCommand, } from \"./commands/GetBucketIntelligentTieringConfigurationCommand\";\nimport { GetBucketInventoryConfigurationCommand, } from \"./commands/GetBucketInventoryConfigurationCommand\";\nimport { GetBucketLifecycleConfigurationCommand, } from \"./commands/GetBucketLifecycleConfigurationCommand\";\nimport { GetBucketLocationCommand, } from \"./commands/GetBucketLocationCommand\";\nimport { GetBucketLoggingCommand, } from \"./commands/GetBucketLoggingCommand\";\nimport { GetBucketMetadataConfigurationCommand, } from \"./commands/GetBucketMetadataConfigurationCommand\";\nimport { GetBucketMetadataTableConfigurationCommand, } from \"./commands/GetBucketMetadataTableConfigurationCommand\";\nimport { GetBucketMetricsConfigurationCommand, } from \"./commands/GetBucketMetricsConfigurationCommand\";\nimport { GetBucketNotificationConfigurationCommand, } from \"./commands/GetBucketNotificationConfigurationCommand\";\nimport { GetBucketOwnershipControlsCommand, } from \"./commands/GetBucketOwnershipControlsCommand\";\nimport { GetBucketPolicyCommand, } from \"./commands/GetBucketPolicyCommand\";\nimport { GetBucketPolicyStatusCommand, } from \"./commands/GetBucketPolicyStatusCommand\";\nimport { GetBucketReplicationCommand, } from \"./commands/GetBucketReplicationCommand\";\nimport { GetBucketRequestPaymentCommand, } from \"./commands/GetBucketRequestPaymentCommand\";\nimport { GetBucketTaggingCommand, } from \"./commands/GetBucketTaggingCommand\";\nimport { GetBucketVersioningCommand, } from \"./commands/GetBucketVersioningCommand\";\nimport { GetBucketWebsiteCommand, } from \"./commands/GetBucketWebsiteCommand\";\nimport { GetObjectAclCommand, } from \"./commands/GetObjectAclCommand\";\nimport { GetObjectAttributesCommand, } from \"./commands/GetObjectAttributesCommand\";\nimport { GetObjectCommand } from \"./commands/GetObjectCommand\";\nimport { GetObjectLegalHoldCommand, } from \"./commands/GetObjectLegalHoldCommand\";\nimport { GetObjectLockConfigurationCommand, } from \"./commands/GetObjectLockConfigurationCommand\";\nimport { GetObjectRetentionCommand, } from \"./commands/GetObjectRetentionCommand\";\nimport { GetObjectTaggingCommand, } from \"./commands/GetObjectTaggingCommand\";\nimport { GetObjectTorrentCommand, } from \"./commands/GetObjectTorrentCommand\";\nimport { GetPublicAccessBlockCommand, } from \"./commands/GetPublicAccessBlockCommand\";\nimport { HeadBucketCommand } from \"./commands/HeadBucketCommand\";\nimport { HeadObjectCommand } from \"./commands/HeadObjectCommand\";\nimport { ListBucketAnalyticsConfigurationsCommand, } from \"./commands/ListBucketAnalyticsConfigurationsCommand\";\nimport { ListBucketIntelligentTieringConfigurationsCommand, } from \"./commands/ListBucketIntelligentTieringConfigurationsCommand\";\nimport { ListBucketInventoryConfigurationsCommand, } from \"./commands/ListBucketInventoryConfigurationsCommand\";\nimport { ListBucketMetricsConfigurationsCommand, } from \"./commands/ListBucketMetricsConfigurationsCommand\";\nimport { ListBucketsCommand } from \"./commands/ListBucketsCommand\";\nimport { ListDirectoryBucketsCommand, } from \"./commands/ListDirectoryBucketsCommand\";\nimport { ListMultipartUploadsCommand, } from \"./commands/ListMultipartUploadsCommand\";\nimport { ListObjectsCommand } from \"./commands/ListObjectsCommand\";\nimport { ListObjectsV2Command, } from \"./commands/ListObjectsV2Command\";\nimport { ListObjectVersionsCommand, } from \"./commands/ListObjectVersionsCommand\";\nimport { ListPartsCommand } from \"./commands/ListPartsCommand\";\nimport { PutBucketAbacCommand, } from \"./commands/PutBucketAbacCommand\";\nimport { PutBucketAccelerateConfigurationCommand, } from \"./commands/PutBucketAccelerateConfigurationCommand\";\nimport { PutBucketAclCommand, } from \"./commands/PutBucketAclCommand\";\nimport { PutBucketAnalyticsConfigurationCommand, } from \"./commands/PutBucketAnalyticsConfigurationCommand\";\nimport { PutBucketCorsCommand, } from \"./commands/PutBucketCorsCommand\";\nimport { PutBucketEncryptionCommand, } from \"./commands/PutBucketEncryptionCommand\";\nimport { PutBucketIntelligentTieringConfigurationCommand, } from \"./commands/PutBucketIntelligentTieringConfigurationCommand\";\nimport { PutBucketInventoryConfigurationCommand, } from \"./commands/PutBucketInventoryConfigurationCommand\";\nimport { PutBucketLifecycleConfigurationCommand, } from \"./commands/PutBucketLifecycleConfigurationCommand\";\nimport { PutBucketLoggingCommand, } from \"./commands/PutBucketLoggingCommand\";\nimport { PutBucketMetricsConfigurationCommand, } from \"./commands/PutBucketMetricsConfigurationCommand\";\nimport { PutBucketNotificationConfigurationCommand, } from \"./commands/PutBucketNotificationConfigurationCommand\";\nimport { PutBucketOwnershipControlsCommand, } from \"./commands/PutBucketOwnershipControlsCommand\";\nimport { PutBucketPolicyCommand, } from \"./commands/PutBucketPolicyCommand\";\nimport { PutBucketReplicationCommand, } from \"./commands/PutBucketReplicationCommand\";\nimport { PutBucketRequestPaymentCommand, } from \"./commands/PutBucketRequestPaymentCommand\";\nimport { PutBucketTaggingCommand, } from \"./commands/PutBucketTaggingCommand\";\nimport { PutBucketVersioningCommand, } from \"./commands/PutBucketVersioningCommand\";\nimport { PutBucketWebsiteCommand, } from \"./commands/PutBucketWebsiteCommand\";\nimport { PutObjectAclCommand, } from \"./commands/PutObjectAclCommand\";\nimport { PutObjectCommand } from \"./commands/PutObjectCommand\";\nimport { PutObjectLegalHoldCommand, } from \"./commands/PutObjectLegalHoldCommand\";\nimport { PutObjectLockConfigurationCommand, } from \"./commands/PutObjectLockConfigurationCommand\";\nimport { PutObjectRetentionCommand, } from \"./commands/PutObjectRetentionCommand\";\nimport { PutObjectTaggingCommand, } from \"./commands/PutObjectTaggingCommand\";\nimport { PutPublicAccessBlockCommand, } from \"./commands/PutPublicAccessBlockCommand\";\nimport { RenameObjectCommand, } from \"./commands/RenameObjectCommand\";\nimport { RestoreObjectCommand, } from \"./commands/RestoreObjectCommand\";\nimport { SelectObjectContentCommand, } from \"./commands/SelectObjectContentCommand\";\nimport { UpdateBucketMetadataInventoryTableConfigurationCommand, } from \"./commands/UpdateBucketMetadataInventoryTableConfigurationCommand\";\nimport { UpdateBucketMetadataJournalTableConfigurationCommand, } from \"./commands/UpdateBucketMetadataJournalTableConfigurationCommand\";\nimport { UpdateObjectEncryptionCommand, } from \"./commands/UpdateObjectEncryptionCommand\";\nimport { UploadPartCommand } from \"./commands/UploadPartCommand\";\nimport { UploadPartCopyCommand, } from \"./commands/UploadPartCopyCommand\";\nimport { WriteGetObjectResponseCommand, } from \"./commands/WriteGetObjectResponseCommand\";\nimport { paginateListBuckets } from \"./pagination/ListBucketsPaginator\";\nimport { paginateListDirectoryBuckets } from \"./pagination/ListDirectoryBucketsPaginator\";\nimport { paginateListObjectsV2 } from \"./pagination/ListObjectsV2Paginator\";\nimport { paginateListParts } from \"./pagination/ListPartsPaginator\";\nimport { S3Client } from \"./S3Client\";\nimport { waitUntilBucketExists } from \"./waiters/waitForBucketExists\";\nimport { waitUntilBucketNotExists } from \"./waiters/waitForBucketNotExists\";\nimport { waitUntilObjectExists } from \"./waiters/waitForObjectExists\";\nimport { waitUntilObjectNotExists } from \"./waiters/waitForObjectNotExists\";\nconst commands = {\n AbortMultipartUploadCommand,\n CompleteMultipartUploadCommand,\n CopyObjectCommand,\n CreateBucketCommand,\n CreateBucketMetadataConfigurationCommand,\n CreateBucketMetadataTableConfigurationCommand,\n CreateMultipartUploadCommand,\n CreateSessionCommand,\n DeleteBucketCommand,\n DeleteBucketAnalyticsConfigurationCommand,\n DeleteBucketCorsCommand,\n DeleteBucketEncryptionCommand,\n DeleteBucketIntelligentTieringConfigurationCommand,\n DeleteBucketInventoryConfigurationCommand,\n DeleteBucketLifecycleCommand,\n DeleteBucketMetadataConfigurationCommand,\n DeleteBucketMetadataTableConfigurationCommand,\n DeleteBucketMetricsConfigurationCommand,\n DeleteBucketOwnershipControlsCommand,\n DeleteBucketPolicyCommand,\n DeleteBucketReplicationCommand,\n DeleteBucketTaggingCommand,\n DeleteBucketWebsiteCommand,\n DeleteObjectCommand,\n DeleteObjectsCommand,\n DeleteObjectTaggingCommand,\n DeletePublicAccessBlockCommand,\n GetBucketAbacCommand,\n GetBucketAccelerateConfigurationCommand,\n GetBucketAclCommand,\n GetBucketAnalyticsConfigurationCommand,\n GetBucketCorsCommand,\n GetBucketEncryptionCommand,\n GetBucketIntelligentTieringConfigurationCommand,\n GetBucketInventoryConfigurationCommand,\n GetBucketLifecycleConfigurationCommand,\n GetBucketLocationCommand,\n GetBucketLoggingCommand,\n GetBucketMetadataConfigurationCommand,\n GetBucketMetadataTableConfigurationCommand,\n GetBucketMetricsConfigurationCommand,\n GetBucketNotificationConfigurationCommand,\n GetBucketOwnershipControlsCommand,\n GetBucketPolicyCommand,\n GetBucketPolicyStatusCommand,\n GetBucketReplicationCommand,\n GetBucketRequestPaymentCommand,\n GetBucketTaggingCommand,\n GetBucketVersioningCommand,\n GetBucketWebsiteCommand,\n GetObjectCommand,\n GetObjectAclCommand,\n GetObjectAttributesCommand,\n GetObjectLegalHoldCommand,\n GetObjectLockConfigurationCommand,\n GetObjectRetentionCommand,\n GetObjectTaggingCommand,\n GetObjectTorrentCommand,\n GetPublicAccessBlockCommand,\n HeadBucketCommand,\n HeadObjectCommand,\n ListBucketAnalyticsConfigurationsCommand,\n ListBucketIntelligentTieringConfigurationsCommand,\n ListBucketInventoryConfigurationsCommand,\n ListBucketMetricsConfigurationsCommand,\n ListBucketsCommand,\n ListDirectoryBucketsCommand,\n ListMultipartUploadsCommand,\n ListObjectsCommand,\n ListObjectsV2Command,\n ListObjectVersionsCommand,\n ListPartsCommand,\n PutBucketAbacCommand,\n PutBucketAccelerateConfigurationCommand,\n PutBucketAclCommand,\n PutBucketAnalyticsConfigurationCommand,\n PutBucketCorsCommand,\n PutBucketEncryptionCommand,\n PutBucketIntelligentTieringConfigurationCommand,\n PutBucketInventoryConfigurationCommand,\n PutBucketLifecycleConfigurationCommand,\n PutBucketLoggingCommand,\n PutBucketMetricsConfigurationCommand,\n PutBucketNotificationConfigurationCommand,\n PutBucketOwnershipControlsCommand,\n PutBucketPolicyCommand,\n PutBucketReplicationCommand,\n PutBucketRequestPaymentCommand,\n PutBucketTaggingCommand,\n PutBucketVersioningCommand,\n PutBucketWebsiteCommand,\n PutObjectCommand,\n PutObjectAclCommand,\n PutObjectLegalHoldCommand,\n PutObjectLockConfigurationCommand,\n PutObjectRetentionCommand,\n PutObjectTaggingCommand,\n PutPublicAccessBlockCommand,\n RenameObjectCommand,\n RestoreObjectCommand,\n SelectObjectContentCommand,\n UpdateBucketMetadataInventoryTableConfigurationCommand,\n UpdateBucketMetadataJournalTableConfigurationCommand,\n UpdateObjectEncryptionCommand,\n UploadPartCommand,\n UploadPartCopyCommand,\n WriteGetObjectResponseCommand,\n};\nconst paginators = {\n paginateListBuckets,\n paginateListDirectoryBuckets,\n paginateListObjectsV2,\n paginateListParts,\n};\nconst waiters = {\n waitUntilBucketExists,\n waitUntilBucketNotExists,\n waitUntilObjectExists,\n waitUntilObjectNotExists,\n};\nexport class S3 extends S3Client {\n}\ncreateAggregatedClient(commands, S3, { paginators, waiters });\n", "export * from \"./AbortMultipartUploadCommand\";\nexport * from \"./CompleteMultipartUploadCommand\";\nexport * from \"./CopyObjectCommand\";\nexport * from \"./CreateBucketCommand\";\nexport * from \"./CreateBucketMetadataConfigurationCommand\";\nexport * from \"./CreateBucketMetadataTableConfigurationCommand\";\nexport * from \"./CreateMultipartUploadCommand\";\nexport * from \"./CreateSessionCommand\";\nexport * from \"./DeleteBucketAnalyticsConfigurationCommand\";\nexport * from \"./DeleteBucketCommand\";\nexport * from \"./DeleteBucketCorsCommand\";\nexport * from \"./DeleteBucketEncryptionCommand\";\nexport * from \"./DeleteBucketIntelligentTieringConfigurationCommand\";\nexport * from \"./DeleteBucketInventoryConfigurationCommand\";\nexport * from \"./DeleteBucketLifecycleCommand\";\nexport * from \"./DeleteBucketMetadataConfigurationCommand\";\nexport * from \"./DeleteBucketMetadataTableConfigurationCommand\";\nexport * from \"./DeleteBucketMetricsConfigurationCommand\";\nexport * from \"./DeleteBucketOwnershipControlsCommand\";\nexport * from \"./DeleteBucketPolicyCommand\";\nexport * from \"./DeleteBucketReplicationCommand\";\nexport * from \"./DeleteBucketTaggingCommand\";\nexport * from \"./DeleteBucketWebsiteCommand\";\nexport * from \"./DeleteObjectCommand\";\nexport * from \"./DeleteObjectTaggingCommand\";\nexport * from \"./DeleteObjectsCommand\";\nexport * from \"./DeletePublicAccessBlockCommand\";\nexport * from \"./GetBucketAbacCommand\";\nexport * from \"./GetBucketAccelerateConfigurationCommand\";\nexport * from \"./GetBucketAclCommand\";\nexport * from \"./GetBucketAnalyticsConfigurationCommand\";\nexport * from \"./GetBucketCorsCommand\";\nexport * from \"./GetBucketEncryptionCommand\";\nexport * from \"./GetBucketIntelligentTieringConfigurationCommand\";\nexport * from \"./GetBucketInventoryConfigurationCommand\";\nexport * from \"./GetBucketLifecycleConfigurationCommand\";\nexport * from \"./GetBucketLocationCommand\";\nexport * from \"./GetBucketLoggingCommand\";\nexport * from \"./GetBucketMetadataConfigurationCommand\";\nexport * from \"./GetBucketMetadataTableConfigurationCommand\";\nexport * from \"./GetBucketMetricsConfigurationCommand\";\nexport * from \"./GetBucketNotificationConfigurationCommand\";\nexport * from \"./GetBucketOwnershipControlsCommand\";\nexport * from \"./GetBucketPolicyCommand\";\nexport * from \"./GetBucketPolicyStatusCommand\";\nexport * from \"./GetBucketReplicationCommand\";\nexport * from \"./GetBucketRequestPaymentCommand\";\nexport * from \"./GetBucketTaggingCommand\";\nexport * from \"./GetBucketVersioningCommand\";\nexport * from \"./GetBucketWebsiteCommand\";\nexport * from \"./GetObjectAclCommand\";\nexport * from \"./GetObjectAttributesCommand\";\nexport * from \"./GetObjectCommand\";\nexport * from \"./GetObjectLegalHoldCommand\";\nexport * from \"./GetObjectLockConfigurationCommand\";\nexport * from \"./GetObjectRetentionCommand\";\nexport * from \"./GetObjectTaggingCommand\";\nexport * from \"./GetObjectTorrentCommand\";\nexport * from \"./GetPublicAccessBlockCommand\";\nexport * from \"./HeadBucketCommand\";\nexport * from \"./HeadObjectCommand\";\nexport * from \"./ListBucketAnalyticsConfigurationsCommand\";\nexport * from \"./ListBucketIntelligentTieringConfigurationsCommand\";\nexport * from \"./ListBucketInventoryConfigurationsCommand\";\nexport * from \"./ListBucketMetricsConfigurationsCommand\";\nexport * from \"./ListBucketsCommand\";\nexport * from \"./ListDirectoryBucketsCommand\";\nexport * from \"./ListMultipartUploadsCommand\";\nexport * from \"./ListObjectVersionsCommand\";\nexport * from \"./ListObjectsCommand\";\nexport * from \"./ListObjectsV2Command\";\nexport * from \"./ListPartsCommand\";\nexport * from \"./PutBucketAbacCommand\";\nexport * from \"./PutBucketAccelerateConfigurationCommand\";\nexport * from \"./PutBucketAclCommand\";\nexport * from \"./PutBucketAnalyticsConfigurationCommand\";\nexport * from \"./PutBucketCorsCommand\";\nexport * from \"./PutBucketEncryptionCommand\";\nexport * from \"./PutBucketIntelligentTieringConfigurationCommand\";\nexport * from \"./PutBucketInventoryConfigurationCommand\";\nexport * from \"./PutBucketLifecycleConfigurationCommand\";\nexport * from \"./PutBucketLoggingCommand\";\nexport * from \"./PutBucketMetricsConfigurationCommand\";\nexport * from \"./PutBucketNotificationConfigurationCommand\";\nexport * from \"./PutBucketOwnershipControlsCommand\";\nexport * from \"./PutBucketPolicyCommand\";\nexport * from \"./PutBucketReplicationCommand\";\nexport * from \"./PutBucketRequestPaymentCommand\";\nexport * from \"./PutBucketTaggingCommand\";\nexport * from \"./PutBucketVersioningCommand\";\nexport * from \"./PutBucketWebsiteCommand\";\nexport * from \"./PutObjectAclCommand\";\nexport * from \"./PutObjectCommand\";\nexport * from \"./PutObjectLegalHoldCommand\";\nexport * from \"./PutObjectLockConfigurationCommand\";\nexport * from \"./PutObjectRetentionCommand\";\nexport * from \"./PutObjectTaggingCommand\";\nexport * from \"./PutPublicAccessBlockCommand\";\nexport * from \"./RenameObjectCommand\";\nexport * from \"./RestoreObjectCommand\";\nexport * from \"./SelectObjectContentCommand\";\nexport * from \"./UpdateBucketMetadataInventoryTableConfigurationCommand\";\nexport * from \"./UpdateBucketMetadataJournalTableConfigurationCommand\";\nexport * from \"./UpdateObjectEncryptionCommand\";\nexport * from \"./UploadPartCommand\";\nexport * from \"./UploadPartCopyCommand\";\nexport * from \"./WriteGetObjectResponseCommand\";\n", "export {};\n", "export * from \"./Interfaces\";\nexport * from \"./ListBucketsPaginator\";\nexport * from \"./ListDirectoryBucketsPaginator\";\nexport * from \"./ListObjectsV2Paginator\";\nexport * from \"./ListPartsPaginator\";\n", "export * from \"./waitForBucketExists\";\nexport * from \"./waitForBucketNotExists\";\nexport * from \"./waitForObjectExists\";\nexport * from \"./waitForObjectNotExists\";\n", "export const BucketAbacStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const RequestCharged = {\n requester: \"requester\",\n};\nexport const RequestPayer = {\n requester: \"requester\",\n};\nexport const BucketAccelerateStatus = {\n Enabled: \"Enabled\",\n Suspended: \"Suspended\",\n};\nexport const Type = {\n AmazonCustomerByEmail: \"AmazonCustomerByEmail\",\n CanonicalUser: \"CanonicalUser\",\n Group: \"Group\",\n};\nexport const Permission = {\n FULL_CONTROL: \"FULL_CONTROL\",\n READ: \"READ\",\n READ_ACP: \"READ_ACP\",\n WRITE: \"WRITE\",\n WRITE_ACP: \"WRITE_ACP\",\n};\nexport const OwnerOverride = {\n Destination: \"Destination\",\n};\nexport const ChecksumType = {\n COMPOSITE: \"COMPOSITE\",\n FULL_OBJECT: \"FULL_OBJECT\",\n};\nexport const ServerSideEncryption = {\n AES256: \"AES256\",\n aws_fsx: \"aws:fsx\",\n aws_kms: \"aws:kms\",\n aws_kms_dsse: \"aws:kms:dsse\",\n};\nexport const ObjectCannedACL = {\n authenticated_read: \"authenticated-read\",\n aws_exec_read: \"aws-exec-read\",\n bucket_owner_full_control: \"bucket-owner-full-control\",\n bucket_owner_read: \"bucket-owner-read\",\n private: \"private\",\n public_read: \"public-read\",\n public_read_write: \"public-read-write\",\n};\nexport const ChecksumAlgorithm = {\n CRC32: \"CRC32\",\n CRC32C: \"CRC32C\",\n CRC64NVME: \"CRC64NVME\",\n SHA1: \"SHA1\",\n SHA256: \"SHA256\",\n};\nexport const MetadataDirective = {\n COPY: \"COPY\",\n REPLACE: \"REPLACE\",\n};\nexport const ObjectLockLegalHoldStatus = {\n OFF: \"OFF\",\n ON: \"ON\",\n};\nexport const ObjectLockMode = {\n COMPLIANCE: \"COMPLIANCE\",\n GOVERNANCE: \"GOVERNANCE\",\n};\nexport const StorageClass = {\n DEEP_ARCHIVE: \"DEEP_ARCHIVE\",\n EXPRESS_ONEZONE: \"EXPRESS_ONEZONE\",\n FSX_ONTAP: \"FSX_ONTAP\",\n FSX_OPENZFS: \"FSX_OPENZFS\",\n GLACIER: \"GLACIER\",\n GLACIER_IR: \"GLACIER_IR\",\n INTELLIGENT_TIERING: \"INTELLIGENT_TIERING\",\n ONEZONE_IA: \"ONEZONE_IA\",\n OUTPOSTS: \"OUTPOSTS\",\n REDUCED_REDUNDANCY: \"REDUCED_REDUNDANCY\",\n SNOW: \"SNOW\",\n STANDARD: \"STANDARD\",\n STANDARD_IA: \"STANDARD_IA\",\n};\nexport const TaggingDirective = {\n COPY: \"COPY\",\n REPLACE: \"REPLACE\",\n};\nexport const BucketCannedACL = {\n authenticated_read: \"authenticated-read\",\n private: \"private\",\n public_read: \"public-read\",\n public_read_write: \"public-read-write\",\n};\nexport const BucketNamespace = {\n ACCOUNT_REGIONAL: \"account-regional\",\n GLOBAL: \"global\",\n};\nexport const DataRedundancy = {\n SingleAvailabilityZone: \"SingleAvailabilityZone\",\n SingleLocalZone: \"SingleLocalZone\",\n};\nexport const BucketType = {\n Directory: \"Directory\",\n};\nexport const LocationType = {\n AvailabilityZone: \"AvailabilityZone\",\n LocalZone: \"LocalZone\",\n};\nexport const BucketLocationConstraint = {\n EU: \"EU\",\n af_south_1: \"af-south-1\",\n ap_east_1: \"ap-east-1\",\n ap_northeast_1: \"ap-northeast-1\",\n ap_northeast_2: \"ap-northeast-2\",\n ap_northeast_3: \"ap-northeast-3\",\n ap_south_1: \"ap-south-1\",\n ap_south_2: \"ap-south-2\",\n ap_southeast_1: \"ap-southeast-1\",\n ap_southeast_2: \"ap-southeast-2\",\n ap_southeast_3: \"ap-southeast-3\",\n ap_southeast_4: \"ap-southeast-4\",\n ap_southeast_5: \"ap-southeast-5\",\n ca_central_1: \"ca-central-1\",\n cn_north_1: \"cn-north-1\",\n cn_northwest_1: \"cn-northwest-1\",\n eu_central_1: \"eu-central-1\",\n eu_central_2: \"eu-central-2\",\n eu_north_1: \"eu-north-1\",\n eu_south_1: \"eu-south-1\",\n eu_south_2: \"eu-south-2\",\n eu_west_1: \"eu-west-1\",\n eu_west_2: \"eu-west-2\",\n eu_west_3: \"eu-west-3\",\n il_central_1: \"il-central-1\",\n me_central_1: \"me-central-1\",\n me_south_1: \"me-south-1\",\n sa_east_1: \"sa-east-1\",\n us_east_2: \"us-east-2\",\n us_gov_east_1: \"us-gov-east-1\",\n us_gov_west_1: \"us-gov-west-1\",\n us_west_1: \"us-west-1\",\n us_west_2: \"us-west-2\",\n};\nexport const ObjectOwnership = {\n BucketOwnerEnforced: \"BucketOwnerEnforced\",\n BucketOwnerPreferred: \"BucketOwnerPreferred\",\n ObjectWriter: \"ObjectWriter\",\n};\nexport const InventoryConfigurationState = {\n DISABLED: \"DISABLED\",\n ENABLED: \"ENABLED\",\n};\nexport const TableSseAlgorithm = {\n AES256: \"AES256\",\n aws_kms: \"aws:kms\",\n};\nexport const ExpirationState = {\n DISABLED: \"DISABLED\",\n ENABLED: \"ENABLED\",\n};\nexport const SessionMode = {\n ReadOnly: \"ReadOnly\",\n ReadWrite: \"ReadWrite\",\n};\nexport const AnalyticsS3ExportFileFormat = {\n CSV: \"CSV\",\n};\nexport const StorageClassAnalysisSchemaVersion = {\n V_1: \"V_1\",\n};\nexport const EncryptionType = {\n NONE: \"NONE\",\n SSE_C: \"SSE-C\",\n};\nexport const IntelligentTieringStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const IntelligentTieringAccessTier = {\n ARCHIVE_ACCESS: \"ARCHIVE_ACCESS\",\n DEEP_ARCHIVE_ACCESS: \"DEEP_ARCHIVE_ACCESS\",\n};\nexport const InventoryFormat = {\n CSV: \"CSV\",\n ORC: \"ORC\",\n Parquet: \"Parquet\",\n};\nexport const InventoryIncludedObjectVersions = {\n All: \"All\",\n Current: \"Current\",\n};\nexport const InventoryOptionalField = {\n BucketKeyStatus: \"BucketKeyStatus\",\n ChecksumAlgorithm: \"ChecksumAlgorithm\",\n ETag: \"ETag\",\n EncryptionStatus: \"EncryptionStatus\",\n IntelligentTieringAccessTier: \"IntelligentTieringAccessTier\",\n IsMultipartUploaded: \"IsMultipartUploaded\",\n LastModifiedDate: \"LastModifiedDate\",\n LifecycleExpirationDate: \"LifecycleExpirationDate\",\n ObjectAccessControlList: \"ObjectAccessControlList\",\n ObjectLockLegalHoldStatus: \"ObjectLockLegalHoldStatus\",\n ObjectLockMode: \"ObjectLockMode\",\n ObjectLockRetainUntilDate: \"ObjectLockRetainUntilDate\",\n ObjectOwner: \"ObjectOwner\",\n ReplicationStatus: \"ReplicationStatus\",\n Size: \"Size\",\n StorageClass: \"StorageClass\",\n};\nexport const InventoryFrequency = {\n Daily: \"Daily\",\n Weekly: \"Weekly\",\n};\nexport const TransitionStorageClass = {\n DEEP_ARCHIVE: \"DEEP_ARCHIVE\",\n GLACIER: \"GLACIER\",\n GLACIER_IR: \"GLACIER_IR\",\n INTELLIGENT_TIERING: \"INTELLIGENT_TIERING\",\n ONEZONE_IA: \"ONEZONE_IA\",\n STANDARD_IA: \"STANDARD_IA\",\n};\nexport const ExpirationStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const TransitionDefaultMinimumObjectSize = {\n all_storage_classes_128K: \"all_storage_classes_128K\",\n varies_by_storage_class: \"varies_by_storage_class\",\n};\nexport const BucketLogsPermission = {\n FULL_CONTROL: \"FULL_CONTROL\",\n READ: \"READ\",\n WRITE: \"WRITE\",\n};\nexport const PartitionDateSource = {\n DeliveryTime: \"DeliveryTime\",\n EventTime: \"EventTime\",\n};\nexport const S3TablesBucketType = {\n aws: \"aws\",\n customer: \"customer\",\n};\nexport const Event = {\n s3_IntelligentTiering: \"s3:IntelligentTiering\",\n s3_LifecycleExpiration_: \"s3:LifecycleExpiration:*\",\n s3_LifecycleExpiration_Delete: \"s3:LifecycleExpiration:Delete\",\n s3_LifecycleExpiration_DeleteMarkerCreated: \"s3:LifecycleExpiration:DeleteMarkerCreated\",\n s3_LifecycleTransition: \"s3:LifecycleTransition\",\n s3_ObjectAcl_Put: \"s3:ObjectAcl:Put\",\n s3_ObjectCreated_: \"s3:ObjectCreated:*\",\n s3_ObjectCreated_CompleteMultipartUpload: \"s3:ObjectCreated:CompleteMultipartUpload\",\n s3_ObjectCreated_Copy: \"s3:ObjectCreated:Copy\",\n s3_ObjectCreated_Post: \"s3:ObjectCreated:Post\",\n s3_ObjectCreated_Put: \"s3:ObjectCreated:Put\",\n s3_ObjectRemoved_: \"s3:ObjectRemoved:*\",\n s3_ObjectRemoved_Delete: \"s3:ObjectRemoved:Delete\",\n s3_ObjectRemoved_DeleteMarkerCreated: \"s3:ObjectRemoved:DeleteMarkerCreated\",\n s3_ObjectRestore_: \"s3:ObjectRestore:*\",\n s3_ObjectRestore_Completed: \"s3:ObjectRestore:Completed\",\n s3_ObjectRestore_Delete: \"s3:ObjectRestore:Delete\",\n s3_ObjectRestore_Post: \"s3:ObjectRestore:Post\",\n s3_ObjectTagging_: \"s3:ObjectTagging:*\",\n s3_ObjectTagging_Delete: \"s3:ObjectTagging:Delete\",\n s3_ObjectTagging_Put: \"s3:ObjectTagging:Put\",\n s3_ReducedRedundancyLostObject: \"s3:ReducedRedundancyLostObject\",\n s3_Replication_: \"s3:Replication:*\",\n s3_Replication_OperationFailedReplication: \"s3:Replication:OperationFailedReplication\",\n s3_Replication_OperationMissedThreshold: \"s3:Replication:OperationMissedThreshold\",\n s3_Replication_OperationNotTracked: \"s3:Replication:OperationNotTracked\",\n s3_Replication_OperationReplicatedAfterThreshold: \"s3:Replication:OperationReplicatedAfterThreshold\",\n};\nexport const FilterRuleName = {\n prefix: \"prefix\",\n suffix: \"suffix\",\n};\nexport const DeleteMarkerReplicationStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const MetricsStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const ReplicationTimeStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const ExistingObjectReplicationStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const ReplicaModificationsStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const SseKmsEncryptedObjectsStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const ReplicationRuleStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const Payer = {\n BucketOwner: \"BucketOwner\",\n Requester: \"Requester\",\n};\nexport const MFADeleteStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const BucketVersioningStatus = {\n Enabled: \"Enabled\",\n Suspended: \"Suspended\",\n};\nexport const Protocol = {\n http: \"http\",\n https: \"https\",\n};\nexport const ReplicationStatus = {\n COMPLETE: \"COMPLETE\",\n COMPLETED: \"COMPLETED\",\n FAILED: \"FAILED\",\n PENDING: \"PENDING\",\n REPLICA: \"REPLICA\",\n};\nexport const ChecksumMode = {\n ENABLED: \"ENABLED\",\n};\nexport const ObjectAttributes = {\n CHECKSUM: \"Checksum\",\n ETAG: \"ETag\",\n OBJECT_PARTS: \"ObjectParts\",\n OBJECT_SIZE: \"ObjectSize\",\n STORAGE_CLASS: \"StorageClass\",\n};\nexport const ObjectLockEnabled = {\n Enabled: \"Enabled\",\n};\nexport const ObjectLockRetentionMode = {\n COMPLIANCE: \"COMPLIANCE\",\n GOVERNANCE: \"GOVERNANCE\",\n};\nexport const ArchiveStatus = {\n ARCHIVE_ACCESS: \"ARCHIVE_ACCESS\",\n DEEP_ARCHIVE_ACCESS: \"DEEP_ARCHIVE_ACCESS\",\n};\nexport const EncodingType = {\n url: \"url\",\n};\nexport const ObjectStorageClass = {\n DEEP_ARCHIVE: \"DEEP_ARCHIVE\",\n EXPRESS_ONEZONE: \"EXPRESS_ONEZONE\",\n FSX_ONTAP: \"FSX_ONTAP\",\n FSX_OPENZFS: \"FSX_OPENZFS\",\n GLACIER: \"GLACIER\",\n GLACIER_IR: \"GLACIER_IR\",\n INTELLIGENT_TIERING: \"INTELLIGENT_TIERING\",\n ONEZONE_IA: \"ONEZONE_IA\",\n OUTPOSTS: \"OUTPOSTS\",\n REDUCED_REDUNDANCY: \"REDUCED_REDUNDANCY\",\n SNOW: \"SNOW\",\n STANDARD: \"STANDARD\",\n STANDARD_IA: \"STANDARD_IA\",\n};\nexport const OptionalObjectAttributes = {\n RESTORE_STATUS: \"RestoreStatus\",\n};\nexport const ObjectVersionStorageClass = {\n STANDARD: \"STANDARD\",\n};\nexport const MFADelete = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const Tier = {\n Bulk: \"Bulk\",\n Expedited: \"Expedited\",\n Standard: \"Standard\",\n};\nexport const ExpressionType = {\n SQL: \"SQL\",\n};\nexport const CompressionType = {\n BZIP2: \"BZIP2\",\n GZIP: \"GZIP\",\n NONE: \"NONE\",\n};\nexport const FileHeaderInfo = {\n IGNORE: \"IGNORE\",\n NONE: \"NONE\",\n USE: \"USE\",\n};\nexport const JSONType = {\n DOCUMENT: \"DOCUMENT\",\n LINES: \"LINES\",\n};\nexport const QuoteFields = {\n ALWAYS: \"ALWAYS\",\n ASNEEDED: \"ASNEEDED\",\n};\nexport const RestoreRequestType = {\n SELECT: \"SELECT\",\n};\n", "export {};\n", "export {};\n", "export * from \"./S3Client\";\nexport * from \"./S3\";\nexport * from \"./commands\";\nexport * from \"./schemas/schemas_0\";\nexport * from \"./pagination\";\nexport * from \"./waiters\";\nexport * from \"./models/enums\";\nexport * from \"./models/errors\";\nexport * from \"./models/models_0\";\nexport * from \"./models/models_1\";\nexport { S3ServiceException } from \"./models/S3ServiceException\";\n", "import { buildQueryString } from \"@smithy/querystring-builder\";\nexport function formatUrl(request) {\n const { port, query } = request;\n let { protocol, path, hostname } = request;\n if (protocol && protocol.slice(-1) !== \":\") {\n protocol += \":\";\n }\n if (port) {\n hostname += `:${port}`;\n }\n if (path && path.charAt(0) !== \"/\") {\n path = `/${path}`;\n }\n let queryString = query ? buildQueryString(query) : \"\";\n if (queryString && queryString[0] !== \"?\") {\n queryString = `?${queryString}`;\n }\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n let fragment = \"\";\n if (request.fragment) {\n fragment = `#${request.fragment}`;\n }\n return `${protocol}//${auth}${hostname}${path}${queryString}${fragment}`;\n}\n", "export const UNSIGNED_PAYLOAD = \"UNSIGNED-PAYLOAD\";\nexport const SHA256_HEADER = \"X-Amz-Content-Sha256\";\nexport const ALGORITHM_QUERY_PARAM = \"X-Amz-Algorithm\";\nexport const CREDENTIAL_QUERY_PARAM = \"X-Amz-Credential\";\nexport const AMZ_DATE_QUERY_PARAM = \"X-Amz-Date\";\nexport const SIGNED_HEADERS_QUERY_PARAM = \"X-Amz-SignedHeaders\";\nexport const EXPIRES_QUERY_PARAM = \"X-Amz-Expires\";\nexport const HOST_HEADER = \"host\";\nexport const ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256\";\n", "import { SignatureV4MultiRegion } from \"@aws-sdk/signature-v4-multi-region\";\nimport { SHA256_HEADER, UNSIGNED_PAYLOAD } from \"./constants\";\nexport class S3RequestPresigner {\n signer;\n constructor(options) {\n const resolvedOptions = {\n service: options.signingName || options.service || \"s3\",\n uriEscapePath: options.uriEscapePath || false,\n applyChecksum: options.applyChecksum || false,\n ...options,\n };\n this.signer = new SignatureV4MultiRegion(resolvedOptions);\n }\n presign(requestToSign, { unsignableHeaders = new Set(), hoistableHeaders = new Set(), unhoistableHeaders = new Set(), ...options } = {}) {\n this.prepareRequest(requestToSign, {\n unsignableHeaders,\n unhoistableHeaders,\n hoistableHeaders,\n });\n return this.signer.presign(requestToSign, {\n expiresIn: 900,\n unsignableHeaders,\n unhoistableHeaders,\n ...options,\n });\n }\n presignWithCredentials(requestToSign, credentials, { unsignableHeaders = new Set(), hoistableHeaders = new Set(), unhoistableHeaders = new Set(), ...options } = {}) {\n this.prepareRequest(requestToSign, {\n unsignableHeaders,\n unhoistableHeaders,\n hoistableHeaders,\n });\n return this.signer.presignWithCredentials(requestToSign, credentials, {\n expiresIn: 900,\n unsignableHeaders,\n unhoistableHeaders,\n ...options,\n });\n }\n prepareRequest(requestToSign, { unsignableHeaders = new Set(), unhoistableHeaders = new Set(), hoistableHeaders = new Set(), } = {}) {\n unsignableHeaders.add(\"content-type\");\n Object.keys(requestToSign.headers)\n .map((header) => header.toLowerCase())\n .filter((header) => header.startsWith(\"x-amz-server-side-encryption\"))\n .forEach((header) => {\n if (!hoistableHeaders.has(header)) {\n unhoistableHeaders.add(header);\n }\n });\n requestToSign.headers[SHA256_HEADER] = UNSIGNED_PAYLOAD;\n const currentHostHeader = requestToSign.headers.host;\n const port = requestToSign.port;\n const expectedHostHeader = `${requestToSign.hostname}${requestToSign.port != null ? \":\" + port : \"\"}`;\n if (!currentHostHeader || (currentHostHeader === requestToSign.hostname && requestToSign.port != null)) {\n requestToSign.headers.host = expectedHostHeader;\n }\n }\n}\n", "import { formatUrl } from \"@aws-sdk/util-format-url\";\nimport { getEndpointFromInstructions } from \"@smithy/middleware-endpoint\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { S3RequestPresigner } from \"./presigner\";\nexport const getSignedUrl = async (client, command, options = {}) => {\n let s3Presigner;\n let region;\n if (typeof client.config.endpointProvider === \"function\") {\n const endpointV2 = await getEndpointFromInstructions(command.input, command.constructor, client.config);\n const authScheme = endpointV2.properties?.authSchemes?.[0];\n if (authScheme?.name === \"sigv4a\") {\n region = authScheme?.signingRegionSet?.join(\",\");\n }\n else {\n region = authScheme?.signingRegion;\n }\n s3Presigner = new S3RequestPresigner({\n ...client.config,\n signingName: authScheme?.signingName,\n region: async () => region,\n });\n }\n else {\n s3Presigner = new S3RequestPresigner(client.config);\n }\n const presignInterceptMiddleware = (next, context) => async (args) => {\n const { request } = args;\n if (!HttpRequest.isInstance(request)) {\n throw new Error(\"Request to be presigned is not an valid HTTP request.\");\n }\n delete request.headers[\"amz-sdk-invocation-id\"];\n delete request.headers[\"amz-sdk-request\"];\n delete request.headers[\"x-amz-user-agent\"];\n let presigned;\n const presignerOptions = {\n ...options,\n signingRegion: options.signingRegion ?? context[\"signing_region\"] ?? region,\n signingService: options.signingService ?? context[\"signing_service\"],\n };\n if (context.s3ExpressIdentity) {\n presigned = await s3Presigner.presignWithCredentials(request, context.s3ExpressIdentity, presignerOptions);\n }\n else {\n presigned = await s3Presigner.presign(request, presignerOptions);\n }\n return {\n response: {},\n output: {\n $metadata: { httpStatusCode: 200 },\n presigned,\n },\n };\n };\n const middlewareName = \"presignInterceptMiddleware\";\n const clientStack = client.middlewareStack.clone();\n clientStack.addRelativeTo(presignInterceptMiddleware, {\n name: middlewareName,\n relation: \"before\",\n toMiddleware: \"awsAuthMiddleware\",\n override: true,\n });\n const handler = command.resolveMiddleware(clientStack, client.config, {});\n const { output } = await handler({ input: command.input });\n const { presigned } = output;\n return formatUrl(presigned);\n};\n", "export * from \"./getSignedUrl\";\nexport * from \"./presigner\";\n", "// import { s3A, awsBucketName, awsRegion, awsSecretAccessKey } from \"@/src/lib/env-exporter\"\nimport { DeleteObjectCommand, DeleteObjectsCommand, PutObjectCommand, S3Client, GetObjectCommand } from \"@aws-sdk/client-s3\"\nimport { getSignedUrl } from \"@aws-sdk/s3-request-presigner\"\n// import signedUrlCache from \"@/src/lib/signed-url-cache\" // Disabled for Workers compatibility\nimport { claimUploadUrlStatus, createUploadUrlStatus } from '@/src/dbService'\nimport { s3AccessKeyId, s3Region, s3Url, s3SecretAccessKey, s3BucketName, assetsDomain } from \"@/src/lib/env-exporter\"\n\nconst s3Client = new S3Client({\n region: s3Region,\n endpoint: s3Url,\n forcePathStyle: true,\n credentials: {\n accessKeyId: s3AccessKeyId,\n secretAccessKey: s3SecretAccessKey,\n },\n})\nexport default s3Client;\n\nexport const imageUploadS3 = async(body: Buffer, type: string, key:string) => {\n // const key = `${category}/${Date.now()}`\n const command = new PutObjectCommand({\n Bucket: s3BucketName,\n Key: key,\n Body: body,\n ContentType: type,\n })\n const resp = await s3Client.send(command)\n \n const imageUrl = `${key}`\n return imageUrl;\n}\n\n\n// export async function deleteImageUtil(...keys:string[]):Promise;\n\nexport async function deleteImageUtil({bucket = s3BucketName, keys}:{bucket?:string, keys: string[]}) {\n \n if (keys.length === 0) {\n return true;\n }\n try {\n const deleteParams = {\n Bucket: bucket,\n Delete: {\n Objects: keys.map((key) => ({ Key: key })),\n Quiet: false,\n }\n }\n \n const deleteCommand = new DeleteObjectsCommand(deleteParams)\n await s3Client.send(deleteCommand)\n return true\n }\n catch (error) {\n console.error(\"Error deleting image:\", error)\n throw new Error(\"Failed to delete image\")\n return false;\n }\n}\n\nexport function scaffoldAssetUrl(input: string | null): string\nexport function scaffoldAssetUrl(input: (string | null)[]): string[]\nexport function scaffoldAssetUrl(input: string | null | (string | null)[]): string | string[] {\n if (Array.isArray(input)) {\n return input.map(key => scaffoldAssetUrl(key) as string);\n }\n if (!input) {\n return '';\n }\n const normalizedKey = input.replace(/^\\/+/, '');\n const domain = assetsDomain.endsWith('/')\n ? assetsDomain.slice(0, -1)\n : assetsDomain;\n return `${domain}/${normalizedKey}`;\n}\n\n\n/**\n * Generate a signed URL from an S3 URL\n * @param s3Url The full S3 URL (e.g., https://bucket-name.s3.region.amazonaws.com/path/to/object)\n * @param expiresIn Expiration time in seconds (default: 259200 seconds = 3 days)\n * @returns A pre-signed URL that provides temporary access to the object\n */\nexport async function generateSignedUrlFromS3Url(s3UrlRaw: string|null, expiresIn: number = 259200): Promise {\n if (!s3UrlRaw) {\n return '';\n }\n\n const s3Url = s3UrlRaw\n \n try {\n // Cache disabled for Workers compatibility\n // const cachedUrl = signedUrlCache.get(s3Url);\n // if (cachedUrl) {\n // return cachedUrl;\n // }\n \n // Create the command to get the object\n const command = new GetObjectCommand({\n Bucket: s3BucketName,\n Key: s3Url,\n });\n \n // Generate the signed URL\n const signedUrl = await getSignedUrl(s3Client, command, { expiresIn });\n \n // Cache disabled for Workers compatibility\n // signedUrlCache.set(s3Url, signedUrl, (expiresIn * 1000) - 60000);\n \n return signedUrl;\n } catch (error) {\n console.error(\"Error generating signed URL:\", error);\n throw new Error(\"Failed to generate signed URL\");\n }\n}\n\n/**\n * Get the original S3 URL from a signed URL\n * @param signedUrl The signed URL \n * @returns The original S3 URL if found in cache, otherwise null\n */\nexport function getOriginalUrlFromSignedUrl(signedUrl: string|null): string|null {\n // Cache disabled for Workers compatibility - cannot retrieve original URL without cache\n // To re-enable, migrate signed-url-cache to object storage (R2/S3)\n return null;\n}\n\n/**\n * Generate signed URLs for multiple S3 URLs\n * @param s3Urls Array of S3 URLs or null values\n * @param expiresIn Expiration time in seconds (default: 259200 seconds = 3 days)\n * @returns Array of signed URLs (empty strings for null/invalid inputs)\n */\nexport async function generateSignedUrlsFromS3Urls(s3Urls: (string|null)[], expiresIn: number = 259200): Promise {\n if (!s3Urls || !s3Urls.length) {\n return [];\n }\n\n try {\n // Process URLs in parallel for better performance\n const signedUrls = await Promise.all(\n s3Urls.map(url => generateSignedUrlFromS3Url(url, expiresIn).catch(() => ''))\n );\n \n return signedUrls;\n } catch (error) {\n console.error(\"Error generating multiple signed URLs:\", error);\n // Return an array of empty strings with the same length as input\n return s3Urls.map(() => '');\n }\n}\n\nexport async function generateUploadUrl(key: string, mimeType: string, expiresIn: number = 180): Promise {\n try {\n // Insert record into upload_url_status\n await createUploadUrlStatus(key)\n\n // Generate signed upload URL\n const command = new PutObjectCommand({\n Bucket: s3BucketName,\n Key: key,\n ContentType: mimeType,\n });\n\n const signedUrl = await getSignedUrl(s3Client, command, { expiresIn });\n return signedUrl;\n } catch (error) {\n console.error('Error generating upload URL:', error);\n throw new Error('Failed to generate upload URL');\n }\n}\n\n\n// export function extractKeyFromPresignedUrl(url:string) {\n// const u = new URL(url);\n// const rawKey = u.pathname.replace(/^\\/+/, \"\"); // remove leading slash\n// return decodeURIComponent(rawKey);\n// }\n\n// New function (excludes bucket name)\nexport function extractKeyFromPresignedUrl(url: string): string {\n const u = new URL(url);\n const rawKey = u.pathname.replace(/^\\/+/, \"\"); // remove leading slash\n const decodedKey = decodeURIComponent(rawKey);\n // Remove bucket prefix\n const parts = decodedKey.split('/');\n parts.shift(); // Remove bucket name\n return parts.join('/');\n}\n\nexport async function claimUploadUrl(url: string): Promise {\n try {\n const semiKey = extractKeyFromPresignedUrl(url);\n\n // Update status to 'claimed' if currently 'pending'\n const updated = await claimUploadUrlStatus(semiKey)\n \n if (!updated) {\n throw new Error('Upload URL not found or already claimed');\n }\n } catch (error) {\n console.error('Error claiming upload URL:', error);\n throw new Error('Failed to claim upload URL');\n }\n}\n", "import { TRPCError } from './error/TRPCError';\nimport type { ParseFn } from './parser';\nimport type { ProcedureType } from './procedure';\nimport type { GetRawInputFn, Overwrite, Simplify } from './types';\nimport { isObject } from './utils';\n\n/** @internal */\nexport const middlewareMarker = 'middlewareMarker' as 'middlewareMarker' & {\n __brand: 'middlewareMarker';\n};\ntype MiddlewareMarker = typeof middlewareMarker;\n\ninterface MiddlewareResultBase {\n /**\n * All middlewares should pass through their `next()`'s output.\n * Requiring this marker makes sure that can't be forgotten at compile-time.\n */\n readonly marker: MiddlewareMarker;\n}\n\ninterface MiddlewareOKResult<_TContextOverride> extends MiddlewareResultBase {\n ok: true;\n data: unknown;\n // this could be extended with `input`/`rawInput` later\n}\n\ninterface MiddlewareErrorResult<_TContextOverride>\n extends MiddlewareResultBase {\n ok: false;\n error: TRPCError;\n}\n\n/**\n * @internal\n */\nexport type MiddlewareResult<_TContextOverride> =\n | MiddlewareErrorResult<_TContextOverride>\n | MiddlewareOKResult<_TContextOverride>;\n\n/**\n * @internal\n */\nexport interface MiddlewareBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n> {\n /**\n * Create a new builder based on the current middleware builder\n */\n unstable_pipe<$ContextOverridesOut>(\n fn:\n | MiddlewareFunction<\n TContext,\n TMeta,\n TContextOverrides,\n $ContextOverridesOut,\n TInputOut\n >\n | MiddlewareBuilder<\n Overwrite,\n TMeta,\n $ContextOverridesOut,\n TInputOut\n >,\n ): MiddlewareBuilder<\n TContext,\n TMeta,\n Overwrite,\n TInputOut\n >;\n\n /**\n * List of middlewares within this middleware builder\n */\n _middlewares: MiddlewareFunction<\n TContext,\n TMeta,\n TContextOverrides,\n object,\n TInputOut\n >[];\n}\n\n/**\n * @internal\n */\nexport type MiddlewareFunction<\n TContext,\n TMeta,\n TContextOverridesIn,\n $ContextOverridesOut,\n TInputOut,\n> = {\n (opts: {\n ctx: Simplify>;\n type: ProcedureType;\n path: string;\n input: TInputOut;\n getRawInput: GetRawInputFn;\n meta: TMeta | undefined;\n signal: AbortSignal | undefined;\n /**\n * The index of this call in a batch request.\n */\n batchIndex: number;\n next: {\n (): Promise>;\n <$ContextOverride>(opts: {\n ctx?: $ContextOverride;\n input?: unknown;\n }): Promise>;\n (opts: {\n getRawInput: GetRawInputFn;\n }): Promise>;\n };\n }): Promise>;\n _type?: string | undefined;\n};\n\nexport type AnyMiddlewareFunction = MiddlewareFunction;\nexport type AnyMiddlewareBuilder = MiddlewareBuilder;\n/**\n * @internal\n */\nexport function createMiddlewareFactory<\n TContext,\n TMeta,\n TInputOut = unknown,\n>() {\n function createMiddlewareInner(\n middlewares: AnyMiddlewareFunction[],\n ): AnyMiddlewareBuilder {\n return {\n _middlewares: middlewares,\n unstable_pipe(middlewareBuilderOrFn) {\n const pipedMiddleware =\n '_middlewares' in middlewareBuilderOrFn\n ? middlewareBuilderOrFn._middlewares\n : [middlewareBuilderOrFn];\n\n return createMiddlewareInner([...middlewares, ...pipedMiddleware]);\n },\n };\n }\n\n function createMiddleware<$ContextOverrides>(\n fn: MiddlewareFunction<\n TContext,\n TMeta,\n object,\n $ContextOverrides,\n TInputOut\n >,\n ): MiddlewareBuilder {\n return createMiddlewareInner([fn]);\n }\n\n return createMiddleware;\n}\n\n/**\n * Create a standalone middleware\n * @see https://trpc.io/docs/v11/server/middlewares#experimental-standalone-middlewares\n * @deprecated use `.concat()` instead\n */\nexport const experimental_standaloneMiddleware = <\n TCtx extends {\n ctx?: object;\n meta?: object;\n input?: unknown;\n },\n>() => ({\n create: createMiddlewareFactory<\n TCtx extends { ctx: infer T extends object } ? T : any,\n TCtx extends { meta: infer T extends object } ? T : object,\n TCtx extends { input: infer T } ? T : unknown\n >(),\n});\n\n/**\n * @internal\n * Please note, `trpc-openapi` uses this function.\n */\nexport function createInputMiddleware(parse: ParseFn) {\n const inputMiddleware: AnyMiddlewareFunction =\n async function inputValidatorMiddleware(opts) {\n let parsedInput: ReturnType;\n\n const rawInput = await opts.getRawInput();\n try {\n parsedInput = await parse(rawInput);\n } catch (cause) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n cause,\n });\n }\n\n // Multiple input parsers\n const combinedInput =\n isObject(opts.input) && isObject(parsedInput)\n ? {\n ...opts.input,\n ...parsedInput,\n }\n : parsedInput;\n\n return opts.next({ input: combinedInput });\n };\n inputMiddleware._type = 'input';\n return inputMiddleware;\n}\n\n/**\n * @internal\n */\nexport function createOutputMiddleware(parse: ParseFn) {\n const outputMiddleware: AnyMiddlewareFunction =\n async function outputValidatorMiddleware({ next }) {\n const result = await next();\n if (!result.ok) {\n // pass through failures without validating\n return result;\n }\n try {\n const data = await parse(result.data);\n return {\n ...result,\n data,\n };\n } catch (cause) {\n throw new TRPCError({\n message: 'Output validation failed',\n code: 'INTERNAL_SERVER_ERROR',\n cause,\n });\n }\n };\n outputMiddleware._type = 'output';\n return outputMiddleware;\n}\n", "import type { StandardSchemaV1 } from \"./spec\";\n\n/** A schema error with useful information. */\n\nexport class StandardSchemaV1Error extends Error {\n /** The schema issues. */\n public readonly issues: ReadonlyArray;\n\n /**\n * Creates a schema error with useful information.\n *\n * @param issues The schema issues.\n */\n constructor(issues: ReadonlyArray) {\n super(issues[0]?.message);\n this.name = 'SchemaError';\n this.issues = issues;\n }\n}\n", "import { StandardSchemaV1Error } from '../vendor/standard-schema-v1/error';\nimport { type StandardSchemaV1 } from '../vendor/standard-schema-v1/spec';\n\n// zod / typeschema\nexport type ParserZodEsque = {\n _input: TInput;\n _output: TParsedInput;\n};\n\nexport type ParserValibotEsque = {\n schema: {\n _types?: {\n input: TInput;\n output: TParsedInput;\n };\n };\n};\n\nexport type ParserArkTypeEsque = {\n inferIn: TInput;\n infer: TParsedInput;\n};\n\nexport type ParserStandardSchemaEsque = StandardSchemaV1<\n TInput,\n TParsedInput\n>;\n\nexport type ParserMyZodEsque = {\n parse: (input: any) => TInput;\n};\n\nexport type ParserSuperstructEsque = {\n create: (input: unknown) => TInput;\n};\n\nexport type ParserCustomValidatorEsque = (\n input: unknown,\n) => Promise | TInput;\n\nexport type ParserYupEsque = {\n validateSync: (input: unknown) => TInput;\n};\n\nexport type ParserScaleEsque = {\n assert(value: unknown): asserts value is TInput;\n};\n\nexport type ParserWithoutInput =\n | ParserCustomValidatorEsque\n | ParserMyZodEsque\n | ParserScaleEsque\n | ParserSuperstructEsque\n | ParserYupEsque;\n\nexport type ParserWithInputOutput =\n | ParserZodEsque\n | ParserValibotEsque\n | ParserArkTypeEsque\n | ParserStandardSchemaEsque;\n\nexport type Parser = ParserWithInputOutput | ParserWithoutInput;\n\nexport type inferParser =\n TParser extends ParserStandardSchemaEsque\n ? {\n in: $TIn;\n out: $TOut;\n }\n : TParser extends ParserWithInputOutput\n ? {\n in: $TIn;\n out: $TOut;\n }\n : TParser extends ParserWithoutInput\n ? {\n in: $InOut;\n out: $InOut;\n }\n : never;\n\nexport type ParseFn = (value: unknown) => Promise | TType;\n\nexport function getParseFn(procedureParser: Parser): ParseFn {\n const parser = procedureParser as any;\n const isStandardSchema = '~standard' in parser;\n\n if (typeof parser === 'function' && typeof parser.assert === 'function') {\n // ParserArkTypeEsque - arktype schemas shouldn't be called as a function because they return a union type instead of throwing\n return parser.assert.bind(parser);\n }\n\n if (typeof parser === 'function' && !isStandardSchema) {\n // ParserValibotEsque (>= v0.31.0)\n // ParserCustomValidatorEsque - note the check for standard-schema conformance - some libraries like `effect` use function schemas which are *not* a \"parse\" function.\n return parser;\n }\n\n if (typeof parser.parseAsync === 'function') {\n // ParserZodEsque\n return parser.parseAsync.bind(parser);\n }\n\n if (typeof parser.parse === 'function') {\n // ParserZodEsque\n // ParserValibotEsque (< v0.13.0)\n return parser.parse.bind(parser);\n }\n\n if (typeof parser.validateSync === 'function') {\n // ParserYupEsque\n return parser.validateSync.bind(parser);\n }\n\n if (typeof parser.create === 'function') {\n // ParserSuperstructEsque\n return parser.create.bind(parser);\n }\n\n if (typeof parser.assert === 'function') {\n // ParserScaleEsque\n return (value) => {\n parser.assert(value);\n return value as TType;\n };\n }\n\n if (isStandardSchema) {\n // StandardSchemaEsque\n return async (value) => {\n const result = await parser['~standard'].validate(value);\n if (result.issues) {\n throw new StandardSchemaV1Error(result.issues);\n }\n return result.value;\n };\n }\n\n throw new Error('Could not find a validator fn');\n}\n", "function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.includes(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose.js\");\nfunction _objectWithoutProperties(e, t) {\n if (null == e) return {};\n var o,\n r,\n i = objectWithoutPropertiesLoose(e, t);\n if (Object.getOwnPropertySymbols) {\n var s = Object.getOwnPropertySymbols(e);\n for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n }\n return i;\n}\nmodule.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import type { inferObservableValue, Observable } from '../observable';\nimport { getTRPCErrorFromUnknown, TRPCError } from './error/TRPCError';\nimport type {\n AnyMiddlewareFunction,\n MiddlewareBuilder,\n MiddlewareFunction,\n MiddlewareResult,\n} from './middleware';\nimport {\n createInputMiddleware,\n createOutputMiddleware,\n middlewareMarker,\n} from './middleware';\nimport type { inferParser, Parser } from './parser';\nimport { getParseFn } from './parser';\nimport type {\n AnyMutationProcedure,\n AnyProcedure,\n AnyQueryProcedure,\n LegacyObservableSubscriptionProcedure,\n MutationProcedure,\n ProcedureType,\n QueryProcedure,\n SubscriptionProcedure,\n} from './procedure';\nimport type { inferTrackedOutput } from './stream/tracked';\nimport type {\n GetRawInputFn,\n MaybePromise,\n Overwrite,\n Simplify,\n TypeError,\n} from './types';\nimport type { UnsetMarker } from './utils';\nimport { mergeWithoutOverrides } from './utils';\n\ntype IntersectIfDefined = TType extends UnsetMarker\n ? TWith\n : TWith extends UnsetMarker\n ? TType\n : Simplify;\n\ntype DefaultValue = TValue extends UnsetMarker\n ? TFallback\n : TValue;\n\ntype inferAsyncIterable =\n TOutput extends AsyncIterable\n ? {\n yield: $Yield;\n return: $Return;\n next: $Next;\n }\n : never;\ntype inferSubscriptionOutput =\n TOutput extends AsyncIterable\n ? AsyncIterable<\n inferTrackedOutput['yield']>,\n inferAsyncIterable['return'],\n inferAsyncIterable['next']\n >\n : TypeError<'Subscription output could not be inferred'>;\n\nexport type CallerOverride = (opts: {\n args: unknown[];\n invoke: (opts: ProcedureCallOptions) => Promise;\n _def: AnyProcedure['_def'];\n}) => Promise;\ntype ProcedureBuilderDef = {\n procedure: true;\n inputs: Parser[];\n output?: Parser;\n meta?: TMeta;\n resolver?: ProcedureBuilderResolver;\n middlewares: AnyMiddlewareFunction[];\n /**\n * @deprecated use `type` instead\n */\n mutation?: boolean;\n /**\n * @deprecated use `type` instead\n */\n query?: boolean;\n /**\n * @deprecated use `type` instead\n */\n subscription?: boolean;\n type?: ProcedureType;\n caller?: CallerOverride;\n};\n\ntype AnyProcedureBuilderDef = ProcedureBuilderDef;\n\n/**\n * Procedure resolver options (what the `.query()`, `.mutation()`, and `.subscription()` functions receive)\n * @internal\n */\nexport interface ProcedureResolverOptions<\n TContext,\n _TMeta,\n TContextOverridesIn,\n TInputOut,\n> {\n ctx: Simplify>;\n input: TInputOut extends UnsetMarker ? undefined : TInputOut;\n /**\n * The AbortSignal of the request\n */\n signal: AbortSignal | undefined;\n /**\n * The path of the procedure\n */\n path: string;\n /**\n * The index of this call in a batch request.\n * Will be set when the procedure is called as part of a batch.\n */\n batchIndex?: number;\n}\n\n/**\n * A procedure resolver\n */\ntype ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputParserIn,\n $Output,\n> = (\n opts: ProcedureResolverOptions,\n) => MaybePromise<\n // If an output parser is defined, we need to return what the parser expects, otherwise we return the inferred type\n DefaultValue\n>;\n\ntype AnyResolver = ProcedureResolver;\nexport type AnyProcedureBuilder = ProcedureBuilder<\n any,\n any,\n any,\n any,\n any,\n any,\n any,\n any\n>;\n\n/**\n * Infer the context type from a procedure builder\n * Useful to create common helper functions for different procedures\n */\nexport type inferProcedureBuilderResolverOptions<\n TProcedureBuilder extends AnyProcedureBuilder,\n> =\n TProcedureBuilder extends ProcedureBuilder<\n infer TContext,\n infer TMeta,\n infer TContextOverrides,\n infer _TInputIn,\n infer TInputOut,\n infer _TOutputIn,\n infer _TOutputOut,\n infer _TCaller\n >\n ? ProcedureResolverOptions<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut extends UnsetMarker\n ? // if input is not set, we don't want to infer it as `undefined` since a procedure further down the chain might have set an input\n unknown\n : TInputOut extends object\n ? Simplify<\n TInputOut & {\n /**\n * Extra input params might have been added by a `.input()` further down the chain\n */\n [keyAddedByInputCallFurtherDown: string]: unknown;\n }\n >\n : TInputOut\n >\n : never;\n\nexport interface ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputIn,\n TInputOut,\n TOutputIn,\n TOutputOut,\n TCaller extends boolean,\n> {\n /**\n * Add an input parser to the procedure.\n * @see https://trpc.io/docs/v11/server/validators\n */\n input<$Parser extends Parser>(\n schema: TInputOut extends UnsetMarker\n ? $Parser\n : inferParser<$Parser>['out'] extends Record | undefined\n ? TInputOut extends Record | undefined\n ? undefined extends inferParser<$Parser>['out'] // if current is optional the previous must be too\n ? undefined extends TInputOut\n ? $Parser\n : TypeError<'Cannot chain an optional parser to a required parser'>\n : $Parser\n : TypeError<'All input parsers did not resolve to an object'>\n : TypeError<'All input parsers did not resolve to an object'>,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n IntersectIfDefined['in']>,\n IntersectIfDefined['out']>,\n TOutputIn,\n TOutputOut,\n TCaller\n >;\n /**\n * Add an output parser to the procedure.\n * @see https://trpc.io/docs/v11/server/validators\n */\n output<$Parser extends Parser>(\n schema: $Parser,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputIn,\n TInputOut,\n IntersectIfDefined['in']>,\n IntersectIfDefined['out']>,\n TCaller\n >;\n /**\n * Add a meta data to the procedure.\n * @see https://trpc.io/docs/v11/server/metadata\n */\n meta(\n meta: TMeta,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputIn,\n TInputOut,\n TOutputIn,\n TOutputOut,\n TCaller\n >;\n /**\n * Add a middleware to the procedure.\n * @see https://trpc.io/docs/v11/server/middlewares\n */\n use<$ContextOverridesOut>(\n fn:\n | MiddlewareBuilder<\n Overwrite,\n TMeta,\n $ContextOverridesOut,\n TInputOut\n >\n | MiddlewareFunction<\n TContext,\n TMeta,\n TContextOverrides,\n $ContextOverridesOut,\n TInputOut\n >,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n Overwrite,\n TInputIn,\n TInputOut,\n TOutputIn,\n TOutputOut,\n TCaller\n >;\n\n /**\n * @deprecated use {@link concat} instead\n */\n unstable_concat<\n $Context,\n $Meta,\n $ContextOverrides,\n $InputIn,\n $InputOut,\n $OutputIn,\n $OutputOut,\n >(\n builder: Overwrite extends $Context\n ? TMeta extends $Meta\n ? ProcedureBuilder<\n $Context,\n $Meta,\n $ContextOverrides,\n $InputIn,\n $InputOut,\n $OutputIn,\n $OutputOut,\n TCaller\n >\n : TypeError<'Meta mismatch'>\n : TypeError<'Context mismatch'>,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n Overwrite,\n IntersectIfDefined,\n IntersectIfDefined,\n IntersectIfDefined,\n IntersectIfDefined,\n TCaller\n >;\n\n /**\n * Combine two procedure builders\n */\n concat<\n $Context,\n $Meta,\n $ContextOverrides,\n $InputIn,\n $InputOut,\n $OutputIn,\n $OutputOut,\n >(\n builder: Overwrite extends $Context\n ? TMeta extends $Meta\n ? ProcedureBuilder<\n $Context,\n $Meta,\n $ContextOverrides,\n $InputIn,\n $InputOut,\n $OutputIn,\n $OutputOut,\n TCaller\n >\n : TypeError<'Meta mismatch'>\n : TypeError<'Context mismatch'>,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n Overwrite,\n IntersectIfDefined,\n IntersectIfDefined,\n IntersectIfDefined,\n IntersectIfDefined,\n TCaller\n >;\n /**\n * Query procedure\n * @see https://trpc.io/docs/v11/concepts#vocabulary\n */\n query<$Output>(\n resolver: ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputIn,\n $Output\n >,\n ): TCaller extends true\n ? (\n input: DefaultValue,\n ) => Promise>\n : QueryProcedure<{\n input: DefaultValue;\n output: DefaultValue;\n meta: TMeta;\n }>;\n\n /**\n * Mutation procedure\n * @see https://trpc.io/docs/v11/concepts#vocabulary\n */\n mutation<$Output>(\n resolver: ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputIn,\n $Output\n >,\n ): TCaller extends true\n ? (\n input: DefaultValue,\n ) => Promise>\n : MutationProcedure<{\n input: DefaultValue;\n output: DefaultValue;\n meta: TMeta;\n }>;\n\n /**\n * Subscription procedure\n * @see https://trpc.io/docs/v11/server/subscriptions\n */\n subscription<$Output extends AsyncIterable>(\n resolver: ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputIn,\n $Output\n >,\n ): TCaller extends true\n ? TypeError<'Not implemented'>\n : SubscriptionProcedure<{\n input: DefaultValue;\n output: inferSubscriptionOutput>;\n meta: TMeta;\n }>;\n /**\n * @deprecated Using subscriptions with an observable is deprecated. Use an async generator instead.\n * This feature will be removed in v12 of tRPC.\n * @see https://trpc.io/docs/v11/server/subscriptions\n */\n subscription<$Output extends Observable>(\n resolver: ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputIn,\n $Output\n >,\n ): TCaller extends true\n ? TypeError<'Not implemented'>\n : LegacyObservableSubscriptionProcedure<{\n input: DefaultValue;\n output: inferObservableValue>;\n meta: TMeta;\n }>;\n /**\n * Overrides the way a procedure is invoked\n * Do not use this unless you know what you're doing - this is an experimental API\n */\n experimental_caller(\n caller: CallerOverride,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputIn,\n TInputOut,\n TOutputIn,\n TOutputOut,\n true\n >;\n /**\n * @internal\n */\n _def: ProcedureBuilderDef;\n}\n\ntype ProcedureBuilderResolver = (\n opts: ProcedureResolverOptions,\n) => Promise;\n\nfunction createNewBuilder(\n def1: AnyProcedureBuilderDef,\n def2: Partial,\n): AnyProcedureBuilder {\n const { middlewares = [], inputs, meta, ...rest } = def2;\n\n // TODO: maybe have a fn here to warn about calls\n return createBuilder({\n ...mergeWithoutOverrides(def1, rest),\n inputs: [...def1.inputs, ...(inputs ?? [])],\n middlewares: [...def1.middlewares, ...middlewares],\n meta: def1.meta && meta ? { ...def1.meta, ...meta } : (meta ?? def1.meta),\n });\n}\n\nexport function createBuilder(\n initDef: Partial = {},\n): ProcedureBuilder<\n TContext,\n TMeta,\n object,\n UnsetMarker,\n UnsetMarker,\n UnsetMarker,\n UnsetMarker,\n false\n> {\n const _def: AnyProcedureBuilderDef = {\n procedure: true,\n inputs: [],\n middlewares: [],\n ...initDef,\n };\n\n const builder: AnyProcedureBuilder = {\n _def,\n input(input) {\n const parser = getParseFn(input as Parser);\n return createNewBuilder(_def, {\n inputs: [input as Parser],\n middlewares: [createInputMiddleware(parser)],\n });\n },\n output(output: Parser) {\n const parser = getParseFn(output);\n return createNewBuilder(_def, {\n output,\n middlewares: [createOutputMiddleware(parser)],\n });\n },\n meta(meta) {\n return createNewBuilder(_def, {\n meta,\n });\n },\n use(middlewareBuilderOrFn) {\n // Distinguish between a middleware builder and a middleware function\n const middlewares =\n '_middlewares' in middlewareBuilderOrFn\n ? middlewareBuilderOrFn._middlewares\n : [middlewareBuilderOrFn];\n\n return createNewBuilder(_def, {\n middlewares: middlewares,\n });\n },\n unstable_concat(builder) {\n return createNewBuilder(_def, (builder as AnyProcedureBuilder)._def);\n },\n concat(builder) {\n return createNewBuilder(_def, (builder as AnyProcedureBuilder)._def);\n },\n query(resolver) {\n return createResolver(\n { ..._def, type: 'query' },\n resolver,\n ) as AnyQueryProcedure;\n },\n mutation(resolver) {\n return createResolver(\n { ..._def, type: 'mutation' },\n resolver,\n ) as AnyMutationProcedure;\n },\n subscription(resolver: ProcedureResolver) {\n return createResolver({ ..._def, type: 'subscription' }, resolver) as any;\n },\n experimental_caller(caller) {\n return createNewBuilder(_def, {\n caller,\n }) as any;\n },\n };\n\n return builder;\n}\n\nfunction createResolver(\n _defIn: AnyProcedureBuilderDef & { type: ProcedureType },\n resolver: AnyResolver,\n) {\n const finalBuilder = createNewBuilder(_defIn, {\n resolver,\n middlewares: [\n async function resolveMiddleware(opts) {\n const data = await resolver(opts);\n return {\n marker: middlewareMarker,\n ok: true,\n data,\n ctx: opts.ctx,\n } as const;\n },\n ],\n });\n const _def: AnyProcedure['_def'] = {\n ...finalBuilder._def,\n type: _defIn.type,\n experimental_caller: Boolean(finalBuilder._def.caller),\n meta: finalBuilder._def.meta,\n $types: null as any,\n };\n\n const invoke = createProcedureCaller(finalBuilder._def);\n const callerOverride = finalBuilder._def.caller;\n if (!callerOverride) {\n return invoke;\n }\n const callerWrapper = async (...args: unknown[]) => {\n return await callerOverride({\n args,\n invoke,\n _def: _def,\n });\n };\n\n callerWrapper._def = _def;\n\n return callerWrapper;\n}\n\n/**\n * @internal\n */\nexport interface ProcedureCallOptions {\n ctx: TContext;\n getRawInput: GetRawInputFn;\n input?: unknown;\n path: string;\n type: ProcedureType;\n signal: AbortSignal | undefined;\n /**\n * The index of this call in a batch request.\n */\n batchIndex: number;\n}\n\nconst codeblock = `\nThis is a client-only function.\nIf you want to call this function on the server, see https://trpc.io/docs/v11/server/server-side-calls\n`.trim();\n\n// run the middlewares recursively with the resolver as the last one\nasync function callRecursive(\n index: number,\n _def: AnyProcedureBuilderDef,\n opts: ProcedureCallOptions,\n): Promise> {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const middleware = _def.middlewares[index]!;\n const result = await middleware({\n ...opts,\n meta: _def.meta,\n input: opts.input,\n next(_nextOpts?: any) {\n const nextOpts = _nextOpts as\n | {\n ctx?: Record;\n input?: unknown;\n getRawInput?: GetRawInputFn;\n }\n | undefined;\n\n return callRecursive(index + 1, _def, {\n ...opts,\n ctx: nextOpts?.ctx ? { ...opts.ctx, ...nextOpts.ctx } : opts.ctx,\n input: nextOpts && 'input' in nextOpts ? nextOpts.input : opts.input,\n getRawInput: nextOpts?.getRawInput ?? opts.getRawInput,\n });\n },\n });\n\n return result;\n } catch (cause) {\n return {\n ok: false,\n error: getTRPCErrorFromUnknown(cause),\n marker: middlewareMarker,\n };\n }\n}\n\nfunction createProcedureCaller(_def: AnyProcedureBuilderDef): AnyProcedure {\n async function procedure(opts: ProcedureCallOptions) {\n // is direct server-side call\n if (!opts || !('getRawInput' in opts)) {\n throw new Error(codeblock);\n }\n\n // there's always at least one \"next\" since we wrap this.resolver in a middleware\n const result = await callRecursive(0, _def, opts);\n\n if (!result) {\n throw new TRPCError({\n code: 'INTERNAL_SERVER_ERROR',\n message:\n 'No result from middlewares - did you forget to `return next()`?',\n });\n }\n if (!result.ok) {\n // re-throw original error\n throw result.error;\n }\n return result.data;\n }\n\n procedure._def = _def;\n procedure.procedure = true;\n procedure.meta = _def.meta;\n\n // FIXME typecast shouldn't be needed - fixittt\n return procedure as unknown as AnyProcedure;\n}\n", "import type { CombinedDataTransformer } from '../unstable-core-do-not-import';\nimport type { DefaultErrorShape, ErrorFormatter } from './error/formatter';\nimport type { JSONLProducerOptions } from './stream/jsonl';\nimport type { SSEStreamProducerOptions } from './stream/sse';\n\n/**\n * The initial generics that are used in the init function\n * @internal\n */\nexport interface RootTypes {\n ctx: object;\n meta: object;\n errorShape: DefaultErrorShape;\n transformer: boolean;\n}\n\n/**\n * The default check to see if we're in a server\n */\nexport const isServerDefault: boolean =\n typeof window === 'undefined' ||\n 'Deno' in window ||\n // eslint-disable-next-line @typescript-eslint/dot-notation\n globalThis.process?.env?.['NODE_ENV'] === 'test' ||\n !!globalThis.process?.env?.['JEST_WORKER_ID'] ||\n !!globalThis.process?.env?.['VITEST_WORKER_ID'];\n\n/**\n * The tRPC root config\n * @internal\n */\nexport interface RootConfig {\n /**\n * The types that are used in the config\n * @internal\n */\n $types: TTypes;\n /**\n * Use a data transformer\n * @see https://trpc.io/docs/v11/data-transformers\n */\n transformer: CombinedDataTransformer;\n /**\n * Use custom error formatting\n * @see https://trpc.io/docs/v11/error-formatting\n */\n errorFormatter: ErrorFormatter;\n /**\n * Allow `@trpc/server` to run in non-server environments\n * @warning **Use with caution**, this should likely mainly be used within testing.\n * @default false\n */\n allowOutsideOfServer: boolean;\n /**\n * Is this a server environment?\n * @warning **Use with caution**, this should likely mainly be used within testing.\n * @default typeof window === 'undefined' || 'Deno' in window || process.env.NODE_ENV === 'test'\n */\n isServer: boolean;\n /**\n * Is this development?\n * Will be used to decide if the API should return stack traces\n * @default process.env.NODE_ENV !== 'production'\n */\n isDev: boolean;\n\n defaultMeta?: TTypes['meta'] extends object ? TTypes['meta'] : never;\n\n /**\n * Options for server-sent events (SSE) subscriptions\n * @see https://trpc.io/docs/client/links/httpSubscriptionLink\n */\n sse?: {\n /**\n * Enable server-sent events (SSE) subscriptions\n * @default true\n */\n enabled?: boolean;\n } & Pick<\n SSEStreamProducerOptions,\n 'ping' | 'emitAndEndImmediately' | 'maxDurationMs' | 'client'\n >;\n\n /**\n * Options for batch stream\n * @see https://trpc.io/docs/client/links/httpBatchStreamLink\n */\n jsonl?: Pick;\n experimental?: {};\n}\n\n/**\n * @internal\n */\nexport type CreateRootTypes = TGenerics;\n\nexport type AnyRootTypes = CreateRootTypes<{\n ctx: any;\n meta: any;\n errorShape: any;\n transformer: any;\n}>;\n\ntype PartialIf = TCondition extends true\n ? Partial\n : TType;\n\n/**\n * Adds a `createContext` option with a given callback function\n * If context is the default value, then the `createContext` option is optional\n */\nexport type CreateContextCallback<\n TContext,\n TFunction extends (...args: any[]) => any,\n> = PartialIf<\n object extends TContext ? true : false,\n {\n /**\n * @see https://trpc.io/docs/v11/context\n **/\n createContext: TFunction;\n }\n>;\n", "import {\n defaultFormatter,\n type DefaultErrorShape,\n type ErrorFormatter,\n} from './error/formatter';\nimport type { MiddlewareBuilder, MiddlewareFunction } from './middleware';\nimport { createMiddlewareFactory } from './middleware';\nimport type { ProcedureBuilder } from './procedureBuilder';\nimport { createBuilder } from './procedureBuilder';\nimport type { AnyRootTypes, CreateRootTypes } from './rootConfig';\nimport { isServerDefault, type RootConfig } from './rootConfig';\nimport type {\n AnyRouter,\n MergeRouters,\n RouterBuilder,\n RouterCallerFactory,\n} from './router';\nimport {\n createCallerFactory,\n createRouterFactory,\n mergeRouters,\n} from './router';\nimport type { DataTransformerOptions } from './transformer';\nimport { defaultTransformer, getDataTransformer } from './transformer';\nimport type { Unwrap, ValidateShape } from './types';\nimport type { UnsetMarker } from './utils';\n\ntype inferErrorFormatterShape =\n TType extends ErrorFormatter ? TShape : DefaultErrorShape;\n/** @internal */\nexport interface RuntimeConfigOptions<\n TContext extends object,\n TMeta extends object,\n> extends Partial<\n Omit<\n RootConfig<{\n ctx: TContext;\n meta: TMeta;\n errorShape: any;\n transformer: any;\n }>,\n '$types' | 'transformer'\n >\n > {\n /**\n * Use a data transformer\n * @see https://trpc.io/docs/v11/data-transformers\n */\n transformer?: DataTransformerOptions;\n}\n\ntype ContextCallback = (...args: any[]) => object | Promise;\n\nexport interface TRPCRootObject<\n TContext extends object,\n TMeta extends object,\n TOptions extends RuntimeConfigOptions,\n $Root extends AnyRootTypes = {\n ctx: TContext;\n meta: TMeta;\n errorShape: undefined extends TOptions['errorFormatter']\n ? DefaultErrorShape\n : inferErrorFormatterShape;\n transformer: undefined extends TOptions['transformer'] ? false : true;\n },\n> {\n /**\n * Your router config\n * @internal\n */\n _config: RootConfig<$Root>;\n\n /**\n * Builder object for creating procedures\n * @see https://trpc.io/docs/v11/server/procedures\n */\n procedure: ProcedureBuilder<\n TContext,\n TMeta,\n object,\n UnsetMarker,\n UnsetMarker,\n UnsetMarker,\n UnsetMarker,\n false\n >;\n\n /**\n * Create reusable middlewares\n * @see https://trpc.io/docs/v11/server/middlewares\n */\n middleware: <$ContextOverrides>(\n fn: MiddlewareFunction,\n ) => MiddlewareBuilder;\n\n /**\n * Create a router\n * @see https://trpc.io/docs/v11/server/routers\n */\n router: RouterBuilder<$Root>;\n\n /**\n * Merge Routers\n * @see https://trpc.io/docs/v11/server/merging-routers\n */\n mergeRouters: (\n ...routerList: [...TRouters]\n ) => MergeRouters;\n\n /**\n * Create a server-side caller for a router\n * @see https://trpc.io/docs/v11/server/server-side-calls\n */\n createCallerFactory: RouterCallerFactory<$Root>;\n}\n\nclass TRPCBuilder {\n /**\n * Add a context shape as a generic to the root object\n * @see https://trpc.io/docs/v11/server/context\n */\n context() {\n return new TRPCBuilder<\n TNewContext extends ContextCallback ? Unwrap : TNewContext,\n TMeta\n >();\n }\n\n /**\n * Add a meta shape as a generic to the root object\n * @see https://trpc.io/docs/v11/quickstart\n */\n meta() {\n return new TRPCBuilder();\n }\n\n /**\n * Create the root object\n * @see https://trpc.io/docs/v11/server/routers#initialize-trpc\n */\n create>(\n opts?: ValidateShape>,\n ): TRPCRootObject {\n type $Root = CreateRootTypes<{\n ctx: TContext;\n meta: TMeta;\n errorShape: undefined extends TOptions['errorFormatter']\n ? DefaultErrorShape\n : inferErrorFormatterShape;\n transformer: undefined extends TOptions['transformer'] ? false : true;\n }>;\n\n const config: RootConfig<$Root> = {\n ...opts,\n transformer: getDataTransformer(opts?.transformer ?? defaultTransformer),\n isDev:\n opts?.isDev ??\n // eslint-disable-next-line @typescript-eslint/dot-notation\n globalThis.process?.env['NODE_ENV'] !== 'production',\n allowOutsideOfServer: opts?.allowOutsideOfServer ?? false,\n errorFormatter: opts?.errorFormatter ?? defaultFormatter,\n isServer: opts?.isServer ?? isServerDefault,\n /**\n * These are just types, they can't be used at runtime\n * @internal\n */\n $types: null as any,\n };\n\n {\n // Server check\n const isServer: boolean = opts?.isServer ?? isServerDefault;\n\n if (!isServer && opts?.allowOutsideOfServer !== true) {\n throw new Error(\n `You're trying to use @trpc/server in a non-server environment. This is not supported by default.`,\n );\n }\n }\n return {\n /**\n * Your router config\n * @internal\n */\n _config: config,\n /**\n * Builder object for creating procedures\n * @see https://trpc.io/docs/v11/server/procedures\n */\n procedure: createBuilder<$Root['ctx'], $Root['meta']>({\n meta: opts?.defaultMeta,\n }),\n /**\n * Create reusable middlewares\n * @see https://trpc.io/docs/v11/server/middlewares\n */\n middleware: createMiddlewareFactory<$Root['ctx'], $Root['meta']>(),\n /**\n * Create a router\n * @see https://trpc.io/docs/v11/server/routers\n */\n router: createRouterFactory<$Root>(config),\n /**\n * Merge Routers\n * @see https://trpc.io/docs/v11/server/merging-routers\n */\n mergeRouters,\n /**\n * Create a server-side caller for a router\n * @see https://trpc.io/docs/v11/server/server-side-calls\n */\n createCallerFactory: createCallerFactory<$Root>(),\n };\n }\n}\n\n/**\n * Builder to initialize the tRPC root object - use this exactly once per backend\n * @see https://trpc.io/docs/v11/quickstart\n */\nexport const initTRPC = new TRPCBuilder();\nexport type { TRPCBuilder };\n", "import { createFlatProxy, createRecursiveProxy, getErrorShape } from \"./getErrorShape-vC8mUXJD.mjs\";\nimport \"./codes-DagpWZLc.mjs\";\nimport { TRPCError, callProcedure, getTRPCErrorFromUnknown, isTrackedEnvelope, lazy, sse, tracked, transformTRPCResponse } from \"./tracked-Bjtgv3wJ.mjs\";\nimport { StandardSchemaV1Error, experimental_standaloneMiddleware, initTRPC } from \"./initTRPC-RoZMIBeA.mjs\";\n\nexport { StandardSchemaV1Error, TRPCError, callProcedure as callTRPCProcedure, createFlatProxy as createTRPCFlatProxy, createRecursiveProxy as createTRPCRecursiveProxy, lazy as experimental_lazy, experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware, getErrorShape, getTRPCErrorFromUnknown, getErrorShape as getTRPCErrorShape, initTRPC, isTrackedEnvelope, lazy, sse, tracked, transformTRPCResponse };", "import { initTRPC, TRPCError } from '@trpc/server';\nimport type { Context as HonoContext } from 'hono';\n\nexport interface Context {\n req: HonoContext['req'];\n user?: any;\n staffUser?: {\n id: number;\n name: string;\n } | null;\n}\n\nconst t = initTRPC.context().create();\n\nexport const middleware = t.middleware;\nexport const router = t.router;\nexport { TRPCError };\n\n// Global error logger middleware\nconst errorLoggerMiddleware = middleware(async ({ path, type, next, ctx }) => {\n const start = Date.now();\n\n try {\n const result = await next();\n const duration = Date.now() - start;\n\n // Log successful operations in development\n if (process.env.NODE_ENV === 'development') {\n console.log(`\u2705 ${type} ${path} - ${duration}ms`);\n }\n\n return result;\n } catch (error) {\n const duration = Date.now() - start;\n const err = error as any; // Type assertion for error object\n\n // Comprehensive error logging\n console.error('\uD83D\uDEA8 tRPC Error:', {\n timestamp: new Date().toISOString(),\n path,\n type,\n duration: `${duration}ms`,\n userId: ctx?.user?.userId || ctx?.staffUser?.id || 'anonymous',\n error: {\n name: err.name,\n message: err.message,\n code: err.code,\n stack: err.stack,\n },\n // Add SQL-specific details if available\n ...(err.code && { sqlCode: err.code }),\n ...(err.meta && { sqlMeta: err.meta }),\n ...(err.sql && { sql: err.sql }),\n });\n\n throw error; // Re-throw to maintain error flow\n }\n});\n\nexport const publicProcedure = t.procedure.use(errorLoggerMiddleware);\nexport const protectedProcedure = t.procedure.use(errorLoggerMiddleware).use(\n middleware(async ({ ctx, next }) => {\n\n if ((!ctx.user && !ctx.staffUser)) {\n throw new TRPCError({ code: 'UNAUTHORIZED' });\n }\n return next();\n })\n);\n\nexport const createCallerFactory = t.createCallerFactory;\nexport const createTRPCRouter = t.router;\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllProductsForCache,\n getAllStoresForCache,\n getAllDeliverySlotsForCache,\n getAllSpecialDealsForCache,\n getAllProductTagsForCache,\n getProductById as getProductByIdFromDb,\n type ProductBasicData,\n type StoreBasicData,\n type DeliverySlotData,\n type SpecialDealData,\n type ProductTagData,\n} from '@/src/dbService'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\n\n// Uniform Product Type (matches getProductDetails return)\ninterface Product {\n id: number\n name: string\n shortDescription: string | null\n longDescription: string | null\n price: string\n marketPrice: string | null\n unitNotation: string\n images: string[]\n isOutOfStock: boolean\n store: { id: number; name: string; description: string | null } | null\n incrementStep: number\n productQuantity: number\n isFlashAvailable: boolean\n flashPrice: string | null\n deliverySlots: Array<{ id: number; deliveryTime: Date; freezeTime: Date; isCapacityFull: boolean }>\n specialDeals: Array<{ quantity: string; price: string; validTill: Date }>\n productTags: string[]\n}\n\nexport async function initializeProducts(): Promise {\n try {\n console.log('Initializing product store in Redis...')\n\n // Fetch all products with full details (similar to productMega logic)\n const productsData = await getAllProductsForCache()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { productInfo, units } from '@/src/db/schema'\n\n const productsData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n longDescription: productInfo.longDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n storeId: productInfo.storeId,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n productQuantity: productInfo.productQuantity,\n isFlashAvailable: productInfo.isFlashAvailable,\n flashPrice: productInfo.flashPrice,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id));\n */\n\n // Fetch all stores\n const allStores = await getAllStoresForCache()\n const storeMap = new Map(allStores.map((s) => [s.id, s]))\n\n // Fetch all delivery slots (excluding full capacity slots)\n const allDeliverySlots = await getAllDeliverySlotsForCache()\n const deliverySlotsMap = new Map()\n for (const slot of allDeliverySlots) {\n if (!deliverySlotsMap.has(slot.productId))\n deliverySlotsMap.set(slot.productId, [])\n deliverySlotsMap.get(slot.productId)!.push(slot)\n }\n\n // Fetch all special deals\n const allSpecialDeals = await getAllSpecialDealsForCache()\n const specialDealsMap = new Map()\n for (const deal of allSpecialDeals) {\n if (!specialDealsMap.has(deal.productId))\n specialDealsMap.set(deal.productId, [])\n specialDealsMap.get(deal.productId)!.push(deal)\n }\n\n // Fetch all product tags\n const allProductTags = await getAllProductTagsForCache()\n const productTagsMap = new Map()\n for (const tag of allProductTags) {\n if (!productTagsMap.has(tag.productId))\n productTagsMap.set(tag.productId, [])\n productTagsMap.get(tag.productId)!.push(tag.tagName)\n }\n\n // Store each product in Redis\n // for (const product of productsData) {\n // const signedImages = scaffoldAssetUrl(\n // (product.images as string[]) || []\n // )\n // const store = product.storeId\n // ? storeMap.get(product.storeId) || null\n // : null\n // const deliverySlots = deliverySlotsMap.get(product.id) || []\n // const specialDeals = specialDealsMap.get(product.id) || []\n // const productTags = productTagsMap.get(product.id) || []\n //\n // const productObj: Product = {\n // id: product.id,\n // name: product.name,\n // shortDescription: product.shortDescription,\n // longDescription: product.longDescription,\n // price: product.price.toString(),\n // marketPrice: product.marketPrice?.toString() || null,\n // unitNotation: product.unitShortNotation,\n // images: signedImages,\n // isOutOfStock: product.isOutOfStock,\n // store: store\n // ? { id: store.id, name: store.name, description: store.description }\n // : null,\n // incrementStep: product.incrementStep,\n // productQuantity: product.productQuantity,\n // isFlashAvailable: product.isFlashAvailable,\n // flashPrice: product.flashPrice?.toString() || null,\n // deliverySlots: deliverySlots.map((s) => ({\n // id: s.id,\n // deliveryTime: s.deliveryTime,\n // freezeTime: s.freezeTime,\n // isCapacityFull: s.isCapacityFull,\n // })),\n // specialDeals: specialDeals.map((d) => ({\n // quantity: d.quantity.toString(),\n // price: d.price.toString(),\n // validTill: d.validTill,\n // })),\n // productTags: productTags,\n // }\n //\n // await redisClient.set(`product:${product.id}`, JSON.stringify(productObj))\n // }\n\n console.log('Product store initialized successfully')\n } catch (error) {\n console.error('Error initializing product store:', error)\n }\n}\n\nexport async function getProductById(id: number): Promise {\n try {\n // const key = `product:${id}`\n // const data = await redisClient.get(key)\n // if (!data) return null\n // return JSON.parse(data) as Product\n\n const product = await getProductByIdFromDb(id)\n if (!product) return null\n\n const signedImages = scaffoldAssetUrl(\n (product.images as string[]) || []\n )\n\n // Fetch store info\n const allStores = await getAllStoresForCache()\n const store = product.storeId\n ? allStores.find(s => s.id === product.storeId) || null\n : null\n\n // Fetch delivery slots for this product\n const allDeliverySlots = await getAllDeliverySlotsForCache()\n const productSlots = allDeliverySlots.filter(s => s.productId === id)\n\n // Fetch special deals for this product\n const allSpecialDeals = await getAllSpecialDealsForCache()\n const productDeals = allSpecialDeals.filter(d => d.productId === id)\n\n // Fetch product tags for this product\n const allProductTags = await getAllProductTagsForCache()\n const productTagNames = allProductTags\n .filter(t => t.productId === id)\n .map(t => t.tagName)\n\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n longDescription: product.longDescription,\n price: product.price.toString(),\n marketPrice: product.marketPrice?.toString() || null,\n unitNotation: product.unit.shortNotation,\n images: signedImages,\n isOutOfStock: product.isOutOfStock,\n store: store\n ? { id: store.id, name: store.name, description: store.description }\n : null,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n isFlashAvailable: product.isFlashAvailable,\n flashPrice: product.flashPrice?.toString() || null,\n deliverySlots: productSlots.map((s) => ({\n id: s.id,\n deliveryTime: s.deliveryTime,\n freezeTime: s.freezeTime,\n isCapacityFull: s.isCapacityFull,\n })),\n specialDeals: productDeals.map((d) => ({\n quantity: d.quantity.toString(),\n price: d.price.toString(),\n validTill: d.validTill,\n })),\n productTags: productTagNames,\n }\n } catch (error) {\n console.error(`Error getting product ${id}:`, error)\n return null\n }\n}\n\nexport async function getAllProducts(): Promise {\n try {\n // Get all keys matching the pattern \"product:*\"\n // const keys = await redisClient.KEYS('product:*')\n //\n // if (keys.length === 0) {\n // return []\n // }\n //\n // // Get all products using MGET for better performance\n // const productsData = await redisClient.MGET(keys)\n //\n // const products: Product[] = []\n // for (const productData of productsData) {\n // if (productData) {\n // products.push(JSON.parse(productData) as Product)\n // }\n // }\n //\n // return products\n\n const productsData = await getAllProductsForCache()\n\n const allStores = await getAllStoresForCache()\n const storeMap = new Map(allStores.map((s) => [s.id, s]))\n\n const allDeliverySlots = await getAllDeliverySlotsForCache()\n const deliverySlotsMap = new Map()\n for (const slot of allDeliverySlots) {\n if (!deliverySlotsMap.has(slot.productId))\n deliverySlotsMap.set(slot.productId, [])\n deliverySlotsMap.get(slot.productId)!.push(slot)\n }\n\n const allSpecialDeals = await getAllSpecialDealsForCache()\n const specialDealsMap = new Map()\n for (const deal of allSpecialDeals) {\n if (!specialDealsMap.has(deal.productId))\n specialDealsMap.set(deal.productId, [])\n specialDealsMap.get(deal.productId)!.push(deal)\n }\n\n const allProductTags = await getAllProductTagsForCache()\n const productTagsMap = new Map()\n for (const tag of allProductTags) {\n if (!productTagsMap.has(tag.productId))\n productTagsMap.set(tag.productId, [])\n productTagsMap.get(tag.productId)!.push(tag.tagName)\n }\n\n const products: Product[] = []\n for (const product of productsData) {\n const signedImages = scaffoldAssetUrl(\n (product.images as string[]) || []\n )\n const store = product.storeId\n ? storeMap.get(product.storeId) || null\n : null\n const deliverySlots = deliverySlotsMap.get(product.id) || []\n const specialDeals = specialDealsMap.get(product.id) || []\n const productTags = productTagsMap.get(product.id) || []\n\n products.push({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n longDescription: product.longDescription,\n price: product.price.toString(),\n marketPrice: product.marketPrice?.toString() || null,\n unitNotation: product.unitShortNotation,\n images: signedImages,\n isOutOfStock: product.isOutOfStock,\n store: store\n ? { id: store.id, name: store.name, description: store.description }\n : null,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n isFlashAvailable: product.isFlashAvailable,\n flashPrice: product.flashPrice?.toString() || null,\n deliverySlots: deliverySlots.map((s) => ({\n id: s.id,\n deliveryTime: s.deliveryTime,\n freezeTime: s.freezeTime,\n isCapacityFull: s.isCapacityFull,\n })),\n specialDeals: specialDeals.map((d) => ({\n quantity: d.quantity.toString(),\n price: d.price.toString(),\n validTill: d.validTill,\n })),\n productTags: productTags,\n })\n }\n\n return products\n } catch (error) {\n console.error('Error getting all products:', error)\n return []\n }\n}\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllTagsForCache,\n getAllTagProductMappings,\n getAllProductTags,\n getProductTagById as getProductTagByIdFromDb,\n type TagBasicData,\n type TagProductMapping,\n} from '@/src/dbService'\nimport { generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\n\n// Tag Type (matches getDashboardTags return)\ninterface Tag {\n id: number\n tagName: string\n tagDescription: string | null\n imageUrl: string | null\n isDashboardTag: boolean\n relatedStores: number[]\n productIds: number[]\n}\n\nasync function transformTagToStoreTag(tag: {\n id: number\n tagName: string\n tagDescription: string | null\n imageUrl: string | null\n isDashboardTag: boolean\n relatedStores: unknown\n products?: Array<{ productId: number }>\n}): Promise {\n const signedImageUrl = tag.imageUrl\n ? await generateSignedUrlFromS3Url(tag.imageUrl)\n : null\n\n return {\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription,\n imageUrl: signedImageUrl,\n isDashboardTag: tag.isDashboardTag,\n relatedStores: (tag.relatedStores as number[]) || [],\n productIds: tag.products ? tag.products.map(p => p.productId) : [],\n }\n}\n\nexport async function initializeProductTagStore(): Promise {\n try {\n console.log('Initializing product tag store in Redis...')\n\n // Fetch all tags\n const tagsData = await getAllTagsForCache()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { productTagInfo } from '@/src/db/schema'\n\n const tagsData = await db\n .select({\n id: productTagInfo.id,\n tagName: productTagInfo.tagName,\n tagDescription: productTagInfo.tagDescription,\n imageUrl: productTagInfo.imageUrl,\n isDashboardTag: productTagInfo.isDashboardTag,\n relatedStores: productTagInfo.relatedStores,\n })\n .from(productTagInfo);\n */\n\n // Fetch product IDs for each tag\n const productTagsData = await getAllTagProductMappings()\n\n /*\n // Old implementation - direct DB queries:\n import { productTags } from '@/src/db/schema'\n import { inArray } from 'drizzle-orm'\n\n const tagIds = tagsData.map(t => t.id);\n const productTagsData = await db\n .select({\n tagId: productTags.tagId,\n productId: productTags.productId,\n })\n .from(productTags)\n .where(inArray(productTags.tagId, tagIds));\n */\n\n // Group product IDs by tag\n const productIdsByTag = new Map()\n for (const pt of productTagsData) {\n if (!productIdsByTag.has(pt.tagId)) {\n productIdsByTag.set(pt.tagId, [])\n }\n productIdsByTag.get(pt.tagId)!.push(pt.productId)\n }\n\n // Store each tag in Redis\n // for (const tag of tagsData) {\n // const signedImageUrl = tag.imageUrl\n // ? await generateSignedUrlFromS3Url(tag.imageUrl)\n // : null\n //\n // const tagObj: Tag = {\n // id: tag.id,\n // tagName: tag.tagName,\n // tagDescription: tag.tagDescription,\n // imageUrl: signedImageUrl,\n // isDashboardTag: tag.isDashboardTag,\n // relatedStores: (tag.relatedStores as number[]) || [],\n // productIds: productIdsByTag.get(tag.id) || [],\n // }\n //\n // await redisClient.set(`tag:${tag.id}`, JSON.stringify(tagObj))\n // }\n\n console.log('Product tag store initialized successfully')\n } catch (error) {\n console.error('Error initializing product tag store:', error)\n }\n}\n\nexport async function getTagById(id: number): Promise {\n try {\n // const key = `tag:${id}`\n // const data = await redisClient.get(key)\n // if (!data) return null\n // return JSON.parse(data) as Tag\n\n const tag = await getProductTagByIdFromDb(id)\n if (!tag) return null\n\n return transformTagToStoreTag(tag)\n } catch (error) {\n console.error(`Error getting tag ${id}:`, error)\n return null\n }\n}\n\nexport async function getAllTags(): Promise {\n try {\n // Get all keys matching the pattern \"tag:*\"\n // const keys = await redisClient.KEYS('tag:*')\n //\n // if (keys.length === 0) {\n // return []\n // }\n //\n // // Get all tags using MGET for better performance\n // const tagsData = await redisClient.MGET(keys)\n //\n // const tags: Tag[] = []\n // for (const tagData of tagsData) {\n // if (tagData) {\n // tags.push(JSON.parse(tagData) as Tag)\n // }\n // }\n //\n // return tags\n\n const tags = await getAllProductTags()\n\n const result: Tag[] = []\n for (const tag of tags) {\n result.push(await transformTagToStoreTag(tag))\n }\n return result\n } catch (error) {\n console.error('Error getting all tags:', error)\n return []\n }\n}\n\nexport async function getDashboardTags(): Promise {\n try {\n // Get all keys matching the pattern \"tag:*\"\n // const keys = await redisClient.KEYS('tag:*')\n //\n // if (keys.length === 0) {\n // return []\n // }\n //\n // // Get all tags using MGET for better performance\n // const tagsData = await redisClient.MGET(keys)\n //\n // const dashboardTags: Tag[] = []\n // for (const tagData of tagsData) {\n // if (tagData) {\n // const tag = JSON.parse(tagData) as Tag\n // if (tag.isDashboardTag) {\n // dashboardTags.push(tag)\n // }\n // }\n // }\n //\n // return dashboardTags\n\n const tags = await getAllProductTags()\n\n const result: Tag[] = []\n for (const tag of tags) {\n if (tag.isDashboardTag) {\n result.push(await transformTagToStoreTag(tag))\n }\n }\n return result\n } catch (error) {\n console.error('Error getting dashboard tags:', error)\n return []\n }\n}\n\nexport async function getTagsByStoreId(storeId: number): Promise {\n try {\n // Get all keys matching the pattern \"tag:*\"\n // const keys = await redisClient.KEYS('tag:*')\n //\n // if (keys.length === 0) {\n // return []\n // }\n //\n // // Get all tags using MGET for better performance\n // const tagsData = await redisClient.MGET(keys)\n //\n // const storeTags: Tag[] = []\n // for (const tagData of tagsData) {\n // if (tagData) {\n // const tag = JSON.parse(tagData) as Tag\n // if (tag.relatedStores.includes(storeId)) {\n // storeTags.push(tag)\n // }\n // }\n // }\n //\n // return storeTags\n\n const tags = await getAllProductTags()\n\n const result: Tag[] = []\n for (const tag of tags) {\n const relatedStores = (tag.relatedStores as number[]) || []\n if (relatedStores.includes(storeId)) {\n result.push(await transformTagToStoreTag(tag))\n }\n }\n return result\n } catch (error) {\n console.error(`Error getting tags for store ${storeId}:`, error)\n return []\n }\n}\n", "import { router, publicProcedure } from '@/src/trpc/trpc-index'\nimport {\n getSuspendedProductIds,\n getNextDeliveryDateWithCapacity,\n getStoresSummary,\n} from '@/src/dbService'\nimport { generateSignedUrlsFromS3Urls, generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport { getAllProducts as getAllProductsFromCache } from '@/src/stores/product-store'\nimport { getDashboardTags as getDashboardTagsFromCache } from '@/src/stores/product-tag-store'\n\n// Re-export with original name for backwards compatibility\nexport const getNextDeliveryDate = getNextDeliveryDateWithCapacity\n\nexport async function scaffoldProducts() {\n // Get all products from cache\n let products = await getAllProductsFromCache();\n products = products.filter(item => Boolean(item.id))\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { productInfo } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n // Get suspended product IDs to filter them out\n const suspendedProducts = await db\n .select({ id: productInfo.id })\n .from(productInfo)\n .where(eq(productInfo.isSuspended, true));\n */\n\n const suspendedProductIds = new Set(await getSuspendedProductIds());\n\n // Filter out suspended products\n products = products.filter(product => !suspendedProductIds.has(product.id));\n\n // Format products to match the expected response structure\n const formattedProducts = await Promise.all(\n products.map(async (product) => {\n const nextDeliveryDate = await getNextDeliveryDateWithCapacity(product.id);\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: parseFloat(product.price),\n marketPrice: product.marketPrice ? parseFloat(product.marketPrice) : null,\n unit: product.unitNotation,\n unitNotation: product.unitNotation,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n storeId: product.store?.id || null,\n isOutOfStock: product.isOutOfStock,\n isFlashAvailable: product.isFlashAvailable,\n nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null,\n images: product.images,\n flashPrice: product.flashPrice\n };\n })\n );\n\n return {\n products: formattedProducts,\n count: formattedProducts.length,\n };\n}\n\nexport const commonRouter = router({\n getDashboardTags: publicProcedure\n .query(async () => {\n // Get dashboard tags from cache\n const tags = await getDashboardTagsFromCache();\n\n return {\n tags: tags,\n };\n }),\n\n getAllProductsSummary: publicProcedure\n .query(async () => {\n const response = await scaffoldProducts();\n return response;\n }),\n\n /*\n // Old implementation - moved to common-trpc-index.ts:\n getStoresSummary: publicProcedure\n .query(async () => {\n const stores = await getStoresSummary();\n return { stores };\n }),\n\n healthCheck: publicProcedure\n .query(async () => {\n const result = await healthCheck();\n return result;\n }),\n */\n});\n", "import { Context } from 'hono';\nimport { scaffoldAssetUrl } from \"@/src/lib/s3-client\"\nimport { getNextDeliveryDate } from \"@/src/trpc/apis/common-apis/common\"\nimport {\n getAllProductsWithUnits,\n type ProductSummaryData,\n} from \"@/src/dbService\"\n\n/**\n * Get all products summary for dropdown\n */\nexport const getAllProductsSummary = async (c: Context) => {\n try {\n const tagId = c.req.query('tagId');\n const tagIdNum = tagId ? parseInt(tagId) : undefined;\n\n // If tagId is provided but no products found, return empty array\n if (tagIdNum) {\n const products = await getAllProductsWithUnits(tagIdNum);\n if (products.length === 0) {\n return c.json({\n products: [],\n count: 0,\n }, 200);\n }\n }\n\n const productsWithUnits = await getAllProductsWithUnits(tagIdNum);\n\n // Generate signed URLs for product images\n const formattedProducts = await Promise.all(\n productsWithUnits.map(async (product: ProductSummaryData) => {\n const nextDeliveryDate = await getNextDeliveryDate(product.id);\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n marketPrice: product.marketPrice,\n unit: product.unitShortNotation,\n productQuantity: product.productQuantity,\n isOutOfStock: product.isOutOfStock,\n nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null,\n images: scaffoldAssetUrl((product.images as string[]) || []),\n };\n })\n );\n\n return c.json({\n products: formattedProducts,\n count: formattedProducts.length,\n }, 200);\n } catch (error) {\n console.error(\"Get products summary error:\", error);\n return c.json({ error: \"Failed to fetch products summary\" }, 500);\n }\n};\n\n/*\n// Old implementation - direct DB queries:\nimport { eq, gt, and, sql, inArray } from \"drizzle-orm\";\nimport { db } from \"@/src/db/db_index\"\nimport { productInfo, units, productSlots, deliverySlotInfo, productTags } from \"@/src/db/schema\"\n\nconst getNextDeliveryDate = async (productId: number): Promise => {\n const result = await db\n .select({ deliveryTime: deliverySlotInfo.deliveryTime })\n .from(productSlots)\n .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n .where(\n and(\n eq(productSlots.productId, productId),\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, sql`NOW()`)\n )\n )\n .orderBy(deliverySlotInfo.deliveryTime)\n .limit(1);\n \n return result[0]?.deliveryTime || null;\n};\n\nexport const getAllProductsSummary = async (req: Request, res: Response) => {\n try {\n const { tagId } = req.query;\n const tagIdNum = tagId ? parseInt(tagId as string) : null;\n\n let productIds: number[] | null = null;\n\n // If tagId is provided, get products that have this tag\n if (tagIdNum) {\n const taggedProducts = await db\n .select({ productId: productTags.productId })\n .from(productTags)\n .where(eq(productTags.tagId, tagIdNum));\n\n productIds = taggedProducts.map(tp => tp.productId);\n }\n\n let whereCondition = undefined;\n\n // Filter by product IDs if tag filtering is applied\n if (productIds && productIds.length > 0) {\n whereCondition = inArray(productInfo.id, productIds);\n } else if (tagIdNum) {\n // If tagId was provided but no products found, return empty array\n return res.status(200).json({\n products: [],\n count: 0,\n });\n }\n\n const productsWithUnits = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n productQuantity: productInfo.productQuantity,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(whereCondition);\n\n // Generate signed URLs for product images\n const formattedProducts = await Promise.all(\n productsWithUnits.map(async (product) => {\n const nextDeliveryDate = await getNextDeliveryDate(product.id);\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n marketPrice: product.marketPrice,\n unit: product.unitShortNotation,\n productQuantity: product.productQuantity,\n isOutOfStock: product.isOutOfStock,\n nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null,\n images: scaffoldAssetUrl((product.images as string[]) || []),\n };\n })\n );\n\n return res.status(200).json({\n products: formattedProducts,\n count: formattedProducts.length,\n });\n } catch (error) {\n console.error(\"Get products summary error:\", error);\n return res.status(500).json({ error: \"Failed to fetch products summary\" });\n }\n};\n*/\n", "import { Hono } from 'hono';\nimport { getAllProductsSummary } from \"@/src/apis/common-apis/apis/common-product.controller\"\n\nconst router = new Hono();\n\nrouter.get(\"/summary\", getAllProductsSummary);\n\n\nconst commonProductsRouter= router;\nexport default commonProductsRouter;\n", "import { Hono } from 'hono';\nimport commonProductsRouter from \"@/src/apis/common-apis/apis/common-product.router\"\n\nconst router = new Hono();\n\nrouter.route('/products', commonProductsRouter)\n\nconst commonRouter = router;\n\nexport default commonRouter;\n", "import { Hono } from 'hono';\nimport avRouter from \"@/src/apis/admin-apis/apis/av-router\"\nimport commonRouter from \"@/src/apis/common-apis/apis/common.router\"\n\nconst router = new Hono();\n\nrouter.route('/av', avRouter);\nrouter.route('/cm', commonRouter);\n\nconst v1Router = router;\n\nexport default v1Router;\n", "import { Hono } from 'hono';\n\nconst router = new Hono();\n\nrouter.get('/', (c) => {\n return c.json({\n status: 'ok',\n message: 'Health check passed',\n timestamp: new Date().toISOString(),\n });\n});\n\nexport default router;\n", "import { Context, Next } from 'hono';\nimport { jwtVerify } from 'jose';\nimport { getStaffUserById, isUserSuspended } from '@/src/dbService';\nimport { ApiError } from '@/src/lib/api-error';\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter';\n\ninterface UserContext {\n userId: number;\n name?: string;\n email?: string;\n mobile?: string;\n}\n\ninterface StaffContext {\n id: number;\n name: string;\n}\n\nexport const authenticateUser = async (c: Context, next: Next) => {\n try {\n const authHeader = c.req.header('authorization');\n\n if (!authHeader?.startsWith('Bearer ')) {\n throw new ApiError('Authorization token required', 401);\n }\n\n const token = authHeader.substring(7);\n console.log(c.req.header)\n\n const { payload } = await jwtVerify(token, getEncodedJwtSecret());\n const decoded = payload as any;\n\n // Check if this is a staff token (has staffId)\n if (decoded.staffId) {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { staffUsers } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n const staff = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.id, decoded.staffId),\n });\n */\n\n // This is a staff token, verify staff exists\n const staff = await getStaffUserById(decoded.staffId);\n\n if (!staff) {\n throw new ApiError('Invalid staff token', 401);\n }\n\n c.set('staffUser', {\n id: staff.id,\n name: staff.name,\n });\n } else {\n // This is a regular user token\n c.set('user', decoded);\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { userDetails } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n const details = await db.query.userDetails.findFirst({\n where: eq(userDetails.userId, decoded.userId),\n });\n\n if (details?.isSuspended) {\n throw new ApiError('Account suspended', 403);\n }\n */\n\n // Check if user is suspended\n const suspended = await isUserSuspended(decoded.userId);\n\n if (suspended) {\n throw new ApiError('Account suspended', 403);\n }\n }\n\n await next();\n } catch (error) {\n throw error;\n }\n};\n", "import { Hono } from 'hono';\nimport avRouter from \"@/src/apis/admin-apis/apis/av-router\"\nimport { ApiError } from \"@/src/lib/api-error\"\nimport v1Router from \"@/src/v1-router\"\nimport testController from \"@/src/test-controller\"\nimport { authenticateUser } from \"@/src/middleware/auth.middleware\"\n\nconst router = new Hono();\n\n// Health check endpoints (no auth required)\nrouter.get('/health', (c) => {\n return c.json({\n status: 'OK',\n timestamp: new Date().toISOString(),\n uptime: process.uptime(),\n message: 'Hello world'\n });\n});\n\nrouter.get('/seed', (c) => {\n return c.json({\n status: 'OK',\n timestamp: new Date().toISOString(),\n uptime: process.uptime()\n });\n});\n\n// Apply authentication middleware to all subsequent routes\nrouter.use('*', authenticateUser);\n\nrouter.route('/v1', v1Router);\n// router.route('/av', avRouter);\nrouter.route('/test', testController);\n\nconst mainRouter = router;\n\nexport default mainRouter;\n", "/** A special constant with type `never` */\nexport const NEVER = Object.freeze({\n status: \"aborted\",\n});\nexport /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, params) {\n function init(inst, def) {\n if (!inst._zod) {\n Object.defineProperty(inst, \"_zod\", {\n value: {\n def,\n constr: _,\n traits: new Set(),\n },\n enumerable: false,\n });\n }\n if (inst._zod.traits.has(name)) {\n return;\n }\n inst._zod.traits.add(name);\n initializer(inst, def);\n // support prototype modifications\n const proto = _.prototype;\n const keys = Object.keys(proto);\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i];\n if (!(k in inst)) {\n inst[k] = proto[k].bind(inst);\n }\n }\n }\n // doesn't work if Parent has a constructor with arguments\n const Parent = params?.Parent ?? Object;\n class Definition extends Parent {\n }\n Object.defineProperty(Definition, \"name\", { value: name });\n function _(def) {\n var _a;\n const inst = params?.Parent ? new Definition() : this;\n init(inst, def);\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n for (const fn of inst._zod.deferred) {\n fn();\n }\n return inst;\n }\n Object.defineProperty(_, \"init\", { value: init });\n Object.defineProperty(_, Symbol.hasInstance, {\n value: (inst) => {\n if (params?.Parent && inst instanceof params.Parent)\n return true;\n return inst?._zod?.traits?.has(name);\n },\n });\n Object.defineProperty(_, \"name\", { value: name });\n return _;\n}\n////////////////////////////// UTILITIES ///////////////////////////////////////\nexport const $brand = Symbol(\"zod_brand\");\nexport class $ZodAsyncError extends Error {\n constructor() {\n super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n }\n}\nexport class $ZodEncodeError extends Error {\n constructor(name) {\n super(`Encountered unidirectional transform during encode: ${name}`);\n this.name = \"ZodEncodeError\";\n }\n}\nexport const globalConfig = {};\nexport function config(newConfig) {\n if (newConfig)\n Object.assign(globalConfig, newConfig);\n return globalConfig;\n}\n", "// functions\nexport function assertEqual(val) {\n return val;\n}\nexport function assertNotEqual(val) {\n return val;\n}\nexport function assertIs(_arg) { }\nexport function assertNever(_x) {\n throw new Error(\"Unexpected value in exhaustive check\");\n}\nexport function assert(_) { }\nexport function getEnumValues(entries) {\n const numericValues = Object.values(entries).filter((v) => typeof v === \"number\");\n const values = Object.entries(entries)\n .filter(([k, _]) => numericValues.indexOf(+k) === -1)\n .map(([_, v]) => v);\n return values;\n}\nexport function joinValues(array, separator = \"|\") {\n return array.map((val) => stringifyPrimitive(val)).join(separator);\n}\nexport function jsonStringifyReplacer(_, value) {\n if (typeof value === \"bigint\")\n return value.toString();\n return value;\n}\nexport function cached(getter) {\n const set = false;\n return {\n get value() {\n if (!set) {\n const value = getter();\n Object.defineProperty(this, \"value\", { value });\n return value;\n }\n throw new Error(\"cached value already set\");\n },\n };\n}\nexport function nullish(input) {\n return input === null || input === undefined;\n}\nexport function cleanRegex(source) {\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n return source.slice(start, end);\n}\nexport function floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepString = step.toString();\n let stepDecCount = (stepString.split(\".\")[1] || \"\").length;\n if (stepDecCount === 0 && /\\d?e-\\d?/.test(stepString)) {\n const match = stepString.match(/\\d?e-(\\d?)/);\n if (match?.[1]) {\n stepDecCount = Number.parseInt(match[1]);\n }\n }\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / 10 ** decCount;\n}\nconst EVALUATING = Symbol(\"evaluating\");\nexport function defineLazy(object, key, getter) {\n let value = undefined;\n Object.defineProperty(object, key, {\n get() {\n if (value === EVALUATING) {\n // Circular reference detected, return undefined to break the cycle\n return undefined;\n }\n if (value === undefined) {\n value = EVALUATING;\n value = getter();\n }\n return value;\n },\n set(v) {\n Object.defineProperty(object, key, {\n value: v,\n // configurable: true,\n });\n // object[key] = v;\n },\n configurable: true,\n });\n}\nexport function objectClone(obj) {\n return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));\n}\nexport function assignProp(target, prop, value) {\n Object.defineProperty(target, prop, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n}\nexport function mergeDefs(...defs) {\n const mergedDescriptors = {};\n for (const def of defs) {\n const descriptors = Object.getOwnPropertyDescriptors(def);\n Object.assign(mergedDescriptors, descriptors);\n }\n return Object.defineProperties({}, mergedDescriptors);\n}\nexport function cloneDef(schema) {\n return mergeDefs(schema._zod.def);\n}\nexport function getElementAtPath(obj, path) {\n if (!path)\n return obj;\n return path.reduce((acc, key) => acc?.[key], obj);\n}\nexport function promiseAllObject(promisesObj) {\n const keys = Object.keys(promisesObj);\n const promises = keys.map((key) => promisesObj[key]);\n return Promise.all(promises).then((results) => {\n const resolvedObj = {};\n for (let i = 0; i < keys.length; i++) {\n resolvedObj[keys[i]] = results[i];\n }\n return resolvedObj;\n });\n}\nexport function randomString(length = 10) {\n const chars = \"abcdefghijklmnopqrstuvwxyz\";\n let str = \"\";\n for (let i = 0; i < length; i++) {\n str += chars[Math.floor(Math.random() * chars.length)];\n }\n return str;\n}\nexport function esc(str) {\n return JSON.stringify(str);\n}\nexport function slugify(input) {\n return input\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/[\\s_-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\nexport const captureStackTrace = (\"captureStackTrace\" in Error ? Error.captureStackTrace : (..._args) => { });\nexport function isObject(data) {\n return typeof data === \"object\" && data !== null && !Array.isArray(data);\n}\nexport const allowsEval = cached(() => {\n // @ts-ignore\n if (typeof navigator !== \"undefined\" && navigator?.userAgent?.includes(\"Cloudflare\")) {\n return false;\n }\n try {\n const F = Function;\n new F(\"\");\n return true;\n }\n catch (_) {\n return false;\n }\n});\nexport function isPlainObject(o) {\n if (isObject(o) === false)\n return false;\n // modified constructor\n const ctor = o.constructor;\n if (ctor === undefined)\n return true;\n if (typeof ctor !== \"function\")\n return true;\n // modified prototype\n const prot = ctor.prototype;\n if (isObject(prot) === false)\n return false;\n // ctor doesn't have static `isPrototypeOf`\n if (Object.prototype.hasOwnProperty.call(prot, \"isPrototypeOf\") === false) {\n return false;\n }\n return true;\n}\nexport function shallowClone(o) {\n if (isPlainObject(o))\n return { ...o };\n if (Array.isArray(o))\n return [...o];\n return o;\n}\nexport function numKeys(data) {\n let keyCount = 0;\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n keyCount++;\n }\n }\n return keyCount;\n}\nexport const getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return \"undefined\";\n case \"string\":\n return \"string\";\n case \"number\":\n return Number.isNaN(data) ? \"nan\" : \"number\";\n case \"boolean\":\n return \"boolean\";\n case \"function\":\n return \"function\";\n case \"bigint\":\n return \"bigint\";\n case \"symbol\":\n return \"symbol\";\n case \"object\":\n if (Array.isArray(data)) {\n return \"array\";\n }\n if (data === null) {\n return \"null\";\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return \"promise\";\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return \"map\";\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return \"set\";\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return \"date\";\n }\n // @ts-ignore\n if (typeof File !== \"undefined\" && data instanceof File) {\n return \"file\";\n }\n return \"object\";\n default:\n throw new Error(`Unknown data type: ${t}`);\n }\n};\nexport const propertyKeyTypes = new Set([\"string\", \"number\", \"symbol\"]);\nexport const primitiveTypes = new Set([\"string\", \"number\", \"bigint\", \"boolean\", \"symbol\", \"undefined\"]);\nexport function escapeRegex(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n// zod-specific utils\nexport function clone(inst, def, params) {\n const cl = new inst._zod.constr(def ?? inst._zod.def);\n if (!def || params?.parent)\n cl._zod.parent = inst;\n return cl;\n}\nexport function normalizeParams(_params) {\n const params = _params;\n if (!params)\n return {};\n if (typeof params === \"string\")\n return { error: () => params };\n if (params?.message !== undefined) {\n if (params?.error !== undefined)\n throw new Error(\"Cannot specify both `message` and `error` params\");\n params.error = params.message;\n }\n delete params.message;\n if (typeof params.error === \"string\")\n return { ...params, error: () => params.error };\n return params;\n}\nexport function createTransparentProxy(getter) {\n let target;\n return new Proxy({}, {\n get(_, prop, receiver) {\n target ?? (target = getter());\n return Reflect.get(target, prop, receiver);\n },\n set(_, prop, value, receiver) {\n target ?? (target = getter());\n return Reflect.set(target, prop, value, receiver);\n },\n has(_, prop) {\n target ?? (target = getter());\n return Reflect.has(target, prop);\n },\n deleteProperty(_, prop) {\n target ?? (target = getter());\n return Reflect.deleteProperty(target, prop);\n },\n ownKeys(_) {\n target ?? (target = getter());\n return Reflect.ownKeys(target);\n },\n getOwnPropertyDescriptor(_, prop) {\n target ?? (target = getter());\n return Reflect.getOwnPropertyDescriptor(target, prop);\n },\n defineProperty(_, prop, descriptor) {\n target ?? (target = getter());\n return Reflect.defineProperty(target, prop, descriptor);\n },\n });\n}\nexport function stringifyPrimitive(value) {\n if (typeof value === \"bigint\")\n return value.toString() + \"n\";\n if (typeof value === \"string\")\n return `\"${value}\"`;\n return `${value}`;\n}\nexport function optionalKeys(shape) {\n return Object.keys(shape).filter((k) => {\n return shape[k]._zod.optin === \"optional\" && shape[k]._zod.optout === \"optional\";\n });\n}\nexport const NUMBER_FORMAT_RANGES = {\n safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],\n int32: [-2147483648, 2147483647],\n uint32: [0, 4294967295],\n float32: [-3.4028234663852886e38, 3.4028234663852886e38],\n float64: [-Number.MAX_VALUE, Number.MAX_VALUE],\n};\nexport const BIGINT_FORMAT_RANGES = {\n int64: [/* @__PURE__*/ BigInt(\"-9223372036854775808\"), /* @__PURE__*/ BigInt(\"9223372036854775807\")],\n uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt(\"18446744073709551615\")],\n};\nexport function pick(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".pick() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = {};\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n newShape[key] = currDef.shape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function omit(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".omit() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = { ...schema._zod.def.shape };\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n delete newShape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function extend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to extend: expected a plain object\");\n }\n const checks = schema._zod.def.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n // Only throw if new shape overlaps with existing shape\n // Use getOwnPropertyDescriptor to check key existence without accessing values\n const existingShape = schema._zod.def.shape;\n for (const key in shape) {\n if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {\n throw new Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\");\n }\n }\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function safeExtend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to safeExtend: expected a plain object\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function merge(a, b) {\n const def = mergeDefs(a._zod.def, {\n get shape() {\n const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n get catchall() {\n return b._zod.def.catchall;\n },\n checks: [], // delete existing checks\n });\n return clone(a, def);\n}\nexport function partial(Class, schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".partial() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in oldShape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n else {\n for (const key in oldShape) {\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function required(Class, schema, mask) {\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n else {\n for (const key in oldShape) {\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n });\n return clone(schema, def);\n}\n// invalid_type | too_big | too_small | invalid_format | not_multiple_of | unrecognized_keys | invalid_union | invalid_key | invalid_element | invalid_value | custom\nexport function aborted(x, startIndex = 0) {\n if (x.aborted === true)\n return true;\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue !== true) {\n return true;\n }\n }\n return false;\n}\nexport function prefixIssues(path, issues) {\n return issues.map((iss) => {\n var _a;\n (_a = iss).path ?? (_a.path = []);\n iss.path.unshift(path);\n return iss;\n });\n}\nexport function unwrapMessage(message) {\n return typeof message === \"string\" ? message : message?.message;\n}\nexport function finalizeIssue(iss, ctx, config) {\n const full = { ...iss, path: iss.path ?? [] };\n // for backwards compatibility\n if (!iss.message) {\n const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??\n unwrapMessage(ctx?.error?.(iss)) ??\n unwrapMessage(config.customError?.(iss)) ??\n unwrapMessage(config.localeError?.(iss)) ??\n \"Invalid input\";\n full.message = message;\n }\n // delete (full as any).def;\n delete full.inst;\n delete full.continue;\n if (!ctx?.reportInput) {\n delete full.input;\n }\n return full;\n}\nexport function getSizableOrigin(input) {\n if (input instanceof Set)\n return \"set\";\n if (input instanceof Map)\n return \"map\";\n // @ts-ignore\n if (input instanceof File)\n return \"file\";\n return \"unknown\";\n}\nexport function getLengthableOrigin(input) {\n if (Array.isArray(input))\n return \"array\";\n if (typeof input === \"string\")\n return \"string\";\n return \"unknown\";\n}\nexport function parsedType(data) {\n const t = typeof data;\n switch (t) {\n case \"number\": {\n return Number.isNaN(data) ? \"nan\" : \"number\";\n }\n case \"object\": {\n if (data === null) {\n return \"null\";\n }\n if (Array.isArray(data)) {\n return \"array\";\n }\n const obj = data;\n if (obj && Object.getPrototypeOf(obj) !== Object.prototype && \"constructor\" in obj && obj.constructor) {\n return obj.constructor.name;\n }\n }\n }\n return t;\n}\nexport function issue(...args) {\n const [iss, input, inst] = args;\n if (typeof iss === \"string\") {\n return {\n message: iss,\n code: \"custom\",\n input,\n inst,\n };\n }\n return { ...iss };\n}\nexport function cleanEnum(obj) {\n return Object.entries(obj)\n .filter(([k, _]) => {\n // return true if NaN, meaning it's not a number, thus a string key\n return Number.isNaN(Number.parseInt(k, 10));\n })\n .map((el) => el[1]);\n}\n// Codec utility functions\nexport function base64ToUint8Array(base64) {\n const binaryString = atob(base64);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n return bytes;\n}\nexport function uint8ArrayToBase64(bytes) {\n let binaryString = \"\";\n for (let i = 0; i < bytes.length; i++) {\n binaryString += String.fromCharCode(bytes[i]);\n }\n return btoa(binaryString);\n}\nexport function base64urlToUint8Array(base64url) {\n const base64 = base64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padding = \"=\".repeat((4 - (base64.length % 4)) % 4);\n return base64ToUint8Array(base64 + padding);\n}\nexport function uint8ArrayToBase64url(bytes) {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\nexport function hexToUint8Array(hex) {\n const cleanHex = hex.replace(/^0x/, \"\");\n if (cleanHex.length % 2 !== 0) {\n throw new Error(\"Invalid hex string length\");\n }\n const bytes = new Uint8Array(cleanHex.length / 2);\n for (let i = 0; i < cleanHex.length; i += 2) {\n bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);\n }\n return bytes;\n}\nexport function uint8ArrayToHex(bytes) {\n return Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n// instanceof\nexport class Class {\n constructor(..._args) { }\n}\n", "import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n Object.defineProperty(inst, \"_zod\", {\n value: inst._zod,\n enumerable: false,\n });\n Object.defineProperty(inst, \"issues\", {\n value: def,\n enumerable: false,\n });\n inst.message = JSON.stringify(def, util.jsonStringifyReplacer, 2);\n Object.defineProperty(inst, \"toString\", {\n value: () => inst.message,\n enumerable: false,\n });\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, { Parent: Error });\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues });\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues });\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a, _b;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, issue.path));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_b = curr.items)[el] ?? (_b[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * \u2716 Expected number, received string at \"username\n * favoriteNumbers[0]\n * \u2716 Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n const segs = [];\n const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`\u2716 ${issue.message}`);\n if (issue.path?.length)\n lines.push(` \u2192 at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\\n\");\n}\n", "import * as core from \"./core.js\";\nimport * as errors from \"./errors.js\";\nimport * as util from \"./util.js\";\nexport const _parse = (_Err) => (schema, value, _ctx, _params) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n if (result.issues.length) {\n const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, _params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parse = /* @__PURE__*/ _parse(errors.$ZodRealError);\nexport const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n if (result.issues.length) {\n const e = new (params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parseAsync = /* @__PURE__*/ _parseAsync(errors.$ZodRealError);\nexport const _safeParse = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n return result.issues.length\n ? {\n success: false,\n error: new (_Err ?? errors.$ZodError)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodRealError);\nexport const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n return result.issues.length\n ? {\n success: false,\n error: new _Err(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodRealError);\nexport const _encode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _parse(_Err)(schema, value, ctx);\n};\nexport const encode = /* @__PURE__*/ _encode(errors.$ZodRealError);\nexport const _decode = (_Err) => (schema, value, _ctx) => {\n return _parse(_Err)(schema, value, _ctx);\n};\nexport const decode = /* @__PURE__*/ _decode(errors.$ZodRealError);\nexport const _encodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _parseAsync(_Err)(schema, value, ctx);\n};\nexport const encodeAsync = /* @__PURE__*/ _encodeAsync(errors.$ZodRealError);\nexport const _decodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _parseAsync(_Err)(schema, value, _ctx);\n};\nexport const decodeAsync = /* @__PURE__*/ _decodeAsync(errors.$ZodRealError);\nexport const _safeEncode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _safeParse(_Err)(schema, value, ctx);\n};\nexport const safeEncode = /* @__PURE__*/ _safeEncode(errors.$ZodRealError);\nexport const _safeDecode = (_Err) => (schema, value, _ctx) => {\n return _safeParse(_Err)(schema, value, _ctx);\n};\nexport const safeDecode = /* @__PURE__*/ _safeDecode(errors.$ZodRealError);\nexport const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _safeParseAsync(_Err)(schema, value, ctx);\n};\nexport const safeEncodeAsync = /* @__PURE__*/ _safeEncodeAsync(errors.$ZodRealError);\nexport const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _safeParseAsync(_Err)(schema, value, _ctx);\n};\nexport const safeDecodeAsync = /* @__PURE__*/ _safeDecodeAsync(errors.$ZodRealError);\n", "import * as util from \"./util.js\";\nexport const cuid = /^[cC][^\\s-]{8,}$/;\nexport const cuid2 = /^[0-9a-z]+$/;\nexport const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;\nexport const xid = /^[0-9a-vA-V]{20}$/;\nexport const ksuid = /^[A-Za-z0-9]{27}$/;\nexport const nanoid = /^[a-zA-Z0-9_-]{21}$/;\n/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */\nexport const duration = /^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;\n/** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */\nexport const extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */\nexport const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;\n/** Returns a regex for validating an RFC 9562/4122 UUID.\n *\n * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */\nexport const uuid = (version) => {\n if (!version)\n return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;\n return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);\n};\nexport const uuid4 = /*@__PURE__*/ uuid(4);\nexport const uuid6 = /*@__PURE__*/ uuid(6);\nexport const uuid7 = /*@__PURE__*/ uuid(7);\n/** Practical email validation */\nexport const email = /^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;\n/** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */\nexport const html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n/** The classic emailregex.com regex for RFC 5322-compliant emails */\nexport const rfc5322Email = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n/** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */\nexport const unicodeEmail = /^[^\\s@\"]{1,64}@[^\\s@]{1,255}$/u;\nexport const idnEmail = unicodeEmail;\nexport const browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emoji = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nexport function emoji() {\n return new RegExp(_emoji, \"u\");\n}\nexport const ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\nexport const ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;\nexport const mac = (delimiter) => {\n const escapedDelim = util.escapeRegex(delimiter ?? \":\");\n return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);\n};\nexport const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/;\nexport const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nexport const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;\nexport const base64url = /^[A-Za-z0-9_-]*$/;\n// based on https://stackoverflow.com/questions/106179/regular-expression-to-match-dns-hostname-or-ip-address\n// export const hostname: RegExp = /^([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+$/;\nexport const hostname = /^(?=.{1,253}\\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\\.?$/;\nexport const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/;\n// https://blog.stevenlevithan.com/archives/validate-phone-number#r4-3 (regex sans spaces)\n// E.164: leading digit must be 1-9; total digits (excluding '+') between 7-15\nexport const e164 = /^\\+[1-9]\\d{6,14}$/;\n// const dateSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\nconst dateSource = `(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))`;\nexport const date = /*@__PURE__*/ new RegExp(`^${dateSource}$`);\nfunction timeSource(args) {\n const hhmm = `(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;\n const regex = typeof args.precision === \"number\"\n ? args.precision === -1\n ? `${hhmm}`\n : args.precision === 0\n ? `${hhmm}:[0-5]\\\\d`\n : `${hhmm}:[0-5]\\\\d\\\\.\\\\d{${args.precision}}`\n : `${hhmm}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`;\n return regex;\n}\nexport function time(args) {\n return new RegExp(`^${timeSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nexport function datetime(args) {\n const time = timeSource({ precision: args.precision });\n const opts = [\"Z\"];\n if (args.local)\n opts.push(\"\");\n // if (args.offset) opts.push(`([+-]\\\\d{2}:\\\\d{2})`);\n if (args.offset)\n opts.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);\n const timeRegex = `${time}(?:${opts.join(\"|\")})`;\n return new RegExp(`^${dateSource}T(?:${timeRegex})$`);\n}\nexport const string = (params) => {\n const regex = params ? `[\\\\s\\\\S]{${params?.minimum ?? 0},${params?.maximum ?? \"\"}}` : `[\\\\s\\\\S]*`;\n return new RegExp(`^${regex}$`);\n};\nexport const bigint = /^-?\\d+n?$/;\nexport const integer = /^-?\\d+$/;\nexport const number = /^-?\\d+(?:\\.\\d+)?$/;\nexport const boolean = /^(?:true|false)$/i;\nconst _null = /^null$/i;\nexport { _null as null };\nconst _undefined = /^undefined$/i;\nexport { _undefined as undefined };\n// regex for string with no uppercase letters\nexport const lowercase = /^[^A-Z]*$/;\n// regex for string with no lowercase letters\nexport const uppercase = /^[^a-z]*$/;\n// regex for hexadecimal strings (any length)\nexport const hex = /^[0-9a-fA-F]*$/;\n// Hash regexes for different algorithms and encodings\n// Helper function to create base64 regex with exact length and padding\nfunction fixedBase64(bodyLength, padding) {\n return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);\n}\n// Helper function to create base64url regex with exact length (no padding)\nfunction fixedBase64url(length) {\n return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);\n}\n// MD5 (16 bytes): base64 = 24 chars total (22 + \"==\")\nexport const md5_hex = /^[0-9a-fA-F]{32}$/;\nexport const md5_base64 = /*@__PURE__*/ fixedBase64(22, \"==\");\nexport const md5_base64url = /*@__PURE__*/ fixedBase64url(22);\n// SHA1 (20 bytes): base64 = 28 chars total (27 + \"=\")\nexport const sha1_hex = /^[0-9a-fA-F]{40}$/;\nexport const sha1_base64 = /*@__PURE__*/ fixedBase64(27, \"=\");\nexport const sha1_base64url = /*@__PURE__*/ fixedBase64url(27);\n// SHA256 (32 bytes): base64 = 44 chars total (43 + \"=\")\nexport const sha256_hex = /^[0-9a-fA-F]{64}$/;\nexport const sha256_base64 = /*@__PURE__*/ fixedBase64(43, \"=\");\nexport const sha256_base64url = /*@__PURE__*/ fixedBase64url(43);\n// SHA384 (48 bytes): base64 = 64 chars total (no padding)\nexport const sha384_hex = /^[0-9a-fA-F]{96}$/;\nexport const sha384_base64 = /*@__PURE__*/ fixedBase64(64, \"\");\nexport const sha384_base64url = /*@__PURE__*/ fixedBase64url(64);\n// SHA512 (64 bytes): base64 = 88 chars total (86 + \"==\")\nexport const sha512_hex = /^[0-9a-fA-F]{128}$/;\nexport const sha512_base64 = /*@__PURE__*/ fixedBase64(86, \"==\");\nexport const sha512_base64url = /*@__PURE__*/ fixedBase64url(86);\n", "// import { $ZodType } from \"./schemas.js\";\nimport * as core from \"./core.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nexport const $ZodCheck = /*@__PURE__*/ core.$constructor(\"$ZodCheck\", (inst, def) => {\n var _a;\n inst._zod ?? (inst._zod = {});\n inst._zod.def = def;\n (_a = inst._zod).onattach ?? (_a.onattach = []);\n});\nconst numericOriginMap = {\n number: \"number\",\n bigint: \"bigint\",\n object: \"date\",\n};\nexport const $ZodCheckLessThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckLessThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;\n if (def.value < curr) {\n if (def.inclusive)\n bag.maximum = def.value;\n else\n bag.exclusiveMaximum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckGreaterThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckGreaterThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;\n if (def.value > curr) {\n if (def.inclusive)\n bag.minimum = def.value;\n else\n bag.exclusiveMinimum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMultipleOf = \n/*@__PURE__*/ core.$constructor(\"$ZodCheckMultipleOf\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n var _a;\n (_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);\n });\n inst._zod.check = (payload) => {\n if (typeof payload.value !== typeof def.value)\n throw new Error(\"Cannot mix number and bigint in multiple_of check.\");\n const isMultiple = typeof payload.value === \"bigint\"\n ? payload.value % def.value === BigInt(0)\n : util.floatSafeRemainder(payload.value, def.value) === 0;\n if (isMultiple)\n return;\n payload.issues.push({\n origin: typeof payload.value,\n code: \"not_multiple_of\",\n divisor: def.value,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckNumberFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n def.format = def.format || \"float64\";\n const isInt = def.format?.includes(\"int\");\n const origin = isInt ? \"int\" : \"number\";\n const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n if (isInt)\n bag.pattern = regexes.integer;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (isInt) {\n if (!Number.isInteger(input)) {\n // invalid_format issue\n // payload.issues.push({\n // expected: def.format,\n // format: def.format,\n // code: \"invalid_format\",\n // input,\n // inst,\n // });\n // invalid_type issue\n payload.issues.push({\n expected: origin,\n format: def.format,\n code: \"invalid_type\",\n continue: false,\n input,\n inst,\n });\n return;\n // not_multiple_of issue\n // payload.issues.push({\n // code: \"not_multiple_of\",\n // origin: \"number\",\n // input,\n // inst,\n // divisor: 1,\n // });\n }\n if (!Number.isSafeInteger(input)) {\n if (input > 0) {\n // too_big\n payload.issues.push({\n input,\n code: \"too_big\",\n maximum: Number.MAX_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n else {\n // too_small\n payload.issues.push({\n input,\n code: \"too_small\",\n minimum: Number.MIN_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n return;\n }\n }\n if (input < minimum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_small\",\n minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckBigIntFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (input < minimum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_small\",\n minimum: minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckMaxSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size <= def.maximum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size >= def.minimum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckSizeEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckSizeEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.size;\n bag.maximum = def.size;\n bag.size = def.size;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size === def.size)\n return;\n const tooBig = size > def.size;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n ...(tooBig ? { code: \"too_big\", maximum: def.size } : { code: \"too_small\", minimum: def.size }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMaxLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length <= def.maximum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length >= def.minimum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckLengthEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.length;\n bag.maximum = def.length;\n bag.length = def.length;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length === def.length)\n return;\n const origin = util.getLengthableOrigin(input);\n const tooBig = length > def.length;\n payload.issues.push({\n origin,\n ...(tooBig ? { code: \"too_big\", maximum: def.length } : { code: \"too_small\", minimum: def.length }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckStringFormat\", (inst, def) => {\n var _a, _b;\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n if (def.pattern) {\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(def.pattern);\n }\n });\n if (def.pattern)\n (_a = inst._zod).check ?? (_a.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n ...(def.pattern ? { pattern: def.pattern.toString() } : {}),\n inst,\n continue: !def.abort,\n });\n });\n else\n (_b = inst._zod).check ?? (_b.check = () => { });\n});\nexport const $ZodCheckRegex = /*@__PURE__*/ core.$constructor(\"$ZodCheckRegex\", (inst, def) => {\n $ZodCheckStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"regex\",\n input: payload.value,\n pattern: def.pattern.toString(),\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLowerCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckLowerCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.lowercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckUpperCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckUpperCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.uppercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckIncludes = /*@__PURE__*/ core.$constructor(\"$ZodCheckIncludes\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const escapedRegex = util.escapeRegex(def.includes);\n const pattern = new RegExp(typeof def.position === \"number\" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);\n def.pattern = pattern;\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.includes(def.includes, def.position))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"includes\",\n includes: def.includes,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStartsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckStartsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.startsWith(def.prefix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"starts_with\",\n prefix: def.prefix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckEndsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckEndsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.endsWith(def.suffix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"ends_with\",\n suffix: def.suffix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n///////////////////////////////////\n///// $ZodCheckProperty /////\n///////////////////////////////////\nfunction handleCheckPropertyResult(result, payload, property) {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(property, result.issues));\n }\n}\nexport const $ZodCheckProperty = /*@__PURE__*/ core.$constructor(\"$ZodCheckProperty\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n const result = def.schema._zod.run({\n value: payload.value[def.property],\n issues: [],\n }, {});\n if (result instanceof Promise) {\n return result.then((result) => handleCheckPropertyResult(result, payload, def.property));\n }\n handleCheckPropertyResult(result, payload, def.property);\n return;\n };\n});\nexport const $ZodCheckMimeType = /*@__PURE__*/ core.$constructor(\"$ZodCheckMimeType\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const mimeSet = new Set(def.mime);\n inst._zod.onattach.push((inst) => {\n inst._zod.bag.mime = def.mime;\n });\n inst._zod.check = (payload) => {\n if (mimeSet.has(payload.value.type))\n return;\n payload.issues.push({\n code: \"invalid_value\",\n values: def.mime,\n input: payload.value.type,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckOverwrite = /*@__PURE__*/ core.$constructor(\"$ZodCheckOverwrite\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n payload.value = def.tx(payload.value);\n };\n});\n", "export class Doc {\n constructor(args = []) {\n this.content = [];\n this.indent = 0;\n if (this)\n this.args = args;\n }\n indented(fn) {\n this.indent += 1;\n fn(this);\n this.indent -= 1;\n }\n write(arg) {\n if (typeof arg === \"function\") {\n arg(this, { execution: \"sync\" });\n arg(this, { execution: \"async\" });\n return;\n }\n const content = arg;\n const lines = content.split(\"\\n\").filter((x) => x);\n const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));\n const dedented = lines.map((x) => x.slice(minIndent)).map((x) => \" \".repeat(this.indent * 2) + x);\n for (const line of dedented) {\n this.content.push(line);\n }\n }\n compile() {\n const F = Function;\n const args = this?.args;\n const content = this?.content ?? [``];\n const lines = [...content.map((x) => ` ${x}`)];\n // console.log(lines.join(\"\\n\"));\n return new F(...args, lines.join(\"\\n\"));\n }\n}\n", "export const version = {\n major: 4,\n minor: 3,\n patch: 6,\n};\n", "import * as checks from \"./checks.js\";\nimport * as core from \"./core.js\";\nimport { Doc } from \"./doc.js\";\nimport { parse, parseAsync, safeParse, safeParseAsync } from \"./parse.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nimport { version } from \"./versions.js\";\nexport const $ZodType = /*@__PURE__*/ core.$constructor(\"$ZodType\", (inst, def) => {\n var _a;\n inst ?? (inst = {});\n inst._zod.def = def; // set _def property\n inst._zod.bag = inst._zod.bag || {}; // initialize _bag object\n inst._zod.version = version;\n const checks = [...(inst._zod.def.checks ?? [])];\n // if inst is itself a checks.$ZodCheck, run it as a check\n if (inst._zod.traits.has(\"$ZodCheck\")) {\n checks.unshift(inst);\n }\n for (const ch of checks) {\n for (const fn of ch._zod.onattach) {\n fn(inst);\n }\n }\n if (checks.length === 0) {\n // deferred initializer\n // inst._zod.parse is not yet defined\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred?.push(() => {\n inst._zod.run = inst._zod.parse;\n });\n }\n else {\n const runChecks = (payload, checks, ctx) => {\n let isAborted = util.aborted(payload);\n let asyncResult;\n for (const ch of checks) {\n if (ch._zod.def.when) {\n const shouldRun = ch._zod.def.when(payload);\n if (!shouldRun)\n continue;\n }\n else if (isAborted) {\n continue;\n }\n const currLen = payload.issues.length;\n const _ = ch._zod.check(payload);\n if (_ instanceof Promise && ctx?.async === false) {\n throw new core.$ZodAsyncError();\n }\n if (asyncResult || _ instanceof Promise) {\n asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {\n await _;\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n return;\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n });\n }\n else {\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n continue;\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n }\n }\n if (asyncResult) {\n return asyncResult.then(() => {\n return payload;\n });\n }\n return payload;\n };\n const handleCanaryResult = (canary, payload, ctx) => {\n // abort if the canary is aborted\n if (util.aborted(canary)) {\n canary.aborted = true;\n return canary;\n }\n // run checks first, then\n const checkResult = runChecks(payload, checks, ctx);\n if (checkResult instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));\n }\n return inst._zod.parse(checkResult, ctx);\n };\n inst._zod.run = (payload, ctx) => {\n if (ctx.skipChecks) {\n return inst._zod.parse(payload, ctx);\n }\n if (ctx.direction === \"backward\") {\n // run canary\n // initial pass (no checks)\n const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });\n if (canary instanceof Promise) {\n return canary.then((canary) => {\n return handleCanaryResult(canary, payload, ctx);\n });\n }\n return handleCanaryResult(canary, payload, ctx);\n }\n // forward\n const result = inst._zod.parse(payload, ctx);\n if (result instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return result.then((result) => runChecks(result, checks, ctx));\n }\n return runChecks(result, checks, ctx);\n };\n }\n // Lazy initialize ~standard to avoid creating objects for every schema\n util.defineLazy(inst, \"~standard\", () => ({\n validate: (value) => {\n try {\n const r = safeParse(inst, value);\n return r.success ? { value: r.data } : { issues: r.error?.issues };\n }\n catch (_) {\n return safeParseAsync(inst, value).then((r) => (r.success ? { value: r.data } : { issues: r.error?.issues }));\n }\n },\n vendor: \"zod\",\n version: 1,\n }));\n});\nexport { clone } from \"./util.js\";\nexport const $ZodString = /*@__PURE__*/ core.$constructor(\"$ZodString\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? regexes.string(inst._zod.bag);\n inst._zod.parse = (payload, _) => {\n if (def.coerce)\n try {\n payload.value = String(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"string\")\n return payload;\n payload.issues.push({\n expected: \"string\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodStringFormat\", (inst, def) => {\n // check initialization must come first\n checks.$ZodCheckStringFormat.init(inst, def);\n $ZodString.init(inst, def);\n});\nexport const $ZodGUID = /*@__PURE__*/ core.$constructor(\"$ZodGUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.guid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodUUID = /*@__PURE__*/ core.$constructor(\"$ZodUUID\", (inst, def) => {\n if (def.version) {\n const versionMap = {\n v1: 1,\n v2: 2,\n v3: 3,\n v4: 4,\n v5: 5,\n v6: 6,\n v7: 7,\n v8: 8,\n };\n const v = versionMap[def.version];\n if (v === undefined)\n throw new Error(`Invalid UUID version: \"${def.version}\"`);\n def.pattern ?? (def.pattern = regexes.uuid(v));\n }\n else\n def.pattern ?? (def.pattern = regexes.uuid());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodEmail = /*@__PURE__*/ core.$constructor(\"$ZodEmail\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.email);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodURL = /*@__PURE__*/ core.$constructor(\"$ZodURL\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n try {\n // Trim whitespace from input\n const trimmed = payload.value.trim();\n // @ts-ignore\n const url = new URL(trimmed);\n if (def.hostname) {\n def.hostname.lastIndex = 0;\n if (!def.hostname.test(url.hostname)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid hostname\",\n pattern: def.hostname.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n }\n if (def.protocol) {\n def.protocol.lastIndex = 0;\n if (!def.protocol.test(url.protocol.endsWith(\":\") ? url.protocol.slice(0, -1) : url.protocol)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid protocol\",\n pattern: def.protocol.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n }\n // Set the output value based on normalize flag\n if (def.normalize) {\n // Use normalized URL\n payload.value = url.href;\n }\n else {\n // Preserve the original input (trimmed)\n payload.value = trimmed;\n }\n return;\n }\n catch (_) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodEmoji = /*@__PURE__*/ core.$constructor(\"$ZodEmoji\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.emoji());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodNanoID = /*@__PURE__*/ core.$constructor(\"$ZodNanoID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.nanoid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID = /*@__PURE__*/ core.$constructor(\"$ZodCUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID2 = /*@__PURE__*/ core.$constructor(\"$ZodCUID2\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid2);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodULID = /*@__PURE__*/ core.$constructor(\"$ZodULID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ulid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodXID = /*@__PURE__*/ core.$constructor(\"$ZodXID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.xid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodKSUID = /*@__PURE__*/ core.$constructor(\"$ZodKSUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ksuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODateTime = /*@__PURE__*/ core.$constructor(\"$ZodISODateTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.datetime(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODate = /*@__PURE__*/ core.$constructor(\"$ZodISODate\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.date);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISOTime = /*@__PURE__*/ core.$constructor(\"$ZodISOTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.time(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODuration = /*@__PURE__*/ core.$constructor(\"$ZodISODuration\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.duration);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodIPv4 = /*@__PURE__*/ core.$constructor(\"$ZodIPv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv4);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv4`;\n});\nexport const $ZodIPv6 = /*@__PURE__*/ core.$constructor(\"$ZodIPv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv6);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv6`;\n inst._zod.check = (payload) => {\n try {\n // @ts-ignore\n new URL(`http://[${payload.value}]`);\n // return;\n }\n catch {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"ipv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodMAC = /*@__PURE__*/ core.$constructor(\"$ZodMAC\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.mac(def.delimiter));\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `mac`;\n});\nexport const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv4);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n const parts = payload.value.split(\"/\");\n try {\n if (parts.length !== 2)\n throw new Error();\n const [address, prefix] = parts;\n if (!prefix)\n throw new Error();\n const prefixNum = Number(prefix);\n if (`${prefixNum}` !== prefix)\n throw new Error();\n if (prefixNum < 0 || prefixNum > 128)\n throw new Error();\n // @ts-ignore\n new URL(`http://[${address}]`);\n }\n catch {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"cidrv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64(data) {\n if (data === \"\")\n return true;\n if (data.length % 4 !== 0)\n return false;\n try {\n // @ts-ignore\n atob(data);\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodBase64 = /*@__PURE__*/ core.$constructor(\"$ZodBase64\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64\";\n inst._zod.check = (payload) => {\n if (isValidBase64(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64URL(data) {\n if (!regexes.base64url.test(data))\n return false;\n const base64 = data.replace(/[-_]/g, (c) => (c === \"-\" ? \"+\" : \"/\"));\n const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, \"=\");\n return isValidBase64(padded);\n}\nexport const $ZodBase64URL = /*@__PURE__*/ core.$constructor(\"$ZodBase64URL\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64url);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64url\";\n inst._zod.check = (payload) => {\n if (isValidBase64URL(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodE164 = /*@__PURE__*/ core.$constructor(\"$ZodE164\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.e164);\n $ZodStringFormat.init(inst, def);\n});\n////////////////////////////// ZodJWT //////////////////////////////\nexport function isValidJWT(token, algorithm = null) {\n try {\n const tokensParts = token.split(\".\");\n if (tokensParts.length !== 3)\n return false;\n const [header] = tokensParts;\n if (!header)\n return false;\n // @ts-ignore\n const parsedHeader = JSON.parse(atob(header));\n if (\"typ\" in parsedHeader && parsedHeader?.typ !== \"JWT\")\n return false;\n if (!parsedHeader.alg)\n return false;\n if (algorithm && (!(\"alg\" in parsedHeader) || parsedHeader.alg !== algorithm))\n return false;\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodJWT = /*@__PURE__*/ core.$constructor(\"$ZodJWT\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidJWT(payload.value, def.alg))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"jwt\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCustomStringFormat\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (def.fn(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodNumber = /*@__PURE__*/ core.$constructor(\"$ZodNumber\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Number(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"number\" && !Number.isNaN(input) && Number.isFinite(input)) {\n return payload;\n }\n const received = typeof input === \"number\"\n ? Number.isNaN(input)\n ? \"NaN\"\n : !Number.isFinite(input)\n ? \"Infinity\"\n : undefined\n : undefined;\n payload.issues.push({\n expected: \"number\",\n code: \"invalid_type\",\n input,\n inst,\n ...(received ? { received } : {}),\n });\n return payload;\n };\n});\nexport const $ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodNumberFormat\", (inst, def) => {\n checks.$ZodCheckNumberFormat.init(inst, def);\n $ZodNumber.init(inst, def); // no format checks\n});\nexport const $ZodBoolean = /*@__PURE__*/ core.$constructor(\"$ZodBoolean\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.boolean;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Boolean(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"boolean\")\n return payload;\n payload.issues.push({\n expected: \"boolean\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigInt = /*@__PURE__*/ core.$constructor(\"$ZodBigInt\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.bigint;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = BigInt(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"bigint\")\n return payload;\n payload.issues.push({\n expected: \"bigint\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodBigIntFormat\", (inst, def) => {\n checks.$ZodCheckBigIntFormat.init(inst, def);\n $ZodBigInt.init(inst, def); // no format checks\n});\nexport const $ZodSymbol = /*@__PURE__*/ core.$constructor(\"$ZodSymbol\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"symbol\")\n return payload;\n payload.issues.push({\n expected: \"symbol\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodUndefined = /*@__PURE__*/ core.$constructor(\"$ZodUndefined\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.undefined;\n inst._zod.values = new Set([undefined]);\n inst._zod.optin = \"optional\";\n inst._zod.optout = \"optional\";\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"undefined\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodNull = /*@__PURE__*/ core.$constructor(\"$ZodNull\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.null;\n inst._zod.values = new Set([null]);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (input === null)\n return payload;\n payload.issues.push({\n expected: \"null\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodAny = /*@__PURE__*/ core.$constructor(\"$ZodAny\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodUnknown = /*@__PURE__*/ core.$constructor(\"$ZodUnknown\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodNever = /*@__PURE__*/ core.$constructor(\"$ZodNever\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n payload.issues.push({\n expected: \"never\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodVoid = /*@__PURE__*/ core.$constructor(\"$ZodVoid\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"void\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodDate = /*@__PURE__*/ core.$constructor(\"$ZodDate\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce) {\n try {\n payload.value = new Date(payload.value);\n }\n catch (_err) { }\n }\n const input = payload.value;\n const isDate = input instanceof Date;\n const isValidDate = isDate && !Number.isNaN(input.getTime());\n if (isValidDate)\n return payload;\n payload.issues.push({\n expected: \"date\",\n code: \"invalid_type\",\n input,\n ...(isDate ? { received: \"Invalid Date\" } : {}),\n inst,\n });\n return payload;\n };\n});\nfunction handleArrayResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodArray = /*@__PURE__*/ core.$constructor(\"$ZodArray\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n expected: \"array\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = Array(input.length);\n const proms = [];\n for (let i = 0; i < input.length; i++) {\n const item = input[i];\n const result = def.element._zod.run({\n value: item,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleArrayResult(result, payload, i)));\n }\n else {\n handleArrayResult(result, payload, i);\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload; //handleArrayResultsAsync(parseResults, final);\n };\n});\nfunction handlePropertyResult(result, final, key, input, isOptionalOut) {\n if (result.issues.length) {\n // For optional-out schemas, ignore errors on absent keys\n if (isOptionalOut && !(key in input)) {\n return;\n }\n final.issues.push(...util.prefixIssues(key, result.issues));\n }\n if (result.value === undefined) {\n if (key in input) {\n final.value[key] = undefined;\n }\n }\n else {\n final.value[key] = result.value;\n }\n}\nfunction normalizeDef(def) {\n const keys = Object.keys(def.shape);\n for (const k of keys) {\n if (!def.shape?.[k]?._zod?.traits?.has(\"$ZodType\")) {\n throw new Error(`Invalid element at key \"${k}\": expected a Zod schema`);\n }\n }\n const okeys = util.optionalKeys(def.shape);\n return {\n ...def,\n keys,\n keySet: new Set(keys),\n numKeys: keys.length,\n optionalKeys: new Set(okeys),\n };\n}\nfunction handleCatchall(proms, input, payload, ctx, def, inst) {\n const unrecognized = [];\n // iterate over input keys\n const keySet = def.keySet;\n const _catchall = def.catchall._zod;\n const t = _catchall.def.type;\n const isOptionalOut = _catchall.optout === \"optional\";\n for (const key in input) {\n if (keySet.has(key))\n continue;\n if (t === \"never\") {\n unrecognized.push(key);\n continue;\n }\n const r = _catchall.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n }\n else {\n handlePropertyResult(r, payload, key, input, isOptionalOut);\n }\n }\n if (unrecognized.length) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n keys: unrecognized,\n input,\n inst,\n });\n }\n if (!proms.length)\n return payload;\n return Promise.all(proms).then(() => {\n return payload;\n });\n}\nexport const $ZodObject = /*@__PURE__*/ core.$constructor(\"$ZodObject\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodType.init(inst, def);\n // const sh = def.shape;\n const desc = Object.getOwnPropertyDescriptor(def, \"shape\");\n if (!desc?.get) {\n const sh = def.shape;\n Object.defineProperty(def, \"shape\", {\n get: () => {\n const newSh = { ...sh };\n Object.defineProperty(def, \"shape\", {\n value: newSh,\n });\n return newSh;\n },\n });\n }\n const _normalized = util.cached(() => normalizeDef(def));\n util.defineLazy(inst._zod, \"propValues\", () => {\n const shape = def.shape;\n const propValues = {};\n for (const key in shape) {\n const field = shape[key]._zod;\n if (field.values) {\n propValues[key] ?? (propValues[key] = new Set());\n for (const v of field.values)\n propValues[key].add(v);\n }\n }\n return propValues;\n });\n const isObject = util.isObject;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = {};\n const proms = [];\n const shape = value.shape;\n for (const key of value.keys) {\n const el = shape[key];\n const isOptionalOut = el._zod.optout === \"optional\";\n const r = el._zod.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n }\n else {\n handlePropertyResult(r, payload, key, input, isOptionalOut);\n }\n }\n if (!catchall) {\n return proms.length ? Promise.all(proms).then(() => payload) : payload;\n }\n return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);\n };\n});\nexport const $ZodObjectJIT = /*@__PURE__*/ core.$constructor(\"$ZodObjectJIT\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodObject.init(inst, def);\n const superParse = inst._zod.parse;\n const _normalized = util.cached(() => normalizeDef(def));\n const generateFastpass = (shape) => {\n const doc = new Doc([\"shape\", \"payload\", \"ctx\"]);\n const normalized = _normalized.value;\n const parseStr = (key) => {\n const k = util.esc(key);\n return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;\n };\n doc.write(`const input = payload.value;`);\n const ids = Object.create(null);\n let counter = 0;\n for (const key of normalized.keys) {\n ids[key] = `key_${counter++}`;\n }\n // A: preserve key order {\n doc.write(`const newResult = {};`);\n for (const key of normalized.keys) {\n const id = ids[key];\n const k = util.esc(key);\n const schema = shape[key];\n const isOptionalOut = schema?._zod?.optout === \"optional\";\n doc.write(`const ${id} = ${parseStr(key)};`);\n if (isOptionalOut) {\n // For optional-out schemas, ignore errors on absent keys\n doc.write(`\n if (${id}.issues.length) {\n if (${k} in input) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n }\n \n if (${id}.value === undefined) {\n if (${k} in input) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n \n `);\n }\n else {\n doc.write(`\n if (${id}.issues.length) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n \n if (${id}.value === undefined) {\n if (${k} in input) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n \n `);\n }\n }\n doc.write(`payload.value = newResult;`);\n doc.write(`return payload;`);\n const fn = doc.compile();\n return (payload, ctx) => fn(shape, payload, ctx);\n };\n let fastpass;\n const isObject = util.isObject;\n const jit = !core.globalConfig.jitless;\n const allowsEval = util.allowsEval;\n const fastEnabled = jit && allowsEval.value; // && !def.catchall;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {\n // always synchronous\n if (!fastpass)\n fastpass = generateFastpass(def.shape);\n payload = fastpass(payload, ctx);\n if (!catchall)\n return payload;\n return handleCatchall([], input, payload, ctx, value, inst);\n }\n return superParse(payload, ctx);\n };\n});\nfunction handleUnionResults(results, final, inst, ctx) {\n for (const result of results) {\n if (result.issues.length === 0) {\n final.value = result.value;\n return final;\n }\n }\n const nonaborted = results.filter((r) => !util.aborted(r));\n if (nonaborted.length === 1) {\n final.value = nonaborted[0].value;\n return nonaborted[0];\n }\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n return final;\n}\nexport const $ZodUnion = /*@__PURE__*/ core.$constructor(\"$ZodUnion\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.options.some((o) => o._zod.optin === \"optional\") ? \"optional\" : undefined);\n util.defineLazy(inst._zod, \"optout\", () => def.options.some((o) => o._zod.optout === \"optional\") ? \"optional\" : undefined);\n util.defineLazy(inst._zod, \"values\", () => {\n if (def.options.every((o) => o._zod.values)) {\n return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));\n }\n return undefined;\n });\n util.defineLazy(inst._zod, \"pattern\", () => {\n if (def.options.every((o) => o._zod.pattern)) {\n const patterns = def.options.map((o) => o._zod.pattern);\n return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join(\"|\")})$`);\n }\n return undefined;\n });\n const single = def.options.length === 1;\n const first = def.options[0]._zod.run;\n inst._zod.parse = (payload, ctx) => {\n if (single) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n if (result.issues.length === 0)\n return result;\n results.push(result);\n }\n }\n if (!async)\n return handleUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleUnionResults(results, payload, inst, ctx);\n });\n };\n});\nfunction handleExclusiveUnionResults(results, final, inst, ctx) {\n const successes = results.filter((r) => r.issues.length === 0);\n if (successes.length === 1) {\n final.value = successes[0].value;\n return final;\n }\n if (successes.length === 0) {\n // No matches - same as regular union\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n }\n else {\n // Multiple matches - exclusive union failure\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: [],\n inclusive: false,\n });\n }\n return final;\n}\nexport const $ZodXor = /*@__PURE__*/ core.$constructor(\"$ZodXor\", (inst, def) => {\n $ZodUnion.init(inst, def);\n def.inclusive = false;\n const single = def.options.length === 1;\n const first = def.options[0]._zod.run;\n inst._zod.parse = (payload, ctx) => {\n if (single) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n results.push(result);\n }\n }\n if (!async)\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n });\n };\n});\nexport const $ZodDiscriminatedUnion = \n/*@__PURE__*/\ncore.$constructor(\"$ZodDiscriminatedUnion\", (inst, def) => {\n def.inclusive = false;\n $ZodUnion.init(inst, def);\n const _super = inst._zod.parse;\n util.defineLazy(inst._zod, \"propValues\", () => {\n const propValues = {};\n for (const option of def.options) {\n const pv = option._zod.propValues;\n if (!pv || Object.keys(pv).length === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(option)}\"`);\n for (const [k, v] of Object.entries(pv)) {\n if (!propValues[k])\n propValues[k] = new Set();\n for (const val of v) {\n propValues[k].add(val);\n }\n }\n }\n return propValues;\n });\n const disc = util.cached(() => {\n const opts = def.options;\n const map = new Map();\n for (const o of opts) {\n const values = o._zod.propValues?.[def.discriminator];\n if (!values || values.size === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(o)}\"`);\n for (const v of values) {\n if (map.has(v)) {\n throw new Error(`Duplicate discriminator value \"${String(v)}\"`);\n }\n map.set(v, o);\n }\n }\n return map;\n });\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isObject(input)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"object\",\n input,\n inst,\n });\n return payload;\n }\n const opt = disc.value.get(input?.[def.discriminator]);\n if (opt) {\n return opt._zod.run(payload, ctx);\n }\n if (def.unionFallback) {\n return _super(payload, ctx);\n }\n // no matching discriminator\n payload.issues.push({\n code: \"invalid_union\",\n errors: [],\n note: \"No matching discriminator\",\n discriminator: def.discriminator,\n input,\n path: [def.discriminator],\n inst,\n });\n return payload;\n };\n});\nexport const $ZodIntersection = /*@__PURE__*/ core.$constructor(\"$ZodIntersection\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n const left = def.left._zod.run({ value: input, issues: [] }, ctx);\n const right = def.right._zod.run({ value: input, issues: [] }, ctx);\n const async = left instanceof Promise || right instanceof Promise;\n if (async) {\n return Promise.all([left, right]).then(([left, right]) => {\n return handleIntersectionResults(payload, left, right);\n });\n }\n return handleIntersectionResults(payload, left, right);\n };\n});\nfunction mergeValues(a, b) {\n // const aType = parse.t(a);\n // const bType = parse.t(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n if (a instanceof Date && b instanceof Date && +a === +b) {\n return { valid: true, data: a };\n }\n if (util.isPlainObject(a) && util.isPlainObject(b)) {\n const bKeys = Object.keys(b);\n const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [key, ...sharedValue.mergeErrorPath],\n };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) {\n return { valid: false, mergeErrorPath: [] };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [index, ...sharedValue.mergeErrorPath],\n };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n return { valid: false, mergeErrorPath: [] };\n}\nfunction handleIntersectionResults(result, left, right) {\n // Track which side(s) report each key as unrecognized\n const unrecKeys = new Map();\n let unrecIssue;\n for (const iss of left.issues) {\n if (iss.code === \"unrecognized_keys\") {\n unrecIssue ?? (unrecIssue = iss);\n for (const k of iss.keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k).l = true;\n }\n }\n else {\n result.issues.push(iss);\n }\n }\n for (const iss of right.issues) {\n if (iss.code === \"unrecognized_keys\") {\n for (const k of iss.keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k).r = true;\n }\n }\n else {\n result.issues.push(iss);\n }\n }\n // Report only keys unrecognized by BOTH sides\n const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);\n if (bothKeys.length && unrecIssue) {\n result.issues.push({ ...unrecIssue, keys: bothKeys });\n }\n if (util.aborted(result))\n return result;\n const merged = mergeValues(left.value, right.value);\n if (!merged.valid) {\n throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);\n }\n result.value = merged.data;\n return result;\n}\nexport const $ZodTuple = /*@__PURE__*/ core.$constructor(\"$ZodTuple\", (inst, def) => {\n $ZodType.init(inst, def);\n const items = def.items;\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n input,\n inst,\n expected: \"tuple\",\n code: \"invalid_type\",\n });\n return payload;\n }\n payload.value = [];\n const proms = [];\n const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== \"optional\");\n const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;\n if (!def.rest) {\n const tooBig = input.length > items.length;\n const tooSmall = input.length < optStart - 1;\n if (tooBig || tooSmall) {\n payload.issues.push({\n ...(tooBig\n ? { code: \"too_big\", maximum: items.length, inclusive: true }\n : { code: \"too_small\", minimum: items.length }),\n input,\n inst,\n origin: \"array\",\n });\n return payload;\n }\n }\n let i = -1;\n for (const item of items) {\n i++;\n if (i >= input.length)\n if (i >= optStart)\n continue;\n const result = item._zod.run({\n value: input[i],\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleTupleResult(result, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n if (def.rest) {\n const rest = input.slice(items.length);\n for (const el of rest) {\n i++;\n const result = def.rest._zod.run({\n value: el,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleTupleResult(result, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleTupleResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodRecord = /*@__PURE__*/ core.$constructor(\"$ZodRecord\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isPlainObject(input)) {\n payload.issues.push({\n expected: \"record\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n const values = def.keyType._zod.values;\n if (values) {\n payload.value = {};\n const recordKeys = new Set();\n for (const key of values) {\n if (typeof key === \"string\" || typeof key === \"number\" || typeof key === \"symbol\") {\n recordKeys.add(typeof key === \"number\" ? key.toString() : key);\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[key] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[key] = result.value;\n }\n }\n }\n let unrecognized;\n for (const key in input) {\n if (!recordKeys.has(key)) {\n unrecognized = unrecognized ?? [];\n unrecognized.push(key);\n }\n }\n if (unrecognized && unrecognized.length > 0) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n input,\n inst,\n keys: unrecognized,\n });\n }\n }\n else {\n payload.value = {};\n for (const key of Reflect.ownKeys(input)) {\n if (key === \"__proto__\")\n continue;\n let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n if (keyResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n // Numeric string fallback: if key is a numeric string and failed, retry with Number(key)\n // This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals\n const checkNumericKey = typeof key === \"string\" && regexes.number.test(key) && keyResult.issues.length;\n if (checkNumericKey) {\n const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);\n if (retryResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n if (retryResult.issues.length === 0) {\n keyResult = retryResult;\n }\n }\n if (keyResult.issues.length) {\n if (def.mode === \"loose\") {\n // Pass through unchanged\n payload.value[key] = input[key];\n }\n else {\n // Default \"strict\" behavior: error on invalid key\n payload.issues.push({\n code: \"invalid_key\",\n origin: \"record\",\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n input: key,\n path: [key],\n inst,\n });\n }\n continue;\n }\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[keyResult.value] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[keyResult.value] = result.value;\n }\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload;\n };\n});\nexport const $ZodMap = /*@__PURE__*/ core.$constructor(\"$ZodMap\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Map)) {\n payload.issues.push({\n expected: \"map\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n payload.value = new Map();\n for (const [key, value] of input) {\n const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);\n if (keyResult instanceof Promise || valueResult instanceof Promise) {\n proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }));\n }\n else {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {\n if (keyResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, keyResult.issues));\n }\n else {\n final.issues.push({\n code: \"invalid_key\",\n origin: \"map\",\n input,\n inst,\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n if (valueResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, valueResult.issues));\n }\n else {\n final.issues.push({\n origin: \"map\",\n code: \"invalid_element\",\n input,\n inst,\n key: key,\n issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n final.value.set(keyResult.value, valueResult.value);\n}\nexport const $ZodSet = /*@__PURE__*/ core.$constructor(\"$ZodSet\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Set)) {\n payload.issues.push({\n input,\n inst,\n expected: \"set\",\n code: \"invalid_type\",\n });\n return payload;\n }\n const proms = [];\n payload.value = new Set();\n for (const item of input) {\n const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleSetResult(result, payload)));\n }\n else\n handleSetResult(result, payload);\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleSetResult(result, final) {\n if (result.issues.length) {\n final.issues.push(...result.issues);\n }\n final.value.add(result.value);\n}\nexport const $ZodEnum = /*@__PURE__*/ core.$constructor(\"$ZodEnum\", (inst, def) => {\n $ZodType.init(inst, def);\n const values = util.getEnumValues(def.entries);\n const valuesSet = new Set(values);\n inst._zod.values = valuesSet;\n inst._zod.pattern = new RegExp(`^(${values\n .filter((k) => util.propertyKeyTypes.has(typeof k))\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o.toString()))\n .join(\"|\")})$`);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (valuesSet.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodLiteral = /*@__PURE__*/ core.$constructor(\"$ZodLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n if (def.values.length === 0) {\n throw new Error(\"Cannot create literal schema with no valid values\");\n }\n const values = new Set(def.values);\n inst._zod.values = values;\n inst._zod.pattern = new RegExp(`^(${def.values\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o)))\n .join(\"|\")})$`);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (values.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values: def.values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodFile = /*@__PURE__*/ core.$constructor(\"$ZodFile\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n // @ts-ignore\n if (input instanceof File)\n return payload;\n payload.issues.push({\n expected: \"file\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodTransform = /*@__PURE__*/ core.$constructor(\"$ZodTransform\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n const _out = def.transform(payload.value, payload);\n if (ctx.async) {\n const output = _out instanceof Promise ? _out : Promise.resolve(_out);\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n if (_out instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n payload.value = _out;\n return payload;\n };\n});\nfunction handleOptionalResult(result, input) {\n if (result.issues.length && input === undefined) {\n return { issues: [], value: undefined };\n }\n return result;\n}\nexport const $ZodOptional = /*@__PURE__*/ core.$constructor(\"$ZodOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n inst._zod.optout = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => {\n return def.innerType._zod.values ? new Set([...def.innerType._zod.values, undefined]) : undefined;\n });\n util.defineLazy(inst._zod, \"pattern\", () => {\n const pattern = def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n if (def.innerType._zod.optin === \"optional\") {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise)\n return result.then((r) => handleOptionalResult(r, payload.value));\n return handleOptionalResult(result, payload.value);\n }\n if (payload.value === undefined) {\n return payload;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodExactOptional = /*@__PURE__*/ core.$constructor(\"$ZodExactOptional\", (inst, def) => {\n // Call parent init - inherits optin/optout = \"optional\"\n $ZodOptional.init(inst, def);\n // Override values/pattern to NOT add undefined\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n util.defineLazy(inst._zod, \"pattern\", () => def.innerType._zod.pattern);\n // Override parse to just delegate (no undefined handling)\n inst._zod.parse = (payload, ctx) => {\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNullable = /*@__PURE__*/ core.$constructor(\"$ZodNullable\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n util.defineLazy(inst._zod, \"pattern\", () => {\n const pattern = def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;\n });\n util.defineLazy(inst._zod, \"values\", () => {\n return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n // Forward direction (decode): allow null to pass through\n if (payload.value === null)\n return payload;\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodDefault = /*@__PURE__*/ core.$constructor(\"$ZodDefault\", (inst, def) => {\n $ZodType.init(inst, def);\n // inst._zod.qin = \"true\";\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply defaults for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n /**\n * $ZodDefault returns the default value immediately in forward direction.\n * It doesn't pass the default value into the validator (\"prefault\"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a \"prefault\" for the pipe. */\n return payload;\n }\n // Forward direction: continue with default handling\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleDefaultResult(result, def));\n }\n return handleDefaultResult(result, def);\n };\n});\nfunction handleDefaultResult(payload, def) {\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return payload;\n}\nexport const $ZodPrefault = /*@__PURE__*/ core.$constructor(\"$ZodPrefault\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply prefault for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNonOptional = /*@__PURE__*/ core.$constructor(\"$ZodNonOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => {\n const v = def.innerType._zod.values;\n return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleNonOptionalResult(result, inst));\n }\n return handleNonOptionalResult(result, inst);\n };\n});\nfunction handleNonOptionalResult(payload, inst) {\n if (!payload.issues.length && payload.value === undefined) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: payload.value,\n inst,\n });\n }\n return payload;\n}\nexport const $ZodSuccess = /*@__PURE__*/ core.$constructor(\"$ZodSuccess\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(\"ZodSuccess\");\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.issues.length === 0;\n return payload;\n });\n }\n payload.value = result.issues.length === 0;\n return payload;\n };\n});\nexport const $ZodCatch = /*@__PURE__*/ core.$constructor(\"$ZodCatch\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply catch logic\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.value;\n if (result.issues.length) {\n payload.value = def.catchValue({\n ...payload,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n payload.issues = [];\n }\n return payload;\n });\n }\n payload.value = result.value;\n if (result.issues.length) {\n payload.value = def.catchValue({\n ...payload,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n payload.issues = [];\n }\n return payload;\n };\n});\nexport const $ZodNaN = /*@__PURE__*/ core.$constructor(\"$ZodNaN\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"number\" || !Number.isNaN(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"nan\",\n code: \"invalid_type\",\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodPipe = /*@__PURE__*/ core.$constructor(\"$ZodPipe\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => def.in._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n util.defineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handlePipeResult(right, def.in, ctx));\n }\n return handlePipeResult(right, def.in, ctx);\n }\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handlePipeResult(left, def.out, ctx));\n }\n return handlePipeResult(left, def.out, ctx);\n };\n});\nfunction handlePipeResult(left, next, ctx) {\n if (left.issues.length) {\n // prevent further checks\n left.aborted = true;\n return left;\n }\n return next._zod.run({ value: left.value, issues: left.issues }, ctx);\n}\nexport const $ZodCodec = /*@__PURE__*/ core.$constructor(\"$ZodCodec\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => def.in._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n util.defineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handleCodecAResult(left, def, ctx));\n }\n return handleCodecAResult(left, def, ctx);\n }\n else {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handleCodecAResult(right, def, ctx));\n }\n return handleCodecAResult(right, def, ctx);\n }\n };\n});\nfunction handleCodecAResult(result, def, ctx) {\n if (result.issues.length) {\n // prevent further checks\n result.aborted = true;\n return result;\n }\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const transformed = def.transform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));\n }\n return handleCodecTxResult(result, transformed, def.out, ctx);\n }\n else {\n const transformed = def.reverseTransform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));\n }\n return handleCodecTxResult(result, transformed, def.in, ctx);\n }\n}\nfunction handleCodecTxResult(left, value, nextSchema, ctx) {\n // Check if transform added any issues\n if (left.issues.length) {\n left.aborted = true;\n return left;\n }\n return nextSchema._zod.run({ value, issues: left.issues }, ctx);\n}\nexport const $ZodReadonly = /*@__PURE__*/ core.$constructor(\"$ZodReadonly\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"propValues\", () => def.innerType._zod.propValues);\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType?._zod?.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType?._zod?.optout);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then(handleReadonlyResult);\n }\n return handleReadonlyResult(result);\n };\n});\nfunction handleReadonlyResult(payload) {\n payload.value = Object.freeze(payload.value);\n return payload;\n}\nexport const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"$ZodTemplateLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n const regexParts = [];\n for (const part of def.parts) {\n if (typeof part === \"object\" && part !== null) {\n // is Zod schema\n if (!part._zod.pattern) {\n // if (!source)\n throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);\n }\n const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;\n if (!source)\n throw new Error(`Invalid template literal part: ${part._zod.traits}`);\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n regexParts.push(source.slice(start, end));\n }\n else if (part === null || util.primitiveTypes.has(typeof part)) {\n regexParts.push(util.escapeRegex(`${part}`));\n }\n else {\n throw new Error(`Invalid template literal part: ${part}`);\n }\n }\n inst._zod.pattern = new RegExp(`^${regexParts.join(\"\")}$`);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"string\") {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"string\",\n code: \"invalid_type\",\n });\n return payload;\n }\n inst._zod.pattern.lastIndex = 0;\n if (!inst._zod.pattern.test(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n code: \"invalid_format\",\n format: def.format ?? \"template_literal\",\n pattern: inst._zod.pattern.source,\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodFunction = /*@__PURE__*/ core.$constructor(\"$ZodFunction\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._def = def;\n inst._zod.def = def;\n inst.implement = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implement() must be called with a function\");\n }\n return function (...args) {\n const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;\n const result = Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return parse(inst._def.output, result);\n }\n return result;\n };\n };\n inst.implementAsync = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implementAsync() must be called with a function\");\n }\n return async function (...args) {\n const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;\n const result = await Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return await parseAsync(inst._def.output, result);\n }\n return result;\n };\n };\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"function\") {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"function\",\n input: payload.value,\n inst,\n });\n return payload;\n }\n // Check if output is a promise type to determine if we should use async implementation\n const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === \"promise\";\n if (hasPromiseOutput) {\n payload.value = inst.implementAsync(payload.value);\n }\n else {\n payload.value = inst.implement(payload.value);\n }\n return payload;\n };\n inst.input = (...args) => {\n const F = inst.constructor;\n if (Array.isArray(args[0])) {\n return new F({\n type: \"function\",\n input: new $ZodTuple({\n type: \"tuple\",\n items: args[0],\n rest: args[1],\n }),\n output: inst._def.output,\n });\n }\n return new F({\n type: \"function\",\n input: args[0],\n output: inst._def.output,\n });\n };\n inst.output = (output) => {\n const F = inst.constructor;\n return new F({\n type: \"function\",\n input: inst._def.input,\n output,\n });\n };\n return inst;\n});\nexport const $ZodPromise = /*@__PURE__*/ core.$constructor(\"$ZodPromise\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));\n };\n});\nexport const $ZodLazy = /*@__PURE__*/ core.$constructor(\"$ZodLazy\", (inst, def) => {\n $ZodType.init(inst, def);\n // let _innerType!: any;\n // util.defineLazy(def, \"getter\", () => {\n // if (!_innerType) {\n // _innerType = def.getter();\n // }\n // return () => _innerType;\n // });\n util.defineLazy(inst._zod, \"innerType\", () => def.getter());\n util.defineLazy(inst._zod, \"pattern\", () => inst._zod.innerType?._zod?.pattern);\n util.defineLazy(inst._zod, \"propValues\", () => inst._zod.innerType?._zod?.propValues);\n util.defineLazy(inst._zod, \"optin\", () => inst._zod.innerType?._zod?.optin ?? undefined);\n util.defineLazy(inst._zod, \"optout\", () => inst._zod.innerType?._zod?.optout ?? undefined);\n inst._zod.parse = (payload, ctx) => {\n const inner = inst._zod.innerType;\n return inner._zod.run(payload, ctx);\n };\n});\nexport const $ZodCustom = /*@__PURE__*/ core.$constructor(\"$ZodCustom\", (inst, def) => {\n checks.$ZodCheck.init(inst, def);\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _) => {\n return payload;\n };\n inst._zod.check = (payload) => {\n const input = payload.value;\n const r = def.fn(input);\n if (r instanceof Promise) {\n return r.then((r) => handleRefineResult(r, payload, input, inst));\n }\n handleRefineResult(r, payload, input, inst);\n return;\n };\n});\nfunction handleRefineResult(result, payload, input, inst) {\n if (!result) {\n const _iss = {\n code: \"custom\",\n input,\n inst, // incorporates params.error into issue reporting\n path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting\n continue: !inst._zod.def.abort,\n // params: inst._zod.def.params,\n };\n if (inst._zod.def.params)\n _iss.params = inst._zod.def.params;\n payload.issues.push(util.issue(_iss));\n }\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u062D\u0631\u0641\", verb: \"\u0623\u0646 \u064A\u062D\u0648\u064A\" },\n file: { unit: \"\u0628\u0627\u064A\u062A\", verb: \"\u0623\u0646 \u064A\u062D\u0648\u064A\" },\n array: { unit: \"\u0639\u0646\u0635\u0631\", verb: \"\u0623\u0646 \u064A\u062D\u0648\u064A\" },\n set: { unit: \"\u0639\u0646\u0635\u0631\", verb: \"\u0623\u0646 \u064A\u062D\u0648\u064A\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0645\u062F\u062E\u0644\",\n email: \"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A\",\n url: \"\u0631\u0627\u0628\u0637\",\n emoji: \"\u0625\u064A\u0645\u0648\u062C\u064A\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO\",\n date: \"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO\",\n time: \"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO\",\n duration: \"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO\",\n ipv4: \"\u0639\u0646\u0648\u0627\u0646 IPv4\",\n ipv6: \"\u0639\u0646\u0648\u0627\u0646 IPv6\",\n cidrv4: \"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4\",\n cidrv6: \"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6\",\n base64: \"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded\",\n base64url: \"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded\",\n json_string: \"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON\",\n e164: \"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0645\u062F\u062E\u0644\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${issue.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`;\n }\n return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue.origin ?? \"\u0627\u0644\u0642\u064A\u0645\u0629\"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"\u0639\u0646\u0635\u0631\"}`;\n return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue.origin ?? \"\u0627\u0644\u0642\u064A\u0645\u0629\"} ${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 \"${issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`;\n }\n case \"not_multiple_of\":\n return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u0645\u0639\u0631\u0641${issue.keys.length > 1 ? \"\u0627\u062A\" : \"\"} \u063A\u0631\u064A\u0628${issue.keys.length > 1 ? \"\u0629\" : \"\"}: ${util.joinValues(issue.keys, \"\u060C \")}`;\n case \"invalid_key\":\n return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue.origin}`;\n case \"invalid_union\":\n return \"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\";\n case \"invalid_element\":\n return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue.origin}`;\n default:\n return \"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\";\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"simvol\", verb: \"olmal\u0131d\u0131r\" },\n file: { unit: \"bayt\", verb: \"olmal\u0131d\u0131r\" },\n array: { unit: \"element\", verb: \"olmal\u0131d\u0131r\" },\n set: { unit: \"element\", verb: \"olmal\u0131d\u0131r\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"email address\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datetime\",\n date: \"ISO date\",\n time: \"ISO time\",\n duration: \"ISO duration\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded string\",\n base64url: \"base64url-encoded string\",\n json_string: \"JSON string\",\n e164: \"E.164 number\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Yanl\u0131\u015F d\u0259y\u0259r: g\u00F6zl\u0259nil\u0259n instanceof ${issue.expected}, daxil olan ${received}`;\n }\n return `Yanl\u0131\u015F d\u0259y\u0259r: g\u00F6zl\u0259nil\u0259n ${expected}, daxil olan ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Yanl\u0131\u015F d\u0259y\u0259r: g\u00F6zl\u0259nil\u0259n ${util.stringifyPrimitive(issue.values[0])}`;\n return `Yanl\u0131\u015F se\u00E7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u00C7ox b\u00F6y\u00FCk: g\u00F6zl\u0259nil\u0259n ${issue.origin ?? \"d\u0259y\u0259r\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"element\"}`;\n return `\u00C7ox b\u00F6y\u00FCk: g\u00F6zl\u0259nil\u0259n ${issue.origin ?? \"d\u0259y\u0259r\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u00C7ox ki\u00E7ik: g\u00F6zl\u0259nil\u0259n ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n return `\u00C7ox ki\u00E7ik: g\u00F6zl\u0259nil\u0259n ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Yanl\u0131\u015F m\u0259tn: \"${_issue.prefix}\" il\u0259 ba\u015Flamal\u0131d\u0131r`;\n if (_issue.format === \"ends_with\")\n return `Yanl\u0131\u015F m\u0259tn: \"${_issue.suffix}\" il\u0259 bitm\u0259lidir`;\n if (_issue.format === \"includes\")\n return `Yanl\u0131\u015F m\u0259tn: \"${_issue.includes}\" daxil olmal\u0131d\u0131r`;\n if (_issue.format === \"regex\")\n return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`;\n return `Yanl\u0131\u015F ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Yanl\u0131\u015F \u0259d\u0259d: ${issue.divisor} il\u0259 b\u00F6l\u00FCn\u0259 bil\u0259n olmal\u0131d\u0131r`;\n case \"unrecognized_keys\":\n return `Tan\u0131nmayan a\u00E7ar${issue.keys.length > 1 ? \"lar\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} daxilind\u0259 yanl\u0131\u015F a\u00E7ar`;\n case \"invalid_union\":\n return \"Yanl\u0131\u015F d\u0259y\u0259r\";\n case \"invalid_element\":\n return `${issue.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;\n default:\n return `Yanl\u0131\u015F d\u0259y\u0259r`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nfunction getBelarusianPlural(count, one, few, many) {\n const absCount = Math.abs(count);\n const lastDigit = absCount % 10;\n const lastTwoDigits = absCount % 100;\n if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {\n return many;\n }\n if (lastDigit === 1) {\n return one;\n }\n if (lastDigit >= 2 && lastDigit <= 4) {\n return few;\n }\n return many;\n}\nconst error = () => {\n const Sizable = {\n string: {\n unit: {\n one: \"\u0441\u0456\u043C\u0432\u0430\u043B\",\n few: \"\u0441\u0456\u043C\u0432\u0430\u043B\u044B\",\n many: \"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E\",\n },\n verb: \"\u043C\u0435\u0446\u044C\",\n },\n array: {\n unit: {\n one: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\",\n few: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B\",\n many: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E\",\n },\n verb: \"\u043C\u0435\u0446\u044C\",\n },\n set: {\n unit: {\n one: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\",\n few: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B\",\n many: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E\",\n },\n verb: \"\u043C\u0435\u0446\u044C\",\n },\n file: {\n unit: {\n one: \"\u0431\u0430\u0439\u0442\",\n few: \"\u0431\u0430\u0439\u0442\u044B\",\n many: \"\u0431\u0430\u0439\u0442\u0430\u045E\",\n },\n verb: \"\u043C\u0435\u0446\u044C\",\n },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0443\u0432\u043E\u0434\",\n email: \"email \u0430\u0434\u0440\u0430\u0441\",\n url: \"URL\",\n emoji: \"\u044D\u043C\u043E\u0434\u0437\u0456\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441\",\n date: \"ISO \u0434\u0430\u0442\u0430\",\n time: \"ISO \u0447\u0430\u0441\",\n duration: \"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C\",\n ipv4: \"IPv4 \u0430\u0434\u0440\u0430\u0441\",\n ipv6: \"IPv6 \u0430\u0434\u0440\u0430\u0441\",\n cidrv4: \"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D\",\n cidrv6: \"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D\",\n base64: \"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64\",\n base64url: \"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url\",\n json_string: \"JSON \u0440\u0430\u0434\u043E\u043A\",\n e164: \"\u043D\u0443\u043C\u0430\u0440 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0443\u0432\u043E\u0434\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u043B\u0456\u043A\",\n array: \"\u043C\u0430\u0441\u0456\u045E\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${issue.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`;\n }\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const maxValue = Number(issue.maximum);\n const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435\"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue.maximum.toString()} ${unit}`;\n }\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435\"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const minValue = Number(issue.minimum);\n const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue.minimum.toString()} ${unit}`;\n }\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue.keys.length > 1 ? \"\u043A\u043B\u044E\u0447\u044B\" : \"\u043A\u043B\u044E\u0447\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434\";\n case \"invalid_element\":\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue.origin}`;\n default:\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0441\u0438\u043C\u0432\u043E\u043B\u0430\", verb: \"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\" },\n file: { unit: \"\u0431\u0430\u0439\u0442\u0430\", verb: \"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\" },\n array: { unit: \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430\", verb: \"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\" },\n set: { unit: \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430\", verb: \"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0432\u0445\u043E\u0434\",\n email: \"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441\",\n url: \"URL\",\n emoji: \"\u0435\u043C\u043E\u0434\u0436\u0438\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0432\u0440\u0435\u043C\u0435\",\n date: \"ISO \u0434\u0430\u0442\u0430\",\n time: \"ISO \u0432\u0440\u0435\u043C\u0435\",\n duration: \"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442\",\n ipv4: \"IPv4 \u0430\u0434\u0440\u0435\u0441\",\n ipv6: \"IPv6 \u0430\u0434\u0440\u0435\u0441\",\n cidrv4: \"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\",\n cidrv6: \"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\",\n base64: \"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437\",\n base64url: \"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437\",\n json_string: \"JSON \u043D\u0438\u0437\",\n e164: \"E.164 \u043D\u043E\u043C\u0435\u0440\",\n jwt: \"JWT\",\n template_literal: \"\u0432\u0445\u043E\u0434\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0447\u0438\u0441\u043B\u043E\",\n array: \"\u043C\u0430\u0441\u0438\u0432\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${issue.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`;\n }\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue.origin ?? \"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430\"}`;\n return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue.origin ?? \"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`;\n let invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D\";\n if (_issue.format === \"emoji\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E\";\n if (_issue.format === \"datetime\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E\";\n if (_issue.format === \"date\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430\";\n if (_issue.format === \"time\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E\";\n if (_issue.format === \"duration\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430\";\n return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue.keys.length > 1 ? \"\u0438\" : \"\"} \u043A\u043B\u044E\u0447${issue.keys.length > 1 ? \"\u043E\u0432\u0435\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434\";\n case \"invalid_element\":\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue.origin}`;\n default:\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"car\u00E0cters\", verb: \"contenir\" },\n file: { unit: \"bytes\", verb: \"contenir\" },\n array: { unit: \"elements\", verb: \"contenir\" },\n set: { unit: \"elements\", verb: \"contenir\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entrada\",\n email: \"adre\u00E7a electr\u00F2nica\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"data i hora ISO\",\n date: \"data ISO\",\n time: \"hora ISO\",\n duration: \"durada ISO\",\n ipv4: \"adre\u00E7a IPv4\",\n ipv6: \"adre\u00E7a IPv6\",\n cidrv4: \"rang IPv4\",\n cidrv6: \"rang IPv6\",\n base64: \"cadena codificada en base64\",\n base64url: \"cadena codificada en base64url\",\n json_string: \"cadena JSON\",\n e164: \"n\u00FAmero E.164\",\n jwt: \"JWT\",\n template_literal: \"entrada\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Tipus inv\u00E0lid: s'esperava instanceof ${issue.expected}, s'ha rebut ${received}`;\n }\n return `Tipus inv\u00E0lid: s'esperava ${expected}, s'ha rebut ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Valor inv\u00E0lid: s'esperava ${util.stringifyPrimitive(issue.values[0])}`;\n return `Opci\u00F3 inv\u00E0lida: s'esperava una de ${util.joinValues(issue.values, \" o \")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"com a m\u00E0xim\" : \"menys de\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Massa gran: s'esperava que ${issue.origin ?? \"el valor\"} contingu\u00E9s ${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"elements\"}`;\n return `Massa gran: s'esperava que ${issue.origin ?? \"el valor\"} fos ${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"com a m\u00EDnim\" : \"m\u00E9s de\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Massa petit: s'esperava que ${issue.origin} contingu\u00E9s ${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Massa petit: s'esperava que ${issue.origin} fos ${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Format inv\u00E0lid: ha de comen\u00E7ar amb \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Format inv\u00E0lid: ha d'acabar amb \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Format inv\u00E0lid: ha d'incloure \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Format inv\u00E0lid: ha de coincidir amb el patr\u00F3 ${_issue.pattern}`;\n return `Format inv\u00E0lid per a ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `N\u00FAmero inv\u00E0lid: ha de ser m\u00FAltiple de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Clau${issue.keys.length > 1 ? \"s\" : \"\"} no reconeguda${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Clau inv\u00E0lida a ${issue.origin}`;\n case \"invalid_union\":\n return \"Entrada inv\u00E0lida\"; // Could also be \"Tipus d'uni\u00F3 inv\u00E0lid\" but \"Entrada inv\u00E0lida\" is more general\n case \"invalid_element\":\n return `Element inv\u00E0lid a ${issue.origin}`;\n default:\n return `Entrada inv\u00E0lida`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"znak\u016F\", verb: \"m\u00EDt\" },\n file: { unit: \"bajt\u016F\", verb: \"m\u00EDt\" },\n array: { unit: \"prvk\u016F\", verb: \"m\u00EDt\" },\n set: { unit: \"prvk\u016F\", verb: \"m\u00EDt\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"regul\u00E1rn\u00ED v\u00FDraz\",\n email: \"e-mailov\u00E1 adresa\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"datum a \u010Das ve form\u00E1tu ISO\",\n date: \"datum ve form\u00E1tu ISO\",\n time: \"\u010Das ve form\u00E1tu ISO\",\n duration: \"doba trv\u00E1n\u00ED ISO\",\n ipv4: \"IPv4 adresa\",\n ipv6: \"IPv6 adresa\",\n cidrv4: \"rozsah IPv4\",\n cidrv6: \"rozsah IPv6\",\n base64: \"\u0159et\u011Bzec zak\u00F3dovan\u00FD ve form\u00E1tu base64\",\n base64url: \"\u0159et\u011Bzec zak\u00F3dovan\u00FD ve form\u00E1tu base64url\",\n json_string: \"\u0159et\u011Bzec ve form\u00E1tu JSON\",\n e164: \"\u010D\u00EDslo E.164\",\n jwt: \"JWT\",\n template_literal: \"vstup\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u010D\u00EDslo\",\n string: \"\u0159et\u011Bzec\",\n function: \"funkce\",\n array: \"pole\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Neplatn\u00FD vstup: o\u010Dek\u00E1v\u00E1no instanceof ${issue.expected}, obdr\u017Eeno ${received}`;\n }\n return `Neplatn\u00FD vstup: o\u010Dek\u00E1v\u00E1no ${expected}, obdr\u017Eeno ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Neplatn\u00FD vstup: o\u010Dek\u00E1v\u00E1no ${util.stringifyPrimitive(issue.values[0])}`;\n return `Neplatn\u00E1 mo\u017Enost: o\u010Dek\u00E1v\u00E1na jedna z hodnot ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Hodnota je p\u0159\u00EDli\u0161 velk\u00E1: ${issue.origin ?? \"hodnota\"} mus\u00ED m\u00EDt ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"prvk\u016F\"}`;\n }\n return `Hodnota je p\u0159\u00EDli\u0161 velk\u00E1: ${issue.origin ?? \"hodnota\"} mus\u00ED b\u00FDt ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Hodnota je p\u0159\u00EDli\u0161 mal\u00E1: ${issue.origin ?? \"hodnota\"} mus\u00ED m\u00EDt ${adj}${issue.minimum.toString()} ${sizing.unit ?? \"prvk\u016F\"}`;\n }\n return `Hodnota je p\u0159\u00EDli\u0161 mal\u00E1: ${issue.origin ?? \"hodnota\"} mus\u00ED b\u00FDt ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Neplatn\u00FD \u0159et\u011Bzec: mus\u00ED za\u010D\u00EDnat na \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Neplatn\u00FD \u0159et\u011Bzec: mus\u00ED kon\u010Dit na \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Neplatn\u00FD \u0159et\u011Bzec: mus\u00ED obsahovat \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Neplatn\u00FD \u0159et\u011Bzec: mus\u00ED odpov\u00EDdat vzoru ${_issue.pattern}`;\n return `Neplatn\u00FD form\u00E1t ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Neplatn\u00E9 \u010D\u00EDslo: mus\u00ED b\u00FDt n\u00E1sobkem ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Nezn\u00E1m\u00E9 kl\u00ED\u010De: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Neplatn\u00FD kl\u00ED\u010D v ${issue.origin}`;\n case \"invalid_union\":\n return \"Neplatn\u00FD vstup\";\n case \"invalid_element\":\n return `Neplatn\u00E1 hodnota v ${issue.origin}`;\n default:\n return `Neplatn\u00FD vstup`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"tegn\", verb: \"havde\" },\n file: { unit: \"bytes\", verb: \"havde\" },\n array: { unit: \"elementer\", verb: \"indeholdt\" },\n set: { unit: \"elementer\", verb: \"indeholdt\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"e-mailadresse\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO dato- og klokkesl\u00E6t\",\n date: \"ISO-dato\",\n time: \"ISO-klokkesl\u00E6t\",\n duration: \"ISO-varighed\",\n ipv4: \"IPv4-omr\u00E5de\",\n ipv6: \"IPv6-omr\u00E5de\",\n cidrv4: \"IPv4-spektrum\",\n cidrv6: \"IPv6-spektrum\",\n base64: \"base64-kodet streng\",\n base64url: \"base64url-kodet streng\",\n json_string: \"JSON-streng\",\n e164: \"E.164-nummer\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n string: \"streng\",\n number: \"tal\",\n boolean: \"boolean\",\n array: \"liste\",\n object: \"objekt\",\n set: \"s\u00E6t\",\n file: \"fil\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ugyldigt input: forventede instanceof ${issue.expected}, fik ${received}`;\n }\n return `Ugyldigt input: forventede ${expected}, fik ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ugyldig v\u00E6rdi: forventede ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ugyldigt valg: forventede en af f\u00F8lgende ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n if (sizing)\n return `For stor: forventede ${origin ?? \"value\"} ${sizing.verb} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"elementer\"}`;\n return `For stor: forventede ${origin ?? \"value\"} havde ${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n if (sizing) {\n return `For lille: forventede ${origin} ${sizing.verb} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `For lille: forventede ${origin} havde ${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Ugyldig streng: skal starte med \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Ugyldig streng: skal ende med \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Ugyldig streng: skal indeholde \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Ugyldig streng: skal matche m\u00F8nsteret ${_issue.pattern}`;\n return `Ugyldig ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ugyldigt tal: skal v\u00E6re deleligt med ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Ukendte n\u00F8gler\" : \"Ukendt n\u00F8gle\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ugyldig n\u00F8gle i ${issue.origin}`;\n case \"invalid_union\":\n return \"Ugyldigt input: matcher ingen af de tilladte typer\";\n case \"invalid_element\":\n return `Ugyldig v\u00E6rdi i ${issue.origin}`;\n default:\n return `Ugyldigt input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"Zeichen\", verb: \"zu haben\" },\n file: { unit: \"Bytes\", verb: \"zu haben\" },\n array: { unit: \"Elemente\", verb: \"zu haben\" },\n set: { unit: \"Elemente\", verb: \"zu haben\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"Eingabe\",\n email: \"E-Mail-Adresse\",\n url: \"URL\",\n emoji: \"Emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-Datum und -Uhrzeit\",\n date: \"ISO-Datum\",\n time: \"ISO-Uhrzeit\",\n duration: \"ISO-Dauer\",\n ipv4: \"IPv4-Adresse\",\n ipv6: \"IPv6-Adresse\",\n cidrv4: \"IPv4-Bereich\",\n cidrv6: \"IPv6-Bereich\",\n base64: \"Base64-codierter String\",\n base64url: \"Base64-URL-codierter String\",\n json_string: \"JSON-String\",\n e164: \"E.164-Nummer\",\n jwt: \"JWT\",\n template_literal: \"Eingabe\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"Zahl\",\n array: \"Array\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ung\u00FCltige Eingabe: erwartet instanceof ${issue.expected}, erhalten ${received}`;\n }\n return `Ung\u00FCltige Eingabe: erwartet ${expected}, erhalten ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ung\u00FCltige Eingabe: erwartet ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ung\u00FCltige Option: erwartet eine von ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Zu gro\u00DF: erwartet, dass ${issue.origin ?? \"Wert\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"Elemente\"} hat`;\n return `Zu gro\u00DF: erwartet, dass ${issue.origin ?? \"Wert\"} ${adj}${issue.maximum.toString()} ist`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Zu klein: erwartet, dass ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} hat`;\n }\n return `Zu klein: erwartet, dass ${issue.origin} ${adj}${issue.minimum.toString()} ist`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Ung\u00FCltiger String: muss mit \"${_issue.prefix}\" beginnen`;\n if (_issue.format === \"ends_with\")\n return `Ung\u00FCltiger String: muss mit \"${_issue.suffix}\" enden`;\n if (_issue.format === \"includes\")\n return `Ung\u00FCltiger String: muss \"${_issue.includes}\" enthalten`;\n if (_issue.format === \"regex\")\n return `Ung\u00FCltiger String: muss dem Muster ${_issue.pattern} entsprechen`;\n return `Ung\u00FCltig: ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ung\u00FCltige Zahl: muss ein Vielfaches von ${issue.divisor} sein`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Unbekannte Schl\u00FCssel\" : \"Unbekannter Schl\u00FCssel\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ung\u00FCltiger Schl\u00FCssel in ${issue.origin}`;\n case \"invalid_union\":\n return \"Ung\u00FCltige Eingabe\";\n case \"invalid_element\":\n return `Ung\u00FCltiger Wert in ${issue.origin}`;\n default:\n return `Ung\u00FCltige Eingabe`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"characters\", verb: \"to have\" },\n file: { unit: \"bytes\", verb: \"to have\" },\n array: { unit: \"items\", verb: \"to have\" },\n set: { unit: \"items\", verb: \"to have\" },\n map: { unit: \"entries\", verb: \"to have\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"email address\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datetime\",\n date: \"ISO date\",\n time: \"ISO time\",\n duration: \"ISO duration\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n mac: \"MAC address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded string\",\n base64url: \"base64url-encoded string\",\n json_string: \"JSON string\",\n e164: \"E.164 number\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n // type names: missing keys = do not translate (use raw value via ?? fallback)\n const TypeDictionary = {\n // Compatibility: \"nan\" -> \"NaN\" for display\n nan: \"NaN\",\n // All other type names omitted - they fall back to raw values via ?? operator\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n return `Invalid input: expected ${expected}, received ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;\n return `Invalid option: expected one of ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Too big: expected ${issue.origin ?? \"value\"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elements\"}`;\n return `Too big: expected ${issue.origin ?? \"value\"} to be ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Invalid string: must start with \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Invalid string: must end with \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Invalid string: must include \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Invalid string: must match pattern ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Invalid number: must be a multiple of ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Unrecognized key${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Invalid key in ${issue.origin}`;\n case \"invalid_union\":\n return \"Invalid input\";\n case \"invalid_element\":\n return `Invalid value in ${issue.origin}`;\n default:\n return `Invalid input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"karaktrojn\", verb: \"havi\" },\n file: { unit: \"bajtojn\", verb: \"havi\" },\n array: { unit: \"elementojn\", verb: \"havi\" },\n set: { unit: \"elementojn\", verb: \"havi\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"enigo\",\n email: \"retadreso\",\n url: \"URL\",\n emoji: \"emo\u011Dio\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-datotempo\",\n date: \"ISO-dato\",\n time: \"ISO-tempo\",\n duration: \"ISO-da\u016Dro\",\n ipv4: \"IPv4-adreso\",\n ipv6: \"IPv6-adreso\",\n cidrv4: \"IPv4-rango\",\n cidrv6: \"IPv6-rango\",\n base64: \"64-ume kodita karaktraro\",\n base64url: \"URL-64-ume kodita karaktraro\",\n json_string: \"JSON-karaktraro\",\n e164: \"E.164-nombro\",\n jwt: \"JWT\",\n template_literal: \"enigo\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"nombro\",\n array: \"tabelo\",\n null: \"senvalora\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Nevalida enigo: atendi\u011Dis instanceof ${issue.expected}, ricevi\u011Dis ${received}`;\n }\n return `Nevalida enigo: atendi\u011Dis ${expected}, ricevi\u011Dis ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Nevalida enigo: atendi\u011Dis ${util.stringifyPrimitive(issue.values[0])}`;\n return `Nevalida opcio: atendi\u011Dis unu el ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Tro granda: atendi\u011Dis ke ${issue.origin ?? \"valoro\"} havu ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementojn\"}`;\n return `Tro granda: atendi\u011Dis ke ${issue.origin ?? \"valoro\"} havu ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Tro malgranda: atendi\u011Dis ke ${issue.origin} havu ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Tro malgranda: atendi\u011Dis ke ${issue.origin} estu ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Nevalida karaktraro: devas komenci\u011Di per \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Nevalida karaktraro: devas fini\u011Di per \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Nevalida karaktraro: devas inkluzivi \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;\n return `Nevalida ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Nevalida nombro: devas esti oblo de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Nekonata${issue.keys.length > 1 ? \"j\" : \"\"} \u015Dlosilo${issue.keys.length > 1 ? \"j\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Nevalida \u015Dlosilo en ${issue.origin}`;\n case \"invalid_union\":\n return \"Nevalida enigo\";\n case \"invalid_element\":\n return `Nevalida valoro en ${issue.origin}`;\n default:\n return `Nevalida enigo`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caracteres\", verb: \"tener\" },\n file: { unit: \"bytes\", verb: \"tener\" },\n array: { unit: \"elementos\", verb: \"tener\" },\n set: { unit: \"elementos\", verb: \"tener\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entrada\",\n email: \"direcci\u00F3n de correo electr\u00F3nico\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"fecha y hora ISO\",\n date: \"fecha ISO\",\n time: \"hora ISO\",\n duration: \"duraci\u00F3n ISO\",\n ipv4: \"direcci\u00F3n IPv4\",\n ipv6: \"direcci\u00F3n IPv6\",\n cidrv4: \"rango IPv4\",\n cidrv6: \"rango IPv6\",\n base64: \"cadena codificada en base64\",\n base64url: \"URL codificada en base64\",\n json_string: \"cadena JSON\",\n e164: \"n\u00FAmero E.164\",\n jwt: \"JWT\",\n template_literal: \"entrada\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n string: \"texto\",\n number: \"n\u00FAmero\",\n boolean: \"booleano\",\n array: \"arreglo\",\n object: \"objeto\",\n set: \"conjunto\",\n file: \"archivo\",\n date: \"fecha\",\n bigint: \"n\u00FAmero grande\",\n symbol: \"s\u00EDmbolo\",\n undefined: \"indefinido\",\n null: \"nulo\",\n function: \"funci\u00F3n\",\n map: \"mapa\",\n record: \"registro\",\n tuple: \"tupla\",\n enum: \"enumeraci\u00F3n\",\n union: \"uni\u00F3n\",\n literal: \"literal\",\n promise: \"promesa\",\n void: \"vac\u00EDo\",\n never: \"nunca\",\n unknown: \"desconocido\",\n any: \"cualquiera\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Entrada inv\u00E1lida: se esperaba instanceof ${issue.expected}, recibido ${received}`;\n }\n return `Entrada inv\u00E1lida: se esperaba ${expected}, recibido ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entrada inv\u00E1lida: se esperaba ${util.stringifyPrimitive(issue.values[0])}`;\n return `Opci\u00F3n inv\u00E1lida: se esperaba una de ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n if (sizing)\n return `Demasiado grande: se esperaba que ${origin ?? \"valor\"} tuviera ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementos\"}`;\n return `Demasiado grande: se esperaba que ${origin ?? \"valor\"} fuera ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n if (sizing) {\n return `Demasiado peque\u00F1o: se esperaba que ${origin} tuviera ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Demasiado peque\u00F1o: se esperaba que ${origin} fuera ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Cadena inv\u00E1lida: debe comenzar con \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Cadena inv\u00E1lida: debe terminar en \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Cadena inv\u00E1lida: debe incluir \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Cadena inv\u00E1lida: debe coincidir con el patr\u00F3n ${_issue.pattern}`;\n return `Inv\u00E1lido ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `N\u00FAmero inv\u00E1lido: debe ser m\u00FAltiplo de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Llave${issue.keys.length > 1 ? \"s\" : \"\"} desconocida${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Llave inv\u00E1lida en ${TypeDictionary[issue.origin] ?? issue.origin}`;\n case \"invalid_union\":\n return \"Entrada inv\u00E1lida\";\n case \"invalid_element\":\n return `Valor inv\u00E1lido en ${TypeDictionary[issue.origin] ?? issue.origin}`;\n default:\n return `Entrada inv\u00E1lida`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631\", verb: \"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F\" },\n file: { unit: \"\u0628\u0627\u06CC\u062A\", verb: \"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F\" },\n array: { unit: \"\u0622\u06CC\u062A\u0645\", verb: \"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F\" },\n set: { unit: \"\u0622\u06CC\u062A\u0645\", verb: \"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0648\u0631\u0648\u062F\u06CC\",\n email: \"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644\",\n url: \"URL\",\n emoji: \"\u0627\u06CC\u0645\u0648\u062C\u06CC\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648\",\n date: \"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648\",\n time: \"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648\",\n duration: \"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648\",\n ipv4: \"IPv4 \u0622\u062F\u0631\u0633\",\n ipv6: \"IPv6 \u0622\u062F\u0631\u0633\",\n cidrv4: \"IPv4 \u062F\u0627\u0645\u0646\u0647\",\n cidrv6: \"IPv6 \u062F\u0627\u0645\u0646\u0647\",\n base64: \"base64-encoded \u0631\u0634\u062A\u0647\",\n base64url: \"base64url-encoded \u0631\u0634\u062A\u0647\",\n json_string: \"JSON \u0631\u0634\u062A\u0647\",\n e164: \"E.164 \u0639\u062F\u062F\",\n jwt: \"JWT\",\n template_literal: \"\u0648\u0631\u0648\u062F\u06CC\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0639\u062F\u062F\",\n array: \"\u0622\u0631\u0627\u06CC\u0647\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${issue.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;\n }\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1) {\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${util.stringifyPrimitive(issue.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`;\n }\n return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${util.joinValues(issue.values, \"|\")} \u0645\u06CC\u200C\u0628\u0648\u062F`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue.origin ?? \"\u0645\u0642\u062F\u0627\u0631\"} \u0628\u0627\u06CC\u062F ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0639\u0646\u0635\u0631\"} \u0628\u0627\u0634\u062F`;\n }\n return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue.origin ?? \"\u0645\u0642\u062F\u0627\u0631\"} \u0628\u0627\u06CC\u062F ${adj}${issue.maximum.toString()} \u0628\u0627\u0634\u062F`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue.origin} \u0628\u0627\u06CC\u062F ${adj}${issue.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`;\n }\n return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue.origin} \u0628\u0627\u06CC\u062F ${adj}${issue.minimum.toString()} \u0628\u0627\u0634\u062F`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \"${_issue.prefix}\" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`;\n }\n if (_issue.format === \"ends_with\") {\n return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \"${_issue.suffix}\" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`;\n }\n if (_issue.format === \"includes\") {\n return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 \"${_issue.includes}\" \u0628\u0627\u0634\u062F`;\n }\n if (_issue.format === \"regex\") {\n return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`;\n }\n return `${FormatDictionary[_issue.format] ?? issue.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;\n }\n case \"not_multiple_of\":\n return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue.divisor} \u0628\u0627\u0634\u062F`;\n case \"unrecognized_keys\":\n return `\u06A9\u0644\u06CC\u062F${issue.keys.length > 1 ? \"\u0647\u0627\u06CC\" : \"\"} \u0646\u0627\u0634\u0646\u0627\u0633: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue.origin}`;\n case \"invalid_union\":\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;\n case \"invalid_element\":\n return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue.origin}`;\n default:\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"merkki\u00E4\", subject: \"merkkijonon\" },\n file: { unit: \"tavua\", subject: \"tiedoston\" },\n array: { unit: \"alkiota\", subject: \"listan\" },\n set: { unit: \"alkiota\", subject: \"joukon\" },\n number: { unit: \"\", subject: \"luvun\" },\n bigint: { unit: \"\", subject: \"suuren kokonaisluvun\" },\n int: { unit: \"\", subject: \"kokonaisluvun\" },\n date: { unit: \"\", subject: \"p\u00E4iv\u00E4m\u00E4\u00E4r\u00E4n\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"s\u00E4\u00E4nn\u00F6llinen lauseke\",\n email: \"s\u00E4hk\u00F6postiosoite\",\n url: \"URL-osoite\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-aikaleima\",\n date: \"ISO-p\u00E4iv\u00E4m\u00E4\u00E4r\u00E4\",\n time: \"ISO-aika\",\n duration: \"ISO-kesto\",\n ipv4: \"IPv4-osoite\",\n ipv6: \"IPv6-osoite\",\n cidrv4: \"IPv4-alue\",\n cidrv6: \"IPv6-alue\",\n base64: \"base64-koodattu merkkijono\",\n base64url: \"base64url-koodattu merkkijono\",\n json_string: \"JSON-merkkijono\",\n e164: \"E.164-luku\",\n jwt: \"JWT\",\n template_literal: \"templaattimerkkijono\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Virheellinen tyyppi: odotettiin instanceof ${issue.expected}, oli ${received}`;\n }\n return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Virheellinen sy\u00F6te: t\u00E4ytyy olla ${util.stringifyPrimitive(issue.values[0])}`;\n return `Virheellinen valinta: t\u00E4ytyy olla yksi seuraavista: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Liian suuri: ${sizing.subject} t\u00E4ytyy olla ${adj}${issue.maximum.toString()} ${sizing.unit}`.trim();\n }\n return `Liian suuri: arvon t\u00E4ytyy olla ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Liian pieni: ${sizing.subject} t\u00E4ytyy olla ${adj}${issue.minimum.toString()} ${sizing.unit}`.trim();\n }\n return `Liian pieni: arvon t\u00E4ytyy olla ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Virheellinen sy\u00F6te: t\u00E4ytyy alkaa \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Virheellinen sy\u00F6te: t\u00E4ytyy loppua \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Virheellinen sy\u00F6te: t\u00E4ytyy sis\u00E4lt\u00E4\u00E4 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\") {\n return `Virheellinen sy\u00F6te: t\u00E4ytyy vastata s\u00E4\u00E4nn\u00F6llist\u00E4 lauseketta ${_issue.pattern}`;\n }\n return `Virheellinen ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Virheellinen luku: t\u00E4ytyy olla luvun ${issue.divisor} monikerta`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Tuntemattomat avaimet\" : \"Tuntematon avain\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return \"Virheellinen avain tietueessa\";\n case \"invalid_union\":\n return \"Virheellinen unioni\";\n case \"invalid_element\":\n return \"Virheellinen arvo joukossa\";\n default:\n return `Virheellinen sy\u00F6te`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caract\u00E8res\", verb: \"avoir\" },\n file: { unit: \"octets\", verb: \"avoir\" },\n array: { unit: \"\u00E9l\u00E9ments\", verb: \"avoir\" },\n set: { unit: \"\u00E9l\u00E9ments\", verb: \"avoir\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entr\u00E9e\",\n email: \"adresse e-mail\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"date et heure ISO\",\n date: \"date ISO\",\n time: \"heure ISO\",\n duration: \"dur\u00E9e ISO\",\n ipv4: \"adresse IPv4\",\n ipv6: \"adresse IPv6\",\n cidrv4: \"plage IPv4\",\n cidrv6: \"plage IPv6\",\n base64: \"cha\u00EEne encod\u00E9e en base64\",\n base64url: \"cha\u00EEne encod\u00E9e en base64url\",\n json_string: \"cha\u00EEne JSON\",\n e164: \"num\u00E9ro E.164\",\n jwt: \"JWT\",\n template_literal: \"entr\u00E9e\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"nombre\",\n array: \"tableau\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Entr\u00E9e invalide : instanceof ${issue.expected} attendu, ${received} re\u00E7u`;\n }\n return `Entr\u00E9e invalide : ${expected} attendu, ${received} re\u00E7u`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entr\u00E9e invalide : ${util.stringifyPrimitive(issue.values[0])} attendu`;\n return `Option invalide : une valeur parmi ${util.joinValues(issue.values, \"|\")} attendue`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Trop grand : ${issue.origin ?? \"valeur\"} doit ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u00E9l\u00E9ment(s)\"}`;\n return `Trop grand : ${issue.origin ?? \"valeur\"} doit \u00EAtre ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Trop petit : ${issue.origin} doit ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Trop petit : ${issue.origin} doit \u00EAtre ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Cha\u00EEne invalide : doit commencer par \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Cha\u00EEne invalide : doit se terminer par \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Cha\u00EEne invalide : doit inclure \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Cha\u00EEne invalide : doit correspondre au mod\u00E8le ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} invalide`;\n }\n case \"not_multiple_of\":\n return `Nombre invalide : doit \u00EAtre un multiple de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Cl\u00E9${issue.keys.length > 1 ? \"s\" : \"\"} non reconnue${issue.keys.length > 1 ? \"s\" : \"\"} : ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Cl\u00E9 invalide dans ${issue.origin}`;\n case \"invalid_union\":\n return \"Entr\u00E9e invalide\";\n case \"invalid_element\":\n return `Valeur invalide dans ${issue.origin}`;\n default:\n return `Entr\u00E9e invalide`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caract\u00E8res\", verb: \"avoir\" },\n file: { unit: \"octets\", verb: \"avoir\" },\n array: { unit: \"\u00E9l\u00E9ments\", verb: \"avoir\" },\n set: { unit: \"\u00E9l\u00E9ments\", verb: \"avoir\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entr\u00E9e\",\n email: \"adresse courriel\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"date-heure ISO\",\n date: \"date ISO\",\n time: \"heure ISO\",\n duration: \"dur\u00E9e ISO\",\n ipv4: \"adresse IPv4\",\n ipv6: \"adresse IPv6\",\n cidrv4: \"plage IPv4\",\n cidrv6: \"plage IPv6\",\n base64: \"cha\u00EEne encod\u00E9e en base64\",\n base64url: \"cha\u00EEne encod\u00E9e en base64url\",\n json_string: \"cha\u00EEne JSON\",\n e164: \"num\u00E9ro E.164\",\n jwt: \"JWT\",\n template_literal: \"entr\u00E9e\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Entr\u00E9e invalide : attendu instanceof ${issue.expected}, re\u00E7u ${received}`;\n }\n return `Entr\u00E9e invalide : attendu ${expected}, re\u00E7u ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entr\u00E9e invalide : attendu ${util.stringifyPrimitive(issue.values[0])}`;\n return `Option invalide : attendu l'une des valeurs suivantes ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"\u2264\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Trop grand : attendu que ${issue.origin ?? \"la valeur\"} ait ${adj}${issue.maximum.toString()} ${sizing.unit}`;\n return `Trop grand : attendu que ${issue.origin ?? \"la valeur\"} soit ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"\u2265\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Trop petit : attendu que ${issue.origin} ait ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Trop petit : attendu que ${issue.origin} soit ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Cha\u00EEne invalide : doit commencer par \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Cha\u00EEne invalide : doit se terminer par \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Cha\u00EEne invalide : doit inclure \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Cha\u00EEne invalide : doit correspondre au motif ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} invalide`;\n }\n case \"not_multiple_of\":\n return `Nombre invalide : doit \u00EAtre un multiple de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Cl\u00E9${issue.keys.length > 1 ? \"s\" : \"\"} non reconnue${issue.keys.length > 1 ? \"s\" : \"\"} : ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Cl\u00E9 invalide dans ${issue.origin}`;\n case \"invalid_union\":\n return \"Entr\u00E9e invalide\";\n case \"invalid_element\":\n return `Valeur invalide dans ${issue.origin}`;\n default:\n return `Entr\u00E9e invalide`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n // Hebrew labels + grammatical gender\n const TypeNames = {\n string: { label: \"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA\", gender: \"f\" },\n number: { label: \"\u05DE\u05E1\u05E4\u05E8\", gender: \"m\" },\n boolean: { label: \"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9\", gender: \"m\" },\n bigint: { label: \"BigInt\", gender: \"m\" },\n date: { label: \"\u05EA\u05D0\u05E8\u05D9\u05DA\", gender: \"m\" },\n array: { label: \"\u05DE\u05E2\u05E8\u05DA\", gender: \"m\" },\n object: { label: \"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8\", gender: \"m\" },\n null: { label: \"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)\", gender: \"m\" },\n undefined: { label: \"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)\", gender: \"m\" },\n symbol: { label: \"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)\", gender: \"m\" },\n function: { label: \"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4\", gender: \"f\" },\n map: { label: \"\u05DE\u05E4\u05D4 (Map)\", gender: \"f\" },\n set: { label: \"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)\", gender: \"f\" },\n file: { label: \"\u05E7\u05D5\u05D1\u05E5\", gender: \"m\" },\n promise: { label: \"Promise\", gender: \"m\" },\n NaN: { label: \"NaN\", gender: \"m\" },\n unknown: { label: \"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2\", gender: \"m\" },\n value: { label: \"\u05E2\u05E8\u05DA\", gender: \"m\" },\n };\n // Sizing units for size-related messages + localized origin labels\n const Sizable = {\n string: { unit: \"\u05EA\u05D5\u05D5\u05D9\u05DD\", shortLabel: \"\u05E7\u05E6\u05E8\", longLabel: \"\u05D0\u05E8\u05D5\u05DA\" },\n file: { unit: \"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD\", shortLabel: \"\u05E7\u05D8\u05DF\", longLabel: \"\u05D2\u05D3\u05D5\u05DC\" },\n array: { unit: \"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD\", shortLabel: \"\u05E7\u05D8\u05DF\", longLabel: \"\u05D2\u05D3\u05D5\u05DC\" },\n set: { unit: \"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD\", shortLabel: \"\u05E7\u05D8\u05DF\", longLabel: \"\u05D2\u05D3\u05D5\u05DC\" },\n number: { unit: \"\", shortLabel: \"\u05E7\u05D8\u05DF\", longLabel: \"\u05D2\u05D3\u05D5\u05DC\" }, // no unit\n };\n // Helpers \u2014 labels, articles, and verbs\n const typeEntry = (t) => (t ? TypeNames[t] : undefined);\n const typeLabel = (t) => {\n const e = typeEntry(t);\n if (e)\n return e.label;\n // fallback: show raw string if unknown\n return t ?? TypeNames.unknown.label;\n };\n const withDefinite = (t) => `\u05D4${typeLabel(t)}`;\n const verbFor = (t) => {\n const e = typeEntry(t);\n const gender = e?.gender ?? \"m\";\n return gender === \"f\" ? \"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA\" : \"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA\";\n };\n const getSizing = (origin) => {\n if (!origin)\n return null;\n return Sizable[origin] ?? null;\n };\n const FormatDictionary = {\n regex: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n email: { label: \"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC\", gender: \"f\" },\n url: { label: \"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA\", gender: \"f\" },\n emoji: { label: \"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9\", gender: \"m\" },\n uuid: { label: \"UUID\", gender: \"m\" },\n nanoid: { label: \"nanoid\", gender: \"m\" },\n guid: { label: \"GUID\", gender: \"m\" },\n cuid: { label: \"cuid\", gender: \"m\" },\n cuid2: { label: \"cuid2\", gender: \"m\" },\n ulid: { label: \"ULID\", gender: \"m\" },\n xid: { label: \"XID\", gender: \"m\" },\n ksuid: { label: \"KSUID\", gender: \"m\" },\n datetime: { label: \"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO\", gender: \"m\" },\n date: { label: \"\u05EA\u05D0\u05E8\u05D9\u05DA ISO\", gender: \"m\" },\n time: { label: \"\u05D6\u05DE\u05DF ISO\", gender: \"m\" },\n duration: { label: \"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO\", gender: \"m\" },\n ipv4: { label: \"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4\", gender: \"f\" },\n ipv6: { label: \"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6\", gender: \"f\" },\n cidrv4: { label: \"\u05D8\u05D5\u05D5\u05D7 IPv4\", gender: \"m\" },\n cidrv6: { label: \"\u05D8\u05D5\u05D5\u05D7 IPv6\", gender: \"m\" },\n base64: { label: \"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64\", gender: \"f\" },\n base64url: { label: \"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA\", gender: \"f\" },\n json_string: { label: \"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON\", gender: \"f\" },\n e164: { label: \"\u05DE\u05E1\u05E4\u05E8 E.164\", gender: \"m\" },\n jwt: { label: \"JWT\", gender: \"m\" },\n ends_with: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n includes: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n lowercase: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n starts_with: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n uppercase: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n // Expected type: show without definite article for clearer Hebrew\n const expectedKey = issue.expected;\n const expected = TypeDictionary[expectedKey ?? \"\"] ?? typeLabel(expectedKey);\n // Received: show localized label if known, otherwise constructor/raw\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`;\n }\n return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`;\n }\n case \"invalid_value\": {\n if (issue.values.length === 1) {\n return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${util.stringifyPrimitive(issue.values[0])}`;\n }\n // Join values with proper Hebrew formatting\n const stringified = issue.values.map((v) => util.stringifyPrimitive(v));\n if (issue.values.length === 2) {\n return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`;\n }\n // For 3+ values: \"a\", \"b\" \u05D0\u05D5 \"c\"\n const lastValue = stringified[stringified.length - 1];\n const restValues = stringified.slice(0, -1).join(\", \");\n return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`;\n }\n case \"too_big\": {\n const sizing = getSizing(issue.origin);\n const subject = withDefinite(issue.origin ?? \"value\");\n if (issue.origin === \"string\") {\n // Special handling for strings - more natural Hebrew\n return `${sizing?.longLabel ?? \"\u05D0\u05E8\u05D5\u05DA\"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue.maximum.toString()} ${sizing?.unit ?? \"\"} ${issue.inclusive ? \"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA\" : \"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8\"}`.trim();\n }\n if (issue.origin === \"number\") {\n // Natural Hebrew for numbers\n const comparison = issue.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue.maximum}`;\n return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`;\n }\n if (issue.origin === \"array\" || issue.origin === \"set\") {\n // Natural Hebrew for arrays and sets\n const verb = issue.origin === \"set\" ? \"\u05E6\u05E8\u05D9\u05DB\u05D4\" : \"\u05E6\u05E8\u05D9\u05DA\";\n const comparison = issue.inclusive\n ? `${issue.maximum} ${sizing?.unit ?? \"\"} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`\n : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue.maximum} ${sizing?.unit ?? \"\"}`;\n return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();\n }\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const be = verbFor(issue.origin ?? \"value\");\n if (sizing?.unit) {\n return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue.maximum.toString()} ${sizing.unit}`;\n }\n return `${sizing?.longLabel ?? \"\u05D2\u05D3\u05D5\u05DC\"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const sizing = getSizing(issue.origin);\n const subject = withDefinite(issue.origin ?? \"value\");\n if (issue.origin === \"string\") {\n // Special handling for strings - more natural Hebrew\n return `${sizing?.shortLabel ?? \"\u05E7\u05E6\u05E8\"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue.minimum.toString()} ${sizing?.unit ?? \"\"} ${issue.inclusive ? \"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8\" : \"\u05DC\u05E4\u05D7\u05D5\u05EA\"}`.trim();\n }\n if (issue.origin === \"number\") {\n // Natural Hebrew for numbers\n const comparison = issue.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue.minimum}`;\n return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`;\n }\n if (issue.origin === \"array\" || issue.origin === \"set\") {\n // Natural Hebrew for arrays and sets\n const verb = issue.origin === \"set\" ? \"\u05E6\u05E8\u05D9\u05DB\u05D4\" : \"\u05E6\u05E8\u05D9\u05DA\";\n // Special case for singular (minimum === 1)\n if (issue.minimum === 1 && issue.inclusive) {\n const singularPhrase = issue.origin === \"set\" ? \"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3\" : \"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3\";\n return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`;\n }\n const comparison = issue.inclusive\n ? `${issue.minimum} ${sizing?.unit ?? \"\"} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`\n : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue.minimum} ${sizing?.unit ?? \"\"}`;\n return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();\n }\n const adj = issue.inclusive ? \">=\" : \">\";\n const be = verbFor(issue.origin ?? \"value\");\n if (sizing?.unit) {\n return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `${sizing?.shortLabel ?? \"\u05E7\u05D8\u05DF\"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n // These apply to strings \u2014 use feminine grammar + \u05D4\u05F3 \u05D4\u05D9\u05D3\u05D9\u05E2\u05D4\n if (_issue.format === \"starts_with\")\n return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`;\n // Handle gender agreement for formats\n const nounEntry = FormatDictionary[_issue.format];\n const noun = nounEntry?.label ?? _issue.format;\n const gender = nounEntry?.gender ?? \"m\";\n const adjective = gender === \"f\" ? \"\u05EA\u05E7\u05D9\u05E0\u05D4\" : \"\u05EA\u05E7\u05D9\u05DF\";\n return `${noun} \u05DC\u05D0 ${adjective}`;\n }\n case \"not_multiple_of\":\n return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u05DE\u05E4\u05EA\u05D7${issue.keys.length > 1 ? \"\u05D5\u05EA\" : \"\"} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue.keys.length > 1 ? \"\u05D9\u05DD\" : \"\u05D4\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\": {\n return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`;\n }\n case \"invalid_union\":\n return \"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF\";\n case \"invalid_element\": {\n const place = withDefinite(issue.origin ?? \"array\");\n return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`;\n }\n default:\n return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"karakter\", verb: \"legyen\" },\n file: { unit: \"byte\", verb: \"legyen\" },\n array: { unit: \"elem\", verb: \"legyen\" },\n set: { unit: \"elem\", verb: \"legyen\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"bemenet\",\n email: \"email c\u00EDm\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO id\u0151b\u00E9lyeg\",\n date: \"ISO d\u00E1tum\",\n time: \"ISO id\u0151\",\n duration: \"ISO id\u0151intervallum\",\n ipv4: \"IPv4 c\u00EDm\",\n ipv6: \"IPv6 c\u00EDm\",\n cidrv4: \"IPv4 tartom\u00E1ny\",\n cidrv6: \"IPv6 tartom\u00E1ny\",\n base64: \"base64-k\u00F3dolt string\",\n base64url: \"base64url-k\u00F3dolt string\",\n json_string: \"JSON string\",\n e164: \"E.164 sz\u00E1m\",\n jwt: \"JWT\",\n template_literal: \"bemenet\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"sz\u00E1m\",\n array: \"t\u00F6mb\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u00C9rv\u00E9nytelen bemenet: a v\u00E1rt \u00E9rt\u00E9k instanceof ${issue.expected}, a kapott \u00E9rt\u00E9k ${received}`;\n }\n return `\u00C9rv\u00E9nytelen bemenet: a v\u00E1rt \u00E9rt\u00E9k ${expected}, a kapott \u00E9rt\u00E9k ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u00C9rv\u00E9nytelen bemenet: a v\u00E1rt \u00E9rt\u00E9k ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u00C9rv\u00E9nytelen opci\u00F3: valamelyik \u00E9rt\u00E9k v\u00E1rt ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `T\u00FAl nagy: ${issue.origin ?? \"\u00E9rt\u00E9k\"} m\u00E9rete t\u00FAl nagy ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elem\"}`;\n return `T\u00FAl nagy: a bemeneti \u00E9rt\u00E9k ${issue.origin ?? \"\u00E9rt\u00E9k\"} t\u00FAl nagy: ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `T\u00FAl kicsi: a bemeneti \u00E9rt\u00E9k ${issue.origin} m\u00E9rete t\u00FAl kicsi ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `T\u00FAl kicsi: a bemeneti \u00E9rt\u00E9k ${issue.origin} t\u00FAl kicsi ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u00C9rv\u00E9nytelen string: \"${_issue.prefix}\" \u00E9rt\u00E9kkel kell kezd\u0151dnie`;\n if (_issue.format === \"ends_with\")\n return `\u00C9rv\u00E9nytelen string: \"${_issue.suffix}\" \u00E9rt\u00E9kkel kell v\u00E9gz\u0151dnie`;\n if (_issue.format === \"includes\")\n return `\u00C9rv\u00E9nytelen string: \"${_issue.includes}\" \u00E9rt\u00E9ket kell tartalmaznia`;\n if (_issue.format === \"regex\")\n return `\u00C9rv\u00E9nytelen string: ${_issue.pattern} mint\u00E1nak kell megfelelnie`;\n return `\u00C9rv\u00E9nytelen ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u00C9rv\u00E9nytelen sz\u00E1m: ${issue.divisor} t\u00F6bbsz\u00F6r\u00F6s\u00E9nek kell lennie`;\n case \"unrecognized_keys\":\n return `Ismeretlen kulcs${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u00C9rv\u00E9nytelen kulcs ${issue.origin}`;\n case \"invalid_union\":\n return \"\u00C9rv\u00E9nytelen bemenet\";\n case \"invalid_element\":\n return `\u00C9rv\u00E9nytelen \u00E9rt\u00E9k: ${issue.origin}`;\n default:\n return `\u00C9rv\u00E9nytelen bemenet`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nfunction getArmenianPlural(count, one, many) {\n return Math.abs(count) === 1 ? one : many;\n}\nfunction withDefiniteArticle(word) {\n if (!word)\n return \"\";\n const vowels = [\"\u0561\", \"\u0565\", \"\u0568\", \"\u056B\", \"\u0578\", \"\u0578\u0582\", \"\u0585\"];\n const lastChar = word[word.length - 1];\n return word + (vowels.includes(lastChar) ? \"\u0576\" : \"\u0568\");\n}\nconst error = () => {\n const Sizable = {\n string: {\n unit: {\n one: \"\u0576\u0577\u0561\u0576\",\n many: \"\u0576\u0577\u0561\u0576\u0576\u0565\u0580\",\n },\n verb: \"\u0578\u0582\u0576\u0565\u0576\u0561\u056C\",\n },\n file: {\n unit: {\n one: \"\u0562\u0561\u0575\u0569\",\n many: \"\u0562\u0561\u0575\u0569\u0565\u0580\",\n },\n verb: \"\u0578\u0582\u0576\u0565\u0576\u0561\u056C\",\n },\n array: {\n unit: {\n one: \"\u057F\u0561\u0580\u0580\",\n many: \"\u057F\u0561\u0580\u0580\u0565\u0580\",\n },\n verb: \"\u0578\u0582\u0576\u0565\u0576\u0561\u056C\",\n },\n set: {\n unit: {\n one: \"\u057F\u0561\u0580\u0580\",\n many: \"\u057F\u0561\u0580\u0580\u0565\u0580\",\n },\n verb: \"\u0578\u0582\u0576\u0565\u0576\u0561\u056C\",\n },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0574\u0578\u0582\u057F\u0584\",\n email: \"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565\",\n url: \"URL\",\n emoji: \"\u0567\u0574\u0578\u057B\u056B\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574\",\n date: \"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E\",\n time: \"ISO \u056A\u0561\u0574\",\n duration: \"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576\",\n ipv4: \"IPv4 \u0570\u0561\u057D\u0581\u0565\",\n ipv6: \"IPv6 \u0570\u0561\u057D\u0581\u0565\",\n cidrv4: \"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584\",\n cidrv6: \"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584\",\n base64: \"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572\",\n base64url: \"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572\",\n json_string: \"JSON \u057F\u0578\u0572\",\n e164: \"E.164 \u0570\u0561\u0574\u0561\u0580\",\n jwt: \"JWT\",\n template_literal: \"\u0574\u0578\u0582\u057F\u0584\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0569\u056B\u057E\",\n array: \"\u0566\u0561\u0576\u0563\u057E\u0561\u056E\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${issue.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`;\n }\n return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${util.stringifyPrimitive(issue.values[1])}`;\n return `\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const maxValue = Number(issue.maximum);\n const unit = getArmenianPlural(maxValue, sizing.unit.one, sizing.unit.many);\n return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue.origin ?? \"\u0561\u0580\u056A\u0565\u0584\")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue.maximum.toString()} ${unit}`;\n }\n return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue.origin ?? \"\u0561\u0580\u056A\u0565\u0584\")} \u056C\u056B\u0576\u056B ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const minValue = Number(issue.minimum);\n const unit = getArmenianPlural(minValue, sizing.unit.one, sizing.unit.many);\n return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue.minimum.toString()} ${unit}`;\n }\n return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue.origin)} \u056C\u056B\u0576\u056B ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B \"${_issue.prefix}\"-\u0578\u057E`;\n if (_issue.format === \"ends_with\")\n return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B \"${_issue.suffix}\"-\u0578\u057E`;\n if (_issue.format === \"includes\")\n return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${_issue.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`;\n return `\u054D\u056D\u0561\u056C ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${issue.divisor}-\u056B`;\n case \"unrecognized_keys\":\n return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${issue.keys.length > 1 ? \"\u0576\u0565\u0580\" : \"\"}. ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${withDefiniteArticle(issue.origin)}-\u0578\u0582\u0574`;\n case \"invalid_union\":\n return \"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\";\n case \"invalid_element\":\n return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${withDefiniteArticle(issue.origin)}-\u0578\u0582\u0574`;\n default:\n return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"karakter\", verb: \"memiliki\" },\n file: { unit: \"byte\", verb: \"memiliki\" },\n array: { unit: \"item\", verb: \"memiliki\" },\n set: { unit: \"item\", verb: \"memiliki\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"alamat email\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"tanggal dan waktu format ISO\",\n date: \"tanggal format ISO\",\n time: \"jam format ISO\",\n duration: \"durasi format ISO\",\n ipv4: \"alamat IPv4\",\n ipv6: \"alamat IPv6\",\n cidrv4: \"rentang alamat IPv4\",\n cidrv6: \"rentang alamat IPv6\",\n base64: \"string dengan enkode base64\",\n base64url: \"string dengan enkode base64url\",\n json_string: \"string JSON\",\n e164: \"angka E.164\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Input tidak valid: diharapkan instanceof ${issue.expected}, diterima ${received}`;\n }\n return `Input tidak valid: diharapkan ${expected}, diterima ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Input tidak valid: diharapkan ${util.stringifyPrimitive(issue.values[0])}`;\n return `Pilihan tidak valid: diharapkan salah satu dari ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Terlalu besar: diharapkan ${issue.origin ?? \"value\"} memiliki ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elemen\"}`;\n return `Terlalu besar: diharapkan ${issue.origin ?? \"value\"} menjadi ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Terlalu kecil: diharapkan ${issue.origin} memiliki ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Terlalu kecil: diharapkan ${issue.origin} menjadi ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `String tidak valid: harus dimulai dengan \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `String tidak valid: harus berakhir dengan \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `String tidak valid: harus menyertakan \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `String tidak valid: harus sesuai pola ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} tidak valid`;\n }\n case \"not_multiple_of\":\n return `Angka tidak valid: harus kelipatan dari ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Kunci tidak dikenali ${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Kunci tidak valid di ${issue.origin}`;\n case \"invalid_union\":\n return \"Input tidak valid\";\n case \"invalid_element\":\n return `Nilai tidak valid di ${issue.origin}`;\n default:\n return `Input tidak valid`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"stafi\", verb: \"a\u00F0 hafa\" },\n file: { unit: \"b\u00E6ti\", verb: \"a\u00F0 hafa\" },\n array: { unit: \"hluti\", verb: \"a\u00F0 hafa\" },\n set: { unit: \"hluti\", verb: \"a\u00F0 hafa\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"gildi\",\n email: \"netfang\",\n url: \"vefsl\u00F3\u00F0\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO dagsetning og t\u00EDmi\",\n date: \"ISO dagsetning\",\n time: \"ISO t\u00EDmi\",\n duration: \"ISO t\u00EDmalengd\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded strengur\",\n base64url: \"base64url-encoded strengur\",\n json_string: \"JSON strengur\",\n e164: \"E.164 t\u00F6lugildi\",\n jwt: \"JWT\",\n template_literal: \"gildi\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"n\u00FAmer\",\n array: \"fylki\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Rangt gildi: \u00DE\u00FA sl\u00F3st inn ${received} \u00FEar sem \u00E1 a\u00F0 vera instanceof ${issue.expected}`;\n }\n return `Rangt gildi: \u00DE\u00FA sl\u00F3st inn ${received} \u00FEar sem \u00E1 a\u00F0 vera ${expected}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Rangt gildi: gert r\u00E1\u00F0 fyrir ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u00D3gilt val: m\u00E1 vera eitt af eftirfarandi ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Of st\u00F3rt: gert er r\u00E1\u00F0 fyrir a\u00F0 ${issue.origin ?? \"gildi\"} hafi ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"hluti\"}`;\n return `Of st\u00F3rt: gert er r\u00E1\u00F0 fyrir a\u00F0 ${issue.origin ?? \"gildi\"} s\u00E9 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Of l\u00EDti\u00F0: gert er r\u00E1\u00F0 fyrir a\u00F0 ${issue.origin} hafi ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Of l\u00EDti\u00F0: gert er r\u00E1\u00F0 fyrir a\u00F0 ${issue.origin} s\u00E9 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u00D3gildur strengur: ver\u00F0ur a\u00F0 byrja \u00E1 \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u00D3gildur strengur: ver\u00F0ur a\u00F0 enda \u00E1 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u00D3gildur strengur: ver\u00F0ur a\u00F0 innihalda \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u00D3gildur strengur: ver\u00F0ur a\u00F0 fylgja mynstri ${_issue.pattern}`;\n return `Rangt ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `R\u00F6ng tala: ver\u00F0ur a\u00F0 vera margfeldi af ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u00D3\u00FEekkt ${issue.keys.length > 1 ? \"ir lyklar\" : \"ur lykill\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Rangur lykill \u00ED ${issue.origin}`;\n case \"invalid_union\":\n return \"Rangt gildi\";\n case \"invalid_element\":\n return `Rangt gildi \u00ED ${issue.origin}`;\n default:\n return `Rangt gildi`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caratteri\", verb: \"avere\" },\n file: { unit: \"byte\", verb: \"avere\" },\n array: { unit: \"elementi\", verb: \"avere\" },\n set: { unit: \"elementi\", verb: \"avere\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"indirizzo email\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"data e ora ISO\",\n date: \"data ISO\",\n time: \"ora ISO\",\n duration: \"durata ISO\",\n ipv4: \"indirizzo IPv4\",\n ipv6: \"indirizzo IPv6\",\n cidrv4: \"intervallo IPv4\",\n cidrv6: \"intervallo IPv6\",\n base64: \"stringa codificata in base64\",\n base64url: \"URL codificata in base64\",\n json_string: \"stringa JSON\",\n e164: \"numero E.164\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"numero\",\n array: \"vettore\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Input non valido: atteso instanceof ${issue.expected}, ricevuto ${received}`;\n }\n return `Input non valido: atteso ${expected}, ricevuto ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Input non valido: atteso ${util.stringifyPrimitive(issue.values[0])}`;\n return `Opzione non valida: atteso uno tra ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Troppo grande: ${issue.origin ?? \"valore\"} deve avere ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementi\"}`;\n return `Troppo grande: ${issue.origin ?? \"valore\"} deve essere ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Troppo piccolo: ${issue.origin} deve avere ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Troppo piccolo: ${issue.origin} deve essere ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Stringa non valida: deve iniziare con \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Stringa non valida: deve terminare con \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Stringa non valida: deve includere \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Numero non valido: deve essere un multiplo di ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Chiav${issue.keys.length > 1 ? \"i\" : \"e\"} non riconosciut${issue.keys.length > 1 ? \"e\" : \"a\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Chiave non valida in ${issue.origin}`;\n case \"invalid_union\":\n return \"Input non valido\";\n case \"invalid_element\":\n return `Valore non valido in ${issue.origin}`;\n default:\n return `Input non valido`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u6587\u5B57\", verb: \"\u3067\u3042\u308B\" },\n file: { unit: \"\u30D0\u30A4\u30C8\", verb: \"\u3067\u3042\u308B\" },\n array: { unit: \"\u8981\u7D20\", verb: \"\u3067\u3042\u308B\" },\n set: { unit: \"\u8981\u7D20\", verb: \"\u3067\u3042\u308B\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u5165\u529B\u5024\",\n email: \"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\",\n url: \"URL\",\n emoji: \"\u7D75\u6587\u5B57\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO\u65E5\u6642\",\n date: \"ISO\u65E5\u4ED8\",\n time: \"ISO\u6642\u523B\",\n duration: \"ISO\u671F\u9593\",\n ipv4: \"IPv4\u30A2\u30C9\u30EC\u30B9\",\n ipv6: \"IPv6\u30A2\u30C9\u30EC\u30B9\",\n cidrv4: \"IPv4\u7BC4\u56F2\",\n cidrv6: \"IPv6\u7BC4\u56F2\",\n base64: \"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217\",\n base64url: \"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217\",\n json_string: \"JSON\u6587\u5B57\u5217\",\n e164: \"E.164\u756A\u53F7\",\n jwt: \"JWT\",\n template_literal: \"\u5165\u529B\u5024\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u6570\u5024\",\n array: \"\u914D\u5217\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u7121\u52B9\u306A\u5165\u529B: instanceof ${issue.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;\n }\n return `\u7121\u52B9\u306A\u5165\u529B: ${expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u7121\u52B9\u306A\u5165\u529B: ${util.stringifyPrimitive(issue.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`;\n return `\u7121\u52B9\u306A\u9078\u629E: ${util.joinValues(issue.values, \"\u3001\")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"\u4EE5\u4E0B\u3067\u3042\u308B\" : \"\u3088\u308A\u5C0F\u3055\u3044\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue.origin ?? \"\u5024\"}\u306F${issue.maximum.toString()}${sizing.unit ?? \"\u8981\u7D20\"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue.origin ?? \"\u5024\"}\u306F${issue.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"\u4EE5\u4E0A\u3067\u3042\u308B\" : \"\u3088\u308A\u5927\u304D\u3044\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue.origin}\u306F${issue.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue.origin}\u306F${issue.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \"${_issue.prefix}\"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n if (_issue.format === \"ends_with\")\n return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \"${_issue.suffix}\"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n if (_issue.format === \"includes\")\n return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \"${_issue.includes}\"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n if (_issue.format === \"regex\")\n return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n return `\u7121\u52B9\u306A${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u7121\u52B9\u306A\u6570\u5024: ${issue.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n case \"unrecognized_keys\":\n return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue.keys.length > 1 ? \"\u7FA4\" : \"\"}: ${util.joinValues(issue.keys, \"\u3001\")}`;\n case \"invalid_key\":\n return `${issue.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;\n case \"invalid_union\":\n return \"\u7121\u52B9\u306A\u5165\u529B\";\n case \"invalid_element\":\n return `${issue.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;\n default:\n return `\u7121\u52B9\u306A\u5165\u529B`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD\", verb: \"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1\" },\n file: { unit: \"\u10D1\u10D0\u10D8\u10E2\u10D8\", verb: \"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1\" },\n array: { unit: \"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8\", verb: \"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1\" },\n set: { unit: \"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8\", verb: \"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0\",\n email: \"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8\",\n url: \"URL\",\n emoji: \"\u10D4\u10DB\u10DD\u10EF\u10D8\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD\",\n date: \"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8\",\n time: \"\u10D3\u10E0\u10DD\",\n duration: \"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0\",\n ipv4: \"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8\",\n ipv6: \"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8\",\n cidrv4: \"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8\",\n cidrv6: \"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8\",\n base64: \"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8\",\n base64url: \"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8\",\n json_string: \"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8\",\n e164: \"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8\",\n jwt: \"JWT\",\n template_literal: \"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8\",\n string: \"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8\",\n boolean: \"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8\",\n function: \"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0\",\n array: \"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${issue.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`;\n }\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${util.joinValues(issue.values, \"|\")}-\u10D3\u10D0\u10DC`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue.origin ?? \"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0\"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit}`;\n return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue.origin ?? \"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0\"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \"${_issue.prefix}\"-\u10D8\u10D7`;\n }\n if (_issue.format === \"ends_with\")\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \"${_issue.suffix}\"-\u10D8\u10D7`;\n if (_issue.format === \"includes\")\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 \"${_issue.includes}\"-\u10E1`;\n if (_issue.format === \"regex\")\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;\n case \"unrecognized_keys\":\n return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue.keys.length > 1 ? \"\u10D4\u10D1\u10D8\" : \"\u10D8\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue.origin}-\u10E8\u10D8`;\n case \"invalid_union\":\n return \"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0\";\n case \"invalid_element\":\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue.origin}-\u10E8\u10D8`;\n default:\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A\", verb: \"\u1782\u17BD\u179A\u1798\u17B6\u1793\" },\n file: { unit: \"\u1794\u17C3\", verb: \"\u1782\u17BD\u179A\u1798\u17B6\u1793\" },\n array: { unit: \"\u1792\u17B6\u178F\u17BB\", verb: \"\u1782\u17BD\u179A\u1798\u17B6\u1793\" },\n set: { unit: \"\u1792\u17B6\u178F\u17BB\", verb: \"\u1782\u17BD\u179A\u1798\u17B6\u1793\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\",\n email: \"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B\",\n url: \"URL\",\n emoji: \"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO\",\n date: \"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO\",\n time: \"\u1798\u17C9\u17C4\u1784 ISO\",\n duration: \"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO\",\n ipv4: \"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4\",\n ipv6: \"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6\",\n cidrv4: \"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4\",\n cidrv6: \"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6\",\n base64: \"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64\",\n base64url: \"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url\",\n json_string: \"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON\",\n e164: \"\u179B\u17C1\u1781 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u179B\u17C1\u1781\",\n array: \"\u17A2\u17B6\u179A\u17C1 (Array)\",\n null: \"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${issue.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`;\n }\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue.origin ?? \"\u178F\u1798\u17D2\u179B\u17C3\"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"\u1792\u17B6\u178F\u17BB\"}`;\n return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue.origin ?? \"\u178F\u1798\u17D2\u179B\u17C3\"} ${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue.origin} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue.origin} ${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`;\n return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue.origin}`;\n case \"invalid_union\":\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`;\n case \"invalid_element\":\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue.origin}`;\n default:\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import km from \"./km.js\";\n/** @deprecated Use `km` instead. */\nexport default function () {\n return km();\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\uBB38\uC790\", verb: \"to have\" },\n file: { unit: \"\uBC14\uC774\uD2B8\", verb: \"to have\" },\n array: { unit: \"\uAC1C\", verb: \"to have\" },\n set: { unit: \"\uAC1C\", verb: \"to have\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\uC785\uB825\",\n email: \"\uC774\uBA54\uC77C \uC8FC\uC18C\",\n url: \"URL\",\n emoji: \"\uC774\uBAA8\uC9C0\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \uB0A0\uC9DC\uC2DC\uAC04\",\n date: \"ISO \uB0A0\uC9DC\",\n time: \"ISO \uC2DC\uAC04\",\n duration: \"ISO \uAE30\uAC04\",\n ipv4: \"IPv4 \uC8FC\uC18C\",\n ipv6: \"IPv6 \uC8FC\uC18C\",\n cidrv4: \"IPv4 \uBC94\uC704\",\n cidrv6: \"IPv6 \uBC94\uC704\",\n base64: \"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4\",\n base64url: \"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4\",\n json_string: \"JSON \uBB38\uC790\uC5F4\",\n e164: \"E.164 \uBC88\uD638\",\n jwt: \"JWT\",\n template_literal: \"\uC785\uB825\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${issue.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`;\n }\n return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${util.stringifyPrimitive(issue.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`;\n return `\uC798\uBABB\uB41C \uC635\uC158: ${util.joinValues(issue.values, \"\uB610\uB294 \")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"\uC774\uD558\" : \"\uBBF8\uB9CC\";\n const suffix = adj === \"\uBBF8\uB9CC\" ? \"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4\" : \"\uC5EC\uC57C \uD569\uB2C8\uB2E4\";\n const sizing = getSizing(issue.origin);\n const unit = sizing?.unit ?? \"\uC694\uC18C\";\n if (sizing)\n return `${issue.origin ?? \"\uAC12\"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue.maximum.toString()}${unit} ${adj}${suffix}`;\n return `${issue.origin ?? \"\uAC12\"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue.maximum.toString()} ${adj}${suffix}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"\uC774\uC0C1\" : \"\uCD08\uACFC\";\n const suffix = adj === \"\uC774\uC0C1\" ? \"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4\" : \"\uC5EC\uC57C \uD569\uB2C8\uB2E4\";\n const sizing = getSizing(issue.origin);\n const unit = sizing?.unit ?? \"\uC694\uC18C\";\n if (sizing) {\n return `${issue.origin ?? \"\uAC12\"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue.minimum.toString()}${unit} ${adj}${suffix}`;\n }\n return `${issue.origin ?? \"\uAC12\"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue.minimum.toString()} ${adj}${suffix}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \"${_issue.prefix}\"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`;\n }\n if (_issue.format === \"ends_with\")\n return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \"${_issue.suffix}\"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`;\n if (_issue.format === \"includes\")\n return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \"${_issue.includes}\"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`;\n if (_issue.format === \"regex\")\n return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`;\n return `\uC798\uBABB\uB41C ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;\n case \"unrecognized_keys\":\n return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\uC798\uBABB\uB41C \uD0A4: ${issue.origin}`;\n case \"invalid_union\":\n return `\uC798\uBABB\uB41C \uC785\uB825`;\n case \"invalid_element\":\n return `\uC798\uBABB\uB41C \uAC12: ${issue.origin}`;\n default:\n return `\uC798\uBABB\uB41C \uC785\uB825`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst capitalizeFirstCharacter = (text) => {\n return text.charAt(0).toUpperCase() + text.slice(1);\n};\nfunction getUnitTypeFromNumber(number) {\n const abs = Math.abs(number);\n const last = abs % 10;\n const last2 = abs % 100;\n if ((last2 >= 11 && last2 <= 19) || last === 0)\n return \"many\";\n if (last === 1)\n return \"one\";\n return \"few\";\n}\nconst error = () => {\n const Sizable = {\n string: {\n unit: {\n one: \"simbolis\",\n few: \"simboliai\",\n many: \"simboli\u0173\",\n },\n verb: {\n smaller: {\n inclusive: \"turi b\u016Bti ne ilgesn\u0117 kaip\",\n notInclusive: \"turi b\u016Bti trumpesn\u0117 kaip\",\n },\n bigger: {\n inclusive: \"turi b\u016Bti ne trumpesn\u0117 kaip\",\n notInclusive: \"turi b\u016Bti ilgesn\u0117 kaip\",\n },\n },\n },\n file: {\n unit: {\n one: \"baitas\",\n few: \"baitai\",\n many: \"bait\u0173\",\n },\n verb: {\n smaller: {\n inclusive: \"turi b\u016Bti ne didesnis kaip\",\n notInclusive: \"turi b\u016Bti ma\u017Eesnis kaip\",\n },\n bigger: {\n inclusive: \"turi b\u016Bti ne ma\u017Eesnis kaip\",\n notInclusive: \"turi b\u016Bti didesnis kaip\",\n },\n },\n },\n array: {\n unit: {\n one: \"element\u0105\",\n few: \"elementus\",\n many: \"element\u0173\",\n },\n verb: {\n smaller: {\n inclusive: \"turi tur\u0117ti ne daugiau kaip\",\n notInclusive: \"turi tur\u0117ti ma\u017Eiau kaip\",\n },\n bigger: {\n inclusive: \"turi tur\u0117ti ne ma\u017Eiau kaip\",\n notInclusive: \"turi tur\u0117ti daugiau kaip\",\n },\n },\n },\n set: {\n unit: {\n one: \"element\u0105\",\n few: \"elementus\",\n many: \"element\u0173\",\n },\n verb: {\n smaller: {\n inclusive: \"turi tur\u0117ti ne daugiau kaip\",\n notInclusive: \"turi tur\u0117ti ma\u017Eiau kaip\",\n },\n bigger: {\n inclusive: \"turi tur\u0117ti ne ma\u017Eiau kaip\",\n notInclusive: \"turi tur\u0117ti daugiau kaip\",\n },\n },\n },\n };\n function getSizing(origin, unitType, inclusive, targetShouldBe) {\n const result = Sizable[origin] ?? null;\n if (result === null)\n return result;\n return {\n unit: result.unit[unitType],\n verb: result.verb[targetShouldBe][inclusive ? \"inclusive\" : \"notInclusive\"],\n };\n }\n const FormatDictionary = {\n regex: \"\u012Fvestis\",\n email: \"el. pa\u0161to adresas\",\n url: \"URL\",\n emoji: \"jaustukas\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO data ir laikas\",\n date: \"ISO data\",\n time: \"ISO laikas\",\n duration: \"ISO trukm\u0117\",\n ipv4: \"IPv4 adresas\",\n ipv6: \"IPv6 adresas\",\n cidrv4: \"IPv4 tinklo prefiksas (CIDR)\",\n cidrv6: \"IPv6 tinklo prefiksas (CIDR)\",\n base64: \"base64 u\u017Ekoduota eilut\u0117\",\n base64url: \"base64url u\u017Ekoduota eilut\u0117\",\n json_string: \"JSON eilut\u0117\",\n e164: \"E.164 numeris\",\n jwt: \"JWT\",\n template_literal: \"\u012Fvestis\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"skai\u010Dius\",\n bigint: \"sveikasis skai\u010Dius\",\n string: \"eilut\u0117\",\n boolean: \"login\u0117 reik\u0161m\u0117\",\n undefined: \"neapibr\u0117\u017Eta reik\u0161m\u0117\",\n function: \"funkcija\",\n symbol: \"simbolis\",\n array: \"masyvas\",\n object: \"objektas\",\n null: \"nulin\u0117 reik\u0161m\u0117\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Gautas tipas ${received}, o tik\u0117tasi - instanceof ${issue.expected}`;\n }\n return `Gautas tipas ${received}, o tik\u0117tasi - ${expected}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Privalo b\u016Bti ${util.stringifyPrimitive(issue.values[0])}`;\n return `Privalo b\u016Bti vienas i\u0161 ${util.joinValues(issue.values, \"|\")} pasirinkim\u0173`;\n case \"too_big\": {\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n const sizing = getSizing(issue.origin, getUnitTypeFromNumber(Number(issue.maximum)), issue.inclusive ?? false, \"smaller\");\n if (sizing?.verb)\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} ${sizing.verb} ${issue.maximum.toString()} ${sizing.unit ?? \"element\u0173\"}`;\n const adj = issue.inclusive ? \"ne didesnis kaip\" : \"ma\u017Eesnis kaip\";\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} turi b\u016Bti ${adj} ${issue.maximum.toString()} ${sizing?.unit}`;\n }\n case \"too_small\": {\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n const sizing = getSizing(issue.origin, getUnitTypeFromNumber(Number(issue.minimum)), issue.inclusive ?? false, \"bigger\");\n if (sizing?.verb)\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} ${sizing.verb} ${issue.minimum.toString()} ${sizing.unit ?? \"element\u0173\"}`;\n const adj = issue.inclusive ? \"ne ma\u017Eesnis kaip\" : \"didesnis kaip\";\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} turi b\u016Bti ${adj} ${issue.minimum.toString()} ${sizing?.unit}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Eilut\u0117 privalo prasid\u0117ti \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Eilut\u0117 privalo pasibaigti \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Eilut\u0117 privalo \u012Ftraukti \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Eilut\u0117 privalo atitikti ${_issue.pattern}`;\n return `Neteisingas ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Skai\u010Dius privalo b\u016Bti ${issue.divisor} kartotinis.`;\n case \"unrecognized_keys\":\n return `Neatpa\u017Eint${issue.keys.length > 1 ? \"i\" : \"as\"} rakt${issue.keys.length > 1 ? \"ai\" : \"as\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return \"Rastas klaidingas raktas\";\n case \"invalid_union\":\n return \"Klaidinga \u012Fvestis\";\n case \"invalid_element\": {\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} turi klaiding\u0105 \u012Fvest\u012F`;\n }\n default:\n return \"Klaidinga \u012Fvestis\";\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0437\u043D\u0430\u0446\u0438\", verb: \"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442\" },\n file: { unit: \"\u0431\u0430\u0458\u0442\u0438\", verb: \"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442\" },\n array: { unit: \"\u0441\u0442\u0430\u0432\u043A\u0438\", verb: \"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442\" },\n set: { unit: \"\u0441\u0442\u0430\u0432\u043A\u0438\", verb: \"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0432\u043D\u0435\u0441\",\n email: \"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430\",\n url: \"URL\",\n emoji: \"\u0435\u043C\u043E\u045F\u0438\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435\",\n date: \"ISO \u0434\u0430\u0442\u0443\u043C\",\n time: \"ISO \u0432\u0440\u0435\u043C\u0435\",\n duration: \"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435\",\n ipv4: \"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430\",\n ipv6: \"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430\",\n cidrv4: \"IPv4 \u043E\u043F\u0441\u0435\u0433\",\n cidrv6: \"IPv6 \u043E\u043F\u0441\u0435\u0433\",\n base64: \"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430\",\n base64url: \"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430\",\n json_string: \"JSON \u043D\u0438\u0437\u0430\",\n e164: \"E.164 \u0431\u0440\u043E\u0458\",\n jwt: \"JWT\",\n template_literal: \"\u0432\u043D\u0435\u0441\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0431\u0440\u043E\u0458\",\n array: \"\u043D\u0438\u0437\u0430\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${issue.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`;\n }\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue.origin ?? \"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430\"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438\"}`;\n return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue.origin ?? \"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430\"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438\" : \"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue.origin}`;\n case \"invalid_union\":\n return \"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441\";\n case \"invalid_element\":\n return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue.origin}`;\n default:\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"aksara\", verb: \"mempunyai\" },\n file: { unit: \"bait\", verb: \"mempunyai\" },\n array: { unit: \"elemen\", verb: \"mempunyai\" },\n set: { unit: \"elemen\", verb: \"mempunyai\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"alamat e-mel\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"tarikh masa ISO\",\n date: \"tarikh ISO\",\n time: \"masa ISO\",\n duration: \"tempoh ISO\",\n ipv4: \"alamat IPv4\",\n ipv6: \"alamat IPv6\",\n cidrv4: \"julat IPv4\",\n cidrv6: \"julat IPv6\",\n base64: \"string dikodkan base64\",\n base64url: \"string dikodkan base64url\",\n json_string: \"string JSON\",\n e164: \"nombor E.164\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"nombor\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Input tidak sah: dijangka instanceof ${issue.expected}, diterima ${received}`;\n }\n return `Input tidak sah: dijangka ${expected}, diterima ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Input tidak sah: dijangka ${util.stringifyPrimitive(issue.values[0])}`;\n return `Pilihan tidak sah: dijangka salah satu daripada ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Terlalu besar: dijangka ${issue.origin ?? \"nilai\"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elemen\"}`;\n return `Terlalu besar: dijangka ${issue.origin ?? \"nilai\"} adalah ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Terlalu kecil: dijangka ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Terlalu kecil: dijangka ${issue.origin} adalah ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `String tidak sah: mesti bermula dengan \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `String tidak sah: mesti berakhir dengan \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `String tidak sah: mesti mengandungi \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} tidak sah`;\n }\n case \"not_multiple_of\":\n return `Nombor tidak sah: perlu gandaan ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Kunci tidak dikenali: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Kunci tidak sah dalam ${issue.origin}`;\n case \"invalid_union\":\n return \"Input tidak sah\";\n case \"invalid_element\":\n return `Nilai tidak sah dalam ${issue.origin}`;\n default:\n return `Input tidak sah`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"tekens\", verb: \"heeft\" },\n file: { unit: \"bytes\", verb: \"heeft\" },\n array: { unit: \"elementen\", verb: \"heeft\" },\n set: { unit: \"elementen\", verb: \"heeft\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"invoer\",\n email: \"emailadres\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datum en tijd\",\n date: \"ISO datum\",\n time: \"ISO tijd\",\n duration: \"ISO duur\",\n ipv4: \"IPv4-adres\",\n ipv6: \"IPv6-adres\",\n cidrv4: \"IPv4-bereik\",\n cidrv6: \"IPv6-bereik\",\n base64: \"base64-gecodeerde tekst\",\n base64url: \"base64 URL-gecodeerde tekst\",\n json_string: \"JSON string\",\n e164: \"E.164-nummer\",\n jwt: \"JWT\",\n template_literal: \"invoer\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"getal\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ongeldige invoer: verwacht instanceof ${issue.expected}, ontving ${received}`;\n }\n return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ongeldige invoer: verwacht ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ongeldige optie: verwacht \u00E9\u00E9n van ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n const longName = issue.origin === \"date\" ? \"laat\" : issue.origin === \"string\" ? \"lang\" : \"groot\";\n if (sizing)\n return `Te ${longName}: verwacht dat ${issue.origin ?? \"waarde\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementen\"} ${sizing.verb}`;\n return `Te ${longName}: verwacht dat ${issue.origin ?? \"waarde\"} ${adj}${issue.maximum.toString()} is`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n const shortName = issue.origin === \"date\" ? \"vroeg\" : issue.origin === \"string\" ? \"kort\" : \"klein\";\n if (sizing) {\n return `Te ${shortName}: verwacht dat ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} ${sizing.verb}`;\n }\n return `Te ${shortName}: verwacht dat ${issue.origin} ${adj}${issue.minimum.toString()} is`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Ongeldige tekst: moet met \"${_issue.prefix}\" beginnen`;\n }\n if (_issue.format === \"ends_with\")\n return `Ongeldige tekst: moet op \"${_issue.suffix}\" eindigen`;\n if (_issue.format === \"includes\")\n return `Ongeldige tekst: moet \"${_issue.includes}\" bevatten`;\n if (_issue.format === \"regex\")\n return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`;\n return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ongeldig getal: moet een veelvoud van ${issue.divisor} zijn`;\n case \"unrecognized_keys\":\n return `Onbekende key${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ongeldige key in ${issue.origin}`;\n case \"invalid_union\":\n return \"Ongeldige invoer\";\n case \"invalid_element\":\n return `Ongeldige waarde in ${issue.origin}`;\n default:\n return `Ongeldige invoer`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"tegn\", verb: \"\u00E5 ha\" },\n file: { unit: \"bytes\", verb: \"\u00E5 ha\" },\n array: { unit: \"elementer\", verb: \"\u00E5 inneholde\" },\n set: { unit: \"elementer\", verb: \"\u00E5 inneholde\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"e-postadresse\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO dato- og klokkeslett\",\n date: \"ISO-dato\",\n time: \"ISO-klokkeslett\",\n duration: \"ISO-varighet\",\n ipv4: \"IPv4-omr\u00E5de\",\n ipv6: \"IPv6-omr\u00E5de\",\n cidrv4: \"IPv4-spekter\",\n cidrv6: \"IPv6-spekter\",\n base64: \"base64-enkodet streng\",\n base64url: \"base64url-enkodet streng\",\n json_string: \"JSON-streng\",\n e164: \"E.164-nummer\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"tall\",\n array: \"liste\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ugyldig input: forventet instanceof ${issue.expected}, fikk ${received}`;\n }\n return `Ugyldig input: forventet ${expected}, fikk ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ugyldig verdi: forventet ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ugyldig valg: forventet en av ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `For stor(t): forventet ${issue.origin ?? \"value\"} til \u00E5 ha ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementer\"}`;\n return `For stor(t): forventet ${issue.origin ?? \"value\"} til \u00E5 ha ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `For lite(n): forventet ${issue.origin} til \u00E5 ha ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `For lite(n): forventet ${issue.origin} til \u00E5 ha ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Ugyldig streng: m\u00E5 starte med \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Ugyldig streng: m\u00E5 ende med \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Ugyldig streng: m\u00E5 inneholde \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Ugyldig streng: m\u00E5 matche m\u00F8nsteret ${_issue.pattern}`;\n return `Ugyldig ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ugyldig tall: m\u00E5 v\u00E6re et multiplum av ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Ukjente n\u00F8kler\" : \"Ukjent n\u00F8kkel\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ugyldig n\u00F8kkel i ${issue.origin}`;\n case \"invalid_union\":\n return \"Ugyldig input\";\n case \"invalid_element\":\n return `Ugyldig verdi i ${issue.origin}`;\n default:\n return `Ugyldig input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"harf\", verb: \"olmal\u0131d\u0131r\" },\n file: { unit: \"bayt\", verb: \"olmal\u0131d\u0131r\" },\n array: { unit: \"unsur\", verb: \"olmal\u0131d\u0131r\" },\n set: { unit: \"unsur\", verb: \"olmal\u0131d\u0131r\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"giren\",\n email: \"epostag\u00E2h\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO heng\u00E2m\u0131\",\n date: \"ISO tarihi\",\n time: \"ISO zaman\u0131\",\n duration: \"ISO m\u00FCddeti\",\n ipv4: \"IPv4 ni\u015F\u00E2n\u0131\",\n ipv6: \"IPv6 ni\u015F\u00E2n\u0131\",\n cidrv4: \"IPv4 menzili\",\n cidrv6: \"IPv6 menzili\",\n base64: \"base64-\u015Fifreli metin\",\n base64url: \"base64url-\u015Fifreli metin\",\n json_string: \"JSON metin\",\n e164: \"E.164 say\u0131s\u0131\",\n jwt: \"JWT\",\n template_literal: \"giren\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"numara\",\n array: \"saf\",\n null: \"gayb\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `F\u00E2sit giren: umulan instanceof ${issue.expected}, al\u0131nan ${received}`;\n }\n return `F\u00E2sit giren: umulan ${expected}, al\u0131nan ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `F\u00E2sit giren: umulan ${util.stringifyPrimitive(issue.values[0])}`;\n return `F\u00E2sit tercih: m\u00FBteberler ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Fazla b\u00FCy\u00FCk: ${issue.origin ?? \"value\"}, ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elements\"} sahip olmal\u0131yd\u0131.`;\n return `Fazla b\u00FCy\u00FCk: ${issue.origin ?? \"value\"}, ${adj}${issue.maximum.toString()} olmal\u0131yd\u0131.`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Fazla k\u00FC\u00E7\u00FCk: ${issue.origin}, ${adj}${issue.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`;\n }\n return `Fazla k\u00FC\u00E7\u00FCk: ${issue.origin}, ${adj}${issue.minimum.toString()} olmal\u0131yd\u0131.`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `F\u00E2sit metin: \"${_issue.prefix}\" ile ba\u015Flamal\u0131.`;\n if (_issue.format === \"ends_with\")\n return `F\u00E2sit metin: \"${_issue.suffix}\" ile bitmeli.`;\n if (_issue.format === \"includes\")\n return `F\u00E2sit metin: \"${_issue.includes}\" ihtiv\u00E2 etmeli.`;\n if (_issue.format === \"regex\")\n return `F\u00E2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`;\n return `F\u00E2sit ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `F\u00E2sit say\u0131: ${issue.divisor} kat\u0131 olmal\u0131yd\u0131.`;\n case \"unrecognized_keys\":\n return `Tan\u0131nmayan anahtar ${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} i\u00E7in tan\u0131nmayan anahtar var.`;\n case \"invalid_union\":\n return \"Giren tan\u0131namad\u0131.\";\n case \"invalid_element\":\n return `${issue.origin} i\u00E7in tan\u0131nmayan k\u0131ymet var.`;\n default:\n return `K\u0131ymet tan\u0131namad\u0131.`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u062A\u0648\u06A9\u064A\", verb: \"\u0648\u0644\u0631\u064A\" },\n file: { unit: \"\u0628\u0627\u06CC\u067C\u0633\", verb: \"\u0648\u0644\u0631\u064A\" },\n array: { unit: \"\u062A\u0648\u06A9\u064A\", verb: \"\u0648\u0644\u0631\u064A\" },\n set: { unit: \"\u062A\u0648\u06A9\u064A\", verb: \"\u0648\u0644\u0631\u064A\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0648\u0631\u0648\u062F\u064A\",\n email: \"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9\",\n url: \"\u06CC\u0648 \u0622\u0631 \u0627\u0644\",\n emoji: \"\u0627\u06CC\u0645\u0648\u062C\u064A\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A\",\n date: \"\u0646\u06D0\u067C\u0647\",\n time: \"\u0648\u062E\u062A\",\n duration: \"\u0645\u0648\u062F\u0647\",\n ipv4: \"\u062F IPv4 \u067E\u062A\u0647\",\n ipv6: \"\u062F IPv6 \u067E\u062A\u0647\",\n cidrv4: \"\u062F IPv4 \u0633\u0627\u062D\u0647\",\n cidrv6: \"\u062F IPv6 \u0633\u0627\u062D\u0647\",\n base64: \"base64-encoded \u0645\u062A\u0646\",\n base64url: \"base64url-encoded \u0645\u062A\u0646\",\n json_string: \"JSON \u0645\u062A\u0646\",\n e164: \"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647\",\n jwt: \"JWT\",\n template_literal: \"\u0648\u0631\u0648\u062F\u064A\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0639\u062F\u062F\",\n array: \"\u0627\u0631\u06D0\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${issue.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;\n }\n return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1) {\n return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${util.stringifyPrimitive(issue.values[0])} \u0648\u0627\u06CC`;\n }\n return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${util.joinValues(issue.values, \"|\")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue.origin ?? \"\u0627\u0631\u0632\u069A\u062A\"} \u0628\u0627\u06CC\u062F ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0639\u0646\u0635\u0631\u0648\u0646\u0647\"} \u0648\u0644\u0631\u064A`;\n }\n return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue.origin ?? \"\u0627\u0631\u0632\u069A\u062A\"} \u0628\u0627\u06CC\u062F ${adj}${issue.maximum.toString()} \u0648\u064A`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue.origin} \u0628\u0627\u06CC\u062F ${adj}${issue.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`;\n }\n return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue.origin} \u0628\u0627\u06CC\u062F ${adj}${issue.minimum.toString()} \u0648\u064A`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F \"${_issue.prefix}\" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`;\n }\n if (_issue.format === \"ends_with\") {\n return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F \"${_issue.suffix}\" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`;\n }\n if (_issue.format === \"includes\") {\n return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \"${_issue.includes}\" \u0648\u0644\u0631\u064A`;\n }\n if (_issue.format === \"regex\") {\n return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`;\n }\n return `${FormatDictionary[_issue.format] ?? issue.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`;\n }\n case \"not_multiple_of\":\n return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;\n case \"unrecognized_keys\":\n return `\u0646\u0627\u0633\u0645 ${issue.keys.length > 1 ? \"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647\" : \"\u06A9\u0644\u06CC\u0689\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue.origin} \u06A9\u06D0`;\n case \"invalid_union\":\n return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`;\n case \"invalid_element\":\n return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue.origin} \u06A9\u06D0`;\n default:\n return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"znak\u00F3w\", verb: \"mie\u0107\" },\n file: { unit: \"bajt\u00F3w\", verb: \"mie\u0107\" },\n array: { unit: \"element\u00F3w\", verb: \"mie\u0107\" },\n set: { unit: \"element\u00F3w\", verb: \"mie\u0107\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"wyra\u017Cenie\",\n email: \"adres email\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"data i godzina w formacie ISO\",\n date: \"data w formacie ISO\",\n time: \"godzina w formacie ISO\",\n duration: \"czas trwania ISO\",\n ipv4: \"adres IPv4\",\n ipv6: \"adres IPv6\",\n cidrv4: \"zakres IPv4\",\n cidrv6: \"zakres IPv6\",\n base64: \"ci\u0105g znak\u00F3w zakodowany w formacie base64\",\n base64url: \"ci\u0105g znak\u00F3w zakodowany w formacie base64url\",\n json_string: \"ci\u0105g znak\u00F3w w formacie JSON\",\n e164: \"liczba E.164\",\n jwt: \"JWT\",\n template_literal: \"wej\u015Bcie\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"liczba\",\n array: \"tablica\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${issue.expected}, otrzymano ${received}`;\n }\n return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${expected}, otrzymano ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${util.stringifyPrimitive(issue.values[0])}`;\n return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue.origin ?? \"warto\u015B\u0107\"} b\u0119dzie mie\u0107 ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"element\u00F3w\"}`;\n }\n return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue.origin ?? \"warto\u015B\u0107\"} b\u0119dzie wynosi\u0107 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue.origin ?? \"warto\u015B\u0107\"} b\u0119dzie mie\u0107 ${adj}${issue.minimum.toString()} ${sizing.unit ?? \"element\u00F3w\"}`;\n }\n return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue.origin ?? \"warto\u015B\u0107\"} b\u0119dzie wynosi\u0107 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Nieprawid\u0142owy ci\u0105g znak\u00F3w: musi zaczyna\u0107 si\u0119 od \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Nieprawid\u0142owy ci\u0105g znak\u00F3w: musi ko\u0144czy\u0107 si\u0119 na \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Nieprawid\u0142owy ci\u0105g znak\u00F3w: musi zawiera\u0107 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Nieprawid\u0142owy ci\u0105g znak\u00F3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`;\n return `Nieprawid\u0142ow(y/a/e) ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Nierozpoznane klucze${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Nieprawid\u0142owy klucz w ${issue.origin}`;\n case \"invalid_union\":\n return \"Nieprawid\u0142owe dane wej\u015Bciowe\";\n case \"invalid_element\":\n return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue.origin}`;\n default:\n return `Nieprawid\u0142owe dane wej\u015Bciowe`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caracteres\", verb: \"ter\" },\n file: { unit: \"bytes\", verb: \"ter\" },\n array: { unit: \"itens\", verb: \"ter\" },\n set: { unit: \"itens\", verb: \"ter\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"padr\u00E3o\",\n email: \"endere\u00E7o de e-mail\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"data e hora ISO\",\n date: \"data ISO\",\n time: \"hora ISO\",\n duration: \"dura\u00E7\u00E3o ISO\",\n ipv4: \"endere\u00E7o IPv4\",\n ipv6: \"endere\u00E7o IPv6\",\n cidrv4: \"faixa de IPv4\",\n cidrv6: \"faixa de IPv6\",\n base64: \"texto codificado em base64\",\n base64url: \"URL codificada em base64\",\n json_string: \"texto JSON\",\n e164: \"n\u00FAmero E.164\",\n jwt: \"JWT\",\n template_literal: \"entrada\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"n\u00FAmero\",\n null: \"nulo\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Tipo inv\u00E1lido: esperado instanceof ${issue.expected}, recebido ${received}`;\n }\n return `Tipo inv\u00E1lido: esperado ${expected}, recebido ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entrada inv\u00E1lida: esperado ${util.stringifyPrimitive(issue.values[0])}`;\n return `Op\u00E7\u00E3o inv\u00E1lida: esperada uma das ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Muito grande: esperado que ${issue.origin ?? \"valor\"} tivesse ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementos\"}`;\n return `Muito grande: esperado que ${issue.origin ?? \"valor\"} fosse ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Muito pequeno: esperado que ${issue.origin} tivesse ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Muito pequeno: esperado que ${issue.origin} fosse ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Texto inv\u00E1lido: deve come\u00E7ar com \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Texto inv\u00E1lido: deve terminar com \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Texto inv\u00E1lido: deve incluir \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Texto inv\u00E1lido: deve corresponder ao padr\u00E3o ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} inv\u00E1lido`;\n }\n case \"not_multiple_of\":\n return `N\u00FAmero inv\u00E1lido: deve ser m\u00FAltiplo de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Chave${issue.keys.length > 1 ? \"s\" : \"\"} desconhecida${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Chave inv\u00E1lida em ${issue.origin}`;\n case \"invalid_union\":\n return \"Entrada inv\u00E1lida\";\n case \"invalid_element\":\n return `Valor inv\u00E1lido em ${issue.origin}`;\n default:\n return `Campo inv\u00E1lido`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nfunction getRussianPlural(count, one, few, many) {\n const absCount = Math.abs(count);\n const lastDigit = absCount % 10;\n const lastTwoDigits = absCount % 100;\n if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {\n return many;\n }\n if (lastDigit === 1) {\n return one;\n }\n if (lastDigit >= 2 && lastDigit <= 4) {\n return few;\n }\n return many;\n}\nconst error = () => {\n const Sizable = {\n string: {\n unit: {\n one: \"\u0441\u0438\u043C\u0432\u043E\u043B\",\n few: \"\u0441\u0438\u043C\u0432\u043E\u043B\u0430\",\n many: \"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432\",\n },\n verb: \"\u0438\u043C\u0435\u0442\u044C\",\n },\n file: {\n unit: {\n one: \"\u0431\u0430\u0439\u0442\",\n few: \"\u0431\u0430\u0439\u0442\u0430\",\n many: \"\u0431\u0430\u0439\u0442\",\n },\n verb: \"\u0438\u043C\u0435\u0442\u044C\",\n },\n array: {\n unit: {\n one: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\",\n few: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\",\n many: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432\",\n },\n verb: \"\u0438\u043C\u0435\u0442\u044C\",\n },\n set: {\n unit: {\n one: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\",\n few: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\",\n many: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432\",\n },\n verb: \"\u0438\u043C\u0435\u0442\u044C\",\n },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0432\u0432\u043E\u0434\",\n email: \"email \u0430\u0434\u0440\u0435\u0441\",\n url: \"URL\",\n emoji: \"\u044D\u043C\u043E\u0434\u0437\u0438\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F\",\n date: \"ISO \u0434\u0430\u0442\u0430\",\n time: \"ISO \u0432\u0440\u0435\u043C\u044F\",\n duration: \"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C\",\n ipv4: \"IPv4 \u0430\u0434\u0440\u0435\u0441\",\n ipv6: \"IPv6 \u0430\u0434\u0440\u0435\u0441\",\n cidrv4: \"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\",\n cidrv6: \"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\",\n base64: \"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64\",\n base64url: \"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url\",\n json_string: \"JSON \u0441\u0442\u0440\u043E\u043A\u0430\",\n e164: \"\u043D\u043E\u043C\u0435\u0440 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0432\u0432\u043E\u0434\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0447\u0438\u0441\u043B\u043E\",\n array: \"\u043C\u0430\u0441\u0441\u0438\u0432\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${issue.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`;\n }\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const maxValue = Number(issue.maximum);\n const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);\n return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435\"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue.maximum.toString()} ${unit}`;\n }\n return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435\"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const minValue = Number(issue.minimum);\n const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);\n return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue.minimum.toString()} ${unit}`;\n }\n return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue.keys.length > 1 ? \"\u044B\u0435\" : \"\u044B\u0439\"} \u043A\u043B\u044E\u0447${issue.keys.length > 1 ? \"\u0438\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\";\n case \"invalid_element\":\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue.origin}`;\n default:\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"znakov\", verb: \"imeti\" },\n file: { unit: \"bajtov\", verb: \"imeti\" },\n array: { unit: \"elementov\", verb: \"imeti\" },\n set: { unit: \"elementov\", verb: \"imeti\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"vnos\",\n email: \"e-po\u0161tni naslov\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datum in \u010Das\",\n date: \"ISO datum\",\n time: \"ISO \u010Das\",\n duration: \"ISO trajanje\",\n ipv4: \"IPv4 naslov\",\n ipv6: \"IPv6 naslov\",\n cidrv4: \"obseg IPv4\",\n cidrv6: \"obseg IPv6\",\n base64: \"base64 kodiran niz\",\n base64url: \"base64url kodiran niz\",\n json_string: \"JSON niz\",\n e164: \"E.164 \u0161tevilka\",\n jwt: \"JWT\",\n template_literal: \"vnos\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0161tevilo\",\n array: \"tabela\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Neveljaven vnos: pri\u010Dakovano instanceof ${issue.expected}, prejeto ${received}`;\n }\n return `Neveljaven vnos: pri\u010Dakovano ${expected}, prejeto ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Neveljaven vnos: pri\u010Dakovano ${util.stringifyPrimitive(issue.values[0])}`;\n return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Preveliko: pri\u010Dakovano, da bo ${issue.origin ?? \"vrednost\"} imelo ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementov\"}`;\n return `Preveliko: pri\u010Dakovano, da bo ${issue.origin ?? \"vrednost\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Premajhno: pri\u010Dakovano, da bo ${issue.origin} imelo ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Premajhno: pri\u010Dakovano, da bo ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Neveljaven niz: mora se za\u010Deti z \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Neveljaven niz: mora se kon\u010Dati z \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Neveljaven niz: mora vsebovati \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`;\n return `Neveljaven ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Neprepoznan${issue.keys.length > 1 ? \"i klju\u010Di\" : \" klju\u010D\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Neveljaven klju\u010D v ${issue.origin}`;\n case \"invalid_union\":\n return \"Neveljaven vnos\";\n case \"invalid_element\":\n return `Neveljavna vrednost v ${issue.origin}`;\n default:\n return \"Neveljaven vnos\";\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"tecken\", verb: \"att ha\" },\n file: { unit: \"bytes\", verb: \"att ha\" },\n array: { unit: \"objekt\", verb: \"att inneh\u00E5lla\" },\n set: { unit: \"objekt\", verb: \"att inneh\u00E5lla\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"regulj\u00E4rt uttryck\",\n email: \"e-postadress\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-datum och tid\",\n date: \"ISO-datum\",\n time: \"ISO-tid\",\n duration: \"ISO-varaktighet\",\n ipv4: \"IPv4-intervall\",\n ipv6: \"IPv6-intervall\",\n cidrv4: \"IPv4-spektrum\",\n cidrv6: \"IPv6-spektrum\",\n base64: \"base64-kodad str\u00E4ng\",\n base64url: \"base64url-kodad str\u00E4ng\",\n json_string: \"JSON-str\u00E4ng\",\n e164: \"E.164-nummer\",\n jwt: \"JWT\",\n template_literal: \"mall-literal\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"antal\",\n array: \"lista\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ogiltig inmatning: f\u00F6rv\u00E4ntat instanceof ${issue.expected}, fick ${received}`;\n }\n return `Ogiltig inmatning: f\u00F6rv\u00E4ntat ${expected}, fick ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ogiltig inmatning: f\u00F6rv\u00E4ntat ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ogiltigt val: f\u00F6rv\u00E4ntade en av ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `F\u00F6r stor(t): f\u00F6rv\u00E4ntade ${issue.origin ?? \"v\u00E4rdet\"} att ha ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"element\"}`;\n }\n return `F\u00F6r stor(t): f\u00F6rv\u00E4ntat ${issue.origin ?? \"v\u00E4rdet\"} att ha ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `F\u00F6r lite(t): f\u00F6rv\u00E4ntade ${issue.origin ?? \"v\u00E4rdet\"} att ha ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `F\u00F6r lite(t): f\u00F6rv\u00E4ntade ${issue.origin ?? \"v\u00E4rdet\"} att ha ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Ogiltig str\u00E4ng: m\u00E5ste b\u00F6rja med \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Ogiltig str\u00E4ng: m\u00E5ste sluta med \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Ogiltig str\u00E4ng: m\u00E5ste inneh\u00E5lla \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Ogiltig str\u00E4ng: m\u00E5ste matcha m\u00F6nstret \"${_issue.pattern}\"`;\n return `Ogiltig(t) ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ogiltigt tal: m\u00E5ste vara en multipel av ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Ok\u00E4nda nycklar\" : \"Ok\u00E4nd nyckel\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ogiltig nyckel i ${issue.origin ?? \"v\u00E4rdet\"}`;\n case \"invalid_union\":\n return \"Ogiltig input\";\n case \"invalid_element\":\n return `Ogiltigt v\u00E4rde i ${issue.origin ?? \"v\u00E4rdet\"}`;\n default:\n return `Ogiltig input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD\", verb: \"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD\" },\n file: { unit: \"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD\", verb: \"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD\" },\n array: { unit: \"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD\", verb: \"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD\" },\n set: { unit: \"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD\", verb: \"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1\",\n email: \"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD\",\n date: \"ISO \u0BA4\u0BC7\u0BA4\u0BBF\",\n time: \"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD\",\n duration: \"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1\",\n ipv4: \"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF\",\n ipv6: \"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF\",\n cidrv4: \"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1\",\n cidrv6: \"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1\",\n base64: \"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD\",\n base64url: \"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD\",\n json_string: \"JSON \u0B9A\u0BB0\u0BAE\u0BCD\",\n e164: \"E.164 \u0B8E\u0BA3\u0BCD\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0B8E\u0BA3\u0BCD\",\n array: \"\u0B85\u0BA3\u0BBF\",\n null: \"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${issue.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`;\n }\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${util.joinValues(issue.values, \"|\")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue.origin ?? \"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD\"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n }\n return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue.origin ?? \"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1\"} ${adj}${issue.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; //\n }\n return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue.origin} ${adj}${issue.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: \"${_issue.prefix}\" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n if (_issue.format === \"ends_with\")\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: \"${_issue.suffix}\" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n if (_issue.format === \"includes\")\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: \"${_issue.includes}\" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n if (_issue.format === \"regex\")\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n case \"unrecognized_keys\":\n return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue.keys.length > 1 ? \"\u0B95\u0BB3\u0BCD\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;\n case \"invalid_union\":\n return \"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1\";\n case \"invalid_element\":\n return `${issue.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;\n default:\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\", verb: \"\u0E04\u0E27\u0E23\u0E21\u0E35\" },\n file: { unit: \"\u0E44\u0E1A\u0E15\u0E4C\", verb: \"\u0E04\u0E27\u0E23\u0E21\u0E35\" },\n array: { unit: \"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\", verb: \"\u0E04\u0E27\u0E23\u0E21\u0E35\" },\n set: { unit: \"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\", verb: \"\u0E04\u0E27\u0E23\u0E21\u0E35\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19\",\n email: \"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25\",\n url: \"URL\",\n emoji: \"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO\",\n date: \"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO\",\n time: \"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO\",\n duration: \"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO\",\n ipv4: \"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4\",\n ipv6: \"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6\",\n cidrv4: \"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4\",\n cidrv6: \"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6\",\n base64: \"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64\",\n base64url: \"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL\",\n json_string: \"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON\",\n e164: \"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)\",\n jwt: \"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT\",\n template_literal: \"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\",\n array: \"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)\",\n null: \"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;\n }\n return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19\" : \"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue.origin ?? \"\u0E04\u0E48\u0E32\"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\"}`;\n return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue.origin ?? \"\u0E04\u0E48\u0E32\"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22\" : \"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 \"${_issue.includes}\" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`;\n if (_issue.format === \"regex\")\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`;\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;\n case \"unrecognized_keys\":\n return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49\";\n case \"invalid_element\":\n return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue.origin}`;\n default:\n return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"karakter\", verb: \"olmal\u0131\" },\n file: { unit: \"bayt\", verb: \"olmal\u0131\" },\n array: { unit: \"\u00F6\u011Fe\", verb: \"olmal\u0131\" },\n set: { unit: \"\u00F6\u011Fe\", verb: \"olmal\u0131\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"girdi\",\n email: \"e-posta adresi\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO tarih ve saat\",\n date: \"ISO tarih\",\n time: \"ISO saat\",\n duration: \"ISO s\u00FCre\",\n ipv4: \"IPv4 adresi\",\n ipv6: \"IPv6 adresi\",\n cidrv4: \"IPv4 aral\u0131\u011F\u0131\",\n cidrv6: \"IPv6 aral\u0131\u011F\u0131\",\n base64: \"base64 ile \u015Fifrelenmi\u015F metin\",\n base64url: \"base64url ile \u015Fifrelenmi\u015F metin\",\n json_string: \"JSON dizesi\",\n e164: \"E.164 say\u0131s\u0131\",\n jwt: \"JWT\",\n template_literal: \"\u015Eablon dizesi\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ge\u00E7ersiz de\u011Fer: beklenen instanceof ${issue.expected}, al\u0131nan ${received}`;\n }\n return `Ge\u00E7ersiz de\u011Fer: beklenen ${expected}, al\u0131nan ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ge\u00E7ersiz de\u011Fer: beklenen ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ge\u00E7ersiz se\u00E7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u00C7ok b\u00FCy\u00FCk: beklenen ${issue.origin ?? \"de\u011Fer\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u00F6\u011Fe\"}`;\n return `\u00C7ok b\u00FCy\u00FCk: beklenen ${issue.origin ?? \"de\u011Fer\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u00C7ok k\u00FC\u00E7\u00FCk: beklenen ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n return `\u00C7ok k\u00FC\u00E7\u00FCk: beklenen ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Ge\u00E7ersiz metin: \"${_issue.prefix}\" ile ba\u015Flamal\u0131`;\n if (_issue.format === \"ends_with\")\n return `Ge\u00E7ersiz metin: \"${_issue.suffix}\" ile bitmeli`;\n if (_issue.format === \"includes\")\n return `Ge\u00E7ersiz metin: \"${_issue.includes}\" i\u00E7ermeli`;\n if (_issue.format === \"regex\")\n return `Ge\u00E7ersiz metin: ${_issue.pattern} desenine uymal\u0131`;\n return `Ge\u00E7ersiz ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ge\u00E7ersiz say\u0131: ${issue.divisor} ile tam b\u00F6l\u00FCnebilmeli`;\n case \"unrecognized_keys\":\n return `Tan\u0131nmayan anahtar${issue.keys.length > 1 ? \"lar\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} i\u00E7inde ge\u00E7ersiz anahtar`;\n case \"invalid_union\":\n return \"Ge\u00E7ersiz de\u011Fer\";\n case \"invalid_element\":\n return `${issue.origin} i\u00E7inde ge\u00E7ersiz de\u011Fer`;\n default:\n return `Ge\u00E7ersiz de\u011Fer`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432\", verb: \"\u043C\u0430\u0442\u0438\u043C\u0435\" },\n file: { unit: \"\u0431\u0430\u0439\u0442\u0456\u0432\", verb: \"\u043C\u0430\u0442\u0438\u043C\u0435\" },\n array: { unit: \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432\", verb: \"\u043C\u0430\u0442\u0438\u043C\u0435\" },\n set: { unit: \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432\", verb: \"\u043C\u0430\u0442\u0438\u043C\u0435\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456\",\n email: \"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438\",\n url: \"URL\",\n emoji: \"\u0435\u043C\u043E\u0434\u0437\u0456\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO\",\n date: \"\u0434\u0430\u0442\u0430 ISO\",\n time: \"\u0447\u0430\u0441 ISO\",\n duration: \"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO\",\n ipv4: \"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4\",\n ipv6: \"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6\",\n cidrv4: \"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4\",\n cidrv6: \"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6\",\n base64: \"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64\",\n base64url: \"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url\",\n json_string: \"\u0440\u044F\u0434\u043E\u043A JSON\",\n e164: \"\u043D\u043E\u043C\u0435\u0440 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0447\u0438\u0441\u043B\u043E\",\n array: \"\u043C\u0430\u0441\u0438\u0432\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${issue.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`;\n }\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F\"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432\"}`;\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F\"} \u0431\u0443\u0434\u0435 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue.origin} \u0431\u0443\u0434\u0435 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue.keys.length > 1 ? \"\u0456\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456\";\n case \"invalid_element\":\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue.origin}`;\n default:\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import uk from \"./uk.js\";\n/** @deprecated Use `uk` instead. */\nexport default function () {\n return uk();\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u062D\u0631\u0648\u0641\", verb: \"\u06C1\u0648\u0646\u0627\" },\n file: { unit: \"\u0628\u0627\u0626\u0679\u0633\", verb: \"\u06C1\u0648\u0646\u0627\" },\n array: { unit: \"\u0622\u0626\u0679\u0645\u0632\", verb: \"\u06C1\u0648\u0646\u0627\" },\n set: { unit: \"\u0622\u0626\u0679\u0645\u0632\", verb: \"\u06C1\u0648\u0646\u0627\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0627\u0646 \u067E\u0679\",\n email: \"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633\",\n url: \"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644\",\n emoji: \"\u0627\u06CC\u0645\u0648\u062C\u06CC\",\n uuid: \"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n uuidv4: \"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4\",\n uuidv6: \"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6\",\n nanoid: \"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n guid: \"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n cuid: \"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n cuid2: \"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2\",\n ulid: \"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC\",\n xid: \"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC\",\n ksuid: \"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n datetime: \"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645\",\n date: \"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E\",\n time: \"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A\",\n duration: \"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A\",\n ipv4: \"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633\",\n ipv6: \"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633\",\n cidrv4: \"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C\",\n cidrv6: \"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C\",\n base64: \"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF\",\n base64url: \"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF\",\n json_string: \"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF\",\n e164: \"\u0627\u06CC 164 \u0646\u0645\u0628\u0631\",\n jwt: \"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC\",\n template_literal: \"\u0627\u0646 \u067E\u0679\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0646\u0645\u0628\u0631\",\n array: \"\u0622\u0631\u06D2\",\n null: \"\u0646\u0644\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${issue.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;\n }\n return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${util.stringifyPrimitive(issue.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;\n return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${util.joinValues(issue.values, \"|\")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue.origin ?? \"\u0648\u06CC\u0644\u06CC\u0648\"} \u06A9\u06D2 ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0639\u0646\u0627\u0635\u0631\"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;\n return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue.origin ?? \"\u0648\u06CC\u0644\u06CC\u0648\"} \u06A9\u0627 ${adj}${issue.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue.origin} \u06A9\u06D2 ${adj}${issue.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;\n }\n return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue.origin} \u06A9\u0627 ${adj}${issue.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \"${_issue.prefix}\" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n }\n if (_issue.format === \"ends_with\")\n return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \"${_issue.suffix}\" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n if (_issue.format === \"includes\")\n return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \"${_issue.includes}\" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n if (_issue.format === \"regex\")\n return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n return `\u063A\u0644\u0637 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n case \"unrecognized_keys\":\n return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue.keys.length > 1 ? \"\u0632\" : \"\"}: ${util.joinValues(issue.keys, \"\u060C \")}`;\n case \"invalid_key\":\n return `${issue.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;\n case \"invalid_union\":\n return \"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679\";\n case \"invalid_element\":\n return `${issue.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;\n default:\n return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"belgi\", verb: \"bo\u2018lishi kerak\" },\n file: { unit: \"bayt\", verb: \"bo\u2018lishi kerak\" },\n array: { unit: \"element\", verb: \"bo\u2018lishi kerak\" },\n set: { unit: \"element\", verb: \"bo\u2018lishi kerak\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"kirish\",\n email: \"elektron pochta manzili\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO sana va vaqti\",\n date: \"ISO sana\",\n time: \"ISO vaqt\",\n duration: \"ISO davomiylik\",\n ipv4: \"IPv4 manzil\",\n ipv6: \"IPv6 manzil\",\n mac: \"MAC manzil\",\n cidrv4: \"IPv4 diapazon\",\n cidrv6: \"IPv6 diapazon\",\n base64: \"base64 kodlangan satr\",\n base64url: \"base64url kodlangan satr\",\n json_string: \"JSON satr\",\n e164: \"E.164 raqam\",\n jwt: \"JWT\",\n template_literal: \"kirish\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"raqam\",\n array: \"massiv\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Noto\u2018g\u2018ri kirish: kutilgan instanceof ${issue.expected}, qabul qilingan ${received}`;\n }\n return `Noto\u2018g\u2018ri kirish: kutilgan ${expected}, qabul qilingan ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Noto\u2018g\u2018ri kirish: kutilgan ${util.stringifyPrimitive(issue.values[0])}`;\n return `Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Juda katta: kutilgan ${issue.origin ?? \"qiymat\"} ${adj}${issue.maximum.toString()} ${sizing.unit} ${sizing.verb}`;\n return `Juda katta: kutilgan ${issue.origin ?? \"qiymat\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Juda kichik: kutilgan ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} ${sizing.verb}`;\n }\n return `Juda kichik: kutilgan ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Noto\u2018g\u2018ri satr: \"${_issue.prefix}\" bilan boshlanishi kerak`;\n if (_issue.format === \"ends_with\")\n return `Noto\u2018g\u2018ri satr: \"${_issue.suffix}\" bilan tugashi kerak`;\n if (_issue.format === \"includes\")\n return `Noto\u2018g\u2018ri satr: \"${_issue.includes}\" ni o\u2018z ichiga olishi kerak`;\n if (_issue.format === \"regex\")\n return `Noto\u2018g\u2018ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`;\n return `Noto\u2018g\u2018ri ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Noto\u2018g\u2018ri raqam: ${issue.divisor} ning karralisi bo\u2018lishi kerak`;\n case \"unrecognized_keys\":\n return `Noma\u2019lum kalit${issue.keys.length > 1 ? \"lar\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} dagi kalit noto\u2018g\u2018ri`;\n case \"invalid_union\":\n return \"Noto\u2018g\u2018ri kirish\";\n case \"invalid_element\":\n return `${issue.origin} da noto\u2018g\u2018ri qiymat`;\n default:\n return `Noto\u2018g\u2018ri kirish`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"k\u00FD t\u1EF1\", verb: \"c\u00F3\" },\n file: { unit: \"byte\", verb: \"c\u00F3\" },\n array: { unit: \"ph\u1EA7n t\u1EED\", verb: \"c\u00F3\" },\n set: { unit: \"ph\u1EA7n t\u1EED\", verb: \"c\u00F3\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0111\u1EA7u v\u00E0o\",\n email: \"\u0111\u1ECBa ch\u1EC9 email\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ng\u00E0y gi\u1EDD ISO\",\n date: \"ng\u00E0y ISO\",\n time: \"gi\u1EDD ISO\",\n duration: \"kho\u1EA3ng th\u1EDDi gian ISO\",\n ipv4: \"\u0111\u1ECBa ch\u1EC9 IPv4\",\n ipv6: \"\u0111\u1ECBa ch\u1EC9 IPv6\",\n cidrv4: \"d\u1EA3i IPv4\",\n cidrv6: \"d\u1EA3i IPv6\",\n base64: \"chu\u1ED7i m\u00E3 h\u00F3a base64\",\n base64url: \"chu\u1ED7i m\u00E3 h\u00F3a base64url\",\n json_string: \"chu\u1ED7i JSON\",\n e164: \"s\u1ED1 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0111\u1EA7u v\u00E0o\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"s\u1ED1\",\n array: \"m\u1EA3ng\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${issue.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`;\n }\n return `\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${util.stringifyPrimitive(issue.values[0])}`;\n return `T\u00F9y ch\u1ECDn kh\u00F4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\u00E1c gi\u00E1 tr\u1ECB ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Qu\u00E1 l\u1EDBn: mong \u0111\u1EE3i ${issue.origin ?? \"gi\u00E1 tr\u1ECB\"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"ph\u1EA7n t\u1EED\"}`;\n return `Qu\u00E1 l\u1EDBn: mong \u0111\u1EE3i ${issue.origin ?? \"gi\u00E1 tr\u1ECB\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Qu\u00E1 nh\u1ECF: mong \u0111\u1EE3i ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Qu\u00E1 nh\u1ECF: mong \u0111\u1EE3i ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Chu\u1ED7i kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Chu\u1ED7i kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\u00FAc b\u1EB1ng \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Chu\u1ED7i kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Chu\u1ED7i kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} kh\u00F4ng h\u1EE3p l\u1EC7`;\n }\n case \"not_multiple_of\":\n return `S\u1ED1 kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\u00E0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Kh\u00F3a kh\u00F4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Kh\u00F3a kh\u00F4ng h\u1EE3p l\u1EC7 trong ${issue.origin}`;\n case \"invalid_union\":\n return \"\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7\";\n case \"invalid_element\":\n return `Gi\u00E1 tr\u1ECB kh\u00F4ng h\u1EE3p l\u1EC7 trong ${issue.origin}`;\n default:\n return `\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u5B57\u7B26\", verb: \"\u5305\u542B\" },\n file: { unit: \"\u5B57\u8282\", verb: \"\u5305\u542B\" },\n array: { unit: \"\u9879\", verb: \"\u5305\u542B\" },\n set: { unit: \"\u9879\", verb: \"\u5305\u542B\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u8F93\u5165\",\n email: \"\u7535\u5B50\u90AE\u4EF6\",\n url: \"URL\",\n emoji: \"\u8868\u60C5\u7B26\u53F7\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO\u65E5\u671F\u65F6\u95F4\",\n date: \"ISO\u65E5\u671F\",\n time: \"ISO\u65F6\u95F4\",\n duration: \"ISO\u65F6\u957F\",\n ipv4: \"IPv4\u5730\u5740\",\n ipv6: \"IPv6\u5730\u5740\",\n cidrv4: \"IPv4\u7F51\u6BB5\",\n cidrv6: \"IPv6\u7F51\u6BB5\",\n base64: \"base64\u7F16\u7801\u5B57\u7B26\u4E32\",\n base64url: \"base64url\u7F16\u7801\u5B57\u7B26\u4E32\",\n json_string: \"JSON\u5B57\u7B26\u4E32\",\n e164: \"E.164\u53F7\u7801\",\n jwt: \"JWT\",\n template_literal: \"\u8F93\u5165\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u6570\u5B57\",\n array: \"\u6570\u7EC4\",\n null: \"\u7A7A\u503C(null)\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${issue.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`;\n }\n return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue.origin ?? \"\u503C\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u4E2A\u5143\u7D20\"}`;\n return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue.origin ?? \"\u503C\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 \"${_issue.prefix}\" \u5F00\u5934`;\n if (_issue.format === \"ends_with\")\n return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 \"${_issue.suffix}\" \u7ED3\u5C3E`;\n if (_issue.format === \"includes\")\n return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`;\n return `\u65E0\u6548${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue.divisor} \u7684\u500D\u6570`;\n case \"unrecognized_keys\":\n return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;\n case \"invalid_union\":\n return \"\u65E0\u6548\u8F93\u5165\";\n case \"invalid_element\":\n return `${issue.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;\n default:\n return `\u65E0\u6548\u8F93\u5165`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u5B57\u5143\", verb: \"\u64C1\u6709\" },\n file: { unit: \"\u4F4D\u5143\u7D44\", verb: \"\u64C1\u6709\" },\n array: { unit: \"\u9805\u76EE\", verb: \"\u64C1\u6709\" },\n set: { unit: \"\u9805\u76EE\", verb: \"\u64C1\u6709\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u8F38\u5165\",\n email: \"\u90F5\u4EF6\u5730\u5740\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u65E5\u671F\u6642\u9593\",\n date: \"ISO \u65E5\u671F\",\n time: \"ISO \u6642\u9593\",\n duration: \"ISO \u671F\u9593\",\n ipv4: \"IPv4 \u4F4D\u5740\",\n ipv6: \"IPv6 \u4F4D\u5740\",\n cidrv4: \"IPv4 \u7BC4\u570D\",\n cidrv6: \"IPv6 \u7BC4\u570D\",\n base64: \"base64 \u7DE8\u78BC\u5B57\u4E32\",\n base64url: \"base64url \u7DE8\u78BC\u5B57\u4E32\",\n json_string: \"JSON \u5B57\u4E32\",\n e164: \"E.164 \u6578\u503C\",\n jwt: \"JWT\",\n template_literal: \"\u8F38\u5165\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${issue.expected}\uFF0C\u4F46\u6536\u5230 ${received}`;\n }\n return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${expected}\uFF0C\u4F46\u6536\u5230 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue.origin ?? \"\u503C\"} \u61C9\u70BA ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u500B\u5143\u7D20\"}`;\n return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue.origin ?? \"\u503C\"} \u61C9\u70BA ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue.origin} \u61C9\u70BA ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue.origin} \u61C9\u70BA ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 \"${_issue.prefix}\" \u958B\u982D`;\n }\n if (_issue.format === \"ends_with\")\n return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 \"${_issue.suffix}\" \u7D50\u5C3E`;\n if (_issue.format === \"includes\")\n return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`;\n return `\u7121\u6548\u7684 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue.divisor} \u7684\u500D\u6578`;\n case \"unrecognized_keys\":\n return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue.keys.length > 1 ? \"\u5011\" : \"\"}\uFF1A${util.joinValues(issue.keys, \"\u3001\")}`;\n case \"invalid_key\":\n return `${issue.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;\n case \"invalid_union\":\n return \"\u7121\u6548\u7684\u8F38\u5165\u503C\";\n case \"invalid_element\":\n return `${issue.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;\n default:\n return `\u7121\u6548\u7684\u8F38\u5165\u503C`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u00E0mi\", verb: \"n\u00ED\" },\n file: { unit: \"bytes\", verb: \"n\u00ED\" },\n array: { unit: \"nkan\", verb: \"n\u00ED\" },\n set: { unit: \"nkan\", verb: \"n\u00ED\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u1EB9\u0300r\u1ECD \u00ECb\u00E1w\u1ECDl\u00E9\",\n email: \"\u00E0d\u00EDr\u1EB9\u0301s\u00EC \u00ECm\u1EB9\u0301l\u00EC\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u00E0k\u00F3k\u00F2 ISO\",\n date: \"\u1ECDj\u1ECD\u0301 ISO\",\n time: \"\u00E0k\u00F3k\u00F2 ISO\",\n duration: \"\u00E0k\u00F3k\u00F2 t\u00F3 p\u00E9 ISO\",\n ipv4: \"\u00E0d\u00EDr\u1EB9\u0301s\u00EC IPv4\",\n ipv6: \"\u00E0d\u00EDr\u1EB9\u0301s\u00EC IPv6\",\n cidrv4: \"\u00E0gb\u00E8gb\u00E8 IPv4\",\n cidrv6: \"\u00E0gb\u00E8gb\u00E8 IPv6\",\n base64: \"\u1ECD\u0300r\u1ECD\u0300 t\u00ED a k\u1ECD\u0301 n\u00ED base64\",\n base64url: \"\u1ECD\u0300r\u1ECD\u0300 base64url\",\n json_string: \"\u1ECD\u0300r\u1ECD\u0300 JSON\",\n e164: \"n\u1ECD\u0301mb\u00E0 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u1EB9\u0300r\u1ECD \u00ECb\u00E1w\u1ECDl\u00E9\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"n\u1ECD\u0301mb\u00E0\",\n array: \"akop\u1ECD\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e: a n\u00ED l\u00E1ti fi instanceof ${issue.expected}, \u00E0m\u1ECD\u0300 a r\u00ED ${received}`;\n }\n return `\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e: a n\u00ED l\u00E1ti fi ${expected}, \u00E0m\u1ECD\u0300 a r\u00ED ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e: a n\u00ED l\u00E1ti fi ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u00C0\u1E63\u00E0y\u00E0n a\u1E63\u00EC\u1E63e: yan \u1ECD\u0300kan l\u00E1ra ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `T\u00F3 p\u1ECD\u0300 j\u00F9: a n\u00ED l\u00E1ti j\u1EB9\u0301 p\u00E9 ${issue.origin ?? \"iye\"} ${sizing.verb} ${adj}${issue.maximum} ${sizing.unit}`;\n return `T\u00F3 p\u1ECD\u0300 j\u00F9: a n\u00ED l\u00E1ti j\u1EB9\u0301 ${adj}${issue.maximum}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `K\u00E9r\u00E9 ju: a n\u00ED l\u00E1ti j\u1EB9\u0301 p\u00E9 ${issue.origin} ${sizing.verb} ${adj}${issue.minimum} ${sizing.unit}`;\n return `K\u00E9r\u00E9 ju: a n\u00ED l\u00E1ti j\u1EB9\u0301 ${adj}${issue.minimum}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\u00FA \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\u00ED p\u1EB9\u0300l\u00FA \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\u00ED \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u00E1 \u00E0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`;\n return `A\u1E63\u00EC\u1E63e: ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `N\u1ECD\u0301mb\u00E0 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \u00E8y\u00E0 p\u00EDp\u00EDn ti ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `B\u1ECDt\u00ECn\u00EC \u00E0\u00ECm\u1ECD\u0300: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `B\u1ECDt\u00ECn\u00EC a\u1E63\u00EC\u1E63e n\u00EDn\u00FA ${issue.origin}`;\n case \"invalid_union\":\n return \"\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e\";\n case \"invalid_element\":\n return `Iye a\u1E63\u00EC\u1E63e n\u00EDn\u00FA ${issue.origin}`;\n default:\n return \"\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e\";\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "export { default as ar } from \"./ar.js\";\nexport { default as az } from \"./az.js\";\nexport { default as be } from \"./be.js\";\nexport { default as bg } from \"./bg.js\";\nexport { default as ca } from \"./ca.js\";\nexport { default as cs } from \"./cs.js\";\nexport { default as da } from \"./da.js\";\nexport { default as de } from \"./de.js\";\nexport { default as en } from \"./en.js\";\nexport { default as eo } from \"./eo.js\";\nexport { default as es } from \"./es.js\";\nexport { default as fa } from \"./fa.js\";\nexport { default as fi } from \"./fi.js\";\nexport { default as fr } from \"./fr.js\";\nexport { default as frCA } from \"./fr-CA.js\";\nexport { default as he } from \"./he.js\";\nexport { default as hu } from \"./hu.js\";\nexport { default as hy } from \"./hy.js\";\nexport { default as id } from \"./id.js\";\nexport { default as is } from \"./is.js\";\nexport { default as it } from \"./it.js\";\nexport { default as ja } from \"./ja.js\";\nexport { default as ka } from \"./ka.js\";\nexport { default as kh } from \"./kh.js\";\nexport { default as km } from \"./km.js\";\nexport { default as ko } from \"./ko.js\";\nexport { default as lt } from \"./lt.js\";\nexport { default as mk } from \"./mk.js\";\nexport { default as ms } from \"./ms.js\";\nexport { default as nl } from \"./nl.js\";\nexport { default as no } from \"./no.js\";\nexport { default as ota } from \"./ota.js\";\nexport { default as ps } from \"./ps.js\";\nexport { default as pl } from \"./pl.js\";\nexport { default as pt } from \"./pt.js\";\nexport { default as ru } from \"./ru.js\";\nexport { default as sl } from \"./sl.js\";\nexport { default as sv } from \"./sv.js\";\nexport { default as ta } from \"./ta.js\";\nexport { default as th } from \"./th.js\";\nexport { default as tr } from \"./tr.js\";\nexport { default as ua } from \"./ua.js\";\nexport { default as uk } from \"./uk.js\";\nexport { default as ur } from \"./ur.js\";\nexport { default as uz } from \"./uz.js\";\nexport { default as vi } from \"./vi.js\";\nexport { default as zhCN } from \"./zh-CN.js\";\nexport { default as zhTW } from \"./zh-TW.js\";\nexport { default as yo } from \"./yo.js\";\n", "var _a;\nexport const $output = Symbol(\"ZodOutput\");\nexport const $input = Symbol(\"ZodInput\");\nexport class $ZodRegistry {\n constructor() {\n this._map = new WeakMap();\n this._idmap = new Map();\n }\n add(schema, ..._meta) {\n const meta = _meta[0];\n this._map.set(schema, meta);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.set(meta.id, schema);\n }\n return this;\n }\n clear() {\n this._map = new WeakMap();\n this._idmap = new Map();\n return this;\n }\n remove(schema) {\n const meta = this._map.get(schema);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.delete(meta.id);\n }\n this._map.delete(schema);\n return this;\n }\n get(schema) {\n // return this._map.get(schema) as any;\n // inherit metadata\n const p = schema._zod.parent;\n if (p) {\n const pm = { ...(this.get(p) ?? {}) };\n delete pm.id; // do not inherit id\n const f = { ...pm, ...this._map.get(schema) };\n return Object.keys(f).length ? f : undefined;\n }\n return this._map.get(schema);\n }\n has(schema) {\n return this._map.has(schema);\n }\n}\n// registries\nexport function registry() {\n return new $ZodRegistry();\n}\n(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());\nexport const globalRegistry = globalThis.__zod_globalRegistry;\n", "import * as checks from \"./checks.js\";\nimport * as registries from \"./registries.js\";\nimport * as schemas from \"./schemas.js\";\nimport * as util from \"./util.js\";\n// @__NO_SIDE_EFFECTS__\nexport function _string(Class, params) {\n return new Class({\n type: \"string\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedString(Class, params) {\n return new Class({\n type: \"string\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _email(Class, params) {\n return new Class({\n type: \"string\",\n format: \"email\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _guid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"guid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v4\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v6\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv7(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v7\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _emoji(Class, params) {\n return new Class({\n type: \"string\",\n format: \"emoji\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nanoid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"nanoid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid2(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid2\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ulid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ulid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _xid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"xid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ksuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ksuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mac(Class, params) {\n return new Class({\n type: \"string\",\n format: \"mac\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _e164(Class, params) {\n return new Class({\n type: \"string\",\n format: \"e164\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _jwt(Class, params) {\n return new Class({\n type: \"string\",\n format: \"jwt\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport const TimePrecision = {\n Any: null,\n Minute: -1,\n Second: 0,\n Millisecond: 3,\n Microsecond: 6,\n};\n// @__NO_SIDE_EFFECTS__\nexport function _isoDateTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"datetime\",\n check: \"string_format\",\n offset: false,\n local: false,\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDate(Class, params) {\n return new Class({\n type: \"string\",\n format: \"date\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"time\",\n check: \"string_format\",\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDuration(Class, params) {\n return new Class({\n type: \"string\",\n format: \"duration\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _number(Class, params) {\n return new Class({\n type: \"number\",\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedNumber(Class, params) {\n return new Class({\n type: \"number\",\n coerce: true,\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"safeint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float64(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"int32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"uint32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _boolean(Class, params) {\n return new Class({\n type: \"boolean\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBoolean(Class, params) {\n return new Class({\n type: \"boolean\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _bigint(Class, params) {\n return new Class({\n type: \"bigint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBigint(Class, params) {\n return new Class({\n type: \"bigint\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"int64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"uint64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _symbol(Class, params) {\n return new Class({\n type: \"symbol\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _undefined(Class, params) {\n return new Class({\n type: \"undefined\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _null(Class, params) {\n return new Class({\n type: \"null\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _any(Class) {\n return new Class({\n type: \"any\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _unknown(Class) {\n return new Class({\n type: \"unknown\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _never(Class, params) {\n return new Class({\n type: \"never\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _void(Class, params) {\n return new Class({\n type: \"void\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _date(Class, params) {\n return new Class({\n type: \"date\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedDate(Class, params) {\n return new Class({\n type: \"date\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nan(Class, params) {\n return new Class({\n type: \"nan\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lt(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lte(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.lte()` instead. */\n_lte as _max, };\n// @__NO_SIDE_EFFECTS__\nexport function _gt(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _gte(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.gte()` instead. */\n_gte as _min, };\n// @__NO_SIDE_EFFECTS__\nexport function _positive(params) {\n return _gt(0, params);\n}\n// negative\n// @__NO_SIDE_EFFECTS__\nexport function _negative(params) {\n return _lt(0, params);\n}\n// nonpositive\n// @__NO_SIDE_EFFECTS__\nexport function _nonpositive(params) {\n return _lte(0, params);\n}\n// nonnegative\n// @__NO_SIDE_EFFECTS__\nexport function _nonnegative(params) {\n return _gte(0, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function _multipleOf(value, params) {\n return new checks.$ZodCheckMultipleOf({\n check: \"multiple_of\",\n ...util.normalizeParams(params),\n value,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxSize(maximum, params) {\n return new checks.$ZodCheckMaxSize({\n check: \"max_size\",\n ...util.normalizeParams(params),\n maximum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minSize(minimum, params) {\n return new checks.$ZodCheckMinSize({\n check: \"min_size\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _size(size, params) {\n return new checks.$ZodCheckSizeEquals({\n check: \"size_equals\",\n ...util.normalizeParams(params),\n size,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxLength(maximum, params) {\n const ch = new checks.$ZodCheckMaxLength({\n check: \"max_length\",\n ...util.normalizeParams(params),\n maximum,\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minLength(minimum, params) {\n return new checks.$ZodCheckMinLength({\n check: \"min_length\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _length(length, params) {\n return new checks.$ZodCheckLengthEquals({\n check: \"length_equals\",\n ...util.normalizeParams(params),\n length,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _regex(pattern, params) {\n return new checks.$ZodCheckRegex({\n check: \"string_format\",\n format: \"regex\",\n ...util.normalizeParams(params),\n pattern,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lowercase(params) {\n return new checks.$ZodCheckLowerCase({\n check: \"string_format\",\n format: \"lowercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uppercase(params) {\n return new checks.$ZodCheckUpperCase({\n check: \"string_format\",\n format: \"uppercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _includes(includes, params) {\n return new checks.$ZodCheckIncludes({\n check: \"string_format\",\n format: \"includes\",\n ...util.normalizeParams(params),\n includes,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _startsWith(prefix, params) {\n return new checks.$ZodCheckStartsWith({\n check: \"string_format\",\n format: \"starts_with\",\n ...util.normalizeParams(params),\n prefix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _endsWith(suffix, params) {\n return new checks.$ZodCheckEndsWith({\n check: \"string_format\",\n format: \"ends_with\",\n ...util.normalizeParams(params),\n suffix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _property(property, schema, params) {\n return new checks.$ZodCheckProperty({\n check: \"property\",\n property,\n schema,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mime(types, params) {\n return new checks.$ZodCheckMimeType({\n check: \"mime_type\",\n mime: types,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _overwrite(tx) {\n return new checks.$ZodCheckOverwrite({\n check: \"overwrite\",\n tx,\n });\n}\n// normalize\n// @__NO_SIDE_EFFECTS__\nexport function _normalize(form) {\n return _overwrite((input) => input.normalize(form));\n}\n// trim\n// @__NO_SIDE_EFFECTS__\nexport function _trim() {\n return _overwrite((input) => input.trim());\n}\n// toLowerCase\n// @__NO_SIDE_EFFECTS__\nexport function _toLowerCase() {\n return _overwrite((input) => input.toLowerCase());\n}\n// toUpperCase\n// @__NO_SIDE_EFFECTS__\nexport function _toUpperCase() {\n return _overwrite((input) => input.toUpperCase());\n}\n// slugify\n// @__NO_SIDE_EFFECTS__\nexport function _slugify() {\n return _overwrite((input) => util.slugify(input));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _array(Class, element, params) {\n return new Class({\n type: \"array\",\n element,\n // get element() {\n // return element;\n // },\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _union(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n ...util.normalizeParams(params),\n });\n}\nexport function _xor(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _discriminatedUnion(Class, discriminator, options, params) {\n return new Class({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _intersection(Class, left, right) {\n return new Class({\n type: \"intersection\",\n left,\n right,\n });\n}\n// export function _tuple(\n// Class: util.SchemaClass,\n// items: [],\n// params?: string | $ZodTupleParams\n// ): schemas.$ZodTuple<[], null>;\n// @__NO_SIDE_EFFECTS__\nexport function _tuple(Class, items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof schemas.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new Class({\n type: \"tuple\",\n items,\n rest,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _record(Class, keyType, valueType, params) {\n return new Class({\n type: \"record\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _map(Class, keyType, valueType, params) {\n return new Class({\n type: \"map\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _set(Class, valueType, params) {\n return new Class({\n type: \"set\",\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _enum(Class, values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n // if (Array.isArray(values)) {\n // for (const value of values) {\n // entries[value] = value;\n // }\n // } else {\n // Object.assign(entries, values);\n // }\n // const entries: util.EnumLike = {};\n // for (const val of values) {\n // entries[val] = val;\n // }\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function _nativeEnum(Class, entries, params) {\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _literal(Class, value, params) {\n return new Class({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _file(Class, params) {\n return new Class({\n type: \"file\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _transform(Class, fn) {\n return new Class({\n type: \"transform\",\n transform: fn,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _optional(Class, innerType) {\n return new Class({\n type: \"optional\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nullable(Class, innerType) {\n return new Class({\n type: \"nullable\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _default(Class, innerType, defaultValue) {\n return new Class({\n type: \"default\",\n innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nonoptional(Class, innerType, params) {\n return new Class({\n type: \"nonoptional\",\n innerType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _success(Class, innerType) {\n return new Class({\n type: \"success\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _catch(Class, innerType, catchValue) {\n return new Class({\n type: \"catch\",\n innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _pipe(Class, in_, out) {\n return new Class({\n type: \"pipe\",\n in: in_,\n out,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _readonly(Class, innerType) {\n return new Class({\n type: \"readonly\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _templateLiteral(Class, parts, params) {\n return new Class({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lazy(Class, getter) {\n return new Class({\n type: \"lazy\",\n getter,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _promise(Class, innerType) {\n return new Class({\n type: \"promise\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _custom(Class, fn, _params) {\n const norm = util.normalizeParams(_params);\n norm.abort ?? (norm.abort = true); // default to abort:false\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...norm,\n });\n return schema;\n}\n// same as _custom but defaults to abort:false\n// @__NO_SIDE_EFFECTS__\nexport function _refine(Class, fn, _params) {\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...util.normalizeParams(_params),\n });\n return schema;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _superRefine(fn) {\n const ch = _check((payload) => {\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, ch._zod.def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n _issue.input ?? (_issue.input = payload.value);\n _issue.inst ?? (_issue.inst = ch);\n _issue.continue ?? (_issue.continue = !ch._zod.def.abort); // abort is always undefined, so this is always true...\n payload.issues.push(util.issue(_issue));\n }\n };\n return fn(payload.value, payload);\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _check(fn, params) {\n const ch = new checks.$ZodCheck({\n check: \"custom\",\n ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function describe(description) {\n const ch = new checks.$ZodCheck({ check: \"describe\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, description });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function meta(metadata) {\n const ch = new checks.$ZodCheck({ check: \"meta\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, ...metadata });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringbool(Classes, _params) {\n const params = util.normalizeParams(_params);\n let truthyArray = params.truthy ?? [\"true\", \"1\", \"yes\", \"on\", \"y\", \"enabled\"];\n let falsyArray = params.falsy ?? [\"false\", \"0\", \"no\", \"off\", \"n\", \"disabled\"];\n if (params.case !== \"sensitive\") {\n truthyArray = truthyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n falsyArray = falsyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n }\n const truthySet = new Set(truthyArray);\n const falsySet = new Set(falsyArray);\n const _Codec = Classes.Codec ?? schemas.$ZodCodec;\n const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;\n const _String = Classes.String ?? schemas.$ZodString;\n const stringSchema = new _String({ type: \"string\", error: params.error });\n const booleanSchema = new _Boolean({ type: \"boolean\", error: params.error });\n const codec = new _Codec({\n type: \"pipe\",\n in: stringSchema,\n out: booleanSchema,\n transform: ((input, payload) => {\n let data = input;\n if (params.case !== \"sensitive\")\n data = data.toLowerCase();\n if (truthySet.has(data)) {\n return true;\n }\n else if (falsySet.has(data)) {\n return false;\n }\n else {\n payload.issues.push({\n code: \"invalid_value\",\n expected: \"stringbool\",\n values: [...truthySet, ...falsySet],\n input: payload.value,\n inst: codec,\n continue: false,\n });\n return {};\n }\n }),\n reverseTransform: ((input, _payload) => {\n if (input === true) {\n return truthyArray[0] || \"true\";\n }\n else {\n return falsyArray[0] || \"false\";\n }\n }),\n error: params.error,\n });\n return codec;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringFormat(Class, format, fnOrRegex, _params = {}) {\n const params = util.normalizeParams(_params);\n const def = {\n ...util.normalizeParams(_params),\n check: \"string_format\",\n type: \"string\",\n format,\n fn: typeof fnOrRegex === \"function\" ? fnOrRegex : (val) => fnOrRegex.test(val),\n ...params,\n };\n if (fnOrRegex instanceof RegExp) {\n def.pattern = fnOrRegex;\n }\n const inst = new Class(def);\n return inst;\n}\n", "import { globalRegistry } from \"./registries.js\";\n// function initializeContext(inputs: JSONSchemaGeneratorParams): ToJSONSchemaContext {\n// return {\n// processor: inputs.processor,\n// metadataRegistry: inputs.metadata ?? globalRegistry,\n// target: inputs.target ?? \"draft-2020-12\",\n// unrepresentable: inputs.unrepresentable ?? \"throw\",\n// };\n// }\nexport function initializeContext(params) {\n // Normalize target: convert old non-hyphenated versions to hyphenated versions\n let target = params?.target ?? \"draft-2020-12\";\n if (target === \"draft-4\")\n target = \"draft-04\";\n if (target === \"draft-7\")\n target = \"draft-07\";\n return {\n processors: params.processors ?? {},\n metadataRegistry: params?.metadata ?? globalRegistry,\n target,\n unrepresentable: params?.unrepresentable ?? \"throw\",\n override: params?.override ?? (() => { }),\n io: params?.io ?? \"output\",\n counter: 0,\n seen: new Map(),\n cycles: params?.cycles ?? \"ref\",\n reused: params?.reused ?? \"inline\",\n external: params?.external ?? undefined,\n };\n}\nexport function process(schema, ctx, _params = { path: [], schemaPath: [] }) {\n var _a;\n const def = schema._zod.def;\n // check for schema in seens\n const seen = ctx.seen.get(schema);\n if (seen) {\n seen.count++;\n // check if cycle\n const isCycle = _params.schemaPath.includes(schema);\n if (isCycle) {\n seen.cycle = _params.path;\n }\n return seen.schema;\n }\n // initialize\n const result = { schema: {}, count: 1, cycle: undefined, path: _params.path };\n ctx.seen.set(schema, result);\n // custom method overrides default behavior\n const overrideSchema = schema._zod.toJSONSchema?.();\n if (overrideSchema) {\n result.schema = overrideSchema;\n }\n else {\n const params = {\n ..._params,\n schemaPath: [..._params.schemaPath, schema],\n path: _params.path,\n };\n if (schema._zod.processJSONSchema) {\n schema._zod.processJSONSchema(ctx, result.schema, params);\n }\n else {\n const _json = result.schema;\n const processor = ctx.processors[def.type];\n if (!processor) {\n throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);\n }\n processor(schema, ctx, _json, params);\n }\n const parent = schema._zod.parent;\n if (parent) {\n // Also set ref if processor didn't (for inheritance)\n if (!result.ref)\n result.ref = parent;\n process(parent, ctx, params);\n ctx.seen.get(parent).isParent = true;\n }\n }\n // metadata\n const meta = ctx.metadataRegistry.get(schema);\n if (meta)\n Object.assign(result.schema, meta);\n if (ctx.io === \"input\" && isTransforming(schema)) {\n // examples/defaults only apply to output type of pipe\n delete result.schema.examples;\n delete result.schema.default;\n }\n // set prefault as default\n if (ctx.io === \"input\" && result.schema._prefault)\n (_a = result.schema).default ?? (_a.default = result.schema._prefault);\n delete result.schema._prefault;\n // pulling fresh from ctx.seen in case it was overwritten\n const _result = ctx.seen.get(schema);\n return _result.schema;\n}\nexport function extractDefs(ctx, schema\n// params: EmitParams\n) {\n // iterate over seen map;\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // Track ids to detect duplicates across different schemas\n const idToSchema = new Map();\n for (const entry of ctx.seen.entries()) {\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n const existing = idToSchema.get(id);\n if (existing && existing !== entry[0]) {\n throw new Error(`Duplicate schema id \"${id}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);\n }\n idToSchema.set(id, entry[0]);\n }\n }\n // returns a ref to the schema\n // defId will be empty if the ref points to an external schema (or #)\n const makeURI = (entry) => {\n // comparing the seen objects because sometimes\n // multiple schemas map to the same seen object.\n // e.g. lazy\n // external is configured\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (ctx.external) {\n const externalId = ctx.external.registry.get(entry[0])?.id; // ?? \"__shared\";// `__schema${ctx.counter++}`;\n // check if schema is in the external registry\n const uriGenerator = ctx.external.uri ?? ((id) => id);\n if (externalId) {\n return { ref: uriGenerator(externalId) };\n }\n // otherwise, add to __shared\n const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;\n entry[1].defId = id; // set defId so it will be reused if needed\n return { defId: id, ref: `${uriGenerator(\"__shared\")}#/${defsSegment}/${id}` };\n }\n if (entry[1] === root) {\n return { ref: \"#\" };\n }\n // self-contained schema\n const uriPrefix = `#`;\n const defUriPrefix = `${uriPrefix}/${defsSegment}/`;\n const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;\n return { defId, ref: defUriPrefix + defId };\n };\n // stored cached version in `def` property\n // remove all properties, set $ref\n const extractToDef = (entry) => {\n // if the schema is already a reference, do not extract it\n if (entry[1].schema.$ref) {\n return;\n }\n const seen = entry[1];\n const { ref, defId } = makeURI(entry);\n seen.def = { ...seen.schema };\n // defId won't be set if the schema is a reference to an external schema\n // or if the schema is the root schema\n if (defId)\n seen.defId = defId;\n // wipe away all properties except $ref\n const schema = seen.schema;\n for (const key in schema) {\n delete schema[key];\n }\n schema.$ref = ref;\n };\n // throw on cycles\n // break cycles\n if (ctx.cycles === \"throw\") {\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.cycle) {\n throw new Error(\"Cycle detected: \" +\n `#/${seen.cycle?.join(\"/\")}/` +\n '\\n\\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.');\n }\n }\n }\n // extract schemas into $defs\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n // convert root schema to # $ref\n if (schema === entry[0]) {\n extractToDef(entry); // this has special handling for the root schema\n continue;\n }\n // extract schemas that are in the external registry\n if (ctx.external) {\n const ext = ctx.external.registry.get(entry[0])?.id;\n if (schema !== entry[0] && ext) {\n extractToDef(entry);\n continue;\n }\n }\n // extract schemas with `id` meta\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n extractToDef(entry);\n continue;\n }\n // break cycles\n if (seen.cycle) {\n // any\n extractToDef(entry);\n continue;\n }\n // extract reused schemas\n if (seen.count > 1) {\n if (ctx.reused === \"ref\") {\n extractToDef(entry);\n // biome-ignore lint:\n continue;\n }\n }\n }\n}\nexport function finalize(ctx, schema) {\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // flatten refs - inherit properties from parent schemas\n const flattenRef = (zodSchema) => {\n const seen = ctx.seen.get(zodSchema);\n // already processed\n if (seen.ref === null)\n return;\n const schema = seen.def ?? seen.schema;\n const _cached = { ...schema };\n const ref = seen.ref;\n seen.ref = null; // prevent infinite recursion\n if (ref) {\n flattenRef(ref);\n const refSeen = ctx.seen.get(ref);\n const refSchema = refSeen.schema;\n // merge referenced schema into current\n if (refSchema.$ref && (ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\")) {\n // older drafts can't combine $ref with other properties\n schema.allOf = schema.allOf ?? [];\n schema.allOf.push(refSchema);\n }\n else {\n Object.assign(schema, refSchema);\n }\n // restore child's own properties (child wins)\n Object.assign(schema, _cached);\n const isParentRef = zodSchema._zod.parent === ref;\n // For parent chain, child is a refinement - remove parent-only properties\n if (isParentRef) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (!(key in _cached)) {\n delete schema[key];\n }\n }\n }\n // When ref was extracted to $defs, remove properties that match the definition\n if (refSchema.$ref && refSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n // If parent was extracted (has $ref), propagate $ref to this schema\n // This handles cases like: readonly().meta({id}).describe()\n // where processor sets ref to innerType but parent should be referenced\n const parent = zodSchema._zod.parent;\n if (parent && parent !== ref) {\n // Ensure parent is processed first so its def has inherited properties\n flattenRef(parent);\n const parentSeen = ctx.seen.get(parent);\n if (parentSeen?.schema.$ref) {\n schema.$ref = parentSeen.schema.$ref;\n // De-duplicate with parent's definition\n if (parentSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n }\n // execute overrides\n ctx.override({\n zodSchema: zodSchema,\n jsonSchema: schema,\n path: seen.path ?? [],\n });\n };\n for (const entry of [...ctx.seen.entries()].reverse()) {\n flattenRef(entry[0]);\n }\n const result = {};\n if (ctx.target === \"draft-2020-12\") {\n result.$schema = \"https://json-schema.org/draft/2020-12/schema\";\n }\n else if (ctx.target === \"draft-07\") {\n result.$schema = \"http://json-schema.org/draft-07/schema#\";\n }\n else if (ctx.target === \"draft-04\") {\n result.$schema = \"http://json-schema.org/draft-04/schema#\";\n }\n else if (ctx.target === \"openapi-3.0\") {\n // OpenAPI 3.0 schema objects should not include a $schema property\n }\n else {\n // Arbitrary string values are allowed but won't have a $schema property set\n }\n if (ctx.external?.uri) {\n const id = ctx.external.registry.get(schema)?.id;\n if (!id)\n throw new Error(\"Schema is missing an `id` property\");\n result.$id = ctx.external.uri(id);\n }\n Object.assign(result, root.def ?? root.schema);\n // build defs object\n const defs = ctx.external?.defs ?? {};\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.def && seen.defId) {\n defs[seen.defId] = seen.def;\n }\n }\n // set definitions in result\n if (ctx.external) {\n }\n else {\n if (Object.keys(defs).length > 0) {\n if (ctx.target === \"draft-2020-12\") {\n result.$defs = defs;\n }\n else {\n result.definitions = defs;\n }\n }\n }\n try {\n // this \"finalizes\" this schema and ensures all cycles are removed\n // each call to finalize() is functionally independent\n // though the seen map is shared\n const finalized = JSON.parse(JSON.stringify(result));\n Object.defineProperty(finalized, \"~standard\", {\n value: {\n ...schema[\"~standard\"],\n jsonSchema: {\n input: createStandardJSONSchemaMethod(schema, \"input\", ctx.processors),\n output: createStandardJSONSchemaMethod(schema, \"output\", ctx.processors),\n },\n },\n enumerable: false,\n writable: false,\n });\n return finalized;\n }\n catch (_err) {\n throw new Error(\"Error converting schema to JSON.\");\n }\n}\nfunction isTransforming(_schema, _ctx) {\n const ctx = _ctx ?? { seen: new Set() };\n if (ctx.seen.has(_schema))\n return false;\n ctx.seen.add(_schema);\n const def = _schema._zod.def;\n if (def.type === \"transform\")\n return true;\n if (def.type === \"array\")\n return isTransforming(def.element, ctx);\n if (def.type === \"set\")\n return isTransforming(def.valueType, ctx);\n if (def.type === \"lazy\")\n return isTransforming(def.getter(), ctx);\n if (def.type === \"promise\" ||\n def.type === \"optional\" ||\n def.type === \"nonoptional\" ||\n def.type === \"nullable\" ||\n def.type === \"readonly\" ||\n def.type === \"default\" ||\n def.type === \"prefault\") {\n return isTransforming(def.innerType, ctx);\n }\n if (def.type === \"intersection\") {\n return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);\n }\n if (def.type === \"record\" || def.type === \"map\") {\n return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);\n }\n if (def.type === \"pipe\") {\n return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);\n }\n if (def.type === \"object\") {\n for (const key in def.shape) {\n if (isTransforming(def.shape[key], ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"union\") {\n for (const option of def.options) {\n if (isTransforming(option, ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"tuple\") {\n for (const item of def.items) {\n if (isTransforming(item, ctx))\n return true;\n }\n if (def.rest && isTransforming(def.rest, ctx))\n return true;\n return false;\n }\n return false;\n}\n/**\n * Creates a toJSONSchema method for a schema instance.\n * This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.\n */\nexport const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {\n const ctx = initializeContext({ ...params, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\nexport const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {\n const { libraryOptions, target } = params ?? {};\n const ctx = initializeContext({ ...(libraryOptions ?? {}), target, io, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\n", "import { extractDefs, finalize, initializeContext, process, } from \"./to-json-schema.js\";\nimport { getEnumValues } from \"./util.js\";\nconst formatMap = {\n guid: \"uuid\",\n url: \"uri\",\n datetime: \"date-time\",\n json_string: \"json-string\",\n regex: \"\", // do not set\n};\n// ==================== SIMPLE TYPE PROCESSORS ====================\nexport const stringProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n json.type = \"string\";\n const { minimum, maximum, format, patterns, contentEncoding } = schema._zod\n .bag;\n if (typeof minimum === \"number\")\n json.minLength = minimum;\n if (typeof maximum === \"number\")\n json.maxLength = maximum;\n // custom pattern overrides format\n if (format) {\n json.format = formatMap[format] ?? format;\n if (json.format === \"\")\n delete json.format; // empty format is not valid\n // JSON Schema format: \"time\" requires a full time with offset or Z\n // z.iso.time() does not include timezone information, so format: \"time\" should never be used\n if (format === \"time\") {\n delete json.format;\n }\n }\n if (contentEncoding)\n json.contentEncoding = contentEncoding;\n if (patterns && patterns.size > 0) {\n const regexes = [...patterns];\n if (regexes.length === 1)\n json.pattern = regexes[0].source;\n else if (regexes.length > 1) {\n json.allOf = [\n ...regexes.map((regex) => ({\n ...(ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\"\n ? { type: \"string\" }\n : {}),\n pattern: regex.source,\n })),\n ];\n }\n }\n};\nexport const numberProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;\n if (typeof format === \"string\" && format.includes(\"int\"))\n json.type = \"integer\";\n else\n json.type = \"number\";\n if (typeof exclusiveMinimum === \"number\") {\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.minimum = exclusiveMinimum;\n json.exclusiveMinimum = true;\n }\n else {\n json.exclusiveMinimum = exclusiveMinimum;\n }\n }\n if (typeof minimum === \"number\") {\n json.minimum = minimum;\n if (typeof exclusiveMinimum === \"number\" && ctx.target !== \"draft-04\") {\n if (exclusiveMinimum >= minimum)\n delete json.minimum;\n else\n delete json.exclusiveMinimum;\n }\n }\n if (typeof exclusiveMaximum === \"number\") {\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.maximum = exclusiveMaximum;\n json.exclusiveMaximum = true;\n }\n else {\n json.exclusiveMaximum = exclusiveMaximum;\n }\n }\n if (typeof maximum === \"number\") {\n json.maximum = maximum;\n if (typeof exclusiveMaximum === \"number\" && ctx.target !== \"draft-04\") {\n if (exclusiveMaximum <= maximum)\n delete json.maximum;\n else\n delete json.exclusiveMaximum;\n }\n }\n if (typeof multipleOf === \"number\")\n json.multipleOf = multipleOf;\n};\nexport const booleanProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const bigintProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"BigInt cannot be represented in JSON Schema\");\n }\n};\nexport const symbolProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Symbols cannot be represented in JSON Schema\");\n }\n};\nexport const nullProcessor = (_schema, ctx, json, _params) => {\n if (ctx.target === \"openapi-3.0\") {\n json.type = \"string\";\n json.nullable = true;\n json.enum = [null];\n }\n else {\n json.type = \"null\";\n }\n};\nexport const undefinedProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Undefined cannot be represented in JSON Schema\");\n }\n};\nexport const voidProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Void cannot be represented in JSON Schema\");\n }\n};\nexport const neverProcessor = (_schema, _ctx, json, _params) => {\n json.not = {};\n};\nexport const anyProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const unknownProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const dateProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Date cannot be represented in JSON Schema\");\n }\n};\nexport const enumProcessor = (schema, _ctx, json, _params) => {\n const def = schema._zod.def;\n const values = getEnumValues(def.entries);\n // Number enums can have both string and number values\n if (values.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (values.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n json.enum = values;\n};\nexport const literalProcessor = (schema, ctx, json, _params) => {\n const def = schema._zod.def;\n const vals = [];\n for (const val of def.values) {\n if (val === undefined) {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Literal `undefined` cannot be represented in JSON Schema\");\n }\n else {\n // do not add to vals\n }\n }\n else if (typeof val === \"bigint\") {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"BigInt literals cannot be represented in JSON Schema\");\n }\n else {\n vals.push(Number(val));\n }\n }\n else {\n vals.push(val);\n }\n }\n if (vals.length === 0) {\n // do nothing (an undefined literal was stripped)\n }\n else if (vals.length === 1) {\n const val = vals[0];\n json.type = val === null ? \"null\" : typeof val;\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.enum = [val];\n }\n else {\n json.const = val;\n }\n }\n else {\n if (vals.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (vals.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n if (vals.every((v) => typeof v === \"boolean\"))\n json.type = \"boolean\";\n if (vals.every((v) => v === null))\n json.type = \"null\";\n json.enum = vals;\n }\n};\nexport const nanProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"NaN cannot be represented in JSON Schema\");\n }\n};\nexport const templateLiteralProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const pattern = schema._zod.pattern;\n if (!pattern)\n throw new Error(\"Pattern not found in template literal\");\n _json.type = \"string\";\n _json.pattern = pattern.source;\n};\nexport const fileProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const file = {\n type: \"string\",\n format: \"binary\",\n contentEncoding: \"binary\",\n };\n const { minimum, maximum, mime } = schema._zod.bag;\n if (minimum !== undefined)\n file.minLength = minimum;\n if (maximum !== undefined)\n file.maxLength = maximum;\n if (mime) {\n if (mime.length === 1) {\n file.contentMediaType = mime[0];\n Object.assign(_json, file);\n }\n else {\n Object.assign(_json, file); // shared props at root\n _json.anyOf = mime.map((m) => ({ contentMediaType: m })); // only contentMediaType differs\n }\n }\n else {\n Object.assign(_json, file);\n }\n};\nexport const successProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const customProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Custom types cannot be represented in JSON Schema\");\n }\n};\nexport const functionProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Function types cannot be represented in JSON Schema\");\n }\n};\nexport const transformProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Transforms cannot be represented in JSON Schema\");\n }\n};\nexport const mapProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Map cannot be represented in JSON Schema\");\n }\n};\nexport const setProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Set cannot be represented in JSON Schema\");\n }\n};\n// ==================== COMPOSITE TYPE PROCESSORS ====================\nexport const arrayProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n json.type = \"array\";\n json.items = process(def.element, ctx, { ...params, path: [...params.path, \"items\"] });\n};\nexport const objectProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n json.properties = {};\n const shape = def.shape;\n for (const key in shape) {\n json.properties[key] = process(shape[key], ctx, {\n ...params,\n path: [...params.path, \"properties\", key],\n });\n }\n // required keys\n const allKeys = new Set(Object.keys(shape));\n const requiredKeys = new Set([...allKeys].filter((key) => {\n const v = def.shape[key]._zod;\n if (ctx.io === \"input\") {\n return v.optin === undefined;\n }\n else {\n return v.optout === undefined;\n }\n }));\n if (requiredKeys.size > 0) {\n json.required = Array.from(requiredKeys);\n }\n // catchall\n if (def.catchall?._zod.def.type === \"never\") {\n // strict\n json.additionalProperties = false;\n }\n else if (!def.catchall) {\n // regular\n if (ctx.io === \"output\")\n json.additionalProperties = false;\n }\n else if (def.catchall) {\n json.additionalProperties = process(def.catchall, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n};\nexport const unionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n // Exclusive unions (inclusive === false) use oneOf (exactly one match) instead of anyOf (one or more matches)\n // This includes both z.xor() and discriminated unions\n const isExclusive = def.inclusive === false;\n const options = def.options.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, isExclusive ? \"oneOf\" : \"anyOf\", i],\n }));\n if (isExclusive) {\n json.oneOf = options;\n }\n else {\n json.anyOf = options;\n }\n};\nexport const intersectionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const a = process(def.left, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 0],\n });\n const b = process(def.right, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 1],\n });\n const isSimpleIntersection = (val) => \"allOf\" in val && Object.keys(val).length === 1;\n const allOf = [\n ...(isSimpleIntersection(a) ? a.allOf : [a]),\n ...(isSimpleIntersection(b) ? b.allOf : [b]),\n ];\n json.allOf = allOf;\n};\nexport const tupleProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"array\";\n const prefixPath = ctx.target === \"draft-2020-12\" ? \"prefixItems\" : \"items\";\n const restPath = ctx.target === \"draft-2020-12\" ? \"items\" : ctx.target === \"openapi-3.0\" ? \"items\" : \"additionalItems\";\n const prefixItems = def.items.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, prefixPath, i],\n }));\n const rest = def.rest\n ? process(def.rest, ctx, {\n ...params,\n path: [...params.path, restPath, ...(ctx.target === \"openapi-3.0\" ? [def.items.length] : [])],\n })\n : null;\n if (ctx.target === \"draft-2020-12\") {\n json.prefixItems = prefixItems;\n if (rest) {\n json.items = rest;\n }\n }\n else if (ctx.target === \"openapi-3.0\") {\n json.items = {\n anyOf: prefixItems,\n };\n if (rest) {\n json.items.anyOf.push(rest);\n }\n json.minItems = prefixItems.length;\n if (!rest) {\n json.maxItems = prefixItems.length;\n }\n }\n else {\n json.items = prefixItems;\n if (rest) {\n json.additionalItems = rest;\n }\n }\n // length\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n};\nexport const recordProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n // For looseRecord with regex patterns, use patternProperties\n // This correctly represents \"only validate keys matching the pattern\" semantics\n // and composes well with allOf (intersections)\n const keyType = def.keyType;\n const keyBag = keyType._zod.bag;\n const patterns = keyBag?.patterns;\n if (def.mode === \"loose\" && patterns && patterns.size > 0) {\n // Use patternProperties for looseRecord with regex patterns\n const valueSchema = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"patternProperties\", \"*\"],\n });\n json.patternProperties = {};\n for (const pattern of patterns) {\n json.patternProperties[pattern.source] = valueSchema;\n }\n }\n else {\n // Default behavior: use propertyNames + additionalProperties\n if (ctx.target === \"draft-07\" || ctx.target === \"draft-2020-12\") {\n json.propertyNames = process(def.keyType, ctx, {\n ...params,\n path: [...params.path, \"propertyNames\"],\n });\n }\n json.additionalProperties = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n // Add required for keys with discrete values (enum, literal, etc.)\n const keyValues = keyType._zod.values;\n if (keyValues) {\n const validKeyValues = [...keyValues].filter((v) => typeof v === \"string\" || typeof v === \"number\");\n if (validKeyValues.length > 0) {\n json.required = validKeyValues;\n }\n }\n};\nexport const nullableProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const inner = process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n if (ctx.target === \"openapi-3.0\") {\n seen.ref = def.innerType;\n json.nullable = true;\n }\n else {\n json.anyOf = [inner, { type: \"null\" }];\n }\n};\nexport const nonoptionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const defaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.default = JSON.parse(JSON.stringify(def.defaultValue));\n};\nexport const prefaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n if (ctx.io === \"input\")\n json._prefault = JSON.parse(JSON.stringify(def.defaultValue));\n};\nexport const catchProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n let catchValue;\n try {\n catchValue = def.catchValue(undefined);\n }\n catch {\n throw new Error(\"Dynamic catch values are not supported in JSON Schema\");\n }\n json.default = catchValue;\n};\nexport const pipeProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n const innerType = ctx.io === \"input\" ? (def.in._zod.def.type === \"transform\" ? def.out : def.in) : def.out;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\nexport const readonlyProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.readOnly = true;\n};\nexport const promiseProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const optionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const lazyProcessor = (schema, ctx, _json, params) => {\n const innerType = schema._zod.innerType;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\n// ==================== ALL PROCESSORS ====================\nexport const allProcessors = {\n string: stringProcessor,\n number: numberProcessor,\n boolean: booleanProcessor,\n bigint: bigintProcessor,\n symbol: symbolProcessor,\n null: nullProcessor,\n undefined: undefinedProcessor,\n void: voidProcessor,\n never: neverProcessor,\n any: anyProcessor,\n unknown: unknownProcessor,\n date: dateProcessor,\n enum: enumProcessor,\n literal: literalProcessor,\n nan: nanProcessor,\n template_literal: templateLiteralProcessor,\n file: fileProcessor,\n success: successProcessor,\n custom: customProcessor,\n function: functionProcessor,\n transform: transformProcessor,\n map: mapProcessor,\n set: setProcessor,\n array: arrayProcessor,\n object: objectProcessor,\n union: unionProcessor,\n intersection: intersectionProcessor,\n tuple: tupleProcessor,\n record: recordProcessor,\n nullable: nullableProcessor,\n nonoptional: nonoptionalProcessor,\n default: defaultProcessor,\n prefault: prefaultProcessor,\n catch: catchProcessor,\n pipe: pipeProcessor,\n readonly: readonlyProcessor,\n promise: promiseProcessor,\n optional: optionalProcessor,\n lazy: lazyProcessor,\n};\nexport function toJSONSchema(input, params) {\n if (\"_idmap\" in input) {\n // Registry case\n const registry = input;\n const ctx = initializeContext({ ...params, processors: allProcessors });\n const defs = {};\n // First pass: process all schemas to build the seen map\n for (const entry of registry._idmap.entries()) {\n const [_, schema] = entry;\n process(schema, ctx);\n }\n const schemas = {};\n const external = {\n registry,\n uri: params?.uri,\n defs,\n };\n // Update the context with external configuration\n ctx.external = external;\n // Second pass: emit each schema\n for (const entry of registry._idmap.entries()) {\n const [key, schema] = entry;\n extractDefs(ctx, schema);\n schemas[key] = finalize(ctx, schema);\n }\n if (Object.keys(defs).length > 0) {\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n schemas.__shared = {\n [defsSegment]: defs,\n };\n }\n return { schemas };\n }\n // Single schema case\n const ctx = initializeContext({ ...params, processors: allProcessors });\n process(input, ctx);\n extractDefs(ctx, input);\n return finalize(ctx, input);\n}\n", "import { allProcessors } from \"./json-schema-processors.js\";\nimport { extractDefs, finalize, initializeContext, process, } from \"./to-json-schema.js\";\n/**\n * Legacy class-based interface for JSON Schema generation.\n * This class wraps the new functional implementation to provide backward compatibility.\n *\n * @deprecated Use the `toJSONSchema` function instead for new code.\n *\n * @example\n * ```typescript\n * // Legacy usage (still supported)\n * const gen = new JSONSchemaGenerator({ target: \"draft-07\" });\n * gen.process(schema);\n * const result = gen.emit(schema);\n *\n * // Preferred modern usage\n * const result = toJSONSchema(schema, { target: \"draft-07\" });\n * ```\n */\nexport class JSONSchemaGenerator {\n /** @deprecated Access via ctx instead */\n get metadataRegistry() {\n return this.ctx.metadataRegistry;\n }\n /** @deprecated Access via ctx instead */\n get target() {\n return this.ctx.target;\n }\n /** @deprecated Access via ctx instead */\n get unrepresentable() {\n return this.ctx.unrepresentable;\n }\n /** @deprecated Access via ctx instead */\n get override() {\n return this.ctx.override;\n }\n /** @deprecated Access via ctx instead */\n get io() {\n return this.ctx.io;\n }\n /** @deprecated Access via ctx instead */\n get counter() {\n return this.ctx.counter;\n }\n set counter(value) {\n this.ctx.counter = value;\n }\n /** @deprecated Access via ctx instead */\n get seen() {\n return this.ctx.seen;\n }\n constructor(params) {\n // Normalize target for internal context\n let normalizedTarget = params?.target ?? \"draft-2020-12\";\n if (normalizedTarget === \"draft-4\")\n normalizedTarget = \"draft-04\";\n if (normalizedTarget === \"draft-7\")\n normalizedTarget = \"draft-07\";\n this.ctx = initializeContext({\n processors: allProcessors,\n target: normalizedTarget,\n ...(params?.metadata && { metadata: params.metadata }),\n ...(params?.unrepresentable && { unrepresentable: params.unrepresentable }),\n ...(params?.override && { override: params.override }),\n ...(params?.io && { io: params.io }),\n });\n }\n /**\n * Process a schema to prepare it for JSON Schema generation.\n * This must be called before emit().\n */\n process(schema, _params = { path: [], schemaPath: [] }) {\n return process(schema, this.ctx, _params);\n }\n /**\n * Emit the final JSON Schema after processing.\n * Must call process() first.\n */\n emit(schema, _params) {\n // Apply emit params to the context\n if (_params) {\n if (_params.cycles)\n this.ctx.cycles = _params.cycles;\n if (_params.reused)\n this.ctx.reused = _params.reused;\n if (_params.external)\n this.ctx.external = _params.external;\n }\n extractDefs(this.ctx, schema);\n const result = finalize(this.ctx, schema);\n // Strip ~standard property to match old implementation's return type\n const { \"~standard\": _, ...plainResult } = result;\n return plainResult;\n }\n}\n", "export {};\n", "export * from \"./core.js\";\nexport * from \"./parse.js\";\nexport * from \"./errors.js\";\nexport * from \"./schemas.js\";\nexport * from \"./checks.js\";\nexport * from \"./versions.js\";\nexport * as util from \"./util.js\";\nexport * as regexes from \"./regexes.js\";\nexport * as locales from \"../locales/index.js\";\nexport * from \"./registries.js\";\nexport * from \"./doc.js\";\nexport * from \"./api.js\";\nexport * from \"./to-json-schema.js\";\nexport { toJSONSchema } from \"./json-schema-processors.js\";\nexport { JSONSchemaGenerator } from \"./json-schema-generator.js\";\nexport * as JSONSchema from \"./json-schema.js\";\n", "export { _lt as lt, _lte as lte, _gt as gt, _gte as gte, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, _slugify as slugify, } from \"../core/index.js\";\n", "import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\nexport const ZodISODateTime = /*@__PURE__*/ core.$constructor(\"ZodISODateTime\", (inst, def) => {\n core.$ZodISODateTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function datetime(params) {\n return core._isoDateTime(ZodISODateTime, params);\n}\nexport const ZodISODate = /*@__PURE__*/ core.$constructor(\"ZodISODate\", (inst, def) => {\n core.$ZodISODate.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function date(params) {\n return core._isoDate(ZodISODate, params);\n}\nexport const ZodISOTime = /*@__PURE__*/ core.$constructor(\"ZodISOTime\", (inst, def) => {\n core.$ZodISOTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function time(params) {\n return core._isoTime(ZodISOTime, params);\n}\nexport const ZodISODuration = /*@__PURE__*/ core.$constructor(\"ZodISODuration\", (inst, def) => {\n core.$ZodISODuration.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function duration(params) {\n return core._isoDuration(ZodISODuration, params);\n}\n", "import * as core from \"../core/index.js\";\nimport { $ZodError } from \"../core/index.js\";\nimport * as util from \"../core/util.js\";\nconst initializer = (inst, issues) => {\n $ZodError.init(inst, issues);\n inst.name = \"ZodError\";\n Object.defineProperties(inst, {\n format: {\n value: (mapper) => core.formatError(inst, mapper),\n // enumerable: false,\n },\n flatten: {\n value: (mapper) => core.flattenError(inst, mapper),\n // enumerable: false,\n },\n addIssue: {\n value: (issue) => {\n inst.issues.push(issue);\n inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);\n },\n // enumerable: false,\n },\n addIssues: {\n value: (issues) => {\n inst.issues.push(...issues);\n inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);\n },\n // enumerable: false,\n },\n isEmpty: {\n get() {\n return inst.issues.length === 0;\n },\n // enumerable: false,\n },\n });\n // Object.defineProperty(inst, \"isEmpty\", {\n // get() {\n // return inst.issues.length === 0;\n // },\n // });\n};\nexport const ZodError = core.$constructor(\"ZodError\", initializer);\nexport const ZodRealError = core.$constructor(\"ZodError\", initializer, {\n Parent: Error,\n});\n// /** @deprecated Use `z.core.$ZodErrorMapCtx` instead. */\n// export type ErrorMapCtx = core.$ZodErrorMapCtx;\n", "import * as core from \"../core/index.js\";\nimport { ZodRealError } from \"./errors.js\";\nexport const parse = /* @__PURE__ */ core._parse(ZodRealError);\nexport const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);\nexport const safeParse = /* @__PURE__ */ core._safeParse(ZodRealError);\nexport const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodRealError);\n// Codec functions\nexport const encode = /* @__PURE__ */ core._encode(ZodRealError);\nexport const decode = /* @__PURE__ */ core._decode(ZodRealError);\nexport const encodeAsync = /* @__PURE__ */ core._encodeAsync(ZodRealError);\nexport const decodeAsync = /* @__PURE__ */ core._decodeAsync(ZodRealError);\nexport const safeEncode = /* @__PURE__ */ core._safeEncode(ZodRealError);\nexport const safeDecode = /* @__PURE__ */ core._safeDecode(ZodRealError);\nexport const safeEncodeAsync = /* @__PURE__ */ core._safeEncodeAsync(ZodRealError);\nexport const safeDecodeAsync = /* @__PURE__ */ core._safeDecodeAsync(ZodRealError);\n", "import * as core from \"../core/index.js\";\nimport { util } from \"../core/index.js\";\nimport * as processors from \"../core/json-schema-processors.js\";\nimport { createStandardJSONSchemaMethod, createToJSONSchemaMethod } from \"../core/to-json-schema.js\";\nimport * as checks from \"./checks.js\";\nimport * as iso from \"./iso.js\";\nimport * as parse from \"./parse.js\";\nexport const ZodType = /*@__PURE__*/ core.$constructor(\"ZodType\", (inst, def) => {\n core.$ZodType.init(inst, def);\n Object.assign(inst[\"~standard\"], {\n jsonSchema: {\n input: createStandardJSONSchemaMethod(inst, \"input\"),\n output: createStandardJSONSchemaMethod(inst, \"output\"),\n },\n });\n inst.toJSONSchema = createToJSONSchemaMethod(inst, {});\n inst.def = def;\n inst.type = def.type;\n Object.defineProperty(inst, \"_def\", { value: def });\n // base methods\n inst.check = (...checks) => {\n return inst.clone(util.mergeDefs(def, {\n checks: [\n ...(def.checks ?? []),\n ...checks.map((ch) => typeof ch === \"function\" ? { _zod: { check: ch, def: { check: \"custom\" }, onattach: [] } } : ch),\n ],\n }), {\n parent: true,\n });\n };\n inst.with = inst.check;\n inst.clone = (def, params) => core.clone(inst, def, params);\n inst.brand = () => inst;\n inst.register = ((reg, meta) => {\n reg.add(inst, meta);\n return inst;\n });\n // parsing\n inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });\n inst.safeParse = (data, params) => parse.safeParse(inst, data, params);\n inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });\n inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);\n inst.spa = inst.safeParseAsync;\n // encoding/decoding\n inst.encode = (data, params) => parse.encode(inst, data, params);\n inst.decode = (data, params) => parse.decode(inst, data, params);\n inst.encodeAsync = async (data, params) => parse.encodeAsync(inst, data, params);\n inst.decodeAsync = async (data, params) => parse.decodeAsync(inst, data, params);\n inst.safeEncode = (data, params) => parse.safeEncode(inst, data, params);\n inst.safeDecode = (data, params) => parse.safeDecode(inst, data, params);\n inst.safeEncodeAsync = async (data, params) => parse.safeEncodeAsync(inst, data, params);\n inst.safeDecodeAsync = async (data, params) => parse.safeDecodeAsync(inst, data, params);\n // refinements\n inst.refine = (check, params) => inst.check(refine(check, params));\n inst.superRefine = (refinement) => inst.check(superRefine(refinement));\n inst.overwrite = (fn) => inst.check(checks.overwrite(fn));\n // wrappers\n inst.optional = () => optional(inst);\n inst.exactOptional = () => exactOptional(inst);\n inst.nullable = () => nullable(inst);\n inst.nullish = () => optional(nullable(inst));\n inst.nonoptional = (params) => nonoptional(inst, params);\n inst.array = () => array(inst);\n inst.or = (arg) => union([inst, arg]);\n inst.and = (arg) => intersection(inst, arg);\n inst.transform = (tx) => pipe(inst, transform(tx));\n inst.default = (def) => _default(inst, def);\n inst.prefault = (def) => prefault(inst, def);\n // inst.coalesce = (def, params) => coalesce(inst, def, params);\n inst.catch = (params) => _catch(inst, params);\n inst.pipe = (target) => pipe(inst, target);\n inst.readonly = () => readonly(inst);\n // meta\n inst.describe = (description) => {\n const cl = inst.clone();\n core.globalRegistry.add(cl, { description });\n return cl;\n };\n Object.defineProperty(inst, \"description\", {\n get() {\n return core.globalRegistry.get(inst)?.description;\n },\n configurable: true,\n });\n inst.meta = (...args) => {\n if (args.length === 0) {\n return core.globalRegistry.get(inst);\n }\n const cl = inst.clone();\n core.globalRegistry.add(cl, args[0]);\n return cl;\n };\n // helpers\n inst.isOptional = () => inst.safeParse(undefined).success;\n inst.isNullable = () => inst.safeParse(null).success;\n inst.apply = (fn) => fn(inst);\n return inst;\n});\n/** @internal */\nexport const _ZodString = /*@__PURE__*/ core.$constructor(\"_ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.stringProcessor(inst, ctx, json, params);\n const bag = inst._zod.bag;\n inst.format = bag.format ?? null;\n inst.minLength = bag.minimum ?? null;\n inst.maxLength = bag.maximum ?? null;\n // validations\n inst.regex = (...args) => inst.check(checks.regex(...args));\n inst.includes = (...args) => inst.check(checks.includes(...args));\n inst.startsWith = (...args) => inst.check(checks.startsWith(...args));\n inst.endsWith = (...args) => inst.check(checks.endsWith(...args));\n inst.min = (...args) => inst.check(checks.minLength(...args));\n inst.max = (...args) => inst.check(checks.maxLength(...args));\n inst.length = (...args) => inst.check(checks.length(...args));\n inst.nonempty = (...args) => inst.check(checks.minLength(1, ...args));\n inst.lowercase = (params) => inst.check(checks.lowercase(params));\n inst.uppercase = (params) => inst.check(checks.uppercase(params));\n // transforms\n inst.trim = () => inst.check(checks.trim());\n inst.normalize = (...args) => inst.check(checks.normalize(...args));\n inst.toLowerCase = () => inst.check(checks.toLowerCase());\n inst.toUpperCase = () => inst.check(checks.toUpperCase());\n inst.slugify = () => inst.check(checks.slugify());\n});\nexport const ZodString = /*@__PURE__*/ core.$constructor(\"ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n _ZodString.init(inst, def);\n inst.email = (params) => inst.check(core._email(ZodEmail, params));\n inst.url = (params) => inst.check(core._url(ZodURL, params));\n inst.jwt = (params) => inst.check(core._jwt(ZodJWT, params));\n inst.emoji = (params) => inst.check(core._emoji(ZodEmoji, params));\n inst.guid = (params) => inst.check(core._guid(ZodGUID, params));\n inst.uuid = (params) => inst.check(core._uuid(ZodUUID, params));\n inst.uuidv4 = (params) => inst.check(core._uuidv4(ZodUUID, params));\n inst.uuidv6 = (params) => inst.check(core._uuidv6(ZodUUID, params));\n inst.uuidv7 = (params) => inst.check(core._uuidv7(ZodUUID, params));\n inst.nanoid = (params) => inst.check(core._nanoid(ZodNanoID, params));\n inst.guid = (params) => inst.check(core._guid(ZodGUID, params));\n inst.cuid = (params) => inst.check(core._cuid(ZodCUID, params));\n inst.cuid2 = (params) => inst.check(core._cuid2(ZodCUID2, params));\n inst.ulid = (params) => inst.check(core._ulid(ZodULID, params));\n inst.base64 = (params) => inst.check(core._base64(ZodBase64, params));\n inst.base64url = (params) => inst.check(core._base64url(ZodBase64URL, params));\n inst.xid = (params) => inst.check(core._xid(ZodXID, params));\n inst.ksuid = (params) => inst.check(core._ksuid(ZodKSUID, params));\n inst.ipv4 = (params) => inst.check(core._ipv4(ZodIPv4, params));\n inst.ipv6 = (params) => inst.check(core._ipv6(ZodIPv6, params));\n inst.cidrv4 = (params) => inst.check(core._cidrv4(ZodCIDRv4, params));\n inst.cidrv6 = (params) => inst.check(core._cidrv6(ZodCIDRv6, params));\n inst.e164 = (params) => inst.check(core._e164(ZodE164, params));\n // iso\n inst.datetime = (params) => inst.check(iso.datetime(params));\n inst.date = (params) => inst.check(iso.date(params));\n inst.time = (params) => inst.check(iso.time(params));\n inst.duration = (params) => inst.check(iso.duration(params));\n});\nexport function string(params) {\n return core._string(ZodString, params);\n}\nexport const ZodStringFormat = /*@__PURE__*/ core.$constructor(\"ZodStringFormat\", (inst, def) => {\n core.$ZodStringFormat.init(inst, def);\n _ZodString.init(inst, def);\n});\nexport const ZodEmail = /*@__PURE__*/ core.$constructor(\"ZodEmail\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmail.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function email(params) {\n return core._email(ZodEmail, params);\n}\nexport const ZodGUID = /*@__PURE__*/ core.$constructor(\"ZodGUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodGUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function guid(params) {\n return core._guid(ZodGUID, params);\n}\nexport const ZodUUID = /*@__PURE__*/ core.$constructor(\"ZodUUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodUUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function uuid(params) {\n return core._uuid(ZodUUID, params);\n}\nexport function uuidv4(params) {\n return core._uuidv4(ZodUUID, params);\n}\n// ZodUUIDv6\nexport function uuidv6(params) {\n return core._uuidv6(ZodUUID, params);\n}\n// ZodUUIDv7\nexport function uuidv7(params) {\n return core._uuidv7(ZodUUID, params);\n}\nexport const ZodURL = /*@__PURE__*/ core.$constructor(\"ZodURL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodURL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function url(params) {\n return core._url(ZodURL, params);\n}\nexport function httpUrl(params) {\n return core._url(ZodURL, {\n protocol: /^https?$/,\n hostname: core.regexes.domain,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEmoji = /*@__PURE__*/ core.$constructor(\"ZodEmoji\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmoji.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function emoji(params) {\n return core._emoji(ZodEmoji, params);\n}\nexport const ZodNanoID = /*@__PURE__*/ core.$constructor(\"ZodNanoID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodNanoID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function nanoid(params) {\n return core._nanoid(ZodNanoID, params);\n}\nexport const ZodCUID = /*@__PURE__*/ core.$constructor(\"ZodCUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cuid(params) {\n return core._cuid(ZodCUID, params);\n}\nexport const ZodCUID2 = /*@__PURE__*/ core.$constructor(\"ZodCUID2\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID2.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cuid2(params) {\n return core._cuid2(ZodCUID2, params);\n}\nexport const ZodULID = /*@__PURE__*/ core.$constructor(\"ZodULID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodULID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ulid(params) {\n return core._ulid(ZodULID, params);\n}\nexport const ZodXID = /*@__PURE__*/ core.$constructor(\"ZodXID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodXID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function xid(params) {\n return core._xid(ZodXID, params);\n}\nexport const ZodKSUID = /*@__PURE__*/ core.$constructor(\"ZodKSUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodKSUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ksuid(params) {\n return core._ksuid(ZodKSUID, params);\n}\nexport const ZodIPv4 = /*@__PURE__*/ core.$constructor(\"ZodIPv4\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv4(params) {\n return core._ipv4(ZodIPv4, params);\n}\nexport const ZodMAC = /*@__PURE__*/ core.$constructor(\"ZodMAC\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodMAC.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function mac(params) {\n return core._mac(ZodMAC, params);\n}\nexport const ZodIPv6 = /*@__PURE__*/ core.$constructor(\"ZodIPv6\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv6(params) {\n return core._ipv6(ZodIPv6, params);\n}\nexport const ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv4\", (inst, def) => {\n core.$ZodCIDRv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv4(params) {\n return core._cidrv4(ZodCIDRv4, params);\n}\nexport const ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv6\", (inst, def) => {\n core.$ZodCIDRv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv6(params) {\n return core._cidrv6(ZodCIDRv6, params);\n}\nexport const ZodBase64 = /*@__PURE__*/ core.$constructor(\"ZodBase64\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64(params) {\n return core._base64(ZodBase64, params);\n}\nexport const ZodBase64URL = /*@__PURE__*/ core.$constructor(\"ZodBase64URL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64URL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64url(params) {\n return core._base64url(ZodBase64URL, params);\n}\nexport const ZodE164 = /*@__PURE__*/ core.$constructor(\"ZodE164\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodE164.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function e164(params) {\n return core._e164(ZodE164, params);\n}\nexport const ZodJWT = /*@__PURE__*/ core.$constructor(\"ZodJWT\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodJWT.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function jwt(params) {\n return core._jwt(ZodJWT, params);\n}\nexport const ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"ZodCustomStringFormat\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCustomStringFormat.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function stringFormat(format, fnOrRegex, _params = {}) {\n return core._stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);\n}\nexport function hostname(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hostname\", core.regexes.hostname, _params);\n}\nexport function hex(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hex\", core.regexes.hex, _params);\n}\nexport function hash(alg, params) {\n const enc = params?.enc ?? \"hex\";\n const format = `${alg}_${enc}`;\n const regex = core.regexes[format];\n if (!regex)\n throw new Error(`Unrecognized hash format: ${format}`);\n return core._stringFormat(ZodCustomStringFormat, format, regex, params);\n}\nexport const ZodNumber = /*@__PURE__*/ core.$constructor(\"ZodNumber\", (inst, def) => {\n core.$ZodNumber.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.numberProcessor(inst, ctx, json, params);\n inst.gt = (value, params) => inst.check(checks.gt(value, params));\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.lt = (value, params) => inst.check(checks.lt(value, params));\n inst.lte = (value, params) => inst.check(checks.lte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n inst.int = (params) => inst.check(int(params));\n inst.safe = (params) => inst.check(int(params));\n inst.positive = (params) => inst.check(checks.gt(0, params));\n inst.nonnegative = (params) => inst.check(checks.gte(0, params));\n inst.negative = (params) => inst.check(checks.lt(0, params));\n inst.nonpositive = (params) => inst.check(checks.lte(0, params));\n inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));\n inst.step = (value, params) => inst.check(checks.multipleOf(value, params));\n // inst.finite = (params) => inst.check(core.finite(params));\n inst.finite = () => inst;\n const bag = inst._zod.bag;\n inst.minValue =\n Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;\n inst.maxValue =\n Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;\n inst.isInt = (bag.format ?? \"\").includes(\"int\") || Number.isSafeInteger(bag.multipleOf ?? 0.5);\n inst.isFinite = true;\n inst.format = bag.format ?? null;\n});\nexport function number(params) {\n return core._number(ZodNumber, params);\n}\nexport const ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"ZodNumberFormat\", (inst, def) => {\n core.$ZodNumberFormat.init(inst, def);\n ZodNumber.init(inst, def);\n});\nexport function int(params) {\n return core._int(ZodNumberFormat, params);\n}\nexport function float32(params) {\n return core._float32(ZodNumberFormat, params);\n}\nexport function float64(params) {\n return core._float64(ZodNumberFormat, params);\n}\nexport function int32(params) {\n return core._int32(ZodNumberFormat, params);\n}\nexport function uint32(params) {\n return core._uint32(ZodNumberFormat, params);\n}\nexport const ZodBoolean = /*@__PURE__*/ core.$constructor(\"ZodBoolean\", (inst, def) => {\n core.$ZodBoolean.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.booleanProcessor(inst, ctx, json, params);\n});\nexport function boolean(params) {\n return core._boolean(ZodBoolean, params);\n}\nexport const ZodBigInt = /*@__PURE__*/ core.$constructor(\"ZodBigInt\", (inst, def) => {\n core.$ZodBigInt.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.bigintProcessor(inst, ctx, json, params);\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.gt = (value, params) => inst.check(checks.gt(value, params));\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.lt = (value, params) => inst.check(checks.lt(value, params));\n inst.lte = (value, params) => inst.check(checks.lte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n inst.positive = (params) => inst.check(checks.gt(BigInt(0), params));\n inst.negative = (params) => inst.check(checks.lt(BigInt(0), params));\n inst.nonpositive = (params) => inst.check(checks.lte(BigInt(0), params));\n inst.nonnegative = (params) => inst.check(checks.gte(BigInt(0), params));\n inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));\n const bag = inst._zod.bag;\n inst.minValue = bag.minimum ?? null;\n inst.maxValue = bag.maximum ?? null;\n inst.format = bag.format ?? null;\n});\nexport function bigint(params) {\n return core._bigint(ZodBigInt, params);\n}\nexport const ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"ZodBigIntFormat\", (inst, def) => {\n core.$ZodBigIntFormat.init(inst, def);\n ZodBigInt.init(inst, def);\n});\n// int64\nexport function int64(params) {\n return core._int64(ZodBigIntFormat, params);\n}\n// uint64\nexport function uint64(params) {\n return core._uint64(ZodBigIntFormat, params);\n}\nexport const ZodSymbol = /*@__PURE__*/ core.$constructor(\"ZodSymbol\", (inst, def) => {\n core.$ZodSymbol.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.symbolProcessor(inst, ctx, json, params);\n});\nexport function symbol(params) {\n return core._symbol(ZodSymbol, params);\n}\nexport const ZodUndefined = /*@__PURE__*/ core.$constructor(\"ZodUndefined\", (inst, def) => {\n core.$ZodUndefined.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.undefinedProcessor(inst, ctx, json, params);\n});\nfunction _undefined(params) {\n return core._undefined(ZodUndefined, params);\n}\nexport { _undefined as undefined };\nexport const ZodNull = /*@__PURE__*/ core.$constructor(\"ZodNull\", (inst, def) => {\n core.$ZodNull.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullProcessor(inst, ctx, json, params);\n});\nfunction _null(params) {\n return core._null(ZodNull, params);\n}\nexport { _null as null };\nexport const ZodAny = /*@__PURE__*/ core.$constructor(\"ZodAny\", (inst, def) => {\n core.$ZodAny.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.anyProcessor(inst, ctx, json, params);\n});\nexport function any() {\n return core._any(ZodAny);\n}\nexport const ZodUnknown = /*@__PURE__*/ core.$constructor(\"ZodUnknown\", (inst, def) => {\n core.$ZodUnknown.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unknownProcessor(inst, ctx, json, params);\n});\nexport function unknown() {\n return core._unknown(ZodUnknown);\n}\nexport const ZodNever = /*@__PURE__*/ core.$constructor(\"ZodNever\", (inst, def) => {\n core.$ZodNever.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.neverProcessor(inst, ctx, json, params);\n});\nexport function never(params) {\n return core._never(ZodNever, params);\n}\nexport const ZodVoid = /*@__PURE__*/ core.$constructor(\"ZodVoid\", (inst, def) => {\n core.$ZodVoid.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.voidProcessor(inst, ctx, json, params);\n});\nfunction _void(params) {\n return core._void(ZodVoid, params);\n}\nexport { _void as void };\nexport const ZodDate = /*@__PURE__*/ core.$constructor(\"ZodDate\", (inst, def) => {\n core.$ZodDate.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.dateProcessor(inst, ctx, json, params);\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n const c = inst._zod.bag;\n inst.minDate = c.minimum ? new Date(c.minimum) : null;\n inst.maxDate = c.maximum ? new Date(c.maximum) : null;\n});\nexport function date(params) {\n return core._date(ZodDate, params);\n}\nexport const ZodArray = /*@__PURE__*/ core.$constructor(\"ZodArray\", (inst, def) => {\n core.$ZodArray.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.arrayProcessor(inst, ctx, json, params);\n inst.element = def.element;\n inst.min = (minLength, params) => inst.check(checks.minLength(minLength, params));\n inst.nonempty = (params) => inst.check(checks.minLength(1, params));\n inst.max = (maxLength, params) => inst.check(checks.maxLength(maxLength, params));\n inst.length = (len, params) => inst.check(checks.length(len, params));\n inst.unwrap = () => inst.element;\n});\nexport function array(element, params) {\n return core._array(ZodArray, element, params);\n}\n// .keyof\nexport function keyof(schema) {\n const shape = schema._zod.def.shape;\n return _enum(Object.keys(shape));\n}\nexport const ZodObject = /*@__PURE__*/ core.$constructor(\"ZodObject\", (inst, def) => {\n core.$ZodObjectJIT.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.objectProcessor(inst, ctx, json, params);\n util.defineLazy(inst, \"shape\", () => {\n return def.shape;\n });\n inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));\n inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall: catchall });\n inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });\n inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });\n inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });\n inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });\n inst.extend = (incoming) => {\n return util.extend(inst, incoming);\n };\n inst.safeExtend = (incoming) => {\n return util.safeExtend(inst, incoming);\n };\n inst.merge = (other) => util.merge(inst, other);\n inst.pick = (mask) => util.pick(inst, mask);\n inst.omit = (mask) => util.omit(inst, mask);\n inst.partial = (...args) => util.partial(ZodOptional, inst, args[0]);\n inst.required = (...args) => util.required(ZodNonOptional, inst, args[0]);\n});\nexport function object(shape, params) {\n const def = {\n type: \"object\",\n shape: shape ?? {},\n ...util.normalizeParams(params),\n };\n return new ZodObject(def);\n}\n// strictObject\nexport function strictObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: never(),\n ...util.normalizeParams(params),\n });\n}\n// looseObject\nexport function looseObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: unknown(),\n ...util.normalizeParams(params),\n });\n}\nexport const ZodUnion = /*@__PURE__*/ core.$constructor(\"ZodUnion\", (inst, def) => {\n core.$ZodUnion.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\nexport function union(options, params) {\n return new ZodUnion({\n type: \"union\",\n options: options,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodXor = /*@__PURE__*/ core.$constructor(\"ZodXor\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodXor.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\n/** Creates an exclusive union (XOR) where exactly one option must match.\n * Unlike regular unions that succeed when any option matches, xor fails if\n * zero or more than one option matches the input. */\nexport function xor(options, params) {\n return new ZodXor({\n type: \"union\",\n options: options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodDiscriminatedUnion = /*@__PURE__*/ core.$constructor(\"ZodDiscriminatedUnion\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodDiscriminatedUnion.init(inst, def);\n});\nexport function discriminatedUnion(discriminator, options, params) {\n // const [options, params] = args;\n return new ZodDiscriminatedUnion({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodIntersection = /*@__PURE__*/ core.$constructor(\"ZodIntersection\", (inst, def) => {\n core.$ZodIntersection.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.intersectionProcessor(inst, ctx, json, params);\n});\nexport function intersection(left, right) {\n return new ZodIntersection({\n type: \"intersection\",\n left: left,\n right: right,\n });\n}\nexport const ZodTuple = /*@__PURE__*/ core.$constructor(\"ZodTuple\", (inst, def) => {\n core.$ZodTuple.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.tupleProcessor(inst, ctx, json, params);\n inst.rest = (rest) => inst.clone({\n ...inst._zod.def,\n rest: rest,\n });\n});\nexport function tuple(items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof core.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new ZodTuple({\n type: \"tuple\",\n items: items,\n rest,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodRecord = /*@__PURE__*/ core.$constructor(\"ZodRecord\", (inst, def) => {\n core.$ZodRecord.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.recordProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n});\nexport function record(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\n// type alksjf = core.output;\nexport function partialRecord(keyType, valueType, params) {\n const k = core.clone(keyType);\n k._zod.values = undefined;\n return new ZodRecord({\n type: \"record\",\n keyType: k,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport function looseRecord(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n mode: \"loose\",\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMap = /*@__PURE__*/ core.$constructor(\"ZodMap\", (inst, def) => {\n core.$ZodMap.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.mapProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function map(keyType, valueType, params) {\n return new ZodMap({\n type: \"map\",\n keyType: keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSet = /*@__PURE__*/ core.$constructor(\"ZodSet\", (inst, def) => {\n core.$ZodSet.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.setProcessor(inst, ctx, json, params);\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function set(valueType, params) {\n return new ZodSet({\n type: \"set\",\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEnum = /*@__PURE__*/ core.$constructor(\"ZodEnum\", (inst, def) => {\n core.$ZodEnum.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.enumProcessor(inst, ctx, json, params);\n inst.enum = def.entries;\n inst.options = Object.values(def.entries);\n const keys = new Set(Object.keys(def.entries));\n inst.extract = (values, params) => {\n const newEntries = {};\n for (const value of values) {\n if (keys.has(value)) {\n newEntries[value] = def.entries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n inst.exclude = (values, params) => {\n const newEntries = { ...def.entries };\n for (const value of values) {\n if (keys.has(value)) {\n delete newEntries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n});\nfunction _enum(values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport { _enum as enum };\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function nativeEnum(entries, params) {\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLiteral = /*@__PURE__*/ core.$constructor(\"ZodLiteral\", (inst, def) => {\n core.$ZodLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.literalProcessor(inst, ctx, json, params);\n inst.values = new Set(def.values);\n Object.defineProperty(inst, \"value\", {\n get() {\n if (def.values.length > 1) {\n throw new Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");\n }\n return def.values[0];\n },\n });\n});\nexport function literal(value, params) {\n return new ZodLiteral({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\nexport const ZodFile = /*@__PURE__*/ core.$constructor(\"ZodFile\", (inst, def) => {\n core.$ZodFile.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.fileProcessor(inst, ctx, json, params);\n inst.min = (size, params) => inst.check(core._minSize(size, params));\n inst.max = (size, params) => inst.check(core._maxSize(size, params));\n inst.mime = (types, params) => inst.check(core._mime(Array.isArray(types) ? types : [types], params));\n});\nexport function file(params) {\n return core._file(ZodFile, params);\n}\nexport const ZodTransform = /*@__PURE__*/ core.$constructor(\"ZodTransform\", (inst, def) => {\n core.$ZodTransform.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.transformProcessor(inst, ctx, json, params);\n inst._zod.parse = (payload, _ctx) => {\n if (_ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n _issue.input ?? (_issue.input = payload.value);\n _issue.inst ?? (_issue.inst = inst);\n // _issue.continue ??= true;\n payload.issues.push(util.issue(_issue));\n }\n };\n const output = def.transform(payload.value, payload);\n if (output instanceof Promise) {\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n payload.value = output;\n return payload;\n };\n});\nexport function transform(fn) {\n return new ZodTransform({\n type: \"transform\",\n transform: fn,\n });\n}\nexport const ZodOptional = /*@__PURE__*/ core.$constructor(\"ZodOptional\", (inst, def) => {\n core.$ZodOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function optional(innerType) {\n return new ZodOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodExactOptional = /*@__PURE__*/ core.$constructor(\"ZodExactOptional\", (inst, def) => {\n core.$ZodExactOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function exactOptional(innerType) {\n return new ZodExactOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodNullable = /*@__PURE__*/ core.$constructor(\"ZodNullable\", (inst, def) => {\n core.$ZodNullable.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullableProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nullable(innerType) {\n return new ZodNullable({\n type: \"nullable\",\n innerType: innerType,\n });\n}\n// nullish\nexport function nullish(innerType) {\n return optional(nullable(innerType));\n}\nexport const ZodDefault = /*@__PURE__*/ core.$constructor(\"ZodDefault\", (inst, def) => {\n core.$ZodDefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.defaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeDefault = inst.unwrap;\n});\nexport function _default(innerType, defaultValue) {\n return new ZodDefault({\n type: \"default\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodPrefault = /*@__PURE__*/ core.$constructor(\"ZodPrefault\", (inst, def) => {\n core.$ZodPrefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.prefaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function prefault(innerType, defaultValue) {\n return new ZodPrefault({\n type: \"prefault\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodNonOptional = /*@__PURE__*/ core.$constructor(\"ZodNonOptional\", (inst, def) => {\n core.$ZodNonOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nonoptionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nonoptional(innerType, params) {\n return new ZodNonOptional({\n type: \"nonoptional\",\n innerType: innerType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSuccess = /*@__PURE__*/ core.$constructor(\"ZodSuccess\", (inst, def) => {\n core.$ZodSuccess.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.successProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function success(innerType) {\n return new ZodSuccess({\n type: \"success\",\n innerType: innerType,\n });\n}\nexport const ZodCatch = /*@__PURE__*/ core.$constructor(\"ZodCatch\", (inst, def) => {\n core.$ZodCatch.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.catchProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeCatch = inst.unwrap;\n});\nfunction _catch(innerType, catchValue) {\n return new ZodCatch({\n type: \"catch\",\n innerType: innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\nexport { _catch as catch };\nexport const ZodNaN = /*@__PURE__*/ core.$constructor(\"ZodNaN\", (inst, def) => {\n core.$ZodNaN.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nanProcessor(inst, ctx, json, params);\n});\nexport function nan(params) {\n return core._nan(ZodNaN, params);\n}\nexport const ZodPipe = /*@__PURE__*/ core.$constructor(\"ZodPipe\", (inst, def) => {\n core.$ZodPipe.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.pipeProcessor(inst, ctx, json, params);\n inst.in = def.in;\n inst.out = def.out;\n});\nexport function pipe(in_, out) {\n return new ZodPipe({\n type: \"pipe\",\n in: in_,\n out: out,\n // ...util.normalizeParams(params),\n });\n}\nexport const ZodCodec = /*@__PURE__*/ core.$constructor(\"ZodCodec\", (inst, def) => {\n ZodPipe.init(inst, def);\n core.$ZodCodec.init(inst, def);\n});\nexport function codec(in_, out, params) {\n return new ZodCodec({\n type: \"pipe\",\n in: in_,\n out: out,\n transform: params.decode,\n reverseTransform: params.encode,\n });\n}\nexport const ZodReadonly = /*@__PURE__*/ core.$constructor(\"ZodReadonly\", (inst, def) => {\n core.$ZodReadonly.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.readonlyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function readonly(innerType) {\n return new ZodReadonly({\n type: \"readonly\",\n innerType: innerType,\n });\n}\nexport const ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"ZodTemplateLiteral\", (inst, def) => {\n core.$ZodTemplateLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.templateLiteralProcessor(inst, ctx, json, params);\n});\nexport function templateLiteral(parts, params) {\n return new ZodTemplateLiteral({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLazy = /*@__PURE__*/ core.$constructor(\"ZodLazy\", (inst, def) => {\n core.$ZodLazy.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.lazyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.getter();\n});\nexport function lazy(getter) {\n return new ZodLazy({\n type: \"lazy\",\n getter: getter,\n });\n}\nexport const ZodPromise = /*@__PURE__*/ core.$constructor(\"ZodPromise\", (inst, def) => {\n core.$ZodPromise.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.promiseProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function promise(innerType) {\n return new ZodPromise({\n type: \"promise\",\n innerType: innerType,\n });\n}\nexport const ZodFunction = /*@__PURE__*/ core.$constructor(\"ZodFunction\", (inst, def) => {\n core.$ZodFunction.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.functionProcessor(inst, ctx, json, params);\n});\nexport function _function(params) {\n return new ZodFunction({\n type: \"function\",\n input: Array.isArray(params?.input) ? tuple(params?.input) : (params?.input ?? array(unknown())),\n output: params?.output ?? unknown(),\n });\n}\nexport { _function as function };\nexport const ZodCustom = /*@__PURE__*/ core.$constructor(\"ZodCustom\", (inst, def) => {\n core.$ZodCustom.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.customProcessor(inst, ctx, json, params);\n});\n// custom checks\nexport function check(fn) {\n const ch = new core.$ZodCheck({\n check: \"custom\",\n // ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\nexport function custom(fn, _params) {\n return core._custom(ZodCustom, fn ?? (() => true), _params);\n}\nexport function refine(fn, _params = {}) {\n return core._refine(ZodCustom, fn, _params);\n}\n// superRefine\nexport function superRefine(fn) {\n return core._superRefine(fn);\n}\n// Re-export describe and meta from core\nexport const describe = core.describe;\nexport const meta = core.meta;\nfunction _instanceof(cls, params = {}) {\n const inst = new ZodCustom({\n type: \"custom\",\n check: \"custom\",\n fn: (data) => data instanceof cls,\n abort: true,\n ...util.normalizeParams(params),\n });\n inst._zod.bag.Class = cls;\n // Override check to emit invalid_type instead of custom\n inst._zod.check = (payload) => {\n if (!(payload.value instanceof cls)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: cls.name,\n input: payload.value,\n inst,\n path: [...(inst._zod.def.path ?? [])],\n });\n }\n };\n return inst;\n}\nexport { _instanceof as instanceof };\n// stringbool\nexport const stringbool = (...args) => core._stringbool({\n Codec: ZodCodec,\n Boolean: ZodBoolean,\n String: ZodString,\n}, ...args);\nexport function json(params) {\n const jsonSchema = lazy(() => {\n return union([string(params), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);\n });\n return jsonSchema;\n}\n// preprocess\n// /** @deprecated Use `z.pipe()` and `z.transform()` instead. */\nexport function preprocess(fn, schema) {\n return pipe(transform(fn), schema);\n}\n", "// Zod 3 compat layer\nimport * as core from \"../core/index.js\";\n/** @deprecated Use the raw string literal codes instead, e.g. \"invalid_type\". */\nexport const ZodIssueCode = {\n invalid_type: \"invalid_type\",\n too_big: \"too_big\",\n too_small: \"too_small\",\n invalid_format: \"invalid_format\",\n not_multiple_of: \"not_multiple_of\",\n unrecognized_keys: \"unrecognized_keys\",\n invalid_union: \"invalid_union\",\n invalid_key: \"invalid_key\",\n invalid_element: \"invalid_element\",\n invalid_value: \"invalid_value\",\n custom: \"custom\",\n};\nexport { $brand, config } from \"../core/index.js\";\n/** @deprecated Use `z.config(params)` instead. */\nexport function setErrorMap(map) {\n core.config({\n customError: map,\n });\n}\n/** @deprecated Use `z.config()` instead. */\nexport function getErrorMap() {\n return core.config().customError;\n}\n/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */\nexport var ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\n", "import { globalRegistry } from \"../core/registries.js\";\nimport * as _checks from \"./checks.js\";\nimport * as _iso from \"./iso.js\";\nimport * as _schemas from \"./schemas.js\";\n// Local z object to avoid circular dependency with ../index.js\nconst z = {\n ..._schemas,\n ..._checks,\n iso: _iso,\n};\n// Keys that are recognized and handled by the conversion logic\nconst RECOGNIZED_KEYS = new Set([\n // Schema identification\n \"$schema\",\n \"$ref\",\n \"$defs\",\n \"definitions\",\n // Core schema keywords\n \"$id\",\n \"id\",\n \"$comment\",\n \"$anchor\",\n \"$vocabulary\",\n \"$dynamicRef\",\n \"$dynamicAnchor\",\n // Type\n \"type\",\n \"enum\",\n \"const\",\n // Composition\n \"anyOf\",\n \"oneOf\",\n \"allOf\",\n \"not\",\n // Object\n \"properties\",\n \"required\",\n \"additionalProperties\",\n \"patternProperties\",\n \"propertyNames\",\n \"minProperties\",\n \"maxProperties\",\n // Array\n \"items\",\n \"prefixItems\",\n \"additionalItems\",\n \"minItems\",\n \"maxItems\",\n \"uniqueItems\",\n \"contains\",\n \"minContains\",\n \"maxContains\",\n // String\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"format\",\n // Number\n \"minimum\",\n \"maximum\",\n \"exclusiveMinimum\",\n \"exclusiveMaximum\",\n \"multipleOf\",\n // Already handled metadata\n \"description\",\n \"default\",\n // Content\n \"contentEncoding\",\n \"contentMediaType\",\n \"contentSchema\",\n // Unsupported (error-throwing)\n \"unevaluatedItems\",\n \"unevaluatedProperties\",\n \"if\",\n \"then\",\n \"else\",\n \"dependentSchemas\",\n \"dependentRequired\",\n // OpenAPI\n \"nullable\",\n \"readOnly\",\n]);\nfunction detectVersion(schema, defaultTarget) {\n const $schema = schema.$schema;\n if ($schema === \"https://json-schema.org/draft/2020-12/schema\") {\n return \"draft-2020-12\";\n }\n if ($schema === \"http://json-schema.org/draft-07/schema#\") {\n return \"draft-7\";\n }\n if ($schema === \"http://json-schema.org/draft-04/schema#\") {\n return \"draft-4\";\n }\n // Use defaultTarget if provided, otherwise default to draft-2020-12\n return defaultTarget ?? \"draft-2020-12\";\n}\nfunction resolveRef(ref, ctx) {\n if (!ref.startsWith(\"#\")) {\n throw new Error(\"External $ref is not supported, only local refs (#/...) are allowed\");\n }\n const path = ref.slice(1).split(\"/\").filter(Boolean);\n // Handle root reference \"#\"\n if (path.length === 0) {\n return ctx.rootSchema;\n }\n const defsKey = ctx.version === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (path[0] === defsKey) {\n const key = path[1];\n if (!key || !ctx.defs[key]) {\n throw new Error(`Reference not found: ${ref}`);\n }\n return ctx.defs[key];\n }\n throw new Error(`Reference not found: ${ref}`);\n}\nfunction convertBaseSchema(schema, ctx) {\n // Handle unsupported features\n if (schema.not !== undefined) {\n // Special case: { not: {} } represents never\n if (typeof schema.not === \"object\" && Object.keys(schema.not).length === 0) {\n return z.never();\n }\n throw new Error(\"not is not supported in Zod (except { not: {} } for never)\");\n }\n if (schema.unevaluatedItems !== undefined) {\n throw new Error(\"unevaluatedItems is not supported\");\n }\n if (schema.unevaluatedProperties !== undefined) {\n throw new Error(\"unevaluatedProperties is not supported\");\n }\n if (schema.if !== undefined || schema.then !== undefined || schema.else !== undefined) {\n throw new Error(\"Conditional schemas (if/then/else) are not supported\");\n }\n if (schema.dependentSchemas !== undefined || schema.dependentRequired !== undefined) {\n throw new Error(\"dependentSchemas and dependentRequired are not supported\");\n }\n // Handle $ref\n if (schema.$ref) {\n const refPath = schema.$ref;\n if (ctx.refs.has(refPath)) {\n return ctx.refs.get(refPath);\n }\n if (ctx.processing.has(refPath)) {\n // Circular reference - use lazy\n return z.lazy(() => {\n if (!ctx.refs.has(refPath)) {\n throw new Error(`Circular reference not resolved: ${refPath}`);\n }\n return ctx.refs.get(refPath);\n });\n }\n ctx.processing.add(refPath);\n const resolved = resolveRef(refPath, ctx);\n const zodSchema = convertSchema(resolved, ctx);\n ctx.refs.set(refPath, zodSchema);\n ctx.processing.delete(refPath);\n return zodSchema;\n }\n // Handle enum\n if (schema.enum !== undefined) {\n const enumValues = schema.enum;\n // Special case: OpenAPI 3.0 null representation { type: \"string\", nullable: true, enum: [null] }\n if (ctx.version === \"openapi-3.0\" &&\n schema.nullable === true &&\n enumValues.length === 1 &&\n enumValues[0] === null) {\n return z.null();\n }\n if (enumValues.length === 0) {\n return z.never();\n }\n if (enumValues.length === 1) {\n return z.literal(enumValues[0]);\n }\n // Check if all values are strings\n if (enumValues.every((v) => typeof v === \"string\")) {\n return z.enum(enumValues);\n }\n // Mixed types - use union of literals\n const literalSchemas = enumValues.map((v) => z.literal(v));\n if (literalSchemas.length < 2) {\n return literalSchemas[0];\n }\n return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);\n }\n // Handle const\n if (schema.const !== undefined) {\n return z.literal(schema.const);\n }\n // Handle type\n const type = schema.type;\n if (Array.isArray(type)) {\n // Expand type array into anyOf union\n const typeSchemas = type.map((t) => {\n const typeSchema = { ...schema, type: t };\n return convertBaseSchema(typeSchema, ctx);\n });\n if (typeSchemas.length === 0) {\n return z.never();\n }\n if (typeSchemas.length === 1) {\n return typeSchemas[0];\n }\n return z.union(typeSchemas);\n }\n if (!type) {\n // No type specified - empty schema (any)\n return z.any();\n }\n let zodSchema;\n switch (type) {\n case \"string\": {\n let stringSchema = z.string();\n // Apply format using .check() with Zod format functions\n if (schema.format) {\n const format = schema.format;\n // Map common formats to Zod check functions\n if (format === \"email\") {\n stringSchema = stringSchema.check(z.email());\n }\n else if (format === \"uri\" || format === \"uri-reference\") {\n stringSchema = stringSchema.check(z.url());\n }\n else if (format === \"uuid\" || format === \"guid\") {\n stringSchema = stringSchema.check(z.uuid());\n }\n else if (format === \"date-time\") {\n stringSchema = stringSchema.check(z.iso.datetime());\n }\n else if (format === \"date\") {\n stringSchema = stringSchema.check(z.iso.date());\n }\n else if (format === \"time\") {\n stringSchema = stringSchema.check(z.iso.time());\n }\n else if (format === \"duration\") {\n stringSchema = stringSchema.check(z.iso.duration());\n }\n else if (format === \"ipv4\") {\n stringSchema = stringSchema.check(z.ipv4());\n }\n else if (format === \"ipv6\") {\n stringSchema = stringSchema.check(z.ipv6());\n }\n else if (format === \"mac\") {\n stringSchema = stringSchema.check(z.mac());\n }\n else if (format === \"cidr\") {\n stringSchema = stringSchema.check(z.cidrv4());\n }\n else if (format === \"cidr-v6\") {\n stringSchema = stringSchema.check(z.cidrv6());\n }\n else if (format === \"base64\") {\n stringSchema = stringSchema.check(z.base64());\n }\n else if (format === \"base64url\") {\n stringSchema = stringSchema.check(z.base64url());\n }\n else if (format === \"e164\") {\n stringSchema = stringSchema.check(z.e164());\n }\n else if (format === \"jwt\") {\n stringSchema = stringSchema.check(z.jwt());\n }\n else if (format === \"emoji\") {\n stringSchema = stringSchema.check(z.emoji());\n }\n else if (format === \"nanoid\") {\n stringSchema = stringSchema.check(z.nanoid());\n }\n else if (format === \"cuid\") {\n stringSchema = stringSchema.check(z.cuid());\n }\n else if (format === \"cuid2\") {\n stringSchema = stringSchema.check(z.cuid2());\n }\n else if (format === \"ulid\") {\n stringSchema = stringSchema.check(z.ulid());\n }\n else if (format === \"xid\") {\n stringSchema = stringSchema.check(z.xid());\n }\n else if (format === \"ksuid\") {\n stringSchema = stringSchema.check(z.ksuid());\n }\n // Note: json-string format is not currently supported by Zod\n // Custom formats are ignored - keep as plain string\n }\n // Apply constraints\n if (typeof schema.minLength === \"number\") {\n stringSchema = stringSchema.min(schema.minLength);\n }\n if (typeof schema.maxLength === \"number\") {\n stringSchema = stringSchema.max(schema.maxLength);\n }\n if (schema.pattern) {\n // JSON Schema patterns are not implicitly anchored (match anywhere in string)\n stringSchema = stringSchema.regex(new RegExp(schema.pattern));\n }\n zodSchema = stringSchema;\n break;\n }\n case \"number\":\n case \"integer\": {\n let numberSchema = type === \"integer\" ? z.number().int() : z.number();\n // Apply constraints\n if (typeof schema.minimum === \"number\") {\n numberSchema = numberSchema.min(schema.minimum);\n }\n if (typeof schema.maximum === \"number\") {\n numberSchema = numberSchema.max(schema.maximum);\n }\n if (typeof schema.exclusiveMinimum === \"number\") {\n numberSchema = numberSchema.gt(schema.exclusiveMinimum);\n }\n else if (schema.exclusiveMinimum === true && typeof schema.minimum === \"number\") {\n numberSchema = numberSchema.gt(schema.minimum);\n }\n if (typeof schema.exclusiveMaximum === \"number\") {\n numberSchema = numberSchema.lt(schema.exclusiveMaximum);\n }\n else if (schema.exclusiveMaximum === true && typeof schema.maximum === \"number\") {\n numberSchema = numberSchema.lt(schema.maximum);\n }\n if (typeof schema.multipleOf === \"number\") {\n numberSchema = numberSchema.multipleOf(schema.multipleOf);\n }\n zodSchema = numberSchema;\n break;\n }\n case \"boolean\": {\n zodSchema = z.boolean();\n break;\n }\n case \"null\": {\n zodSchema = z.null();\n break;\n }\n case \"object\": {\n const shape = {};\n const properties = schema.properties || {};\n const requiredSet = new Set(schema.required || []);\n // Convert properties - mark optional ones\n for (const [key, propSchema] of Object.entries(properties)) {\n const propZodSchema = convertSchema(propSchema, ctx);\n // If not in required array, make it optional\n shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional();\n }\n // Handle propertyNames\n if (schema.propertyNames) {\n const keySchema = convertSchema(schema.propertyNames, ctx);\n const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === \"object\"\n ? convertSchema(schema.additionalProperties, ctx)\n : z.any();\n // Case A: No properties (pure record)\n if (Object.keys(shape).length === 0) {\n zodSchema = z.record(keySchema, valueSchema);\n break;\n }\n // Case B: With properties (intersection of object and looseRecord)\n const objectSchema = z.object(shape).passthrough();\n const recordSchema = z.looseRecord(keySchema, valueSchema);\n zodSchema = z.intersection(objectSchema, recordSchema);\n break;\n }\n // Handle patternProperties\n if (schema.patternProperties) {\n // patternProperties: keys matching pattern must satisfy corresponding schema\n // Use loose records so non-matching keys pass through\n const patternProps = schema.patternProperties;\n const patternKeys = Object.keys(patternProps);\n const looseRecords = [];\n for (const pattern of patternKeys) {\n const patternValue = convertSchema(patternProps[pattern], ctx);\n const keySchema = z.string().regex(new RegExp(pattern));\n looseRecords.push(z.looseRecord(keySchema, patternValue));\n }\n // Build intersection: object schema + all pattern property records\n const schemasToIntersect = [];\n if (Object.keys(shape).length > 0) {\n // Use passthrough so patternProperties can validate additional keys\n schemasToIntersect.push(z.object(shape).passthrough());\n }\n schemasToIntersect.push(...looseRecords);\n if (schemasToIntersect.length === 0) {\n zodSchema = z.object({}).passthrough();\n }\n else if (schemasToIntersect.length === 1) {\n zodSchema = schemasToIntersect[0];\n }\n else {\n // Chain intersections: (A & B) & C & D ...\n let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);\n for (let i = 2; i < schemasToIntersect.length; i++) {\n result = z.intersection(result, schemasToIntersect[i]);\n }\n zodSchema = result;\n }\n break;\n }\n // Handle additionalProperties\n // In JSON Schema, additionalProperties defaults to true (allow any extra properties)\n // In Zod, objects strip unknown keys by default, so we need to handle this explicitly\n const objectSchema = z.object(shape);\n if (schema.additionalProperties === false) {\n // Strict mode - no extra properties allowed\n zodSchema = objectSchema.strict();\n }\n else if (typeof schema.additionalProperties === \"object\") {\n // Extra properties must match the specified schema\n zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));\n }\n else {\n // additionalProperties is true or undefined - allow any extra properties (passthrough)\n zodSchema = objectSchema.passthrough();\n }\n break;\n }\n case \"array\": {\n // TODO: uniqueItems is not supported\n // TODO: contains/minContains/maxContains are not supported\n // Check if this is a tuple (prefixItems or items as array)\n const prefixItems = schema.prefixItems;\n const items = schema.items;\n if (prefixItems && Array.isArray(prefixItems)) {\n // Tuple with prefixItems (draft-2020-12)\n const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));\n const rest = items && typeof items === \"object\" && !Array.isArray(items)\n ? convertSchema(items, ctx)\n : undefined;\n if (rest) {\n zodSchema = z.tuple(tupleItems).rest(rest);\n }\n else {\n zodSchema = z.tuple(tupleItems);\n }\n // Apply minItems/maxItems constraints to tuples\n if (typeof schema.minItems === \"number\") {\n zodSchema = zodSchema.check(z.minLength(schema.minItems));\n }\n if (typeof schema.maxItems === \"number\") {\n zodSchema = zodSchema.check(z.maxLength(schema.maxItems));\n }\n }\n else if (Array.isArray(items)) {\n // Tuple with items array (draft-7)\n const tupleItems = items.map((item) => convertSchema(item, ctx));\n const rest = schema.additionalItems && typeof schema.additionalItems === \"object\"\n ? convertSchema(schema.additionalItems, ctx)\n : undefined; // additionalItems: false means no rest, handled by default tuple behavior\n if (rest) {\n zodSchema = z.tuple(tupleItems).rest(rest);\n }\n else {\n zodSchema = z.tuple(tupleItems);\n }\n // Apply minItems/maxItems constraints to tuples\n if (typeof schema.minItems === \"number\") {\n zodSchema = zodSchema.check(z.minLength(schema.minItems));\n }\n if (typeof schema.maxItems === \"number\") {\n zodSchema = zodSchema.check(z.maxLength(schema.maxItems));\n }\n }\n else if (items !== undefined) {\n // Regular array\n const element = convertSchema(items, ctx);\n let arraySchema = z.array(element);\n // Apply constraints\n if (typeof schema.minItems === \"number\") {\n arraySchema = arraySchema.min(schema.minItems);\n }\n if (typeof schema.maxItems === \"number\") {\n arraySchema = arraySchema.max(schema.maxItems);\n }\n zodSchema = arraySchema;\n }\n else {\n // No items specified - array of any\n zodSchema = z.array(z.any());\n }\n break;\n }\n default:\n throw new Error(`Unsupported type: ${type}`);\n }\n // Apply metadata\n if (schema.description) {\n zodSchema = zodSchema.describe(schema.description);\n }\n if (schema.default !== undefined) {\n zodSchema = zodSchema.default(schema.default);\n }\n return zodSchema;\n}\nfunction convertSchema(schema, ctx) {\n if (typeof schema === \"boolean\") {\n return schema ? z.any() : z.never();\n }\n // Convert base schema first (ignoring composition keywords)\n let baseSchema = convertBaseSchema(schema, ctx);\n const hasExplicitType = schema.type || schema.enum !== undefined || schema.const !== undefined;\n // Process composition keywords LAST (they can appear together)\n // Handle anyOf - wrap base schema with union\n if (schema.anyOf && Array.isArray(schema.anyOf)) {\n const options = schema.anyOf.map((s) => convertSchema(s, ctx));\n const anyOfUnion = z.union(options);\n baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion;\n }\n // Handle oneOf - exclusive union (exactly one must match)\n if (schema.oneOf && Array.isArray(schema.oneOf)) {\n const options = schema.oneOf.map((s) => convertSchema(s, ctx));\n const oneOfUnion = z.xor(options);\n baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion;\n }\n // Handle allOf - wrap base schema with intersection\n if (schema.allOf && Array.isArray(schema.allOf)) {\n if (schema.allOf.length === 0) {\n baseSchema = hasExplicitType ? baseSchema : z.any();\n }\n else {\n let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);\n const startIdx = hasExplicitType ? 0 : 1;\n for (let i = startIdx; i < schema.allOf.length; i++) {\n result = z.intersection(result, convertSchema(schema.allOf[i], ctx));\n }\n baseSchema = result;\n }\n }\n // Handle nullable (OpenAPI 3.0)\n if (schema.nullable === true && ctx.version === \"openapi-3.0\") {\n baseSchema = z.nullable(baseSchema);\n }\n // Handle readOnly\n if (schema.readOnly === true) {\n baseSchema = z.readonly(baseSchema);\n }\n // Collect metadata: core schema keywords and unrecognized keys\n const extraMeta = {};\n // Core schema keywords that should be captured as metadata\n const coreMetadataKeys = [\"$id\", \"id\", \"$comment\", \"$anchor\", \"$vocabulary\", \"$dynamicRef\", \"$dynamicAnchor\"];\n for (const key of coreMetadataKeys) {\n if (key in schema) {\n extraMeta[key] = schema[key];\n }\n }\n // Content keywords - store as metadata\n const contentMetadataKeys = [\"contentEncoding\", \"contentMediaType\", \"contentSchema\"];\n for (const key of contentMetadataKeys) {\n if (key in schema) {\n extraMeta[key] = schema[key];\n }\n }\n // Unrecognized keys (custom metadata)\n for (const key of Object.keys(schema)) {\n if (!RECOGNIZED_KEYS.has(key)) {\n extraMeta[key] = schema[key];\n }\n }\n if (Object.keys(extraMeta).length > 0) {\n ctx.registry.add(baseSchema, extraMeta);\n }\n return baseSchema;\n}\n/**\n * Converts a JSON Schema to a Zod schema. This function should be considered semi-experimental. It's behavior is liable to change. */\nexport function fromJSONSchema(schema, params) {\n // Handle boolean schemas\n if (typeof schema === \"boolean\") {\n return schema ? z.any() : z.never();\n }\n const version = detectVersion(schema, params?.defaultTarget);\n const defs = (schema.$defs || schema.definitions || {});\n const ctx = {\n version,\n defs,\n refs: new Map(),\n processing: new Set(),\n rootSchema: schema,\n registry: params?.registry ?? globalRegistry,\n };\n return convertSchema(schema, ctx);\n}\n", "import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\nexport function string(params) {\n return core._coercedString(schemas.ZodString, params);\n}\nexport function number(params) {\n return core._coercedNumber(schemas.ZodNumber, params);\n}\nexport function boolean(params) {\n return core._coercedBoolean(schemas.ZodBoolean, params);\n}\nexport function bigint(params) {\n return core._coercedBigint(schemas.ZodBigInt, params);\n}\nexport function date(params) {\n return core._coercedDate(schemas.ZodDate, params);\n}\n", "export * as core from \"../core/index.js\";\nexport * from \"./schemas.js\";\nexport * from \"./checks.js\";\nexport * from \"./errors.js\";\nexport * from \"./parse.js\";\nexport * from \"./compat.js\";\n// zod-specified\nimport { config } from \"../core/index.js\";\nimport en from \"../locales/en.js\";\nconfig(en());\nexport { globalRegistry, registry, config, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, } from \"../core/index.js\";\nexport { toJSONSchema } from \"../core/json-schema-processors.js\";\nexport { fromJSONSchema } from \"./from-json-schema.js\";\nexport * as locales from \"../locales/index.js\";\n// iso\n// must be exported from top-level\n// https://github.com/colinhacks/zod/issues/4491\nexport { ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration } from \"./iso.js\";\nexport * as iso from \"./iso.js\";\nexport * as coerce from \"./coerce.js\";\n", "import * as z from \"./v4/classic/external.js\";\nexport * from \"./v4/classic/external.js\";\nexport { z };\nexport default z;\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport { generateSignedUrlsFromS3Urls } from '@/src/lib/s3-client'\nimport { getComplaints as getComplaintsFromDb, resolveComplaint as resolveComplaintInDb } from '@/src/dbService'\nimport type { ComplaintWithUser } from '@packages/shared'\n\nexport const complaintRouter = router({\n getAll: protectedProcedure\n .input(z.object({\n cursor: z.number().optional(),\n limit: z.number().default(20),\n }))\n .query(async ({ input }): Promise<{\n complaints: Array<{\n id: number;\n text: string;\n userId: number;\n userName: string | null;\n userMobile: string | null;\n orderId: number | null;\n status: string;\n createdAt: Date;\n images: string[];\n }>;\n nextCursor?: number;\n }> => {\n const { cursor, limit } = input;\n\n // Using dbService helper (new implementation)\n const { complaints: complaintsData, hasMore } = await getComplaintsFromDb(cursor, limit);\n\n /*\n // Old implementation - direct DB query:\n const { cursor, limit } = input;\n\n let whereCondition = cursor \n ? lt(complaints.id, cursor) \n : undefined;\n\n const complaintsData = await db\n .select({\n id: complaints.id,\n complaintBody: complaints.complaintBody,\n userId: complaints.userId,\n orderId: complaints.orderId,\n isResolved: complaints.isResolved,\n createdAt: complaints.createdAt,\n userName: users.name,\n userMobile: users.mobile,\n images: complaints.images,\n })\n .from(complaints)\n .leftJoin(users, eq(complaints.userId, users.id))\n .where(whereCondition)\n .orderBy(desc(complaints.id))\n .limit(limit + 1);\n\n const hasMore = complaintsData.length > limit;\n const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData;\n */\n\n const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData;\n\n const complaintsWithSignedImages = await Promise.all(\n complaintsToReturn.map(async (c: ComplaintWithUser) => {\n const signedImages = c.images\n ? await generateSignedUrlsFromS3Urls(c.images as string[])\n : [];\n\n return {\n id: c.id,\n text: c.complaintBody,\n userId: c.userId,\n userName: c.userName,\n userMobile: c.userMobile,\n orderId: c.orderId,\n status: c.isResolved ? 'resolved' : 'pending',\n createdAt: c.createdAt,\n images: signedImages,\n };\n })\n );\n\n return {\n complaints: complaintsWithSignedImages,\n nextCursor: hasMore\n ? complaintsToReturn[complaintsToReturn.length - 1].id\n : undefined,\n };\n }),\n\n resolve: protectedProcedure\n .input(z.object({ id: z.string(), response: z.string().optional() }))\n .mutation(async ({ input }): Promise<{ message: string }> => {\n // Using dbService helper (new implementation)\n await resolveComplaintInDb(parseInt(input.id), input.response);\n\n /*\n // Old implementation - direct DB query:\n await db\n .update(complaints)\n .set({ isResolved: true, response: input.response })\n .where(eq(complaints.id, parseInt(input.id)));\n */\n\n return { message: 'Complaint resolved successfully' };\n }),\n});\n", "!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t) => {\n const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableUsers, applicableProducts, maxValue, isApplyForAll, validTill, maxLimitForUser, exclusiveApply } = input;\n\n // Validation: ensure at least one discount type is provided\n if ((!discountPercent && !flatDiscount) || (discountPercent && flatDiscount)) {\n throw new Error(\"Either discountPercent or flatDiscount must be provided (but not both)\");\n }\n\n // If user-based, applicableUsers is required (unless it's apply for all)\n if (isUserBased && (!applicableUsers || applicableUsers.length === 0) && !isApplyForAll) {\n throw new Error(\"applicableUsers is required for user-based coupons (or set isApplyForAll to true)\");\n }\n\n // Cannot be both user-based and apply for all\n if (isUserBased && isApplyForAll) {\n throw new Error(\"Cannot be both user-based and apply for all users\");\n }\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n\n // Generate coupon code if not provided\n let finalCouponCode = couponCode;\n if (!finalCouponCode) {\n const timestamp = Date.now().toString().slice(-6);\n const random = Math.random().toString(36).substring(2, 8).toUpperCase();\n finalCouponCode = `MF${timestamp}${random}`;\n }\n\n // Using dbService helper (new implementation)\n const codeExists = await checkCouponExists(finalCouponCode);\n if (codeExists) {\n throw new Error(\"Coupon code already exists\");\n }\n\n // If applicableUsers is provided, verify users exist\n if (applicableUsers && applicableUsers.length > 0) {\n const usersExist = await checkUsersExist(applicableUsers);\n if (!usersExist) {\n throw new Error(\"Some applicable users not found\");\n }\n }\n\n const coupon = await createCouponWithRelations(\n {\n couponCode: finalCouponCode,\n isUserBased: isUserBased || false,\n discountPercent: discountPercent?.toString(),\n flatDiscount: flatDiscount?.toString(),\n minOrder: minOrder?.toString(),\n productIds: productIds || null,\n createdBy: staffUserId,\n maxValue: maxValue?.toString(),\n isApplyForAll: isApplyForAll || false,\n validTill: validTill ? dayjs(validTill).toDate() : undefined,\n maxLimitForUser,\n exclusiveApply: exclusiveApply || false,\n },\n applicableUsers,\n applicableProducts\n );\n\n /*\n // Old implementation - direct DB query with transaction:\n const result = await db.insert(coupons).values({\n couponCode: finalCouponCode,\n isUserBased: isUserBased || false,\n discountPercent: discountPercent?.toString(),\n flatDiscount: flatDiscount?.toString(),\n minOrder: minOrder?.toString(),\n productIds: productIds || null,\n createdBy: staffUserId,\n maxValue: maxValue?.toString(),\n isApplyForAll: isApplyForAll || false,\n validTill: validTill ? dayjs(validTill).toDate() : undefined,\n maxLimitForUser,\n exclusiveApply: exclusiveApply || false,\n }).returning();\n\n const coupon = result[0];\n\n // Insert applicable users\n if (applicableUsers && applicableUsers.length > 0) {\n await db.insert(couponApplicableUsers).values(\n applicableUsers.map(userId => ({\n couponId: coupon.id,\n userId,\n }))\n );\n }\n\n // Insert applicable products\n if (applicableProducts && applicableProducts.length > 0) {\n await db.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: coupon.id,\n productId,\n }))\n );\n }\n */\n\n return coupon;\n }),\n\n getAll: protectedProcedure\n .input(z.object({\n cursor: z.number().optional(),\n limit: z.number().default(50),\n search: z.string().optional(),\n }))\n .query(async ({ input }): Promise<{ coupons: any[]; nextCursor?: number }> => {\n const { cursor, limit, search } = input;\n \n const { coupons: couponsList, hasMore } = await getAllCouponsFromDb(cursor, limit, search);\n\n const nextCursor = hasMore ? couponsList[couponsList.length - 1].id : undefined;\n \n return { coupons: couponsList, nextCursor };\n }),\n\n getById: protectedProcedure\n .input(z.object({ id: z.number() }))\n .query(async ({ input }): Promise => {\n const couponId = input.id;\n\n const result = await getCouponByIdFromDb(couponId);\n\n if (!result) {\n throw new Error(\"Coupon not found\");\n }\n\n return {\n ...result,\n productIds: (result.productIds as number[]) || undefined,\n applicableUsers: result.applicableUsers.map((au: any) => au.user),\n applicableProducts: result.applicableProducts.map((ap: any) => ap.product),\n };\n }),\n\n update: protectedProcedure\n .input(z.object({\n id: z.number(),\n updates: createCouponBodySchema.extend({\n isInvalidated: z.boolean().optional(),\n }),\n }))\n .mutation(async ({ input }): Promise => {\n const { id, updates } = input;\n\n // Validation: ensure discount types are valid\n if (updates.discountPercent !== undefined && updates.flatDiscount !== undefined) {\n if (updates.discountPercent && updates.flatDiscount) {\n throw new Error(\"Cannot have both discountPercent and flatDiscount\");\n }\n }\n\n // Prepare update data\n const updateData: any = {};\n if (updates.couponCode !== undefined) updateData.couponCode = updates.couponCode;\n if (updates.isUserBased !== undefined) updateData.isUserBased = updates.isUserBased;\n if (updates.discountPercent !== undefined) updateData.discountPercent = updates.discountPercent?.toString();\n if (updates.flatDiscount !== undefined) updateData.flatDiscount = updates.flatDiscount?.toString();\n if (updates.minOrder !== undefined) updateData.minOrder = updates.minOrder?.toString();\n if (updates.maxValue !== undefined) updateData.maxValue = updates.maxValue?.toString();\n if (updates.isApplyForAll !== undefined) updateData.isApplyForAll = updates.isApplyForAll;\n if (updates.validTill !== undefined) updateData.validTill = updates.validTill ? dayjs(updates.validTill).toDate() : null;\n if (updates.maxLimitForUser !== undefined) updateData.maxLimitForUser = updates.maxLimitForUser;\n if (updates.exclusiveApply !== undefined) updateData.exclusiveApply = updates.exclusiveApply;\n if (updates.isInvalidated !== undefined) updateData.isInvalidated = updates.isInvalidated;\n if (updates.productIds !== undefined) updateData.productIds = updates.productIds;\n\n // Using dbService helper (new implementation)\n const coupon = await updateCouponWithRelations(\n id,\n updateData,\n updates.applicableUsers,\n updates.applicableProducts\n );\n\n /*\n // Old implementation - direct DB query:\n const result = await db.update(coupons)\n .set(updateData)\n .where(eq(coupons.id, id))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Coupon not found\");\n }\n\n // Update applicable users: delete existing and insert new\n if (updates.applicableUsers !== undefined) {\n await db.delete(couponApplicableUsers).where(eq(couponApplicableUsers.couponId, id));\n if (updates.applicableUsers.length > 0) {\n await db.insert(couponApplicableUsers).values(\n updates.applicableUsers.map(userId => ({\n couponId: id,\n userId,\n }))\n );\n }\n }\n\n // Update applicable products: delete existing and insert new\n if (updates.applicableProducts !== undefined) {\n await db.delete(couponApplicableProducts).where(eq(couponApplicableProducts.couponId, id));\n if (updates.applicableProducts.length > 0) {\n await db.insert(couponApplicableProducts).values(\n updates.applicableProducts.map(productId => ({\n couponId: id,\n productId,\n }))\n );\n }\n }\n */\n\n return coupon;\n }),\n\n delete: protectedProcedure\n .input(z.object({ id: z.number() }))\n .mutation(async ({ input }): Promise<{ message: string }> => {\n const { id } = input;\n\n await invalidateCouponInDb(id);\n\n return { message: \"Coupon invalidated successfully\" };\n }),\n\n validate: protectedProcedure\n .input(validateCouponBodySchema)\n .query(async ({ input }): Promise => {\n const { code, userId, orderAmount } = input;\n\n if (!code || typeof code !== 'string') {\n return { valid: false, message: \"Invalid coupon code\" };\n }\n\n const result = await validateCouponInDb(code, userId, orderAmount);\n\n return result;\n }),\n\n generateCancellationCoupon: protectedProcedure\n .input(\n z.object({\n orderId: z.number(),\n })\n )\n .mutation(async ({ input, ctx }): Promise => {\n const { orderId } = input;\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n\n // Using dbService helper (new implementation)\n const order = await getOrderWithUser(orderId);\n\n if (!order) {\n throw new Error(\"Order not found\");\n }\n\n if (!order.user) {\n throw new Error(\"User not found for this order\");\n }\n\n // Generate coupon code: first 3 letters of user name or mobile + orderId\n const userNamePrefix = (order.user.name || order.user.mobile || 'USR').substring(0, 3).toUpperCase();\n const couponCode = `${userNamePrefix}${orderId}`;\n\n // Check if coupon code already exists\n const codeExists = await checkCouponExists(couponCode);\n if (codeExists) {\n throw new Error(\"Coupon code already exists\");\n }\n\n // Get order total amount\n const orderAmount = parseFloat(order.totalAmount);\n\n const coupon = await generateCancellationCoupon(\n orderId,\n staffUserId,\n order.userId,\n orderAmount,\n couponCode\n );\n\n /*\n // Old implementation - direct DB query with transaction:\n const coupon = await db.transaction(async (tx) => {\n // Calculate expiry date (30 days from now)\n const expiryDate = new Date();\n expiryDate.setDate(expiryDate.getDate() + 30);\n\n // Create the coupon\n const result = await tx.insert(coupons).values({\n couponCode,\n isUserBased: true,\n flatDiscount: orderAmount.toString(),\n minOrder: orderAmount.toString(),\n maxValue: orderAmount.toString(),\n validTill: expiryDate,\n maxLimitForUser: 1,\n createdBy: staffUserId,\n isApplyForAll: false,\n }).returning();\n\n const coupon = result[0];\n\n // Insert applicable users\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId: order.userId,\n });\n\n // Update order_status with refund coupon ID\n await tx.update(orderStatus)\n .set({ refundCouponId: coupon.id })\n .where(eq(orderStatus.orderId, orderId));\n\n return coupon;\n });\n */\n\n return coupon;\n }),\n\n getReservedCoupons: protectedProcedure\n .input(z.object({\n cursor: z.number().optional(),\n limit: z.number().default(50),\n search: z.string().optional(),\n }))\n .query(async ({ input }): Promise<{ coupons: any[]; nextCursor?: number }> => {\n const { cursor, limit, search } = input;\n\n const { coupons: result, hasMore } = await getReservedCouponsFromDb(cursor, limit, search);\n\n const nextCursor = hasMore ? result[result.length - 1].id : undefined;\n\n return {\n coupons: result,\n nextCursor,\n };\n }),\n\n createReservedCoupon: protectedProcedure\n .input(createCouponBodySchema)\n .mutation(async ({ input, ctx }): Promise => {\n const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableProducts, maxValue, validTill, maxLimitForUser, exclusiveApply } = input;\n\n // Validation: ensure at least one discount type is provided\n if ((!discountPercent && !flatDiscount) || (discountPercent && flatDiscount)) {\n throw new Error(\"Either discountPercent or flatDiscount must be provided (but not both)\");\n }\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n\n // Generate secret code if not provided\n let secretCode = couponCode || `SECRET${Date.now().toString().slice(-6)}${Math.random().toString(36).substring(2, 8).toUpperCase()}`;\n\n // Using dbService helper (new implementation)\n const codeExists = await checkReservedCouponExists(secretCode);\n if (codeExists) {\n throw new Error(\"Secret code already exists\");\n }\n\n const coupon = await createReservedCouponWithProducts(\n {\n secretCode,\n couponCode: couponCode || `RESERVED${Date.now().toString().slice(-6)}`,\n discountPercent: discountPercent?.toString(),\n flatDiscount: flatDiscount?.toString(),\n minOrder: minOrder?.toString(),\n productIds,\n maxValue: maxValue?.toString(),\n validTill: validTill ? dayjs(validTill).toDate() : undefined,\n maxLimitForUser,\n exclusiveApply: exclusiveApply || false,\n createdBy: staffUserId,\n },\n applicableProducts\n );\n\n /*\n // Old implementation - direct DB query:\n const result = await db.insert(reservedCoupons).values({\n secretCode,\n couponCode: couponCode || RESERVED${Date.now().toString().slice(-6)},\n discountPercent: discountPercent?.toString(),\n flatDiscount: flatDiscount?.toString(),\n minOrder: minOrder?.toString(),\n productIds,\n maxValue: maxValue?.toString(),\n validTill: validTill ? dayjs(validTill).toDate() : undefined,\n maxLimitForUser,\n exclusiveApply: exclusiveApply || false,\n createdBy: staffUserId,\n }).returning();\n\n const coupon = result[0];\n\n // Insert applicable products if provided\n if (applicableProducts && applicableProducts.length > 0) {\n await db.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: coupon.id,\n productId,\n }))\n );\n }\n */\n\n return coupon;\n }),\n\n getUsersMiniInfo: protectedProcedure\n .input(z.object({\n search: z.string().optional(),\n limit: z.number().min(1).max(50).default(20),\n offset: z.number().min(0).default(0),\n }))\n .query(async ({ input }): Promise<{ users: UserMiniInfo[] }> => {\n const { search, limit, offset } = input;\n\n const result = await getUsersForCouponFromDb(search, limit, offset);\n\n return result;\n }),\n\n createCoupon: protectedProcedure\n .input(z.object({\n mobile: z.string().min(1, 'Mobile number is required'),\n }))\n .mutation(async ({ input, ctx }): Promise<{ success: boolean; coupon: any }> => {\n const { mobile } = input;\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n\n // Clean mobile number (remove non-digits)\n const cleanMobile = mobile.replace(/\\D/g, '');\n\n // Validate: exactly 10 digits\n if (cleanMobile.length !== 10) {\n throw new Error(\"Mobile number must be exactly 10 digits\");\n }\n\n // Generate unique coupon code\n const timestamp = Date.now().toString().slice(-6);\n const random = Math.random().toString(36).substring(2, 6).toUpperCase();\n const couponCode = `MF${cleanMobile.slice(-4)}${timestamp}${random}`;\n\n // Using dbService helper (new implementation)\n const codeExists = await checkCouponExists(couponCode);\n if (codeExists) {\n throw new Error(\"Generated coupon code already exists - please try again\");\n }\n\n const { coupon, user } = await createCouponForUser(cleanMobile, couponCode, staffUserId);\n\n /*\n // Old implementation - direct DB query with transaction:\n // Check if user exists, create if not\n let user = await db.query.users.findFirst({\n where: eq(users.mobile, cleanMobile),\n });\n\n if (!user) {\n const [newUser] = await db.insert(users).values({\n name: null,\n email: null,\n mobile: cleanMobile,\n }).returning();\n user = newUser;\n }\n\n // Create the coupon\n const [coupon] = await db.insert(coupons).values({\n couponCode,\n isUserBased: true,\n discountPercent: \"20\",\n minOrder: \"1000\",\n maxValue: \"500\",\n maxLimitForUser: 1,\n isApplyForAll: false,\n exclusiveApply: false,\n createdBy: staffUserId,\n validTill: dayjs().add(90, 'days').toDate(),\n }).returning();\n\n // Associate coupon with user\n await db.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId: user.id,\n });\n */\n\n return {\n success: true,\n coupon: {\n id: coupon.id,\n couponCode: coupon.couponCode,\n userId: user.id,\n userMobile: user.mobile,\n discountPercent: 20,\n minOrder: 1000,\n maxValue: 500,\n maxLimitForUser: 1,\n },\n };\n }),\n});\n", "export const fetch = (...args) => globalThis.fetch(...args);\nexport const Headers = globalThis.Headers;\nexport const Request = globalThis.Request;\nexport const Response = globalThis.Response;\nexport const AbortController = globalThis.AbortController;\nexport const FetchError = Error;\nexport const AbortError = Error;\nconst redirectStatus = new Set([\n\t301,\n\t302,\n\t303,\n\t307,\n\t308\n]);\nexport const isRedirect = (code) => redirectStatus.has(code);\nfetch.Promise = globalThis.Promise;\nfetch.isRedirect = isRedirect;\nexport default fetch;\n", "import * as esm from 'node-fetch';\nmodule.exports = Object.entries(esm)\n\t\t\t.filter(([k,]) => k !== 'default')\n\t\t\t.reduce((cjs, [k, value]) =>\n\t\t\t\tObject.defineProperty(cjs, k, { value, enumerable: true }),\n\t\t\t\t\"default\" in esm ? esm.default : {}\n\t\t\t);", "import libDefault from 'node:assert';\nmodule.exports = libDefault;", "import libDefault from 'node:zlib';\nmodule.exports = libDefault;", "function limiter (count) {\n var outstanding = 0\n var jobs = []\n\n function remove () {\n outstanding--\n\n if (outstanding < count) {\n dequeue()\n }\n }\n\n function dequeue () {\n var job = jobs.shift()\n semaphore.queue = jobs.length\n\n if (job) {\n run(job.fn).then(job.resolve).catch(job.reject)\n }\n }\n\n function queue (fn) {\n return new Promise(function (resolve, reject) {\n jobs.push({fn: fn, resolve: resolve, reject: reject})\n semaphore.queue = jobs.length\n })\n }\n\n function run (fn) {\n outstanding++\n try {\n return Promise.resolve(fn()).then(function (result) {\n remove()\n return result\n }, function (error) {\n remove()\n throw error\n })\n } catch (err) {\n remove()\n return Promise.reject(err)\n }\n }\n\n var semaphore = function (fn) {\n if (outstanding >= count) {\n return queue(fn)\n } else {\n return run(fn)\n }\n }\n\n return semaphore\n}\n\nfunction map (items, mapper) {\n var failed = false\n\n var limit = this\n\n return Promise.all(items.map(function () {\n var args = arguments\n return limit(function () {\n if (!failed) {\n return mapper.apply(undefined, args).catch(function (e) {\n failed = true\n throw e\n })\n }\n })\n }))\n}\n\nfunction addExtras (fn) {\n fn.queue = 0\n fn.map = map\n return fn\n}\n\nmodule.exports = function (count) {\n if (count) {\n return addExtras(limiter(count))\n } else {\n return addExtras(function (fn) {\n return fn()\n })\n }\n}\n", "'use strict';\n\nfunction assign(obj, props) {\n for (const key in props) {\n Object.defineProperty(obj, key, {\n value: props[key],\n enumerable: true,\n configurable: true,\n });\n }\n\n return obj;\n}\n\nfunction createError(err, code, props) {\n if (!err || typeof err === 'string') {\n throw new TypeError('Please pass an Error to err-code');\n }\n\n if (!props) {\n props = {};\n }\n\n if (typeof code === 'object') {\n props = code;\n code = undefined;\n }\n\n if (code != null) {\n props.code = code;\n }\n\n try {\n return assign(err, props);\n } catch (_) {\n props.message = err.message;\n props.stack = err.stack;\n\n const ErrClass = function () {};\n\n ErrClass.prototype = Object.create(Object.getPrototypeOf(err));\n\n return assign(new ErrClass(), props);\n }\n}\n\nmodule.exports = createError;\n", "function RetryOperation(timeouts, options) {\n // Compatibility for the old (timeouts, retryForever) signature\n if (typeof options === 'boolean') {\n options = { forever: options };\n }\n\n this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));\n this._timeouts = timeouts;\n this._options = options || {};\n this._maxRetryTime = options && options.maxRetryTime || Infinity;\n this._fn = null;\n this._errors = [];\n this._attempts = 1;\n this._operationTimeout = null;\n this._operationTimeoutCb = null;\n this._timeout = null;\n this._operationStart = null;\n\n if (this._options.forever) {\n this._cachedTimeouts = this._timeouts.slice(0);\n }\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.reset = function() {\n this._attempts = 1;\n this._timeouts = this._originalTimeouts;\n}\n\nRetryOperation.prototype.stop = function() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n this._timeouts = [];\n this._cachedTimeouts = null;\n};\n\nRetryOperation.prototype.retry = function(err) {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n if (!err) {\n return false;\n }\n var currentTime = new Date().getTime();\n if (err && currentTime - this._operationStart >= this._maxRetryTime) {\n this._errors.unshift(new Error('RetryOperation timeout occurred'));\n return false;\n }\n\n this._errors.push(err);\n\n var timeout = this._timeouts.shift();\n if (timeout === undefined) {\n if (this._cachedTimeouts) {\n // retry forever, only keep last error\n this._errors.splice(this._errors.length - 1, this._errors.length);\n this._timeouts = this._cachedTimeouts.slice(0);\n timeout = this._timeouts.shift();\n } else {\n return false;\n }\n }\n\n var self = this;\n var timer = setTimeout(function() {\n self._attempts++;\n\n if (self._operationTimeoutCb) {\n self._timeout = setTimeout(function() {\n self._operationTimeoutCb(self._attempts);\n }, self._operationTimeout);\n\n if (self._options.unref) {\n self._timeout.unref();\n }\n }\n\n self._fn(self._attempts);\n }, timeout);\n\n if (this._options.unref) {\n timer.unref();\n }\n\n return true;\n};\n\nRetryOperation.prototype.attempt = function(fn, timeoutOps) {\n this._fn = fn;\n\n if (timeoutOps) {\n if (timeoutOps.timeout) {\n this._operationTimeout = timeoutOps.timeout;\n }\n if (timeoutOps.cb) {\n this._operationTimeoutCb = timeoutOps.cb;\n }\n }\n\n var self = this;\n if (this._operationTimeoutCb) {\n this._timeout = setTimeout(function() {\n self._operationTimeoutCb();\n }, self._operationTimeout);\n }\n\n this._operationStart = new Date().getTime();\n\n this._fn(this._attempts);\n};\n\nRetryOperation.prototype.try = function(fn) {\n console.log('Using RetryOperation.try() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = function(fn) {\n console.log('Using RetryOperation.start() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = RetryOperation.prototype.try;\n\nRetryOperation.prototype.errors = function() {\n return this._errors;\n};\n\nRetryOperation.prototype.attempts = function() {\n return this._attempts;\n};\n\nRetryOperation.prototype.mainError = function() {\n if (this._errors.length === 0) {\n return null;\n }\n\n var counts = {};\n var mainError = null;\n var mainErrorCount = 0;\n\n for (var i = 0; i < this._errors.length; i++) {\n var error = this._errors[i];\n var message = error.message;\n var count = (counts[message] || 0) + 1;\n\n counts[message] = count;\n\n if (count >= mainErrorCount) {\n mainError = error;\n mainErrorCount = count;\n }\n }\n\n return mainError;\n};\n", "var RetryOperation = require('./retry_operation');\n\nexports.operation = function(options) {\n var timeouts = exports.timeouts(options);\n return new RetryOperation(timeouts, {\n forever: options && options.forever,\n unref: options && options.unref,\n maxRetryTime: options && options.maxRetryTime\n });\n};\n\nexports.timeouts = function(options) {\n if (options instanceof Array) {\n return [].concat(options);\n }\n\n var opts = {\n retries: 10,\n factor: 2,\n minTimeout: 1 * 1000,\n maxTimeout: Infinity,\n randomize: false\n };\n for (var key in options) {\n opts[key] = options[key];\n }\n\n if (opts.minTimeout > opts.maxTimeout) {\n throw new Error('minTimeout is greater than maxTimeout');\n }\n\n var timeouts = [];\n for (var i = 0; i < opts.retries; i++) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n if (options && options.forever && !timeouts.length) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n // sort the array numerically ascending\n timeouts.sort(function(a,b) {\n return a - b;\n });\n\n return timeouts;\n};\n\nexports.createTimeout = function(attempt, opts) {\n var random = (opts.randomize)\n ? (Math.random() + 1)\n : 1;\n\n var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));\n timeout = Math.min(timeout, opts.maxTimeout);\n\n return timeout;\n};\n\nexports.wrap = function(obj, options, methods) {\n if (options instanceof Array) {\n methods = options;\n options = null;\n }\n\n if (!methods) {\n methods = [];\n for (var key in obj) {\n if (typeof obj[key] === 'function') {\n methods.push(key);\n }\n }\n }\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n var original = obj[method];\n\n obj[method] = function retryWrapper(original) {\n var op = exports.operation(options);\n var args = Array.prototype.slice.call(arguments, 1);\n var callback = args.pop();\n\n args.push(function(err) {\n if (op.retry(err)) {\n return;\n }\n if (err) {\n arguments[0] = op.mainError();\n }\n callback.apply(this, arguments);\n });\n\n op.attempt(function() {\n original.apply(obj, args);\n });\n }.bind(obj, original);\n obj[method].options = options;\n }\n};\n", "module.exports = require('./lib/retry');", "'use strict';\n\nvar errcode = require('err-code');\nvar retry = require('retry');\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n\nfunction isRetryError(err) {\n return err && err.code === 'EPROMISERETRY' && hasOwn.call(err, 'retried');\n}\n\nfunction promiseRetry(fn, options) {\n var temp;\n var operation;\n\n if (typeof fn === 'object' && typeof options === 'function') {\n // Swap options and fn when using alternate signature (options, fn)\n temp = options;\n options = fn;\n fn = temp;\n }\n\n operation = retry.operation(options);\n\n return new Promise(function (resolve, reject) {\n operation.attempt(function (number) {\n Promise.resolve()\n .then(function () {\n return fn(function (err) {\n if (isRetryError(err)) {\n err = err.retried;\n }\n\n throw errcode(new Error('Retrying'), 'EPROMISERETRY', { retried: err });\n }, number);\n })\n .then(resolve, function (err) {\n if (isRetryError(err)) {\n err = err.retried;\n\n if (operation.retry(err || new Error())) {\n return;\n }\n }\n\n reject(err);\n });\n });\n });\n}\n\nmodule.exports = promiseRetry;\n", null, "{\n \"name\": \"expo-server-sdk\",\n \"version\": \"4.0.0\",\n \"description\": \"Server-side library for working with Expo using Node.js\",\n \"main\": \"build/ExpoClient.js\",\n \"types\": \"build/ExpoClient.d.ts\",\n \"files\": [\n \"build\"\n ],\n \"engines\": {\n \"node\": \">=20\"\n },\n \"scripts\": {\n \"build\": \"yarn prepack\",\n \"lint\": \"eslint\",\n \"prepack\": \"tsc --project tsconfig.build.json\",\n \"test\": \"jest\",\n \"tsc\": \"tsc\",\n \"watch\": \"tsc --watch\"\n },\n \"jest\": {\n \"coverageDirectory\": \"/../coverage\",\n \"coverageThreshold\": {\n \"global\": {\n \"branches\": 100,\n \"functions\": 100,\n \"lines\": 100,\n \"statements\": 0\n }\n },\n \"preset\": \"ts-jest\",\n \"rootDir\": \"src\",\n \"testEnvironment\": \"node\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/expo/expo-server-sdk-node.git\"\n },\n \"keywords\": [\n \"expo\",\n \"push-notifications\"\n ],\n \"author\": \"support@expo.dev\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/expo/expo-server-sdk-node/issues\"\n },\n \"homepage\": \"https://github.com/expo/expo-server-sdk-node#readme\",\n \"dependencies\": {\n \"node-fetch\": \"^2.6.0\",\n \"promise-limit\": \"^2.7.0\",\n \"promise-retry\": \"^2.0.1\"\n },\n \"devDependencies\": {\n \"@tsconfig/node20\": \"20.1.6\",\n \"@tsconfig/strictest\": \"2.0.5\",\n \"@types/node\": \"22.17.2\",\n \"@types/node-fetch\": \"2.6.12\",\n \"@types/promise-retry\": \"1.1.6\",\n \"eslint\": \"9.33.0\",\n \"eslint-config-universe\": \"15.0.3\",\n \"jest\": \"29.7.0\",\n \"jiti\": \"2.4.2\",\n \"msw\": \"2.10.5\",\n \"prettier\": \"3.6.2\",\n \"ts-jest\": \"29.4.1\",\n \"typescript\": \"5.9.2\"\n },\n \"packageManager\": \"yarn@4.9.2\"\n}\n", null, "/**\n * This file contains constants that are used throughout the application\n * to avoid hardcoding strings in multiple places\n */\n\n// User role and designation constants\nexport const READABLE_ORDER_ID_KEY = 'readableOrderId';\n\n// Queue constants\nexport const NOTIFS_QUEUE = 'notifications';\nexport const OTP_COMMENT_NAME='otp-comment'\n\n// Notification message constants\nexport const ORDER_PLACED_MESSAGE = 'Your order has been placed successfully!';\nexport const PAYMENT_FAILED_MESSAGE = 'Payment failed. Please try again.';\nexport const ORDER_PACKAGED_MESSAGE = 'Your order has been packaged and is ready for delivery.';\nexport const ORDER_OUT_FOR_DELIVERY_MESSAGE = 'Your order is out for delivery.';\nexport const ORDER_DELIVERED_MESSAGE = 'Your order has been delivered.';\nexport const ORDER_CANCELLED_MESSAGE = 'Your order has been cancelled.';\nexport const REFUND_INITIATED_MESSAGE = 'Refund has been initiated for your order.';\nexport const WELCOME_MESSAGE = 'Welcome to Farm2Door! Thank you for joining us.';\n\nexport const REFUND_STATUS = {\n PENDING: 'none',\n NOT_APPLICABLE: 'na',\n PROCESSING: 'initiated',\n SUCCESS: 'success',\n};", "// import { Queue, Worker } from 'bullmq';\nimport { Expo } from 'expo-server-sdk';\nimport { redisUrl } from '@/src/lib/env-exporter'\n// import { db } from '@/src/db/db_index'\nimport { generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport {\n NOTIFS_QUEUE,\n ORDER_PLACED_MESSAGE,\n PAYMENT_FAILED_MESSAGE,\n ORDER_PACKAGED_MESSAGE,\n ORDER_OUT_FOR_DELIVERY_MESSAGE,\n ORDER_DELIVERED_MESSAGE,\n ORDER_CANCELLED_MESSAGE,\n REFUND_INITIATED_MESSAGE\n} from '@/src/lib/const-strings';\n\n\nexport const notificationQueue:any = {};\n\n// export const notificationQueue = new Queue(NOTIFS_QUEUE, {\n// connection: { url: redisUrl },\n// defaultJobOptions: {\n// removeOnComplete: true,\n// removeOnFail: 10,\n// attempts: 3,\n// },\n// });\n\nexport const notificationWorker:any = {};\n// export const notificationWorker = new Worker(NOTIFS_QUEUE, async (job) => {\n// if (!job) return;\n//\n// const { name, data } = job;\n// console.log(`Processing notification job ${job.id} - ${name}`);\n//\n// if (name === 'send-admin-notification') {\n// await sendAdminNotification(data);\n// } else if (name === 'send-notification') {\n// // Handle legacy notification type\n// console.log('Legacy notification job - not implemented yet');\n// }\n// }, {\n// connection: { url: redisUrl },\n// concurrency: 5,\n// });\n\nasync function sendAdminNotification(data: {\n token: string;\n title: string;\n body: string;\n imageUrl: string | null;\n}) {\n const { token, title, body, imageUrl } = data;\n \n // Validate Expo push token\n if (!Expo.isExpoPushToken(token)) {\n console.error(`Invalid Expo push token: ${token}`);\n return;\n }\n \n // Generate signed URL for image if provided\n const signedImageUrl = imageUrl ? await generateSignedUrlFromS3Url(imageUrl) : null;\n \n // Send notification\n const expo = new Expo();\n const message = {\n to: token,\n sound: 'default',\n title,\n body,\n data: { imageUrl },\n ...(signedImageUrl ? {\n attachments: [\n {\n url: signedImageUrl,\n contentType: 'image/jpeg',\n }\n ]\n } : {}),\n };\n \n try {\n const [ticket] = await expo.sendPushNotificationsAsync([message]);\n console.log(`Notification sent:`, ticket);\n } catch (error) {\n console.error(`Failed to send notification:`, error);\n throw error;\n }\n}\n\n// notificationWorker.on('completed', (job) => {\n// if (job) console.log(`Notification job ${job.id} completed`);\n// });\n// notificationWorker.on('failed', (job, err) => {\n// if (job) console.error(`Notification job ${job.id} failed:`, err);\n// });\n\nexport async function scheduleNotification(userId: number, payload: any, options?: { delay?: number; priority?: number }) {\n const jobData = { userId, ...payload };\n await notificationQueue.add('send-notification', jobData, options);\n}\n\n// Utility methods for specific notification events\nexport async function sendOrderPlacedNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Order Placed',\n body: ORDER_PLACED_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendPaymentFailedNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Payment Failed',\n body: PAYMENT_FAILED_MESSAGE,\n type: 'payment',\n orderId\n });\n}\n\nexport async function sendOrderPackagedNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Order Packaged',\n body: ORDER_PACKAGED_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendOrderOutForDeliveryNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Out for Delivery',\n body: ORDER_OUT_FOR_DELIVERY_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendOrderDeliveredNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Order Delivered',\n body: ORDER_DELIVERED_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendOrderCancelledNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Order Cancelled',\n body: ORDER_CANCELLED_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendRefundInitiatedNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Refund Initiated',\n body: REFUND_INITIATED_MESSAGE,\n type: 'refund',\n orderId\n });\n}\n//\n// process.on('SIGTERM', async () => {\n// await notificationQueue.close();\n// await notificationWorker.close();\n// });\n", "// import { createClient, RedisClientType } from 'redis';\nimport { redisUrl } from '@/src/lib/env-exporter'\n\nconst createClient = (args:any) => {}\nclass RedisClient {\n // private client: RedisClientType;\n // private subscriberClient: RedisClientType | null = null;\n // private isConnected: boolean = false;\n //\n private client: any;\n private subscriberrlient: any;\n private isConnected: any = false;\n\n\n constructor() {\n this.client = createClient({\n url: redisUrl,\n });\n\n // this.client.on('error', (err) => {\n // console.error('Redis Client Error:', err);\n // });\n //\n // this.client.on('connect', () => {\n // console.log('Redis Client Connected');\n // this.isConnected = true;\n // });\n //\n // this.client.on('disconnect', () => {\n // console.log('Redis Client Disconnected');\n // this.isConnected = false;\n // });\n //\n // this.client.on('ready', () => {\n // console.log('Redis Client Ready');\n // });\n //\n // this.client.on('reconnecting', () => {\n // console.log('Redis Client Reconnecting');\n // });\n\n // Connect immediately (fire and forget)\n // this.client.connect().catch((err) => {\n // console.error('Failed to connect Redis:', err);\n // });\n }\n\n async set(key: string, value: string, ttlSeconds?: number): Promise {\n if (ttlSeconds) {\n return await this.client.setEx(key, ttlSeconds, value);\n } else {\n return await this.client.set(key, value);\n }\n }\n\n async get(key: string): Promise {\n return await this.client.get(key);\n }\n\n async exists(key: string): Promise {\n const result = await this.client.exists(key);\n return result === 1;\n }\n\n async delete(key: string): Promise {\n return await this.client.del(key);\n }\n\n async lPush(key: string, value: string): Promise {\n return await this.client.lPush(key, value);\n }\n\n async KEYS(pattern: string): Promise {\n return await this.client.KEYS(pattern);\n }\n\n async MGET(keys: string[]): Promise<(string | null)[]> {\n return await this.client.MGET(keys);\n }\n\n // Publish message to a channel\n async publish(channel: string, message: string): Promise {\n return await this.client.publish(channel, message);\n }\n\n // Subscribe to a channel with callback\n async subscribe(channel: string, callback: (message: string) => void): Promise {\n // if (!this.subscriberClient) {\n // this.subscriberClient = createClient({\n // url: redisUrl,\n // });\n //\n // this.subscriberClient.on('error', (err) => {\n // console.error('Redis Subscriber Error:', err);\n // });\n //\n // this.subscriberClient.on('connect', () => {\n // console.log('Redis Subscriber Connected');\n // });\n //\n // await this.subscriberClient.connect();\n // }\n //\n // await this.subscriberClient.subscribe(channel, callback);\n console.log(`Subscribed to channel: ${channel}`);\n }\n\n // Unsubscribe from a channel\n async unsubscribe(channel: string): Promise {\n // if (this.subscriberClient) {\n // await this.subscriberClient.unsubscribe(channel);\n // console.log(`Unsubscribed from channel: ${channel}`);\n // }\n }\n\n disconnect(): void {\n // if (this.isConnected) {\n // this.client.disconnect();\n // }\n // if (this.subscriberClient) {\n // this.subscriberClient.disconnect();\n // }\n }\n\n get isClientConnected(): boolean {\n return this.isConnected;\n }\n}\n\nconst redisClient = new RedisClient();\n\nexport default redisClient;\nexport { RedisClient };\n", "'use strict';\n\n/**\n * Create a bound version of a function with a specified `this` context\n *\n * @param {Function} fn - The function to bind\n * @param {*} thisArg - The value to be passed as the `this` parameter\n * @returns {Function} A new function that will call the original function with the specified `this` context\n */\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n", "'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst { toString } = Object.prototype;\nconst { getPrototypeOf } = Object;\nconst { iterator, toStringTag } = Symbol;\n\nconst kindOf = ((cache) => (thing) => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type;\n};\n\nconst typeOfTest = (type) => (thing) => typeof thing === type;\n\n/**\n * Determine if a value is a non-null object\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst { isArray } = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return (\n val !== null &&\n !isUndefined(val) &&\n val.constructor !== null &&\n !isUndefined(val.constructor) &&\n isFunction(val.constructor.isBuffer) &&\n val.constructor.isBuffer(val)\n );\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n result = ArrayBuffer.isView(val);\n } else {\n result = val && val.buffer && isArrayBuffer(val.buffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = (thing) => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (\n (prototype === null ||\n prototype === Object.prototype ||\n Object.getPrototypeOf(prototype) === null) &&\n !(toStringTag in val) &&\n !(iterator in val)\n );\n};\n\n/**\n * Determine if a value is an empty object (safely handles Buffers)\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an empty object, otherwise false\n */\nconst isEmptyObject = (val) => {\n // Early return for non-objects or Buffers to prevent RangeError\n if (!isObject(val) || isBuffer(val)) {\n return false;\n }\n\n try {\n return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;\n } catch (e) {\n // Fallback for any other objects that might cause RangeError with Object.keys()\n return false;\n }\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a React Native Blob\n * React Native \"blob\": an object with a `uri` attribute. Optionally, it can\n * also have a `name` and `type` attribute to specify filename and content type\n *\n * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71\n * \n * @param {*} value The value to test\n * \n * @returns {boolean} True if value is a React Native Blob, otherwise false\n */\nconst isReactNativeBlob = (value) => {\n return !!(value && typeof value.uri !== 'undefined');\n}\n\n/**\n * Determine if environment is React Native\n * ReactNative `FormData` has a non-standard `getParts()` method\n * \n * @param {*} formData The formData to test\n * \n * @returns {boolean} True if environment is React Native, otherwise false\n */\nconst isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction getGlobal() {\n if (typeof globalThis !== 'undefined') return globalThis;\n if (typeof self !== 'undefined') return self;\n if (typeof window !== 'undefined') return window;\n if (typeof global !== 'undefined') return global;\n return {};\n}\n\nconst G = getGlobal();\nconst FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;\n\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (FormDataCtor && thing instanceof FormDataCtor) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n );\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = [\n 'ReadableStream',\n 'Request',\n 'Response',\n 'Headers',\n].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => {\n return str.trim ? str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n};\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, { allOwnKeys = false } = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Buffer check\n if (isBuffer(obj)) {\n return;\n }\n\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\n/**\n * Finds a key in an object, case-insensitive, returning the actual key name.\n * Returns null if the object is a Buffer or if no match is found.\n *\n * @param {Object} obj - The object to search.\n * @param {string} key - The key to find (case-insensitive).\n * @returns {?string} The actual key name if found, otherwise null.\n */\nfunction findKey(obj, key) {\n if (isBuffer(obj)) {\n return null;\n }\n\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== 'undefined') return globalThis;\n return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * const result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};\n const result = {};\n const assignValue = (val, key) => {\n // Skip dangerous property names to prevent prototype pollution\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return;\n }\n\n const targetKey = (caseless && findKey(result, key)) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else if (!skipUndefined || !isUndefined(val)) {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, { allOwnKeys } = {}) => {\n forEach(\n b,\n (val, key) => {\n if (thisArg && isFunction(val)) {\n Object.defineProperty(a, key, {\n value: bind(val, thisArg),\n writable: true,\n enumerable: true,\n configurable: true,\n });\n } else {\n Object.defineProperty(a, key, {\n value: val,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n },\n { allOwnKeys }\n );\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xfeff) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n Object.defineProperty(constructor.prototype, 'constructor', {\n value: constructor,\n writable: true,\n enumerable: false,\n configurable: true,\n });\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype,\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = ((TypedArray) => {\n // eslint-disable-next-line func-names\n return (thing) => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[iterator];\n\n const _iterator = generator.call(obj);\n\n let result;\n\n while ((result = _iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = (str) => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g, function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n });\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (\n ({ hasOwnProperty }) =>\n (obj, prop) =>\n hasOwnProperty.call(obj, prop)\n)(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error(\"Can not rewrite read-only method '\" + name + \"'\");\n };\n }\n });\n};\n\n/**\n * Converts an array or a delimited string into an object set with values as keys and true as values.\n * Useful for fast membership checks.\n *\n * @param {Array|string} arrayOrString - The array or string to convert.\n * @param {string} delimiter - The delimiter to use if input is a string.\n * @returns {Object} An object with keys from the array or string, values set to true.\n */\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach((value) => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite((value = +value)) ? value : defaultValue;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(\n thing &&\n isFunction(thing.append) &&\n thing[toStringTag] === 'FormData' &&\n thing[iterator]\n );\n}\n\n/**\n * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.\n *\n * @param {Object} obj - The object to convert.\n * @returns {Object} The JSON-compatible object.\n */\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n //Buffer check\n if (isBuffer(source)) {\n return source;\n }\n\n if (!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\n/**\n * Determines if a value is an async function.\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is an async function, otherwise false.\n */\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\n/**\n * Determines if a value is thenable (has then and catch methods).\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is thenable, otherwise false.\n */\nconst isThenable = (thing) =>\n thing &&\n (isObject(thing) || isFunction(thing)) &&\n isFunction(thing.then) &&\n isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\n/**\n * Provides a cross-platform setImmediate implementation.\n * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.\n *\n * @param {boolean} setImmediateSupported - Whether setImmediate is supported.\n * @param {boolean} postMessageSupported - Whether postMessage is supported.\n * @returns {Function} A function to schedule a callback asynchronously.\n */\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported\n ? ((token, callbacks) => {\n _global.addEventListener(\n 'message',\n ({ source, data }) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n },\n false\n );\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, '*');\n };\n })(`axios@${Math.random()}`, [])\n : (cb) => setTimeout(cb);\n})(typeof setImmediate === 'function', isFunction(_global.postMessage));\n\n/**\n * Schedules a microtask or asynchronous callback as soon as possible.\n * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.\n *\n * @type {Function}\n */\nconst asap =\n typeof queueMicrotask !== 'undefined'\n ? queueMicrotask.bind(_global)\n : (typeof process !== 'undefined' && process.nextTick) || _setImmediate;\n\n// *********************\n\nconst isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isEmptyObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isReactNativeBlob,\n isReactNative,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap,\n isIterable,\n};\n", "'use strict';\n\nimport utils from '../utils.js';\n\nclass AxiosError extends Error {\n static from(error, code, config, request, response, customProps) {\n const axiosError = new AxiosError(error.message, code || error.code, config, request, response);\n axiosError.cause = error;\n axiosError.name = error.name;\n\n // Preserve status from the original error if not already set from response\n if (error.status != null && axiosError.status == null) {\n axiosError.status = error.status;\n }\n\n customProps && Object.assign(axiosError, customProps);\n return axiosError;\n }\n\n /**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\n constructor(message, code, config, request, response) {\n super(message);\n \n // Make message enumerable to maintain backward compatibility\n // The native Error constructor sets message as non-enumerable,\n // but axios < v1.13.3 had it as enumerable\n Object.defineProperty(this, 'message', {\n value: message,\n enumerable: true,\n writable: true,\n configurable: true\n });\n \n this.name = 'AxiosError';\n this.isAxiosError = true;\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status;\n }\n }\n\n toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.status,\n };\n }\n}\n\n// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.\nAxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';\nAxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';\nAxiosError.ECONNABORTED = 'ECONNABORTED';\nAxiosError.ETIMEDOUT = 'ETIMEDOUT';\nAxiosError.ERR_NETWORK = 'ERR_NETWORK';\nAxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';\nAxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';\nAxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';\nAxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';\nAxiosError.ERR_CANCELED = 'ERR_CANCELED';\nAxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';\nAxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';\n\nexport default AxiosError;\n", "// eslint-disable-next-line strict\nexport default null;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path\n .concat(key)\n .map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n })\n .join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(\n options,\n {\n metaTokens: true,\n dots: false,\n indexes: false,\n },\n false,\n function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n }\n );\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (utils.isBoolean(value)) {\n return value.toString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (utils.isReactNative(formData) && utils.isReactNativeBlob(value)) {\n formData.append(renderKey(path, key, dots), convertValue(value));\n return false;\n }\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value)))\n ) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) &&\n formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true\n ? renderKey([key], index, dots)\n : indexes === null\n ? key\n : key + '[]',\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable,\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result =\n !(utils.isUndefined(el) || el === null) &&\n visitor.call(formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers);\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n", "'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00',\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder\n ? function (value) {\n return encoder.call(this, value, encode);\n }\n : encode;\n\n return this._pairs\n .map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '')\n .join('&');\n};\n\nexport default AxiosURLSearchParams;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val)\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',')\n .replace(/%20/g, '+');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n if (!params) {\n return url;\n }\n\n const _encode = (options && options.encode) || encode;\n\n const _options = utils.isFunction(options)\n ? {\n serialize: options,\n }\n : options;\n\n const serializeFn = _options && _options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, _options);\n } else {\n serializedParams = utils.isURLSearchParams(params)\n ? params.toString()\n : new AxiosURLSearchParams(params, _options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf('#');\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n", "'use strict';\n\nimport utils from '../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n * @param {Object} options The options for the interceptor, synchronous and runWhen\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null,\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {void}\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n", "'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false,\n legacyInterceptorReqResOrdering: true,\n};\n", "'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n", "'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n", "'use strict';\n\nexport default typeof Blob !== 'undefined' ? Blob : null;\n", "import URLSearchParams from './classes/URLSearchParams.js';\nimport FormData from './classes/FormData.js';\nimport Blob from './classes/Blob.js';\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob,\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],\n};\n", "const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = (typeof navigator === 'object' && navigator) || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv =\n hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = (hasBrowserEnv && window.location.href) || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin,\n};\n", "import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform,\n};\n", "'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), {\n visitor: function (value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n },\n ...options,\n });\n}\n", "'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map((match) => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [\n function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if (\n (isFileList = utils.isFileList(data)) ||\n contentType.indexOf('multipart/form-data') > -1\n ) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? { 'files[]': data } : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n },\n ],\n\n transformResponse: [\n function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (\n data &&\n utils.isString(data) &&\n ((forcedJSONParsing && !this.responseType) || JSONRequested)\n ) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data, this.parseReviver);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n },\n ],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob,\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': undefined,\n },\n },\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n", "'use strict';\n\nimport utils from '../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age',\n 'authorization',\n 'content-length',\n 'content-type',\n 'etag',\n 'expires',\n 'from',\n 'host',\n 'if-modified-since',\n 'if-unmodified-since',\n 'last-modified',\n 'location',\n 'max-forwards',\n 'proxy-authorization',\n 'referer',\n 'retry-after',\n 'user-agent',\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default (rawHeaders) => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders &&\n rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n", "'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header\n .trim()\n .toLowerCase()\n .replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach((methodName) => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function (arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true,\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if (\n !key ||\n self[key] === undefined ||\n _rewrite === true ||\n (_rewrite === undefined && self[key] !== false)\n ) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isObject(header) && utils.isIterable(header)) {\n let obj = {},\n dest,\n key;\n for (const entry of header) {\n if (!utils.isArray(entry)) {\n throw TypeError('Object iterator must return a key-value pair');\n }\n\n obj[(key = entry[0])] = (dest = obj[key])\n ? utils.isArray(dest)\n ? [...dest, entry[1]]\n : [dest, entry[1]]\n : entry[1];\n }\n\n setHeaders(obj, valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(\n key &&\n this[key] !== undefined &&\n (!matcher || matchHeaderValue(this, this[key], key, matcher))\n );\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null &&\n value !== false &&\n (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON())\n .map(([header, value]) => header + ': ' + value)\n .join('\\n');\n }\n\n getSetCookie() {\n return this.get('set-cookie') || [];\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals =\n (this[$internals] =\n this[$internals] =\n {\n accessors: {},\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor([\n 'Content-Type',\n 'Content-Length',\n 'Accept',\n 'Accept-Encoding',\n 'User-Agent',\n 'Authorization',\n]);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n },\n };\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n", "'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n", "'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\n\nclass CanceledError extends AxiosError {\n /**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\n constructor(message, config, request) {\n super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n this.__CANCEL__ = true;\n }\n}\n\nexport default CanceledError;\n", "'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(\n new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][\n Math.floor(response.status / 100) - 4\n ],\n response.config,\n response.request,\n response\n )\n );\n }\n}\n", "'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return (match && match[1]) || '';\n}\n", "'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round((bytesCount * 1000) / passed) : undefined;\n };\n}\n\nexport default speedometer;\n", "/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn(...args);\n };\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if (passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs);\n }, threshold - passed);\n }\n }\n };\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n", "import speedometer from './speedometer.js';\nimport throttle from './throttle.js';\nimport utils from '../utils.js';\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle((e) => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? loaded / total : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true,\n };\n\n listener(data);\n }, freq);\n};\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [\n (loaded) =>\n throttled[0]({\n lengthComputable,\n total,\n loaded,\n }),\n throttled[1],\n ];\n};\n\nexport const asyncDecorator =\n (fn) =>\n (...args) =>\n utils.asap(() => fn(...args));\n", "import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n })(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n )\n : () => true;\n", "import utils from '../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n ? // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure, sameSite) {\n if (typeof document === 'undefined') return;\n\n const cookie = [`${name}=${encodeURIComponent(value)}`];\n\n if (utils.isNumber(expires)) {\n cookie.push(`expires=${new Date(expires).toUTCString()}`);\n }\n if (utils.isString(path)) {\n cookie.push(`path=${path}`);\n }\n if (utils.isString(domain)) {\n cookie.push(`domain=${domain}`);\n }\n if (secure === true) {\n cookie.push('secure');\n }\n if (utils.isString(sameSite)) {\n cookie.push(`SameSite=${sameSite}`);\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n if (typeof document === 'undefined') return null;\n const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));\n return match ? decodeURIComponent(match[1]) : null;\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000, '/');\n },\n }\n : // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {},\n };\n", "'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n if (typeof url !== 'string') {\n return false;\n }\n\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n", "'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n", "'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst headersToObject = (thing) => (thing instanceof AxiosHeaders ? { ...thing } : thing);\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({ caseless }, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(a, b, prop, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b, prop) =>\n mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),\n };\n\n utils.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {\n if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;\n const merge = utils.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n", "import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport isURLSameOrigin from './isURLSameOrigin.js';\nimport cookies from './cookies.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport mergeConfig from '../core/mergeConfig.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport buildURL from './buildURL.js';\n\nexport default (config) => {\n const newConfig = mergeConfig({}, config);\n\n let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(\n buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),\n config.params,\n config.paramsSerializer\n );\n\n // HTTP basic authentication\n if (auth) {\n headers.set(\n 'Authorization',\n 'Basic ' +\n btoa(\n (auth.username || '') +\n ':' +\n (auth.password ? unescape(encodeURIComponent(auth.password)) : '')\n )\n );\n }\n\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // browser handles it\n } else if (utils.isFunction(data.getHeaders)) {\n // Node.js FormData (like form-data package)\n const formHeaders = data.getHeaders();\n // Only set safe headers to avoid overwriting security headers\n const allowedHeaders = ['content-type', 'content-length'];\n Object.entries(formHeaders).forEach(([key, val]) => {\n if (allowedHeaders.includes(key.toLowerCase())) {\n headers.set(key, val);\n }\n });\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n};\n", "import utils from '../utils.js';\nimport settle from '../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport { progressEventReducer } from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported &&\n function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let { responseType, onUploadProgress, onDownloadProgress } = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData =\n !responseType || responseType === 'text' || responseType === 'json'\n ? request.responseText\n : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request,\n };\n\n settle(\n function _resolve(value) {\n resolve(value);\n done();\n },\n function _reject(err) {\n reject(err);\n done();\n },\n response\n );\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (\n request.status === 0 &&\n !(request.responseURL && request.responseURL.indexOf('file:') === 0)\n ) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError(event) {\n // Browsers deliver a ProgressEvent in XHR onerror\n // (message may be empty; when present, surface it)\n // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event\n const msg = event && event.message ? event.message : 'Network Error';\n const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);\n // attach the underlying event for consumers who want details\n err.event = event || null;\n reject(err);\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout\n ? 'timeout of ' + _config.timeout + 'ms exceeded'\n : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(\n new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request\n )\n );\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = (cancel) => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted\n ? onCanceled()\n : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(\n new AxiosError(\n 'Unsupported protocol ' + protocol + ':',\n AxiosError.ERR_BAD_REQUEST,\n config\n )\n );\n return;\n }\n\n // Send the request\n request.send(requestData || null);\n });\n };\n", "import CanceledError from '../cancel/CanceledError.js';\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n const { length } = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(\n err instanceof AxiosError\n ? err\n : new CanceledError(err instanceof Error ? err.message : err)\n );\n }\n };\n\n let timer =\n timeout &&\n setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));\n }, timeout);\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach((signal) => {\n signal.unsubscribe\n ? signal.unsubscribe(onabort)\n : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n };\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const { signal } = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n }\n};\n\nexport default composeSignals;\n", "export const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n};\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n};\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n};\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n };\n\n return new ReadableStream(\n {\n async pull(controller) {\n try {\n const { done, value } = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = (bytes += len);\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n },\n },\n {\n highWaterMark: 2,\n }\n );\n};\n", "import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport composeSignals from '../helpers/composeSignals.js';\nimport { trackStream } from '../helpers/trackStream.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {\n progressEventReducer,\n progressEventDecorator,\n asyncDecorator,\n} from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\nimport settle from '../core/settle.js';\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst { isFunction } = utils;\n\nconst globalFetchAPI = (({ Request, Response }) => ({\n Request,\n Response,\n}))(utils.global);\n\nconst { ReadableStream, TextEncoder } = utils.global;\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false;\n }\n};\n\nconst factory = (env) => {\n env = utils.merge.call(\n {\n skipUndefined: true,\n },\n globalFetchAPI,\n env\n );\n\n const { fetch: envFetch, Request, Response } = env;\n const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';\n const isRequestSupported = isFunction(Request);\n const isResponseSupported = isFunction(Response);\n\n if (!isFetchSupported) {\n return false;\n }\n\n const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);\n\n const encodeText =\n isFetchSupported &&\n (typeof TextEncoder === 'function'\n ? (\n (encoder) => (str) =>\n encoder.encode(str)\n )(new TextEncoder())\n : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));\n\n const supportsRequestStream =\n isRequestSupported &&\n isReadableStreamSupported &&\n test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n });\n\n const supportsResponseStream =\n isResponseSupported &&\n isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n const resolvers = {\n stream: supportsResponseStream && ((res) => res.body),\n };\n\n isFetchSupported &&\n (() => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {\n !resolvers[type] &&\n (resolvers[type] = (res, config) => {\n let method = res && res[type];\n\n if (method) {\n return method.call(res);\n }\n\n throw new AxiosError(\n `Response type '${type}' is not supported`,\n AxiosError.ERR_NOT_SUPPORT,\n config\n );\n });\n });\n })();\n\n const getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if (utils.isBlob(body)) {\n return body.size;\n }\n\n if (utils.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if (utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if (utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if (utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n };\n\n const resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n };\n\n return async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions,\n } = resolveConfig(config);\n\n let _fetch = envFetch || fetch;\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals(\n [signal, cancelToken && cancelToken.toAbortSignal()],\n timeout\n );\n\n let request = null;\n\n const unsubscribe =\n composedSignal &&\n composedSignal.unsubscribe &&\n (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress &&\n supportsRequestStream &&\n method !== 'get' &&\n method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: 'half',\n });\n\n let contentTypeHeader;\n\n if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader);\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;\n\n const resolvedOptions = {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: 'half',\n credentials: isCredentialsSupported ? withCredentials : undefined,\n };\n\n request = isRequestSupported && new Request(url, resolvedOptions);\n\n let response = await (isRequestSupported\n ? _fetch(request, fetchOptions)\n : _fetch(url, resolvedOptions));\n\n const isStreamResponse =\n supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach((prop) => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] =\n (onDownloadProgress &&\n progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n )) ||\n [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](\n response,\n config\n );\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request,\n });\n });\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError(\n 'Network Error',\n AxiosError.ERR_NETWORK,\n config,\n request,\n err && err.response\n ),\n {\n cause: err.cause || err,\n }\n );\n }\n\n throw AxiosError.from(err, err && err.code, config, request, err && err.response);\n }\n };\n};\n\nconst seedCache = new Map();\n\nexport const getFetch = (config) => {\n let env = (config && config.env) || {};\n const { fetch, Request, Response } = env;\n const seeds = [Request, Response, fetch];\n\n let len = seeds.length,\n i = len,\n seed,\n target,\n map = seedCache;\n\n while (i--) {\n seed = seeds[i];\n target = map.get(seed);\n\n target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));\n\n map = target;\n }\n\n return target;\n};\n\nconst adapter = getFetch();\n\nexport default adapter;\n", "import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport * as fetchAdapter from './fetch.js';\nimport AxiosError from '../core/AxiosError.js';\n\n/**\n * Known adapters mapping.\n * Provides environment-specific adapters for Axios:\n * - `http` for Node.js\n * - `xhr` for browsers\n * - `fetch` for fetch API-based requests\n *\n * @type {Object}\n */\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: {\n get: fetchAdapter.getFetch,\n },\n};\n\n// Assign adapter names for easier debugging and identification\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', { value });\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', { value });\n }\n});\n\n/**\n * Render a rejection reason string for unknown or unsupported adapters\n *\n * @param {string} reason\n * @returns {string}\n */\nconst renderReason = (reason) => `- ${reason}`;\n\n/**\n * Check if the adapter is resolved (function, null, or false)\n *\n * @param {Function|null|false} adapter\n * @returns {boolean}\n */\nconst isResolvedHandle = (adapter) =>\n utils.isFunction(adapter) || adapter === null || adapter === false;\n\n/**\n * Get the first suitable adapter from the provided list.\n * Tries each adapter in order until a supported one is found.\n * Throws an AxiosError if no adapter is suitable.\n *\n * @param {Array|string|Function} adapters - Adapter(s) by name or function.\n * @param {Object} config - Axios request configuration\n * @throws {AxiosError} If no suitable adapter is available\n * @returns {Function} The resolved adapter function\n */\nfunction getAdapter(adapters, config) {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const { length } = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n const reasons = Object.entries(rejectedReasons).map(\n ([id, state]) =>\n `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length\n ? reasons.length > 1\n ? 'since :\\n' + reasons.map(renderReason).join('\\n')\n : ' ' + renderReason(reasons[0])\n : 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n}\n\n/**\n * Exports Axios adapters and utility to resolve an adapter\n */\nexport default {\n /**\n * Resolve an adapter from a list of adapter names or functions.\n * @type {Function}\n */\n getAdapter,\n\n /**\n * Exposes all known adapters\n * @type {Object}\n */\n adapters: knownAdapters,\n};\n", "'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from '../adapters/adapters.js';\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(config, config.transformRequest);\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);\n\n return adapter(config).then(\n function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(config, config.transformResponse, response);\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n },\n function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n }\n );\n}\n", "export const VERSION = \"1.13.6\";", "'use strict';\n\nimport { VERSION } from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return (\n '[Axios v' +\n VERSION +\n \"] Transitional option '\" +\n opt +\n \"'\" +\n desc +\n (message ? '. ' + message : '')\n );\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError(\n 'option ' + opt + ' must be ' + result,\n AxiosError.ERR_BAD_OPTION_VALUE\n );\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators,\n};\n", "'use strict';\n\nimport utils from '../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\nimport transitionalDefaults from '../defaults/transitional.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig || {};\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager(),\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n try {\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n } catch (e) {\n // ignore the case where \"stack\" is an un-writable property\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const { transitional, paramsSerializer, headers } = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(\n transitional,\n {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean),\n legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),\n },\n false\n );\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer,\n };\n } else {\n validator.assertOptions(\n paramsSerializer,\n {\n encode: validators.function,\n serialize: validators.function,\n },\n true\n );\n }\n }\n\n // Set config.allowAbsoluteUrls\n if (config.allowAbsoluteUrls !== undefined) {\n // do nothing\n } else if (this.defaults.allowAbsoluteUrls !== undefined) {\n config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n } else {\n config.allowAbsoluteUrls = true;\n }\n\n validator.assertOptions(\n config,\n {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken'),\n },\n true\n );\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(headers.common, headers[config.method]);\n\n headers &&\n utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {\n delete headers[method];\n });\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n const transitional = config.transitional || transitionalDefaults;\n const legacyInterceptorReqResOrdering =\n transitional && transitional.legacyInterceptorReqResOrdering;\n\n if (legacyInterceptorReqResOrdering) {\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n } else {\n requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n }\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift(...requestInterceptorChain);\n chain.push(...responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function (url, config) {\n return this.request(\n mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data,\n })\n );\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(\n mergeConfig(config || {}, {\n method,\n headers: isForm\n ? {\n 'Content-Type': 'multipart/form-data',\n }\n : {},\n url,\n data,\n })\n );\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n", "'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then((cancel) => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = (onfulfilled) => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise((resolve) => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel,\n };\n }\n}\n\nexport default CancelToken;\n", "'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * const args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n", "'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && payload.isAxiosError === true;\n}\n", "const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n WebServerIsDown: 521,\n ConnectionTimedOut: 522,\n OriginIsUnreachable: 523,\n TimeoutOccurred: 524,\n SslHandshakeFailed: 525,\n InvalidSslCertificate: 526,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n", "'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport { VERSION } from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from './core/AxiosHeaders.js';\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, { allOwnKeys: true });\n\n // Copy context to instance\n utils.extend(instance, context, null, { allOwnKeys: true });\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = (thing) => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios;\n", "import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig,\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig,\n};\n", "import axios from 'axios';\nimport { isDevMode, telegramBotToken, telegramChatIds } from '@/src/lib/env-exporter'\n\nconst BOT_TOKEN = telegramBotToken;\nconst CHAT_IDS = telegramChatIds;\nconst TELEGRAM_API_URL = `https://api.telegram.org/bot${BOT_TOKEN}`;\n\n/**\n * Send a message to Telegram bot\n * @param message The message text to send\n * @returns Promise indicating success, failure, or null if dev mode\n */\nexport const sendTelegramMessage = async (message: string): Promise => {\n if (isDevMode) {\n return null;\n }\n try {\n const results = await Promise.all(\n CHAT_IDS.map(async (chatId) => {\n try {\n const response = await axios.post(`${TELEGRAM_API_URL}/sendMessage`, {\n chat_id: chatId,\n text: message,\n parse_mode: 'HTML',\n });\n\n if (response.data && response.data.ok) {\n console.log(`Telegram message sent successfully to ${chatId}`);\n return true;\n } else {\n console.error(`Telegram API error for ${chatId}:`, response.data);\n return false;\n }\n } catch (error) {\n console.error(`Failed to send Telegram message to ${chatId}:`, error);\n return false;\n }\n })\n ); \n\n console.log('sent telegram message successfully')\n \n\n // Return true if at least one message was sent successfully\n return results.some((result) => result);\n } catch (error) {\n console.error('Failed to send Telegram message:', error);\n return false;\n }\n};\n", "import {\n getOrdersByIdsWithFullData,\n getOrderByIdWithFullData,\n} from '@/src/dbService'\nimport redisClient from '@/src/lib/redis-client'\nimport { sendTelegramMessage } from '@/src/lib/telegram-service'\n\nconst ORDER_CHANNEL = 'orders:placed';\nconst CANCELLED_CHANNEL = 'orders:cancelled';\n\ninterface OrderIdMessage {\n orderIds: number[];\n}\n\ninterface CancellationMessage {\n orderId: number;\n cancelledBy: 'user' | 'admin';\n reason: string;\n cancelledAt: string;\n}\n\nconst formatDateTime = (dateStr: string | null | undefined): string => {\n if (!dateStr) return 'N/A';\n return new Date(dateStr).toLocaleString('en-IN', {\n dateStyle: 'medium',\n timeStyle: 'short',\n timeZone: 'Asia/Kolkata',\n });\n};\n\nconst formatOrderMessageWithFullData = (ordersData: any[]): string => {\n let message = '\uD83D\uDED2 New Order Placed\\n\\n';\n\n ordersData.forEach((order, index) => {\n message += `Order ${order.id}\\n`;\n\n message += '\uD83D\uDCE6 Items:\\n';\n order.orderItems?.forEach((item: any) => {\n message += ` \u2022 ${item.product?.name || 'Unknown'} x${item.quantity}\\n`;\n });\n\n message += `\\n\uD83D\uDCB0 Total: \u20B9${order.totalAmount}\\n`;\n\n message += `\uD83D\uDE9A Delivery: ${\n order.isFlashDelivery ? 'Flash Delivery' : formatDateTime(order.slot?.deliveryTime)\n }\\n`;\n\n message += `\\n\uD83D\uDCCD Address:\\n`;\n message += ` ${order.address?.name || 'N/A'}\\n`;\n message += ` ${order.address?.addressLine1 || ''}\\n`;\n if (order.address?.addressLine2) {\n message += ` ${order.address.addressLine2}\\n`;\n }\n message += ` ${order.address?.city || ''}, ${order.address?.state || ''} - ${order.address?.pincode || ''}\\n`;\n if (order.address?.phone) {\n message += ` \uD83D\uDCDE ${order.address.phone}\\n`;\n }\n\n if (index < ordersData.length - 1) {\n message += '\\n---\\n\\n';\n }\n });\n\n return message;\n};\n\nconst formatCancellationMessage = (orderData: any, cancellationData: CancellationMessage): string => {\n const message = `\u274C Order Cancelled\n\nOrder #${orderData.id}\n\n\uD83D\uDC64 Name: ${orderData.address?.name || 'N/A'}\n\uD83D\uDCDE Phone: ${orderData.address?.phone || 'N/A'}\n\n\uD83D\uDCE6 Items:\n${orderData.orderItems?.map((item: any) => ` \u2022 ${item.product?.name || 'Unknown'} x${item.quantity}`).join('\\n') || ' N/A'}\n\n\uD83D\uDCB0 Total: \u20B9${orderData.totalAmount}\n\uD83D\uDCB3 Refund: ${orderData.refundStatus === 'na' ? 'N/A (COD)' : orderData.refundStatus || 'Pending'}\n\n\u2753 Reason: ${cancellationData.reason}\n\uD83D\uDC64 Cancelled by: ${cancellationData.cancelledBy === 'admin' ? 'Admin' : 'User'}\n\u23F0 Time: ${formatDateTime(cancellationData.cancelledAt)}\n`;\n\n return message;\n};\n\n/**\n * Start the post order handler\n * Subscribes to the orders:placed channel and sends to Telegram\n */\nexport const startOrderHandler = async (): Promise => {\n try {\n console.log('Starting post order handler...');\n\n await redisClient.subscribe(ORDER_CHANNEL, async (message: string) => {\n try {\n const { orderIds }: OrderIdMessage = JSON.parse(message);\n console.log('New order received, sending to Telegram...');\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { orders } from '@/src/db/schema'\n import { inArray } from 'drizzle-orm';\n\n const ordersData = await db.query.orders.findMany({\n where: inArray(orders.id, orderIds),\n with: {\n address: true,\n orderItems: { with: { product: true } },\n slot: true,\n },\n });\n */\n\n const ordersData = await getOrdersByIdsWithFullData(orderIds);\n\n const telegramMessage = formatOrderMessageWithFullData(ordersData);\n await sendTelegramMessage(telegramMessage);\n } catch (error) {\n console.error('Failed to process order message:', error);\n await sendTelegramMessage(`\u26A0\uFE0F Error parsing order: ${message}`);\n }\n });\n\n console.log('Post order handler started successfully');\n } catch (error) {\n console.error('Failed to start post order handler:', error);\n throw error;\n }\n};\n\n/**\n * Stop the post order handler\n */\nexport const stopOrderHandler = async (): Promise => {\n try {\n await redisClient.unsubscribe(ORDER_CHANNEL);\n console.log('Post order handler stopped');\n } catch (error) {\n console.error('Error stopping post order handler:', error);\n }\n};\n\nexport const startCancellationHandler = async (): Promise => {\n try {\n console.log('Starting cancellation handler...');\n\n await redisClient.subscribe(CANCELLED_CHANNEL, async (message: string) => {\n try {\n const cancellationData: CancellationMessage = JSON.parse(message);\n console.log('Order cancellation received, sending to Telegram...');\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { orders } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n const orderData = await db.query.orders.findFirst({\n where: eq(orders.id, cancellationData.orderId),\n with: {\n address: true,\n orderItems: { with: { product: true } },\n refunds: true,\n },\n });\n */\n\n const orderData = await getOrderByIdWithFullData(cancellationData.orderId);\n\n if (!orderData) {\n console.error('Order not found for cancellation:', cancellationData.orderId);\n await sendTelegramMessage(`\u26A0\uFE0F Order ${cancellationData.orderId} was cancelled but could not be found in database`);\n return;\n }\n\n const refundStatus = orderData.refunds?.[0]?.refundStatus || 'pending';\n\n const telegramMessage = formatCancellationMessage({ ...orderData, refundStatus }, cancellationData);\n await sendTelegramMessage(telegramMessage);\n } catch (error) {\n console.error('Failed to process cancellation message:', error);\n await sendTelegramMessage(`\u26A0\uFE0F Error processing cancellation: ${message}`);\n }\n });\n\n console.log('Cancellation handler started successfully');\n } catch (error) {\n console.error('Failed to start cancellation handler:', error);\n throw error;\n }\n};\n\nexport const stopCancellationHandler = async (): Promise => {\n try {\n await redisClient.unsubscribe(CANCELLED_CHANNEL);\n console.log('Cancellation handler stopped');\n } catch (error) {\n console.error('Error stopping cancellation handler:', error);\n }\n};\n\nexport const publishOrder = async (orderDetails: OrderIdMessage): Promise => {\n try {\n const message = JSON.stringify(orderDetails);\n await redisClient.publish(ORDER_CHANNEL, message);\n return true;\n } catch (error) {\n console.error('Failed to publish order:', error);\n return false;\n }\n};\n\nexport const publishFormattedOrder = async (\n createdOrders: any[],\n ordersBySlot: Map\n): Promise => {\n try {\n const orderIds = createdOrders.map(order => order.id);\n return await publishOrder({ orderIds });\n } catch (error) {\n console.error('Failed to format and publish order:', error);\n return false;\n }\n};\n\nexport const publishCancellation = async (\n orderId: number,\n cancelledBy: 'user' | 'admin',\n reason: string\n): Promise => {\n try {\n const message: CancellationMessage = {\n orderId,\n cancelledBy,\n reason,\n cancelledAt: new Date().toISOString(),\n };\n await redisClient.publish(CANCELLED_CHANNEL, JSON.stringify(message));\n console.log('Cancellation published to Redis:', orderId);\n return true;\n } catch (error) {\n console.error('Failed to publish cancellation:', error);\n return false;\n }\n};\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllUserNegativityScores as getAllUserNegativityScoresFromDb,\n getUserNegativityScore as getUserNegativityScoreFromDb,\n type UserNegativityData,\n} from '@/src/dbService'\n\nexport async function initializeUserNegativityStore(): Promise {\n try {\n console.log('Initializing user negativity store in Redis...')\n\n const results = await getAllUserNegativityScoresFromDb()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { userIncidents } from '@/src/db/schema'\n import { sum } from 'drizzle-orm'\n\n const results = await db\n .select({\n userId: userIncidents.userId,\n totalNegativityScore: sum(userIncidents.negativityScore).mapWith(Number),\n })\n .from(userIncidents)\n .groupBy(userIncidents.userId);\n */\n\n // for (const { userId, totalNegativityScore } of results) {\n // await redisClient.set(\n // `user:negativity:${userId}`,\n // totalNegativityScore.toString()\n // )\n // }\n\n console.log(`User negativity store initialized for ${results.length} users`)\n } catch (error) {\n console.error('Error initializing user negativity store:', error)\n throw error\n }\n}\n\nexport async function getUserNegativity(userId: number): Promise {\n try {\n // const key = `user:negativity:${userId}`\n // const data = await redisClient.get(key)\n //\n // if (!data) {\n // return 0\n // }\n //\n // return parseInt(data, 10)\n\n return await getUserNegativityScoreFromDb(userId)\n } catch (error) {\n console.error(`Error getting negativity score for user ${userId}:`, error)\n return 0\n }\n}\n\nexport async function getAllUserNegativityScores(): Promise> {\n try {\n // const keys = await redisClient.KEYS('user:negativity:*')\n //\n // if (keys.length === 0) return {}\n //\n // const values = await redisClient.MGET(keys)\n //\n // const result: Record = {}\n // for (let i = 0; i < keys.length; i++) {\n // const key = keys[i]\n // const value = values[i]\n //\n // const match = key.match(/user:negativity:(\\d+)/)\n // if (match && value) {\n // const userId = parseInt(match[1], 10)\n // result[userId] = parseInt(value, 10)\n // }\n // }\n //\n // return result\n\n const results = await getAllUserNegativityScoresFromDb()\n\n const result: Record = {}\n for (const { userId, totalNegativityScore } of results) {\n result[userId] = totalNegativityScore\n }\n return result\n } catch (error) {\n console.error('Error getting all user negativity scores:', error)\n return {}\n }\n}\n\nexport async function getMultipleUserNegativityScores(\n userIds: number[]\n): Promise> {\n try {\n if (userIds.length === 0) return {}\n\n // const keys = userIds.map((id) => `user:negativity:${id}`)\n //\n // const values = await redisClient.MGET(keys)\n //\n // const result: Record = {}\n // for (let i = 0; i < userIds.length; i++) {\n // const value = values[i]\n // if (value) {\n // result[userIds[i]] = parseInt(value, 10)\n // } else {\n // result[userIds[i]] = 0\n // }\n // }\n //\n // return result\n\n const result: Record = {}\n for (const userId of userIds) {\n result[userId] = await getUserNegativityScoreFromDb(userId)\n }\n return result\n } catch (error) {\n console.error('Error getting multiple user negativity scores:', error)\n return {}\n }\n}\n\nexport async function recomputeUserNegativityScore(userId: number): Promise {\n try {\n const totalScore = await getUserNegativityScoreFromDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { userIncidents } from '@/src/db/schema'\n import { eq, sum } from 'drizzle-orm'\n\n const [result] = await db\n .select({\n totalNegativityScore: sum(userIncidents.negativityScore).mapWith(Number),\n })\n .from(userIncidents)\n .where(eq(userIncidents.userId, userId))\n .limit(1);\n\n const totalScore = result?.totalNegativityScore || 0;\n */\n\n // const key = `user:negativity:${userId}`\n // await redisClient.set(key, totalScore.toString())\n } catch (error) {\n console.error(`Error recomputing negativity score for user ${userId}:`, error)\n throw error\n }\n}\n", "import { router, protectedProcedure } from \"@/src/trpc/trpc-index\"\nimport { z } from \"zod\";\nimport { ApiError } from \"@/src/lib/api-error\"\nimport {\n sendOrderPackagedNotification,\n sendOrderDeliveredNotification,\n} from \"@/src/lib/notif-job\";\nimport { publishCancellation } from \"@/src/lib/post-order-handler\"\nimport { getMultipleUserNegativityScores } from \"@/src/stores/user-negativity-store\"\nimport {\n updateOrderNotes as updateOrderNotesInDb,\n getOrderDetails as getOrderDetailsInDb,\n updateOrderPackaged as updateOrderPackagedInDb,\n updateOrderDelivered as updateOrderDeliveredInDb,\n updateOrderItemPackaging as updateOrderItemPackagingInDb,\n removeDeliveryCharge as removeDeliveryChargeInDb,\n getSlotOrders as getSlotOrdersInDb,\n updateAddressCoords as updateAddressCoordsInDb,\n getAllOrders as getAllOrdersInDb,\n rebalanceSlots as rebalanceSlotsInDb,\n cancelOrder as cancelOrderInDb,\n deleteOrderById as deleteOrderByIdInDb,\n} from '@/src/dbService'\nimport type {\n AdminCancelOrderResult,\n AdminGetAllOrdersResult,\n AdminGetSlotOrdersResult,\n AdminOrderBasicResult,\n AdminOrderDetails,\n AdminOrderItemPackagingResult,\n AdminOrderMessageResult,\n AdminOrderRow,\n AdminOrderUpdateResult,\n AdminRebalanceSlotsResult,\n} from \"@packages/shared\"\n\nconst updateOrderNotesSchema = z.object({\n orderId: z.number(),\n adminNotes: z.string(),\n});\n\nconst getOrderDetailsSchema = z.object({\n orderId: z.number(),\n});\n\nconst updatePackagedSchema = z.object({\n orderId: z.string(),\n isPackaged: z.boolean(),\n});\n\nconst updateDeliveredSchema = z.object({\n orderId: z.string(),\n isDelivered: z.boolean(),\n});\n\nconst updateOrderItemPackagingSchema = z.object({\n orderItemId: z.number(),\n isPackaged: z.boolean().optional(),\n isPackageVerified: z.boolean().optional(),\n});\n\nconst getSlotOrdersSchema = z.object({\n slotId: z.string(),\n});\n\nconst getAllOrdersSchema = z.object({\n cursor: z.number().optional(),\n limit: z.number().default(20),\n slotId: z.number().optional().nullable(),\n packagedFilter: z\n .enum([\"all\", \"packaged\", \"not_packaged\"])\n .optional()\n .default(\"all\"),\n deliveredFilter: z\n .enum([\"all\", \"delivered\", \"not_delivered\"])\n .optional()\n .default(\"all\"),\n cancellationFilter: z\n .enum([\"all\", \"cancelled\", \"not_cancelled\"])\n .optional()\n .default(\"all\"),\n flashDeliveryFilter: z\n .enum([\"all\", \"flash\", \"regular\"])\n .optional()\n .default(\"all\"),\n});\n\nexport const orderRouter = router({\n updateNotes: protectedProcedure\n .input(updateOrderNotesSchema)\n .mutation(async ({ input }): Promise => {\n const { orderId, adminNotes } = input;\n\n const result = await updateOrderNotesInDb(orderId, adminNotes || null)\n\n /*\n // Old implementation - direct DB query:\n const result = await db\n .update(orders)\n .set({\n adminNotes: adminNotes || null,\n })\n .where(eq(orders.id, orderId))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Order not found\");\n }\n */\n\n if (!result) {\n throw new Error(\"Order not found\")\n }\n\n return result as AdminOrderRow;\n }),\n\n getOrderDetails: protectedProcedure\n .input(getOrderDetailsSchema)\n .query(async ({ input }): Promise => {\n const { orderId } = input;\n\n const orderDetails = await getOrderDetailsInDb(orderId)\n\n /*\n // Old implementation - direct DB queries:\n // Single optimized query with all relations\n const orderData = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n payment: true,\n paymentInfo: true,\n orderStatus: true,\n refunds: true,\n },\n });\n\n if (!orderData) {\n throw new Error(\"Order not found\");\n }\n\n // Get coupon usage for this specific order using new orderId field\n const couponUsageData = await db.query.couponUsage.findMany({\n where: eq(couponUsage.orderId, orderData.id),\n with: {\n coupon: true,\n },\n });\n\n let couponData = null;\n if (couponUsageData.length > 0) {\n // Calculate total discount from multiple coupons\n let totalDiscountAmount = 0;\n const orderTotal = parseFloat(orderData.totalAmount.toString());\n\n for (const usage of couponUsageData) {\n let discountAmount = 0;\n\n if (usage.coupon.discountPercent) {\n discountAmount =\n (orderTotal *\n parseFloat(usage.coupon.discountPercent.toString())) /\n 100;\n } else if (usage.coupon.flatDiscount) {\n discountAmount = parseFloat(usage.coupon.flatDiscount.toString());\n }\n\n // Apply max value limit if set\n if (\n usage.coupon.maxValue &&\n discountAmount > parseFloat(usage.coupon.maxValue.toString())\n ) {\n discountAmount = parseFloat(usage.coupon.maxValue.toString());\n }\n\n totalDiscountAmount += discountAmount;\n }\n\n couponData = {\n couponCode: couponUsageData\n .map((u) => u.coupon.couponCode)\n .join(\", \"),\n couponDescription: `${couponUsageData.length} coupons applied`,\n discountAmount: totalDiscountAmount,\n };\n }\n\n // Status determination from included relation\n const statusRecord = orderData.orderStatus?.[0];\n let status: \"pending\" | \"delivered\" | \"cancelled\" = \"pending\";\n if (statusRecord?.isCancelled) {\n status = \"cancelled\";\n } else if (statusRecord?.isDelivered) {\n status = \"delivered\";\n }\n\n // Always include refund data (will be null/undefined if not cancelled)\n const refund = orderData.refunds?.[0];\n\n return {\n id: orderData.id,\n readableId: orderData.id,\n userId: orderData.user.id,\n customerName: `${orderData.user.name}`,\n customerEmail: orderData.user.email,\n customerMobile: orderData.user.mobile,\n address: {\n name: orderData.address.name,\n line1: orderData.address.addressLine1,\n line2: orderData.address.addressLine2,\n city: orderData.address.city,\n state: orderData.address.state,\n pincode: orderData.address.pincode,\n phone: orderData.address.phone,\n },\n slotInfo: orderData.slot\n ? {\n time: orderData.slot.deliveryTime.toISOString(),\n sequence: orderData.slot.deliverySequence,\n }\n : null,\n isCod: orderData.isCod,\n isOnlinePayment: orderData.isOnlinePayment,\n totalAmount: parseFloat(orderData.totalAmount?.toString() || '0') - parseFloat(orderData.deliveryCharge?.toString() || '0'),\n deliveryCharge: parseFloat(orderData.deliveryCharge?.toString() || '0'),\n adminNotes: orderData.adminNotes,\n userNotes: orderData.userNotes,\n createdAt: orderData.createdAt,\n status,\n isPackaged: statusRecord?.isPackaged || false,\n isDelivered: statusRecord?.isDelivered || false,\n items: orderData.orderItems.map((item) => ({\n id: item.id,\n name: item.product.name,\n quantity: item.quantity,\n productSize: item.product.productQuantity,\n price: item.price,\n unit: item.product.unit?.shortNotation,\n amount:\n parseFloat(item.price.toString()) *\n parseFloat(item.quantity || \"0\"),\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n })),\n payment: orderData.payment\n ? {\n status: orderData.payment.status,\n gateway: orderData.payment.gateway,\n merchantOrderId: orderData.payment.merchantOrderId,\n }\n : null,\n paymentInfo: orderData.paymentInfo\n ? {\n status: orderData.paymentInfo.status,\n gateway: orderData.paymentInfo.gateway,\n merchantOrderId: orderData.paymentInfo.merchantOrderId,\n }\n : null,\n // Cancellation details (always included, null if not cancelled)\n cancelReason: statusRecord?.cancelReason || null,\n cancellationReviewed: statusRecord?.cancellationReviewed || false,\n isRefundDone: refund?.refundStatus === \"processed\" || false,\n refundStatus: refund?.refundStatus as RefundStatus,\n refundAmount: refund?.refundAmount\n ? parseFloat(refund.refundAmount.toString())\n : null,\n // Coupon information\n couponData: couponData,\n couponCode: couponData?.couponCode || null,\n couponDescription: couponData?.couponDescription || null,\n discountAmount: couponData?.discountAmount || null,\n orderStatus: statusRecord,\n refundRecord: refund,\n isFlashDelivery: orderData.isFlashDelivery,\n };\n */\n\n if (!orderDetails) {\n throw new Error('Order not found')\n }\n\n return orderDetails\n }),\n\n updatePackaged: protectedProcedure\n .input(updatePackagedSchema)\n .mutation(async ({ input }): Promise => {\n const { orderId, isPackaged } = input;\n\n const result = await updateOrderPackagedInDb(orderId, isPackaged)\n\n /*\n // Old implementation - direct DB queries:\n // Update all order items to the specified packaged state\n await db\n .update(orderItems)\n .set({ is_packaged: isPackaged })\n .where(eq(orderItems.orderId, parseInt(orderId)));\n\n // Also update the order status table for backward compatibility\n if (!isPackaged) {\n await db\n .update(orderStatus)\n .set({ isPackaged, isDelivered: false })\n .where(eq(orderStatus.orderId, parseInt(orderId)));\n } else {\n await db\n .update(orderStatus)\n .set({ isPackaged })\n .where(eq(orderStatus.orderId, parseInt(orderId)));\n }\n\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, parseInt(orderId)),\n });\n if (order) await sendOrderPackagedNotification(order.userId, orderId);\n\n return { success: true };\n */\n\n if (result.userId) await sendOrderPackagedNotification(result.userId, orderId)\n\n return { success: true, userId: result.userId }\n }),\n\n updateDelivered: protectedProcedure\n .input(updateDeliveredSchema)\n .mutation(async ({ input }): Promise => {\n const { orderId, isDelivered } = input;\n\n const result = await updateOrderDeliveredInDb(orderId, isDelivered)\n\n /*\n // Old implementation - direct DB queries:\n await db\n .update(orderStatus)\n .set({ isDelivered })\n .where(eq(orderStatus.orderId, parseInt(orderId)));\n\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, parseInt(orderId)),\n });\n if (order) await sendOrderDeliveredNotification(order.userId, orderId);\n\n return { success: true };\n */\n\n if (result.userId) await sendOrderDeliveredNotification(result.userId, orderId)\n\n return { success: true, userId: result.userId }\n }),\n\n updateOrderItemPackaging: protectedProcedure\n .input(updateOrderItemPackagingSchema)\n .mutation(async ({ input }): Promise => {\n const { orderItemId, isPackaged, isPackageVerified } = input;\n\n const result = await updateOrderItemPackagingInDb(orderItemId, isPackaged, isPackageVerified)\n\n /*\n // Old implementation - direct DB queries:\n // Validate that orderItem exists\n const orderItem = await db.query.orderItems.findFirst({\n where: eq(orderItems.id, orderItemId),\n });\n\n if (!orderItem) {\n throw new ApiError(\"Order item not found\", 404);\n }\n\n // Build update object with only provided fields\n const updateData: any = {};\n if (isPackaged !== undefined) {\n updateData.is_packaged = isPackaged;\n }\n if (isPackageVerified !== undefined) {\n updateData.is_package_verified = isPackageVerified;\n }\n\n // Update the order item\n await db\n .update(orderItems)\n .set(updateData)\n .where(eq(orderItems.id, orderItemId));\n\n return { success: true };\n */\n\n if (!result.updated) {\n throw new ApiError('Order item not found', 404)\n }\n\n return result\n }),\n\n removeDeliveryCharge: protectedProcedure\n .input(z.object({ orderId: z.number() }))\n .mutation(async ({ input }): Promise => {\n const { orderId } = input;\n\n const result = await removeDeliveryChargeInDb(orderId)\n\n /*\n // Old implementation - direct DB queries:\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n });\n\n if (!order) {\n throw new Error('Order not found');\n }\n\n const currentDeliveryCharge = parseFloat(order.deliveryCharge?.toString() || '0');\n const currentTotalAmount = parseFloat(order.totalAmount?.toString() || '0');\n const newTotalAmount = currentTotalAmount - currentDeliveryCharge;\n\n await db\n .update(orders)\n .set({ \n deliveryCharge: '0',\n totalAmount: newTotalAmount.toString()\n })\n .where(eq(orders.id, orderId));\n\n return { success: true, message: 'Delivery charge removed' };\n */\n\n if (!result) {\n throw new Error('Order not found')\n }\n\n return result\n }),\n\n getSlotOrders: protectedProcedure\n .input(getSlotOrdersSchema)\n .query(async ({ input }): Promise => {\n const { slotId } = input;\n\n const result = await getSlotOrdersInDb(slotId)\n\n /*\n // Old implementation - direct DB queries:\n const slotOrders = await db.query.orders.findMany({\n where: eq(orders.slotId, parseInt(slotId)),\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n },\n });\n\n const filteredOrders = slotOrders.filter((order) => {\n const statusRecord = order.orderStatus[0];\n return (\n order.isCod ||\n (statusRecord && statusRecord.paymentStatus === \"success\")\n );\n });\n\n const formattedOrders = filteredOrders.map((order) => {\n const statusRecord = order.orderStatus[0]; // assuming one status per order\n let status: \"pending\" | \"delivered\" | \"cancelled\" = \"pending\";\n if (statusRecord?.isCancelled) {\n status = \"cancelled\";\n } else if (statusRecord?.isDelivered) {\n status = \"delivered\";\n }\n\n const items = order.orderItems.map((item) => ({\n id: item.id,\n name: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n amount: parseFloat(item.quantity) * parseFloat(item.price.toString()),\n unit: item.product.unit?.shortNotation || \"\",\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n }));\n\n return {\n id: order.id,\n readableId: order.id,\n customerName: order.user.name,\n address: `${order.address.addressLine1}${\n order.address.addressLine2 ? `, ${order.address.addressLine2}` : \"\"\n }, ${order.address.city}, ${order.address.state} - ${\n order.address.pincode\n }, Phone: ${order.address.phone}`,\n addressId: order.addressId,\n latitude: order.address.adminLatitude ?? order.address.latitude,\n longitude: order.address.adminLongitude ?? order.address.longitude,\n totalAmount: parseFloat(order.totalAmount),\n items,\n deliveryTime: order.slot?.deliveryTime.toISOString() || null,\n status,\n isPackaged:\n order.orderItems.every((item) => item.is_packaged) || false,\n isDelivered: statusRecord?.isDelivered || false,\n isCod: order.isCod,\n paymentMode: order.isCod ? \"COD\" : \"Online\",\n paymentStatus: statusRecord?.paymentStatus || \"pending\",\n slotId: order.slotId,\n adminNotes: order.adminNotes,\n userNotes: order.userNotes,\n };\n });\n\n return { success: true, data: formattedOrders };\n */\n\n return result\n }),\n\n updateAddressCoords: protectedProcedure\n .input(\n z.object({\n addressId: z.number(),\n latitude: z.number(),\n longitude: z.number(),\n })\n )\n .mutation(async ({ input }): Promise => {\n const { addressId, latitude, longitude } = input;\n\n const result = await updateAddressCoordsInDb(addressId, latitude, longitude)\n\n /*\n // Old implementation - direct DB queries:\n const result = await db\n .update(addresses)\n .set({\n adminLatitude: latitude,\n adminLongitude: longitude,\n })\n .where(eq(addresses.id, addressId))\n .returning();\n\n if (result.length === 0) {\n throw new ApiError(\"Address not found\", 404);\n }\n\n return { success: true };\n */\n\n if (!result.success) {\n throw new ApiError('Address not found', 404)\n }\n\n return result\n }),\n\n getAll: protectedProcedure\n .input(getAllOrdersSchema)\n .query(async ({ input }): Promise => {\n try {\n const result = await getAllOrdersInDb(input)\n const userIds = [...new Set(result.orders.map((order) => order.userId))]\n const negativityScores = await getMultipleUserNegativityScores(userIds)\n\n const orders = result.orders.map((order) => {\n const { userId, userNegativityScore, ...rest } = order\n return {\n ...rest,\n userNegativityScore: negativityScores[userId] || 0,\n }\n })\n\n /*\n // Old implementation - direct DB queries:\n const {\n cursor,\n limit,\n slotId,\n packagedFilter,\n deliveredFilter,\n cancellationFilter,\n flashDeliveryFilter,\n } = input;\n\n let whereCondition: SQL | undefined = eq(orders.id, orders.id); // always true\n if (cursor) {\n whereCondition = and(whereCondition, lt(orders.id, cursor));\n }\n if (slotId) {\n whereCondition = and(whereCondition, eq(orders.slotId, slotId));\n }\n if (packagedFilter === \"packaged\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isPackaged, true)\n );\n } else if (packagedFilter === \"not_packaged\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isPackaged, false)\n );\n }\n if (deliveredFilter === \"delivered\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isDelivered, true)\n );\n } else if (deliveredFilter === \"not_delivered\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isDelivered, false)\n );\n }\n if (cancellationFilter === \"cancelled\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isCancelled, true)\n );\n } else if (cancellationFilter === \"not_cancelled\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isCancelled, false)\n );\n }\n if (flashDeliveryFilter === \"flash\") {\n whereCondition = and(\n whereCondition,\n eq(orders.isFlashDelivery, true)\n );\n } else if (flashDeliveryFilter === \"regular\") {\n whereCondition = and(\n whereCondition,\n eq(orders.isFlashDelivery, false)\n );\n }\n\n const allOrders = await db.query.orders.findMany({\n where: whereCondition,\n orderBy: desc(orders.createdAt),\n limit: limit + 1, // fetch one extra to check if there's more\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n },\n });\n\n const hasMore = allOrders.length > limit;\n const ordersToReturn = hasMore ? allOrders.slice(0, limit) : allOrders;\n\n const userIds = [...new Set(ordersToReturn.map(o => o.userId))];\n const negativityScores = await getMultipleUserNegativityScores(userIds);\n\n const filteredOrders = ordersToReturn.filter((order) => {\n const statusRecord = order.orderStatus[0];\n return (\n order.isCod ||\n (statusRecord && statusRecord.paymentStatus === \"success\")\n );\n });\n\n const formattedOrders = filteredOrders.map((order) => {\n const statusRecord = order.orderStatus[0];\n let status: \"pending\" | \"delivered\" | \"cancelled\" = \"pending\";\n if (statusRecord?.isCancelled) {\n status = \"cancelled\";\n } else if (statusRecord?.isDelivered) {\n status = \"delivered\";\n }\n\n const items = order.orderItems\n .map((item) => ({\n id: item.id,\n name: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n amount:\n parseFloat(item.quantity) * parseFloat(item.price.toString()),\n unit: item.product.unit?.shortNotation || \"\",\n productSize: item.product.productQuantity,\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n }))\n .sort((first, second) => first.id - second.id);\n dayjs.extend(utc);\n return {\n id: order.id,\n orderId: order.id.toString(),\n readableId: order.id,\n customerName: order.user.name,\n customerMobile: order.user.mobile,\n address: `${order.address.addressLine1}${\n order.address.addressLine2\n ? `, ${order.address.addressLine2}`\n : \"\"\n }, ${order.address.city}, ${order.address.state} - ${\n order.address.pincode\n }, Phone: ${order.address.phone}`,\n addressId: order.addressId,\n latitude: order.address.adminLatitude ?? order.address.latitude,\n longitude: order.address.adminLongitude ?? order.address.longitude,\n totalAmount: parseFloat(order.totalAmount),\n deliveryCharge: parseFloat(order.deliveryCharge || \"0\"),\n items,\n createdAt: order.createdAt,\n // deliveryTime: order.slot ? dayjs.utc(order.slot.deliveryTime).format('ddd, MMM D \u2022 h:mm A') : 'Not scheduled',\n deliveryTime: order.slot?.deliveryTime.toISOString() || null,\n status,\n isPackaged:\n order.orderItems.every((item) => item.is_packaged) || false,\n isDelivered: statusRecord?.isDelivered || false,\n isCod: order.isCod,\n isFlashDelivery: order.isFlashDelivery,\n userNotes: order.userNotes,\n adminNotes: order.adminNotes,\n userNegativityScore: negativityScores[order.userId] || 0,\n };\n });\n \n return {\n orders: formattedOrders,\n nextCursor: hasMore\n ? ordersToReturn[ordersToReturn.length - 1].id\n : undefined,\n };\n */\n\n return {\n orders,\n nextCursor: result.nextCursor,\n }\n } catch (e) {\n console.log({ e });\n }\n }),\n\n rebalanceSlots: protectedProcedure\n .input(z.object({ slotIds: z.array(z.number()).min(1).max(50) }))\n .mutation(async ({ input }): Promise => {\n const slotIds = input.slotIds;\n\n const result = await rebalanceSlotsInDb(slotIds)\n\n /*\n // Old implementation - direct DB queries:\n const ordersList = await db.query.orders.findMany({\n where: inArray(orders.slotId, slotIds),\n with: {\n orderItems: {\n with: {\n product: true\n }\n },\n couponUsages: {\n with: {\n coupon: true\n }\n },\n }\n });\n\n const processedOrdersData = ordersList.map((order) => {\n\n let newTotal = order.orderItems.reduce((acc,item) => {\n const latestPrice = +item.product.price;\n const amount = (latestPrice * Number(item.quantity));\n return acc+amount;\n },0)\n\n order.orderItems.forEach(item => {\n item.price = item.product.price;\n item.discountedPrice = item.product.price\n })\n\n const coupon = order.couponUsages[0]?.coupon;\n\n let discount = 0;\n if(coupon && !coupon.isInvalidated && (!coupon.validTill || new Date(coupon.validTill) > new Date())) {\n const proportion = Number(order.orderGroupProportion || 1);\n if(coupon.discountPercent) {\n const maxDiscount = Number(coupon.maxValue || Infinity) * proportion;\n discount = Math.min((newTotal * parseFloat(coupon.discountPercent)) / 100, maxDiscount);\n }\n else {\n discount = Number(coupon.flatDiscount) * proportion;\n }\n }\n newTotal -= discount\n\n const { couponUsages, orderItems: orderItemsRaw, ...rest} = order;\n const updatedOrderItems = orderItemsRaw.map(item => {\n const { product, ...rawOrderItem } = item;\n return rawOrderItem;\n })\n return {order: rest, updatedOrderItems, newTotal }\n })\n\n const updatedOrderIds: number[] = [];\n await db.transaction(async (tx) => {\n for (const { order, updatedOrderItems, newTotal } of processedOrdersData) {\n await tx.update(orders).set({ totalAmount: newTotal.toString() }).where(eq(orders.id, order.id));\n updatedOrderIds.push(order.id);\n\n for (const item of updatedOrderItems) {\n await tx.update(orderItems).set({\n price: item.price,\n discountedPrice: item.discountedPrice\n }).where(eq(orderItems.id, item.id));\n }\n }\n });\n\n return { success: true, updatedOrders: updatedOrderIds, message: `Rebalanced ${updatedOrderIds.length} orders.` };\n */\n\n return result\n }),\n\n cancelOrder: protectedProcedure\n .input(z.object({\n orderId: z.number(),\n reason: z.string().min(1, \"Cancellation reason is required\"),\n }))\n .mutation(async ({ input }): Promise => {\n const { orderId, reason } = input;\n\n const result = await cancelOrderInDb(orderId, reason)\n\n /*\n // Old implementation - direct DB queries:\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n orderStatus: true,\n },\n });\n\n if (!order) {\n throw new ApiError(\"Order not found\", 404);\n }\n\n const status = order.orderStatus[0];\n if (!status) {\n throw new ApiError(\"Order status not found\", 400);\n }\n\n if (status.isCancelled) {\n throw new ApiError(\"Order is already cancelled\", 400);\n }\n\n if (status.isDelivered) {\n throw new ApiError(\"Cannot cancel delivered order\", 400);\n }\n\n const result = await db.transaction(async (tx) => {\n await tx\n .update(orderStatus)\n .set({\n isCancelled: true,\n isCancelledByAdmin: true,\n cancelReason: reason,\n cancellationAdminNotes: reason,\n cancellationReviewed: true,\n cancellationReviewedAt: new Date(),\n })\n .where(eq(orderStatus.id, status.id));\n\n const refundStatus = order.isCod ? \"na\" : \"pending\";\n\n await tx.insert(refunds).values({\n orderId: order.id,\n refundStatus,\n });\n\n return { orderId: order.id, userId: order.userId };\n });\n\n // Publish to Redis for Telegram notification\n await publishCancellation(result.orderId, 'admin', reason);\n\n return { success: true, message: \"Order cancelled successfully\" };\n */\n\n if (!result.success) {\n if (result.error === 'order_not_found') {\n throw new ApiError(result.message, 404)\n }\n if (result.error === 'status_not_found') {\n throw new ApiError(result.message, 400)\n }\n if (result.error === 'already_cancelled') {\n throw new ApiError(result.message, 400)\n }\n if (result.error === 'already_delivered') {\n throw new ApiError(result.message, 400)\n }\n\n throw new ApiError(result.message, 400)\n }\n\n if (result.orderId) {\n await publishCancellation(result.orderId, 'admin', reason)\n }\n\n return { success: true, message: result.message }\n }),\n});\n\n// {\"id\": \"order_Rhh00qJNdjUp8o\", \"notes\": {\"retry\": \"true\", \"customerOrderId\": \"14\"}, \"amount\": 21000, \"entity\": \"order\", \"status\": \"created\", \"receipt\": \"order_14_retry\", \"attempts\": 0, \"currency\": \"INR\", \"offer_id\": null, \"signature\": \"6df20655021f1d6841340f2a2ef2ef9378cb3d43495ab09e85f08aea1a851583\", \"amount_due\": 21000, \"created_at\": 1763575791, \"payment_id\": \"pay_Rhh15cLL28YM7j\", \"amount_paid\": 0}\n\nexport async function deleteOrderById(orderId: number): Promise {\n await deleteOrderByIdInDb(orderId)\n\n /*\n // Old implementation - direct DB queries:\n await db.transaction(async (tx) => {\n await tx.delete(orderItems).where(eq(orderItems.orderId, orderId));\n await tx.delete(orderStatus).where(eq(orderStatus.orderId, orderId));\n await tx.delete(payments).where(eq(payments.orderId, orderId));\n await tx.delete(refunds).where(eq(refunds.orderId, orderId));\n await tx.delete(couponUsage).where(eq(couponUsage.orderId, orderId));\n await tx.delete(complaints).where(eq(complaints.orderId, orderId));\n await tx.delete(orders).where(eq(orders.id, orderId));\n });\n */\n}\n", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport dayjs from 'dayjs'\nimport { appUrl } from '@/src/lib/env-exporter'\nimport {\n checkVendorSnippetExists as checkVendorSnippetExistsInDb,\n getVendorSnippetById as getVendorSnippetByIdInDb,\n getVendorSnippetByCode as getVendorSnippetByCodeInDb,\n getAllVendorSnippets as getAllVendorSnippetsInDb,\n createVendorSnippet as createVendorSnippetInDb,\n updateVendorSnippet as updateVendorSnippetInDb,\n deleteVendorSnippet as deleteVendorSnippetInDb,\n getProductsByIds as getProductsByIdsInDb,\n getVendorSlotById as getVendorSlotByIdInDb,\n getVendorOrdersBySlotId as getVendorOrdersBySlotIdInDb,\n getVendorOrders as getVendorOrdersInDb,\n updateVendorOrderItemPackaging as updateVendorOrderItemPackagingInDb,\n getSlotsAfterDate as getSlotsAfterDateInDb,\n} from '@/src/dbService'\nimport type {\n AdminVendorSnippet,\n AdminVendorSnippetWithProducts,\n AdminVendorSnippetWithSlot,\n AdminVendorSnippetDeleteResult,\n AdminVendorSnippetOrdersResult,\n AdminVendorSnippetOrdersWithSlotResult,\n AdminVendorOrderSummary,\n AdminUpcomingSlotsResult,\n AdminVendorUpdatePackagingResult,\n} from '@packages/shared'\n\nconst createSnippetSchema = z.object({\n snippetCode: z.string().min(1, \"Snippet code is required\"),\n slotId: z.number().optional(),\n productIds: z.array(z.number().int().positive()).min(1, \"At least one product is required\"),\n validTill: z.string().optional(),\n isPermanent: z.boolean().default(false)\n});\n\nconst updateSnippetSchema = z.object({\n id: z.number().int().positive(),\n updates: createSnippetSchema.partial().extend({\n snippetCode: z.string().min(1).optional(),\n productIds: z.array(z.number().int().positive()).optional(),\n isPermanent: z.boolean().default(false)\n }),\n});\n\nconst toApiDate = (value: unknown): string => {\n if (value instanceof Date) {\n return Number.isNaN(value.getTime()) ? '' : value.toISOString()\n }\n\n if (typeof value === 'number') {\n const date = new Date(value)\n return Number.isNaN(date.getTime()) ? '' : date.toISOString()\n }\n\n if (typeof value === 'string') {\n const date = new Date(value)\n return Number.isNaN(date.getTime()) ? value : date.toISOString()\n }\n\n return ''\n}\n\nexport const vendorSnippetsRouter = router({\n create: protectedProcedure\n .input(createSnippetSchema)\n .mutation(async ({ input, ctx }): Promise => {\n const { snippetCode, slotId, productIds, validTill, isPermanent } = input;\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n \n if(slotId) {\n const slot = await getVendorSlotByIdInDb(slotId)\n if (!slot) {\n throw new Error(\"Invalid slot ID\")\n }\n }\n\n const products = await getProductsByIdsInDb(productIds)\n if (products.length !== productIds.length) {\n throw new Error(\"One or more invalid product IDs\")\n }\n\n const existingSnippet = await checkVendorSnippetExistsInDb(snippetCode)\n if (existingSnippet) {\n throw new Error(\"Snippet code already exists\")\n }\n\n const result = await createVendorSnippetInDb({\n snippetCode,\n slotId,\n productIds,\n isPermanent,\n validTill: validTill ? new Date(validTill) : undefined,\n })\n\n /*\n // Old implementation - direct DB queries:\n // Validate slot exists\n if(slotId) {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n });\n if (!slot) {\n throw new Error(\"Invalid slot ID\");\n }\n }\n\n // Validate products exist\n const products = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, productIds),\n });\n if (products.length !== productIds.length) {\n throw new Error(\"One or more invalid product IDs\");\n }\n\n // Check if snippet code already exists\n const existingSnippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n });\n if (existingSnippet) {\n throw new Error(\"Snippet code already exists\");\n }\n\n const result = await db.insert(vendorSnippets).values({\n snippetCode,\n slotId,\n productIds,\n isPermanent,\n validTill: validTill ? new Date(validTill) : undefined,\n }).returning();\n\n return result[0];\n */\n\n return result\n }),\n\n getAll: protectedProcedure\n .query(async (): Promise => {\n console.log('from the vendor snipptes methods')\n\n try {\n const result = await getAllVendorSnippetsInDb()\n\n const snippetsWithProducts = await Promise.all(\n result.map(async (snippet) => {\n const products = await getProductsByIdsInDb(snippet.productIds)\n\n return {\n ...snippet,\n accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`,\n products,\n }\n })\n )\n\n /*\n // Old implementation - direct DB queries:\n const result = await db.query.vendorSnippets.findMany({\n with: {\n slot: true,\n },\n orderBy: (vendorSnippets, { desc }) => [desc(vendorSnippets.createdAt)],\n });\n\n const snippetsWithProducts = await Promise.all(\n result.map(async (snippet) => {\n const products = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n columns: { id: true, name: true },\n });\n\n return {\n ...snippet,\n accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`,\n products: products.map(p => ({ id: p.id, name: p.name })),\n };\n })\n );\n\n return snippetsWithProducts;\n */\n\n return snippetsWithProducts\n }\n catch(e) {\n console.log(e)\n }\n return []\n }),\n\n getById: protectedProcedure\n .input(z.object({ id: z.number().int().positive() }))\n .query(async ({ input }): Promise => {\n const { id } = input;\n\n const result = await getVendorSnippetByIdInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const result = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.id, id),\n with: {\n slot: true,\n },\n });\n\n if (!result) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n return result;\n */\n\n if (!result) {\n throw new Error('Vendor snippet not found')\n }\n\n return result\n }),\n\n update: protectedProcedure\n .input(updateSnippetSchema)\n .mutation(async ({ input }): Promise => {\n const { id, updates } = input;\n \n const existingSnippet = await getVendorSnippetByIdInDb(id)\n if (!existingSnippet) {\n throw new Error('Vendor snippet not found')\n }\n\n if (updates.slotId) {\n const slot = await getVendorSlotByIdInDb(updates.slotId)\n if (!slot) {\n throw new Error('Invalid slot ID')\n }\n }\n\n if (updates.productIds) {\n const products = await getProductsByIdsInDb(updates.productIds)\n if (products.length !== updates.productIds.length) {\n throw new Error('One or more invalid product IDs')\n }\n }\n\n if (updates.snippetCode && updates.snippetCode !== existingSnippet.snippetCode) {\n const duplicateSnippet = await checkVendorSnippetExistsInDb(updates.snippetCode)\n if (duplicateSnippet) {\n throw new Error('Snippet code already exists')\n }\n }\n\n const updateData = {\n ...updates,\n validTill: updates.validTill !== undefined\n ? (updates.validTill ? new Date(updates.validTill) : null)\n : undefined,\n }\n\n const result = await updateVendorSnippetInDb(id, updateData)\n\n /*\n // Old implementation - direct DB queries:\n const existingSnippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.id, id),\n });\n if (!existingSnippet) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n // Validate slot if being updated\n if (updates.slotId) {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, updates.slotId),\n });\n if (!slot) {\n throw new Error(\"Invalid slot ID\");\n }\n }\n\n // Validate products if being updated\n if (updates.productIds) {\n const products = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, updates.productIds),\n });\n if (products.length !== updates.productIds.length) {\n throw new Error(\"One or more invalid product IDs\");\n }\n }\n\n // Check snippet code uniqueness if being updated\n if (updates.snippetCode && updates.snippetCode !== existingSnippet.snippetCode) {\n const duplicateSnippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, updates.snippetCode),\n });\n if (duplicateSnippet) {\n throw new Error(\"Snippet code already exists\");\n }\n }\n\n const updateData: any = { ...updates };\n if (updates.validTill !== undefined) {\n updateData.validTill = updates.validTill ? new Date(updates.validTill) : null;\n }\n\n const result = await db.update(vendorSnippets)\n .set(updateData)\n .where(eq(vendorSnippets.id, id))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Failed to update vendor snippet\");\n }\n\n return result[0];\n */\n\n if (!result) {\n throw new Error('Failed to update vendor snippet')\n }\n\n return result\n }),\n\n delete: protectedProcedure\n .input(z.object({ id: z.number().int().positive() }))\n .mutation(async ({ input }): Promise => {\n const { id } = input;\n\n const result = await deleteVendorSnippetInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const result = await db.delete(vendorSnippets)\n .where(eq(vendorSnippets.id, id))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n return { message: \"Vendor snippet deleted successfully\" };\n */\n\n if (!result) {\n throw new Error('Vendor snippet not found')\n }\n\n return { message: 'Vendor snippet deleted successfully' }\n }),\n\n getOrdersBySnippet: publicProcedure\n .input(z.object({\n snippetCode: z.string().min(1, \"Snippet code is required\")\n }))\n .query(async ({ input }): Promise => {\n const { snippetCode } = input;\n\n const snippet = await getVendorSnippetByCodeInDb(snippetCode)\n\n /*\n // Old implementation - direct DB queries:\n // Find the snippet\n const snippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n });\n\n if (!snippet) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n // Check if snippet is still valid\n if (snippet.validTill && new Date(snippet.validTill) < new Date()) {\n throw new Error(\"Vendor snippet has expired\");\n }\n\n // Query orders that match the snippet criteria\n const matchingOrders = await db.query.orders.findMany({\n where: eq(orders.slotId, snippet.slotId!),\n with: {\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n user: true,\n slot: true,\n },\n orderBy: (orders, { desc }) => [desc(orders.createdAt)],\n });\n */\n\n if (!snippet) {\n throw new Error('Vendor snippet not found')\n }\n\n if (snippet.validTill && new Date(snippet.validTill) < new Date()) {\n throw new Error('Vendor snippet has expired')\n }\n\n if (!snippet.slotId) {\n throw new Error('Vendor snippet not associated with a slot')\n }\n\n const matchingOrders = await getVendorOrdersBySlotIdInDb(snippet.slotId)\n\n // Filter orders that contain at least one of the snippet's products\n const filteredOrders = matchingOrders.filter(order => {\n const status = order.orderStatus;\n if (status[0].isCancelled) return false;\n const orderProductIds = order.orderItems.map(item => item.productId);\n return snippet.productIds.some(productId => orderProductIds.includes(productId));\n });\n\n // Format the response\n const formattedOrders = filteredOrders.map(order => {\n // Filter orderItems to only include products attached to the snippet\n const attachedOrderItems = order.orderItems.filter(item =>\n snippet.productIds.includes(item.productId)\n );\n\n const products = attachedOrderItems.map(item => ({\n orderItemId: item.id,\n productId: item.productId,\n productName: item.product.name,\n quantity: parseFloat(item.quantity),\n productSize: item.product.productQuantity,\n price: parseFloat((item.price ?? 0).toString()),\n unit: item.product.unit?.shortNotation || 'unit',\n subtotal: parseFloat((item.price ?? 0).toString()) * parseFloat(item.quantity),\n is_packaged: item.is_packaged,\n is_package_verified: item.is_package_verified,\n }));\n\n const orderTotal = products.reduce((sum, p) => sum + p.subtotal, 0);\n\n return {\n orderId: `ORD${order.id}`,\n orderDate: toApiDate(order.createdAt),\n customerName: order.user.name || '',\n totalAmount: orderTotal,\n slotInfo: order.slot ? {\n time: toApiDate(order.slot.deliveryTime),\n sequence: order.slot.deliverySequence,\n } : null,\n products,\n matchedProducts: snippet.productIds, // All snippet products are considered matched\n snippetCode: snippet.snippetCode,\n };\n });\n\n return {\n success: true,\n data: formattedOrders,\n snippet: {\n id: snippet.id,\n snippetCode: snippet.snippetCode,\n slotId: snippet.slotId,\n productIds: snippet.productIds,\n validTill: toApiDate(snippet.validTill) || null,\n createdAt: toApiDate(snippet.createdAt),\n isPermanent: snippet.isPermanent,\n },\n }\n }),\n\n getVendorOrders: protectedProcedure\n .query(async (): Promise => {\n const vendorOrders = await getVendorOrdersInDb()\n\n /*\n // Old implementation - direct DB queries:\n const vendorOrders = await db.query.orders.findMany({\n with: {\n user: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n },\n orderBy: (orders, { desc }) => [desc(orders.createdAt)],\n });\n */\n\n return vendorOrders.map(order => ({\n id: order.id,\n status: 'pending',\n orderDate: toApiDate(order.createdAt),\n totalQuantity: order.orderItems.reduce((sum, item) => sum + parseFloat(item.quantity || '0'), 0),\n products: order.orderItems.map(item => ({\n name: item.product.name,\n quantity: parseFloat(item.quantity || '0'),\n unit: item.product.unit?.shortNotation || 'unit',\n })),\n }))\n }),\n\n getUpcomingSlots: publicProcedure\n .query(async (): Promise => {\n const threeHoursAgo = dayjs().subtract(3, 'hour').toDate();\n const slots = await getSlotsAfterDateInDb(threeHoursAgo)\n\n /*\n // Old implementation - direct DB queries:\n const slots = await db.query.deliverySlotInfo.findMany({\n where: and(\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, threeHoursAgo)\n ),\n orderBy: asc(deliverySlotInfo.deliveryTime),\n });\n */\n\n return {\n success: true,\n data: slots.map(slot => ({\n id: slot.id,\n deliveryTime: toApiDate(slot.deliveryTime),\n freezeTime: toApiDate(slot.freezeTime),\n deliverySequence: slot.deliverySequence,\n })),\n }\n }),\n\n getOrdersBySnippetAndSlot: publicProcedure\n .input(z.object({\n snippetCode: z.string().min(1, \"Snippet code is required\"),\n slotId: z.number().int().positive(\"Valid slot ID is required\"),\n }))\n .query(async ({ input }): Promise => {\n const { snippetCode, slotId } = input;\n\n const snippet = await getVendorSnippetByCodeInDb(snippetCode)\n const slot = await getVendorSlotByIdInDb(slotId)\n\n /*\n // Old implementation - direct DB queries:\n // Find the snippet\n const snippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n });\n\n if (!snippet) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n // Find the slot\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n });\n\n if (!slot) {\n throw new Error(\"Slot not found\");\n }\n \n // Query orders that match the slot and snippet criteria\n const matchingOrders = await db.query.orders.findMany({\n where: eq(orders.slotId, slotId),\n with: {\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n user: true,\n slot: true,\n },\n orderBy: (orders, { desc }) => [desc(orders.createdAt)],\n });\n */\n\n if (!snippet) {\n throw new Error('Vendor snippet not found')\n }\n\n if (!slot) {\n throw new Error('Slot not found')\n }\n\n const matchingOrders = await getVendorOrdersBySlotIdInDb(slotId)\n\n // Filter orders that contain at least one of the snippet's products\n const filteredOrders = matchingOrders.filter(order => {\n const status = order.orderStatus;\n if (status[0]?.isCancelled) return false;\n const orderProductIds = order.orderItems.map(item => item.productId);\n return snippet.productIds.some(productId => orderProductIds.includes(productId));\n });\n\n // Format the response\n const formattedOrders = filteredOrders.map(order => {\n // Filter orderItems to only include products attached to the snippet\n const attachedOrderItems = order.orderItems.filter(item =>\n snippet.productIds.includes(item.productId)\n );\n\n const products = attachedOrderItems.map(item => ({\n orderItemId: item.id,\n productId: item.productId,\n productName: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat((item.price ?? 0).toString()),\n unit: item.product.unit?.shortNotation || 'unit',\n subtotal: parseFloat((item.price ?? 0).toString()) * parseFloat(item.quantity),\n productSize: item.product.productQuantity,\n is_packaged: item.is_packaged,\n is_package_verified: item.is_package_verified,\n }));\n\n const orderTotal = products.reduce((sum, p) => sum + p.subtotal, 0);\n\n return {\n orderId: `ORD${order.id}`,\n orderDate: toApiDate(order.createdAt),\n customerName: order.user.name || '',\n totalAmount: orderTotal,\n slotInfo: order.slot ? {\n time: toApiDate(order.slot.deliveryTime),\n sequence: order.slot.deliverySequence,\n } : null,\n products,\n matchedProducts: snippet.productIds,\n snippetCode: snippet.snippetCode,\n };\n });\n\n return {\n success: true,\n data: formattedOrders,\n snippet: {\n id: snippet.id,\n snippetCode: snippet.snippetCode,\n slotId: snippet.slotId,\n productIds: snippet.productIds,\n validTill: toApiDate(snippet.validTill) || null,\n createdAt: toApiDate(snippet.createdAt),\n isPermanent: snippet.isPermanent,\n },\n selectedSlot: {\n id: slot.id,\n deliveryTime: toApiDate(slot.deliveryTime),\n freezeTime: toApiDate(slot.freezeTime),\n deliverySequence: slot.deliverySequence,\n },\n }\n }),\n\n updateOrderItemPackaging: publicProcedure\n .input(z.object({\n orderItemId: z.number().int().positive(\"Valid order item ID required\"),\n is_packaged: z.boolean()\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const { orderItemId, is_packaged } = input;\n\n // Get staff user ID from auth middleware\n // const staffUserId = ctx.staffUser?.id;\n // if (!staffUserId) {\n // throw new Error(\"Unauthorized\");\n // }\n\n const result = await updateVendorOrderItemPackagingInDb(orderItemId, is_packaged)\n\n /*\n // Old implementation - direct DB queries:\n // Check if order item exists and get related data\n const orderItem = await db.query.orderItems.findFirst({\n where: eq(orderItems.id, orderItemId),\n with: {\n order: {\n with: {\n slot: true\n }\n }\n }\n });\n\n if (!orderItem) {\n throw new Error(\"Order item not found\");\n }\n\n // Check if this order item belongs to a slot that has vendor snippets\n // This ensures only order items from vendor-accessible orders can be updated\n if (!orderItem.order.slotId) {\n throw new Error(\"Order item not associated with a vendor slot\");\n }\n\n const snippetExists = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.slotId, orderItem.order.slotId),\n });\n\n if (!snippetExists) {\n throw new Error(\"No vendor snippet found for this order's slot\");\n }\n\n // Update the is_packaged field\n const result = await db.update(orderItems)\n .set({ is_packaged })\n .where(eq(orderItems.id, orderItemId))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Failed to update packaging status\");\n }\n\n return {\n success: true,\n orderItemId,\n is_packaged\n };\n */\n\n if (!result.success) {\n throw new Error(result.message)\n }\n\n return result\n }),\n});\n", "/**\n * Constants for role names to avoid hardcoding and typos\n */\nexport const ROLE_NAMES = {\n ADMIN: 'admin',\n GENERAL_USER: 'gen_user',\n HOSPITAL_ADMIN: 'hospital_admin',\n DOCTOR: 'doctor',\n RECEPTIONIST: 'receptionist'\n};\n\nexport const defaultRole = ROLE_NAMES.GENERAL_USER;\n\n/**\n * RoleManager class to handle caching and retrieving role information\n * Provides methods to fetch roles from DB and cache them for quick access\n */\nclass RoleManager {\n private roles: Map = new Map();\n private rolesByName: Map = new Map();\n private isInitialized: boolean = false;\n\n constructor() {\n // Singleton instance\n }\n\n /**\n * Fetch all roles from the database and cache them\n * This should be called during application startup\n */\n public async fetchRoles(): Promise {\n try {\n // const roles = await db.query.roleInfoTable.findMany();\n \n // // Clear existing maps before adding new data\n // this.roles.clear();\n // this.rolesByName.clear();\n \n // // Cache roles by ID and by name for quick lookup\n // roles.forEach(role => {\n // this.roles.set(role.id, role);\n // this.rolesByName.set(role.name, role);\n // });\n \n // this.isInitialized = true;\n // console.log(`[RoleManager] Cached ${roles.length} roles`);\n } catch (error) {\n console.error('[RoleManager] Error fetching roles:', error);\n throw error;\n }\n }\n\n /**\n * Get all roles from cache\n * If not initialized, fetches roles from DB first\n */\n public async getRoles(): Promise<{ id: number; name: string; description: string | null }[]> {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n return Array.from(this.roles.values());\n }\n\n /**\n * Get role by ID\n * @param id Role ID\n */\n public async getRoleById(id: number): Promise<{ id: number; name: string; description: string | null } | undefined> {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n return this.roles.get(id);\n }\n\n /**\n * Get role by name\n * @param name Role name\n */\n public async getRoleByName(name: string): Promise<{ id: number; name: string; description: string | null } | undefined> {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n return this.rolesByName.get(name);\n }\n\n /**\n * Check if a role exists by name\n * @param name Role name\n */\n public async roleExists(name: string): Promise {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n return this.rolesByName.has(name);\n }\n\n /**\n * Get business roles (roles that are not 'admin' or 'gen_user')\n */\n public async getBusinessRoles(): Promise<{ id: number; name: string; description: string | null }[]> {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n \n return Array.from(this.roles.values()).filter(\n role => role.name !== ROLE_NAMES.ADMIN && role.name !== ROLE_NAMES.GENERAL_USER\n );\n }\n\n /**\n * Force refresh the roles cache\n */\n public async refreshRoles(): Promise {\n await this.fetchRoles();\n }\n}\n\n// Create a singleton instance\nconst roleManager = new RoleManager();\n\n// Export the singleton instance\nexport default roleManager;\n", "export const CONST_KEYS = {\n minRegularOrderValue: 'minRegularOrderValue',\n freeDeliveryThreshold: 'freeDeliveryThreshold',\n deliveryCharge: 'deliveryCharge',\n flashFreeDeliveryThreshold: 'flashFreeDeliveryThreshold',\n flashDeliveryCharge: 'flashDeliveryCharge',\n platformFeePercent: 'platformFeePercent',\n taxRate: 'taxRate',\n tester: 'tester',\n minOrderAmountForCoupon: 'minOrderAmountForCoupon',\n maxCouponDiscount: 'maxCouponDiscount',\n flashDeliverySlotId: 'flashDeliverySlotId',\n readableOrderId: 'readableOrderId',\n versionNum: 'versionNum',\n playStoreUrl: 'playStoreUrl',\n appStoreUrl: 'appStoreUrl',\n popularItems: 'popularItems',\n allItemsOrder: 'allItemsOrder',\n isFlashDeliveryEnabled: 'isFlashDeliveryEnabled',\n supportMobile: 'supportMobile',\n supportEmail: 'supportEmail',\n} as const;\n\nexport const CONST_LABELS: Record = {\n minRegularOrderValue: 'Minimum Regular Order Value',\n freeDeliveryThreshold: 'Free Delivery Threshold',\n deliveryCharge: 'Delivery Charge',\n flashFreeDeliveryThreshold: 'Flash Free Delivery Threshold',\n flashDeliveryCharge: 'Flash Delivery Charge',\n platformFeePercent: 'Platform Fee Percent',\n taxRate: 'Tax Rate',\n tester: 'Tester',\n minOrderAmountForCoupon: 'Minimum Order Amount for Coupon',\n maxCouponDiscount: 'Maximum Coupon Discount',\n flashDeliverySlotId: 'Flash Delivery Slot ID',\n readableOrderId: 'Readable Order ID',\n versionNum: 'Version Number',\n playStoreUrl: 'Play Store URL',\n appStoreUrl: 'App Store URL',\n popularItems: 'Popular Items',\n allItemsOrder: 'All Items Order',\n isFlashDeliveryEnabled: 'Enable Flash Delivery',\n supportMobile: 'Support Mobile',\n supportEmail: 'Support Email',\n};\n\nexport type ConstKey = (typeof CONST_KEYS)[keyof typeof CONST_KEYS];\n\nexport const CONST_KEYS_ARRAY = Object.values(CONST_KEYS) as ConstKey[];\n", "import { getAllKeyValStore } from '@/src/dbService'\n// import redisClient from '@/src/lib/redis-client'\nimport { CONST_KEYS, CONST_KEYS_ARRAY, type ConstKey } from '@/src/lib/const-keys'\n\n// const CONST_REDIS_PREFIX = 'const:';\n\nexport const computeConstants = async (): Promise => {\n try {\n console.log('Computing constants from database...');\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { keyValStore } from '@/src/db/schema'\n\n const constants = await db.select().from(keyValStore);\n */\n\n const constants = await getAllKeyValStore();\n\n // for (const constant of constants) {\n // const redisKey = `${CONST_REDIS_PREFIX}${constant.key}`;\n // const value = JSON.stringify(constant.value);\n // await redisClient.set(redisKey, value);\n // }\n\n console.log(`Computed ${constants.length} constants from DB`);\n } catch (error) {\n console.error('Failed to compute constants:', error);\n throw error;\n }\n};\n\nexport const getConstant = async (key: string): Promise => {\n // const redisKey = `${CONST_REDIS_PREFIX}${key}`;\n // const value = await redisClient.get(redisKey);\n //\n // if (!value) {\n // return null;\n // }\n //\n // try {\n // return JSON.parse(value) as T;\n // } catch {\n // return value as unknown as T;\n // }\n\n const constants = await getAllKeyValStore();\n const entry = constants.find(c => c.key === key);\n\n if (!entry) {\n return null;\n }\n\n return entry.value as T;\n};\n\nexport const getConstants = async (keys: string[]): Promise> => {\n // const redisKeys = keys.map(key => `${CONST_REDIS_PREFIX}${key}`);\n // const values = await redisClient.MGET(redisKeys);\n //\n // const result: Record = {};\n // keys.forEach((key, index) => {\n // const value = values[index];\n // if (!value) {\n // result[key] = null;\n // } else {\n // try {\n // result[key] = JSON.parse(value) as T;\n // } catch {\n // result[key] = value as unknown as T;\n // }\n // }\n // });\n //\n // return result;\n\n const constants = await getAllKeyValStore();\n const constantsMap = new Map(constants.map(c => [c.key, c.value]));\n\n const result: Record = {};\n for (const key of keys) {\n const value = constantsMap.get(key);\n result[key] = (value !== undefined ? value : null) as T | null;\n }\n\n return result;\n};\n\nexport const getAllConstValues = async (): Promise> => {\n // const result: Record = {};\n //\n // for (const key of CONST_KEYS_ARRAY) {\n // result[key] = await getConstant(key);\n // }\n //\n // return result as Record;\n\n const constants = await getAllKeyValStore();\n const constantsMap = new Map(constants.map(c => [c.key, c.value]));\n\n const result: Record = {};\n for (const key of CONST_KEYS_ARRAY) {\n result[key] = constantsMap.get(key) ?? null;\n }\n\n return result as Record;\n};\n\nexport { CONST_KEYS, CONST_KEYS_ARRAY };\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllSlotsWithProductsForCache,\n type SlotWithProductsData,\n} from '@/src/dbService'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport dayjs from 'dayjs'\n\n// Define the structure for slot with products\ninterface SlotWithProducts {\n id: number\n deliveryTime: Date\n freezeTime: Date\n isActive: boolean\n isCapacityFull: boolean\n products: Array<{\n id: number\n name: string\n shortDescription: string | null\n productQuantity: number\n price: string\n marketPrice: string | null\n unit: string | null\n images: string[]\n isOutOfStock: boolean\n storeId: number | null\n nextDeliveryDate: Date\n }>\n}\n\ninterface SlotInfo {\n id: number\n deliveryTime: Date\n freezeTime: Date\n isCapacityFull: boolean\n}\n\nasync function transformSlotToStoreSlot(slot: SlotWithProductsData): Promise {\n return {\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isCapacityFull: slot.isCapacityFull,\n products: slot.productSlots.map((productSlot) => ({\n id: productSlot.product.id,\n name: productSlot.product.name,\n productQuantity: productSlot.product.productQuantity,\n shortDescription: productSlot.product.shortDescription,\n price: productSlot.product.price.toString(),\n marketPrice: productSlot.product.marketPrice?.toString() || null,\n unit: productSlot.product.unit?.shortNotation || null,\n images: scaffoldAssetUrl(\n (productSlot.product.images as string[]) || []\n ),\n isOutOfStock: productSlot.product.isOutOfStock,\n storeId: productSlot.product.storeId,\n nextDeliveryDate: slot.deliveryTime,\n })),\n }\n}\n\nfunction extractSlotInfo(slot: SlotWithProductsData): SlotInfo {\n return {\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isCapacityFull: slot.isCapacityFull,\n }\n}\n\nasync function fetchAllTransformedSlots(): Promise {\n const slots = await getAllSlotsWithProductsForCache()\n return Promise.all(slots.map(transformSlotToStoreSlot))\n}\n\nexport async function initializeSlotStore(): Promise {\n try {\n console.log('Initializing slot store in Redis...')\n\n // Fetch active delivery slots with future delivery times\n const slots = await getAllSlotsWithProductsForCache()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { deliverySlotInfo } from '@/src/db/schema'\n import { eq, gt, and, asc } from 'drizzle-orm'\n\n const now = new Date();\n const slots = await db.query.deliverySlotInfo.findMany({\n where: and(\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, now),\n ),\n with: {\n productSlots: {\n with: {\n product: {\n with: {\n unit: true,\n store: true,\n },\n },\n },\n },\n },\n orderBy: asc(deliverySlotInfo.deliveryTime),\n });\n */\n\n // Transform data for storage\n const slotsWithProducts = await Promise.all(\n slots.map(async (slot) => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isCapacityFull: slot.isCapacityFull,\n products: await Promise.all(\n slot.productSlots.map(async (productSlot) => ({\n id: productSlot.product.id,\n name: productSlot.product.name,\n productQuantity: productSlot.product.productQuantity,\n shortDescription: productSlot.product.shortDescription,\n price: productSlot.product.price.toString(),\n marketPrice: productSlot.product.marketPrice?.toString() || null,\n unit: productSlot.product.unit?.shortNotation || null,\n images: scaffoldAssetUrl(\n (productSlot.product.images as string[]) || []\n ),\n isOutOfStock: productSlot.product.isOutOfStock,\n storeId: productSlot.product.storeId,\n nextDeliveryDate: slot.deliveryTime,\n }))\n ),\n }))\n )\n\n // Store each slot in Redis with key pattern \"slot:{id}\"\n // for (const slot of slotsWithProducts) {\n // await redisClient.set(`slot:${slot.id}`, JSON.stringify(slot))\n // }\n\n // Build and store product-slots map\n // Group slots by productId\n const productSlotsMap: Record = {}\n\n for (const slot of slotsWithProducts) {\n for (const product of slot.products) {\n if (!productSlotsMap[product.id]) {\n productSlotsMap[product.id] = []\n }\n productSlotsMap[product.id].push({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isCapacityFull: slot.isCapacityFull,\n })\n }\n }\n\n // Store each product's slots in Redis with key pattern \"product:{id}:slots\"\n // for (const [productId, slotInfos] of Object.entries(productSlotsMap)) {\n // await redisClient.set(\n // `product:${productId}:slots`,\n // JSON.stringify(slotInfos)\n // )\n // }\n\n console.log('Slot store initialized successfully')\n } catch (error) {\n console.error('Error initializing slot store:', error)\n }\n}\n\nexport async function getSlotById(slotId: number): Promise {\n try {\n // const key = `slot:${slotId}`\n // const data = await redisClient.get(key)\n // if (!data) return null\n // return JSON.parse(data) as SlotWithProducts\n\n const slots = await getAllSlotsWithProductsForCache()\n const slot = slots.find(s => s.id === slotId)\n if (!slot) return null\n\n return transformSlotToStoreSlot(slot)\n } catch (error) {\n console.error(`Error getting slot ${slotId}:`, error)\n return null\n }\n}\n\nexport async function getAllSlots(): Promise {\n try {\n // Get all keys matching the pattern \"slot:*\"\n // const keys = await redisClient.KEYS('slot:*')\n //\n // if (keys.length === 0) return []\n //\n // // Get all slots using MGET for better performance\n // const slotsData = await redisClient.MGET(keys)\n //\n // const slots: SlotWithProducts[] = []\n // for (const slotData of slotsData) {\n // if (slotData) {\n // slots.push(JSON.parse(slotData) as SlotWithProducts)\n // }\n // }\n //\n // return slots\n\n return fetchAllTransformedSlots()\n } catch (error) {\n console.error('Error getting all slots:', error)\n return []\n }\n}\n\nexport async function getProductSlots(productId: number): Promise {\n try {\n // const key = `product:${productId}:slots`\n // const data = await redisClient.get(key)\n // if (!data) return []\n // return JSON.parse(data) as SlotInfo[]\n\n const slots = await getAllSlotsWithProductsForCache()\n const productSlots: SlotInfo[] = []\n\n for (const slot of slots) {\n const hasProduct = slot.productSlots.some(ps => ps.product.id === productId)\n if (hasProduct) {\n productSlots.push(extractSlotInfo(slot))\n }\n }\n\n return productSlots\n } catch (error) {\n console.error(`Error getting slots for product ${productId}:`, error)\n return []\n }\n}\n\nexport async function getAllProductsSlots(): Promise> {\n try {\n // Get all keys matching the pattern \"product:*:slots\"\n // const keys = await redisClient.KEYS('product:*:slots')\n //\n // if (keys.length === 0) return {}\n //\n // // Get all product slots using MGET for better performance\n // const productsData = await redisClient.MGET(keys)\n //\n // const result: Record = {}\n // for (const key of keys) {\n // // Extract productId from key \"product:{id}:slots\"\n // const match = key.match(/product:(\\d+):slots/)\n // if (match) {\n // const productId = parseInt(match[1], 10)\n // const dataIndex = keys.indexOf(key)\n // if (productsData[dataIndex]) {\n // result[productId] = JSON.parse(productsData[dataIndex]) as SlotInfo[]\n // }\n // }\n // }\n //\n // return result\n\n const slots = await getAllSlotsWithProductsForCache()\n const result: Record = {}\n\n for (const slot of slots) {\n const slotInfo = extractSlotInfo(slot)\n for (const productSlot of slot.productSlots) {\n const productId = productSlot.product.id\n if (!result[productId]) {\n result[productId] = []\n }\n result[productId].push(slotInfo)\n }\n }\n\n return result\n } catch (error) {\n console.error('Error getting all products slots:', error)\n return {}\n }\n}\n\nexport async function getMultipleProductsSlots(\n productIds: number[]\n): Promise> {\n try {\n if (productIds.length === 0) return {}\n\n // Build keys for all productIds\n // const keys = productIds.map((id) => `product:${id}:slots`)\n //\n // // Use MGET for batch retrieval\n // const productsData = await redisClient.MGET(keys)\n //\n // const result: Record = {}\n // for (let i = 0; i < productIds.length; i++) {\n // const data = productsData[i]\n // if (data) {\n // const slots = JSON.parse(data) as SlotInfo[]\n // // Filter out slots that are at full capacity\n // result[productIds[i]] = slots.filter((slot) => !slot.isCapacityFull)\n // }\n // }\n //\n // return result\n\n const slots = await getAllSlotsWithProductsForCache()\n const productIdSet = new Set(productIds)\n const result: Record = {}\n\n for (const productId of productIds) {\n result[productId] = []\n }\n\n for (const slot of slots) {\n const slotInfo = extractSlotInfo(slot)\n for (const productSlot of slot.productSlots) {\n const pid = productSlot.product.id\n if (productIdSet.has(pid) && !slot.isCapacityFull) {\n result[pid].push(slotInfo)\n }\n }\n }\n\n return result\n } catch (error) {\n console.error('Error getting products slots:', error)\n return {}\n }\n}\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllBannersForCache,\n getBanners,\n getBannerById as getBannerByIdFromDb,\n type BannerData,\n} from '@/src/dbService'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\n\n// Banner Type (matches getBanners return)\ninterface Banner {\n id: number\n name: string\n imageUrl: string | null\n serialNum: number | null\n productIds: number[] | null\n createdAt: Date\n}\n\nexport async function initializeBannerStore(): Promise {\n try {\n console.log('Initializing banner store in Redis...')\n\n const banners = await getAllBannersForCache()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { homeBanners } from '@/src/db/schema'\n import { isNotNull, asc } from 'drizzle-orm'\n\n const banners = await db.query.homeBanners.findMany({\n where: isNotNull(homeBanners.serialNum),\n orderBy: asc(homeBanners.serialNum),\n });\n */\n\n // Store each banner in Redis\n // for (const banner of banners) {\n // const signedImageUrl = banner.imageUrl\n // ? scaffoldAssetUrl(banner.imageUrl)\n // : banner.imageUrl\n //\n // const bannerObj: Banner = {\n // id: banner.id,\n // name: banner.name,\n // imageUrl: signedImageUrl,\n // serialNum: banner.serialNum,\n // productIds: banner.productIds,\n // createdAt: banner.createdAt,\n // }\n //\n // await redisClient.set(`banner:${banner.id}`, JSON.stringify(bannerObj))\n // }\n\n console.log('Banner store initialized successfully')\n } catch (error) {\n console.error('Error initializing banner store:', error)\n }\n}\n\nexport async function getBannerById(id: number): Promise {\n try {\n // const key = `banner:${id}`\n // const data = await redisClient.get(key)\n // if (!data) return null\n // return JSON.parse(data) as Banner\n\n const banner = await getBannerByIdFromDb(id)\n if (!banner) return null\n\n const signedImageUrl = banner.imageUrl\n ? scaffoldAssetUrl(banner.imageUrl)\n : banner.imageUrl\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: signedImageUrl,\n serialNum: banner.serialNum,\n productIds: banner.productIds,\n createdAt: banner.createdAt,\n }\n } catch (error) {\n console.error(`Error getting banner ${id}:`, error)\n return null\n }\n}\n\nexport async function getAllBanners(): Promise {\n try {\n // Get all keys matching the pattern \"banner:*\"\n // const keys = await redisClient.KEYS('banner:*')\n //\n // if (keys.length === 0) return []\n //\n // // Get all banners using MGET for better performance\n // const bannersData = await redisClient.MGET(keys)\n //\n // const banners: Banner[] = []\n // for (const bannerData of bannersData) {\n // if (bannerData) {\n // banners.push(JSON.parse(bannerData) as Banner)\n // }\n // }\n //\n // // Sort by serialNum to maintain the same order as the original query\n // banners.sort((a, b) => (a.serialNum || 0) - (b.serialNum || 0))\n //\n // return banners\n\n const banners = await getBanners()\n\n return banners.map((banner) => {\n const signedImageUrl = banner.imageUrl\n ? scaffoldAssetUrl(banner.imageUrl)\n : banner.imageUrl\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: signedImageUrl,\n serialNum: banner.serialNum,\n productIds: banner.productIds,\n createdAt: banner.createdAt,\n }\n })\n } catch (error) {\n console.error('Error getting all banners:', error)\n return []\n }\n}\n", "import {\n BBox,\n Feature,\n FeatureCollection,\n Geometry,\n GeometryCollection,\n GeometryObject,\n LineString,\n MultiLineString,\n MultiPoint,\n MultiPolygon,\n Point,\n Polygon,\n Position,\n GeoJsonProperties,\n} from \"geojson\";\n\nimport { Id } from \"./lib/geojson.js\";\nexport * from \"./lib/geojson.js\";\n\n/**\n * @module helpers\n */\n\n// TurfJS Combined Types\nexport type Coord = Feature | Point | Position;\n\n/**\n * Linear measurement units.\n *\n * ⚠️ Warning. Be aware of the implications of using radian or degree units to\n * measure distance. The distance represented by a degree of longitude *varies*\n * depending on latitude.\n *\n * See https://www.thoughtco.com/degree-of-latitude-and-longitude-distance-4070616\n * for an illustration of this behaviour.\n *\n * @typedef\n */\nexport type Units =\n | \"meters\"\n | \"metres\"\n | \"millimeters\"\n | \"millimetres\"\n | \"centimeters\"\n | \"centimetres\"\n | \"kilometers\"\n | \"kilometres\"\n | \"miles\"\n | \"nauticalmiles\"\n | \"inches\"\n | \"yards\"\n | \"feet\"\n | \"radians\"\n | \"degrees\";\n\n/**\n * Area measurement units.\n *\n * @typedef\n */\nexport type AreaUnits =\n | Exclude\n | \"acres\"\n | \"hectares\";\n\n/**\n * Grid types.\n *\n * @typedef\n */\nexport type Grid = \"point\" | \"square\" | \"hex\" | \"triangle\";\n\n/**\n * Shorthand corner identifiers.\n *\n * @typedef\n */\nexport type Corners = \"sw\" | \"se\" | \"nw\" | \"ne\" | \"center\" | \"centroid\";\n\n/**\n * Geometries made up of lines i.e. lines and polygons.\n *\n * @typedef\n */\nexport type Lines = LineString | MultiLineString | Polygon | MultiPolygon;\n\n/**\n * Convenience type for all possible GeoJSON.\n *\n * @typedef\n */\nexport type AllGeoJSON =\n | Feature\n | FeatureCollection\n | Geometry\n | GeometryCollection;\n\n/**\n * The Earth radius in meters. Used by Turf modules that model the Earth as a sphere. The {@link https://en.wikipedia.org/wiki/Earth_radius#Arithmetic_mean_radius mean radius} was selected because it is {@link https://rosettacode.org/wiki/Haversine_formula#:~:text=This%20value%20is%20recommended recommended } by the Haversine formula (used by turf/distance) to reduce error.\n *\n * @constant\n */\nexport const earthRadius = 6371008.8;\n\n/**\n * Unit of measurement factors based on earthRadius.\n *\n * Keys are the name of the unit, values are the number of that unit in a single radian\n *\n * @constant\n */\nexport const factors: Record = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: 360 / (2 * Math.PI),\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n\n/**\n\n * Area of measurement factors based on 1 square meter.\n *\n * @constant\n */\nexport const areaFactors: Record = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n nauticalmiles: 2.9155334959812285e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @function\n * @param {GeometryObject} geometry input geometry\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature<\n G extends GeometryObject = Geometry,\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n geom: G | null,\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n const feat: any = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @function\n * @param {(\"Point\" | \"LineString\" | \"Polygon\" | \"MultiPoint\" | \"MultiLineString\" | \"MultiPolygon\")} type Geometry Type\n * @param {Array} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry<\n T extends\n | \"Point\"\n | \"LineString\"\n | \"Polygon\"\n | \"MultiPoint\"\n | \"MultiLineString\"\n | \"MultiPolygon\",\n>(\n type: T,\n coordinates: any[],\n _options: Record = {}\n): Extract {\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry as Extract;\n case \"LineString\":\n return lineString(coordinates).geometry as Extract;\n case \"Polygon\":\n return polygon(coordinates).geometry as Extract;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry as Extract;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry as Extract<\n Geometry,\n { type: T }\n >;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry as Extract<\n Geometry,\n { type: T }\n >;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @function\n * @param {Position} coordinates longitude, latitude position (each in decimal degrees)\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point

(\n coordinates: Position,\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n\n const geom: Point = {\n type: \"Point\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @function\n * @param {Position[]} coordinates an array of Points\n * @param {GeoJsonProperties} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {Id} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points

(\n coordinates: Position[],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection {\n return featureCollection(\n coordinates.map((coords) => {\n return point(coords, properties);\n }),\n options\n );\n}\n\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @function\n * @param {Position[][]} coordinates an array of LinearRings\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon

(\n coordinates: Position[][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n for (const ring of coordinates) {\n if (ring.length < 4) {\n throw new Error(\n \"Each LinearRing of a Polygon must have 4 or more Positions.\"\n );\n }\n\n if (ring[ring.length - 1].length !== ring[0].length) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n\n for (let j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n const geom: Polygon = {\n type: \"Polygon\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @function\n * @param {Position[][][]} coordinates an array of Polygon coordinates\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons

(\n coordinates: Position[][][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection {\n return featureCollection(\n coordinates.map((coords) => {\n return polygon(coords, properties);\n }),\n options\n );\n}\n\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @function\n * @param {Position[]} coordinates an array of Positions\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString

(\n coordinates: Position[],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n const geom: LineString = {\n type: \"LineString\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @function\n * @param {Position[][]} coordinates an array of LinearRings\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {Id} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings

(\n coordinates: Position[][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection {\n return featureCollection(\n coordinates.map((coords) => {\n return lineString(coords, properties);\n }),\n options\n );\n}\n\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @function\n * @param {Array>} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection<\n G extends GeometryObject = Geometry,\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n features: Array>,\n options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection {\n const fc: any = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n\n/**\n * Creates a {@link Feature}<{@link MultiLineString}> based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Position[][]} coordinates an array of LineStrings\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString<\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n coordinates: Position[][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n const geom: MultiLineString = {\n type: \"MultiLineString\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Feature}<{@link MultiPoint}> based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Position[]} coordinates an array of Positions\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint

(\n coordinates: Position[],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n const geom: MultiPoint = {\n type: \"MultiPoint\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Feature}<{@link MultiPolygon}> based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Position[][][]} coordinates an array of Polygons\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon

(\n coordinates: Position[][][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n const geom: MultiPolygon = {\n type: \"MultiPolygon\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a Feature based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Array} geometries an array of GeoJSON Geometries\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection<\n G extends\n | Point\n | LineString\n | Polygon\n | MultiPoint\n | MultiLineString\n | MultiPolygon,\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n geometries: Array,\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature, P> {\n const geom: GeometryCollection = {\n type: \"GeometryCollection\",\n geometries,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Round number to precision\n *\n * @function\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num: number, precision = 0): number {\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n const multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @function\n * @param {number} radians in radians across the sphere\n * @param {Units} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(\n radians: number,\n units: Units = \"kilometers\"\n): number {\n const factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @function\n * @param {number} distance in real units\n * @param {Units} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(\n distance: number,\n units: Units = \"kilometers\"\n): number {\n const factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @function\n * @param {number} distance in real units\n * @param {Units} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance: number, units?: Units): number {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @function\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing: number): number {\n let angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n\n/**\n * Converts any azimuth angle from the north line direction (positive clockwise)\n * and returns an angle between -180 and +180 degrees (positive clockwise), 0 being the north line\n *\n * @function\n * @param {number} angle between 0 and 360 degrees\n * @returns {number} bearing between -180 and +180 degrees\n */\nexport function azimuthToBearing(angle: number): number {\n // Ignore full revolutions (multiples of 360)\n angle = angle % 360;\n\n if (angle > 180) {\n return angle - 360;\n } else if (angle < -180) {\n return angle + 360;\n }\n\n return angle;\n}\n\n/**\n * Converts an angle in radians to degrees\n *\n * @function\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians: number): number {\n // % (2 * Math.PI) radians in case someone passes value > 2π\n const normalisedRadians = radians % (2 * Math.PI);\n return (normalisedRadians * 180) / Math.PI;\n}\n\n/**\n * Converts an angle in degrees to radians\n *\n * @function\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees: number): number {\n // % 360 degrees in case someone passes value > 360\n const normalisedDegrees = degrees % 360;\n return (normalisedDegrees * Math.PI) / 180;\n}\n\n/**\n * Converts a length from one unit to another.\n *\n * @function\n * @param {number} length Length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] Input length unit\n * @param {Units} [finalUnit=\"kilometers\"] Returned length unit\n * @returns {number} The converted length\n */\nexport function convertLength(\n length: number,\n originalUnit: Units = \"kilometers\",\n finalUnit: Units = \"kilometers\"\n): number {\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n\n/**\n * Converts an area from one unit to another.\n *\n * @function\n * @param {number} area Area to be converted\n * @param {AreaUnits} [originalUnit=\"meters\"] Input area unit\n * @param {AreaUnits} [finalUnit=\"kilometers\"] Returned area unit\n * @returns {number} The converted length\n */\nexport function convertArea(\n area: number,\n originalUnit: AreaUnits = \"meters\",\n finalUnit: AreaUnits = \"kilometers\"\n): number {\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n\n const startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n\n const finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n\n return (area / startFactor) * finalFactor;\n}\n\n/**\n * isNumber\n *\n * @function\n * @param {any} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num: any): boolean {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n\n/**\n * isObject\n *\n * @function\n * @param {any} input variable to validate\n * @returns {boolean} true/false, including false for Arrays and Functions\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input: any): boolean {\n return input !== null && typeof input === \"object\" && !Array.isArray(input);\n}\n\n/**\n * Validate BBox\n *\n * @private\n * @param {any} bbox BBox to validate\n * @returns {void}\n * @throws {Error} if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox: any): void {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach((num) => {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n\n/**\n * Validate Id\n *\n * @private\n * @param {any} id Id to validate\n * @returns {void}\n * @throws {Error} if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id: any): void {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n", "import {\n Feature,\n FeatureCollection,\n Geometry,\n LineString,\n MultiPoint,\n MultiLineString,\n MultiPolygon,\n Point,\n Polygon,\n} from \"geojson\";\nimport { isNumber } from \"@turf/helpers\";\n\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @function\n * @param {Array|Geometry|Feature} coord GeoJSON Point or an Array of numbers\n * @returns {Array} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nfunction getCoord(coord: Feature | Point | number[]): number[] {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n\n if (!Array.isArray(coord)) {\n if (\n coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\"\n ) {\n return [...coord.geometry.coordinates];\n }\n if (coord.type === \"Point\") {\n return [...coord.coordinates];\n }\n }\n if (\n Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])\n ) {\n return [...coord];\n }\n\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @function\n * @param {Array|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nfunction getCoords<\n G extends\n | Point\n | LineString\n | Polygon\n | MultiPoint\n | MultiLineString\n | MultiPolygon,\n>(coords: any[] | Feature | G): any[] {\n if (Array.isArray(coords)) {\n return coords;\n }\n\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n } else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n\n throw new Error(\n \"coords must be GeoJSON Feature, Geometry Object or an Array\"\n );\n}\n\n/**\n * Checks if coordinates contains a number\n *\n * @function\n * @param {Array} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nfunction containsNumber(coordinates: any[]): boolean {\n if (\n coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])\n ) {\n return true;\n }\n\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @function\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction geojsonType(value: any, type: string, name: string): void {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n\n if (!value || value.type !== type) {\n throw new Error(\n \"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type\n );\n }\n}\n\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @function\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nfunction featureOf(feature: Feature, type: string, name: string): void {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\n \"Invalid input to \" + name + \", Feature with geometry required\"\n );\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\n \"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type\n );\n }\n}\n\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @function\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction collectionOf(\n featureCollection: FeatureCollection,\n type: string,\n name: string\n) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\n \"Invalid input to \" + name + \", FeatureCollection required\"\n );\n }\n for (const feature of featureCollection.features) {\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\n \"Invalid input to \" + name + \", Feature with geometry required\"\n );\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\n \"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type\n );\n }\n }\n}\n\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nfunction getGeom(geojson: Feature | G): G {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nfunction getType(\n geojson: Feature | FeatureCollection | Geometry,\n _name?: string\n): string {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n\nexport {\n getCoord,\n getCoords,\n containsNumber,\n geojsonType,\n featureOf,\n collectionOf,\n getGeom,\n getType,\n};\n// No default export!\n", "export const epsilon = 1.1102230246251565e-16;\nexport const splitter = 134217729;\nexport const resulterrbound = (3 + 8 * epsilon) * epsilon;\n\n// fast_expansion_sum_zeroelim routine from oritinal code\nexport function sum(elen, e, flen, f, h) {\n let Q, Qnew, hh, bvirt;\n let enow = e[0];\n let fnow = f[0];\n let eindex = 0;\n let findex = 0;\n if ((fnow > enow) === (fnow > -enow)) {\n Q = enow;\n enow = e[++eindex];\n } else {\n Q = fnow;\n fnow = f[++findex];\n }\n let hindex = 0;\n if (eindex < elen && findex < flen) {\n if ((fnow > enow) === (fnow > -enow)) {\n Qnew = enow + Q;\n hh = Q - (Qnew - enow);\n enow = e[++eindex];\n } else {\n Qnew = fnow + Q;\n hh = Q - (Qnew - fnow);\n fnow = f[++findex];\n }\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n while (eindex < elen && findex < flen) {\n if ((fnow > enow) === (fnow > -enow)) {\n Qnew = Q + enow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (enow - bvirt);\n enow = e[++eindex];\n } else {\n Qnew = Q + fnow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n fnow = f[++findex];\n }\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n }\n while (eindex < elen) {\n Qnew = Q + enow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (enow - bvirt);\n enow = e[++eindex];\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n while (findex < flen) {\n Qnew = Q + fnow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n fnow = f[++findex];\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n if (Q !== 0 || hindex === 0) {\n h[hindex++] = Q;\n }\n return hindex;\n}\n\nexport function sum_three(alen, a, blen, b, clen, c, tmp, out) {\n return sum(sum(alen, a, blen, b, tmp), tmp, clen, c, out);\n}\n\n// scale_expansion_zeroelim routine from oritinal code\nexport function scale(elen, e, b, h) {\n let Q, sum, hh, product1, product0;\n let bvirt, c, ahi, alo, bhi, blo;\n\n c = splitter * b;\n bhi = c - (c - b);\n blo = b - bhi;\n let enow = e[0];\n Q = enow * b;\n c = splitter * enow;\n ahi = c - (c - enow);\n alo = enow - ahi;\n hh = alo * blo - (Q - ahi * bhi - alo * bhi - ahi * blo);\n let hindex = 0;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n for (let i = 1; i < elen; i++) {\n enow = e[i];\n product1 = enow * b;\n c = splitter * enow;\n ahi = c - (c - enow);\n alo = enow - ahi;\n product0 = alo * blo - (product1 - ahi * bhi - alo * bhi - ahi * blo);\n sum = Q + product0;\n bvirt = sum - Q;\n hh = Q - (sum - bvirt) + (product0 - bvirt);\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n Q = product1 + sum;\n hh = sum - (Q - product1);\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n if (Q !== 0 || hindex === 0) {\n h[hindex++] = Q;\n }\n return hindex;\n}\n\nexport function negate(elen, e) {\n for (let i = 0; i < elen; i++) e[i] = -e[i];\n return elen;\n}\n\nexport function estimate(elen, e) {\n let Q = e[0];\n for (let i = 1; i < elen; i++) Q += e[i];\n return Q;\n}\n\nexport function vec(n) {\n return new Float64Array(n);\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum} from './util.js';\n\nconst ccwerrboundA = (3 + 16 * epsilon) * epsilon;\nconst ccwerrboundB = (2 + 12 * epsilon) * epsilon;\nconst ccwerrboundC = (9 + 64 * epsilon) * epsilon * epsilon;\n\nconst B = vec(4);\nconst C1 = vec(8);\nconst C2 = vec(12);\nconst D = vec(16);\nconst u = vec(4);\n\nfunction orient2dadapt(ax, ay, bx, by, cx, cy, detsum) {\n let acxtail, acytail, bcxtail, bcytail;\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n const acx = ax - cx;\n const bcx = bx - cx;\n const acy = ay - cy;\n const bcy = by - cy;\n\n s1 = acx * bcy;\n c = splitter * acx;\n ahi = c - (c - acx);\n alo = acx - ahi;\n c = splitter * bcy;\n bhi = c - (c - bcy);\n blo = bcy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acy * bcx;\n c = splitter * acy;\n ahi = c - (c - acy);\n alo = acy - ahi;\n c = splitter * bcx;\n bhi = c - (c - bcx);\n blo = bcx - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n B[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n B[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n B[2] = _j - (u3 - bvirt) + (_i - bvirt);\n B[3] = u3;\n\n let det = estimate(4, B);\n let errbound = ccwerrboundB * detsum;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - acx;\n acxtail = ax - (acx + bvirt) + (bvirt - cx);\n bvirt = bx - bcx;\n bcxtail = bx - (bcx + bvirt) + (bvirt - cx);\n bvirt = ay - acy;\n acytail = ay - (acy + bvirt) + (bvirt - cy);\n bvirt = by - bcy;\n bcytail = by - (bcy + bvirt) + (bvirt - cy);\n\n if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) {\n return det;\n }\n\n errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det);\n det += (acx * bcytail + bcy * acxtail) - (acy * bcxtail + bcx * acytail);\n if (det >= errbound || -det >= errbound) return det;\n\n s1 = acxtail * bcy;\n c = splitter * acxtail;\n ahi = c - (c - acxtail);\n alo = acxtail - ahi;\n c = splitter * bcy;\n bhi = c - (c - bcy);\n blo = bcy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acytail * bcx;\n c = splitter * acytail;\n ahi = c - (c - acytail);\n alo = acytail - ahi;\n c = splitter * bcx;\n bhi = c - (c - bcx);\n blo = bcx - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const C1len = sum(4, B, 4, u, C1);\n\n s1 = acx * bcytail;\n c = splitter * acx;\n ahi = c - (c - acx);\n alo = acx - ahi;\n c = splitter * bcytail;\n bhi = c - (c - bcytail);\n blo = bcytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acy * bcxtail;\n c = splitter * acy;\n ahi = c - (c - acy);\n alo = acy - ahi;\n c = splitter * bcxtail;\n bhi = c - (c - bcxtail);\n blo = bcxtail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const C2len = sum(C1len, C1, 4, u, C2);\n\n s1 = acxtail * bcytail;\n c = splitter * acxtail;\n ahi = c - (c - acxtail);\n alo = acxtail - ahi;\n c = splitter * bcytail;\n bhi = c - (c - bcytail);\n blo = bcytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acytail * bcxtail;\n c = splitter * acytail;\n ahi = c - (c - acytail);\n alo = acytail - ahi;\n c = splitter * bcxtail;\n bhi = c - (c - bcxtail);\n blo = bcxtail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const Dlen = sum(C2len, C2, 4, u, D);\n\n return D[Dlen - 1];\n}\n\nexport function orient2d(ax, ay, bx, by, cx, cy) {\n const detleft = (ay - cy) * (bx - cx);\n const detright = (ax - cx) * (by - cy);\n const det = detleft - detright;\n\n const detsum = Math.abs(detleft + detright);\n if (Math.abs(det) >= ccwerrboundA * detsum) return det;\n\n return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum);\n}\n\nexport function orient2dfast(ax, ay, bx, by, cx, cy) {\n return (ay - cy) * (bx - cx) - (ax - cx) * (by - cy);\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum, scale} from './util.js';\n\nconst o3derrboundA = (7 + 56 * epsilon) * epsilon;\nconst o3derrboundB = (3 + 28 * epsilon) * epsilon;\nconst o3derrboundC = (26 + 288 * epsilon) * epsilon * epsilon;\n\nconst bc = vec(4);\nconst ca = vec(4);\nconst ab = vec(4);\nconst at_b = vec(4);\nconst at_c = vec(4);\nconst bt_c = vec(4);\nconst bt_a = vec(4);\nconst ct_a = vec(4);\nconst ct_b = vec(4);\nconst bct = vec(8);\nconst cat = vec(8);\nconst abt = vec(8);\nconst u = vec(4);\n\nconst _8 = vec(8);\nconst _8b = vec(8);\nconst _16 = vec(8);\nconst _12 = vec(12);\n\nlet fin = vec(192);\nlet fin2 = vec(192);\n\nfunction finadd(finlen, alen, a) {\n finlen = sum(finlen, fin, alen, a, fin2);\n const tmp = fin; fin = fin2; fin2 = tmp;\n return finlen;\n}\n\nfunction tailinit(xtail, ytail, ax, ay, bx, by, a, b) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3, negate;\n if (xtail === 0) {\n if (ytail === 0) {\n a[0] = 0;\n b[0] = 0;\n return 1;\n } else {\n negate = -ytail;\n s1 = negate * ax;\n c = splitter * negate;\n ahi = c - (c - negate);\n alo = negate - ahi;\n c = splitter * ax;\n bhi = c - (c - ax);\n blo = ax - bhi;\n a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n a[1] = s1;\n s1 = ytail * bx;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * bx;\n bhi = c - (c - bx);\n blo = bx - bhi;\n b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n b[1] = s1;\n return 2;\n }\n } else {\n if (ytail === 0) {\n s1 = xtail * ay;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n a[1] = s1;\n negate = -xtail;\n s1 = negate * by;\n c = splitter * negate;\n ahi = c - (c - negate);\n alo = negate - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n b[1] = s1;\n return 2;\n } else {\n s1 = xtail * ay;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ytail * ax;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * ax;\n bhi = c - (c - ax);\n blo = ax - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n a[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n a[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n a[2] = _j - (u3 - bvirt) + (_i - bvirt);\n a[3] = u3;\n s1 = ytail * bx;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * bx;\n bhi = c - (c - bx);\n blo = bx - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = xtail * by;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n b[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n b[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n b[2] = _j - (u3 - bvirt) + (_i - bvirt);\n b[3] = u3;\n return 4;\n }\n }\n}\n\nfunction tailadd(finlen, a, b, k, z) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, u3;\n s1 = a * b;\n c = splitter * a;\n ahi = c - (c - a);\n alo = a - ahi;\n c = splitter * b;\n bhi = c - (c - b);\n blo = b - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n c = splitter * k;\n bhi = c - (c - k);\n blo = k - bhi;\n _i = s0 * k;\n c = splitter * s0;\n ahi = c - (c - s0);\n alo = s0 - ahi;\n u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n _j = s1 * k;\n c = splitter * s1;\n ahi = c - (c - s1);\n alo = s1 - ahi;\n _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n _k = _i + _0;\n bvirt = _k - _i;\n u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n u3 = _j + _k;\n u[2] = _k - (u3 - _j);\n u[3] = u3;\n finlen = finadd(finlen, 4, u);\n if (z !== 0) {\n c = splitter * z;\n bhi = c - (c - z);\n blo = z - bhi;\n _i = s0 * z;\n c = splitter * s0;\n ahi = c - (c - s0);\n alo = s0 - ahi;\n u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n _j = s1 * z;\n c = splitter * s1;\n ahi = c - (c - s1);\n alo = s1 - ahi;\n _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n _k = _i + _0;\n bvirt = _k - _i;\n u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n u3 = _j + _k;\n u[2] = _k - (u3 - _j);\n u[3] = u3;\n finlen = finadd(finlen, 4, u);\n }\n return finlen;\n}\n\nfunction orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent) {\n let finlen;\n let adxtail, bdxtail, cdxtail;\n let adytail, bdytail, cdytail;\n let adztail, bdztail, cdztail;\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3;\n\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n s1 = bdx * cdy;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * bdy;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cdx * ady;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * cdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ca[3] = u3;\n s1 = adx * bdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * ady;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n\n finlen = sum(\n sum(\n scale(4, bc, adz, _8), _8,\n scale(4, ca, bdz, _8b), _8b, _16), _16,\n scale(4, ab, cdz, _8), _8, fin);\n\n let det = estimate(finlen, fin);\n let errbound = o3derrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - adx;\n adxtail = ax - (adx + bvirt) + (bvirt - dx);\n bvirt = bx - bdx;\n bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n bvirt = cx - cdx;\n cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n bvirt = ay - ady;\n adytail = ay - (ady + bvirt) + (bvirt - dy);\n bvirt = by - bdy;\n bdytail = by - (bdy + bvirt) + (bvirt - dy);\n bvirt = cy - cdy;\n cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n bvirt = az - adz;\n adztail = az - (adz + bvirt) + (bvirt - dz);\n bvirt = bz - bdz;\n bdztail = bz - (bdz + bvirt) + (bvirt - dz);\n bvirt = cz - cdz;\n cdztail = cz - (cdz + bvirt) + (bvirt - dz);\n\n if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 &&\n adytail === 0 && bdytail === 0 && cdytail === 0 &&\n adztail === 0 && bdztail === 0 && cdztail === 0) {\n return det;\n }\n\n errbound = o3derrboundC * permanent + resulterrbound * Math.abs(det);\n det +=\n adz * (bdx * cdytail + cdy * bdxtail - (bdy * cdxtail + cdx * bdytail)) + adztail * (bdx * cdy - bdy * cdx) +\n bdz * (cdx * adytail + ady * cdxtail - (cdy * adxtail + adx * cdytail)) + bdztail * (cdx * ady - cdy * adx) +\n cdz * (adx * bdytail + bdy * adxtail - (ady * bdxtail + bdx * adytail)) + cdztail * (adx * bdy - ady * bdx);\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n const at_len = tailinit(adxtail, adytail, bdx, bdy, cdx, cdy, at_b, at_c);\n const bt_len = tailinit(bdxtail, bdytail, cdx, cdy, adx, ady, bt_c, bt_a);\n const ct_len = tailinit(cdxtail, cdytail, adx, ady, bdx, bdy, ct_a, ct_b);\n\n const bctlen = sum(bt_len, bt_c, ct_len, ct_b, bct);\n finlen = finadd(finlen, scale(bctlen, bct, adz, _16), _16);\n\n const catlen = sum(ct_len, ct_a, at_len, at_c, cat);\n finlen = finadd(finlen, scale(catlen, cat, bdz, _16), _16);\n\n const abtlen = sum(at_len, at_b, bt_len, bt_a, abt);\n finlen = finadd(finlen, scale(abtlen, abt, cdz, _16), _16);\n\n if (adztail !== 0) {\n finlen = finadd(finlen, scale(4, bc, adztail, _12), _12);\n finlen = finadd(finlen, scale(bctlen, bct, adztail, _16), _16);\n }\n if (bdztail !== 0) {\n finlen = finadd(finlen, scale(4, ca, bdztail, _12), _12);\n finlen = finadd(finlen, scale(catlen, cat, bdztail, _16), _16);\n }\n if (cdztail !== 0) {\n finlen = finadd(finlen, scale(4, ab, cdztail, _12), _12);\n finlen = finadd(finlen, scale(abtlen, abt, cdztail, _16), _16);\n }\n\n if (adxtail !== 0) {\n if (bdytail !== 0) {\n finlen = tailadd(finlen, adxtail, bdytail, cdz, cdztail);\n }\n if (cdytail !== 0) {\n finlen = tailadd(finlen, -adxtail, cdytail, bdz, bdztail);\n }\n }\n if (bdxtail !== 0) {\n if (cdytail !== 0) {\n finlen = tailadd(finlen, bdxtail, cdytail, adz, adztail);\n }\n if (adytail !== 0) {\n finlen = tailadd(finlen, -bdxtail, adytail, cdz, cdztail);\n }\n }\n if (cdxtail !== 0) {\n if (adytail !== 0) {\n finlen = tailadd(finlen, cdxtail, adytail, bdz, bdztail);\n }\n if (bdytail !== 0) {\n finlen = tailadd(finlen, -cdxtail, bdytail, adz, adztail);\n }\n }\n\n return fin[finlen - 1];\n}\n\nexport function orient3d(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n const bdxcdy = bdx * cdy;\n const cdxbdy = cdx * bdy;\n\n const cdxady = cdx * ady;\n const adxcdy = adx * cdy;\n\n const adxbdy = adx * bdy;\n const bdxady = bdx * ady;\n\n const det =\n adz * (bdxcdy - cdxbdy) +\n bdz * (cdxady - adxcdy) +\n cdz * (adxbdy - bdxady);\n\n const permanent =\n (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * Math.abs(adz) +\n (Math.abs(cdxady) + Math.abs(adxcdy)) * Math.abs(bdz) +\n (Math.abs(adxbdy) + Math.abs(bdxady)) * Math.abs(cdz);\n\n const errbound = o3derrboundA * permanent;\n if (det > errbound || -det > errbound) {\n return det;\n }\n\n return orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent);\n}\n\nexport function orient3dfast(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n return adx * (bdy * cdz - bdz * cdy) +\n bdx * (cdy * adz - cdz * ady) +\n cdx * (ady * bdz - adz * bdy);\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum, sum_three, scale} from './util.js';\n\nconst iccerrboundA = (10 + 96 * epsilon) * epsilon;\nconst iccerrboundB = (4 + 48 * epsilon) * epsilon;\nconst iccerrboundC = (44 + 576 * epsilon) * epsilon * epsilon;\n\nconst bc = vec(4);\nconst ca = vec(4);\nconst ab = vec(4);\nconst aa = vec(4);\nconst bb = vec(4);\nconst cc = vec(4);\nconst u = vec(4);\nconst v = vec(4);\nconst axtbc = vec(8);\nconst aytbc = vec(8);\nconst bxtca = vec(8);\nconst bytca = vec(8);\nconst cxtab = vec(8);\nconst cytab = vec(8);\nconst abt = vec(8);\nconst bct = vec(8);\nconst cat = vec(8);\nconst abtt = vec(4);\nconst bctt = vec(4);\nconst catt = vec(4);\n\nconst _8 = vec(8);\nconst _16 = vec(16);\nconst _16b = vec(16);\nconst _16c = vec(16);\nconst _32 = vec(32);\nconst _32b = vec(32);\nconst _48 = vec(48);\nconst _64 = vec(64);\n\nlet fin = vec(1152);\nlet fin2 = vec(1152);\n\nfunction finadd(finlen, a, alen) {\n finlen = sum(finlen, fin, a, alen, fin2);\n const tmp = fin; fin = fin2; fin2 = tmp;\n return finlen;\n}\n\nfunction incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent) {\n let finlen;\n let adxtail, bdxtail, cdxtail, adytail, bdytail, cdytail;\n let axtbclen, aytbclen, bxtcalen, bytcalen, cxtablen, cytablen;\n let abtlen, bctlen, catlen;\n let abttlen, bcttlen, cattlen;\n let n1, n0;\n\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n\n s1 = bdx * cdy;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * bdy;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cdx * ady;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * cdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ca[3] = u3;\n s1 = adx * bdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * ady;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n\n finlen = sum(\n sum(\n sum(\n scale(scale(4, bc, adx, _8), _8, adx, _16), _16,\n scale(scale(4, bc, ady, _8), _8, ady, _16b), _16b, _32), _32,\n sum(\n scale(scale(4, ca, bdx, _8), _8, bdx, _16), _16,\n scale(scale(4, ca, bdy, _8), _8, bdy, _16b), _16b, _32b), _32b, _64), _64,\n sum(\n scale(scale(4, ab, cdx, _8), _8, cdx, _16), _16,\n scale(scale(4, ab, cdy, _8), _8, cdy, _16b), _16b, _32), _32, fin);\n\n let det = estimate(finlen, fin);\n let errbound = iccerrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - adx;\n adxtail = ax - (adx + bvirt) + (bvirt - dx);\n bvirt = ay - ady;\n adytail = ay - (ady + bvirt) + (bvirt - dy);\n bvirt = bx - bdx;\n bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n bvirt = by - bdy;\n bdytail = by - (bdy + bvirt) + (bvirt - dy);\n bvirt = cx - cdx;\n cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n bvirt = cy - cdy;\n cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 && adytail === 0 && bdytail === 0 && cdytail === 0) {\n return det;\n }\n\n errbound = iccerrboundC * permanent + resulterrbound * Math.abs(det);\n det += ((adx * adx + ady * ady) * ((bdx * cdytail + cdy * bdxtail) - (bdy * cdxtail + cdx * bdytail)) +\n 2 * (adx * adxtail + ady * adytail) * (bdx * cdy - bdy * cdx)) +\n ((bdx * bdx + bdy * bdy) * ((cdx * adytail + ady * cdxtail) - (cdy * adxtail + adx * cdytail)) +\n 2 * (bdx * bdxtail + bdy * bdytail) * (cdx * ady - cdy * adx)) +\n ((cdx * cdx + cdy * cdy) * ((adx * bdytail + bdy * adxtail) - (ady * bdxtail + bdx * adytail)) +\n 2 * (cdx * cdxtail + cdy * cdytail) * (adx * bdy - ady * bdx));\n\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n s1 = adx * adx;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = ady * ady;\n c = splitter * ady;\n ahi = c - (c - ady);\n alo = ady - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n aa[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n aa[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n aa[2] = _j - (u3 - bvirt) + (_i - bvirt);\n aa[3] = u3;\n }\n if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n s1 = bdx * bdx;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = bdy * bdy;\n c = splitter * bdy;\n ahi = c - (c - bdy);\n alo = bdy - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n bb[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n bb[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bb[3] = u3;\n }\n if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n s1 = cdx * cdx;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = cdy * cdy;\n c = splitter * cdy;\n ahi = c - (c - cdy);\n alo = cdy - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n cc[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n cc[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n cc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n cc[3] = u3;\n }\n\n if (adxtail !== 0) {\n axtbclen = scale(4, bc, adxtail, axtbc);\n finlen = finadd(finlen, sum_three(\n scale(axtbclen, axtbc, 2 * adx, _16), _16,\n scale(scale(4, cc, adxtail, _8), _8, bdy, _16b), _16b,\n scale(scale(4, bb, adxtail, _8), _8, -cdy, _16c), _16c, _32, _48), _48);\n }\n if (adytail !== 0) {\n aytbclen = scale(4, bc, adytail, aytbc);\n finlen = finadd(finlen, sum_three(\n scale(aytbclen, aytbc, 2 * ady, _16), _16,\n scale(scale(4, bb, adytail, _8), _8, cdx, _16b), _16b,\n scale(scale(4, cc, adytail, _8), _8, -bdx, _16c), _16c, _32, _48), _48);\n }\n if (bdxtail !== 0) {\n bxtcalen = scale(4, ca, bdxtail, bxtca);\n finlen = finadd(finlen, sum_three(\n scale(bxtcalen, bxtca, 2 * bdx, _16), _16,\n scale(scale(4, aa, bdxtail, _8), _8, cdy, _16b), _16b,\n scale(scale(4, cc, bdxtail, _8), _8, -ady, _16c), _16c, _32, _48), _48);\n }\n if (bdytail !== 0) {\n bytcalen = scale(4, ca, bdytail, bytca);\n finlen = finadd(finlen, sum_three(\n scale(bytcalen, bytca, 2 * bdy, _16), _16,\n scale(scale(4, cc, bdytail, _8), _8, adx, _16b), _16b,\n scale(scale(4, aa, bdytail, _8), _8, -cdx, _16c), _16c, _32, _48), _48);\n }\n if (cdxtail !== 0) {\n cxtablen = scale(4, ab, cdxtail, cxtab);\n finlen = finadd(finlen, sum_three(\n scale(cxtablen, cxtab, 2 * cdx, _16), _16,\n scale(scale(4, bb, cdxtail, _8), _8, ady, _16b), _16b,\n scale(scale(4, aa, cdxtail, _8), _8, -bdy, _16c), _16c, _32, _48), _48);\n }\n if (cdytail !== 0) {\n cytablen = scale(4, ab, cdytail, cytab);\n finlen = finadd(finlen, sum_three(\n scale(cytablen, cytab, 2 * cdy, _16), _16,\n scale(scale(4, aa, cdytail, _8), _8, bdx, _16b), _16b,\n scale(scale(4, bb, cdytail, _8), _8, -adx, _16c), _16c, _32, _48), _48);\n }\n\n if (adxtail !== 0 || adytail !== 0) {\n if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n s1 = bdxtail * cdy;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * cdytail;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n s1 = cdxtail * -bdy;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * -bdy;\n bhi = c - (c - -bdy);\n blo = -bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * -bdytail;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * -bdytail;\n bhi = c - (c - -bdytail);\n blo = -bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n bctlen = sum(4, u, 4, v, bct);\n s1 = bdxtail * cdytail;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdxtail * bdytail;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bctt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bctt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bctt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bctt[3] = u3;\n bcttlen = 4;\n } else {\n bct[0] = 0;\n bctlen = 1;\n bctt[0] = 0;\n bcttlen = 1;\n }\n if (adxtail !== 0) {\n const len = scale(bctlen, bct, adxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(axtbclen, axtbc, adxtail, _16), _16,\n scale(len, _16c, 2 * adx, _32), _32, _48), _48);\n\n const len2 = scale(bcttlen, bctt, adxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * adx, _16), _16,\n scale(len2, _8, adxtail, _16b), _16b,\n scale(len, _16c, adxtail, _32), _32, _32b, _64), _64);\n\n if (bdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, cc, adxtail, _8), _8, bdytail, _16), _16);\n }\n if (cdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, bb, -adxtail, _8), _8, cdytail, _16), _16);\n }\n }\n if (adytail !== 0) {\n const len = scale(bctlen, bct, adytail, _16c);\n finlen = finadd(finlen, sum(\n scale(aytbclen, aytbc, adytail, _16), _16,\n scale(len, _16c, 2 * ady, _32), _32, _48), _48);\n\n const len2 = scale(bcttlen, bctt, adytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * ady, _16), _16,\n scale(len2, _8, adytail, _16b), _16b,\n scale(len, _16c, adytail, _32), _32, _32b, _64), _64);\n }\n }\n if (bdxtail !== 0 || bdytail !== 0) {\n if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n s1 = cdxtail * ady;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * adytail;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n n1 = -cdy;\n n0 = -cdytail;\n s1 = adxtail * n1;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * n1;\n bhi = c - (c - n1);\n blo = n1 - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * n0;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * n0;\n bhi = c - (c - n0);\n blo = n0 - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n catlen = sum(4, u, 4, v, cat);\n s1 = cdxtail * adytail;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adxtail * cdytail;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n catt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n catt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n catt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n catt[3] = u3;\n cattlen = 4;\n } else {\n cat[0] = 0;\n catlen = 1;\n catt[0] = 0;\n cattlen = 1;\n }\n if (bdxtail !== 0) {\n const len = scale(catlen, cat, bdxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(bxtcalen, bxtca, bdxtail, _16), _16,\n scale(len, _16c, 2 * bdx, _32), _32, _48), _48);\n\n const len2 = scale(cattlen, catt, bdxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * bdx, _16), _16,\n scale(len2, _8, bdxtail, _16b), _16b,\n scale(len, _16c, bdxtail, _32), _32, _32b, _64), _64);\n\n if (cdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, aa, bdxtail, _8), _8, cdytail, _16), _16);\n }\n if (adytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, cc, -bdxtail, _8), _8, adytail, _16), _16);\n }\n }\n if (bdytail !== 0) {\n const len = scale(catlen, cat, bdytail, _16c);\n finlen = finadd(finlen, sum(\n scale(bytcalen, bytca, bdytail, _16), _16,\n scale(len, _16c, 2 * bdy, _32), _32, _48), _48);\n\n const len2 = scale(cattlen, catt, bdytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * bdy, _16), _16,\n scale(len2, _8, bdytail, _16b), _16b,\n scale(len, _16c, bdytail, _32), _32, _32b, _64), _64);\n }\n }\n if (cdxtail !== 0 || cdytail !== 0) {\n if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n s1 = adxtail * bdy;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * bdytail;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n n1 = -ady;\n n0 = -adytail;\n s1 = bdxtail * n1;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * n1;\n bhi = c - (c - n1);\n blo = n1 - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * n0;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * n0;\n bhi = c - (c - n0);\n blo = n0 - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n abtlen = sum(4, u, 4, v, abt);\n s1 = adxtail * bdytail;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdxtail * adytail;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n abtt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n abtt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n abtt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n abtt[3] = u3;\n abttlen = 4;\n } else {\n abt[0] = 0;\n abtlen = 1;\n abtt[0] = 0;\n abttlen = 1;\n }\n if (cdxtail !== 0) {\n const len = scale(abtlen, abt, cdxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(cxtablen, cxtab, cdxtail, _16), _16,\n scale(len, _16c, 2 * cdx, _32), _32, _48), _48);\n\n const len2 = scale(abttlen, abtt, cdxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * cdx, _16), _16,\n scale(len2, _8, cdxtail, _16b), _16b,\n scale(len, _16c, cdxtail, _32), _32, _32b, _64), _64);\n\n if (adytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, bb, cdxtail, _8), _8, adytail, _16), _16);\n }\n if (bdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, aa, -cdxtail, _8), _8, bdytail, _16), _16);\n }\n }\n if (cdytail !== 0) {\n const len = scale(abtlen, abt, cdytail, _16c);\n finlen = finadd(finlen, sum(\n scale(cytablen, cytab, cdytail, _16), _16,\n scale(len, _16c, 2 * cdy, _32), _32, _48), _48);\n\n const len2 = scale(abttlen, abtt, cdytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * cdy, _16), _16,\n scale(len2, _8, cdytail, _16b), _16b,\n scale(len, _16c, cdytail, _32), _32, _32b, _64), _64);\n }\n }\n\n return fin[finlen - 1];\n}\n\nexport function incircle(ax, ay, bx, by, cx, cy, dx, dy) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n\n const bdxcdy = bdx * cdy;\n const cdxbdy = cdx * bdy;\n const alift = adx * adx + ady * ady;\n\n const cdxady = cdx * ady;\n const adxcdy = adx * cdy;\n const blift = bdx * bdx + bdy * bdy;\n\n const adxbdy = adx * bdy;\n const bdxady = bdx * ady;\n const clift = cdx * cdx + cdy * cdy;\n\n const det =\n alift * (bdxcdy - cdxbdy) +\n blift * (cdxady - adxcdy) +\n clift * (adxbdy - bdxady);\n\n const permanent =\n (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * alift +\n (Math.abs(cdxady) + Math.abs(adxcdy)) * blift +\n (Math.abs(adxbdy) + Math.abs(bdxady)) * clift;\n\n const errbound = iccerrboundA * permanent;\n\n if (det > errbound || -det > errbound) {\n return det;\n }\n return incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent);\n}\n\nexport function incirclefast(ax, ay, bx, by, cx, cy, dx, dy) {\n const adx = ax - dx;\n const ady = ay - dy;\n const bdx = bx - dx;\n const bdy = by - dy;\n const cdx = cx - dx;\n const cdy = cy - dy;\n\n const abdet = adx * bdy - bdx * ady;\n const bcdet = bdx * cdy - cdx * bdy;\n const cadet = cdx * ady - adx * cdy;\n const alift = adx * adx + ady * ady;\n const blift = bdx * bdx + bdy * bdy;\n const clift = cdx * cdx + cdy * cdy;\n\n return alift * bcdet + blift * cadet + clift * abdet;\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum, sum_three, scale, negate} from './util.js';\n\nconst isperrboundA = (16 + 224 * epsilon) * epsilon;\nconst isperrboundB = (5 + 72 * epsilon) * epsilon;\nconst isperrboundC = (71 + 1408 * epsilon) * epsilon * epsilon;\n\nconst ab = vec(4);\nconst bc = vec(4);\nconst cd = vec(4);\nconst de = vec(4);\nconst ea = vec(4);\nconst ac = vec(4);\nconst bd = vec(4);\nconst ce = vec(4);\nconst da = vec(4);\nconst eb = vec(4);\n\nconst abc = vec(24);\nconst bcd = vec(24);\nconst cde = vec(24);\nconst dea = vec(24);\nconst eab = vec(24);\nconst abd = vec(24);\nconst bce = vec(24);\nconst cda = vec(24);\nconst deb = vec(24);\nconst eac = vec(24);\n\nconst adet = vec(1152);\nconst bdet = vec(1152);\nconst cdet = vec(1152);\nconst ddet = vec(1152);\nconst edet = vec(1152);\nconst abdet = vec(2304);\nconst cddet = vec(2304);\nconst cdedet = vec(3456);\nconst deter = vec(5760);\n\nconst _8 = vec(8);\nconst _8b = vec(8);\nconst _8c = vec(8);\nconst _16 = vec(16);\nconst _24 = vec(24);\nconst _48 = vec(48);\nconst _48b = vec(48);\nconst _96 = vec(96);\nconst _192 = vec(192);\nconst _384x = vec(384);\nconst _384y = vec(384);\nconst _384z = vec(384);\nconst _768 = vec(768);\n\nfunction sum_three_scale(a, b, c, az, bz, cz, out) {\n return sum_three(\n scale(4, a, az, _8), _8,\n scale(4, b, bz, _8b), _8b,\n scale(4, c, cz, _8c), _8c, _16, out);\n}\n\nfunction liftexact(alen, a, blen, b, clen, c, dlen, d, x, y, z, out) {\n const len = sum(\n sum(alen, a, blen, b, _48), _48,\n negate(sum(clen, c, dlen, d, _48b), _48b), _48b, _96);\n\n return sum_three(\n scale(scale(len, _96, x, _192), _192, x, _384x), _384x,\n scale(scale(len, _96, y, _192), _192, y, _384y), _384y,\n scale(scale(len, _96, z, _192), _192, z, _384z), _384z, _768, out);\n}\n\nfunction insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n s1 = ax * by;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bx * ay;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n s1 = bx * cy;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cx * by;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cx * dy;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dx * cy;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n cd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n cd[3] = u3;\n s1 = dx * ey;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ex * dy;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n de[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n de[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n de[2] = _j - (u3 - bvirt) + (_i - bvirt);\n de[3] = u3;\n s1 = ex * ay;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ax * ey;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ea[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ea[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ea[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ea[3] = u3;\n s1 = ax * cy;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cx * ay;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ac[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ac[3] = u3;\n s1 = bx * dy;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dx * by;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bd[3] = u3;\n s1 = cx * ey;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ex * cy;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ce[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ce[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ce[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ce[3] = u3;\n s1 = dx * ay;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ax * dy;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n da[2] = _j - (u3 - bvirt) + (_i - bvirt);\n da[3] = u3;\n s1 = ex * by;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bx * ey;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n eb[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n eb[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n eb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n eb[3] = u3;\n\n const abclen = sum_three_scale(ab, bc, ac, cz, az, -bz, abc);\n const bcdlen = sum_three_scale(bc, cd, bd, dz, bz, -cz, bcd);\n const cdelen = sum_three_scale(cd, de, ce, ez, cz, -dz, cde);\n const dealen = sum_three_scale(de, ea, da, az, dz, -ez, dea);\n const eablen = sum_three_scale(ea, ab, eb, bz, ez, -az, eab);\n const abdlen = sum_three_scale(ab, bd, da, dz, az, bz, abd);\n const bcelen = sum_three_scale(bc, ce, eb, ez, bz, cz, bce);\n const cdalen = sum_three_scale(cd, da, ac, az, cz, dz, cda);\n const deblen = sum_three_scale(de, eb, bd, bz, dz, ez, deb);\n const eaclen = sum_three_scale(ea, ac, ce, cz, ez, az, eac);\n\n const deterlen = sum_three(\n liftexact(cdelen, cde, bcelen, bce, deblen, deb, bcdlen, bcd, ax, ay, az, adet), adet,\n liftexact(dealen, dea, cdalen, cda, eaclen, eac, cdelen, cde, bx, by, bz, bdet), bdet,\n sum_three(\n liftexact(eablen, eab, deblen, deb, abdlen, abd, dealen, dea, cx, cy, cz, cdet), cdet,\n liftexact(abclen, abc, eaclen, eac, bcelen, bce, eablen, eab, dx, dy, dz, ddet), ddet,\n liftexact(bcdlen, bcd, abdlen, abd, cdalen, cda, abclen, abc, ex, ey, ez, edet), edet, cddet, cdedet), cdedet, abdet, deter);\n\n return deter[deterlen - 1];\n}\n\nconst xdet = vec(96);\nconst ydet = vec(96);\nconst zdet = vec(96);\nconst fin = vec(1152);\n\nfunction liftadapt(a, b, c, az, bz, cz, x, y, z, out) {\n const len = sum_three_scale(a, b, c, az, bz, cz, _24);\n return sum_three(\n scale(scale(len, _24, x, _48), _48, x, xdet), xdet,\n scale(scale(len, _24, y, _48), _48, y, ydet), ydet,\n scale(scale(len, _24, z, _48), _48, z, zdet), zdet, _192, out);\n}\n\nfunction insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent) {\n let ab3, bc3, cd3, da3, ac3, bd3;\n\n let aextail, bextail, cextail, dextail;\n let aeytail, beytail, ceytail, deytail;\n let aeztail, beztail, ceztail, deztail;\n\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0;\n\n const aex = ax - ex;\n const bex = bx - ex;\n const cex = cx - ex;\n const dex = dx - ex;\n const aey = ay - ey;\n const bey = by - ey;\n const cey = cy - ey;\n const dey = dy - ey;\n const aez = az - ez;\n const bez = bz - ez;\n const cez = cz - ez;\n const dez = dz - ez;\n\n s1 = aex * bey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bex * aey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n ab3 = _j + _i;\n bvirt = ab3 - _j;\n ab[2] = _j - (ab3 - bvirt) + (_i - bvirt);\n ab[3] = ab3;\n s1 = bex * cey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cex * bey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n bc3 = _j + _i;\n bvirt = bc3 - _j;\n bc[2] = _j - (bc3 - bvirt) + (_i - bvirt);\n bc[3] = bc3;\n s1 = cex * dey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dex * cey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n cd3 = _j + _i;\n bvirt = cd3 - _j;\n cd[2] = _j - (cd3 - bvirt) + (_i - bvirt);\n cd[3] = cd3;\n s1 = dex * aey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = aex * dey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n da3 = _j + _i;\n bvirt = da3 - _j;\n da[2] = _j - (da3 - bvirt) + (_i - bvirt);\n da[3] = da3;\n s1 = aex * cey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cex * aey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n ac3 = _j + _i;\n bvirt = ac3 - _j;\n ac[2] = _j - (ac3 - bvirt) + (_i - bvirt);\n ac[3] = ac3;\n s1 = bex * dey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dex * bey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n bd3 = _j + _i;\n bvirt = bd3 - _j;\n bd[2] = _j - (bd3 - bvirt) + (_i - bvirt);\n bd[3] = bd3;\n\n const finlen = sum(\n sum(\n negate(liftadapt(bc, cd, bd, dez, bez, -cez, aex, aey, aez, adet), adet), adet,\n liftadapt(cd, da, ac, aez, cez, dez, bex, bey, bez, bdet), bdet, abdet), abdet,\n sum(\n negate(liftadapt(da, ab, bd, bez, dez, aez, cex, cey, cez, cdet), cdet), cdet,\n liftadapt(ab, bc, ac, cez, aez, -bez, dex, dey, dez, ddet), ddet, cddet), cddet, fin);\n\n let det = estimate(finlen, fin);\n let errbound = isperrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - aex;\n aextail = ax - (aex + bvirt) + (bvirt - ex);\n bvirt = ay - aey;\n aeytail = ay - (aey + bvirt) + (bvirt - ey);\n bvirt = az - aez;\n aeztail = az - (aez + bvirt) + (bvirt - ez);\n bvirt = bx - bex;\n bextail = bx - (bex + bvirt) + (bvirt - ex);\n bvirt = by - bey;\n beytail = by - (bey + bvirt) + (bvirt - ey);\n bvirt = bz - bez;\n beztail = bz - (bez + bvirt) + (bvirt - ez);\n bvirt = cx - cex;\n cextail = cx - (cex + bvirt) + (bvirt - ex);\n bvirt = cy - cey;\n ceytail = cy - (cey + bvirt) + (bvirt - ey);\n bvirt = cz - cez;\n ceztail = cz - (cez + bvirt) + (bvirt - ez);\n bvirt = dx - dex;\n dextail = dx - (dex + bvirt) + (bvirt - ex);\n bvirt = dy - dey;\n deytail = dy - (dey + bvirt) + (bvirt - ey);\n bvirt = dz - dez;\n deztail = dz - (dez + bvirt) + (bvirt - ez);\n if (aextail === 0 && aeytail === 0 && aeztail === 0 &&\n bextail === 0 && beytail === 0 && beztail === 0 &&\n cextail === 0 && ceytail === 0 && ceztail === 0 &&\n dextail === 0 && deytail === 0 && deztail === 0) {\n return det;\n }\n\n errbound = isperrboundC * permanent + resulterrbound * Math.abs(det);\n\n const abeps = (aex * beytail + bey * aextail) - (aey * bextail + bex * aeytail);\n const bceps = (bex * ceytail + cey * bextail) - (bey * cextail + cex * beytail);\n const cdeps = (cex * deytail + dey * cextail) - (cey * dextail + dex * ceytail);\n const daeps = (dex * aeytail + aey * dextail) - (dey * aextail + aex * deytail);\n const aceps = (aex * ceytail + cey * aextail) - (aey * cextail + cex * aeytail);\n const bdeps = (bex * deytail + dey * bextail) - (bey * dextail + dex * beytail);\n det +=\n (((bex * bex + bey * bey + bez * bez) * ((cez * daeps + dez * aceps + aez * cdeps) +\n (ceztail * da3 + deztail * ac3 + aeztail * cd3)) + (dex * dex + dey * dey + dez * dez) *\n ((aez * bceps - bez * aceps + cez * abeps) + (aeztail * bc3 - beztail * ac3 + ceztail * ab3))) -\n ((aex * aex + aey * aey + aez * aez) * ((bez * cdeps - cez * bdeps + dez * bceps) +\n (beztail * cd3 - ceztail * bd3 + deztail * bc3)) + (cex * cex + cey * cey + cez * cez) *\n ((dez * abeps + aez * bdeps + bez * daeps) + (deztail * ab3 + aeztail * bd3 + beztail * da3)))) +\n 2 * (((bex * bextail + bey * beytail + bez * beztail) * (cez * da3 + dez * ac3 + aez * cd3) +\n (dex * dextail + dey * deytail + dez * deztail) * (aez * bc3 - bez * ac3 + cez * ab3)) -\n ((aex * aextail + aey * aeytail + aez * aeztail) * (bez * cd3 - cez * bd3 + dez * bc3) +\n (cex * cextail + cey * ceytail + cez * ceztail) * (dez * ab3 + aez * bd3 + bez * da3)));\n\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n return insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez);\n}\n\nexport function insphere(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n const aex = ax - ex;\n const bex = bx - ex;\n const cex = cx - ex;\n const dex = dx - ex;\n const aey = ay - ey;\n const bey = by - ey;\n const cey = cy - ey;\n const dey = dy - ey;\n const aez = az - ez;\n const bez = bz - ez;\n const cez = cz - ez;\n const dez = dz - ez;\n\n const aexbey = aex * bey;\n const bexaey = bex * aey;\n const ab = aexbey - bexaey;\n const bexcey = bex * cey;\n const cexbey = cex * bey;\n const bc = bexcey - cexbey;\n const cexdey = cex * dey;\n const dexcey = dex * cey;\n const cd = cexdey - dexcey;\n const dexaey = dex * aey;\n const aexdey = aex * dey;\n const da = dexaey - aexdey;\n const aexcey = aex * cey;\n const cexaey = cex * aey;\n const ac = aexcey - cexaey;\n const bexdey = bex * dey;\n const dexbey = dex * bey;\n const bd = bexdey - dexbey;\n\n const alift = aex * aex + aey * aey + aez * aez;\n const blift = bex * bex + bey * bey + bez * bez;\n const clift = cex * cex + cey * cey + cez * cez;\n const dlift = dex * dex + dey * dey + dez * dez;\n\n const det =\n (clift * (dez * ab + aez * bd + bez * da) - dlift * (aez * bc - bez * ac + cez * ab)) +\n (alift * (bez * cd - cez * bd + dez * bc) - blift * (cez * da + dez * ac + aez * cd));\n\n const aezplus = Math.abs(aez);\n const bezplus = Math.abs(bez);\n const cezplus = Math.abs(cez);\n const dezplus = Math.abs(dez);\n const aexbeyplus = Math.abs(aexbey) + Math.abs(bexaey);\n const bexceyplus = Math.abs(bexcey) + Math.abs(cexbey);\n const cexdeyplus = Math.abs(cexdey) + Math.abs(dexcey);\n const dexaeyplus = Math.abs(dexaey) + Math.abs(aexdey);\n const aexceyplus = Math.abs(aexcey) + Math.abs(cexaey);\n const bexdeyplus = Math.abs(bexdey) + Math.abs(dexbey);\n const permanent =\n (cexdeyplus * bezplus + bexdeyplus * cezplus + bexceyplus * dezplus) * alift +\n (dexaeyplus * cezplus + aexceyplus * dezplus + cexdeyplus * aezplus) * blift +\n (aexbeyplus * dezplus + bexdeyplus * aezplus + dexaeyplus * bezplus) * clift +\n (bexceyplus * aezplus + aexceyplus * bezplus + aexbeyplus * cezplus) * dlift;\n\n const errbound = isperrboundA * permanent;\n if (det > errbound || -det > errbound) {\n return det;\n }\n return -insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent);\n}\n\nexport function inspherefast(pax, pay, paz, pbx, pby, pbz, pcx, pcy, pcz, pdx, pdy, pdz, pex, pey, pez) {\n const aex = pax - pex;\n const bex = pbx - pex;\n const cex = pcx - pex;\n const dex = pdx - pex;\n const aey = pay - pey;\n const bey = pby - pey;\n const cey = pcy - pey;\n const dey = pdy - pey;\n const aez = paz - pez;\n const bez = pbz - pez;\n const cez = pcz - pez;\n const dez = pdz - pez;\n\n const ab = aex * bey - bex * aey;\n const bc = bex * cey - cex * bey;\n const cd = cex * dey - dex * cey;\n const da = dex * aey - aex * dey;\n const ac = aex * cey - cex * aey;\n const bd = bex * dey - dex * bey;\n\n const abc = aez * bc - bez * ac + cez * ab;\n const bcd = bez * cd - cez * bd + dez * bc;\n const cda = cez * da + dez * ac + aez * cd;\n const dab = dez * ab + aez * bd + bez * da;\n\n const alift = aex * aex + aey * aey + aez * aez;\n const blift = bex * bex + bey * bey + bez * bez;\n const clift = cex * cex + cey * cey + cez * cez;\n const dlift = dex * dex + dey * dey + dez * dez;\n\n return (clift * dab - dlift * abc) + (alift * bcd - blift * cda);\n}\n", "\nexport {orient2d, orient2dfast} from './esm/orient2d.js';\nexport {orient3d, orient3dfast} from './esm/orient3d.js';\nexport {incircle, incirclefast} from './esm/incircle.js';\nexport {insphere, inspherefast} from './esm/insphere.js';\n", "import { orient2d } from 'robust-predicates';\n\nfunction pointInPolygon(p, polygon) {\n var i;\n var ii;\n var k = 0;\n var f;\n var u1;\n var v1;\n var u2;\n var v2;\n var currentP;\n var nextP;\n\n var x = p[0];\n var y = p[1];\n\n var numContours = polygon.length;\n for (i = 0; i < numContours; i++) {\n ii = 0;\n var contour = polygon[i];\n var contourLen = contour.length - 1;\n\n currentP = contour[0];\n if (currentP[0] !== contour[contourLen][0] &&\n currentP[1] !== contour[contourLen][1]) {\n throw new Error('First and last coordinates in a ring must be the same')\n }\n\n u1 = currentP[0] - x;\n v1 = currentP[1] - y;\n\n for (ii; ii < contourLen; ii++) {\n nextP = contour[ii + 1];\n\n u2 = nextP[0] - x;\n v2 = nextP[1] - y;\n\n if (v1 === 0 && v2 === 0) {\n if ((u2 <= 0 && u1 >= 0) || (u1 <= 0 && u2 >= 0)) { return 0 }\n } else if ((v2 >= 0 && v1 <= 0) || (v2 <= 0 && v1 >= 0)) {\n f = orient2d(u1, u2, v1, v2, 0, 0);\n if (f === 0) { return 0 }\n if ((f > 0 && v2 > 0 && v1 <= 0) || (f < 0 && v2 <= 0 && v1 > 0)) { k++; }\n }\n currentP = nextP;\n v1 = v2;\n u1 = u2;\n }\n }\n\n if (k % 2 === 0) { return false }\n return true\n}\n\nexport { pointInPolygon as default };\n", "import pip from \"point-in-polygon-hao\";\nimport {\n BBox,\n Feature,\n MultiPolygon,\n Polygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { Coord } from \"@turf/helpers\";\nimport { getCoord, getGeom } from \"@turf/invariant\";\n\n// http://en.wikipedia.org/wiki/Even%E2%80%93odd_rule\n// modified from: https://github.com/substack/point-in-polygon/blob/master/index.js\n// which was modified from http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html\n/**\n * Takes a {@link Point} and a {@link Polygon} or {@link MultiPolygon} and determines if the point\n * resides inside the polygon. The polygon can be convex or concave. The function accounts for holes.\n *\n * @function\n * @param {Coord} point input point\n * @param {Feature} polygon input polygon or multipolygon\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.ignoreBoundary=false] True if polygon boundary should be ignored when determining if\n * the point is inside the polygon otherwise false.\n * @returns {boolean} `true` if the Point is inside the Polygon; `false` if the Point is not inside the Polygon\n * @example\n * var pt = turf.point([-77, 44]);\n * var poly = turf.polygon([[\n * [-81, 41],\n * [-81, 47],\n * [-72, 47],\n * [-72, 41],\n * [-81, 41]\n * ]]);\n *\n * turf.booleanPointInPolygon(pt, poly);\n * //= true\n */\nfunction booleanPointInPolygon<\n G extends Polygon | MultiPolygon,\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n point: Coord,\n polygon: Feature | G,\n options: {\n ignoreBoundary?: boolean;\n } = {}\n) {\n // validation\n if (!point) {\n throw new Error(\"point is required\");\n }\n if (!polygon) {\n throw new Error(\"polygon is required\");\n }\n\n const pt = getCoord(point);\n const geom = getGeom(polygon);\n const type = geom.type;\n const bbox = polygon.bbox;\n let polys: any[] = geom.coordinates;\n\n // Quick elimination if point is not inside bbox\n if (bbox && inBBox(pt, bbox) === false) {\n return false;\n }\n\n if (type === \"Polygon\") {\n polys = [polys];\n }\n let result = false;\n for (var i = 0; i < polys.length; ++i) {\n const polyResult = pip(pt, polys[i]);\n if (polyResult === 0) return options.ignoreBoundary ? false : true;\n else if (polyResult) result = true;\n }\n\n return result;\n}\n\n/**\n * inBBox\n *\n * @private\n * @param {Position} pt point [x,y]\n * @param {BBox} bbox BBox [west, south, east, north]\n * @returns {boolean} true/false if point is inside BBox\n */\nfunction inBBox(pt: number[], bbox: BBox) {\n return (\n bbox[0] <= pt[0] && bbox[1] <= pt[1] && bbox[2] >= pt[0] && bbox[3] >= pt[1]\n );\n}\n\nexport { booleanPointInPolygon };\nexport default booleanPointInPolygon;\n", "/**\n * Turf is a modular geospatial analysis engine written in JavaScript. It performs geospatial\n * processing tasks with GeoJSON data and can be run on a server or in a browser.\n *\n * @module turf\n * @summary Geospatial analysis for JavaScript\n */\nexport { along } from \"@turf/along\";\nexport { angle } from \"@turf/angle\";\nexport { area } from \"@turf/area\";\nexport { bbox } from \"@turf/bbox\";\nexport { bboxClip } from \"@turf/bbox-clip\";\nexport { bboxPolygon } from \"@turf/bbox-polygon\";\nexport { bearing } from \"@turf/bearing\";\nexport { bezierSpline } from \"@turf/bezier-spline\";\nexport { booleanClockwise } from \"@turf/boolean-clockwise\";\nexport { booleanConcave } from \"@turf/boolean-concave\";\nexport { booleanContains } from \"@turf/boolean-contains\";\nexport { booleanCrosses } from \"@turf/boolean-crosses\";\nexport { booleanDisjoint } from \"@turf/boolean-disjoint\";\nexport { booleanEqual } from \"@turf/boolean-equal\";\nexport { booleanIntersects } from \"@turf/boolean-intersects\";\nexport { booleanOverlap } from \"@turf/boolean-overlap\";\nexport { booleanParallel } from \"@turf/boolean-parallel\";\nexport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nexport { booleanPointOnLine } from \"@turf/boolean-point-on-line\";\nexport { booleanTouches } from \"@turf/boolean-touches\";\nexport { booleanValid } from \"@turf/boolean-valid\";\nexport { booleanWithin } from \"@turf/boolean-within\";\nexport { buffer } from \"@turf/buffer\"; // JSTS Module\nexport { center } from \"@turf/center\";\nexport { centerMean } from \"@turf/center-mean\";\nexport { centerMedian } from \"@turf/center-median\";\nexport { centerOfMass } from \"@turf/center-of-mass\";\nexport { centroid } from \"@turf/centroid\";\nexport { circle } from \"@turf/circle\";\nexport { cleanCoords } from \"@turf/clean-coords\";\nexport * from \"@turf/clone\";\nexport * from \"@turf/clusters\";\nexport * as clusters from \"@turf/clusters\";\nexport { clustersDbscan } from \"@turf/clusters-dbscan\";\nexport { clustersKmeans } from \"@turf/clusters-kmeans\";\nexport { collect } from \"@turf/collect\";\nexport { combine } from \"@turf/combine\";\nexport { concave } from \"@turf/concave\";\nexport { convex } from \"@turf/convex\";\nexport { destination } from \"@turf/destination\";\nexport { difference } from \"@turf/difference\"; // JSTS Module\nexport { dissolve } from \"@turf/dissolve\"; // JSTS Sub-Model\nexport { distance } from \"@turf/distance\";\nexport { distanceWeight } from \"@turf/distance-weight\";\nexport { ellipse } from \"@turf/ellipse\";\nexport { envelope } from \"@turf/envelope\";\nexport { explode } from \"@turf/explode\";\nexport { flatten } from \"@turf/flatten\";\nexport { flip } from \"@turf/flip\";\nexport { geojsonRbush } from \"@turf/geojson-rbush\";\nexport { greatCircle } from \"@turf/great-circle\";\nexport * from \"@turf/helpers\";\nexport * as helpers from \"@turf/helpers\";\nexport { hexGrid } from \"@turf/hex-grid\"; // JSTS Sub-Model\nexport { interpolate } from \"@turf/interpolate\"; // JSTS Sub-Model\nexport { intersect } from \"@turf/intersect\"; // JSTS Module\nexport * from \"@turf/invariant\";\nexport * as invariant from \"@turf/invariant\";\nexport { isobands } from \"@turf/isobands\";\nexport { isolines } from \"@turf/isolines\";\nexport { kinks } from \"@turf/kinks\";\nexport { length } from \"@turf/length\";\nexport { lineArc } from \"@turf/line-arc\";\nexport { lineChunk } from \"@turf/line-chunk\";\nexport { lineIntersect } from \"@turf/line-intersect\";\nexport { lineOffset } from \"@turf/line-offset\";\nexport { lineOverlap } from \"@turf/line-overlap\";\nexport { lineSegment } from \"@turf/line-segment\";\nexport { lineSlice } from \"@turf/line-slice\";\nexport { lineSliceAlong } from \"@turf/line-slice-along\";\nexport { lineSplit } from \"@turf/line-split\";\nexport { lineToPolygon } from \"@turf/line-to-polygon\";\nexport { mask } from \"@turf/mask\"; // JSTS Sub-Model\nexport * from \"@turf/meta\";\nexport * as meta from \"@turf/meta\";\nexport { midpoint } from \"@turf/midpoint\";\nexport { moranIndex } from \"@turf/moran-index\";\nexport * from \"@turf/nearest-neighbor-analysis\";\nexport { nearestPoint } from \"@turf/nearest-point\";\nexport { nearestPointOnLine } from \"@turf/nearest-point-on-line\";\nexport { nearestPointToLine } from \"@turf/nearest-point-to-line\";\nexport { planepoint } from \"@turf/planepoint\";\nexport { pointGrid } from \"@turf/point-grid\";\nexport { pointOnFeature } from \"@turf/point-on-feature\";\nexport { pointsWithinPolygon } from \"@turf/points-within-polygon\";\nexport { pointToLineDistance } from \"@turf/point-to-line-distance\";\nexport { pointToPolygonDistance } from \"@turf/point-to-polygon-distance\";\nexport { polygonize } from \"@turf/polygonize\";\nexport { polygonSmooth } from \"@turf/polygon-smooth\";\nexport { polygonTangents } from \"@turf/polygon-tangents\";\nexport { polygonToLine } from \"@turf/polygon-to-line\";\nexport * from \"@turf/projection\";\nexport * as projection from \"@turf/projection\";\nexport * from \"@turf/quadrat-analysis\";\nexport * from \"@turf/random\";\nexport * as random from \"@turf/random\";\nexport { rectangleGrid } from \"@turf/rectangle-grid\"; // JSTS Sub-Model\nexport { rewind } from \"@turf/rewind\";\nexport { rhumbBearing } from \"@turf/rhumb-bearing\";\nexport { rhumbDestination } from \"@turf/rhumb-destination\";\nexport { rhumbDistance } from \"@turf/rhumb-distance\";\nexport { sample } from \"@turf/sample\";\nexport { sector } from \"@turf/sector\";\nexport { shortestPath } from \"@turf/shortest-path\";\nexport { simplify } from \"@turf/simplify\";\nexport { square } from \"@turf/square\";\nexport { squareGrid } from \"@turf/square-grid\"; // JSTS Sub-Model\nexport { standardDeviationalEllipse } from \"@turf/standard-deviational-ellipse\";\nexport { tag } from \"@turf/tag\";\nexport { tesselate } from \"@turf/tesselate\";\nexport { tin } from \"@turf/tin\";\nexport { transformRotate } from \"@turf/transform-rotate\";\nexport { transformScale } from \"@turf/transform-scale\";\nexport { transformTranslate } from \"@turf/transform-translate\";\nexport { triangleGrid } from \"@turf/triangle-grid\"; // JSTS Sub-Model\nexport { truncate } from \"@turf/truncate\";\nexport { union } from \"@turf/union\"; // JSTS Module\nexport { unkinkPolygon } from \"@turf/unkink-polygon\";\nexport { voronoi } from \"@turf/voronoi\";\n", "export const mbnrGeoJson = {\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"properties\": {},\n \"geometry\": {\n \"coordinates\": [\n [\n [\n 78.0540565157155,\n 16.750355644371382\n ],\n [\n 78.02147549424018,\n 16.72066473405593\n ],\n [\n 78.03026125246384,\n 16.71696749930787\n ],\n [\n 78.0438058450269,\n 16.72191442229257\n ],\n [\n 78.01378723066603,\n 16.729427120762438\n ],\n [\n 78.01192390645633,\n 16.767270033080678\n ],\n [\n 77.98897480599248,\n 16.78383139678816\n ],\n [\n 77.98650506846502,\n 16.779477610410623\n ],\n [\n 77.99211289459566,\n 16.764294442899583\n ],\n [\n 77.9917733766166,\n 16.760247911187193\n ],\n [\n 77.9871626670851,\n 16.762487176781022\n ],\n [\n 77.98216269568468,\n 16.762520539253813\n ],\n [\n 77.9728079653313,\n 16.75895746646411\n ],\n [\n 77.97076993211158,\n 16.749241850772236\n ],\n [\n 77.97290869571145,\n 16.714289841456335\n ],\n [\n 77.98673742913684,\n 16.716189282573396\n ],\n [\n 78.00286970994557,\n 16.718191131206893\n ],\n [\n 78.02757966423519,\n 16.720603921728966\n ],\n [\n 78.01653780770818,\n 16.73184590223127\n ],\n [\n 78.0064695230268,\n 16.760236966033375\n ],\n [\n 78.0148831108591,\n 16.760801801995825\n ],\n [\n 78.01488756695255,\n 16.75827980335133\n ],\n [\n 78.0244311364159,\n 16.744778942163208\n ],\n [\n 78.03342267256608,\n 16.760773251410058\n ],\n [\n 78.05078586709863,\n 16.763902127913653\n ],\n [\n 78.0540565157155,\n 16.750355644371382\n ]\n ]\n ],\n \"type\": \"Polygon\"\n }\n }\n ]\n};", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { commonRouter } from '@/src/trpc/apis/common-apis/common'\nimport {\n getStoresSummary,\n healthCheck,\n} from '@/src/dbService'\nimport type { StoresSummaryResponse } from '@packages/shared'\nimport * as turf from '@turf/turf';\nimport { z } from 'zod';\nimport { mbnrGeoJson } from '@/src/lib/mbnr-geojson'\nimport { generateUploadUrl } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getAllConstValues } from '@/src/lib/const-store'\nimport { CONST_KEYS } from '@/src/lib/const-keys'\nimport { assetsDomain, apiCacheKey } from '@/src/lib/env-exporter'\n\nconst polygon = turf.polygon(mbnrGeoJson.features[0].geometry.coordinates);\n\nexport async function scaffoldEssentialConsts() {\n const consts = await getAllConstValues();\n\n return {\n freeDeliveryThreshold: consts[CONST_KEYS.freeDeliveryThreshold] ?? 200,\n deliveryCharge: consts[CONST_KEYS.deliveryCharge] ?? 0,\n flashFreeDeliveryThreshold: consts[CONST_KEYS.flashFreeDeliveryThreshold] ?? 500,\n flashDeliveryCharge: consts[CONST_KEYS.flashDeliveryCharge] ?? 69,\n popularItems: consts[CONST_KEYS.popularItems] ?? '5,3,2,4,1',\n versionNum: consts[CONST_KEYS.versionNum] ?? '1.1.0',\n playStoreUrl: consts[CONST_KEYS.playStoreUrl] ?? 'https://play.google.com/store/apps/details?id=in.freshyo.app',\n appStoreUrl: consts[CONST_KEYS.appStoreUrl] ?? 'https://apps.apple.com/in/app/freshyo/id6756889077',\n webViewHtml: null,\n isWebviewClosable: true,\n isFlashDeliveryEnabled: consts[CONST_KEYS.isFlashDeliveryEnabled] ?? true,\n supportMobile: consts[CONST_KEYS.supportMobile] ?? '',\n supportEmail: consts[CONST_KEYS.supportEmail] ?? '',\n assetsDomain,\n apiCacheKey,\n };\n}\n\nexport const commonApiRouter = router({\n product: commonRouter,\n\n getStoresSummary: publicProcedure\n .query(async (): Promise => {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { storeInfo } from '@/src/db/schema'\n\n const stores = await db.query.storeInfo.findMany({\n columns: {\n id: true,\n name: true,\n description: true,\n },\n });\n */\n\n const stores = await getStoresSummary();\n\n return {\n stores,\n };\n }),\n\n checkLocationInPolygon: publicProcedure\n .input(z.object({\n lat: z.number().min(-90).max(90),\n lng: z.number().min(-180).max(180),\n }))\n .query(({ input }) => {\n try {\n const { lat, lng } = input;\n const point = turf.point([lng, lat]); // GeoJSON: [longitude, latitude]\n const isInside = turf.booleanPointInPolygon(point, polygon);\n return { isInside };\n } catch (error) {\n throw new Error('Invalid coordinates or polygon data');\n }\n }),\n\n generateUploadUrls: protectedProcedure\n .input(z.object({\n contextString: z.enum(['review', 'review_response', 'product_info', 'notification', 'store', 'complaint', 'profile', 'tags']),\n mimeTypes: z.array(z.string()),\n }))\n .mutation(async ({ input }): Promise<{ uploadUrls: string[] }> => {\n const { contextString, mimeTypes } = input;\n\n const uploadUrls: string[] = [];\n const keys: string[] = [];\n\n for (const mimeType of mimeTypes) {\n // Generate key based on context and mime type\n let folder: string;\n if (contextString === 'review') {\n folder = 'review-images';\n } else if (contextString === 'product_info') {\n folder = 'product-images';\n } else if (contextString === 'store') {\n folder = 'store-images';\n } else if (contextString === 'review_response') {\n folder = 'review-response-images';\n } else if (contextString === 'complaint') {\n folder = 'complaint-images';\n } else if (contextString === 'profile') {\n folder = 'profile-images';\n } else if (contextString === 'tags') {\n folder = 'tags';\n } else {\n folder = '';\n }\n\n const extension = mimeType === 'image/jpeg' ? '.jpg' :\n mimeType === 'image/png' ? '.png' :\n mimeType === 'image/gif' ? '.gif' : '.jpg';\n const key = `${folder}/${Date.now()}${extension}`;\n\n try {\n const uploadUrl = await generateUploadUrl(key, mimeType);\n uploadUrls.push(uploadUrl);\n keys.push(key);\n\n } catch (error) {\n console.error('Error generating upload URL:', error);\n throw new ApiError('Failed to generate upload URL', 500);\n }\n }\n return { uploadUrls };\n }),\n\n healthCheck: publicProcedure\n .query(async () => {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { keyValStore, productInfo } from '@/src/db/schema'\n\n // Test DB connection by selecting product names\n // await db.select({ name: productInfo.name }).from(productInfo).limit(1);\n await db.select({ key: keyValStore.key }).from(keyValStore).limit(1);\n */\n\n const result = await healthCheck();\n return result;\n }),\n\n essentialConsts: publicProcedure\n .query(async () => {\n const response = await scaffoldEssentialConsts();\n return response;\n }),\n});\n\nexport type CommonApiRouter = typeof commonApiRouter;\n", "import { router, publicProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getTagsByStoreId } from '@/src/stores/product-tag-store'\nimport {\n getUserStoreSummaries as getUserStoreSummariesInDb,\n getUserStoreDetail as getUserStoreDetailInDb,\n} from '@/src/dbService'\nimport type {\n UserStoresResponse,\n UserStoreDetail,\n UserStoreSummary,\n} from '@packages/shared'\n\nexport async function scaffoldStores(): Promise {\n const storesData = await getUserStoreSummariesInDb()\n\n /*\n // Old implementation - direct DB queries:\n const storesData = await db\n .select({\n id: storeInfo.id,\n name: storeInfo.name,\n description: storeInfo.description,\n imageUrl: storeInfo.imageUrl,\n productCount: sql`count(${productInfo.id})`.as('productCount'),\n })\n .from(storeInfo)\n .leftJoin(\n productInfo,\n and(eq(productInfo.storeId, storeInfo.id), eq(productInfo.isSuspended, false))\n )\n .groupBy(storeInfo.id);\n */\n\n const storesWithDetails: UserStoreSummary[] = storesData.map((store) => {\n const signedImageUrl = store.imageUrl ? scaffoldAssetUrl(store.imageUrl) : null\n const sampleProducts = store.sampleProducts.map((product) => ({\n id: product.id,\n name: product.name,\n signedImageUrl: product.images && product.images.length > 0\n ? scaffoldAssetUrl(product.images[0])\n : null,\n }))\n\n return {\n id: store.id,\n name: store.name,\n description: store.description,\n signedImageUrl,\n productCount: store.productCount,\n sampleProducts,\n }\n })\n\n return {\n stores: storesWithDetails,\n }\n}\n\nexport async function scaffoldStoreWithProducts(storeId: number): Promise {\n const storeDetail = await getUserStoreDetailInDb(storeId)\n\n /*\n // Old implementation - direct DB queries:\n const storeData = await db.query.storeInfo.findFirst({\n where: eq(storeInfo.id, storeId),\n columns: {\n id: true,\n name: true,\n description: true,\n imageUrl: true,\n },\n });\n\n if (!storeData) {\n throw new ApiError('Store not found', 404);\n }\n\n const signedImageUrl = storeData.imageUrl ? scaffoldAssetUrl(storeData.imageUrl) : null;\n\n const productsData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n incrementStep: productInfo.incrementStep,\n unitShortNotation: units.shortNotation,\n unitNotation: units.shortNotation,\n productQuantity: productInfo.productQuantity,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(and(eq(productInfo.storeId, storeId), eq(productInfo.isSuspended, false)));\n\n const productsWithSignedUrls = await Promise.all(\n productsData.map(async (product) => ({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n marketPrice: product.marketPrice,\n incrementStep: product.incrementStep,\n unit: product.unitShortNotation,\n unitNotation: product.unitNotation,\n images: scaffoldAssetUrl((product.images as string[]) || []),\n isOutOfStock: product.isOutOfStock,\n productQuantity: product.productQuantity\n }))\n );\n\n const tags = await getTagsByStoreId(storeId);\n\n return {\n store: {\n id: storeData.id,\n name: storeData.name,\n description: storeData.description,\n signedImageUrl,\n },\n products: productsWithSignedUrls,\n tags: tags.map(tag => ({\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription,\n imageUrl: tag.imageUrl,\n productIds: tag.productIds,\n })),\n };\n */\n\n if (!storeDetail) {\n throw new ApiError('Store not found', 404)\n }\n\n const signedImageUrl = storeDetail.store.imageUrl\n ? scaffoldAssetUrl(storeDetail.store.imageUrl)\n : null\n\n const productsWithSignedUrls = storeDetail.products.map((product) => ({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n marketPrice: product.marketPrice,\n incrementStep: product.incrementStep,\n unit: product.unit,\n unitNotation: product.unitNotation,\n images: scaffoldAssetUrl(product.images || []),\n isOutOfStock: product.isOutOfStock,\n productQuantity: product.productQuantity,\n }))\n\n const tags = await getTagsByStoreId(storeId)\n\n return {\n store: {\n id: storeDetail.store.id,\n name: storeDetail.store.name,\n description: storeDetail.store.description,\n signedImageUrl,\n },\n products: productsWithSignedUrls,\n tags: tags.map(tag => ({\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription,\n imageUrl: tag.imageUrl,\n productIds: tag.productIds,\n })),\n }\n}\n\nexport const storesRouter = router({\n getStores: publicProcedure\n .query(async (): Promise => {\n const response = await scaffoldStores();\n return response;\n }),\n\n getStoreWithProducts: publicProcedure\n .input(z.object({\n storeId: z.number(),\n }))\n .query(async ({ input }): Promise => {\n const { storeId } = input;\n const response = await scaffoldStoreWithProducts(storeId);\n return response;\n }),\n});\n", "import { router, publicProcedure } from \"@/src/trpc/trpc-index\"\nimport { z } from \"zod\"\nimport { getAllSlots as getAllSlotsFromCache, getSlotById as getSlotByIdFromCache } from \"@/src/stores/slot-store\"\nimport dayjs from 'dayjs'\nimport { getUserActiveSlotsList as getUserActiveSlotsListInDb, getUserProductAvailability as getUserProductAvailabilityInDb } from '@/src/dbService'\nimport type { UserSlotData, UserSlotsListResponse, UserSlotsWithProductsResponse } from '@packages/shared'\n\n// Helper method to get formatted slot data by ID\nasync function getSlotData(slotId: number) {\n const slot = await getSlotByIdFromCache(slotId);\n\n if (!slot) {\n return null;\n }\n\n const currentTime = new Date();\n if (dayjs(slot.freezeTime).isBefore(currentTime)) {\n return null;\n }\n\n return {\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n slotId: slot.id,\n products: slot.products.filter((product) => !product.isOutOfStock),\n };\n}\n\nexport async function scaffoldSlotsWithProducts(): Promise {\n const allSlots = await getAllSlotsFromCache();\n const currentTime = new Date();\n const validSlots = allSlots\n .filter((slot) => {\n return dayjs(slot.freezeTime).isAfter(currentTime) &&\n dayjs(slot.deliveryTime).isAfter(currentTime) &&\n !slot.isCapacityFull;\n })\n .sort((a, b) => dayjs(a.deliveryTime).valueOf() - dayjs(b.deliveryTime).valueOf());\n\n const productAvailability = await getUserProductAvailabilityInDb()\n\n /*\n // Old implementation - direct DB query:\n const allProducts = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n isOutOfStock: productInfo.isOutOfStock,\n isFlashAvailable: productInfo.isFlashAvailable,\n })\n .from(productInfo)\n .where(eq(productInfo.isSuspended, false));\n\n const productAvailability = allProducts.map(product => ({\n id: product.id,\n name: product.name,\n isOutOfStock: product.isOutOfStock,\n isFlashAvailable: product.isFlashAvailable,\n }));\n */\n\n return {\n slots: validSlots,\n productAvailability,\n count: validSlots.length,\n };\n}\n\nexport const slotsRouter = router({\n getSlots: publicProcedure.query(async (): Promise => {\n const slots = await getUserActiveSlotsListInDb()\n\n /*\n // Old implementation - direct DB query:\n const slots = await db.query.deliverySlotInfo.findMany({\n where: eq(deliverySlotInfo.isActive, true),\n });\n */\n\n return {\n slots,\n count: slots.length,\n }\n }),\n\n getSlotsWithProducts: publicProcedure.query(async (): Promise => {\n const response = await scaffoldSlotsWithProducts();\n return response;\n }),\n\n getSlotById: publicProcedure\n .input(z.object({ slotId: z.number() }))\n .query(async ({ input }): Promise => {\n return await getSlotData(input.slotId);\n }),\n});\n", "import { publicProcedure, router } from '@/src/trpc/trpc-index'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport { getUserActiveBanners as getUserActiveBannersInDb } from '@/src/dbService'\nimport type { UserBannersResponse } from '@packages/shared'\n\nexport async function scaffoldBanners(): Promise {\n const banners = await getUserActiveBannersInDb()\n\n /*\n // Old implementation - direct DB queries:\n const banners = await db.query.homeBanners.findMany({\n where: isNotNull(homeBanners.serialNum), // Only show assigned banners\n orderBy: asc(homeBanners.serialNum), // Order by slot number 1-4\n });\n */\n\n const bannersWithSignedUrls = banners.map((banner) => ({\n ...banner,\n imageUrl: banner.imageUrl ? scaffoldAssetUrl(banner.imageUrl) : banner.imageUrl,\n }))\n\n return {\n banners: bannersWithSignedUrls,\n }\n}\n\nexport const bannerRouter = router({\n getBanners: publicProcedure\n .query(async () => {\n const response = await scaffoldBanners();\n return response;\n }),\n});\n", "// Central types export file\n// Re-export all types from the types folder\n\nexport type * from './admin';\nexport type * from './user';\nexport type * from './store.types';\n", "export const CACHE_FILENAMES = {\n products: 'products.json',\n stores: 'stores.json',\n slots: 'slots.json',\n essentialConsts: 'essential-consts.json',\n banners: 'banners.json',\n} as const\n\nexport type CacheFilename = typeof CACHE_FILENAMES[keyof typeof CACHE_FILENAMES]\n\n// Re-export all types from the types folder\nexport * from './types'\n", "export async function retryWithExponentialBackoff(\n fn: () => Promise,\n maxRetries: number = 3,\n delayMs: number = 1000\n): Promise {\n let lastError: Error | undefined\n \n for (let attempt = 1; attempt <= maxRetries; attempt++) {\n try {\n return await fn()\n } catch (error) {\n lastError = error instanceof Error ? error : new Error(String(error))\n \n if (attempt < maxRetries) {\n console.log(`Attempt ${attempt} failed, retrying in ${delayMs}ms...`)\n await new Promise(resolve => setTimeout(resolve, delayMs))\n delayMs *= 2\n }\n }\n }\n \n throw lastError\n}", "import axios from 'axios'\nimport { scaffoldProducts } from '@/src/trpc/apis/common-apis/common'\nimport { scaffoldEssentialConsts } from '@/src/trpc/apis/common-apis/common-trpc-index'\nimport { scaffoldStores } from '@/src/trpc/apis/user-apis/apis/stores'\nimport { scaffoldSlotsWithProducts } from '@/src/trpc/apis/user-apis/apis/slots'\nimport { scaffoldBanners } from '@/src/trpc/apis/user-apis/apis/banners'\nimport { scaffoldStoreWithProducts } from '@/src/trpc/apis/user-apis/apis/stores'\nimport { getStoresSummary } from '@/src/dbService'\nimport { imageUploadS3 } from '@/src/lib/s3-client'\nimport { apiCacheKey, cloudflareApiToken, cloudflareZoneId, assetsDomain } from '@/src/lib/env-exporter'\nimport { CACHE_FILENAMES } from '@packages/shared'\nimport { retryWithExponentialBackoff } from '@/src/lib/retry'\n\nfunction constructCacheUrl(path: string): string {\n return `${assetsDomain}${apiCacheKey}/${path}`\n}\n\nexport async function createProductsFile(): Promise {\n // Get products data from the API method\n const productsData = await scaffoldProducts()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(productsData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.products}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.products)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createEssentialConstsFile(): Promise {\n // Get essential consts data from the API method\n const essentialConstsData = await scaffoldEssentialConsts()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(essentialConstsData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.essentialConsts}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.essentialConsts)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createStoresFile(): Promise {\n // Get stores data from the API method\n const storesData = await scaffoldStores()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(storesData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.stores}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.stores)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createSlotsFile(): Promise {\n // Get slots data from the API method\n const slotsData = await scaffoldSlotsWithProducts()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(slotsData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.slots}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.slots)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createBannersFile(): Promise {\n // Get banners data from the API method\n const bannersData = await scaffoldBanners()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(bannersData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.banners}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.banners)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createStoreFile(storeId: number): Promise {\n // Get store data from the API method\n const storeData = await scaffoldStoreWithProducts(storeId)\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(storeData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/stores/${storeId}.json`)\n\n // Purge cache with retry\n const url = constructCacheUrl(`stores/${storeId}.json`)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createAllStoresFiles(): Promise {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { storeInfo } from '@/src/db/schema'\n\n const stores = await db.select({ id: storeInfo.id }).from(storeInfo)\n */\n\n // Fetch all store IDs from database using helper\n const stores = await getStoresSummary()\n\n // Create cache files for all stores and collect URLs\n const results: string[] = []\n const urls: string[] = []\n\n for (const store of stores) {\n const s3Key = await createStoreFile(store.id)\n results.push(s3Key)\n urls.push(constructCacheUrl(`stores/${store.id}.json`))\n }\n\n console.log(`Created ${results.length} store cache files`)\n\n // Purge all store caches in one batch with retry\n try {\n await retryWithExponentialBackoff(() => clearUrlCache(urls))\n console.log(`Cache purged for ${urls.length} store files`)\n } catch (error) {\n console.error(`Failed to purge cache for store files after 3 retries. URLs: ${urls.join(', ')}`, error)\n }\n\n return results\n}\n\nexport interface CreateAllCacheFilesResult {\n products: string\n essentialConsts: string\n stores: string\n slots: string\n banners: string\n individualStores: string[]\n}\n\nexport async function createAllCacheFiles(): Promise {\n console.log('Starting creation of all cache files...')\n\n // Create all global cache files in parallel\n const [\n productsKey,\n essentialConstsKey,\n storesKey,\n slotsKey,\n bannersKey,\n individualStoreKeys,\n ] = await Promise.all([\n createProductsFileInternal(),\n createEssentialConstsFileInternal(),\n createStoresFileInternal(),\n createSlotsFileInternal(),\n createBannersFileInternal(),\n createAllStoresFilesInternal(),\n ])\n\n // Collect all URLs for batch cache purge\n const urls = [\n constructCacheUrl(CACHE_FILENAMES.products),\n constructCacheUrl(CACHE_FILENAMES.essentialConsts),\n constructCacheUrl(CACHE_FILENAMES.stores),\n constructCacheUrl(CACHE_FILENAMES.slots),\n constructCacheUrl(CACHE_FILENAMES.banners),\n ...individualStoreKeys.map((_, index) => constructCacheUrl(`stores/${index + 1}.json`)),\n ]\n\n // Purge all caches in one batch with retry\n try {\n await retryWithExponentialBackoff(() => clearUrlCache(urls))\n console.log(`Cache purged for all ${urls.length} files`)\n } catch (error) {\n console.error(`Failed to purge cache for all files after 3 retries`, error)\n }\n\n console.log('All cache files created successfully')\n\n return {\n products: productsKey,\n essentialConsts: essentialConstsKey,\n stores: storesKey,\n slots: slotsKey,\n banners: bannersKey,\n individualStores: individualStoreKeys,\n }\n}\n\n// Internal versions that skip cache purging (for batch operations)\nasync function createProductsFileInternal(): Promise {\n const productsData = await scaffoldProducts()\n const jsonContent = JSON.stringify(productsData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.products}`)\n}\n\nasync function createEssentialConstsFileInternal(): Promise {\n const essentialConstsData = await scaffoldEssentialConsts()\n const jsonContent = JSON.stringify(essentialConstsData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.essentialConsts}`)\n}\n\nasync function createStoresFileInternal(): Promise {\n const storesData = await scaffoldStores()\n const jsonContent = JSON.stringify(storesData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.stores}`)\n}\n\nasync function createSlotsFileInternal(): Promise {\n const slotsData = await scaffoldSlotsWithProducts()\n const jsonContent = JSON.stringify(slotsData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.slots}`)\n}\n\nasync function createBannersFileInternal(): Promise {\n const bannersData = await scaffoldBanners()\n const jsonContent = JSON.stringify(bannersData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.banners}`)\n}\n\nasync function createAllStoresFilesInternal(): Promise {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { storeInfo } from '@/src/db/schema'\n\n const stores = await db.select({ id: storeInfo.id }).from(storeInfo)\n */\n\n const stores = await getStoresSummary()\n const results: string[] = []\n\n for (const store of stores) {\n const storeData = await scaffoldStoreWithProducts(store.id)\n const jsonContent = JSON.stringify(storeData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/stores/${store.id}.json`)\n results.push(s3Key)\n }\n\n console.log(`Created ${results.length} store cache files`)\n return results\n}\n\nexport async function clearUrlCache(urls: string[]): Promise<{ success: boolean; errors?: string[] }> {\n if (!cloudflareApiToken || !cloudflareZoneId) {\n console.warn('Cloudflare credentials not configured, skipping cache clear')\n return { success: false, errors: ['Cloudflare credentials not configured'] }\n }\n\n try {\n const response = await axios.post(\n `https://api.cloudflare.com/client/v4/zones/${cloudflareZoneId}/purge_cache`,\n { files: urls },\n {\n headers: {\n 'Authorization': `Bearer ${cloudflareApiToken}`,\n 'Content-Type': 'application/json',\n },\n }\n )\n\n const result = response.data as { success: boolean; errors?: { message: string }[] }\n\n if (!result.success) {\n const errorMessages = result.errors?.map(e => e.message) || ['Unknown error']\n console.error(`Cloudflare cache purge failed for URLs: ${urls.join(', ')}`, errorMessages)\n return { success: false, errors: errorMessages }\n }\n\n console.log(`Successfully purged ${urls.length} URLs from Cloudflare cache: ${urls.join(', ')}`)\n return { success: true }\n } catch (error) {\n console.log(error)\n const errorMessage = error instanceof Error ? error.message : 'Unknown error'\n console.error(`Error clearing Cloudflare cache for URLs: ${urls.join(', ')}`, errorMessage)\n return { success: false, errors: [errorMessage] }\n }\n}\n\nexport async function clearAllCache(): Promise<{ success: boolean; errors?: string[] }> {\n if (!cloudflareApiToken || !cloudflareZoneId) {\n console.warn('Cloudflare credentials not configured, skipping cache clear')\n return { success: false, errors: ['Cloudflare credentials not configured'] }\n }\n\n try {\n const response = await axios.post(\n `https://api.cloudflare.com/client/v4/zones/${cloudflareZoneId}/purge_cache`,\n { purge_everything: true },\n {\n headers: {\n 'Authorization': `Bearer ${cloudflareApiToken}`,\n 'Content-Type': 'application/json',\n },\n }\n )\n\n const result = response.data as { success: boolean; errors?: { message: string }[] }\n\n if (!result.success) {\n const errorMessages = result.errors?.map(e => e.message) || ['Unknown error']\n console.error('Cloudflare cache purge failed:', errorMessages)\n return { success: false, errors: errorMessages }\n }\n\n console.log('Successfully purged all cache from Cloudflare')\n return { success: true }\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error'\n console.error('Error clearing Cloudflare cache:', errorMessage)\n return { success: false, errors: [errorMessage] }\n }\n}\n", "import roleManager from '@/src/lib/roles-manager'\nimport { computeConstants } from '@/src/lib/const-store'\nimport { initializeProducts } from '@/src/stores/product-store'\nimport { initializeProductTagStore } from '@/src/stores/product-tag-store'\nimport { initializeSlotStore } from '@/src/stores/slot-store'\nimport { initializeBannerStore } from '@/src/stores/banner-store'\nimport { createAllCacheFiles } from '@/src/lib/cloud_cache'\n\nconst STORE_INIT_DELAY_MS = 3 * 60 * 1000\nlet storeInitializationTimeout: NodeJS.Timeout | null = null\n\n/**\n * Initialize all application stores\n * This function handles initialization of:\n * - Role Manager (fetches and caches all roles)\n * - Const Store (syncs constants from DB to Redis)\n * - Product Store (caches all products in Redis)\n * - Product Tag Store (caches all product tags in Redis)\n * - Slot Store (caches all delivery slots with products in Redis)\n * - Banner Store (caches all banners in Redis)\n */\nexport const initializeAllStores = async (): Promise => {\n try {\n console.log('Starting application stores initialization...');\n\n await Promise.all([\n roleManager.fetchRoles(),\n computeConstants(),\n initializeProducts(),\n initializeProductTagStore(),\n initializeSlotStore(),\n initializeBannerStore(),\n ]);\n\n console.log('All application stores initialized successfully');\n\n // Regenerate all cache files (fire-and-forget)\n createAllCacheFiles().catch(error => {\n console.error('Failed to regenerate cache files during store initialization:', error)\n })\n } catch (error) {\n console.error('Application stores initialization failed:', error);\n throw error;\n }\n};\n\nexport const scheduleStoreInitialization = (): void => {\n if (storeInitializationTimeout) {\n clearTimeout(storeInitializationTimeout)\n storeInitializationTimeout = null\n }\n\n storeInitializationTimeout = setTimeout(() => {\n storeInitializationTimeout = null\n initializeAllStores().catch(error => {\n console.error('Scheduled store initialization failed:', error)\n })\n }, STORE_INIT_DELAY_MS)\n}\n", "import { router, protectedProcedure } from \"@/src/trpc/trpc-index\"\nimport { TRPCError } from \"@trpc/server\";\nimport { z } from \"zod\";\nimport { ApiError } from \"@/src/lib/api-error\"\nimport { appUrl } from \"@/src/lib/env-exporter\"\n// import redisClient from \"@/src/lib/redis-client\"\n// import { getSlotSequenceKey } from \"@/src/lib/redisKeyGetters\"\nimport { scheduleStoreInitialization } from '@/src/stores/store-initializer'\nimport {\n getActiveSlotsWithProducts as getActiveSlotsWithProductsInDb,\n getActiveSlots as getActiveSlotsInDb,\n getSlotsAfterDate as getSlotsAfterDateInDb,\n getSlotByIdWithRelations as getSlotByIdWithRelationsInDb,\n createSlotWithRelations as createSlotWithRelationsInDb,\n updateSlotWithRelations as updateSlotWithRelationsInDb,\n deleteSlotById as deleteSlotByIdInDb,\n updateSlotCapacity as updateSlotCapacityInDb,\n getSlotDeliverySequence as getSlotDeliverySequenceInDb,\n updateSlotDeliverySequence as updateSlotDeliverySequenceInDb,\n updateSlotProducts as updateSlotProductsInDb,\n getSlotsProductIds as getSlotsProductIdsInDb,\n} from '@/src/dbService'\nimport type {\n AdminDeliverySequenceResult,\n AdminSlotResult,\n AdminSlotsResult,\n AdminSlotsListResult,\n AdminSlotCreateResult,\n AdminSlotUpdateResult,\n AdminSlotDeleteResult,\n AdminUpdateDeliverySequenceResult,\n AdminUpdateSlotCapacityResult,\n AdminSlotsProductIdsResult,\n AdminUpdateSlotProductsResult,\n} from '@packages/shared'\n\n\ninterface CachedDeliverySequence {\n [userId: string]: number[];\n}\n\nconst cachedSequenceSchema = z.record(z.string(), z.array(z.number()));\n\nconst createSlotSchema = z.object({\n deliveryTime: z.string(),\n freezeTime: z.string(),\n isActive: z.boolean().optional(),\n productIds: z.array(z.number()).optional(),\n vendorSnippets: z.array(z.object({\n name: z.string().min(1),\n productIds: z.array(z.number().int().positive()).min(1),\n validTill: z.string().optional(),\n })).optional(),\n groupIds: z.array(z.number()).optional(),\n});\n\nconst getSlotByIdSchema = z.object({\n id: z.number(),\n});\n\nconst updateSlotSchema = z.object({\n id: z.number(),\n deliveryTime: z.string(),\n freezeTime: z.string(),\n isActive: z.boolean().optional(),\n productIds: z.array(z.number()).optional(),\n vendorSnippets: z.array(z.object({\n name: z.string().min(1),\n productIds: z.array(z.number().int().positive()).min(1),\n validTill: z.string().optional(),\n })).optional(),\n groupIds: z.array(z.number()).optional(),\n});\n\nconst deleteSlotSchema = z.object({\n id: z.number(),\n});\n\nconst getDeliverySequenceSchema = z.object({\n id: z.string(),\n});\n\nconst updateDeliverySequenceSchema = z.object({\n id: z.number(),\n // deliverySequence: z.array(z.number()),\n deliverySequence: z.any(),\n});\n\nexport const slotsRouter = router({\n // Exact replica of GET /av/slots\n getAll: protectedProcedure.query(async ({ ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const slots = await getActiveSlotsWithProductsInDb()\n\n /*\n // Old implementation - direct DB queries:\n const slots = await db.query.deliverySlotInfo\n .findMany({\n where: eq(deliverySlotInfo.isActive, true),\n orderBy: desc(deliverySlotInfo.deliveryTime),\n with: {\n productSlots: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n },\n })\n .then((slots) =>\n slots.map((slot) => ({\n ...slot,\n deliverySequence: slot.deliverySequence as number[],\n products: slot.productSlots.map((ps) => ps.product),\n }))\n );\n */\n\n return {\n slots,\n count: slots.length,\n }\n }),\n\n // Exact replica of POST /av/products/slots/product-ids\n getSlotsProductIds: protectedProcedure\n .input(z.object({ slotIds: z.array(z.number()) }))\n .query(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { slotIds } = input;\n\n if (!Array.isArray(slotIds)) {\n throw new TRPCError({\n code: \"BAD_REQUEST\",\n message: \"slotIds must be an array\",\n });\n }\n\n const result = await getSlotsProductIdsInDb(slotIds)\n\n /*\n // Old implementation - direct DB queries:\n if (slotIds.length === 0) {\n return {};\n }\n\n // Fetch all associations for the requested slots\n const associations = await db.query.productSlots.findMany({\n where: inArray(productSlots.slotId, slotIds),\n columns: {\n slotId: true,\n productId: true,\n },\n });\n\n // Group by slotId\n const result = associations.reduce((acc, assoc) => {\n if (!acc[assoc.slotId]) {\n acc[assoc.slotId] = [];\n }\n acc[assoc.slotId].push(assoc.productId);\n return acc;\n }, {} as Record);\n\n // Ensure all requested slots have entries (even if empty)\n slotIds.forEach((slotId) => {\n if (!result[slotId]) {\n result[slotId] = [];\n }\n });\n\n return result;\n */\n\n return result\n }),\n\n // Exact replica of PUT /av/products/slots/:slotId/products\n updateSlotProducts: protectedProcedure\n .input(\n z.object({\n slotId: z.number(),\n productIds: z.array(z.number()),\n })\n )\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { slotId, productIds } = input;\n\n if (!Array.isArray(productIds)) {\n throw new TRPCError({\n code: \"BAD_REQUEST\",\n message: \"productIds must be an array\",\n });\n }\n\n const result = await updateSlotProductsInDb(String(slotId), productIds.map(String))\n\n /*\n // Old implementation - direct DB queries:\n // Get current associations\n const currentAssociations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, slotId),\n columns: {\n productId: true,\n },\n });\n\n const currentProductIds = currentAssociations.map(\n (assoc) => assoc.productId\n );\n const newProductIds = productIds;\n\n // Find products to add and remove\n const productsToAdd = newProductIds.filter(\n (id) => !currentProductIds.includes(id)\n );\n const productsToRemove = currentProductIds.filter(\n (id) => !newProductIds.includes(id)\n );\n\n // Remove associations for products that are no longer selected\n if (productsToRemove.length > 0) {\n await db\n .delete(productSlots)\n .where(\n and(\n eq(productSlots.slotId, slotId),\n inArray(productSlots.productId, productsToRemove)\n )\n );\n }\n\n // Add associations for newly selected products\n if (productsToAdd.length > 0) {\n const newAssociations = productsToAdd.map((productId) => ({\n productId,\n slotId,\n }));\n\n await db.insert(productSlots).values(newAssociations);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: \"Slot products updated successfully\",\n added: productsToAdd.length,\n removed: productsToRemove.length,\n };\n */\n\n scheduleStoreInitialization()\n\n return {\n message: result.message,\n added: result.added,\n removed: result.removed,\n }\n }),\n\n createSlot: protectedProcedure\n .input(createSlotSchema)\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input;\n\n // Validate required fields\n if (!deliveryTime || !freezeTime) {\n throw new ApiError(\"Delivery time and orders close time are required\", 400);\n }\n\n const result = await createSlotWithRelationsInDb({\n deliveryTime,\n freezeTime,\n isActive,\n productIds,\n vendorSnippets: snippets,\n groupIds,\n })\n\n /*\n // Old implementation - direct DB queries:\n const result = await db.transaction(async (tx) => {\n // Create slot\n const [newSlot] = await tx\n .insert(deliverySlotInfo)\n .values({\n deliveryTime: new Date(deliveryTime),\n freezeTime: new Date(freezeTime),\n isActive: isActive !== undefined ? isActive : true,\n groupIds: groupIds !== undefined ? groupIds : [],\n })\n .returning();\n\n // Insert product associations if provided\n if (productIds && productIds.length > 0) {\n const associations = productIds.map((productId) => ({\n productId,\n slotId: newSlot.id,\n }));\n await tx.insert(productSlots).values(associations);\n }\n\n // Create vendor snippets if provided\n let createdSnippets: any[] = [];\n if (snippets && snippets.length > 0) {\n for (const snippet of snippets) {\n // Validate products exist\n const products = await tx.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n });\n if (products.length !== snippet.productIds.length) {\n throw new ApiError(`One or more invalid product IDs in snippet \"${snippet.name}\"`, 400);\n }\n\n // Check if snippet name already exists\n const existingSnippet = await tx.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippet.name),\n });\n if (existingSnippet) {\n throw new ApiError(`Snippet name \"${snippet.name}\" already exists`, 400);\n }\n\n const [createdSnippet] = await tx.insert(vendorSnippets).values({\n snippetCode: snippet.name,\n slotId: newSlot.id,\n productIds: snippet.productIds,\n validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,\n }).returning();\n\n createdSnippets.push(createdSnippet);\n }\n }\n\n return {\n slot: newSlot,\n createdSnippets,\n message: \"Slot created successfully\",\n };\n });\n */\n\n // Reinitialize stores to reflect changes (outside transaction)\n scheduleStoreInitialization()\n\n return result\n }),\n\n getSlots: protectedProcedure.query(async ({ ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const slots = await getActiveSlotsInDb()\n\n /*\n // Old implementation - direct DB queries:\n const slots = await db.query.deliverySlotInfo.findMany({\n where: eq(deliverySlotInfo.isActive, true),\n });\n */\n\n return {\n slots,\n count: slots.length,\n }\n }),\n\n getSlotById: protectedProcedure\n .input(getSlotByIdSchema)\n .query(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { id } = input;\n\n const slot = await getSlotByIdWithRelationsInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, id),\n with: {\n productSlots: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n vendorSnippets: true,\n },\n });\n */\n\n if (!slot) {\n throw new ApiError('Slot not found', 404)\n }\n\n return {\n slot: {\n ...slot,\n vendorSnippets: slot.vendorSnippets.map(snippet => ({\n ...snippet,\n accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`,\n })),\n },\n }\n }),\n\n updateSlot: protectedProcedure\n .input(updateSlotSchema)\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n try{\n const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input;\n\n if (!deliveryTime || !freezeTime) {\n throw new ApiError(\"Delivery time and orders close time are required\", 400);\n }\n\n const result = await updateSlotWithRelationsInDb({\n id,\n deliveryTime,\n freezeTime,\n isActive,\n productIds,\n vendorSnippets: snippets,\n groupIds,\n })\n\n /*\n // Old implementation - direct DB queries:\n // Filter groupIds to only include valid (existing) groups\n let validGroupIds = groupIds;\n if (groupIds && groupIds.length > 0) {\n const existingGroups = await db.query.productGroupInfo.findMany({\n where: inArray(productGroupInfo.id, groupIds),\n columns: { id: true },\n });\n validGroupIds = existingGroups.map(g => g.id);\n }\n\n const result = await db.transaction(async (tx) => {\n const [updatedSlot] = await tx\n .update(deliverySlotInfo)\n .set({\n deliveryTime: new Date(deliveryTime),\n freezeTime: new Date(freezeTime),\n isActive: isActive !== undefined ? isActive : true,\n groupIds: validGroupIds !== undefined ? validGroupIds : [],\n })\n .where(eq(deliverySlotInfo.id, id))\n .returning();\n\n if (!updatedSlot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n\n // Update product associations\n if (productIds !== undefined) {\n // Delete existing associations\n await tx.delete(productSlots).where(eq(productSlots.slotId, id));\n\n // Insert new associations\n if (productIds.length > 0) {\n const associations = productIds.map((productId) => ({\n productId,\n slotId: id,\n }));\n await tx.insert(productSlots).values(associations);\n }\n }\n\n // Create vendor snippets if provided\n let createdSnippets: any[] = [];\n if (snippets && snippets.length > 0) {\n for (const snippet of snippets) {\n // Validate products exist\n const products = await tx.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n });\n if (products.length !== snippet.productIds.length) {\n throw new ApiError(`One or more invalid product IDs in snippet \"${snippet.name}\"`, 400);\n }\n\n // Check if snippet name already exists\n const existingSnippet = await tx.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippet.name),\n });\n if (existingSnippet) {\n throw new ApiError(`Snippet name \"${snippet.name}\" already exists`, 400);\n }\n \n const [createdSnippet] = await tx.insert(vendorSnippets).values({\n snippetCode: snippet.name,\n slotId: id,\n productIds: snippet.productIds,\n validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,\n\n }).returning();\n\n createdSnippets.push(createdSnippet);\n }\n }\n\n return {\n slot: updatedSlot,\n createdSnippets,\n message: \"Slot updated successfully\",\n };\n });\n */\n\n if (!result) {\n throw new ApiError('Slot not found', 404)\n }\n\n // Reinitialize stores to reflect changes (outside transaction)\n scheduleStoreInitialization()\n\n return result\n }\n catch(e) {\n console.log(e)\n throw new ApiError(\"Unable to Update Slot\");\n }\n }),\n\n deleteSlot: protectedProcedure\n .input(deleteSlotSchema)\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { id } = input;\n\n const deletedSlot = await deleteSlotByIdInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const [deletedSlot] = await db\n .update(deliverySlotInfo)\n .set({ isActive: false })\n .where(eq(deliverySlotInfo.id, id))\n .returning();\n\n if (!deletedSlot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n */\n\n if (!deletedSlot) {\n throw new ApiError('Slot not found', 404)\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: 'Slot deleted successfully',\n }\n }),\n\n getDeliverySequence: protectedProcedure\n .input(getDeliverySequenceSchema)\n .query(async ({ input, ctx }): Promise => {\n\n const { id } = input;\n const slotId = parseInt(id);\n // const cacheKey = getSlotSequenceKey(slotId);\n\n // try {\n // const cached = await redisClient.get(cacheKey);\n // if (cached) {\n // const parsed = JSON.parse(cached);\n // const validated = cachedSequenceSchema.parse(parsed);\n // console.log('sending cached response')\n // \n // return { deliverySequence: validated };\n // }\n // } catch (error) {\n // console.warn('Redis cache read/validation failed, falling back to DB:', error);\n // // Continue to DB fallback\n // }\n\n // Fallback to DB\n const slot = await getSlotDeliverySequenceInDb(slotId)\n\n /*\n // Old implementation - direct DB queries:\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n });\n\n if (!slot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n\n const sequence = cachedSequenceSchema.parse(slot.deliverySequence || {});\n */\n\n if (!slot) {\n throw new ApiError('Slot not found', 404)\n }\n\n const sequence = (slot.deliverySequence || {}) as CachedDeliverySequence;\n\n // Cache the validated result\n // try {\n // const validated = cachedSequenceSchema.parse(sequence);\n // await redisClient.set(cacheKey, JSON.stringify(validated), 3600);\n // } catch (cacheError) {\n // console.warn('Redis cache write failed:', cacheError);\n // }\n\n return { deliverySequence: sequence }\n }),\n\n updateDeliverySequence: protectedProcedure\n .input(updateDeliverySequenceSchema)\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { id, deliverySequence } = input;\n\n const updatedSlot = await updateSlotDeliverySequenceInDb(id, deliverySequence)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedSlot] = await db\n .update(deliverySlotInfo)\n .set({ deliverySequence })\n .where(eq(deliverySlotInfo.id, id))\n .returning({\n id: deliverySlotInfo.id,\n deliverySequence: deliverySlotInfo.deliverySequence,\n });\n\n if (!updatedSlot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n */\n\n if (!updatedSlot) {\n throw new ApiError('Slot not found', 404)\n }\n\n // Cache the updated sequence\n // const cacheKey = getSlotSequenceKey(id);\n // try {\n // const validated = cachedSequenceSchema.parse(deliverySequence);\n // await redisClient.set(cacheKey, JSON.stringify(validated), 3600);\n // } catch (cacheError) {\n // console.warn('Redis cache write failed:', cacheError);\n // }\n\n return {\n slot: updatedSlot,\n message: 'Delivery sequence updated successfully',\n }\n }),\n\n updateSlotCapacity: protectedProcedure\n .input(z.object({\n slotId: z.number(),\n isCapacityFull: z.boolean(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { slotId, isCapacityFull } = input;\n\n const result = await updateSlotCapacityInDb(slotId, isCapacityFull)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedSlot] = await db\n .update(deliverySlotInfo)\n .set({ isCapacityFull })\n .where(eq(deliverySlotInfo.id, slotId))\n .returning();\n\n if (!updatedSlot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n success: true,\n slot: updatedSlot,\n message: `Slot ${isCapacityFull ? 'marked as full capacity' : 'capacity reset'}`,\n };\n */\n\n if (!result) {\n throw new ApiError('Slot not found', 404)\n }\n\n scheduleStoreInitialization()\n\n return result\n }),\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport { generateSignedUrlsFromS3Urls, generateSignedUrlFromS3Url, claimUploadUrl, extractKeyFromPresignedUrl, deleteImageUtil } from '@/src/lib/s3-client'\nimport { scheduleStoreInitialization } from '@/src/stores/store-initializer'\nimport {\n getAllProducts as getAllProductsInDb,\n getProductById as getProductByIdInDb,\n deleteProduct as deleteProductInDb,\n toggleProductOutOfStock as toggleProductOutOfStockInDb,\n updateSlotProducts as updateSlotProductsInDb,\n getSlotProductIds as getSlotProductIdsInDb,\n getSlotsProductIds as getSlotsProductIdsInDb,\n getProductReviews as getProductReviewsInDb,\n respondToReview as respondToReviewInDb,\n getAllProductGroups as getAllProductGroupsInDb,\n createProductGroup as createProductGroupInDb,\n updateProductGroup as updateProductGroupInDb,\n deleteProductGroup as deleteProductGroupInDb,\n updateProductPrices as updateProductPricesInDb,\n checkProductExistsByName,\n checkUnitExists,\n createProduct as createProductInDb,\n createSpecialDealsForProduct,\n replaceProductTags,\n getProductImagesById,\n updateProduct as updateProductInDb,\n updateProductDeals,\n checkProductTagExistsByName,\n createProductTag as createProductTagInDb,\n updateProductTag as updateProductTagInDb,\n deleteProductTag as deleteProductTagInDb,\n getAllProductTagInfos as getAllProductTagInfosInDb,\n getProductTagInfoById as getProductTagInfoByIdInDb,\n} from '@/src/dbService'\nimport type {\n AdminProduct,\n AdminSpecialDeal,\n AdminProductGroupsResult,\n AdminProductGroupResponse,\n AdminProductReviewsResult,\n AdminProductReviewResponse,\n AdminProductListResponse,\n AdminProductResponse,\n AdminDeleteProductResult,\n AdminToggleOutOfStockResult,\n AdminUpdateSlotProductsResult,\n AdminSlotProductIdsResult,\n AdminSlotsProductIdsResult,\n AdminUpdateProductPricesResult,\n} from '@packages/shared'\n\n\nexport const productRouter = router({\n getProducts: protectedProcedure\n .query(async (): Promise => {\n const products = await getAllProductsInDb()\n\n /*\n // Old implementation - direct DB query:\n const products = await db.query.productInfo.findMany({\n orderBy: productInfo.name,\n with: {\n unit: true,\n store: true,\n },\n });\n */\n\n const productsWithSignedUrls = await Promise.all(\n products.map(async (product) => ({\n ...product,\n images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),\n }))\n )\n\n return {\n products: productsWithSignedUrls,\n count: productsWithSignedUrls.length,\n }\n }),\n\n getProductById: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .query(async ({ input }): Promise => {\n const { id } = input;\n\n const product = await getProductByIdInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, id),\n with: {\n unit: true,\n },\n });\n\n if (!product) {\n throw new ApiError(\"Product not found\", 404);\n }\n\n // Fetch special deals for this product\n const deals = await db.query.specialDeals.findMany({\n where: eq(specialDeals.productId, id),\n orderBy: specialDeals.quantity,\n });\n\n // Fetch associated tags for this product\n const productTagsData = await db.query.productTags.findMany({\n where: eq(productTags.productId, id),\n with: {\n tag: true,\n },\n });\n\n // Generate signed URLs for product images\n const productWithSignedUrls = {\n ...product,\n images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),\n deals,\n tags: productTagsData.map(pt => pt.tag),\n };\n\n return {\n product: productWithSignedUrls,\n };\n */\n\n if (!product) {\n throw new ApiError('Product not found', 404)\n }\n\n const productWithSignedUrls = {\n ...product,\n images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),\n }\n\n return {\n product: productWithSignedUrls,\n }\n }),\n\n deleteProduct: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .mutation(async ({ input }): Promise => {\n const { id } = input;\n\n const deletedProduct = await deleteProductInDb(id)\n\n /*\n // Old implementation - direct DB query:\n const [deletedProduct] = await db\n .delete(productInfo)\n .where(eq(productInfo.id, id))\n .returning();\n\n if (!deletedProduct) {\n throw new ApiError(\"Product not found\", 404);\n }\n */\n\n if (!deletedProduct) {\n throw new ApiError('Product not found', 404)\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: 'Product deleted successfully',\n }\n }),\n\n toggleOutOfStock: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .mutation(async ({ input }): Promise => {\n const { id } = input;\n\n const updatedProduct = await toggleProductOutOfStockInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, id),\n });\n\n if (!product) {\n throw new ApiError(\"Product not found\", 404);\n }\n\n const [updatedProduct] = await db\n .update(productInfo)\n .set({\n isOutOfStock: !product.isOutOfStock,\n })\n .where(eq(productInfo.id, id))\n .returning();\n */\n\n if (!updatedProduct) {\n throw new ApiError('Product not found', 404)\n }\n\n scheduleStoreInitialization()\n\n return {\n product: updatedProduct,\n message: `Product marked as ${updatedProduct.isOutOfStock ? 'out of stock' : 'in stock'}`,\n }\n }),\n\n createProduct: protectedProcedure\n .input(z.object({\n name: z.string().min(1, 'Name is required'),\n shortDescription: z.string().optional(),\n longDescription: z.string().optional(),\n unitId: z.number().min(1, 'Unit is required'),\n storeId: z.number().min(1, 'Store is required'),\n price: z.number().positive('Price must be positive'),\n marketPrice: z.number().optional(),\n incrementStep: z.number().optional().default(1),\n productQuantity: z.number().optional().default(1),\n isSuspended: z.boolean().optional().default(false),\n isFlashAvailable: z.boolean().optional().default(false),\n flashPrice: z.number().optional(),\n uploadUrls: z.array(z.string()).optional().default([]),\n deals: z.array(z.object({\n quantity: z.number(),\n price: z.number(),\n validTill: z.string(),\n })).optional(),\n tagIds: z.array(z.number()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise<{ product: AdminProduct; deals: AdminSpecialDeal[]; message: string }> => {\n const { name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, uploadUrls, deals, tagIds } = input\n\n const existingProduct = await checkProductExistsByName(name.trim())\n if (existingProduct) {\n throw new ApiError('A product with this name already exists', 400)\n }\n\n const unitExists = await checkUnitExists(unitId)\n if (!unitExists) {\n throw new ApiError('Invalid unit ID', 400)\n }\n\n const imageKeys = uploadUrls.map(url => extractKeyFromPresignedUrl(url))\n\n const newProduct = await createProductInDb({\n name,\n shortDescription,\n longDescription,\n unitId,\n storeId,\n price: price.toString(),\n marketPrice: marketPrice?.toString(),\n incrementStep,\n productQuantity,\n isSuspended,\n isFlashAvailable,\n flashPrice: flashPrice?.toString(),\n images: imageKeys,\n })\n\n let createdDeals: AdminSpecialDeal[] = []\n if (deals && deals.length > 0) {\n createdDeals = await createSpecialDealsForProduct(newProduct.id, deals)\n }\n\n if (tagIds.length > 0) {\n await replaceProductTags(newProduct.id, tagIds)\n }\n\n if (uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)))\n }\n\n scheduleStoreInitialization()\n\n return {\n product: newProduct,\n deals: createdDeals,\n message: 'Product created successfully',\n }\n }),\n\n updateProduct: protectedProcedure\n .input(z.object({\n id: z.number(),\n name: z.string().min(1, 'Name is required'),\n shortDescription: z.string().optional(),\n longDescription: z.string().optional(),\n unitId: z.number().min(1, 'Unit is required'),\n storeId: z.number().min(1, 'Store is required'),\n price: z.number().positive('Price must be positive'),\n marketPrice: z.number().optional(),\n incrementStep: z.number().optional().default(1),\n productQuantity: z.number().optional().default(1),\n isSuspended: z.boolean().optional().default(false),\n isFlashAvailable: z.boolean().optional().default(false),\n flashPrice: z.number().nullable().optional(),\n uploadUrls: z.array(z.string()).optional().default([]),\n imagesToDelete: z.array(z.string()).optional().default([]),\n deals: z.array(z.object({\n quantity: z.number(),\n price: z.number(),\n validTill: z.string(),\n })).optional(),\n tagIds: z.array(z.number()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise<{ product: AdminProduct; message: string }> => {\n const { id, name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, uploadUrls, imagesToDelete, deals, tagIds } = input\n\n const unitExists = await checkUnitExists(unitId)\n if (!unitExists) {\n throw new ApiError('Invalid unit ID', 400)\n }\n\n const currentImages = await getProductImagesById(id)\n if (!currentImages) {\n throw new ApiError('Product not found', 404)\n }\n\n let updatedImages = currentImages || []\n if (imagesToDelete.length > 0) {\n const imagesToRemove = updatedImages.filter(img => imagesToDelete.includes(img))\n await deleteImageUtil({ keys: imagesToRemove })\n updatedImages = updatedImages.filter(img => !imagesToRemove.includes(img))\n }\n\n const newImageKeys = uploadUrls.map(url => extractKeyFromPresignedUrl(url))\n const finalImages = [...updatedImages, ...newImageKeys]\n\n const updatedProduct = await updateProductInDb(id, {\n name,\n shortDescription,\n longDescription,\n unitId,\n storeId,\n price: price.toString(),\n marketPrice: marketPrice?.toString(),\n incrementStep,\n productQuantity,\n isSuspended,\n isFlashAvailable,\n flashPrice: flashPrice?.toString() ?? null,\n images: finalImages,\n })\n\n if (!updatedProduct) {\n throw new ApiError('Product not found', 404)\n }\n\n if (deals && deals.length > 0) {\n await updateProductDeals(id, deals)\n }\n\n if (tagIds.length > 0) {\n await replaceProductTags(id, tagIds)\n }\n\n if (uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)))\n }\n\n scheduleStoreInitialization()\n\n return {\n product: updatedProduct,\n message: 'Product updated successfully',\n }\n }),\n\n updateSlotProducts: protectedProcedure\n .input(z.object({\n slotId: z.string(),\n productIds: z.array(z.string()),\n }))\n .mutation(async ({ input }): Promise => {\n const { slotId, productIds } = input;\n\n if (!Array.isArray(productIds)) {\n throw new ApiError(\"productIds must be an array\", 400);\n }\n\n const result = await updateSlotProductsInDb(slotId, productIds)\n\n /*\n // Old implementation - direct DB queries:\n // Get current associations\n const currentAssociations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, parseInt(slotId)),\n columns: {\n productId: true,\n },\n });\n\n const currentProductIds = currentAssociations.map(assoc => assoc.productId);\n const newProductIds = productIds.map((id: string) => parseInt(id));\n\n // Find products to add and remove\n const productsToAdd = newProductIds.filter(id => !currentProductIds.includes(id));\n const productsToRemove = currentProductIds.filter(id => !newProductIds.includes(id));\n\n // Remove associations for products that are no longer selected\n if (productsToRemove.length > 0) {\n await db.delete(productSlots).where(\n and(\n eq(productSlots.slotId, parseInt(slotId)),\n inArray(productSlots.productId, productsToRemove)\n )\n );\n }\n\n // Add associations for newly selected products\n if (productsToAdd.length > 0) {\n const newAssociations = productsToAdd.map(productId => ({\n productId,\n slotId: parseInt(slotId),\n }));\n\n await db.insert(productSlots).values(newAssociations);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: \"Slot products updated successfully\",\n added: productsToAdd.length,\n removed: productsToRemove.length,\n };\n */\n\n scheduleStoreInitialization()\n\n return {\n message: 'Slot products updated successfully',\n added: result.added,\n removed: result.removed,\n }\n }),\n\n getSlotProductIds: protectedProcedure\n .input(z.object({\n slotId: z.string(),\n }))\n .query(async ({ input }): Promise => {\n const { slotId } = input;\n\n const productIds = await getSlotProductIdsInDb(slotId)\n\n /*\n // Old implementation - direct DB queries:\n const associations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, parseInt(slotId)),\n columns: {\n productId: true,\n },\n });\n\n const productIds = associations.map(assoc => assoc.productId);\n\n return {\n productIds,\n };\n */\n\n return {\n productIds,\n }\n }),\n\n getSlotsProductIds: protectedProcedure\n .input(z.object({\n slotIds: z.array(z.number()),\n }))\n .query(async ({ input }): Promise => {\n const { slotIds } = input;\n\n if (!Array.isArray(slotIds)) {\n throw new ApiError(\"slotIds must be an array\", 400);\n }\n\n const result = await getSlotsProductIdsInDb(slotIds)\n\n /*\n // Old implementation - direct DB queries:\n if (slotIds.length === 0) {\n return {};\n }\n\n // Fetch all associations for the requested slots\n const associations = await db.query.productSlots.findMany({\n where: inArray(productSlots.slotId, slotIds),\n columns: {\n slotId: true,\n productId: true,\n },\n });\n\n // Group by slotId\n const result = associations.reduce((acc, assoc) => {\n if (!acc[assoc.slotId]) {\n acc[assoc.slotId] = [];\n }\n acc[assoc.slotId].push(assoc.productId);\n return acc;\n }, {} as Record);\n\n // Ensure all requested slots have entries (even if empty)\n slotIds.forEach(slotId => {\n if (!result[slotId]) {\n result[slotId] = [];\n }\n });\n\n return result;\n */\n\n return result\n }),\n\n getProductReviews: protectedProcedure\n .input(z.object({\n productId: z.number().int().positive(),\n limit: z.number().int().min(1).max(50).optional().default(10),\n offset: z.number().int().min(0).optional().default(0),\n }))\n .query(async ({ input }): Promise => {\n const { productId, limit, offset } = input;\n\n const { reviews, totalCount } = await getProductReviewsInDb(productId, limit, offset)\n\n /*\n // Old implementation - direct DB queries:\n const reviews = await db\n .select({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n adminResponse: productReviews.adminResponse,\n adminResponseImages: productReviews.adminResponseImages,\n userName: users.name,\n })\n .from(productReviews)\n .innerJoin(users, eq(productReviews.userId, users.id))\n .where(eq(productReviews.productId, productId))\n .orderBy(desc(productReviews.reviewTime))\n .limit(limit)\n .offset(offset);\n\n // Generate signed URLs for images\n const reviewsWithSignedUrls = await Promise.all(\n reviews.map(async (review) => ({\n ...review,\n signedImageUrls: await generateSignedUrlsFromS3Urls((review.imageUrls as string[]) || []),\n signedAdminImageUrls: await generateSignedUrlsFromS3Urls((review.adminResponseImages as string[]) || []),\n }))\n );\n\n // Check if more reviews exist\n const totalCountResult = await db\n .select({ count: sql`count(*)` })\n .from(productReviews)\n .where(eq(productReviews.productId, productId));\n\n const totalCount = Number(totalCountResult[0].count);\n const hasMore = offset + limit < totalCount;\n\n return { reviews: reviewsWithSignedUrls, hasMore };\n */\n\n const reviewsWithSignedUrls = await Promise.all(\n reviews.map(async (review) => ({\n ...review,\n signedImageUrls: await generateSignedUrlsFromS3Urls((review.imageUrls as string[]) || []),\n signedAdminImageUrls: await generateSignedUrlsFromS3Urls((review.adminResponseImages as string[]) || []),\n }))\n )\n\n const hasMore = offset + limit < totalCount\n\n return { reviews: reviewsWithSignedUrls, hasMore }\n }),\n\n respondToReview: protectedProcedure\n .input(z.object({\n reviewId: z.number().int().positive(),\n adminResponse: z.string().optional(),\n adminResponseImages: z.array(z.string()).optional().default([]),\n uploadUrls: z.array(z.string()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise => {\n const { reviewId, adminResponse, adminResponseImages, uploadUrls } = input;\n\n const updatedReview = await respondToReviewInDb(reviewId, adminResponse, adminResponseImages)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedReview] = await db\n .update(productReviews)\n .set({\n adminResponse,\n adminResponseImages,\n })\n .where(eq(productReviews.id, reviewId))\n .returning();\n\n if (!updatedReview) {\n throw new ApiError('Review not found', 404);\n }\n\n // Claim upload URLs\n if (uploadUrls && uploadUrls.length > 0) {\n // const { claimUploadUrl } = await import('@/src/lib/s3-client');\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)));\n }\n\n return { success: true, review: updatedReview };\n */\n\n if (!updatedReview) {\n throw new ApiError('Review not found', 404)\n }\n\n if (uploadUrls && uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)))\n }\n\n return { success: true, review: updatedReview }\n }),\n\n getGroups: protectedProcedure\n .query(async (): Promise => {\n const groups = await getAllProductGroupsInDb()\n\n /*\n // Old implementation - direct DB queries:\n const groups = await db.query.productGroupInfo.findMany({\n with: {\n memberships: {\n with: {\n product: true,\n },\n },\n },\n orderBy: desc(productGroupInfo.createdAt),\n });\n */\n\n return {\n groups: groups.map(group => ({\n ...group,\n products: group.memberships.map((m: any) => ({\n ...(m.product as AdminProduct),\n images: (m.product.images as string[]) || null,\n })),\n productCount: group.memberships.length,\n })),\n }\n }),\n\n createGroup: protectedProcedure\n .input(z.object({\n group_name: z.string().min(1),\n description: z.string().optional(),\n product_ids: z.array(z.number()).default([]),\n }))\n .mutation(async ({ input }): Promise => {\n const { group_name, description, product_ids } = input;\n\n const newGroup = await createProductGroupInDb(group_name, description, product_ids)\n\n /*\n // Old implementation - direct DB queries:\n const [newGroup] = await db\n .insert(productGroupInfo)\n .values({\n groupName: group_name,\n description,\n })\n .returning();\n\n if (product_ids.length > 0) {\n const memberships = product_ids.map(productId => ({\n productId,\n groupId: newGroup.id,\n }));\n\n await db.insert(productGroupMembership).values(memberships);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n group: newGroup,\n message: 'Group created successfully',\n };\n */\n\n scheduleStoreInitialization()\n\n return {\n group: newGroup,\n message: 'Group created successfully',\n }\n }),\n\n updateGroup: protectedProcedure\n .input(z.object({\n id: z.number(),\n group_name: z.string().optional(),\n description: z.string().optional(),\n product_ids: z.array(z.number()).optional(),\n }))\n .mutation(async ({ input }): Promise => {\n const { id, group_name, description, product_ids } = input;\n\n const updatedGroup = await updateProductGroupInDb(id, group_name, description, product_ids)\n\n /*\n // Old implementation - direct DB queries:\n const updateData: any = {};\n if (group_name !== undefined) updateData.groupName = group_name;\n if (description !== undefined) updateData.description = description;\n\n const [updatedGroup] = await db\n .update(productGroupInfo)\n .set(updateData)\n .where(eq(productGroupInfo.id, id))\n .returning();\n\n if (!updatedGroup) {\n throw new ApiError('Group not found', 404);\n }\n\n if (product_ids !== undefined) {\n // Delete existing memberships\n await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id));\n\n // Insert new memberships\n if (product_ids.length > 0) {\n const memberships = product_ids.map(productId => ({\n productId,\n groupId: id,\n }));\n\n await db.insert(productGroupMembership).values(memberships);\n }\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n group: updatedGroup,\n message: 'Group updated successfully',\n };\n */\n\n if (!updatedGroup) {\n throw new ApiError('Group not found', 404)\n }\n\n scheduleStoreInitialization()\n\n return {\n group: updatedGroup,\n message: 'Group updated successfully',\n }\n }),\n\n deleteGroup: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .mutation(async ({ input }): Promise => {\n const { id } = input;\n\n const deletedGroup = await deleteProductGroupInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n // Delete memberships first\n await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id));\n\n // Delete group\n const [deletedGroup] = await db\n .delete(productGroupInfo)\n .where(eq(productGroupInfo.id, id))\n .returning();\n\n if (!deletedGroup) {\n throw new ApiError('Group not found', 404);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: 'Group deleted successfully',\n };\n */\n\n if (!deletedGroup) {\n throw new ApiError('Group not found', 404)\n }\n\n scheduleStoreInitialization()\n\n return {\n message: 'Group deleted successfully',\n }\n }),\n\n updateProductPrices: protectedProcedure\n .input(z.object({\n updates: z.array(z.object({\n productId: z.number(),\n price: z.number().optional(),\n marketPrice: z.number().nullable().optional(),\n flashPrice: z.number().nullable().optional(),\n isFlashAvailable: z.boolean().optional(),\n })),\n }))\n .mutation(async ({ input }): Promise => {\n const { updates } = input;\n\n if (updates.length === 0) {\n throw new ApiError('No updates provided', 400)\n }\n\n const result = await updateProductPricesInDb(updates)\n\n /*\n // Old implementation - direct DB queries:\n if (updates.length === 0) {\n throw new ApiError('No updates provided', 400);\n }\n\n // Validate that all productIds exist\n const productIds = updates.map(u => u.productId);\n const existingProducts = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, productIds),\n columns: { id: true },\n });\n\n const existingIds = new Set(existingProducts.map(p => p.id));\n const invalidIds = productIds.filter(id => !existingIds.has(id));\n\n if (invalidIds.length > 0) {\n throw new ApiError(`Invalid product IDs: ${invalidIds.join(', ')}`, 400);\n }\n\n // Perform batch update\n const updatePromises = updates.map(async (update) => {\n const { productId, price, marketPrice, flashPrice, isFlashAvailable } = update;\n const updateData: any = {};\n if (price !== undefined) updateData.price = price;\n if (marketPrice !== undefined) updateData.marketPrice = marketPrice;\n if (flashPrice !== undefined) updateData.flashPrice = flashPrice;\n if (isFlashAvailable !== undefined) updateData.isFlashAvailable = isFlashAvailable;\n\n return db\n .update(productInfo)\n .set(updateData)\n .where(eq(productInfo.id, productId));\n });\n\n await Promise.all(updatePromises);\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: `Updated prices for ${updates.length} product(s)`,\n updatedCount: updates.length,\n };\n */\n\n if (result.invalidIds.length > 0) {\n throw new ApiError(`Invalid product IDs: ${result.invalidIds.join(', ')}`, 400)\n }\n\n scheduleStoreInitialization()\n\n return {\n message: `Updated prices for ${result.updatedCount} product(s)`,\n updatedCount: result.updatedCount,\n }\n }),\n\n getProductTags: protectedProcedure\n .query(async (): Promise<{ tags: Array<{ id: number; tagName: string; tagDescription: string | null; imageUrl: string | null; isDashboardTag: boolean; relatedStores: unknown; createdAt: Date }>; message: string }> => {\n const tags = await getAllProductTagInfosInDb()\n\n const tagsWithSignedUrls = await Promise.all(\n tags.map(async (tag) => ({\n ...tag,\n imageUrl: tag.imageUrl ? await generateSignedUrlFromS3Url(tag.imageUrl) : null,\n }))\n )\n\n return {\n tags: tagsWithSignedUrls,\n message: 'Tags retrieved successfully',\n }\n }),\n\n getProductTagById: protectedProcedure\n .input(z.object({ id: z.number() }))\n .query(async ({ input }): Promise<{ tag: { id: number; tagName: string; tagDescription: string | null; imageUrl: string | null; isDashboardTag: boolean; relatedStores: unknown; createdAt: Date }; message: string }> => {\n const tag = await getProductTagInfoByIdInDb(input.id)\n\n if (!tag) {\n throw new ApiError('Tag not found', 404)\n }\n\n const tagWithSignedUrl = {\n ...tag,\n imageUrl: tag.imageUrl ? await generateSignedUrlFromS3Url(tag.imageUrl) : null,\n }\n\n return {\n tag: tagWithSignedUrl,\n message: 'Tag retrieved successfully',\n }\n }),\n\n createProductTag: protectedProcedure\n .input(z.object({\n tagName: z.string().min(1, 'Tag name is required'),\n tagDescription: z.string().optional(),\n imageUrl: z.string().optional().nullable(),\n isDashboardTag: z.boolean().optional().default(false),\n relatedStores: z.array(z.number()).optional().default([]),\n uploadUrls: z.array(z.string()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise<{ tag: { id: number; tagName: string; tagDescription: string | null; imageUrl: string | null; isDashboardTag: boolean; relatedStores: unknown; createdAt: Date }; message: string }> => {\n const { tagName, tagDescription, imageUrl, isDashboardTag, relatedStores, uploadUrls } = input\n\n const existingTag = await checkProductTagExistsByName(tagName.trim())\n if (existingTag) {\n throw new ApiError('A tag with this name already exists', 400)\n }\n\n const createdTag = await createProductTagInDb({\n tagName: tagName.trim(),\n tagDescription,\n imageUrl: imageUrl ?? null,\n isDashboardTag,\n relatedStores,\n })\n\n if (uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map((url) => claimUploadUrl(url)))\n }\n\n scheduleStoreInitialization()\n\n const { products, ...createdTagInfo } = createdTag\n\n return {\n tag: {\n ...createdTagInfo,\n imageUrl: createdTagInfo.imageUrl ? await generateSignedUrlFromS3Url(createdTagInfo.imageUrl) : null,\n },\n message: 'Tag created successfully',\n }\n }),\n\n updateProductTag: protectedProcedure\n .input(z.object({\n id: z.number(),\n tagName: z.string().min(1).optional(),\n tagDescription: z.string().optional().nullable(),\n imageUrl: z.string().optional().nullable(),\n isDashboardTag: z.boolean().optional(),\n relatedStores: z.array(z.number()).optional(),\n uploadUrls: z.array(z.string()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise<{ tag: { id: number; tagName: string; tagDescription: string | null; imageUrl: string | null; isDashboardTag: boolean; relatedStores: unknown; createdAt: Date }; message: string }> => {\n const { id, tagName, tagDescription, imageUrl, isDashboardTag, relatedStores, uploadUrls } = input\n\n const currentTag = await getProductTagInfoByIdInDb(id)\n\n if (!currentTag) {\n throw new ApiError('Tag not found', 404)\n }\n\n if (imageUrl !== undefined && imageUrl !== currentTag.imageUrl) {\n if (currentTag.imageUrl) {\n await deleteImageUtil({ keys: [currentTag.imageUrl] })\n }\n }\n\n const updatedTag = await updateProductTagInDb(id, {\n tagName: tagName?.trim(),\n tagDescription: tagDescription ?? undefined,\n imageUrl: imageUrl ?? undefined,\n isDashboardTag,\n relatedStores,\n })\n\n if (uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map((url) => claimUploadUrl(url)))\n }\n\n scheduleStoreInitialization()\n\n const { products, ...updatedTagInfo } = updatedTag\n\n return {\n tag: {\n ...updatedTagInfo,\n imageUrl: updatedTagInfo.imageUrl ? await generateSignedUrlFromS3Url(updatedTagInfo.imageUrl) : null,\n },\n message: 'Tag updated successfully',\n }\n }),\n\n deleteProductTag: protectedProcedure\n .input(z.object({ id: z.number() }))\n .mutation(async ({ input }): Promise<{ message: string }> => {\n const tag = await getProductTagInfoByIdInDb(input.id)\n\n if (!tag) {\n throw new ApiError('Tag not found', 404)\n }\n\n if (tag.imageUrl) {\n await deleteImageUtil({ keys: [tag.imageUrl] })\n }\n\n await deleteProductTagInDb(input.id)\n\n scheduleStoreInitialization()\n\n return { message: 'Tag deleted successfully' }\n }),\n });\n", "export const subtle = globalThis.crypto?.subtle;\nexport const randomUUID = () => {\n\treturn globalThis.crypto?.randomUUID();\n};\nexport const getRandomValues = (array) => {\n\treturn globalThis.crypto?.getRandomValues(array);\n};\n", "import { notImplemented, notImplementedClass } from \"../../../_internal/utils.mjs\";\nimport { getRandomValues } from \"./web.mjs\";\nconst MAX_RANDOM_VALUE_BYTES = 65536;\nexport const webcrypto = new Proxy(globalThis.crypto, { get(_, key) {\n\tif (key === \"CryptoKey\") {\n\t\treturn globalThis.CryptoKey;\n\t}\n\tif (typeof globalThis.crypto[key] === \"function\") {\n\t\treturn globalThis.crypto[key].bind(globalThis.crypto);\n\t}\n\treturn globalThis.crypto[key];\n} });\nexport const randomBytes = (size, cb) => {\n\tconst bytes = Buffer.alloc(size, 0, undefined);\n\tfor (let generated = 0; generated < size; generated += MAX_RANDOM_VALUE_BYTES) {\n\t\tgetRandomValues(\n\t\t\t// Use subarray to get a view of the buffer\n\t\t\tUint8Array.prototype.subarray.call(bytes, generated, generated + MAX_RANDOM_VALUE_BYTES)\n);\n\t}\n\tif (typeof cb === \"function\") {\n\t\tcb(null, bytes);\n\t\treturn undefined;\n\t}\n\treturn bytes;\n};\nexport const rng = randomBytes;\nexport const prng = randomBytes;\nexport const fips = false;\nexport const checkPrime = /*@__PURE__*/ notImplemented(\"crypto.checkPrime\");\nexport const checkPrimeSync = /*@__PURE__*/ notImplemented(\"crypto.checkPrimeSync\");\n/** @deprecated */\nexport const createCipher = /*@__PURE__*/ notImplemented(\"crypto.createCipher\");\n/** @deprecated */\nexport const createDecipher = /*@__PURE__*/ notImplemented(\"crypto.createDecipher\");\nexport const pseudoRandomBytes = /*@__PURE__*/ notImplemented(\"crypto.pseudoRandomBytes\");\nexport const createCipheriv = /*@__PURE__*/ notImplemented(\"crypto.createCipheriv\");\nexport const createDecipheriv = /*@__PURE__*/ notImplemented(\"crypto.createDecipheriv\");\nexport const createDiffieHellman = /*@__PURE__*/ notImplemented(\"crypto.createDiffieHellman\");\nexport const createDiffieHellmanGroup = /*@__PURE__*/ notImplemented(\"crypto.createDiffieHellmanGroup\");\nexport const createECDH = /*@__PURE__*/ notImplemented(\"crypto.createECDH\");\nexport const createHash = /*@__PURE__*/ notImplemented(\"crypto.createHash\");\nexport const createHmac = /*@__PURE__*/ notImplemented(\"crypto.createHmac\");\nexport const createPrivateKey = /*@__PURE__*/ notImplemented(\"crypto.createPrivateKey\");\nexport const createPublicKey = /*@__PURE__*/ notImplemented(\"crypto.createPublicKey\");\nexport const createSecretKey = /*@__PURE__*/ notImplemented(\"crypto.createSecretKey\");\nexport const createSign = /*@__PURE__*/ notImplemented(\"crypto.createSign\");\nexport const createVerify = /*@__PURE__*/ notImplemented(\"crypto.createVerify\");\nexport const diffieHellman = /*@__PURE__*/ notImplemented(\"crypto.diffieHellman\");\nexport const generatePrime = /*@__PURE__*/ notImplemented(\"crypto.generatePrime\");\nexport const generatePrimeSync = /*@__PURE__*/ notImplemented(\"crypto.generatePrimeSync\");\nexport const getCiphers = /*@__PURE__*/ notImplemented(\"crypto.getCiphers\");\nexport const getCipherInfo = /*@__PURE__*/ notImplemented(\"crypto.getCipherInfo\");\nexport const getCurves = /*@__PURE__*/ notImplemented(\"crypto.getCurves\");\nexport const getDiffieHellman = /*@__PURE__*/ notImplemented(\"crypto.getDiffieHellman\");\nexport const getHashes = /*@__PURE__*/ notImplemented(\"crypto.getHashes\");\nexport const hkdf = /*@__PURE__*/ notImplemented(\"crypto.hkdf\");\nexport const hkdfSync = /*@__PURE__*/ notImplemented(\"crypto.hkdfSync\");\nexport const pbkdf2 = /*@__PURE__*/ notImplemented(\"crypto.pbkdf2\");\nexport const pbkdf2Sync = /*@__PURE__*/ notImplemented(\"crypto.pbkdf2Sync\");\nexport const generateKeyPair = /*@__PURE__*/ notImplemented(\"crypto.generateKeyPair\");\nexport const generateKeyPairSync = /*@__PURE__*/ notImplemented(\"crypto.generateKeyPairSync\");\nexport const generateKey = /*@__PURE__*/ notImplemented(\"crypto.generateKey\");\nexport const generateKeySync = /*@__PURE__*/ notImplemented(\"crypto.generateKeySync\");\nexport const privateDecrypt = /*@__PURE__*/ notImplemented(\"crypto.privateDecrypt\");\nexport const privateEncrypt = /*@__PURE__*/ notImplemented(\"crypto.privateEncrypt\");\nexport const publicDecrypt = /*@__PURE__*/ notImplemented(\"crypto.publicDecrypt\");\nexport const publicEncrypt = /*@__PURE__*/ notImplemented(\"crypto.publicEncrypt\");\nexport const randomFill = /*@__PURE__*/ notImplemented(\"crypto.randomFill\");\nexport const randomFillSync = /*@__PURE__*/ notImplemented(\"crypto.randomFillSync\");\nexport const randomInt = /*@__PURE__*/ notImplemented(\"crypto.randomInt\");\nexport const scrypt = /*@__PURE__*/ notImplemented(\"crypto.scrypt\");\nexport const scryptSync = /*@__PURE__*/ notImplemented(\"crypto.scryptSync\");\nexport const sign = /*@__PURE__*/ notImplemented(\"crypto.sign\");\nexport const setEngine = /*@__PURE__*/ notImplemented(\"crypto.setEngine\");\nexport const timingSafeEqual = /*@__PURE__*/ notImplemented(\"crypto.timingSafeEqual\");\nexport const getFips = /*@__PURE__*/ notImplemented(\"crypto.getFips\");\nexport const setFips = /*@__PURE__*/ notImplemented(\"crypto.setFips\");\nexport const verify = /*@__PURE__*/ notImplemented(\"crypto.verify\");\nexport const secureHeapUsed = /*@__PURE__*/ notImplemented(\"crypto.secureHeapUsed\");\nexport const hash = /*@__PURE__*/ notImplemented(\"crypto.hash\");\nexport const Certificate = /*@__PURE__*/ notImplementedClass(\"crypto.Certificate\");\nexport const Cipher = /*@__PURE__*/ notImplementedClass(\"crypto.Cipher\");\nexport const Cipheriv = /*@__PURE__*/ notImplementedClass(\n\t\"crypto.Cipheriv\"\n\t// @ts-expect-error not typed yet\n);\nexport const Decipher = /*@__PURE__*/ notImplementedClass(\"crypto.Decipher\");\nexport const Decipheriv = /*@__PURE__*/ notImplementedClass(\n\t\"crypto.Decipheriv\"\n\t// @ts-expect-error not typed yet\n);\nexport const DiffieHellman = /*@__PURE__*/ notImplementedClass(\"crypto.DiffieHellman\");\nexport const DiffieHellmanGroup = /*@__PURE__*/ notImplementedClass(\"crypto.DiffieHellmanGroup\");\nexport const ECDH = /*@__PURE__*/ notImplementedClass(\"crypto.ECDH\");\nexport const Hash = /*@__PURE__*/ notImplementedClass(\"crypto.Hash\");\nexport const Hmac = /*@__PURE__*/ notImplementedClass(\"crypto.Hmac\");\nexport const KeyObject = /*@__PURE__*/ notImplementedClass(\"crypto.KeyObject\");\nexport const Sign = /*@__PURE__*/ notImplementedClass(\"crypto.Sign\");\nexport const Verify = /*@__PURE__*/ notImplementedClass(\"crypto.Verify\");\nexport const X509Certificate = /*@__PURE__*/ notImplementedClass(\"crypto.X509Certificate\");\n", "export const SSL_OP_ALL = 2147485776;\nexport const SSL_OP_ALLOW_NO_DHE_KEX = 1024;\nexport const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION = 262144;\nexport const SSL_OP_CIPHER_SERVER_PREFERENCE = 4194304;\nexport const SSL_OP_CISCO_ANYCONNECT = 32768;\nexport const SSL_OP_COOKIE_EXCHANGE = 8192;\nexport const SSL_OP_CRYPTOPRO_TLSEXT_BUG = 2147483648;\nexport const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS = 2048;\nexport const SSL_OP_LEGACY_SERVER_CONNECT = 4;\nexport const SSL_OP_NO_COMPRESSION = 131072;\nexport const SSL_OP_NO_ENCRYPT_THEN_MAC = 524288;\nexport const SSL_OP_NO_QUERY_MTU = 4096;\nexport const SSL_OP_NO_RENEGOTIATION = 1073741824;\nexport const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION = 65536;\nexport const SSL_OP_NO_SSLv2 = 0;\nexport const SSL_OP_NO_SSLv3 = 33554432;\nexport const SSL_OP_NO_TICKET = 16384;\nexport const SSL_OP_NO_TLSv1 = 67108864;\nexport const SSL_OP_NO_TLSv1_1 = 268435456;\nexport const SSL_OP_NO_TLSv1_2 = 134217728;\nexport const SSL_OP_NO_TLSv1_3 = 536870912;\nexport const SSL_OP_PRIORITIZE_CHACHA = 2097152;\nexport const SSL_OP_TLS_ROLLBACK_BUG = 8388608;\nexport const ENGINE_METHOD_RSA = 1;\nexport const ENGINE_METHOD_DSA = 2;\nexport const ENGINE_METHOD_DH = 4;\nexport const ENGINE_METHOD_RAND = 8;\nexport const ENGINE_METHOD_EC = 2048;\nexport const ENGINE_METHOD_CIPHERS = 64;\nexport const ENGINE_METHOD_DIGESTS = 128;\nexport const ENGINE_METHOD_PKEY_METHS = 512;\nexport const ENGINE_METHOD_PKEY_ASN1_METHS = 1024;\nexport const ENGINE_METHOD_ALL = 65535;\nexport const ENGINE_METHOD_NONE = 0;\nexport const DH_CHECK_P_NOT_SAFE_PRIME = 2;\nexport const DH_CHECK_P_NOT_PRIME = 1;\nexport const DH_UNABLE_TO_CHECK_GENERATOR = 4;\nexport const DH_NOT_SUITABLE_GENERATOR = 8;\nexport const RSA_PKCS1_PADDING = 1;\nexport const RSA_NO_PADDING = 3;\nexport const RSA_PKCS1_OAEP_PADDING = 4;\nexport const RSA_X931_PADDING = 5;\nexport const RSA_PKCS1_PSS_PADDING = 6;\nexport const RSA_PSS_SALTLEN_DIGEST = -1;\nexport const RSA_PSS_SALTLEN_MAX_SIGN = -2;\nexport const RSA_PSS_SALTLEN_AUTO = -2;\nexport const POINT_CONVERSION_COMPRESSED = 2;\nexport const POINT_CONVERSION_UNCOMPRESSED = 4;\nexport const POINT_CONVERSION_HYBRID = 6;\nexport const defaultCoreCipherList = \"\";\nexport const defaultCipherList = \"\";\nexport const OPENSSL_VERSION_NUMBER = 0;\nexport const TLS1_VERSION = 0;\nexport const TLS1_1_VERSION = 0;\nexport const TLS1_2_VERSION = 0;\nexport const TLS1_3_VERSION = 0;\n", "import { getRandomValues, randomUUID, subtle } from \"./internal/crypto/web.mjs\";\nimport { Certificate, Cipher, Cipheriv, Decipher, Decipheriv, DiffieHellman, DiffieHellmanGroup, ECDH, Hash, Hmac, KeyObject, Sign, Verify, X509Certificate, checkPrime, checkPrimeSync, createCipheriv, createDecipheriv, createDiffieHellman, createDiffieHellmanGroup, createECDH, createHash, createHmac, createPrivateKey, createPublicKey, createSecretKey, createSign, createVerify, diffieHellman, fips, generateKey, generateKeyPair, generateKeyPairSync, generateKeySync, generatePrime, generatePrimeSync, getCipherInfo, getCiphers, getCurves, getDiffieHellman, getFips, getHashes, hash, hkdf, hkdfSync, pbkdf2, pbkdf2Sync, privateDecrypt, privateEncrypt, pseudoRandomBytes, publicDecrypt, prng, publicEncrypt, randomBytes, randomFill, randomFillSync, randomInt, rng, scrypt, scryptSync, secureHeapUsed, setEngine, setFips, sign, timingSafeEqual, verify, webcrypto } from \"./internal/crypto/node.mjs\";\nimport { OPENSSL_VERSION_NUMBER, SSL_OP_ALL, SSL_OP_ALLOW_NO_DHE_KEX, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION, SSL_OP_CIPHER_SERVER_PREFERENCE, SSL_OP_CISCO_ANYCONNECT, SSL_OP_COOKIE_EXCHANGE, SSL_OP_CRYPTOPRO_TLSEXT_BUG, SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS, SSL_OP_LEGACY_SERVER_CONNECT, SSL_OP_NO_COMPRESSION, SSL_OP_NO_ENCRYPT_THEN_MAC, SSL_OP_NO_QUERY_MTU, SSL_OP_NO_RENEGOTIATION, SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION, SSL_OP_NO_SSLv2, SSL_OP_NO_SSLv3, SSL_OP_NO_TICKET, SSL_OP_NO_TLSv1, SSL_OP_NO_TLSv1_1, SSL_OP_NO_TLSv1_2, SSL_OP_NO_TLSv1_3, SSL_OP_PRIORITIZE_CHACHA, SSL_OP_TLS_ROLLBACK_BUG, ENGINE_METHOD_RSA, ENGINE_METHOD_DSA, ENGINE_METHOD_DH, ENGINE_METHOD_RAND, ENGINE_METHOD_EC, ENGINE_METHOD_CIPHERS, ENGINE_METHOD_DIGESTS, ENGINE_METHOD_PKEY_METHS, ENGINE_METHOD_PKEY_ASN1_METHS, ENGINE_METHOD_ALL, ENGINE_METHOD_NONE, DH_CHECK_P_NOT_SAFE_PRIME, DH_CHECK_P_NOT_PRIME, DH_UNABLE_TO_CHECK_GENERATOR, DH_NOT_SUITABLE_GENERATOR, RSA_PKCS1_PADDING, RSA_NO_PADDING, RSA_PKCS1_OAEP_PADDING, RSA_X931_PADDING, RSA_PKCS1_PSS_PADDING, RSA_PSS_SALTLEN_DIGEST, RSA_PSS_SALTLEN_MAX_SIGN, RSA_PSS_SALTLEN_AUTO, defaultCoreCipherList, TLS1_VERSION, TLS1_1_VERSION, TLS1_2_VERSION, TLS1_3_VERSION, POINT_CONVERSION_COMPRESSED, POINT_CONVERSION_UNCOMPRESSED, POINT_CONVERSION_HYBRID, defaultCipherList } from \"./internal/crypto/constants.mjs\";\nexport * from \"./internal/crypto/web.mjs\";\nexport * from \"./internal/crypto/node.mjs\";\nexport const constants = {\n\tOPENSSL_VERSION_NUMBER,\n\tSSL_OP_ALL,\n\tSSL_OP_ALLOW_NO_DHE_KEX,\n\tSSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION,\n\tSSL_OP_CIPHER_SERVER_PREFERENCE,\n\tSSL_OP_CISCO_ANYCONNECT,\n\tSSL_OP_COOKIE_EXCHANGE,\n\tSSL_OP_CRYPTOPRO_TLSEXT_BUG,\n\tSSL_OP_DONT_INSERT_EMPTY_FRAGMENTS,\n\tSSL_OP_LEGACY_SERVER_CONNECT,\n\tSSL_OP_NO_COMPRESSION,\n\tSSL_OP_NO_ENCRYPT_THEN_MAC,\n\tSSL_OP_NO_QUERY_MTU,\n\tSSL_OP_NO_RENEGOTIATION,\n\tSSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION,\n\tSSL_OP_NO_SSLv2,\n\tSSL_OP_NO_SSLv3,\n\tSSL_OP_NO_TICKET,\n\tSSL_OP_NO_TLSv1,\n\tSSL_OP_NO_TLSv1_1,\n\tSSL_OP_NO_TLSv1_2,\n\tSSL_OP_NO_TLSv1_3,\n\tSSL_OP_PRIORITIZE_CHACHA,\n\tSSL_OP_TLS_ROLLBACK_BUG,\n\tENGINE_METHOD_RSA,\n\tENGINE_METHOD_DSA,\n\tENGINE_METHOD_DH,\n\tENGINE_METHOD_RAND,\n\tENGINE_METHOD_EC,\n\tENGINE_METHOD_CIPHERS,\n\tENGINE_METHOD_DIGESTS,\n\tENGINE_METHOD_PKEY_METHS,\n\tENGINE_METHOD_PKEY_ASN1_METHS,\n\tENGINE_METHOD_ALL,\n\tENGINE_METHOD_NONE,\n\tDH_CHECK_P_NOT_SAFE_PRIME,\n\tDH_CHECK_P_NOT_PRIME,\n\tDH_UNABLE_TO_CHECK_GENERATOR,\n\tDH_NOT_SUITABLE_GENERATOR,\n\tRSA_PKCS1_PADDING,\n\tRSA_NO_PADDING,\n\tRSA_PKCS1_OAEP_PADDING,\n\tRSA_X931_PADDING,\n\tRSA_PKCS1_PSS_PADDING,\n\tRSA_PSS_SALTLEN_DIGEST,\n\tRSA_PSS_SALTLEN_MAX_SIGN,\n\tRSA_PSS_SALTLEN_AUTO,\n\tdefaultCoreCipherList,\n\tTLS1_VERSION,\n\tTLS1_1_VERSION,\n\tTLS1_2_VERSION,\n\tTLS1_3_VERSION,\n\tPOINT_CONVERSION_COMPRESSED,\n\tPOINT_CONVERSION_UNCOMPRESSED,\n\tPOINT_CONVERSION_HYBRID,\n\tdefaultCipherList\n};\nexport default {\n\tconstants,\n\tgetRandomValues,\n\trandomUUID,\n\tsubtle,\n\tCertificate,\n\tCipher,\n\tCipheriv,\n\tDecipher,\n\tDecipheriv,\n\tDiffieHellman,\n\tDiffieHellmanGroup,\n\tECDH,\n\tHash,\n\tHmac,\n\tKeyObject,\n\tSign,\n\tVerify,\n\tX509Certificate,\n\tcheckPrime,\n\tcheckPrimeSync,\n\tcreateCipheriv,\n\tcreateDecipheriv,\n\tcreateDiffieHellman,\n\tcreateDiffieHellmanGroup,\n\tcreateECDH,\n\tcreateHash,\n\tcreateHmac,\n\tcreatePrivateKey,\n\tcreatePublicKey,\n\tcreateSecretKey,\n\tcreateSign,\n\tcreateVerify,\n\tdiffieHellman,\n\tfips,\n\tgenerateKey,\n\tgenerateKeyPair,\n\tgenerateKeyPairSync,\n\tgenerateKeySync,\n\tgeneratePrime,\n\tgeneratePrimeSync,\n\tgetCipherInfo,\n\tgetCiphers,\n\tgetCurves,\n\tgetDiffieHellman,\n\tgetFips,\n\tgetHashes,\n\thash,\n\thkdf,\n\thkdfSync,\n\tpbkdf2,\n\tpbkdf2Sync,\n\tprivateDecrypt,\n\tprivateEncrypt,\n\tpseudoRandomBytes,\n\tpublicDecrypt,\n\tprng,\n\tpublicEncrypt,\n\trandomBytes,\n\trandomFill,\n\trandomFillSync,\n\trandomInt,\n\trng,\n\tscrypt,\n\tscryptSync,\n\tsecureHeapUsed,\n\tsetEngine,\n\tsetFips,\n\tsign,\n\ttimingSafeEqual,\n\tverify,\n\twebcrypto\n};\n", "import {\n Cipher,\n Cipheriv,\n constants,\n createCipher,\n createCipheriv,\n createDecipher,\n createDecipheriv,\n createECDH,\n createSign,\n createVerify,\n Decipher,\n Decipheriv,\n diffieHellman,\n ECDH,\n getCipherInfo,\n hash,\n privateDecrypt,\n privateEncrypt,\n pseudoRandomBytes,\n publicDecrypt,\n publicEncrypt,\n Sign,\n sign,\n webcrypto as unenvCryptoWebcrypto,\n Verify,\n verify\n} from \"unenv/node/crypto\";\nexport {\n Cipher,\n Cipheriv,\n Decipher,\n Decipheriv,\n ECDH,\n Sign,\n Verify,\n constants,\n createCipheriv,\n createDecipheriv,\n createECDH,\n createSign,\n createVerify,\n diffieHellman,\n getCipherInfo,\n hash,\n privateDecrypt,\n privateEncrypt,\n publicDecrypt,\n publicEncrypt,\n sign,\n verify\n} from \"unenv/node/crypto\";\nconst workerdCrypto = process.getBuiltinModule(\"node:crypto\");\nexport const {\n Certificate,\n DiffieHellman,\n DiffieHellmanGroup,\n Hash,\n Hmac,\n KeyObject,\n X509Certificate,\n checkPrime,\n checkPrimeSync,\n createDiffieHellman,\n createDiffieHellmanGroup,\n createHash,\n createHmac,\n createPrivateKey,\n createPublicKey,\n createSecretKey,\n generateKey,\n generateKeyPair,\n generateKeyPairSync,\n generateKeySync,\n generatePrime,\n generatePrimeSync,\n getCiphers,\n getCurves,\n getDiffieHellman,\n getFips,\n getHashes,\n hkdf,\n hkdfSync,\n pbkdf2,\n pbkdf2Sync,\n randomBytes,\n randomFill,\n randomFillSync,\n randomInt,\n randomUUID,\n scrypt,\n scryptSync,\n secureHeapUsed,\n setEngine,\n setFips,\n subtle,\n timingSafeEqual\n} = workerdCrypto;\nexport const getRandomValues = workerdCrypto.getRandomValues.bind(\n workerdCrypto.webcrypto\n);\nexport const webcrypto = {\n // @ts-expect-error unenv has unknown type\n CryptoKey: unenvCryptoWebcrypto.CryptoKey,\n getRandomValues,\n randomUUID,\n subtle\n};\nconst fips = workerdCrypto.fips;\nexport default {\n /**\n * manually unroll unenv-polyfilled-symbols to make it tree-shakeable\n */\n Certificate,\n Cipher,\n Cipheriv,\n Decipher,\n Decipheriv,\n ECDH,\n Sign,\n Verify,\n X509Certificate,\n // @ts-expect-error @types/node is out of date - this is a bug in typings\n constants,\n // @ts-expect-error unenv has unknown type\n createCipheriv,\n // @ts-expect-error unenv has unknown type\n createDecipheriv,\n // @ts-expect-error unenv has unknown type\n createECDH,\n // @ts-expect-error unenv has unknown type\n createSign,\n // @ts-expect-error unenv has unknown type\n createVerify,\n // @ts-expect-error unenv has unknown type\n diffieHellman,\n // @ts-expect-error unenv has unknown type\n getCipherInfo,\n // @ts-expect-error unenv has unknown type\n hash,\n // @ts-expect-error unenv has unknown type\n privateDecrypt,\n // @ts-expect-error unenv has unknown type\n privateEncrypt,\n // @ts-expect-error unenv has unknown type\n publicDecrypt,\n // @ts-expect-error unenv has unknown type\n publicEncrypt,\n scrypt,\n scryptSync,\n // @ts-expect-error unenv has unknown type\n sign,\n // @ts-expect-error unenv has unknown type\n verify,\n // default-only export from unenv\n // @ts-expect-error unenv has unknown type\n createCipher,\n // @ts-expect-error unenv has unknown type\n createDecipher,\n // @ts-expect-error unenv has unknown type\n pseudoRandomBytes,\n /**\n * manually unroll workerd-polyfilled-symbols to make it tree-shakeable\n */\n DiffieHellman,\n DiffieHellmanGroup,\n Hash,\n Hmac,\n KeyObject,\n checkPrime,\n checkPrimeSync,\n createDiffieHellman,\n createDiffieHellmanGroup,\n createHash,\n createHmac,\n createPrivateKey,\n createPublicKey,\n createSecretKey,\n generateKey,\n generateKeyPair,\n generateKeyPairSync,\n generateKeySync,\n generatePrime,\n generatePrimeSync,\n getCiphers,\n getCurves,\n getDiffieHellman,\n getFips,\n getHashes,\n getRandomValues,\n hkdf,\n hkdfSync,\n pbkdf2,\n pbkdf2Sync,\n randomBytes,\n randomFill,\n randomFillSync,\n randomInt,\n randomUUID,\n secureHeapUsed,\n setEngine,\n setFips,\n subtle,\n timingSafeEqual,\n // default-only export from workerd\n fips,\n // special-cased deep merged symbols\n webcrypto\n};\n", "/*\n Copyright (c) 2012 Nevins Bartolomeo \n Copyright (c) 2012 Shane Girish \n Copyright (c) 2025 Daniel Wirtz \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n 3. The name of the author may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// The Node.js crypto module is used as a fallback for the Web Crypto API. When\n// building for the browser, inclusion of the crypto module should be disabled,\n// which the package hints at in its package.json for bundlers that support it.\nimport nodeCrypto from \"crypto\";\n\n/**\n * The random implementation to use as a fallback.\n * @type {?function(number):!Array.}\n * @inner\n */\nvar randomFallback = null;\n\n/**\n * Generates cryptographically secure random bytes.\n * @function\n * @param {number} len Bytes length\n * @returns {!Array.} Random bytes\n * @throws {Error} If no random implementation is available\n * @inner\n */\nfunction randomBytes(len) {\n // Web Crypto API. Globally available in the browser and in Node.js >=23.\n try {\n return crypto.getRandomValues(new Uint8Array(len));\n } catch {}\n // Node.js crypto module for non-browser environments.\n try {\n return nodeCrypto.randomBytes(len);\n } catch {}\n // Custom fallback specified with `setRandomFallback`.\n if (!randomFallback) {\n throw Error(\n \"Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative\",\n );\n }\n return randomFallback(len);\n}\n\n/**\n * Sets the pseudo random number generator to use as a fallback if neither node's `crypto` module nor the Web Crypto\n * API is available. Please note: It is highly important that the PRNG used is cryptographically secure and that it\n * is seeded properly!\n * @param {?function(number):!Array.} random Function taking the number of bytes to generate as its\n * sole argument, returning the corresponding array of cryptographically secure random byte values.\n * @see http://nodejs.org/api/crypto.html\n * @see http://www.w3.org/TR/WebCryptoAPI/\n */\nexport function setRandomFallback(random) {\n randomFallback = random;\n}\n\n/**\n * Synchronously generates a salt.\n * @param {number=} rounds Number of rounds to use, defaults to 10 if omitted\n * @param {number=} seed_length Not supported.\n * @returns {string} Resulting salt\n * @throws {Error} If a random fallback is required but not set\n */\nexport function genSaltSync(rounds, seed_length) {\n rounds = rounds || GENSALT_DEFAULT_LOG2_ROUNDS;\n if (typeof rounds !== \"number\")\n throw Error(\n \"Illegal arguments: \" + typeof rounds + \", \" + typeof seed_length,\n );\n if (rounds < 4) rounds = 4;\n else if (rounds > 31) rounds = 31;\n var salt = [];\n salt.push(\"$2b$\");\n if (rounds < 10) salt.push(\"0\");\n salt.push(rounds.toString());\n salt.push(\"$\");\n salt.push(base64_encode(randomBytes(BCRYPT_SALT_LEN), BCRYPT_SALT_LEN)); // May throw\n return salt.join(\"\");\n}\n\n/**\n * Asynchronously generates a salt.\n * @param {(number|function(Error, string=))=} rounds Number of rounds to use, defaults to 10 if omitted\n * @param {(number|function(Error, string=))=} seed_length Not supported.\n * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting salt\n * @returns {!Promise} If `callback` has been omitted\n * @throws {Error} If `callback` is present but not a function\n */\nexport function genSalt(rounds, seed_length, callback) {\n if (typeof seed_length === \"function\")\n (callback = seed_length), (seed_length = undefined); // Not supported.\n if (typeof rounds === \"function\") (callback = rounds), (rounds = undefined);\n if (typeof rounds === \"undefined\") rounds = GENSALT_DEFAULT_LOG2_ROUNDS;\n else if (typeof rounds !== \"number\")\n throw Error(\"illegal arguments: \" + typeof rounds);\n\n function _async(callback) {\n nextTick(function () {\n // Pretty thin, but salting is fast enough\n try {\n callback(null, genSaltSync(rounds));\n } catch (err) {\n callback(err);\n }\n });\n }\n\n if (callback) {\n if (typeof callback !== \"function\")\n throw Error(\"Illegal callback: \" + typeof callback);\n _async(callback);\n } else\n return new Promise(function (resolve, reject) {\n _async(function (err, res) {\n if (err) {\n reject(err);\n return;\n }\n resolve(res);\n });\n });\n}\n\n/**\n * Synchronously generates a hash for the given password.\n * @param {string} password Password to hash\n * @param {(number|string)=} salt Salt length to generate or salt to use, default to 10\n * @returns {string} Resulting hash\n */\nexport function hashSync(password, salt) {\n if (typeof salt === \"undefined\") salt = GENSALT_DEFAULT_LOG2_ROUNDS;\n if (typeof salt === \"number\") salt = genSaltSync(salt);\n if (typeof password !== \"string\" || typeof salt !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof password + \", \" + typeof salt);\n return _hash(password, salt);\n}\n\n/**\n * Asynchronously generates a hash for the given password.\n * @param {string} password Password to hash\n * @param {number|string} salt Salt length to generate or salt to use\n * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting hash\n * @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed\n * (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.\n * @returns {!Promise} If `callback` has been omitted\n * @throws {Error} If `callback` is present but not a function\n */\nexport function hash(password, salt, callback, progressCallback) {\n function _async(callback) {\n if (typeof password === \"string\" && typeof salt === \"number\")\n genSalt(salt, function (err, salt) {\n _hash(password, salt, callback, progressCallback);\n });\n else if (typeof password === \"string\" && typeof salt === \"string\")\n _hash(password, salt, callback, progressCallback);\n else\n nextTick(\n callback.bind(\n this,\n Error(\"Illegal arguments: \" + typeof password + \", \" + typeof salt),\n ),\n );\n }\n\n if (callback) {\n if (typeof callback !== \"function\")\n throw Error(\"Illegal callback: \" + typeof callback);\n _async(callback);\n } else\n return new Promise(function (resolve, reject) {\n _async(function (err, res) {\n if (err) {\n reject(err);\n return;\n }\n resolve(res);\n });\n });\n}\n\n/**\n * Compares two strings of the same length in constant time.\n * @param {string} known Must be of the correct length\n * @param {string} unknown Must be the same length as `known`\n * @returns {boolean}\n * @inner\n */\nfunction safeStringCompare(known, unknown) {\n var diff = known.length ^ unknown.length;\n for (var i = 0; i < known.length; ++i) {\n diff |= known.charCodeAt(i) ^ unknown.charCodeAt(i);\n }\n return diff === 0;\n}\n\n/**\n * Synchronously tests a password against a hash.\n * @param {string} password Password to compare\n * @param {string} hash Hash to test against\n * @returns {boolean} true if matching, otherwise false\n * @throws {Error} If an argument is illegal\n */\nexport function compareSync(password, hash) {\n if (typeof password !== \"string\" || typeof hash !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof password + \", \" + typeof hash);\n if (hash.length !== 60) return false;\n return safeStringCompare(\n hashSync(password, hash.substring(0, hash.length - 31)),\n hash,\n );\n}\n\n/**\n * Asynchronously tests a password against a hash.\n * @param {string} password Password to compare\n * @param {string} hashValue Hash to test against\n * @param {function(Error, boolean)=} callback Callback receiving the error, if any, otherwise the result\n * @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed\n * (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.\n * @returns {!Promise} If `callback` has been omitted\n * @throws {Error} If `callback` is present but not a function\n */\nexport function compare(password, hashValue, callback, progressCallback) {\n function _async(callback) {\n if (typeof password !== \"string\" || typeof hashValue !== \"string\") {\n nextTick(\n callback.bind(\n this,\n Error(\n \"Illegal arguments: \" + typeof password + \", \" + typeof hashValue,\n ),\n ),\n );\n return;\n }\n if (hashValue.length !== 60) {\n nextTick(callback.bind(this, null, false));\n return;\n }\n hash(\n password,\n hashValue.substring(0, 29),\n function (err, comp) {\n if (err) callback(err);\n else callback(null, safeStringCompare(comp, hashValue));\n },\n progressCallback,\n );\n }\n\n if (callback) {\n if (typeof callback !== \"function\")\n throw Error(\"Illegal callback: \" + typeof callback);\n _async(callback);\n } else\n return new Promise(function (resolve, reject) {\n _async(function (err, res) {\n if (err) {\n reject(err);\n return;\n }\n resolve(res);\n });\n });\n}\n\n/**\n * Gets the number of rounds used to encrypt the specified hash.\n * @param {string} hash Hash to extract the used number of rounds from\n * @returns {number} Number of rounds used\n * @throws {Error} If `hash` is not a string\n */\nexport function getRounds(hash) {\n if (typeof hash !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof hash);\n return parseInt(hash.split(\"$\")[2], 10);\n}\n\n/**\n * Gets the salt portion from a hash. Does not validate the hash.\n * @param {string} hash Hash to extract the salt from\n * @returns {string} Extracted salt part\n * @throws {Error} If `hash` is not a string or otherwise invalid\n */\nexport function getSalt(hash) {\n if (typeof hash !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof hash);\n if (hash.length !== 60)\n throw Error(\"Illegal hash length: \" + hash.length + \" != 60\");\n return hash.substring(0, 29);\n}\n\n/**\n * Tests if a password will be truncated when hashed, that is its length is\n * greater than 72 bytes when converted to UTF-8.\n * @param {string} password The password to test\n * @returns {boolean} `true` if truncated, otherwise `false`\n */\nexport function truncates(password) {\n if (typeof password !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof password);\n return utf8Length(password) > 72;\n}\n\n/**\n * Continues with the callback after yielding to the event loop.\n * @function\n * @param {function(...[*])} callback Callback to execute\n * @inner\n */\nvar nextTick =\n typeof setImmediate === \"function\"\n ? setImmediate\n : typeof scheduler === \"object\" && typeof scheduler.postTask === \"function\"\n ? scheduler.postTask.bind(scheduler)\n : setTimeout;\n\n/** Calculates the byte length of a string encoded as UTF8. */\nfunction utf8Length(string) {\n var len = 0,\n c = 0;\n for (var i = 0; i < string.length; ++i) {\n c = string.charCodeAt(i);\n if (c < 128) len += 1;\n else if (c < 2048) len += 2;\n else if (\n (c & 0xfc00) === 0xd800 &&\n (string.charCodeAt(i + 1) & 0xfc00) === 0xdc00\n ) {\n ++i;\n len += 4;\n } else len += 3;\n }\n return len;\n}\n\n/** Converts a string to an array of UTF8 bytes. */\nfunction utf8Array(string) {\n var offset = 0,\n c1,\n c2;\n var buffer = new Array(utf8Length(string));\n for (var i = 0, k = string.length; i < k; ++i) {\n c1 = string.charCodeAt(i);\n if (c1 < 128) {\n buffer[offset++] = c1;\n } else if (c1 < 2048) {\n buffer[offset++] = (c1 >> 6) | 192;\n buffer[offset++] = (c1 & 63) | 128;\n } else if (\n (c1 & 0xfc00) === 0xd800 &&\n ((c2 = string.charCodeAt(i + 1)) & 0xfc00) === 0xdc00\n ) {\n c1 = 0x10000 + ((c1 & 0x03ff) << 10) + (c2 & 0x03ff);\n ++i;\n buffer[offset++] = (c1 >> 18) | 240;\n buffer[offset++] = ((c1 >> 12) & 63) | 128;\n buffer[offset++] = ((c1 >> 6) & 63) | 128;\n buffer[offset++] = (c1 & 63) | 128;\n } else {\n buffer[offset++] = (c1 >> 12) | 224;\n buffer[offset++] = ((c1 >> 6) & 63) | 128;\n buffer[offset++] = (c1 & 63) | 128;\n }\n }\n return buffer;\n}\n\n// A base64 implementation for the bcrypt algorithm. This is partly non-standard.\n\n/**\n * bcrypt's own non-standard base64 dictionary.\n * @type {!Array.}\n * @const\n * @inner\n **/\nvar BASE64_CODE =\n \"./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\".split(\"\");\n\n/**\n * @type {!Array.}\n * @const\n * @inner\n **/\nvar BASE64_INDEX = [\n -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,\n -1, -1, -1, -1, -1, -1, -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, 28,\n 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,\n 48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1,\n];\n\n/**\n * Encodes a byte array to base64 with up to len bytes of input.\n * @param {!Array.} b Byte array\n * @param {number} len Maximum input length\n * @returns {string}\n * @inner\n */\nfunction base64_encode(b, len) {\n var off = 0,\n rs = [],\n c1,\n c2;\n if (len <= 0 || len > b.length) throw Error(\"Illegal len: \" + len);\n while (off < len) {\n c1 = b[off++] & 0xff;\n rs.push(BASE64_CODE[(c1 >> 2) & 0x3f]);\n c1 = (c1 & 0x03) << 4;\n if (off >= len) {\n rs.push(BASE64_CODE[c1 & 0x3f]);\n break;\n }\n c2 = b[off++] & 0xff;\n c1 |= (c2 >> 4) & 0x0f;\n rs.push(BASE64_CODE[c1 & 0x3f]);\n c1 = (c2 & 0x0f) << 2;\n if (off >= len) {\n rs.push(BASE64_CODE[c1 & 0x3f]);\n break;\n }\n c2 = b[off++] & 0xff;\n c1 |= (c2 >> 6) & 0x03;\n rs.push(BASE64_CODE[c1 & 0x3f]);\n rs.push(BASE64_CODE[c2 & 0x3f]);\n }\n return rs.join(\"\");\n}\n\n/**\n * Decodes a base64 encoded string to up to len bytes of output.\n * @param {string} s String to decode\n * @param {number} len Maximum output length\n * @returns {!Array.}\n * @inner\n */\nfunction base64_decode(s, len) {\n var off = 0,\n slen = s.length,\n olen = 0,\n rs = [],\n c1,\n c2,\n c3,\n c4,\n o,\n code;\n if (len <= 0) throw Error(\"Illegal len: \" + len);\n while (off < slen - 1 && olen < len) {\n code = s.charCodeAt(off++);\n c1 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;\n code = s.charCodeAt(off++);\n c2 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;\n if (c1 == -1 || c2 == -1) break;\n o = (c1 << 2) >>> 0;\n o |= (c2 & 0x30) >> 4;\n rs.push(String.fromCharCode(o));\n if (++olen >= len || off >= slen) break;\n code = s.charCodeAt(off++);\n c3 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;\n if (c3 == -1) break;\n o = ((c2 & 0x0f) << 4) >>> 0;\n o |= (c3 & 0x3c) >> 2;\n rs.push(String.fromCharCode(o));\n if (++olen >= len || off >= slen) break;\n code = s.charCodeAt(off++);\n c4 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;\n o = ((c3 & 0x03) << 6) >>> 0;\n o |= c4;\n rs.push(String.fromCharCode(o));\n ++olen;\n }\n var res = [];\n for (off = 0; off < olen; off++) res.push(rs[off].charCodeAt(0));\n return res;\n}\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar BCRYPT_SALT_LEN = 16;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar GENSALT_DEFAULT_LOG2_ROUNDS = 10;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar BLOWFISH_NUM_ROUNDS = 16;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar MAX_EXECUTION_TIME = 100;\n\n/**\n * @type {Array.}\n * @const\n * @inner\n */\nvar P_ORIG = [\n 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, 0x299f31d0,\n 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,\n 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, 0x9216d5d9, 0x8979fb1b,\n];\n\n/**\n * @type {Array.}\n * @const\n * @inner\n */\nvar S_ORIG = [\n 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, 0xb8e1afed, 0x6a267e96,\n 0xba7c9045, 0xf12c7f99, 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16,\n 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, 0x0d95748f, 0x728eb658,\n 0x718bcd58, 0x82154aee, 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,\n 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, 0x8e79dcb0, 0x603a180e,\n 0x6c9e0e8b, 0xb01e8a3e, 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,\n 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, 0x55ca396a, 0x2aab10b6,\n 0xb4cc5c34, 0x1141e8ce, 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,\n 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, 0xafd6ba33, 0x6c24cf5c,\n 0x7a325381, 0x28958677, 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,\n 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, 0xef845d5d, 0xe98575b1,\n 0xdc262302, 0xeb651b88, 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,\n 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, 0x21c66842, 0xf6e96c9a,\n 0x670c9c61, 0xabd388f0, 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3,\n 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, 0xa1f1651d, 0x39af0176,\n 0x66ca593e, 0x82430e88, 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,\n 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, 0x4ed3aa62, 0x363f7706,\n 0x1bfedf72, 0x429b023d, 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,\n 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, 0xe3fe501a, 0xb6794c3b,\n 0x976ce0bd, 0x04c006ba, 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,\n 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, 0x6dfc511f, 0x9b30952c,\n 0xcc814544, 0xaf5ebd09, 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3,\n 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, 0x5579c0bd, 0x1a60320a,\n 0xd6a100c6, 0x402c7279, 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,\n 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, 0x323db5fa, 0xfd238760,\n 0x53317b48, 0x3e00df82, 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db,\n 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, 0x695b27b0, 0xbbca58c8,\n 0xe1ffa35d, 0xb8f011a0, 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b,\n 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, 0xe1ddf2da, 0xa4cb7e33,\n 0x62fb1341, 0xcee4c6e8, 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,\n 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, 0xd08ed1d0, 0xafc725e0,\n 0x8e3c5b2f, 0x8e7594b7, 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c,\n 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, 0x2f2f2218, 0xbe0e1777,\n 0xea752dfe, 0x8b021fa1, 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299,\n 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, 0x165fa266, 0x80957705,\n 0x93cc7314, 0x211a1477, 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,\n 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, 0x00250e2d, 0x2071b35e,\n 0x226800bb, 0x57b8e0af, 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa,\n 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, 0x83260376, 0x6295cfa9,\n 0x11c81968, 0x4e734a41, 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,\n 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, 0x08ba6fb5, 0x571be91f,\n 0xf296ec6b, 0x2a0dd915, 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664,\n 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a, 0x4b7a70e9, 0xb5b32944,\n 0xdb75092e, 0xc4192623, 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266,\n 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, 0x193602a5, 0x75094c29,\n 0xa0591340, 0xe4183a3e, 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6,\n 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, 0x4cdd2086, 0x8470eb26,\n 0x6382e9c6, 0x021ecc5e, 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1,\n 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, 0x3e07841c, 0x7fdeae5c,\n 0x8e7d44ec, 0x5716f2b8, 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff,\n 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, 0xd19113f9, 0x7ca92ff6,\n 0x94324773, 0x22f54701, 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7,\n 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, 0xe238cd99, 0x3bea0e2f,\n 0x3280bba1, 0x183eb331, 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf,\n 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, 0xde9a771f, 0xd9930810,\n 0xb38bae12, 0xdccf3f2e, 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87,\n 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, 0xec7aec3a, 0xdb851dfa,\n 0x63094366, 0xc464c3d2, 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16,\n 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, 0x71dff89e, 0x10314e55,\n 0x81ac77d6, 0x5f11199b, 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,\n 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, 0x86e34570, 0xeae96fb1,\n 0x860e5e0a, 0x5a3e2ab3, 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f,\n 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, 0xc6150eba, 0x94e2ea78,\n 0xa5fc3c53, 0x1e0a2df4, 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960,\n 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, 0xe3bc4595, 0xa67bc883,\n 0xb17f37d1, 0x018cff28, 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802,\n 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, 0x1521b628, 0x29076170,\n 0xecdd4775, 0x619f1510, 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf,\n 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, 0xeecc86bc, 0x60622ca7,\n 0x9cab5cab, 0xb2f3846e, 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50,\n 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, 0x9b540b19, 0x875fa099,\n 0x95f7997e, 0x623d7da8, 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281,\n 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, 0x57f584a5, 0x1b227263,\n 0x9b83c3ff, 0x1ac24696, 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128,\n 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, 0x5d4a14d9, 0xe864b7e3,\n 0x42105d14, 0x203e13e0, 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0,\n 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, 0xd81e799e, 0x86854dc7,\n 0xe44b476a, 0x3d816250, 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3,\n 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, 0x095bbf00, 0xad19489d,\n 0x1462b174, 0x23820e00, 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061,\n 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, 0x7cde3759, 0xcbee7460,\n 0x4085f2a7, 0xce77326e, 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735,\n 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, 0x9e447a2e, 0xc3453484,\n 0xfdd56705, 0x0e1e9ec9, 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340,\n 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, 0x153e21e7, 0x8fb03d4a,\n 0xe6e39f2b, 0xdb83adf7, 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934,\n 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, 0xd4082471, 0x3320f46a,\n 0x43b7d4b7, 0x500061af, 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840,\n 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, 0xbfbc09ec, 0x03bd9785,\n 0x7fac6dd0, 0x31cb8504, 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,\n 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, 0x68dc1462, 0xd7486900,\n 0x680ec0a4, 0x27a18dee, 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6,\n 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, 0x20fe9e35, 0xd9f385b9,\n 0xee39d7ab, 0x3b124e8b, 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2,\n 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, 0xfb0af54e, 0xd8feb397,\n 0x454056ac, 0xba489527, 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b,\n 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, 0xa62a4a56, 0x3f3125f9,\n 0x5ef47e1c, 0x9029317c, 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3,\n 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, 0x07f9c9ee, 0x41041f0f,\n 0x404779a4, 0x5d886e17, 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564,\n 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, 0x0e12b4c2, 0x02e1329e,\n 0xaf664fd1, 0xcad18115, 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922,\n 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, 0xd0127845, 0x95b794fd,\n 0x647d0862, 0xe7ccf5f0, 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e,\n 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, 0xa812dc60, 0xa1ebddf8,\n 0x991be14c, 0xdb6e6b0d, 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804,\n 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, 0x667b9ffb, 0xcedb7d9c,\n 0xa091cf0b, 0xd9155ea3, 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb,\n 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, 0x6842ada7, 0xc66a2b3b,\n 0x12754ccc, 0x782ef11c, 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350,\n 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, 0x44421659, 0x0a121386,\n 0xd90cec6e, 0xd5abea2a, 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe,\n 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, 0xd1fd8346, 0xf6381fb0,\n 0x7745ae04, 0xd736fccc, 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f,\n 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, 0x4e58f48f, 0xf2ddfda2,\n 0xf474ef38, 0x8789bdc2, 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9,\n 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, 0x466e598e, 0x20b45770,\n 0x8cd55591, 0xc902de4c, 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e,\n 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, 0xe85a1f02, 0x09f0be8c,\n 0x4a99a025, 0x1d6efe10, 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,\n 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, 0x50115e01, 0xa70683fa,\n 0xa002b5c4, 0x0de6d027, 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5,\n 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, 0x11e69ed7, 0x2338ea63,\n 0x53c2dd94, 0xc2c21634, 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76,\n 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, 0x86e3725f, 0x724d9db9,\n 0x1ac15bb4, 0xd39eb8fc, 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4,\n 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, 0x6fd5c7e7, 0x56e14ec4,\n 0x362abfce, 0xddc6c837, 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0,\n 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, 0x5cb0679e, 0x4fa33742,\n 0xd3822740, 0x99bc9bbe, 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,\n 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, 0x5748ab2f, 0xbc946e79,\n 0xc6a376d2, 0x6549c2c8, 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,\n 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, 0xa1fad5f0, 0x6a2d519a,\n 0x63ef8ce2, 0x9a86ee22, 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4,\n 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, 0x2826a2f9, 0xa73a3ae1,\n 0x4ba99586, 0xef5562e9, 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59,\n 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, 0xe990fd5a, 0x9e34d797,\n 0x2cf0b7d9, 0x022b8b51, 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28,\n 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, 0xe029ac71, 0xe019a5e6,\n 0x47b0acfd, 0xed93fa9b, 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,\n 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, 0x15056dd4, 0x88f46dba,\n 0x03a16125, 0x0564f0bd, 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a,\n 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, 0x7533d928, 0xb155fdf5,\n 0x03563482, 0x8aba3cbb, 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,\n 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, 0xea7a90c2, 0xfb3e7bce,\n 0x5121ce64, 0x774fbe32, 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680,\n 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, 0xb39a460a, 0x6445c0dd,\n 0x586cdecf, 0x1c20c8ae, 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb,\n 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, 0x72eacea8, 0xfa6484bb,\n 0x8d6612ae, 0xbf3c6f47, 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,\n 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, 0x4040cb08, 0x4eb4e2cc,\n 0x34d2466a, 0x0115af84, 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048,\n 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, 0x611560b1, 0xe7933fdc,\n 0xbb3a792b, 0x344525bd, 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9,\n 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, 0x1a908749, 0xd44fbd9a,\n 0xd0dadecb, 0xd50ada38, 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,\n 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, 0xbf97222c, 0x15e6fc2a,\n 0x0f91fc71, 0x9b941525, 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1,\n 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, 0xe0ec6e0e, 0x1698db3b,\n 0x4c98a0be, 0x3278e964, 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,\n 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, 0xdf359f8d, 0x9b992f2e,\n 0xe60b6f47, 0x0fe3f11d, 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f,\n 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, 0xf523f357, 0xa6327623,\n 0x93a83531, 0x56cccd02, 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc,\n 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, 0xe6c6c7bd, 0x327a140a,\n 0x45e1d006, 0xc3f27b9a, 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6,\n 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, 0x53113ec0, 0x1640e3d3,\n 0x38abbd60, 0x2547adf0, 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,\n 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, 0x1948c25c, 0x02fb8a8c,\n 0x01c36ae4, 0xd6ebe1f9, 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,\n 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6,\n];\n\n/**\n * @type {Array.}\n * @const\n * @inner\n */\nvar C_ORIG = [\n 0x4f727068, 0x65616e42, 0x65686f6c, 0x64657253, 0x63727944, 0x6f756274,\n];\n\n/**\n * @param {Array.} lr\n * @param {number} off\n * @param {Array.} P\n * @param {Array.} S\n * @returns {Array.}\n * @inner\n */\nfunction _encipher(lr, off, P, S) {\n // This is our bottleneck: 1714/1905 ticks / 90% - see profile.txt\n var n,\n l = lr[off],\n r = lr[off + 1];\n\n l ^= P[0];\n\n /*\n for (var i=0, k=BLOWFISH_NUM_ROUNDS-2; i<=k;)\n // Feistel substitution on left word\n n = S[l >>> 24],\n n += S[0x100 | ((l >> 16) & 0xff)],\n n ^= S[0x200 | ((l >> 8) & 0xff)],\n n += S[0x300 | (l & 0xff)],\n r ^= n ^ P[++i],\n // Feistel substitution on right word\n n = S[r >>> 24],\n n += S[0x100 | ((r >> 16) & 0xff)],\n n ^= S[0x200 | ((r >> 8) & 0xff)],\n n += S[0x300 | (r & 0xff)],\n l ^= n ^ P[++i];\n */\n\n //The following is an unrolled version of the above loop.\n //Iteration 0\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[1];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[2];\n //Iteration 1\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[3];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[4];\n //Iteration 2\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[5];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[6];\n //Iteration 3\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[7];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[8];\n //Iteration 4\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[9];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[10];\n //Iteration 5\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[11];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[12];\n //Iteration 6\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[13];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[14];\n //Iteration 7\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[15];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[16];\n\n lr[off] = r ^ P[BLOWFISH_NUM_ROUNDS + 1];\n lr[off + 1] = l;\n return lr;\n}\n\n/**\n * @param {Array.} data\n * @param {number} offp\n * @returns {{key: number, offp: number}}\n * @inner\n */\nfunction _streamtoword(data, offp) {\n for (var i = 0, word = 0; i < 4; ++i)\n (word = (word << 8) | (data[offp] & 0xff)),\n (offp = (offp + 1) % data.length);\n return { key: word, offp: offp };\n}\n\n/**\n * @param {Array.} key\n * @param {Array.} P\n * @param {Array.} S\n * @inner\n */\nfunction _key(key, P, S) {\n var offset = 0,\n lr = [0, 0],\n plen = P.length,\n slen = S.length,\n sw;\n for (var i = 0; i < plen; i++)\n (sw = _streamtoword(key, offset)),\n (offset = sw.offp),\n (P[i] = P[i] ^ sw.key);\n for (i = 0; i < plen; i += 2)\n (lr = _encipher(lr, 0, P, S)), (P[i] = lr[0]), (P[i + 1] = lr[1]);\n for (i = 0; i < slen; i += 2)\n (lr = _encipher(lr, 0, P, S)), (S[i] = lr[0]), (S[i + 1] = lr[1]);\n}\n\n/**\n * Expensive key schedule Blowfish.\n * @param {Array.} data\n * @param {Array.} key\n * @param {Array.} P\n * @param {Array.} S\n * @inner\n */\nfunction _ekskey(data, key, P, S) {\n var offp = 0,\n lr = [0, 0],\n plen = P.length,\n slen = S.length,\n sw;\n for (var i = 0; i < plen; i++)\n (sw = _streamtoword(key, offp)), (offp = sw.offp), (P[i] = P[i] ^ sw.key);\n offp = 0;\n for (i = 0; i < plen; i += 2)\n (sw = _streamtoword(data, offp)),\n (offp = sw.offp),\n (lr[0] ^= sw.key),\n (sw = _streamtoword(data, offp)),\n (offp = sw.offp),\n (lr[1] ^= sw.key),\n (lr = _encipher(lr, 0, P, S)),\n (P[i] = lr[0]),\n (P[i + 1] = lr[1]);\n for (i = 0; i < slen; i += 2)\n (sw = _streamtoword(data, offp)),\n (offp = sw.offp),\n (lr[0] ^= sw.key),\n (sw = _streamtoword(data, offp)),\n (offp = sw.offp),\n (lr[1] ^= sw.key),\n (lr = _encipher(lr, 0, P, S)),\n (S[i] = lr[0]),\n (S[i + 1] = lr[1]);\n}\n\n/**\n * Internaly crypts a string.\n * @param {Array.} b Bytes to crypt\n * @param {Array.} salt Salt bytes to use\n * @param {number} rounds Number of rounds\n * @param {function(Error, Array.=)=} callback Callback receiving the error, if any, and the resulting bytes. If\n * omitted, the operation will be performed synchronously.\n * @param {function(number)=} progressCallback Callback called with the current progress\n * @returns {!Array.|undefined} Resulting bytes if callback has been omitted, otherwise `undefined`\n * @inner\n */\nfunction _crypt(b, salt, rounds, callback, progressCallback) {\n var cdata = C_ORIG.slice(),\n clen = cdata.length,\n err;\n\n // Validate\n if (rounds < 4 || rounds > 31) {\n err = Error(\"Illegal number of rounds (4-31): \" + rounds);\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n if (salt.length !== BCRYPT_SALT_LEN) {\n err = Error(\n \"Illegal salt length: \" + salt.length + \" != \" + BCRYPT_SALT_LEN,\n );\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n rounds = (1 << rounds) >>> 0;\n\n var P,\n S,\n i = 0,\n j;\n\n //Use typed arrays when available - huge speedup!\n if (typeof Int32Array === \"function\") {\n P = new Int32Array(P_ORIG);\n S = new Int32Array(S_ORIG);\n } else {\n P = P_ORIG.slice();\n S = S_ORIG.slice();\n }\n\n _ekskey(salt, b, P, S);\n\n /**\n * Calcualtes the next round.\n * @returns {Array.|undefined} Resulting array if callback has been omitted, otherwise `undefined`\n * @inner\n */\n function next() {\n if (progressCallback) progressCallback(i / rounds);\n if (i < rounds) {\n var start = Date.now();\n for (; i < rounds; ) {\n i = i + 1;\n _key(b, P, S);\n _key(salt, P, S);\n if (Date.now() - start > MAX_EXECUTION_TIME) break;\n }\n } else {\n for (i = 0; i < 64; i++)\n for (j = 0; j < clen >> 1; j++) _encipher(cdata, j << 1, P, S);\n var ret = [];\n for (i = 0; i < clen; i++)\n ret.push(((cdata[i] >> 24) & 0xff) >>> 0),\n ret.push(((cdata[i] >> 16) & 0xff) >>> 0),\n ret.push(((cdata[i] >> 8) & 0xff) >>> 0),\n ret.push((cdata[i] & 0xff) >>> 0);\n if (callback) {\n callback(null, ret);\n return;\n } else return ret;\n }\n if (callback) nextTick(next);\n }\n\n // Async\n if (typeof callback !== \"undefined\") {\n next();\n\n // Sync\n } else {\n var res;\n while (true) if (typeof (res = next()) !== \"undefined\") return res || [];\n }\n}\n\n/**\n * Internally hashes a password.\n * @param {string} password Password to hash\n * @param {?string} salt Salt to use, actually never null\n * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting hash. If omitted,\n * hashing is performed synchronously.\n * @param {function(number)=} progressCallback Callback called with the current progress\n * @returns {string|undefined} Resulting hash if callback has been omitted, otherwise `undefined`\n * @inner\n */\nfunction _hash(password, salt, callback, progressCallback) {\n var err;\n if (typeof password !== \"string\" || typeof salt !== \"string\") {\n err = Error(\"Invalid string / salt: Not a string\");\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n\n // Validate the salt\n var minor, offset;\n if (salt.charAt(0) !== \"$\" || salt.charAt(1) !== \"2\") {\n err = Error(\"Invalid salt version: \" + salt.substring(0, 2));\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n if (salt.charAt(2) === \"$\") (minor = String.fromCharCode(0)), (offset = 3);\n else {\n minor = salt.charAt(2);\n if (\n (minor !== \"a\" && minor !== \"b\" && minor !== \"y\") ||\n salt.charAt(3) !== \"$\"\n ) {\n err = Error(\"Invalid salt revision: \" + salt.substring(2, 4));\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n offset = 4;\n }\n\n // Extract number of rounds\n if (salt.charAt(offset + 2) > \"$\") {\n err = Error(\"Missing salt rounds\");\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n var r1 = parseInt(salt.substring(offset, offset + 1), 10) * 10,\n r2 = parseInt(salt.substring(offset + 1, offset + 2), 10),\n rounds = r1 + r2,\n real_salt = salt.substring(offset + 3, offset + 25);\n password += minor >= \"a\" ? \"\\x00\" : \"\";\n\n var passwordb = utf8Array(password),\n saltb = base64_decode(real_salt, BCRYPT_SALT_LEN);\n\n /**\n * Finishes hashing.\n * @param {Array.} bytes Byte array\n * @returns {string}\n * @inner\n */\n function finish(bytes) {\n var res = [];\n res.push(\"$2\");\n if (minor >= \"a\") res.push(minor);\n res.push(\"$\");\n if (rounds < 10) res.push(\"0\");\n res.push(rounds.toString());\n res.push(\"$\");\n res.push(base64_encode(saltb, saltb.length));\n res.push(base64_encode(bytes, C_ORIG.length * 4 - 1));\n return res.join(\"\");\n }\n\n // Sync\n if (typeof callback == \"undefined\")\n return finish(_crypt(passwordb, saltb, rounds));\n // Async\n else {\n _crypt(\n passwordb,\n saltb,\n rounds,\n function (err, bytes) {\n if (err) callback(err, null);\n else callback(null, finish(bytes));\n },\n progressCallback,\n );\n }\n}\n\n/**\n * Encodes a byte array to base64 with up to len bytes of input, using the custom bcrypt alphabet.\n * @function\n * @param {!Array.} bytes Byte array\n * @param {number} length Maximum input length\n * @returns {string}\n */\nexport function encodeBase64(bytes, length) {\n return base64_encode(bytes, length);\n}\n\n/**\n * Decodes a base64 encoded string to up to len bytes of output, using the custom bcrypt alphabet.\n * @function\n * @param {string} string String to decode\n * @param {number} length Maximum output length\n * @returns {!Array.}\n */\nexport function decodeBase64(string, length) {\n return base64_decode(string, length);\n}\n\nexport default {\n setRandomFallback,\n genSaltSync,\n genSalt,\n hashSync,\n hash,\n compareSync,\n compare,\n getRounds,\n getSalt,\n truncates,\n encodeBase64,\n decodeBase64,\n};\n", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport bcrypt from 'bcryptjs';\nimport { SignJWT } from 'jose';\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter';\nimport { ApiError } from '@/src/lib/api-error'\nimport {\n getStaffUserByName,\n getAllStaff,\n getAllUsers,\n getUserWithDetails,\n upsertUserSuspension,\n checkStaffUserExists,\n checkStaffRoleExists,\n createStaffUser,\n getAllRoles,\n} from '@/src/dbService'\nimport type { StaffUser, StaffRole } from '@packages/shared'\n\nexport const staffUserRouter = router({\n login: publicProcedure\n .input(z.object({\n name: z.string(),\n password: z.string(),\n }))\n .mutation(async ({ input }) => {\n const { name, password } = input;\n\n if (!name || !password) {\n throw new ApiError('Name and password are required', 400);\n }\n\n const staff = await getStaffUserByName(name);\n\n if (!staff) {\n throw new ApiError('Invalid credentials', 401);\n }\n\n const isPasswordValid = await bcrypt.compare(password, staff.password);\n if (!isPasswordValid) {\n throw new ApiError('Invalid credentials', 401);\n }\n\n const token = await new SignJWT({ staffId: staff.id, name: staff.name })\n .setProtectedHeader({ alg: 'HS256' })\n .setExpirationTime('30d')\n .sign(getEncodedJwtSecret());\n\n return {\n message: 'Login successful',\n token,\n staff: { id: staff.id, name: staff.name },\n };\n }),\n\n getStaff: protectedProcedure\n .query(async ({ ctx }) => {\n const staff = await getAllStaff();\n\n // Transform the data to include role and permissions in a cleaner format\n const transformedStaff = staff.map((user) => ({\n id: user.id,\n name: user.name,\n role: user.role ? {\n id: user.role.id,\n name: user.role.roleName,\n } : null,\n permissions: user.role?.rolePermissions.map((rp: any) => ({\n id: rp.permission.id,\n name: rp.permission.permissionName,\n })) || [],\n }));\n\n return {\n staff: transformedStaff,\n };\n }),\n\n getUsers: protectedProcedure\n .input(z.object({\n cursor: z.number().optional(),\n limit: z.number().default(20),\n search: z.string().optional(),\n }))\n .query(async ({ input }) => {\n const { cursor, limit, search } = input;\n\n const { users: usersToReturn, hasMore } = await getAllUsers(cursor, limit, search);\n\n const formattedUsers = usersToReturn.map((user: any) => ({\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n image: user.userDetails?.profileImage || null,\n }));\n\n return {\n users: formattedUsers,\n nextCursor: hasMore ? usersToReturn[usersToReturn.length - 1].id : undefined,\n };\n }),\n\n getUserDetails: protectedProcedure\n .input(z.object({ userId: z.number() }))\n .query(async ({ input }) => {\n const { userId } = input;\n\n const user = await getUserWithDetails(userId);\n\n if (!user) {\n throw new ApiError(\"User not found\", 404);\n }\n\n const lastOrder = user.orders[0];\n\n return {\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n addedOn: user.createdAt,\n lastOrdered: lastOrder?.createdAt || null,\n isSuspended: user.userDetails?.isSuspended || false,\n };\n }),\n\n updateUserSuspension: protectedProcedure\n .input(z.object({ userId: z.number(), isSuspended: z.boolean() }))\n .mutation(async ({ input }) => {\n const { userId, isSuspended } = input;\n\n await upsertUserSuspension(userId, isSuspended);\n\n return { success: true };\n }),\n\n createStaffUser: protectedProcedure\n .input(z.object({\n name: z.string().min(1, 'Name is required'),\n password: z.string().min(6, 'Password must be at least 6 characters'),\n roleId: z.number().int().positive('Role is required'),\n }))\n .mutation(async ({ input, ctx }) => {\n const { name, password, roleId } = input;\n\n // Check if staff user already exists\n const existingUser = await checkStaffUserExists(name);\n\n if (existingUser) {\n throw new ApiError('Staff user with this name already exists', 409);\n }\n\n // Check if role exists\n const roleExists = await checkStaffRoleExists(roleId);\n\n if (!roleExists) {\n throw new ApiError('Invalid role selected', 400);\n }\n\n // Hash password\n const hashedPassword = await bcrypt.hash(password, 12);\n\n // Create staff user\n const newUser = await createStaffUser(name, hashedPassword, roleId);\n\n return { success: true, user: { id: newUser.id, name: newUser.name } };\n }),\n\n getRoles: protectedProcedure\n .query(async ({ ctx }) => {\n const roles = await getAllRoles();\n\n return {\n roles: roles.map((role: any) => ({\n id: role.id,\n name: role.roleName,\n })),\n };\n }),\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport { ApiError } from '@/src/lib/api-error'\nimport { extractKeyFromPresignedUrl, deleteImageUtil, generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport { scheduleStoreInitialization } from '@/src/stores/store-initializer'\nimport {\n getAllStores as getAllStoresFromDb,\n getStoreById as getStoreByIdFromDb,\n createStore as createStoreInDb,\n updateStore as updateStoreInDb,\n deleteStore as deleteStoreFromDb,\n} from '@/src/dbService'\nimport type { Store } from '@packages/shared'\n\nexport const storeRouter = router({\n getStores: protectedProcedure\n .query(async ({ ctx }): Promise<{ stores: any[]; count: number }> => {\n const stores = await getAllStoresFromDb();\n\n await Promise.all(stores.map(async store => {\n if(store.imageUrl)\n store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl)\n })).catch((e) => {\n throw new ApiError(\"Unable to find store image urls\")\n })\n\n return {\n stores,\n count: stores.length,\n };\n }),\n\n getStoreById: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .query(async ({ input, ctx }): Promise<{ store: any }> => {\n const { id } = input;\n\n const store = await getStoreByIdFromDb(id);\n\n if (!store) {\n throw new ApiError(\"Store not found\", 404);\n }\n store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl);\n return {\n store,\n };\n }),\n\n createStore: protectedProcedure\n .input(z.object({\n name: z.string().min(1, \"Name is required\"),\n description: z.string().optional(),\n imageUrl: z.string().optional(),\n owner: z.number().min(1, \"Owner is required\"),\n products: z.array(z.number()).optional(),\n }))\n .mutation(async ({ input, ctx }): Promise<{ store: Store; message: string }> => {\n const { name, description, imageUrl, owner, products } = input;\n\n const imageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : undefined;\n\n const newStore = await createStoreInDb(\n {\n name,\n description,\n imageUrl: imageKey,\n owner,\n },\n products\n );\n\n /*\n // Old implementation - direct DB query:\n const [newStore] = await db\n .insert(storeInfo)\n .values({\n name,\n description,\n imageUrl: imageKey,\n owner,\n })\n .returning();\n\n // Assign selected products to this store\n if (products && products.length > 0) {\n await db\n .update(productInfo)\n .set({ storeId: newStore.id })\n .where(inArray(productInfo.id, products));\n }\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n store: newStore,\n message: \"Store created successfully\",\n };\n }),\n\n updateStore: protectedProcedure\n .input(z.object({\n id: z.number(),\n name: z.string().min(1, \"Name is required\"),\n description: z.string().optional(),\n imageUrl: z.string().optional(),\n owner: z.number().min(1, \"Owner is required\"),\n products: z.array(z.number()).optional(),\n }))\n .mutation(async ({ input, ctx }): Promise<{ store: Store; message: string }> => {\n const { id, name, description, imageUrl, owner, products } = input;\n\n const existingStore = await getStoreByIdFromDb(id);\n\n if (!existingStore) {\n throw new ApiError(\"Store not found\", 404);\n }\n\n const oldImageKey = existingStore.imageUrl;\n const newImageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : oldImageKey;\n\n // Delete old image only if:\n // 1. New image provided and keys are different, OR\n // 2. No new image but old exists (clearing the image)\n if (oldImageKey && (\n (newImageKey && newImageKey !== oldImageKey) ||\n (!newImageKey)\n )) {\n try {\n await deleteImageUtil({keys: [oldImageKey]});\n } catch (error) {\n console.error('Failed to delete old image:', error);\n // Continue with update even if deletion fails\n }\n }\n\n const updatedStore = await updateStoreInDb(\n id,\n {\n name,\n description,\n imageUrl: newImageKey,\n owner,\n },\n products\n );\n\n /*\n // Old implementation - direct DB query:\n const [updatedStore] = await db\n .update(storeInfo)\n .set({\n name,\n description,\n imageUrl: newImageKey,\n owner,\n })\n .where(eq(storeInfo.id, id))\n .returning();\n\n if (!updatedStore) {\n throw new ApiError(\"Store not found\", 404);\n }\n\n // Update products if provided\n if (products) {\n // First, set storeId to null for products not in the list but currently assigned to this store\n await db\n .update(productInfo)\n .set({ storeId: null })\n .where(eq(productInfo.storeId, id));\n\n // Then, assign the selected products to this store\n if (products.length > 0) {\n await db\n .update(productInfo)\n .set({ storeId: id })\n .where(inArray(productInfo.id, products));\n }\n }\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n store: updatedStore,\n message: \"Store updated successfully\",\n };\n }),\n\n deleteStore: protectedProcedure\n .input(z.object({\n storeId: z.number(),\n }))\n .mutation(async ({ input, ctx }): Promise<{ message: string }> => {\n const { storeId } = input;\n\n const result = await deleteStoreFromDb(storeId);\n\n /*\n // Old implementation - direct DB query with transaction:\n const result = await db.transaction(async (tx) => {\n // First, update all products of this store to set storeId to null\n await tx\n .update(productInfo)\n .set({ storeId: null })\n .where(eq(productInfo.storeId, storeId));\n\n // Then delete the store\n const [deletedStore] = await tx\n .delete(storeInfo)\n .where(eq(storeInfo.id, storeId))\n .returning();\n\n if (!deletedStore) {\n throw new ApiError(\"Store not found\", 404);\n }\n\n return {\n message: \"Store deleted successfully\",\n };\n });\n */\n\n // Reinitialize stores to reflect changes (outside transaction)\n scheduleStoreInitialization()\n\n return result;\n }),\n});\n", "import { router, protectedProcedure } from \"@/src/trpc/trpc-index\"\nimport { z } from \"zod\";\n\nconst initiateRefundSchema = z\n .object({\n orderId: z.number(),\n refundPercent: z.number().min(0).max(100).optional(),\n refundAmount: z.number().min(0).optional(),\n })\n .refine(\n (data) => {\n const hasPercent = data.refundPercent !== undefined;\n const hasAmount = data.refundAmount !== undefined;\n return (hasPercent && !hasAmount) || (!hasPercent && hasAmount);\n },\n {\n message:\n \"Provide either refundPercent or refundAmount, not both or neither\",\n }\n );\n\nexport const adminPaymentsRouter = router({\n initiateRefund: protectedProcedure\n .input(initiateRefundSchema)\n .mutation(async ({ input }) => {\n return {}\n }),\n});\n", "import { z } from 'zod';\nimport { protectedProcedure, router } from '@/src/trpc/trpc-index'\nimport { extractKeyFromPresignedUrl, generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error';\nimport { scheduleStoreInitialization } from '@/src/stores/store-initializer'\nimport {\n getBanners as getBannersFromDb,\n getBannerById as getBannerByIdFromDb,\n createBanner as createBannerInDb,\n updateBanner as updateBannerInDb,\n deleteBanner as deleteBannerFromDb,\n} from '@/src/dbService'\nimport type { Banner } from '@packages/shared'\n\n\nexport const bannerRouter = router({\n // Get all banners\n getBanners: protectedProcedure\n .query(async (): Promise<{ banners: Banner[] }> => {\n try {\n\n // Using dbService helper (new implementation)\n const banners = await getBannersFromDb();\n\n \n // Old implementation - direct DB query:\n // const banners = await db.query.homeBanners.findMany({\n // orderBy: desc(homeBanners.createdAt), // Order by creation date instead\n // Removed product relationship since we now use productIds array\n // });\n \n\n // Convert S3 keys to signed URLs for client\n const bannersWithSignedUrls = await Promise.all(\n banners.map(async (banner) => {\n try {\n return {\n ...banner,\n imageUrl: banner.imageUrl ? await generateSignedUrlFromS3Url(banner.imageUrl) : banner.imageUrl,\n // Ensure productIds is always an array\n productIds: banner.productIds || [],\n };\n } catch (error) {\n console.error(`Failed to generate signed URL for banner ${banner.id}:`, error);\n return {\n ...banner,\n imageUrl: banner.imageUrl, // Keep original on error\n // Ensure productIds is always an array\n productIds: banner.productIds || [],\n };\n }\n })\n );\n\n return {\n banners: bannersWithSignedUrls,\n };\n }\n catch(e:any) {\n console.log(e)\n \n throw new ApiError(e.message);\n }\n }),\n\n // Get single banner by ID\n getBanner: protectedProcedure\n .input(z.object({ id: z.number() }))\n .query(async ({ input }): Promise => {\n // Using dbService helper (new implementation)\n const banner = await getBannerByIdFromDb(input.id);\n \n /*\n // Old implementation - direct DB query:\n const banner = await db.query.homeBanners.findFirst({\n where: eq(homeBanners.id, input.id),\n // Removed product relationship since we now use productIds array\n });\n */\n\n if (banner) {\n try {\n // Convert S3 key to signed URL for client\n if (banner.imageUrl) {\n banner.imageUrl = await generateSignedUrlFromS3Url(banner.imageUrl);\n }\n } catch (error) {\n console.error(`Failed to generate signed URL for banner ${banner.id}:`, error);\n // Keep original imageUrl on error\n }\n\n // Ensure productIds is always an array (handle migration compatibility)\n if (!banner.productIds) {\n banner.productIds = [];\n }\n }\n\n return banner;\n }),\n\n // Create new banner\n createBanner: protectedProcedure\n .input(z.object({\n name: z.string().min(1),\n imageUrl: z.string().url(),\n description: z.string().optional(),\n productIds: z.array(z.number()).optional(),\n redirectUrl: z.string().url().optional(),\n // serialNum removed completely\n }))\n .mutation(async ({ input }): Promise => {\n try {\n // Using dbService helper (new implementation)\n const imageUrl = extractKeyFromPresignedUrl(input.imageUrl)\n const banner = await createBannerInDb({\n name: input.name,\n imageUrl: imageUrl,\n description: input.description ?? null,\n productIds: input.productIds || [],\n redirectUrl: input.redirectUrl ?? null,\n serialNum: 999, // Default value, not used\n isActive: false, // Default to inactive\n });\n\n /*\n // Old implementation - direct DB query:\n const imageUrl = extractKeyFromPresignedUrl(input.imageUrl)\n const [banner] = await db.insert(homeBanners).values({\n name: input.name,\n imageUrl: imageUrl,\n description: input.description,\n productIds: input.productIds || [],\n redirectUrl: input.redirectUrl,\n serialNum: 999, // Default value, not used\n isActive: false, // Default to inactive\n }).returning();\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return banner;\n } catch (error) {\n console.error('Error creating banner:', error);\n throw error; // Re-throw to maintain tRPC error handling\n }\n }),\n\n // Update banner\n updateBanner: protectedProcedure\n .input(z.object({\n id: z.number(),\n name: z.string().min(1).optional(),\n imageUrl: z.string().url().optional(),\n description: z.string().optional(),\n productIds: z.array(z.number()).optional(),\n redirectUrl: z.string().url().optional(),\n serialNum: z.number().nullable().optional(),\n isActive: z.boolean().optional(),\n }))\n .mutation(async ({ input }): Promise => {\n try {\n // Using dbService helper (new implementation)\n const { id, ...updateData } = input;\n\n // Extract S3 key from presigned URL if imageUrl is provided\n const processedData = {\n ...updateData,\n ...(updateData.imageUrl && {\n imageUrl: extractKeyFromPresignedUrl(updateData.imageUrl)\n }),\n };\n\n // Handle serialNum null case\n if ('serialNum' in processedData && processedData.serialNum === null) {\n processedData.serialNum = null;\n }\n\n const banner = await updateBannerInDb(id, processedData);\n\n /*\n // Old implementation - direct DB query:\n const { id, ...updateData } = input;\n const incomingProductIds = input.productIds;\n // Extract S3 key from presigned URL if imageUrl is provided\n const processedData = {\n ...updateData,\n ...(updateData.imageUrl && {\n imageUrl: extractKeyFromPresignedUrl(updateData.imageUrl)\n }),\n };\n\n // Handle serialNum null case\n const finalData: any = { ...processedData };\n if ('serialNum' in finalData && finalData.serialNum === null) {\n // Set to null explicitly\n finalData.serialNum = null;\n }\n\n const [banner] = await db.update(homeBanners)\n .set({ ...finalData, lastUpdated: new Date(), })\n .where(eq(homeBanners.id, id))\n .returning();\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return banner;\n } catch (error) {\n console.error('Error updating banner:', error);\n throw error;\n }\n }),\n\n // Delete banner\n deleteBanner: protectedProcedure\n .input(z.object({ id: z.number() }))\n .mutation(async ({ input }): Promise<{ success: true }> => {\n // Using dbService helper (new implementation)\n await deleteBannerFromDb(input.id);\n\n /*\n // Old implementation - direct DB query:\n await db.delete(homeBanners).where(eq(homeBanners.id, input.id));\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return { success: true };\n }),\n});\n", "import { protectedProcedure } from '@/src/trpc/trpc-index';\nimport { z } from 'zod';\nimport { ApiError } from '@/src/lib/api-error';\nimport { notificationQueue } from '@/src/lib/notif-job';\nimport { recomputeUserNegativityScore } from '@/src/stores/user-negativity-store';\nimport {\n createUserByMobile,\n getUserByMobile,\n getUnresolvedComplaintsCount,\n getAllUsersWithFilters,\n getOrderCountsByUserIds,\n getLastOrdersByUserIds,\n getSuspensionStatusesByUserIds,\n getUserBasicInfo,\n getUserSuspensionStatus,\n getUserOrders,\n getOrderStatusesByOrderIds,\n getItemCountsByOrderIds,\n upsertUserSuspension,\n searchUsers,\n getAllNotifCreds,\n getAllUnloggedTokens,\n getNotifTokensByUserIds,\n getUserIncidentsWithRelations,\n createUserIncident,\n} from '@/src/dbService';\n\nexport const userRouter = {\n createUserByMobile: protectedProcedure\n .input(z.object({\n mobile: z.string().min(1, 'Mobile number is required'),\n }))\n .mutation(async ({ input }) => {\n // Clean mobile number (remove non-digits)\n const cleanMobile = input.mobile.replace(/\\D/g, '');\n\n // Validate: exactly 10 digits\n if (cleanMobile.length !== 10) {\n throw new ApiError('Mobile number must be exactly 10 digits', 400);\n }\n\n // Check if user already exists\n const existingUser = await getUserByMobile(cleanMobile);\n\n if (existingUser) {\n throw new ApiError('User with this mobile number already exists', 409);\n }\n\n const newUser = await createUserByMobile(cleanMobile);\n\n return {\n success: true,\n data: newUser,\n };\n }),\n\n getEssentials: protectedProcedure\n .query(async () => {\n const count = await getUnresolvedComplaintsCount();\n \n return {\n unresolvedComplaints: count,\n };\n }),\n\n getAllUsers: protectedProcedure\n .input(z.object({\n limit: z.number().min(1).max(100).default(50),\n cursor: z.number().optional(),\n search: z.string().optional(),\n }))\n .query(async ({ input }) => {\n const { limit, cursor, search } = input;\n \n const { users: usersToReturn, hasMore } = await getAllUsersWithFilters(limit, cursor, search);\n\n // Get order stats for each user\n const userIds = usersToReturn.map((u: any) => u.id);\n \n const orderCounts = await getOrderCountsByUserIds(userIds);\n const lastOrders = await getLastOrdersByUserIds(userIds);\n const suspensionStatuses = await getSuspensionStatusesByUserIds(userIds);\n \n // Create lookup maps\n const orderCountMap = new Map(orderCounts.map(o => [o.userId, o.totalOrders]));\n const lastOrderMap = new Map(lastOrders.map(o => [o.userId, o.lastOrderDate]));\n const suspensionMap = new Map(suspensionStatuses.map(s => [s.userId, s.isSuspended]));\n\n // Combine data\n const usersWithStats = usersToReturn.map((user: any) => ({\n ...user,\n totalOrders: orderCountMap.get(user.id) || 0,\n lastOrderDate: lastOrderMap.get(user.id) || null,\n isSuspended: suspensionMap.get(user.id) ?? false,\n }));\n\n // Get next cursor\n const nextCursor = hasMore ? usersToReturn[usersToReturn.length - 1].id : undefined;\n\n return {\n users: usersWithStats,\n nextCursor,\n hasMore,\n };\n }),\n\n getUserDetails: protectedProcedure\n .input(z.object({\n userId: z.number(),\n }))\n .query(async ({ input }) => {\n const { userId } = input;\n\n // Get user info\n const user = await getUserBasicInfo(userId);\n\n if (!user) {\n throw new ApiError('User not found', 404);\n }\n\n // Get user suspension status\n const isSuspended = await getUserSuspensionStatus(userId);\n\n // Get all orders for this user\n const userOrders = await getUserOrders(userId);\n\n // Get order status for each order\n const orderIds = userOrders.map((o: any) => o.id);\n const orderStatuses = await getOrderStatusesByOrderIds(orderIds);\n\n // Get item counts for each order\n const itemCounts = await getItemCountsByOrderIds(orderIds);\n\n // Create lookup maps\n const statusMap = new Map(orderStatuses.map(s => [s.orderId, s]));\n const itemCountMap = new Map(itemCounts.map(c => [c.orderId, c.itemCount]));\n\n // Determine status string\n const getStatus = (status: { isDelivered: boolean; isCancelled: boolean } | undefined) => {\n if (!status) return 'pending';\n if (status.isCancelled) return 'cancelled';\n if (status.isDelivered) return 'delivered';\n return 'pending';\n };\n\n // Combine data\n const ordersWithDetails = userOrders.map((order: any) => {\n const status = statusMap.get(order.id);\n return {\n id: order.id,\n readableId: order.readableId,\n totalAmount: order.totalAmount,\n createdAt: order.createdAt,\n isFlashDelivery: order.isFlashDelivery,\n status: getStatus(status),\n itemCount: itemCountMap.get(order.id) || 0,\n };\n });\n\n return {\n user: {\n ...user,\n isSuspended,\n },\n orders: ordersWithDetails,\n };\n }),\n\n updateUserSuspension: protectedProcedure\n .input(z.object({\n userId: z.number(),\n isSuspended: z.boolean(),\n }))\n .mutation(async ({ input }) => {\n const { userId, isSuspended } = input;\n\n await upsertUserSuspension(userId, isSuspended);\n\n return {\n success: true,\n message: `User ${isSuspended ? 'suspended' : 'unsuspended'} successfully`,\n };\n }),\n\n getUsersForNotification: protectedProcedure\n .input(z.object({\n search: z.string().optional(),\n }))\n .query(async ({ input }) => {\n const { search } = input;\n\n const usersList = await searchUsers(search);\n\n // Get eligible users (have notif_creds entry)\n const eligibleUsers = await getAllNotifCreds();\n\n const eligibleSet = new Set(eligibleUsers.map(u => u.userId));\n\n return {\n users: usersList.map((user: any) => ({\n id: user.id,\n name: user.name,\n mobile: user.mobile,\n isEligibleForNotif: eligibleSet.has(user.id),\n })),\n };\n }),\n\n sendNotification: protectedProcedure\n .input(z.object({\n userIds: z.array(z.number()).default([]),\n title: z.string().min(1, 'Title is required'),\n text: z.string().min(1, 'Message is required'),\n imageUrl: z.string().optional(),\n }))\n .mutation(async ({ input }) => {\n const { userIds, title, text, imageUrl } = input;\n\n let tokens: string[] = [];\n\n if (userIds.length === 0) {\n // Send to all users - get tokens from both logged-in and unlogged users\n const loggedInTokens = await getAllNotifCreds();\n const unloggedTokens = await getAllUnloggedTokens();\n \n tokens = [\n ...loggedInTokens.map(t => t.token),\n ...unloggedTokens.map(t => t.token)\n ];\n } else {\n // Send to specific users - get their tokens\n const userTokens = await getNotifTokensByUserIds(userIds);\n tokens = userTokens.map(t => t.token);\n }\n\n // Queue one job per token\n let queuedCount = 0;\n for (const token of tokens) {\n try {\n await notificationQueue.add('send-admin-notification', {\n token,\n title,\n body: text,\n imageUrl: imageUrl || null,\n }, {\n attempts: 3,\n backoff: {\n type: 'exponential',\n delay: 2000,\n },\n });\n queuedCount++;\n } catch (error) {\n console.error(`Failed to queue notification for token:`, error);\n }\n }\n\n return {\n success: true,\n message: `Notification queued for ${queuedCount} users`,\n };\n }),\n\n getUserIncidents: protectedProcedure\n .input(z.object({\n userId: z.number(),\n }))\n .query(async ({ input }) => {\n const { userId } = input;\n\n const incidents = await getUserIncidentsWithRelations(userId);\n\n return {\n incidents: incidents.map((incident: any) => ({\n id: incident.id,\n userId: incident.userId,\n orderId: incident.orderId,\n dateAdded: incident.dateAdded,\n adminComment: incident.adminComment,\n addedBy: incident.addedBy?.name || 'Unknown',\n negativityScore: incident.negativityScore,\n orderStatus: incident.order?.orderStatus?.[0]?.isCancelled ? 'cancelled' : 'active',\n })),\n };\n }),\n\n addUserIncident: protectedProcedure\n .input(z.object({\n userId: z.number(),\n orderId: z.number().optional(),\n adminComment: z.string().optional(),\n negativityScore: z.number().optional(),\n }))\n .mutation(async ({ input, ctx }) => {\n const { userId, orderId, adminComment, negativityScore } = input;\n \n const adminUserId = ctx.staffUser?.id;\n \n if (!adminUserId) {\n throw new ApiError('Admin user not authenticated', 401);\n }\n\n const incident = await createUserIncident(\n userId,\n orderId,\n adminComment,\n adminUserId,\n negativityScore\n );\n\n recomputeUserNegativityScore(userId);\n\n return {\n success: true,\n data: incident,\n };\n }),\n};\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport { computeConstants } from '@/src/lib/const-store'\nimport { CONST_KEYS } from '@/src/lib/const-keys'\nimport { getAllConstants as getAllConstantsFromDb, upsertConstants as upsertConstantsInDb } from '@/src/dbService'\nimport type { Constant, ConstantUpdateResult } from '@packages/shared'\n\nexport const constRouter = router({\n getConstants: protectedProcedure\n .query(async (): Promise => {\n // Using dbService helper (new implementation)\n const constants = await getAllConstantsFromDb();\n\n /*\n // Old implementation - direct DB query:\n const constants = await db.select().from(keyValStore);\n\n const resp = constants.map(c => ({\n key: c.key,\n value: c.value,\n }));\n */\n \n return constants;\n }),\n\n updateConstants: protectedProcedure\n .input(z.object({\n constants: z.array(z.object({\n key: z.string(),\n value: z.any(),\n })),\n }))\n .mutation(async ({ input }): Promise => {\n const { constants } = input;\n\n const validKeys = Object.values(CONST_KEYS) as string[];\n const invalidKeys = constants\n .filter(c => !validKeys.includes(c.key))\n .map(c => c.key);\n\n if (invalidKeys.length > 0) {\n throw new Error(`Invalid constant keys: ${invalidKeys.join(', ')}`);\n }\n\n // Using dbService helper (new implementation)\n await upsertConstantsInDb(constants);\n\n /*\n // Old implementation - direct DB query:\n await db.transaction(async (tx) => {\n for (const { key, value } of constants) {\n await tx.insert(keyValStore)\n .values({ key, value })\n .onConflictDoUpdate({\n target: keyValStore.key,\n set: { value },\n });\n }\n });\n */\n\n // Refresh all constants in Redis after database update\n await computeConstants();\n\n return {\n success: true,\n updatedCount: constants.length,\n keys: constants.map(c => c.key),\n };\n }),\n});\n", "// import { router } from '@/src/trpc/trpc-index';\nimport { router } from '@/src/trpc/trpc-index'\nimport { complaintRouter } from '@/src/trpc/apis/admin-apis/apis/complaint'\nimport { couponRouter } from '@/src/trpc/apis/admin-apis/apis/coupon'\nimport { orderRouter } from '@/src/trpc/apis/admin-apis/apis/order'\nimport { vendorSnippetsRouter } from '@/src/trpc/apis/admin-apis/apis/vendor-snippets'\nimport { slotsRouter } from '@/src/trpc/apis/admin-apis/apis/slots'\nimport { productRouter } from '@/src/trpc/apis/admin-apis/apis/product'\nimport { staffUserRouter } from '@/src/trpc/apis/admin-apis/apis/staff-user'\nimport { storeRouter } from '@/src/trpc/apis/admin-apis/apis/store'\nimport { adminPaymentsRouter } from '@/src/trpc/apis/admin-apis/apis/payments'\nimport { bannerRouter } from '@/src/trpc/apis/admin-apis/apis/banner'\nimport { userRouter } from '@/src/trpc/apis/admin-apis/apis/user'\nimport { constRouter } from '@/src/trpc/apis/admin-apis/apis/const'\n\nexport const adminRouter = router({\n complaint: complaintRouter,\n coupon: couponRouter,\n order: orderRouter,\n vendorSnippets: vendorSnippetsRouter,\n slots: slotsRouter,\n product: productRouter,\n staffUser: staffUserRouter,\n store: storeRouter,\n payments: adminPaymentsRouter,\n banner: bannerRouter,\n user: userRouter,\n const: constRouter,\n});\n\nexport type AdminRouter = typeof adminRouter;\n", "import axios from 'axios';\n\nexport async function extractCoordsFromRedirectUrl(url: string): Promise<{ latitude: string; longitude: string } | null> {\n try {\n await axios.get(url, { maxRedirects: 0 });\n return null;\n } catch (error: any) {\n if (error.response?.status === 302 || error.response?.status === 301) {\n const redirectUrl = error.response.headers.location;\n const coordsMatch = redirectUrl.match(/!3d([-\\d.]+)!4d([-\\d.]+)/);\n if (coordsMatch) {\n return {\n latitude: coordsMatch[1],\n longitude: coordsMatch[2],\n };\n }\n }\n return null;\n }\n}\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { extractCoordsFromRedirectUrl } from '@/src/lib/license-util'\nimport {\n getUserDefaultAddress as getDefaultAddressInDb,\n getUserAddresses as getUserAddressesInDb,\n getUserAddressById as getUserAddressByIdInDb,\n clearUserDefaultAddress as clearDefaultAddressInDb,\n createUserAddress as createUserAddressInDb,\n updateUserAddress as updateUserAddressInDb,\n deleteUserAddress as deleteUserAddressInDb,\n hasOngoingOrdersForAddress as hasOngoingOrdersForAddressInDb,\n} from '@/src/dbService'\nimport type {\n UserAddressResponse,\n UserAddressesResponse,\n UserAddressDeleteResponse,\n} from '@packages/shared'\n\nexport const addressRouter = router({\n getDefaultAddress: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n const defaultAddress = await getDefaultAddressInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const [defaultAddress] = await db\n .select()\n .from(addresses)\n .where(and(eq(addresses.userId, userId), eq(addresses.isDefault, true)))\n .limit(1);\n */\n\n return { success: true, data: defaultAddress }\n }),\n\n getUserAddresses: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n const userAddresses = await getUserAddressesInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const userAddresses = await db.select().from(addresses).where(eq(addresses.userId, userId));\n */\n\n return { success: true, data: userAddresses }\n }),\n\n createAddress: protectedProcedure\n .input(z.object({\n name: z.string().min(1, 'Name is required'),\n phone: z.string().min(1, 'Phone is required'),\n addressLine1: z.string().min(1, 'Address line 1 is required'),\n addressLine2: z.string().optional(),\n city: z.string().min(1, 'City is required'),\n state: z.string().min(1, 'State is required'),\n pincode: z.string().min(1, 'Pincode is required'),\n isDefault: z.boolean().optional(),\n latitude: z.number().optional(),\n longitude: z.number().optional(),\n googleMapsUrl: z.string().optional(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { name, phone, addressLine1, addressLine2, city, state, pincode, isDefault, googleMapsUrl } = input;\n\n let { latitude, longitude } = input;\n\n if (googleMapsUrl && latitude === undefined && longitude === undefined) {\n const coords = await extractCoordsFromRedirectUrl(googleMapsUrl);\n if (coords) {\n latitude = Number(coords.latitude);\n longitude = Number(coords.longitude);\n }\n }\n\n // Validate required fields\n if (!name || !phone || !addressLine1 || !city || !state || !pincode) {\n throw new Error('Missing required fields');\n }\n\n // If setting as default, unset other defaults\n if (isDefault) {\n await clearDefaultAddressInDb(userId)\n }\n\n const newAddress = await createUserAddressInDb({\n userId,\n name,\n phone,\n addressLine1,\n addressLine2,\n city,\n state,\n pincode,\n isDefault: isDefault || false,\n latitude,\n longitude,\n googleMapsUrl,\n })\n\n /*\n // Old implementation - direct DB queries:\n if (isDefault) {\n await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId));\n }\n\n const [newAddress] = await db.insert(addresses).values({\n userId,\n name,\n phone,\n addressLine1,\n addressLine2,\n city,\n state,\n pincode,\n isDefault: isDefault || false,\n latitude,\n longitude,\n googleMapsUrl,\n }).returning();\n */\n\n return { success: true, data: newAddress }\n }),\n\n updateAddress: protectedProcedure\n .input(z.object({\n id: z.number().int().positive(),\n name: z.string().min(1, 'Name is required'),\n phone: z.string().min(1, 'Phone is required'),\n addressLine1: z.string().min(1, 'Address line 1 is required'),\n addressLine2: z.string().optional(),\n city: z.string().min(1, 'City is required'),\n state: z.string().min(1, 'State is required'),\n pincode: z.string().min(1, 'Pincode is required'),\n isDefault: z.boolean().optional(),\n latitude: z.number().optional(),\n longitude: z.number().optional(),\n googleMapsUrl: z.string().optional(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { id, name, phone, addressLine1, addressLine2, city, state, pincode, isDefault, googleMapsUrl } = input;\n\n let { latitude, longitude } = input;\n\n if (googleMapsUrl && latitude === undefined && longitude === undefined) {\n const coords = await extractCoordsFromRedirectUrl(googleMapsUrl);\n if (coords) {\n latitude = Number(coords.latitude);\n longitude = Number(coords.longitude);\n }\n }\n\n // Check if address exists and belongs to user\n const existingAddress = await getUserAddressByIdInDb(userId, id)\n if (!existingAddress) {\n throw new Error('Address not found')\n }\n\n // If setting as default, unset other defaults\n if (isDefault) {\n await clearDefaultAddressInDb(userId)\n }\n\n const updatedAddress = await updateUserAddressInDb({\n userId,\n addressId: id,\n name,\n phone,\n addressLine1,\n addressLine2,\n city,\n state,\n pincode,\n isDefault: isDefault || false,\n googleMapsUrl,\n latitude,\n longitude,\n })\n\n /*\n // Old implementation - direct DB queries:\n if (isDefault) {\n await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId));\n }\n\n const updateData: any = {\n name,\n phone,\n addressLine1,\n addressLine2,\n city,\n state,\n pincode,\n isDefault: isDefault || false,\n googleMapsUrl,\n };\n\n if (latitude !== undefined) {\n updateData.latitude = latitude;\n }\n if (longitude !== undefined) {\n updateData.longitude = longitude;\n }\n\n const [updatedAddress] = await db.update(addresses).set(updateData).where(and(eq(addresses.id, id), eq(addresses.userId, userId))).returning();\n */\n\n return { success: true, data: updatedAddress }\n }),\n\n deleteAddress: protectedProcedure\n .input(z.object({\n id: z.number().int().positive(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { id } = input;\n\n const existingAddress = await getUserAddressByIdInDb(userId, id)\n if (!existingAddress) {\n throw new Error('Address not found or does not belong to user')\n }\n\n const hasOngoingOrders = await hasOngoingOrdersForAddressInDb(id)\n if (hasOngoingOrders) {\n throw new Error('Address is attached to an ongoing order. Please cancel the order first.')\n }\n\n if (existingAddress.isDefault) {\n throw new Error('Cannot delete default address. Please set another address as default first.')\n }\n\n const deleted = await deleteUserAddressInDb(userId, id)\n\n /*\n // Old implementation - direct DB queries:\n const existingAddress = await db.select().from(addresses).where(and(eq(addresses.id, id), eq(addresses.userId, userId))).limit(1);\n if (existingAddress.length === 0) {\n throw new Error('Address not found or does not belong to user');\n }\n\n const ongoingOrders = await db.select({\n order: orders,\n status: orderStatus,\n slot: deliverySlotInfo\n })\n .from(orders)\n .innerJoin(orderStatus, eq(orders.id, orderStatus.orderId))\n .innerJoin(deliverySlotInfo, eq(orders.slotId, deliverySlotInfo.id))\n .where(and(\n eq(orders.addressId, id),\n eq(orderStatus.isCancelled, false),\n gte(deliverySlotInfo.deliveryTime, new Date())\n ))\n .limit(1);\n\n if (ongoingOrders.length > 0) {\n throw new Error('Address is attached to an ongoing order. Please cancel the order first.');\n }\n\n if (existingAddress[0].isDefault) {\n throw new Error('Cannot delete default address. Please set another address as default first.');\n }\n\n await db.delete(addresses).where(and(eq(addresses.id, id), eq(addresses.userId, userId)));\n */\n\n if (!deleted) {\n throw new Error('Address not found or does not belong to user')\n }\n\n return { success: true, message: 'Address deleted successfully' }\n }),\n});\n", "import { ApiError } from '@/src/lib/api-error'\nimport { otpSenderAuthToken } from '@/src/lib/env-exporter'\n\nconst otpStore = new Map();\n\nconst setOtpCreds = (phone: string, verificationId: string) => {\n otpStore.set(phone, verificationId);\n};\n\nexport function getOtpCreds(mobile: string) {\n const authKey = otpStore.get(mobile);\n\n return authKey || null;\n}\n\nexport const sendOtp = async (phone: string) => {\n if (!phone) {\n throw new ApiError(\"Phone number is required\", 400);\n }\n const reqUrl = `https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=${phone}&timeout=300`;\n const resp = await fetch(reqUrl, {\n headers: {\n authToken: otpSenderAuthToken,\n },\n method: \"POST\",\n });\n const data = await resp.json();\n\n if (data.message === \"SUCCESS\") {\n setOtpCreds(phone, data.data.verificationId);\n return { success: true, message: \"OTP sent successfully\", verificationId: data.data.verificationId };\n }\n if (data.message === \"REQUEST_ALREADY_EXISTS\") {\n return { success: true, message: \"OTP already sent. Last OTP is still valid\" };\n }\n\n throw new ApiError(\"Error while sending OTP. Please try again\", 500);\n};\n\nexport async function verifyOtpUtil(mobile: string, otp: string, verifId: string):Promise {\n const reqUrl = `https://cpaas.messagecentral.com/verification/v3/validateOtp?&verificationId=${verifId}&code=${otp}`;\n const resp = await fetch(reqUrl, {\n method: \"GET\",\n headers: {\n authToken: otpSenderAuthToken,\n },\n });\n\n const rawData = await resp.json();\n if (rawData.data?.verificationStatus === \"VERIFICATION_COMPLETED\") {\n // delete the verificationId from the local storage\n return true;\n }\n return false;\n}", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport bcrypt from 'bcryptjs'\nimport { SignJWT } from 'jose';\nimport { generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter'\nimport { sendOtp, verifyOtpUtil, getOtpCreds } from '@/src/lib/otp-utils'\nimport {\n getUserAuthByEmail as getUserAuthByEmailInDb,\n getUserAuthByMobile as getUserAuthByMobileInDb,\n getUserAuthById as getUserAuthByIdInDb,\n getUserAuthCreds as getUserAuthCredsInDb,\n getUserAuthDetails as getUserAuthDetailsInDb,\n createUserAuthWithMobile as createUserAuthWithMobileInDb,\n upsertUserAuthPassword as upsertUserAuthPasswordInDb,\n deleteUserAuthAccount as deleteUserAuthAccountInDb,\n createUserWithProfile as createUserWithProfileInDb,\n updateUserProfile as updateUserProfileInDb,\n getUserDetailsByUserId as getUserDetailsByUserIdInDb,\n} from '@/src/dbService'\nimport type {\n UserAuthResult,\n UserAuthResponse,\n UserOtpVerifyResponse,\n UserPasswordUpdateResponse,\n UserProfileResponse,\n UserDeleteAccountResponse,\n} from '@packages/shared'\n\ninterface LoginRequest {\n identifier: string;\n password: string;\n}\n\ninterface RegisterRequest {\n name: string;\n email: string;\n mobile: string;\n password: string;\n profileImageUrl?: string | null;\n}\n\nconst generateToken = async (userId: number): Promise => {\n return await new SignJWT({ userId })\n .setProtectedHeader({ alg: 'HS256' })\n .setExpirationTime('7d')\n .sign(getEncodedJwtSecret());\n};\n\n\n\nexport const authRouter = router({\n login: publicProcedure\n .input(z.object({\n identifier: z.string().min(1, 'Email/mobile is required'),\n password: z.string().min(1, 'Password is required'),\n }))\n .mutation(async ({ input }): Promise => {\n const { identifier, password }: LoginRequest = input;\n\n if (!identifier || !password) {\n throw new ApiError('Email/mobile and password are required', 400);\n }\n\n // Find user by email or mobile\n const user = await getUserAuthByEmailInDb(identifier.toLowerCase())\n let foundUser = user || null\n\n if (!foundUser) {\n // Try mobile if email didn't work\n const userByMobile = await getUserAuthByMobileInDb(identifier)\n foundUser = userByMobile || null\n }\n\n if (!foundUser) {\n throw new ApiError('Invalid credentials', 401);\n }\n\n // Get user credentials\n const userCredentials = await getUserAuthCredsInDb(foundUser.id)\n\n if (!userCredentials) {\n throw new ApiError('Account setup incomplete. Please contact support.', 401);\n }\n\n // Get user details for profile image\n const userDetail = await getUserAuthDetailsInDb(foundUser.id)\n\n // Generate signed URL for profile image if it exists\n const profileImageSignedUrl = userDetail?.profileImage\n ? await generateSignedUrlFromS3Url(userDetail.profileImage)\n : null;\n\n // Verify password\n const isPasswordValid = await bcrypt.compare(password, userCredentials.userPassword);\n if (!isPasswordValid) {\n throw new ApiError('Invalid credentials', 401);\n }\n\n const token = await generateToken(foundUser.id);\n\n const response: UserAuthResponse = {\n token,\n user: {\n id: foundUser.id,\n name: foundUser.name,\n email: foundUser.email,\n mobile: foundUser.mobile,\n createdAt: foundUser.createdAt.toISOString(),\n profileImage: profileImageSignedUrl,\n bio: userDetail?.bio || null,\n dateOfBirth: userDetail?.dateOfBirth\n ? new Date(userDetail.dateOfBirth as any).toISOString()\n : null,\n gender: userDetail?.gender || null,\n occupation: userDetail?.occupation || null,\n },\n };\n\n return {\n success: true,\n data: response,\n }\n }),\n\n register: publicProcedure\n .input(z.object({\n name: z.string().min(1, 'Name is required'),\n email: z.string().email('Invalid email format'),\n mobile: z.string().min(1, 'Mobile is required'),\n password: z.string().min(1, 'Password is required'),\n profileImageUrl: z.string().nullable().optional(),\n }))\n .mutation(async ({ input }): Promise => {\n const { name, email, mobile, password, profileImageUrl }: RegisterRequest = input;\n\n if (!name || !email || !mobile || !password) {\n throw new ApiError('All fields are required', 400);\n }\n\n // Validate email format\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!emailRegex.test(email)) {\n throw new ApiError('Invalid email format', 400);\n }\n\n // Validate mobile format (Indian mobile numbers)\n const cleanMobile = mobile.replace(/\\D/g, '');\n if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) {\n throw new ApiError('Invalid mobile number', 400);\n }\n\n // Check if email already exists\n const existingEmail = await getUserAuthByEmailInDb(email.toLowerCase())\n\n if (existingEmail) {\n throw new ApiError('Email already registered', 409);\n }\n\n // Check if mobile already exists\n const existingMobile = await getUserAuthByMobileInDb(cleanMobile)\n\n if (existingMobile) {\n throw new ApiError('Mobile number already registered', 409);\n }\n\n // Hash password\n const hashedPassword = await bcrypt.hash(password, 12);\n\n // Create user and credentials in a transaction\n const newUser = await createUserWithProfileInDb({\n name: name.trim(),\n email: email.toLowerCase().trim(),\n mobile: cleanMobile,\n hashedPassword,\n profileImage: profileImageUrl ?? null,\n })\n\n const token = await generateToken(newUser.id);\n\n const profileImageSignedUrl = profileImageUrl\n ? await generateSignedUrlFromS3Url(profileImageUrl)\n : null\n\n const response: UserAuthResponse = {\n token,\n user: {\n id: newUser.id,\n name: newUser.name,\n email: newUser.email,\n mobile: newUser.mobile,\n createdAt: newUser.createdAt.toISOString(),\n profileImage: profileImageSignedUrl,\n },\n };\n\n return {\n success: true,\n data: response,\n }\n }),\n\n sendOtp: publicProcedure\n .input(z.object({\n mobile: z.string(),\n }))\n .mutation(async ({ input }) => {\n \n return await sendOtp(input.mobile);\n }),\n\n verifyOtp: publicProcedure\n .input(z.object({\n mobile: z.string(),\n otp: z.string(),\n }))\n .mutation(async ({ input }): Promise => {\n const verificationId = getOtpCreds(input.mobile);\n if (!verificationId) {\n throw new ApiError(\"OTP not sent or expired\", 400);\n }\n const isVerified = await verifyOtpUtil(input.mobile, input.otp, verificationId);\n\n if (!isVerified) {\n throw new ApiError(\"Invalid OTP\", 400);\n }\n\n // Find user\n let user = await getUserAuthByMobileInDb(input.mobile)\n\n // If user doesn't exist, create one\n if (!user) {\n user = await createUserAuthWithMobileInDb(input.mobile)\n }\n\n // Generate JWT\n const token = await generateToken(user.id);\n\n return {\n success: true,\n token,\n user: {\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n createdAt: user.createdAt.toISOString(),\n profileImage: null,\n },\n }\n }),\n\n updatePassword: protectedProcedure\n .input(z.object({\n password: z.string().min(6, 'Password must be at least 6 characters'),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const hashedPassword = await bcrypt.hash(input.password, 10);\n\n // Insert if not exists, then update if exists\n await upsertUserAuthPasswordInDb(userId, hashedPassword)\n\n /*\n // Old implementation - direct DB queries:\n try {\n await db.insert(userCreds).values({\n userId: userId,\n userPassword: hashedPassword,\n });\n } catch (error: any) {\n if (error.code === '23505') {\n await db.update(userCreds).set({\n userPassword: hashedPassword,\n }).where(eq(userCreds.userId, userId));\n } else {\n throw error;\n }\n }\n */\n\n return { success: true, message: 'Password updated successfully' }\n }),\n\n updateProfile: protectedProcedure\n .input(z.object({\n name: z.string().min(1).optional(),\n email: z.string().email('Invalid email format').optional(),\n mobile: z.string().min(1).optional(),\n password: z.string().min(6, 'Password must be at least 6 characters').optional(),\n bio: z.string().optional().nullable(),\n dateOfBirth: z.string().optional().nullable(),\n gender: z.string().optional().nullable(),\n occupation: z.string().optional().nullable(),\n profileImageUrl: z.string().optional().nullable(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const { name, email, mobile, password, bio, dateOfBirth, gender, occupation, profileImageUrl } = input\n\n if (email) {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!emailRegex.test(email)) {\n throw new ApiError('Invalid email format', 400);\n }\n }\n\n if (mobile) {\n const cleanMobile = mobile.replace(/\\D/g, '');\n if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) {\n throw new ApiError('Invalid mobile number', 400);\n }\n }\n\n if (email) {\n const existingEmail = await getUserAuthByEmailInDb(email.toLowerCase())\n if (existingEmail && existingEmail.id !== userId) {\n throw new ApiError('Email already registered', 409)\n }\n }\n\n if (mobile) {\n const cleanMobile = mobile.replace(/\\D/g, '')\n const existingMobile = await getUserAuthByMobileInDb(cleanMobile)\n if (existingMobile && existingMobile.id !== userId) {\n throw new ApiError('Mobile number already registered', 409)\n }\n }\n\n let hashedPassword: string | undefined;\n if (password) {\n hashedPassword = await bcrypt.hash(password, 12)\n }\n\n const updatedUser = await updateUserProfileInDb(userId, {\n name: name?.trim(),\n email: email?.toLowerCase().trim(),\n mobile: mobile?.replace(/\\D/g, ''),\n hashedPassword,\n profileImage: profileImageUrl ?? undefined,\n bio: bio ?? undefined,\n dateOfBirth: dateOfBirth ? new Date(dateOfBirth) : undefined,\n gender: gender ?? undefined,\n occupation: occupation ?? undefined,\n })\n\n const userDetail = await getUserDetailsByUserIdInDb(userId)\n const profileImageSignedUrl = userDetail?.profileImage\n ? await generateSignedUrlFromS3Url(userDetail.profileImage)\n : null\n\n const authHeader = ctx.req.header('authorization');\n const token = authHeader?.replace('Bearer ', '') || ''\n\n const response: UserAuthResponse = {\n token,\n user: {\n id: updatedUser.id,\n name: updatedUser.name,\n email: updatedUser.email,\n mobile: updatedUser.mobile,\n createdAt: updatedUser.createdAt?.toISOString?.() || new Date().toISOString(),\n profileImage: profileImageSignedUrl,\n bio: userDetail?.bio || null,\n dateOfBirth: userDetail?.dateOfBirth\n ? new Date(userDetail.dateOfBirth as any).toISOString()\n : null,\n gender: userDetail?.gender || null,\n occupation: userDetail?.occupation || null,\n },\n }\n\n return {\n success: true,\n data: response,\n }\n }),\n\n getProfile: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const user = await getUserAuthByIdInDb(userId)\n\n if (!user) {\n throw new ApiError('User not found', 404);\n }\n\n return {\n success: true,\n data: {\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n },\n }\n }),\n\n deleteAccount: protectedProcedure\n .input(z.object({\n mobile: z.string().min(10, 'Mobile number is required'),\n }))\n .mutation(async ({ ctx, input }): Promise => {\n const userId = ctx.user.userId;\n const { mobile } = input;\n \n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n // Double-check: verify user exists and is the authenticated user\n const existingUser = await getUserAuthByIdInDb(userId)\n\n if (!existingUser) {\n throw new ApiError('User not found', 404);\n }\n\n // Additional verification: ensure we're not deleting someone else's data\n // The JWT token should already ensure this, but double-checking\n if (existingUser.id !== userId) {\n throw new ApiError('Unauthorized: Cannot delete another user\\'s account', 403);\n }\n\n // Verify mobile number matches user's registered mobile\n const cleanInputMobile = mobile.replace(/\\D/g, '');\n const cleanUserMobile = existingUser.mobile?.replace(/\\D/g, '');\n\n if (cleanInputMobile !== cleanUserMobile) {\n throw new ApiError('Mobile number does not match your registered number', 400);\n }\n\n // Use transaction for atomic deletion\n await deleteUserAuthAccountInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n await db.transaction(async (tx) => {\n await tx.delete(notifCreds).where(eq(notifCreds.userId, userId));\n await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.userId, userId));\n await tx.delete(couponUsage).where(eq(couponUsage.userId, userId));\n await tx.delete(complaints).where(eq(complaints.userId, userId));\n await tx.delete(cartItems).where(eq(cartItems.userId, userId));\n await tx.delete(notifications).where(eq(notifications.userId, userId));\n await tx.delete(productReviews).where(eq(productReviews.userId, userId));\n await tx.update(reservedCoupons)\n .set({ redeemedBy: null })\n .where(eq(reservedCoupons.redeemedBy, userId));\n\n const userOrders = await tx\n .select({ id: orders.id })\n .from(orders)\n .where(eq(orders.userId, userId));\n\n for (const order of userOrders) {\n await tx.delete(orderItems).where(eq(orderItems.orderId, order.id));\n await tx.delete(orderStatus).where(eq(orderStatus.orderId, order.id));\n await tx.delete(payments).where(eq(payments.orderId, order.id));\n await tx.delete(refunds).where(eq(refunds.orderId, order.id));\n await tx.delete(couponUsage).where(eq(couponUsage.orderId, order.id));\n await tx.delete(complaints).where(eq(complaints.orderId, order.id));\n }\n\n await tx.delete(orders).where(eq(orders.userId, userId));\n await tx.delete(addresses).where(eq(addresses.userId, userId));\n await tx.delete(userDetails).where(eq(userDetails.userId, userId));\n await tx.delete(userCreds).where(eq(userCreds.userId, userId));\n await tx.delete(users).where(eq(users.id, userId));\n });\n */\n\n return { success: true, message: 'Account deleted successfully' }\n }),\n});\n", "import { router, protectedProcedure, publicProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport { getMultipleProductsSlots } from '@/src/stores/slot-store'\nimport {\n getUserCartItemsWithProducts as getUserCartItemsWithProductsInDb,\n getUserProductById as getUserProductByIdInDb,\n getUserCartItemByUserProduct as getUserCartItemByUserProductInDb,\n incrementUserCartItemQuantity as incrementUserCartItemQuantityInDb,\n insertUserCartItem as insertUserCartItemInDb,\n updateUserCartItemQuantity as updateUserCartItemQuantityInDb,\n deleteUserCartItem as deleteUserCartItemInDb,\n clearUserCart as clearUserCartInDb,\n} from '@/src/dbService'\nimport type { UserCartResponse } from '@packages/shared'\n\nconst getCartData = async (userId: number): Promise => {\n const cartItemsWithProducts = await getUserCartItemsWithProductsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const cartItemsWithProducts = await db\n .select({\n cartId: cartItems.id,\n productId: productInfo.id,\n productName: productInfo.name,\n productPrice: productInfo.price,\n productImages: productInfo.images,\n productQuantity: productInfo.productQuantity,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n quantity: cartItems.quantity,\n addedAt: cartItems.addedAt,\n })\n .from(cartItems)\n .innerJoin(productInfo, eq(cartItems.productId, productInfo.id))\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(eq(cartItems.userId, userId));\n */\n\n const cartWithSignedUrls = cartItemsWithProducts.map((item) => ({\n ...item,\n product: {\n ...item.product,\n images: scaffoldAssetUrl(item.product.images || []),\n },\n }))\n\n const totalAmount = cartWithSignedUrls.reduce((sum, item) => sum + item.subtotal, 0)\n\n return {\n items: cartWithSignedUrls,\n totalItems: cartWithSignedUrls.length,\n totalAmount,\n }\n}\n\nexport const cartRouter = router({\n getCart: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n return await getCartData(userId);\n }),\n\n addToCart: protectedProcedure\n .input(z.object({\n productId: z.number().int().positive(),\n quantity: z.number().int().positive(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { productId, quantity } = input;\n\n // Validate input\n if (!productId || !quantity || quantity <= 0) {\n throw new ApiError(\"Product ID and positive quantity required\", 400);\n }\n\n // Check if product exists\n const product = await getUserProductByIdInDb(productId)\n\n if (!product) {\n throw new ApiError('Product not found', 404)\n }\n\n const existingItem = await getUserCartItemByUserProductInDb(userId, productId)\n\n if (existingItem) {\n await incrementUserCartItemQuantityInDb(existingItem.id, quantity)\n } else {\n await insertUserCartItemInDb(userId, productId, quantity)\n }\n\n /*\n // Old implementation - direct DB queries:\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n });\n\n if (!product) {\n throw new ApiError(\"Product not found\", 404);\n }\n\n const existingItem = await db.query.cartItems.findFirst({\n where: and(eq(cartItems.userId, userId), eq(cartItems.productId, productId)),\n });\n\n if (existingItem) {\n await db.update(cartItems)\n .set({\n quantity: sql`${cartItems.quantity} + ${quantity}`,\n })\n .where(eq(cartItems.id, existingItem.id));\n } else {\n await db.insert(cartItems).values({\n userId,\n productId,\n quantity: quantity.toString(),\n });\n }\n */\n\n // Return updated cart\n return await getCartData(userId)\n }),\n\n updateCartItem: protectedProcedure\n .input(z.object({\n itemId: z.number().int().positive(),\n quantity: z.number().int().min(0),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { itemId, quantity } = input;\n\n if (!quantity || quantity <= 0) {\n throw new ApiError(\"Positive quantity required\", 400);\n }\n\n const updated = await updateUserCartItemQuantityInDb(userId, itemId, quantity)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedItem] = await db.update(cartItems)\n .set({ quantity: quantity.toString() })\n .where(and(\n eq(cartItems.id, itemId),\n eq(cartItems.userId, userId)\n ))\n .returning();\n\n if (!updatedItem) {\n throw new ApiError(\"Cart item not found\", 404);\n }\n */\n\n if (!updated) {\n throw new ApiError('Cart item not found', 404)\n }\n\n // Return updated cart\n return await getCartData(userId)\n }),\n\n removeFromCart: protectedProcedure\n .input(z.object({\n itemId: z.number().int().positive(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { itemId } = input;\n\n const deleted = await deleteUserCartItemInDb(userId, itemId)\n\n /*\n // Old implementation - direct DB queries:\n const [deletedItem] = await db.delete(cartItems)\n .where(and(\n eq(cartItems.id, itemId),\n eq(cartItems.userId, userId)\n ))\n .returning();\n\n if (!deletedItem) {\n throw new ApiError(\"Cart item not found\", 404);\n }\n */\n\n if (!deleted) {\n throw new ApiError('Cart item not found', 404)\n }\n\n // Return updated cart\n return await getCartData(userId)\n }),\n\n clearCart: protectedProcedure\n .mutation(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n await clearUserCartInDb(userId)\n\n /*\n // Old implementation - direct DB query:\n await db.delete(cartItems).where(eq(cartItems.userId, userId));\n */\n\n return {\n items: [],\n totalItems: 0,\n totalAmount: 0,\n message: \"Cart cleared successfully\",\n }\n }),\n\n // Original DB-based getCartSlots (commented out)\n // getCartSlots: publicProcedure\n // .input(z.object({\n // productIds: z.array(z.number().int().positive())\n // }))\n // .query(async ({ input }) => {\n // const { productIds } = input;\n //\n // if (productIds.length === 0) {\n // return {};\n // }\n //\n // // Get slots for these products where freeze time is after current time\n // const slotsData = await db\n // .select({\n // productId: productSlots.productId,\n // slotId: deliverySlotInfo.id,\n // deliveryTime: deliverySlotInfo.deliveryTime,\n // freezeTime: deliverySlotInfo.freezeTime,\n // isActive: deliverySlotInfo.isActive,\n // })\n // .from(productSlots)\n // .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n // .where(and(\n // inArray(productSlots.productId, productIds),\n // gt(deliverySlotInfo.freezeTime, sql`NOW()`),\n // eq(deliverySlotInfo.isActive, true)\n // ));\n //\n // // Group by productId\n // const result: Record = {};\n // slotsData.forEach(slot => {\n // if (!result[slot.productId]) {\n // result[slot.productId] = [];\n // }\n // result[slot.productId].push({\n // id: slot.slotId,\n // deliveryTime: slot.deliveryTime,\n // freezeTime: slot.freezeTime,\n // });\n // });\n //\n // return result;\n // }),\n\n // Cache-based getCartSlots\n getCartSlots: publicProcedure\n .input(z.object({\n productIds: z.array(z.number().int().positive())\n }))\n .query(async ({ input }) => {\n const { productIds } = input;\n\n if (productIds.length === 0) {\n return {};\n }\n\n return await getMultipleProductsSlots(productIds);\n }),\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport {\n getUserComplaints as getUserComplaintsInDb,\n createUserComplaint as createUserComplaintInDb,\n} from '@/src/dbService'\nimport type { UserComplaintsResponse, UserRaiseComplaintResponse } from '@packages/shared'\n\nexport const complaintRouter = router({\n getAll: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n const userComplaints = await getUserComplaintsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const userComplaints = await db\n .select({\n id: complaints.id,\n complaintBody: complaints.complaintBody,\n response: complaints.response,\n isResolved: complaints.isResolved,\n createdAt: complaints.createdAt,\n orderId: complaints.orderId,\n })\n .from(complaints)\n .where(eq(complaints.userId, userId))\n .orderBy(complaints.createdAt);\n\n return {\n complaints: userComplaints.map(c => ({\n id: c.id,\n complaintBody: c.complaintBody,\n response: c.response,\n isResolved: c.isResolved,\n createdAt: c.createdAt,\n orderId: c.orderId,\n })),\n };\n */\n\n return {\n complaints: userComplaints,\n }\n }),\n\n raise: protectedProcedure\n .input(z.object({\n orderId: z.string().optional(),\n complaintBody: z.string().min(1, 'Complaint body is required'),\n imageUrls: z.array(z.string()).optional(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { orderId, complaintBody, imageUrls } = input;\n\n let orderIdNum: number | null = null;\n\n if (orderId) {\n const readableIdMatch = orderId.match(/^ORD(\\d+)$/);\n if (readableIdMatch) {\n orderIdNum = parseInt(readableIdMatch[1]);\n }\n }\n\n await createUserComplaintInDb(\n userId,\n orderIdNum,\n complaintBody.trim(),\n imageUrls && imageUrls.length > 0 ? imageUrls : null\n )\n\n /*\n // Old implementation - direct DB query:\n await db.insert(complaints).values({\n userId,\n orderId: orderIdNum,\n complaintBody: complaintBody.trim(),\n });\n */\n\n return { success: true, message: 'Complaint raised successfully' }\n }),\n});\n", "import { router, protectedProcedure } from \"@/src/trpc/trpc-index\";\nimport { z } from \"zod\";\nimport {\n applyDiscountToUserOrder,\n cancelUserOrderTransaction,\n checkUserSuspended,\n db,\n deleteUserCartItemsForOrder,\n getOrderProductById,\n getUserAddressByIdAndUser,\n getUserCouponUsageForOrder,\n getUserOrderBasic,\n getUserOrderByIdWithRelations,\n getUserOrderCount,\n getUserOrdersWithRelations,\n getUserProductIdsFromOrders,\n getUserProductsForRecentOrders,\n getUserRecentlyDeliveredOrderIds,\n getUserSlotCapacityStatus,\n orders,\n orderItems,\n orderStatus,\n placeUserOrderTransaction,\n recordUserCouponUsage,\n updateUserOrderNotes,\n validateAndGetUserCoupon,\n} from \"@/src/dbService\";\nimport { getNextDeliveryDate } from \"@/src/trpc/apis/common-apis/common\";\nimport { scaffoldAssetUrl } from \"@/src/lib/s3-client\";\nimport { ApiError } from \"@/src/lib/api-error\";\nimport {\n sendOrderPlacedNotification,\n sendOrderCancelledNotification,\n} from \"@/src/lib/notif-job\";\nimport { CONST_KEYS, getConstant, getConstants } from \"@/src/lib/const-store\";\nimport { publishFormattedOrder, publishCancellation } from \"@/src/lib/post-order-handler\";\nimport { getSlotById } from \"@/src/stores/slot-store\";\nimport type {\n UserOrdersResponse,\n UserOrderDetail,\n UserCancelOrderResponse,\n UserUpdateNotesResponse,\n UserRecentProductsResponse,\n} from \"@/src/dbService\";\n\nconst toApiDate = (value: unknown): string => {\n if (value instanceof Date) {\n return Number.isNaN(value.getTime()) ? \"\" : value.toISOString()\n }\n\n if (typeof value === \"number\") {\n const date = new Date(value)\n return Number.isNaN(date.getTime()) ? \"\" : date.toISOString()\n }\n\n if (typeof value === \"string\") {\n const date = new Date(value)\n return Number.isNaN(date.getTime()) ? value : date.toISOString()\n }\n\n return \"\"\n}\n\nconst placeOrderUtil = async (params: {\n userId: number;\n selectedItems: Array<{\n productId: number;\n quantity: number;\n slotId: number | null;\n }>;\n addressId: number;\n paymentMethod: \"online\" | \"cod\";\n couponId?: number;\n userNotes?: string;\n isFlash?: boolean;\n}) => {\n const {\n userId,\n selectedItems,\n addressId,\n paymentMethod,\n couponId,\n userNotes,\n } = params;\n\n const constants = await getConstants([\n CONST_KEYS.minRegularOrderValue,\n CONST_KEYS.deliveryCharge,\n CONST_KEYS.flashFreeDeliveryThreshold,\n CONST_KEYS.flashDeliveryCharge,\n ]);\n\n const isFlashDelivery = params.isFlash;\n const minOrderValue = (isFlashDelivery ? constants[CONST_KEYS.flashFreeDeliveryThreshold] : constants[CONST_KEYS.minRegularOrderValue]) || 0;\n const deliveryCharge = (isFlashDelivery ? constants[CONST_KEYS.flashDeliveryCharge] : constants[CONST_KEYS.deliveryCharge]) || 0;\n\n const orderGroupId = `${Date.now()}-${userId}`;\n\n const address = await getUserAddressByIdAndUser(addressId, userId);\n if (!address) {\n throw new ApiError(\"Invalid address\", 400);\n }\n\n const ordersBySlot = new Map<\n number | null,\n Array<{\n productId: number;\n quantity: number;\n slotId: number | null;\n product: Awaited>;\n }>\n >();\n\n for (const item of selectedItems) {\n const product = await getOrderProductById(item.productId);\n if (!product) {\n throw new ApiError(`Product ${item.productId} not found`, 400);\n }\n\n if (!ordersBySlot.has(item.slotId)) {\n ordersBySlot.set(item.slotId, []);\n }\n ordersBySlot.get(item.slotId)!.push({ ...item, product });\n }\n\n if (params.isFlash) {\n for (const item of selectedItems) {\n const product = await getOrderProductById(item.productId);\n if (!product?.isFlashAvailable) {\n throw new ApiError(`Product ${item.productId} is not available for flash delivery`, 400);\n }\n }\n }\n\n let totalAmount = 0;\n for (const [slotId, items] of ordersBySlot) {\n const orderTotal = items.reduce(\n (sum, item) => {\n if (!item.product) return sum\n const basePrice = params.isFlash\n ? (item.product.flashPrice ?? item.product.price)\n : item.product.price\n const itemPrice = parseFloat((basePrice ?? 0).toString())\n return sum + itemPrice * item.quantity;\n },\n 0\n );\n totalAmount += orderTotal;\n }\n\n const appliedCoupon = await validateAndGetUserCoupon(couponId, userId, totalAmount);\n\n const expectedDeliveryCharge =\n totalAmount < minOrderValue ? deliveryCharge : 0;\n\n const totalWithDelivery = totalAmount + expectedDeliveryCharge;\n\n type OrderData = {\n order: Omit;\n orderItems: Omit[];\n orderStatus: Omit;\n };\n\n const ordersData: OrderData[] = [];\n let isFirstOrder = true;\n\n for (const [slotId, items] of ordersBySlot) {\n const subOrderTotal = items.reduce(\n (sum, item) => {\n if (!item.product) return sum\n const basePrice = params.isFlash\n ? (item.product.flashPrice ?? item.product.price)\n : item.product.price\n const itemPrice = parseFloat((basePrice ?? 0).toString())\n return sum + itemPrice * item.quantity;\n },\n 0\n );\n const subOrderTotalWithDelivery = subOrderTotal + expectedDeliveryCharge;\n\n const orderGroupProportion = subOrderTotal / totalAmount;\n const orderTotalAmount = isFirstOrder ? subOrderTotalWithDelivery : subOrderTotal;\n\n const { finalOrderTotal: finalOrderAmount } = applyDiscountToUserOrder(\n orderTotalAmount,\n appliedCoupon,\n orderGroupProportion\n );\n\n const order: Omit = {\n userId,\n addressId,\n slotId: params.isFlash ? null : slotId,\n isCod: paymentMethod === \"cod\",\n isOnlinePayment: paymentMethod === \"online\",\n paymentInfoId: null,\n totalAmount: finalOrderAmount.toString(),\n deliveryCharge: isFirstOrder ? expectedDeliveryCharge.toString() : \"0\",\n readableId: -1,\n userNotes: userNotes || null,\n orderGroupId,\n orderGroupProportion: orderGroupProportion.toString(),\n isFlashDelivery: params.isFlash,\n };\n\n const validItems = items.filter(\n (item): item is typeof item & { product: NonNullable } =>\n item.product !== null && item.product !== undefined\n )\n const orderItemsData: Omit[] = validItems.map(\n (item) => {\n const basePrice = params.isFlash\n ? (item.product.flashPrice ?? item.product.price)\n : item.product.price\n const priceString = (basePrice ?? 0).toString()\n\n return {\n orderId: 0,\n productId: item.productId,\n quantity: item.quantity.toString(),\n price: priceString,\n discountedPrice: priceString,\n }\n }\n );\n\n const orderStatusData: Omit = {\n userId,\n orderId: 0,\n paymentStatus: paymentMethod === \"cod\" ? \"cod\" : \"pending\",\n };\n\n ordersData.push({ order, orderItems: orderItemsData, orderStatus: orderStatusData });\n isFirstOrder = false;\n }\n\n const createdOrders = await placeUserOrderTransaction({\n userId,\n ordersData,\n paymentMethod,\n totalWithDelivery,\n });\n\n await deleteUserCartItemsForOrder(\n userId,\n selectedItems.map((item) => item.productId)\n );\n\n if (appliedCoupon && createdOrders.length > 0) {\n await recordUserCouponUsage(\n userId,\n appliedCoupon.id,\n createdOrders[0].id\n );\n }\n\n for (const order of createdOrders) {\n sendOrderPlacedNotification(userId, order.id.toString());\n }\n\n await publishFormattedOrder(createdOrders, ordersBySlot);\n\n return { success: true, data: createdOrders };\n};\n\nexport const orderRouter = router({\n placeOrder: protectedProcedure\n .input(\n z.object({\n selectedItems: z.array(\n z.object({\n productId: z.number().int().positive(),\n quantity: z.number().int().positive(),\n slotId: z.union([z.number().int(), z.null()]),\n })\n ),\n addressId: z.number().int().positive(),\n paymentMethod: z.enum([\"online\", \"cod\"]),\n couponId: z.number().int().positive().optional(),\n userNotes: z.string().optional(),\n isFlashDelivery: z.boolean().optional().default(false),\n })\n )\n .mutation(async ({ input, ctx }) => {\n const userId = ctx.user.userId;\n\n const isSuspended = await checkUserSuspended(userId);\n if (isSuspended) {\n throw new ApiError(\"Unable to place order\", 403);\n }\n\n const {\n selectedItems,\n addressId,\n paymentMethod,\n couponId,\n userNotes,\n isFlashDelivery,\n } = input;\n\n if (isFlashDelivery) {\n const isFlashDeliveryEnabled = await getConstant(CONST_KEYS.isFlashDeliveryEnabled);\n if (!isFlashDeliveryEnabled) {\n throw new ApiError(\"Flash delivery is currently unavailable. Please opt for scheduled delivery.\", 403);\n }\n }\n\n if (!isFlashDelivery) {\n const slotIds = [...new Set(selectedItems.filter(i => i.slotId !== null).map(i => i.slotId as number))];\n for (const slotId of slotIds) {\n const isCapacityFull = await getUserSlotCapacityStatus(slotId);\n if (isCapacityFull) {\n throw new ApiError(\"Selected delivery slot is at full capacity. Please choose another slot.\", 403);\n }\n }\n }\n\n let processedItems = selectedItems;\n\n if (isFlashDelivery) {\n processedItems = selectedItems.map(item => ({\n ...item,\n slotId: null as any,\n }));\n }\n\n return await placeOrderUtil({\n userId,\n selectedItems: processedItems,\n addressId,\n paymentMethod,\n couponId,\n userNotes,\n isFlash: isFlashDelivery,\n });\n }),\n\n getOrders: protectedProcedure\n .input(\n z\n .object({\n page: z.number().min(1).default(1),\n pageSize: z.number().min(1).max(50).default(10),\n })\n .optional()\n )\n .query(async ({ input, ctx }): Promise => {\n const { page = 1, pageSize = 10 } = input || {};\n const userId = ctx.user.userId;\n const offset = (page - 1) * pageSize;\n\n const totalCount = await getUserOrderCount(userId);\n const userOrders = await getUserOrdersWithRelations(userId, offset, pageSize);\n\n const mappedOrders = await Promise.all(\n userOrders.map(async (order) => {\n const status = order.orderStatus[0];\n const refund = order.refunds[0];\n\n type DeliveryStatus = \"cancelled\" | \"success\" | \"pending\" | \"packaged\";\n type OrderStatus = \"cancelled\" | \"success\";\n\n let deliveryStatus: DeliveryStatus;\n let orderStatus: OrderStatus;\n\n const allItemsPackaged = order.orderItems.every(\n (item) => item.is_packaged\n );\n\n if (status?.isCancelled) {\n deliveryStatus = \"cancelled\";\n orderStatus = \"cancelled\";\n } else if (status?.isDelivered) {\n deliveryStatus = \"success\";\n orderStatus = \"success\";\n } else if (allItemsPackaged) {\n deliveryStatus = \"packaged\";\n orderStatus = \"success\";\n } else {\n deliveryStatus = \"pending\";\n orderStatus = \"success\";\n }\n\n const paymentMode = order.isCod ? \"CoD\" : \"Online\";\n const paymentStatus = status?.paymentStatus || \"pending\";\n const refundStatus = refund?.refundStatus || \"none\";\n const refundAmount = refund?.refundAmount\n ? parseFloat(refund.refundAmount.toString())\n : null;\n\n const items = await Promise.all(\n order.orderItems.map(async (item) => {\n const signedImages = item.product.images\n ? scaffoldAssetUrl(\n item.product.images as string[]\n )\n : [];\n return {\n productName: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n discountedPrice: parseFloat(\n item.discountedPrice?.toString() || item.price.toString()\n ),\n amount:\n parseFloat(item.price.toString()) * parseFloat(item.quantity),\n image: signedImages[0] || null,\n };\n })\n );\n\n return {\n id: order.id,\n orderId: `ORD${order.id}`,\n orderDate: toApiDate(order.createdAt),\n deliveryStatus,\n deliveryDate: toApiDate(order.slot?.deliveryTime) || undefined,\n orderStatus,\n cancelReason: status?.cancelReason || null,\n paymentMode,\n totalAmount: Number(order.totalAmount),\n deliveryCharge: Number(order.deliveryCharge),\n paymentStatus,\n refundStatus,\n refundAmount,\n userNotes: order.userNotes || null,\n items,\n isFlashDelivery: order.isFlashDelivery,\n createdAt: toApiDate(order.createdAt),\n };\n })\n );\n\n return {\n success: true,\n data: mappedOrders,\n pagination: {\n page,\n pageSize,\n totalCount,\n totalPages: Math.ceil(totalCount / pageSize),\n },\n };\n }),\n\n getOrderById: protectedProcedure\n .input(z.object({ orderId: z.string() }))\n .query(async ({ input, ctx }): Promise => {\n const { orderId } = input;\n const userId = ctx.user.userId;\n\n const order = await getUserOrderByIdWithRelations(parseInt(orderId), userId);\n\n if (!order) {\n throw new Error(\"Order not found\");\n }\n\n const couponUsageData = await getUserCouponUsageForOrder(order.id);\n\n let couponData = null;\n if (couponUsageData.length > 0) {\n let totalDiscountAmount = 0;\n const orderTotal = parseFloat(order.totalAmount.toString());\n\n for (const usage of couponUsageData) {\n let discountAmount = 0;\n\n if (usage.coupon.discountPercent) {\n discountAmount =\n (orderTotal *\n parseFloat(usage.coupon.discountPercent.toString())) /\n 100;\n } else if (usage.coupon.flatDiscount) {\n discountAmount = parseFloat(usage.coupon.flatDiscount.toString());\n }\n\n if (\n usage.coupon.maxValue &&\n discountAmount > parseFloat(usage.coupon.maxValue.toString())\n ) {\n discountAmount = parseFloat(usage.coupon.maxValue.toString());\n }\n\n totalDiscountAmount += discountAmount;\n }\n\n couponData = {\n couponCode: couponUsageData\n .map((u) => u.coupon.couponCode)\n .join(\", \"),\n couponDescription: `${couponUsageData.length} coupons applied`,\n discountAmount: totalDiscountAmount,\n };\n }\n\n const status = order.orderStatus[0];\n const refund = order.refunds[0];\n\n type DeliveryStatus = \"cancelled\" | \"success\" | \"pending\" | \"packaged\";\n type OrderStatus = \"cancelled\" | \"success\";\n\n let deliveryStatus: DeliveryStatus;\n let orderStatusResult: OrderStatus;\n\n const allItemsPackaged = order.orderItems.every(\n (item) => item.is_packaged\n );\n\n if (status?.isCancelled) {\n deliveryStatus = \"cancelled\";\n orderStatusResult = \"cancelled\";\n } else if (status?.isDelivered) {\n deliveryStatus = \"success\";\n orderStatusResult = \"success\";\n } else if (allItemsPackaged) {\n deliveryStatus = \"packaged\";\n orderStatusResult = \"success\";\n } else {\n deliveryStatus = \"pending\";\n orderStatusResult = \"success\";\n }\n\n const paymentMode = order.isCod ? \"CoD\" : \"Online\";\n const paymentStatus = status?.paymentStatus || \"pending\";\n const refundStatus = refund?.refundStatus || \"none\";\n const refundAmount = refund?.refundAmount\n ? parseFloat(refund.refundAmount.toString())\n : null;\n\n const items = await Promise.all(\n order.orderItems.map(async (item) => {\n const signedImages = item.product.images\n ? scaffoldAssetUrl(\n item.product.images as string[]\n )\n : [];\n return {\n productName: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n discountedPrice: parseFloat(\n item.discountedPrice?.toString() || item.price.toString()\n ),\n amount:\n parseFloat(item.price.toString()) * parseFloat(item.quantity),\n image: signedImages[0] || null,\n };\n })\n );\n\n return {\n id: order.id,\n orderId: `ORD${order.id}`,\n orderDate: toApiDate(order.createdAt),\n deliveryStatus,\n deliveryDate: toApiDate(order.slot?.deliveryTime) || undefined,\n orderStatus: orderStatusResult,\n cancellationStatus: orderStatusResult,\n cancelReason: status?.cancelReason || null,\n paymentMode,\n paymentStatus,\n refundStatus,\n refundAmount,\n userNotes: order.userNotes || null,\n items,\n couponCode: couponData?.couponCode || null,\n couponDescription: couponData?.couponDescription || null,\n discountAmount: couponData?.discountAmount || null,\n orderAmount: parseFloat(order.totalAmount.toString()),\n isFlashDelivery: order.isFlashDelivery,\n createdAt: toApiDate(order.createdAt),\n totalAmount: parseFloat(order.totalAmount.toString()),\n deliveryCharge: parseFloat(order.deliveryCharge.toString()),\n };\n }),\n\n cancelOrder: protectedProcedure\n .input(\n z.object({\n id: z.number(),\n reason: z.string().min(1, \"Cancellation reason is required\"),\n })\n )\n .mutation(async ({ input, ctx }): Promise => {\n try {\n const userId = ctx.user.userId;\n const { id, reason } = input;\n\n const order = await getUserOrderBasic(id);\n\n if (!order) {\n console.error(\"Order not found:\", id);\n throw new ApiError(\"Order not found\", 404);\n }\n\n if (order.userId !== userId) {\n console.error(\"Order does not belong to user:\", {\n orderId: id,\n orderUserId: order.userId,\n requestUserId: userId,\n });\n\n throw new ApiError(\"Order not found\", 404);\n }\n\n const status = order.orderStatus[0];\n if (!status) {\n console.error(\"Order status not found for order:\", id);\n throw new ApiError(\"Order status not found\", 400);\n }\n\n if (status.isCancelled) {\n console.error(\"Order is already cancelled:\", id);\n throw new ApiError(\"Order is already cancelled\", 400);\n }\n\n if (status.isDelivered) {\n console.error(\"Cannot cancel delivered order:\", id);\n throw new ApiError(\"Cannot cancel delivered order\", 400);\n }\n\n await cancelUserOrderTransaction(id, status.id, reason, order.isCod);\n\n await sendOrderCancelledNotification(userId, id.toString());\n\n await publishCancellation(id, 'user', reason);\n\n return { success: true, message: \"Order cancelled successfully\" };\n } catch (e) {\n console.log(e);\n throw new ApiError(\"failed to cancel order\");\n }\n }),\n\n updateUserNotes: protectedProcedure\n .input(\n z.object({\n id: z.number(),\n userNotes: z.string(),\n })\n )\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { id, userNotes } = input;\n\n const order = await getUserOrderBasic(id);\n\n if (!order) {\n console.error(\"Order not found:\", id);\n throw new ApiError(\"Order not found\", 404);\n }\n\n if (order.userId !== userId) {\n console.error(\"Order does not belong to user:\", {\n orderId: id,\n orderUserId: order.userId,\n requestUserId: userId,\n });\n throw new ApiError(\"Order not found\", 404);\n }\n\n const status = order.orderStatus[0];\n if (!status) {\n console.error(\"Order status not found for order:\", id);\n throw new ApiError(\"Order status not found\", 400);\n }\n\n if (status.isDelivered) {\n console.error(\"Cannot update notes for delivered order:\", id);\n throw new ApiError(\"Cannot update notes for delivered order\", 400);\n }\n\n if (status.isCancelled) {\n console.error(\"Cannot update notes for cancelled order:\", id);\n throw new ApiError(\"Cannot update notes for cancelled order\", 400);\n }\n\n await updateUserOrderNotes(id, userNotes);\n\n return { success: true, message: \"Notes updated successfully\" };\n }),\n\n getRecentlyOrderedProducts: protectedProcedure\n .input(\n z\n .object({\n limit: z.number().min(1).max(50).default(20),\n })\n .optional()\n )\n .query(async ({ input, ctx }): Promise => {\n const { limit = 20 } = input || {};\n const userId = ctx.user.userId;\n\n const thirtyDaysAgo = new Date();\n thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30);\n\n const recentOrderIds = await getUserRecentlyDeliveredOrderIds(userId, 10, thirtyDaysAgo);\n\n if (recentOrderIds.length === 0) {\n return { success: true, products: [] };\n }\n\n const productIds = await getUserProductIdsFromOrders(recentOrderIds);\n\n if (productIds.length === 0) {\n return { success: true, products: [] };\n }\n\n const productsWithUnits = await getUserProductsForRecentOrders(productIds, limit);\n\n const formattedProducts = await Promise.all(\n productsWithUnits.map(async (product) => {\n const nextDeliveryDate = await getNextDeliveryDate(product.id);\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n unit: product.unitShortNotation,\n incrementStep: product.incrementStep,\n isOutOfStock: product.isOutOfStock,\n nextDeliveryDate: nextDeliveryDate\n ? nextDeliveryDate.toISOString()\n : null,\n images: scaffoldAssetUrl(\n (product.images as string[]) || []\n ),\n };\n })\n );\n\n return {\n success: true,\n products: formattedProducts,\n };\n }),\n});\n", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { claimUploadUrl, extractKeyFromPresignedUrl, scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getProductById as getProductByIdFromCache, getAllProducts as getAllProductsFromCache } from '@/src/stores/product-store'\nimport dayjs from 'dayjs'\nimport {\n getUserProductDetailById as getUserProductDetailByIdInDb,\n getUserProductReviews as getUserProductReviewsInDb,\n getUserProductByIdBasic as getUserProductByIdBasicInDb,\n createUserProductReview as createUserProductReviewInDb,\n} from '@/src/dbService'\nimport type {\n UserProductDetail,\n UserProductDetailData,\n UserProductReviewsResponse,\n UserCreateReviewResponse,\n UserProductReviewWithSignedUrls,\n} from '@packages/shared'\n\nconst signProductImages = (product: UserProductDetailData): UserProductDetail => ({\n ...product,\n images: scaffoldAssetUrl(product.images || []),\n})\n\nexport const productRouter = router({\n getProductDetails: publicProcedure\n .input(z.object({\n id: z.string().regex(/^\\d+$/, 'Invalid product ID'),\n }))\n .query(async ({ input }): Promise => {\n const { id } = input;\n const productId = parseInt(id);\n\n if (isNaN(productId)) {\n throw new Error('Invalid product ID');\n }\n\n console.log('from the api to get product details')\n\n// First, try to get the product from Redis cache\n const cachedProduct = await getProductByIdFromCache(productId);\n \n if (cachedProduct) {\n // Filter delivery slots to only include those with future freeze times and not at full capacity\n const currentTime = new Date();\n const filteredSlots = cachedProduct.deliverySlots.filter(slot => \n dayjs(slot.freezeTime).isAfter(currentTime) && !slot.isCapacityFull\n );\n \n return {\n ...cachedProduct,\n deliverySlots: filteredSlots\n };\n }\n\n // If not in cache, fetch from database (fallback)\n const productData = await getUserProductDetailByIdInDb(productId)\n\n /*\n // Old implementation - direct DB queries:\n const productData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n longDescription: productInfo.longDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n storeId: productInfo.storeId,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n productQuantity: productInfo.productQuantity,\n isFlashAvailable: productInfo.isFlashAvailable,\n flashPrice: productInfo.flashPrice,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(eq(productInfo.id, productId))\n .limit(1);\n */\n\n if (!productData) {\n throw new Error('Product not found')\n }\n\n return signProductImages(productData)\n }),\n\n getProductReviews: publicProcedure\n .input(z.object({\n productId: z.number().int().positive(),\n limit: z.number().int().min(1).max(50).optional().default(10),\n offset: z.number().int().min(0).optional().default(0),\n }))\n .query(async ({ input }): Promise => {\n const { productId, limit, offset } = input;\n\n const { reviews, totalCount } = await getUserProductReviewsInDb(productId, limit, offset)\n\n /*\n // Old implementation - direct DB queries:\n const reviews = await db\n .select({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n userName: users.name,\n })\n .from(productReviews)\n .innerJoin(users, eq(productReviews.userId, users.id))\n .where(eq(productReviews.productId, productId))\n .orderBy(desc(productReviews.reviewTime))\n .limit(limit)\n .offset(offset);\n\n const totalCountResult = await db\n .select({ count: sql`count(*)` })\n .from(productReviews)\n .where(eq(productReviews.productId, productId));\n\n const totalCount = Number(totalCountResult[0].count);\n const hasMore = offset + limit < totalCount;\n */\n\n const reviewsWithSignedUrls: UserProductReviewWithSignedUrls[] = reviews.map((review) => ({\n ...review,\n signedImageUrls: scaffoldAssetUrl(review.imageUrls || []),\n }))\n\n const hasMore = offset + limit < totalCount\n\n return { reviews: reviewsWithSignedUrls, hasMore }\n }),\n\n createReview: protectedProcedure\n .input(z.object({\n productId: z.number().int().positive(),\n reviewBody: z.string().min(1, 'Review body is required'),\n ratings: z.number().int().min(1).max(5),\n imageUrls: z.array(z.string()).optional().default([]),\n uploadUrls: z.array(z.string()).optional().default([]),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const { productId, reviewBody, ratings, imageUrls, uploadUrls } = input;\n const userId = ctx.user.userId;\n\n const product = await getUserProductByIdBasicInDb(productId)\n if (!product) {\n throw new ApiError('Product not found', 404)\n }\n\n const imageKeys = uploadUrls.map(item => extractKeyFromPresignedUrl(item))\n const newReview = await createUserProductReviewInDb(userId, productId, reviewBody, ratings, imageKeys)\n\n /*\n // Old implementation - direct DB queries:\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n });\n if (!product) {\n throw new ApiError('Product not found', 404);\n }\n\n const [newReview] = await db.insert(productReviews).values({\n userId,\n productId,\n reviewBody,\n ratings,\n imageUrls: uploadUrls.map(item => extractKeyFromPresignedUrl(item)),\n }).returning();\n */\n\n // Claim upload URLs\n if (uploadUrls && uploadUrls.length > 0) {\n try {\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)));\n } catch (error) {\n console.error('Error claiming upload URLs:', error);\n // Don't fail the review creation\n }\n }\n\n return { success: true, review: newReview }\n }),\n\n \n getAllProductsSummary: publicProcedure\n .query(async (): Promise => {\n // Get all products from cache\n const allCachedProducts = await getAllProductsFromCache();\n\n // Transform the cached products to match the expected summary format\n // (with empty deliverySlots and specialDeals arrays for summary view)\n const transformedProducts: UserProductDetail[] = allCachedProducts.map(product => ({\n ...product,\n images: product.images || [],\n deliverySlots: [],\n specialDeals: [],\n }))\n\n return transformedProducts\n }),\n\n});\n", "import { router, protectedProcedure, publicProcedure } from '@/src/trpc/trpc-index'\nimport { SignJWT } from 'jose'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter'\nimport { generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport {\n getUserProfileById as getUserProfileByIdInDb,\n getUserProfileDetailById as getUserProfileDetailByIdInDb,\n getUserWithCreds as getUserWithCredsInDb,\n upsertUserNotifCred as upsertUserNotifCredInDb,\n deleteUserUnloggedToken as deleteUserUnloggedTokenInDb,\n getUserUnloggedToken as getUserUnloggedTokenInDb,\n upsertUserUnloggedToken as upsertUserUnloggedTokenInDb,\n} from '@/src/dbService'\nimport type {\n UserSelfDataResponse,\n UserProfileCompleteResponse,\n UserSavePushTokenResponse,\n} from '@packages/shared'\n\nconst generateToken = async (userId: number): Promise => {\n return await new SignJWT({ userId })\n .setProtectedHeader({ alg: 'HS256' })\n .setExpirationTime('7d')\n .sign(getEncodedJwtSecret());\n};\n\nexport const userRouter = router({\n getSelfData: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const user = await getUserProfileByIdInDb(userId)\n\n if (!user) {\n throw new ApiError('User not found', 404);\n }\n\n // Get user details for profile image\n const userDetail = await getUserProfileDetailByIdInDb(userId)\n\n // Generate signed URL for profile image if it exists\n const profileImageSignedUrl = userDetail?.profileImage\n ? await generateSignedUrlFromS3Url(userDetail.profileImage)\n : null;\n\n return {\n success: true,\n data: {\n user: {\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n profileImage: profileImageSignedUrl,\n bio: userDetail?.bio || null,\n dateOfBirth: userDetail?.dateOfBirth\n ? new Date(userDetail.dateOfBirth as any).toISOString()\n : null,\n gender: userDetail?.gender || null,\n occupation: userDetail?.occupation || null,\n },\n },\n }\n }),\n\n checkProfileComplete: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const result = await getUserWithCredsInDb(userId)\n\n if (!result) {\n throw new ApiError('User not found', 404)\n }\n\n return {\n isComplete: !!(result.user.name && result.user.email && result.creds),\n };\n }),\n\n savePushToken: publicProcedure\n .input(z.object({ token: z.string() }))\n .mutation(async ({ input, ctx }): Promise => {\n const { token } = input;\n const userId = ctx.user?.userId;\n\n if (userId) {\n // AUTHENTICATED USER\n // Check if token exists in notif_creds for this user\n await upsertUserNotifCredInDb(userId, token)\n await deleteUserUnloggedTokenInDb(token)\n\n } else {\n // UNAUTHENTICATED USER\n // Save/update in unlogged_user_tokens\n const existing = await getUserUnloggedTokenInDb(token)\n if (existing) {\n await upsertUserUnloggedTokenInDb(token)\n } else {\n await upsertUserUnloggedTokenInDb(token)\n }\n }\n\n return { success: true }\n }),\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport {\n getUserActiveCouponsWithRelations as getUserActiveCouponsWithRelationsInDb,\n getUserAllCouponsWithRelations as getUserAllCouponsWithRelationsInDb,\n getUserReservedCouponByCode as getUserReservedCouponByCodeInDb,\n redeemUserReservedCoupon as redeemUserReservedCouponInDb,\n} from '@/src/dbService'\nimport type {\n UserCouponDisplay,\n UserEligibleCouponsResponse,\n UserMyCouponsResponse,\n UserRedeemCouponResponse,\n} from '@packages/shared'\n\nconst generateCouponDescription = (coupon: { discountPercent?: string | null; flatDiscount?: string | null; minOrder?: string | null; maxValue?: string | null }): string => {\n let desc = '';\n\n if (coupon.discountPercent) {\n desc += `${coupon.discountPercent}% off`;\n } else if (coupon.flatDiscount) {\n desc += `\u20B9${coupon.flatDiscount} off`;\n }\n\n if (coupon.minOrder) {\n desc += ` on orders above \u20B9${coupon.minOrder}`;\n }\n\n if (coupon.maxValue) {\n desc += ` (max discount \u20B9${coupon.maxValue})`;\n }\n\n return desc;\n};\n\nexport const userCouponRouter = router({\n getEligible: protectedProcedure\n .query(async ({ ctx }): Promise => {\n try {\n\n const userId = ctx.user.userId;\n \n const allCoupons = await getUserActiveCouponsWithRelationsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const allCoupons = await db.query.coupons.findMany({\n where: and(\n eq(coupons.isInvalidated, false),\n or(\n isNull(coupons.validTill),\n gt(coupons.validTill, new Date())\n )\n ),\n with: {\n usages: {\n where: eq(couponUsage.userId, userId)\n },\n applicableUsers: {\n with: {\n user: true\n }\n },\n applicableProducts: {\n with: {\n product: true\n }\n },\n }\n });\n */\n\n // Filter to only coupons applicable to current user\n const applicableCoupons = allCoupons.filter(coupon => {\n if(!coupon.isUserBased) return true;\n const applicableUsers = coupon.applicableUsers || [];\n return applicableUsers.some(au => au.userId === userId);\n });\n\n return { success: true, data: applicableCoupons };\n }\n catch(e) {\n console.log(e)\n throw new ApiError(\"Unable to get coupons\")\n }\n }),\n\n getProductCoupons: protectedProcedure\n .input(z.object({ productId: z.number().int().positive() }))\n .query(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { productId } = input;\n\n // Get all active, non-expired coupons\n const allCoupons = await getUserActiveCouponsWithRelationsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const allCoupons = await db.query.coupons.findMany({\n where: and(\n eq(coupons.isInvalidated, false),\n or(\n isNull(coupons.validTill),\n gt(coupons.validTill, new Date())\n )\n ),\n with: {\n usages: {\n where: eq(couponUsage.userId, userId)\n },\n applicableUsers: {\n with: {\n user: true\n }\n },\n applicableProducts: {\n with: {\n product: true\n }\n },\n }\n });\n */\n\n // Filter to only coupons applicable to current user and product\n const applicableCoupons = allCoupons.filter(coupon => {\n const applicableUsers = coupon.applicableUsers || [];\n const userApplicable = !coupon.isUserBased || applicableUsers.some(au => au.userId === userId);\n\n const applicableProducts = coupon.applicableProducts || [];\n const productApplicable = applicableProducts.length === 0 || applicableProducts.some(ap => ap.productId === productId);\n\n return userApplicable && productApplicable;\n });\n\n return { success: true, data: applicableCoupons };\n }),\n\n getMyCoupons: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n const allCoupons = await getUserAllCouponsWithRelationsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const allCoupons = await db.query.coupons.findMany({\n with: {\n usages: {\n where: eq(couponUsage.userId, userId)\n },\n applicableUsers: {\n with: {\n user: true\n }\n }\n }\n });\n */\n\n // Filter coupons in JS: not invalidated, applicable to user, and not expired\n const applicableCoupons = allCoupons.filter(coupon => {\n const isNotInvalidated = !coupon.isInvalidated;\n const applicableUsers = coupon.applicableUsers || [];\n const isApplicable = coupon.isApplyForAll || applicableUsers.some(au => au.userId === userId);\n const isNotExpired = !coupon.validTill || new Date(coupon.validTill) > new Date();\n return isNotInvalidated && isApplicable && isNotExpired;\n });\n\n // Categorize coupons\n const personalCoupons: UserCouponDisplay[] = [];\n const generalCoupons: UserCouponDisplay[] = [];\n\n applicableCoupons.forEach(coupon => {\n const usageCount = coupon.usages.length;\n const isExpired = false; // Already filtered out expired coupons\n const isUsedUp = Boolean(coupon.maxLimitForUser && usageCount >= coupon.maxLimitForUser);\n\n const couponDisplay: UserCouponDisplay = {\n id: coupon.id,\n code: coupon.couponCode,\n discountType: coupon.discountPercent ? 'percentage' : 'flat',\n discountValue: parseFloat(coupon.discountPercent || coupon.flatDiscount || '0'),\n maxValue: coupon.maxValue ? parseFloat(coupon.maxValue) : undefined,\n minOrder: coupon.minOrder ? parseFloat(coupon.minOrder) : undefined,\n description: generateCouponDescription(coupon),\n validTill: coupon.validTill ? new Date(coupon.validTill) : undefined,\n usageCount,\n maxLimitForUser: coupon.maxLimitForUser ? parseInt(coupon.maxLimitForUser.toString()) : undefined,\n isExpired,\n isUsedUp,\n };\n\n if ((coupon.applicableUsers || []).some(au => au.userId === userId) && !coupon.isApplyForAll) {\n // Personal coupon\n personalCoupons.push(couponDisplay);\n } else if (coupon.isApplyForAll) {\n // General coupon\n generalCoupons.push(couponDisplay);\n }\n });\n\n return {\n success: true,\n data: {\n personal: personalCoupons,\n general: generalCoupons,\n }\n };\n }),\n\n redeemReservedCoupon: protectedProcedure\n .input(z.object({ secretCode: z.string() }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { secretCode } = input;\n\n const reservedCoupon = await getUserReservedCouponByCodeInDb(secretCode)\n\n /*\n // Old implementation - direct DB queries:\n const reservedCoupon = await db.query.reservedCoupons.findFirst({\n where: and(\n eq(reservedCoupons.secretCode, secretCode.toUpperCase()),\n eq(reservedCoupons.isRedeemed, false)\n ),\n });\n */\n\n if (!reservedCoupon) {\n throw new ApiError(\"Invalid or already redeemed coupon code\", 400);\n }\n\n // Check if already redeemed by this user (in case of multiple attempts)\n if (reservedCoupon.redeemedBy === userId) {\n throw new ApiError(\"You have already redeemed this coupon\", 400);\n }\n\n const couponResult = await redeemUserReservedCouponInDb(userId, reservedCoupon)\n\n /*\n // Old implementation - direct DB queries:\n const couponResult = await db.transaction(async (tx) => {\n const couponInsert = await tx.insert(coupons).values({\n couponCode: reservedCoupon.couponCode,\n isUserBased: true,\n discountPercent: reservedCoupon.discountPercent,\n flatDiscount: reservedCoupon.flatDiscount,\n minOrder: reservedCoupon.minOrder,\n productIds: reservedCoupon.productIds,\n maxValue: reservedCoupon.maxValue,\n isApplyForAll: false,\n validTill: reservedCoupon.validTill,\n maxLimitForUser: reservedCoupon.maxLimitForUser,\n exclusiveApply: reservedCoupon.exclusiveApply,\n createdBy: reservedCoupon.createdBy,\n }).returning();\n\n const coupon = couponInsert[0];\n\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId,\n });\n\n await tx.update(reservedCoupons).set({\n isRedeemed: true,\n redeemedBy: userId,\n redeemedAt: new Date(),\n }).where(eq(reservedCoupons.id, reservedCoupon.id));\n\n return coupon;\n });\n */\n\n return { success: true, coupon: couponResult };\n }),\n});\n", "// import Razorpay from \"razorpay\";\nimport { razorpayId, razorpaySecret } from \"@/src/lib/env-exporter\"\n\nexport class RazorpayPaymentService {\n // private static instance = new Razorpay({\n // key_id: razorpayId,\n // key_secret: razorpaySecret,\n // });\n //\n static async createOrder(orderId: number, amount: string) {\n // Create Razorpay order\n // const razorpayOrder = await this.instance.orders.create({\n // amount: parseFloat(amount) * 100, // Convert to paisa\n // currency: 'INR',\n // receipt: `order_${orderId}`,\n // notes: {\n // customerOrderId: orderId.toString(),\n // },\n // });\n //\n // return razorpayOrder;\n }\n\n static async insertPaymentRecord(orderId: number, razorpayOrder: any, tx?: unknown) {\n // Use transaction if provided, otherwise use db\n // const dbInstance = tx || db;\n //\n // // Insert payment record\n // const [payment] = await dbInstance\n // .insert(payments)\n // .values({\n // status: 'pending',\n // gateway: 'razorpay',\n // orderId,\n // token: orderId.toString(),\n // merchantOrderId: razorpayOrder.id,\n // payload: razorpayOrder,\n // })\n // .returning();\n //\n // return payment;\n }\n\n static async initiateRefund(paymentId: string, amount: number) {\n // const refund = await this.instance.payments.refund(paymentId, {\n // amount,\n // });\n // return refund;\n }\n\n static async fetchRefund(refundId: string) {\n // const refund = await this.instance.refunds.fetch(refundId);\n // return refund;\n }\n}\n", "\nimport { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport crypto from 'crypto'\nimport { razorpayId, razorpaySecret } from \"@/src/lib/env-exporter\"\nimport { RazorpayPaymentService } from \"@/src/lib/payments-utils\"\nimport {\n getUserPaymentOrderById as getUserPaymentOrderByIdInDb,\n getUserPaymentByOrderId as getUserPaymentByOrderIdInDb,\n getUserPaymentByMerchantOrderId as getUserPaymentByMerchantOrderIdInDb,\n updateUserPaymentSuccess as updateUserPaymentSuccessInDb,\n updateUserOrderPaymentStatus as updateUserOrderPaymentStatusInDb,\n markUserPaymentFailed as markUserPaymentFailedInDb,\n} from '@/src/dbService'\nimport type {\n UserPaymentOrderResponse,\n UserPaymentVerifyResponse,\n UserPaymentFailResponse,\n} from '@packages/shared'\n\n\n\n\nexport const paymentRouter = router({\n createRazorpayOrder: protectedProcedure //either create a new payment order or return the existing one\n .input(z.object({\n orderId: z.string(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { orderId } = input;\n\n const order = await getUserPaymentOrderByIdInDb(parseInt(orderId))\n\n /*\n // Old implementation - direct DB queries:\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, parseInt(orderId)),\n });\n */\n\n if (!order) {\n throw new ApiError(\"Order not found\", 404)\n }\n\n if (order.userId !== userId) {\n throw new ApiError(\"Order does not belong to user\", 403)\n }\n\n // Check for existing pending payment\n const existingPayment = await getUserPaymentByOrderIdInDb(parseInt(orderId))\n\n /*\n // Old implementation - direct DB queries:\n const existingPayment = await db.query.payments.findFirst({\n where: eq(payments.orderId, parseInt(orderId)),\n });\n */\n\n if (existingPayment && existingPayment.status === 'pending') {\n return {\n razorpayOrderId: existingPayment.merchantOrderId,\n key: razorpayId,\n };\n }\n\n // Create Razorpay order and insert payment record\n if (order.totalAmount === null) {\n throw new ApiError('Order total is missing', 400)\n }\n const razorpayOrder = await RazorpayPaymentService.createOrder(parseInt(orderId), order.totalAmount);\n await RazorpayPaymentService.insertPaymentRecord(parseInt(orderId), razorpayOrder);\n\n return {\n razorpayOrderId: 0,\n key: razorpayId,\n }\n }),\n\n\n\n verifyPayment: protectedProcedure\n .input(z.object({\n razorpay_payment_id: z.string(),\n razorpay_order_id: z.string(),\n razorpay_signature: z.string(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const { razorpay_payment_id, razorpay_order_id, razorpay_signature } = input;\n\n // Verify signature\n const expectedSignature = crypto\n .createHmac('sha256', razorpaySecret)\n .update(razorpay_order_id + '|' + razorpay_payment_id)\n .digest('hex');\n\n if (expectedSignature !== razorpay_signature) {\n throw new ApiError(\"Invalid payment signature\", 400);\n }\n\n // Get current payment record\n const currentPayment = await getUserPaymentByMerchantOrderIdInDb(razorpay_order_id)\n\n /*\n // Old implementation - direct DB queries:\n const currentPayment = await db.query.payments.findFirst({\n where: eq(payments.merchantOrderId, razorpay_order_id),\n });\n */\n\n if (!currentPayment) {\n throw new ApiError(\"Payment record not found\", 404);\n }\n\n // Update payment status and payload\n const updatedPayload = {\n ...((currentPayment.payload as any) || {}),\n payment_id: razorpay_payment_id,\n signature: razorpay_signature,\n };\n\n const updatedPayment = await updateUserPaymentSuccessInDb(razorpay_order_id, updatedPayload)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedPayment] = await db\n .update(payments)\n .set({\n status: 'success',\n payload: updatedPayload,\n })\n .where(eq(payments.merchantOrderId, razorpay_order_id))\n .returning();\n\n await db\n .update(orderStatus)\n .set({\n paymentStatus: 'success',\n })\n .where(eq(orderStatus.orderId, updatedPayment.orderId));\n */\n\n if (!updatedPayment) {\n throw new ApiError(\"Payment record not found\", 404)\n }\n\n await updateUserOrderPaymentStatusInDb(updatedPayment.orderId, 'success')\n\n return {\n success: true,\n message: \"Payment verified successfully\",\n }\n }),\n\n markPaymentFailed: protectedProcedure\n .input(z.object({\n merchantOrderId: z.string(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { merchantOrderId } = input;\n\n // Find payment by merchantOrderId\n const payment = await getUserPaymentByMerchantOrderIdInDb(merchantOrderId)\n\n /*\n // Old implementation - direct DB queries:\n const payment = await db.query.payments.findFirst({\n where: eq(payments.merchantOrderId, merchantOrderId),\n });\n */\n\n if (!payment) {\n throw new ApiError(\"Payment not found\", 404);\n }\n\n // Check if payment belongs to user's order\n const order = await getUserPaymentOrderByIdInDb(payment.orderId)\n\n /*\n // Old implementation - direct DB queries:\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, payment.orderId),\n });\n */\n\n if (!order || order.userId !== userId) {\n throw new ApiError(\"Payment does not belong to user\", 403);\n }\n\n // Update payment status to failed\n await markUserPaymentFailedInDb(payment.id)\n\n /*\n // Old implementation - direct DB queries:\n await db\n .update(payments)\n .set({ status: 'failed' })\n .where(eq(payments.id, payment.id));\n */\n\n return {\n success: true,\n message: \"Payment marked as failed\",\n }\n }),\n\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index';\nimport { z } from 'zod';\nimport { generateUploadUrl } from '@/src/lib/s3-client';\nimport { ApiError } from '@/src/lib/api-error';\n\nexport const fileUploadRouter = router({\n generateUploadUrls: protectedProcedure\n .input(z.object({\n contextString: z.enum(['review', 'product_info', 'notification', 'complaint', 'profile', 'tags']),\n mimeTypes: z.array(z.string()),\n }))\n .mutation(async ({ input }): Promise<{ uploadUrls: string[] }> => {\n const { contextString, mimeTypes } = input;\n\n const uploadUrls: string[] = [];\n const keys: string[] = [];\n\n for (const mimeType of mimeTypes) {\n // Generate key based on context and mime type\n let folder: string;\n if (contextString === 'review') {\n folder = 'review-images';\n } else if(contextString === 'product_info') {\n folder = 'product-images';\n }\n // else if(contextString === 'review_response') {\n // folder = 'review-response-images'\n // } \n else if(contextString === 'notification') {\n folder = 'notification-images'\n } else if (contextString === 'complaint') {\n folder = 'complaint-images'\n } else if (contextString === 'profile') {\n folder = 'profile-images'\n } else if (contextString === 'tags') {\n folder = 'tags'\n } else {\n folder = '';\n }\n\n const extension = mimeType === 'image/jpeg' ? '.jpg' :\n mimeType === 'image/png' ? '.png' :\n mimeType === 'image/gif' ? '.gif' : '.jpg';\n const key = `${folder}/${Date.now()}${extension}`;\n\n try {\n const uploadUrl = await generateUploadUrl(key, mimeType);\n uploadUrls.push(uploadUrl);\n keys.push(key);\n \n } catch (error) {\n console.error('Error generating upload URL:', error);\n throw new ApiError('Failed to generate upload URL', 500);\n }\n }\n \n return { uploadUrls };\n }),\n});\n\nexport type FileUploadRouter = typeof fileUploadRouter;\n", "import { router, publicProcedure } from '@/src/trpc/trpc-index';\nimport { z } from 'zod';\nimport { getTagsByStoreId } from '@/src/stores/product-tag-store';\nimport { ApiError } from '@/src/lib/api-error';\n\nexport const tagsRouter = router({\n getTagsByStore: publicProcedure\n .input(z.object({\n storeId: z.number(),\n }))\n .query(async ({ input }) => {\n const { storeId } = input;\n\n // Get tags from cache that are related to this store\n const tags = await getTagsByStoreId(storeId);\n \n\n return {\n tags: tags.map(tag => ({\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription,\n imageUrl: tag.imageUrl,\n productIds: tag.productIds,\n })),\n };\n }),\n});\n", "import { router } from '@/src/trpc/trpc-index';\nimport { addressRouter } from '@/src/trpc/apis/user-apis/apis/address';\nimport { authRouter } from '@/src/trpc/apis/user-apis/apis/auth';\nimport { bannerRouter } from '@/src/trpc/apis/user-apis/apis/banners';\nimport { cartRouter } from '@/src/trpc/apis/user-apis/apis/cart';\nimport { complaintRouter } from '@/src/trpc/apis/user-apis/apis/complaint';\nimport { orderRouter } from '@/src/trpc/apis/user-apis/apis/order';\nimport { productRouter } from '@/src/trpc/apis/user-apis/apis/product';\nimport { slotsRouter } from '@/src/trpc/apis/user-apis/apis/slots';\nimport { userRouter as userDataRouter } from '@/src/trpc/apis/user-apis/apis/user';\nimport { userCouponRouter } from '@/src/trpc/apis/user-apis/apis/coupon';\nimport { paymentRouter } from '@/src/trpc/apis/user-apis/apis/payments';\nimport { storesRouter } from '@/src/trpc/apis/user-apis/apis/stores';\nimport { fileUploadRouter } from '@/src/trpc/apis/user-apis/apis/file-upload';\nimport { tagsRouter } from '@/src/trpc/apis/user-apis/apis/tags';\n\nexport const userRouter = router({\n address: addressRouter,\n auth: authRouter,\n banner: bannerRouter,\n cart: cartRouter,\n complaint: complaintRouter,\n order: orderRouter,\n product: productRouter,\n slots: slotsRouter,\n user: userDataRouter,\n coupon: userCouponRouter,\n payment: paymentRouter,\n stores: storesRouter,\n fileUpload: fileUploadRouter,\n tags: tagsRouter,\n});\n\nexport type UserRouter = typeof userRouter;\n", "import { router, publicProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport { adminRouter } from '@/src/trpc/apis/admin-apis/apis/admin-trpc-index'\nimport { userRouter } from '@/src/trpc/apis/user-apis/apis/user-trpc-index'\nimport { commonApiRouter } from '@/src/trpc/apis/common-apis/common-trpc-index'\nimport { scaffoldProducts } from './apis/common-apis/common';\nimport { scaffoldStores, scaffoldStoreWithProducts } from './apis/user-apis/apis/stores';\nimport { scaffoldSlotsWithProducts } from './apis/user-apis/apis/slots';\nimport { scaffoldEssentialConsts } from './apis/common-apis/common-trpc-index';\nimport { scaffoldBanners } from './apis/user-apis/apis/banners';\n\n// Create the main app router\nexport const appRouter = router({\n hello: publicProcedure\n .input(z.object({ name: z.string() }))\n .query(({ input }) => {\n return { greeting: `Hello ${input.name}!` };\n }),\n admin: adminRouter,\n user: userRouter,\n common: commonApiRouter,\n});\n\n\n// Export type definition of API\nexport type AppRouter = typeof appRouter;\n\nexport type AllProductsApiType = Awaited>;\nexport type StoresApiType = Awaited>;\nexport type SlotsApiType = Awaited>;\nexport type EssentialConstsApiType = Awaited>;\nexport type BannersApiType = Awaited>;\nexport type StoreWithProductsApiType = Awaited>;\n", "import { Hono } from 'hono'\nimport { cors } from 'hono/cors'\nimport { logger } from 'hono/logger'\nimport { trpcServer } from '@hono/trpc-server'\nimport { getStaffUserById, isUserSuspended } from '@/src/dbService'\nimport mainRouter from '@/src/main-router'\nimport { appRouter } from '@/src/trpc/router'\nimport { TRPCError } from '@trpc/server'\nimport { jwtVerify } from 'jose'\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter'\n\nexport const createApp = () => {\n const app = new Hono()\n\n // CORS middleware\n app.use(cors({\n origin: 'http://localhost:5174',\n allowMethods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],\n allowHeaders: ['Origin', 'X-Requested-With', 'Content-Type', 'Accept', 'Authorization'],\n credentials: true,\n }))\n\n // Logger middleware\n app.use(logger())\n\n // tRPC middleware\n app.use('/api/trpc/*', trpcServer({\n router: appRouter,\n createContext: async ({ req }) => {\n let user = null\n let staffUser = null\n const authHeader = req.headers.get('authorization')\n\n if (authHeader?.startsWith('Bearer ')) {\n const token = authHeader.substring(7)\n try {\n const { payload } = await jwtVerify(token, getEncodedJwtSecret())\n const decoded = payload as any\n\n // Check if this is a staff token (has staffId)\n if (decoded.staffId) {\n // This is a staff token, verify staff exists\n const staff = await getStaffUserById(decoded.staffId)\n\n if (staff) {\n user = staffUser\n staffUser = {\n id: staff.id,\n name: staff.name,\n }\n }\n } else {\n // This is a regular user token\n user = decoded\n\n // Check if user is suspended\n const suspended = await isUserSuspended(user.userId)\n\n if (suspended) {\n throw new TRPCError({\n code: 'FORBIDDEN',\n message: 'Account suspended',\n })\n }\n }\n } catch (err) {\n // Invalid token, both user and staffUser remain null\n }\n }\n return { req, user, staffUser }\n },\n onError({ error, path, type, ctx }) {\n console.error('\uD83D\uDEA8 tRPC Error :', {\n path,\n type,\n code: error.code,\n message: error.message,\n userId: ctx?.user?.userId,\n stack: error.stack,\n })\n },\n }))\n\n // Mount main router\n app.route('/api', mainRouter)\n\n // Global error handler\n app.onError((err, c) => {\n console.error(err)\n // Handle different error types\n let status = 500\n let message = 'Internal Server Error'\n\n if (err instanceof TRPCError) {\n // Map TRPC error codes to HTTP status codes\n const trpcStatusMap: Record = {\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n TIMEOUT: 408,\n CONFLICT: 409,\n PRECONDITION_FAILED: 412,\n PAYLOAD_TOO_LARGE: 413,\n METHOD_NOT_SUPPORTED: 405,\n UNPROCESSABLE_CONTENT: 422,\n TOO_MANY_REQUESTS: 429,\n INTERNAL_SERVER_ERROR: 500,\n }\n status = trpcStatusMap[err.code] || 500\n message = err.message\n } else if ((err as any).statusCode) {\n status = (err as any).statusCode\n message = err.message\n } else if ((err as any).status) {\n status = (err as any).status\n message = err.message\n } else if (err.message) {\n message = err.message\n }\n\n return c.json({ message }, status as any)\n })\n\n return app\n}\n", "// This loads all middlewares exposed on the middleware object and then starts\n// the invocation chain. The big idea is that we can add these to the middleware\n// export dynamically through wrangler, or we can potentially let users directly\n// add them as a sort of \"plugin\" system.\n\nimport ENTRY, { __INTERNAL_WRANGLER_MIDDLEWARE__ } from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/bundle-GYbPT2/middleware-insertion-facade.js\";\nimport { __facade_invoke__, __facade_register__, Dispatcher } from \"/Users/mohammedshafiuddin/WebDev/freshyo/node_modules/wrangler/templates/middleware/common.ts\";\nimport type { WorkerEntrypointConstructor } from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/bundle-GYbPT2/middleware-insertion-facade.js\";\n\n// Preserve all the exports from the worker\nexport * from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/bundle-GYbPT2/middleware-insertion-facade.js\";\n\nclass __Facade_ScheduledController__ implements ScheduledController {\n\treadonly #noRetry: ScheduledController[\"noRetry\"];\n\n\tconstructor(\n\t\treadonly scheduledTime: number,\n\t\treadonly cron: string,\n\t\tnoRetry: ScheduledController[\"noRetry\"]\n\t) {\n\t\tthis.#noRetry = noRetry;\n\t}\n\n\tnoRetry() {\n\t\tif (!(this instanceof __Facade_ScheduledController__)) {\n\t\t\tthrow new TypeError(\"Illegal invocation\");\n\t\t}\n\t\t// Need to call native method immediately in case uncaught error thrown\n\t\tthis.#noRetry();\n\t}\n}\n\nfunction wrapExportedHandler(worker: ExportedHandler): ExportedHandler {\n\t// If we don't have any middleware defined, just return the handler as is\n\tif (\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__ === undefined ||\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__.length === 0\n\t) {\n\t\treturn worker;\n\t}\n\t// Otherwise, register all middleware once\n\tfor (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {\n\t\t__facade_register__(middleware);\n\t}\n\n\tconst fetchDispatcher: ExportedHandlerFetchHandler = function (\n\t\trequest,\n\t\tenv,\n\t\tctx\n\t) {\n\t\tif (worker.fetch === undefined) {\n\t\t\tthrow new Error(\"Handler does not export a fetch() function.\");\n\t\t}\n\t\treturn worker.fetch(request, env, ctx);\n\t};\n\n\treturn {\n\t\t...worker,\n\t\tfetch(request, env, ctx) {\n\t\t\tconst dispatcher: Dispatcher = function (type, init) {\n\t\t\t\tif (type === \"scheduled\" && worker.scheduled !== undefined) {\n\t\t\t\t\tconst controller = new __Facade_ScheduledController__(\n\t\t\t\t\t\tDate.now(),\n\t\t\t\t\t\tinit.cron ?? \"\",\n\t\t\t\t\t\t() => {}\n\t\t\t\t\t);\n\t\t\t\t\treturn worker.scheduled(controller, env, ctx);\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn __facade_invoke__(request, env, ctx, dispatcher, fetchDispatcher);\n\t\t},\n\t};\n}\n\nfunction wrapWorkerEntrypoint(\n\tklass: WorkerEntrypointConstructor\n): WorkerEntrypointConstructor {\n\t// If we don't have any middleware defined, just return the handler as is\n\tif (\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__ === undefined ||\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__.length === 0\n\t) {\n\t\treturn klass;\n\t}\n\t// Otherwise, register all middleware once\n\tfor (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {\n\t\t__facade_register__(middleware);\n\t}\n\n\t// `extend`ing `klass` here so other RPC methods remain callable\n\treturn class extends klass {\n\t\t#fetchDispatcher: ExportedHandlerFetchHandler> = (\n\t\t\trequest,\n\t\t\tenv,\n\t\t\tctx\n\t\t) => {\n\t\t\tthis.env = env;\n\t\t\tthis.ctx = ctx;\n\t\t\tif (super.fetch === undefined) {\n\t\t\t\tthrow new Error(\"Entrypoint class does not define a fetch() function.\");\n\t\t\t}\n\t\t\treturn super.fetch(request);\n\t\t};\n\n\t\t#dispatcher: Dispatcher = (type, init) => {\n\t\t\tif (type === \"scheduled\" && super.scheduled !== undefined) {\n\t\t\t\tconst controller = new __Facade_ScheduledController__(\n\t\t\t\t\tDate.now(),\n\t\t\t\t\tinit.cron ?? \"\",\n\t\t\t\t\t() => {}\n\t\t\t\t);\n\t\t\t\treturn super.scheduled(controller);\n\t\t\t}\n\t\t};\n\n\t\tfetch(request: Request) {\n\t\t\treturn __facade_invoke__(\n\t\t\t\trequest,\n\t\t\t\tthis.env,\n\t\t\t\tthis.ctx,\n\t\t\t\tthis.#dispatcher,\n\t\t\t\tthis.#fetchDispatcher\n\t\t\t);\n\t\t}\n\t};\n}\n\nlet WRAPPED_ENTRY: ExportedHandler | WorkerEntrypointConstructor | undefined;\nif (typeof ENTRY === \"object\") {\n\tWRAPPED_ENTRY = wrapExportedHandler(ENTRY);\n} else if (typeof ENTRY === \"function\") {\n\tWRAPPED_ENTRY = wrapWorkerEntrypoint(ENTRY);\n}\nexport default WRAPPED_ENTRY;\n", "\t\t\t\timport worker, * as OTHER_EXPORTS from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/worker.ts\";\n\t\t\t\timport * as __MIDDLEWARE_0__ from \"/Users/mohammedshafiuddin/WebDev/freshyo/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts\";\nimport * as __MIDDLEWARE_1__ from \"/Users/mohammedshafiuddin/WebDev/freshyo/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts\";\n\n\t\t\t\texport * from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/worker.ts\";\n\n\t\t\t\texport const __INTERNAL_WRANGLER_MIDDLEWARE__ = [\n\t\t\t\t\t\n\t\t\t\t\t__MIDDLEWARE_0__.default,__MIDDLEWARE_1__.default\n\t\t\t\t]\n\t\t\t\texport default worker;", "import type { ExecutionContext, D1Database } from '@cloudflare/workers-types'\n\nexport default {\n async fetch(\n request: Request,\n env: Record & { DB?: D1Database },\n ctx: ExecutionContext\n ) {\n ;(globalThis as any).ENV = env\n const { createApp } = await import('./src/app')\n const { initDb } = await import('./src/dbService')\n if (env.DB) {\n initDb(env.DB)\n }\n const app = createApp()\n return app.fetch(request, env, ctx)\n },\n}\n", "import type { Middleware } from \"./common\";\n\nconst drainBody: Middleware = async (request, env, _ctx, middlewareCtx) => {\n\ttry {\n\t\treturn await middlewareCtx.next(request, env);\n\t} finally {\n\t\ttry {\n\t\t\tif (request.body !== null && !request.bodyUsed) {\n\t\t\t\tconst reader = request.body.getReader();\n\t\t\t\twhile (!(await reader.read()).done) {}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(\"Failed to drain the unused request body.\", e);\n\t\t}\n\t}\n};\n\nexport default drainBody;\n", "import type { Middleware } from \"./common\";\n\ninterface JsonError {\n\tmessage?: string;\n\tname?: string;\n\tstack?: string;\n\tcause?: JsonError;\n}\n\nfunction reduceError(e: any): JsonError {\n\treturn {\n\t\tname: e?.name,\n\t\tmessage: e?.message ?? String(e),\n\t\tstack: e?.stack,\n\t\tcause: e?.cause === undefined ? undefined : reduceError(e.cause),\n\t};\n}\n\n// See comment in `bundle.ts` for details on why this is needed\nconst jsonError: Middleware = async (request, env, _ctx, middlewareCtx) => {\n\ttry {\n\t\treturn await middlewareCtx.next(request, env);\n\t} catch (e: any) {\n\t\tconst error = reduceError(e);\n\t\treturn Response.json(error, {\n\t\t\tstatus: 500,\n\t\t\theaders: { \"MF-Experimental-Error-Stack\": \"true\" },\n\t\t});\n\t}\n};\n\nexport default jsonError;\n", "export type Awaitable = T | Promise;\n// TODO: allow dispatching more events?\nexport type Dispatcher = (\n\ttype: \"scheduled\",\n\tinit: { cron?: string }\n) => Awaitable;\n\nexport type IncomingRequest = Request<\n\tunknown,\n\tIncomingRequestCfProperties\n>;\n\nexport interface MiddlewareContext {\n\tdispatch: Dispatcher;\n\tnext(request: IncomingRequest, env: any): Awaitable;\n}\n\nexport type Middleware = (\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tmiddlewareCtx: MiddlewareContext\n) => Awaitable;\n\nconst __facade_middleware__: Middleware[] = [];\n\n// The register functions allow for the insertion of one or many middleware,\n// We register internal middleware first in the stack, but have no way of controlling\n// the order that addMiddleware is run in service workers so need an internal function.\nexport function __facade_register__(...args: (Middleware | Middleware[])[]) {\n\t__facade_middleware__.push(...args.flat());\n}\nexport function __facade_registerInternal__(\n\t...args: (Middleware | Middleware[])[]\n) {\n\t__facade_middleware__.unshift(...args.flat());\n}\n\nfunction __facade_invokeChain__(\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tdispatch: Dispatcher,\n\tmiddlewareChain: Middleware[]\n): Awaitable {\n\tconst [head, ...tail] = middlewareChain;\n\tconst middlewareCtx: MiddlewareContext = {\n\t\tdispatch,\n\t\tnext(newRequest, newEnv) {\n\t\t\treturn __facade_invokeChain__(newRequest, newEnv, ctx, dispatch, tail);\n\t\t},\n\t};\n\treturn head(request, env, ctx, middlewareCtx);\n}\n\nexport function __facade_invoke__(\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tdispatch: Dispatcher,\n\tfinalMiddleware: Middleware\n): Awaitable {\n\treturn __facade_invokeChain__(request, env, ctx, dispatch, [\n\t\t...__facade_middleware__,\n\t\tfinalMiddleware,\n\t]);\n}\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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WACA,mBACA,iBACA,UACA,KACA,WACA,QACA,YACA,MACA,aACA,KACA,YACA,UACA,UACA,cACA,UACA,wBACA,iBACAC,SACA,MACA,WACA,eACA,aACA,IACA,KACA,MACA,KACA,MACA,iBACA,qBACA,cACA,SACA,oBACA,gBACA,QACA,eACA,iBACA,sBACA,QACA,OACA,QACA,OACA,kBACA,kBACA,OACA,QACA,SACA,UACA,QACA,YACA,gBACA,YACA,WACAC,SACA,SACA,MACA,UACA,SACA,SACA,SACA,QACA,WACA,QACA,SACA,SACA,QACA,WACA,QACA,YACA,YACA,SACA,cACA,UACA,eACA,WACA,eACA,iBACA,mBACA,oBACA,OACA,kBACA,WACA,4BACA,2BACA,eACA,aACA,cACA,iBACA,UACA,OACA,gBAEI,UA8GC;AAnOP,IAAAC,gBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AACA;AACA,IAAM,gBAAgB,WAAW,SAAS;AACnC,IAAM,mBAAmB,cAAc;AACvC,KAAM,EAAE,MAAM,UAAU,aAAa;AAAA,MAC1C;AAAA,IACF;AACA,IAAM,eAAe,IAAI,QAAa;AAAA,MACpC,KAAK,cAAc;AAAA,MACnB;AAAA,MACA;AAAA,IACF,CAAC;AACM,KAAM;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAAH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAAC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,QACE;AACJ,IAAM,WAAW;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAAD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,M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ACA,MACA,KACA,MACA,MACA,MACA,MACA,MACA,KACA,MACA,KACA,MACA,MACA,KACA,MACA,KACA,KACA,KACA,IACA,KACA,OACA,KACA,MACA,OACA,QACA,QACA,SACA,MACA,MACA,KACA,OACA,QACA,WACA,MACA,KACA,MACA,MACA,KACA,MACA,MACA,KACA,MACA,KACA,MACA,OACA,MACA,KACA,MACA,MACA,OACA,QACA,OACA,QACA,QACA,OACA,OACA,MACA,KACA,MACA,MACA,QACA,QACA,SACA,OACA,KACA,MACA,OACA,MACA,MACA,OACA,KACA,QACA,MACA,KACA,OACA,QACA,OACA,QACA,QACA,QACA,MACA,MACA,OACA,OACA,UACA,UACA,YACA,MACA,OACA,QACA,OACA,MACA,MACA,KACA,MACA,MACA,MACA,OACA,OACA,KACA,MACA,MACA,MACA,OACA,KACA,IACA,MACA,KACA,OACA,QACA,MACA,OACA,MACA,OACA,OACA,QACA,QACA,SACA,MACA,OACA,OACA,QACA,SACA,QACA,QACA,SACA,OACA,QACA,MACA,OACA,MACA,OACA,OACA,MACA,OACA,MACA,OACA,KACA,MACA,OACA,OACA,OACA,KACA,MACA,MACA,OACA,MACA,KACA,KACA,MACA,OACA,MACA,OACA,MACA,OACA,OACA,MACA,OACA,QACA,OACA,QACA,KACA,MACA,OACA,OACA,KACA,KACA,MACA,OACA,MACA,OACA,MACA,IACA,KACA,MACA,MACA,KACA,MACA,KACA,MACA,KACA,KACA,MACA,KACA,OACA,MACA,KACA,OACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,MACA,MACA,KACA,MACA,KACA,MACA,KACA,MACA,IACA,KACA,MACA,KACA,KACA,MACA,MACA,KACA,KACA,KACA,IACA,MACA,OACA,QACA,SACA,QACA,SACA,QACA,OACA,QACA,OACA,QACA,OACA,MACA,OACA,OACA,MACA,OACA,OACA,OACA,QACA,QACA,QACA,SACA,SACA,MACA,OACA,QACA,QACA,OACA,QACA,OACA,QACA,OACA,OACA,QACA,SACA,QACA,SACA,UACA,QACA,QACA,SACA,SACA,UACA,OACA,QACA,OACA,QACA,QACA,MACA,OACA,OACA,OACA,QACA,QACA,MACA,OACA,OACA,QACA,QACA,OACA,MACA,OACA,OACA,MACA,OACA,OACA,MACA,OACA,OACA,MACA,MACA,KACA,MACA,OACA,QACA,OACA,OACA,QACA,SACA,OACA,OACA,QACA,QACA,OACA,QACA,QACA,MACA,MACA,OACA,OACA,OACA,MACA,OACA,QACA,OACA,QACA,OACA,OACA,QACA,QACA,KACA,QACA,KACA,QACA,KACA,MACA,KACA,MACA,MACA,QACA,KACA,KACA,MACA,MACA,MACA,IACA,KACA,MACA,KACA,MACA,OACA,KACA,MACA,KACA,KACA,KACA,OACA,QACA,MACA,OACA,OACA,OACA,MACA,MACA,OACA,MACA,MACA,MACA,KACA,MACA,MACA,KACA,OACA,KACA,OACA,MACA,KACA,OACA,MACA,OACA,OACA,OACA,OACA,MACA,MACA,OACA,MACA,KACA,MACA,OACA,QACA,QACA,MACA,OACA,OACA,IACA,KACA,KACA,MACA,KACA,OACA,QACA,QACA,UACA,MACA,IACA,QACA,SACA,KACA,OACA,QACA,QACA,SACA,OACA,QACA,QACA,QACA,SACA,SACA,OACA,QACA,QACA,MACA,MACA,OACA,KACA,MACA,MACA,OACA,OACA,KACA,MACA,MACA,MACA,OACA,OACA,KACA,KACA,OACA,KACA,OACA,MACA,MACA,OACA,OACA,QACA,MACA,KACA,MACA,MACA,MACA,OACA,QACA,OACA,QACA,OACA,KACA,MACA,MACA,OACA,KACA,OACA,MACA,MACA,MACA,IACA,MACA,MACA,KACA,KACA,MACA,MACA,MACA,KACA,MACA,MACA,KACA,KACA,MACA,OACA,KACA,KACA,MACA,KACA,MACA,OACA,OACA,KACA,MACA,MACA,KACA,KACA,MACA,KACA,KACA,IACA,KACA,MACA,MACA,KACA,SACA,KACA,MACA,KACA,MACA,OACA,MACA,MACA,MACA,OACA,MACA,OACA,MACA,OACA,OACA,IACA,KACA,SACA,KACA,MACA,OACA,KACA,KACA,KACA,MACA,KACA,MACA,MACA,QACA,OACA,QACA,MACA,MACA,QACA,OACA,MACA,SACA,KACA,MACA,KACA,MACA,KACA,OACA,OACA,MACA,MACA,KACA,MACA,KACA,MACA,IACA,OACA,MACA,OACA,QACA,SACA,QACA,OACA,QACA,OACA,MACA,OACA,MACA,OACA,OACA,QACA,QACA,SACA,MACA,OACA,QACA,QACA,OACA,OACA,QACA,OACA,QACA,OACA,QACA,MACA,OACA,MACA,OACA,QACA,OACA,MACA,OACA,MACA,OACA,MACA,OACA,KACA,MACA,KACA,KACA,KACA,KACA,MACA,KACA,MACA,OACA,OACA,OACA,QACA,QACA,OACA,QACA,QACA,MACA,MACA,OACA,OACA,OACA,MACA,OACA,OACA,KACA,OACA,QACA,KACA,KACA,MACA,OACA,MACA,OACA,KACA,KACA,KACA,MACA,MACA,IACA,KACA,KACA,MACA,MACA,OACA,MACA,KACA,KACA,IACA,OACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,MACA,MACA,OACA,QACA,OACA,MACA,KACA,KACA,MACA,OACA,MACA,MACA,OACA,MACA,KACA,MACA,MACA,MACA,KACA,OACA,MACA,MACA,OACA,OACA,OACA,MACA,KACA,MACA,OACA,KACA,MACA,MACA,MACA,KACA,KACA,MACA,MACA,MACA,KACA,KACA,IACA,KACA,MACA,MACA,KACA,MACA,KACA,MACA,QACA,MACA,MACA,MACA,MACA,KACA,MACA,OACA,OACA,OACA,KACA,OACA,MACA,MACA,KACA,KACA,MACA,QACA,OACA,OACA,KACA,MACA,KACA,KACA,MACA,MACA,OACA,QACA,OACA,QACA,QACA,UACA,SACA,UACA,WACA,WACA,OACA,QACA,OACA,KACA,MACA,OACA,KACA,KACA,KACA,KACA,MACA,KACA,IACA,KACA,MACA,KACA,MACA,MACA,KACA,MACA,MACA,OACA,KACA,QACA,KACA,MACA,KACA,MACA,MACA,KACA,MACA,OACA,KACA,MACA,KACA,MACA,KACA,MACA,KACA,MACA,OACA,MACA,KACA,MACA,KACA,MACA,KACA,IACA,SACA,UACA,SACA,UACA,KACA,MACA,KACA,MACA,OACA,QACA,KACA,MACA,OACA,OACA,MACA,MACA,MACA,KACA,IACA,KACA,KACA,MACA,KACA,MACA,KACA,OACA,QACA,MACA,MACA,IACA,KACA,KACA,IACA,KACA,IACA,IACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,MACA,KACA,KACA,IACA,KACA,KACA,IACA,KACA,MACA,KACA,KACA,KACA,IACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,IACA,KACA,KACA,KACA,MACA,KACA,MACA,IACA,KACA,KACA,KACA,MACA,MACA,OACA,QACA,QACA,OACA,OACA,QACA,QACA,QACA,OACA,SACA,SACA,OACA,OACA,OACA,QACA,SACA,OACA,UACA,OACA,QACA,SACA,SACA,UACA,UACA,UACA,QACA,QACA,YACA,YACA,aACA,SACA,OACA,QACA,OACA,MACA,QACA,QACA,QACA,SACA,SACA,SACA,SACA,SACA,SACA,QACA,SACA,SACA,SACA,WACA,YACA,aACA,WACA,YACA,WACA,UACA,WACA,YACA,aACA,YACA,cACA,UACA,WACA,WACA,WACA,YACA,gBACA,eACA,cACA,eACA,WACA,WACA,OACA,QACA,OACA,QACA,OACA,QACA,SACA,UACA,QACA,MACA,OACA,OACA,OACA,QACA,OACA,QACA,OACA,SACA,QACA,UACA,OACA,QACA,OACA,QACA,MACA,OACA,QACA,OACA,OACA,OACA,QACA,SACA,UACA,UACA,UACA,OACA,OACA,QACA,QACA,SACA,QACA,YACA,WACA,SACA,UACA,UACA,WACA,MACA,OACA,OACA,UACA,OACA,QACA,QACA,KACA,IAIA,aACK,qBAEL,aACK,eAMA,sBAMA,0BAMA,yBAMA,+BAMA,qBAMA,iBAMA,qBAMA,eAMA,YAMA,eAMA,WAMA,iCAMA,6BAMA,eAME,qBAIT,0BACA,yBACA,wBACA,gBACA,yBACA,aACA,eACO,aAKA,iCAKA,6BAKA,8BAKA,0BAKA,sBAKA,2BAKA,uBAKA,yBAKA,6BAKA,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AAA;AAAA,IAAAC;AAAA,IAAAC;AACA;AACA,IAAMF,cAAa,8BAAO,QAAQ,UAAU;AACxC,UAAI;AACJ,UAAI;AACA,YAAI,SAAS,MAAM,OAAO,KAAK,IAAI,kBAAkB,KAAK,CAAC;AAC3D,iBAAS;AAAA,MACb,SACO,WAAP;AACI,iBAAS;AACT,YAAI,UAAU,QAAQ,UAAU,QAAQ,YAAY;AAChD,iBAAO,EAAE,OAAO,YAAY,SAAS,OAAO;AAAA,QAChD;AAAA,MACJ;AACA,aAAO,EAAE,OAAO,YAAY,OAAO,OAAO;AAAA,IAC9C,GAbmB;AAkBZ,IAAM,2BAA2B,8BAAO,QAAQ,UAAU;AAC7D,YAAM,kBAAkB,EAAE,UAAU,GAAG,UAAU,IAAI;AACrD,YAAM,SAAS,MAAM,aAAa,EAAE,GAAG,iBAAiB,GAAG,OAAO,GAAG,OAAOA,WAAU;AACtF,aAAO,gBAAgB,MAAM;AAAA,IACjC,GAJwC;AAAA;AAAA;;;ACpBxC,IAqHM,UA6GA,YAMA,SAMO;AA9Ob;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAG;AAAA,IAAAC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAM,WAAW;AAAA,MACb;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AACA,IAAM,aAAa;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AACA,IAAM,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AACO,IAAM,KAAN,cAAiB,SAAS;AAAA,IACjC;AADa;AAEb,2BAAuB,UAAU,IAAI,EAAE,YAAY,QAAQ,CAAC;AAAA;AAAA;;;AChP5D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;;;AC1GA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AAAA;;;ACAA,IAAAC,mBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;;;ACJA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AACA;AACA;AACA;AAAA;AAAA;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AAAA;;;ACAA;AAAA;A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8B;AACpC,IAAM,gCAAgC;AACtC,IAAM,0BAA0B;AAChC,IAAM,wBAAwB;AAC9B,IAAM,oBAAoB;AAC1B,IAAM,yBAAyB;AAC/B,IAAM,eAAe;AACrB,IAAM,iBAAiB;AACvB,IAAM,iBAAiB;AACvB,IAAM,iBAAiB;AAAA;AAAA;;;ACvD9B,IAKa;AALb,IAAAC,eAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAEA,IAAAC;AACA;AACA,IAAAC;AACO,IAAM,YAAY;AAAA,MACxB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA;AAAA;;;AC9DA,IAoDM,eAEJ,aACA,eACA,oBACA,MACA,MACA,WACA,iBACA,YACA,gBACA,qBACA,0BACA,YACA,YACA,kBACA,iBACA,iBACA,aACA,iBACA,qBACA,iBACA,eACA,mBACA,YACA,WACA,kBACA,SACA,WACA,MACA,UACA,QACA,YACA,aACA,YACA,gBACA,WACAC,aACA,QACA,YACA,gBACA,WACA,SACAC,SACA,iBAEW,iBAGAC,YAOP,MACC;AA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D;AAAA,EACD;AACD;AAnDS;AAqDT,IAAI;AACJ,IAAI,OAAO,wCAAU,UAAU;AAC9B,kBAAgB,oBAAoB,mCAAK;AAC1C,WAAW,OAAO,wCAAU,YAAY;AACvC,kBAAgB,qBAAqB,mCAAK;AAC3C;AACA,IAAO,kCAAQ;", + "names": ["init_performance", "init_performance", "PerformanceMark", "e", "init_performance", "init_performance", "init_performance", "init_performance", "clear", "count", "countReset", "createTask", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "profile", "profileEnd", "table", "time", "timeEnd", "timeLog", "timeStamp", "trace", "warn", "init_console", "init_performance", "init_console", "init_performance", "hrtime", "init_performance", "Socket", "init_performance", "dir", "x", "y", "env", "count", "init_performance", "init_performance", "cwd", "hrtime", "assert", "init_process", "init_performance", "init_process", "init_performance", "init_performance", "middleware", "context", "i", "init_performance", "init_performance", "init_performance", "all", "init_performance", "routePath", "match", "i", "j", "decoder", "url", "v", "a", "init_performance", "raw", "text", "init_performance", "context", "c", "init_performance", "k", "v", "v2", "text", "object", "init_performance", "init_constants", "init_performance", "init_performance", "init_constants", "c", "handlers", "p", "m", "clone", "r", "url", "env", "context", "init_performance", "a", "b", "Node", "init_performance", "context", "k", "c", "init_performance", "Node", "i", "m", "j", "i", "j", "handlers", "h", "e", "map", "k", "middleware", "a", "b", "init_router", "init_performance", "p", "m", "r", "init_performance", "init_router", "init_performance", "init_router", "init_router", "init_performance", "i", "router", "i2", "e", "init_performance", "init_router", "Node", "init_node", "init_performance", "_Node", "m", "i", "p", "v", "a", "i2", "j", "k", "b", "init_router", "init_performance", "init_node", "Node", "i", "init_performance", "init_router", "Hono", "init_performance", "init_performance", "init_performance", "defaults", "origin", "c", "set", "process", "navigator", "init_performance", "log", "time", "init_performance", "v", "logger2", "c", "url", "obj1: TType", "newObj: TType", "value: unknown", "fn: unknown", "it: T", "signals: AbortSignal[]", "ac", "TRPC_ERROR_CODES_BY_NUMBER: InvertKeyValue<\n typeof TRPC_ERROR_CODES_BY_KEY\n>", "retryableRpcCodes: TRPC_ERROR_CODE_NUMBER[]", "fn: () => TValue", "callback: ProxyCallback", "path: readonly string[]", "memo: Record", "memo", "code: keyof typeof TRPC_ERROR_CODES_BY_KEY", "json: TRPCResponse | TRPCResponse[]", "json", "error: TRPCError", "error", "opts: {\n config: RootConfig;\n error: TRPCError;\n type: ProcedureType | 'unknown';\n path: string | undefined;\n input: unknown;\n ctx: TRoot['ctx'] | undefined;\n}", "config", "shape: DefaultErrorShape", "JSONRPC2_TO_HTTP_CODE: Record<\n keyof typeof TRPC_ERROR_CODES_BY_KEY,\n number\n>", "obj: object", "_typeof", "o", "toPrimitive", "t", "r", "e", "i", "toPropertyKey", "cause: unknown", "transformer: DataTransformerOptions", "config: RootConfig", "item: TResponseItem", "config", "itemOrItems: TResponse", "once", "fn: () => T", "result: T | typeof uncalled", "input: unknown", "value: unknown", "config: RootConfig", "input: TInput", "v", "procedures: Record", "lazy: Record>", "opts: {\n ref: Lazy;\n path: readonly string[];\n key: string;\n aggregate: RouterRecord;\n }", "router", "lazy", "from: CreateRouterOptions", "path: readonly string[]", "aggregate: RouterRecord", "record", "_def: AnyRouter['_def']", "router: BuiltRouter", "procedureOrRouter: ValueOf", "router: Pick, '_def'>", "path: string", "key", "router: Pick, '_def'>", "ctx: Context | undefined", "r", "defaultFormatter: ErrorFormatter", "defaultTransformer: CombinedDataTransformer", "opts: {\n message?: string;\n code: TRPC_ERROR_CODE_KEY;\n cause?: unknown;\n }", "message", "x: unknown", "x", "observable: Observable", "signal: AbortSignal", "unsub: Unsubscribable | null", "error", "observable", "iterator: AsyncIterator", "iterator", "parsed: unknown", "_key", "str: string", "headers: Headers", "t", "fn: () => Promise", "promise: Promise | null", "value: TReturn | typeof sym", "_promise", "promise", "req: Request", "handler", "opts: GetRequestInfoOptions", "error: unknown", "error", "message", "isObject", "o: unknown", "o", "promise: TPromise", "resolve!: PromiseWithResolvers[\"resolve\"]", "reject!: PromiseWithResolvers[\"reject\"]", "arr: readonly T[]", "member: T", "member", "index: number", "member: unknown", "thing: T", "dispose: () => void", "dispose: () => Promise", "ms: number", "timer: ReturnType | null", "iterable: AsyncIterable", "iterator", "_x", "_x2", "iterable: AsyncIterable", "opts: {\n count: number;\n gracePeriodMs: number;\n }", "result: null | IteratorResult | typeof disposablePromiseTimerResult", "count", "resolve: (value: TValue) => void", "reject: (error: unknown) => void", "iterable: AsyncIterable", "onResult: (result: ManagedIteratorResult) => void", "state: 'idle' | 'pending' | 'done'", "iterables: AsyncIterable[]", "buffer: Array<\n [\n iterator: ManagedIterator,\n result: Exclude<\n ManagedIteratorResult,\n { status: 'return' }\n >,\n ]\n >", "iterable: AsyncIterable", "errors: unknown[]", "iterable: AsyncIterable", "iterable: AsyncIterable", "pingIntervalMs: number", "result:\n | null\n | IteratorResult\n | typeof disposablePromiseTimerResult", "value: unknown", "opts: JSONLProducerOptions", "callback: (idx: ChunkIndex) => AsyncIterable", "iterable", "promise: Promise", "path: (string | number)[]", "encode", "iterable: AsyncIterable", "encodeAsync", "newObj: Record", "asyncValues: ChunkDefinition[]", "newHead: Head", "iterable: AsyncIterable", "opts: SSEStreamProducerOptions", "ping: Required", "client: SSEClientOptions", "iterable: AsyncIterable", "value: null | TIteratorValue", "chunk: null | SSEvent", "controller: TransformStreamDefaultController", "err: TRPCError", "signal: AbortSignal", "initOpts: {\n ctx: inferRouterContext | undefined;\n info: TRPCRequestInfo | undefined;\n responseMeta?: HTTPBaseHandlerOptions['responseMeta'];\n untransformedJSON:\n | TRPCResponse>\n | TRPCResponse>[]\n | null;\n errors: TRPCError[];\n headers: Headers;\n}", "info", "meta", "v", "cause: unknown", "errorOpts: {\n opts: Pick<\n ResolveHTTPRequestOptions,\n 'onError' | 'req' | 'router'\n >;\n ctx: inferRouterContext | undefined;\n type: ProcedureType | 'unknown';\n path?: string;\n input?: unknown;\n }", "router", "v: unknown", "opts: ResolveHTTPRequestOptions", "config", "url", "infoTuple: ResultTuple", "ctxManager: ContextManager", "result: ResultTuple<$Context> | undefined", "data: unknown", "res: TRPCResponse>", "headResponse", "import_objectSpread2", "responseBody: ReadableStream", "results: RPCResult[]", "jsonContentTypeHandler: ContentTypeHandler", "formDataContentTypeHandler: ContentTypeHandler", "octetStreamContentTypeHandler: ContentTypeHandler", "TYPE_ACCEPTED_METHOD_MAP: Record", "TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE: Record<\n ProcedureType,\n HTTPMethods[]\n>", "inputs: unknown", "result: InputRecord", "acc: InputRecord", "import_objectSpread2$1", "type: ProcedureType | 'unknown'", "info: TRPCRequestInfo", "Unpromise", "arg: Promise | PromiseLike | PromiseExecutor", "promise: Promise", "unsubscribe: () => void", "onfulfilled?:\n | ((value: T) => TResult1 | PromiseLike)\n | null", "onrejected?:\n | ((reason: any) => TResult2 | PromiseLike)\n | null", "onrejected?:\n | ((reason: any) => TResult | PromiseLike)\n | null", "onfinally?: (() => void) | null", "promise: PromiseLike", "cached", "value: T | PromiseLike", "values: Iterable>", "promises: readonly TPromise[]", "r", "e", "n", "d", "s", "OverloadYield", "_awaitAsyncGenerator", "_wrapAsyncGenerator", "u", "i", "settle", "_asyncIterator", "AsyncFromSyncIterator", "_asyncGeneratorDelegate", "opts: FetchHandlerRequestOptions", "createContext: ResolveHTTPRequestOptionsContextFn", "import_objectSpread2", "url", "o", "meta", "v", "path: string", "init_performance", "c", "c", "t", "p", "init_performance", "_a", "init_logger", "init_performance", "message", "config", "p", "init_performance", "table", "_a", "init_performance", "_a", "init_performance", "table", "config", "_a", "init_performance", "_a", "init_performance", "config", "table", "init_performance", "table", "_a", "init_performance", "i", "value", "startFrom", "array", "init_performance", "_a", "init_performance", "config", "as", "table", "ref", "actions", "range", "v", "a", "_a", "init_performance", "table", "config", "_a", "init_performance", "sql", "version", "init_performance", "init_performance", "version", "otel", "rawTracer", "e", "init_performance", "param", "p", "_a", "init_performance", "config", "i", "decoder", "encoder", "sql", "raw", "placeholder", "name", "SQL", "result", "decoder", "table", "a", "b", "init_utils", "init_performance", "_a", "init_table", "init_performance", "_a", "init_performance", "init_table", "table", "c", "v", "max", "init_performance", "init_performance", "init_performance", "relations", "primaryKey", "table", "config", "f", "decoder", "_a", "init_performance", "table", "c", "_a", "init_performance", "_a", "init_performance", "config", "_a", "init_performance", "_a", "ForeignKeyBuilder", "ForeignKey", "init_foreign_keys", "init_performance", "config", "table", "uniqueKeyName", "table", "_a", "UniqueConstraintBuilder", "UniqueOnConstraintBuilder", "UniqueConstraint", "init_unique_constraint", "init_performance", "_a", "init_common", "init_performance", "init_foreign_keys", "init_unique_constraint", "as", "config", "table", "ref", "actions", "ForeignKeyBuilder", "uniqueKeyName", "a", "b", "config", "_a", "init_performance", "init_utils", "init_common", "table", "a", "b", "config", "_a", "init_performance", "init_utils", "init_common", "table", "a", "b", "config", "_a", "init_performance", "init_utils", "init_common", "table", "a", "b", "config", "_a", "init_performance", "init_utils", "init_common", "table", "_a", "init_performance", "init_common", "table", "a", "b", "config", "_a", "init_performance", "init_utils", "init_common", "table", "init_performance", "name", "InlineForeignKeys", "table", "_a", "init_table", "init_performance", "_a", "init_performance", "table", "_a", "init_performance", "table", "config", "config", "PrimaryKeyBuilder", "_a", "PrimaryKey", "init_primary_keys", "init_performance", "init_table", "table", "table", "init_utils", "init_performance", "init_table", "_a", "init_performance", "init_table", "init_utils", "table", "i", "_a", "init_performance", "table", "_a", "init_performance", "message", "count", "init_performance", "init_performance", "init_performance", "init_sql", "init_performance", "init_performance", "init_common", "_a", "init_performance", "_a", "init_performance", "init_sql", "init_table", "init_utils", "config", "i", "w", "table", "set", "c", "f", "select", "sql", "joinOn", "field", "e", "_a", "init_performance", "_a", "init_select", "init_performance", "init_utils", "config", "table", "on", "_a", "init_query_builder", "init_performance", "init_select", "as", "self", "_a", "init_performance", "init_table", "init_utils", "init_query_builder", "table", "config", "init_performance", "_a", "init_performance", "init_table", "init_utils", "table", "set", "on", "init_performance", "init_query_builder", "init_select", "_a", "init_performance", "_a", "init_performance", "table", "config", "_a", "init_performance", "_a", "init_performance", "self", "as", "table", "config", "sql", "encoder", "b", "_a", "init_performance", "_key", "init_performance", "init_alias", "init_performance", "_a", "init_performance", "cache", "e", "sql", "init_subquery", "init_performance", "_a", "init_performance", "init_utils", "init_query_builder", "init_table", "config", "init_performance", "init_alias", "init_foreign_keys", "init_primary_keys", "init_subquery", "init_table", "init_unique_constraint", "init_utils", "k", "_a", "init_session", "init_performance", "init_logger", "init_utils", "builtQuery", "i", "config", "logger", "cache", "config", "logger", "db", "_a", "init_performance", "init_logger", "init_session", "init_performance", "init_session", "init_performance", "init_performance", "init_logger", "init_sql", "init_utils", "init_performance", "t", "init_performance", "init_performance", "c", "init_performance", "constants", "c", "init_performance", "minOrderValue", "init_performance", "u", "init_performance", "record", "tag", "group", "init_performance", "group", "getStringArray", "init_performance", "init_performance", "init_performance", "count", "init_performance", "mapVendorSnippet", "mapDeliverySlot", "init_performance", "init_performance", "init_performance", "getStringArray", "getProductById", "init_performance", "init_complaint", "init_performance", "getStringArray", "init_performance", "getStringArray", "getProductReviews", "getProductById", "init_product", "init_performance", "init_slots", "init_performance", "init_performance", "email", "getUserByMobile", "error", "init_performance", "init_coupon", "init_performance", "getUserById", "init_user", "init_performance", "getProductById", "updateOrderNotes", "init_order", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "staffRoles", "staffPermissions", "staffRolePermissions", "permission", "keyValStore", "init_performance", "init_performance", "init_complaint", "init_product", "init_slots", "init_coupon", "init_user", "init_order", "init_performance", "getProductById", "getUserByMobile", "getProductReviews", "getUserById", "updateOrderNotes", "init_performance", "i", "string", "init_performance", "i", "init_performance", "encode", "init_performance", "hash", "init_performance", "init_performance", "init_errors", "init_performance", "message", "init_performance", "init_performance", "isObject", "init_performance", "hash", "init_performance", "init_errors", "init_performance", "init_errors", "init_performance", "cached", "hash", "init_performance", "init_errors", "s", "init_performance", "init_performance", "isObject", "k", "init_performance", "init_errors", "init_verify", "init_performance", "init_errors", "isObject", "max", "init_performance", "init_errors", "date", "jwt", "init_verify", "init_performance", "init_errors", "init_performance", "init_errors", "encode", "k", "init_sign", "init_performance", "init_sign", "init_performance", "init_errors", "init_performance", "init_verify", "init_sign", "init_performance", "message", "init_performance", "env", "init_performance", "error", "c", "init_performance", "Hono", "init_performance", "init_performance", "init_performance", "init_auth", "init_performance", "HttpAuthLocation", "init_performance", "HttpApiKeyAuthLocation", "init_performance", "init_performance", "init_performance", "init_performance", "init_auth", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "EndpointURLScheme", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_checksum", "init_performance", "AlgorithmId", "init_performance", "init_performance", "init_extensions", "init_performance", "init_checksum", "init_performance", "init_performance", "FieldPosition", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_identity", "init_performance", "init_logger", "init_performance", "init_performance", "init_performance", "init_performance", "IniSectionType", "init_performance", "init_performance", "init_schema", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "RequestHandlerProtocol", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_auth", "init_extensions", "init_identity", "init_logger", "init_schema", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "e", "init_dist_es", "init_performance", "init_constants", "init_performance", "ChecksumAlgorithm", "ChecksumLocation", "init_performance", "init_performance", "init_performance", "feature", "init_performance", "context", "feature", "init_performance", "init_performance", "init_client", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_performance", "init_utils", "init_performance", "init_performance", "init_dist_es", "init_utils", "context", "config", "identity", "error", "init_performance", "init_dist_es", "init_utils", "identity", "config", "init_performance", "init_performance", "init_performance", "init_getSmithyContext", "init_performance", "context", "init_performance", "init_dist_es", "init_performance", "init_getSmithyContext", "init_performance", "map", "init_performance", "init_dist_es", "config", "context", "init_performance", "config", "init_performance", "init_performance", "init_performance", "init_dist_es", "error", "config", "context", "identity", "init_performance", "config", "init_performance", "normalizeProvider", "init_normalizeProvider", "init_performance", "config", "init_performance", "init_performance", "i", "c", "init_performance", "i", "j", "k", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "i", "j", "k", "init_performance", "init_dist_es", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_performance", "init_dist_es", "encoder", "transform", "error", "init_performance", "i", "logger", "size", "s", "init_performance", "init_performance", "init_performance", "init_performance", "c", "init_performance", "init_dist_es", "init_performance", "i", "init_dist_es", "init_performance", "url", "init_performance", "init_performance", "abortError", "init_performance", "init_dist_es", "requestTimeout", "url", "body", "config", "blob", "base64", "init_performance", "init_dist_es", "init_dist_es", "init_performance", "i", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "blob", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "context", "c", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "config", "context", "n", "t", "i", "o", "error", "e", "k", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "url", "hostname", "init_performance", "init_dist_es", "init_endpoints", "init_performance", "init_performance", "init_endpoints", "init_dist_es", "config", "context", "n", "t", "i", "o", "config", "init_performance", "Schema", "init_performance", "init_performance", "Schema", "init_performance", "Schema", "init_performance", "Schema", "init_performance", "Schema", "init_performance", "i", "init_performance", "init_performance", "i", "ns", "k", "v", "z", "init_performance", "Schema", "init_sentinels", "init_performance", "init_performance", "k", "v", "r", "registry", "init_schema", "init_performance", "init_sentinels", "init_performance", "logger", "init_performance", "message", "s", "date", "year", "init_performance", "match", "day", "time", "init_performance", "init_performance", "i", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_performance", "LazyJsonString", "object", "init_performance", "v", "max", "time", "year", "RFC3339_WITH_OFFSET", "IMF_FIXDATE", "RFC_850_DATE", "ASC_TIME", "init_performance", "date", "sign", "day", "hour", "minute", "i", "init_performance", "init_performance", "z", "i", "v", "init_performance", "string", "object", "init_serde", "init_performance", "init_performance", "init_performance", "init_dist_es", "member", "init_performance", "init_performance", "init_schema", "init_dist_es", "k", "v", "member", "EventStreamSerde", "context", "init_performance", "init_schema", "init_serde", "init_dist_es", "context", "isStreaming", "member", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_schema", "init_serde", "init_dist_es", "format", "init_performance", "init_schema", "init_dist_es", "toString", "init_performance", "init_schema", "init_serde", "init_dist_es", "format", "init_performance", "init_schema", "init_performance", "init_requestBuilder", "init_performance", "setFeature", "context", "feature", "init_setFeature", "init_performance", "init_performance", "config", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "isIdentityExpired", "identity", "init_performance", "init_dist_es", "init_performance", "init_normalizeProvider", "init_requestBuilder", "init_setFeature", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "config", "normalizeProvider", "init_constants", "init_performance", "init_performance", "init_dist_es", "init_constants", "hash", "init_performance", "init_constants", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_constants", "i", "init_performance", "init_dist_es", "HEADER_VALUE_TYPE", "number", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_constants", "init_performance", "init_dist_es", "init_constants", "value", "serialized", "init_performance", "time", "init_performance", "init_dist_es", "hash", "init_performance", "init_dist_es", "init_constants", "hash", "promise", "init_performance", "init_dist_es", "init_performance", "init_constants", "config", "normalizeProvider", "init_performance", "init_client", "init_dist_es", "init_performance", "init_httpAuthSchemes", "init_performance", "init_performance", "i", "init_dist_es", "init_performance", "init_performance", "a", "b", "debug", "middleware", "entry", "context", "init_dist_es", "init_performance", "init_client", "init_performance", "init_dist_es", "config", "cb", "handlers", "init_collect_stream_body", "init_performance", "object", "member", "init_performance", "init_schema", "init_command", "init_performance", "init_dist_es", "logger", "cb", "operation", "init_constants", "init_performance", "init_performance", "commands", "Client", "cb", "command", "paginators", "waiters", "config", "init_performance", "v", "k", "message", "init_performance", "init_performance", "init_emitWarningIfUnsupportedVersion", "init_performance", "init_extended_encode_uri_component", "init_performance", "init_checksum", "init_performance", "init_retry", "init_performance", "init_defaultExtensionConfiguration", "init_performance", "init_checksum", "init_retry", "config", "init_extensions", "init_performance", "init_defaultExtensionConfiguration", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_resolve_path", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_client", "init_collect_stream_body", "init_command", "init_constants", "init_emitWarningIfUnsupportedVersion", "init_extended_encode_uri_component", "init_extensions", "init_resolve_path", "init_serde", "init_performance", "init_schema", "init_dist_es", "m", "registry", "e", "error", "Error", "k", "v", "init_performance", "init_performance", "init_performance", "init_performance", "k", "v", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "hasChildren", "c", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_schema", "buffer", "v", "value", "union", "e", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_schema", "init_serde", "k", "v", "array", "container", "map", "format", "init_performance", "init_performance", "init_schema", "context", "message", "member", "init_protocols", "init_performance", "init_dist_es", "init_performance", "init_client", "init_httpAuthSchemes", "init_protocols", "init_performance", "init_constants", "init_performance", "init_constants", "hasHeader", "init_performance", "init_performance", "init_performance", "init_dist_es", "P", "e", "t", "f", "y", "g", "n", "v", "o", "s", "m", "i", "init_performance", "fromUtf8", "init_fromUtf8_browser", "init_performance", "init_toUint8Array", "init_performance", "init_fromUtf8_browser", "init_toUtf8_browser", "init_performance", "init_dist_es", "init_performance", "init_fromUtf8_browser", "init_toUint8Array", "init_toUtf8_browser", "fromUtf8", "init_performance", "init_dist_es", "init_performance", "init_performance", "a_lookUpTable", "init_performance", "init_performance", "init_performance", "init_module", "AwsCrc32c", "init_module", "init_performance", "Crc32c", "init_performance", "table", "i", "j", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_module", "AwsCrc32", "lookupTable", "Crc32", "init_performance", "init_module", "init_types", "init_performance", "init_constants", "init_performance", "init_module", "init_dist_es", "init_constants", "init_types", "config", "init_performance", "init_dist_es", "hash", "init_performance", "init_dist_es", "init_constants", "config", "context", "getAwsChunkedEncodingStream", "hasHeader", "e", "init_performance", "init_dist_es", "init_constants", "config", "context", "init_performance", "init_types", "init_performance", "number", "init_performance", "init_performance", "init_dist_es", "init_constants", "config", "logger", "error", "init_performance", "init_dist_es", "config", "context", "init_performance", "config", "init_performance", "init_dist_es", "init_constants", "init_dist_es", "init_performance", "init_constants", "init_dist_es", "init_performance", "init_performance", "context", "logger", "error", "init_dist_es", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "context", "message", "init_performance", "init_dist_es", "init_performance", "config", "context", "e", "context", "e", "init_performance", "init_performance", "init_dist_es", "config", "context", "e", "init_performance", "init_performance", "init_performance", "cache", "identity", "error", "init_constants", "init_performance", "init_performance", "init_dist_es", "init_constants", "init_performance", "init_dist_es", "init_constants", "context", "init_performance", "defaultErrorHandler", "defaultSuccessHandler", "init_performance", "init_dist_es", "error", "config", "context", "identity", "init_performance", "init_performance", "collectBody", "init_performance", "init_dist_es", "config", "context", "init_dist_es", "init_performance", "context", "e", "init_performance", "init_performance", "init_dist_es", "init_dist_es", "init_performance", "normalizeProvider", "logger", "init_performance", "init_dist_es", "init_performance", "i", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "message", "init_performance", "init_EndpointRuleObject", "init_performance", "init_ErrorRuleObject", "init_performance", "init_RuleSetObject", "init_performance", "init_TreeRuleObject", "init_performance", "init_shared", "init_performance", "init_types", "init_performance", "init_EndpointRuleObject", "init_ErrorRuleObject", "init_RuleSetObject", "init_TreeRuleObject", "init_shared", "init_performance", "init_performance", "init_types", "init_performance", "init_types", "init_performance", "not", "init_performance", "init_performance", "hostname", "protocol", "url", "k", "v", "error", "init_performance", "init_performance", "init_performance", "c", "init_performance", "init_performance", "not", "init_performance", "init_performance", "group", "init_performance", "init_types", "argv", "init_performance", "init_performance", "init_types", "init_performance", "init_performance", "init_types", "group", "init_performance", "init_types", "init_performance", "init_types", "error", "init_performance", "url", "init_performance", "init_types", "error", "group", "init_performance", "init_types", "init_utils", "init_performance", "init_performance", "init_types", "init_utils", "logger", "v", "k", "init_dist_es", "init_performance", "init_types", "init_isIpAddress", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_isIpAddress", "init_performance", "partition", "init_performance", "partition", "init_performance", "init_dist_es", "init_performance", "init_resolveEndpoint", "init_performance", "init_EndpointError", "init_performance", "init_EndpointRuleObject", "init_performance", "init_ErrorRuleObject", "init_performance", "init_RuleSetObject", "init_performance", "init_TreeRuleObject", "init_performance", "init_shared", "init_performance", "init_types", "init_performance", "init_EndpointError", "init_EndpointRuleObject", "init_ErrorRuleObject", "init_RuleSetObject", "init_TreeRuleObject", "init_shared", "init_dist_es", "init_performance", "init_isIpAddress", "init_resolveEndpoint", "init_types", "init_config", "init_performance", "RETRY_MODES", "init_constants", "init_performance", "init_dist_es", "init_performance", "init_constants", "error", "init_performance", "init_dist_es", "t", "init_constants", "init_performance", "init_performance", "init_constants", "init_performance", "init_constants", "init_performance", "init_config", "init_constants", "error", "init_performance", "init_config", "init_performance", "init_types", "init_performance", "init_dist_es", "init_performance", "init_config", "init_constants", "init_types", "context", "config", "identity", "init_performance", "init_dist_es", "init_constants", "init_performance", "features", "init_performance", "init_performance", "init_dist_es", "init_constants", "context", "version", "config", "init_dist_es", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_config", "init_performance", "init_performance", "init_dist_es", "check", "init_performance", "init_performance", "init_performance", "init_performance", "init_config", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_performance", "CONTENT_LENGTH_HEADER", "error", "init_dist_es", "init_performance", "init_performance", "partition", "init_performance", "init_performance", "config", "hostname", "init_performance", "toEndpointV1", "init_toEndpointV1", "init_performance", "init_dist_es", "init_performance", "init_toEndpointV1", "context", "toEndpointV1", "init_performance", "init_toEndpointV1", "init_performance", "init_dist_es", "config", "context", "setFeature", "init_performance", "init_performance", "serializerMiddlewareOption", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "serializerMiddlewareOption", "config", "init_performance", "init_dist_es", "init_toEndpointV1", "toEndpointV1", "init_performance", "init_types", "init_performance", "init_dist_es", "init_performance", "init_types", "init_performance", "init_performance", "init_util", "init_performance", "error", "init_StandardRetryStrategy", "init_performance", "init_AdaptiveRetryStrategy", "init_performance", "init_configurations", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_util", "context", "isRequest", "e", "error", "init_dist_es", "init_performance", "init_AdaptiveRetryStrategy", "init_StandardRetryStrategy", "init_configurations", "init_performance", "init_performance", "init_dist_es", "init_dist_es", "init_performance", "init_performance", "cache", "init_performance", "init_dist_es", "context", "config", "context", "init_performance", "init_dist_es", "defaultEndpointResolver", "s", "name", "init_performance", "init_performance", "init_dist_es", "init_errors", "init_performance", "init_performance", "init_schema", "init_errors", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "fromUtf8", "init_fromUtf8_browser", "init_performance", "init_toUint8Array", "init_performance", "init_fromUtf8_browser", "init_toUtf8_browser", "init_performance", "init_dist_es", "init_performance", "init_fromUtf8_browser", "init_toUint8Array", "init_toUtf8_browser", "isEmptyData", "init_isEmptyData", "init_performance", "init_constants", "init_performance", "init_dist_es", "init_performance", "convertToBuffer", "fromUtf8", "init_performance", "init_dist_es", "init_isEmptyData", "init_constants", "Sha1", "isEmptyData", "window", "subtle", "getRandomValues", "init_module", "init_performance", "Sha1", "init_performance", "init_module", "init_dist_es", "init_module", "init_performance", "init_constants", "init_performance", "init_performance", "init_constants", "init_dist_es", "Sha256", "init_constants", "init_performance", "init_performance", "init_constants", "RawSha256", "i", "_a", "u", "t1", "t2", "Sha256", "init_constants", "e", "i", "init_module", "init_performance", "Sha256", "init_performance", "init_module", "init_dist_es", "init_module", "init_performance", "init_dist_es", "init_performance", "config", "navigator", "negate", "i", "Int64", "init_performance", "init_dist_es", "number", "HEADER_VALUE_TYPE", "UUID_PATTERN", "init_performance", "init_dist_es", "toUtf8", "fromUtf8", "Int64", "init_performance", "init_module", "init_performance", "init_module", "toUtf8", "fromUtf8", "message", "init_performance", "init_performance", "init_performance", "init_performance", "message", "init_performance", "init_dist_es", "init_performance", "iterator", "init_performance", "toUtf8", "message", "error", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "init_utils", "init_performance", "iterator", "EventStreamMarshaller", "isReadableStream", "init_EventStreamMarshaller", "init_performance", "init_dist_es", "init_utils", "init_provider", "init_performance", "init_EventStreamMarshaller", "EventStreamMarshaller", "init_dist_es", "init_performance", "init_EventStreamMarshaller", "init_provider", "init_utils", "blob", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "blobHasher", "blob", "hash", "init_performance", "init_performance", "message", "init_dist_es", "init_performance", "BLOCK_SIZE", "DIGEST_LENGTH", "INIT", "init_constants", "init_performance", "q", "a", "b", "x", "s", "t", "c", "d", "isEmptyData", "convertToBuffer", "init_dist_es", "init_performance", "init_constants", "BLOCK_SIZE", "i", "DIGEST_LENGTH", "INIT", "init_constants", "init_performance", "init_performance", "init_dist_es", "init_constants", "navigator", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_protocols", "config", "getRuntimeConfig", "init_performance", "init_module", "init_dist_es", "config", "Sha1", "Sha256", "init_extensions", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_extensions", "init_performance", "config", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_schema", "getRuntimeConfig", "config", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "hash", "init_dist_es", "init_performance", "config", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_dist_es", "init_performance", "config", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_waiter", "init_performance", "WaiterState", "init_performance", "init_waiter", "max", "message", "state", "reason", "init_performance", "init_utils", "init_performance", "init_performance", "init_utils", "init_waiter", "promise", "finalize", "aborted", "init_dist_es", "init_performance", "init_waiter", "init_performance", "init_dist_es", "checkState", "init_performance", "init_dist_es", "checkState", "init_performance", "init_dist_es", "checkState", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_pagination", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_pagination", "init_errors", "hostname", "init_dist_es", "init_performance", "UNSIGNED_PAYLOAD", "SHA256_HEADER", "init_constants", "init_performance", "init_performance", "init_dist_es", "init_constants", "SHA256_HEADER", "UNSIGNED_PAYLOAD", "init_performance", "init_dist_es", "context", "presigned", "init_dist_es", "init_performance", "error", "domain", "s3Url", "url", "u", "init_performance", "init_dist_es", "middlewares: AnyMiddlewareFunction[]", "fn: MiddlewareFunction<\n TContext,\n TMeta,\n object,\n $ContextOverrides,\n TInputOut\n >", "parse: ParseFn", "inputMiddleware: AnyMiddlewareFunction", "parsedInput: ReturnType", "parse", "parse: ParseFn", "outputMiddleware: AnyMiddlewareFunction", "procedureParser: Parser", "parser", "def1: AnyProcedureBuilderDef", "def2: Partial", "meta", "import_objectSpread2$1", "initDef: Partial", "_def: AnyProcedureBuilderDef", "builder: AnyProcedureBuilder", "output: Parser", "builder", "resolver: ProcedureResolver", "_defIn: AnyProcedureBuilderDef & { type: ProcedureType }", "resolver: AnyResolver", "_def: AnyProcedure['_def']", "index: number", "opts: ProcedureCallOptions", "middleware", "_nextOpts?: any", "opts: ProcedureCallOptions", "isServerDefault: boolean", "issues: ReadonlyArray", "r", "e", "t", "n", "_objectWithoutProperties", "o", "i", "s", "TRPCBuilder", "opts?: ValidateShape>", "config: RootConfig<$Root>", "isServer: boolean", "config", "init_dist", "init_performance", "t", "router", "createCallerFactory", "init_performance", "init_dist", "duration", "error", "s", "tag", "error", "getProductById", "productSlots", "d", "t", "getAllProducts", "specialDeals", "productTags", "init_performance", "tag", "p", "error", "init_performance", "getAllProducts", "init_common", "init_performance", "router", "init_performance", "init_common", "c", "error", "router", "init_performance", "Hono", "router", "commonRouter", "init_performance", "Hono", "router", "init_performance", "Hono", "router", "init_performance", "Hono", "c", "init_performance", "c", "error", "router", "init_performance", "Hono", "c", "initializer", "i", "k", "_a", "config", "init_core", "init_performance", "assert", "isObject", "isPlainObject", "merge", "_x", "v", "k", "array", "set", "match", "object", "i", "chars", "o", "cl", "a", "b", "Class", "x", "_a", "message", "config", "t", "base64", "base64url", "hex", "init_util", "init_performance", "F", "error", "issue", "i", "_a", "a", "b", "init_errors", "init_performance", "init_core", "init_util", "encode", "decode", "init_performance", "init_core", "init_errors", "init_util", "_Err", "e", "config", "bigint", "date", "domain", "integer", "time", "init_performance", "init_util", "version", "init_checks", "init_performance", "init_core", "init_util", "_a", "origin", "inst", "integer", "result", "init_performance", "x", "F", "version", "init_performance", "base64", "c", "k", "t", "r", "config", "a", "b", "isPlainObject", "f", "init_performance", "init_checks", "init_core", "init_util", "_a", "version", "ch", "checks", "checkResult", "canary", "result", "_", "v", "url", "date", "time", "bigint", "isDate", "i", "desc", "isObject", "allowsEval", "o", "p", "results", "map", "left", "right", "keyResult", "valueResult", "output", "x", "F", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "count", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "t", "e", "origin", "issue", "v", "be", "error", "init_performance", "init_util", "origin", "issue", "count", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "init_performance", "error", "init_performance", "init_util", "origin", "issue", "number", "error", "init_performance", "init_util", "text", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "count", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "init_performance", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "init_performance", "_a", "init_performance", "meta", "p", "f", "Class", "_emoji", "_undefined", "_null", "ch", "v", "issue", "codec", "format", "init_performance", "init_checks", "init_util", "process", "_a", "meta", "id", "schema", "init_performance", "registry", "ctx", "process", "init_performance", "init_util", "json", "format", "v", "file", "m", "x", "i", "a", "b", "init_performance", "process", "init_performance", "core_exports", "_emoji", "_null", "_undefined", "config", "decode", "encode", "process", "version", "init_core", "init_performance", "init_errors", "init_checks", "init_util", "checks_exports", "init_checks", "init_performance", "init_core", "date", "datetime", "duration", "time", "init_performance", "init_core", "init_schemas", "initializer", "init_errors", "init_performance", "init_core", "init_util", "issue", "issues", "parse", "parseAsync", "safeParse", "safeParseAsync", "encode", "decode", "encodeAsync", "decodeAsync", "safeEncode", "safeDecode", "safeEncodeAsync", "safeDecodeAsync", "init_parse", "init_performance", "init_core", "init_errors", "schemas_exports", "_default", "base64", "base64url", "bigint", "boolean", "_catch", "check", "cidrv4", "cidrv6", "cuid", "cuid2", "date", "describe", "e164", "email", "emoji", "_enum", "guid", "hex", "hostname", "ipv4", "ipv6", "ksuid", "lazy", "mac", "meta", "nanoid", "_null", "nullish", "number", "string", "ulid", "_undefined", "union", "uuid", "_void", "xid", "_emoji", "format", "k", "v", "ch", "init_schemas", "init_performance", "init_core", "init_checks", "init_parse", "def", "parse", "safeParse", "parseAsync", "safeParseAsync", "encode", "decode", "encodeAsync", "decodeAsync", "safeEncode", "safeDecode", "safeEncodeAsync", "safeDecodeAsync", "cl", "json", "datetime", "time", "duration", "c", "issue", "output", "map", "config", "init_performance", "init_core", "ZodFirstPartyTypeKind", "z", "zodSchema", "v", "t", "format", "objectSchema", "i", "s", "version", "init_performance", "init_checks", "init_schemas", "schemas_exports", "checks_exports", "bigint", "boolean", "date", "number", "string", "init_performance", "init_core", "init_schemas", "_default", "base64", "base64url", "bigint", "boolean", "_catch", "check", "cidrv4", "cidrv6", "config", "core_exports", "cuid", "cuid2", "date", "decode", "decodeAsync", "describe", "e164", "email", "emoji", "encode", "encodeAsync", "_enum", "guid", "hex", "hostname", "ipv4", "ipv6", "ksuid", "lazy", "mac", "meta", "nanoid", "_null", "nullish", "number", "parse", "parseAsync", "safeDecode", "safeDecodeAsync", "safeEncode", "safeEncodeAsync", "safeParse", "safeParseAsync", "string", "ulid", "_undefined", "union", "uuid", "_void", "xid", "init_performance", "init_core", "init_schemas", "init_checks", "init_errors", "init_parse", "init_performance", "init_complaint", "init_performance", "router", "c", "init_performance", "t", "e", "n", "r", "i", "s", "u", "a", "o", "c", "f", "h", "d", "l", "y", "M", "m", "v", "g", "D", "p", "S", "w", "O", "b", "$", "k", "init_coupon", "init_performance", "router", "dayjs", "au", "ap", "AbortController", "Headers", "Request", "Response", "fetch", "init_performance", "init_performance", "k", "init_performance", "libDefault", "init_performance", "init_performance", "count", "run", "error", "map", "e", "init_performance", "init_performance", "self", "i", "error", "message", "count", "init_performance", "i", "a", "b", "original", "require_retry", "init_performance", "init_performance", "operation", "number", "url", "e", "message", "json", "text", "error", "Expo", "init_performance", "init_performance", "init_performance", "channel", "message", "init_performance", "isFunction", "isArrayBuffer", "i", "l", "_key", "merge", "isPlainObject", "isObject", "G", "isReadableStream", "extend", "toCamelCase", "noop", "init_utils", "init_performance", "cache", "prototype", "e", "context", "a", "b", "filter", "m", "hasOwnProperty", "define", "cb", "init_performance", "init_utils", "error", "config", "message", "init_performance", "i", "init_performance", "init_utils", "encode", "match", "init_performance", "toString", "encoder", "_encode", "encode", "url", "_encode", "init_performance", "init_utils", "init_performance", "init_utils", "h", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_utils", "init_performance", "init_performance", "init_utils", "init_performance", "init_utils", "match", "i", "init_performance", "init_utils", "parser", "encoder", "e", "init_performance", "init_utils", "isFormData", "isFileList", "transitional", "init_performance", "init_utils", "i", "parser", "match", "context", "filter", "w", "init_performance", "init_utils", "self", "parser", "i", "format", "prototype", "config", "context", "transform", "init_performance", "init_utils", "init_performance", "init_performance", "message", "config", "validateStatus", "init_performance", "url", "match", "init_performance", "i", "init_performance", "flush", "init_performance", "init_performance", "init_utils", "e", "init_performance", "origin", "url", "init_performance", "init_utils", "domain", "match", "url", "init_performance", "init_performance", "init_performance", "config2", "config", "a", "b", "merge", "init_performance", "init_utils", "init_performance", "init_utils", "config", "init_performance", "init_utils", "config", "transitional", "init_performance", "init_utils", "aborted", "signal", "init_performance", "iterator", "e", "done", "isFunction", "ReadableStream", "TextEncoder", "init_fetch", "init_performance", "init_utils", "Request", "Response", "e", "env", "encoder", "config", "url", "flush", "fetch", "i", "map", "config", "adapter", "i", "s", "init_performance", "init_utils", "init_fetch", "e", "config", "adapter", "init_performance", "init_performance", "i", "init_performance", "version", "message", "desc", "validators", "init_performance", "init_utils", "config", "e", "transitional", "promise", "i", "error", "url", "init_performance", "i", "promise", "message", "config", "abort", "c", "init_performance", "init_performance", "init_utils", "init_performance", "context", "init_performance", "init_utils", "Axios", "AxiosError", "CanceledError", "isCancel", "CancelToken", "VERSION", "all", "isAxiosError", "spread", "toFormData", "AxiosHeaders", "HttpStatusCode", "getAdapter", "mergeConfig", "init_axios", "init_performance", "init_performance", "init_performance", "message", "error", "error", "init_performance", "init_order", "init_performance", "router", "orders", "e", "import_dayjs", "init_vendor_snippets", "init_performance", "date", "router", "e", "sum", "p", "dayjs", "init_performance", "error", "init_performance", "init_performance", "constants", "error", "c", "error", "s", "pid", "init_performance", "error", "init_performance", "isNumber", "j", "e", "f", "h", "Q", "hh", "i", "n", "init_util", "init_performance", "ax", "ay", "bx", "by", "cx", "cy", "c", "_i", "t1", "t0", "u3", "B", "u", "D", "init_performance", "init_util", "bc", "ca", "ab", "u", "init_performance", "init_util", "bc", "ca", "ab", "aa", "bb", "cc", "u", "v", "abt", "bct", "cat", "_8", "_16", "fin", "fin2", "init_performance", "init_util", "ab", "bc", "cd", "ac", "bd", "ce", "_8", "_8b", "_16", "_48", "fin", "init_performance", "init_util", "init_performance", "p", "polygon", "i", "ii", "k", "f", "u2", "v2", "x", "y", "init_esm", "init_performance", "point", "polygon", "i", "init_esm", "init_esm", "init_performance", "polygon", "init_performance", "init_common", "init_esm", "router", "point", "error", "tag", "init_stores", "init_performance", "router", "dayjs", "a", "b", "import_dayjs", "init_slots", "init_performance", "router", "init_banners", "init_performance", "router", "init_types", "init_performance", "init_shared", "init_performance", "init_types", "error", "init_retry", "init_performance", "error", "e", "init_performance", "init_axios", "init_common", "init_stores", "init_slots", "init_banners", "init_shared", "init_retry", "init_performance", "error", "slotsRouter", "init_slots", "init_performance", "init_dist", "router", "e", "init_product", "init_performance", "router", "url", "group", "m", "tag", "init_performance", "sign", "verify", "hash", "init_node", "init_performance", "init_constants", "init_performance", "init_crypto", "init_performance", "init_constants", "init_node", "randomUUID", "subtle", "webcrypto", "init_crypto", "init_performance", "hash", "sign", "verify", "randomBytes", "callback", "nextTick", "hash", "salt", "unknown", "i", "string", "c", "k", "b", "off", "s", "o", "P", "S", "n", "l", "r", "j", "err", "encodeBase64", "decodeBase64", "init_performance", "init_crypto", "init_staff_user", "init_performance", "router", "init_store", "init_performance", "router", "e", "error", "init_payments", "init_performance", "router", "bannerRouter", "init_banner", "init_performance", "router", "error", "e", "init_user", "init_performance", "count", "u", "o", "s", "c", "title", "text", "t", "error", "init_const", "init_performance", "router", "constants", "c", "init_performance", "init_complaint", "init_coupon", "init_order", "init_vendor_snippets", "init_slots", "init_product", "init_staff_user", "init_store", "init_payments", "init_banner", "init_user", "init_const", "router", "slotsRouter", "bannerRouter", "url", "error", "init_performance", "init_axios", "init_address", "init_performance", "router", "init_performance", "init_auth", "init_performance", "router", "getUserByMobile", "email", "init_cart", "init_performance", "sum", "router", "getProductById", "complaintRouter", "init_complaint", "init_performance", "router", "toApiDate", "orderRouter", "init_order", "init_performance", "init_common", "date", "constants", "minOrderValue", "deliveryCharge", "getProductById", "sum", "router", "i", "orderStatus", "u", "e", "updateOrderNotes", "import_dayjs", "productRouter", "init_product", "init_performance", "router", "getProductById", "dayjs", "getProductReviews", "url", "error", "getAllProducts", "userRouter", "init_user", "init_performance", "router", "getUserById", "init_coupon", "init_performance", "desc", "router", "au", "e", "ap", "init_performance", "init_payments", "init_performance", "init_crypto", "router", "init_performance", "router", "error", "init_performance", "router", "tag", "userRouter", "init_performance", "init_address", "init_auth", "init_banners", "init_cart", "init_complaint", "init_order", "init_product", "init_slots", "init_user", "init_coupon", "init_payments", "init_stores", "router", "complaintRouter", "orderRouter", "productRouter", "init_router", "init_performance", "router", "userRouter", "init_performance", "init_dist", "init_router", "Hono", "error", "c", "message", "init_performance", "init_performance", "init_performance", "env", "createApp", "initDb", "init_performance", "env", "e", "init_performance", "e", "env", "error", "init_performance", "env", "middleware", "env"] +} diff --git a/apps/backend/.wrangler/tmp/dev-zfhbqS/worker.js b/apps/backend/.wrangler/tmp/dev-zfhbqS/worker.js new file mode 100644 index 0000000..7e5f801 --- /dev/null +++ b/apps/backend/.wrangler/tmp/dev-zfhbqS/worker.js @@ -0,0 +1,77888 @@ +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 __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __commonJS = (cb2, mod) => function __require() { + return mod || (0, cb2[__getOwnPropNames(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all3) => { + for (var name in all3) + __defProp(target, name, { get: all3[name], enumerable: true }); +}; +var __copyProps = (to, from, except2, desc2) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except2) + __defProp(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.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 __publicField = (obj, key, value) => { + __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); + return value; +}; + +// .wrangler/tmp/bundle-aek2Ls/strip-cf-connecting-ip-header.js +function stripCfConnectingIPHeader(input, init) { + const request = new Request(input, init); + request.headers.delete("CF-Connecting-IP"); + return request; +} +var init_strip_cf_connecting_ip_header = __esm({ + ".wrangler/tmp/bundle-aek2Ls/strip-cf-connecting-ip-header.js"() { + "use strict"; + __name(stripCfConnectingIPHeader, "stripCfConnectingIPHeader"); + globalThis.fetch = new Proxy(globalThis.fetch, { + apply(target, thisArg, argArray) { + return Reflect.apply(target, thisArg, [ + stripCfConnectingIPHeader.apply(null, argArray) + ]); + } + }); + } +}); + +// ../../node_modules/unenv/dist/runtime/_internal/utils.mjs +function createNotImplementedError(name) { + return new Error(`[unenv] ${name} is not implemented yet!`); +} +function notImplemented(name) { + const fn = /* @__PURE__ */ __name(() => { + throw createNotImplementedError(name); + }, "fn"); + return Object.assign(fn, { __unenv__: true }); +} +function notImplementedClass(name) { + return class { + __unenv__ = true; + constructor() { + throw new Error(`[unenv] ${name} is not implemented yet!`); + } + }; +} +var init_utils = __esm({ + "../../node_modules/unenv/dist/runtime/_internal/utils.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(createNotImplementedError, "createNotImplementedError"); + __name(notImplemented, "notImplemented"); + __name(notImplementedClass, "notImplementedClass"); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/perf_hooks/performance.mjs +var _timeOrigin, _performanceNow, nodeTiming, PerformanceEntry, PerformanceMark, PerformanceMeasure, PerformanceResourceTiming, PerformanceObserverEntryList, Performance, PerformanceObserver, performance; +var init_performance = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/perf_hooks/performance.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils(); + _timeOrigin = globalThis.performance?.timeOrigin ?? Date.now(); + _performanceNow = globalThis.performance?.now ? globalThis.performance.now.bind(globalThis.performance) : () => Date.now() - _timeOrigin; + nodeTiming = { + name: "node", + entryType: "node", + startTime: 0, + duration: 0, + nodeStart: 0, + v8Start: 0, + bootstrapComplete: 0, + environment: 0, + loopStart: 0, + loopExit: 0, + idleTime: 0, + uvMetricsInfo: { + loopCount: 0, + events: 0, + eventsWaiting: 0 + }, + detail: void 0, + toJSON() { + return this; + } + }; + PerformanceEntry = class { + __unenv__ = true; + detail; + entryType = "event"; + name; + startTime; + constructor(name, options) { + this.name = name; + this.startTime = options?.startTime || _performanceNow(); + this.detail = options?.detail; + } + get duration() { + return _performanceNow() - this.startTime; + } + toJSON() { + return { + name: this.name, + entryType: this.entryType, + startTime: this.startTime, + duration: this.duration, + detail: this.detail + }; + } + }; + __name(PerformanceEntry, "PerformanceEntry"); + PerformanceMark = /* @__PURE__ */ __name(class PerformanceMark2 extends PerformanceEntry { + entryType = "mark"; + constructor() { + super(...arguments); + } + get duration() { + return 0; + } + }, "PerformanceMark"); + PerformanceMeasure = class extends PerformanceEntry { + entryType = "measure"; + }; + __name(PerformanceMeasure, "PerformanceMeasure"); + PerformanceResourceTiming = class extends PerformanceEntry { + entryType = "resource"; + serverTiming = []; + connectEnd = 0; + connectStart = 0; + decodedBodySize = 0; + domainLookupEnd = 0; + domainLookupStart = 0; + encodedBodySize = 0; + fetchStart = 0; + initiatorType = ""; + name = ""; + nextHopProtocol = ""; + redirectEnd = 0; + redirectStart = 0; + requestStart = 0; + responseEnd = 0; + responseStart = 0; + secureConnectionStart = 0; + startTime = 0; + transferSize = 0; + workerStart = 0; + responseStatus = 0; + }; + __name(PerformanceResourceTiming, "PerformanceResourceTiming"); + PerformanceObserverEntryList = class { + __unenv__ = true; + getEntries() { + return []; + } + getEntriesByName(_name, _type) { + return []; + } + getEntriesByType(type) { + return []; + } + }; + __name(PerformanceObserverEntryList, "PerformanceObserverEntryList"); + Performance = class { + __unenv__ = true; + timeOrigin = _timeOrigin; + eventCounts = /* @__PURE__ */ new Map(); + _entries = []; + _resourceTimingBufferSize = 0; + navigation = void 0; + timing = void 0; + timerify(_fn, _options) { + throw createNotImplementedError("Performance.timerify"); + } + get nodeTiming() { + return nodeTiming; + } + eventLoopUtilization() { + return {}; + } + markResourceTiming() { + return new PerformanceResourceTiming(""); + } + onresourcetimingbufferfull = null; + now() { + if (this.timeOrigin === _timeOrigin) { + return _performanceNow(); + } + return Date.now() - this.timeOrigin; + } + clearMarks(markName) { + this._entries = markName ? this._entries.filter((e2) => e2.name !== markName) : this._entries.filter((e2) => e2.entryType !== "mark"); + } + clearMeasures(measureName) { + this._entries = measureName ? this._entries.filter((e2) => e2.name !== measureName) : this._entries.filter((e2) => e2.entryType !== "measure"); + } + clearResourceTimings() { + this._entries = this._entries.filter((e2) => e2.entryType !== "resource" || e2.entryType !== "navigation"); + } + getEntries() { + return this._entries; + } + getEntriesByName(name, type) { + return this._entries.filter((e2) => e2.name === name && (!type || e2.entryType === type)); + } + getEntriesByType(type) { + return this._entries.filter((e2) => e2.entryType === type); + } + mark(name, options) { + const entry = new PerformanceMark(name, options); + this._entries.push(entry); + return entry; + } + measure(measureName, startOrMeasureOptions, endMark) { + let start; + let end; + if (typeof startOrMeasureOptions === "string") { + start = this.getEntriesByName(startOrMeasureOptions, "mark")[0]?.startTime; + end = this.getEntriesByName(endMark, "mark")[0]?.startTime; + } else { + start = Number.parseFloat(startOrMeasureOptions?.start) || this.now(); + end = Number.parseFloat(startOrMeasureOptions?.end) || this.now(); + } + const entry = new PerformanceMeasure(measureName, { + startTime: start, + detail: { + start, + end + } + }); + this._entries.push(entry); + return entry; + } + setResourceTimingBufferSize(maxSize) { + this._resourceTimingBufferSize = maxSize; + } + addEventListener(type, listener, options) { + throw createNotImplementedError("Performance.addEventListener"); + } + removeEventListener(type, listener, options) { + throw createNotImplementedError("Performance.removeEventListener"); + } + dispatchEvent(event) { + throw createNotImplementedError("Performance.dispatchEvent"); + } + toJSON() { + return this; + } + }; + __name(Performance, "Performance"); + PerformanceObserver = class { + __unenv__ = true; + _callback = null; + constructor(callback) { + this._callback = callback; + } + takeRecords() { + return []; + } + disconnect() { + throw createNotImplementedError("PerformanceObserver.disconnect"); + } + observe(options) { + throw createNotImplementedError("PerformanceObserver.observe"); + } + bind(fn) { + return fn; + } + runInAsyncScope(fn, thisArg, ...args) { + return fn.call(thisArg, ...args); + } + asyncId() { + return 0; + } + triggerAsyncId() { + return 0; + } + emitDestroy() { + return this; + } + }; + __name(PerformanceObserver, "PerformanceObserver"); + __publicField(PerformanceObserver, "supportedEntryTypes", []); + performance = globalThis.performance && "addEventListener" in globalThis.performance ? globalThis.performance : new Performance(); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/perf_hooks.mjs +var init_perf_hooks = __esm({ + "../../node_modules/unenv/dist/runtime/node/perf_hooks.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_performance(); + } +}); + +// ../../node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs +var init_performance2 = __esm({ + "../../node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs"() { + init_perf_hooks(); + globalThis.performance = performance; + globalThis.Performance = Performance; + globalThis.PerformanceEntry = PerformanceEntry; + globalThis.PerformanceMark = PerformanceMark; + globalThis.PerformanceMeasure = PerformanceMeasure; + globalThis.PerformanceObserver = PerformanceObserver; + globalThis.PerformanceObserverEntryList = PerformanceObserverEntryList; + globalThis.PerformanceResourceTiming = PerformanceResourceTiming; + } +}); + +// ../../node_modules/unenv/dist/runtime/mock/noop.mjs +var noop_default; +var init_noop = __esm({ + "../../node_modules/unenv/dist/runtime/mock/noop.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + noop_default = Object.assign(() => { + }, { __unenv__: true }); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/console.mjs +import { Writable } from "node:stream"; +var _console, _ignoreErrors, _stderr, _stdout, log, info, trace, debug, table, error, warn, createTask, clear, count, countReset, dir, dirxml, group, groupEnd, groupCollapsed, profile, profileEnd, time, timeEnd, timeLog, timeStamp, Console, _times, _stdoutErrorHandler, _stderrErrorHandler; +var init_console = __esm({ + "../../node_modules/unenv/dist/runtime/node/console.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_noop(); + init_utils(); + _console = globalThis.console; + _ignoreErrors = true; + _stderr = new Writable(); + _stdout = new Writable(); + log = _console?.log ?? noop_default; + info = _console?.info ?? log; + trace = _console?.trace ?? info; + debug = _console?.debug ?? log; + table = _console?.table ?? log; + error = _console?.error ?? log; + warn = _console?.warn ?? error; + createTask = _console?.createTask ?? /* @__PURE__ */ notImplemented("console.createTask"); + clear = _console?.clear ?? noop_default; + count = _console?.count ?? noop_default; + countReset = _console?.countReset ?? noop_default; + dir = _console?.dir ?? noop_default; + dirxml = _console?.dirxml ?? noop_default; + group = _console?.group ?? noop_default; + groupEnd = _console?.groupEnd ?? noop_default; + groupCollapsed = _console?.groupCollapsed ?? noop_default; + profile = _console?.profile ?? noop_default; + profileEnd = _console?.profileEnd ?? noop_default; + time = _console?.time ?? noop_default; + timeEnd = _console?.timeEnd ?? noop_default; + timeLog = _console?.timeLog ?? noop_default; + timeStamp = _console?.timeStamp ?? noop_default; + Console = _console?.Console ?? /* @__PURE__ */ notImplementedClass("console.Console"); + _times = /* @__PURE__ */ new Map(); + _stdoutErrorHandler = noop_default; + _stderrErrorHandler = noop_default; + } +}); + +// ../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs +var workerdConsole, assert, clear2, context, count2, countReset2, createTask2, debug2, dir2, dirxml2, error2, group2, groupCollapsed2, groupEnd2, info2, log2, profile2, profileEnd2, table2, time2, timeEnd2, timeLog2, timeStamp2, trace2, warn2, console_default; +var init_console2 = __esm({ + "../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_console(); + workerdConsole = globalThis["console"]; + ({ + assert, + clear: clear2, + context: ( + // @ts-expect-error undocumented public API + context + ), + count: count2, + countReset: countReset2, + createTask: ( + // @ts-expect-error undocumented public API + createTask2 + ), + debug: debug2, + dir: dir2, + dirxml: dirxml2, + error: error2, + group: group2, + groupCollapsed: groupCollapsed2, + groupEnd: groupEnd2, + info: info2, + log: log2, + profile: profile2, + profileEnd: profileEnd2, + table: table2, + time: time2, + timeEnd: timeEnd2, + timeLog: timeLog2, + timeStamp: timeStamp2, + trace: trace2, + warn: warn2 + } = workerdConsole); + Object.assign(workerdConsole, { + Console, + _ignoreErrors, + _stderr, + _stderrErrorHandler, + _stdout, + _stdoutErrorHandler, + _times + }); + console_default = workerdConsole; + } +}); + +// ../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-console +var init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console = __esm({ + "../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-console"() { + init_console2(); + globalThis.console = console_default; + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/process/hrtime.mjs +var hrtime; +var init_hrtime = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/process/hrtime.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + hrtime = /* @__PURE__ */ Object.assign(/* @__PURE__ */ __name(function hrtime2(startTime) { + const now = Date.now(); + const seconds = Math.trunc(now / 1e3); + const nanos = now % 1e3 * 1e6; + if (startTime) { + let diffSeconds = seconds - startTime[0]; + let diffNanos = nanos - startTime[0]; + if (diffNanos < 0) { + diffSeconds = diffSeconds - 1; + diffNanos = 1e9 + diffNanos; + } + return [diffSeconds, diffNanos]; + } + return [seconds, nanos]; + }, "hrtime"), { bigint: /* @__PURE__ */ __name(function bigint() { + return BigInt(Date.now() * 1e6); + }, "bigint") }); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/tty/read-stream.mjs +import { Socket } from "node:net"; +var ReadStream; +var init_read_stream = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/tty/read-stream.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ReadStream = class extends Socket { + fd; + constructor(fd) { + super(); + this.fd = fd; + } + isRaw = false; + setRawMode(mode) { + this.isRaw = mode; + return this; + } + isTTY = false; + }; + __name(ReadStream, "ReadStream"); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/tty/write-stream.mjs +import { Socket as Socket2 } from "node:net"; +var WriteStream; +var init_write_stream = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/tty/write-stream.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + WriteStream = class extends Socket2 { + fd; + constructor(fd) { + super(); + this.fd = fd; + } + clearLine(dir3, callback) { + callback && callback(); + return false; + } + clearScreenDown(callback) { + callback && callback(); + return false; + } + cursorTo(x2, y2, callback) { + callback && typeof callback === "function" && callback(); + return false; + } + moveCursor(dx, dy, callback) { + callback && callback(); + return false; + } + getColorDepth(env2) { + return 1; + } + hasColors(count4, env2) { + return false; + } + getWindowSize() { + return [this.columns, this.rows]; + } + columns = 80; + rows = 24; + isTTY = false; + }; + __name(WriteStream, "WriteStream"); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/tty.mjs +var init_tty = __esm({ + "../../node_modules/unenv/dist/runtime/node/tty.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_read_stream(); + init_write_stream(); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/process/process.mjs +import { EventEmitter } from "node:events"; +var Process; +var init_process = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/process/process.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tty(); + init_utils(); + Process = class extends EventEmitter { + env; + hrtime; + nextTick; + constructor(impl) { + super(); + this.env = impl.env; + this.hrtime = impl.hrtime; + this.nextTick = impl.nextTick; + for (const prop of [...Object.getOwnPropertyNames(Process.prototype), ...Object.getOwnPropertyNames(EventEmitter.prototype)]) { + const value = this[prop]; + if (typeof value === "function") { + this[prop] = value.bind(this); + } + } + } + emitWarning(warning, type, code) { + console.warn(`${code ? `[${code}] ` : ""}${type ? `${type}: ` : ""}${warning}`); + } + emit(...args) { + return super.emit(...args); + } + listeners(eventName) { + return super.listeners(eventName); + } + #stdin; + #stdout; + #stderr; + get stdin() { + return this.#stdin ??= new ReadStream(0); + } + get stdout() { + return this.#stdout ??= new WriteStream(1); + } + get stderr() { + return this.#stderr ??= new WriteStream(2); + } + #cwd = "/"; + chdir(cwd2) { + this.#cwd = cwd2; + } + cwd() { + return this.#cwd; + } + arch = ""; + platform = ""; + argv = []; + argv0 = ""; + execArgv = []; + execPath = ""; + title = ""; + pid = 200; + ppid = 100; + get version() { + return ""; + } + get versions() { + return {}; + } + get allowedNodeEnvironmentFlags() { + return /* @__PURE__ */ new Set(); + } + get sourceMapsEnabled() { + return false; + } + get debugPort() { + return 0; + } + get throwDeprecation() { + return false; + } + get traceDeprecation() { + return false; + } + get features() { + return {}; + } + get release() { + return {}; + } + get connected() { + return false; + } + get config() { + return {}; + } + get moduleLoadList() { + return []; + } + constrainedMemory() { + return 0; + } + availableMemory() { + return 0; + } + uptime() { + return 0; + } + resourceUsage() { + return {}; + } + ref() { + } + unref() { + } + umask() { + throw createNotImplementedError("process.umask"); + } + getBuiltinModule() { + return void 0; + } + getActiveResourcesInfo() { + throw createNotImplementedError("process.getActiveResourcesInfo"); + } + exit() { + throw createNotImplementedError("process.exit"); + } + reallyExit() { + throw createNotImplementedError("process.reallyExit"); + } + kill() { + throw createNotImplementedError("process.kill"); + } + abort() { + throw createNotImplementedError("process.abort"); + } + dlopen() { + throw createNotImplementedError("process.dlopen"); + } + setSourceMapsEnabled() { + throw createNotImplementedError("process.setSourceMapsEnabled"); + } + loadEnvFile() { + throw createNotImplementedError("process.loadEnvFile"); + } + disconnect() { + throw createNotImplementedError("process.disconnect"); + } + cpuUsage() { + throw createNotImplementedError("process.cpuUsage"); + } + setUncaughtExceptionCaptureCallback() { + throw createNotImplementedError("process.setUncaughtExceptionCaptureCallback"); + } + hasUncaughtExceptionCaptureCallback() { + throw createNotImplementedError("process.hasUncaughtExceptionCaptureCallback"); + } + initgroups() { + throw createNotImplementedError("process.initgroups"); + } + openStdin() { + throw createNotImplementedError("process.openStdin"); + } + assert() { + throw createNotImplementedError("process.assert"); + } + binding() { + throw createNotImplementedError("process.binding"); + } + permission = { has: /* @__PURE__ */ notImplemented("process.permission.has") }; + report = { + directory: "", + filename: "", + signal: "SIGUSR2", + compact: false, + reportOnFatalError: false, + reportOnSignal: false, + reportOnUncaughtException: false, + getReport: /* @__PURE__ */ notImplemented("process.report.getReport"), + writeReport: /* @__PURE__ */ notImplemented("process.report.writeReport") + }; + finalization = { + register: /* @__PURE__ */ notImplemented("process.finalization.register"), + unregister: /* @__PURE__ */ notImplemented("process.finalization.unregister"), + registerBeforeExit: /* @__PURE__ */ notImplemented("process.finalization.registerBeforeExit") + }; + memoryUsage = Object.assign(() => ({ + arrayBuffers: 0, + rss: 0, + external: 0, + heapTotal: 0, + heapUsed: 0 + }), { rss: () => 0 }); + mainModule = void 0; + domain = void 0; + send = void 0; + exitCode = void 0; + channel = void 0; + getegid = void 0; + geteuid = void 0; + getgid = void 0; + getgroups = void 0; + getuid = void 0; + setegid = void 0; + seteuid = void 0; + setgid = void 0; + setgroups = void 0; + setuid = void 0; + _events = void 0; + _eventsCount = void 0; + _exiting = void 0; + _maxListeners = void 0; + _debugEnd = void 0; + _debugProcess = void 0; + _fatalException = void 0; + _getActiveHandles = void 0; + _getActiveRequests = void 0; + _kill = void 0; + _preload_modules = void 0; + _rawDebug = void 0; + _startProfilerIdleNotifier = void 0; + _stopProfilerIdleNotifier = void 0; + _tickCallback = void 0; + _disconnect = void 0; + _handleQueue = void 0; + _pendingMessage = void 0; + _channel = void 0; + _send = void 0; + _linkedBinding = void 0; + }; + __name(Process, "Process"); + } +}); + +// ../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs +var globalProcess, getBuiltinModule, exit, platform, nextTick, unenvProcess, abort, addListener, allowedNodeEnvironmentFlags, hasUncaughtExceptionCaptureCallback, setUncaughtExceptionCaptureCallback, loadEnvFile, sourceMapsEnabled, arch, argv, argv0, chdir, config, connected, constrainedMemory, availableMemory, cpuUsage, cwd, debugPort, dlopen, disconnect, emit, emitWarning, env, eventNames, execArgv, execPath, finalization, features, getActiveResourcesInfo, getMaxListeners, hrtime3, kill, listeners, listenerCount, memoryUsage, on, off, once, pid, ppid, prependListener, prependOnceListener, rawListeners, release, removeAllListeners, removeListener, report, resourceUsage, setMaxListeners, setSourceMapsEnabled, stderr, stdin, stdout, title, throwDeprecation, traceDeprecation, umask, uptime, version, versions, domain, initgroups, moduleLoadList, reallyExit, openStdin, assert2, binding, send, exitCode, channel, getegid, geteuid, getgid, getgroups, getuid, setegid, seteuid, setgid, setgroups, setuid, permission, mainModule, _events, _eventsCount, _exiting, _maxListeners, _debugEnd, _debugProcess, _fatalException, _getActiveHandles, _getActiveRequests, _kill, _preload_modules, _rawDebug, _startProfilerIdleNotifier, _stopProfilerIdleNotifier, _tickCallback, _disconnect, _handleQueue, _pendingMessage, _channel, _send, _linkedBinding, _process, process_default; +var init_process2 = __esm({ + "../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_hrtime(); + init_process(); + globalProcess = globalThis["process"]; + getBuiltinModule = globalProcess.getBuiltinModule; + ({ exit, platform, nextTick } = getBuiltinModule( + "node:process" + )); + unenvProcess = new Process({ + env: globalProcess.env, + hrtime, + nextTick + }); + ({ + abort, + addListener, + allowedNodeEnvironmentFlags, + hasUncaughtExceptionCaptureCallback, + setUncaughtExceptionCaptureCallback, + loadEnvFile, + sourceMapsEnabled, + arch, + argv, + argv0, + chdir, + config, + connected, + constrainedMemory, + availableMemory, + cpuUsage, + cwd, + debugPort, + dlopen, + disconnect, + emit, + emitWarning, + env, + eventNames, + execArgv, + execPath, + finalization, + features, + getActiveResourcesInfo, + getMaxListeners, + hrtime: hrtime3, + kill, + listeners, + listenerCount, + memoryUsage, + on, + off, + once, + pid, + ppid, + prependListener, + prependOnceListener, + rawListeners, + release, + removeAllListeners, + removeListener, + report, + resourceUsage, + setMaxListeners, + setSourceMapsEnabled, + stderr, + stdin, + stdout, + title, + throwDeprecation, + traceDeprecation, + umask, + uptime, + version, + versions, + domain, + initgroups, + moduleLoadList, + reallyExit, + openStdin, + assert: assert2, + binding, + send, + exitCode, + channel, + getegid, + geteuid, + getgid, + getgroups, + getuid, + setegid, + seteuid, + setgid, + setgroups, + setuid, + permission, + mainModule, + _events, + _eventsCount, + _exiting, + _maxListeners, + _debugEnd, + _debugProcess, + _fatalException, + _getActiveHandles, + _getActiveRequests, + _kill, + _preload_modules, + _rawDebug, + _startProfilerIdleNotifier, + _stopProfilerIdleNotifier, + _tickCallback, + _disconnect, + _handleQueue, + _pendingMessage, + _channel, + _send, + _linkedBinding + } = unenvProcess); + _process = { + abort, + addListener, + allowedNodeEnvironmentFlags, + hasUncaughtExceptionCaptureCallback, + setUncaughtExceptionCaptureCallback, + loadEnvFile, + sourceMapsEnabled, + arch, + argv, + argv0, + chdir, + config, + connected, + constrainedMemory, + availableMemory, + cpuUsage, + cwd, + debugPort, + dlopen, + disconnect, + emit, + emitWarning, + env, + eventNames, + execArgv, + execPath, + exit, + finalization, + features, + getBuiltinModule, + getActiveResourcesInfo, + getMaxListeners, + hrtime: hrtime3, + kill, + listeners, + listenerCount, + memoryUsage, + nextTick, + on, + off, + once, + pid, + platform, + ppid, + prependListener, + prependOnceListener, + rawListeners, + release, + removeAllListeners, + removeListener, + report, + resourceUsage, + setMaxListeners, + setSourceMapsEnabled, + stderr, + stdin, + stdout, + title, + throwDeprecation, + traceDeprecation, + umask, + uptime, + version, + versions, + // @ts-expect-error old API + domain, + initgroups, + moduleLoadList, + reallyExit, + openStdin, + assert: assert2, + binding, + send, + exitCode, + channel, + getegid, + geteuid, + getgid, + getgroups, + getuid, + setegid, + seteuid, + setgid, + setgroups, + setuid, + permission, + mainModule, + _events, + _eventsCount, + _exiting, + _maxListeners, + _debugEnd, + _debugProcess, + _fatalException, + _getActiveHandles, + _getActiveRequests, + _kill, + _preload_modules, + _rawDebug, + _startProfilerIdleNotifier, + _stopProfilerIdleNotifier, + _tickCallback, + _disconnect, + _handleQueue, + _pendingMessage, + _channel, + _send, + _linkedBinding + }; + process_default = _process; + } +}); + +// ../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-process +var init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process = __esm({ + "../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-process"() { + init_process2(); + globalThis.process = process_default; + } +}); + +// wrangler-modules-watch:wrangler:modules-watch +var init_wrangler_modules_watch = __esm({ + "wrangler-modules-watch:wrangler:modules-watch"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/wrangler/templates/modules-watch-stub.js +var init_modules_watch_stub = __esm({ + "../../node_modules/wrangler/templates/modules-watch-stub.js"() { + init_wrangler_modules_watch(); + } +}); + +// ../../node_modules/hono/dist/compose.js +var compose; +var init_compose = __esm({ + "../../node_modules/hono/dist/compose.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + compose = /* @__PURE__ */ __name((middleware2, onError, onNotFound) => { + return (context2, next) => { + let index = -1; + return dispatch(0); + async function dispatch(i2) { + if (i2 <= index) { + throw new Error("next() called multiple times"); + } + index = i2; + let res; + let isError = false; + let handler; + if (middleware2[i2]) { + handler = middleware2[i2][0][0]; + context2.req.routeIndex = i2; + } else { + handler = i2 === middleware2.length && next || void 0; + } + if (handler) { + try { + res = await handler(context2, () => dispatch(i2 + 1)); + } catch (err) { + if (err instanceof Error && onError) { + context2.error = err; + res = await onError(err, context2); + isError = true; + } else { + throw err; + } + } + } else { + if (context2.finalized === false && onNotFound) { + res = await onNotFound(context2); + } + } + if (res && (context2.finalized === false || isError)) { + context2.res = res; + } + return context2; + } + __name(dispatch, "dispatch"); + }; + }, "compose"); + } +}); + +// ../../node_modules/hono/dist/http-exception.js +var init_http_exception = __esm({ + "../../node_modules/hono/dist/http-exception.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/hono/dist/request/constants.js +var GET_MATCH_RESULT; +var init_constants = __esm({ + "../../node_modules/hono/dist/request/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + GET_MATCH_RESULT = /* @__PURE__ */ Symbol(); + } +}); + +// ../../node_modules/hono/dist/utils/body.js +async function parseFormData(request, options) { + const formData = await request.formData(); + if (formData) { + return convertFormDataToBodyData(formData, options); + } + return {}; +} +function convertFormDataToBodyData(formData, options) { + const form = /* @__PURE__ */ Object.create(null); + formData.forEach((value, key) => { + const shouldParseAllValues = options.all || key.endsWith("[]"); + if (!shouldParseAllValues) { + form[key] = value; + } else { + handleParsingAllValues(form, key, value); + } + }); + if (options.dot) { + Object.entries(form).forEach(([key, value]) => { + const shouldParseDotValues = key.includes("."); + if (shouldParseDotValues) { + handleParsingNestedValues(form, key, value); + delete form[key]; + } + }); + } + return form; +} +var parseBody, handleParsingAllValues, handleParsingNestedValues; +var init_body = __esm({ + "../../node_modules/hono/dist/utils/body.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_request(); + parseBody = /* @__PURE__ */ __name(async (request, options = /* @__PURE__ */ Object.create(null)) => { + const { all: all3 = false, dot = false } = options; + const headers = request instanceof HonoRequest ? request.raw.headers : request.headers; + const contentType = headers.get("Content-Type"); + if (contentType?.startsWith("multipart/form-data") || contentType?.startsWith("application/x-www-form-urlencoded")) { + return parseFormData(request, { all: all3, dot }); + } + return {}; + }, "parseBody"); + __name(parseFormData, "parseFormData"); + __name(convertFormDataToBodyData, "convertFormDataToBodyData"); + handleParsingAllValues = /* @__PURE__ */ __name((form, key, value) => { + if (form[key] !== void 0) { + if (Array.isArray(form[key])) { + ; + form[key].push(value); + } else { + form[key] = [form[key], value]; + } + } else { + if (!key.endsWith("[]")) { + form[key] = value; + } else { + form[key] = [value]; + } + } + }, "handleParsingAllValues"); + handleParsingNestedValues = /* @__PURE__ */ __name((form, key, value) => { + if (/(?:^|\.)__proto__\./.test(key)) { + return; + } + let nestedForm = form; + const keys = key.split("."); + keys.forEach((key2, index) => { + if (index === keys.length - 1) { + nestedForm[key2] = value; + } else { + if (!nestedForm[key2] || typeof nestedForm[key2] !== "object" || Array.isArray(nestedForm[key2]) || nestedForm[key2] instanceof File) { + nestedForm[key2] = /* @__PURE__ */ Object.create(null); + } + nestedForm = nestedForm[key2]; + } + }); + }, "handleParsingNestedValues"); + } +}); + +// ../../node_modules/hono/dist/utils/url.js +var splitPath, splitRoutingPath, extractGroupsFromPath, replaceGroupMarks, patternCache, getPattern, tryDecode, tryDecodeURI, getPath, getPathNoStrict, mergePath, checkOptionalParameter, _decodeURI, _getQueryParam, getQueryParam, getQueryParams, decodeURIComponent_; +var init_url = __esm({ + "../../node_modules/hono/dist/utils/url.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + splitPath = /* @__PURE__ */ __name((path) => { + const paths = path.split("/"); + if (paths[0] === "") { + paths.shift(); + } + return paths; + }, "splitPath"); + splitRoutingPath = /* @__PURE__ */ __name((routePath2) => { + const { groups, path } = extractGroupsFromPath(routePath2); + const paths = splitPath(path); + return replaceGroupMarks(paths, groups); + }, "splitRoutingPath"); + extractGroupsFromPath = /* @__PURE__ */ __name((path) => { + const groups = []; + path = path.replace(/\{[^}]+\}/g, (match2, index) => { + const mark = `@${index}`; + groups.push([mark, match2]); + return mark; + }); + return { groups, path }; + }, "extractGroupsFromPath"); + replaceGroupMarks = /* @__PURE__ */ __name((paths, groups) => { + for (let i2 = groups.length - 1; i2 >= 0; i2--) { + const [mark] = groups[i2]; + for (let j2 = paths.length - 1; j2 >= 0; j2--) { + if (paths[j2].includes(mark)) { + paths[j2] = paths[j2].replace(mark, groups[i2][1]); + break; + } + } + } + return paths; + }, "replaceGroupMarks"); + patternCache = {}; + getPattern = /* @__PURE__ */ __name((label, next) => { + if (label === "*") { + return "*"; + } + const match2 = label.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/); + if (match2) { + const cacheKey = `${label}#${next}`; + if (!patternCache[cacheKey]) { + if (match2[2]) { + patternCache[cacheKey] = next && next[0] !== ":" && next[0] !== "*" ? [cacheKey, match2[1], new RegExp(`^${match2[2]}(?=/${next})`)] : [label, match2[1], new RegExp(`^${match2[2]}$`)]; + } else { + patternCache[cacheKey] = [label, match2[1], true]; + } + } + return patternCache[cacheKey]; + } + return null; + }, "getPattern"); + tryDecode = /* @__PURE__ */ __name((str, decoder2) => { + try { + return decoder2(str); + } catch { + return str.replace(/(?:%[0-9A-Fa-f]{2})+/g, (match2) => { + try { + return decoder2(match2); + } catch { + return match2; + } + }); + } + }, "tryDecode"); + tryDecodeURI = /* @__PURE__ */ __name((str) => tryDecode(str, decodeURI), "tryDecodeURI"); + getPath = /* @__PURE__ */ __name((request) => { + const url2 = request.url; + const start = url2.indexOf("/", url2.indexOf(":") + 4); + let i2 = start; + for (; i2 < url2.length; i2++) { + const charCode = url2.charCodeAt(i2); + if (charCode === 37) { + const queryIndex = url2.indexOf("?", i2); + const hashIndex = url2.indexOf("#", i2); + const end = queryIndex === -1 ? hashIndex === -1 ? void 0 : hashIndex : hashIndex === -1 ? queryIndex : Math.min(queryIndex, hashIndex); + const path = url2.slice(start, end); + return tryDecodeURI(path.includes("%25") ? path.replace(/%25/g, "%2525") : path); + } else if (charCode === 63 || charCode === 35) { + break; + } + } + return url2.slice(start, i2); + }, "getPath"); + getPathNoStrict = /* @__PURE__ */ __name((request) => { + const result = getPath(request); + return result.length > 1 && result.at(-1) === "/" ? result.slice(0, -1) : result; + }, "getPathNoStrict"); + mergePath = /* @__PURE__ */ __name((base, sub, ...rest) => { + if (rest.length) { + sub = mergePath(sub, ...rest); + } + return `${base?.[0] === "/" ? "" : "/"}${base}${sub === "/" ? "" : `${base?.at(-1) === "/" ? "" : "/"}${sub?.[0] === "/" ? sub.slice(1) : sub}`}`; + }, "mergePath"); + checkOptionalParameter = /* @__PURE__ */ __name((path) => { + if (path.charCodeAt(path.length - 1) !== 63 || !path.includes(":")) { + return null; + } + const segments = path.split("/"); + const results = []; + let basePath = ""; + segments.forEach((segment) => { + if (segment !== "" && !/\:/.test(segment)) { + basePath += "/" + segment; + } else if (/\:/.test(segment)) { + if (/\?/.test(segment)) { + if (results.length === 0 && basePath === "") { + results.push("/"); + } else { + results.push(basePath); + } + const optionalSegment = segment.replace("?", ""); + basePath += "/" + optionalSegment; + results.push(basePath); + } else { + basePath += "/" + segment; + } + } + }); + return results.filter((v3, i2, a2) => a2.indexOf(v3) === i2); + }, "checkOptionalParameter"); + _decodeURI = /* @__PURE__ */ __name((value) => { + if (!/[%+]/.test(value)) { + return value; + } + if (value.indexOf("+") !== -1) { + value = value.replace(/\+/g, " "); + } + return value.indexOf("%") !== -1 ? tryDecode(value, decodeURIComponent_) : value; + }, "_decodeURI"); + _getQueryParam = /* @__PURE__ */ __name((url2, key, multiple) => { + let encoded; + if (!multiple && key && !/[%+]/.test(key)) { + let keyIndex2 = url2.indexOf("?", 8); + if (keyIndex2 === -1) { + return void 0; + } + if (!url2.startsWith(key, keyIndex2 + 1)) { + keyIndex2 = url2.indexOf(`&${key}`, keyIndex2 + 1); + } + while (keyIndex2 !== -1) { + const trailingKeyCode = url2.charCodeAt(keyIndex2 + key.length + 1); + if (trailingKeyCode === 61) { + const valueIndex = keyIndex2 + key.length + 2; + const endIndex = url2.indexOf("&", valueIndex); + return _decodeURI(url2.slice(valueIndex, endIndex === -1 ? void 0 : endIndex)); + } else if (trailingKeyCode == 38 || isNaN(trailingKeyCode)) { + return ""; + } + keyIndex2 = url2.indexOf(`&${key}`, keyIndex2 + 1); + } + encoded = /[%+]/.test(url2); + if (!encoded) { + return void 0; + } + } + const results = {}; + encoded ??= /[%+]/.test(url2); + let keyIndex = url2.indexOf("?", 8); + while (keyIndex !== -1) { + const nextKeyIndex = url2.indexOf("&", keyIndex + 1); + let valueIndex = url2.indexOf("=", keyIndex); + if (valueIndex > nextKeyIndex && nextKeyIndex !== -1) { + valueIndex = -1; + } + let name = url2.slice( + keyIndex + 1, + valueIndex === -1 ? nextKeyIndex === -1 ? void 0 : nextKeyIndex : valueIndex + ); + if (encoded) { + name = _decodeURI(name); + } + keyIndex = nextKeyIndex; + if (name === "") { + continue; + } + let value; + if (valueIndex === -1) { + value = ""; + } else { + value = url2.slice(valueIndex + 1, nextKeyIndex === -1 ? void 0 : nextKeyIndex); + if (encoded) { + value = _decodeURI(value); + } + } + if (multiple) { + if (!(results[name] && Array.isArray(results[name]))) { + results[name] = []; + } + ; + results[name].push(value); + } else { + results[name] ??= value; + } + } + return key ? results[key] : results; + }, "_getQueryParam"); + getQueryParam = _getQueryParam; + getQueryParams = /* @__PURE__ */ __name((url2, key) => { + return _getQueryParam(url2, key, true); + }, "getQueryParams"); + decodeURIComponent_ = decodeURIComponent; + } +}); + +// ../../node_modules/hono/dist/request.js +var tryDecodeURIComponent, HonoRequest; +var init_request = __esm({ + "../../node_modules/hono/dist/request.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_http_exception(); + init_constants(); + init_body(); + init_url(); + tryDecodeURIComponent = /* @__PURE__ */ __name((str) => tryDecode(str, decodeURIComponent_), "tryDecodeURIComponent"); + HonoRequest = /* @__PURE__ */ __name(class { + /** + * `.raw` can get the raw Request object. + * + * @see {@link https://hono.dev/docs/api/request#raw} + * + * @example + * ```ts + * // For Cloudflare Workers + * app.post('/', async (c) => { + * const metadata = c.req.raw.cf?.hostMetadata? + * ... + * }) + * ``` + */ + raw; + #validatedData; + // Short name of validatedData + #matchResult; + routeIndex = 0; + /** + * `.path` can get the pathname of the request. + * + * @see {@link https://hono.dev/docs/api/request#path} + * + * @example + * ```ts + * app.get('/about/me', (c) => { + * const pathname = c.req.path // `/about/me` + * }) + * ``` + */ + path; + bodyCache = {}; + constructor(request, path = "/", matchResult = [[]]) { + this.raw = request; + this.path = path; + this.#matchResult = matchResult; + this.#validatedData = {}; + } + param(key) { + return key ? this.#getDecodedParam(key) : this.#getAllDecodedParams(); + } + #getDecodedParam(key) { + const paramKey = this.#matchResult[0][this.routeIndex][1][key]; + const param = this.#getParamValue(paramKey); + return param && /\%/.test(param) ? tryDecodeURIComponent(param) : param; + } + #getAllDecodedParams() { + const decoded = {}; + const keys = Object.keys(this.#matchResult[0][this.routeIndex][1]); + for (const key of keys) { + const value = this.#getParamValue(this.#matchResult[0][this.routeIndex][1][key]); + if (value !== void 0) { + decoded[key] = /\%/.test(value) ? tryDecodeURIComponent(value) : value; + } + } + return decoded; + } + #getParamValue(paramKey) { + return this.#matchResult[1] ? this.#matchResult[1][paramKey] : paramKey; + } + query(key) { + return getQueryParam(this.url, key); + } + queries(key) { + return getQueryParams(this.url, key); + } + header(name) { + if (name) { + return this.raw.headers.get(name) ?? void 0; + } + const headerData = {}; + this.raw.headers.forEach((value, key) => { + headerData[key] = value; + }); + return headerData; + } + async parseBody(options) { + return parseBody(this, options); + } + #cachedBody = (key) => { + const { bodyCache, raw: raw2 } = this; + const cachedBody = bodyCache[key]; + if (cachedBody) { + return cachedBody; + } + const anyCachedKey = Object.keys(bodyCache)[0]; + if (anyCachedKey) { + return bodyCache[anyCachedKey].then((body) => { + if (anyCachedKey === "json") { + body = JSON.stringify(body); + } + return new Response(body)[key](); + }); + } + return bodyCache[key] = raw2[key](); + }; + /** + * `.json()` can parse Request body of type `application/json` + * + * @see {@link https://hono.dev/docs/api/request#json} + * + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.json() + * }) + * ``` + */ + json() { + return this.#cachedBody("text").then((text2) => JSON.parse(text2)); + } + /** + * `.text()` can parse Request body of type `text/plain` + * + * @see {@link https://hono.dev/docs/api/request#text} + * + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.text() + * }) + * ``` + */ + text() { + return this.#cachedBody("text"); + } + /** + * `.arrayBuffer()` parse Request body as an `ArrayBuffer` + * + * @see {@link https://hono.dev/docs/api/request#arraybuffer} + * + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.arrayBuffer() + * }) + * ``` + */ + arrayBuffer() { + return this.#cachedBody("arrayBuffer"); + } + /** + * Parses the request body as a `Blob`. + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.blob(); + * }); + * ``` + * @see https://hono.dev/docs/api/request#blob + */ + blob() { + return this.#cachedBody("blob"); + } + /** + * Parses the request body as `FormData`. + * @example + * ```ts + * app.post('/entry', async (c) => { + * const body = await c.req.formData(); + * }); + * ``` + * @see https://hono.dev/docs/api/request#formdata + */ + formData() { + return this.#cachedBody("formData"); + } + /** + * Adds validated data to the request. + * + * @param target - The target of the validation. + * @param data - The validated data to add. + */ + addValidatedData(target, data) { + this.#validatedData[target] = data; + } + valid(target) { + return this.#validatedData[target]; + } + /** + * `.url()` can get the request url strings. + * + * @see {@link https://hono.dev/docs/api/request#url} + * + * @example + * ```ts + * app.get('/about/me', (c) => { + * const url = c.req.url // `http://localhost:8787/about/me` + * ... + * }) + * ``` + */ + get url() { + return this.raw.url; + } + /** + * `.method()` can get the method name of the request. + * + * @see {@link https://hono.dev/docs/api/request#method} + * + * @example + * ```ts + * app.get('/about/me', (c) => { + * const method = c.req.method // `GET` + * }) + * ``` + */ + get method() { + return this.raw.method; + } + get [GET_MATCH_RESULT]() { + return this.#matchResult; + } + /** + * `.matchedRoutes()` can return a matched route in the handler + * + * @deprecated + * + * Use matchedRoutes helper defined in "hono/route" instead. + * + * @see {@link https://hono.dev/docs/api/request#matchedroutes} + * + * @example + * ```ts + * app.use('*', async function logger(c, next) { + * await next() + * c.req.matchedRoutes.forEach(({ handler, method, path }, i) => { + * const name = handler.name || (handler.length < 2 ? '[handler]' : '[middleware]') + * console.log( + * method, + * ' ', + * path, + * ' '.repeat(Math.max(10 - path.length, 0)), + * name, + * i === c.req.routeIndex ? '<- respond from here' : '' + * ) + * }) + * }) + * ``` + */ + get matchedRoutes() { + return this.#matchResult[0].map(([[, route]]) => route); + } + /** + * `routePath()` can retrieve the path registered within the handler + * + * @deprecated + * + * Use routePath helper defined in "hono/route" instead. + * + * @see {@link https://hono.dev/docs/api/request#routepath} + * + * @example + * ```ts + * app.get('/posts/:id', (c) => { + * return c.json({ path: c.req.routePath }) + * }) + * ``` + */ + get routePath() { + return this.#matchResult[0].map(([[, route]]) => route)[this.routeIndex].path; + } + }, "HonoRequest"); + } +}); + +// ../../node_modules/hono/dist/utils/html.js +var HtmlEscapedCallbackPhase, raw, resolveCallback; +var init_html = __esm({ + "../../node_modules/hono/dist/utils/html.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + HtmlEscapedCallbackPhase = { + Stringify: 1, + BeforeStream: 2, + Stream: 3 + }; + raw = /* @__PURE__ */ __name((value, callbacks) => { + const escapedString = new String(value); + escapedString.isEscaped = true; + escapedString.callbacks = callbacks; + return escapedString; + }, "raw"); + resolveCallback = /* @__PURE__ */ __name(async (str, phase, preserveCallbacks, context2, buffer) => { + if (typeof str === "object" && !(str instanceof String)) { + if (!(str instanceof Promise)) { + str = str.toString(); + } + if (str instanceof Promise) { + str = await str; + } + } + const callbacks = str.callbacks; + if (!callbacks?.length) { + return Promise.resolve(str); + } + if (buffer) { + buffer[0] += str; + } else { + buffer = [str]; + } + const resStr = Promise.all(callbacks.map((c2) => c2({ phase, buffer, context: context2 }))).then( + (res) => Promise.all( + res.filter(Boolean).map((str2) => resolveCallback(str2, phase, false, context2, buffer)) + ).then(() => buffer[0]) + ); + if (preserveCallbacks) { + return raw(await resStr, callbacks); + } else { + return resStr; + } + }, "resolveCallback"); + } +}); + +// ../../node_modules/hono/dist/context.js +var TEXT_PLAIN, setDefaultContentType, createResponseInstance, Context; +var init_context = __esm({ + "../../node_modules/hono/dist/context.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_request(); + init_html(); + TEXT_PLAIN = "text/plain; charset=UTF-8"; + setDefaultContentType = /* @__PURE__ */ __name((contentType, headers) => { + return { + "Content-Type": contentType, + ...headers + }; + }, "setDefaultContentType"); + createResponseInstance = /* @__PURE__ */ __name((body, init) => new Response(body, init), "createResponseInstance"); + Context = /* @__PURE__ */ __name(class { + #rawRequest; + #req; + /** + * `.env` can get bindings (environment variables, secrets, KV namespaces, D1 database, R2 bucket etc.) in Cloudflare Workers. + * + * @see {@link https://hono.dev/docs/api/context#env} + * + * @example + * ```ts + * // Environment object for Cloudflare Workers + * app.get('*', async c => { + * const counter = c.env.COUNTER + * }) + * ``` + */ + env = {}; + #var; + finalized = false; + /** + * `.error` can get the error object from the middleware if the Handler throws an error. + * + * @see {@link https://hono.dev/docs/api/context#error} + * + * @example + * ```ts + * app.use('*', async (c, next) => { + * await next() + * if (c.error) { + * // do something... + * } + * }) + * ``` + */ + error; + #status; + #executionCtx; + #res; + #layout; + #renderer; + #notFoundHandler; + #preparedHeaders; + #matchResult; + #path; + /** + * Creates an instance of the Context class. + * + * @param req - The Request object. + * @param options - Optional configuration options for the context. + */ + constructor(req, options) { + this.#rawRequest = req; + if (options) { + this.#executionCtx = options.executionCtx; + this.env = options.env; + this.#notFoundHandler = options.notFoundHandler; + this.#path = options.path; + this.#matchResult = options.matchResult; + } + } + /** + * `.req` is the instance of {@link HonoRequest}. + */ + get req() { + this.#req ??= new HonoRequest(this.#rawRequest, this.#path, this.#matchResult); + return this.#req; + } + /** + * @see {@link https://hono.dev/docs/api/context#event} + * The FetchEvent associated with the current request. + * + * @throws Will throw an error if the context does not have a FetchEvent. + */ + get event() { + if (this.#executionCtx && "respondWith" in this.#executionCtx) { + return this.#executionCtx; + } else { + throw Error("This context has no FetchEvent"); + } + } + /** + * @see {@link https://hono.dev/docs/api/context#executionctx} + * The ExecutionContext associated with the current request. + * + * @throws Will throw an error if the context does not have an ExecutionContext. + */ + get executionCtx() { + if (this.#executionCtx) { + return this.#executionCtx; + } else { + throw Error("This context has no ExecutionContext"); + } + } + /** + * @see {@link https://hono.dev/docs/api/context#res} + * The Response object for the current request. + */ + get res() { + return this.#res ||= createResponseInstance(null, { + headers: this.#preparedHeaders ??= new Headers() + }); + } + /** + * Sets the Response object for the current request. + * + * @param _res - The Response object to set. + */ + set res(_res) { + if (this.#res && _res) { + _res = createResponseInstance(_res.body, _res); + for (const [k2, v3] of this.#res.headers.entries()) { + if (k2 === "content-type") { + continue; + } + if (k2 === "set-cookie") { + const cookies = this.#res.headers.getSetCookie(); + _res.headers.delete("set-cookie"); + for (const cookie of cookies) { + _res.headers.append("set-cookie", cookie); + } + } else { + _res.headers.set(k2, v3); + } + } + } + this.#res = _res; + this.finalized = true; + } + /** + * `.render()` can create a response within a layout. + * + * @see {@link https://hono.dev/docs/api/context#render-setrenderer} + * + * @example + * ```ts + * app.get('/', (c) => { + * return c.render('Hello!') + * }) + * ``` + */ + render = (...args) => { + this.#renderer ??= (content) => this.html(content); + return this.#renderer(...args); + }; + /** + * Sets the layout for the response. + * + * @param layout - The layout to set. + * @returns The layout function. + */ + setLayout = (layout) => this.#layout = layout; + /** + * Gets the current layout for the response. + * + * @returns The current layout function. + */ + getLayout = () => this.#layout; + /** + * `.setRenderer()` can set the layout in the custom middleware. + * + * @see {@link https://hono.dev/docs/api/context#render-setrenderer} + * + * @example + * ```tsx + * app.use('*', async (c, next) => { + * c.setRenderer((content) => { + * return c.html( + * + * + *

{content}

+ * + * + * ) + * }) + * await next() + * }) + * ``` + */ + setRenderer = (renderer) => { + this.#renderer = renderer; + }; + /** + * `.header()` can set headers. + * + * @see {@link https://hono.dev/docs/api/context#header} + * + * @example + * ```ts + * app.get('/welcome', (c) => { + * // Set headers + * c.header('X-Message', 'Hello!') + * c.header('Content-Type', 'text/plain') + * + * return c.body('Thank you for coming') + * }) + * ``` + */ + header = (name, value, options) => { + if (this.finalized) { + this.#res = createResponseInstance(this.#res.body, this.#res); + } + const headers = this.#res ? this.#res.headers : this.#preparedHeaders ??= new Headers(); + if (value === void 0) { + headers.delete(name); + } else if (options?.append) { + headers.append(name, value); + } else { + headers.set(name, value); + } + }; + status = (status) => { + this.#status = status; + }; + /** + * `.set()` can set the value specified by the key. + * + * @see {@link https://hono.dev/docs/api/context#set-get} + * + * @example + * ```ts + * app.use('*', async (c, next) => { + * c.set('message', 'Hono is hot!!') + * await next() + * }) + * ``` + */ + set = (key, value) => { + this.#var ??= /* @__PURE__ */ new Map(); + this.#var.set(key, value); + }; + /** + * `.get()` can use the value specified by the key. + * + * @see {@link https://hono.dev/docs/api/context#set-get} + * + * @example + * ```ts + * app.get('/', (c) => { + * const message = c.get('message') + * return c.text(`The message is "${message}"`) + * }) + * ``` + */ + get = (key) => { + return this.#var ? this.#var.get(key) : void 0; + }; + /** + * `.var` can access the value of a variable. + * + * @see {@link https://hono.dev/docs/api/context#var} + * + * @example + * ```ts + * const result = c.var.client.oneMethod() + * ``` + */ + // c.var.propName is a read-only + get var() { + if (!this.#var) { + return {}; + } + return Object.fromEntries(this.#var); + } + #newResponse(data, arg, headers) { + const responseHeaders = this.#res ? new Headers(this.#res.headers) : this.#preparedHeaders ?? new Headers(); + if (typeof arg === "object" && "headers" in arg) { + const argHeaders = arg.headers instanceof Headers ? arg.headers : new Headers(arg.headers); + for (const [key, value] of argHeaders) { + if (key.toLowerCase() === "set-cookie") { + responseHeaders.append(key, value); + } else { + responseHeaders.set(key, value); + } + } + } + if (headers) { + for (const [k2, v3] of Object.entries(headers)) { + if (typeof v3 === "string") { + responseHeaders.set(k2, v3); + } else { + responseHeaders.delete(k2); + for (const v22 of v3) { + responseHeaders.append(k2, v22); + } + } + } + } + const status = typeof arg === "number" ? arg : arg?.status ?? this.#status; + return createResponseInstance(data, { status, headers: responseHeaders }); + } + newResponse = (...args) => this.#newResponse(...args); + /** + * `.body()` can return the HTTP response. + * You can set headers with `.header()` and set HTTP status code with `.status`. + * This can also be set in `.text()`, `.json()` and so on. + * + * @see {@link https://hono.dev/docs/api/context#body} + * + * @example + * ```ts + * app.get('/welcome', (c) => { + * // Set headers + * c.header('X-Message', 'Hello!') + * c.header('Content-Type', 'text/plain') + * // Set HTTP status code + * c.status(201) + * + * // Return the response body + * return c.body('Thank you for coming') + * }) + * ``` + */ + body = (data, arg, headers) => this.#newResponse(data, arg, headers); + /** + * `.text()` can render text as `Content-Type:text/plain`. + * + * @see {@link https://hono.dev/docs/api/context#text} + * + * @example + * ```ts + * app.get('/say', (c) => { + * return c.text('Hello!') + * }) + * ``` + */ + text = (text2, arg, headers) => { + return !this.#preparedHeaders && !this.#status && !arg && !headers && !this.finalized ? new Response(text2) : this.#newResponse( + text2, + arg, + setDefaultContentType(TEXT_PLAIN, headers) + ); + }; + /** + * `.json()` can render JSON as `Content-Type:application/json`. + * + * @see {@link https://hono.dev/docs/api/context#json} + * + * @example + * ```ts + * app.get('/api', (c) => { + * return c.json({ message: 'Hello!' }) + * }) + * ``` + */ + json = (object2, arg, headers) => { + return this.#newResponse( + JSON.stringify(object2), + arg, + setDefaultContentType("application/json", headers) + ); + }; + html = (html, arg, headers) => { + const res = /* @__PURE__ */ __name((html2) => this.#newResponse(html2, arg, setDefaultContentType("text/html; charset=UTF-8", headers)), "res"); + return typeof html === "object" ? resolveCallback(html, HtmlEscapedCallbackPhase.Stringify, false, {}).then(res) : res(html); + }; + /** + * `.redirect()` can Redirect, default status code is 302. + * + * @see {@link https://hono.dev/docs/api/context#redirect} + * + * @example + * ```ts + * app.get('/redirect', (c) => { + * return c.redirect('/') + * }) + * app.get('/redirect-permanently', (c) => { + * return c.redirect('/', 301) + * }) + * ``` + */ + redirect = (location, status) => { + const locationString = String(location); + this.header( + "Location", + // Multibyes should be encoded + // eslint-disable-next-line no-control-regex + !/[^\x00-\xFF]/.test(locationString) ? locationString : encodeURI(locationString) + ); + return this.newResponse(null, status ?? 302); + }; + /** + * `.notFound()` can return the Not Found Response. + * + * @see {@link https://hono.dev/docs/api/context#notfound} + * + * @example + * ```ts + * app.get('/notfound', (c) => { + * return c.notFound() + * }) + * ``` + */ + notFound = () => { + this.#notFoundHandler ??= () => createResponseInstance(); + return this.#notFoundHandler(this); + }; + }, "Context"); + } +}); + +// ../../node_modules/hono/dist/router.js +var METHOD_NAME_ALL, METHOD_NAME_ALL_LOWERCASE, METHODS, MESSAGE_MATCHER_IS_ALREADY_BUILT, UnsupportedPathError; +var init_router = __esm({ + "../../node_modules/hono/dist/router.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + METHOD_NAME_ALL = "ALL"; + METHOD_NAME_ALL_LOWERCASE = "all"; + METHODS = ["get", "post", "put", "delete", "options", "patch"]; + MESSAGE_MATCHER_IS_ALREADY_BUILT = "Can not add a route since the matcher is already built."; + UnsupportedPathError = /* @__PURE__ */ __name(class extends Error { + }, "UnsupportedPathError"); + } +}); + +// ../../node_modules/hono/dist/utils/constants.js +var COMPOSED_HANDLER; +var init_constants2 = __esm({ + "../../node_modules/hono/dist/utils/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + COMPOSED_HANDLER = "__COMPOSED_HANDLER"; + } +}); + +// ../../node_modules/hono/dist/hono-base.js +var notFoundHandler, errorHandler, Hono; +var init_hono_base = __esm({ + "../../node_modules/hono/dist/hono-base.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_compose(); + init_context(); + init_router(); + init_constants2(); + init_url(); + notFoundHandler = /* @__PURE__ */ __name((c2) => { + return c2.text("404 Not Found", 404); + }, "notFoundHandler"); + errorHandler = /* @__PURE__ */ __name((err, c2) => { + if ("getResponse" in err) { + const res = err.getResponse(); + return c2.newResponse(res.body, res); + } + console.error(err); + return c2.text("Internal Server Error", 500); + }, "errorHandler"); + Hono = /* @__PURE__ */ __name(class _Hono { + get; + post; + put; + delete; + options; + patch; + all; + on; + use; + /* + This class is like an abstract class and does not have a router. + To use it, inherit the class and implement router in the constructor. + */ + router; + getPath; + // Cannot use `#` because it requires visibility at JavaScript runtime. + _basePath = "/"; + #path = "/"; + routes = []; + constructor(options = {}) { + const allMethods = [...METHODS, METHOD_NAME_ALL_LOWERCASE]; + allMethods.forEach((method) => { + this[method] = (args1, ...args) => { + if (typeof args1 === "string") { + this.#path = args1; + } else { + this.#addRoute(method, this.#path, args1); + } + args.forEach((handler) => { + this.#addRoute(method, this.#path, handler); + }); + return this; + }; + }); + this.on = (method, path, ...handlers2) => { + for (const p2 of [path].flat()) { + this.#path = p2; + for (const m2 of [method].flat()) { + handlers2.map((handler) => { + this.#addRoute(m2.toUpperCase(), this.#path, handler); + }); + } + } + return this; + }; + this.use = (arg1, ...handlers2) => { + if (typeof arg1 === "string") { + this.#path = arg1; + } else { + this.#path = "*"; + handlers2.unshift(arg1); + } + handlers2.forEach((handler) => { + this.#addRoute(METHOD_NAME_ALL, this.#path, handler); + }); + return this; + }; + const { strict, ...optionsWithoutStrict } = options; + Object.assign(this, optionsWithoutStrict); + this.getPath = strict ?? true ? options.getPath ?? getPath : getPathNoStrict; + } + #clone() { + const clone2 = new _Hono({ + router: this.router, + getPath: this.getPath + }); + clone2.errorHandler = this.errorHandler; + clone2.#notFoundHandler = this.#notFoundHandler; + clone2.routes = this.routes; + return clone2; + } + #notFoundHandler = notFoundHandler; + // Cannot use `#` because it requires visibility at JavaScript runtime. + errorHandler = errorHandler; + /** + * `.route()` allows grouping other Hono instance in routes. + * + * @see {@link https://hono.dev/docs/api/routing#grouping} + * + * @param {string} path - base Path + * @param {Hono} app - other Hono instance + * @returns {Hono} routed Hono instance + * + * @example + * ```ts + * const app = new Hono() + * const app2 = new Hono() + * + * app2.get("/user", (c) => c.text("user")) + * app.route("/api", app2) // GET /api/user + * ``` + */ + route(path, app) { + const subApp = this.basePath(path); + app.routes.map((r2) => { + let handler; + if (app.errorHandler === errorHandler) { + handler = r2.handler; + } else { + handler = /* @__PURE__ */ __name(async (c2, next) => (await compose([], app.errorHandler)(c2, () => r2.handler(c2, next))).res, "handler"); + handler[COMPOSED_HANDLER] = r2.handler; + } + subApp.#addRoute(r2.method, r2.path, handler); + }); + return this; + } + /** + * `.basePath()` allows base paths to be specified. + * + * @see {@link https://hono.dev/docs/api/routing#base-path} + * + * @param {string} path - base Path + * @returns {Hono} changed Hono instance + * + * @example + * ```ts + * const api = new Hono().basePath('/api') + * ``` + */ + basePath(path) { + const subApp = this.#clone(); + subApp._basePath = mergePath(this._basePath, path); + return subApp; + } + /** + * `.onError()` handles an error and returns a customized Response. + * + * @see {@link https://hono.dev/docs/api/hono#error-handling} + * + * @param {ErrorHandler} handler - request Handler for error + * @returns {Hono} changed Hono instance + * + * @example + * ```ts + * app.onError((err, c) => { + * console.error(`${err}`) + * return c.text('Custom Error Message', 500) + * }) + * ``` + */ + onError = (handler) => { + this.errorHandler = handler; + return this; + }; + /** + * `.notFound()` allows you to customize a Not Found Response. + * + * @see {@link https://hono.dev/docs/api/hono#not-found} + * + * @param {NotFoundHandler} handler - request handler for not-found + * @returns {Hono} changed Hono instance + * + * @example + * ```ts + * app.notFound((c) => { + * return c.text('Custom 404 Message', 404) + * }) + * ``` + */ + notFound = (handler) => { + this.#notFoundHandler = handler; + return this; + }; + /** + * `.mount()` allows you to mount applications built with other frameworks into your Hono application. + * + * @see {@link https://hono.dev/docs/api/hono#mount} + * + * @param {string} path - base Path + * @param {Function} applicationHandler - other Request Handler + * @param {MountOptions} [options] - options of `.mount()` + * @returns {Hono} mounted Hono instance + * + * @example + * ```ts + * import { Router as IttyRouter } from 'itty-router' + * import { Hono } from 'hono' + * // Create itty-router application + * const ittyRouter = IttyRouter() + * // GET /itty-router/hello + * ittyRouter.get('/hello', () => new Response('Hello from itty-router')) + * + * const app = new Hono() + * app.mount('/itty-router', ittyRouter.handle) + * ``` + * + * @example + * ```ts + * const app = new Hono() + * // Send the request to another application without modification. + * app.mount('/app', anotherApp, { + * replaceRequest: (req) => req, + * }) + * ``` + */ + mount(path, applicationHandler, options) { + let replaceRequest; + let optionHandler; + if (options) { + if (typeof options === "function") { + optionHandler = options; + } else { + optionHandler = options.optionHandler; + if (options.replaceRequest === false) { + replaceRequest = /* @__PURE__ */ __name((request) => request, "replaceRequest"); + } else { + replaceRequest = options.replaceRequest; + } + } + } + const getOptions = optionHandler ? (c2) => { + const options2 = optionHandler(c2); + return Array.isArray(options2) ? options2 : [options2]; + } : (c2) => { + let executionContext = void 0; + try { + executionContext = c2.executionCtx; + } catch { + } + return [c2.env, executionContext]; + }; + replaceRequest ||= (() => { + const mergedPath = mergePath(this._basePath, path); + const pathPrefixLength = mergedPath === "/" ? 0 : mergedPath.length; + return (request) => { + const url2 = new URL(request.url); + url2.pathname = url2.pathname.slice(pathPrefixLength) || "/"; + return new Request(url2, request); + }; + })(); + const handler = /* @__PURE__ */ __name(async (c2, next) => { + const res = await applicationHandler(replaceRequest(c2.req.raw), ...getOptions(c2)); + if (res) { + return res; + } + await next(); + }, "handler"); + this.#addRoute(METHOD_NAME_ALL, mergePath(path, "*"), handler); + return this; + } + #addRoute(method, path, handler) { + method = method.toUpperCase(); + path = mergePath(this._basePath, path); + const r2 = { basePath: this._basePath, path, method, handler }; + this.router.add(method, path, [handler, r2]); + this.routes.push(r2); + } + #handleError(err, c2) { + if (err instanceof Error) { + return this.errorHandler(err, c2); + } + throw err; + } + #dispatch(request, executionCtx, env2, method) { + if (method === "HEAD") { + return (async () => new Response(null, await this.#dispatch(request, executionCtx, env2, "GET")))(); + } + const path = this.getPath(request, { env: env2 }); + const matchResult = this.router.match(method, path); + const c2 = new Context(request, { + path, + matchResult, + env: env2, + executionCtx, + notFoundHandler: this.#notFoundHandler + }); + if (matchResult[0].length === 1) { + let res; + try { + res = matchResult[0][0][0][0](c2, async () => { + c2.res = await this.#notFoundHandler(c2); + }); + } catch (err) { + return this.#handleError(err, c2); + } + return res instanceof Promise ? res.then( + (resolved) => resolved || (c2.finalized ? c2.res : this.#notFoundHandler(c2)) + ).catch((err) => this.#handleError(err, c2)) : res ?? this.#notFoundHandler(c2); + } + const composed = compose(matchResult[0], this.errorHandler, this.#notFoundHandler); + return (async () => { + try { + const context2 = await composed(c2); + if (!context2.finalized) { + throw new Error( + "Context is not finalized. Did you forget to return a Response object or `await next()`?" + ); + } + return context2.res; + } catch (err) { + return this.#handleError(err, c2); + } + })(); + } + /** + * `.fetch()` will be entry point of your app. + * + * @see {@link https://hono.dev/docs/api/hono#fetch} + * + * @param {Request} request - request Object of request + * @param {Env} Env - env Object + * @param {ExecutionContext} - context of execution + * @returns {Response | Promise} response of request + * + */ + fetch = (request, ...rest) => { + return this.#dispatch(request, rest[1], rest[0], request.method); + }; + /** + * `.request()` is a useful method for testing. + * You can pass a URL or pathname to send a GET request. + * app will return a Response object. + * ```ts + * test('GET /hello is ok', async () => { + * const res = await app.request('/hello') + * expect(res.status).toBe(200) + * }) + * ``` + * @see https://hono.dev/docs/api/hono#request + */ + request = (input, requestInit, Env, executionCtx) => { + if (input instanceof Request) { + return this.fetch(requestInit ? new Request(input, requestInit) : input, Env, executionCtx); + } + input = input.toString(); + return this.fetch( + new Request( + /^https?:\/\//.test(input) ? input : `http://localhost${mergePath("/", input)}`, + requestInit + ), + Env, + executionCtx + ); + }; + /** + * `.fire()` automatically adds a global fetch event listener. + * This can be useful for environments that adhere to the Service Worker API, such as non-ES module Cloudflare Workers. + * @deprecated + * Use `fire` from `hono/service-worker` instead. + * ```ts + * import { Hono } from 'hono' + * import { fire } from 'hono/service-worker' + * + * const app = new Hono() + * // ... + * fire(app) + * ``` + * @see https://hono.dev/docs/api/hono#fire + * @see https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API + * @see https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/ + */ + fire = () => { + addEventListener("fetch", (event) => { + event.respondWith(this.#dispatch(event.request, event, void 0, event.request.method)); + }); + }; + }, "_Hono"); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/matcher.js +function match(method, path) { + const matchers = this.buildAllMatchers(); + const match2 = /* @__PURE__ */ __name((method2, path2) => { + const matcher = matchers[method2] || matchers[METHOD_NAME_ALL]; + const staticMatch = matcher[2][path2]; + if (staticMatch) { + return staticMatch; + } + const match3 = path2.match(matcher[0]); + if (!match3) { + return [[], emptyParam]; + } + const index = match3.indexOf("", 1); + return [matcher[1][index], match3]; + }, "match2"); + this.match = match2; + return match2(method, path); +} +var emptyParam; +var init_matcher = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/matcher.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router(); + emptyParam = []; + __name(match, "match"); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/node.js +function compareKey(a2, b2) { + if (a2.length === 1) { + return b2.length === 1 ? a2 < b2 ? -1 : 1 : -1; + } + if (b2.length === 1) { + return 1; + } + if (a2 === ONLY_WILDCARD_REG_EXP_STR || a2 === TAIL_WILDCARD_REG_EXP_STR) { + return 1; + } else if (b2 === ONLY_WILDCARD_REG_EXP_STR || b2 === TAIL_WILDCARD_REG_EXP_STR) { + return -1; + } + if (a2 === LABEL_REG_EXP_STR) { + return 1; + } else if (b2 === LABEL_REG_EXP_STR) { + return -1; + } + return a2.length === b2.length ? a2 < b2 ? -1 : 1 : b2.length - a2.length; +} +var LABEL_REG_EXP_STR, ONLY_WILDCARD_REG_EXP_STR, TAIL_WILDCARD_REG_EXP_STR, PATH_ERROR, regExpMetaChars, Node2; +var init_node = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/node.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + LABEL_REG_EXP_STR = "[^/]+"; + ONLY_WILDCARD_REG_EXP_STR = ".*"; + TAIL_WILDCARD_REG_EXP_STR = "(?:|/.*)"; + PATH_ERROR = /* @__PURE__ */ Symbol(); + regExpMetaChars = new Set(".\\+*[^]$()"); + __name(compareKey, "compareKey"); + Node2 = /* @__PURE__ */ __name(class _Node { + #index; + #varIndex; + #children = /* @__PURE__ */ Object.create(null); + insert(tokens, index, paramMap, context2, pathErrorCheckOnly) { + if (tokens.length === 0) { + if (this.#index !== void 0) { + throw PATH_ERROR; + } + if (pathErrorCheckOnly) { + return; + } + this.#index = index; + return; + } + const [token, ...restTokens] = tokens; + const pattern = token === "*" ? restTokens.length === 0 ? ["", "", ONLY_WILDCARD_REG_EXP_STR] : ["", "", LABEL_REG_EXP_STR] : token === "/*" ? ["", "", TAIL_WILDCARD_REG_EXP_STR] : token.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/); + let node; + if (pattern) { + const name = pattern[1]; + let regexpStr = pattern[2] || LABEL_REG_EXP_STR; + if (name && pattern[2]) { + if (regexpStr === ".*") { + throw PATH_ERROR; + } + regexpStr = regexpStr.replace(/^\((?!\?:)(?=[^)]+\)$)/, "(?:"); + if (/\((?!\?:)/.test(regexpStr)) { + throw PATH_ERROR; + } + } + node = this.#children[regexpStr]; + if (!node) { + if (Object.keys(this.#children).some( + (k2) => k2 !== ONLY_WILDCARD_REG_EXP_STR && k2 !== TAIL_WILDCARD_REG_EXP_STR + )) { + throw PATH_ERROR; + } + if (pathErrorCheckOnly) { + return; + } + node = this.#children[regexpStr] = new _Node(); + if (name !== "") { + node.#varIndex = context2.varIndex++; + } + } + if (!pathErrorCheckOnly && name !== "") { + paramMap.push([name, node.#varIndex]); + } + } else { + node = this.#children[token]; + if (!node) { + if (Object.keys(this.#children).some( + (k2) => k2.length > 1 && k2 !== ONLY_WILDCARD_REG_EXP_STR && k2 !== TAIL_WILDCARD_REG_EXP_STR + )) { + throw PATH_ERROR; + } + if (pathErrorCheckOnly) { + return; + } + node = this.#children[token] = new _Node(); + } + } + node.insert(restTokens, index, paramMap, context2, pathErrorCheckOnly); + } + buildRegExpStr() { + const childKeys = Object.keys(this.#children).sort(compareKey); + const strList = childKeys.map((k2) => { + const c2 = this.#children[k2]; + return (typeof c2.#varIndex === "number" ? `(${k2})@${c2.#varIndex}` : regExpMetaChars.has(k2) ? `\\${k2}` : k2) + c2.buildRegExpStr(); + }); + if (typeof this.#index === "number") { + strList.unshift(`#${this.#index}`); + } + if (strList.length === 0) { + return ""; + } + if (strList.length === 1) { + return strList[0]; + } + return "(?:" + strList.join("|") + ")"; + } + }, "_Node"); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/trie.js +var Trie; +var init_trie = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/trie.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_node(); + Trie = /* @__PURE__ */ __name(class { + #context = { varIndex: 0 }; + #root = new Node2(); + insert(path, index, pathErrorCheckOnly) { + const paramAssoc = []; + const groups = []; + for (let i2 = 0; ; ) { + let replaced = false; + path = path.replace(/\{[^}]+\}/g, (m2) => { + const mark = `@\\${i2}`; + groups[i2] = [mark, m2]; + i2++; + replaced = true; + return mark; + }); + if (!replaced) { + break; + } + } + const tokens = path.match(/(?::[^\/]+)|(?:\/\*$)|./g) || []; + for (let i2 = groups.length - 1; i2 >= 0; i2--) { + const [mark] = groups[i2]; + for (let j2 = tokens.length - 1; j2 >= 0; j2--) { + if (tokens[j2].indexOf(mark) !== -1) { + tokens[j2] = tokens[j2].replace(mark, groups[i2][1]); + break; + } + } + } + this.#root.insert(tokens, index, paramAssoc, this.#context, pathErrorCheckOnly); + return paramAssoc; + } + buildRegExp() { + let regexp = this.#root.buildRegExpStr(); + if (regexp === "") { + return [/^$/, [], []]; + } + let captureIndex = 0; + const indexReplacementMap = []; + const paramReplacementMap = []; + regexp = regexp.replace(/#(\d+)|@(\d+)|\.\*\$/g, (_, handlerIndex, paramIndex) => { + if (handlerIndex !== void 0) { + indexReplacementMap[++captureIndex] = Number(handlerIndex); + return "$()"; + } + if (paramIndex !== void 0) { + paramReplacementMap[Number(paramIndex)] = ++captureIndex; + return ""; + } + return ""; + }); + return [new RegExp(`^${regexp}`), indexReplacementMap, paramReplacementMap]; + } + }, "Trie"); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/router.js +function buildWildcardRegExp(path) { + return wildcardRegExpCache[path] ??= new RegExp( + path === "*" ? "" : `^${path.replace( + /\/\*$|([.\\+*[^\]$()])/g, + (_, metaChar) => metaChar ? `\\${metaChar}` : "(?:|/.*)" + )}$` + ); +} +function clearWildcardRegExpCache() { + wildcardRegExpCache = /* @__PURE__ */ Object.create(null); +} +function buildMatcherFromPreprocessedRoutes(routes) { + const trie = new Trie(); + const handlerData = []; + if (routes.length === 0) { + return nullMatcher; + } + const routesWithStaticPathFlag = routes.map( + (route) => [!/\*|\/:/.test(route[0]), ...route] + ).sort( + ([isStaticA, pathA], [isStaticB, pathB]) => isStaticA ? 1 : isStaticB ? -1 : pathA.length - pathB.length + ); + const staticMap = /* @__PURE__ */ Object.create(null); + for (let i2 = 0, j2 = -1, len = routesWithStaticPathFlag.length; i2 < len; i2++) { + const [pathErrorCheckOnly, path, handlers2] = routesWithStaticPathFlag[i2]; + if (pathErrorCheckOnly) { + staticMap[path] = [handlers2.map(([h2]) => [h2, /* @__PURE__ */ Object.create(null)]), emptyParam]; + } else { + j2++; + } + let paramAssoc; + try { + paramAssoc = trie.insert(path, j2, pathErrorCheckOnly); + } catch (e2) { + throw e2 === PATH_ERROR ? new UnsupportedPathError(path) : e2; + } + if (pathErrorCheckOnly) { + continue; + } + handlerData[j2] = handlers2.map(([h2, paramCount]) => { + const paramIndexMap = /* @__PURE__ */ Object.create(null); + paramCount -= 1; + for (; paramCount >= 0; paramCount--) { + const [key, value] = paramAssoc[paramCount]; + paramIndexMap[key] = value; + } + return [h2, paramIndexMap]; + }); + } + const [regexp, indexReplacementMap, paramReplacementMap] = trie.buildRegExp(); + for (let i2 = 0, len = handlerData.length; i2 < len; i2++) { + for (let j2 = 0, len2 = handlerData[i2].length; j2 < len2; j2++) { + const map2 = handlerData[i2][j2]?.[1]; + if (!map2) { + continue; + } + const keys = Object.keys(map2); + for (let k2 = 0, len3 = keys.length; k2 < len3; k2++) { + map2[keys[k2]] = paramReplacementMap[map2[keys[k2]]]; + } + } + } + const handlerMap = []; + for (const i2 in indexReplacementMap) { + handlerMap[i2] = handlerData[indexReplacementMap[i2]]; + } + return [regexp, handlerMap, staticMap]; +} +function findMiddleware(middleware2, path) { + if (!middleware2) { + return void 0; + } + for (const k2 of Object.keys(middleware2).sort((a2, b2) => b2.length - a2.length)) { + if (buildWildcardRegExp(k2).test(path)) { + return [...middleware2[k2]]; + } + } + return void 0; +} +var nullMatcher, wildcardRegExpCache, RegExpRouter; +var init_router2 = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/router.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router(); + init_url(); + init_matcher(); + init_node(); + init_trie(); + nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)]; + wildcardRegExpCache = /* @__PURE__ */ Object.create(null); + __name(buildWildcardRegExp, "buildWildcardRegExp"); + __name(clearWildcardRegExpCache, "clearWildcardRegExpCache"); + __name(buildMatcherFromPreprocessedRoutes, "buildMatcherFromPreprocessedRoutes"); + __name(findMiddleware, "findMiddleware"); + RegExpRouter = /* @__PURE__ */ __name(class { + name = "RegExpRouter"; + #middleware; + #routes; + constructor() { + this.#middleware = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) }; + this.#routes = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) }; + } + add(method, path, handler) { + const middleware2 = this.#middleware; + const routes = this.#routes; + if (!middleware2 || !routes) { + throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT); + } + if (!middleware2[method]) { + ; + [middleware2, routes].forEach((handlerMap) => { + handlerMap[method] = /* @__PURE__ */ Object.create(null); + Object.keys(handlerMap[METHOD_NAME_ALL]).forEach((p2) => { + handlerMap[method][p2] = [...handlerMap[METHOD_NAME_ALL][p2]]; + }); + }); + } + if (path === "/*") { + path = "*"; + } + const paramCount = (path.match(/\/:/g) || []).length; + if (/\*$/.test(path)) { + const re = buildWildcardRegExp(path); + if (method === METHOD_NAME_ALL) { + Object.keys(middleware2).forEach((m2) => { + middleware2[m2][path] ||= findMiddleware(middleware2[m2], path) || findMiddleware(middleware2[METHOD_NAME_ALL], path) || []; + }); + } else { + middleware2[method][path] ||= findMiddleware(middleware2[method], path) || findMiddleware(middleware2[METHOD_NAME_ALL], path) || []; + } + Object.keys(middleware2).forEach((m2) => { + if (method === METHOD_NAME_ALL || method === m2) { + Object.keys(middleware2[m2]).forEach((p2) => { + re.test(p2) && middleware2[m2][p2].push([handler, paramCount]); + }); + } + }); + Object.keys(routes).forEach((m2) => { + if (method === METHOD_NAME_ALL || method === m2) { + Object.keys(routes[m2]).forEach( + (p2) => re.test(p2) && routes[m2][p2].push([handler, paramCount]) + ); + } + }); + return; + } + const paths = checkOptionalParameter(path) || [path]; + for (let i2 = 0, len = paths.length; i2 < len; i2++) { + const path2 = paths[i2]; + Object.keys(routes).forEach((m2) => { + if (method === METHOD_NAME_ALL || method === m2) { + routes[m2][path2] ||= [ + ...findMiddleware(middleware2[m2], path2) || findMiddleware(middleware2[METHOD_NAME_ALL], path2) || [] + ]; + routes[m2][path2].push([handler, paramCount - len + i2 + 1]); + } + }); + } + } + match = match; + buildAllMatchers() { + const matchers = /* @__PURE__ */ Object.create(null); + Object.keys(this.#routes).concat(Object.keys(this.#middleware)).forEach((method) => { + matchers[method] ||= this.#buildMatcher(method); + }); + this.#middleware = this.#routes = void 0; + clearWildcardRegExpCache(); + return matchers; + } + #buildMatcher(method) { + const routes = []; + let hasOwnRoute = method === METHOD_NAME_ALL; + [this.#middleware, this.#routes].forEach((r2) => { + const ownRoute = r2[method] ? Object.keys(r2[method]).map((path) => [path, r2[method][path]]) : []; + if (ownRoute.length !== 0) { + hasOwnRoute ||= true; + routes.push(...ownRoute); + } else if (method !== METHOD_NAME_ALL) { + routes.push( + ...Object.keys(r2[METHOD_NAME_ALL]).map((path) => [path, r2[METHOD_NAME_ALL][path]]) + ); + } + }); + if (!hasOwnRoute) { + return null; + } else { + return buildMatcherFromPreprocessedRoutes(routes); + } + } + }, "RegExpRouter"); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/prepared-router.js +var init_prepared_router = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/prepared-router.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router(); + init_matcher(); + init_router2(); + } +}); + +// ../../node_modules/hono/dist/router/reg-exp-router/index.js +var init_reg_exp_router = __esm({ + "../../node_modules/hono/dist/router/reg-exp-router/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router2(); + init_prepared_router(); + } +}); + +// ../../node_modules/hono/dist/router/smart-router/router.js +var SmartRouter; +var init_router3 = __esm({ + "../../node_modules/hono/dist/router/smart-router/router.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router(); + SmartRouter = /* @__PURE__ */ __name(class { + name = "SmartRouter"; + #routers = []; + #routes = []; + constructor(init) { + this.#routers = init.routers; + } + add(method, path, handler) { + if (!this.#routes) { + throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT); + } + this.#routes.push([method, path, handler]); + } + match(method, path) { + if (!this.#routes) { + throw new Error("Fatal error"); + } + const routers = this.#routers; + const routes = this.#routes; + const len = routers.length; + let i2 = 0; + let res; + for (; i2 < len; i2++) { + const router8 = routers[i2]; + try { + for (let i22 = 0, len2 = routes.length; i22 < len2; i22++) { + router8.add(...routes[i22]); + } + res = router8.match(method, path); + } catch (e2) { + if (e2 instanceof UnsupportedPathError) { + continue; + } + throw e2; + } + this.match = router8.match.bind(router8); + this.#routers = [router8]; + this.#routes = void 0; + break; + } + if (i2 === len) { + throw new Error("Fatal error"); + } + this.name = `SmartRouter + ${this.activeRouter.name}`; + return res; + } + get activeRouter() { + if (this.#routes || this.#routers.length !== 1) { + throw new Error("No active router has been determined yet."); + } + return this.#routers[0]; + } + }, "SmartRouter"); + } +}); + +// ../../node_modules/hono/dist/router/smart-router/index.js +var init_smart_router = __esm({ + "../../node_modules/hono/dist/router/smart-router/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router3(); + } +}); + +// ../../node_modules/hono/dist/router/trie-router/node.js +var emptyParams, hasChildren, Node3; +var init_node2 = __esm({ + "../../node_modules/hono/dist/router/trie-router/node.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router(); + init_url(); + emptyParams = /* @__PURE__ */ Object.create(null); + hasChildren = /* @__PURE__ */ __name((children) => { + for (const _ in children) { + return true; + } + return false; + }, "hasChildren"); + Node3 = /* @__PURE__ */ __name(class _Node2 { + #methods; + #children; + #patterns; + #order = 0; + #params = emptyParams; + constructor(method, handler, children) { + this.#children = children || /* @__PURE__ */ Object.create(null); + this.#methods = []; + if (method && handler) { + const m2 = /* @__PURE__ */ Object.create(null); + m2[method] = { handler, possibleKeys: [], score: 0 }; + this.#methods = [m2]; + } + this.#patterns = []; + } + insert(method, path, handler) { + this.#order = ++this.#order; + let curNode = this; + const parts = splitRoutingPath(path); + const possibleKeys = []; + for (let i2 = 0, len = parts.length; i2 < len; i2++) { + const p2 = parts[i2]; + const nextP = parts[i2 + 1]; + const pattern = getPattern(p2, nextP); + const key = Array.isArray(pattern) ? pattern[0] : p2; + if (key in curNode.#children) { + curNode = curNode.#children[key]; + if (pattern) { + possibleKeys.push(pattern[1]); + } + continue; + } + curNode.#children[key] = new _Node2(); + if (pattern) { + curNode.#patterns.push(pattern); + possibleKeys.push(pattern[1]); + } + curNode = curNode.#children[key]; + } + curNode.#methods.push({ + [method]: { + handler, + possibleKeys: possibleKeys.filter((v3, i2, a2) => a2.indexOf(v3) === i2), + score: this.#order + } + }); + return curNode; + } + #pushHandlerSets(handlerSets, node, method, nodeParams, params) { + for (let i2 = 0, len = node.#methods.length; i2 < len; i2++) { + const m2 = node.#methods[i2]; + const handlerSet = m2[method] || m2[METHOD_NAME_ALL]; + const processedSet = {}; + if (handlerSet !== void 0) { + handlerSet.params = /* @__PURE__ */ Object.create(null); + handlerSets.push(handlerSet); + if (nodeParams !== emptyParams || params && params !== emptyParams) { + for (let i22 = 0, len2 = handlerSet.possibleKeys.length; i22 < len2; i22++) { + const key = handlerSet.possibleKeys[i22]; + const processed = processedSet[handlerSet.score]; + handlerSet.params[key] = params?.[key] && !processed ? params[key] : nodeParams[key] ?? params?.[key]; + processedSet[handlerSet.score] = true; + } + } + } + } + } + search(method, path) { + const handlerSets = []; + this.#params = emptyParams; + const curNode = this; + let curNodes = [curNode]; + const parts = splitPath(path); + const curNodesQueue = []; + const len = parts.length; + let partOffsets = null; + for (let i2 = 0; i2 < len; i2++) { + const part = parts[i2]; + const isLast = i2 === len - 1; + const tempNodes = []; + for (let j2 = 0, len2 = curNodes.length; j2 < len2; j2++) { + const node = curNodes[j2]; + const nextNode = node.#children[part]; + if (nextNode) { + nextNode.#params = node.#params; + if (isLast) { + if (nextNode.#children["*"]) { + this.#pushHandlerSets(handlerSets, nextNode.#children["*"], method, node.#params); + } + this.#pushHandlerSets(handlerSets, nextNode, method, node.#params); + } else { + tempNodes.push(nextNode); + } + } + for (let k2 = 0, len3 = node.#patterns.length; k2 < len3; k2++) { + const pattern = node.#patterns[k2]; + const params = node.#params === emptyParams ? {} : { ...node.#params }; + if (pattern === "*") { + const astNode = node.#children["*"]; + if (astNode) { + this.#pushHandlerSets(handlerSets, astNode, method, node.#params); + astNode.#params = params; + tempNodes.push(astNode); + } + continue; + } + const [key, name, matcher] = pattern; + if (!part && !(matcher instanceof RegExp)) { + continue; + } + const child = node.#children[key]; + if (matcher instanceof RegExp) { + if (partOffsets === null) { + partOffsets = new Array(len); + let offset = path[0] === "/" ? 1 : 0; + for (let p2 = 0; p2 < len; p2++) { + partOffsets[p2] = offset; + offset += parts[p2].length + 1; + } + } + const restPathString = path.substring(partOffsets[i2]); + const m2 = matcher.exec(restPathString); + if (m2) { + params[name] = m2[0]; + this.#pushHandlerSets(handlerSets, child, method, node.#params, params); + if (hasChildren(child.#children)) { + child.#params = params; + const componentCount = m2[0].match(/\//)?.length ?? 0; + const targetCurNodes = curNodesQueue[componentCount] ||= []; + targetCurNodes.push(child); + } + continue; + } + } + if (matcher === true || matcher.test(part)) { + params[name] = part; + if (isLast) { + this.#pushHandlerSets(handlerSets, child, method, params, node.#params); + if (child.#children["*"]) { + this.#pushHandlerSets( + handlerSets, + child.#children["*"], + method, + params, + node.#params + ); + } + } else { + child.#params = params; + tempNodes.push(child); + } + } + } + } + const shifted = curNodesQueue.shift(); + curNodes = shifted ? tempNodes.concat(shifted) : tempNodes; + } + if (handlerSets.length > 1) { + handlerSets.sort((a2, b2) => { + return a2.score - b2.score; + }); + } + return [handlerSets.map(({ handler, params }) => [handler, params])]; + } + }, "_Node"); + } +}); + +// ../../node_modules/hono/dist/router/trie-router/router.js +var TrieRouter; +var init_router4 = __esm({ + "../../node_modules/hono/dist/router/trie-router/router.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_url(); + init_node2(); + TrieRouter = /* @__PURE__ */ __name(class { + name = "TrieRouter"; + #node; + constructor() { + this.#node = new Node3(); + } + add(method, path, handler) { + const results = checkOptionalParameter(path); + if (results) { + for (let i2 = 0, len = results.length; i2 < len; i2++) { + this.#node.insert(method, results[i2], handler); + } + return; + } + this.#node.insert(method, path, handler); + } + match(method, path) { + return this.#node.search(method, path); + } + }, "TrieRouter"); + } +}); + +// ../../node_modules/hono/dist/router/trie-router/index.js +var init_trie_router = __esm({ + "../../node_modules/hono/dist/router/trie-router/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_router4(); + } +}); + +// ../../node_modules/hono/dist/hono.js +var Hono2; +var init_hono = __esm({ + "../../node_modules/hono/dist/hono.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_hono_base(); + init_reg_exp_router(); + init_smart_router(); + init_trie_router(); + Hono2 = /* @__PURE__ */ __name(class extends Hono { + /** + * Creates an instance of the Hono class. + * + * @param options - Optional configuration options for the Hono instance. + */ + constructor(options = {}) { + super(options); + this.router = options.router ?? new SmartRouter({ + routers: [new RegExpRouter(), new TrieRouter()] + }); + } + }, "Hono"); + } +}); + +// ../../node_modules/hono/dist/index.js +var init_dist = __esm({ + "../../node_modules/hono/dist/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_hono(); + } +}); + +// ../../node_modules/hono/dist/middleware/cors/index.js +var cors; +var init_cors = __esm({ + "../../node_modules/hono/dist/middleware/cors/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + cors = /* @__PURE__ */ __name((options) => { + const defaults2 = { + origin: "*", + allowMethods: ["GET", "HEAD", "PUT", "POST", "DELETE", "PATCH"], + allowHeaders: [], + exposeHeaders: [] + }; + const opts = { + ...defaults2, + ...options + }; + const findAllowOrigin = ((optsOrigin) => { + if (typeof optsOrigin === "string") { + if (optsOrigin === "*") { + if (opts.credentials) { + return (origin2) => origin2 || null; + } + return () => optsOrigin; + } else { + return (origin2) => optsOrigin === origin2 ? origin2 : null; + } + } else if (typeof optsOrigin === "function") { + return optsOrigin; + } else { + return (origin2) => optsOrigin.includes(origin2) ? origin2 : null; + } + })(opts.origin); + const findAllowMethods = ((optsAllowMethods) => { + if (typeof optsAllowMethods === "function") { + return optsAllowMethods; + } else if (Array.isArray(optsAllowMethods)) { + return () => optsAllowMethods; + } else { + return () => []; + } + })(opts.allowMethods); + return /* @__PURE__ */ __name(async function cors2(c2, next) { + function set2(key, value) { + c2.res.headers.set(key, value); + } + __name(set2, "set"); + const allowOrigin = await findAllowOrigin(c2.req.header("origin") || "", c2); + if (allowOrigin) { + set2("Access-Control-Allow-Origin", allowOrigin); + } + if (opts.credentials) { + set2("Access-Control-Allow-Credentials", "true"); + } + if (opts.exposeHeaders?.length) { + set2("Access-Control-Expose-Headers", opts.exposeHeaders.join(",")); + } + if (c2.req.method === "OPTIONS") { + if (opts.origin !== "*" || opts.credentials) { + set2("Vary", "Origin"); + } + if (opts.maxAge != null) { + set2("Access-Control-Max-Age", opts.maxAge.toString()); + } + const allowMethods = await findAllowMethods(c2.req.header("origin") || "", c2); + if (allowMethods.length) { + set2("Access-Control-Allow-Methods", allowMethods.join(",")); + } + let headers = opts.allowHeaders; + if (!headers?.length) { + const requestHeaders = c2.req.header("Access-Control-Request-Headers"); + if (requestHeaders) { + headers = requestHeaders.split(/\s*,\s*/); + } + } + if (headers?.length) { + set2("Access-Control-Allow-Headers", headers.join(",")); + c2.res.headers.append("Vary", "Access-Control-Request-Headers"); + } + c2.res.headers.delete("Content-Length"); + c2.res.headers.delete("Content-Type"); + return new Response(null, { + headers: c2.res.headers, + status: 204, + statusText: "No Content" + }); + } + await next(); + if (opts.origin !== "*" || opts.credentials) { + c2.header("Vary", "Origin", { append: true }); + } + }, "cors2"); + }, "cors"); + } +}); + +// ../../node_modules/hono/dist/utils/color.js +function getColorEnabled() { + const { process: process3, Deno } = globalThis; + const isNoColor = typeof Deno?.noColor === "boolean" ? Deno.noColor : process3 !== void 0 ? ( + // eslint-disable-next-line no-unsafe-optional-chaining + "NO_COLOR" in process3?.env + ) : false; + return !isNoColor; +} +async function getColorEnabledAsync() { + const { navigator: navigator2 } = globalThis; + const cfWorkers = "cloudflare:workers"; + const isNoColor = navigator2 !== void 0 && navigator2.userAgent === "Cloudflare-Workers" ? await (async () => { + try { + return "NO_COLOR" in ((await import(cfWorkers)).env ?? {}); + } catch { + return false; + } + })() : !getColorEnabled(); + return !isNoColor; +} +var init_color = __esm({ + "../../node_modules/hono/dist/utils/color.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(getColorEnabled, "getColorEnabled"); + __name(getColorEnabledAsync, "getColorEnabledAsync"); + } +}); + +// ../../node_modules/hono/dist/middleware/logger/index.js +async function log3(fn, prefix, method, path, status = 0, elapsed) { + const out = prefix === "<--" ? `${prefix} ${method} ${path}` : `${prefix} ${method} ${path} ${await colorStatus(status)} ${elapsed}`; + fn(out); +} +var humanize, time3, colorStatus, logger; +var init_logger = __esm({ + "../../node_modules/hono/dist/middleware/logger/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_color(); + humanize = /* @__PURE__ */ __name((times) => { + const [delimiter, separator] = [",", "."]; + const orderTimes = times.map((v3) => v3.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1" + delimiter)); + return orderTimes.join(separator); + }, "humanize"); + time3 = /* @__PURE__ */ __name((start) => { + const delta = Date.now() - start; + return humanize([delta < 1e3 ? delta + "ms" : Math.round(delta / 1e3) + "s"]); + }, "time"); + colorStatus = /* @__PURE__ */ __name(async (status) => { + const colorEnabled = await getColorEnabledAsync(); + if (colorEnabled) { + switch (status / 100 | 0) { + case 5: + return `\x1B[31m${status}\x1B[0m`; + case 4: + return `\x1B[33m${status}\x1B[0m`; + case 3: + return `\x1B[36m${status}\x1B[0m`; + case 2: + return `\x1B[32m${status}\x1B[0m`; + } + } + return `${status}`; + }, "colorStatus"); + __name(log3, "log"); + logger = /* @__PURE__ */ __name((fn = console.log) => { + return /* @__PURE__ */ __name(async function logger22(c2, next) { + const { method, url: url2 } = c2.req; + const path = url2.slice(url2.indexOf("/", 8)); + await log3(fn, "<--", method, path); + const start = Date.now(); + await next(); + await log3(fn, "-->", method, path, c2.res.status, time3(start)); + }, "logger2"); + }, "logger"); + } +}); + +// ../../node_modules/@trpc/server/dist/codes-DagpWZLc.mjs +function mergeWithoutOverrides(obj1, ...objs) { + const newObj = Object.assign(emptyObject(), obj1); + for (const overrides of objs) + for (const key in overrides) { + if (key in newObj && newObj[key] !== overrides[key]) + throw new Error(`Duplicate key ${key}`); + newObj[key] = overrides[key]; + } + return newObj; +} +function isObject(value) { + return !!value && !Array.isArray(value) && typeof value === "object"; +} +function isFunction(fn) { + return typeof fn === "function"; +} +function emptyObject() { + return /* @__PURE__ */ Object.create(null); +} +function isAsyncIterable(value) { + return asyncIteratorsSupported && isObject(value) && Symbol.asyncIterator in value; +} +function identity(it) { + return it; +} +function abortSignalsAnyPonyfill(signals) { + if (typeof AbortSignal.any === "function") + return AbortSignal.any(signals); + const ac3 = new AbortController(); + for (const signal of signals) { + if (signal.aborted) { + trigger(); + break; + } + signal.addEventListener("abort", trigger, { once: true }); + } + return ac3.signal; + function trigger() { + ac3.abort(); + for (const signal of signals) + signal.removeEventListener("abort", trigger); + } + __name(trigger, "trigger"); +} +var asyncIteratorsSupported, run, TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER, retryableRpcCodes; +var init_codes_DagpWZLc = __esm({ + "../../node_modules/@trpc/server/dist/codes-DagpWZLc.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(mergeWithoutOverrides, "mergeWithoutOverrides"); + __name(isObject, "isObject"); + __name(isFunction, "isFunction"); + __name(emptyObject, "emptyObject"); + asyncIteratorsSupported = typeof Symbol === "function" && !!Symbol.asyncIterator; + __name(isAsyncIterable, "isAsyncIterable"); + run = /* @__PURE__ */ __name((fn) => fn(), "run"); + __name(identity, "identity"); + __name(abortSignalsAnyPonyfill, "abortSignalsAnyPonyfill"); + TRPC_ERROR_CODES_BY_KEY = { + PARSE_ERROR: -32700, + BAD_REQUEST: -32600, + INTERNAL_SERVER_ERROR: -32603, + NOT_IMPLEMENTED: -32603, + BAD_GATEWAY: -32603, + SERVICE_UNAVAILABLE: -32603, + GATEWAY_TIMEOUT: -32603, + UNAUTHORIZED: -32001, + PAYMENT_REQUIRED: -32002, + FORBIDDEN: -32003, + NOT_FOUND: -32004, + METHOD_NOT_SUPPORTED: -32005, + TIMEOUT: -32008, + CONFLICT: -32009, + PRECONDITION_FAILED: -32012, + PAYLOAD_TOO_LARGE: -32013, + UNSUPPORTED_MEDIA_TYPE: -32015, + UNPROCESSABLE_CONTENT: -32022, + PRECONDITION_REQUIRED: -32028, + TOO_MANY_REQUESTS: -32029, + CLIENT_CLOSED_REQUEST: -32099 + }; + TRPC_ERROR_CODES_BY_NUMBER = { + [-32700]: "PARSE_ERROR", + [-32600]: "BAD_REQUEST", + [-32603]: "INTERNAL_SERVER_ERROR", + [-32001]: "UNAUTHORIZED", + [-32002]: "PAYMENT_REQUIRED", + [-32003]: "FORBIDDEN", + [-32004]: "NOT_FOUND", + [-32005]: "METHOD_NOT_SUPPORTED", + [-32008]: "TIMEOUT", + [-32009]: "CONFLICT", + [-32012]: "PRECONDITION_FAILED", + [-32013]: "PAYLOAD_TOO_LARGE", + [-32015]: "UNSUPPORTED_MEDIA_TYPE", + [-32022]: "UNPROCESSABLE_CONTENT", + [-32028]: "PRECONDITION_REQUIRED", + [-32029]: "TOO_MANY_REQUESTS", + [-32099]: "CLIENT_CLOSED_REQUEST" + }; + retryableRpcCodes = [ + TRPC_ERROR_CODES_BY_KEY.BAD_GATEWAY, + TRPC_ERROR_CODES_BY_KEY.SERVICE_UNAVAILABLE, + TRPC_ERROR_CODES_BY_KEY.GATEWAY_TIMEOUT, + TRPC_ERROR_CODES_BY_KEY.INTERNAL_SERVER_ERROR + ]; + } +}); + +// ../../node_modules/@trpc/server/dist/getErrorShape-vC8mUXJD.mjs +function createInnerProxy(callback, path, memo2) { + var _memo$cacheKey; + const cacheKey = path.join("."); + (_memo$cacheKey = memo2[cacheKey]) !== null && _memo$cacheKey !== void 0 || (memo2[cacheKey] = new Proxy(noop, { + get(_obj, key) { + if (typeof key !== "string" || key === "then") + return void 0; + return createInnerProxy(callback, [...path, key], memo2); + }, + apply(_1, _2, args) { + const lastOfPath = path[path.length - 1]; + let opts = { + args, + path + }; + if (lastOfPath === "call") + opts = { + args: args.length >= 2 ? [args[1]] : [], + path: path.slice(0, -1) + }; + else if (lastOfPath === "apply") + opts = { + args: args.length >= 2 ? args[1] : [], + path: path.slice(0, -1) + }; + freezeIfAvailable(opts.args); + freezeIfAvailable(opts.path); + return callback(opts); + } + })); + return memo2[cacheKey]; +} +function getStatusCodeFromKey(code) { + var _JSONRPC2_TO_HTTP_COD; + return (_JSONRPC2_TO_HTTP_COD = JSONRPC2_TO_HTTP_CODE[code]) !== null && _JSONRPC2_TO_HTTP_COD !== void 0 ? _JSONRPC2_TO_HTTP_COD : 500; +} +function getHTTPStatusCode(json2) { + const arr = Array.isArray(json2) ? json2 : [json2]; + const httpStatuses = new Set(arr.map((res) => { + if ("error" in res && isObject(res.error.data)) { + var _res$error$data; + if (typeof ((_res$error$data = res.error.data) === null || _res$error$data === void 0 ? void 0 : _res$error$data["httpStatus"]) === "number") + return res.error.data["httpStatus"]; + const code = TRPC_ERROR_CODES_BY_NUMBER[res.error.code]; + return getStatusCodeFromKey(code); + } + return 200; + })); + if (httpStatuses.size !== 1) + return 207; + const httpStatus = httpStatuses.values().next().value; + return httpStatus; +} +function getHTTPStatusCodeFromError(error50) { + return getStatusCodeFromKey(error50.code); +} +function getErrorShape(opts) { + const { path, error: error50, config: config3 } = opts; + const { code } = opts.error; + const shape = { + message: error50.message, + code: TRPC_ERROR_CODES_BY_KEY[code], + data: { + code, + httpStatus: getHTTPStatusCodeFromError(error50) + } + }; + if (config3.isDev && typeof opts.error.stack === "string") + shape.data.stack = opts.error.stack; + if (typeof path === "string") + shape.data.path = path; + return config3.errorFormatter((0, import_objectSpread2.default)((0, import_objectSpread2.default)({}, opts), {}, { shape })); +} +var __create2, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __getProtoOf2, __hasOwnProp2, __commonJS2, __copyProps2, __toESM2, noop, freezeIfAvailable, createRecursiveProxy, JSONRPC2_TO_HTTP_CODE, require_typeof, require_toPrimitive, require_toPropertyKey, require_defineProperty, require_objectSpread2, import_objectSpread2; +var init_getErrorShape_vC8mUXJD = __esm({ + "../../node_modules/@trpc/server/dist/getErrorShape-vC8mUXJD.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_codes_DagpWZLc(); + __create2 = Object.create; + __defProp2 = Object.defineProperty; + __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + __getOwnPropNames2 = Object.getOwnPropertyNames; + __getProtoOf2 = Object.getPrototypeOf; + __hasOwnProp2 = Object.prototype.hasOwnProperty; + __commonJS2 = /* @__PURE__ */ __name((cb2, mod) => function() { + return mod || (0, cb2[__getOwnPropNames2(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + }, "__commonJS"); + __copyProps2 = /* @__PURE__ */ __name((to, from, except2, desc2) => { + if (from && typeof from === "object" || typeof from === "function") + for (var keys = __getOwnPropNames2(from), i2 = 0, n2 = keys.length, key; i2 < n2; i2++) { + key = keys[i2]; + if (!__hasOwnProp2.call(to, key) && key !== except2) + __defProp2(to, key, { + get: ((k2) => from[k2]).bind(null, key), + enumerable: !(desc2 = __getOwnPropDesc2(from, key)) || desc2.enumerable + }); + } + return to; + }, "__copyProps"); + __toESM2 = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { + value: mod, + enumerable: true + }) : target, mod)), "__toESM"); + noop = /* @__PURE__ */ __name(() => { + }, "noop"); + freezeIfAvailable = /* @__PURE__ */ __name((obj) => { + if (Object.freeze) + Object.freeze(obj); + }, "freezeIfAvailable"); + __name(createInnerProxy, "createInnerProxy"); + createRecursiveProxy = /* @__PURE__ */ __name((callback) => createInnerProxy(callback, [], emptyObject()), "createRecursiveProxy"); + JSONRPC2_TO_HTTP_CODE = { + PARSE_ERROR: 400, + BAD_REQUEST: 400, + UNAUTHORIZED: 401, + PAYMENT_REQUIRED: 402, + FORBIDDEN: 403, + NOT_FOUND: 404, + METHOD_NOT_SUPPORTED: 405, + TIMEOUT: 408, + CONFLICT: 409, + PRECONDITION_FAILED: 412, + PAYLOAD_TOO_LARGE: 413, + UNSUPPORTED_MEDIA_TYPE: 415, + UNPROCESSABLE_CONTENT: 422, + PRECONDITION_REQUIRED: 428, + TOO_MANY_REQUESTS: 429, + CLIENT_CLOSED_REQUEST: 499, + INTERNAL_SERVER_ERROR: 500, + NOT_IMPLEMENTED: 501, + BAD_GATEWAY: 502, + SERVICE_UNAVAILABLE: 503, + GATEWAY_TIMEOUT: 504 + }; + __name(getStatusCodeFromKey, "getStatusCodeFromKey"); + __name(getHTTPStatusCode, "getHTTPStatusCode"); + __name(getHTTPStatusCodeFromError, "getHTTPStatusCodeFromError"); + require_typeof = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(exports, module) { + function _typeof$2(o2) { + "@babel/helpers - typeof"; + return module.exports = _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) { + return typeof o$1; + } : function(o$1) { + return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1; + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof$2(o2); + } + __name(_typeof$2, "_typeof$2"); + module.exports = _typeof$2, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_toPrimitive = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(exports, module) { + var _typeof$1 = require_typeof()["default"]; + function toPrimitive$1(t9, r2) { + if ("object" != _typeof$1(t9) || !t9) + return t9; + var e2 = t9[Symbol.toPrimitive]; + if (void 0 !== e2) { + var i2 = e2.call(t9, r2 || "default"); + if ("object" != _typeof$1(i2)) + return i2; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r2 ? String : Number)(t9); + } + __name(toPrimitive$1, "toPrimitive$1"); + module.exports = toPrimitive$1, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_toPropertyKey = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(exports, module) { + var _typeof = require_typeof()["default"]; + var toPrimitive = require_toPrimitive(); + function toPropertyKey$1(t9) { + var i2 = toPrimitive(t9, "string"); + return "symbol" == _typeof(i2) ? i2 : i2 + ""; + } + __name(toPropertyKey$1, "toPropertyKey$1"); + module.exports = toPropertyKey$1, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_defineProperty = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(exports, module) { + var toPropertyKey = require_toPropertyKey(); + function _defineProperty(e2, r2, t9) { + return (r2 = toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, { + value: t9, + enumerable: true, + configurable: true, + writable: true + }) : e2[r2] = t9, e2; + } + __name(_defineProperty, "_defineProperty"); + module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_objectSpread2 = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(exports, module) { + var defineProperty = require_defineProperty(); + function ownKeys(e2, r2) { + var t9 = Object.keys(e2); + if (Object.getOwnPropertySymbols) { + var o2 = Object.getOwnPropertySymbols(e2); + r2 && (o2 = o2.filter(function(r$1) { + return Object.getOwnPropertyDescriptor(e2, r$1).enumerable; + })), t9.push.apply(t9, o2); + } + return t9; + } + __name(ownKeys, "ownKeys"); + function _objectSpread2(e2) { + for (var r2 = 1; r2 < arguments.length; r2++) { + var t9 = null != arguments[r2] ? arguments[r2] : {}; + r2 % 2 ? ownKeys(Object(t9), true).forEach(function(r$1) { + defineProperty(e2, r$1, t9[r$1]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t9)) : ownKeys(Object(t9)).forEach(function(r$1) { + Object.defineProperty(e2, r$1, Object.getOwnPropertyDescriptor(t9, r$1)); + }); + } + return e2; + } + __name(_objectSpread2, "_objectSpread2"); + module.exports = _objectSpread2, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + import_objectSpread2 = __toESM2(require_objectSpread2(), 1); + __name(getErrorShape, "getErrorShape"); + } +}); + +// ../../node_modules/@trpc/server/dist/tracked-Bjtgv3wJ.mjs +function getCauseFromUnknown(cause) { + if (cause instanceof Error) + return cause; + const type = typeof cause; + if (type === "undefined" || type === "function" || cause === null) + return void 0; + if (type !== "object") + return new Error(String(cause)); + if (isObject(cause)) + return Object.assign(new UnknownCauseError(), cause); + return void 0; +} +function getTRPCErrorFromUnknown(cause) { + if (cause instanceof TRPCError) + return cause; + if (cause instanceof Error && cause.name === "TRPCError") + return cause; + const trpcError = new TRPCError({ + code: "INTERNAL_SERVER_ERROR", + cause + }); + if (cause instanceof Error && cause.stack) + trpcError.stack = cause.stack; + return trpcError; +} +function getDataTransformer(transformer) { + if ("input" in transformer) + return transformer; + return { + input: transformer, + output: transformer + }; +} +function transformTRPCResponseItem(config3, item) { + if ("error" in item) + return (0, import_objectSpread2$1.default)((0, import_objectSpread2$1.default)({}, item), {}, { error: config3.transformer.output.serialize(item.error) }); + if ("data" in item.result) + return (0, import_objectSpread2$1.default)((0, import_objectSpread2$1.default)({}, item), {}, { result: (0, import_objectSpread2$1.default)((0, import_objectSpread2$1.default)({}, item.result), {}, { data: config3.transformer.output.serialize(item.result.data) }) }); + return item; +} +function transformTRPCResponse(config3, itemOrItems) { + return Array.isArray(itemOrItems) ? itemOrItems.map((item) => transformTRPCResponseItem(config3, item)) : transformTRPCResponseItem(config3, itemOrItems); +} +function once2(fn) { + const uncalled = Symbol(); + let result = uncalled; + return () => { + if (result === uncalled) + result = fn(); + return result; + }; +} +function isLazy(input) { + return typeof input === "function" && lazyMarker in input; +} +function isRouter(value) { + return isObject(value) && isObject(value["_def"]) && "router" in value["_def"]; +} +function createRouterFactory(config3) { + function createRouterInner(input) { + const reservedWordsUsed = new Set(Object.keys(input).filter((v3) => reservedWords.includes(v3))); + if (reservedWordsUsed.size > 0) + throw new Error("Reserved words used in `router({})` call: " + Array.from(reservedWordsUsed).join(", ")); + const procedures = emptyObject(); + const lazy$1 = emptyObject(); + function createLazyLoader(opts) { + return { + ref: opts.ref, + load: once2(async () => { + const router$1 = await opts.ref(); + const lazyPath = [...opts.path, opts.key]; + const lazyKey = lazyPath.join("."); + opts.aggregate[opts.key] = step(router$1._def.record, lazyPath); + delete lazy$1[lazyKey]; + for (const [nestedKey, nestedItem] of Object.entries(router$1._def.lazy)) { + const nestedRouterKey = [...lazyPath, nestedKey].join("."); + lazy$1[nestedRouterKey] = createLazyLoader({ + ref: nestedItem.ref, + path: lazyPath, + key: nestedKey, + aggregate: opts.aggregate[opts.key] + }); + } + }) + }; + } + __name(createLazyLoader, "createLazyLoader"); + function step(from, path = []) { + const aggregate = emptyObject(); + for (const [key, item] of Object.entries(from !== null && from !== void 0 ? from : {})) { + if (isLazy(item)) { + lazy$1[[...path, key].join(".")] = createLazyLoader({ + path, + ref: item, + key, + aggregate + }); + continue; + } + if (isRouter(item)) { + aggregate[key] = step(item._def.record, [...path, key]); + continue; + } + if (!isProcedure(item)) { + aggregate[key] = step(item, [...path, key]); + continue; + } + const newPath = [...path, key].join("."); + if (procedures[newPath]) + throw new Error(`Duplicate key: ${newPath}`); + procedures[newPath] = item; + aggregate[key] = item; + } + return aggregate; + } + __name(step, "step"); + const record2 = step(input); + const _def = (0, import_objectSpread22.default)((0, import_objectSpread22.default)({ + _config: config3, + router: true, + procedures, + lazy: lazy$1 + }, emptyRouter), {}, { record: record2 }); + const router8 = (0, import_objectSpread22.default)((0, import_objectSpread22.default)({}, record2), {}, { + _def, + createCaller: createCallerFactory()({ _def }) + }); + return router8; + } + __name(createRouterInner, "createRouterInner"); + return createRouterInner; +} +function isProcedure(procedureOrRouter) { + return typeof procedureOrRouter === "function"; +} +async function getProcedureAtPath(router8, path) { + const { _def } = router8; + let procedure = _def.procedures[path]; + while (!procedure) { + const key = Object.keys(_def.lazy).find((key$1) => path.startsWith(key$1)); + if (!key) + return null; + const lazyRouter = _def.lazy[key]; + await lazyRouter.load(); + procedure = _def.procedures[path]; + } + return procedure; +} +function createCallerFactory() { + return /* @__PURE__ */ __name(function createCallerInner(router8) { + const { _def } = router8; + return /* @__PURE__ */ __name(function createCaller(ctxOrCallback, opts) { + return createRecursiveProxy(async (innerOpts) => { + const { path, args } = innerOpts; + const fullPath = path.join("."); + if (path.length === 1 && path[0] === "_def") + return _def; + const procedure = await getProcedureAtPath(router8, fullPath); + let ctx = void 0; + try { + if (!procedure) + throw new TRPCError({ + code: "NOT_FOUND", + message: `No procedure found on path "${path}"` + }); + ctx = isFunction(ctxOrCallback) ? await Promise.resolve(ctxOrCallback()) : ctxOrCallback; + return await procedure({ + path: fullPath, + getRawInput: async () => args[0], + ctx, + type: procedure._def.type, + signal: opts === null || opts === void 0 ? void 0 : opts.signal, + batchIndex: 0 + }); + } catch (cause) { + var _opts$onError, _procedure$_def$type; + opts === null || opts === void 0 || (_opts$onError = opts.onError) === null || _opts$onError === void 0 || _opts$onError.call(opts, { + ctx, + error: getTRPCErrorFromUnknown(cause), + input: args[0], + path: fullPath, + type: (_procedure$_def$type = procedure === null || procedure === void 0 ? void 0 : procedure._def.type) !== null && _procedure$_def$type !== void 0 ? _procedure$_def$type : "unknown" + }); + throw cause; + } + }); + }, "createCaller"); + }, "createCallerInner"); +} +function mergeRouters(...routerList) { + var _routerList$, _routerList$2; + const record2 = mergeWithoutOverrides({}, ...routerList.map((r2) => r2._def.record)); + const errorFormatter = routerList.reduce((currentErrorFormatter, nextRouter) => { + if (nextRouter._def._config.errorFormatter && nextRouter._def._config.errorFormatter !== defaultFormatter) { + if (currentErrorFormatter !== defaultFormatter && currentErrorFormatter !== nextRouter._def._config.errorFormatter) + throw new Error("You seem to have several error formatters"); + return nextRouter._def._config.errorFormatter; + } + return currentErrorFormatter; + }, defaultFormatter); + const transformer = routerList.reduce((prev, current) => { + if (current._def._config.transformer && current._def._config.transformer !== defaultTransformer) { + if (prev !== defaultTransformer && prev !== current._def._config.transformer) + throw new Error("You seem to have several transformers"); + return current._def._config.transformer; + } + return prev; + }, defaultTransformer); + const router8 = createRouterFactory({ + errorFormatter, + transformer, + isDev: routerList.every((r2) => r2._def._config.isDev), + allowOutsideOfServer: routerList.every((r2) => r2._def._config.allowOutsideOfServer), + isServer: routerList.every((r2) => r2._def._config.isServer), + $types: (_routerList$ = routerList[0]) === null || _routerList$ === void 0 ? void 0 : _routerList$._def._config.$types, + sse: (_routerList$2 = routerList[0]) === null || _routerList$2 === void 0 ? void 0 : _routerList$2._def._config.sse + })(record2); + return router8; +} +function isTrackedEnvelope(value) { + return Array.isArray(value) && value[2] === trackedSymbol; +} +var defaultFormatter, import_defineProperty, UnknownCauseError, TRPCError, import_objectSpread2$1, defaultTransformer, import_objectSpread22, lazyMarker, emptyRouter, reservedWords, trackedSymbol; +var init_tracked_Bjtgv3wJ = __esm({ + "../../node_modules/@trpc/server/dist/tracked-Bjtgv3wJ.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getErrorShape_vC8mUXJD(); + init_codes_DagpWZLc(); + defaultFormatter = /* @__PURE__ */ __name(({ shape }) => { + return shape; + }, "defaultFormatter"); + import_defineProperty = __toESM2(require_defineProperty(), 1); + UnknownCauseError = /* @__PURE__ */ __name(class extends Error { + }, "UnknownCauseError"); + __name(getCauseFromUnknown, "getCauseFromUnknown"); + __name(getTRPCErrorFromUnknown, "getTRPCErrorFromUnknown"); + TRPCError = /* @__PURE__ */ __name(class extends Error { + constructor(opts) { + var _ref, _opts$message, _this$cause; + const cause = getCauseFromUnknown(opts.cause); + const message2 = (_ref = (_opts$message = opts.message) !== null && _opts$message !== void 0 ? _opts$message : cause === null || cause === void 0 ? void 0 : cause.message) !== null && _ref !== void 0 ? _ref : opts.code; + super(message2, { cause }); + (0, import_defineProperty.default)(this, "cause", void 0); + (0, import_defineProperty.default)(this, "code", void 0); + this.code = opts.code; + this.name = "TRPCError"; + (_this$cause = this.cause) !== null && _this$cause !== void 0 || (this.cause = cause); + } + }, "TRPCError"); + import_objectSpread2$1 = __toESM2(require_objectSpread2(), 1); + __name(getDataTransformer, "getDataTransformer"); + defaultTransformer = { + input: { + serialize: (obj) => obj, + deserialize: (obj) => obj + }, + output: { + serialize: (obj) => obj, + deserialize: (obj) => obj + } + }; + __name(transformTRPCResponseItem, "transformTRPCResponseItem"); + __name(transformTRPCResponse, "transformTRPCResponse"); + import_objectSpread22 = __toESM2(require_objectSpread2(), 1); + lazyMarker = "lazyMarker"; + __name(once2, "once"); + __name(isLazy, "isLazy"); + __name(isRouter, "isRouter"); + emptyRouter = { + _ctx: null, + _errorShape: null, + _meta: null, + queries: {}, + mutations: {}, + subscriptions: {}, + errorFormatter: defaultFormatter, + transformer: defaultTransformer + }; + reservedWords = [ + "then", + "call", + "apply" + ]; + __name(createRouterFactory, "createRouterFactory"); + __name(isProcedure, "isProcedure"); + __name(getProcedureAtPath, "getProcedureAtPath"); + __name(createCallerFactory, "createCallerFactory"); + __name(mergeRouters, "mergeRouters"); + trackedSymbol = Symbol(); + __name(isTrackedEnvelope, "isTrackedEnvelope"); + } +}); + +// ../../node_modules/@trpc/server/dist/observable-UMO3vUa_.mjs +function isObservable(x2) { + return typeof x2 === "object" && x2 !== null && "subscribe" in x2; +} +function observableToReadableStream(observable$1, signal) { + let unsub = null; + const onAbort = /* @__PURE__ */ __name(() => { + unsub === null || unsub === void 0 || unsub.unsubscribe(); + unsub = null; + signal.removeEventListener("abort", onAbort); + }, "onAbort"); + return new ReadableStream({ + start(controller) { + unsub = observable$1.subscribe({ + next(data) { + controller.enqueue({ + ok: true, + value: data + }); + }, + error(error50) { + controller.enqueue({ + ok: false, + error: error50 + }); + controller.close(); + }, + complete() { + controller.close(); + } + }); + if (signal.aborted) + onAbort(); + else + signal.addEventListener("abort", onAbort, { once: true }); + }, + cancel() { + onAbort(); + } + }); +} +function observableToAsyncIterable(observable$1, signal) { + const stream = observableToReadableStream(observable$1, signal); + const reader = stream.getReader(); + const iterator2 = { + async next() { + const value = await reader.read(); + if (value.done) + return { + value: void 0, + done: true + }; + const { value: result } = value; + if (!result.ok) + throw result.error; + return { + value: result.value, + done: false + }; + }, + async return() { + await reader.cancel(); + return { + value: void 0, + done: true + }; + } + }; + return { [Symbol.asyncIterator]() { + return iterator2; + } }; +} +var init_observable_UMO3vUa = __esm({ + "../../node_modules/@trpc/server/dist/observable-UMO3vUa_.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(isObservable, "isObservable"); + __name(observableToReadableStream, "observableToReadableStream"); + __name(observableToAsyncIterable, "observableToAsyncIterable"); + } +}); + +// ../../node_modules/@trpc/server/dist/resolveResponse-CHqBlAgR.mjs +function parseConnectionParamsFromUnknown(parsed) { + try { + if (parsed === null) + return null; + if (!isObject(parsed)) + throw new Error("Expected object"); + const nonStringValues = Object.entries(parsed).filter(([_key2, value]) => typeof value !== "string"); + if (nonStringValues.length > 0) + throw new Error(`Expected connectionParams to be string values. Got ${nonStringValues.map(([key, value]) => `${key}: ${typeof value}`).join(", ")}`); + return parsed; + } catch (cause) { + throw new TRPCError({ + code: "PARSE_ERROR", + message: "Invalid connection params shape", + cause + }); + } +} +function parseConnectionParamsFromString(str) { + let parsed; + try { + parsed = JSON.parse(str); + } catch (cause) { + throw new TRPCError({ + code: "PARSE_ERROR", + message: "Not JSON-parsable query params", + cause + }); + } + return parseConnectionParamsFromUnknown(parsed); +} +function getAcceptHeader(headers) { + var _ref, _headers$get; + return (_ref = headers.get("trpc-accept")) !== null && _ref !== void 0 ? _ref : ((_headers$get = headers.get("accept")) === null || _headers$get === void 0 ? void 0 : _headers$get.split(",").some((t9) => t9.trim() === "application/jsonl")) ? "application/jsonl" : null; +} +function memo(fn) { + let promise2 = null; + const sym = Symbol.for("@trpc/server/http/memo"); + let value = sym; + return { + read: async () => { + var _promise2; + if (value !== sym) + return value; + (_promise2 = promise2) !== null && _promise2 !== void 0 || (promise2 = fn().catch((cause) => { + if (cause instanceof TRPCError) + throw cause; + throw new TRPCError({ + code: "BAD_REQUEST", + message: cause instanceof Error ? cause.message : "Invalid input", + cause + }); + })); + value = await promise2; + promise2 = null; + return value; + }, + result: () => { + return value !== sym ? value : void 0; + } + }; +} +function getContentTypeHandler(req) { + const handler = handlers.find((handler$1) => handler$1.isMatch(req)); + if (handler) + return handler; + if (!handler && req.method === "GET") + return jsonContentTypeHandler; + throw new TRPCError({ + code: "UNSUPPORTED_MEDIA_TYPE", + message: req.headers.has("content-type") ? `Unsupported content-type "${req.headers.get("content-type")}` : "Missing content-type header" + }); +} +async function getRequestInfo(opts) { + const handler = getContentTypeHandler(opts.req); + return await handler.parse(opts); +} +function isAbortError(error50) { + return isObject(error50) && error50["name"] === "AbortError"; +} +function throwAbortError(message2 = "AbortError") { + throw new DOMException(message2, "AbortError"); +} +function isObject$1(o2) { + return Object.prototype.toString.call(o2) === "[object Object]"; +} +function isPlainObject(o2) { + var ctor, prot; + if (isObject$1(o2) === false) + return false; + ctor = o2.constructor; + if (ctor === void 0) + return true; + prot = ctor.prototype; + if (isObject$1(prot) === false) + return false; + if (prot.hasOwnProperty("isPrototypeOf") === false) + return false; + return true; +} +function resolveSelfTuple(promise2) { + return Unpromise.proxy(promise2).then(() => [promise2]); +} +function withResolvers() { + let resolve; + let reject; + const promise2 = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + return { + promise: promise2, + resolve, + reject + }; +} +function listWithMember(arr, member2) { + return [...arr, member2]; +} +function listWithoutIndex(arr, index) { + return [...arr.slice(0, index), ...arr.slice(index + 1)]; +} +function listWithoutMember(arr, member2) { + const index = arr.indexOf(member2); + if (index !== -1) + return listWithoutIndex(arr, index); + return arr; +} +function makeResource(thing, dispose) { + const it = thing; + const existing = it[Symbol.dispose]; + it[Symbol.dispose] = () => { + dispose(); + existing === null || existing === void 0 || existing(); + }; + return it; +} +function makeAsyncResource(thing, dispose) { + const it = thing; + const existing = it[Symbol.asyncDispose]; + it[Symbol.asyncDispose] = async () => { + await dispose(); + await (existing === null || existing === void 0 ? void 0 : existing()); + }; + return it; +} +function timerResource(ms) { + let timer = null; + return makeResource({ start() { + if (timer) + throw new Error("Timer already started"); + const promise2 = new Promise((resolve) => { + timer = setTimeout(() => resolve(disposablePromiseTimerResult), ms); + }); + return promise2; + } }, () => { + if (timer) + clearTimeout(timer); + }); +} +function iteratorResource(iterable) { + const iterator2 = iterable[Symbol.asyncIterator](); + if (iterator2[Symbol.asyncDispose]) + return iterator2; + return makeAsyncResource(iterator2, async () => { + var _iterator$return; + await ((_iterator$return = iterator2.return) === null || _iterator$return === void 0 ? void 0 : _iterator$return.call(iterator2)); + }); +} +function takeWithGrace(_x2, _x22) { + return _takeWithGrace.apply(this, arguments); +} +function _takeWithGrace() { + _takeWithGrace = (0, import_wrapAsyncGenerator$5.default)(function* (iterable, opts) { + try { + var _usingCtx$1 = (0, import_usingCtx$4.default)(); + const iterator2 = _usingCtx$1.a(iteratorResource(iterable)); + let result; + const timer = _usingCtx$1.u(timerResource(opts.gracePeriodMs)); + let count4 = opts.count; + let timerPromise = new Promise(() => { + }); + while (true) { + result = yield (0, import_awaitAsyncGenerator$4.default)(Unpromise.race([iterator2.next(), timerPromise])); + if (result === disposablePromiseTimerResult) + throwAbortError(); + if (result.done) + return result.value; + yield result.value; + if (--count4 === 0) + timerPromise = timer.start(); + result = null; + } + } catch (_) { + _usingCtx$1.e = _; + } finally { + yield (0, import_awaitAsyncGenerator$4.default)(_usingCtx$1.d()); + } + }); + return _takeWithGrace.apply(this, arguments); +} +function createDeferred() { + let resolve; + let reject; + const promise2 = new Promise((res, rej) => { + resolve = res; + reject = rej; + }); + return { + promise: promise2, + resolve, + reject + }; +} +function createManagedIterator(iterable, onResult) { + const iterator2 = iterable[Symbol.asyncIterator](); + let state = "idle"; + function cleanup() { + state = "done"; + onResult = /* @__PURE__ */ __name(() => { + }, "onResult"); + } + __name(cleanup, "cleanup"); + function pull() { + if (state !== "idle") + return; + state = "pending"; + const next = iterator2.next(); + next.then((result) => { + if (result.done) { + state = "done"; + onResult({ + status: "return", + value: result.value + }); + cleanup(); + return; + } + state = "idle"; + onResult({ + status: "yield", + value: result.value + }); + }).catch((cause) => { + onResult({ + status: "error", + error: cause + }); + cleanup(); + }); + } + __name(pull, "pull"); + return { + pull, + destroy: async () => { + var _iterator$return; + cleanup(); + await ((_iterator$return = iterator2.return) === null || _iterator$return === void 0 ? void 0 : _iterator$return.call(iterator2)); + } + }; +} +function mergeAsyncIterables() { + let state = "idle"; + let flushSignal = createDeferred(); + const iterables = []; + const iterators = /* @__PURE__ */ new Set(); + const buffer = []; + function initIterable(iterable) { + if (state !== "pending") + return; + const iterator2 = createManagedIterator(iterable, (result) => { + if (state !== "pending") + return; + switch (result.status) { + case "yield": + buffer.push([iterator2, result]); + break; + case "return": + iterators.delete(iterator2); + break; + case "error": + buffer.push([iterator2, result]); + iterators.delete(iterator2); + break; + } + flushSignal.resolve(); + }); + iterators.add(iterator2); + iterator2.pull(); + } + __name(initIterable, "initIterable"); + return { + add(iterable) { + switch (state) { + case "idle": + iterables.push(iterable); + break; + case "pending": + initIterable(iterable); + break; + case "done": + break; + } + }, + [Symbol.asyncIterator]() { + return (0, import_wrapAsyncGenerator$4.default)(function* () { + try { + var _usingCtx$1 = (0, import_usingCtx$3.default)(); + if (state !== "idle") + throw new Error("Cannot iterate twice"); + state = "pending"; + const _finally = _usingCtx$1.a(makeAsyncResource({}, async () => { + state = "done"; + const errors = []; + await Promise.all(Array.from(iterators.values()).map(async (it) => { + try { + await it.destroy(); + } catch (cause) { + errors.push(cause); + } + })); + buffer.length = 0; + iterators.clear(); + flushSignal.resolve(); + if (errors.length > 0) + throw new AggregateError(errors); + })); + while (iterables.length > 0) + initIterable(iterables.shift()); + while (iterators.size > 0) { + yield (0, import_awaitAsyncGenerator$3.default)(flushSignal.promise); + while (buffer.length > 0) { + const [iterator2, result] = buffer.shift(); + switch (result.status) { + case "yield": + yield result.value; + iterator2.pull(); + break; + case "error": + throw result.error; + } + } + flushSignal = createDeferred(); + } + } catch (_) { + _usingCtx$1.e = _; + } finally { + yield (0, import_awaitAsyncGenerator$3.default)(_usingCtx$1.d()); + } + })(); + } + }; +} +function readableStreamFrom(iterable) { + const iterator2 = iterable[Symbol.asyncIterator](); + return new ReadableStream({ + async cancel() { + var _iterator$return; + await ((_iterator$return = iterator2.return) === null || _iterator$return === void 0 ? void 0 : _iterator$return.call(iterator2)); + }, + async pull(controller) { + const result = await iterator2.next(); + if (result.done) { + controller.close(); + return; + } + controller.enqueue(result.value); + } + }); +} +function withPing(_x2, _x22) { + return _withPing.apply(this, arguments); +} +function _withPing() { + _withPing = (0, import_wrapAsyncGenerator$3.default)(function* (iterable, pingIntervalMs) { + try { + var _usingCtx$1 = (0, import_usingCtx$2.default)(); + const iterator2 = _usingCtx$1.a(iteratorResource(iterable)); + let result; + let nextPromise = iterator2.next(); + while (true) + try { + var _usingCtx3 = (0, import_usingCtx$2.default)(); + const pingPromise = _usingCtx3.u(timerResource(pingIntervalMs)); + result = yield (0, import_awaitAsyncGenerator$2.default)(Unpromise.race([nextPromise, pingPromise.start()])); + if (result === disposablePromiseTimerResult) { + yield PING_SYM; + continue; + } + if (result.done) + return result.value; + nextPromise = iterator2.next(); + yield result.value; + result = null; + } catch (_) { + _usingCtx3.e = _; + } finally { + _usingCtx3.d(); + } + } catch (_) { + _usingCtx$1.e = _; + } finally { + yield (0, import_awaitAsyncGenerator$2.default)(_usingCtx$1.d()); + } + }); + return _withPing.apply(this, arguments); +} +function isPromise(value) { + return (isObject(value) || isFunction(value)) && typeof (value === null || value === void 0 ? void 0 : value["then"]) === "function" && typeof (value === null || value === void 0 ? void 0 : value["catch"]) === "function"; +} +function createBatchStreamProducer(_x3) { + return _createBatchStreamProducer.apply(this, arguments); +} +function _createBatchStreamProducer() { + _createBatchStreamProducer = (0, import_wrapAsyncGenerator$2.default)(function* (opts) { + const { data } = opts; + let counter = 0; + const placeholder = 0; + const mergedIterables = mergeAsyncIterables(); + function registerAsync(callback) { + const idx = counter++; + const iterable$1 = callback(idx); + mergedIterables.add(iterable$1); + return idx; + } + __name(registerAsync, "registerAsync"); + function encodePromise(promise2, path) { + return registerAsync(/* @__PURE__ */ function() { + var _ref = (0, import_wrapAsyncGenerator$2.default)(function* (idx) { + const error50 = checkMaxDepth(path); + if (error50) { + promise2.catch((cause) => { + var _opts$onError; + (_opts$onError = opts.onError) === null || _opts$onError === void 0 || _opts$onError.call(opts, { + error: cause, + path + }); + }); + promise2 = Promise.reject(error50); + } + try { + const next = yield (0, import_awaitAsyncGenerator$1.default)(promise2); + yield [ + idx, + PROMISE_STATUS_FULFILLED, + encode7(next, path) + ]; + } catch (cause) { + var _opts$onError2, _opts$formatError; + (_opts$onError2 = opts.onError) === null || _opts$onError2 === void 0 || _opts$onError2.call(opts, { + error: cause, + path + }); + yield [ + idx, + PROMISE_STATUS_REJECTED, + (_opts$formatError = opts.formatError) === null || _opts$formatError === void 0 ? void 0 : _opts$formatError.call(opts, { + error: cause, + path + }) + ]; + } + }); + return function(_x2) { + return _ref.apply(this, arguments); + }; + }()); + } + __name(encodePromise, "encodePromise"); + function encodeAsyncIterable(iterable$1, path) { + return registerAsync(/* @__PURE__ */ function() { + var _ref2 = (0, import_wrapAsyncGenerator$2.default)(function* (idx) { + try { + var _usingCtx$1 = (0, import_usingCtx$1.default)(); + const error50 = checkMaxDepth(path); + if (error50) + throw error50; + const iterator2 = _usingCtx$1.a(iteratorResource(iterable$1)); + try { + while (true) { + const next = yield (0, import_awaitAsyncGenerator$1.default)(iterator2.next()); + if (next.done) { + yield [ + idx, + ASYNC_ITERABLE_STATUS_RETURN, + encode7(next.value, path) + ]; + break; + } + yield [ + idx, + ASYNC_ITERABLE_STATUS_YIELD, + encode7(next.value, path) + ]; + } + } catch (cause) { + var _opts$onError3, _opts$formatError2; + (_opts$onError3 = opts.onError) === null || _opts$onError3 === void 0 || _opts$onError3.call(opts, { + error: cause, + path + }); + yield [ + idx, + ASYNC_ITERABLE_STATUS_ERROR, + (_opts$formatError2 = opts.formatError) === null || _opts$formatError2 === void 0 ? void 0 : _opts$formatError2.call(opts, { + error: cause, + path + }) + ]; + } + } catch (_) { + _usingCtx$1.e = _; + } finally { + yield (0, import_awaitAsyncGenerator$1.default)(_usingCtx$1.d()); + } + }); + return function(_x2) { + return _ref2.apply(this, arguments); + }; + }()); + } + __name(encodeAsyncIterable, "encodeAsyncIterable"); + function checkMaxDepth(path) { + if (opts.maxDepth && path.length > opts.maxDepth) + return new MaxDepthError(path); + return null; + } + __name(checkMaxDepth, "checkMaxDepth"); + function encodeAsync3(value, path) { + if (isPromise(value)) + return [CHUNK_VALUE_TYPE_PROMISE, encodePromise(value, path)]; + if (isAsyncIterable(value)) { + if (opts.maxDepth && path.length >= opts.maxDepth) + throw new Error("Max depth reached"); + return [CHUNK_VALUE_TYPE_ASYNC_ITERABLE, encodeAsyncIterable(value, path)]; + } + return null; + } + __name(encodeAsync3, "encodeAsync"); + function encode7(value, path) { + if (value === void 0) + return [[]]; + const reg = encodeAsync3(value, path); + if (reg) + return [[placeholder], [null, ...reg]]; + if (!isPlainObject(value)) + return [[value]]; + const newObj = emptyObject(); + const asyncValues = []; + for (const [key, item] of Object.entries(value)) { + const transformed = encodeAsync3(item, [...path, key]); + if (!transformed) { + newObj[key] = item; + continue; + } + newObj[key] = placeholder; + asyncValues.push([key, ...transformed]); + } + return [[newObj], ...asyncValues]; + } + __name(encode7, "encode"); + const newHead = emptyObject(); + for (const [key, item] of Object.entries(data)) + newHead[key] = encode7(item, [key]); + yield newHead; + let iterable = mergedIterables; + if (opts.pingMs) + iterable = withPing(mergedIterables, opts.pingMs); + var _iteratorAbruptCompletion = false; + var _didIteratorError = false; + var _iteratorError; + try { + for (var _iterator = (0, import_asyncIterator$1.default)(iterable), _step; _iteratorAbruptCompletion = !(_step = yield (0, import_awaitAsyncGenerator$1.default)(_iterator.next())).done; _iteratorAbruptCompletion = false) { + const value = _step.value; + yield value; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (_iteratorAbruptCompletion && _iterator.return != null) + yield (0, import_awaitAsyncGenerator$1.default)(_iterator.return()); + } finally { + if (_didIteratorError) + throw _iteratorError; + } + } + }); + return _createBatchStreamProducer.apply(this, arguments); +} +function jsonlStreamProducer(opts) { + let stream = readableStreamFrom(createBatchStreamProducer(opts)); + const { serialize } = opts; + if (serialize) + stream = stream.pipeThrough(new TransformStream({ transform(chunk, controller) { + if (chunk === PING_SYM) + controller.enqueue(PING_SYM); + else + controller.enqueue(serialize(chunk)); + } })); + return stream.pipeThrough(new TransformStream({ transform(chunk, controller) { + if (chunk === PING_SYM) + controller.enqueue(" "); + else + controller.enqueue(JSON.stringify(chunk) + "\n"); + } })).pipeThrough(new TextEncoderStream()); +} +function sseStreamProducer(opts) { + var _opts$ping$enabled, _opts$ping, _opts$ping$intervalMs, _opts$ping2, _opts$client; + const { serialize = identity } = opts; + const ping = { + enabled: (_opts$ping$enabled = (_opts$ping = opts.ping) === null || _opts$ping === void 0 ? void 0 : _opts$ping.enabled) !== null && _opts$ping$enabled !== void 0 ? _opts$ping$enabled : false, + intervalMs: (_opts$ping$intervalMs = (_opts$ping2 = opts.ping) === null || _opts$ping2 === void 0 ? void 0 : _opts$ping2.intervalMs) !== null && _opts$ping$intervalMs !== void 0 ? _opts$ping$intervalMs : 1e3 + }; + const client = (_opts$client = opts.client) !== null && _opts$client !== void 0 ? _opts$client : {}; + if (ping.enabled && client.reconnectAfterInactivityMs && ping.intervalMs > client.reconnectAfterInactivityMs) + throw new Error(`Ping interval must be less than client reconnect interval to prevent unnecessary reconnection - ping.intervalMs: ${ping.intervalMs} client.reconnectAfterInactivityMs: ${client.reconnectAfterInactivityMs}`); + function generator() { + return _generator.apply(this, arguments); + } + __name(generator, "generator"); + function _generator() { + _generator = (0, import_wrapAsyncGenerator$1.default)(function* () { + yield { + event: CONNECTED_EVENT, + data: JSON.stringify(client) + }; + let iterable = opts.data; + if (opts.emitAndEndImmediately) + iterable = takeWithGrace(iterable, { + count: 1, + gracePeriodMs: 1 + }); + if (ping.enabled && ping.intervalMs !== Infinity && ping.intervalMs > 0) + iterable = withPing(iterable, ping.intervalMs); + let value; + let chunk; + var _iteratorAbruptCompletion = false; + var _didIteratorError = false; + var _iteratorError; + try { + for (var _iterator = (0, import_asyncIterator.default)(iterable), _step; _iteratorAbruptCompletion = !(_step = yield (0, import_awaitAsyncGenerator.default)(_iterator.next())).done; _iteratorAbruptCompletion = false) { + value = _step.value; + { + if (value === PING_SYM) { + yield { + event: PING_EVENT, + data: "" + }; + continue; + } + chunk = isTrackedEnvelope(value) ? { + id: value[0], + data: value[1] + } : { data: value }; + chunk.data = JSON.stringify(serialize(chunk.data)); + yield chunk; + value = null; + chunk = null; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (_iteratorAbruptCompletion && _iterator.return != null) + yield (0, import_awaitAsyncGenerator.default)(_iterator.return()); + } finally { + if (_didIteratorError) + throw _iteratorError; + } + } + }); + return _generator.apply(this, arguments); + } + __name(_generator, "_generator"); + function generatorWithErrorHandling() { + return _generatorWithErrorHandling.apply(this, arguments); + } + __name(generatorWithErrorHandling, "generatorWithErrorHandling"); + function _generatorWithErrorHandling() { + _generatorWithErrorHandling = (0, import_wrapAsyncGenerator$1.default)(function* () { + try { + yield* (0, import_asyncGeneratorDelegate.default)((0, import_asyncIterator.default)(generator())); + yield { + event: RETURN_EVENT, + data: "" + }; + } catch (cause) { + var _opts$formatError, _opts$formatError2; + if (isAbortError(cause)) + return; + const error50 = getTRPCErrorFromUnknown(cause); + const data = (_opts$formatError = (_opts$formatError2 = opts.formatError) === null || _opts$formatError2 === void 0 ? void 0 : _opts$formatError2.call(opts, { error: error50 })) !== null && _opts$formatError !== void 0 ? _opts$formatError : null; + yield { + event: SERIALIZED_ERROR_EVENT, + data: JSON.stringify(serialize(data)) + }; + } + }); + return _generatorWithErrorHandling.apply(this, arguments); + } + __name(_generatorWithErrorHandling, "_generatorWithErrorHandling"); + const stream = readableStreamFrom(generatorWithErrorHandling()); + return stream.pipeThrough(new TransformStream({ transform(chunk, controller) { + if ("event" in chunk) + controller.enqueue(`event: ${chunk.event} +`); + if ("data" in chunk) + controller.enqueue(`data: ${chunk.data} +`); + if ("id" in chunk) + controller.enqueue(`id: ${chunk.id} +`); + if ("comment" in chunk) + controller.enqueue(`: ${chunk.comment} +`); + controller.enqueue("\n\n"); + } })).pipeThrough(new TextEncoderStream()); +} +function errorToAsyncIterable(err) { + return run((0, import_wrapAsyncGenerator.default)(function* () { + throw err; + })); +} +function combinedAbortController(signal) { + const controller = new AbortController(); + const combinedSignal = abortSignalsAnyPonyfill([signal, controller.signal]); + return { + signal: combinedSignal, + controller + }; +} +function initResponse(initOpts) { + var _responseMeta, _info$calls$find$proc, _info$calls$find; + const { ctx, info: info3, responseMeta, untransformedJSON, errors = [], headers } = initOpts; + let status = untransformedJSON ? getHTTPStatusCode(untransformedJSON) : 200; + const eagerGeneration = !untransformedJSON; + const data = eagerGeneration ? [] : Array.isArray(untransformedJSON) ? untransformedJSON : [untransformedJSON]; + const meta3 = (_responseMeta = responseMeta === null || responseMeta === void 0 ? void 0 : responseMeta({ + ctx, + info: info3, + paths: info3 === null || info3 === void 0 ? void 0 : info3.calls.map((call) => call.path), + data, + errors, + eagerGeneration, + type: (_info$calls$find$proc = info3 === null || info3 === void 0 || (_info$calls$find = info3.calls.find((call) => { + var _call$procedure; + return (_call$procedure = call.procedure) === null || _call$procedure === void 0 ? void 0 : _call$procedure._def.type; + })) === null || _info$calls$find === void 0 || (_info$calls$find = _info$calls$find.procedure) === null || _info$calls$find === void 0 ? void 0 : _info$calls$find._def.type) !== null && _info$calls$find$proc !== void 0 ? _info$calls$find$proc : "unknown" + })) !== null && _responseMeta !== void 0 ? _responseMeta : {}; + if (meta3.headers) { + if (meta3.headers instanceof Headers) + for (const [key, value] of meta3.headers.entries()) + headers.append(key, value); + else + for (const [key, value] of Object.entries(meta3.headers)) + if (Array.isArray(value)) + for (const v3 of value) + headers.append(key, v3); + else if (typeof value === "string") + headers.set(key, value); + } + if (meta3.status) + status = meta3.status; + return { status }; +} +function caughtErrorToData(cause, errorOpts) { + const { router: router8, req, onError } = errorOpts.opts; + const error50 = getTRPCErrorFromUnknown(cause); + onError === null || onError === void 0 || onError({ + error: error50, + path: errorOpts.path, + input: errorOpts.input, + ctx: errorOpts.ctx, + type: errorOpts.type, + req + }); + const untransformedJSON = { error: getErrorShape({ + config: router8._def._config, + error: error50, + type: errorOpts.type, + path: errorOpts.path, + input: errorOpts.input, + ctx: errorOpts.ctx + }) }; + const transformedJSON = transformTRPCResponse(router8._def._config, untransformedJSON); + const body = JSON.stringify(transformedJSON); + return { + error: error50, + untransformedJSON, + body + }; +} +function isDataStream(v3) { + if (!isObject(v3)) + return false; + if (isAsyncIterable(v3)) + return true; + return Object.values(v3).some(isPromise) || Object.values(v3).some(isAsyncIterable); +} +async function resolveResponse(opts) { + var _ref, _opts$allowBatching, _opts$batching, _opts$allowMethodOver, _config$sse$enabled, _config$sse; + const { router: router8, req } = opts; + const headers = new Headers([["vary", "trpc-accept, accept"]]); + const config3 = router8._def._config; + const url2 = new URL(req.url); + if (req.method === "HEAD") + return new Response(null, { status: 204 }); + const allowBatching = (_ref = (_opts$allowBatching = opts.allowBatching) !== null && _opts$allowBatching !== void 0 ? _opts$allowBatching : (_opts$batching = opts.batching) === null || _opts$batching === void 0 ? void 0 : _opts$batching.enabled) !== null && _ref !== void 0 ? _ref : true; + const allowMethodOverride = ((_opts$allowMethodOver = opts.allowMethodOverride) !== null && _opts$allowMethodOver !== void 0 ? _opts$allowMethodOver : false) && req.method === "POST"; + const infoTuple = await run(async () => { + try { + return [void 0, await getRequestInfo({ + req, + path: decodeURIComponent(opts.path), + router: router8, + searchParams: url2.searchParams, + headers: opts.req.headers, + url: url2 + })]; + } catch (cause) { + return [getTRPCErrorFromUnknown(cause), void 0]; + } + }); + const ctxManager = run(() => { + let result = void 0; + return { + valueOrUndefined: () => { + if (!result) + return void 0; + return result[1]; + }, + value: () => { + const [err, ctx] = result; + if (err) + throw err; + return ctx; + }, + create: async (info3) => { + if (result) + throw new Error("This should only be called once - report a bug in tRPC"); + try { + const ctx = await opts.createContext({ info: info3 }); + result = [void 0, ctx]; + } catch (cause) { + result = [getTRPCErrorFromUnknown(cause), void 0]; + } + } + }; + }); + const methodMapper = allowMethodOverride ? TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE : TYPE_ACCEPTED_METHOD_MAP; + const isStreamCall = getAcceptHeader(req.headers) === "application/jsonl"; + const experimentalSSE = (_config$sse$enabled = (_config$sse = config3.sse) === null || _config$sse === void 0 ? void 0 : _config$sse.enabled) !== null && _config$sse$enabled !== void 0 ? _config$sse$enabled : true; + try { + const [infoError, info3] = infoTuple; + if (infoError) + throw infoError; + if (info3.isBatchCall && !allowBatching) + throw new TRPCError({ + code: "BAD_REQUEST", + message: `Batching is not enabled on the server` + }); + if (isStreamCall && !info3.isBatchCall) + throw new TRPCError({ + message: `Streaming requests must be batched (you can do a batch of 1)`, + code: "BAD_REQUEST" + }); + await ctxManager.create(info3); + const rpcCalls = info3.calls.map(async (call) => { + const proc = call.procedure; + const combinedAbort = combinedAbortController(opts.req.signal); + try { + if (opts.error) + throw opts.error; + if (!proc) + throw new TRPCError({ + code: "NOT_FOUND", + message: `No procedure found on path "${call.path}"` + }); + if (!methodMapper[proc._def.type].includes(req.method)) + throw new TRPCError({ + code: "METHOD_NOT_SUPPORTED", + message: `Unsupported ${req.method}-request to ${proc._def.type} procedure at path "${call.path}"` + }); + if (proc._def.type === "subscription") { + var _config$sse2; + if (info3.isBatchCall) + throw new TRPCError({ + code: "BAD_REQUEST", + message: `Cannot batch subscription calls` + }); + if ((_config$sse2 = config3.sse) === null || _config$sse2 === void 0 ? void 0 : _config$sse2.maxDurationMs) { + let cleanup = function() { + clearTimeout(timer); + combinedAbort.signal.removeEventListener("abort", cleanup); + combinedAbort.controller.abort(); + }; + __name(cleanup, "cleanup"); + const timer = setTimeout(cleanup, config3.sse.maxDurationMs); + combinedAbort.signal.addEventListener("abort", cleanup); + } + } + const data = await proc({ + path: call.path, + getRawInput: call.getRawInput, + ctx: ctxManager.value(), + type: proc._def.type, + signal: combinedAbort.signal, + batchIndex: call.batchIndex + }); + return [void 0, { + data, + signal: proc._def.type === "subscription" ? combinedAbort.signal : void 0 + }]; + } catch (cause) { + var _opts$onError, _call$procedure$_def$, _call$procedure2; + const error50 = getTRPCErrorFromUnknown(cause); + const input = call.result(); + (_opts$onError = opts.onError) === null || _opts$onError === void 0 || _opts$onError.call(opts, { + error: error50, + path: call.path, + input, + ctx: ctxManager.valueOrUndefined(), + type: (_call$procedure$_def$ = (_call$procedure2 = call.procedure) === null || _call$procedure2 === void 0 ? void 0 : _call$procedure2._def.type) !== null && _call$procedure$_def$ !== void 0 ? _call$procedure$_def$ : "unknown", + req: opts.req + }); + return [error50, void 0]; + } + }); + if (!info3.isBatchCall) { + const [call] = info3.calls; + const [error50, result] = await rpcCalls[0]; + switch (info3.type) { + case "unknown": + case "mutation": + case "query": { + headers.set("content-type", "application/json"); + if (isDataStream(result === null || result === void 0 ? void 0 : result.data)) + throw new TRPCError({ + code: "UNSUPPORTED_MEDIA_TYPE", + message: "Cannot use stream-like response in non-streaming request - use httpBatchStreamLink" + }); + const res = error50 ? { error: getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error50, + input: call.result(), + path: call.path, + type: info3.type + }) } : { result: { data: result.data } }; + const headResponse$1 = initResponse({ + ctx: ctxManager.valueOrUndefined(), + info: info3, + responseMeta: opts.responseMeta, + errors: error50 ? [error50] : [], + headers, + untransformedJSON: [res] + }); + return new Response(JSON.stringify(transformTRPCResponse(config3, res)), { + status: headResponse$1.status, + headers + }); + } + case "subscription": { + const iterable = run(() => { + if (error50) + return errorToAsyncIterable(error50); + if (!experimentalSSE) + return errorToAsyncIterable(new TRPCError({ + code: "METHOD_NOT_SUPPORTED", + message: 'Missing experimental flag "sseSubscriptions"' + })); + if (!isObservable(result.data) && !isAsyncIterable(result.data)) + return errorToAsyncIterable(new TRPCError({ + message: `Subscription ${call.path} did not return an observable or a AsyncGenerator`, + code: "INTERNAL_SERVER_ERROR" + })); + const dataAsIterable = isObservable(result.data) ? observableToAsyncIterable(result.data, opts.req.signal) : result.data; + return dataAsIterable; + }); + const stream = sseStreamProducer((0, import_objectSpread23.default)((0, import_objectSpread23.default)({}, config3.sse), {}, { + data: iterable, + serialize: (v3) => config3.transformer.output.serialize(v3), + formatError(errorOpts) { + var _call$procedure$_def$2, _call$procedure3, _opts$onError2; + const error$1 = getTRPCErrorFromUnknown(errorOpts.error); + const input = call === null || call === void 0 ? void 0 : call.result(); + const path = call === null || call === void 0 ? void 0 : call.path; + const type = (_call$procedure$_def$2 = call === null || call === void 0 || (_call$procedure3 = call.procedure) === null || _call$procedure3 === void 0 ? void 0 : _call$procedure3._def.type) !== null && _call$procedure$_def$2 !== void 0 ? _call$procedure$_def$2 : "unknown"; + (_opts$onError2 = opts.onError) === null || _opts$onError2 === void 0 || _opts$onError2.call(opts, { + error: error$1, + path, + input, + ctx: ctxManager.valueOrUndefined(), + req: opts.req, + type + }); + const shape = getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error$1, + input, + path, + type + }); + return shape; + } + })); + for (const [key, value] of Object.entries(sseHeaders)) + headers.set(key, value); + const headResponse$1 = initResponse({ + ctx: ctxManager.valueOrUndefined(), + info: info3, + responseMeta: opts.responseMeta, + errors: [], + headers, + untransformedJSON: null + }); + const abortSignal = result === null || result === void 0 ? void 0 : result.signal; + let responseBody = stream; + if (abortSignal) { + const reader = stream.getReader(); + const onAbort = /* @__PURE__ */ __name(() => void reader.cancel(), "onAbort"); + if (abortSignal.aborted) + onAbort(); + else + abortSignal.addEventListener("abort", onAbort, { once: true }); + responseBody = new ReadableStream({ + async pull(controller) { + const chunk = await reader.read(); + if (chunk.done) { + abortSignal.removeEventListener("abort", onAbort); + controller.close(); + } else + controller.enqueue(chunk.value); + }, + cancel() { + abortSignal.removeEventListener("abort", onAbort); + return reader.cancel(); + } + }); + } + return new Response(responseBody, { + headers, + status: headResponse$1.status + }); + } + } + } + if (info3.accept === "application/jsonl") { + headers.set("content-type", "application/json"); + headers.set("transfer-encoding", "chunked"); + const headResponse$1 = initResponse({ + ctx: ctxManager.valueOrUndefined(), + info: info3, + responseMeta: opts.responseMeta, + errors: [], + headers, + untransformedJSON: null + }); + const stream = jsonlStreamProducer((0, import_objectSpread23.default)((0, import_objectSpread23.default)({}, config3.jsonl), {}, { + maxDepth: Infinity, + data: rpcCalls.map(async (res) => { + const [error50, result] = await res; + const call = info3.calls[0]; + if (error50) { + var _procedure$_def$type, _procedure; + return { error: getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error50, + input: call.result(), + path: call.path, + type: (_procedure$_def$type = (_procedure = call.procedure) === null || _procedure === void 0 ? void 0 : _procedure._def.type) !== null && _procedure$_def$type !== void 0 ? _procedure$_def$type : "unknown" + }) }; + } + const iterable = isObservable(result.data) ? observableToAsyncIterable(result.data, opts.req.signal) : Promise.resolve(result.data); + return { result: Promise.resolve({ data: iterable }) }; + }), + serialize: (data) => config3.transformer.output.serialize(data), + onError: (cause) => { + var _opts$onError3, _info$type; + (_opts$onError3 = opts.onError) === null || _opts$onError3 === void 0 || _opts$onError3.call(opts, { + error: getTRPCErrorFromUnknown(cause), + path: void 0, + input: void 0, + ctx: ctxManager.valueOrUndefined(), + req: opts.req, + type: (_info$type = info3 === null || info3 === void 0 ? void 0 : info3.type) !== null && _info$type !== void 0 ? _info$type : "unknown" + }); + }, + formatError(errorOpts) { + var _call$procedure$_def$3, _call$procedure4; + const call = info3 === null || info3 === void 0 ? void 0 : info3.calls[errorOpts.path[0]]; + const error50 = getTRPCErrorFromUnknown(errorOpts.error); + const input = call === null || call === void 0 ? void 0 : call.result(); + const path = call === null || call === void 0 ? void 0 : call.path; + const type = (_call$procedure$_def$3 = call === null || call === void 0 || (_call$procedure4 = call.procedure) === null || _call$procedure4 === void 0 ? void 0 : _call$procedure4._def.type) !== null && _call$procedure$_def$3 !== void 0 ? _call$procedure$_def$3 : "unknown"; + const shape = getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error50, + input, + path, + type + }); + return shape; + } + })); + return new Response(stream, { + headers, + status: headResponse$1.status + }); + } + headers.set("content-type", "application/json"); + const results = (await Promise.all(rpcCalls)).map((res) => { + const [error50, result] = res; + if (error50) + return res; + if (isDataStream(result.data)) + return [new TRPCError({ + code: "UNSUPPORTED_MEDIA_TYPE", + message: "Cannot use stream-like response in non-streaming request - use httpBatchStreamLink" + }), void 0]; + return res; + }); + const resultAsRPCResponse = results.map(([error50, result], index) => { + const call = info3.calls[index]; + if (error50) { + var _call$procedure$_def$4, _call$procedure5; + return { error: getErrorShape({ + config: config3, + ctx: ctxManager.valueOrUndefined(), + error: error50, + input: call.result(), + path: call.path, + type: (_call$procedure$_def$4 = (_call$procedure5 = call.procedure) === null || _call$procedure5 === void 0 ? void 0 : _call$procedure5._def.type) !== null && _call$procedure$_def$4 !== void 0 ? _call$procedure$_def$4 : "unknown" + }) }; + } + return { result: { data: result.data } }; + }); + const errors = results.map(([error50]) => error50).filter(Boolean); + const headResponse = initResponse({ + ctx: ctxManager.valueOrUndefined(), + info: info3, + responseMeta: opts.responseMeta, + untransformedJSON: resultAsRPCResponse, + errors, + headers + }); + return new Response(JSON.stringify(transformTRPCResponse(config3, resultAsRPCResponse)), { + status: headResponse.status, + headers + }); + } catch (cause) { + var _info$type2; + const [_infoError, info3] = infoTuple; + const ctx = ctxManager.valueOrUndefined(); + const { error: error50, untransformedJSON, body } = caughtErrorToData(cause, { + opts, + ctx: ctxManager.valueOrUndefined(), + type: (_info$type2 = info3 === null || info3 === void 0 ? void 0 : info3.type) !== null && _info$type2 !== void 0 ? _info$type2 : "unknown" + }); + const headResponse = initResponse({ + ctx, + info: info3, + responseMeta: opts.responseMeta, + untransformedJSON, + errors: [error50], + headers + }); + return new Response(body, { + status: headResponse.status, + headers + }); + } +} +var import_objectSpread2$12, jsonContentTypeHandler, formDataContentTypeHandler, octetStreamContentTypeHandler, handlers, import_defineProperty2, _Symbol$toStringTag, subscribableCache, NOOP, Unpromise, _Symbol, _Symbol$dispose, _Symbol2, _Symbol2$asyncDispose, disposablePromiseTimerResult, require_usingCtx, require_OverloadYield, require_awaitAsyncGenerator, require_wrapAsyncGenerator, import_usingCtx$4, import_awaitAsyncGenerator$4, import_wrapAsyncGenerator$5, import_usingCtx$3, import_awaitAsyncGenerator$3, import_wrapAsyncGenerator$4, import_usingCtx$2, import_awaitAsyncGenerator$2, import_wrapAsyncGenerator$3, PING_SYM, require_asyncIterator, import_awaitAsyncGenerator$1, import_wrapAsyncGenerator$2, import_usingCtx$1, import_asyncIterator$1, CHUNK_VALUE_TYPE_PROMISE, CHUNK_VALUE_TYPE_ASYNC_ITERABLE, PROMISE_STATUS_FULFILLED, PROMISE_STATUS_REJECTED, ASYNC_ITERABLE_STATUS_RETURN, ASYNC_ITERABLE_STATUS_YIELD, ASYNC_ITERABLE_STATUS_ERROR, MaxDepthError, require_asyncGeneratorDelegate, import_asyncIterator, import_awaitAsyncGenerator, import_wrapAsyncGenerator$1, import_asyncGeneratorDelegate, import_usingCtx, PING_EVENT, SERIALIZED_ERROR_EVENT, CONNECTED_EVENT, RETURN_EVENT, sseHeaders, import_wrapAsyncGenerator, import_objectSpread23, TYPE_ACCEPTED_METHOD_MAP, TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE; +var init_resolveResponse_CHqBlAgR = __esm({ + "../../node_modules/@trpc/server/dist/resolveResponse-CHqBlAgR.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getErrorShape_vC8mUXJD(); + init_codes_DagpWZLc(); + init_tracked_Bjtgv3wJ(); + init_observable_UMO3vUa(); + __name(parseConnectionParamsFromUnknown, "parseConnectionParamsFromUnknown"); + __name(parseConnectionParamsFromString, "parseConnectionParamsFromString"); + import_objectSpread2$12 = __toESM2(require_objectSpread2(), 1); + __name(getAcceptHeader, "getAcceptHeader"); + __name(memo, "memo"); + jsonContentTypeHandler = { + isMatch(req) { + var _req$headers$get; + return !!((_req$headers$get = req.headers.get("content-type")) === null || _req$headers$get === void 0 ? void 0 : _req$headers$get.startsWith("application/json")); + }, + async parse(opts) { + var _types$values$next$va; + const { req } = opts; + const isBatchCall = opts.searchParams.get("batch") === "1"; + const paths = isBatchCall ? opts.path.split(",") : [opts.path]; + const getInputs = memo(async () => { + let inputs = void 0; + if (req.method === "GET") { + const queryInput = opts.searchParams.get("input"); + if (queryInput) + inputs = JSON.parse(queryInput); + } else + inputs = await req.json(); + if (inputs === void 0) + return emptyObject(); + if (!isBatchCall) { + const result = emptyObject(); + result[0] = opts.router._def._config.transformer.input.deserialize(inputs); + return result; + } + if (!isObject(inputs)) + throw new TRPCError({ + code: "BAD_REQUEST", + message: '"input" needs to be an object when doing a batch call' + }); + const acc = emptyObject(); + for (const index of paths.keys()) { + const input = inputs[index]; + if (input !== void 0) + acc[index] = opts.router._def._config.transformer.input.deserialize(input); + } + return acc; + }); + const calls = await Promise.all(paths.map(async (path, index) => { + const procedure = await getProcedureAtPath(opts.router, path); + return { + batchIndex: index, + path, + procedure, + getRawInput: async () => { + const inputs = await getInputs.read(); + let input = inputs[index]; + if ((procedure === null || procedure === void 0 ? void 0 : procedure._def.type) === "subscription") { + var _ref2, _opts$headers$get; + const lastEventId = (_ref2 = (_opts$headers$get = opts.headers.get("last-event-id")) !== null && _opts$headers$get !== void 0 ? _opts$headers$get : opts.searchParams.get("lastEventId")) !== null && _ref2 !== void 0 ? _ref2 : opts.searchParams.get("Last-Event-Id"); + if (lastEventId) + if (isObject(input)) + input = (0, import_objectSpread2$12.default)((0, import_objectSpread2$12.default)({}, input), {}, { lastEventId }); + else { + var _input; + (_input = input) !== null && _input !== void 0 || (input = { lastEventId }); + } + } + return input; + }, + result: () => { + var _getInputs$result; + return (_getInputs$result = getInputs.result()) === null || _getInputs$result === void 0 ? void 0 : _getInputs$result[index]; + } + }; + })); + const types = new Set(calls.map((call) => { + var _call$procedure; + return (_call$procedure = call.procedure) === null || _call$procedure === void 0 ? void 0 : _call$procedure._def.type; + }).filter(Boolean)); + if (types.size > 1) + throw new TRPCError({ + code: "BAD_REQUEST", + message: `Cannot mix procedure types in call: ${Array.from(types).join(", ")}` + }); + const type = (_types$values$next$va = types.values().next().value) !== null && _types$values$next$va !== void 0 ? _types$values$next$va : "unknown"; + const connectionParamsStr = opts.searchParams.get("connectionParams"); + const info3 = { + isBatchCall, + accept: getAcceptHeader(req.headers), + calls, + type, + connectionParams: connectionParamsStr === null ? null : parseConnectionParamsFromString(connectionParamsStr), + signal: req.signal, + url: opts.url + }; + return info3; + } + }; + formDataContentTypeHandler = { + isMatch(req) { + var _req$headers$get2; + return !!((_req$headers$get2 = req.headers.get("content-type")) === null || _req$headers$get2 === void 0 ? void 0 : _req$headers$get2.startsWith("multipart/form-data")); + }, + async parse(opts) { + const { req } = opts; + if (req.method !== "POST") + throw new TRPCError({ + code: "METHOD_NOT_SUPPORTED", + message: "Only POST requests are supported for multipart/form-data requests" + }); + const getInputs = memo(async () => { + const fd = await req.formData(); + return fd; + }); + const procedure = await getProcedureAtPath(opts.router, opts.path); + return { + accept: null, + calls: [{ + batchIndex: 0, + path: opts.path, + getRawInput: getInputs.read, + result: getInputs.result, + procedure + }], + isBatchCall: false, + type: "mutation", + connectionParams: null, + signal: req.signal, + url: opts.url + }; + } + }; + octetStreamContentTypeHandler = { + isMatch(req) { + var _req$headers$get3; + return !!((_req$headers$get3 = req.headers.get("content-type")) === null || _req$headers$get3 === void 0 ? void 0 : _req$headers$get3.startsWith("application/octet-stream")); + }, + async parse(opts) { + const { req } = opts; + if (req.method !== "POST") + throw new TRPCError({ + code: "METHOD_NOT_SUPPORTED", + message: "Only POST requests are supported for application/octet-stream requests" + }); + const getInputs = memo(async () => { + return req.body; + }); + return { + calls: [{ + batchIndex: 0, + path: opts.path, + getRawInput: getInputs.read, + result: getInputs.result, + procedure: await getProcedureAtPath(opts.router, opts.path) + }], + isBatchCall: false, + accept: null, + type: "mutation", + connectionParams: null, + signal: req.signal, + url: opts.url + }; + } + }; + handlers = [ + jsonContentTypeHandler, + formDataContentTypeHandler, + octetStreamContentTypeHandler + ]; + __name(getContentTypeHandler, "getContentTypeHandler"); + __name(getRequestInfo, "getRequestInfo"); + __name(isAbortError, "isAbortError"); + __name(throwAbortError, "throwAbortError"); + __name(isObject$1, "isObject$1"); + __name(isPlainObject, "isPlainObject"); + import_defineProperty2 = __toESM2(require_defineProperty(), 1); + subscribableCache = /* @__PURE__ */ new WeakMap(); + NOOP = /* @__PURE__ */ __name(() => { + }, "NOOP"); + _Symbol$toStringTag = Symbol.toStringTag; + Unpromise = /* @__PURE__ */ __name(class Unpromise2 { + constructor(arg) { + (0, import_defineProperty2.default)(this, "promise", void 0); + (0, import_defineProperty2.default)(this, "subscribers", []); + (0, import_defineProperty2.default)(this, "settlement", null); + (0, import_defineProperty2.default)(this, _Symbol$toStringTag, "Unpromise"); + if (typeof arg === "function") + this.promise = new Promise(arg); + else + this.promise = arg; + const thenReturn = this.promise.then((value) => { + const { subscribers } = this; + this.subscribers = null; + this.settlement = { + status: "fulfilled", + value + }; + subscribers === null || subscribers === void 0 || subscribers.forEach(({ resolve }) => { + resolve(value); + }); + }); + if ("catch" in thenReturn) + thenReturn.catch((reason) => { + const { subscribers } = this; + this.subscribers = null; + this.settlement = { + status: "rejected", + reason + }; + subscribers === null || subscribers === void 0 || subscribers.forEach(({ reject }) => { + reject(reason); + }); + }); + } + /** Create a promise that mitigates uncontrolled subscription to a long-lived + * Promise via .then() and .catch() - otherwise a source of memory leaks. + * + * The returned promise has an `unsubscribe()` method which can be called when + * the Promise is no longer being tracked by application logic, and which + * ensures that there is no reference chain from the original promise to the + * new one, and therefore no memory leak. + * + * If original promise has not yet settled, this adds a new unique promise + * that listens to then/catch events, along with an `unsubscribe()` method to + * detach it. + * + * If original promise has settled, then creates a new Promise.resolve() or + * Promise.reject() and provided unsubscribe is a noop. + * + * If you call `unsubscribe()` before the returned Promise has settled, it + * will never settle. + */ + subscribe() { + let promise2; + let unsubscribe; + const { settlement } = this; + if (settlement === null) { + if (this.subscribers === null) + throw new Error("Unpromise settled but still has subscribers"); + const subscriber = withResolvers(); + this.subscribers = listWithMember(this.subscribers, subscriber); + promise2 = subscriber.promise; + unsubscribe = /* @__PURE__ */ __name(() => { + if (this.subscribers !== null) + this.subscribers = listWithoutMember(this.subscribers, subscriber); + }, "unsubscribe"); + } else { + const { status } = settlement; + if (status === "fulfilled") + promise2 = Promise.resolve(settlement.value); + else + promise2 = Promise.reject(settlement.reason); + unsubscribe = NOOP; + } + return Object.assign(promise2, { unsubscribe }); + } + /** STANDARD PROMISE METHODS (but returning a SubscribedPromise) */ + then(onfulfilled, onrejected) { + const subscribed = this.subscribe(); + const { unsubscribe } = subscribed; + return Object.assign(subscribed.then(onfulfilled, onrejected), { unsubscribe }); + } + catch(onrejected) { + const subscribed = this.subscribe(); + const { unsubscribe } = subscribed; + return Object.assign(subscribed.catch(onrejected), { unsubscribe }); + } + finally(onfinally) { + const subscribed = this.subscribe(); + const { unsubscribe } = subscribed; + return Object.assign(subscribed.finally(onfinally), { unsubscribe }); + } + /** Unpromise STATIC METHODS */ + /** Create or Retrieve the proxy Unpromise (a re-used Unpromise for the VM lifetime + * of the provided Promise reference) */ + static proxy(promise2) { + const cached2 = Unpromise2.getSubscribablePromise(promise2); + return typeof cached2 !== "undefined" ? cached2 : Unpromise2.createSubscribablePromise(promise2); + } + /** Create and store an Unpromise keyed by an original Promise. */ + static createSubscribablePromise(promise2) { + const created = new Unpromise2(promise2); + subscribableCache.set(promise2, created); + subscribableCache.set(created, created); + return created; + } + /** Retrieve a previously-created Unpromise keyed by an original Promise. */ + static getSubscribablePromise(promise2) { + return subscribableCache.get(promise2); + } + /** Promise STATIC METHODS */ + /** Lookup the Unpromise for this promise, and derive a SubscribedPromise from + * it (that can be later unsubscribed to eliminate Memory leaks) */ + static resolve(value) { + const promise2 = typeof value === "object" && value !== null && "then" in value && typeof value.then === "function" ? value : Promise.resolve(value); + return Unpromise2.proxy(promise2).subscribe(); + } + static async any(values) { + const valuesArray = Array.isArray(values) ? values : [...values]; + const subscribedPromises = valuesArray.map(Unpromise2.resolve); + try { + return await Promise.any(subscribedPromises); + } finally { + subscribedPromises.forEach(({ unsubscribe }) => { + unsubscribe(); + }); + } + } + static async race(values) { + const valuesArray = Array.isArray(values) ? values : [...values]; + const subscribedPromises = valuesArray.map(Unpromise2.resolve); + try { + return await Promise.race(subscribedPromises); + } finally { + subscribedPromises.forEach(({ unsubscribe }) => { + unsubscribe(); + }); + } + } + /** Create a race of SubscribedPromises that will fulfil to a single winning + * Promise (in a 1-Tuple). Eliminates memory leaks from long-lived promises + * accumulating .then() and .catch() subscribers. Allows simple logic to + * consume the result, like... + * ```ts + * const [ winner ] = await Unpromise.race([ promiseA, promiseB ]); + * if(winner === promiseB){ + * const result = await promiseB; + * // do the thing + * } + * ``` + * */ + static async raceReferences(promises) { + const selfPromises = promises.map(resolveSelfTuple); + try { + return await Promise.race(selfPromises); + } finally { + for (const promise2 of selfPromises) + promise2.unsubscribe(); + } + } + }, "Unpromise"); + __name(resolveSelfTuple, "resolveSelfTuple"); + __name(withResolvers, "withResolvers"); + __name(listWithMember, "listWithMember"); + __name(listWithoutIndex, "listWithoutIndex"); + __name(listWithoutMember, "listWithoutMember"); + (_Symbol$dispose = (_Symbol = Symbol).dispose) !== null && _Symbol$dispose !== void 0 || (_Symbol.dispose = Symbol()); + (_Symbol2$asyncDispose = (_Symbol2 = Symbol).asyncDispose) !== null && _Symbol2$asyncDispose !== void 0 || (_Symbol2.asyncDispose = Symbol()); + __name(makeResource, "makeResource"); + __name(makeAsyncResource, "makeAsyncResource"); + disposablePromiseTimerResult = Symbol(); + __name(timerResource, "timerResource"); + require_usingCtx = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) { + function _usingCtx() { + var r2 = "function" == typeof SuppressedError ? SuppressedError : function(r$1, e$1) { + var n$1 = Error(); + return n$1.name = "SuppressedError", n$1.error = r$1, n$1.suppressed = e$1, n$1; + }, e2 = {}, n2 = []; + function using(r$1, e$1) { + if (null != e$1) { + if (Object(e$1) !== e$1) + throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); + if (r$1) + var o2 = e$1[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")]; + if (void 0 === o2 && (o2 = e$1[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r$1)) + var t9 = o2; + if ("function" != typeof o2) + throw new TypeError("Object is not disposable."); + t9 && (o2 = /* @__PURE__ */ __name(function o$1() { + try { + t9.call(e$1); + } catch (r$2) { + return Promise.reject(r$2); + } + }, "o$1")), n2.push({ + v: e$1, + d: o2, + a: r$1 + }); + } else + r$1 && n2.push({ + d: e$1, + a: r$1 + }); + return e$1; + } + __name(using, "using"); + return { + e: e2, + u: using.bind(null, false), + a: using.bind(null, true), + d: /* @__PURE__ */ __name(function d2() { + var o2, t9 = this.e, s2 = 0; + function next() { + for (; o2 = n2.pop(); ) + try { + if (!o2.a && 1 === s2) + return s2 = 0, n2.push(o2), Promise.resolve().then(next); + if (o2.d) { + var r$1 = o2.d.call(o2.v); + if (o2.a) + return s2 |= 2, Promise.resolve(r$1).then(next, err); + } else + s2 |= 1; + } catch (r$2) { + return err(r$2); + } + if (1 === s2) + return t9 !== e2 ? Promise.reject(t9) : Promise.resolve(); + if (t9 !== e2) + throw t9; + } + __name(next, "next"); + function err(n$1) { + return t9 = t9 !== e2 ? new r2(n$1, t9) : n$1, next(); + } + __name(err, "err"); + return next(); + }, "d") + }; + } + __name(_usingCtx, "_usingCtx"); + module.exports = _usingCtx, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_OverloadYield = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(exports, module) { + function _OverloadYield(e2, d2) { + this.v = e2, this.k = d2; + } + __name(_OverloadYield, "_OverloadYield"); + module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_awaitAsyncGenerator = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(exports, module) { + var OverloadYield$2 = require_OverloadYield(); + function _awaitAsyncGenerator$5(e2) { + return new OverloadYield$2(e2, 0); + } + __name(_awaitAsyncGenerator$5, "_awaitAsyncGenerator$5"); + module.exports = _awaitAsyncGenerator$5, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_wrapAsyncGenerator = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(exports, module) { + var OverloadYield$1 = require_OverloadYield(); + function _wrapAsyncGenerator$6(e2) { + return function() { + return new AsyncGenerator(e2.apply(this, arguments)); + }; + } + __name(_wrapAsyncGenerator$6, "_wrapAsyncGenerator$6"); + function AsyncGenerator(e2) { + var r2, t9; + function resume(r$1, t$1) { + try { + var n2 = e2[r$1](t$1), o2 = n2.value, u5 = o2 instanceof OverloadYield$1; + Promise.resolve(u5 ? o2.v : o2).then(function(t$2) { + if (u5) { + var i2 = "return" === r$1 ? "return" : "next"; + if (!o2.k || t$2.done) + return resume(i2, t$2); + t$2 = e2[i2](t$2).value; + } + settle2(n2.done ? "return" : "normal", t$2); + }, function(e$1) { + resume("throw", e$1); + }); + } catch (e$1) { + settle2("throw", e$1); + } + } + __name(resume, "resume"); + function settle2(e$1, n2) { + switch (e$1) { + case "return": + r2.resolve({ + value: n2, + done: true + }); + break; + case "throw": + r2.reject(n2); + break; + default: + r2.resolve({ + value: n2, + done: false + }); + } + (r2 = r2.next) ? resume(r2.key, r2.arg) : t9 = null; + } + __name(settle2, "settle"); + this._invoke = function(e$1, n2) { + return new Promise(function(o2, u5) { + var i2 = { + key: e$1, + arg: n2, + resolve: o2, + reject: u5, + next: null + }; + t9 ? t9 = t9.next = i2 : (r2 = t9 = i2, resume(e$1, n2)); + }); + }, "function" != typeof e2["return"] && (this["return"] = void 0); + } + __name(AsyncGenerator, "AsyncGenerator"); + AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function() { + return this; + }, AsyncGenerator.prototype.next = function(e2) { + return this._invoke("next", e2); + }, AsyncGenerator.prototype["throw"] = function(e2) { + return this._invoke("throw", e2); + }, AsyncGenerator.prototype["return"] = function(e2) { + return this._invoke("return", e2); + }; + module.exports = _wrapAsyncGenerator$6, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + import_usingCtx$4 = __toESM2(require_usingCtx(), 1); + import_awaitAsyncGenerator$4 = __toESM2(require_awaitAsyncGenerator(), 1); + import_wrapAsyncGenerator$5 = __toESM2(require_wrapAsyncGenerator(), 1); + __name(iteratorResource, "iteratorResource"); + __name(takeWithGrace, "takeWithGrace"); + __name(_takeWithGrace, "_takeWithGrace"); + __name(createDeferred, "createDeferred"); + import_usingCtx$3 = __toESM2(require_usingCtx(), 1); + import_awaitAsyncGenerator$3 = __toESM2(require_awaitAsyncGenerator(), 1); + import_wrapAsyncGenerator$4 = __toESM2(require_wrapAsyncGenerator(), 1); + __name(createManagedIterator, "createManagedIterator"); + __name(mergeAsyncIterables, "mergeAsyncIterables"); + __name(readableStreamFrom, "readableStreamFrom"); + import_usingCtx$2 = __toESM2(require_usingCtx(), 1); + import_awaitAsyncGenerator$2 = __toESM2(require_awaitAsyncGenerator(), 1); + import_wrapAsyncGenerator$3 = __toESM2(require_wrapAsyncGenerator(), 1); + PING_SYM = Symbol("ping"); + __name(withPing, "withPing"); + __name(_withPing, "_withPing"); + require_asyncIterator = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(exports, module) { + function _asyncIterator$2(r2) { + var n2, t9, o2, e2 = 2; + for ("undefined" != typeof Symbol && (t9 = Symbol.asyncIterator, o2 = Symbol.iterator); e2--; ) { + if (t9 && null != (n2 = r2[t9])) + return n2.call(r2); + if (o2 && null != (n2 = r2[o2])) + return new AsyncFromSyncIterator(n2.call(r2)); + t9 = "@@asyncIterator", o2 = "@@iterator"; + } + throw new TypeError("Object is not async iterable"); + } + __name(_asyncIterator$2, "_asyncIterator$2"); + function AsyncFromSyncIterator(r2) { + function AsyncFromSyncIteratorContinuation(r$1) { + if (Object(r$1) !== r$1) + return Promise.reject(new TypeError(r$1 + " is not an object.")); + var n2 = r$1.done; + return Promise.resolve(r$1.value).then(function(r$2) { + return { + value: r$2, + done: n2 + }; + }); + } + __name(AsyncFromSyncIteratorContinuation, "AsyncFromSyncIteratorContinuation"); + return AsyncFromSyncIterator = /* @__PURE__ */ __name(function AsyncFromSyncIterator$1(r$1) { + this.s = r$1, this.n = r$1.next; + }, "AsyncFromSyncIterator$1"), AsyncFromSyncIterator.prototype = { + s: null, + n: null, + next: /* @__PURE__ */ __name(function next() { + return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); + }, "next"), + "return": /* @__PURE__ */ __name(function _return(r$1) { + var n2 = this.s["return"]; + return void 0 === n2 ? Promise.resolve({ + value: r$1, + done: true + }) : AsyncFromSyncIteratorContinuation(n2.apply(this.s, arguments)); + }, "_return"), + "throw": /* @__PURE__ */ __name(function _throw(r$1) { + var n2 = this.s["return"]; + return void 0 === n2 ? Promise.reject(r$1) : AsyncFromSyncIteratorContinuation(n2.apply(this.s, arguments)); + }, "_throw") + }, new AsyncFromSyncIterator(r2); + } + __name(AsyncFromSyncIterator, "AsyncFromSyncIterator"); + module.exports = _asyncIterator$2, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + import_awaitAsyncGenerator$1 = __toESM2(require_awaitAsyncGenerator(), 1); + import_wrapAsyncGenerator$2 = __toESM2(require_wrapAsyncGenerator(), 1); + import_usingCtx$1 = __toESM2(require_usingCtx(), 1); + import_asyncIterator$1 = __toESM2(require_asyncIterator(), 1); + CHUNK_VALUE_TYPE_PROMISE = 0; + CHUNK_VALUE_TYPE_ASYNC_ITERABLE = 1; + PROMISE_STATUS_FULFILLED = 0; + PROMISE_STATUS_REJECTED = 1; + ASYNC_ITERABLE_STATUS_RETURN = 0; + ASYNC_ITERABLE_STATUS_YIELD = 1; + ASYNC_ITERABLE_STATUS_ERROR = 2; + __name(isPromise, "isPromise"); + MaxDepthError = /* @__PURE__ */ __name(class extends Error { + constructor(path) { + super("Max depth reached at path: " + path.join(".")); + this.path = path; + } + }, "MaxDepthError"); + __name(createBatchStreamProducer, "createBatchStreamProducer"); + __name(_createBatchStreamProducer, "_createBatchStreamProducer"); + __name(jsonlStreamProducer, "jsonlStreamProducer"); + require_asyncGeneratorDelegate = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js"(exports, module) { + var OverloadYield = require_OverloadYield(); + function _asyncGeneratorDelegate$1(t9) { + var e2 = {}, n2 = false; + function pump(e$1, r2) { + return n2 = true, r2 = new Promise(function(n$1) { + n$1(t9[e$1](r2)); + }), { + done: false, + value: new OverloadYield(r2, 1) + }; + } + __name(pump, "pump"); + return e2["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function() { + return this; + }, e2.next = function(t$1) { + return n2 ? (n2 = false, t$1) : pump("next", t$1); + }, "function" == typeof t9["throw"] && (e2["throw"] = function(t$1) { + if (n2) + throw n2 = false, t$1; + return pump("throw", t$1); + }), "function" == typeof t9["return"] && (e2["return"] = function(t$1) { + return n2 ? (n2 = false, t$1) : pump("return", t$1); + }), e2; + } + __name(_asyncGeneratorDelegate$1, "_asyncGeneratorDelegate$1"); + module.exports = _asyncGeneratorDelegate$1, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + import_asyncIterator = __toESM2(require_asyncIterator(), 1); + import_awaitAsyncGenerator = __toESM2(require_awaitAsyncGenerator(), 1); + import_wrapAsyncGenerator$1 = __toESM2(require_wrapAsyncGenerator(), 1); + import_asyncGeneratorDelegate = __toESM2(require_asyncGeneratorDelegate(), 1); + import_usingCtx = __toESM2(require_usingCtx(), 1); + PING_EVENT = "ping"; + SERIALIZED_ERROR_EVENT = "serialized-error"; + CONNECTED_EVENT = "connected"; + RETURN_EVENT = "return"; + __name(sseStreamProducer, "sseStreamProducer"); + sseHeaders = { + "Content-Type": "text/event-stream", + "Cache-Control": "no-cache, no-transform", + "X-Accel-Buffering": "no", + Connection: "keep-alive" + }; + import_wrapAsyncGenerator = __toESM2(require_wrapAsyncGenerator(), 1); + import_objectSpread23 = __toESM2(require_objectSpread2(), 1); + __name(errorToAsyncIterable, "errorToAsyncIterable"); + __name(combinedAbortController, "combinedAbortController"); + TYPE_ACCEPTED_METHOD_MAP = { + mutation: ["POST"], + query: ["GET"], + subscription: ["GET"] + }; + TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE = { + mutation: ["POST"], + query: ["GET", "POST"], + subscription: ["GET", "POST"] + }; + __name(initResponse, "initResponse"); + __name(caughtErrorToData, "caughtErrorToData"); + __name(isDataStream, "isDataStream"); + __name(resolveResponse, "resolveResponse"); + } +}); + +// ../../node_modules/@trpc/server/dist/adapters/fetch/index.mjs +async function fetchRequestHandler(opts) { + const resHeaders = new Headers(); + const createContext = /* @__PURE__ */ __name(async (innerOpts) => { + var _opts$createContext; + return (_opts$createContext = opts.createContext) === null || _opts$createContext === void 0 ? void 0 : _opts$createContext.call(opts, (0, import_objectSpread24.default)({ + req: opts.req, + resHeaders + }, innerOpts)); + }, "createContext"); + const url2 = new URL(opts.req.url); + const pathname = trimSlashes(url2.pathname); + const endpoint = trimSlashes(opts.endpoint); + const path = trimSlashes(pathname.slice(endpoint.length)); + return await resolveResponse((0, import_objectSpread24.default)((0, import_objectSpread24.default)({}, opts), {}, { + req: opts.req, + createContext, + path, + error: null, + onError(o2) { + var _opts$onError; + opts === null || opts === void 0 || (_opts$onError = opts.onError) === null || _opts$onError === void 0 || _opts$onError.call(opts, (0, import_objectSpread24.default)((0, import_objectSpread24.default)({}, o2), {}, { req: opts.req })); + }, + responseMeta(data) { + var _opts$responseMeta; + const meta3 = (_opts$responseMeta = opts.responseMeta) === null || _opts$responseMeta === void 0 ? void 0 : _opts$responseMeta.call(opts, data); + if (meta3 === null || meta3 === void 0 ? void 0 : meta3.headers) { + if (meta3.headers instanceof Headers) + for (const [key, value] of meta3.headers.entries()) + resHeaders.append(key, value); + else + for (const [key, value] of Object.entries(meta3.headers)) + if (Array.isArray(value)) + for (const v3 of value) + resHeaders.append(key, v3); + else if (typeof value === "string") + resHeaders.set(key, value); + } + return { + headers: resHeaders, + status: meta3 === null || meta3 === void 0 ? void 0 : meta3.status + }; + } + })); +} +var import_objectSpread24, trimSlashes; +var init_fetch = __esm({ + "../../node_modules/@trpc/server/dist/adapters/fetch/index.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getErrorShape_vC8mUXJD(); + init_resolveResponse_CHqBlAgR(); + import_objectSpread24 = __toESM2(require_objectSpread2(), 1); + trimSlashes = /* @__PURE__ */ __name((path) => { + path = path.startsWith("/") ? path.slice(1) : path; + path = path.endsWith("/") ? path.slice(0, -1) : path; + return path; + }, "trimSlashes"); + __name(fetchRequestHandler, "fetchRequestHandler"); + } +}); + +// ../../node_modules/hono/dist/helper/route/index.js +var matchedRoutes, routePath; +var init_route = __esm({ + "../../node_modules/hono/dist/helper/route/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants(); + init_url(); + matchedRoutes = /* @__PURE__ */ __name((c2) => ( + // @ts-expect-error c.req[GET_MATCH_RESULT] is not typed + c2.req[GET_MATCH_RESULT][0].map(([[, route]]) => route) + ), "matchedRoutes"); + routePath = /* @__PURE__ */ __name((c2, index) => matchedRoutes(c2).at(index ?? c2.req.routeIndex)?.path ?? "", "routePath"); + } +}); + +// ../../node_modules/@hono/trpc-server/dist/index.js +var trpcServer; +var init_dist2 = __esm({ + "../../node_modules/@hono/trpc-server/dist/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fetch(); + init_route(); + trpcServer = /* @__PURE__ */ __name(({ endpoint, createContext, ...rest }) => { + const bodyProps = /* @__PURE__ */ new Set([ + "arrayBuffer", + "blob", + "formData", + "json", + "text" + ]); + return async (c2) => { + const canWithBody = c2.req.method === "GET" || c2.req.method === "HEAD"; + let resolvedEndpoint = endpoint; + if (!endpoint) { + const path = routePath(c2); + if (path) + resolvedEndpoint = path.replace(/\/\*+$/, "") || "/trpc"; + else + resolvedEndpoint = "/trpc"; + } + return await fetchRequestHandler({ + ...rest, + createContext: async (opts) => ({ + ...createContext ? await createContext(opts, c2) : {}, + env: c2.env + }), + endpoint: resolvedEndpoint, + req: canWithBody ? c2.req.raw : new Proxy(c2.req.raw, { get(t9, p2, _r) { + if (bodyProps.has(p2)) + return () => c2.req[p2](); + return Reflect.get(t9, p2, t9); + } }) + }); + }; + }, "trpcServer"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/entity.js +function is(value, type) { + if (!value || typeof value !== "object") { + return false; + } + if (value instanceof type) { + return true; + } + if (!Object.prototype.hasOwnProperty.call(type, entityKind)) { + throw new Error( + `Class "${type.name ?? ""}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.` + ); + } + let cls = Object.getPrototypeOf(value).constructor; + if (cls) { + while (cls) { + if (entityKind in cls && cls[entityKind] === type[entityKind]) { + return true; + } + cls = Object.getPrototypeOf(cls); + } + } + return false; +} +var entityKind, hasOwnEntityKind; +var init_entity = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/entity.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + entityKind = Symbol.for("drizzle:entityKind"); + hasOwnEntityKind = Symbol.for("drizzle:hasOwnEntityKind"); + __name(is, "is"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/logger.js +var _a, ConsoleLogWriter, _a2, DefaultLogger, _a3, NoopLogger; +var init_logger2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/logger.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + ConsoleLogWriter = class { + write(message2) { + console.log(message2); + } + }; + __name(ConsoleLogWriter, "ConsoleLogWriter"); + _a = entityKind; + __publicField(ConsoleLogWriter, _a, "ConsoleLogWriter"); + DefaultLogger = class { + writer; + constructor(config3) { + this.writer = config3?.writer ?? new ConsoleLogWriter(); + } + logQuery(query, params) { + const stringifiedParams = params.map((p2) => { + try { + return JSON.stringify(p2); + } catch { + return String(p2); + } + }); + const paramsStr = stringifiedParams.length ? ` -- params: [${stringifiedParams.join(", ")}]` : ""; + this.writer.write(`Query: ${query}${paramsStr}`); + } + }; + __name(DefaultLogger, "DefaultLogger"); + _a2 = entityKind; + __publicField(DefaultLogger, _a2, "DefaultLogger"); + NoopLogger = class { + logQuery() { + } + }; + __name(NoopLogger, "NoopLogger"); + _a3 = entityKind; + __publicField(NoopLogger, _a3, "NoopLogger"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/table.utils.js +var TableName; +var init_table_utils = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/table.utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + TableName = Symbol.for("drizzle:Name"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/table.js +function getTableName(table3) { + return table3[TableName]; +} +function getTableUniqueName(table3) { + return `${table3[Schema] ?? "public"}.${table3[TableName]}`; +} +var Schema, Columns, ExtraConfigColumns, OriginalName, BaseName, IsAlias, ExtraConfigBuilder, IsDrizzleTable, _a4, Table; +var init_table = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/table.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + Schema = Symbol.for("drizzle:Schema"); + Columns = Symbol.for("drizzle:Columns"); + ExtraConfigColumns = Symbol.for("drizzle:ExtraConfigColumns"); + OriginalName = Symbol.for("drizzle:OriginalName"); + BaseName = Symbol.for("drizzle:BaseName"); + IsAlias = Symbol.for("drizzle:IsAlias"); + ExtraConfigBuilder = Symbol.for("drizzle:ExtraConfigBuilder"); + IsDrizzleTable = Symbol.for("drizzle:IsDrizzleTable"); + Table = class { + /** + * @internal + * Can be changed if the table is aliased. + */ + [(_a4 = entityKind, TableName)]; + /** + * @internal + * Used to store the original name of the table, before any aliasing. + */ + [OriginalName]; + /** @internal */ + [Schema]; + /** @internal */ + [Columns]; + /** @internal */ + [ExtraConfigColumns]; + /** + * @internal + * Used to store the table name before the transformation via the `tableCreator` functions. + */ + [BaseName]; + /** @internal */ + [IsAlias] = false; + /** @internal */ + [IsDrizzleTable] = true; + /** @internal */ + [ExtraConfigBuilder] = void 0; + constructor(name, schema, baseName) { + this[TableName] = this[OriginalName] = name; + this[Schema] = schema; + this[BaseName] = baseName; + } + }; + __name(Table, "Table"); + __publicField(Table, _a4, "Table"); + /** @internal */ + __publicField(Table, "Symbol", { + Name: TableName, + Schema, + OriginalName, + Columns, + ExtraConfigColumns, + BaseName, + IsAlias, + ExtraConfigBuilder + }); + __name(getTableName, "getTableName"); + __name(getTableUniqueName, "getTableUniqueName"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/column.js +var _a5, Column; +var init_column = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/column.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + Column = class { + constructor(table3, config3) { + this.table = table3; + this.config = config3; + this.name = config3.name; + this.keyAsName = config3.keyAsName; + this.notNull = config3.notNull; + this.default = config3.default; + this.defaultFn = config3.defaultFn; + this.onUpdateFn = config3.onUpdateFn; + this.hasDefault = config3.hasDefault; + this.primary = config3.primaryKey; + this.isUnique = config3.isUnique; + this.uniqueName = config3.uniqueName; + this.uniqueType = config3.uniqueType; + this.dataType = config3.dataType; + this.columnType = config3.columnType; + this.generated = config3.generated; + this.generatedIdentity = config3.generatedIdentity; + } + name; + keyAsName; + primary; + notNull; + default; + defaultFn; + onUpdateFn; + hasDefault; + isUnique; + uniqueName; + uniqueType; + dataType; + columnType; + enumValues = void 0; + generated = void 0; + generatedIdentity = void 0; + config; + mapFromDriverValue(value) { + return value; + } + mapToDriverValue(value) { + return value; + } + // ** @internal */ + shouldDisableInsert() { + return this.config.generated !== void 0 && this.config.generated.type !== "byDefault"; + } + }; + __name(Column, "Column"); + _a5 = entityKind; + __publicField(Column, _a5, "Column"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/column-builder.js +var _a6, ColumnBuilder; +var init_column_builder = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/column-builder.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + ColumnBuilder = class { + config; + constructor(name, dataType, columnType) { + this.config = { + name, + keyAsName: name === "", + notNull: false, + default: void 0, + hasDefault: false, + primaryKey: false, + isUnique: false, + uniqueName: void 0, + uniqueType: void 0, + dataType, + columnType, + generated: void 0 + }; + } + /** + * Changes the data type of the column. Commonly used with `json` columns. Also, useful for branded types. + * + * @example + * ```ts + * const users = pgTable('users', { + * id: integer('id').$type().primaryKey(), + * details: json('details').$type().notNull(), + * }); + * ``` + */ + $type() { + return this; + } + /** + * Adds a `not null` clause to the column definition. + * + * Affects the `select` model of the table - columns *without* `not null` will be nullable on select. + */ + notNull() { + this.config.notNull = true; + return this; + } + /** + * Adds a `default ` clause to the column definition. + * + * Affects the `insert` model of the table - columns *with* `default` are optional on insert. + * + * If you need to set a dynamic default value, use {@link $defaultFn} instead. + */ + default(value) { + this.config.default = value; + this.config.hasDefault = true; + return this; + } + /** + * Adds a dynamic default value to the column. + * The function will be called when the row is inserted, and the returned value will be used as the column value. + * + * **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`. + */ + $defaultFn(fn) { + this.config.defaultFn = fn; + this.config.hasDefault = true; + return this; + } + /** + * Alias for {@link $defaultFn}. + */ + $default = this.$defaultFn; + /** + * Adds a dynamic update value to the column. + * The function will be called when the row is updated, and the returned value will be used as the column value if none is provided. + * If no `default` (or `$defaultFn`) value is provided, the function will be called when the row is inserted as well, and the returned value will be used as the column value. + * + * **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`. + */ + $onUpdateFn(fn) { + this.config.onUpdateFn = fn; + this.config.hasDefault = true; + return this; + } + /** + * Alias for {@link $onUpdateFn}. + */ + $onUpdate = this.$onUpdateFn; + /** + * Adds a `primary key` clause to the column definition. This implicitly makes the column `not null`. + * + * In SQLite, `integer primary key` implicitly makes the column auto-incrementing. + */ + primaryKey() { + this.config.primaryKey = true; + this.config.notNull = true; + return this; + } + /** @internal Sets the name of the column to the key within the table definition if a name was not given. */ + setName(name) { + if (this.config.name !== "") + return; + this.config.name = name; + } + }; + __name(ColumnBuilder, "ColumnBuilder"); + _a6 = entityKind; + __publicField(ColumnBuilder, _a6, "ColumnBuilder"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/foreign-keys.js +var _a7, ForeignKeyBuilder, _a8, ForeignKey; +var init_foreign_keys = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/foreign-keys.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + ForeignKeyBuilder = class { + /** @internal */ + reference; + /** @internal */ + _onUpdate = "no action"; + /** @internal */ + _onDelete = "no action"; + constructor(config3, actions) { + this.reference = () => { + const { name, columns, foreignColumns } = config3(); + return { name, columns, foreignTable: foreignColumns[0].table, foreignColumns }; + }; + if (actions) { + this._onUpdate = actions.onUpdate; + this._onDelete = actions.onDelete; + } + } + onUpdate(action) { + this._onUpdate = action === void 0 ? "no action" : action; + return this; + } + onDelete(action) { + this._onDelete = action === void 0 ? "no action" : action; + return this; + } + /** @internal */ + build(table3) { + return new ForeignKey(table3, this); + } + }; + __name(ForeignKeyBuilder, "ForeignKeyBuilder"); + _a7 = entityKind; + __publicField(ForeignKeyBuilder, _a7, "PgForeignKeyBuilder"); + ForeignKey = class { + constructor(table3, builder) { + this.table = table3; + this.reference = builder.reference; + this.onUpdate = builder._onUpdate; + this.onDelete = builder._onDelete; + } + reference; + onUpdate; + onDelete; + getName() { + const { name, columns, foreignColumns } = this.reference(); + const columnNames = columns.map((column) => column.name); + const foreignColumnNames = foreignColumns.map((column) => column.name); + const chunks = [ + this.table[TableName], + ...columnNames, + foreignColumns[0].table[TableName], + ...foreignColumnNames + ]; + return name ?? `${chunks.join("_")}_fk`; + } + }; + __name(ForeignKey, "ForeignKey"); + _a8 = entityKind; + __publicField(ForeignKey, _a8, "PgForeignKey"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/tracing-utils.js +function iife(fn, ...args) { + return fn(...args); +} +var init_tracing_utils = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/tracing-utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(iife, "iife"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/unique-constraint.js +function uniqueKeyName(table3, columns) { + return `${table3[TableName]}_${columns.join("_")}_unique`; +} +var _a9, UniqueConstraintBuilder, _a10, UniqueOnConstraintBuilder, _a11, UniqueConstraint; +var init_unique_constraint = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/unique-constraint.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + __name(uniqueKeyName, "uniqueKeyName"); + UniqueConstraintBuilder = class { + constructor(columns, name) { + this.name = name; + this.columns = columns; + } + /** @internal */ + columns; + /** @internal */ + nullsNotDistinctConfig = false; + nullsNotDistinct() { + this.nullsNotDistinctConfig = true; + return this; + } + /** @internal */ + build(table3) { + return new UniqueConstraint(table3, this.columns, this.nullsNotDistinctConfig, this.name); + } + }; + __name(UniqueConstraintBuilder, "UniqueConstraintBuilder"); + _a9 = entityKind; + __publicField(UniqueConstraintBuilder, _a9, "PgUniqueConstraintBuilder"); + UniqueOnConstraintBuilder = class { + /** @internal */ + name; + constructor(name) { + this.name = name; + } + on(...columns) { + return new UniqueConstraintBuilder(columns, this.name); + } + }; + __name(UniqueOnConstraintBuilder, "UniqueOnConstraintBuilder"); + _a10 = entityKind; + __publicField(UniqueOnConstraintBuilder, _a10, "PgUniqueOnConstraintBuilder"); + UniqueConstraint = class { + constructor(table3, columns, nullsNotDistinct, name) { + this.table = table3; + this.columns = columns; + this.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name)); + this.nullsNotDistinct = nullsNotDistinct; + } + columns; + name; + nullsNotDistinct = false; + getName() { + return this.name; + } + }; + __name(UniqueConstraint, "UniqueConstraint"); + _a11 = entityKind; + __publicField(UniqueConstraint, _a11, "PgUniqueConstraint"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/utils/array.js +function parsePgArrayValue(arrayString, startFrom, inQuotes) { + for (let i2 = startFrom; i2 < arrayString.length; i2++) { + const char = arrayString[i2]; + if (char === "\\") { + i2++; + continue; + } + if (char === '"') { + return [arrayString.slice(startFrom, i2).replace(/\\/g, ""), i2 + 1]; + } + if (inQuotes) { + continue; + } + if (char === "," || char === "}") { + return [arrayString.slice(startFrom, i2).replace(/\\/g, ""), i2]; + } + } + return [arrayString.slice(startFrom).replace(/\\/g, ""), arrayString.length]; +} +function parsePgNestedArray(arrayString, startFrom = 0) { + const result = []; + let i2 = startFrom; + let lastCharIsComma = false; + while (i2 < arrayString.length) { + const char = arrayString[i2]; + if (char === ",") { + if (lastCharIsComma || i2 === startFrom) { + result.push(""); + } + lastCharIsComma = true; + i2++; + continue; + } + lastCharIsComma = false; + if (char === "\\") { + i2 += 2; + continue; + } + if (char === '"') { + const [value2, startFrom2] = parsePgArrayValue(arrayString, i2 + 1, true); + result.push(value2); + i2 = startFrom2; + continue; + } + if (char === "}") { + return [result, i2 + 1]; + } + if (char === "{") { + const [value2, startFrom2] = parsePgNestedArray(arrayString, i2 + 1); + result.push(value2); + i2 = startFrom2; + continue; + } + const [value, newStartFrom] = parsePgArrayValue(arrayString, i2, false); + result.push(value); + i2 = newStartFrom; + } + return [result, i2]; +} +function parsePgArray(arrayString) { + const [result] = parsePgNestedArray(arrayString, 1); + return result; +} +function makePgArray(array2) { + return `{${array2.map((item) => { + if (Array.isArray(item)) { + return makePgArray(item); + } + if (typeof item === "string") { + return `"${item.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`; + } + return `${item}`; + }).join(",")}}`; +} +var init_array = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/utils/array.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(parsePgArrayValue, "parsePgArrayValue"); + __name(parsePgNestedArray, "parsePgNestedArray"); + __name(parsePgArray, "parsePgArray"); + __name(makePgArray, "makePgArray"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/columns/common.js +var _a12, PgColumnBuilder, _a13, PgColumn, _a14, ExtraConfigColumn, _a15, IndexedColumn, _a16, PgArrayBuilder, _a17, _PgArray, PgArray; +var init_common = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/columns/common.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column_builder(); + init_column(); + init_entity(); + init_foreign_keys(); + init_tracing_utils(); + init_unique_constraint(); + init_array(); + PgColumnBuilder = class extends ColumnBuilder { + foreignKeyConfigs = []; + array(size) { + return new PgArrayBuilder(this.config.name, this, size); + } + references(ref, actions = {}) { + this.foreignKeyConfigs.push({ ref, actions }); + return this; + } + unique(name, config3) { + this.config.isUnique = true; + this.config.uniqueName = name; + this.config.uniqueType = config3?.nulls; + return this; + } + generatedAlwaysAs(as2) { + this.config.generated = { + as: as2, + type: "always", + mode: "stored" + }; + return this; + } + /** @internal */ + buildForeignKeys(column, table3) { + return this.foreignKeyConfigs.map(({ ref, actions }) => { + return iife( + (ref2, actions2) => { + const builder = new ForeignKeyBuilder(() => { + const foreignColumn = ref2(); + return { columns: [column], foreignColumns: [foreignColumn] }; + }); + if (actions2.onUpdate) { + builder.onUpdate(actions2.onUpdate); + } + if (actions2.onDelete) { + builder.onDelete(actions2.onDelete); + } + return builder.build(table3); + }, + ref, + actions + ); + }); + } + /** @internal */ + buildExtraConfigColumn(table3) { + return new ExtraConfigColumn(table3, this.config); + } + }; + __name(PgColumnBuilder, "PgColumnBuilder"); + _a12 = entityKind; + __publicField(PgColumnBuilder, _a12, "PgColumnBuilder"); + PgColumn = class extends Column { + constructor(table3, config3) { + if (!config3.uniqueName) { + config3.uniqueName = uniqueKeyName(table3, [config3.name]); + } + super(table3, config3); + this.table = table3; + } + }; + __name(PgColumn, "PgColumn"); + _a13 = entityKind; + __publicField(PgColumn, _a13, "PgColumn"); + ExtraConfigColumn = class extends PgColumn { + getSQLType() { + return this.getSQLType(); + } + indexConfig = { + order: this.config.order ?? "asc", + nulls: this.config.nulls ?? "last", + opClass: this.config.opClass + }; + defaultConfig = { + order: "asc", + nulls: "last", + opClass: void 0 + }; + asc() { + this.indexConfig.order = "asc"; + return this; + } + desc() { + this.indexConfig.order = "desc"; + return this; + } + nullsFirst() { + this.indexConfig.nulls = "first"; + return this; + } + nullsLast() { + this.indexConfig.nulls = "last"; + return this; + } + /** + * ### PostgreSQL documentation quote + * + * > An operator class with optional parameters can be specified for each column of an index. + * The operator class identifies the operators to be used by the index for that column. + * For example, a B-tree index on four-byte integers would use the int4_ops class; + * this operator class includes comparison functions for four-byte integers. + * In practice the default operator class for the column's data type is usually sufficient. + * The main point of having operator classes is that for some data types, there could be more than one meaningful ordering. + * For example, we might want to sort a complex-number data type either by absolute value or by real part. + * We could do this by defining two operator classes for the data type and then selecting the proper class when creating an index. + * More information about operator classes check: + * + * ### Useful links + * https://www.postgresql.org/docs/current/sql-createindex.html + * + * https://www.postgresql.org/docs/current/indexes-opclass.html + * + * https://www.postgresql.org/docs/current/xindex.html + * + * ### Additional types + * If you have the `pg_vector` extension installed in your database, you can use the + * `vector_l2_ops`, `vector_ip_ops`, `vector_cosine_ops`, `vector_l1_ops`, `bit_hamming_ops`, `bit_jaccard_ops`, `halfvec_l2_ops`, `sparsevec_l2_ops` options, which are predefined types. + * + * **You can always specify any string you want in the operator class, in case Drizzle doesn't have it natively in its types** + * + * @param opClass + * @returns + */ + op(opClass) { + this.indexConfig.opClass = opClass; + return this; + } + }; + __name(ExtraConfigColumn, "ExtraConfigColumn"); + _a14 = entityKind; + __publicField(ExtraConfigColumn, _a14, "ExtraConfigColumn"); + IndexedColumn = class { + constructor(name, keyAsName, type, indexConfig) { + this.name = name; + this.keyAsName = keyAsName; + this.type = type; + this.indexConfig = indexConfig; + } + name; + keyAsName; + type; + indexConfig; + }; + __name(IndexedColumn, "IndexedColumn"); + _a15 = entityKind; + __publicField(IndexedColumn, _a15, "IndexedColumn"); + PgArrayBuilder = class extends PgColumnBuilder { + constructor(name, baseBuilder, size) { + super(name, "array", "PgArray"); + this.config.baseBuilder = baseBuilder; + this.config.size = size; + } + /** @internal */ + build(table3) { + const baseColumn = this.config.baseBuilder.build(table3); + return new PgArray( + table3, + this.config, + baseColumn + ); + } + }; + __name(PgArrayBuilder, "PgArrayBuilder"); + _a16 = entityKind; + __publicField(PgArrayBuilder, _a16, "PgArrayBuilder"); + _PgArray = class extends PgColumn { + constructor(table3, config3, baseColumn, range2) { + super(table3, config3); + this.baseColumn = baseColumn; + this.range = range2; + this.size = config3.size; + } + size; + getSQLType() { + return `${this.baseColumn.getSQLType()}[${typeof this.size === "number" ? this.size : ""}]`; + } + mapFromDriverValue(value) { + if (typeof value === "string") { + value = parsePgArray(value); + } + return value.map((v3) => this.baseColumn.mapFromDriverValue(v3)); + } + mapToDriverValue(value, isNestedArray = false) { + const a2 = value.map( + (v3) => v3 === null ? null : is(this.baseColumn, _PgArray) ? this.baseColumn.mapToDriverValue(v3, true) : this.baseColumn.mapToDriverValue(v3) + ); + if (isNestedArray) + return a2; + return makePgArray(a2); + } + }; + PgArray = _PgArray; + __name(PgArray, "PgArray"); + _a17 = entityKind; + __publicField(PgArray, _a17, "PgArray"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/columns/enum.js +function isPgEnum(obj) { + return !!obj && typeof obj === "function" && isPgEnumSym in obj && obj[isPgEnumSym] === true; +} +var _a18, PgEnumObjectColumnBuilder, _a19, PgEnumObjectColumn, isPgEnumSym, _a20, PgEnumColumnBuilder, _a21, PgEnumColumn; +var init_enum = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/columns/enum.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_common(); + PgEnumObjectColumnBuilder = class extends PgColumnBuilder { + constructor(name, enumInstance) { + super(name, "string", "PgEnumObjectColumn"); + this.config.enum = enumInstance; + } + /** @internal */ + build(table3) { + return new PgEnumObjectColumn( + table3, + this.config + ); + } + }; + __name(PgEnumObjectColumnBuilder, "PgEnumObjectColumnBuilder"); + _a18 = entityKind; + __publicField(PgEnumObjectColumnBuilder, _a18, "PgEnumObjectColumnBuilder"); + PgEnumObjectColumn = class extends PgColumn { + enum; + enumValues = this.config.enum.enumValues; + constructor(table3, config3) { + super(table3, config3); + this.enum = config3.enum; + } + getSQLType() { + return this.enum.enumName; + } + }; + __name(PgEnumObjectColumn, "PgEnumObjectColumn"); + _a19 = entityKind; + __publicField(PgEnumObjectColumn, _a19, "PgEnumObjectColumn"); + isPgEnumSym = Symbol.for("drizzle:isPgEnum"); + __name(isPgEnum, "isPgEnum"); + PgEnumColumnBuilder = class extends PgColumnBuilder { + constructor(name, enumInstance) { + super(name, "string", "PgEnumColumn"); + this.config.enum = enumInstance; + } + /** @internal */ + build(table3) { + return new PgEnumColumn( + table3, + this.config + ); + } + }; + __name(PgEnumColumnBuilder, "PgEnumColumnBuilder"); + _a20 = entityKind; + __publicField(PgEnumColumnBuilder, _a20, "PgEnumColumnBuilder"); + PgEnumColumn = class extends PgColumn { + enum = this.config.enum; + enumValues = this.config.enum.enumValues; + constructor(table3, config3) { + super(table3, config3); + this.enum = config3.enum; + } + getSQLType() { + return this.enum.enumName; + } + }; + __name(PgEnumColumn, "PgEnumColumn"); + _a21 = entityKind; + __publicField(PgEnumColumn, _a21, "PgEnumColumn"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/subquery.js +var _a22, Subquery, _a23, WithSubquery; +var init_subquery = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/subquery.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + Subquery = class { + constructor(sql2, fields, alias, isWith = false, usedTables = []) { + this._ = { + brand: "Subquery", + sql: sql2, + selectedFields: fields, + alias, + isWith, + usedTables + }; + } + // getSQL(): SQL { + // return new SQL([this]); + // } + }; + __name(Subquery, "Subquery"); + _a22 = entityKind; + __publicField(Subquery, _a22, "Subquery"); + WithSubquery = class extends Subquery { + }; + __name(WithSubquery, "WithSubquery"); + _a23 = entityKind; + __publicField(WithSubquery, _a23, "WithSubquery"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/version.js +var version2; +var init_version = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/version.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + version2 = "0.44.7"; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/tracing.js +var otel, rawTracer, tracer; +var init_tracing = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/tracing.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tracing_utils(); + init_version(); + tracer = { + startActiveSpan(name, fn) { + if (!otel) { + return fn(); + } + if (!rawTracer) { + rawTracer = otel.trace.getTracer("drizzle-orm", version2); + } + return iife( + (otel2, rawTracer2) => rawTracer2.startActiveSpan( + name, + (span) => { + try { + return fn(span); + } catch (e2) { + span.setStatus({ + code: otel2.SpanStatusCode.ERROR, + message: e2 instanceof Error ? e2.message : "Unknown error" + // eslint-disable-line no-instanceof/no-instanceof + }); + throw e2; + } finally { + span.end(); + } + } + ), + otel, + rawTracer + ); + } + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/view-common.js +var ViewBaseConfig; +var init_view_common = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/view-common.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/sql.js +function isSQLWrapper(value) { + return value !== null && value !== void 0 && typeof value.getSQL === "function"; +} +function mergeQueries(queries) { + const result = { sql: "", params: [] }; + for (const query of queries) { + result.sql += query.sql; + result.params.push(...query.params); + if (query.typings?.length) { + if (!result.typings) { + result.typings = []; + } + result.typings.push(...query.typings); + } + } + return result; +} +function isDriverValueEncoder(value) { + return typeof value === "object" && value !== null && "mapToDriverValue" in value && typeof value.mapToDriverValue === "function"; +} +function sql(strings, ...params) { + const queryChunks = []; + if (params.length > 0 || strings.length > 0 && strings[0] !== "") { + queryChunks.push(new StringChunk(strings[0])); + } + for (const [paramIndex, param2] of params.entries()) { + queryChunks.push(param2, new StringChunk(strings[paramIndex + 1])); + } + return new SQL(queryChunks); +} +function fillPlaceholders(params, values) { + return params.map((p2) => { + if (is(p2, Placeholder)) { + if (!(p2.name in values)) { + throw new Error(`No value for placeholder "${p2.name}" was provided`); + } + return values[p2.name]; + } + if (is(p2, Param) && is(p2.value, Placeholder)) { + if (!(p2.value.name in values)) { + throw new Error(`No value for placeholder "${p2.value.name}" was provided`); + } + return p2.encoder.mapToDriverValue(values[p2.value.name]); + } + return p2; + }); +} +var _a24, FakePrimitiveParam, _a25, StringChunk, _a26, _SQL, SQL, _a27, Name, noopDecoder, noopEncoder, noopMapper, _a28, Param, _a29, Placeholder, IsDrizzleView, _a30, View; +var init_sql = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/sql.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_enum(); + init_subquery(); + init_tracing(); + init_view_common(); + init_column(); + init_table(); + FakePrimitiveParam = class { + }; + __name(FakePrimitiveParam, "FakePrimitiveParam"); + _a24 = entityKind; + __publicField(FakePrimitiveParam, _a24, "FakePrimitiveParam"); + __name(isSQLWrapper, "isSQLWrapper"); + __name(mergeQueries, "mergeQueries"); + StringChunk = class { + value; + constructor(value) { + this.value = Array.isArray(value) ? value : [value]; + } + getSQL() { + return new SQL([this]); + } + }; + __name(StringChunk, "StringChunk"); + _a25 = entityKind; + __publicField(StringChunk, _a25, "StringChunk"); + _SQL = class { + constructor(queryChunks) { + this.queryChunks = queryChunks; + for (const chunk of queryChunks) { + if (is(chunk, Table)) { + const schemaName = chunk[Table.Symbol.Schema]; + this.usedTables.push( + schemaName === void 0 ? chunk[Table.Symbol.Name] : schemaName + "." + chunk[Table.Symbol.Name] + ); + } + } + } + /** @internal */ + decoder = noopDecoder; + shouldInlineParams = false; + /** @internal */ + usedTables = []; + append(query) { + this.queryChunks.push(...query.queryChunks); + return this; + } + toQuery(config3) { + return tracer.startActiveSpan("drizzle.buildSQL", (span) => { + const query = this.buildQueryFromSourceParams(this.queryChunks, config3); + span?.setAttributes({ + "drizzle.query.text": query.sql, + "drizzle.query.params": JSON.stringify(query.params) + }); + return query; + }); + } + buildQueryFromSourceParams(chunks, _config) { + const config3 = Object.assign({}, _config, { + inlineParams: _config.inlineParams || this.shouldInlineParams, + paramStartIndex: _config.paramStartIndex || { value: 0 } + }); + const { + casing, + escapeName, + escapeParam, + prepareTyping, + inlineParams, + paramStartIndex + } = config3; + return mergeQueries(chunks.map((chunk) => { + if (is(chunk, StringChunk)) { + return { sql: chunk.value.join(""), params: [] }; + } + if (is(chunk, Name)) { + return { sql: escapeName(chunk.value), params: [] }; + } + if (chunk === void 0) { + return { sql: "", params: [] }; + } + if (Array.isArray(chunk)) { + const result = [new StringChunk("(")]; + for (const [i2, p2] of chunk.entries()) { + result.push(p2); + if (i2 < chunk.length - 1) { + result.push(new StringChunk(", ")); + } + } + result.push(new StringChunk(")")); + return this.buildQueryFromSourceParams(result, config3); + } + if (is(chunk, _SQL)) { + return this.buildQueryFromSourceParams(chunk.queryChunks, { + ...config3, + inlineParams: inlineParams || chunk.shouldInlineParams + }); + } + if (is(chunk, Table)) { + const schemaName = chunk[Table.Symbol.Schema]; + const tableName = chunk[Table.Symbol.Name]; + return { + sql: schemaName === void 0 || chunk[IsAlias] ? escapeName(tableName) : escapeName(schemaName) + "." + escapeName(tableName), + params: [] + }; + } + if (is(chunk, Column)) { + const columnName = casing.getColumnCasing(chunk); + if (_config.invokeSource === "indexes") { + return { sql: escapeName(columnName), params: [] }; + } + const schemaName = chunk.table[Table.Symbol.Schema]; + return { + sql: chunk.table[IsAlias] || schemaName === void 0 ? escapeName(chunk.table[Table.Symbol.Name]) + "." + escapeName(columnName) : escapeName(schemaName) + "." + escapeName(chunk.table[Table.Symbol.Name]) + "." + escapeName(columnName), + params: [] + }; + } + if (is(chunk, View)) { + const schemaName = chunk[ViewBaseConfig].schema; + const viewName = chunk[ViewBaseConfig].name; + return { + sql: schemaName === void 0 || chunk[ViewBaseConfig].isAlias ? escapeName(viewName) : escapeName(schemaName) + "." + escapeName(viewName), + params: [] + }; + } + if (is(chunk, Param)) { + if (is(chunk.value, Placeholder)) { + return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] }; + } + const mappedValue = chunk.value === null ? null : chunk.encoder.mapToDriverValue(chunk.value); + if (is(mappedValue, _SQL)) { + return this.buildQueryFromSourceParams([mappedValue], config3); + } + if (inlineParams) { + return { sql: this.mapInlineParam(mappedValue, config3), params: [] }; + } + let typings = ["none"]; + if (prepareTyping) { + typings = [prepareTyping(chunk.encoder)]; + } + return { sql: escapeParam(paramStartIndex.value++, mappedValue), params: [mappedValue], typings }; + } + if (is(chunk, Placeholder)) { + return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] }; + } + if (is(chunk, _SQL.Aliased) && chunk.fieldAlias !== void 0) { + return { sql: escapeName(chunk.fieldAlias), params: [] }; + } + if (is(chunk, Subquery)) { + if (chunk._.isWith) { + return { sql: escapeName(chunk._.alias), params: [] }; + } + return this.buildQueryFromSourceParams([ + new StringChunk("("), + chunk._.sql, + new StringChunk(") "), + new Name(chunk._.alias) + ], config3); + } + if (isPgEnum(chunk)) { + if (chunk.schema) { + return { sql: escapeName(chunk.schema) + "." + escapeName(chunk.enumName), params: [] }; + } + return { sql: escapeName(chunk.enumName), params: [] }; + } + if (isSQLWrapper(chunk)) { + if (chunk.shouldOmitSQLParens?.()) { + return this.buildQueryFromSourceParams([chunk.getSQL()], config3); + } + return this.buildQueryFromSourceParams([ + new StringChunk("("), + chunk.getSQL(), + new StringChunk(")") + ], config3); + } + if (inlineParams) { + return { sql: this.mapInlineParam(chunk, config3), params: [] }; + } + return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] }; + })); + } + mapInlineParam(chunk, { escapeString }) { + if (chunk === null) { + return "null"; + } + if (typeof chunk === "number" || typeof chunk === "boolean") { + return chunk.toString(); + } + if (typeof chunk === "string") { + return escapeString(chunk); + } + if (typeof chunk === "object") { + const mappedValueAsString = chunk.toString(); + if (mappedValueAsString === "[object Object]") { + return escapeString(JSON.stringify(chunk)); + } + return escapeString(mappedValueAsString); + } + throw new Error("Unexpected param value: " + chunk); + } + getSQL() { + return this; + } + as(alias) { + if (alias === void 0) { + return this; + } + return new _SQL.Aliased(this, alias); + } + mapWith(decoder2) { + this.decoder = typeof decoder2 === "function" ? { mapFromDriverValue: decoder2 } : decoder2; + return this; + } + inlineParams() { + this.shouldInlineParams = true; + return this; + } + /** + * This method is used to conditionally include a part of the query. + * + * @param condition - Condition to check + * @returns itself if the condition is `true`, otherwise `undefined` + */ + if(condition) { + return condition ? this : void 0; + } + }; + SQL = _SQL; + __name(SQL, "SQL"); + _a26 = entityKind; + __publicField(SQL, _a26, "SQL"); + Name = class { + constructor(value) { + this.value = value; + } + brand; + getSQL() { + return new SQL([this]); + } + }; + __name(Name, "Name"); + _a27 = entityKind; + __publicField(Name, _a27, "Name"); + __name(isDriverValueEncoder, "isDriverValueEncoder"); + noopDecoder = { + mapFromDriverValue: (value) => value + }; + noopEncoder = { + mapToDriverValue: (value) => value + }; + noopMapper = { + ...noopDecoder, + ...noopEncoder + }; + Param = class { + /** + * @param value - Parameter value + * @param encoder - Encoder to convert the value to a driver parameter + */ + constructor(value, encoder2 = noopEncoder) { + this.value = value; + this.encoder = encoder2; + } + brand; + getSQL() { + return new SQL([this]); + } + }; + __name(Param, "Param"); + _a28 = entityKind; + __publicField(Param, _a28, "Param"); + __name(sql, "sql"); + ((sql2) => { + function empty() { + return new SQL([]); + } + __name(empty, "empty"); + sql2.empty = empty; + function fromList(list) { + return new SQL(list); + } + __name(fromList, "fromList"); + sql2.fromList = fromList; + function raw2(str) { + return new SQL([new StringChunk(str)]); + } + __name(raw2, "raw"); + sql2.raw = raw2; + function join(chunks, separator) { + const result = []; + for (const [i2, chunk] of chunks.entries()) { + if (i2 > 0 && separator !== void 0) { + result.push(separator); + } + result.push(chunk); + } + return new SQL(result); + } + __name(join, "join"); + sql2.join = join; + function identifier(value) { + return new Name(value); + } + __name(identifier, "identifier"); + sql2.identifier = identifier; + function placeholder2(name2) { + return new Placeholder(name2); + } + __name(placeholder2, "placeholder2"); + sql2.placeholder = placeholder2; + function param2(value, encoder2) { + return new Param(value, encoder2); + } + __name(param2, "param2"); + sql2.param = param2; + })(sql || (sql = {})); + ((SQL22) => { + class Aliased { + constructor(sql2, fieldAlias) { + this.sql = sql2; + this.fieldAlias = fieldAlias; + } + static [entityKind] = "SQL.Aliased"; + /** @internal */ + isSelectionField = false; + getSQL() { + return this.sql; + } + /** @internal */ + clone() { + return new Aliased(this.sql, this.fieldAlias); + } + } + __name(Aliased, "Aliased"); + SQL22.Aliased = Aliased; + })(SQL || (SQL = {})); + Placeholder = class { + constructor(name2) { + this.name = name2; + } + getSQL() { + return new SQL([this]); + } + }; + __name(Placeholder, "Placeholder"); + _a29 = entityKind; + __publicField(Placeholder, _a29, "Placeholder"); + __name(fillPlaceholders, "fillPlaceholders"); + IsDrizzleView = Symbol.for("drizzle:IsDrizzleView"); + View = class { + /** @internal */ + [(_a30 = entityKind, ViewBaseConfig)]; + /** @internal */ + [IsDrizzleView] = true; + constructor({ name: name2, schema, selectedFields, query }) { + this[ViewBaseConfig] = { + name: name2, + originalName: name2, + schema, + selectedFields, + query, + isExisting: !query, + isAlias: false + }; + } + getSQL() { + return new SQL([this]); + } + }; + __name(View, "View"); + __publicField(View, _a30, "View"); + Column.prototype.getSQL = function() { + return new SQL([this]); + }; + Table.prototype.getSQL = function() { + return new SQL([this]); + }; + Subquery.prototype.getSQL = function() { + return new SQL([this]); + }; + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/utils.js +function mapResultRow(columns, row, joinsNotNullableMap) { + const nullifyMap = {}; + const result = columns.reduce( + (result2, { path, field }, columnIndex) => { + let decoder2; + if (is(field, Column)) { + decoder2 = field; + } else if (is(field, SQL)) { + decoder2 = field.decoder; + } else { + decoder2 = field.sql.decoder; + } + let node = result2; + for (const [pathChunkIndex, pathChunk] of path.entries()) { + if (pathChunkIndex < path.length - 1) { + if (!(pathChunk in node)) { + node[pathChunk] = {}; + } + node = node[pathChunk]; + } else { + const rawValue = row[columnIndex]; + const value = node[pathChunk] = rawValue === null ? null : decoder2.mapFromDriverValue(rawValue); + if (joinsNotNullableMap && is(field, Column) && path.length === 2) { + const objectName = path[0]; + if (!(objectName in nullifyMap)) { + nullifyMap[objectName] = value === null ? getTableName(field.table) : false; + } else if (typeof nullifyMap[objectName] === "string" && nullifyMap[objectName] !== getTableName(field.table)) { + nullifyMap[objectName] = false; + } + } + } + } + return result2; + }, + {} + ); + if (joinsNotNullableMap && Object.keys(nullifyMap).length > 0) { + for (const [objectName, tableName] of Object.entries(nullifyMap)) { + if (typeof tableName === "string" && !joinsNotNullableMap[tableName]) { + result[objectName] = null; + } + } + } + return result; +} +function orderSelectedFields(fields, pathPrefix) { + return Object.entries(fields).reduce((result, [name, field]) => { + if (typeof name !== "string") { + return result; + } + const newPath = pathPrefix ? [...pathPrefix, name] : [name]; + if (is(field, Column) || is(field, SQL) || is(field, SQL.Aliased)) { + result.push({ path: newPath, field }); + } else if (is(field, Table)) { + result.push(...orderSelectedFields(field[Table.Symbol.Columns], newPath)); + } else { + result.push(...orderSelectedFields(field, newPath)); + } + return result; + }, []); +} +function haveSameKeys(left, right) { + const leftKeys = Object.keys(left); + const rightKeys = Object.keys(right); + if (leftKeys.length !== rightKeys.length) { + return false; + } + for (const [index, key] of leftKeys.entries()) { + if (key !== rightKeys[index]) { + return false; + } + } + return true; +} +function mapUpdateSet(table3, values) { + const entries = Object.entries(values).filter(([, value]) => value !== void 0).map(([key, value]) => { + if (is(value, SQL) || is(value, Column)) { + return [key, value]; + } else { + return [key, new Param(value, table3[Table.Symbol.Columns][key])]; + } + }); + if (entries.length === 0) { + throw new Error("No values to set"); + } + return Object.fromEntries(entries); +} +function applyMixins(baseClass, extendedClasses) { + for (const extendedClass of extendedClasses) { + for (const name of Object.getOwnPropertyNames(extendedClass.prototype)) { + if (name === "constructor") + continue; + Object.defineProperty( + baseClass.prototype, + name, + Object.getOwnPropertyDescriptor(extendedClass.prototype, name) || /* @__PURE__ */ Object.create(null) + ); + } + } +} +function getTableColumns(table3) { + return table3[Table.Symbol.Columns]; +} +function getTableLikeName(table3) { + return is(table3, Subquery) ? table3._.alias : is(table3, View) ? table3[ViewBaseConfig].name : is(table3, SQL) ? void 0 : table3[Table.Symbol.IsAlias] ? table3[Table.Symbol.Name] : table3[Table.Symbol.BaseName]; +} +function getColumnNameAndConfig(a2, b2) { + return { + name: typeof a2 === "string" && a2.length > 0 ? a2 : "", + config: typeof a2 === "object" ? a2 : b2 + }; +} +var textDecoder; +var init_utils2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column(); + init_entity(); + init_sql(); + init_subquery(); + init_table(); + init_view_common(); + __name(mapResultRow, "mapResultRow"); + __name(orderSelectedFields, "orderSelectedFields"); + __name(haveSameKeys, "haveSameKeys"); + __name(mapUpdateSet, "mapUpdateSet"); + __name(applyMixins, "applyMixins"); + __name(getTableColumns, "getTableColumns"); + __name(getTableLikeName, "getTableLikeName"); + __name(getColumnNameAndConfig, "getColumnNameAndConfig"); + textDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/table.js +var InlineForeignKeys, EnableRLS, _a31, PgTable; +var init_table2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/table.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table(); + InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys"); + EnableRLS = Symbol.for("drizzle:EnableRLS"); + PgTable = class extends Table { + /**@internal */ + [(_a31 = entityKind, InlineForeignKeys)] = []; + /** @internal */ + [EnableRLS] = false; + /** @internal */ + [Table.Symbol.ExtraConfigBuilder] = void 0; + /** @internal */ + [Table.Symbol.ExtraConfigColumns] = {}; + }; + __name(PgTable, "PgTable"); + __publicField(PgTable, _a31, "PgTable"); + /** @internal */ + __publicField(PgTable, "Symbol", Object.assign({}, Table.Symbol, { + InlineForeignKeys, + EnableRLS + })); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/primary-keys.js +var _a32, PrimaryKeyBuilder, _a33, PrimaryKey; +var init_primary_keys = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/pg-core/primary-keys.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table2(); + PrimaryKeyBuilder = class { + /** @internal */ + columns; + /** @internal */ + name; + constructor(columns, name) { + this.columns = columns; + this.name = name; + } + /** @internal */ + build(table3) { + return new PrimaryKey(table3, this.columns, this.name); + } + }; + __name(PrimaryKeyBuilder, "PrimaryKeyBuilder"); + _a32 = entityKind; + __publicField(PrimaryKeyBuilder, _a32, "PgPrimaryKeyBuilder"); + PrimaryKey = class { + constructor(table3, columns, name) { + this.table = table3; + this.columns = columns; + this.name = name; + } + columns; + name; + getName() { + return this.name ?? `${this.table[PgTable.Symbol.Name]}_${this.columns.map((column) => column.name).join("_")}_pk`; + } + }; + __name(PrimaryKey, "PrimaryKey"); + _a33 = entityKind; + __publicField(PrimaryKey, _a33, "PgPrimaryKey"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/conditions.js +function bindIfParam(value, column) { + if (isDriverValueEncoder(column) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column) && !is(value, Table) && !is(value, View)) { + return new Param(value, column); + } + return value; +} +function and(...unfilteredConditions) { + const conditions = unfilteredConditions.filter( + (c2) => c2 !== void 0 + ); + if (conditions.length === 0) { + return void 0; + } + if (conditions.length === 1) { + return new SQL(conditions); + } + return new SQL([ + new StringChunk("("), + sql.join(conditions, new StringChunk(" and ")), + new StringChunk(")") + ]); +} +function or(...unfilteredConditions) { + const conditions = unfilteredConditions.filter( + (c2) => c2 !== void 0 + ); + if (conditions.length === 0) { + return void 0; + } + if (conditions.length === 1) { + return new SQL(conditions); + } + return new SQL([ + new StringChunk("("), + sql.join(conditions, new StringChunk(" or ")), + new StringChunk(")") + ]); +} +function not(condition) { + return sql`not ${condition}`; +} +function inArray(column, values) { + if (Array.isArray(values)) { + if (values.length === 0) { + return sql`false`; + } + return sql`${column} in ${values.map((v3) => bindIfParam(v3, column))}`; + } + return sql`${column} in ${bindIfParam(values, column)}`; +} +function notInArray(column, values) { + if (Array.isArray(values)) { + if (values.length === 0) { + return sql`true`; + } + return sql`${column} not in ${values.map((v3) => bindIfParam(v3, column))}`; + } + return sql`${column} not in ${bindIfParam(values, column)}`; +} +function isNull(value) { + return sql`${value} is null`; +} +function isNotNull(value) { + return sql`${value} is not null`; +} +function exists(subquery) { + return sql`exists ${subquery}`; +} +function notExists(subquery) { + return sql`not exists ${subquery}`; +} +function between(column, min, max2) { + return sql`${column} between ${bindIfParam(min, column)} and ${bindIfParam( + max2, + column + )}`; +} +function notBetween(column, min, max2) { + return sql`${column} not between ${bindIfParam( + min, + column + )} and ${bindIfParam(max2, column)}`; +} +function like(column, value) { + return sql`${column} like ${value}`; +} +function notLike(column, value) { + return sql`${column} not like ${value}`; +} +function ilike(column, value) { + return sql`${column} ilike ${value}`; +} +function notIlike(column, value) { + return sql`${column} not ilike ${value}`; +} +var eq, ne, gt, gte, lt, lte; +var init_conditions = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/conditions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column(); + init_entity(); + init_table(); + init_sql(); + __name(bindIfParam, "bindIfParam"); + eq = /* @__PURE__ */ __name((left, right) => { + return sql`${left} = ${bindIfParam(right, left)}`; + }, "eq"); + ne = /* @__PURE__ */ __name((left, right) => { + return sql`${left} <> ${bindIfParam(right, left)}`; + }, "ne"); + __name(and, "and"); + __name(or, "or"); + __name(not, "not"); + gt = /* @__PURE__ */ __name((left, right) => { + return sql`${left} > ${bindIfParam(right, left)}`; + }, "gt"); + gte = /* @__PURE__ */ __name((left, right) => { + return sql`${left} >= ${bindIfParam(right, left)}`; + }, "gte"); + lt = /* @__PURE__ */ __name((left, right) => { + return sql`${left} < ${bindIfParam(right, left)}`; + }, "lt"); + lte = /* @__PURE__ */ __name((left, right) => { + return sql`${left} <= ${bindIfParam(right, left)}`; + }, "lte"); + __name(inArray, "inArray"); + __name(notInArray, "notInArray"); + __name(isNull, "isNull"); + __name(isNotNull, "isNotNull"); + __name(exists, "exists"); + __name(notExists, "notExists"); + __name(between, "between"); + __name(notBetween, "notBetween"); + __name(like, "like"); + __name(notLike, "notLike"); + __name(ilike, "ilike"); + __name(notIlike, "notIlike"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/select.js +function asc(column) { + return sql`${column} asc`; +} +function desc(column) { + return sql`${column} desc`; +} +var init_select = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/select.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sql(); + __name(asc, "asc"); + __name(desc, "desc"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/index.js +var init_expressions = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/expressions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_conditions(); + init_select(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/relations.js +function getOperators() { + return { + and, + between, + eq, + exists, + gt, + gte, + ilike, + inArray, + isNull, + isNotNull, + like, + lt, + lte, + ne, + not, + notBetween, + notExists, + notLike, + notIlike, + notInArray, + or, + sql + }; +} +function getOrderByOperators() { + return { + sql, + asc, + desc + }; +} +function extractTablesRelationalConfig(schema, configHelpers) { + if (Object.keys(schema).length === 1 && "default" in schema && !is(schema["default"], Table)) { + schema = schema["default"]; + } + const tableNamesMap = {}; + const relationsBuffer = {}; + const tablesConfig = {}; + for (const [key, value] of Object.entries(schema)) { + if (is(value, Table)) { + const dbName = getTableUniqueName(value); + const bufferedRelations = relationsBuffer[dbName]; + tableNamesMap[dbName] = key; + tablesConfig[key] = { + tsName: key, + dbName: value[Table.Symbol.Name], + schema: value[Table.Symbol.Schema], + columns: value[Table.Symbol.Columns], + relations: bufferedRelations?.relations ?? {}, + primaryKey: bufferedRelations?.primaryKey ?? [] + }; + for (const column of Object.values( + value[Table.Symbol.Columns] + )) { + if (column.primary) { + tablesConfig[key].primaryKey.push(column); + } + } + const extraConfig = value[Table.Symbol.ExtraConfigBuilder]?.(value[Table.Symbol.ExtraConfigColumns]); + if (extraConfig) { + for (const configEntry of Object.values(extraConfig)) { + if (is(configEntry, PrimaryKeyBuilder)) { + tablesConfig[key].primaryKey.push(...configEntry.columns); + } + } + } + } else if (is(value, Relations)) { + const dbName = getTableUniqueName(value.table); + const tableName = tableNamesMap[dbName]; + const relations2 = value.config( + configHelpers(value.table) + ); + let primaryKey2; + for (const [relationName, relation] of Object.entries(relations2)) { + if (tableName) { + const tableConfig = tablesConfig[tableName]; + tableConfig.relations[relationName] = relation; + if (primaryKey2) { + tableConfig.primaryKey.push(...primaryKey2); + } + } else { + if (!(dbName in relationsBuffer)) { + relationsBuffer[dbName] = { + relations: {}, + primaryKey: primaryKey2 + }; + } + relationsBuffer[dbName].relations[relationName] = relation; + } + } + } + } + return { tables: tablesConfig, tableNamesMap }; +} +function relations(table3, relations2) { + return new Relations( + table3, + (helpers) => Object.fromEntries( + Object.entries(relations2(helpers)).map(([key, value]) => [ + key, + value.withFieldName(key) + ]) + ) + ); +} +function createOne(sourceTable) { + return /* @__PURE__ */ __name(function one(table3, config3) { + return new One( + sourceTable, + table3, + config3, + config3?.fields.reduce((res, f2) => res && f2.notNull, true) ?? false + ); + }, "one"); +} +function createMany(sourceTable) { + return /* @__PURE__ */ __name(function many(referencedTable, config3) { + return new Many(sourceTable, referencedTable, config3); + }, "many"); +} +function normalizeRelation(schema, tableNamesMap, relation) { + if (is(relation, One) && relation.config) { + return { + fields: relation.config.fields, + references: relation.config.references + }; + } + const referencedTableTsName = tableNamesMap[getTableUniqueName(relation.referencedTable)]; + if (!referencedTableTsName) { + throw new Error( + `Table "${relation.referencedTable[Table.Symbol.Name]}" not found in schema` + ); + } + const referencedTableConfig = schema[referencedTableTsName]; + if (!referencedTableConfig) { + throw new Error(`Table "${referencedTableTsName}" not found in schema`); + } + const sourceTable = relation.sourceTable; + const sourceTableTsName = tableNamesMap[getTableUniqueName(sourceTable)]; + if (!sourceTableTsName) { + throw new Error( + `Table "${sourceTable[Table.Symbol.Name]}" not found in schema` + ); + } + const reverseRelations = []; + for (const referencedTableRelation of Object.values( + referencedTableConfig.relations + )) { + if (relation.relationName && relation !== referencedTableRelation && referencedTableRelation.relationName === relation.relationName || !relation.relationName && referencedTableRelation.referencedTable === relation.sourceTable) { + reverseRelations.push(referencedTableRelation); + } + } + if (reverseRelations.length > 1) { + throw relation.relationName ? new Error( + `There are multiple relations with name "${relation.relationName}" in table "${referencedTableTsName}"` + ) : new Error( + `There are multiple relations between "${referencedTableTsName}" and "${relation.sourceTable[Table.Symbol.Name]}". Please specify relation name` + ); + } + if (reverseRelations[0] && is(reverseRelations[0], One) && reverseRelations[0].config) { + return { + fields: reverseRelations[0].config.references, + references: reverseRelations[0].config.fields + }; + } + throw new Error( + `There is not enough information to infer relation "${sourceTableTsName}.${relation.fieldName}"` + ); +} +function createTableRelationsHelpers(sourceTable) { + return { + one: createOne(sourceTable), + many: createMany(sourceTable) + }; +} +function mapRelationalRow(tablesConfig, tableConfig, row, buildQueryResultSelection, mapColumnValue = (value) => value) { + const result = {}; + for (const [ + selectionItemIndex, + selectionItem + ] of buildQueryResultSelection.entries()) { + if (selectionItem.isJson) { + const relation = tableConfig.relations[selectionItem.tsKey]; + const rawSubRows = row[selectionItemIndex]; + const subRows = typeof rawSubRows === "string" ? JSON.parse(rawSubRows) : rawSubRows; + result[selectionItem.tsKey] = is(relation, One) ? subRows && mapRelationalRow( + tablesConfig, + tablesConfig[selectionItem.relationTableTsKey], + subRows, + selectionItem.selection, + mapColumnValue + ) : subRows.map( + (subRow) => mapRelationalRow( + tablesConfig, + tablesConfig[selectionItem.relationTableTsKey], + subRow, + selectionItem.selection, + mapColumnValue + ) + ); + } else { + const value = mapColumnValue(row[selectionItemIndex]); + const field = selectionItem.field; + let decoder2; + if (is(field, Column)) { + decoder2 = field; + } else if (is(field, SQL)) { + decoder2 = field.decoder; + } else { + decoder2 = field.sql.decoder; + } + result[selectionItem.tsKey] = value === null ? null : decoder2.mapFromDriverValue(value); + } + } + return result; +} +var _a34, Relation, _a35, Relations, _a36, _One, One, _a37, _Many, Many; +var init_relations = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/relations.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_table(); + init_column(); + init_entity(); + init_primary_keys(); + init_expressions(); + init_sql(); + Relation = class { + constructor(sourceTable, referencedTable, relationName) { + this.sourceTable = sourceTable; + this.referencedTable = referencedTable; + this.relationName = relationName; + this.referencedTableName = referencedTable[Table.Symbol.Name]; + } + referencedTableName; + fieldName; + }; + __name(Relation, "Relation"); + _a34 = entityKind; + __publicField(Relation, _a34, "Relation"); + Relations = class { + constructor(table3, config3) { + this.table = table3; + this.config = config3; + } + }; + __name(Relations, "Relations"); + _a35 = entityKind; + __publicField(Relations, _a35, "Relations"); + _One = class extends Relation { + constructor(sourceTable, referencedTable, config3, isNullable) { + super(sourceTable, referencedTable, config3?.relationName); + this.config = config3; + this.isNullable = isNullable; + } + withFieldName(fieldName) { + const relation = new _One( + this.sourceTable, + this.referencedTable, + this.config, + this.isNullable + ); + relation.fieldName = fieldName; + return relation; + } + }; + One = _One; + __name(One, "One"); + _a36 = entityKind; + __publicField(One, _a36, "One"); + _Many = class extends Relation { + constructor(sourceTable, referencedTable, config3) { + super(sourceTable, referencedTable, config3?.relationName); + this.config = config3; + } + withFieldName(fieldName) { + const relation = new _Many( + this.sourceTable, + this.referencedTable, + this.config + ); + relation.fieldName = fieldName; + return relation; + } + }; + Many = _Many; + __name(Many, "Many"); + _a37 = entityKind; + __publicField(Many, _a37, "Many"); + __name(getOperators, "getOperators"); + __name(getOrderByOperators, "getOrderByOperators"); + __name(extractTablesRelationalConfig, "extractTablesRelationalConfig"); + __name(relations, "relations"); + __name(createOne, "createOne"); + __name(createMany, "createMany"); + __name(normalizeRelation, "normalizeRelation"); + __name(createTableRelationsHelpers, "createTableRelationsHelpers"); + __name(mapRelationalRow, "mapRelationalRow"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/alias.js +function aliasedTable(table3, tableAlias) { + return new Proxy(table3, new TableAliasProxyHandler(tableAlias, false)); +} +function aliasedTableColumn(column, tableAlias) { + return new Proxy( + column, + new ColumnAliasProxyHandler(new Proxy(column.table, new TableAliasProxyHandler(tableAlias, false))) + ); +} +function mapColumnsInAliasedSQLToAlias(query, alias) { + return new SQL.Aliased(mapColumnsInSQLToAlias(query.sql, alias), query.fieldAlias); +} +function mapColumnsInSQLToAlias(query, alias) { + return sql.join(query.queryChunks.map((c2) => { + if (is(c2, Column)) { + return aliasedTableColumn(c2, alias); + } + if (is(c2, SQL)) { + return mapColumnsInSQLToAlias(c2, alias); + } + if (is(c2, SQL.Aliased)) { + return mapColumnsInAliasedSQLToAlias(c2, alias); + } + return c2; + })); +} +var _a38, ColumnAliasProxyHandler, _a39, TableAliasProxyHandler, _a40, RelationTableAliasProxyHandler; +var init_alias = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/alias.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column(); + init_entity(); + init_sql(); + init_table(); + init_view_common(); + ColumnAliasProxyHandler = class { + constructor(table3) { + this.table = table3; + } + get(columnObj, prop) { + if (prop === "table") { + return this.table; + } + return columnObj[prop]; + } + }; + __name(ColumnAliasProxyHandler, "ColumnAliasProxyHandler"); + _a38 = entityKind; + __publicField(ColumnAliasProxyHandler, _a38, "ColumnAliasProxyHandler"); + TableAliasProxyHandler = class { + constructor(alias, replaceOriginalName) { + this.alias = alias; + this.replaceOriginalName = replaceOriginalName; + } + get(target, prop) { + if (prop === Table.Symbol.IsAlias) { + return true; + } + if (prop === Table.Symbol.Name) { + return this.alias; + } + if (this.replaceOriginalName && prop === Table.Symbol.OriginalName) { + return this.alias; + } + if (prop === ViewBaseConfig) { + return { + ...target[ViewBaseConfig], + name: this.alias, + isAlias: true + }; + } + if (prop === Table.Symbol.Columns) { + const columns = target[Table.Symbol.Columns]; + if (!columns) { + return columns; + } + const proxiedColumns = {}; + Object.keys(columns).map((key) => { + proxiedColumns[key] = new Proxy( + columns[key], + new ColumnAliasProxyHandler(new Proxy(target, this)) + ); + }); + return proxiedColumns; + } + const value = target[prop]; + if (is(value, Column)) { + return new Proxy(value, new ColumnAliasProxyHandler(new Proxy(target, this))); + } + return value; + } + }; + __name(TableAliasProxyHandler, "TableAliasProxyHandler"); + _a39 = entityKind; + __publicField(TableAliasProxyHandler, _a39, "TableAliasProxyHandler"); + RelationTableAliasProxyHandler = class { + constructor(alias) { + this.alias = alias; + } + get(target, prop) { + if (prop === "sourceTable") { + return aliasedTable(target.sourceTable, this.alias); + } + return target[prop]; + } + }; + __name(RelationTableAliasProxyHandler, "RelationTableAliasProxyHandler"); + _a40 = entityKind; + __publicField(RelationTableAliasProxyHandler, _a40, "RelationTableAliasProxyHandler"); + __name(aliasedTable, "aliasedTable"); + __name(aliasedTableColumn, "aliasedTableColumn"); + __name(mapColumnsInAliasedSQLToAlias, "mapColumnsInAliasedSQLToAlias"); + __name(mapColumnsInSQLToAlias, "mapColumnsInSQLToAlias"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/selection-proxy.js +var _a41, _SelectionProxyHandler, SelectionProxyHandler; +var init_selection_proxy = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/selection-proxy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_alias(); + init_column(); + init_entity(); + init_sql(); + init_subquery(); + init_view_common(); + _SelectionProxyHandler = class { + config; + constructor(config3) { + this.config = { ...config3 }; + } + get(subquery, prop) { + if (prop === "_") { + return { + ...subquery["_"], + selectedFields: new Proxy( + subquery._.selectedFields, + this + ) + }; + } + if (prop === ViewBaseConfig) { + return { + ...subquery[ViewBaseConfig], + selectedFields: new Proxy( + subquery[ViewBaseConfig].selectedFields, + this + ) + }; + } + if (typeof prop === "symbol") { + return subquery[prop]; + } + const columns = is(subquery, Subquery) ? subquery._.selectedFields : is(subquery, View) ? subquery[ViewBaseConfig].selectedFields : subquery; + const value = columns[prop]; + if (is(value, SQL.Aliased)) { + if (this.config.sqlAliasedBehavior === "sql" && !value.isSelectionField) { + return value.sql; + } + const newValue = value.clone(); + newValue.isSelectionField = true; + return newValue; + } + if (is(value, SQL)) { + if (this.config.sqlBehavior === "sql") { + return value; + } + throw new Error( + `You tried to reference "${prop}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.` + ); + } + if (is(value, Column)) { + if (this.config.alias) { + return new Proxy( + value, + new ColumnAliasProxyHandler( + new Proxy( + value.table, + new TableAliasProxyHandler(this.config.alias, this.config.replaceOriginalName ?? false) + ) + ) + ); + } + return value; + } + if (typeof value !== "object" || value === null) { + return value; + } + return new Proxy(value, new _SelectionProxyHandler(this.config)); + } + }; + SelectionProxyHandler = _SelectionProxyHandler; + __name(SelectionProxyHandler, "SelectionProxyHandler"); + _a41 = entityKind; + __publicField(SelectionProxyHandler, _a41, "SelectionProxyHandler"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/query-promise.js +var _a42, QueryPromise; +var init_query_promise = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/query-promise.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + QueryPromise = class { + [(_a42 = entityKind, Symbol.toStringTag)] = "QueryPromise"; + catch(onRejected) { + return this.then(void 0, onRejected); + } + finally(onFinally) { + return this.then( + (value) => { + onFinally?.(); + return value; + }, + (reason) => { + onFinally?.(); + throw reason; + } + ); + } + then(onFulfilled, onRejected) { + return this.execute().then(onFulfilled, onRejected); + } + }; + __name(QueryPromise, "QueryPromise"); + __publicField(QueryPromise, _a42, "QueryPromise"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/foreign-keys.js +var _a43, ForeignKeyBuilder2, _a44, ForeignKey2; +var init_foreign_keys2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/foreign-keys.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + ForeignKeyBuilder2 = class { + /** @internal */ + reference; + /** @internal */ + _onUpdate; + /** @internal */ + _onDelete; + constructor(config3, actions) { + this.reference = () => { + const { name, columns, foreignColumns } = config3(); + return { name, columns, foreignTable: foreignColumns[0].table, foreignColumns }; + }; + if (actions) { + this._onUpdate = actions.onUpdate; + this._onDelete = actions.onDelete; + } + } + onUpdate(action) { + this._onUpdate = action; + return this; + } + onDelete(action) { + this._onDelete = action; + return this; + } + /** @internal */ + build(table3) { + return new ForeignKey2(table3, this); + } + }; + __name(ForeignKeyBuilder2, "ForeignKeyBuilder"); + _a43 = entityKind; + __publicField(ForeignKeyBuilder2, _a43, "SQLiteForeignKeyBuilder"); + ForeignKey2 = class { + constructor(table3, builder) { + this.table = table3; + this.reference = builder.reference; + this.onUpdate = builder._onUpdate; + this.onDelete = builder._onDelete; + } + reference; + onUpdate; + onDelete; + getName() { + const { name, columns, foreignColumns } = this.reference(); + const columnNames = columns.map((column) => column.name); + const foreignColumnNames = foreignColumns.map((column) => column.name); + const chunks = [ + this.table[TableName], + ...columnNames, + foreignColumns[0].table[TableName], + ...foreignColumnNames + ]; + return name ?? `${chunks.join("_")}_fk`; + } + }; + __name(ForeignKey2, "ForeignKey"); + _a44 = entityKind; + __publicField(ForeignKey2, _a44, "SQLiteForeignKey"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/unique-constraint.js +function uniqueKeyName2(table3, columns) { + return `${table3[TableName]}_${columns.join("_")}_unique`; +} +var _a45, UniqueConstraintBuilder2, _a46, UniqueOnConstraintBuilder2, _a47, UniqueConstraint2; +var init_unique_constraint2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/unique-constraint.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table_utils(); + __name(uniqueKeyName2, "uniqueKeyName"); + UniqueConstraintBuilder2 = class { + constructor(columns, name) { + this.name = name; + this.columns = columns; + } + /** @internal */ + columns; + /** @internal */ + build(table3) { + return new UniqueConstraint2(table3, this.columns, this.name); + } + }; + __name(UniqueConstraintBuilder2, "UniqueConstraintBuilder"); + _a45 = entityKind; + __publicField(UniqueConstraintBuilder2, _a45, "SQLiteUniqueConstraintBuilder"); + UniqueOnConstraintBuilder2 = class { + /** @internal */ + name; + constructor(name) { + this.name = name; + } + on(...columns) { + return new UniqueConstraintBuilder2(columns, this.name); + } + }; + __name(UniqueOnConstraintBuilder2, "UniqueOnConstraintBuilder"); + _a46 = entityKind; + __publicField(UniqueOnConstraintBuilder2, _a46, "SQLiteUniqueOnConstraintBuilder"); + UniqueConstraint2 = class { + constructor(table3, columns, name) { + this.table = table3; + this.columns = columns; + this.name = name ?? uniqueKeyName2(this.table, this.columns.map((column) => column.name)); + } + columns; + name; + getName() { + return this.name; + } + }; + __name(UniqueConstraint2, "UniqueConstraint"); + _a47 = entityKind; + __publicField(UniqueConstraint2, _a47, "SQLiteUniqueConstraint"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/common.js +var _a48, SQLiteColumnBuilder, _a49, SQLiteColumn; +var init_common2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/common.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column_builder(); + init_column(); + init_entity(); + init_foreign_keys2(); + init_unique_constraint2(); + SQLiteColumnBuilder = class extends ColumnBuilder { + foreignKeyConfigs = []; + references(ref, actions = {}) { + this.foreignKeyConfigs.push({ ref, actions }); + return this; + } + unique(name) { + this.config.isUnique = true; + this.config.uniqueName = name; + return this; + } + generatedAlwaysAs(as2, config3) { + this.config.generated = { + as: as2, + type: "always", + mode: config3?.mode ?? "virtual" + }; + return this; + } + /** @internal */ + buildForeignKeys(column, table3) { + return this.foreignKeyConfigs.map(({ ref, actions }) => { + return ((ref2, actions2) => { + const builder = new ForeignKeyBuilder2(() => { + const foreignColumn = ref2(); + return { columns: [column], foreignColumns: [foreignColumn] }; + }); + if (actions2.onUpdate) { + builder.onUpdate(actions2.onUpdate); + } + if (actions2.onDelete) { + builder.onDelete(actions2.onDelete); + } + return builder.build(table3); + })(ref, actions); + }); + } + }; + __name(SQLiteColumnBuilder, "SQLiteColumnBuilder"); + _a48 = entityKind; + __publicField(SQLiteColumnBuilder, _a48, "SQLiteColumnBuilder"); + SQLiteColumn = class extends Column { + constructor(table3, config3) { + if (!config3.uniqueName) { + config3.uniqueName = uniqueKeyName2(table3, [config3.name]); + } + super(table3, config3); + this.table = table3; + } + }; + __name(SQLiteColumn, "SQLiteColumn"); + _a49 = entityKind; + __publicField(SQLiteColumn, _a49, "SQLiteColumn"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/blob.js +function blob(a2, b2) { + const { name, config: config3 } = getColumnNameAndConfig(a2, b2); + if (config3?.mode === "json") { + return new SQLiteBlobJsonBuilder(name); + } + if (config3?.mode === "bigint") { + return new SQLiteBigIntBuilder(name); + } + return new SQLiteBlobBufferBuilder(name); +} +var _a50, SQLiteBigIntBuilder, _a51, SQLiteBigInt, _a52, SQLiteBlobJsonBuilder, _a53, SQLiteBlobJson, _a54, SQLiteBlobBufferBuilder, _a55, SQLiteBlobBuffer; +var init_blob = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/blob.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_utils2(); + init_common2(); + SQLiteBigIntBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "bigint", "SQLiteBigInt"); + } + /** @internal */ + build(table3) { + return new SQLiteBigInt(table3, this.config); + } + }; + __name(SQLiteBigIntBuilder, "SQLiteBigIntBuilder"); + _a50 = entityKind; + __publicField(SQLiteBigIntBuilder, _a50, "SQLiteBigIntBuilder"); + SQLiteBigInt = class extends SQLiteColumn { + getSQLType() { + return "blob"; + } + mapFromDriverValue(value) { + if (typeof Buffer !== "undefined" && Buffer.from) { + const buf = Buffer.isBuffer(value) ? value : value instanceof ArrayBuffer ? Buffer.from(value) : value.buffer ? Buffer.from(value.buffer, value.byteOffset, value.byteLength) : Buffer.from(value); + return BigInt(buf.toString("utf8")); + } + return BigInt(textDecoder.decode(value)); + } + mapToDriverValue(value) { + return Buffer.from(value.toString()); + } + }; + __name(SQLiteBigInt, "SQLiteBigInt"); + _a51 = entityKind; + __publicField(SQLiteBigInt, _a51, "SQLiteBigInt"); + SQLiteBlobJsonBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "json", "SQLiteBlobJson"); + } + /** @internal */ + build(table3) { + return new SQLiteBlobJson( + table3, + this.config + ); + } + }; + __name(SQLiteBlobJsonBuilder, "SQLiteBlobJsonBuilder"); + _a52 = entityKind; + __publicField(SQLiteBlobJsonBuilder, _a52, "SQLiteBlobJsonBuilder"); + SQLiteBlobJson = class extends SQLiteColumn { + getSQLType() { + return "blob"; + } + mapFromDriverValue(value) { + if (typeof Buffer !== "undefined" && Buffer.from) { + const buf = Buffer.isBuffer(value) ? value : value instanceof ArrayBuffer ? Buffer.from(value) : value.buffer ? Buffer.from(value.buffer, value.byteOffset, value.byteLength) : Buffer.from(value); + return JSON.parse(buf.toString("utf8")); + } + return JSON.parse(textDecoder.decode(value)); + } + mapToDriverValue(value) { + return Buffer.from(JSON.stringify(value)); + } + }; + __name(SQLiteBlobJson, "SQLiteBlobJson"); + _a53 = entityKind; + __publicField(SQLiteBlobJson, _a53, "SQLiteBlobJson"); + SQLiteBlobBufferBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "buffer", "SQLiteBlobBuffer"); + } + /** @internal */ + build(table3) { + return new SQLiteBlobBuffer(table3, this.config); + } + }; + __name(SQLiteBlobBufferBuilder, "SQLiteBlobBufferBuilder"); + _a54 = entityKind; + __publicField(SQLiteBlobBufferBuilder, _a54, "SQLiteBlobBufferBuilder"); + SQLiteBlobBuffer = class extends SQLiteColumn { + mapFromDriverValue(value) { + if (Buffer.isBuffer(value)) { + return value; + } + return Buffer.from(value); + } + getSQLType() { + return "blob"; + } + }; + __name(SQLiteBlobBuffer, "SQLiteBlobBuffer"); + _a55 = entityKind; + __publicField(SQLiteBlobBuffer, _a55, "SQLiteBlobBuffer"); + __name(blob, "blob"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/custom.js +function customType(customTypeParams) { + return (a2, b2) => { + const { name, config: config3 } = getColumnNameAndConfig(a2, b2); + return new SQLiteCustomColumnBuilder( + name, + config3, + customTypeParams + ); + }; +} +var _a56, SQLiteCustomColumnBuilder, _a57, SQLiteCustomColumn; +var init_custom = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/custom.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_utils2(); + init_common2(); + SQLiteCustomColumnBuilder = class extends SQLiteColumnBuilder { + constructor(name, fieldConfig, customTypeParams) { + super(name, "custom", "SQLiteCustomColumn"); + this.config.fieldConfig = fieldConfig; + this.config.customTypeParams = customTypeParams; + } + /** @internal */ + build(table3) { + return new SQLiteCustomColumn( + table3, + this.config + ); + } + }; + __name(SQLiteCustomColumnBuilder, "SQLiteCustomColumnBuilder"); + _a56 = entityKind; + __publicField(SQLiteCustomColumnBuilder, _a56, "SQLiteCustomColumnBuilder"); + SQLiteCustomColumn = class extends SQLiteColumn { + sqlName; + mapTo; + mapFrom; + constructor(table3, config3) { + super(table3, config3); + this.sqlName = config3.customTypeParams.dataType(config3.fieldConfig); + this.mapTo = config3.customTypeParams.toDriver; + this.mapFrom = config3.customTypeParams.fromDriver; + } + getSQLType() { + return this.sqlName; + } + mapFromDriverValue(value) { + return typeof this.mapFrom === "function" ? this.mapFrom(value) : value; + } + mapToDriverValue(value) { + return typeof this.mapTo === "function" ? this.mapTo(value) : value; + } + }; + __name(SQLiteCustomColumn, "SQLiteCustomColumn"); + _a57 = entityKind; + __publicField(SQLiteCustomColumn, _a57, "SQLiteCustomColumn"); + __name(customType, "customType"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/integer.js +function integer(a2, b2) { + const { name, config: config3 } = getColumnNameAndConfig(a2, b2); + if (config3?.mode === "timestamp" || config3?.mode === "timestamp_ms") { + return new SQLiteTimestampBuilder(name, config3.mode); + } + if (config3?.mode === "boolean") { + return new SQLiteBooleanBuilder(name, config3.mode); + } + return new SQLiteIntegerBuilder(name); +} +var _a58, SQLiteBaseIntegerBuilder, _a59, SQLiteBaseInteger, _a60, SQLiteIntegerBuilder, _a61, SQLiteInteger, _a62, SQLiteTimestampBuilder, _a63, SQLiteTimestamp, _a64, SQLiteBooleanBuilder, _a65, SQLiteBoolean; +var init_integer = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/integer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_sql(); + init_utils2(); + init_common2(); + SQLiteBaseIntegerBuilder = class extends SQLiteColumnBuilder { + constructor(name, dataType, columnType) { + super(name, dataType, columnType); + this.config.autoIncrement = false; + } + primaryKey(config3) { + if (config3?.autoIncrement) { + this.config.autoIncrement = true; + } + this.config.hasDefault = true; + return super.primaryKey(); + } + }; + __name(SQLiteBaseIntegerBuilder, "SQLiteBaseIntegerBuilder"); + _a58 = entityKind; + __publicField(SQLiteBaseIntegerBuilder, _a58, "SQLiteBaseIntegerBuilder"); + SQLiteBaseInteger = class extends SQLiteColumn { + autoIncrement = this.config.autoIncrement; + getSQLType() { + return "integer"; + } + }; + __name(SQLiteBaseInteger, "SQLiteBaseInteger"); + _a59 = entityKind; + __publicField(SQLiteBaseInteger, _a59, "SQLiteBaseInteger"); + SQLiteIntegerBuilder = class extends SQLiteBaseIntegerBuilder { + constructor(name) { + super(name, "number", "SQLiteInteger"); + } + build(table3) { + return new SQLiteInteger( + table3, + this.config + ); + } + }; + __name(SQLiteIntegerBuilder, "SQLiteIntegerBuilder"); + _a60 = entityKind; + __publicField(SQLiteIntegerBuilder, _a60, "SQLiteIntegerBuilder"); + SQLiteInteger = class extends SQLiteBaseInteger { + }; + __name(SQLiteInteger, "SQLiteInteger"); + _a61 = entityKind; + __publicField(SQLiteInteger, _a61, "SQLiteInteger"); + SQLiteTimestampBuilder = class extends SQLiteBaseIntegerBuilder { + constructor(name, mode) { + super(name, "date", "SQLiteTimestamp"); + this.config.mode = mode; + } + /** + * @deprecated Use `default()` with your own expression instead. + * + * Adds `DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer))` to the column, which is the current epoch timestamp in milliseconds. + */ + defaultNow() { + return this.default(sql`(cast((julianday('now') - 2440587.5)*86400000 as integer))`); + } + build(table3) { + return new SQLiteTimestamp( + table3, + this.config + ); + } + }; + __name(SQLiteTimestampBuilder, "SQLiteTimestampBuilder"); + _a62 = entityKind; + __publicField(SQLiteTimestampBuilder, _a62, "SQLiteTimestampBuilder"); + SQLiteTimestamp = class extends SQLiteBaseInteger { + mode = this.config.mode; + mapFromDriverValue(value) { + if (this.config.mode === "timestamp") { + return new Date(value * 1e3); + } + return new Date(value); + } + mapToDriverValue(value) { + const unix = value.getTime(); + if (this.config.mode === "timestamp") { + return Math.floor(unix / 1e3); + } + return unix; + } + }; + __name(SQLiteTimestamp, "SQLiteTimestamp"); + _a63 = entityKind; + __publicField(SQLiteTimestamp, _a63, "SQLiteTimestamp"); + SQLiteBooleanBuilder = class extends SQLiteBaseIntegerBuilder { + constructor(name, mode) { + super(name, "boolean", "SQLiteBoolean"); + this.config.mode = mode; + } + build(table3) { + return new SQLiteBoolean( + table3, + this.config + ); + } + }; + __name(SQLiteBooleanBuilder, "SQLiteBooleanBuilder"); + _a64 = entityKind; + __publicField(SQLiteBooleanBuilder, _a64, "SQLiteBooleanBuilder"); + SQLiteBoolean = class extends SQLiteBaseInteger { + mode = this.config.mode; + mapFromDriverValue(value) { + return Number(value) === 1; + } + mapToDriverValue(value) { + return value ? 1 : 0; + } + }; + __name(SQLiteBoolean, "SQLiteBoolean"); + _a65 = entityKind; + __publicField(SQLiteBoolean, _a65, "SQLiteBoolean"); + __name(integer, "integer"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/numeric.js +function numeric(a2, b2) { + const { name, config: config3 } = getColumnNameAndConfig(a2, b2); + const mode = config3?.mode; + return mode === "number" ? new SQLiteNumericNumberBuilder(name) : mode === "bigint" ? new SQLiteNumericBigIntBuilder(name) : new SQLiteNumericBuilder(name); +} +var _a66, SQLiteNumericBuilder, _a67, SQLiteNumeric, _a68, SQLiteNumericNumberBuilder, _a69, SQLiteNumericNumber, _a70, SQLiteNumericBigIntBuilder, _a71, SQLiteNumericBigInt; +var init_numeric = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/numeric.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_utils2(); + init_common2(); + SQLiteNumericBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "string", "SQLiteNumeric"); + } + /** @internal */ + build(table3) { + return new SQLiteNumeric( + table3, + this.config + ); + } + }; + __name(SQLiteNumericBuilder, "SQLiteNumericBuilder"); + _a66 = entityKind; + __publicField(SQLiteNumericBuilder, _a66, "SQLiteNumericBuilder"); + SQLiteNumeric = class extends SQLiteColumn { + mapFromDriverValue(value) { + if (typeof value === "string") + return value; + return String(value); + } + getSQLType() { + return "numeric"; + } + }; + __name(SQLiteNumeric, "SQLiteNumeric"); + _a67 = entityKind; + __publicField(SQLiteNumeric, _a67, "SQLiteNumeric"); + SQLiteNumericNumberBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "number", "SQLiteNumericNumber"); + } + /** @internal */ + build(table3) { + return new SQLiteNumericNumber( + table3, + this.config + ); + } + }; + __name(SQLiteNumericNumberBuilder, "SQLiteNumericNumberBuilder"); + _a68 = entityKind; + __publicField(SQLiteNumericNumberBuilder, _a68, "SQLiteNumericNumberBuilder"); + SQLiteNumericNumber = class extends SQLiteColumn { + mapFromDriverValue(value) { + if (typeof value === "number") + return value; + return Number(value); + } + mapToDriverValue = String; + getSQLType() { + return "numeric"; + } + }; + __name(SQLiteNumericNumber, "SQLiteNumericNumber"); + _a69 = entityKind; + __publicField(SQLiteNumericNumber, _a69, "SQLiteNumericNumber"); + SQLiteNumericBigIntBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "bigint", "SQLiteNumericBigInt"); + } + /** @internal */ + build(table3) { + return new SQLiteNumericBigInt( + table3, + this.config + ); + } + }; + __name(SQLiteNumericBigIntBuilder, "SQLiteNumericBigIntBuilder"); + _a70 = entityKind; + __publicField(SQLiteNumericBigIntBuilder, _a70, "SQLiteNumericBigIntBuilder"); + SQLiteNumericBigInt = class extends SQLiteColumn { + mapFromDriverValue = BigInt; + mapToDriverValue = String; + getSQLType() { + return "numeric"; + } + }; + __name(SQLiteNumericBigInt, "SQLiteNumericBigInt"); + _a71 = entityKind; + __publicField(SQLiteNumericBigInt, _a71, "SQLiteNumericBigInt"); + __name(numeric, "numeric"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/real.js +function real(name) { + return new SQLiteRealBuilder(name ?? ""); +} +var _a72, SQLiteRealBuilder, _a73, SQLiteReal; +var init_real = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/real.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_common2(); + SQLiteRealBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "number", "SQLiteReal"); + } + /** @internal */ + build(table3) { + return new SQLiteReal(table3, this.config); + } + }; + __name(SQLiteRealBuilder, "SQLiteRealBuilder"); + _a72 = entityKind; + __publicField(SQLiteRealBuilder, _a72, "SQLiteRealBuilder"); + SQLiteReal = class extends SQLiteColumn { + getSQLType() { + return "real"; + } + }; + __name(SQLiteReal, "SQLiteReal"); + _a73 = entityKind; + __publicField(SQLiteReal, _a73, "SQLiteReal"); + __name(real, "real"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/text.js +function text(a2, b2 = {}) { + const { name, config: config3 } = getColumnNameAndConfig(a2, b2); + if (config3.mode === "json") { + return new SQLiteTextJsonBuilder(name); + } + return new SQLiteTextBuilder(name, config3); +} +var _a74, SQLiteTextBuilder, _a75, SQLiteText, _a76, SQLiteTextJsonBuilder, _a77, SQLiteTextJson; +var init_text = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/text.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_utils2(); + init_common2(); + SQLiteTextBuilder = class extends SQLiteColumnBuilder { + constructor(name, config3) { + super(name, "string", "SQLiteText"); + this.config.enumValues = config3.enum; + this.config.length = config3.length; + } + /** @internal */ + build(table3) { + return new SQLiteText( + table3, + this.config + ); + } + }; + __name(SQLiteTextBuilder, "SQLiteTextBuilder"); + _a74 = entityKind; + __publicField(SQLiteTextBuilder, _a74, "SQLiteTextBuilder"); + SQLiteText = class extends SQLiteColumn { + enumValues = this.config.enumValues; + length = this.config.length; + constructor(table3, config3) { + super(table3, config3); + } + getSQLType() { + return `text${this.config.length ? `(${this.config.length})` : ""}`; + } + }; + __name(SQLiteText, "SQLiteText"); + _a75 = entityKind; + __publicField(SQLiteText, _a75, "SQLiteText"); + SQLiteTextJsonBuilder = class extends SQLiteColumnBuilder { + constructor(name) { + super(name, "json", "SQLiteTextJson"); + } + /** @internal */ + build(table3) { + return new SQLiteTextJson( + table3, + this.config + ); + } + }; + __name(SQLiteTextJsonBuilder, "SQLiteTextJsonBuilder"); + _a76 = entityKind; + __publicField(SQLiteTextJsonBuilder, _a76, "SQLiteTextJsonBuilder"); + SQLiteTextJson = class extends SQLiteColumn { + getSQLType() { + return "text"; + } + mapFromDriverValue(value) { + return JSON.parse(value); + } + mapToDriverValue(value) { + return JSON.stringify(value); + } + }; + __name(SQLiteTextJson, "SQLiteTextJson"); + _a77 = entityKind; + __publicField(SQLiteTextJson, _a77, "SQLiteTextJson"); + __name(text, "text"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/all.js +function getSQLiteColumnBuilders() { + return { + blob, + customType, + integer, + numeric, + real, + text + }; +} +var init_all = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/all.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_blob(); + init_custom(); + init_integer(); + init_numeric(); + init_real(); + init_text(); + __name(getSQLiteColumnBuilders, "getSQLiteColumnBuilders"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/table.js +function sqliteTableBase(name, columns, extraConfig, schema, baseName = name) { + const rawTable = new SQLiteTable(name, schema, baseName); + const parsedColumns = typeof columns === "function" ? columns(getSQLiteColumnBuilders()) : columns; + const builtColumns = Object.fromEntries( + Object.entries(parsedColumns).map(([name2, colBuilderBase]) => { + const colBuilder = colBuilderBase; + colBuilder.setName(name2); + const column = colBuilder.build(rawTable); + rawTable[InlineForeignKeys2].push(...colBuilder.buildForeignKeys(column, rawTable)); + return [name2, column]; + }) + ); + const table3 = Object.assign(rawTable, builtColumns); + table3[Table.Symbol.Columns] = builtColumns; + table3[Table.Symbol.ExtraConfigColumns] = builtColumns; + if (extraConfig) { + table3[SQLiteTable.Symbol.ExtraConfigBuilder] = extraConfig; + } + return table3; +} +var InlineForeignKeys2, _a78, SQLiteTable, sqliteTable; +var init_table3 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/table.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table(); + init_all(); + InlineForeignKeys2 = Symbol.for("drizzle:SQLiteInlineForeignKeys"); + SQLiteTable = class extends Table { + /** @internal */ + [(_a78 = entityKind, Table.Symbol.Columns)]; + /** @internal */ + [InlineForeignKeys2] = []; + /** @internal */ + [Table.Symbol.ExtraConfigBuilder] = void 0; + }; + __name(SQLiteTable, "SQLiteTable"); + __publicField(SQLiteTable, _a78, "SQLiteTable"); + /** @internal */ + __publicField(SQLiteTable, "Symbol", Object.assign({}, Table.Symbol, { + InlineForeignKeys: InlineForeignKeys2 + })); + __name(sqliteTableBase, "sqliteTableBase"); + sqliteTable = /* @__PURE__ */ __name((name, columns, extraConfig) => { + return sqliteTableBase(name, columns, extraConfig); + }, "sqliteTable"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/checks.js +function check(name, value) { + return new CheckBuilder(name, value); +} +var _a79, CheckBuilder, _a80, Check; +var init_checks = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/checks.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + CheckBuilder = class { + constructor(name, value) { + this.name = name; + this.value = value; + } + brand; + build(table3) { + return new Check(table3, this); + } + }; + __name(CheckBuilder, "CheckBuilder"); + _a79 = entityKind; + __publicField(CheckBuilder, _a79, "SQLiteCheckBuilder"); + Check = class { + constructor(table3, builder) { + this.table = table3; + this.name = builder.name; + this.value = builder.value; + } + name; + value; + }; + __name(Check, "Check"); + _a80 = entityKind; + __publicField(Check, _a80, "SQLiteCheck"); + __name(check, "check"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/indexes.js +function uniqueIndex(name) { + return new IndexBuilderOn(name, true); +} +var _a81, IndexBuilderOn, _a82, IndexBuilder, _a83, Index; +var init_indexes = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/indexes.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + IndexBuilderOn = class { + constructor(name, unique) { + this.name = name; + this.unique = unique; + } + on(...columns) { + return new IndexBuilder(this.name, columns, this.unique); + } + }; + __name(IndexBuilderOn, "IndexBuilderOn"); + _a81 = entityKind; + __publicField(IndexBuilderOn, _a81, "SQLiteIndexBuilderOn"); + IndexBuilder = class { + /** @internal */ + config; + constructor(name, columns, unique) { + this.config = { + name, + columns, + unique, + where: void 0 + }; + } + /** + * Condition for partial index. + */ + where(condition) { + this.config.where = condition; + return this; + } + /** @internal */ + build(table3) { + return new Index(this.config, table3); + } + }; + __name(IndexBuilder, "IndexBuilder"); + _a82 = entityKind; + __publicField(IndexBuilder, _a82, "SQLiteIndexBuilder"); + Index = class { + config; + constructor(config3, table3) { + this.config = { ...config3, table: table3 }; + } + }; + __name(Index, "Index"); + _a83 = entityKind; + __publicField(Index, _a83, "SQLiteIndex"); + __name(uniqueIndex, "uniqueIndex"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/primary-keys.js +function primaryKey(...config3) { + if (config3[0].columns) { + return new PrimaryKeyBuilder2(config3[0].columns, config3[0].name); + } + return new PrimaryKeyBuilder2(config3); +} +var _a84, PrimaryKeyBuilder2, _a85, PrimaryKey2; +var init_primary_keys2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/primary-keys.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table3(); + __name(primaryKey, "primaryKey"); + PrimaryKeyBuilder2 = class { + /** @internal */ + columns; + /** @internal */ + name; + constructor(columns, name) { + this.columns = columns; + this.name = name; + } + /** @internal */ + build(table3) { + return new PrimaryKey2(table3, this.columns, this.name); + } + }; + __name(PrimaryKeyBuilder2, "PrimaryKeyBuilder"); + _a84 = entityKind; + __publicField(PrimaryKeyBuilder2, _a84, "SQLitePrimaryKeyBuilder"); + PrimaryKey2 = class { + constructor(table3, columns, name) { + this.table = table3; + this.columns = columns; + this.name = name; + } + columns; + name; + getName() { + return this.name ?? `${this.table[SQLiteTable.Symbol.Name]}_${this.columns.map((column) => column.name).join("_")}_pk`; + } + }; + __name(PrimaryKey2, "PrimaryKey"); + _a85 = entityKind; + __publicField(PrimaryKey2, _a85, "SQLitePrimaryKey"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/utils.js +function extractUsedTable(table3) { + if (is(table3, SQLiteTable)) { + return [`${table3[Table.Symbol.BaseName]}`]; + } + if (is(table3, Subquery)) { + return table3._.usedTables ?? []; + } + if (is(table3, SQL)) { + return table3.usedTables ?? []; + } + return []; +} +var init_utils3 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_sql(); + init_subquery(); + init_table(); + init_table3(); + __name(extractUsedTable, "extractUsedTable"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/delete.js +var _a86, SQLiteDeleteBase; +var init_delete = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/delete.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + init_selection_proxy(); + init_table3(); + init_table(); + init_utils2(); + init_utils3(); + SQLiteDeleteBase = class extends QueryPromise { + constructor(table3, session, dialect, withList) { + super(); + this.table = table3; + this.session = session; + this.dialect = dialect; + this.config = { table: table3, withList }; + } + /** @internal */ + config; + /** + * Adds a `where` clause to the query. + * + * Calling this method will delete only those rows that fulfill a specified condition. + * + * See docs: {@link https://orm.drizzle.team/docs/delete} + * + * @param where the `where` clause. + * + * @example + * You can use conditional operators and `sql function` to filter the rows to be deleted. + * + * ```ts + * // Delete all cars with green color + * db.delete(cars).where(eq(cars.color, 'green')); + * // or + * db.delete(cars).where(sql`${cars.color} = 'green'`) + * ``` + * + * You can logically combine conditional operators with `and()` and `or()` operators: + * + * ```ts + * // Delete all BMW cars with a green color + * db.delete(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW'))); + * + * // Delete all cars with the green or blue color + * db.delete(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue'))); + * ``` + */ + where(where) { + this.config.where = where; + return this; + } + orderBy(...columns) { + if (typeof columns[0] === "function") { + const orderBy = columns[0]( + new Proxy( + this.config.table[Table.Symbol.Columns], + new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" }) + ) + ); + const orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy]; + this.config.orderBy = orderByArray; + } else { + const orderByArray = columns; + this.config.orderBy = orderByArray; + } + return this; + } + limit(limit) { + this.config.limit = limit; + return this; + } + returning(fields = this.table[SQLiteTable.Symbol.Columns]) { + this.config.returning = orderSelectedFields(fields); + return this; + } + /** @internal */ + getSQL() { + return this.dialect.buildDeleteQuery(this.config); + } + toSQL() { + const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL()); + return rest; + } + /** @internal */ + _prepare(isOneTimeQuery = true) { + return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + this.dialect.sqlToQuery(this.getSQL()), + this.config.returning, + this.config.returning ? "all" : "run", + true, + void 0, + { + type: "delete", + tables: extractUsedTable(this.config.table) + } + ); + } + prepare() { + return this._prepare(false); + } + run = (placeholderValues) => { + return this._prepare().run(placeholderValues); + }; + all = (placeholderValues) => { + return this._prepare().all(placeholderValues); + }; + get = (placeholderValues) => { + return this._prepare().get(placeholderValues); + }; + values = (placeholderValues) => { + return this._prepare().values(placeholderValues); + }; + async execute(placeholderValues) { + return this._prepare().execute(placeholderValues); + } + $dynamic() { + return this; + } + }; + __name(SQLiteDeleteBase, "SQLiteDeleteBase"); + _a86 = entityKind; + __publicField(SQLiteDeleteBase, _a86, "SQLiteDelete"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/casing.js +function toSnakeCase(input) { + const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? []; + return words.map((word) => word.toLowerCase()).join("_"); +} +function toCamelCase(input) { + const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? []; + return words.reduce((acc, word, i2) => { + const formattedWord = i2 === 0 ? word.toLowerCase() : `${word[0].toUpperCase()}${word.slice(1)}`; + return acc + formattedWord; + }, ""); +} +function noopCase(input) { + return input; +} +var _a87, CasingCache; +var init_casing = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/casing.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_table(); + __name(toSnakeCase, "toSnakeCase"); + __name(toCamelCase, "toCamelCase"); + __name(noopCase, "noopCase"); + CasingCache = class { + /** @internal */ + cache = {}; + cachedTables = {}; + convert; + constructor(casing) { + this.convert = casing === "snake_case" ? toSnakeCase : casing === "camelCase" ? toCamelCase : noopCase; + } + getColumnCasing(column) { + if (!column.keyAsName) + return column.name; + const schema = column.table[Table.Symbol.Schema] ?? "public"; + const tableName = column.table[Table.Symbol.OriginalName]; + const key = `${schema}.${tableName}.${column.name}`; + if (!this.cache[key]) { + this.cacheTable(column.table); + } + return this.cache[key]; + } + cacheTable(table3) { + const schema = table3[Table.Symbol.Schema] ?? "public"; + const tableName = table3[Table.Symbol.OriginalName]; + const tableKey = `${schema}.${tableName}`; + if (!this.cachedTables[tableKey]) { + for (const column of Object.values(table3[Table.Symbol.Columns])) { + const columnKey = `${tableKey}.${column.name}`; + this.cache[columnKey] = this.convert(column.name); + } + this.cachedTables[tableKey] = true; + } + } + clearCache() { + this.cache = {}; + this.cachedTables = {}; + } + }; + __name(CasingCache, "CasingCache"); + _a87 = entityKind; + __publicField(CasingCache, _a87, "CasingCache"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/errors.js +var _a88, DrizzleError, DrizzleQueryError, _a89, TransactionRollbackError; +var init_errors = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/errors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + DrizzleError = class extends Error { + constructor({ message: message2, cause }) { + super(message2); + this.name = "DrizzleError"; + this.cause = cause; + } + }; + __name(DrizzleError, "DrizzleError"); + _a88 = entityKind; + __publicField(DrizzleError, _a88, "DrizzleError"); + DrizzleQueryError = class extends Error { + constructor(query, params, cause) { + super(`Failed query: ${query} +params: ${params}`); + this.query = query; + this.params = params; + this.cause = cause; + Error.captureStackTrace(this, DrizzleQueryError); + if (cause) + this.cause = cause; + } + }; + __name(DrizzleQueryError, "DrizzleQueryError"); + TransactionRollbackError = class extends DrizzleError { + constructor() { + super({ message: "Rollback" }); + } + }; + __name(TransactionRollbackError, "TransactionRollbackError"); + _a89 = entityKind; + __publicField(TransactionRollbackError, _a89, "TransactionRollbackError"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/aggregate.js +function count3(expression) { + return sql`count(${expression || sql.raw("*")})`.mapWith(Number); +} +function max(expression) { + return sql`max(${expression})`.mapWith(is(expression, Column) ? expression : String); +} +var init_aggregate = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/aggregate.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_column(); + init_entity(); + init_sql(); + __name(count3, "count"); + __name(max, "max"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/vector.js +var init_vector = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/vector.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/index.js +var init_functions = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/functions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_aggregate(); + init_vector(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/index.js +var init_sql2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sql/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_expressions(); + init_functions(); + init_sql(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/index.js +var init_columns = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/columns/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_blob(); + init_common2(); + init_custom(); + init_integer(); + init_numeric(); + init_real(); + init_text(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/view-base.js +var _a90, SQLiteViewBase; +var init_view_base = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/view-base.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_sql(); + SQLiteViewBase = class extends View { + }; + __name(SQLiteViewBase, "SQLiteViewBase"); + _a90 = entityKind; + __publicField(SQLiteViewBase, _a90, "SQLiteViewBase"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/dialect.js +var _a91, SQLiteDialect, _a92, SQLiteSyncDialect, _a93, SQLiteAsyncDialect; +var init_dialect = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/dialect.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_alias(); + init_casing(); + init_column(); + init_entity(); + init_errors(); + init_relations(); + init_sql2(); + init_sql(); + init_columns(); + init_table3(); + init_subquery(); + init_table(); + init_utils2(); + init_view_common(); + init_view_base(); + SQLiteDialect = class { + /** @internal */ + casing; + constructor(config3) { + this.casing = new CasingCache(config3?.casing); + } + escapeName(name) { + return `"${name}"`; + } + escapeParam(_num) { + return "?"; + } + escapeString(str) { + return `'${str.replace(/'/g, "''")}'`; + } + buildWithCTE(queries) { + if (!queries?.length) + return void 0; + const withSqlChunks = [sql`with `]; + for (const [i2, w2] of queries.entries()) { + withSqlChunks.push(sql`${sql.identifier(w2._.alias)} as (${w2._.sql})`); + if (i2 < queries.length - 1) { + withSqlChunks.push(sql`, `); + } + } + withSqlChunks.push(sql` `); + return sql.join(withSqlChunks); + } + buildDeleteQuery({ table: table3, where, returning, withList, limit, orderBy }) { + const withSql = this.buildWithCTE(withList); + const returningSql = returning ? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}` : void 0; + const whereSql = where ? sql` where ${where}` : void 0; + const orderBySql = this.buildOrderBy(orderBy); + const limitSql = this.buildLimit(limit); + return sql`${withSql}delete from ${table3}${whereSql}${returningSql}${orderBySql}${limitSql}`; + } + buildUpdateSet(table3, set2) { + const tableColumns = table3[Table.Symbol.Columns]; + const columnNames = Object.keys(tableColumns).filter( + (colName) => set2[colName] !== void 0 || tableColumns[colName]?.onUpdateFn !== void 0 + ); + const setSize = columnNames.length; + return sql.join(columnNames.flatMap((colName, i2) => { + const col = tableColumns[colName]; + const value = set2[colName] ?? sql.param(col.onUpdateFn(), col); + const res = sql`${sql.identifier(this.casing.getColumnCasing(col))} = ${value}`; + if (i2 < setSize - 1) { + return [res, sql.raw(", ")]; + } + return [res]; + })); + } + buildUpdateQuery({ table: table3, set: set2, where, returning, withList, joins, from, limit, orderBy }) { + const withSql = this.buildWithCTE(withList); + const setSql = this.buildUpdateSet(table3, set2); + const fromSql = from && sql.join([sql.raw(" from "), this.buildFromTable(from)]); + const joinsSql = this.buildJoins(joins); + const returningSql = returning ? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}` : void 0; + const whereSql = where ? sql` where ${where}` : void 0; + const orderBySql = this.buildOrderBy(orderBy); + const limitSql = this.buildLimit(limit); + return sql`${withSql}update ${table3} set ${setSql}${fromSql}${joinsSql}${whereSql}${returningSql}${orderBySql}${limitSql}`; + } + /** + * Builds selection SQL with provided fields/expressions + * + * Examples: + * + * `select from` + * + * `insert ... returning ` + * + * If `isSingleTable` is true, then columns won't be prefixed with table name + */ + buildSelection(fields, { isSingleTable = false } = {}) { + const columnsLen = fields.length; + const chunks = fields.flatMap(({ field }, i2) => { + const chunk = []; + if (is(field, SQL.Aliased) && field.isSelectionField) { + chunk.push(sql.identifier(field.fieldAlias)); + } else if (is(field, SQL.Aliased) || is(field, SQL)) { + const query = is(field, SQL.Aliased) ? field.sql : field; + if (isSingleTable) { + chunk.push( + new SQL( + query.queryChunks.map((c2) => { + if (is(c2, Column)) { + return sql.identifier(this.casing.getColumnCasing(c2)); + } + return c2; + }) + ) + ); + } else { + chunk.push(query); + } + if (is(field, SQL.Aliased)) { + chunk.push(sql` as ${sql.identifier(field.fieldAlias)}`); + } + } else if (is(field, Column)) { + const tableName = field.table[Table.Symbol.Name]; + if (field.columnType === "SQLiteNumericBigInt") { + if (isSingleTable) { + chunk.push(sql`cast(${sql.identifier(this.casing.getColumnCasing(field))} as text)`); + } else { + chunk.push( + sql`cast(${sql.identifier(tableName)}.${sql.identifier(this.casing.getColumnCasing(field))} as text)` + ); + } + } else { + if (isSingleTable) { + chunk.push(sql.identifier(this.casing.getColumnCasing(field))); + } else { + chunk.push(sql`${sql.identifier(tableName)}.${sql.identifier(this.casing.getColumnCasing(field))}`); + } + } + } + if (i2 < columnsLen - 1) { + chunk.push(sql`, `); + } + return chunk; + }); + return sql.join(chunks); + } + buildJoins(joins) { + if (!joins || joins.length === 0) { + return void 0; + } + const joinsArray = []; + if (joins) { + for (const [index, joinMeta] of joins.entries()) { + if (index === 0) { + joinsArray.push(sql` `); + } + const table3 = joinMeta.table; + const onSql = joinMeta.on ? sql` on ${joinMeta.on}` : void 0; + if (is(table3, SQLiteTable)) { + const tableName = table3[SQLiteTable.Symbol.Name]; + const tableSchema = table3[SQLiteTable.Symbol.Schema]; + const origTableName = table3[SQLiteTable.Symbol.OriginalName]; + const alias = tableName === origTableName ? void 0 : joinMeta.alias; + joinsArray.push( + sql`${sql.raw(joinMeta.joinType)} join ${tableSchema ? sql`${sql.identifier(tableSchema)}.` : void 0}${sql.identifier(origTableName)}${alias && sql` ${sql.identifier(alias)}`}${onSql}` + ); + } else { + joinsArray.push( + sql`${sql.raw(joinMeta.joinType)} join ${table3}${onSql}` + ); + } + if (index < joins.length - 1) { + joinsArray.push(sql` `); + } + } + } + return sql.join(joinsArray); + } + buildLimit(limit) { + return typeof limit === "object" || typeof limit === "number" && limit >= 0 ? sql` limit ${limit}` : void 0; + } + buildOrderBy(orderBy) { + const orderByList = []; + if (orderBy) { + for (const [index, orderByValue] of orderBy.entries()) { + orderByList.push(orderByValue); + if (index < orderBy.length - 1) { + orderByList.push(sql`, `); + } + } + } + return orderByList.length > 0 ? sql` order by ${sql.join(orderByList)}` : void 0; + } + buildFromTable(table3) { + if (is(table3, Table) && table3[Table.Symbol.IsAlias]) { + return sql`${sql`${sql.identifier(table3[Table.Symbol.Schema] ?? "")}.`.if(table3[Table.Symbol.Schema])}${sql.identifier(table3[Table.Symbol.OriginalName])} ${sql.identifier(table3[Table.Symbol.Name])}`; + } + return table3; + } + buildSelectQuery({ + withList, + fields, + fieldsFlat, + where, + having, + table: table3, + joins, + orderBy, + groupBy, + limit, + offset, + distinct, + setOperators + }) { + const fieldsList = fieldsFlat ?? orderSelectedFields(fields); + for (const f2 of fieldsList) { + if (is(f2.field, Column) && getTableName(f2.field.table) !== (is(table3, Subquery) ? table3._.alias : is(table3, SQLiteViewBase) ? table3[ViewBaseConfig].name : is(table3, SQL) ? void 0 : getTableName(table3)) && !((table22) => joins?.some( + ({ alias }) => alias === (table22[Table.Symbol.IsAlias] ? getTableName(table22) : table22[Table.Symbol.BaseName]) + ))(f2.field.table)) { + const tableName = getTableName(f2.field.table); + throw new Error( + `Your "${f2.path.join("->")}" field references a column "${tableName}"."${f2.field.name}", but the table "${tableName}" is not part of the query! Did you forget to join it?` + ); + } + } + const isSingleTable = !joins || joins.length === 0; + const withSql = this.buildWithCTE(withList); + const distinctSql = distinct ? sql` distinct` : void 0; + const selection = this.buildSelection(fieldsList, { isSingleTable }); + const tableSql = this.buildFromTable(table3); + const joinsSql = this.buildJoins(joins); + const whereSql = where ? sql` where ${where}` : void 0; + const havingSql = having ? sql` having ${having}` : void 0; + const groupByList = []; + if (groupBy) { + for (const [index, groupByValue] of groupBy.entries()) { + groupByList.push(groupByValue); + if (index < groupBy.length - 1) { + groupByList.push(sql`, `); + } + } + } + const groupBySql = groupByList.length > 0 ? sql` group by ${sql.join(groupByList)}` : void 0; + const orderBySql = this.buildOrderBy(orderBy); + const limitSql = this.buildLimit(limit); + const offsetSql = offset ? sql` offset ${offset}` : void 0; + const finalQuery = sql`${withSql}select${distinctSql} ${selection} from ${tableSql}${joinsSql}${whereSql}${groupBySql}${havingSql}${orderBySql}${limitSql}${offsetSql}`; + if (setOperators.length > 0) { + return this.buildSetOperations(finalQuery, setOperators); + } + return finalQuery; + } + buildSetOperations(leftSelect, setOperators) { + const [setOperator, ...rest] = setOperators; + if (!setOperator) { + throw new Error("Cannot pass undefined values to any set operator"); + } + if (rest.length === 0) { + return this.buildSetOperationQuery({ leftSelect, setOperator }); + } + return this.buildSetOperations( + this.buildSetOperationQuery({ leftSelect, setOperator }), + rest + ); + } + buildSetOperationQuery({ + leftSelect, + setOperator: { type, isAll, rightSelect, limit, orderBy, offset } + }) { + const leftChunk = sql`${leftSelect.getSQL()} `; + const rightChunk = sql`${rightSelect.getSQL()}`; + let orderBySql; + if (orderBy && orderBy.length > 0) { + const orderByValues = []; + for (const singleOrderBy of orderBy) { + if (is(singleOrderBy, SQLiteColumn)) { + orderByValues.push(sql.identifier(singleOrderBy.name)); + } else if (is(singleOrderBy, SQL)) { + for (let i2 = 0; i2 < singleOrderBy.queryChunks.length; i2++) { + const chunk = singleOrderBy.queryChunks[i2]; + if (is(chunk, SQLiteColumn)) { + singleOrderBy.queryChunks[i2] = sql.identifier(this.casing.getColumnCasing(chunk)); + } + } + orderByValues.push(sql`${singleOrderBy}`); + } else { + orderByValues.push(sql`${singleOrderBy}`); + } + } + orderBySql = sql` order by ${sql.join(orderByValues, sql`, `)}`; + } + const limitSql = typeof limit === "object" || typeof limit === "number" && limit >= 0 ? sql` limit ${limit}` : void 0; + const operatorChunk = sql.raw(`${type} ${isAll ? "all " : ""}`); + const offsetSql = offset ? sql` offset ${offset}` : void 0; + return sql`${leftChunk}${operatorChunk}${rightChunk}${orderBySql}${limitSql}${offsetSql}`; + } + buildInsertQuery({ table: table3, values: valuesOrSelect, onConflict, returning, withList, select }) { + const valuesSqlList = []; + const columns = table3[Table.Symbol.Columns]; + const colEntries = Object.entries(columns).filter( + ([_, col]) => !col.shouldDisableInsert() + ); + const insertOrder = colEntries.map(([, column]) => sql.identifier(this.casing.getColumnCasing(column))); + if (select) { + const select2 = valuesOrSelect; + if (is(select2, SQL)) { + valuesSqlList.push(select2); + } else { + valuesSqlList.push(select2.getSQL()); + } + } else { + const values = valuesOrSelect; + valuesSqlList.push(sql.raw("values ")); + for (const [valueIndex, value] of values.entries()) { + const valueList = []; + for (const [fieldName, col] of colEntries) { + const colValue = value[fieldName]; + if (colValue === void 0 || is(colValue, Param) && colValue.value === void 0) { + let defaultValue; + if (col.default !== null && col.default !== void 0) { + defaultValue = is(col.default, SQL) ? col.default : sql.param(col.default, col); + } else if (col.defaultFn !== void 0) { + const defaultFnResult = col.defaultFn(); + defaultValue = is(defaultFnResult, SQL) ? defaultFnResult : sql.param(defaultFnResult, col); + } else if (!col.default && col.onUpdateFn !== void 0) { + const onUpdateFnResult = col.onUpdateFn(); + defaultValue = is(onUpdateFnResult, SQL) ? onUpdateFnResult : sql.param(onUpdateFnResult, col); + } else { + defaultValue = sql`null`; + } + valueList.push(defaultValue); + } else { + valueList.push(colValue); + } + } + valuesSqlList.push(valueList); + if (valueIndex < values.length - 1) { + valuesSqlList.push(sql`, `); + } + } + } + const withSql = this.buildWithCTE(withList); + const valuesSql = sql.join(valuesSqlList); + const returningSql = returning ? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}` : void 0; + const onConflictSql = onConflict?.length ? sql.join(onConflict) : void 0; + return sql`${withSql}insert into ${table3} ${insertOrder} ${valuesSql}${onConflictSql}${returningSql}`; + } + sqlToQuery(sql2, invokeSource) { + return sql2.toQuery({ + casing: this.casing, + escapeName: this.escapeName, + escapeParam: this.escapeParam, + escapeString: this.escapeString, + invokeSource + }); + } + buildRelationalQuery({ + fullSchema, + schema, + tableNamesMap, + table: table3, + tableConfig, + queryConfig: config3, + tableAlias, + nestedQueryRelation, + joinOn + }) { + let selection = []; + let limit, offset, orderBy = [], where; + const joins = []; + if (config3 === true) { + const selectionEntries = Object.entries(tableConfig.columns); + selection = selectionEntries.map(([key, value]) => ({ + dbKey: value.name, + tsKey: key, + field: aliasedTableColumn(value, tableAlias), + relationTableTsKey: void 0, + isJson: false, + selection: [] + })); + } else { + const aliasedColumns = Object.fromEntries( + Object.entries(tableConfig.columns).map(([key, value]) => [key, aliasedTableColumn(value, tableAlias)]) + ); + if (config3.where) { + const whereSql = typeof config3.where === "function" ? config3.where(aliasedColumns, getOperators()) : config3.where; + where = whereSql && mapColumnsInSQLToAlias(whereSql, tableAlias); + } + const fieldsSelection = []; + let selectedColumns = []; + if (config3.columns) { + let isIncludeMode = false; + for (const [field, value] of Object.entries(config3.columns)) { + if (value === void 0) { + continue; + } + if (field in tableConfig.columns) { + if (!isIncludeMode && value === true) { + isIncludeMode = true; + } + selectedColumns.push(field); + } + } + if (selectedColumns.length > 0) { + selectedColumns = isIncludeMode ? selectedColumns.filter((c2) => config3.columns?.[c2] === true) : Object.keys(tableConfig.columns).filter((key) => !selectedColumns.includes(key)); + } + } else { + selectedColumns = Object.keys(tableConfig.columns); + } + for (const field of selectedColumns) { + const column = tableConfig.columns[field]; + fieldsSelection.push({ tsKey: field, value: column }); + } + let selectedRelations = []; + if (config3.with) { + selectedRelations = Object.entries(config3.with).filter((entry) => !!entry[1]).map(([tsKey, queryConfig]) => ({ tsKey, queryConfig, relation: tableConfig.relations[tsKey] })); + } + let extras; + if (config3.extras) { + extras = typeof config3.extras === "function" ? config3.extras(aliasedColumns, { sql }) : config3.extras; + for (const [tsKey, value] of Object.entries(extras)) { + fieldsSelection.push({ + tsKey, + value: mapColumnsInAliasedSQLToAlias(value, tableAlias) + }); + } + } + for (const { tsKey, value } of fieldsSelection) { + selection.push({ + dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name, + tsKey, + field: is(value, Column) ? aliasedTableColumn(value, tableAlias) : value, + relationTableTsKey: void 0, + isJson: false, + selection: [] + }); + } + let orderByOrig = typeof config3.orderBy === "function" ? config3.orderBy(aliasedColumns, getOrderByOperators()) : config3.orderBy ?? []; + if (!Array.isArray(orderByOrig)) { + orderByOrig = [orderByOrig]; + } + orderBy = orderByOrig.map((orderByValue) => { + if (is(orderByValue, Column)) { + return aliasedTableColumn(orderByValue, tableAlias); + } + return mapColumnsInSQLToAlias(orderByValue, tableAlias); + }); + limit = config3.limit; + offset = config3.offset; + for (const { + tsKey: selectedRelationTsKey, + queryConfig: selectedRelationConfigValue, + relation + } of selectedRelations) { + const normalizedRelation = normalizeRelation(schema, tableNamesMap, relation); + const relationTableName = getTableUniqueName(relation.referencedTable); + const relationTableTsName = tableNamesMap[relationTableName]; + const relationTableAlias = `${tableAlias}_${selectedRelationTsKey}`; + const joinOn2 = and( + ...normalizedRelation.fields.map( + (field2, i2) => eq( + aliasedTableColumn(normalizedRelation.references[i2], relationTableAlias), + aliasedTableColumn(field2, tableAlias) + ) + ) + ); + const builtRelation = this.buildRelationalQuery({ + fullSchema, + schema, + tableNamesMap, + table: fullSchema[relationTableTsName], + tableConfig: schema[relationTableTsName], + queryConfig: is(relation, One) ? selectedRelationConfigValue === true ? { limit: 1 } : { ...selectedRelationConfigValue, limit: 1 } : selectedRelationConfigValue, + tableAlias: relationTableAlias, + joinOn: joinOn2, + nestedQueryRelation: relation + }); + const field = sql`(${builtRelation.sql})`.as(selectedRelationTsKey); + selection.push({ + dbKey: selectedRelationTsKey, + tsKey: selectedRelationTsKey, + field, + relationTableTsKey: relationTableTsName, + isJson: true, + selection: builtRelation.selection + }); + } + } + if (selection.length === 0) { + throw new DrizzleError({ + message: `No fields selected for table "${tableConfig.tsName}" ("${tableAlias}"). You need to have at least one item in "columns", "with" or "extras". If you need to select all columns, omit the "columns" key or set it to undefined.` + }); + } + let result; + where = and(joinOn, where); + if (nestedQueryRelation) { + let field = sql`json_array(${sql.join( + selection.map( + ({ field: field2 }) => is(field2, SQLiteColumn) ? sql.identifier(this.casing.getColumnCasing(field2)) : is(field2, SQL.Aliased) ? field2.sql : field2 + ), + sql`, ` + )})`; + if (is(nestedQueryRelation, Many)) { + field = sql`coalesce(json_group_array(${field}), json_array())`; + } + const nestedSelection = [{ + dbKey: "data", + tsKey: "data", + field: field.as("data"), + isJson: true, + relationTableTsKey: tableConfig.tsName, + selection + }]; + const needsSubquery = limit !== void 0 || offset !== void 0 || orderBy.length > 0; + if (needsSubquery) { + result = this.buildSelectQuery({ + table: aliasedTable(table3, tableAlias), + fields: {}, + fieldsFlat: [ + { + path: [], + field: sql.raw("*") + } + ], + where, + limit, + offset, + orderBy, + setOperators: [] + }); + where = void 0; + limit = void 0; + offset = void 0; + orderBy = void 0; + } else { + result = aliasedTable(table3, tableAlias); + } + result = this.buildSelectQuery({ + table: is(result, SQLiteTable) ? result : new Subquery(result, {}, tableAlias), + fields: {}, + fieldsFlat: nestedSelection.map(({ field: field2 }) => ({ + path: [], + field: is(field2, Column) ? aliasedTableColumn(field2, tableAlias) : field2 + })), + joins, + where, + limit, + offset, + orderBy, + setOperators: [] + }); + } else { + result = this.buildSelectQuery({ + table: aliasedTable(table3, tableAlias), + fields: {}, + fieldsFlat: selection.map(({ field }) => ({ + path: [], + field: is(field, Column) ? aliasedTableColumn(field, tableAlias) : field + })), + joins, + where, + limit, + offset, + orderBy, + setOperators: [] + }); + } + return { + tableTsKey: tableConfig.tsName, + sql: result, + selection + }; + } + }; + __name(SQLiteDialect, "SQLiteDialect"); + _a91 = entityKind; + __publicField(SQLiteDialect, _a91, "SQLiteDialect"); + SQLiteSyncDialect = class extends SQLiteDialect { + migrate(migrations, session, config3) { + const migrationsTable = config3 === void 0 ? "__drizzle_migrations" : typeof config3 === "string" ? "__drizzle_migrations" : config3.migrationsTable ?? "__drizzle_migrations"; + const migrationTableCreate = sql` + CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} ( + id SERIAL PRIMARY KEY, + hash text NOT NULL, + created_at numeric + ) + `; + session.run(migrationTableCreate); + const dbMigrations = session.values( + sql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1` + ); + const lastDbMigration = dbMigrations[0] ?? void 0; + session.run(sql`BEGIN`); + try { + for (const migration of migrations) { + if (!lastDbMigration || Number(lastDbMigration[2]) < migration.folderMillis) { + for (const stmt of migration.sql) { + session.run(sql.raw(stmt)); + } + session.run( + sql`INSERT INTO ${sql.identifier(migrationsTable)} ("hash", "created_at") VALUES(${migration.hash}, ${migration.folderMillis})` + ); + } + } + session.run(sql`COMMIT`); + } catch (e2) { + session.run(sql`ROLLBACK`); + throw e2; + } + } + }; + __name(SQLiteSyncDialect, "SQLiteSyncDialect"); + _a92 = entityKind; + __publicField(SQLiteSyncDialect, _a92, "SQLiteSyncDialect"); + SQLiteAsyncDialect = class extends SQLiteDialect { + async migrate(migrations, session, config3) { + const migrationsTable = config3 === void 0 ? "__drizzle_migrations" : typeof config3 === "string" ? "__drizzle_migrations" : config3.migrationsTable ?? "__drizzle_migrations"; + const migrationTableCreate = sql` + CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} ( + id SERIAL PRIMARY KEY, + hash text NOT NULL, + created_at numeric + ) + `; + await session.run(migrationTableCreate); + const dbMigrations = await session.values( + sql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1` + ); + const lastDbMigration = dbMigrations[0] ?? void 0; + await session.transaction(async (tx) => { + for (const migration of migrations) { + if (!lastDbMigration || Number(lastDbMigration[2]) < migration.folderMillis) { + for (const stmt of migration.sql) { + await tx.run(sql.raw(stmt)); + } + await tx.run( + sql`INSERT INTO ${sql.identifier(migrationsTable)} ("hash", "created_at") VALUES(${migration.hash}, ${migration.folderMillis})` + ); + } + } + }); + } + }; + __name(SQLiteAsyncDialect, "SQLiteAsyncDialect"); + _a93 = entityKind; + __publicField(SQLiteAsyncDialect, _a93, "SQLiteAsyncDialect"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/query-builders/query-builder.js +var _a94, TypedQueryBuilder; +var init_query_builder = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/query-builders/query-builder.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + TypedQueryBuilder = class { + /** @internal */ + getSelectedFields() { + return this._.selectedFields; + } + }; + __name(TypedQueryBuilder, "TypedQueryBuilder"); + _a94 = entityKind; + __publicField(TypedQueryBuilder, _a94, "TypedQueryBuilder"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.js +function createSetOperator(type, isAll) { + return (leftSelect, rightSelect, ...restSelects) => { + const setOperators = [rightSelect, ...restSelects].map((select) => ({ + type, + isAll, + rightSelect: select + })); + for (const setOperator of setOperators) { + if (!haveSameKeys(leftSelect.getSelectedFields(), setOperator.rightSelect.getSelectedFields())) { + throw new Error( + "Set operator error (union / intersect / except): selected fields are not the same or are in a different order" + ); + } + } + return leftSelect.addSetOperators(setOperators); + }; +} +var _a95, SQLiteSelectBuilder, _a96, SQLiteSelectQueryBuilderBase, _a97, SQLiteSelectBase, getSQLiteSetOperators, union, unionAll, intersect, except; +var init_select2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_builder(); + init_query_promise(); + init_selection_proxy(); + init_sql(); + init_subquery(); + init_table(); + init_utils2(); + init_view_common(); + init_utils3(); + init_view_base(); + SQLiteSelectBuilder = class { + fields; + session; + dialect; + withList; + distinct; + constructor(config3) { + this.fields = config3.fields; + this.session = config3.session; + this.dialect = config3.dialect; + this.withList = config3.withList; + this.distinct = config3.distinct; + } + from(source) { + const isPartialSelect = !!this.fields; + let fields; + if (this.fields) { + fields = this.fields; + } else if (is(source, Subquery)) { + fields = Object.fromEntries( + Object.keys(source._.selectedFields).map((key) => [key, source[key]]) + ); + } else if (is(source, SQLiteViewBase)) { + fields = source[ViewBaseConfig].selectedFields; + } else if (is(source, SQL)) { + fields = {}; + } else { + fields = getTableColumns(source); + } + return new SQLiteSelectBase({ + table: source, + fields, + isPartialSelect, + session: this.session, + dialect: this.dialect, + withList: this.withList, + distinct: this.distinct + }); + } + }; + __name(SQLiteSelectBuilder, "SQLiteSelectBuilder"); + _a95 = entityKind; + __publicField(SQLiteSelectBuilder, _a95, "SQLiteSelectBuilder"); + SQLiteSelectQueryBuilderBase = class extends TypedQueryBuilder { + _; + /** @internal */ + config; + joinsNotNullableMap; + tableName; + isPartialSelect; + session; + dialect; + cacheConfig = void 0; + usedTables = /* @__PURE__ */ new Set(); + constructor({ table: table3, fields, isPartialSelect, session, dialect, withList, distinct }) { + super(); + this.config = { + withList, + table: table3, + fields: { ...fields }, + distinct, + setOperators: [] + }; + this.isPartialSelect = isPartialSelect; + this.session = session; + this.dialect = dialect; + this._ = { + selectedFields: fields, + config: this.config + }; + this.tableName = getTableLikeName(table3); + this.joinsNotNullableMap = typeof this.tableName === "string" ? { [this.tableName]: true } : {}; + for (const item of extractUsedTable(table3)) + this.usedTables.add(item); + } + /** @internal */ + getUsedTables() { + return [...this.usedTables]; + } + createJoin(joinType) { + return (table3, on2) => { + const baseTableName = this.tableName; + const tableName = getTableLikeName(table3); + for (const item of extractUsedTable(table3)) + this.usedTables.add(item); + if (typeof tableName === "string" && this.config.joins?.some((join) => join.alias === tableName)) { + throw new Error(`Alias "${tableName}" is already used in this query`); + } + if (!this.isPartialSelect) { + if (Object.keys(this.joinsNotNullableMap).length === 1 && typeof baseTableName === "string") { + this.config.fields = { + [baseTableName]: this.config.fields + }; + } + if (typeof tableName === "string" && !is(table3, SQL)) { + const selection = is(table3, Subquery) ? table3._.selectedFields : is(table3, View) ? table3[ViewBaseConfig].selectedFields : table3[Table.Symbol.Columns]; + this.config.fields[tableName] = selection; + } + } + if (typeof on2 === "function") { + on2 = on2( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ) + ); + } + if (!this.config.joins) { + this.config.joins = []; + } + this.config.joins.push({ on: on2, table: table3, joinType, alias: tableName }); + if (typeof tableName === "string") { + switch (joinType) { + case "left": { + this.joinsNotNullableMap[tableName] = false; + break; + } + case "right": { + this.joinsNotNullableMap = Object.fromEntries( + Object.entries(this.joinsNotNullableMap).map(([key]) => [key, false]) + ); + this.joinsNotNullableMap[tableName] = true; + break; + } + case "cross": + case "inner": { + this.joinsNotNullableMap[tableName] = true; + break; + } + case "full": { + this.joinsNotNullableMap = Object.fromEntries( + Object.entries(this.joinsNotNullableMap).map(([key]) => [key, false]) + ); + this.joinsNotNullableMap[tableName] = false; + break; + } + } + } + return this; + }; + } + /** + * Executes a `left join` operation by adding another table to the current query. + * + * Calling this method associates each row of the table with the corresponding row from the joined table, if a match is found. If no matching row exists, it sets all columns of the joined table to null. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#left-join} + * + * @param table the table to join. + * @param on the `on` clause. + * + * @example + * + * ```ts + * // Select all users and their pets + * const usersWithPets: { user: User; pets: Pet | null; }[] = await db.select() + * .from(users) + * .leftJoin(pets, eq(users.id, pets.ownerId)) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number; petId: number | null; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .leftJoin(pets, eq(users.id, pets.ownerId)) + * ``` + */ + leftJoin = this.createJoin("left"); + /** + * Executes a `right join` operation by adding another table to the current query. + * + * Calling this method associates each row of the joined table with the corresponding row from the main table, if a match is found. If no matching row exists, it sets all columns of the main table to null. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#right-join} + * + * @param table the table to join. + * @param on the `on` clause. + * + * @example + * + * ```ts + * // Select all users and their pets + * const usersWithPets: { user: User | null; pets: Pet; }[] = await db.select() + * .from(users) + * .rightJoin(pets, eq(users.id, pets.ownerId)) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number | null; petId: number; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .rightJoin(pets, eq(users.id, pets.ownerId)) + * ``` + */ + rightJoin = this.createJoin("right"); + /** + * Executes an `inner join` operation, creating a new table by combining rows from two tables that have matching values. + * + * Calling this method retrieves rows that have corresponding entries in both joined tables. Rows without matching entries in either table are excluded, resulting in a table that includes only matching pairs. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#inner-join} + * + * @param table the table to join. + * @param on the `on` clause. + * + * @example + * + * ```ts + * // Select all users and their pets + * const usersWithPets: { user: User; pets: Pet; }[] = await db.select() + * .from(users) + * .innerJoin(pets, eq(users.id, pets.ownerId)) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number; petId: number; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .innerJoin(pets, eq(users.id, pets.ownerId)) + * ``` + */ + innerJoin = this.createJoin("inner"); + /** + * Executes a `full join` operation by combining rows from two tables into a new table. + * + * Calling this method retrieves all rows from both main and joined tables, merging rows with matching values and filling in `null` for non-matching columns. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#full-join} + * + * @param table the table to join. + * @param on the `on` clause. + * + * @example + * + * ```ts + * // Select all users and their pets + * const usersWithPets: { user: User | null; pets: Pet | null; }[] = await db.select() + * .from(users) + * .fullJoin(pets, eq(users.id, pets.ownerId)) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number | null; petId: number | null; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .fullJoin(pets, eq(users.id, pets.ownerId)) + * ``` + */ + fullJoin = this.createJoin("full"); + /** + * Executes a `cross join` operation by combining rows from two tables into a new table. + * + * Calling this method retrieves all rows from both main and joined tables, merging all rows from each table. + * + * See docs: {@link https://orm.drizzle.team/docs/joins#cross-join} + * + * @param table the table to join. + * + * @example + * + * ```ts + * // Select all users, each user with every pet + * const usersWithPets: { user: User; pets: Pet; }[] = await db.select() + * .from(users) + * .crossJoin(pets) + * + * // Select userId and petId + * const usersIdsAndPetIds: { userId: number; petId: number; }[] = await db.select({ + * userId: users.id, + * petId: pets.id, + * }) + * .from(users) + * .crossJoin(pets) + * ``` + */ + crossJoin = this.createJoin("cross"); + createSetOperator(type, isAll) { + return (rightSelection) => { + const rightSelect = typeof rightSelection === "function" ? rightSelection(getSQLiteSetOperators()) : rightSelection; + if (!haveSameKeys(this.getSelectedFields(), rightSelect.getSelectedFields())) { + throw new Error( + "Set operator error (union / intersect / except): selected fields are not the same or are in a different order" + ); + } + this.config.setOperators.push({ type, isAll, rightSelect }); + return this; + }; + } + /** + * Adds `union` set operator to the query. + * + * Calling this method will combine the result sets of the `select` statements and remove any duplicate rows that appear across them. + * + * See docs: {@link https://orm.drizzle.team/docs/set-operations#union} + * + * @example + * + * ```ts + * // Select all unique names from customers and users tables + * await db.select({ name: users.name }) + * .from(users) + * .union( + * db.select({ name: customers.name }).from(customers) + * ); + * // or + * import { union } from 'drizzle-orm/sqlite-core' + * + * await union( + * db.select({ name: users.name }).from(users), + * db.select({ name: customers.name }).from(customers) + * ); + * ``` + */ + union = this.createSetOperator("union", false); + /** + * Adds `union all` set operator to the query. + * + * Calling this method will combine the result-set of the `select` statements and keep all duplicate rows that appear across them. + * + * See docs: {@link https://orm.drizzle.team/docs/set-operations#union-all} + * + * @example + * + * ```ts + * // Select all transaction ids from both online and in-store sales + * await db.select({ transaction: onlineSales.transactionId }) + * .from(onlineSales) + * .unionAll( + * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales) + * ); + * // or + * import { unionAll } from 'drizzle-orm/sqlite-core' + * + * await unionAll( + * db.select({ transaction: onlineSales.transactionId }).from(onlineSales), + * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales) + * ); + * ``` + */ + unionAll = this.createSetOperator("union", true); + /** + * Adds `intersect` set operator to the query. + * + * Calling this method will retain only the rows that are present in both result sets and eliminate duplicates. + * + * See docs: {@link https://orm.drizzle.team/docs/set-operations#intersect} + * + * @example + * + * ```ts + * // Select course names that are offered in both departments A and B + * await db.select({ courseName: depA.courseName }) + * .from(depA) + * .intersect( + * db.select({ courseName: depB.courseName }).from(depB) + * ); + * // or + * import { intersect } from 'drizzle-orm/sqlite-core' + * + * await intersect( + * db.select({ courseName: depA.courseName }).from(depA), + * db.select({ courseName: depB.courseName }).from(depB) + * ); + * ``` + */ + intersect = this.createSetOperator("intersect", false); + /** + * Adds `except` set operator to the query. + * + * Calling this method will retrieve all unique rows from the left query, except for the rows that are present in the result set of the right query. + * + * See docs: {@link https://orm.drizzle.team/docs/set-operations#except} + * + * @example + * + * ```ts + * // Select all courses offered in department A but not in department B + * await db.select({ courseName: depA.courseName }) + * .from(depA) + * .except( + * db.select({ courseName: depB.courseName }).from(depB) + * ); + * // or + * import { except } from 'drizzle-orm/sqlite-core' + * + * await except( + * db.select({ courseName: depA.courseName }).from(depA), + * db.select({ courseName: depB.courseName }).from(depB) + * ); + * ``` + */ + except = this.createSetOperator("except", false); + /** @internal */ + addSetOperators(setOperators) { + this.config.setOperators.push(...setOperators); + return this; + } + /** + * Adds a `where` clause to the query. + * + * Calling this method will select only those rows that fulfill a specified condition. + * + * See docs: {@link https://orm.drizzle.team/docs/select#filtering} + * + * @param where the `where` clause. + * + * @example + * You can use conditional operators and `sql function` to filter the rows to be selected. + * + * ```ts + * // Select all cars with green color + * await db.select().from(cars).where(eq(cars.color, 'green')); + * // or + * await db.select().from(cars).where(sql`${cars.color} = 'green'`) + * ``` + * + * You can logically combine conditional operators with `and()` and `or()` operators: + * + * ```ts + * // Select all BMW cars with a green color + * await db.select().from(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW'))); + * + * // Select all cars with the green or blue color + * await db.select().from(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue'))); + * ``` + */ + where(where) { + if (typeof where === "function") { + where = where( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ) + ); + } + this.config.where = where; + return this; + } + /** + * Adds a `having` clause to the query. + * + * Calling this method will select only those rows that fulfill a specified condition. It is typically used with aggregate functions to filter the aggregated data based on a specified condition. + * + * See docs: {@link https://orm.drizzle.team/docs/select#aggregations} + * + * @param having the `having` clause. + * + * @example + * + * ```ts + * // Select all brands with more than one car + * await db.select({ + * brand: cars.brand, + * count: sql`cast(count(${cars.id}) as int)`, + * }) + * .from(cars) + * .groupBy(cars.brand) + * .having(({ count }) => gt(count, 1)); + * ``` + */ + having(having) { + if (typeof having === "function") { + having = having( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ) + ); + } + this.config.having = having; + return this; + } + groupBy(...columns) { + if (typeof columns[0] === "function") { + const groupBy = columns[0]( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" }) + ) + ); + this.config.groupBy = Array.isArray(groupBy) ? groupBy : [groupBy]; + } else { + this.config.groupBy = columns; + } + return this; + } + orderBy(...columns) { + if (typeof columns[0] === "function") { + const orderBy = columns[0]( + new Proxy( + this.config.fields, + new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" }) + ) + ); + const orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy]; + if (this.config.setOperators.length > 0) { + this.config.setOperators.at(-1).orderBy = orderByArray; + } else { + this.config.orderBy = orderByArray; + } + } else { + const orderByArray = columns; + if (this.config.setOperators.length > 0) { + this.config.setOperators.at(-1).orderBy = orderByArray; + } else { + this.config.orderBy = orderByArray; + } + } + return this; + } + /** + * Adds a `limit` clause to the query. + * + * Calling this method will set the maximum number of rows that will be returned by this query. + * + * See docs: {@link https://orm.drizzle.team/docs/select#limit--offset} + * + * @param limit the `limit` clause. + * + * @example + * + * ```ts + * // Get the first 10 people from this query. + * await db.select().from(people).limit(10); + * ``` + */ + limit(limit) { + if (this.config.setOperators.length > 0) { + this.config.setOperators.at(-1).limit = limit; + } else { + this.config.limit = limit; + } + return this; + } + /** + * Adds an `offset` clause to the query. + * + * Calling this method will skip a number of rows when returning results from this query. + * + * See docs: {@link https://orm.drizzle.team/docs/select#limit--offset} + * + * @param offset the `offset` clause. + * + * @example + * + * ```ts + * // Get the 10th-20th people from this query. + * await db.select().from(people).offset(10).limit(10); + * ``` + */ + offset(offset) { + if (this.config.setOperators.length > 0) { + this.config.setOperators.at(-1).offset = offset; + } else { + this.config.offset = offset; + } + return this; + } + /** @internal */ + getSQL() { + return this.dialect.buildSelectQuery(this.config); + } + toSQL() { + const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL()); + return rest; + } + as(alias) { + const usedTables = []; + usedTables.push(...extractUsedTable(this.config.table)); + if (this.config.joins) { + for (const it of this.config.joins) + usedTables.push(...extractUsedTable(it.table)); + } + return new Proxy( + new Subquery(this.getSQL(), this.config.fields, alias, false, [...new Set(usedTables)]), + new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" }) + ); + } + /** @internal */ + getSelectedFields() { + return new Proxy( + this.config.fields, + new SelectionProxyHandler({ alias: this.tableName, sqlAliasedBehavior: "alias", sqlBehavior: "error" }) + ); + } + $dynamic() { + return this; + } + }; + __name(SQLiteSelectQueryBuilderBase, "SQLiteSelectQueryBuilderBase"); + _a96 = entityKind; + __publicField(SQLiteSelectQueryBuilderBase, _a96, "SQLiteSelectQueryBuilder"); + SQLiteSelectBase = class extends SQLiteSelectQueryBuilderBase { + /** @internal */ + _prepare(isOneTimeQuery = true) { + if (!this.session) { + throw new Error("Cannot execute a query on a query builder. Please use a database instance instead."); + } + const fieldsList = orderSelectedFields(this.config.fields); + const query = this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + this.dialect.sqlToQuery(this.getSQL()), + fieldsList, + "all", + true, + void 0, + { + type: "select", + tables: [...this.usedTables] + }, + this.cacheConfig + ); + query.joinsNotNullableMap = this.joinsNotNullableMap; + return query; + } + $withCache(config3) { + this.cacheConfig = config3 === void 0 ? { config: {}, enable: true, autoInvalidate: true } : config3 === false ? { enable: false } : { enable: true, autoInvalidate: true, ...config3 }; + return this; + } + prepare() { + return this._prepare(false); + } + run = (placeholderValues) => { + return this._prepare().run(placeholderValues); + }; + all = (placeholderValues) => { + return this._prepare().all(placeholderValues); + }; + get = (placeholderValues) => { + return this._prepare().get(placeholderValues); + }; + values = (placeholderValues) => { + return this._prepare().values(placeholderValues); + }; + async execute() { + return this.all(); + } + }; + __name(SQLiteSelectBase, "SQLiteSelectBase"); + _a97 = entityKind; + __publicField(SQLiteSelectBase, _a97, "SQLiteSelect"); + applyMixins(SQLiteSelectBase, [QueryPromise]); + __name(createSetOperator, "createSetOperator"); + getSQLiteSetOperators = /* @__PURE__ */ __name(() => ({ + union, + unionAll, + intersect, + except + }), "getSQLiteSetOperators"); + union = createSetOperator("union", false); + unionAll = createSetOperator("union", true); + intersect = createSetOperator("intersect", false); + except = createSetOperator("except", false); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/query-builder.js +var _a98, QueryBuilder; +var init_query_builder2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/query-builder.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_selection_proxy(); + init_dialect(); + init_subquery(); + init_select2(); + QueryBuilder = class { + dialect; + dialectConfig; + constructor(dialect) { + this.dialect = is(dialect, SQLiteDialect) ? dialect : void 0; + this.dialectConfig = is(dialect, SQLiteDialect) ? void 0 : dialect; + } + $with = (alias, selection) => { + const queryBuilder = this; + const as2 = /* @__PURE__ */ __name((qb) => { + if (typeof qb === "function") { + qb = qb(queryBuilder); + } + return new Proxy( + new WithSubquery( + qb.getSQL(), + selection ?? ("getSelectedFields" in qb ? qb.getSelectedFields() ?? {} : {}), + alias, + true + ), + new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" }) + ); + }, "as"); + return { as: as2 }; + }; + with(...queries) { + const self2 = this; + function select(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: void 0, + dialect: self2.getDialect(), + withList: queries + }); + } + __name(select, "select"); + function selectDistinct(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: void 0, + dialect: self2.getDialect(), + withList: queries, + distinct: true + }); + } + __name(selectDistinct, "selectDistinct"); + return { select, selectDistinct }; + } + select(fields) { + return new SQLiteSelectBuilder({ fields: fields ?? void 0, session: void 0, dialect: this.getDialect() }); + } + selectDistinct(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: void 0, + dialect: this.getDialect(), + distinct: true + }); + } + // Lazy load dialect to avoid circular dependency + getDialect() { + if (!this.dialect) { + this.dialect = new SQLiteSyncDialect(this.dialectConfig); + } + return this.dialect; + } + }; + __name(QueryBuilder, "QueryBuilder"); + _a98 = entityKind; + __publicField(QueryBuilder, _a98, "SQLiteQueryBuilder"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js +var _a99, SQLiteInsertBuilder, _a100, SQLiteInsertBase; +var init_insert = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + init_sql(); + init_table3(); + init_table(); + init_utils2(); + init_utils3(); + init_query_builder2(); + SQLiteInsertBuilder = class { + constructor(table3, session, dialect, withList) { + this.table = table3; + this.session = session; + this.dialect = dialect; + this.withList = withList; + } + values(values) { + values = Array.isArray(values) ? values : [values]; + if (values.length === 0) { + throw new Error("values() must be called with at least one value"); + } + const mappedValues = values.map((entry) => { + const result = {}; + const cols = this.table[Table.Symbol.Columns]; + for (const colKey of Object.keys(entry)) { + const colValue = entry[colKey]; + result[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]); + } + return result; + }); + return new SQLiteInsertBase(this.table, mappedValues, this.session, this.dialect, this.withList); + } + select(selectQuery) { + const select = typeof selectQuery === "function" ? selectQuery(new QueryBuilder()) : selectQuery; + if (!is(select, SQL) && !haveSameKeys(this.table[Columns], select._.selectedFields)) { + throw new Error( + "Insert select error: selected fields are not the same or are in a different order compared to the table definition" + ); + } + return new SQLiteInsertBase(this.table, select, this.session, this.dialect, this.withList, true); + } + }; + __name(SQLiteInsertBuilder, "SQLiteInsertBuilder"); + _a99 = entityKind; + __publicField(SQLiteInsertBuilder, _a99, "SQLiteInsertBuilder"); + SQLiteInsertBase = class extends QueryPromise { + constructor(table3, values, session, dialect, withList, select) { + super(); + this.session = session; + this.dialect = dialect; + this.config = { table: table3, values, withList, select }; + } + /** @internal */ + config; + returning(fields = this.config.table[SQLiteTable.Symbol.Columns]) { + this.config.returning = orderSelectedFields(fields); + return this; + } + /** + * Adds an `on conflict do nothing` clause to the query. + * + * Calling this method simply avoids inserting a row as its alternative action. + * + * See docs: {@link https://orm.drizzle.team/docs/insert#on-conflict-do-nothing} + * + * @param config The `target` and `where` clauses. + * + * @example + * ```ts + * // Insert one row and cancel the insert if there's a conflict + * await db.insert(cars) + * .values({ id: 1, brand: 'BMW' }) + * .onConflictDoNothing(); + * + * // Explicitly specify conflict target + * await db.insert(cars) + * .values({ id: 1, brand: 'BMW' }) + * .onConflictDoNothing({ target: cars.id }); + * ``` + */ + onConflictDoNothing(config3 = {}) { + if (!this.config.onConflict) + this.config.onConflict = []; + if (config3.target === void 0) { + this.config.onConflict.push(sql` on conflict do nothing`); + } else { + const targetSql = Array.isArray(config3.target) ? sql`${config3.target}` : sql`${[config3.target]}`; + const whereSql = config3.where ? sql` where ${config3.where}` : sql``; + this.config.onConflict.push(sql` on conflict ${targetSql} do nothing${whereSql}`); + } + return this; + } + /** + * Adds an `on conflict do update` clause to the query. + * + * Calling this method will update the existing row that conflicts with the row proposed for insertion as its alternative action. + * + * See docs: {@link https://orm.drizzle.team/docs/insert#upserts-and-conflicts} + * + * @param config The `target`, `set` and `where` clauses. + * + * @example + * ```ts + * // Update the row if there's a conflict + * await db.insert(cars) + * .values({ id: 1, brand: 'BMW' }) + * .onConflictDoUpdate({ + * target: cars.id, + * set: { brand: 'Porsche' } + * }); + * + * // Upsert with 'where' clause + * await db.insert(cars) + * .values({ id: 1, brand: 'BMW' }) + * .onConflictDoUpdate({ + * target: cars.id, + * set: { brand: 'newBMW' }, + * where: sql`${cars.createdAt} > '2023-01-01'::date`, + * }); + * ``` + */ + onConflictDoUpdate(config3) { + if (config3.where && (config3.targetWhere || config3.setWhere)) { + throw new Error( + 'You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.' + ); + } + if (!this.config.onConflict) + this.config.onConflict = []; + const whereSql = config3.where ? sql` where ${config3.where}` : void 0; + const targetWhereSql = config3.targetWhere ? sql` where ${config3.targetWhere}` : void 0; + const setWhereSql = config3.setWhere ? sql` where ${config3.setWhere}` : void 0; + const targetSql = Array.isArray(config3.target) ? sql`${config3.target}` : sql`${[config3.target]}`; + const setSql = this.dialect.buildUpdateSet(this.config.table, mapUpdateSet(this.config.table, config3.set)); + this.config.onConflict.push( + sql` on conflict ${targetSql}${targetWhereSql} do update set ${setSql}${whereSql}${setWhereSql}` + ); + return this; + } + /** @internal */ + getSQL() { + return this.dialect.buildInsertQuery(this.config); + } + toSQL() { + const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL()); + return rest; + } + /** @internal */ + _prepare(isOneTimeQuery = true) { + return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + this.dialect.sqlToQuery(this.getSQL()), + this.config.returning, + this.config.returning ? "all" : "run", + true, + void 0, + { + type: "insert", + tables: extractUsedTable(this.config.table) + } + ); + } + prepare() { + return this._prepare(false); + } + run = (placeholderValues) => { + return this._prepare().run(placeholderValues); + }; + all = (placeholderValues) => { + return this._prepare().all(placeholderValues); + }; + get = (placeholderValues) => { + return this._prepare().get(placeholderValues); + }; + values = (placeholderValues) => { + return this._prepare().values(placeholderValues); + }; + async execute() { + return this.config.returning ? this.all() : this.run(); + } + $dynamic() { + return this; + } + }; + __name(SQLiteInsertBase, "SQLiteInsertBase"); + _a100 = entityKind; + __publicField(SQLiteInsertBase, _a100, "SQLiteInsert"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.types.js +var init_select_types = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/update.js +var _a101, SQLiteUpdateBuilder, _a102, SQLiteUpdateBase; +var init_update = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/update.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + init_selection_proxy(); + init_table3(); + init_subquery(); + init_table(); + init_utils2(); + init_view_common(); + init_utils3(); + init_view_base(); + SQLiteUpdateBuilder = class { + constructor(table3, session, dialect, withList) { + this.table = table3; + this.session = session; + this.dialect = dialect; + this.withList = withList; + } + set(values) { + return new SQLiteUpdateBase( + this.table, + mapUpdateSet(this.table, values), + this.session, + this.dialect, + this.withList + ); + } + }; + __name(SQLiteUpdateBuilder, "SQLiteUpdateBuilder"); + _a101 = entityKind; + __publicField(SQLiteUpdateBuilder, _a101, "SQLiteUpdateBuilder"); + SQLiteUpdateBase = class extends QueryPromise { + constructor(table3, set2, session, dialect, withList) { + super(); + this.session = session; + this.dialect = dialect; + this.config = { set: set2, table: table3, withList, joins: [] }; + } + /** @internal */ + config; + from(source) { + this.config.from = source; + return this; + } + createJoin(joinType) { + return (table3, on2) => { + const tableName = getTableLikeName(table3); + if (typeof tableName === "string" && this.config.joins.some((join) => join.alias === tableName)) { + throw new Error(`Alias "${tableName}" is already used in this query`); + } + if (typeof on2 === "function") { + const from = this.config.from ? is(table3, SQLiteTable) ? table3[Table.Symbol.Columns] : is(table3, Subquery) ? table3._.selectedFields : is(table3, SQLiteViewBase) ? table3[ViewBaseConfig].selectedFields : void 0 : void 0; + on2 = on2( + new Proxy( + this.config.table[Table.Symbol.Columns], + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ), + from && new Proxy( + from, + new SelectionProxyHandler({ sqlAliasedBehavior: "sql", sqlBehavior: "sql" }) + ) + ); + } + this.config.joins.push({ on: on2, table: table3, joinType, alias: tableName }); + return this; + }; + } + leftJoin = this.createJoin("left"); + rightJoin = this.createJoin("right"); + innerJoin = this.createJoin("inner"); + fullJoin = this.createJoin("full"); + /** + * Adds a 'where' clause to the query. + * + * Calling this method will update only those rows that fulfill a specified condition. + * + * See docs: {@link https://orm.drizzle.team/docs/update} + * + * @param where the 'where' clause. + * + * @example + * You can use conditional operators and `sql function` to filter the rows to be updated. + * + * ```ts + * // Update all cars with green color + * db.update(cars).set({ color: 'red' }) + * .where(eq(cars.color, 'green')); + * // or + * db.update(cars).set({ color: 'red' }) + * .where(sql`${cars.color} = 'green'`) + * ``` + * + * You can logically combine conditional operators with `and()` and `or()` operators: + * + * ```ts + * // Update all BMW cars with a green color + * db.update(cars).set({ color: 'red' }) + * .where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW'))); + * + * // Update all cars with the green or blue color + * db.update(cars).set({ color: 'red' }) + * .where(or(eq(cars.color, 'green'), eq(cars.color, 'blue'))); + * ``` + */ + where(where) { + this.config.where = where; + return this; + } + orderBy(...columns) { + if (typeof columns[0] === "function") { + const orderBy = columns[0]( + new Proxy( + this.config.table[Table.Symbol.Columns], + new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" }) + ) + ); + const orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy]; + this.config.orderBy = orderByArray; + } else { + const orderByArray = columns; + this.config.orderBy = orderByArray; + } + return this; + } + limit(limit) { + this.config.limit = limit; + return this; + } + returning(fields = this.config.table[SQLiteTable.Symbol.Columns]) { + this.config.returning = orderSelectedFields(fields); + return this; + } + /** @internal */ + getSQL() { + return this.dialect.buildUpdateQuery(this.config); + } + toSQL() { + const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL()); + return rest; + } + /** @internal */ + _prepare(isOneTimeQuery = true) { + return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + this.dialect.sqlToQuery(this.getSQL()), + this.config.returning, + this.config.returning ? "all" : "run", + true, + void 0, + { + type: "insert", + tables: extractUsedTable(this.config.table) + } + ); + } + prepare() { + return this._prepare(false); + } + run = (placeholderValues) => { + return this._prepare().run(placeholderValues); + }; + all = (placeholderValues) => { + return this._prepare().all(placeholderValues); + }; + get = (placeholderValues) => { + return this._prepare().get(placeholderValues); + }; + values = (placeholderValues) => { + return this._prepare().values(placeholderValues); + }; + async execute() { + return this.config.returning ? this.all() : this.run(); + } + $dynamic() { + return this; + } + }; + __name(SQLiteUpdateBase, "SQLiteUpdateBase"); + _a102 = entityKind; + __publicField(SQLiteUpdateBase, _a102, "SQLiteUpdate"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/index.js +var init_query_builders = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_delete(); + init_insert(); + init_query_builder2(); + init_select2(); + init_select_types(); + init_update(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/count.js +var _a103, _SQLiteCountBuilder, SQLiteCountBuilder; +var init_count = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/count.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_sql(); + _SQLiteCountBuilder = class extends SQL { + constructor(params) { + super(_SQLiteCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks); + this.params = params; + this.session = params.session; + this.sql = _SQLiteCountBuilder.buildCount( + params.source, + params.filters + ); + } + sql; + [(_a103 = entityKind, Symbol.toStringTag)] = "SQLiteCountBuilderAsync"; + session; + static buildEmbeddedCount(source, filters) { + return sql`(select count(*) from ${source}${sql.raw(" where ").if(filters)}${filters})`; + } + static buildCount(source, filters) { + return sql`select count(*) from ${source}${sql.raw(" where ").if(filters)}${filters}`; + } + then(onfulfilled, onrejected) { + return Promise.resolve(this.session.count(this.sql)).then( + onfulfilled, + onrejected + ); + } + catch(onRejected) { + return this.then(void 0, onRejected); + } + finally(onFinally) { + return this.then( + (value) => { + onFinally?.(); + return value; + }, + (reason) => { + onFinally?.(); + throw reason; + } + ); + } + }; + SQLiteCountBuilder = _SQLiteCountBuilder; + __name(SQLiteCountBuilder, "SQLiteCountBuilder"); + __publicField(SQLiteCountBuilder, _a103, "SQLiteCountBuilderAsync"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/query.js +var _a104, RelationalQueryBuilder, _a105, SQLiteRelationalQuery, _a106, SQLiteSyncRelationalQuery; +var init_query = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/query.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + init_relations(); + RelationalQueryBuilder = class { + constructor(mode, fullSchema, schema, tableNamesMap, table3, tableConfig, dialect, session) { + this.mode = mode; + this.fullSchema = fullSchema; + this.schema = schema; + this.tableNamesMap = tableNamesMap; + this.table = table3; + this.tableConfig = tableConfig; + this.dialect = dialect; + this.session = session; + } + findMany(config3) { + return this.mode === "sync" ? new SQLiteSyncRelationalQuery( + this.fullSchema, + this.schema, + this.tableNamesMap, + this.table, + this.tableConfig, + this.dialect, + this.session, + config3 ? config3 : {}, + "many" + ) : new SQLiteRelationalQuery( + this.fullSchema, + this.schema, + this.tableNamesMap, + this.table, + this.tableConfig, + this.dialect, + this.session, + config3 ? config3 : {}, + "many" + ); + } + findFirst(config3) { + return this.mode === "sync" ? new SQLiteSyncRelationalQuery( + this.fullSchema, + this.schema, + this.tableNamesMap, + this.table, + this.tableConfig, + this.dialect, + this.session, + config3 ? { ...config3, limit: 1 } : { limit: 1 }, + "first" + ) : new SQLiteRelationalQuery( + this.fullSchema, + this.schema, + this.tableNamesMap, + this.table, + this.tableConfig, + this.dialect, + this.session, + config3 ? { ...config3, limit: 1 } : { limit: 1 }, + "first" + ); + } + }; + __name(RelationalQueryBuilder, "RelationalQueryBuilder"); + _a104 = entityKind; + __publicField(RelationalQueryBuilder, _a104, "SQLiteAsyncRelationalQueryBuilder"); + SQLiteRelationalQuery = class extends QueryPromise { + constructor(fullSchema, schema, tableNamesMap, table3, tableConfig, dialect, session, config3, mode) { + super(); + this.fullSchema = fullSchema; + this.schema = schema; + this.tableNamesMap = tableNamesMap; + this.table = table3; + this.tableConfig = tableConfig; + this.dialect = dialect; + this.session = session; + this.config = config3; + this.mode = mode; + } + /** @internal */ + mode; + /** @internal */ + getSQL() { + return this.dialect.buildRelationalQuery({ + fullSchema: this.fullSchema, + schema: this.schema, + tableNamesMap: this.tableNamesMap, + table: this.table, + tableConfig: this.tableConfig, + queryConfig: this.config, + tableAlias: this.tableConfig.tsName + }).sql; + } + /** @internal */ + _prepare(isOneTimeQuery = false) { + const { query, builtQuery } = this._toSQL(); + return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"]( + builtQuery, + void 0, + this.mode === "first" ? "get" : "all", + true, + (rawRows, mapColumnValue) => { + const rows = rawRows.map( + (row) => mapRelationalRow(this.schema, this.tableConfig, row, query.selection, mapColumnValue) + ); + if (this.mode === "first") { + return rows[0]; + } + return rows; + } + ); + } + prepare() { + return this._prepare(false); + } + _toSQL() { + const query = this.dialect.buildRelationalQuery({ + fullSchema: this.fullSchema, + schema: this.schema, + tableNamesMap: this.tableNamesMap, + table: this.table, + tableConfig: this.tableConfig, + queryConfig: this.config, + tableAlias: this.tableConfig.tsName + }); + const builtQuery = this.dialect.sqlToQuery(query.sql); + return { query, builtQuery }; + } + toSQL() { + return this._toSQL().builtQuery; + } + /** @internal */ + executeRaw() { + if (this.mode === "first") { + return this._prepare(false).get(); + } + return this._prepare(false).all(); + } + async execute() { + return this.executeRaw(); + } + }; + __name(SQLiteRelationalQuery, "SQLiteRelationalQuery"); + _a105 = entityKind; + __publicField(SQLiteRelationalQuery, _a105, "SQLiteAsyncRelationalQuery"); + SQLiteSyncRelationalQuery = class extends SQLiteRelationalQuery { + sync() { + return this.executeRaw(); + } + }; + __name(SQLiteSyncRelationalQuery, "SQLiteSyncRelationalQuery"); + _a106 = entityKind; + __publicField(SQLiteSyncRelationalQuery, _a106, "SQLiteSyncRelationalQuery"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/raw.js +var _a107, SQLiteRaw; +var init_raw = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/raw.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_query_promise(); + SQLiteRaw = class extends QueryPromise { + constructor(execute, getSQL, action, dialect, mapBatchResult) { + super(); + this.execute = execute; + this.getSQL = getSQL; + this.dialect = dialect; + this.mapBatchResult = mapBatchResult; + this.config = { action }; + } + /** @internal */ + config; + getQuery() { + return { ...this.dialect.sqlToQuery(this.getSQL()), method: this.config.action }; + } + mapResult(result, isFromBatch) { + return isFromBatch ? this.mapBatchResult(result) : result; + } + _prepare() { + return this; + } + /** @internal */ + isResponseInArrayMode() { + return false; + } + }; + __name(SQLiteRaw, "SQLiteRaw"); + _a107 = entityKind; + __publicField(SQLiteRaw, _a107, "SQLiteRaw"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/db.js +var _a108, BaseSQLiteDatabase; +var init_db = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/db.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_selection_proxy(); + init_sql(); + init_query_builders(); + init_subquery(); + init_count(); + init_query(); + init_raw(); + BaseSQLiteDatabase = class { + constructor(resultKind, dialect, session, schema) { + this.resultKind = resultKind; + this.dialect = dialect; + this.session = session; + this._ = schema ? { + schema: schema.schema, + fullSchema: schema.fullSchema, + tableNamesMap: schema.tableNamesMap + } : { + schema: void 0, + fullSchema: {}, + tableNamesMap: {} + }; + this.query = {}; + const query = this.query; + if (this._.schema) { + for (const [tableName, columns] of Object.entries(this._.schema)) { + query[tableName] = new RelationalQueryBuilder( + resultKind, + schema.fullSchema, + this._.schema, + this._.tableNamesMap, + schema.fullSchema[tableName], + columns, + dialect, + session + ); + } + } + this.$cache = { invalidate: async (_params) => { + } }; + } + query; + /** + * Creates a subquery that defines a temporary named result set as a CTE. + * + * It is useful for breaking down complex queries into simpler parts and for reusing the result set in subsequent parts of the query. + * + * See docs: {@link https://orm.drizzle.team/docs/select#with-clause} + * + * @param alias The alias for the subquery. + * + * Failure to provide an alias will result in a DrizzleTypeError, preventing the subquery from being referenced in other queries. + * + * @example + * + * ```ts + * // Create a subquery with alias 'sq' and use it in the select query + * const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42))); + * + * const result = await db.with(sq).select().from(sq); + * ``` + * + * To select arbitrary SQL values as fields in a CTE and reference them in other CTEs or in the main query, you need to add aliases to them: + * + * ```ts + * // Select an arbitrary SQL value as a field in a CTE and reference it in the main query + * const sq = db.$with('sq').as(db.select({ + * name: sql`upper(${users.name})`.as('name'), + * }) + * .from(users)); + * + * const result = await db.with(sq).select({ name: sq.name }).from(sq); + * ``` + */ + $with = (alias, selection) => { + const self2 = this; + const as2 = /* @__PURE__ */ __name((qb) => { + if (typeof qb === "function") { + qb = qb(new QueryBuilder(self2.dialect)); + } + return new Proxy( + new WithSubquery( + qb.getSQL(), + selection ?? ("getSelectedFields" in qb ? qb.getSelectedFields() ?? {} : {}), + alias, + true + ), + new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" }) + ); + }, "as"); + return { as: as2 }; + }; + $count(source, filters) { + return new SQLiteCountBuilder({ source, filters, session: this.session }); + } + /** + * Incorporates a previously defined CTE (using `$with`) into the main query. + * + * This method allows the main query to reference a temporary named result set. + * + * See docs: {@link https://orm.drizzle.team/docs/select#with-clause} + * + * @param queries The CTEs to incorporate into the main query. + * + * @example + * + * ```ts + * // Define a subquery 'sq' as a CTE using $with + * const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42))); + * + * // Incorporate the CTE 'sq' into the main query and select from it + * const result = await db.with(sq).select().from(sq); + * ``` + */ + with(...queries) { + const self2 = this; + function select(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: self2.session, + dialect: self2.dialect, + withList: queries + }); + } + __name(select, "select"); + function selectDistinct(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: self2.session, + dialect: self2.dialect, + withList: queries, + distinct: true + }); + } + __name(selectDistinct, "selectDistinct"); + function update(table3) { + return new SQLiteUpdateBuilder(table3, self2.session, self2.dialect, queries); + } + __name(update, "update"); + function insert(into) { + return new SQLiteInsertBuilder(into, self2.session, self2.dialect, queries); + } + __name(insert, "insert"); + function delete_(from) { + return new SQLiteDeleteBase(from, self2.session, self2.dialect, queries); + } + __name(delete_, "delete_"); + return { select, selectDistinct, update, insert, delete: delete_ }; + } + select(fields) { + return new SQLiteSelectBuilder({ fields: fields ?? void 0, session: this.session, dialect: this.dialect }); + } + selectDistinct(fields) { + return new SQLiteSelectBuilder({ + fields: fields ?? void 0, + session: this.session, + dialect: this.dialect, + distinct: true + }); + } + /** + * Creates an update query. + * + * Calling this method without `.where()` clause will update all rows in a table. The `.where()` clause specifies which rows should be updated. + * + * Use `.set()` method to specify which values to update. + * + * See docs: {@link https://orm.drizzle.team/docs/update} + * + * @param table The table to update. + * + * @example + * + * ```ts + * // Update all rows in the 'cars' table + * await db.update(cars).set({ color: 'red' }); + * + * // Update rows with filters and conditions + * await db.update(cars).set({ color: 'red' }).where(eq(cars.brand, 'BMW')); + * + * // Update with returning clause + * const updatedCar: Car[] = await db.update(cars) + * .set({ color: 'red' }) + * .where(eq(cars.id, 1)) + * .returning(); + * ``` + */ + update(table3) { + return new SQLiteUpdateBuilder(table3, this.session, this.dialect); + } + $cache; + /** + * Creates an insert query. + * + * Calling this method will create new rows in a table. Use `.values()` method to specify which values to insert. + * + * See docs: {@link https://orm.drizzle.team/docs/insert} + * + * @param table The table to insert into. + * + * @example + * + * ```ts + * // Insert one row + * await db.insert(cars).values({ brand: 'BMW' }); + * + * // Insert multiple rows + * await db.insert(cars).values([{ brand: 'BMW' }, { brand: 'Porsche' }]); + * + * // Insert with returning clause + * const insertedCar: Car[] = await db.insert(cars) + * .values({ brand: 'BMW' }) + * .returning(); + * ``` + */ + insert(into) { + return new SQLiteInsertBuilder(into, this.session, this.dialect); + } + /** + * Creates a delete query. + * + * Calling this method without `.where()` clause will delete all rows in a table. The `.where()` clause specifies which rows should be deleted. + * + * See docs: {@link https://orm.drizzle.team/docs/delete} + * + * @param table The table to delete from. + * + * @example + * + * ```ts + * // Delete all rows in the 'cars' table + * await db.delete(cars); + * + * // Delete rows with filters and conditions + * await db.delete(cars).where(eq(cars.color, 'green')); + * + * // Delete with returning clause + * const deletedCar: Car[] = await db.delete(cars) + * .where(eq(cars.id, 1)) + * .returning(); + * ``` + */ + delete(from) { + return new SQLiteDeleteBase(from, this.session, this.dialect); + } + run(query) { + const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL(); + if (this.resultKind === "async") { + return new SQLiteRaw( + async () => this.session.run(sequel), + () => sequel, + "run", + this.dialect, + this.session.extractRawRunValueFromBatchResult.bind(this.session) + ); + } + return this.session.run(sequel); + } + all(query) { + const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL(); + if (this.resultKind === "async") { + return new SQLiteRaw( + async () => this.session.all(sequel), + () => sequel, + "all", + this.dialect, + this.session.extractRawAllValueFromBatchResult.bind(this.session) + ); + } + return this.session.all(sequel); + } + get(query) { + const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL(); + if (this.resultKind === "async") { + return new SQLiteRaw( + async () => this.session.get(sequel), + () => sequel, + "get", + this.dialect, + this.session.extractRawGetValueFromBatchResult.bind(this.session) + ); + } + return this.session.get(sequel); + } + values(query) { + const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL(); + if (this.resultKind === "async") { + return new SQLiteRaw( + async () => this.session.values(sequel), + () => sequel, + "values", + this.dialect, + this.session.extractRawValuesValueFromBatchResult.bind(this.session) + ); + } + return this.session.values(sequel); + } + transaction(transaction, config3) { + return this.session.transaction(transaction, config3); + } + }; + __name(BaseSQLiteDatabase, "BaseSQLiteDatabase"); + _a108 = entityKind; + __publicField(BaseSQLiteDatabase, _a108, "BaseSQLiteDatabase"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/cache/core/cache.js +async function hashQuery(sql2, params) { + const dataToHash = `${sql2}-${JSON.stringify(params)}`; + const encoder2 = new TextEncoder(); + const data = encoder2.encode(dataToHash); + const hashBuffer = await crypto.subtle.digest("SHA-256", data); + const hashArray = [...new Uint8Array(hashBuffer)]; + const hashHex = hashArray.map((b2) => b2.toString(16).padStart(2, "0")).join(""); + return hashHex; +} +var _a109, Cache, _a110, NoopCache; +var init_cache = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/cache/core/cache.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + Cache = class { + }; + __name(Cache, "Cache"); + _a109 = entityKind; + __publicField(Cache, _a109, "Cache"); + NoopCache = class extends Cache { + strategy() { + return "all"; + } + async get(_key2) { + return void 0; + } + async put(_hashedQuery, _response, _tables, _config) { + } + async onMutate(_params) { + } + }; + __name(NoopCache, "NoopCache"); + _a110 = entityKind; + __publicField(NoopCache, _a110, "NoopCache"); + __name(hashQuery, "hashQuery"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/cache/core/index.js +var init_core = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/cache/core/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_cache(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/alias.js +var init_alias2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/alias.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/session.js +var _a111, ExecuteResultSync, _a112, SQLitePreparedQuery, _a113, SQLiteSession, _a114, SQLiteTransaction; +var init_session = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/session.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_cache(); + init_entity(); + init_errors(); + init_query_promise(); + init_db(); + ExecuteResultSync = class extends QueryPromise { + constructor(resultCb) { + super(); + this.resultCb = resultCb; + } + async execute() { + return this.resultCb(); + } + sync() { + return this.resultCb(); + } + }; + __name(ExecuteResultSync, "ExecuteResultSync"); + _a111 = entityKind; + __publicField(ExecuteResultSync, _a111, "ExecuteResultSync"); + SQLitePreparedQuery = class { + constructor(mode, executeMethod, query, cache3, queryMetadata, cacheConfig) { + this.mode = mode; + this.executeMethod = executeMethod; + this.query = query; + this.cache = cache3; + this.queryMetadata = queryMetadata; + this.cacheConfig = cacheConfig; + if (cache3 && cache3.strategy() === "all" && cacheConfig === void 0) { + this.cacheConfig = { enable: true, autoInvalidate: true }; + } + if (!this.cacheConfig?.enable) { + this.cacheConfig = void 0; + } + } + /** @internal */ + joinsNotNullableMap; + /** @internal */ + async queryWithCache(queryString, params, query) { + if (this.cache === void 0 || is(this.cache, NoopCache) || this.queryMetadata === void 0) { + try { + return await query(); + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + } + if (this.cacheConfig && !this.cacheConfig.enable) { + try { + return await query(); + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + } + if ((this.queryMetadata.type === "insert" || this.queryMetadata.type === "update" || this.queryMetadata.type === "delete") && this.queryMetadata.tables.length > 0) { + try { + const [res] = await Promise.all([ + query(), + this.cache.onMutate({ tables: this.queryMetadata.tables }) + ]); + return res; + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + } + if (!this.cacheConfig) { + try { + return await query(); + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + } + if (this.queryMetadata.type === "select") { + const fromCache = await this.cache.get( + this.cacheConfig.tag ?? await hashQuery(queryString, params), + this.queryMetadata.tables, + this.cacheConfig.tag !== void 0, + this.cacheConfig.autoInvalidate + ); + if (fromCache === void 0) { + let result; + try { + result = await query(); + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + await this.cache.put( + this.cacheConfig.tag ?? await hashQuery(queryString, params), + result, + // make sure we send tables that were used in a query only if user wants to invalidate it on each write + this.cacheConfig.autoInvalidate ? this.queryMetadata.tables : [], + this.cacheConfig.tag !== void 0, + this.cacheConfig.config + ); + return result; + } + return fromCache; + } + try { + return await query(); + } catch (e2) { + throw new DrizzleQueryError(queryString, params, e2); + } + } + getQuery() { + return this.query; + } + mapRunResult(result, _isFromBatch) { + return result; + } + mapAllResult(_result, _isFromBatch) { + throw new Error("Not implemented"); + } + mapGetResult(_result, _isFromBatch) { + throw new Error("Not implemented"); + } + execute(placeholderValues) { + if (this.mode === "async") { + return this[this.executeMethod](placeholderValues); + } + return new ExecuteResultSync(() => this[this.executeMethod](placeholderValues)); + } + mapResult(response, isFromBatch) { + switch (this.executeMethod) { + case "run": { + return this.mapRunResult(response, isFromBatch); + } + case "all": { + return this.mapAllResult(response, isFromBatch); + } + case "get": { + return this.mapGetResult(response, isFromBatch); + } + } + } + }; + __name(SQLitePreparedQuery, "SQLitePreparedQuery"); + _a112 = entityKind; + __publicField(SQLitePreparedQuery, _a112, "PreparedQuery"); + SQLiteSession = class { + constructor(dialect) { + this.dialect = dialect; + } + prepareOneTimeQuery(query, fields, executeMethod, isResponseInArrayMode, customResultMapper, queryMetadata, cacheConfig) { + return this.prepareQuery( + query, + fields, + executeMethod, + isResponseInArrayMode, + customResultMapper, + queryMetadata, + cacheConfig + ); + } + run(query) { + const staticQuery = this.dialect.sqlToQuery(query); + try { + return this.prepareOneTimeQuery(staticQuery, void 0, "run", false).run(); + } catch (err) { + throw new DrizzleError({ cause: err, message: `Failed to run the query '${staticQuery.sql}'` }); + } + } + /** @internal */ + extractRawRunValueFromBatchResult(result) { + return result; + } + all(query) { + return this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), void 0, "run", false).all(); + } + /** @internal */ + extractRawAllValueFromBatchResult(_result) { + throw new Error("Not implemented"); + } + get(query) { + return this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), void 0, "run", false).get(); + } + /** @internal */ + extractRawGetValueFromBatchResult(_result) { + throw new Error("Not implemented"); + } + values(query) { + return this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), void 0, "run", false).values(); + } + async count(sql2) { + const result = await this.values(sql2); + return result[0][0]; + } + /** @internal */ + extractRawValuesValueFromBatchResult(_result) { + throw new Error("Not implemented"); + } + }; + __name(SQLiteSession, "SQLiteSession"); + _a113 = entityKind; + __publicField(SQLiteSession, _a113, "SQLiteSession"); + SQLiteTransaction = class extends BaseSQLiteDatabase { + constructor(resultType, dialect, session, schema, nestedIndex = 0) { + super(resultType, dialect, session, schema); + this.schema = schema; + this.nestedIndex = nestedIndex; + } + rollback() { + throw new TransactionRollbackError(); + } + }; + __name(SQLiteTransaction, "SQLiteTransaction"); + _a114 = entityKind; + __publicField(SQLiteTransaction, _a114, "SQLiteTransaction"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/subquery.js +var init_subquery2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/subquery.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/view.js +var _a115, ViewBuilderCore, _a116, ViewBuilder, _a117, ManualViewBuilder, _a118, SQLiteView; +var init_view = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/view.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_selection_proxy(); + init_utils2(); + init_query_builder2(); + init_table3(); + init_view_base(); + ViewBuilderCore = class { + constructor(name) { + this.name = name; + } + config = {}; + }; + __name(ViewBuilderCore, "ViewBuilderCore"); + _a115 = entityKind; + __publicField(ViewBuilderCore, _a115, "SQLiteViewBuilderCore"); + ViewBuilder = class extends ViewBuilderCore { + as(qb) { + if (typeof qb === "function") { + qb = qb(new QueryBuilder()); + } + const selectionProxy = new SelectionProxyHandler({ + alias: this.name, + sqlBehavior: "error", + sqlAliasedBehavior: "alias", + replaceOriginalName: true + }); + const aliasedSelectedFields = qb.getSelectedFields(); + return new Proxy( + new SQLiteView({ + // sqliteConfig: this.config, + config: { + name: this.name, + schema: void 0, + selectedFields: aliasedSelectedFields, + query: qb.getSQL().inlineParams() + } + }), + selectionProxy + ); + } + }; + __name(ViewBuilder, "ViewBuilder"); + _a116 = entityKind; + __publicField(ViewBuilder, _a116, "SQLiteViewBuilder"); + ManualViewBuilder = class extends ViewBuilderCore { + columns; + constructor(name, columns) { + super(name); + this.columns = getTableColumns(sqliteTable(name, columns)); + } + existing() { + return new Proxy( + new SQLiteView({ + config: { + name: this.name, + schema: void 0, + selectedFields: this.columns, + query: void 0 + } + }), + new SelectionProxyHandler({ + alias: this.name, + sqlBehavior: "error", + sqlAliasedBehavior: "alias", + replaceOriginalName: true + }) + ); + } + as(query) { + return new Proxy( + new SQLiteView({ + config: { + name: this.name, + schema: void 0, + selectedFields: this.columns, + query: query.inlineParams() + } + }), + new SelectionProxyHandler({ + alias: this.name, + sqlBehavior: "error", + sqlAliasedBehavior: "alias", + replaceOriginalName: true + }) + ); + } + }; + __name(ManualViewBuilder, "ManualViewBuilder"); + _a117 = entityKind; + __publicField(ManualViewBuilder, _a117, "SQLiteManualViewBuilder"); + SQLiteView = class extends SQLiteViewBase { + constructor({ config: config3 }) { + super(config3); + } + }; + __name(SQLiteView, "SQLiteView"); + _a118 = entityKind; + __publicField(SQLiteView, _a118, "SQLiteView"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/index.js +var init_sqlite_core = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_alias2(); + init_checks(); + init_columns(); + init_db(); + init_dialect(); + init_foreign_keys2(); + init_indexes(); + init_primary_keys2(); + init_query_builders(); + init_session(); + init_subquery2(); + init_table3(); + init_unique_constraint2(); + init_utils3(); + init_view(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/session.js +function d1ToRawMapping(results) { + const rows = []; + for (const row of results) { + const entry = Object.keys(row).map((k2) => row[k2]); + rows.push(entry); + } + return rows; +} +var _a119, SQLiteD1Session, _a120, _D1Transaction, D1Transaction, _a121, D1PreparedQuery; +var init_session2 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/session.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core(); + init_entity(); + init_logger2(); + init_sql(); + init_sqlite_core(); + init_session(); + init_utils2(); + SQLiteD1Session = class extends SQLiteSession { + constructor(client, dialect, schema, options = {}) { + super(dialect); + this.client = client; + this.schema = schema; + this.options = options; + this.logger = options.logger ?? new NoopLogger(); + this.cache = options.cache ?? new NoopCache(); + } + logger; + cache; + prepareQuery(query, fields, executeMethod, isResponseInArrayMode, customResultMapper, queryMetadata, cacheConfig) { + const stmt = this.client.prepare(query.sql); + return new D1PreparedQuery( + stmt, + query, + this.logger, + this.cache, + queryMetadata, + cacheConfig, + fields, + executeMethod, + isResponseInArrayMode, + customResultMapper + ); + } + async batch(queries) { + const preparedQueries = []; + const builtQueries = []; + for (const query of queries) { + const preparedQuery = query._prepare(); + const builtQuery = preparedQuery.getQuery(); + preparedQueries.push(preparedQuery); + if (builtQuery.params.length > 0) { + builtQueries.push(preparedQuery.stmt.bind(...builtQuery.params)); + } else { + const builtQuery2 = preparedQuery.getQuery(); + builtQueries.push( + this.client.prepare(builtQuery2.sql).bind(...builtQuery2.params) + ); + } + } + const batchResults = await this.client.batch(builtQueries); + return batchResults.map((result, i2) => preparedQueries[i2].mapResult(result, true)); + } + extractRawAllValueFromBatchResult(result) { + return result.results; + } + extractRawGetValueFromBatchResult(result) { + return result.results[0]; + } + extractRawValuesValueFromBatchResult(result) { + return d1ToRawMapping(result.results); + } + async transaction(transaction, config3) { + const tx = new D1Transaction("async", this.dialect, this, this.schema); + await this.run(sql.raw(`begin${config3?.behavior ? " " + config3.behavior : ""}`)); + try { + const result = await transaction(tx); + await this.run(sql`commit`); + return result; + } catch (err) { + await this.run(sql`rollback`); + throw err; + } + } + }; + __name(SQLiteD1Session, "SQLiteD1Session"); + _a119 = entityKind; + __publicField(SQLiteD1Session, _a119, "SQLiteD1Session"); + _D1Transaction = class extends SQLiteTransaction { + async transaction(transaction) { + const savepointName = `sp${this.nestedIndex}`; + const tx = new _D1Transaction("async", this.dialect, this.session, this.schema, this.nestedIndex + 1); + await this.session.run(sql.raw(`savepoint ${savepointName}`)); + try { + const result = await transaction(tx); + await this.session.run(sql.raw(`release savepoint ${savepointName}`)); + return result; + } catch (err) { + await this.session.run(sql.raw(`rollback to savepoint ${savepointName}`)); + throw err; + } + } + }; + D1Transaction = _D1Transaction; + __name(D1Transaction, "D1Transaction"); + _a120 = entityKind; + __publicField(D1Transaction, _a120, "D1Transaction"); + __name(d1ToRawMapping, "d1ToRawMapping"); + D1PreparedQuery = class extends SQLitePreparedQuery { + constructor(stmt, query, logger3, cache3, queryMetadata, cacheConfig, fields, executeMethod, _isResponseInArrayMode, customResultMapper) { + super("async", executeMethod, query, cache3, queryMetadata, cacheConfig); + this.logger = logger3; + this._isResponseInArrayMode = _isResponseInArrayMode; + this.customResultMapper = customResultMapper; + this.fields = fields; + this.stmt = stmt; + } + /** @internal */ + customResultMapper; + /** @internal */ + fields; + /** @internal */ + stmt; + async run(placeholderValues) { + const params = fillPlaceholders(this.query.params, placeholderValues ?? {}); + this.logger.logQuery(this.query.sql, params); + return await this.queryWithCache(this.query.sql, params, async () => { + return this.stmt.bind(...params).run(); + }); + } + async all(placeholderValues) { + const { fields, query, logger: logger3, stmt, customResultMapper } = this; + if (!fields && !customResultMapper) { + const params = fillPlaceholders(query.params, placeholderValues ?? {}); + logger3.logQuery(query.sql, params); + return await this.queryWithCache(query.sql, params, async () => { + return stmt.bind(...params).all().then(({ results }) => this.mapAllResult(results)); + }); + } + const rows = await this.values(placeholderValues); + return this.mapAllResult(rows); + } + mapAllResult(rows, isFromBatch) { + if (isFromBatch) { + rows = d1ToRawMapping(rows.results); + } + if (!this.fields && !this.customResultMapper) { + return rows; + } + if (this.customResultMapper) { + return this.customResultMapper(rows); + } + return rows.map((row) => mapResultRow(this.fields, row, this.joinsNotNullableMap)); + } + async get(placeholderValues) { + const { fields, joinsNotNullableMap, query, logger: logger3, stmt, customResultMapper } = this; + if (!fields && !customResultMapper) { + const params = fillPlaceholders(query.params, placeholderValues ?? {}); + logger3.logQuery(query.sql, params); + return await this.queryWithCache(query.sql, params, async () => { + return stmt.bind(...params).all().then(({ results }) => results[0]); + }); + } + const rows = await this.values(placeholderValues); + if (!rows[0]) { + return void 0; + } + if (customResultMapper) { + return customResultMapper(rows); + } + return mapResultRow(fields, rows[0], joinsNotNullableMap); + } + mapGetResult(result, isFromBatch) { + if (isFromBatch) { + result = d1ToRawMapping(result.results)[0]; + } + if (!this.fields && !this.customResultMapper) { + return result; + } + if (this.customResultMapper) { + return this.customResultMapper([result]); + } + return mapResultRow(this.fields, result, this.joinsNotNullableMap); + } + async values(placeholderValues) { + const params = fillPlaceholders(this.query.params, placeholderValues ?? {}); + this.logger.logQuery(this.query.sql, params); + return await this.queryWithCache(this.query.sql, params, async () => { + return this.stmt.bind(...params).raw(); + }); + } + /** @internal */ + isResponseInArrayMode() { + return this._isResponseInArrayMode; + } + }; + __name(D1PreparedQuery, "D1PreparedQuery"); + _a121 = entityKind; + __publicField(D1PreparedQuery, _a121, "D1PreparedQuery"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/driver.js +function drizzle(client, config3 = {}) { + const dialect = new SQLiteAsyncDialect({ casing: config3.casing }); + let logger3; + if (config3.logger === true) { + logger3 = new DefaultLogger(); + } else if (config3.logger !== false) { + logger3 = config3.logger; + } + let schema; + if (config3.schema) { + const tablesConfig = extractTablesRelationalConfig( + config3.schema, + createTableRelationsHelpers + ); + schema = { + fullSchema: config3.schema, + schema: tablesConfig.tables, + tableNamesMap: tablesConfig.tableNamesMap + }; + } + const session = new SQLiteD1Session(client, dialect, schema, { logger: logger3, cache: config3.cache }); + const db3 = new DrizzleD1Database("async", dialect, session, schema); + db3.$client = client; + db3.$cache = config3.cache; + if (db3.$cache) { + db3.$cache["invalidate"] = config3.cache?.onMutate; + } + return db3; +} +var _a122, DrizzleD1Database; +var init_driver = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/driver.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_entity(); + init_logger2(); + init_relations(); + init_db(); + init_dialect(); + init_session2(); + DrizzleD1Database = class extends BaseSQLiteDatabase { + async batch(batch) { + return this.session.batch(batch); + } + }; + __name(DrizzleD1Database, "DrizzleD1Database"); + _a122 = entityKind; + __publicField(DrizzleD1Database, _a122, "D1Database"); + __name(drizzle, "drizzle"); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/index.js +var init_d1 = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/d1/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_driver(); + init_session2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/operations.js +var init_operations = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/operations.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/db_helper_sqlite/node_modules/drizzle-orm/index.js +var init_drizzle_orm = __esm({ + "../../packages/db_helper_sqlite/node_modules/drizzle-orm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_alias(); + init_column_builder(); + init_column(); + init_entity(); + init_errors(); + init_logger2(); + init_operations(); + init_query_promise(); + init_relations(); + init_sql2(); + init_subquery(); + init_table(); + init_utils2(); + init_view_common(); + } +}); + +// ../../packages/db_helper_sqlite/src/db/schema.ts +var schema_exports = {}; +__export(schema_exports, { + addressAreas: () => addressAreas, + addressAreasRelations: () => addressAreasRelations, + addressZones: () => addressZones, + addressZonesRelations: () => addressZonesRelations, + addresses: () => addresses, + addressesRelations: () => addressesRelations, + cartItems: () => cartItems, + cartItemsRelations: () => cartItemsRelations, + complaints: () => complaints, + complaintsRelations: () => complaintsRelations, + couponApplicableProducts: () => couponApplicableProducts, + couponApplicableProductsRelations: () => couponApplicableProductsRelations, + couponApplicableUsers: () => couponApplicableUsers, + couponApplicableUsersRelations: () => couponApplicableUsersRelations, + couponUsage: () => couponUsage, + couponUsageRelations: () => couponUsageRelations, + coupons: () => coupons, + couponsRelations: () => couponsRelations, + deliverySlotInfo: () => deliverySlotInfo, + deliverySlotInfoRelations: () => deliverySlotInfoRelations, + homeBanners: () => homeBanners, + homeBannersRelations: () => homeBannersRelations, + keyValStore: () => keyValStore, + notifCreds: () => notifCreds, + notifCredsRelations: () => notifCredsRelations, + notifications: () => notifications, + notificationsRelations: () => notificationsRelations, + orderItems: () => orderItems, + orderItemsRelations: () => orderItemsRelations, + orderStatus: () => orderStatus, + orderStatusRelations: () => orderStatusRelations, + orders: () => orders, + ordersRelations: () => ordersRelations, + paymentInfoRelations: () => paymentInfoRelations, + paymentInfoTable: () => paymentInfoTable, + paymentStatusEnum: () => paymentStatusEnum, + payments: () => payments, + paymentsRelations: () => paymentsRelations, + productCategories: () => productCategories, + productCategoriesRelations: () => productCategoriesRelations, + productGroupInfo: () => productGroupInfo, + productGroupInfoRelations: () => productGroupInfoRelations, + productGroupMembership: () => productGroupMembership, + productGroupMembershipRelations: () => productGroupMembershipRelations, + productInfo: () => productInfo, + productInfoRelations: () => productInfoRelations, + productReviews: () => productReviews, + productReviewsRelations: () => productReviewsRelations, + productSlots: () => productSlots, + productSlotsRelations: () => productSlotsRelations, + productTagInfo: () => productTagInfo, + productTagInfoRelations: () => productTagInfoRelations, + productTags: () => productTags, + productTagsRelations: () => productTagsRelations, + refunds: () => refunds, + refundsRelations: () => refundsRelations, + reservedCoupons: () => reservedCoupons, + reservedCouponsRelations: () => reservedCouponsRelations, + specialDeals: () => specialDeals, + specialDealsRelations: () => specialDealsRelations, + staffPermissionEnum: () => staffPermissionEnum, + staffPermissions: () => staffPermissions, + staffPermissionsRelations: () => staffPermissionsRelations, + staffRoleEnum: () => staffRoleEnum, + staffRolePermissions: () => staffRolePermissions, + staffRolePermissionsRelations: () => staffRolePermissionsRelations, + staffRoles: () => staffRoles, + staffRolesRelations: () => staffRolesRelations, + staffUsers: () => staffUsers, + staffUsersRelations: () => staffUsersRelations, + storeInfo: () => storeInfo, + storeInfoRelations: () => storeInfoRelations, + units: () => units, + unitsRelations: () => unitsRelations, + unloggedUserTokens: () => unloggedUserTokens, + uploadStatusEnum: () => uploadStatusEnum, + uploadUrlStatus: () => uploadUrlStatus, + userCreds: () => userCreds, + userCredsRelations: () => userCredsRelations, + userDetails: () => userDetails, + userDetailsRelations: () => userDetailsRelations, + userIncidents: () => userIncidents, + userIncidentsRelations: () => userIncidentsRelations, + userNotifications: () => userNotifications, + userNotificationsRelations: () => userNotificationsRelations, + users: () => users, + usersRelations: () => usersRelations, + vendorSnippets: () => vendorSnippets, + vendorSnippetsRelations: () => vendorSnippetsRelations +}); +var jsonText, numericText, staffRoleValues, staffPermissionValues, uploadStatusValues, paymentStatusValues, staffRoleEnum, staffPermissionEnum, uploadStatusEnum, paymentStatusEnum, users, userDetails, userCreds, addressZones, addressAreas, addresses, staffRoles, staffPermissions, staffRolePermissions, staffUsers, storeInfo, units, productInfo, productGroupInfo, productGroupMembership, homeBanners, productReviews, uploadUrlStatus, productTagInfo, productTags, deliverySlotInfo, vendorSnippets, productSlots, specialDeals, paymentInfoTable, orders, orderItems, orderStatus, payments, refunds, keyValStore, notifications, productCategories, cartItems, complaints, coupons, couponUsage, couponApplicableUsers, couponApplicableProducts, userIncidents, reservedCoupons, notifCreds, unloggedUserTokens, userNotifications, usersRelations, userCredsRelations, staffUsersRelations, addressesRelations, unitsRelations, productInfoRelations, productTagInfoRelations, productTagsRelations, deliverySlotInfoRelations, productSlotsRelations, specialDealsRelations, ordersRelations, orderItemsRelations, orderStatusRelations, paymentInfoRelations, paymentsRelations, refundsRelations, notificationsRelations, productCategoriesRelations, cartItemsRelations, complaintsRelations, couponsRelations, couponUsageRelations, userDetailsRelations, notifCredsRelations, userNotificationsRelations, storeInfoRelations, couponApplicableUsersRelations, couponApplicableProductsRelations, reservedCouponsRelations, productReviewsRelations, addressZonesRelations, addressAreasRelations, productGroupInfoRelations, productGroupMembershipRelations, homeBannersRelations, staffRolesRelations, staffPermissionsRelations, staffRolePermissionsRelations, userIncidentsRelations, vendorSnippetsRelations; +var init_schema = __esm({ + "../../packages/db_helper_sqlite/src/db/schema.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sqlite_core(); + init_drizzle_orm(); + jsonText = /* @__PURE__ */ __name((name) => customType({ + dataType() { + return "text"; + }, + toDriver(value) { + if (value === void 0 || value === null) + return null; + return JSON.stringify(value); + }, + fromDriver(value) { + if (value === null || value === void 0) + return null; + try { + return JSON.parse(String(value)); + } catch { + return null; + } + } + })(name), "jsonText"); + numericText = /* @__PURE__ */ __name((name) => customType({ + dataType() { + return "text"; + }, + toDriver(value) { + if (value === void 0 || value === null) + return null; + return String(value); + }, + fromDriver(value) { + if (value === null || value === void 0) + return null; + return String(value); + } + })(name), "numericText"); + staffRoleValues = ["super_admin", "admin", "marketer", "delivery_staff"]; + staffPermissionValues = ["crud_product", "make_coupon", "crud_staff_users"]; + uploadStatusValues = ["pending", "claimed"]; + paymentStatusValues = ["pending", "success", "cod", "failed"]; + staffRoleEnum = /* @__PURE__ */ __name((name) => text(name, { enum: staffRoleValues }), "staffRoleEnum"); + staffPermissionEnum = /* @__PURE__ */ __name((name) => text(name, { enum: staffPermissionValues }), "staffPermissionEnum"); + uploadStatusEnum = /* @__PURE__ */ __name((name) => text(name, { enum: uploadStatusValues }), "uploadStatusEnum"); + paymentStatusEnum = /* @__PURE__ */ __name((name) => text(name, { enum: paymentStatusValues }), "paymentStatusEnum"); + users = sqliteTable("users", { + id: integer().primaryKey({ autoIncrement: true }), + name: text(), + email: text(), + mobile: text(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_email: uniqueIndex("unique_email").on(t9.email) + })); + userDetails = sqliteTable("user_details", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id).unique(), + bio: text("bio"), + dateOfBirth: integer("date_of_birth", { mode: "timestamp" }), + gender: text("gender"), + occupation: text("occupation"), + profileImage: text("profile_image"), + isSuspended: integer("is_suspended", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + updatedAt: integer("updated_at", { mode: "timestamp" }).notNull().defaultNow() + }); + userCreds = sqliteTable("user_creds", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + userPassword: text("user_password").notNull(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + addressZones = sqliteTable("address_zones", { + id: integer().primaryKey({ autoIncrement: true }), + zoneName: text("zone_name").notNull(), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow() + }); + addressAreas = sqliteTable("address_areas", { + id: integer().primaryKey({ autoIncrement: true }), + placeName: text("place_name").notNull(), + zoneId: integer("zone_id").references(() => addressZones.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + addresses = sqliteTable("addresses", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + name: text("name").notNull(), + phone: text("phone").notNull(), + addressLine1: text("address_line1").notNull(), + addressLine2: text("address_line2"), + city: text("city").notNull(), + state: text("state").notNull(), + pincode: text("pincode").notNull(), + isDefault: integer("is_default", { mode: "boolean" }).notNull().default(false), + latitude: real("latitude"), + longitude: real("longitude"), + googleMapsUrl: text("google_maps_url"), + adminLatitude: real("admin_latitude"), + adminLongitude: real("admin_longitude"), + zoneId: integer("zone_id").references(() => addressZones.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + staffRoles = sqliteTable("staff_roles", { + id: integer().primaryKey({ autoIncrement: true }), + roleName: staffRoleEnum("role_name").notNull(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_role_name: uniqueIndex("unique_role_name").on(t9.roleName) + })); + staffPermissions = sqliteTable("staff_permissions", { + id: integer().primaryKey({ autoIncrement: true }), + permissionName: staffPermissionEnum("permission_name").notNull(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_permission_name: uniqueIndex("unique_permission_name").on(t9.permissionName) + })); + staffRolePermissions = sqliteTable("staff_role_permissions", { + id: integer().primaryKey({ autoIncrement: true }), + staffRoleId: integer("staff_role_id").notNull().references(() => staffRoles.id), + staffPermissionId: integer("staff_permission_id").notNull().references(() => staffPermissions.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_role_permission: uniqueIndex("unique_role_permission").on(t9.staffRoleId, t9.staffPermissionId) + })); + staffUsers = sqliteTable("staff_users", { + id: integer().primaryKey({ autoIncrement: true }), + name: text().notNull(), + password: text().notNull(), + staffRoleId: integer("staff_role_id").references(() => staffRoles.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + storeInfo = sqliteTable("store_info", { + id: integer().primaryKey({ autoIncrement: true }), + name: text().notNull(), + description: text(), + imageUrl: text("image_url"), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + owner: integer("owner").notNull().references(() => staffUsers.id) + }); + units = sqliteTable("units", { + id: integer().primaryKey({ autoIncrement: true }), + shortNotation: text("short_notation").notNull(), + fullName: text("full_name").notNull() + }, (t9) => ({ + unq_short_notation: uniqueIndex("unique_short_notation").on(t9.shortNotation) + })); + productInfo = sqliteTable("product_info", { + id: integer().primaryKey({ autoIncrement: true }), + name: text().notNull(), + shortDescription: text("short_description"), + longDescription: text("long_description"), + unitId: integer("unit_id").notNull().references(() => units.id), + price: numericText("price").notNull(), + marketPrice: numericText("market_price"), + images: jsonText("images"), + isOutOfStock: integer("is_out_of_stock", { mode: "boolean" }).notNull().default(false), + isSuspended: integer("is_suspended", { mode: "boolean" }).notNull().default(false), + isFlashAvailable: integer("is_flash_available", { mode: "boolean" }).notNull().default(false), + flashPrice: numericText("flash_price"), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + incrementStep: real("increment_step").notNull().default(1), + productQuantity: real("product_quantity").notNull().default(1), + storeId: integer("store_id").references(() => storeInfo.id) + }); + productGroupInfo = sqliteTable("product_group_info", { + id: integer().primaryKey({ autoIncrement: true }), + groupName: text("group_name").notNull(), + description: text(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + productGroupMembership = sqliteTable("product_group_membership", { + productId: integer("product_id").notNull().references(() => productInfo.id), + groupId: integer("group_id").notNull().references(() => productGroupInfo.id), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + pk: primaryKey({ columns: [t9.productId, t9.groupId], name: "product_group_membership_pk" }) + })); + homeBanners = sqliteTable("home_banners", { + id: integer().primaryKey({ autoIncrement: true }), + name: text("name").notNull(), + imageUrl: text("image_url").notNull(), + description: text("description"), + productIds: jsonText("product_ids"), + redirectUrl: text("redirect_url"), + serialNum: integer("serial_num"), + isActive: integer("is_active", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + lastUpdated: integer("last_updated", { mode: "timestamp" }).notNull().defaultNow() + }); + productReviews = sqliteTable("product_reviews", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + productId: integer("product_id").notNull().references(() => productInfo.id), + reviewBody: text("review_body").notNull(), + imageUrls: jsonText("image_urls").$defaultFn(() => []), + reviewTime: integer("review_time", { mode: "timestamp" }).notNull().defaultNow(), + ratings: real("ratings").notNull(), + adminResponse: text("admin_response"), + adminResponseImages: jsonText("admin_response_images").$defaultFn(() => []) + }, (t9) => ({ + ratingCheck: check("rating_check", sql`${t9.ratings} >= 1 AND ${t9.ratings} <= 5`) + })); + uploadUrlStatus = sqliteTable("upload_url_status", { + id: integer().primaryKey({ autoIncrement: true }), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + key: text("key").notNull(), + status: uploadStatusEnum("status").notNull().default("pending") + }); + productTagInfo = sqliteTable("product_tag_info", { + id: integer().primaryKey({ autoIncrement: true }), + tagName: text("tag_name").notNull().unique(), + tagDescription: text("tag_description"), + imageUrl: text("image_url"), + isDashboardTag: integer("is_dashboard_tag", { mode: "boolean" }).notNull().default(false), + relatedStores: jsonText("related_stores").$defaultFn(() => []), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + productTags = sqliteTable("product_tags", { + id: integer().primaryKey({ autoIncrement: true }), + productId: integer("product_id").notNull().references(() => productInfo.id), + tagId: integer("tag_id").notNull().references(() => productTagInfo.id), + assignedAt: integer("assigned_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_product_tag: uniqueIndex("unique_product_tag").on(t9.productId, t9.tagId) + })); + deliverySlotInfo = sqliteTable("delivery_slot_info", { + id: integer().primaryKey({ autoIncrement: true }), + deliveryTime: integer("delivery_time", { mode: "timestamp" }).notNull(), + freezeTime: integer("freeze_time", { mode: "timestamp" }).notNull(), + isActive: integer("is_active", { mode: "boolean" }).notNull().default(true), + isFlash: integer("is_flash", { mode: "boolean" }).notNull().default(false), + isCapacityFull: integer("is_capacity_full", { mode: "boolean" }).notNull().default(false), + deliverySequence: jsonText("delivery_sequence").$defaultFn(() => ({})), + groupIds: jsonText("group_ids").$defaultFn(() => []) + }); + vendorSnippets = sqliteTable("vendor_snippets", { + id: integer().primaryKey({ autoIncrement: true }), + snippetCode: text("snippet_code").notNull().unique(), + slotId: integer("slot_id").references(() => deliverySlotInfo.id), + isPermanent: integer("is_permanent", { mode: "boolean" }).notNull().default(false), + productIds: jsonText("product_ids").notNull(), + validTill: integer("valid_till", { mode: "timestamp" }), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + productSlots = sqliteTable("product_slots", { + productId: integer("product_id").notNull().references(() => productInfo.id), + slotId: integer("slot_id").notNull().references(() => deliverySlotInfo.id) + }, (t9) => ({ + pk: primaryKey({ columns: [t9.productId, t9.slotId], name: "product_slot_pk" }) + })); + specialDeals = sqliteTable("special_deals", { + id: integer().primaryKey({ autoIncrement: true }), + productId: integer("product_id").notNull().references(() => productInfo.id), + quantity: numericText("quantity").notNull(), + price: numericText("price").notNull(), + validTill: integer("valid_till", { mode: "timestamp" }).notNull() + }); + paymentInfoTable = sqliteTable("payment_info", { + id: integer().primaryKey({ autoIncrement: true }), + status: text().notNull(), + gateway: text().notNull(), + orderId: text("order_id"), + token: text("token"), + merchantOrderId: text("merchant_order_id").notNull().unique(), + payload: jsonText("payload") + }); + orders = sqliteTable("orders", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + addressId: integer("address_id").notNull().references(() => addresses.id), + slotId: integer("slot_id").references(() => deliverySlotInfo.id), + isCod: integer("is_cod", { mode: "boolean" }).notNull().default(false), + isOnlinePayment: integer("is_online_payment", { mode: "boolean" }).notNull().default(false), + paymentInfoId: integer("payment_info_id").references(() => paymentInfoTable.id), + totalAmount: numericText("total_amount").notNull(), + deliveryCharge: numericText("delivery_charge").notNull().default("0"), + readableId: integer("readable_id").notNull(), + adminNotes: text("admin_notes"), + userNotes: text("user_notes"), + orderGroupId: text("order_group_id"), + orderGroupProportion: numericText("order_group_proportion"), + isFlashDelivery: integer("is_flash_delivery", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + orderItems = sqliteTable("order_items", { + id: integer().primaryKey({ autoIncrement: true }), + orderId: integer("order_id").notNull().references(() => orders.id), + productId: integer("product_id").notNull().references(() => productInfo.id), + quantity: text("quantity").notNull(), + price: numericText("price").notNull(), + discountedPrice: numericText("discounted_price"), + is_packaged: integer("is_packaged", { mode: "boolean" }).notNull().default(false), + is_package_verified: integer("is_package_verified", { mode: "boolean" }).notNull().default(false) + }); + orderStatus = sqliteTable("order_status", { + id: integer().primaryKey({ autoIncrement: true }), + orderTime: integer("order_time", { mode: "timestamp" }).notNull().defaultNow(), + userId: integer("user_id").notNull().references(() => users.id), + orderId: integer("order_id").notNull().references(() => orders.id), + isPackaged: integer("is_packaged", { mode: "boolean" }).notNull().default(false), + isDelivered: integer("is_delivered", { mode: "boolean" }).notNull().default(false), + isCancelled: integer("is_cancelled", { mode: "boolean" }).notNull().default(false), + cancelReason: text("cancel_reason"), + isCancelledByAdmin: integer("is_cancelled_by_admin", { mode: "boolean" }), + paymentStatus: paymentStatusEnum("payment_state").notNull().default("pending"), + cancellationUserNotes: text("cancellation_user_notes"), + cancellationAdminNotes: text("cancellation_admin_notes"), + cancellationReviewed: integer("cancellation_reviewed", { mode: "boolean" }).notNull().default(false), + cancellationReviewedAt: integer("cancellation_reviewed_at", { mode: "timestamp" }), + refundCouponId: integer("refund_coupon_id").references(() => coupons.id) + }); + payments = sqliteTable("payments", { + id: integer().primaryKey({ autoIncrement: true }), + status: text().notNull(), + gateway: text().notNull(), + orderId: integer("order_id").notNull().references(() => orders.id), + token: text("token"), + merchantOrderId: text("merchant_order_id").notNull().unique(), + payload: jsonText("payload") + }); + refunds = sqliteTable("refunds", { + id: integer().primaryKey({ autoIncrement: true }), + orderId: integer("order_id").notNull().references(() => orders.id), + refundAmount: numericText("refund_amount"), + refundStatus: text("refund_status").default("none"), + merchantRefundId: text("merchant_refund_id"), + refundProcessedAt: integer("refund_processed_at", { mode: "timestamp" }), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + keyValStore = sqliteTable("key_val_store", { + key: text("key").primaryKey(), + value: jsonText("value") + }); + notifications = sqliteTable("notifications", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + title: text().notNull(), + body: text().notNull(), + type: text(), + isRead: integer("is_read", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + productCategories = sqliteTable("product_categories", { + id: integer().primaryKey({ autoIncrement: true }), + name: text().notNull(), + description: text() + }); + cartItems = sqliteTable("cart_items", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + productId: integer("product_id").notNull().references(() => productInfo.id), + quantity: numericText("quantity").notNull(), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow() + }, (t9) => ({ + unq_user_product: uniqueIndex("unique_user_product").on(t9.userId, t9.productId) + })); + complaints = sqliteTable("complaints", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + orderId: integer("order_id").references(() => orders.id), + complaintBody: text("complaint_body").notNull(), + images: jsonText("images"), + response: text("response"), + isResolved: integer("is_resolved", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + coupons = sqliteTable("coupons", { + id: integer().primaryKey({ autoIncrement: true }), + couponCode: text("coupon_code").notNull().unique(), + isUserBased: integer("is_user_based", { mode: "boolean" }).notNull().default(false), + discountPercent: numericText("discount_percent"), + flatDiscount: numericText("flat_discount"), + minOrder: numericText("min_order"), + productIds: jsonText("product_ids"), + createdBy: integer("created_by").notNull().references(() => staffUsers.id), + maxValue: numericText("max_value"), + isApplyForAll: integer("is_apply_for_all", { mode: "boolean" }).notNull().default(false), + validTill: integer("valid_till", { mode: "timestamp" }), + maxLimitForUser: integer("max_limit_for_user"), + isInvalidated: integer("is_invalidated", { mode: "boolean" }).notNull().default(false), + exclusiveApply: integer("exclusive_apply", { mode: "boolean" }).notNull().default(false), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + couponUsage = sqliteTable("coupon_usage", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + couponId: integer("coupon_id").notNull().references(() => coupons.id), + orderId: integer("order_id").references(() => orders.id), + orderItemId: integer("order_item_id").references(() => orderItems.id), + usedAt: integer("used_at", { mode: "timestamp" }).notNull().defaultNow() + }); + couponApplicableUsers = sqliteTable("coupon_applicable_users", { + id: integer().primaryKey({ autoIncrement: true }), + couponId: integer("coupon_id").notNull().references(() => coupons.id), + userId: integer("user_id").notNull().references(() => users.id) + }, (t9) => ({ + unq_coupon_user: uniqueIndex("unique_coupon_user").on(t9.couponId, t9.userId) + })); + couponApplicableProducts = sqliteTable("coupon_applicable_products", { + id: integer().primaryKey({ autoIncrement: true }), + couponId: integer("coupon_id").notNull().references(() => coupons.id), + productId: integer("product_id").notNull().references(() => productInfo.id) + }, (t9) => ({ + unq_coupon_product: uniqueIndex("unique_coupon_product").on(t9.couponId, t9.productId) + })); + userIncidents = sqliteTable("user_incidents", { + id: integer().primaryKey({ autoIncrement: true }), + userId: integer("user_id").notNull().references(() => users.id), + orderId: integer("order_id").references(() => orders.id), + dateAdded: integer("date_added", { mode: "timestamp" }).notNull().defaultNow(), + adminComment: text("admin_comment"), + addedBy: integer("added_by").references(() => staffUsers.id), + negativityScore: integer("negativity_score") + }); + reservedCoupons = sqliteTable("reserved_coupons", { + id: integer().primaryKey({ autoIncrement: true }), + secretCode: text("secret_code").notNull().unique(), + couponCode: text("coupon_code").notNull(), + discountPercent: numericText("discount_percent"), + flatDiscount: numericText("flat_discount"), + minOrder: numericText("min_order"), + productIds: jsonText("product_ids"), + maxValue: numericText("max_value"), + validTill: integer("valid_till", { mode: "timestamp" }), + maxLimitForUser: integer("max_limit_for_user"), + exclusiveApply: integer("exclusive_apply", { mode: "boolean" }).notNull().default(false), + isRedeemed: integer("is_redeemed", { mode: "boolean" }).notNull().default(false), + redeemedBy: integer("redeemed_by").references(() => users.id), + redeemedAt: integer("redeemed_at", { mode: "timestamp" }), + createdBy: integer("created_by").notNull().references(() => staffUsers.id), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow() + }); + notifCreds = sqliteTable("notif_creds", { + id: integer().primaryKey({ autoIncrement: true }), + token: text().notNull().unique(), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow(), + userId: integer("user_id").notNull().references(() => users.id), + lastVerified: integer("last_verified", { mode: "timestamp" }) + }); + unloggedUserTokens = sqliteTable("unlogged_user_tokens", { + id: integer().primaryKey({ autoIncrement: true }), + token: text().notNull().unique(), + addedAt: integer("added_at", { mode: "timestamp" }).notNull().defaultNow(), + lastVerified: integer("last_verified", { mode: "timestamp" }) + }); + userNotifications = sqliteTable("user_notifications", { + id: integer().primaryKey({ autoIncrement: true }), + title: text("title").notNull(), + imageUrl: text("image_url"), + createdAt: integer("created_at", { mode: "timestamp" }).notNull().defaultNow(), + body: text("body").notNull(), + applicableUsers: jsonText("applicable_users") + }); + usersRelations = relations(users, ({ many, one }) => ({ + addresses: many(addresses), + orders: many(orders), + notifications: many(notifications), + cartItems: many(cartItems), + userCreds: one(userCreds), + coupons: many(coupons), + couponUsages: many(couponUsage), + applicableCoupons: many(couponApplicableUsers), + userDetails: one(userDetails), + notifCreds: many(notifCreds), + userIncidents: many(userIncidents) + })); + userCredsRelations = relations(userCreds, ({ one }) => ({ + user: one(users, { fields: [userCreds.userId], references: [users.id] }) + })); + staffUsersRelations = relations(staffUsers, ({ one, many }) => ({ + role: one(staffRoles, { fields: [staffUsers.staffRoleId], references: [staffRoles.id] }), + coupons: many(coupons), + stores: many(storeInfo) + })); + addressesRelations = relations(addresses, ({ one, many }) => ({ + user: one(users, { fields: [addresses.userId], references: [users.id] }), + orders: many(orders), + zone: one(addressZones, { fields: [addresses.zoneId], references: [addressZones.id] }) + })); + unitsRelations = relations(units, ({ many }) => ({ + products: many(productInfo) + })); + productInfoRelations = relations(productInfo, ({ one, many }) => ({ + unit: one(units, { fields: [productInfo.unitId], references: [units.id] }), + store: one(storeInfo, { fields: [productInfo.storeId], references: [storeInfo.id] }), + productSlots: many(productSlots), + specialDeals: many(specialDeals), + orderItems: many(orderItems), + cartItems: many(cartItems), + tags: many(productTags), + applicableCoupons: many(couponApplicableProducts), + reviews: many(productReviews), + groups: many(productGroupMembership) + })); + productTagInfoRelations = relations(productTagInfo, ({ many }) => ({ + products: many(productTags) + })); + productTagsRelations = relations(productTags, ({ one }) => ({ + product: one(productInfo, { fields: [productTags.productId], references: [productInfo.id] }), + tag: one(productTagInfo, { fields: [productTags.tagId], references: [productTagInfo.id] }) + })); + deliverySlotInfoRelations = relations(deliverySlotInfo, ({ many }) => ({ + productSlots: many(productSlots), + orders: many(orders), + vendorSnippets: many(vendorSnippets) + })); + productSlotsRelations = relations(productSlots, ({ one }) => ({ + product: one(productInfo, { fields: [productSlots.productId], references: [productInfo.id] }), + slot: one(deliverySlotInfo, { fields: [productSlots.slotId], references: [deliverySlotInfo.id] }) + })); + specialDealsRelations = relations(specialDeals, ({ one }) => ({ + product: one(productInfo, { fields: [specialDeals.productId], references: [productInfo.id] }) + })); + ordersRelations = relations(orders, ({ one, many }) => ({ + user: one(users, { fields: [orders.userId], references: [users.id] }), + address: one(addresses, { fields: [orders.addressId], references: [addresses.id] }), + slot: one(deliverySlotInfo, { fields: [orders.slotId], references: [deliverySlotInfo.id] }), + orderItems: many(orderItems), + payment: one(payments), + paymentInfo: one(paymentInfoTable, { fields: [orders.paymentInfoId], references: [paymentInfoTable.id] }), + orderStatus: many(orderStatus), + refunds: many(refunds), + couponUsages: many(couponUsage), + userIncidents: many(userIncidents) + })); + orderItemsRelations = relations(orderItems, ({ one }) => ({ + order: one(orders, { fields: [orderItems.orderId], references: [orders.id] }), + product: one(productInfo, { fields: [orderItems.productId], references: [productInfo.id] }) + })); + orderStatusRelations = relations(orderStatus, ({ one }) => ({ + order: one(orders, { fields: [orderStatus.orderId], references: [orders.id] }), + user: one(users, { fields: [orderStatus.userId], references: [users.id] }), + refundCoupon: one(coupons, { fields: [orderStatus.refundCouponId], references: [coupons.id] }) + })); + paymentInfoRelations = relations(paymentInfoTable, ({ one }) => ({ + order: one(orders, { fields: [paymentInfoTable.id], references: [orders.paymentInfoId] }) + })); + paymentsRelations = relations(payments, ({ one }) => ({ + order: one(orders, { fields: [payments.orderId], references: [orders.id] }) + })); + refundsRelations = relations(refunds, ({ one }) => ({ + order: one(orders, { fields: [refunds.orderId], references: [orders.id] }) + })); + notificationsRelations = relations(notifications, ({ one }) => ({ + user: one(users, { fields: [notifications.userId], references: [users.id] }) + })); + productCategoriesRelations = relations(productCategories, ({}) => ({})); + cartItemsRelations = relations(cartItems, ({ one }) => ({ + user: one(users, { fields: [cartItems.userId], references: [users.id] }), + product: one(productInfo, { fields: [cartItems.productId], references: [productInfo.id] }) + })); + complaintsRelations = relations(complaints, ({ one }) => ({ + user: one(users, { fields: [complaints.userId], references: [users.id] }), + order: one(orders, { fields: [complaints.orderId], references: [orders.id] }) + })); + couponsRelations = relations(coupons, ({ one, many }) => ({ + creator: one(staffUsers, { fields: [coupons.createdBy], references: [staffUsers.id] }), + usages: many(couponUsage), + applicableUsers: many(couponApplicableUsers), + applicableProducts: many(couponApplicableProducts) + })); + couponUsageRelations = relations(couponUsage, ({ one }) => ({ + user: one(users, { fields: [couponUsage.userId], references: [users.id] }), + coupon: one(coupons, { fields: [couponUsage.couponId], references: [coupons.id] }), + order: one(orders, { fields: [couponUsage.orderId], references: [orders.id] }), + orderItem: one(orderItems, { fields: [couponUsage.orderItemId], references: [orderItems.id] }) + })); + userDetailsRelations = relations(userDetails, ({ one }) => ({ + user: one(users, { fields: [userDetails.userId], references: [users.id] }) + })); + notifCredsRelations = relations(notifCreds, ({ one }) => ({ + user: one(users, { fields: [notifCreds.userId], references: [users.id] }) + })); + userNotificationsRelations = relations(userNotifications, ({}) => ({ + // No relations needed for now + })); + storeInfoRelations = relations(storeInfo, ({ one, many }) => ({ + owner: one(staffUsers, { fields: [storeInfo.owner], references: [staffUsers.id] }), + products: many(productInfo) + })); + couponApplicableUsersRelations = relations(couponApplicableUsers, ({ one }) => ({ + coupon: one(coupons, { fields: [couponApplicableUsers.couponId], references: [coupons.id] }), + user: one(users, { fields: [couponApplicableUsers.userId], references: [users.id] }) + })); + couponApplicableProductsRelations = relations(couponApplicableProducts, ({ one }) => ({ + coupon: one(coupons, { fields: [couponApplicableProducts.couponId], references: [coupons.id] }), + product: one(productInfo, { fields: [couponApplicableProducts.productId], references: [productInfo.id] }) + })); + reservedCouponsRelations = relations(reservedCoupons, ({ one }) => ({ + redeemedUser: one(users, { fields: [reservedCoupons.redeemedBy], references: [users.id] }), + creator: one(staffUsers, { fields: [reservedCoupons.createdBy], references: [staffUsers.id] }) + })); + productReviewsRelations = relations(productReviews, ({ one }) => ({ + user: one(users, { fields: [productReviews.userId], references: [users.id] }), + product: one(productInfo, { fields: [productReviews.productId], references: [productInfo.id] }) + })); + addressZonesRelations = relations(addressZones, ({ many }) => ({ + addresses: many(addresses), + areas: many(addressAreas) + })); + addressAreasRelations = relations(addressAreas, ({ one }) => ({ + zone: one(addressZones, { fields: [addressAreas.zoneId], references: [addressZones.id] }) + })); + productGroupInfoRelations = relations(productGroupInfo, ({ many }) => ({ + memberships: many(productGroupMembership) + })); + productGroupMembershipRelations = relations(productGroupMembership, ({ one }) => ({ + product: one(productInfo, { fields: [productGroupMembership.productId], references: [productInfo.id] }), + group: one(productGroupInfo, { fields: [productGroupMembership.groupId], references: [productGroupInfo.id] }) + })); + homeBannersRelations = relations(homeBanners, ({}) => ({ + // Relations for productIds array would be more complex, skipping for now + })); + staffRolesRelations = relations(staffRoles, ({ many }) => ({ + staffUsers: many(staffUsers), + rolePermissions: many(staffRolePermissions) + })); + staffPermissionsRelations = relations(staffPermissions, ({ many }) => ({ + rolePermissions: many(staffRolePermissions) + })); + staffRolePermissionsRelations = relations(staffRolePermissions, ({ one }) => ({ + role: one(staffRoles, { fields: [staffRolePermissions.staffRoleId], references: [staffRoles.id] }), + permission: one(staffPermissions, { fields: [staffRolePermissions.staffPermissionId], references: [staffPermissions.id] }) + })); + userIncidentsRelations = relations(userIncidents, ({ one }) => ({ + user: one(users, { fields: [userIncidents.userId], references: [users.id] }), + order: one(orders, { fields: [userIncidents.orderId], references: [orders.id] }), + addedBy: one(staffUsers, { fields: [userIncidents.addedBy], references: [staffUsers.id] }) + })); + vendorSnippetsRelations = relations(vendorSnippets, ({ one }) => ({ + slot: one(deliverySlotInfo, { fields: [vendorSnippets.slotId], references: [deliverySlotInfo.id] }) + })); + } +}); + +// ../../packages/db_helper_sqlite/src/db/db_index.ts +function initDb(database) { + const base = drizzle(database, { schema: schema_exports }); + dbInstance = Object.assign(base, { + transaction: async (handler) => { + return handler(base); + } + }); +} +var dbInstance, db; +var init_db_index = __esm({ + "../../packages/db_helper_sqlite/src/db/db_index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_d1(); + init_schema(); + dbInstance = null; + __name(initDb, "initDb"); + db = new Proxy({}, { + get(_target, prop) { + if (!dbInstance) { + throw new Error("D1 database not initialized. Call initDb(env.DB) before using db helpers."); + } + return dbInstance[prop]; + } + }); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/banner.ts +async function getBanners() { + const banners = await db.query.homeBanners.findMany({ + orderBy: desc(homeBanners.createdAt) + }); + return banners.map((banner) => ({ + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description, + productIds: banner.productIds || [], + redirectUrl: banner.redirectUrl, + serialNum: banner.serialNum, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + })); +} +async function getBannerById(id) { + const banner = await db.query.homeBanners.findFirst({ + where: eq(homeBanners.id, id) + }); + if (!banner) + return null; + return { + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description, + productIds: banner.productIds || [], + redirectUrl: banner.redirectUrl, + serialNum: banner.serialNum, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + }; +} +async function createBanner(input) { + const [banner] = await db.insert(homeBanners).values({ + name: input.name, + imageUrl: input.imageUrl, + description: input.description, + productIds: input.productIds || [], + redirectUrl: input.redirectUrl, + serialNum: input.serialNum, + isActive: input.isActive + }).returning(); + return { + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description, + productIds: banner.productIds || [], + redirectUrl: banner.redirectUrl, + serialNum: banner.serialNum, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + }; +} +async function updateBanner(id, input) { + const [banner] = await db.update(homeBanners).set({ + ...input, + lastUpdated: /* @__PURE__ */ new Date() + }).where(eq(homeBanners.id, id)).returning(); + return { + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description, + productIds: banner.productIds || [], + redirectUrl: banner.redirectUrl, + serialNum: banner.serialNum, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + }; +} +async function deleteBanner(id) { + await db.delete(homeBanners).where(eq(homeBanners.id, id)); +} +var init_banner = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/banner.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getBanners, "getBanners"); + __name(getBannerById, "getBannerById"); + __name(createBanner, "createBanner"); + __name(updateBanner, "updateBanner"); + __name(deleteBanner, "deleteBanner"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/complaint.ts +async function getComplaints(cursor, limit = 20) { + const whereCondition = cursor ? lt(complaints.id, cursor) : void 0; + const complaintsData = await db.select({ + id: complaints.id, + complaintBody: complaints.complaintBody, + userId: complaints.userId, + orderId: complaints.orderId, + isResolved: complaints.isResolved, + response: complaints.response, + createdAt: complaints.createdAt, + images: complaints.images, + userName: users.name, + userMobile: users.mobile + }).from(complaints).leftJoin(users, eq(complaints.userId, users.id)).where(whereCondition).orderBy(desc(complaints.id)).limit(limit + 1); + const hasMore = complaintsData.length > limit; + const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData; + return { + complaints: complaintsToReturn.map((c2) => ({ + id: c2.id, + complaintBody: c2.complaintBody, + userId: c2.userId, + orderId: c2.orderId, + isResolved: c2.isResolved, + response: c2.response, + createdAt: c2.createdAt, + images: c2.images, + userName: c2.userName, + userMobile: c2.userMobile + })), + hasMore + }; +} +async function resolveComplaint(id, response) { + await db.update(complaints).set({ isResolved: true, response }).where(eq(complaints.id, id)); +} +var init_complaint = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/complaint.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getComplaints, "getComplaints"); + __name(resolveComplaint, "resolveComplaint"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/const.ts +async function getAllConstants() { + const constants2 = await db.select().from(keyValStore); + return constants2.map((c2) => ({ + key: c2.key, + value: c2.value + })); +} +async function upsertConstants(constants2) { + await db.transaction(async (tx) => { + for (const { key, value } of constants2) { + await tx.insert(keyValStore).values({ key, value }).onConflictDoUpdate({ + target: keyValStore.key, + set: { value } + }); + } + }); +} +var init_const = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/const.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + __name(getAllConstants, "getAllConstants"); + __name(upsertConstants, "upsertConstants"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/coupon.ts +async function getAllCoupons(cursor, limit = 50, search) { + let whereCondition = void 0; + const conditions = []; + if (cursor) { + conditions.push(lt(coupons.id, cursor)); + } + if (search && search.trim()) { + conditions.push(like(coupons.couponCode, `%${search}%`)); + } + if (conditions.length > 0) { + whereCondition = and(...conditions); + } + const result = await db.query.coupons.findMany({ + where: whereCondition, + with: { + creator: true, + applicableUsers: { + with: { + user: true + } + }, + applicableProducts: { + with: { + product: true + } + } + }, + orderBy: desc(coupons.createdAt), + limit: limit + 1 + }); + const hasMore = result.length > limit; + const couponsList = hasMore ? result.slice(0, limit) : result; + return { coupons: couponsList, hasMore }; +} +async function getCouponById(id) { + return await db.query.coupons.findFirst({ + where: eq(coupons.id, id), + with: { + creator: true, + applicableUsers: { + with: { + user: true + } + }, + applicableProducts: { + with: { + product: true + } + } + } + }); +} +async function createCouponWithRelations(input, applicableUsers, applicableProducts) { + return await db.transaction(async (tx) => { + const [coupon] = await tx.insert(coupons).values({ + couponCode: input.couponCode, + isUserBased: input.isUserBased, + discountPercent: input.discountPercent, + flatDiscount: input.flatDiscount, + minOrder: input.minOrder, + productIds: input.productIds, + createdBy: input.createdBy, + maxValue: input.maxValue, + isApplyForAll: input.isApplyForAll, + validTill: input.validTill, + maxLimitForUser: input.maxLimitForUser, + exclusiveApply: input.exclusiveApply + }).returning(); + if (applicableUsers && applicableUsers.length > 0) { + await tx.insert(couponApplicableUsers).values( + applicableUsers.map((userId) => ({ + couponId: coupon.id, + userId + })) + ); + } + if (applicableProducts && applicableProducts.length > 0) { + await tx.insert(couponApplicableProducts).values( + applicableProducts.map((productId) => ({ + couponId: coupon.id, + productId + })) + ); + } + return coupon; + }); +} +async function updateCouponWithRelations(id, input, applicableUsers, applicableProducts) { + return await db.transaction(async (tx) => { + const [coupon] = await tx.update(coupons).set({ + ...input + }).where(eq(coupons.id, id)).returning(); + if (applicableUsers !== void 0) { + await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.couponId, id)); + if (applicableUsers.length > 0) { + await tx.insert(couponApplicableUsers).values( + applicableUsers.map((userId) => ({ + couponId: id, + userId + })) + ); + } + } + if (applicableProducts !== void 0) { + await tx.delete(couponApplicableProducts).where(eq(couponApplicableProducts.couponId, id)); + if (applicableProducts.length > 0) { + await tx.insert(couponApplicableProducts).values( + applicableProducts.map((productId) => ({ + couponId: id, + productId + })) + ); + } + } + return coupon; + }); +} +async function invalidateCoupon(id) { + const result = await db.update(coupons).set({ isInvalidated: true }).where(eq(coupons.id, id)).returning(); + return result[0]; +} +async function validateCoupon(code, userId, orderAmount) { + const coupon = await db.query.coupons.findFirst({ + where: and( + eq(coupons.couponCode, code.toUpperCase()), + eq(coupons.isInvalidated, false) + ) + }); + if (!coupon) { + return { valid: false, message: "Coupon not found or invalidated" }; + } + if (coupon.validTill && new Date(coupon.validTill) < /* @__PURE__ */ new Date()) { + return { valid: false, message: "Coupon has expired" }; + } + if (!coupon.isApplyForAll && !coupon.isUserBased) { + return { valid: false, message: "Coupon is not available for use" }; + } + const minOrderValue2 = coupon.minOrder ? parseFloat(coupon.minOrder) : 0; + if (minOrderValue2 > 0 && orderAmount < minOrderValue2) { + return { valid: false, message: `Minimum order amount is ${minOrderValue2}` }; + } + let discountAmount = 0; + if (coupon.discountPercent) { + const percent = parseFloat(coupon.discountPercent); + discountAmount = orderAmount * percent / 100; + } else if (coupon.flatDiscount) { + discountAmount = parseFloat(coupon.flatDiscount); + } + const maxValueLimit = coupon.maxValue ? parseFloat(coupon.maxValue) : 0; + if (maxValueLimit > 0 && discountAmount > maxValueLimit) { + discountAmount = maxValueLimit; + } + return { + valid: true, + discountAmount, + coupon: { + id: coupon.id, + discountPercent: coupon.discountPercent, + flatDiscount: coupon.flatDiscount, + maxValue: coupon.maxValue + } + }; +} +async function getReservedCoupons(cursor, limit = 50, search) { + let whereCondition = void 0; + const conditions = []; + if (cursor) { + conditions.push(lt(reservedCoupons.id, cursor)); + } + if (search && search.trim()) { + conditions.push(or( + like(reservedCoupons.secretCode, `%${search}%`), + like(reservedCoupons.couponCode, `%${search}%`) + )); + } + if (conditions.length > 0) { + whereCondition = and(...conditions); + } + const result = await db.query.reservedCoupons.findMany({ + where: whereCondition, + with: { + redeemedUser: true, + creator: true + }, + orderBy: desc(reservedCoupons.createdAt), + limit: limit + 1 + }); + const hasMore = result.length > limit; + const couponsList = hasMore ? result.slice(0, limit) : result; + return { coupons: couponsList, hasMore }; +} +async function createReservedCouponWithProducts(input, applicableProducts) { + return await db.transaction(async (tx) => { + const [coupon] = await tx.insert(reservedCoupons).values({ + secretCode: input.secretCode, + couponCode: input.couponCode, + discountPercent: input.discountPercent, + flatDiscount: input.flatDiscount, + minOrder: input.minOrder, + productIds: input.productIds, + maxValue: input.maxValue, + validTill: input.validTill, + maxLimitForUser: input.maxLimitForUser, + exclusiveApply: input.exclusiveApply, + createdBy: input.createdBy + }).returning(); + if (applicableProducts && applicableProducts.length > 0) { + await tx.insert(couponApplicableProducts).values( + applicableProducts.map((productId) => ({ + couponId: coupon.id, + productId + })) + ); + } + return coupon; + }); +} +async function checkUsersExist(userIds) { + const existingUsers = await db.query.users.findMany({ + where: inArray(users.id, userIds), + columns: { id: true } + }); + return existingUsers.length === userIds.length; +} +async function checkCouponExists(couponCode) { + const existing = await db.query.coupons.findFirst({ + where: eq(coupons.couponCode, couponCode) + }); + return !!existing; +} +async function checkReservedCouponExists(secretCode) { + const existing = await db.query.reservedCoupons.findFirst({ + where: eq(reservedCoupons.secretCode, secretCode) + }); + return !!existing; +} +async function generateCancellationCoupon(orderId, staffUserId, userId, orderAmount, couponCode) { + return await db.transaction(async (tx) => { + const expiryDate = /* @__PURE__ */ new Date(); + expiryDate.setDate(expiryDate.getDate() + 30); + const [coupon] = await tx.insert(coupons).values({ + couponCode, + isUserBased: true, + flatDiscount: orderAmount.toString(), + minOrder: orderAmount.toString(), + maxValue: orderAmount.toString(), + validTill: expiryDate, + maxLimitForUser: 1, + createdBy: staffUserId, + isApplyForAll: false + }).returning(); + await tx.insert(couponApplicableUsers).values({ + couponId: coupon.id, + userId + }); + await tx.update(orderStatus).set({ refundCouponId: coupon.id }).where(eq(orderStatus.orderId, orderId)); + return coupon; + }); +} +async function getOrderWithUser(orderId) { + return await db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + user: true + } + }); +} +async function createCouponForUser(mobile, couponCode, staffUserId) { + return await db.transaction(async (tx) => { + let user = await tx.query.users.findFirst({ + where: eq(users.mobile, mobile) + }); + if (!user) { + const [newUser] = await tx.insert(users).values({ + name: null, + email: null, + mobile + }).returning(); + user = newUser; + } + const [coupon] = await tx.insert(coupons).values({ + couponCode, + isUserBased: true, + discountPercent: "20", + minOrder: "1000", + maxValue: "500", + maxLimitForUser: 1, + isApplyForAll: false, + exclusiveApply: false, + createdBy: staffUserId, + validTill: new Date(Date.now() + 90 * 24 * 60 * 60 * 1e3) + }).returning(); + await tx.insert(couponApplicableUsers).values({ + couponId: coupon.id, + userId: user.id + }); + return { + coupon, + user: { + id: user.id, + mobile: user.mobile, + name: user.name + } + }; + }); +} +async function getUsersForCoupon(search, limit = 20, offset = 0) { + let whereCondition = void 0; + if (search && search.trim()) { + whereCondition = or( + like(users.name, `%${search}%`), + like(users.mobile, `%${search}%`) + ); + } + const userList = await db.query.users.findMany({ + where: whereCondition, + columns: { + id: true, + name: true, + mobile: true + }, + limit, + offset, + orderBy: asc(users.name) + }); + return { + users: userList.map((user) => ({ + id: user.id, + name: user.name || "Unknown", + mobile: user.mobile + })) + }; +} +var init_coupon = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/coupon.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getAllCoupons, "getAllCoupons"); + __name(getCouponById, "getCouponById"); + __name(createCouponWithRelations, "createCouponWithRelations"); + __name(updateCouponWithRelations, "updateCouponWithRelations"); + __name(invalidateCoupon, "invalidateCoupon"); + __name(validateCoupon, "validateCoupon"); + __name(getReservedCoupons, "getReservedCoupons"); + __name(createReservedCouponWithProducts, "createReservedCouponWithProducts"); + __name(checkUsersExist, "checkUsersExist"); + __name(checkCouponExists, "checkCouponExists"); + __name(checkReservedCouponExists, "checkReservedCouponExists"); + __name(generateCancellationCoupon, "generateCancellationCoupon"); + __name(getOrderWithUser, "getOrderWithUser"); + __name(createCouponForUser, "createCouponForUser"); + __name(getUsersForCoupon, "getUsersForCoupon"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/order.ts +async function updateOrderNotes(orderId, adminNotes) { + const [result] = await db.update(orders).set({ adminNotes }).where(eq(orders.id, orderId)).returning(); + return result || null; +} +async function updateOrderPackaged(orderId, isPackaged) { + const orderIdNumber = parseInt(orderId); + await db.update(orderItems).set({ is_packaged: isPackaged }).where(eq(orderItems.orderId, orderIdNumber)); + if (!isPackaged) { + await db.update(orderStatus).set({ isPackaged, isDelivered: false }).where(eq(orderStatus.orderId, orderIdNumber)); + } else { + await db.update(orderStatus).set({ isPackaged }).where(eq(orderStatus.orderId, orderIdNumber)); + } + const order = await db.query.orders.findFirst({ + where: eq(orders.id, orderIdNumber) + }); + return { success: true, userId: order?.userId ?? null }; +} +async function updateOrderDelivered(orderId, isDelivered) { + const orderIdNumber = parseInt(orderId); + await db.update(orderStatus).set({ isDelivered }).where(eq(orderStatus.orderId, orderIdNumber)); + const order = await db.query.orders.findFirst({ + where: eq(orders.id, orderIdNumber) + }); + return { success: true, userId: order?.userId ?? null }; +} +async function getOrderDetails(orderId) { + const orderData = await db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + user: true, + address: true, + slot: true, + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + }, + payment: true, + paymentInfo: true, + orderStatus: true, + refunds: true + } + }); + if (!orderData) { + return null; + } + const couponUsageData = await db.query.couponUsage.findMany({ + where: eq(couponUsage.orderId, orderData.id), + with: { + coupon: true + } + }); + let couponData = null; + if (couponUsageData.length > 0) { + let totalDiscountAmount = 0; + const orderTotal = parseFloat((orderData.totalAmount ?? "0").toString()); + for (const usage of couponUsageData) { + let discountAmount = 0; + if (usage.coupon.discountPercent) { + discountAmount = orderTotal * parseFloat(usage.coupon.discountPercent.toString()) / 100; + } else if (usage.coupon.flatDiscount) { + discountAmount = parseFloat(usage.coupon.flatDiscount.toString()); + } + if (usage.coupon.maxValue && discountAmount > parseFloat(usage.coupon.maxValue.toString())) { + discountAmount = parseFloat(usage.coupon.maxValue.toString()); + } + totalDiscountAmount += discountAmount; + } + couponData = { + couponCode: couponUsageData.map((u5) => u5.coupon.couponCode).join(", "), + couponDescription: `${couponUsageData.length} coupons applied`, + discountAmount: totalDiscountAmount + }; + } + const statusRecord = orderData.orderStatus?.[0]; + const orderStatusRecord = statusRecord ? mapOrderStatusRecord(statusRecord) : null; + let status = "pending"; + if (orderStatusRecord?.isCancelled) { + status = "cancelled"; + } else if (orderStatusRecord?.isDelivered) { + status = "delivered"; + } + const refund = orderData.refunds?.[0]; + const refundStatus = refund?.refundStatus && isRefundStatus(refund.refundStatus) ? refund.refundStatus : null; + const refundRecord = refund ? { + id: refund.id, + orderId: refund.orderId, + refundAmount: refund.refundAmount, + refundStatus, + merchantRefundId: refund.merchantRefundId, + refundProcessedAt: refund.refundProcessedAt, + createdAt: refund.createdAt + } : null; + return { + id: orderData.id, + readableId: orderData.id, + userId: orderData.user.id, + customerName: `${orderData.user.name}`, + customerEmail: orderData.user.email, + customerMobile: orderData.user.mobile, + address: { + name: orderData.address.name, + line1: orderData.address.addressLine1, + line2: orderData.address.addressLine2, + city: orderData.address.city, + state: orderData.address.state, + pincode: orderData.address.pincode, + phone: orderData.address.phone + }, + slotInfo: orderData.slot ? { + time: orderData.slot.deliveryTime.toISOString(), + sequence: orderData.slot.deliverySequence + } : null, + isCod: orderData.isCod, + isOnlinePayment: orderData.isOnlinePayment, + totalAmount: parseFloat(orderData.totalAmount?.toString() || "0") - parseFloat(orderData.deliveryCharge?.toString() || "0"), + deliveryCharge: parseFloat(orderData.deliveryCharge?.toString() || "0"), + adminNotes: orderData.adminNotes, + userNotes: orderData.userNotes, + createdAt: orderData.createdAt, + status, + isPackaged: orderStatusRecord?.isPackaged || false, + isDelivered: orderStatusRecord?.isDelivered || false, + items: orderData.orderItems.map((item) => ({ + id: item.id, + name: item.product.name, + quantity: item.quantity, + productSize: item.product.productQuantity, + price: item.price, + unit: item.product.unit?.shortNotation, + amount: parseFloat(item.price.toString()) * parseFloat(item.quantity || "0"), + isPackaged: item.is_packaged, + isPackageVerified: item.is_package_verified + })), + payment: orderData.payment ? { + status: orderData.payment.status, + gateway: orderData.payment.gateway, + merchantOrderId: orderData.payment.merchantOrderId + } : null, + paymentInfo: orderData.paymentInfo ? { + status: orderData.paymentInfo.status, + gateway: orderData.paymentInfo.gateway, + merchantOrderId: orderData.paymentInfo.merchantOrderId + } : null, + cancelReason: orderStatusRecord?.cancelReason || null, + cancellationReviewed: orderStatusRecord?.cancellationReviewed || false, + isRefundDone: refundStatus === "processed" || false, + refundStatus, + refundAmount: refund?.refundAmount ? parseFloat(refund.refundAmount.toString()) : null, + couponData, + couponCode: couponData?.couponCode || null, + couponDescription: couponData?.couponDescription || null, + discountAmount: couponData?.discountAmount || null, + orderStatus: orderStatusRecord, + refundRecord, + isFlashDelivery: orderData.isFlashDelivery + }; +} +async function updateOrderItemPackaging(orderItemId, isPackaged, isPackageVerified) { + const orderItem = await db.query.orderItems.findFirst({ + where: eq(orderItems.id, orderItemId) + }); + if (!orderItem) { + return { success: false, updated: false }; + } + const updateData = {}; + if (isPackaged !== void 0) { + updateData.is_packaged = isPackaged; + } + if (isPackageVerified !== void 0) { + updateData.is_package_verified = isPackageVerified; + } + await db.update(orderItems).set(updateData).where(eq(orderItems.id, orderItemId)); + return { success: true, updated: true }; +} +async function removeDeliveryCharge(orderId) { + const order = await db.query.orders.findFirst({ + where: eq(orders.id, orderId) + }); + if (!order) { + return null; + } + const currentDeliveryCharge = parseFloat(order.deliveryCharge?.toString() || "0"); + const currentTotalAmount = parseFloat(order.totalAmount?.toString() || "0"); + const newTotalAmount = currentTotalAmount - currentDeliveryCharge; + await db.update(orders).set({ + deliveryCharge: "0", + totalAmount: newTotalAmount.toString() + }).where(eq(orders.id, orderId)); + return { success: true, message: "Delivery charge removed" }; +} +async function getSlotOrders(slotId) { + const slotOrders = await db.query.orders.findMany({ + where: eq(orders.slotId, parseInt(slotId)), + with: { + user: true, + address: true, + slot: true, + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + }, + orderStatus: true + } + }); + const filteredOrders = slotOrders.filter((order) => { + const statusRecord = order.orderStatus[0]; + return order.isCod || statusRecord && statusRecord.paymentStatus === "success"; + }); + const formattedOrders = filteredOrders.map((order) => { + const statusRecord = order.orderStatus[0]; + let status = "pending"; + if (statusRecord?.isCancelled) { + status = "cancelled"; + } else if (statusRecord?.isDelivered) { + status = "delivered"; + } + const items = order.orderItems.map((item) => ({ + id: item.id, + name: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat(item.price.toString()), + amount: parseFloat(item.quantity) * parseFloat(item.price.toString()), + unit: item.product.unit?.shortNotation || "", + isPackaged: item.is_packaged, + isPackageVerified: item.is_package_verified + })); + const paymentMode = order.isCod ? "COD" : "Online"; + return { + id: order.id, + readableId: order.id, + customerName: order.user.name || order.user.mobile + "", + address: `${order.address.addressLine1}${order.address.addressLine2 ? `, ${order.address.addressLine2}` : ""}, ${order.address.city}, ${order.address.state} - ${order.address.pincode}, Phone: ${order.address.phone}`, + addressId: order.addressId, + latitude: order.address.adminLatitude ?? order.address.latitude, + longitude: order.address.adminLongitude ?? order.address.longitude, + totalAmount: parseFloat(order.totalAmount), + items, + deliveryTime: order.slot?.deliveryTime.toISOString() || null, + status, + isPackaged: order.orderItems.every((item) => item.is_packaged) || false, + isDelivered: statusRecord?.isDelivered || false, + isCod: order.isCod, + paymentMode, + paymentStatus: isPaymentStatus(statusRecord?.paymentStatus || "pending") ? statusRecord?.paymentStatus || "pending" : "pending", + slotId: order.slotId, + adminNotes: order.adminNotes, + userNotes: order.userNotes + }; + }); + return { success: true, data: formattedOrders }; +} +async function updateAddressCoords(addressId, latitude, longitude) { + const result = await db.update(addresses).set({ + adminLatitude: latitude, + adminLongitude: longitude + }).where(eq(addresses.id, addressId)).returning(); + return { success: result.length > 0 }; +} +async function getAllOrders(input) { + const { + cursor, + limit, + slotId, + packagedFilter, + deliveredFilter, + cancellationFilter, + flashDeliveryFilter + } = input; + let whereCondition = eq(orders.id, orders.id); + if (cursor) { + whereCondition = and(whereCondition, lt(orders.id, cursor)); + } + if (slotId) { + whereCondition = and(whereCondition, eq(orders.slotId, slotId)); + } + if (packagedFilter === "packaged") { + whereCondition = and(whereCondition, eq(orderStatus.isPackaged, true)); + } else if (packagedFilter === "not_packaged") { + whereCondition = and(whereCondition, eq(orderStatus.isPackaged, false)); + } + if (deliveredFilter === "delivered") { + whereCondition = and(whereCondition, eq(orderStatus.isDelivered, true)); + } else if (deliveredFilter === "not_delivered") { + whereCondition = and(whereCondition, eq(orderStatus.isDelivered, false)); + } + if (cancellationFilter === "cancelled") { + whereCondition = and(whereCondition, eq(orderStatus.isCancelled, true)); + } else if (cancellationFilter === "not_cancelled") { + whereCondition = and(whereCondition, eq(orderStatus.isCancelled, false)); + } + if (flashDeliveryFilter === "flash") { + whereCondition = and(whereCondition, eq(orders.isFlashDelivery, true)); + } else if (flashDeliveryFilter === "regular") { + whereCondition = and(whereCondition, eq(orders.isFlashDelivery, false)); + } + const allOrders = await db.query.orders.findMany({ + where: whereCondition, + orderBy: desc(orders.createdAt), + limit: limit + 1, + with: { + user: true, + address: true, + slot: true, + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + }, + orderStatus: true + } + }); + const hasMore = allOrders.length > limit; + const ordersToReturn = hasMore ? allOrders.slice(0, limit) : allOrders; + const filteredOrders = ordersToReturn.filter((order) => { + const statusRecord = order.orderStatus[0]; + return order.isCod || statusRecord && statusRecord.paymentStatus === "success"; + }); + const formattedOrders = filteredOrders.map((order) => { + const statusRecord = order.orderStatus[0]; + let status = "pending"; + if (statusRecord?.isCancelled) { + status = "cancelled"; + } else if (statusRecord?.isDelivered) { + status = "delivered"; + } + const items = order.orderItems.map((item) => ({ + id: item.id, + name: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat(item.price.toString()), + amount: parseFloat(item.quantity) * parseFloat(item.price.toString()), + unit: item.product.unit?.shortNotation || "", + productSize: item.product.productQuantity, + isPackaged: item.is_packaged, + isPackageVerified: item.is_package_verified + })).sort((first, second) => first.id - second.id); + return { + id: order.id, + orderId: order.id.toString(), + readableId: order.id, + customerName: order.user.name || order.user.mobile + "", + customerMobile: order.user.mobile, + address: `${order.address.addressLine1}${order.address.addressLine2 ? `, ${order.address.addressLine2}` : ""}, ${order.address.city}, ${order.address.state} - ${order.address.pincode}, Phone: ${order.address.phone}`, + addressId: order.addressId, + latitude: order.address.adminLatitude ?? order.address.latitude, + longitude: order.address.adminLongitude ?? order.address.longitude, + totalAmount: parseFloat(order.totalAmount), + deliveryCharge: parseFloat(order.deliveryCharge || "0"), + items, + createdAt: order.createdAt, + deliveryTime: order.slot?.deliveryTime.toISOString() || null, + status, + isPackaged: order.orderItems.every((item) => item.is_packaged) || false, + isDelivered: statusRecord?.isDelivered || false, + isCod: order.isCod, + isFlashDelivery: order.isFlashDelivery, + userNotes: order.userNotes, + adminNotes: order.adminNotes, + userNegativityScore: 0, + userId: order.userId + }; + }); + return { + orders: formattedOrders, + nextCursor: hasMore ? ordersToReturn[ordersToReturn.length - 1].id : void 0 + }; +} +async function rebalanceSlots(slotIds) { + const ordersList = await db.query.orders.findMany({ + where: inArray(orders.slotId, slotIds), + with: { + orderItems: { + with: { + product: true + } + }, + couponUsages: { + with: { + coupon: true + } + } + } + }); + const processedOrdersData = ordersList.map((order) => { + let newTotal = order.orderItems.reduce((acc, item) => { + const latestPrice = +item.product.price; + const amount = latestPrice * Number(item.quantity); + return acc + amount; + }, 0); + order.orderItems.forEach((item) => { + item.price = item.product.price; + item.discountedPrice = item.product.price; + }); + const coupon = order.couponUsages[0]?.coupon; + let discount = 0; + if (coupon && !coupon.isInvalidated && (!coupon.validTill || new Date(coupon.validTill) > /* @__PURE__ */ new Date())) { + const proportion = Number(order.orderGroupProportion || 1); + if (coupon.discountPercent) { + const maxDiscount = Number(coupon.maxValue || Infinity) * proportion; + discount = Math.min(newTotal * parseFloat(coupon.discountPercent) / 100, maxDiscount); + } else { + discount = Number(coupon.flatDiscount) * proportion; + } + } + newTotal -= discount; + const { couponUsages, orderItems: orderItemsRaw, ...rest } = order; + const updatedOrderItems = orderItemsRaw.map((item) => { + const { product, ...rawOrderItem } = item; + return rawOrderItem; + }); + return { order: rest, updatedOrderItems, newTotal }; + }); + const updatedOrderIds = []; + await db.transaction(async (tx) => { + for (const { order, updatedOrderItems, newTotal } of processedOrdersData) { + await tx.update(orders).set({ totalAmount: newTotal.toString() }).where(eq(orders.id, order.id)); + updatedOrderIds.push(order.id); + for (const item of updatedOrderItems) { + await tx.update(orderItems).set({ + price: item.price, + discountedPrice: item.discountedPrice + }).where(eq(orderItems.id, item.id)); + } + } + }); + return { + success: true, + updatedOrders: updatedOrderIds, + message: `Rebalanced ${updatedOrderIds.length} orders.` + }; +} +async function cancelOrder(orderId, reason) { + const order = await db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + orderStatus: true + } + }); + if (!order) { + return { success: false, message: "Order not found", error: "order_not_found" }; + } + const status = order.orderStatus[0]; + if (!status) { + return { success: false, message: "Order status not found", error: "status_not_found" }; + } + if (status.isCancelled) { + return { success: false, message: "Order is already cancelled", error: "already_cancelled" }; + } + if (status.isDelivered) { + return { success: false, message: "Cannot cancel delivered order", error: "already_delivered" }; + } + const result = await db.transaction(async (tx) => { + await tx.update(orderStatus).set({ + isCancelled: true, + isCancelledByAdmin: true, + cancelReason: reason, + cancellationAdminNotes: reason, + cancellationReviewed: true, + cancellationReviewedAt: /* @__PURE__ */ new Date() + }).where(eq(orderStatus.id, status.id)); + const refundStatus = order.isCod ? "na" : "pending"; + await tx.insert(refunds).values({ + orderId: order.id, + refundStatus + }); + return { orderId: order.id, userId: order.userId }; + }); + return { + success: true, + message: "Order cancelled successfully", + orderId: result.orderId, + userId: result.userId + }; +} +async function deleteOrderById(orderId) { + await db.transaction(async (tx) => { + await tx.delete(orderItems).where(eq(orderItems.orderId, orderId)); + await tx.delete(orderStatus).where(eq(orderStatus.orderId, orderId)); + await tx.delete(payments).where(eq(payments.orderId, orderId)); + await tx.delete(refunds).where(eq(refunds.orderId, orderId)); + await tx.delete(couponUsage).where(eq(couponUsage.orderId, orderId)); + await tx.delete(complaints).where(eq(complaints.orderId, orderId)); + await tx.delete(orders).where(eq(orders.id, orderId)); + }); +} +var isPaymentStatus, isRefundStatus, mapOrderStatusRecord; +var init_order = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/order.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + isPaymentStatus = /* @__PURE__ */ __name((value) => value === "pending" || value === "success" || value === "cod" || value === "failed", "isPaymentStatus"); + isRefundStatus = /* @__PURE__ */ __name((value) => value === "success" || value === "pending" || value === "failed" || value === "none" || value === "na" || value === "processed", "isRefundStatus"); + mapOrderStatusRecord = /* @__PURE__ */ __name((record2) => ({ + id: record2.id, + orderTime: record2.orderTime, + userId: record2.userId, + orderId: record2.orderId, + isPackaged: record2.isPackaged, + isDelivered: record2.isDelivered, + isCancelled: record2.isCancelled, + cancelReason: record2.cancelReason ?? null, + isCancelledByAdmin: record2.isCancelledByAdmin ?? null, + paymentStatus: isPaymentStatus(record2.paymentStatus) ? record2.paymentStatus : "pending", + cancellationUserNotes: record2.cancellationUserNotes ?? null, + cancellationAdminNotes: record2.cancellationAdminNotes ?? null, + cancellationReviewed: record2.cancellationReviewed, + cancellationReviewedAt: record2.cancellationReviewedAt ?? null, + refundCouponId: record2.refundCouponId ?? null + }), "mapOrderStatusRecord"); + __name(updateOrderNotes, "updateOrderNotes"); + __name(updateOrderPackaged, "updateOrderPackaged"); + __name(updateOrderDelivered, "updateOrderDelivered"); + __name(getOrderDetails, "getOrderDetails"); + __name(updateOrderItemPackaging, "updateOrderItemPackaging"); + __name(removeDeliveryCharge, "removeDeliveryCharge"); + __name(getSlotOrders, "getSlotOrders"); + __name(updateAddressCoords, "updateAddressCoords"); + __name(getAllOrders, "getAllOrders"); + __name(rebalanceSlots, "rebalanceSlots"); + __name(cancelOrder, "cancelOrder"); + __name(deleteOrderById, "deleteOrderById"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/product.ts +async function getAllProducts() { + const products = await db.query.productInfo.findMany({ + orderBy: productInfo.name, + with: { + unit: true, + store: true + } + }); + return products.map((product) => ({ + ...mapProduct(product), + unit: mapUnit(product.unit), + store: product.store ? mapStore(product.store) : null + })); +} +async function getProductById(id) { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.id, id), + with: { + unit: true + } + }); + if (!product) { + return null; + } + const deals = await db.query.specialDeals.findMany({ + where: eq(specialDeals.productId, id), + orderBy: specialDeals.quantity + }); + const productTagsData = await db.query.productTags.findMany({ + where: eq(productTags.productId, id), + with: { + tag: true + } + }); + return { + ...mapProduct(product), + unit: mapUnit(product.unit), + deals: deals.map(mapSpecialDeal), + tags: productTagsData.map((tag2) => mapTagInfo(tag2.tag)) + }; +} +async function deleteProduct(id) { + const [deletedProduct] = await db.delete(productInfo).where(eq(productInfo.id, id)).returning(); + if (!deletedProduct) { + return null; + } + return mapProduct(deletedProduct); +} +async function createProduct(input) { + const [product] = await db.insert(productInfo).values(input).returning(); + return mapProduct(product); +} +async function updateProduct(id, updates) { + const [product] = await db.update(productInfo).set(updates).where(eq(productInfo.id, id)).returning(); + if (!product) { + return null; + } + return mapProduct(product); +} +async function toggleProductOutOfStock(id) { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.id, id) + }); + if (!product) { + return null; + } + const [updatedProduct] = await db.update(productInfo).set({ + isOutOfStock: !product.isOutOfStock + }).where(eq(productInfo.id, id)).returning(); + if (!updatedProduct) { + return null; + } + return mapProduct(updatedProduct); +} +async function updateSlotProducts(slotId, productIds) { + const currentAssociations = await db.query.productSlots.findMany({ + where: eq(productSlots.slotId, parseInt(slotId)), + columns: { + productId: true + } + }); + const currentProductIds = currentAssociations.map((assoc) => assoc.productId); + const newProductIds = productIds.map((id) => parseInt(id)); + const productsToAdd = newProductIds.filter((id) => !currentProductIds.includes(id)); + const productsToRemove = currentProductIds.filter((id) => !newProductIds.includes(id)); + if (productsToRemove.length > 0) { + await db.delete(productSlots).where( + and( + eq(productSlots.slotId, parseInt(slotId)), + inArray(productSlots.productId, productsToRemove) + ) + ); + } + if (productsToAdd.length > 0) { + const newAssociations = productsToAdd.map((productId) => ({ + productId, + slotId: parseInt(slotId) + })); + await db.insert(productSlots).values(newAssociations); + } + return { + message: "Slot products updated successfully", + added: productsToAdd.length, + removed: productsToRemove.length + }; +} +async function getSlotProductIds(slotId) { + const associations = await db.query.productSlots.findMany({ + where: eq(productSlots.slotId, parseInt(slotId)), + columns: { + productId: true + } + }); + return associations.map((assoc) => assoc.productId); +} +async function getAllUnits() { + const allUnits = await db.query.units.findMany({ + orderBy: units.shortNotation + }); + return allUnits.map(mapUnit); +} +async function getAllProductTags() { + const tags = await db.query.productTagInfo.findMany({ + with: { + products: { + with: { + product: true + } + } + } + }); + return tags.map((tag2) => ({ + ...mapTagInfo(tag2), + products: tag2.products.map((assignment) => ({ + productId: assignment.productId, + tagId: assignment.tagId, + assignedAt: assignment.assignedAt, + product: mapProduct(assignment.product) + })) + })); +} +async function getAllProductTagInfos() { + const tags = await db.query.productTagInfo.findMany({ + orderBy: productTagInfo.tagName + }); + return tags.map(mapTagInfo); +} +async function getProductTagInfoById(tagId) { + const tag2 = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.id, tagId) + }); + if (!tag2) { + return null; + } + return mapTagInfo(tag2); +} +async function createProductTag(input) { + const [tag2] = await db.insert(productTagInfo).values({ + tagName: input.tagName, + tagDescription: input.tagDescription || null, + imageUrl: input.imageUrl || null, + isDashboardTag: input.isDashboardTag || false, + relatedStores: input.relatedStores || [] + }).returning(); + return { + ...mapTagInfo(tag2), + products: [] + }; +} +async function getProductTagById(tagId) { + const tag2 = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.id, tagId), + with: { + products: { + with: { + product: true + } + } + } + }); + if (!tag2) { + return null; + } + return { + ...mapTagInfo(tag2), + products: tag2.products.map((assignment) => ({ + productId: assignment.productId, + tagId: assignment.tagId, + assignedAt: assignment.assignedAt, + product: mapProduct(assignment.product) + })) + }; +} +async function updateProductTag(tagId, input) { + const [tag2] = await db.update(productTagInfo).set({ + ...input.tagName !== void 0 && { tagName: input.tagName }, + ...input.tagDescription !== void 0 && { tagDescription: input.tagDescription }, + ...input.imageUrl !== void 0 && { imageUrl: input.imageUrl }, + ...input.isDashboardTag !== void 0 && { isDashboardTag: input.isDashboardTag }, + ...input.relatedStores !== void 0 && { relatedStores: input.relatedStores } + }).where(eq(productTagInfo.id, tagId)).returning(); + const fullTag = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.id, tagId), + with: { + products: { + with: { + product: true + } + } + } + }); + return { + ...mapTagInfo(tag2), + products: fullTag?.products.map((assignment) => ({ + productId: assignment.productId, + tagId: assignment.tagId, + assignedAt: assignment.assignedAt, + product: mapProduct(assignment.product) + })) || [] + }; +} +async function deleteProductTag(tagId) { + await db.delete(productTagInfo).where(eq(productTagInfo.id, tagId)); +} +async function checkProductTagExistsByName(tagName) { + const tag2 = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.tagName, tagName) + }); + return !!tag2; +} +async function getSlotsProductIds(slotIds) { + if (slotIds.length === 0) { + return {}; + } + const associations = await db.query.productSlots.findMany({ + where: inArray(productSlots.slotId, slotIds), + columns: { + slotId: true, + productId: true + } + }); + const result = {}; + for (const assoc of associations) { + if (!result[assoc.slotId]) { + result[assoc.slotId] = []; + } + result[assoc.slotId].push(assoc.productId); + } + slotIds.forEach((slotId) => { + if (!result[slotId]) { + result[slotId] = []; + } + }); + return result; +} +async function getProductReviews(productId, limit, offset) { + const reviews = await db.select({ + id: productReviews.id, + reviewBody: productReviews.reviewBody, + ratings: productReviews.ratings, + imageUrls: productReviews.imageUrls, + reviewTime: productReviews.reviewTime, + adminResponse: productReviews.adminResponse, + adminResponseImages: productReviews.adminResponseImages, + userName: users.name + }).from(productReviews).innerJoin(users, eq(productReviews.userId, users.id)).where(eq(productReviews.productId, productId)).orderBy(desc(productReviews.reviewTime)).limit(limit).offset(offset); + const totalCountResult = await db.select({ count: sql`count(*)` }).from(productReviews).where(eq(productReviews.productId, productId)); + const totalCount = Number(totalCountResult[0].count); + const mappedReviews = reviews.map((review) => ({ + id: review.id, + reviewBody: review.reviewBody, + ratings: review.ratings, + imageUrls: review.imageUrls, + reviewTime: review.reviewTime, + adminResponse: review.adminResponse ?? null, + adminResponseImages: review.adminResponseImages, + userName: review.userName ?? null + })); + return { + reviews: mappedReviews, + totalCount + }; +} +async function respondToReview(reviewId, adminResponse, adminResponseImages) { + const [updatedReview] = await db.update(productReviews).set({ + adminResponse, + adminResponseImages + }).where(eq(productReviews.id, reviewId)).returning(); + if (!updatedReview) { + return null; + } + return { + id: updatedReview.id, + reviewBody: updatedReview.reviewBody, + ratings: updatedReview.ratings, + imageUrls: updatedReview.imageUrls, + reviewTime: updatedReview.reviewTime, + adminResponse: updatedReview.adminResponse ?? null, + adminResponseImages: updatedReview.adminResponseImages, + userName: null + }; +} +async function getAllProductGroups() { + const groups = await db.query.productGroupInfo.findMany({ + with: { + memberships: { + with: { + product: true + } + } + }, + orderBy: desc(productGroupInfo.createdAt) + }); + return groups.map((group6) => ({ + id: group6.id, + groupName: group6.groupName, + description: group6.description ?? null, + createdAt: group6.createdAt, + products: group6.memberships.map((membership) => mapProduct(membership.product)), + productCount: group6.memberships.length, + memberships: group6.memberships + })); +} +async function createProductGroup(groupName, description, productIds) { + const [newGroup] = await db.insert(productGroupInfo).values({ + groupName, + description + }).returning(); + if (productIds.length > 0) { + const memberships = productIds.map((productId) => ({ + productId, + groupId: newGroup.id + })); + await db.insert(productGroupMembership).values(memberships); + } + return { + id: newGroup.id, + groupName: newGroup.groupName, + description: newGroup.description ?? null, + createdAt: newGroup.createdAt + }; +} +async function updateProductGroup(id, groupName, description, productIds) { + const updateData = {}; + if (groupName !== void 0) + updateData.groupName = groupName; + if (description !== void 0) + updateData.description = description; + const [updatedGroup] = await db.update(productGroupInfo).set(updateData).where(eq(productGroupInfo.id, id)).returning(); + if (!updatedGroup) { + return null; + } + if (productIds !== void 0) { + await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id)); + if (productIds.length > 0) { + const memberships = productIds.map((productId) => ({ + productId, + groupId: id + })); + await db.insert(productGroupMembership).values(memberships); + } + } + return { + id: updatedGroup.id, + groupName: updatedGroup.groupName, + description: updatedGroup.description ?? null, + createdAt: updatedGroup.createdAt + }; +} +async function deleteProductGroup(id) { + await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id)); + const [deletedGroup] = await db.delete(productGroupInfo).where(eq(productGroupInfo.id, id)).returning(); + if (!deletedGroup) { + return null; + } + return { + id: deletedGroup.id, + groupName: deletedGroup.groupName, + description: deletedGroup.description ?? null, + createdAt: deletedGroup.createdAt + }; +} +async function addProductToGroup(groupId, productId) { + await db.insert(productGroupMembership).values({ groupId, productId }); +} +async function removeProductFromGroup(groupId, productId) { + await db.delete(productGroupMembership).where(and( + eq(productGroupMembership.groupId, groupId), + eq(productGroupMembership.productId, productId) + )); +} +async function updateProductPrices(updates) { + if (updates.length === 0) { + return { updatedCount: 0, invalidIds: [] }; + } + const productIds = updates.map((update) => update.productId); + const existingProducts = await db.query.productInfo.findMany({ + where: inArray(productInfo.id, productIds), + columns: { id: true } + }); + const existingIds = new Set(existingProducts.map((product) => product.id)); + const invalidIds = productIds.filter((id) => !existingIds.has(id)); + if (invalidIds.length > 0) { + return { updatedCount: 0, invalidIds }; + } + const updatePromises = updates.map((update) => { + const { productId, price, marketPrice, flashPrice, isFlashAvailable } = update; + const updateData = {}; + if (price !== void 0) + updateData.price = price.toString(); + if (marketPrice !== void 0) + updateData.marketPrice = marketPrice === null ? null : marketPrice.toString(); + if (flashPrice !== void 0) + updateData.flashPrice = flashPrice === null ? null : flashPrice.toString(); + if (isFlashAvailable !== void 0) + updateData.isFlashAvailable = isFlashAvailable; + return db.update(productInfo).set(updateData).where(eq(productInfo.id, productId)); + }); + await Promise.all(updatePromises); + return { updatedCount: updates.length, invalidIds: [] }; +} +async function checkProductExistsByName(name) { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.name, name), + columns: { id: true } + }); + return !!product; +} +async function checkUnitExists(unitId) { + const unit = await db.query.units.findFirst({ + where: eq(units.id, unitId), + columns: { id: true } + }); + return !!unit; +} +async function getProductImagesById(productId) { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId), + columns: { images: true } + }); + if (!product) { + return null; + } + return getStringArray(product.images) || []; +} +async function createSpecialDealsForProduct(productId, deals) { + if (deals.length === 0) { + return []; + } + const dealInserts = deals.map((deal) => ({ + productId, + quantity: deal.quantity.toString(), + price: deal.price.toString(), + validTill: new Date(deal.validTill) + })); + const createdDeals = await db.insert(specialDeals).values(dealInserts).returning(); + return createdDeals.map(mapSpecialDeal); +} +async function updateProductDeals(productId, deals) { + if (deals.length === 0) { + await db.delete(specialDeals).where(eq(specialDeals.productId, productId)); + return; + } + const existingDeals = await db.query.specialDeals.findMany({ + where: eq(specialDeals.productId, productId) + }); + const existingDealsMap = new Map( + existingDeals.map((deal) => [`${deal.quantity}-${deal.price}`, deal]) + ); + const newDealsMap = new Map( + deals.map((deal) => [`${deal.quantity}-${deal.price}`, deal]) + ); + const dealsToAdd = deals.filter((deal) => { + const key = `${deal.quantity}-${deal.price}`; + return !existingDealsMap.has(key); + }); + const dealsToRemove = existingDeals.filter((deal) => { + const key = `${deal.quantity}-${deal.price}`; + return !newDealsMap.has(key); + }); + const dealsToUpdate = deals.filter((deal) => { + const key = `${deal.quantity}-${deal.price}`; + const existing = existingDealsMap.get(key); + const nextValidTill = deal.validTill instanceof Date ? deal.validTill.toISOString().split("T")[0] : String(deal.validTill); + return existing && existing.validTill.toISOString().split("T")[0] !== nextValidTill; + }); + if (dealsToRemove.length > 0) { + await db.delete(specialDeals).where( + inArray(specialDeals.id, dealsToRemove.map((deal) => deal.id)) + ); + } + if (dealsToAdd.length > 0) { + const dealInserts = dealsToAdd.map((deal) => ({ + productId, + quantity: deal.quantity.toString(), + price: deal.price.toString(), + validTill: new Date(deal.validTill) + })); + await db.insert(specialDeals).values(dealInserts); + } + for (const deal of dealsToUpdate) { + const key = `${deal.quantity}-${deal.price}`; + const existingDeal = existingDealsMap.get(key); + if (existingDeal) { + await db.update(specialDeals).set({ validTill: new Date(deal.validTill) }).where(eq(specialDeals.id, existingDeal.id)); + } + } +} +async function replaceProductTags(productId, tagIds) { + await db.delete(productTags).where(eq(productTags.productId, productId)); + if (tagIds.length === 0) { + return; + } + const tagAssociations = tagIds.map((tagId) => ({ + productId, + tagId + })); + await db.insert(productTags).values(tagAssociations); +} +var getStringArray, mapUnit, mapStore, mapProduct, mapSpecialDeal, mapTagInfo; +var init_product = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/product.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + getStringArray = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return null; + return value.map((item) => String(item)); + }, "getStringArray"); + mapUnit = /* @__PURE__ */ __name((unit) => ({ + id: unit.id, + shortNotation: unit.shortNotation, + fullName: unit.fullName + }), "mapUnit"); + mapStore = /* @__PURE__ */ __name((store) => ({ + id: store.id, + name: store.name, + description: store.description, + imageUrl: store.imageUrl, + owner: store.owner, + createdAt: store.createdAt + // updatedAt: store.createdAt, + }), "mapStore"); + mapProduct = /* @__PURE__ */ __name((product) => ({ + id: product.id, + name: product.name, + shortDescription: product.shortDescription ?? null, + longDescription: product.longDescription ?? null, + unitId: product.unitId, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null, + images: getStringArray(product.images), + imageKeys: getStringArray(product.images), + isOutOfStock: product.isOutOfStock, + isSuspended: product.isSuspended, + isFlashAvailable: product.isFlashAvailable, + flashPrice: product.flashPrice ? String(product.flashPrice) : null, + createdAt: product.createdAt, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + storeId: product.storeId + }), "mapProduct"); + mapSpecialDeal = /* @__PURE__ */ __name((deal) => ({ + id: deal.id, + productId: deal.productId, + quantity: String(deal.quantity ?? "0"), + price: String(deal.price ?? "0"), + validTill: deal.validTill + }), "mapSpecialDeal"); + mapTagInfo = /* @__PURE__ */ __name((tag2) => ({ + id: tag2.id, + tagName: tag2.tagName, + tagDescription: tag2.tagDescription ?? null, + imageUrl: tag2.imageUrl ?? null, + isDashboardTag: tag2.isDashboardTag, + relatedStores: tag2.relatedStores, + createdAt: tag2.createdAt + }), "mapTagInfo"); + __name(getAllProducts, "getAllProducts"); + __name(getProductById, "getProductById"); + __name(deleteProduct, "deleteProduct"); + __name(createProduct, "createProduct"); + __name(updateProduct, "updateProduct"); + __name(toggleProductOutOfStock, "toggleProductOutOfStock"); + __name(updateSlotProducts, "updateSlotProducts"); + __name(getSlotProductIds, "getSlotProductIds"); + __name(getAllUnits, "getAllUnits"); + __name(getAllProductTags, "getAllProductTags"); + __name(getAllProductTagInfos, "getAllProductTagInfos"); + __name(getProductTagInfoById, "getProductTagInfoById"); + __name(createProductTag, "createProductTag"); + __name(getProductTagById, "getProductTagById"); + __name(updateProductTag, "updateProductTag"); + __name(deleteProductTag, "deleteProductTag"); + __name(checkProductTagExistsByName, "checkProductTagExistsByName"); + __name(getSlotsProductIds, "getSlotsProductIds"); + __name(getProductReviews, "getProductReviews"); + __name(respondToReview, "respondToReview"); + __name(getAllProductGroups, "getAllProductGroups"); + __name(createProductGroup, "createProductGroup"); + __name(updateProductGroup, "updateProductGroup"); + __name(deleteProductGroup, "deleteProductGroup"); + __name(addProductToGroup, "addProductToGroup"); + __name(removeProductFromGroup, "removeProductFromGroup"); + __name(updateProductPrices, "updateProductPrices"); + __name(checkProductExistsByName, "checkProductExistsByName"); + __name(checkUnitExists, "checkUnitExists"); + __name(getProductImagesById, "getProductImagesById"); + __name(createSpecialDealsForProduct, "createSpecialDealsForProduct"); + __name(updateProductDeals, "updateProductDeals"); + __name(replaceProductTags, "replaceProductTags"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/slots.ts +async function getActiveSlotsWithProducts() { + const slots = await db.query.deliverySlotInfo.findMany({ + where: eq(deliverySlotInfo.isActive, true), + orderBy: desc(deliverySlotInfo.deliveryTime), + with: { + productSlots: { + with: { + product: { + columns: { + id: true, + name: true, + images: true + } + } + } + } + } + }); + return slots.map((slot) => ({ + ...mapDeliverySlot(slot), + deliverySequence: getNumberArray(slot.deliverySequence), + products: slot.productSlots.map((ps) => mapSlotProductSummary(ps.product)) + })); +} +async function getActiveSlots() { + const slots = await db.query.deliverySlotInfo.findMany({ + where: eq(deliverySlotInfo.isActive, true) + }); + return slots.map(mapDeliverySlot); +} +async function getSlotsAfterDate(afterDate) { + const slots = await db.query.deliverySlotInfo.findMany({ + where: and( + eq(deliverySlotInfo.isActive, true), + gt(deliverySlotInfo.deliveryTime, afterDate) + ), + orderBy: asc(deliverySlotInfo.deliveryTime) + }); + return slots.map(mapDeliverySlot); +} +async function getSlotByIdWithRelations(id) { + const slot = await db.query.deliverySlotInfo.findFirst({ + where: eq(deliverySlotInfo.id, id), + with: { + productSlots: { + with: { + product: { + columns: { + id: true, + name: true, + images: true + } + } + } + }, + vendorSnippets: true + } + }); + if (!slot) { + return null; + } + return { + ...mapDeliverySlot(slot), + deliverySequence: getNumberArray(slot.deliverySequence), + groupIds: getNumberArray(slot.groupIds), + products: slot.productSlots.map((ps) => mapSlotProductSummary(ps.product)), + vendorSnippets: slot.vendorSnippets.map(mapVendorSnippet) + }; +} +async function createSlotWithRelations(input) { + const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input; + const result = await db.transaction(async (tx) => { + const [newSlot] = await tx.insert(deliverySlotInfo).values({ + deliveryTime: new Date(deliveryTime), + freezeTime: new Date(freezeTime), + isActive: isActive !== void 0 ? isActive : true, + groupIds: groupIds !== void 0 ? groupIds : [] + }).returning(); + if (productIds && productIds.length > 0) { + const associations = productIds.map((productId) => ({ + productId, + slotId: newSlot.id + })); + await tx.insert(productSlots).values(associations); + } + let createdSnippets = []; + if (snippets && snippets.length > 0) { + for (const snippet of snippets) { + const products = await tx.query.productInfo.findMany({ + where: inArray(productInfo.id, snippet.productIds) + }); + if (products.length !== snippet.productIds.length) { + throw new Error(`One or more invalid product IDs in snippet "${snippet.name}"`); + } + const existingSnippet = await tx.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.snippetCode, snippet.name) + }); + if (existingSnippet) { + throw new Error(`Snippet name "${snippet.name}" already exists`); + } + const [createdSnippet] = await tx.insert(vendorSnippets).values({ + snippetCode: snippet.name, + slotId: newSlot.id, + productIds: snippet.productIds, + validTill: snippet.validTill ? new Date(snippet.validTill) : void 0 + }).returning(); + createdSnippets.push(mapVendorSnippet(createdSnippet)); + } + } + return { + slot: mapDeliverySlot(newSlot), + createdSnippets, + message: "Slot created successfully" + }; + }); + return result; +} +async function updateSlotWithRelations(input) { + const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input; + let validGroupIds = groupIds; + if (groupIds && groupIds.length > 0) { + const existingGroups = await db.query.productGroupInfo.findMany({ + where: inArray(productGroupInfo.id, groupIds), + columns: { id: true } + }); + validGroupIds = existingGroups.map((group6) => group6.id); + } + const result = await db.transaction(async (tx) => { + const [updatedSlot] = await tx.update(deliverySlotInfo).set({ + deliveryTime: new Date(deliveryTime), + freezeTime: new Date(freezeTime), + isActive: isActive !== void 0 ? isActive : true, + groupIds: validGroupIds !== void 0 ? validGroupIds : [] + }).where(eq(deliverySlotInfo.id, id)).returning(); + if (!updatedSlot) { + return null; + } + if (productIds !== void 0) { + await tx.delete(productSlots).where(eq(productSlots.slotId, id)); + if (productIds.length > 0) { + const associations = productIds.map((productId) => ({ + productId, + slotId: id + })); + await tx.insert(productSlots).values(associations); + } + } + let createdSnippets = []; + if (snippets && snippets.length > 0) { + for (const snippet of snippets) { + const products = await tx.query.productInfo.findMany({ + where: inArray(productInfo.id, snippet.productIds) + }); + if (products.length !== snippet.productIds.length) { + throw new Error(`One or more invalid product IDs in snippet "${snippet.name}"`); + } + const existingSnippet = await tx.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.snippetCode, snippet.name) + }); + if (existingSnippet) { + throw new Error(`Snippet name "${snippet.name}" already exists`); + } + const [createdSnippet] = await tx.insert(vendorSnippets).values({ + snippetCode: snippet.name, + slotId: id, + productIds: snippet.productIds, + validTill: snippet.validTill ? new Date(snippet.validTill) : void 0 + }).returning(); + createdSnippets.push(mapVendorSnippet(createdSnippet)); + } + } + return { + slot: mapDeliverySlot(updatedSlot), + createdSnippets, + message: "Slot updated successfully" + }; + }); + return result; +} +async function deleteSlotById(id) { + const [deletedSlot] = await db.update(deliverySlotInfo).set({ isActive: false }).where(eq(deliverySlotInfo.id, id)).returning(); + if (!deletedSlot) { + return null; + } + return mapDeliverySlot(deletedSlot); +} +async function getSlotDeliverySequence(slotId) { + const slot = await db.query.deliverySlotInfo.findFirst({ + where: eq(deliverySlotInfo.id, slotId) + }); + if (!slot) { + return null; + } + return mapDeliverySlot(slot); +} +async function updateSlotDeliverySequence(slotId, sequence) { + const [updatedSlot] = await db.update(deliverySlotInfo).set({ deliverySequence: sequence }).where(eq(deliverySlotInfo.id, slotId)).returning({ + id: deliverySlotInfo.id, + deliverySequence: deliverySlotInfo.deliverySequence + }); + return updatedSlot || null; +} +async function updateSlotCapacity(slotId, isCapacityFull) { + const [updatedSlot] = await db.update(deliverySlotInfo).set({ isCapacityFull }).where(eq(deliverySlotInfo.id, slotId)).returning(); + if (!updatedSlot) { + return null; + } + return { + success: true, + slot: mapDeliverySlot(updatedSlot), + message: `Slot ${isCapacityFull ? "marked as full capacity" : "capacity reset"}` + }; +} +var getStringArray2, getNumberArray, mapDeliverySlot, mapSlotProductSummary, mapVendorSnippet; +var init_slots = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/slots.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + getStringArray2 = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return null; + return value.map((item) => String(item)); + }, "getStringArray"); + getNumberArray = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return []; + return value.map((item) => Number(item)); + }, "getNumberArray"); + mapDeliverySlot = /* @__PURE__ */ __name((slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isFlash: slot.isFlash, + isCapacityFull: slot.isCapacityFull, + deliverySequence: slot.deliverySequence, + groupIds: slot.groupIds + }), "mapDeliverySlot"); + mapSlotProductSummary = /* @__PURE__ */ __name((product) => ({ + id: product.id, + name: product.name, + images: getStringArray2(product.images) + }), "mapSlotProductSummary"); + mapVendorSnippet = /* @__PURE__ */ __name((snippet) => ({ + id: snippet.id, + snippetCode: snippet.snippetCode, + slotId: snippet.slotId ?? null, + productIds: snippet.productIds || [], + isPermanent: snippet.isPermanent, + validTill: snippet.validTill ?? null, + createdAt: snippet.createdAt + }), "mapVendorSnippet"); + __name(getActiveSlotsWithProducts, "getActiveSlotsWithProducts"); + __name(getActiveSlots, "getActiveSlots"); + __name(getSlotsAfterDate, "getSlotsAfterDate"); + __name(getSlotByIdWithRelations, "getSlotByIdWithRelations"); + __name(createSlotWithRelations, "createSlotWithRelations"); + __name(updateSlotWithRelations, "updateSlotWithRelations"); + __name(deleteSlotById, "deleteSlotById"); + __name(getSlotDeliverySequence, "getSlotDeliverySequence"); + __name(updateSlotDeliverySequence, "updateSlotDeliverySequence"); + __name(updateSlotCapacity, "updateSlotCapacity"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/staff-user.ts +async function getStaffUserByName(name) { + const staff = await db.query.staffUsers.findFirst({ + where: eq(staffUsers.name, name) + }); + return staff || null; +} +async function getStaffUserById(staffId) { + const staff = await db.query.staffUsers.findFirst({ + where: eq(staffUsers.id, staffId) + }); + return staff || null; +} +async function getAllStaff() { + const staff = await db.query.staffUsers.findMany({ + columns: { + id: true, + name: true + }, + with: { + role: { + with: { + rolePermissions: { + with: { + permission: true + } + } + } + } + } + }); + return staff; +} +async function getAllUsers(cursor, limit = 20, search) { + let whereCondition = void 0; + if (search) { + whereCondition = or( + like(users.name, `%${search}%`), + like(users.email, `%${search}%`), + like(users.mobile, `%${search}%`) + ); + } + if (cursor) { + const cursorCondition = lt(users.id, cursor); + whereCondition = whereCondition ? and(whereCondition, cursorCondition) : cursorCondition; + } + const allUsers = await db.query.users.findMany({ + where: whereCondition, + with: { + userDetails: true + }, + orderBy: desc(users.id), + limit: limit + 1 + }); + const hasMore = allUsers.length > limit; + const usersToReturn = hasMore ? allUsers.slice(0, limit) : allUsers; + return { users: usersToReturn, hasMore }; +} +async function getUserWithDetails(userId) { + const user = await db.query.users.findFirst({ + where: eq(users.id, userId), + with: { + userDetails: true, + orders: { + orderBy: desc(orders.createdAt), + limit: 1 + } + } + }); + return user || null; +} +async function updateUserSuspensionStatus(userId, isSuspended) { + await db.insert(userDetails).values({ userId, isSuspended }).onConflictDoUpdate({ + target: userDetails.userId, + set: { isSuspended } + }); +} +async function checkStaffUserExists(name) { + const existingUser = await db.query.staffUsers.findFirst({ + where: eq(staffUsers.name, name) + }); + return !!existingUser; +} +async function checkStaffRoleExists(roleId) { + const role = await db.query.staffRoles.findFirst({ + where: eq(staffRoles.id, roleId) + }); + return !!role; +} +async function createStaffUser(name, password, roleId) { + const [newUser] = await db.insert(staffUsers).values({ + name: name.trim(), + password, + staffRoleId: roleId + }).returning(); + return { + id: newUser.id, + name: newUser.name, + password: newUser.password, + staffRoleId: newUser.staffRoleId, + createdAt: newUser.createdAt + }; +} +async function getAllRoles() { + const roles = await db.query.staffRoles.findMany({ + columns: { + id: true, + roleName: true + } + }); + return roles; +} +var init_staff_user = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/staff-user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getStaffUserByName, "getStaffUserByName"); + __name(getStaffUserById, "getStaffUserById"); + __name(getAllStaff, "getAllStaff"); + __name(getAllUsers, "getAllUsers"); + __name(getUserWithDetails, "getUserWithDetails"); + __name(updateUserSuspensionStatus, "updateUserSuspensionStatus"); + __name(checkStaffUserExists, "checkStaffUserExists"); + __name(checkStaffRoleExists, "checkStaffRoleExists"); + __name(createStaffUser, "createStaffUser"); + __name(getAllRoles, "getAllRoles"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/store.ts +async function getAllStores() { + const stores = await db.query.storeInfo.findMany({ + with: { + owner: true + } + }); + return stores; +} +async function getStoreById(id) { + const store = await db.query.storeInfo.findFirst({ + where: eq(storeInfo.id, id), + with: { + owner: true + } + }); + return store || null; +} +async function createStore(input, products) { + const [newStore] = await db.insert(storeInfo).values({ + name: input.name, + description: input.description, + imageUrl: input.imageUrl, + owner: input.owner + }).returning(); + if (products && products.length > 0) { + await db.update(productInfo).set({ storeId: newStore.id }).where(inArray(productInfo.id, products)); + } + return { + id: newStore.id, + name: newStore.name, + description: newStore.description, + imageUrl: newStore.imageUrl, + owner: newStore.owner, + createdAt: newStore.createdAt + // updatedAt: newStore.updatedAt, + }; +} +async function updateStore(id, input, products) { + const [updatedStore] = await db.update(storeInfo).set({ + ...input + // updatedAt: new Date(), + }).where(eq(storeInfo.id, id)).returning(); + if (!updatedStore) { + throw new Error("Store not found"); + } + if (products !== void 0) { + await db.update(productInfo).set({ storeId: null }).where(eq(productInfo.storeId, id)); + if (products.length > 0) { + await db.update(productInfo).set({ storeId: id }).where(inArray(productInfo.id, products)); + } + } + return { + id: updatedStore.id, + name: updatedStore.name, + description: updatedStore.description, + imageUrl: updatedStore.imageUrl, + owner: updatedStore.owner, + createdAt: updatedStore.createdAt + // updatedAt: updatedStore.updatedAt, + }; +} +async function deleteStore(id) { + return await db.transaction(async (tx) => { + await tx.update(productInfo).set({ storeId: null }).where(eq(productInfo.storeId, id)); + const [deletedStore] = await tx.delete(storeInfo).where(eq(storeInfo.id, id)).returning(); + if (!deletedStore) { + throw new Error("Store not found"); + } + return { + message: "Store deleted successfully" + }; + }); +} +var init_store = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getAllStores, "getAllStores"); + __name(getStoreById, "getStoreById"); + __name(createStore, "createStore"); + __name(updateStore, "updateStore"); + __name(deleteStore, "deleteStore"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/user.ts +async function createUserByMobile(mobile) { + const [newUser] = await db.insert(users).values({ + name: null, + email: null, + mobile + }).returning(); + return newUser; +} +async function getUserByMobile(mobile) { + const [existingUser] = await db.select().from(users).where(eq(users.mobile, mobile)).limit(1); + return existingUser || null; +} +async function getUnresolvedComplaintsCount() { + const result = await db.select({ count: count3(complaints.id) }).from(complaints).where(eq(complaints.isResolved, false)); + return result[0]?.count || 0; +} +async function getAllUsersWithFilters(limit, cursor, search) { + const whereConditions = []; + if (search && search.trim()) { + whereConditions.push(sql`${users.mobile} LIKE ${`%${search.trim()}%`}`); + } + if (cursor) { + whereConditions.push(sql`${users.id} > ${cursor}`); + } + const usersList = await db.select({ + id: users.id, + name: users.name, + mobile: users.mobile, + createdAt: users.createdAt + }).from(users).where(whereConditions.length > 0 ? sql.join(whereConditions, sql` AND `) : void 0).orderBy(asc(users.id)).limit(limit + 1); + const hasMore = usersList.length > limit; + const usersToReturn = hasMore ? usersList.slice(0, limit) : usersList; + return { users: usersToReturn, hasMore }; +} +async function getOrderCountsByUserIds(userIds) { + if (userIds.length === 0) + return []; + return await db.select({ + userId: orders.userId, + totalOrders: count3(orders.id) + }).from(orders).where(sql`${orders.userId} IN (${sql.join(userIds, sql`, `)})`).groupBy(orders.userId); +} +async function getLastOrdersByUserIds(userIds) { + if (userIds.length === 0) + return []; + return await db.select({ + userId: orders.userId, + lastOrderDate: max(orders.createdAt) + }).from(orders).where(sql`${orders.userId} IN (${sql.join(userIds, sql`, `)})`).groupBy(orders.userId); +} +async function getSuspensionStatusesByUserIds(userIds) { + if (userIds.length === 0) + return []; + return await db.select({ + userId: userDetails.userId, + isSuspended: userDetails.isSuspended + }).from(userDetails).where(sql`${userDetails.userId} IN (${sql.join(userIds, sql`, `)})`); +} +async function getUserBasicInfo(userId) { + const user = await db.select({ + id: users.id, + name: users.name, + mobile: users.mobile, + createdAt: users.createdAt + }).from(users).where(eq(users.id, userId)).limit(1); + return user[0] || null; +} +async function getUserSuspensionStatus(userId) { + const userDetail = await db.select({ + isSuspended: userDetails.isSuspended + }).from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + return userDetail[0]?.isSuspended ?? false; +} +async function getUserOrders(userId) { + return await db.select({ + id: orders.id, + readableId: orders.readableId, + totalAmount: orders.totalAmount, + createdAt: orders.createdAt, + isFlashDelivery: orders.isFlashDelivery + }).from(orders).where(eq(orders.userId, userId)).orderBy(desc(orders.createdAt)); +} +async function getOrderStatusesByOrderIds(orderIds) { + if (orderIds.length === 0) + return []; + return await db.select({ + orderId: orderStatus.orderId, + isDelivered: orderStatus.isDelivered, + isCancelled: orderStatus.isCancelled + }).from(orderStatus).where(sql`${orderStatus.orderId} IN (${sql.join(orderIds, sql`, `)})`); +} +async function getItemCountsByOrderIds(orderIds) { + if (orderIds.length === 0) + return []; + return await db.select({ + orderId: orderItems.orderId, + itemCount: count3(orderItems.id) + }).from(orderItems).where(sql`${orderItems.orderId} IN (${sql.join(orderIds, sql`, `)})`).groupBy(orderItems.orderId); +} +async function upsertUserSuspension(userId, isSuspended) { + const existingDetail = await db.select({ id: userDetails.id }).from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + if (existingDetail.length > 0) { + await db.update(userDetails).set({ isSuspended }).where(eq(userDetails.userId, userId)); + } else { + await db.insert(userDetails).values({ + userId, + isSuspended + }); + } +} +async function searchUsers(search) { + if (search && search.trim()) { + return await db.select({ + id: users.id, + name: users.name, + mobile: users.mobile + }).from(users).where(sql`${users.mobile} LIKE ${`%${search.trim()}%`} OR ${users.name} LIKE ${`%${search.trim()}%`}`); + } else { + return await db.select({ + id: users.id, + name: users.name, + mobile: users.mobile + }).from(users); + } +} +async function getAllNotifCreds() { + return await db.select({ userId: notifCreds.userId, token: notifCreds.token }).from(notifCreds); +} +async function getAllUnloggedTokens() { + return await db.select({ token: unloggedUserTokens.token }).from(unloggedUserTokens); +} +async function getNotifTokensByUserIds(userIds) { + return await db.select({ token: notifCreds.token }).from(notifCreds).where(inArray(notifCreds.userId, userIds)); +} +async function getUserIncidentsWithRelations(userId) { + return await db.query.userIncidents.findMany({ + where: eq(userIncidents.userId, userId), + with: { + order: { + with: { + orderStatus: true + } + }, + addedBy: true + }, + orderBy: desc(userIncidents.dateAdded) + }); +} +async function createUserIncident(userId, orderId, adminComment, adminUserId, negativityScore) { + const [incident] = await db.insert(userIncidents).values({ + userId, + orderId, + adminComment, + addedBy: adminUserId, + negativityScore + }).returning(); + return incident; +} +var init_user = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(createUserByMobile, "createUserByMobile"); + __name(getUserByMobile, "getUserByMobile"); + __name(getUnresolvedComplaintsCount, "getUnresolvedComplaintsCount"); + __name(getAllUsersWithFilters, "getAllUsersWithFilters"); + __name(getOrderCountsByUserIds, "getOrderCountsByUserIds"); + __name(getLastOrdersByUserIds, "getLastOrdersByUserIds"); + __name(getSuspensionStatusesByUserIds, "getSuspensionStatusesByUserIds"); + __name(getUserBasicInfo, "getUserBasicInfo"); + __name(getUserSuspensionStatus, "getUserSuspensionStatus"); + __name(getUserOrders, "getUserOrders"); + __name(getOrderStatusesByOrderIds, "getOrderStatusesByOrderIds"); + __name(getItemCountsByOrderIds, "getItemCountsByOrderIds"); + __name(upsertUserSuspension, "upsertUserSuspension"); + __name(searchUsers, "searchUsers"); + __name(getAllNotifCreds, "getAllNotifCreds"); + __name(getAllUnloggedTokens, "getAllUnloggedTokens"); + __name(getNotifTokensByUserIds, "getNotifTokensByUserIds"); + __name(getUserIncidentsWithRelations, "getUserIncidentsWithRelations"); + __name(createUserIncident, "createUserIncident"); + } +}); + +// ../../packages/db_helper_sqlite/src/admin-apis/vendor-snippets.ts +async function checkVendorSnippetExists(snippetCode) { + const existingSnippet = await db.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.snippetCode, snippetCode) + }); + return !!existingSnippet; +} +async function getVendorSnippetById(id) { + const snippet = await db.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.id, id), + with: { + slot: true + } + }); + if (!snippet) { + return null; + } + return { + ...mapVendorSnippet2(snippet), + slot: snippet.slot ? mapDeliverySlot2(snippet.slot) : null + }; +} +async function getVendorSnippetByCode(snippetCode) { + const snippet = await db.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.snippetCode, snippetCode) + }); + return snippet ? mapVendorSnippet2(snippet) : null; +} +async function getAllVendorSnippets() { + const snippets = await db.query.vendorSnippets.findMany({ + with: { + slot: true + }, + orderBy: desc(vendorSnippets.createdAt) + }); + return snippets.map((snippet) => ({ + ...mapVendorSnippet2(snippet), + slot: snippet.slot ? mapDeliverySlot2(snippet.slot) : null + })); +} +async function createVendorSnippet(input) { + const [result] = await db.insert(vendorSnippets).values({ + snippetCode: input.snippetCode, + slotId: input.slotId, + productIds: input.productIds, + isPermanent: input.isPermanent, + validTill: input.validTill + }).returning(); + return mapVendorSnippet2(result); +} +async function updateVendorSnippet(id, updates) { + const [result] = await db.update(vendorSnippets).set(updates).where(eq(vendorSnippets.id, id)).returning(); + return result ? mapVendorSnippet2(result) : null; +} +async function deleteVendorSnippet(id) { + const [result] = await db.delete(vendorSnippets).where(eq(vendorSnippets.id, id)).returning(); + return result ? mapVendorSnippet2(result) : null; +} +async function getProductsByIds(productIds) { + const products = await db.query.productInfo.findMany({ + where: inArray(productInfo.id, productIds), + columns: { id: true, name: true } + }); + const prods = products.map(mapProductSummary); + return prods; +} +async function getVendorSlotById(slotId) { + const slot = await db.query.deliverySlotInfo.findFirst({ + where: eq(deliverySlotInfo.id, slotId) + }); + return slot ? mapDeliverySlot2(slot) : null; +} +async function getVendorOrdersBySlotId(slotId) { + return await db.query.orders.findMany({ + where: eq(orders.slotId, slotId), + with: { + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + }, + orderStatus: true, + user: true, + slot: true + }, + orderBy: desc(orders.createdAt) + }); +} +async function getVendorOrders() { + return await db.query.orders.findMany({ + with: { + user: true, + orderItems: { + with: { + product: { + with: { + unit: true + } + } + } + } + }, + orderBy: desc(orders.createdAt) + }); +} +async function getOrderItemsByOrderIds(orderIds) { + return await db.query.orderItems.findMany({ + where: inArray(orderItems.orderId, orderIds), + with: { + product: { + with: { + unit: true + } + } + } + }); +} +async function getOrderStatusByOrderIds(orderIds) { + return await db.query.orderStatus.findMany({ + where: inArray(orderStatus.orderId, orderIds) + }); +} +async function updateVendorOrderItemPackaging(orderItemId, isPackaged) { + const orderItem = await db.query.orderItems.findFirst({ + where: eq(orderItems.id, orderItemId), + with: { + order: { + with: { + slot: true + } + } + } + }); + if (!orderItem) { + return { success: false, message: "Order item not found" }; + } + if (!orderItem.order.slotId) { + return { success: false, message: "Order item not associated with a vendor slot" }; + } + const snippetExists = await db.query.vendorSnippets.findFirst({ + where: eq(vendorSnippets.slotId, orderItem.order.slotId) + }); + if (!snippetExists) { + return { success: false, message: "No vendor snippet found for this order's slot" }; + } + const [updatedItem] = await db.update(orderItems).set({ + is_packaged: isPackaged + }).where(eq(orderItems.id, orderItemId)).returning({ id: orderItems.id }); + if (!updatedItem) { + return { success: false, message: "Failed to update packaging status" }; + } + return { success: true, orderItemId, is_packaged: isPackaged }; +} +var mapVendorSnippet2, mapDeliverySlot2, mapProductSummary; +var init_vendor_snippets = __esm({ + "../../packages/db_helper_sqlite/src/admin-apis/vendor-snippets.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + mapVendorSnippet2 = /* @__PURE__ */ __name((snippet) => ({ + id: snippet.id, + snippetCode: snippet.snippetCode, + slotId: snippet.slotId ?? null, + productIds: snippet.productIds || [], + isPermanent: snippet.isPermanent, + validTill: snippet.validTill ?? null, + createdAt: snippet.createdAt + }), "mapVendorSnippet"); + mapDeliverySlot2 = /* @__PURE__ */ __name((slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isFlash: slot.isFlash, + isCapacityFull: slot.isCapacityFull, + deliverySequence: slot.deliverySequence, + groupIds: slot.groupIds + }), "mapDeliverySlot"); + mapProductSummary = /* @__PURE__ */ __name((product) => ({ + id: product.id, + name: product.name + }), "mapProductSummary"); + __name(checkVendorSnippetExists, "checkVendorSnippetExists"); + __name(getVendorSnippetById, "getVendorSnippetById"); + __name(getVendorSnippetByCode, "getVendorSnippetByCode"); + __name(getAllVendorSnippets, "getAllVendorSnippets"); + __name(createVendorSnippet, "createVendorSnippet"); + __name(updateVendorSnippet, "updateVendorSnippet"); + __name(deleteVendorSnippet, "deleteVendorSnippet"); + __name(getProductsByIds, "getProductsByIds"); + __name(getVendorSlotById, "getVendorSlotById"); + __name(getVendorOrdersBySlotId, "getVendorOrdersBySlotId"); + __name(getVendorOrders, "getVendorOrders"); + __name(getOrderItemsByOrderIds, "getOrderItemsByOrderIds"); + __name(getOrderStatusByOrderIds, "getOrderStatusByOrderIds"); + __name(updateVendorOrderItemPackaging, "updateVendorOrderItemPackaging"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/address.ts +async function getDefaultAddress(userId) { + const [defaultAddress] = await db.select().from(addresses).where(and(eq(addresses.userId, userId), eq(addresses.isDefault, true))).limit(1); + return defaultAddress ? mapUserAddress(defaultAddress) : null; +} +async function getUserAddresses(userId) { + const userAddresses = await db.select().from(addresses).where(eq(addresses.userId, userId)); + return userAddresses.map(mapUserAddress); +} +async function getUserAddressById(userId, addressId) { + const [address] = await db.select().from(addresses).where(and(eq(addresses.id, addressId), eq(addresses.userId, userId))).limit(1); + return address ? mapUserAddress(address) : null; +} +async function clearDefaultAddress(userId) { + await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId)); +} +async function createUserAddress(input) { + const [newAddress] = await db.insert(addresses).values({ + userId: input.userId, + name: input.name, + phone: input.phone, + addressLine1: input.addressLine1, + addressLine2: input.addressLine2, + city: input.city, + state: input.state, + pincode: input.pincode, + isDefault: input.isDefault, + latitude: input.latitude, + longitude: input.longitude, + googleMapsUrl: input.googleMapsUrl + }).returning(); + return mapUserAddress(newAddress); +} +async function updateUserAddress(input) { + const [updatedAddress] = await db.update(addresses).set({ + name: input.name, + phone: input.phone, + addressLine1: input.addressLine1, + addressLine2: input.addressLine2, + city: input.city, + state: input.state, + pincode: input.pincode, + isDefault: input.isDefault, + googleMapsUrl: input.googleMapsUrl, + latitude: input.latitude, + longitude: input.longitude + }).where(and(eq(addresses.id, input.addressId), eq(addresses.userId, input.userId))).returning(); + return updatedAddress ? mapUserAddress(updatedAddress) : null; +} +async function deleteUserAddress(userId, addressId) { + const [deleted] = await db.delete(addresses).where(and(eq(addresses.id, addressId), eq(addresses.userId, userId))).returning({ id: addresses.id }); + return !!deleted; +} +async function hasOngoingOrdersForAddress(addressId) { + const ongoingOrders = await db.select({ + orderId: orders.id + }).from(orders).innerJoin(orderStatus, eq(orders.id, orderStatus.orderId)).innerJoin(deliverySlotInfo, eq(orders.slotId, deliverySlotInfo.id)).where(and( + eq(orders.addressId, addressId), + eq(orderStatus.isCancelled, false), + gte(deliverySlotInfo.deliveryTime, /* @__PURE__ */ new Date()) + )).limit(1); + return ongoingOrders.length > 0; +} +var mapUserAddress; +var init_address = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/address.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + mapUserAddress = /* @__PURE__ */ __name((address) => ({ + id: address.id, + userId: address.userId, + name: address.name, + phone: address.phone, + addressLine1: address.addressLine1, + addressLine2: address.addressLine2 ?? null, + city: address.city, + state: address.state, + pincode: address.pincode, + isDefault: address.isDefault, + latitude: address.latitude ?? null, + longitude: address.longitude ?? null, + googleMapsUrl: address.googleMapsUrl ?? null, + adminLatitude: address.adminLatitude ?? null, + adminLongitude: address.adminLongitude ?? null, + zoneId: address.zoneId ?? null, + createdAt: address.createdAt + }), "mapUserAddress"); + __name(getDefaultAddress, "getDefaultAddress"); + __name(getUserAddresses, "getUserAddresses"); + __name(getUserAddressById, "getUserAddressById"); + __name(clearDefaultAddress, "clearDefaultAddress"); + __name(createUserAddress, "createUserAddress"); + __name(updateUserAddress, "updateUserAddress"); + __name(deleteUserAddress, "deleteUserAddress"); + __name(hasOngoingOrdersForAddress, "hasOngoingOrdersForAddress"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/banners.ts +async function getActiveBanners() { + const banners = await db.query.homeBanners.findMany({ + where: isNotNull(homeBanners.serialNum), + orderBy: asc(homeBanners.serialNum) + }); + return banners.map(mapBanner); +} +var mapBanner; +var init_banners = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/banners.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + mapBanner = /* @__PURE__ */ __name((banner) => ({ + id: banner.id, + name: banner.name, + imageUrl: banner.imageUrl, + description: banner.description ?? null, + productIds: banner.productIds ?? null, + redirectUrl: banner.redirectUrl ?? null, + serialNum: banner.serialNum ?? null, + isActive: banner.isActive, + createdAt: banner.createdAt, + lastUpdated: banner.lastUpdated + }), "mapBanner"); + __name(getActiveBanners, "getActiveBanners"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/cart.ts +async function getCartItemsWithProducts(userId) { + const cartItemsWithProducts = await db.select({ + cartId: cartItems.id, + productId: productInfo.id, + productName: productInfo.name, + productPrice: productInfo.price, + productImages: productInfo.images, + productQuantity: productInfo.productQuantity, + isOutOfStock: productInfo.isOutOfStock, + unitShortNotation: units.shortNotation, + quantity: cartItems.quantity, + addedAt: cartItems.addedAt + }).from(cartItems).innerJoin(productInfo, eq(cartItems.productId, productInfo.id)).innerJoin(units, eq(productInfo.unitId, units.id)).where(eq(cartItems.userId, userId)); + return cartItemsWithProducts.map((item) => { + const priceValue = item.productPrice ?? "0"; + const quantityValue = item.quantity ?? "0"; + return { + id: item.cartId, + productId: item.productId, + quantity: parseFloat(quantityValue), + addedAt: item.addedAt, + product: { + id: item.productId, + name: item.productName, + price: priceValue.toString(), + productQuantity: item.productQuantity, + unit: item.unitShortNotation, + isOutOfStock: item.isOutOfStock, + images: getStringArray3(item.productImages) + }, + subtotal: parseFloat(priceValue.toString()) * parseFloat(quantityValue) + }; + }); +} +async function getProductById2(productId) { + return db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId) + }); +} +async function getCartItemByUserProduct(userId, productId) { + return db.query.cartItems.findFirst({ + where: and(eq(cartItems.userId, userId), eq(cartItems.productId, productId)) + }); +} +async function incrementCartItemQuantity(itemId, quantity) { + await db.update(cartItems).set({ + quantity: sql`${cartItems.quantity} + ${quantity}` + }).where(eq(cartItems.id, itemId)); +} +async function insertCartItem(userId, productId, quantity) { + await db.insert(cartItems).values({ + userId, + productId, + quantity: quantity.toString() + }); +} +async function updateCartItemQuantity(userId, itemId, quantity) { + const [updatedItem] = await db.update(cartItems).set({ quantity: quantity.toString() }).where(and(eq(cartItems.id, itemId), eq(cartItems.userId, userId))).returning({ id: cartItems.id }); + return !!updatedItem; +} +async function deleteCartItem(userId, itemId) { + const [deletedItem] = await db.delete(cartItems).where(and(eq(cartItems.id, itemId), eq(cartItems.userId, userId))).returning({ id: cartItems.id }); + return !!deletedItem; +} +async function clearUserCart(userId) { + await db.delete(cartItems).where(eq(cartItems.userId, userId)); +} +var getStringArray3; +var init_cart = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/cart.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + getStringArray3 = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return []; + return value.map((item) => String(item)); + }, "getStringArray"); + __name(getCartItemsWithProducts, "getCartItemsWithProducts"); + __name(getProductById2, "getProductById"); + __name(getCartItemByUserProduct, "getCartItemByUserProduct"); + __name(incrementCartItemQuantity, "incrementCartItemQuantity"); + __name(insertCartItem, "insertCartItem"); + __name(updateCartItemQuantity, "updateCartItemQuantity"); + __name(deleteCartItem, "deleteCartItem"); + __name(clearUserCart, "clearUserCart"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/complaint.ts +async function getUserComplaints(userId) { + const userComplaints = await db.select({ + id: complaints.id, + complaintBody: complaints.complaintBody, + response: complaints.response, + isResolved: complaints.isResolved, + createdAt: complaints.createdAt, + orderId: complaints.orderId + }).from(complaints).where(eq(complaints.userId, userId)).orderBy(asc(complaints.createdAt)); + return userComplaints.map((complaint) => ({ + id: complaint.id, + complaintBody: complaint.complaintBody, + response: complaint.response ?? null, + isResolved: complaint.isResolved, + createdAt: complaint.createdAt, + orderId: complaint.orderId ?? null + })); +} +async function createComplaint(userId, orderId, complaintBody, images) { + await db.insert(complaints).values({ + userId, + orderId, + complaintBody, + images: images || null + }); +} +var init_complaint2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/complaint.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getUserComplaints, "getUserComplaints"); + __name(createComplaint, "createComplaint"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/stores.ts +async function getStoreSummaries() { + const storesData = await db.select({ + id: storeInfo.id, + name: storeInfo.name, + description: storeInfo.description, + imageUrl: storeInfo.imageUrl, + productCount: sql`count(${productInfo.id})`.as("productCount") + }).from(storeInfo).leftJoin( + productInfo, + and(eq(productInfo.storeId, storeInfo.id), eq(productInfo.isSuspended, false)) + ).groupBy(storeInfo.id); + const storesWithDetails = await Promise.all( + storesData.map(async (store) => { + const sampleProducts = await db.select({ + id: productInfo.id, + name: productInfo.name, + images: productInfo.images + }).from(productInfo).where(and(eq(productInfo.storeId, store.id), eq(productInfo.isSuspended, false))).limit(3); + return { + id: store.id, + name: store.name, + description: store.description ?? null, + imageUrl: store.imageUrl ?? null, + productCount: store.productCount || 0, + sampleProducts: sampleProducts.map((product) => ({ + id: product.id, + name: product.name, + images: getStringArray4(product.images) + })) + }; + }) + ); + return storesWithDetails; +} +async function getStoreDetail(storeId) { + const storeData = await db.query.storeInfo.findFirst({ + where: eq(storeInfo.id, storeId), + columns: { + id: true, + name: true, + description: true, + imageUrl: true + } + }); + if (!storeData) { + return null; + } + const productsData = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + price: productInfo.price, + marketPrice: productInfo.marketPrice, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + incrementStep: productInfo.incrementStep, + unitShortNotation: units.shortNotation, + productQuantity: productInfo.productQuantity + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)).where(and(eq(productInfo.storeId, storeId), eq(productInfo.isSuspended, false))); + const products = productsData.map((product) => ({ + id: product.id, + name: product.name, + shortDescription: product.shortDescription ?? null, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null, + incrementStep: product.incrementStep, + unit: product.unitShortNotation, + unitNotation: product.unitShortNotation, + images: getStringArray4(product.images), + isOutOfStock: product.isOutOfStock, + productQuantity: product.productQuantity + })); + return { + store: { + id: storeData.id, + name: storeData.name, + description: storeData.description ?? null, + imageUrl: storeData.imageUrl ?? null + }, + products + }; +} +async function getStoresSummary() { + return db.query.storeInfo.findMany({ + columns: { + id: true, + name: true, + description: true + } + }); +} +var getStringArray4; +var init_stores = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/stores.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + getStringArray4 = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return null; + return value.map((item) => String(item)); + }, "getStringArray"); + __name(getStoreSummaries, "getStoreSummaries"); + __name(getStoreDetail, "getStoreDetail"); + __name(getStoresSummary, "getStoresSummary"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/product.ts +async function getProductDetailById(productId) { + const productData = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + longDescription: productInfo.longDescription, + price: productInfo.price, + marketPrice: productInfo.marketPrice, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + storeId: productInfo.storeId, + unitShortNotation: units.shortNotation, + incrementStep: productInfo.incrementStep, + productQuantity: productInfo.productQuantity, + isFlashAvailable: productInfo.isFlashAvailable, + flashPrice: productInfo.flashPrice + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)).where(eq(productInfo.id, productId)).limit(1); + if (productData.length === 0) { + return null; + } + const product = productData[0]; + const storeData = product.storeId ? await db.query.storeInfo.findFirst({ + where: eq(storeInfo.id, product.storeId), + columns: { id: true, name: true, description: true } + }) : null; + const deliverySlotsData = await db.select({ + id: deliverySlotInfo.id, + deliveryTime: deliverySlotInfo.deliveryTime, + freezeTime: deliverySlotInfo.freezeTime + }).from(productSlots).innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id)).where( + and( + eq(productSlots.productId, productId), + eq(deliverySlotInfo.isActive, true), + eq(deliverySlotInfo.isCapacityFull, false), + gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`), + gt(deliverySlotInfo.freezeTime, sql`CURRENT_TIMESTAMP`) + ) + ).orderBy(deliverySlotInfo.deliveryTime); + const specialDealsData = await db.select({ + quantity: specialDeals.quantity, + price: specialDeals.price, + validTill: specialDeals.validTill + }).from(specialDeals).where( + and( + eq(specialDeals.productId, productId), + gt(specialDeals.validTill, sql`CURRENT_TIMESTAMP`) + ) + ).orderBy(specialDeals.quantity); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription ?? null, + longDescription: product.longDescription ?? null, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null, + unitNotation: product.unitShortNotation, + images: getStringArray5(product.images), + isOutOfStock: product.isOutOfStock, + store: storeData ? { + id: storeData.id, + name: storeData.name, + description: storeData.description ?? null + } : null, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + isFlashAvailable: product.isFlashAvailable, + flashPrice: product.flashPrice?.toString() || null, + deliverySlots: deliverySlotsData, + specialDeals: specialDealsData.map((deal) => ({ + quantity: String(deal.quantity ?? "0"), + price: String(deal.price ?? "0"), + validTill: deal.validTill + })) + }; +} +async function getProductReviews2(productId, limit, offset) { + const reviews = await db.select({ + id: productReviews.id, + reviewBody: productReviews.reviewBody, + ratings: productReviews.ratings, + imageUrls: productReviews.imageUrls, + reviewTime: productReviews.reviewTime, + userName: users.name + }).from(productReviews).innerJoin(users, eq(productReviews.userId, users.id)).where(eq(productReviews.productId, productId)).orderBy(desc(productReviews.reviewTime)).limit(limit).offset(offset); + const totalCountResult = await db.select({ count: sql`count(*)` }).from(productReviews).where(eq(productReviews.productId, productId)); + const totalCount = Number(totalCountResult[0].count); + const mappedReviews = reviews.map((review) => ({ + id: review.id, + reviewBody: review.reviewBody, + ratings: review.ratings, + imageUrls: getStringArray5(review.imageUrls), + reviewTime: review.reviewTime, + userName: review.userName ?? null + })); + return { + reviews: mappedReviews, + totalCount + }; +} +async function getProductById3(productId) { + return db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId) + }); +} +async function createProductReview(userId, productId, reviewBody, ratings, imageUrls) { + const [newReview] = await db.insert(productReviews).values({ + userId, + productId, + reviewBody, + ratings, + imageUrls + }).returning({ + id: productReviews.id, + reviewBody: productReviews.reviewBody, + ratings: productReviews.ratings, + imageUrls: productReviews.imageUrls, + reviewTime: productReviews.reviewTime + }); + return { + id: newReview.id, + reviewBody: newReview.reviewBody, + ratings: newReview.ratings, + imageUrls: getStringArray5(newReview.imageUrls), + reviewTime: newReview.reviewTime, + userName: null + }; +} +async function getAllProductsWithUnits(tagId) { + let productIds = null; + if (tagId) { + const taggedProducts = await db.select({ productId: productTags.productId }).from(productTags).where(eq(productTags.tagId, tagId)); + productIds = taggedProducts.map((tp) => tp.productId); + } + let whereCondition = void 0; + if (productIds && productIds.length > 0) { + whereCondition = inArray(productInfo.id, productIds); + } + const results = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + price: productInfo.price, + marketPrice: productInfo.marketPrice, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + unitShortNotation: units.shortNotation, + productQuantity: productInfo.productQuantity + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)).where(whereCondition); + return results.map((product) => ({ + ...product, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null + })); +} +async function getSuspendedProductIds() { + const suspendedProducts = await db.select({ id: productInfo.id }).from(productInfo).where(eq(productInfo.isSuspended, true)); + return suspendedProducts.map((sp) => sp.id); +} +async function getNextDeliveryDateWithCapacity(productId) { + const result = await db.select({ deliveryTime: deliverySlotInfo.deliveryTime }).from(productSlots).innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id)).where( + and( + eq(productSlots.productId, productId), + eq(deliverySlotInfo.isActive, true), + eq(deliverySlotInfo.isCapacityFull, false), + gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`) + ) + ).orderBy(deliverySlotInfo.deliveryTime).limit(1); + return result[0]?.deliveryTime || null; +} +var getStringArray5; +var init_product2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/product.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + getStringArray5 = /* @__PURE__ */ __name((value) => { + if (!Array.isArray(value)) + return null; + return value.map((item) => String(item)); + }, "getStringArray"); + __name(getProductDetailById, "getProductDetailById"); + __name(getProductReviews2, "getProductReviews"); + __name(getProductById3, "getProductById"); + __name(createProductReview, "createProductReview"); + __name(getAllProductsWithUnits, "getAllProductsWithUnits"); + __name(getSuspendedProductIds, "getSuspendedProductIds"); + __name(getNextDeliveryDateWithCapacity, "getNextDeliveryDateWithCapacity"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/slots.ts +async function getActiveSlotsList() { + const slots = await db.query.deliverySlotInfo.findMany({ + where: eq(deliverySlotInfo.isActive, true), + orderBy: asc(deliverySlotInfo.deliveryTime) + }); + return slots.map(mapSlot); +} +async function getProductAvailability() { + const products = await db.select({ + id: productInfo.id, + name: productInfo.name, + isOutOfStock: productInfo.isOutOfStock, + isFlashAvailable: productInfo.isFlashAvailable + }).from(productInfo).where(eq(productInfo.isSuspended, false)); + return products.map((product) => ({ + id: product.id, + name: product.name, + isOutOfStock: product.isOutOfStock, + isFlashAvailable: product.isFlashAvailable + })); +} +var mapSlot; +var init_slots2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/slots.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + mapSlot = /* @__PURE__ */ __name((slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isFlash: slot.isFlash, + isCapacityFull: slot.isCapacityFull, + deliverySequence: slot.deliverySequence, + groupIds: slot.groupIds + }), "mapSlot"); + __name(getActiveSlotsList, "getActiveSlotsList"); + __name(getProductAvailability, "getProductAvailability"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/payments.ts +async function getOrderById(orderId) { + return db.query.orders.findFirst({ + where: eq(orders.id, orderId) + }); +} +async function getPaymentByOrderId(orderId) { + return db.query.payments.findFirst({ + where: eq(payments.orderId, orderId) + }); +} +async function getPaymentByMerchantOrderId(merchantOrderId) { + return db.query.payments.findFirst({ + where: eq(payments.merchantOrderId, merchantOrderId) + }); +} +async function updatePaymentSuccess(merchantOrderId, payload) { + const [updatedPayment] = await db.update(payments).set({ + status: "success", + payload + }).where(eq(payments.merchantOrderId, merchantOrderId)).returning({ + id: payments.id, + orderId: payments.orderId + }); + return updatedPayment || null; +} +async function updateOrderPaymentStatus(orderId, status) { + await db.update(orderStatus).set({ paymentStatus: status }).where(eq(orderStatus.orderId, orderId)); +} +async function markPaymentFailed(paymentId) { + await db.update(payments).set({ status: "failed" }).where(eq(payments.id, paymentId)); +} +var init_payments = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/payments.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getOrderById, "getOrderById"); + __name(getPaymentByOrderId, "getPaymentByOrderId"); + __name(getPaymentByMerchantOrderId, "getPaymentByMerchantOrderId"); + __name(updatePaymentSuccess, "updatePaymentSuccess"); + __name(updateOrderPaymentStatus, "updateOrderPaymentStatus"); + __name(markPaymentFailed, "markPaymentFailed"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/auth.ts +async function getUserByEmail(email3) { + const [user] = await db.select().from(users).where(eq(users.email, email3)).limit(1); + return user || null; +} +async function getUserByMobile2(mobile) { + const [user] = await db.select().from(users).where(eq(users.mobile, mobile)).limit(1); + return user || null; +} +async function getUserById(userId) { + const [user] = await db.select().from(users).where(eq(users.id, userId)).limit(1); + return user || null; +} +async function getUserCreds(userId) { + const [creds] = await db.select().from(userCreds).where(eq(userCreds.userId, userId)).limit(1); + return creds || null; +} +async function getUserDetails(userId) { + const [details] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + return details || null; +} +async function isUserSuspended(userId) { + const details = await getUserDetails(userId); + return details?.isSuspended ?? false; +} +async function createUserWithProfile(input) { + return db.transaction(async (tx) => { + const [user] = await tx.insert(users).values({ + name: input.name, + email: input.email, + mobile: input.mobile + }).returning(); + await tx.insert(userCreds).values({ + userId: user.id, + userPassword: input.hashedPassword + }); + await tx.insert(userDetails).values({ + userId: user.id, + profileImage: input.profileImage || null + }); + return user; + }); +} +async function getUserDetailsByUserId(userId) { + const [details] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + return details || null; +} +async function updateUserProfile(userId, data) { + return db.transaction(async (tx) => { + const userUpdate = {}; + if (data.name !== void 0) + userUpdate.name = data.name; + if (data.email !== void 0) + userUpdate.email = data.email; + if (data.mobile !== void 0) + userUpdate.mobile = data.mobile; + if (Object.keys(userUpdate).length > 0) { + await tx.update(users).set(userUpdate).where(eq(users.id, userId)); + } + if (data.hashedPassword) { + await tx.update(userCreds).set({ + userPassword: data.hashedPassword + }).where(eq(userCreds.userId, userId)); + } + const detailsUpdate = {}; + if (data.bio !== void 0) + detailsUpdate.bio = data.bio; + if (data.dateOfBirth !== void 0) + detailsUpdate.dateOfBirth = data.dateOfBirth; + if (data.gender !== void 0) + detailsUpdate.gender = data.gender; + if (data.occupation !== void 0) + detailsUpdate.occupation = data.occupation; + if (data.profileImage !== void 0) + detailsUpdate.profileImage = data.profileImage; + detailsUpdate.updatedAt = /* @__PURE__ */ new Date(); + const [existingDetails] = await tx.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + if (existingDetails) { + await tx.update(userDetails).set(detailsUpdate).where(eq(userDetails.userId, userId)); + } else { + await tx.insert(userDetails).values({ + userId, + ...detailsUpdate, + createdAt: /* @__PURE__ */ new Date() + }); + } + const [user] = await tx.select().from(users).where(eq(users.id, userId)).limit(1); + return user; + }); +} +async function createUserWithCreds(input) { + return db.transaction(async (tx) => { + const [user] = await tx.insert(users).values({ + name: input.name, + email: input.email, + mobile: input.mobile + }).returning(); + await tx.insert(userCreds).values({ + userId: user.id, + userPassword: input.hashedPassword + }); + return user; + }); +} +async function createUserWithMobile(mobile) { + const [user] = await db.insert(users).values({ + name: null, + email: null, + mobile + }).returning(); + return user; +} +async function upsertUserPassword(userId, hashedPassword) { + try { + await db.insert(userCreds).values({ + userId, + userPassword: hashedPassword + }); + return; + } catch (error50) { + if (error50.code === "23505") { + await db.update(userCreds).set({ + userPassword: hashedPassword + }).where(eq(userCreds.userId, userId)); + return; + } + throw error50; + } +} +async function deleteUserAccount(userId) { + await db.transaction(async (tx) => { + await tx.delete(notifCreds).where(eq(notifCreds.userId, userId)); + await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.userId, userId)); + await tx.delete(couponUsage).where(eq(couponUsage.userId, userId)); + await tx.delete(complaints).where(eq(complaints.userId, userId)); + await tx.delete(cartItems).where(eq(cartItems.userId, userId)); + await tx.delete(notifications).where(eq(notifications.userId, userId)); + await tx.delete(productReviews).where(eq(productReviews.userId, userId)); + await tx.update(reservedCoupons).set({ redeemedBy: null }).where(eq(reservedCoupons.redeemedBy, userId)); + const userOrders = await tx.select({ id: orders.id }).from(orders).where(eq(orders.userId, userId)); + for (const order of userOrders) { + await tx.delete(orderItems).where(eq(orderItems.orderId, order.id)); + await tx.delete(orderStatus).where(eq(orderStatus.orderId, order.id)); + await tx.delete(payments).where(eq(payments.orderId, order.id)); + await tx.delete(refunds).where(eq(refunds.orderId, order.id)); + await tx.delete(couponUsage).where(eq(couponUsage.orderId, order.id)); + await tx.delete(complaints).where(eq(complaints.orderId, order.id)); + } + await tx.delete(orders).where(eq(orders.userId, userId)); + await tx.delete(addresses).where(eq(addresses.userId, userId)); + await tx.delete(userDetails).where(eq(userDetails.userId, userId)); + await tx.delete(userCreds).where(eq(userCreds.userId, userId)); + await tx.delete(users).where(eq(users.id, userId)); + }); +} +var init_auth = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/auth.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getUserByEmail, "getUserByEmail"); + __name(getUserByMobile2, "getUserByMobile"); + __name(getUserById, "getUserById"); + __name(getUserCreds, "getUserCreds"); + __name(getUserDetails, "getUserDetails"); + __name(isUserSuspended, "isUserSuspended"); + __name(createUserWithProfile, "createUserWithProfile"); + __name(getUserDetailsByUserId, "getUserDetailsByUserId"); + __name(updateUserProfile, "updateUserProfile"); + __name(createUserWithCreds, "createUserWithCreds"); + __name(createUserWithMobile, "createUserWithMobile"); + __name(upsertUserPassword, "upsertUserPassword"); + __name(deleteUserAccount, "deleteUserAccount"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/coupon.ts +async function getActiveCouponsWithRelations(userId) { + const allCoupons = await db.query.coupons.findMany({ + where: and( + eq(coupons.isInvalidated, false), + or( + isNull(coupons.validTill), + gt(coupons.validTill, /* @__PURE__ */ new Date()) + ) + ), + with: { + usages: { + where: eq(couponUsage.userId, userId) + }, + applicableUsers: true, + applicableProducts: true + } + }); + return allCoupons.map(mapCouponWithRelations); +} +async function getAllCouponsWithRelations(userId) { + const allCoupons = await db.query.coupons.findMany({ + with: { + usages: { + where: eq(couponUsage.userId, userId) + }, + applicableUsers: true, + applicableProducts: true + } + }); + return allCoupons.map(mapCouponWithRelations); +} +async function getReservedCouponByCode(secretCode) { + const reserved = await db.query.reservedCoupons.findFirst({ + where: and( + eq(reservedCoupons.secretCode, secretCode.toUpperCase()), + eq(reservedCoupons.isRedeemed, false) + ) + }); + return reserved || null; +} +async function redeemReservedCoupon(userId, reservedCoupon) { + const couponResult = await db.transaction(async (tx) => { + const [coupon] = await tx.insert(coupons).values({ + couponCode: reservedCoupon.couponCode, + isUserBased: true, + discountPercent: reservedCoupon.discountPercent, + flatDiscount: reservedCoupon.flatDiscount, + minOrder: reservedCoupon.minOrder, + productIds: reservedCoupon.productIds, + maxValue: reservedCoupon.maxValue, + isApplyForAll: false, + validTill: reservedCoupon.validTill, + maxLimitForUser: reservedCoupon.maxLimitForUser, + exclusiveApply: reservedCoupon.exclusiveApply, + createdBy: reservedCoupon.createdBy + }).returning(); + await tx.insert(couponApplicableUsers).values({ + couponId: coupon.id, + userId + }); + await tx.update(reservedCoupons).set({ + isRedeemed: true, + redeemedBy: userId, + redeemedAt: /* @__PURE__ */ new Date() + }).where(eq(reservedCoupons.id, reservedCoupon.id)); + return coupon; + }); + return mapCoupon(couponResult); +} +var mapCoupon, mapUsage, mapApplicableUser, mapApplicableProduct, mapCouponWithRelations; +var init_coupon2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/coupon.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + mapCoupon = /* @__PURE__ */ __name((coupon) => ({ + id: coupon.id, + couponCode: coupon.couponCode, + isUserBased: coupon.isUserBased, + discountPercent: coupon.discountPercent ? coupon.discountPercent.toString() : null, + flatDiscount: coupon.flatDiscount ? coupon.flatDiscount.toString() : null, + minOrder: coupon.minOrder ? coupon.minOrder.toString() : null, + productIds: coupon.productIds, + maxValue: coupon.maxValue ? coupon.maxValue.toString() : null, + isApplyForAll: coupon.isApplyForAll, + validTill: coupon.validTill ?? null, + maxLimitForUser: coupon.maxLimitForUser ?? null, + isInvalidated: coupon.isInvalidated, + exclusiveApply: coupon.exclusiveApply, + createdAt: coupon.createdAt + }), "mapCoupon"); + mapUsage = /* @__PURE__ */ __name((usage) => ({ + id: usage.id, + userId: usage.userId, + couponId: usage.couponId, + orderId: usage.orderId ?? null, + orderItemId: usage.orderItemId ?? null, + usedAt: usage.usedAt + }), "mapUsage"); + mapApplicableUser = /* @__PURE__ */ __name((applicable) => ({ + id: applicable.id, + couponId: applicable.couponId, + userId: applicable.userId + }), "mapApplicableUser"); + mapApplicableProduct = /* @__PURE__ */ __name((applicable) => ({ + id: applicable.id, + couponId: applicable.couponId, + productId: applicable.productId + }), "mapApplicableProduct"); + mapCouponWithRelations = /* @__PURE__ */ __name((coupon) => ({ + ...mapCoupon(coupon), + usages: coupon.usages.map(mapUsage), + applicableUsers: coupon.applicableUsers.map(mapApplicableUser), + applicableProducts: coupon.applicableProducts.map(mapApplicableProduct) + }), "mapCouponWithRelations"); + __name(getActiveCouponsWithRelations, "getActiveCouponsWithRelations"); + __name(getAllCouponsWithRelations, "getAllCouponsWithRelations"); + __name(getReservedCouponByCode, "getReservedCouponByCode"); + __name(redeemReservedCoupon, "redeemReservedCoupon"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/user.ts +async function getUserById2(userId) { + const [user] = await db.select().from(users).where(eq(users.id, userId)).limit(1); + return user || null; +} +async function getUserDetailByUserId(userId) { + const [detail] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1); + return detail || null; +} +async function getUserWithCreds(userId) { + const result = await db.select().from(users).leftJoin(userCreds, eq(users.id, userCreds.userId)).where(eq(users.id, userId)).limit(1); + if (result.length === 0) + return null; + return { + user: result[0].users, + creds: result[0].user_creds + }; +} +async function getNotifCred(userId, token) { + return db.query.notifCreds.findFirst({ + where: and(eq(notifCreds.userId, userId), eq(notifCreds.token, token)) + }); +} +async function upsertNotifCred(userId, token) { + const existing = await getNotifCred(userId, token); + if (existing) { + await db.update(notifCreds).set({ lastVerified: /* @__PURE__ */ new Date() }).where(eq(notifCreds.id, existing.id)); + return; + } + await db.insert(notifCreds).values({ + userId, + token, + lastVerified: /* @__PURE__ */ new Date() + }); +} +async function deleteUnloggedToken(token) { + await db.delete(unloggedUserTokens).where(eq(unloggedUserTokens.token, token)); +} +async function getUnloggedToken(token) { + return db.query.unloggedUserTokens.findFirst({ + where: eq(unloggedUserTokens.token, token) + }); +} +async function upsertUnloggedToken(token) { + const existing = await getUnloggedToken(token); + if (existing) { + await db.update(unloggedUserTokens).set({ lastVerified: /* @__PURE__ */ new Date() }).where(eq(unloggedUserTokens.id, existing.id)); + return; + } + await db.insert(unloggedUserTokens).values({ + token, + lastVerified: /* @__PURE__ */ new Date() + }); +} +var init_user2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getUserById2, "getUserById"); + __name(getUserDetailByUserId, "getUserDetailByUserId"); + __name(getUserWithCreds, "getUserWithCreds"); + __name(getNotifCred, "getNotifCred"); + __name(upsertNotifCred, "upsertNotifCred"); + __name(deleteUnloggedToken, "deleteUnloggedToken"); + __name(getUnloggedToken, "getUnloggedToken"); + __name(upsertUnloggedToken, "upsertUnloggedToken"); + } +}); + +// ../../packages/db_helper_sqlite/src/lib/date.ts +function coerceDate(value) { + if (value instanceof Date) { + return Number.isNaN(value.getTime()) ? null : value; + } + if (value === null || value === void 0) { + return null; + } + if (typeof value === "number") { + const date6 = new Date(value); + return Number.isNaN(date6.getTime()) ? null : date6; + } + if (typeof value === "string") { + const parsed = Date.parse(value); + if (!Number.isNaN(parsed)) { + return new Date(parsed); + } + const asNumber = Number(value); + if (!Number.isNaN(asNumber)) { + const date6 = new Date(asNumber); + return Number.isNaN(date6.getTime()) ? null : date6; + } + } + return null; +} +var init_date = __esm({ + "../../packages/db_helper_sqlite/src/lib/date.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(coerceDate, "coerceDate"); + } +}); + +// ../../packages/db_helper_sqlite/src/user-apis/order.ts +async function validateAndGetCoupon(couponId, userId, totalAmount) { + if (!couponId) + return null; + const coupon = await db.query.coupons.findFirst({ + where: eq(coupons.id, couponId), + with: { + usages: { where: eq(couponUsage.userId, userId) } + } + }); + if (!coupon) + throw new Error("Invalid coupon"); + if (coupon.isInvalidated) + throw new Error("Coupon is no longer valid"); + if (coupon.validTill && new Date(coupon.validTill) < /* @__PURE__ */ new Date()) + throw new Error("Coupon has expired"); + if (coupon.maxLimitForUser && coupon.usages.length >= coupon.maxLimitForUser) + throw new Error("Coupon usage limit exceeded"); + if (coupon.minOrder && parseFloat(coupon.minOrder.toString()) > totalAmount) + throw new Error("Order amount does not meet coupon minimum requirement"); + return coupon; +} +function applyDiscountToOrder(orderTotal, appliedCoupon, proportion) { + let finalOrderTotal = orderTotal; + if (appliedCoupon) { + if (appliedCoupon.discountPercent) { + const discount = Math.min( + orderTotal * parseFloat(appliedCoupon.discountPercent.toString()) / 100, + appliedCoupon.maxValue ? parseFloat(appliedCoupon.maxValue.toString()) * proportion : Infinity + ); + finalOrderTotal -= discount; + } else if (appliedCoupon.flatDiscount) { + const discount = Math.min( + parseFloat(appliedCoupon.flatDiscount.toString()) * proportion, + appliedCoupon.maxValue ? parseFloat(appliedCoupon.maxValue.toString()) * proportion : finalOrderTotal + ); + finalOrderTotal -= discount; + } + } + return { finalOrderTotal, orderGroupProportion: proportion }; +} +async function getAddressByIdAndUser(addressId, userId) { + return db.query.addresses.findFirst({ + where: and(eq(addresses.userId, userId), eq(addresses.id, addressId)) + }); +} +async function getProductById4(productId) { + return db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId) + }); +} +async function checkUserSuspended(userId) { + const userDetail = await db.query.userDetails.findFirst({ + where: eq(userDetails.userId, userId) + }); + return userDetail?.isSuspended ?? false; +} +async function getSlotCapacityStatus(slotId) { + const slot = await db.query.deliverySlotInfo.findFirst({ + where: eq(deliverySlotInfo.id, slotId), + columns: { + isCapacityFull: true + } + }); + return slot?.isCapacityFull ?? false; +} +async function placeOrderTransaction(params) { + const { userId, ordersData, paymentMethod } = params; + return db.transaction(async (tx) => { + let sharedPaymentInfoId = null; + if (paymentMethod === "online") { + const [paymentInfo] = await tx.insert(paymentInfoTable).values({ + status: "pending", + gateway: "razorpay", + merchantOrderId: `multi_order_${Date.now()}` + }).returning(); + sharedPaymentInfoId = paymentInfo.id; + } + const ordersToInsert = ordersData.map((od) => ({ + ...od.order, + paymentInfoId: sharedPaymentInfoId + })); + const insertedOrders = await tx.insert(orders).values(ordersToInsert).returning(); + const allOrderItems = []; + const allOrderStatuses = []; + insertedOrders.forEach((order, index) => { + const od = ordersData[index]; + od.orderItems.forEach((item) => { + allOrderItems.push({ ...item, orderId: order.id }); + }); + allOrderStatuses.push({ + ...od.orderStatus, + orderId: order.id + }); + }); + await tx.insert(orderItems).values(allOrderItems); + await tx.insert(orderStatus).values(allOrderStatuses); + return insertedOrders; + }); +} +async function deleteCartItemsForOrder(userId, productIds) { + await db.delete(cartItems).where( + and( + eq(cartItems.userId, userId), + inArray(cartItems.productId, productIds) + ) + ); +} +async function recordCouponUsage(userId, couponId, orderId) { + await db.insert(couponUsage).values({ + userId, + couponId, + orderId, + orderItemId: null, + usedAt: /* @__PURE__ */ new Date() + }); +} +async function getOrdersWithRelations(userId, offset, pageSize) { + const ordersWithRelations = await db.query.orders.findMany({ + where: eq(orders.userId, userId), + with: { + orderItems: { + with: { + product: { + columns: { + id: true, + name: true, + images: true + } + } + } + }, + slot: { + columns: { + deliveryTime: true + } + }, + paymentInfo: { + columns: { + id: true, + status: true + } + }, + orderStatus: { + columns: { + id: true, + isCancelled: true, + isDelivered: true, + paymentStatus: true, + cancelReason: true + } + }, + refunds: { + columns: { + refundStatus: true, + refundAmount: true + } + } + }, + orderBy: [desc(orders.createdAt)], + limit: pageSize, + offset + }); + return ordersWithRelations.map((order) => { + const createdAt = coerceDate(order.createdAt) ?? /* @__PURE__ */ new Date(0); + const slot = order.slot ? { + ...order.slot, + deliveryTime: coerceDate(order.slot.deliveryTime) ?? /* @__PURE__ */ new Date(0) + } : null; + return { + ...order, + createdAt, + slot + }; + }); +} +async function getOrderCount(userId) { + const result = await db.select({ count: sql`count(*)` }).from(orders).where(eq(orders.userId, userId)); + return Number(result[0]?.count ?? 0); +} +async function getOrderByIdWithRelations(orderId, userId) { + const order = await db.query.orders.findFirst({ + where: and(eq(orders.id, orderId), eq(orders.userId, userId)), + with: { + orderItems: { + with: { + product: { + columns: { + id: true, + name: true, + images: true + } + } + } + }, + slot: { + columns: { + deliveryTime: true + } + }, + paymentInfo: { + columns: { + id: true, + status: true + } + }, + orderStatus: { + columns: { + id: true, + isCancelled: true, + isDelivered: true, + paymentStatus: true, + cancelReason: true + }, + with: { + refundCoupon: { + columns: { + id: true, + couponCode: true + } + } + } + }, + refunds: { + columns: { + refundStatus: true, + refundAmount: true + } + } + } + }); + if (!order) { + return null; + } + const createdAt = coerceDate(order.createdAt) ?? /* @__PURE__ */ new Date(0); + const slot = order.slot ? { + ...order.slot, + deliveryTime: coerceDate(order.slot.deliveryTime) ?? /* @__PURE__ */ new Date(0) + } : null; + return { + ...order, + createdAt, + slot + }; +} +async function getCouponUsageForOrder(orderId) { + return db.query.couponUsage.findMany({ + where: eq(couponUsage.orderId, orderId), + with: { + coupon: { + columns: { + id: true, + couponCode: true, + discountPercent: true, + flatDiscount: true, + maxValue: true + } + } + } + }); +} +async function getOrderBasic(orderId) { + return db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + orderStatus: { + columns: { + id: true, + isCancelled: true, + isDelivered: true + } + } + } + }); +} +async function cancelOrderTransaction(orderId, statusId, reason, isCod) { + await db.transaction(async (tx) => { + await tx.update(orderStatus).set({ + isCancelled: true, + cancelReason: reason, + cancellationUserNotes: reason, + cancellationReviewed: false + }).where(eq(orderStatus.id, statusId)); + const refundStatus = isCod ? "na" : "pending"; + await tx.insert(refunds).values({ + orderId, + refundStatus + }); + }); +} +async function updateOrderNotes2(orderId, userNotes) { + await db.update(orders).set({ + userNotes: userNotes || null + }).where(eq(orders.id, orderId)); +} +async function getRecentlyDeliveredOrderIds(userId, limit, since) { + const recentOrders = await db.select({ id: orders.id }).from(orders).innerJoin(orderStatus, eq(orders.id, orderStatus.orderId)).where( + and( + eq(orders.userId, userId), + eq(orderStatus.isDelivered, true), + gte(orders.createdAt, since) + ) + ).orderBy(desc(orders.createdAt)).limit(limit); + return recentOrders.map((order) => order.id); +} +async function getProductIdsFromOrders(orderIds) { + const orderItemsResult = await db.select({ productId: orderItems.productId }).from(orderItems).where(inArray(orderItems.orderId, orderIds)); + return [...new Set(orderItemsResult.map((item) => item.productId))]; +} +async function getProductsForRecentOrders(productIds, limit) { + const results = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + price: productInfo.price, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + unitShortNotation: units.shortNotation, + incrementStep: productInfo.incrementStep + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)).where( + and( + inArray(productInfo.id, productIds), + eq(productInfo.isSuspended, false) + ) + ).orderBy(desc(productInfo.createdAt)).limit(limit); + return results.map((product) => ({ + ...product, + price: String(product.price ?? "0") + })); +} +async function getOrdersByIdsWithFullData(orderIds) { + return db.query.orders.findMany({ + where: inArray(orders.id, orderIds), + with: { + address: { + columns: { + name: true, + addressLine1: true, + addressLine2: true, + city: true, + state: true, + pincode: true, + phone: true + } + }, + orderItems: { + with: { + product: { + columns: { + name: true + } + } + } + }, + slot: { + columns: { + deliveryTime: true + } + } + } + }); +} +async function getOrderByIdWithFullData(orderId) { + return db.query.orders.findFirst({ + where: eq(orders.id, orderId), + with: { + address: { + columns: { + name: true, + addressLine1: true, + addressLine2: true, + city: true, + state: true, + pincode: true, + phone: true + } + }, + orderItems: { + with: { + product: { + columns: { + name: true + } + } + } + }, + slot: { + columns: { + deliveryTime: true + } + }, + refunds: { + columns: { + refundStatus: true + } + } + } + }); +} +var init_order2 = __esm({ + "../../packages/db_helper_sqlite/src/user-apis/order.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + init_date(); + __name(validateAndGetCoupon, "validateAndGetCoupon"); + __name(applyDiscountToOrder, "applyDiscountToOrder"); + __name(getAddressByIdAndUser, "getAddressByIdAndUser"); + __name(getProductById4, "getProductById"); + __name(checkUserSuspended, "checkUserSuspended"); + __name(getSlotCapacityStatus, "getSlotCapacityStatus"); + __name(placeOrderTransaction, "placeOrderTransaction"); + __name(deleteCartItemsForOrder, "deleteCartItemsForOrder"); + __name(recordCouponUsage, "recordCouponUsage"); + __name(getOrdersWithRelations, "getOrdersWithRelations"); + __name(getOrderCount, "getOrderCount"); + __name(getOrderByIdWithRelations, "getOrderByIdWithRelations"); + __name(getCouponUsageForOrder, "getCouponUsageForOrder"); + __name(getOrderBasic, "getOrderBasic"); + __name(cancelOrderTransaction, "cancelOrderTransaction"); + __name(updateOrderNotes2, "updateOrderNotes"); + __name(getRecentlyDeliveredOrderIds, "getRecentlyDeliveredOrderIds"); + __name(getProductIdsFromOrders, "getProductIdsFromOrders"); + __name(getProductsForRecentOrders, "getProductsForRecentOrders"); + __name(getOrdersByIdsWithFullData, "getOrdersByIdsWithFullData"); + __name(getOrderByIdWithFullData, "getOrderByIdWithFullData"); + } +}); + +// ../../packages/db_helper_sqlite/src/stores/store-helpers.ts +async function getAllBannersForCache() { + return db.query.homeBanners.findMany({ + where: isNotNull(homeBanners.serialNum), + orderBy: asc(homeBanners.serialNum) + }); +} +async function getAllProductsForCache() { + const results = await db.select({ + id: productInfo.id, + name: productInfo.name, + shortDescription: productInfo.shortDescription, + longDescription: productInfo.longDescription, + price: productInfo.price, + marketPrice: productInfo.marketPrice, + images: productInfo.images, + isOutOfStock: productInfo.isOutOfStock, + storeId: productInfo.storeId, + unitShortNotation: units.shortNotation, + incrementStep: productInfo.incrementStep, + productQuantity: productInfo.productQuantity, + isFlashAvailable: productInfo.isFlashAvailable, + flashPrice: productInfo.flashPrice + }).from(productInfo).innerJoin(units, eq(productInfo.unitId, units.id)); + return results.map((product) => ({ + ...product, + price: String(product.price ?? "0"), + marketPrice: product.marketPrice ? String(product.marketPrice) : null, + flashPrice: product.flashPrice ? String(product.flashPrice) : null + })); +} +async function getAllStoresForCache() { + return db.query.storeInfo.findMany({ + columns: { id: true, name: true, description: true } + }); +} +async function getAllDeliverySlotsForCache() { + return db.select({ + productId: productSlots.productId, + id: deliverySlotInfo.id, + deliveryTime: deliverySlotInfo.deliveryTime, + freezeTime: deliverySlotInfo.freezeTime, + isCapacityFull: deliverySlotInfo.isCapacityFull + }).from(productSlots).innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id)).where( + and( + eq(deliverySlotInfo.isActive, true), + eq(deliverySlotInfo.isCapacityFull, false), + gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`) + ) + ); +} +async function getAllSpecialDealsForCache() { + const results = await db.select({ + productId: specialDeals.productId, + quantity: specialDeals.quantity, + price: specialDeals.price, + validTill: specialDeals.validTill + }).from(specialDeals).where(gt(specialDeals.validTill, sql`CURRENT_TIMESTAMP`)); + return results.map((deal) => ({ + ...deal, + quantity: String(deal.quantity ?? "0"), + price: String(deal.price ?? "0") + })); +} +async function getAllProductTagsForCache() { + return db.select({ + productId: productTags.productId, + tagName: productTagInfo.tagName + }).from(productTags).innerJoin(productTagInfo, eq(productTags.tagId, productTagInfo.id)); +} +async function getAllTagsForCache() { + return db.select({ + id: productTagInfo.id, + tagName: productTagInfo.tagName, + tagDescription: productTagInfo.tagDescription, + imageUrl: productTagInfo.imageUrl, + isDashboardTag: productTagInfo.isDashboardTag, + relatedStores: productTagInfo.relatedStores + }).from(productTagInfo); +} +async function getAllTagProductMappings() { + return db.select({ + tagId: productTags.tagId, + productId: productTags.productId + }).from(productTags); +} +async function getAllSlotsWithProductsForCache() { + const now = /* @__PURE__ */ new Date(); + return db.query.deliverySlotInfo.findMany({ + where: and( + eq(deliverySlotInfo.isActive, true), + gt(deliverySlotInfo.deliveryTime, now) + ), + with: { + productSlots: { + with: { + product: { + with: { + unit: true, + store: true + } + } + } + } + }, + orderBy: asc(deliverySlotInfo.deliveryTime) + }); +} +async function getAllUserNegativityScores() { + const results = await db.select({ + userId: userIncidents.userId, + totalNegativityScore: sql`sum(${userIncidents.negativityScore})` + }).from(userIncidents).groupBy(userIncidents.userId); + return results.map((result) => ({ + userId: result.userId, + totalNegativityScore: Number(result.totalNegativityScore ?? 0) + })); +} +async function getUserNegativityScore(userId) { + const [result] = await db.select({ + totalNegativityScore: sql`sum(${userIncidents.negativityScore})` + }).from(userIncidents).where(eq(userIncidents.userId, userId)).limit(1); + return Number(result?.totalNegativityScore ?? 0); +} +var init_store_helpers = __esm({ + "../../packages/db_helper_sqlite/src/stores/store-helpers.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(getAllBannersForCache, "getAllBannersForCache"); + __name(getAllProductsForCache, "getAllProductsForCache"); + __name(getAllStoresForCache, "getAllStoresForCache"); + __name(getAllDeliverySlotsForCache, "getAllDeliverySlotsForCache"); + __name(getAllSpecialDealsForCache, "getAllSpecialDealsForCache"); + __name(getAllProductTagsForCache, "getAllProductTagsForCache"); + __name(getAllTagsForCache, "getAllTagsForCache"); + __name(getAllTagProductMappings, "getAllTagProductMappings"); + __name(getAllSlotsWithProductsForCache, "getAllSlotsWithProductsForCache"); + __name(getAllUserNegativityScores, "getAllUserNegativityScores"); + __name(getUserNegativityScore, "getUserNegativityScore"); + } +}); + +// ../../packages/db_helper_sqlite/src/lib/automated-jobs.ts +async function toggleFlashDeliveryForItems(isAvailable, productIds) { + await db.update(productInfo).set({ isFlashAvailable: isAvailable }).where(inArray(productInfo.id, productIds)); +} +async function toggleKeyVal(key, value) { + await db.update(keyValStore).set({ value }).where(eq(keyValStore.key, key)); +} +async function getAllKeyValStore() { + return db.select().from(keyValStore); +} +var init_automated_jobs = __esm({ + "../../packages/db_helper_sqlite/src/lib/automated-jobs.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(toggleFlashDeliveryForItems, "toggleFlashDeliveryForItems"); + __name(toggleKeyVal, "toggleKeyVal"); + __name(getAllKeyValStore, "getAllKeyValStore"); + } +}); + +// ../../packages/db_helper_sqlite/src/lib/health-check.ts +async function healthCheck() { + try { + await db.select({ key: keyValStore.key }).from(keyValStore).limit(1); + return { status: "ok" }; + } catch { + await db.select({ name: productInfo.name }).from(productInfo).limit(1); + return { status: "ok" }; + } +} +var init_health_check = __esm({ + "../../packages/db_helper_sqlite/src/lib/health-check.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + __name(healthCheck, "healthCheck"); + } +}); + +// ../../packages/db_helper_sqlite/src/lib/delete-orders.ts +async function deleteOrdersWithRelations(orderIds) { + if (orderIds.length === 0) { + return; + } + await db.delete(couponUsage).where(inArray(couponUsage.orderId, orderIds)); + await db.delete(complaints).where(inArray(complaints.orderId, orderIds)); + await db.delete(refunds).where(inArray(refunds.orderId, orderIds)); + await db.delete(payments).where(inArray(payments.orderId, orderIds)); + await db.delete(orderStatus).where(inArray(orderStatus.orderId, orderIds)); + await db.delete(orderItems).where(inArray(orderItems.orderId, orderIds)); + await db.delete(orders).where(inArray(orders.id, orderIds)); +} +var init_delete_orders = __esm({ + "../../packages/db_helper_sqlite/src/lib/delete-orders.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_drizzle_orm(); + __name(deleteOrdersWithRelations, "deleteOrdersWithRelations"); + } +}); + +// ../../packages/db_helper_sqlite/src/helper_methods/upload-url.ts +async function createUploadUrlStatus(key) { + await db.insert(uploadUrlStatus).values({ + key, + status: "pending" + }); +} +async function claimUploadUrlStatus(key) { + const result = await db.update(uploadUrlStatus).set({ status: "claimed" }).where(and(eq(uploadUrlStatus.key, key), eq(uploadUrlStatus.status, "pending"))).returning(); + return result.length > 0; +} +var init_upload_url = __esm({ + "../../packages/db_helper_sqlite/src/helper_methods/upload-url.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_drizzle_orm(); + init_db_index(); + init_schema(); + __name(createUploadUrlStatus, "createUploadUrlStatus"); + __name(claimUploadUrlStatus, "claimUploadUrlStatus"); + } +}); + +// ../../packages/db_helper_sqlite/src/lib/seed.ts +async function seedUnits(unitsToSeed) { + for (const unit of unitsToSeed) { + const { units: unitsTable } = await Promise.resolve().then(() => (init_schema(), schema_exports)); + const existingUnit = await db.query.units.findFirst({ + where: eq(unitsTable.shortNotation, unit.shortNotation) + }); + if (!existingUnit) { + await db.insert(unitsTable).values(unit); + } + } +} +async function seedStaffRoles(rolesToSeed) { + for (const roleName of rolesToSeed) { + const { staffRoles: staffRoles2 } = await Promise.resolve().then(() => (init_schema(), schema_exports)); + const existingRole = await db.query.staffRoles.findFirst({ + where: eq(staffRoles2.roleName, roleName) + }); + if (!existingRole) { + await db.insert(staffRoles2).values({ roleName }); + } + } +} +async function seedStaffPermissions(permissionsToSeed) { + for (const permissionName of permissionsToSeed) { + const { staffPermissions: staffPermissions2 } = await Promise.resolve().then(() => (init_schema(), schema_exports)); + const existingPermission = await db.query.staffPermissions.findFirst({ + where: eq(staffPermissions2.permissionName, permissionName) + }); + if (!existingPermission) { + await db.insert(staffPermissions2).values({ permissionName }); + } + } +} +async function seedRolePermissions(assignments) { + await db.transaction(async (tx) => { + const { staffRoles: staffRoles2, staffPermissions: staffPermissions2, staffRolePermissions: staffRolePermissions2 } = await Promise.resolve().then(() => (init_schema(), schema_exports)); + for (const assignment of assignments) { + const role = await tx.query.staffRoles.findFirst({ + where: eq(staffRoles2.roleName, assignment.roleName) + }); + const permission2 = await tx.query.staffPermissions.findFirst({ + where: eq(staffPermissions2.permissionName, assignment.permissionName) + }); + if (role && permission2) { + const existing = await tx.query.staffRolePermissions.findFirst({ + where: and( + eq(staffRolePermissions2.staffRoleId, role.id), + eq(staffRolePermissions2.staffPermissionId, permission2.id) + ) + }); + if (!existing) { + await tx.insert(staffRolePermissions2).values({ + staffRoleId: role.id, + staffPermissionId: permission2.id + }); + } + } + } + }); +} +async function seedKeyValStore(constantsToSeed) { + for (const constant of constantsToSeed) { + const { keyValStore: keyValStore2 } = await Promise.resolve().then(() => (init_schema(), schema_exports)); + const existing = await db.query.keyValStore.findFirst({ + where: eq(keyValStore2.key, constant.key) + }); + if (!existing) { + await db.insert(keyValStore2).values({ + key: constant.key, + value: constant.value + }); + } + } +} +var init_seed = __esm({ + "../../packages/db_helper_sqlite/src/lib/seed.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_drizzle_orm(); + __name(seedUnits, "seedUnits"); + __name(seedStaffRoles, "seedStaffRoles"); + __name(seedStaffPermissions, "seedStaffPermissions"); + __name(seedRolePermissions, "seedRolePermissions"); + __name(seedKeyValStore, "seedKeyValStore"); + } +}); + +// ../../packages/db_helper_sqlite/index.ts +var init_db_helper_sqlite = __esm({ + "../../packages/db_helper_sqlite/index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_index(); + init_schema(); + init_schema(); + init_banner(); + init_complaint(); + init_const(); + init_coupon(); + init_order(); + init_product(); + init_slots(); + init_staff_user(); + init_store(); + init_user(); + init_vendor_snippets(); + init_address(); + init_banners(); + init_cart(); + init_complaint2(); + init_stores(); + init_product2(); + init_slots2(); + init_payments(); + init_auth(); + init_coupon2(); + init_user2(); + init_order2(); + init_store_helpers(); + init_automated_jobs(); + init_health_check(); + init_product2(); + init_stores(); + init_delete_orders(); + init_upload_url(); + init_seed(); + } +}); + +// src/sqliteImporter.ts +var init_sqliteImporter = __esm({ + "src/sqliteImporter.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_db_helper_sqlite(); + init_db_helper_sqlite(); + init_db_helper_sqlite(); + } +}); + +// src/dbService.ts +var dbService_exports = {}; +__export(dbService_exports, { + addProductToGroup: () => addProductToGroup, + addressAreas: () => addressAreas, + addressAreasRelations: () => addressAreasRelations, + addressZones: () => addressZones, + addressZonesRelations: () => addressZonesRelations, + addresses: () => addresses, + addressesRelations: () => addressesRelations, + applyDiscountToUserOrder: () => applyDiscountToOrder, + cancelOrder: () => cancelOrder, + cancelUserOrderTransaction: () => cancelOrderTransaction, + cartItems: () => cartItems, + cartItemsRelations: () => cartItemsRelations, + checkCouponExists: () => checkCouponExists, + checkProductExistsByName: () => checkProductExistsByName, + checkProductTagExistsByName: () => checkProductTagExistsByName, + checkReservedCouponExists: () => checkReservedCouponExists, + checkStaffRoleExists: () => checkStaffRoleExists, + checkStaffUserExists: () => checkStaffUserExists, + checkUnitExists: () => checkUnitExists, + checkUserSuspended: () => checkUserSuspended, + checkUsersExist: () => checkUsersExist, + checkVendorSnippetExists: () => checkVendorSnippetExists, + claimUploadUrlStatus: () => claimUploadUrlStatus, + clearUserCart: () => clearUserCart, + clearUserDefaultAddress: () => clearDefaultAddress, + complaints: () => complaints, + complaintsRelations: () => complaintsRelations, + couponApplicableProducts: () => couponApplicableProducts, + couponApplicableProductsRelations: () => couponApplicableProductsRelations, + couponApplicableUsers: () => couponApplicableUsers, + couponApplicableUsersRelations: () => couponApplicableUsersRelations, + couponUsage: () => couponUsage, + couponUsageRelations: () => couponUsageRelations, + coupons: () => coupons, + couponsRelations: () => couponsRelations, + createBanner: () => createBanner, + createCouponForUser: () => createCouponForUser, + createCouponWithRelations: () => createCouponWithRelations, + createProduct: () => createProduct, + createProductGroup: () => createProductGroup, + createProductTag: () => createProductTag, + createReservedCouponWithProducts: () => createReservedCouponWithProducts, + createSlotWithRelations: () => createSlotWithRelations, + createSpecialDealsForProduct: () => createSpecialDealsForProduct, + createStaffUser: () => createStaffUser, + createStore: () => createStore, + createUploadUrlStatus: () => createUploadUrlStatus, + createUserAddress: () => createUserAddress, + createUserAuthWithCreds: () => createUserWithCreds, + createUserAuthWithMobile: () => createUserWithMobile, + createUserByMobile: () => createUserByMobile, + createUserComplaint: () => createComplaint, + createUserIncident: () => createUserIncident, + createUserProductReview: () => createProductReview, + createUserWithProfile: () => createUserWithProfile, + createVendorSnippet: () => createVendorSnippet, + db: () => db, + deleteBanner: () => deleteBanner, + deleteOrderById: () => deleteOrderById, + deleteOrdersWithRelations: () => deleteOrdersWithRelations, + deleteProduct: () => deleteProduct, + deleteProductGroup: () => deleteProductGroup, + deleteProductTag: () => deleteProductTag, + deleteSlotById: () => deleteSlotById, + deleteStore: () => deleteStore, + deleteUserAddress: () => deleteUserAddress, + deleteUserAuthAccount: () => deleteUserAccount, + deleteUserCartItem: () => deleteCartItem, + deleteUserCartItemsForOrder: () => deleteCartItemsForOrder, + deleteUserUnloggedToken: () => deleteUnloggedToken, + deleteVendorSnippet: () => deleteVendorSnippet, + deliverySlotInfo: () => deliverySlotInfo, + deliverySlotInfoRelations: () => deliverySlotInfoRelations, + generateCancellationCoupon: () => generateCancellationCoupon, + getActiveSlots: () => getActiveSlots, + getActiveSlotsWithProducts: () => getActiveSlotsWithProducts, + getAllBannersForCache: () => getAllBannersForCache, + getAllConstants: () => getAllConstants, + getAllCoupons: () => getAllCoupons, + getAllDeliverySlotsForCache: () => getAllDeliverySlotsForCache, + getAllKeyValStore: () => getAllKeyValStore, + getAllNotifCreds: () => getAllNotifCreds, + getAllOrders: () => getAllOrders, + getAllProductGroups: () => getAllProductGroups, + getAllProductTagInfos: () => getAllProductTagInfos, + getAllProductTags: () => getAllProductTags, + getAllProductTagsForCache: () => getAllProductTagsForCache, + getAllProducts: () => getAllProducts, + getAllProductsForCache: () => getAllProductsForCache, + getAllProductsWithUnits: () => getAllProductsWithUnits, + getAllRoles: () => getAllRoles, + getAllSlotsWithProductsForCache: () => getAllSlotsWithProductsForCache, + getAllSpecialDealsForCache: () => getAllSpecialDealsForCache, + getAllStaff: () => getAllStaff, + getAllStores: () => getAllStores, + getAllStoresForCache: () => getAllStoresForCache, + getAllTagProductMappings: () => getAllTagProductMappings, + getAllTagsForCache: () => getAllTagsForCache, + getAllUnits: () => getAllUnits, + getAllUnloggedTokens: () => getAllUnloggedTokens, + getAllUserNegativityScores: () => getAllUserNegativityScores, + getAllUsers: () => getAllUsers, + getAllUsersWithFilters: () => getAllUsersWithFilters, + getAllVendorSnippets: () => getAllVendorSnippets, + getBannerById: () => getBannerById, + getBanners: () => getBanners, + getComplaints: () => getComplaints, + getCouponById: () => getCouponById, + getItemCountsByOrderIds: () => getItemCountsByOrderIds, + getLastOrdersByUserIds: () => getLastOrdersByUserIds, + getNextDeliveryDateWithCapacity: () => getNextDeliveryDateWithCapacity, + getNotifTokensByUserIds: () => getNotifTokensByUserIds, + getOrderByIdWithFullData: () => getOrderByIdWithFullData, + getOrderCountsByUserIds: () => getOrderCountsByUserIds, + getOrderDetails: () => getOrderDetails, + getOrderDetailsWrapper: () => getOrderDetailsWrapper, + getOrderItemsByOrderIds: () => getOrderItemsByOrderIds, + getOrderProductById: () => getProductById4, + getOrderStatusByOrderIds: () => getOrderStatusByOrderIds, + getOrderStatusesByOrderIds: () => getOrderStatusesByOrderIds, + getOrderWithUser: () => getOrderWithUser, + getOrdersByIdsWithFullData: () => getOrdersByIdsWithFullData, + getProductById: () => getProductById, + getProductImagesById: () => getProductImagesById, + getProductReviews: () => getProductReviews, + getProductTagById: () => getProductTagById, + getProductTagInfoById: () => getProductTagInfoById, + getProductsByIds: () => getProductsByIds, + getReservedCoupons: () => getReservedCoupons, + getSlotByIdWithRelations: () => getSlotByIdWithRelations, + getSlotDeliverySequence: () => getSlotDeliverySequence, + getSlotOrders: () => getSlotOrders, + getSlotProductIds: () => getSlotProductIds, + getSlotsAfterDate: () => getSlotsAfterDate, + getSlotsProductIds: () => getSlotsProductIds, + getStaffUserById: () => getStaffUserById, + getStaffUserByName: () => getStaffUserByName, + getStoreById: () => getStoreById, + getStoresSummary: () => getStoresSummary, + getSuspendedProductIds: () => getSuspendedProductIds, + getSuspensionStatusesByUserIds: () => getSuspensionStatusesByUserIds, + getUnresolvedComplaintsCount: () => getUnresolvedComplaintsCount, + getUserActiveBanners: () => getActiveBanners, + getUserActiveCouponsWithRelations: () => getActiveCouponsWithRelations, + getUserActiveSlotsList: () => getActiveSlotsList, + getUserAddressById: () => getUserAddressById, + getUserAddressByIdAndUser: () => getAddressByIdAndUser, + getUserAddresses: () => getUserAddresses, + getUserAllCouponsWithRelations: () => getAllCouponsWithRelations, + getUserAuthByEmail: () => getUserByEmail, + getUserAuthById: () => getUserById, + getUserAuthByMobile: () => getUserByMobile2, + getUserAuthCreds: () => getUserCreds, + getUserAuthDetails: () => getUserDetails, + getUserBasicInfo: () => getUserBasicInfo, + getUserByMobile: () => getUserByMobile, + getUserCartItemByUserProduct: () => getCartItemByUserProduct, + getUserCartItemsWithProducts: () => getCartItemsWithProducts, + getUserComplaints: () => getUserComplaints, + getUserCouponUsageForOrder: () => getCouponUsageForOrder, + getUserDefaultAddress: () => getDefaultAddress, + getUserDetailsByUserId: () => getUserDetailsByUserId, + getUserIncidentsWithRelations: () => getUserIncidentsWithRelations, + getUserNegativityScore: () => getUserNegativityScore, + getUserNotifCred: () => getNotifCred, + getUserOrderBasic: () => getOrderBasic, + getUserOrderByIdWithRelations: () => getOrderByIdWithRelations, + getUserOrderCount: () => getOrderCount, + getUserOrders: () => getUserOrders, + getUserOrdersWithRelations: () => getOrdersWithRelations, + getUserPaymentByMerchantOrderId: () => getPaymentByMerchantOrderId, + getUserPaymentByOrderId: () => getPaymentByOrderId, + getUserPaymentOrderById: () => getOrderById, + getUserProductAvailability: () => getProductAvailability, + getUserProductById: () => getProductById2, + getUserProductByIdBasic: () => getProductById3, + getUserProductDetailById: () => getProductDetailById, + getUserProductIdsFromOrders: () => getProductIdsFromOrders, + getUserProductReviews: () => getProductReviews2, + getUserProductsForRecentOrders: () => getProductsForRecentOrders, + getUserProfileById: () => getUserById2, + getUserProfileDetailById: () => getUserDetailByUserId, + getUserRecentlyDeliveredOrderIds: () => getRecentlyDeliveredOrderIds, + getUserReservedCouponByCode: () => getReservedCouponByCode, + getUserSlotCapacityStatus: () => getSlotCapacityStatus, + getUserStoreDetail: () => getStoreDetail, + getUserStoreSummaries: () => getStoreSummaries, + getUserSuspensionStatus: () => getUserSuspensionStatus, + getUserUnloggedToken: () => getUnloggedToken, + getUserWithCreds: () => getUserWithCreds, + getUserWithDetails: () => getUserWithDetails, + getUsersForCoupon: () => getUsersForCoupon, + getVendorOrders: () => getVendorOrders, + getVendorOrdersBySlotId: () => getVendorOrdersBySlotId, + getVendorSlotById: () => getVendorSlotById, + getVendorSnippetByCode: () => getVendorSnippetByCode, + getVendorSnippetById: () => getVendorSnippetById, + hasOngoingOrdersForAddress: () => hasOngoingOrdersForAddress, + healthCheck: () => healthCheck, + homeBanners: () => homeBanners, + homeBannersRelations: () => homeBannersRelations, + incrementUserCartItemQuantity: () => incrementCartItemQuantity, + initDb: () => initDb, + insertUserCartItem: () => insertCartItem, + invalidateCoupon: () => invalidateCoupon, + isUserSuspended: () => isUserSuspended, + keyValStore: () => keyValStore, + markUserPaymentFailed: () => markPaymentFailed, + notifCreds: () => notifCreds, + notifCredsRelations: () => notifCredsRelations, + notifications: () => notifications, + notificationsRelations: () => notificationsRelations, + orderItems: () => orderItems, + orderItemsRelations: () => orderItemsRelations, + orderStatus: () => orderStatus, + orderStatusRelations: () => orderStatusRelations, + orders: () => orders, + ordersRelations: () => ordersRelations, + paymentInfoRelations: () => paymentInfoRelations, + paymentInfoTable: () => paymentInfoTable, + paymentStatusEnum: () => paymentStatusEnum, + payments: () => payments, + paymentsRelations: () => paymentsRelations, + placeUserOrderTransaction: () => placeOrderTransaction, + productCategories: () => productCategories, + productCategoriesRelations: () => productCategoriesRelations, + productGroupInfo: () => productGroupInfo, + productGroupInfoRelations: () => productGroupInfoRelations, + productGroupMembership: () => productGroupMembership, + productGroupMembershipRelations: () => productGroupMembershipRelations, + productInfo: () => productInfo, + productInfoRelations: () => productInfoRelations, + productReviews: () => productReviews, + productReviewsRelations: () => productReviewsRelations, + productSlots: () => productSlots, + productSlotsRelations: () => productSlotsRelations, + productTagInfo: () => productTagInfo, + productTagInfoRelations: () => productTagInfoRelations, + productTags: () => productTags, + productTagsRelations: () => productTagsRelations, + rebalanceSlots: () => rebalanceSlots, + recordUserCouponUsage: () => recordCouponUsage, + redeemUserReservedCoupon: () => redeemReservedCoupon, + refunds: () => refunds, + refundsRelations: () => refundsRelations, + removeDeliveryCharge: () => removeDeliveryCharge, + removeProductFromGroup: () => removeProductFromGroup, + replaceProductTags: () => replaceProductTags, + reservedCoupons: () => reservedCoupons, + reservedCouponsRelations: () => reservedCouponsRelations, + resolveComplaint: () => resolveComplaint, + respondToReview: () => respondToReview, + searchUsers: () => searchUsers, + seedKeyValStore: () => seedKeyValStore, + seedRolePermissions: () => seedRolePermissions, + seedStaffPermissions: () => seedStaffPermissions, + seedStaffRoles: () => seedStaffRoles, + seedUnits: () => seedUnits, + specialDeals: () => specialDeals, + specialDealsRelations: () => specialDealsRelations, + staffPermissionEnum: () => staffPermissionEnum, + staffPermissions: () => staffPermissions, + staffPermissionsRelations: () => staffPermissionsRelations, + staffRoleEnum: () => staffRoleEnum, + staffRolePermissions: () => staffRolePermissions, + staffRolePermissionsRelations: () => staffRolePermissionsRelations, + staffRoles: () => staffRoles, + staffRolesRelations: () => staffRolesRelations, + staffUsers: () => staffUsers, + staffUsersRelations: () => staffUsersRelations, + storeInfo: () => storeInfo, + storeInfoRelations: () => storeInfoRelations, + toggleFlashDeliveryForItems: () => toggleFlashDeliveryForItems, + toggleKeyVal: () => toggleKeyVal, + toggleProductOutOfStock: () => toggleProductOutOfStock, + units: () => units, + unitsRelations: () => unitsRelations, + unloggedUserTokens: () => unloggedUserTokens, + updateAddressCoords: () => updateAddressCoords, + updateBanner: () => updateBanner, + updateCouponWithRelations: () => updateCouponWithRelations, + updateOrderDelivered: () => updateOrderDelivered, + updateOrderItemPackaging: () => updateOrderItemPackaging, + updateOrderNotes: () => updateOrderNotes, + updateOrderPackaged: () => updateOrderPackaged, + updateProduct: () => updateProduct, + updateProductDeals: () => updateProductDeals, + updateProductGroup: () => updateProductGroup, + updateProductPrices: () => updateProductPrices, + updateProductTag: () => updateProductTag, + updateSlotCapacity: () => updateSlotCapacity, + updateSlotDeliverySequence: () => updateSlotDeliverySequence, + updateSlotProducts: () => updateSlotProducts, + updateSlotWithRelations: () => updateSlotWithRelations, + updateStore: () => updateStore, + updateUserAddress: () => updateUserAddress, + updateUserCartItemQuantity: () => updateCartItemQuantity, + updateUserOrderNotes: () => updateOrderNotes2, + updateUserOrderPaymentStatus: () => updateOrderPaymentStatus, + updateUserPaymentSuccess: () => updatePaymentSuccess, + updateUserProfile: () => updateUserProfile, + updateUserSuspensionStatus: () => updateUserSuspensionStatus, + updateVendorOrderItemPackaging: () => updateVendorOrderItemPackaging, + updateVendorSnippet: () => updateVendorSnippet, + uploadStatusEnum: () => uploadStatusEnum, + uploadUrlStatus: () => uploadUrlStatus, + upsertConstants: () => upsertConstants, + upsertUserAuthPassword: () => upsertUserPassword, + upsertUserNotifCred: () => upsertNotifCred, + upsertUserSuspension: () => upsertUserSuspension, + upsertUserUnloggedToken: () => upsertUnloggedToken, + userCreds: () => userCreds, + userCredsRelations: () => userCredsRelations, + userDetails: () => userDetails, + userDetailsRelations: () => userDetailsRelations, + userIncidents: () => userIncidents, + userIncidentsRelations: () => userIncidentsRelations, + userNotifications: () => userNotifications, + userNotificationsRelations: () => userNotificationsRelations, + users: () => users, + usersRelations: () => usersRelations, + validateAndGetUserCoupon: () => validateAndGetCoupon, + validateCoupon: () => validateCoupon, + vendorSnippets: () => vendorSnippets, + vendorSnippetsRelations: () => vendorSnippetsRelations +}); +async function getOrderDetailsWrapper(orderId) { + return getOrderDetails(orderId); +} +var init_dbService = __esm({ + "src/dbService.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sqliteImporter(); + init_sqliteImporter(); + __name(getOrderDetailsWrapper, "getOrderDetailsWrapper"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/buffer_utils.js +function concat(...buffers) { + const size = buffers.reduce((acc, { length }) => acc + length, 0); + const buf = new Uint8Array(size); + let i2 = 0; + for (const buffer of buffers) { + buf.set(buffer, i2); + i2 += buffer.length; + } + return buf; +} +function encode(string4) { + const bytes = new Uint8Array(string4.length); + for (let i2 = 0; i2 < string4.length; i2++) { + const code = string4.charCodeAt(i2); + if (code > 127) { + throw new TypeError("non-ASCII string encountered in encode()"); + } + bytes[i2] = code; + } + return bytes; +} +var encoder, decoder, MAX_INT32; +var init_buffer_utils = __esm({ + "../../node_modules/jose/dist/webapi/lib/buffer_utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + encoder = new TextEncoder(); + decoder = new TextDecoder(); + MAX_INT32 = 2 ** 32; + __name(concat, "concat"); + __name(encode, "encode"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/base64.js +function encodeBase64(input) { + if (Uint8Array.prototype.toBase64) { + return input.toBase64(); + } + const CHUNK_SIZE = 32768; + const arr = []; + for (let i2 = 0; i2 < input.length; i2 += CHUNK_SIZE) { + arr.push(String.fromCharCode.apply(null, input.subarray(i2, i2 + CHUNK_SIZE))); + } + return btoa(arr.join("")); +} +function decodeBase64(encoded) { + if (Uint8Array.fromBase64) { + return Uint8Array.fromBase64(encoded); + } + const binary = atob(encoded); + const bytes = new Uint8Array(binary.length); + for (let i2 = 0; i2 < binary.length; i2++) { + bytes[i2] = binary.charCodeAt(i2); + } + return bytes; +} +var init_base64 = __esm({ + "../../node_modules/jose/dist/webapi/lib/base64.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(encodeBase64, "encodeBase64"); + __name(decodeBase64, "decodeBase64"); + } +}); + +// ../../node_modules/jose/dist/webapi/util/base64url.js +function decode(input) { + if (Uint8Array.fromBase64) { + return Uint8Array.fromBase64(typeof input === "string" ? input : decoder.decode(input), { + alphabet: "base64url" + }); + } + let encoded = input; + if (encoded instanceof Uint8Array) { + encoded = decoder.decode(encoded); + } + encoded = encoded.replace(/-/g, "+").replace(/_/g, "/"); + try { + return decodeBase64(encoded); + } catch { + throw new TypeError("The input to be decoded is not correctly encoded."); + } +} +function encode2(input) { + let unencoded = input; + if (typeof unencoded === "string") { + unencoded = encoder.encode(unencoded); + } + if (Uint8Array.prototype.toBase64) { + return unencoded.toBase64({ alphabet: "base64url", omitPadding: true }); + } + return encodeBase64(unencoded).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); +} +var init_base64url = __esm({ + "../../node_modules/jose/dist/webapi/util/base64url.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_buffer_utils(); + init_base64(); + __name(decode, "decode"); + __name(encode2, "encode"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/crypto_key.js +function getHashLength(hash4) { + return parseInt(hash4.name.slice(4), 10); +} +function checkHashLength(algorithm, expected) { + const actual = getHashLength(algorithm.hash); + if (actual !== expected) + throw unusable(`SHA-${expected}`, "algorithm.hash"); +} +function getNamedCurve(alg) { + switch (alg) { + case "ES256": + return "P-256"; + case "ES384": + return "P-384"; + case "ES512": + return "P-521"; + default: + throw new Error("unreachable"); + } +} +function checkUsage(key, usage) { + if (usage && !key.usages.includes(usage)) { + throw new TypeError(`CryptoKey does not support this operation, its usages must include ${usage}.`); + } +} +function checkSigCryptoKey(key, alg, usage) { + switch (alg) { + case "HS256": + case "HS384": + case "HS512": { + if (!isAlgorithm(key.algorithm, "HMAC")) + throw unusable("HMAC"); + checkHashLength(key.algorithm, parseInt(alg.slice(2), 10)); + break; + } + case "RS256": + case "RS384": + case "RS512": { + if (!isAlgorithm(key.algorithm, "RSASSA-PKCS1-v1_5")) + throw unusable("RSASSA-PKCS1-v1_5"); + checkHashLength(key.algorithm, parseInt(alg.slice(2), 10)); + break; + } + case "PS256": + case "PS384": + case "PS512": { + if (!isAlgorithm(key.algorithm, "RSA-PSS")) + throw unusable("RSA-PSS"); + checkHashLength(key.algorithm, parseInt(alg.slice(2), 10)); + break; + } + case "Ed25519": + case "EdDSA": { + if (!isAlgorithm(key.algorithm, "Ed25519")) + throw unusable("Ed25519"); + break; + } + case "ML-DSA-44": + case "ML-DSA-65": + case "ML-DSA-87": { + if (!isAlgorithm(key.algorithm, alg)) + throw unusable(alg); + break; + } + case "ES256": + case "ES384": + case "ES512": { + if (!isAlgorithm(key.algorithm, "ECDSA")) + throw unusable("ECDSA"); + const expected = getNamedCurve(alg); + const actual = key.algorithm.namedCurve; + if (actual !== expected) + throw unusable(expected, "algorithm.namedCurve"); + break; + } + default: + throw new TypeError("CryptoKey does not support this operation"); + } + checkUsage(key, usage); +} +var unusable, isAlgorithm; +var init_crypto_key = __esm({ + "../../node_modules/jose/dist/webapi/lib/crypto_key.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + unusable = /* @__PURE__ */ __name((name, prop = "algorithm.name") => new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`), "unusable"); + isAlgorithm = /* @__PURE__ */ __name((algorithm, name) => algorithm.name === name, "isAlgorithm"); + __name(getHashLength, "getHashLength"); + __name(checkHashLength, "checkHashLength"); + __name(getNamedCurve, "getNamedCurve"); + __name(checkUsage, "checkUsage"); + __name(checkSigCryptoKey, "checkSigCryptoKey"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/invalid_key_input.js +function message(msg, actual, ...types) { + types = types.filter(Boolean); + 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 (actual == null) { + msg += ` Received ${actual}`; + } else if (typeof actual === "function" && actual.name) { + msg += ` Received function ${actual.name}`; + } else if (typeof actual === "object" && actual != null) { + if (actual.constructor?.name) { + msg += ` Received an instance of ${actual.constructor.name}`; + } + } + return msg; +} +var invalidKeyInput, withAlg; +var init_invalid_key_input = __esm({ + "../../node_modules/jose/dist/webapi/lib/invalid_key_input.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(message, "message"); + invalidKeyInput = /* @__PURE__ */ __name((actual, ...types) => message("Key must be ", actual, ...types), "invalidKeyInput"); + withAlg = /* @__PURE__ */ __name((alg, actual, ...types) => message(`Key for the ${alg} algorithm must be `, actual, ...types), "withAlg"); + } +}); + +// ../../node_modules/jose/dist/webapi/util/errors.js +var JOSEError, JWTClaimValidationFailed, JWTExpired, JOSEAlgNotAllowed, JOSENotSupported, JWSInvalid, JWTInvalid, JWKSMultipleMatchingKeys, JWSSignatureVerificationFailed; +var init_errors2 = __esm({ + "../../node_modules/jose/dist/webapi/util/errors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + JOSEError = class extends Error { + code = "ERR_JOSE_GENERIC"; + constructor(message2, options) { + super(message2, options); + this.name = this.constructor.name; + Error.captureStackTrace?.(this, this.constructor); + } + }; + __name(JOSEError, "JOSEError"); + __publicField(JOSEError, "code", "ERR_JOSE_GENERIC"); + JWTClaimValidationFailed = class extends JOSEError { + code = "ERR_JWT_CLAIM_VALIDATION_FAILED"; + claim; + reason; + payload; + constructor(message2, payload, claim = "unspecified", reason = "unspecified") { + super(message2, { cause: { claim, reason, payload } }); + this.claim = claim; + this.reason = reason; + this.payload = payload; + } + }; + __name(JWTClaimValidationFailed, "JWTClaimValidationFailed"); + __publicField(JWTClaimValidationFailed, "code", "ERR_JWT_CLAIM_VALIDATION_FAILED"); + JWTExpired = class extends JOSEError { + code = "ERR_JWT_EXPIRED"; + claim; + reason; + payload; + constructor(message2, payload, claim = "unspecified", reason = "unspecified") { + super(message2, { cause: { claim, reason, payload } }); + this.claim = claim; + this.reason = reason; + this.payload = payload; + } + }; + __name(JWTExpired, "JWTExpired"); + __publicField(JWTExpired, "code", "ERR_JWT_EXPIRED"); + JOSEAlgNotAllowed = class extends JOSEError { + code = "ERR_JOSE_ALG_NOT_ALLOWED"; + }; + __name(JOSEAlgNotAllowed, "JOSEAlgNotAllowed"); + __publicField(JOSEAlgNotAllowed, "code", "ERR_JOSE_ALG_NOT_ALLOWED"); + JOSENotSupported = class extends JOSEError { + code = "ERR_JOSE_NOT_SUPPORTED"; + }; + __name(JOSENotSupported, "JOSENotSupported"); + __publicField(JOSENotSupported, "code", "ERR_JOSE_NOT_SUPPORTED"); + JWSInvalid = class extends JOSEError { + code = "ERR_JWS_INVALID"; + }; + __name(JWSInvalid, "JWSInvalid"); + __publicField(JWSInvalid, "code", "ERR_JWS_INVALID"); + JWTInvalid = class extends JOSEError { + code = "ERR_JWT_INVALID"; + }; + __name(JWTInvalid, "JWTInvalid"); + __publicField(JWTInvalid, "code", "ERR_JWT_INVALID"); + JWKSMultipleMatchingKeys = class extends JOSEError { + [Symbol.asyncIterator]; + code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS"; + constructor(message2 = "multiple matching keys found in the JSON Web Key Set", options) { + super(message2, options); + } + }; + __name(JWKSMultipleMatchingKeys, "JWKSMultipleMatchingKeys"); + __publicField(JWKSMultipleMatchingKeys, "code", "ERR_JWKS_MULTIPLE_MATCHING_KEYS"); + JWSSignatureVerificationFailed = class extends JOSEError { + code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED"; + constructor(message2 = "signature verification failed", options) { + super(message2, options); + } + }; + __name(JWSSignatureVerificationFailed, "JWSSignatureVerificationFailed"); + __publicField(JWSSignatureVerificationFailed, "code", "ERR_JWS_SIGNATURE_VERIFICATION_FAILED"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/is_key_like.js +var isCryptoKey, isKeyObject, isKeyLike; +var init_is_key_like = __esm({ + "../../node_modules/jose/dist/webapi/lib/is_key_like.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isCryptoKey = /* @__PURE__ */ __name((key) => { + if (key?.[Symbol.toStringTag] === "CryptoKey") + return true; + try { + return key instanceof CryptoKey; + } catch { + return false; + } + }, "isCryptoKey"); + isKeyObject = /* @__PURE__ */ __name((key) => key?.[Symbol.toStringTag] === "KeyObject", "isKeyObject"); + isKeyLike = /* @__PURE__ */ __name((key) => isCryptoKey(key) || isKeyObject(key), "isKeyLike"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/helpers.js +function assertNotSet(value, name) { + if (value) { + throw new TypeError(`${name} can only be called once`); + } +} +function decodeBase64url(value, label, ErrorClass) { + try { + return decode(value); + } catch { + throw new ErrorClass(`Failed to base64url decode the ${label}`); + } +} +var unprotected; +var init_helpers = __esm({ + "../../node_modules/jose/dist/webapi/lib/helpers.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_base64url(); + unprotected = Symbol(); + __name(assertNotSet, "assertNotSet"); + __name(decodeBase64url, "decodeBase64url"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/type_checks.js +function isObject2(input) { + if (!isObjectLike(input) || Object.prototype.toString.call(input) !== "[object Object]") { + return false; + } + if (Object.getPrototypeOf(input) === null) { + return true; + } + let proto = input; + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto); + } + return Object.getPrototypeOf(input) === proto; +} +function isDisjoint(...headers) { + const sources = headers.filter(Boolean); + if (sources.length === 0 || sources.length === 1) { + return true; + } + let acc; + for (const header of sources) { + const parameters = Object.keys(header); + if (!acc || acc.size === 0) { + acc = new Set(parameters); + continue; + } + for (const parameter of parameters) { + if (acc.has(parameter)) { + return false; + } + acc.add(parameter); + } + } + return true; +} +var isObjectLike, isJWK, isPrivateJWK, isPublicJWK, isSecretJWK; +var init_type_checks = __esm({ + "../../node_modules/jose/dist/webapi/lib/type_checks.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isObjectLike = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null, "isObjectLike"); + __name(isObject2, "isObject"); + __name(isDisjoint, "isDisjoint"); + isJWK = /* @__PURE__ */ __name((key) => isObject2(key) && typeof key.kty === "string", "isJWK"); + isPrivateJWK = /* @__PURE__ */ __name((key) => key.kty !== "oct" && (key.kty === "AKP" && typeof key.priv === "string" || typeof key.d === "string"), "isPrivateJWK"); + isPublicJWK = /* @__PURE__ */ __name((key) => key.kty !== "oct" && key.d === void 0 && key.priv === void 0, "isPublicJWK"); + isSecretJWK = /* @__PURE__ */ __name((key) => key.kty === "oct" && typeof key.k === "string", "isSecretJWK"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/signing.js +function checkKeyLength(alg, key) { + if (alg.startsWith("RS") || alg.startsWith("PS")) { + const { modulusLength } = key.algorithm; + if (typeof modulusLength !== "number" || modulusLength < 2048) { + throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`); + } + } +} +function subtleAlgorithm(alg, algorithm) { + const hash4 = `SHA-${alg.slice(-3)}`; + switch (alg) { + case "HS256": + case "HS384": + case "HS512": + return { hash: hash4, name: "HMAC" }; + case "PS256": + case "PS384": + case "PS512": + return { hash: hash4, name: "RSA-PSS", saltLength: parseInt(alg.slice(-3), 10) >> 3 }; + case "RS256": + case "RS384": + case "RS512": + return { hash: hash4, name: "RSASSA-PKCS1-v1_5" }; + case "ES256": + case "ES384": + case "ES512": + return { hash: hash4, name: "ECDSA", namedCurve: algorithm.namedCurve }; + case "Ed25519": + case "EdDSA": + return { name: "Ed25519" }; + case "ML-DSA-44": + case "ML-DSA-65": + case "ML-DSA-87": + return { name: alg }; + default: + throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); + } +} +async function getSigKey(alg, key, usage) { + if (key instanceof Uint8Array) { + if (!alg.startsWith("HS")) { + throw new TypeError(invalidKeyInput(key, "CryptoKey", "KeyObject", "JSON Web Key")); + } + return crypto.subtle.importKey("raw", key, { hash: `SHA-${alg.slice(-3)}`, name: "HMAC" }, false, [usage]); + } + checkSigCryptoKey(key, alg, usage); + return key; +} +async function sign(alg, key, data) { + const cryptoKey = await getSigKey(alg, key, "sign"); + checkKeyLength(alg, cryptoKey); + const signature = await crypto.subtle.sign(subtleAlgorithm(alg, cryptoKey.algorithm), cryptoKey, data); + return new Uint8Array(signature); +} +async function verify(alg, key, signature, data) { + const cryptoKey = await getSigKey(alg, key, "verify"); + checkKeyLength(alg, cryptoKey); + const algorithm = subtleAlgorithm(alg, cryptoKey.algorithm); + try { + return await crypto.subtle.verify(algorithm, cryptoKey, signature, data); + } catch { + return false; + } +} +var init_signing = __esm({ + "../../node_modules/jose/dist/webapi/lib/signing.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_errors2(); + init_crypto_key(); + init_invalid_key_input(); + __name(checkKeyLength, "checkKeyLength"); + __name(subtleAlgorithm, "subtleAlgorithm"); + __name(getSigKey, "getSigKey"); + __name(sign, "sign"); + __name(verify, "verify"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/jwk_to_key.js +function subtleMapping(jwk) { + let algorithm; + let keyUsages; + switch (jwk.kty) { + case "AKP": { + switch (jwk.alg) { + case "ML-DSA-44": + case "ML-DSA-65": + case "ML-DSA-87": + algorithm = { name: jwk.alg }; + keyUsages = jwk.priv ? ["sign"] : ["verify"]; + break; + default: + throw new JOSENotSupported(unsupportedAlg); + } + break; + } + case "RSA": { + switch (jwk.alg) { + case "PS256": + case "PS384": + case "PS512": + algorithm = { name: "RSA-PSS", hash: `SHA-${jwk.alg.slice(-3)}` }; + keyUsages = jwk.d ? ["sign"] : ["verify"]; + break; + case "RS256": + case "RS384": + case "RS512": + algorithm = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${jwk.alg.slice(-3)}` }; + keyUsages = jwk.d ? ["sign"] : ["verify"]; + break; + case "RSA-OAEP": + case "RSA-OAEP-256": + case "RSA-OAEP-384": + case "RSA-OAEP-512": + algorithm = { + name: "RSA-OAEP", + hash: `SHA-${parseInt(jwk.alg.slice(-3), 10) || 1}` + }; + keyUsages = jwk.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"]; + break; + default: + throw new JOSENotSupported(unsupportedAlg); + } + break; + } + case "EC": { + switch (jwk.alg) { + case "ES256": + case "ES384": + case "ES512": + algorithm = { + name: "ECDSA", + namedCurve: { ES256: "P-256", ES384: "P-384", ES512: "P-521" }[jwk.alg] + }; + keyUsages = jwk.d ? ["sign"] : ["verify"]; + break; + case "ECDH-ES": + case "ECDH-ES+A128KW": + case "ECDH-ES+A192KW": + case "ECDH-ES+A256KW": + algorithm = { name: "ECDH", namedCurve: jwk.crv }; + keyUsages = jwk.d ? ["deriveBits"] : []; + break; + default: + throw new JOSENotSupported(unsupportedAlg); + } + break; + } + case "OKP": { + switch (jwk.alg) { + case "Ed25519": + case "EdDSA": + algorithm = { name: "Ed25519" }; + keyUsages = jwk.d ? ["sign"] : ["verify"]; + break; + case "ECDH-ES": + case "ECDH-ES+A128KW": + case "ECDH-ES+A192KW": + case "ECDH-ES+A256KW": + algorithm = { name: jwk.crv }; + keyUsages = jwk.d ? ["deriveBits"] : []; + break; + default: + throw new JOSENotSupported(unsupportedAlg); + } + break; + } + default: + throw new JOSENotSupported('Invalid or unsupported JWK "kty" (Key Type) Parameter value'); + } + return { algorithm, keyUsages }; +} +async function jwkToKey(jwk) { + if (!jwk.alg) { + throw new TypeError('"alg" argument is required when "jwk.alg" is not present'); + } + const { algorithm, keyUsages } = subtleMapping(jwk); + const keyData = { ...jwk }; + if (keyData.kty !== "AKP") { + delete keyData.alg; + } + delete keyData.use; + return crypto.subtle.importKey("jwk", keyData, algorithm, jwk.ext ?? (jwk.d || jwk.priv ? false : true), jwk.key_ops ?? keyUsages); +} +var unsupportedAlg; +var init_jwk_to_key = __esm({ + "../../node_modules/jose/dist/webapi/lib/jwk_to_key.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_errors2(); + unsupportedAlg = 'Invalid or unsupported JWK "alg" (Algorithm) Parameter value'; + __name(subtleMapping, "subtleMapping"); + __name(jwkToKey, "jwkToKey"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/normalize_key.js +async function normalizeKey(key, alg) { + if (key instanceof Uint8Array) { + return key; + } + if (isCryptoKey(key)) { + return key; + } + if (isKeyObject(key)) { + if (key.type === "secret") { + return key.export(); + } + if ("toCryptoKey" in key && typeof key.toCryptoKey === "function") { + try { + return handleKeyObject(key, alg); + } catch (err) { + if (err instanceof TypeError) { + throw err; + } + } + } + let jwk = key.export({ format: "jwk" }); + return handleJWK(key, jwk, alg); + } + if (isJWK(key)) { + if (key.k) { + return decode(key.k); + } + return handleJWK(key, key, alg, true); + } + throw new Error("unreachable"); +} +var unusableForAlg, cache, handleJWK, handleKeyObject; +var init_normalize_key = __esm({ + "../../node_modules/jose/dist/webapi/lib/normalize_key.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_type_checks(); + init_base64url(); + init_jwk_to_key(); + init_is_key_like(); + unusableForAlg = "given KeyObject instance cannot be used for this algorithm"; + handleJWK = /* @__PURE__ */ __name(async (key, jwk, alg, freeze = false) => { + cache ||= /* @__PURE__ */ new WeakMap(); + let cached2 = cache.get(key); + if (cached2?.[alg]) { + return cached2[alg]; + } + const cryptoKey = await jwkToKey({ ...jwk, alg }); + if (freeze) + Object.freeze(key); + if (!cached2) { + cache.set(key, { [alg]: cryptoKey }); + } else { + cached2[alg] = cryptoKey; + } + return cryptoKey; + }, "handleJWK"); + handleKeyObject = /* @__PURE__ */ __name((keyObject, alg) => { + cache ||= /* @__PURE__ */ new WeakMap(); + let cached2 = cache.get(keyObject); + if (cached2?.[alg]) { + return cached2[alg]; + } + const isPublic = keyObject.type === "public"; + const extractable = isPublic ? true : false; + let cryptoKey; + if (keyObject.asymmetricKeyType === "x25519") { + switch (alg) { + case "ECDH-ES": + case "ECDH-ES+A128KW": + case "ECDH-ES+A192KW": + case "ECDH-ES+A256KW": + break; + default: + throw new TypeError(unusableForAlg); + } + cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, isPublic ? [] : ["deriveBits"]); + } + if (keyObject.asymmetricKeyType === "ed25519") { + if (alg !== "EdDSA" && alg !== "Ed25519") { + throw new TypeError(unusableForAlg); + } + cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [ + isPublic ? "verify" : "sign" + ]); + } + switch (keyObject.asymmetricKeyType) { + case "ml-dsa-44": + case "ml-dsa-65": + case "ml-dsa-87": { + if (alg !== keyObject.asymmetricKeyType.toUpperCase()) { + throw new TypeError(unusableForAlg); + } + cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [ + isPublic ? "verify" : "sign" + ]); + } + } + if (keyObject.asymmetricKeyType === "rsa") { + let hash4; + switch (alg) { + case "RSA-OAEP": + hash4 = "SHA-1"; + break; + case "RS256": + case "PS256": + case "RSA-OAEP-256": + hash4 = "SHA-256"; + break; + case "RS384": + case "PS384": + case "RSA-OAEP-384": + hash4 = "SHA-384"; + break; + case "RS512": + case "PS512": + case "RSA-OAEP-512": + hash4 = "SHA-512"; + break; + default: + throw new TypeError(unusableForAlg); + } + if (alg.startsWith("RSA-OAEP")) { + return keyObject.toCryptoKey({ + name: "RSA-OAEP", + hash: hash4 + }, extractable, isPublic ? ["encrypt"] : ["decrypt"]); + } + cryptoKey = keyObject.toCryptoKey({ + name: alg.startsWith("PS") ? "RSA-PSS" : "RSASSA-PKCS1-v1_5", + hash: hash4 + }, extractable, [isPublic ? "verify" : "sign"]); + } + if (keyObject.asymmetricKeyType === "ec") { + const nist = /* @__PURE__ */ new Map([ + ["prime256v1", "P-256"], + ["secp384r1", "P-384"], + ["secp521r1", "P-521"] + ]); + const namedCurve = nist.get(keyObject.asymmetricKeyDetails?.namedCurve); + if (!namedCurve) { + throw new TypeError(unusableForAlg); + } + const expectedCurve = { ES256: "P-256", ES384: "P-384", ES512: "P-521" }; + if (expectedCurve[alg] && namedCurve === expectedCurve[alg]) { + cryptoKey = keyObject.toCryptoKey({ + name: "ECDSA", + namedCurve + }, extractable, [isPublic ? "verify" : "sign"]); + } + if (alg.startsWith("ECDH-ES")) { + cryptoKey = keyObject.toCryptoKey({ + name: "ECDH", + namedCurve + }, extractable, isPublic ? [] : ["deriveBits"]); + } + } + if (!cryptoKey) { + throw new TypeError(unusableForAlg); + } + if (!cached2) { + cache.set(keyObject, { [alg]: cryptoKey }); + } else { + cached2[alg] = cryptoKey; + } + return cryptoKey; + }, "handleKeyObject"); + __name(normalizeKey, "normalizeKey"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/validate_crit.js +function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) { + if (joseHeader.crit !== void 0 && protectedHeader?.crit === void 0) { + throw new Err('"crit" (Critical) Header Parameter MUST be integrity protected'); + } + if (!protectedHeader || protectedHeader.crit === void 0) { + return /* @__PURE__ */ new Set(); + } + if (!Array.isArray(protectedHeader.crit) || protectedHeader.crit.length === 0 || protectedHeader.crit.some((input) => typeof input !== "string" || input.length === 0)) { + throw new Err('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present'); + } + let recognized; + if (recognizedOption !== void 0) { + recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]); + } else { + recognized = recognizedDefault; + } + for (const parameter of protectedHeader.crit) { + if (!recognized.has(parameter)) { + throw new JOSENotSupported(`Extension Header Parameter "${parameter}" is not recognized`); + } + if (joseHeader[parameter] === void 0) { + throw new Err(`Extension Header Parameter "${parameter}" is missing`); + } + if (recognized.get(parameter) && protectedHeader[parameter] === void 0) { + throw new Err(`Extension Header Parameter "${parameter}" MUST be integrity protected`); + } + } + return new Set(protectedHeader.crit); +} +var init_validate_crit = __esm({ + "../../node_modules/jose/dist/webapi/lib/validate_crit.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_errors2(); + __name(validateCrit, "validateCrit"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/validate_algorithms.js +function validateAlgorithms(option, algorithms) { + if (algorithms !== void 0 && (!Array.isArray(algorithms) || algorithms.some((s2) => typeof s2 !== "string"))) { + throw new TypeError(`"${option}" option must be an array of strings`); + } + if (!algorithms) { + return void 0; + } + return new Set(algorithms); +} +var init_validate_algorithms = __esm({ + "../../node_modules/jose/dist/webapi/lib/validate_algorithms.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(validateAlgorithms, "validateAlgorithms"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/check_key_type.js +function checkKeyType(alg, key, usage) { + switch (alg.substring(0, 2)) { + case "A1": + case "A2": + case "di": + case "HS": + case "PB": + symmetricTypeCheck(alg, key, usage); + break; + default: + asymmetricTypeCheck(alg, key, usage); + } +} +var tag, jwkMatchesOp, symmetricTypeCheck, asymmetricTypeCheck; +var init_check_key_type = __esm({ + "../../node_modules/jose/dist/webapi/lib/check_key_type.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_invalid_key_input(); + init_is_key_like(); + init_type_checks(); + tag = /* @__PURE__ */ __name((key) => key?.[Symbol.toStringTag], "tag"); + jwkMatchesOp = /* @__PURE__ */ __name((alg, key, usage) => { + if (key.use !== void 0) { + let expected; + switch (usage) { + case "sign": + case "verify": + expected = "sig"; + break; + case "encrypt": + case "decrypt": + expected = "enc"; + break; + } + if (key.use !== expected) { + throw new TypeError(`Invalid key for this operation, its "use" must be "${expected}" when present`); + } + } + if (key.alg !== void 0 && key.alg !== alg) { + throw new TypeError(`Invalid key for this operation, its "alg" must be "${alg}" when present`); + } + if (Array.isArray(key.key_ops)) { + let expectedKeyOp; + switch (true) { + case (usage === "sign" || usage === "verify"): + case alg === "dir": + case alg.includes("CBC-HS"): + expectedKeyOp = usage; + break; + case alg.startsWith("PBES2"): + expectedKeyOp = "deriveBits"; + break; + case /^A\d{3}(?:GCM)?(?:KW)?$/.test(alg): + if (!alg.includes("GCM") && alg.endsWith("KW")) { + expectedKeyOp = usage === "encrypt" ? "wrapKey" : "unwrapKey"; + } else { + expectedKeyOp = usage; + } + break; + case (usage === "encrypt" && alg.startsWith("RSA")): + expectedKeyOp = "wrapKey"; + break; + case usage === "decrypt": + expectedKeyOp = alg.startsWith("RSA") ? "unwrapKey" : "deriveBits"; + break; + } + if (expectedKeyOp && key.key_ops?.includes?.(expectedKeyOp) === false) { + throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${expectedKeyOp}" when present`); + } + } + return true; + }, "jwkMatchesOp"); + symmetricTypeCheck = /* @__PURE__ */ __name((alg, key, usage) => { + if (key instanceof Uint8Array) + return; + if (isJWK(key)) { + if (isSecretJWK(key) && jwkMatchesOp(alg, key, usage)) + return; + throw new TypeError(`JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present`); + } + if (!isKeyLike(key)) { + throw new TypeError(withAlg(alg, key, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array")); + } + if (key.type !== "secret") { + throw new TypeError(`${tag(key)} instances for symmetric algorithms must be of type "secret"`); + } + }, "symmetricTypeCheck"); + asymmetricTypeCheck = /* @__PURE__ */ __name((alg, key, usage) => { + if (isJWK(key)) { + switch (usage) { + case "decrypt": + case "sign": + if (isPrivateJWK(key) && jwkMatchesOp(alg, key, usage)) + return; + throw new TypeError(`JSON Web Key for this operation must be a private JWK`); + case "encrypt": + case "verify": + if (isPublicJWK(key) && jwkMatchesOp(alg, key, usage)) + return; + throw new TypeError(`JSON Web Key for this operation must be a public JWK`); + } + } + if (!isKeyLike(key)) { + throw new TypeError(withAlg(alg, key, "CryptoKey", "KeyObject", "JSON Web Key")); + } + if (key.type === "secret") { + throw new TypeError(`${tag(key)} instances for asymmetric algorithms must not be of type "secret"`); + } + if (key.type === "public") { + switch (usage) { + case "sign": + throw new TypeError(`${tag(key)} instances for asymmetric algorithm signing must be of type "private"`); + case "decrypt": + throw new TypeError(`${tag(key)} instances for asymmetric algorithm decryption must be of type "private"`); + } + } + if (key.type === "private") { + switch (usage) { + case "verify": + throw new TypeError(`${tag(key)} instances for asymmetric algorithm verifying must be of type "public"`); + case "encrypt": + throw new TypeError(`${tag(key)} instances for asymmetric algorithm encryption must be of type "public"`); + } + } + }, "asymmetricTypeCheck"); + __name(checkKeyType, "checkKeyType"); + } +}); + +// ../../node_modules/jose/dist/webapi/jws/flattened/verify.js +async function flattenedVerify(jws, key, options) { + if (!isObject2(jws)) { + throw new JWSInvalid("Flattened JWS must be an object"); + } + if (jws.protected === void 0 && jws.header === void 0) { + throw new JWSInvalid('Flattened JWS must have either of the "protected" or "header" members'); + } + if (jws.protected !== void 0 && typeof jws.protected !== "string") { + throw new JWSInvalid("JWS Protected Header incorrect type"); + } + if (jws.payload === void 0) { + throw new JWSInvalid("JWS Payload missing"); + } + if (typeof jws.signature !== "string") { + throw new JWSInvalid("JWS Signature missing or incorrect type"); + } + if (jws.header !== void 0 && !isObject2(jws.header)) { + throw new JWSInvalid("JWS Unprotected Header incorrect type"); + } + let parsedProt = {}; + if (jws.protected) { + try { + const protectedHeader = decode(jws.protected); + parsedProt = JSON.parse(decoder.decode(protectedHeader)); + } catch { + throw new JWSInvalid("JWS Protected Header is invalid"); + } + } + if (!isDisjoint(parsedProt, jws.header)) { + throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint"); + } + const joseHeader = { + ...parsedProt, + ...jws.header + }; + const extensions = validateCrit(JWSInvalid, /* @__PURE__ */ new Map([["b64", true]]), options?.crit, parsedProt, joseHeader); + let b64 = true; + if (extensions.has("b64")) { + b64 = parsedProt.b64; + if (typeof b64 !== "boolean") { + throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean'); + } + } + const { alg } = joseHeader; + if (typeof alg !== "string" || !alg) { + throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid'); + } + const algorithms = options && validateAlgorithms("algorithms", options.algorithms); + if (algorithms && !algorithms.has(alg)) { + throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter value not allowed'); + } + if (b64) { + if (typeof jws.payload !== "string") { + throw new JWSInvalid("JWS Payload must be a string"); + } + } else if (typeof jws.payload !== "string" && !(jws.payload instanceof Uint8Array)) { + throw new JWSInvalid("JWS Payload must be a string or an Uint8Array instance"); + } + let resolvedKey = false; + if (typeof key === "function") { + key = await key(parsedProt, jws); + resolvedKey = true; + } + checkKeyType(alg, key, "verify"); + const data = concat(jws.protected !== void 0 ? encode(jws.protected) : new Uint8Array(), encode("."), typeof jws.payload === "string" ? b64 ? encode(jws.payload) : encoder.encode(jws.payload) : jws.payload); + const signature = decodeBase64url(jws.signature, "signature", JWSInvalid); + const k2 = await normalizeKey(key, alg); + const verified = await verify(alg, k2, signature, data); + if (!verified) { + throw new JWSSignatureVerificationFailed(); + } + let payload; + if (b64) { + payload = decodeBase64url(jws.payload, "payload", JWSInvalid); + } else if (typeof jws.payload === "string") { + payload = encoder.encode(jws.payload); + } else { + payload = jws.payload; + } + const result = { payload }; + if (jws.protected !== void 0) { + result.protectedHeader = parsedProt; + } + if (jws.header !== void 0) { + result.unprotectedHeader = jws.header; + } + if (resolvedKey) { + return { ...result, key: k2 }; + } + return result; +} +var init_verify = __esm({ + "../../node_modules/jose/dist/webapi/jws/flattened/verify.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_base64url(); + init_signing(); + init_errors2(); + init_buffer_utils(); + init_helpers(); + init_type_checks(); + init_type_checks(); + init_check_key_type(); + init_validate_crit(); + init_validate_algorithms(); + init_normalize_key(); + __name(flattenedVerify, "flattenedVerify"); + } +}); + +// ../../node_modules/jose/dist/webapi/jws/compact/verify.js +async function compactVerify(jws, key, options) { + if (jws instanceof Uint8Array) { + jws = decoder.decode(jws); + } + if (typeof jws !== "string") { + throw new JWSInvalid("Compact JWS must be a string or Uint8Array"); + } + const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split("."); + if (length !== 3) { + throw new JWSInvalid("Invalid Compact JWS"); + } + const verified = await flattenedVerify({ payload, protected: protectedHeader, signature }, key, options); + const result = { payload: verified.payload, protectedHeader: verified.protectedHeader }; + if (typeof key === "function") { + return { ...result, key: verified.key }; + } + return result; +} +var init_verify2 = __esm({ + "../../node_modules/jose/dist/webapi/jws/compact/verify.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_verify(); + init_errors2(); + init_buffer_utils(); + __name(compactVerify, "compactVerify"); + } +}); + +// ../../node_modules/jose/dist/webapi/lib/jwt_claims_set.js +function secs(str) { + const matched = REGEX.exec(str); + if (!matched || matched[4] && matched[1]) { + throw new TypeError("Invalid time period format"); + } + const value = parseFloat(matched[2]); + const unit = matched[3].toLowerCase(); + let numericDate; + switch (unit) { + case "sec": + case "secs": + case "second": + case "seconds": + case "s": + numericDate = Math.round(value); + break; + case "minute": + case "minutes": + case "min": + case "mins": + case "m": + numericDate = Math.round(value * minute); + break; + case "hour": + case "hours": + case "hr": + case "hrs": + case "h": + numericDate = Math.round(value * hour); + break; + case "day": + case "days": + case "d": + numericDate = Math.round(value * day); + break; + case "week": + case "weeks": + case "w": + numericDate = Math.round(value * week); + break; + default: + numericDate = Math.round(value * year); + break; + } + if (matched[1] === "-" || matched[4] === "ago") { + return -numericDate; + } + return numericDate; +} +function validateInput(label, input) { + if (!Number.isFinite(input)) { + throw new TypeError(`Invalid ${label} input`); + } + return input; +} +function validateClaimsSet(protectedHeader, encodedPayload, options = {}) { + let payload; + try { + payload = JSON.parse(decoder.decode(encodedPayload)); + } catch { + } + if (!isObject2(payload)) { + throw new JWTInvalid("JWT Claims Set must be a top-level JSON object"); + } + const { typ } = options; + if (typ && (typeof protectedHeader.typ !== "string" || normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) { + throw new JWTClaimValidationFailed('unexpected "typ" JWT header value', payload, "typ", "check_failed"); + } + const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options; + const presenceCheck = [...requiredClaims]; + if (maxTokenAge !== void 0) + presenceCheck.push("iat"); + if (audience !== void 0) + presenceCheck.push("aud"); + if (subject !== void 0) + presenceCheck.push("sub"); + if (issuer !== void 0) + presenceCheck.push("iss"); + for (const claim of new Set(presenceCheck.reverse())) { + if (!(claim in payload)) { + throw new JWTClaimValidationFailed(`missing required "${claim}" claim`, payload, claim, "missing"); + } + } + if (issuer && !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) { + throw new JWTClaimValidationFailed('unexpected "iss" claim value', payload, "iss", "check_failed"); + } + if (subject && payload.sub !== subject) { + throw new JWTClaimValidationFailed('unexpected "sub" claim value', payload, "sub", "check_failed"); + } + if (audience && !checkAudiencePresence(payload.aud, typeof audience === "string" ? [audience] : audience)) { + throw new JWTClaimValidationFailed('unexpected "aud" claim value', payload, "aud", "check_failed"); + } + let tolerance; + switch (typeof options.clockTolerance) { + case "string": + tolerance = secs(options.clockTolerance); + break; + case "number": + tolerance = options.clockTolerance; + break; + case "undefined": + tolerance = 0; + break; + default: + throw new TypeError("Invalid clockTolerance option type"); + } + const { currentDate } = options; + const now = epoch(currentDate || /* @__PURE__ */ new Date()); + if ((payload.iat !== void 0 || maxTokenAge) && typeof payload.iat !== "number") { + throw new JWTClaimValidationFailed('"iat" claim must be a number', payload, "iat", "invalid"); + } + if (payload.nbf !== void 0) { + if (typeof payload.nbf !== "number") { + throw new JWTClaimValidationFailed('"nbf" claim must be a number', payload, "nbf", "invalid"); + } + if (payload.nbf > now + tolerance) { + throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed', payload, "nbf", "check_failed"); + } + } + if (payload.exp !== void 0) { + if (typeof payload.exp !== "number") { + throw new JWTClaimValidationFailed('"exp" claim must be a number', payload, "exp", "invalid"); + } + if (payload.exp <= now - tolerance) { + throw new JWTExpired('"exp" claim timestamp check failed', payload, "exp", "check_failed"); + } + } + if (maxTokenAge) { + const age = now - payload.iat; + const max2 = typeof maxTokenAge === "number" ? maxTokenAge : secs(maxTokenAge); + if (age - tolerance > max2) { + throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)', payload, "iat", "check_failed"); + } + if (age < 0 - tolerance) { + throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)', payload, "iat", "check_failed"); + } + } + return payload; +} +var epoch, minute, hour, day, week, year, REGEX, normalizeTyp, checkAudiencePresence, JWTClaimsBuilder; +var init_jwt_claims_set = __esm({ + "../../node_modules/jose/dist/webapi/lib/jwt_claims_set.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_errors2(); + init_buffer_utils(); + init_type_checks(); + epoch = /* @__PURE__ */ __name((date6) => Math.floor(date6.getTime() / 1e3), "epoch"); + minute = 60; + hour = minute * 60; + day = hour * 24; + week = day * 7; + year = day * 365.25; + REGEX = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i; + __name(secs, "secs"); + __name(validateInput, "validateInput"); + normalizeTyp = /* @__PURE__ */ __name((value) => { + if (value.includes("/")) { + return value.toLowerCase(); + } + return `application/${value.toLowerCase()}`; + }, "normalizeTyp"); + checkAudiencePresence = /* @__PURE__ */ __name((audPayload, audOption) => { + if (typeof audPayload === "string") { + return audOption.includes(audPayload); + } + if (Array.isArray(audPayload)) { + return audOption.some(Set.prototype.has.bind(new Set(audPayload))); + } + return false; + }, "checkAudiencePresence"); + __name(validateClaimsSet, "validateClaimsSet"); + JWTClaimsBuilder = class { + #payload; + constructor(payload) { + if (!isObject2(payload)) { + throw new TypeError("JWT Claims Set MUST be an object"); + } + this.#payload = structuredClone(payload); + } + data() { + return encoder.encode(JSON.stringify(this.#payload)); + } + get iss() { + return this.#payload.iss; + } + set iss(value) { + this.#payload.iss = value; + } + get sub() { + return this.#payload.sub; + } + set sub(value) { + this.#payload.sub = value; + } + get aud() { + return this.#payload.aud; + } + set aud(value) { + this.#payload.aud = value; + } + set jti(value) { + this.#payload.jti = value; + } + set nbf(value) { + if (typeof value === "number") { + this.#payload.nbf = validateInput("setNotBefore", value); + } else if (value instanceof Date) { + this.#payload.nbf = validateInput("setNotBefore", epoch(value)); + } else { + this.#payload.nbf = epoch(/* @__PURE__ */ new Date()) + secs(value); + } + } + set exp(value) { + if (typeof value === "number") { + this.#payload.exp = validateInput("setExpirationTime", value); + } else if (value instanceof Date) { + this.#payload.exp = validateInput("setExpirationTime", epoch(value)); + } else { + this.#payload.exp = epoch(/* @__PURE__ */ new Date()) + secs(value); + } + } + set iat(value) { + if (value === void 0) { + this.#payload.iat = epoch(/* @__PURE__ */ new Date()); + } else if (value instanceof Date) { + this.#payload.iat = validateInput("setIssuedAt", epoch(value)); + } else if (typeof value === "string") { + this.#payload.iat = validateInput("setIssuedAt", epoch(/* @__PURE__ */ new Date()) + secs(value)); + } else { + this.#payload.iat = validateInput("setIssuedAt", value); + } + } + }; + __name(JWTClaimsBuilder, "JWTClaimsBuilder"); + } +}); + +// ../../node_modules/jose/dist/webapi/jwt/verify.js +async function jwtVerify(jwt2, key, options) { + const verified = await compactVerify(jwt2, key, options); + if (verified.protectedHeader.crit?.includes("b64") && verified.protectedHeader.b64 === false) { + throw new JWTInvalid("JWTs MUST NOT use unencoded payload"); + } + const payload = validateClaimsSet(verified.protectedHeader, verified.payload, options); + const result = { payload, protectedHeader: verified.protectedHeader }; + if (typeof key === "function") { + return { ...result, key: verified.key }; + } + return result; +} +var init_verify3 = __esm({ + "../../node_modules/jose/dist/webapi/jwt/verify.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_verify2(); + init_jwt_claims_set(); + init_errors2(); + __name(jwtVerify, "jwtVerify"); + } +}); + +// ../../node_modules/jose/dist/webapi/jws/flattened/sign.js +var FlattenedSign; +var init_sign = __esm({ + "../../node_modules/jose/dist/webapi/jws/flattened/sign.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_base64url(); + init_signing(); + init_type_checks(); + init_errors2(); + init_buffer_utils(); + init_check_key_type(); + init_validate_crit(); + init_normalize_key(); + init_helpers(); + FlattenedSign = class { + #payload; + #protectedHeader; + #unprotectedHeader; + constructor(payload) { + if (!(payload instanceof Uint8Array)) { + throw new TypeError("payload must be an instance of Uint8Array"); + } + this.#payload = payload; + } + setProtectedHeader(protectedHeader) { + assertNotSet(this.#protectedHeader, "setProtectedHeader"); + this.#protectedHeader = protectedHeader; + return this; + } + setUnprotectedHeader(unprotectedHeader) { + assertNotSet(this.#unprotectedHeader, "setUnprotectedHeader"); + this.#unprotectedHeader = unprotectedHeader; + return this; + } + async sign(key, options) { + if (!this.#protectedHeader && !this.#unprotectedHeader) { + throw new JWSInvalid("either setProtectedHeader or setUnprotectedHeader must be called before #sign()"); + } + if (!isDisjoint(this.#protectedHeader, this.#unprotectedHeader)) { + throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint"); + } + const joseHeader = { + ...this.#protectedHeader, + ...this.#unprotectedHeader + }; + const extensions = validateCrit(JWSInvalid, /* @__PURE__ */ new Map([["b64", true]]), options?.crit, this.#protectedHeader, joseHeader); + let b64 = true; + if (extensions.has("b64")) { + b64 = this.#protectedHeader.b64; + if (typeof b64 !== "boolean") { + throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean'); + } + } + const { alg } = joseHeader; + if (typeof alg !== "string" || !alg) { + throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid'); + } + checkKeyType(alg, key, "sign"); + let payloadS; + let payloadB; + if (b64) { + payloadS = encode2(this.#payload); + payloadB = encode(payloadS); + } else { + payloadB = this.#payload; + payloadS = ""; + } + let protectedHeaderString; + let protectedHeaderBytes; + if (this.#protectedHeader) { + protectedHeaderString = encode2(JSON.stringify(this.#protectedHeader)); + protectedHeaderBytes = encode(protectedHeaderString); + } else { + protectedHeaderString = ""; + protectedHeaderBytes = new Uint8Array(); + } + const data = concat(protectedHeaderBytes, encode("."), payloadB); + const k2 = await normalizeKey(key, alg); + const signature = await sign(alg, k2, data); + const jws = { + signature: encode2(signature), + payload: payloadS + }; + if (this.#unprotectedHeader) { + jws.header = this.#unprotectedHeader; + } + if (this.#protectedHeader) { + jws.protected = protectedHeaderString; + } + return jws; + } + }; + __name(FlattenedSign, "FlattenedSign"); + } +}); + +// ../../node_modules/jose/dist/webapi/jws/compact/sign.js +var CompactSign; +var init_sign2 = __esm({ + "../../node_modules/jose/dist/webapi/jws/compact/sign.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sign(); + CompactSign = class { + #flattened; + constructor(payload) { + this.#flattened = new FlattenedSign(payload); + } + setProtectedHeader(protectedHeader) { + this.#flattened.setProtectedHeader(protectedHeader); + return this; + } + async sign(key, options) { + const jws = await this.#flattened.sign(key, options); + if (jws.payload === void 0) { + throw new TypeError("use the flattened module for creating JWS with b64: false"); + } + return `${jws.protected}.${jws.payload}.${jws.signature}`; + } + }; + __name(CompactSign, "CompactSign"); + } +}); + +// ../../node_modules/jose/dist/webapi/jwt/sign.js +var SignJWT; +var init_sign3 = __esm({ + "../../node_modules/jose/dist/webapi/jwt/sign.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sign2(); + init_errors2(); + init_jwt_claims_set(); + SignJWT = class { + #protectedHeader; + #jwt; + constructor(payload = {}) { + this.#jwt = new JWTClaimsBuilder(payload); + } + setIssuer(issuer) { + this.#jwt.iss = issuer; + return this; + } + setSubject(subject) { + this.#jwt.sub = subject; + return this; + } + setAudience(audience) { + this.#jwt.aud = audience; + return this; + } + setJti(jwtId) { + this.#jwt.jti = jwtId; + return this; + } + setNotBefore(input) { + this.#jwt.nbf = input; + return this; + } + setExpirationTime(input) { + this.#jwt.exp = input; + return this; + } + setIssuedAt(input) { + this.#jwt.iat = input; + return this; + } + setProtectedHeader(protectedHeader) { + this.#protectedHeader = protectedHeader; + return this; + } + async sign(key, options) { + const sig = new CompactSign(this.#jwt.data()); + sig.setProtectedHeader(this.#protectedHeader); + if (Array.isArray(this.#protectedHeader?.crit) && this.#protectedHeader.crit.includes("b64") && this.#protectedHeader.b64 === false) { + throw new JWTInvalid("JWTs MUST NOT use unencoded payload"); + } + return sig.sign(key, options); + } + }; + __name(SignJWT, "SignJWT"); + } +}); + +// ../../node_modules/jose/dist/webapi/index.js +var init_webapi = __esm({ + "../../node_modules/jose/dist/webapi/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_verify3(); + init_sign3(); + } +}); + +// src/lib/api-error.ts +var ApiError; +var init_api_error = __esm({ + "src/lib/api-error.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ApiError = class extends Error { + statusCode; + details; + constructor(message2, statusCode = 500, details) { + console.log(message2); + super(message2); + this.name = "ApiError"; + this.statusCode = statusCode; + this.details = details; + } + }; + __name(ApiError, "ApiError"); + } +}); + +// src/lib/env-exporter.ts +var getRuntimeEnv, runtimeEnv, appUrl, jwtSecret, getEncodedJwtSecret, s3AccessKeyId, s3SecretAccessKey, s3BucketName, s3Region, assetsDomain, apiCacheKey, cloudflareApiToken, cloudflareZoneId, s3Url, redisUrl, expoAccessToken, phonePeBaseUrl, phonePeClientId, phonePeClientVersion, phonePeClientSecret, phonePeMerchantId, razorpayId, razorpaySecret, otpSenderAuthToken, minOrderValue, deliveryCharge, telegramBotToken, telegramChatIds, isDevMode; +var init_env_exporter = __esm({ + "src/lib/env-exporter.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getRuntimeEnv = /* @__PURE__ */ __name(() => globalThis.ENV || globalThis.process?.env || {}, "getRuntimeEnv"); + runtimeEnv = getRuntimeEnv(); + appUrl = runtimeEnv.APP_URL; + jwtSecret = runtimeEnv.JWT_SECRET; + getEncodedJwtSecret = /* @__PURE__ */ __name(() => { + const env2 = getRuntimeEnv(); + const secret = env2.JWT_SECRET || ""; + return new TextEncoder().encode(secret); + }, "getEncodedJwtSecret"); + s3AccessKeyId = runtimeEnv.S3_ACCESS_KEY_ID; + s3SecretAccessKey = runtimeEnv.S3_SECRET_ACCESS_KEY; + s3BucketName = runtimeEnv.S3_BUCKET_NAME; + s3Region = runtimeEnv.S3_REGION; + assetsDomain = runtimeEnv.ASSETS_DOMAIN; + apiCacheKey = runtimeEnv.API_CACHE_KEY; + cloudflareApiToken = runtimeEnv.CLOUDFLARE_API_TOKEN; + cloudflareZoneId = runtimeEnv.CLOUDFLARE_ZONE_ID; + s3Url = runtimeEnv.S3_URL; + redisUrl = runtimeEnv.REDIS_URL; + expoAccessToken = runtimeEnv.EXPO_ACCESS_TOKEN; + phonePeBaseUrl = runtimeEnv.PHONE_PE_BASE_URL; + phonePeClientId = runtimeEnv.PHONE_PE_CLIENT_ID; + phonePeClientVersion = Number(runtimeEnv.PHONE_PE_CLIENT_VERSION); + phonePeClientSecret = runtimeEnv.PHONE_PE_CLIENT_SECRET; + phonePeMerchantId = runtimeEnv.PHONE_PE_MERCHANT_ID; + razorpayId = runtimeEnv.RAZORPAY_KEY; + razorpaySecret = runtimeEnv.RAZORPAY_SECRET; + otpSenderAuthToken = runtimeEnv.OTP_SENDER_AUTH_TOKEN; + minOrderValue = Number(runtimeEnv.MIN_ORDER_VALUE); + deliveryCharge = Number(runtimeEnv.DELIVERY_CHARGE); + telegramBotToken = runtimeEnv.TELEGRAM_BOT_TOKEN; + telegramChatIds = runtimeEnv.TELEGRAM_CHAT_IDS?.split(",").map((id) => id.trim()) || []; + isDevMode = runtimeEnv.ENV_MODE === "dev"; + } +}); + +// src/middleware/staff-auth.ts +var verifyStaffToken, authenticateStaff; +var init_staff_auth = __esm({ + "src/middleware/staff-auth.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_webapi(); + init_dbService(); + init_api_error(); + init_env_exporter(); + verifyStaffToken = /* @__PURE__ */ __name(async (token) => { + try { + const { payload } = await jwtVerify(token, getEncodedJwtSecret()); + return payload; + } catch (error50) { + throw new ApiError("Access denied. Invalid auth credentials", 401); + } + }, "verifyStaffToken"); + authenticateStaff = /* @__PURE__ */ __name(async (c2, next) => { + try { + const authHeader = c2.req.header("authorization"); + if (!authHeader || !authHeader.startsWith("Bearer ")) { + throw new ApiError("Staff authentication required", 401); + } + const token = authHeader.split(" ")[1]; + if (!token) { + throw new ApiError("Staff authentication token missing", 401); + } + const decoded = await verifyStaffToken(token); + if (!decoded.staffId) { + throw new ApiError("Invalid staff token format", 401); + } + const staff = await getStaffUserById(decoded.staffId); + if (!staff) { + throw new ApiError("Staff user not found", 401); + } + c2.set("staffUser", { + id: staff.id, + name: staff.name + }); + await next(); + } catch (error50) { + throw error50; + } + }, "authenticateStaff"); + } +}); + +// src/apis/admin-apis/apis/av-router.ts +var router, avRouter, av_router_default; +var init_av_router = __esm({ + "src/apis/admin-apis/apis/av-router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_staff_auth(); + router = new Hono2(); + router.use("*", authenticateStaff); + avRouter = router; + av_router_default = avRouter; + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js +var getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig; +var init_httpExtensionConfiguration = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + setHttpHandler(handler) { + runtimeConfig.httpHandler = handler; + }, + httpHandler() { + return runtimeConfig.httpHandler; + }, + updateHttpClientConfig(key, value) { + runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); + }, + httpHandlerConfigs() { + return runtimeConfig.httpHandler.httpHandlerConfigs(); + } + }; + }, "getHttpHandlerExtensionConfiguration"); + resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => { + return { + httpHandler: httpHandlerExtensionConfiguration.httpHandler() + }; + }, "resolveHttpHandlerRuntimeConfig"); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/extensions/index.js +var init_extensions = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/extensions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpExtensionConfiguration(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/abort.js +var init_abort = __esm({ + "../../node_modules/@smithy/types/dist-es/abort.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/auth.js +var HttpAuthLocation; +var init_auth2 = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/auth.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(HttpAuthLocation2) { + HttpAuthLocation2["HEADER"] = "header"; + HttpAuthLocation2["QUERY"] = "query"; + })(HttpAuthLocation || (HttpAuthLocation = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js +var HttpApiKeyAuthLocation; +var init_HttpApiKeyAuth = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(HttpApiKeyAuthLocation2) { + HttpApiKeyAuthLocation2["HEADER"] = "header"; + HttpApiKeyAuthLocation2["QUERY"] = "query"; + })(HttpApiKeyAuthLocation || (HttpApiKeyAuthLocation = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js +var init_HttpAuthScheme = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js +var init_HttpAuthSchemeProvider = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/HttpSigner.js +var init_HttpSigner = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/HttpSigner.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js +var init_IdentityProviderConfig = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/auth/index.js +var init_auth3 = __esm({ + "../../node_modules/@smithy/types/dist-es/auth/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_auth2(); + init_HttpApiKeyAuth(); + init_HttpAuthScheme(); + init_HttpAuthSchemeProvider(); + init_HttpSigner(); + init_IdentityProviderConfig(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js +var init_blob_payload_input_types = __esm({ + "../../node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/checksum.js +var init_checksum = __esm({ + "../../node_modules/@smithy/types/dist-es/checksum.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/client.js +var init_client = __esm({ + "../../node_modules/@smithy/types/dist-es/client.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/command.js +var init_command = __esm({ + "../../node_modules/@smithy/types/dist-es/command.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/connection/config.js +var init_config = __esm({ + "../../node_modules/@smithy/types/dist-es/connection/config.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/connection/manager.js +var init_manager = __esm({ + "../../node_modules/@smithy/types/dist-es/connection/manager.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/connection/pool.js +var init_pool = __esm({ + "../../node_modules/@smithy/types/dist-es/connection/pool.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/connection/index.js +var init_connection = __esm({ + "../../node_modules/@smithy/types/dist-es/connection/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_config(); + init_manager(); + init_pool(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/crypto.js +var init_crypto = __esm({ + "../../node_modules/@smithy/types/dist-es/crypto.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/encode.js +var init_encode = __esm({ + "../../node_modules/@smithy/types/dist-es/encode.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoint.js +var EndpointURLScheme; +var init_endpoint = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoint.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(EndpointURLScheme2) { + EndpointURLScheme2["HTTP"] = "http"; + EndpointURLScheme2["HTTPS"] = "https"; + })(EndpointURLScheme || (EndpointURLScheme = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js +var init_EndpointRuleObject = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js +var init_ErrorRuleObject = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js +var init_RuleSetObject = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/shared.js +var init_shared = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/shared.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js +var init_TreeRuleObject = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/endpoints/index.js +var init_endpoints = __esm({ + "../../node_modules/@smithy/types/dist-es/endpoints/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EndpointRuleObject(); + init_ErrorRuleObject(); + init_RuleSetObject(); + init_shared(); + init_TreeRuleObject(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/eventStream.js +var init_eventStream = __esm({ + "../../node_modules/@smithy/types/dist-es/eventStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/extensions/checksum.js +var AlgorithmId; +var init_checksum2 = __esm({ + "../../node_modules/@smithy/types/dist-es/extensions/checksum.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(AlgorithmId2) { + AlgorithmId2["MD5"] = "md5"; + AlgorithmId2["CRC32"] = "crc32"; + AlgorithmId2["CRC32C"] = "crc32c"; + AlgorithmId2["SHA1"] = "sha1"; + AlgorithmId2["SHA256"] = "sha256"; + })(AlgorithmId || (AlgorithmId = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js +var init_defaultClientConfiguration = __esm({ + "../../node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js +var init_defaultExtensionConfiguration = __esm({ + "../../node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/extensions/index.js +var init_extensions2 = __esm({ + "../../node_modules/@smithy/types/dist-es/extensions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_defaultClientConfiguration(); + init_defaultExtensionConfiguration(); + init_checksum2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/feature-ids.js +var init_feature_ids = __esm({ + "../../node_modules/@smithy/types/dist-es/feature-ids.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/http.js +var FieldPosition; +var init_http = __esm({ + "../../node_modules/@smithy/types/dist-es/http.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(FieldPosition2) { + FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER"; + FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER"; + })(FieldPosition || (FieldPosition = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js +var init_httpHandlerInitialization = __esm({ + "../../node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js +var init_apiKeyIdentity = __esm({ + "../../node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js +var init_awsCredentialIdentity = __esm({ + "../../node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/identity/identity.js +var init_identity = __esm({ + "../../node_modules/@smithy/types/dist-es/identity/identity.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/identity/tokenIdentity.js +var init_tokenIdentity = __esm({ + "../../node_modules/@smithy/types/dist-es/identity/tokenIdentity.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/identity/index.js +var init_identity2 = __esm({ + "../../node_modules/@smithy/types/dist-es/identity/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_apiKeyIdentity(); + init_awsCredentialIdentity(); + init_identity(); + init_tokenIdentity(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/logger.js +var init_logger3 = __esm({ + "../../node_modules/@smithy/types/dist-es/logger.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/middleware.js +var SMITHY_CONTEXT_KEY; +var init_middleware = __esm({ + "../../node_modules/@smithy/types/dist-es/middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SMITHY_CONTEXT_KEY = "__smithy_context"; + } +}); + +// ../../node_modules/@smithy/types/dist-es/pagination.js +var init_pagination = __esm({ + "../../node_modules/@smithy/types/dist-es/pagination.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/profile.js +var IniSectionType; +var init_profile = __esm({ + "../../node_modules/@smithy/types/dist-es/profile.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(IniSectionType2) { + IniSectionType2["PROFILE"] = "profile"; + IniSectionType2["SSO_SESSION"] = "sso-session"; + IniSectionType2["SERVICES"] = "services"; + })(IniSectionType || (IniSectionType = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/response.js +var init_response = __esm({ + "../../node_modules/@smithy/types/dist-es/response.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/retry.js +var init_retry = __esm({ + "../../node_modules/@smithy/types/dist-es/retry.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/schema/schema.js +var init_schema2 = __esm({ + "../../node_modules/@smithy/types/dist-es/schema/schema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/schema/traits.js +var init_traits = __esm({ + "../../node_modules/@smithy/types/dist-es/schema/traits.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/schema/schema-deprecated.js +var init_schema_deprecated = __esm({ + "../../node_modules/@smithy/types/dist-es/schema/schema-deprecated.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/schema/sentinels.js +var init_sentinels = __esm({ + "../../node_modules/@smithy/types/dist-es/schema/sentinels.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/schema/static-schemas.js +var init_static_schemas = __esm({ + "../../node_modules/@smithy/types/dist-es/schema/static-schemas.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/serde.js +var init_serde = __esm({ + "../../node_modules/@smithy/types/dist-es/serde.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/shapes.js +var init_shapes = __esm({ + "../../node_modules/@smithy/types/dist-es/shapes.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/signature.js +var init_signature = __esm({ + "../../node_modules/@smithy/types/dist-es/signature.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/stream.js +var init_stream = __esm({ + "../../node_modules/@smithy/types/dist-es/stream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js +var init_streaming_blob_common_types = __esm({ + "../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js +var init_streaming_blob_payload_input_types = __esm({ + "../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js +var init_streaming_blob_payload_output_types = __esm({ + "../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/transfer.js +var RequestHandlerProtocol; +var init_transfer = __esm({ + "../../node_modules/@smithy/types/dist-es/transfer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(RequestHandlerProtocol2) { + RequestHandlerProtocol2["HTTP_0_9"] = "http/0.9"; + RequestHandlerProtocol2["HTTP_1_0"] = "http/1.0"; + RequestHandlerProtocol2["TDS_8_0"] = "tds/8.0"; + })(RequestHandlerProtocol || (RequestHandlerProtocol = {})); + } +}); + +// ../../node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js +var init_client_payload_blob_type_narrow = __esm({ + "../../node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/transform/mutable.js +var init_mutable = __esm({ + "../../node_modules/@smithy/types/dist-es/transform/mutable.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/transform/no-undefined.js +var init_no_undefined = __esm({ + "../../node_modules/@smithy/types/dist-es/transform/no-undefined.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/transform/type-transform.js +var init_type_transform = __esm({ + "../../node_modules/@smithy/types/dist-es/transform/type-transform.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/uri.js +var init_uri = __esm({ + "../../node_modules/@smithy/types/dist-es/uri.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/util.js +var init_util = __esm({ + "../../node_modules/@smithy/types/dist-es/util.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/waiter.js +var init_waiter = __esm({ + "../../node_modules/@smithy/types/dist-es/waiter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/types/dist-es/index.js +var init_dist_es = __esm({ + "../../node_modules/@smithy/types/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_abort(); + init_auth3(); + init_blob_payload_input_types(); + init_checksum(); + init_client(); + init_command(); + init_connection(); + init_crypto(); + init_encode(); + init_endpoint(); + init_endpoints(); + init_eventStream(); + init_extensions2(); + init_feature_ids(); + init_http(); + init_httpHandlerInitialization(); + init_identity2(); + init_logger3(); + init_middleware(); + init_pagination(); + init_profile(); + init_response(); + init_retry(); + init_schema2(); + init_traits(); + init_schema_deprecated(); + init_sentinels(); + init_static_schemas(); + init_serde(); + init_shapes(); + init_signature(); + init_stream(); + init_streaming_blob_common_types(); + init_streaming_blob_payload_input_types(); + init_streaming_blob_payload_output_types(); + init_transfer(); + init_client_payload_blob_type_narrow(); + init_mutable(); + init_no_undefined(); + init_type_transform(); + init_uri(); + init_util(); + init_waiter(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/Field.js +var init_Field = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/Field.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/Fields.js +var init_Fields = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/Fields.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/httpHandler.js +var init_httpHandler = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/httpHandler.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/httpRequest.js +function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; + }, {}); +} +var HttpRequest; +var init_httpRequest = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/httpRequest.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + HttpRequest = class { + method; + protocol; + hostname; + port; + path; + query; + headers; + username; + password; + fragment; + body; + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; + this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; + } + static clone(request) { + const cloned = new HttpRequest({ + ...request, + headers: { ...request.headers } + }); + if (cloned.query) { + cloned.query = cloneQuery(cloned.query); + } + return cloned; + } + static isInstance(request) { + if (!request) { + return false; + } + const req = request; + return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; + } + clone() { + return HttpRequest.clone(this); + } + }; + __name(HttpRequest, "HttpRequest"); + __name(cloneQuery, "cloneQuery"); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/httpResponse.js +var HttpResponse; +var init_httpResponse = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/httpResponse.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + HttpResponse = class { + statusCode; + reason; + headers; + body; + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; + } + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + } + }; + __name(HttpResponse, "HttpResponse"); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/isValidHostname.js +var init_isValidHostname = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/isValidHostname.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/types.js +var init_types = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/protocol-http/dist-es/index.js +var init_dist_es2 = __esm({ + "../../node_modules/@smithy/protocol-http/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_extensions(); + init_Field(); + init_Fields(); + init_httpHandler(); + init_httpRequest(); + init_httpResponse(); + init_isValidHostname(); + init_types(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-expect-continue/dist-es/index.js +function addExpectContinueMiddleware(options) { + return (next) => async (args) => { + const { request } = args; + if (options.expectContinueHeader !== false && HttpRequest.isInstance(request) && request.body && options.runtime === "node" && options.requestHandler?.constructor?.name !== "FetchHttpHandler") { + let sendHeader = true; + if (typeof options.expectContinueHeader === "number") { + try { + const bodyLength = Number(request.headers?.["content-length"]) ?? options.bodyLengthChecker?.(request.body) ?? Infinity; + sendHeader = bodyLength >= options.expectContinueHeader; + } catch (e2) { + } + } else { + sendHeader = !!options.expectContinueHeader; + } + if (sendHeader) { + request.headers.Expect = "100-continue"; + } + } + return next({ + ...args, + request + }); + }; +} +var addExpectContinueMiddlewareOptions, getAddExpectContinuePlugin; +var init_dist_es3 = __esm({ + "../../node_modules/@aws-sdk/middleware-expect-continue/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + __name(addExpectContinueMiddleware, "addExpectContinueMiddleware"); + addExpectContinueMiddlewareOptions = { + step: "build", + tags: ["SET_EXPECT_HEADER", "EXPECT_HEADER"], + name: "addExpectContinueMiddleware", + override: true + }; + getAddExpectContinuePlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(addExpectContinueMiddleware(options), addExpectContinueMiddlewareOptions); + } + }), "getAddExpectContinuePlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/constants.js +var RequestChecksumCalculation, DEFAULT_REQUEST_CHECKSUM_CALCULATION, ResponseChecksumValidation, DEFAULT_RESPONSE_CHECKSUM_VALIDATION, ChecksumAlgorithm, ChecksumLocation, DEFAULT_CHECKSUM_ALGORITHM; +var init_constants3 = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + RequestChecksumCalculation = { + WHEN_SUPPORTED: "WHEN_SUPPORTED", + WHEN_REQUIRED: "WHEN_REQUIRED" + }; + DEFAULT_REQUEST_CHECKSUM_CALCULATION = RequestChecksumCalculation.WHEN_SUPPORTED; + ResponseChecksumValidation = { + WHEN_SUPPORTED: "WHEN_SUPPORTED", + WHEN_REQUIRED: "WHEN_REQUIRED" + }; + DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.WHEN_SUPPORTED; + (function(ChecksumAlgorithm2) { + ChecksumAlgorithm2["MD5"] = "MD5"; + ChecksumAlgorithm2["CRC32"] = "CRC32"; + ChecksumAlgorithm2["CRC32C"] = "CRC32C"; + ChecksumAlgorithm2["CRC64NVME"] = "CRC64NVME"; + ChecksumAlgorithm2["SHA1"] = "SHA1"; + ChecksumAlgorithm2["SHA256"] = "SHA256"; + })(ChecksumAlgorithm || (ChecksumAlgorithm = {})); + (function(ChecksumLocation2) { + ChecksumLocation2["HEADER"] = "header"; + ChecksumLocation2["TRAILER"] = "trailer"; + })(ChecksumLocation || (ChecksumLocation = {})); + DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.CRC32; + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS.js +var init_NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS.js +var init_NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js +var init_emitWarningIfUnsupportedVersion = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js +function setCredentialFeature(credentials, feature2, value) { + if (!credentials.$source) { + credentials.$source = {}; + } + credentials.$source[feature2] = value; + return credentials; +} +var init_setCredentialFeature = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(setCredentialFeature, "setCredentialFeature"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js +function setFeature(context2, feature2, value) { + if (!context2.__aws_sdk_context) { + context2.__aws_sdk_context = { + features: {} + }; + } else if (!context2.__aws_sdk_context.features) { + context2.__aws_sdk_context.features = {}; + } + context2.__aws_sdk_context.features[feature2] = value; +} +var init_setFeature = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(setFeature, "setFeature"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js +var init_setTokenFeature = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +var init_client2 = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/client/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_emitWarningIfUnsupportedVersion(); + init_setCredentialFeature(); + init_setFeature(); + init_setTokenFeature(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js +var getDateHeader; +var init_getDateHeader = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + getDateHeader = /* @__PURE__ */ __name((response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0, "getDateHeader"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js +var getSkewCorrectedDate; +var init_getSkewCorrectedDate = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getSkewCorrectedDate = /* @__PURE__ */ __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), "getSkewCorrectedDate"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js +var isClockSkewed; +var init_isClockSkewed = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getSkewCorrectedDate(); + isClockSkewed = /* @__PURE__ */ __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5, "isClockSkewed"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +var getUpdatedSystemClockOffset; +var init_getUpdatedSystemClockOffset = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_isClockSkewed(); + getUpdatedSystemClockOffset = /* @__PURE__ */ __name((clockTime, currentSystemClockOffset) => { + const clockTimeInMs = Date.parse(clockTime); + if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { + return clockTimeInMs - Date.now(); + } + return currentSystemClockOffset; + }, "getUpdatedSystemClockOffset"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js +var init_utils4 = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getDateHeader(); + init_getSkewCorrectedDate(); + init_getUpdatedSystemClockOffset(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +var throwSigningPropertyError, validateSigningProperties, AwsSdkSigV4Signer; +var init_AwsSdkSigV4Signer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_utils4(); + throwSigningPropertyError = /* @__PURE__ */ __name((name, property) => { + if (!property) { + throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); + } + return property; + }, "throwSigningPropertyError"); + validateSigningProperties = /* @__PURE__ */ __name(async (signingProperties) => { + const context2 = throwSigningPropertyError("context", signingProperties.context); + const config3 = throwSigningPropertyError("config", signingProperties.config); + const authScheme = context2.endpointV2?.properties?.authSchemes?.[0]; + const signerFunction = throwSigningPropertyError("signer", config3.signer); + const signer = await signerFunction(authScheme); + const signingRegion = signingProperties?.signingRegion; + const signingRegionSet = signingProperties?.signingRegionSet; + const signingName = signingProperties?.signingName; + return { + config: config3, + signer, + signingRegion, + signingRegionSet, + signingName + }; + }, "validateSigningProperties"); + AwsSdkSigV4Signer = class { + async sign(httpRequest, identity2, signingProperties) { + if (!HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const validatedProps = await validateSigningProperties(signingProperties); + const { config: config3, signer } = validatedProps; + let { signingRegion, signingName } = validatedProps; + const handlerExecutionContext = signingProperties.context; + if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) { + const [first, second] = handlerExecutionContext.authSchemes; + if (first?.name === "sigv4a" && second?.name === "sigv4") { + signingRegion = second?.signingRegion ?? signingRegion; + signingName = second?.signingName ?? signingName; + } + } + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config3.systemClockOffset), + signingRegion, + signingService: signingName + }); + return signedRequest; + } + errorHandler(signingProperties) { + return (error50) => { + const serverTime = error50.ServerTime ?? getDateHeader(error50.$response); + if (serverTime) { + const config3 = throwSigningPropertyError("config", signingProperties.config); + const initialSystemClockOffset = config3.systemClockOffset; + config3.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config3.systemClockOffset); + const clockSkewCorrected = config3.systemClockOffset !== initialSystemClockOffset; + if (clockSkewCorrected && error50.$metadata) { + error50.$metadata.clockSkewCorrected = true; + } + } + throw error50; + }; + } + successHandler(httpResponse, signingProperties) { + const dateHeader = getDateHeader(httpResponse); + if (dateHeader) { + const config3 = throwSigningPropertyError("config", signingProperties.config); + config3.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config3.systemClockOffset); + } + } + }; + __name(AwsSdkSigV4Signer, "AwsSdkSigV4Signer"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js +var AwsSdkSigV4ASigner; +var init_AwsSdkSigV4ASigner = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_utils4(); + init_AwsSdkSigV4Signer(); + AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer { + async sign(httpRequest, identity2, signingProperties) { + if (!HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const { config: config3, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties); + const configResolvedSigningRegionSet = await config3.sigv4aSigningRegionSet?.(); + const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(","); + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config3.systemClockOffset), + signingRegion: multiRegionOverride, + signingService: signingName + }); + return signedRequest; + } + }; + __name(AwsSdkSigV4ASigner, "AwsSdkSigV4ASigner"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js +var init_getBearerTokenEnvKey = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +var init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/getSmithyContext.js +var init_getSmithyContext = __esm({ + "../../node_modules/@smithy/core/dist-es/getSmithyContext.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js +var getSmithyContext; +var init_getSmithyContext2 = __esm({ + "../../node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es(); + getSmithyContext = /* @__PURE__ */ __name((context2) => context2[SMITHY_CONTEXT_KEY] || (context2[SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); + } +}); + +// ../../node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js +var normalizeProvider; +var init_normalizeProvider = __esm({ + "../../node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + normalizeProvider = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }, "normalizeProvider"); + } +}); + +// ../../node_modules/@smithy/util-middleware/dist-es/index.js +var init_dist_es4 = __esm({ + "../../node_modules/@smithy/util-middleware/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getSmithyContext2(); + init_normalizeProvider(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js +var resolveAuthOptions; +var init_resolveAuthOptions = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + resolveAuthOptions = /* @__PURE__ */ __name((candidateAuthOptions, authSchemePreference) => { + if (!authSchemePreference || authSchemePreference.length === 0) { + return candidateAuthOptions; + } + const preferredAuthOptions = []; + for (const preferredSchemeName of authSchemePreference) { + for (const candidateAuthOption of candidateAuthOptions) { + const candidateAuthSchemeName = candidateAuthOption.schemeId.split("#")[1]; + if (candidateAuthSchemeName === preferredSchemeName) { + preferredAuthOptions.push(candidateAuthOption); + } + } + } + for (const candidateAuthOption of candidateAuthOptions) { + if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) { + preferredAuthOptions.push(candidateAuthOption); + } + } + return preferredAuthOptions; + }, "resolveAuthOptions"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +function convertHttpAuthSchemesToMap(httpAuthSchemes) { + const map2 = /* @__PURE__ */ new Map(); + for (const scheme of httpAuthSchemes) { + map2.set(scheme.schemeId, scheme); + } + return map2; +} +var httpAuthSchemeMiddleware; +var init_httpAuthSchemeMiddleware = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es4(); + init_resolveAuthOptions(); + __name(convertHttpAuthSchemesToMap, "convertHttpAuthSchemesToMap"); + httpAuthSchemeMiddleware = /* @__PURE__ */ __name((config3, mwOptions) => (next, context2) => async (args) => { + const options = config3.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config3, context2, args.input)); + const authSchemePreference = config3.authSchemePreference ? await config3.authSchemePreference() : []; + const resolvedOptions = resolveAuthOptions(options, authSchemePreference); + const authSchemes = convertHttpAuthSchemesToMap(config3.httpAuthSchemes); + const smithyContext = getSmithyContext(context2); + const failureReasons = []; + for (const option of resolvedOptions) { + const scheme = authSchemes.get(option.schemeId); + if (!scheme) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`); + continue; + } + const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config3)); + if (!identityProvider) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); + continue; + } + const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config3, context2) || {}; + option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties); + option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties); + smithyContext.selectedHttpAuthScheme = { + httpAuthOption: option, + identity: await identityProvider(option.identityProperties), + signer: scheme.signer + }; + break; + } + if (!smithyContext.selectedHttpAuthScheme) { + throw new Error(failureReasons.join("\n")); + } + return next(args); + }, "httpAuthSchemeMiddleware"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +var httpAuthSchemeEndpointRuleSetMiddlewareOptions, getHttpAuthSchemeEndpointRuleSetPlugin; +var init_getHttpAuthSchemeEndpointRuleSetPlugin = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpAuthSchemeMiddleware(); + httpAuthSchemeEndpointRuleSetMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: "endpointV2Middleware" + }; + getHttpAuthSchemeEndpointRuleSetPlugin = /* @__PURE__ */ __name((config3, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config3, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), httpAuthSchemeEndpointRuleSetMiddlewareOptions); + } + }), "getHttpAuthSchemeEndpointRuleSetPlugin"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +var init_getHttpAuthSchemePlugin = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js +var init_middleware_http_auth_scheme = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpAuthSchemeMiddleware(); + init_getHttpAuthSchemeEndpointRuleSetPlugin(); + init_getHttpAuthSchemePlugin(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js +var defaultErrorHandler, defaultSuccessHandler, httpSigningMiddleware; +var init_httpSigningMiddleware = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es4(); + defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error50) => { + throw error50; + }, "defaultErrorHandler"); + defaultSuccessHandler = /* @__PURE__ */ __name((httpResponse, signingProperties) => { + }, "defaultSuccessHandler"); + httpSigningMiddleware = /* @__PURE__ */ __name((config3) => (next, context2) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + const smithyContext = getSmithyContext(context2); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + } + const { httpAuthOption: { signingProperties = {} }, identity: identity2, signer } = scheme; + const output = await next({ + ...args, + request: await signer.sign(args.request, identity2, signingProperties) + }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); + (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); + return output; + }, "httpSigningMiddleware"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js +var httpSigningMiddlewareOptions, getHttpSigningPlugin; +var init_getHttpSigningMiddleware = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpSigningMiddleware(); + httpSigningMiddlewareOptions = { + step: "finalizeRequest", + tags: ["HTTP_SIGNING"], + name: "httpSigningMiddleware", + aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], + override: true, + relation: "after", + toMiddleware: "retryMiddleware" + }; + getHttpSigningPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpSigningMiddleware(config3), httpSigningMiddlewareOptions); + } + }), "getHttpSigningPlugin"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/middleware-http-signing/index.js +var init_middleware_http_signing = __esm({ + "../../node_modules/@smithy/core/dist-es/middleware-http-signing/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpSigningMiddleware(); + init_getHttpSigningMiddleware(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/normalizeProvider.js +var normalizeProvider2; +var init_normalizeProvider2 = __esm({ + "../../node_modules/@smithy/core/dist-es/normalizeProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + normalizeProvider2 = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }, "normalizeProvider"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/pagination/createPaginator.js +function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { + return /* @__PURE__ */ __name(async function* paginateOperation(config3, input, ...additionalArguments) { + const _input = input; + let token = config3.startingToken ?? _input[inputTokenName]; + let hasNext = true; + let page; + while (hasNext) { + _input[inputTokenName] = token; + if (pageSizeTokenName) { + _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config3.pageSize; + } + if (config3.client instanceof ClientCtor) { + page = await makePagedClientRequest(CommandCtor, config3.client, input, config3.withCommand, ...additionalArguments); + } else { + throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`); + } + yield page; + const prevToken = token; + token = get(page, outputTokenName); + hasNext = !!(token && (!config3.stopOnSameToken || token !== prevToken)); + } + return void 0; + }, "paginateOperation"); +} +var makePagedClientRequest, get; +var init_createPaginator = __esm({ + "../../node_modules/@smithy/core/dist-es/pagination/createPaginator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + makePagedClientRequest = /* @__PURE__ */ __name(async (CommandCtor, client, input, withCommand = (_) => _, ...args) => { + let command = new CommandCtor(input); + command = withCommand(command) ?? command; + return await client.send(command, ...args); + }, "makePagedClientRequest"); + __name(createPaginator, "createPaginator"); + get = /* @__PURE__ */ __name((fromObject, path) => { + let cursor = fromObject; + const pathComponents = path.split("."); + for (const step of pathComponents) { + if (!cursor || typeof cursor !== "object") { + return void 0; + } + cursor = cursor[step]; + } + return cursor; + }, "get"); + } +}); + +// ../../node_modules/@smithy/util-base64/dist-es/constants.browser.js +var chars, alphabetByEncoding, alphabetByValue, bitsPerLetter, bitsPerByte, maxLetterValue; +var init_constants_browser = __esm({ + "../../node_modules/@smithy/util-base64/dist-es/constants.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`; + alphabetByEncoding = Object.entries(chars).reduce((acc, [i2, c2]) => { + acc[c2] = Number(i2); + return acc; + }, {}); + alphabetByValue = chars.split(""); + bitsPerLetter = 6; + bitsPerByte = 8; + maxLetterValue = 63; + } +}); + +// ../../node_modules/@smithy/util-base64/dist-es/fromBase64.browser.js +var fromBase64; +var init_fromBase64_browser = __esm({ + "../../node_modules/@smithy/util-base64/dist-es/fromBase64.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants_browser(); + fromBase64 = /* @__PURE__ */ __name((input) => { + let totalByteLength = input.length / 4 * 3; + if (input.slice(-2) === "==") { + totalByteLength -= 2; + } else if (input.slice(-1) === "=") { + totalByteLength--; + } + const out = new ArrayBuffer(totalByteLength); + const dataView = new DataView(out); + for (let i2 = 0; i2 < input.length; i2 += 4) { + let bits = 0; + let bitLength = 0; + for (let j2 = i2, limit = i2 + 3; j2 <= limit; j2++) { + if (input[j2] !== "=") { + if (!(input[j2] in alphabetByEncoding)) { + throw new TypeError(`Invalid character ${input[j2]} in base64 string.`); + } + bits |= alphabetByEncoding[input[j2]] << (limit - j2) * bitsPerLetter; + bitLength += bitsPerLetter; + } else { + bits >>= bitsPerLetter; + } + } + const chunkOffset = i2 / 4 * 3; + bits >>= bitLength % bitsPerByte; + const byteLength = Math.floor(bitLength / bitsPerByte); + for (let k2 = 0; k2 < byteLength; k2++) { + const offset = (byteLength - k2 - 1) * bitsPerByte; + dataView.setUint8(chunkOffset + k2, (bits & 255 << offset) >> offset); + } + } + return new Uint8Array(out); + }, "fromBase64"); + } +}); + +// ../../node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js +var fromUtf8; +var init_fromUtf8_browser = __esm({ + "../../node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fromUtf8 = /* @__PURE__ */ __name((input) => new TextEncoder().encode(input), "fromUtf8"); + } +}); + +// ../../node_modules/@smithy/util-utf8/dist-es/toUint8Array.js +var toUint8Array; +var init_toUint8Array = __esm({ + "../../node_modules/@smithy/util-utf8/dist-es/toUint8Array.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser(); + toUint8Array = /* @__PURE__ */ __name((data) => { + if (typeof data === "string") { + return fromUtf8(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); + }, "toUint8Array"); + } +}); + +// ../../node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +var toUtf8; +var init_toUtf8_browser = __esm({ + "../../node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + toUtf8 = /* @__PURE__ */ __name((input) => { + if (typeof input === "string") { + return input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); + } + return new TextDecoder("utf-8").decode(input); + }, "toUtf8"); + } +}); + +// ../../node_modules/@smithy/util-utf8/dist-es/index.js +var init_dist_es5 = __esm({ + "../../node_modules/@smithy/util-utf8/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser(); + init_toUint8Array(); + init_toUtf8_browser(); + } +}); + +// ../../node_modules/@smithy/util-base64/dist-es/toBase64.browser.js +function toBase64(_input) { + let input; + if (typeof _input === "string") { + input = fromUtf8(_input); + } else { + input = _input; + } + const isArrayLike = typeof input === "object" && typeof input.length === "number"; + const isUint8Array = typeof input === "object" && typeof input.byteOffset === "number" && typeof input.byteLength === "number"; + if (!isArrayLike && !isUint8Array) { + throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); + } + let str = ""; + for (let i2 = 0; i2 < input.length; i2 += 3) { + let bits = 0; + let bitLength = 0; + for (let j2 = i2, limit = Math.min(i2 + 3, input.length); j2 < limit; j2++) { + bits |= input[j2] << (limit - j2 - 1) * bitsPerByte; + bitLength += bitsPerByte; + } + const bitClusterCount = Math.ceil(bitLength / bitsPerLetter); + bits <<= bitClusterCount * bitsPerLetter - bitLength; + for (let k2 = 1; k2 <= bitClusterCount; k2++) { + const offset = (bitClusterCount - k2) * bitsPerLetter; + str += alphabetByValue[(bits & maxLetterValue << offset) >> offset]; + } + str += "==".slice(0, 4 - bitClusterCount); + } + return str; +} +var init_toBase64_browser = __esm({ + "../../node_modules/@smithy/util-base64/dist-es/toBase64.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es5(); + init_constants_browser(); + __name(toBase64, "toBase64"); + } +}); + +// ../../node_modules/@smithy/util-base64/dist-es/index.js +var init_dist_es6 = __esm({ + "../../node_modules/@smithy/util-base64/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromBase64_browser(); + init_toBase64_browser(); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js +var Uint8ArrayBlobAdapter; +var init_Uint8ArrayBlobAdapter = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es6(); + init_dist_es5(); + Uint8ArrayBlobAdapter = class extends Uint8Array { + static fromString(source, encoding = "utf-8") { + if (typeof source === "string") { + if (encoding === "base64") { + return Uint8ArrayBlobAdapter.mutate(fromBase64(source)); + } + return Uint8ArrayBlobAdapter.mutate(fromUtf8(source)); + } + throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); + } + static mutate(source) { + Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype); + return source; + } + transformToString(encoding = "utf-8") { + if (encoding === "base64") { + return toBase64(this); + } + return toUtf8(this); + } + }; + __name(Uint8ArrayBlobAdapter, "Uint8ArrayBlobAdapter"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/checksum/ChecksumStream.browser.js +var ReadableStreamRef, ChecksumStream; +var init_ChecksumStream_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/checksum/ChecksumStream.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() { + }; + ChecksumStream = class extends ReadableStreamRef { + }; + __name(ChecksumStream, "ChecksumStream"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/stream-type-check.js +var isReadableStream; +var init_stream_type_check = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/stream-type-check.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isReadableStream = /* @__PURE__ */ __name((stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream), "isReadableStream"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/checksum/createChecksumStream.browser.js +var createChecksumStream; +var init_createChecksumStream_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/checksum/createChecksumStream.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es6(); + init_stream_type_check(); + init_ChecksumStream_browser(); + createChecksumStream = /* @__PURE__ */ __name(({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => { + if (!isReadableStream(source)) { + throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); + } + const encoder2 = base64Encoder ?? toBase64; + if (typeof TransformStream !== "function") { + throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream."); + } + const transform2 = new TransformStream({ + start() { + }, + async transform(chunk, controller) { + checksum.update(chunk); + controller.enqueue(chunk); + }, + async flush(controller) { + const digest = await checksum.digest(); + const received = encoder2(digest); + if (expectedChecksum !== received) { + const error50 = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}" in response header "${checksumSourceLocation}".`); + controller.error(error50); + } else { + controller.terminate(); + } + } + }); + source.pipeThrough(transform2); + const readable = transform2.readable; + Object.setPrototypeOf(readable, ChecksumStream.prototype); + return readable; + }, "createChecksumStream"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/ByteArrayCollector.js +var ByteArrayCollector; +var init_ByteArrayCollector = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/ByteArrayCollector.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ByteArrayCollector = class { + allocByteArray; + byteLength = 0; + byteArrays = []; + constructor(allocByteArray) { + this.allocByteArray = allocByteArray; + } + push(byteArray) { + this.byteArrays.push(byteArray); + this.byteLength += byteArray.byteLength; + } + flush() { + if (this.byteArrays.length === 1) { + const bytes = this.byteArrays[0]; + this.reset(); + return bytes; + } + const aggregation = this.allocByteArray(this.byteLength); + let cursor = 0; + for (let i2 = 0; i2 < this.byteArrays.length; ++i2) { + const bytes = this.byteArrays[i2]; + aggregation.set(bytes, cursor); + cursor += bytes.byteLength; + } + this.reset(); + return aggregation; + } + reset() { + this.byteArrays = []; + this.byteLength = 0; + } + }; + __name(ByteArrayCollector, "ByteArrayCollector"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/createBufferedReadableStream.js +function createBufferedReadableStream(upstream, size, logger3) { + const reader = upstream.getReader(); + let streamBufferingLoggedWarning = false; + let bytesSeen = 0; + const buffers = ["", new ByteArrayCollector((size2) => new Uint8Array(size2))]; + let mode = -1; + const pull = /* @__PURE__ */ __name(async (controller) => { + const { value, done } = await reader.read(); + const chunk = value; + if (done) { + if (mode !== -1) { + const remainder = flush(buffers, mode); + if (sizeOf(remainder) > 0) { + controller.enqueue(remainder); + } + } + controller.close(); + } else { + const chunkMode = modeOf(chunk, false); + if (mode !== chunkMode) { + if (mode >= 0) { + controller.enqueue(flush(buffers, mode)); + } + mode = chunkMode; + } + if (mode === -1) { + controller.enqueue(chunk); + return; + } + const chunkSize = sizeOf(chunk); + bytesSeen += chunkSize; + const bufferSize = sizeOf(buffers[mode]); + if (chunkSize >= size && bufferSize === 0) { + controller.enqueue(chunk); + } else { + const newSize = merge(buffers, mode, chunk); + if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { + streamBufferingLoggedWarning = true; + logger3?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); + } + if (newSize >= size) { + controller.enqueue(flush(buffers, mode)); + } else { + await pull(controller); + } + } + } + }, "pull"); + return new ReadableStream({ + pull + }); +} +function merge(buffers, mode, chunk) { + switch (mode) { + case 0: + buffers[0] += chunk; + return sizeOf(buffers[0]); + case 1: + case 2: + buffers[mode].push(chunk); + return sizeOf(buffers[mode]); + } +} +function flush(buffers, mode) { + switch (mode) { + case 0: + const s2 = buffers[0]; + buffers[0] = ""; + return s2; + case 1: + case 2: + return buffers[mode].flush(); + } + throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`); +} +function sizeOf(chunk) { + return chunk?.byteLength ?? chunk?.length ?? 0; +} +function modeOf(chunk, allowBuffer = true) { + if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) { + return 2; + } + if (chunk instanceof Uint8Array) { + return 1; + } + if (typeof chunk === "string") { + return 0; + } + return -1; +} +var createBufferedReadable; +var init_createBufferedReadableStream = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/createBufferedReadableStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_ByteArrayCollector(); + __name(createBufferedReadableStream, "createBufferedReadableStream"); + createBufferedReadable = createBufferedReadableStream; + __name(merge, "merge"); + __name(flush, "flush"); + __name(sizeOf, "sizeOf"); + __name(modeOf, "modeOf"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/getAwsChunkedEncodingStream.browser.js +var getAwsChunkedEncodingStream; +var init_getAwsChunkedEncodingStream_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/getAwsChunkedEncodingStream.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getAwsChunkedEncodingStream = /* @__PURE__ */ __name((readableStream, options) => { + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== void 0 && bodyLengthChecker !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0; + const reader = readableStream.getReader(); + return new ReadableStream({ + async pull(controller) { + const { value, done } = await reader.read(); + if (done) { + controller.enqueue(`0\r +`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + controller.enqueue(`${checksumLocationName}:${checksum}\r +`); + controller.enqueue(`\r +`); + } + controller.close(); + } else { + controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\r +${value}\r +`); + } + } + }); + }, "getAwsChunkedEncodingStream"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/headStream.browser.js +async function headStream(stream, bytes) { + let byteLengthCounter = 0; + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + byteLengthCounter += value?.byteLength ?? 0; + } + if (byteLengthCounter >= bytes) { + break; + } + isDone = done; + } + reader.releaseLock(); + const collected = new Uint8Array(Math.min(bytes, byteLengthCounter)); + let offset = 0; + for (const chunk of chunks) { + if (chunk.byteLength > collected.byteLength - offset) { + collected.set(chunk.subarray(0, collected.byteLength - offset), offset); + break; + } else { + collected.set(chunk, offset); + } + offset += chunk.length; + } + return collected; +} +var init_headStream_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/headStream.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(headStream, "headStream"); + } +}); + +// ../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri.js +var escapeUri, hexEncode; +var init_escape_uri = __esm({ + "../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + escapeUri = /* @__PURE__ */ __name((uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode), "escapeUri"); + hexEncode = /* @__PURE__ */ __name((c2) => `%${c2.charCodeAt(0).toString(16).toUpperCase()}`, "hexEncode"); + } +}); + +// ../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri-path.js +var init_escape_uri_path = __esm({ + "../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri-path.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-uri-escape/dist-es/index.js +var init_dist_es7 = __esm({ + "../../node_modules/@smithy/util-uri-escape/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_escape_uri(); + init_escape_uri_path(); + } +}); + +// ../../node_modules/@smithy/querystring-builder/dist-es/index.js +function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = escapeUri(key); + if (Array.isArray(value)) { + for (let i2 = 0, iLen = value.length; i2 < iLen; i2++) { + parts.push(`${key}=${escapeUri(value[i2])}`); + } + } else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${escapeUri(value)}`; + } + parts.push(qsEntry); + } + } + return parts.join("&"); +} +var init_dist_es8 = __esm({ + "../../node_modules/@smithy/querystring-builder/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es7(); + __name(buildQueryString, "buildQueryString"); + } +}); + +// ../../node_modules/@smithy/fetch-http-handler/dist-es/create-request.js +function createRequest(url2, requestOptions) { + return new Request(url2, requestOptions); +} +var init_create_request = __esm({ + "../../node_modules/@smithy/fetch-http-handler/dist-es/create-request.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(createRequest, "createRequest"); + } +}); + +// ../../node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js +function requestTimeout(timeoutInMs = 0) { + return new Promise((resolve, reject) => { + if (timeoutInMs) { + setTimeout(() => { + const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); + timeoutError.name = "TimeoutError"; + reject(timeoutError); + }, timeoutInMs); + } + }); +} +var init_request_timeout = __esm({ + "../../node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(requestTimeout, "requestTimeout"); + } +}); + +// ../../node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +function buildAbortError(abortSignal) { + const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : void 0; + if (reason) { + if (reason instanceof Error) { + const abortError3 = new Error("Request aborted"); + abortError3.name = "AbortError"; + abortError3.cause = reason; + return abortError3; + } + const abortError2 = new Error(String(reason)); + abortError2.name = "AbortError"; + return abortError2; + } + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + return abortError; +} +var keepAliveSupport, FetchHttpHandler; +var init_fetch_http_handler = __esm({ + "../../node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es8(); + init_create_request(); + init_request_timeout(); + keepAliveSupport = { + supported: void 0 + }; + FetchHttpHandler = class { + config; + configProvider; + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new FetchHttpHandler(instanceOrOptions); + } + constructor(options) { + if (typeof options === "function") { + this.configProvider = options().then((opts) => opts || {}); + } else { + this.config = options ?? {}; + this.configProvider = Promise.resolve(this.config); + } + if (keepAliveSupport.supported === void 0) { + keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]")); + } + } + destroy() { + } + async handle(request, { abortSignal, requestTimeout: requestTimeout2 } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + const requestTimeoutInMs = requestTimeout2 ?? this.config.requestTimeout; + const keepAlive = this.config.keepAlive === true; + const credentials = this.config.credentials; + if (abortSignal?.aborted) { + const abortError = buildAbortError(abortSignal); + return Promise.reject(abortError); + } + let path = request.path; + const queryString = buildQueryString(request.query || {}); + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + const { port, method } = request; + const url2 = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`; + const body = method === "GET" || method === "HEAD" ? void 0 : request.body; + const requestOptions = { + body, + headers: new Headers(request.headers), + method, + credentials + }; + if (this.config?.cache) { + requestOptions.cache = this.config.cache; + } + if (body) { + requestOptions.duplex = "half"; + } + if (typeof AbortController !== "undefined") { + requestOptions.signal = abortSignal; + } + if (keepAliveSupport.supported) { + requestOptions.keepalive = keepAlive; + } + if (typeof this.config.requestInit === "function") { + Object.assign(requestOptions, this.config.requestInit(request)); + } + let removeSignalEventListener = /* @__PURE__ */ __name(() => { + }, "removeSignalEventListener"); + const fetchRequest = createRequest(url2, requestOptions); + const raceOfPromises = [ + fetch(fetchRequest).then((response) => { + const fetchHeaders = response.headers; + const transformedHeaders = {}; + for (const pair of fetchHeaders.entries()) { + transformedHeaders[pair[0]] = pair[1]; + } + const hasReadableStream = response.body != void 0; + if (!hasReadableStream) { + return response.blob().then((body2) => ({ + response: new HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: body2 + }) + })); + } + return { + response: new HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: response.body + }) + }; + }), + requestTimeout(requestTimeoutInMs) + ]; + if (abortSignal) { + raceOfPromises.push(new Promise((resolve, reject) => { + const onAbort = /* @__PURE__ */ __name(() => { + const abortError = buildAbortError(abortSignal); + reject(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener("abort", onAbort), "removeSignalEventListener"); + } else { + abortSignal.onabort = onAbort; + } + })); + } + return Promise.race(raceOfPromises).finally(removeSignalEventListener); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config3) => { + config3[key] = value; + return config3; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + }; + __name(FetchHttpHandler, "FetchHttpHandler"); + __name(buildAbortError, "buildAbortError"); + } +}); + +// ../../node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js +async function collectBlob(blob2) { + const base643 = await readToBase64(blob2); + const arrayBuffer = fromBase64(base643); + return new Uint8Array(arrayBuffer); +} +async function collectStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; +} +function readToBase64(blob2) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onloadend = () => { + if (reader.readyState !== 2) { + return reject(new Error("Reader aborted too early")); + } + const result = reader.result ?? ""; + const commaIndex = result.indexOf(","); + const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; + resolve(result.substring(dataOffset)); + }; + reader.onabort = () => reject(new Error("Read aborted")); + reader.onerror = () => reject(reader.error); + reader.readAsDataURL(blob2); + }); +} +var streamCollector; +var init_stream_collector = __esm({ + "../../node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es6(); + streamCollector = /* @__PURE__ */ __name(async (stream) => { + if (typeof Blob === "function" && stream instanceof Blob || stream.constructor?.name === "Blob") { + if (Blob.prototype.arrayBuffer !== void 0) { + return new Uint8Array(await stream.arrayBuffer()); + } + return collectBlob(stream); + } + return collectStream(stream); + }, "streamCollector"); + __name(collectBlob, "collectBlob"); + __name(collectStream, "collectStream"); + __name(readToBase64, "readToBase64"); + } +}); + +// ../../node_modules/@smithy/fetch-http-handler/dist-es/index.js +var init_dist_es9 = __esm({ + "../../node_modules/@smithy/fetch-http-handler/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fetch_http_handler(); + init_stream_collector(); + } +}); + +// ../../node_modules/@smithy/util-hex-encoding/dist-es/index.js +function fromHex(encoded) { + if (encoded.length % 2 !== 0) { + throw new Error("Hex encoded strings must have an even number length"); + } + const out = new Uint8Array(encoded.length / 2); + for (let i2 = 0; i2 < encoded.length; i2 += 2) { + const encodedByte = encoded.slice(i2, i2 + 2).toLowerCase(); + if (encodedByte in HEX_TO_SHORT) { + out[i2 / 2] = HEX_TO_SHORT[encodedByte]; + } else { + throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + } + } + return out; +} +function toHex(bytes) { + let out = ""; + for (let i2 = 0; i2 < bytes.byteLength; i2++) { + out += SHORT_TO_HEX[bytes[i2]]; + } + return out; +} +var SHORT_TO_HEX, HEX_TO_SHORT; +var init_dist_es10 = __esm({ + "../../node_modules/@smithy/util-hex-encoding/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SHORT_TO_HEX = {}; + HEX_TO_SHORT = {}; + for (let i2 = 0; i2 < 256; i2++) { + let encodedByte = i2.toString(16).toLowerCase(); + if (encodedByte.length === 1) { + encodedByte = `0${encodedByte}`; + } + SHORT_TO_HEX[i2] = encodedByte; + HEX_TO_SHORT[encodedByte] = i2; + } + __name(fromHex, "fromHex"); + __name(toHex, "toHex"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.browser.js +var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED, sdkStreamMixin, isBlobInstance; +var init_sdk_stream_mixin_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es9(); + init_dist_es6(); + init_dist_es10(); + init_dist_es5(); + init_stream_type_check(); + ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; + sdkStreamMixin = /* @__PURE__ */ __name((stream) => { + if (!isBlobInstance(stream) && !isReadableStream(stream)) { + const name = stream?.__proto__?.constructor?.name || stream; + throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); + } + let transformed = false; + const transformToByteArray = /* @__PURE__ */ __name(async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await streamCollector(stream); + }, "transformToByteArray"); + const blobToWebStream = /* @__PURE__ */ __name((blob2) => { + if (typeof blob2.stream !== "function") { + throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body"); + } + return blob2.stream(); + }, "blobToWebStream"); + return Object.assign(stream, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === "base64") { + return toBase64(buf); + } else if (encoding === "hex") { + return toHex(buf); + } else if (encoding === void 0 || encoding === "utf8" || encoding === "utf-8") { + return toUtf8(buf); + } else if (typeof TextDecoder === "function") { + return new TextDecoder(encoding).decode(buf); + } else { + throw new Error("TextDecoder is not available, please make sure polyfill is provided."); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + if (isBlobInstance(stream)) { + return blobToWebStream(stream); + } else if (isReadableStream(stream)) { + return stream; + } else { + throw new Error(`Cannot transform payload to web stream, got ${stream}`); + } + } + }); + }, "sdkStreamMixin"); + isBlobInstance = /* @__PURE__ */ __name((stream) => typeof Blob === "function" && stream instanceof Blob, "isBlobInstance"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/splitStream.browser.js +async function splitStream(stream) { + if (typeof stream.stream === "function") { + stream = stream.stream(); + } + const readableStream = stream; + return readableStream.tee(); +} +var init_splitStream_browser = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/splitStream.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(splitStream, "splitStream"); + } +}); + +// ../../node_modules/@smithy/util-stream/dist-es/index.js +var init_dist_es11 = __esm({ + "../../node_modules/@smithy/util-stream/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Uint8ArrayBlobAdapter(); + init_ChecksumStream_browser(); + init_createChecksumStream_browser(); + init_createBufferedReadableStream(); + init_getAwsChunkedEncodingStream_browser(); + init_headStream_browser(); + init_sdk_stream_mixin_browser(); + init_splitStream_browser(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js +var collectBody; +var init_collect_stream_body = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es11(); + collectBody = /* @__PURE__ */ __name(async (streamBody = new Uint8Array(), context2) => { + if (streamBody instanceof Uint8Array) { + return Uint8ArrayBlobAdapter.mutate(streamBody); + } + if (!streamBody) { + return Uint8ArrayBlobAdapter.mutate(new Uint8Array()); + } + const fromContext = context2.streamCollector(streamBody); + return Uint8ArrayBlobAdapter.mutate(await fromContext); + }, "collectBody"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js +function extendedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c2) { + return "%" + c2.charCodeAt(0).toString(16).toUpperCase(); + }); +} +var init_extended_encode_uri_component = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(extendedEncodeURIComponent, "extendedEncodeURIComponent"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/deref.js +var deref; +var init_deref = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/deref.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + deref = /* @__PURE__ */ __name((schemaRef) => { + if (typeof schemaRef === "function") { + return schemaRef(); + } + return schemaRef; + }, "deref"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js +var operation; +var init_operation = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + operation = /* @__PURE__ */ __name((namespace, name, traits, input, output) => ({ + name, + namespace, + traits, + input, + output + }), "operation"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +var schemaDeserializationMiddleware, findHeader; +var init_schemaDeserializationMiddleware = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es4(); + init_operation(); + schemaDeserializationMiddleware = /* @__PURE__ */ __name((config3) => (next, context2) => async (args) => { + const { response } = await next(args); + const { operationSchema } = getSmithyContext(context2); + const [, ns, n2, t9, i2, o2] = operationSchema ?? []; + try { + const parsed = await config3.protocol.deserializeResponse(operation(ns, n2, t9, i2, o2), { + ...config3, + ...context2 + }, response); + return { + response, + output: parsed + }; + } catch (error50) { + Object.defineProperty(error50, "$response", { + value: response, + enumerable: false, + writable: false, + configurable: false + }); + if (!("$metadata" in error50)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + try { + error50.message += "\n " + hint; + } catch (e2) { + if (!context2.logger || context2.logger?.constructor?.name === "NoOpLogger") { + console.warn(hint); + } else { + context2.logger?.warn?.(hint); + } + } + if (typeof error50.$responseBodyText !== "undefined") { + if (error50.$response) { + error50.$response.body = error50.$responseBodyText; + } + } + try { + if (HttpResponse.isInstance(response)) { + const { headers = {} } = response; + const headerEntries = Object.entries(headers); + error50.$metadata = { + httpStatusCode: response.statusCode, + requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), + extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), + cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries) + }; + } + } catch (e2) { + } + } + throw error50; + } + }, "schemaDeserializationMiddleware"); + findHeader = /* @__PURE__ */ __name((pattern, headers) => { + return (headers.find(([k2]) => { + return k2.match(pattern); + }) || [void 0, void 0])[1]; + }, "findHeader"); + } +}); + +// ../../node_modules/@smithy/querystring-parser/dist-es/index.js +function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } else if (Array.isArray(query[key])) { + query[key].push(value); + } else { + query[key] = [query[key], value]; + } + } + } + return query; +} +var init_dist_es12 = __esm({ + "../../node_modules/@smithy/querystring-parser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(parseQueryString, "parseQueryString"); + } +}); + +// ../../node_modules/@smithy/url-parser/dist-es/index.js +var parseUrl; +var init_dist_es13 = __esm({ + "../../node_modules/@smithy/url-parser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es12(); + parseUrl = /* @__PURE__ */ __name((url2) => { + if (typeof url2 === "string") { + return parseUrl(new URL(url2)); + } + const { hostname: hostname3, pathname, port, protocol, search } = url2; + let query; + if (search) { + query = parseQueryString(search); + } + return { + hostname: hostname3, + port: port ? parseInt(port) : void 0, + protocol, + path: pathname, + query + }; + }, "parseUrl"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js +var toEndpointV1; +var init_toEndpointV1 = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es13(); + toEndpointV1 = /* @__PURE__ */ __name((endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + const v1Endpoint = parseUrl(endpoint.url); + if (endpoint.headers) { + v1Endpoint.headers = {}; + for (const [name, values] of Object.entries(endpoint.headers)) { + v1Endpoint.headers[name.toLowerCase()] = values.join(", "); + } + } + return v1Endpoint; + } + return endpoint; + } + return parseUrl(endpoint); + }, "toEndpointV1"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/endpoints/index.js +var init_endpoints2 = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/endpoints/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_toEndpointV1(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +var schemaSerializationMiddleware; +var init_schemaSerializationMiddleware = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_endpoints2(); + init_dist_es4(); + init_operation(); + schemaSerializationMiddleware = /* @__PURE__ */ __name((config3) => (next, context2) => async (args) => { + const { operationSchema } = getSmithyContext(context2); + const [, ns, n2, t9, i2, o2] = operationSchema ?? []; + const endpoint = context2.endpointV2 ? async () => toEndpointV1(context2.endpointV2) : config3.endpoint; + const request = await config3.protocol.serializeRequest(operation(ns, n2, t9, i2, o2), args.input, { + ...config3, + ...context2, + endpoint + }); + return next({ + ...args, + request + }); + }, "schemaSerializationMiddleware"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js +function getSchemaSerdePlugin(config3) { + return { + applyToStack: (commandStack) => { + commandStack.add(schemaSerializationMiddleware(config3), serializerMiddlewareOption); + commandStack.add(schemaDeserializationMiddleware(config3), deserializerMiddlewareOption); + config3.protocol.setSerdeContext(config3); + } + }; +} +var deserializerMiddlewareOption, serializerMiddlewareOption; +var init_getSchemaSerdePlugin = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schemaDeserializationMiddleware(); + init_schemaSerializationMiddleware(); + deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true + }; + serializerMiddlewareOption = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true + }; + __name(getSchemaSerdePlugin, "getSchemaSerdePlugin"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js +var Schema2; +var init_Schema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Schema2 = class { + name; + namespace; + traits; + static assign(instance, values) { + const schema = Object.assign(instance, values); + return schema; + } + static [Symbol.hasInstance](lhs) { + const isPrototype = this.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const list = lhs; + return list.symbol === this.symbol; + } + return isPrototype; + } + getName() { + return this.namespace + "#" + this.name; + } + }; + __name(Schema2, "Schema"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js +var _ListSchema, ListSchema; +var init_ListSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Schema(); + _ListSchema = class extends Schema2 { + name; + traits; + valueSchema; + symbol = _ListSchema.symbol; + }; + ListSchema = _ListSchema; + __name(ListSchema, "ListSchema"); + __publicField(ListSchema, "symbol", Symbol.for("@smithy/lis")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js +var _MapSchema, MapSchema; +var init_MapSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Schema(); + _MapSchema = class extends Schema2 { + name; + traits; + keySchema; + valueSchema; + symbol = _MapSchema.symbol; + }; + MapSchema = _MapSchema; + __name(MapSchema, "MapSchema"); + __publicField(MapSchema, "symbol", Symbol.for("@smithy/map")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js +var _OperationSchema, OperationSchema; +var init_OperationSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Schema(); + _OperationSchema = class extends Schema2 { + name; + traits; + input; + output; + symbol = _OperationSchema.symbol; + }; + OperationSchema = _OperationSchema; + __name(OperationSchema, "OperationSchema"); + __publicField(OperationSchema, "symbol", Symbol.for("@smithy/ope")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js +var _StructureSchema, StructureSchema; +var init_StructureSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Schema(); + _StructureSchema = class extends Schema2 { + name; + traits; + memberNames; + memberList; + symbol = _StructureSchema.symbol; + }; + StructureSchema = _StructureSchema; + __name(StructureSchema, "StructureSchema"); + __publicField(StructureSchema, "symbol", Symbol.for("@smithy/str")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js +var _ErrorSchema, ErrorSchema; +var init_ErrorSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_StructureSchema(); + _ErrorSchema = class extends StructureSchema { + ctor; + symbol = _ErrorSchema.symbol; + }; + ErrorSchema = _ErrorSchema; + __name(ErrorSchema, "ErrorSchema"); + __publicField(ErrorSchema, "symbol", Symbol.for("@smithy/err")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +function translateTraits(indicator) { + if (typeof indicator === "object") { + return indicator; + } + indicator = indicator | 0; + if (traitsCache[indicator]) { + return traitsCache[indicator]; + } + const traits = {}; + let i2 = 0; + for (const trait of [ + "httpLabel", + "idempotent", + "idempotencyToken", + "sensitive", + "httpPayload", + "httpResponseCode", + "httpQueryParams" + ]) { + if ((indicator >> i2++ & 1) === 1) { + traits[trait] = 1; + } + } + return traitsCache[indicator] = traits; +} +var traitsCache; +var init_translateTraits = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + traitsCache = []; + __name(translateTraits, "translateTraits"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +function member(memberSchema, memberName) { + if (memberSchema instanceof NormalizedSchema) { + return Object.assign(memberSchema, { + memberName, + _isMemberSchema: true + }); + } + const internalCtorAccess = NormalizedSchema; + return new internalCtorAccess(memberSchema, memberName); +} +var anno, simpleSchemaCacheN, simpleSchemaCacheS, _NormalizedSchema, NormalizedSchema, isMemberSchema, isStaticSchema; +var init_NormalizedSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_deref(); + init_translateTraits(); + anno = { + it: Symbol.for("@smithy/nor-struct-it"), + ns: Symbol.for("@smithy/ns") + }; + simpleSchemaCacheN = []; + simpleSchemaCacheS = {}; + _NormalizedSchema = class { + ref; + memberName; + symbol = _NormalizedSchema.symbol; + name; + schema; + _isMemberSchema; + traits; + memberTraits; + normalizedTraits; + constructor(ref, memberName) { + this.ref = ref; + this.memberName = memberName; + const traitStack = []; + let _ref = ref; + let schema = ref; + this._isMemberSchema = false; + while (isMemberSchema(_ref)) { + traitStack.push(_ref[1]); + _ref = _ref[0]; + schema = deref(_ref); + this._isMemberSchema = true; + } + if (traitStack.length > 0) { + this.memberTraits = {}; + for (let i2 = traitStack.length - 1; i2 >= 0; --i2) { + const traitSet = traitStack[i2]; + Object.assign(this.memberTraits, translateTraits(traitSet)); + } + } else { + this.memberTraits = 0; + } + if (schema instanceof _NormalizedSchema) { + const computedMemberTraits = this.memberTraits; + Object.assign(this, schema); + this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits()); + this.normalizedTraits = void 0; + this.memberName = memberName ?? schema.memberName; + return; + } + this.schema = deref(schema); + if (isStaticSchema(this.schema)) { + this.name = `${this.schema[1]}#${this.schema[2]}`; + this.traits = this.schema[3]; + } else { + this.name = this.memberName ?? String(schema); + this.traits = 0; + } + if (this._isMemberSchema && !memberName) { + throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`); + } + } + static [Symbol.hasInstance](lhs) { + const isPrototype = this.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const ns = lhs; + return ns.symbol === this.symbol; + } + return isPrototype; + } + static of(ref) { + const keyAble = typeof ref === "function" || typeof ref === "object" && ref !== null; + if (typeof ref === "number") { + if (simpleSchemaCacheN[ref]) { + return simpleSchemaCacheN[ref]; + } + } else if (typeof ref === "string") { + if (simpleSchemaCacheS[ref]) { + return simpleSchemaCacheS[ref]; + } + } else if (keyAble) { + if (ref[anno.ns]) { + return ref[anno.ns]; + } + } + const sc = deref(ref); + if (sc instanceof _NormalizedSchema) { + return sc; + } + if (isMemberSchema(sc)) { + const [ns2, traits] = sc; + if (ns2 instanceof _NormalizedSchema) { + Object.assign(ns2.getMergedTraits(), translateTraits(traits)); + return ns2; + } + throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`); + } + const ns = new _NormalizedSchema(sc); + if (keyAble) { + return ref[anno.ns] = ns; + } + if (typeof sc === "string") { + return simpleSchemaCacheS[sc] = ns; + } + if (typeof sc === "number") { + return simpleSchemaCacheN[sc] = ns; + } + return ns; + } + getSchema() { + const sc = this.schema; + if (Array.isArray(sc) && sc[0] === 0) { + return sc[4]; + } + return sc; + } + getName(withNamespace = false) { + const { name } = this; + const short = !withNamespace && name && name.includes("#"); + return short ? name.split("#")[1] : name || void 0; + } + getMemberName() { + return this.memberName; + } + isMemberSchema() { + return this._isMemberSchema; + } + isListSchema() { + const sc = this.getSchema(); + return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1; + } + isMapSchema() { + const sc = this.getSchema(); + return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2; + } + isStructSchema() { + const sc = this.getSchema(); + if (typeof sc !== "object") { + return false; + } + const id = sc[0]; + return id === 3 || id === -3 || id === 4; + } + isUnionSchema() { + const sc = this.getSchema(); + if (typeof sc !== "object") { + return false; + } + return sc[0] === 4; + } + isBlobSchema() { + const sc = this.getSchema(); + return sc === 21 || sc === 42; + } + isTimestampSchema() { + const sc = this.getSchema(); + return typeof sc === "number" && sc >= 4 && sc <= 7; + } + isUnitSchema() { + return this.getSchema() === "unit"; + } + isDocumentSchema() { + return this.getSchema() === 15; + } + isStringSchema() { + return this.getSchema() === 0; + } + isBooleanSchema() { + return this.getSchema() === 2; + } + isNumericSchema() { + return this.getSchema() === 1; + } + isBigIntegerSchema() { + return this.getSchema() === 17; + } + isBigDecimalSchema() { + return this.getSchema() === 19; + } + isStreaming() { + const { streaming } = this.getMergedTraits(); + return !!streaming || this.getSchema() === 42; + } + isIdempotencyToken() { + return !!this.getMergedTraits().idempotencyToken; + } + getMergedTraits() { + return this.normalizedTraits ?? (this.normalizedTraits = { + ...this.getOwnTraits(), + ...this.getMemberTraits() + }); + } + getMemberTraits() { + return translateTraits(this.memberTraits); + } + getOwnTraits() { + return translateTraits(this.traits); + } + getKeySchema() { + const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()]; + if (!isDoc && !isMap) { + throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`); + } + const schema = this.getSchema(); + const memberSchema = isDoc ? 15 : schema[4] ?? 0; + return member([memberSchema, 0], "key"); + } + getValueSchema() { + const sc = this.getSchema(); + const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()]; + const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap || isList) ? sc[3 + sc[0]] : isDoc ? 15 : void 0; + if (memberSchema != null) { + return member([memberSchema, 0], isMap ? "value" : "member"); + } + throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`); + } + getMemberSchema(memberName) { + const struct = this.getSchema(); + if (this.isStructSchema() && struct[4].includes(memberName)) { + const i2 = struct[4].indexOf(memberName); + const memberSchema = struct[5][i2]; + return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName); + } + if (this.isDocumentSchema()) { + return member([15, 0], memberName); + } + throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`); + } + getMemberSchemas() { + const buffer = {}; + try { + for (const [k2, v3] of this.structIterator()) { + buffer[k2] = v3; + } + } catch (ignored) { + } + return buffer; + } + getEventStreamMember() { + if (this.isStructSchema()) { + for (const [memberName, memberSchema] of this.structIterator()) { + if (memberSchema.isStreaming() && memberSchema.isStructSchema()) { + return memberName; + } + } + } + return ""; + } + *structIterator() { + if (this.isUnitSchema()) { + return; + } + if (!this.isStructSchema()) { + throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); + } + const struct = this.getSchema(); + const z3 = struct[4].length; + let it = struct[anno.it]; + if (it && z3 === it.length) { + yield* it; + return; + } + it = Array(z3); + for (let i2 = 0; i2 < z3; ++i2) { + const k2 = struct[4][i2]; + const v3 = member([struct[5][i2], 0], k2); + yield it[i2] = [k2, v3]; + } + struct[anno.it] = it; + } + }; + NormalizedSchema = _NormalizedSchema; + __name(NormalizedSchema, "NormalizedSchema"); + __publicField(NormalizedSchema, "symbol", Symbol.for("@smithy/nor")); + __name(member, "member"); + isMemberSchema = /* @__PURE__ */ __name((sc) => Array.isArray(sc) && sc.length === 2, "isMemberSchema"); + isStaticSchema = /* @__PURE__ */ __name((sc) => Array.isArray(sc) && sc.length >= 5, "isStaticSchema"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js +var _SimpleSchema, SimpleSchema; +var init_SimpleSchema = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Schema(); + _SimpleSchema = class extends Schema2 { + name; + schemaRef; + traits; + symbol = _SimpleSchema.symbol; + }; + SimpleSchema = _SimpleSchema; + __name(SimpleSchema, "SimpleSchema"); + __publicField(SimpleSchema, "symbol", Symbol.for("@smithy/sim")); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js +var init_sentinels2 = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +var _TypeRegistry, TypeRegistry; +var init_TypeRegistry = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + _TypeRegistry = class { + namespace; + schemas; + exceptions; + constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) { + this.namespace = namespace; + this.schemas = schemas; + this.exceptions = exceptions; + } + static for(namespace) { + if (!_TypeRegistry.registries.has(namespace)) { + _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace)); + } + return _TypeRegistry.registries.get(namespace); + } + copyFrom(other) { + const { schemas, exceptions } = this; + for (const [k2, v3] of other.schemas) { + if (!schemas.has(k2)) { + schemas.set(k2, v3); + } + } + for (const [k2, v3] of other.exceptions) { + if (!exceptions.has(k2)) { + exceptions.set(k2, v3); + } + } + } + register(shapeId, schema) { + const qualifiedName = this.normalizeShapeId(shapeId); + for (const r2 of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) { + r2.schemas.set(qualifiedName, schema); + } + } + getSchema(shapeId) { + const id = this.normalizeShapeId(shapeId); + if (!this.schemas.has(id)) { + throw new Error(`@smithy/core/schema - schema not found for ${id}`); + } + return this.schemas.get(id); + } + registerError(es, ctor) { + const $error = es; + const ns = $error[1]; + for (const r2 of [this, _TypeRegistry.for(ns)]) { + r2.schemas.set(ns + "#" + $error[2], $error); + r2.exceptions.set($error, ctor); + } + } + getErrorCtor(es) { + const $error = es; + if (this.exceptions.has($error)) { + return this.exceptions.get($error); + } + const registry2 = _TypeRegistry.for($error[1]); + return registry2.exceptions.get($error); + } + getBaseException() { + for (const exceptionKey of this.exceptions.keys()) { + if (Array.isArray(exceptionKey)) { + const [, ns, name] = exceptionKey; + const id = ns + "#" + name; + if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) { + return exceptionKey; + } + } + } + return void 0; + } + find(predicate) { + return [...this.schemas.values()].find(predicate); + } + clear() { + this.schemas.clear(); + this.exceptions.clear(); + } + normalizeShapeId(shapeId) { + if (shapeId.includes("#")) { + return shapeId; + } + return this.namespace + "#" + shapeId; + } + }; + TypeRegistry = _TypeRegistry; + __name(TypeRegistry, "TypeRegistry"); + __publicField(TypeRegistry, "registries", /* @__PURE__ */ new Map()); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/schema/index.js +var init_schema3 = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/schema/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_deref(); + init_getSchemaSerdePlugin(); + init_ListSchema(); + init_MapSchema(); + init_OperationSchema(); + init_operation(); + init_ErrorSchema(); + init_NormalizedSchema(); + init_Schema(); + init_SimpleSchema(); + init_StructureSchema(); + init_sentinels2(); + init_translateTraits(); + init_TypeRegistry(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js +var init_copyDocumentWithTransform = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +var expectNumber, MAX_FLOAT, expectFloat32, expectLong, expectShort, expectByte, expectSizedInt, castInt, strictParseFloat32, NUMBER_REGEX, parseNumber, strictParseShort, strictParseByte, stackTraceWarning, logger2; +var init_parse_utils = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + expectNumber = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "string") { + const parsed = parseFloat(value); + if (!Number.isNaN(parsed)) { + if (String(parsed) !== String(value)) { + logger2.warn(stackTraceWarning(`Expected number but observed string: ${value}`)); + } + return parsed; + } + } + if (typeof value === "number") { + return value; + } + throw new TypeError(`Expected number, got ${typeof value}: ${value}`); + }, "expectNumber"); + MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); + expectFloat32 = /* @__PURE__ */ __name((value) => { + const expected = expectNumber(value); + if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { + if (Math.abs(expected) > MAX_FLOAT) { + throw new TypeError(`Expected 32-bit float, got ${value}`); + } + } + return expected; + }, "expectFloat32"); + expectLong = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (Number.isInteger(value) && !Number.isNaN(value)) { + return value; + } + throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); + }, "expectLong"); + expectShort = /* @__PURE__ */ __name((value) => expectSizedInt(value, 16), "expectShort"); + expectByte = /* @__PURE__ */ __name((value) => expectSizedInt(value, 8), "expectByte"); + expectSizedInt = /* @__PURE__ */ __name((value, size) => { + const expected = expectLong(value); + if (expected !== void 0 && castInt(expected, size) !== expected) { + throw new TypeError(`Expected ${size}-bit integer, got ${value}`); + } + return expected; + }, "expectSizedInt"); + castInt = /* @__PURE__ */ __name((value, size) => { + switch (size) { + case 32: + return Int32Array.of(value)[0]; + case 16: + return Int16Array.of(value)[0]; + case 8: + return Int8Array.of(value)[0]; + } + }, "castInt"); + strictParseFloat32 = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return expectFloat32(parseNumber(value)); + } + return expectFloat32(value); + }, "strictParseFloat32"); + NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; + parseNumber = /* @__PURE__ */ __name((value) => { + const matches = value.match(NUMBER_REGEX); + if (matches === null || matches[0].length !== value.length) { + throw new TypeError(`Expected real number, got implicit NaN`); + } + return parseFloat(value); + }, "parseNumber"); + strictParseShort = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectShort(parseNumber(value)); + } + return expectShort(value); + }, "strictParseShort"); + strictParseByte = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectByte(parseNumber(value)); + } + return expectByte(value); + }, "strictParseByte"); + stackTraceWarning = /* @__PURE__ */ __name((message2) => { + return String(new TypeError(message2).stack || message2).split("\n").slice(0, 5).filter((s2) => !s2.includes("stackTraceWarning")).join("\n"); + }, "stackTraceWarning"); + logger2 = { + warn: console.warn + }; + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js +function dateToUtcString(date6) { + const year3 = date6.getUTCFullYear(); + const month = date6.getUTCMonth(); + const dayOfWeek = date6.getUTCDay(); + const dayOfMonthInt = date6.getUTCDate(); + const hoursInt = date6.getUTCHours(); + const minutesInt = date6.getUTCMinutes(); + const secondsInt = date6.getUTCSeconds(); + const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`; + const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`; + const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`; + const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`; + return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year3} ${hoursString}:${minutesString}:${secondsString} GMT`; +} +var DAYS, MONTHS, RFC3339, RFC3339_WITH_OFFSET, IMF_FIXDATE, RFC_850_DATE, ASC_TIME, parseRfc7231DateTime, buildDate, parseTwoDigitYear, FIFTY_YEARS_IN_MILLIS, adjustRfc850Year, parseMonthByShortName, DAYS_IN_MONTH, validateDayOfMonth, isLeapYear, parseDateValue, parseMilliseconds, stripLeadingZeroes; +var init_date_utils = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_parse_utils(); + DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; + MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + __name(dateToUtcString, "dateToUtcString"); + RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); + RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/); + IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); + RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); + ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/); + parseRfc7231DateTime = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-7231 date-times must be expressed as strings"); + } + let match2 = IMF_FIXDATE.exec(value); + if (match2) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match2; + return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + match2 = RFC_850_DATE.exec(value); + if (match2) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match2; + return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { + hours, + minutes, + seconds, + fractionalMilliseconds + })); + } + match2 = ASC_TIME.exec(value); + if (match2) { + const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match2; + return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + throw new TypeError("Invalid RFC-7231 date-time value"); + }, "parseRfc7231DateTime"); + buildDate = /* @__PURE__ */ __name((year3, month, day2, time7) => { + const adjustedMonth = month - 1; + validateDayOfMonth(year3, adjustedMonth, day2); + return new Date(Date.UTC(year3, adjustedMonth, day2, parseDateValue(time7.hours, "hour", 0, 23), parseDateValue(time7.minutes, "minute", 0, 59), parseDateValue(time7.seconds, "seconds", 0, 60), parseMilliseconds(time7.fractionalMilliseconds))); + }, "buildDate"); + parseTwoDigitYear = /* @__PURE__ */ __name((value) => { + const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear(); + const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value)); + if (valueInThisCentury < thisYear) { + return valueInThisCentury + 100; + } + return valueInThisCentury; + }, "parseTwoDigitYear"); + FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3; + adjustRfc850Year = /* @__PURE__ */ __name((input) => { + if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) { + return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds())); + } + return input; + }, "adjustRfc850Year"); + parseMonthByShortName = /* @__PURE__ */ __name((value) => { + const monthIdx = MONTHS.indexOf(value); + if (monthIdx < 0) { + throw new TypeError(`Invalid month: ${value}`); + } + return monthIdx + 1; + }, "parseMonthByShortName"); + DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + validateDayOfMonth = /* @__PURE__ */ __name((year3, month, day2) => { + let maxDays = DAYS_IN_MONTH[month]; + if (month === 1 && isLeapYear(year3)) { + maxDays = 29; + } + if (day2 > maxDays) { + throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year3}: ${day2}`); + } + }, "validateDayOfMonth"); + isLeapYear = /* @__PURE__ */ __name((year3) => { + return year3 % 4 === 0 && (year3 % 100 !== 0 || year3 % 400 === 0); + }, "isLeapYear"); + parseDateValue = /* @__PURE__ */ __name((value, type, lower, upper) => { + const dateVal = strictParseByte(stripLeadingZeroes(value)); + if (dateVal < lower || dateVal > upper) { + throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`); + } + return dateVal; + }, "parseDateValue"); + parseMilliseconds = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return 0; + } + return strictParseFloat32("0." + value) * 1e3; + }, "parseMilliseconds"); + stripLeadingZeroes = /* @__PURE__ */ __name((value) => { + let idx = 0; + while (idx < value.length - 1 && value.charAt(idx) === "0") { + idx++; + } + if (idx === 0) { + return value; + } + return value.slice(idx); + }, "stripLeadingZeroes"); + } +}); + +// ../../node_modules/@smithy/uuid/dist-es/randomUUID.browser.js +var randomUUID; +var init_randomUUID_browser = __esm({ + "../../node_modules/@smithy/uuid/dist-es/randomUUID.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto); + } +}); + +// ../../node_modules/@smithy/uuid/dist-es/v4.js +var decimalToHex, v4; +var init_v4 = __esm({ + "../../node_modules/@smithy/uuid/dist-es/v4.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_randomUUID_browser(); + decimalToHex = Array.from({ length: 256 }, (_, i2) => i2.toString(16).padStart(2, "0")); + v4 = /* @__PURE__ */ __name(() => { + if (randomUUID) { + return randomUUID(); + } + const rnds = new Uint8Array(16); + crypto.getRandomValues(rnds); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + return decimalToHex[rnds[0]] + decimalToHex[rnds[1]] + decimalToHex[rnds[2]] + decimalToHex[rnds[3]] + "-" + decimalToHex[rnds[4]] + decimalToHex[rnds[5]] + "-" + decimalToHex[rnds[6]] + decimalToHex[rnds[7]] + "-" + decimalToHex[rnds[8]] + decimalToHex[rnds[9]] + "-" + decimalToHex[rnds[10]] + decimalToHex[rnds[11]] + decimalToHex[rnds[12]] + decimalToHex[rnds[13]] + decimalToHex[rnds[14]] + decimalToHex[rnds[15]]; + }, "v4"); + } +}); + +// ../../node_modules/@smithy/uuid/dist-es/index.js +var init_dist_es14 = __esm({ + "../../node_modules/@smithy/uuid/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_v4(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/generateIdempotencyToken.js +var init_generateIdempotencyToken = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/generateIdempotencyToken.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es14(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js +var LazyJsonString; +var init_lazy_json = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + LazyJsonString = /* @__PURE__ */ __name(function LazyJsonString2(val) { + const str = Object.assign(new String(val), { + deserializeJSON() { + return JSON.parse(String(val)); + }, + toString() { + return String(val); + }, + toJSON() { + return String(val); + } + }); + return str; + }, "LazyJsonString"); + LazyJsonString.from = (object2) => { + if (object2 && typeof object2 === "object" && (object2 instanceof LazyJsonString || "deserializeJSON" in object2)) { + return object2; + } else if (typeof object2 === "string" || Object.getPrototypeOf(object2) === String.prototype) { + return LazyJsonString(String(object2)); + } + return LazyJsonString(JSON.stringify(object2)); + }; + LazyJsonString.fromObject = LazyJsonString.from; + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js +function quoteHeader(part) { + if (part.includes(",") || part.includes('"')) { + part = `"${part.replace(/"/g, '\\"')}"`; + } + return part; +} +var init_quote_header = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(quoteHeader, "quoteHeader"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js +function range(v3, min, max2) { + const _v = Number(v3); + if (_v < min || _v > max2) { + throw new Error(`Value ${_v} out of range [${min}, ${max2}]`); + } +} +var ddd, mmm, time4, date, year2, RFC3339_WITH_OFFSET2, IMF_FIXDATE2, RFC_850_DATE2, ASC_TIME2, months, _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime; +var init_schema_date_utils = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`; + mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`; + time4 = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`; + date = `(\\d?\\d)`; + year2 = `(\\d{4})`; + RFC3339_WITH_OFFSET2 = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/); + IMF_FIXDATE2 = new RegExp(`^${ddd}, ${date} ${mmm} ${year2} ${time4} GMT$`); + RFC_850_DATE2 = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time4} GMT$`); + ASC_TIME2 = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time4} ${year2}$`); + months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + _parseEpochTimestamp = /* @__PURE__ */ __name((value) => { + if (value == null) { + return void 0; + } + let num = NaN; + if (typeof value === "number") { + num = value; + } else if (typeof value === "string") { + if (!/^-?\d*\.?\d+$/.test(value)) { + throw new TypeError(`parseEpochTimestamp - numeric string invalid.`); + } + num = Number.parseFloat(value); + } else if (typeof value === "object" && value.tag === 1) { + num = value.value; + } + if (isNaN(num) || Math.abs(num) === Infinity) { + throw new TypeError("Epoch timestamps must be valid finite numbers."); + } + return new Date(Math.round(num * 1e3)); + }, "_parseEpochTimestamp"); + _parseRfc3339DateTimeWithOffset = /* @__PURE__ */ __name((value) => { + if (value == null) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC3339 timestamps must be strings"); + } + const matches = RFC3339_WITH_OFFSET2.exec(value); + if (!matches) { + throw new TypeError(`Invalid RFC3339 timestamp format ${value}`); + } + const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches; + range(monthStr, 1, 12); + range(dayStr, 1, 31); + range(hours, 0, 23); + range(minutes, 0, 59); + range(seconds, 0, 60); + const date6 = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1e3) : 0)); + date6.setUTCFullYear(Number(yearStr)); + if (offsetStr.toUpperCase() != "Z") { + const [, sign3, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [void 0, "+", 0, 0]; + const scalar = sign3 === "-" ? 1 : -1; + date6.setTime(date6.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1e3 + Number(offsetM) * 60 * 1e3)); + } + return date6; + }, "_parseRfc3339DateTimeWithOffset"); + _parseRfc7231DateTime = /* @__PURE__ */ __name((value) => { + if (value == null) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC7231 timestamps must be strings."); + } + let day2; + let month; + let year3; + let hour2; + let minute2; + let second; + let fraction; + let matches; + if (matches = IMF_FIXDATE2.exec(value)) { + [, day2, month, year3, hour2, minute2, second, fraction] = matches; + } else if (matches = RFC_850_DATE2.exec(value)) { + [, day2, month, year3, hour2, minute2, second, fraction] = matches; + year3 = (Number(year3) + 1900).toString(); + } else if (matches = ASC_TIME2.exec(value)) { + [, month, day2, hour2, minute2, second, fraction, year3] = matches; + } + if (year3 && second) { + const timestamp = Date.UTC(Number(year3), months.indexOf(month), Number(day2), Number(hour2), Number(minute2), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1e3) : 0); + range(day2, 1, 31); + range(hour2, 0, 23); + range(minute2, 0, 59); + range(second, 0, 60); + const date6 = new Date(timestamp); + date6.setUTCFullYear(Number(year3)); + return date6; + } + throw new TypeError(`Invalid RFC7231 date-time value ${value}.`); + }, "_parseRfc7231DateTime"); + __name(range, "range"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/split-every.js +function splitEvery(value, delimiter, numDelimiters) { + if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { + throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); + } + const segments = value.split(delimiter); + if (numDelimiters === 1) { + return segments; + } + const compoundSegments = []; + let currentSegment = ""; + for (let i2 = 0; i2 < segments.length; i2++) { + if (currentSegment === "") { + currentSegment = segments[i2]; + } else { + currentSegment += delimiter + segments[i2]; + } + if ((i2 + 1) % numDelimiters === 0) { + compoundSegments.push(currentSegment); + currentSegment = ""; + } + } + if (currentSegment !== "") { + compoundSegments.push(currentSegment); + } + return compoundSegments; +} +var init_split_every = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/split-every.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(splitEvery, "splitEvery"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js +var splitHeader; +var init_split_header = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + splitHeader = /* @__PURE__ */ __name((value) => { + const z3 = value.length; + const values = []; + let withinQuotes = false; + let prevChar = void 0; + let anchor = 0; + for (let i2 = 0; i2 < z3; ++i2) { + const char = value[i2]; + switch (char) { + case `"`: + if (prevChar !== "\\") { + withinQuotes = !withinQuotes; + } + break; + case ",": + if (!withinQuotes) { + values.push(value.slice(anchor, i2)); + anchor = i2 + 1; + } + break; + default: + } + prevChar = char; + } + values.push(value.slice(anchor)); + return values.map((v3) => { + v3 = v3.trim(); + const z4 = v3.length; + if (z4 < 2) { + return v3; + } + if (v3[0] === `"` && v3[z4 - 1] === `"`) { + v3 = v3.slice(1, z4 - 1); + } + return v3.replace(/\\"/g, '"'); + }); + }, "splitHeader"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +var format, NumericValue; +var init_NumericValue = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + format = /^-?\d*(\.\d+)?$/; + NumericValue = class { + string; + type; + constructor(string4, type) { + this.string = string4; + this.type = type; + if (!format.test(string4)) { + throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`); + } + } + toString() { + return this.string; + } + static [Symbol.hasInstance](object2) { + if (!object2 || typeof object2 !== "object") { + return false; + } + const _nv = object2; + return NumericValue.prototype.isPrototypeOf(object2) || _nv.type === "bigDecimal" && format.test(_nv.string); + } + }; + __name(NumericValue, "NumericValue"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/serde/index.js +var init_serde2 = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/serde/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_copyDocumentWithTransform(); + init_date_utils(); + init_generateIdempotencyToken(); + init_lazy_json(); + init_parse_utils(); + init_quote_header(); + init_schema_date_utils(); + init_split_every(); + init_split_header(); + init_NumericValue(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js +var SerdeContext; +var init_SerdeContext = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SerdeContext = class { + serdeContext; + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + }; + __name(SerdeContext, "SerdeContext"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +var EventStreamSerde; +var init_EventStreamSerde = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es5(); + EventStreamSerde = class { + marshaller; + serializer; + deserializer; + serdeContext; + defaultContentType; + constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType }) { + this.marshaller = marshaller; + this.serializer = serializer; + this.deserializer = deserializer; + this.serdeContext = serdeContext; + this.defaultContentType = defaultContentType; + } + async serializeEventStream({ eventStream, requestSchema, initialRequest }) { + const marshaller = this.marshaller; + const eventStreamMember = requestSchema.getEventStreamMember(); + const unionSchema = requestSchema.getMemberSchema(eventStreamMember); + const serializer = this.serializer; + const defaultContentType = this.defaultContentType; + const initialRequestMarker = Symbol("initialRequestMarker"); + const eventStreamIterable = { + async *[Symbol.asyncIterator]() { + if (initialRequest) { + const headers = { + ":event-type": { type: "string", value: "initial-request" }, + ":message-type": { type: "string", value: "event" }, + ":content-type": { type: "string", value: defaultContentType } + }; + serializer.write(requestSchema, initialRequest); + const body = serializer.flush(); + yield { + [initialRequestMarker]: true, + headers, + body + }; + } + for await (const page of eventStream) { + yield page; + } + } + }; + return marshaller.serialize(eventStreamIterable, (event) => { + if (event[initialRequestMarker]) { + return { + headers: event.headers, + body: event.body + }; + } + const unionMember = Object.keys(event).find((key) => { + return key !== "__type"; + }) ?? ""; + const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event); + const headers = { + ":event-type": { type: "string", value: eventType }, + ":message-type": { type: "string", value: "event" }, + ":content-type": { type: "string", value: explicitPayloadContentType ?? defaultContentType }, + ...additionalHeaders + }; + return { + headers, + body + }; + }); + } + async deserializeEventStream({ response, responseSchema, initialResponseContainer }) { + const marshaller = this.marshaller; + const eventStreamMember = responseSchema.getEventStreamMember(); + const unionSchema = responseSchema.getMemberSchema(eventStreamMember); + const memberSchemas = unionSchema.getMemberSchemas(); + const initialResponseMarker = Symbol("initialResponseMarker"); + const asyncIterable = marshaller.deserialize(response.body, async (event) => { + const unionMember = Object.keys(event).find((key) => { + return key !== "__type"; + }) ?? ""; + const body = event[unionMember].body; + if (unionMember === "initial-response") { + const dataObject = await this.deserializer.read(responseSchema, body); + delete dataObject[eventStreamMember]; + return { + [initialResponseMarker]: true, + ...dataObject + }; + } else if (unionMember in memberSchemas) { + const eventStreamSchema = memberSchemas[unionMember]; + if (eventStreamSchema.isStructSchema()) { + const out = {}; + let hasBindings = false; + for (const [name, member2] of eventStreamSchema.structIterator()) { + const { eventHeader, eventPayload } = member2.getMergedTraits(); + hasBindings = hasBindings || Boolean(eventHeader || eventPayload); + if (eventPayload) { + if (member2.isBlobSchema()) { + out[name] = body; + } else if (member2.isStringSchema()) { + out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body); + } else if (member2.isStructSchema()) { + out[name] = await this.deserializer.read(member2, body); + } + } else if (eventHeader) { + const value = event[unionMember].headers[name]?.value; + if (value != null) { + if (member2.isNumericSchema()) { + if (value && typeof value === "object" && "bytes" in value) { + out[name] = BigInt(value.toString()); + } else { + out[name] = Number(value); + } + } else { + out[name] = value; + } + } + } + } + if (hasBindings) { + return { + [unionMember]: out + }; + } + if (body.byteLength === 0) { + return { + [unionMember]: {} + }; + } + } + return { + [unionMember]: await this.deserializer.read(eventStreamSchema, body) + }; + } else { + return { + $unknown: event + }; + } + }); + const asyncIterator = asyncIterable[Symbol.asyncIterator](); + const firstEvent = await asyncIterator.next(); + if (firstEvent.done) { + return asyncIterable; + } + if (firstEvent.value?.[initialResponseMarker]) { + if (!responseSchema) { + throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given."); + } + for (const [key, value] of Object.entries(firstEvent.value)) { + initialResponseContainer[key] = value; + } + } + return { + async *[Symbol.asyncIterator]() { + if (!firstEvent?.value?.[initialResponseMarker]) { + yield firstEvent.value; + } + while (true) { + const { done, value } = await asyncIterator.next(); + if (done) { + break; + } + yield value; + } + } + }; + } + writeEventBody(unionMember, unionSchema, event) { + const serializer = this.serializer; + let eventType = unionMember; + let explicitPayloadMember = null; + let explicitPayloadContentType; + const isKnownSchema = (() => { + const struct = unionSchema.getSchema(); + return struct[4].includes(unionMember); + })(); + const additionalHeaders = {}; + if (!isKnownSchema) { + const [type, value] = event[unionMember]; + eventType = type; + serializer.write(15, value); + } else { + const eventSchema = unionSchema.getMemberSchema(unionMember); + if (eventSchema.isStructSchema()) { + for (const [memberName, memberSchema] of eventSchema.structIterator()) { + const { eventHeader, eventPayload } = memberSchema.getMergedTraits(); + if (eventPayload) { + explicitPayloadMember = memberName; + } else if (eventHeader) { + const value = event[unionMember][memberName]; + let type = "binary"; + if (memberSchema.isNumericSchema()) { + if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) { + type = "integer"; + } else { + type = "long"; + } + } else if (memberSchema.isTimestampSchema()) { + type = "timestamp"; + } else if (memberSchema.isStringSchema()) { + type = "string"; + } else if (memberSchema.isBooleanSchema()) { + type = "boolean"; + } + if (value != null) { + additionalHeaders[memberName] = { + type, + value + }; + delete event[unionMember][memberName]; + } + } + } + if (explicitPayloadMember !== null) { + const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember); + if (payloadSchema.isBlobSchema()) { + explicitPayloadContentType = "application/octet-stream"; + } else if (payloadSchema.isStringSchema()) { + explicitPayloadContentType = "text/plain"; + } + serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]); + } else { + serializer.write(eventSchema, event[unionMember]); + } + } else if (eventSchema.isUnitSchema()) { + serializer.write(eventSchema, {}); + } else { + throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union."); + } + } + const messageSerialization = serializer.flush() ?? new Uint8Array(); + const body = typeof messageSerialization === "string" ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization) : messageSerialization; + return { + body, + eventType, + explicitPayloadContentType, + additionalHeaders + }; + } + }; + __name(EventStreamSerde, "EventStreamSerde"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/event-streams/index.js +var event_streams_exports = {}; +__export(event_streams_exports, { + EventStreamSerde: () => EventStreamSerde +}); +var init_event_streams = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/event-streams/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamSerde(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +var HttpProtocol; +var init_HttpProtocol = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_dist_es2(); + init_SerdeContext(); + HttpProtocol = class extends SerdeContext { + options; + compositeErrorRegistry; + constructor(options) { + super(); + this.options = options; + this.compositeErrorRegistry = TypeRegistry.for(options.defaultNamespace); + for (const etr of options.errorTypeRegistries ?? []) { + this.compositeErrorRegistry.copyFrom(etr); + } + } + getRequestType() { + return HttpRequest; + } + getResponseType() { + return HttpResponse; + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + this.serializer.setSerdeContext(serdeContext); + this.deserializer.setSerdeContext(serdeContext); + if (this.getPayloadCodec()) { + this.getPayloadCodec().setSerdeContext(serdeContext); + } + } + updateServiceEndpoint(request, endpoint) { + if ("url" in endpoint) { + request.protocol = endpoint.url.protocol; + request.hostname = endpoint.url.hostname; + request.port = endpoint.url.port ? Number(endpoint.url.port) : void 0; + request.path = endpoint.url.pathname; + request.fragment = endpoint.url.hash || void 0; + request.username = endpoint.url.username || void 0; + request.password = endpoint.url.password || void 0; + if (!request.query) { + request.query = {}; + } + for (const [k2, v3] of endpoint.url.searchParams.entries()) { + request.query[k2] = v3; + } + if (endpoint.headers) { + for (const [name, values] of Object.entries(endpoint.headers)) { + request.headers[name] = values.join(", "); + } + } + return request; + } else { + request.protocol = endpoint.protocol; + request.hostname = endpoint.hostname; + request.port = endpoint.port ? Number(endpoint.port) : void 0; + request.path = endpoint.path; + request.query = { + ...endpoint.query + }; + if (endpoint.headers) { + for (const [name, value] of Object.entries(endpoint.headers)) { + request.headers[name] = value; + } + } + return request; + } + } + setHostPrefix(request, operationSchema, input) { + if (this.serdeContext?.disableHostPrefix) { + return; + } + const inputNs = NormalizedSchema.of(operationSchema.input); + const opTraits = translateTraits(operationSchema.traits ?? {}); + if (opTraits.endpoint) { + let hostPrefix = opTraits.endpoint?.[0]; + if (typeof hostPrefix === "string") { + const hostLabelInputs = [...inputNs.structIterator()].filter(([, member2]) => member2.getMergedTraits().hostLabel); + for (const [name] of hostLabelInputs) { + const replacement = input[name]; + if (typeof replacement !== "string") { + throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`); + } + hostPrefix = hostPrefix.replace(`{${name}}`, replacement); + } + request.hostname = hostPrefix + request.hostname; + } + } + } + deserializeMetadata(output) { + return { + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }; + } + async serializeEventStream({ eventStream, requestSchema, initialRequest }) { + const eventStreamSerde = await this.loadEventStreamCapability(); + return eventStreamSerde.serializeEventStream({ + eventStream, + requestSchema, + initialRequest + }); + } + async deserializeEventStream({ response, responseSchema, initialResponseContainer }) { + const eventStreamSerde = await this.loadEventStreamCapability(); + return eventStreamSerde.deserializeEventStream({ + response, + responseSchema, + initialResponseContainer + }); + } + async loadEventStreamCapability() { + const { EventStreamSerde: EventStreamSerde2 } = await Promise.resolve().then(() => (init_event_streams(), event_streams_exports)); + return new EventStreamSerde2({ + marshaller: this.getEventStreamMarshaller(), + serializer: this.serializer, + deserializer: this.deserializer, + serdeContext: this.serdeContext, + defaultContentType: this.getDefaultContentType() + }); + } + getDefaultContentType() { + throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`); + } + async deserializeHttpMessage(schema, context2, response, arg4, arg5) { + return []; + } + getEventStreamMarshaller() { + const context2 = this.serdeContext; + if (!context2.eventStreamMarshaller) { + throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext."); + } + return context2.eventStreamMarshaller; + } + }; + __name(HttpProtocol, "HttpProtocol"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +var HttpBindingProtocol; +var init_HttpBindingProtocol = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_serde2(); + init_dist_es2(); + init_dist_es11(); + init_collect_stream_body(); + init_extended_encode_uri_component(); + init_HttpProtocol(); + HttpBindingProtocol = class extends HttpProtocol { + async serializeRequest(operationSchema, _input, context2) { + const input = { + ..._input ?? {} + }; + const serializer = this.serializer; + const query = {}; + const headers = {}; + const endpoint = await context2.endpoint(); + const ns = NormalizedSchema.of(operationSchema?.input); + const payloadMemberNames = []; + const payloadMemberSchemas = []; + let hasNonHttpBindingMember = false; + let payload; + const request = new HttpRequest({ + protocol: "", + hostname: "", + port: void 0, + path: "", + fragment: void 0, + query, + headers, + body: void 0 + }); + if (endpoint) { + this.updateServiceEndpoint(request, endpoint); + this.setHostPrefix(request, operationSchema, input); + const opTraits = translateTraits(operationSchema.traits); + if (opTraits.http) { + request.method = opTraits.http[0]; + const [path, search] = opTraits.http[1].split("?"); + if (request.path == "/") { + request.path = path; + } else { + request.path += path; + } + const traitSearchParams = new URLSearchParams(search ?? ""); + Object.assign(query, Object.fromEntries(traitSearchParams)); + } + } + for (const [memberName, memberNs] of ns.structIterator()) { + const memberTraits = memberNs.getMergedTraits() ?? {}; + const inputMemberValue = input[memberName]; + if (inputMemberValue == null && !memberNs.isIdempotencyToken()) { + if (memberTraits.httpLabel) { + if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) { + throw new Error(`No value provided for input HTTP label: ${memberName}.`); + } + } + continue; + } + if (memberTraits.httpPayload) { + const isStreaming2 = memberNs.isStreaming(); + if (isStreaming2) { + const isEventStream = memberNs.isStructSchema(); + if (isEventStream) { + if (input[memberName]) { + payload = await this.serializeEventStream({ + eventStream: input[memberName], + requestSchema: ns + }); + } + } else { + payload = inputMemberValue; + } + } else { + serializer.write(memberNs, inputMemberValue); + payload = serializer.flush(); + } + delete input[memberName]; + } else if (memberTraits.httpLabel) { + serializer.write(memberNs, inputMemberValue); + const replacement = serializer.flush(); + if (request.path.includes(`{${memberName}+}`)) { + request.path = request.path.replace(`{${memberName}+}`, replacement.split("/").map(extendedEncodeURIComponent).join("/")); + } else if (request.path.includes(`{${memberName}}`)) { + request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement)); + } + delete input[memberName]; + } else if (memberTraits.httpHeader) { + serializer.write(memberNs, inputMemberValue); + headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush()); + delete input[memberName]; + } else if (typeof memberTraits.httpPrefixHeaders === "string") { + for (const [key, val] of Object.entries(inputMemberValue)) { + const amalgam = memberTraits.httpPrefixHeaders + key; + serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val); + headers[amalgam.toLowerCase()] = serializer.flush(); + } + delete input[memberName]; + } else if (memberTraits.httpQuery || memberTraits.httpQueryParams) { + this.serializeQuery(memberNs, inputMemberValue, query); + delete input[memberName]; + } else { + hasNonHttpBindingMember = true; + payloadMemberNames.push(memberName); + payloadMemberSchemas.push(memberNs); + } + } + if (hasNonHttpBindingMember && input) { + const [namespace, name] = (ns.getName(true) ?? "#Unknown").split("#"); + const requiredMembers = ns.getSchema()[6]; + const payloadSchema = [ + 3, + namespace, + name, + ns.getMergedTraits(), + payloadMemberNames, + payloadMemberSchemas, + void 0 + ]; + if (requiredMembers) { + payloadSchema[6] = requiredMembers; + } else { + payloadSchema.pop(); + } + serializer.write(payloadSchema, input); + payload = serializer.flush(); + } + request.headers = headers; + request.query = query; + request.body = payload; + return request; + } + serializeQuery(ns, data, query) { + const serializer = this.serializer; + const traits = ns.getMergedTraits(); + if (traits.httpQueryParams) { + for (const [key, val] of Object.entries(data)) { + if (!(key in query)) { + const valueSchema = ns.getValueSchema(); + Object.assign(valueSchema.getMergedTraits(), { + ...traits, + httpQuery: key, + httpQueryParams: void 0 + }); + this.serializeQuery(valueSchema, val, query); + } + } + return; + } + if (ns.isListSchema()) { + const sparse = !!ns.getMergedTraits().sparse; + const buffer = []; + for (const item of data) { + serializer.write([ns.getValueSchema(), traits], item); + const serializable = serializer.flush(); + if (sparse || serializable !== void 0) { + buffer.push(serializable); + } + } + query[traits.httpQuery] = buffer; + } else { + serializer.write([ns, traits], data); + query[traits.httpQuery] = serializer.flush(); + } + } + async deserializeResponse(operationSchema, context2, response) { + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(operationSchema.output); + const dataObject = {}; + if (response.statusCode >= 300) { + const bytes = await collectBody(response.body, context2); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(15, bytes)); + } + await this.handleError(operationSchema, context2, response, dataObject, this.deserializeMetadata(response)); + throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw."); + } + for (const header in response.headers) { + const value = response.headers[header]; + delete response.headers[header]; + response.headers[header.toLowerCase()] = value; + } + const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context2, response, dataObject); + if (nonHttpBindingMembers.length) { + const bytes = await collectBody(response.body, context2); + if (bytes.byteLength > 0) { + const dataFromBody = await deserializer.read(ns, bytes); + for (const member2 of nonHttpBindingMembers) { + if (dataFromBody[member2] != null) { + dataObject[member2] = dataFromBody[member2]; + } + } + } + } else if (nonHttpBindingMembers.discardResponseBody) { + await collectBody(response.body, context2); + } + dataObject.$metadata = this.deserializeMetadata(response); + return dataObject; + } + async deserializeHttpMessage(schema, context2, response, arg4, arg5) { + let dataObject; + if (arg4 instanceof Set) { + dataObject = arg5; + } else { + dataObject = arg4; + } + let discardResponseBody = true; + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(schema); + const nonHttpBindingMembers = []; + for (const [memberName, memberSchema] of ns.structIterator()) { + const memberTraits = memberSchema.getMemberTraits(); + if (memberTraits.httpPayload) { + discardResponseBody = false; + const isStreaming2 = memberSchema.isStreaming(); + if (isStreaming2) { + const isEventStream = memberSchema.isStructSchema(); + if (isEventStream) { + dataObject[memberName] = await this.deserializeEventStream({ + response, + responseSchema: ns + }); + } else { + dataObject[memberName] = sdkStreamMixin(response.body); + } + } else if (response.body) { + const bytes = await collectBody(response.body, context2); + if (bytes.byteLength > 0) { + dataObject[memberName] = await deserializer.read(memberSchema, bytes); + } + } + } else if (memberTraits.httpHeader) { + const key = String(memberTraits.httpHeader).toLowerCase(); + const value = response.headers[key]; + if (null != value) { + if (memberSchema.isListSchema()) { + const headerListValueSchema = memberSchema.getValueSchema(); + headerListValueSchema.getMergedTraits().httpHeader = key; + let sections; + if (headerListValueSchema.isTimestampSchema() && headerListValueSchema.getSchema() === 4) { + sections = splitEvery(value, ",", 2); + } else { + sections = splitHeader(value); + } + const list = []; + for (const section of sections) { + list.push(await deserializer.read(headerListValueSchema, section.trim())); + } + dataObject[memberName] = list; + } else { + dataObject[memberName] = await deserializer.read(memberSchema, value); + } + } + } else if (memberTraits.httpPrefixHeaders !== void 0) { + dataObject[memberName] = {}; + for (const [header, value] of Object.entries(response.headers)) { + if (header.startsWith(memberTraits.httpPrefixHeaders)) { + const valueSchema = memberSchema.getValueSchema(); + valueSchema.getMergedTraits().httpHeader = header; + dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value); + } + } + } else if (memberTraits.httpResponseCode) { + dataObject[memberName] = response.statusCode; + } else { + nonHttpBindingMembers.push(memberName); + } + } + nonHttpBindingMembers.discardResponseBody = discardResponseBody; + return nonHttpBindingMembers; + } + }; + __name(HttpBindingProtocol, "HttpBindingProtocol"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +var init_RpcProtocol = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js +var init_resolve_path = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js +var init_requestBuilder = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js +function determineTimestampFormat(ns, settings) { + if (settings.timestampFormat.useTrait) { + if (ns.isTimestampSchema() && (ns.getSchema() === 5 || ns.getSchema() === 6 || ns.getSchema() === 7)) { + return ns.getSchema(); + } + } + const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits(); + const bindingFormat = settings.httpBindings ? typeof httpPrefixHeaders === "string" || Boolean(httpHeader) ? 6 : Boolean(httpQuery) || Boolean(httpLabel) ? 5 : void 0 : void 0; + return bindingFormat ?? settings.timestampFormat.default; +} +var init_determineTimestampFormat = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(determineTimestampFormat, "determineTimestampFormat"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +var FromStringShapeDeserializer; +var init_FromStringShapeDeserializer = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_serde2(); + init_dist_es6(); + init_dist_es5(); + init_SerdeContext(); + init_determineTimestampFormat(); + FromStringShapeDeserializer = class extends SerdeContext { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + read(_schema, data) { + const ns = NormalizedSchema.of(_schema); + if (ns.isListSchema()) { + return splitHeader(data).map((item) => this.read(ns.getValueSchema(), item)); + } + if (ns.isBlobSchema()) { + return (this.serdeContext?.base64Decoder ?? fromBase64)(data); + } + if (ns.isTimestampSchema()) { + const format2 = determineTimestampFormat(ns, this.settings); + switch (format2) { + case 5: + return _parseRfc3339DateTimeWithOffset(data); + case 6: + return _parseRfc7231DateTime(data); + case 7: + return _parseEpochTimestamp(data); + default: + console.warn("Missing timestamp format, parsing value with Date constructor:", data); + return new Date(data); + } + } + if (ns.isStringSchema()) { + const mediaType = ns.getMergedTraits().mediaType; + let intermediateValue = data; + if (mediaType) { + if (ns.getMergedTraits().httpHeader) { + intermediateValue = this.base64ToUtf8(intermediateValue); + } + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + intermediateValue = LazyJsonString.from(intermediateValue); + } + return intermediateValue; + } + } + if (ns.isNumericSchema()) { + return Number(data); + } + if (ns.isBigIntegerSchema()) { + return BigInt(data); + } + if (ns.isBigDecimalSchema()) { + return new NumericValue(data, "bigDecimal"); + } + if (ns.isBooleanSchema()) { + return String(data).toLowerCase() === "true"; + } + return data; + } + base64ToUtf8(base64String) { + return (this.serdeContext?.utf8Encoder ?? toUtf8)((this.serdeContext?.base64Decoder ?? fromBase64)(base64String)); + } + }; + __name(FromStringShapeDeserializer, "FromStringShapeDeserializer"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js +var HttpInterceptingShapeDeserializer; +var init_HttpInterceptingShapeDeserializer = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_dist_es5(); + init_SerdeContext(); + init_FromStringShapeDeserializer(); + HttpInterceptingShapeDeserializer = class extends SerdeContext { + codecDeserializer; + stringDeserializer; + constructor(codecDeserializer, codecSettings) { + super(); + this.codecDeserializer = codecDeserializer; + this.stringDeserializer = new FromStringShapeDeserializer(codecSettings); + } + setSerdeContext(serdeContext) { + this.stringDeserializer.setSerdeContext(serdeContext); + this.codecDeserializer.setSerdeContext(serdeContext); + this.serdeContext = serdeContext; + } + read(schema, data) { + const ns = NormalizedSchema.of(schema); + const traits = ns.getMergedTraits(); + const toString3 = this.serdeContext?.utf8Encoder ?? toUtf8; + if (traits.httpHeader || traits.httpResponseCode) { + return this.stringDeserializer.read(ns, toString3(data)); + } + if (traits.httpPayload) { + if (ns.isBlobSchema()) { + const toBytes = this.serdeContext?.utf8Decoder ?? fromUtf8; + if (typeof data === "string") { + return toBytes(data); + } + return data; + } else if (ns.isStringSchema()) { + if ("byteLength" in data) { + return toString3(data); + } + return data; + } + } + return this.codecDeserializer.read(ns, data); + } + }; + __name(HttpInterceptingShapeDeserializer, "HttpInterceptingShapeDeserializer"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +var ToStringShapeSerializer; +var init_ToStringShapeSerializer = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_serde2(); + init_dist_es6(); + init_SerdeContext(); + init_determineTimestampFormat(); + ToStringShapeSerializer = class extends SerdeContext { + settings; + stringBuffer = ""; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + switch (typeof value) { + case "object": + if (value === null) { + this.stringBuffer = "null"; + return; + } + if (ns.isTimestampSchema()) { + if (!(value instanceof Date)) { + throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`); + } + const format2 = determineTimestampFormat(ns, this.settings); + switch (format2) { + case 5: + this.stringBuffer = value.toISOString().replace(".000Z", "Z"); + break; + case 6: + this.stringBuffer = dateToUtcString(value); + break; + case 7: + this.stringBuffer = String(value.getTime() / 1e3); + break; + default: + console.warn("Missing timestamp format, using epoch seconds", value); + this.stringBuffer = String(value.getTime() / 1e3); + } + return; + } + if (ns.isBlobSchema() && "byteLength" in value) { + this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(value); + return; + } + if (ns.isListSchema() && Array.isArray(value)) { + let buffer = ""; + for (const item of value) { + this.write([ns.getValueSchema(), ns.getMergedTraits()], item); + const headerItem = this.flush(); + const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : quoteHeader(headerItem); + if (buffer !== "") { + buffer += ", "; + } + buffer += serialized; + } + this.stringBuffer = buffer; + return; + } + this.stringBuffer = JSON.stringify(value, null, 2); + break; + case "string": + const mediaType = ns.getMergedTraits().mediaType; + let intermediateValue = value; + if (mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + intermediateValue = LazyJsonString.from(intermediateValue); + } + if (ns.getMergedTraits().httpHeader) { + this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(intermediateValue.toString()); + return; + } + } + this.stringBuffer = value; + break; + default: + if (ns.isIdempotencyToken()) { + this.stringBuffer = v4(); + } else { + this.stringBuffer = String(value); + } + } + } + flush() { + const buffer = this.stringBuffer; + this.stringBuffer = ""; + return buffer; + } + }; + __name(ToStringShapeSerializer, "ToStringShapeSerializer"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js +var HttpInterceptingShapeSerializer; +var init_HttpInterceptingShapeSerializer = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_ToStringShapeSerializer(); + HttpInterceptingShapeSerializer = class { + codecSerializer; + stringSerializer; + buffer; + constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) { + this.codecSerializer = codecSerializer; + this.stringSerializer = stringSerializer; + } + setSerdeContext(serdeContext) { + this.codecSerializer.setSerdeContext(serdeContext); + this.stringSerializer.setSerdeContext(serdeContext); + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + const traits = ns.getMergedTraits(); + if (traits.httpHeader || traits.httpLabel || traits.httpQuery) { + this.stringSerializer.write(ns, value); + this.buffer = this.stringSerializer.flush(); + return; + } + return this.codecSerializer.write(ns, value); + } + flush() { + if (this.buffer !== void 0) { + const buffer = this.buffer; + this.buffer = void 0; + return buffer; + } + return this.codecSerializer.flush(); + } + }; + __name(HttpInterceptingShapeSerializer, "HttpInterceptingShapeSerializer"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/submodules/protocols/index.js +var init_protocols = __esm({ + "../../node_modules/@smithy/core/dist-es/submodules/protocols/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_collect_stream_body(); + init_extended_encode_uri_component(); + init_HttpBindingProtocol(); + init_HttpProtocol(); + init_RpcProtocol(); + init_requestBuilder(); + init_resolve_path(); + init_FromStringShapeDeserializer(); + init_HttpInterceptingShapeDeserializer(); + init_HttpInterceptingShapeSerializer(); + init_ToStringShapeSerializer(); + init_determineTimestampFormat(); + init_SerdeContext(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js +var init_requestBuilder2 = __esm({ + "../../node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/setFeature.js +function setFeature2(context2, feature2, value) { + if (!context2.__smithy_context) { + context2.__smithy_context = { + features: {} + }; + } else if (!context2.__smithy_context.features) { + context2.__smithy_context.features = {}; + } + context2.__smithy_context.features[feature2] = value; +} +var init_setFeature2 = __esm({ + "../../node_modules/@smithy/core/dist-es/setFeature.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(setFeature2, "setFeature"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +var DefaultIdentityProviderConfig; +var init_DefaultIdentityProviderConfig = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + DefaultIdentityProviderConfig = class { + authSchemes = /* @__PURE__ */ new Map(); + constructor(config3) { + for (const [key, value] of Object.entries(config3)) { + if (value !== void 0) { + this.authSchemes.set(key, value); + } + } + } + getIdentityProvider(schemeId) { + return this.authSchemes.get(schemeId); + } + }; + __name(DefaultIdentityProviderConfig, "DefaultIdentityProviderConfig"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +var init_httpApiKeyAuth = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +var init_httpBearerAuth = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js +var init_noAuth = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js +var init_httpAuthSchemes = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_httpApiKeyAuth(); + init_httpBearerAuth(); + init_noAuth(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js +var createIsIdentityExpiredFunction, EXPIRATION_MS, isIdentityExpired, doesIdentityRequireRefresh, memoizeIdentityProvider; +var init_memoizeIdentityProvider = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + createIsIdentityExpiredFunction = /* @__PURE__ */ __name((expirationMs) => /* @__PURE__ */ __name(function isIdentityExpired2(identity2) { + return doesIdentityRequireRefresh(identity2) && identity2.expiration.getTime() - Date.now() < expirationMs; + }, "isIdentityExpired"), "createIsIdentityExpiredFunction"); + EXPIRATION_MS = 3e5; + isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); + doesIdentityRequireRefresh = /* @__PURE__ */ __name((identity2) => identity2.expiration !== void 0, "doesIdentityRequireRefresh"); + memoizeIdentityProvider = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { + if (provider === void 0) { + return void 0; + } + const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider; + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = /* @__PURE__ */ __name(async (options) => { + if (!pending) { + pending = normalizedProvider(options); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; + } + return resolved; + }, "coalesceProvider"); + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(options); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(options); + } + if (isConstant) { + return resolved; + } + if (!requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(options); + return resolved; + } + return resolved; + }; + }, "memoizeIdentityProvider"); + } +}); + +// ../../node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js +var init_util_identity_and_auth = __esm({ + "../../node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_DefaultIdentityProviderConfig(); + init_httpAuthSchemes(); + init_memoizeIdentityProvider(); + } +}); + +// ../../node_modules/@smithy/core/dist-es/index.js +var init_dist_es15 = __esm({ + "../../node_modules/@smithy/core/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getSmithyContext(); + init_middleware_http_auth_scheme(); + init_middleware_http_signing(); + init_normalizeProvider2(); + init_createPaginator(); + init_requestBuilder2(); + init_setFeature2(); + init_util_identity_and_auth(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/ProviderError.js +var init_ProviderError = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/ProviderError.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js +var init_CredentialsProviderError = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/TokenProviderError.js +var init_TokenProviderError = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/TokenProviderError.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/chain.js +var init_chain = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/chain.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/fromStatic.js +var init_fromStatic = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/fromStatic.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/memoize.js +var memoize; +var init_memoize = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/memoize.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = /* @__PURE__ */ __name(async () => { + if (!pending) { + pending = provider(); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; + } + return resolved; + }, "coalesceProvider"); + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + if (isConstant) { + return resolved; + } + if (requiresRefresh && !requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(); + return resolved; + } + return resolved; + }; + }, "memoize"); + } +}); + +// ../../node_modules/@smithy/property-provider/dist-es/index.js +var init_dist_es16 = __esm({ + "../../node_modules/@smithy/property-provider/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_CredentialsProviderError(); + init_ProviderError(); + init_TokenProviderError(); + init_chain(); + init_fromStatic(); + init_memoize(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js +var resolveAwsSdkSigV4AConfig; +var init_resolveAwsSdkSigV4AConfig = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + resolveAwsSdkSigV4AConfig = /* @__PURE__ */ __name((config3) => { + config3.sigv4aSigningRegionSet = normalizeProvider2(config3.sigv4aSigningRegionSet); + return config3; + }, "resolveAwsSdkSigV4AConfig"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/constants.js +var ALGORITHM_QUERY_PARAM, CREDENTIAL_QUERY_PARAM, AMZ_DATE_QUERY_PARAM, SIGNED_HEADERS_QUERY_PARAM, EXPIRES_QUERY_PARAM, SIGNATURE_QUERY_PARAM, TOKEN_QUERY_PARAM, AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER, GENERATED_HEADERS, SIGNATURE_HEADER, SHA256_HEADER, TOKEN_HEADER, ALWAYS_UNSIGNABLE_HEADERS, PROXY_HEADER_PATTERN, SEC_HEADER_PATTERN, ALGORITHM_IDENTIFIER, EVENT_ALGORITHM_IDENTIFIER, UNSIGNED_PAYLOAD, MAX_CACHE_SIZE, KEY_TYPE_IDENTIFIER, MAX_PRESIGNED_TTL; +var init_constants4 = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; + CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; + AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; + SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; + EXPIRES_QUERY_PARAM = "X-Amz-Expires"; + SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; + TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; + AUTH_HEADER = "authorization"; + AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); + DATE_HEADER = "date"; + GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; + SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); + SHA256_HEADER = "x-amz-content-sha256"; + TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); + ALWAYS_UNSIGNABLE_HEADERS = { + authorization: true, + "cache-control": true, + connection: true, + expect: true, + from: true, + "keep-alive": true, + "max-forwards": true, + pragma: true, + referer: true, + te: true, + trailer: true, + "transfer-encoding": true, + upgrade: true, + "user-agent": true, + "x-amzn-trace-id": true + }; + PROXY_HEADER_PATTERN = /^proxy-/; + SEC_HEADER_PATTERN = /^sec-/; + ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; + EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; + UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; + MAX_CACHE_SIZE = 50; + KEY_TYPE_IDENTIFIER = "aws4_request"; + MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js +var signingKeyCache, cacheQueue, createScope, getSigningKey, hmac; +var init_credentialDerivation = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + init_dist_es5(); + init_constants4(); + signingKeyCache = {}; + cacheQueue = []; + createScope = /* @__PURE__ */ __name((shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, "createScope"); + getSigningKey = /* @__PURE__ */ __name(async (sha256Constructor, credentials, shortDate, region, service) => { + const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); + const cacheKey = `${shortDate}:${region}:${service}:${toHex(credsHash)}:${credentials.sessionToken}`; + if (cacheKey in signingKeyCache) { + return signingKeyCache[cacheKey]; + } + cacheQueue.push(cacheKey); + while (cacheQueue.length > MAX_CACHE_SIZE) { + delete signingKeyCache[cacheQueue.shift()]; + } + let key = `AWS4${credentials.secretAccessKey}`; + for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { + key = await hmac(sha256Constructor, key, signable); + } + return signingKeyCache[cacheKey] = key; + }, "getSigningKey"); + hmac = /* @__PURE__ */ __name((ctor, secret, data) => { + const hash4 = new ctor(secret); + hash4.update(toUint8Array(data)); + return hash4.digest(); + }, "hmac"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +var getCanonicalHeaders; +var init_getCanonicalHeaders = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants4(); + getCanonicalHeaders = /* @__PURE__ */ __name(({ headers }, unsignableHeaders, signableHeaders) => { + const canonical = {}; + for (const headerName of Object.keys(headers).sort()) { + if (headers[headerName] == void 0) { + continue; + } + const canonicalHeaderName = headerName.toLowerCase(); + if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) { + if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) { + continue; + } + } + canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); + } + return canonical; + }, "getCanonicalHeaders"); + } +}); + +// ../../node_modules/@smithy/is-array-buffer/dist-es/index.js +var isArrayBuffer; +var init_dist_es17 = __esm({ + "../../node_modules/@smithy/is-array-buffer/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +var getPayloadHash; +var init_getPayloadHash = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es17(); + init_dist_es10(); + init_dist_es5(); + init_constants4(); + getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => { + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase() === SHA256_HEADER) { + return headers[headerName]; + } + } + if (body == void 0) { + return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + } else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer(body)) { + const hashCtor = new hashConstructor(); + hashCtor.update(toUint8Array(body)); + return toHex(await hashCtor.digest()); + } + return UNSIGNED_PAYLOAD; + }, "getPayloadHash"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +function negate(bytes) { + for (let i2 = 0; i2 < 8; i2++) { + bytes[i2] ^= 255; + } + for (let i2 = 7; i2 > -1; i2--) { + bytes[i2]++; + if (bytes[i2] !== 0) + break; + } +} +var HeaderFormatter, HEADER_VALUE_TYPE, UUID_PATTERN, Int64; +var init_HeaderFormatter = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + init_dist_es5(); + HeaderFormatter = class { + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([header.value ? 0 : 1]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8(0, 3); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8(0, 4); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8(0, 6); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8(0, 7); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set(fromHex(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } + }; + __name(HeaderFormatter, "HeaderFormatter"); + (function(HEADER_VALUE_TYPE3) { + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["boolTrue"] = 0] = "boolTrue"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["boolFalse"] = 1] = "boolFalse"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["byte"] = 2] = "byte"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["short"] = 3] = "short"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["integer"] = 4] = "integer"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["long"] = 5] = "long"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["byteArray"] = 6] = "byteArray"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["string"] = 7] = "string"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["timestamp"] = 8] = "timestamp"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["uuid"] = 9] = "uuid"; + })(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {})); + UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; + Int64 = class { + bytes; + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static fromNumber(number4) { + if (number4 > 9223372036854776e3 || number4 < -9223372036854776e3) { + throw new Error(`${number4} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i2 = 7, remaining = Math.abs(Math.round(number4)); i2 > -1 && remaining > 0; i2--, remaining /= 256) { + bytes[i2] = remaining; + } + if (number4 < 0) { + negate(bytes); + } + return new Int64(bytes); + } + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate(bytes); + } + return parseInt(toHex(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } + }; + __name(Int64, "Int64"); + __name(negate, "negate"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/headerUtil.js +var hasHeader; +var init_headerUtil = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/headerUtil.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + hasHeader = /* @__PURE__ */ __name((soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; + }, "hasHeader"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +var moveHeadersToQuery; +var init_moveHeadersToQuery = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + moveHeadersToQuery = /* @__PURE__ */ __name((request, options = {}) => { + const { headers, query = {} } = HttpRequest.clone(request); + for (const name of Object.keys(headers)) { + const lname = name.toLowerCase(); + if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) { + query[name] = headers[name]; + delete headers[name]; + } + } + return { + ...request, + headers, + query + }; + }, "moveHeadersToQuery"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +var prepareRequest; +var init_prepareRequest = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/prepareRequest.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_constants4(); + prepareRequest = /* @__PURE__ */ __name((request) => { + request = HttpRequest.clone(request); + for (const headerName of Object.keys(request.headers)) { + if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { + delete request.headers[headerName]; + } + } + return request; + }, "prepareRequest"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +var getCanonicalQuery; +var init_getCanonicalQuery = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es7(); + init_constants4(); + getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => { + const keys = []; + const serialized = {}; + for (const key of Object.keys(query)) { + if (key.toLowerCase() === SIGNATURE_HEADER) { + continue; + } + const encodedKey = escapeUri(key); + keys.push(encodedKey); + const value = query[key]; + if (typeof value === "string") { + serialized[encodedKey] = `${encodedKey}=${escapeUri(value)}`; + } else if (Array.isArray(value)) { + serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${escapeUri(value2)}`]), []).sort().join("&"); + } + } + return keys.sort().map((key) => serialized[key]).filter((serialized2) => serialized2).join("&"); + }, "getCanonicalQuery"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/utilDate.js +var iso8601, toDate; +var init_utilDate = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/utilDate.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + iso8601 = /* @__PURE__ */ __name((time7) => toDate(time7).toISOString().replace(/\.\d{3}Z$/, "Z"), "iso8601"); + toDate = /* @__PURE__ */ __name((time7) => { + if (typeof time7 === "number") { + return new Date(time7 * 1e3); + } + if (typeof time7 === "string") { + if (Number(time7)) { + return new Date(Number(time7) * 1e3); + } + return new Date(time7); + } + return time7; + }, "toDate"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +var SignatureV4Base; +var init_SignatureV4Base = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + init_dist_es4(); + init_dist_es7(); + init_dist_es5(); + init_getCanonicalQuery(); + init_utilDate(); + SignatureV4Base = class { + service; + regionProvider; + credentialProvider; + sha256; + uriEscapePath; + applyChecksum; + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) { + this.service = service; + this.sha256 = sha256; + this.uriEscapePath = uriEscapePath; + this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; + this.regionProvider = normalizeProvider(region); + this.credentialProvider = normalizeProvider(credentials); + } + createCanonicalRequest(request, canonicalHeaders, payloadHash) { + const sortedHeaders = Object.keys(canonicalHeaders).sort(); + return `${request.method} +${this.getCanonicalPath(request)} +${getCanonicalQuery(request)} +${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")} + +${sortedHeaders.join(";")} +${payloadHash}`; + } + async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) { + const hash4 = new this.sha256(); + hash4.update(toUint8Array(canonicalRequest)); + const hashedRequest = await hash4.digest(); + return `${algorithmIdentifier} +${longDate} +${credentialScope} +${toHex(hashedRequest)}`; + } + getCanonicalPath({ path }) { + if (this.uriEscapePath) { + const normalizedPathSegments = []; + for (const pathSegment of path.split("/")) { + if (pathSegment?.length === 0) + continue; + if (pathSegment === ".") + continue; + if (pathSegment === "..") { + normalizedPathSegments.pop(); + } else { + normalizedPathSegments.push(pathSegment); + } + } + const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`; + const doubleEncoded = escapeUri(normalizedPath); + return doubleEncoded.replace(/%2F/g, "/"); + } + return path; + } + validateResolvedCredentials(credentials) { + if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") { + throw new Error("Resolved credential object is not valid"); + } + } + formatDate(now) { + const longDate = iso8601(now).replace(/[\-:]/g, ""); + return { + longDate, + shortDate: longDate.slice(0, 8) + }; + } + getCanonicalHeaderList(headers) { + return Object.keys(headers).sort().join(";"); + } + }; + __name(SignatureV4Base, "SignatureV4Base"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/SignatureV4.js +var SignatureV4; +var init_SignatureV4 = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/SignatureV4.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + init_dist_es5(); + init_constants4(); + init_credentialDerivation(); + init_getCanonicalHeaders(); + init_getPayloadHash(); + init_HeaderFormatter(); + init_headerUtil(); + init_moveHeadersToQuery(); + init_prepareRequest(); + init_SignatureV4Base(); + SignatureV4 = class extends SignatureV4Base { + headerFormatter = new HeaderFormatter(); + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) { + super({ + applyChecksum, + credentials, + region, + service, + sha256, + uriEscapePath + }); + } + async presign(originalRequest, options = {}) { + const { signingDate = /* @__PURE__ */ new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService } = options; + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { longDate, shortDate } = this.formatDate(signingDate); + if (expiresIn > MAX_PRESIGNED_TTL) { + return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future"); + } + const scope = createScope(shortDate, region, signingService ?? this.service); + const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders }); + if (credentials.sessionToken) { + request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken; + } + request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER; + request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; + request.query[AMZ_DATE_QUERY_PARAM] = longDate; + request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10); + const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders); + request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256))); + return request; + } + async sign(toSign, options) { + if (typeof toSign === "string") { + return this.signString(toSign, options); + } else if (toSign.headers && toSign.payload) { + return this.signEvent(toSign, options); + } else if (toSign.message) { + return this.signMessage(toSign, options); + } else { + return this.signRequest(toSign, options); + } + } + async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) { + const region = signingRegion ?? await this.regionProvider(); + const { shortDate, longDate } = this.formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256); + const hash4 = new this.sha256(); + hash4.update(headers); + const hashedHeaders = toHex(await hash4.digest()); + const stringToSign = [ + EVENT_ALGORITHM_IDENTIFIER, + longDate, + scope, + priorSignature, + hashedHeaders, + hashedPayload + ].join("\n"); + return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); + } + async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) { + const promise2 = this.signEvent({ + headers: this.headerFormatter.format(signableMessage.message.headers), + payload: signableMessage.message.body + }, { + signingDate, + signingRegion, + signingService, + priorSignature: signableMessage.priorSignature + }); + return promise2.then((signature) => { + return { message: signableMessage.message, signature }; + }); + } + async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { shortDate } = this.formatDate(signingDate); + const hash4 = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); + hash4.update(toUint8Array(stringToSign)); + return toHex(await hash4.digest()); + } + async signRequest(requestToSign, { signingDate = /* @__PURE__ */ new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const request = prepareRequest(requestToSign); + const { longDate, shortDate } = this.formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + request.headers[AMZ_DATE_HEADER] = longDate; + if (credentials.sessionToken) { + request.headers[TOKEN_HEADER] = credentials.sessionToken; + } + const payloadHash = await getPayloadHash(request, this.sha256); + if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) { + request.headers[SHA256_HEADER] = payloadHash; + } + const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash)); + request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`; + return request; + } + async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { + const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER); + const hash4 = new this.sha256(await keyPromise); + hash4.update(toUint8Array(stringToSign)); + return toHex(await hash4.digest()); + } + getSigningKey(credentials, region, shortDate, service) { + return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); + } + }; + __name(SignatureV4, "SignatureV4"); + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/signature-v4a-container.js +var signatureV4aContainer; +var init_signature_v4a_container = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/signature-v4a-container.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + signatureV4aContainer = { + SignatureV4a: null + }; + } +}); + +// ../../node_modules/@smithy/signature-v4/dist-es/index.js +var init_dist_es18 = __esm({ + "../../node_modules/@smithy/signature-v4/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_SignatureV4(); + init_constants4(); + init_credentialDerivation(); + init_signature_v4a_container(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js +function normalizeCredentialProvider(config3, { credentials, credentialDefaultProvider }) { + let credentialsProvider; + if (credentials) { + if (!credentials?.memoized) { + credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh); + } else { + credentialsProvider = credentials; + } + } else { + if (credentialDefaultProvider) { + credentialsProvider = normalizeProvider2(credentialDefaultProvider(Object.assign({}, config3, { + parentClientConfig: config3 + }))); + } else { + credentialsProvider = /* @__PURE__ */ __name(async () => { + throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured."); + }, "credentialsProvider"); + } + } + credentialsProvider.memoized = true; + return credentialsProvider; +} +function bindCallerConfig(config3, credentialsProvider) { + if (credentialsProvider.configBound) { + return credentialsProvider; + } + const fn = /* @__PURE__ */ __name(async (options) => credentialsProvider({ ...options, callerClientConfig: config3 }), "fn"); + fn.memoized = credentialsProvider.memoized; + fn.configBound = true; + return fn; +} +var resolveAwsSdkSigV4Config; +var init_resolveAwsSdkSigV4Config = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_client2(); + init_dist_es15(); + init_dist_es18(); + resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config3) => { + let inputCredentials = config3.credentials; + let isUserSupplied = !!config3.credentials; + let resolvedCredentials = void 0; + Object.defineProperty(config3, "credentials", { + set(credentials) { + if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) { + isUserSupplied = true; + } + inputCredentials = credentials; + const memoizedProvider = normalizeCredentialProvider(config3, { + credentials: inputCredentials, + credentialDefaultProvider: config3.credentialDefaultProvider + }); + const boundProvider = bindCallerConfig(config3, memoizedProvider); + if (isUserSupplied && !boundProvider.attributed) { + const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null; + resolvedCredentials = /* @__PURE__ */ __name(async (options) => { + const creds = await boundProvider(options); + const attributedCreds = creds; + if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) { + return setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e"); + } + return attributedCreds; + }, "resolvedCredentials"); + resolvedCredentials.memoized = boundProvider.memoized; + resolvedCredentials.configBound = boundProvider.configBound; + resolvedCredentials.attributed = true; + } else { + resolvedCredentials = boundProvider; + } + }, + get() { + return resolvedCredentials; + }, + enumerable: true, + configurable: true + }); + config3.credentials = inputCredentials; + const { signingEscapePath = true, systemClockOffset = config3.systemClockOffset || 0, sha256 } = config3; + let signer; + if (config3.signer) { + signer = normalizeProvider2(config3.signer); + } else if (config3.regionInfoProvider) { + signer = /* @__PURE__ */ __name(() => normalizeProvider2(config3.region)().then(async (region) => [ + await config3.regionInfoProvider(region, { + useFipsEndpoint: await config3.useFipsEndpoint(), + useDualstackEndpoint: await config3.useDualstackEndpoint() + }) || {}, + region + ]).then(([regionInfo, region]) => { + const { signingRegion, signingService } = regionInfo; + config3.signingRegion = config3.signingRegion || signingRegion || region; + config3.signingName = config3.signingName || signingService || config3.serviceId; + const params = { + ...config3, + credentials: config3.credentials, + region: config3.signingRegion, + service: config3.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config3.signerConstructor || SignatureV4; + return new SignerCtor(params); + }), "signer"); + } else { + signer = /* @__PURE__ */ __name(async (authScheme) => { + authScheme = Object.assign({}, { + name: "sigv4", + signingName: config3.signingName || config3.defaultSigningName, + signingRegion: await normalizeProvider2(config3.region)(), + properties: {} + }, authScheme); + const signingRegion = authScheme.signingRegion; + const signingService = authScheme.signingName; + config3.signingRegion = config3.signingRegion || signingRegion; + config3.signingName = config3.signingName || signingService || config3.serviceId; + const params = { + ...config3, + credentials: config3.credentials, + region: config3.signingRegion, + service: config3.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config3.signerConstructor || SignatureV4; + return new SignerCtor(params); + }, "signer"); + } + const resolvedConfig = Object.assign(config3, { + systemClockOffset, + signingEscapePath, + signer + }); + return resolvedConfig; + }, "resolveAwsSdkSigV4Config"); + __name(normalizeCredentialProvider, "normalizeCredentialProvider"); + __name(bindCallerConfig, "bindCallerConfig"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js +var init_aws_sdk = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AwsSdkSigV4Signer(); + init_AwsSdkSigV4ASigner(); + init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS(); + init_resolveAwsSdkSigV4AConfig(); + init_resolveAwsSdkSigV4Config(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js +var init_httpAuthSchemes2 = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_aws_sdk(); + init_getBearerTokenEnvKey(); + } +}); + +// ../../node_modules/@smithy/util-body-length-browser/dist-es/calculateBodyLength.js +var TEXT_ENCODER, calculateBodyLength; +var init_calculateBodyLength = __esm({ + "../../node_modules/@smithy/util-body-length-browser/dist-es/calculateBodyLength.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + TEXT_ENCODER = typeof TextEncoder == "function" ? new TextEncoder() : null; + calculateBodyLength = /* @__PURE__ */ __name((body) => { + if (typeof body === "string") { + if (TEXT_ENCODER) { + return TEXT_ENCODER.encode(body).byteLength; + } + let len = body.length; + for (let i2 = len - 1; i2 >= 0; i2--) { + const code = body.charCodeAt(i2); + if (code > 127 && code <= 2047) + len++; + else if (code > 2047 && code <= 65535) + len += 2; + if (code >= 56320 && code <= 57343) + i2--; + } + return len; + } else if (typeof body.byteLength === "number") { + return body.byteLength; + } else if (typeof body.size === "number") { + return body.size; + } + throw new Error(`Body Length computation failed for ${body}`); + }, "calculateBodyLength"); + } +}); + +// ../../node_modules/@smithy/util-body-length-browser/dist-es/index.js +var init_dist_es19 = __esm({ + "../../node_modules/@smithy/util-body-length-browser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_calculateBodyLength(); + } +}); + +// ../../node_modules/@smithy/middleware-stack/dist-es/MiddlewareStack.js +var getAllAliases, getMiddlewareNameWithAliases, constructStack, stepWeights, priorityWeights; +var init_MiddlewareStack = __esm({ + "../../node_modules/@smithy/middleware-stack/dist-es/MiddlewareStack.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getAllAliases = /* @__PURE__ */ __name((name, aliases) => { + const _aliases = []; + if (name) { + _aliases.push(name); + } + if (aliases) { + for (const alias of aliases) { + _aliases.push(alias); + } + } + return _aliases; + }, "getAllAliases"); + getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => { + return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; + }, "getMiddlewareNameWithAliases"); + constructStack = /* @__PURE__ */ __name(() => { + let absoluteEntries = []; + let relativeEntries = []; + let identifyOnResolve = false; + const entriesNameSet = /* @__PURE__ */ new Set(); + const sort = /* @__PURE__ */ __name((entries) => entries.sort((a2, b2) => stepWeights[b2.step] - stepWeights[a2.step] || priorityWeights[b2.priority || "normal"] - priorityWeights[a2.priority || "normal"]), "sort"); + const removeByName = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + const aliases = getAllAliases(entry.name, entry.aliases); + if (aliases.includes(toRemove)) { + isRemoved = true; + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByName"); + const removeByReference = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + if (entry.middleware === toRemove) { + isRemoved = true; + for (const alias of getAllAliases(entry.name, entry.aliases)) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByReference"); + const cloneTo = /* @__PURE__ */ __name((toStack) => { + absoluteEntries.forEach((entry) => { + toStack.add(entry.middleware, { ...entry }); + }); + relativeEntries.forEach((entry) => { + toStack.addRelativeTo(entry.middleware, { ...entry }); + }); + toStack.identifyOnResolve?.(stack.identifyOnResolve()); + return toStack; + }, "cloneTo"); + const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => { + const expandedMiddlewareList = []; + from.before.forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + expandedMiddlewareList.push(from); + from.after.reverse().forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + return expandedMiddlewareList; + }, "expandRelativeMiddlewareList"); + const getMiddlewareList = /* @__PURE__ */ __name((debug3 = false) => { + const normalizedAbsoluteEntries = []; + const normalizedRelativeEntries = []; + const normalizedEntriesNameMap = {}; + absoluteEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedAbsoluteEntries.push(normalizedEntry); + }); + relativeEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedRelativeEntries.push(normalizedEntry); + }); + normalizedRelativeEntries.forEach((entry) => { + if (entry.toMiddleware) { + const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; + if (toMiddleware === void 0) { + if (debug3) { + return; + } + throw new Error(`${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`); + } + if (entry.relation === "after") { + toMiddleware.after.push(entry); + } + if (entry.relation === "before") { + toMiddleware.before.push(entry); + } + } + }); + const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => { + wholeList.push(...expandedMiddlewareList); + return wholeList; + }, []); + return mainChain; + }, "getMiddlewareList"); + const stack = { + add: (middleware2, options = {}) => { + const { name, override, aliases: _aliases } = options; + const entry = { + step: "initialize", + priority: "normal", + middleware: middleware2, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = absoluteEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a2) => a2 === alias)); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = absoluteEntries[toOverrideIndex]; + if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ${entry.priority} priority in ${entry.step} step.`); + } + absoluteEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + absoluteEntries.push(entry); + }, + addRelativeTo: (middleware2, options) => { + const { name, override, aliases: _aliases } = options; + const entry = { + middleware: middleware2, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = relativeEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a2) => a2 === alias)); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = relativeEntries[toOverrideIndex]; + if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.`); + } + relativeEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + relativeEntries.push(entry); + }, + clone: () => cloneTo(constructStack()), + use: (plugin) => { + plugin.applyToStack(stack); + }, + remove: (toRemove) => { + if (typeof toRemove === "string") + return removeByName(toRemove); + else + return removeByReference(toRemove); + }, + removeByTag: (toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + const { tags, name, aliases: _aliases } = entry; + if (tags && tags.includes(toRemove)) { + const aliases = getAllAliases(name, _aliases); + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + isRemoved = true; + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, + concat: (from) => { + const cloned = cloneTo(constructStack()); + cloned.use(from); + cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false)); + return cloned; + }, + applyToStack: cloneTo, + identify: () => { + return getMiddlewareList(true).map((mw) => { + const step = mw.step ?? mw.relation + " " + mw.toMiddleware; + return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; + }); + }, + identifyOnResolve(toggle) { + if (typeof toggle === "boolean") + identifyOnResolve = toggle; + return identifyOnResolve; + }, + resolve: (handler, context2) => { + for (const middleware2 of getMiddlewareList().map((entry) => entry.middleware).reverse()) { + handler = middleware2(handler, context2); + } + if (identifyOnResolve) { + console.log(stack.identify()); + } + return handler; + } + }; + return stack; + }, "constructStack"); + stepWeights = { + initialize: 5, + serialize: 4, + build: 3, + finalizeRequest: 2, + deserialize: 1 + }; + priorityWeights = { + high: 3, + normal: 2, + low: 1 + }; + } +}); + +// ../../node_modules/@smithy/middleware-stack/dist-es/index.js +var init_dist_es20 = __esm({ + "../../node_modules/@smithy/middleware-stack/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_MiddlewareStack(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/client.js +var Client; +var init_client3 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/client.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es20(); + Client = class { + config; + middlewareStack = constructStack(); + initConfig; + handlers; + constructor(config3) { + this.config = config3; + const { protocol, protocolSettings } = config3; + if (protocolSettings) { + if (typeof protocol === "function") { + config3.protocol = new protocol(protocolSettings); + } + } + } + send(command, optionsOrCb, cb2) { + const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0; + const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb2; + const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true; + let handler; + if (useHandlerCache) { + if (!this.handlers) { + this.handlers = /* @__PURE__ */ new WeakMap(); + } + const handlers2 = this.handlers; + if (handlers2.has(command.constructor)) { + handler = handlers2.get(command.constructor); + } else { + handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + handlers2.set(command.constructor, handler); + } + } else { + delete this.handlers; + handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + } + if (callback) { + handler(command).then((result) => callback(null, result.output), (err) => callback(err)).catch(() => { + }); + } else { + return handler(command).then((result) => result.output); + } + } + destroy() { + this.config?.requestHandler?.destroy?.(); + delete this.handlers; + } + }; + __name(Client, "Client"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js +var init_collect_stream_body2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/schemaLogFilter.js +function schemaLogFilter(schema, data) { + if (data == null) { + return data; + } + const ns = NormalizedSchema.of(schema); + if (ns.getMergedTraits().sensitive) { + return SENSITIVE_STRING; + } + if (ns.isListSchema()) { + const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING; + } + } else if (ns.isMapSchema()) { + const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING; + } + } else if (ns.isStructSchema() && typeof data === "object") { + const object2 = data; + const newObject = {}; + for (const [member2, memberNs] of ns.structIterator()) { + if (object2[member2] != null) { + newObject[member2] = schemaLogFilter(memberNs, object2[member2]); + } + } + return newObject; + } + return data; +} +var SENSITIVE_STRING; +var init_schemaLogFilter = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/schemaLogFilter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + SENSITIVE_STRING = "***SensitiveInformation***"; + __name(schemaLogFilter, "schemaLogFilter"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/command.js +var Command, ClassBuilder; +var init_command2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/command.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es20(); + init_dist_es(); + init_schemaLogFilter(); + Command = class { + middlewareStack = constructStack(); + schema; + static classBuilder() { + return new ClassBuilder(); + } + resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) { + for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { + this.middlewareStack.use(mw); + } + const stack = clientStack.concat(this.middlewareStack); + const { logger: logger3 } = configuration; + const handlerExecutionContext = { + logger: logger3, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + commandInstance: this, + ...smithyContext + }, + ...additionalContext + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + }; + __name(Command, "Command"); + ClassBuilder = class { + _init = () => { + }; + _ep = {}; + _middlewareFn = () => []; + _commandName = ""; + _clientName = ""; + _additionalContext = {}; + _smithyContext = {}; + _inputFilterSensitiveLog = void 0; + _outputFilterSensitiveLog = void 0; + _serializer = null; + _deserializer = null; + _operationSchema; + init(cb2) { + this._init = cb2; + } + ep(endpointParameterInstructions) { + this._ep = endpointParameterInstructions; + return this; + } + m(middlewareSupplier) { + this._middlewareFn = middlewareSupplier; + return this; + } + s(service, operation2, smithyContext = {}) { + this._smithyContext = { + service, + operation: operation2, + ...smithyContext + }; + return this; + } + c(additionalContext = {}) { + this._additionalContext = additionalContext; + return this; + } + n(clientName, commandName) { + this._clientName = clientName; + this._commandName = commandName; + return this; + } + f(inputFilter = (_) => _, outputFilter = (_) => _) { + this._inputFilterSensitiveLog = inputFilter; + this._outputFilterSensitiveLog = outputFilter; + return this; + } + ser(serializer) { + this._serializer = serializer; + return this; + } + de(deserializer) { + this._deserializer = deserializer; + return this; + } + sc(operation2) { + this._operationSchema = operation2; + this._smithyContext.operationSchema = operation2; + return this; + } + build() { + const closure = this; + let CommandRef; + return CommandRef = /* @__PURE__ */ __name(class extends Command { + input; + static getEndpointParameterInstructions() { + return closure._ep; + } + constructor(...[input]) { + super(); + this.input = input ?? {}; + closure._init(this); + this.schema = closure._operationSchema; + } + resolveMiddleware(stack, configuration, options) { + const op = closure._operationSchema; + const input = op?.[4] ?? op?.input; + const output = op?.[5] ?? op?.output; + return this.resolveMiddlewareWithContext(stack, configuration, options, { + CommandCtor: CommandRef, + middlewareFn: closure._middlewareFn, + clientName: closure._clientName, + commandName: closure._commandName, + inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_) => _), + outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_) => _), + smithyContext: closure._smithyContext, + additionalContext: closure._additionalContext + }); + } + serialize = closure._serializer; + deserialize = closure._deserializer; + }, "CommandRef"); + } + }; + __name(ClassBuilder, "ClassBuilder"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/constants.js +var init_constants5 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js +var createAggregatedClient; +var init_create_aggregated_client = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + createAggregatedClient = /* @__PURE__ */ __name((commands2, Client2, options) => { + for (const [command, CommandCtor] of Object.entries(commands2)) { + const methodImpl = /* @__PURE__ */ __name(async function(args, optionsOrCb, cb2) { + const command2 = new CommandCtor(args); + if (typeof optionsOrCb === "function") { + this.send(command2, optionsOrCb); + } else if (typeof cb2 === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expected http options but got ${typeof optionsOrCb}`); + this.send(command2, optionsOrCb || {}, cb2); + } else { + return this.send(command2, optionsOrCb); + } + }, "methodImpl"); + const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); + Client2.prototype[methodName] = methodImpl; + } + const { paginators: paginators2 = {}, waiters: waiters2 = {} } = options ?? {}; + for (const [paginatorName, paginatorFn] of Object.entries(paginators2)) { + if (Client2.prototype[paginatorName] === void 0) { + Client2.prototype[paginatorName] = function(commandInput = {}, paginationConfiguration, ...rest) { + return paginatorFn({ + ...paginationConfiguration, + client: this + }, commandInput, ...rest); + }; + } + } + for (const [waiterName, waiterFn] of Object.entries(waiters2)) { + if (Client2.prototype[waiterName] === void 0) { + Client2.prototype[waiterName] = async function(commandInput = {}, waiterConfiguration, ...rest) { + let config3 = waiterConfiguration; + if (typeof waiterConfiguration === "number") { + config3 = { + maxWaitTime: waiterConfiguration + }; + } + return waiterFn({ + ...config3, + client: this + }, commandInput, ...rest); + }; + } + } + }, "createAggregatedClient"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/exceptions.js +var ServiceException, decorateServiceException; +var init_exceptions = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/exceptions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ServiceException = class extends Error { + $fault; + $response; + $retryable; + $metadata; + constructor(options) { + super(options.message); + Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype); + this.name = options.name; + this.$fault = options.$fault; + this.$metadata = options.$metadata; + } + static isInstance(value) { + if (!value) + return false; + const candidate = value; + return ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server"); + } + static [Symbol.hasInstance](instance) { + if (!instance) + return false; + const candidate = instance; + if (this === ServiceException) { + return ServiceException.isInstance(instance); + } + if (ServiceException.isInstance(instance)) { + if (candidate.name && this.name) { + return this.prototype.isPrototypeOf(instance) || candidate.name === this.name; + } + return this.prototype.isPrototypeOf(instance); + } + return false; + } + }; + __name(ServiceException, "ServiceException"); + decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => { + Object.entries(additions).filter(([, v3]) => v3 !== void 0).forEach(([k2, v3]) => { + if (exception[k2] == void 0 || exception[k2] === "") { + exception[k2] = v3; + } + }); + const message2 = exception.message || exception.Message || "UnknownError"; + exception.message = message2; + delete exception.Message; + return exception; + }, "decorateServiceException"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/default-error-handler.js +var init_default_error_handler = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/default-error-handler.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/defaults-mode.js +var loadConfigsForDefaultMode; +var init_defaults_mode = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/defaults-mode.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + loadConfigsForDefaultMode = /* @__PURE__ */ __name((mode) => { + switch (mode) { + case "standard": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "in-region": + return { + retryMode: "standard", + connectionTimeout: 1100 + }; + case "cross-region": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "mobile": + return { + retryMode: "standard", + connectionTimeout: 3e4 + }; + default: + return {}; + } + }, "loadConfigsForDefaultMode"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js +var init_emitWarningIfUnsupportedVersion2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js +var init_extended_encode_uri_component2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js +var knownAlgorithms, getChecksumConfiguration, resolveChecksumRuntimeConfig; +var init_checksum3 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es(); + knownAlgorithms = Object.values(AlgorithmId); + getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const checksumAlgorithms = []; + for (const id in AlgorithmId) { + const algorithmId = AlgorithmId[id]; + if (runtimeConfig[algorithmId] === void 0) { + continue; + } + checksumAlgorithms.push({ + algorithmId: () => algorithmId, + checksumConstructor: () => runtimeConfig[algorithmId] + }); + } + for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) { + checksumAlgorithms.push({ + algorithmId: () => id, + checksumConstructor: () => ChecksumCtor + }); + } + return { + addChecksumAlgorithm(algo) { + runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {}; + const id = algo.algorithmId(); + const ctor = algo.checksumConstructor(); + if (knownAlgorithms.includes(id)) { + runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor; + } else { + runtimeConfig.checksumAlgorithms[id] = ctor; + } + checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return checksumAlgorithms; + } + }; + }, "getChecksumConfiguration"); + resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + const id = checksumAlgorithm.algorithmId(); + if (knownAlgorithms.includes(id)) { + runtimeConfig[id] = checksumAlgorithm.checksumConstructor(); + } + }); + return runtimeConfig; + }, "resolveChecksumRuntimeConfig"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/extensions/retry.js +var getRetryConfiguration, resolveRetryRuntimeConfig; +var init_retry2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/extensions/retry.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + setRetryStrategy(retryStrategy) { + runtimeConfig.retryStrategy = retryStrategy; + }, + retryStrategy() { + return runtimeConfig.retryStrategy; + } + }; + }, "getRetryConfiguration"); + resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => { + const runtimeConfig = {}; + runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); + return runtimeConfig; + }, "resolveRetryRuntimeConfig"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js +var getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig; +var init_defaultExtensionConfiguration2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_checksum3(); + init_retry2(); + getDefaultExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig)); + }, "getDefaultExtensionConfiguration"); + resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config3) => { + return Object.assign(resolveChecksumRuntimeConfig(config3), resolveRetryRuntimeConfig(config3)); + }, "resolveDefaultRuntimeConfig"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/extensions/index.js +var init_extensions3 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/extensions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_defaultExtensionConfiguration2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/get-array-if-single-item.js +var init_get_array_if_single_item = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/get-array-if-single-item.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/get-value-from-text-node.js +var getValueFromTextNode; +var init_get_value_from_text_node = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/get-value-from-text-node.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getValueFromTextNode = /* @__PURE__ */ __name((obj) => { + const textNodeName = "#text"; + for (const key in obj) { + if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) { + obj[key] = obj[key][textNodeName]; + } else if (typeof obj[key] === "object" && obj[key] !== null) { + obj[key] = getValueFromTextNode(obj[key]); + } + } + return obj; + }, "getValueFromTextNode"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/is-serializable-header-value.js +var init_is_serializable_header_value = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/is-serializable-header-value.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js +var NoOpLogger; +var init_NoOpLogger = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + NoOpLogger = class { + trace() { + } + debug() { + } + info() { + } + warn() { + } + error() { + } + }; + __name(NoOpLogger, "NoOpLogger"); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/object-mapping.js +var init_object_mapping = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/object-mapping.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/resolve-path.js +var init_resolve_path2 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/resolve-path.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/ser-utils.js +var init_ser_utils = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/ser-utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/serde-json.js +var init_serde_json = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/serde-json.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/smithy-client/dist-es/index.js +var init_dist_es21 = __esm({ + "../../node_modules/@smithy/smithy-client/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_client3(); + init_collect_stream_body2(); + init_command2(); + init_constants5(); + init_create_aggregated_client(); + init_default_error_handler(); + init_defaults_mode(); + init_emitWarningIfUnsupportedVersion2(); + init_exceptions(); + init_extended_encode_uri_component2(); + init_extensions3(); + init_get_array_if_single_item(); + init_get_value_from_text_node(); + init_is_serializable_header_value(); + init_NoOpLogger(); + init_object_mapping(); + init_resolve_path2(); + init_ser_utils(); + init_serde_json(); + init_serde2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js +var ProtocolLib; +var init_ProtocolLib = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_dist_es21(); + ProtocolLib = class { + queryCompat; + constructor(queryCompat = false) { + this.queryCompat = queryCompat; + } + resolveRestContentType(defaultContentType, inputSchema) { + const members = inputSchema.getMemberSchemas(); + const httpPayloadMember = Object.values(members).find((m2) => { + return !!m2.getMergedTraits().httpPayload; + }); + if (httpPayloadMember) { + const mediaType = httpPayloadMember.getMergedTraits().mediaType; + if (mediaType) { + return mediaType; + } else if (httpPayloadMember.isStringSchema()) { + return "text/plain"; + } else if (httpPayloadMember.isBlobSchema()) { + return "application/octet-stream"; + } else { + return defaultContentType; + } + } else if (!inputSchema.isUnitSchema()) { + const hasBody = Object.values(members).find((m2) => { + const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m2.getMergedTraits(); + const noPrefixHeaders = httpPrefixHeaders === void 0; + return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders; + }); + if (hasBody) { + return defaultContentType; + } + } + } + async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) { + let namespace = defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + const errorMetadata = { + $metadata: metadata, + $fault: response.statusCode < 500 ? "client" : "server" + }; + const registry2 = TypeRegistry.for(namespace); + try { + const errorSchema = getErrorSchema?.(registry2, errorName) ?? registry2.getSchema(errorIdentifier); + return { errorSchema, errorMetadata }; + } catch (e2) { + dataObject.message = dataObject.message ?? dataObject.Message ?? "UnknownError"; + const synthetic = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace); + const baseExceptionSchema = synthetic.getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error; + throw this.decorateServiceException(Object.assign(new ErrorCtor({ name: errorName }), errorMetadata), dataObject); + } + throw this.decorateServiceException(Object.assign(new Error(errorName), errorMetadata), dataObject); + } + } + decorateServiceException(exception, additions = {}) { + if (this.queryCompat) { + const msg = exception.Message ?? additions.Message; + const error50 = decorateServiceException(exception, additions); + if (msg) { + error50.message = msg; + } + error50.Error = { + ...error50.Error, + Type: error50.Error?.Type, + Code: error50.Error?.Code, + Message: error50.Error?.message ?? error50.Error?.Message ?? msg + }; + const reqId = error50.$metadata.requestId; + if (reqId) { + error50.RequestId = reqId; + } + return error50; + } + return decorateServiceException(exception, additions); + } + setQueryCompatError(output, response) { + const queryErrorHeader = response.headers?.["x-amzn-query-error"]; + if (output !== void 0 && queryErrorHeader != null) { + const [Code, Type] = queryErrorHeader.split(";"); + const entries = Object.entries(output); + const Error2 = { + Code, + Type + }; + Object.assign(output, Error2); + for (const [k2, v3] of entries) { + Error2[k2 === "message" ? "Message" : k2] = v3; + } + delete Error2.__type; + output.Error = Error2; + } + } + queryCompatOutput(queryCompatErrorData, errorData) { + if (queryCompatErrorData.Error) { + errorData.Error = queryCompatErrorData.Error; + } + if (queryCompatErrorData.Type) { + errorData.Type = queryCompatErrorData.Type; + } + if (queryCompatErrorData.Code) { + errorData.Code = queryCompatErrorData.Code; + } + } + findQueryCompatibleError(registry2, errorName) { + try { + return registry2.getSchema(errorName); + } catch (e2) { + return registry2.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName); + } + } + }; + __name(ProtocolLib, "ProtocolLib"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js +var init_AwsSmithyRpcV2CborProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js +var init_coercing_serializers = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js +var SerdeContextConfig; +var init_ConfigurableSerdeContext = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SerdeContextConfig = class { + serdeContext; + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + }; + __name(SerdeContextConfig, "SerdeContextConfig"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js +var UnionSerde; +var init_UnionSerde = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + UnionSerde = class { + from; + to; + keys; + constructor(from, to) { + this.from = from; + this.to = to; + this.keys = new Set(Object.keys(this.from).filter((k2) => k2 !== "__type")); + } + mark(key) { + this.keys.delete(key); + } + hasUnknown() { + return this.keys.size === 1 && Object.keys(this.to).length === 0; + } + writeUnknown() { + if (this.hasUnknown()) { + const k2 = this.keys.values().next().value; + const v3 = this.from[k2]; + this.to.$unknown = [k2, v3]; + } + } + }; + __name(UnionSerde, "UnionSerde"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +var init_parseJsonBody = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +var init_JsonShapeDeserializer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +var init_JsonShapeSerializer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js +var init_JsonCodec = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +var init_AwsJsonRpcProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js +var init_AwsJson1_0Protocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js +var init_AwsJson1_1Protocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +var init_AwsRestJsonProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js +var init_awsExpectUnion = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/escape-attribute.js +function escapeAttribute(value) { + return value.replace(/&/g, "&").replace(/
/g, ">").replace(/"/g, """); +} +var init_escape_attribute = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/escape-attribute.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(escapeAttribute, "escapeAttribute"); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/escape-element.js +function escapeElement(value) { + return value.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">").replace(/\r/g, " ").replace(/\n/g, " ").replace(/\u0085/g, "…").replace(/\u2028/, "
"); +} +var init_escape_element = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/escape-element.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(escapeElement, "escapeElement"); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/XmlText.js +var XmlText; +var init_XmlText = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/XmlText.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_escape_element(); + XmlText = class { + value; + constructor(value) { + this.value = value; + } + toString() { + return escapeElement("" + this.value); + } + }; + __name(XmlText, "XmlText"); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/XmlNode.js +var XmlNode; +var init_XmlNode = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/XmlNode.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_escape_attribute(); + init_XmlText(); + XmlNode = class { + name; + children; + attributes = {}; + static of(name, childText, withName) { + const node = new XmlNode(name); + if (childText !== void 0) { + node.addChildNode(new XmlText(childText)); + } + if (withName !== void 0) { + node.withName(withName); + } + return node; + } + constructor(name, children = []) { + this.name = name; + this.children = children; + } + withName(name) { + this.name = name; + return this; + } + addAttribute(name, value) { + this.attributes[name] = value; + return this; + } + addChildNode(child) { + this.children.push(child); + return this; + } + removeAttribute(name) { + delete this.attributes[name]; + return this; + } + n(name) { + this.name = name; + return this; + } + c(child) { + this.children.push(child); + return this; + } + a(name, value) { + if (value != null) { + this.attributes[name] = value; + } + return this; + } + cc(input, field, withName = field) { + if (input[field] != null) { + const node = XmlNode.of(field, input[field]).withName(withName); + this.c(node); + } + } + l(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + nodes.map((node) => { + node.withName(memberName); + this.c(node); + }); + } + } + lc(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + const containerNode = new XmlNode(memberName); + nodes.map((node) => { + containerNode.c(node); + }); + this.c(containerNode); + } + } + toString() { + const hasChildren2 = Boolean(this.children.length); + let xmlText = `<${this.name}`; + const attributes = this.attributes; + for (const attributeName of Object.keys(attributes)) { + const attribute = attributes[attributeName]; + if (attribute != null) { + xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`; + } + } + return xmlText += !hasChildren2 ? "/>" : `>${this.children.map((c2) => c2.toString()).join("")}`; + } + }; + __name(XmlNode, "XmlNode"); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.browser.js +function parseXML(xmlString) { + if (!parser) { + parser = new DOMParser(); + } + const xmlDocument = parser.parseFromString(xmlString, "application/xml"); + if (xmlDocument.getElementsByTagName("parsererror").length > 0) { + throw new Error("DOMParser XML parsing error."); + } + const xmlToObj = /* @__PURE__ */ __name((node) => { + if (node.nodeType === Node.TEXT_NODE) { + if (node.textContent?.trim()) { + return node.textContent; + } + } + if (node.nodeType === Node.ELEMENT_NODE) { + const element = node; + if (element.attributes.length === 0 && element.childNodes.length === 0) { + return ""; + } + const obj = {}; + const attributes = Array.from(element.attributes); + for (const attr of attributes) { + obj[`${attr.name}`] = attr.value; + } + const childNodes = Array.from(element.childNodes); + for (const child of childNodes) { + const childResult = xmlToObj(child); + if (childResult != null) { + const childName = child.nodeName; + if (childNodes.length === 1 && attributes.length === 0 && childName === "#text") { + return childResult; + } + if (obj[childName]) { + if (Array.isArray(obj[childName])) { + obj[childName].push(childResult); + } else { + obj[childName] = [obj[childName], childResult]; + } + } else { + obj[childName] = childResult; + } + } else if (childNodes.length === 1 && attributes.length === 0) { + return element.textContent; + } + } + return obj; + } + return null; + }, "xmlToObj"); + return { + [xmlDocument.documentElement.nodeName]: xmlToObj(xmlDocument.documentElement) + }; +} +var parser; +var init_xml_parser_browser = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(parseXML, "parseXML"); + } +}); + +// ../../node_modules/@aws-sdk/xml-builder/dist-es/index.js +var init_dist_es22 = __esm({ + "../../node_modules/@aws-sdk/xml-builder/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_XmlNode(); + init_XmlText(); + init_xml_parser_browser(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js +var XmlShapeDeserializer; +var init_XmlShapeDeserializer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es22(); + init_protocols(); + init_schema3(); + init_dist_es21(); + init_dist_es5(); + init_ConfigurableSerdeContext(); + init_UnionSerde(); + XmlShapeDeserializer = class extends SerdeContextConfig { + settings; + stringDeserializer; + constructor(settings) { + super(); + this.settings = settings; + this.stringDeserializer = new FromStringShapeDeserializer(settings); + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + this.stringDeserializer.setSerdeContext(serdeContext); + } + read(schema, bytes, key) { + const ns = NormalizedSchema.of(schema); + const memberSchemas = ns.getMemberSchemas(); + const isEventPayload = ns.isStructSchema() && ns.isMemberSchema() && !!Object.values(memberSchemas).find((memberNs) => { + return !!memberNs.getMemberTraits().eventPayload; + }); + if (isEventPayload) { + const output = {}; + const memberName = Object.keys(memberSchemas)[0]; + const eventMemberSchema = memberSchemas[memberName]; + if (eventMemberSchema.isBlobSchema()) { + output[memberName] = bytes; + } else { + output[memberName] = this.read(memberSchemas[memberName], bytes); + } + return output; + } + const xmlString = (this.serdeContext?.utf8Encoder ?? toUtf8)(bytes); + const parsedObject = this.parseXml(xmlString); + return this.readSchema(schema, key ? parsedObject[key] : parsedObject); + } + readSchema(_schema, value) { + const ns = NormalizedSchema.of(_schema); + if (ns.isUnitSchema()) { + return; + } + const traits = ns.getMergedTraits(); + if (ns.isListSchema() && !Array.isArray(value)) { + return this.readSchema(ns, [value]); + } + if (value == null) { + return value; + } + if (typeof value === "object") { + const flat = !!traits.xmlFlattened; + if (ns.isListSchema()) { + const listValue = ns.getValueSchema(); + const buffer2 = []; + const sourceKey = listValue.getMergedTraits().xmlName ?? "member"; + const source = flat ? value : (value[0] ?? value)[sourceKey]; + if (source == null) { + return buffer2; + } + const sourceArray = Array.isArray(source) ? source : [source]; + for (const v3 of sourceArray) { + buffer2.push(this.readSchema(listValue, v3)); + } + return buffer2; + } + const buffer = {}; + if (ns.isMapSchema()) { + const keyNs = ns.getKeySchema(); + const memberNs = ns.getValueSchema(); + let entries; + if (flat) { + entries = Array.isArray(value) ? value : [value]; + } else { + entries = Array.isArray(value.entry) ? value.entry : [value.entry]; + } + const keyProperty = keyNs.getMergedTraits().xmlName ?? "key"; + const valueProperty = memberNs.getMergedTraits().xmlName ?? "value"; + for (const entry of entries) { + const key = entry[keyProperty]; + const value2 = entry[valueProperty]; + buffer[key] = this.readSchema(memberNs, value2); + } + return buffer; + } + if (ns.isStructSchema()) { + const union3 = ns.isUnionSchema(); + let unionSerde; + if (union3) { + unionSerde = new UnionSerde(value, buffer); + } + for (const [memberName, memberSchema] of ns.structIterator()) { + const memberTraits = memberSchema.getMergedTraits(); + const xmlObjectKey = !memberTraits.httpPayload ? memberSchema.getMemberTraits().xmlName ?? memberName : memberTraits.xmlName ?? memberSchema.getName(); + if (union3) { + unionSerde.mark(xmlObjectKey); + } + if (value[xmlObjectKey] != null) { + buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]); + } + } + if (union3) { + unionSerde.writeUnknown(); + } + return buffer; + } + if (ns.isDocumentSchema()) { + return value; + } + throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`); + } + if (ns.isListSchema()) { + return []; + } + if (ns.isMapSchema() || ns.isStructSchema()) { + return {}; + } + return this.stringDeserializer.read(ns, value); + } + parseXml(xml) { + if (xml.length) { + let parsedObj; + try { + parsedObj = parseXML(xml); + } catch (e2) { + if (e2 && typeof e2 === "object") { + Object.defineProperty(e2, "$responseBodyText", { + value: xml + }); + } + throw e2; + } + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; + } + return getValueFromTextNode(parsedObjToReturn); + } + return {}; + } + }; + __name(XmlShapeDeserializer, "XmlShapeDeserializer"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +var init_QueryShapeSerializer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +var init_AwsQueryProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js +var init_AwsEc2QueryProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QuerySerializerSettings.js +var init_QuerySerializerSettings = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QuerySerializerSettings.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js +var loadRestXmlErrorCode; +var init_parseXmlBody = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + loadRestXmlErrorCode = /* @__PURE__ */ __name((output, data) => { + if (data?.Error?.Code !== void 0) { + return data.Error.Code; + } + if (data?.Code !== void 0) { + return data.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } + }, "loadRestXmlErrorCode"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +var XmlShapeSerializer; +var init_XmlShapeSerializer = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es22(); + init_protocols(); + init_schema3(); + init_serde2(); + init_dist_es21(); + init_dist_es6(); + init_ConfigurableSerdeContext(); + XmlShapeSerializer = class extends SerdeContextConfig { + settings; + stringBuffer; + byteBuffer; + buffer; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + if (ns.isStringSchema() && typeof value === "string") { + this.stringBuffer = value; + } else if (ns.isBlobSchema()) { + this.byteBuffer = "byteLength" in value ? value : (this.serdeContext?.base64Decoder ?? fromBase64)(value); + } else { + this.buffer = this.writeStruct(ns, value, void 0); + const traits = ns.getMergedTraits(); + if (traits.httpPayload && !traits.xmlName) { + this.buffer.withName(ns.getName()); + } + } + } + flush() { + if (this.byteBuffer !== void 0) { + const bytes = this.byteBuffer; + delete this.byteBuffer; + return bytes; + } + if (this.stringBuffer !== void 0) { + const str = this.stringBuffer; + delete this.stringBuffer; + return str; + } + const buffer = this.buffer; + if (this.settings.xmlNamespace) { + if (!buffer?.attributes?.["xmlns"]) { + buffer.addAttribute("xmlns", this.settings.xmlNamespace); + } + } + delete this.buffer; + return buffer.toString(); + } + writeStruct(ns, value, parentXmlns) { + const traits = ns.getMergedTraits(); + const name = ns.isMemberSchema() && !traits.httpPayload ? ns.getMemberTraits().xmlName ?? ns.getMemberName() : traits.xmlName ?? ns.getName(); + if (!name || !ns.isStructSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${ns.getName(true)}.`); + } + const structXmlNode = XmlNode.of(name); + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); + for (const [memberName, memberSchema] of ns.structIterator()) { + const val = value[memberName]; + if (val != null || memberSchema.isIdempotencyToken()) { + if (memberSchema.getMergedTraits().xmlAttribute) { + structXmlNode.addAttribute(memberSchema.getMergedTraits().xmlName ?? memberName, this.writeSimple(memberSchema, val)); + continue; + } + if (memberSchema.isListSchema()) { + this.writeList(memberSchema, val, structXmlNode, xmlns); + } else if (memberSchema.isMapSchema()) { + this.writeMap(memberSchema, val, structXmlNode, xmlns); + } else if (memberSchema.isStructSchema()) { + structXmlNode.addChildNode(this.writeStruct(memberSchema, val, xmlns)); + } else { + const memberNode = XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName()); + this.writeSimpleInto(memberSchema, val, memberNode, xmlns); + structXmlNode.addChildNode(memberNode); + } + } + } + const { $unknown } = value; + if ($unknown && ns.isUnionSchema() && Array.isArray($unknown) && Object.keys(value).length === 1) { + const [k2, v3] = $unknown; + const node = XmlNode.of(k2); + if (typeof v3 !== "string") { + if (value instanceof XmlNode || value instanceof XmlText) { + structXmlNode.addChildNode(value); + } else { + throw new Error(`@aws-sdk - $unknown union member in XML requires value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`); + } + } + this.writeSimpleInto(0, v3, node, xmlns); + structXmlNode.addChildNode(node); + } + if (xmlns) { + structXmlNode.addAttribute(xmlnsAttr, xmlns); + } + return structXmlNode; + } + writeList(listMember, array2, container, parentXmlns) { + if (!listMember.isMemberSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${listMember.getName(true)}`); + } + const listTraits = listMember.getMergedTraits(); + const listValueSchema = listMember.getValueSchema(); + const listValueTraits = listValueSchema.getMergedTraits(); + const sparse = !!listValueTraits.sparse; + const flat = !!listTraits.xmlFlattened; + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(listMember, parentXmlns); + const writeItem = /* @__PURE__ */ __name((container2, value) => { + if (listValueSchema.isListSchema()) { + this.writeList(listValueSchema, Array.isArray(value) ? value : [value], container2, xmlns); + } else if (listValueSchema.isMapSchema()) { + this.writeMap(listValueSchema, value, container2, xmlns); + } else if (listValueSchema.isStructSchema()) { + const struct = this.writeStruct(listValueSchema, value, xmlns); + container2.addChildNode(struct.withName(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member")); + } else { + const listItemNode = XmlNode.of(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member"); + this.writeSimpleInto(listValueSchema, value, listItemNode, xmlns); + container2.addChildNode(listItemNode); + } + }, "writeItem"); + if (flat) { + for (const value of array2) { + if (sparse || value != null) { + writeItem(container, value); + } + } + } else { + const listNode = XmlNode.of(listTraits.xmlName ?? listMember.getMemberName()); + if (xmlns) { + listNode.addAttribute(xmlnsAttr, xmlns); + } + for (const value of array2) { + if (sparse || value != null) { + writeItem(listNode, value); + } + } + container.addChildNode(listNode); + } + } + writeMap(mapMember, map2, container, parentXmlns, containerIsMap = false) { + if (!mapMember.isMemberSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}`); + } + const mapTraits = mapMember.getMergedTraits(); + const mapKeySchema = mapMember.getKeySchema(); + const mapKeyTraits = mapKeySchema.getMergedTraits(); + const keyTag = mapKeyTraits.xmlName ?? "key"; + const mapValueSchema = mapMember.getValueSchema(); + const mapValueTraits = mapValueSchema.getMergedTraits(); + const valueTag = mapValueTraits.xmlName ?? "value"; + const sparse = !!mapValueTraits.sparse; + const flat = !!mapTraits.xmlFlattened; + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(mapMember, parentXmlns); + const addKeyValue = /* @__PURE__ */ __name((entry, key, val) => { + const keyNode = XmlNode.of(keyTag, key); + const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns); + if (keyXmlns) { + keyNode.addAttribute(keyXmlnsAttr, keyXmlns); + } + entry.addChildNode(keyNode); + let valueNode = XmlNode.of(valueTag); + if (mapValueSchema.isListSchema()) { + this.writeList(mapValueSchema, val, valueNode, xmlns); + } else if (mapValueSchema.isMapSchema()) { + this.writeMap(mapValueSchema, val, valueNode, xmlns, true); + } else if (mapValueSchema.isStructSchema()) { + valueNode = this.writeStruct(mapValueSchema, val, xmlns); + } else { + this.writeSimpleInto(mapValueSchema, val, valueNode, xmlns); + } + entry.addChildNode(valueNode); + }, "addKeyValue"); + if (flat) { + for (const [key, val] of Object.entries(map2)) { + if (sparse || val != null) { + const entry = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); + addKeyValue(entry, key, val); + container.addChildNode(entry); + } + } + } else { + let mapNode; + if (!containerIsMap) { + mapNode = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); + if (xmlns) { + mapNode.addAttribute(xmlnsAttr, xmlns); + } + container.addChildNode(mapNode); + } + for (const [key, val] of Object.entries(map2)) { + if (sparse || val != null) { + const entry = XmlNode.of("entry"); + addKeyValue(entry, key, val); + (containerIsMap ? container : mapNode).addChildNode(entry); + } + } + } + } + writeSimple(_schema, value) { + if (null === value) { + throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value."); + } + const ns = NormalizedSchema.of(_schema); + let nodeContents = null; + if (value && typeof value === "object") { + if (ns.isBlobSchema()) { + nodeContents = (this.serdeContext?.base64Encoder ?? toBase64)(value); + } else if (ns.isTimestampSchema() && value instanceof Date) { + const format2 = determineTimestampFormat(ns, this.settings); + switch (format2) { + case 5: + nodeContents = value.toISOString().replace(".000Z", "Z"); + break; + case 6: + nodeContents = dateToUtcString(value); + break; + case 7: + nodeContents = String(value.getTime() / 1e3); + break; + default: + console.warn("Missing timestamp format, using http date", value); + nodeContents = dateToUtcString(value); + break; + } + } else if (ns.isBigDecimalSchema() && value) { + if (value instanceof NumericValue) { + return value.string; + } + return String(value); + } else if (ns.isMapSchema() || ns.isListSchema()) { + throw new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead."); + } else { + throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${ns.getName(true)}`); + } + } + if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) { + nodeContents = String(value); + } + if (ns.isStringSchema()) { + if (value === void 0 && ns.isIdempotencyToken()) { + nodeContents = v4(); + } else { + nodeContents = String(value); + } + } + if (nodeContents === null) { + throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`); + } + return nodeContents; + } + writeSimpleInto(_schema, value, into, parentXmlns) { + const nodeContents = this.writeSimple(_schema, value); + const ns = NormalizedSchema.of(_schema); + const content = new XmlText(nodeContents); + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); + if (xmlns) { + into.addAttribute(xmlnsAttr, xmlns); + } + into.addChildNode(content); + } + getXmlnsAttribute(ns, parentXmlns) { + const traits = ns.getMergedTraits(); + const [prefix, xmlns] = traits.xmlNamespace ?? []; + if (xmlns && xmlns !== parentXmlns) { + return [prefix ? `xmlns:${prefix}` : "xmlns", xmlns]; + } + return [void 0, void 0]; + } + }; + __name(XmlShapeSerializer, "XmlShapeSerializer"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js +var XmlCodec; +var init_XmlCodec = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_ConfigurableSerdeContext(); + init_XmlShapeDeserializer(); + init_XmlShapeSerializer(); + XmlCodec = class extends SerdeContextConfig { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + createSerializer() { + const serializer = new XmlShapeSerializer(this.settings); + serializer.setSerdeContext(this.serdeContext); + return serializer; + } + createDeserializer() { + const deserializer = new XmlShapeDeserializer(this.settings); + deserializer.setSerdeContext(this.serdeContext); + return deserializer; + } + }; + __name(XmlCodec, "XmlCodec"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +var AwsRestXmlProtocol; +var init_AwsRestXmlProtocol = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_protocols(); + init_schema3(); + init_ProtocolLib(); + init_parseXmlBody(); + init_XmlCodec(); + AwsRestXmlProtocol = class extends HttpBindingProtocol { + codec; + serializer; + deserializer; + mixin = new ProtocolLib(); + constructor(options) { + super(options); + const settings = { + timestampFormat: { + useTrait: true, + default: 5 + }, + httpBindings: true, + xmlNamespace: options.xmlNamespace, + serviceNamespace: options.defaultNamespace + }; + this.codec = new XmlCodec(settings); + this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); + this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings); + } + getPayloadCodec() { + return this.codec; + } + getShapeId() { + return "aws.protocols#restXml"; + } + async serializeRequest(operationSchema, input, context2) { + const request = await super.serializeRequest(operationSchema, input, context2); + const inputSchema = NormalizedSchema.of(operationSchema.input); + if (!request.headers["content-type"]) { + const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema); + if (contentType) { + request.headers["content-type"] = contentType; + } + } + if (typeof request.body === "string" && request.headers["content-type"] === this.getDefaultContentType() && !request.body.startsWith("' + request.body; + } + return request; + } + async deserializeResponse(operationSchema, context2, response) { + return super.deserializeResponse(operationSchema, context2, response); + } + async handleError(operationSchema, context2, response, dataObject, metadata) { + const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown"; + if (dataObject.Error && typeof dataObject.Error === "object") { + for (const key of Object.keys(dataObject.Error)) { + dataObject[key] = dataObject.Error[key]; + if (key.toLowerCase() === "message") { + dataObject.message = dataObject.Error[key]; + } + } + } + if (dataObject.RequestId && !metadata.requestId) { + metadata.requestId = dataObject.RequestId; + } + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); + const ns = NormalizedSchema.of(errorSchema); + const message2 = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown"; + const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; + const exception = new ErrorCtor(message2); + await this.deserializeHttpMessage(errorSchema, context2, response, dataObject); + const output = {}; + for (const [name, member2] of ns.structIterator()) { + const target = member2.getMergedTraits().xmlName ?? name; + const value = dataObject.Error?.[target] ?? dataObject[target]; + output[name] = this.codec.createDeserializer().readSchema(member2, value); + } + throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, { + $fault: ns.getMergedTraits().error, + message: message2 + }, output), dataObject); + } + getDefaultContentType() { + return "application/xml"; + } + hasUnstructuredPayloadBinding(ns) { + for (const [, member2] of ns.structIterator()) { + if (member2.getMergedTraits().httpPayload) { + return !(member2.isStructSchema() || member2.isMapSchema() || member2.isListSchema()); + } + } + return false; + } + }; + __name(AwsRestXmlProtocol, "AwsRestXmlProtocol"); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +var init_protocols2 = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AwsSmithyRpcV2CborProtocol(); + init_coercing_serializers(); + init_AwsJson1_0Protocol(); + init_AwsJson1_1Protocol(); + init_AwsJsonRpcProtocol(); + init_AwsRestJsonProtocol(); + init_JsonCodec(); + init_JsonShapeDeserializer(); + init_JsonShapeSerializer(); + init_awsExpectUnion(); + init_parseJsonBody(); + init_AwsEc2QueryProtocol(); + init_AwsQueryProtocol(); + init_QuerySerializerSettings(); + init_QueryShapeSerializer(); + init_AwsRestXmlProtocol(); + init_XmlCodec(); + init_XmlShapeDeserializer(); + init_XmlShapeSerializer(); + init_parseXmlBody(); + } +}); + +// ../../node_modules/@aws-sdk/core/dist-es/index.js +var init_dist_es23 = __esm({ + "../../node_modules/@aws-sdk/core/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_client2(); + init_httpAuthSchemes2(); + init_protocols2(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmForRequest.js +var getChecksumAlgorithmForRequest; +var init_getChecksumAlgorithmForRequest = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmForRequest.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants3(); + getChecksumAlgorithmForRequest = /* @__PURE__ */ __name((input, { requestChecksumRequired, requestAlgorithmMember, requestChecksumCalculation }) => { + if (!requestAlgorithmMember) { + return requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired ? DEFAULT_CHECKSUM_ALGORITHM : void 0; + } + if (!input[requestAlgorithmMember]) { + return void 0; + } + const checksumAlgorithm = input[requestAlgorithmMember]; + return checksumAlgorithm; + }, "getChecksumAlgorithmForRequest"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumLocationName.js +var getChecksumLocationName; +var init_getChecksumLocationName = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumLocationName.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants3(); + getChecksumLocationName = /* @__PURE__ */ __name((algorithm) => algorithm === ChecksumAlgorithm.MD5 ? "content-md5" : `x-amz-checksum-${algorithm.toLowerCase()}`, "getChecksumLocationName"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeader.js +var hasHeader2; +var init_hasHeader = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeader.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + hasHeader2 = /* @__PURE__ */ __name((header, headers) => { + const soughtHeader = header.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; + }, "hasHeader"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeaderWithPrefix.js +var hasHeaderWithPrefix; +var init_hasHeaderWithPrefix = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeaderWithPrefix.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + hasHeaderWithPrefix = /* @__PURE__ */ __name((headerPrefix, headers) => { + const soughtHeaderPrefix = headerPrefix.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase().startsWith(soughtHeaderPrefix)) { + return true; + } + } + return false; + }, "hasHeaderWithPrefix"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isStreaming.js +var isStreaming; +var init_isStreaming = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isStreaming.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es17(); + isStreaming = /* @__PURE__ */ __name((body) => body !== void 0 && typeof body !== "string" && !ArrayBuffer.isView(body) && !isArrayBuffer(body), "isStreaming"); + } +}); + +// ../../node_modules/tslib/tslib.es6.mjs +function __awaiter(thisArg, _arguments, P2, generator) { + function adopt(value) { + return value instanceof P2 ? value : new P2(function(resolve) { + resolve(value); + }); + } + __name(adopt, "adopt"); + return new (P2 || (P2 = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e2) { + reject(e2); + } + } + __name(fulfilled, "fulfilled"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e2) { + reject(e2); + } + } + __name(rejected, "rejected"); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + __name(step, "step"); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t9[0] & 1) + throw t9[1]; + return t9[1]; + }, trys: [], ops: [] }, f2, y2, t9, g2 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g2.next = verb(0), g2["throw"] = verb(1), g2["return"] = verb(2), typeof Symbol === "function" && (g2[Symbol.iterator] = function() { + return this; + }), g2; + function verb(n2) { + return function(v3) { + return step([n2, v3]); + }; + } + __name(verb, "verb"); + function step(op) { + if (f2) + throw new TypeError("Generator is already executing."); + while (g2 && (g2 = 0, op[0] && (_ = 0)), _) + try { + if (f2 = 1, y2 && (t9 = op[0] & 2 ? y2["return"] : op[0] ? y2["throw"] || ((t9 = y2["return"]) && t9.call(y2), 0) : y2.next) && !(t9 = t9.call(y2, op[1])).done) + return t9; + if (y2 = 0, t9) + op = [op[0] & 2, t9.value]; + switch (op[0]) { + case 0: + case 1: + t9 = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y2 = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t9 = _.trys, t9 = t9.length > 0 && t9[t9.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t9 || op[1] > t9[0] && op[1] < t9[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t9[1]) { + _.label = t9[1]; + t9 = op; + break; + } + if (t9 && _.label < t9[2]) { + _.label = t9[2]; + _.ops.push(op); + break; + } + if (t9[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e2) { + op = [6, e2]; + y2 = 0; + } finally { + f2 = t9 = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + __name(step, "step"); +} +function __values(o2) { + var s2 = typeof Symbol === "function" && Symbol.iterator, m2 = s2 && o2[s2], i2 = 0; + if (m2) + return m2.call(o2); + if (o2 && typeof o2.length === "number") + return { + next: function() { + if (o2 && i2 >= o2.length) + o2 = void 0; + return { value: o2 && o2[i2++], done: !o2 }; + } + }; + throw new TypeError(s2 ? "Object is not iterable." : "Symbol.iterator is not defined."); +} +var init_tslib_es6 = __esm({ + "../../node_modules/tslib/tslib.es6.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(__awaiter, "__awaiter"); + __name(__generator, "__generator"); + __name(__values, "__values"); + } +}); + +// ../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js +var fromUtf82; +var init_fromUtf8_browser2 = __esm({ + "../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fromUtf82 = /* @__PURE__ */ __name((input) => new TextEncoder().encode(input), "fromUtf8"); + } +}); + +// ../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js +var init_toUint8Array2 = __esm({ + "../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser2(); + } +}); + +// ../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +var init_toUtf8_browser2 = __esm({ + "../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/index.js +var init_dist_es24 = __esm({ + "../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser2(); + init_toUint8Array2(); + init_toUtf8_browser2(); + } +}); + +// ../../node_modules/@aws-crypto/util/build/module/convertToBuffer.js +function convertToBuffer(data) { + if (data instanceof Uint8Array) + return data; + if (typeof data === "string") { + return fromUtf83(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); +} +var fromUtf83; +var init_convertToBuffer = __esm({ + "../../node_modules/@aws-crypto/util/build/module/convertToBuffer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es24(); + fromUtf83 = typeof Buffer !== "undefined" && Buffer.from ? function(input) { + return Buffer.from(input, "utf8"); + } : fromUtf82; + __name(convertToBuffer, "convertToBuffer"); + } +}); + +// ../../node_modules/@aws-crypto/util/build/module/isEmptyData.js +function isEmptyData(data) { + if (typeof data === "string") { + return data.length === 0; + } + return data.byteLength === 0; +} +var init_isEmptyData = __esm({ + "../../node_modules/@aws-crypto/util/build/module/isEmptyData.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(isEmptyData, "isEmptyData"); + } +}); + +// ../../node_modules/@aws-crypto/util/build/module/numToUint8.js +function numToUint8(num) { + return new Uint8Array([ + (num & 4278190080) >> 24, + (num & 16711680) >> 16, + (num & 65280) >> 8, + num & 255 + ]); +} +var init_numToUint8 = __esm({ + "../../node_modules/@aws-crypto/util/build/module/numToUint8.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(numToUint8, "numToUint8"); + } +}); + +// ../../node_modules/@aws-crypto/util/build/module/uint32ArrayFrom.js +function uint32ArrayFrom(a_lookUpTable2) { + if (!Uint32Array.from) { + var return_array = new Uint32Array(a_lookUpTable2.length); + var a_index = 0; + while (a_index < a_lookUpTable2.length) { + return_array[a_index] = a_lookUpTable2[a_index]; + a_index += 1; + } + return return_array; + } + return Uint32Array.from(a_lookUpTable2); +} +var init_uint32ArrayFrom = __esm({ + "../../node_modules/@aws-crypto/util/build/module/uint32ArrayFrom.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(uint32ArrayFrom, "uint32ArrayFrom"); + } +}); + +// ../../node_modules/@aws-crypto/util/build/module/index.js +var init_module = __esm({ + "../../node_modules/@aws-crypto/util/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_convertToBuffer(); + init_isEmptyData(); + init_numToUint8(); + init_uint32ArrayFrom(); + } +}); + +// ../../node_modules/@aws-crypto/crc32c/build/module/aws_crc32c.js +var AwsCrc32c; +var init_aws_crc32c = __esm({ + "../../node_modules/@aws-crypto/crc32c/build/module/aws_crc32c.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tslib_es6(); + init_module(); + init_module2(); + AwsCrc32c = /** @class */ + function() { + function AwsCrc32c2() { + this.crc32c = new Crc32c(); + } + __name(AwsCrc32c2, "AwsCrc32c"); + AwsCrc32c2.prototype.update = function(toHash) { + if (isEmptyData(toHash)) + return; + this.crc32c.update(convertToBuffer(toHash)); + }; + AwsCrc32c2.prototype.digest = function() { + return __awaiter(this, void 0, void 0, function() { + return __generator(this, function(_a124) { + return [2, numToUint8(this.crc32c.digest())]; + }); + }); + }; + AwsCrc32c2.prototype.reset = function() { + this.crc32c = new Crc32c(); + }; + return AwsCrc32c2; + }(); + } +}); + +// ../../node_modules/@aws-crypto/crc32c/build/module/index.js +var Crc32c, a_lookupTable, lookupTable; +var init_module2 = __esm({ + "../../node_modules/@aws-crypto/crc32c/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tslib_es6(); + init_module(); + init_aws_crc32c(); + Crc32c = /** @class */ + function() { + function Crc32c2() { + this.checksum = 4294967295; + } + __name(Crc32c2, "Crc32c"); + Crc32c2.prototype.update = function(data) { + var e_1, _a124; + try { + for (var data_1 = __values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { + var byte = data_1_1.value; + this.checksum = this.checksum >>> 8 ^ lookupTable[(this.checksum ^ byte) & 255]; + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (data_1_1 && !data_1_1.done && (_a124 = data_1.return)) + _a124.call(data_1); + } finally { + if (e_1) + throw e_1.error; + } + } + return this; + }; + Crc32c2.prototype.digest = function() { + return (this.checksum ^ 4294967295) >>> 0; + }; + return Crc32c2; + }(); + a_lookupTable = [ + 0, + 4067132163, + 3778769143, + 324072436, + 3348797215, + 904991772, + 648144872, + 3570033899, + 2329499855, + 2024987596, + 1809983544, + 2575936315, + 1296289744, + 3207089363, + 2893594407, + 1578318884, + 274646895, + 3795141740, + 4049975192, + 51262619, + 3619967088, + 632279923, + 922689671, + 3298075524, + 2592579488, + 1760304291, + 2075979607, + 2312596564, + 1562183871, + 2943781820, + 3156637768, + 1313733451, + 549293790, + 3537243613, + 3246849577, + 871202090, + 3878099393, + 357341890, + 102525238, + 4101499445, + 2858735121, + 1477399826, + 1264559846, + 3107202533, + 1845379342, + 2677391885, + 2361733625, + 2125378298, + 820201905, + 3263744690, + 3520608582, + 598981189, + 4151959214, + 85089709, + 373468761, + 3827903834, + 3124367742, + 1213305469, + 1526817161, + 2842354314, + 2107672161, + 2412447074, + 2627466902, + 1861252501, + 1098587580, + 3004210879, + 2688576843, + 1378610760, + 2262928035, + 1955203488, + 1742404180, + 2511436119, + 3416409459, + 969524848, + 714683780, + 3639785095, + 205050476, + 4266873199, + 3976438427, + 526918040, + 1361435347, + 2739821008, + 2954799652, + 1114974503, + 2529119692, + 1691668175, + 2005155131, + 2247081528, + 3690758684, + 697762079, + 986182379, + 3366744552, + 476452099, + 3993867776, + 4250756596, + 255256311, + 1640403810, + 2477592673, + 2164122517, + 1922457750, + 2791048317, + 1412925310, + 1197962378, + 3037525897, + 3944729517, + 427051182, + 170179418, + 4165941337, + 746937522, + 3740196785, + 3451792453, + 1070968646, + 1905808397, + 2213795598, + 2426610938, + 1657317369, + 3053634322, + 1147748369, + 1463399397, + 2773627110, + 4215344322, + 153784257, + 444234805, + 3893493558, + 1021025245, + 3467647198, + 3722505002, + 797665321, + 2197175160, + 1889384571, + 1674398607, + 2443626636, + 1164749927, + 3070701412, + 2757221520, + 1446797203, + 137323447, + 4198817972, + 3910406976, + 461344835, + 3484808360, + 1037989803, + 781091935, + 3705997148, + 2460548119, + 1623424788, + 1939049696, + 2180517859, + 1429367560, + 2807687179, + 3020495871, + 1180866812, + 410100952, + 3927582683, + 4182430767, + 186734380, + 3756733383, + 763408580, + 1053836080, + 3434856499, + 2722870694, + 1344288421, + 1131464017, + 2971354706, + 1708204729, + 2545590714, + 2229949006, + 1988219213, + 680717673, + 3673779818, + 3383336350, + 1002577565, + 4010310262, + 493091189, + 238226049, + 4233660802, + 2987750089, + 1082061258, + 1395524158, + 2705686845, + 1972364758, + 2279892693, + 2494862625, + 1725896226, + 952904198, + 3399985413, + 3656866545, + 731699698, + 4283874585, + 222117402, + 510512622, + 3959836397, + 3280807620, + 837199303, + 582374963, + 3504198960, + 68661723, + 4135334616, + 3844915500, + 390545967, + 1230274059, + 3141532936, + 2825850620, + 1510247935, + 2395924756, + 2091215383, + 1878366691, + 2644384480, + 3553878443, + 565732008, + 854102364, + 3229815391, + 340358836, + 3861050807, + 4117890627, + 119113024, + 1493875044, + 2875275879, + 3090270611, + 1247431312, + 2660249211, + 1828433272, + 2141937292, + 2378227087, + 3811616794, + 291187481, + 34330861, + 4032846830, + 615137029, + 3603020806, + 3314634738, + 939183345, + 1776939221, + 2609017814, + 2295496738, + 2058945313, + 2926798794, + 1545135305, + 1330124605, + 3173225534, + 4084100981, + 17165430, + 307568514, + 3762199681, + 888469610, + 3332340585, + 3587147933, + 665062302, + 2042050490, + 2346497209, + 2559330125, + 1793573966, + 3190661285, + 1279665062, + 1595330642, + 2910671697 + ]; + lookupTable = uint32ArrayFrom(a_lookupTable); + } +}); + +// ../../node_modules/@aws-sdk/crc64-nvme/dist-es/Crc64Nvme.js +var generateCRC64NVMETable, CRC64_NVME_REVERSED_TABLE, t0, t1, t2, t3, t4, t5, t6, t7, ensureTablesInitialized, Crc64Nvme; +var init_Crc64Nvme = __esm({ + "../../node_modules/@aws-sdk/crc64-nvme/dist-es/Crc64Nvme.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + generateCRC64NVMETable = /* @__PURE__ */ __name(() => { + const sliceLength = 8; + const tables = new Array(sliceLength); + for (let slice = 0; slice < sliceLength; slice++) { + const table3 = new Array(512); + for (let i2 = 0; i2 < 256; i2++) { + let crc = BigInt(i2); + for (let j2 = 0; j2 < 8 * (slice + 1); j2++) { + if (crc & 1n) { + crc = crc >> 1n ^ 0x9a6c9329ac4bc9b5n; + } else { + crc = crc >> 1n; + } + } + table3[i2 * 2] = Number(crc >> 32n & 0xffffffffn); + table3[i2 * 2 + 1] = Number(crc & 0xffffffffn); + } + tables[slice] = new Uint32Array(table3); + } + return tables; + }, "generateCRC64NVMETable"); + ensureTablesInitialized = /* @__PURE__ */ __name(() => { + if (!CRC64_NVME_REVERSED_TABLE) { + CRC64_NVME_REVERSED_TABLE = generateCRC64NVMETable(); + [t0, t1, t2, t3, t4, t5, t6, t7] = CRC64_NVME_REVERSED_TABLE; + } + }, "ensureTablesInitialized"); + Crc64Nvme = class { + c1 = 0; + c2 = 0; + constructor() { + ensureTablesInitialized(); + this.reset(); + } + update(data) { + const len = data.length; + let i2 = 0; + let crc1 = this.c1; + let crc2 = this.c2; + while (i2 + 8 <= len) { + const idx0 = ((crc2 ^ data[i2++]) & 255) << 1; + const idx1 = ((crc2 >>> 8 ^ data[i2++]) & 255) << 1; + const idx2 = ((crc2 >>> 16 ^ data[i2++]) & 255) << 1; + const idx3 = ((crc2 >>> 24 ^ data[i2++]) & 255) << 1; + const idx4 = ((crc1 ^ data[i2++]) & 255) << 1; + const idx5 = ((crc1 >>> 8 ^ data[i2++]) & 255) << 1; + const idx6 = ((crc1 >>> 16 ^ data[i2++]) & 255) << 1; + const idx7 = ((crc1 >>> 24 ^ data[i2++]) & 255) << 1; + crc1 = t7[idx0] ^ t6[idx1] ^ t5[idx2] ^ t4[idx3] ^ t3[idx4] ^ t2[idx5] ^ t1[idx6] ^ t0[idx7]; + crc2 = t7[idx0 + 1] ^ t6[idx1 + 1] ^ t5[idx2 + 1] ^ t4[idx3 + 1] ^ t3[idx4 + 1] ^ t2[idx5 + 1] ^ t1[idx6 + 1] ^ t0[idx7 + 1]; + } + while (i2 < len) { + const idx = ((crc2 ^ data[i2]) & 255) << 1; + crc2 = (crc2 >>> 8 | (crc1 & 255) << 24) >>> 0; + crc1 = crc1 >>> 8 ^ t0[idx]; + crc2 ^= t0[idx + 1]; + i2++; + } + this.c1 = crc1; + this.c2 = crc2; + } + async digest() { + const c1 = this.c1 ^ 4294967295; + const c2 = this.c2 ^ 4294967295; + return new Uint8Array([ + c1 >>> 24, + c1 >>> 16 & 255, + c1 >>> 8 & 255, + c1 & 255, + c2 >>> 24, + c2 >>> 16 & 255, + c2 >>> 8 & 255, + c2 & 255 + ]); + } + reset() { + this.c1 = 4294967295; + this.c2 = 4294967295; + } + }; + __name(Crc64Nvme, "Crc64Nvme"); + } +}); + +// ../../node_modules/@aws-sdk/crc64-nvme/dist-es/crc64-nvme-crt-container.js +var crc64NvmeCrtContainer; +var init_crc64_nvme_crt_container = __esm({ + "../../node_modules/@aws-sdk/crc64-nvme/dist-es/crc64-nvme-crt-container.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + crc64NvmeCrtContainer = { + CrtCrc64Nvme: null + }; + } +}); + +// ../../node_modules/@aws-sdk/crc64-nvme/dist-es/index.js +var init_dist_es25 = __esm({ + "../../node_modules/@aws-sdk/crc64-nvme/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Crc64Nvme(); + init_crc64_nvme_crt_container(); + } +}); + +// ../../node_modules/@aws-crypto/crc32/build/module/aws_crc32.js +var AwsCrc32; +var init_aws_crc32 = __esm({ + "../../node_modules/@aws-crypto/crc32/build/module/aws_crc32.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tslib_es6(); + init_module(); + init_module3(); + AwsCrc32 = /** @class */ + function() { + function AwsCrc322() { + this.crc32 = new Crc32(); + } + __name(AwsCrc322, "AwsCrc32"); + AwsCrc322.prototype.update = function(toHash) { + if (isEmptyData(toHash)) + return; + this.crc32.update(convertToBuffer(toHash)); + }; + AwsCrc322.prototype.digest = function() { + return __awaiter(this, void 0, void 0, function() { + return __generator(this, function(_a124) { + return [2, numToUint8(this.crc32.digest())]; + }); + }); + }; + AwsCrc322.prototype.reset = function() { + this.crc32 = new Crc32(); + }; + return AwsCrc322; + }(); + } +}); + +// ../../node_modules/@aws-crypto/crc32/build/module/index.js +var Crc32, a_lookUpTable, lookupTable2; +var init_module3 = __esm({ + "../../node_modules/@aws-crypto/crc32/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tslib_es6(); + init_module(); + init_aws_crc32(); + Crc32 = /** @class */ + function() { + function Crc322() { + this.checksum = 4294967295; + } + __name(Crc322, "Crc32"); + Crc322.prototype.update = function(data) { + var e_1, _a124; + try { + for (var data_1 = __values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { + var byte = data_1_1.value; + this.checksum = this.checksum >>> 8 ^ lookupTable2[(this.checksum ^ byte) & 255]; + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (data_1_1 && !data_1_1.done && (_a124 = data_1.return)) + _a124.call(data_1); + } finally { + if (e_1) + throw e_1.error; + } + } + return this; + }; + Crc322.prototype.digest = function() { + return (this.checksum ^ 4294967295) >>> 0; + }; + return Crc322; + }(); + a_lookUpTable = [ + 0, + 1996959894, + 3993919788, + 2567524794, + 124634137, + 1886057615, + 3915621685, + 2657392035, + 249268274, + 2044508324, + 3772115230, + 2547177864, + 162941995, + 2125561021, + 3887607047, + 2428444049, + 498536548, + 1789927666, + 4089016648, + 2227061214, + 450548861, + 1843258603, + 4107580753, + 2211677639, + 325883990, + 1684777152, + 4251122042, + 2321926636, + 335633487, + 1661365465, + 4195302755, + 2366115317, + 997073096, + 1281953886, + 3579855332, + 2724688242, + 1006888145, + 1258607687, + 3524101629, + 2768942443, + 901097722, + 1119000684, + 3686517206, + 2898065728, + 853044451, + 1172266101, + 3705015759, + 2882616665, + 651767980, + 1373503546, + 3369554304, + 3218104598, + 565507253, + 1454621731, + 3485111705, + 3099436303, + 671266974, + 1594198024, + 3322730930, + 2970347812, + 795835527, + 1483230225, + 3244367275, + 3060149565, + 1994146192, + 31158534, + 2563907772, + 4023717930, + 1907459465, + 112637215, + 2680153253, + 3904427059, + 2013776290, + 251722036, + 2517215374, + 3775830040, + 2137656763, + 141376813, + 2439277719, + 3865271297, + 1802195444, + 476864866, + 2238001368, + 4066508878, + 1812370925, + 453092731, + 2181625025, + 4111451223, + 1706088902, + 314042704, + 2344532202, + 4240017532, + 1658658271, + 366619977, + 2362670323, + 4224994405, + 1303535960, + 984961486, + 2747007092, + 3569037538, + 1256170817, + 1037604311, + 2765210733, + 3554079995, + 1131014506, + 879679996, + 2909243462, + 3663771856, + 1141124467, + 855842277, + 2852801631, + 3708648649, + 1342533948, + 654459306, + 3188396048, + 3373015174, + 1466479909, + 544179635, + 3110523913, + 3462522015, + 1591671054, + 702138776, + 2966460450, + 3352799412, + 1504918807, + 783551873, + 3082640443, + 3233442989, + 3988292384, + 2596254646, + 62317068, + 1957810842, + 3939845945, + 2647816111, + 81470997, + 1943803523, + 3814918930, + 2489596804, + 225274430, + 2053790376, + 3826175755, + 2466906013, + 167816743, + 2097651377, + 4027552580, + 2265490386, + 503444072, + 1762050814, + 4150417245, + 2154129355, + 426522225, + 1852507879, + 4275313526, + 2312317920, + 282753626, + 1742555852, + 4189708143, + 2394877945, + 397917763, + 1622183637, + 3604390888, + 2714866558, + 953729732, + 1340076626, + 3518719985, + 2797360999, + 1068828381, + 1219638859, + 3624741850, + 2936675148, + 906185462, + 1090812512, + 3747672003, + 2825379669, + 829329135, + 1181335161, + 3412177804, + 3160834842, + 628085408, + 1382605366, + 3423369109, + 3138078467, + 570562233, + 1426400815, + 3317316542, + 2998733608, + 733239954, + 1555261956, + 3268935591, + 3050360625, + 752459403, + 1541320221, + 2607071920, + 3965973030, + 1969922972, + 40735498, + 2617837225, + 3943577151, + 1913087877, + 83908371, + 2512341634, + 3803740692, + 2075208622, + 213261112, + 2463272603, + 3855990285, + 2094854071, + 198958881, + 2262029012, + 4057260610, + 1759359992, + 534414190, + 2176718541, + 4139329115, + 1873836001, + 414664567, + 2282248934, + 4279200368, + 1711684554, + 285281116, + 2405801727, + 4167216745, + 1634467795, + 376229701, + 2685067896, + 3608007406, + 1308918612, + 956543938, + 2808555105, + 3495958263, + 1231636301, + 1047427035, + 2932959818, + 3654703836, + 1088359270, + 936918e3, + 2847714899, + 3736837829, + 1202900863, + 817233897, + 3183342108, + 3401237130, + 1404277552, + 615818150, + 3134207493, + 3453421203, + 1423857449, + 601450431, + 3009837614, + 3294710456, + 1567103746, + 711928724, + 3020668471, + 3272380065, + 1510334235, + 755167117 + ]; + lookupTable2 = uint32ArrayFrom(a_lookUpTable); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getCrc32ChecksumAlgorithmFunction.browser.js +var getCrc32ChecksumAlgorithmFunction; +var init_getCrc32ChecksumAlgorithmFunction_browser = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getCrc32ChecksumAlgorithmFunction.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_module3(); + getCrc32ChecksumAlgorithmFunction = /* @__PURE__ */ __name(() => AwsCrc32, "getCrc32ChecksumAlgorithmFunction"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/types.js +var CLIENT_SUPPORTED_ALGORITHMS, PRIORITY_ORDER_ALGORITHMS; +var init_types2 = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants3(); + CLIENT_SUPPORTED_ALGORITHMS = [ + ChecksumAlgorithm.CRC32, + ChecksumAlgorithm.CRC32C, + ChecksumAlgorithm.CRC64NVME, + ChecksumAlgorithm.SHA1, + ChecksumAlgorithm.SHA256 + ]; + PRIORITY_ORDER_ALGORITHMS = [ + ChecksumAlgorithm.SHA256, + ChecksumAlgorithm.SHA1, + ChecksumAlgorithm.CRC32, + ChecksumAlgorithm.CRC32C, + ChecksumAlgorithm.CRC64NVME + ]; + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/selectChecksumAlgorithmFunction.js +var selectChecksumAlgorithmFunction; +var init_selectChecksumAlgorithmFunction = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/selectChecksumAlgorithmFunction.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_module2(); + init_dist_es25(); + init_constants3(); + init_getCrc32ChecksumAlgorithmFunction_browser(); + init_types2(); + selectChecksumAlgorithmFunction = /* @__PURE__ */ __name((checksumAlgorithm, config3) => { + const { checksumAlgorithms = {} } = config3; + switch (checksumAlgorithm) { + case ChecksumAlgorithm.MD5: + return checksumAlgorithms?.MD5 ?? config3.md5; + case ChecksumAlgorithm.CRC32: + return checksumAlgorithms?.CRC32 ?? getCrc32ChecksumAlgorithmFunction(); + case ChecksumAlgorithm.CRC32C: + return checksumAlgorithms?.CRC32C ?? AwsCrc32c; + case ChecksumAlgorithm.CRC64NVME: + if (typeof crc64NvmeCrtContainer.CrtCrc64Nvme !== "function") { + return checksumAlgorithms?.CRC64NVME ?? Crc64Nvme; + } + return checksumAlgorithms?.CRC64NVME ?? crc64NvmeCrtContainer.CrtCrc64Nvme; + case ChecksumAlgorithm.SHA1: + return checksumAlgorithms?.SHA1 ?? config3.sha1; + case ChecksumAlgorithm.SHA256: + return checksumAlgorithms?.SHA256 ?? config3.sha256; + default: + if (checksumAlgorithms?.[checksumAlgorithm]) { + return checksumAlgorithms[checksumAlgorithm]; + } + throw new Error(`The checksum algorithm "${checksumAlgorithm}" is not supported by the client. Select one of ${CLIENT_SUPPORTED_ALGORITHMS}, or provide an implementation to the client constructor checksums field.`); + } + }, "selectChecksumAlgorithmFunction"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/stringHasher.js +var stringHasher; +var init_stringHasher = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/stringHasher.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es5(); + stringHasher = /* @__PURE__ */ __name((checksumAlgorithmFn, body) => { + const hash4 = new checksumAlgorithmFn(); + hash4.update(toUint8Array(body || "")); + return hash4.digest(); + }, "stringHasher"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsMiddleware.js +var flexibleChecksumsMiddlewareOptions, flexibleChecksumsMiddleware; +var init_flexibleChecksumsMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_dist_es2(); + init_dist_es11(); + init_constants3(); + init_getChecksumAlgorithmForRequest(); + init_getChecksumLocationName(); + init_hasHeader(); + init_hasHeaderWithPrefix(); + init_isStreaming(); + init_selectChecksumAlgorithmFunction(); + init_stringHasher(); + flexibleChecksumsMiddlewareOptions = { + name: "flexibleChecksumsMiddleware", + step: "build", + tags: ["BODY_CHECKSUM"], + override: true + }; + flexibleChecksumsMiddleware = /* @__PURE__ */ __name((config3, middlewareConfig) => (next, context2) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + if (hasHeaderWithPrefix("x-amz-checksum-", args.request.headers)) { + return next(args); + } + const { request, input } = args; + const { body: requestBody, headers } = request; + const { base64Encoder, streamHasher } = config3; + const { requestChecksumRequired, requestAlgorithmMember } = middlewareConfig; + const requestChecksumCalculation = await config3.requestChecksumCalculation(); + const requestAlgorithmMemberName = requestAlgorithmMember?.name; + const requestAlgorithmMemberHttpHeader = requestAlgorithmMember?.httpHeader; + if (requestAlgorithmMemberName && !input[requestAlgorithmMemberName]) { + if (requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired) { + input[requestAlgorithmMemberName] = DEFAULT_CHECKSUM_ALGORITHM; + if (requestAlgorithmMemberHttpHeader) { + headers[requestAlgorithmMemberHttpHeader] = DEFAULT_CHECKSUM_ALGORITHM; + } + } + } + const checksumAlgorithm = getChecksumAlgorithmForRequest(input, { + requestChecksumRequired, + requestAlgorithmMember: requestAlgorithmMember?.name, + requestChecksumCalculation + }); + let updatedBody = requestBody; + let updatedHeaders = headers; + if (checksumAlgorithm) { + switch (checksumAlgorithm) { + case ChecksumAlgorithm.CRC32: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_CRC32", "U"); + break; + case ChecksumAlgorithm.CRC32C: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_CRC32C", "V"); + break; + case ChecksumAlgorithm.CRC64NVME: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_CRC64", "W"); + break; + case ChecksumAlgorithm.SHA1: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_SHA1", "X"); + break; + case ChecksumAlgorithm.SHA256: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_SHA256", "Y"); + break; + } + const checksumLocationName = getChecksumLocationName(checksumAlgorithm); + const checksumAlgorithmFn = selectChecksumAlgorithmFunction(checksumAlgorithm, config3); + if (isStreaming(requestBody)) { + const { getAwsChunkedEncodingStream: getAwsChunkedEncodingStream2, bodyLengthChecker } = config3; + updatedBody = getAwsChunkedEncodingStream2(typeof config3.requestStreamBufferSize === "number" && config3.requestStreamBufferSize >= 8 * 1024 ? createBufferedReadable(requestBody, config3.requestStreamBufferSize, context2.logger) : requestBody, { + base64Encoder, + bodyLengthChecker, + checksumLocationName, + checksumAlgorithmFn, + streamHasher + }); + updatedHeaders = { + ...headers, + "content-encoding": headers["content-encoding"] ? `${headers["content-encoding"]},aws-chunked` : "aws-chunked", + "transfer-encoding": "chunked", + "x-amz-decoded-content-length": headers["content-length"], + "x-amz-content-sha256": "STREAMING-UNSIGNED-PAYLOAD-TRAILER", + "x-amz-trailer": checksumLocationName + }; + delete updatedHeaders["content-length"]; + } else if (!hasHeader2(checksumLocationName, headers)) { + const rawChecksum = await stringHasher(checksumAlgorithmFn, requestBody); + updatedHeaders = { + ...headers, + [checksumLocationName]: base64Encoder(rawChecksum) + }; + } + } + try { + const result = await next({ + ...args, + request: { + ...request, + headers: updatedHeaders, + body: updatedBody + } + }); + return result; + } catch (e2) { + if (e2 instanceof Error && e2.name === "InvalidChunkSizeError") { + try { + if (!e2.message.endsWith(".")) { + e2.message += "."; + } + e2.message += " Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."; + } catch (ignored) { + } + } + throw e2; + } + }, "flexibleChecksumsMiddleware"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsInputMiddleware.js +var flexibleChecksumsInputMiddlewareOptions, flexibleChecksumsInputMiddleware; +var init_flexibleChecksumsInputMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsInputMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_constants3(); + flexibleChecksumsInputMiddlewareOptions = { + name: "flexibleChecksumsInputMiddleware", + toMiddleware: "serializerMiddleware", + relation: "before", + tags: ["BODY_CHECKSUM"], + override: true + }; + flexibleChecksumsInputMiddleware = /* @__PURE__ */ __name((config3, middlewareConfig) => (next, context2) => async (args) => { + const input = args.input; + const { requestValidationModeMember } = middlewareConfig; + const requestChecksumCalculation = await config3.requestChecksumCalculation(); + const responseChecksumValidation = await config3.responseChecksumValidation(); + switch (requestChecksumCalculation) { + case RequestChecksumCalculation.WHEN_REQUIRED: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED", "a"); + break; + case RequestChecksumCalculation.WHEN_SUPPORTED: + setFeature(context2, "FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED", "Z"); + break; + } + switch (responseChecksumValidation) { + case ResponseChecksumValidation.WHEN_REQUIRED: + setFeature(context2, "FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED", "c"); + break; + case ResponseChecksumValidation.WHEN_SUPPORTED: + setFeature(context2, "FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED", "b"); + break; + } + if (requestValidationModeMember && !input[requestValidationModeMember]) { + if (responseChecksumValidation === ResponseChecksumValidation.WHEN_SUPPORTED) { + input[requestValidationModeMember] = "ENABLED"; + } + } + return next(args); + }, "flexibleChecksumsInputMiddleware"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmListForResponse.js +var getChecksumAlgorithmListForResponse; +var init_getChecksumAlgorithmListForResponse = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmListForResponse.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types2(); + getChecksumAlgorithmListForResponse = /* @__PURE__ */ __name((responseAlgorithms = []) => { + const validChecksumAlgorithms = []; + for (const algorithm of PRIORITY_ORDER_ALGORITHMS) { + if (!responseAlgorithms.includes(algorithm) || !CLIENT_SUPPORTED_ALGORITHMS.includes(algorithm)) { + continue; + } + validChecksumAlgorithms.push(algorithm); + } + return validChecksumAlgorithms; + }, "getChecksumAlgorithmListForResponse"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isChecksumWithPartNumber.js +var isChecksumWithPartNumber; +var init_isChecksumWithPartNumber = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isChecksumWithPartNumber.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isChecksumWithPartNumber = /* @__PURE__ */ __name((checksum) => { + const lastHyphenIndex = checksum.lastIndexOf("-"); + if (lastHyphenIndex !== -1) { + const numberPart = checksum.slice(lastHyphenIndex + 1); + if (!numberPart.startsWith("0")) { + const number4 = parseInt(numberPart, 10); + if (!isNaN(number4) && number4 >= 1 && number4 <= 1e4) { + return true; + } + } + } + return false; + }, "isChecksumWithPartNumber"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksum.js +var getChecksum; +var init_getChecksum = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksum.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_stringHasher(); + getChecksum = /* @__PURE__ */ __name(async (body, { checksumAlgorithmFn, base64Encoder }) => base64Encoder(await stringHasher(checksumAlgorithmFn, body)), "getChecksum"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/validateChecksumFromResponse.js +var validateChecksumFromResponse; +var init_validateChecksumFromResponse = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/validateChecksumFromResponse.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es11(); + init_constants3(); + init_getChecksum(); + init_getChecksumAlgorithmListForResponse(); + init_getChecksumLocationName(); + init_isStreaming(); + init_selectChecksumAlgorithmFunction(); + validateChecksumFromResponse = /* @__PURE__ */ __name(async (response, { config: config3, responseAlgorithms, logger: logger3 }) => { + const checksumAlgorithms = getChecksumAlgorithmListForResponse(responseAlgorithms); + const { body: responseBody, headers: responseHeaders } = response; + for (const algorithm of checksumAlgorithms) { + const responseHeader = getChecksumLocationName(algorithm); + const checksumFromResponse = responseHeaders[responseHeader]; + if (checksumFromResponse) { + let checksumAlgorithmFn; + try { + checksumAlgorithmFn = selectChecksumAlgorithmFunction(algorithm, config3); + } catch (error50) { + if (algorithm === ChecksumAlgorithm.CRC64NVME) { + logger3?.warn(`Skipping ${ChecksumAlgorithm.CRC64NVME} checksum validation: ${error50.message}`); + continue; + } + throw error50; + } + const { base64Encoder } = config3; + if (isStreaming(responseBody)) { + response.body = createChecksumStream({ + expectedChecksum: checksumFromResponse, + checksumSourceLocation: responseHeader, + checksum: new checksumAlgorithmFn(), + source: responseBody, + base64Encoder + }); + return; + } + const checksum = await getChecksum(responseBody, { checksumAlgorithmFn, base64Encoder }); + if (checksum === checksumFromResponse) { + break; + } + throw new Error(`Checksum mismatch: expected "${checksum}" but received "${checksumFromResponse}" in response header "${responseHeader}".`); + } + } + }, "validateChecksumFromResponse"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsResponseMiddleware.js +var flexibleChecksumsResponseMiddlewareOptions, flexibleChecksumsResponseMiddleware; +var init_flexibleChecksumsResponseMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsResponseMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_getChecksumAlgorithmListForResponse(); + init_getChecksumLocationName(); + init_isChecksumWithPartNumber(); + init_validateChecksumFromResponse(); + flexibleChecksumsResponseMiddlewareOptions = { + name: "flexibleChecksumsResponseMiddleware", + toMiddleware: "deserializerMiddleware", + relation: "after", + tags: ["BODY_CHECKSUM"], + override: true + }; + flexibleChecksumsResponseMiddleware = /* @__PURE__ */ __name((config3, middlewareConfig) => (next, context2) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + const input = args.input; + const result = await next(args); + const response = result.response; + const { requestValidationModeMember, responseAlgorithms } = middlewareConfig; + if (requestValidationModeMember && input[requestValidationModeMember] === "ENABLED") { + const { clientName, commandName } = context2; + const isS3WholeObjectMultipartGetResponseChecksum = clientName === "S3Client" && commandName === "GetObjectCommand" && getChecksumAlgorithmListForResponse(responseAlgorithms).every((algorithm) => { + const responseHeader = getChecksumLocationName(algorithm); + const checksumFromResponse = response.headers[responseHeader]; + return !checksumFromResponse || isChecksumWithPartNumber(checksumFromResponse); + }); + if (isS3WholeObjectMultipartGetResponseChecksum) { + return result; + } + await validateChecksumFromResponse(response, { + config: config3, + responseAlgorithms, + logger: context2.logger + }); + } + return result; + }, "flexibleChecksumsResponseMiddleware"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getFlexibleChecksumsPlugin.js +var getFlexibleChecksumsPlugin; +var init_getFlexibleChecksumsPlugin = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getFlexibleChecksumsPlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_flexibleChecksumsInputMiddleware(); + init_flexibleChecksumsMiddleware(); + init_flexibleChecksumsResponseMiddleware(); + getFlexibleChecksumsPlugin = /* @__PURE__ */ __name((config3, middlewareConfig) => ({ + applyToStack: (clientStack) => { + clientStack.add(flexibleChecksumsMiddleware(config3, middlewareConfig), flexibleChecksumsMiddlewareOptions); + clientStack.addRelativeTo(flexibleChecksumsInputMiddleware(config3, middlewareConfig), flexibleChecksumsInputMiddlewareOptions); + clientStack.addRelativeTo(flexibleChecksumsResponseMiddleware(config3, middlewareConfig), flexibleChecksumsResponseMiddlewareOptions); + } + }), "getFlexibleChecksumsPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/resolveFlexibleChecksumsConfig.js +var resolveFlexibleChecksumsConfig; +var init_resolveFlexibleChecksumsConfig = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/resolveFlexibleChecksumsConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es4(); + init_constants3(); + resolveFlexibleChecksumsConfig = /* @__PURE__ */ __name((input) => { + const { requestChecksumCalculation, responseChecksumValidation, requestStreamBufferSize } = input; + return Object.assign(input, { + requestChecksumCalculation: normalizeProvider(requestChecksumCalculation ?? DEFAULT_REQUEST_CHECKSUM_CALCULATION), + responseChecksumValidation: normalizeProvider(responseChecksumValidation ?? DEFAULT_RESPONSE_CHECKSUM_VALIDATION), + requestStreamBufferSize: Number(requestStreamBufferSize ?? 0), + checksumAlgorithms: input.checksumAlgorithms ?? {} + }); + }, "resolveFlexibleChecksumsConfig"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/index.js +var init_dist_es26 = __esm({ + "../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS(); + init_NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS(); + init_constants3(); + init_flexibleChecksumsMiddleware(); + init_getFlexibleChecksumsPlugin(); + init_resolveFlexibleChecksumsConfig(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-host-header/dist-es/index.js +function resolveHostHeaderConfig(input) { + return input; +} +var hostHeaderMiddleware, hostHeaderMiddlewareOptions, getHostHeaderPlugin; +var init_dist_es27 = __esm({ + "../../node_modules/@aws-sdk/middleware-host-header/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + __name(resolveHostHeaderConfig, "resolveHostHeaderConfig"); + hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { + if (!HttpRequest.isInstance(args.request)) + return next(args); + const { request } = args; + const { handlerProtocol = "" } = options.requestHandler.metadata || {}; + if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { + delete request.headers["host"]; + request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : ""); + } else if (!request.headers["host"]) { + let host = request.hostname; + if (request.port != null) + host += `:${request.port}`; + request.headers["host"] = host; + } + return next(args); + }, "hostHeaderMiddleware"); + hostHeaderMiddlewareOptions = { + name: "hostHeaderMiddleware", + step: "build", + priority: "low", + tags: ["HOST"], + override: true + }; + getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); + } + }), "getHostHeaderPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js +var loggerMiddleware, loggerMiddlewareOptions, getLoggerPlugin; +var init_loggerMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + loggerMiddleware = /* @__PURE__ */ __name(() => (next, context2) => async (args) => { + try { + const response = await next(args); + const { clientName, commandName, logger: logger3, dynamoDbDocumentClientOptions = {} } = context2; + const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context2.inputFilterSensitiveLog; + const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context2.outputFilterSensitiveLog; + const { $metadata, ...outputWithoutMetadata } = response.output; + logger3?.info?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + output: outputFilterSensitiveLog(outputWithoutMetadata), + metadata: $metadata + }); + return response; + } catch (error50) { + const { clientName, commandName, logger: logger3, dynamoDbDocumentClientOptions = {} } = context2; + const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context2.inputFilterSensitiveLog; + logger3?.error?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + error: error50, + metadata: error50.$metadata + }); + throw error50; + } + }, "loggerMiddleware"); + loggerMiddlewareOptions = { + name: "loggerMiddleware", + tags: ["LOGGER"], + step: "initialize", + override: true + }; + getLoggerPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); + } + }), "getLoggerPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-logger/dist-es/index.js +var init_dist_es28 = __esm({ + "../../node_modules/@aws-sdk/middleware-logger/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_loggerMiddleware(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/configuration.js +var recursionDetectionMiddlewareOptions; +var init_configuration = __esm({ + "../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/configuration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + recursionDetectionMiddlewareOptions = { + step: "build", + tags: ["RECURSION_DETECTION"], + name: "recursionDetectionMiddleware", + override: true, + priority: "low" + }; + } +}); + +// ../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/recursionDetectionMiddleware.browser.js +var recursionDetectionMiddleware; +var init_recursionDetectionMiddleware_browser = __esm({ + "../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/recursionDetectionMiddleware.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + recursionDetectionMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => next(args), "recursionDetectionMiddleware"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/getRecursionDetectionPlugin.js +var getRecursionDetectionPlugin; +var init_getRecursionDetectionPlugin = __esm({ + "../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/getRecursionDetectionPlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_configuration(); + init_recursionDetectionMiddleware_browser(); + getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions); + } + }), "getRecursionDetectionPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/index.js +var init_dist_es29 = __esm({ + "../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getRecursionDetectionPlugin(); + init_recursionDetectionMiddleware_browser(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/check-content-length-header.js +function checkContentLengthHeader() { + return (next, context2) => async (args) => { + const { request } = args; + if (HttpRequest.isInstance(request)) { + if (!(CONTENT_LENGTH_HEADER in request.headers) && !(DECODED_CONTENT_LENGTH_HEADER in request.headers)) { + const message2 = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`; + if (typeof context2?.logger?.warn === "function" && !(context2.logger instanceof NoOpLogger)) { + context2.logger.warn(message2); + } else { + console.warn(message2); + } + } + } + return next({ ...args }); + }; +} +var CONTENT_LENGTH_HEADER, DECODED_CONTENT_LENGTH_HEADER, checkContentLengthHeaderMiddlewareOptions, getCheckContentLengthHeaderPlugin; +var init_check_content_length_header = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/check-content-length-header.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es21(); + CONTENT_LENGTH_HEADER = "content-length"; + DECODED_CONTENT_LENGTH_HEADER = "x-amz-decoded-content-length"; + __name(checkContentLengthHeader, "checkContentLengthHeader"); + checkContentLengthHeaderMiddlewareOptions = { + step: "finalizeRequest", + tags: ["CHECK_CONTENT_LENGTH_HEADER"], + name: "getCheckContentLengthHeaderPlugin", + override: true + }; + getCheckContentLengthHeaderPlugin = /* @__PURE__ */ __name((unused) => ({ + applyToStack: (clientStack) => { + clientStack.add(checkContentLengthHeader(), checkContentLengthHeaderMiddlewareOptions); + } + }), "getCheckContentLengthHeaderPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-endpoint-middleware.js +var regionRedirectEndpointMiddleware, regionRedirectEndpointMiddlewareOptions; +var init_region_redirect_endpoint_middleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-endpoint-middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + regionRedirectEndpointMiddleware = /* @__PURE__ */ __name((config3) => { + return (next, context2) => async (args) => { + const originalRegion = await config3.region(); + const regionProviderRef = config3.region; + let unlock = /* @__PURE__ */ __name(() => { + }, "unlock"); + if (context2.__s3RegionRedirect) { + Object.defineProperty(config3, "region", { + writable: false, + value: async () => { + return context2.__s3RegionRedirect; + } + }); + unlock = /* @__PURE__ */ __name(() => Object.defineProperty(config3, "region", { + writable: true, + value: regionProviderRef + }), "unlock"); + } + try { + const result = await next(args); + if (context2.__s3RegionRedirect) { + unlock(); + const region = await config3.region(); + if (originalRegion !== region) { + throw new Error("Region was not restored following S3 region redirect."); + } + } + return result; + } catch (e2) { + unlock(); + throw e2; + } + }; + }, "regionRedirectEndpointMiddleware"); + regionRedirectEndpointMiddlewareOptions = { + tags: ["REGION_REDIRECT", "S3"], + name: "regionRedirectEndpointMiddleware", + override: true, + relation: "before", + toMiddleware: "endpointV2Middleware" + }; + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-middleware.js +function regionRedirectMiddleware(clientConfig) { + return (next, context2) => async (args) => { + try { + return await next(args); + } catch (err) { + if (clientConfig.followRegionRedirects) { + const statusCode = err?.$metadata?.httpStatusCode; + const isHeadBucket = context2.commandName === "HeadBucketCommand"; + const bucketRegionHeader = err?.$response?.headers?.["x-amz-bucket-region"]; + if (bucketRegionHeader) { + if (statusCode === 301 || statusCode === 400 && (err?.name === "IllegalLocationConstraintException" || isHeadBucket)) { + try { + const actualRegion = bucketRegionHeader; + context2.logger?.debug(`Redirecting from ${await clientConfig.region()} to ${actualRegion}`); + context2.__s3RegionRedirect = actualRegion; + } catch (e2) { + throw new Error("Region redirect failed: " + e2); + } + return next(args); + } + } + } + throw err; + } + }; +} +var regionRedirectMiddlewareOptions, getRegionRedirectMiddlewarePlugin; +var init_region_redirect_middleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_region_redirect_endpoint_middleware(); + __name(regionRedirectMiddleware, "regionRedirectMiddleware"); + regionRedirectMiddlewareOptions = { + step: "initialize", + tags: ["REGION_REDIRECT", "S3"], + name: "regionRedirectMiddleware", + override: true + }; + getRegionRedirectMiddlewarePlugin = /* @__PURE__ */ __name((clientConfig) => ({ + applyToStack: (clientStack) => { + clientStack.add(regionRedirectMiddleware(clientConfig), regionRedirectMiddlewareOptions); + clientStack.addRelativeTo(regionRedirectEndpointMiddleware(clientConfig), regionRedirectEndpointMiddlewareOptions); + } + }), "getRegionRedirectMiddlewarePlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-expires-middleware.js +var s3ExpiresMiddleware, s3ExpiresMiddlewareOptions, getS3ExpiresMiddlewarePlugin; +var init_s3_expires_middleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-expires-middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es21(); + s3ExpiresMiddleware = /* @__PURE__ */ __name((config3) => { + return (next, context2) => async (args) => { + const result = await next(args); + const { response } = result; + if (HttpResponse.isInstance(response)) { + if (response.headers.expires) { + response.headers.expiresstring = response.headers.expires; + try { + parseRfc7231DateTime(response.headers.expires); + } catch (e2) { + context2.logger?.warn(`AWS SDK Warning for ${context2.clientName}::${context2.commandName} response parsing (${response.headers.expires}): ${e2}`); + delete response.headers.expires; + } + } + } + return result; + }; + }, "s3ExpiresMiddleware"); + s3ExpiresMiddlewareOptions = { + tags: ["S3"], + name: "s3ExpiresMiddleware", + override: true, + relation: "after", + toMiddleware: "deserializerMiddleware" + }; + getS3ExpiresMiddlewarePlugin = /* @__PURE__ */ __name((clientConfig) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(s3ExpiresMiddleware(clientConfig), s3ExpiresMiddlewareOptions); + } + }), "getS3ExpiresMiddlewarePlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCache.js +var _S3ExpressIdentityCache, S3ExpressIdentityCache; +var init_S3ExpressIdentityCache = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCache.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + _S3ExpressIdentityCache = class { + data; + lastPurgeTime = Date.now(); + constructor(data = {}) { + this.data = data; + } + get(key) { + const entry = this.data[key]; + if (!entry) { + return; + } + return entry; + } + set(key, entry) { + this.data[key] = entry; + return entry; + } + delete(key) { + delete this.data[key]; + } + async purgeExpired() { + const now = Date.now(); + if (this.lastPurgeTime + _S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS > now) { + return; + } + for (const key in this.data) { + const entry = this.data[key]; + if (!entry.isRefreshing) { + const credential = await entry.identity; + if (credential.expiration) { + if (credential.expiration.getTime() < now) { + delete this.data[key]; + } + } + } + } + } + }; + S3ExpressIdentityCache = _S3ExpressIdentityCache; + __name(S3ExpressIdentityCache, "S3ExpressIdentityCache"); + __publicField(S3ExpressIdentityCache, "EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS", 3e4); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCacheEntry.js +var S3ExpressIdentityCacheEntry; +var init_S3ExpressIdentityCacheEntry = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCacheEntry.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + S3ExpressIdentityCacheEntry = class { + _identity; + isRefreshing; + accessed; + constructor(_identity, isRefreshing = false, accessed = Date.now()) { + this._identity = _identity; + this.isRefreshing = isRefreshing; + this.accessed = accessed; + } + get identity() { + this.accessed = Date.now(); + return this._identity; + } + }; + __name(S3ExpressIdentityCacheEntry, "S3ExpressIdentityCacheEntry"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityProviderImpl.js +var _S3ExpressIdentityProviderImpl, S3ExpressIdentityProviderImpl; +var init_S3ExpressIdentityProviderImpl = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityProviderImpl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_S3ExpressIdentityCache(); + init_S3ExpressIdentityCacheEntry(); + _S3ExpressIdentityProviderImpl = class { + createSessionFn; + cache; + constructor(createSessionFn, cache3 = new S3ExpressIdentityCache()) { + this.createSessionFn = createSessionFn; + this.cache = cache3; + } + async getS3ExpressIdentity(awsIdentity, identityProperties) { + const key = identityProperties.Bucket; + const { cache: cache3 } = this; + const entry = cache3.get(key); + if (entry) { + return entry.identity.then((identity2) => { + const isExpired = (identity2.expiration?.getTime() ?? 0) < Date.now(); + if (isExpired) { + return cache3.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity; + } + const isExpiringSoon = (identity2.expiration?.getTime() ?? 0) < Date.now() + _S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS; + if (isExpiringSoon && !entry.isRefreshing) { + entry.isRefreshing = true; + this.getIdentity(key).then((id) => { + cache3.set(key, new S3ExpressIdentityCacheEntry(Promise.resolve(id))); + }); + } + return identity2; + }); + } + return cache3.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity; + } + async getIdentity(key) { + await this.cache.purgeExpired().catch((error50) => { + console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n" + error50); + }); + const session = await this.createSessionFn(key); + if (!session.Credentials?.AccessKeyId || !session.Credentials?.SecretAccessKey) { + throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey."); + } + const identity2 = { + accessKeyId: session.Credentials.AccessKeyId, + secretAccessKey: session.Credentials.SecretAccessKey, + sessionToken: session.Credentials.SessionToken, + expiration: session.Credentials.Expiration ? new Date(session.Credentials.Expiration) : void 0 + }; + return identity2; + } + }; + S3ExpressIdentityProviderImpl = _S3ExpressIdentityProviderImpl; + __name(S3ExpressIdentityProviderImpl, "S3ExpressIdentityProviderImpl"); + __publicField(S3ExpressIdentityProviderImpl, "REFRESH_WINDOW_MS", 6e4); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/constants.js +var S3_EXPRESS_BUCKET_TYPE, S3_EXPRESS_BACKEND, S3_EXPRESS_AUTH_SCHEME, SESSION_TOKEN_QUERY_PARAM, SESSION_TOKEN_HEADER; +var init_constants6 = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + S3_EXPRESS_BUCKET_TYPE = "Directory"; + S3_EXPRESS_BACKEND = "S3Express"; + S3_EXPRESS_AUTH_SCHEME = "sigv4-s3express"; + SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token"; + SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/SignatureV4S3Express.js +function getCredentialsWithoutSessionToken(credentials) { + const credentialsWithoutSessionToken = { + accessKeyId: credentials.accessKeyId, + secretAccessKey: credentials.secretAccessKey, + expiration: credentials.expiration + }; + return credentialsWithoutSessionToken; +} +function setSingleOverride(privateAccess, credentialsWithoutSessionToken) { + const id = setTimeout(() => { + throw new Error("SignatureV4S3Express credential override was created but not called."); + }, 10); + const currentCredentialProvider = privateAccess.credentialProvider; + const overrideCredentialsProviderOnce = /* @__PURE__ */ __name(() => { + clearTimeout(id); + privateAccess.credentialProvider = currentCredentialProvider; + return Promise.resolve(credentialsWithoutSessionToken); + }, "overrideCredentialsProviderOnce"); + privateAccess.credentialProvider = overrideCredentialsProviderOnce; +} +var SignatureV4S3Express; +var init_SignatureV4S3Express = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/SignatureV4S3Express.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es18(); + init_constants6(); + SignatureV4S3Express = class extends SignatureV4 { + async signWithCredentials(requestToSign, credentials, options) { + const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); + requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken; + const privateAccess = this; + setSingleOverride(privateAccess, credentialsWithoutSessionToken); + return privateAccess.signRequest(requestToSign, options ?? {}); + } + async presignWithCredentials(requestToSign, credentials, options) { + const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); + delete requestToSign.headers[SESSION_TOKEN_HEADER]; + requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; + requestToSign.query = requestToSign.query ?? {}; + requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; + const privateAccess = this; + setSingleOverride(privateAccess, credentialsWithoutSessionToken); + return this.presign(requestToSign, options); + } + }; + __name(SignatureV4S3Express, "SignatureV4S3Express"); + __name(getCredentialsWithoutSessionToken, "getCredentialsWithoutSessionToken"); + __name(setSingleOverride, "setSingleOverride"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressMiddleware.js +var s3ExpressMiddleware, s3ExpressMiddlewareOptions, getS3ExpressPlugin; +var init_s3ExpressMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_dist_es2(); + init_constants6(); + s3ExpressMiddleware = /* @__PURE__ */ __name((options) => { + return (next, context2) => async (args) => { + if (context2.endpointV2) { + const endpoint = context2.endpointV2; + const isS3ExpressAuth = endpoint.properties?.authSchemes?.[0]?.name === S3_EXPRESS_AUTH_SCHEME; + const isS3ExpressBucket = endpoint.properties?.backend === S3_EXPRESS_BACKEND || endpoint.properties?.bucketType === S3_EXPRESS_BUCKET_TYPE; + if (isS3ExpressBucket) { + setFeature(context2, "S3_EXPRESS_BUCKET", "J"); + context2.isS3ExpressBucket = true; + } + if (isS3ExpressAuth) { + const requestBucket = args.input.Bucket; + if (requestBucket) { + const s3ExpressIdentity = await options.s3ExpressIdentityProvider.getS3ExpressIdentity(await options.credentials(), { + Bucket: requestBucket + }); + context2.s3ExpressIdentity = s3ExpressIdentity; + if (HttpRequest.isInstance(args.request) && s3ExpressIdentity.sessionToken) { + args.request.headers[SESSION_TOKEN_HEADER] = s3ExpressIdentity.sessionToken; + } + } + } + } + return next(args); + }; + }, "s3ExpressMiddleware"); + s3ExpressMiddlewareOptions = { + name: "s3ExpressMiddleware", + step: "build", + tags: ["S3", "S3_EXPRESS"], + override: true + }; + getS3ExpressPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(s3ExpressMiddleware(options), s3ExpressMiddlewareOptions); + } + }), "getS3ExpressPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/signS3Express.js +var signS3Express; +var init_signS3Express = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/signS3Express.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + signS3Express = /* @__PURE__ */ __name(async (s3ExpressIdentity, signingOptions, request, sigV4MultiRegionSigner) => { + const signedRequest = await sigV4MultiRegionSigner.signWithCredentials(request, s3ExpressIdentity, {}); + if (signedRequest.headers["X-Amz-Security-Token"] || signedRequest.headers["x-amz-security-token"]) { + throw new Error("X-Amz-Security-Token must not be set for s3-express requests."); + } + return signedRequest; + }, "signS3Express"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressHttpSigningMiddleware.js +var defaultErrorHandler2, defaultSuccessHandler2, s3ExpressHttpSigningMiddleware, getS3ExpressHttpSigningPlugin; +var init_s3ExpressHttpSigningMiddleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressHttpSigningMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_dist_es2(); + init_dist_es4(); + init_signS3Express(); + defaultErrorHandler2 = /* @__PURE__ */ __name((signingProperties) => (error50) => { + throw error50; + }, "defaultErrorHandler"); + defaultSuccessHandler2 = /* @__PURE__ */ __name((httpResponse, signingProperties) => { + }, "defaultSuccessHandler"); + s3ExpressHttpSigningMiddleware = /* @__PURE__ */ __name((config3) => (next, context2) => async (args) => { + if (!HttpRequest.isInstance(args.request)) { + return next(args); + } + const smithyContext = getSmithyContext(context2); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + } + const { httpAuthOption: { signingProperties = {} }, identity: identity2, signer } = scheme; + let request; + if (context2.s3ExpressIdentity) { + request = await signS3Express(context2.s3ExpressIdentity, signingProperties, args.request, await config3.signer()); + } else { + request = await signer.sign(args.request, identity2, signingProperties); + } + const output = await next({ + ...args, + request + }).catch((signer.errorHandler || defaultErrorHandler2)(signingProperties)); + (signer.successHandler || defaultSuccessHandler2)(output.response, signingProperties); + return output; + }, "s3ExpressHttpSigningMiddleware"); + getS3ExpressHttpSigningPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(s3ExpressHttpSigningMiddleware(config3), httpSigningMiddlewareOptions); + } + }), "getS3ExpressHttpSigningPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/index.js +var init_s3_express = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_S3ExpressIdentityProviderImpl(); + init_SignatureV4S3Express(); + init_s3ExpressMiddleware(); + init_s3ExpressHttpSigningMiddleware(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3Configuration.js +var resolveS3Config; +var init_s3Configuration = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3Configuration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_s3_express(); + resolveS3Config = /* @__PURE__ */ __name((input, { session }) => { + const [s3ClientProvider, CreateSessionCommandCtor] = session; + const { forcePathStyle, useAccelerateEndpoint, disableMultiregionAccessPoints, followRegionRedirects, s3ExpressIdentityProvider, bucketEndpoint, expectContinueHeader } = input; + return Object.assign(input, { + forcePathStyle: forcePathStyle ?? false, + useAccelerateEndpoint: useAccelerateEndpoint ?? false, + disableMultiregionAccessPoints: disableMultiregionAccessPoints ?? false, + followRegionRedirects: followRegionRedirects ?? false, + s3ExpressIdentityProvider: s3ExpressIdentityProvider ?? new S3ExpressIdentityProviderImpl(async (key) => s3ClientProvider().send(new CreateSessionCommandCtor({ + Bucket: key + }))), + bucketEndpoint: bucketEndpoint ?? false, + expectContinueHeader: expectContinueHeader ?? 2097152 + }); + }, "resolveS3Config"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js +var THROW_IF_EMPTY_BODY, MAX_BYTES_TO_INSPECT, throw200ExceptionsMiddleware, collectBody2, throw200ExceptionsMiddlewareOptions, getThrow200ExceptionsPlugin; +var init_throw_200_exceptions = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es11(); + THROW_IF_EMPTY_BODY = { + CopyObjectCommand: true, + UploadPartCopyCommand: true, + CompleteMultipartUploadCommand: true + }; + MAX_BYTES_TO_INSPECT = 3e3; + throw200ExceptionsMiddleware = /* @__PURE__ */ __name((config3) => (next, context2) => async (args) => { + const result = await next(args); + const { response } = result; + if (!HttpResponse.isInstance(response)) { + return result; + } + const { statusCode, body: sourceBody } = response; + if (statusCode < 200 || statusCode >= 300) { + return result; + } + const isSplittableStream = typeof sourceBody?.stream === "function" || typeof sourceBody?.pipe === "function" || typeof sourceBody?.tee === "function"; + if (!isSplittableStream) { + return result; + } + let bodyCopy = sourceBody; + let body = sourceBody; + if (sourceBody && typeof sourceBody === "object" && !(sourceBody instanceof Uint8Array)) { + [bodyCopy, body] = await splitStream(sourceBody); + } + response.body = body; + const bodyBytes = await collectBody2(bodyCopy, { + streamCollector: async (stream) => { + return headStream(stream, MAX_BYTES_TO_INSPECT); + } + }); + if (typeof bodyCopy?.destroy === "function") { + bodyCopy.destroy(); + } + const bodyStringTail = config3.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16)); + if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context2.commandName]) { + const err = new Error("S3 aborted request"); + err.name = "InternalError"; + throw err; + } + if (bodyStringTail && bodyStringTail.endsWith("")) { + response.statusCode = 400; + } + return result; + }, "throw200ExceptionsMiddleware"); + collectBody2 = /* @__PURE__ */ __name((streamBody = new Uint8Array(), context2) => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context2.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); + }, "collectBody"); + throw200ExceptionsMiddlewareOptions = { + relation: "after", + toMiddleware: "deserializerMiddleware", + tags: ["THROW_200_EXCEPTIONS", "S3"], + name: "throw200ExceptionsMiddleware", + override: true + }; + getThrow200ExceptionsPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(throw200ExceptionsMiddleware(config3), throw200ExceptionsMiddlewareOptions); + } + }), "getThrow200ExceptionsPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/util-arn-parser/dist-es/index.js +var validate; +var init_dist_es30 = __esm({ + "../../node_modules/@aws-sdk/util-arn-parser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + validate = /* @__PURE__ */ __name((str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6, "validate"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/bucket-endpoint-middleware.js +function bucketEndpointMiddleware(options) { + return (next, context2) => async (args) => { + if (options.bucketEndpoint) { + const endpoint = context2.endpointV2; + if (endpoint) { + const bucket = args.input.Bucket; + if (typeof bucket === "string") { + try { + const bucketEndpointUrl = new URL(bucket); + context2.endpointV2 = { + ...endpoint, + url: bucketEndpointUrl + }; + } catch (e2) { + const warning = `@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${bucket} could not be parsed as URL.`; + if (context2.logger?.constructor?.name === "NoOpLogger") { + console.warn(warning); + } else { + context2.logger?.warn?.(warning); + } + throw e2; + } + } + } + } + return next(args); + }; +} +var bucketEndpointMiddlewareOptions; +var init_bucket_endpoint_middleware = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/bucket-endpoint-middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(bucketEndpointMiddleware, "bucketEndpointMiddleware"); + bucketEndpointMiddlewareOptions = { + name: "bucketEndpointMiddleware", + override: true, + relation: "after", + toMiddleware: "endpointV2Middleware" + }; + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/validate-bucket-name.js +function validateBucketNameMiddleware({ bucketEndpoint }) { + return (next) => async (args) => { + const { input: { Bucket } } = args; + if (!bucketEndpoint && typeof Bucket === "string" && !validate(Bucket) && Bucket.indexOf("/") >= 0) { + const err = new Error(`Bucket name shouldn't contain '/', received '${Bucket}'`); + err.name = "InvalidBucketName"; + throw err; + } + return next({ ...args }); + }; +} +var validateBucketNameMiddlewareOptions, getValidateBucketNamePlugin; +var init_validate_bucket_name = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/validate-bucket-name.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es30(); + init_bucket_endpoint_middleware(); + __name(validateBucketNameMiddleware, "validateBucketNameMiddleware"); + validateBucketNameMiddlewareOptions = { + step: "initialize", + tags: ["VALIDATE_BUCKET_NAME"], + name: "validateBucketNameMiddleware", + override: true + }; + getValidateBucketNamePlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(validateBucketNameMiddleware(options), validateBucketNameMiddlewareOptions); + clientStack.addRelativeTo(bucketEndpointMiddleware(options), bucketEndpointMiddlewareOptions); + } + }), "getValidateBucketNamePlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/index.js +var init_dist_es31 = __esm({ + "../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_check_content_length_header(); + init_region_redirect_endpoint_middleware(); + init_region_redirect_middleware(); + init_s3_expires_middleware(); + init_s3_express(); + init_s3Configuration(); + init_throw_200_exceptions(); + init_validate_bucket_name(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js +function isValidUserAgentAppId(appId) { + if (appId === void 0) { + return true; + } + return typeof appId === "string" && appId.length <= 50; +} +function resolveUserAgentConfig(input) { + const normalizedAppIdProvider = normalizeProvider2(input.userAgentAppId ?? DEFAULT_UA_APP_ID); + const { customUserAgent } = input; + return Object.assign(input, { + customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent, + userAgentAppId: async () => { + const appId = await normalizedAppIdProvider(); + if (!isValidUserAgentAppId(appId)) { + const logger3 = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger; + if (typeof appId !== "string") { + logger3?.warn("userAgentAppId must be a string or undefined."); + } else if (appId.length > 50) { + logger3?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters."); + } + } + return appId; + } + }); +} +var DEFAULT_UA_APP_ID; +var init_configurations = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + DEFAULT_UA_APP_ID = void 0; + __name(isValidUserAgentAppId, "isValidUserAgentAppId"); + __name(resolveUserAgentConfig, "resolveUserAgentConfig"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/cache/EndpointCache.js +var EndpointCache; +var init_EndpointCache = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/cache/EndpointCache.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + EndpointCache = class { + capacity; + data = /* @__PURE__ */ new Map(); + parameters = []; + constructor({ size, params }) { + this.capacity = size ?? 50; + if (params) { + this.parameters = params; + } + } + get(endpointParams, resolver) { + const key = this.hash(endpointParams); + if (key === false) { + return resolver(); + } + if (!this.data.has(key)) { + if (this.data.size > this.capacity + 10) { + const keys = this.data.keys(); + let i2 = 0; + while (true) { + const { value, done } = keys.next(); + this.data.delete(value); + if (done || ++i2 > 10) { + break; + } + } + } + this.data.set(key, resolver()); + } + return this.data.get(key); + } + size() { + return this.data.size; + } + hash(endpointParams) { + let buffer = ""; + const { parameters } = this; + if (parameters.length === 0) { + return false; + } + for (const param of parameters) { + const val = String(endpointParams[param] ?? ""); + if (val.includes("|;")) { + return false; + } + buffer += val + "|;"; + } + return buffer; + } + }; + __name(EndpointCache, "EndpointCache"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/isIpAddress.js +var IP_V4_REGEX, isIpAddress; +var init_isIpAddress = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/isIpAddress.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`); + isIpAddress = /* @__PURE__ */ __name((value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"), "isIpAddress"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/isValidHostLabel.js +var VALID_HOST_LABEL_REGEX, isValidHostLabel; +var init_isValidHostLabel = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/isValidHostLabel.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); + isValidHostLabel = /* @__PURE__ */ __name((value, allowSubDomains = false) => { + if (!allowSubDomains) { + return VALID_HOST_LABEL_REGEX.test(value); + } + const labels = value.split("."); + for (const label of labels) { + if (!isValidHostLabel(label)) { + return false; + } + } + return true; + }, "isValidHostLabel"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/customEndpointFunctions.js +var customEndpointFunctions; +var init_customEndpointFunctions = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/customEndpointFunctions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + customEndpointFunctions = {}; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/debug/debugId.js +var debugId; +var init_debugId = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/debug/debugId.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + debugId = "endpoints"; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/debug/toDebugString.js +function toDebugString(input) { + if (typeof input !== "object" || input == null) { + return input; + } + if ("ref" in input) { + return `$${toDebugString(input.ref)}`; + } + if ("fn" in input) { + return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; + } + return JSON.stringify(input, null, 2); +} +var init_toDebugString = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/debug/toDebugString.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(toDebugString, "toDebugString"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/debug/index.js +var init_debug = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/debug/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_debugId(); + init_toDebugString(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointError.js +var EndpointError; +var init_EndpointError = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointError.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + EndpointError = class extends Error { + constructor(message2) { + super(message2); + this.name = "EndpointError"; + } + }; + __name(EndpointError, "EndpointError"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointFunctions.js +var init_EndpointFunctions = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointFunctions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointRuleObject.js +var init_EndpointRuleObject2 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/ErrorRuleObject.js +var init_ErrorRuleObject2 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/ErrorRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/RuleSetObject.js +var init_RuleSetObject2 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/RuleSetObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/TreeRuleObject.js +var init_TreeRuleObject2 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/TreeRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/shared.js +var init_shared2 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/shared.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/types/index.js +var init_types3 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/types/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EndpointError(); + init_EndpointFunctions(); + init_EndpointRuleObject2(); + init_ErrorRuleObject2(); + init_RuleSetObject2(); + init_TreeRuleObject2(); + init_shared2(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/booleanEquals.js +var booleanEquals; +var init_booleanEquals = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/booleanEquals.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + booleanEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "booleanEquals"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js +var getAttrPathList; +var init_getAttrPathList = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + getAttrPathList = /* @__PURE__ */ __name((path) => { + const parts = path.split("."); + const pathList = []; + for (const part of parts) { + const squareBracketIndex = part.indexOf("["); + if (squareBracketIndex !== -1) { + if (part.indexOf("]") !== part.length - 1) { + throw new EndpointError(`Path: '${path}' does not end with ']'`); + } + const arrayIndex = part.slice(squareBracketIndex + 1, -1); + if (Number.isNaN(parseInt(arrayIndex))) { + throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`); + } + if (squareBracketIndex !== 0) { + pathList.push(part.slice(0, squareBracketIndex)); + } + pathList.push(arrayIndex); + } else { + pathList.push(part); + } + } + return pathList; + }, "getAttrPathList"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js +var getAttr; +var init_getAttr = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_getAttrPathList(); + getAttr = /* @__PURE__ */ __name((value, path) => getAttrPathList(path).reduce((acc, index) => { + if (typeof acc !== "object") { + throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`); + } else if (Array.isArray(acc)) { + return acc[parseInt(index)]; + } + return acc[index]; + }, value), "getAttr"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/isSet.js +var isSet; +var init_isSet = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/isSet.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isSet = /* @__PURE__ */ __name((value) => value != null, "isSet"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/not.js +var not2; +var init_not = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/not.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + not2 = /* @__PURE__ */ __name((value) => !value, "not"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/parseURL.js +var DEFAULT_PORTS, parseURL; +var init_parseURL = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/parseURL.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es(); + init_isIpAddress(); + DEFAULT_PORTS = { + [EndpointURLScheme.HTTP]: 80, + [EndpointURLScheme.HTTPS]: 443 + }; + parseURL = /* @__PURE__ */ __name((value) => { + const whatwgURL = (() => { + try { + if (value instanceof URL) { + return value; + } + if (typeof value === "object" && "hostname" in value) { + const { hostname: hostname4, port, protocol: protocol2 = "", path = "", query = {} } = value; + const url2 = new URL(`${protocol2}//${hostname4}${port ? `:${port}` : ""}${path}`); + url2.search = Object.entries(query).map(([k2, v3]) => `${k2}=${v3}`).join("&"); + return url2; + } + return new URL(value); + } catch (error50) { + return null; + } + })(); + if (!whatwgURL) { + console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); + return null; + } + const urlString = whatwgURL.href; + const { host, hostname: hostname3, pathname, protocol, search } = whatwgURL; + if (search) { + return null; + } + const scheme = protocol.slice(0, -1); + if (!Object.values(EndpointURLScheme).includes(scheme)) { + return null; + } + const isIp = isIpAddress(hostname3); + const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`); + const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`; + return { + scheme, + authority, + path: pathname, + normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, + isIp + }; + }, "parseURL"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/stringEquals.js +var stringEquals; +var init_stringEquals = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/stringEquals.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + stringEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "stringEquals"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/substring.js +var substring; +var init_substring = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/substring.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + substring = /* @__PURE__ */ __name((input, start, stop, reverse) => { + if (start >= stop || input.length < stop || /[^\u0000-\u007f]/.test(input)) { + return null; + } + if (!reverse) { + return input.substring(start, stop); + } + return input.substring(input.length - stop, input.length - start); + }, "substring"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/uriEncode.js +var uriEncode; +var init_uriEncode = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/uriEncode.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + uriEncode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/[!*'()]/g, (c2) => `%${c2.charCodeAt(0).toString(16).toUpperCase()}`), "uriEncode"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/lib/index.js +var init_lib = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/lib/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_booleanEquals(); + init_getAttr(); + init_isSet(); + init_isValidHostLabel(); + init_not(); + init_parseURL(); + init_stringEquals(); + init_substring(); + init_uriEncode(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js +var endpointFunctions; +var init_endpointFunctions = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_lib(); + endpointFunctions = { + booleanEquals, + getAttr, + isSet, + isValidHostLabel, + not: not2, + parseURL, + stringEquals, + substring, + uriEncode + }; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js +var evaluateTemplate; +var init_evaluateTemplate = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_lib(); + evaluateTemplate = /* @__PURE__ */ __name((template, options) => { + const evaluatedTemplateArr = []; + const templateContext = { + ...options.endpointParams, + ...options.referenceRecord + }; + let currentIndex = 0; + while (currentIndex < template.length) { + const openingBraceIndex = template.indexOf("{", currentIndex); + if (openingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(currentIndex)); + break; + } + evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); + const closingBraceIndex = template.indexOf("}", openingBraceIndex); + if (closingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(openingBraceIndex)); + break; + } + if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { + evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); + currentIndex = closingBraceIndex + 2; + } + const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); + if (parameterName.includes("#")) { + const [refName, attrName] = parameterName.split("#"); + evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName)); + } else { + evaluatedTemplateArr.push(templateContext[parameterName]); + } + currentIndex = closingBraceIndex + 1; + } + return evaluatedTemplateArr.join(""); + }, "evaluateTemplate"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js +var getReferenceValue; +var init_getReferenceValue = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getReferenceValue = /* @__PURE__ */ __name(({ ref }, options) => { + const referenceRecord = { + ...options.endpointParams, + ...options.referenceRecord + }; + return referenceRecord[ref]; + }, "getReferenceValue"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js +var evaluateExpression, callFunction, group3; +var init_evaluateExpression = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_customEndpointFunctions(); + init_endpointFunctions(); + init_evaluateTemplate(); + init_getReferenceValue(); + evaluateExpression = /* @__PURE__ */ __name((obj, keyName, options) => { + if (typeof obj === "string") { + return evaluateTemplate(obj, options); + } else if (obj["fn"]) { + return group3.callFunction(obj, options); + } else if (obj["ref"]) { + return getReferenceValue(obj, options); + } + throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`); + }, "evaluateExpression"); + callFunction = /* @__PURE__ */ __name(({ fn, argv: argv2 }, options) => { + const evaluatedArgs = argv2.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : group3.evaluateExpression(arg, "arg", options)); + const fnSegments = fn.split("."); + if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) { + return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs); + } + return endpointFunctions[fn](...evaluatedArgs); + }, "callFunction"); + group3 = { + evaluateExpression, + callFunction + }; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/callFunction.js +var init_callFunction = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/callFunction.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_evaluateExpression(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js +var evaluateCondition; +var init_evaluateCondition = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_debug(); + init_types3(); + init_callFunction(); + evaluateCondition = /* @__PURE__ */ __name(({ assign, ...fnArgs }, options) => { + if (assign && assign in options.referenceRecord) { + throw new EndpointError(`'${assign}' is already defined in Reference Record.`); + } + const value = callFunction(fnArgs, options); + options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`); + return { + result: value === "" ? true : !!value, + ...assign != null && { toAssign: { name: assign, value } } + }; + }, "evaluateCondition"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js +var evaluateConditions; +var init_evaluateConditions = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_debug(); + init_evaluateCondition(); + evaluateConditions = /* @__PURE__ */ __name((conditions = [], options) => { + const conditionsReferenceRecord = {}; + for (const condition of conditions) { + const { result, toAssign } = evaluateCondition(condition, { + ...options, + referenceRecord: { + ...options.referenceRecord, + ...conditionsReferenceRecord + } + }); + if (!result) { + return { result }; + } + if (toAssign) { + conditionsReferenceRecord[toAssign.name] = toAssign.value; + options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`); + } + } + return { result: true, referenceRecord: conditionsReferenceRecord }; + }, "evaluateConditions"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js +var getEndpointHeaders; +var init_getEndpointHeaders = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_evaluateExpression(); + getEndpointHeaders = /* @__PURE__ */ __name((headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({ + ...acc, + [headerKey]: headerVal.map((headerValEntry) => { + const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options); + if (typeof processedExpr !== "string") { + throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`); + } + return processedExpr; + }) + }), {}), "getEndpointHeaders"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js +var getEndpointProperties, getEndpointProperty, group4; +var init_getEndpointProperties = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_evaluateTemplate(); + getEndpointProperties = /* @__PURE__ */ __name((properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({ + ...acc, + [propertyKey]: group4.getEndpointProperty(propertyVal, options) + }), {}), "getEndpointProperties"); + getEndpointProperty = /* @__PURE__ */ __name((property, options) => { + if (Array.isArray(property)) { + return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); + } + switch (typeof property) { + case "string": + return evaluateTemplate(property, options); + case "object": + if (property === null) { + throw new EndpointError(`Unexpected endpoint property: ${property}`); + } + return group4.getEndpointProperties(property, options); + case "boolean": + return property; + default: + throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`); + } + }, "getEndpointProperty"); + group4 = { + getEndpointProperty, + getEndpointProperties + }; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointUrl.js +var getEndpointUrl; +var init_getEndpointUrl = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointUrl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_evaluateExpression(); + getEndpointUrl = /* @__PURE__ */ __name((endpointUrl, options) => { + const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); + if (typeof expression === "string") { + try { + return new URL(expression); + } catch (error50) { + console.error(`Failed to construct URL with ${expression}`, error50); + throw error50; + } + } + throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`); + }, "getEndpointUrl"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js +var evaluateEndpointRule; +var init_evaluateEndpointRule = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_debug(); + init_evaluateConditions(); + init_getEndpointHeaders(); + init_getEndpointProperties(); + init_getEndpointUrl(); + evaluateEndpointRule = /* @__PURE__ */ __name((endpointRule, options) => { + const { conditions, endpoint } = endpointRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + const endpointRuleOptions = { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }; + const { url: url2, properties, headers } = endpoint; + options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`); + return { + ...headers != void 0 && { + headers: getEndpointHeaders(headers, endpointRuleOptions) + }, + ...properties != void 0 && { + properties: getEndpointProperties(properties, endpointRuleOptions) + }, + url: getEndpointUrl(url2, endpointRuleOptions) + }; + }, "evaluateEndpointRule"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js +var evaluateErrorRule; +var init_evaluateErrorRule = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_evaluateConditions(); + init_evaluateExpression(); + evaluateErrorRule = /* @__PURE__ */ __name((errorRule, options) => { + const { conditions, error: error50 } = errorRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + throw new EndpointError(evaluateExpression(error50, "Error", { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + })); + }, "evaluateErrorRule"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js +var evaluateRules, evaluateTreeRule, group5; +var init_evaluateRules = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types3(); + init_evaluateConditions(); + init_evaluateEndpointRule(); + init_evaluateErrorRule(); + evaluateRules = /* @__PURE__ */ __name((rules, options) => { + for (const rule of rules) { + if (rule.type === "endpoint") { + const endpointOrUndefined = evaluateEndpointRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else if (rule.type === "error") { + evaluateErrorRule(rule, options); + } else if (rule.type === "tree") { + const endpointOrUndefined = group5.evaluateTreeRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else { + throw new EndpointError(`Unknown endpoint rule: ${rule}`); + } + } + throw new EndpointError(`Rules evaluation failed`); + }, "evaluateRules"); + evaluateTreeRule = /* @__PURE__ */ __name((treeRule, options) => { + const { conditions, rules } = treeRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + return group5.evaluateRules(rules, { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }); + }, "evaluateTreeRule"); + group5 = { + evaluateRules, + evaluateTreeRule + }; + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/utils/index.js +var init_utils5 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/utils/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_customEndpointFunctions(); + init_evaluateRules(); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js +var resolveEndpoint; +var init_resolveEndpoint = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_debug(); + init_types3(); + init_utils5(); + resolveEndpoint = /* @__PURE__ */ __name((ruleSetObject, options) => { + const { endpointParams, logger: logger3 } = options; + const { parameters, rules } = ruleSetObject; + options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`); + const paramsWithDefault = Object.entries(parameters).filter(([, v3]) => v3.default != null).map(([k2, v3]) => [k2, v3.default]); + if (paramsWithDefault.length > 0) { + for (const [paramKey, paramDefaultValue] of paramsWithDefault) { + endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue; + } + } + const requiredParams = Object.entries(parameters).filter(([, v3]) => v3.required).map(([k2]) => k2); + for (const requiredParam of requiredParams) { + if (endpointParams[requiredParam] == null) { + throw new EndpointError(`Missing required parameter: '${requiredParam}'`); + } + } + const endpoint = evaluateRules(rules, { endpointParams, logger: logger3, referenceRecord: {} }); + options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`); + return endpoint; + }, "resolveEndpoint"); + } +}); + +// ../../node_modules/@smithy/util-endpoints/dist-es/index.js +var init_dist_es32 = __esm({ + "../../node_modules/@smithy/util-endpoints/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EndpointCache(); + init_isIpAddress(); + init_isValidHostLabel(); + init_customEndpointFunctions(); + init_resolveEndpoint(); + init_types3(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js +var init_isIpAddress2 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es32(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js +var isVirtualHostableS3Bucket; +var init_isVirtualHostableS3Bucket = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es32(); + init_isIpAddress2(); + isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; + } + if (!isValidHostLabel(value)) { + return false; + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if (isIpAddress(value)) { + return false; + } + return true; + }, "isVirtualHostableS3Bucket"); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js +var ARN_DELIMITER, RESOURCE_DELIMITER, parseArn; +var init_parseArn = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ARN_DELIMITER = ":"; + RESOURCE_DELIMITER = "/"; + parseArn = /* @__PURE__ */ __name((value) => { + const segments = value.split(ARN_DELIMITER); + if (segments.length < 6) + return null; + const [arn, partition2, service, region, accountId, ...resourcePath] = segments; + if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") + return null; + const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); + return { + partition: partition2, + service, + region, + accountId, + resourceId + }; + }, "parseArn"); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json +var partitions_default; +var init_partitions = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json"() { + partitions_default = { + partitions: [{ + id: "aws", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-east-1", + name: "aws", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", + regions: { + "af-south-1": { + description: "Africa (Cape Town)" + }, + "ap-east-1": { + description: "Asia Pacific (Hong Kong)" + }, + "ap-east-2": { + description: "Asia Pacific (Taipei)" + }, + "ap-northeast-1": { + description: "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + description: "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + description: "Asia Pacific (Osaka)" + }, + "ap-south-1": { + description: "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + description: "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + description: "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + description: "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + description: "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + description: "Asia Pacific (Melbourne)" + }, + "ap-southeast-5": { + description: "Asia Pacific (Malaysia)" + }, + "ap-southeast-6": { + description: "Asia Pacific (New Zealand)" + }, + "ap-southeast-7": { + description: "Asia Pacific (Thailand)" + }, + "aws-global": { + description: "aws global region" + }, + "ca-central-1": { + description: "Canada (Central)" + }, + "ca-west-1": { + description: "Canada West (Calgary)" + }, + "eu-central-1": { + description: "Europe (Frankfurt)" + }, + "eu-central-2": { + description: "Europe (Zurich)" + }, + "eu-north-1": { + description: "Europe (Stockholm)" + }, + "eu-south-1": { + description: "Europe (Milan)" + }, + "eu-south-2": { + description: "Europe (Spain)" + }, + "eu-west-1": { + description: "Europe (Ireland)" + }, + "eu-west-2": { + description: "Europe (London)" + }, + "eu-west-3": { + description: "Europe (Paris)" + }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, + "me-central-1": { + description: "Middle East (UAE)" + }, + "me-south-1": { + description: "Middle East (Bahrain)" + }, + "mx-central-1": { + description: "Mexico (Central)" + }, + "sa-east-1": { + description: "South America (Sao Paulo)" + }, + "us-east-1": { + description: "US East (N. Virginia)" + }, + "us-east-2": { + description: "US East (Ohio)" + }, + "us-west-1": { + description: "US West (N. California)" + }, + "us-west-2": { + description: "US West (Oregon)" + } + } + }, { + id: "aws-cn", + outputs: { + dnsSuffix: "amazonaws.com.cn", + dualStackDnsSuffix: "api.amazonwebservices.com.cn", + implicitGlobalRegion: "cn-northwest-1", + name: "aws-cn", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^cn\\-\\w+\\-\\d+$", + regions: { + "aws-cn-global": { + description: "aws-cn global region" + }, + "cn-north-1": { + description: "China (Beijing)" + }, + "cn-northwest-1": { + description: "China (Ningxia)" + } + } + }, { + id: "aws-eusc", + outputs: { + dnsSuffix: "amazonaws.eu", + dualStackDnsSuffix: "api.amazonwebservices.eu", + implicitGlobalRegion: "eusc-de-east-1", + name: "aws-eusc", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", + regions: { + "eusc-de-east-1": { + description: "AWS European Sovereign Cloud (Germany)" + } + } + }, { + id: "aws-iso", + outputs: { + dnsSuffix: "c2s.ic.gov", + dualStackDnsSuffix: "api.aws.ic.gov", + implicitGlobalRegion: "us-iso-east-1", + name: "aws-iso", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + regions: { + "aws-iso-global": { + description: "aws-iso global region" + }, + "us-iso-east-1": { + description: "US ISO East" + }, + "us-iso-west-1": { + description: "US ISO WEST" + } + } + }, { + id: "aws-iso-b", + outputs: { + dnsSuffix: "sc2s.sgov.gov", + dualStackDnsSuffix: "api.aws.scloud", + implicitGlobalRegion: "us-isob-east-1", + name: "aws-iso-b", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + regions: { + "aws-iso-b-global": { + description: "aws-iso-b global region" + }, + "us-isob-east-1": { + description: "US ISOB East (Ohio)" + }, + "us-isob-west-1": { + description: "US ISOB West" + } + } + }, { + id: "aws-iso-e", + outputs: { + dnsSuffix: "cloud.adc-e.uk", + dualStackDnsSuffix: "api.cloud-aws.adc-e.uk", + implicitGlobalRegion: "eu-isoe-west-1", + name: "aws-iso-e", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + regions: { + "aws-iso-e-global": { + description: "aws-iso-e global region" + }, + "eu-isoe-west-1": { + description: "EU ISOE West" + } + } + }, { + id: "aws-iso-f", + outputs: { + dnsSuffix: "csp.hci.ic.gov", + dualStackDnsSuffix: "api.aws.hci.ic.gov", + implicitGlobalRegion: "us-isof-south-1", + name: "aws-iso-f", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + regions: { + "aws-iso-f-global": { + description: "aws-iso-f global region" + }, + "us-isof-east-1": { + description: "US ISOF EAST" + }, + "us-isof-south-1": { + description: "US ISOF SOUTH" + } + } + }, { + id: "aws-us-gov", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-gov-west-1", + name: "aws-us-gov", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + regions: { + "aws-us-gov-global": { + description: "aws-us-gov global region" + }, + "us-gov-east-1": { + description: "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + description: "AWS GovCloud (US-West)" + } + } + }], + version: "1.1" + }; + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js +var selectedPartitionsInfo, selectedUserAgentPrefix, partition, getUserAgentPrefix; +var init_partition = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_partitions(); + selectedPartitionsInfo = partitions_default; + selectedUserAgentPrefix = ""; + partition = /* @__PURE__ */ __name((value) => { + const { partitions } = selectedPartitionsInfo; + for (const partition2 of partitions) { + const { regions, outputs } = partition2; + for (const [region, regionData] of Object.entries(regions)) { + if (region === value) { + return { + ...outputs, + ...regionData + }; + } + } + } + for (const partition2 of partitions) { + const { regionRegex, outputs } = partition2; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs + }; + } + } + const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws"); + if (!DEFAULT_PARTITION) { + throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist."); + } + return { + ...DEFAULT_PARTITION.outputs + }; + }, "partition"); + getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, "getUserAgentPrefix"); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/aws.js +var awsEndpointFunctions; +var init_aws = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/aws.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es32(); + init_isVirtualHostableS3Bucket(); + init_parseArn(); + init_partition(); + awsEndpointFunctions = { + isVirtualHostableS3Bucket, + parseArn, + partition + }; + customEndpointFunctions.aws = awsEndpointFunctions; + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveDefaultAwsRegionalEndpointsConfig.js +var init_resolveDefaultAwsRegionalEndpointsConfig = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveDefaultAwsRegionalEndpointsConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js +var init_resolveEndpoint2 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js +var init_EndpointError2 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js +var init_EndpointRuleObject3 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js +var init_ErrorRuleObject3 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js +var init_RuleSetObject3 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js +var init_TreeRuleObject3 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js +var init_shared3 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js +var init_types4 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EndpointError2(); + init_EndpointRuleObject3(); + init_ErrorRuleObject3(); + init_RuleSetObject3(); + init_TreeRuleObject3(); + init_shared3(); + } +}); + +// ../../node_modules/@aws-sdk/util-endpoints/dist-es/index.js +var init_dist_es33 = __esm({ + "../../node_modules/@aws-sdk/util-endpoints/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_aws(); + init_partition(); + init_isIpAddress2(); + init_resolveDefaultAwsRegionalEndpointsConfig(); + init_resolveEndpoint2(); + init_types4(); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/config.js +var RETRY_MODES, DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE; +var init_config2 = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/config.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + (function(RETRY_MODES2) { + RETRY_MODES2["STANDARD"] = "standard"; + RETRY_MODES2["ADAPTIVE"] = "adaptive"; + })(RETRY_MODES || (RETRY_MODES = {})); + DEFAULT_MAX_ATTEMPTS = 3; + DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD; + } +}); + +// ../../node_modules/@smithy/service-error-classification/dist-es/constants.js +var THROTTLING_ERROR_CODES, TRANSIENT_ERROR_CODES, TRANSIENT_ERROR_STATUS_CODES, NODEJS_TIMEOUT_ERROR_CODES, NODEJS_NETWORK_ERROR_CODES; +var init_constants7 = __esm({ + "../../node_modules/@smithy/service-error-classification/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException" + ]; + TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; + TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; + NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; + NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"]; + } +}); + +// ../../node_modules/@smithy/service-error-classification/dist-es/index.js +var isRetryableByTrait, isClockSkewCorrectedError, isBrowserNetworkError, isThrottlingError, isTransientError, isServerError; +var init_dist_es34 = __esm({ + "../../node_modules/@smithy/service-error-classification/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants7(); + isRetryableByTrait = /* @__PURE__ */ __name((error50) => error50?.$retryable !== void 0, "isRetryableByTrait"); + isClockSkewCorrectedError = /* @__PURE__ */ __name((error50) => error50.$metadata?.clockSkewCorrected, "isClockSkewCorrectedError"); + isBrowserNetworkError = /* @__PURE__ */ __name((error50) => { + const errorMessages = /* @__PURE__ */ new Set([ + "Failed to fetch", + "NetworkError when attempting to fetch resource", + "The Internet connection appears to be offline", + "Load failed", + "Network request failed" + ]); + const isValid = error50 && error50 instanceof TypeError; + if (!isValid) { + return false; + } + return errorMessages.has(error50.message); + }, "isBrowserNetworkError"); + isThrottlingError = /* @__PURE__ */ __name((error50) => error50.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error50.name) || error50.$retryable?.throttling == true, "isThrottlingError"); + isTransientError = /* @__PURE__ */ __name((error50, depth = 0) => isRetryableByTrait(error50) || isClockSkewCorrectedError(error50) || TRANSIENT_ERROR_CODES.includes(error50.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error50?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error50?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error50.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error50) || error50.cause !== void 0 && depth <= 10 && isTransientError(error50.cause, depth + 1), "isTransientError"); + isServerError = /* @__PURE__ */ __name((error50) => { + if (error50.$metadata?.httpStatusCode !== void 0) { + const statusCode = error50.$metadata.httpStatusCode; + if (500 <= statusCode && statusCode <= 599 && !isTransientError(error50)) { + return true; + } + return false; + } + return false; + }, "isServerError"); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js +var _DefaultRateLimiter, DefaultRateLimiter; +var init_DefaultRateLimiter = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es34(); + _DefaultRateLimiter = class { + beta; + minCapacity; + minFillRate; + scaleConstant; + smooth; + currentCapacity = 0; + enabled = false; + lastMaxRate = 0; + measuredTxRate = 0; + requestCount = 0; + fillRate; + lastThrottleTime; + lastTimestamp = 0; + lastTxRateBucket; + maxCapacity; + timeWindow = 0; + constructor(options) { + this.beta = options?.beta ?? 0.7; + this.minCapacity = options?.minCapacity ?? 1; + this.minFillRate = options?.minFillRate ?? 0.5; + this.scaleConstant = options?.scaleConstant ?? 0.4; + this.smooth = options?.smooth ?? 0.8; + const currentTimeInSeconds = this.getCurrentTimeInSeconds(); + this.lastThrottleTime = currentTimeInSeconds; + this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); + this.fillRate = this.minFillRate; + this.maxCapacity = this.minCapacity; + } + getCurrentTimeInSeconds() { + return Date.now() / 1e3; + } + async getSendToken() { + return this.acquireTokenBucket(1); + } + async acquireTokenBucket(amount) { + if (!this.enabled) { + return; + } + this.refillTokenBucket(); + if (amount > this.currentCapacity) { + const delay = (amount - this.currentCapacity) / this.fillRate * 1e3; + await new Promise((resolve) => _DefaultRateLimiter.setTimeoutFn(resolve, delay)); + } + this.currentCapacity = this.currentCapacity - amount; + } + refillTokenBucket() { + const timestamp = this.getCurrentTimeInSeconds(); + if (!this.lastTimestamp) { + this.lastTimestamp = timestamp; + return; + } + const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; + this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount); + this.lastTimestamp = timestamp; + } + updateClientSendingRate(response) { + let calculatedRate; + this.updateMeasuredRate(); + if (isThrottlingError(response)) { + const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); + this.lastMaxRate = rateToUse; + this.calculateTimeWindow(); + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + calculatedRate = this.cubicThrottle(rateToUse); + this.enableTokenBucket(); + } else { + this.calculateTimeWindow(); + calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); + } + const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); + this.updateTokenBucketRate(newRate); + } + calculateTimeWindow() { + this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3)); + } + cubicThrottle(rateToUse) { + return this.getPrecise(rateToUse * this.beta); + } + cubicSuccess(timestamp) { + return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate); + } + enableTokenBucket() { + this.enabled = true; + } + updateTokenBucketRate(newRate) { + this.refillTokenBucket(); + this.fillRate = Math.max(newRate, this.minFillRate); + this.maxCapacity = Math.max(newRate, this.minCapacity); + this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity); + } + updateMeasuredRate() { + const t9 = this.getCurrentTimeInSeconds(); + const timeBucket = Math.floor(t9 * 2) / 2; + this.requestCount++; + if (timeBucket > this.lastTxRateBucket) { + const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); + this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); + this.requestCount = 0; + this.lastTxRateBucket = timeBucket; + } + } + getPrecise(num) { + return parseFloat(num.toFixed(8)); + } + }; + DefaultRateLimiter = _DefaultRateLimiter; + __name(DefaultRateLimiter, "DefaultRateLimiter"); + __publicField(DefaultRateLimiter, "setTimeoutFn", setTimeout); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/constants.js +var DEFAULT_RETRY_DELAY_BASE, MAXIMUM_RETRY_DELAY, THROTTLING_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, RETRY_COST, TIMEOUT_RETRY_COST, NO_RETRY_INCREMENT, INVOCATION_ID_HEADER, REQUEST_HEADER; +var init_constants8 = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + DEFAULT_RETRY_DELAY_BASE = 100; + MAXIMUM_RETRY_DELAY = 20 * 1e3; + THROTTLING_RETRY_DELAY_BASE = 500; + INITIAL_RETRY_TOKENS = 500; + RETRY_COST = 5; + TIMEOUT_RETRY_COST = 10; + NO_RETRY_INCREMENT = 1; + INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; + REQUEST_HEADER = "amz-sdk-request"; + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/defaultRetryBackoffStrategy.js +var getDefaultRetryBackoffStrategy; +var init_defaultRetryBackoffStrategy = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/defaultRetryBackoffStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants8(); + getDefaultRetryBackoffStrategy = /* @__PURE__ */ __name(() => { + let delayBase = DEFAULT_RETRY_DELAY_BASE; + const computeNextBackoffDelay = /* @__PURE__ */ __name((attempts) => { + return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); + }, "computeNextBackoffDelay"); + const setDelayBase = /* @__PURE__ */ __name((delay) => { + delayBase = delay; + }, "setDelayBase"); + return { + computeNextBackoffDelay, + setDelayBase + }; + }, "getDefaultRetryBackoffStrategy"); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/defaultRetryToken.js +var createDefaultRetryToken; +var init_defaultRetryToken = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/defaultRetryToken.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants8(); + createDefaultRetryToken = /* @__PURE__ */ __name(({ retryDelay, retryCount, retryCost }) => { + const getRetryCount = /* @__PURE__ */ __name(() => retryCount, "getRetryCount"); + const getRetryDelay = /* @__PURE__ */ __name(() => Math.min(MAXIMUM_RETRY_DELAY, retryDelay), "getRetryDelay"); + const getRetryCost = /* @__PURE__ */ __name(() => retryCost, "getRetryCost"); + return { + getRetryCount, + getRetryDelay, + getRetryCost + }; + }, "createDefaultRetryToken"); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js +var StandardRetryStrategy; +var init_StandardRetryStrategy = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_config2(); + init_constants8(); + init_defaultRetryBackoffStrategy(); + init_defaultRetryToken(); + StandardRetryStrategy = class { + maxAttempts; + mode = RETRY_MODES.STANDARD; + capacity = INITIAL_RETRY_TOKENS; + retryBackoffStrategy = getDefaultRetryBackoffStrategy(); + maxAttemptsProvider; + constructor(maxAttempts) { + this.maxAttempts = maxAttempts; + this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts; + } + async acquireInitialRetryToken(retryTokenScope) { + return createDefaultRetryToken({ + retryDelay: DEFAULT_RETRY_DELAY_BASE, + retryCount: 0 + }); + } + async refreshRetryTokenForRetry(token, errorInfo) { + const maxAttempts = await this.getMaxAttempts(); + if (this.shouldRetry(token, errorInfo, maxAttempts)) { + const errorType = errorInfo.errorType; + this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE); + const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); + const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType; + const capacityCost = this.getCapacityCost(errorType); + this.capacity -= capacityCost; + return createDefaultRetryToken({ + retryDelay, + retryCount: token.getRetryCount() + 1, + retryCost: capacityCost + }); + } + throw new Error("No retry token available"); + } + recordSuccess(token) { + this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); + } + getCapacity() { + return this.capacity; + } + async getMaxAttempts() { + try { + return await this.maxAttemptsProvider(); + } catch (error50) { + console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); + return DEFAULT_MAX_ATTEMPTS; + } + } + shouldRetry(tokenToRenew, errorInfo, maxAttempts) { + const attempts = tokenToRenew.getRetryCount() + 1; + return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType); + } + getCapacityCost(errorType) { + return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST; + } + isRetryableError(errorType) { + return errorType === "THROTTLING" || errorType === "TRANSIENT"; + } + }; + __name(StandardRetryStrategy, "StandardRetryStrategy"); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js +var AdaptiveRetryStrategy; +var init_AdaptiveRetryStrategy = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_config2(); + init_DefaultRateLimiter(); + init_StandardRetryStrategy(); + AdaptiveRetryStrategy = class { + maxAttemptsProvider; + rateLimiter; + standardRetryStrategy; + mode = RETRY_MODES.ADAPTIVE; + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + const { rateLimiter } = options ?? {}; + this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); + this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider); + } + async acquireInitialRetryToken(retryTokenScope) { + await this.rateLimiter.getSendToken(); + return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + this.rateLimiter.updateClientSendingRate(errorInfo); + return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + } + recordSuccess(token) { + this.rateLimiter.updateClientSendingRate({}); + this.standardRetryStrategy.recordSuccess(token); + } + }; + __name(AdaptiveRetryStrategy, "AdaptiveRetryStrategy"); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js +var init_ConfiguredRetryStrategy = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/types.js +var init_types5 = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/util-retry/dist-es/index.js +var init_dist_es35 = __esm({ + "../../node_modules/@smithy/util-retry/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AdaptiveRetryStrategy(); + init_ConfiguredRetryStrategy(); + init_DefaultRateLimiter(); + init_StandardRetryStrategy(); + init_config2(); + init_constants8(); + init_types5(); + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js +async function checkFeatures(context2, config3, args) { + const request = args.request; + if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") { + setFeature(context2, "PROTOCOL_RPC_V2_CBOR", "M"); + } + if (typeof config3.retryStrategy === "function") { + const retryStrategy = await config3.retryStrategy(); + if (typeof retryStrategy.mode === "string") { + switch (retryStrategy.mode) { + case RETRY_MODES.ADAPTIVE: + setFeature(context2, "RETRY_MODE_ADAPTIVE", "F"); + break; + case RETRY_MODES.STANDARD: + setFeature(context2, "RETRY_MODE_STANDARD", "E"); + break; + } + } + } + if (typeof config3.accountIdEndpointMode === "function") { + const endpointV2 = context2.endpointV2; + if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) { + setFeature(context2, "ACCOUNT_ID_ENDPOINT", "O"); + } + switch (await config3.accountIdEndpointMode?.()) { + case "disabled": + setFeature(context2, "ACCOUNT_ID_MODE_DISABLED", "Q"); + break; + case "preferred": + setFeature(context2, "ACCOUNT_ID_MODE_PREFERRED", "P"); + break; + case "required": + setFeature(context2, "ACCOUNT_ID_MODE_REQUIRED", "R"); + break; + } + } + const identity2 = context2.__smithy_context?.selectedHttpAuthScheme?.identity; + if (identity2?.$source) { + const credentials = identity2; + if (credentials.accountId) { + setFeature(context2, "RESOLVED_ACCOUNT_ID", "T"); + } + for (const [key, value] of Object.entries(credentials.$source ?? {})) { + setFeature(context2, key, value); + } + } +} +var ACCOUNT_ID_ENDPOINT_REGEX; +var init_check_features = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_dist_es35(); + ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/; + __name(checkFeatures, "checkFeatures"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js +var USER_AGENT, X_AMZ_USER_AGENT, SPACE, UA_NAME_SEPARATOR, UA_NAME_ESCAPE_REGEX, UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR; +var init_constants9 = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + USER_AGENT = "user-agent"; + X_AMZ_USER_AGENT = "x-amz-user-agent"; + SPACE = " "; + UA_NAME_SEPARATOR = "/"; + UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w]/g; + UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w#]/g; + UA_ESCAPE_CHAR = "-"; + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/encode-features.js +function encodeFeatures(features2) { + let buffer = ""; + for (const key in features2) { + const val = features2[key]; + if (buffer.length + val.length + 1 <= BYTE_LIMIT) { + if (buffer.length) { + buffer += "," + val; + } else { + buffer += val; + } + continue; + } + break; + } + return buffer; +} +var BYTE_LIMIT; +var init_encode_features = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/encode-features.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + BYTE_LIMIT = 1024; + __name(encodeFeatures, "encodeFeatures"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js +var userAgentMiddleware, escapeUserAgent, getUserAgentMiddlewareOptions, getUserAgentPlugin; +var init_user_agent_middleware = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es33(); + init_dist_es2(); + init_check_features(); + init_constants9(); + init_encode_features(); + userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context2) => async (args) => { + const { request } = args; + if (!HttpRequest.isInstance(request)) { + return next(args); + } + const { headers } = request; + const userAgent = context2?.userAgent?.map(escapeUserAgent) || []; + const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); + await checkFeatures(context2, options, args); + const awsContext = context2; + defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context2.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`); + const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || []; + const appId = await options.userAgentAppId(); + if (appId) { + defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`])); + } + const prefix = getUserAgentPrefix(); + const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE); + const normalUAValue = [ + ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), + ...customUserAgent + ].join(SPACE); + if (options.runtime !== "browser") { + if (normalUAValue) { + headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue; + } + headers[USER_AGENT] = sdkUserAgentValue; + } else { + headers[X_AMZ_USER_AGENT] = sdkUserAgentValue; + } + return next({ + ...args, + request + }); + }, "userAgentMiddleware"); + escapeUserAgent = /* @__PURE__ */ __name((userAgentPair) => { + const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR); + const version4 = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR); + const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR); + const prefix = name.substring(0, prefixSeparatorIndex); + let uaName = name.substring(prefixSeparatorIndex + 1); + if (prefix === "api") { + uaName = uaName.toLowerCase(); + } + return [prefix, uaName, version4].filter((item) => item && item.length > 0).reduce((acc, item, index) => { + switch (index) { + case 0: + return item; + case 1: + return `${acc}/${item}`; + default: + return `${acc}#${item}`; + } + }, ""); + }, "escapeUserAgent"); + getUserAgentMiddlewareOptions = { + name: "getUserAgentMiddleware", + step: "build", + priority: "low", + tags: ["SET_USER_AGENT", "USER_AGENT"], + override: true + }; + getUserAgentPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.add(userAgentMiddleware(config3), getUserAgentMiddlewareOptions); + } + }), "getUserAgentPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-user-agent/dist-es/index.js +var init_dist_es36 = __esm({ + "../../node_modules/@aws-sdk/middleware-user-agent/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_configurations(); + init_user_agent_middleware(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js +var DEFAULT_USE_DUALSTACK_ENDPOINT; +var init_NodeUseDualstackEndpointConfigOptions = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + DEFAULT_USE_DUALSTACK_ENDPOINT = false; + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseFipsEndpointConfigOptions.js +var DEFAULT_USE_FIPS_ENDPOINT; +var init_NodeUseFipsEndpointConfigOptions = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseFipsEndpointConfigOptions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + DEFAULT_USE_FIPS_ENDPOINT = false; + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveCustomEndpointsConfig.js +var init_resolveCustomEndpointsConfig = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveCustomEndpointsConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveEndpointsConfig.js +var init_resolveEndpointsConfig = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveEndpointsConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/index.js +var init_endpointsConfig = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_NodeUseDualstackEndpointConfigOptions(); + init_NodeUseFipsEndpointConfigOptions(); + init_resolveCustomEndpointsConfig(); + init_resolveEndpointsConfig(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/config.js +var init_config3 = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/config.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/checkRegion.js +var validRegions, checkRegion; +var init_checkRegion = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/checkRegion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es32(); + validRegions = /* @__PURE__ */ new Set(); + checkRegion = /* @__PURE__ */ __name((region, check3 = isValidHostLabel) => { + if (!validRegions.has(region) && !check3(region)) { + if (region === "*") { + console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`); + } else { + throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`); + } + } else { + validRegions.add(region); + } + }, "checkRegion"); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/isFipsRegion.js +var isFipsRegion; +var init_isFipsRegion = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/isFipsRegion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/getRealRegion.js +var getRealRegion; +var init_getRealRegion = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/getRealRegion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_isFipsRegion(); + getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/resolveRegionConfig.js +var resolveRegionConfig; +var init_resolveRegionConfig = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/resolveRegionConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_checkRegion(); + init_getRealRegion(); + init_isFipsRegion(); + resolveRegionConfig = /* @__PURE__ */ __name((input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); + } + return Object.assign(input, { + region: async () => { + const providedRegion = typeof region === "function" ? await region() : region; + const realRegion = getRealRegion(providedRegion); + checkRegion(realRegion); + return realRegion; + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + } + }); + }, "resolveRegionConfig"); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionConfig/index.js +var init_regionConfig = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionConfig/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_config3(); + init_resolveRegionConfig(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionInfo/PartitionHash.js +var init_PartitionHash = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionInfo/PartitionHash.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionInfo/RegionHash.js +var init_RegionHash = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionInfo/RegionHash.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionInfo/getRegionInfo.js +var init_getRegionInfo = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionInfo/getRegionInfo.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/regionInfo/index.js +var init_regionInfo = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/regionInfo/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_PartitionHash(); + init_RegionHash(); + init_getRegionInfo(); + } +}); + +// ../../node_modules/@smithy/config-resolver/dist-es/index.js +var init_dist_es37 = __esm({ + "../../node_modules/@smithy/config-resolver/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_endpointsConfig(); + init_regionConfig(); + init_regionInfo(); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/EventStreamSerdeConfig.js +var resolveEventStreamSerdeConfig; +var init_EventStreamSerdeConfig = __esm({ + "../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/EventStreamSerdeConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + resolveEventStreamSerdeConfig = /* @__PURE__ */ __name((input) => Object.assign(input, { + eventStreamMarshaller: input.eventStreamSerdeProvider(input) + }), "resolveEventStreamSerdeConfig"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/index.js +var init_dist_es38 = __esm({ + "../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamSerdeConfig(); + } +}); + +// ../../node_modules/@smithy/middleware-content-length/dist-es/index.js +function contentLengthMiddleware(bodyLengthChecker) { + return (next) => async (args) => { + const request = args.request; + if (HttpRequest.isInstance(request)) { + const { body, headers } = request; + if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER2) === -1) { + try { + const length = bodyLengthChecker(body); + request.headers = { + ...request.headers, + [CONTENT_LENGTH_HEADER2]: String(length) + }; + } catch (error50) { + } + } + } + return next({ + ...args, + request + }); + }; +} +var CONTENT_LENGTH_HEADER2, contentLengthMiddlewareOptions, getContentLengthPlugin; +var init_dist_es39 = __esm({ + "../../node_modules/@smithy/middleware-content-length/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + CONTENT_LENGTH_HEADER2 = "content-length"; + __name(contentLengthMiddleware, "contentLengthMiddleware"); + contentLengthMiddlewareOptions = { + step: "build", + tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], + name: "contentLengthMiddleware", + override: true + }; + getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); + } + }), "getContentLengthPlugin"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/s3.js +var resolveParamsForS3, DOMAIN_PATTERN, IP_ADDRESS_PATTERN, DOTS_PATTERN, isDnsCompatibleBucketName, isArnBucketName; +var init_s3 = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/s3.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { + const bucket = endpointParams?.Bucket || ""; + if (typeof endpointParams.Bucket === "string") { + endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); + } + if (isArnBucketName(bucket)) { + if (endpointParams.ForcePathStyle === true) { + throw new Error("Path-style addressing cannot be used with ARN buckets"); + } + } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { + endpointParams.ForcePathStyle = true; + } + if (endpointParams.DisableMultiRegionAccessPoints) { + endpointParams.disableMultiRegionAccessPoints = true; + endpointParams.DisableMRAP = true; + } + return endpointParams; + }, "resolveParamsForS3"); + DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; + IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; + DOTS_PATTERN = /\.\./; + isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); + isArnBucketName = /* @__PURE__ */ __name((bucketName) => { + const [arn, partition2, service, , , bucket] = bucketName.split(":"); + const isArn = arn === "arn" && bucketName.split(":").length >= 6; + const isValidArn = Boolean(isArn && partition2 && service && bucket); + if (isArn && !isValidArn) { + throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); + } + return isValidArn; + }, "isArnBucketName"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/index.js +var init_service_customizations = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_s3(); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js +var createConfigValueProvider; +var init_createConfigValueProvider = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config3, isClientContextParam = false) => { + const configProvider = /* @__PURE__ */ __name(async () => { + let configValue; + if (isClientContextParam) { + const clientContextParams = config3.clientContextParams; + const nestedValue = clientContextParams?.[configKey]; + configValue = nestedValue ?? config3[configKey] ?? config3[canonicalEndpointParamKey]; + } else { + configValue = config3[configKey] ?? config3[canonicalEndpointParamKey]; + } + if (typeof configValue === "function") { + return configValue(); + } + return configValue; + }, "configProvider"); + if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { + return async () => { + const credentials = typeof config3.credentials === "function" ? await config3.credentials() : config3.credentials; + const configValue = credentials?.credentialScope ?? credentials?.CredentialScope; + return configValue; + }; + } + if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") { + return async () => { + const credentials = typeof config3.credentials === "function" ? await config3.credentials() : config3.credentials; + const configValue = credentials?.accountId ?? credentials?.AccountId; + return configValue; + }; + } + if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { + return async () => { + if (config3.isCustomEndpoint === false) { + return void 0; + } + const endpoint = await configProvider(); + if (endpoint && typeof endpoint === "object") { + if ("url" in endpoint) { + return endpoint.url.href; + } + if ("hostname" in endpoint) { + const { protocol, hostname: hostname3, port, path } = endpoint; + return `${protocol}//${hostname3}${port ? ":" + port : ""}${path}`; + } + } + return endpoint; + }; + } + return configProvider; + }, "createConfigValueProvider"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.browser.js +var getEndpointFromConfig; +var init_getEndpointFromConfig_browser = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getEndpointFromConfig = /* @__PURE__ */ __name(async (serviceId) => void 0, "getEndpointFromConfig"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js +var toEndpointV12; +var init_toEndpointV12 = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es13(); + toEndpointV12 = /* @__PURE__ */ __name((endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + const v1Endpoint = parseUrl(endpoint.url); + if (endpoint.headers) { + v1Endpoint.headers = {}; + for (const [name, values] of Object.entries(endpoint.headers)) { + v1Endpoint.headers[name.toLowerCase()] = values.join(", "); + } + } + return v1Endpoint; + } + return endpoint; + } + return parseUrl(endpoint); + }, "toEndpointV1"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js +var getEndpointFromInstructions, resolveParams; +var init_getEndpointFromInstructions = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_service_customizations(); + init_createConfigValueProvider(); + init_getEndpointFromConfig_browser(); + init_toEndpointV12(); + getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context2) => { + if (!clientConfig.isCustomEndpoint) { + let endpointFromConfig; + if (clientConfig.serviceConfiguredEndpoint) { + endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); + } else { + endpointFromConfig = await getEndpointFromConfig(clientConfig.serviceId); + } + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve(toEndpointV12(endpointFromConfig)); + clientConfig.isCustomEndpoint = true; + } + } + const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); + if (typeof clientConfig.endpointProvider !== "function") { + throw new Error("config.endpointProvider is not set."); + } + const endpoint = clientConfig.endpointProvider(endpointParams, context2); + if (clientConfig.isCustomEndpoint && clientConfig.endpoint) { + const customEndpoint = await clientConfig.endpoint(); + if (customEndpoint?.headers) { + endpoint.headers ??= {}; + for (const [name, value] of Object.entries(customEndpoint.headers)) { + endpoint.headers[name] = Array.isArray(value) ? value : [value]; + } + } + } + return endpoint; + }, "getEndpointFromInstructions"); + resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => { + const endpointParams = {}; + const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {}; + for (const [name, instruction] of Object.entries(instructions)) { + switch (instruction.type) { + case "staticContextParams": + endpointParams[name] = instruction.value; + break; + case "contextParams": + endpointParams[name] = commandInput[instruction.name]; + break; + case "clientContextParams": + case "builtInParams": + endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")(); + break; + case "operationContextParams": + endpointParams[name] = instruction.get(commandInput); + break; + default: + throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); + } + } + if (Object.keys(instructions).length === 0) { + Object.assign(endpointParams, clientConfig); + } + if (String(clientConfig.serviceId).toLowerCase() === "s3") { + await resolveParamsForS3(endpointParams); + } + return endpointParams; + }, "resolveParams"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/index.js +var init_adaptors = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getEndpointFromInstructions(); + init_toEndpointV12(); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js +var endpointMiddleware; +var init_endpointMiddleware = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_dist_es4(); + init_getEndpointFromInstructions(); + endpointMiddleware = /* @__PURE__ */ __name(({ config: config3, instructions }) => { + return (next, context2) => async (args) => { + if (config3.isCustomEndpoint) { + setFeature2(context2, "ENDPOINT_OVERRIDE", "N"); + } + const endpoint = await getEndpointFromInstructions(args.input, { + getEndpointParameterInstructions() { + return instructions; + } + }, { ...config3 }, context2); + context2.endpointV2 = endpoint; + context2.authSchemes = endpoint.properties?.authSchemes; + const authScheme = context2.authSchemes?.[0]; + if (authScheme) { + context2["signing_region"] = authScheme.signingRegion; + context2["signing_service"] = authScheme.signingName; + const smithyContext = getSmithyContext(context2); + const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption; + if (httpAuthOption) { + httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, { + signing_region: authScheme.signingRegion, + signingRegion: authScheme.signingRegion, + signing_service: authScheme.signingName, + signingName: authScheme.signingName, + signingRegionSet: authScheme.signingRegionSet + }, authScheme.properties); + } + } + return next({ + ...args + }); + }; + }, "endpointMiddleware"); + } +}); + +// ../../node_modules/@smithy/middleware-serde/dist-es/deserializerMiddleware.js +var init_deserializerMiddleware = __esm({ + "../../node_modules/@smithy/middleware-serde/dist-es/deserializerMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js +var init_serializerMiddleware = __esm({ + "../../node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-serde/dist-es/serdePlugin.js +var serializerMiddlewareOption2; +var init_serdePlugin = __esm({ + "../../node_modules/@smithy/middleware-serde/dist-es/serdePlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + serializerMiddlewareOption2 = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true + }; + } +}); + +// ../../node_modules/@smithy/middleware-serde/dist-es/index.js +var init_dist_es40 = __esm({ + "../../node_modules/@smithy/middleware-serde/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_deserializerMiddleware(); + init_serdePlugin(); + init_serializerMiddleware(); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js +var endpointMiddlewareOptions, getEndpointPlugin; +var init_getEndpointPlugin = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es40(); + init_endpointMiddleware(); + endpointMiddlewareOptions = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: serializerMiddlewareOption2.name + }; + getEndpointPlugin = /* @__PURE__ */ __name((config3, instructions) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(endpointMiddleware({ + config: config3, + instructions + }), endpointMiddlewareOptions); + } + }), "getEndpointPlugin"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js +var resolveEndpointConfig; +var init_resolveEndpointConfig = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es4(); + init_getEndpointFromConfig_browser(); + init_toEndpointV12(); + resolveEndpointConfig = /* @__PURE__ */ __name((input) => { + const tls = input.tls ?? true; + const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input; + const customEndpointProvider = endpoint != null ? async () => toEndpointV12(await normalizeProvider(endpoint)()) : void 0; + const isCustomEndpoint = !!endpoint; + const resolvedConfig = Object.assign(input, { + endpoint: customEndpointProvider, + tls, + isCustomEndpoint, + useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false), + useFipsEndpoint: normalizeProvider(useFipsEndpoint ?? false) + }); + let configuredEndpointPromise = void 0; + resolvedConfig.serviceConfiguredEndpoint = async () => { + if (input.serviceId && !configuredEndpointPromise) { + configuredEndpointPromise = getEndpointFromConfig(input.serviceId); + } + return configuredEndpointPromise; + }; + return resolvedConfig; + }, "resolveEndpointConfig"); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointRequiredConfig.js +var init_resolveEndpointRequiredConfig = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointRequiredConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/types.js +var init_types6 = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/types.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-endpoint/dist-es/index.js +var init_dist_es41 = __esm({ + "../../node_modules/@smithy/middleware-endpoint/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_adaptors(); + init_endpointMiddleware(); + init_getEndpointPlugin(); + init_resolveEndpointConfig(); + init_resolveEndpointRequiredConfig(); + init_types6(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/delayDecider.js +var init_delayDecider = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/delayDecider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/retryDecider.js +var init_retryDecider = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/retryDecider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/util.js +var asSdkError; +var init_util2 = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/util.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + asSdkError = /* @__PURE__ */ __name((error50) => { + if (error50 instanceof Error) + return error50; + if (error50 instanceof Object) + return Object.assign(new Error(), error50); + if (typeof error50 === "string") + return new Error(error50); + return new Error(`AWS SDK error wrapper for ${error50}`); + }, "asSdkError"); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/StandardRetryStrategy.js +var init_StandardRetryStrategy2 = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/StandardRetryStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/AdaptiveRetryStrategy.js +var init_AdaptiveRetryStrategy2 = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/AdaptiveRetryStrategy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/configurations.js +var resolveRetryConfig; +var init_configurations2 = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/configurations.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es4(); + init_dist_es35(); + resolveRetryConfig = /* @__PURE__ */ __name((input) => { + const { retryStrategy, retryMode } = input; + const maxAttempts = normalizeProvider(input.maxAttempts ?? DEFAULT_MAX_ATTEMPTS); + let controller = retryStrategy ? Promise.resolve(retryStrategy) : void 0; + const getDefault = /* @__PURE__ */ __name(async () => await normalizeProvider(retryMode)() === RETRY_MODES.ADAPTIVE ? new AdaptiveRetryStrategy(maxAttempts) : new StandardRetryStrategy(maxAttempts), "getDefault"); + return Object.assign(input, { + maxAttempts, + retryStrategy: () => controller ??= getDefault() + }); + }, "resolveRetryConfig"); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/omitRetryHeadersMiddleware.js +var init_omitRetryHeadersMiddleware = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/omitRetryHeadersMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/isStreamingPayload/isStreamingPayload.browser.js +var isStreamingPayload; +var init_isStreamingPayload_browser = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/isStreamingPayload/isStreamingPayload.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + isStreamingPayload = /* @__PURE__ */ __name((request) => request?.body instanceof ReadableStream, "isStreamingPayload"); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js +var retryMiddleware, isRetryStrategyV2, getRetryErrorInfo, getRetryErrorType, retryMiddlewareOptions, getRetryPlugin, getRetryAfterHint; +var init_retryMiddleware = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es2(); + init_dist_es34(); + init_dist_es21(); + init_dist_es35(); + init_dist_es14(); + init_isStreamingPayload_browser(); + init_util2(); + retryMiddleware = /* @__PURE__ */ __name((options) => (next, context2) => async (args) => { + let retryStrategy = await options.retryStrategy(); + const maxAttempts = await options.maxAttempts(); + if (isRetryStrategyV2(retryStrategy)) { + retryStrategy = retryStrategy; + let retryToken = await retryStrategy.acquireInitialRetryToken(context2["partition_id"]); + let lastError = new Error(); + let attempts = 0; + let totalRetryDelay = 0; + const { request } = args; + const isRequest2 = HttpRequest.isInstance(request); + if (isRequest2) { + request.headers[INVOCATION_ID_HEADER] = v4(); + } + while (true) { + try { + if (isRequest2) { + request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + const { response, output } = await next(args); + retryStrategy.recordSuccess(retryToken); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalRetryDelay; + return { response, output }; + } catch (e2) { + const retryErrorInfo = getRetryErrorInfo(e2); + lastError = asSdkError(e2); + if (isRequest2 && isStreamingPayload(request)) { + (context2.logger instanceof NoOpLogger ? console : context2.logger)?.warn("An error was encountered in a non-retryable streaming request."); + throw lastError; + } + try { + retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); + } catch (refreshError) { + if (!lastError.$metadata) { + lastError.$metadata = {}; + } + lastError.$metadata.attempts = attempts + 1; + lastError.$metadata.totalRetryDelay = totalRetryDelay; + throw lastError; + } + attempts = retryToken.getRetryCount(); + const delay = retryToken.getRetryDelay(); + totalRetryDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); + } + } + } else { + retryStrategy = retryStrategy; + if (retryStrategy?.mode) + context2.userAgent = [...context2.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]]; + return retryStrategy.retry(next, args); + } + }, "retryMiddleware"); + isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined", "isRetryStrategyV2"); + getRetryErrorInfo = /* @__PURE__ */ __name((error50) => { + const errorInfo = { + error: error50, + errorType: getRetryErrorType(error50) + }; + const retryAfterHint = getRetryAfterHint(error50.$response); + if (retryAfterHint) { + errorInfo.retryAfterHint = retryAfterHint; + } + return errorInfo; + }, "getRetryErrorInfo"); + getRetryErrorType = /* @__PURE__ */ __name((error50) => { + if (isThrottlingError(error50)) + return "THROTTLING"; + if (isTransientError(error50)) + return "TRANSIENT"; + if (isServerError(error50)) + return "SERVER_ERROR"; + return "CLIENT_ERROR"; + }, "getRetryErrorType"); + retryMiddlewareOptions = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", + override: true + }; + getRetryPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(retryMiddleware(options), retryMiddlewareOptions); + } + }), "getRetryPlugin"); + getRetryAfterHint = /* @__PURE__ */ __name((response) => { + if (!HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return new Date(retryAfterSeconds * 1e3); + const retryAfterDate = new Date(retryAfter); + return retryAfterDate; + }, "getRetryAfterHint"); + } +}); + +// ../../node_modules/@smithy/middleware-retry/dist-es/index.js +var init_dist_es42 = __esm({ + "../../node_modules/@smithy/middleware-retry/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AdaptiveRetryStrategy2(); + init_StandardRetryStrategy2(); + init_configurations2(); + init_delayDecider(); + init_omitRetryHeadersMiddleware(); + init_retryDecider(); + init_retryMiddleware(); + } +}); + +// ../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/signature-v4-crt-container.js +var signatureV4CrtContainer; +var init_signature_v4_crt_container = __esm({ + "../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/signature-v4-crt-container.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + signatureV4CrtContainer = { + CrtSignerV4: null + }; + } +}); + +// ../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4MultiRegion.js +var SignatureV4MultiRegion; +var init_SignatureV4MultiRegion = __esm({ + "../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4MultiRegion.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es18(); + init_signature_v4_crt_container(); + SignatureV4MultiRegion = class { + sigv4aSigner; + sigv4Signer; + signerOptions; + static sigv4aDependency() { + if (typeof signatureV4CrtContainer.CrtSignerV4 === "function") { + return "crt"; + } else if (typeof signatureV4aContainer.SignatureV4a === "function") { + return "js"; + } + return "none"; + } + constructor(options) { + this.sigv4Signer = new SignatureV4S3Express(options); + this.signerOptions = options; + } + async sign(requestToSign, options = {}) { + if (options.signingRegion === "*") { + return this.getSigv4aSigner().sign(requestToSign, options); + } + return this.sigv4Signer.sign(requestToSign, options); + } + async signWithCredentials(requestToSign, credentials, options = {}) { + if (options.signingRegion === "*") { + const signer = this.getSigv4aSigner(); + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + if (CrtSignerV4 && signer instanceof CrtSignerV4) { + return signer.signWithCredentials(requestToSign, credentials, options); + } else { + throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`); + } + } + return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options); + } + async presign(originalRequest, options = {}) { + if (options.signingRegion === "*") { + const signer = this.getSigv4aSigner(); + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + if (CrtSignerV4 && signer instanceof CrtSignerV4) { + return signer.presign(originalRequest, options); + } else { + throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`); + } + } + return this.sigv4Signer.presign(originalRequest, options); + } + async presignWithCredentials(originalRequest, credentials, options = {}) { + if (options.signingRegion === "*") { + throw new Error("Method presignWithCredentials is not supported for [signingRegion=*]."); + } + return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options); + } + getSigv4aSigner() { + if (!this.sigv4aSigner) { + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + const JsSigV4aSigner = signatureV4aContainer.SignatureV4a; + if (this.signerOptions.runtime === "node") { + if (!CrtSignerV4 && !JsSigV4aSigner) { + throw new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"); + } + if (CrtSignerV4 && typeof CrtSignerV4 === "function") { + this.sigv4aSigner = new CrtSignerV4({ + ...this.signerOptions, + signingAlgorithm: 1 + }); + } else if (JsSigV4aSigner && typeof JsSigV4aSigner === "function") { + this.sigv4aSigner = new JsSigV4aSigner({ + ...this.signerOptions + }); + } else { + throw new Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"); + } + } else { + if (!JsSigV4aSigner || typeof JsSigV4aSigner !== "function") { + throw new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a"); + } + this.sigv4aSigner = new JsSigV4aSigner({ + ...this.signerOptions + }); + } + } + return this.sigv4aSigner; + } + }; + __name(SignatureV4MultiRegion, "SignatureV4MultiRegion"); + } +}); + +// ../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/index.js +var init_dist_es43 = __esm({ + "../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_SignatureV4MultiRegion(); + init_signature_v4_crt_container(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/ruleset.js +var cs, ct, cu, cv, cw, cx, cy, cz, cA, cB, cC, cD, cE, cF, cG, cH, cI, 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, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV, bW, bX, bY, bZ, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, cr, _data, ruleSet; +var init_ruleset = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/ruleset.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + cs = "required"; + ct = "type"; + cu = "rules"; + cv = "conditions"; + cw = "fn"; + cx = "argv"; + cy = "ref"; + cz = "assign"; + cA = "url"; + cB = "properties"; + cC = "backend"; + cD = "authSchemes"; + cE = "disableDoubleEncoding"; + cF = "signingName"; + cG = "signingRegion"; + cH = "headers"; + cI = "signingRegionSet"; + a = 6; + b = false; + c = true; + d = "isSet"; + e = "booleanEquals"; + f = "error"; + g = "aws.partition"; + h = "stringEquals"; + i = "getAttr"; + j = "name"; + k = "substring"; + l = "bucketSuffix"; + m = "parseURL"; + n = "endpoint"; + o = "tree"; + p = "aws.isVirtualHostableS3Bucket"; + q = "{url#scheme}://{Bucket}.{url#authority}{url#path}"; + r = "not"; + s = "accessPointSuffix"; + t = "{url#scheme}://{url#authority}{url#path}"; + u = "hardwareType"; + v = "regionPrefix"; + w = "bucketAliasSuffix"; + x = "outpostId"; + y = "isValidHostLabel"; + z = "sigv4a"; + A = "s3-outposts"; + B = "s3"; + C = "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}"; + D = "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}"; + E = "https://{Bucket}.s3.{partitionResult#dnsSuffix}"; + F = "aws.parseArn"; + G = "bucketArn"; + H = "arnType"; + I = ""; + J = "s3-object-lambda"; + K = "accesspoint"; + L = "accessPointName"; + M = "{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}"; + N = "mrapPartition"; + O = "outpostType"; + P = "arnPrefix"; + Q = "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}"; + R = "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}"; + S = "https://s3.{partitionResult#dnsSuffix}"; + T = { [cs]: false, [ct]: "string" }; + U = { [cs]: true, "default": false, [ct]: "boolean" }; + V = { [cs]: false, [ct]: "boolean" }; + W = { [cw]: e, [cx]: [{ [cy]: "Accelerate" }, true] }; + X = { [cw]: e, [cx]: [{ [cy]: "UseFIPS" }, true] }; + Y = { [cw]: e, [cx]: [{ [cy]: "UseDualStack" }, true] }; + Z = { [cw]: d, [cx]: [{ [cy]: "Endpoint" }] }; + aa = { [cw]: g, [cx]: [{ [cy]: "Region" }], [cz]: "partitionResult" }; + ab = { [cw]: h, [cx]: [{ [cw]: i, [cx]: [{ [cy]: "partitionResult" }, j] }, "aws-cn"] }; + ac = { [cw]: d, [cx]: [{ [cy]: "Bucket" }] }; + ad = { [cy]: "Bucket" }; + ae = { [cv]: [W], [f]: "S3Express does not support S3 Accelerate.", [ct]: f }; + af = { [cv]: [Z, { [cw]: m, [cx]: [{ [cy]: "Endpoint" }], [cz]: "url" }], [cu]: [{ [cv]: [{ [cw]: d, [cx]: [{ [cy]: "DisableS3ExpressSessionAuth" }] }, { [cw]: e, [cx]: [{ [cy]: "DisableS3ExpressSessionAuth" }, true] }], [cu]: [{ [cv]: [{ [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: "url" }, "isIp"] }, true] }], [cu]: [{ [cv]: [{ [cw]: "uriEncode", [cx]: [ad], [cz]: "uri_encoded_bucket" }], [cu]: [{ [n]: { [cA]: "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: p, [cx]: [ad, false] }], [cu]: [{ [n]: { [cA]: q, [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }], [ct]: o }, { [f]: "S3Express bucket name is not a valid virtual hostable name.", [ct]: f }], [ct]: o }, { [cv]: [{ [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: "url" }, "isIp"] }, true] }], [cu]: [{ [cv]: [{ [cw]: "uriEncode", [cx]: [ad], [cz]: "uri_encoded_bucket" }], [cu]: [{ [n]: { [cA]: "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: p, [cx]: [ad, false] }], [cu]: [{ [n]: { [cA]: q, [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }], [ct]: o }, { [f]: "S3Express bucket name is not a valid virtual hostable name.", [ct]: f }], [ct]: o }; + ag = { [cw]: m, [cx]: [{ [cy]: "Endpoint" }], [cz]: "url" }; + ah = { [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: "url" }, "isIp"] }, true] }; + ai = { [cy]: "url" }; + aj = { [cw]: "uriEncode", [cx]: [ad], [cz]: "uri_encoded_bucket" }; + ak = { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: "s3express", [cG]: "{Region}" }] }; + al = {}; + am = { [cw]: p, [cx]: [ad, false] }; + an = { [f]: "S3Express bucket name is not a valid virtual hostable name.", [ct]: f }; + ao = { [cw]: d, [cx]: [{ [cy]: "UseS3ExpressControlEndpoint" }] }; + ap = { [cw]: e, [cx]: [{ [cy]: "UseS3ExpressControlEndpoint" }, true] }; + aq = { [cw]: r, [cx]: [Z] }; + ar = { [cw]: e, [cx]: [{ [cy]: "UseDualStack" }, false] }; + as = { [cw]: e, [cx]: [{ [cy]: "UseFIPS" }, false] }; + at = { [f]: "Unrecognized S3Express bucket name format.", [ct]: f }; + au = { [cw]: r, [cx]: [ac] }; + av = { [cy]: u }; + aw = { [cv]: [aq], [f]: "Expected a endpoint to be specified but no endpoint was found", [ct]: f }; + ax = { [cD]: [{ [cE]: true, [j]: z, [cF]: A, [cI]: ["*"] }, { [cE]: true, [j]: "sigv4", [cF]: A, [cG]: "{Region}" }] }; + ay = { [cw]: e, [cx]: [{ [cy]: "ForcePathStyle" }, false] }; + az = { [cy]: "ForcePathStyle" }; + aA = { [cw]: e, [cx]: [{ [cy]: "Accelerate" }, false] }; + aB = { [cw]: h, [cx]: [{ [cy]: "Region" }, "aws-global"] }; + aC = { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: B, [cG]: "us-east-1" }] }; + aD = { [cw]: r, [cx]: [aB] }; + aE = { [cw]: e, [cx]: [{ [cy]: "UseGlobalEndpoint" }, true] }; + aF = { [cA]: "https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: B, [cG]: "{Region}" }] }, [cH]: {} }; + aG = { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: B, [cG]: "{Region}" }] }; + aH = { [cw]: e, [cx]: [{ [cy]: "UseGlobalEndpoint" }, false] }; + aI = { [cA]: "https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + aJ = { [cA]: "https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + aK = { [cA]: "https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + aL = { [cw]: e, [cx]: [{ [cw]: i, [cx]: [ai, "isIp"] }, false] }; + aM = { [cA]: C, [cB]: aG, [cH]: {} }; + aN = { [cA]: q, [cB]: aG, [cH]: {} }; + aO = { [n]: aN, [ct]: n }; + aP = { [cA]: D, [cB]: aG, [cH]: {} }; + aQ = { [cA]: "https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + aR = { [f]: "Invalid region: region was not a valid DNS name.", [ct]: f }; + aS = { [cy]: G }; + aT = { [cy]: H }; + aU = { [cw]: i, [cx]: [aS, "service"] }; + aV = { [cy]: L }; + aW = { [cv]: [Y], [f]: "S3 Object Lambda does not support Dual-stack", [ct]: f }; + aX = { [cv]: [W], [f]: "S3 Object Lambda does not support S3 Accelerate", [ct]: f }; + aY = { [cv]: [{ [cw]: d, [cx]: [{ [cy]: "DisableAccessPoints" }] }, { [cw]: e, [cx]: [{ [cy]: "DisableAccessPoints" }, true] }], [f]: "Access points are not supported for this operation", [ct]: f }; + aZ = { [cv]: [{ [cw]: d, [cx]: [{ [cy]: "UseArnRegion" }] }, { [cw]: e, [cx]: [{ [cy]: "UseArnRegion" }, false] }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [aS, "region"] }, "{Region}"] }] }], [f]: "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`", [ct]: f }; + ba = { [cw]: i, [cx]: [{ [cy]: "bucketPartition" }, j] }; + bb = { [cw]: i, [cx]: [aS, "accountId"] }; + bc = { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: J, [cG]: "{bucketArn#region}" }] }; + bd = { [f]: "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`", [ct]: f }; + be = { [f]: "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`", [ct]: f }; + bf = { [f]: "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)", [ct]: f }; + bg = { [f]: "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`", [ct]: f }; + bh = { [f]: "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.", [ct]: f }; + bi = { [f]: "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided", [ct]: f }; + bj = { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: B, [cG]: "{bucketArn#region}" }] }; + bk = { [cD]: [{ [cE]: true, [j]: z, [cF]: A, [cI]: ["*"] }, { [cE]: true, [j]: "sigv4", [cF]: A, [cG]: "{bucketArn#region}" }] }; + bl = { [cw]: F, [cx]: [ad] }; + bm = { [cA]: "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aG, [cH]: {} }; + bn = { [cA]: "https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aG, [cH]: {} }; + bo = { [cA]: "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aG, [cH]: {} }; + bp = { [cA]: Q, [cB]: aG, [cH]: {} }; + bq = { [cA]: "https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aG, [cH]: {} }; + br = { [cy]: "UseObjectLambdaEndpoint" }; + bs = { [cD]: [{ [cE]: true, [j]: "sigv4", [cF]: J, [cG]: "{Region}" }] }; + bt = { [cA]: "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + bu = { [cA]: "https://s3-fips.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + bv = { [cA]: "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + bw = { [cA]: t, [cB]: aG, [cH]: {} }; + bx = { [cA]: "https://s3.{Region}.{partitionResult#dnsSuffix}", [cB]: aG, [cH]: {} }; + by = [{ [cy]: "Region" }]; + bz = [{ [cy]: "Endpoint" }]; + bA = [ad]; + bB = [W]; + bC = [Z, ag]; + bD = [{ [cw]: d, [cx]: [{ [cy]: "DisableS3ExpressSessionAuth" }] }, { [cw]: e, [cx]: [{ [cy]: "DisableS3ExpressSessionAuth" }, true] }]; + bE = [aj]; + bF = [am]; + bG = [aa]; + bH = [X, Y]; + bI = [X, ar]; + bJ = [as, Y]; + bK = [as, ar]; + bL = [{ [cw]: k, [cx]: [ad, 6, 14, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 14, 16, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bM = [{ [cv]: [X, Y], [n]: { [cA]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bI, [n]: { [cA]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bJ, [n]: { [cA]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bK, [n]: { [cA]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: {} }, [ct]: n }]; + bN = [{ [cw]: k, [cx]: [ad, 6, 15, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 15, 17, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bO = [{ [cw]: k, [cx]: [ad, 6, 19, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 19, 21, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bP = [{ [cw]: k, [cx]: [ad, 6, 20, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 20, 22, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bQ = [{ [cw]: k, [cx]: [ad, 6, 26, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 26, 28, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bR = [{ [cv]: [X, Y], [n]: { [cA]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }, { [cv]: bI, [n]: { [cA]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }, { [cv]: bJ, [n]: { [cA]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }, { [cv]: bK, [n]: { [cA]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cB]: { [cC]: "S3Express", [cD]: [{ [cE]: true, [j]: "sigv4-s3express", [cF]: "s3express", [cG]: "{Region}" }] }, [cH]: {} }, [ct]: n }]; + bS = [ad, 0, 7, true]; + bT = [{ [cw]: k, [cx]: [ad, 7, 15, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 15, 17, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bU = [{ [cw]: k, [cx]: [ad, 7, 16, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 16, 18, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bV = [{ [cw]: k, [cx]: [ad, 7, 20, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 20, 22, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bW = [{ [cw]: k, [cx]: [ad, 7, 21, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 21, 23, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bX = [{ [cw]: k, [cx]: [ad, 7, 27, true], [cz]: "s3expressAvailabilityZoneId" }, { [cw]: k, [cx]: [ad, 27, 29, true], [cz]: "s3expressAvailabilityZoneDelim" }, { [cw]: h, [cx]: [{ [cy]: "s3expressAvailabilityZoneDelim" }, "--"] }]; + bY = [ac]; + bZ = [{ [cw]: y, [cx]: [{ [cy]: x }, false] }]; + ca = [{ [cw]: h, [cx]: [{ [cy]: v }, "beta"] }]; + cb = ["*"]; + cc = [{ [cw]: y, [cx]: [{ [cy]: "Region" }, false] }]; + cd = [{ [cw]: h, [cx]: [{ [cy]: "Region" }, "us-east-1"] }]; + ce = [{ [cw]: h, [cx]: [aT, K] }]; + cf = [{ [cw]: i, [cx]: [aS, "resourceId[1]"], [cz]: L }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [aV, I] }] }]; + cg = [aS, "resourceId[1]"]; + ch = [Y]; + ci = [{ [cw]: r, [cx]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [aS, "region"] }, I] }] }]; + cj = [{ [cw]: r, [cx]: [{ [cw]: d, [cx]: [{ [cw]: i, [cx]: [aS, "resourceId[2]"] }] }] }]; + ck = [aS, "resourceId[2]"]; + cl = [{ [cw]: g, [cx]: [{ [cw]: i, [cx]: [aS, "region"] }], [cz]: "bucketPartition" }]; + cm = [{ [cw]: h, [cx]: [ba, { [cw]: i, [cx]: [{ [cy]: "partitionResult" }, j] }] }]; + cn = [{ [cw]: y, [cx]: [{ [cw]: i, [cx]: [aS, "region"] }, true] }]; + co = [{ [cw]: y, [cx]: [bb, false] }]; + cp = [{ [cw]: y, [cx]: [aV, false] }]; + cq = [X]; + cr = [{ [cw]: y, [cx]: [{ [cy]: "Region" }, true] }]; + _data = { version: "1.0", parameters: { Bucket: T, Region: T, UseFIPS: U, UseDualStack: U, Endpoint: T, ForcePathStyle: U, Accelerate: U, UseGlobalEndpoint: U, UseObjectLambdaEndpoint: V, Key: T, Prefix: T, CopySource: T, DisableAccessPoints: V, DisableMultiRegionAccessPoints: U, UseArnRegion: V, UseS3ExpressControlEndpoint: V, DisableS3ExpressSessionAuth: V }, [cu]: [{ [cv]: [{ [cw]: d, [cx]: by }], [cu]: [{ [cv]: [W, X], error: "Accelerate cannot be used with FIPS", [ct]: f }, { [cv]: [Y, Z], error: "Cannot set dual-stack in combination with a custom endpoint.", [ct]: f }, { [cv]: [Z, X], error: "A custom endpoint cannot be combined with FIPS", [ct]: f }, { [cv]: [Z, W], error: "A custom endpoint cannot be combined with S3 Accelerate", [ct]: f }, { [cv]: [X, aa, ab], error: "Partition does not support FIPS", [ct]: f }, { [cv]: [ac, { [cw]: k, [cx]: [ad, 0, a, c], [cz]: l }, { [cw]: h, [cx]: [{ [cy]: l }, "--x-s3"] }], [cu]: [ae, af, { [cv]: [ao, ap], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [aj, aq], [cu]: [{ [cv]: bH, endpoint: { [cA]: "https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: "https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: "https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: ak, [cH]: al }, [ct]: n }], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: bF, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bD, [cu]: [{ [cv]: bL, [cu]: bM, [ct]: o }, { [cv]: bN, [cu]: bM, [ct]: o }, { [cv]: bO, [cu]: bM, [ct]: o }, { [cv]: bP, [cu]: bM, [ct]: o }, { [cv]: bQ, [cu]: bM, [ct]: o }, at], [ct]: o }, { [cv]: bL, [cu]: bR, [ct]: o }, { [cv]: bN, [cu]: bR, [ct]: o }, { [cv]: bO, [cu]: bR, [ct]: o }, { [cv]: bP, [cu]: bR, [ct]: o }, { [cv]: bQ, [cu]: bR, [ct]: o }, at], [ct]: o }], [ct]: o }, an], [ct]: o }, { [cv]: [ac, { [cw]: k, [cx]: bS, [cz]: s }, { [cw]: h, [cx]: [{ [cy]: s }, "--xa-s3"] }], [cu]: [ae, af, { [cv]: bF, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bD, [cu]: [{ [cv]: bT, [cu]: bM, [ct]: o }, { [cv]: bU, [cu]: bM, [ct]: o }, { [cv]: bV, [cu]: bM, [ct]: o }, { [cv]: bW, [cu]: bM, [ct]: o }, { [cv]: bX, [cu]: bM, [ct]: o }, at], [ct]: o }, { [cv]: bT, [cu]: bR, [ct]: o }, { [cv]: bU, [cu]: bR, [ct]: o }, { [cv]: bV, [cu]: bR, [ct]: o }, { [cv]: bW, [cu]: bR, [ct]: o }, { [cv]: bX, [cu]: bR, [ct]: o }, at], [ct]: o }], [ct]: o }, an], [ct]: o }, { [cv]: [au, ao, ap], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bC, endpoint: { [cA]: t, [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bH, endpoint: { [cA]: "https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: "https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: "https://s3express-control.{Region}.{partitionResult#dnsSuffix}", [cB]: ak, [cH]: al }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [ac, { [cw]: k, [cx]: [ad, 49, 50, c], [cz]: u }, { [cw]: k, [cx]: [ad, 8, 12, c], [cz]: v }, { [cw]: k, [cx]: bS, [cz]: w }, { [cw]: k, [cx]: [ad, 32, 49, c], [cz]: x }, { [cw]: g, [cx]: by, [cz]: "regionPartition" }, { [cw]: h, [cx]: [{ [cy]: w }, "--op-s3"] }], [cu]: [{ [cv]: bZ, [cu]: [{ [cv]: bF, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [av, "e"] }], [cu]: [{ [cv]: ca, [cu]: [aw, { [cv]: bC, endpoint: { [cA]: "https://{Bucket}.ec2.{url#authority}", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { endpoint: { [cA]: "https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { [cv]: [{ [cw]: h, [cx]: [av, "o"] }], [cu]: [{ [cv]: ca, [cu]: [aw, { [cv]: bC, endpoint: { [cA]: "https://{Bucket}.op-{outpostId}.{url#authority}", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { endpoint: { [cA]: "https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { error: 'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"', [ct]: f }], [ct]: o }, { error: "Invalid Outposts Bucket alias - it must be a valid bucket name.", [ct]: f }], [ct]: o }, { error: "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.", [ct]: f }], [ct]: o }, { [cv]: bY, [cu]: [{ [cv]: [Z, { [cw]: r, [cx]: [{ [cw]: d, [cx]: [{ [cw]: m, [cx]: bz }] }] }], error: "Custom endpoint `{Endpoint}` was not a valid URI", [ct]: f }, { [cv]: [ay, am], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cc, [cu]: [{ [cv]: [W, ab], error: "S3 Accelerate cannot be used in this region", [ct]: f }, { [cv]: [Y, X, aA, aq, aB], endpoint: { [cA]: "https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, X, aA, aq, aD, aE], [cu]: [{ endpoint: aF, [ct]: n }], [ct]: o }, { [cv]: [Y, X, aA, aq, aD, aH], endpoint: aF, [ct]: n }, { [cv]: [ar, X, aA, aq, aB], endpoint: { [cA]: "https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, X, aA, aq, aD, aE], [cu]: [{ endpoint: aI, [ct]: n }], [ct]: o }, { [cv]: [ar, X, aA, aq, aD, aH], endpoint: aI, [ct]: n }, { [cv]: [Y, as, W, aq, aB], endpoint: { [cA]: "https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, as, W, aq, aD, aE], [cu]: [{ endpoint: aJ, [ct]: n }], [ct]: o }, { [cv]: [Y, as, W, aq, aD, aH], endpoint: aJ, [ct]: n }, { [cv]: [Y, as, aA, aq, aB], endpoint: { [cA]: "https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, as, aA, aq, aD, aE], [cu]: [{ endpoint: aK, [ct]: n }], [ct]: o }, { [cv]: [Y, as, aA, aq, aD, aH], endpoint: aK, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, ah, aB], endpoint: { [cA]: C, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, aL, aB], endpoint: { [cA]: q, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, ah, aD, aE], [cu]: [{ [cv]: cd, endpoint: aM, [ct]: n }, { endpoint: aM, [ct]: n }], [ct]: o }, { [cv]: [ar, as, aA, Z, ag, aL, aD, aE], [cu]: [{ [cv]: cd, endpoint: aN, [ct]: n }, aO], [ct]: o }, { [cv]: [ar, as, aA, Z, ag, ah, aD, aH], endpoint: aM, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, aL, aD, aH], endpoint: aN, [ct]: n }, { [cv]: [ar, as, W, aq, aB], endpoint: { [cA]: D, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, W, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: aP, [ct]: n }, { endpoint: aP, [ct]: n }], [ct]: o }, { [cv]: [ar, as, W, aq, aD, aH], endpoint: aP, [ct]: n }, { [cv]: [ar, as, aA, aq, aB], endpoint: { [cA]: E, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: E, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: aQ, [ct]: n }], [ct]: o }, { [cv]: [ar, as, aA, aq, aD, aH], endpoint: aQ, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [Z, ag, { [cw]: h, [cx]: [{ [cw]: i, [cx]: [ai, "scheme"] }, "http"] }, { [cw]: p, [cx]: [ad, c] }, ay, as, ar, aA], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cc, [cu]: [aO], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [ay, { [cw]: F, [cx]: bA, [cz]: G }], [cu]: [{ [cv]: [{ [cw]: i, [cx]: [aS, "resourceId[0]"], [cz]: H }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [aT, I] }] }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [aU, J] }], [cu]: [{ [cv]: ce, [cu]: [{ [cv]: cf, [cu]: [aW, aX, { [cv]: ci, [cu]: [aY, { [cv]: cj, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cm, [cu]: [{ [cv]: cn, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [bb, I] }], error: "Invalid ARN: Missing account id", [ct]: f }, { [cv]: co, [cu]: [{ [cv]: cp, [cu]: [{ [cv]: bC, endpoint: { [cA]: M, [cB]: bc, [cH]: al }, [ct]: n }, { [cv]: cq, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bc, [cH]: al }, [ct]: n }, { endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bc, [cH]: al }, [ct]: n }], [ct]: o }, bd], [ct]: o }, be], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, bh], [ct]: o }, { error: "Invalid ARN: bucket ARN is missing a region", [ct]: f }], [ct]: o }, bi], [ct]: o }, { error: "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`", [ct]: f }], [ct]: o }, { [cv]: ce, [cu]: [{ [cv]: cf, [cu]: [{ [cv]: ci, [cu]: [{ [cv]: ce, [cu]: [{ [cv]: ci, [cu]: [aY, { [cv]: cj, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [ba, "{partitionResult#name}"] }], [cu]: [{ [cv]: cn, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [aU, B] }], [cu]: [{ [cv]: co, [cu]: [{ [cv]: cp, [cu]: [{ [cv]: bB, error: "Access Points do not support S3 Accelerate", [ct]: f }, { [cv]: bH, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: [as, ar, Z, ag], endpoint: { [cA]: M, [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bj, [cH]: al }, [ct]: n }], [ct]: o }, bd], [ct]: o }, be], [ct]: o }, { error: "Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}", [ct]: f }], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, bh], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: y, [cx]: [aV, c] }], [cu]: [{ [cv]: ch, error: "S3 MRAP does not support dual-stack", [ct]: f }, { [cv]: cq, error: "S3 MRAP does not support FIPS", [ct]: f }, { [cv]: bB, error: "S3 MRAP does not support S3 Accelerate", [ct]: f }, { [cv]: [{ [cw]: e, [cx]: [{ [cy]: "DisableMultiRegionAccessPoints" }, c] }], error: "Invalid configuration: Multi-Region Access Point ARNs are disabled.", [ct]: f }, { [cv]: [{ [cw]: g, [cx]: by, [cz]: N }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [{ [cy]: N }, j] }, { [cw]: i, [cx]: [aS, "partition"] }] }], [cu]: [{ endpoint: { [cA]: "https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}", [cB]: { [cD]: [{ [cE]: c, name: z, [cF]: B, [cI]: cb }] }, [cH]: al }, [ct]: n }], [ct]: o }, { error: "Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`", [ct]: f }], [ct]: o }], [ct]: o }, { error: "Invalid Access Point Name", [ct]: f }], [ct]: o }, bi], [ct]: o }, { [cv]: [{ [cw]: h, [cx]: [aU, A] }], [cu]: [{ [cv]: ch, error: "S3 Outposts does not support Dual-stack", [ct]: f }, { [cv]: cq, error: "S3 Outposts does not support FIPS", [ct]: f }, { [cv]: bB, error: "S3 Outposts does not support S3 Accelerate", [ct]: f }, { [cv]: [{ [cw]: d, [cx]: [{ [cw]: i, [cx]: [aS, "resourceId[4]"] }] }], error: "Invalid Arn: Outpost Access Point ARN contains sub resources", [ct]: f }, { [cv]: [{ [cw]: i, [cx]: cg, [cz]: x }], [cu]: [{ [cv]: bZ, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cm, [cu]: [{ [cv]: cn, [cu]: [{ [cv]: co, [cu]: [{ [cv]: [{ [cw]: i, [cx]: ck, [cz]: O }], [cu]: [{ [cv]: [{ [cw]: i, [cx]: [aS, "resourceId[3]"], [cz]: L }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [{ [cy]: O }, K] }], [cu]: [{ [cv]: bC, endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}", [cB]: bk, [cH]: al }, [ct]: n }, { endpoint: { [cA]: "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cB]: bk, [cH]: al }, [ct]: n }], [ct]: o }, { error: "Expected an outpost type `accesspoint`, found {outpostType}", [ct]: f }], [ct]: o }, { error: "Invalid ARN: expected an access point name", [ct]: f }], [ct]: o }, { error: "Invalid ARN: Expected a 4-component resource", [ct]: f }], [ct]: o }, be], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, { error: "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`", [ct]: f }], [ct]: o }, { error: "Invalid ARN: The Outpost Id was not set", [ct]: f }], [ct]: o }, { error: "Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})", [ct]: f }], [ct]: o }, { error: "Invalid ARN: No ARN type specified", [ct]: f }], [ct]: o }, { [cv]: [{ [cw]: k, [cx]: [ad, 0, 4, b], [cz]: P }, { [cw]: h, [cx]: [{ [cy]: P }, "arn:"] }, { [cw]: r, [cx]: [{ [cw]: d, [cx]: [bl] }] }], error: "Invalid ARN: `{Bucket}` was not a valid ARN", [ct]: f }, { [cv]: [{ [cw]: e, [cx]: [az, c] }, bl], error: "Path-style addressing cannot be used with ARN buckets", [ct]: f }, { [cv]: bE, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [aA], [cu]: [{ [cv]: [Y, aq, X, aB], endpoint: { [cA]: "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, aq, X, aD, aE], [cu]: [{ endpoint: bm, [ct]: n }], [ct]: o }, { [cv]: [Y, aq, X, aD, aH], endpoint: bm, [ct]: n }, { [cv]: [ar, aq, X, aB], endpoint: { [cA]: "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, aq, X, aD, aE], [cu]: [{ endpoint: bn, [ct]: n }], [ct]: o }, { [cv]: [ar, aq, X, aD, aH], endpoint: bn, [ct]: n }, { [cv]: [Y, aq, as, aB], endpoint: { [cA]: "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, aq, as, aD, aE], [cu]: [{ endpoint: bo, [ct]: n }], [ct]: o }, { [cv]: [Y, aq, as, aD, aH], endpoint: bo, [ct]: n }, { [cv]: [ar, Z, ag, as, aB], endpoint: { [cA]: Q, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, Z, ag, as, aD, aE], [cu]: [{ [cv]: cd, endpoint: bp, [ct]: n }, { endpoint: bp, [ct]: n }], [ct]: o }, { [cv]: [ar, Z, ag, as, aD, aH], endpoint: bp, [ct]: n }, { [cv]: [ar, aq, as, aB], endpoint: { [cA]: R, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, aq, as, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: R, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: bq, [ct]: n }], [ct]: o }, { [cv]: [ar, aq, as, aD, aH], endpoint: bq, [ct]: n }], [ct]: o }, { error: "Path-style addressing cannot be used with S3 Accelerate", [ct]: f }], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: d, [cx]: [br] }, { [cw]: e, [cx]: [br, c] }], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cr, [cu]: [aW, aX, { [cv]: bC, endpoint: { [cA]: t, [cB]: bs, [cH]: al }, [ct]: n }, { [cv]: cq, endpoint: { [cA]: "https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}", [cB]: bs, [cH]: al }, [ct]: n }, { endpoint: { [cA]: "https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}", [cB]: bs, [cH]: al }, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [au], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cr, [cu]: [{ [cv]: [X, Y, aq, aB], endpoint: { [cA]: "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [X, Y, aq, aD, aE], [cu]: [{ endpoint: bt, [ct]: n }], [ct]: o }, { [cv]: [X, Y, aq, aD, aH], endpoint: bt, [ct]: n }, { [cv]: [X, ar, aq, aB], endpoint: { [cA]: "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [X, ar, aq, aD, aE], [cu]: [{ endpoint: bu, [ct]: n }], [ct]: o }, { [cv]: [X, ar, aq, aD, aH], endpoint: bu, [ct]: n }, { [cv]: [as, Y, aq, aB], endpoint: { [cA]: "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, Y, aq, aD, aE], [cu]: [{ endpoint: bv, [ct]: n }], [ct]: o }, { [cv]: [as, Y, aq, aD, aH], endpoint: bv, [ct]: n }, { [cv]: [as, ar, Z, ag, aB], endpoint: { [cA]: t, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, ar, Z, ag, aD, aE], [cu]: [{ [cv]: cd, endpoint: bw, [ct]: n }, { endpoint: bw, [ct]: n }], [ct]: o }, { [cv]: [as, ar, Z, ag, aD, aH], endpoint: bw, [ct]: n }, { [cv]: [as, ar, aq, aB], endpoint: { [cA]: S, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, ar, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: S, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: bx, [ct]: n }], [ct]: o }, { [cv]: [as, ar, aq, aD, aH], endpoint: bx, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }], [ct]: o }, { error: "A region must be set when sending requests to S3.", [ct]: f }] }; + ruleSet = _data; + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/endpointResolver.js +var cache2, defaultEndpointResolver; +var init_endpointResolver = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/endpointResolver.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es33(); + init_dist_es32(); + init_ruleset(); + cache2 = new EndpointCache({ + size: 50, + params: [ + "Accelerate", + "Bucket", + "DisableAccessPoints", + "DisableMultiRegionAccessPoints", + "DisableS3ExpressSessionAuth", + "Endpoint", + "ForcePathStyle", + "Region", + "UseArnRegion", + "UseDualStack", + "UseFIPS", + "UseGlobalEndpoint", + "UseObjectLambdaEndpoint", + "UseS3ExpressControlEndpoint" + ] + }); + defaultEndpointResolver = /* @__PURE__ */ __name((endpointParams, context2 = {}) => { + return cache2.get(endpointParams, () => resolveEndpoint(ruleSet, { + endpointParams, + logger: context2.logger + })); + }, "defaultEndpointResolver"); + customEndpointFunctions.aws = awsEndpointFunctions; + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthSchemeProvider.js +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "s3", + region: authParameters.region + }, + propertiesExtractor: (config3, context2) => ({ + signingProperties: { + config: config3, + context: context2 + } + }) + }; +} +function createAwsAuthSigv4aHttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4a", + signingProperties: { + name: "s3", + region: authParameters.region + }, + propertiesExtractor: (config3, context2) => ({ + signingProperties: { + config: config3, + context: context2 + } + }) + }; +} +var createEndpointRuleSetHttpAuthSchemeParametersProvider, _defaultS3HttpAuthSchemeParametersProvider, defaultS3HttpAuthSchemeParametersProvider, createEndpointRuleSetHttpAuthSchemeProvider, _defaultS3HttpAuthSchemeProvider, defaultS3HttpAuthSchemeProvider, resolveHttpAuthSchemeConfig; +var init_httpAuthSchemeProvider = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthSchemeProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_dist_es43(); + init_dist_es41(); + init_dist_es4(); + init_endpointResolver(); + createEndpointRuleSetHttpAuthSchemeParametersProvider = /* @__PURE__ */ __name((defaultHttpAuthSchemeParametersProvider) => async (config3, context2, input) => { + if (!input) { + throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`"); + } + const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config3, context2, input); + const instructionsFn = getSmithyContext(context2)?.commandInstance?.constructor?.getEndpointParameterInstructions; + if (!instructionsFn) { + throw new Error(`getEndpointParameterInstructions() is not defined on '${context2.commandName}'`); + } + const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config3); + return Object.assign(defaultParameters, endpointParameters); + }, "createEndpointRuleSetHttpAuthSchemeParametersProvider"); + _defaultS3HttpAuthSchemeParametersProvider = /* @__PURE__ */ __name(async (config3, context2, input) => { + return { + operation: getSmithyContext(context2).operation, + region: await normalizeProvider(config3.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }, "_defaultS3HttpAuthSchemeParametersProvider"); + defaultS3HttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultS3HttpAuthSchemeParametersProvider); + __name(createAwsAuthSigv4HttpAuthOption, "createAwsAuthSigv4HttpAuthOption"); + __name(createAwsAuthSigv4aHttpAuthOption, "createAwsAuthSigv4aHttpAuthOption"); + createEndpointRuleSetHttpAuthSchemeProvider = /* @__PURE__ */ __name((defaultEndpointResolver2, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => { + const endpointRuleSetHttpAuthSchemeProvider = /* @__PURE__ */ __name((authParameters) => { + const endpoint = defaultEndpointResolver2(authParameters); + const authSchemes = endpoint.properties?.authSchemes; + if (!authSchemes) { + return defaultHttpAuthSchemeResolver(authParameters); + } + const options = []; + for (const scheme of authSchemes) { + const { name: resolvedName, properties = {}, ...rest } = scheme; + const name = resolvedName.toLowerCase(); + if (resolvedName !== name) { + console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`); + } + let schemeId; + if (name === "sigv4a") { + schemeId = "aws.auth#sigv4a"; + const sigv4Present = authSchemes.find((s2) => { + const name2 = s2.name.toLowerCase(); + return name2 !== "sigv4a" && name2.startsWith("sigv4"); + }); + if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) { + continue; + } + } else if (name.startsWith("sigv4")) { + schemeId = "aws.auth#sigv4"; + } else { + throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`); + } + const createOption = createHttpAuthOptionFunctions[schemeId]; + if (!createOption) { + throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`); + } + const option = createOption(authParameters); + option.schemeId = schemeId; + option.signingProperties = { ...option.signingProperties || {}, ...rest, ...properties }; + options.push(option); + } + return options; + }, "endpointRuleSetHttpAuthSchemeProvider"); + return endpointRuleSetHttpAuthSchemeProvider; + }, "createEndpointRuleSetHttpAuthSchemeProvider"); + _defaultS3HttpAuthSchemeProvider = /* @__PURE__ */ __name((authParameters) => { + const options = []; + switch (authParameters.operation) { + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + options.push(createAwsAuthSigv4aHttpAuthOption(authParameters)); + } + } + return options; + }, "_defaultS3HttpAuthSchemeProvider"); + defaultS3HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultS3HttpAuthSchemeProvider, { + "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption, + "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption + }); + resolveHttpAuthSchemeConfig = /* @__PURE__ */ __name((config3) => { + const config_0 = resolveAwsSdkSigV4Config(config3); + const config_1 = resolveAwsSdkSigV4AConfig(config_0); + return Object.assign(config_1, { + authSchemePreference: normalizeProvider(config3.authSchemePreference ?? []) + }); + }, "resolveHttpAuthSchemeConfig"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js +var resolveClientEndpointParameters, commonParams; +var init_EndpointParameters = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { + return Object.assign(options, { + useFipsEndpoint: options.useFipsEndpoint ?? false, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + forcePathStyle: options.forcePathStyle ?? false, + useAccelerateEndpoint: options.useAccelerateEndpoint ?? false, + useGlobalEndpoint: options.useGlobalEndpoint ?? false, + disableMultiregionAccessPoints: options.disableMultiregionAccessPoints ?? false, + defaultSigningName: "s3", + clientContextParams: options.clientContextParams ?? {} + }); + }, "resolveClientEndpointParameters"); + commonParams = { + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js +var S3ServiceException; +var init_S3ServiceException = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es21(); + S3ServiceException = class extends ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, S3ServiceException.prototype); + } + }; + __name(S3ServiceException, "S3ServiceException"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/errors.js +var NoSuchUpload, AccessDenied, ObjectNotInActiveTierError, BucketAlreadyExists, BucketAlreadyOwnedByYou, NoSuchBucket, InvalidObjectState, NoSuchKey, NotFound, EncryptionTypeMismatch, InvalidRequest, InvalidWriteOffset, TooManyParts, IdempotencyParameterMismatch, ObjectAlreadyInActiveTierError; +var init_errors3 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/models/errors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_S3ServiceException(); + NoSuchUpload = class extends S3ServiceException { + name = "NoSuchUpload"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoSuchUpload", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NoSuchUpload.prototype); + } + }; + __name(NoSuchUpload, "NoSuchUpload"); + AccessDenied = class extends S3ServiceException { + name = "AccessDenied"; + $fault = "client"; + constructor(opts) { + super({ + name: "AccessDenied", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, AccessDenied.prototype); + } + }; + __name(AccessDenied, "AccessDenied"); + ObjectNotInActiveTierError = class extends S3ServiceException { + name = "ObjectNotInActiveTierError"; + $fault = "client"; + constructor(opts) { + super({ + name: "ObjectNotInActiveTierError", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ObjectNotInActiveTierError.prototype); + } + }; + __name(ObjectNotInActiveTierError, "ObjectNotInActiveTierError"); + BucketAlreadyExists = class extends S3ServiceException { + name = "BucketAlreadyExists"; + $fault = "client"; + constructor(opts) { + super({ + name: "BucketAlreadyExists", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, BucketAlreadyExists.prototype); + } + }; + __name(BucketAlreadyExists, "BucketAlreadyExists"); + BucketAlreadyOwnedByYou = class extends S3ServiceException { + name = "BucketAlreadyOwnedByYou"; + $fault = "client"; + constructor(opts) { + super({ + name: "BucketAlreadyOwnedByYou", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, BucketAlreadyOwnedByYou.prototype); + } + }; + __name(BucketAlreadyOwnedByYou, "BucketAlreadyOwnedByYou"); + NoSuchBucket = class extends S3ServiceException { + name = "NoSuchBucket"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoSuchBucket", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NoSuchBucket.prototype); + } + }; + __name(NoSuchBucket, "NoSuchBucket"); + InvalidObjectState = class extends S3ServiceException { + name = "InvalidObjectState"; + $fault = "client"; + StorageClass; + AccessTier; + constructor(opts) { + super({ + name: "InvalidObjectState", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidObjectState.prototype); + this.StorageClass = opts.StorageClass; + this.AccessTier = opts.AccessTier; + } + }; + __name(InvalidObjectState, "InvalidObjectState"); + NoSuchKey = class extends S3ServiceException { + name = "NoSuchKey"; + $fault = "client"; + constructor(opts) { + super({ + name: "NoSuchKey", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NoSuchKey.prototype); + } + }; + __name(NoSuchKey, "NoSuchKey"); + NotFound = class extends S3ServiceException { + name = "NotFound"; + $fault = "client"; + constructor(opts) { + super({ + name: "NotFound", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, NotFound.prototype); + } + }; + __name(NotFound, "NotFound"); + EncryptionTypeMismatch = class extends S3ServiceException { + name = "EncryptionTypeMismatch"; + $fault = "client"; + constructor(opts) { + super({ + name: "EncryptionTypeMismatch", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, EncryptionTypeMismatch.prototype); + } + }; + __name(EncryptionTypeMismatch, "EncryptionTypeMismatch"); + InvalidRequest = class extends S3ServiceException { + name = "InvalidRequest"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidRequest", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidRequest.prototype); + } + }; + __name(InvalidRequest, "InvalidRequest"); + InvalidWriteOffset = class extends S3ServiceException { + name = "InvalidWriteOffset"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidWriteOffset", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, InvalidWriteOffset.prototype); + } + }; + __name(InvalidWriteOffset, "InvalidWriteOffset"); + TooManyParts = class extends S3ServiceException { + name = "TooManyParts"; + $fault = "client"; + constructor(opts) { + super({ + name: "TooManyParts", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, TooManyParts.prototype); + } + }; + __name(TooManyParts, "TooManyParts"); + IdempotencyParameterMismatch = class extends S3ServiceException { + name = "IdempotencyParameterMismatch"; + $fault = "client"; + constructor(opts) { + super({ + name: "IdempotencyParameterMismatch", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, IdempotencyParameterMismatch.prototype); + } + }; + __name(IdempotencyParameterMismatch, "IdempotencyParameterMismatch"); + ObjectAlreadyInActiveTierError = class extends S3ServiceException { + name = "ObjectAlreadyInActiveTierError"; + $fault = "client"; + constructor(opts) { + super({ + name: "ObjectAlreadyInActiveTierError", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, ObjectAlreadyInActiveTierError.prototype); + } + }; + __name(ObjectAlreadyInActiveTierError, "ObjectAlreadyInActiveTierError"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js +var _A, _AAO, _AC, _ACL, _ACL_, _ACLn, _ACP, _ACT, _ACn, _AD, _ADb, _AED, _AF, _AH, _AHl, _AI, _AIMU, _AKI, _AM, _AMU, _AMUO, _AMUR, _AMl, _AO, _AOl, _APA, _APAc, _AQRD, _AR, _ARI, _AS, _ASBD, _ASSEBD, _ASr, _AT, _An, _B, _BA, _BAE, _BAI, _BAOBY, _BET, _BGR, _BI, _BKE, _BLC, _BLN, _BLS, _BLT, _BN, _BNu, _BP, _BPA, _BPP, _BR, _BRy, _BS, _Bo, _Bu, _C, _CA, _CACL, _CB, _CBC, _CBMC, _CBMCR, _CBMTC, _CBMTCR, _CBO, _CBR, _CC, _CCRC, _CCRCC, _CCRCNVME, _CC_, _CD, _CD_, _CDo, _CE, _CE_, _CEo, _CF, _CFC, _CL, _CL_, _CL__, _CLo, _CM, _CMD, _CMU, _CMUO, _CMUOr, _CMUR, _CMURo, _CMURr, _CMUo, _CMUr, _CMh, _CO, _COO, _COR, _CORSC, _CORSR, _CORSRu, _CORo, _CP, _CPL, _CPLo, _CPR, _CPo, _CPom, _CR, _CRSBA, _CR_, _CS, _CSHA, _CSHAh, _CSIM, _CSIMS, _CSINM, _CSIUS, _CSO, _CSR, _CSRo, _CSRr, _CSSSECA, _CSSSECK, _CSSSECKMD, _CSV, _CSVI, _CSVIn, _CSVO, _CSo, _CSr, _CT, _CT_, _CTl, _CTo, _CTom, _CTon, _Co, _Cod, _Com, _Con, _Cont, _Cr, _D, _DAI, _DB, _DBAC, _DBACR, _DBC, _DBCR, _DBE, _DBER, _DBIC, _DBICR, _DBITC, _DBITCR, _DBL, _DBLR, _DBMC, _DBMCR, _DBMCRe, _DBMCe, _DBMTC, _DBMTCR, _DBOC, _DBOCR, _DBP, _DBPR, _DBR, _DBRR, _DBRe, _DBT, _DBTR, _DBW, _DBWR, _DE, _DIM, _DIMS, _DINM, _DIUS, _DM, _DME, _DMR, _DMVI, _DMe, _DN, _DO, _DOO, _DOOe, _DOR, _DORe, _DOT, _DOTO, _DOTR, _DOe, _DOel, _DOele, _DPAB, _DPABR, _DR, _DRe, _DRel, _DRes, _Da, _De, _Del, _Deli, _Des, _Desc, _Det, _E, _EA, _EBC, _EBO, _EC, _ECr, _ED, _EDr, _EE, _EH, _EHx, _EM, _EODM, _EOR, _ES, _ESBO, _ET, _ETL, _ETM, _ETa, _ETn, _ETv, _ETx, _En, _Ena, _End, _Er, _Err, _Ev, _Eve, _Ex, _Exp, _F, _FD, _FHI, _FO, _FR, _FRL, _FRi, _Fi, _Fo, _Fr, _G, _GBA, _GBAC, _GBACO, _GBACOe, _GBACR, _GBACRe, _GBACe, _GBAO, _GBAOe, _GBAR, _GBARe, _GBAe, _GBC, _GBCO, _GBCR, _GBE, _GBEO, _GBER, _GBIC, _GBICO, _GBICR, _GBITC, _GBITCO, _GBITCR, _GBL, _GBLC, _GBLCO, _GBLCR, _GBLO, _GBLOe, _GBLR, _GBLRe, _GBLe, _GBMC, _GBMCO, _GBMCOe, _GBMCR, _GBMCRe, _GBMCRet, _GBMCe, _GBMTC, _GBMTCO, _GBMTCR, _GBMTCRe, _GBNC, _GBNCR, _GBOC, _GBOCO, _GBOCR, _GBP, _GBPO, _GBPR, _GBPS, _GBPSO, _GBPSR, _GBR, _GBRO, _GBRP, _GBRPO, _GBRPR, _GBRR, _GBT, _GBTO, _GBTR, _GBV, _GBVO, _GBVR, _GBW, _GBWO, _GBWR, _GFC, _GJP, _GO, _GOA, _GOAO, _GOAOe, _GOAP, _GOAR, _GOARe, _GOARet, _GOAe, _GOLC, _GOLCO, _GOLCR, _GOLH, _GOLHO, _GOLHR, _GOO, _GOR, _GORO, _GORR, _GORe, _GOT, _GOTO, _GOTOe, _GOTR, _GOTRe, _GOTe, _GPAB, _GPABO, _GPABR, _GR, _GRACP, _GW, _GWACP, _Gr, _Gra, _HB, _HBO, _HBR, _HECRE, _HN, _HO, _HOO, _HOR, _HRC, _I, _IC, _ICL, _ID, _IDn, _IDnv, _IE, _IEn, _IF, _IL, _IM, _IMIT, _IMLMT, _IMS, _IMS_, _IMSf, _IMUR, _IM_, _INM, _INM_, _IOF, _IOS, _IOV, _IP, _IPA, _IPM, _IR, _IRIP, _IS, _ISBD, _ISn, _IT, _ITAO, _ITC, _ITCL, _ITCR, _ITCU, _ITCn, _ITF, _IUS, _IUS_, _IWO, _In, _Ini, _JSON, _JSONI, _JSONO, _JTC, _JTCR, _JTCU, _K, _KC, _KI, _KKA, _KM, _KMSC, _KMSKA, _KMSKI, _KMSMKID, _KPE, _L, _LAMBR, _LAMDBR, _LB, _LBAC, _LBACO, _LBACR, _LBACRi, _LBIC, _LBICO, _LBICR, _LBITC, _LBITCO, _LBITCR, _LBMC, _LBMCO, _LBMCR, _LBO, _LBR, _LBRi, _LC, _LCi, _LDB, _LDBO, _LDBR, _LE, _LEi, _LFA, _LFC, _LFCL, _LFCa, _LH, _LI, _LICR, _LM, _LMCR, _LMT, _LMU, _LMUO, _LMUR, _LMURi, _LM_, _LO, _LOO, _LOR, _LOV, _LOVO, _LOVOi, _LOVR, _LOVRi, _LOVi, _LP, _LPO, _LPR, _LPRi, _LR, _LRAO, _LRF, _LRi, _LVR, _M, _MAO, _MAS, _MB, _MC, _MCL, _MCR, _MCe, _MD, _MDB, _MDf, _ME, _MF, _MFA, _MFAD, _MK, _MM, _MOS, _MP, _MTC, _MTCR, _MTEC, _MU, _MUL, _MUa, _Ma, _Me, _Mes, _Mi, _Mo, _N, _NC, _NCF, _NCT, _ND, _NEKKAS, _NF, _NKM, _NM, _NNV, _NPNM, _NSB, _NSK, _NSU, _NUIM, _NVE, _NVIM, _NVT, _NVTL, _NVTo, _O, _OA, _OAIATE, _OC, _OCR, _OCRw, _OE, _OF, _OI, _OIL, _OL, _OLC, _OLE, _OLEFB, _OLLH, _OLLHS, _OLM, _OLR, _OLRUD, _OLRb, _OLb, _ONIATE, _OO, _OOA, _OP, _OPb, _OS, _OSGT, _OSLT, _OSV, _OSu, _OV, _OVL, _Ob, _Obj, _P, _PABC, _PBA, _PBAC, _PBACR, _PBACRu, _PBACu, _PBAR, _PBARu, _PBAu, _PBC, _PBCR, _PBE, _PBER, _PBIC, _PBICR, _PBITC, _PBITCR, _PBL, _PBLC, _PBLCO, _PBLCR, _PBLR, _PBMC, _PBMCR, _PBNC, _PBNCR, _PBOC, _PBOCR, _PBP, _PBPR, _PBR, _PBRP, _PBRPR, _PBRR, _PBT, _PBTR, _PBV, _PBVR, _PBW, _PBWR, _PC, _PDS, _PE, _PI, _PL, _PN, _PNM, _PO, _POA, _POAO, _POAR, _POLC, _POLCO, _POLCR, _POLH, _POLHO, _POLHR, _POO, _POR, _PORO, _PORR, _PORu, _POT, _POTO, _POTR, _PP, _PPAB, _PPABR, _PS, _Pa, _Par, _Parq, _Pay, _Payl, _Pe, _Po, _Pr, _Pri, _Pro, _Q, _QA, _QC, _QCL, _QCu, _QCue, _QEC, _QF, _Qu, _R, _RART, _RC, _RCC, _RCD, _RCE, _RCL, _RCT, _RCe, _RD, _RE, _RED, _REe, _REec, _RKKID, _RKPW, _RKW, _RM, _RO, _ROO, _ROOe, _ROP, _ROR, _RORe, _ROe, _RP, _RPB, _RPC, _RPe, _RR, _RRAO, _RRF, _RRe, _RRep, _RReq, _RRes, _RRo, _RS, _RSe, _RSen, _RT, _RTV, _RTe, _RUD, _Ra, _Re, _Rec, _Red, _Ret, _Ro, _Ru, _S, _SA, _SAK, _SAs, _SB, _SBD, _SC, _SCA, _SCADE, _SCV, _SCe, _SCt, _SDV, _SE, _SIM, _SIMS, _SINM, _SIUS, _SK, _SKEO, _SKF, _SKe, _SL, _SM, _SOC, _SOCES, _SOCO, _SOCR, _SP, _SPi, _SR, _SS, _SSC, _SSE, _SSEA, _SSEBD, _SSEC, _SSECA, _SSECK, _SSECKMD, _SSEKMS, _SSEKMSE, _SSEKMSEC, _SSEKMSKI, _SSER, _SSERe, _SSES, _ST, _STD, _STDR, _S_, _Sc, _Si, _St, _Sta, _Su, _T, _TA, _TAo, _TB, _TBA, _TBT, _TC, _TCL, _TCo, _TCop, _TD, _TDMOS, _TG, _TGa, _TL, _TLr, _TMP, _TN, _TNa, _TOKF, _TP, _TPC, _TS, _TSa, _Ta, _Tag, _Ti, _Tie, _Tier, _Tim, _To, _Top, _Tr, _Tra, _Ty, _U, _UBMITC, _UBMITCR, _UBMJTC, _UBMJTCR, _UI, _UIM, _UM, _UOE, _UOER, _UOERp, _UP, _UPC, _UPCO, _UPCR, _UPO, _UPR, _URI, _Up, _V, _VC, _VI, _VIM, _Ve, _Ver, _WC, _WGOR, _WGORR, _WOB, _WRL, _Y, _ar, _br, _c, _ct, _d, _e, _eP, _en, _et, _fo, _h, _hC, _hE, _hH, _hL, _hP, _hPH, _hQ, _hi, _i, _iT, _km, _m, _mb, _mdb, _mk, _mp, _mu, _p, _pN, _pnm, _rcc, _rcd, _rce, _rcl, _rct, _re, _s, _sa, _st, _uI, _uim, _vI, _vim, _x, _xA, _xF, _xN, _xNm, _xaa, _xaad, _xaapa, _xaari, _xaas, _xaba, _xabgr, _xabln, _xablt, _xabn, _xabole, _xabolt, _xabr, _xaca, _xacc, _xacc_, _xacc__, _xacm, _xacrsba, _xacs, _xacs_, _xacs__, _xacsim, _xacsims, _xacsinm, _xacsius, _xacsm, _xacsr, _xacssseca, _xacssseck, _xacssseckM, _xacsvi, _xact, _xact_, _xadm, _xae, _xaebo, _xafec, _xafem, _xafhCC, _xafhCD, _xafhCE, _xafhCL, _xafhCR, _xafhCT, _xafhE, _xafhE_, _xafhLM, _xafhar, _xafhxacc, _xafhxacc_, _xafhxacc__, _xafhxacs, _xafhxacs_, _xafhxadm, _xafhxae, _xafhxamm, _xafhxampc, _xafhxaollh, _xafhxaolm, _xafhxaolrud, _xafhxar, _xafhxarc, _xafhxars, _xafhxasc, _xafhxasse, _xafhxasseakki, _xafhxassebke, _xafhxasseca, _xafhxasseckM, _xafhxatc, _xafhxavi, _xafs, _xagfc, _xagr, _xagra, _xagw, _xagwa, _xaimit, _xaimlmt, _xaims, _xam, _xam_, _xamd, _xamm, _xamos, _xamp, _xampc, _xaoa, _xaollh, _xaolm, _xaolrud, _xaoo, _xaooa, _xaos, _xapnm, _xar, _xarc, _xarop, _xarp, _xarr, _xars, _xars_, _xarsim, _xarsims, _xarsinm, _xarsius, _xart, _xasc, _xasca, _xasdv, _xasebo, _xasse, _xasseakki, _xassebke, _xassec, _xasseca, _xasseck, _xasseckM, _xat, _xatc, _xatd, _xatdmos, _xavi, _xawob, _xawrl, _xs, n0, _s_registry, S3ServiceException$, n0_registry, AccessDenied$, BucketAlreadyExists$, BucketAlreadyOwnedByYou$, EncryptionTypeMismatch$, IdempotencyParameterMismatch$, InvalidObjectState$, InvalidRequest$, InvalidWriteOffset$, NoSuchBucket$, NoSuchKey$, NoSuchUpload$, NotFound$, ObjectAlreadyInActiveTierError$, ObjectNotInActiveTierError$, TooManyParts$, errorTypeRegistries, CopySourceSSECustomerKey, NonEmptyKmsKeyArnString, SessionCredentialValue, SSECustomerKey, SSEKMSEncryptionContext, SSEKMSKeyId, StreamingBlob, AbacStatus$, AbortIncompleteMultipartUpload$, AbortMultipartUploadOutput$, AbortMultipartUploadRequest$, AccelerateConfiguration$, AccessControlPolicy$, AccessControlTranslation$, AnalyticsAndOperator$, AnalyticsConfiguration$, AnalyticsExportDestination$, AnalyticsS3BucketDestination$, BlockedEncryptionTypes$, Bucket$, BucketInfo$, BucketLifecycleConfiguration$, BucketLoggingStatus$, Checksum$, CommonPrefix$, CompletedMultipartUpload$, CompletedPart$, CompleteMultipartUploadOutput$, CompleteMultipartUploadRequest$, Condition$, ContinuationEvent$, CopyObjectOutput$, CopyObjectRequest$, CopyObjectResult$, CopyPartResult$, CORSConfiguration$, CORSRule$, CreateBucketConfiguration$, CreateBucketMetadataConfigurationRequest$, CreateBucketMetadataTableConfigurationRequest$, CreateBucketOutput$, CreateBucketRequest$, CreateMultipartUploadOutput$, CreateMultipartUploadRequest$, CreateSessionOutput$, CreateSessionRequest$, CSVInput$, CSVOutput$, DefaultRetention$, Delete$, DeleteBucketAnalyticsConfigurationRequest$, DeleteBucketCorsRequest$, DeleteBucketEncryptionRequest$, DeleteBucketIntelligentTieringConfigurationRequest$, DeleteBucketInventoryConfigurationRequest$, DeleteBucketLifecycleRequest$, DeleteBucketMetadataConfigurationRequest$, DeleteBucketMetadataTableConfigurationRequest$, DeleteBucketMetricsConfigurationRequest$, DeleteBucketOwnershipControlsRequest$, DeleteBucketPolicyRequest$, DeleteBucketReplicationRequest$, DeleteBucketRequest$, DeleteBucketTaggingRequest$, DeleteBucketWebsiteRequest$, DeletedObject$, DeleteMarkerEntry$, DeleteMarkerReplication$, DeleteObjectOutput$, DeleteObjectRequest$, DeleteObjectsOutput$, DeleteObjectsRequest$, DeleteObjectTaggingOutput$, DeleteObjectTaggingRequest$, DeletePublicAccessBlockRequest$, Destination$, DestinationResult$, Encryption$, EncryptionConfiguration$, EndEvent$, _Error$, ErrorDetails$, ErrorDocument$, EventBridgeConfiguration$, ExistingObjectReplication$, FilterRule$, GetBucketAbacOutput$, GetBucketAbacRequest$, GetBucketAccelerateConfigurationOutput$, GetBucketAccelerateConfigurationRequest$, GetBucketAclOutput$, GetBucketAclRequest$, GetBucketAnalyticsConfigurationOutput$, GetBucketAnalyticsConfigurationRequest$, GetBucketCorsOutput$, GetBucketCorsRequest$, GetBucketEncryptionOutput$, GetBucketEncryptionRequest$, GetBucketIntelligentTieringConfigurationOutput$, GetBucketIntelligentTieringConfigurationRequest$, GetBucketInventoryConfigurationOutput$, GetBucketInventoryConfigurationRequest$, GetBucketLifecycleConfigurationOutput$, GetBucketLifecycleConfigurationRequest$, GetBucketLocationOutput$, GetBucketLocationRequest$, GetBucketLoggingOutput$, GetBucketLoggingRequest$, GetBucketMetadataConfigurationOutput$, GetBucketMetadataConfigurationRequest$, GetBucketMetadataConfigurationResult$, GetBucketMetadataTableConfigurationOutput$, GetBucketMetadataTableConfigurationRequest$, GetBucketMetadataTableConfigurationResult$, GetBucketMetricsConfigurationOutput$, GetBucketMetricsConfigurationRequest$, GetBucketNotificationConfigurationRequest$, GetBucketOwnershipControlsOutput$, GetBucketOwnershipControlsRequest$, GetBucketPolicyOutput$, GetBucketPolicyRequest$, GetBucketPolicyStatusOutput$, GetBucketPolicyStatusRequest$, GetBucketReplicationOutput$, GetBucketReplicationRequest$, GetBucketRequestPaymentOutput$, GetBucketRequestPaymentRequest$, GetBucketTaggingOutput$, GetBucketTaggingRequest$, GetBucketVersioningOutput$, GetBucketVersioningRequest$, GetBucketWebsiteOutput$, GetBucketWebsiteRequest$, GetObjectAclOutput$, GetObjectAclRequest$, GetObjectAttributesOutput$, GetObjectAttributesParts$, GetObjectAttributesRequest$, GetObjectLegalHoldOutput$, GetObjectLegalHoldRequest$, GetObjectLockConfigurationOutput$, GetObjectLockConfigurationRequest$, GetObjectOutput$, GetObjectRequest$, GetObjectRetentionOutput$, GetObjectRetentionRequest$, GetObjectTaggingOutput$, GetObjectTaggingRequest$, GetObjectTorrentOutput$, GetObjectTorrentRequest$, GetPublicAccessBlockOutput$, GetPublicAccessBlockRequest$, GlacierJobParameters$, Grant$, Grantee$, HeadBucketOutput$, HeadBucketRequest$, HeadObjectOutput$, HeadObjectRequest$, IndexDocument$, Initiator$, InputSerialization$, IntelligentTieringAndOperator$, IntelligentTieringConfiguration$, IntelligentTieringFilter$, InventoryConfiguration$, InventoryDestination$, InventoryEncryption$, InventoryFilter$, InventoryS3BucketDestination$, InventorySchedule$, InventoryTableConfiguration$, InventoryTableConfigurationResult$, InventoryTableConfigurationUpdates$, JournalTableConfiguration$, JournalTableConfigurationResult$, JournalTableConfigurationUpdates$, JSONInput$, JSONOutput$, LambdaFunctionConfiguration$, LifecycleExpiration$, LifecycleRule$, LifecycleRuleAndOperator$, LifecycleRuleFilter$, ListBucketAnalyticsConfigurationsOutput$, ListBucketAnalyticsConfigurationsRequest$, ListBucketIntelligentTieringConfigurationsOutput$, ListBucketIntelligentTieringConfigurationsRequest$, ListBucketInventoryConfigurationsOutput$, ListBucketInventoryConfigurationsRequest$, ListBucketMetricsConfigurationsOutput$, ListBucketMetricsConfigurationsRequest$, ListBucketsOutput$, ListBucketsRequest$, ListDirectoryBucketsOutput$, ListDirectoryBucketsRequest$, ListMultipartUploadsOutput$, ListMultipartUploadsRequest$, ListObjectsOutput$, ListObjectsRequest$, ListObjectsV2Output$, ListObjectsV2Request$, ListObjectVersionsOutput$, ListObjectVersionsRequest$, ListPartsOutput$, ListPartsRequest$, LocationInfo$, LoggingEnabled$, MetadataConfiguration$, MetadataConfigurationResult$, MetadataEntry$, MetadataTableConfiguration$, MetadataTableConfigurationResult$, MetadataTableEncryptionConfiguration$, Metrics$, MetricsAndOperator$, MetricsConfiguration$, MultipartUpload$, NoncurrentVersionExpiration$, NoncurrentVersionTransition$, NotificationConfiguration$, NotificationConfigurationFilter$, _Object$, ObjectIdentifier$, ObjectLockConfiguration$, ObjectLockLegalHold$, ObjectLockRetention$, ObjectLockRule$, ObjectPart$, ObjectVersion$, OutputLocation$, OutputSerialization$, Owner$, OwnershipControls$, OwnershipControlsRule$, ParquetInput$, Part$, PartitionedPrefix$, PolicyStatus$, Progress$, ProgressEvent$, PublicAccessBlockConfiguration$, PutBucketAbacRequest$, PutBucketAccelerateConfigurationRequest$, PutBucketAclRequest$, PutBucketAnalyticsConfigurationRequest$, PutBucketCorsRequest$, PutBucketEncryptionRequest$, PutBucketIntelligentTieringConfigurationRequest$, PutBucketInventoryConfigurationRequest$, PutBucketLifecycleConfigurationOutput$, PutBucketLifecycleConfigurationRequest$, PutBucketLoggingRequest$, PutBucketMetricsConfigurationRequest$, PutBucketNotificationConfigurationRequest$, PutBucketOwnershipControlsRequest$, PutBucketPolicyRequest$, PutBucketReplicationRequest$, PutBucketRequestPaymentRequest$, PutBucketTaggingRequest$, PutBucketVersioningRequest$, PutBucketWebsiteRequest$, PutObjectAclOutput$, PutObjectAclRequest$, PutObjectLegalHoldOutput$, PutObjectLegalHoldRequest$, PutObjectLockConfigurationOutput$, PutObjectLockConfigurationRequest$, PutObjectOutput$, PutObjectRequest$, PutObjectRetentionOutput$, PutObjectRetentionRequest$, PutObjectTaggingOutput$, PutObjectTaggingRequest$, PutPublicAccessBlockRequest$, QueueConfiguration$, RecordExpiration$, RecordsEvent$, Redirect$, RedirectAllRequestsTo$, RenameObjectOutput$, RenameObjectRequest$, ReplicaModifications$, ReplicationConfiguration$, ReplicationRule$, ReplicationRuleAndOperator$, ReplicationRuleFilter$, ReplicationTime$, ReplicationTimeValue$, RequestPaymentConfiguration$, RequestProgress$, RestoreObjectOutput$, RestoreObjectRequest$, RestoreRequest$, RestoreStatus$, RoutingRule$, S3KeyFilter$, S3Location$, S3TablesDestination$, S3TablesDestinationResult$, ScanRange$, SelectObjectContentOutput$, SelectObjectContentRequest$, SelectParameters$, ServerSideEncryptionByDefault$, ServerSideEncryptionConfiguration$, ServerSideEncryptionRule$, SessionCredentials$, SimplePrefix$, SourceSelectionCriteria$, SSEKMS$, SseKmsEncryptedObjects$, SSEKMSEncryption$, SSES3$, Stats$, StatsEvent$, StorageClassAnalysis$, StorageClassAnalysisDataExport$, Tag$, Tagging$, TargetGrant$, TargetObjectKeyFormat$, Tiering$, TopicConfiguration$, Transition$, UpdateBucketMetadataInventoryTableConfigurationRequest$, UpdateBucketMetadataJournalTableConfigurationRequest$, UpdateObjectEncryptionRequest$, UpdateObjectEncryptionResponse$, UploadPartCopyOutput$, UploadPartCopyRequest$, UploadPartOutput$, UploadPartRequest$, VersioningConfiguration$, WebsiteConfiguration$, WriteGetObjectResponseRequest$, __Unit, AllowedHeaders, AllowedMethods, AllowedOrigins, AnalyticsConfigurationList, Buckets, ChecksumAlgorithmList, CommonPrefixList, CompletedPartList, CORSRules, DeletedObjects, DeleteMarkers, EncryptionTypeList, Errors, EventList, ExposeHeaders, FilterRuleList, Grants, IntelligentTieringConfigurationList, InventoryConfigurationList, InventoryOptionalFields, LambdaFunctionConfigurationList, LifecycleRules, MetricsConfigurationList, MultipartUploadList, NoncurrentVersionTransitionList, ObjectAttributesList, ObjectIdentifierList, ObjectList, ObjectVersionList, OptionalObjectAttributesList, OwnershipControlsRules, Parts, PartsList, QueueConfigurationList, ReplicationRules, RoutingRules, ServerSideEncryptionRules, TagSet, TargetGrants, TieringList, TopicConfigurationList, TransitionList, UserMetadata, Metadata, AnalyticsFilter$, MetricsFilter$, ObjectEncryption$, SelectObjectContentEventStream$, AbortMultipartUpload$, CompleteMultipartUpload$, CopyObject$, CreateBucket$, CreateBucketMetadataConfiguration$, CreateBucketMetadataTableConfiguration$, CreateMultipartUpload$, CreateSession$, DeleteBucket$, DeleteBucketAnalyticsConfiguration$, DeleteBucketCors$, DeleteBucketEncryption$, DeleteBucketIntelligentTieringConfiguration$, DeleteBucketInventoryConfiguration$, DeleteBucketLifecycle$, DeleteBucketMetadataConfiguration$, DeleteBucketMetadataTableConfiguration$, DeleteBucketMetricsConfiguration$, DeleteBucketOwnershipControls$, DeleteBucketPolicy$, DeleteBucketReplication$, DeleteBucketTagging$, DeleteBucketWebsite$, DeleteObject$, DeleteObjects$, DeleteObjectTagging$, DeletePublicAccessBlock$, GetBucketAbac$, GetBucketAccelerateConfiguration$, GetBucketAcl$, GetBucketAnalyticsConfiguration$, GetBucketCors$, GetBucketEncryption$, GetBucketIntelligentTieringConfiguration$, GetBucketInventoryConfiguration$, GetBucketLifecycleConfiguration$, GetBucketLocation$, GetBucketLogging$, GetBucketMetadataConfiguration$, GetBucketMetadataTableConfiguration$, GetBucketMetricsConfiguration$, GetBucketNotificationConfiguration$, GetBucketOwnershipControls$, GetBucketPolicy$, GetBucketPolicyStatus$, GetBucketReplication$, GetBucketRequestPayment$, GetBucketTagging$, GetBucketVersioning$, GetBucketWebsite$, GetObject$, GetObjectAcl$, GetObjectAttributes$, GetObjectLegalHold$, GetObjectLockConfiguration$, GetObjectRetention$, GetObjectTagging$, GetObjectTorrent$, GetPublicAccessBlock$, HeadBucket$, HeadObject$, ListBucketAnalyticsConfigurations$, ListBucketIntelligentTieringConfigurations$, ListBucketInventoryConfigurations$, ListBucketMetricsConfigurations$, ListBuckets$, ListDirectoryBuckets$, ListMultipartUploads$, ListObjects$, ListObjectsV2$, ListObjectVersions$, ListParts$, PutBucketAbac$, PutBucketAccelerateConfiguration$, PutBucketAcl$, PutBucketAnalyticsConfiguration$, PutBucketCors$, PutBucketEncryption$, PutBucketIntelligentTieringConfiguration$, PutBucketInventoryConfiguration$, PutBucketLifecycleConfiguration$, PutBucketLogging$, PutBucketMetricsConfiguration$, PutBucketNotificationConfiguration$, PutBucketOwnershipControls$, PutBucketPolicy$, PutBucketReplication$, PutBucketRequestPayment$, PutBucketTagging$, PutBucketVersioning$, PutBucketWebsite$, PutObject$, PutObjectAcl$, PutObjectLegalHold$, PutObjectLockConfiguration$, PutObjectRetention$, PutObjectTagging$, PutPublicAccessBlock$, RenameObject$, RestoreObject$, SelectObjectContent$, UpdateBucketMetadataInventoryTableConfiguration$, UpdateBucketMetadataJournalTableConfiguration$, UpdateObjectEncryption$, UploadPart$, UploadPartCopy$, WriteGetObjectResponse$; +var init_schemas_0 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_schema3(); + init_errors3(); + init_S3ServiceException(); + _A = "Account"; + _AAO = "AnalyticsAndOperator"; + _AC = "AccelerateConfiguration"; + _ACL = "AccessControlList"; + _ACL_ = "ACL"; + _ACLn = "AnalyticsConfigurationList"; + _ACP = "AccessControlPolicy"; + _ACT = "AccessControlTranslation"; + _ACn = "AnalyticsConfiguration"; + _AD = "AccessDenied"; + _ADb = "AbortDate"; + _AED = "AnalyticsExportDestination"; + _AF = "AnalyticsFilter"; + _AH = "AllowedHeaders"; + _AHl = "AllowedHeader"; + _AI = "AccountId"; + _AIMU = "AbortIncompleteMultipartUpload"; + _AKI = "AccessKeyId"; + _AM = "AllowedMethods"; + _AMU = "AbortMultipartUpload"; + _AMUO = "AbortMultipartUploadOutput"; + _AMUR = "AbortMultipartUploadRequest"; + _AMl = "AllowedMethod"; + _AO = "AllowedOrigins"; + _AOl = "AllowedOrigin"; + _APA = "AccessPointAlias"; + _APAc = "AccessPointArn"; + _AQRD = "AllowQuotedRecordDelimiter"; + _AR = "AcceptRanges"; + _ARI = "AbortRuleId"; + _AS = "AbacStatus"; + _ASBD = "AnalyticsS3BucketDestination"; + _ASSEBD = "ApplyServerSideEncryptionByDefault"; + _ASr = "ArchiveStatus"; + _AT = "AccessTier"; + _An = "And"; + _B = "Bucket"; + _BA = "BucketArn"; + _BAE = "BucketAlreadyExists"; + _BAI = "BucketAccountId"; + _BAOBY = "BucketAlreadyOwnedByYou"; + _BET = "BlockedEncryptionTypes"; + _BGR = "BypassGovernanceRetention"; + _BI = "BucketInfo"; + _BKE = "BucketKeyEnabled"; + _BLC = "BucketLifecycleConfiguration"; + _BLN = "BucketLocationName"; + _BLS = "BucketLoggingStatus"; + _BLT = "BucketLocationType"; + _BN = "BucketNamespace"; + _BNu = "BucketName"; + _BP = "BytesProcessed"; + _BPA = "BlockPublicAcls"; + _BPP = "BlockPublicPolicy"; + _BR = "BucketRegion"; + _BRy = "BytesReturned"; + _BS = "BytesScanned"; + _Bo = "Body"; + _Bu = "Buckets"; + _C = "Checksum"; + _CA = "ChecksumAlgorithm"; + _CACL = "CannedACL"; + _CB = "CreateBucket"; + _CBC = "CreateBucketConfiguration"; + _CBMC = "CreateBucketMetadataConfiguration"; + _CBMCR = "CreateBucketMetadataConfigurationRequest"; + _CBMTC = "CreateBucketMetadataTableConfiguration"; + _CBMTCR = "CreateBucketMetadataTableConfigurationRequest"; + _CBO = "CreateBucketOutput"; + _CBR = "CreateBucketRequest"; + _CC = "CacheControl"; + _CCRC = "ChecksumCRC32"; + _CCRCC = "ChecksumCRC32C"; + _CCRCNVME = "ChecksumCRC64NVME"; + _CC_ = "Cache-Control"; + _CD = "CreationDate"; + _CD_ = "Content-Disposition"; + _CDo = "ContentDisposition"; + _CE = "ContinuationEvent"; + _CE_ = "Content-Encoding"; + _CEo = "ContentEncoding"; + _CF = "CloudFunction"; + _CFC = "CloudFunctionConfiguration"; + _CL = "ContentLanguage"; + _CL_ = "Content-Language"; + _CL__ = "Content-Length"; + _CLo = "ContentLength"; + _CM = "Content-MD5"; + _CMD = "ContentMD5"; + _CMU = "CompletedMultipartUpload"; + _CMUO = "CompleteMultipartUploadOutput"; + _CMUOr = "CreateMultipartUploadOutput"; + _CMUR = "CompleteMultipartUploadResult"; + _CMURo = "CompleteMultipartUploadRequest"; + _CMURr = "CreateMultipartUploadRequest"; + _CMUo = "CompleteMultipartUpload"; + _CMUr = "CreateMultipartUpload"; + _CMh = "ChecksumMode"; + _CO = "CopyObject"; + _COO = "CopyObjectOutput"; + _COR = "CopyObjectResult"; + _CORSC = "CORSConfiguration"; + _CORSR = "CORSRules"; + _CORSRu = "CORSRule"; + _CORo = "CopyObjectRequest"; + _CP = "CommonPrefix"; + _CPL = "CommonPrefixList"; + _CPLo = "CompletedPartList"; + _CPR = "CopyPartResult"; + _CPo = "CompletedPart"; + _CPom = "CommonPrefixes"; + _CR = "ContentRange"; + _CRSBA = "ConfirmRemoveSelfBucketAccess"; + _CR_ = "Content-Range"; + _CS = "CopySource"; + _CSHA = "ChecksumSHA1"; + _CSHAh = "ChecksumSHA256"; + _CSIM = "CopySourceIfMatch"; + _CSIMS = "CopySourceIfModifiedSince"; + _CSINM = "CopySourceIfNoneMatch"; + _CSIUS = "CopySourceIfUnmodifiedSince"; + _CSO = "CreateSessionOutput"; + _CSR = "CreateSessionResult"; + _CSRo = "CopySourceRange"; + _CSRr = "CreateSessionRequest"; + _CSSSECA = "CopySourceSSECustomerAlgorithm"; + _CSSSECK = "CopySourceSSECustomerKey"; + _CSSSECKMD = "CopySourceSSECustomerKeyMD5"; + _CSV = "CSV"; + _CSVI = "CopySourceVersionId"; + _CSVIn = "CSVInput"; + _CSVO = "CSVOutput"; + _CSo = "ConfigurationState"; + _CSr = "CreateSession"; + _CT = "ChecksumType"; + _CT_ = "Content-Type"; + _CTl = "ClientToken"; + _CTo = "ContentType"; + _CTom = "CompressionType"; + _CTon = "ContinuationToken"; + _Co = "Condition"; + _Cod = "Code"; + _Com = "Comments"; + _Con = "Contents"; + _Cont = "Cont"; + _Cr = "Credentials"; + _D = "Days"; + _DAI = "DaysAfterInitiation"; + _DB = "DeleteBucket"; + _DBAC = "DeleteBucketAnalyticsConfiguration"; + _DBACR = "DeleteBucketAnalyticsConfigurationRequest"; + _DBC = "DeleteBucketCors"; + _DBCR = "DeleteBucketCorsRequest"; + _DBE = "DeleteBucketEncryption"; + _DBER = "DeleteBucketEncryptionRequest"; + _DBIC = "DeleteBucketInventoryConfiguration"; + _DBICR = "DeleteBucketInventoryConfigurationRequest"; + _DBITC = "DeleteBucketIntelligentTieringConfiguration"; + _DBITCR = "DeleteBucketIntelligentTieringConfigurationRequest"; + _DBL = "DeleteBucketLifecycle"; + _DBLR = "DeleteBucketLifecycleRequest"; + _DBMC = "DeleteBucketMetadataConfiguration"; + _DBMCR = "DeleteBucketMetadataConfigurationRequest"; + _DBMCRe = "DeleteBucketMetricsConfigurationRequest"; + _DBMCe = "DeleteBucketMetricsConfiguration"; + _DBMTC = "DeleteBucketMetadataTableConfiguration"; + _DBMTCR = "DeleteBucketMetadataTableConfigurationRequest"; + _DBOC = "DeleteBucketOwnershipControls"; + _DBOCR = "DeleteBucketOwnershipControlsRequest"; + _DBP = "DeleteBucketPolicy"; + _DBPR = "DeleteBucketPolicyRequest"; + _DBR = "DeleteBucketRequest"; + _DBRR = "DeleteBucketReplicationRequest"; + _DBRe = "DeleteBucketReplication"; + _DBT = "DeleteBucketTagging"; + _DBTR = "DeleteBucketTaggingRequest"; + _DBW = "DeleteBucketWebsite"; + _DBWR = "DeleteBucketWebsiteRequest"; + _DE = "DataExport"; + _DIM = "DestinationIfMatch"; + _DIMS = "DestinationIfModifiedSince"; + _DINM = "DestinationIfNoneMatch"; + _DIUS = "DestinationIfUnmodifiedSince"; + _DM = "DeleteMarker"; + _DME = "DeleteMarkerEntry"; + _DMR = "DeleteMarkerReplication"; + _DMVI = "DeleteMarkerVersionId"; + _DMe = "DeleteMarkers"; + _DN = "DisplayName"; + _DO = "DeletedObject"; + _DOO = "DeleteObjectOutput"; + _DOOe = "DeleteObjectsOutput"; + _DOR = "DeleteObjectRequest"; + _DORe = "DeleteObjectsRequest"; + _DOT = "DeleteObjectTagging"; + _DOTO = "DeleteObjectTaggingOutput"; + _DOTR = "DeleteObjectTaggingRequest"; + _DOe = "DeletedObjects"; + _DOel = "DeleteObject"; + _DOele = "DeleteObjects"; + _DPAB = "DeletePublicAccessBlock"; + _DPABR = "DeletePublicAccessBlockRequest"; + _DR = "DataRedundancy"; + _DRe = "DefaultRetention"; + _DRel = "DeleteResult"; + _DRes = "DestinationResult"; + _Da = "Date"; + _De = "Delete"; + _Del = "Deleted"; + _Deli = "Delimiter"; + _Des = "Destination"; + _Desc = "Description"; + _Det = "Details"; + _E = "Expiration"; + _EA = "EmailAddress"; + _EBC = "EventBridgeConfiguration"; + _EBO = "ExpectedBucketOwner"; + _EC = "EncryptionConfiguration"; + _ECr = "ErrorCode"; + _ED = "ErrorDetails"; + _EDr = "ErrorDocument"; + _EE = "EndEvent"; + _EH = "ExposeHeaders"; + _EHx = "ExposeHeader"; + _EM = "ErrorMessage"; + _EODM = "ExpiredObjectDeleteMarker"; + _EOR = "ExistingObjectReplication"; + _ES = "ExpiresString"; + _ESBO = "ExpectedSourceBucketOwner"; + _ET = "EncryptionType"; + _ETL = "EncryptionTypeList"; + _ETM = "EncryptionTypeMismatch"; + _ETa = "ETag"; + _ETn = "EncodingType"; + _ETv = "EventThreshold"; + _ETx = "ExpressionType"; + _En = "Encryption"; + _Ena = "Enabled"; + _End = "End"; + _Er = "Errors"; + _Err = "Error"; + _Ev = "Events"; + _Eve = "Event"; + _Ex = "Expires"; + _Exp = "Expression"; + _F = "Filter"; + _FD = "FieldDelimiter"; + _FHI = "FileHeaderInfo"; + _FO = "FetchOwner"; + _FR = "FilterRule"; + _FRL = "FilterRuleList"; + _FRi = "FilterRules"; + _Fi = "Field"; + _Fo = "Format"; + _Fr = "Frequency"; + _G = "Grants"; + _GBA = "GetBucketAbac"; + _GBAC = "GetBucketAccelerateConfiguration"; + _GBACO = "GetBucketAccelerateConfigurationOutput"; + _GBACOe = "GetBucketAnalyticsConfigurationOutput"; + _GBACR = "GetBucketAccelerateConfigurationRequest"; + _GBACRe = "GetBucketAnalyticsConfigurationRequest"; + _GBACe = "GetBucketAnalyticsConfiguration"; + _GBAO = "GetBucketAbacOutput"; + _GBAOe = "GetBucketAclOutput"; + _GBAR = "GetBucketAbacRequest"; + _GBARe = "GetBucketAclRequest"; + _GBAe = "GetBucketAcl"; + _GBC = "GetBucketCors"; + _GBCO = "GetBucketCorsOutput"; + _GBCR = "GetBucketCorsRequest"; + _GBE = "GetBucketEncryption"; + _GBEO = "GetBucketEncryptionOutput"; + _GBER = "GetBucketEncryptionRequest"; + _GBIC = "GetBucketInventoryConfiguration"; + _GBICO = "GetBucketInventoryConfigurationOutput"; + _GBICR = "GetBucketInventoryConfigurationRequest"; + _GBITC = "GetBucketIntelligentTieringConfiguration"; + _GBITCO = "GetBucketIntelligentTieringConfigurationOutput"; + _GBITCR = "GetBucketIntelligentTieringConfigurationRequest"; + _GBL = "GetBucketLocation"; + _GBLC = "GetBucketLifecycleConfiguration"; + _GBLCO = "GetBucketLifecycleConfigurationOutput"; + _GBLCR = "GetBucketLifecycleConfigurationRequest"; + _GBLO = "GetBucketLocationOutput"; + _GBLOe = "GetBucketLoggingOutput"; + _GBLR = "GetBucketLocationRequest"; + _GBLRe = "GetBucketLoggingRequest"; + _GBLe = "GetBucketLogging"; + _GBMC = "GetBucketMetadataConfiguration"; + _GBMCO = "GetBucketMetadataConfigurationOutput"; + _GBMCOe = "GetBucketMetricsConfigurationOutput"; + _GBMCR = "GetBucketMetadataConfigurationResult"; + _GBMCRe = "GetBucketMetadataConfigurationRequest"; + _GBMCRet = "GetBucketMetricsConfigurationRequest"; + _GBMCe = "GetBucketMetricsConfiguration"; + _GBMTC = "GetBucketMetadataTableConfiguration"; + _GBMTCO = "GetBucketMetadataTableConfigurationOutput"; + _GBMTCR = "GetBucketMetadataTableConfigurationResult"; + _GBMTCRe = "GetBucketMetadataTableConfigurationRequest"; + _GBNC = "GetBucketNotificationConfiguration"; + _GBNCR = "GetBucketNotificationConfigurationRequest"; + _GBOC = "GetBucketOwnershipControls"; + _GBOCO = "GetBucketOwnershipControlsOutput"; + _GBOCR = "GetBucketOwnershipControlsRequest"; + _GBP = "GetBucketPolicy"; + _GBPO = "GetBucketPolicyOutput"; + _GBPR = "GetBucketPolicyRequest"; + _GBPS = "GetBucketPolicyStatus"; + _GBPSO = "GetBucketPolicyStatusOutput"; + _GBPSR = "GetBucketPolicyStatusRequest"; + _GBR = "GetBucketReplication"; + _GBRO = "GetBucketReplicationOutput"; + _GBRP = "GetBucketRequestPayment"; + _GBRPO = "GetBucketRequestPaymentOutput"; + _GBRPR = "GetBucketRequestPaymentRequest"; + _GBRR = "GetBucketReplicationRequest"; + _GBT = "GetBucketTagging"; + _GBTO = "GetBucketTaggingOutput"; + _GBTR = "GetBucketTaggingRequest"; + _GBV = "GetBucketVersioning"; + _GBVO = "GetBucketVersioningOutput"; + _GBVR = "GetBucketVersioningRequest"; + _GBW = "GetBucketWebsite"; + _GBWO = "GetBucketWebsiteOutput"; + _GBWR = "GetBucketWebsiteRequest"; + _GFC = "GrantFullControl"; + _GJP = "GlacierJobParameters"; + _GO = "GetObject"; + _GOA = "GetObjectAcl"; + _GOAO = "GetObjectAclOutput"; + _GOAOe = "GetObjectAttributesOutput"; + _GOAP = "GetObjectAttributesParts"; + _GOAR = "GetObjectAclRequest"; + _GOARe = "GetObjectAttributesResponse"; + _GOARet = "GetObjectAttributesRequest"; + _GOAe = "GetObjectAttributes"; + _GOLC = "GetObjectLockConfiguration"; + _GOLCO = "GetObjectLockConfigurationOutput"; + _GOLCR = "GetObjectLockConfigurationRequest"; + _GOLH = "GetObjectLegalHold"; + _GOLHO = "GetObjectLegalHoldOutput"; + _GOLHR = "GetObjectLegalHoldRequest"; + _GOO = "GetObjectOutput"; + _GOR = "GetObjectRequest"; + _GORO = "GetObjectRetentionOutput"; + _GORR = "GetObjectRetentionRequest"; + _GORe = "GetObjectRetention"; + _GOT = "GetObjectTagging"; + _GOTO = "GetObjectTaggingOutput"; + _GOTOe = "GetObjectTorrentOutput"; + _GOTR = "GetObjectTaggingRequest"; + _GOTRe = "GetObjectTorrentRequest"; + _GOTe = "GetObjectTorrent"; + _GPAB = "GetPublicAccessBlock"; + _GPABO = "GetPublicAccessBlockOutput"; + _GPABR = "GetPublicAccessBlockRequest"; + _GR = "GrantRead"; + _GRACP = "GrantReadACP"; + _GW = "GrantWrite"; + _GWACP = "GrantWriteACP"; + _Gr = "Grant"; + _Gra = "Grantee"; + _HB = "HeadBucket"; + _HBO = "HeadBucketOutput"; + _HBR = "HeadBucketRequest"; + _HECRE = "HttpErrorCodeReturnedEquals"; + _HN = "HostName"; + _HO = "HeadObject"; + _HOO = "HeadObjectOutput"; + _HOR = "HeadObjectRequest"; + _HRC = "HttpRedirectCode"; + _I = "Id"; + _IC = "InventoryConfiguration"; + _ICL = "InventoryConfigurationList"; + _ID = "ID"; + _IDn = "IndexDocument"; + _IDnv = "InventoryDestination"; + _IE = "IsEnabled"; + _IEn = "InventoryEncryption"; + _IF = "InventoryFilter"; + _IL = "IsLatest"; + _IM = "IfMatch"; + _IMIT = "IfMatchInitiatedTime"; + _IMLMT = "IfMatchLastModifiedTime"; + _IMS = "IfMatchSize"; + _IMS_ = "If-Modified-Since"; + _IMSf = "IfModifiedSince"; + _IMUR = "InitiateMultipartUploadResult"; + _IM_ = "If-Match"; + _INM = "IfNoneMatch"; + _INM_ = "If-None-Match"; + _IOF = "InventoryOptionalFields"; + _IOS = "InvalidObjectState"; + _IOV = "IncludedObjectVersions"; + _IP = "IsPublic"; + _IPA = "IgnorePublicAcls"; + _IPM = "IdempotencyParameterMismatch"; + _IR = "InvalidRequest"; + _IRIP = "IsRestoreInProgress"; + _IS = "InputSerialization"; + _ISBD = "InventoryS3BucketDestination"; + _ISn = "InventorySchedule"; + _IT = "IsTruncated"; + _ITAO = "IntelligentTieringAndOperator"; + _ITC = "IntelligentTieringConfiguration"; + _ITCL = "IntelligentTieringConfigurationList"; + _ITCR = "InventoryTableConfigurationResult"; + _ITCU = "InventoryTableConfigurationUpdates"; + _ITCn = "InventoryTableConfiguration"; + _ITF = "IntelligentTieringFilter"; + _IUS = "IfUnmodifiedSince"; + _IUS_ = "If-Unmodified-Since"; + _IWO = "InvalidWriteOffset"; + _In = "Initiator"; + _Ini = "Initiated"; + _JSON = "JSON"; + _JSONI = "JSONInput"; + _JSONO = "JSONOutput"; + _JTC = "JournalTableConfiguration"; + _JTCR = "JournalTableConfigurationResult"; + _JTCU = "JournalTableConfigurationUpdates"; + _K = "Key"; + _KC = "KeyCount"; + _KI = "KeyId"; + _KKA = "KmsKeyArn"; + _KM = "KeyMarker"; + _KMSC = "KMSContext"; + _KMSKA = "KMSKeyArn"; + _KMSKI = "KMSKeyId"; + _KMSMKID = "KMSMasterKeyID"; + _KPE = "KeyPrefixEquals"; + _L = "Location"; + _LAMBR = "ListAllMyBucketsResult"; + _LAMDBR = "ListAllMyDirectoryBucketsResult"; + _LB = "ListBuckets"; + _LBAC = "ListBucketAnalyticsConfigurations"; + _LBACO = "ListBucketAnalyticsConfigurationsOutput"; + _LBACR = "ListBucketAnalyticsConfigurationResult"; + _LBACRi = "ListBucketAnalyticsConfigurationsRequest"; + _LBIC = "ListBucketInventoryConfigurations"; + _LBICO = "ListBucketInventoryConfigurationsOutput"; + _LBICR = "ListBucketInventoryConfigurationsRequest"; + _LBITC = "ListBucketIntelligentTieringConfigurations"; + _LBITCO = "ListBucketIntelligentTieringConfigurationsOutput"; + _LBITCR = "ListBucketIntelligentTieringConfigurationsRequest"; + _LBMC = "ListBucketMetricsConfigurations"; + _LBMCO = "ListBucketMetricsConfigurationsOutput"; + _LBMCR = "ListBucketMetricsConfigurationsRequest"; + _LBO = "ListBucketsOutput"; + _LBR = "ListBucketsRequest"; + _LBRi = "ListBucketResult"; + _LC = "LocationConstraint"; + _LCi = "LifecycleConfiguration"; + _LDB = "ListDirectoryBuckets"; + _LDBO = "ListDirectoryBucketsOutput"; + _LDBR = "ListDirectoryBucketsRequest"; + _LE = "LoggingEnabled"; + _LEi = "LifecycleExpiration"; + _LFA = "LambdaFunctionArn"; + _LFC = "LambdaFunctionConfiguration"; + _LFCL = "LambdaFunctionConfigurationList"; + _LFCa = "LambdaFunctionConfigurations"; + _LH = "LegalHold"; + _LI = "LocationInfo"; + _LICR = "ListInventoryConfigurationsResult"; + _LM = "LastModified"; + _LMCR = "ListMetricsConfigurationsResult"; + _LMT = "LastModifiedTime"; + _LMU = "ListMultipartUploads"; + _LMUO = "ListMultipartUploadsOutput"; + _LMUR = "ListMultipartUploadsResult"; + _LMURi = "ListMultipartUploadsRequest"; + _LM_ = "Last-Modified"; + _LO = "ListObjects"; + _LOO = "ListObjectsOutput"; + _LOR = "ListObjectsRequest"; + _LOV = "ListObjectsV2"; + _LOVO = "ListObjectsV2Output"; + _LOVOi = "ListObjectVersionsOutput"; + _LOVR = "ListObjectsV2Request"; + _LOVRi = "ListObjectVersionsRequest"; + _LOVi = "ListObjectVersions"; + _LP = "ListParts"; + _LPO = "ListPartsOutput"; + _LPR = "ListPartsResult"; + _LPRi = "ListPartsRequest"; + _LR = "LifecycleRule"; + _LRAO = "LifecycleRuleAndOperator"; + _LRF = "LifecycleRuleFilter"; + _LRi = "LifecycleRules"; + _LVR = "ListVersionsResult"; + _M = "Metadata"; + _MAO = "MetricsAndOperator"; + _MAS = "MaxAgeSeconds"; + _MB = "MaxBuckets"; + _MC = "MetadataConfiguration"; + _MCL = "MetricsConfigurationList"; + _MCR = "MetadataConfigurationResult"; + _MCe = "MetricsConfiguration"; + _MD = "MetadataDirective"; + _MDB = "MaxDirectoryBuckets"; + _MDf = "MfaDelete"; + _ME = "MetadataEntry"; + _MF = "MetricsFilter"; + _MFA = "MFA"; + _MFAD = "MFADelete"; + _MK = "MaxKeys"; + _MM = "MissingMeta"; + _MOS = "MpuObjectSize"; + _MP = "MaxParts"; + _MTC = "MetadataTableConfiguration"; + _MTCR = "MetadataTableConfigurationResult"; + _MTEC = "MetadataTableEncryptionConfiguration"; + _MU = "MultipartUpload"; + _MUL = "MultipartUploadList"; + _MUa = "MaxUploads"; + _Ma = "Marker"; + _Me = "Metrics"; + _Mes = "Message"; + _Mi = "Minutes"; + _Mo = "Mode"; + _N = "Name"; + _NC = "NotificationConfiguration"; + _NCF = "NotificationConfigurationFilter"; + _NCT = "NextContinuationToken"; + _ND = "NoncurrentDays"; + _NEKKAS = "NonEmptyKmsKeyArnString"; + _NF = "NotFound"; + _NKM = "NextKeyMarker"; + _NM = "NextMarker"; + _NNV = "NewerNoncurrentVersions"; + _NPNM = "NextPartNumberMarker"; + _NSB = "NoSuchBucket"; + _NSK = "NoSuchKey"; + _NSU = "NoSuchUpload"; + _NUIM = "NextUploadIdMarker"; + _NVE = "NoncurrentVersionExpiration"; + _NVIM = "NextVersionIdMarker"; + _NVT = "NoncurrentVersionTransitions"; + _NVTL = "NoncurrentVersionTransitionList"; + _NVTo = "NoncurrentVersionTransition"; + _O = "Owner"; + _OA = "ObjectAttributes"; + _OAIATE = "ObjectAlreadyInActiveTierError"; + _OC = "OwnershipControls"; + _OCR = "OwnershipControlsRule"; + _OCRw = "OwnershipControlsRules"; + _OE = "ObjectEncryption"; + _OF = "OptionalFields"; + _OI = "ObjectIdentifier"; + _OIL = "ObjectIdentifierList"; + _OL = "OutputLocation"; + _OLC = "ObjectLockConfiguration"; + _OLE = "ObjectLockEnabled"; + _OLEFB = "ObjectLockEnabledForBucket"; + _OLLH = "ObjectLockLegalHold"; + _OLLHS = "ObjectLockLegalHoldStatus"; + _OLM = "ObjectLockMode"; + _OLR = "ObjectLockRetention"; + _OLRUD = "ObjectLockRetainUntilDate"; + _OLRb = "ObjectLockRule"; + _OLb = "ObjectList"; + _ONIATE = "ObjectNotInActiveTierError"; + _OO = "ObjectOwnership"; + _OOA = "OptionalObjectAttributes"; + _OP = "ObjectParts"; + _OPb = "ObjectPart"; + _OS = "ObjectSize"; + _OSGT = "ObjectSizeGreaterThan"; + _OSLT = "ObjectSizeLessThan"; + _OSV = "OutputSchemaVersion"; + _OSu = "OutputSerialization"; + _OV = "ObjectVersion"; + _OVL = "ObjectVersionList"; + _Ob = "Objects"; + _Obj = "Object"; + _P = "Prefix"; + _PABC = "PublicAccessBlockConfiguration"; + _PBA = "PutBucketAbac"; + _PBAC = "PutBucketAccelerateConfiguration"; + _PBACR = "PutBucketAccelerateConfigurationRequest"; + _PBACRu = "PutBucketAnalyticsConfigurationRequest"; + _PBACu = "PutBucketAnalyticsConfiguration"; + _PBAR = "PutBucketAbacRequest"; + _PBARu = "PutBucketAclRequest"; + _PBAu = "PutBucketAcl"; + _PBC = "PutBucketCors"; + _PBCR = "PutBucketCorsRequest"; + _PBE = "PutBucketEncryption"; + _PBER = "PutBucketEncryptionRequest"; + _PBIC = "PutBucketInventoryConfiguration"; + _PBICR = "PutBucketInventoryConfigurationRequest"; + _PBITC = "PutBucketIntelligentTieringConfiguration"; + _PBITCR = "PutBucketIntelligentTieringConfigurationRequest"; + _PBL = "PutBucketLogging"; + _PBLC = "PutBucketLifecycleConfiguration"; + _PBLCO = "PutBucketLifecycleConfigurationOutput"; + _PBLCR = "PutBucketLifecycleConfigurationRequest"; + _PBLR = "PutBucketLoggingRequest"; + _PBMC = "PutBucketMetricsConfiguration"; + _PBMCR = "PutBucketMetricsConfigurationRequest"; + _PBNC = "PutBucketNotificationConfiguration"; + _PBNCR = "PutBucketNotificationConfigurationRequest"; + _PBOC = "PutBucketOwnershipControls"; + _PBOCR = "PutBucketOwnershipControlsRequest"; + _PBP = "PutBucketPolicy"; + _PBPR = "PutBucketPolicyRequest"; + _PBR = "PutBucketReplication"; + _PBRP = "PutBucketRequestPayment"; + _PBRPR = "PutBucketRequestPaymentRequest"; + _PBRR = "PutBucketReplicationRequest"; + _PBT = "PutBucketTagging"; + _PBTR = "PutBucketTaggingRequest"; + _PBV = "PutBucketVersioning"; + _PBVR = "PutBucketVersioningRequest"; + _PBW = "PutBucketWebsite"; + _PBWR = "PutBucketWebsiteRequest"; + _PC = "PartsCount"; + _PDS = "PartitionDateSource"; + _PE = "ProgressEvent"; + _PI = "ParquetInput"; + _PL = "PartsList"; + _PN = "PartNumber"; + _PNM = "PartNumberMarker"; + _PO = "PutObject"; + _POA = "PutObjectAcl"; + _POAO = "PutObjectAclOutput"; + _POAR = "PutObjectAclRequest"; + _POLC = "PutObjectLockConfiguration"; + _POLCO = "PutObjectLockConfigurationOutput"; + _POLCR = "PutObjectLockConfigurationRequest"; + _POLH = "PutObjectLegalHold"; + _POLHO = "PutObjectLegalHoldOutput"; + _POLHR = "PutObjectLegalHoldRequest"; + _POO = "PutObjectOutput"; + _POR = "PutObjectRequest"; + _PORO = "PutObjectRetentionOutput"; + _PORR = "PutObjectRetentionRequest"; + _PORu = "PutObjectRetention"; + _POT = "PutObjectTagging"; + _POTO = "PutObjectTaggingOutput"; + _POTR = "PutObjectTaggingRequest"; + _PP = "PartitionedPrefix"; + _PPAB = "PutPublicAccessBlock"; + _PPABR = "PutPublicAccessBlockRequest"; + _PS = "PolicyStatus"; + _Pa = "Parts"; + _Par = "Part"; + _Parq = "Parquet"; + _Pay = "Payer"; + _Payl = "Payload"; + _Pe = "Permission"; + _Po = "Policy"; + _Pr = "Progress"; + _Pri = "Priority"; + _Pro = "Protocol"; + _Q = "Quiet"; + _QA = "QueueArn"; + _QC = "QuoteCharacter"; + _QCL = "QueueConfigurationList"; + _QCu = "QueueConfigurations"; + _QCue = "QueueConfiguration"; + _QEC = "QuoteEscapeCharacter"; + _QF = "QuoteFields"; + _Qu = "Queue"; + _R = "Rules"; + _RART = "RedirectAllRequestsTo"; + _RC = "RequestCharged"; + _RCC = "ResponseCacheControl"; + _RCD = "ResponseContentDisposition"; + _RCE = "ResponseContentEncoding"; + _RCL = "ResponseContentLanguage"; + _RCT = "ResponseContentType"; + _RCe = "ReplicationConfiguration"; + _RD = "RecordDelimiter"; + _RE = "ResponseExpires"; + _RED = "RestoreExpiryDate"; + _REe = "RecordExpiration"; + _REec = "RecordsEvent"; + _RKKID = "ReplicaKmsKeyID"; + _RKPW = "ReplaceKeyPrefixWith"; + _RKW = "ReplaceKeyWith"; + _RM = "ReplicaModifications"; + _RO = "RenameObject"; + _ROO = "RenameObjectOutput"; + _ROOe = "RestoreObjectOutput"; + _ROP = "RestoreOutputPath"; + _ROR = "RenameObjectRequest"; + _RORe = "RestoreObjectRequest"; + _ROe = "RestoreObject"; + _RP = "RequestPayer"; + _RPB = "RestrictPublicBuckets"; + _RPC = "RequestPaymentConfiguration"; + _RPe = "RequestProgress"; + _RR = "RoutingRules"; + _RRAO = "ReplicationRuleAndOperator"; + _RRF = "ReplicationRuleFilter"; + _RRe = "ReplicationRule"; + _RRep = "ReplicationRules"; + _RReq = "RequestRoute"; + _RRes = "RestoreRequest"; + _RRo = "RoutingRule"; + _RS = "ReplicationStatus"; + _RSe = "RestoreStatus"; + _RSen = "RenameSource"; + _RT = "ReplicationTime"; + _RTV = "ReplicationTimeValue"; + _RTe = "RequestToken"; + _RUD = "RetainUntilDate"; + _Ra = "Range"; + _Re = "Restore"; + _Rec = "Records"; + _Red = "Redirect"; + _Ret = "Retention"; + _Ro = "Role"; + _Ru = "Rule"; + _S = "Status"; + _SA = "StartAfter"; + _SAK = "SecretAccessKey"; + _SAs = "SseAlgorithm"; + _SB = "StreamingBlob"; + _SBD = "S3BucketDestination"; + _SC = "StorageClass"; + _SCA = "StorageClassAnalysis"; + _SCADE = "StorageClassAnalysisDataExport"; + _SCV = "SessionCredentialValue"; + _SCe = "SessionCredentials"; + _SCt = "StatusCode"; + _SDV = "SkipDestinationValidation"; + _SE = "StatsEvent"; + _SIM = "SourceIfMatch"; + _SIMS = "SourceIfModifiedSince"; + _SINM = "SourceIfNoneMatch"; + _SIUS = "SourceIfUnmodifiedSince"; + _SK = "SSE-KMS"; + _SKEO = "SseKmsEncryptedObjects"; + _SKF = "S3KeyFilter"; + _SKe = "S3Key"; + _SL = "S3Location"; + _SM = "SessionMode"; + _SOC = "SelectObjectContent"; + _SOCES = "SelectObjectContentEventStream"; + _SOCO = "SelectObjectContentOutput"; + _SOCR = "SelectObjectContentRequest"; + _SP = "SelectParameters"; + _SPi = "SimplePrefix"; + _SR = "ScanRange"; + _SS = "SSE-S3"; + _SSC = "SourceSelectionCriteria"; + _SSE = "ServerSideEncryption"; + _SSEA = "SSEAlgorithm"; + _SSEBD = "ServerSideEncryptionByDefault"; + _SSEC = "ServerSideEncryptionConfiguration"; + _SSECA = "SSECustomerAlgorithm"; + _SSECK = "SSECustomerKey"; + _SSECKMD = "SSECustomerKeyMD5"; + _SSEKMS = "SSEKMS"; + _SSEKMSE = "SSEKMSEncryption"; + _SSEKMSEC = "SSEKMSEncryptionContext"; + _SSEKMSKI = "SSEKMSKeyId"; + _SSER = "ServerSideEncryptionRule"; + _SSERe = "ServerSideEncryptionRules"; + _SSES = "SSES3"; + _ST = "SessionToken"; + _STD = "S3TablesDestination"; + _STDR = "S3TablesDestinationResult"; + _S_ = "S3"; + _Sc = "Schedule"; + _Si = "Size"; + _St = "Start"; + _Sta = "Stats"; + _Su = "Suffix"; + _T = "Tags"; + _TA = "TableArn"; + _TAo = "TopicArn"; + _TB = "TargetBucket"; + _TBA = "TableBucketArn"; + _TBT = "TableBucketType"; + _TC = "TagCount"; + _TCL = "TopicConfigurationList"; + _TCo = "TopicConfigurations"; + _TCop = "TopicConfiguration"; + _TD = "TaggingDirective"; + _TDMOS = "TransitionDefaultMinimumObjectSize"; + _TG = "TargetGrants"; + _TGa = "TargetGrant"; + _TL = "TieringList"; + _TLr = "TransitionList"; + _TMP = "TooManyParts"; + _TN = "TableNamespace"; + _TNa = "TableName"; + _TOKF = "TargetObjectKeyFormat"; + _TP = "TargetPrefix"; + _TPC = "TotalPartsCount"; + _TS = "TagSet"; + _TSa = "TableStatus"; + _Ta = "Tag"; + _Tag = "Tagging"; + _Ti = "Tier"; + _Tie = "Tierings"; + _Tier = "Tiering"; + _Tim = "Time"; + _To = "Token"; + _Top = "Topic"; + _Tr = "Transitions"; + _Tra = "Transition"; + _Ty = "Type"; + _U = "Uploads"; + _UBMITC = "UpdateBucketMetadataInventoryTableConfiguration"; + _UBMITCR = "UpdateBucketMetadataInventoryTableConfigurationRequest"; + _UBMJTC = "UpdateBucketMetadataJournalTableConfiguration"; + _UBMJTCR = "UpdateBucketMetadataJournalTableConfigurationRequest"; + _UI = "UploadId"; + _UIM = "UploadIdMarker"; + _UM = "UserMetadata"; + _UOE = "UpdateObjectEncryption"; + _UOER = "UpdateObjectEncryptionRequest"; + _UOERp = "UpdateObjectEncryptionResponse"; + _UP = "UploadPart"; + _UPC = "UploadPartCopy"; + _UPCO = "UploadPartCopyOutput"; + _UPCR = "UploadPartCopyRequest"; + _UPO = "UploadPartOutput"; + _UPR = "UploadPartRequest"; + _URI = "URI"; + _Up = "Upload"; + _V = "Value"; + _VC = "VersioningConfiguration"; + _VI = "VersionId"; + _VIM = "VersionIdMarker"; + _Ve = "Versions"; + _Ver = "Version"; + _WC = "WebsiteConfiguration"; + _WGOR = "WriteGetObjectResponse"; + _WGORR = "WriteGetObjectResponseRequest"; + _WOB = "WriteOffsetBytes"; + _WRL = "WebsiteRedirectLocation"; + _Y = "Years"; + _ar = "accept-ranges"; + _br = "bucket-region"; + _c = "client"; + _ct = "continuation-token"; + _d = "delimiter"; + _e = "error"; + _eP = "eventPayload"; + _en = "endpoint"; + _et = "encoding-type"; + _fo = "fetch-owner"; + _h = "http"; + _hC = "httpChecksum"; + _hE = "httpError"; + _hH = "httpHeader"; + _hL = "hostLabel"; + _hP = "httpPayload"; + _hPH = "httpPrefixHeaders"; + _hQ = "httpQuery"; + _hi = "http://www.w3.org/2001/XMLSchema-instance"; + _i = "id"; + _iT = "idempotencyToken"; + _km = "key-marker"; + _m = "marker"; + _mb = "max-buckets"; + _mdb = "max-directory-buckets"; + _mk = "max-keys"; + _mp = "max-parts"; + _mu = "max-uploads"; + _p = "prefix"; + _pN = "partNumber"; + _pnm = "part-number-marker"; + _rcc = "response-cache-control"; + _rcd = "response-content-disposition"; + _rce = "response-content-encoding"; + _rcl = "response-content-language"; + _rct = "response-content-type"; + _re = "response-expires"; + _s = "smithy.ts.sdk.synthetic.com.amazonaws.s3"; + _sa = "start-after"; + _st = "streaming"; + _uI = "uploadId"; + _uim = "upload-id-marker"; + _vI = "versionId"; + _vim = "version-id-marker"; + _x = "xsi"; + _xA = "xmlAttribute"; + _xF = "xmlFlattened"; + _xN = "xmlName"; + _xNm = "xmlNamespace"; + _xaa = "x-amz-acl"; + _xaad = "x-amz-abort-date"; + _xaapa = "x-amz-access-point-alias"; + _xaari = "x-amz-abort-rule-id"; + _xaas = "x-amz-archive-status"; + _xaba = "x-amz-bucket-arn"; + _xabgr = "x-amz-bypass-governance-retention"; + _xabln = "x-amz-bucket-location-name"; + _xablt = "x-amz-bucket-location-type"; + _xabn = "x-amz-bucket-namespace"; + _xabole = "x-amz-bucket-object-lock-enabled"; + _xabolt = "x-amz-bucket-object-lock-token"; + _xabr = "x-amz-bucket-region"; + _xaca = "x-amz-checksum-algorithm"; + _xacc = "x-amz-checksum-crc32"; + _xacc_ = "x-amz-checksum-crc32c"; + _xacc__ = "x-amz-checksum-crc64nvme"; + _xacm = "x-amz-checksum-mode"; + _xacrsba = "x-amz-confirm-remove-self-bucket-access"; + _xacs = "x-amz-checksum-sha1"; + _xacs_ = "x-amz-checksum-sha256"; + _xacs__ = "x-amz-copy-source"; + _xacsim = "x-amz-copy-source-if-match"; + _xacsims = "x-amz-copy-source-if-modified-since"; + _xacsinm = "x-amz-copy-source-if-none-match"; + _xacsius = "x-amz-copy-source-if-unmodified-since"; + _xacsm = "x-amz-create-session-mode"; + _xacsr = "x-amz-copy-source-range"; + _xacssseca = "x-amz-copy-source-server-side-encryption-customer-algorithm"; + _xacssseck = "x-amz-copy-source-server-side-encryption-customer-key"; + _xacssseckM = "x-amz-copy-source-server-side-encryption-customer-key-MD5"; + _xacsvi = "x-amz-copy-source-version-id"; + _xact = "x-amz-checksum-type"; + _xact_ = "x-amz-client-token"; + _xadm = "x-amz-delete-marker"; + _xae = "x-amz-expiration"; + _xaebo = "x-amz-expected-bucket-owner"; + _xafec = "x-amz-fwd-error-code"; + _xafem = "x-amz-fwd-error-message"; + _xafhCC = "x-amz-fwd-header-Cache-Control"; + _xafhCD = "x-amz-fwd-header-Content-Disposition"; + _xafhCE = "x-amz-fwd-header-Content-Encoding"; + _xafhCL = "x-amz-fwd-header-Content-Language"; + _xafhCR = "x-amz-fwd-header-Content-Range"; + _xafhCT = "x-amz-fwd-header-Content-Type"; + _xafhE = "x-amz-fwd-header-ETag"; + _xafhE_ = "x-amz-fwd-header-Expires"; + _xafhLM = "x-amz-fwd-header-Last-Modified"; + _xafhar = "x-amz-fwd-header-accept-ranges"; + _xafhxacc = "x-amz-fwd-header-x-amz-checksum-crc32"; + _xafhxacc_ = "x-amz-fwd-header-x-amz-checksum-crc32c"; + _xafhxacc__ = "x-amz-fwd-header-x-amz-checksum-crc64nvme"; + _xafhxacs = "x-amz-fwd-header-x-amz-checksum-sha1"; + _xafhxacs_ = "x-amz-fwd-header-x-amz-checksum-sha256"; + _xafhxadm = "x-amz-fwd-header-x-amz-delete-marker"; + _xafhxae = "x-amz-fwd-header-x-amz-expiration"; + _xafhxamm = "x-amz-fwd-header-x-amz-missing-meta"; + _xafhxampc = "x-amz-fwd-header-x-amz-mp-parts-count"; + _xafhxaollh = "x-amz-fwd-header-x-amz-object-lock-legal-hold"; + _xafhxaolm = "x-amz-fwd-header-x-amz-object-lock-mode"; + _xafhxaolrud = "x-amz-fwd-header-x-amz-object-lock-retain-until-date"; + _xafhxar = "x-amz-fwd-header-x-amz-restore"; + _xafhxarc = "x-amz-fwd-header-x-amz-request-charged"; + _xafhxars = "x-amz-fwd-header-x-amz-replication-status"; + _xafhxasc = "x-amz-fwd-header-x-amz-storage-class"; + _xafhxasse = "x-amz-fwd-header-x-amz-server-side-encryption"; + _xafhxasseakki = "x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"; + _xafhxassebke = "x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"; + _xafhxasseca = "x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"; + _xafhxasseckM = "x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5"; + _xafhxatc = "x-amz-fwd-header-x-amz-tagging-count"; + _xafhxavi = "x-amz-fwd-header-x-amz-version-id"; + _xafs = "x-amz-fwd-status"; + _xagfc = "x-amz-grant-full-control"; + _xagr = "x-amz-grant-read"; + _xagra = "x-amz-grant-read-acp"; + _xagw = "x-amz-grant-write"; + _xagwa = "x-amz-grant-write-acp"; + _xaimit = "x-amz-if-match-initiated-time"; + _xaimlmt = "x-amz-if-match-last-modified-time"; + _xaims = "x-amz-if-match-size"; + _xam = "x-amz-meta-"; + _xam_ = "x-amz-mfa"; + _xamd = "x-amz-metadata-directive"; + _xamm = "x-amz-missing-meta"; + _xamos = "x-amz-mp-object-size"; + _xamp = "x-amz-max-parts"; + _xampc = "x-amz-mp-parts-count"; + _xaoa = "x-amz-object-attributes"; + _xaollh = "x-amz-object-lock-legal-hold"; + _xaolm = "x-amz-object-lock-mode"; + _xaolrud = "x-amz-object-lock-retain-until-date"; + _xaoo = "x-amz-object-ownership"; + _xaooa = "x-amz-optional-object-attributes"; + _xaos = "x-amz-object-size"; + _xapnm = "x-amz-part-number-marker"; + _xar = "x-amz-restore"; + _xarc = "x-amz-request-charged"; + _xarop = "x-amz-restore-output-path"; + _xarp = "x-amz-request-payer"; + _xarr = "x-amz-request-route"; + _xars = "x-amz-replication-status"; + _xars_ = "x-amz-rename-source"; + _xarsim = "x-amz-rename-source-if-match"; + _xarsims = "x-amz-rename-source-if-modified-since"; + _xarsinm = "x-amz-rename-source-if-none-match"; + _xarsius = "x-amz-rename-source-if-unmodified-since"; + _xart = "x-amz-request-token"; + _xasc = "x-amz-storage-class"; + _xasca = "x-amz-sdk-checksum-algorithm"; + _xasdv = "x-amz-skip-destination-validation"; + _xasebo = "x-amz-source-expected-bucket-owner"; + _xasse = "x-amz-server-side-encryption"; + _xasseakki = "x-amz-server-side-encryption-aws-kms-key-id"; + _xassebke = "x-amz-server-side-encryption-bucket-key-enabled"; + _xassec = "x-amz-server-side-encryption-context"; + _xasseca = "x-amz-server-side-encryption-customer-algorithm"; + _xasseck = "x-amz-server-side-encryption-customer-key"; + _xasseckM = "x-amz-server-side-encryption-customer-key-MD5"; + _xat = "x-amz-tagging"; + _xatc = "x-amz-tagging-count"; + _xatd = "x-amz-tagging-directive"; + _xatdmos = "x-amz-transition-default-minimum-object-size"; + _xavi = "x-amz-version-id"; + _xawob = "x-amz-write-offset-bytes"; + _xawrl = "x-amz-website-redirect-location"; + _xs = "xsi:type"; + n0 = "com.amazonaws.s3"; + _s_registry = TypeRegistry.for(_s); + S3ServiceException$ = [-3, _s, "S3ServiceException", 0, [], []]; + _s_registry.registerError(S3ServiceException$, S3ServiceException); + n0_registry = TypeRegistry.for(n0); + AccessDenied$ = [ + -3, + n0, + _AD, + { [_e]: _c, [_hE]: 403 }, + [], + [] + ]; + n0_registry.registerError(AccessDenied$, AccessDenied); + BucketAlreadyExists$ = [ + -3, + n0, + _BAE, + { [_e]: _c, [_hE]: 409 }, + [], + [] + ]; + n0_registry.registerError(BucketAlreadyExists$, BucketAlreadyExists); + BucketAlreadyOwnedByYou$ = [ + -3, + n0, + _BAOBY, + { [_e]: _c, [_hE]: 409 }, + [], + [] + ]; + n0_registry.registerError(BucketAlreadyOwnedByYou$, BucketAlreadyOwnedByYou); + EncryptionTypeMismatch$ = [ + -3, + n0, + _ETM, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(EncryptionTypeMismatch$, EncryptionTypeMismatch); + IdempotencyParameterMismatch$ = [ + -3, + n0, + _IPM, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(IdempotencyParameterMismatch$, IdempotencyParameterMismatch); + InvalidObjectState$ = [ + -3, + n0, + _IOS, + { [_e]: _c, [_hE]: 403 }, + [_SC, _AT], + [0, 0] + ]; + n0_registry.registerError(InvalidObjectState$, InvalidObjectState); + InvalidRequest$ = [ + -3, + n0, + _IR, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(InvalidRequest$, InvalidRequest); + InvalidWriteOffset$ = [ + -3, + n0, + _IWO, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(InvalidWriteOffset$, InvalidWriteOffset); + NoSuchBucket$ = [ + -3, + n0, + _NSB, + { [_e]: _c, [_hE]: 404 }, + [], + [] + ]; + n0_registry.registerError(NoSuchBucket$, NoSuchBucket); + NoSuchKey$ = [ + -3, + n0, + _NSK, + { [_e]: _c, [_hE]: 404 }, + [], + [] + ]; + n0_registry.registerError(NoSuchKey$, NoSuchKey); + NoSuchUpload$ = [ + -3, + n0, + _NSU, + { [_e]: _c, [_hE]: 404 }, + [], + [] + ]; + n0_registry.registerError(NoSuchUpload$, NoSuchUpload); + NotFound$ = [ + -3, + n0, + _NF, + { [_e]: _c }, + [], + [] + ]; + n0_registry.registerError(NotFound$, NotFound); + ObjectAlreadyInActiveTierError$ = [ + -3, + n0, + _OAIATE, + { [_e]: _c, [_hE]: 403 }, + [], + [] + ]; + n0_registry.registerError(ObjectAlreadyInActiveTierError$, ObjectAlreadyInActiveTierError); + ObjectNotInActiveTierError$ = [ + -3, + n0, + _ONIATE, + { [_e]: _c, [_hE]: 403 }, + [], + [] + ]; + n0_registry.registerError(ObjectNotInActiveTierError$, ObjectNotInActiveTierError); + TooManyParts$ = [ + -3, + n0, + _TMP, + { [_e]: _c, [_hE]: 400 }, + [], + [] + ]; + n0_registry.registerError(TooManyParts$, TooManyParts); + errorTypeRegistries = [ + _s_registry, + n0_registry + ]; + CopySourceSSECustomerKey = [0, n0, _CSSSECK, 8, 0]; + NonEmptyKmsKeyArnString = [0, n0, _NEKKAS, 8, 0]; + SessionCredentialValue = [0, n0, _SCV, 8, 0]; + SSECustomerKey = [0, n0, _SSECK, 8, 0]; + SSEKMSEncryptionContext = [0, n0, _SSEKMSEC, 8, 0]; + SSEKMSKeyId = [0, n0, _SSEKMSKI, 8, 0]; + StreamingBlob = [0, n0, _SB, { [_st]: 1 }, 42]; + AbacStatus$ = [ + 3, + n0, + _AS, + 0, + [_S], + [0] + ]; + AbortIncompleteMultipartUpload$ = [ + 3, + n0, + _AIMU, + 0, + [_DAI], + [1] + ]; + AbortMultipartUploadOutput$ = [ + 3, + n0, + _AMUO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + AbortMultipartUploadRequest$ = [ + 3, + n0, + _AMUR, + 0, + [_B, _K, _UI, _RP, _EBO, _IMIT], + [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [6, { [_hH]: _xaimit }]], + 3 + ]; + AccelerateConfiguration$ = [ + 3, + n0, + _AC, + 0, + [_S], + [0] + ]; + AccessControlPolicy$ = [ + 3, + n0, + _ACP, + 0, + [_G, _O], + [[() => Grants, { [_xN]: _ACL }], () => Owner$] + ]; + AccessControlTranslation$ = [ + 3, + n0, + _ACT, + 0, + [_O], + [0], + 1 + ]; + AnalyticsAndOperator$ = [ + 3, + n0, + _AAO, + 0, + [_P, _T], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]] + ]; + AnalyticsConfiguration$ = [ + 3, + n0, + _ACn, + 0, + [_I, _SCA, _F], + [0, () => StorageClassAnalysis$, [() => AnalyticsFilter$, 0]], + 2 + ]; + AnalyticsExportDestination$ = [ + 3, + n0, + _AED, + 0, + [_SBD], + [() => AnalyticsS3BucketDestination$], + 1 + ]; + AnalyticsS3BucketDestination$ = [ + 3, + n0, + _ASBD, + 0, + [_Fo, _B, _BAI, _P], + [0, 0, 0, 0], + 2 + ]; + BlockedEncryptionTypes$ = [ + 3, + n0, + _BET, + 0, + [_ET], + [[() => EncryptionTypeList, { [_xF]: 1 }]] + ]; + Bucket$ = [ + 3, + n0, + _B, + 0, + [_N, _CD, _BR, _BA], + [0, 4, 0, 0] + ]; + BucketInfo$ = [ + 3, + n0, + _BI, + 0, + [_DR, _Ty], + [0, 0] + ]; + BucketLifecycleConfiguration$ = [ + 3, + n0, + _BLC, + 0, + [_R], + [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Ru }]], + 1 + ]; + BucketLoggingStatus$ = [ + 3, + n0, + _BLS, + 0, + [_LE], + [[() => LoggingEnabled$, 0]] + ]; + Checksum$ = [ + 3, + n0, + _C, + 0, + [_CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT], + [0, 0, 0, 0, 0, 0] + ]; + CommonPrefix$ = [ + 3, + n0, + _CP, + 0, + [_P], + [0] + ]; + CompletedMultipartUpload$ = [ + 3, + n0, + _CMU, + 0, + [_Pa], + [[() => CompletedPartList, { [_xF]: 1, [_xN]: _Par }]] + ]; + CompletedPart$ = [ + 3, + n0, + _CPo, + 0, + [_ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _PN], + [0, 0, 0, 0, 0, 0, 1] + ]; + CompleteMultipartUploadOutput$ = [ + 3, + n0, + _CMUO, + { [_xN]: _CMUR }, + [_L, _B, _K, _E, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _SSE, _VI, _SSEKMSKI, _BKE, _RC], + [0, 0, 0, [0, { [_hH]: _xae }], 0, 0, 0, 0, 0, 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] + ]; + CompleteMultipartUploadRequest$ = [ + 3, + n0, + _CMURo, + 0, + [_B, _K, _UI, _MU, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _MOS, _RP, _EBO, _IM, _INM, _SSECA, _SSECK, _SSECKMD], + [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [() => CompletedMultipartUpload$, { [_hP]: 1, [_xN]: _CMUo }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamos }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], + 3 + ]; + Condition$ = [ + 3, + n0, + _Co, + 0, + [_HECRE, _KPE], + [0, 0] + ]; + ContinuationEvent$ = [ + 3, + n0, + _CE, + 0, + [], + [] + ]; + CopyObjectOutput$ = [ + 3, + n0, + _COO, + 0, + [_COR, _E, _CSVI, _VI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC], + [[() => CopyObjectResult$, 16], [0, { [_hH]: _xae }], [0, { [_hH]: _xacsvi }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] + ]; + CopyObjectRequest$ = [ + 3, + n0, + _CORo, + 0, + [_B, _CS, _K, _ACL_, _CC, _CA, _CDo, _CEo, _CL, _CTo, _CSIM, _CSIMS, _CSINM, _CSIUS, _Ex, _GFC, _GR, _GRACP, _GWACP, _IM, _INM, _M, _MD, _TD, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _ESBO], + [[0, 1], [0, { [_hH]: _xacs__ }], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _xaca }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [4, { [_hH]: _Ex }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xamd }], [0, { [_hH]: _xatd }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], + 3 + ]; + CopyObjectResult$ = [ + 3, + n0, + _COR, + 0, + [_ETa, _LM, _CT, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh], + [0, 4, 0, 0, 0, 0, 0, 0] + ]; + CopyPartResult$ = [ + 3, + n0, + _CPR, + 0, + [_ETa, _LM, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh], + [0, 4, 0, 0, 0, 0, 0] + ]; + CORSConfiguration$ = [ + 3, + n0, + _CORSC, + 0, + [_CORSR], + [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]], + 1 + ]; + CORSRule$ = [ + 3, + n0, + _CORSRu, + 0, + [_AM, _AO, _ID, _AH, _EH, _MAS], + [[64 | 0, { [_xF]: 1, [_xN]: _AMl }], [64 | 0, { [_xF]: 1, [_xN]: _AOl }], 0, [64 | 0, { [_xF]: 1, [_xN]: _AHl }], [64 | 0, { [_xF]: 1, [_xN]: _EHx }], 1], + 2 + ]; + CreateBucketConfiguration$ = [ + 3, + n0, + _CBC, + 0, + [_LC, _L, _B, _T], + [0, () => LocationInfo$, () => BucketInfo$, [() => TagSet, 0]] + ]; + CreateBucketMetadataConfigurationRequest$ = [ + 3, + n0, + _CBMCR, + 0, + [_B, _MC, _CMD, _CA, _EBO], + [[0, 1], [() => MetadataConfiguration$, { [_hP]: 1, [_xN]: _MC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + CreateBucketMetadataTableConfigurationRequest$ = [ + 3, + n0, + _CBMTCR, + 0, + [_B, _MTC, _CMD, _CA, _EBO], + [[0, 1], [() => MetadataTableConfiguration$, { [_hP]: 1, [_xN]: _MTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + CreateBucketOutput$ = [ + 3, + n0, + _CBO, + 0, + [_L, _BA], + [[0, { [_hH]: _L }], [0, { [_hH]: _xaba }]] + ]; + CreateBucketRequest$ = [ + 3, + n0, + _CBR, + 0, + [_B, _ACL_, _CBC, _GFC, _GR, _GRACP, _GW, _GWACP, _OLEFB, _OO, _BN], + [[0, 1], [0, { [_hH]: _xaa }], [() => CreateBucketConfiguration$, { [_hP]: 1, [_xN]: _CBC }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [2, { [_hH]: _xabole }], [0, { [_hH]: _xaoo }], [0, { [_hH]: _xabn }]], + 1 + ]; + CreateMultipartUploadOutput$ = [ + 3, + n0, + _CMUOr, + { [_xN]: _IMUR }, + [_ADb, _ARI, _B, _K, _UI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC, _CA, _CT], + [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], [0, { [_xN]: _B }], 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]] + ]; + CreateMultipartUploadRequest$ = [ + 3, + n0, + _CMURr, + 0, + [_B, _K, _ACL_, _CC, _CDo, _CEo, _CL, _CTo, _Ex, _GFC, _GR, _GRACP, _GWACP, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _CA, _CT], + [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]], + 2 + ]; + CreateSessionOutput$ = [ + 3, + n0, + _CSO, + { [_xN]: _CSR }, + [_Cr, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE], + [[() => SessionCredentials$, { [_xN]: _Cr }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], + 1 + ]; + CreateSessionRequest$ = [ + 3, + n0, + _CSRr, + 0, + [_B, _SM, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE], + [[0, 1], [0, { [_hH]: _xacsm }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], + 1 + ]; + CSVInput$ = [ + 3, + n0, + _CSVIn, + 0, + [_FHI, _Com, _QEC, _RD, _FD, _QC, _AQRD], + [0, 0, 0, 0, 0, 0, 2] + ]; + CSVOutput$ = [ + 3, + n0, + _CSVO, + 0, + [_QF, _QEC, _RD, _FD, _QC], + [0, 0, 0, 0, 0] + ]; + DefaultRetention$ = [ + 3, + n0, + _DRe, + 0, + [_Mo, _D, _Y], + [0, 1, 1] + ]; + Delete$ = [ + 3, + n0, + _De, + 0, + [_Ob, _Q], + [[() => ObjectIdentifierList, { [_xF]: 1, [_xN]: _Obj }], 2], + 1 + ]; + DeleteBucketAnalyticsConfigurationRequest$ = [ + 3, + n0, + _DBACR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + DeleteBucketCorsRequest$ = [ + 3, + n0, + _DBCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketEncryptionRequest$ = [ + 3, + n0, + _DBER, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketIntelligentTieringConfigurationRequest$ = [ + 3, + n0, + _DBITCR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + DeleteBucketInventoryConfigurationRequest$ = [ + 3, + n0, + _DBICR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + DeleteBucketLifecycleRequest$ = [ + 3, + n0, + _DBLR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketMetadataConfigurationRequest$ = [ + 3, + n0, + _DBMCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketMetadataTableConfigurationRequest$ = [ + 3, + n0, + _DBMTCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketMetricsConfigurationRequest$ = [ + 3, + n0, + _DBMCRe, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + DeleteBucketOwnershipControlsRequest$ = [ + 3, + n0, + _DBOCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketPolicyRequest$ = [ + 3, + n0, + _DBPR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketReplicationRequest$ = [ + 3, + n0, + _DBRR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketRequest$ = [ + 3, + n0, + _DBR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketTaggingRequest$ = [ + 3, + n0, + _DBTR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeleteBucketWebsiteRequest$ = [ + 3, + n0, + _DBWR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + DeletedObject$ = [ + 3, + n0, + _DO, + 0, + [_K, _VI, _DM, _DMVI], + [0, 0, 2, 0] + ]; + DeleteMarkerEntry$ = [ + 3, + n0, + _DME, + 0, + [_O, _K, _VI, _IL, _LM], + [() => Owner$, 0, 0, 2, 4] + ]; + DeleteMarkerReplication$ = [ + 3, + n0, + _DMR, + 0, + [_S], + [0] + ]; + DeleteObjectOutput$ = [ + 3, + n0, + _DOO, + 0, + [_DM, _VI, _RC], + [[2, { [_hH]: _xadm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }]] + ]; + DeleteObjectRequest$ = [ + 3, + n0, + _DOR, + 0, + [_B, _K, _MFA, _VI, _RP, _BGR, _EBO, _IM, _IMLMT, _IMS], + [[0, 1], [0, 1], [0, { [_hH]: _xam_ }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [6, { [_hH]: _xaimlmt }], [1, { [_hH]: _xaims }]], + 2 + ]; + DeleteObjectsOutput$ = [ + 3, + n0, + _DOOe, + { [_xN]: _DRel }, + [_Del, _RC, _Er], + [[() => DeletedObjects, { [_xF]: 1 }], [0, { [_hH]: _xarc }], [() => Errors, { [_xF]: 1, [_xN]: _Err }]] + ]; + DeleteObjectsRequest$ = [ + 3, + n0, + _DORe, + 0, + [_B, _De, _MFA, _RP, _BGR, _EBO, _CA], + [[0, 1], [() => Delete$, { [_hP]: 1, [_xN]: _De }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], + 2 + ]; + DeleteObjectTaggingOutput$ = [ + 3, + n0, + _DOTO, + 0, + [_VI], + [[0, { [_hH]: _xavi }]] + ]; + DeleteObjectTaggingRequest$ = [ + 3, + n0, + _DOTR, + 0, + [_B, _K, _VI, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], + 2 + ]; + DeletePublicAccessBlockRequest$ = [ + 3, + n0, + _DPABR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + Destination$ = [ + 3, + n0, + _Des, + 0, + [_B, _A, _SC, _ACT, _EC, _RT, _Me], + [0, 0, 0, () => AccessControlTranslation$, () => EncryptionConfiguration$, () => ReplicationTime$, () => Metrics$], + 1 + ]; + DestinationResult$ = [ + 3, + n0, + _DRes, + 0, + [_TBT, _TBA, _TN], + [0, 0, 0] + ]; + Encryption$ = [ + 3, + n0, + _En, + 0, + [_ET, _KMSKI, _KMSC], + [0, [() => SSEKMSKeyId, 0], 0], + 1 + ]; + EncryptionConfiguration$ = [ + 3, + n0, + _EC, + 0, + [_RKKID], + [0] + ]; + EndEvent$ = [ + 3, + n0, + _EE, + 0, + [], + [] + ]; + _Error$ = [ + 3, + n0, + _Err, + 0, + [_K, _VI, _Cod, _Mes], + [0, 0, 0, 0] + ]; + ErrorDetails$ = [ + 3, + n0, + _ED, + 0, + [_ECr, _EM], + [0, 0] + ]; + ErrorDocument$ = [ + 3, + n0, + _EDr, + 0, + [_K], + [0], + 1 + ]; + EventBridgeConfiguration$ = [ + 3, + n0, + _EBC, + 0, + [], + [] + ]; + ExistingObjectReplication$ = [ + 3, + n0, + _EOR, + 0, + [_S], + [0], + 1 + ]; + FilterRule$ = [ + 3, + n0, + _FR, + 0, + [_N, _V], + [0, 0] + ]; + GetBucketAbacOutput$ = [ + 3, + n0, + _GBAO, + 0, + [_AS], + [[() => AbacStatus$, 16]] + ]; + GetBucketAbacRequest$ = [ + 3, + n0, + _GBAR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketAccelerateConfigurationOutput$ = [ + 3, + n0, + _GBACO, + { [_xN]: _AC }, + [_S, _RC], + [0, [0, { [_hH]: _xarc }]] + ]; + GetBucketAccelerateConfigurationRequest$ = [ + 3, + n0, + _GBACR, + 0, + [_B, _EBO, _RP], + [[0, 1], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 1 + ]; + GetBucketAclOutput$ = [ + 3, + n0, + _GBAOe, + { [_xN]: _ACP }, + [_O, _G], + [() => Owner$, [() => Grants, { [_xN]: _ACL }]] + ]; + GetBucketAclRequest$ = [ + 3, + n0, + _GBARe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketAnalyticsConfigurationOutput$ = [ + 3, + n0, + _GBACOe, + 0, + [_ACn], + [[() => AnalyticsConfiguration$, 16]] + ]; + GetBucketAnalyticsConfigurationRequest$ = [ + 3, + n0, + _GBACRe, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetBucketCorsOutput$ = [ + 3, + n0, + _GBCO, + { [_xN]: _CORSC }, + [_CORSR], + [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]] + ]; + GetBucketCorsRequest$ = [ + 3, + n0, + _GBCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketEncryptionOutput$ = [ + 3, + n0, + _GBEO, + 0, + [_SSEC], + [[() => ServerSideEncryptionConfiguration$, 16]] + ]; + GetBucketEncryptionRequest$ = [ + 3, + n0, + _GBER, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketIntelligentTieringConfigurationOutput$ = [ + 3, + n0, + _GBITCO, + 0, + [_ITC], + [[() => IntelligentTieringConfiguration$, 16]] + ]; + GetBucketIntelligentTieringConfigurationRequest$ = [ + 3, + n0, + _GBITCR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetBucketInventoryConfigurationOutput$ = [ + 3, + n0, + _GBICO, + 0, + [_IC], + [[() => InventoryConfiguration$, 16]] + ]; + GetBucketInventoryConfigurationRequest$ = [ + 3, + n0, + _GBICR, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetBucketLifecycleConfigurationOutput$ = [ + 3, + n0, + _GBLCO, + { [_xN]: _LCi }, + [_R, _TDMOS], + [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Ru }], [0, { [_hH]: _xatdmos }]] + ]; + GetBucketLifecycleConfigurationRequest$ = [ + 3, + n0, + _GBLCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketLocationOutput$ = [ + 3, + n0, + _GBLO, + { [_xN]: _LC }, + [_LC], + [0] + ]; + GetBucketLocationRequest$ = [ + 3, + n0, + _GBLR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketLoggingOutput$ = [ + 3, + n0, + _GBLOe, + { [_xN]: _BLS }, + [_LE], + [[() => LoggingEnabled$, 0]] + ]; + GetBucketLoggingRequest$ = [ + 3, + n0, + _GBLRe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketMetadataConfigurationOutput$ = [ + 3, + n0, + _GBMCO, + 0, + [_GBMCR], + [[() => GetBucketMetadataConfigurationResult$, 16]] + ]; + GetBucketMetadataConfigurationRequest$ = [ + 3, + n0, + _GBMCRe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketMetadataConfigurationResult$ = [ + 3, + n0, + _GBMCR, + 0, + [_MCR], + [() => MetadataConfigurationResult$], + 1 + ]; + GetBucketMetadataTableConfigurationOutput$ = [ + 3, + n0, + _GBMTCO, + 0, + [_GBMTCR], + [[() => GetBucketMetadataTableConfigurationResult$, 16]] + ]; + GetBucketMetadataTableConfigurationRequest$ = [ + 3, + n0, + _GBMTCRe, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketMetadataTableConfigurationResult$ = [ + 3, + n0, + _GBMTCR, + 0, + [_MTCR, _S, _Err], + [() => MetadataTableConfigurationResult$, 0, () => ErrorDetails$], + 2 + ]; + GetBucketMetricsConfigurationOutput$ = [ + 3, + n0, + _GBMCOe, + 0, + [_MCe], + [[() => MetricsConfiguration$, 16]] + ]; + GetBucketMetricsConfigurationRequest$ = [ + 3, + n0, + _GBMCRet, + 0, + [_B, _I, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetBucketNotificationConfigurationRequest$ = [ + 3, + n0, + _GBNCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketOwnershipControlsOutput$ = [ + 3, + n0, + _GBOCO, + 0, + [_OC], + [[() => OwnershipControls$, 16]] + ]; + GetBucketOwnershipControlsRequest$ = [ + 3, + n0, + _GBOCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketPolicyOutput$ = [ + 3, + n0, + _GBPO, + 0, + [_Po], + [[0, 16]] + ]; + GetBucketPolicyRequest$ = [ + 3, + n0, + _GBPR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketPolicyStatusOutput$ = [ + 3, + n0, + _GBPSO, + 0, + [_PS], + [[() => PolicyStatus$, 16]] + ]; + GetBucketPolicyStatusRequest$ = [ + 3, + n0, + _GBPSR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketReplicationOutput$ = [ + 3, + n0, + _GBRO, + 0, + [_RCe], + [[() => ReplicationConfiguration$, 16]] + ]; + GetBucketReplicationRequest$ = [ + 3, + n0, + _GBRR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketRequestPaymentOutput$ = [ + 3, + n0, + _GBRPO, + { [_xN]: _RPC }, + [_Pay], + [0] + ]; + GetBucketRequestPaymentRequest$ = [ + 3, + n0, + _GBRPR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketTaggingOutput$ = [ + 3, + n0, + _GBTO, + { [_xN]: _Tag }, + [_TS], + [[() => TagSet, 0]], + 1 + ]; + GetBucketTaggingRequest$ = [ + 3, + n0, + _GBTR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketVersioningOutput$ = [ + 3, + n0, + _GBVO, + { [_xN]: _VC }, + [_S, _MFAD], + [0, [0, { [_xN]: _MDf }]] + ]; + GetBucketVersioningRequest$ = [ + 3, + n0, + _GBVR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetBucketWebsiteOutput$ = [ + 3, + n0, + _GBWO, + { [_xN]: _WC }, + [_RART, _IDn, _EDr, _RR], + [() => RedirectAllRequestsTo$, () => IndexDocument$, () => ErrorDocument$, [() => RoutingRules, 0]] + ]; + GetBucketWebsiteRequest$ = [ + 3, + n0, + _GBWR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetObjectAclOutput$ = [ + 3, + n0, + _GOAO, + { [_xN]: _ACP }, + [_O, _G, _RC], + [() => Owner$, [() => Grants, { [_xN]: _ACL }], [0, { [_hH]: _xarc }]] + ]; + GetObjectAclRequest$ = [ + 3, + n0, + _GOAR, + 0, + [_B, _K, _VI, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetObjectAttributesOutput$ = [ + 3, + n0, + _GOAOe, + { [_xN]: _GOARe }, + [_DM, _LM, _VI, _RC, _ETa, _C, _OP, _SC, _OS], + [[2, { [_hH]: _xadm }], [4, { [_hH]: _LM_ }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }], 0, () => Checksum$, [() => GetObjectAttributesParts$, 0], 0, 1] + ]; + GetObjectAttributesParts$ = [ + 3, + n0, + _GOAP, + 0, + [_TPC, _PNM, _NPNM, _MP, _IT, _Pa], + [[1, { [_xN]: _PC }], 0, 0, 1, 2, [() => PartsList, { [_xF]: 1, [_xN]: _Par }]] + ]; + GetObjectAttributesRequest$ = [ + 3, + n0, + _GOARet, + 0, + [_B, _K, _OA, _VI, _MP, _PNM, _SSECA, _SSECK, _SSECKMD, _RP, _EBO], + [[0, 1], [0, 1], [64 | 0, { [_hH]: _xaoa }], [0, { [_hQ]: _vI }], [1, { [_hH]: _xamp }], [0, { [_hH]: _xapnm }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 3 + ]; + GetObjectLegalHoldOutput$ = [ + 3, + n0, + _GOLHO, + 0, + [_LH], + [[() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }]] + ]; + GetObjectLegalHoldRequest$ = [ + 3, + n0, + _GOLHR, + 0, + [_B, _K, _VI, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetObjectLockConfigurationOutput$ = [ + 3, + n0, + _GOLCO, + 0, + [_OLC], + [[() => ObjectLockConfiguration$, 16]] + ]; + GetObjectLockConfigurationRequest$ = [ + 3, + n0, + _GOLCR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GetObjectOutput$ = [ + 3, + n0, + _GOO, + 0, + [_Bo, _DM, _AR, _E, _Re, _LM, _CLo, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _MM, _VI, _CC, _CDo, _CEo, _CL, _CR, _CTo, _Ex, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS], + [[() => StreamingBlob, 16], [2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CR_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]] + ]; + GetObjectRequest$ = [ + 3, + n0, + _GOR, + 0, + [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh], + [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm }]], + 2 + ]; + GetObjectRetentionOutput$ = [ + 3, + n0, + _GORO, + 0, + [_Ret], + [[() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }]] + ]; + GetObjectRetentionRequest$ = [ + 3, + n0, + _GORR, + 0, + [_B, _K, _VI, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetObjectTaggingOutput$ = [ + 3, + n0, + _GOTO, + { [_xN]: _Tag }, + [_TS, _VI], + [[() => TagSet, 0], [0, { [_hH]: _xavi }]], + 1 + ]; + GetObjectTaggingRequest$ = [ + 3, + n0, + _GOTR, + 0, + [_B, _K, _VI, _EBO, _RP], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 2 + ]; + GetObjectTorrentOutput$ = [ + 3, + n0, + _GOTOe, + 0, + [_Bo, _RC], + [[() => StreamingBlob, 16], [0, { [_hH]: _xarc }]] + ]; + GetObjectTorrentRequest$ = [ + 3, + n0, + _GOTRe, + 0, + [_B, _K, _RP, _EBO], + [[0, 1], [0, 1], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 2 + ]; + GetPublicAccessBlockOutput$ = [ + 3, + n0, + _GPABO, + 0, + [_PABC], + [[() => PublicAccessBlockConfiguration$, 16]] + ]; + GetPublicAccessBlockRequest$ = [ + 3, + n0, + _GPABR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + GlacierJobParameters$ = [ + 3, + n0, + _GJP, + 0, + [_Ti], + [0], + 1 + ]; + Grant$ = [ + 3, + n0, + _Gr, + 0, + [_Gra, _Pe], + [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0] + ]; + Grantee$ = [ + 3, + n0, + _Gra, + 0, + [_Ty, _DN, _EA, _ID, _URI], + [[0, { [_xA]: 1, [_xN]: _xs }], 0, 0, 0, 0], + 1 + ]; + HeadBucketOutput$ = [ + 3, + n0, + _HBO, + 0, + [_BA, _BLT, _BLN, _BR, _APA], + [[0, { [_hH]: _xaba }], [0, { [_hH]: _xablt }], [0, { [_hH]: _xabln }], [0, { [_hH]: _xabr }], [2, { [_hH]: _xaapa }]] + ]; + HeadBucketRequest$ = [ + 3, + n0, + _HBR, + 0, + [_B, _EBO], + [[0, 1], [0, { [_hH]: _xaebo }]], + 1 + ]; + HeadObjectOutput$ = [ + 3, + n0, + _HOO, + 0, + [_DM, _AR, _E, _Re, _ASr, _LM, _CLo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _ETa, _MM, _VI, _CC, _CDo, _CEo, _CL, _CTo, _CR, _Ex, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS], + [[2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [0, { [_hH]: _xaas }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [0, { [_hH]: _ETa }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _CR_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]] + ]; + HeadObjectRequest$ = [ + 3, + n0, + _HOR, + 0, + [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh], + [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm }]], + 2 + ]; + IndexDocument$ = [ + 3, + n0, + _IDn, + 0, + [_Su], + [0], + 1 + ]; + Initiator$ = [ + 3, + n0, + _In, + 0, + [_ID, _DN], + [0, 0] + ]; + InputSerialization$ = [ + 3, + n0, + _IS, + 0, + [_CSV, _CTom, _JSON, _Parq], + [() => CSVInput$, 0, () => JSONInput$, () => ParquetInput$] + ]; + IntelligentTieringAndOperator$ = [ + 3, + n0, + _ITAO, + 0, + [_P, _T], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]] + ]; + IntelligentTieringConfiguration$ = [ + 3, + n0, + _ITC, + 0, + [_I, _S, _Tie, _F], + [0, 0, [() => TieringList, { [_xF]: 1, [_xN]: _Tier }], [() => IntelligentTieringFilter$, 0]], + 3 + ]; + IntelligentTieringFilter$ = [ + 3, + n0, + _ITF, + 0, + [_P, _Ta, _An], + [0, () => Tag$, [() => IntelligentTieringAndOperator$, 0]] + ]; + InventoryConfiguration$ = [ + 3, + n0, + _IC, + 0, + [_Des, _IE, _I, _IOV, _Sc, _F, _OF], + [[() => InventoryDestination$, 0], 2, 0, 0, () => InventorySchedule$, () => InventoryFilter$, [() => InventoryOptionalFields, 0]], + 5 + ]; + InventoryDestination$ = [ + 3, + n0, + _IDnv, + 0, + [_SBD], + [[() => InventoryS3BucketDestination$, 0]], + 1 + ]; + InventoryEncryption$ = [ + 3, + n0, + _IEn, + 0, + [_SSES, _SSEKMS], + [[() => SSES3$, { [_xN]: _SS }], [() => SSEKMS$, { [_xN]: _SK }]] + ]; + InventoryFilter$ = [ + 3, + n0, + _IF, + 0, + [_P], + [0], + 1 + ]; + InventoryS3BucketDestination$ = [ + 3, + n0, + _ISBD, + 0, + [_B, _Fo, _AI, _P, _En], + [0, 0, 0, 0, [() => InventoryEncryption$, 0]], + 2 + ]; + InventorySchedule$ = [ + 3, + n0, + _ISn, + 0, + [_Fr], + [0], + 1 + ]; + InventoryTableConfiguration$ = [ + 3, + n0, + _ITCn, + 0, + [_CSo, _EC], + [0, () => MetadataTableEncryptionConfiguration$], + 1 + ]; + InventoryTableConfigurationResult$ = [ + 3, + n0, + _ITCR, + 0, + [_CSo, _TSa, _Err, _TNa, _TA], + [0, 0, () => ErrorDetails$, 0, 0], + 1 + ]; + InventoryTableConfigurationUpdates$ = [ + 3, + n0, + _ITCU, + 0, + [_CSo, _EC], + [0, () => MetadataTableEncryptionConfiguration$], + 1 + ]; + JournalTableConfiguration$ = [ + 3, + n0, + _JTC, + 0, + [_REe, _EC], + [() => RecordExpiration$, () => MetadataTableEncryptionConfiguration$], + 1 + ]; + JournalTableConfigurationResult$ = [ + 3, + n0, + _JTCR, + 0, + [_TSa, _TNa, _REe, _Err, _TA], + [0, 0, () => RecordExpiration$, () => ErrorDetails$, 0], + 3 + ]; + JournalTableConfigurationUpdates$ = [ + 3, + n0, + _JTCU, + 0, + [_REe], + [() => RecordExpiration$], + 1 + ]; + JSONInput$ = [ + 3, + n0, + _JSONI, + 0, + [_Ty], + [0] + ]; + JSONOutput$ = [ + 3, + n0, + _JSONO, + 0, + [_RD], + [0] + ]; + LambdaFunctionConfiguration$ = [ + 3, + n0, + _LFC, + 0, + [_LFA, _Ev, _I, _F], + [[0, { [_xN]: _CF }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], + 2 + ]; + LifecycleExpiration$ = [ + 3, + n0, + _LEi, + 0, + [_Da, _D, _EODM], + [5, 1, 2] + ]; + LifecycleRule$ = [ + 3, + n0, + _LR, + 0, + [_S, _E, _ID, _P, _F, _Tr, _NVT, _NVE, _AIMU], + [0, () => LifecycleExpiration$, 0, 0, [() => LifecycleRuleFilter$, 0], [() => TransitionList, { [_xF]: 1, [_xN]: _Tra }], [() => NoncurrentVersionTransitionList, { [_xF]: 1, [_xN]: _NVTo }], () => NoncurrentVersionExpiration$, () => AbortIncompleteMultipartUpload$], + 1 + ]; + LifecycleRuleAndOperator$ = [ + 3, + n0, + _LRAO, + 0, + [_P, _T, _OSGT, _OSLT], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 1, 1] + ]; + LifecycleRuleFilter$ = [ + 3, + n0, + _LRF, + 0, + [_P, _Ta, _OSGT, _OSLT, _An], + [0, () => Tag$, 1, 1, [() => LifecycleRuleAndOperator$, 0]] + ]; + ListBucketAnalyticsConfigurationsOutput$ = [ + 3, + n0, + _LBACO, + { [_xN]: _LBACR }, + [_IT, _CTon, _NCT, _ACLn], + [2, 0, 0, [() => AnalyticsConfigurationList, { [_xF]: 1, [_xN]: _ACn }]] + ]; + ListBucketAnalyticsConfigurationsRequest$ = [ + 3, + n0, + _LBACRi, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 + ]; + ListBucketIntelligentTieringConfigurationsOutput$ = [ + 3, + n0, + _LBITCO, + 0, + [_IT, _CTon, _NCT, _ITCL], + [2, 0, 0, [() => IntelligentTieringConfigurationList, { [_xF]: 1, [_xN]: _ITC }]] + ]; + ListBucketIntelligentTieringConfigurationsRequest$ = [ + 3, + n0, + _LBITCR, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 + ]; + ListBucketInventoryConfigurationsOutput$ = [ + 3, + n0, + _LBICO, + { [_xN]: _LICR }, + [_CTon, _ICL, _IT, _NCT], + [0, [() => InventoryConfigurationList, { [_xF]: 1, [_xN]: _IC }], 2, 0] + ]; + ListBucketInventoryConfigurationsRequest$ = [ + 3, + n0, + _LBICR, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 + ]; + ListBucketMetricsConfigurationsOutput$ = [ + 3, + n0, + _LBMCO, + { [_xN]: _LMCR }, + [_IT, _CTon, _NCT, _MCL], + [2, 0, 0, [() => MetricsConfigurationList, { [_xF]: 1, [_xN]: _MCe }]] + ]; + ListBucketMetricsConfigurationsRequest$ = [ + 3, + n0, + _LBMCR, + 0, + [_B, _CTon, _EBO], + [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], + 1 + ]; + ListBucketsOutput$ = [ + 3, + n0, + _LBO, + { [_xN]: _LAMBR }, + [_Bu, _O, _CTon, _P], + [[() => Buckets, 0], () => Owner$, 0, 0] + ]; + ListBucketsRequest$ = [ + 3, + n0, + _LBR, + 0, + [_MB, _CTon, _P, _BR], + [[1, { [_hQ]: _mb }], [0, { [_hQ]: _ct }], [0, { [_hQ]: _p }], [0, { [_hQ]: _br }]] + ]; + ListDirectoryBucketsOutput$ = [ + 3, + n0, + _LDBO, + { [_xN]: _LAMDBR }, + [_Bu, _CTon], + [[() => Buckets, 0], 0] + ]; + ListDirectoryBucketsRequest$ = [ + 3, + n0, + _LDBR, + 0, + [_CTon, _MDB], + [[0, { [_hQ]: _ct }], [1, { [_hQ]: _mdb }]] + ]; + ListMultipartUploadsOutput$ = [ + 3, + n0, + _LMUO, + { [_xN]: _LMUR }, + [_B, _KM, _UIM, _NKM, _P, _Deli, _NUIM, _MUa, _IT, _U, _CPom, _ETn, _RC], + [0, 0, 0, 0, 0, 0, 0, 1, 2, [() => MultipartUploadList, { [_xF]: 1, [_xN]: _Up }], [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]] + ]; + ListMultipartUploadsRequest$ = [ + 3, + n0, + _LMURi, + 0, + [_B, _Deli, _ETn, _KM, _MUa, _P, _UIM, _EBO, _RP], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mu }], [0, { [_hQ]: _p }], [0, { [_hQ]: _uim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 1 + ]; + ListObjectsOutput$ = [ + 3, + n0, + _LOO, + { [_xN]: _LBRi }, + [_IT, _Ma, _NM, _Con, _N, _P, _Deli, _MK, _CPom, _ETn, _RC], + [2, 0, 0, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]] + ]; + ListObjectsRequest$ = [ + 3, + n0, + _LOR, + 0, + [_B, _Deli, _ETn, _Ma, _MK, _P, _RP, _EBO, _OOA], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _m }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], + 1 + ]; + ListObjectsV2Output$ = [ + 3, + n0, + _LOVO, + { [_xN]: _LBRi }, + [_IT, _Con, _N, _P, _Deli, _MK, _CPom, _ETn, _KC, _CTon, _NCT, _SA, _RC], + [2, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, 1, 0, 0, 0, [0, { [_hH]: _xarc }]] + ]; + ListObjectsV2Request$ = [ + 3, + n0, + _LOVR, + 0, + [_B, _Deli, _ETn, _MK, _P, _CTon, _FO, _SA, _RP, _EBO, _OOA], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _ct }], [2, { [_hQ]: _fo }], [0, { [_hQ]: _sa }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], + 1 + ]; + ListObjectVersionsOutput$ = [ + 3, + n0, + _LOVOi, + { [_xN]: _LVR }, + [_IT, _KM, _VIM, _NKM, _NVIM, _Ve, _DMe, _N, _P, _Deli, _MK, _CPom, _ETn, _RC], + [2, 0, 0, 0, 0, [() => ObjectVersionList, { [_xF]: 1, [_xN]: _Ver }], [() => DeleteMarkers, { [_xF]: 1, [_xN]: _DM }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]] + ]; + ListObjectVersionsRequest$ = [ + 3, + n0, + _LOVRi, + 0, + [_B, _Deli, _ETn, _KM, _MK, _P, _VIM, _EBO, _RP, _OOA], + [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _vim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }], [64 | 0, { [_hH]: _xaooa }]], + 1 + ]; + ListPartsOutput$ = [ + 3, + n0, + _LPO, + { [_xN]: _LPR }, + [_ADb, _ARI, _B, _K, _UI, _PNM, _NPNM, _MP, _IT, _Pa, _In, _O, _SC, _RC, _CA, _CT], + [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], 0, 0, 0, 0, 0, 1, 2, [() => Parts, { [_xF]: 1, [_xN]: _Par }], () => Initiator$, () => Owner$, 0, [0, { [_hH]: _xarc }], 0, 0] + ]; + ListPartsRequest$ = [ + 3, + n0, + _LPRi, + 0, + [_B, _K, _UI, _MP, _PNM, _RP, _EBO, _SSECA, _SSECK, _SSECKMD], + [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [1, { [_hQ]: _mp }], [0, { [_hQ]: _pnm }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], + 3 + ]; + LocationInfo$ = [ + 3, + n0, + _LI, + 0, + [_Ty, _N], + [0, 0] + ]; + LoggingEnabled$ = [ + 3, + n0, + _LE, + 0, + [_TB, _TP, _TG, _TOKF], + [0, 0, [() => TargetGrants, 0], [() => TargetObjectKeyFormat$, 0]], + 2 + ]; + MetadataConfiguration$ = [ + 3, + n0, + _MC, + 0, + [_JTC, _ITCn], + [() => JournalTableConfiguration$, () => InventoryTableConfiguration$], + 1 + ]; + MetadataConfigurationResult$ = [ + 3, + n0, + _MCR, + 0, + [_DRes, _JTCR, _ITCR], + [() => DestinationResult$, () => JournalTableConfigurationResult$, () => InventoryTableConfigurationResult$], + 1 + ]; + MetadataEntry$ = [ + 3, + n0, + _ME, + 0, + [_N, _V], + [0, 0] + ]; + MetadataTableConfiguration$ = [ + 3, + n0, + _MTC, + 0, + [_STD], + [() => S3TablesDestination$], + 1 + ]; + MetadataTableConfigurationResult$ = [ + 3, + n0, + _MTCR, + 0, + [_STDR], + [() => S3TablesDestinationResult$], + 1 + ]; + MetadataTableEncryptionConfiguration$ = [ + 3, + n0, + _MTEC, + 0, + [_SAs, _KKA], + [0, 0], + 1 + ]; + Metrics$ = [ + 3, + n0, + _Me, + 0, + [_S, _ETv], + [0, () => ReplicationTimeValue$], + 1 + ]; + MetricsAndOperator$ = [ + 3, + n0, + _MAO, + 0, + [_P, _T, _APAc], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 0] + ]; + MetricsConfiguration$ = [ + 3, + n0, + _MCe, + 0, + [_I, _F], + [0, [() => MetricsFilter$, 0]], + 1 + ]; + MultipartUpload$ = [ + 3, + n0, + _MU, + 0, + [_UI, _K, _Ini, _SC, _O, _In, _CA, _CT], + [0, 0, 4, 0, () => Owner$, () => Initiator$, 0, 0] + ]; + NoncurrentVersionExpiration$ = [ + 3, + n0, + _NVE, + 0, + [_ND, _NNV], + [1, 1] + ]; + NoncurrentVersionTransition$ = [ + 3, + n0, + _NVTo, + 0, + [_ND, _SC, _NNV], + [1, 0, 1] + ]; + NotificationConfiguration$ = [ + 3, + n0, + _NC, + 0, + [_TCo, _QCu, _LFCa, _EBC], + [[() => TopicConfigurationList, { [_xF]: 1, [_xN]: _TCop }], [() => QueueConfigurationList, { [_xF]: 1, [_xN]: _QCue }], [() => LambdaFunctionConfigurationList, { [_xF]: 1, [_xN]: _CFC }], () => EventBridgeConfiguration$] + ]; + NotificationConfigurationFilter$ = [ + 3, + n0, + _NCF, + 0, + [_K], + [[() => S3KeyFilter$, { [_xN]: _SKe }]] + ]; + _Object$ = [ + 3, + n0, + _Obj, + 0, + [_K, _LM, _ETa, _CA, _CT, _Si, _SC, _O, _RSe], + [0, 4, 0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, () => Owner$, () => RestoreStatus$] + ]; + ObjectIdentifier$ = [ + 3, + n0, + _OI, + 0, + [_K, _VI, _ETa, _LMT, _Si], + [0, 0, 0, 6, 1], + 1 + ]; + ObjectLockConfiguration$ = [ + 3, + n0, + _OLC, + 0, + [_OLE, _Ru], + [0, () => ObjectLockRule$] + ]; + ObjectLockLegalHold$ = [ + 3, + n0, + _OLLH, + 0, + [_S], + [0] + ]; + ObjectLockRetention$ = [ + 3, + n0, + _OLR, + 0, + [_Mo, _RUD], + [0, 5] + ]; + ObjectLockRule$ = [ + 3, + n0, + _OLRb, + 0, + [_DRe], + [() => DefaultRetention$] + ]; + ObjectPart$ = [ + 3, + n0, + _OPb, + 0, + [_PN, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh], + [1, 1, 0, 0, 0, 0, 0] + ]; + ObjectVersion$ = [ + 3, + n0, + _OV, + 0, + [_ETa, _CA, _CT, _Si, _SC, _K, _VI, _IL, _LM, _O, _RSe], + [0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, 0, 0, 2, 4, () => Owner$, () => RestoreStatus$] + ]; + OutputLocation$ = [ + 3, + n0, + _OL, + 0, + [_S_], + [[() => S3Location$, 0]] + ]; + OutputSerialization$ = [ + 3, + n0, + _OSu, + 0, + [_CSV, _JSON], + [() => CSVOutput$, () => JSONOutput$] + ]; + Owner$ = [ + 3, + n0, + _O, + 0, + [_DN, _ID], + [0, 0] + ]; + OwnershipControls$ = [ + 3, + n0, + _OC, + 0, + [_R], + [[() => OwnershipControlsRules, { [_xF]: 1, [_xN]: _Ru }]], + 1 + ]; + OwnershipControlsRule$ = [ + 3, + n0, + _OCR, + 0, + [_OO], + [0], + 1 + ]; + ParquetInput$ = [ + 3, + n0, + _PI, + 0, + [], + [] + ]; + Part$ = [ + 3, + n0, + _Par, + 0, + [_PN, _LM, _ETa, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh], + [1, 4, 0, 1, 0, 0, 0, 0, 0] + ]; + PartitionedPrefix$ = [ + 3, + n0, + _PP, + { [_xN]: _PP }, + [_PDS], + [0] + ]; + PolicyStatus$ = [ + 3, + n0, + _PS, + 0, + [_IP], + [[2, { [_xN]: _IP }]] + ]; + Progress$ = [ + 3, + n0, + _Pr, + 0, + [_BS, _BP, _BRy], + [1, 1, 1] + ]; + ProgressEvent$ = [ + 3, + n0, + _PE, + 0, + [_Det], + [[() => Progress$, { [_eP]: 1 }]] + ]; + PublicAccessBlockConfiguration$ = [ + 3, + n0, + _PABC, + 0, + [_BPA, _IPA, _BPP, _RPB], + [[2, { [_xN]: _BPA }], [2, { [_xN]: _IPA }], [2, { [_xN]: _BPP }], [2, { [_xN]: _RPB }]] + ]; + PutBucketAbacRequest$ = [ + 3, + n0, + _PBAR, + 0, + [_B, _AS, _CMD, _CA, _EBO], + [[0, 1], [() => AbacStatus$, { [_hP]: 1, [_xN]: _AS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketAccelerateConfigurationRequest$ = [ + 3, + n0, + _PBACR, + 0, + [_B, _AC, _EBO, _CA], + [[0, 1], [() => AccelerateConfiguration$, { [_hP]: 1, [_xN]: _AC }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], + 2 + ]; + PutBucketAclRequest$ = [ + 3, + n0, + _PBARu, + 0, + [_B, _ACL_, _ACP, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _EBO], + [[0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xaebo }]], + 1 + ]; + PutBucketAnalyticsConfigurationRequest$ = [ + 3, + n0, + _PBACRu, + 0, + [_B, _I, _ACn, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => AnalyticsConfiguration$, { [_hP]: 1, [_xN]: _ACn }], [0, { [_hH]: _xaebo }]], + 3 + ]; + PutBucketCorsRequest$ = [ + 3, + n0, + _PBCR, + 0, + [_B, _CORSC, _CMD, _CA, _EBO], + [[0, 1], [() => CORSConfiguration$, { [_hP]: 1, [_xN]: _CORSC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketEncryptionRequest$ = [ + 3, + n0, + _PBER, + 0, + [_B, _SSEC, _CMD, _CA, _EBO], + [[0, 1], [() => ServerSideEncryptionConfiguration$, { [_hP]: 1, [_xN]: _SSEC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketIntelligentTieringConfigurationRequest$ = [ + 3, + n0, + _PBITCR, + 0, + [_B, _I, _ITC, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => IntelligentTieringConfiguration$, { [_hP]: 1, [_xN]: _ITC }], [0, { [_hH]: _xaebo }]], + 3 + ]; + PutBucketInventoryConfigurationRequest$ = [ + 3, + n0, + _PBICR, + 0, + [_B, _I, _IC, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => InventoryConfiguration$, { [_hP]: 1, [_xN]: _IC }], [0, { [_hH]: _xaebo }]], + 3 + ]; + PutBucketLifecycleConfigurationOutput$ = [ + 3, + n0, + _PBLCO, + 0, + [_TDMOS], + [[0, { [_hH]: _xatdmos }]] + ]; + PutBucketLifecycleConfigurationRequest$ = [ + 3, + n0, + _PBLCR, + 0, + [_B, _CA, _LCi, _EBO, _TDMOS], + [[0, 1], [0, { [_hH]: _xasca }], [() => BucketLifecycleConfiguration$, { [_hP]: 1, [_xN]: _LCi }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xatdmos }]], + 1 + ]; + PutBucketLoggingRequest$ = [ + 3, + n0, + _PBLR, + 0, + [_B, _BLS, _CMD, _CA, _EBO], + [[0, 1], [() => BucketLoggingStatus$, { [_hP]: 1, [_xN]: _BLS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketMetricsConfigurationRequest$ = [ + 3, + n0, + _PBMCR, + 0, + [_B, _I, _MCe, _EBO], + [[0, 1], [0, { [_hQ]: _i }], [() => MetricsConfiguration$, { [_hP]: 1, [_xN]: _MCe }], [0, { [_hH]: _xaebo }]], + 3 + ]; + PutBucketNotificationConfigurationRequest$ = [ + 3, + n0, + _PBNCR, + 0, + [_B, _NC, _EBO, _SDV], + [[0, 1], [() => NotificationConfiguration$, { [_hP]: 1, [_xN]: _NC }], [0, { [_hH]: _xaebo }], [2, { [_hH]: _xasdv }]], + 2 + ]; + PutBucketOwnershipControlsRequest$ = [ + 3, + n0, + _PBOCR, + 0, + [_B, _OC, _CMD, _EBO, _CA], + [[0, 1], [() => OwnershipControls$, { [_hP]: 1, [_xN]: _OC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], + 2 + ]; + PutBucketPolicyRequest$ = [ + 3, + n0, + _PBPR, + 0, + [_B, _Po, _CMD, _CA, _CRSBA, _EBO], + [[0, 1], [0, 16], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [2, { [_hH]: _xacrsba }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketReplicationRequest$ = [ + 3, + n0, + _PBRR, + 0, + [_B, _RCe, _CMD, _CA, _To, _EBO], + [[0, 1], [() => ReplicationConfiguration$, { [_hP]: 1, [_xN]: _RCe }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketRequestPaymentRequest$ = [ + 3, + n0, + _PBRPR, + 0, + [_B, _RPC, _CMD, _CA, _EBO], + [[0, 1], [() => RequestPaymentConfiguration$, { [_hP]: 1, [_xN]: _RPC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketTaggingRequest$ = [ + 3, + n0, + _PBTR, + 0, + [_B, _Tag, _CMD, _CA, _EBO], + [[0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketVersioningRequest$ = [ + 3, + n0, + _PBVR, + 0, + [_B, _VC, _CMD, _CA, _MFA, _EBO], + [[0, 1], [() => VersioningConfiguration$, { [_hP]: 1, [_xN]: _VC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutBucketWebsiteRequest$ = [ + 3, + n0, + _PBWR, + 0, + [_B, _WC, _CMD, _CA, _EBO], + [[0, 1], [() => WebsiteConfiguration$, { [_hP]: 1, [_xN]: _WC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutObjectAclOutput$ = [ + 3, + n0, + _POAO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + PutObjectAclRequest$ = [ + 3, + n0, + _POAR, + 0, + [_B, _K, _ACL_, _ACP, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _RP, _VI, _EBO], + [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutObjectLegalHoldOutput$ = [ + 3, + n0, + _POLHO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + PutObjectLegalHoldRequest$ = [ + 3, + n0, + _POLHR, + 0, + [_B, _K, _LH, _RP, _VI, _CMD, _CA, _EBO], + [[0, 1], [0, 1], [() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutObjectLockConfigurationOutput$ = [ + 3, + n0, + _POLCO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + PutObjectLockConfigurationRequest$ = [ + 3, + n0, + _POLCR, + 0, + [_B, _OLC, _RP, _To, _CMD, _CA, _EBO], + [[0, 1], [() => ObjectLockConfiguration$, { [_hP]: 1, [_xN]: _OLC }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 1 + ]; + PutObjectOutput$ = [ + 3, + n0, + _POO, + 0, + [_E, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _SSE, _VI, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _Si, _RC], + [[0, { [_hH]: _xae }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [1, { [_hH]: _xaos }], [0, { [_hH]: _xarc }]] + ]; + PutObjectRequest$ = [ + 3, + n0, + _POR, + 0, + [_B, _K, _ACL_, _Bo, _CC, _CDo, _CEo, _CL, _CLo, _CMD, _CTo, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _Ex, _IM, _INM, _GFC, _GR, _GRACP, _GWACP, _WOB, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO], + [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => StreamingBlob, 16], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [1, { [_hH]: _xawob }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutObjectRetentionOutput$ = [ + 3, + n0, + _PORO, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + PutObjectRetentionRequest$ = [ + 3, + n0, + _PORR, + 0, + [_B, _K, _Ret, _RP, _VI, _BGR, _CMD, _CA, _EBO], + [[0, 1], [0, 1], [() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + PutObjectTaggingOutput$ = [ + 3, + n0, + _POTO, + 0, + [_VI], + [[0, { [_hH]: _xavi }]] + ]; + PutObjectTaggingRequest$ = [ + 3, + n0, + _POTR, + 0, + [_B, _K, _Tag, _VI, _CMD, _CA, _EBO, _RP], + [[0, 1], [0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], + 3 + ]; + PutPublicAccessBlockRequest$ = [ + 3, + n0, + _PPABR, + 0, + [_B, _PABC, _CMD, _CA, _EBO], + [[0, 1], [() => PublicAccessBlockConfiguration$, { [_hP]: 1, [_xN]: _PABC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + QueueConfiguration$ = [ + 3, + n0, + _QCue, + 0, + [_QA, _Ev, _I, _F], + [[0, { [_xN]: _Qu }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], + 2 + ]; + RecordExpiration$ = [ + 3, + n0, + _REe, + 0, + [_E, _D], + [0, 1], + 1 + ]; + RecordsEvent$ = [ + 3, + n0, + _REec, + 0, + [_Payl], + [[21, { [_eP]: 1 }]] + ]; + Redirect$ = [ + 3, + n0, + _Red, + 0, + [_HN, _HRC, _Pro, _RKPW, _RKW], + [0, 0, 0, 0, 0] + ]; + RedirectAllRequestsTo$ = [ + 3, + n0, + _RART, + 0, + [_HN, _Pro], + [0, 0], + 1 + ]; + RenameObjectOutput$ = [ + 3, + n0, + _ROO, + 0, + [], + [] + ]; + RenameObjectRequest$ = [ + 3, + n0, + _ROR, + 0, + [_B, _K, _RSen, _DIM, _DINM, _DIMS, _DIUS, _SIM, _SINM, _SIMS, _SIUS, _CTl], + [[0, 1], [0, 1], [0, { [_hH]: _xars_ }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IMS_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _xarsim }], [0, { [_hH]: _xarsinm }], [6, { [_hH]: _xarsims }], [6, { [_hH]: _xarsius }], [0, { [_hH]: _xact_, [_iT]: 1 }]], + 3 + ]; + ReplicaModifications$ = [ + 3, + n0, + _RM, + 0, + [_S], + [0], + 1 + ]; + ReplicationConfiguration$ = [ + 3, + n0, + _RCe, + 0, + [_Ro, _R], + [0, [() => ReplicationRules, { [_xF]: 1, [_xN]: _Ru }]], + 2 + ]; + ReplicationRule$ = [ + 3, + n0, + _RRe, + 0, + [_S, _Des, _ID, _Pri, _P, _F, _SSC, _EOR, _DMR], + [0, () => Destination$, 0, 1, 0, [() => ReplicationRuleFilter$, 0], () => SourceSelectionCriteria$, () => ExistingObjectReplication$, () => DeleteMarkerReplication$], + 2 + ]; + ReplicationRuleAndOperator$ = [ + 3, + n0, + _RRAO, + 0, + [_P, _T], + [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]] + ]; + ReplicationRuleFilter$ = [ + 3, + n0, + _RRF, + 0, + [_P, _Ta, _An], + [0, () => Tag$, [() => ReplicationRuleAndOperator$, 0]] + ]; + ReplicationTime$ = [ + 3, + n0, + _RT, + 0, + [_S, _Tim], + [0, () => ReplicationTimeValue$], + 2 + ]; + ReplicationTimeValue$ = [ + 3, + n0, + _RTV, + 0, + [_Mi], + [1] + ]; + RequestPaymentConfiguration$ = [ + 3, + n0, + _RPC, + 0, + [_Pay], + [0], + 1 + ]; + RequestProgress$ = [ + 3, + n0, + _RPe, + 0, + [_Ena], + [2] + ]; + RestoreObjectOutput$ = [ + 3, + n0, + _ROOe, + 0, + [_RC, _ROP], + [[0, { [_hH]: _xarc }], [0, { [_hH]: _xarop }]] + ]; + RestoreObjectRequest$ = [ + 3, + n0, + _RORe, + 0, + [_B, _K, _VI, _RRes, _RP, _CA, _EBO], + [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [() => RestoreRequest$, { [_hP]: 1, [_xN]: _RRes }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + RestoreRequest$ = [ + 3, + n0, + _RRes, + 0, + [_D, _GJP, _Ty, _Ti, _Desc, _SP, _OL], + [1, () => GlacierJobParameters$, 0, 0, 0, () => SelectParameters$, [() => OutputLocation$, 0]] + ]; + RestoreStatus$ = [ + 3, + n0, + _RSe, + 0, + [_IRIP, _RED], + [2, 4] + ]; + RoutingRule$ = [ + 3, + n0, + _RRo, + 0, + [_Red, _Co], + [() => Redirect$, () => Condition$], + 1 + ]; + S3KeyFilter$ = [ + 3, + n0, + _SKF, + 0, + [_FRi], + [[() => FilterRuleList, { [_xF]: 1, [_xN]: _FR }]] + ]; + S3Location$ = [ + 3, + n0, + _SL, + 0, + [_BNu, _P, _En, _CACL, _ACL, _Tag, _UM, _SC], + [0, 0, [() => Encryption$, 0], 0, [() => Grants, 0], [() => Tagging$, 0], [() => UserMetadata, 0], 0], + 2 + ]; + S3TablesDestination$ = [ + 3, + n0, + _STD, + 0, + [_TBA, _TNa], + [0, 0], + 2 + ]; + S3TablesDestinationResult$ = [ + 3, + n0, + _STDR, + 0, + [_TBA, _TNa, _TA, _TN], + [0, 0, 0, 0], + 4 + ]; + ScanRange$ = [ + 3, + n0, + _SR, + 0, + [_St, _End], + [1, 1] + ]; + SelectObjectContentOutput$ = [ + 3, + n0, + _SOCO, + 0, + [_Payl], + [[() => SelectObjectContentEventStream$, 16]] + ]; + SelectObjectContentRequest$ = [ + 3, + n0, + _SOCR, + 0, + [_B, _K, _Exp, _ETx, _IS, _OSu, _SSECA, _SSECK, _SSECKMD, _RPe, _SR, _EBO], + [[0, 1], [0, 1], 0, 0, () => InputSerialization$, () => OutputSerialization$, [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], () => RequestProgress$, () => ScanRange$, [0, { [_hH]: _xaebo }]], + 6 + ]; + SelectParameters$ = [ + 3, + n0, + _SP, + 0, + [_IS, _ETx, _Exp, _OSu], + [() => InputSerialization$, 0, 0, () => OutputSerialization$], + 4 + ]; + ServerSideEncryptionByDefault$ = [ + 3, + n0, + _SSEBD, + 0, + [_SSEA, _KMSMKID], + [0, [() => SSEKMSKeyId, 0]], + 1 + ]; + ServerSideEncryptionConfiguration$ = [ + 3, + n0, + _SSEC, + 0, + [_R], + [[() => ServerSideEncryptionRules, { [_xF]: 1, [_xN]: _Ru }]], + 1 + ]; + ServerSideEncryptionRule$ = [ + 3, + n0, + _SSER, + 0, + [_ASSEBD, _BKE, _BET], + [[() => ServerSideEncryptionByDefault$, 0], 2, [() => BlockedEncryptionTypes$, 0]] + ]; + SessionCredentials$ = [ + 3, + n0, + _SCe, + 0, + [_AKI, _SAK, _ST, _E], + [[0, { [_xN]: _AKI }], [() => SessionCredentialValue, { [_xN]: _SAK }], [() => SessionCredentialValue, { [_xN]: _ST }], [4, { [_xN]: _E }]], + 4 + ]; + SimplePrefix$ = [ + 3, + n0, + _SPi, + { [_xN]: _SPi }, + [], + [] + ]; + SourceSelectionCriteria$ = [ + 3, + n0, + _SSC, + 0, + [_SKEO, _RM], + [() => SseKmsEncryptedObjects$, () => ReplicaModifications$] + ]; + SSEKMS$ = [ + 3, + n0, + _SSEKMS, + { [_xN]: _SK }, + [_KI], + [[() => SSEKMSKeyId, 0]], + 1 + ]; + SseKmsEncryptedObjects$ = [ + 3, + n0, + _SKEO, + 0, + [_S], + [0], + 1 + ]; + SSEKMSEncryption$ = [ + 3, + n0, + _SSEKMSE, + { [_xN]: _SK }, + [_KMSKA, _BKE], + [[() => NonEmptyKmsKeyArnString, 0], 2], + 1 + ]; + SSES3$ = [ + 3, + n0, + _SSES, + { [_xN]: _SS }, + [], + [] + ]; + Stats$ = [ + 3, + n0, + _Sta, + 0, + [_BS, _BP, _BRy], + [1, 1, 1] + ]; + StatsEvent$ = [ + 3, + n0, + _SE, + 0, + [_Det], + [[() => Stats$, { [_eP]: 1 }]] + ]; + StorageClassAnalysis$ = [ + 3, + n0, + _SCA, + 0, + [_DE], + [() => StorageClassAnalysisDataExport$] + ]; + StorageClassAnalysisDataExport$ = [ + 3, + n0, + _SCADE, + 0, + [_OSV, _Des], + [0, () => AnalyticsExportDestination$], + 2 + ]; + Tag$ = [ + 3, + n0, + _Ta, + 0, + [_K, _V], + [0, 0], + 2 + ]; + Tagging$ = [ + 3, + n0, + _Tag, + 0, + [_TS], + [[() => TagSet, 0]], + 1 + ]; + TargetGrant$ = [ + 3, + n0, + _TGa, + 0, + [_Gra, _Pe], + [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0] + ]; + TargetObjectKeyFormat$ = [ + 3, + n0, + _TOKF, + 0, + [_SPi, _PP], + [[() => SimplePrefix$, { [_xN]: _SPi }], [() => PartitionedPrefix$, { [_xN]: _PP }]] + ]; + Tiering$ = [ + 3, + n0, + _Tier, + 0, + [_D, _AT], + [1, 0], + 2 + ]; + TopicConfiguration$ = [ + 3, + n0, + _TCop, + 0, + [_TAo, _Ev, _I, _F], + [[0, { [_xN]: _Top }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], + 2 + ]; + Transition$ = [ + 3, + n0, + _Tra, + 0, + [_Da, _D, _SC], + [5, 1, 0] + ]; + UpdateBucketMetadataInventoryTableConfigurationRequest$ = [ + 3, + n0, + _UBMITCR, + 0, + [_B, _ITCn, _CMD, _CA, _EBO], + [[0, 1], [() => InventoryTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _ITCn }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + UpdateBucketMetadataJournalTableConfigurationRequest$ = [ + 3, + n0, + _UBMJTCR, + 0, + [_B, _JTC, _CMD, _CA, _EBO], + [[0, 1], [() => JournalTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _JTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], + 2 + ]; + UpdateObjectEncryptionRequest$ = [ + 3, + n0, + _UOER, + 0, + [_B, _K, _OE, _VI, _RP, _EBO, _CMD, _CA], + [[0, 1], [0, 1], [() => ObjectEncryption$, 16], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }]], + 3 + ]; + UpdateObjectEncryptionResponse$ = [ + 3, + n0, + _UOERp, + 0, + [_RC], + [[0, { [_hH]: _xarc }]] + ]; + UploadPartCopyOutput$ = [ + 3, + n0, + _UPCO, + 0, + [_CSVI, _CPR, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC], + [[0, { [_hH]: _xacsvi }], [() => CopyPartResult$, 16], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] + ]; + UploadPartCopyRequest$ = [ + 3, + n0, + _UPCR, + 0, + [_B, _CS, _K, _PN, _UI, _CSIM, _CSIMS, _CSINM, _CSIUS, _CSRo, _SSECA, _SSECK, _SSECKMD, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _EBO, _ESBO], + [[0, 1], [0, { [_hH]: _xacs__ }], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [0, { [_hH]: _xacsr }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], + 5 + ]; + UploadPartOutput$ = [ + 3, + n0, + _UPO, + 0, + [_SSE, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC], + [[0, { [_hH]: _xasse }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]] + ]; + UploadPartRequest$ = [ + 3, + n0, + _UPR, + 0, + [_B, _K, _PN, _UI, _Bo, _CLo, _CMD, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _SSECA, _SSECK, _SSECKMD, _RP, _EBO], + [[0, 1], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [() => StreamingBlob, 16], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], + 4 + ]; + VersioningConfiguration$ = [ + 3, + n0, + _VC, + 0, + [_MFAD, _S], + [[0, { [_xN]: _MDf }], 0] + ]; + WebsiteConfiguration$ = [ + 3, + n0, + _WC, + 0, + [_EDr, _IDn, _RART, _RR], + [() => ErrorDocument$, () => IndexDocument$, () => RedirectAllRequestsTo$, [() => RoutingRules, 0]] + ]; + WriteGetObjectResponseRequest$ = [ + 3, + n0, + _WGORR, + 0, + [_RReq, _RTe, _Bo, _SCt, _ECr, _EM, _AR, _CC, _CDo, _CEo, _CL, _CLo, _CR, _CTo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _DM, _ETa, _Ex, _E, _LM, _MM, _M, _OLM, _OLLHS, _OLRUD, _PC, _RS, _RC, _Re, _SSE, _SSECA, _SSEKMSKI, _SSECKMD, _SC, _TC, _VI, _BKE], + [[0, { [_hL]: 1, [_hH]: _xarr }], [0, { [_hH]: _xart }], [() => StreamingBlob, 16], [1, { [_hH]: _xafs }], [0, { [_hH]: _xafec }], [0, { [_hH]: _xafem }], [0, { [_hH]: _xafhar }], [0, { [_hH]: _xafhCC }], [0, { [_hH]: _xafhCD }], [0, { [_hH]: _xafhCE }], [0, { [_hH]: _xafhCL }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xafhCR }], [0, { [_hH]: _xafhCT }], [0, { [_hH]: _xafhxacc }], [0, { [_hH]: _xafhxacc_ }], [0, { [_hH]: _xafhxacc__ }], [0, { [_hH]: _xafhxacs }], [0, { [_hH]: _xafhxacs_ }], [2, { [_hH]: _xafhxadm }], [0, { [_hH]: _xafhE }], [4, { [_hH]: _xafhE_ }], [0, { [_hH]: _xafhxae }], [4, { [_hH]: _xafhLM }], [1, { [_hH]: _xafhxamm }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xafhxaolm }], [0, { [_hH]: _xafhxaollh }], [5, { [_hH]: _xafhxaolrud }], [1, { [_hH]: _xafhxampc }], [0, { [_hH]: _xafhxars }], [0, { [_hH]: _xafhxarc }], [0, { [_hH]: _xafhxar }], [0, { [_hH]: _xafhxasse }], [0, { [_hH]: _xafhxasseca }], [() => SSEKMSKeyId, { [_hH]: _xafhxasseakki }], [0, { [_hH]: _xafhxasseckM }], [0, { [_hH]: _xafhxasc }], [1, { [_hH]: _xafhxatc }], [0, { [_hH]: _xafhxavi }], [2, { [_hH]: _xafhxassebke }]], + 2 + ]; + __Unit = "unit"; + AllowedHeaders = 64 | 0; + AllowedMethods = 64 | 0; + AllowedOrigins = 64 | 0; + AnalyticsConfigurationList = [ + 1, + n0, + _ACLn, + 0, + [ + () => AnalyticsConfiguration$, + 0 + ] + ]; + Buckets = [ + 1, + n0, + _Bu, + 0, + [ + () => Bucket$, + { [_xN]: _B } + ] + ]; + ChecksumAlgorithmList = 64 | 0; + CommonPrefixList = [ + 1, + n0, + _CPL, + 0, + () => CommonPrefix$ + ]; + CompletedPartList = [ + 1, + n0, + _CPLo, + 0, + () => CompletedPart$ + ]; + CORSRules = [ + 1, + n0, + _CORSR, + 0, + [ + () => CORSRule$, + 0 + ] + ]; + DeletedObjects = [ + 1, + n0, + _DOe, + 0, + () => DeletedObject$ + ]; + DeleteMarkers = [ + 1, + n0, + _DMe, + 0, + () => DeleteMarkerEntry$ + ]; + EncryptionTypeList = [ + 1, + n0, + _ETL, + 0, + [ + 0, + { [_xN]: _ET } + ] + ]; + Errors = [ + 1, + n0, + _Er, + 0, + () => _Error$ + ]; + EventList = 64 | 0; + ExposeHeaders = 64 | 0; + FilterRuleList = [ + 1, + n0, + _FRL, + 0, + () => FilterRule$ + ]; + Grants = [ + 1, + n0, + _G, + 0, + [ + () => Grant$, + { [_xN]: _Gr } + ] + ]; + IntelligentTieringConfigurationList = [ + 1, + n0, + _ITCL, + 0, + [ + () => IntelligentTieringConfiguration$, + 0 + ] + ]; + InventoryConfigurationList = [ + 1, + n0, + _ICL, + 0, + [ + () => InventoryConfiguration$, + 0 + ] + ]; + InventoryOptionalFields = [ + 1, + n0, + _IOF, + 0, + [ + 0, + { [_xN]: _Fi } + ] + ]; + LambdaFunctionConfigurationList = [ + 1, + n0, + _LFCL, + 0, + [ + () => LambdaFunctionConfiguration$, + 0 + ] + ]; + LifecycleRules = [ + 1, + n0, + _LRi, + 0, + [ + () => LifecycleRule$, + 0 + ] + ]; + MetricsConfigurationList = [ + 1, + n0, + _MCL, + 0, + [ + () => MetricsConfiguration$, + 0 + ] + ]; + MultipartUploadList = [ + 1, + n0, + _MUL, + 0, + () => MultipartUpload$ + ]; + NoncurrentVersionTransitionList = [ + 1, + n0, + _NVTL, + 0, + () => NoncurrentVersionTransition$ + ]; + ObjectAttributesList = 64 | 0; + ObjectIdentifierList = [ + 1, + n0, + _OIL, + 0, + () => ObjectIdentifier$ + ]; + ObjectList = [ + 1, + n0, + _OLb, + 0, + [ + () => _Object$, + 0 + ] + ]; + ObjectVersionList = [ + 1, + n0, + _OVL, + 0, + [ + () => ObjectVersion$, + 0 + ] + ]; + OptionalObjectAttributesList = 64 | 0; + OwnershipControlsRules = [ + 1, + n0, + _OCRw, + 0, + () => OwnershipControlsRule$ + ]; + Parts = [ + 1, + n0, + _Pa, + 0, + () => Part$ + ]; + PartsList = [ + 1, + n0, + _PL, + 0, + () => ObjectPart$ + ]; + QueueConfigurationList = [ + 1, + n0, + _QCL, + 0, + [ + () => QueueConfiguration$, + 0 + ] + ]; + ReplicationRules = [ + 1, + n0, + _RRep, + 0, + [ + () => ReplicationRule$, + 0 + ] + ]; + RoutingRules = [ + 1, + n0, + _RR, + 0, + [ + () => RoutingRule$, + { [_xN]: _RRo } + ] + ]; + ServerSideEncryptionRules = [ + 1, + n0, + _SSERe, + 0, + [ + () => ServerSideEncryptionRule$, + 0 + ] + ]; + TagSet = [ + 1, + n0, + _TS, + 0, + [ + () => Tag$, + { [_xN]: _Ta } + ] + ]; + TargetGrants = [ + 1, + n0, + _TG, + 0, + [ + () => TargetGrant$, + { [_xN]: _Gr } + ] + ]; + TieringList = [ + 1, + n0, + _TL, + 0, + () => Tiering$ + ]; + TopicConfigurationList = [ + 1, + n0, + _TCL, + 0, + [ + () => TopicConfiguration$, + 0 + ] + ]; + TransitionList = [ + 1, + n0, + _TLr, + 0, + () => Transition$ + ]; + UserMetadata = [ + 1, + n0, + _UM, + 0, + [ + () => MetadataEntry$, + { [_xN]: _ME } + ] + ]; + Metadata = 128 | 0; + AnalyticsFilter$ = [ + 4, + n0, + _AF, + 0, + [_P, _Ta, _An], + [0, () => Tag$, [() => AnalyticsAndOperator$, 0]] + ]; + MetricsFilter$ = [ + 4, + n0, + _MF, + 0, + [_P, _Ta, _APAc, _An], + [0, () => Tag$, 0, [() => MetricsAndOperator$, 0]] + ]; + ObjectEncryption$ = [ + 4, + n0, + _OE, + 0, + [_SSEKMS], + [[() => SSEKMSEncryption$, { [_xN]: _SK }]] + ]; + SelectObjectContentEventStream$ = [ + 4, + n0, + _SOCES, + { [_st]: 1 }, + [_Rec, _Sta, _Pr, _Cont, _End], + [[() => RecordsEvent$, 0], [() => StatsEvent$, 0], [() => ProgressEvent$, 0], () => ContinuationEvent$, () => EndEvent$] + ]; + AbortMultipartUpload$ = [ + 9, + n0, + _AMU, + { [_h]: ["DELETE", "/{Key+}?x-id=AbortMultipartUpload", 204] }, + () => AbortMultipartUploadRequest$, + () => AbortMultipartUploadOutput$ + ]; + CompleteMultipartUpload$ = [ + 9, + n0, + _CMUo, + { [_h]: ["POST", "/{Key+}", 200] }, + () => CompleteMultipartUploadRequest$, + () => CompleteMultipartUploadOutput$ + ]; + CopyObject$ = [ + 9, + n0, + _CO, + { [_h]: ["PUT", "/{Key+}?x-id=CopyObject", 200] }, + () => CopyObjectRequest$, + () => CopyObjectOutput$ + ]; + CreateBucket$ = [ + 9, + n0, + _CB, + { [_h]: ["PUT", "/", 200] }, + () => CreateBucketRequest$, + () => CreateBucketOutput$ + ]; + CreateBucketMetadataConfiguration$ = [ + 9, + n0, + _CBMC, + { [_hC]: "-", [_h]: ["POST", "/?metadataConfiguration", 200] }, + () => CreateBucketMetadataConfigurationRequest$, + () => __Unit + ]; + CreateBucketMetadataTableConfiguration$ = [ + 9, + n0, + _CBMTC, + { [_hC]: "-", [_h]: ["POST", "/?metadataTable", 200] }, + () => CreateBucketMetadataTableConfigurationRequest$, + () => __Unit + ]; + CreateMultipartUpload$ = [ + 9, + n0, + _CMUr, + { [_h]: ["POST", "/{Key+}?uploads", 200] }, + () => CreateMultipartUploadRequest$, + () => CreateMultipartUploadOutput$ + ]; + CreateSession$ = [ + 9, + n0, + _CSr, + { [_h]: ["GET", "/?session", 200] }, + () => CreateSessionRequest$, + () => CreateSessionOutput$ + ]; + DeleteBucket$ = [ + 9, + n0, + _DB, + { [_h]: ["DELETE", "/", 204] }, + () => DeleteBucketRequest$, + () => __Unit + ]; + DeleteBucketAnalyticsConfiguration$ = [ + 9, + n0, + _DBAC, + { [_h]: ["DELETE", "/?analytics", 204] }, + () => DeleteBucketAnalyticsConfigurationRequest$, + () => __Unit + ]; + DeleteBucketCors$ = [ + 9, + n0, + _DBC, + { [_h]: ["DELETE", "/?cors", 204] }, + () => DeleteBucketCorsRequest$, + () => __Unit + ]; + DeleteBucketEncryption$ = [ + 9, + n0, + _DBE, + { [_h]: ["DELETE", "/?encryption", 204] }, + () => DeleteBucketEncryptionRequest$, + () => __Unit + ]; + DeleteBucketIntelligentTieringConfiguration$ = [ + 9, + n0, + _DBITC, + { [_h]: ["DELETE", "/?intelligent-tiering", 204] }, + () => DeleteBucketIntelligentTieringConfigurationRequest$, + () => __Unit + ]; + DeleteBucketInventoryConfiguration$ = [ + 9, + n0, + _DBIC, + { [_h]: ["DELETE", "/?inventory", 204] }, + () => DeleteBucketInventoryConfigurationRequest$, + () => __Unit + ]; + DeleteBucketLifecycle$ = [ + 9, + n0, + _DBL, + { [_h]: ["DELETE", "/?lifecycle", 204] }, + () => DeleteBucketLifecycleRequest$, + () => __Unit + ]; + DeleteBucketMetadataConfiguration$ = [ + 9, + n0, + _DBMC, + { [_h]: ["DELETE", "/?metadataConfiguration", 204] }, + () => DeleteBucketMetadataConfigurationRequest$, + () => __Unit + ]; + DeleteBucketMetadataTableConfiguration$ = [ + 9, + n0, + _DBMTC, + { [_h]: ["DELETE", "/?metadataTable", 204] }, + () => DeleteBucketMetadataTableConfigurationRequest$, + () => __Unit + ]; + DeleteBucketMetricsConfiguration$ = [ + 9, + n0, + _DBMCe, + { [_h]: ["DELETE", "/?metrics", 204] }, + () => DeleteBucketMetricsConfigurationRequest$, + () => __Unit + ]; + DeleteBucketOwnershipControls$ = [ + 9, + n0, + _DBOC, + { [_h]: ["DELETE", "/?ownershipControls", 204] }, + () => DeleteBucketOwnershipControlsRequest$, + () => __Unit + ]; + DeleteBucketPolicy$ = [ + 9, + n0, + _DBP, + { [_h]: ["DELETE", "/?policy", 204] }, + () => DeleteBucketPolicyRequest$, + () => __Unit + ]; + DeleteBucketReplication$ = [ + 9, + n0, + _DBRe, + { [_h]: ["DELETE", "/?replication", 204] }, + () => DeleteBucketReplicationRequest$, + () => __Unit + ]; + DeleteBucketTagging$ = [ + 9, + n0, + _DBT, + { [_h]: ["DELETE", "/?tagging", 204] }, + () => DeleteBucketTaggingRequest$, + () => __Unit + ]; + DeleteBucketWebsite$ = [ + 9, + n0, + _DBW, + { [_h]: ["DELETE", "/?website", 204] }, + () => DeleteBucketWebsiteRequest$, + () => __Unit + ]; + DeleteObject$ = [ + 9, + n0, + _DOel, + { [_h]: ["DELETE", "/{Key+}?x-id=DeleteObject", 204] }, + () => DeleteObjectRequest$, + () => DeleteObjectOutput$ + ]; + DeleteObjects$ = [ + 9, + n0, + _DOele, + { [_hC]: "-", [_h]: ["POST", "/?delete", 200] }, + () => DeleteObjectsRequest$, + () => DeleteObjectsOutput$ + ]; + DeleteObjectTagging$ = [ + 9, + n0, + _DOT, + { [_h]: ["DELETE", "/{Key+}?tagging", 204] }, + () => DeleteObjectTaggingRequest$, + () => DeleteObjectTaggingOutput$ + ]; + DeletePublicAccessBlock$ = [ + 9, + n0, + _DPAB, + { [_h]: ["DELETE", "/?publicAccessBlock", 204] }, + () => DeletePublicAccessBlockRequest$, + () => __Unit + ]; + GetBucketAbac$ = [ + 9, + n0, + _GBA, + { [_h]: ["GET", "/?abac", 200] }, + () => GetBucketAbacRequest$, + () => GetBucketAbacOutput$ + ]; + GetBucketAccelerateConfiguration$ = [ + 9, + n0, + _GBAC, + { [_h]: ["GET", "/?accelerate", 200] }, + () => GetBucketAccelerateConfigurationRequest$, + () => GetBucketAccelerateConfigurationOutput$ + ]; + GetBucketAcl$ = [ + 9, + n0, + _GBAe, + { [_h]: ["GET", "/?acl", 200] }, + () => GetBucketAclRequest$, + () => GetBucketAclOutput$ + ]; + GetBucketAnalyticsConfiguration$ = [ + 9, + n0, + _GBACe, + { [_h]: ["GET", "/?analytics&x-id=GetBucketAnalyticsConfiguration", 200] }, + () => GetBucketAnalyticsConfigurationRequest$, + () => GetBucketAnalyticsConfigurationOutput$ + ]; + GetBucketCors$ = [ + 9, + n0, + _GBC, + { [_h]: ["GET", "/?cors", 200] }, + () => GetBucketCorsRequest$, + () => GetBucketCorsOutput$ + ]; + GetBucketEncryption$ = [ + 9, + n0, + _GBE, + { [_h]: ["GET", "/?encryption", 200] }, + () => GetBucketEncryptionRequest$, + () => GetBucketEncryptionOutput$ + ]; + GetBucketIntelligentTieringConfiguration$ = [ + 9, + n0, + _GBITC, + { [_h]: ["GET", "/?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", 200] }, + () => GetBucketIntelligentTieringConfigurationRequest$, + () => GetBucketIntelligentTieringConfigurationOutput$ + ]; + GetBucketInventoryConfiguration$ = [ + 9, + n0, + _GBIC, + { [_h]: ["GET", "/?inventory&x-id=GetBucketInventoryConfiguration", 200] }, + () => GetBucketInventoryConfigurationRequest$, + () => GetBucketInventoryConfigurationOutput$ + ]; + GetBucketLifecycleConfiguration$ = [ + 9, + n0, + _GBLC, + { [_h]: ["GET", "/?lifecycle", 200] }, + () => GetBucketLifecycleConfigurationRequest$, + () => GetBucketLifecycleConfigurationOutput$ + ]; + GetBucketLocation$ = [ + 9, + n0, + _GBL, + { [_h]: ["GET", "/?location", 200] }, + () => GetBucketLocationRequest$, + () => GetBucketLocationOutput$ + ]; + GetBucketLogging$ = [ + 9, + n0, + _GBLe, + { [_h]: ["GET", "/?logging", 200] }, + () => GetBucketLoggingRequest$, + () => GetBucketLoggingOutput$ + ]; + GetBucketMetadataConfiguration$ = [ + 9, + n0, + _GBMC, + { [_h]: ["GET", "/?metadataConfiguration", 200] }, + () => GetBucketMetadataConfigurationRequest$, + () => GetBucketMetadataConfigurationOutput$ + ]; + GetBucketMetadataTableConfiguration$ = [ + 9, + n0, + _GBMTC, + { [_h]: ["GET", "/?metadataTable", 200] }, + () => GetBucketMetadataTableConfigurationRequest$, + () => GetBucketMetadataTableConfigurationOutput$ + ]; + GetBucketMetricsConfiguration$ = [ + 9, + n0, + _GBMCe, + { [_h]: ["GET", "/?metrics&x-id=GetBucketMetricsConfiguration", 200] }, + () => GetBucketMetricsConfigurationRequest$, + () => GetBucketMetricsConfigurationOutput$ + ]; + GetBucketNotificationConfiguration$ = [ + 9, + n0, + _GBNC, + { [_h]: ["GET", "/?notification", 200] }, + () => GetBucketNotificationConfigurationRequest$, + () => NotificationConfiguration$ + ]; + GetBucketOwnershipControls$ = [ + 9, + n0, + _GBOC, + { [_h]: ["GET", "/?ownershipControls", 200] }, + () => GetBucketOwnershipControlsRequest$, + () => GetBucketOwnershipControlsOutput$ + ]; + GetBucketPolicy$ = [ + 9, + n0, + _GBP, + { [_h]: ["GET", "/?policy", 200] }, + () => GetBucketPolicyRequest$, + () => GetBucketPolicyOutput$ + ]; + GetBucketPolicyStatus$ = [ + 9, + n0, + _GBPS, + { [_h]: ["GET", "/?policyStatus", 200] }, + () => GetBucketPolicyStatusRequest$, + () => GetBucketPolicyStatusOutput$ + ]; + GetBucketReplication$ = [ + 9, + n0, + _GBR, + { [_h]: ["GET", "/?replication", 200] }, + () => GetBucketReplicationRequest$, + () => GetBucketReplicationOutput$ + ]; + GetBucketRequestPayment$ = [ + 9, + n0, + _GBRP, + { [_h]: ["GET", "/?requestPayment", 200] }, + () => GetBucketRequestPaymentRequest$, + () => GetBucketRequestPaymentOutput$ + ]; + GetBucketTagging$ = [ + 9, + n0, + _GBT, + { [_h]: ["GET", "/?tagging", 200] }, + () => GetBucketTaggingRequest$, + () => GetBucketTaggingOutput$ + ]; + GetBucketVersioning$ = [ + 9, + n0, + _GBV, + { [_h]: ["GET", "/?versioning", 200] }, + () => GetBucketVersioningRequest$, + () => GetBucketVersioningOutput$ + ]; + GetBucketWebsite$ = [ + 9, + n0, + _GBW, + { [_h]: ["GET", "/?website", 200] }, + () => GetBucketWebsiteRequest$, + () => GetBucketWebsiteOutput$ + ]; + GetObject$ = [ + 9, + n0, + _GO, + { [_hC]: "-", [_h]: ["GET", "/{Key+}?x-id=GetObject", 200] }, + () => GetObjectRequest$, + () => GetObjectOutput$ + ]; + GetObjectAcl$ = [ + 9, + n0, + _GOA, + { [_h]: ["GET", "/{Key+}?acl", 200] }, + () => GetObjectAclRequest$, + () => GetObjectAclOutput$ + ]; + GetObjectAttributes$ = [ + 9, + n0, + _GOAe, + { [_h]: ["GET", "/{Key+}?attributes", 200] }, + () => GetObjectAttributesRequest$, + () => GetObjectAttributesOutput$ + ]; + GetObjectLegalHold$ = [ + 9, + n0, + _GOLH, + { [_h]: ["GET", "/{Key+}?legal-hold", 200] }, + () => GetObjectLegalHoldRequest$, + () => GetObjectLegalHoldOutput$ + ]; + GetObjectLockConfiguration$ = [ + 9, + n0, + _GOLC, + { [_h]: ["GET", "/?object-lock", 200] }, + () => GetObjectLockConfigurationRequest$, + () => GetObjectLockConfigurationOutput$ + ]; + GetObjectRetention$ = [ + 9, + n0, + _GORe, + { [_h]: ["GET", "/{Key+}?retention", 200] }, + () => GetObjectRetentionRequest$, + () => GetObjectRetentionOutput$ + ]; + GetObjectTagging$ = [ + 9, + n0, + _GOT, + { [_h]: ["GET", "/{Key+}?tagging", 200] }, + () => GetObjectTaggingRequest$, + () => GetObjectTaggingOutput$ + ]; + GetObjectTorrent$ = [ + 9, + n0, + _GOTe, + { [_h]: ["GET", "/{Key+}?torrent", 200] }, + () => GetObjectTorrentRequest$, + () => GetObjectTorrentOutput$ + ]; + GetPublicAccessBlock$ = [ + 9, + n0, + _GPAB, + { [_h]: ["GET", "/?publicAccessBlock", 200] }, + () => GetPublicAccessBlockRequest$, + () => GetPublicAccessBlockOutput$ + ]; + HeadBucket$ = [ + 9, + n0, + _HB, + { [_h]: ["HEAD", "/", 200] }, + () => HeadBucketRequest$, + () => HeadBucketOutput$ + ]; + HeadObject$ = [ + 9, + n0, + _HO, + { [_h]: ["HEAD", "/{Key+}", 200] }, + () => HeadObjectRequest$, + () => HeadObjectOutput$ + ]; + ListBucketAnalyticsConfigurations$ = [ + 9, + n0, + _LBAC, + { [_h]: ["GET", "/?analytics&x-id=ListBucketAnalyticsConfigurations", 200] }, + () => ListBucketAnalyticsConfigurationsRequest$, + () => ListBucketAnalyticsConfigurationsOutput$ + ]; + ListBucketIntelligentTieringConfigurations$ = [ + 9, + n0, + _LBITC, + { [_h]: ["GET", "/?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", 200] }, + () => ListBucketIntelligentTieringConfigurationsRequest$, + () => ListBucketIntelligentTieringConfigurationsOutput$ + ]; + ListBucketInventoryConfigurations$ = [ + 9, + n0, + _LBIC, + { [_h]: ["GET", "/?inventory&x-id=ListBucketInventoryConfigurations", 200] }, + () => ListBucketInventoryConfigurationsRequest$, + () => ListBucketInventoryConfigurationsOutput$ + ]; + ListBucketMetricsConfigurations$ = [ + 9, + n0, + _LBMC, + { [_h]: ["GET", "/?metrics&x-id=ListBucketMetricsConfigurations", 200] }, + () => ListBucketMetricsConfigurationsRequest$, + () => ListBucketMetricsConfigurationsOutput$ + ]; + ListBuckets$ = [ + 9, + n0, + _LB, + { [_h]: ["GET", "/?x-id=ListBuckets", 200] }, + () => ListBucketsRequest$, + () => ListBucketsOutput$ + ]; + ListDirectoryBuckets$ = [ + 9, + n0, + _LDB, + { [_h]: ["GET", "/?x-id=ListDirectoryBuckets", 200] }, + () => ListDirectoryBucketsRequest$, + () => ListDirectoryBucketsOutput$ + ]; + ListMultipartUploads$ = [ + 9, + n0, + _LMU, + { [_h]: ["GET", "/?uploads", 200] }, + () => ListMultipartUploadsRequest$, + () => ListMultipartUploadsOutput$ + ]; + ListObjects$ = [ + 9, + n0, + _LO, + { [_h]: ["GET", "/", 200] }, + () => ListObjectsRequest$, + () => ListObjectsOutput$ + ]; + ListObjectsV2$ = [ + 9, + n0, + _LOV, + { [_h]: ["GET", "/?list-type=2", 200] }, + () => ListObjectsV2Request$, + () => ListObjectsV2Output$ + ]; + ListObjectVersions$ = [ + 9, + n0, + _LOVi, + { [_h]: ["GET", "/?versions", 200] }, + () => ListObjectVersionsRequest$, + () => ListObjectVersionsOutput$ + ]; + ListParts$ = [ + 9, + n0, + _LP, + { [_h]: ["GET", "/{Key+}?x-id=ListParts", 200] }, + () => ListPartsRequest$, + () => ListPartsOutput$ + ]; + PutBucketAbac$ = [ + 9, + n0, + _PBA, + { [_hC]: "-", [_h]: ["PUT", "/?abac", 200] }, + () => PutBucketAbacRequest$, + () => __Unit + ]; + PutBucketAccelerateConfiguration$ = [ + 9, + n0, + _PBAC, + { [_hC]: "-", [_h]: ["PUT", "/?accelerate", 200] }, + () => PutBucketAccelerateConfigurationRequest$, + () => __Unit + ]; + PutBucketAcl$ = [ + 9, + n0, + _PBAu, + { [_hC]: "-", [_h]: ["PUT", "/?acl", 200] }, + () => PutBucketAclRequest$, + () => __Unit + ]; + PutBucketAnalyticsConfiguration$ = [ + 9, + n0, + _PBACu, + { [_h]: ["PUT", "/?analytics", 200] }, + () => PutBucketAnalyticsConfigurationRequest$, + () => __Unit + ]; + PutBucketCors$ = [ + 9, + n0, + _PBC, + { [_hC]: "-", [_h]: ["PUT", "/?cors", 200] }, + () => PutBucketCorsRequest$, + () => __Unit + ]; + PutBucketEncryption$ = [ + 9, + n0, + _PBE, + { [_hC]: "-", [_h]: ["PUT", "/?encryption", 200] }, + () => PutBucketEncryptionRequest$, + () => __Unit + ]; + PutBucketIntelligentTieringConfiguration$ = [ + 9, + n0, + _PBITC, + { [_h]: ["PUT", "/?intelligent-tiering", 200] }, + () => PutBucketIntelligentTieringConfigurationRequest$, + () => __Unit + ]; + PutBucketInventoryConfiguration$ = [ + 9, + n0, + _PBIC, + { [_h]: ["PUT", "/?inventory", 200] }, + () => PutBucketInventoryConfigurationRequest$, + () => __Unit + ]; + PutBucketLifecycleConfiguration$ = [ + 9, + n0, + _PBLC, + { [_hC]: "-", [_h]: ["PUT", "/?lifecycle", 200] }, + () => PutBucketLifecycleConfigurationRequest$, + () => PutBucketLifecycleConfigurationOutput$ + ]; + PutBucketLogging$ = [ + 9, + n0, + _PBL, + { [_hC]: "-", [_h]: ["PUT", "/?logging", 200] }, + () => PutBucketLoggingRequest$, + () => __Unit + ]; + PutBucketMetricsConfiguration$ = [ + 9, + n0, + _PBMC, + { [_h]: ["PUT", "/?metrics", 200] }, + () => PutBucketMetricsConfigurationRequest$, + () => __Unit + ]; + PutBucketNotificationConfiguration$ = [ + 9, + n0, + _PBNC, + { [_h]: ["PUT", "/?notification", 200] }, + () => PutBucketNotificationConfigurationRequest$, + () => __Unit + ]; + PutBucketOwnershipControls$ = [ + 9, + n0, + _PBOC, + { [_hC]: "-", [_h]: ["PUT", "/?ownershipControls", 200] }, + () => PutBucketOwnershipControlsRequest$, + () => __Unit + ]; + PutBucketPolicy$ = [ + 9, + n0, + _PBP, + { [_hC]: "-", [_h]: ["PUT", "/?policy", 200] }, + () => PutBucketPolicyRequest$, + () => __Unit + ]; + PutBucketReplication$ = [ + 9, + n0, + _PBR, + { [_hC]: "-", [_h]: ["PUT", "/?replication", 200] }, + () => PutBucketReplicationRequest$, + () => __Unit + ]; + PutBucketRequestPayment$ = [ + 9, + n0, + _PBRP, + { [_hC]: "-", [_h]: ["PUT", "/?requestPayment", 200] }, + () => PutBucketRequestPaymentRequest$, + () => __Unit + ]; + PutBucketTagging$ = [ + 9, + n0, + _PBT, + { [_hC]: "-", [_h]: ["PUT", "/?tagging", 200] }, + () => PutBucketTaggingRequest$, + () => __Unit + ]; + PutBucketVersioning$ = [ + 9, + n0, + _PBV, + { [_hC]: "-", [_h]: ["PUT", "/?versioning", 200] }, + () => PutBucketVersioningRequest$, + () => __Unit + ]; + PutBucketWebsite$ = [ + 9, + n0, + _PBW, + { [_hC]: "-", [_h]: ["PUT", "/?website", 200] }, + () => PutBucketWebsiteRequest$, + () => __Unit + ]; + PutObject$ = [ + 9, + n0, + _PO, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?x-id=PutObject", 200] }, + () => PutObjectRequest$, + () => PutObjectOutput$ + ]; + PutObjectAcl$ = [ + 9, + n0, + _POA, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?acl", 200] }, + () => PutObjectAclRequest$, + () => PutObjectAclOutput$ + ]; + PutObjectLegalHold$ = [ + 9, + n0, + _POLH, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?legal-hold", 200] }, + () => PutObjectLegalHoldRequest$, + () => PutObjectLegalHoldOutput$ + ]; + PutObjectLockConfiguration$ = [ + 9, + n0, + _POLC, + { [_hC]: "-", [_h]: ["PUT", "/?object-lock", 200] }, + () => PutObjectLockConfigurationRequest$, + () => PutObjectLockConfigurationOutput$ + ]; + PutObjectRetention$ = [ + 9, + n0, + _PORu, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?retention", 200] }, + () => PutObjectRetentionRequest$, + () => PutObjectRetentionOutput$ + ]; + PutObjectTagging$ = [ + 9, + n0, + _POT, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?tagging", 200] }, + () => PutObjectTaggingRequest$, + () => PutObjectTaggingOutput$ + ]; + PutPublicAccessBlock$ = [ + 9, + n0, + _PPAB, + { [_hC]: "-", [_h]: ["PUT", "/?publicAccessBlock", 200] }, + () => PutPublicAccessBlockRequest$, + () => __Unit + ]; + RenameObject$ = [ + 9, + n0, + _RO, + { [_h]: ["PUT", "/{Key+}?renameObject", 200] }, + () => RenameObjectRequest$, + () => RenameObjectOutput$ + ]; + RestoreObject$ = [ + 9, + n0, + _ROe, + { [_hC]: "-", [_h]: ["POST", "/{Key+}?restore", 200] }, + () => RestoreObjectRequest$, + () => RestoreObjectOutput$ + ]; + SelectObjectContent$ = [ + 9, + n0, + _SOC, + { [_h]: ["POST", "/{Key+}?select&select-type=2", 200] }, + () => SelectObjectContentRequest$, + () => SelectObjectContentOutput$ + ]; + UpdateBucketMetadataInventoryTableConfiguration$ = [ + 9, + n0, + _UBMITC, + { [_hC]: "-", [_h]: ["PUT", "/?metadataInventoryTable", 200] }, + () => UpdateBucketMetadataInventoryTableConfigurationRequest$, + () => __Unit + ]; + UpdateBucketMetadataJournalTableConfiguration$ = [ + 9, + n0, + _UBMJTC, + { [_hC]: "-", [_h]: ["PUT", "/?metadataJournalTable", 200] }, + () => UpdateBucketMetadataJournalTableConfigurationRequest$, + () => __Unit + ]; + UpdateObjectEncryption$ = [ + 9, + n0, + _UOE, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?encryption", 200] }, + () => UpdateObjectEncryptionRequest$, + () => UpdateObjectEncryptionResponse$ + ]; + UploadPart$ = [ + 9, + n0, + _UP, + { [_hC]: "-", [_h]: ["PUT", "/{Key+}?x-id=UploadPart", 200] }, + () => UploadPartRequest$, + () => UploadPartOutput$ + ]; + UploadPartCopy$ = [ + 9, + n0, + _UPC, + { [_h]: ["PUT", "/{Key+}?x-id=UploadPartCopy", 200] }, + () => UploadPartCopyRequest$, + () => UploadPartCopyOutput$ + ]; + WriteGetObjectResponse$ = [ + 9, + n0, + _WGOR, + { [_en]: ["{RequestRoute}."], [_h]: ["POST", "/WriteGetObjectResponse", 200] }, + () => WriteGetObjectResponseRequest$, + () => __Unit + ]; + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateSessionCommand.js +var CreateSessionCommand; +var init_CreateSessionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateSessionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CreateSessionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "CreateSession", {}).n("S3Client", "CreateSessionCommand").sc(CreateSession$).build() { + }; + __name(CreateSessionCommand, "CreateSessionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/package.json +var package_default; +var init_package = __esm({ + "../../node_modules/@aws-sdk/client-s3/package.json"() { + package_default = { + name: "@aws-sdk/client-s3", + description: "AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native", + version: "3.1009.0", + scripts: { + build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs", + "build:cjs": "node ../../scripts/compilation/inline client-s3", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"', + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo s3", + test: "yarn g:vitest run", + "test:browser": "node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.mts", + "test:browser:watch": "node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.mts", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts && yarn test:browser", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", + "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs", + "test:integration": "yarn g:vitest run -c vitest.config.integ.mts", + "test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts", + "test:watch": "yarn g:vitest watch" + }, + main: "./dist-cjs/index.js", + types: "./dist-types/index.d.ts", + module: "./dist-es/index.js", + sideEffects: false, + dependencies: { + "@aws-crypto/sha1-browser": "5.2.0", + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "^3.973.20", + "@aws-sdk/credential-provider-node": "^3.972.21", + "@aws-sdk/middleware-bucket-endpoint": "^3.972.8", + "@aws-sdk/middleware-expect-continue": "^3.972.8", + "@aws-sdk/middleware-flexible-checksums": "^3.973.6", + "@aws-sdk/middleware-host-header": "^3.972.8", + "@aws-sdk/middleware-location-constraint": "^3.972.8", + "@aws-sdk/middleware-logger": "^3.972.8", + "@aws-sdk/middleware-recursion-detection": "^3.972.8", + "@aws-sdk/middleware-sdk-s3": "^3.972.20", + "@aws-sdk/middleware-ssec": "^3.972.8", + "@aws-sdk/middleware-user-agent": "^3.972.21", + "@aws-sdk/region-config-resolver": "^3.972.8", + "@aws-sdk/signature-v4-multi-region": "^3.996.8", + "@aws-sdk/types": "^3.973.6", + "@aws-sdk/util-endpoints": "^3.996.5", + "@aws-sdk/util-user-agent-browser": "^3.972.8", + "@aws-sdk/util-user-agent-node": "^3.973.7", + "@smithy/config-resolver": "^4.4.11", + "@smithy/core": "^3.23.11", + "@smithy/eventstream-serde-browser": "^4.2.12", + "@smithy/eventstream-serde-config-resolver": "^4.3.12", + "@smithy/eventstream-serde-node": "^4.2.12", + "@smithy/fetch-http-handler": "^5.3.15", + "@smithy/hash-blob-browser": "^4.2.13", + "@smithy/hash-node": "^4.2.12", + "@smithy/hash-stream-node": "^4.2.12", + "@smithy/invalid-dependency": "^4.2.12", + "@smithy/md5-js": "^4.2.12", + "@smithy/middleware-content-length": "^4.2.12", + "@smithy/middleware-endpoint": "^4.4.25", + "@smithy/middleware-retry": "^4.4.42", + "@smithy/middleware-serde": "^4.2.14", + "@smithy/middleware-stack": "^4.2.12", + "@smithy/node-config-provider": "^4.3.12", + "@smithy/node-http-handler": "^4.4.16", + "@smithy/protocol-http": "^5.3.12", + "@smithy/smithy-client": "^4.12.5", + "@smithy/types": "^4.13.1", + "@smithy/url-parser": "^4.2.12", + "@smithy/util-base64": "^4.3.2", + "@smithy/util-body-length-browser": "^4.2.2", + "@smithy/util-body-length-node": "^4.2.3", + "@smithy/util-defaults-mode-browser": "^4.3.41", + "@smithy/util-defaults-mode-node": "^4.2.44", + "@smithy/util-endpoints": "^3.3.3", + "@smithy/util-middleware": "^4.2.12", + "@smithy/util-retry": "^4.2.12", + "@smithy/util-stream": "^4.5.19", + "@smithy/util-utf8": "^4.2.2", + "@smithy/util-waiter": "^4.2.13", + tslib: "^2.6.2" + }, + devDependencies: { + "@aws-sdk/signature-v4-crt": "3.1009.0", + "@smithy/snapshot-testing": "^2.0.2", + "@tsconfig/node20": "20.1.8", + "@types/node": "^20.14.8", + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + premove: "4.0.0", + typescript: "~5.8.3", + vitest: "^4.0.17" + }, + engines: { + node: ">=20.0.0" + }, + typesVersions: { + "<4.5": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + files: [ + "dist-*/**" + ], + author: { + name: "AWS SDK for JavaScript Team", + url: "https://aws.amazon.com/javascript/" + }, + license: "Apache-2.0", + browser: { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "clients/client-s3" + } + }; + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js +var fromUtf84; +var init_fromUtf8_browser3 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fromUtf84 = /* @__PURE__ */ __name((input) => new TextEncoder().encode(input), "fromUtf8"); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js +var init_toUint8Array3 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser3(); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +var init_toUtf8_browser3 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/index.js +var init_dist_es44 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_fromUtf8_browser3(); + init_toUint8Array3(); + init_toUtf8_browser3(); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/build/module/isEmptyData.js +function isEmptyData2(data) { + if (typeof data === "string") { + return data.length === 0; + } + return data.byteLength === 0; +} +var init_isEmptyData2 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/build/module/isEmptyData.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(isEmptyData2, "isEmptyData"); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/build/module/constants.js +var SHA_1_HASH, SHA_1_HMAC_ALGO, EMPTY_DATA_SHA_1; +var init_constants10 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/build/module/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SHA_1_HASH = { name: "SHA-1" }; + SHA_1_HMAC_ALGO = { + name: "HMAC", + hash: SHA_1_HASH + }; + EMPTY_DATA_SHA_1 = new Uint8Array([ + 218, + 57, + 163, + 238, + 94, + 107, + 75, + 13, + 50, + 85, + 191, + 239, + 149, + 96, + 24, + 144, + 175, + 216, + 7, + 9 + ]); + } +}); + +// ../../node_modules/@aws-sdk/util-locate-window/dist-es/index.js +function locateWindow() { + if (typeof window !== "undefined") { + return window; + } else if (typeof self !== "undefined") { + return self; + } + return fallbackWindow; +} +var fallbackWindow; +var init_dist_es45 = __esm({ + "../../node_modules/@aws-sdk/util-locate-window/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fallbackWindow = {}; + __name(locateWindow, "locateWindow"); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/build/module/webCryptoSha1.js +function convertToBuffer2(data) { + if (typeof data === "string") { + return fromUtf84(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); +} +var Sha1; +var init_webCryptoSha1 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/build/module/webCryptoSha1.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es44(); + init_isEmptyData2(); + init_constants10(); + init_dist_es45(); + Sha1 = /** @class */ + function() { + function Sha13(secret) { + this.toHash = new Uint8Array(0); + if (secret !== void 0) { + this.key = new Promise(function(resolve, reject) { + locateWindow().crypto.subtle.importKey("raw", convertToBuffer2(secret), SHA_1_HMAC_ALGO, false, ["sign"]).then(resolve, reject); + }); + this.key.catch(function() { + }); + } + } + __name(Sha13, "Sha1"); + Sha13.prototype.update = function(data) { + if (isEmptyData2(data)) { + return; + } + var update = convertToBuffer2(data); + var typedArray = new Uint8Array(this.toHash.byteLength + update.byteLength); + typedArray.set(this.toHash, 0); + typedArray.set(update, this.toHash.byteLength); + this.toHash = typedArray; + }; + Sha13.prototype.digest = function() { + var _this = this; + if (this.key) { + return this.key.then(function(key) { + return locateWindow().crypto.subtle.sign(SHA_1_HMAC_ALGO, key, _this.toHash).then(function(data) { + return new Uint8Array(data); + }); + }); + } + if (isEmptyData2(this.toHash)) { + return Promise.resolve(EMPTY_DATA_SHA_1); + } + return Promise.resolve().then(function() { + return locateWindow().crypto.subtle.digest(SHA_1_HASH, _this.toHash); + }).then(function(data) { + return Promise.resolve(new Uint8Array(data)); + }); + }; + Sha13.prototype.reset = function() { + this.toHash = new Uint8Array(0); + }; + return Sha13; + }(); + __name(convertToBuffer2, "convertToBuffer"); + } +}); + +// ../../node_modules/@aws-crypto/supports-web-crypto/build/module/supportsWebCrypto.js +function supportsWebCrypto(window2) { + if (supportsSecureRandom(window2) && typeof window2.crypto.subtle === "object") { + var subtle3 = window2.crypto.subtle; + return supportsSubtleCrypto(subtle3); + } + return false; +} +function supportsSecureRandom(window2) { + if (typeof window2 === "object" && typeof window2.crypto === "object") { + var getRandomValues2 = window2.crypto.getRandomValues; + return typeof getRandomValues2 === "function"; + } + return false; +} +function supportsSubtleCrypto(subtle3) { + return subtle3 && subtleCryptoMethods.every(function(methodName) { + return typeof subtle3[methodName] === "function"; + }); +} +var subtleCryptoMethods; +var init_supportsWebCrypto = __esm({ + "../../node_modules/@aws-crypto/supports-web-crypto/build/module/supportsWebCrypto.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + subtleCryptoMethods = [ + "decrypt", + "digest", + "encrypt", + "exportKey", + "generateKey", + "importKey", + "sign", + "verify" + ]; + __name(supportsWebCrypto, "supportsWebCrypto"); + __name(supportsSecureRandom, "supportsSecureRandom"); + __name(supportsSubtleCrypto, "supportsSubtleCrypto"); + } +}); + +// ../../node_modules/@aws-crypto/supports-web-crypto/build/module/index.js +var init_module4 = __esm({ + "../../node_modules/@aws-crypto/supports-web-crypto/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_supportsWebCrypto(); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/build/module/crossPlatformSha1.js +var Sha12; +var init_crossPlatformSha1 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/build/module/crossPlatformSha1.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_webCryptoSha1(); + init_module4(); + init_dist_es45(); + init_module(); + Sha12 = /** @class */ + function() { + function Sha13(secret) { + if (supportsWebCrypto(locateWindow())) { + this.hash = new Sha1(secret); + } else { + throw new Error("SHA1 not supported"); + } + } + __name(Sha13, "Sha1"); + Sha13.prototype.update = function(data, encoding) { + this.hash.update(convertToBuffer(data)); + }; + Sha13.prototype.digest = function() { + return this.hash.digest(); + }; + Sha13.prototype.reset = function() { + this.hash.reset(); + }; + return Sha13; + }(); + } +}); + +// ../../node_modules/@aws-crypto/sha1-browser/build/module/index.js +var init_module5 = __esm({ + "../../node_modules/@aws-crypto/sha1-browser/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_crossPlatformSha1(); + init_webCryptoSha1(); + } +}); + +// ../../node_modules/@aws-crypto/sha256-browser/build/module/constants.js +var SHA_256_HASH, SHA_256_HMAC_ALGO, EMPTY_DATA_SHA_256; +var init_constants11 = __esm({ + "../../node_modules/@aws-crypto/sha256-browser/build/module/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SHA_256_HASH = { name: "SHA-256" }; + SHA_256_HMAC_ALGO = { + name: "HMAC", + hash: SHA_256_HASH + }; + EMPTY_DATA_SHA_256 = new Uint8Array([ + 227, + 176, + 196, + 66, + 152, + 252, + 28, + 20, + 154, + 251, + 244, + 200, + 153, + 111, + 185, + 36, + 39, + 174, + 65, + 228, + 100, + 155, + 147, + 76, + 164, + 149, + 153, + 27, + 120, + 82, + 184, + 85 + ]); + } +}); + +// ../../node_modules/@aws-crypto/sha256-browser/build/module/webCryptoSha256.js +var Sha256; +var init_webCryptoSha256 = __esm({ + "../../node_modules/@aws-crypto/sha256-browser/build/module/webCryptoSha256.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_module(); + init_constants11(); + init_dist_es45(); + Sha256 = /** @class */ + function() { + function Sha2564(secret) { + this.toHash = new Uint8Array(0); + this.secret = secret; + this.reset(); + } + __name(Sha2564, "Sha256"); + Sha2564.prototype.update = function(data) { + if (isEmptyData(data)) { + return; + } + var update = convertToBuffer(data); + var typedArray = new Uint8Array(this.toHash.byteLength + update.byteLength); + typedArray.set(this.toHash, 0); + typedArray.set(update, this.toHash.byteLength); + this.toHash = typedArray; + }; + Sha2564.prototype.digest = function() { + var _this = this; + if (this.key) { + return this.key.then(function(key) { + return locateWindow().crypto.subtle.sign(SHA_256_HMAC_ALGO, key, _this.toHash).then(function(data) { + return new Uint8Array(data); + }); + }); + } + if (isEmptyData(this.toHash)) { + return Promise.resolve(EMPTY_DATA_SHA_256); + } + return Promise.resolve().then(function() { + return locateWindow().crypto.subtle.digest(SHA_256_HASH, _this.toHash); + }).then(function(data) { + return Promise.resolve(new Uint8Array(data)); + }); + }; + Sha2564.prototype.reset = function() { + var _this = this; + this.toHash = new Uint8Array(0); + if (this.secret && this.secret !== void 0) { + this.key = new Promise(function(resolve, reject) { + locateWindow().crypto.subtle.importKey("raw", convertToBuffer(_this.secret), SHA_256_HMAC_ALGO, false, ["sign"]).then(resolve, reject); + }); + this.key.catch(function() { + }); + } + }; + return Sha2564; + }(); + } +}); + +// ../../node_modules/@aws-crypto/sha256-js/build/module/constants.js +var BLOCK_SIZE, DIGEST_LENGTH, KEY, INIT, MAX_HASHABLE_LENGTH; +var init_constants12 = __esm({ + "../../node_modules/@aws-crypto/sha256-js/build/module/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + BLOCK_SIZE = 64; + DIGEST_LENGTH = 32; + KEY = new Uint32Array([ + 1116352408, + 1899447441, + 3049323471, + 3921009573, + 961987163, + 1508970993, + 2453635748, + 2870763221, + 3624381080, + 310598401, + 607225278, + 1426881987, + 1925078388, + 2162078206, + 2614888103, + 3248222580, + 3835390401, + 4022224774, + 264347078, + 604807628, + 770255983, + 1249150122, + 1555081692, + 1996064986, + 2554220882, + 2821834349, + 2952996808, + 3210313671, + 3336571891, + 3584528711, + 113926993, + 338241895, + 666307205, + 773529912, + 1294757372, + 1396182291, + 1695183700, + 1986661051, + 2177026350, + 2456956037, + 2730485921, + 2820302411, + 3259730800, + 3345764771, + 3516065817, + 3600352804, + 4094571909, + 275423344, + 430227734, + 506948616, + 659060556, + 883997877, + 958139571, + 1322822218, + 1537002063, + 1747873779, + 1955562222, + 2024104815, + 2227730452, + 2361852424, + 2428436474, + 2756734187, + 3204031479, + 3329325298 + ]); + INIT = [ + 1779033703, + 3144134277, + 1013904242, + 2773480762, + 1359893119, + 2600822924, + 528734635, + 1541459225 + ]; + MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1; + } +}); + +// ../../node_modules/@aws-crypto/sha256-js/build/module/RawSha256.js +var RawSha256; +var init_RawSha256 = __esm({ + "../../node_modules/@aws-crypto/sha256-js/build/module/RawSha256.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants12(); + RawSha256 = /** @class */ + function() { + function RawSha2562() { + this.state = Int32Array.from(INIT); + this.temp = new Int32Array(64); + this.buffer = new Uint8Array(64); + this.bufferLength = 0; + this.bytesHashed = 0; + this.finished = false; + } + __name(RawSha2562, "RawSha256"); + RawSha2562.prototype.update = function(data) { + if (this.finished) { + throw new Error("Attempted to update an already finished hash."); + } + var position = 0; + var byteLength = data.byteLength; + this.bytesHashed += byteLength; + if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) { + throw new Error("Cannot hash more than 2^53 - 1 bits"); + } + while (byteLength > 0) { + this.buffer[this.bufferLength++] = data[position++]; + byteLength--; + if (this.bufferLength === BLOCK_SIZE) { + this.hashBuffer(); + this.bufferLength = 0; + } + } + }; + RawSha2562.prototype.digest = function() { + if (!this.finished) { + var bitsHashed = this.bytesHashed * 8; + var bufferView = new DataView(this.buffer.buffer, this.buffer.byteOffset, this.buffer.byteLength); + var undecoratedLength = this.bufferLength; + bufferView.setUint8(this.bufferLength++, 128); + if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) { + for (var i2 = this.bufferLength; i2 < BLOCK_SIZE; i2++) { + bufferView.setUint8(i2, 0); + } + this.hashBuffer(); + this.bufferLength = 0; + } + for (var i2 = this.bufferLength; i2 < BLOCK_SIZE - 8; i2++) { + bufferView.setUint8(i2, 0); + } + bufferView.setUint32(BLOCK_SIZE - 8, Math.floor(bitsHashed / 4294967296), true); + bufferView.setUint32(BLOCK_SIZE - 4, bitsHashed); + this.hashBuffer(); + this.finished = true; + } + var out = new Uint8Array(DIGEST_LENGTH); + for (var i2 = 0; i2 < 8; i2++) { + out[i2 * 4] = this.state[i2] >>> 24 & 255; + out[i2 * 4 + 1] = this.state[i2] >>> 16 & 255; + out[i2 * 4 + 2] = this.state[i2] >>> 8 & 255; + out[i2 * 4 + 3] = this.state[i2] >>> 0 & 255; + } + return out; + }; + RawSha2562.prototype.hashBuffer = function() { + var _a124 = this, buffer = _a124.buffer, state = _a124.state; + var state0 = state[0], state1 = state[1], state2 = state[2], state3 = state[3], state4 = state[4], state5 = state[5], state6 = state[6], state7 = state[7]; + for (var i2 = 0; i2 < BLOCK_SIZE; i2++) { + if (i2 < 16) { + this.temp[i2] = (buffer[i2 * 4] & 255) << 24 | (buffer[i2 * 4 + 1] & 255) << 16 | (buffer[i2 * 4 + 2] & 255) << 8 | buffer[i2 * 4 + 3] & 255; + } else { + var u5 = this.temp[i2 - 2]; + var t1_1 = (u5 >>> 17 | u5 << 15) ^ (u5 >>> 19 | u5 << 13) ^ u5 >>> 10; + u5 = this.temp[i2 - 15]; + var t2_1 = (u5 >>> 7 | u5 << 25) ^ (u5 >>> 18 | u5 << 14) ^ u5 >>> 3; + this.temp[i2] = (t1_1 + this.temp[i2 - 7] | 0) + (t2_1 + this.temp[i2 - 16] | 0); + } + var t12 = (((state4 >>> 6 | state4 << 26) ^ (state4 >>> 11 | state4 << 21) ^ (state4 >>> 25 | state4 << 7)) + (state4 & state5 ^ ~state4 & state6) | 0) + (state7 + (KEY[i2] + this.temp[i2] | 0) | 0) | 0; + var t22 = ((state0 >>> 2 | state0 << 30) ^ (state0 >>> 13 | state0 << 19) ^ (state0 >>> 22 | state0 << 10)) + (state0 & state1 ^ state0 & state2 ^ state1 & state2) | 0; + state7 = state6; + state6 = state5; + state5 = state4; + state4 = state3 + t12 | 0; + state3 = state2; + state2 = state1; + state1 = state0; + state0 = t12 + t22 | 0; + } + state[0] += state0; + state[1] += state1; + state[2] += state2; + state[3] += state3; + state[4] += state4; + state[5] += state5; + state[6] += state6; + state[7] += state7; + }; + return RawSha2562; + }(); + } +}); + +// ../../node_modules/@aws-crypto/sha256-js/build/module/jsSha256.js +function bufferFromSecret(secret) { + var input = convertToBuffer(secret); + if (input.byteLength > BLOCK_SIZE) { + var bufferHash = new RawSha256(); + bufferHash.update(input); + input = bufferHash.digest(); + } + var buffer = new Uint8Array(BLOCK_SIZE); + buffer.set(input); + return buffer; +} +var Sha2562; +var init_jsSha256 = __esm({ + "../../node_modules/@aws-crypto/sha256-js/build/module/jsSha256.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tslib_es6(); + init_constants12(); + init_RawSha256(); + init_module(); + Sha2562 = /** @class */ + function() { + function Sha2564(secret) { + this.secret = secret; + this.hash = new RawSha256(); + this.reset(); + } + __name(Sha2564, "Sha256"); + Sha2564.prototype.update = function(toHash) { + if (isEmptyData(toHash) || this.error) { + return; + } + try { + this.hash.update(convertToBuffer(toHash)); + } catch (e2) { + this.error = e2; + } + }; + Sha2564.prototype.digestSync = function() { + if (this.error) { + throw this.error; + } + if (this.outer) { + if (!this.outer.finished) { + this.outer.update(this.hash.digest()); + } + return this.outer.digest(); + } + return this.hash.digest(); + }; + Sha2564.prototype.digest = function() { + return __awaiter(this, void 0, void 0, function() { + return __generator(this, function(_a124) { + return [2, this.digestSync()]; + }); + }); + }; + Sha2564.prototype.reset = function() { + this.hash = new RawSha256(); + if (this.secret) { + this.outer = new RawSha256(); + var inner = bufferFromSecret(this.secret); + var outer = new Uint8Array(BLOCK_SIZE); + outer.set(inner); + for (var i2 = 0; i2 < BLOCK_SIZE; i2++) { + inner[i2] ^= 54; + outer[i2] ^= 92; + } + this.hash.update(inner); + this.outer.update(outer); + for (var i2 = 0; i2 < inner.byteLength; i2++) { + inner[i2] = 0; + } + } + }; + return Sha2564; + }(); + __name(bufferFromSecret, "bufferFromSecret"); + } +}); + +// ../../node_modules/@aws-crypto/sha256-js/build/module/index.js +var init_module6 = __esm({ + "../../node_modules/@aws-crypto/sha256-js/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_jsSha256(); + } +}); + +// ../../node_modules/@aws-crypto/sha256-browser/build/module/crossPlatformSha256.js +var Sha2563; +var init_crossPlatformSha256 = __esm({ + "../../node_modules/@aws-crypto/sha256-browser/build/module/crossPlatformSha256.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_webCryptoSha256(); + init_module6(); + init_module4(); + init_dist_es45(); + init_module(); + Sha2563 = /** @class */ + function() { + function Sha2564(secret) { + if (supportsWebCrypto(locateWindow())) { + this.hash = new Sha256(secret); + } else { + this.hash = new Sha2562(secret); + } + } + __name(Sha2564, "Sha256"); + Sha2564.prototype.update = function(data, encoding) { + this.hash.update(convertToBuffer(data)); + }; + Sha2564.prototype.digest = function() { + return this.hash.digest(); + }; + Sha2564.prototype.reset = function() { + this.hash.reset(); + }; + return Sha2564; + }(); + } +}); + +// ../../node_modules/@aws-crypto/sha256-browser/build/module/index.js +var init_module7 = __esm({ + "../../node_modules/@aws-crypto/sha256-browser/build/module/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_crossPlatformSha256(); + init_webCryptoSha256(); + } +}); + +// ../../node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js +var createDefaultUserAgentProvider, fallback; +var init_dist_es46 = __esm({ + "../../node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + createDefaultUserAgentProvider = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => async (config3) => { + const navigator2 = typeof window !== "undefined" ? window.navigator : void 0; + const uaString = navigator2?.userAgent ?? ""; + const osName = navigator2?.userAgentData?.platform ?? fallback.os(uaString) ?? "other"; + const osVersion = void 0; + const brands = navigator2?.userAgentData?.brands ?? []; + const brand = brands[brands.length - 1]; + const browserName = brand?.brand ?? fallback.browser(uaString) ?? "unknown"; + const browserVersion = brand?.version ?? "unknown"; + const sections = [ + ["aws-sdk-js", clientVersion], + ["ua", "2.1"], + [`os/${osName}`, osVersion], + ["lang/js"], + ["md/browser", `${browserName}_${browserVersion}`] + ]; + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); + } + const appId = await config3?.userAgentAppId?.(); + if (appId) { + sections.push([`app/${appId}`]); + } + return sections; + }, "createDefaultUserAgentProvider"); + fallback = { + os(ua) { + if (/iPhone|iPad|iPod/.test(ua)) + return "iOS"; + if (/Macintosh|Mac OS X/.test(ua)) + return "macOS"; + if (/Windows NT/.test(ua)) + return "Windows"; + if (/Android/.test(ua)) + return "Android"; + if (/Linux/.test(ua)) + return "Linux"; + return void 0; + }, + browser(ua) { + if (/EdgiOS|EdgA|Edg\//.test(ua)) + return "Microsoft Edge"; + if (/Firefox\//.test(ua)) + return "Firefox"; + if (/Chrome\//.test(ua)) + return "Chrome"; + if (/Safari\//.test(ua)) + return "Safari"; + return void 0; + } + }; + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/Int64.js +function negate2(bytes) { + for (let i2 = 0; i2 < 8; i2++) { + bytes[i2] ^= 255; + } + for (let i2 = 7; i2 > -1; i2--) { + bytes[i2]++; + if (bytes[i2] !== 0) + break; + } +} +var Int642; +var init_Int64 = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/Int64.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + Int642 = class { + bytes; + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static fromNumber(number4) { + if (number4 > 9223372036854776e3 || number4 < -9223372036854776e3) { + throw new Error(`${number4} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i2 = 7, remaining = Math.abs(Math.round(number4)); i2 > -1 && remaining > 0; i2--, remaining /= 256) { + bytes[i2] = remaining; + } + if (number4 < 0) { + negate2(bytes); + } + return new Int642(bytes); + } + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate2(bytes); + } + return parseInt(toHex(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } + }; + __name(Int642, "Int64"); + __name(negate2, "negate"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/HeaderMarshaller.js +var HeaderMarshaller, HEADER_VALUE_TYPE2, BOOLEAN_TAG, BYTE_TAG, SHORT_TAG, INT_TAG, LONG_TAG, BINARY_TAG, STRING_TAG, TIMESTAMP_TAG, UUID_TAG, UUID_PATTERN2; +var init_HeaderMarshaller = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/HeaderMarshaller.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es10(); + init_Int64(); + HeaderMarshaller = class { + toUtf8; + fromUtf8; + constructor(toUtf82, fromUtf85) { + this.toUtf8 = toUtf82; + this.fromUtf8 = fromUtf85; + } + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = this.fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([header.value ? 0 : 1]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8(0, 3); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8(0, 4); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8(0, 6); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = this.fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8(0, 7); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int642.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN2.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set(fromHex(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } + parse(headers) { + const out = {}; + let position = 0; + while (position < headers.byteLength) { + const nameLength = headers.getUint8(position++); + const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength)); + position += nameLength; + switch (headers.getUint8(position++)) { + case 0: + out[name] = { + type: BOOLEAN_TAG, + value: true + }; + break; + case 1: + out[name] = { + type: BOOLEAN_TAG, + value: false + }; + break; + case 2: + out[name] = { + type: BYTE_TAG, + value: headers.getInt8(position++) + }; + break; + case 3: + out[name] = { + type: SHORT_TAG, + value: headers.getInt16(position, false) + }; + position += 2; + break; + case 4: + out[name] = { + type: INT_TAG, + value: headers.getInt32(position, false) + }; + position += 4; + break; + case 5: + out[name] = { + type: LONG_TAG, + value: new Int642(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)) + }; + position += 8; + break; + case 6: + const binaryLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: BINARY_TAG, + value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength) + }; + position += binaryLength; + break; + case 7: + const stringLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: STRING_TAG, + value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)) + }; + position += stringLength; + break; + case 8: + out[name] = { + type: TIMESTAMP_TAG, + value: new Date(new Int642(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()) + }; + position += 8; + break; + case 9: + const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16); + position += 16; + out[name] = { + type: UUID_TAG, + value: `${toHex(uuidBytes.subarray(0, 4))}-${toHex(uuidBytes.subarray(4, 6))}-${toHex(uuidBytes.subarray(6, 8))}-${toHex(uuidBytes.subarray(8, 10))}-${toHex(uuidBytes.subarray(10))}` + }; + break; + default: + throw new Error(`Unrecognized header type tag`); + } + } + return out; + } + }; + __name(HeaderMarshaller, "HeaderMarshaller"); + (function(HEADER_VALUE_TYPE3) { + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["boolTrue"] = 0] = "boolTrue"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["boolFalse"] = 1] = "boolFalse"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["byte"] = 2] = "byte"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["short"] = 3] = "short"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["integer"] = 4] = "integer"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["long"] = 5] = "long"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["byteArray"] = 6] = "byteArray"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["string"] = 7] = "string"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["timestamp"] = 8] = "timestamp"; + HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["uuid"] = 9] = "uuid"; + })(HEADER_VALUE_TYPE2 || (HEADER_VALUE_TYPE2 = {})); + BOOLEAN_TAG = "boolean"; + BYTE_TAG = "byte"; + SHORT_TAG = "short"; + INT_TAG = "integer"; + LONG_TAG = "long"; + BINARY_TAG = "binary"; + STRING_TAG = "string"; + TIMESTAMP_TAG = "timestamp"; + UUID_TAG = "uuid"; + UUID_PATTERN2 = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/splitMessage.js +function splitMessage({ byteLength, byteOffset, buffer }) { + if (byteLength < MINIMUM_MESSAGE_LENGTH) { + throw new Error("Provided message too short to accommodate event stream message overhead"); + } + const view = new DataView(buffer, byteOffset, byteLength); + const messageLength = view.getUint32(0, false); + if (byteLength !== messageLength) { + throw new Error("Reported message length does not match received message length"); + } + const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false); + const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false); + const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false); + const checksummer = new Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH)); + if (expectedPreludeChecksum !== checksummer.digest()) { + throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`); + } + checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH))); + if (expectedMessageChecksum !== checksummer.digest()) { + throw new Error(`The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`); + } + return { + headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength), + body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)) + }; +} +var PRELUDE_MEMBER_LENGTH, PRELUDE_LENGTH, CHECKSUM_LENGTH, MINIMUM_MESSAGE_LENGTH; +var init_splitMessage = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/splitMessage.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_module3(); + PRELUDE_MEMBER_LENGTH = 4; + PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; + CHECKSUM_LENGTH = 4; + MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; + __name(splitMessage, "splitMessage"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/EventStreamCodec.js +var EventStreamCodec; +var init_EventStreamCodec = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/EventStreamCodec.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_module3(); + init_HeaderMarshaller(); + init_splitMessage(); + EventStreamCodec = class { + headerMarshaller; + messageBuffer; + isEndOfStream; + constructor(toUtf82, fromUtf85) { + this.headerMarshaller = new HeaderMarshaller(toUtf82, fromUtf85); + this.messageBuffer = []; + this.isEndOfStream = false; + } + feed(message2) { + this.messageBuffer.push(this.decode(message2)); + } + endOfStream() { + this.isEndOfStream = true; + } + getMessage() { + const message2 = this.messageBuffer.pop(); + const isEndOfStream = this.isEndOfStream; + return { + getMessage() { + return message2; + }, + isEndOfStream() { + return isEndOfStream; + } + }; + } + getAvailableMessages() { + const messages = this.messageBuffer; + this.messageBuffer = []; + const isEndOfStream = this.isEndOfStream; + return { + getMessages() { + return messages; + }, + isEndOfStream() { + return isEndOfStream; + } + }; + } + encode({ headers: rawHeaders, body }) { + const headers = this.headerMarshaller.format(rawHeaders); + const length = headers.byteLength + body.byteLength + 16; + const out = new Uint8Array(length); + const view = new DataView(out.buffer, out.byteOffset, out.byteLength); + const checksum = new Crc32(); + view.setUint32(0, length, false); + view.setUint32(4, headers.byteLength, false); + view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false); + out.set(headers, 12); + out.set(body, headers.byteLength + 12); + view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false); + return out; + } + decode(message2) { + const { headers, body } = splitMessage(message2); + return { headers: this.headerMarshaller.parse(headers), body }; + } + formatHeaders(rawHeaders) { + return this.headerMarshaller.format(rawHeaders); + } + }; + __name(EventStreamCodec, "EventStreamCodec"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/Message.js +var init_Message = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/Message.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/MessageDecoderStream.js +var MessageDecoderStream; +var init_MessageDecoderStream = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/MessageDecoderStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + MessageDecoderStream = class { + options; + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const bytes of this.options.inputStream) { + const decoded = this.options.decoder.decode(bytes); + yield decoded; + } + } + }; + __name(MessageDecoderStream, "MessageDecoderStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/MessageEncoderStream.js +var MessageEncoderStream; +var init_MessageEncoderStream = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/MessageEncoderStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + MessageEncoderStream = class { + options; + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const msg of this.options.messageStream) { + const encoded = this.options.encoder.encode(msg); + yield encoded; + } + if (this.options.includeEndFrame) { + yield new Uint8Array(0); + } + } + }; + __name(MessageEncoderStream, "MessageEncoderStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageDecoderStream.js +var SmithyMessageDecoderStream; +var init_SmithyMessageDecoderStream = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageDecoderStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SmithyMessageDecoderStream = class { + options; + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const message2 of this.options.messageStream) { + const deserialized = await this.options.deserializer(message2); + if (deserialized === void 0) + continue; + yield deserialized; + } + } + }; + __name(SmithyMessageDecoderStream, "SmithyMessageDecoderStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageEncoderStream.js +var SmithyMessageEncoderStream; +var init_SmithyMessageEncoderStream = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageEncoderStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SmithyMessageEncoderStream = class { + options; + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const chunk of this.options.inputStream) { + const payloadBuf = this.options.serializer(chunk); + yield payloadBuf; + } + } + }; + __name(SmithyMessageEncoderStream, "SmithyMessageEncoderStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-codec/dist-es/index.js +var init_dist_es47 = __esm({ + "../../node_modules/@smithy/eventstream-codec/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamCodec(); + init_HeaderMarshaller(); + init_Int64(); + init_Message(); + init_MessageDecoderStream(); + init_MessageEncoderStream(); + init_SmithyMessageDecoderStream(); + init_SmithyMessageEncoderStream(); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-universal/dist-es/getChunkedStream.js +function getChunkedStream(source) { + let currentMessageTotalLength = 0; + let currentMessagePendingLength = 0; + let currentMessage = null; + let messageLengthBuffer = null; + const allocateMessage = /* @__PURE__ */ __name((size) => { + if (typeof size !== "number") { + throw new Error("Attempted to allocate an event message where size was not a number: " + size); + } + currentMessageTotalLength = size; + currentMessagePendingLength = 4; + currentMessage = new Uint8Array(size); + const currentMessageView = new DataView(currentMessage.buffer); + currentMessageView.setUint32(0, size, false); + }, "allocateMessage"); + const iterator2 = /* @__PURE__ */ __name(async function* () { + const sourceIterator = source[Symbol.asyncIterator](); + while (true) { + const { value, done } = await sourceIterator.next(); + if (done) { + if (!currentMessageTotalLength) { + return; + } else if (currentMessageTotalLength === currentMessagePendingLength) { + yield currentMessage; + } else { + throw new Error("Truncated event message received."); + } + return; + } + const chunkLength = value.length; + let currentOffset = 0; + while (currentOffset < chunkLength) { + if (!currentMessage) { + const bytesRemaining = chunkLength - currentOffset; + if (!messageLengthBuffer) { + messageLengthBuffer = new Uint8Array(4); + } + const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining); + messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength); + currentMessagePendingLength += numBytesForTotal; + currentOffset += numBytesForTotal; + if (currentMessagePendingLength < 4) { + break; + } + allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false)); + messageLengthBuffer = null; + } + const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset); + currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength); + currentMessagePendingLength += numBytesToWrite; + currentOffset += numBytesToWrite; + if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) { + yield currentMessage; + currentMessage = null; + currentMessageTotalLength = 0; + currentMessagePendingLength = 0; + } + } + } + }, "iterator"); + return { + [Symbol.asyncIterator]: iterator2 + }; +} +var init_getChunkedStream = __esm({ + "../../node_modules/@smithy/eventstream-serde-universal/dist-es/getChunkedStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(getChunkedStream, "getChunkedStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-universal/dist-es/getUnmarshalledStream.js +function getMessageUnmarshaller(deserializer, toUtf82) { + return async function(message2) { + const { value: messageType } = message2.headers[":message-type"]; + if (messageType === "error") { + const unmodeledError = new Error(message2.headers[":error-message"].value || "UnknownError"); + unmodeledError.name = message2.headers[":error-code"].value; + throw unmodeledError; + } else if (messageType === "exception") { + const code = message2.headers[":exception-type"].value; + const exception = { [code]: message2 }; + const deserializedException = await deserializer(exception); + if (deserializedException.$unknown) { + const error50 = new Error(toUtf82(message2.body)); + error50.name = code; + throw error50; + } + throw deserializedException[code]; + } else if (messageType === "event") { + const event = { + [message2.headers[":event-type"].value]: message2 + }; + const deserialized = await deserializer(event); + if (deserialized.$unknown) + return; + return deserialized; + } else { + throw Error(`Unrecognizable event type: ${message2.headers[":event-type"].value}`); + } + }; +} +var init_getUnmarshalledStream = __esm({ + "../../node_modules/@smithy/eventstream-serde-universal/dist-es/getUnmarshalledStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(getMessageUnmarshaller, "getMessageUnmarshaller"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-universal/dist-es/EventStreamMarshaller.js +var EventStreamMarshaller; +var init_EventStreamMarshaller = __esm({ + "../../node_modules/@smithy/eventstream-serde-universal/dist-es/EventStreamMarshaller.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es47(); + init_getChunkedStream(); + init_getUnmarshalledStream(); + EventStreamMarshaller = class { + eventStreamCodec; + utfEncoder; + constructor({ utf8Encoder, utf8Decoder }) { + this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder); + this.utfEncoder = utf8Encoder; + } + deserialize(body, deserializer) { + const inputStream = getChunkedStream(body); + return new SmithyMessageDecoderStream({ + messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }), + deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder) + }); + } + serialize(inputStream, serializer) { + return new MessageEncoderStream({ + messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }), + encoder: this.eventStreamCodec, + includeEndFrame: true + }); + } + }; + __name(EventStreamMarshaller, "EventStreamMarshaller"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-universal/dist-es/provider.js +var init_provider = __esm({ + "../../node_modules/@smithy/eventstream-serde-universal/dist-es/provider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-universal/dist-es/index.js +var init_dist_es48 = __esm({ + "../../node_modules/@smithy/eventstream-serde-universal/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamMarshaller(); + init_provider(); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-browser/dist-es/utils.js +var readableStreamtoIterable, iterableToReadableStream; +var init_utils6 = __esm({ + "../../node_modules/@smithy/eventstream-serde-browser/dist-es/utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + readableStreamtoIterable = /* @__PURE__ */ __name((readableStream) => ({ + [Symbol.asyncIterator]: async function* () { + const reader = readableStream.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) + return; + yield value; + } + } finally { + reader.releaseLock(); + } + } + }), "readableStreamtoIterable"); + iterableToReadableStream = /* @__PURE__ */ __name((asyncIterable) => { + const iterator2 = asyncIterable[Symbol.asyncIterator](); + return new ReadableStream({ + async pull(controller) { + const { done, value } = await iterator2.next(); + if (done) { + return controller.close(); + } + controller.enqueue(value); + } + }); + }, "iterableToReadableStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-browser/dist-es/EventStreamMarshaller.js +var EventStreamMarshaller2, isReadableStream2; +var init_EventStreamMarshaller2 = __esm({ + "../../node_modules/@smithy/eventstream-serde-browser/dist-es/EventStreamMarshaller.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es48(); + init_utils6(); + EventStreamMarshaller2 = class { + universalMarshaller; + constructor({ utf8Encoder, utf8Decoder }) { + this.universalMarshaller = new EventStreamMarshaller({ + utf8Decoder, + utf8Encoder + }); + } + deserialize(body, deserializer) { + const bodyIterable = isReadableStream2(body) ? readableStreamtoIterable(body) : body; + return this.universalMarshaller.deserialize(bodyIterable, deserializer); + } + serialize(input, serializer) { + const serialziedIterable = this.universalMarshaller.serialize(input, serializer); + return typeof ReadableStream === "function" ? iterableToReadableStream(serialziedIterable) : serialziedIterable; + } + }; + __name(EventStreamMarshaller2, "EventStreamMarshaller"); + isReadableStream2 = /* @__PURE__ */ __name((body) => typeof ReadableStream === "function" && body instanceof ReadableStream, "isReadableStream"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-browser/dist-es/provider.js +var eventStreamSerdeProvider; +var init_provider2 = __esm({ + "../../node_modules/@smithy/eventstream-serde-browser/dist-es/provider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamMarshaller2(); + eventStreamSerdeProvider = /* @__PURE__ */ __name((options) => new EventStreamMarshaller2(options), "eventStreamSerdeProvider"); + } +}); + +// ../../node_modules/@smithy/eventstream-serde-browser/dist-es/index.js +var init_dist_es49 = __esm({ + "../../node_modules/@smithy/eventstream-serde-browser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_EventStreamMarshaller2(); + init_provider2(); + init_utils6(); + } +}); + +// ../../node_modules/@smithy/chunked-blob-reader/dist-es/index.js +async function blobReader(blob2, onChunk, chunkSize = 1024 * 1024) { + const size = blob2.size; + let totalBytesRead = 0; + while (totalBytesRead < size) { + const slice = blob2.slice(totalBytesRead, Math.min(size, totalBytesRead + chunkSize)); + onChunk(new Uint8Array(await slice.arrayBuffer())); + totalBytesRead += slice.size; + } +} +var init_dist_es50 = __esm({ + "../../node_modules/@smithy/chunked-blob-reader/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(blobReader, "blobReader"); + } +}); + +// ../../node_modules/@smithy/hash-blob-browser/dist-es/index.js +var blobHasher; +var init_dist_es51 = __esm({ + "../../node_modules/@smithy/hash-blob-browser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es50(); + blobHasher = /* @__PURE__ */ __name(async function blobHasher2(hashCtor, blob2) { + const hash4 = new hashCtor(); + await blobReader(blob2, (chunk) => { + hash4.update(chunk); + }); + return hash4.digest(); + }, "blobHasher"); + } +}); + +// ../../node_modules/@smithy/invalid-dependency/dist-es/invalidFunction.js +var init_invalidFunction = __esm({ + "../../node_modules/@smithy/invalid-dependency/dist-es/invalidFunction.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@smithy/invalid-dependency/dist-es/invalidProvider.js +var invalidProvider; +var init_invalidProvider = __esm({ + "../../node_modules/@smithy/invalid-dependency/dist-es/invalidProvider.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + invalidProvider = /* @__PURE__ */ __name((message2) => () => Promise.reject(message2), "invalidProvider"); + } +}); + +// ../../node_modules/@smithy/invalid-dependency/dist-es/index.js +var init_dist_es52 = __esm({ + "../../node_modules/@smithy/invalid-dependency/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_invalidFunction(); + init_invalidProvider(); + } +}); + +// ../../node_modules/@smithy/md5-js/dist-es/constants.js +var BLOCK_SIZE2, DIGEST_LENGTH2, INIT2; +var init_constants13 = __esm({ + "../../node_modules/@smithy/md5-js/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + BLOCK_SIZE2 = 64; + DIGEST_LENGTH2 = 16; + INIT2 = [1732584193, 4023233417, 2562383102, 271733878]; + } +}); + +// ../../node_modules/@smithy/md5-js/dist-es/index.js +function cmn(q2, a2, b2, x2, s2, t9) { + a2 = (a2 + q2 & 4294967295) + (x2 + t9 & 4294967295) & 4294967295; + return (a2 << s2 | a2 >>> 32 - s2) + b2 & 4294967295; +} +function ff(a2, b2, c2, d2, x2, s2, t9) { + return cmn(b2 & c2 | ~b2 & d2, a2, b2, x2, s2, t9); +} +function gg(a2, b2, c2, d2, x2, s2, t9) { + return cmn(b2 & d2 | c2 & ~d2, a2, b2, x2, s2, t9); +} +function hh(a2, b2, c2, d2, x2, s2, t9) { + return cmn(b2 ^ c2 ^ d2, a2, b2, x2, s2, t9); +} +function ii(a2, b2, c2, d2, x2, s2, t9) { + return cmn(c2 ^ (b2 | ~d2), a2, b2, x2, s2, t9); +} +function isEmptyData3(data) { + if (typeof data === "string") { + return data.length === 0; + } + return data.byteLength === 0; +} +function convertToBuffer3(data) { + if (typeof data === "string") { + return fromUtf8(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); +} +var Md5; +var init_dist_es53 = __esm({ + "../../node_modules/@smithy/md5-js/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es5(); + init_constants13(); + Md5 = class { + state; + buffer; + bufferLength; + bytesHashed; + finished; + constructor() { + this.reset(); + } + update(sourceData) { + if (isEmptyData3(sourceData)) { + return; + } else if (this.finished) { + throw new Error("Attempted to update an already finished hash."); + } + const data = convertToBuffer3(sourceData); + let position = 0; + let { byteLength } = data; + this.bytesHashed += byteLength; + while (byteLength > 0) { + this.buffer.setUint8(this.bufferLength++, data[position++]); + byteLength--; + if (this.bufferLength === BLOCK_SIZE2) { + this.hashBuffer(); + this.bufferLength = 0; + } + } + } + async digest() { + if (!this.finished) { + const { buffer, bufferLength: undecoratedLength, bytesHashed } = this; + const bitsHashed = bytesHashed * 8; + buffer.setUint8(this.bufferLength++, 128); + if (undecoratedLength % BLOCK_SIZE2 >= BLOCK_SIZE2 - 8) { + for (let i2 = this.bufferLength; i2 < BLOCK_SIZE2; i2++) { + buffer.setUint8(i2, 0); + } + this.hashBuffer(); + this.bufferLength = 0; + } + for (let i2 = this.bufferLength; i2 < BLOCK_SIZE2 - 8; i2++) { + buffer.setUint8(i2, 0); + } + buffer.setUint32(BLOCK_SIZE2 - 8, bitsHashed >>> 0, true); + buffer.setUint32(BLOCK_SIZE2 - 4, Math.floor(bitsHashed / 4294967296), true); + this.hashBuffer(); + this.finished = true; + } + const out = new DataView(new ArrayBuffer(DIGEST_LENGTH2)); + for (let i2 = 0; i2 < 4; i2++) { + out.setUint32(i2 * 4, this.state[i2], true); + } + return new Uint8Array(out.buffer, out.byteOffset, out.byteLength); + } + hashBuffer() { + const { buffer, state } = this; + let a2 = state[0], b2 = state[1], c2 = state[2], d2 = state[3]; + a2 = ff(a2, b2, c2, d2, buffer.getUint32(0, true), 7, 3614090360); + d2 = ff(d2, a2, b2, c2, buffer.getUint32(4, true), 12, 3905402710); + c2 = ff(c2, d2, a2, b2, buffer.getUint32(8, true), 17, 606105819); + b2 = ff(b2, c2, d2, a2, buffer.getUint32(12, true), 22, 3250441966); + a2 = ff(a2, b2, c2, d2, buffer.getUint32(16, true), 7, 4118548399); + d2 = ff(d2, a2, b2, c2, buffer.getUint32(20, true), 12, 1200080426); + c2 = ff(c2, d2, a2, b2, buffer.getUint32(24, true), 17, 2821735955); + b2 = ff(b2, c2, d2, a2, buffer.getUint32(28, true), 22, 4249261313); + a2 = ff(a2, b2, c2, d2, buffer.getUint32(32, true), 7, 1770035416); + d2 = ff(d2, a2, b2, c2, buffer.getUint32(36, true), 12, 2336552879); + c2 = ff(c2, d2, a2, b2, buffer.getUint32(40, true), 17, 4294925233); + b2 = ff(b2, c2, d2, a2, buffer.getUint32(44, true), 22, 2304563134); + a2 = ff(a2, b2, c2, d2, buffer.getUint32(48, true), 7, 1804603682); + d2 = ff(d2, a2, b2, c2, buffer.getUint32(52, true), 12, 4254626195); + c2 = ff(c2, d2, a2, b2, buffer.getUint32(56, true), 17, 2792965006); + b2 = ff(b2, c2, d2, a2, buffer.getUint32(60, true), 22, 1236535329); + a2 = gg(a2, b2, c2, d2, buffer.getUint32(4, true), 5, 4129170786); + d2 = gg(d2, a2, b2, c2, buffer.getUint32(24, true), 9, 3225465664); + c2 = gg(c2, d2, a2, b2, buffer.getUint32(44, true), 14, 643717713); + b2 = gg(b2, c2, d2, a2, buffer.getUint32(0, true), 20, 3921069994); + a2 = gg(a2, b2, c2, d2, buffer.getUint32(20, true), 5, 3593408605); + d2 = gg(d2, a2, b2, c2, buffer.getUint32(40, true), 9, 38016083); + c2 = gg(c2, d2, a2, b2, buffer.getUint32(60, true), 14, 3634488961); + b2 = gg(b2, c2, d2, a2, buffer.getUint32(16, true), 20, 3889429448); + a2 = gg(a2, b2, c2, d2, buffer.getUint32(36, true), 5, 568446438); + d2 = gg(d2, a2, b2, c2, buffer.getUint32(56, true), 9, 3275163606); + c2 = gg(c2, d2, a2, b2, buffer.getUint32(12, true), 14, 4107603335); + b2 = gg(b2, c2, d2, a2, buffer.getUint32(32, true), 20, 1163531501); + a2 = gg(a2, b2, c2, d2, buffer.getUint32(52, true), 5, 2850285829); + d2 = gg(d2, a2, b2, c2, buffer.getUint32(8, true), 9, 4243563512); + c2 = gg(c2, d2, a2, b2, buffer.getUint32(28, true), 14, 1735328473); + b2 = gg(b2, c2, d2, a2, buffer.getUint32(48, true), 20, 2368359562); + a2 = hh(a2, b2, c2, d2, buffer.getUint32(20, true), 4, 4294588738); + d2 = hh(d2, a2, b2, c2, buffer.getUint32(32, true), 11, 2272392833); + c2 = hh(c2, d2, a2, b2, buffer.getUint32(44, true), 16, 1839030562); + b2 = hh(b2, c2, d2, a2, buffer.getUint32(56, true), 23, 4259657740); + a2 = hh(a2, b2, c2, d2, buffer.getUint32(4, true), 4, 2763975236); + d2 = hh(d2, a2, b2, c2, buffer.getUint32(16, true), 11, 1272893353); + c2 = hh(c2, d2, a2, b2, buffer.getUint32(28, true), 16, 4139469664); + b2 = hh(b2, c2, d2, a2, buffer.getUint32(40, true), 23, 3200236656); + a2 = hh(a2, b2, c2, d2, buffer.getUint32(52, true), 4, 681279174); + d2 = hh(d2, a2, b2, c2, buffer.getUint32(0, true), 11, 3936430074); + c2 = hh(c2, d2, a2, b2, buffer.getUint32(12, true), 16, 3572445317); + b2 = hh(b2, c2, d2, a2, buffer.getUint32(24, true), 23, 76029189); + a2 = hh(a2, b2, c2, d2, buffer.getUint32(36, true), 4, 3654602809); + d2 = hh(d2, a2, b2, c2, buffer.getUint32(48, true), 11, 3873151461); + c2 = hh(c2, d2, a2, b2, buffer.getUint32(60, true), 16, 530742520); + b2 = hh(b2, c2, d2, a2, buffer.getUint32(8, true), 23, 3299628645); + a2 = ii(a2, b2, c2, d2, buffer.getUint32(0, true), 6, 4096336452); + d2 = ii(d2, a2, b2, c2, buffer.getUint32(28, true), 10, 1126891415); + c2 = ii(c2, d2, a2, b2, buffer.getUint32(56, true), 15, 2878612391); + b2 = ii(b2, c2, d2, a2, buffer.getUint32(20, true), 21, 4237533241); + a2 = ii(a2, b2, c2, d2, buffer.getUint32(48, true), 6, 1700485571); + d2 = ii(d2, a2, b2, c2, buffer.getUint32(12, true), 10, 2399980690); + c2 = ii(c2, d2, a2, b2, buffer.getUint32(40, true), 15, 4293915773); + b2 = ii(b2, c2, d2, a2, buffer.getUint32(4, true), 21, 2240044497); + a2 = ii(a2, b2, c2, d2, buffer.getUint32(32, true), 6, 1873313359); + d2 = ii(d2, a2, b2, c2, buffer.getUint32(60, true), 10, 4264355552); + c2 = ii(c2, d2, a2, b2, buffer.getUint32(24, true), 15, 2734768916); + b2 = ii(b2, c2, d2, a2, buffer.getUint32(52, true), 21, 1309151649); + a2 = ii(a2, b2, c2, d2, buffer.getUint32(16, true), 6, 4149444226); + d2 = ii(d2, a2, b2, c2, buffer.getUint32(44, true), 10, 3174756917); + c2 = ii(c2, d2, a2, b2, buffer.getUint32(8, true), 15, 718787259); + b2 = ii(b2, c2, d2, a2, buffer.getUint32(36, true), 21, 3951481745); + state[0] = a2 + state[0] & 4294967295; + state[1] = b2 + state[1] & 4294967295; + state[2] = c2 + state[2] & 4294967295; + state[3] = d2 + state[3] & 4294967295; + } + reset() { + this.state = Uint32Array.from(INIT2); + this.buffer = new DataView(new ArrayBuffer(BLOCK_SIZE2)); + this.bufferLength = 0; + this.bytesHashed = 0; + this.finished = false; + } + }; + __name(Md5, "Md5"); + __name(cmn, "cmn"); + __name(ff, "ff"); + __name(gg, "gg"); + __name(hh, "hh"); + __name(ii, "ii"); + __name(isEmptyData3, "isEmptyData"); + __name(convertToBuffer3, "convertToBuffer"); + } +}); + +// ../../node_modules/@smithy/util-defaults-mode-browser/dist-es/constants.js +var DEFAULTS_MODE_OPTIONS; +var init_constants14 = __esm({ + "../../node_modules/@smithy/util-defaults-mode-browser/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; + } +}); + +// ../../node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js +var resolveDefaultsModeConfig, useMobileConfiguration; +var init_resolveDefaultsModeConfig = __esm({ + "../../node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es16(); + init_constants14(); + resolveDefaultsModeConfig = /* @__PURE__ */ __name(({ defaultsMode } = {}) => memoize(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode?.toLowerCase()) { + case "auto": + return Promise.resolve(useMobileConfiguration() ? "mobile" : "standard"); + case "mobile": + case "in-region": + case "cross-region": + case "standard": + case "legacy": + return Promise.resolve(mode?.toLocaleLowerCase()); + case void 0: + return Promise.resolve("legacy"); + default: + throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`); + } + }), "resolveDefaultsModeConfig"); + useMobileConfiguration = /* @__PURE__ */ __name(() => { + const navigator2 = window?.navigator; + if (navigator2?.connection) { + const { effectiveType, rtt, downlink } = navigator2?.connection; + const slow = typeof effectiveType === "string" && effectiveType !== "4g" || Number(rtt) > 100 || Number(downlink) < 10; + if (slow) { + return true; + } + } + return navigator2?.userAgentData?.mobile || typeof navigator2?.maxTouchPoints === "number" && navigator2?.maxTouchPoints > 1; + }, "useMobileConfiguration"); + } +}); + +// ../../node_modules/@smithy/util-defaults-mode-browser/dist-es/index.js +var init_dist_es54 = __esm({ + "../../node_modules/@smithy/util-defaults-mode-browser/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_resolveDefaultsModeConfig(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.shared.js +var getRuntimeConfig; +var init_runtimeConfig_shared = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.shared.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es23(); + init_protocols2(); + init_dist_es43(); + init_dist_es21(); + init_dist_es13(); + init_dist_es6(); + init_dist_es11(); + init_dist_es5(); + init_httpAuthSchemeProvider(); + init_endpointResolver(); + init_schemas_0(); + getRuntimeConfig = /* @__PURE__ */ __name((config3) => { + return { + apiVersion: "2006-03-01", + base64Decoder: config3?.base64Decoder ?? fromBase64, + base64Encoder: config3?.base64Encoder ?? toBase64, + disableHostPrefix: config3?.disableHostPrefix ?? false, + endpointProvider: config3?.endpointProvider ?? defaultEndpointResolver, + extensions: config3?.extensions ?? [], + getAwsChunkedEncodingStream: config3?.getAwsChunkedEncodingStream ?? getAwsChunkedEncodingStream, + httpAuthSchemeProvider: config3?.httpAuthSchemeProvider ?? defaultS3HttpAuthSchemeProvider, + httpAuthSchemes: config3?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer() + }, + { + schemeId: "aws.auth#sigv4a", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"), + signer: new AwsSdkSigV4ASigner() + } + ], + logger: config3?.logger ?? new NoOpLogger(), + protocol: config3?.protocol ?? AwsRestXmlProtocol, + protocolSettings: config3?.protocolSettings ?? { + defaultNamespace: "com.amazonaws.s3", + errorTypeRegistries, + xmlNamespace: "http://s3.amazonaws.com/doc/2006-03-01/", + version: "2006-03-01", + serviceTarget: "AmazonS3" + }, + sdkStreamMixin: config3?.sdkStreamMixin ?? sdkStreamMixin, + serviceId: config3?.serviceId ?? "S3", + signerConstructor: config3?.signerConstructor ?? SignatureV4MultiRegion, + signingEscapePath: config3?.signingEscapePath ?? false, + urlParser: config3?.urlParser ?? parseUrl, + useArnRegion: config3?.useArnRegion ?? void 0, + utf8Decoder: config3?.utf8Decoder ?? fromUtf8, + utf8Encoder: config3?.utf8Encoder ?? toUtf8 + }; + }, "getRuntimeConfig"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.browser.js +var getRuntimeConfig2; +var init_runtimeConfig_browser = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_package(); + init_module5(); + init_module7(); + init_dist_es46(); + init_dist_es37(); + init_dist_es49(); + init_dist_es9(); + init_dist_es51(); + init_dist_es52(); + init_dist_es53(); + init_dist_es21(); + init_dist_es19(); + init_dist_es54(); + init_dist_es35(); + init_runtimeConfig_shared(); + getRuntimeConfig2 = /* @__PURE__ */ __name((config3) => { + const defaultsMode = resolveDefaultsModeConfig(config3); + const defaultConfigProvider = /* @__PURE__ */ __name(() => defaultsMode().then(loadConfigsForDefaultMode), "defaultConfigProvider"); + const clientSharedValues = getRuntimeConfig(config3); + return { + ...clientSharedValues, + ...config3, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config3?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: config3?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: config3?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), + eventStreamSerdeProvider: config3?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, + maxAttempts: config3?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + md5: config3?.md5 ?? Md5, + region: config3?.region ?? invalidProvider("Region is missing"), + requestHandler: FetchHttpHandler.create(config3?.requestHandler ?? defaultConfigProvider), + retryMode: config3?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), + sha1: config3?.sha1 ?? Sha12, + sha256: config3?.sha256 ?? Sha2563, + streamCollector: config3?.streamCollector ?? streamCollector, + streamHasher: config3?.streamHasher ?? blobHasher, + useDualstackEndpoint: config3?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config3?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)) + }; + }, "getRuntimeConfig"); + } +}); + +// ../../node_modules/@aws-sdk/region-config-resolver/dist-es/extensions/index.js +var getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration; +var init_extensions4 = __esm({ + "../../node_modules/@aws-sdk/region-config-resolver/dist-es/extensions/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + setRegion(region) { + runtimeConfig.region = region; + }, + region() { + return runtimeConfig.region; + } + }; + }, "getAwsRegionExtensionConfiguration"); + resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => { + return { + region: awsRegionExtensionConfiguration.region() + }; + }, "resolveAwsRegionExtensionConfiguration"); + } +}); + +// ../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/awsRegionConfig.js +var init_awsRegionConfig = __esm({ + "../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/awsRegionConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/stsRegionDefaultResolver.browser.js +var init_stsRegionDefaultResolver_browser = __esm({ + "../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/stsRegionDefaultResolver.browser.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/region-config-resolver/dist-es/index.js +var init_dist_es55 = __esm({ + "../../node_modules/@aws-sdk/region-config-resolver/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_extensions4(); + init_awsRegionConfig(); + init_stsRegionDefaultResolver_browser(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthExtensionConfiguration.js +var getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig; +var init_httpAuthExtensionConfiguration = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthExtensionConfiguration.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; + }, "getHttpAuthExtensionConfiguration"); + resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config3) => { + return { + httpAuthSchemes: config3.httpAuthSchemes(), + httpAuthSchemeProvider: config3.httpAuthSchemeProvider(), + credentials: config3.credentials() + }; + }, "resolveHttpAuthRuntimeConfig"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/runtimeExtensions.js +var resolveRuntimeExtensions; +var init_runtimeExtensions = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/runtimeExtensions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es55(); + init_dist_es2(); + init_dist_es21(); + init_httpAuthExtensionConfiguration(); + resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); + }, "resolveRuntimeExtensions"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/S3Client.js +var S3Client; +var init_S3Client = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/S3Client.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es3(); + init_dist_es26(); + init_dist_es27(); + init_dist_es28(); + init_dist_es29(); + init_dist_es31(); + init_dist_es36(); + init_dist_es37(); + init_dist_es15(); + init_schema3(); + init_dist_es38(); + init_dist_es39(); + init_dist_es41(); + init_dist_es42(); + init_dist_es21(); + init_httpAuthSchemeProvider(); + init_CreateSessionCommand(); + init_EndpointParameters(); + init_runtimeConfig_browser(); + init_runtimeExtensions(); + S3Client = class extends Client { + config; + constructor(...[configuration]) { + const _config_0 = getRuntimeConfig2(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveUserAgentConfig(_config_1); + const _config_3 = resolveFlexibleChecksumsConfig(_config_2); + const _config_4 = resolveRetryConfig(_config_3); + const _config_5 = resolveRegionConfig(_config_4); + const _config_6 = resolveHostHeaderConfig(_config_5); + const _config_7 = resolveEndpointConfig(_config_6); + const _config_8 = resolveEventStreamSerdeConfig(_config_7); + const _config_9 = resolveHttpAuthSchemeConfig(_config_8); + const _config_10 = resolveS3Config(_config_9, { session: [() => this, CreateSessionCommand] }); + const _config_11 = resolveRuntimeExtensions(_config_10, configuration?.extensions || []); + this.config = _config_11; + this.middlewareStack.use(getSchemaSerdePlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: defaultS3HttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config3) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config3.credentials, + "aws.auth#sigv4a": config3.credentials + }) + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + this.middlewareStack.use(getValidateBucketNamePlugin(this.config)); + this.middlewareStack.use(getAddExpectContinuePlugin(this.config)); + this.middlewareStack.use(getRegionRedirectMiddlewarePlugin(this.config)); + this.middlewareStack.use(getS3ExpressPlugin(this.config)); + this.middlewareStack.use(getS3ExpressHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } + }; + __name(S3Client, "S3Client"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/AbortMultipartUploadCommand.js +var AbortMultipartUploadCommand; +var init_AbortMultipartUploadCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/AbortMultipartUploadCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + AbortMultipartUploadCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "AbortMultipartUpload", {}).n("S3Client", "AbortMultipartUploadCommand").sc(AbortMultipartUpload$).build() { + }; + __name(AbortMultipartUploadCommand, "AbortMultipartUploadCommand"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-ssec/dist-es/index.js +function ssecMiddleware(options) { + return (next) => async (args) => { + const input = { ...args.input }; + const properties = [ + { + target: "SSECustomerKey", + hash: "SSECustomerKeyMD5" + }, + { + target: "CopySourceSSECustomerKey", + hash: "CopySourceSSECustomerKeyMD5" + } + ]; + for (const prop of properties) { + const value = input[prop.target]; + if (value) { + let valueForHash; + if (typeof value === "string") { + if (isValidBase64EncodedSSECustomerKey(value, options)) { + valueForHash = options.base64Decoder(value); + } else { + valueForHash = options.utf8Decoder(value); + input[prop.target] = options.base64Encoder(valueForHash); + } + } else { + valueForHash = ArrayBuffer.isView(value) ? new Uint8Array(value.buffer, value.byteOffset, value.byteLength) : new Uint8Array(value); + input[prop.target] = options.base64Encoder(valueForHash); + } + const hash4 = new options.md5(); + hash4.update(valueForHash); + input[prop.hash] = options.base64Encoder(await hash4.digest()); + } + } + return next({ + ...args, + input + }); + }; +} +function isValidBase64EncodedSSECustomerKey(str, options) { + const base64Regex = /^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/; + if (!base64Regex.test(str)) + return false; + try { + const decodedBytes = options.base64Decoder(str); + return decodedBytes.length === 32; + } catch { + return false; + } +} +var ssecMiddlewareOptions, getSsecPlugin; +var init_dist_es56 = __esm({ + "../../node_modules/@aws-sdk/middleware-ssec/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(ssecMiddleware, "ssecMiddleware"); + ssecMiddlewareOptions = { + name: "ssecMiddleware", + step: "initialize", + tags: ["SSE"], + override: true + }; + getSsecPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.add(ssecMiddleware(config3), ssecMiddlewareOptions); + } + }), "getSsecPlugin"); + __name(isValidBase64EncodedSSECustomerKey, "isValidBase64EncodedSSECustomerKey"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CompleteMultipartUploadCommand.js +var CompleteMultipartUploadCommand; +var init_CompleteMultipartUploadCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CompleteMultipartUploadCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CompleteMultipartUploadCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "CompleteMultipartUpload", {}).n("S3Client", "CompleteMultipartUploadCommand").sc(CompleteMultipartUpload$).build() { + }; + __name(CompleteMultipartUploadCommand, "CompleteMultipartUploadCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CopyObjectCommand.js +var CopyObjectCommand; +var init_CopyObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CopyObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CopyObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" }, + CopySource: { type: "contextParams", name: "CopySource" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "CopyObject", {}).n("S3Client", "CopyObjectCommand").sc(CopyObject$).build() { + }; + __name(CopyObjectCommand, "CopyObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/middleware-location-constraint/dist-es/index.js +function locationConstraintMiddleware(options) { + return (next) => async (args) => { + const { CreateBucketConfiguration } = args.input; + const region = await options.region(); + if (!CreateBucketConfiguration?.LocationConstraint && !CreateBucketConfiguration?.Location) { + if (region !== "us-east-1") { + args.input.CreateBucketConfiguration = args.input.CreateBucketConfiguration ?? {}; + args.input.CreateBucketConfiguration.LocationConstraint = region; + } + } + return next(args); + }; +} +var locationConstraintMiddlewareOptions, getLocationConstraintPlugin; +var init_dist_es57 = __esm({ + "../../node_modules/@aws-sdk/middleware-location-constraint/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(locationConstraintMiddleware, "locationConstraintMiddleware"); + locationConstraintMiddlewareOptions = { + step: "initialize", + tags: ["LOCATION_CONSTRAINT", "CREATE_BUCKET_CONFIGURATION"], + name: "locationConstraintMiddleware", + override: true + }; + getLocationConstraintPlugin = /* @__PURE__ */ __name((config3) => ({ + applyToStack: (clientStack) => { + clientStack.add(locationConstraintMiddleware(config3), locationConstraintMiddlewareOptions); + } + }), "getLocationConstraintPlugin"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketCommand.js +var CreateBucketCommand; +var init_CreateBucketCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es57(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CreateBucketCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + DisableAccessPoints: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getLocationConstraintPlugin(config3) + ]; + }).s("AmazonS3", "CreateBucket", {}).n("S3Client", "CreateBucketCommand").sc(CreateBucket$).build() { + }; + __name(CreateBucketCommand, "CreateBucketCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataConfigurationCommand.js +var CreateBucketMetadataConfigurationCommand; +var init_CreateBucketMetadataConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CreateBucketMetadataConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "CreateBucketMetadataConfiguration", {}).n("S3Client", "CreateBucketMetadataConfigurationCommand").sc(CreateBucketMetadataConfiguration$).build() { + }; + __name(CreateBucketMetadataConfigurationCommand, "CreateBucketMetadataConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataTableConfigurationCommand.js +var CreateBucketMetadataTableConfigurationCommand; +var init_CreateBucketMetadataTableConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataTableConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CreateBucketMetadataTableConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "CreateBucketMetadataTableConfiguration", {}).n("S3Client", "CreateBucketMetadataTableConfigurationCommand").sc(CreateBucketMetadataTableConfiguration$).build() { + }; + __name(CreateBucketMetadataTableConfigurationCommand, "CreateBucketMetadataTableConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateMultipartUploadCommand.js +var CreateMultipartUploadCommand; +var init_CreateMultipartUploadCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateMultipartUploadCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + CreateMultipartUploadCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "CreateMultipartUpload", {}).n("S3Client", "CreateMultipartUploadCommand").sc(CreateMultipartUpload$).build() { + }; + __name(CreateMultipartUploadCommand, "CreateMultipartUploadCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketAnalyticsConfigurationCommand.js +var DeleteBucketAnalyticsConfigurationCommand; +var init_DeleteBucketAnalyticsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketAnalyticsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketAnalyticsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketAnalyticsConfiguration", {}).n("S3Client", "DeleteBucketAnalyticsConfigurationCommand").sc(DeleteBucketAnalyticsConfiguration$).build() { + }; + __name(DeleteBucketAnalyticsConfigurationCommand, "DeleteBucketAnalyticsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCommand.js +var DeleteBucketCommand; +var init_DeleteBucketCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucket", {}).n("S3Client", "DeleteBucketCommand").sc(DeleteBucket$).build() { + }; + __name(DeleteBucketCommand, "DeleteBucketCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCorsCommand.js +var DeleteBucketCorsCommand; +var init_DeleteBucketCorsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCorsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketCorsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketCors", {}).n("S3Client", "DeleteBucketCorsCommand").sc(DeleteBucketCors$).build() { + }; + __name(DeleteBucketCorsCommand, "DeleteBucketCorsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketEncryptionCommand.js +var DeleteBucketEncryptionCommand; +var init_DeleteBucketEncryptionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketEncryptionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketEncryptionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketEncryption", {}).n("S3Client", "DeleteBucketEncryptionCommand").sc(DeleteBucketEncryption$).build() { + }; + __name(DeleteBucketEncryptionCommand, "DeleteBucketEncryptionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketIntelligentTieringConfigurationCommand.js +var DeleteBucketIntelligentTieringConfigurationCommand; +var init_DeleteBucketIntelligentTieringConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketIntelligentTieringConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketIntelligentTieringConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketIntelligentTieringConfiguration", {}).n("S3Client", "DeleteBucketIntelligentTieringConfigurationCommand").sc(DeleteBucketIntelligentTieringConfiguration$).build() { + }; + __name(DeleteBucketIntelligentTieringConfigurationCommand, "DeleteBucketIntelligentTieringConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketInventoryConfigurationCommand.js +var DeleteBucketInventoryConfigurationCommand; +var init_DeleteBucketInventoryConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketInventoryConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketInventoryConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketInventoryConfiguration", {}).n("S3Client", "DeleteBucketInventoryConfigurationCommand").sc(DeleteBucketInventoryConfiguration$).build() { + }; + __name(DeleteBucketInventoryConfigurationCommand, "DeleteBucketInventoryConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketLifecycleCommand.js +var DeleteBucketLifecycleCommand; +var init_DeleteBucketLifecycleCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketLifecycleCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketLifecycleCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketLifecycle", {}).n("S3Client", "DeleteBucketLifecycleCommand").sc(DeleteBucketLifecycle$).build() { + }; + __name(DeleteBucketLifecycleCommand, "DeleteBucketLifecycleCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataConfigurationCommand.js +var DeleteBucketMetadataConfigurationCommand; +var init_DeleteBucketMetadataConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketMetadataConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketMetadataConfiguration", {}).n("S3Client", "DeleteBucketMetadataConfigurationCommand").sc(DeleteBucketMetadataConfiguration$).build() { + }; + __name(DeleteBucketMetadataConfigurationCommand, "DeleteBucketMetadataConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataTableConfigurationCommand.js +var DeleteBucketMetadataTableConfigurationCommand; +var init_DeleteBucketMetadataTableConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataTableConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketMetadataTableConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketMetadataTableConfiguration", {}).n("S3Client", "DeleteBucketMetadataTableConfigurationCommand").sc(DeleteBucketMetadataTableConfiguration$).build() { + }; + __name(DeleteBucketMetadataTableConfigurationCommand, "DeleteBucketMetadataTableConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetricsConfigurationCommand.js +var DeleteBucketMetricsConfigurationCommand; +var init_DeleteBucketMetricsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetricsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketMetricsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketMetricsConfiguration", {}).n("S3Client", "DeleteBucketMetricsConfigurationCommand").sc(DeleteBucketMetricsConfiguration$).build() { + }; + __name(DeleteBucketMetricsConfigurationCommand, "DeleteBucketMetricsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketOwnershipControlsCommand.js +var DeleteBucketOwnershipControlsCommand; +var init_DeleteBucketOwnershipControlsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketOwnershipControlsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketOwnershipControlsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketOwnershipControls", {}).n("S3Client", "DeleteBucketOwnershipControlsCommand").sc(DeleteBucketOwnershipControls$).build() { + }; + __name(DeleteBucketOwnershipControlsCommand, "DeleteBucketOwnershipControlsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketPolicyCommand.js +var DeleteBucketPolicyCommand; +var init_DeleteBucketPolicyCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketPolicyCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketPolicyCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketPolicy", {}).n("S3Client", "DeleteBucketPolicyCommand").sc(DeleteBucketPolicy$).build() { + }; + __name(DeleteBucketPolicyCommand, "DeleteBucketPolicyCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketReplicationCommand.js +var DeleteBucketReplicationCommand; +var init_DeleteBucketReplicationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketReplicationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketReplicationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketReplication", {}).n("S3Client", "DeleteBucketReplicationCommand").sc(DeleteBucketReplication$).build() { + }; + __name(DeleteBucketReplicationCommand, "DeleteBucketReplicationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketTaggingCommand.js +var DeleteBucketTaggingCommand; +var init_DeleteBucketTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketTagging", {}).n("S3Client", "DeleteBucketTaggingCommand").sc(DeleteBucketTagging$).build() { + }; + __name(DeleteBucketTaggingCommand, "DeleteBucketTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketWebsiteCommand.js +var DeleteBucketWebsiteCommand; +var init_DeleteBucketWebsiteCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketWebsiteCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteBucketWebsiteCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeleteBucketWebsite", {}).n("S3Client", "DeleteBucketWebsiteCommand").sc(DeleteBucketWebsite$).build() { + }; + __name(DeleteBucketWebsiteCommand, "DeleteBucketWebsiteCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectCommand.js +var DeleteObjectCommand; +var init_DeleteObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "DeleteObject", {}).n("S3Client", "DeleteObjectCommand").sc(DeleteObject$).build() { + }; + __name(DeleteObjectCommand, "DeleteObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectsCommand.js +var DeleteObjectsCommand; +var init_DeleteObjectsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteObjectsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "DeleteObjects", {}).n("S3Client", "DeleteObjectsCommand").sc(DeleteObjects$).build() { + }; + __name(DeleteObjectsCommand, "DeleteObjectsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectTaggingCommand.js +var DeleteObjectTaggingCommand; +var init_DeleteObjectTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeleteObjectTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "DeleteObjectTagging", {}).n("S3Client", "DeleteObjectTaggingCommand").sc(DeleteObjectTagging$).build() { + }; + __name(DeleteObjectTaggingCommand, "DeleteObjectTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeletePublicAccessBlockCommand.js +var DeletePublicAccessBlockCommand; +var init_DeletePublicAccessBlockCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeletePublicAccessBlockCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + DeletePublicAccessBlockCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "DeletePublicAccessBlock", {}).n("S3Client", "DeletePublicAccessBlockCommand").sc(DeletePublicAccessBlock$).build() { + }; + __name(DeletePublicAccessBlockCommand, "DeletePublicAccessBlockCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAbacCommand.js +var GetBucketAbacCommand; +var init_GetBucketAbacCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAbacCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketAbacCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketAbac", {}).n("S3Client", "GetBucketAbacCommand").sc(GetBucketAbac$).build() { + }; + __name(GetBucketAbacCommand, "GetBucketAbacCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAccelerateConfigurationCommand.js +var GetBucketAccelerateConfigurationCommand; +var init_GetBucketAccelerateConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAccelerateConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketAccelerateConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketAccelerateConfiguration", {}).n("S3Client", "GetBucketAccelerateConfigurationCommand").sc(GetBucketAccelerateConfiguration$).build() { + }; + __name(GetBucketAccelerateConfigurationCommand, "GetBucketAccelerateConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAclCommand.js +var GetBucketAclCommand; +var init_GetBucketAclCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAclCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketAclCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketAcl", {}).n("S3Client", "GetBucketAclCommand").sc(GetBucketAcl$).build() { + }; + __name(GetBucketAclCommand, "GetBucketAclCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAnalyticsConfigurationCommand.js +var GetBucketAnalyticsConfigurationCommand; +var init_GetBucketAnalyticsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAnalyticsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketAnalyticsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketAnalyticsConfiguration", {}).n("S3Client", "GetBucketAnalyticsConfigurationCommand").sc(GetBucketAnalyticsConfiguration$).build() { + }; + __name(GetBucketAnalyticsConfigurationCommand, "GetBucketAnalyticsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketCorsCommand.js +var GetBucketCorsCommand; +var init_GetBucketCorsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketCorsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketCorsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketCors", {}).n("S3Client", "GetBucketCorsCommand").sc(GetBucketCors$).build() { + }; + __name(GetBucketCorsCommand, "GetBucketCorsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketEncryptionCommand.js +var GetBucketEncryptionCommand; +var init_GetBucketEncryptionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketEncryptionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketEncryptionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketEncryption", {}).n("S3Client", "GetBucketEncryptionCommand").sc(GetBucketEncryption$).build() { + }; + __name(GetBucketEncryptionCommand, "GetBucketEncryptionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketIntelligentTieringConfigurationCommand.js +var GetBucketIntelligentTieringConfigurationCommand; +var init_GetBucketIntelligentTieringConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketIntelligentTieringConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketIntelligentTieringConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketIntelligentTieringConfiguration", {}).n("S3Client", "GetBucketIntelligentTieringConfigurationCommand").sc(GetBucketIntelligentTieringConfiguration$).build() { + }; + __name(GetBucketIntelligentTieringConfigurationCommand, "GetBucketIntelligentTieringConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketInventoryConfigurationCommand.js +var GetBucketInventoryConfigurationCommand; +var init_GetBucketInventoryConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketInventoryConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketInventoryConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketInventoryConfiguration", {}).n("S3Client", "GetBucketInventoryConfigurationCommand").sc(GetBucketInventoryConfiguration$).build() { + }; + __name(GetBucketInventoryConfigurationCommand, "GetBucketInventoryConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLifecycleConfigurationCommand.js +var GetBucketLifecycleConfigurationCommand; +var init_GetBucketLifecycleConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLifecycleConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketLifecycleConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketLifecycleConfiguration", {}).n("S3Client", "GetBucketLifecycleConfigurationCommand").sc(GetBucketLifecycleConfiguration$).build() { + }; + __name(GetBucketLifecycleConfigurationCommand, "GetBucketLifecycleConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLocationCommand.js +var GetBucketLocationCommand; +var init_GetBucketLocationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLocationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketLocationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketLocation", {}).n("S3Client", "GetBucketLocationCommand").sc(GetBucketLocation$).build() { + }; + __name(GetBucketLocationCommand, "GetBucketLocationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLoggingCommand.js +var GetBucketLoggingCommand; +var init_GetBucketLoggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLoggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketLoggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketLogging", {}).n("S3Client", "GetBucketLoggingCommand").sc(GetBucketLogging$).build() { + }; + __name(GetBucketLoggingCommand, "GetBucketLoggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataConfigurationCommand.js +var GetBucketMetadataConfigurationCommand; +var init_GetBucketMetadataConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketMetadataConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketMetadataConfiguration", {}).n("S3Client", "GetBucketMetadataConfigurationCommand").sc(GetBucketMetadataConfiguration$).build() { + }; + __name(GetBucketMetadataConfigurationCommand, "GetBucketMetadataConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataTableConfigurationCommand.js +var GetBucketMetadataTableConfigurationCommand; +var init_GetBucketMetadataTableConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataTableConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketMetadataTableConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketMetadataTableConfiguration", {}).n("S3Client", "GetBucketMetadataTableConfigurationCommand").sc(GetBucketMetadataTableConfiguration$).build() { + }; + __name(GetBucketMetadataTableConfigurationCommand, "GetBucketMetadataTableConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetricsConfigurationCommand.js +var GetBucketMetricsConfigurationCommand; +var init_GetBucketMetricsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetricsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketMetricsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketMetricsConfiguration", {}).n("S3Client", "GetBucketMetricsConfigurationCommand").sc(GetBucketMetricsConfiguration$).build() { + }; + __name(GetBucketMetricsConfigurationCommand, "GetBucketMetricsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketNotificationConfigurationCommand.js +var GetBucketNotificationConfigurationCommand; +var init_GetBucketNotificationConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketNotificationConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketNotificationConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketNotificationConfiguration", {}).n("S3Client", "GetBucketNotificationConfigurationCommand").sc(GetBucketNotificationConfiguration$).build() { + }; + __name(GetBucketNotificationConfigurationCommand, "GetBucketNotificationConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketOwnershipControlsCommand.js +var GetBucketOwnershipControlsCommand; +var init_GetBucketOwnershipControlsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketOwnershipControlsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketOwnershipControlsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketOwnershipControls", {}).n("S3Client", "GetBucketOwnershipControlsCommand").sc(GetBucketOwnershipControls$).build() { + }; + __name(GetBucketOwnershipControlsCommand, "GetBucketOwnershipControlsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyCommand.js +var GetBucketPolicyCommand; +var init_GetBucketPolicyCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketPolicyCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketPolicy", {}).n("S3Client", "GetBucketPolicyCommand").sc(GetBucketPolicy$).build() { + }; + __name(GetBucketPolicyCommand, "GetBucketPolicyCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyStatusCommand.js +var GetBucketPolicyStatusCommand; +var init_GetBucketPolicyStatusCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyStatusCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketPolicyStatusCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketPolicyStatus", {}).n("S3Client", "GetBucketPolicyStatusCommand").sc(GetBucketPolicyStatus$).build() { + }; + __name(GetBucketPolicyStatusCommand, "GetBucketPolicyStatusCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketReplicationCommand.js +var GetBucketReplicationCommand; +var init_GetBucketReplicationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketReplicationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketReplicationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketReplication", {}).n("S3Client", "GetBucketReplicationCommand").sc(GetBucketReplication$).build() { + }; + __name(GetBucketReplicationCommand, "GetBucketReplicationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketRequestPaymentCommand.js +var GetBucketRequestPaymentCommand; +var init_GetBucketRequestPaymentCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketRequestPaymentCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketRequestPaymentCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketRequestPayment", {}).n("S3Client", "GetBucketRequestPaymentCommand").sc(GetBucketRequestPayment$).build() { + }; + __name(GetBucketRequestPaymentCommand, "GetBucketRequestPaymentCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketTaggingCommand.js +var GetBucketTaggingCommand; +var init_GetBucketTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketTagging", {}).n("S3Client", "GetBucketTaggingCommand").sc(GetBucketTagging$).build() { + }; + __name(GetBucketTaggingCommand, "GetBucketTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketVersioningCommand.js +var GetBucketVersioningCommand; +var init_GetBucketVersioningCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketVersioningCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketVersioningCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketVersioning", {}).n("S3Client", "GetBucketVersioningCommand").sc(GetBucketVersioning$).build() { + }; + __name(GetBucketVersioningCommand, "GetBucketVersioningCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketWebsiteCommand.js +var GetBucketWebsiteCommand; +var init_GetBucketWebsiteCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketWebsiteCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetBucketWebsiteCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetBucketWebsite", {}).n("S3Client", "GetBucketWebsiteCommand").sc(GetBucketWebsite$).build() { + }; + __name(GetBucketWebsiteCommand, "GetBucketWebsiteCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAclCommand.js +var GetObjectAclCommand; +var init_GetObjectAclCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAclCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectAclCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectAcl", {}).n("S3Client", "GetObjectAclCommand").sc(GetObjectAcl$).build() { + }; + __name(GetObjectAclCommand, "GetObjectAclCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAttributesCommand.js +var GetObjectAttributesCommand; +var init_GetObjectAttributesCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAttributesCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectAttributesCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectAttributes", {}).n("S3Client", "GetObjectAttributesCommand").sc(GetObjectAttributes$).build() { + }; + __name(GetObjectAttributesCommand, "GetObjectAttributesCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectCommand.js +var GetObjectCommand; +var init_GetObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestChecksumRequired: false, + requestValidationModeMember: "ChecksumMode", + "responseAlgorithms": ["CRC64NVME", "CRC32", "CRC32C", "SHA256", "SHA1"] + }), + getSsecPlugin(config3), + getS3ExpiresMiddlewarePlugin(config3) + ]; + }).s("AmazonS3", "GetObject", {}).n("S3Client", "GetObjectCommand").sc(GetObject$).build() { + }; + __name(GetObjectCommand, "GetObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLegalHoldCommand.js +var GetObjectLegalHoldCommand; +var init_GetObjectLegalHoldCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLegalHoldCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectLegalHoldCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectLegalHold", {}).n("S3Client", "GetObjectLegalHoldCommand").sc(GetObjectLegalHold$).build() { + }; + __name(GetObjectLegalHoldCommand, "GetObjectLegalHoldCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLockConfigurationCommand.js +var GetObjectLockConfigurationCommand; +var init_GetObjectLockConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLockConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectLockConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectLockConfiguration", {}).n("S3Client", "GetObjectLockConfigurationCommand").sc(GetObjectLockConfiguration$).build() { + }; + __name(GetObjectLockConfigurationCommand, "GetObjectLockConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectRetentionCommand.js +var GetObjectRetentionCommand; +var init_GetObjectRetentionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectRetentionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectRetentionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectRetention", {}).n("S3Client", "GetObjectRetentionCommand").sc(GetObjectRetention$).build() { + }; + __name(GetObjectRetentionCommand, "GetObjectRetentionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTaggingCommand.js +var GetObjectTaggingCommand; +var init_GetObjectTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetObjectTagging", {}).n("S3Client", "GetObjectTaggingCommand").sc(GetObjectTagging$).build() { + }; + __name(GetObjectTaggingCommand, "GetObjectTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTorrentCommand.js +var GetObjectTorrentCommand; +var init_GetObjectTorrentCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTorrentCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetObjectTorrentCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "GetObjectTorrent", {}).n("S3Client", "GetObjectTorrentCommand").sc(GetObjectTorrent$).build() { + }; + __name(GetObjectTorrentCommand, "GetObjectTorrentCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetPublicAccessBlockCommand.js +var GetPublicAccessBlockCommand; +var init_GetPublicAccessBlockCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetPublicAccessBlockCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + GetPublicAccessBlockCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "GetPublicAccessBlock", {}).n("S3Client", "GetPublicAccessBlockCommand").sc(GetPublicAccessBlock$).build() { + }; + __name(GetPublicAccessBlockCommand, "GetPublicAccessBlockCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadBucketCommand.js +var HeadBucketCommand; +var init_HeadBucketCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadBucketCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + HeadBucketCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "HeadBucket", {}).n("S3Client", "HeadBucketCommand").sc(HeadBucket$).build() { + }; + __name(HeadBucketCommand, "HeadBucketCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadObjectCommand.js +var HeadObjectCommand; +var init_HeadObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + HeadObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3), + getS3ExpiresMiddlewarePlugin(config3) + ]; + }).s("AmazonS3", "HeadObject", {}).n("S3Client", "HeadObjectCommand").sc(HeadObject$).build() { + }; + __name(HeadObjectCommand, "HeadObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketAnalyticsConfigurationsCommand.js +var ListBucketAnalyticsConfigurationsCommand; +var init_ListBucketAnalyticsConfigurationsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketAnalyticsConfigurationsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListBucketAnalyticsConfigurationsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListBucketAnalyticsConfigurations", {}).n("S3Client", "ListBucketAnalyticsConfigurationsCommand").sc(ListBucketAnalyticsConfigurations$).build() { + }; + __name(ListBucketAnalyticsConfigurationsCommand, "ListBucketAnalyticsConfigurationsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketIntelligentTieringConfigurationsCommand.js +var ListBucketIntelligentTieringConfigurationsCommand; +var init_ListBucketIntelligentTieringConfigurationsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketIntelligentTieringConfigurationsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListBucketIntelligentTieringConfigurationsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListBucketIntelligentTieringConfigurations", {}).n("S3Client", "ListBucketIntelligentTieringConfigurationsCommand").sc(ListBucketIntelligentTieringConfigurations$).build() { + }; + __name(ListBucketIntelligentTieringConfigurationsCommand, "ListBucketIntelligentTieringConfigurationsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketInventoryConfigurationsCommand.js +var ListBucketInventoryConfigurationsCommand; +var init_ListBucketInventoryConfigurationsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketInventoryConfigurationsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListBucketInventoryConfigurationsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListBucketInventoryConfigurations", {}).n("S3Client", "ListBucketInventoryConfigurationsCommand").sc(ListBucketInventoryConfigurations$).build() { + }; + __name(ListBucketInventoryConfigurationsCommand, "ListBucketInventoryConfigurationsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketMetricsConfigurationsCommand.js +var ListBucketMetricsConfigurationsCommand; +var init_ListBucketMetricsConfigurationsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketMetricsConfigurationsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListBucketMetricsConfigurationsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListBucketMetricsConfigurations", {}).n("S3Client", "ListBucketMetricsConfigurationsCommand").sc(ListBucketMetricsConfigurations$).build() { + }; + __name(ListBucketMetricsConfigurationsCommand, "ListBucketMetricsConfigurationsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketsCommand.js +var ListBucketsCommand; +var init_ListBucketsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListBucketsCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListBuckets", {}).n("S3Client", "ListBucketsCommand").sc(ListBuckets$).build() { + }; + __name(ListBucketsCommand, "ListBucketsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListDirectoryBucketsCommand.js +var ListDirectoryBucketsCommand; +var init_ListDirectoryBucketsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListDirectoryBucketsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListDirectoryBucketsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListDirectoryBuckets", {}).n("S3Client", "ListDirectoryBucketsCommand").sc(ListDirectoryBuckets$).build() { + }; + __name(ListDirectoryBucketsCommand, "ListDirectoryBucketsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListMultipartUploadsCommand.js +var ListMultipartUploadsCommand; +var init_ListMultipartUploadsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListMultipartUploadsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListMultipartUploadsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListMultipartUploads", {}).n("S3Client", "ListMultipartUploadsCommand").sc(ListMultipartUploads$).build() { + }; + __name(ListMultipartUploadsCommand, "ListMultipartUploadsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsCommand.js +var ListObjectsCommand; +var init_ListObjectsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListObjectsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListObjects", {}).n("S3Client", "ListObjectsCommand").sc(ListObjects$).build() { + }; + __name(ListObjectsCommand, "ListObjectsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsV2Command.js +var ListObjectsV2Command; +var init_ListObjectsV2Command = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsV2Command.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListObjectsV2Command = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListObjectsV2", {}).n("S3Client", "ListObjectsV2Command").sc(ListObjectsV2$).build() { + }; + __name(ListObjectsV2Command, "ListObjectsV2Command"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectVersionsCommand.js +var ListObjectVersionsCommand; +var init_ListObjectVersionsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectVersionsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListObjectVersionsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "ListObjectVersions", {}).n("S3Client", "ListObjectVersionsCommand").sc(ListObjectVersions$).build() { + }; + __name(ListObjectVersionsCommand, "ListObjectVersionsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListPartsCommand.js +var ListPartsCommand; +var init_ListPartsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListPartsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + ListPartsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "ListParts", {}).n("S3Client", "ListPartsCommand").sc(ListParts$).build() { + }; + __name(ListPartsCommand, "ListPartsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAbacCommand.js +var PutBucketAbacCommand; +var init_PutBucketAbacCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAbacCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketAbacCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: false + }) + ]; + }).s("AmazonS3", "PutBucketAbac", {}).n("S3Client", "PutBucketAbacCommand").sc(PutBucketAbac$).build() { + }; + __name(PutBucketAbacCommand, "PutBucketAbacCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAccelerateConfigurationCommand.js +var PutBucketAccelerateConfigurationCommand; +var init_PutBucketAccelerateConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAccelerateConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketAccelerateConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: false + }) + ]; + }).s("AmazonS3", "PutBucketAccelerateConfiguration", {}).n("S3Client", "PutBucketAccelerateConfigurationCommand").sc(PutBucketAccelerateConfiguration$).build() { + }; + __name(PutBucketAccelerateConfigurationCommand, "PutBucketAccelerateConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAclCommand.js +var PutBucketAclCommand; +var init_PutBucketAclCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAclCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketAclCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketAcl", {}).n("S3Client", "PutBucketAclCommand").sc(PutBucketAcl$).build() { + }; + __name(PutBucketAclCommand, "PutBucketAclCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAnalyticsConfigurationCommand.js +var PutBucketAnalyticsConfigurationCommand; +var init_PutBucketAnalyticsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAnalyticsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketAnalyticsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "PutBucketAnalyticsConfiguration", {}).n("S3Client", "PutBucketAnalyticsConfigurationCommand").sc(PutBucketAnalyticsConfiguration$).build() { + }; + __name(PutBucketAnalyticsConfigurationCommand, "PutBucketAnalyticsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketCorsCommand.js +var PutBucketCorsCommand; +var init_PutBucketCorsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketCorsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketCorsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketCors", {}).n("S3Client", "PutBucketCorsCommand").sc(PutBucketCors$).build() { + }; + __name(PutBucketCorsCommand, "PutBucketCorsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketEncryptionCommand.js +var PutBucketEncryptionCommand; +var init_PutBucketEncryptionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketEncryptionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketEncryptionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketEncryption", {}).n("S3Client", "PutBucketEncryptionCommand").sc(PutBucketEncryption$).build() { + }; + __name(PutBucketEncryptionCommand, "PutBucketEncryptionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketIntelligentTieringConfigurationCommand.js +var PutBucketIntelligentTieringConfigurationCommand; +var init_PutBucketIntelligentTieringConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketIntelligentTieringConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketIntelligentTieringConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "PutBucketIntelligentTieringConfiguration", {}).n("S3Client", "PutBucketIntelligentTieringConfigurationCommand").sc(PutBucketIntelligentTieringConfiguration$).build() { + }; + __name(PutBucketIntelligentTieringConfigurationCommand, "PutBucketIntelligentTieringConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketInventoryConfigurationCommand.js +var PutBucketInventoryConfigurationCommand; +var init_PutBucketInventoryConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketInventoryConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketInventoryConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "PutBucketInventoryConfiguration", {}).n("S3Client", "PutBucketInventoryConfigurationCommand").sc(PutBucketInventoryConfiguration$).build() { + }; + __name(PutBucketInventoryConfigurationCommand, "PutBucketInventoryConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLifecycleConfigurationCommand.js +var PutBucketLifecycleConfigurationCommand; +var init_PutBucketLifecycleConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLifecycleConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketLifecycleConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutBucketLifecycleConfiguration", {}).n("S3Client", "PutBucketLifecycleConfigurationCommand").sc(PutBucketLifecycleConfiguration$).build() { + }; + __name(PutBucketLifecycleConfigurationCommand, "PutBucketLifecycleConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLoggingCommand.js +var PutBucketLoggingCommand; +var init_PutBucketLoggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLoggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketLoggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketLogging", {}).n("S3Client", "PutBucketLoggingCommand").sc(PutBucketLogging$).build() { + }; + __name(PutBucketLoggingCommand, "PutBucketLoggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketMetricsConfigurationCommand.js +var PutBucketMetricsConfigurationCommand; +var init_PutBucketMetricsConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketMetricsConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketMetricsConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "PutBucketMetricsConfiguration", {}).n("S3Client", "PutBucketMetricsConfigurationCommand").sc(PutBucketMetricsConfiguration$).build() { + }; + __name(PutBucketMetricsConfigurationCommand, "PutBucketMetricsConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketNotificationConfigurationCommand.js +var PutBucketNotificationConfigurationCommand; +var init_PutBucketNotificationConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketNotificationConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketNotificationConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "PutBucketNotificationConfiguration", {}).n("S3Client", "PutBucketNotificationConfigurationCommand").sc(PutBucketNotificationConfiguration$).build() { + }; + __name(PutBucketNotificationConfigurationCommand, "PutBucketNotificationConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketOwnershipControlsCommand.js +var PutBucketOwnershipControlsCommand; +var init_PutBucketOwnershipControlsCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketOwnershipControlsCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketOwnershipControlsCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketOwnershipControls", {}).n("S3Client", "PutBucketOwnershipControlsCommand").sc(PutBucketOwnershipControls$).build() { + }; + __name(PutBucketOwnershipControlsCommand, "PutBucketOwnershipControlsCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketPolicyCommand.js +var PutBucketPolicyCommand; +var init_PutBucketPolicyCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketPolicyCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketPolicyCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketPolicy", {}).n("S3Client", "PutBucketPolicyCommand").sc(PutBucketPolicy$).build() { + }; + __name(PutBucketPolicyCommand, "PutBucketPolicyCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketReplicationCommand.js +var PutBucketReplicationCommand; +var init_PutBucketReplicationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketReplicationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketReplicationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketReplication", {}).n("S3Client", "PutBucketReplicationCommand").sc(PutBucketReplication$).build() { + }; + __name(PutBucketReplicationCommand, "PutBucketReplicationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketRequestPaymentCommand.js +var PutBucketRequestPaymentCommand; +var init_PutBucketRequestPaymentCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketRequestPaymentCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketRequestPaymentCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketRequestPayment", {}).n("S3Client", "PutBucketRequestPaymentCommand").sc(PutBucketRequestPayment$).build() { + }; + __name(PutBucketRequestPaymentCommand, "PutBucketRequestPaymentCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketTaggingCommand.js +var PutBucketTaggingCommand; +var init_PutBucketTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketTagging", {}).n("S3Client", "PutBucketTaggingCommand").sc(PutBucketTagging$).build() { + }; + __name(PutBucketTaggingCommand, "PutBucketTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketVersioningCommand.js +var PutBucketVersioningCommand; +var init_PutBucketVersioningCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketVersioningCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketVersioningCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketVersioning", {}).n("S3Client", "PutBucketVersioningCommand").sc(PutBucketVersioning$).build() { + }; + __name(PutBucketVersioningCommand, "PutBucketVersioningCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketWebsiteCommand.js +var PutBucketWebsiteCommand; +var init_PutBucketWebsiteCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketWebsiteCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutBucketWebsiteCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutBucketWebsite", {}).n("S3Client", "PutBucketWebsiteCommand").sc(PutBucketWebsite$).build() { + }; + __name(PutBucketWebsiteCommand, "PutBucketWebsiteCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectAclCommand.js +var PutObjectAclCommand; +var init_PutObjectAclCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectAclCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectAclCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutObjectAcl", {}).n("S3Client", "PutObjectAclCommand").sc(PutObjectAcl$).build() { + }; + __name(PutObjectAclCommand, "PutObjectAclCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectCommand.js +var PutObjectCommand; +var init_PutObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: false + }), + getCheckContentLengthHeaderPlugin(config3), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "PutObject", {}).n("S3Client", "PutObjectCommand").sc(PutObject$).build() { + }; + __name(PutObjectCommand, "PutObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLegalHoldCommand.js +var PutObjectLegalHoldCommand; +var init_PutObjectLegalHoldCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLegalHoldCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectLegalHoldCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutObjectLegalHold", {}).n("S3Client", "PutObjectLegalHoldCommand").sc(PutObjectLegalHold$).build() { + }; + __name(PutObjectLegalHoldCommand, "PutObjectLegalHoldCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLockConfigurationCommand.js +var PutObjectLockConfigurationCommand; +var init_PutObjectLockConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLockConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectLockConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutObjectLockConfiguration", {}).n("S3Client", "PutObjectLockConfigurationCommand").sc(PutObjectLockConfiguration$).build() { + }; + __name(PutObjectLockConfigurationCommand, "PutObjectLockConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectRetentionCommand.js +var PutObjectRetentionCommand; +var init_PutObjectRetentionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectRetentionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectRetentionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutObjectRetention", {}).n("S3Client", "PutObjectRetentionCommand").sc(PutObjectRetention$).build() { + }; + __name(PutObjectRetentionCommand, "PutObjectRetentionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectTaggingCommand.js +var PutObjectTaggingCommand; +var init_PutObjectTaggingCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectTaggingCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutObjectTaggingCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "PutObjectTagging", {}).n("S3Client", "PutObjectTaggingCommand").sc(PutObjectTagging$).build() { + }; + __name(PutObjectTaggingCommand, "PutObjectTaggingCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutPublicAccessBlockCommand.js +var PutPublicAccessBlockCommand; +var init_PutPublicAccessBlockCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutPublicAccessBlockCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + PutPublicAccessBlockCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "PutPublicAccessBlock", {}).n("S3Client", "PutPublicAccessBlockCommand").sc(PutPublicAccessBlock$).build() { + }; + __name(PutPublicAccessBlockCommand, "PutPublicAccessBlockCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/RenameObjectCommand.js +var RenameObjectCommand; +var init_RenameObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/RenameObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + RenameObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "RenameObject", {}).n("S3Client", "RenameObjectCommand").sc(RenameObject$).build() { + }; + __name(RenameObjectCommand, "RenameObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/RestoreObjectCommand.js +var RestoreObjectCommand; +var init_RestoreObjectCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/RestoreObjectCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + RestoreObjectCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: false + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "RestoreObject", {}).n("S3Client", "RestoreObjectCommand").sc(RestoreObject$).build() { + }; + __name(RestoreObjectCommand, "RestoreObjectCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/SelectObjectContentCommand.js +var SelectObjectContentCommand; +var init_SelectObjectContentCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/SelectObjectContentCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + SelectObjectContentCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "SelectObjectContent", { + eventStream: { + output: true + } + }).n("S3Client", "SelectObjectContentCommand").sc(SelectObjectContent$).build() { + }; + __name(SelectObjectContentCommand, "SelectObjectContentCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataInventoryTableConfigurationCommand.js +var UpdateBucketMetadataInventoryTableConfigurationCommand; +var init_UpdateBucketMetadataInventoryTableConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataInventoryTableConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + UpdateBucketMetadataInventoryTableConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "UpdateBucketMetadataInventoryTableConfiguration", {}).n("S3Client", "UpdateBucketMetadataInventoryTableConfigurationCommand").sc(UpdateBucketMetadataInventoryTableConfiguration$).build() { + }; + __name(UpdateBucketMetadataInventoryTableConfigurationCommand, "UpdateBucketMetadataInventoryTableConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataJournalTableConfigurationCommand.js +var UpdateBucketMetadataJournalTableConfigurationCommand; +var init_UpdateBucketMetadataJournalTableConfigurationCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataJournalTableConfigurationCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + UpdateBucketMetadataJournalTableConfigurationCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }) + ]; + }).s("AmazonS3", "UpdateBucketMetadataJournalTableConfiguration", {}).n("S3Client", "UpdateBucketMetadataJournalTableConfigurationCommand").sc(UpdateBucketMetadataJournalTableConfiguration$).build() { + }; + __name(UpdateBucketMetadataJournalTableConfigurationCommand, "UpdateBucketMetadataJournalTableConfigurationCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateObjectEncryptionCommand.js +var UpdateObjectEncryptionCommand; +var init_UpdateObjectEncryptionCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateObjectEncryptionCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + UpdateObjectEncryptionCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: true + }), + getThrow200ExceptionsPlugin(config3) + ]; + }).s("AmazonS3", "UpdateObjectEncryption", {}).n("S3Client", "UpdateObjectEncryptionCommand").sc(UpdateObjectEncryption$).build() { + }; + __name(UpdateObjectEncryptionCommand, "UpdateObjectEncryptionCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCommand.js +var UploadPartCommand; +var init_UploadPartCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es26(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + UploadPartCommand = class extends Command.classBuilder().ep({ + ...commonParams, + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getFlexibleChecksumsPlugin(config3, { + requestAlgorithmMember: { "httpHeader": "x-amz-sdk-checksum-algorithm", "name": "ChecksumAlgorithm" }, + requestChecksumRequired: false + }), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "UploadPart", {}).n("S3Client", "UploadPartCommand").sc(UploadPart$).build() { + }; + __name(UploadPartCommand, "UploadPartCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCopyCommand.js +var UploadPartCopyCommand; +var init_UploadPartCopyCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCopyCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es31(); + init_dist_es56(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + UploadPartCopyCommand = class extends Command.classBuilder().ep({ + ...commonParams, + DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" } + }).m(function(Command2, cs2, config3, o2) { + return [ + getEndpointPlugin(config3, Command2.getEndpointParameterInstructions()), + getThrow200ExceptionsPlugin(config3), + getSsecPlugin(config3) + ]; + }).s("AmazonS3", "UploadPartCopy", {}).n("S3Client", "UploadPartCopyCommand").sc(UploadPartCopy$).build() { + }; + __name(UploadPartCopyCommand, "UploadPartCopyCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/WriteGetObjectResponseCommand.js +var WriteGetObjectResponseCommand; +var init_WriteGetObjectResponseCommand = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/WriteGetObjectResponseCommand.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es41(); + init_dist_es21(); + init_EndpointParameters(); + init_schemas_0(); + WriteGetObjectResponseCommand = class extends Command.classBuilder().ep({ + ...commonParams, + UseObjectLambdaEndpoint: { type: "staticContextParams", value: true } + }).m(function(Command2, cs2, config3, o2) { + return [getEndpointPlugin(config3, Command2.getEndpointParameterInstructions())]; + }).s("AmazonS3", "WriteGetObjectResponse", {}).n("S3Client", "WriteGetObjectResponseCommand").sc(WriteGetObjectResponse$).build() { + }; + __name(WriteGetObjectResponseCommand, "WriteGetObjectResponseCommand"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListBucketsPaginator.js +var paginateListBuckets; +var init_ListBucketsPaginator = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListBucketsPaginator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_ListBucketsCommand(); + init_S3Client(); + paginateListBuckets = createPaginator(S3Client, ListBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxBuckets"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListDirectoryBucketsPaginator.js +var paginateListDirectoryBuckets; +var init_ListDirectoryBucketsPaginator = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListDirectoryBucketsPaginator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_ListDirectoryBucketsCommand(); + init_S3Client(); + paginateListDirectoryBuckets = createPaginator(S3Client, ListDirectoryBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxDirectoryBuckets"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListObjectsV2Paginator.js +var paginateListObjectsV2; +var init_ListObjectsV2Paginator = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListObjectsV2Paginator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_ListObjectsV2Command(); + init_S3Client(); + paginateListObjectsV2 = createPaginator(S3Client, ListObjectsV2Command, "ContinuationToken", "NextContinuationToken", "MaxKeys"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListPartsPaginator.js +var paginateListParts; +var init_ListPartsPaginator = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListPartsPaginator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es15(); + init_ListPartsCommand(); + init_S3Client(); + paginateListParts = createPaginator(S3Client, ListPartsCommand, "PartNumberMarker", "NextPartNumberMarker", "MaxParts"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/circularReplacer.js +var getCircularReplacer; +var init_circularReplacer = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/circularReplacer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + getCircularReplacer = /* @__PURE__ */ __name(() => { + const seen = /* @__PURE__ */ new WeakSet(); + return (key, value) => { + if (typeof value === "object" && value !== null) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }; + }, "getCircularReplacer"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/utils/sleep.js +var sleep; +var init_sleep = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/utils/sleep.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + sleep = /* @__PURE__ */ __name((seconds) => { + return new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); + }, "sleep"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/waiter.js +var waiterServiceDefaults, WaiterState, checkExceptions; +var init_waiter2 = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/waiter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_circularReplacer(); + waiterServiceDefaults = { + minDelay: 2, + maxDelay: 120 + }; + (function(WaiterState2) { + WaiterState2["ABORTED"] = "ABORTED"; + WaiterState2["FAILURE"] = "FAILURE"; + WaiterState2["SUCCESS"] = "SUCCESS"; + WaiterState2["RETRY"] = "RETRY"; + WaiterState2["TIMEOUT"] = "TIMEOUT"; + })(WaiterState || (WaiterState = {})); + checkExceptions = /* @__PURE__ */ __name((result) => { + if (result.state === WaiterState.ABORTED) { + const abortError = new Error(`${JSON.stringify({ + ...result, + reason: "Request was aborted" + }, getCircularReplacer())}`); + abortError.name = "AbortError"; + throw abortError; + } else if (result.state === WaiterState.TIMEOUT) { + const timeoutError = new Error(`${JSON.stringify({ + ...result, + reason: "Waiter has timed out" + }, getCircularReplacer())}`); + timeoutError.name = "TimeoutError"; + throw timeoutError; + } else if (result.state !== WaiterState.SUCCESS) { + throw new Error(`${JSON.stringify(result, getCircularReplacer())}`); + } + return result; + }, "checkExceptions"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/poller.js +var exponentialBackoffWithJitter, randomInRange, runPolling, createMessageFromResponse; +var init_poller = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/poller.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_circularReplacer(); + init_sleep(); + init_waiter2(); + exponentialBackoffWithJitter = /* @__PURE__ */ __name((minDelay, maxDelay, attemptCeiling, attempt) => { + if (attempt > attemptCeiling) + return maxDelay; + const delay = minDelay * 2 ** (attempt - 1); + return randomInRange(minDelay, delay); + }, "exponentialBackoffWithJitter"); + randomInRange = /* @__PURE__ */ __name((min, max2) => min + Math.random() * (max2 - min), "randomInRange"); + runPolling = /* @__PURE__ */ __name(async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => { + const observedResponses = {}; + const { state, reason } = await acceptorChecks(client, input); + if (reason) { + const message2 = createMessageFromResponse(reason); + observedResponses[message2] |= 0; + observedResponses[message2] += 1; + } + if (state !== WaiterState.RETRY) { + return { state, reason, observedResponses }; + } + let currentAttempt = 1; + const waitUntil = Date.now() + maxWaitTime * 1e3; + const attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1; + while (true) { + if (abortController?.signal?.aborted || abortSignal?.aborted) { + const message2 = "AbortController signal aborted."; + observedResponses[message2] |= 0; + observedResponses[message2] += 1; + return { state: WaiterState.ABORTED, observedResponses }; + } + const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt); + if (Date.now() + delay * 1e3 > waitUntil) { + return { state: WaiterState.TIMEOUT, observedResponses }; + } + await sleep(delay); + const { state: state2, reason: reason2 } = await acceptorChecks(client, input); + if (reason2) { + const message2 = createMessageFromResponse(reason2); + observedResponses[message2] |= 0; + observedResponses[message2] += 1; + } + if (state2 !== WaiterState.RETRY) { + return { state: state2, reason: reason2, observedResponses }; + } + currentAttempt += 1; + } + }, "runPolling"); + createMessageFromResponse = /* @__PURE__ */ __name((reason) => { + if (reason?.$responseBodyText) { + return `Deserialization error for body: ${reason.$responseBodyText}`; + } + if (reason?.$metadata?.httpStatusCode) { + if (reason.$response || reason.message) { + return `${reason.$response?.statusCode ?? reason.$metadata.httpStatusCode ?? "Unknown"}: ${reason.message}`; + } + return `${reason.$metadata.httpStatusCode}: OK`; + } + return String(reason?.message ?? JSON.stringify(reason, getCircularReplacer()) ?? "Unknown"); + }, "createMessageFromResponse"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/utils/validate.js +var validateWaiterOptions; +var init_validate = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/utils/validate.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + validateWaiterOptions = /* @__PURE__ */ __name((options) => { + if (options.maxWaitTime <= 0) { + throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`); + } else if (options.minDelay <= 0) { + throw new Error(`WaiterConfiguration.minDelay must be greater than 0`); + } else if (options.maxDelay <= 0) { + throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`); + } else if (options.maxWaitTime <= options.minDelay) { + throw new Error(`WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`); + } else if (options.maxDelay < options.minDelay) { + throw new Error(`WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`); + } + }, "validateWaiterOptions"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/utils/index.js +var init_utils7 = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/utils/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_sleep(); + init_validate(); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/createWaiter.js +var abortTimeout, createWaiter; +var init_createWaiter = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/createWaiter.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_poller(); + init_utils7(); + init_waiter2(); + abortTimeout = /* @__PURE__ */ __name((abortSignal) => { + let onAbort; + const promise2 = new Promise((resolve) => { + onAbort = /* @__PURE__ */ __name(() => resolve({ state: WaiterState.ABORTED }), "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + abortSignal.addEventListener("abort", onAbort); + } else { + abortSignal.onabort = onAbort; + } + }); + return { + clearListener() { + if (typeof abortSignal.removeEventListener === "function") { + abortSignal.removeEventListener("abort", onAbort); + } + }, + aborted: promise2 + }; + }, "abortTimeout"); + createWaiter = /* @__PURE__ */ __name(async (options, input, acceptorChecks) => { + const params = { + ...waiterServiceDefaults, + ...options + }; + validateWaiterOptions(params); + const exitConditions = [runPolling(params, input, acceptorChecks)]; + const finalize2 = []; + if (options.abortSignal) { + const { aborted: aborted2, clearListener } = abortTimeout(options.abortSignal); + finalize2.push(clearListener); + exitConditions.push(aborted2); + } + if (options.abortController?.signal) { + const { aborted: aborted2, clearListener } = abortTimeout(options.abortController.signal); + finalize2.push(clearListener); + exitConditions.push(aborted2); + } + return Promise.race(exitConditions).then((result) => { + for (const fn of finalize2) { + fn(); + } + return result; + }); + }, "createWaiter"); + } +}); + +// ../../node_modules/@smithy/util-waiter/dist-es/index.js +var init_dist_es58 = __esm({ + "../../node_modules/@smithy/util-waiter/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_createWaiter(); + init_waiter2(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketExists.js +var checkState, waitUntilBucketExists; +var init_waitForBucketExists = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketExists.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es58(); + init_HeadBucketCommand(); + checkState = /* @__PURE__ */ __name(async (client, input) => { + let reason; + try { + let result = await client.send(new HeadBucketCommand(input)); + reason = result; + return { state: WaiterState.SUCCESS, reason }; + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "NotFound") { + return { state: WaiterState.RETRY, reason }; + } + } + return { state: WaiterState.RETRY, reason }; + }, "checkState"); + waitUntilBucketExists = /* @__PURE__ */ __name(async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); + }, "waitUntilBucketExists"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketNotExists.js +var checkState2, waitUntilBucketNotExists; +var init_waitForBucketNotExists = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketNotExists.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es58(); + init_HeadBucketCommand(); + checkState2 = /* @__PURE__ */ __name(async (client, input) => { + let reason; + try { + let result = await client.send(new HeadBucketCommand(input)); + reason = result; + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "NotFound") { + return { state: WaiterState.SUCCESS, reason }; + } + } + return { state: WaiterState.RETRY, reason }; + }, "checkState"); + waitUntilBucketNotExists = /* @__PURE__ */ __name(async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState2); + return checkExceptions(result); + }, "waitUntilBucketNotExists"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectExists.js +var checkState3, waitUntilObjectExists; +var init_waitForObjectExists = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectExists.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es58(); + init_HeadObjectCommand(); + checkState3 = /* @__PURE__ */ __name(async (client, input) => { + let reason; + try { + let result = await client.send(new HeadObjectCommand(input)); + reason = result; + return { state: WaiterState.SUCCESS, reason }; + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "NotFound") { + return { state: WaiterState.RETRY, reason }; + } + } + return { state: WaiterState.RETRY, reason }; + }, "checkState"); + waitUntilObjectExists = /* @__PURE__ */ __name(async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState3); + return checkExceptions(result); + }, "waitUntilObjectExists"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectNotExists.js +var checkState4, waitUntilObjectNotExists; +var init_waitForObjectNotExists = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectNotExists.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es58(); + init_HeadObjectCommand(); + checkState4 = /* @__PURE__ */ __name(async (client, input) => { + let reason; + try { + let result = await client.send(new HeadObjectCommand(input)); + reason = result; + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "NotFound") { + return { state: WaiterState.SUCCESS, reason }; + } + } + return { state: WaiterState.RETRY, reason }; + }, "checkState"); + waitUntilObjectNotExists = /* @__PURE__ */ __name(async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState4); + return checkExceptions(result); + }, "waitUntilObjectNotExists"); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/S3.js +var commands, paginators, waiters, S3; +var init_S3 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/S3.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es21(); + init_AbortMultipartUploadCommand(); + init_CompleteMultipartUploadCommand(); + init_CopyObjectCommand(); + init_CreateBucketCommand(); + init_CreateBucketMetadataConfigurationCommand(); + init_CreateBucketMetadataTableConfigurationCommand(); + init_CreateMultipartUploadCommand(); + init_CreateSessionCommand(); + init_DeleteBucketAnalyticsConfigurationCommand(); + init_DeleteBucketCommand(); + init_DeleteBucketCorsCommand(); + init_DeleteBucketEncryptionCommand(); + init_DeleteBucketIntelligentTieringConfigurationCommand(); + init_DeleteBucketInventoryConfigurationCommand(); + init_DeleteBucketLifecycleCommand(); + init_DeleteBucketMetadataConfigurationCommand(); + init_DeleteBucketMetadataTableConfigurationCommand(); + init_DeleteBucketMetricsConfigurationCommand(); + init_DeleteBucketOwnershipControlsCommand(); + init_DeleteBucketPolicyCommand(); + init_DeleteBucketReplicationCommand(); + init_DeleteBucketTaggingCommand(); + init_DeleteBucketWebsiteCommand(); + init_DeleteObjectCommand(); + init_DeleteObjectsCommand(); + init_DeleteObjectTaggingCommand(); + init_DeletePublicAccessBlockCommand(); + init_GetBucketAbacCommand(); + init_GetBucketAccelerateConfigurationCommand(); + init_GetBucketAclCommand(); + init_GetBucketAnalyticsConfigurationCommand(); + init_GetBucketCorsCommand(); + init_GetBucketEncryptionCommand(); + init_GetBucketIntelligentTieringConfigurationCommand(); + init_GetBucketInventoryConfigurationCommand(); + init_GetBucketLifecycleConfigurationCommand(); + init_GetBucketLocationCommand(); + init_GetBucketLoggingCommand(); + init_GetBucketMetadataConfigurationCommand(); + init_GetBucketMetadataTableConfigurationCommand(); + init_GetBucketMetricsConfigurationCommand(); + init_GetBucketNotificationConfigurationCommand(); + init_GetBucketOwnershipControlsCommand(); + init_GetBucketPolicyCommand(); + init_GetBucketPolicyStatusCommand(); + init_GetBucketReplicationCommand(); + init_GetBucketRequestPaymentCommand(); + init_GetBucketTaggingCommand(); + init_GetBucketVersioningCommand(); + init_GetBucketWebsiteCommand(); + init_GetObjectAclCommand(); + init_GetObjectAttributesCommand(); + init_GetObjectCommand(); + init_GetObjectLegalHoldCommand(); + init_GetObjectLockConfigurationCommand(); + init_GetObjectRetentionCommand(); + init_GetObjectTaggingCommand(); + init_GetObjectTorrentCommand(); + init_GetPublicAccessBlockCommand(); + init_HeadBucketCommand(); + init_HeadObjectCommand(); + init_ListBucketAnalyticsConfigurationsCommand(); + init_ListBucketIntelligentTieringConfigurationsCommand(); + init_ListBucketInventoryConfigurationsCommand(); + init_ListBucketMetricsConfigurationsCommand(); + init_ListBucketsCommand(); + init_ListDirectoryBucketsCommand(); + init_ListMultipartUploadsCommand(); + init_ListObjectsCommand(); + init_ListObjectsV2Command(); + init_ListObjectVersionsCommand(); + init_ListPartsCommand(); + init_PutBucketAbacCommand(); + init_PutBucketAccelerateConfigurationCommand(); + init_PutBucketAclCommand(); + init_PutBucketAnalyticsConfigurationCommand(); + init_PutBucketCorsCommand(); + init_PutBucketEncryptionCommand(); + init_PutBucketIntelligentTieringConfigurationCommand(); + init_PutBucketInventoryConfigurationCommand(); + init_PutBucketLifecycleConfigurationCommand(); + init_PutBucketLoggingCommand(); + init_PutBucketMetricsConfigurationCommand(); + init_PutBucketNotificationConfigurationCommand(); + init_PutBucketOwnershipControlsCommand(); + init_PutBucketPolicyCommand(); + init_PutBucketReplicationCommand(); + init_PutBucketRequestPaymentCommand(); + init_PutBucketTaggingCommand(); + init_PutBucketVersioningCommand(); + init_PutBucketWebsiteCommand(); + init_PutObjectAclCommand(); + init_PutObjectCommand(); + init_PutObjectLegalHoldCommand(); + init_PutObjectLockConfigurationCommand(); + init_PutObjectRetentionCommand(); + init_PutObjectTaggingCommand(); + init_PutPublicAccessBlockCommand(); + init_RenameObjectCommand(); + init_RestoreObjectCommand(); + init_SelectObjectContentCommand(); + init_UpdateBucketMetadataInventoryTableConfigurationCommand(); + init_UpdateBucketMetadataJournalTableConfigurationCommand(); + init_UpdateObjectEncryptionCommand(); + init_UploadPartCommand(); + init_UploadPartCopyCommand(); + init_WriteGetObjectResponseCommand(); + init_ListBucketsPaginator(); + init_ListDirectoryBucketsPaginator(); + init_ListObjectsV2Paginator(); + init_ListPartsPaginator(); + init_S3Client(); + init_waitForBucketExists(); + init_waitForBucketNotExists(); + init_waitForObjectExists(); + init_waitForObjectNotExists(); + commands = { + AbortMultipartUploadCommand, + CompleteMultipartUploadCommand, + CopyObjectCommand, + CreateBucketCommand, + CreateBucketMetadataConfigurationCommand, + CreateBucketMetadataTableConfigurationCommand, + CreateMultipartUploadCommand, + CreateSessionCommand, + DeleteBucketCommand, + DeleteBucketAnalyticsConfigurationCommand, + DeleteBucketCorsCommand, + DeleteBucketEncryptionCommand, + DeleteBucketIntelligentTieringConfigurationCommand, + DeleteBucketInventoryConfigurationCommand, + DeleteBucketLifecycleCommand, + DeleteBucketMetadataConfigurationCommand, + DeleteBucketMetadataTableConfigurationCommand, + DeleteBucketMetricsConfigurationCommand, + DeleteBucketOwnershipControlsCommand, + DeleteBucketPolicyCommand, + DeleteBucketReplicationCommand, + DeleteBucketTaggingCommand, + DeleteBucketWebsiteCommand, + DeleteObjectCommand, + DeleteObjectsCommand, + DeleteObjectTaggingCommand, + DeletePublicAccessBlockCommand, + GetBucketAbacCommand, + GetBucketAccelerateConfigurationCommand, + GetBucketAclCommand, + GetBucketAnalyticsConfigurationCommand, + GetBucketCorsCommand, + GetBucketEncryptionCommand, + GetBucketIntelligentTieringConfigurationCommand, + GetBucketInventoryConfigurationCommand, + GetBucketLifecycleConfigurationCommand, + GetBucketLocationCommand, + GetBucketLoggingCommand, + GetBucketMetadataConfigurationCommand, + GetBucketMetadataTableConfigurationCommand, + GetBucketMetricsConfigurationCommand, + GetBucketNotificationConfigurationCommand, + GetBucketOwnershipControlsCommand, + GetBucketPolicyCommand, + GetBucketPolicyStatusCommand, + GetBucketReplicationCommand, + GetBucketRequestPaymentCommand, + GetBucketTaggingCommand, + GetBucketVersioningCommand, + GetBucketWebsiteCommand, + GetObjectCommand, + GetObjectAclCommand, + GetObjectAttributesCommand, + GetObjectLegalHoldCommand, + GetObjectLockConfigurationCommand, + GetObjectRetentionCommand, + GetObjectTaggingCommand, + GetObjectTorrentCommand, + GetPublicAccessBlockCommand, + HeadBucketCommand, + HeadObjectCommand, + ListBucketAnalyticsConfigurationsCommand, + ListBucketIntelligentTieringConfigurationsCommand, + ListBucketInventoryConfigurationsCommand, + ListBucketMetricsConfigurationsCommand, + ListBucketsCommand, + ListDirectoryBucketsCommand, + ListMultipartUploadsCommand, + ListObjectsCommand, + ListObjectsV2Command, + ListObjectVersionsCommand, + ListPartsCommand, + PutBucketAbacCommand, + PutBucketAccelerateConfigurationCommand, + PutBucketAclCommand, + PutBucketAnalyticsConfigurationCommand, + PutBucketCorsCommand, + PutBucketEncryptionCommand, + PutBucketIntelligentTieringConfigurationCommand, + PutBucketInventoryConfigurationCommand, + PutBucketLifecycleConfigurationCommand, + PutBucketLoggingCommand, + PutBucketMetricsConfigurationCommand, + PutBucketNotificationConfigurationCommand, + PutBucketOwnershipControlsCommand, + PutBucketPolicyCommand, + PutBucketReplicationCommand, + PutBucketRequestPaymentCommand, + PutBucketTaggingCommand, + PutBucketVersioningCommand, + PutBucketWebsiteCommand, + PutObjectCommand, + PutObjectAclCommand, + PutObjectLegalHoldCommand, + PutObjectLockConfigurationCommand, + PutObjectRetentionCommand, + PutObjectTaggingCommand, + PutPublicAccessBlockCommand, + RenameObjectCommand, + RestoreObjectCommand, + SelectObjectContentCommand, + UpdateBucketMetadataInventoryTableConfigurationCommand, + UpdateBucketMetadataJournalTableConfigurationCommand, + UpdateObjectEncryptionCommand, + UploadPartCommand, + UploadPartCopyCommand, + WriteGetObjectResponseCommand + }; + paginators = { + paginateListBuckets, + paginateListDirectoryBuckets, + paginateListObjectsV2, + paginateListParts + }; + waiters = { + waitUntilBucketExists, + waitUntilBucketNotExists, + waitUntilObjectExists, + waitUntilObjectNotExists + }; + S3 = class extends S3Client { + }; + __name(S3, "S3"); + createAggregatedClient(commands, S3, { paginators, waiters }); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/commands/index.js +var init_commands = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/commands/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AbortMultipartUploadCommand(); + init_CompleteMultipartUploadCommand(); + init_CopyObjectCommand(); + init_CreateBucketCommand(); + init_CreateBucketMetadataConfigurationCommand(); + init_CreateBucketMetadataTableConfigurationCommand(); + init_CreateMultipartUploadCommand(); + init_CreateSessionCommand(); + init_DeleteBucketAnalyticsConfigurationCommand(); + init_DeleteBucketCommand(); + init_DeleteBucketCorsCommand(); + init_DeleteBucketEncryptionCommand(); + init_DeleteBucketIntelligentTieringConfigurationCommand(); + init_DeleteBucketInventoryConfigurationCommand(); + init_DeleteBucketLifecycleCommand(); + init_DeleteBucketMetadataConfigurationCommand(); + init_DeleteBucketMetadataTableConfigurationCommand(); + init_DeleteBucketMetricsConfigurationCommand(); + init_DeleteBucketOwnershipControlsCommand(); + init_DeleteBucketPolicyCommand(); + init_DeleteBucketReplicationCommand(); + init_DeleteBucketTaggingCommand(); + init_DeleteBucketWebsiteCommand(); + init_DeleteObjectCommand(); + init_DeleteObjectTaggingCommand(); + init_DeleteObjectsCommand(); + init_DeletePublicAccessBlockCommand(); + init_GetBucketAbacCommand(); + init_GetBucketAccelerateConfigurationCommand(); + init_GetBucketAclCommand(); + init_GetBucketAnalyticsConfigurationCommand(); + init_GetBucketCorsCommand(); + init_GetBucketEncryptionCommand(); + init_GetBucketIntelligentTieringConfigurationCommand(); + init_GetBucketInventoryConfigurationCommand(); + init_GetBucketLifecycleConfigurationCommand(); + init_GetBucketLocationCommand(); + init_GetBucketLoggingCommand(); + init_GetBucketMetadataConfigurationCommand(); + init_GetBucketMetadataTableConfigurationCommand(); + init_GetBucketMetricsConfigurationCommand(); + init_GetBucketNotificationConfigurationCommand(); + init_GetBucketOwnershipControlsCommand(); + init_GetBucketPolicyCommand(); + init_GetBucketPolicyStatusCommand(); + init_GetBucketReplicationCommand(); + init_GetBucketRequestPaymentCommand(); + init_GetBucketTaggingCommand(); + init_GetBucketVersioningCommand(); + init_GetBucketWebsiteCommand(); + init_GetObjectAclCommand(); + init_GetObjectAttributesCommand(); + init_GetObjectCommand(); + init_GetObjectLegalHoldCommand(); + init_GetObjectLockConfigurationCommand(); + init_GetObjectRetentionCommand(); + init_GetObjectTaggingCommand(); + init_GetObjectTorrentCommand(); + init_GetPublicAccessBlockCommand(); + init_HeadBucketCommand(); + init_HeadObjectCommand(); + init_ListBucketAnalyticsConfigurationsCommand(); + init_ListBucketIntelligentTieringConfigurationsCommand(); + init_ListBucketInventoryConfigurationsCommand(); + init_ListBucketMetricsConfigurationsCommand(); + init_ListBucketsCommand(); + init_ListDirectoryBucketsCommand(); + init_ListMultipartUploadsCommand(); + init_ListObjectVersionsCommand(); + init_ListObjectsCommand(); + init_ListObjectsV2Command(); + init_ListPartsCommand(); + init_PutBucketAbacCommand(); + init_PutBucketAccelerateConfigurationCommand(); + init_PutBucketAclCommand(); + init_PutBucketAnalyticsConfigurationCommand(); + init_PutBucketCorsCommand(); + init_PutBucketEncryptionCommand(); + init_PutBucketIntelligentTieringConfigurationCommand(); + init_PutBucketInventoryConfigurationCommand(); + init_PutBucketLifecycleConfigurationCommand(); + init_PutBucketLoggingCommand(); + init_PutBucketMetricsConfigurationCommand(); + init_PutBucketNotificationConfigurationCommand(); + init_PutBucketOwnershipControlsCommand(); + init_PutBucketPolicyCommand(); + init_PutBucketReplicationCommand(); + init_PutBucketRequestPaymentCommand(); + init_PutBucketTaggingCommand(); + init_PutBucketVersioningCommand(); + init_PutBucketWebsiteCommand(); + init_PutObjectAclCommand(); + init_PutObjectCommand(); + init_PutObjectLegalHoldCommand(); + init_PutObjectLockConfigurationCommand(); + init_PutObjectRetentionCommand(); + init_PutObjectTaggingCommand(); + init_PutPublicAccessBlockCommand(); + init_RenameObjectCommand(); + init_RestoreObjectCommand(); + init_SelectObjectContentCommand(); + init_UpdateBucketMetadataInventoryTableConfigurationCommand(); + init_UpdateBucketMetadataJournalTableConfigurationCommand(); + init_UpdateObjectEncryptionCommand(); + init_UploadPartCommand(); + init_UploadPartCopyCommand(); + init_WriteGetObjectResponseCommand(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/Interfaces.js +var init_Interfaces = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/Interfaces.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/pagination/index.js +var init_pagination2 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/pagination/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_Interfaces(); + init_ListBucketsPaginator(); + init_ListDirectoryBucketsPaginator(); + init_ListObjectsV2Paginator(); + init_ListPartsPaginator(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/waiters/index.js +var init_waiters = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/waiters/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_waitForBucketExists(); + init_waitForBucketNotExists(); + init_waitForObjectExists(); + init_waitForObjectNotExists(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/enums.js +var init_enums = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/models/enums.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/models_0.js +var init_models_0 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/models/models_0.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/models/models_1.js +var init_models_1 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/models/models_1.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@aws-sdk/client-s3/dist-es/index.js +var init_dist_es59 = __esm({ + "../../node_modules/@aws-sdk/client-s3/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_S3Client(); + init_S3(); + init_commands(); + init_schemas_0(); + init_pagination2(); + init_waiters(); + init_enums(); + init_errors3(); + init_models_0(); + init_models_1(); + } +}); + +// ../../node_modules/@aws-sdk/util-format-url/dist-es/index.js +function formatUrl(request) { + const { port, query } = request; + let { protocol, path, hostname: hostname3 } = request; + if (protocol && protocol.slice(-1) !== ":") { + protocol += ":"; + } + if (port) { + hostname3 += `:${port}`; + } + if (path && path.charAt(0) !== "/") { + path = `/${path}`; + } + let queryString = query ? buildQueryString(query) : ""; + if (queryString && queryString[0] !== "?") { + queryString = `?${queryString}`; + } + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + let fragment = ""; + if (request.fragment) { + fragment = `#${request.fragment}`; + } + return `${protocol}//${auth}${hostname3}${path}${queryString}${fragment}`; +} +var init_dist_es60 = __esm({ + "../../node_modules/@aws-sdk/util-format-url/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es8(); + __name(formatUrl, "formatUrl"); + } +}); + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/constants.js +var UNSIGNED_PAYLOAD2, SHA256_HEADER2; +var init_constants15 = __esm({ + "../../node_modules/@aws-sdk/s3-request-presigner/dist-es/constants.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + UNSIGNED_PAYLOAD2 = "UNSIGNED-PAYLOAD"; + SHA256_HEADER2 = "X-Amz-Content-Sha256"; + } +}); + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/presigner.js +var S3RequestPresigner; +var init_presigner = __esm({ + "../../node_modules/@aws-sdk/s3-request-presigner/dist-es/presigner.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es43(); + init_constants15(); + S3RequestPresigner = class { + signer; + constructor(options) { + const resolvedOptions = { + service: options.signingName || options.service || "s3", + uriEscapePath: options.uriEscapePath || false, + applyChecksum: options.applyChecksum || false, + ...options + }; + this.signer = new SignatureV4MultiRegion(resolvedOptions); + } + presign(requestToSign, { unsignableHeaders = /* @__PURE__ */ new Set(), hoistableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), ...options } = {}) { + this.prepareRequest(requestToSign, { + unsignableHeaders, + unhoistableHeaders, + hoistableHeaders + }); + return this.signer.presign(requestToSign, { + expiresIn: 900, + unsignableHeaders, + unhoistableHeaders, + ...options + }); + } + presignWithCredentials(requestToSign, credentials, { unsignableHeaders = /* @__PURE__ */ new Set(), hoistableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), ...options } = {}) { + this.prepareRequest(requestToSign, { + unsignableHeaders, + unhoistableHeaders, + hoistableHeaders + }); + return this.signer.presignWithCredentials(requestToSign, credentials, { + expiresIn: 900, + unsignableHeaders, + unhoistableHeaders, + ...options + }); + } + prepareRequest(requestToSign, { unsignableHeaders = /* @__PURE__ */ new Set(), unhoistableHeaders = /* @__PURE__ */ new Set(), hoistableHeaders = /* @__PURE__ */ new Set() } = {}) { + unsignableHeaders.add("content-type"); + Object.keys(requestToSign.headers).map((header) => header.toLowerCase()).filter((header) => header.startsWith("x-amz-server-side-encryption")).forEach((header) => { + if (!hoistableHeaders.has(header)) { + unhoistableHeaders.add(header); + } + }); + requestToSign.headers[SHA256_HEADER2] = UNSIGNED_PAYLOAD2; + const currentHostHeader = requestToSign.headers.host; + const port = requestToSign.port; + const expectedHostHeader = `${requestToSign.hostname}${requestToSign.port != null ? ":" + port : ""}`; + if (!currentHostHeader || currentHostHeader === requestToSign.hostname && requestToSign.port != null) { + requestToSign.headers.host = expectedHostHeader; + } + } + }; + __name(S3RequestPresigner, "S3RequestPresigner"); + } +}); + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/getSignedUrl.js +var getSignedUrl; +var init_getSignedUrl = __esm({ + "../../node_modules/@aws-sdk/s3-request-presigner/dist-es/getSignedUrl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es60(); + init_dist_es41(); + init_dist_es2(); + init_presigner(); + getSignedUrl = /* @__PURE__ */ __name(async (client, command, options = {}) => { + let s3Presigner; + let region; + if (typeof client.config.endpointProvider === "function") { + const endpointV2 = await getEndpointFromInstructions(command.input, command.constructor, client.config); + const authScheme = endpointV2.properties?.authSchemes?.[0]; + if (authScheme?.name === "sigv4a") { + region = authScheme?.signingRegionSet?.join(","); + } else { + region = authScheme?.signingRegion; + } + s3Presigner = new S3RequestPresigner({ + ...client.config, + signingName: authScheme?.signingName, + region: async () => region + }); + } else { + s3Presigner = new S3RequestPresigner(client.config); + } + const presignInterceptMiddleware = /* @__PURE__ */ __name((next, context2) => async (args) => { + const { request } = args; + if (!HttpRequest.isInstance(request)) { + throw new Error("Request to be presigned is not an valid HTTP request."); + } + delete request.headers["amz-sdk-invocation-id"]; + delete request.headers["amz-sdk-request"]; + delete request.headers["x-amz-user-agent"]; + let presigned2; + const presignerOptions = { + ...options, + signingRegion: options.signingRegion ?? context2["signing_region"] ?? region, + signingService: options.signingService ?? context2["signing_service"] + }; + if (context2.s3ExpressIdentity) { + presigned2 = await s3Presigner.presignWithCredentials(request, context2.s3ExpressIdentity, presignerOptions); + } else { + presigned2 = await s3Presigner.presign(request, presignerOptions); + } + return { + response: {}, + output: { + $metadata: { httpStatusCode: 200 }, + presigned: presigned2 + } + }; + }, "presignInterceptMiddleware"); + const middlewareName = "presignInterceptMiddleware"; + const clientStack = client.middlewareStack.clone(); + clientStack.addRelativeTo(presignInterceptMiddleware, { + name: middlewareName, + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true + }); + const handler = command.resolveMiddleware(clientStack, client.config, {}); + const { output } = await handler({ input: command.input }); + const { presigned } = output; + return formatUrl(presigned); + }, "getSignedUrl"); + } +}); + +// ../../node_modules/@aws-sdk/s3-request-presigner/dist-es/index.js +var init_dist_es61 = __esm({ + "../../node_modules/@aws-sdk/s3-request-presigner/dist-es/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getSignedUrl(); + init_presigner(); + } +}); + +// src/lib/s3-client.ts +async function deleteImageUtil({ bucket = s3BucketName, keys }) { + if (keys.length === 0) { + return true; + } + try { + const deleteParams = { + Bucket: bucket, + Delete: { + Objects: keys.map((key) => ({ Key: key })), + Quiet: false + } + }; + const deleteCommand = new DeleteObjectsCommand(deleteParams); + await s3Client.send(deleteCommand); + return true; + } catch (error50) { + console.error("Error deleting image:", error50); + throw new Error("Failed to delete image"); + return false; + } +} +function scaffoldAssetUrl(input) { + if (Array.isArray(input)) { + return input.map((key) => scaffoldAssetUrl(key)); + } + if (!input) { + return ""; + } + const normalizedKey = input.replace(/^\/+/, ""); + const domain3 = assetsDomain.endsWith("/") ? assetsDomain.slice(0, -1) : assetsDomain; + return `${domain3}/${normalizedKey}`; +} +async function generateSignedUrlFromS3Url(s3UrlRaw, expiresIn = 259200) { + if (!s3UrlRaw) { + return ""; + } + const s3Url2 = s3UrlRaw; + try { + const command = new GetObjectCommand({ + Bucket: s3BucketName, + Key: s3Url2 + }); + const signedUrl = await getSignedUrl(s3Client, command, { expiresIn }); + return signedUrl; + } catch (error50) { + console.error("Error generating signed URL:", error50); + throw new Error("Failed to generate signed URL"); + } +} +async function generateSignedUrlsFromS3Urls(s3Urls, expiresIn = 259200) { + if (!s3Urls || !s3Urls.length) { + return []; + } + try { + const signedUrls = await Promise.all( + s3Urls.map((url2) => generateSignedUrlFromS3Url(url2, expiresIn).catch(() => "")) + ); + return signedUrls; + } catch (error50) { + console.error("Error generating multiple signed URLs:", error50); + return s3Urls.map(() => ""); + } +} +async function generateUploadUrl(key, mimeType, expiresIn = 180) { + try { + await createUploadUrlStatus(key); + const command = new PutObjectCommand({ + Bucket: s3BucketName, + Key: key, + ContentType: mimeType + }); + const signedUrl = await getSignedUrl(s3Client, command, { expiresIn }); + return signedUrl; + } catch (error50) { + console.error("Error generating upload URL:", error50); + throw new Error("Failed to generate upload URL"); + } +} +function extractKeyFromPresignedUrl(url2) { + const u5 = new URL(url2); + const rawKey = u5.pathname.replace(/^\/+/, ""); + const decodedKey = decodeURIComponent(rawKey); + const parts = decodedKey.split("/"); + parts.shift(); + return parts.join("/"); +} +async function claimUploadUrl(url2) { + try { + const semiKey = extractKeyFromPresignedUrl(url2); + const updated = await claimUploadUrlStatus(semiKey); + if (!updated) { + throw new Error("Upload URL not found or already claimed"); + } + } catch (error50) { + console.error("Error claiming upload URL:", error50); + throw new Error("Failed to claim upload URL"); + } +} +var s3Client, imageUploadS3; +var init_s3_client = __esm({ + "src/lib/s3-client.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist_es59(); + init_dist_es61(); + init_dbService(); + init_env_exporter(); + s3Client = new S3Client({ + region: s3Region, + endpoint: s3Url, + forcePathStyle: true, + credentials: { + accessKeyId: s3AccessKeyId, + secretAccessKey: s3SecretAccessKey + } + }); + imageUploadS3 = /* @__PURE__ */ __name(async (body, type, key) => { + const command = new PutObjectCommand({ + Bucket: s3BucketName, + Key: key, + Body: body, + ContentType: type + }); + const resp = await s3Client.send(command); + const imageUrl = `${key}`; + return imageUrl; + }, "imageUploadS3"); + __name(deleteImageUtil, "deleteImageUtil"); + __name(scaffoldAssetUrl, "scaffoldAssetUrl"); + __name(generateSignedUrlFromS3Url, "generateSignedUrlFromS3Url"); + __name(generateSignedUrlsFromS3Urls, "generateSignedUrlsFromS3Urls"); + __name(generateUploadUrl, "generateUploadUrl"); + __name(extractKeyFromPresignedUrl, "extractKeyFromPresignedUrl"); + __name(claimUploadUrl, "claimUploadUrl"); + } +}); + +// ../../node_modules/@trpc/server/dist/initTRPC-RoZMIBeA.mjs +function createMiddlewareFactory() { + function createMiddlewareInner(middlewares) { + return { + _middlewares: middlewares, + unstable_pipe(middlewareBuilderOrFn) { + const pipedMiddleware = "_middlewares" in middlewareBuilderOrFn ? middlewareBuilderOrFn._middlewares : [middlewareBuilderOrFn]; + return createMiddlewareInner([...middlewares, ...pipedMiddleware]); + } + }; + } + __name(createMiddlewareInner, "createMiddlewareInner"); + function createMiddleware(fn) { + return createMiddlewareInner([fn]); + } + __name(createMiddleware, "createMiddleware"); + return createMiddleware; +} +function createInputMiddleware(parse3) { + const inputMiddleware = /* @__PURE__ */ __name(async function inputValidatorMiddleware(opts) { + let parsedInput; + const rawInput = await opts.getRawInput(); + try { + parsedInput = await parse3(rawInput); + } catch (cause) { + throw new TRPCError({ + code: "BAD_REQUEST", + cause + }); + } + const combinedInput = isObject(opts.input) && isObject(parsedInput) ? (0, import_objectSpread2$2.default)((0, import_objectSpread2$2.default)({}, opts.input), parsedInput) : parsedInput; + return opts.next({ input: combinedInput }); + }, "inputValidatorMiddleware"); + inputMiddleware._type = "input"; + return inputMiddleware; +} +function createOutputMiddleware(parse3) { + const outputMiddleware = /* @__PURE__ */ __name(async function outputValidatorMiddleware({ next }) { + const result = await next(); + if (!result.ok) + return result; + try { + const data = await parse3(result.data); + return (0, import_objectSpread2$2.default)((0, import_objectSpread2$2.default)({}, result), {}, { data }); + } catch (cause) { + throw new TRPCError({ + message: "Output validation failed", + code: "INTERNAL_SERVER_ERROR", + cause + }); + } + }, "outputValidatorMiddleware"); + outputMiddleware._type = "output"; + return outputMiddleware; +} +function getParseFn(procedureParser) { + const parser2 = procedureParser; + const isStandardSchema = "~standard" in parser2; + if (typeof parser2 === "function" && typeof parser2.assert === "function") + return parser2.assert.bind(parser2); + if (typeof parser2 === "function" && !isStandardSchema) + return parser2; + if (typeof parser2.parseAsync === "function") + return parser2.parseAsync.bind(parser2); + if (typeof parser2.parse === "function") + return parser2.parse.bind(parser2); + if (typeof parser2.validateSync === "function") + return parser2.validateSync.bind(parser2); + if (typeof parser2.create === "function") + return parser2.create.bind(parser2); + if (typeof parser2.assert === "function") + return (value) => { + parser2.assert(value); + return value; + }; + if (isStandardSchema) + return async (value) => { + const result = await parser2["~standard"].validate(value); + if (result.issues) + throw new StandardSchemaV1Error(result.issues); + return result.value; + }; + throw new Error("Could not find a validator fn"); +} +function createNewBuilder(def1, def2) { + const { middlewares = [], inputs, meta: meta3 } = def2, rest = (0, import_objectWithoutProperties.default)(def2, _excluded); + return createBuilder((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, mergeWithoutOverrides(def1, rest)), {}, { + inputs: [...def1.inputs, ...inputs !== null && inputs !== void 0 ? inputs : []], + middlewares: [...def1.middlewares, ...middlewares], + meta: def1.meta && meta3 ? (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, def1.meta), meta3) : meta3 !== null && meta3 !== void 0 ? meta3 : def1.meta + })); +} +function createBuilder(initDef = {}) { + const _def = (0, import_objectSpread2$13.default)({ + procedure: true, + inputs: [], + middlewares: [] + }, initDef); + const builder = { + _def, + input(input) { + const parser2 = getParseFn(input); + return createNewBuilder(_def, { + inputs: [input], + middlewares: [createInputMiddleware(parser2)] + }); + }, + output(output) { + const parser2 = getParseFn(output); + return createNewBuilder(_def, { + output, + middlewares: [createOutputMiddleware(parser2)] + }); + }, + meta(meta3) { + return createNewBuilder(_def, { meta: meta3 }); + }, + use(middlewareBuilderOrFn) { + const middlewares = "_middlewares" in middlewareBuilderOrFn ? middlewareBuilderOrFn._middlewares : [middlewareBuilderOrFn]; + return createNewBuilder(_def, { middlewares }); + }, + unstable_concat(builder$1) { + return createNewBuilder(_def, builder$1._def); + }, + concat(builder$1) { + return createNewBuilder(_def, builder$1._def); + }, + query(resolver) { + return createResolver((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, _def), {}, { type: "query" }), resolver); + }, + mutation(resolver) { + return createResolver((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, _def), {}, { type: "mutation" }), resolver); + }, + subscription(resolver) { + return createResolver((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, _def), {}, { type: "subscription" }), resolver); + }, + experimental_caller(caller) { + return createNewBuilder(_def, { caller }); + } + }; + return builder; +} +function createResolver(_defIn, resolver) { + const finalBuilder = createNewBuilder(_defIn, { + resolver, + middlewares: [/* @__PURE__ */ __name(async function resolveMiddleware(opts) { + const data = await resolver(opts); + return { + marker: middlewareMarker, + ok: true, + data, + ctx: opts.ctx + }; + }, "resolveMiddleware")] + }); + const _def = (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, finalBuilder._def), {}, { + type: _defIn.type, + experimental_caller: Boolean(finalBuilder._def.caller), + meta: finalBuilder._def.meta, + $types: null + }); + const invoke = createProcedureCaller(finalBuilder._def); + const callerOverride = finalBuilder._def.caller; + if (!callerOverride) + return invoke; + const callerWrapper = /* @__PURE__ */ __name(async (...args) => { + return await callerOverride({ + args, + invoke, + _def + }); + }, "callerWrapper"); + callerWrapper._def = _def; + return callerWrapper; +} +async function callRecursive(index, _def, opts) { + try { + const middleware2 = _def.middlewares[index]; + const result = await middleware2((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, opts), {}, { + meta: _def.meta, + input: opts.input, + next(_nextOpts) { + var _nextOpts$getRawInput; + const nextOpts = _nextOpts; + return callRecursive(index + 1, _def, (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, opts), {}, { + ctx: (nextOpts === null || nextOpts === void 0 ? void 0 : nextOpts.ctx) ? (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, opts.ctx), nextOpts.ctx) : opts.ctx, + input: nextOpts && "input" in nextOpts ? nextOpts.input : opts.input, + getRawInput: (_nextOpts$getRawInput = nextOpts === null || nextOpts === void 0 ? void 0 : nextOpts.getRawInput) !== null && _nextOpts$getRawInput !== void 0 ? _nextOpts$getRawInput : opts.getRawInput + })); + } + })); + return result; + } catch (cause) { + return { + ok: false, + error: getTRPCErrorFromUnknown(cause), + marker: middlewareMarker + }; + } +} +function createProcedureCaller(_def) { + async function procedure(opts) { + if (!opts || !("getRawInput" in opts)) + throw new Error(codeblock); + const result = await callRecursive(0, _def, opts); + if (!result) + throw new TRPCError({ + code: "INTERNAL_SERVER_ERROR", + message: "No result from middlewares - did you forget to `return next()`?" + }); + if (!result.ok) + throw result.error; + return result.data; + } + __name(procedure, "procedure"); + procedure._def = _def; + procedure.procedure = true; + procedure.meta = _def.meta; + return procedure; +} +var import_objectSpread2$2, middlewareMarker, import_defineProperty3, StandardSchemaV1Error, require_objectWithoutPropertiesLoose, require_objectWithoutProperties, import_objectWithoutProperties, import_objectSpread2$13, _excluded, codeblock, _globalThis$process, _globalThis$process2, _globalThis$process3, isServerDefault, import_objectSpread25, TRPCBuilder, initTRPC; +var init_initTRPC_RoZMIBeA = __esm({ + "../../node_modules/@trpc/server/dist/initTRPC-RoZMIBeA.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_getErrorShape_vC8mUXJD(); + init_codes_DagpWZLc(); + init_tracked_Bjtgv3wJ(); + import_objectSpread2$2 = __toESM2(require_objectSpread2(), 1); + middlewareMarker = "middlewareMarker"; + __name(createMiddlewareFactory, "createMiddlewareFactory"); + __name(createInputMiddleware, "createInputMiddleware"); + __name(createOutputMiddleware, "createOutputMiddleware"); + import_defineProperty3 = __toESM2(require_defineProperty(), 1); + StandardSchemaV1Error = /* @__PURE__ */ __name(class extends Error { + /** + * Creates a schema error with useful information. + * + * @param issues The schema issues. + */ + constructor(issues) { + var _issues$; + super((_issues$ = issues[0]) === null || _issues$ === void 0 ? void 0 : _issues$.message); + (0, import_defineProperty3.default)(this, "issues", void 0); + this.name = "SchemaError"; + this.issues = issues; + } + }, "StandardSchemaV1Error"); + __name(getParseFn, "getParseFn"); + require_objectWithoutPropertiesLoose = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(exports, module) { + function _objectWithoutPropertiesLoose(r2, e2) { + if (null == r2) + return {}; + var t9 = {}; + for (var n2 in r2) + if ({}.hasOwnProperty.call(r2, n2)) { + if (e2.includes(n2)) + continue; + t9[n2] = r2[n2]; + } + return t9; + } + __name(_objectWithoutPropertiesLoose, "_objectWithoutPropertiesLoose"); + module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + require_objectWithoutProperties = __commonJS2({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(exports, module) { + var objectWithoutPropertiesLoose = require_objectWithoutPropertiesLoose(); + function _objectWithoutProperties$1(e2, t9) { + if (null == e2) + return {}; + var o2, r2, i2 = objectWithoutPropertiesLoose(e2, t9); + if (Object.getOwnPropertySymbols) { + var s2 = Object.getOwnPropertySymbols(e2); + for (r2 = 0; r2 < s2.length; r2++) + o2 = s2[r2], t9.includes(o2) || {}.propertyIsEnumerable.call(e2, o2) && (i2[o2] = e2[o2]); + } + return i2; + } + __name(_objectWithoutProperties$1, "_objectWithoutProperties$1"); + module.exports = _objectWithoutProperties$1, module.exports.__esModule = true, module.exports["default"] = module.exports; + } }); + import_objectWithoutProperties = __toESM2(require_objectWithoutProperties(), 1); + import_objectSpread2$13 = __toESM2(require_objectSpread2(), 1); + _excluded = [ + "middlewares", + "inputs", + "meta" + ]; + __name(createNewBuilder, "createNewBuilder"); + __name(createBuilder, "createBuilder"); + __name(createResolver, "createResolver"); + codeblock = ` +This is a client-only function. +If you want to call this function on the server, see https://trpc.io/docs/v11/server/server-side-calls +`.trim(); + __name(callRecursive, "callRecursive"); + __name(createProcedureCaller, "createProcedureCaller"); + isServerDefault = typeof window === "undefined" || "Deno" in window || ((_globalThis$process = globalThis.process) === null || _globalThis$process === void 0 || (_globalThis$process = _globalThis$process.env) === null || _globalThis$process === void 0 ? void 0 : _globalThis$process["NODE_ENV"]) === "test" || !!((_globalThis$process2 = globalThis.process) === null || _globalThis$process2 === void 0 || (_globalThis$process2 = _globalThis$process2.env) === null || _globalThis$process2 === void 0 ? void 0 : _globalThis$process2["JEST_WORKER_ID"]) || !!((_globalThis$process3 = globalThis.process) === null || _globalThis$process3 === void 0 || (_globalThis$process3 = _globalThis$process3.env) === null || _globalThis$process3 === void 0 ? void 0 : _globalThis$process3["VITEST_WORKER_ID"]); + import_objectSpread25 = __toESM2(require_objectSpread2(), 1); + TRPCBuilder = /* @__PURE__ */ __name(class TRPCBuilder2 { + /** + * Add a context shape as a generic to the root object + * @see https://trpc.io/docs/v11/server/context + */ + context() { + return new TRPCBuilder2(); + } + /** + * Add a meta shape as a generic to the root object + * @see https://trpc.io/docs/v11/quickstart + */ + meta() { + return new TRPCBuilder2(); + } + /** + * Create the root object + * @see https://trpc.io/docs/v11/server/routers#initialize-trpc + */ + create(opts) { + var _opts$transformer, _opts$isDev, _globalThis$process$1, _opts$allowOutsideOfS, _opts$errorFormatter, _opts$isServer; + const config3 = (0, import_objectSpread25.default)((0, import_objectSpread25.default)({}, opts), {}, { + transformer: getDataTransformer((_opts$transformer = opts === null || opts === void 0 ? void 0 : opts.transformer) !== null && _opts$transformer !== void 0 ? _opts$transformer : defaultTransformer), + isDev: (_opts$isDev = opts === null || opts === void 0 ? void 0 : opts.isDev) !== null && _opts$isDev !== void 0 ? _opts$isDev : ((_globalThis$process$1 = globalThis.process) === null || _globalThis$process$1 === void 0 ? void 0 : _globalThis$process$1.env["NODE_ENV"]) !== "production", + allowOutsideOfServer: (_opts$allowOutsideOfS = opts === null || opts === void 0 ? void 0 : opts.allowOutsideOfServer) !== null && _opts$allowOutsideOfS !== void 0 ? _opts$allowOutsideOfS : false, + errorFormatter: (_opts$errorFormatter = opts === null || opts === void 0 ? void 0 : opts.errorFormatter) !== null && _opts$errorFormatter !== void 0 ? _opts$errorFormatter : defaultFormatter, + isServer: (_opts$isServer = opts === null || opts === void 0 ? void 0 : opts.isServer) !== null && _opts$isServer !== void 0 ? _opts$isServer : isServerDefault, + $types: null + }); + { + var _opts$isServer2; + const isServer = (_opts$isServer2 = opts === null || opts === void 0 ? void 0 : opts.isServer) !== null && _opts$isServer2 !== void 0 ? _opts$isServer2 : isServerDefault; + if (!isServer && (opts === null || opts === void 0 ? void 0 : opts.allowOutsideOfServer) !== true) + throw new Error(`You're trying to use @trpc/server in a non-server environment. This is not supported by default.`); + } + return { + _config: config3, + procedure: createBuilder({ meta: opts === null || opts === void 0 ? void 0 : opts.defaultMeta }), + middleware: createMiddlewareFactory(), + router: createRouterFactory(config3), + mergeRouters, + createCallerFactory: createCallerFactory() + }; + } + }, "TRPCBuilder"); + initTRPC = new TRPCBuilder(); + } +}); + +// ../../node_modules/@trpc/server/dist/index.mjs +var init_dist3 = __esm({ + "../../node_modules/@trpc/server/dist/index.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_tracked_Bjtgv3wJ(); + init_initTRPC_RoZMIBeA(); + } +}); + +// src/trpc/trpc-index.ts +var t8, middleware, router2, errorLoggerMiddleware, publicProcedure, protectedProcedure, createCallerFactory2, createTRPCRouter; +var init_trpc_index = __esm({ + "src/trpc/trpc-index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist3(); + t8 = initTRPC.context().create(); + middleware = t8.middleware; + router2 = t8.router; + errorLoggerMiddleware = middleware(async ({ path, type, next, ctx }) => { + const start = Date.now(); + try { + const result = await next(); + const duration3 = Date.now() - start; + if (false) { + console.log(`\u2705 ${type} ${path} - ${duration3}ms`); + } + return result; + } catch (error50) { + const duration3 = Date.now() - start; + const err = error50; + console.error("\u{1F6A8} tRPC Error:", { + timestamp: (/* @__PURE__ */ new Date()).toISOString(), + path, + type, + duration: `${duration3}ms`, + userId: ctx?.user?.userId || ctx?.staffUser?.id || "anonymous", + error: { + name: err.name, + message: err.message, + code: err.code, + stack: err.stack + }, + // Add SQL-specific details if available + ...err.code && { sqlCode: err.code }, + ...err.meta && { sqlMeta: err.meta }, + ...err.sql && { sql: err.sql } + }); + throw error50; + } + }); + publicProcedure = t8.procedure.use(errorLoggerMiddleware); + protectedProcedure = t8.procedure.use(errorLoggerMiddleware).use( + middleware(async ({ ctx, next }) => { + if (!ctx.user && !ctx.staffUser) { + throw new TRPCError({ code: "UNAUTHORIZED" }); + } + return next(); + }) + ); + createCallerFactory2 = t8.createCallerFactory; + createTRPCRouter = t8.router; + } +}); + +// src/stores/product-store.ts +async function initializeProducts() { + try { + console.log("Initializing product store in Redis..."); + const productsData = await getAllProductsForCache(); + const allStores = await getAllStoresForCache(); + const storeMap = new Map(allStores.map((s2) => [s2.id, s2])); + const allDeliverySlots = await getAllDeliverySlotsForCache(); + const deliverySlotsMap = /* @__PURE__ */ new Map(); + for (const slot of allDeliverySlots) { + if (!deliverySlotsMap.has(slot.productId)) + deliverySlotsMap.set(slot.productId, []); + deliverySlotsMap.get(slot.productId).push(slot); + } + const allSpecialDeals = await getAllSpecialDealsForCache(); + const specialDealsMap = /* @__PURE__ */ new Map(); + for (const deal of allSpecialDeals) { + if (!specialDealsMap.has(deal.productId)) + specialDealsMap.set(deal.productId, []); + specialDealsMap.get(deal.productId).push(deal); + } + const allProductTags = await getAllProductTagsForCache(); + const productTagsMap = /* @__PURE__ */ new Map(); + for (const tag2 of allProductTags) { + if (!productTagsMap.has(tag2.productId)) + productTagsMap.set(tag2.productId, []); + productTagsMap.get(tag2.productId).push(tag2.tagName); + } + console.log("Product store initialized successfully"); + } catch (error50) { + console.error("Error initializing product store:", error50); + } +} +async function getProductById5(id) { + try { + const product = await getProductById(id); + if (!product) + return null; + const signedImages = scaffoldAssetUrl( + product.images || [] + ); + const allStores = await getAllStoresForCache(); + const store = product.storeId ? allStores.find((s2) => s2.id === product.storeId) || null : null; + const allDeliverySlots = await getAllDeliverySlotsForCache(); + const productSlots2 = allDeliverySlots.filter((s2) => s2.productId === id); + const allSpecialDeals = await getAllSpecialDealsForCache(); + const productDeals = allSpecialDeals.filter((d2) => d2.productId === id); + const allProductTags = await getAllProductTagsForCache(); + const productTagNames = allProductTags.filter((t9) => t9.productId === id).map((t9) => t9.tagName); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + longDescription: product.longDescription, + price: product.price.toString(), + marketPrice: product.marketPrice?.toString() || null, + unitNotation: product.unit.shortNotation, + images: signedImages, + isOutOfStock: product.isOutOfStock, + store: store ? { id: store.id, name: store.name, description: store.description } : null, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + isFlashAvailable: product.isFlashAvailable, + flashPrice: product.flashPrice?.toString() || null, + deliverySlots: productSlots2.map((s2) => ({ + id: s2.id, + deliveryTime: s2.deliveryTime, + freezeTime: s2.freezeTime, + isCapacityFull: s2.isCapacityFull + })), + specialDeals: productDeals.map((d2) => ({ + quantity: d2.quantity.toString(), + price: d2.price.toString(), + validTill: d2.validTill + })), + productTags: productTagNames + }; + } catch (error50) { + console.error(`Error getting product ${id}:`, error50); + return null; + } +} +async function getAllProducts2() { + try { + const productsData = await getAllProductsForCache(); + const allStores = await getAllStoresForCache(); + const storeMap = new Map(allStores.map((s2) => [s2.id, s2])); + const allDeliverySlots = await getAllDeliverySlotsForCache(); + const deliverySlotsMap = /* @__PURE__ */ new Map(); + for (const slot of allDeliverySlots) { + if (!deliverySlotsMap.has(slot.productId)) + deliverySlotsMap.set(slot.productId, []); + deliverySlotsMap.get(slot.productId).push(slot); + } + const allSpecialDeals = await getAllSpecialDealsForCache(); + const specialDealsMap = /* @__PURE__ */ new Map(); + for (const deal of allSpecialDeals) { + if (!specialDealsMap.has(deal.productId)) + specialDealsMap.set(deal.productId, []); + specialDealsMap.get(deal.productId).push(deal); + } + const allProductTags = await getAllProductTagsForCache(); + const productTagsMap = /* @__PURE__ */ new Map(); + for (const tag2 of allProductTags) { + if (!productTagsMap.has(tag2.productId)) + productTagsMap.set(tag2.productId, []); + productTagsMap.get(tag2.productId).push(tag2.tagName); + } + const products = []; + for (const product of productsData) { + const signedImages = scaffoldAssetUrl( + product.images || [] + ); + const store = product.storeId ? storeMap.get(product.storeId) || null : null; + const deliverySlots = deliverySlotsMap.get(product.id) || []; + const specialDeals2 = specialDealsMap.get(product.id) || []; + const productTags2 = productTagsMap.get(product.id) || []; + products.push({ + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + longDescription: product.longDescription, + price: product.price.toString(), + marketPrice: product.marketPrice?.toString() || null, + unitNotation: product.unitShortNotation, + images: signedImages, + isOutOfStock: product.isOutOfStock, + store: store ? { id: store.id, name: store.name, description: store.description } : null, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + isFlashAvailable: product.isFlashAvailable, + flashPrice: product.flashPrice?.toString() || null, + deliverySlots: deliverySlots.map((s2) => ({ + id: s2.id, + deliveryTime: s2.deliveryTime, + freezeTime: s2.freezeTime, + isCapacityFull: s2.isCapacityFull + })), + specialDeals: specialDeals2.map((d2) => ({ + quantity: d2.quantity.toString(), + price: d2.price.toString(), + validTill: d2.validTill + })), + productTags: productTags2 + }); + } + return products; + } catch (error50) { + console.error("Error getting all products:", error50); + return []; + } +} +var init_product_store = __esm({ + "src/stores/product-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_s3_client(); + __name(initializeProducts, "initializeProducts"); + __name(getProductById5, "getProductById"); + __name(getAllProducts2, "getAllProducts"); + } +}); + +// src/stores/product-tag-store.ts +async function transformTagToStoreTag(tag2) { + const signedImageUrl = tag2.imageUrl ? await generateSignedUrlFromS3Url(tag2.imageUrl) : null; + return { + id: tag2.id, + tagName: tag2.tagName, + tagDescription: tag2.tagDescription, + imageUrl: signedImageUrl, + isDashboardTag: tag2.isDashboardTag, + relatedStores: tag2.relatedStores || [], + productIds: tag2.products ? tag2.products.map((p2) => p2.productId) : [] + }; +} +async function initializeProductTagStore() { + try { + console.log("Initializing product tag store in Redis..."); + const tagsData = await getAllTagsForCache(); + const productTagsData = await getAllTagProductMappings(); + const productIdsByTag = /* @__PURE__ */ new Map(); + for (const pt of productTagsData) { + if (!productIdsByTag.has(pt.tagId)) { + productIdsByTag.set(pt.tagId, []); + } + productIdsByTag.get(pt.tagId).push(pt.productId); + } + console.log("Product tag store initialized successfully"); + } catch (error50) { + console.error("Error initializing product tag store:", error50); + } +} +async function getDashboardTags() { + try { + const tags = await getAllProductTags(); + const result = []; + for (const tag2 of tags) { + if (tag2.isDashboardTag) { + result.push(await transformTagToStoreTag(tag2)); + } + } + return result; + } catch (error50) { + console.error("Error getting dashboard tags:", error50); + return []; + } +} +async function getTagsByStoreId(storeId) { + try { + const tags = await getAllProductTags(); + const result = []; + for (const tag2 of tags) { + const relatedStores = tag2.relatedStores || []; + if (relatedStores.includes(storeId)) { + result.push(await transformTagToStoreTag(tag2)); + } + } + return result; + } catch (error50) { + console.error(`Error getting tags for store ${storeId}:`, error50); + return []; + } +} +var init_product_tag_store = __esm({ + "src/stores/product-tag-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_s3_client(); + __name(transformTagToStoreTag, "transformTagToStoreTag"); + __name(initializeProductTagStore, "initializeProductTagStore"); + __name(getDashboardTags, "getDashboardTags"); + __name(getTagsByStoreId, "getTagsByStoreId"); + } +}); + +// src/trpc/apis/common-apis/common.ts +async function scaffoldProducts() { + let products = await getAllProducts2(); + products = products.filter((item) => Boolean(item.id)); + const suspendedProductIds = new Set(await getSuspendedProductIds()); + products = products.filter((product) => !suspendedProductIds.has(product.id)); + const formattedProducts = await Promise.all( + products.map(async (product) => { + const nextDeliveryDate = await getNextDeliveryDateWithCapacity(product.id); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + price: parseFloat(product.price), + marketPrice: product.marketPrice ? parseFloat(product.marketPrice) : null, + unit: product.unitNotation, + unitNotation: product.unitNotation, + incrementStep: product.incrementStep, + productQuantity: product.productQuantity, + storeId: product.store?.id || null, + isOutOfStock: product.isOutOfStock, + isFlashAvailable: product.isFlashAvailable, + nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null, + images: product.images, + flashPrice: product.flashPrice + }; + }) + ); + return { + products: formattedProducts, + count: formattedProducts.length + }; +} +var getNextDeliveryDate, commonRouter; +var init_common3 = __esm({ + "src/trpc/apis/common-apis/common.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_dbService(); + init_product_store(); + init_product_tag_store(); + getNextDeliveryDate = getNextDeliveryDateWithCapacity; + __name(scaffoldProducts, "scaffoldProducts"); + commonRouter = router2({ + getDashboardTags: publicProcedure.query(async () => { + const tags = await getDashboardTags(); + return { + tags + }; + }), + getAllProductsSummary: publicProcedure.query(async () => { + const response = await scaffoldProducts(); + return response; + }) + /* + // Old implementation - moved to common-trpc-index.ts: + getStoresSummary: publicProcedure + .query(async () => { + const stores = await getStoresSummary(); + return { stores }; + }), + + healthCheck: publicProcedure + .query(async () => { + const result = await healthCheck(); + return result; + }), + */ + }); + } +}); + +// src/apis/common-apis/apis/common-product.controller.ts +var getAllProductsSummary; +var init_common_product_controller = __esm({ + "src/apis/common-apis/apis/common-product.controller.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_s3_client(); + init_common3(); + init_dbService(); + getAllProductsSummary = /* @__PURE__ */ __name(async (c2) => { + try { + const tagId = c2.req.query("tagId"); + const tagIdNum = tagId ? parseInt(tagId) : void 0; + if (tagIdNum) { + const products = await getAllProductsWithUnits(tagIdNum); + if (products.length === 0) { + return c2.json({ + products: [], + count: 0 + }, 200); + } + } + const productsWithUnits = await getAllProductsWithUnits(tagIdNum); + const formattedProducts = await Promise.all( + productsWithUnits.map(async (product) => { + const nextDeliveryDate = await getNextDeliveryDate(product.id); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + price: product.price, + marketPrice: product.marketPrice, + unit: product.unitShortNotation, + productQuantity: product.productQuantity, + isOutOfStock: product.isOutOfStock, + nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null, + images: scaffoldAssetUrl(product.images || []) + }; + }) + ); + return c2.json({ + products: formattedProducts, + count: formattedProducts.length + }, 200); + } catch (error50) { + console.error("Get products summary error:", error50); + return c2.json({ error: "Failed to fetch products summary" }, 500); + } + }, "getAllProductsSummary"); + } +}); + +// src/apis/common-apis/apis/common-product.router.ts +var router3, commonProductsRouter, common_product_router_default; +var init_common_product_router = __esm({ + "src/apis/common-apis/apis/common-product.router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_common_product_controller(); + router3 = new Hono2(); + router3.get("/summary", getAllProductsSummary); + commonProductsRouter = router3; + common_product_router_default = commonProductsRouter; + } +}); + +// src/apis/common-apis/apis/common.router.ts +var router4, commonRouter2, common_router_default; +var init_common_router = __esm({ + "src/apis/common-apis/apis/common.router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_common_product_router(); + router4 = new Hono2(); + router4.route("/products", common_product_router_default); + commonRouter2 = router4; + common_router_default = commonRouter2; + } +}); + +// src/v1-router.ts +var router5, v1Router, v1_router_default; +var init_v1_router = __esm({ + "src/v1-router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_av_router(); + init_common_router(); + router5 = new Hono2(); + router5.route("/av", av_router_default); + router5.route("/cm", common_router_default); + v1Router = router5; + v1_router_default = v1Router; + } +}); + +// src/test-controller.ts +var router6, test_controller_default; +var init_test_controller = __esm({ + "src/test-controller.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + router6 = new Hono2(); + router6.get("/", (c2) => { + return c2.json({ + status: "ok", + message: "Health check passed", + timestamp: (/* @__PURE__ */ new Date()).toISOString() + }); + }); + test_controller_default = router6; + } +}); + +// src/middleware/auth.middleware.ts +var authenticateUser; +var init_auth_middleware = __esm({ + "src/middleware/auth.middleware.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_webapi(); + init_dbService(); + init_api_error(); + init_env_exporter(); + authenticateUser = /* @__PURE__ */ __name(async (c2, next) => { + try { + const authHeader = c2.req.header("authorization"); + if (!authHeader?.startsWith("Bearer ")) { + throw new ApiError("Authorization token required", 401); + } + const token = authHeader.substring(7); + console.log(c2.req.header); + const { payload } = await jwtVerify(token, getEncodedJwtSecret()); + const decoded = payload; + if (decoded.staffId) { + const staff = await getStaffUserById(decoded.staffId); + if (!staff) { + throw new ApiError("Invalid staff token", 401); + } + c2.set("staffUser", { + id: staff.id, + name: staff.name + }); + } else { + c2.set("user", decoded); + const suspended = await isUserSuspended(decoded.userId); + if (suspended) { + throw new ApiError("Account suspended", 403); + } + } + await next(); + } catch (error50) { + throw error50; + } + }, "authenticateUser"); + } +}); + +// src/main-router.ts +var router7, mainRouter, main_router_default; +var init_main_router = __esm({ + "src/main-router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_v1_router(); + init_test_controller(); + init_auth_middleware(); + router7 = new Hono2(); + router7.get("/health", (c2) => { + return c2.json({ + status: "OK", + timestamp: (/* @__PURE__ */ new Date()).toISOString(), + uptime: process.uptime(), + message: "Hello world" + }); + }); + router7.get("/seed", (c2) => { + return c2.json({ + status: "OK", + timestamp: (/* @__PURE__ */ new Date()).toISOString(), + uptime: process.uptime() + }); + }); + router7.use("*", authenticateUser); + router7.route("/v1", v1_router_default); + router7.route("/test", test_controller_default); + mainRouter = router7; + main_router_default = mainRouter; + } +}); + +// ../../node_modules/zod/v4/core/core.js +function $constructor(name, initializer3, params) { + function init(inst, def) { + if (!inst._zod) { + Object.defineProperty(inst, "_zod", { + value: { + def, + constr: _, + traits: /* @__PURE__ */ new Set() + }, + enumerable: false + }); + } + if (inst._zod.traits.has(name)) { + return; + } + inst._zod.traits.add(name); + initializer3(inst, def); + const proto = _.prototype; + const keys = Object.keys(proto); + for (let i2 = 0; i2 < keys.length; i2++) { + const k2 = keys[i2]; + if (!(k2 in inst)) { + inst[k2] = proto[k2].bind(inst); + } + } + } + __name(init, "init"); + const Parent = params?.Parent ?? Object; + class Definition extends Parent { + } + __name(Definition, "Definition"); + Object.defineProperty(Definition, "name", { value: name }); + function _(def) { + var _a124; + const inst = params?.Parent ? new Definition() : this; + init(inst, def); + (_a124 = inst._zod).deferred ?? (_a124.deferred = []); + for (const fn of inst._zod.deferred) { + fn(); + } + return inst; + } + __name(_, "_"); + Object.defineProperty(_, "init", { value: init }); + Object.defineProperty(_, Symbol.hasInstance, { + value: (inst) => { + if (params?.Parent && inst instanceof params.Parent) + return true; + return inst?._zod?.traits?.has(name); + } + }); + Object.defineProperty(_, "name", { value: name }); + return _; +} +function config2(newConfig) { + if (newConfig) + Object.assign(globalConfig, newConfig); + return globalConfig; +} +var NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig; +var init_core2 = __esm({ + "../../node_modules/zod/v4/core/core.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + NEVER = Object.freeze({ + status: "aborted" + }); + __name($constructor, "$constructor"); + $brand = Symbol("zod_brand"); + $ZodAsyncError = class extends Error { + constructor() { + super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); + } + }; + __name($ZodAsyncError, "$ZodAsyncError"); + $ZodEncodeError = class extends Error { + constructor(name) { + super(`Encountered unidirectional transform during encode: ${name}`); + this.name = "ZodEncodeError"; + } + }; + __name($ZodEncodeError, "$ZodEncodeError"); + globalConfig = {}; + __name(config2, "config"); + } +}); + +// ../../node_modules/zod/v4/core/util.js +var util_exports = {}; +__export(util_exports, { + BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES, + Class: () => Class, + NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES, + aborted: () => aborted, + allowsEval: () => allowsEval, + assert: () => assert3, + assertEqual: () => assertEqual, + assertIs: () => assertIs, + assertNever: () => assertNever, + assertNotEqual: () => assertNotEqual, + assignProp: () => assignProp, + base64ToUint8Array: () => base64ToUint8Array, + base64urlToUint8Array: () => base64urlToUint8Array, + cached: () => cached, + captureStackTrace: () => captureStackTrace, + cleanEnum: () => cleanEnum, + cleanRegex: () => cleanRegex, + clone: () => clone, + cloneDef: () => cloneDef, + createTransparentProxy: () => createTransparentProxy, + defineLazy: () => defineLazy, + esc: () => esc, + escapeRegex: () => escapeRegex, + extend: () => extend, + finalizeIssue: () => finalizeIssue, + floatSafeRemainder: () => floatSafeRemainder, + getElementAtPath: () => getElementAtPath, + getEnumValues: () => getEnumValues, + getLengthableOrigin: () => getLengthableOrigin, + getParsedType: () => getParsedType, + getSizableOrigin: () => getSizableOrigin, + hexToUint8Array: () => hexToUint8Array, + isObject: () => isObject3, + isPlainObject: () => isPlainObject2, + issue: () => issue, + joinValues: () => joinValues, + jsonStringifyReplacer: () => jsonStringifyReplacer, + merge: () => merge2, + mergeDefs: () => mergeDefs, + normalizeParams: () => normalizeParams, + nullish: () => nullish, + numKeys: () => numKeys, + objectClone: () => objectClone, + omit: () => omit, + optionalKeys: () => optionalKeys, + parsedType: () => parsedType, + partial: () => partial, + pick: () => pick, + prefixIssues: () => prefixIssues, + primitiveTypes: () => primitiveTypes, + promiseAllObject: () => promiseAllObject, + propertyKeyTypes: () => propertyKeyTypes, + randomString: () => randomString, + required: () => required, + safeExtend: () => safeExtend, + shallowClone: () => shallowClone, + slugify: () => slugify, + stringifyPrimitive: () => stringifyPrimitive, + uint8ArrayToBase64: () => uint8ArrayToBase64, + uint8ArrayToBase64url: () => uint8ArrayToBase64url, + uint8ArrayToHex: () => uint8ArrayToHex, + unwrapMessage: () => unwrapMessage +}); +function assertEqual(val) { + return val; +} +function assertNotEqual(val) { + return val; +} +function assertIs(_arg) { +} +function assertNever(_x2) { + throw new Error("Unexpected value in exhaustive check"); +} +function assert3(_) { +} +function getEnumValues(entries) { + const numericValues = Object.values(entries).filter((v3) => typeof v3 === "number"); + const values = Object.entries(entries).filter(([k2, _]) => numericValues.indexOf(+k2) === -1).map(([_, v3]) => v3); + return values; +} +function joinValues(array2, separator = "|") { + return array2.map((val) => stringifyPrimitive(val)).join(separator); +} +function jsonStringifyReplacer(_, value) { + if (typeof value === "bigint") + return value.toString(); + return value; +} +function cached(getter) { + const set2 = false; + return { + get value() { + if (!set2) { + const value = getter(); + Object.defineProperty(this, "value", { value }); + return value; + } + throw new Error("cached value already set"); + } + }; +} +function nullish(input) { + return input === null || input === void 0; +} +function cleanRegex(source) { + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + return source.slice(start, end); +} +function floatSafeRemainder(val, step) { + const valDecCount = (val.toString().split(".")[1] || "").length; + const stepString = step.toString(); + let stepDecCount = (stepString.split(".")[1] || "").length; + if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) { + const match2 = stepString.match(/\d?e-(\d?)/); + if (match2?.[1]) { + stepDecCount = Number.parseInt(match2[1]); + } + } + const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; + const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); + const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); + return valInt % stepInt / 10 ** decCount; +} +function defineLazy(object2, key, getter) { + let value = void 0; + Object.defineProperty(object2, key, { + get() { + if (value === EVALUATING) { + return void 0; + } + if (value === void 0) { + value = EVALUATING; + value = getter(); + } + return value; + }, + set(v3) { + Object.defineProperty(object2, key, { + value: v3 + // configurable: true, + }); + }, + configurable: true + }); +} +function objectClone(obj) { + return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj)); +} +function assignProp(target, prop, value) { + Object.defineProperty(target, prop, { + value, + writable: true, + enumerable: true, + configurable: true + }); +} +function mergeDefs(...defs) { + const mergedDescriptors = {}; + for (const def of defs) { + const descriptors = Object.getOwnPropertyDescriptors(def); + Object.assign(mergedDescriptors, descriptors); + } + return Object.defineProperties({}, mergedDescriptors); +} +function cloneDef(schema) { + return mergeDefs(schema._zod.def); +} +function getElementAtPath(obj, path) { + if (!path) + return obj; + return path.reduce((acc, key) => acc?.[key], obj); +} +function promiseAllObject(promisesObj) { + const keys = Object.keys(promisesObj); + const promises = keys.map((key) => promisesObj[key]); + return Promise.all(promises).then((results) => { + const resolvedObj = {}; + for (let i2 = 0; i2 < keys.length; i2++) { + resolvedObj[keys[i2]] = results[i2]; + } + return resolvedObj; + }); +} +function randomString(length = 10) { + const chars2 = "abcdefghijklmnopqrstuvwxyz"; + let str = ""; + for (let i2 = 0; i2 < length; i2++) { + str += chars2[Math.floor(Math.random() * chars2.length)]; + } + return str; +} +function esc(str) { + return JSON.stringify(str); +} +function slugify(input) { + return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, ""); +} +function isObject3(data) { + return typeof data === "object" && data !== null && !Array.isArray(data); +} +function isPlainObject2(o2) { + if (isObject3(o2) === false) + return false; + const ctor = o2.constructor; + if (ctor === void 0) + return true; + if (typeof ctor !== "function") + return true; + const prot = ctor.prototype; + if (isObject3(prot) === false) + return false; + if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) { + return false; + } + return true; +} +function shallowClone(o2) { + if (isPlainObject2(o2)) + return { ...o2 }; + if (Array.isArray(o2)) + return [...o2]; + return o2; +} +function numKeys(data) { + let keyCount = 0; + for (const key in data) { + if (Object.prototype.hasOwnProperty.call(data, key)) { + keyCount++; + } + } + return keyCount; +} +function escapeRegex(str) { + return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); +} +function clone(inst, def, params) { + const cl2 = new inst._zod.constr(def ?? inst._zod.def); + if (!def || params?.parent) + cl2._zod.parent = inst; + return cl2; +} +function normalizeParams(_params) { + const params = _params; + if (!params) + return {}; + if (typeof params === "string") + return { error: () => params }; + if (params?.message !== void 0) { + if (params?.error !== void 0) + throw new Error("Cannot specify both `message` and `error` params"); + params.error = params.message; + } + delete params.message; + if (typeof params.error === "string") + return { ...params, error: () => params.error }; + return params; +} +function createTransparentProxy(getter) { + let target; + return new Proxy({}, { + get(_, prop, receiver) { + target ?? (target = getter()); + return Reflect.get(target, prop, receiver); + }, + set(_, prop, value, receiver) { + target ?? (target = getter()); + return Reflect.set(target, prop, value, receiver); + }, + has(_, prop) { + target ?? (target = getter()); + return Reflect.has(target, prop); + }, + deleteProperty(_, prop) { + target ?? (target = getter()); + return Reflect.deleteProperty(target, prop); + }, + ownKeys(_) { + target ?? (target = getter()); + return Reflect.ownKeys(target); + }, + getOwnPropertyDescriptor(_, prop) { + target ?? (target = getter()); + return Reflect.getOwnPropertyDescriptor(target, prop); + }, + defineProperty(_, prop, descriptor) { + target ?? (target = getter()); + return Reflect.defineProperty(target, prop, descriptor); + } + }); +} +function stringifyPrimitive(value) { + if (typeof value === "bigint") + return value.toString() + "n"; + if (typeof value === "string") + return `"${value}"`; + return `${value}`; +} +function optionalKeys(shape) { + return Object.keys(shape).filter((k2) => { + return shape[k2]._zod.optin === "optional" && shape[k2]._zod.optout === "optional"; + }); +} +function pick(schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".pick() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const newShape = {}; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + newShape[key] = currDef.shape[key]; + } + assignProp(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone(schema, def); +} +function omit(schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".omit() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const newShape = { ...schema._zod.def.shape }; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + delete newShape[key]; + } + assignProp(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone(schema, def); +} +function extend(schema, shape) { + if (!isPlainObject2(shape)) { + throw new Error("Invalid input to extend: expected a plain object"); + } + const checks = schema._zod.def.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + const existingShape = schema._zod.def.shape; + for (const key in shape) { + if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) { + throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead."); + } + } + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + } + }); + return clone(schema, def); +} +function safeExtend(schema, shape) { + if (!isPlainObject2(shape)) { + throw new Error("Invalid input to safeExtend: expected a plain object"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + } + }); + return clone(schema, def); +} +function merge2(a2, b2) { + const def = mergeDefs(a2._zod.def, { + get shape() { + const _shape = { ...a2._zod.def.shape, ...b2._zod.def.shape }; + assignProp(this, "shape", _shape); + return _shape; + }, + get catchall() { + return b2._zod.def.catchall; + }, + checks: [] + // delete existing checks + }); + return clone(a2, def); +} +function partial(Class2, schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".partial() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const oldShape = schema._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in oldShape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = Class2 ? new Class2({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; + } + } else { + for (const key in oldShape) { + shape[key] = Class2 ? new Class2({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; + } + } + assignProp(this, "shape", shape); + return shape; + }, + checks: [] + }); + return clone(schema, def); +} +function required(Class2, schema, mask) { + const def = mergeDefs(schema._zod.def, { + get shape() { + const oldShape = schema._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = new Class2({ + type: "nonoptional", + innerType: oldShape[key] + }); + } + } else { + for (const key in oldShape) { + shape[key] = new Class2({ + type: "nonoptional", + innerType: oldShape[key] + }); + } + } + assignProp(this, "shape", shape); + return shape; + } + }); + return clone(schema, def); +} +function aborted(x2, startIndex = 0) { + if (x2.aborted === true) + return true; + for (let i2 = startIndex; i2 < x2.issues.length; i2++) { + if (x2.issues[i2]?.continue !== true) { + return true; + } + } + return false; +} +function prefixIssues(path, issues) { + return issues.map((iss) => { + var _a124; + (_a124 = iss).path ?? (_a124.path = []); + iss.path.unshift(path); + return iss; + }); +} +function unwrapMessage(message2) { + return typeof message2 === "string" ? message2 : message2?.message; +} +function finalizeIssue(iss, ctx, config3) { + const full = { ...iss, path: iss.path ?? [] }; + if (!iss.message) { + const message2 = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config3.customError?.(iss)) ?? unwrapMessage(config3.localeError?.(iss)) ?? "Invalid input"; + full.message = message2; + } + delete full.inst; + delete full.continue; + if (!ctx?.reportInput) { + delete full.input; + } + return full; +} +function getSizableOrigin(input) { + if (input instanceof Set) + return "set"; + if (input instanceof Map) + return "map"; + if (input instanceof File) + return "file"; + return "unknown"; +} +function getLengthableOrigin(input) { + if (Array.isArray(input)) + return "array"; + if (typeof input === "string") + return "string"; + return "unknown"; +} +function parsedType(data) { + const t9 = typeof data; + switch (t9) { + case "number": { + return Number.isNaN(data) ? "nan" : "number"; + } + case "object": { + if (data === null) { + return "null"; + } + if (Array.isArray(data)) { + return "array"; + } + const obj = data; + if (obj && Object.getPrototypeOf(obj) !== Object.prototype && "constructor" in obj && obj.constructor) { + return obj.constructor.name; + } + } + } + return t9; +} +function issue(...args) { + const [iss, input, inst] = args; + if (typeof iss === "string") { + return { + message: iss, + code: "custom", + input, + inst + }; + } + return { ...iss }; +} +function cleanEnum(obj) { + return Object.entries(obj).filter(([k2, _]) => { + return Number.isNaN(Number.parseInt(k2, 10)); + }).map((el) => el[1]); +} +function base64ToUint8Array(base643) { + const binaryString = atob(base643); + const bytes = new Uint8Array(binaryString.length); + for (let i2 = 0; i2 < binaryString.length; i2++) { + bytes[i2] = binaryString.charCodeAt(i2); + } + return bytes; +} +function uint8ArrayToBase64(bytes) { + let binaryString = ""; + for (let i2 = 0; i2 < bytes.length; i2++) { + binaryString += String.fromCharCode(bytes[i2]); + } + return btoa(binaryString); +} +function base64urlToUint8Array(base64url3) { + const base643 = base64url3.replace(/-/g, "+").replace(/_/g, "/"); + const padding = "=".repeat((4 - base643.length % 4) % 4); + return base64ToUint8Array(base643 + padding); +} +function uint8ArrayToBase64url(bytes) { + return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); +} +function hexToUint8Array(hex3) { + const cleanHex = hex3.replace(/^0x/, ""); + if (cleanHex.length % 2 !== 0) { + throw new Error("Invalid hex string length"); + } + const bytes = new Uint8Array(cleanHex.length / 2); + for (let i2 = 0; i2 < cleanHex.length; i2 += 2) { + bytes[i2 / 2] = Number.parseInt(cleanHex.slice(i2, i2 + 2), 16); + } + return bytes; +} +function uint8ArrayToHex(bytes) { + return Array.from(bytes).map((b2) => b2.toString(16).padStart(2, "0")).join(""); +} +var EVALUATING, captureStackTrace, allowsEval, getParsedType, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, Class; +var init_util3 = __esm({ + "../../node_modules/zod/v4/core/util.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(assertEqual, "assertEqual"); + __name(assertNotEqual, "assertNotEqual"); + __name(assertIs, "assertIs"); + __name(assertNever, "assertNever"); + __name(assert3, "assert"); + __name(getEnumValues, "getEnumValues"); + __name(joinValues, "joinValues"); + __name(jsonStringifyReplacer, "jsonStringifyReplacer"); + __name(cached, "cached"); + __name(nullish, "nullish"); + __name(cleanRegex, "cleanRegex"); + __name(floatSafeRemainder, "floatSafeRemainder"); + EVALUATING = Symbol("evaluating"); + __name(defineLazy, "defineLazy"); + __name(objectClone, "objectClone"); + __name(assignProp, "assignProp"); + __name(mergeDefs, "mergeDefs"); + __name(cloneDef, "cloneDef"); + __name(getElementAtPath, "getElementAtPath"); + __name(promiseAllObject, "promiseAllObject"); + __name(randomString, "randomString"); + __name(esc, "esc"); + __name(slugify, "slugify"); + captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => { + }; + __name(isObject3, "isObject"); + allowsEval = cached(() => { + if (typeof navigator !== "undefined" && "Cloudflare-Workers"?.includes("Cloudflare")) { + return false; + } + try { + const F2 = Function; + new F2(""); + return true; + } catch (_) { + return false; + } + }); + __name(isPlainObject2, "isPlainObject"); + __name(shallowClone, "shallowClone"); + __name(numKeys, "numKeys"); + getParsedType = /* @__PURE__ */ __name((data) => { + const t9 = typeof data; + switch (t9) { + case "undefined": + return "undefined"; + case "string": + return "string"; + case "number": + return Number.isNaN(data) ? "nan" : "number"; + case "boolean": + return "boolean"; + case "function": + return "function"; + case "bigint": + return "bigint"; + case "symbol": + return "symbol"; + case "object": + if (Array.isArray(data)) { + return "array"; + } + if (data === null) { + return "null"; + } + if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { + return "promise"; + } + if (typeof Map !== "undefined" && data instanceof Map) { + return "map"; + } + if (typeof Set !== "undefined" && data instanceof Set) { + return "set"; + } + if (typeof Date !== "undefined" && data instanceof Date) { + return "date"; + } + if (typeof File !== "undefined" && data instanceof File) { + return "file"; + } + return "object"; + default: + throw new Error(`Unknown data type: ${t9}`); + } + }, "getParsedType"); + propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]); + primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]); + __name(escapeRegex, "escapeRegex"); + __name(clone, "clone"); + __name(normalizeParams, "normalizeParams"); + __name(createTransparentProxy, "createTransparentProxy"); + __name(stringifyPrimitive, "stringifyPrimitive"); + __name(optionalKeys, "optionalKeys"); + NUMBER_FORMAT_RANGES = { + safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], + int32: [-2147483648, 2147483647], + uint32: [0, 4294967295], + float32: [-34028234663852886e22, 34028234663852886e22], + float64: [-Number.MAX_VALUE, Number.MAX_VALUE] + }; + BIGINT_FORMAT_RANGES = { + int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")], + uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")] + }; + __name(pick, "pick"); + __name(omit, "omit"); + __name(extend, "extend"); + __name(safeExtend, "safeExtend"); + __name(merge2, "merge"); + __name(partial, "partial"); + __name(required, "required"); + __name(aborted, "aborted"); + __name(prefixIssues, "prefixIssues"); + __name(unwrapMessage, "unwrapMessage"); + __name(finalizeIssue, "finalizeIssue"); + __name(getSizableOrigin, "getSizableOrigin"); + __name(getLengthableOrigin, "getLengthableOrigin"); + __name(parsedType, "parsedType"); + __name(issue, "issue"); + __name(cleanEnum, "cleanEnum"); + __name(base64ToUint8Array, "base64ToUint8Array"); + __name(uint8ArrayToBase64, "uint8ArrayToBase64"); + __name(base64urlToUint8Array, "base64urlToUint8Array"); + __name(uint8ArrayToBase64url, "uint8ArrayToBase64url"); + __name(hexToUint8Array, "hexToUint8Array"); + __name(uint8ArrayToHex, "uint8ArrayToHex"); + Class = class { + constructor(..._args) { + } + }; + __name(Class, "Class"); + } +}); + +// ../../node_modules/zod/v4/core/errors.js +function flattenError(error50, mapper = (issue2) => issue2.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of error50.issues) { + if (sub.path.length > 0) { + fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; + fieldErrors[sub.path[0]].push(mapper(sub)); + } else { + formErrors.push(mapper(sub)); + } + } + return { formErrors, fieldErrors }; +} +function formatError(error50, mapper = (issue2) => issue2.message) { + const fieldErrors = { _errors: [] }; + const processError = /* @__PURE__ */ __name((error51) => { + for (const issue2 of error51.issues) { + if (issue2.code === "invalid_union" && issue2.errors.length) { + issue2.errors.map((issues) => processError({ issues })); + } else if (issue2.code === "invalid_key") { + processError({ issues: issue2.issues }); + } else if (issue2.code === "invalid_element") { + processError({ issues: issue2.issues }); + } else if (issue2.path.length === 0) { + fieldErrors._errors.push(mapper(issue2)); + } else { + let curr = fieldErrors; + let i2 = 0; + while (i2 < issue2.path.length) { + const el = issue2.path[i2]; + const terminal = i2 === issue2.path.length - 1; + if (!terminal) { + curr[el] = curr[el] || { _errors: [] }; + } else { + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue2)); + } + curr = curr[el]; + i2++; + } + } + } + }, "processError"); + processError(error50); + return fieldErrors; +} +function treeifyError(error50, mapper = (issue2) => issue2.message) { + const result = { errors: [] }; + const processError = /* @__PURE__ */ __name((error51, path = []) => { + var _a124, _b; + for (const issue2 of error51.issues) { + if (issue2.code === "invalid_union" && issue2.errors.length) { + issue2.errors.map((issues) => processError({ issues }, issue2.path)); + } else if (issue2.code === "invalid_key") { + processError({ issues: issue2.issues }, issue2.path); + } else if (issue2.code === "invalid_element") { + processError({ issues: issue2.issues }, issue2.path); + } else { + const fullpath = [...path, ...issue2.path]; + if (fullpath.length === 0) { + result.errors.push(mapper(issue2)); + continue; + } + let curr = result; + let i2 = 0; + while (i2 < fullpath.length) { + const el = fullpath[i2]; + const terminal = i2 === fullpath.length - 1; + if (typeof el === "string") { + curr.properties ?? (curr.properties = {}); + (_a124 = curr.properties)[el] ?? (_a124[el] = { errors: [] }); + curr = curr.properties[el]; + } else { + curr.items ?? (curr.items = []); + (_b = curr.items)[el] ?? (_b[el] = { errors: [] }); + curr = curr.items[el]; + } + if (terminal) { + curr.errors.push(mapper(issue2)); + } + i2++; + } + } + } + }, "processError"); + processError(error50); + return result; +} +function toDotPath(_path) { + const segs = []; + const path = _path.map((seg) => typeof seg === "object" ? seg.key : seg); + for (const seg of path) { + if (typeof seg === "number") + segs.push(`[${seg}]`); + else if (typeof seg === "symbol") + segs.push(`[${JSON.stringify(String(seg))}]`); + else if (/[^\w$]/.test(seg)) + segs.push(`[${JSON.stringify(seg)}]`); + else { + if (segs.length) + segs.push("."); + segs.push(seg); + } + } + return segs.join(""); +} +function prettifyError(error50) { + const lines = []; + const issues = [...error50.issues].sort((a2, b2) => (a2.path ?? []).length - (b2.path ?? []).length); + for (const issue2 of issues) { + lines.push(`\u2716 ${issue2.message}`); + if (issue2.path?.length) + lines.push(` \u2192 at ${toDotPath(issue2.path)}`); + } + return lines.join("\n"); +} +var initializer, $ZodError, $ZodRealError; +var init_errors4 = __esm({ + "../../node_modules/zod/v4/core/errors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core2(); + init_util3(); + initializer = /* @__PURE__ */ __name((inst, def) => { + inst.name = "$ZodError"; + Object.defineProperty(inst, "_zod", { + value: inst._zod, + enumerable: false + }); + Object.defineProperty(inst, "issues", { + value: def, + enumerable: false + }); + inst.message = JSON.stringify(def, jsonStringifyReplacer, 2); + Object.defineProperty(inst, "toString", { + value: () => inst.message, + enumerable: false + }); + }, "initializer"); + $ZodError = $constructor("$ZodError", initializer); + $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error }); + __name(flattenError, "flattenError"); + __name(formatError, "formatError"); + __name(treeifyError, "treeifyError"); + __name(toDotPath, "toDotPath"); + __name(prettifyError, "prettifyError"); + } +}); + +// ../../node_modules/zod/v4/core/parse.js +var _parse, parse, _parseAsync, parseAsync, _safeParse, safeParse, _safeParseAsync, safeParseAsync, _encode, encode3, _decode, decode2, _encodeAsync, encodeAsync, _decodeAsync, decodeAsync, _safeEncode, safeEncode, _safeDecode, safeDecode, _safeEncodeAsync, safeEncodeAsync, _safeDecodeAsync, safeDecodeAsync; +var init_parse = __esm({ + "../../node_modules/zod/v4/core/parse.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core2(); + init_errors4(); + init_util3(); + _parse = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx, _params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; + const result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) { + throw new $ZodAsyncError(); + } + if (result.issues.length) { + const e2 = new (_params?.Err ?? _Err2)(result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))); + captureStackTrace(e2, _params?.callee); + throw e2; + } + return result.value; + }, "_parse"); + parse = /* @__PURE__ */ _parse($ZodRealError); + _parseAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx, params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + if (result.issues.length) { + const e2 = new (params?.Err ?? _Err2)(result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))); + captureStackTrace(e2, params?.callee); + throw e2; + } + return result.value; + }, "_parseAsync"); + parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError); + _safeParse = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + const ctx = _ctx ? { ..._ctx, async: false } : { async: false }; + const result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) { + throw new $ZodAsyncError(); + } + return result.issues.length ? { + success: false, + error: new (_Err2 ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))) + } : { success: true, data: result.value }; + }, "_safeParse"); + safeParse = /* @__PURE__ */ _safeParse($ZodRealError); + _safeParseAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + return result.issues.length ? { + success: false, + error: new _Err2(result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))) + } : { success: true, data: result.value }; + }, "_safeParseAsync"); + safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError); + _encode = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parse(_Err2)(schema, value, ctx); + }, "_encode"); + encode3 = /* @__PURE__ */ _encode($ZodRealError); + _decode = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + return _parse(_Err2)(schema, value, _ctx); + }, "_decode"); + decode2 = /* @__PURE__ */ _decode($ZodRealError); + _encodeAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parseAsync(_Err2)(schema, value, ctx); + }, "_encodeAsync"); + encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError); + _decodeAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + return _parseAsync(_Err2)(schema, value, _ctx); + }, "_decodeAsync"); + decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError); + _safeEncode = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParse(_Err2)(schema, value, ctx); + }, "_safeEncode"); + safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError); + _safeDecode = /* @__PURE__ */ __name((_Err2) => (schema, value, _ctx) => { + return _safeParse(_Err2)(schema, value, _ctx); + }, "_safeDecode"); + safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError); + _safeEncodeAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParseAsync(_Err2)(schema, value, ctx); + }, "_safeEncodeAsync"); + safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError); + _safeDecodeAsync = /* @__PURE__ */ __name((_Err2) => async (schema, value, _ctx) => { + return _safeParseAsync(_Err2)(schema, value, _ctx); + }, "_safeDecodeAsync"); + safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError); + } +}); + +// ../../node_modules/zod/v4/core/regexes.js +var regexes_exports = {}; +__export(regexes_exports, { + base64: () => base64, + base64url: () => base64url, + bigint: () => bigint2, + boolean: () => boolean, + browserEmail: () => browserEmail, + cidrv4: () => cidrv4, + cidrv6: () => cidrv6, + cuid: () => cuid, + cuid2: () => cuid2, + date: () => date2, + datetime: () => datetime, + domain: () => domain2, + duration: () => duration, + e164: () => e164, + email: () => email, + emoji: () => emoji, + extendedDuration: () => extendedDuration, + guid: () => guid, + hex: () => hex, + hostname: () => hostname, + html5Email: () => html5Email, + idnEmail: () => idnEmail, + integer: () => integer2, + ipv4: () => ipv4, + ipv6: () => ipv6, + ksuid: () => ksuid, + lowercase: () => lowercase, + mac: () => mac, + md5_base64: () => md5_base64, + md5_base64url: () => md5_base64url, + md5_hex: () => md5_hex, + nanoid: () => nanoid, + null: () => _null, + number: () => number, + rfc5322Email: () => rfc5322Email, + sha1_base64: () => sha1_base64, + sha1_base64url: () => sha1_base64url, + sha1_hex: () => sha1_hex, + sha256_base64: () => sha256_base64, + sha256_base64url: () => sha256_base64url, + sha256_hex: () => sha256_hex, + sha384_base64: () => sha384_base64, + sha384_base64url: () => sha384_base64url, + sha384_hex: () => sha384_hex, + sha512_base64: () => sha512_base64, + sha512_base64url: () => sha512_base64url, + sha512_hex: () => sha512_hex, + string: () => string, + time: () => time5, + ulid: () => ulid, + undefined: () => _undefined, + unicodeEmail: () => unicodeEmail, + uppercase: () => uppercase, + uuid: () => uuid, + uuid4: () => uuid4, + uuid6: () => uuid6, + uuid7: () => uuid7, + xid: () => xid +}); +function emoji() { + return new RegExp(_emoji, "u"); +} +function timeSource(args) { + const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`; + const regex = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`; + return regex; +} +function time5(args) { + return new RegExp(`^${timeSource(args)}$`); +} +function datetime(args) { + const time7 = timeSource({ precision: args.precision }); + const opts = ["Z"]; + if (args.local) + opts.push(""); + if (args.offset) + opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`); + const timeRegex = `${time7}(?:${opts.join("|")})`; + return new RegExp(`^${dateSource}T(?:${timeRegex})$`); +} +function fixedBase64(bodyLength, padding) { + return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`); +} +function fixedBase64url(length) { + return new RegExp(`^[A-Za-z0-9_-]{${length}}$`); +} +var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji, ipv4, ipv6, mac, cidrv4, cidrv6, base64, base64url, hostname, domain2, e164, dateSource, date2, string, bigint2, integer2, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url; +var init_regexes = __esm({ + "../../node_modules/zod/v4/core/regexes.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + cuid = /^[cC][^\s-]{8,}$/; + cuid2 = /^[0-9a-z]+$/; + ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; + xid = /^[0-9a-vA-V]{20}$/; + ksuid = /^[A-Za-z0-9]{27}$/; + nanoid = /^[a-zA-Z0-9_-]{21}$/; + duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; + extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; + guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; + uuid = /* @__PURE__ */ __name((version4) => { + if (!version4) + return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; + return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version4}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); + }, "uuid"); + uuid4 = /* @__PURE__ */ uuid(4); + uuid6 = /* @__PURE__ */ uuid(6); + uuid7 = /* @__PURE__ */ uuid(7); + email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; + html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; + rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u; + idnEmail = unicodeEmail; + browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; + _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; + __name(emoji, "emoji"); + ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; + ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/; + mac = /* @__PURE__ */ __name((delimiter) => { + const escapedDelim = escapeRegex(delimiter ?? ":"); + return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`); + }, "mac"); + cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; + cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; + base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; + base64url = /^[A-Za-z0-9_-]*$/; + hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/; + domain2 = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/; + e164 = /^\+[1-9]\d{6,14}$/; + dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; + date2 = /* @__PURE__ */ new RegExp(`^${dateSource}$`); + __name(timeSource, "timeSource"); + __name(time5, "time"); + __name(datetime, "datetime"); + string = /* @__PURE__ */ __name((params) => { + const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; + return new RegExp(`^${regex}$`); + }, "string"); + bigint2 = /^-?\d+n?$/; + integer2 = /^-?\d+$/; + number = /^-?\d+(?:\.\d+)?$/; + boolean = /^(?:true|false)$/i; + _null = /^null$/i; + _undefined = /^undefined$/i; + lowercase = /^[^A-Z]*$/; + uppercase = /^[^a-z]*$/; + hex = /^[0-9a-fA-F]*$/; + __name(fixedBase64, "fixedBase64"); + __name(fixedBase64url, "fixedBase64url"); + md5_hex = /^[0-9a-fA-F]{32}$/; + md5_base64 = /* @__PURE__ */ fixedBase64(22, "=="); + md5_base64url = /* @__PURE__ */ fixedBase64url(22); + sha1_hex = /^[0-9a-fA-F]{40}$/; + sha1_base64 = /* @__PURE__ */ fixedBase64(27, "="); + sha1_base64url = /* @__PURE__ */ fixedBase64url(27); + sha256_hex = /^[0-9a-fA-F]{64}$/; + sha256_base64 = /* @__PURE__ */ fixedBase64(43, "="); + sha256_base64url = /* @__PURE__ */ fixedBase64url(43); + sha384_hex = /^[0-9a-fA-F]{96}$/; + sha384_base64 = /* @__PURE__ */ fixedBase64(64, ""); + sha384_base64url = /* @__PURE__ */ fixedBase64url(64); + sha512_hex = /^[0-9a-fA-F]{128}$/; + sha512_base64 = /* @__PURE__ */ fixedBase64(86, "=="); + sha512_base64url = /* @__PURE__ */ fixedBase64url(86); + } +}); + +// ../../node_modules/zod/v4/core/checks.js +function handleCheckPropertyResult(result, payload, property) { + if (result.issues.length) { + payload.issues.push(...prefixIssues(property, result.issues)); + } +} +var $ZodCheck, numericOriginMap, $ZodCheckLessThan, $ZodCheckGreaterThan, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckBigIntFormat, $ZodCheckMaxSize, $ZodCheckMinSize, $ZodCheckSizeEquals, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckLengthEquals, $ZodCheckStringFormat, $ZodCheckRegex, $ZodCheckLowerCase, $ZodCheckUpperCase, $ZodCheckIncludes, $ZodCheckStartsWith, $ZodCheckEndsWith, $ZodCheckProperty, $ZodCheckMimeType, $ZodCheckOverwrite; +var init_checks2 = __esm({ + "../../node_modules/zod/v4/core/checks.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core2(); + init_regexes(); + init_util3(); + $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { + var _a124; + inst._zod ?? (inst._zod = {}); + inst._zod.def = def; + (_a124 = inst._zod).onattach ?? (_a124.onattach = []); + }); + numericOriginMap = { + number: "number", + bigint: "bigint", + object: "date" + }; + $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => { + $ZodCheck.init(inst, def); + const origin2 = numericOriginMap[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; + if (def.value < curr) { + if (def.inclusive) + bag.maximum = def.value; + else + bag.exclusiveMaximum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value <= def.value : payload.value < def.value) { + return; + } + payload.issues.push({ + origin: origin2, + code: "too_big", + maximum: typeof def.value === "object" ? def.value.getTime() : def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => { + $ZodCheck.init(inst, def); + const origin2 = numericOriginMap[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; + if (def.value > curr) { + if (def.inclusive) + bag.minimum = def.value; + else + bag.exclusiveMinimum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value >= def.value : payload.value > def.value) { + return; + } + payload.issues.push({ + origin: origin2, + code: "too_small", + minimum: typeof def.value === "object" ? def.value.getTime() : def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.onattach.push((inst2) => { + var _a124; + (_a124 = inst2._zod.bag).multipleOf ?? (_a124.multipleOf = def.value); + }); + inst._zod.check = (payload) => { + if (typeof payload.value !== typeof def.value) + throw new Error("Cannot mix number and bigint in multiple_of check."); + const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0; + if (isMultiple) + return; + payload.issues.push({ + origin: typeof payload.value, + code: "not_multiple_of", + divisor: def.value, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => { + $ZodCheck.init(inst, def); + def.format = def.format || "float64"; + const isInt = def.format?.includes("int"); + const origin2 = isInt ? "int" : "number"; + const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + if (isInt) + bag.pattern = integer2; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (isInt) { + if (!Number.isInteger(input)) { + payload.issues.push({ + expected: origin2, + format: def.format, + code: "invalid_type", + continue: false, + input, + inst + }); + return; + } + if (!Number.isSafeInteger(input)) { + if (input > 0) { + payload.issues.push({ + input, + code: "too_big", + maximum: Number.MAX_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin: origin2, + inclusive: true, + continue: !def.abort + }); + } else { + payload.issues.push({ + input, + code: "too_small", + minimum: Number.MIN_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin: origin2, + inclusive: true, + continue: !def.abort + }); + } + return; + } + } + if (input < minimum) { + payload.issues.push({ + origin: "number", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "number", + input, + code: "too_big", + maximum, + inclusive: true, + inst, + continue: !def.abort + }); + } + }; + }); + $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat", (inst, def) => { + $ZodCheck.init(inst, def); + const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (input < minimum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_big", + maximum, + inclusive: true, + inst, + continue: !def.abort + }); + } + }; + }); + $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size <= def.maximum) + return; + payload.issues.push({ + origin: getSizableOrigin(input), + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size >= def.minimum) + return; + payload.issues.push({ + origin: getSizableOrigin(input), + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.size; + bag.maximum = def.size; + bag.size = def.size; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size === def.size) + return; + const tooBig = size > def.size; + payload.issues.push({ + origin: getSizableOrigin(input), + ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length <= def.maximum) + return; + const origin2 = getLengthableOrigin(input); + payload.issues.push({ + origin: origin2, + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length >= def.minimum) + return; + const origin2 = getLengthableOrigin(input); + payload.issues.push({ + origin: origin2, + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => { + var _a124; + $ZodCheck.init(inst, def); + (_a124 = inst._zod.def).when ?? (_a124.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.length; + bag.maximum = def.length; + bag.length = def.length; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length === def.length) + return; + const origin2 = getLengthableOrigin(input); + const tooBig = length > def.length; + payload.issues.push({ + origin: origin2, + ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => { + var _a124, _b; + $ZodCheck.init(inst, def); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + if (def.pattern) { + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(def.pattern); + } + }); + if (def.pattern) + (_a124 = inst._zod).check ?? (_a124.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: def.format, + input: payload.value, + ...def.pattern ? { pattern: def.pattern.toString() } : {}, + inst, + continue: !def.abort + }); + }); + else + (_b = inst._zod).check ?? (_b.check = () => { + }); + }); + $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => { + $ZodCheckStringFormat.init(inst, def); + inst._zod.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "regex", + input: payload.value, + pattern: def.pattern.toString(), + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => { + def.pattern ?? (def.pattern = lowercase); + $ZodCheckStringFormat.init(inst, def); + }); + $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => { + def.pattern ?? (def.pattern = uppercase); + $ZodCheckStringFormat.init(inst, def); + }); + $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => { + $ZodCheck.init(inst, def); + const escapedRegex = escapeRegex(def.includes); + const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex); + def.pattern = pattern; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.includes(def.includes, def.position)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "includes", + includes: def.includes, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => { + $ZodCheck.init(inst, def); + const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.startsWith(def.prefix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "starts_with", + prefix: def.prefix, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => { + $ZodCheck.init(inst, def); + const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.endsWith(def.suffix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "ends_with", + suffix: def.suffix, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + __name(handleCheckPropertyResult, "handleCheckPropertyResult"); + $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.check = (payload) => { + const result = def.schema._zod.run({ + value: payload.value[def.property], + issues: [] + }, {}); + if (result instanceof Promise) { + return result.then((result2) => handleCheckPropertyResult(result2, payload, def.property)); + } + handleCheckPropertyResult(result, payload, def.property); + return; + }; + }); + $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => { + $ZodCheck.init(inst, def); + const mimeSet = new Set(def.mime); + inst._zod.onattach.push((inst2) => { + inst2._zod.bag.mime = def.mime; + }); + inst._zod.check = (payload) => { + if (mimeSet.has(payload.value.type)) + return; + payload.issues.push({ + code: "invalid_value", + values: def.mime, + input: payload.value.type, + inst, + continue: !def.abort + }); + }; + }); + $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.check = (payload) => { + payload.value = def.tx(payload.value); + }; + }); + } +}); + +// ../../node_modules/zod/v4/core/doc.js +var Doc; +var init_doc = __esm({ + "../../node_modules/zod/v4/core/doc.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Doc = class { + constructor(args = []) { + this.content = []; + this.indent = 0; + if (this) + this.args = args; + } + indented(fn) { + this.indent += 1; + fn(this); + this.indent -= 1; + } + write(arg) { + if (typeof arg === "function") { + arg(this, { execution: "sync" }); + arg(this, { execution: "async" }); + return; + } + const content = arg; + const lines = content.split("\n").filter((x2) => x2); + const minIndent = Math.min(...lines.map((x2) => x2.length - x2.trimStart().length)); + const dedented = lines.map((x2) => x2.slice(minIndent)).map((x2) => " ".repeat(this.indent * 2) + x2); + for (const line of dedented) { + this.content.push(line); + } + } + compile() { + const F2 = Function; + const args = this?.args; + const content = this?.content ?? [``]; + const lines = [...content.map((x2) => ` ${x2}`)]; + return new F2(...args, lines.join("\n")); + } + }; + __name(Doc, "Doc"); + } +}); + +// ../../node_modules/zod/v4/core/versions.js +var version3; +var init_versions = __esm({ + "../../node_modules/zod/v4/core/versions.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + version3 = { + major: 4, + minor: 3, + patch: 6 + }; + } +}); + +// ../../node_modules/zod/v4/core/schemas.js +function isValidBase64(data) { + if (data === "") + return true; + if (data.length % 4 !== 0) + return false; + try { + atob(data); + return true; + } catch { + return false; + } +} +function isValidBase64URL(data) { + if (!base64url.test(data)) + return false; + const base643 = data.replace(/[-_]/g, (c2) => c2 === "-" ? "+" : "/"); + const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "="); + return isValidBase64(padded); +} +function isValidJWT(token, algorithm = null) { + try { + const tokensParts = token.split("."); + if (tokensParts.length !== 3) + return false; + const [header] = tokensParts; + if (!header) + return false; + const parsedHeader = JSON.parse(atob(header)); + if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") + return false; + if (!parsedHeader.alg) + return false; + if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) + return false; + return true; + } catch { + return false; + } +} +function handleArrayResult(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues(index, result.issues)); + } + final.value[index] = result.value; +} +function handlePropertyResult(result, final, key, input, isOptionalOut) { + if (result.issues.length) { + if (isOptionalOut && !(key in input)) { + return; + } + final.issues.push(...prefixIssues(key, result.issues)); + } + if (result.value === void 0) { + if (key in input) { + final.value[key] = void 0; + } + } else { + final.value[key] = result.value; + } +} +function normalizeDef(def) { + const keys = Object.keys(def.shape); + for (const k2 of keys) { + if (!def.shape?.[k2]?._zod?.traits?.has("$ZodType")) { + throw new Error(`Invalid element at key "${k2}": expected a Zod schema`); + } + } + const okeys = optionalKeys(def.shape); + return { + ...def, + keys, + keySet: new Set(keys), + numKeys: keys.length, + optionalKeys: new Set(okeys) + }; +} +function handleCatchall(proms, input, payload, ctx, def, inst) { + const unrecognized = []; + const keySet = def.keySet; + const _catchall = def.catchall._zod; + const t9 = _catchall.def.type; + const isOptionalOut = _catchall.optout === "optional"; + for (const key in input) { + if (keySet.has(key)) + continue; + if (t9 === "never") { + unrecognized.push(key); + continue; + } + const r2 = _catchall.run({ value: input[key], issues: [] }, ctx); + if (r2 instanceof Promise) { + proms.push(r2.then((r3) => handlePropertyResult(r3, payload, key, input, isOptionalOut))); + } else { + handlePropertyResult(r2, payload, key, input, isOptionalOut); + } + } + if (unrecognized.length) { + payload.issues.push({ + code: "unrecognized_keys", + keys: unrecognized, + input, + inst + }); + } + if (!proms.length) + return payload; + return Promise.all(proms).then(() => { + return payload; + }); +} +function handleUnionResults(results, final, inst, ctx) { + for (const result of results) { + if (result.issues.length === 0) { + final.value = result.value; + return final; + } + } + const nonaborted = results.filter((r2) => !aborted(r2)); + if (nonaborted.length === 1) { + final.value = nonaborted[0].value; + return nonaborted[0]; + } + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))) + }); + return final; +} +function handleExclusiveUnionResults(results, final, inst, ctx) { + const successes = results.filter((r2) => r2.issues.length === 0); + if (successes.length === 1) { + final.value = successes[0].value; + return final; + } + if (successes.length === 0) { + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config2()))) + }); + } else { + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: [], + inclusive: false + }); + } + return final; +} +function mergeValues(a2, b2) { + if (a2 === b2) { + return { valid: true, data: a2 }; + } + if (a2 instanceof Date && b2 instanceof Date && +a2 === +b2) { + return { valid: true, data: a2 }; + } + if (isPlainObject2(a2) && isPlainObject2(b2)) { + const bKeys = Object.keys(b2); + const sharedKeys = Object.keys(a2).filter((key) => bKeys.indexOf(key) !== -1); + const newObj = { ...a2, ...b2 }; + for (const key of sharedKeys) { + const sharedValue = mergeValues(a2[key], b2[key]); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [key, ...sharedValue.mergeErrorPath] + }; + } + newObj[key] = sharedValue.data; + } + return { valid: true, data: newObj }; + } + if (Array.isArray(a2) && Array.isArray(b2)) { + if (a2.length !== b2.length) { + return { valid: false, mergeErrorPath: [] }; + } + const newArray = []; + for (let index = 0; index < a2.length; index++) { + const itemA = a2[index]; + const itemB = b2[index]; + const sharedValue = mergeValues(itemA, itemB); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [index, ...sharedValue.mergeErrorPath] + }; + } + newArray.push(sharedValue.data); + } + return { valid: true, data: newArray }; + } + return { valid: false, mergeErrorPath: [] }; +} +function handleIntersectionResults(result, left, right) { + const unrecKeys = /* @__PURE__ */ new Map(); + let unrecIssue; + for (const iss of left.issues) { + if (iss.code === "unrecognized_keys") { + unrecIssue ?? (unrecIssue = iss); + for (const k2 of iss.keys) { + if (!unrecKeys.has(k2)) + unrecKeys.set(k2, {}); + unrecKeys.get(k2).l = true; + } + } else { + result.issues.push(iss); + } + } + for (const iss of right.issues) { + if (iss.code === "unrecognized_keys") { + for (const k2 of iss.keys) { + if (!unrecKeys.has(k2)) + unrecKeys.set(k2, {}); + unrecKeys.get(k2).r = true; + } + } else { + result.issues.push(iss); + } + } + const bothKeys = [...unrecKeys].filter(([, f2]) => f2.l && f2.r).map(([k2]) => k2); + if (bothKeys.length && unrecIssue) { + result.issues.push({ ...unrecIssue, keys: bothKeys }); + } + if (aborted(result)) + return result; + const merged = mergeValues(left.value, right.value); + if (!merged.valid) { + throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`); + } + result.value = merged.data; + return result; +} +function handleTupleResult(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues(index, result.issues)); + } + final.value[index] = result.value; +} +function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) { + if (keyResult.issues.length) { + if (propertyKeyTypes.has(typeof key)) { + final.issues.push(...prefixIssues(key, keyResult.issues)); + } else { + final.issues.push({ + code: "invalid_key", + origin: "map", + input, + inst, + issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config2())) + }); + } + } + if (valueResult.issues.length) { + if (propertyKeyTypes.has(typeof key)) { + final.issues.push(...prefixIssues(key, valueResult.issues)); + } else { + final.issues.push({ + origin: "map", + code: "invalid_element", + input, + inst, + key, + issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config2())) + }); + } + } + final.value.set(keyResult.value, valueResult.value); +} +function handleSetResult(result, final) { + if (result.issues.length) { + final.issues.push(...result.issues); + } + final.value.add(result.value); +} +function handleOptionalResult(result, input) { + if (result.issues.length && input === void 0) { + return { issues: [], value: void 0 }; + } + return result; +} +function handleDefaultResult(payload, def) { + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return payload; +} +function handleNonOptionalResult(payload, inst) { + if (!payload.issues.length && payload.value === void 0) { + payload.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: payload.value, + inst + }); + } + return payload; +} +function handlePipeResult(left, next, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return next._zod.run({ value: left.value, issues: left.issues }, ctx); +} +function handleCodecAResult(result, def, ctx) { + if (result.issues.length) { + result.aborted = true; + return result; + } + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const transformed = def.transform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx)); + } + return handleCodecTxResult(result, transformed, def.out, ctx); + } else { + const transformed = def.reverseTransform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx)); + } + return handleCodecTxResult(result, transformed, def.in, ctx); + } +} +function handleCodecTxResult(left, value, nextSchema, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return nextSchema._zod.run({ value, issues: left.issues }, ctx); +} +function handleReadonlyResult(payload) { + payload.value = Object.freeze(payload.value); + return payload; +} +function handleRefineResult(result, payload, input, inst) { + if (!result) { + const _iss = { + code: "custom", + input, + inst, + // incorporates params.error into issue reporting + path: [...inst._zod.def.path ?? []], + // incorporates params.error into issue reporting + continue: !inst._zod.def.abort + // params: inst._zod.def.params, + }; + if (inst._zod.def.params) + _iss.params = inst._zod.def.params; + payload.issues.push(issue(_iss)); + } +} +var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom; +var init_schemas = __esm({ + "../../node_modules/zod/v4/core/schemas.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_checks2(); + init_core2(); + init_doc(); + init_parse(); + init_regexes(); + init_util3(); + init_versions(); + init_util3(); + $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { + var _a124; + inst ?? (inst = {}); + inst._zod.def = def; + inst._zod.bag = inst._zod.bag || {}; + inst._zod.version = version3; + const checks = [...inst._zod.def.checks ?? []]; + if (inst._zod.traits.has("$ZodCheck")) { + checks.unshift(inst); + } + for (const ch2 of checks) { + for (const fn of ch2._zod.onattach) { + fn(inst); + } + } + if (checks.length === 0) { + (_a124 = inst._zod).deferred ?? (_a124.deferred = []); + inst._zod.deferred?.push(() => { + inst._zod.run = inst._zod.parse; + }); + } else { + const runChecks = /* @__PURE__ */ __name((payload, checks2, ctx) => { + let isAborted = aborted(payload); + let asyncResult; + for (const ch2 of checks2) { + if (ch2._zod.def.when) { + const shouldRun = ch2._zod.def.when(payload); + if (!shouldRun) + continue; + } else if (isAborted) { + continue; + } + const currLen = payload.issues.length; + const _ = ch2._zod.check(payload); + if (_ instanceof Promise && ctx?.async === false) { + throw new $ZodAsyncError(); + } + if (asyncResult || _ instanceof Promise) { + asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { + await _; + const nextLen = payload.issues.length; + if (nextLen === currLen) + return; + if (!isAborted) + isAborted = aborted(payload, currLen); + }); + } else { + const nextLen = payload.issues.length; + if (nextLen === currLen) + continue; + if (!isAborted) + isAborted = aborted(payload, currLen); + } + } + if (asyncResult) { + return asyncResult.then(() => { + return payload; + }); + } + return payload; + }, "runChecks"); + const handleCanaryResult = /* @__PURE__ */ __name((canary, payload, ctx) => { + if (aborted(canary)) { + canary.aborted = true; + return canary; + } + const checkResult = runChecks(payload, checks, ctx); + if (checkResult instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx)); + } + return inst._zod.parse(checkResult, ctx); + }, "handleCanaryResult"); + inst._zod.run = (payload, ctx) => { + if (ctx.skipChecks) { + return inst._zod.parse(payload, ctx); + } + if (ctx.direction === "backward") { + const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true }); + if (canary instanceof Promise) { + return canary.then((canary2) => { + return handleCanaryResult(canary2, payload, ctx); + }); + } + return handleCanaryResult(canary, payload, ctx); + } + const result = inst._zod.parse(payload, ctx); + if (result instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return result.then((result2) => runChecks(result2, checks, ctx)); + } + return runChecks(result, checks, ctx); + }; + } + defineLazy(inst, "~standard", () => ({ + validate: (value) => { + try { + const r2 = safeParse(inst, value); + return r2.success ? { value: r2.data } : { issues: r2.error?.issues }; + } catch (_) { + return safeParseAsync(inst, value).then((r2) => r2.success ? { value: r2.data } : { issues: r2.error?.issues }); + } + }, + vendor: "zod", + version: 1 + })); + }); + $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag); + inst._zod.parse = (payload, _) => { + if (def.coerce) + try { + payload.value = String(payload.value); + } catch (_2) { + } + if (typeof payload.value === "string") + return payload; + payload.issues.push({ + expected: "string", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; + }); + $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => { + $ZodCheckStringFormat.init(inst, def); + $ZodString.init(inst, def); + }); + $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => { + def.pattern ?? (def.pattern = guid); + $ZodStringFormat.init(inst, def); + }); + $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => { + if (def.version) { + const versionMap = { + v1: 1, + v2: 2, + v3: 3, + v4: 4, + v5: 5, + v6: 6, + v7: 7, + v8: 8 + }; + const v3 = versionMap[def.version]; + if (v3 === void 0) + throw new Error(`Invalid UUID version: "${def.version}"`); + def.pattern ?? (def.pattern = uuid(v3)); + } else + def.pattern ?? (def.pattern = uuid()); + $ZodStringFormat.init(inst, def); + }); + $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => { + def.pattern ?? (def.pattern = email); + $ZodStringFormat.init(inst, def); + }); + $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + try { + const trimmed = payload.value.trim(); + const url2 = new URL(trimmed); + if (def.hostname) { + def.hostname.lastIndex = 0; + if (!def.hostname.test(url2.hostname)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid hostname", + pattern: def.hostname.source, + input: payload.value, + inst, + continue: !def.abort + }); + } + } + if (def.protocol) { + def.protocol.lastIndex = 0; + if (!def.protocol.test(url2.protocol.endsWith(":") ? url2.protocol.slice(0, -1) : url2.protocol)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid protocol", + pattern: def.protocol.source, + input: payload.value, + inst, + continue: !def.abort + }); + } + } + if (def.normalize) { + payload.value = url2.href; + } else { + payload.value = trimmed; + } + return; + } catch (_) { + payload.issues.push({ + code: "invalid_format", + format: "url", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; + }); + $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => { + def.pattern ?? (def.pattern = emoji()); + $ZodStringFormat.init(inst, def); + }); + $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => { + def.pattern ?? (def.pattern = nanoid); + $ZodStringFormat.init(inst, def); + }); + $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => { + def.pattern ?? (def.pattern = cuid); + $ZodStringFormat.init(inst, def); + }); + $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => { + def.pattern ?? (def.pattern = cuid2); + $ZodStringFormat.init(inst, def); + }); + $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => { + def.pattern ?? (def.pattern = ulid); + $ZodStringFormat.init(inst, def); + }); + $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => { + def.pattern ?? (def.pattern = xid); + $ZodStringFormat.init(inst, def); + }); + $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => { + def.pattern ?? (def.pattern = ksuid); + $ZodStringFormat.init(inst, def); + }); + $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => { + def.pattern ?? (def.pattern = datetime(def)); + $ZodStringFormat.init(inst, def); + }); + $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => { + def.pattern ?? (def.pattern = date2); + $ZodStringFormat.init(inst, def); + }); + $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => { + def.pattern ?? (def.pattern = time5(def)); + $ZodStringFormat.init(inst, def); + }); + $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => { + def.pattern ?? (def.pattern = duration); + $ZodStringFormat.init(inst, def); + }); + $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => { + def.pattern ?? (def.pattern = ipv4); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `ipv4`; + }); + $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => { + def.pattern ?? (def.pattern = ipv6); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `ipv6`; + inst._zod.check = (payload) => { + try { + new URL(`http://[${payload.value}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "ipv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; + }); + $ZodMAC = /* @__PURE__ */ $constructor("$ZodMAC", (inst, def) => { + def.pattern ?? (def.pattern = mac(def.delimiter)); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `mac`; + }); + $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => { + def.pattern ?? (def.pattern = cidrv4); + $ZodStringFormat.init(inst, def); + }); + $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => { + def.pattern ?? (def.pattern = cidrv6); + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + const parts = payload.value.split("/"); + try { + if (parts.length !== 2) + throw new Error(); + const [address, prefix] = parts; + if (!prefix) + throw new Error(); + const prefixNum = Number(prefix); + if (`${prefixNum}` !== prefix) + throw new Error(); + if (prefixNum < 0 || prefixNum > 128) + throw new Error(); + new URL(`http://[${address}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "cidrv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; + }); + __name(isValidBase64, "isValidBase64"); + $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => { + def.pattern ?? (def.pattern = base64); + $ZodStringFormat.init(inst, def); + inst._zod.bag.contentEncoding = "base64"; + inst._zod.check = (payload) => { + if (isValidBase64(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64", + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + __name(isValidBase64URL, "isValidBase64URL"); + $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => { + def.pattern ?? (def.pattern = base64url); + $ZodStringFormat.init(inst, def); + inst._zod.bag.contentEncoding = "base64url"; + inst._zod.check = (payload) => { + if (isValidBase64URL(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64url", + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => { + def.pattern ?? (def.pattern = e164); + $ZodStringFormat.init(inst, def); + }); + __name(isValidJWT, "isValidJWT"); + $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + if (isValidJWT(payload.value, def.alg)) + return; + payload.issues.push({ + code: "invalid_format", + format: "jwt", + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + if (def.fn(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: def.format, + input: payload.value, + inst, + continue: !def.abort + }); + }; + }); + $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = inst._zod.bag.pattern ?? number; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Number(payload.value); + } catch (_) { + } + const input = payload.value; + if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) { + return payload; + } + const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0; + payload.issues.push({ + expected: "number", + code: "invalid_type", + input, + inst, + ...received ? { received } : {} + }); + return payload; + }; + }); + $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst, def) => { + $ZodCheckNumberFormat.init(inst, def); + $ZodNumber.init(inst, def); + }); + $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = boolean; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Boolean(payload.value); + } catch (_) { + } + const input = payload.value; + if (typeof input === "boolean") + return payload; + payload.issues.push({ + expected: "boolean", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = bigint2; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = BigInt(payload.value); + } catch (_) { + } + if (typeof payload.value === "bigint") + return payload; + payload.issues.push({ + expected: "bigint", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; + }); + $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, def) => { + $ZodCheckBigIntFormat.init(inst, def); + $ZodBigInt.init(inst, def); + }); + $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "symbol") + return payload; + payload.issues.push({ + expected: "symbol", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = _undefined; + inst._zod.values = /* @__PURE__ */ new Set([void 0]); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "undefined", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = _null; + inst._zod.values = /* @__PURE__ */ new Set([null]); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input === null) + return payload; + payload.issues.push({ + expected: "null", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload) => payload; + }); + $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload) => payload; + }); + $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + payload.issues.push({ + expected: "never", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; + }; + }); + $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "void", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) { + try { + payload.value = new Date(payload.value); + } catch (_err) { + } + } + const input = payload.value; + const isDate2 = input instanceof Date; + const isValidDate = isDate2 && !Number.isNaN(input.getTime()); + if (isValidDate) + return payload; + payload.issues.push({ + expected: "date", + code: "invalid_type", + input, + ...isDate2 ? { received: "Invalid Date" } : {}, + inst + }); + return payload; + }; + }); + __name(handleArrayResult, "handleArrayResult"); + $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + expected: "array", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = Array(input.length); + const proms = []; + for (let i2 = 0; i2 < input.length; i2++) { + const item = input[i2]; + const result = def.element._zod.run({ + value: item, + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleArrayResult(result2, payload, i2))); + } else { + handleArrayResult(result, payload, i2); + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; + }); + __name(handlePropertyResult, "handlePropertyResult"); + __name(normalizeDef, "normalizeDef"); + __name(handleCatchall, "handleCatchall"); + $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => { + $ZodType.init(inst, def); + const desc2 = Object.getOwnPropertyDescriptor(def, "shape"); + if (!desc2?.get) { + const sh = def.shape; + Object.defineProperty(def, "shape", { + get: () => { + const newSh = { ...sh }; + Object.defineProperty(def, "shape", { + value: newSh + }); + return newSh; + } + }); + } + const _normalized = cached(() => normalizeDef(def)); + defineLazy(inst._zod, "propValues", () => { + const shape = def.shape; + const propValues = {}; + for (const key in shape) { + const field = shape[key]._zod; + if (field.values) { + propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set()); + for (const v3 of field.values) + propValues[key].add(v3); + } + } + return propValues; + }); + const isObject5 = isObject3; + const catchall = def.catchall; + let value; + inst._zod.parse = (payload, ctx) => { + value ?? (value = _normalized.value); + const input = payload.value; + if (!isObject5(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = {}; + const proms = []; + const shape = value.shape; + for (const key of value.keys) { + const el = shape[key]; + const isOptionalOut = el._zod.optout === "optional"; + const r2 = el._zod.run({ value: input[key], issues: [] }, ctx); + if (r2 instanceof Promise) { + proms.push(r2.then((r3) => handlePropertyResult(r3, payload, key, input, isOptionalOut))); + } else { + handlePropertyResult(r2, payload, key, input, isOptionalOut); + } + } + if (!catchall) { + return proms.length ? Promise.all(proms).then(() => payload) : payload; + } + return handleCatchall(proms, input, payload, ctx, _normalized.value, inst); + }; + }); + $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => { + $ZodObject.init(inst, def); + const superParse = inst._zod.parse; + const _normalized = cached(() => normalizeDef(def)); + const generateFastpass = /* @__PURE__ */ __name((shape) => { + const doc = new Doc(["shape", "payload", "ctx"]); + const normalized = _normalized.value; + const parseStr = /* @__PURE__ */ __name((key) => { + const k2 = esc(key); + return `shape[${k2}]._zod.run({ value: input[${k2}], issues: [] }, ctx)`; + }, "parseStr"); + doc.write(`const input = payload.value;`); + const ids = /* @__PURE__ */ Object.create(null); + let counter = 0; + for (const key of normalized.keys) { + ids[key] = `key_${counter++}`; + } + doc.write(`const newResult = {};`); + for (const key of normalized.keys) { + const id = ids[key]; + const k2 = esc(key); + const schema = shape[key]; + const isOptionalOut = schema?._zod?.optout === "optional"; + doc.write(`const ${id} = ${parseStr(key)};`); + if (isOptionalOut) { + doc.write(` + if (${id}.issues.length) { + if (${k2} in input) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k2}, ...iss.path] : [${k2}] + }))); + } + } + + if (${id}.value === undefined) { + if (${k2} in input) { + newResult[${k2}] = undefined; + } + } else { + newResult[${k2}] = ${id}.value; + } + + `); + } else { + doc.write(` + if (${id}.issues.length) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k2}, ...iss.path] : [${k2}] + }))); + } + + if (${id}.value === undefined) { + if (${k2} in input) { + newResult[${k2}] = undefined; + } + } else { + newResult[${k2}] = ${id}.value; + } + + `); + } + } + doc.write(`payload.value = newResult;`); + doc.write(`return payload;`); + const fn = doc.compile(); + return (payload, ctx) => fn(shape, payload, ctx); + }, "generateFastpass"); + let fastpass; + const isObject5 = isObject3; + const jit = !globalConfig.jitless; + const allowsEval2 = allowsEval; + const fastEnabled = jit && allowsEval2.value; + const catchall = def.catchall; + let value; + inst._zod.parse = (payload, ctx) => { + value ?? (value = _normalized.value); + const input = payload.value; + if (!isObject5(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) { + if (!fastpass) + fastpass = generateFastpass(def.shape); + payload = fastpass(payload, ctx); + if (!catchall) + return payload; + return handleCatchall([], input, payload, ctx, value, inst); + } + return superParse(payload, ctx); + }; + }); + __name(handleUnionResults, "handleUnionResults"); + $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.options.some((o2) => o2._zod.optin === "optional") ? "optional" : void 0); + defineLazy(inst._zod, "optout", () => def.options.some((o2) => o2._zod.optout === "optional") ? "optional" : void 0); + defineLazy(inst._zod, "values", () => { + if (def.options.every((o2) => o2._zod.values)) { + return new Set(def.options.flatMap((option) => Array.from(option._zod.values))); + } + return void 0; + }); + defineLazy(inst._zod, "pattern", () => { + if (def.options.every((o2) => o2._zod.pattern)) { + const patterns = def.options.map((o2) => o2._zod.pattern); + return new RegExp(`^(${patterns.map((p2) => cleanRegex(p2.source)).join("|")})$`); + } + return void 0; + }); + const single = def.options.length === 1; + const first = def.options[0]._zod.run; + inst._zod.parse = (payload, ctx) => { + if (single) { + return first(payload, ctx); + } + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + if (result.issues.length === 0) + return result; + results.push(result); + } + } + if (!async) + return handleUnionResults(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleUnionResults(results2, payload, inst, ctx); + }); + }; + }); + __name(handleExclusiveUnionResults, "handleExclusiveUnionResults"); + $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => { + $ZodUnion.init(inst, def); + def.inclusive = false; + const single = def.options.length === 1; + const first = def.options[0]._zod.run; + inst._zod.parse = (payload, ctx) => { + if (single) { + return first(payload, ctx); + } + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + results.push(result); + } + } + if (!async) + return handleExclusiveUnionResults(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleExclusiveUnionResults(results2, payload, inst, ctx); + }); + }; + }); + $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => { + def.inclusive = false; + $ZodUnion.init(inst, def); + const _super = inst._zod.parse; + defineLazy(inst._zod, "propValues", () => { + const propValues = {}; + for (const option of def.options) { + const pv = option._zod.propValues; + if (!pv || Object.keys(pv).length === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`); + for (const [k2, v3] of Object.entries(pv)) { + if (!propValues[k2]) + propValues[k2] = /* @__PURE__ */ new Set(); + for (const val of v3) { + propValues[k2].add(val); + } + } + } + return propValues; + }); + const disc = cached(() => { + const opts = def.options; + const map2 = /* @__PURE__ */ new Map(); + for (const o2 of opts) { + const values = o2._zod.propValues?.[def.discriminator]; + if (!values || values.size === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o2)}"`); + for (const v3 of values) { + if (map2.has(v3)) { + throw new Error(`Duplicate discriminator value "${String(v3)}"`); + } + map2.set(v3, o2); + } + } + return map2; + }); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isObject3(input)) { + payload.issues.push({ + code: "invalid_type", + expected: "object", + input, + inst + }); + return payload; + } + const opt = disc.value.get(input?.[def.discriminator]); + if (opt) { + return opt._zod.run(payload, ctx); + } + if (def.unionFallback) { + return _super(payload, ctx); + } + payload.issues.push({ + code: "invalid_union", + errors: [], + note: "No matching discriminator", + discriminator: def.discriminator, + input, + path: [def.discriminator], + inst + }); + return payload; + }; + }); + $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + const left = def.left._zod.run({ value: input, issues: [] }, ctx); + const right = def.right._zod.run({ value: input, issues: [] }, ctx); + const async = left instanceof Promise || right instanceof Promise; + if (async) { + return Promise.all([left, right]).then(([left2, right2]) => { + return handleIntersectionResults(payload, left2, right2); + }); + } + return handleIntersectionResults(payload, left, right); + }; + }); + __name(mergeValues, "mergeValues"); + __name(handleIntersectionResults, "handleIntersectionResults"); + $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => { + $ZodType.init(inst, def); + const items = def.items; + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + input, + inst, + expected: "tuple", + code: "invalid_type" + }); + return payload; + } + payload.value = []; + const proms = []; + const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional"); + const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex; + if (!def.rest) { + const tooBig = input.length > items.length; + const tooSmall = input.length < optStart - 1; + if (tooBig || tooSmall) { + payload.issues.push({ + ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length }, + input, + inst, + origin: "array" + }); + return payload; + } + } + let i2 = -1; + for (const item of items) { + i2++; + if (i2 >= input.length) { + if (i2 >= optStart) + continue; + } + const result = item._zod.run({ + value: input[i2], + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleTupleResult(result2, payload, i2))); + } else { + handleTupleResult(result, payload, i2); + } + } + if (def.rest) { + const rest = input.slice(items.length); + for (const el of rest) { + i2++; + const result = def.rest._zod.run({ + value: el, + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleTupleResult(result2, payload, i2))); + } else { + handleTupleResult(result, payload, i2); + } + } + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; + }); + __name(handleTupleResult, "handleTupleResult"); + $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isPlainObject2(input)) { + payload.issues.push({ + expected: "record", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + const values = def.keyType._zod.values; + if (values) { + payload.value = {}; + const recordKeys = /* @__PURE__ */ new Set(); + for (const key of values) { + if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") { + recordKeys.add(typeof key === "number" ? key.toString() : key); + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues(key, result2.issues)); + } + payload.value[key] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues(key, result.issues)); + } + payload.value[key] = result.value; + } + } + } + let unrecognized; + for (const key in input) { + if (!recordKeys.has(key)) { + unrecognized = unrecognized ?? []; + unrecognized.push(key); + } + } + if (unrecognized && unrecognized.length > 0) { + payload.issues.push({ + code: "unrecognized_keys", + input, + inst, + keys: unrecognized + }); + } + } else { + payload.value = {}; + for (const key of Reflect.ownKeys(input)) { + if (key === "__proto__") + continue; + let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + if (keyResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + const checkNumericKey = typeof key === "string" && number.test(key) && keyResult.issues.length; + if (checkNumericKey) { + const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx); + if (retryResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + if (retryResult.issues.length === 0) { + keyResult = retryResult; + } + } + if (keyResult.issues.length) { + if (def.mode === "loose") { + payload.value[key] = input[key]; + } else { + payload.issues.push({ + code: "invalid_key", + origin: "record", + issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config2())), + input: key, + path: [key], + inst + }); + } + continue; + } + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues(key, result2.issues)); + } + payload.value[keyResult.value] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues(key, result.issues)); + } + payload.value[keyResult.value] = result.value; + } + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; + }); + $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Map)) { + payload.issues.push({ + expected: "map", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Map(); + for (const [key, value] of input) { + const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx); + if (keyResult instanceof Promise || valueResult instanceof Promise) { + proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => { + handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx); + })); + } else { + handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx); + } + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; + }); + __name(handleMapResult, "handleMapResult"); + $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Set)) { + payload.issues.push({ + input, + inst, + expected: "set", + code: "invalid_type" + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Set(); + for (const item of input) { + const result = def.valueType._zod.run({ value: item, issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleSetResult(result2, payload))); + } else + handleSetResult(result, payload); + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; + }); + __name(handleSetResult, "handleSetResult"); + $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => { + $ZodType.init(inst, def); + const values = getEnumValues(def.entries); + const valuesSet = new Set(values); + inst._zod.values = valuesSet; + inst._zod.pattern = new RegExp(`^(${values.filter((k2) => propertyKeyTypes.has(typeof k2)).map((o2) => typeof o2 === "string" ? escapeRegex(o2) : o2.toString()).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (valuesSet.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values, + input, + inst + }); + return payload; + }; + }); + $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => { + $ZodType.init(inst, def); + if (def.values.length === 0) { + throw new Error("Cannot create literal schema with no valid values"); + } + const values = new Set(def.values); + inst._zod.values = values; + inst._zod.pattern = new RegExp(`^(${def.values.map((o2) => typeof o2 === "string" ? escapeRegex(o2) : o2 ? escapeRegex(o2.toString()) : String(o2)).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (values.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values: def.values, + input, + inst + }); + return payload; + }; + }); + $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input instanceof File) + return payload; + payload.issues.push({ + expected: "file", + code: "invalid_type", + input, + inst + }); + return payload; + }; + }); + $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } + const _out = def.transform(payload.value, payload); + if (ctx.async) { + const output = _out instanceof Promise ? _out : Promise.resolve(_out); + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + if (_out instanceof Promise) { + throw new $ZodAsyncError(); + } + payload.value = _out; + return payload; + }; + }); + __name(handleOptionalResult, "handleOptionalResult"); + $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + defineLazy(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0; + }); + defineLazy(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (def.innerType._zod.optin === "optional") { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) + return result.then((r2) => handleOptionalResult(r2, payload.value)); + return handleOptionalResult(result, payload.value); + } + if (payload.value === void 0) { + return payload; + } + return def.innerType._zod.run(payload, ctx); + }; + }); + $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (inst, def) => { + $ZodOptional.init(inst, def); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern); + inst._zod.parse = (payload, ctx) => { + return def.innerType._zod.run(payload, ctx); + }; + }); + $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0; + }); + defineLazy(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (payload.value === null) + return payload; + return def.innerType._zod.run(payload, ctx); + }; + }); + $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + return payload; + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleDefaultResult(result2, def)); + } + return handleDefaultResult(result, def); + }; + }); + __name(handleDefaultResult, "handleDefaultResult"); + $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return def.innerType._zod.run(payload, ctx); + }; + }); + $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => { + const v3 = def.innerType._zod.values; + return v3 ? new Set([...v3].filter((x2) => x2 !== void 0)) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleNonOptionalResult(result2, inst)); + } + return handleNonOptionalResult(result, inst); + }; + }); + __name(handleNonOptionalResult, "handleNonOptionalResult"); + $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError("ZodSuccess"); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.issues.length === 0; + return payload; + }); + } + payload.value = result.issues.length === 0; + return payload; + }; + }); + $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.value; + if (result2.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config2())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }); + } + payload.value = result.value; + if (result.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config2())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }; + }); + $ZodNaN = /* @__PURE__ */ $constructor("$ZodNaN", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + expected: "nan", + code: "invalid_type" + }); + return payload; + } + return payload; + }; + }); + $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => def.in._zod.values); + defineLazy(inst._zod, "optin", () => def.in._zod.optin); + defineLazy(inst._zod, "optout", () => def.out._zod.optout); + defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handlePipeResult(right2, def.in, ctx)); + } + return handlePipeResult(right, def.in, ctx); + } + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handlePipeResult(left2, def.out, ctx)); + } + return handlePipeResult(left, def.out, ctx); + }; + }); + __name(handlePipeResult, "handlePipeResult"); + $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => def.in._zod.values); + defineLazy(inst._zod, "optin", () => def.in._zod.optin); + defineLazy(inst._zod, "optout", () => def.out._zod.optout); + defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handleCodecAResult(left2, def, ctx)); + } + return handleCodecAResult(left, def, ctx); + } else { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handleCodecAResult(right2, def, ctx)); + } + return handleCodecAResult(right, def, ctx); + } + }; + }); + __name(handleCodecAResult, "handleCodecAResult"); + __name(handleCodecTxResult, "handleCodecTxResult"); + $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin); + defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then(handleReadonlyResult); + } + return handleReadonlyResult(result); + }; + }); + __name(handleReadonlyResult, "handleReadonlyResult"); + $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (inst, def) => { + $ZodType.init(inst, def); + const regexParts = []; + for (const part of def.parts) { + if (typeof part === "object" && part !== null) { + if (!part._zod.pattern) { + throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`); + } + const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern; + if (!source) + throw new Error(`Invalid template literal part: ${part._zod.traits}`); + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + regexParts.push(source.slice(start, end)); + } else if (part === null || primitiveTypes.has(typeof part)) { + regexParts.push(escapeRegex(`${part}`)); + } else { + throw new Error(`Invalid template literal part: ${part}`); + } + } + inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "string") { + payload.issues.push({ + input: payload.value, + inst, + expected: "string", + code: "invalid_type" + }); + return payload; + } + inst._zod.pattern.lastIndex = 0; + if (!inst._zod.pattern.test(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + code: "invalid_format", + format: def.format ?? "template_literal", + pattern: inst._zod.pattern.source + }); + return payload; + } + return payload; + }; + }); + $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => { + $ZodType.init(inst, def); + inst._def = def; + inst._zod.def = def; + inst.implement = (func) => { + if (typeof func !== "function") { + throw new Error("implement() must be called with a function"); + } + return function(...args) { + const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args; + const result = Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return parse(inst._def.output, result); + } + return result; + }; + }; + inst.implementAsync = (func) => { + if (typeof func !== "function") { + throw new Error("implementAsync() must be called with a function"); + } + return async function(...args) { + const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args; + const result = await Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return await parseAsync(inst._def.output, result); + } + return result; + }; + }; + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "function") { + payload.issues.push({ + code: "invalid_type", + expected: "function", + input: payload.value, + inst + }); + return payload; + } + const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise"; + if (hasPromiseOutput) { + payload.value = inst.implementAsync(payload.value); + } else { + payload.value = inst.implement(payload.value); + } + return payload; + }; + inst.input = (...args) => { + const F2 = inst.constructor; + if (Array.isArray(args[0])) { + return new F2({ + type: "function", + input: new $ZodTuple({ + type: "tuple", + items: args[0], + rest: args[1] + }), + output: inst._def.output + }); + } + return new F2({ + type: "function", + input: args[0], + output: inst._def.output + }); + }; + inst.output = (output) => { + const F2 = inst.constructor; + return new F2({ + type: "function", + input: inst._def.input, + output + }); + }; + return inst; + }); + $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx)); + }; + }); + $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "innerType", () => def.getter()); + defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern); + defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues); + defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0); + defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0); + inst._zod.parse = (payload, ctx) => { + const inner = inst._zod.innerType; + return inner._zod.run(payload, ctx); + }; + }); + $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => { + $ZodCheck.init(inst, def); + $ZodType.init(inst, def); + inst._zod.parse = (payload, _) => { + return payload; + }; + inst._zod.check = (payload) => { + const input = payload.value; + const r2 = def.fn(input); + if (r2 instanceof Promise) { + return r2.then((r3) => handleRefineResult(r3, payload, input, inst)); + } + handleRefineResult(r2, payload, input, inst); + return; + }; + }); + __name(handleRefineResult, "handleRefineResult"); + } +}); + +// ../../node_modules/zod/v4/locales/ar.js +function ar_default() { + return { + localeError: error3() + }; +} +var error3; +var init_ar = __esm({ + "../../node_modules/zod/v4/locales/ar.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error3 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + file: { unit: "\u0628\u0627\u064A\u062A", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + array: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + set: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0645\u062F\u062E\u0644", + email: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A", + url: "\u0631\u0627\u0628\u0637", + emoji: "\u0625\u064A\u0645\u0648\u062C\u064A", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + date: "\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + time: "\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + duration: "\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + ipv4: "\u0639\u0646\u0648\u0627\u0646 IPv4", + ipv6: "\u0639\u0646\u0648\u0627\u0646 IPv6", + cidrv4: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4", + cidrv6: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6", + base64: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded", + base64url: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded", + json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON", + e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164", + jwt: "JWT", + template_literal: "\u0645\u062F\u062E\u0644" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${issue2.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; + } + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`; + return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue2.prefix}"`; + if (_issue.format === "ends_with") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`; + } + case "not_multiple_of": + return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue2.divisor}`; + case "unrecognized_keys": + return `\u0645\u0639\u0631\u0641${issue2.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue2.keys.length > 1 ? "\u0629" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; + case "invalid_key": + return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; + case "invalid_union": + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; + case "invalid_element": + return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; + default: + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; + } + }; + }, "error"); + __name(ar_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/az.js +function az_default() { + return { + localeError: error4() + }; +} +var error4; +var init_az = __esm({ + "../../node_modules/zod/v4/locales/az.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error4 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "element", verb: "olmal\u0131d\u0131r" }, + set: { unit: "element", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${issue2.expected}, daxil olan ${received}`; + } + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${expected}, daxil olan ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive(issue2.values[0])}`; + return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`; + if (_issue.format === "ends_with") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.suffix}" il\u0259 bitm\u0259lidir`; + if (_issue.format === "includes") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.includes}" daxil olmal\u0131d\u0131r`; + if (_issue.format === "regex") + return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`; + return `Yanl\u0131\u015F ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Yanl\u0131\u015F \u0259d\u0259d: ${issue2.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; + case "unrecognized_keys": + return `Tan\u0131nmayan a\xE7ar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; + case "invalid_union": + return "Yanl\u0131\u015F d\u0259y\u0259r"; + case "invalid_element": + return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; + default: + return `Yanl\u0131\u015F d\u0259y\u0259r`; + } + }; + }, "error"); + __name(az_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/be.js +function getBelarusianPlural(count4, one, few, many) { + const absCount = Math.abs(count4); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; + } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; +} +function be_default() { + return { + localeError: error5() + }; +} +var error5; +var init_be = __esm({ + "../../node_modules/zod/v4/locales/be.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + __name(getBelarusianPlural, "getBelarusianPlural"); + error5 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0456\u043C\u0432\u0430\u043B", + few: "\u0441\u0456\u043C\u0432\u0430\u043B\u044B", + many: "\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u044B", + many: "\u0431\u0430\u0439\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0443\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0430\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0447\u0430\u0441", + duration: "ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0430\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0430\u0441", + cidrv4: "IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + base64: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64", + base64url: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url", + json_string: "JSON \u0440\u0430\u0434\u043E\u043A", + e164: "\u043D\u0443\u043C\u0430\u0440 E.164", + jwt: "JWT", + template_literal: "\u0443\u0432\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u043B\u0456\u043A", + array: "\u043C\u0430\u0441\u0456\u045E" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${issue2.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; + } + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const maxValue = Number(issue2.maximum); + const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.maximum.toString()} ${unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const minValue = Number(issue2.minimum); + const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.minimum.toString()} ${unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue2.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"; + case "invalid_element": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue2.origin}`; + default: + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`; + } + }; + }, "error"); + __name(be_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/bg.js +function bg_default() { + return { + localeError: error6() + }; +} +var error6; +var init_bg = __esm({ + "../../node_modules/zod/v4/locales/bg.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error6 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0432\u0445\u043E\u0434", + email: "\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u0435\u043C\u043E\u0434\u0436\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + base64url: "base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + json_string: "JSON \u043D\u0438\u0437", + e164: "E.164 \u043D\u043E\u043C\u0435\u0440", + jwt: "JWT", + template_literal: "\u0432\u0445\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0438\u0432" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; + } + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`; + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue2.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`; + let invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D"; + if (_issue.format === "emoji") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "datetime") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "date") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + if (_issue.format === "time") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "duration") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue2.keys.length > 1 ? "\u0438" : ""} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u043E\u0432\u0435" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"; + case "invalid_element": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue2.origin}`; + default: + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`; + } + }; + }, "error"); + __name(bg_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ca.js +function ca_default() { + return { + localeError: error7() + }; +} +var error7; +var init_ca = __esm({ + "../../node_modules/zod/v4/locales/ca.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error7 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "car\xE0cters", verb: "contenir" }, + file: { unit: "bytes", verb: "contenir" }, + array: { unit: "elements", verb: "contenir" }, + set: { unit: "elements", verb: "contenir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "entrada", + email: "adre\xE7a electr\xF2nica", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "durada ISO", + ipv4: "adre\xE7a IPv4", + ipv6: "adre\xE7a IPv6", + cidrv4: "rang IPv4", + cidrv6: "rang IPv6", + base64: "cadena codificada en base64", + base64url: "cadena codificada en base64url", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Tipus inv\xE0lid: s'esperava instanceof ${issue2.expected}, s'ha rebut ${received}`; + } + return `Tipus inv\xE0lid: s'esperava ${expected}, s'ha rebut ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive(issue2.values[0])}`; + return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues(issue2.values, " o ")}`; + case "too_big": { + const adj = issue2.inclusive ? "com a m\xE0xim" : "menys de"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} contingu\xE9s ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} fos ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "com a m\xEDnim" : "m\xE9s de"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Massa petit: s'esperava que ${issue2.origin} contingu\xE9s ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Massa petit: s'esperava que ${issue2.origin} fos ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Format inv\xE0lid: ha d'acabar amb "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Format inv\xE0lid: ha d'incloure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${_issue.pattern}`; + return `Format inv\xE0lid per a ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Clau${issue2.keys.length > 1 ? "s" : ""} no reconeguda${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Clau inv\xE0lida a ${issue2.origin}`; + case "invalid_union": + return "Entrada inv\xE0lida"; + case "invalid_element": + return `Element inv\xE0lid a ${issue2.origin}`; + default: + return `Entrada inv\xE0lida`; + } + }; + }, "error"); + __name(ca_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/cs.js +function cs_default() { + return { + localeError: error8() + }; +} +var error8; +var init_cs = __esm({ + "../../node_modules/zod/v4/locales/cs.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error8 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "znak\u016F", verb: "m\xEDt" }, + file: { unit: "bajt\u016F", verb: "m\xEDt" }, + array: { unit: "prvk\u016F", verb: "m\xEDt" }, + set: { unit: "prvk\u016F", verb: "m\xEDt" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "regul\xE1rn\xED v\xFDraz", + email: "e-mailov\xE1 adresa", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "datum a \u010Das ve form\xE1tu ISO", + date: "datum ve form\xE1tu ISO", + time: "\u010Das ve form\xE1tu ISO", + duration: "doba trv\xE1n\xED ISO", + ipv4: "IPv4 adresa", + ipv6: "IPv6 adresa", + cidrv4: "rozsah IPv4", + cidrv6: "rozsah IPv6", + base64: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64", + base64url: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url", + json_string: "\u0159et\u011Bzec ve form\xE1tu JSON", + e164: "\u010D\xEDslo E.164", + jwt: "JWT", + template_literal: "vstup" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u010D\xEDslo", + string: "\u0159et\u011Bzec", + function: "funkce", + array: "pole" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${issue2.expected}, obdr\u017Eeno ${received}`; + } + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${expected}, obdr\u017Eeno ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive(issue2.values[0])}`; + return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${_issue.pattern}`; + return `Neplatn\xFD form\xE1t ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue2.divisor}`; + case "unrecognized_keys": + return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Neplatn\xFD kl\xED\u010D v ${issue2.origin}`; + case "invalid_union": + return "Neplatn\xFD vstup"; + case "invalid_element": + return `Neplatn\xE1 hodnota v ${issue2.origin}`; + default: + return `Neplatn\xFD vstup`; + } + }; + }, "error"); + __name(cs_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/da.js +function da_default() { + return { + localeError: error9() + }; +} +var error9; +var init_da = __esm({ + "../../node_modules/zod/v4/locales/da.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error9 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "tegn", verb: "havde" }, + file: { unit: "bytes", verb: "havde" }, + array: { unit: "elementer", verb: "indeholdt" }, + set: { unit: "elementer", verb: "indeholdt" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "e-mailadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkesl\xE6t", + date: "ISO-dato", + time: "ISO-klokkesl\xE6t", + duration: "ISO-varighed", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodet streng", + base64url: "base64url-kodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + string: "streng", + number: "tal", + boolean: "boolean", + array: "liste", + object: "objekt", + set: "s\xE6t", + file: "fil" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ugyldigt input: forventede instanceof ${issue2.expected}, fik ${received}`; + } + return `Ugyldigt input: forventede ${expected}, fik ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ugyldig v\xE6rdi: forventede ${stringifyPrimitive(issue2.values[0])}`; + return `Ugyldigt valg: forventede en af f\xF8lgende ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + if (sizing) + return `For stor: forventede ${origin2 ?? "value"} ${sizing.verb} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor: forventede ${origin2 ?? "value"} havde ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + if (sizing) { + return `For lille: forventede ${origin2} ${sizing.verb} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `For lille: forventede ${origin2} havde ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ugyldig streng: skal starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: skal ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: skal indeholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: skal matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ugyldigt tal: skal v\xE6re deleligt med ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ukendte n\xF8gler" : "Ukendt n\xF8gle"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8gle i ${issue2.origin}`; + case "invalid_union": + return "Ugyldigt input: matcher ingen af de tilladte typer"; + case "invalid_element": + return `Ugyldig v\xE6rdi i ${issue2.origin}`; + default: + return `Ugyldigt input`; + } + }; + }, "error"); + __name(da_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/de.js +function de_default() { + return { + localeError: error10() + }; +} +var error10; +var init_de = __esm({ + "../../node_modules/zod/v4/locales/de.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error10 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "Zeichen", verb: "zu haben" }, + file: { unit: "Bytes", verb: "zu haben" }, + array: { unit: "Elemente", verb: "zu haben" }, + set: { unit: "Elemente", verb: "zu haben" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "Eingabe", + email: "E-Mail-Adresse", + url: "URL", + emoji: "Emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-Datum und -Uhrzeit", + date: "ISO-Datum", + time: "ISO-Uhrzeit", + duration: "ISO-Dauer", + ipv4: "IPv4-Adresse", + ipv6: "IPv6-Adresse", + cidrv4: "IPv4-Bereich", + cidrv6: "IPv6-Bereich", + base64: "Base64-codierter String", + base64url: "Base64-URL-codierter String", + json_string: "JSON-String", + e164: "E.164-Nummer", + jwt: "JWT", + template_literal: "Eingabe" + }; + const TypeDictionary = { + nan: "NaN", + number: "Zahl", + array: "Array" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ung\xFCltige Eingabe: erwartet instanceof ${issue2.expected}, erhalten ${received}`; + } + return `Ung\xFCltige Eingabe: erwartet ${expected}, erhalten ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive(issue2.values[0])}`; + return `Ung\xFCltige Option: erwartet eine von ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; + return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ist`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} hat`; + } + return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ist`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`; + if (_issue.format === "ends_with") + return `Ung\xFCltiger String: muss mit "${_issue.suffix}" enden`; + if (_issue.format === "includes") + return `Ung\xFCltiger String: muss "${_issue.includes}" enthalten`; + if (_issue.format === "regex") + return `Ung\xFCltiger String: muss dem Muster ${_issue.pattern} entsprechen`; + return `Ung\xFCltig: ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue2.divisor} sein`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ung\xFCltiger Schl\xFCssel in ${issue2.origin}`; + case "invalid_union": + return "Ung\xFCltige Eingabe"; + case "invalid_element": + return `Ung\xFCltiger Wert in ${issue2.origin}`; + default: + return `Ung\xFCltige Eingabe`; + } + }; + }, "error"); + __name(de_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/en.js +function en_default() { + return { + localeError: error11() + }; +} +var error11; +var init_en = __esm({ + "../../node_modules/zod/v4/locales/en.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error11 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "characters", verb: "to have" }, + file: { unit: "bytes", verb: "to have" }, + array: { unit: "items", verb: "to have" }, + set: { unit: "items", verb: "to have" }, + map: { unit: "entries", verb: "to have" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + mac: "MAC address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + // Compatibility: "nan" -> "NaN" for display + nan: "NaN" + // All other type names omitted - they fall back to raw values via ?? operator + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + return `Invalid input: expected ${expected}, received ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; + return `Invalid option: expected one of ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Too big: expected ${issue2.origin ?? "value"} to have ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Too big: expected ${issue2.origin ?? "value"} to be ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Too small: expected ${issue2.origin} to have ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Too small: expected ${issue2.origin} to be ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Invalid string: must start with "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Invalid string: must end with "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Invalid string: must include "${_issue.includes}"`; + if (_issue.format === "regex") + return `Invalid string: must match pattern ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Invalid number: must be a multiple of ${issue2.divisor}`; + case "unrecognized_keys": + return `Unrecognized key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Invalid key in ${issue2.origin}`; + case "invalid_union": + return "Invalid input"; + case "invalid_element": + return `Invalid value in ${issue2.origin}`; + default: + return `Invalid input`; + } + }; + }, "error"); + __name(en_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/eo.js +function eo_default() { + return { + localeError: error12() + }; +} +var error12; +var init_eo = __esm({ + "../../node_modules/zod/v4/locales/eo.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error12 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "karaktrojn", verb: "havi" }, + file: { unit: "bajtojn", verb: "havi" }, + array: { unit: "elementojn", verb: "havi" }, + set: { unit: "elementojn", verb: "havi" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "enigo", + email: "retadreso", + url: "URL", + emoji: "emo\u011Dio", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datotempo", + date: "ISO-dato", + time: "ISO-tempo", + duration: "ISO-da\u016Dro", + ipv4: "IPv4-adreso", + ipv6: "IPv6-adreso", + cidrv4: "IPv4-rango", + cidrv6: "IPv6-rango", + base64: "64-ume kodita karaktraro", + base64url: "URL-64-ume kodita karaktraro", + json_string: "JSON-karaktraro", + e164: "E.164-nombro", + jwt: "JWT", + template_literal: "enigo" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombro", + array: "tabelo", + null: "senvalora" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Nevalida enigo: atendi\u011Dis instanceof ${issue2.expected}, ricevi\u011Dis ${received}`; + } + return `Nevalida enigo: atendi\u011Dis ${expected}, ricevi\u011Dis ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive(issue2.values[0])}`; + return `Nevalida opcio: atendi\u011Dis unu el ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementojn"}`; + return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} havu ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} estu ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nevalida karaktraro: devas fini\u011Di per "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`; + return `Nevalida ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Nevalida nombro: devas esti oblo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Nekonata${issue2.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue2.keys.length > 1 ? "j" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Nevalida \u015Dlosilo en ${issue2.origin}`; + case "invalid_union": + return "Nevalida enigo"; + case "invalid_element": + return `Nevalida valoro en ${issue2.origin}`; + default: + return `Nevalida enigo`; + } + }; + }, "error"); + __name(eo_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/es.js +function es_default() { + return { + localeError: error13() + }; +} +var error13; +var init_es = __esm({ + "../../node_modules/zod/v4/locales/es.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error13 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caracteres", verb: "tener" }, + file: { unit: "bytes", verb: "tener" }, + array: { unit: "elementos", verb: "tener" }, + set: { unit: "elementos", verb: "tener" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "entrada", + email: "direcci\xF3n de correo electr\xF3nico", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "fecha y hora ISO", + date: "fecha ISO", + time: "hora ISO", + duration: "duraci\xF3n ISO", + ipv4: "direcci\xF3n IPv4", + ipv6: "direcci\xF3n IPv6", + cidrv4: "rango IPv4", + cidrv6: "rango IPv6", + base64: "cadena codificada en base64", + base64url: "URL codificada en base64", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN", + string: "texto", + number: "n\xFAmero", + boolean: "booleano", + array: "arreglo", + object: "objeto", + set: "conjunto", + file: "archivo", + date: "fecha", + bigint: "n\xFAmero grande", + symbol: "s\xEDmbolo", + undefined: "indefinido", + null: "nulo", + function: "funci\xF3n", + map: "mapa", + record: "registro", + tuple: "tupla", + enum: "enumeraci\xF3n", + union: "uni\xF3n", + literal: "literal", + promise: "promesa", + void: "vac\xEDo", + never: "nunca", + unknown: "desconocido", + any: "cualquiera" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Entrada inv\xE1lida: se esperaba instanceof ${issue2.expected}, recibido ${received}`; + } + return `Entrada inv\xE1lida: se esperaba ${expected}, recibido ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive(issue2.values[0])}`; + return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + if (sizing) + return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} tuviera ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} fuera ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + if (sizing) { + return `Demasiado peque\xF1o: se esperaba que ${origin2} tuviera ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Demasiado peque\xF1o: se esperaba que ${origin2} fuera ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cadena inv\xE1lida: debe terminar en "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cadena inv\xE1lida: debe incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${_issue.pattern}`; + return `Inv\xE1lido ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Llave${issue2.keys.length > 1 ? "s" : ""} desconocida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Llave inv\xE1lida en ${TypeDictionary[issue2.origin] ?? issue2.origin}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido en ${TypeDictionary[issue2.origin] ?? issue2.origin}`; + default: + return `Entrada inv\xE1lida`; + } + }; + }, "error"); + __name(es_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/fa.js +function fa_default() { + return { + localeError: error14() + }; +} +var error14; +var init_fa = __esm({ + "../../node_modules/zod/v4/locales/fa.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error14 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + array: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + set: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0648\u0631\u0648\u062F\u06CC", + email: "\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644", + url: "URL", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + date: "\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648", + time: "\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + duration: "\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + ipv4: "IPv4 \u0622\u062F\u0631\u0633", + ipv6: "IPv6 \u0622\u062F\u0631\u0633", + cidrv4: "IPv4 \u062F\u0627\u0645\u0646\u0647", + cidrv6: "IPv6 \u062F\u0627\u0645\u0646\u0647", + base64: "base64-encoded \u0631\u0634\u062A\u0647", + base64url: "base64url-encoded \u0631\u0634\u062A\u0647", + json_string: "JSON \u0631\u0634\u062A\u0647", + e164: "E.164 \u0639\u062F\u062F", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u06CC" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0639\u062F\u062F", + array: "\u0622\u0631\u0627\u06CC\u0647" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${issue2.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + } + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + } + case "invalid_value": + if (issue2.values.length === 1) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive(issue2.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`; + } + return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues(issue2.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0628\u0627\u0634\u062F`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0628\u0627\u0634\u062F`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`; + } + if (_issue.format === "ends_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`; + } + if (_issue.format === "includes") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${_issue.includes}" \u0628\u0627\u0634\u062F`; + } + if (_issue.format === "regex") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`; + } + return `${FormatDictionary[_issue.format] ?? issue2.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + } + case "not_multiple_of": + return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue2.divisor} \u0628\u0627\u0634\u062F`; + case "unrecognized_keys": + return `\u06A9\u0644\u06CC\u062F${issue2.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue2.origin}`; + case "invalid_union": + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + case "invalid_element": + return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue2.origin}`; + default: + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + } + }; + }, "error"); + __name(fa_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/fi.js +function fi_default() { + return { + localeError: error15() + }; +} +var error15; +var init_fi = __esm({ + "../../node_modules/zod/v4/locales/fi.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error15 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "merkki\xE4", subject: "merkkijonon" }, + file: { unit: "tavua", subject: "tiedoston" }, + array: { unit: "alkiota", subject: "listan" }, + set: { unit: "alkiota", subject: "joukon" }, + number: { unit: "", subject: "luvun" }, + bigint: { unit: "", subject: "suuren kokonaisluvun" }, + int: { unit: "", subject: "kokonaisluvun" }, + date: { unit: "", subject: "p\xE4iv\xE4m\xE4\xE4r\xE4n" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "s\xE4\xE4nn\xF6llinen lauseke", + email: "s\xE4hk\xF6postiosoite", + url: "URL-osoite", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-aikaleima", + date: "ISO-p\xE4iv\xE4m\xE4\xE4r\xE4", + time: "ISO-aika", + duration: "ISO-kesto", + ipv4: "IPv4-osoite", + ipv6: "IPv6-osoite", + cidrv4: "IPv4-alue", + cidrv6: "IPv6-alue", + base64: "base64-koodattu merkkijono", + base64url: "base64url-koodattu merkkijono", + json_string: "JSON-merkkijono", + e164: "E.164-luku", + jwt: "JWT", + template_literal: "templaattimerkkijono" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Virheellinen tyyppi: odotettiin instanceof ${issue2.expected}, oli ${received}`; + } + return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive(issue2.values[0])}`; + return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.maximum.toString()} ${sizing.unit}`.trim(); + } + return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.minimum.toString()} ${sizing.unit}`.trim(); + } + return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Virheellinen sy\xF6te: t\xE4ytyy loppua "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${_issue.includes}"`; + if (_issue.format === "regex") { + return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`; + } + return `Virheellinen ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Virheellinen luku: t\xE4ytyy olla luvun ${issue2.divisor} monikerta`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return "Virheellinen avain tietueessa"; + case "invalid_union": + return "Virheellinen unioni"; + case "invalid_element": + return "Virheellinen arvo joukossa"; + default: + return `Virheellinen sy\xF6te`; + } + }; + }, "error"); + __name(fi_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/fr.js +function fr_default() { + return { + localeError: error16() + }; +} +var error16; +var init_fr = __esm({ + "../../node_modules/zod/v4/locales/fr.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error16 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "entr\xE9e", + email: "adresse e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date et heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombre", + array: "tableau" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Entr\xE9e invalide : instanceof ${issue2.expected} attendu, ${received} re\xE7u`; + } + return `Entr\xE9e invalide : ${expected} attendu, ${received} re\xE7u`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Entr\xE9e invalide : ${stringifyPrimitive(issue2.values[0])} attendu`; + return `Option invalide : une valeur parmi ${joinValues(issue2.values, "|")} attendue`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; + return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue2.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue2.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; + }, "error"); + __name(fr_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/fr-CA.js +function fr_CA_default() { + return { + localeError: error17() + }; +} +var error17; +var init_fr_CA = __esm({ + "../../node_modules/zod/v4/locales/fr-CA.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error17 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "entr\xE9e", + email: "adresse courriel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date-heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Entr\xE9e invalide : attendu instanceof ${issue2.expected}, re\xE7u ${received}`; + } + return `Entr\xE9e invalide : attendu ${expected}, re\xE7u ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Entr\xE9e invalide : attendu ${stringifyPrimitive(issue2.values[0])}`; + return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "\u2264" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} ait ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} soit ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u2265" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Trop petit : attendu que ${issue2.origin} ait ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : attendu que ${issue2.origin} soit ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue2.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue2.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; + }, "error"); + __name(fr_CA_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/he.js +function he_default() { + return { + localeError: error18() + }; +} +var error18; +var init_he = __esm({ + "../../node_modules/zod/v4/locales/he.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error18 = /* @__PURE__ */ __name(() => { + const TypeNames = { + string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" }, + number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" }, + boolean: { label: "\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9", gender: "m" }, + bigint: { label: "BigInt", gender: "m" }, + date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA", gender: "m" }, + array: { label: "\u05DE\u05E2\u05E8\u05DA", gender: "m" }, + object: { label: "\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8", gender: "m" }, + null: { label: "\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)", gender: "m" }, + undefined: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)", gender: "m" }, + symbol: { label: "\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)", gender: "m" }, + function: { label: "\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4", gender: "f" }, + map: { label: "\u05DE\u05E4\u05D4 (Map)", gender: "f" }, + set: { label: "\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)", gender: "f" }, + file: { label: "\u05E7\u05D5\u05D1\u05E5", gender: "m" }, + promise: { label: "Promise", gender: "m" }, + NaN: { label: "NaN", gender: "m" }, + unknown: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2", gender: "m" }, + value: { label: "\u05E2\u05E8\u05DA", gender: "m" } + }; + const Sizable = { + string: { unit: "\u05EA\u05D5\u05D5\u05D9\u05DD", shortLabel: "\u05E7\u05E6\u05E8", longLabel: "\u05D0\u05E8\u05D5\u05DA" }, + file: { unit: "\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" } + // no unit + }; + const typeEntry = /* @__PURE__ */ __name((t9) => t9 ? TypeNames[t9] : void 0, "typeEntry"); + const typeLabel = /* @__PURE__ */ __name((t9) => { + const e2 = typeEntry(t9); + if (e2) + return e2.label; + return t9 ?? TypeNames.unknown.label; + }, "typeLabel"); + const withDefinite = /* @__PURE__ */ __name((t9) => `\u05D4${typeLabel(t9)}`, "withDefinite"); + const verbFor = /* @__PURE__ */ __name((t9) => { + const e2 = typeEntry(t9); + const gender = e2?.gender ?? "m"; + return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"; + }, "verbFor"); + const getSizing = /* @__PURE__ */ __name((origin2) => { + if (!origin2) + return null; + return Sizable[origin2] ?? null; + }, "getSizing"); + const FormatDictionary = { + regex: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + email: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC", gender: "f" }, + url: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA", gender: "f" }, + emoji: { label: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9", gender: "m" }, + uuid: { label: "UUID", gender: "m" }, + nanoid: { label: "nanoid", gender: "m" }, + guid: { label: "GUID", gender: "m" }, + cuid: { label: "cuid", gender: "m" }, + cuid2: { label: "cuid2", gender: "m" }, + ulid: { label: "ULID", gender: "m" }, + xid: { label: "XID", gender: "m" }, + ksuid: { label: "KSUID", gender: "m" }, + datetime: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO", gender: "m" }, + date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA ISO", gender: "m" }, + time: { label: "\u05D6\u05DE\u05DF ISO", gender: "m" }, + duration: { label: "\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO", gender: "m" }, + ipv4: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv4", gender: "f" }, + ipv6: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv6", gender: "f" }, + cidrv4: { label: "\u05D8\u05D5\u05D5\u05D7 IPv4", gender: "m" }, + cidrv6: { label: "\u05D8\u05D5\u05D5\u05D7 IPv6", gender: "m" }, + base64: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64", gender: "f" }, + base64url: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA", gender: "f" }, + json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" }, + e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" }, + jwt: { label: "JWT", gender: "m" }, + ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + includes: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + lowercase: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + starts_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + uppercase: { label: "\u05E7\u05DC\u05D8", gender: "m" } + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expectedKey = issue2.expected; + const expected = TypeDictionary[expectedKey ?? ""] ?? typeLabel(expectedKey); + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue2.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; + } + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; + } + case "invalid_value": { + if (issue2.values.length === 1) { + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${stringifyPrimitive(issue2.values[0])}`; + } + const stringified = issue2.values.map((v3) => stringifyPrimitive(v3)); + if (issue2.values.length === 2) { + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`; + } + const lastValue = stringified[stringified.length - 1]; + const restValues = stringified.slice(0, -1).join(", "); + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`; + } + case "too_big": { + const sizing = getSizing(issue2.origin); + const subject = withDefinite(issue2.origin ?? "value"); + if (issue2.origin === "string") { + return `${sizing?.longLabel ?? "\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.maximum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA" : "\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim(); + } + if (issue2.origin === "number") { + const comparison = issue2.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue2.maximum}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; + } + if (issue2.origin === "array" || issue2.origin === "set") { + const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; + const comparison = issue2.inclusive ? `${issue2.maximum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA` : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue2.maximum} ${sizing?.unit ?? ""}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); + } + const adj = issue2.inclusive ? "<=" : "<"; + const be2 = verbFor(issue2.origin ?? "value"); + if (sizing?.unit) { + return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + } + return `${sizing?.longLabel ?? "\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const sizing = getSizing(issue2.origin); + const subject = withDefinite(issue2.origin ?? "value"); + if (issue2.origin === "string") { + return `${sizing?.shortLabel ?? "\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue2.minimum.toString()} ${sizing?.unit ?? ""} ${issue2.inclusive ? "\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8" : "\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim(); + } + if (issue2.origin === "number") { + const comparison = issue2.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue2.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue2.minimum}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; + } + if (issue2.origin === "array" || issue2.origin === "set") { + const verb = issue2.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; + if (issue2.minimum === 1 && issue2.inclusive) { + const singularPhrase = issue2.origin === "set" ? "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3" : "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3"; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`; + } + const comparison = issue2.inclusive ? `${issue2.minimum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8` : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue2.minimum} ${sizing?.unit ?? ""}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); + } + const adj = issue2.inclusive ? ">=" : ">"; + const be2 = verbFor(issue2.origin ?? "value"); + if (sizing?.unit) { + return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `${sizing?.shortLabel ?? "\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${subject} ${be2} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`; + const nounEntry = FormatDictionary[_issue.format]; + const noun = nounEntry?.label ?? _issue.format; + const gender = nounEntry?.gender ?? "m"; + const adjective = gender === "f" ? "\u05EA\u05E7\u05D9\u05E0\u05D4" : "\u05EA\u05E7\u05D9\u05DF"; + return `${noun} \u05DC\u05D0 ${adjective}`; + } + case "not_multiple_of": + return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue2.divisor}`; + case "unrecognized_keys": + return `\u05DE\u05E4\u05EA\u05D7${issue2.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue2.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": { + return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`; + } + case "invalid_union": + return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"; + case "invalid_element": { + const place = withDefinite(issue2.origin ?? "array"); + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`; + } + default: + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; + } + }; + }, "error"); + __name(he_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/hu.js +function hu_default() { + return { + localeError: error19() + }; +} +var error19; +var init_hu = __esm({ + "../../node_modules/zod/v4/locales/hu.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error19 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "karakter", verb: "legyen" }, + file: { unit: "byte", verb: "legyen" }, + array: { unit: "elem", verb: "legyen" }, + set: { unit: "elem", verb: "legyen" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "bemenet", + email: "email c\xEDm", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO id\u0151b\xE9lyeg", + date: "ISO d\xE1tum", + time: "ISO id\u0151", + duration: "ISO id\u0151intervallum", + ipv4: "IPv4 c\xEDm", + ipv6: "IPv6 c\xEDm", + cidrv4: "IPv4 tartom\xE1ny", + cidrv6: "IPv6 tartom\xE1ny", + base64: "base64-k\xF3dolt string", + base64url: "base64url-k\xF3dolt string", + json_string: "JSON string", + e164: "E.164 sz\xE1m", + jwt: "JWT", + template_literal: "bemenet" + }; + const TypeDictionary = { + nan: "NaN", + number: "sz\xE1m", + array: "t\xF6mb" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`; + } + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`; + return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`; + return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`; + if (_issue.format === "ends_with") + return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`; + if (_issue.format === "includes") + return `\xC9rv\xE9nytelen string: "${_issue.includes}" \xE9rt\xE9ket kell tartalmaznia`; + if (_issue.format === "regex") + return `\xC9rv\xE9nytelen string: ${_issue.pattern} mint\xE1nak kell megfelelnie`; + return `\xC9rv\xE9nytelen ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\xC9rv\xE9nytelen sz\xE1m: ${issue2.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; + case "unrecognized_keys": + return `Ismeretlen kulcs${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\xC9rv\xE9nytelen kulcs ${issue2.origin}`; + case "invalid_union": + return "\xC9rv\xE9nytelen bemenet"; + case "invalid_element": + return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue2.origin}`; + default: + return `\xC9rv\xE9nytelen bemenet`; + } + }; + }, "error"); + __name(hu_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/hy.js +function getArmenianPlural(count4, one, many) { + return Math.abs(count4) === 1 ? one : many; +} +function withDefiniteArticle(word) { + if (!word) + return ""; + const vowels = ["\u0561", "\u0565", "\u0568", "\u056B", "\u0578", "\u0578\u0582", "\u0585"]; + const lastChar = word[word.length - 1]; + return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568"); +} +function hy_default() { + return { + localeError: error20() + }; +} +var error20; +var init_hy = __esm({ + "../../node_modules/zod/v4/locales/hy.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + __name(getArmenianPlural, "getArmenianPlural"); + __name(withDefiniteArticle, "withDefiniteArticle"); + error20 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { + unit: { + one: "\u0576\u0577\u0561\u0576", + many: "\u0576\u0577\u0561\u0576\u0576\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + file: { + unit: { + one: "\u0562\u0561\u0575\u0569", + many: "\u0562\u0561\u0575\u0569\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + array: { + unit: { + one: "\u057F\u0561\u0580\u0580", + many: "\u057F\u0561\u0580\u0580\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + set: { + unit: { + one: "\u057F\u0561\u0580\u0580", + many: "\u057F\u0561\u0580\u0580\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0574\u0578\u0582\u057F\u0584", + email: "\u0567\u056C. \u0570\u0561\u057D\u0581\u0565", + url: "URL", + emoji: "\u0567\u0574\u0578\u057B\u056B", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574", + date: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E", + time: "ISO \u056A\u0561\u0574", + duration: "ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576", + ipv4: "IPv4 \u0570\u0561\u057D\u0581\u0565", + ipv6: "IPv6 \u0570\u0561\u057D\u0581\u0565", + cidrv4: "IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", + cidrv6: "IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", + base64: "base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", + base64url: "base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", + json_string: "JSON \u057F\u0578\u0572", + e164: "E.164 \u0570\u0561\u0574\u0561\u0580", + jwt: "JWT", + template_literal: "\u0574\u0578\u0582\u057F\u0584" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0569\u056B\u057E", + array: "\u0566\u0561\u0576\u0563\u057E\u0561\u056E" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${issue2.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; + } + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${stringifyPrimitive(issue2.values[1])}`; + return `\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const maxValue = Number(issue2.maximum); + const unit = getArmenianPlural(maxValue, sizing.unit.one, sizing.unit.many); + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue2.maximum.toString()} ${unit}`; + } + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const minValue = Number(issue2.minimum); + const unit = getArmenianPlural(minValue, sizing.unit.one, sizing.unit.many); + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue2.minimum.toString()} ${unit}`; + } + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue2.origin)} \u056C\u056B\u0576\u056B ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${_issue.prefix}"-\u0578\u057E`; + if (_issue.format === "ends_with") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${_issue.suffix}"-\u0578\u057E`; + if (_issue.format === "includes") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${_issue.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`; + return `\u054D\u056D\u0561\u056C ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${issue2.divisor}-\u056B`; + case "unrecognized_keys": + return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${issue2.keys.length > 1 ? "\u0576\u0565\u0580" : ""}. ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${withDefiniteArticle(issue2.origin)}-\u0578\u0582\u0574`; + case "invalid_union": + return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"; + case "invalid_element": + return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${withDefiniteArticle(issue2.origin)}-\u0578\u0582\u0574`; + default: + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574`; + } + }; + }, "error"); + __name(hy_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/id.js +function id_default() { + return { + localeError: error21() + }; +} +var error21; +var init_id = __esm({ + "../../node_modules/zod/v4/locales/id.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error21 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "karakter", verb: "memiliki" }, + file: { unit: "byte", verb: "memiliki" }, + array: { unit: "item", verb: "memiliki" }, + set: { unit: "item", verb: "memiliki" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "alamat email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tanggal dan waktu format ISO", + date: "tanggal format ISO", + time: "jam format ISO", + duration: "durasi format ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "rentang alamat IPv4", + cidrv6: "rentang alamat IPv6", + base64: "string dengan enkode base64", + base64url: "string dengan enkode base64url", + json_string: "string JSON", + e164: "angka E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Input tidak valid: diharapkan instanceof ${issue2.expected}, diterima ${received}`; + } + return `Input tidak valid: diharapkan ${expected}, diterima ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Input tidak valid: diharapkan ${stringifyPrimitive(issue2.values[0])}`; + return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} memiliki ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} menjadi ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Terlalu kecil: diharapkan ${issue2.origin} memiliki ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: diharapkan ${issue2.origin} menjadi ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak valid: harus menyertakan "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak valid: harus sesuai pola ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} tidak valid`; + } + case "not_multiple_of": + return `Angka tidak valid: harus kelipatan dari ${issue2.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak valid di ${issue2.origin}`; + case "invalid_union": + return "Input tidak valid"; + case "invalid_element": + return `Nilai tidak valid di ${issue2.origin}`; + default: + return `Input tidak valid`; + } + }; + }, "error"); + __name(id_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/is.js +function is_default() { + return { + localeError: error22() + }; +} +var error22; +var init_is = __esm({ + "../../node_modules/zod/v4/locales/is.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error22 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "stafi", verb: "a\xF0 hafa" }, + file: { unit: "b\xE6ti", verb: "a\xF0 hafa" }, + array: { unit: "hluti", verb: "a\xF0 hafa" }, + set: { unit: "hluti", verb: "a\xF0 hafa" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "gildi", + email: "netfang", + url: "vefsl\xF3\xF0", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dagsetning og t\xEDmi", + date: "ISO dagsetning", + time: "ISO t\xEDmi", + duration: "ISO t\xEDmalengd", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded strengur", + base64url: "base64url-encoded strengur", + json_string: "JSON strengur", + e164: "E.164 t\xF6lugildi", + jwt: "JWT", + template_literal: "gildi" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\xFAmer", + array: "fylki" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera instanceof ${issue2.expected}`; + } + return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera ${expected}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Rangt gildi: gert r\xE1\xF0 fyrir ${stringifyPrimitive(issue2.values[0])}`; + return `\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin ?? "gildi"} hafi ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "hluti"}`; + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin ?? "gildi"} s\xE9 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin} hafi ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue2.origin} s\xE9 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${_issue.includes}"`; + if (_issue.format === "regex") + return `\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${_issue.pattern}`; + return `Rangt ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${issue2.divisor}`; + case "unrecognized_keys": + return `\xD3\xFEekkt ${issue2.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Rangur lykill \xED ${issue2.origin}`; + case "invalid_union": + return "Rangt gildi"; + case "invalid_element": + return `Rangt gildi \xED ${issue2.origin}`; + default: + return `Rangt gildi`; + } + }; + }, "error"); + __name(is_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/it.js +function it_default() { + return { + localeError: error23() + }; +} +var error23; +var init_it = __esm({ + "../../node_modules/zod/v4/locales/it.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error23 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caratteri", verb: "avere" }, + file: { unit: "byte", verb: "avere" }, + array: { unit: "elementi", verb: "avere" }, + set: { unit: "elementi", verb: "avere" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "indirizzo email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e ora ISO", + date: "data ISO", + time: "ora ISO", + duration: "durata ISO", + ipv4: "indirizzo IPv4", + ipv6: "indirizzo IPv6", + cidrv4: "intervallo IPv4", + cidrv6: "intervallo IPv6", + base64: "stringa codificata in base64", + base64url: "URL codificata in base64", + json_string: "stringa JSON", + e164: "numero E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "numero", + array: "vettore" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Input non valido: atteso instanceof ${issue2.expected}, ricevuto ${received}`; + } + return `Input non valido: atteso ${expected}, ricevuto ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Input non valido: atteso ${stringifyPrimitive(issue2.values[0])}`; + return `Opzione non valida: atteso uno tra ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Troppo grande: ${issue2.origin ?? "valore"} deve avere ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementi"}`; + return `Troppo grande: ${issue2.origin ?? "valore"} deve essere ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Troppo piccolo: ${issue2.origin} deve avere ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Troppo piccolo: ${issue2.origin} deve essere ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Stringa non valida: deve iniziare con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Stringa non valida: deve terminare con "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Stringa non valida: deve includere "${_issue.includes}"`; + if (_issue.format === "regex") + return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`; + case "unrecognized_keys": + return `Chiav${issue2.keys.length > 1 ? "i" : "e"} non riconosciut${issue2.keys.length > 1 ? "e" : "a"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Chiave non valida in ${issue2.origin}`; + case "invalid_union": + return "Input non valido"; + case "invalid_element": + return `Valore non valido in ${issue2.origin}`; + default: + return `Input non valido`; + } + }; + }, "error"); + __name(it_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ja.js +function ja_default() { + return { + localeError: error24() + }; +} +var error24; +var init_ja = __esm({ + "../../node_modules/zod/v4/locales/ja.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error24 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, + file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" }, + array: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" }, + set: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u5165\u529B\u5024", + email: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9", + url: "URL", + emoji: "\u7D75\u6587\u5B57", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u6642", + date: "ISO\u65E5\u4ED8", + time: "ISO\u6642\u523B", + duration: "ISO\u671F\u9593", + ipv4: "IPv4\u30A2\u30C9\u30EC\u30B9", + ipv6: "IPv6\u30A2\u30C9\u30EC\u30B9", + cidrv4: "IPv4\u7BC4\u56F2", + cidrv6: "IPv6\u7BC4\u56F2", + base64: "base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + base64url: "base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + json_string: "JSON\u6587\u5B57\u5217", + e164: "E.164\u756A\u53F7", + jwt: "JWT", + template_literal: "\u5165\u529B\u5024" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u6570\u5024", + array: "\u914D\u5217" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u7121\u52B9\u306A\u5165\u529B: instanceof ${issue2.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + } + return `\u7121\u52B9\u306A\u5165\u529B: ${expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive(issue2.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; + return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues(issue2.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "too_big": { + const adj = issue2.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "ends_with") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "includes") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "regex") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u7121\u52B9\u306A${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u7121\u52B9\u306A\u6570\u5024: ${issue2.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "unrecognized_keys": + return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue2.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue2.keys, "\u3001")}`; + case "invalid_key": + return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; + case "invalid_union": + return "\u7121\u52B9\u306A\u5165\u529B"; + case "invalid_element": + return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; + default: + return `\u7121\u52B9\u306A\u5165\u529B`; + } + }; + }, "error"); + __name(ja_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ka.js +function ka_default() { + return { + localeError: error25() + }; +} +var error25; +var init_ka = __esm({ + "../../node_modules/zod/v4/locales/ka.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error25 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + array: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + set: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0", + email: "\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + url: "URL", + emoji: "\u10D4\u10DB\u10DD\u10EF\u10D8", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD", + date: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8", + time: "\u10D3\u10E0\u10DD", + duration: "\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0", + ipv4: "IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8", + jwt: "JWT", + template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8", + string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8", + function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0", + array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${issue2.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; + } + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${stringifyPrimitive(issue2.values[0])}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${joinValues(issue2.values, "|")}-\u10D3\u10D0\u10DC`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue2.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`; + } + if (_issue.format === "ends_with") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`; + if (_issue.format === "includes") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`; + if (_issue.format === "regex") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue2.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`; + case "unrecognized_keys": + return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue2.keys.length > 1 ? "\u10D4\u10D1\u10D8" : "\u10D8"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue2.origin}-\u10E8\u10D8`; + case "invalid_union": + return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"; + case "invalid_element": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue2.origin}-\u10E8\u10D8`; + default: + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`; + } + }; + }, "error"); + __name(ka_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/km.js +function km_default() { + return { + localeError: error26() + }; +} +var error26; +var init_km = __esm({ + "../../node_modules/zod/v4/locales/km.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error26 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + array: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + set: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B", + email: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B", + url: "URL", + emoji: "\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO", + date: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO", + time: "\u1798\u17C9\u17C4\u1784 ISO", + duration: "\u179A\u1799\u17C8\u1796\u17C1\u179B ISO", + ipv4: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + ipv6: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + cidrv4: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + cidrv6: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + base64: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64", + base64url: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url", + json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON", + e164: "\u179B\u17C1\u1781 E.164", + jwt: "JWT", + template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u179B\u17C1\u1781", + array: "\u17A2\u17B6\u179A\u17C1 (Array)", + null: "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${issue2.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; + } + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive(issue2.values[0])}`; + return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`; + return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue2.divisor}`; + case "unrecognized_keys": + return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`; + case "invalid_union": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; + case "invalid_element": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.origin}`; + default: + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; + } + }; + }, "error"); + __name(km_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/kh.js +function kh_default() { + return km_default(); +} +var init_kh = __esm({ + "../../node_modules/zod/v4/locales/kh.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_km(); + __name(kh_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ko.js +function ko_default() { + return { + localeError: error27() + }; +} +var error27; +var init_ko = __esm({ + "../../node_modules/zod/v4/locales/ko.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error27 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\uBB38\uC790", verb: "to have" }, + file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" }, + array: { unit: "\uAC1C", verb: "to have" }, + set: { unit: "\uAC1C", verb: "to have" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\uC785\uB825", + email: "\uC774\uBA54\uC77C \uC8FC\uC18C", + url: "URL", + emoji: "\uC774\uBAA8\uC9C0", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \uB0A0\uC9DC\uC2DC\uAC04", + date: "ISO \uB0A0\uC9DC", + time: "ISO \uC2DC\uAC04", + duration: "ISO \uAE30\uAC04", + ipv4: "IPv4 \uC8FC\uC18C", + ipv6: "IPv6 \uC8FC\uC18C", + cidrv4: "IPv4 \uBC94\uC704", + cidrv6: "IPv6 \uBC94\uC704", + base64: "base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + base64url: "base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + json_string: "JSON \uBB38\uC790\uC5F4", + e164: "E.164 \uBC88\uD638", + jwt: "JWT", + template_literal: "\uC785\uB825" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${issue2.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; + } + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive(issue2.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues(issue2.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "too_big": { + const adj = issue2.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; + const suffix = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue2.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()}${unit} ${adj}${suffix}`; + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()} ${adj}${suffix}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; + const suffix = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue2.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) { + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()}${unit} ${adj}${suffix}`; + } + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()} ${adj}${suffix}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`; + } + if (_issue.format === "ends_with") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "includes") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "regex") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue2.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "unrecognized_keys": + return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\uC798\uBABB\uB41C \uD0A4: ${issue2.origin}`; + case "invalid_union": + return `\uC798\uBABB\uB41C \uC785\uB825`; + case "invalid_element": + return `\uC798\uBABB\uB41C \uAC12: ${issue2.origin}`; + default: + return `\uC798\uBABB\uB41C \uC785\uB825`; + } + }; + }, "error"); + __name(ko_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/lt.js +function getUnitTypeFromNumber(number4) { + const abs = Math.abs(number4); + const last = abs % 10; + const last2 = abs % 100; + if (last2 >= 11 && last2 <= 19 || last === 0) + return "many"; + if (last === 1) + return "one"; + return "few"; +} +function lt_default() { + return { + localeError: error28() + }; +} +var capitalizeFirstCharacter, error28; +var init_lt = __esm({ + "../../node_modules/zod/v4/locales/lt.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + capitalizeFirstCharacter = /* @__PURE__ */ __name((text2) => { + return text2.charAt(0).toUpperCase() + text2.slice(1); + }, "capitalizeFirstCharacter"); + __name(getUnitTypeFromNumber, "getUnitTypeFromNumber"); + error28 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { + unit: { + one: "simbolis", + few: "simboliai", + many: "simboli\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne ilgesn\u0117 kaip", + notInclusive: "turi b\u016Bti trumpesn\u0117 kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne trumpesn\u0117 kaip", + notInclusive: "turi b\u016Bti ilgesn\u0117 kaip" + } + } + }, + file: { + unit: { + one: "baitas", + few: "baitai", + many: "bait\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne didesnis kaip", + notInclusive: "turi b\u016Bti ma\u017Eesnis kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne ma\u017Eesnis kaip", + notInclusive: "turi b\u016Bti didesnis kaip" + } + } + }, + array: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } + } + }, + set: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } + } + } + }; + function getSizing(origin2, unitType, inclusive, targetShouldBe) { + const result = Sizable[origin2] ?? null; + if (result === null) + return result; + return { + unit: result.unit[unitType], + verb: result.verb[targetShouldBe][inclusive ? "inclusive" : "notInclusive"] + }; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u012Fvestis", + email: "el. pa\u0161to adresas", + url: "URL", + emoji: "jaustukas", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO data ir laikas", + date: "ISO data", + time: "ISO laikas", + duration: "ISO trukm\u0117", + ipv4: "IPv4 adresas", + ipv6: "IPv6 adresas", + cidrv4: "IPv4 tinklo prefiksas (CIDR)", + cidrv6: "IPv6 tinklo prefiksas (CIDR)", + base64: "base64 u\u017Ekoduota eilut\u0117", + base64url: "base64url u\u017Ekoduota eilut\u0117", + json_string: "JSON eilut\u0117", + e164: "E.164 numeris", + jwt: "JWT", + template_literal: "\u012Fvestis" + }; + const TypeDictionary = { + nan: "NaN", + number: "skai\u010Dius", + bigint: "sveikasis skai\u010Dius", + string: "eilut\u0117", + boolean: "login\u0117 reik\u0161m\u0117", + undefined: "neapibr\u0117\u017Eta reik\u0161m\u0117", + function: "funkcija", + symbol: "simbolis", + array: "masyvas", + object: "objektas", + null: "nulin\u0117 reik\u0161m\u0117" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Gautas tipas ${received}, o tik\u0117tasi - instanceof ${issue2.expected}`; + } + return `Gautas tipas ${received}, o tik\u0117tasi - ${expected}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Privalo b\u016Bti ${stringifyPrimitive(issue2.values[0])}`; + return `Privalo b\u016Bti vienas i\u0161 ${joinValues(issue2.values, "|")} pasirinkim\u0173`; + case "too_big": { + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.maximum)), issue2.inclusive ?? false, "smaller"); + if (sizing?.verb) + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.maximum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue2.inclusive ? "ne didesnis kaip" : "ma\u017Eesnis kaip"; + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.maximum.toString()} ${sizing?.unit}`; + } + case "too_small": { + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.minimum)), issue2.inclusive ?? false, "bigger"); + if (sizing?.verb) + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.minimum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue2.inclusive ? "ne ma\u017Eesnis kaip" : "didesnis kaip"; + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.minimum.toString()} ${sizing?.unit}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Eilut\u0117 privalo prasid\u0117ti "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Eilut\u0117 privalo pasibaigti "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Eilut\u0117 privalo \u012Ftraukti "${_issue.includes}"`; + if (_issue.format === "regex") + return `Eilut\u0117 privalo atitikti ${_issue.pattern}`; + return `Neteisingas ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Skai\u010Dius privalo b\u016Bti ${issue2.divisor} kartotinis.`; + case "unrecognized_keys": + return `Neatpa\u017Eint${issue2.keys.length > 1 ? "i" : "as"} rakt${issue2.keys.length > 1 ? "ai" : "as"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return "Rastas klaidingas raktas"; + case "invalid_union": + return "Klaidinga \u012Fvestis"; + case "invalid_element": { + const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin; + return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`; + } + default: + return "Klaidinga \u012Fvestis"; + } + }; + }, "error"); + __name(lt_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/mk.js +function mk_default() { + return { + localeError: error29() + }; +} +var error29; +var init_mk = __esm({ + "../../node_modules/zod/v4/locales/mk.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error29 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + array: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + set: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0432\u043D\u0435\u0441", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430", + url: "URL", + emoji: "\u0435\u043C\u043E\u045F\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0443\u043C", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441\u0430", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441\u0430", + cidrv4: "IPv4 \u043E\u043F\u0441\u0435\u0433", + cidrv6: "IPv6 \u043E\u043F\u0441\u0435\u0433", + base64: "base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + base64url: "base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + json_string: "JSON \u043D\u0438\u0437\u0430", + e164: "E.164 \u0431\u0440\u043E\u0458", + jwt: "JWT", + template_literal: "\u0432\u043D\u0435\u0441" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0431\u0440\u043E\u0458", + array: "\u043D\u0438\u0437\u0430" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${issue2.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; + } + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; + return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue2.origin}`; + case "invalid_union": + return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"; + case "invalid_element": + return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue2.origin}`; + default: + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`; + } + }; + }, "error"); + __name(mk_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ms.js +function ms_default() { + return { + localeError: error30() + }; +} +var error30; +var init_ms = __esm({ + "../../node_modules/zod/v4/locales/ms.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error30 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "aksara", verb: "mempunyai" }, + file: { unit: "bait", verb: "mempunyai" }, + array: { unit: "elemen", verb: "mempunyai" }, + set: { unit: "elemen", verb: "mempunyai" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "alamat e-mel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tarikh masa ISO", + date: "tarikh ISO", + time: "masa ISO", + duration: "tempoh ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "julat IPv4", + cidrv6: "julat IPv6", + base64: "string dikodkan base64", + base64url: "string dikodkan base64url", + json_string: "string JSON", + e164: "nombor E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombor" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Input tidak sah: dijangka instanceof ${issue2.expected}, diterima ${received}`; + } + return `Input tidak sah: dijangka ${expected}, diterima ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Input tidak sah: dijangka ${stringifyPrimitive(issue2.values[0])}`; + return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} adalah ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Terlalu kecil: dijangka ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: dijangka ${issue2.origin} adalah ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak sah: mesti mengandungi "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} tidak sah`; + } + case "not_multiple_of": + return `Nombor tidak sah: perlu gandaan ${issue2.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak sah dalam ${issue2.origin}`; + case "invalid_union": + return "Input tidak sah"; + case "invalid_element": + return `Nilai tidak sah dalam ${issue2.origin}`; + default: + return `Input tidak sah`; + } + }; + }, "error"); + __name(ms_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/nl.js +function nl_default() { + return { + localeError: error31() + }; +} +var error31; +var init_nl = __esm({ + "../../node_modules/zod/v4/locales/nl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error31 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "tekens", verb: "heeft" }, + file: { unit: "bytes", verb: "heeft" }, + array: { unit: "elementen", verb: "heeft" }, + set: { unit: "elementen", verb: "heeft" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "invoer", + email: "emailadres", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum en tijd", + date: "ISO datum", + time: "ISO tijd", + duration: "ISO duur", + ipv4: "IPv4-adres", + ipv6: "IPv6-adres", + cidrv4: "IPv4-bereik", + cidrv6: "IPv6-bereik", + base64: "base64-gecodeerde tekst", + base64url: "base64 URL-gecodeerde tekst", + json_string: "JSON string", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "invoer" + }; + const TypeDictionary = { + nan: "NaN", + number: "getal" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ongeldige invoer: verwacht instanceof ${issue2.expected}, ontving ${received}`; + } + return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue2.values[0])}`; + return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + const longName = issue2.origin === "date" ? "laat" : issue2.origin === "string" ? "lang" : "groot"; + if (sizing) + return `Te ${longName}: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementen"} ${sizing.verb}`; + return `Te ${longName}: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} is`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + const shortName = issue2.origin === "date" ? "vroeg" : issue2.origin === "string" ? "kort" : "klein"; + if (sizing) { + return `Te ${shortName}: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} ${sizing.verb}`; + } + return `Te ${shortName}: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} is`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`; + } + if (_issue.format === "ends_with") + return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`; + if (_issue.format === "includes") + return `Ongeldige tekst: moet "${_issue.includes}" bevatten`; + if (_issue.format === "regex") + return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`; + return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ongeldig getal: moet een veelvoud van ${issue2.divisor} zijn`; + case "unrecognized_keys": + return `Onbekende key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ongeldige key in ${issue2.origin}`; + case "invalid_union": + return "Ongeldige invoer"; + case "invalid_element": + return `Ongeldige waarde in ${issue2.origin}`; + default: + return `Ongeldige invoer`; + } + }; + }, "error"); + __name(nl_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/no.js +function no_default() { + return { + localeError: error32() + }; +} +var error32; +var init_no = __esm({ + "../../node_modules/zod/v4/locales/no.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error32 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "tegn", verb: "\xE5 ha" }, + file: { unit: "bytes", verb: "\xE5 ha" }, + array: { unit: "elementer", verb: "\xE5 inneholde" }, + set: { unit: "elementer", verb: "\xE5 inneholde" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "input", + email: "e-postadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkeslett", + date: "ISO-dato", + time: "ISO-klokkeslett", + duration: "ISO-varighet", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spekter", + cidrv6: "IPv6-spekter", + base64: "base64-enkodet streng", + base64url: "base64url-enkodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "tall", + array: "liste" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ugyldig input: forventet instanceof ${issue2.expected}, fikk ${received}`; + } + return `Ugyldig input: forventet ${expected}, fikk ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ugyldig verdi: forventet ${stringifyPrimitive(issue2.values[0])}`; + return `Ugyldig valg: forventet en av ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: m\xE5 ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8kkel i ${issue2.origin}`; + case "invalid_union": + return "Ugyldig input"; + case "invalid_element": + return `Ugyldig verdi i ${issue2.origin}`; + default: + return `Ugyldig input`; + } + }; + }, "error"); + __name(no_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ota.js +function ota_default() { + return { + localeError: error33() + }; +} +var error33; +var init_ota = __esm({ + "../../node_modules/zod/v4/locales/ota.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error33 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "unsur", verb: "olmal\u0131d\u0131r" }, + set: { unit: "unsur", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "giren", + email: "epostag\xE2h", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO heng\xE2m\u0131", + date: "ISO tarihi", + time: "ISO zaman\u0131", + duration: "ISO m\xFCddeti", + ipv4: "IPv4 ni\u015F\xE2n\u0131", + ipv6: "IPv6 ni\u015F\xE2n\u0131", + cidrv4: "IPv4 menzili", + cidrv6: "IPv6 menzili", + base64: "base64-\u015Fifreli metin", + base64url: "base64url-\u015Fifreli metin", + json_string: "JSON metin", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "giren" + }; + const TypeDictionary = { + nan: "NaN", + number: "numara", + array: "saf", + null: "gayb" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `F\xE2sit giren: umulan instanceof ${issue2.expected}, al\u0131nan ${received}`; + } + return `F\xE2sit giren: umulan ${expected}, al\u0131nan ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `F\xE2sit giren: umulan ${stringifyPrimitive(issue2.values[0])}`; + return `F\xE2sit tercih: m\xFBteberler ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; + return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} olmal\u0131yd\u0131.`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; + } + return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} olmal\u0131yd\u0131.`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`; + if (_issue.format === "ends_with") + return `F\xE2sit metin: "${_issue.suffix}" ile bitmeli.`; + if (_issue.format === "includes") + return `F\xE2sit metin: "${_issue.includes}" ihtiv\xE2 etmeli.`; + if (_issue.format === "regex") + return `F\xE2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`; + return `F\xE2sit ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `F\xE2sit say\u0131: ${issue2.divisor} kat\u0131 olmal\u0131yd\u0131.`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} i\xE7in tan\u0131nmayan anahtar var.`; + case "invalid_union": + return "Giren tan\u0131namad\u0131."; + case "invalid_element": + return `${issue2.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; + default: + return `K\u0131ymet tan\u0131namad\u0131.`; + } + }; + }, "error"); + __name(ota_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ps.js +function ps_default() { + return { + localeError: error34() + }; +} +var error34; +var init_ps = __esm({ + "../../node_modules/zod/v4/locales/ps.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error34 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" }, + array: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + set: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0648\u0631\u0648\u062F\u064A", + email: "\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u0644", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u064A", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A", + date: "\u0646\u06D0\u067C\u0647", + time: "\u0648\u062E\u062A", + duration: "\u0645\u0648\u062F\u0647", + ipv4: "\u062F IPv4 \u067E\u062A\u0647", + ipv6: "\u062F IPv6 \u067E\u062A\u0647", + cidrv4: "\u062F IPv4 \u0633\u0627\u062D\u0647", + cidrv6: "\u062F IPv6 \u0633\u0627\u062D\u0647", + base64: "base64-encoded \u0645\u062A\u0646", + base64url: "base64url-encoded \u0645\u062A\u0646", + json_string: "JSON \u0645\u062A\u0646", + e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u064A" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0639\u062F\u062F", + array: "\u0627\u0631\u06D0" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${issue2.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + } + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + } + case "invalid_value": + if (issue2.values.length === 1) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive(issue2.values[0])} \u0648\u0627\u06CC`; + } + return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues(issue2.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0648\u064A`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0648\u064A`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`; + } + if (_issue.format === "ends_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`; + } + if (_issue.format === "includes") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${_issue.includes}" \u0648\u0644\u0631\u064A`; + } + if (_issue.format === "regex") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`; + } + return `${FormatDictionary[_issue.format] ?? issue2.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; + } + case "not_multiple_of": + return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue2.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; + case "unrecognized_keys": + return `\u0646\u0627\u0633\u0645 ${issue2.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; + case "invalid_union": + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + case "invalid_element": + return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; + default: + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + } + }; + }, "error"); + __name(ps_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/pl.js +function pl_default() { + return { + localeError: error35() + }; +} +var error35; +var init_pl = __esm({ + "../../node_modules/zod/v4/locales/pl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error35 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "znak\xF3w", verb: "mie\u0107" }, + file: { unit: "bajt\xF3w", verb: "mie\u0107" }, + array: { unit: "element\xF3w", verb: "mie\u0107" }, + set: { unit: "element\xF3w", verb: "mie\u0107" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "wyra\u017Cenie", + email: "adres email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i godzina w formacie ISO", + date: "data w formacie ISO", + time: "godzina w formacie ISO", + duration: "czas trwania ISO", + ipv4: "adres IPv4", + ipv6: "adres IPv6", + cidrv4: "zakres IPv4", + cidrv6: "zakres IPv6", + base64: "ci\u0105g znak\xF3w zakodowany w formacie base64", + base64url: "ci\u0105g znak\xF3w zakodowany w formacie base64url", + json_string: "ci\u0105g znak\xF3w w formacie JSON", + e164: "liczba E.164", + jwt: "JWT", + template_literal: "wej\u015Bcie" + }; + const TypeDictionary = { + nan: "NaN", + number: "liczba", + array: "tablica" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${issue2.expected}, otrzymano ${received}`; + } + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${expected}, otrzymano ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive(issue2.values[0])}`; + return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`; + return `Nieprawid\u0142ow(y/a/e) ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue2.divisor}`; + case "unrecognized_keys": + return `Nierozpoznane klucze${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Nieprawid\u0142owy klucz w ${issue2.origin}`; + case "invalid_union": + return "Nieprawid\u0142owe dane wej\u015Bciowe"; + case "invalid_element": + return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue2.origin}`; + default: + return `Nieprawid\u0142owe dane wej\u015Bciowe`; + } + }; + }, "error"); + __name(pl_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/pt.js +function pt_default() { + return { + localeError: error36() + }; +} +var error36; +var init_pt = __esm({ + "../../node_modules/zod/v4/locales/pt.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error36 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "caracteres", verb: "ter" }, + file: { unit: "bytes", verb: "ter" }, + array: { unit: "itens", verb: "ter" }, + set: { unit: "itens", verb: "ter" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "padr\xE3o", + email: "endere\xE7o de e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "dura\xE7\xE3o ISO", + ipv4: "endere\xE7o IPv4", + ipv6: "endere\xE7o IPv6", + cidrv4: "faixa de IPv4", + cidrv6: "faixa de IPv6", + base64: "texto codificado em base64", + base64url: "URL codificada em base64", + json_string: "texto JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\xFAmero", + null: "nulo" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Tipo inv\xE1lido: esperado instanceof ${issue2.expected}, recebido ${received}`; + } + return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue2.values[0])}`; + return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} inv\xE1lido`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`; + case "unrecognized_keys": + return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Chave inv\xE1lida em ${issue2.origin}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido em ${issue2.origin}`; + default: + return `Campo inv\xE1lido`; + } + }; + }, "error"); + __name(pt_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ru.js +function getRussianPlural(count4, one, few, many) { + const absCount = Math.abs(count4); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; + } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; +} +function ru_default() { + return { + localeError: error37() + }; +} +var error37; +var init_ru = __esm({ + "../../node_modules/zod/v4/locales/ru.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + __name(getRussianPlural, "getRussianPlural"); + error37 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0438\u043C\u0432\u043E\u043B", + few: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", + many: "\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u0430", + many: "\u0431\u0430\u0439\u0442" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0432\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u044F", + duration: "ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64", + base64url: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url", + json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0432\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0441\u0438\u0432" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; + } + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const maxValue = Number(issue2.maximum); + const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.maximum.toString()} ${unit}`; + } + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + const minValue = Number(issue2.minimum); + const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.minimum.toString()} ${unit}`; + } + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue2.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0438" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"; + case "invalid_element": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue2.origin}`; + default: + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`; + } + }; + }, "error"); + __name(ru_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/sl.js +function sl_default() { + return { + localeError: error38() + }; +} +var error38; +var init_sl = __esm({ + "../../node_modules/zod/v4/locales/sl.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error38 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "znakov", verb: "imeti" }, + file: { unit: "bajtov", verb: "imeti" }, + array: { unit: "elementov", verb: "imeti" }, + set: { unit: "elementov", verb: "imeti" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "vnos", + email: "e-po\u0161tni naslov", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum in \u010Das", + date: "ISO datum", + time: "ISO \u010Das", + duration: "ISO trajanje", + ipv4: "IPv4 naslov", + ipv6: "IPv6 naslov", + cidrv4: "obseg IPv4", + cidrv6: "obseg IPv6", + base64: "base64 kodiran niz", + base64url: "base64url kodiran niz", + json_string: "JSON niz", + e164: "E.164 \u0161tevilka", + jwt: "JWT", + template_literal: "vnos" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0161tevilo", + array: "tabela" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Neveljaven vnos: pri\u010Dakovano instanceof ${issue2.expected}, prejeto ${received}`; + } + return `Neveljaven vnos: pri\u010Dakovano ${expected}, prejeto ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive(issue2.values[0])}`; + return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} imelo ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementov"}`; + return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} imelo ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Neveljaven niz: mora se kon\u010Dati z "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neveljaven niz: mora vsebovati "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`; + return `Neveljaven ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue2.divisor}`; + case "unrecognized_keys": + return `Neprepoznan${issue2.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Neveljaven klju\u010D v ${issue2.origin}`; + case "invalid_union": + return "Neveljaven vnos"; + case "invalid_element": + return `Neveljavna vrednost v ${issue2.origin}`; + default: + return "Neveljaven vnos"; + } + }; + }, "error"); + __name(sl_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/sv.js +function sv_default() { + return { + localeError: error39() + }; +} +var error39; +var init_sv = __esm({ + "../../node_modules/zod/v4/locales/sv.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error39 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "tecken", verb: "att ha" }, + file: { unit: "bytes", verb: "att ha" }, + array: { unit: "objekt", verb: "att inneh\xE5lla" }, + set: { unit: "objekt", verb: "att inneh\xE5lla" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "regulj\xE4rt uttryck", + email: "e-postadress", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datum och tid", + date: "ISO-datum", + time: "ISO-tid", + duration: "ISO-varaktighet", + ipv4: "IPv4-intervall", + ipv6: "IPv6-intervall", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodad str\xE4ng", + base64url: "base64url-kodad str\xE4ng", + json_string: "JSON-str\xE4ng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "mall-literal" + }; + const TypeDictionary = { + nan: "NaN", + number: "antal", + array: "lista" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${issue2.expected}, fick ${received}`; + } + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${expected}, fick ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive(issue2.values[0])}`; + return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; + } + return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Ogiltig str\xE4ng: m\xE5ste sluta med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${_issue.pattern}"`; + return `Ogiltig(t) ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue2.divisor}`; + case "unrecognized_keys": + return `${issue2.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Ogiltig nyckel i ${issue2.origin ?? "v\xE4rdet"}`; + case "invalid_union": + return "Ogiltig input"; + case "invalid_element": + return `Ogiltigt v\xE4rde i ${issue2.origin ?? "v\xE4rdet"}`; + default: + return `Ogiltig input`; + } + }; + }, "error"); + __name(sv_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ta.js +function ta_default() { + return { + localeError: error40() + }; +} +var error40; +var init_ta = __esm({ + "../../node_modules/zod/v4/locales/ta.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error40 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + array: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + set: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1", + email: "\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + date: "ISO \u0BA4\u0BC7\u0BA4\u0BBF", + time: "ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + duration: "ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1", + ipv4: "IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + ipv6: "IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + cidrv4: "IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + cidrv6: "IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + base64: "base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + base64url: "base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD", + e164: "E.164 \u0B8E\u0BA3\u0BCD", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0B8E\u0BA3\u0BCD", + array: "\u0B85\u0BA3\u0BBF", + null: "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${issue2.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; + } + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues(issue2.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue2.origin} ${adj}${issue2.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "ends_with") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "includes") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "regex") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue2.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + case "unrecognized_keys": + return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue2.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`; + case "invalid_union": + return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"; + case "invalid_element": + return `${issue2.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`; + default: + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`; + } + }; + }, "error"); + __name(ta_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/th.js +function th_default() { + return { + localeError: error41() + }; +} +var error41; +var init_th = __esm({ + "../../node_modules/zod/v4/locales/th.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error41 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19", + email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25", + url: "URL", + emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO", + time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4", + ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6", + cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4", + cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6", + base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64", + base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL", + json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON", + e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)", + jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT", + template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02", + array: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)", + null: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue2.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; + } + return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive(issue2.values[0])}`; + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${_issue.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`; + if (_issue.format === "regex") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`; + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue2.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`; + case "unrecognized_keys": + return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; + case "invalid_union": + return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49"; + case "invalid_element": + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; + default: + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`; + } + }; + }, "error"); + __name(th_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/tr.js +function tr_default() { + return { + localeError: error42() + }; +} +var error42; +var init_tr = __esm({ + "../../node_modules/zod/v4/locales/tr.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error42 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "karakter", verb: "olmal\u0131" }, + file: { unit: "bayt", verb: "olmal\u0131" }, + array: { unit: "\xF6\u011Fe", verb: "olmal\u0131" }, + set: { unit: "\xF6\u011Fe", verb: "olmal\u0131" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "girdi", + email: "e-posta adresi", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO tarih ve saat", + date: "ISO tarih", + time: "ISO saat", + duration: "ISO s\xFCre", + ipv4: "IPv4 adresi", + ipv6: "IPv6 adresi", + cidrv4: "IPv4 aral\u0131\u011F\u0131", + cidrv6: "IPv6 aral\u0131\u011F\u0131", + base64: "base64 ile \u015Fifrelenmi\u015F metin", + base64url: "base64url ile \u015Fifrelenmi\u015F metin", + json_string: "JSON dizesi", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "\u015Eablon dizesi" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Ge\xE7ersiz de\u011Fer: beklenen instanceof ${issue2.expected}, al\u0131nan ${received}`; + } + return `Ge\xE7ersiz de\u011Fer: beklenen ${expected}, al\u0131nan ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive(issue2.values[0])}`; + return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; + return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`; + if (_issue.format === "ends_with") + return `Ge\xE7ersiz metin: "${_issue.suffix}" ile bitmeli`; + if (_issue.format === "includes") + return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`; + if (_issue.format === "regex") + return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`; + return `Ge\xE7ersiz ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Ge\xE7ersiz say\u0131: ${issue2.divisor} ile tam b\xF6l\xFCnebilmeli`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} i\xE7inde ge\xE7ersiz anahtar`; + case "invalid_union": + return "Ge\xE7ersiz de\u011Fer"; + case "invalid_element": + return `${issue2.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; + default: + return `Ge\xE7ersiz de\u011Fer`; + } + }; + }, "error"); + __name(tr_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/uk.js +function uk_default() { + return { + localeError: error43() + }; +} +var error43; +var init_uk = __esm({ + "../../node_modules/zod/v4/locales/uk.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error43 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438", + url: "URL", + emoji: "\u0435\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO", + date: "\u0434\u0430\u0442\u0430 ISO", + time: "\u0447\u0430\u0441 ISO", + duration: "\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO", + ipv4: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv4", + ipv6: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv6", + cidrv4: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4", + cidrv6: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6", + base64: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64", + base64url: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url", + json_string: "\u0440\u044F\u0434\u043E\u043A JSON", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0438\u0432" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${issue2.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; + } + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive(issue2.values[0])}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue2.origin} \u0431\u0443\u0434\u0435 ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue2.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0456" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue2.origin}`; + case "invalid_union": + return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"; + case "invalid_element": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue2.origin}`; + default: + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`; + } + }; + }, "error"); + __name(uk_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ua.js +function ua_default() { + return uk_default(); +} +var init_ua = __esm({ + "../../node_modules/zod/v4/locales/ua.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_uk(); + __name(ua_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/ur.js +function ur_default() { + return { + localeError: error44() + }; +} +var error44; +var init_ur = __esm({ + "../../node_modules/zod/v4/locales/ur.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error44 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, + file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" }, + array: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" }, + set: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0627\u0646 \u067E\u0679", + email: "\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + uuidv4: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4", + uuidv6: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6", + nanoid: "\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC", + guid: "\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid2: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2", + ulid: "\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC", + xid: "\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC", + ksuid: "\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + datetime: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645", + date: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E", + time: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A", + duration: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A", + ipv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633", + ipv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633", + cidrv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C", + cidrv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C", + base64: "\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + base64url: "\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF", + e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631", + jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC", + template_literal: "\u0627\u0646 \u067E\u0679" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0646\u0645\u0628\u0631", + array: "\u0622\u0631\u06D2", + null: "\u0646\u0644" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${issue2.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + } + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive(issue2.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues(issue2.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue2.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u06D2 ${adj}${issue2.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + } + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u0627 ${adj}${issue2.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + } + if (_issue.format === "ends_with") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "includes") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "regex") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + return `\u063A\u0644\u0637 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue2.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + case "unrecognized_keys": + return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue2.keys.length > 1 ? "\u0632" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; + case "invalid_key": + return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; + case "invalid_union": + return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"; + case "invalid_element": + return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; + default: + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`; + } + }; + }, "error"); + __name(ur_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/uz.js +function uz_default() { + return { + localeError: error45() + }; +} +var error45; +var init_uz = __esm({ + "../../node_modules/zod/v4/locales/uz.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error45 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "belgi", verb: "bo\u2018lishi kerak" }, + file: { unit: "bayt", verb: "bo\u2018lishi kerak" }, + array: { unit: "element", verb: "bo\u2018lishi kerak" }, + set: { unit: "element", verb: "bo\u2018lishi kerak" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "kirish", + email: "elektron pochta manzili", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO sana va vaqti", + date: "ISO sana", + time: "ISO vaqt", + duration: "ISO davomiylik", + ipv4: "IPv4 manzil", + ipv6: "IPv6 manzil", + mac: "MAC manzil", + cidrv4: "IPv4 diapazon", + cidrv6: "IPv6 diapazon", + base64: "base64 kodlangan satr", + base64url: "base64url kodlangan satr", + json_string: "JSON satr", + e164: "E.164 raqam", + jwt: "JWT", + template_literal: "kirish" + }; + const TypeDictionary = { + nan: "NaN", + number: "raqam", + array: "massiv" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `Noto\u2018g\u2018ri kirish: kutilgan instanceof ${issue2.expected}, qabul qilingan ${received}`; + } + return `Noto\u2018g\u2018ri kirish: kutilgan ${expected}, qabul qilingan ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `Noto\u2018g\u2018ri kirish: kutilgan ${stringifyPrimitive(issue2.values[0])}`; + return `Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Juda katta: kutilgan ${issue2.origin ?? "qiymat"} ${adj}${issue2.maximum.toString()} ${sizing.unit} ${sizing.verb}`; + return `Juda katta: kutilgan ${issue2.origin ?? "qiymat"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Juda kichik: kutilgan ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} ${sizing.verb}`; + } + return `Juda kichik: kutilgan ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Noto\u2018g\u2018ri satr: "${_issue.prefix}" bilan boshlanishi kerak`; + if (_issue.format === "ends_with") + return `Noto\u2018g\u2018ri satr: "${_issue.suffix}" bilan tugashi kerak`; + if (_issue.format === "includes") + return `Noto\u2018g\u2018ri satr: "${_issue.includes}" ni o\u2018z ichiga olishi kerak`; + if (_issue.format === "regex") + return `Noto\u2018g\u2018ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`; + return `Noto\u2018g\u2018ri ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `Noto\u2018g\u2018ri raqam: ${issue2.divisor} ning karralisi bo\u2018lishi kerak`; + case "unrecognized_keys": + return `Noma\u2019lum kalit${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} dagi kalit noto\u2018g\u2018ri`; + case "invalid_union": + return "Noto\u2018g\u2018ri kirish"; + case "invalid_element": + return `${issue2.origin} da noto\u2018g\u2018ri qiymat`; + default: + return `Noto\u2018g\u2018ri kirish`; + } + }; + }, "error"); + __name(uz_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/vi.js +function vi_default() { + return { + localeError: error46() + }; +} +var error46; +var init_vi = __esm({ + "../../node_modules/zod/v4/locales/vi.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error46 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, + file: { unit: "byte", verb: "c\xF3" }, + array: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" }, + set: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u0111\u1EA7u v\xE0o", + email: "\u0111\u1ECBa ch\u1EC9 email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ng\xE0y gi\u1EDD ISO", + date: "ng\xE0y ISO", + time: "gi\u1EDD ISO", + duration: "kho\u1EA3ng th\u1EDDi gian ISO", + ipv4: "\u0111\u1ECBa ch\u1EC9 IPv4", + ipv6: "\u0111\u1ECBa ch\u1EC9 IPv6", + cidrv4: "d\u1EA3i IPv4", + cidrv6: "d\u1EA3i IPv6", + base64: "chu\u1ED7i m\xE3 h\xF3a base64", + base64url: "chu\u1ED7i m\xE3 h\xF3a base64url", + json_string: "chu\u1ED7i JSON", + e164: "s\u1ED1 E.164", + jwt: "JWT", + template_literal: "\u0111\u1EA7u v\xE0o" + }; + const TypeDictionary = { + nan: "NaN", + number: "s\u1ED1", + array: "m\u1EA3ng" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${issue2.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; + } + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive(issue2.values[0])}`; + return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${_issue.includes}"`; + if (_issue.format === "regex") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue2.format} kh\xF4ng h\u1EE3p l\u1EC7`; + } + case "not_multiple_of": + return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue2.divisor}`; + case "unrecognized_keys": + return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; + case "invalid_union": + return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"; + case "invalid_element": + return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; + default: + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`; + } + }; + }, "error"); + __name(vi_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/zh-CN.js +function zh_CN_default() { + return { + localeError: error47() + }; +} +var error47; +var init_zh_CN = __esm({ + "../../node_modules/zod/v4/locales/zh-CN.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error47 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, + file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" }, + array: { unit: "\u9879", verb: "\u5305\u542B" }, + set: { unit: "\u9879", verb: "\u5305\u542B" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u8F93\u5165", + email: "\u7535\u5B50\u90AE\u4EF6", + url: "URL", + emoji: "\u8868\u60C5\u7B26\u53F7", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u671F\u65F6\u95F4", + date: "ISO\u65E5\u671F", + time: "ISO\u65F6\u95F4", + duration: "ISO\u65F6\u957F", + ipv4: "IPv4\u5730\u5740", + ipv6: "IPv6\u5730\u5740", + cidrv4: "IPv4\u7F51\u6BB5", + cidrv6: "IPv6\u7F51\u6BB5", + base64: "base64\u7F16\u7801\u5B57\u7B26\u4E32", + base64url: "base64url\u7F16\u7801\u5B57\u7B26\u4E32", + json_string: "JSON\u5B57\u7B26\u4E32", + e164: "E.164\u53F7\u7801", + jwt: "JWT", + template_literal: "\u8F93\u5165" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u6570\u5B57", + array: "\u6570\u7EC4", + null: "\u7A7A\u503C(null)" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${issue2.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; + } + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive(issue2.values[0])}`; + return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`; + if (_issue.format === "ends_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.suffix}" \u7ED3\u5C3E`; + if (_issue.format === "includes") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`; + return `\u65E0\u6548${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue2.divisor} \u7684\u500D\u6570`; + case "unrecognized_keys": + return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `${issue2.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; + case "invalid_union": + return "\u65E0\u6548\u8F93\u5165"; + case "invalid_element": + return `${issue2.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; + default: + return `\u65E0\u6548\u8F93\u5165`; + } + }; + }, "error"); + __name(zh_CN_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/zh-TW.js +function zh_TW_default() { + return { + localeError: error48() + }; +} +var error48; +var init_zh_TW = __esm({ + "../../node_modules/zod/v4/locales/zh-TW.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error48 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, + file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" }, + array: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" }, + set: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u8F38\u5165", + email: "\u90F5\u4EF6\u5730\u5740", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u65E5\u671F\u6642\u9593", + date: "ISO \u65E5\u671F", + time: "ISO \u6642\u9593", + duration: "ISO \u671F\u9593", + ipv4: "IPv4 \u4F4D\u5740", + ipv6: "IPv6 \u4F4D\u5740", + cidrv4: "IPv4 \u7BC4\u570D", + cidrv6: "IPv6 \u7BC4\u570D", + base64: "base64 \u7DE8\u78BC\u5B57\u4E32", + base64url: "base64url \u7DE8\u78BC\u5B57\u4E32", + json_string: "JSON \u5B57\u4E32", + e164: "E.164 \u6578\u503C", + jwt: "JWT", + template_literal: "\u8F38\u5165" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${issue2.expected}\uFF0C\u4F46\u6536\u5230 ${received}`; + } + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${expected}\uFF0C\u4F46\u6536\u5230 ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive(issue2.values[0])}`; + return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) { + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + } + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") { + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`; + } + if (_issue.format === "ends_with") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.suffix}" \u7D50\u5C3E`; + if (_issue.format === "includes") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`; + return `\u7121\u6548\u7684 ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue2.divisor} \u7684\u500D\u6578`; + case "unrecognized_keys": + return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue2.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues(issue2.keys, "\u3001")}`; + case "invalid_key": + return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; + case "invalid_union": + return "\u7121\u6548\u7684\u8F38\u5165\u503C"; + case "invalid_element": + return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; + default: + return `\u7121\u6548\u7684\u8F38\u5165\u503C`; + } + }; + }, "error"); + __name(zh_TW_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/yo.js +function yo_default() { + return { + localeError: error49() + }; +} +var error49; +var init_yo = __esm({ + "../../node_modules/zod/v4/locales/yo.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util3(); + error49 = /* @__PURE__ */ __name(() => { + const Sizable = { + string: { unit: "\xE0mi", verb: "n\xED" }, + file: { unit: "bytes", verb: "n\xED" }, + array: { unit: "nkan", verb: "n\xED" }, + set: { unit: "nkan", verb: "n\xED" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + __name(getSizing, "getSizing"); + const FormatDictionary = { + regex: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9", + email: "\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\xE0k\xF3k\xF2 ISO", + date: "\u1ECDj\u1ECD\u0301 ISO", + time: "\xE0k\xF3k\xF2 ISO", + duration: "\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO", + ipv4: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv4", + ipv6: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv6", + cidrv4: "\xE0gb\xE8gb\xE8 IPv4", + cidrv6: "\xE0gb\xE8gb\xE8 IPv6", + base64: "\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64", + base64url: "\u1ECD\u0300r\u1ECD\u0300 base64url", + json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON", + e164: "n\u1ECD\u0301mb\xE0 E.164", + jwt: "JWT", + template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\u1ECD\u0301mb\xE0", + array: "akop\u1ECD" + }; + return (issue2) => { + switch (issue2.code) { + case "invalid_type": { + const expected = TypeDictionary[issue2.expected] ?? issue2.expected; + const receivedType = parsedType(issue2.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue2.expected)) { + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${issue2.expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; + } + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; + } + case "invalid_value": + if (issue2.values.length === 1) + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${stringifyPrimitive(issue2.values[0])}`; + return `\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${joinValues(issue2.values, "|")}`; + case "too_big": { + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue2.origin ?? "iye"} ${sizing.verb} ${adj}${issue2.maximum} ${sizing.unit}`; + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue2.maximum}`; + } + case "too_small": { + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); + if (sizing) + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum} ${sizing.unit}`; + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue2.minimum}`; + } + case "invalid_format": { + const _issue = issue2; + if (_issue.format === "starts_with") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`; + return `A\u1E63\xEC\u1E63e: ${FormatDictionary[_issue.format] ?? issue2.format}`; + } + case "not_multiple_of": + return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${issue2.divisor}`; + case "unrecognized_keys": + return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${joinValues(issue2.keys, ", ")}`; + case "invalid_key": + return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue2.origin}`; + case "invalid_union": + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + case "invalid_element": + return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue2.origin}`; + default: + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + } + }; + }, "error"); + __name(yo_default, "default"); + } +}); + +// ../../node_modules/zod/v4/locales/index.js +var locales_exports = {}; +__export(locales_exports, { + ar: () => ar_default, + az: () => az_default, + be: () => be_default, + bg: () => bg_default, + ca: () => ca_default, + cs: () => cs_default, + da: () => da_default, + de: () => de_default, + en: () => en_default, + eo: () => eo_default, + es: () => es_default, + fa: () => fa_default, + fi: () => fi_default, + fr: () => fr_default, + frCA: () => fr_CA_default, + he: () => he_default, + hu: () => hu_default, + hy: () => hy_default, + id: () => id_default, + is: () => is_default, + it: () => it_default, + ja: () => ja_default, + ka: () => ka_default, + kh: () => kh_default, + km: () => km_default, + ko: () => ko_default, + lt: () => lt_default, + mk: () => mk_default, + ms: () => ms_default, + nl: () => nl_default, + no: () => no_default, + ota: () => ota_default, + pl: () => pl_default, + ps: () => ps_default, + pt: () => pt_default, + ru: () => ru_default, + sl: () => sl_default, + sv: () => sv_default, + ta: () => ta_default, + th: () => th_default, + tr: () => tr_default, + ua: () => ua_default, + uk: () => uk_default, + ur: () => ur_default, + uz: () => uz_default, + vi: () => vi_default, + yo: () => yo_default, + zhCN: () => zh_CN_default, + zhTW: () => zh_TW_default +}); +var init_locales = __esm({ + "../../node_modules/zod/v4/locales/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_ar(); + init_az(); + init_be(); + init_bg(); + init_ca(); + init_cs(); + init_da(); + init_de(); + init_en(); + init_eo(); + init_es(); + init_fa(); + init_fi(); + init_fr(); + init_fr_CA(); + init_he(); + init_hu(); + init_hy(); + init_id(); + init_is(); + init_it(); + init_ja(); + init_ka(); + init_kh(); + init_km(); + init_ko(); + init_lt(); + init_mk(); + init_ms(); + init_nl(); + init_no(); + init_ota(); + init_ps(); + init_pl(); + init_pt(); + init_ru(); + init_sl(); + init_sv(); + init_ta(); + init_th(); + init_tr(); + init_ua(); + init_uk(); + init_ur(); + init_uz(); + init_vi(); + init_zh_CN(); + init_zh_TW(); + init_yo(); + } +}); + +// ../../node_modules/zod/v4/core/registries.js +function registry() { + return new $ZodRegistry(); +} +var _a123, $output, $input, $ZodRegistry, globalRegistry; +var init_registries = __esm({ + "../../node_modules/zod/v4/core/registries.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + $output = Symbol("ZodOutput"); + $input = Symbol("ZodInput"); + $ZodRegistry = class { + constructor() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + } + add(schema, ..._meta) { + const meta3 = _meta[0]; + this._map.set(schema, meta3); + if (meta3 && typeof meta3 === "object" && "id" in meta3) { + this._idmap.set(meta3.id, schema); + } + return this; + } + clear() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + return this; + } + remove(schema) { + const meta3 = this._map.get(schema); + if (meta3 && typeof meta3 === "object" && "id" in meta3) { + this._idmap.delete(meta3.id); + } + this._map.delete(schema); + return this; + } + get(schema) { + const p2 = schema._zod.parent; + if (p2) { + const pm = { ...this.get(p2) ?? {} }; + delete pm.id; + const f2 = { ...pm, ...this._map.get(schema) }; + return Object.keys(f2).length ? f2 : void 0; + } + return this._map.get(schema); + } + has(schema) { + return this._map.has(schema); + } + }; + __name($ZodRegistry, "$ZodRegistry"); + __name(registry, "registry"); + (_a123 = globalThis).__zod_globalRegistry ?? (_a123.__zod_globalRegistry = registry()); + globalRegistry = globalThis.__zod_globalRegistry; + } +}); + +// ../../node_modules/zod/v4/core/api.js +function _string(Class2, params) { + return new Class2({ + type: "string", + ...normalizeParams(params) + }); +} +function _coercedString(Class2, params) { + return new Class2({ + type: "string", + coerce: true, + ...normalizeParams(params) + }); +} +function _email(Class2, params) { + return new Class2({ + type: "string", + format: "email", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _guid(Class2, params) { + return new Class2({ + type: "string", + format: "guid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _uuid(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _uuidv4(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v4", + ...normalizeParams(params) + }); +} +function _uuidv6(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v6", + ...normalizeParams(params) + }); +} +function _uuidv7(Class2, params) { + return new Class2({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v7", + ...normalizeParams(params) + }); +} +function _url(Class2, params) { + return new Class2({ + type: "string", + format: "url", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _emoji2(Class2, params) { + return new Class2({ + type: "string", + format: "emoji", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _nanoid(Class2, params) { + return new Class2({ + type: "string", + format: "nanoid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cuid(Class2, params) { + return new Class2({ + type: "string", + format: "cuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cuid2(Class2, params) { + return new Class2({ + type: "string", + format: "cuid2", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ulid(Class2, params) { + return new Class2({ + type: "string", + format: "ulid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _xid(Class2, params) { + return new Class2({ + type: "string", + format: "xid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ksuid(Class2, params) { + return new Class2({ + type: "string", + format: "ksuid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ipv4(Class2, params) { + return new Class2({ + type: "string", + format: "ipv4", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _ipv6(Class2, params) { + return new Class2({ + type: "string", + format: "ipv6", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _mac(Class2, params) { + return new Class2({ + type: "string", + format: "mac", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cidrv4(Class2, params) { + return new Class2({ + type: "string", + format: "cidrv4", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _cidrv6(Class2, params) { + return new Class2({ + type: "string", + format: "cidrv6", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _base64(Class2, params) { + return new Class2({ + type: "string", + format: "base64", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _base64url(Class2, params) { + return new Class2({ + type: "string", + format: "base64url", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _e164(Class2, params) { + return new Class2({ + type: "string", + format: "e164", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _jwt(Class2, params) { + return new Class2({ + type: "string", + format: "jwt", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); +} +function _isoDateTime(Class2, params) { + return new Class2({ + type: "string", + format: "datetime", + check: "string_format", + offset: false, + local: false, + precision: null, + ...normalizeParams(params) + }); +} +function _isoDate(Class2, params) { + return new Class2({ + type: "string", + format: "date", + check: "string_format", + ...normalizeParams(params) + }); +} +function _isoTime(Class2, params) { + return new Class2({ + type: "string", + format: "time", + check: "string_format", + precision: null, + ...normalizeParams(params) + }); +} +function _isoDuration(Class2, params) { + return new Class2({ + type: "string", + format: "duration", + check: "string_format", + ...normalizeParams(params) + }); +} +function _number(Class2, params) { + return new Class2({ + type: "number", + checks: [], + ...normalizeParams(params) + }); +} +function _coercedNumber(Class2, params) { + return new Class2({ + type: "number", + coerce: true, + checks: [], + ...normalizeParams(params) + }); +} +function _int(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "safeint", + ...normalizeParams(params) + }); +} +function _float32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "float32", + ...normalizeParams(params) + }); +} +function _float64(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "float64", + ...normalizeParams(params) + }); +} +function _int32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "int32", + ...normalizeParams(params) + }); +} +function _uint32(Class2, params) { + return new Class2({ + type: "number", + check: "number_format", + abort: false, + format: "uint32", + ...normalizeParams(params) + }); +} +function _boolean(Class2, params) { + return new Class2({ + type: "boolean", + ...normalizeParams(params) + }); +} +function _coercedBoolean(Class2, params) { + return new Class2({ + type: "boolean", + coerce: true, + ...normalizeParams(params) + }); +} +function _bigint(Class2, params) { + return new Class2({ + type: "bigint", + ...normalizeParams(params) + }); +} +function _coercedBigint(Class2, params) { + return new Class2({ + type: "bigint", + coerce: true, + ...normalizeParams(params) + }); +} +function _int64(Class2, params) { + return new Class2({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "int64", + ...normalizeParams(params) + }); +} +function _uint64(Class2, params) { + return new Class2({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "uint64", + ...normalizeParams(params) + }); +} +function _symbol(Class2, params) { + return new Class2({ + type: "symbol", + ...normalizeParams(params) + }); +} +function _undefined2(Class2, params) { + return new Class2({ + type: "undefined", + ...normalizeParams(params) + }); +} +function _null2(Class2, params) { + return new Class2({ + type: "null", + ...normalizeParams(params) + }); +} +function _any(Class2) { + return new Class2({ + type: "any" + }); +} +function _unknown(Class2) { + return new Class2({ + type: "unknown" + }); +} +function _never(Class2, params) { + return new Class2({ + type: "never", + ...normalizeParams(params) + }); +} +function _void(Class2, params) { + return new Class2({ + type: "void", + ...normalizeParams(params) + }); +} +function _date(Class2, params) { + return new Class2({ + type: "date", + ...normalizeParams(params) + }); +} +function _coercedDate(Class2, params) { + return new Class2({ + type: "date", + coerce: true, + ...normalizeParams(params) + }); +} +function _nan(Class2, params) { + return new Class2({ + type: "nan", + ...normalizeParams(params) + }); +} +function _lt(value, params) { + return new $ZodCheckLessThan({ + check: "less_than", + ...normalizeParams(params), + value, + inclusive: false + }); +} +function _lte(value, params) { + return new $ZodCheckLessThan({ + check: "less_than", + ...normalizeParams(params), + value, + inclusive: true + }); +} +function _gt(value, params) { + return new $ZodCheckGreaterThan({ + check: "greater_than", + ...normalizeParams(params), + value, + inclusive: false + }); +} +function _gte(value, params) { + return new $ZodCheckGreaterThan({ + check: "greater_than", + ...normalizeParams(params), + value, + inclusive: true + }); +} +function _positive(params) { + return _gt(0, params); +} +function _negative(params) { + return _lt(0, params); +} +function _nonpositive(params) { + return _lte(0, params); +} +function _nonnegative(params) { + return _gte(0, params); +} +function _multipleOf(value, params) { + return new $ZodCheckMultipleOf({ + check: "multiple_of", + ...normalizeParams(params), + value + }); +} +function _maxSize(maximum, params) { + return new $ZodCheckMaxSize({ + check: "max_size", + ...normalizeParams(params), + maximum + }); +} +function _minSize(minimum, params) { + return new $ZodCheckMinSize({ + check: "min_size", + ...normalizeParams(params), + minimum + }); +} +function _size(size, params) { + return new $ZodCheckSizeEquals({ + check: "size_equals", + ...normalizeParams(params), + size + }); +} +function _maxLength(maximum, params) { + const ch2 = new $ZodCheckMaxLength({ + check: "max_length", + ...normalizeParams(params), + maximum + }); + return ch2; +} +function _minLength(minimum, params) { + return new $ZodCheckMinLength({ + check: "min_length", + ...normalizeParams(params), + minimum + }); +} +function _length(length, params) { + return new $ZodCheckLengthEquals({ + check: "length_equals", + ...normalizeParams(params), + length + }); +} +function _regex(pattern, params) { + return new $ZodCheckRegex({ + check: "string_format", + format: "regex", + ...normalizeParams(params), + pattern + }); +} +function _lowercase(params) { + return new $ZodCheckLowerCase({ + check: "string_format", + format: "lowercase", + ...normalizeParams(params) + }); +} +function _uppercase(params) { + return new $ZodCheckUpperCase({ + check: "string_format", + format: "uppercase", + ...normalizeParams(params) + }); +} +function _includes(includes, params) { + return new $ZodCheckIncludes({ + check: "string_format", + format: "includes", + ...normalizeParams(params), + includes + }); +} +function _startsWith(prefix, params) { + return new $ZodCheckStartsWith({ + check: "string_format", + format: "starts_with", + ...normalizeParams(params), + prefix + }); +} +function _endsWith(suffix, params) { + return new $ZodCheckEndsWith({ + check: "string_format", + format: "ends_with", + ...normalizeParams(params), + suffix + }); +} +function _property(property, schema, params) { + return new $ZodCheckProperty({ + check: "property", + property, + schema, + ...normalizeParams(params) + }); +} +function _mime(types, params) { + return new $ZodCheckMimeType({ + check: "mime_type", + mime: types, + ...normalizeParams(params) + }); +} +function _overwrite(tx) { + return new $ZodCheckOverwrite({ + check: "overwrite", + tx + }); +} +function _normalize(form) { + return _overwrite((input) => input.normalize(form)); +} +function _trim() { + return _overwrite((input) => input.trim()); +} +function _toLowerCase() { + return _overwrite((input) => input.toLowerCase()); +} +function _toUpperCase() { + return _overwrite((input) => input.toUpperCase()); +} +function _slugify() { + return _overwrite((input) => slugify(input)); +} +function _array(Class2, element, params) { + return new Class2({ + type: "array", + element, + // get element() { + // return element; + // }, + ...normalizeParams(params) + }); +} +function _union(Class2, options, params) { + return new Class2({ + type: "union", + options, + ...normalizeParams(params) + }); +} +function _xor(Class2, options, params) { + return new Class2({ + type: "union", + options, + inclusive: false, + ...normalizeParams(params) + }); +} +function _discriminatedUnion(Class2, discriminator, options, params) { + return new Class2({ + type: "union", + options, + discriminator, + ...normalizeParams(params) + }); +} +function _intersection(Class2, left, right) { + return new Class2({ + type: "intersection", + left, + right + }); +} +function _tuple(Class2, items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new Class2({ + type: "tuple", + items, + rest, + ...normalizeParams(params) + }); +} +function _record(Class2, keyType, valueType, params) { + return new Class2({ + type: "record", + keyType, + valueType, + ...normalizeParams(params) + }); +} +function _map(Class2, keyType, valueType, params) { + return new Class2({ + type: "map", + keyType, + valueType, + ...normalizeParams(params) + }); +} +function _set(Class2, valueType, params) { + return new Class2({ + type: "set", + valueType, + ...normalizeParams(params) + }); +} +function _enum(Class2, values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v3) => [v3, v3])) : values; + return new Class2({ + type: "enum", + entries, + ...normalizeParams(params) + }); +} +function _nativeEnum(Class2, entries, params) { + return new Class2({ + type: "enum", + entries, + ...normalizeParams(params) + }); +} +function _literal(Class2, value, params) { + return new Class2({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...normalizeParams(params) + }); +} +function _file(Class2, params) { + return new Class2({ + type: "file", + ...normalizeParams(params) + }); +} +function _transform(Class2, fn) { + return new Class2({ + type: "transform", + transform: fn + }); +} +function _optional(Class2, innerType) { + return new Class2({ + type: "optional", + innerType + }); +} +function _nullable(Class2, innerType) { + return new Class2({ + type: "nullable", + innerType + }); +} +function _default(Class2, innerType, defaultValue) { + return new Class2({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue); + } + }); +} +function _nonoptional(Class2, innerType, params) { + return new Class2({ + type: "nonoptional", + innerType, + ...normalizeParams(params) + }); +} +function _success(Class2, innerType) { + return new Class2({ + type: "success", + innerType + }); +} +function _catch(Class2, innerType, catchValue) { + return new Class2({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +function _pipe(Class2, in_, out) { + return new Class2({ + type: "pipe", + in: in_, + out + }); +} +function _readonly(Class2, innerType) { + return new Class2({ + type: "readonly", + innerType + }); +} +function _templateLiteral(Class2, parts, params) { + return new Class2({ + type: "template_literal", + parts, + ...normalizeParams(params) + }); +} +function _lazy(Class2, getter) { + return new Class2({ + type: "lazy", + getter + }); +} +function _promise(Class2, innerType) { + return new Class2({ + type: "promise", + innerType + }); +} +function _custom(Class2, fn, _params) { + const norm = normalizeParams(_params); + norm.abort ?? (norm.abort = true); + const schema = new Class2({ + type: "custom", + check: "custom", + fn, + ...norm + }); + return schema; +} +function _refine(Class2, fn, _params) { + const schema = new Class2({ + type: "custom", + check: "custom", + fn, + ...normalizeParams(_params) + }); + return schema; +} +function _superRefine(fn) { + const ch2 = _check((payload) => { + payload.addIssue = (issue2) => { + if (typeof issue2 === "string") { + payload.issues.push(issue(issue2, payload.value, ch2._zod.def)); + } else { + const _issue = issue2; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = ch2); + _issue.continue ?? (_issue.continue = !ch2._zod.def.abort); + payload.issues.push(issue(_issue)); + } + }; + return fn(payload.value, payload); + }); + return ch2; +} +function _check(fn, params) { + const ch2 = new $ZodCheck({ + check: "custom", + ...normalizeParams(params) + }); + ch2._zod.check = fn; + return ch2; +} +function describe(description) { + const ch2 = new $ZodCheck({ check: "describe" }); + ch2._zod.onattach = [ + (inst) => { + const existing = globalRegistry.get(inst) ?? {}; + globalRegistry.add(inst, { ...existing, description }); + } + ]; + ch2._zod.check = () => { + }; + return ch2; +} +function meta(metadata) { + const ch2 = new $ZodCheck({ check: "meta" }); + ch2._zod.onattach = [ + (inst) => { + const existing = globalRegistry.get(inst) ?? {}; + globalRegistry.add(inst, { ...existing, ...metadata }); + } + ]; + ch2._zod.check = () => { + }; + return ch2; +} +function _stringbool(Classes, _params) { + const params = normalizeParams(_params); + let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"]; + let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"]; + if (params.case !== "sensitive") { + truthyArray = truthyArray.map((v3) => typeof v3 === "string" ? v3.toLowerCase() : v3); + falsyArray = falsyArray.map((v3) => typeof v3 === "string" ? v3.toLowerCase() : v3); + } + const truthySet = new Set(truthyArray); + const falsySet = new Set(falsyArray); + const _Codec = Classes.Codec ?? $ZodCodec; + const _Boolean = Classes.Boolean ?? $ZodBoolean; + const _String = Classes.String ?? $ZodString; + const stringSchema = new _String({ type: "string", error: params.error }); + const booleanSchema = new _Boolean({ type: "boolean", error: params.error }); + const codec2 = new _Codec({ + type: "pipe", + in: stringSchema, + out: booleanSchema, + transform: (input, payload) => { + let data = input; + if (params.case !== "sensitive") + data = data.toLowerCase(); + if (truthySet.has(data)) { + return true; + } else if (falsySet.has(data)) { + return false; + } else { + payload.issues.push({ + code: "invalid_value", + expected: "stringbool", + values: [...truthySet, ...falsySet], + input: payload.value, + inst: codec2, + continue: false + }); + return {}; + } + }, + reverseTransform: (input, _payload) => { + if (input === true) { + return truthyArray[0] || "true"; + } else { + return falsyArray[0] || "false"; + } + }, + error: params.error + }); + return codec2; +} +function _stringFormat(Class2, format2, fnOrRegex, _params = {}) { + const params = normalizeParams(_params); + const def = { + ...normalizeParams(_params), + check: "string_format", + type: "string", + format: format2, + fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val), + ...params + }; + if (fnOrRegex instanceof RegExp) { + def.pattern = fnOrRegex; + } + const inst = new Class2(def); + return inst; +} +var TimePrecision; +var init_api = __esm({ + "../../node_modules/zod/v4/core/api.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_checks2(); + init_registries(); + init_schemas(); + init_util3(); + __name(_string, "_string"); + __name(_coercedString, "_coercedString"); + __name(_email, "_email"); + __name(_guid, "_guid"); + __name(_uuid, "_uuid"); + __name(_uuidv4, "_uuidv4"); + __name(_uuidv6, "_uuidv6"); + __name(_uuidv7, "_uuidv7"); + __name(_url, "_url"); + __name(_emoji2, "_emoji"); + __name(_nanoid, "_nanoid"); + __name(_cuid, "_cuid"); + __name(_cuid2, "_cuid2"); + __name(_ulid, "_ulid"); + __name(_xid, "_xid"); + __name(_ksuid, "_ksuid"); + __name(_ipv4, "_ipv4"); + __name(_ipv6, "_ipv6"); + __name(_mac, "_mac"); + __name(_cidrv4, "_cidrv4"); + __name(_cidrv6, "_cidrv6"); + __name(_base64, "_base64"); + __name(_base64url, "_base64url"); + __name(_e164, "_e164"); + __name(_jwt, "_jwt"); + TimePrecision = { + Any: null, + Minute: -1, + Second: 0, + Millisecond: 3, + Microsecond: 6 + }; + __name(_isoDateTime, "_isoDateTime"); + __name(_isoDate, "_isoDate"); + __name(_isoTime, "_isoTime"); + __name(_isoDuration, "_isoDuration"); + __name(_number, "_number"); + __name(_coercedNumber, "_coercedNumber"); + __name(_int, "_int"); + __name(_float32, "_float32"); + __name(_float64, "_float64"); + __name(_int32, "_int32"); + __name(_uint32, "_uint32"); + __name(_boolean, "_boolean"); + __name(_coercedBoolean, "_coercedBoolean"); + __name(_bigint, "_bigint"); + __name(_coercedBigint, "_coercedBigint"); + __name(_int64, "_int64"); + __name(_uint64, "_uint64"); + __name(_symbol, "_symbol"); + __name(_undefined2, "_undefined"); + __name(_null2, "_null"); + __name(_any, "_any"); + __name(_unknown, "_unknown"); + __name(_never, "_never"); + __name(_void, "_void"); + __name(_date, "_date"); + __name(_coercedDate, "_coercedDate"); + __name(_nan, "_nan"); + __name(_lt, "_lt"); + __name(_lte, "_lte"); + __name(_gt, "_gt"); + __name(_gte, "_gte"); + __name(_positive, "_positive"); + __name(_negative, "_negative"); + __name(_nonpositive, "_nonpositive"); + __name(_nonnegative, "_nonnegative"); + __name(_multipleOf, "_multipleOf"); + __name(_maxSize, "_maxSize"); + __name(_minSize, "_minSize"); + __name(_size, "_size"); + __name(_maxLength, "_maxLength"); + __name(_minLength, "_minLength"); + __name(_length, "_length"); + __name(_regex, "_regex"); + __name(_lowercase, "_lowercase"); + __name(_uppercase, "_uppercase"); + __name(_includes, "_includes"); + __name(_startsWith, "_startsWith"); + __name(_endsWith, "_endsWith"); + __name(_property, "_property"); + __name(_mime, "_mime"); + __name(_overwrite, "_overwrite"); + __name(_normalize, "_normalize"); + __name(_trim, "_trim"); + __name(_toLowerCase, "_toLowerCase"); + __name(_toUpperCase, "_toUpperCase"); + __name(_slugify, "_slugify"); + __name(_array, "_array"); + __name(_union, "_union"); + __name(_xor, "_xor"); + __name(_discriminatedUnion, "_discriminatedUnion"); + __name(_intersection, "_intersection"); + __name(_tuple, "_tuple"); + __name(_record, "_record"); + __name(_map, "_map"); + __name(_set, "_set"); + __name(_enum, "_enum"); + __name(_nativeEnum, "_nativeEnum"); + __name(_literal, "_literal"); + __name(_file, "_file"); + __name(_transform, "_transform"); + __name(_optional, "_optional"); + __name(_nullable, "_nullable"); + __name(_default, "_default"); + __name(_nonoptional, "_nonoptional"); + __name(_success, "_success"); + __name(_catch, "_catch"); + __name(_pipe, "_pipe"); + __name(_readonly, "_readonly"); + __name(_templateLiteral, "_templateLiteral"); + __name(_lazy, "_lazy"); + __name(_promise, "_promise"); + __name(_custom, "_custom"); + __name(_refine, "_refine"); + __name(_superRefine, "_superRefine"); + __name(_check, "_check"); + __name(describe, "describe"); + __name(meta, "meta"); + __name(_stringbool, "_stringbool"); + __name(_stringFormat, "_stringFormat"); + } +}); + +// ../../node_modules/zod/v4/core/to-json-schema.js +function initializeContext(params) { + let target = params?.target ?? "draft-2020-12"; + if (target === "draft-4") + target = "draft-04"; + if (target === "draft-7") + target = "draft-07"; + return { + processors: params.processors ?? {}, + metadataRegistry: params?.metadata ?? globalRegistry, + target, + unrepresentable: params?.unrepresentable ?? "throw", + override: params?.override ?? (() => { + }), + io: params?.io ?? "output", + counter: 0, + seen: /* @__PURE__ */ new Map(), + cycles: params?.cycles ?? "ref", + reused: params?.reused ?? "inline", + external: params?.external ?? void 0 + }; +} +function process2(schema, ctx, _params = { path: [], schemaPath: [] }) { + var _a124; + const def = schema._zod.def; + const seen = ctx.seen.get(schema); + if (seen) { + seen.count++; + const isCycle = _params.schemaPath.includes(schema); + if (isCycle) { + seen.cycle = _params.path; + } + return seen.schema; + } + const result = { schema: {}, count: 1, cycle: void 0, path: _params.path }; + ctx.seen.set(schema, result); + const overrideSchema = schema._zod.toJSONSchema?.(); + if (overrideSchema) { + result.schema = overrideSchema; + } else { + const params = { + ..._params, + schemaPath: [..._params.schemaPath, schema], + path: _params.path + }; + if (schema._zod.processJSONSchema) { + schema._zod.processJSONSchema(ctx, result.schema, params); + } else { + const _json = result.schema; + const processor = ctx.processors[def.type]; + if (!processor) { + throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`); + } + processor(schema, ctx, _json, params); + } + const parent = schema._zod.parent; + if (parent) { + if (!result.ref) + result.ref = parent; + process2(parent, ctx, params); + ctx.seen.get(parent).isParent = true; + } + } + const meta3 = ctx.metadataRegistry.get(schema); + if (meta3) + Object.assign(result.schema, meta3); + if (ctx.io === "input" && isTransforming(schema)) { + delete result.schema.examples; + delete result.schema.default; + } + if (ctx.io === "input" && result.schema._prefault) + (_a124 = result.schema).default ?? (_a124.default = result.schema._prefault); + delete result.schema._prefault; + const _result = ctx.seen.get(schema); + return _result.schema; +} +function extractDefs(ctx, schema) { + const root = ctx.seen.get(schema); + if (!root) + throw new Error("Unprocessed schema. This is a bug in Zod."); + const idToSchema = /* @__PURE__ */ new Map(); + for (const entry of ctx.seen.entries()) { + const id = ctx.metadataRegistry.get(entry[0])?.id; + if (id) { + const existing = idToSchema.get(id); + if (existing && existing !== entry[0]) { + throw new Error(`Duplicate schema id "${id}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`); + } + idToSchema.set(id, entry[0]); + } + } + const makeURI = /* @__PURE__ */ __name((entry) => { + const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions"; + if (ctx.external) { + const externalId = ctx.external.registry.get(entry[0])?.id; + const uriGenerator = ctx.external.uri ?? ((id2) => id2); + if (externalId) { + return { ref: uriGenerator(externalId) }; + } + const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`; + entry[1].defId = id; + return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` }; + } + if (entry[1] === root) { + return { ref: "#" }; + } + const uriPrefix = `#`; + const defUriPrefix = `${uriPrefix}/${defsSegment}/`; + const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`; + return { defId, ref: defUriPrefix + defId }; + }, "makeURI"); + const extractToDef = /* @__PURE__ */ __name((entry) => { + if (entry[1].schema.$ref) { + return; + } + const seen = entry[1]; + const { ref, defId } = makeURI(entry); + seen.def = { ...seen.schema }; + if (defId) + seen.defId = defId; + const schema2 = seen.schema; + for (const key in schema2) { + delete schema2[key]; + } + schema2.$ref = ref; + }, "extractToDef"); + if (ctx.cycles === "throw") { + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (seen.cycle) { + throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); + } + } + } + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (schema === entry[0]) { + extractToDef(entry); + continue; + } + if (ctx.external) { + const ext = ctx.external.registry.get(entry[0])?.id; + if (schema !== entry[0] && ext) { + extractToDef(entry); + continue; + } + } + const id = ctx.metadataRegistry.get(entry[0])?.id; + if (id) { + extractToDef(entry); + continue; + } + if (seen.cycle) { + extractToDef(entry); + continue; + } + if (seen.count > 1) { + if (ctx.reused === "ref") { + extractToDef(entry); + continue; + } + } + } +} +function finalize(ctx, schema) { + const root = ctx.seen.get(schema); + if (!root) + throw new Error("Unprocessed schema. This is a bug in Zod."); + const flattenRef = /* @__PURE__ */ __name((zodSchema) => { + const seen = ctx.seen.get(zodSchema); + if (seen.ref === null) + return; + const schema2 = seen.def ?? seen.schema; + const _cached = { ...schema2 }; + const ref = seen.ref; + seen.ref = null; + if (ref) { + flattenRef(ref); + const refSeen = ctx.seen.get(ref); + const refSchema = refSeen.schema; + if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) { + schema2.allOf = schema2.allOf ?? []; + schema2.allOf.push(refSchema); + } else { + Object.assign(schema2, refSchema); + } + Object.assign(schema2, _cached); + const isParentRef = zodSchema._zod.parent === ref; + if (isParentRef) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (!(key in _cached)) { + delete schema2[key]; + } + } + } + if (refSchema.$ref && refSeen.def) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (key in refSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(refSeen.def[key])) { + delete schema2[key]; + } + } + } + } + const parent = zodSchema._zod.parent; + if (parent && parent !== ref) { + flattenRef(parent); + const parentSeen = ctx.seen.get(parent); + if (parentSeen?.schema.$ref) { + schema2.$ref = parentSeen.schema.$ref; + if (parentSeen.def) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (key in parentSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(parentSeen.def[key])) { + delete schema2[key]; + } + } + } + } + } + ctx.override({ + zodSchema, + jsonSchema: schema2, + path: seen.path ?? [] + }); + }, "flattenRef"); + for (const entry of [...ctx.seen.entries()].reverse()) { + flattenRef(entry[0]); + } + const result = {}; + if (ctx.target === "draft-2020-12") { + result.$schema = "https://json-schema.org/draft/2020-12/schema"; + } else if (ctx.target === "draft-07") { + result.$schema = "http://json-schema.org/draft-07/schema#"; + } else if (ctx.target === "draft-04") { + result.$schema = "http://json-schema.org/draft-04/schema#"; + } else if (ctx.target === "openapi-3.0") { + } else { + } + if (ctx.external?.uri) { + const id = ctx.external.registry.get(schema)?.id; + if (!id) + throw new Error("Schema is missing an `id` property"); + result.$id = ctx.external.uri(id); + } + Object.assign(result, root.def ?? root.schema); + const defs = ctx.external?.defs ?? {}; + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (seen.def && seen.defId) { + defs[seen.defId] = seen.def; + } + } + if (ctx.external) { + } else { + if (Object.keys(defs).length > 0) { + if (ctx.target === "draft-2020-12") { + result.$defs = defs; + } else { + result.definitions = defs; + } + } + } + try { + const finalized = JSON.parse(JSON.stringify(result)); + Object.defineProperty(finalized, "~standard", { + value: { + ...schema["~standard"], + jsonSchema: { + input: createStandardJSONSchemaMethod(schema, "input", ctx.processors), + output: createStandardJSONSchemaMethod(schema, "output", ctx.processors) + } + }, + enumerable: false, + writable: false + }); + return finalized; + } catch (_err) { + throw new Error("Error converting schema to JSON."); + } +} +function isTransforming(_schema, _ctx) { + const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() }; + if (ctx.seen.has(_schema)) + return false; + ctx.seen.add(_schema); + const def = _schema._zod.def; + if (def.type === "transform") + return true; + if (def.type === "array") + return isTransforming(def.element, ctx); + if (def.type === "set") + return isTransforming(def.valueType, ctx); + if (def.type === "lazy") + return isTransforming(def.getter(), ctx); + if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") { + return isTransforming(def.innerType, ctx); + } + if (def.type === "intersection") { + return isTransforming(def.left, ctx) || isTransforming(def.right, ctx); + } + if (def.type === "record" || def.type === "map") { + return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx); + } + if (def.type === "pipe") { + return isTransforming(def.in, ctx) || isTransforming(def.out, ctx); + } + if (def.type === "object") { + for (const key in def.shape) { + if (isTransforming(def.shape[key], ctx)) + return true; + } + return false; + } + if (def.type === "union") { + for (const option of def.options) { + if (isTransforming(option, ctx)) + return true; + } + return false; + } + if (def.type === "tuple") { + for (const item of def.items) { + if (isTransforming(item, ctx)) + return true; + } + if (def.rest && isTransforming(def.rest, ctx)) + return true; + return false; + } + return false; +} +var createToJSONSchemaMethod, createStandardJSONSchemaMethod; +var init_to_json_schema = __esm({ + "../../node_modules/zod/v4/core/to-json-schema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_registries(); + __name(initializeContext, "initializeContext"); + __name(process2, "process"); + __name(extractDefs, "extractDefs"); + __name(finalize, "finalize"); + __name(isTransforming, "isTransforming"); + createToJSONSchemaMethod = /* @__PURE__ */ __name((schema, processors = {}) => (params) => { + const ctx = initializeContext({ ...params, processors }); + process2(schema, ctx); + extractDefs(ctx, schema); + return finalize(ctx, schema); + }, "createToJSONSchemaMethod"); + createStandardJSONSchemaMethod = /* @__PURE__ */ __name((schema, io, processors = {}) => (params) => { + const { libraryOptions, target } = params ?? {}; + const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors }); + process2(schema, ctx); + extractDefs(ctx, schema); + return finalize(ctx, schema); + }, "createStandardJSONSchemaMethod"); + } +}); + +// ../../node_modules/zod/v4/core/json-schema-processors.js +function toJSONSchema(input, params) { + if ("_idmap" in input) { + const registry2 = input; + const ctx2 = initializeContext({ ...params, processors: allProcessors }); + const defs = {}; + for (const entry of registry2._idmap.entries()) { + const [_, schema] = entry; + process2(schema, ctx2); + } + const schemas = {}; + const external = { + registry: registry2, + uri: params?.uri, + defs + }; + ctx2.external = external; + for (const entry of registry2._idmap.entries()) { + const [key, schema] = entry; + extractDefs(ctx2, schema); + schemas[key] = finalize(ctx2, schema); + } + if (Object.keys(defs).length > 0) { + const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions"; + schemas.__shared = { + [defsSegment]: defs + }; + } + return { schemas }; + } + const ctx = initializeContext({ ...params, processors: allProcessors }); + process2(input, ctx); + extractDefs(ctx, input); + return finalize(ctx, input); +} +var formatMap, stringProcessor, numberProcessor, booleanProcessor, bigintProcessor, symbolProcessor, nullProcessor, undefinedProcessor, voidProcessor, neverProcessor, anyProcessor, unknownProcessor, dateProcessor, enumProcessor, literalProcessor, nanProcessor, templateLiteralProcessor, fileProcessor, successProcessor, customProcessor, functionProcessor, transformProcessor, mapProcessor, setProcessor, arrayProcessor, objectProcessor, unionProcessor, intersectionProcessor, tupleProcessor, recordProcessor, nullableProcessor, nonoptionalProcessor, defaultProcessor, prefaultProcessor, catchProcessor, pipeProcessor, readonlyProcessor, promiseProcessor, optionalProcessor, lazyProcessor, allProcessors; +var init_json_schema_processors = __esm({ + "../../node_modules/zod/v4/core/json-schema-processors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_to_json_schema(); + init_util3(); + formatMap = { + guid: "uuid", + url: "uri", + datetime: "date-time", + json_string: "json-string", + regex: "" + // do not set + }; + stringProcessor = /* @__PURE__ */ __name((schema, ctx, _json, _params) => { + const json2 = _json; + json2.type = "string"; + const { minimum, maximum, format: format2, patterns, contentEncoding } = schema._zod.bag; + if (typeof minimum === "number") + json2.minLength = minimum; + if (typeof maximum === "number") + json2.maxLength = maximum; + if (format2) { + json2.format = formatMap[format2] ?? format2; + if (json2.format === "") + delete json2.format; + if (format2 === "time") { + delete json2.format; + } + } + if (contentEncoding) + json2.contentEncoding = contentEncoding; + if (patterns && patterns.size > 0) { + const regexes = [...patterns]; + if (regexes.length === 1) + json2.pattern = regexes[0].source; + else if (regexes.length > 1) { + json2.allOf = [ + ...regexes.map((regex) => ({ + ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {}, + pattern: regex.source + })) + ]; + } + } + }, "stringProcessor"); + numberProcessor = /* @__PURE__ */ __name((schema, ctx, _json, _params) => { + const json2 = _json; + const { minimum, maximum, format: format2, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag; + if (typeof format2 === "string" && format2.includes("int")) + json2.type = "integer"; + else + json2.type = "number"; + if (typeof exclusiveMinimum === "number") { + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json2.minimum = exclusiveMinimum; + json2.exclusiveMinimum = true; + } else { + json2.exclusiveMinimum = exclusiveMinimum; + } + } + if (typeof minimum === "number") { + json2.minimum = minimum; + if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") { + if (exclusiveMinimum >= minimum) + delete json2.minimum; + else + delete json2.exclusiveMinimum; + } + } + if (typeof exclusiveMaximum === "number") { + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json2.maximum = exclusiveMaximum; + json2.exclusiveMaximum = true; + } else { + json2.exclusiveMaximum = exclusiveMaximum; + } + } + if (typeof maximum === "number") { + json2.maximum = maximum; + if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") { + if (exclusiveMaximum <= maximum) + delete json2.maximum; + else + delete json2.exclusiveMaximum; + } + } + if (typeof multipleOf === "number") + json2.multipleOf = multipleOf; + }, "numberProcessor"); + booleanProcessor = /* @__PURE__ */ __name((_schema, _ctx, json2, _params) => { + json2.type = "boolean"; + }, "booleanProcessor"); + bigintProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("BigInt cannot be represented in JSON Schema"); + } + }, "bigintProcessor"); + symbolProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Symbols cannot be represented in JSON Schema"); + } + }, "symbolProcessor"); + nullProcessor = /* @__PURE__ */ __name((_schema, ctx, json2, _params) => { + if (ctx.target === "openapi-3.0") { + json2.type = "string"; + json2.nullable = true; + json2.enum = [null]; + } else { + json2.type = "null"; + } + }, "nullProcessor"); + undefinedProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Undefined cannot be represented in JSON Schema"); + } + }, "undefinedProcessor"); + voidProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Void cannot be represented in JSON Schema"); + } + }, "voidProcessor"); + neverProcessor = /* @__PURE__ */ __name((_schema, _ctx, json2, _params) => { + json2.not = {}; + }, "neverProcessor"); + anyProcessor = /* @__PURE__ */ __name((_schema, _ctx, _json, _params) => { + }, "anyProcessor"); + unknownProcessor = /* @__PURE__ */ __name((_schema, _ctx, _json, _params) => { + }, "unknownProcessor"); + dateProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Date cannot be represented in JSON Schema"); + } + }, "dateProcessor"); + enumProcessor = /* @__PURE__ */ __name((schema, _ctx, json2, _params) => { + const def = schema._zod.def; + const values = getEnumValues(def.entries); + if (values.every((v3) => typeof v3 === "number")) + json2.type = "number"; + if (values.every((v3) => typeof v3 === "string")) + json2.type = "string"; + json2.enum = values; + }, "enumProcessor"); + literalProcessor = /* @__PURE__ */ __name((schema, ctx, json2, _params) => { + const def = schema._zod.def; + const vals = []; + for (const val of def.values) { + if (val === void 0) { + if (ctx.unrepresentable === "throw") { + throw new Error("Literal `undefined` cannot be represented in JSON Schema"); + } else { + } + } else if (typeof val === "bigint") { + if (ctx.unrepresentable === "throw") { + throw new Error("BigInt literals cannot be represented in JSON Schema"); + } else { + vals.push(Number(val)); + } + } else { + vals.push(val); + } + } + if (vals.length === 0) { + } else if (vals.length === 1) { + const val = vals[0]; + json2.type = val === null ? "null" : typeof val; + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json2.enum = [val]; + } else { + json2.const = val; + } + } else { + if (vals.every((v3) => typeof v3 === "number")) + json2.type = "number"; + if (vals.every((v3) => typeof v3 === "string")) + json2.type = "string"; + if (vals.every((v3) => typeof v3 === "boolean")) + json2.type = "boolean"; + if (vals.every((v3) => v3 === null)) + json2.type = "null"; + json2.enum = vals; + } + }, "literalProcessor"); + nanProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("NaN cannot be represented in JSON Schema"); + } + }, "nanProcessor"); + templateLiteralProcessor = /* @__PURE__ */ __name((schema, _ctx, json2, _params) => { + const _json = json2; + const pattern = schema._zod.pattern; + if (!pattern) + throw new Error("Pattern not found in template literal"); + _json.type = "string"; + _json.pattern = pattern.source; + }, "templateLiteralProcessor"); + fileProcessor = /* @__PURE__ */ __name((schema, _ctx, json2, _params) => { + const _json = json2; + const file2 = { + type: "string", + format: "binary", + contentEncoding: "binary" + }; + const { minimum, maximum, mime } = schema._zod.bag; + if (minimum !== void 0) + file2.minLength = minimum; + if (maximum !== void 0) + file2.maxLength = maximum; + if (mime) { + if (mime.length === 1) { + file2.contentMediaType = mime[0]; + Object.assign(_json, file2); + } else { + Object.assign(_json, file2); + _json.anyOf = mime.map((m2) => ({ contentMediaType: m2 })); + } + } else { + Object.assign(_json, file2); + } + }, "fileProcessor"); + successProcessor = /* @__PURE__ */ __name((_schema, _ctx, json2, _params) => { + json2.type = "boolean"; + }, "successProcessor"); + customProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Custom types cannot be represented in JSON Schema"); + } + }, "customProcessor"); + functionProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Function types cannot be represented in JSON Schema"); + } + }, "functionProcessor"); + transformProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Transforms cannot be represented in JSON Schema"); + } + }, "transformProcessor"); + mapProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Map cannot be represented in JSON Schema"); + } + }, "mapProcessor"); + setProcessor = /* @__PURE__ */ __name((_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Set cannot be represented in JSON Schema"); + } + }, "setProcessor"); + arrayProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const json2 = _json; + const def = schema._zod.def; + const { minimum, maximum } = schema._zod.bag; + if (typeof minimum === "number") + json2.minItems = minimum; + if (typeof maximum === "number") + json2.maxItems = maximum; + json2.type = "array"; + json2.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] }); + }, "arrayProcessor"); + objectProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const json2 = _json; + const def = schema._zod.def; + json2.type = "object"; + json2.properties = {}; + const shape = def.shape; + for (const key in shape) { + json2.properties[key] = process2(shape[key], ctx, { + ...params, + path: [...params.path, "properties", key] + }); + } + const allKeys = new Set(Object.keys(shape)); + const requiredKeys = new Set([...allKeys].filter((key) => { + const v3 = def.shape[key]._zod; + if (ctx.io === "input") { + return v3.optin === void 0; + } else { + return v3.optout === void 0; + } + })); + if (requiredKeys.size > 0) { + json2.required = Array.from(requiredKeys); + } + if (def.catchall?._zod.def.type === "never") { + json2.additionalProperties = false; + } else if (!def.catchall) { + if (ctx.io === "output") + json2.additionalProperties = false; + } else if (def.catchall) { + json2.additionalProperties = process2(def.catchall, ctx, { + ...params, + path: [...params.path, "additionalProperties"] + }); + } + }, "objectProcessor"); + unionProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + const isExclusive = def.inclusive === false; + const options = def.options.map((x2, i2) => process2(x2, ctx, { + ...params, + path: [...params.path, isExclusive ? "oneOf" : "anyOf", i2] + })); + if (isExclusive) { + json2.oneOf = options; + } else { + json2.anyOf = options; + } + }, "unionProcessor"); + intersectionProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + const a2 = process2(def.left, ctx, { + ...params, + path: [...params.path, "allOf", 0] + }); + const b2 = process2(def.right, ctx, { + ...params, + path: [...params.path, "allOf", 1] + }); + const isSimpleIntersection = /* @__PURE__ */ __name((val) => "allOf" in val && Object.keys(val).length === 1, "isSimpleIntersection"); + const allOf = [ + ...isSimpleIntersection(a2) ? a2.allOf : [a2], + ...isSimpleIntersection(b2) ? b2.allOf : [b2] + ]; + json2.allOf = allOf; + }, "intersectionProcessor"); + tupleProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const json2 = _json; + const def = schema._zod.def; + json2.type = "array"; + const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items"; + const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems"; + const prefixItems = def.items.map((x2, i2) => process2(x2, ctx, { + ...params, + path: [...params.path, prefixPath, i2] + })); + const rest = def.rest ? process2(def.rest, ctx, { + ...params, + path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []] + }) : null; + if (ctx.target === "draft-2020-12") { + json2.prefixItems = prefixItems; + if (rest) { + json2.items = rest; + } + } else if (ctx.target === "openapi-3.0") { + json2.items = { + anyOf: prefixItems + }; + if (rest) { + json2.items.anyOf.push(rest); + } + json2.minItems = prefixItems.length; + if (!rest) { + json2.maxItems = prefixItems.length; + } + } else { + json2.items = prefixItems; + if (rest) { + json2.additionalItems = rest; + } + } + const { minimum, maximum } = schema._zod.bag; + if (typeof minimum === "number") + json2.minItems = minimum; + if (typeof maximum === "number") + json2.maxItems = maximum; + }, "tupleProcessor"); + recordProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const json2 = _json; + const def = schema._zod.def; + json2.type = "object"; + const keyType = def.keyType; + const keyBag = keyType._zod.bag; + const patterns = keyBag?.patterns; + if (def.mode === "loose" && patterns && patterns.size > 0) { + const valueSchema = process2(def.valueType, ctx, { + ...params, + path: [...params.path, "patternProperties", "*"] + }); + json2.patternProperties = {}; + for (const pattern of patterns) { + json2.patternProperties[pattern.source] = valueSchema; + } + } else { + if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") { + json2.propertyNames = process2(def.keyType, ctx, { + ...params, + path: [...params.path, "propertyNames"] + }); + } + json2.additionalProperties = process2(def.valueType, ctx, { + ...params, + path: [...params.path, "additionalProperties"] + }); + } + const keyValues = keyType._zod.values; + if (keyValues) { + const validKeyValues = [...keyValues].filter((v3) => typeof v3 === "string" || typeof v3 === "number"); + if (validKeyValues.length > 0) { + json2.required = validKeyValues; + } + } + }, "recordProcessor"); + nullableProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + const inner = process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + if (ctx.target === "openapi-3.0") { + seen.ref = def.innerType; + json2.nullable = true; + } else { + json2.anyOf = [inner, { type: "null" }]; + } + }, "nullableProcessor"); + nonoptionalProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + }, "nonoptionalProcessor"); + defaultProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + json2.default = JSON.parse(JSON.stringify(def.defaultValue)); + }, "defaultProcessor"); + prefaultProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + if (ctx.io === "input") + json2._prefault = JSON.parse(JSON.stringify(def.defaultValue)); + }, "prefaultProcessor"); + catchProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + let catchValue; + try { + catchValue = def.catchValue(void 0); + } catch { + throw new Error("Dynamic catch values are not supported in JSON Schema"); + } + json2.default = catchValue; + }, "catchProcessor"); + pipeProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const def = schema._zod.def; + const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out; + process2(innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = innerType; + }, "pipeProcessor"); + readonlyProcessor = /* @__PURE__ */ __name((schema, ctx, json2, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + json2.readOnly = true; + }, "readonlyProcessor"); + promiseProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + }, "promiseProcessor"); + optionalProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + }, "optionalProcessor"); + lazyProcessor = /* @__PURE__ */ __name((schema, ctx, _json, params) => { + const innerType = schema._zod.innerType; + process2(innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = innerType; + }, "lazyProcessor"); + allProcessors = { + string: stringProcessor, + number: numberProcessor, + boolean: booleanProcessor, + bigint: bigintProcessor, + symbol: symbolProcessor, + null: nullProcessor, + undefined: undefinedProcessor, + void: voidProcessor, + never: neverProcessor, + any: anyProcessor, + unknown: unknownProcessor, + date: dateProcessor, + enum: enumProcessor, + literal: literalProcessor, + nan: nanProcessor, + template_literal: templateLiteralProcessor, + file: fileProcessor, + success: successProcessor, + custom: customProcessor, + function: functionProcessor, + transform: transformProcessor, + map: mapProcessor, + set: setProcessor, + array: arrayProcessor, + object: objectProcessor, + union: unionProcessor, + intersection: intersectionProcessor, + tuple: tupleProcessor, + record: recordProcessor, + nullable: nullableProcessor, + nonoptional: nonoptionalProcessor, + default: defaultProcessor, + prefault: prefaultProcessor, + catch: catchProcessor, + pipe: pipeProcessor, + readonly: readonlyProcessor, + promise: promiseProcessor, + optional: optionalProcessor, + lazy: lazyProcessor + }; + __name(toJSONSchema, "toJSONSchema"); + } +}); + +// ../../node_modules/zod/v4/core/json-schema-generator.js +var JSONSchemaGenerator; +var init_json_schema_generator = __esm({ + "../../node_modules/zod/v4/core/json-schema-generator.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_json_schema_processors(); + init_to_json_schema(); + JSONSchemaGenerator = class { + /** @deprecated Access via ctx instead */ + get metadataRegistry() { + return this.ctx.metadataRegistry; + } + /** @deprecated Access via ctx instead */ + get target() { + return this.ctx.target; + } + /** @deprecated Access via ctx instead */ + get unrepresentable() { + return this.ctx.unrepresentable; + } + /** @deprecated Access via ctx instead */ + get override() { + return this.ctx.override; + } + /** @deprecated Access via ctx instead */ + get io() { + return this.ctx.io; + } + /** @deprecated Access via ctx instead */ + get counter() { + return this.ctx.counter; + } + set counter(value) { + this.ctx.counter = value; + } + /** @deprecated Access via ctx instead */ + get seen() { + return this.ctx.seen; + } + constructor(params) { + let normalizedTarget = params?.target ?? "draft-2020-12"; + if (normalizedTarget === "draft-4") + normalizedTarget = "draft-04"; + if (normalizedTarget === "draft-7") + normalizedTarget = "draft-07"; + this.ctx = initializeContext({ + processors: allProcessors, + target: normalizedTarget, + ...params?.metadata && { metadata: params.metadata }, + ...params?.unrepresentable && { unrepresentable: params.unrepresentable }, + ...params?.override && { override: params.override }, + ...params?.io && { io: params.io } + }); + } + /** + * Process a schema to prepare it for JSON Schema generation. + * This must be called before emit(). + */ + process(schema, _params = { path: [], schemaPath: [] }) { + return process2(schema, this.ctx, _params); + } + /** + * Emit the final JSON Schema after processing. + * Must call process() first. + */ + emit(schema, _params) { + if (_params) { + if (_params.cycles) + this.ctx.cycles = _params.cycles; + if (_params.reused) + this.ctx.reused = _params.reused; + if (_params.external) + this.ctx.external = _params.external; + } + extractDefs(this.ctx, schema); + const result = finalize(this.ctx, schema); + const { "~standard": _, ...plainResult } = result; + return plainResult; + } + }; + __name(JSONSchemaGenerator, "JSONSchemaGenerator"); + } +}); + +// ../../node_modules/zod/v4/core/json-schema.js +var json_schema_exports = {}; +var init_json_schema = __esm({ + "../../node_modules/zod/v4/core/json-schema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/zod/v4/core/index.js +var core_exports2 = {}; +__export(core_exports2, { + $ZodAny: () => $ZodAny, + $ZodArray: () => $ZodArray, + $ZodAsyncError: () => $ZodAsyncError, + $ZodBase64: () => $ZodBase64, + $ZodBase64URL: () => $ZodBase64URL, + $ZodBigInt: () => $ZodBigInt, + $ZodBigIntFormat: () => $ZodBigIntFormat, + $ZodBoolean: () => $ZodBoolean, + $ZodCIDRv4: () => $ZodCIDRv4, + $ZodCIDRv6: () => $ZodCIDRv6, + $ZodCUID: () => $ZodCUID, + $ZodCUID2: () => $ZodCUID2, + $ZodCatch: () => $ZodCatch, + $ZodCheck: () => $ZodCheck, + $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat, + $ZodCheckEndsWith: () => $ZodCheckEndsWith, + $ZodCheckGreaterThan: () => $ZodCheckGreaterThan, + $ZodCheckIncludes: () => $ZodCheckIncludes, + $ZodCheckLengthEquals: () => $ZodCheckLengthEquals, + $ZodCheckLessThan: () => $ZodCheckLessThan, + $ZodCheckLowerCase: () => $ZodCheckLowerCase, + $ZodCheckMaxLength: () => $ZodCheckMaxLength, + $ZodCheckMaxSize: () => $ZodCheckMaxSize, + $ZodCheckMimeType: () => $ZodCheckMimeType, + $ZodCheckMinLength: () => $ZodCheckMinLength, + $ZodCheckMinSize: () => $ZodCheckMinSize, + $ZodCheckMultipleOf: () => $ZodCheckMultipleOf, + $ZodCheckNumberFormat: () => $ZodCheckNumberFormat, + $ZodCheckOverwrite: () => $ZodCheckOverwrite, + $ZodCheckProperty: () => $ZodCheckProperty, + $ZodCheckRegex: () => $ZodCheckRegex, + $ZodCheckSizeEquals: () => $ZodCheckSizeEquals, + $ZodCheckStartsWith: () => $ZodCheckStartsWith, + $ZodCheckStringFormat: () => $ZodCheckStringFormat, + $ZodCheckUpperCase: () => $ZodCheckUpperCase, + $ZodCodec: () => $ZodCodec, + $ZodCustom: () => $ZodCustom, + $ZodCustomStringFormat: () => $ZodCustomStringFormat, + $ZodDate: () => $ZodDate, + $ZodDefault: () => $ZodDefault, + $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion, + $ZodE164: () => $ZodE164, + $ZodEmail: () => $ZodEmail, + $ZodEmoji: () => $ZodEmoji, + $ZodEncodeError: () => $ZodEncodeError, + $ZodEnum: () => $ZodEnum, + $ZodError: () => $ZodError, + $ZodExactOptional: () => $ZodExactOptional, + $ZodFile: () => $ZodFile, + $ZodFunction: () => $ZodFunction, + $ZodGUID: () => $ZodGUID, + $ZodIPv4: () => $ZodIPv4, + $ZodIPv6: () => $ZodIPv6, + $ZodISODate: () => $ZodISODate, + $ZodISODateTime: () => $ZodISODateTime, + $ZodISODuration: () => $ZodISODuration, + $ZodISOTime: () => $ZodISOTime, + $ZodIntersection: () => $ZodIntersection, + $ZodJWT: () => $ZodJWT, + $ZodKSUID: () => $ZodKSUID, + $ZodLazy: () => $ZodLazy, + $ZodLiteral: () => $ZodLiteral, + $ZodMAC: () => $ZodMAC, + $ZodMap: () => $ZodMap, + $ZodNaN: () => $ZodNaN, + $ZodNanoID: () => $ZodNanoID, + $ZodNever: () => $ZodNever, + $ZodNonOptional: () => $ZodNonOptional, + $ZodNull: () => $ZodNull, + $ZodNullable: () => $ZodNullable, + $ZodNumber: () => $ZodNumber, + $ZodNumberFormat: () => $ZodNumberFormat, + $ZodObject: () => $ZodObject, + $ZodObjectJIT: () => $ZodObjectJIT, + $ZodOptional: () => $ZodOptional, + $ZodPipe: () => $ZodPipe, + $ZodPrefault: () => $ZodPrefault, + $ZodPromise: () => $ZodPromise, + $ZodReadonly: () => $ZodReadonly, + $ZodRealError: () => $ZodRealError, + $ZodRecord: () => $ZodRecord, + $ZodRegistry: () => $ZodRegistry, + $ZodSet: () => $ZodSet, + $ZodString: () => $ZodString, + $ZodStringFormat: () => $ZodStringFormat, + $ZodSuccess: () => $ZodSuccess, + $ZodSymbol: () => $ZodSymbol, + $ZodTemplateLiteral: () => $ZodTemplateLiteral, + $ZodTransform: () => $ZodTransform, + $ZodTuple: () => $ZodTuple, + $ZodType: () => $ZodType, + $ZodULID: () => $ZodULID, + $ZodURL: () => $ZodURL, + $ZodUUID: () => $ZodUUID, + $ZodUndefined: () => $ZodUndefined, + $ZodUnion: () => $ZodUnion, + $ZodUnknown: () => $ZodUnknown, + $ZodVoid: () => $ZodVoid, + $ZodXID: () => $ZodXID, + $ZodXor: () => $ZodXor, + $brand: () => $brand, + $constructor: () => $constructor, + $input: () => $input, + $output: () => $output, + Doc: () => Doc, + JSONSchema: () => json_schema_exports, + JSONSchemaGenerator: () => JSONSchemaGenerator, + NEVER: () => NEVER, + TimePrecision: () => TimePrecision, + _any: () => _any, + _array: () => _array, + _base64: () => _base64, + _base64url: () => _base64url, + _bigint: () => _bigint, + _boolean: () => _boolean, + _catch: () => _catch, + _check: () => _check, + _cidrv4: () => _cidrv4, + _cidrv6: () => _cidrv6, + _coercedBigint: () => _coercedBigint, + _coercedBoolean: () => _coercedBoolean, + _coercedDate: () => _coercedDate, + _coercedNumber: () => _coercedNumber, + _coercedString: () => _coercedString, + _cuid: () => _cuid, + _cuid2: () => _cuid2, + _custom: () => _custom, + _date: () => _date, + _decode: () => _decode, + _decodeAsync: () => _decodeAsync, + _default: () => _default, + _discriminatedUnion: () => _discriminatedUnion, + _e164: () => _e164, + _email: () => _email, + _emoji: () => _emoji2, + _encode: () => _encode, + _encodeAsync: () => _encodeAsync, + _endsWith: () => _endsWith, + _enum: () => _enum, + _file: () => _file, + _float32: () => _float32, + _float64: () => _float64, + _gt: () => _gt, + _gte: () => _gte, + _guid: () => _guid, + _includes: () => _includes, + _int: () => _int, + _int32: () => _int32, + _int64: () => _int64, + _intersection: () => _intersection, + _ipv4: () => _ipv4, + _ipv6: () => _ipv6, + _isoDate: () => _isoDate, + _isoDateTime: () => _isoDateTime, + _isoDuration: () => _isoDuration, + _isoTime: () => _isoTime, + _jwt: () => _jwt, + _ksuid: () => _ksuid, + _lazy: () => _lazy, + _length: () => _length, + _literal: () => _literal, + _lowercase: () => _lowercase, + _lt: () => _lt, + _lte: () => _lte, + _mac: () => _mac, + _map: () => _map, + _max: () => _lte, + _maxLength: () => _maxLength, + _maxSize: () => _maxSize, + _mime: () => _mime, + _min: () => _gte, + _minLength: () => _minLength, + _minSize: () => _minSize, + _multipleOf: () => _multipleOf, + _nan: () => _nan, + _nanoid: () => _nanoid, + _nativeEnum: () => _nativeEnum, + _negative: () => _negative, + _never: () => _never, + _nonnegative: () => _nonnegative, + _nonoptional: () => _nonoptional, + _nonpositive: () => _nonpositive, + _normalize: () => _normalize, + _null: () => _null2, + _nullable: () => _nullable, + _number: () => _number, + _optional: () => _optional, + _overwrite: () => _overwrite, + _parse: () => _parse, + _parseAsync: () => _parseAsync, + _pipe: () => _pipe, + _positive: () => _positive, + _promise: () => _promise, + _property: () => _property, + _readonly: () => _readonly, + _record: () => _record, + _refine: () => _refine, + _regex: () => _regex, + _safeDecode: () => _safeDecode, + _safeDecodeAsync: () => _safeDecodeAsync, + _safeEncode: () => _safeEncode, + _safeEncodeAsync: () => _safeEncodeAsync, + _safeParse: () => _safeParse, + _safeParseAsync: () => _safeParseAsync, + _set: () => _set, + _size: () => _size, + _slugify: () => _slugify, + _startsWith: () => _startsWith, + _string: () => _string, + _stringFormat: () => _stringFormat, + _stringbool: () => _stringbool, + _success: () => _success, + _superRefine: () => _superRefine, + _symbol: () => _symbol, + _templateLiteral: () => _templateLiteral, + _toLowerCase: () => _toLowerCase, + _toUpperCase: () => _toUpperCase, + _transform: () => _transform, + _trim: () => _trim, + _tuple: () => _tuple, + _uint32: () => _uint32, + _uint64: () => _uint64, + _ulid: () => _ulid, + _undefined: () => _undefined2, + _union: () => _union, + _unknown: () => _unknown, + _uppercase: () => _uppercase, + _url: () => _url, + _uuid: () => _uuid, + _uuidv4: () => _uuidv4, + _uuidv6: () => _uuidv6, + _uuidv7: () => _uuidv7, + _void: () => _void, + _xid: () => _xid, + _xor: () => _xor, + clone: () => clone, + config: () => config2, + createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod, + createToJSONSchemaMethod: () => createToJSONSchemaMethod, + decode: () => decode2, + decodeAsync: () => decodeAsync, + describe: () => describe, + encode: () => encode3, + encodeAsync: () => encodeAsync, + extractDefs: () => extractDefs, + finalize: () => finalize, + flattenError: () => flattenError, + formatError: () => formatError, + globalConfig: () => globalConfig, + globalRegistry: () => globalRegistry, + initializeContext: () => initializeContext, + isValidBase64: () => isValidBase64, + isValidBase64URL: () => isValidBase64URL, + isValidJWT: () => isValidJWT, + locales: () => locales_exports, + meta: () => meta, + parse: () => parse, + parseAsync: () => parseAsync, + prettifyError: () => prettifyError, + process: () => process2, + regexes: () => regexes_exports, + registry: () => registry, + safeDecode: () => safeDecode, + safeDecodeAsync: () => safeDecodeAsync, + safeEncode: () => safeEncode, + safeEncodeAsync: () => safeEncodeAsync, + safeParse: () => safeParse, + safeParseAsync: () => safeParseAsync, + toDotPath: () => toDotPath, + toJSONSchema: () => toJSONSchema, + treeifyError: () => treeifyError, + util: () => util_exports, + version: () => version3 +}); +var init_core3 = __esm({ + "../../node_modules/zod/v4/core/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core2(); + init_parse(); + init_errors4(); + init_schemas(); + init_checks2(); + init_versions(); + init_util3(); + init_regexes(); + init_locales(); + init_registries(); + init_doc(); + init_api(); + init_to_json_schema(); + init_json_schema_processors(); + init_json_schema_generator(); + init_json_schema(); + } +}); + +// ../../node_modules/zod/v4/classic/checks.js +var checks_exports2 = {}; +__export(checks_exports2, { + endsWith: () => _endsWith, + gt: () => _gt, + gte: () => _gte, + includes: () => _includes, + length: () => _length, + lowercase: () => _lowercase, + lt: () => _lt, + lte: () => _lte, + maxLength: () => _maxLength, + maxSize: () => _maxSize, + mime: () => _mime, + minLength: () => _minLength, + minSize: () => _minSize, + multipleOf: () => _multipleOf, + negative: () => _negative, + nonnegative: () => _nonnegative, + nonpositive: () => _nonpositive, + normalize: () => _normalize, + overwrite: () => _overwrite, + positive: () => _positive, + property: () => _property, + regex: () => _regex, + size: () => _size, + slugify: () => _slugify, + startsWith: () => _startsWith, + toLowerCase: () => _toLowerCase, + toUpperCase: () => _toUpperCase, + trim: () => _trim, + uppercase: () => _uppercase +}); +var init_checks3 = __esm({ + "../../node_modules/zod/v4/classic/checks.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + } +}); + +// ../../node_modules/zod/v4/classic/iso.js +var iso_exports = {}; +__export(iso_exports, { + ZodISODate: () => ZodISODate, + ZodISODateTime: () => ZodISODateTime, + ZodISODuration: () => ZodISODuration, + ZodISOTime: () => ZodISOTime, + date: () => date3, + datetime: () => datetime2, + duration: () => duration2, + time: () => time6 +}); +function datetime2(params) { + return _isoDateTime(ZodISODateTime, params); +} +function date3(params) { + return _isoDate(ZodISODate, params); +} +function time6(params) { + return _isoTime(ZodISOTime, params); +} +function duration2(params) { + return _isoDuration(ZodISODuration, params); +} +var ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration; +var init_iso = __esm({ + "../../node_modules/zod/v4/classic/iso.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_schemas2(); + ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => { + $ZodISODateTime.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(datetime2, "datetime"); + ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => { + $ZodISODate.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(date3, "date"); + ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => { + $ZodISOTime.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(time6, "time"); + ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => { + $ZodISODuration.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(duration2, "duration"); + } +}); + +// ../../node_modules/zod/v4/classic/errors.js +var initializer2, ZodError, ZodRealError; +var init_errors5 = __esm({ + "../../node_modules/zod/v4/classic/errors.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_core3(); + init_util3(); + initializer2 = /* @__PURE__ */ __name((inst, issues) => { + $ZodError.init(inst, issues); + inst.name = "ZodError"; + Object.defineProperties(inst, { + format: { + value: (mapper) => formatError(inst, mapper) + // enumerable: false, + }, + flatten: { + value: (mapper) => flattenError(inst, mapper) + // enumerable: false, + }, + addIssue: { + value: (issue2) => { + inst.issues.push(issue2); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2); + } + // enumerable: false, + }, + addIssues: { + value: (issues2) => { + inst.issues.push(...issues2); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2); + } + // enumerable: false, + }, + isEmpty: { + get() { + return inst.issues.length === 0; + } + // enumerable: false, + } + }); + }, "initializer"); + ZodError = $constructor("ZodError", initializer2); + ZodRealError = $constructor("ZodError", initializer2, { + Parent: Error + }); + } +}); + +// ../../node_modules/zod/v4/classic/parse.js +var parse2, parseAsync2, safeParse2, safeParseAsync2, encode4, decode3, encodeAsync2, decodeAsync2, safeEncode2, safeDecode2, safeEncodeAsync2, safeDecodeAsync2; +var init_parse2 = __esm({ + "../../node_modules/zod/v4/classic/parse.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_errors5(); + parse2 = /* @__PURE__ */ _parse(ZodRealError); + parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError); + safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError); + safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError); + encode4 = /* @__PURE__ */ _encode(ZodRealError); + decode3 = /* @__PURE__ */ _decode(ZodRealError); + encodeAsync2 = /* @__PURE__ */ _encodeAsync(ZodRealError); + decodeAsync2 = /* @__PURE__ */ _decodeAsync(ZodRealError); + safeEncode2 = /* @__PURE__ */ _safeEncode(ZodRealError); + safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError); + safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError); + safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError); + } +}); + +// ../../node_modules/zod/v4/classic/schemas.js +var schemas_exports2 = {}; +__export(schemas_exports2, { + ZodAny: () => ZodAny, + ZodArray: () => ZodArray, + ZodBase64: () => ZodBase64, + ZodBase64URL: () => ZodBase64URL, + ZodBigInt: () => ZodBigInt, + ZodBigIntFormat: () => ZodBigIntFormat, + ZodBoolean: () => ZodBoolean, + ZodCIDRv4: () => ZodCIDRv4, + ZodCIDRv6: () => ZodCIDRv6, + ZodCUID: () => ZodCUID, + ZodCUID2: () => ZodCUID2, + ZodCatch: () => ZodCatch, + ZodCodec: () => ZodCodec, + ZodCustom: () => ZodCustom, + ZodCustomStringFormat: () => ZodCustomStringFormat, + ZodDate: () => ZodDate, + ZodDefault: () => ZodDefault, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, + ZodE164: () => ZodE164, + ZodEmail: () => ZodEmail, + ZodEmoji: () => ZodEmoji, + ZodEnum: () => ZodEnum, + ZodExactOptional: () => ZodExactOptional, + ZodFile: () => ZodFile, + ZodFunction: () => ZodFunction, + ZodGUID: () => ZodGUID, + ZodIPv4: () => ZodIPv4, + ZodIPv6: () => ZodIPv6, + ZodIntersection: () => ZodIntersection, + ZodJWT: () => ZodJWT, + ZodKSUID: () => ZodKSUID, + ZodLazy: () => ZodLazy, + ZodLiteral: () => ZodLiteral, + ZodMAC: () => ZodMAC, + ZodMap: () => ZodMap, + ZodNaN: () => ZodNaN, + ZodNanoID: () => ZodNanoID, + ZodNever: () => ZodNever, + ZodNonOptional: () => ZodNonOptional, + ZodNull: () => ZodNull, + ZodNullable: () => ZodNullable, + ZodNumber: () => ZodNumber, + ZodNumberFormat: () => ZodNumberFormat, + ZodObject: () => ZodObject, + ZodOptional: () => ZodOptional, + ZodPipe: () => ZodPipe, + ZodPrefault: () => ZodPrefault, + ZodPromise: () => ZodPromise, + ZodReadonly: () => ZodReadonly, + ZodRecord: () => ZodRecord, + ZodSet: () => ZodSet, + ZodString: () => ZodString, + ZodStringFormat: () => ZodStringFormat, + ZodSuccess: () => ZodSuccess, + ZodSymbol: () => ZodSymbol, + ZodTemplateLiteral: () => ZodTemplateLiteral, + ZodTransform: () => ZodTransform, + ZodTuple: () => ZodTuple, + ZodType: () => ZodType, + ZodULID: () => ZodULID, + ZodURL: () => ZodURL, + ZodUUID: () => ZodUUID, + ZodUndefined: () => ZodUndefined, + ZodUnion: () => ZodUnion, + ZodUnknown: () => ZodUnknown, + ZodVoid: () => ZodVoid, + ZodXID: () => ZodXID, + ZodXor: () => ZodXor, + _ZodString: () => _ZodString, + _default: () => _default2, + _function: () => _function, + any: () => any, + array: () => array, + base64: () => base642, + base64url: () => base64url2, + bigint: () => bigint3, + boolean: () => boolean2, + catch: () => _catch2, + check: () => check2, + cidrv4: () => cidrv42, + cidrv6: () => cidrv62, + codec: () => codec, + cuid: () => cuid3, + cuid2: () => cuid22, + custom: () => custom, + date: () => date4, + describe: () => describe2, + discriminatedUnion: () => discriminatedUnion, + e164: () => e1642, + email: () => email2, + emoji: () => emoji2, + enum: () => _enum2, + exactOptional: () => exactOptional, + file: () => file, + float32: () => float32, + float64: () => float64, + function: () => _function, + guid: () => guid2, + hash: () => hash, + hex: () => hex2, + hostname: () => hostname2, + httpUrl: () => httpUrl, + instanceof: () => _instanceof, + int: () => int, + int32: () => int32, + int64: () => int64, + intersection: () => intersection, + ipv4: () => ipv42, + ipv6: () => ipv62, + json: () => json, + jwt: () => jwt, + keyof: () => keyof, + ksuid: () => ksuid2, + lazy: () => lazy2, + literal: () => literal, + looseObject: () => looseObject, + looseRecord: () => looseRecord, + mac: () => mac2, + map: () => map, + meta: () => meta2, + nan: () => nan, + nanoid: () => nanoid2, + nativeEnum: () => nativeEnum, + never: () => never, + nonoptional: () => nonoptional, + null: () => _null3, + nullable: () => nullable, + nullish: () => nullish2, + number: () => number2, + object: () => object, + optional: () => optional, + partialRecord: () => partialRecord, + pipe: () => pipe, + prefault: () => prefault, + preprocess: () => preprocess, + promise: () => promise, + readonly: () => readonly, + record: () => record, + refine: () => refine, + set: () => set, + strictObject: () => strictObject, + string: () => string2, + stringFormat: () => stringFormat, + stringbool: () => stringbool, + success: () => success, + superRefine: () => superRefine, + symbol: () => symbol, + templateLiteral: () => templateLiteral, + transform: () => transform, + tuple: () => tuple, + uint32: () => uint32, + uint64: () => uint64, + ulid: () => ulid2, + undefined: () => _undefined3, + union: () => union2, + unknown: () => unknown, + url: () => url, + uuid: () => uuid2, + uuidv4: () => uuidv4, + uuidv6: () => uuidv6, + uuidv7: () => uuidv7, + void: () => _void2, + xid: () => xid2, + xor: () => xor +}); +function string2(params) { + return _string(ZodString, params); +} +function email2(params) { + return _email(ZodEmail, params); +} +function guid2(params) { + return _guid(ZodGUID, params); +} +function uuid2(params) { + return _uuid(ZodUUID, params); +} +function uuidv4(params) { + return _uuidv4(ZodUUID, params); +} +function uuidv6(params) { + return _uuidv6(ZodUUID, params); +} +function uuidv7(params) { + return _uuidv7(ZodUUID, params); +} +function url(params) { + return _url(ZodURL, params); +} +function httpUrl(params) { + return _url(ZodURL, { + protocol: /^https?$/, + hostname: regexes_exports.domain, + ...util_exports.normalizeParams(params) + }); +} +function emoji2(params) { + return _emoji2(ZodEmoji, params); +} +function nanoid2(params) { + return _nanoid(ZodNanoID, params); +} +function cuid3(params) { + return _cuid(ZodCUID, params); +} +function cuid22(params) { + return _cuid2(ZodCUID2, params); +} +function ulid2(params) { + return _ulid(ZodULID, params); +} +function xid2(params) { + return _xid(ZodXID, params); +} +function ksuid2(params) { + return _ksuid(ZodKSUID, params); +} +function ipv42(params) { + return _ipv4(ZodIPv4, params); +} +function mac2(params) { + return _mac(ZodMAC, params); +} +function ipv62(params) { + return _ipv6(ZodIPv6, params); +} +function cidrv42(params) { + return _cidrv4(ZodCIDRv4, params); +} +function cidrv62(params) { + return _cidrv6(ZodCIDRv6, params); +} +function base642(params) { + return _base64(ZodBase64, params); +} +function base64url2(params) { + return _base64url(ZodBase64URL, params); +} +function e1642(params) { + return _e164(ZodE164, params); +} +function jwt(params) { + return _jwt(ZodJWT, params); +} +function stringFormat(format2, fnOrRegex, _params = {}) { + return _stringFormat(ZodCustomStringFormat, format2, fnOrRegex, _params); +} +function hostname2(_params) { + return _stringFormat(ZodCustomStringFormat, "hostname", regexes_exports.hostname, _params); +} +function hex2(_params) { + return _stringFormat(ZodCustomStringFormat, "hex", regexes_exports.hex, _params); +} +function hash(alg, params) { + const enc = params?.enc ?? "hex"; + const format2 = `${alg}_${enc}`; + const regex = regexes_exports[format2]; + if (!regex) + throw new Error(`Unrecognized hash format: ${format2}`); + return _stringFormat(ZodCustomStringFormat, format2, regex, params); +} +function number2(params) { + return _number(ZodNumber, params); +} +function int(params) { + return _int(ZodNumberFormat, params); +} +function float32(params) { + return _float32(ZodNumberFormat, params); +} +function float64(params) { + return _float64(ZodNumberFormat, params); +} +function int32(params) { + return _int32(ZodNumberFormat, params); +} +function uint32(params) { + return _uint32(ZodNumberFormat, params); +} +function boolean2(params) { + return _boolean(ZodBoolean, params); +} +function bigint3(params) { + return _bigint(ZodBigInt, params); +} +function int64(params) { + return _int64(ZodBigIntFormat, params); +} +function uint64(params) { + return _uint64(ZodBigIntFormat, params); +} +function symbol(params) { + return _symbol(ZodSymbol, params); +} +function _undefined3(params) { + return _undefined2(ZodUndefined, params); +} +function _null3(params) { + return _null2(ZodNull, params); +} +function any() { + return _any(ZodAny); +} +function unknown() { + return _unknown(ZodUnknown); +} +function never(params) { + return _never(ZodNever, params); +} +function _void2(params) { + return _void(ZodVoid, params); +} +function date4(params) { + return _date(ZodDate, params); +} +function array(element, params) { + return _array(ZodArray, element, params); +} +function keyof(schema) { + const shape = schema._zod.def.shape; + return _enum2(Object.keys(shape)); +} +function object(shape, params) { + const def = { + type: "object", + shape: shape ?? {}, + ...util_exports.normalizeParams(params) + }; + return new ZodObject(def); +} +function strictObject(shape, params) { + return new ZodObject({ + type: "object", + shape, + catchall: never(), + ...util_exports.normalizeParams(params) + }); +} +function looseObject(shape, params) { + return new ZodObject({ + type: "object", + shape, + catchall: unknown(), + ...util_exports.normalizeParams(params) + }); +} +function union2(options, params) { + return new ZodUnion({ + type: "union", + options, + ...util_exports.normalizeParams(params) + }); +} +function xor(options, params) { + return new ZodXor({ + type: "union", + options, + inclusive: false, + ...util_exports.normalizeParams(params) + }); +} +function discriminatedUnion(discriminator, options, params) { + return new ZodDiscriminatedUnion({ + type: "union", + options, + discriminator, + ...util_exports.normalizeParams(params) + }); +} +function intersection(left, right) { + return new ZodIntersection({ + type: "intersection", + left, + right + }); +} +function tuple(items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new ZodTuple({ + type: "tuple", + items, + rest, + ...util_exports.normalizeParams(params) + }); +} +function record(keyType, valueType, params) { + return new ZodRecord({ + type: "record", + keyType, + valueType, + ...util_exports.normalizeParams(params) + }); +} +function partialRecord(keyType, valueType, params) { + const k2 = clone(keyType); + k2._zod.values = void 0; + return new ZodRecord({ + type: "record", + keyType: k2, + valueType, + ...util_exports.normalizeParams(params) + }); +} +function looseRecord(keyType, valueType, params) { + return new ZodRecord({ + type: "record", + keyType, + valueType, + mode: "loose", + ...util_exports.normalizeParams(params) + }); +} +function map(keyType, valueType, params) { + return new ZodMap({ + type: "map", + keyType, + valueType, + ...util_exports.normalizeParams(params) + }); +} +function set(valueType, params) { + return new ZodSet({ + type: "set", + valueType, + ...util_exports.normalizeParams(params) + }); +} +function _enum2(values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v3) => [v3, v3])) : values; + return new ZodEnum({ + type: "enum", + entries, + ...util_exports.normalizeParams(params) + }); +} +function nativeEnum(entries, params) { + return new ZodEnum({ + type: "enum", + entries, + ...util_exports.normalizeParams(params) + }); +} +function literal(value, params) { + return new ZodLiteral({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...util_exports.normalizeParams(params) + }); +} +function file(params) { + return _file(ZodFile, params); +} +function transform(fn) { + return new ZodTransform({ + type: "transform", + transform: fn + }); +} +function optional(innerType) { + return new ZodOptional({ + type: "optional", + innerType + }); +} +function exactOptional(innerType) { + return new ZodExactOptional({ + type: "optional", + innerType + }); +} +function nullable(innerType) { + return new ZodNullable({ + type: "nullable", + innerType + }); +} +function nullish2(innerType) { + return optional(nullable(innerType)); +} +function _default2(innerType, defaultValue) { + return new ZodDefault({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); + } + }); +} +function prefault(innerType, defaultValue) { + return new ZodPrefault({ + type: "prefault", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); + } + }); +} +function nonoptional(innerType, params) { + return new ZodNonOptional({ + type: "nonoptional", + innerType, + ...util_exports.normalizeParams(params) + }); +} +function success(innerType) { + return new ZodSuccess({ + type: "success", + innerType + }); +} +function _catch2(innerType, catchValue) { + return new ZodCatch({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +function nan(params) { + return _nan(ZodNaN, params); +} +function pipe(in_, out) { + return new ZodPipe({ + type: "pipe", + in: in_, + out + // ...util.normalizeParams(params), + }); +} +function codec(in_, out, params) { + return new ZodCodec({ + type: "pipe", + in: in_, + out, + transform: params.decode, + reverseTransform: params.encode + }); +} +function readonly(innerType) { + return new ZodReadonly({ + type: "readonly", + innerType + }); +} +function templateLiteral(parts, params) { + return new ZodTemplateLiteral({ + type: "template_literal", + parts, + ...util_exports.normalizeParams(params) + }); +} +function lazy2(getter) { + return new ZodLazy({ + type: "lazy", + getter + }); +} +function promise(innerType) { + return new ZodPromise({ + type: "promise", + innerType + }); +} +function _function(params) { + return new ZodFunction({ + type: "function", + input: Array.isArray(params?.input) ? tuple(params?.input) : params?.input ?? array(unknown()), + output: params?.output ?? unknown() + }); +} +function check2(fn) { + const ch2 = new $ZodCheck({ + check: "custom" + // ...util.normalizeParams(params), + }); + ch2._zod.check = fn; + return ch2; +} +function custom(fn, _params) { + return _custom(ZodCustom, fn ?? (() => true), _params); +} +function refine(fn, _params = {}) { + return _refine(ZodCustom, fn, _params); +} +function superRefine(fn) { + return _superRefine(fn); +} +function _instanceof(cls, params = {}) { + const inst = new ZodCustom({ + type: "custom", + check: "custom", + fn: (data) => data instanceof cls, + abort: true, + ...util_exports.normalizeParams(params) + }); + inst._zod.bag.Class = cls; + inst._zod.check = (payload) => { + if (!(payload.value instanceof cls)) { + payload.issues.push({ + code: "invalid_type", + expected: cls.name, + input: payload.value, + inst, + path: [...inst._zod.def.path ?? []] + }); + } + }; + return inst; +} +function json(params) { + const jsonSchema = lazy2(() => { + return union2([string2(params), number2(), boolean2(), _null3(), array(jsonSchema), record(string2(), jsonSchema)]); + }); + return jsonSchema; +} +function preprocess(fn, schema) { + return pipe(transform(fn), schema); +} +var ZodType, _ZodString, ZodString, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber, ZodNumberFormat, ZodBoolean, ZodBigInt, ZodBigIntFormat, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodDate, ZodArray, ZodObject, ZodUnion, ZodXor, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodEnum, ZodLiteral, ZodFile, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch, ZodNaN, ZodPipe, ZodCodec, ZodReadonly, ZodTemplateLiteral, ZodLazy, ZodPromise, ZodFunction, ZodCustom, describe2, meta2, stringbool; +var init_schemas2 = __esm({ + "../../node_modules/zod/v4/classic/schemas.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_core3(); + init_json_schema_processors(); + init_to_json_schema(); + init_checks3(); + init_iso(); + init_parse2(); + ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => { + $ZodType.init(inst, def); + Object.assign(inst["~standard"], { + jsonSchema: { + input: createStandardJSONSchemaMethod(inst, "input"), + output: createStandardJSONSchemaMethod(inst, "output") + } + }); + inst.toJSONSchema = createToJSONSchemaMethod(inst, {}); + inst.def = def; + inst.type = def.type; + Object.defineProperty(inst, "_def", { value: def }); + inst.check = (...checks) => { + return inst.clone(util_exports.mergeDefs(def, { + checks: [ + ...def.checks ?? [], + ...checks.map((ch2) => typeof ch2 === "function" ? { _zod: { check: ch2, def: { check: "custom" }, onattach: [] } } : ch2) + ] + }), { + parent: true + }); + }; + inst.with = inst.check; + inst.clone = (def2, params) => clone(inst, def2, params); + inst.brand = () => inst; + inst.register = (reg, meta3) => { + reg.add(inst, meta3); + return inst; + }; + inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse }); + inst.safeParse = (data, params) => safeParse2(inst, data, params); + inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync }); + inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params); + inst.spa = inst.safeParseAsync; + inst.encode = (data, params) => encode4(inst, data, params); + inst.decode = (data, params) => decode3(inst, data, params); + inst.encodeAsync = async (data, params) => encodeAsync2(inst, data, params); + inst.decodeAsync = async (data, params) => decodeAsync2(inst, data, params); + inst.safeEncode = (data, params) => safeEncode2(inst, data, params); + inst.safeDecode = (data, params) => safeDecode2(inst, data, params); + inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params); + inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params); + inst.refine = (check3, params) => inst.check(refine(check3, params)); + inst.superRefine = (refinement) => inst.check(superRefine(refinement)); + inst.overwrite = (fn) => inst.check(_overwrite(fn)); + inst.optional = () => optional(inst); + inst.exactOptional = () => exactOptional(inst); + inst.nullable = () => nullable(inst); + inst.nullish = () => optional(nullable(inst)); + inst.nonoptional = (params) => nonoptional(inst, params); + inst.array = () => array(inst); + inst.or = (arg) => union2([inst, arg]); + inst.and = (arg) => intersection(inst, arg); + inst.transform = (tx) => pipe(inst, transform(tx)); + inst.default = (def2) => _default2(inst, def2); + inst.prefault = (def2) => prefault(inst, def2); + inst.catch = (params) => _catch2(inst, params); + inst.pipe = (target) => pipe(inst, target); + inst.readonly = () => readonly(inst); + inst.describe = (description) => { + const cl2 = inst.clone(); + globalRegistry.add(cl2, { description }); + return cl2; + }; + Object.defineProperty(inst, "description", { + get() { + return globalRegistry.get(inst)?.description; + }, + configurable: true + }); + inst.meta = (...args) => { + if (args.length === 0) { + return globalRegistry.get(inst); + } + const cl2 = inst.clone(); + globalRegistry.add(cl2, args[0]); + return cl2; + }; + inst.isOptional = () => inst.safeParse(void 0).success; + inst.isNullable = () => inst.safeParse(null).success; + inst.apply = (fn) => fn(inst); + return inst; + }); + _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => { + $ZodString.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => stringProcessor(inst, ctx, json2, params); + const bag = inst._zod.bag; + inst.format = bag.format ?? null; + inst.minLength = bag.minimum ?? null; + inst.maxLength = bag.maximum ?? null; + inst.regex = (...args) => inst.check(_regex(...args)); + inst.includes = (...args) => inst.check(_includes(...args)); + inst.startsWith = (...args) => inst.check(_startsWith(...args)); + inst.endsWith = (...args) => inst.check(_endsWith(...args)); + inst.min = (...args) => inst.check(_minLength(...args)); + inst.max = (...args) => inst.check(_maxLength(...args)); + inst.length = (...args) => inst.check(_length(...args)); + inst.nonempty = (...args) => inst.check(_minLength(1, ...args)); + inst.lowercase = (params) => inst.check(_lowercase(params)); + inst.uppercase = (params) => inst.check(_uppercase(params)); + inst.trim = () => inst.check(_trim()); + inst.normalize = (...args) => inst.check(_normalize(...args)); + inst.toLowerCase = () => inst.check(_toLowerCase()); + inst.toUpperCase = () => inst.check(_toUpperCase()); + inst.slugify = () => inst.check(_slugify()); + }); + ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => { + $ZodString.init(inst, def); + _ZodString.init(inst, def); + inst.email = (params) => inst.check(_email(ZodEmail, params)); + inst.url = (params) => inst.check(_url(ZodURL, params)); + inst.jwt = (params) => inst.check(_jwt(ZodJWT, params)); + inst.emoji = (params) => inst.check(_emoji2(ZodEmoji, params)); + inst.guid = (params) => inst.check(_guid(ZodGUID, params)); + inst.uuid = (params) => inst.check(_uuid(ZodUUID, params)); + inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params)); + inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params)); + inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params)); + inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params)); + inst.guid = (params) => inst.check(_guid(ZodGUID, params)); + inst.cuid = (params) => inst.check(_cuid(ZodCUID, params)); + inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params)); + inst.ulid = (params) => inst.check(_ulid(ZodULID, params)); + inst.base64 = (params) => inst.check(_base64(ZodBase64, params)); + inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params)); + inst.xid = (params) => inst.check(_xid(ZodXID, params)); + inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params)); + inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params)); + inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params)); + inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params)); + inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params)); + inst.e164 = (params) => inst.check(_e164(ZodE164, params)); + inst.datetime = (params) => inst.check(datetime2(params)); + inst.date = (params) => inst.check(date3(params)); + inst.time = (params) => inst.check(time6(params)); + inst.duration = (params) => inst.check(duration2(params)); + }); + __name(string2, "string"); + ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => { + $ZodStringFormat.init(inst, def); + _ZodString.init(inst, def); + }); + ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => { + $ZodEmail.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(email2, "email"); + ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => { + $ZodGUID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(guid2, "guid"); + ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => { + $ZodUUID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(uuid2, "uuid"); + __name(uuidv4, "uuidv4"); + __name(uuidv6, "uuidv6"); + __name(uuidv7, "uuidv7"); + ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => { + $ZodURL.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(url, "url"); + __name(httpUrl, "httpUrl"); + ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => { + $ZodEmoji.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(emoji2, "emoji"); + ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => { + $ZodNanoID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(nanoid2, "nanoid"); + ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => { + $ZodCUID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(cuid3, "cuid"); + ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => { + $ZodCUID2.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(cuid22, "cuid2"); + ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => { + $ZodULID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(ulid2, "ulid"); + ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => { + $ZodXID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(xid2, "xid"); + ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => { + $ZodKSUID.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(ksuid2, "ksuid"); + ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => { + $ZodIPv4.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(ipv42, "ipv4"); + ZodMAC = /* @__PURE__ */ $constructor("ZodMAC", (inst, def) => { + $ZodMAC.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(mac2, "mac"); + ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => { + $ZodIPv6.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(ipv62, "ipv6"); + ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => { + $ZodCIDRv4.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(cidrv42, "cidrv4"); + ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => { + $ZodCIDRv6.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(cidrv62, "cidrv6"); + ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => { + $ZodBase64.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(base642, "base64"); + ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => { + $ZodBase64URL.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(base64url2, "base64url"); + ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => { + $ZodE164.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(e1642, "e164"); + ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => { + $ZodJWT.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(jwt, "jwt"); + ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => { + $ZodCustomStringFormat.init(inst, def); + ZodStringFormat.init(inst, def); + }); + __name(stringFormat, "stringFormat"); + __name(hostname2, "hostname"); + __name(hex2, "hex"); + __name(hash, "hash"); + ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => { + $ZodNumber.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params); + inst.gt = (value, params) => inst.check(_gt(value, params)); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.lt = (value, params) => inst.check(_lt(value, params)); + inst.lte = (value, params) => inst.check(_lte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + inst.int = (params) => inst.check(int(params)); + inst.safe = (params) => inst.check(int(params)); + inst.positive = (params) => inst.check(_gt(0, params)); + inst.nonnegative = (params) => inst.check(_gte(0, params)); + inst.negative = (params) => inst.check(_lt(0, params)); + inst.nonpositive = (params) => inst.check(_lte(0, params)); + inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); + inst.step = (value, params) => inst.check(_multipleOf(value, params)); + inst.finite = () => inst; + const bag = inst._zod.bag; + inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null; + inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null; + inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5); + inst.isFinite = true; + inst.format = bag.format ?? null; + }); + __name(number2, "number"); + ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => { + $ZodNumberFormat.init(inst, def); + ZodNumber.init(inst, def); + }); + __name(int, "int"); + __name(float32, "float32"); + __name(float64, "float64"); + __name(int32, "int32"); + __name(uint32, "uint32"); + ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => { + $ZodBoolean.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => booleanProcessor(inst, ctx, json2, params); + }); + __name(boolean2, "boolean"); + ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => { + $ZodBigInt.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => bigintProcessor(inst, ctx, json2, params); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.gt = (value, params) => inst.check(_gt(value, params)); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.lt = (value, params) => inst.check(_lt(value, params)); + inst.lte = (value, params) => inst.check(_lte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + inst.positive = (params) => inst.check(_gt(BigInt(0), params)); + inst.negative = (params) => inst.check(_lt(BigInt(0), params)); + inst.nonpositive = (params) => inst.check(_lte(BigInt(0), params)); + inst.nonnegative = (params) => inst.check(_gte(BigInt(0), params)); + inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); + const bag = inst._zod.bag; + inst.minValue = bag.minimum ?? null; + inst.maxValue = bag.maximum ?? null; + inst.format = bag.format ?? null; + }); + __name(bigint3, "bigint"); + ZodBigIntFormat = /* @__PURE__ */ $constructor("ZodBigIntFormat", (inst, def) => { + $ZodBigIntFormat.init(inst, def); + ZodBigInt.init(inst, def); + }); + __name(int64, "int64"); + __name(uint64, "uint64"); + ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => { + $ZodSymbol.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => symbolProcessor(inst, ctx, json2, params); + }); + __name(symbol, "symbol"); + ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => { + $ZodUndefined.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => undefinedProcessor(inst, ctx, json2, params); + }); + __name(_undefined3, "_undefined"); + ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => { + $ZodNull.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => nullProcessor(inst, ctx, json2, params); + }); + __name(_null3, "_null"); + ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => { + $ZodAny.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => anyProcessor(inst, ctx, json2, params); + }); + __name(any, "any"); + ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => { + $ZodUnknown.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => unknownProcessor(inst, ctx, json2, params); + }); + __name(unknown, "unknown"); + ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => { + $ZodNever.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => neverProcessor(inst, ctx, json2, params); + }); + __name(never, "never"); + ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => { + $ZodVoid.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => voidProcessor(inst, ctx, json2, params); + }); + __name(_void2, "_void"); + ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => { + $ZodDate.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => dateProcessor(inst, ctx, json2, params); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + const c2 = inst._zod.bag; + inst.minDate = c2.minimum ? new Date(c2.minimum) : null; + inst.maxDate = c2.maximum ? new Date(c2.maximum) : null; + }); + __name(date4, "date"); + ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => { + $ZodArray.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params); + inst.element = def.element; + inst.min = (minLength, params) => inst.check(_minLength(minLength, params)); + inst.nonempty = (params) => inst.check(_minLength(1, params)); + inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params)); + inst.length = (len, params) => inst.check(_length(len, params)); + inst.unwrap = () => inst.element; + }); + __name(array, "array"); + __name(keyof, "keyof"); + ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => { + $ZodObjectJIT.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => objectProcessor(inst, ctx, json2, params); + util_exports.defineLazy(inst, "shape", () => { + return def.shape; + }); + inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape)); + inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall }); + inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); + inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); + inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() }); + inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 }); + inst.extend = (incoming) => { + return util_exports.extend(inst, incoming); + }; + inst.safeExtend = (incoming) => { + return util_exports.safeExtend(inst, incoming); + }; + inst.merge = (other) => util_exports.merge(inst, other); + inst.pick = (mask) => util_exports.pick(inst, mask); + inst.omit = (mask) => util_exports.omit(inst, mask); + inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]); + inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]); + }); + __name(object, "object"); + __name(strictObject, "strictObject"); + __name(looseObject, "looseObject"); + ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => { + $ZodUnion.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor(inst, ctx, json2, params); + inst.options = def.options; + }); + __name(union2, "union"); + ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => { + ZodUnion.init(inst, def); + $ZodXor.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor(inst, ctx, json2, params); + inst.options = def.options; + }); + __name(xor, "xor"); + ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => { + ZodUnion.init(inst, def); + $ZodDiscriminatedUnion.init(inst, def); + }); + __name(discriminatedUnion, "discriminatedUnion"); + ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => { + $ZodIntersection.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => intersectionProcessor(inst, ctx, json2, params); + }); + __name(intersection, "intersection"); + ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => { + $ZodTuple.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => tupleProcessor(inst, ctx, json2, params); + inst.rest = (rest) => inst.clone({ + ...inst._zod.def, + rest + }); + }); + __name(tuple, "tuple"); + ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => { + $ZodRecord.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => recordProcessor(inst, ctx, json2, params); + inst.keyType = def.keyType; + inst.valueType = def.valueType; + }); + __name(record, "record"); + __name(partialRecord, "partialRecord"); + __name(looseRecord, "looseRecord"); + ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => { + $ZodMap.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => mapProcessor(inst, ctx, json2, params); + inst.keyType = def.keyType; + inst.valueType = def.valueType; + inst.min = (...args) => inst.check(_minSize(...args)); + inst.nonempty = (params) => inst.check(_minSize(1, params)); + inst.max = (...args) => inst.check(_maxSize(...args)); + inst.size = (...args) => inst.check(_size(...args)); + }); + __name(map, "map"); + ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => { + $ZodSet.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => setProcessor(inst, ctx, json2, params); + inst.min = (...args) => inst.check(_minSize(...args)); + inst.nonempty = (params) => inst.check(_minSize(1, params)); + inst.max = (...args) => inst.check(_maxSize(...args)); + inst.size = (...args) => inst.check(_size(...args)); + }); + __name(set, "set"); + ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => { + $ZodEnum.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => enumProcessor(inst, ctx, json2, params); + inst.enum = def.entries; + inst.options = Object.values(def.entries); + const keys = new Set(Object.keys(def.entries)); + inst.extract = (values, params) => { + const newEntries = {}; + for (const value of values) { + if (keys.has(value)) { + newEntries[value] = def.entries[value]; + } else + throw new Error(`Key ${value} not found in enum`); + } + return new ZodEnum({ + ...def, + checks: [], + ...util_exports.normalizeParams(params), + entries: newEntries + }); + }; + inst.exclude = (values, params) => { + const newEntries = { ...def.entries }; + for (const value of values) { + if (keys.has(value)) { + delete newEntries[value]; + } else + throw new Error(`Key ${value} not found in enum`); + } + return new ZodEnum({ + ...def, + checks: [], + ...util_exports.normalizeParams(params), + entries: newEntries + }); + }; + }); + __name(_enum2, "_enum"); + __name(nativeEnum, "nativeEnum"); + ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => { + $ZodLiteral.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => literalProcessor(inst, ctx, json2, params); + inst.values = new Set(def.values); + Object.defineProperty(inst, "value", { + get() { + if (def.values.length > 1) { + throw new Error("This schema contains multiple valid literal values. Use `.values` instead."); + } + return def.values[0]; + } + }); + }); + __name(literal, "literal"); + ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => { + $ZodFile.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => fileProcessor(inst, ctx, json2, params); + inst.min = (size, params) => inst.check(_minSize(size, params)); + inst.max = (size, params) => inst.check(_maxSize(size, params)); + inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params)); + }); + __name(file, "file"); + ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => { + $ZodTransform.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => transformProcessor(inst, ctx, json2, params); + inst._zod.parse = (payload, _ctx) => { + if (_ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } + payload.addIssue = (issue2) => { + if (typeof issue2 === "string") { + payload.issues.push(util_exports.issue(issue2, payload.value, def)); + } else { + const _issue = issue2; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = inst); + payload.issues.push(util_exports.issue(_issue)); + } + }; + const output = def.transform(payload.value, payload); + if (output instanceof Promise) { + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + payload.value = output; + return payload; + }; + }); + __name(transform, "transform"); + ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => { + $ZodOptional.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => optionalProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(optional, "optional"); + ZodExactOptional = /* @__PURE__ */ $constructor("ZodExactOptional", (inst, def) => { + $ZodExactOptional.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => optionalProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(exactOptional, "exactOptional"); + ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => { + $ZodNullable.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => nullableProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(nullable, "nullable"); + __name(nullish2, "nullish"); + ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => { + $ZodDefault.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => defaultProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeDefault = inst.unwrap; + }); + __name(_default2, "_default"); + ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => { + $ZodPrefault.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => prefaultProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(prefault, "prefault"); + ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => { + $ZodNonOptional.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => nonoptionalProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(nonoptional, "nonoptional"); + ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => { + $ZodSuccess.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => successProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(success, "success"); + ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => { + $ZodCatch.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => catchProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeCatch = inst.unwrap; + }); + __name(_catch2, "_catch"); + ZodNaN = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => { + $ZodNaN.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => nanProcessor(inst, ctx, json2, params); + }); + __name(nan, "nan"); + ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => { + $ZodPipe.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => pipeProcessor(inst, ctx, json2, params); + inst.in = def.in; + inst.out = def.out; + }); + __name(pipe, "pipe"); + ZodCodec = /* @__PURE__ */ $constructor("ZodCodec", (inst, def) => { + ZodPipe.init(inst, def); + $ZodCodec.init(inst, def); + }); + __name(codec, "codec"); + ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => { + $ZodReadonly.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => readonlyProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(readonly, "readonly"); + ZodTemplateLiteral = /* @__PURE__ */ $constructor("ZodTemplateLiteral", (inst, def) => { + $ZodTemplateLiteral.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => templateLiteralProcessor(inst, ctx, json2, params); + }); + __name(templateLiteral, "templateLiteral"); + ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => { + $ZodLazy.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => lazyProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.getter(); + }); + __name(lazy2, "lazy"); + ZodPromise = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => { + $ZodPromise.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => promiseProcessor(inst, ctx, json2, params); + inst.unwrap = () => inst._zod.def.innerType; + }); + __name(promise, "promise"); + ZodFunction = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => { + $ZodFunction.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => functionProcessor(inst, ctx, json2, params); + }); + __name(_function, "_function"); + ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => { + $ZodCustom.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json2, params) => customProcessor(inst, ctx, json2, params); + }); + __name(check2, "check"); + __name(custom, "custom"); + __name(refine, "refine"); + __name(superRefine, "superRefine"); + describe2 = describe; + meta2 = meta; + __name(_instanceof, "_instanceof"); + stringbool = /* @__PURE__ */ __name((...args) => _stringbool({ + Codec: ZodCodec, + Boolean: ZodBoolean, + String: ZodString + }, ...args), "stringbool"); + __name(json, "json"); + __name(preprocess, "preprocess"); + } +}); + +// ../../node_modules/zod/v4/classic/compat.js +function setErrorMap(map2) { + config2({ + customError: map2 + }); +} +function getErrorMap() { + return config2().customError; +} +var ZodIssueCode, ZodFirstPartyTypeKind; +var init_compat = __esm({ + "../../node_modules/zod/v4/classic/compat.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_core3(); + ZodIssueCode = { + invalid_type: "invalid_type", + too_big: "too_big", + too_small: "too_small", + invalid_format: "invalid_format", + not_multiple_of: "not_multiple_of", + unrecognized_keys: "unrecognized_keys", + invalid_union: "invalid_union", + invalid_key: "invalid_key", + invalid_element: "invalid_element", + invalid_value: "invalid_value", + custom: "custom" + }; + __name(setErrorMap, "setErrorMap"); + __name(getErrorMap, "getErrorMap"); + (function(ZodFirstPartyTypeKind2) { + })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {})); + } +}); + +// ../../node_modules/zod/v4/classic/from-json-schema.js +function detectVersion(schema, defaultTarget) { + const $schema = schema.$schema; + if ($schema === "https://json-schema.org/draft/2020-12/schema") { + return "draft-2020-12"; + } + if ($schema === "http://json-schema.org/draft-07/schema#") { + return "draft-7"; + } + if ($schema === "http://json-schema.org/draft-04/schema#") { + return "draft-4"; + } + return defaultTarget ?? "draft-2020-12"; +} +function resolveRef(ref, ctx) { + if (!ref.startsWith("#")) { + throw new Error("External $ref is not supported, only local refs (#/...) are allowed"); + } + const path = ref.slice(1).split("/").filter(Boolean); + if (path.length === 0) { + return ctx.rootSchema; + } + const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions"; + if (path[0] === defsKey) { + const key = path[1]; + if (!key || !ctx.defs[key]) { + throw new Error(`Reference not found: ${ref}`); + } + return ctx.defs[key]; + } + throw new Error(`Reference not found: ${ref}`); +} +function convertBaseSchema(schema, ctx) { + if (schema.not !== void 0) { + if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) { + return z2.never(); + } + throw new Error("not is not supported in Zod (except { not: {} } for never)"); + } + if (schema.unevaluatedItems !== void 0) { + throw new Error("unevaluatedItems is not supported"); + } + if (schema.unevaluatedProperties !== void 0) { + throw new Error("unevaluatedProperties is not supported"); + } + if (schema.if !== void 0 || schema.then !== void 0 || schema.else !== void 0) { + throw new Error("Conditional schemas (if/then/else) are not supported"); + } + if (schema.dependentSchemas !== void 0 || schema.dependentRequired !== void 0) { + throw new Error("dependentSchemas and dependentRequired are not supported"); + } + if (schema.$ref) { + const refPath = schema.$ref; + if (ctx.refs.has(refPath)) { + return ctx.refs.get(refPath); + } + if (ctx.processing.has(refPath)) { + return z2.lazy(() => { + if (!ctx.refs.has(refPath)) { + throw new Error(`Circular reference not resolved: ${refPath}`); + } + return ctx.refs.get(refPath); + }); + } + ctx.processing.add(refPath); + const resolved = resolveRef(refPath, ctx); + const zodSchema2 = convertSchema(resolved, ctx); + ctx.refs.set(refPath, zodSchema2); + ctx.processing.delete(refPath); + return zodSchema2; + } + if (schema.enum !== void 0) { + const enumValues = schema.enum; + if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) { + return z2.null(); + } + if (enumValues.length === 0) { + return z2.never(); + } + if (enumValues.length === 1) { + return z2.literal(enumValues[0]); + } + if (enumValues.every((v3) => typeof v3 === "string")) { + return z2.enum(enumValues); + } + const literalSchemas = enumValues.map((v3) => z2.literal(v3)); + if (literalSchemas.length < 2) { + return literalSchemas[0]; + } + return z2.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]); + } + if (schema.const !== void 0) { + return z2.literal(schema.const); + } + const type = schema.type; + if (Array.isArray(type)) { + const typeSchemas = type.map((t9) => { + const typeSchema = { ...schema, type: t9 }; + return convertBaseSchema(typeSchema, ctx); + }); + if (typeSchemas.length === 0) { + return z2.never(); + } + if (typeSchemas.length === 1) { + return typeSchemas[0]; + } + return z2.union(typeSchemas); + } + if (!type) { + return z2.any(); + } + let zodSchema; + switch (type) { + case "string": { + let stringSchema = z2.string(); + if (schema.format) { + const format2 = schema.format; + if (format2 === "email") { + stringSchema = stringSchema.check(z2.email()); + } else if (format2 === "uri" || format2 === "uri-reference") { + stringSchema = stringSchema.check(z2.url()); + } else if (format2 === "uuid" || format2 === "guid") { + stringSchema = stringSchema.check(z2.uuid()); + } else if (format2 === "date-time") { + stringSchema = stringSchema.check(z2.iso.datetime()); + } else if (format2 === "date") { + stringSchema = stringSchema.check(z2.iso.date()); + } else if (format2 === "time") { + stringSchema = stringSchema.check(z2.iso.time()); + } else if (format2 === "duration") { + stringSchema = stringSchema.check(z2.iso.duration()); + } else if (format2 === "ipv4") { + stringSchema = stringSchema.check(z2.ipv4()); + } else if (format2 === "ipv6") { + stringSchema = stringSchema.check(z2.ipv6()); + } else if (format2 === "mac") { + stringSchema = stringSchema.check(z2.mac()); + } else if (format2 === "cidr") { + stringSchema = stringSchema.check(z2.cidrv4()); + } else if (format2 === "cidr-v6") { + stringSchema = stringSchema.check(z2.cidrv6()); + } else if (format2 === "base64") { + stringSchema = stringSchema.check(z2.base64()); + } else if (format2 === "base64url") { + stringSchema = stringSchema.check(z2.base64url()); + } else if (format2 === "e164") { + stringSchema = stringSchema.check(z2.e164()); + } else if (format2 === "jwt") { + stringSchema = stringSchema.check(z2.jwt()); + } else if (format2 === "emoji") { + stringSchema = stringSchema.check(z2.emoji()); + } else if (format2 === "nanoid") { + stringSchema = stringSchema.check(z2.nanoid()); + } else if (format2 === "cuid") { + stringSchema = stringSchema.check(z2.cuid()); + } else if (format2 === "cuid2") { + stringSchema = stringSchema.check(z2.cuid2()); + } else if (format2 === "ulid") { + stringSchema = stringSchema.check(z2.ulid()); + } else if (format2 === "xid") { + stringSchema = stringSchema.check(z2.xid()); + } else if (format2 === "ksuid") { + stringSchema = stringSchema.check(z2.ksuid()); + } + } + if (typeof schema.minLength === "number") { + stringSchema = stringSchema.min(schema.minLength); + } + if (typeof schema.maxLength === "number") { + stringSchema = stringSchema.max(schema.maxLength); + } + if (schema.pattern) { + stringSchema = stringSchema.regex(new RegExp(schema.pattern)); + } + zodSchema = stringSchema; + break; + } + case "number": + case "integer": { + let numberSchema = type === "integer" ? z2.number().int() : z2.number(); + if (typeof schema.minimum === "number") { + numberSchema = numberSchema.min(schema.minimum); + } + if (typeof schema.maximum === "number") { + numberSchema = numberSchema.max(schema.maximum); + } + if (typeof schema.exclusiveMinimum === "number") { + numberSchema = numberSchema.gt(schema.exclusiveMinimum); + } else if (schema.exclusiveMinimum === true && typeof schema.minimum === "number") { + numberSchema = numberSchema.gt(schema.minimum); + } + if (typeof schema.exclusiveMaximum === "number") { + numberSchema = numberSchema.lt(schema.exclusiveMaximum); + } else if (schema.exclusiveMaximum === true && typeof schema.maximum === "number") { + numberSchema = numberSchema.lt(schema.maximum); + } + if (typeof schema.multipleOf === "number") { + numberSchema = numberSchema.multipleOf(schema.multipleOf); + } + zodSchema = numberSchema; + break; + } + case "boolean": { + zodSchema = z2.boolean(); + break; + } + case "null": { + zodSchema = z2.null(); + break; + } + case "object": { + const shape = {}; + const properties = schema.properties || {}; + const requiredSet = new Set(schema.required || []); + for (const [key, propSchema] of Object.entries(properties)) { + const propZodSchema = convertSchema(propSchema, ctx); + shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional(); + } + if (schema.propertyNames) { + const keySchema = convertSchema(schema.propertyNames, ctx); + const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z2.any(); + if (Object.keys(shape).length === 0) { + zodSchema = z2.record(keySchema, valueSchema); + break; + } + const objectSchema2 = z2.object(shape).passthrough(); + const recordSchema = z2.looseRecord(keySchema, valueSchema); + zodSchema = z2.intersection(objectSchema2, recordSchema); + break; + } + if (schema.patternProperties) { + const patternProps = schema.patternProperties; + const patternKeys = Object.keys(patternProps); + const looseRecords = []; + for (const pattern of patternKeys) { + const patternValue = convertSchema(patternProps[pattern], ctx); + const keySchema = z2.string().regex(new RegExp(pattern)); + looseRecords.push(z2.looseRecord(keySchema, patternValue)); + } + const schemasToIntersect = []; + if (Object.keys(shape).length > 0) { + schemasToIntersect.push(z2.object(shape).passthrough()); + } + schemasToIntersect.push(...looseRecords); + if (schemasToIntersect.length === 0) { + zodSchema = z2.object({}).passthrough(); + } else if (schemasToIntersect.length === 1) { + zodSchema = schemasToIntersect[0]; + } else { + let result = z2.intersection(schemasToIntersect[0], schemasToIntersect[1]); + for (let i2 = 2; i2 < schemasToIntersect.length; i2++) { + result = z2.intersection(result, schemasToIntersect[i2]); + } + zodSchema = result; + } + break; + } + const objectSchema = z2.object(shape); + if (schema.additionalProperties === false) { + zodSchema = objectSchema.strict(); + } else if (typeof schema.additionalProperties === "object") { + zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx)); + } else { + zodSchema = objectSchema.passthrough(); + } + break; + } + case "array": { + const prefixItems = schema.prefixItems; + const items = schema.items; + if (prefixItems && Array.isArray(prefixItems)) { + const tupleItems = prefixItems.map((item) => convertSchema(item, ctx)); + const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0; + if (rest) { + zodSchema = z2.tuple(tupleItems).rest(rest); + } else { + zodSchema = z2.tuple(tupleItems); + } + if (typeof schema.minItems === "number") { + zodSchema = zodSchema.check(z2.minLength(schema.minItems)); + } + if (typeof schema.maxItems === "number") { + zodSchema = zodSchema.check(z2.maxLength(schema.maxItems)); + } + } else if (Array.isArray(items)) { + const tupleItems = items.map((item) => convertSchema(item, ctx)); + const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0; + if (rest) { + zodSchema = z2.tuple(tupleItems).rest(rest); + } else { + zodSchema = z2.tuple(tupleItems); + } + if (typeof schema.minItems === "number") { + zodSchema = zodSchema.check(z2.minLength(schema.minItems)); + } + if (typeof schema.maxItems === "number") { + zodSchema = zodSchema.check(z2.maxLength(schema.maxItems)); + } + } else if (items !== void 0) { + const element = convertSchema(items, ctx); + let arraySchema = z2.array(element); + if (typeof schema.minItems === "number") { + arraySchema = arraySchema.min(schema.minItems); + } + if (typeof schema.maxItems === "number") { + arraySchema = arraySchema.max(schema.maxItems); + } + zodSchema = arraySchema; + } else { + zodSchema = z2.array(z2.any()); + } + break; + } + default: + throw new Error(`Unsupported type: ${type}`); + } + if (schema.description) { + zodSchema = zodSchema.describe(schema.description); + } + if (schema.default !== void 0) { + zodSchema = zodSchema.default(schema.default); + } + return zodSchema; +} +function convertSchema(schema, ctx) { + if (typeof schema === "boolean") { + return schema ? z2.any() : z2.never(); + } + let baseSchema = convertBaseSchema(schema, ctx); + const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0; + if (schema.anyOf && Array.isArray(schema.anyOf)) { + const options = schema.anyOf.map((s2) => convertSchema(s2, ctx)); + const anyOfUnion = z2.union(options); + baseSchema = hasExplicitType ? z2.intersection(baseSchema, anyOfUnion) : anyOfUnion; + } + if (schema.oneOf && Array.isArray(schema.oneOf)) { + const options = schema.oneOf.map((s2) => convertSchema(s2, ctx)); + const oneOfUnion = z2.xor(options); + baseSchema = hasExplicitType ? z2.intersection(baseSchema, oneOfUnion) : oneOfUnion; + } + if (schema.allOf && Array.isArray(schema.allOf)) { + if (schema.allOf.length === 0) { + baseSchema = hasExplicitType ? baseSchema : z2.any(); + } else { + let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx); + const startIdx = hasExplicitType ? 0 : 1; + for (let i2 = startIdx; i2 < schema.allOf.length; i2++) { + result = z2.intersection(result, convertSchema(schema.allOf[i2], ctx)); + } + baseSchema = result; + } + } + if (schema.nullable === true && ctx.version === "openapi-3.0") { + baseSchema = z2.nullable(baseSchema); + } + if (schema.readOnly === true) { + baseSchema = z2.readonly(baseSchema); + } + const extraMeta = {}; + const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"]; + for (const key of coreMetadataKeys) { + if (key in schema) { + extraMeta[key] = schema[key]; + } + } + const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"]; + for (const key of contentMetadataKeys) { + if (key in schema) { + extraMeta[key] = schema[key]; + } + } + for (const key of Object.keys(schema)) { + if (!RECOGNIZED_KEYS.has(key)) { + extraMeta[key] = schema[key]; + } + } + if (Object.keys(extraMeta).length > 0) { + ctx.registry.add(baseSchema, extraMeta); + } + return baseSchema; +} +function fromJSONSchema(schema, params) { + if (typeof schema === "boolean") { + return schema ? z2.any() : z2.never(); + } + const version4 = detectVersion(schema, params?.defaultTarget); + const defs = schema.$defs || schema.definitions || {}; + const ctx = { + version: version4, + defs, + refs: /* @__PURE__ */ new Map(), + processing: /* @__PURE__ */ new Set(), + rootSchema: schema, + registry: params?.registry ?? globalRegistry + }; + return convertSchema(schema, ctx); +} +var z2, RECOGNIZED_KEYS; +var init_from_json_schema = __esm({ + "../../node_modules/zod/v4/classic/from-json-schema.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_registries(); + init_checks3(); + init_iso(); + init_schemas2(); + z2 = { + ...schemas_exports2, + ...checks_exports2, + iso: iso_exports + }; + RECOGNIZED_KEYS = /* @__PURE__ */ new Set([ + // Schema identification + "$schema", + "$ref", + "$defs", + "definitions", + // Core schema keywords + "$id", + "id", + "$comment", + "$anchor", + "$vocabulary", + "$dynamicRef", + "$dynamicAnchor", + // Type + "type", + "enum", + "const", + // Composition + "anyOf", + "oneOf", + "allOf", + "not", + // Object + "properties", + "required", + "additionalProperties", + "patternProperties", + "propertyNames", + "minProperties", + "maxProperties", + // Array + "items", + "prefixItems", + "additionalItems", + "minItems", + "maxItems", + "uniqueItems", + "contains", + "minContains", + "maxContains", + // String + "minLength", + "maxLength", + "pattern", + "format", + // Number + "minimum", + "maximum", + "exclusiveMinimum", + "exclusiveMaximum", + "multipleOf", + // Already handled metadata + "description", + "default", + // Content + "contentEncoding", + "contentMediaType", + "contentSchema", + // Unsupported (error-throwing) + "unevaluatedItems", + "unevaluatedProperties", + "if", + "then", + "else", + "dependentSchemas", + "dependentRequired", + // OpenAPI + "nullable", + "readOnly" + ]); + __name(detectVersion, "detectVersion"); + __name(resolveRef, "resolveRef"); + __name(convertBaseSchema, "convertBaseSchema"); + __name(convertSchema, "convertSchema"); + __name(fromJSONSchema, "fromJSONSchema"); + } +}); + +// ../../node_modules/zod/v4/classic/coerce.js +var coerce_exports = {}; +__export(coerce_exports, { + bigint: () => bigint4, + boolean: () => boolean3, + date: () => date5, + number: () => number3, + string: () => string3 +}); +function string3(params) { + return _coercedString(ZodString, params); +} +function number3(params) { + return _coercedNumber(ZodNumber, params); +} +function boolean3(params) { + return _coercedBoolean(ZodBoolean, params); +} +function bigint4(params) { + return _coercedBigint(ZodBigInt, params); +} +function date5(params) { + return _coercedDate(ZodDate, params); +} +var init_coerce = __esm({ + "../../node_modules/zod/v4/classic/coerce.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_schemas2(); + __name(string3, "string"); + __name(number3, "number"); + __name(boolean3, "boolean"); + __name(bigint4, "bigint"); + __name(date5, "date"); + } +}); + +// ../../node_modules/zod/v4/classic/external.js +var external_exports = {}; +__export(external_exports, { + $brand: () => $brand, + $input: () => $input, + $output: () => $output, + NEVER: () => NEVER, + TimePrecision: () => TimePrecision, + ZodAny: () => ZodAny, + ZodArray: () => ZodArray, + ZodBase64: () => ZodBase64, + ZodBase64URL: () => ZodBase64URL, + ZodBigInt: () => ZodBigInt, + ZodBigIntFormat: () => ZodBigIntFormat, + ZodBoolean: () => ZodBoolean, + ZodCIDRv4: () => ZodCIDRv4, + ZodCIDRv6: () => ZodCIDRv6, + ZodCUID: () => ZodCUID, + ZodCUID2: () => ZodCUID2, + ZodCatch: () => ZodCatch, + ZodCodec: () => ZodCodec, + ZodCustom: () => ZodCustom, + ZodCustomStringFormat: () => ZodCustomStringFormat, + ZodDate: () => ZodDate, + ZodDefault: () => ZodDefault, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, + ZodE164: () => ZodE164, + ZodEmail: () => ZodEmail, + ZodEmoji: () => ZodEmoji, + ZodEnum: () => ZodEnum, + ZodError: () => ZodError, + ZodExactOptional: () => ZodExactOptional, + ZodFile: () => ZodFile, + ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind, + ZodFunction: () => ZodFunction, + ZodGUID: () => ZodGUID, + ZodIPv4: () => ZodIPv4, + ZodIPv6: () => ZodIPv6, + ZodISODate: () => ZodISODate, + ZodISODateTime: () => ZodISODateTime, + ZodISODuration: () => ZodISODuration, + ZodISOTime: () => ZodISOTime, + ZodIntersection: () => ZodIntersection, + ZodIssueCode: () => ZodIssueCode, + ZodJWT: () => ZodJWT, + ZodKSUID: () => ZodKSUID, + ZodLazy: () => ZodLazy, + ZodLiteral: () => ZodLiteral, + ZodMAC: () => ZodMAC, + ZodMap: () => ZodMap, + ZodNaN: () => ZodNaN, + ZodNanoID: () => ZodNanoID, + ZodNever: () => ZodNever, + ZodNonOptional: () => ZodNonOptional, + ZodNull: () => ZodNull, + ZodNullable: () => ZodNullable, + ZodNumber: () => ZodNumber, + ZodNumberFormat: () => ZodNumberFormat, + ZodObject: () => ZodObject, + ZodOptional: () => ZodOptional, + ZodPipe: () => ZodPipe, + ZodPrefault: () => ZodPrefault, + ZodPromise: () => ZodPromise, + ZodReadonly: () => ZodReadonly, + ZodRealError: () => ZodRealError, + ZodRecord: () => ZodRecord, + ZodSet: () => ZodSet, + ZodString: () => ZodString, + ZodStringFormat: () => ZodStringFormat, + ZodSuccess: () => ZodSuccess, + ZodSymbol: () => ZodSymbol, + ZodTemplateLiteral: () => ZodTemplateLiteral, + ZodTransform: () => ZodTransform, + ZodTuple: () => ZodTuple, + ZodType: () => ZodType, + ZodULID: () => ZodULID, + ZodURL: () => ZodURL, + ZodUUID: () => ZodUUID, + ZodUndefined: () => ZodUndefined, + ZodUnion: () => ZodUnion, + ZodUnknown: () => ZodUnknown, + ZodVoid: () => ZodVoid, + ZodXID: () => ZodXID, + ZodXor: () => ZodXor, + _ZodString: () => _ZodString, + _default: () => _default2, + _function: () => _function, + any: () => any, + array: () => array, + base64: () => base642, + base64url: () => base64url2, + bigint: () => bigint3, + boolean: () => boolean2, + catch: () => _catch2, + check: () => check2, + cidrv4: () => cidrv42, + cidrv6: () => cidrv62, + clone: () => clone, + codec: () => codec, + coerce: () => coerce_exports, + config: () => config2, + core: () => core_exports2, + cuid: () => cuid3, + cuid2: () => cuid22, + custom: () => custom, + date: () => date4, + decode: () => decode3, + decodeAsync: () => decodeAsync2, + describe: () => describe2, + discriminatedUnion: () => discriminatedUnion, + e164: () => e1642, + email: () => email2, + emoji: () => emoji2, + encode: () => encode4, + encodeAsync: () => encodeAsync2, + endsWith: () => _endsWith, + enum: () => _enum2, + exactOptional: () => exactOptional, + file: () => file, + flattenError: () => flattenError, + float32: () => float32, + float64: () => float64, + formatError: () => formatError, + fromJSONSchema: () => fromJSONSchema, + function: () => _function, + getErrorMap: () => getErrorMap, + globalRegistry: () => globalRegistry, + gt: () => _gt, + gte: () => _gte, + guid: () => guid2, + hash: () => hash, + hex: () => hex2, + hostname: () => hostname2, + httpUrl: () => httpUrl, + includes: () => _includes, + instanceof: () => _instanceof, + int: () => int, + int32: () => int32, + int64: () => int64, + intersection: () => intersection, + ipv4: () => ipv42, + ipv6: () => ipv62, + iso: () => iso_exports, + json: () => json, + jwt: () => jwt, + keyof: () => keyof, + ksuid: () => ksuid2, + lazy: () => lazy2, + length: () => _length, + literal: () => literal, + locales: () => locales_exports, + looseObject: () => looseObject, + looseRecord: () => looseRecord, + lowercase: () => _lowercase, + lt: () => _lt, + lte: () => _lte, + mac: () => mac2, + map: () => map, + maxLength: () => _maxLength, + maxSize: () => _maxSize, + meta: () => meta2, + mime: () => _mime, + minLength: () => _minLength, + minSize: () => _minSize, + multipleOf: () => _multipleOf, + nan: () => nan, + nanoid: () => nanoid2, + nativeEnum: () => nativeEnum, + negative: () => _negative, + never: () => never, + nonnegative: () => _nonnegative, + nonoptional: () => nonoptional, + nonpositive: () => _nonpositive, + normalize: () => _normalize, + null: () => _null3, + nullable: () => nullable, + nullish: () => nullish2, + number: () => number2, + object: () => object, + optional: () => optional, + overwrite: () => _overwrite, + parse: () => parse2, + parseAsync: () => parseAsync2, + partialRecord: () => partialRecord, + pipe: () => pipe, + positive: () => _positive, + prefault: () => prefault, + preprocess: () => preprocess, + prettifyError: () => prettifyError, + promise: () => promise, + property: () => _property, + readonly: () => readonly, + record: () => record, + refine: () => refine, + regex: () => _regex, + regexes: () => regexes_exports, + registry: () => registry, + safeDecode: () => safeDecode2, + safeDecodeAsync: () => safeDecodeAsync2, + safeEncode: () => safeEncode2, + safeEncodeAsync: () => safeEncodeAsync2, + safeParse: () => safeParse2, + safeParseAsync: () => safeParseAsync2, + set: () => set, + setErrorMap: () => setErrorMap, + size: () => _size, + slugify: () => _slugify, + startsWith: () => _startsWith, + strictObject: () => strictObject, + string: () => string2, + stringFormat: () => stringFormat, + stringbool: () => stringbool, + success: () => success, + superRefine: () => superRefine, + symbol: () => symbol, + templateLiteral: () => templateLiteral, + toJSONSchema: () => toJSONSchema, + toLowerCase: () => _toLowerCase, + toUpperCase: () => _toUpperCase, + transform: () => transform, + treeifyError: () => treeifyError, + trim: () => _trim, + tuple: () => tuple, + uint32: () => uint32, + uint64: () => uint64, + ulid: () => ulid2, + undefined: () => _undefined3, + union: () => union2, + unknown: () => unknown, + uppercase: () => _uppercase, + url: () => url, + util: () => util_exports, + uuid: () => uuid2, + uuidv4: () => uuidv4, + uuidv6: () => uuidv6, + uuidv7: () => uuidv7, + void: () => _void2, + xid: () => xid2, + xor: () => xor +}); +var init_external = __esm({ + "../../node_modules/zod/v4/classic/external.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_core3(); + init_schemas2(); + init_checks3(); + init_errors5(); + init_parse2(); + init_compat(); + init_core3(); + init_en(); + init_core3(); + init_json_schema_processors(); + init_from_json_schema(); + init_locales(); + init_iso(); + init_iso(); + init_coerce(); + config2(en_default()); + } +}); + +// ../../node_modules/zod/index.js +var init_zod = __esm({ + "../../node_modules/zod/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_external(); + init_external(); + } +}); + +// src/trpc/apis/admin-apis/apis/complaint.ts +var complaintRouter; +var init_complaint3 = __esm({ + "src/trpc/apis/admin-apis/apis/complaint.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_s3_client(); + init_dbService(); + complaintRouter = router2({ + getAll: protectedProcedure.input(external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(20) + })).query(async ({ input }) => { + const { cursor, limit } = input; + const { complaints: complaintsData, hasMore } = await getComplaints(cursor, limit); + const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData; + const complaintsWithSignedImages = await Promise.all( + complaintsToReturn.map(async (c2) => { + const signedImages = c2.images ? await generateSignedUrlsFromS3Urls(c2.images) : []; + return { + id: c2.id, + text: c2.complaintBody, + userId: c2.userId, + userName: c2.userName, + userMobile: c2.userMobile, + orderId: c2.orderId, + status: c2.isResolved ? "resolved" : "pending", + createdAt: c2.createdAt, + images: signedImages + }; + }) + ); + return { + complaints: complaintsWithSignedImages, + nextCursor: hasMore ? complaintsToReturn[complaintsToReturn.length - 1].id : void 0 + }; + }), + resolve: protectedProcedure.input(external_exports.object({ id: external_exports.string(), response: external_exports.string().optional() })).mutation(async ({ input }) => { + await resolveComplaint(parseInt(input.id), input.response); + return { message: "Complaint resolved successfully" }; + }) + }); + } +}); + +// ../../node_modules/dayjs/dayjs.min.js +var require_dayjs_min = __commonJS({ + "../../node_modules/dayjs/dayjs.min.js"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + !function(t9, e2) { + "object" == typeof exports && "undefined" != typeof module ? module.exports = e2() : "function" == typeof define && define.amd ? define(e2) : (t9 = "undefined" != typeof globalThis ? globalThis : t9 || self).dayjs = e2(); + }(exports, function() { + "use strict"; + var t9 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i2 = "second", s2 = "minute", u5 = "hour", a2 = "day", o2 = "week", c2 = "month", f2 = "quarter", h2 = "year", d2 = "date", l2 = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y2 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M2 = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t10) { + var e3 = ["th", "st", "nd", "rd"], n3 = t10 % 100; + return "[" + t10 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]"; + } }, m2 = /* @__PURE__ */ __name(function(t10, e3, n3) { + var r3 = String(t10); + return !r3 || r3.length >= e3 ? t10 : "" + Array(e3 + 1 - r3.length).join(n3) + t10; + }, "m"), v3 = { s: m2, z: function(t10) { + var e3 = -t10.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i3 = n3 % 60; + return (e3 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i3, 2, "0"); + }, m: /* @__PURE__ */ __name(function t10(e3, n3) { + if (e3.date() < n3.date()) + return -t10(n3, e3); + var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i3 = e3.clone().add(r3, c2), s3 = n3 - i3 < 0, u6 = e3.clone().add(r3 + (s3 ? -1 : 1), c2); + return +(-(r3 + (n3 - i3) / (s3 ? i3 - u6 : u6 - i3)) || 0); + }, "t"), a: function(t10) { + return t10 < 0 ? Math.ceil(t10) || 0 : Math.floor(t10); + }, p: function(t10) { + return { M: c2, y: h2, w: o2, d: a2, D: d2, h: u5, m: s2, s: i2, ms: r2, Q: f2 }[t10] || String(t10 || "").toLowerCase().replace(/s$/, ""); + }, u: function(t10) { + return void 0 === t10; + } }, g2 = "en", D3 = {}; + D3[g2] = M2; + var p2 = "$isDayjsObject", S2 = /* @__PURE__ */ __name(function(t10) { + return t10 instanceof _ || !(!t10 || !t10[p2]); + }, "S"), w2 = /* @__PURE__ */ __name(function t10(e3, n3, r3) { + var i3; + if (!e3) + return g2; + if ("string" == typeof e3) { + var s3 = e3.toLowerCase(); + D3[s3] && (i3 = s3), n3 && (D3[s3] = n3, i3 = s3); + var u6 = e3.split("-"); + if (!i3 && u6.length > 1) + return t10(u6[0]); + } else { + var a3 = e3.name; + D3[a3] = e3, i3 = a3; + } + return !r3 && i3 && (g2 = i3), i3 || !r3 && g2; + }, "t"), O2 = /* @__PURE__ */ __name(function(t10, e3) { + if (S2(t10)) + return t10.clone(); + var n3 = "object" == typeof e3 ? e3 : {}; + return n3.date = t10, n3.args = arguments, new _(n3); + }, "O"), b2 = v3; + b2.l = w2, b2.i = S2, b2.w = function(t10, e3) { + return O2(t10, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset }); + }; + var _ = function() { + function M3(t10) { + this.$L = w2(t10.locale, null, true), this.parse(t10), this.$x = this.$x || t10.x || {}, this[p2] = true; + } + __name(M3, "M"); + var m3 = M3.prototype; + return m3.parse = function(t10) { + this.$d = function(t11) { + var e3 = t11.date, n3 = t11.utc; + if (null === e3) + return /* @__PURE__ */ new Date(NaN); + if (b2.u(e3)) + return /* @__PURE__ */ new Date(); + if (e3 instanceof Date) + return new Date(e3); + if ("string" == typeof e3 && !/Z$/i.test(e3)) { + var r3 = e3.match($); + if (r3) { + var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3); + return n3 ? new Date(Date.UTC(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3); + } + } + return new Date(e3); + }(t10), this.init(); + }, m3.init = function() { + var t10 = this.$d; + this.$y = t10.getFullYear(), this.$M = t10.getMonth(), this.$D = t10.getDate(), this.$W = t10.getDay(), this.$H = t10.getHours(), this.$m = t10.getMinutes(), this.$s = t10.getSeconds(), this.$ms = t10.getMilliseconds(); + }, m3.$utils = function() { + return b2; + }, m3.isValid = function() { + return !(this.$d.toString() === l2); + }, m3.isSame = function(t10, e3) { + var n3 = O2(t10); + return this.startOf(e3) <= n3 && n3 <= this.endOf(e3); + }, m3.isAfter = function(t10, e3) { + return O2(t10) < this.startOf(e3); + }, m3.isBefore = function(t10, e3) { + return this.endOf(e3) < O2(t10); + }, m3.$g = function(t10, e3, n3) { + return b2.u(t10) ? this[e3] : this.set(n3, t10); + }, m3.unix = function() { + return Math.floor(this.valueOf() / 1e3); + }, m3.valueOf = function() { + return this.$d.getTime(); + }, m3.startOf = function(t10, e3) { + var n3 = this, r3 = !!b2.u(e3) || e3, f3 = b2.p(t10), l3 = /* @__PURE__ */ __name(function(t11, e4) { + var i3 = b2.w(n3.$u ? Date.UTC(n3.$y, e4, t11) : new Date(n3.$y, e4, t11), n3); + return r3 ? i3 : i3.endOf(a2); + }, "l"), $2 = /* @__PURE__ */ __name(function(t11, e4) { + return b2.w(n3.toDate()[t11].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3); + }, "$"), y3 = this.$W, M4 = this.$M, m4 = this.$D, v5 = "set" + (this.$u ? "UTC" : ""); + switch (f3) { + case h2: + return r3 ? l3(1, 0) : l3(31, 11); + case c2: + return r3 ? l3(1, M4) : l3(0, M4 + 1); + case o2: + var g3 = this.$locale().weekStart || 0, D4 = (y3 < g3 ? y3 + 7 : y3) - g3; + return l3(r3 ? m4 - D4 : m4 + (6 - D4), M4); + case a2: + case d2: + return $2(v5 + "Hours", 0); + case u5: + return $2(v5 + "Minutes", 1); + case s2: + return $2(v5 + "Seconds", 2); + case i2: + return $2(v5 + "Milliseconds", 3); + default: + return this.clone(); + } + }, m3.endOf = function(t10) { + return this.startOf(t10, false); + }, m3.$set = function(t10, e3) { + var n3, o3 = b2.p(t10), f3 = "set" + (this.$u ? "UTC" : ""), l3 = (n3 = {}, n3[a2] = f3 + "Date", n3[d2] = f3 + "Date", n3[c2] = f3 + "Month", n3[h2] = f3 + "FullYear", n3[u5] = f3 + "Hours", n3[s2] = f3 + "Minutes", n3[i2] = f3 + "Seconds", n3[r2] = f3 + "Milliseconds", n3)[o3], $2 = o3 === a2 ? this.$D + (e3 - this.$W) : e3; + if (o3 === c2 || o3 === h2) { + var y3 = this.clone().set(d2, 1); + y3.$d[l3]($2), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d; + } else + l3 && this.$d[l3]($2); + return this.init(), this; + }, m3.set = function(t10, e3) { + return this.clone().$set(t10, e3); + }, m3.get = function(t10) { + return this[b2.p(t10)](); + }, m3.add = function(r3, f3) { + var d3, l3 = this; + r3 = Number(r3); + var $2 = b2.p(f3), y3 = /* @__PURE__ */ __name(function(t10) { + var e3 = O2(l3); + return b2.w(e3.date(e3.date() + Math.round(t10 * r3)), l3); + }, "y"); + if ($2 === c2) + return this.set(c2, this.$M + r3); + if ($2 === h2) + return this.set(h2, this.$y + r3); + if ($2 === a2) + return y3(1); + if ($2 === o2) + return y3(7); + var M4 = (d3 = {}, d3[s2] = e2, d3[u5] = n2, d3[i2] = t9, d3)[$2] || 1, m4 = this.$d.getTime() + r3 * M4; + return b2.w(m4, this); + }, m3.subtract = function(t10, e3) { + return this.add(-1 * t10, e3); + }, m3.format = function(t10) { + var e3 = this, n3 = this.$locale(); + if (!this.isValid()) + return n3.invalidDate || l2; + var r3 = t10 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b2.z(this), s3 = this.$H, u6 = this.$m, a3 = this.$M, o3 = n3.weekdays, c3 = n3.months, f3 = n3.meridiem, h3 = /* @__PURE__ */ __name(function(t11, n4, i4, s4) { + return t11 && (t11[n4] || t11(e3, r3)) || i4[n4].slice(0, s4); + }, "h"), d3 = /* @__PURE__ */ __name(function(t11) { + return b2.s(s3 % 12 || 12, t11, "0"); + }, "d"), $2 = f3 || function(t11, e4, n4) { + var r4 = t11 < 12 ? "AM" : "PM"; + return n4 ? r4.toLowerCase() : r4; + }; + return r3.replace(y2, function(t11, r4) { + return r4 || function(t12) { + switch (t12) { + case "YY": + return String(e3.$y).slice(-2); + case "YYYY": + return b2.s(e3.$y, 4, "0"); + case "M": + return a3 + 1; + case "MM": + return b2.s(a3 + 1, 2, "0"); + case "MMM": + return h3(n3.monthsShort, a3, c3, 3); + case "MMMM": + return h3(c3, a3); + case "D": + return e3.$D; + case "DD": + return b2.s(e3.$D, 2, "0"); + case "d": + return String(e3.$W); + case "dd": + return h3(n3.weekdaysMin, e3.$W, o3, 2); + case "ddd": + return h3(n3.weekdaysShort, e3.$W, o3, 3); + case "dddd": + return o3[e3.$W]; + case "H": + return String(s3); + case "HH": + return b2.s(s3, 2, "0"); + case "h": + return d3(1); + case "hh": + return d3(2); + case "a": + return $2(s3, u6, true); + case "A": + return $2(s3, u6, false); + case "m": + return String(u6); + case "mm": + return b2.s(u6, 2, "0"); + case "s": + return String(e3.$s); + case "ss": + return b2.s(e3.$s, 2, "0"); + case "SSS": + return b2.s(e3.$ms, 3, "0"); + case "Z": + return i3; + } + return null; + }(t11) || i3.replace(":", ""); + }); + }, m3.utcOffset = function() { + return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); + }, m3.diff = function(r3, d3, l3) { + var $2, y3 = this, M4 = b2.p(d3), m4 = O2(r3), v5 = (m4.utcOffset() - this.utcOffset()) * e2, g3 = this - m4, D4 = /* @__PURE__ */ __name(function() { + return b2.m(y3, m4); + }, "D"); + switch (M4) { + case h2: + $2 = D4() / 12; + break; + case c2: + $2 = D4(); + break; + case f2: + $2 = D4() / 3; + break; + case o2: + $2 = (g3 - v5) / 6048e5; + break; + case a2: + $2 = (g3 - v5) / 864e5; + break; + case u5: + $2 = g3 / n2; + break; + case s2: + $2 = g3 / e2; + break; + case i2: + $2 = g3 / t9; + break; + default: + $2 = g3; + } + return l3 ? $2 : b2.a($2); + }, m3.daysInMonth = function() { + return this.endOf(c2).$D; + }, m3.$locale = function() { + return D3[this.$L]; + }, m3.locale = function(t10, e3) { + if (!t10) + return this.$L; + var n3 = this.clone(), r3 = w2(t10, e3, true); + return r3 && (n3.$L = r3), n3; + }, m3.clone = function() { + return b2.w(this.$d, this); + }, m3.toDate = function() { + return new Date(this.valueOf()); + }, m3.toJSON = function() { + return this.isValid() ? this.toISOString() : null; + }, m3.toISOString = function() { + return this.$d.toISOString(); + }, m3.toString = function() { + return this.$d.toUTCString(); + }, M3; + }(), k2 = _.prototype; + return O2.prototype = k2, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u5], ["$W", a2], ["$M", c2], ["$y", h2], ["$D", d2]].forEach(function(t10) { + k2[t10[1]] = function(e3) { + return this.$g(e3, t10[0], t10[1]); + }; + }), O2.extend = function(t10, e3) { + return t10.$i || (t10(e3, _, O2), t10.$i = true), O2; + }, O2.locale = w2, O2.isDayjs = S2, O2.unix = function(t10) { + return O2(1e3 * t10); + }, O2.en = D3[g2], O2.Ls = D3, O2.p = {}, O2; + }); + } +}); + +// src/trpc/apis/admin-apis/apis/coupon.ts +var import_dayjs, createCouponBodySchema, validateCouponBodySchema, couponRouter; +var init_coupon3 = __esm({ + "src/trpc/apis/admin-apis/apis/coupon.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + import_dayjs = __toESM(require_dayjs_min()); + init_dbService(); + createCouponBodySchema = external_exports.object({ + couponCode: external_exports.string().optional(), + isUserBased: external_exports.boolean().optional(), + discountPercent: external_exports.number().optional(), + flatDiscount: external_exports.number().optional(), + minOrder: external_exports.number().optional(), + targetUser: external_exports.number().optional(), + productIds: external_exports.array(external_exports.number()).optional().nullable(), + applicableUsers: external_exports.array(external_exports.number()).optional(), + applicableProducts: external_exports.array(external_exports.number()).optional(), + maxValue: external_exports.number().optional(), + isApplyForAll: external_exports.boolean().optional(), + validTill: external_exports.string().optional(), + maxLimitForUser: external_exports.number().optional(), + exclusiveApply: external_exports.boolean().optional() + }); + validateCouponBodySchema = external_exports.object({ + code: external_exports.string(), + userId: external_exports.number(), + orderAmount: external_exports.number() + }); + couponRouter = router2({ + create: protectedProcedure.input(createCouponBodySchema).mutation(async ({ input, ctx }) => { + const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableUsers, applicableProducts, maxValue, isApplyForAll, validTill, maxLimitForUser, exclusiveApply } = input; + if (!discountPercent && !flatDiscount || discountPercent && flatDiscount) { + throw new Error("Either discountPercent or flatDiscount must be provided (but not both)"); + } + if (isUserBased && (!applicableUsers || applicableUsers.length === 0) && !isApplyForAll) { + throw new Error("applicableUsers is required for user-based coupons (or set isApplyForAll to true)"); + } + if (isUserBased && isApplyForAll) { + throw new Error("Cannot be both user-based and apply for all users"); + } + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + let finalCouponCode = couponCode; + if (!finalCouponCode) { + const timestamp = Date.now().toString().slice(-6); + const random = Math.random().toString(36).substring(2, 8).toUpperCase(); + finalCouponCode = `MF${timestamp}${random}`; + } + const codeExists = await checkCouponExists(finalCouponCode); + if (codeExists) { + throw new Error("Coupon code already exists"); + } + if (applicableUsers && applicableUsers.length > 0) { + const usersExist = await checkUsersExist(applicableUsers); + if (!usersExist) { + throw new Error("Some applicable users not found"); + } + } + const coupon = await createCouponWithRelations( + { + couponCode: finalCouponCode, + isUserBased: isUserBased || false, + discountPercent: discountPercent?.toString(), + flatDiscount: flatDiscount?.toString(), + minOrder: minOrder?.toString(), + productIds: productIds || null, + createdBy: staffUserId, + maxValue: maxValue?.toString(), + isApplyForAll: isApplyForAll || false, + validTill: validTill ? (0, import_dayjs.default)(validTill).toDate() : void 0, + maxLimitForUser, + exclusiveApply: exclusiveApply || false + }, + applicableUsers, + applicableProducts + ); + return coupon; + }), + getAll: protectedProcedure.input(external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(50), + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { cursor, limit, search } = input; + const { coupons: couponsList, hasMore } = await getAllCoupons(cursor, limit, search); + const nextCursor = hasMore ? couponsList[couponsList.length - 1].id : void 0; + return { coupons: couponsList, nextCursor }; + }), + getById: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).query(async ({ input }) => { + const couponId = input.id; + const result = await getCouponById(couponId); + if (!result) { + throw new Error("Coupon not found"); + } + return { + ...result, + productIds: result.productIds || void 0, + applicableUsers: result.applicableUsers.map((au2) => au2.user), + applicableProducts: result.applicableProducts.map((ap2) => ap2.product) + }; + }), + update: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + updates: createCouponBodySchema.extend({ + isInvalidated: external_exports.boolean().optional() + }) + })).mutation(async ({ input }) => { + const { id, updates } = input; + if (updates.discountPercent !== void 0 && updates.flatDiscount !== void 0) { + if (updates.discountPercent && updates.flatDiscount) { + throw new Error("Cannot have both discountPercent and flatDiscount"); + } + } + const updateData = {}; + if (updates.couponCode !== void 0) + updateData.couponCode = updates.couponCode; + if (updates.isUserBased !== void 0) + updateData.isUserBased = updates.isUserBased; + if (updates.discountPercent !== void 0) + updateData.discountPercent = updates.discountPercent?.toString(); + if (updates.flatDiscount !== void 0) + updateData.flatDiscount = updates.flatDiscount?.toString(); + if (updates.minOrder !== void 0) + updateData.minOrder = updates.minOrder?.toString(); + if (updates.maxValue !== void 0) + updateData.maxValue = updates.maxValue?.toString(); + if (updates.isApplyForAll !== void 0) + updateData.isApplyForAll = updates.isApplyForAll; + if (updates.validTill !== void 0) + updateData.validTill = updates.validTill ? (0, import_dayjs.default)(updates.validTill).toDate() : null; + if (updates.maxLimitForUser !== void 0) + updateData.maxLimitForUser = updates.maxLimitForUser; + if (updates.exclusiveApply !== void 0) + updateData.exclusiveApply = updates.exclusiveApply; + if (updates.isInvalidated !== void 0) + updateData.isInvalidated = updates.isInvalidated; + if (updates.productIds !== void 0) + updateData.productIds = updates.productIds; + const coupon = await updateCouponWithRelations( + id, + updateData, + updates.applicableUsers, + updates.applicableProducts + ); + return coupon; + }), + delete: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).mutation(async ({ input }) => { + const { id } = input; + await invalidateCoupon(id); + return { message: "Coupon invalidated successfully" }; + }), + validate: protectedProcedure.input(validateCouponBodySchema).query(async ({ input }) => { + const { code, userId, orderAmount } = input; + if (!code || typeof code !== "string") { + return { valid: false, message: "Invalid coupon code" }; + } + const result = await validateCoupon(code, userId, orderAmount); + return result; + }), + generateCancellationCoupon: protectedProcedure.input( + external_exports.object({ + orderId: external_exports.number() + }) + ).mutation(async ({ input, ctx }) => { + const { orderId } = input; + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + const order = await getOrderWithUser(orderId); + if (!order) { + throw new Error("Order not found"); + } + if (!order.user) { + throw new Error("User not found for this order"); + } + const userNamePrefix = (order.user.name || order.user.mobile || "USR").substring(0, 3).toUpperCase(); + const couponCode = `${userNamePrefix}${orderId}`; + const codeExists = await checkCouponExists(couponCode); + if (codeExists) { + throw new Error("Coupon code already exists"); + } + const orderAmount = parseFloat(order.totalAmount); + const coupon = await generateCancellationCoupon( + orderId, + staffUserId, + order.userId, + orderAmount, + couponCode + ); + return coupon; + }), + getReservedCoupons: protectedProcedure.input(external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(50), + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { cursor, limit, search } = input; + const { coupons: result, hasMore } = await getReservedCoupons(cursor, limit, search); + const nextCursor = hasMore ? result[result.length - 1].id : void 0; + return { + coupons: result, + nextCursor + }; + }), + createReservedCoupon: protectedProcedure.input(createCouponBodySchema).mutation(async ({ input, ctx }) => { + const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableProducts, maxValue, validTill, maxLimitForUser, exclusiveApply } = input; + if (!discountPercent && !flatDiscount || discountPercent && flatDiscount) { + throw new Error("Either discountPercent or flatDiscount must be provided (but not both)"); + } + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + let secretCode = couponCode || `SECRET${Date.now().toString().slice(-6)}${Math.random().toString(36).substring(2, 8).toUpperCase()}`; + const codeExists = await checkReservedCouponExists(secretCode); + if (codeExists) { + throw new Error("Secret code already exists"); + } + const coupon = await createReservedCouponWithProducts( + { + secretCode, + couponCode: couponCode || `RESERVED${Date.now().toString().slice(-6)}`, + discountPercent: discountPercent?.toString(), + flatDiscount: flatDiscount?.toString(), + minOrder: minOrder?.toString(), + productIds, + maxValue: maxValue?.toString(), + validTill: validTill ? (0, import_dayjs.default)(validTill).toDate() : void 0, + maxLimitForUser, + exclusiveApply: exclusiveApply || false, + createdBy: staffUserId + }, + applicableProducts + ); + return coupon; + }), + getUsersMiniInfo: protectedProcedure.input(external_exports.object({ + search: external_exports.string().optional(), + limit: external_exports.number().min(1).max(50).default(20), + offset: external_exports.number().min(0).default(0) + })).query(async ({ input }) => { + const { search, limit, offset } = input; + const result = await getUsersForCoupon(search, limit, offset); + return result; + }), + createCoupon: protectedProcedure.input(external_exports.object({ + mobile: external_exports.string().min(1, "Mobile number is required") + })).mutation(async ({ input, ctx }) => { + const { mobile } = input; + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + const cleanMobile = mobile.replace(/\D/g, ""); + if (cleanMobile.length !== 10) { + throw new Error("Mobile number must be exactly 10 digits"); + } + const timestamp = Date.now().toString().slice(-6); + const random = Math.random().toString(36).substring(2, 6).toUpperCase(); + const couponCode = `MF${cleanMobile.slice(-4)}${timestamp}${random}`; + const codeExists = await checkCouponExists(couponCode); + if (codeExists) { + throw new Error("Generated coupon code already exists - please try again"); + } + const { coupon, user } = await createCouponForUser(cleanMobile, couponCode, staffUserId); + return { + success: true, + coupon: { + id: coupon.id, + couponCode: coupon.couponCode, + userId: user.id, + userMobile: user.mobile, + discountPercent: 20, + minOrder: 1e3, + maxValue: 500, + maxLimitForUser: 1 + } + }; + }) + }); + } +}); + +// ../../node_modules/unenv/dist/runtime/npm/node-fetch.mjs +var node_fetch_exports = {}; +__export(node_fetch_exports, { + AbortController: () => AbortController2, + AbortError: () => AbortError, + FetchError: () => FetchError, + Headers: () => Headers2, + Request: () => Request2, + Response: () => Response2, + default: () => node_fetch_default, + fetch: () => fetch2, + isRedirect: () => isRedirect +}); +var fetch2, Headers2, Request2, Response2, AbortController2, FetchError, AbortError, redirectStatus, isRedirect, node_fetch_default; +var init_node_fetch = __esm({ + "../../node_modules/unenv/dist/runtime/npm/node-fetch.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + fetch2 = /* @__PURE__ */ __name((...args) => globalThis.fetch(...args), "fetch"); + Headers2 = globalThis.Headers; + Request2 = globalThis.Request; + Response2 = globalThis.Response; + AbortController2 = globalThis.AbortController; + FetchError = Error; + AbortError = Error; + redirectStatus = /* @__PURE__ */ new Set([ + 301, + 302, + 303, + 307, + 308 + ]); + isRedirect = /* @__PURE__ */ __name((code) => redirectStatus.has(code), "isRedirect"); + fetch2.Promise = globalThis.Promise; + fetch2.isRedirect = isRedirect; + node_fetch_default = fetch2; + } +}); + +// required-unenv-alias:node-fetch +var require_node_fetch = __commonJS({ + "required-unenv-alias:node-fetch"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_node_fetch(); + module.exports = Object.entries(node_fetch_exports).filter(([k2]) => k2 !== "default").reduce( + (cjs, [k2, value]) => Object.defineProperty(cjs, k2, { value, enumerable: true }), + "default" in node_fetch_exports ? node_fetch_default : {} + ); + } +}); + +// node-built-in-modules:node:assert +import libDefault from "node:assert"; +var require_node_assert = __commonJS({ + "node-built-in-modules:node:assert"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module.exports = libDefault; + } +}); + +// node-built-in-modules:node:zlib +import libDefault2 from "node:zlib"; +var require_node_zlib = __commonJS({ + "node-built-in-modules:node:zlib"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module.exports = libDefault2; + } +}); + +// ../../node_modules/promise-limit/index.js +var require_promise_limit = __commonJS({ + "../../node_modules/promise-limit/index.js"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + function limiter(count4) { + var outstanding = 0; + var jobs = []; + function remove() { + outstanding--; + if (outstanding < count4) { + dequeue(); + } + } + __name(remove, "remove"); + function dequeue() { + var job = jobs.shift(); + semaphore.queue = jobs.length; + if (job) { + run2(job.fn).then(job.resolve).catch(job.reject); + } + } + __name(dequeue, "dequeue"); + function queue(fn) { + return new Promise(function(resolve, reject) { + jobs.push({ fn, resolve, reject }); + semaphore.queue = jobs.length; + }); + } + __name(queue, "queue"); + function run2(fn) { + outstanding++; + try { + return Promise.resolve(fn()).then(function(result) { + remove(); + return result; + }, function(error50) { + remove(); + throw error50; + }); + } catch (err) { + remove(); + return Promise.reject(err); + } + } + __name(run2, "run"); + var semaphore = /* @__PURE__ */ __name(function(fn) { + if (outstanding >= count4) { + return queue(fn); + } else { + return run2(fn); + } + }, "semaphore"); + return semaphore; + } + __name(limiter, "limiter"); + function map2(items, mapper) { + var failed = false; + var limit = this; + return Promise.all(items.map(function() { + var args = arguments; + return limit(function() { + if (!failed) { + return mapper.apply(void 0, args).catch(function(e2) { + failed = true; + throw e2; + }); + } + }); + })); + } + __name(map2, "map"); + function addExtras(fn) { + fn.queue = 0; + fn.map = map2; + return fn; + } + __name(addExtras, "addExtras"); + module.exports = function(count4) { + if (count4) { + return addExtras(limiter(count4)); + } else { + return addExtras(function(fn) { + return fn(); + }); + } + }; + } +}); + +// ../../node_modules/err-code/index.js +var require_err_code = __commonJS({ + "../../node_modules/err-code/index.js"(exports, module) { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + function assign(obj, props) { + for (const key in props) { + Object.defineProperty(obj, key, { + value: props[key], + enumerable: true, + configurable: true + }); + } + return obj; + } + __name(assign, "assign"); + function createError(err, code, props) { + if (!err || typeof err === "string") { + throw new TypeError("Please pass an Error to err-code"); + } + if (!props) { + props = {}; + } + if (typeof code === "object") { + props = code; + code = void 0; + } + if (code != null) { + props.code = code; + } + try { + return assign(err, props); + } catch (_) { + props.message = err.message; + props.stack = err.stack; + const ErrClass = /* @__PURE__ */ __name(function() { + }, "ErrClass"); + ErrClass.prototype = Object.create(Object.getPrototypeOf(err)); + return assign(new ErrClass(), props); + } + } + __name(createError, "createError"); + module.exports = createError; + } +}); + +// ../../node_modules/retry/lib/retry_operation.js +var require_retry_operation = __commonJS({ + "../../node_modules/retry/lib/retry_operation.js"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + function RetryOperation(timeouts, options) { + if (typeof options === "boolean") { + options = { forever: options }; + } + this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)); + this._timeouts = timeouts; + this._options = options || {}; + this._maxRetryTime = options && options.maxRetryTime || Infinity; + this._fn = null; + this._errors = []; + this._attempts = 1; + this._operationTimeout = null; + this._operationTimeoutCb = null; + this._timeout = null; + this._operationStart = null; + if (this._options.forever) { + this._cachedTimeouts = this._timeouts.slice(0); + } + } + __name(RetryOperation, "RetryOperation"); + module.exports = RetryOperation; + RetryOperation.prototype.reset = function() { + this._attempts = 1; + this._timeouts = this._originalTimeouts; + }; + RetryOperation.prototype.stop = function() { + if (this._timeout) { + clearTimeout(this._timeout); + } + this._timeouts = []; + this._cachedTimeouts = null; + }; + RetryOperation.prototype.retry = function(err) { + if (this._timeout) { + clearTimeout(this._timeout); + } + if (!err) { + return false; + } + var currentTime = (/* @__PURE__ */ new Date()).getTime(); + if (err && currentTime - this._operationStart >= this._maxRetryTime) { + this._errors.unshift(new Error("RetryOperation timeout occurred")); + return false; + } + this._errors.push(err); + var timeout = this._timeouts.shift(); + if (timeout === void 0) { + if (this._cachedTimeouts) { + this._errors.splice(this._errors.length - 1, this._errors.length); + this._timeouts = this._cachedTimeouts.slice(0); + timeout = this._timeouts.shift(); + } else { + return false; + } + } + var self2 = this; + var timer = setTimeout(function() { + self2._attempts++; + if (self2._operationTimeoutCb) { + self2._timeout = setTimeout(function() { + self2._operationTimeoutCb(self2._attempts); + }, self2._operationTimeout); + if (self2._options.unref) { + self2._timeout.unref(); + } + } + self2._fn(self2._attempts); + }, timeout); + if (this._options.unref) { + timer.unref(); + } + return true; + }; + RetryOperation.prototype.attempt = function(fn, timeoutOps) { + this._fn = fn; + if (timeoutOps) { + if (timeoutOps.timeout) { + this._operationTimeout = timeoutOps.timeout; + } + if (timeoutOps.cb) { + this._operationTimeoutCb = timeoutOps.cb; + } + } + var self2 = this; + if (this._operationTimeoutCb) { + this._timeout = setTimeout(function() { + self2._operationTimeoutCb(); + }, self2._operationTimeout); + } + this._operationStart = (/* @__PURE__ */ new Date()).getTime(); + this._fn(this._attempts); + }; + RetryOperation.prototype.try = function(fn) { + console.log("Using RetryOperation.try() is deprecated"); + this.attempt(fn); + }; + RetryOperation.prototype.start = function(fn) { + console.log("Using RetryOperation.start() is deprecated"); + this.attempt(fn); + }; + RetryOperation.prototype.start = RetryOperation.prototype.try; + RetryOperation.prototype.errors = function() { + return this._errors; + }; + RetryOperation.prototype.attempts = function() { + return this._attempts; + }; + RetryOperation.prototype.mainError = function() { + if (this._errors.length === 0) { + return null; + } + var counts = {}; + var mainError = null; + var mainErrorCount = 0; + for (var i2 = 0; i2 < this._errors.length; i2++) { + var error50 = this._errors[i2]; + var message2 = error50.message; + var count4 = (counts[message2] || 0) + 1; + counts[message2] = count4; + if (count4 >= mainErrorCount) { + mainError = error50; + mainErrorCount = count4; + } + } + return mainError; + }; + } +}); + +// ../../node_modules/retry/lib/retry.js +var require_retry = __commonJS({ + "../../node_modules/retry/lib/retry.js"(exports) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var RetryOperation = require_retry_operation(); + exports.operation = function(options) { + var timeouts = exports.timeouts(options); + return new RetryOperation(timeouts, { + forever: options && options.forever, + unref: options && options.unref, + maxRetryTime: options && options.maxRetryTime + }); + }; + exports.timeouts = function(options) { + if (options instanceof Array) { + return [].concat(options); + } + var opts = { + retries: 10, + factor: 2, + minTimeout: 1 * 1e3, + maxTimeout: Infinity, + randomize: false + }; + for (var key in options) { + opts[key] = options[key]; + } + if (opts.minTimeout > opts.maxTimeout) { + throw new Error("minTimeout is greater than maxTimeout"); + } + var timeouts = []; + for (var i2 = 0; i2 < opts.retries; i2++) { + timeouts.push(this.createTimeout(i2, opts)); + } + if (options && options.forever && !timeouts.length) { + timeouts.push(this.createTimeout(i2, opts)); + } + timeouts.sort(function(a2, b2) { + return a2 - b2; + }); + return timeouts; + }; + exports.createTimeout = function(attempt, opts) { + var random = opts.randomize ? Math.random() + 1 : 1; + var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt)); + timeout = Math.min(timeout, opts.maxTimeout); + return timeout; + }; + exports.wrap = function(obj, options, methods) { + if (options instanceof Array) { + methods = options; + options = null; + } + if (!methods) { + methods = []; + for (var key in obj) { + if (typeof obj[key] === "function") { + methods.push(key); + } + } + } + for (var i2 = 0; i2 < methods.length; i2++) { + var method = methods[i2]; + var original = obj[method]; + obj[method] = (/* @__PURE__ */ __name(function retryWrapper(original2) { + var op = exports.operation(options); + var args = Array.prototype.slice.call(arguments, 1); + var callback = args.pop(); + args.push(function(err) { + if (op.retry(err)) { + return; + } + if (err) { + arguments[0] = op.mainError(); + } + callback.apply(this, arguments); + }); + op.attempt(function() { + original2.apply(obj, args); + }); + }, "retryWrapper")).bind(obj, original); + obj[method].options = options; + } + }; + } +}); + +// ../../node_modules/retry/index.js +var require_retry2 = __commonJS({ + "../../node_modules/retry/index.js"(exports, module) { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + module.exports = require_retry(); + } +}); + +// ../../node_modules/promise-retry/index.js +var require_promise_retry = __commonJS({ + "../../node_modules/promise-retry/index.js"(exports, module) { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var errcode = require_err_code(); + var retry = require_retry2(); + var hasOwn = Object.prototype.hasOwnProperty; + function isRetryError(err) { + return err && err.code === "EPROMISERETRY" && hasOwn.call(err, "retried"); + } + __name(isRetryError, "isRetryError"); + function promiseRetry(fn, options) { + var temp; + var operation2; + if (typeof fn === "object" && typeof options === "function") { + temp = options; + options = fn; + fn = temp; + } + operation2 = retry.operation(options); + return new Promise(function(resolve, reject) { + operation2.attempt(function(number4) { + Promise.resolve().then(function() { + return fn(function(err) { + if (isRetryError(err)) { + err = err.retried; + } + throw errcode(new Error("Retrying"), "EPROMISERETRY", { retried: err }); + }, number4); + }).then(resolve, function(err) { + if (isRetryError(err)) { + err = err.retried; + if (operation2.retry(err || new Error())) { + return; + } + } + reject(err); + }); + }); + }); + } + __name(promiseRetry, "promiseRetry"); + module.exports = promiseRetry; + } +}); + +// node_modules/expo-server-sdk/build/ExpoClientValues.js +var require_ExpoClientValues = __commonJS({ + "node_modules/expo-server-sdk/build/ExpoClientValues.js"(exports) { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.requestRetryMinTimeout = exports.defaultConcurrentRequestLimit = exports.pushNotificationReceiptChunkLimit = exports.pushNotificationChunkLimit = exports.getReceiptsApiUrl = exports.sendApiUrl = void 0; + var baseUrl = process.env["EXPO_BASE_URL"] || "https://exp.host"; + exports.sendApiUrl = `${baseUrl}/--/api/v2/push/send`; + exports.getReceiptsApiUrl = `${baseUrl}/--/api/v2/push/getReceipts`; + exports.pushNotificationChunkLimit = 100; + exports.pushNotificationReceiptChunkLimit = 300; + exports.defaultConcurrentRequestLimit = 6; + exports.requestRetryMinTimeout = 1e3; + } +}); + +// node_modules/expo-server-sdk/package.json +var require_package = __commonJS({ + "node_modules/expo-server-sdk/package.json"(exports, module) { + module.exports = { + name: "expo-server-sdk", + version: "4.0.0", + description: "Server-side library for working with Expo using Node.js", + main: "build/ExpoClient.js", + types: "build/ExpoClient.d.ts", + files: [ + "build" + ], + engines: { + node: ">=20" + }, + scripts: { + build: "yarn prepack", + lint: "eslint", + prepack: "tsc --project tsconfig.build.json", + test: "jest", + tsc: "tsc", + watch: "tsc --watch" + }, + jest: { + coverageDirectory: "/../coverage", + coverageThreshold: { + global: { + branches: 100, + functions: 100, + lines: 100, + statements: 0 + } + }, + preset: "ts-jest", + rootDir: "src", + testEnvironment: "node" + }, + repository: { + type: "git", + url: "git+https://github.com/expo/expo-server-sdk-node.git" + }, + keywords: [ + "expo", + "push-notifications" + ], + author: "support@expo.dev", + license: "MIT", + bugs: { + url: "https://github.com/expo/expo-server-sdk-node/issues" + }, + homepage: "https://github.com/expo/expo-server-sdk-node#readme", + dependencies: { + "node-fetch": "^2.6.0", + "promise-limit": "^2.7.0", + "promise-retry": "^2.0.1" + }, + devDependencies: { + "@tsconfig/node20": "20.1.6", + "@tsconfig/strictest": "2.0.5", + "@types/node": "22.17.2", + "@types/node-fetch": "2.6.12", + "@types/promise-retry": "1.1.6", + eslint: "9.33.0", + "eslint-config-universe": "15.0.3", + jest: "29.7.0", + jiti: "2.4.2", + msw: "2.10.5", + prettier: "3.6.2", + "ts-jest": "29.4.1", + typescript: "5.9.2" + }, + packageManager: "yarn@4.9.2" + }; + } +}); + +// node_modules/expo-server-sdk/build/ExpoClient.js +var require_ExpoClient = __commonJS({ + "node_modules/expo-server-sdk/build/ExpoClient.js"(exports) { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) { + if (k22 === void 0) + k22 = k2; + var desc2 = Object.getOwnPropertyDescriptor(m2, k2); + if (!desc2 || ("get" in desc2 ? !m2.__esModule : desc2.writable || desc2.configurable)) { + desc2 = { enumerable: true, get: function() { + return m2[k2]; + } }; + } + Object.defineProperty(o2, k22, desc2); + } : function(o2, m2, k2, k22) { + if (k22 === void 0) + k22 = k2; + o2[k22] = m2[k2]; + }); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o2, v3) { + Object.defineProperty(o2, "default", { enumerable: true, value: v3 }); + } : function(o2, v3) { + o2["default"] = v3; + }); + var __importStar = exports && exports.__importStar || function() { + var ownKeys = /* @__PURE__ */ __name(function(o2) { + ownKeys = Object.getOwnPropertyNames || function(o3) { + var ar2 = []; + for (var k2 in o3) + if (Object.prototype.hasOwnProperty.call(o3, k2)) + ar2[ar2.length] = k2; + return ar2; + }; + return ownKeys(o2); + }, "ownKeys"); + return function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k2 = ownKeys(mod), i2 = 0; i2 < k2.length; i2++) + if (k2[i2] !== "default") + __createBinding(result, mod, k2[i2]); + } + __setModuleDefault(result, mod); + return result; + }; + }(); + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Expo = void 0; + var node_fetch_1 = __importStar(require_node_fetch()); + var node_assert_1 = __importDefault(require_node_assert()); + var node_zlib_1 = require_node_zlib(); + var promise_limit_1 = __importDefault(require_promise_limit()); + var promise_retry_1 = __importDefault(require_promise_retry()); + var ExpoClientValues_1 = require_ExpoClientValues(); + var _Expo = class { + httpAgent; + limitConcurrentRequests; + accessToken; + useFcmV1; + retryMinTimeout; + constructor(options = {}) { + this.httpAgent = options.httpAgent; + this.limitConcurrentRequests = (0, promise_limit_1.default)(options.maxConcurrentRequests ?? ExpoClientValues_1.defaultConcurrentRequestLimit); + this.retryMinTimeout = options.retryMinTimeout ?? ExpoClientValues_1.requestRetryMinTimeout; + this.accessToken = options.accessToken; + this.useFcmV1 = options.useFcmV1; + } + /** + * Returns `true` if the token is an Expo push token + */ + static isExpoPushToken(token) { + return typeof token === "string" && ((token.startsWith("ExponentPushToken[") || token.startsWith("ExpoPushToken[")) && token.endsWith("]") || /^[a-z\d]{8}-[a-z\d]{4}-[a-z\d]{4}-[a-z\d]{4}-[a-z\d]{12}$/i.test(token)); + } + /** + * Sends the given messages to their recipients via push notifications and returns an array of + * push tickets. Each ticket corresponds to the message at its respective index (the nth receipt + * is for the nth message) and contains a receipt ID. Later, after Expo attempts to deliver the + * messages to the underlying push notification services, the receipts with those IDs will be + * available for a period of time (approximately a day). + * + * There is a limit on the number of push notifications you can send at once. Use + * `chunkPushNotifications` to divide an array of push notification messages into appropriately + * sized chunks. + */ + async sendPushNotificationsAsync(messages) { + const url2 = new URL(ExpoClientValues_1.sendApiUrl); + if (this.useFcmV1 === false) { + url2.searchParams.append("useFcmV1", String(this.useFcmV1)); + } + const actualMessagesCount = _Expo._getActualMessageCount(messages); + const data = await this.limitConcurrentRequests(async () => { + return await (0, promise_retry_1.default)(async (retry) => { + try { + return await this.requestAsync(url2.toString(), { + httpMethod: "post", + body: messages, + shouldCompress(body) { + return body.length > 1024; + } + }); + } catch (e2) { + if (e2.statusCode === 429) { + return retry(e2); + } + throw e2; + } + }, { + retries: 2, + factor: 2, + minTimeout: this.retryMinTimeout + }); + }); + if (!Array.isArray(data) || data.length !== actualMessagesCount) { + const apiError = new Error(`Expected Expo to respond with ${actualMessagesCount} ${actualMessagesCount === 1 ? "ticket" : "tickets"} but got ${data.length}`); + apiError["data"] = data; + throw apiError; + } + return data; + } + async getPushNotificationReceiptsAsync(receiptIds) { + const data = await this.requestAsync(ExpoClientValues_1.getReceiptsApiUrl, { + httpMethod: "post", + body: { ids: receiptIds }, + shouldCompress(body) { + return body.length > 1024; + } + }); + if (!data || typeof data !== "object" || Array.isArray(data)) { + const apiError = new Error(`Expected Expo to respond with a map from receipt IDs to receipts but received data of another type`); + apiError["data"] = data; + throw apiError; + } + return data; + } + chunkPushNotifications(messages) { + const chunks = []; + let chunk = []; + let chunkMessagesCount = 0; + for (const message2 of messages) { + if (Array.isArray(message2.to)) { + let partialTo = []; + for (const recipient of message2.to) { + partialTo.push(recipient); + chunkMessagesCount++; + if (chunkMessagesCount >= ExpoClientValues_1.pushNotificationChunkLimit) { + chunk.push({ ...message2, to: partialTo }); + chunks.push(chunk); + chunk = []; + chunkMessagesCount = 0; + partialTo = []; + } + } + if (partialTo.length) { + chunk.push({ ...message2, to: partialTo }); + } + } else { + chunk.push(message2); + chunkMessagesCount++; + } + if (chunkMessagesCount >= ExpoClientValues_1.pushNotificationChunkLimit) { + chunks.push(chunk); + chunk = []; + chunkMessagesCount = 0; + } + } + if (chunkMessagesCount) { + chunks.push(chunk); + } + return chunks; + } + chunkPushNotificationReceiptIds(receiptIds) { + return this.chunkItems(receiptIds, ExpoClientValues_1.pushNotificationReceiptChunkLimit); + } + chunkItems(items, chunkSize) { + const chunks = []; + let chunk = []; + for (const item of items) { + chunk.push(item); + if (chunk.length >= chunkSize) { + chunks.push(chunk); + chunk = []; + } + } + if (chunk.length) { + chunks.push(chunk); + } + return chunks; + } + async requestAsync(url2, options) { + let requestBody; + const sdkVersion = require_package().version; + const requestHeaders = new node_fetch_1.Headers({ + Accept: "application/json", + "Accept-Encoding": "gzip, deflate", + "User-Agent": `expo-server-sdk-node/${sdkVersion}` + }); + if (this.accessToken) { + requestHeaders.set("Authorization", `Bearer ${this.accessToken}`); + } + if (options.body != null) { + const json2 = JSON.stringify(options.body); + (0, node_assert_1.default)(json2 != null, `JSON request body must not be null`); + if (options.shouldCompress(json2)) { + requestBody = (0, node_zlib_1.gzipSync)(Buffer.from(json2)); + requestHeaders.set("Content-Encoding", "gzip"); + } else { + requestBody = json2; + } + requestHeaders.set("Content-Type", "application/json"); + } + const response = await (0, node_fetch_1.default)(url2, { + method: options.httpMethod, + body: requestBody, + headers: requestHeaders, + agent: this.httpAgent + }); + if (response.status !== 200) { + const apiError = await this.parseErrorResponseAsync(response); + throw apiError; + } + const textBody = await response.text(); + let result; + try { + result = JSON.parse(textBody); + } catch { + const apiError = await this.getTextResponseErrorAsync(response, textBody); + throw apiError; + } + if (result.errors) { + const apiError = this.getErrorFromResult(response, result); + throw apiError; + } + return result.data; + } + async parseErrorResponseAsync(response) { + const textBody = await response.text(); + let result; + try { + result = JSON.parse(textBody); + } catch { + return await this.getTextResponseErrorAsync(response, textBody); + } + if (!result.errors || !Array.isArray(result.errors) || !result.errors.length) { + const apiError = await this.getTextResponseErrorAsync(response, textBody); + apiError["errorData"] = result; + return apiError; + } + return this.getErrorFromResult(response, result); + } + async getTextResponseErrorAsync(response, text2) { + const apiError = new Error(`Expo responded with an error with status code ${response.status}: ` + text2); + apiError["statusCode"] = response.status; + apiError["errorText"] = text2; + return apiError; + } + /** + * Returns an error for the first API error in the result, with an optional `others` field that + * contains any other errors. + */ + getErrorFromResult(response, result) { + const noErrorsMessage = `Expected at least one error from Expo`; + (0, node_assert_1.default)(result.errors, noErrorsMessage); + const [errorData, ...otherErrorData] = result.errors; + node_assert_1.default.ok(errorData, noErrorsMessage); + const error50 = this.getErrorFromResultError(errorData); + if (otherErrorData.length) { + error50["others"] = otherErrorData.map((data) => this.getErrorFromResultError(data)); + } + error50["statusCode"] = response.status; + return error50; + } + /** + * Returns an error for a single API error + */ + getErrorFromResultError(errorData) { + const error50 = new Error(errorData.message); + error50["code"] = errorData.code; + if (errorData.details != null) { + error50["details"] = errorData.details; + } + if (errorData.stack != null) { + error50["serverStack"] = errorData.stack; + } + return error50; + } + static _getActualMessageCount(messages) { + return messages.reduce((total, message2) => { + if (Array.isArray(message2.to)) { + total += message2.to.length; + } else { + total++; + } + return total; + }, 0); + } + }; + var Expo2 = _Expo; + __name(Expo2, "Expo"); + __publicField(Expo2, "pushNotificationChunkSizeLimit", ExpoClientValues_1.pushNotificationChunkLimit); + __publicField(Expo2, "pushNotificationReceiptChunkSizeLimit", ExpoClientValues_1.pushNotificationReceiptChunkLimit); + exports.Expo = Expo2; + exports.default = Expo2; + } +}); + +// src/lib/const-strings.ts +var ORDER_PLACED_MESSAGE, ORDER_PACKAGED_MESSAGE, ORDER_DELIVERED_MESSAGE, ORDER_CANCELLED_MESSAGE; +var init_const_strings = __esm({ + "src/lib/const-strings.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ORDER_PLACED_MESSAGE = "Your order has been placed successfully!"; + ORDER_PACKAGED_MESSAGE = "Your order has been packaged and is ready for delivery."; + ORDER_DELIVERED_MESSAGE = "Your order has been delivered."; + ORDER_CANCELLED_MESSAGE = "Your order has been cancelled."; + } +}); + +// src/lib/notif-job.ts +async function scheduleNotification(userId, payload, options) { + const jobData = { userId, ...payload }; + await notificationQueue.add("send-notification", jobData, options); +} +async function sendOrderPlacedNotification(userId, orderId) { + await scheduleNotification(userId, { + title: "Order Placed", + body: ORDER_PLACED_MESSAGE, + type: "order", + orderId + }); +} +async function sendOrderPackagedNotification(userId, orderId) { + await scheduleNotification(userId, { + title: "Order Packaged", + body: ORDER_PACKAGED_MESSAGE, + type: "order", + orderId + }); +} +async function sendOrderDeliveredNotification(userId, orderId) { + await scheduleNotification(userId, { + title: "Order Delivered", + body: ORDER_DELIVERED_MESSAGE, + type: "order", + orderId + }); +} +async function sendOrderCancelledNotification(userId, orderId) { + await scheduleNotification(userId, { + title: "Order Cancelled", + body: ORDER_CANCELLED_MESSAGE, + type: "order", + orderId + }); +} +var import_expo_server_sdk, notificationQueue; +var init_notif_job = __esm({ + "src/lib/notif-job.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + import_expo_server_sdk = __toESM(require_ExpoClient()); + init_s3_client(); + init_const_strings(); + notificationQueue = {}; + __name(scheduleNotification, "scheduleNotification"); + __name(sendOrderPlacedNotification, "sendOrderPlacedNotification"); + __name(sendOrderPackagedNotification, "sendOrderPackagedNotification"); + __name(sendOrderDeliveredNotification, "sendOrderDeliveredNotification"); + __name(sendOrderCancelledNotification, "sendOrderCancelledNotification"); + } +}); + +// src/lib/redis-client.ts +var createClient, RedisClient, redisClient, redis_client_default; +var init_redis_client = __esm({ + "src/lib/redis-client.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_env_exporter(); + createClient = /* @__PURE__ */ __name((args) => { + }, "createClient"); + RedisClient = class { + // private client: RedisClientType; + // private subscriberClient: RedisClientType | null = null; + // private isConnected: boolean = false; + // + client; + subscriberrlient; + isConnected = false; + constructor() { + this.client = createClient({ + url: redisUrl + }); + } + async set(key, value, ttlSeconds) { + if (ttlSeconds) { + return await this.client.setEx(key, ttlSeconds, value); + } else { + return await this.client.set(key, value); + } + } + async get(key) { + return await this.client.get(key); + } + async exists(key) { + const result = await this.client.exists(key); + return result === 1; + } + async delete(key) { + return await this.client.del(key); + } + async lPush(key, value) { + return await this.client.lPush(key, value); + } + async KEYS(pattern) { + return await this.client.KEYS(pattern); + } + async MGET(keys) { + return await this.client.MGET(keys); + } + // Publish message to a channel + async publish(channel2, message2) { + return await this.client.publish(channel2, message2); + } + // Subscribe to a channel with callback + async subscribe(channel2, callback) { + console.log(`Subscribed to channel: ${channel2}`); + } + // Unsubscribe from a channel + async unsubscribe(channel2) { + } + disconnect() { + } + get isClientConnected() { + return this.isConnected; + } + }; + __name(RedisClient, "RedisClient"); + redisClient = new RedisClient(); + redis_client_default = redisClient; + } +}); + +// ../../node_modules/axios/lib/helpers/bind.js +function bind(fn, thisArg) { + return /* @__PURE__ */ __name(function wrap() { + return fn.apply(thisArg, arguments); + }, "wrap"); +} +var init_bind = __esm({ + "../../node_modules/axios/lib/helpers/bind.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(bind, "bind"); + } +}); + +// ../../node_modules/axios/lib/utils.js +function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction2(val.constructor.isBuffer) && val.constructor.isBuffer(val); +} +function isArrayBufferView(val) { + let result; + if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) { + result = ArrayBuffer.isView(val); + } else { + result = val && val.buffer && isArrayBuffer2(val.buffer); + } + return result; +} +function getGlobal() { + if (typeof globalThis !== "undefined") + return globalThis; + if (typeof self !== "undefined") + return self; + if (typeof window !== "undefined") + return window; + if (typeof global !== "undefined") + return global; + return {}; +} +function forEach(obj, fn, { allOwnKeys = false } = {}) { + if (obj === null || typeof obj === "undefined") { + return; + } + let i2; + let l2; + if (typeof obj !== "object") { + obj = [obj]; + } + if (isArray(obj)) { + for (i2 = 0, l2 = obj.length; i2 < l2; i2++) { + fn.call(null, obj[i2], i2, obj); + } + } else { + if (isBuffer(obj)) { + return; + } + const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); + const len = keys.length; + let key; + for (i2 = 0; i2 < len; i2++) { + key = keys[i2]; + fn.call(null, obj[key], key, obj); + } + } +} +function findKey(obj, key) { + if (isBuffer(obj)) { + return null; + } + key = key.toLowerCase(); + const keys = Object.keys(obj); + let i2 = keys.length; + let _key2; + while (i2-- > 0) { + _key2 = keys[i2]; + if (key === _key2.toLowerCase()) { + return _key2; + } + } + return null; +} +function merge3() { + const { caseless, skipUndefined } = isContextDefined(this) && this || {}; + const result = {}; + const assignValue = /* @__PURE__ */ __name((val, key) => { + if (key === "__proto__" || key === "constructor" || key === "prototype") { + return; + } + const targetKey = caseless && findKey(result, key) || key; + if (isPlainObject3(result[targetKey]) && isPlainObject3(val)) { + result[targetKey] = merge3(result[targetKey], val); + } else if (isPlainObject3(val)) { + result[targetKey] = merge3({}, val); + } else if (isArray(val)) { + result[targetKey] = val.slice(); + } else if (!skipUndefined || !isUndefined(val)) { + result[targetKey] = val; + } + }, "assignValue"); + for (let i2 = 0, l2 = arguments.length; i2 < l2; i2++) { + arguments[i2] && forEach(arguments[i2], assignValue); + } + return result; +} +function isSpecCompliantForm(thing) { + return !!(thing && isFunction2(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]); +} +var toString, getPrototypeOf, iterator, toStringTag, kindOf, kindOfTest, typeOfTest, isArray, isUndefined, isArrayBuffer2, isString, isFunction2, isNumber, isObject4, isBoolean, isPlainObject3, isEmptyObject, isDate, isFile, isReactNativeBlob, isReactNative, isBlob, isFileList, isStream, G2, FormDataCtor, isFormData, isURLSearchParams, isReadableStream3, isRequest, isResponse, isHeaders, trim, _global, isContextDefined, extend2, stripBOM, inherits, toFlatObject, endsWith, toArray, isTypedArray, forEachEntry, matchAll, isHTMLForm, toCamelCase2, hasOwnProperty, isRegExp, reduceDescriptors, freezeMethods, toObjectSet, noop2, toFiniteNumber, toJSONObject, isAsyncFn, isThenable, _setImmediate, asap, isIterable, utils_default; +var init_utils8 = __esm({ + "../../node_modules/axios/lib/utils.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_bind(); + ({ toString } = Object.prototype); + ({ getPrototypeOf } = Object); + ({ iterator, toStringTag } = Symbol); + kindOf = ((cache3) => (thing) => { + const str = toString.call(thing); + return cache3[str] || (cache3[str] = str.slice(8, -1).toLowerCase()); + })(/* @__PURE__ */ Object.create(null)); + kindOfTest = /* @__PURE__ */ __name((type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type; + }, "kindOfTest"); + typeOfTest = /* @__PURE__ */ __name((type) => (thing) => typeof thing === type, "typeOfTest"); + ({ isArray } = Array); + isUndefined = typeOfTest("undefined"); + __name(isBuffer, "isBuffer"); + isArrayBuffer2 = kindOfTest("ArrayBuffer"); + __name(isArrayBufferView, "isArrayBufferView"); + isString = typeOfTest("string"); + isFunction2 = typeOfTest("function"); + isNumber = typeOfTest("number"); + isObject4 = /* @__PURE__ */ __name((thing) => thing !== null && typeof thing === "object", "isObject"); + isBoolean = /* @__PURE__ */ __name((thing) => thing === true || thing === false, "isBoolean"); + isPlainObject3 = /* @__PURE__ */ __name((val) => { + if (kindOf(val) !== "object") { + return false; + } + const prototype2 = getPrototypeOf(val); + return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val); + }, "isPlainObject"); + isEmptyObject = /* @__PURE__ */ __name((val) => { + if (!isObject4(val) || isBuffer(val)) { + return false; + } + try { + return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype; + } catch (e2) { + return false; + } + }, "isEmptyObject"); + isDate = kindOfTest("Date"); + isFile = kindOfTest("File"); + isReactNativeBlob = /* @__PURE__ */ __name((value) => { + return !!(value && typeof value.uri !== "undefined"); + }, "isReactNativeBlob"); + isReactNative = /* @__PURE__ */ __name((formData) => formData && typeof formData.getParts !== "undefined", "isReactNative"); + isBlob = kindOfTest("Blob"); + isFileList = kindOfTest("FileList"); + isStream = /* @__PURE__ */ __name((val) => isObject4(val) && isFunction2(val.pipe), "isStream"); + __name(getGlobal, "getGlobal"); + G2 = getGlobal(); + FormDataCtor = typeof G2.FormData !== "undefined" ? G2.FormData : void 0; + isFormData = /* @__PURE__ */ __name((thing) => { + let kind; + return thing && (FormDataCtor && thing instanceof FormDataCtor || isFunction2(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance + kind === "object" && isFunction2(thing.toString) && thing.toString() === "[object FormData]")); + }, "isFormData"); + isURLSearchParams = kindOfTest("URLSearchParams"); + [isReadableStream3, isRequest, isResponse, isHeaders] = [ + "ReadableStream", + "Request", + "Response", + "Headers" + ].map(kindOfTest); + trim = /* @__PURE__ */ __name((str) => { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); + }, "trim"); + __name(forEach, "forEach"); + __name(findKey, "findKey"); + _global = (() => { + if (typeof globalThis !== "undefined") + return globalThis; + return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global; + })(); + isContextDefined = /* @__PURE__ */ __name((context2) => !isUndefined(context2) && context2 !== _global, "isContextDefined"); + __name(merge3, "merge"); + extend2 = /* @__PURE__ */ __name((a2, b2, thisArg, { allOwnKeys } = {}) => { + forEach( + b2, + (val, key) => { + if (thisArg && isFunction2(val)) { + Object.defineProperty(a2, key, { + value: bind(val, thisArg), + writable: true, + enumerable: true, + configurable: true + }); + } else { + Object.defineProperty(a2, key, { + value: val, + writable: true, + enumerable: true, + configurable: true + }); + } + }, + { allOwnKeys } + ); + return a2; + }, "extend"); + stripBOM = /* @__PURE__ */ __name((content) => { + if (content.charCodeAt(0) === 65279) { + content = content.slice(1); + } + return content; + }, "stripBOM"); + inherits = /* @__PURE__ */ __name((constructor, superConstructor, props, descriptors) => { + constructor.prototype = Object.create(superConstructor.prototype, descriptors); + Object.defineProperty(constructor.prototype, "constructor", { + value: constructor, + writable: true, + enumerable: false, + configurable: true + }); + Object.defineProperty(constructor, "super", { + value: superConstructor.prototype + }); + props && Object.assign(constructor.prototype, props); + }, "inherits"); + toFlatObject = /* @__PURE__ */ __name((sourceObj, destObj, filter2, propFilter) => { + let props; + let i2; + let prop; + const merged = {}; + destObj = destObj || {}; + if (sourceObj == null) + return destObj; + do { + props = Object.getOwnPropertyNames(sourceObj); + i2 = props.length; + while (i2-- > 0) { + prop = props[i2]; + if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; + } + } + sourceObj = filter2 !== false && getPrototypeOf(sourceObj); + } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype); + return destObj; + }, "toFlatObject"); + endsWith = /* @__PURE__ */ __name((str, searchString, position) => { + str = String(str); + if (position === void 0 || position > str.length) { + position = str.length; + } + position -= searchString.length; + const lastIndex = str.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; + }, "endsWith"); + toArray = /* @__PURE__ */ __name((thing) => { + if (!thing) + return null; + if (isArray(thing)) + return thing; + let i2 = thing.length; + if (!isNumber(i2)) + return null; + const arr = new Array(i2); + while (i2-- > 0) { + arr[i2] = thing[i2]; + } + return arr; + }, "toArray"); + isTypedArray = ((TypedArray) => { + return (thing) => { + return TypedArray && thing instanceof TypedArray; + }; + })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array)); + forEachEntry = /* @__PURE__ */ __name((obj, fn) => { + const generator = obj && obj[iterator]; + const _iterator = generator.call(obj); + let result; + while ((result = _iterator.next()) && !result.done) { + const pair = result.value; + fn.call(obj, pair[0], pair[1]); + } + }, "forEachEntry"); + matchAll = /* @__PURE__ */ __name((regExp, str) => { + let matches; + const arr = []; + while ((matches = regExp.exec(str)) !== null) { + arr.push(matches); + } + return arr; + }, "matchAll"); + isHTMLForm = kindOfTest("HTMLFormElement"); + toCamelCase2 = /* @__PURE__ */ __name((str) => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, /* @__PURE__ */ __name(function replacer(m2, p1, p2) { + return p1.toUpperCase() + p2; + }, "replacer")); + }, "toCamelCase"); + hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype); + isRegExp = kindOfTest("RegExp"); + reduceDescriptors = /* @__PURE__ */ __name((obj, reducer) => { + const descriptors = Object.getOwnPropertyDescriptors(obj); + const reducedDescriptors = {}; + forEach(descriptors, (descriptor, name) => { + let ret; + if ((ret = reducer(descriptor, name, obj)) !== false) { + reducedDescriptors[name] = ret || descriptor; + } + }); + Object.defineProperties(obj, reducedDescriptors); + }, "reduceDescriptors"); + freezeMethods = /* @__PURE__ */ __name((obj) => { + reduceDescriptors(obj, (descriptor, name) => { + if (isFunction2(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) { + return false; + } + const value = obj[name]; + if (!isFunction2(value)) + return; + descriptor.enumerable = false; + if ("writable" in descriptor) { + descriptor.writable = false; + return; + } + if (!descriptor.set) { + descriptor.set = () => { + throw Error("Can not rewrite read-only method '" + name + "'"); + }; + } + }); + }, "freezeMethods"); + toObjectSet = /* @__PURE__ */ __name((arrayOrString, delimiter) => { + const obj = {}; + const define2 = /* @__PURE__ */ __name((arr) => { + arr.forEach((value) => { + obj[value] = true; + }); + }, "define"); + isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter)); + return obj; + }, "toObjectSet"); + noop2 = /* @__PURE__ */ __name(() => { + }, "noop"); + toFiniteNumber = /* @__PURE__ */ __name((value, defaultValue) => { + return value != null && Number.isFinite(value = +value) ? value : defaultValue; + }, "toFiniteNumber"); + __name(isSpecCompliantForm, "isSpecCompliantForm"); + toJSONObject = /* @__PURE__ */ __name((obj) => { + const stack = new Array(10); + const visit = /* @__PURE__ */ __name((source, i2) => { + if (isObject4(source)) { + if (stack.indexOf(source) >= 0) { + return; + } + if (isBuffer(source)) { + return source; + } + if (!("toJSON" in source)) { + stack[i2] = source; + const target = isArray(source) ? [] : {}; + forEach(source, (value, key) => { + const reducedValue = visit(value, i2 + 1); + !isUndefined(reducedValue) && (target[key] = reducedValue); + }); + stack[i2] = void 0; + return target; + } + } + return source; + }, "visit"); + return visit(obj, 0); + }, "toJSONObject"); + isAsyncFn = kindOfTest("AsyncFunction"); + isThenable = /* @__PURE__ */ __name((thing) => thing && (isObject4(thing) || isFunction2(thing)) && isFunction2(thing.then) && isFunction2(thing.catch), "isThenable"); + _setImmediate = ((setImmediateSupported, postMessageSupported) => { + if (setImmediateSupported) { + return setImmediate; + } + return postMessageSupported ? ((token, callbacks) => { + _global.addEventListener( + "message", + ({ source, data }) => { + if (source === _global && data === token) { + callbacks.length && callbacks.shift()(); + } + }, + false + ); + return (cb2) => { + callbacks.push(cb2); + _global.postMessage(token, "*"); + }; + })(`axios@${Math.random()}`, []) : (cb2) => setTimeout(cb2); + })(typeof setImmediate === "function", isFunction2(_global.postMessage)); + asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate; + isIterable = /* @__PURE__ */ __name((thing) => thing != null && isFunction2(thing[iterator]), "isIterable"); + utils_default = { + isArray, + isArrayBuffer: isArrayBuffer2, + isBuffer, + isFormData, + isArrayBufferView, + isString, + isNumber, + isBoolean, + isObject: isObject4, + isPlainObject: isPlainObject3, + isEmptyObject, + isReadableStream: isReadableStream3, + isRequest, + isResponse, + isHeaders, + isUndefined, + isDate, + isFile, + isReactNativeBlob, + isReactNative, + isBlob, + isRegExp, + isFunction: isFunction2, + isStream, + isURLSearchParams, + isTypedArray, + isFileList, + forEach, + merge: merge3, + extend: extend2, + trim, + stripBOM, + inherits, + toFlatObject, + kindOf, + kindOfTest, + endsWith, + toArray, + forEachEntry, + matchAll, + isHTMLForm, + hasOwnProperty, + hasOwnProp: hasOwnProperty, + // an alias to avoid ESLint no-prototype-builtins detection + reduceDescriptors, + freezeMethods, + toObjectSet, + toCamelCase: toCamelCase2, + noop: noop2, + toFiniteNumber, + findKey, + global: _global, + isContextDefined, + isSpecCompliantForm, + toJSONObject, + isAsyncFn, + isThenable, + setImmediate: _setImmediate, + asap, + isIterable + }; + } +}); + +// ../../node_modules/axios/lib/core/AxiosError.js +var AxiosError, AxiosError_default; +var init_AxiosError = __esm({ + "../../node_modules/axios/lib/core/AxiosError.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + AxiosError = class extends Error { + static from(error50, code, config3, request, response, customProps) { + const axiosError = new AxiosError(error50.message, code || error50.code, config3, request, response); + axiosError.cause = error50; + axiosError.name = error50.name; + if (error50.status != null && axiosError.status == null) { + axiosError.status = error50.status; + } + customProps && Object.assign(axiosError, customProps); + return axiosError; + } + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ + constructor(message2, code, config3, request, response) { + super(message2); + Object.defineProperty(this, "message", { + value: message2, + enumerable: true, + writable: true, + configurable: true + }); + this.name = "AxiosError"; + this.isAxiosError = true; + code && (this.code = code); + config3 && (this.config = config3); + request && (this.request = request); + if (response) { + this.response = response; + this.status = response.status; + } + } + toJSON() { + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: utils_default.toJSONObject(this.config), + code: this.code, + status: this.status + }; + } + }; + __name(AxiosError, "AxiosError"); + AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE"; + AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION"; + AxiosError.ECONNABORTED = "ECONNABORTED"; + AxiosError.ETIMEDOUT = "ETIMEDOUT"; + AxiosError.ERR_NETWORK = "ERR_NETWORK"; + AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS"; + AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED"; + AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE"; + AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST"; + AxiosError.ERR_CANCELED = "ERR_CANCELED"; + AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT"; + AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL"; + AxiosError_default = AxiosError; + } +}); + +// ../../node_modules/axios/lib/helpers/null.js +var null_default; +var init_null = __esm({ + "../../node_modules/axios/lib/helpers/null.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + null_default = null; + } +}); + +// ../../node_modules/axios/lib/helpers/toFormData.js +function isVisitable(thing) { + return utils_default.isPlainObject(thing) || utils_default.isArray(thing); +} +function removeBrackets(key) { + return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key; +} +function renderKey(path, key, dots) { + if (!path) + return key; + return path.concat(key).map(/* @__PURE__ */ __name(function each(token, i2) { + token = removeBrackets(token); + return !dots && i2 ? "[" + token + "]" : token; + }, "each")).join(dots ? "." : ""); +} +function isFlatArray(arr) { + return utils_default.isArray(arr) && !arr.some(isVisitable); +} +function toFormData(obj, formData, options) { + if (!utils_default.isObject(obj)) { + throw new TypeError("target must be an object"); + } + formData = formData || new (null_default || FormData)(); + options = utils_default.toFlatObject( + options, + { + metaTokens: true, + dots: false, + indexes: false + }, + false, + /* @__PURE__ */ __name(function defined(option, source) { + return !utils_default.isUndefined(source[option]); + }, "defined") + ); + const metaTokens = options.metaTokens; + const visitor = options.visitor || defaultVisitor; + const dots = options.dots; + const indexes = options.indexes; + const _Blob = options.Blob || typeof Blob !== "undefined" && Blob; + const useBlob = _Blob && utils_default.isSpecCompliantForm(formData); + if (!utils_default.isFunction(visitor)) { + throw new TypeError("visitor must be a function"); + } + function convertValue(value) { + if (value === null) + return ""; + if (utils_default.isDate(value)) { + return value.toISOString(); + } + if (utils_default.isBoolean(value)) { + return value.toString(); + } + if (!useBlob && utils_default.isBlob(value)) { + throw new AxiosError_default("Blob is not supported. Use a Buffer instead."); + } + if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) { + return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value); + } + return value; + } + __name(convertValue, "convertValue"); + function defaultVisitor(value, key, path) { + let arr = value; + if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) { + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + if (value && !path && typeof value === "object") { + if (utils_default.endsWith(key, "{}")) { + key = metaTokens ? key : key.slice(0, -2); + value = JSON.stringify(value); + } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) { + key = removeBrackets(key); + arr.forEach(/* @__PURE__ */ __name(function each(el, index) { + !(utils_default.isUndefined(el) || el === null) && formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", + convertValue(el) + ); + }, "each")); + return false; + } + } + if (isVisitable(value)) { + return true; + } + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + __name(defaultVisitor, "defaultVisitor"); + const stack = []; + const exposedHelpers = Object.assign(predicates, { + defaultVisitor, + convertValue, + isVisitable + }); + function build(value, path) { + if (utils_default.isUndefined(value)) + return; + if (stack.indexOf(value) !== -1) { + throw Error("Circular reference detected in " + path.join(".")); + } + stack.push(value); + utils_default.forEach(value, /* @__PURE__ */ __name(function each(el, key) { + const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers); + if (result === true) { + build(el, path ? path.concat(key) : [key]); + } + }, "each")); + stack.pop(); + } + __name(build, "build"); + if (!utils_default.isObject(obj)) { + throw new TypeError("data must be an object"); + } + build(obj); + return formData; +} +var predicates, toFormData_default; +var init_toFormData = __esm({ + "../../node_modules/axios/lib/helpers/toFormData.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_AxiosError(); + init_null(); + __name(isVisitable, "isVisitable"); + __name(removeBrackets, "removeBrackets"); + __name(renderKey, "renderKey"); + __name(isFlatArray, "isFlatArray"); + predicates = utils_default.toFlatObject(utils_default, {}, null, /* @__PURE__ */ __name(function filter(prop) { + return /^is[A-Z]/.test(prop); + }, "filter")); + __name(toFormData, "toFormData"); + toFormData_default = toFormData; + } +}); + +// ../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js +function encode5(str) { + const charMap = { + "!": "%21", + "'": "%27", + "(": "%28", + ")": "%29", + "~": "%7E", + "%20": "+", + "%00": "\0" + }; + return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, /* @__PURE__ */ __name(function replacer(match2) { + return charMap[match2]; + }, "replacer")); +} +function AxiosURLSearchParams(params, options) { + this._pairs = []; + params && toFormData_default(params, this, options); +} +var prototype, AxiosURLSearchParams_default; +var init_AxiosURLSearchParams = __esm({ + "../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_toFormData(); + __name(encode5, "encode"); + __name(AxiosURLSearchParams, "AxiosURLSearchParams"); + prototype = AxiosURLSearchParams.prototype; + prototype.append = /* @__PURE__ */ __name(function append(name, value) { + this._pairs.push([name, value]); + }, "append"); + prototype.toString = /* @__PURE__ */ __name(function toString2(encoder2) { + const _encode2 = encoder2 ? function(value) { + return encoder2.call(this, value, encode5); + } : encode5; + return this._pairs.map(/* @__PURE__ */ __name(function each(pair) { + return _encode2(pair[0]) + "=" + _encode2(pair[1]); + }, "each"), "").join("&"); + }, "toString"); + AxiosURLSearchParams_default = AxiosURLSearchParams; + } +}); + +// ../../node_modules/axios/lib/helpers/buildURL.js +function encode6(val) { + return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+"); +} +function buildURL(url2, params, options) { + if (!params) { + return url2; + } + const _encode2 = options && options.encode || encode6; + const _options = utils_default.isFunction(options) ? { + serialize: options + } : options; + const serializeFn = _options && _options.serialize; + let serializedParams; + if (serializeFn) { + serializedParams = serializeFn(params, _options); + } else { + serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, _options).toString(_encode2); + } + if (serializedParams) { + const hashmarkIndex = url2.indexOf("#"); + if (hashmarkIndex !== -1) { + url2 = url2.slice(0, hashmarkIndex); + } + url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams; + } + return url2; +} +var init_buildURL = __esm({ + "../../node_modules/axios/lib/helpers/buildURL.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_AxiosURLSearchParams(); + __name(encode6, "encode"); + __name(buildURL, "buildURL"); + } +}); + +// ../../node_modules/axios/lib/core/InterceptorManager.js +var InterceptorManager, InterceptorManager_default; +var init_InterceptorManager = __esm({ + "../../node_modules/axios/lib/core/InterceptorManager.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + InterceptorManager = class { + constructor() { + this.handlers = []; + } + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * @param {Object} options The options for the interceptor, synchronous and runWhen + * + * @return {Number} An ID used to remove interceptor later + */ + use(fulfilled, rejected, options) { + this.handlers.push({ + fulfilled, + rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null + }); + return this.handlers.length - 1; + } + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {void} + */ + eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } + } + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + clear() { + if (this.handlers) { + this.handlers = []; + } + } + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + forEach(fn) { + utils_default.forEach(this.handlers, /* @__PURE__ */ __name(function forEachHandler(h2) { + if (h2 !== null) { + fn(h2); + } + }, "forEachHandler")); + } + }; + __name(InterceptorManager, "InterceptorManager"); + InterceptorManager_default = InterceptorManager; + } +}); + +// ../../node_modules/axios/lib/defaults/transitional.js +var transitional_default; +var init_transitional = __esm({ + "../../node_modules/axios/lib/defaults/transitional.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + transitional_default = { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false, + legacyInterceptorReqResOrdering: true + }; + } +}); + +// ../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +var URLSearchParams_default; +var init_URLSearchParams = __esm({ + "../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AxiosURLSearchParams(); + URLSearchParams_default = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams_default; + } +}); + +// ../../node_modules/axios/lib/platform/browser/classes/FormData.js +var FormData_default; +var init_FormData = __esm({ + "../../node_modules/axios/lib/platform/browser/classes/FormData.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + FormData_default = typeof FormData !== "undefined" ? FormData : null; + } +}); + +// ../../node_modules/axios/lib/platform/browser/classes/Blob.js +var Blob_default; +var init_Blob = __esm({ + "../../node_modules/axios/lib/platform/browser/classes/Blob.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + Blob_default = typeof Blob !== "undefined" ? Blob : null; + } +}); + +// ../../node_modules/axios/lib/platform/browser/index.js +var browser_default; +var init_browser = __esm({ + "../../node_modules/axios/lib/platform/browser/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_URLSearchParams(); + init_FormData(); + init_Blob(); + browser_default = { + isBrowser: true, + classes: { + URLSearchParams: URLSearchParams_default, + FormData: FormData_default, + Blob: Blob_default + }, + protocols: ["http", "https", "file", "blob", "url", "data"] + }; + } +}); + +// ../../node_modules/axios/lib/platform/common/utils.js +var utils_exports = {}; +__export(utils_exports, { + hasBrowserEnv: () => hasBrowserEnv, + hasStandardBrowserEnv: () => hasStandardBrowserEnv, + hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv, + navigator: () => _navigator, + origin: () => origin +}); +var hasBrowserEnv, _navigator, hasStandardBrowserEnv, hasStandardBrowserWebWorkerEnv, origin; +var init_utils9 = __esm({ + "../../node_modules/axios/lib/platform/common/utils.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined"; + _navigator = typeof navigator === "object" && navigator || void 0; + hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0); + hasStandardBrowserWebWorkerEnv = (() => { + return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && typeof self.importScripts === "function"; + })(); + origin = hasBrowserEnv && window.location.href || "http://localhost"; + } +}); + +// ../../node_modules/axios/lib/platform/index.js +var platform_default; +var init_platform = __esm({ + "../../node_modules/axios/lib/platform/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_browser(); + init_utils9(); + platform_default = { + ...utils_exports, + ...browser_default + }; + } +}); + +// ../../node_modules/axios/lib/helpers/toURLEncodedForm.js +function toURLEncodedForm(data, options) { + return toFormData_default(data, new platform_default.classes.URLSearchParams(), { + visitor: function(value, key, path, helpers) { + if (platform_default.isNode && utils_default.isBuffer(value)) { + this.append(key, value.toString("base64")); + return false; + } + return helpers.defaultVisitor.apply(this, arguments); + }, + ...options + }); +} +var init_toURLEncodedForm = __esm({ + "../../node_modules/axios/lib/helpers/toURLEncodedForm.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_toFormData(); + init_platform(); + __name(toURLEncodedForm, "toURLEncodedForm"); + } +}); + +// ../../node_modules/axios/lib/helpers/formDataToJSON.js +function parsePropPath(name) { + return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match2) => { + return match2[0] === "[]" ? "" : match2[1] || match2[0]; + }); +} +function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i2; + const len = keys.length; + let key; + for (i2 = 0; i2 < len; i2++) { + key = keys[i2]; + obj[key] = arr[key]; + } + return obj; +} +function formDataToJSON(formData) { + function buildPath(path, value, target, index) { + let name = path[index++]; + if (name === "__proto__") + return true; + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path.length; + name = !name && utils_default.isArray(target) ? target.length : name; + if (isLast) { + if (utils_default.hasOwnProp(target, name)) { + target[name] = [target[name], value]; + } else { + target[name] = value; + } + return !isNumericKey; + } + if (!target[name] || !utils_default.isObject(target[name])) { + target[name] = []; + } + const result = buildPath(path, value, target[name], index); + if (result && utils_default.isArray(target[name])) { + target[name] = arrayToObject(target[name]); + } + return !isNumericKey; + } + __name(buildPath, "buildPath"); + if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) { + const obj = {}; + utils_default.forEachEntry(formData, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); + return obj; + } + return null; +} +var formDataToJSON_default; +var init_formDataToJSON = __esm({ + "../../node_modules/axios/lib/helpers/formDataToJSON.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + __name(parsePropPath, "parsePropPath"); + __name(arrayToObject, "arrayToObject"); + __name(formDataToJSON, "formDataToJSON"); + formDataToJSON_default = formDataToJSON; + } +}); + +// ../../node_modules/axios/lib/defaults/index.js +function stringifySafely(rawValue, parser2, encoder2) { + if (utils_default.isString(rawValue)) { + try { + (parser2 || JSON.parse)(rawValue); + return utils_default.trim(rawValue); + } catch (e2) { + if (e2.name !== "SyntaxError") { + throw e2; + } + } + } + return (encoder2 || JSON.stringify)(rawValue); +} +var defaults, defaults_default; +var init_defaults = __esm({ + "../../node_modules/axios/lib/defaults/index.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_AxiosError(); + init_transitional(); + init_toFormData(); + init_toURLEncodedForm(); + init_platform(); + init_formDataToJSON(); + __name(stringifySafely, "stringifySafely"); + defaults = { + transitional: transitional_default, + adapter: ["xhr", "http", "fetch"], + transformRequest: [ + /* @__PURE__ */ __name(function transformRequest(data, headers) { + const contentType = headers.getContentType() || ""; + const hasJSONContentType = contentType.indexOf("application/json") > -1; + const isObjectPayload = utils_default.isObject(data); + if (isObjectPayload && utils_default.isHTMLForm(data)) { + data = new FormData(data); + } + const isFormData2 = utils_default.isFormData(data); + if (isFormData2) { + return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data; + } + if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) { + return data; + } + if (utils_default.isArrayBufferView(data)) { + return data.buffer; + } + if (utils_default.isURLSearchParams(data)) { + headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false); + return data.toString(); + } + let isFileList2; + if (isObjectPayload) { + if (contentType.indexOf("application/x-www-form-urlencoded") > -1) { + return toURLEncodedForm(data, this.formSerializer).toString(); + } + if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) { + const _FormData = this.env && this.env.FormData; + return toFormData_default( + isFileList2 ? { "files[]": data } : data, + _FormData && new _FormData(), + this.formSerializer + ); + } + } + if (isObjectPayload || hasJSONContentType) { + headers.setContentType("application/json", false); + return stringifySafely(data); + } + return data; + }, "transformRequest") + ], + transformResponse: [ + /* @__PURE__ */ __name(function transformResponse(data) { + const transitional2 = this.transitional || defaults.transitional; + const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing; + const JSONRequested = this.responseType === "json"; + if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) { + return data; + } + if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) { + const silentJSONParsing = transitional2 && transitional2.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; + try { + return JSON.parse(data, this.parseReviver); + } catch (e2) { + if (strictJSONParsing) { + if (e2.name === "SyntaxError") { + throw AxiosError_default.from(e2, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response); + } + throw e2; + } + } + } + return data; + }, "transformResponse") + ], + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + xsrfCookieName: "XSRF-TOKEN", + xsrfHeaderName: "X-XSRF-TOKEN", + maxContentLength: -1, + maxBodyLength: -1, + env: { + FormData: platform_default.classes.FormData, + Blob: platform_default.classes.Blob + }, + validateStatus: /* @__PURE__ */ __name(function validateStatus(status) { + return status >= 200 && status < 300; + }, "validateStatus"), + headers: { + common: { + Accept: "application/json, text/plain, */*", + "Content-Type": void 0 + } + } + }; + utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => { + defaults.headers[method] = {}; + }); + defaults_default = defaults; + } +}); + +// ../../node_modules/axios/lib/helpers/parseHeaders.js +var ignoreDuplicateOf, parseHeaders_default; +var init_parseHeaders = __esm({ + "../../node_modules/axios/lib/helpers/parseHeaders.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + ignoreDuplicateOf = utils_default.toObjectSet([ + "age", + "authorization", + "content-length", + "content-type", + "etag", + "expires", + "from", + "host", + "if-modified-since", + "if-unmodified-since", + "last-modified", + "location", + "max-forwards", + "proxy-authorization", + "referer", + "retry-after", + "user-agent" + ]); + parseHeaders_default = /* @__PURE__ */ __name((rawHeaders) => { + const parsed = {}; + let key; + let val; + let i2; + rawHeaders && rawHeaders.split("\n").forEach(/* @__PURE__ */ __name(function parser2(line) { + i2 = line.indexOf(":"); + key = line.substring(0, i2).trim().toLowerCase(); + val = line.substring(i2 + 1).trim(); + if (!key || parsed[key] && ignoreDuplicateOf[key]) { + return; + } + if (key === "set-cookie") { + if (parsed[key]) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = parsed[key] ? parsed[key] + ", " + val : val; + } + }, "parser")); + return parsed; + }, "default"); + } +}); + +// ../../node_modules/axios/lib/core/AxiosHeaders.js +function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); +} +function normalizeValue(value) { + if (value === false || value == null) { + return value; + } + return utils_default.isArray(value) ? value.map(normalizeValue) : String(value); +} +function parseTokens(str) { + const tokens = /* @__PURE__ */ Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match2; + while (match2 = tokensRE.exec(str)) { + tokens[match2[1]] = match2[2]; + } + return tokens; +} +function matchHeaderValue(context2, value, header, filter2, isHeaderNameFilter) { + if (utils_default.isFunction(filter2)) { + return filter2.call(this, value, header); + } + if (isHeaderNameFilter) { + value = header; + } + if (!utils_default.isString(value)) + return; + if (utils_default.isString(filter2)) { + return value.indexOf(filter2) !== -1; + } + if (utils_default.isRegExp(filter2)) { + return filter2.test(value); + } +} +function formatHeader(header) { + return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w2, char, str) => { + return char.toUpperCase() + str; + }); +} +function buildAccessors(obj, header) { + const accessorName = utils_default.toCamelCase(" " + header); + ["get", "set", "has"].forEach((methodName) => { + Object.defineProperty(obj, methodName + accessorName, { + value: function(arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true + }); + }); +} +var $internals, isValidHeaderName, AxiosHeaders, AxiosHeaders_default; +var init_AxiosHeaders = __esm({ + "../../node_modules/axios/lib/core/AxiosHeaders.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_parseHeaders(); + $internals = Symbol("internals"); + __name(normalizeHeader, "normalizeHeader"); + __name(normalizeValue, "normalizeValue"); + __name(parseTokens, "parseTokens"); + isValidHeaderName = /* @__PURE__ */ __name((str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()), "isValidHeaderName"); + __name(matchHeaderValue, "matchHeaderValue"); + __name(formatHeader, "formatHeader"); + __name(buildAccessors, "buildAccessors"); + AxiosHeaders = class { + constructor(headers) { + headers && this.set(headers); + } + set(header, valueOrRewrite, rewrite) { + const self2 = this; + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); + if (!lHeader) { + throw new Error("header name must be a non-empty string"); + } + const key = utils_default.findKey(self2, lHeader); + if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) { + self2[key || _header] = normalizeValue(_value); + } + } + __name(setHeader, "setHeader"); + const setHeaders = /* @__PURE__ */ __name((headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)), "setHeaders"); + if (utils_default.isPlainObject(header) || header instanceof this.constructor) { + setHeaders(header, valueOrRewrite); + } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + setHeaders(parseHeaders_default(header), valueOrRewrite); + } else if (utils_default.isObject(header) && utils_default.isIterable(header)) { + let obj = {}, dest, key; + for (const entry of header) { + if (!utils_default.isArray(entry)) { + throw TypeError("Object iterator must return a key-value pair"); + } + obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1]; + } + setHeaders(obj, valueOrRewrite); + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); + } + return this; + } + get(header, parser2) { + header = normalizeHeader(header); + if (header) { + const key = utils_default.findKey(this, header); + if (key) { + const value = this[key]; + if (!parser2) { + return value; + } + if (parser2 === true) { + return parseTokens(value); + } + if (utils_default.isFunction(parser2)) { + return parser2.call(this, value, key); + } + if (utils_default.isRegExp(parser2)) { + return parser2.exec(value); + } + throw new TypeError("parser must be boolean|regexp|function"); + } + } + } + has(header, matcher) { + header = normalizeHeader(header); + if (header) { + const key = utils_default.findKey(this, header); + return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher))); + } + return false; + } + delete(header, matcher) { + const self2 = this; + let deleted = false; + function deleteHeader(_header) { + _header = normalizeHeader(_header); + if (_header) { + const key = utils_default.findKey(self2, _header); + if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) { + delete self2[key]; + deleted = true; + } + } + } + __name(deleteHeader, "deleteHeader"); + if (utils_default.isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); + } + return deleted; + } + clear(matcher) { + const keys = Object.keys(this); + let i2 = keys.length; + let deleted = false; + while (i2--) { + const key = keys[i2]; + if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; + } + } + return deleted; + } + normalize(format2) { + const self2 = this; + const headers = {}; + utils_default.forEach(this, (value, header) => { + const key = utils_default.findKey(headers, header); + if (key) { + self2[key] = normalizeValue(value); + delete self2[header]; + return; + } + const normalized = format2 ? formatHeader(header) : String(header).trim(); + if (normalized !== header) { + delete self2[header]; + } + self2[normalized] = normalizeValue(value); + headers[normalized] = true; + }); + return this; + } + concat(...targets) { + return this.constructor.concat(this, ...targets); + } + toJSON(asStrings) { + const obj = /* @__PURE__ */ Object.create(null); + utils_default.forEach(this, (value, header) => { + value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value); + }); + return obj; + } + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + toString() { + return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n"); + } + getSetCookie() { + return this.get("set-cookie") || []; + } + get [Symbol.toStringTag]() { + return "AxiosHeaders"; + } + static from(thing) { + return thing instanceof this ? thing : new this(thing); + } + static concat(first, ...targets) { + const computed = new this(first); + targets.forEach((target) => computed.set(target)); + return computed; + } + static accessor(header) { + const internals = this[$internals] = this[$internals] = { + accessors: {} + }; + const accessors = internals.accessors; + const prototype2 = this.prototype; + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); + if (!accessors[lHeader]) { + buildAccessors(prototype2, _header); + accessors[lHeader] = true; + } + } + __name(defineAccessor, "defineAccessor"); + utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + return this; + } + }; + __name(AxiosHeaders, "AxiosHeaders"); + AxiosHeaders.accessor([ + "Content-Type", + "Content-Length", + "Accept", + "Accept-Encoding", + "User-Agent", + "Authorization" + ]); + utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); + return { + get: () => value, + set(headerValue) { + this[mapped] = headerValue; + } + }; + }); + utils_default.freezeMethods(AxiosHeaders); + AxiosHeaders_default = AxiosHeaders; + } +}); + +// ../../node_modules/axios/lib/core/transformData.js +function transformData(fns, response) { + const config3 = this || defaults_default; + const context2 = response || config3; + const headers = AxiosHeaders_default.from(context2.headers); + let data = context2.data; + utils_default.forEach(fns, /* @__PURE__ */ __name(function transform2(fn) { + data = fn.call(config3, data, headers.normalize(), response ? response.status : void 0); + }, "transform")); + headers.normalize(); + return data; +} +var init_transformData = __esm({ + "../../node_modules/axios/lib/core/transformData.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_defaults(); + init_AxiosHeaders(); + __name(transformData, "transformData"); + } +}); + +// ../../node_modules/axios/lib/cancel/isCancel.js +function isCancel(value) { + return !!(value && value.__CANCEL__); +} +var init_isCancel = __esm({ + "../../node_modules/axios/lib/cancel/isCancel.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(isCancel, "isCancel"); + } +}); + +// ../../node_modules/axios/lib/cancel/CanceledError.js +var CanceledError, CanceledError_default; +var init_CanceledError = __esm({ + "../../node_modules/axios/lib/cancel/CanceledError.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AxiosError(); + CanceledError = class extends AxiosError_default { + /** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ + constructor(message2, config3, request) { + super(message2 == null ? "canceled" : message2, AxiosError_default.ERR_CANCELED, config3, request); + this.name = "CanceledError"; + this.__CANCEL__ = true; + } + }; + __name(CanceledError, "CanceledError"); + CanceledError_default = CanceledError; + } +}); + +// ../../node_modules/axios/lib/core/settle.js +function settle(resolve, reject, response) { + const validateStatus2 = response.config.validateStatus; + if (!response.status || !validateStatus2 || validateStatus2(response.status)) { + resolve(response); + } else { + reject( + new AxiosError_default( + "Request failed with status code " + response.status, + [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], + response.config, + response.request, + response + ) + ); + } +} +var init_settle = __esm({ + "../../node_modules/axios/lib/core/settle.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_AxiosError(); + __name(settle, "settle"); + } +}); + +// ../../node_modules/axios/lib/helpers/parseProtocol.js +function parseProtocol(url2) { + const match2 = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2); + return match2 && match2[1] || ""; +} +var init_parseProtocol = __esm({ + "../../node_modules/axios/lib/helpers/parseProtocol.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(parseProtocol, "parseProtocol"); + } +}); + +// ../../node_modules/axios/lib/helpers/speedometer.js +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; + min = min !== void 0 ? min : 1e3; + return /* @__PURE__ */ __name(function push(chunkLength) { + const now = Date.now(); + const startedAt = timestamps[tail]; + if (!firstSampleTS) { + firstSampleTS = now; + } + bytes[head] = chunkLength; + timestamps[head] = now; + let i2 = tail; + let bytesCount = 0; + while (i2 !== head) { + bytesCount += bytes[i2++]; + i2 = i2 % samplesCount; + } + head = (head + 1) % samplesCount; + if (head === tail) { + tail = (tail + 1) % samplesCount; + } + if (now - firstSampleTS < min) { + return; + } + const passed = startedAt && now - startedAt; + return passed ? Math.round(bytesCount * 1e3 / passed) : void 0; + }, "push"); +} +var speedometer_default; +var init_speedometer = __esm({ + "../../node_modules/axios/lib/helpers/speedometer.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(speedometer, "speedometer"); + speedometer_default = speedometer; + } +}); + +// ../../node_modules/axios/lib/helpers/throttle.js +function throttle(fn, freq) { + let timestamp = 0; + let threshold = 1e3 / freq; + let lastArgs; + let timer; + const invoke = /* @__PURE__ */ __name((args, now = Date.now()) => { + timestamp = now; + lastArgs = null; + if (timer) { + clearTimeout(timer); + timer = null; + } + fn(...args); + }, "invoke"); + const throttled = /* @__PURE__ */ __name((...args) => { + const now = Date.now(); + const passed = now - timestamp; + if (passed >= threshold) { + invoke(args, now); + } else { + lastArgs = args; + if (!timer) { + timer = setTimeout(() => { + timer = null; + invoke(lastArgs); + }, threshold - passed); + } + } + }, "throttled"); + const flush2 = /* @__PURE__ */ __name(() => lastArgs && invoke(lastArgs), "flush"); + return [throttled, flush2]; +} +var throttle_default; +var init_throttle = __esm({ + "../../node_modules/axios/lib/helpers/throttle.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(throttle, "throttle"); + throttle_default = throttle; + } +}); + +// ../../node_modules/axios/lib/helpers/progressEventReducer.js +var progressEventReducer, progressEventDecorator, asyncDecorator; +var init_progressEventReducer = __esm({ + "../../node_modules/axios/lib/helpers/progressEventReducer.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_speedometer(); + init_throttle(); + init_utils8(); + progressEventReducer = /* @__PURE__ */ __name((listener, isDownloadStream, freq = 3) => { + let bytesNotified = 0; + const _speedometer = speedometer_default(50, 250); + return throttle_default((e2) => { + const loaded = e2.loaded; + const total = e2.lengthComputable ? e2.total : void 0; + const progressBytes = loaded - bytesNotified; + const rate = _speedometer(progressBytes); + const inRange = loaded <= total; + bytesNotified = loaded; + const data = { + loaded, + total, + progress: total ? loaded / total : void 0, + bytes: progressBytes, + rate: rate ? rate : void 0, + estimated: rate && total && inRange ? (total - loaded) / rate : void 0, + event: e2, + lengthComputable: total != null, + [isDownloadStream ? "download" : "upload"]: true + }; + listener(data); + }, freq); + }, "progressEventReducer"); + progressEventDecorator = /* @__PURE__ */ __name((total, throttled) => { + const lengthComputable = total != null; + return [ + (loaded) => throttled[0]({ + lengthComputable, + total, + loaded + }), + throttled[1] + ]; + }, "progressEventDecorator"); + asyncDecorator = /* @__PURE__ */ __name((fn) => (...args) => utils_default.asap(() => fn(...args)), "asyncDecorator"); + } +}); + +// ../../node_modules/axios/lib/helpers/isURLSameOrigin.js +var isURLSameOrigin_default; +var init_isURLSameOrigin = __esm({ + "../../node_modules/axios/lib/helpers/isURLSameOrigin.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_platform(); + isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((origin2, isMSIE) => (url2) => { + url2 = new URL(url2, platform_default.origin); + return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port); + })( + new URL(platform_default.origin), + platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent) + ) : () => true; + } +}); + +// ../../node_modules/axios/lib/helpers/cookies.js +var cookies_default; +var init_cookies = __esm({ + "../../node_modules/axios/lib/helpers/cookies.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_platform(); + cookies_default = platform_default.hasStandardBrowserEnv ? ( + // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain3, secure, sameSite) { + if (typeof document === "undefined") + return; + const cookie = [`${name}=${encodeURIComponent(value)}`]; + if (utils_default.isNumber(expires)) { + cookie.push(`expires=${new Date(expires).toUTCString()}`); + } + if (utils_default.isString(path)) { + cookie.push(`path=${path}`); + } + if (utils_default.isString(domain3)) { + cookie.push(`domain=${domain3}`); + } + if (secure === true) { + cookie.push("secure"); + } + if (utils_default.isString(sameSite)) { + cookie.push(`SameSite=${sameSite}`); + } + document.cookie = cookie.join("; "); + }, + read(name) { + if (typeof document === "undefined") + return null; + const match2 = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)")); + return match2 ? decodeURIComponent(match2[1]) : null; + }, + remove(name) { + this.write(name, "", Date.now() - 864e5, "/"); + } + } + ) : ( + // Non-standard browser env (web workers, react-native) lack needed support. + { + write() { + }, + read() { + return null; + }, + remove() { + } + } + ); + } +}); + +// ../../node_modules/axios/lib/helpers/isAbsoluteURL.js +function isAbsoluteURL(url2) { + if (typeof url2 !== "string") { + return false; + } + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2); +} +var init_isAbsoluteURL = __esm({ + "../../node_modules/axios/lib/helpers/isAbsoluteURL.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(isAbsoluteURL, "isAbsoluteURL"); + } +}); + +// ../../node_modules/axios/lib/helpers/combineURLs.js +function combineURLs(baseURL, relativeURL) { + return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL; +} +var init_combineURLs = __esm({ + "../../node_modules/axios/lib/helpers/combineURLs.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(combineURLs, "combineURLs"); + } +}); + +// ../../node_modules/axios/lib/core/buildFullPath.js +function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { + let isRelativeUrl = !isAbsoluteURL(requestedURL); + if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { + return combineURLs(baseURL, requestedURL); + } + return requestedURL; +} +var init_buildFullPath = __esm({ + "../../node_modules/axios/lib/core/buildFullPath.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_isAbsoluteURL(); + init_combineURLs(); + __name(buildFullPath, "buildFullPath"); + } +}); + +// ../../node_modules/axios/lib/core/mergeConfig.js +function mergeConfig(config1, config22) { + config22 = config22 || {}; + const config3 = {}; + function getMergedValue(target, source, prop, caseless) { + if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) { + return utils_default.merge.call({ caseless }, target, source); + } else if (utils_default.isPlainObject(source)) { + return utils_default.merge({}, source); + } else if (utils_default.isArray(source)) { + return source.slice(); + } + return source; + } + __name(getMergedValue, "getMergedValue"); + function mergeDeepProperties(a2, b2, prop, caseless) { + if (!utils_default.isUndefined(b2)) { + return getMergedValue(a2, b2, prop, caseless); + } else if (!utils_default.isUndefined(a2)) { + return getMergedValue(void 0, a2, prop, caseless); + } + } + __name(mergeDeepProperties, "mergeDeepProperties"); + function valueFromConfig2(a2, b2) { + if (!utils_default.isUndefined(b2)) { + return getMergedValue(void 0, b2); + } + } + __name(valueFromConfig2, "valueFromConfig2"); + function defaultToConfig2(a2, b2) { + if (!utils_default.isUndefined(b2)) { + return getMergedValue(void 0, b2); + } else if (!utils_default.isUndefined(a2)) { + return getMergedValue(void 0, a2); + } + } + __name(defaultToConfig2, "defaultToConfig2"); + function mergeDirectKeys(a2, b2, prop) { + if (prop in config22) { + return getMergedValue(a2, b2); + } else if (prop in config1) { + return getMergedValue(void 0, a2); + } + } + __name(mergeDirectKeys, "mergeDirectKeys"); + const mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + withXSRFToken: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: (a2, b2, prop) => mergeDeepProperties(headersToObject(a2), headersToObject(b2), prop, true) + }; + utils_default.forEach(Object.keys({ ...config1, ...config22 }), /* @__PURE__ */ __name(function computeConfigValue(prop) { + if (prop === "__proto__" || prop === "constructor" || prop === "prototype") + return; + const merge4 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; + const configValue = merge4(config1[prop], config22[prop], prop); + utils_default.isUndefined(configValue) && merge4 !== mergeDirectKeys || (config3[prop] = configValue); + }, "computeConfigValue")); + return config3; +} +var headersToObject; +var init_mergeConfig = __esm({ + "../../node_modules/axios/lib/core/mergeConfig.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_AxiosHeaders(); + headersToObject = /* @__PURE__ */ __name((thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing, "headersToObject"); + __name(mergeConfig, "mergeConfig"); + } +}); + +// ../../node_modules/axios/lib/helpers/resolveConfig.js +var resolveConfig_default; +var init_resolveConfig = __esm({ + "../../node_modules/axios/lib/helpers/resolveConfig.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_platform(); + init_utils8(); + init_isURLSameOrigin(); + init_cookies(); + init_buildFullPath(); + init_mergeConfig(); + init_AxiosHeaders(); + init_buildURL(); + resolveConfig_default = /* @__PURE__ */ __name((config3) => { + const newConfig = mergeConfig({}, config3); + let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig; + newConfig.headers = headers = AxiosHeaders_default.from(headers); + newConfig.url = buildURL( + buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), + config3.params, + config3.paramsSerializer + ); + if (auth) { + headers.set( + "Authorization", + "Basic " + btoa( + (auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "") + ) + ); + } + if (utils_default.isFormData(data)) { + if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) { + headers.setContentType(void 0); + } else if (utils_default.isFunction(data.getHeaders)) { + const formHeaders = data.getHeaders(); + const allowedHeaders = ["content-type", "content-length"]; + Object.entries(formHeaders).forEach(([key, val]) => { + if (allowedHeaders.includes(key.toLowerCase())) { + headers.set(key, val); + } + }); + } + } + if (platform_default.hasStandardBrowserEnv) { + withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); + if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) { + const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName); + if (xsrfValue) { + headers.set(xsrfHeaderName, xsrfValue); + } + } + } + return newConfig; + }, "default"); + } +}); + +// ../../node_modules/axios/lib/adapters/xhr.js +var isXHRAdapterSupported, xhr_default; +var init_xhr = __esm({ + "../../node_modules/axios/lib/adapters/xhr.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_settle(); + init_transitional(); + init_AxiosError(); + init_CanceledError(); + init_parseProtocol(); + init_platform(); + init_AxiosHeaders(); + init_progressEventReducer(); + init_resolveConfig(); + isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined"; + xhr_default = isXHRAdapterSupported && function(config3) { + return new Promise(/* @__PURE__ */ __name(function dispatchXhrRequest(resolve, reject) { + const _config = resolveConfig_default(config3); + let requestData = _config.data; + const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize(); + let { responseType, onUploadProgress, onDownloadProgress } = _config; + let onCanceled; + let uploadThrottled, downloadThrottled; + let flushUpload, flushDownload; + function done() { + flushUpload && flushUpload(); + flushDownload && flushDownload(); + _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); + _config.signal && _config.signal.removeEventListener("abort", onCanceled); + } + __name(done, "done"); + let request = new XMLHttpRequest(); + request.open(_config.method.toUpperCase(), _config.url, true); + request.timeout = _config.timeout; + function onloadend() { + if (!request) { + return; + } + const responseHeaders = AxiosHeaders_default.from( + "getAllResponseHeaders" in request && request.getAllResponseHeaders() + ); + const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response; + const response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config: config3, + request + }; + settle( + /* @__PURE__ */ __name(function _resolve(value) { + resolve(value); + done(); + }, "_resolve"), + /* @__PURE__ */ __name(function _reject(err) { + reject(err); + done(); + }, "_reject"), + response + ); + request = null; + } + __name(onloadend, "onloadend"); + if ("onloadend" in request) { + request.onloadend = onloadend; + } else { + request.onreadystatechange = /* @__PURE__ */ __name(function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) { + return; + } + setTimeout(onloadend); + }, "handleLoad"); + } + request.onabort = /* @__PURE__ */ __name(function handleAbort() { + if (!request) { + return; + } + reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config3, request)); + request = null; + }, "handleAbort"); + request.onerror = /* @__PURE__ */ __name(function handleError(event) { + const msg = event && event.message ? event.message : "Network Error"; + const err = new AxiosError_default(msg, AxiosError_default.ERR_NETWORK, config3, request); + err.event = event || null; + reject(err); + request = null; + }, "handleError"); + request.ontimeout = /* @__PURE__ */ __name(function handleTimeout() { + let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded"; + const transitional2 = _config.transitional || transitional_default; + if (_config.timeoutErrorMessage) { + timeoutErrorMessage = _config.timeoutErrorMessage; + } + reject( + new AxiosError_default( + timeoutErrorMessage, + transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, + config3, + request + ) + ); + request = null; + }, "handleTimeout"); + requestData === void 0 && requestHeaders.setContentType(null); + if ("setRequestHeader" in request) { + utils_default.forEach(requestHeaders.toJSON(), /* @__PURE__ */ __name(function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + }, "setRequestHeader")); + } + if (!utils_default.isUndefined(_config.withCredentials)) { + request.withCredentials = !!_config.withCredentials; + } + if (responseType && responseType !== "json") { + request.responseType = _config.responseType; + } + if (onDownloadProgress) { + [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true); + request.addEventListener("progress", downloadThrottled); + } + if (onUploadProgress && request.upload) { + [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress); + request.upload.addEventListener("progress", uploadThrottled); + request.upload.addEventListener("loadend", flushUpload); + } + if (_config.cancelToken || _config.signal) { + onCanceled = /* @__PURE__ */ __name((cancel) => { + if (!request) { + return; + } + reject(!cancel || cancel.type ? new CanceledError_default(null, config3, request) : cancel); + request.abort(); + request = null; + }, "onCanceled"); + _config.cancelToken && _config.cancelToken.subscribe(onCanceled); + if (_config.signal) { + _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled); + } + } + const protocol = parseProtocol(_config.url); + if (protocol && platform_default.protocols.indexOf(protocol) === -1) { + reject( + new AxiosError_default( + "Unsupported protocol " + protocol + ":", + AxiosError_default.ERR_BAD_REQUEST, + config3 + ) + ); + return; + } + request.send(requestData || null); + }, "dispatchXhrRequest")); + }; + } +}); + +// ../../node_modules/axios/lib/helpers/composeSignals.js +var composeSignals, composeSignals_default; +var init_composeSignals = __esm({ + "../../node_modules/axios/lib/helpers/composeSignals.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_CanceledError(); + init_AxiosError(); + init_utils8(); + composeSignals = /* @__PURE__ */ __name((signals, timeout) => { + const { length } = signals = signals ? signals.filter(Boolean) : []; + if (timeout || length) { + let controller = new AbortController(); + let aborted2; + const onabort = /* @__PURE__ */ __name(function(reason) { + if (!aborted2) { + aborted2 = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort( + err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err) + ); + } + }, "onabort"); + let timer = timeout && setTimeout(() => { + timer = null; + onabort(new AxiosError_default(`timeout of ${timeout}ms exceeded`, AxiosError_default.ETIMEDOUT)); + }, timeout); + const unsubscribe = /* @__PURE__ */ __name(() => { + if (signals) { + timer && clearTimeout(timer); + timer = null; + signals.forEach((signal2) => { + signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort); + }); + signals = null; + } + }, "unsubscribe"); + signals.forEach((signal2) => signal2.addEventListener("abort", onabort)); + const { signal } = controller; + signal.unsubscribe = () => utils_default.asap(unsubscribe); + return signal; + } + }, "composeSignals"); + composeSignals_default = composeSignals; + } +}); + +// ../../node_modules/axios/lib/helpers/trackStream.js +var streamChunk, readBytes, readStream, trackStream; +var init_trackStream = __esm({ + "../../node_modules/axios/lib/helpers/trackStream.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + streamChunk = /* @__PURE__ */ __name(function* (chunk, chunkSize) { + let len = chunk.byteLength; + if (!chunkSize || len < chunkSize) { + yield chunk; + return; + } + let pos = 0; + let end; + while (pos < len) { + end = pos + chunkSize; + yield chunk.slice(pos, end); + pos = end; + } + }, "streamChunk"); + readBytes = /* @__PURE__ */ __name(async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) { + yield* streamChunk(chunk, chunkSize); + } + }, "readBytes"); + readStream = /* @__PURE__ */ __name(async function* (stream) { + if (stream[Symbol.asyncIterator]) { + yield* stream; + return; + } + const reader = stream.getReader(); + try { + for (; ; ) { + const { done, value } = await reader.read(); + if (done) { + break; + } + yield value; + } + } finally { + await reader.cancel(); + } + }, "readStream"); + trackStream = /* @__PURE__ */ __name((stream, chunkSize, onProgress, onFinish) => { + const iterator2 = readBytes(stream, chunkSize); + let bytes = 0; + let done; + let _onFinish = /* @__PURE__ */ __name((e2) => { + if (!done) { + done = true; + onFinish && onFinish(e2); + } + }, "_onFinish"); + return new ReadableStream( + { + async pull(controller) { + try { + const { done: done2, value } = await iterator2.next(); + if (done2) { + _onFinish(); + controller.close(); + return; + } + let len = value.byteLength; + if (onProgress) { + let loadedBytes = bytes += len; + onProgress(loadedBytes); + } + controller.enqueue(new Uint8Array(value)); + } catch (err) { + _onFinish(err); + throw err; + } + }, + cancel(reason) { + _onFinish(reason); + return iterator2.return(); + } + }, + { + highWaterMark: 2 + } + ); + }, "trackStream"); + } +}); + +// ../../node_modules/axios/lib/adapters/fetch.js +var DEFAULT_CHUNK_SIZE, isFunction3, globalFetchAPI, ReadableStream2, TextEncoder2, test, factory, seedCache, getFetch, adapter; +var init_fetch2 = __esm({ + "../../node_modules/axios/lib/adapters/fetch.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_platform(); + init_utils8(); + init_AxiosError(); + init_composeSignals(); + init_trackStream(); + init_AxiosHeaders(); + init_progressEventReducer(); + init_resolveConfig(); + init_settle(); + DEFAULT_CHUNK_SIZE = 64 * 1024; + ({ isFunction: isFunction3 } = utils_default); + globalFetchAPI = (({ Request: Request3, Response: Response3 }) => ({ + Request: Request3, + Response: Response3 + }))(utils_default.global); + ({ ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = utils_default.global); + test = /* @__PURE__ */ __name((fn, ...args) => { + try { + return !!fn(...args); + } catch (e2) { + return false; + } + }, "test"); + factory = /* @__PURE__ */ __name((env2) => { + env2 = utils_default.merge.call( + { + skipUndefined: true + }, + globalFetchAPI, + env2 + ); + const { fetch: envFetch, Request: Request3, Response: Response3 } = env2; + const isFetchSupported = envFetch ? isFunction3(envFetch) : typeof fetch === "function"; + const isRequestSupported = isFunction3(Request3); + const isResponseSupported = isFunction3(Response3); + if (!isFetchSupported) { + return false; + } + const isReadableStreamSupported = isFetchSupported && isFunction3(ReadableStream2); + const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? ((encoder2) => (str) => encoder2.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request3(str).arrayBuffer())); + const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => { + let duplexAccessed = false; + const hasContentType = new Request3(platform_default.origin, { + body: new ReadableStream2(), + method: "POST", + get duplex() { + duplexAccessed = true; + return "half"; + } + }).headers.has("Content-Type"); + return duplexAccessed && !hasContentType; + }); + const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response3("").body)); + const resolvers = { + stream: supportsResponseStream && ((res) => res.body) + }; + isFetchSupported && (() => { + ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => { + !resolvers[type] && (resolvers[type] = (res, config3) => { + let method = res && res[type]; + if (method) { + return method.call(res); + } + throw new AxiosError_default( + `Response type '${type}' is not supported`, + AxiosError_default.ERR_NOT_SUPPORT, + config3 + ); + }); + }); + })(); + const getBodyLength = /* @__PURE__ */ __name(async (body) => { + if (body == null) { + return 0; + } + if (utils_default.isBlob(body)) { + return body.size; + } + if (utils_default.isSpecCompliantForm(body)) { + const _request = new Request3(platform_default.origin, { + method: "POST", + body + }); + return (await _request.arrayBuffer()).byteLength; + } + if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) { + return body.byteLength; + } + if (utils_default.isURLSearchParams(body)) { + body = body + ""; + } + if (utils_default.isString(body)) { + return (await encodeText(body)).byteLength; + } + }, "getBodyLength"); + const resolveBodyLength = /* @__PURE__ */ __name(async (headers, body) => { + const length = utils_default.toFiniteNumber(headers.getContentLength()); + return length == null ? getBodyLength(body) : length; + }, "resolveBodyLength"); + return async (config3) => { + let { + url: url2, + method, + data, + signal, + cancelToken, + timeout, + onDownloadProgress, + onUploadProgress, + responseType, + headers, + withCredentials = "same-origin", + fetchOptions + } = resolveConfig_default(config3); + let _fetch = envFetch || fetch; + responseType = responseType ? (responseType + "").toLowerCase() : "text"; + let composedSignal = composeSignals_default( + [signal, cancelToken && cancelToken.toAbortSignal()], + timeout + ); + let request = null; + const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { + composedSignal.unsubscribe(); + }); + let requestContentLength; + try { + if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) { + let _request = new Request3(url2, { + method: "POST", + body: data, + duplex: "half" + }); + let contentTypeHeader; + if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) { + headers.setContentType(contentTypeHeader); + } + if (_request.body) { + const [onProgress, flush2] = progressEventDecorator( + requestContentLength, + progressEventReducer(asyncDecorator(onUploadProgress)) + ); + data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush2); + } + } + if (!utils_default.isString(withCredentials)) { + withCredentials = withCredentials ? "include" : "omit"; + } + const isCredentialsSupported = isRequestSupported && "credentials" in Request3.prototype; + const resolvedOptions = { + ...fetchOptions, + signal: composedSignal, + method: method.toUpperCase(), + headers: headers.normalize().toJSON(), + body: data, + duplex: "half", + credentials: isCredentialsSupported ? withCredentials : void 0 + }; + request = isRequestSupported && new Request3(url2, resolvedOptions); + let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions)); + const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response"); + if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) { + const options = {}; + ["status", "statusText", "headers"].forEach((prop) => { + options[prop] = response[prop]; + }); + const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length")); + const [onProgress, flush2] = onDownloadProgress && progressEventDecorator( + responseContentLength, + progressEventReducer(asyncDecorator(onDownloadProgress), true) + ) || []; + response = new Response3( + trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { + flush2 && flush2(); + unsubscribe && unsubscribe(); + }), + options + ); + } + responseType = responseType || "text"; + let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"]( + response, + config3 + ); + !isStreamResponse && unsubscribe && unsubscribe(); + return await new Promise((resolve, reject) => { + settle(resolve, reject, { + data: responseData, + headers: AxiosHeaders_default.from(response.headers), + status: response.status, + statusText: response.statusText, + config: config3, + request + }); + }); + } catch (err) { + unsubscribe && unsubscribe(); + if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) { + throw Object.assign( + new AxiosError_default( + "Network Error", + AxiosError_default.ERR_NETWORK, + config3, + request, + err && err.response + ), + { + cause: err.cause || err + } + ); + } + throw AxiosError_default.from(err, err && err.code, config3, request, err && err.response); + } + }; + }, "factory"); + seedCache = /* @__PURE__ */ new Map(); + getFetch = /* @__PURE__ */ __name((config3) => { + let env2 = config3 && config3.env || {}; + const { fetch: fetch3, Request: Request3, Response: Response3 } = env2; + const seeds = [Request3, Response3, fetch3]; + let len = seeds.length, i2 = len, seed, target, map2 = seedCache; + while (i2--) { + seed = seeds[i2]; + target = map2.get(seed); + target === void 0 && map2.set(seed, target = i2 ? /* @__PURE__ */ new Map() : factory(env2)); + map2 = target; + } + return target; + }, "getFetch"); + adapter = getFetch(); + } +}); + +// ../../node_modules/axios/lib/adapters/adapters.js +function getAdapter(adapters, config3) { + adapters = utils_default.isArray(adapters) ? adapters : [adapters]; + const { length } = adapters; + let nameOrAdapter; + let adapter2; + const rejectedReasons = {}; + for (let i2 = 0; i2 < length; i2++) { + nameOrAdapter = adapters[i2]; + let id; + adapter2 = nameOrAdapter; + if (!isResolvedHandle(nameOrAdapter)) { + adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + if (adapter2 === void 0) { + throw new AxiosError_default(`Unknown adapter '${id}'`); + } + } + if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config3)))) { + break; + } + rejectedReasons[id || "#" + i2] = adapter2; + } + if (!adapter2) { + const reasons = Object.entries(rejectedReasons).map( + ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build") + ); + let s2 = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"; + throw new AxiosError_default( + `There is no suitable adapter to dispatch the request ` + s2, + "ERR_NOT_SUPPORT" + ); + } + return adapter2; +} +var knownAdapters, renderReason, isResolvedHandle, adapters_default; +var init_adapters = __esm({ + "../../node_modules/axios/lib/adapters/adapters.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_null(); + init_xhr(); + init_fetch2(); + init_AxiosError(); + knownAdapters = { + http: null_default, + xhr: xhr_default, + fetch: { + get: getFetch + } + }; + utils_default.forEach(knownAdapters, (fn, value) => { + if (fn) { + try { + Object.defineProperty(fn, "name", { value }); + } catch (e2) { + } + Object.defineProperty(fn, "adapterName", { value }); + } + }); + renderReason = /* @__PURE__ */ __name((reason) => `- ${reason}`, "renderReason"); + isResolvedHandle = /* @__PURE__ */ __name((adapter2) => utils_default.isFunction(adapter2) || adapter2 === null || adapter2 === false, "isResolvedHandle"); + __name(getAdapter, "getAdapter"); + adapters_default = { + /** + * Resolve an adapter from a list of adapter names or functions. + * @type {Function} + */ + getAdapter, + /** + * Exposes all known adapters + * @type {Object} + */ + adapters: knownAdapters + }; + } +}); + +// ../../node_modules/axios/lib/core/dispatchRequest.js +function throwIfCancellationRequested(config3) { + if (config3.cancelToken) { + config3.cancelToken.throwIfRequested(); + } + if (config3.signal && config3.signal.aborted) { + throw new CanceledError_default(null, config3); + } +} +function dispatchRequest(config3) { + throwIfCancellationRequested(config3); + config3.headers = AxiosHeaders_default.from(config3.headers); + config3.data = transformData.call(config3, config3.transformRequest); + if (["post", "put", "patch"].indexOf(config3.method) !== -1) { + config3.headers.setContentType("application/x-www-form-urlencoded", false); + } + const adapter2 = adapters_default.getAdapter(config3.adapter || defaults_default.adapter, config3); + return adapter2(config3).then( + /* @__PURE__ */ __name(function onAdapterResolution(response) { + throwIfCancellationRequested(config3); + response.data = transformData.call(config3, config3.transformResponse, response); + response.headers = AxiosHeaders_default.from(response.headers); + return response; + }, "onAdapterResolution"), + /* @__PURE__ */ __name(function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config3); + if (reason && reason.response) { + reason.response.data = transformData.call( + config3, + config3.transformResponse, + reason.response + ); + reason.response.headers = AxiosHeaders_default.from(reason.response.headers); + } + } + return Promise.reject(reason); + }, "onAdapterRejection") + ); +} +var init_dispatchRequest = __esm({ + "../../node_modules/axios/lib/core/dispatchRequest.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_transformData(); + init_isCancel(); + init_defaults(); + init_CanceledError(); + init_AxiosHeaders(); + init_adapters(); + __name(throwIfCancellationRequested, "throwIfCancellationRequested"); + __name(dispatchRequest, "dispatchRequest"); + } +}); + +// ../../node_modules/axios/lib/env/data.js +var VERSION; +var init_data = __esm({ + "../../node_modules/axios/lib/env/data.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + VERSION = "1.13.6"; + } +}); + +// ../../node_modules/axios/lib/helpers/validator.js +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== "object") { + throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE); + } + const keys = Object.keys(options); + let i2 = keys.length; + while (i2-- > 0) { + const opt = keys[i2]; + const validator = schema[opt]; + if (validator) { + const value = options[opt]; + const result = value === void 0 || validator(value, opt, options); + if (result !== true) { + throw new AxiosError_default( + "option " + opt + " must be " + result, + AxiosError_default.ERR_BAD_OPTION_VALUE + ); + } + continue; + } + if (allowUnknown !== true) { + throw new AxiosError_default("Unknown option " + opt, AxiosError_default.ERR_BAD_OPTION); + } + } +} +var validators, deprecatedWarnings, validator_default; +var init_validator = __esm({ + "../../node_modules/axios/lib/helpers/validator.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_data(); + init_AxiosError(); + validators = {}; + ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i2) => { + validators[type] = /* @__PURE__ */ __name(function validator(thing) { + return typeof thing === type || "a" + (i2 < 1 ? "n " : " ") + type; + }, "validator"); + }); + deprecatedWarnings = {}; + validators.transitional = /* @__PURE__ */ __name(function transitional(validator, version4, message2) { + function formatMessage(opt, desc2) { + return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc2 + (message2 ? ". " + message2 : ""); + } + __name(formatMessage, "formatMessage"); + return (value, opt, opts) => { + if (validator === false) { + throw new AxiosError_default( + formatMessage(opt, " has been removed" + (version4 ? " in " + version4 : "")), + AxiosError_default.ERR_DEPRECATED + ); + } + if (version4 && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + console.warn( + formatMessage( + opt, + " has been deprecated since v" + version4 + " and will be removed in the near future" + ) + ); + } + return validator ? validator(value, opt, opts) : true; + }; + }, "transitional"); + validators.spelling = /* @__PURE__ */ __name(function spelling(correctSpelling) { + return (value, opt) => { + console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); + return true; + }; + }, "spelling"); + __name(assertOptions, "assertOptions"); + validator_default = { + assertOptions, + validators + }; + } +}); + +// ../../node_modules/axios/lib/core/Axios.js +var validators2, Axios, Axios_default; +var init_Axios = __esm({ + "../../node_modules/axios/lib/core/Axios.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_buildURL(); + init_InterceptorManager(); + init_dispatchRequest(); + init_mergeConfig(); + init_buildFullPath(); + init_validator(); + init_AxiosHeaders(); + init_transitional(); + validators2 = validator_default.validators; + Axios = class { + constructor(instanceConfig) { + this.defaults = instanceConfig || {}; + this.interceptors = { + request: new InterceptorManager_default(), + response: new InterceptorManager_default() + }; + } + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ + async request(configOrUrl, config3) { + try { + return await this._request(configOrUrl, config3); + } catch (err) { + if (err instanceof Error) { + let dummy = {}; + Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error(); + const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : ""; + try { + if (!err.stack) { + err.stack = stack; + } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) { + err.stack += "\n" + stack; + } + } catch (e2) { + } + } + throw err; + } + } + _request(configOrUrl, config3) { + if (typeof configOrUrl === "string") { + config3 = config3 || {}; + config3.url = configOrUrl; + } else { + config3 = configOrUrl || {}; + } + config3 = mergeConfig(this.defaults, config3); + const { transitional: transitional2, paramsSerializer, headers } = config3; + if (transitional2 !== void 0) { + validator_default.assertOptions( + transitional2, + { + silentJSONParsing: validators2.transitional(validators2.boolean), + forcedJSONParsing: validators2.transitional(validators2.boolean), + clarifyTimeoutError: validators2.transitional(validators2.boolean), + legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean) + }, + false + ); + } + if (paramsSerializer != null) { + if (utils_default.isFunction(paramsSerializer)) { + config3.paramsSerializer = { + serialize: paramsSerializer + }; + } else { + validator_default.assertOptions( + paramsSerializer, + { + encode: validators2.function, + serialize: validators2.function + }, + true + ); + } + } + if (config3.allowAbsoluteUrls !== void 0) { + } else if (this.defaults.allowAbsoluteUrls !== void 0) { + config3.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; + } else { + config3.allowAbsoluteUrls = true; + } + validator_default.assertOptions( + config3, + { + baseUrl: validators2.spelling("baseURL"), + withXsrfToken: validators2.spelling("withXSRFToken") + }, + true + ); + config3.method = (config3.method || this.defaults.method || "get").toLowerCase(); + let contextHeaders = headers && utils_default.merge(headers.common, headers[config3.method]); + headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => { + delete headers[method]; + }); + config3.headers = AxiosHeaders_default.concat(contextHeaders, headers); + const requestInterceptorChain = []; + let synchronousRequestInterceptors = true; + this.interceptors.request.forEach(/* @__PURE__ */ __name(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config3) === false) { + return; + } + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + const transitional3 = config3.transitional || transitional_default; + const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering; + if (legacyInterceptorReqResOrdering) { + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + } else { + requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + } + }, "unshiftRequestInterceptors")); + const responseInterceptorChain = []; + this.interceptors.response.forEach(/* @__PURE__ */ __name(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }, "pushResponseInterceptors")); + let promise2; + let i2 = 0; + let len; + if (!synchronousRequestInterceptors) { + const chain = [dispatchRequest.bind(this), void 0]; + chain.unshift(...requestInterceptorChain); + chain.push(...responseInterceptorChain); + len = chain.length; + promise2 = Promise.resolve(config3); + while (i2 < len) { + promise2 = promise2.then(chain[i2++], chain[i2++]); + } + return promise2; + } + len = requestInterceptorChain.length; + let newConfig = config3; + while (i2 < len) { + const onFulfilled = requestInterceptorChain[i2++]; + const onRejected = requestInterceptorChain[i2++]; + try { + newConfig = onFulfilled(newConfig); + } catch (error50) { + onRejected.call(this, error50); + break; + } + } + try { + promise2 = dispatchRequest.call(this, newConfig); + } catch (error50) { + return Promise.reject(error50); + } + i2 = 0; + len = responseInterceptorChain.length; + while (i2 < len) { + promise2 = promise2.then(responseInterceptorChain[i2++], responseInterceptorChain[i2++]); + } + return promise2; + } + getUri(config3) { + config3 = mergeConfig(this.defaults, config3); + const fullPath = buildFullPath(config3.baseURL, config3.url, config3.allowAbsoluteUrls); + return buildURL(fullPath, config3.params, config3.paramsSerializer); + } + }; + __name(Axios, "Axios"); + utils_default.forEach(["delete", "get", "head", "options"], /* @__PURE__ */ __name(function forEachMethodNoData(method) { + Axios.prototype[method] = function(url2, config3) { + return this.request( + mergeConfig(config3 || {}, { + method, + url: url2, + data: (config3 || {}).data + }) + ); + }; + }, "forEachMethodNoData")); + utils_default.forEach(["post", "put", "patch"], /* @__PURE__ */ __name(function forEachMethodWithData(method) { + function generateHTTPMethod(isForm) { + return /* @__PURE__ */ __name(function httpMethod(url2, data, config3) { + return this.request( + mergeConfig(config3 || {}, { + method, + headers: isForm ? { + "Content-Type": "multipart/form-data" + } : {}, + url: url2, + data + }) + ); + }, "httpMethod"); + } + __name(generateHTTPMethod, "generateHTTPMethod"); + Axios.prototype[method] = generateHTTPMethod(); + Axios.prototype[method + "Form"] = generateHTTPMethod(true); + }, "forEachMethodWithData")); + Axios_default = Axios; + } +}); + +// ../../node_modules/axios/lib/cancel/CancelToken.js +var CancelToken, CancelToken_default; +var init_CancelToken = __esm({ + "../../node_modules/axios/lib/cancel/CancelToken.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_CanceledError(); + CancelToken = class { + constructor(executor) { + if (typeof executor !== "function") { + throw new TypeError("executor must be a function."); + } + let resolvePromise; + this.promise = new Promise(/* @__PURE__ */ __name(function promiseExecutor(resolve) { + resolvePromise = resolve; + }, "promiseExecutor")); + const token = this; + this.promise.then((cancel) => { + if (!token._listeners) + return; + let i2 = token._listeners.length; + while (i2-- > 0) { + token._listeners[i2](cancel); + } + token._listeners = null; + }); + this.promise.then = (onfulfilled) => { + let _resolve; + const promise2 = new Promise((resolve) => { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + promise2.cancel = /* @__PURE__ */ __name(function reject() { + token.unsubscribe(_resolve); + }, "reject"); + return promise2; + }; + executor(/* @__PURE__ */ __name(function cancel(message2, config3, request) { + if (token.reason) { + return; + } + token.reason = new CanceledError_default(message2, config3, request); + resolvePromise(token.reason); + }, "cancel")); + } + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + throwIfRequested() { + if (this.reason) { + throw this.reason; + } + } + /** + * Subscribe to the cancel signal + */ + subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; + } + } + /** + * Unsubscribe from the cancel signal + */ + unsubscribe(listener) { + if (!this._listeners) { + return; + } + const index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } + } + toAbortSignal() { + const controller = new AbortController(); + const abort2 = /* @__PURE__ */ __name((err) => { + controller.abort(err); + }, "abort"); + this.subscribe(abort2); + controller.signal.unsubscribe = () => this.unsubscribe(abort2); + return controller.signal; + } + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + static source() { + let cancel; + const token = new CancelToken(/* @__PURE__ */ __name(function executor(c2) { + cancel = c2; + }, "executor")); + return { + token, + cancel + }; + } + }; + __name(CancelToken, "CancelToken"); + CancelToken_default = CancelToken; + } +}); + +// ../../node_modules/axios/lib/helpers/spread.js +function spread(callback) { + return /* @__PURE__ */ __name(function wrap(arr) { + return callback.apply(null, arr); + }, "wrap"); +} +var init_spread = __esm({ + "../../node_modules/axios/lib/helpers/spread.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(spread, "spread"); + } +}); + +// ../../node_modules/axios/lib/helpers/isAxiosError.js +function isAxiosError(payload) { + return utils_default.isObject(payload) && payload.isAxiosError === true; +} +var init_isAxiosError = __esm({ + "../../node_modules/axios/lib/helpers/isAxiosError.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + __name(isAxiosError, "isAxiosError"); + } +}); + +// ../../node_modules/axios/lib/helpers/HttpStatusCode.js +var HttpStatusCode, HttpStatusCode_default; +var init_HttpStatusCode = __esm({ + "../../node_modules/axios/lib/helpers/HttpStatusCode.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + HttpStatusCode = { + Continue: 100, + SwitchingProtocols: 101, + Processing: 102, + EarlyHints: 103, + Ok: 200, + Created: 201, + Accepted: 202, + NonAuthoritativeInformation: 203, + NoContent: 204, + ResetContent: 205, + PartialContent: 206, + MultiStatus: 207, + AlreadyReported: 208, + ImUsed: 226, + MultipleChoices: 300, + MovedPermanently: 301, + Found: 302, + SeeOther: 303, + NotModified: 304, + UseProxy: 305, + Unused: 306, + TemporaryRedirect: 307, + PermanentRedirect: 308, + BadRequest: 400, + Unauthorized: 401, + PaymentRequired: 402, + Forbidden: 403, + NotFound: 404, + MethodNotAllowed: 405, + NotAcceptable: 406, + ProxyAuthenticationRequired: 407, + RequestTimeout: 408, + Conflict: 409, + Gone: 410, + LengthRequired: 411, + PreconditionFailed: 412, + PayloadTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + UnprocessableEntity: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, + WebServerIsDown: 521, + ConnectionTimedOut: 522, + OriginIsUnreachable: 523, + TimeoutOccurred: 524, + SslHandshakeFailed: 525, + InvalidSslCertificate: 526 + }; + Object.entries(HttpStatusCode).forEach(([key, value]) => { + HttpStatusCode[value] = key; + }); + HttpStatusCode_default = HttpStatusCode; + } +}); + +// ../../node_modules/axios/lib/axios.js +function createInstance(defaultConfig) { + const context2 = new Axios_default(defaultConfig); + const instance = bind(Axios_default.prototype.request, context2); + utils_default.extend(instance, Axios_default.prototype, context2, { allOwnKeys: true }); + utils_default.extend(instance, context2, null, { allOwnKeys: true }); + instance.create = /* @__PURE__ */ __name(function create(instanceConfig) { + return createInstance(mergeConfig(defaultConfig, instanceConfig)); + }, "create"); + return instance; +} +var axios, axios_default; +var init_axios = __esm({ + "../../node_modules/axios/lib/axios.js"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils8(); + init_bind(); + init_Axios(); + init_mergeConfig(); + init_defaults(); + init_formDataToJSON(); + init_CanceledError(); + init_CancelToken(); + init_isCancel(); + init_data(); + init_toFormData(); + init_AxiosError(); + init_spread(); + init_isAxiosError(); + init_AxiosHeaders(); + init_adapters(); + init_HttpStatusCode(); + __name(createInstance, "createInstance"); + axios = createInstance(defaults_default); + axios.Axios = Axios_default; + axios.CanceledError = CanceledError_default; + axios.CancelToken = CancelToken_default; + axios.isCancel = isCancel; + axios.VERSION = VERSION; + axios.toFormData = toFormData_default; + axios.AxiosError = AxiosError_default; + axios.Cancel = axios.CanceledError; + axios.all = /* @__PURE__ */ __name(function all(promises) { + return Promise.all(promises); + }, "all"); + axios.spread = spread; + axios.isAxiosError = isAxiosError; + axios.mergeConfig = mergeConfig; + axios.AxiosHeaders = AxiosHeaders_default; + axios.formToJSON = (thing) => formDataToJSON_default(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing); + axios.getAdapter = adapters_default.getAdapter; + axios.HttpStatusCode = HttpStatusCode_default; + axios.default = axios; + axios_default = axios; + } +}); + +// ../../node_modules/axios/index.js +var Axios2, AxiosError2, CanceledError2, isCancel2, CancelToken2, VERSION2, all2, Cancel, isAxiosError2, spread2, toFormData2, AxiosHeaders2, HttpStatusCode2, formToJSON, getAdapter2, mergeConfig2; +var init_axios2 = __esm({ + "../../node_modules/axios/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_axios(); + ({ + Axios: Axios2, + AxiosError: AxiosError2, + CanceledError: CanceledError2, + isCancel: isCancel2, + CancelToken: CancelToken2, + VERSION: VERSION2, + all: all2, + Cancel, + isAxiosError: isAxiosError2, + spread: spread2, + toFormData: toFormData2, + AxiosHeaders: AxiosHeaders2, + HttpStatusCode: HttpStatusCode2, + formToJSON, + getAdapter: getAdapter2, + mergeConfig: mergeConfig2 + } = axios_default); + } +}); + +// src/lib/telegram-service.ts +var BOT_TOKEN, TELEGRAM_API_URL; +var init_telegram_service = __esm({ + "src/lib/telegram-service.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_env_exporter(); + BOT_TOKEN = telegramBotToken; + TELEGRAM_API_URL = `https://api.telegram.org/bot${BOT_TOKEN}`; + } +}); + +// src/lib/post-order-handler.ts +var ORDER_CHANNEL, CANCELLED_CHANNEL, publishOrder, publishFormattedOrder, publishCancellation; +var init_post_order_handler = __esm({ + "src/lib/post-order-handler.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_redis_client(); + init_telegram_service(); + ORDER_CHANNEL = "orders:placed"; + CANCELLED_CHANNEL = "orders:cancelled"; + publishOrder = /* @__PURE__ */ __name(async (orderDetails) => { + try { + const message2 = JSON.stringify(orderDetails); + await redis_client_default.publish(ORDER_CHANNEL, message2); + return true; + } catch (error50) { + console.error("Failed to publish order:", error50); + return false; + } + }, "publishOrder"); + publishFormattedOrder = /* @__PURE__ */ __name(async (createdOrders, ordersBySlot) => { + try { + const orderIds = createdOrders.map((order) => order.id); + return await publishOrder({ orderIds }); + } catch (error50) { + console.error("Failed to format and publish order:", error50); + return false; + } + }, "publishFormattedOrder"); + publishCancellation = /* @__PURE__ */ __name(async (orderId, cancelledBy, reason) => { + try { + const message2 = { + orderId, + cancelledBy, + reason, + cancelledAt: (/* @__PURE__ */ new Date()).toISOString() + }; + await redis_client_default.publish(CANCELLED_CHANNEL, JSON.stringify(message2)); + console.log("Cancellation published to Redis:", orderId); + return true; + } catch (error50) { + console.error("Failed to publish cancellation:", error50); + return false; + } + }, "publishCancellation"); + } +}); + +// src/stores/user-negativity-store.ts +async function getMultipleUserNegativityScores(userIds) { + try { + if (userIds.length === 0) + return {}; + const result = {}; + for (const userId of userIds) { + result[userId] = await getUserNegativityScore(userId); + } + return result; + } catch (error50) { + console.error("Error getting multiple user negativity scores:", error50); + return {}; + } +} +async function recomputeUserNegativityScore(userId) { + try { + const totalScore = await getUserNegativityScore(userId); + } catch (error50) { + console.error(`Error recomputing negativity score for user ${userId}:`, error50); + throw error50; + } +} +var init_user_negativity_store = __esm({ + "src/stores/user-negativity-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + __name(getMultipleUserNegativityScores, "getMultipleUserNegativityScores"); + __name(recomputeUserNegativityScore, "recomputeUserNegativityScore"); + } +}); + +// src/trpc/apis/admin-apis/apis/order.ts +var updateOrderNotesSchema, getOrderDetailsSchema, updatePackagedSchema, updateDeliveredSchema, updateOrderItemPackagingSchema, getSlotOrdersSchema, getAllOrdersSchema, orderRouter; +var init_order3 = __esm({ + "src/trpc/apis/admin-apis/apis/order.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_notif_job(); + init_post_order_handler(); + init_user_negativity_store(); + init_dbService(); + updateOrderNotesSchema = external_exports.object({ + orderId: external_exports.number(), + adminNotes: external_exports.string() + }); + getOrderDetailsSchema = external_exports.object({ + orderId: external_exports.number() + }); + updatePackagedSchema = external_exports.object({ + orderId: external_exports.string(), + isPackaged: external_exports.boolean() + }); + updateDeliveredSchema = external_exports.object({ + orderId: external_exports.string(), + isDelivered: external_exports.boolean() + }); + updateOrderItemPackagingSchema = external_exports.object({ + orderItemId: external_exports.number(), + isPackaged: external_exports.boolean().optional(), + isPackageVerified: external_exports.boolean().optional() + }); + getSlotOrdersSchema = external_exports.object({ + slotId: external_exports.string() + }); + getAllOrdersSchema = external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(20), + slotId: external_exports.number().optional().nullable(), + packagedFilter: external_exports.enum(["all", "packaged", "not_packaged"]).optional().default("all"), + deliveredFilter: external_exports.enum(["all", "delivered", "not_delivered"]).optional().default("all"), + cancellationFilter: external_exports.enum(["all", "cancelled", "not_cancelled"]).optional().default("all"), + flashDeliveryFilter: external_exports.enum(["all", "flash", "regular"]).optional().default("all") + }); + orderRouter = router2({ + updateNotes: protectedProcedure.input(updateOrderNotesSchema).mutation(async ({ input }) => { + const { orderId, adminNotes } = input; + const result = await updateOrderNotes(orderId, adminNotes || null); + if (!result) { + throw new Error("Order not found"); + } + return result; + }), + getOrderDetails: protectedProcedure.input(getOrderDetailsSchema).query(async ({ input }) => { + const { orderId } = input; + const orderDetails = await getOrderDetails(orderId); + if (!orderDetails) { + throw new Error("Order not found"); + } + return orderDetails; + }), + updatePackaged: protectedProcedure.input(updatePackagedSchema).mutation(async ({ input }) => { + const { orderId, isPackaged } = input; + const result = await updateOrderPackaged(orderId, isPackaged); + if (result.userId) + await sendOrderPackagedNotification(result.userId, orderId); + return { success: true, userId: result.userId }; + }), + updateDelivered: protectedProcedure.input(updateDeliveredSchema).mutation(async ({ input }) => { + const { orderId, isDelivered } = input; + const result = await updateOrderDelivered(orderId, isDelivered); + if (result.userId) + await sendOrderDeliveredNotification(result.userId, orderId); + return { success: true, userId: result.userId }; + }), + updateOrderItemPackaging: protectedProcedure.input(updateOrderItemPackagingSchema).mutation(async ({ input }) => { + const { orderItemId, isPackaged, isPackageVerified } = input; + const result = await updateOrderItemPackaging(orderItemId, isPackaged, isPackageVerified); + if (!result.updated) { + throw new ApiError("Order item not found", 404); + } + return result; + }), + removeDeliveryCharge: protectedProcedure.input(external_exports.object({ orderId: external_exports.number() })).mutation(async ({ input }) => { + const { orderId } = input; + const result = await removeDeliveryCharge(orderId); + if (!result) { + throw new Error("Order not found"); + } + return result; + }), + getSlotOrders: protectedProcedure.input(getSlotOrdersSchema).query(async ({ input }) => { + const { slotId } = input; + const result = await getSlotOrders(slotId); + return result; + }), + updateAddressCoords: protectedProcedure.input( + external_exports.object({ + addressId: external_exports.number(), + latitude: external_exports.number(), + longitude: external_exports.number() + }) + ).mutation(async ({ input }) => { + const { addressId, latitude, longitude } = input; + const result = await updateAddressCoords(addressId, latitude, longitude); + if (!result.success) { + throw new ApiError("Address not found", 404); + } + return result; + }), + getAll: protectedProcedure.input(getAllOrdersSchema).query(async ({ input }) => { + try { + const result = await getAllOrders(input); + const userIds = [...new Set(result.orders.map((order) => order.userId))]; + const negativityScores = await getMultipleUserNegativityScores(userIds); + const orders3 = result.orders.map((order) => { + const { userId, userNegativityScore, ...rest } = order; + return { + ...rest, + userNegativityScore: negativityScores[userId] || 0 + }; + }); + return { + orders: orders3, + nextCursor: result.nextCursor + }; + } catch (e2) { + console.log({ e: e2 }); + } + }), + rebalanceSlots: protectedProcedure.input(external_exports.object({ slotIds: external_exports.array(external_exports.number()).min(1).max(50) })).mutation(async ({ input }) => { + const slotIds = input.slotIds; + const result = await rebalanceSlots(slotIds); + return result; + }), + cancelOrder: protectedProcedure.input(external_exports.object({ + orderId: external_exports.number(), + reason: external_exports.string().min(1, "Cancellation reason is required") + })).mutation(async ({ input }) => { + const { orderId, reason } = input; + const result = await cancelOrder(orderId, reason); + if (!result.success) { + if (result.error === "order_not_found") { + throw new ApiError(result.message, 404); + } + if (result.error === "status_not_found") { + throw new ApiError(result.message, 400); + } + if (result.error === "already_cancelled") { + throw new ApiError(result.message, 400); + } + if (result.error === "already_delivered") { + throw new ApiError(result.message, 400); + } + throw new ApiError(result.message, 400); + } + if (result.orderId) { + await publishCancellation(result.orderId, "admin", reason); + } + return { success: true, message: result.message }; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/vendor-snippets.ts +var import_dayjs2, createSnippetSchema, updateSnippetSchema, vendorSnippetsRouter; +var init_vendor_snippets2 = __esm({ + "src/trpc/apis/admin-apis/apis/vendor-snippets.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + import_dayjs2 = __toESM(require_dayjs_min()); + init_env_exporter(); + init_dbService(); + createSnippetSchema = external_exports.object({ + snippetCode: external_exports.string().min(1, "Snippet code is required"), + slotId: external_exports.number().optional(), + productIds: external_exports.array(external_exports.number().int().positive()).min(1, "At least one product is required"), + validTill: external_exports.string().optional(), + isPermanent: external_exports.boolean().default(false) + }); + updateSnippetSchema = external_exports.object({ + id: external_exports.number().int().positive(), + updates: createSnippetSchema.partial().extend({ + snippetCode: external_exports.string().min(1).optional(), + productIds: external_exports.array(external_exports.number().int().positive()).optional(), + isPermanent: external_exports.boolean().default(false) + }) + }); + vendorSnippetsRouter = router2({ + create: protectedProcedure.input(createSnippetSchema).mutation(async ({ input, ctx }) => { + const { snippetCode, slotId, productIds, validTill, isPermanent } = input; + const staffUserId = ctx.staffUser?.id; + if (!staffUserId) { + throw new Error("Unauthorized"); + } + if (slotId) { + const slot = await getVendorSlotById(slotId); + if (!slot) { + throw new Error("Invalid slot ID"); + } + } + const products = await getProductsByIds(productIds); + if (products.length !== productIds.length) { + throw new Error("One or more invalid product IDs"); + } + const existingSnippet = await checkVendorSnippetExists(snippetCode); + if (existingSnippet) { + throw new Error("Snippet code already exists"); + } + const result = await createVendorSnippet({ + snippetCode, + slotId, + productIds, + isPermanent, + validTill: validTill ? new Date(validTill) : void 0 + }); + return result; + }), + getAll: protectedProcedure.query(async () => { + console.log("from the vendor snipptes methods"); + try { + const result = await getAllVendorSnippets(); + const snippetsWithProducts = await Promise.all( + result.map(async (snippet) => { + const products = await getProductsByIds(snippet.productIds); + return { + ...snippet, + accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`, + products + }; + }) + ); + return snippetsWithProducts; + } catch (e2) { + console.log(e2); + } + return []; + }), + getById: protectedProcedure.input(external_exports.object({ id: external_exports.number().int().positive() })).query(async ({ input }) => { + const { id } = input; + const result = await getVendorSnippetById(id); + if (!result) { + throw new Error("Vendor snippet not found"); + } + return result; + }), + update: protectedProcedure.input(updateSnippetSchema).mutation(async ({ input }) => { + const { id, updates } = input; + const existingSnippet = await getVendorSnippetById(id); + if (!existingSnippet) { + throw new Error("Vendor snippet not found"); + } + if (updates.slotId) { + const slot = await getVendorSlotById(updates.slotId); + if (!slot) { + throw new Error("Invalid slot ID"); + } + } + if (updates.productIds) { + const products = await getProductsByIds(updates.productIds); + if (products.length !== updates.productIds.length) { + throw new Error("One or more invalid product IDs"); + } + } + if (updates.snippetCode && updates.snippetCode !== existingSnippet.snippetCode) { + const duplicateSnippet = await checkVendorSnippetExists(updates.snippetCode); + if (duplicateSnippet) { + throw new Error("Snippet code already exists"); + } + } + const updateData = { + ...updates, + validTill: updates.validTill !== void 0 ? updates.validTill ? new Date(updates.validTill) : null : void 0 + }; + const result = await updateVendorSnippet(id, updateData); + if (!result) { + throw new Error("Failed to update vendor snippet"); + } + return result; + }), + delete: protectedProcedure.input(external_exports.object({ id: external_exports.number().int().positive() })).mutation(async ({ input }) => { + const { id } = input; + const result = await deleteVendorSnippet(id); + if (!result) { + throw new Error("Vendor snippet not found"); + } + return { message: "Vendor snippet deleted successfully" }; + }), + getOrdersBySnippet: publicProcedure.input(external_exports.object({ + snippetCode: external_exports.string().min(1, "Snippet code is required") + })).query(async ({ input }) => { + const { snippetCode } = input; + const snippet = await getVendorSnippetByCode(snippetCode); + if (!snippet) { + throw new Error("Vendor snippet not found"); + } + if (snippet.validTill && new Date(snippet.validTill) < /* @__PURE__ */ new Date()) { + throw new Error("Vendor snippet has expired"); + } + if (!snippet.slotId) { + throw new Error("Vendor snippet not associated with a slot"); + } + const matchingOrders = await getVendorOrdersBySlotId(snippet.slotId); + const filteredOrders = matchingOrders.filter((order) => { + const status = order.orderStatus; + if (status[0].isCancelled) + return false; + const orderProductIds = order.orderItems.map((item) => item.productId); + return snippet.productIds.some((productId) => orderProductIds.includes(productId)); + }); + const formattedOrders = filteredOrders.map((order) => { + const attachedOrderItems = order.orderItems.filter( + (item) => snippet.productIds.includes(item.productId) + ); + const products = attachedOrderItems.map((item) => ({ + orderItemId: item.id, + productId: item.productId, + productName: item.product.name, + quantity: parseFloat(item.quantity), + productSize: item.product.productQuantity, + price: parseFloat((item.price ?? 0).toString()), + unit: item.product.unit?.shortNotation || "unit", + subtotal: parseFloat((item.price ?? 0).toString()) * parseFloat(item.quantity), + is_packaged: item.is_packaged, + is_package_verified: item.is_package_verified + })); + const orderTotal = products.reduce((sum2, p2) => sum2 + p2.subtotal, 0); + return { + orderId: `ORD${order.id}`, + orderDate: order.createdAt.toISOString(), + customerName: order.user.name || "", + totalAmount: orderTotal, + slotInfo: order.slot ? { + time: order.slot.deliveryTime.toISOString(), + sequence: order.slot.deliverySequence + } : null, + products, + matchedProducts: snippet.productIds, + // All snippet products are considered matched + snippetCode: snippet.snippetCode + }; + }); + return { + success: true, + data: formattedOrders, + snippet: { + id: snippet.id, + snippetCode: snippet.snippetCode, + slotId: snippet.slotId, + productIds: snippet.productIds, + validTill: snippet.validTill?.toISOString(), + createdAt: snippet.createdAt.toISOString(), + isPermanent: snippet.isPermanent + } + }; + }), + getVendorOrders: protectedProcedure.query(async () => { + const vendorOrders = await getVendorOrders(); + return vendorOrders.map((order) => ({ + id: order.id, + status: "pending", + orderDate: order.createdAt.toISOString(), + totalQuantity: order.orderItems.reduce((sum2, item) => sum2 + parseFloat(item.quantity || "0"), 0), + products: order.orderItems.map((item) => ({ + name: item.product.name, + quantity: parseFloat(item.quantity || "0"), + unit: item.product.unit?.shortNotation || "unit" + })) + })); + }), + getUpcomingSlots: publicProcedure.query(async () => { + const threeHoursAgo = (0, import_dayjs2.default)().subtract(3, "hour").toDate(); + const slots = await getSlotsAfterDate(threeHoursAgo); + return { + success: true, + data: slots.map((slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime.toISOString(), + freezeTime: slot.freezeTime.toISOString(), + deliverySequence: slot.deliverySequence + })) + }; + }), + getOrdersBySnippetAndSlot: publicProcedure.input(external_exports.object({ + snippetCode: external_exports.string().min(1, "Snippet code is required"), + slotId: external_exports.number().int().positive("Valid slot ID is required") + })).query(async ({ input }) => { + const { snippetCode, slotId } = input; + const snippet = await getVendorSnippetByCode(snippetCode); + const slot = await getVendorSlotById(slotId); + if (!snippet) { + throw new Error("Vendor snippet not found"); + } + if (!slot) { + throw new Error("Slot not found"); + } + const matchingOrders = await getVendorOrdersBySlotId(slotId); + const filteredOrders = matchingOrders.filter((order) => { + const status = order.orderStatus; + if (status[0]?.isCancelled) + return false; + const orderProductIds = order.orderItems.map((item) => item.productId); + return snippet.productIds.some((productId) => orderProductIds.includes(productId)); + }); + const formattedOrders = filteredOrders.map((order) => { + const attachedOrderItems = order.orderItems.filter( + (item) => snippet.productIds.includes(item.productId) + ); + const products = attachedOrderItems.map((item) => ({ + orderItemId: item.id, + productId: item.productId, + productName: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat((item.price ?? 0).toString()), + unit: item.product.unit?.shortNotation || "unit", + subtotal: parseFloat((item.price ?? 0).toString()) * parseFloat(item.quantity), + productSize: item.product.productQuantity, + is_packaged: item.is_packaged, + is_package_verified: item.is_package_verified + })); + const orderTotal = products.reduce((sum2, p2) => sum2 + p2.subtotal, 0); + return { + orderId: `ORD${order.id}`, + orderDate: order.createdAt.toISOString(), + customerName: order.user.name || "", + totalAmount: orderTotal, + slotInfo: order.slot ? { + time: order.slot.deliveryTime.toISOString(), + sequence: order.slot.deliverySequence + } : null, + products, + matchedProducts: snippet.productIds, + snippetCode: snippet.snippetCode + }; + }); + return { + success: true, + data: formattedOrders, + snippet: { + id: snippet.id, + snippetCode: snippet.snippetCode, + slotId: snippet.slotId, + productIds: snippet.productIds, + validTill: snippet.validTill?.toISOString(), + createdAt: snippet.createdAt.toISOString(), + isPermanent: snippet.isPermanent + }, + selectedSlot: { + id: slot.id, + deliveryTime: slot.deliveryTime.toISOString(), + freezeTime: slot.freezeTime.toISOString(), + deliverySequence: slot.deliverySequence + } + }; + }), + updateOrderItemPackaging: publicProcedure.input(external_exports.object({ + orderItemId: external_exports.number().int().positive("Valid order item ID required"), + is_packaged: external_exports.boolean() + })).mutation(async ({ input, ctx }) => { + const { orderItemId, is_packaged } = input; + const result = await updateVendorOrderItemPackaging(orderItemId, is_packaged); + if (!result.success) { + throw new Error(result.message); + } + return result; + }) + }); + } +}); + +// src/lib/roles-manager.ts +var ROLE_NAMES, defaultRole, RoleManager, roleManager, roles_manager_default; +var init_roles_manager = __esm({ + "src/lib/roles-manager.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + ROLE_NAMES = { + ADMIN: "admin", + GENERAL_USER: "gen_user", + HOSPITAL_ADMIN: "hospital_admin", + DOCTOR: "doctor", + RECEPTIONIST: "receptionist" + }; + defaultRole = ROLE_NAMES.GENERAL_USER; + RoleManager = class { + roles = /* @__PURE__ */ new Map(); + rolesByName = /* @__PURE__ */ new Map(); + isInitialized = false; + constructor() { + } + /** + * Fetch all roles from the database and cache them + * This should be called during application startup + */ + async fetchRoles() { + try { + } catch (error50) { + console.error("[RoleManager] Error fetching roles:", error50); + throw error50; + } + } + /** + * Get all roles from cache + * If not initialized, fetches roles from DB first + */ + async getRoles() { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return Array.from(this.roles.values()); + } + /** + * Get role by ID + * @param id Role ID + */ + async getRoleById(id) { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return this.roles.get(id); + } + /** + * Get role by name + * @param name Role name + */ + async getRoleByName(name) { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return this.rolesByName.get(name); + } + /** + * Check if a role exists by name + * @param name Role name + */ + async roleExists(name) { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return this.rolesByName.has(name); + } + /** + * Get business roles (roles that are not 'admin' or 'gen_user') + */ + async getBusinessRoles() { + if (!this.isInitialized) { + await this.fetchRoles(); + } + return Array.from(this.roles.values()).filter( + (role) => role.name !== ROLE_NAMES.ADMIN && role.name !== ROLE_NAMES.GENERAL_USER + ); + } + /** + * Force refresh the roles cache + */ + async refreshRoles() { + await this.fetchRoles(); + } + }; + __name(RoleManager, "RoleManager"); + roleManager = new RoleManager(); + roles_manager_default = roleManager; + } +}); + +// src/lib/const-keys.ts +var CONST_KEYS, CONST_KEYS_ARRAY; +var init_const_keys = __esm({ + "src/lib/const-keys.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + CONST_KEYS = { + minRegularOrderValue: "minRegularOrderValue", + freeDeliveryThreshold: "freeDeliveryThreshold", + deliveryCharge: "deliveryCharge", + flashFreeDeliveryThreshold: "flashFreeDeliveryThreshold", + flashDeliveryCharge: "flashDeliveryCharge", + platformFeePercent: "platformFeePercent", + taxRate: "taxRate", + tester: "tester", + minOrderAmountForCoupon: "minOrderAmountForCoupon", + maxCouponDiscount: "maxCouponDiscount", + flashDeliverySlotId: "flashDeliverySlotId", + readableOrderId: "readableOrderId", + versionNum: "versionNum", + playStoreUrl: "playStoreUrl", + appStoreUrl: "appStoreUrl", + popularItems: "popularItems", + allItemsOrder: "allItemsOrder", + isFlashDeliveryEnabled: "isFlashDeliveryEnabled", + supportMobile: "supportMobile", + supportEmail: "supportEmail" + }; + CONST_KEYS_ARRAY = Object.values(CONST_KEYS); + } +}); + +// src/lib/const-store.ts +var computeConstants, getConstant, getConstants, getAllConstValues; +var init_const_store = __esm({ + "src/lib/const-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_const_keys(); + computeConstants = /* @__PURE__ */ __name(async () => { + try { + console.log("Computing constants from database..."); + const constants2 = await getAllKeyValStore(); + console.log(`Computed ${constants2.length} constants from DB`); + } catch (error50) { + console.error("Failed to compute constants:", error50); + throw error50; + } + }, "computeConstants"); + getConstant = /* @__PURE__ */ __name(async (key) => { + const constants2 = await getAllKeyValStore(); + const entry = constants2.find((c2) => c2.key === key); + if (!entry) { + return null; + } + return entry.value; + }, "getConstant"); + getConstants = /* @__PURE__ */ __name(async (keys) => { + const constants2 = await getAllKeyValStore(); + const constantsMap = new Map(constants2.map((c2) => [c2.key, c2.value])); + const result = {}; + for (const key of keys) { + const value = constantsMap.get(key); + result[key] = value !== void 0 ? value : null; + } + return result; + }, "getConstants"); + getAllConstValues = /* @__PURE__ */ __name(async () => { + const constants2 = await getAllKeyValStore(); + const constantsMap = new Map(constants2.map((c2) => [c2.key, c2.value])); + const result = {}; + for (const key of CONST_KEYS_ARRAY) { + result[key] = constantsMap.get(key) ?? null; + } + return result; + }, "getAllConstValues"); + } +}); + +// src/stores/slot-store.ts +async function transformSlotToStoreSlot(slot) { + return { + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isCapacityFull: slot.isCapacityFull, + products: slot.productSlots.map((productSlot) => ({ + id: productSlot.product.id, + name: productSlot.product.name, + productQuantity: productSlot.product.productQuantity, + shortDescription: productSlot.product.shortDescription, + price: productSlot.product.price.toString(), + marketPrice: productSlot.product.marketPrice?.toString() || null, + unit: productSlot.product.unit?.shortNotation || null, + images: scaffoldAssetUrl( + productSlot.product.images || [] + ), + isOutOfStock: productSlot.product.isOutOfStock, + storeId: productSlot.product.storeId, + nextDeliveryDate: slot.deliveryTime + })) + }; +} +function extractSlotInfo(slot) { + return { + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isCapacityFull: slot.isCapacityFull + }; +} +async function fetchAllTransformedSlots() { + const slots = await getAllSlotsWithProductsForCache(); + return Promise.all(slots.map(transformSlotToStoreSlot)); +} +async function initializeSlotStore() { + try { + console.log("Initializing slot store in Redis..."); + const slots = await getAllSlotsWithProductsForCache(); + const slotsWithProducts = await Promise.all( + slots.map(async (slot) => ({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isActive: slot.isActive, + isCapacityFull: slot.isCapacityFull, + products: await Promise.all( + slot.productSlots.map(async (productSlot) => ({ + id: productSlot.product.id, + name: productSlot.product.name, + productQuantity: productSlot.product.productQuantity, + shortDescription: productSlot.product.shortDescription, + price: productSlot.product.price.toString(), + marketPrice: productSlot.product.marketPrice?.toString() || null, + unit: productSlot.product.unit?.shortNotation || null, + images: scaffoldAssetUrl( + productSlot.product.images || [] + ), + isOutOfStock: productSlot.product.isOutOfStock, + storeId: productSlot.product.storeId, + nextDeliveryDate: slot.deliveryTime + })) + ) + })) + ); + const productSlotsMap = {}; + for (const slot of slotsWithProducts) { + for (const product of slot.products) { + if (!productSlotsMap[product.id]) { + productSlotsMap[product.id] = []; + } + productSlotsMap[product.id].push({ + id: slot.id, + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + isCapacityFull: slot.isCapacityFull + }); + } + } + console.log("Slot store initialized successfully"); + } catch (error50) { + console.error("Error initializing slot store:", error50); + } +} +async function getSlotById(slotId) { + try { + const slots = await getAllSlotsWithProductsForCache(); + const slot = slots.find((s2) => s2.id === slotId); + if (!slot) + return null; + return transformSlotToStoreSlot(slot); + } catch (error50) { + console.error(`Error getting slot ${slotId}:`, error50); + return null; + } +} +async function getAllSlots() { + try { + return fetchAllTransformedSlots(); + } catch (error50) { + console.error("Error getting all slots:", error50); + return []; + } +} +async function getMultipleProductsSlots(productIds) { + try { + if (productIds.length === 0) + return {}; + const slots = await getAllSlotsWithProductsForCache(); + const productIdSet = new Set(productIds); + const result = {}; + for (const productId of productIds) { + result[productId] = []; + } + for (const slot of slots) { + const slotInfo = extractSlotInfo(slot); + for (const productSlot of slot.productSlots) { + const pid2 = productSlot.product.id; + if (productIdSet.has(pid2) && !slot.isCapacityFull) { + result[pid2].push(slotInfo); + } + } + } + return result; + } catch (error50) { + console.error("Error getting products slots:", error50); + return {}; + } +} +var init_slot_store = __esm({ + "src/stores/slot-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_s3_client(); + __name(transformSlotToStoreSlot, "transformSlotToStoreSlot"); + __name(extractSlotInfo, "extractSlotInfo"); + __name(fetchAllTransformedSlots, "fetchAllTransformedSlots"); + __name(initializeSlotStore, "initializeSlotStore"); + __name(getSlotById, "getSlotById"); + __name(getAllSlots, "getAllSlots"); + __name(getMultipleProductsSlots, "getMultipleProductsSlots"); + } +}); + +// src/stores/banner-store.ts +async function initializeBannerStore() { + try { + console.log("Initializing banner store in Redis..."); + const banners = await getAllBannersForCache(); + console.log("Banner store initialized successfully"); + } catch (error50) { + console.error("Error initializing banner store:", error50); + } +} +var init_banner_store = __esm({ + "src/stores/banner-store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dbService(); + init_s3_client(); + __name(initializeBannerStore, "initializeBannerStore"); + } +}); + +// ../../node_modules/@turf/helpers/dist/esm/index.js +function feature(geom, properties, options = {}) { + const feat = { type: "Feature" }; + if (options.id === 0 || options.id) { + feat.id = options.id; + } + if (options.bbox) { + feat.bbox = options.bbox; + } + feat.properties = properties || {}; + feat.geometry = geom; + return feat; +} +function point(coordinates, properties, options = {}) { + if (!coordinates) { + throw new Error("coordinates is required"); + } + if (!Array.isArray(coordinates)) { + throw new Error("coordinates must be an Array"); + } + if (coordinates.length < 2) { + throw new Error("coordinates must be at least 2 numbers long"); + } + if (!isNumber2(coordinates[0]) || !isNumber2(coordinates[1])) { + throw new Error("coordinates must contain numbers"); + } + const geom = { + type: "Point", + coordinates + }; + return feature(geom, properties, options); +} +function polygon(coordinates, properties, options = {}) { + for (const ring of coordinates) { + if (ring.length < 4) { + throw new Error( + "Each LinearRing of a Polygon must have 4 or more Positions." + ); + } + if (ring[ring.length - 1].length !== ring[0].length) { + throw new Error("First and last Position are not equivalent."); + } + for (let j2 = 0; j2 < ring[ring.length - 1].length; j2++) { + if (ring[ring.length - 1][j2] !== ring[0][j2]) { + throw new Error("First and last Position are not equivalent."); + } + } + } + const geom = { + type: "Polygon", + coordinates + }; + return feature(geom, properties, options); +} +function isNumber2(num) { + return !isNaN(num) && num !== null && !Array.isArray(num); +} +var earthRadius, factors; +var init_esm = __esm({ + "../../node_modules/@turf/helpers/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + earthRadius = 63710088e-1; + factors = { + centimeters: earthRadius * 100, + centimetres: earthRadius * 100, + degrees: 360 / (2 * Math.PI), + feet: earthRadius * 3.28084, + inches: earthRadius * 39.37, + kilometers: earthRadius / 1e3, + kilometres: earthRadius / 1e3, + meters: earthRadius, + metres: earthRadius, + miles: earthRadius / 1609.344, + millimeters: earthRadius * 1e3, + millimetres: earthRadius * 1e3, + nauticalmiles: earthRadius / 1852, + radians: 1, + yards: earthRadius * 1.0936 + }; + __name(feature, "feature"); + __name(point, "point"); + __name(polygon, "polygon"); + __name(isNumber2, "isNumber"); + } +}); + +// ../../node_modules/@turf/invariant/dist/esm/index.js +function getCoord(coord) { + if (!coord) { + throw new Error("coord is required"); + } + if (!Array.isArray(coord)) { + if (coord.type === "Feature" && coord.geometry !== null && coord.geometry.type === "Point") { + return [...coord.geometry.coordinates]; + } + if (coord.type === "Point") { + return [...coord.coordinates]; + } + } + if (Array.isArray(coord) && coord.length >= 2 && !Array.isArray(coord[0]) && !Array.isArray(coord[1])) { + return [...coord]; + } + throw new Error("coord must be GeoJSON Point or an Array of numbers"); +} +function getGeom(geojson) { + if (geojson.type === "Feature") { + return geojson.geometry; + } + return geojson; +} +var init_esm2 = __esm({ + "../../node_modules/@turf/invariant/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(getCoord, "getCoord"); + __name(getGeom, "getGeom"); + } +}); + +// ../../node_modules/@turf/meta/dist/esm/index.js +var init_esm3 = __esm({ + "../../node_modules/@turf/meta/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/robust-predicates/esm/util.js +function sum(elen, e2, flen, f2, h2) { + let Q2, Qnew, hh2, bvirt; + let enow = e2[0]; + let fnow = f2[0]; + let eindex = 0; + let findex = 0; + if (fnow > enow === fnow > -enow) { + Q2 = enow; + enow = e2[++eindex]; + } else { + Q2 = fnow; + fnow = f2[++findex]; + } + let hindex = 0; + if (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = enow + Q2; + hh2 = Q2 - (Qnew - enow); + enow = e2[++eindex]; + } else { + Qnew = fnow + Q2; + hh2 = Q2 - (Qnew - fnow); + fnow = f2[++findex]; + } + Q2 = Qnew; + if (hh2 !== 0) { + h2[hindex++] = hh2; + } + while (eindex < elen && findex < flen) { + if (fnow > enow === fnow > -enow) { + Qnew = Q2 + enow; + bvirt = Qnew - Q2; + hh2 = Q2 - (Qnew - bvirt) + (enow - bvirt); + enow = e2[++eindex]; + } else { + Qnew = Q2 + fnow; + bvirt = Qnew - Q2; + hh2 = Q2 - (Qnew - bvirt) + (fnow - bvirt); + fnow = f2[++findex]; + } + Q2 = Qnew; + if (hh2 !== 0) { + h2[hindex++] = hh2; + } + } + } + while (eindex < elen) { + Qnew = Q2 + enow; + bvirt = Qnew - Q2; + hh2 = Q2 - (Qnew - bvirt) + (enow - bvirt); + enow = e2[++eindex]; + Q2 = Qnew; + if (hh2 !== 0) { + h2[hindex++] = hh2; + } + } + while (findex < flen) { + Qnew = Q2 + fnow; + bvirt = Qnew - Q2; + hh2 = Q2 - (Qnew - bvirt) + (fnow - bvirt); + fnow = f2[++findex]; + Q2 = Qnew; + if (hh2 !== 0) { + h2[hindex++] = hh2; + } + } + if (Q2 !== 0 || hindex === 0) { + h2[hindex++] = Q2; + } + return hindex; +} +function estimate(elen, e2) { + let Q2 = e2[0]; + for (let i2 = 1; i2 < elen; i2++) + Q2 += e2[i2]; + return Q2; +} +function vec(n2) { + return new Float64Array(n2); +} +var epsilon, splitter, resulterrbound; +var init_util4 = __esm({ + "../../node_modules/robust-predicates/esm/util.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + epsilon = 11102230246251565e-32; + splitter = 134217729; + resulterrbound = (3 + 8 * epsilon) * epsilon; + __name(sum, "sum"); + __name(estimate, "estimate"); + __name(vec, "vec"); + } +}); + +// ../../node_modules/robust-predicates/esm/orient2d.js +function orient2dadapt(ax2, ay2, bx2, by2, cx2, cy2, detsum) { + let acxtail, acytail, bcxtail, bcytail; + let bvirt, c2, ahi, alo, bhi, blo, _i2, _j, _0, s1, s0, t12, t02, u32; + const acx = ax2 - cx2; + const bcx = bx2 - cx2; + const acy = ay2 - cy2; + const bcy = by2 - cy2; + s1 = acx * bcy; + c2 = splitter * acx; + ahi = c2 - (c2 - acx); + alo = acx - ahi; + c2 = splitter * bcy; + bhi = c2 - (c2 - bcy); + blo = bcy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t12 = acy * bcx; + c2 = splitter * acy; + ahi = c2 - (c2 - acy); + alo = acy - ahi; + c2 = splitter * bcx; + bhi = c2 - (c2 - bcx); + blo = bcx - bhi; + t02 = alo * blo - (t12 - ahi * bhi - alo * bhi - ahi * blo); + _i2 = s0 - t02; + bvirt = s0 - _i2; + B2[0] = s0 - (_i2 + bvirt) + (bvirt - t02); + _j = s1 + _i2; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i2 - bvirt); + _i2 = _0 - t12; + bvirt = _0 - _i2; + B2[1] = _0 - (_i2 + bvirt) + (bvirt - t12); + u32 = _j + _i2; + bvirt = u32 - _j; + B2[2] = _j - (u32 - bvirt) + (_i2 - bvirt); + B2[3] = u32; + let det = estimate(4, B2); + let errbound = ccwerrboundB * detsum; + if (det >= errbound || -det >= errbound) { + return det; + } + bvirt = ax2 - acx; + acxtail = ax2 - (acx + bvirt) + (bvirt - cx2); + bvirt = bx2 - bcx; + bcxtail = bx2 - (bcx + bvirt) + (bvirt - cx2); + bvirt = ay2 - acy; + acytail = ay2 - (acy + bvirt) + (bvirt - cy2); + bvirt = by2 - bcy; + bcytail = by2 - (bcy + bvirt) + (bvirt - cy2); + if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) { + return det; + } + errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det); + det += acx * bcytail + bcy * acxtail - (acy * bcxtail + bcx * acytail); + if (det >= errbound || -det >= errbound) + return det; + s1 = acxtail * bcy; + c2 = splitter * acxtail; + ahi = c2 - (c2 - acxtail); + alo = acxtail - ahi; + c2 = splitter * bcy; + bhi = c2 - (c2 - bcy); + blo = bcy - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t12 = acytail * bcx; + c2 = splitter * acytail; + ahi = c2 - (c2 - acytail); + alo = acytail - ahi; + c2 = splitter * bcx; + bhi = c2 - (c2 - bcx); + blo = bcx - bhi; + t02 = alo * blo - (t12 - ahi * bhi - alo * bhi - ahi * blo); + _i2 = s0 - t02; + bvirt = s0 - _i2; + u2[0] = s0 - (_i2 + bvirt) + (bvirt - t02); + _j = s1 + _i2; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i2 - bvirt); + _i2 = _0 - t12; + bvirt = _0 - _i2; + u2[1] = _0 - (_i2 + bvirt) + (bvirt - t12); + u32 = _j + _i2; + bvirt = u32 - _j; + u2[2] = _j - (u32 - bvirt) + (_i2 - bvirt); + u2[3] = u32; + const C1len = sum(4, B2, 4, u2, C1); + s1 = acx * bcytail; + c2 = splitter * acx; + ahi = c2 - (c2 - acx); + alo = acx - ahi; + c2 = splitter * bcytail; + bhi = c2 - (c2 - bcytail); + blo = bcytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t12 = acy * bcxtail; + c2 = splitter * acy; + ahi = c2 - (c2 - acy); + alo = acy - ahi; + c2 = splitter * bcxtail; + bhi = c2 - (c2 - bcxtail); + blo = bcxtail - bhi; + t02 = alo * blo - (t12 - ahi * bhi - alo * bhi - ahi * blo); + _i2 = s0 - t02; + bvirt = s0 - _i2; + u2[0] = s0 - (_i2 + bvirt) + (bvirt - t02); + _j = s1 + _i2; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i2 - bvirt); + _i2 = _0 - t12; + bvirt = _0 - _i2; + u2[1] = _0 - (_i2 + bvirt) + (bvirt - t12); + u32 = _j + _i2; + bvirt = u32 - _j; + u2[2] = _j - (u32 - bvirt) + (_i2 - bvirt); + u2[3] = u32; + const C2len = sum(C1len, C1, 4, u2, C2); + s1 = acxtail * bcytail; + c2 = splitter * acxtail; + ahi = c2 - (c2 - acxtail); + alo = acxtail - ahi; + c2 = splitter * bcytail; + bhi = c2 - (c2 - bcytail); + blo = bcytail - bhi; + s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo); + t12 = acytail * bcxtail; + c2 = splitter * acytail; + ahi = c2 - (c2 - acytail); + alo = acytail - ahi; + c2 = splitter * bcxtail; + bhi = c2 - (c2 - bcxtail); + blo = bcxtail - bhi; + t02 = alo * blo - (t12 - ahi * bhi - alo * bhi - ahi * blo); + _i2 = s0 - t02; + bvirt = s0 - _i2; + u2[0] = s0 - (_i2 + bvirt) + (bvirt - t02); + _j = s1 + _i2; + bvirt = _j - s1; + _0 = s1 - (_j - bvirt) + (_i2 - bvirt); + _i2 = _0 - t12; + bvirt = _0 - _i2; + u2[1] = _0 - (_i2 + bvirt) + (bvirt - t12); + u32 = _j + _i2; + bvirt = u32 - _j; + u2[2] = _j - (u32 - bvirt) + (_i2 - bvirt); + u2[3] = u32; + const Dlen = sum(C2len, C2, 4, u2, D2); + return D2[Dlen - 1]; +} +function orient2d(ax2, ay2, bx2, by2, cx2, cy2) { + const detleft = (ay2 - cy2) * (bx2 - cx2); + const detright = (ax2 - cx2) * (by2 - cy2); + const det = detleft - detright; + const detsum = Math.abs(detleft + detright); + if (Math.abs(det) >= ccwerrboundA * detsum) + return det; + return -orient2dadapt(ax2, ay2, bx2, by2, cx2, cy2, detsum); +} +var ccwerrboundA, ccwerrboundB, ccwerrboundC, B2, C1, C2, D2, u2; +var init_orient2d = __esm({ + "../../node_modules/robust-predicates/esm/orient2d.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util4(); + ccwerrboundA = (3 + 16 * epsilon) * epsilon; + ccwerrboundB = (2 + 12 * epsilon) * epsilon; + ccwerrboundC = (9 + 64 * epsilon) * epsilon * epsilon; + B2 = vec(4); + C1 = vec(8); + C2 = vec(12); + D2 = vec(16); + u2 = vec(4); + __name(orient2dadapt, "orient2dadapt"); + __name(orient2d, "orient2d"); + } +}); + +// ../../node_modules/robust-predicates/esm/orient3d.js +var o3derrboundA, o3derrboundB, o3derrboundC, bc2, ca2, ab2, at_b, at_c, bt_c, bt_a, ct_a, ct_b, bct, cat, abt, u3, _8, _8b, _16, _12, fin, fin2; +var init_orient3d = __esm({ + "../../node_modules/robust-predicates/esm/orient3d.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util4(); + o3derrboundA = (7 + 56 * epsilon) * epsilon; + o3derrboundB = (3 + 28 * epsilon) * epsilon; + o3derrboundC = (26 + 288 * epsilon) * epsilon * epsilon; + bc2 = vec(4); + ca2 = vec(4); + ab2 = vec(4); + at_b = vec(4); + at_c = vec(4); + bt_c = vec(4); + bt_a = vec(4); + ct_a = vec(4); + ct_b = vec(4); + bct = vec(8); + cat = vec(8); + abt = vec(8); + u3 = vec(4); + _8 = vec(8); + _8b = vec(8); + _16 = vec(8); + _12 = vec(12); + fin = vec(192); + fin2 = vec(192); + } +}); + +// ../../node_modules/robust-predicates/esm/incircle.js +var iccerrboundA, iccerrboundB, iccerrboundC, bc3, ca3, ab3, aa2, bb2, cc2, u4, v2, axtbc, aytbc, bxtca, bytca, cxtab, cytab, abt2, bct2, cat2, abtt, bctt, catt, _82, _162, _16b, _16c, _32, _32b, _48, _64, fin3, fin22; +var init_incircle = __esm({ + "../../node_modules/robust-predicates/esm/incircle.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util4(); + iccerrboundA = (10 + 96 * epsilon) * epsilon; + iccerrboundB = (4 + 48 * epsilon) * epsilon; + iccerrboundC = (44 + 576 * epsilon) * epsilon * epsilon; + bc3 = vec(4); + ca3 = vec(4); + ab3 = vec(4); + aa2 = vec(4); + bb2 = vec(4); + cc2 = vec(4); + u4 = vec(4); + v2 = vec(4); + axtbc = vec(8); + aytbc = vec(8); + bxtca = vec(8); + bytca = vec(8); + cxtab = vec(8); + cytab = vec(8); + abt2 = vec(8); + bct2 = vec(8); + cat2 = vec(8); + abtt = vec(4); + bctt = vec(4); + catt = vec(4); + _82 = vec(8); + _162 = vec(16); + _16b = vec(16); + _16c = vec(16); + _32 = vec(32); + _32b = vec(32); + _48 = vec(48); + _64 = vec(64); + fin3 = vec(1152); + fin22 = vec(1152); + } +}); + +// ../../node_modules/robust-predicates/esm/insphere.js +var isperrboundA, isperrboundB, isperrboundC, ab4, bc4, cd2, de, ea, ac2, bd2, ce2, da, eb, abc, bcd, cde, dea, eab, abd, bce, cda, deb, eac, adet, bdet, cdet, ddet, edet, abdet, cddet, cdedet, deter, _83, _8b2, _8c, _163, _24, _482, _48b, _96, _192, _384x, _384y, _384z, _768, xdet, ydet, zdet, fin4; +var init_insphere = __esm({ + "../../node_modules/robust-predicates/esm/insphere.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_util4(); + isperrboundA = (16 + 224 * epsilon) * epsilon; + isperrboundB = (5 + 72 * epsilon) * epsilon; + isperrboundC = (71 + 1408 * epsilon) * epsilon * epsilon; + ab4 = vec(4); + bc4 = vec(4); + cd2 = vec(4); + de = vec(4); + ea = vec(4); + ac2 = vec(4); + bd2 = vec(4); + ce2 = vec(4); + da = vec(4); + eb = vec(4); + abc = vec(24); + bcd = vec(24); + cde = vec(24); + dea = vec(24); + eab = vec(24); + abd = vec(24); + bce = vec(24); + cda = vec(24); + deb = vec(24); + eac = vec(24); + adet = vec(1152); + bdet = vec(1152); + cdet = vec(1152); + ddet = vec(1152); + edet = vec(1152); + abdet = vec(2304); + cddet = vec(2304); + cdedet = vec(3456); + deter = vec(5760); + _83 = vec(8); + _8b2 = vec(8); + _8c = vec(8); + _163 = vec(16); + _24 = vec(24); + _482 = vec(48); + _48b = vec(48); + _96 = vec(96); + _192 = vec(192); + _384x = vec(384); + _384y = vec(384); + _384z = vec(384); + _768 = vec(768); + xdet = vec(96); + ydet = vec(96); + zdet = vec(96); + fin4 = vec(1152); + } +}); + +// ../../node_modules/robust-predicates/index.js +var init_robust_predicates = __esm({ + "../../node_modules/robust-predicates/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_orient2d(); + init_orient3d(); + init_incircle(); + init_insphere(); + } +}); + +// ../../node_modules/point-in-polygon-hao/dist/esm/index.js +function pointInPolygon(p2, polygon3) { + var i2; + var ii2; + var k2 = 0; + var f2; + var u1; + var v1; + var u22; + var v22; + var currentP; + var nextP; + var x2 = p2[0]; + var y2 = p2[1]; + var numContours = polygon3.length; + for (i2 = 0; i2 < numContours; i2++) { + ii2 = 0; + var contour = polygon3[i2]; + var contourLen = contour.length - 1; + currentP = contour[0]; + if (currentP[0] !== contour[contourLen][0] && currentP[1] !== contour[contourLen][1]) { + throw new Error("First and last coordinates in a ring must be the same"); + } + u1 = currentP[0] - x2; + v1 = currentP[1] - y2; + for (ii2; ii2 < contourLen; ii2++) { + nextP = contour[ii2 + 1]; + u22 = nextP[0] - x2; + v22 = nextP[1] - y2; + if (v1 === 0 && v22 === 0) { + if (u22 <= 0 && u1 >= 0 || u1 <= 0 && u22 >= 0) { + return 0; + } + } else if (v22 >= 0 && v1 <= 0 || v22 <= 0 && v1 >= 0) { + f2 = orient2d(u1, u22, v1, v22, 0, 0); + if (f2 === 0) { + return 0; + } + if (f2 > 0 && v22 > 0 && v1 <= 0 || f2 < 0 && v22 <= 0 && v1 > 0) { + k2++; + } + } + currentP = nextP; + v1 = v22; + u1 = u22; + } + } + if (k2 % 2 === 0) { + return false; + } + return true; +} +var init_esm4 = __esm({ + "../../node_modules/point-in-polygon-hao/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_robust_predicates(); + __name(pointInPolygon, "pointInPolygon"); + } +}); + +// ../../node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +function booleanPointInPolygon(point2, polygon3, options = {}) { + if (!point2) { + throw new Error("point is required"); + } + if (!polygon3) { + throw new Error("polygon is required"); + } + const pt = getCoord(point2); + const geom = getGeom(polygon3); + const type = geom.type; + const bbox = polygon3.bbox; + let polys = geom.coordinates; + if (bbox && inBBox(pt, bbox) === false) { + return false; + } + if (type === "Polygon") { + polys = [polys]; + } + let result = false; + for (var i2 = 0; i2 < polys.length; ++i2) { + const polyResult = pointInPolygon(pt, polys[i2]); + if (polyResult === 0) + return options.ignoreBoundary ? false : true; + else if (polyResult) + result = true; + } + return result; +} +function inBBox(pt, bbox) { + return bbox[0] <= pt[0] && bbox[1] <= pt[1] && bbox[2] >= pt[0] && bbox[3] >= pt[1]; +} +var init_esm5 = __esm({ + "../../node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_esm4(); + init_esm2(); + __name(booleanPointInPolygon, "booleanPointInPolygon"); + __name(inBBox, "inBBox"); + } +}); + +// ../../node_modules/@turf/clone/dist/esm/index.js +var init_esm6 = __esm({ + "../../node_modules/@turf/clone/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/clusters/dist/esm/index.js +var init_esm7 = __esm({ + "../../node_modules/@turf/clusters/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js +var init_esm8 = __esm({ + "../../node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/projection/dist/esm/index.js +var init_esm9 = __esm({ + "../../node_modules/@turf/projection/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/quadrat-analysis/dist/esm/index.js +var init_esm10 = __esm({ + "../../node_modules/@turf/quadrat-analysis/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/random/dist/esm/index.js +var init_esm11 = __esm({ + "../../node_modules/@turf/random/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../node_modules/@turf/turf/dist/esm/index.js +var init_esm12 = __esm({ + "../../node_modules/@turf/turf/dist/esm/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_esm5(); + init_esm6(); + init_esm7(); + init_esm(); + init_esm2(); + init_esm3(); + init_esm8(); + init_esm9(); + init_esm10(); + init_esm11(); + } +}); + +// src/lib/mbnr-geojson.ts +var mbnrGeoJson; +var init_mbnr_geojson = __esm({ + "src/lib/mbnr-geojson.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + mbnrGeoJson = { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + [ + [ + 78.0540565157155, + 16.750355644371382 + ], + [ + 78.02147549424018, + 16.72066473405593 + ], + [ + 78.03026125246384, + 16.71696749930787 + ], + [ + 78.0438058450269, + 16.72191442229257 + ], + [ + 78.01378723066603, + 16.729427120762438 + ], + [ + 78.01192390645633, + 16.767270033080678 + ], + [ + 77.98897480599248, + 16.78383139678816 + ], + [ + 77.98650506846502, + 16.779477610410623 + ], + [ + 77.99211289459566, + 16.764294442899583 + ], + [ + 77.9917733766166, + 16.760247911187193 + ], + [ + 77.9871626670851, + 16.762487176781022 + ], + [ + 77.98216269568468, + 16.762520539253813 + ], + [ + 77.9728079653313, + 16.75895746646411 + ], + [ + 77.97076993211158, + 16.749241850772236 + ], + [ + 77.97290869571145, + 16.714289841456335 + ], + [ + 77.98673742913684, + 16.716189282573396 + ], + [ + 78.00286970994557, + 16.718191131206893 + ], + [ + 78.02757966423519, + 16.720603921728966 + ], + [ + 78.01653780770818, + 16.73184590223127 + ], + [ + 78.0064695230268, + 16.760236966033375 + ], + [ + 78.0148831108591, + 16.760801801995825 + ], + [ + 78.01488756695255, + 16.75827980335133 + ], + [ + 78.0244311364159, + 16.744778942163208 + ], + [ + 78.03342267256608, + 16.760773251410058 + ], + [ + 78.05078586709863, + 16.763902127913653 + ], + [ + 78.0540565157155, + 16.750355644371382 + ] + ] + ], + "type": "Polygon" + } + } + ] + }; + } +}); + +// src/trpc/apis/common-apis/common-trpc-index.ts +async function scaffoldEssentialConsts() { + const consts = await getAllConstValues(); + return { + freeDeliveryThreshold: consts[CONST_KEYS.freeDeliveryThreshold] ?? 200, + deliveryCharge: consts[CONST_KEYS.deliveryCharge] ?? 0, + flashFreeDeliveryThreshold: consts[CONST_KEYS.flashFreeDeliveryThreshold] ?? 500, + flashDeliveryCharge: consts[CONST_KEYS.flashDeliveryCharge] ?? 69, + popularItems: consts[CONST_KEYS.popularItems] ?? "5,3,2,4,1", + versionNum: consts[CONST_KEYS.versionNum] ?? "1.1.0", + playStoreUrl: consts[CONST_KEYS.playStoreUrl] ?? "https://play.google.com/store/apps/details?id=in.freshyo.app", + appStoreUrl: consts[CONST_KEYS.appStoreUrl] ?? "https://apps.apple.com/in/app/freshyo/id6756889077", + webViewHtml: null, + isWebviewClosable: true, + isFlashDeliveryEnabled: consts[CONST_KEYS.isFlashDeliveryEnabled] ?? true, + supportMobile: consts[CONST_KEYS.supportMobile] ?? "", + supportEmail: consts[CONST_KEYS.supportEmail] ?? "", + assetsDomain, + apiCacheKey + }; +} +var polygon2, commonApiRouter; +var init_common_trpc_index = __esm({ + "src/trpc/apis/common-apis/common-trpc-index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_common3(); + init_dbService(); + init_esm12(); + init_zod(); + init_mbnr_geojson(); + init_s3_client(); + init_api_error(); + init_const_store(); + init_const_keys(); + init_env_exporter(); + polygon2 = polygon(mbnrGeoJson.features[0].geometry.coordinates); + __name(scaffoldEssentialConsts, "scaffoldEssentialConsts"); + commonApiRouter = router2({ + product: commonRouter, + getStoresSummary: publicProcedure.query(async () => { + const stores = await getStoresSummary(); + return { + stores + }; + }), + checkLocationInPolygon: publicProcedure.input(external_exports.object({ + lat: external_exports.number().min(-90).max(90), + lng: external_exports.number().min(-180).max(180) + })).query(({ input }) => { + try { + const { lat, lng } = input; + const point2 = point([lng, lat]); + const isInside = booleanPointInPolygon(point2, polygon2); + return { isInside }; + } catch (error50) { + throw new Error("Invalid coordinates or polygon data"); + } + }), + generateUploadUrls: protectedProcedure.input(external_exports.object({ + contextString: external_exports.enum(["review", "review_response", "product_info", "notification", "store", "complaint", "profile", "tags"]), + mimeTypes: external_exports.array(external_exports.string()) + })).mutation(async ({ input }) => { + const { contextString, mimeTypes } = input; + const uploadUrls = []; + const keys = []; + for (const mimeType of mimeTypes) { + let folder; + if (contextString === "review") { + folder = "review-images"; + } else if (contextString === "product_info") { + folder = "product-images"; + } else if (contextString === "store") { + folder = "store-images"; + } else if (contextString === "review_response") { + folder = "review-response-images"; + } else if (contextString === "complaint") { + folder = "complaint-images"; + } else if (contextString === "profile") { + folder = "profile-images"; + } else if (contextString === "tags") { + folder = "tags"; + } else { + folder = ""; + } + const extension = mimeType === "image/jpeg" ? ".jpg" : mimeType === "image/png" ? ".png" : mimeType === "image/gif" ? ".gif" : ".jpg"; + const key = `${folder}/${Date.now()}${extension}`; + try { + const uploadUrl = await generateUploadUrl(key, mimeType); + uploadUrls.push(uploadUrl); + keys.push(key); + } catch (error50) { + console.error("Error generating upload URL:", error50); + throw new ApiError("Failed to generate upload URL", 500); + } + } + return { uploadUrls }; + }), + healthCheck: publicProcedure.query(async () => { + const result = await healthCheck(); + return result; + }), + essentialConsts: publicProcedure.query(async () => { + const response = await scaffoldEssentialConsts(); + return response; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/stores.ts +async function scaffoldStores() { + const storesData = await getStoreSummaries(); + const storesWithDetails = storesData.map((store) => { + const signedImageUrl = store.imageUrl ? scaffoldAssetUrl(store.imageUrl) : null; + const sampleProducts = store.sampleProducts.map((product) => ({ + id: product.id, + name: product.name, + signedImageUrl: product.images && product.images.length > 0 ? scaffoldAssetUrl(product.images[0]) : null + })); + return { + id: store.id, + name: store.name, + description: store.description, + signedImageUrl, + productCount: store.productCount, + sampleProducts + }; + }); + return { + stores: storesWithDetails + }; +} +async function scaffoldStoreWithProducts(storeId) { + const storeDetail = await getStoreDetail(storeId); + if (!storeDetail) { + throw new ApiError("Store not found", 404); + } + const signedImageUrl = storeDetail.store.imageUrl ? scaffoldAssetUrl(storeDetail.store.imageUrl) : null; + const productsWithSignedUrls = storeDetail.products.map((product) => ({ + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + price: product.price, + marketPrice: product.marketPrice, + incrementStep: product.incrementStep, + unit: product.unit, + unitNotation: product.unitNotation, + images: scaffoldAssetUrl(product.images || []), + isOutOfStock: product.isOutOfStock, + productQuantity: product.productQuantity + })); + const tags = await getTagsByStoreId(storeId); + return { + store: { + id: storeDetail.store.id, + name: storeDetail.store.name, + description: storeDetail.store.description, + signedImageUrl + }, + products: productsWithSignedUrls, + tags: tags.map((tag2) => ({ + id: tag2.id, + tagName: tag2.tagName, + tagDescription: tag2.tagDescription, + imageUrl: tag2.imageUrl, + productIds: tag2.productIds + })) + }; +} +var storesRouter; +var init_stores2 = __esm({ + "src/trpc/apis/user-apis/apis/stores.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_s3_client(); + init_api_error(); + init_product_tag_store(); + init_dbService(); + __name(scaffoldStores, "scaffoldStores"); + __name(scaffoldStoreWithProducts, "scaffoldStoreWithProducts"); + storesRouter = router2({ + getStores: publicProcedure.query(async () => { + const response = await scaffoldStores(); + return response; + }), + getStoreWithProducts: publicProcedure.input(external_exports.object({ + storeId: external_exports.number() + })).query(async ({ input }) => { + const { storeId } = input; + const response = await scaffoldStoreWithProducts(storeId); + return response; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/slots.ts +async function getSlotData(slotId) { + const slot = await getSlotById(slotId); + if (!slot) { + return null; + } + const currentTime = /* @__PURE__ */ new Date(); + if ((0, import_dayjs3.default)(slot.freezeTime).isBefore(currentTime)) { + return null; + } + return { + deliveryTime: slot.deliveryTime, + freezeTime: slot.freezeTime, + slotId: slot.id, + products: slot.products.filter((product) => !product.isOutOfStock) + }; +} +async function scaffoldSlotsWithProducts() { + const allSlots = await getAllSlots(); + const currentTime = /* @__PURE__ */ new Date(); + const validSlots = allSlots.filter((slot) => { + return (0, import_dayjs3.default)(slot.freezeTime).isAfter(currentTime) && (0, import_dayjs3.default)(slot.deliveryTime).isAfter(currentTime) && !slot.isCapacityFull; + }).sort((a2, b2) => (0, import_dayjs3.default)(a2.deliveryTime).valueOf() - (0, import_dayjs3.default)(b2.deliveryTime).valueOf()); + const productAvailability = await getProductAvailability(); + return { + slots: validSlots, + productAvailability, + count: validSlots.length + }; +} +var import_dayjs3, slotsRouter; +var init_slots3 = __esm({ + "src/trpc/apis/user-apis/apis/slots.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_slot_store(); + import_dayjs3 = __toESM(require_dayjs_min()); + init_dbService(); + __name(getSlotData, "getSlotData"); + __name(scaffoldSlotsWithProducts, "scaffoldSlotsWithProducts"); + slotsRouter = router2({ + getSlots: publicProcedure.query(async () => { + const slots = await getActiveSlotsList(); + return { + slots, + count: slots.length + }; + }), + getSlotsWithProducts: publicProcedure.query(async () => { + const response = await scaffoldSlotsWithProducts(); + return response; + }), + getSlotById: publicProcedure.input(external_exports.object({ slotId: external_exports.number() })).query(async ({ input }) => { + return await getSlotData(input.slotId); + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/banners.ts +async function scaffoldBanners() { + const banners = await getActiveBanners(); + const bannersWithSignedUrls = banners.map((banner) => ({ + ...banner, + imageUrl: banner.imageUrl ? scaffoldAssetUrl(banner.imageUrl) : banner.imageUrl + })); + return { + banners: bannersWithSignedUrls + }; +} +var bannerRouter; +var init_banners2 = __esm({ + "src/trpc/apis/user-apis/apis/banners.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_s3_client(); + init_dbService(); + __name(scaffoldBanners, "scaffoldBanners"); + bannerRouter = router2({ + getBanners: publicProcedure.query(async () => { + const response = await scaffoldBanners(); + return response; + }) + }); + } +}); + +// ../../packages/shared/types/index.ts +var init_types7 = __esm({ + "../../packages/shared/types/index.ts"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + } +}); + +// ../../packages/shared/index.ts +var CACHE_FILENAMES; +var init_shared4 = __esm({ + "../../packages/shared/index.ts"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_types7(); + CACHE_FILENAMES = { + products: "products.json", + stores: "stores.json", + slots: "slots.json", + essentialConsts: "essential-consts.json", + banners: "banners.json" + }; + } +}); + +// src/lib/retry.ts +async function retryWithExponentialBackoff(fn, maxRetries = 3, delayMs = 1e3) { + let lastError; + for (let attempt = 1; attempt <= maxRetries; attempt++) { + try { + return await fn(); + } catch (error50) { + lastError = error50 instanceof Error ? error50 : new Error(String(error50)); + if (attempt < maxRetries) { + console.log(`Attempt ${attempt} failed, retrying in ${delayMs}ms...`); + await new Promise((resolve) => setTimeout(resolve, delayMs)); + delayMs *= 2; + } + } + } + throw lastError; +} +var init_retry3 = __esm({ + "src/lib/retry.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + __name(retryWithExponentialBackoff, "retryWithExponentialBackoff"); + } +}); + +// src/lib/cloud_cache.ts +function constructCacheUrl(path) { + return `${assetsDomain}${apiCacheKey}/${path}`; +} +async function createAllCacheFiles() { + console.log("Starting creation of all cache files..."); + const [ + productsKey, + essentialConstsKey, + storesKey, + slotsKey, + bannersKey, + individualStoreKeys + ] = await Promise.all([ + createProductsFileInternal(), + createEssentialConstsFileInternal(), + createStoresFileInternal(), + createSlotsFileInternal(), + createBannersFileInternal(), + createAllStoresFilesInternal() + ]); + const urls = [ + constructCacheUrl(CACHE_FILENAMES.products), + constructCacheUrl(CACHE_FILENAMES.essentialConsts), + constructCacheUrl(CACHE_FILENAMES.stores), + constructCacheUrl(CACHE_FILENAMES.slots), + constructCacheUrl(CACHE_FILENAMES.banners), + ...individualStoreKeys.map((_, index) => constructCacheUrl(`stores/${index + 1}.json`)) + ]; + try { + await retryWithExponentialBackoff(() => clearUrlCache(urls)); + console.log(`Cache purged for all ${urls.length} files`); + } catch (error50) { + console.error(`Failed to purge cache for all files after 3 retries`, error50); + } + console.log("All cache files created successfully"); + return { + products: productsKey, + essentialConsts: essentialConstsKey, + stores: storesKey, + slots: slotsKey, + banners: bannersKey, + individualStores: individualStoreKeys + }; +} +async function createProductsFileInternal() { + const productsData = await scaffoldProducts(); + const jsonContent = JSON.stringify(productsData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.products}`); +} +async function createEssentialConstsFileInternal() { + const essentialConstsData = await scaffoldEssentialConsts(); + const jsonContent = JSON.stringify(essentialConstsData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.essentialConsts}`); +} +async function createStoresFileInternal() { + const storesData = await scaffoldStores(); + const jsonContent = JSON.stringify(storesData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.stores}`); +} +async function createSlotsFileInternal() { + const slotsData = await scaffoldSlotsWithProducts(); + const jsonContent = JSON.stringify(slotsData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.slots}`); +} +async function createBannersFileInternal() { + const bannersData = await scaffoldBanners(); + const jsonContent = JSON.stringify(bannersData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + return await imageUploadS3(buffer, "application/json", `${apiCacheKey}/${CACHE_FILENAMES.banners}`); +} +async function createAllStoresFilesInternal() { + const stores = await getStoresSummary(); + const results = []; + for (const store of stores) { + const storeData = await scaffoldStoreWithProducts(store.id); + const jsonContent = JSON.stringify(storeData, null, 2); + const buffer = Buffer.from(jsonContent, "utf-8"); + const s3Key = await imageUploadS3(buffer, "application/json", `${apiCacheKey}/stores/${store.id}.json`); + results.push(s3Key); + } + console.log(`Created ${results.length} store cache files`); + return results; +} +async function clearUrlCache(urls) { + if (!cloudflareApiToken || !cloudflareZoneId) { + console.warn("Cloudflare credentials not configured, skipping cache clear"); + return { success: false, errors: ["Cloudflare credentials not configured"] }; + } + try { + const response = await axios_default.post( + `https://api.cloudflare.com/client/v4/zones/${cloudflareZoneId}/purge_cache`, + { files: urls }, + { + headers: { + "Authorization": `Bearer ${cloudflareApiToken}`, + "Content-Type": "application/json" + } + } + ); + const result = response.data; + if (!result.success) { + const errorMessages = result.errors?.map((e2) => e2.message) || ["Unknown error"]; + console.error(`Cloudflare cache purge failed for URLs: ${urls.join(", ")}`, errorMessages); + return { success: false, errors: errorMessages }; + } + console.log(`Successfully purged ${urls.length} URLs from Cloudflare cache: ${urls.join(", ")}`); + return { success: true }; + } catch (error50) { + console.log(error50); + const errorMessage = error50 instanceof Error ? error50.message : "Unknown error"; + console.error(`Error clearing Cloudflare cache for URLs: ${urls.join(", ")}`, errorMessage); + return { success: false, errors: [errorMessage] }; + } +} +var init_cloud_cache = __esm({ + "src/lib/cloud_cache.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_axios2(); + init_common3(); + init_common_trpc_index(); + init_stores2(); + init_slots3(); + init_banners2(); + init_stores2(); + init_dbService(); + init_s3_client(); + init_env_exporter(); + init_shared4(); + init_retry3(); + __name(constructCacheUrl, "constructCacheUrl"); + __name(createAllCacheFiles, "createAllCacheFiles"); + __name(createProductsFileInternal, "createProductsFileInternal"); + __name(createEssentialConstsFileInternal, "createEssentialConstsFileInternal"); + __name(createStoresFileInternal, "createStoresFileInternal"); + __name(createSlotsFileInternal, "createSlotsFileInternal"); + __name(createBannersFileInternal, "createBannersFileInternal"); + __name(createAllStoresFilesInternal, "createAllStoresFilesInternal"); + __name(clearUrlCache, "clearUrlCache"); + } +}); + +// src/stores/store-initializer.ts +var STORE_INIT_DELAY_MS, storeInitializationTimeout, initializeAllStores, scheduleStoreInitialization; +var init_store_initializer = __esm({ + "src/stores/store-initializer.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_roles_manager(); + init_const_store(); + init_product_store(); + init_product_tag_store(); + init_slot_store(); + init_banner_store(); + init_cloud_cache(); + STORE_INIT_DELAY_MS = 3 * 60 * 1e3; + storeInitializationTimeout = null; + initializeAllStores = /* @__PURE__ */ __name(async () => { + try { + console.log("Starting application stores initialization..."); + await Promise.all([ + roles_manager_default.fetchRoles(), + computeConstants(), + initializeProducts(), + initializeProductTagStore(), + initializeSlotStore(), + initializeBannerStore() + ]); + console.log("All application stores initialized successfully"); + createAllCacheFiles().catch((error50) => { + console.error("Failed to regenerate cache files during store initialization:", error50); + }); + } catch (error50) { + console.error("Application stores initialization failed:", error50); + throw error50; + } + }, "initializeAllStores"); + scheduleStoreInitialization = /* @__PURE__ */ __name(() => { + if (storeInitializationTimeout) { + clearTimeout(storeInitializationTimeout); + storeInitializationTimeout = null; + } + storeInitializationTimeout = setTimeout(() => { + storeInitializationTimeout = null; + initializeAllStores().catch((error50) => { + console.error("Scheduled store initialization failed:", error50); + }); + }, STORE_INIT_DELAY_MS); + }, "scheduleStoreInitialization"); + } +}); + +// src/trpc/apis/admin-apis/apis/slots.ts +var cachedSequenceSchema, createSlotSchema, getSlotByIdSchema, updateSlotSchema, deleteSlotSchema, getDeliverySequenceSchema, updateDeliverySequenceSchema, slotsRouter2; +var init_slots4 = __esm({ + "src/trpc/apis/admin-apis/apis/slots.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_dist3(); + init_zod(); + init_api_error(); + init_env_exporter(); + init_store_initializer(); + init_dbService(); + cachedSequenceSchema = external_exports.record(external_exports.string(), external_exports.array(external_exports.number())); + createSlotSchema = external_exports.object({ + deliveryTime: external_exports.string(), + freezeTime: external_exports.string(), + isActive: external_exports.boolean().optional(), + productIds: external_exports.array(external_exports.number()).optional(), + vendorSnippets: external_exports.array(external_exports.object({ + name: external_exports.string().min(1), + productIds: external_exports.array(external_exports.number().int().positive()).min(1), + validTill: external_exports.string().optional() + })).optional(), + groupIds: external_exports.array(external_exports.number()).optional() + }); + getSlotByIdSchema = external_exports.object({ + id: external_exports.number() + }); + updateSlotSchema = external_exports.object({ + id: external_exports.number(), + deliveryTime: external_exports.string(), + freezeTime: external_exports.string(), + isActive: external_exports.boolean().optional(), + productIds: external_exports.array(external_exports.number()).optional(), + vendorSnippets: external_exports.array(external_exports.object({ + name: external_exports.string().min(1), + productIds: external_exports.array(external_exports.number().int().positive()).min(1), + validTill: external_exports.string().optional() + })).optional(), + groupIds: external_exports.array(external_exports.number()).optional() + }); + deleteSlotSchema = external_exports.object({ + id: external_exports.number() + }); + getDeliverySequenceSchema = external_exports.object({ + id: external_exports.string() + }); + updateDeliverySequenceSchema = external_exports.object({ + id: external_exports.number(), + // deliverySequence: z.array(z.number()), + deliverySequence: external_exports.any() + }); + slotsRouter2 = router2({ + // Exact replica of GET /av/slots + getAll: protectedProcedure.query(async ({ ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const slots = await getActiveSlotsWithProducts(); + return { + slots, + count: slots.length + }; + }), + // Exact replica of POST /av/products/slots/product-ids + getSlotsProductIds: protectedProcedure.input(external_exports.object({ slotIds: external_exports.array(external_exports.number()) })).query(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { slotIds } = input; + if (!Array.isArray(slotIds)) { + throw new TRPCError({ + code: "BAD_REQUEST", + message: "slotIds must be an array" + }); + } + const result = await getSlotsProductIds(slotIds); + return result; + }), + // Exact replica of PUT /av/products/slots/:slotId/products + updateSlotProducts: protectedProcedure.input( + external_exports.object({ + slotId: external_exports.number(), + productIds: external_exports.array(external_exports.number()) + }) + ).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { slotId, productIds } = input; + if (!Array.isArray(productIds)) { + throw new TRPCError({ + code: "BAD_REQUEST", + message: "productIds must be an array" + }); + } + const result = await updateSlotProducts(String(slotId), productIds.map(String)); + scheduleStoreInitialization(); + return { + message: result.message, + added: result.added, + removed: result.removed + }; + }), + createSlot: protectedProcedure.input(createSlotSchema).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input; + if (!deliveryTime || !freezeTime) { + throw new ApiError("Delivery time and orders close time are required", 400); + } + const result = await createSlotWithRelations({ + deliveryTime, + freezeTime, + isActive, + productIds, + vendorSnippets: snippets, + groupIds + }); + scheduleStoreInitialization(); + return result; + }), + getSlots: protectedProcedure.query(async ({ ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const slots = await getActiveSlots(); + return { + slots, + count: slots.length + }; + }), + getSlotById: protectedProcedure.input(getSlotByIdSchema).query(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { id } = input; + const slot = await getSlotByIdWithRelations(id); + if (!slot) { + throw new ApiError("Slot not found", 404); + } + return { + slot: { + ...slot, + vendorSnippets: slot.vendorSnippets.map((snippet) => ({ + ...snippet, + accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}` + })) + } + }; + }), + updateSlot: protectedProcedure.input(updateSlotSchema).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + try { + const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input; + if (!deliveryTime || !freezeTime) { + throw new ApiError("Delivery time and orders close time are required", 400); + } + const result = await updateSlotWithRelations({ + id, + deliveryTime, + freezeTime, + isActive, + productIds, + vendorSnippets: snippets, + groupIds + }); + if (!result) { + throw new ApiError("Slot not found", 404); + } + scheduleStoreInitialization(); + return result; + } catch (e2) { + console.log(e2); + throw new ApiError("Unable to Update Slot"); + } + }), + deleteSlot: protectedProcedure.input(deleteSlotSchema).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { id } = input; + const deletedSlot = await deleteSlotById(id); + if (!deletedSlot) { + throw new ApiError("Slot not found", 404); + } + scheduleStoreInitialization(); + return { + message: "Slot deleted successfully" + }; + }), + getDeliverySequence: protectedProcedure.input(getDeliverySequenceSchema).query(async ({ input, ctx }) => { + const { id } = input; + const slotId = parseInt(id); + const slot = await getSlotDeliverySequence(slotId); + if (!slot) { + throw new ApiError("Slot not found", 404); + } + const sequence = slot.deliverySequence || {}; + return { deliverySequence: sequence }; + }), + updateDeliverySequence: protectedProcedure.input(updateDeliverySequenceSchema).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { id, deliverySequence } = input; + const updatedSlot = await updateSlotDeliverySequence(id, deliverySequence); + if (!updatedSlot) { + throw new ApiError("Slot not found", 404); + } + return { + slot: updatedSlot, + message: "Delivery sequence updated successfully" + }; + }), + updateSlotCapacity: protectedProcedure.input(external_exports.object({ + slotId: external_exports.number(), + isCapacityFull: external_exports.boolean() + })).mutation(async ({ input, ctx }) => { + if (!ctx.staffUser?.id) { + throw new TRPCError({ code: "UNAUTHORIZED", message: "Access denied" }); + } + const { slotId, isCapacityFull } = input; + const result = await updateSlotCapacity(slotId, isCapacityFull); + if (!result) { + throw new ApiError("Slot not found", 404); + } + scheduleStoreInitialization(); + return result; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/product.ts +var productRouter; +var init_product3 = __esm({ + "src/trpc/apis/admin-apis/apis/product.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_s3_client(); + init_store_initializer(); + init_dbService(); + productRouter = router2({ + getProducts: protectedProcedure.query(async () => { + const products = await getAllProducts(); + const productsWithSignedUrls = await Promise.all( + products.map(async (product) => ({ + ...product, + images: await generateSignedUrlsFromS3Urls(product.images || []) + })) + ); + return { + products: productsWithSignedUrls, + count: productsWithSignedUrls.length + }; + }), + getProductById: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).query(async ({ input }) => { + const { id } = input; + const product = await getProductById(id); + if (!product) { + throw new ApiError("Product not found", 404); + } + const productWithSignedUrls = { + ...product, + images: await generateSignedUrlsFromS3Urls(product.images || []) + }; + return { + product: productWithSignedUrls + }; + }), + deleteProduct: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).mutation(async ({ input }) => { + const { id } = input; + const deletedProduct = await deleteProduct(id); + if (!deletedProduct) { + throw new ApiError("Product not found", 404); + } + scheduleStoreInitialization(); + return { + message: "Product deleted successfully" + }; + }), + toggleOutOfStock: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).mutation(async ({ input }) => { + const { id } = input; + const updatedProduct = await toggleProductOutOfStock(id); + if (!updatedProduct) { + throw new ApiError("Product not found", 404); + } + scheduleStoreInitialization(); + return { + product: updatedProduct, + message: `Product marked as ${updatedProduct.isOutOfStock ? "out of stock" : "in stock"}` + }; + }), + createProduct: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + shortDescription: external_exports.string().optional(), + longDescription: external_exports.string().optional(), + unitId: external_exports.number().min(1, "Unit is required"), + storeId: external_exports.number().min(1, "Store is required"), + price: external_exports.number().positive("Price must be positive"), + marketPrice: external_exports.number().optional(), + incrementStep: external_exports.number().optional().default(1), + productQuantity: external_exports.number().optional().default(1), + isSuspended: external_exports.boolean().optional().default(false), + isFlashAvailable: external_exports.boolean().optional().default(false), + flashPrice: external_exports.number().optional(), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]), + deals: external_exports.array(external_exports.object({ + quantity: external_exports.number(), + price: external_exports.number(), + validTill: external_exports.string() + })).optional(), + tagIds: external_exports.array(external_exports.number()).optional().default([]) + })).mutation(async ({ input }) => { + const { name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, uploadUrls, deals, tagIds } = input; + const existingProduct = await checkProductExistsByName(name.trim()); + if (existingProduct) { + throw new ApiError("A product with this name already exists", 400); + } + const unitExists = await checkUnitExists(unitId); + if (!unitExists) { + throw new ApiError("Invalid unit ID", 400); + } + const imageKeys = uploadUrls.map((url2) => extractKeyFromPresignedUrl(url2)); + const newProduct = await createProduct({ + name, + shortDescription, + longDescription, + unitId, + storeId, + price: price.toString(), + marketPrice: marketPrice?.toString(), + incrementStep, + productQuantity, + isSuspended, + isFlashAvailable, + flashPrice: flashPrice?.toString(), + images: imageKeys + }); + let createdDeals = []; + if (deals && deals.length > 0) { + createdDeals = await createSpecialDealsForProduct(newProduct.id, deals); + } + if (tagIds.length > 0) { + await replaceProductTags(newProduct.id, tagIds); + } + if (uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + scheduleStoreInitialization(); + return { + product: newProduct, + deals: createdDeals, + message: "Product created successfully" + }; + }), + updateProduct: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + name: external_exports.string().min(1, "Name is required"), + shortDescription: external_exports.string().optional(), + longDescription: external_exports.string().optional(), + unitId: external_exports.number().min(1, "Unit is required"), + storeId: external_exports.number().min(1, "Store is required"), + price: external_exports.number().positive("Price must be positive"), + marketPrice: external_exports.number().optional(), + incrementStep: external_exports.number().optional().default(1), + productQuantity: external_exports.number().optional().default(1), + isSuspended: external_exports.boolean().optional().default(false), + isFlashAvailable: external_exports.boolean().optional().default(false), + flashPrice: external_exports.number().nullable().optional(), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]), + imagesToDelete: external_exports.array(external_exports.string()).optional().default([]), + deals: external_exports.array(external_exports.object({ + quantity: external_exports.number(), + price: external_exports.number(), + validTill: external_exports.string() + })).optional(), + tagIds: external_exports.array(external_exports.number()).optional().default([]) + })).mutation(async ({ input }) => { + const { id, name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, uploadUrls, imagesToDelete, deals, tagIds } = input; + const unitExists = await checkUnitExists(unitId); + if (!unitExists) { + throw new ApiError("Invalid unit ID", 400); + } + const currentImages = await getProductImagesById(id); + if (!currentImages) { + throw new ApiError("Product not found", 404); + } + let updatedImages = currentImages || []; + if (imagesToDelete.length > 0) { + const imagesToRemove = updatedImages.filter((img) => imagesToDelete.includes(img)); + await deleteImageUtil({ keys: imagesToRemove }); + updatedImages = updatedImages.filter((img) => !imagesToRemove.includes(img)); + } + const newImageKeys = uploadUrls.map((url2) => extractKeyFromPresignedUrl(url2)); + const finalImages = [...updatedImages, ...newImageKeys]; + const updatedProduct = await updateProduct(id, { + name, + shortDescription, + longDescription, + unitId, + storeId, + price: price.toString(), + marketPrice: marketPrice?.toString(), + incrementStep, + productQuantity, + isSuspended, + isFlashAvailable, + flashPrice: flashPrice?.toString() ?? null, + images: finalImages + }); + if (!updatedProduct) { + throw new ApiError("Product not found", 404); + } + if (deals && deals.length > 0) { + await updateProductDeals(id, deals); + } + if (tagIds.length > 0) { + await replaceProductTags(id, tagIds); + } + if (uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + scheduleStoreInitialization(); + return { + product: updatedProduct, + message: "Product updated successfully" + }; + }), + updateSlotProducts: protectedProcedure.input(external_exports.object({ + slotId: external_exports.string(), + productIds: external_exports.array(external_exports.string()) + })).mutation(async ({ input }) => { + const { slotId, productIds } = input; + if (!Array.isArray(productIds)) { + throw new ApiError("productIds must be an array", 400); + } + const result = await updateSlotProducts(slotId, productIds); + scheduleStoreInitialization(); + return { + message: "Slot products updated successfully", + added: result.added, + removed: result.removed + }; + }), + getSlotProductIds: protectedProcedure.input(external_exports.object({ + slotId: external_exports.string() + })).query(async ({ input }) => { + const { slotId } = input; + const productIds = await getSlotProductIds(slotId); + return { + productIds + }; + }), + getSlotsProductIds: protectedProcedure.input(external_exports.object({ + slotIds: external_exports.array(external_exports.number()) + })).query(async ({ input }) => { + const { slotIds } = input; + if (!Array.isArray(slotIds)) { + throw new ApiError("slotIds must be an array", 400); + } + const result = await getSlotsProductIds(slotIds); + return result; + }), + getProductReviews: protectedProcedure.input(external_exports.object({ + productId: external_exports.number().int().positive(), + limit: external_exports.number().int().min(1).max(50).optional().default(10), + offset: external_exports.number().int().min(0).optional().default(0) + })).query(async ({ input }) => { + const { productId, limit, offset } = input; + const { reviews, totalCount } = await getProductReviews(productId, limit, offset); + const reviewsWithSignedUrls = await Promise.all( + reviews.map(async (review) => ({ + ...review, + signedImageUrls: await generateSignedUrlsFromS3Urls(review.imageUrls || []), + signedAdminImageUrls: await generateSignedUrlsFromS3Urls(review.adminResponseImages || []) + })) + ); + const hasMore = offset + limit < totalCount; + return { reviews: reviewsWithSignedUrls, hasMore }; + }), + respondToReview: protectedProcedure.input(external_exports.object({ + reviewId: external_exports.number().int().positive(), + adminResponse: external_exports.string().optional(), + adminResponseImages: external_exports.array(external_exports.string()).optional().default([]), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]) + })).mutation(async ({ input }) => { + const { reviewId, adminResponse, adminResponseImages, uploadUrls } = input; + const updatedReview = await respondToReview(reviewId, adminResponse, adminResponseImages); + if (!updatedReview) { + throw new ApiError("Review not found", 404); + } + if (uploadUrls && uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + return { success: true, review: updatedReview }; + }), + getGroups: protectedProcedure.query(async () => { + const groups = await getAllProductGroups(); + return { + groups: groups.map((group6) => ({ + ...group6, + products: group6.memberships.map((m2) => ({ + ...m2.product, + images: m2.product.images || null + })), + productCount: group6.memberships.length + })) + }; + }), + createGroup: protectedProcedure.input(external_exports.object({ + group_name: external_exports.string().min(1), + description: external_exports.string().optional(), + product_ids: external_exports.array(external_exports.number()).default([]) + })).mutation(async ({ input }) => { + const { group_name, description, product_ids } = input; + const newGroup = await createProductGroup(group_name, description, product_ids); + scheduleStoreInitialization(); + return { + group: newGroup, + message: "Group created successfully" + }; + }), + updateGroup: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + group_name: external_exports.string().optional(), + description: external_exports.string().optional(), + product_ids: external_exports.array(external_exports.number()).optional() + })).mutation(async ({ input }) => { + const { id, group_name, description, product_ids } = input; + const updatedGroup = await updateProductGroup(id, group_name, description, product_ids); + if (!updatedGroup) { + throw new ApiError("Group not found", 404); + } + scheduleStoreInitialization(); + return { + group: updatedGroup, + message: "Group updated successfully" + }; + }), + deleteGroup: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).mutation(async ({ input }) => { + const { id } = input; + const deletedGroup = await deleteProductGroup(id); + if (!deletedGroup) { + throw new ApiError("Group not found", 404); + } + scheduleStoreInitialization(); + return { + message: "Group deleted successfully" + }; + }), + updateProductPrices: protectedProcedure.input(external_exports.object({ + updates: external_exports.array(external_exports.object({ + productId: external_exports.number(), + price: external_exports.number().optional(), + marketPrice: external_exports.number().nullable().optional(), + flashPrice: external_exports.number().nullable().optional(), + isFlashAvailable: external_exports.boolean().optional() + })) + })).mutation(async ({ input }) => { + const { updates } = input; + if (updates.length === 0) { + throw new ApiError("No updates provided", 400); + } + const result = await updateProductPrices(updates); + if (result.invalidIds.length > 0) { + throw new ApiError(`Invalid product IDs: ${result.invalidIds.join(", ")}`, 400); + } + scheduleStoreInitialization(); + return { + message: `Updated prices for ${result.updatedCount} product(s)`, + updatedCount: result.updatedCount + }; + }), + getProductTags: protectedProcedure.query(async () => { + const tags = await getAllProductTagInfos(); + const tagsWithSignedUrls = await Promise.all( + tags.map(async (tag2) => ({ + ...tag2, + imageUrl: tag2.imageUrl ? await generateSignedUrlFromS3Url(tag2.imageUrl) : null + })) + ); + return { + tags: tagsWithSignedUrls, + message: "Tags retrieved successfully" + }; + }), + getProductTagById: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).query(async ({ input }) => { + const tag2 = await getProductTagInfoById(input.id); + if (!tag2) { + throw new ApiError("Tag not found", 404); + } + const tagWithSignedUrl = { + ...tag2, + imageUrl: tag2.imageUrl ? await generateSignedUrlFromS3Url(tag2.imageUrl) : null + }; + return { + tag: tagWithSignedUrl, + message: "Tag retrieved successfully" + }; + }), + createProductTag: protectedProcedure.input(external_exports.object({ + tagName: external_exports.string().min(1, "Tag name is required"), + tagDescription: external_exports.string().optional(), + imageUrl: external_exports.string().optional().nullable(), + isDashboardTag: external_exports.boolean().optional().default(false), + relatedStores: external_exports.array(external_exports.number()).optional().default([]), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]) + })).mutation(async ({ input }) => { + const { tagName, tagDescription, imageUrl, isDashboardTag, relatedStores, uploadUrls } = input; + const existingTag = await checkProductTagExistsByName(tagName.trim()); + if (existingTag) { + throw new ApiError("A tag with this name already exists", 400); + } + const createdTag = await createProductTag({ + tagName: tagName.trim(), + tagDescription, + imageUrl: imageUrl ?? null, + isDashboardTag, + relatedStores + }); + if (uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + scheduleStoreInitialization(); + const { products, ...createdTagInfo } = createdTag; + return { + tag: { + ...createdTagInfo, + imageUrl: createdTagInfo.imageUrl ? await generateSignedUrlFromS3Url(createdTagInfo.imageUrl) : null + }, + message: "Tag created successfully" + }; + }), + updateProductTag: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + tagName: external_exports.string().min(1).optional(), + tagDescription: external_exports.string().optional().nullable(), + imageUrl: external_exports.string().optional().nullable(), + isDashboardTag: external_exports.boolean().optional(), + relatedStores: external_exports.array(external_exports.number()).optional(), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]) + })).mutation(async ({ input }) => { + const { id, tagName, tagDescription, imageUrl, isDashboardTag, relatedStores, uploadUrls } = input; + const currentTag = await getProductTagInfoById(id); + if (!currentTag) { + throw new ApiError("Tag not found", 404); + } + if (imageUrl !== void 0 && imageUrl !== currentTag.imageUrl) { + if (currentTag.imageUrl) { + await deleteImageUtil({ keys: [currentTag.imageUrl] }); + } + } + const updatedTag = await updateProductTag(id, { + tagName: tagName?.trim(), + tagDescription: tagDescription ?? void 0, + imageUrl: imageUrl ?? void 0, + isDashboardTag, + relatedStores + }); + if (uploadUrls.length > 0) { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } + scheduleStoreInitialization(); + const { products, ...updatedTagInfo } = updatedTag; + return { + tag: { + ...updatedTagInfo, + imageUrl: updatedTagInfo.imageUrl ? await generateSignedUrlFromS3Url(updatedTagInfo.imageUrl) : null + }, + message: "Tag updated successfully" + }; + }), + deleteProductTag: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).mutation(async ({ input }) => { + const tag2 = await getProductTagInfoById(input.id); + if (!tag2) { + throw new ApiError("Tag not found", 404); + } + if (tag2.imageUrl) { + await deleteImageUtil({ keys: [tag2.imageUrl] }); + } + await deleteProductTag(input.id); + scheduleStoreInitialization(); + return { message: "Tag deleted successfully" }; + }) + }); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/crypto/web.mjs +var subtle; +var init_web = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/crypto/web.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + subtle = globalThis.crypto?.subtle; + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/crypto/node.mjs +var webcrypto, createCipher, createDecipher, pseudoRandomBytes, createCipheriv, createDecipheriv, createECDH, createSign, createVerify, diffieHellman, getCipherInfo, privateDecrypt, privateEncrypt, publicDecrypt, publicEncrypt, sign2, verify2, hash2, Cipher, Cipheriv, Decipher, Decipheriv, ECDH, Sign, Verify; +var init_node3 = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/crypto/node.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_utils(); + webcrypto = new Proxy(globalThis.crypto, { get(_, key) { + if (key === "CryptoKey") { + return globalThis.CryptoKey; + } + if (typeof globalThis.crypto[key] === "function") { + return globalThis.crypto[key].bind(globalThis.crypto); + } + return globalThis.crypto[key]; + } }); + createCipher = /* @__PURE__ */ notImplemented("crypto.createCipher"); + createDecipher = /* @__PURE__ */ notImplemented("crypto.createDecipher"); + pseudoRandomBytes = /* @__PURE__ */ notImplemented("crypto.pseudoRandomBytes"); + createCipheriv = /* @__PURE__ */ notImplemented("crypto.createCipheriv"); + createDecipheriv = /* @__PURE__ */ notImplemented("crypto.createDecipheriv"); + createECDH = /* @__PURE__ */ notImplemented("crypto.createECDH"); + createSign = /* @__PURE__ */ notImplemented("crypto.createSign"); + createVerify = /* @__PURE__ */ notImplemented("crypto.createVerify"); + diffieHellman = /* @__PURE__ */ notImplemented("crypto.diffieHellman"); + getCipherInfo = /* @__PURE__ */ notImplemented("crypto.getCipherInfo"); + privateDecrypt = /* @__PURE__ */ notImplemented("crypto.privateDecrypt"); + privateEncrypt = /* @__PURE__ */ notImplemented("crypto.privateEncrypt"); + publicDecrypt = /* @__PURE__ */ notImplemented("crypto.publicDecrypt"); + publicEncrypt = /* @__PURE__ */ notImplemented("crypto.publicEncrypt"); + sign2 = /* @__PURE__ */ notImplemented("crypto.sign"); + verify2 = /* @__PURE__ */ notImplemented("crypto.verify"); + hash2 = /* @__PURE__ */ notImplemented("crypto.hash"); + Cipher = /* @__PURE__ */ notImplementedClass("crypto.Cipher"); + Cipheriv = /* @__PURE__ */ notImplementedClass( + "crypto.Cipheriv" + // @ts-expect-error not typed yet + ); + Decipher = /* @__PURE__ */ notImplementedClass("crypto.Decipher"); + Decipheriv = /* @__PURE__ */ notImplementedClass( + "crypto.Decipheriv" + // @ts-expect-error not typed yet + ); + ECDH = /* @__PURE__ */ notImplementedClass("crypto.ECDH"); + Sign = /* @__PURE__ */ notImplementedClass("crypto.Sign"); + Verify = /* @__PURE__ */ notImplementedClass("crypto.Verify"); + } +}); + +// ../../node_modules/unenv/dist/runtime/node/internal/crypto/constants.mjs +var SSL_OP_ALL, SSL_OP_ALLOW_NO_DHE_KEX, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION, SSL_OP_CIPHER_SERVER_PREFERENCE, SSL_OP_CISCO_ANYCONNECT, SSL_OP_COOKIE_EXCHANGE, SSL_OP_CRYPTOPRO_TLSEXT_BUG, SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS, SSL_OP_LEGACY_SERVER_CONNECT, SSL_OP_NO_COMPRESSION, SSL_OP_NO_ENCRYPT_THEN_MAC, SSL_OP_NO_QUERY_MTU, SSL_OP_NO_RENEGOTIATION, SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION, SSL_OP_NO_SSLv2, SSL_OP_NO_SSLv3, SSL_OP_NO_TICKET, SSL_OP_NO_TLSv1, SSL_OP_NO_TLSv1_1, SSL_OP_NO_TLSv1_2, SSL_OP_NO_TLSv1_3, SSL_OP_PRIORITIZE_CHACHA, SSL_OP_TLS_ROLLBACK_BUG, ENGINE_METHOD_RSA, ENGINE_METHOD_DSA, ENGINE_METHOD_DH, ENGINE_METHOD_RAND, ENGINE_METHOD_EC, ENGINE_METHOD_CIPHERS, ENGINE_METHOD_DIGESTS, ENGINE_METHOD_PKEY_METHS, ENGINE_METHOD_PKEY_ASN1_METHS, ENGINE_METHOD_ALL, ENGINE_METHOD_NONE, DH_CHECK_P_NOT_SAFE_PRIME, DH_CHECK_P_NOT_PRIME, DH_UNABLE_TO_CHECK_GENERATOR, DH_NOT_SUITABLE_GENERATOR, RSA_PKCS1_PADDING, RSA_NO_PADDING, RSA_PKCS1_OAEP_PADDING, RSA_X931_PADDING, RSA_PKCS1_PSS_PADDING, RSA_PSS_SALTLEN_DIGEST, RSA_PSS_SALTLEN_MAX_SIGN, RSA_PSS_SALTLEN_AUTO, POINT_CONVERSION_COMPRESSED, POINT_CONVERSION_UNCOMPRESSED, POINT_CONVERSION_HYBRID, defaultCoreCipherList, defaultCipherList, OPENSSL_VERSION_NUMBER, TLS1_VERSION, TLS1_1_VERSION, TLS1_2_VERSION, TLS1_3_VERSION; +var init_constants16 = __esm({ + "../../node_modules/unenv/dist/runtime/node/internal/crypto/constants.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + SSL_OP_ALL = 2147485776; + 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_LEGACY_SERVER_CONNECT = 4; + 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_PRIORITIZE_CHACHA = 2097152; + 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; + RSA_PKCS1_PADDING = 1; + 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; + POINT_CONVERSION_COMPRESSED = 2; + POINT_CONVERSION_UNCOMPRESSED = 4; + POINT_CONVERSION_HYBRID = 6; + defaultCoreCipherList = ""; + defaultCipherList = ""; + OPENSSL_VERSION_NUMBER = 0; + TLS1_VERSION = 0; + TLS1_1_VERSION = 0; + TLS1_2_VERSION = 0; + TLS1_3_VERSION = 0; + } +}); + +// ../../node_modules/unenv/dist/runtime/node/crypto.mjs +var constants; +var init_crypto2 = __esm({ + "../../node_modules/unenv/dist/runtime/node/crypto.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_constants16(); + init_web(); + init_node3(); + constants = { + OPENSSL_VERSION_NUMBER, + SSL_OP_ALL, + SSL_OP_ALLOW_NO_DHE_KEX, + SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION, + SSL_OP_CIPHER_SERVER_PREFERENCE, + SSL_OP_CISCO_ANYCONNECT, + SSL_OP_COOKIE_EXCHANGE, + SSL_OP_CRYPTOPRO_TLSEXT_BUG, + SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS, + SSL_OP_LEGACY_SERVER_CONNECT, + SSL_OP_NO_COMPRESSION, + SSL_OP_NO_ENCRYPT_THEN_MAC, + SSL_OP_NO_QUERY_MTU, + SSL_OP_NO_RENEGOTIATION, + SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION, + SSL_OP_NO_SSLv2, + SSL_OP_NO_SSLv3, + SSL_OP_NO_TICKET, + SSL_OP_NO_TLSv1, + SSL_OP_NO_TLSv1_1, + SSL_OP_NO_TLSv1_2, + SSL_OP_NO_TLSv1_3, + SSL_OP_PRIORITIZE_CHACHA, + SSL_OP_TLS_ROLLBACK_BUG, + ENGINE_METHOD_RSA, + ENGINE_METHOD_DSA, + ENGINE_METHOD_DH, + ENGINE_METHOD_RAND, + ENGINE_METHOD_EC, + ENGINE_METHOD_CIPHERS, + ENGINE_METHOD_DIGESTS, + ENGINE_METHOD_PKEY_METHS, + ENGINE_METHOD_PKEY_ASN1_METHS, + ENGINE_METHOD_ALL, + ENGINE_METHOD_NONE, + DH_CHECK_P_NOT_SAFE_PRIME, + DH_CHECK_P_NOT_PRIME, + DH_UNABLE_TO_CHECK_GENERATOR, + DH_NOT_SUITABLE_GENERATOR, + RSA_PKCS1_PADDING, + RSA_NO_PADDING, + RSA_PKCS1_OAEP_PADDING, + RSA_X931_PADDING, + RSA_PKCS1_PSS_PADDING, + RSA_PSS_SALTLEN_DIGEST, + RSA_PSS_SALTLEN_MAX_SIGN, + RSA_PSS_SALTLEN_AUTO, + defaultCoreCipherList, + TLS1_VERSION, + TLS1_1_VERSION, + TLS1_2_VERSION, + TLS1_3_VERSION, + POINT_CONVERSION_COMPRESSED, + POINT_CONVERSION_UNCOMPRESSED, + POINT_CONVERSION_HYBRID, + defaultCipherList + }; + } +}); + +// ../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.mjs +var workerdCrypto, Certificate, DiffieHellman, DiffieHellmanGroup, Hash, Hmac, KeyObject, X509Certificate, checkPrime, checkPrimeSync, createDiffieHellman, createDiffieHellmanGroup, createHash, createHmac, createPrivateKey, createPublicKey, createSecretKey, generateKey, generateKeyPair, generateKeyPairSync, generateKeySync, generatePrime, generatePrimeSync, getCiphers, getCurves, getDiffieHellman, getFips, getHashes, hkdf, hkdfSync, pbkdf2, pbkdf2Sync, randomBytes, randomFill, randomFillSync, randomInt, randomUUID2, scrypt, scryptSync, secureHeapUsed, setEngine, setFips, subtle2, timingSafeEqual, getRandomValues, webcrypto2, fips, crypto_default; +var init_crypto3 = __esm({ + "../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.mjs"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_crypto2(); + workerdCrypto = process.getBuiltinModule("node:crypto"); + ({ + Certificate, + DiffieHellman, + DiffieHellmanGroup, + Hash, + Hmac, + KeyObject, + X509Certificate, + checkPrime, + checkPrimeSync, + createDiffieHellman, + createDiffieHellmanGroup, + createHash, + createHmac, + createPrivateKey, + createPublicKey, + createSecretKey, + generateKey, + generateKeyPair, + generateKeyPairSync, + generateKeySync, + generatePrime, + generatePrimeSync, + getCiphers, + getCurves, + getDiffieHellman, + getFips, + getHashes, + hkdf, + hkdfSync, + pbkdf2, + pbkdf2Sync, + randomBytes, + randomFill, + randomFillSync, + randomInt, + randomUUID: randomUUID2, + scrypt, + scryptSync, + secureHeapUsed, + setEngine, + setFips, + subtle: subtle2, + timingSafeEqual + } = workerdCrypto); + getRandomValues = workerdCrypto.getRandomValues.bind( + workerdCrypto.webcrypto + ); + webcrypto2 = { + // @ts-expect-error unenv has unknown type + CryptoKey: webcrypto.CryptoKey, + getRandomValues, + randomUUID: randomUUID2, + subtle: subtle2 + }; + fips = workerdCrypto.fips; + crypto_default = { + /** + * manually unroll unenv-polyfilled-symbols to make it tree-shakeable + */ + Certificate, + Cipher, + Cipheriv, + Decipher, + Decipheriv, + ECDH, + Sign, + Verify, + X509Certificate, + // @ts-expect-error @types/node is out of date - this is a bug in typings + constants, + // @ts-expect-error unenv has unknown type + createCipheriv, + // @ts-expect-error unenv has unknown type + createDecipheriv, + // @ts-expect-error unenv has unknown type + createECDH, + // @ts-expect-error unenv has unknown type + createSign, + // @ts-expect-error unenv has unknown type + createVerify, + // @ts-expect-error unenv has unknown type + diffieHellman, + // @ts-expect-error unenv has unknown type + getCipherInfo, + // @ts-expect-error unenv has unknown type + hash: hash2, + // @ts-expect-error unenv has unknown type + privateDecrypt, + // @ts-expect-error unenv has unknown type + privateEncrypt, + // @ts-expect-error unenv has unknown type + publicDecrypt, + // @ts-expect-error unenv has unknown type + publicEncrypt, + scrypt, + scryptSync, + // @ts-expect-error unenv has unknown type + sign: sign2, + // @ts-expect-error unenv has unknown type + verify: verify2, + // default-only export from unenv + // @ts-expect-error unenv has unknown type + createCipher, + // @ts-expect-error unenv has unknown type + createDecipher, + // @ts-expect-error unenv has unknown type + pseudoRandomBytes, + /** + * manually unroll workerd-polyfilled-symbols to make it tree-shakeable + */ + DiffieHellman, + DiffieHellmanGroup, + Hash, + Hmac, + KeyObject, + checkPrime, + checkPrimeSync, + createDiffieHellman, + createDiffieHellmanGroup, + createHash, + createHmac, + createPrivateKey, + createPublicKey, + createSecretKey, + generateKey, + generateKeyPair, + generateKeyPairSync, + generateKeySync, + generatePrime, + generatePrimeSync, + getCiphers, + getCurves, + getDiffieHellman, + getFips, + getHashes, + getRandomValues, + hkdf, + hkdfSync, + pbkdf2, + pbkdf2Sync, + randomBytes, + randomFill, + randomFillSync, + randomInt, + randomUUID: randomUUID2, + secureHeapUsed, + setEngine, + setFips, + subtle: subtle2, + timingSafeEqual, + // default-only export from workerd + fips, + // special-cased deep merged symbols + webcrypto: webcrypto2 + }; + } +}); + +// ../../node_modules/bcryptjs/index.js +function randomBytes2(len) { + try { + return crypto.getRandomValues(new Uint8Array(len)); + } catch { + } + try { + return crypto_default.randomBytes(len); + } catch { + } + if (!randomFallback) { + throw Error( + "Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative" + ); + } + return randomFallback(len); +} +function setRandomFallback(random) { + randomFallback = random; +} +function genSaltSync(rounds, seed_length) { + rounds = rounds || GENSALT_DEFAULT_LOG2_ROUNDS; + if (typeof rounds !== "number") + throw Error( + "Illegal arguments: " + typeof rounds + ", " + typeof seed_length + ); + if (rounds < 4) + rounds = 4; + else if (rounds > 31) + rounds = 31; + var salt = []; + salt.push("$2b$"); + if (rounds < 10) + salt.push("0"); + salt.push(rounds.toString()); + salt.push("$"); + salt.push(base64_encode(randomBytes2(BCRYPT_SALT_LEN), BCRYPT_SALT_LEN)); + return salt.join(""); +} +function genSalt(rounds, seed_length, callback) { + if (typeof seed_length === "function") + callback = seed_length, seed_length = void 0; + if (typeof rounds === "function") + callback = rounds, rounds = void 0; + if (typeof rounds === "undefined") + rounds = GENSALT_DEFAULT_LOG2_ROUNDS; + else if (typeof rounds !== "number") + throw Error("illegal arguments: " + typeof rounds); + function _async(callback2) { + nextTick2(function() { + try { + callback2(null, genSaltSync(rounds)); + } catch (err) { + callback2(err); + } + }); + } + __name(_async, "_async"); + if (callback) { + if (typeof callback !== "function") + throw Error("Illegal callback: " + typeof callback); + _async(callback); + } else + return new Promise(function(resolve, reject) { + _async(function(err, res) { + if (err) { + reject(err); + return; + } + resolve(res); + }); + }); +} +function hashSync(password, salt) { + if (typeof salt === "undefined") + salt = GENSALT_DEFAULT_LOG2_ROUNDS; + if (typeof salt === "number") + salt = genSaltSync(salt); + if (typeof password !== "string" || typeof salt !== "string") + throw Error("Illegal arguments: " + typeof password + ", " + typeof salt); + return _hash(password, salt); +} +function hash3(password, salt, callback, progressCallback) { + function _async(callback2) { + if (typeof password === "string" && typeof salt === "number") + genSalt(salt, function(err, salt2) { + _hash(password, salt2, callback2, progressCallback); + }); + else if (typeof password === "string" && typeof salt === "string") + _hash(password, salt, callback2, progressCallback); + else + nextTick2( + callback2.bind( + this, + Error("Illegal arguments: " + typeof password + ", " + typeof salt) + ) + ); + } + __name(_async, "_async"); + if (callback) { + if (typeof callback !== "function") + throw Error("Illegal callback: " + typeof callback); + _async(callback); + } else + return new Promise(function(resolve, reject) { + _async(function(err, res) { + if (err) { + reject(err); + return; + } + resolve(res); + }); + }); +} +function safeStringCompare(known, unknown2) { + var diff = known.length ^ unknown2.length; + for (var i2 = 0; i2 < known.length; ++i2) { + diff |= known.charCodeAt(i2) ^ unknown2.charCodeAt(i2); + } + return diff === 0; +} +function compareSync(password, hash4) { + if (typeof password !== "string" || typeof hash4 !== "string") + throw Error("Illegal arguments: " + typeof password + ", " + typeof hash4); + if (hash4.length !== 60) + return false; + return safeStringCompare( + hashSync(password, hash4.substring(0, hash4.length - 31)), + hash4 + ); +} +function compare(password, hashValue, callback, progressCallback) { + function _async(callback2) { + if (typeof password !== "string" || typeof hashValue !== "string") { + nextTick2( + callback2.bind( + this, + Error( + "Illegal arguments: " + typeof password + ", " + typeof hashValue + ) + ) + ); + return; + } + if (hashValue.length !== 60) { + nextTick2(callback2.bind(this, null, false)); + return; + } + hash3( + password, + hashValue.substring(0, 29), + function(err, comp) { + if (err) + callback2(err); + else + callback2(null, safeStringCompare(comp, hashValue)); + }, + progressCallback + ); + } + __name(_async, "_async"); + if (callback) { + if (typeof callback !== "function") + throw Error("Illegal callback: " + typeof callback); + _async(callback); + } else + return new Promise(function(resolve, reject) { + _async(function(err, res) { + if (err) { + reject(err); + return; + } + resolve(res); + }); + }); +} +function getRounds(hash4) { + if (typeof hash4 !== "string") + throw Error("Illegal arguments: " + typeof hash4); + return parseInt(hash4.split("$")[2], 10); +} +function getSalt(hash4) { + if (typeof hash4 !== "string") + throw Error("Illegal arguments: " + typeof hash4); + if (hash4.length !== 60) + throw Error("Illegal hash length: " + hash4.length + " != 60"); + return hash4.substring(0, 29); +} +function truncates(password) { + if (typeof password !== "string") + throw Error("Illegal arguments: " + typeof password); + return utf8Length(password) > 72; +} +function utf8Length(string4) { + var len = 0, c2 = 0; + for (var i2 = 0; i2 < string4.length; ++i2) { + c2 = string4.charCodeAt(i2); + if (c2 < 128) + len += 1; + else if (c2 < 2048) + len += 2; + else if ((c2 & 64512) === 55296 && (string4.charCodeAt(i2 + 1) & 64512) === 56320) { + ++i2; + len += 4; + } else + len += 3; + } + return len; +} +function utf8Array(string4) { + var offset = 0, c1, c2; + var buffer = new Array(utf8Length(string4)); + for (var i2 = 0, k2 = string4.length; i2 < k2; ++i2) { + c1 = string4.charCodeAt(i2); + if (c1 < 128) { + buffer[offset++] = c1; + } else if (c1 < 2048) { + buffer[offset++] = c1 >> 6 | 192; + buffer[offset++] = c1 & 63 | 128; + } else if ((c1 & 64512) === 55296 && ((c2 = string4.charCodeAt(i2 + 1)) & 64512) === 56320) { + c1 = 65536 + ((c1 & 1023) << 10) + (c2 & 1023); + ++i2; + buffer[offset++] = c1 >> 18 | 240; + buffer[offset++] = c1 >> 12 & 63 | 128; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } else { + buffer[offset++] = c1 >> 12 | 224; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } + } + return buffer; +} +function base64_encode(b2, len) { + var off2 = 0, rs = [], c1, c2; + if (len <= 0 || len > b2.length) + throw Error("Illegal len: " + len); + while (off2 < len) { + c1 = b2[off2++] & 255; + rs.push(BASE64_CODE[c1 >> 2 & 63]); + c1 = (c1 & 3) << 4; + if (off2 >= len) { + rs.push(BASE64_CODE[c1 & 63]); + break; + } + c2 = b2[off2++] & 255; + c1 |= c2 >> 4 & 15; + rs.push(BASE64_CODE[c1 & 63]); + c1 = (c2 & 15) << 2; + if (off2 >= len) { + rs.push(BASE64_CODE[c1 & 63]); + break; + } + c2 = b2[off2++] & 255; + c1 |= c2 >> 6 & 3; + rs.push(BASE64_CODE[c1 & 63]); + rs.push(BASE64_CODE[c2 & 63]); + } + return rs.join(""); +} +function base64_decode(s2, len) { + var off2 = 0, slen = s2.length, olen = 0, rs = [], c1, c2, c3, c4, o2, code; + if (len <= 0) + throw Error("Illegal len: " + len); + while (off2 < slen - 1 && olen < len) { + code = s2.charCodeAt(off2++); + c1 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + code = s2.charCodeAt(off2++); + c2 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + if (c1 == -1 || c2 == -1) + break; + o2 = c1 << 2 >>> 0; + o2 |= (c2 & 48) >> 4; + rs.push(String.fromCharCode(o2)); + if (++olen >= len || off2 >= slen) + break; + code = s2.charCodeAt(off2++); + c3 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + if (c3 == -1) + break; + o2 = (c2 & 15) << 4 >>> 0; + o2 |= (c3 & 60) >> 2; + rs.push(String.fromCharCode(o2)); + if (++olen >= len || off2 >= slen) + break; + code = s2.charCodeAt(off2++); + c4 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + o2 = (c3 & 3) << 6 >>> 0; + o2 |= c4; + rs.push(String.fromCharCode(o2)); + ++olen; + } + var res = []; + for (off2 = 0; off2 < olen; off2++) + res.push(rs[off2].charCodeAt(0)); + return res; +} +function _encipher(lr, off2, P2, S2) { + var n2, l2 = lr[off2], r2 = lr[off2 + 1]; + l2 ^= P2[0]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[1]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[2]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[3]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[4]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[5]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[6]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[7]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[8]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[9]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[10]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[11]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[12]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[13]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[14]; + n2 = S2[l2 >>> 24]; + n2 += S2[256 | l2 >> 16 & 255]; + n2 ^= S2[512 | l2 >> 8 & 255]; + n2 += S2[768 | l2 & 255]; + r2 ^= n2 ^ P2[15]; + n2 = S2[r2 >>> 24]; + n2 += S2[256 | r2 >> 16 & 255]; + n2 ^= S2[512 | r2 >> 8 & 255]; + n2 += S2[768 | r2 & 255]; + l2 ^= n2 ^ P2[16]; + lr[off2] = r2 ^ P2[BLOWFISH_NUM_ROUNDS + 1]; + lr[off2 + 1] = l2; + return lr; +} +function _streamtoword(data, offp) { + for (var i2 = 0, word = 0; i2 < 4; ++i2) + word = word << 8 | data[offp] & 255, offp = (offp + 1) % data.length; + return { key: word, offp }; +} +function _key(key, P2, S2) { + var offset = 0, lr = [0, 0], plen = P2.length, slen = S2.length, sw; + for (var i2 = 0; i2 < plen; i2++) + sw = _streamtoword(key, offset), offset = sw.offp, P2[i2] = P2[i2] ^ sw.key; + for (i2 = 0; i2 < plen; i2 += 2) + lr = _encipher(lr, 0, P2, S2), P2[i2] = lr[0], P2[i2 + 1] = lr[1]; + for (i2 = 0; i2 < slen; i2 += 2) + lr = _encipher(lr, 0, P2, S2), S2[i2] = lr[0], S2[i2 + 1] = lr[1]; +} +function _ekskey(data, key, P2, S2) { + var offp = 0, lr = [0, 0], plen = P2.length, slen = S2.length, sw; + for (var i2 = 0; i2 < plen; i2++) + sw = _streamtoword(key, offp), offp = sw.offp, P2[i2] = P2[i2] ^ sw.key; + offp = 0; + for (i2 = 0; i2 < plen; i2 += 2) + sw = _streamtoword(data, offp), offp = sw.offp, lr[0] ^= sw.key, sw = _streamtoword(data, offp), offp = sw.offp, lr[1] ^= sw.key, lr = _encipher(lr, 0, P2, S2), P2[i2] = lr[0], P2[i2 + 1] = lr[1]; + for (i2 = 0; i2 < slen; i2 += 2) + sw = _streamtoword(data, offp), offp = sw.offp, lr[0] ^= sw.key, sw = _streamtoword(data, offp), offp = sw.offp, lr[1] ^= sw.key, lr = _encipher(lr, 0, P2, S2), S2[i2] = lr[0], S2[i2 + 1] = lr[1]; +} +function _crypt(b2, salt, rounds, callback, progressCallback) { + var cdata = C_ORIG.slice(), clen = cdata.length, err; + if (rounds < 4 || rounds > 31) { + err = Error("Illegal number of rounds (4-31): " + rounds); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + if (salt.length !== BCRYPT_SALT_LEN) { + err = Error( + "Illegal salt length: " + salt.length + " != " + BCRYPT_SALT_LEN + ); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + rounds = 1 << rounds >>> 0; + var P2, S2, i2 = 0, j2; + if (typeof Int32Array === "function") { + P2 = new Int32Array(P_ORIG); + S2 = new Int32Array(S_ORIG); + } else { + P2 = P_ORIG.slice(); + S2 = S_ORIG.slice(); + } + _ekskey(salt, b2, P2, S2); + function next() { + if (progressCallback) + progressCallback(i2 / rounds); + if (i2 < rounds) { + var start = Date.now(); + for (; i2 < rounds; ) { + i2 = i2 + 1; + _key(b2, P2, S2); + _key(salt, P2, S2); + if (Date.now() - start > MAX_EXECUTION_TIME) + break; + } + } else { + for (i2 = 0; i2 < 64; i2++) + for (j2 = 0; j2 < clen >> 1; j2++) + _encipher(cdata, j2 << 1, P2, S2); + var ret = []; + for (i2 = 0; i2 < clen; i2++) + ret.push((cdata[i2] >> 24 & 255) >>> 0), ret.push((cdata[i2] >> 16 & 255) >>> 0), ret.push((cdata[i2] >> 8 & 255) >>> 0), ret.push((cdata[i2] & 255) >>> 0); + if (callback) { + callback(null, ret); + return; + } else + return ret; + } + if (callback) + nextTick2(next); + } + __name(next, "next"); + if (typeof callback !== "undefined") { + next(); + } else { + var res; + while (true) + if (typeof (res = next()) !== "undefined") + return res || []; + } +} +function _hash(password, salt, callback, progressCallback) { + var err; + if (typeof password !== "string" || typeof salt !== "string") { + err = Error("Invalid string / salt: Not a string"); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + var minor, offset; + if (salt.charAt(0) !== "$" || salt.charAt(1) !== "2") { + err = Error("Invalid salt version: " + salt.substring(0, 2)); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + if (salt.charAt(2) === "$") + minor = String.fromCharCode(0), offset = 3; + else { + minor = salt.charAt(2); + if (minor !== "a" && minor !== "b" && minor !== "y" || salt.charAt(3) !== "$") { + err = Error("Invalid salt revision: " + salt.substring(2, 4)); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + offset = 4; + } + if (salt.charAt(offset + 2) > "$") { + err = Error("Missing salt rounds"); + if (callback) { + nextTick2(callback.bind(this, err)); + return; + } else + throw err; + } + var r1 = parseInt(salt.substring(offset, offset + 1), 10) * 10, r2 = parseInt(salt.substring(offset + 1, offset + 2), 10), rounds = r1 + r2, real_salt = salt.substring(offset + 3, offset + 25); + password += minor >= "a" ? "\0" : ""; + var passwordb = utf8Array(password), saltb = base64_decode(real_salt, BCRYPT_SALT_LEN); + function finish(bytes) { + var res = []; + res.push("$2"); + if (minor >= "a") + res.push(minor); + res.push("$"); + if (rounds < 10) + res.push("0"); + res.push(rounds.toString()); + res.push("$"); + res.push(base64_encode(saltb, saltb.length)); + res.push(base64_encode(bytes, C_ORIG.length * 4 - 1)); + return res.join(""); + } + __name(finish, "finish"); + if (typeof callback == "undefined") + return finish(_crypt(passwordb, saltb, rounds)); + else { + _crypt( + passwordb, + saltb, + rounds, + function(err2, bytes) { + if (err2) + callback(err2, null); + else + callback(null, finish(bytes)); + }, + progressCallback + ); + } +} +function encodeBase642(bytes, length) { + return base64_encode(bytes, length); +} +function decodeBase642(string4, length) { + return base64_decode(string4, length); +} +var randomFallback, nextTick2, BASE64_CODE, BASE64_INDEX, BCRYPT_SALT_LEN, GENSALT_DEFAULT_LOG2_ROUNDS, BLOWFISH_NUM_ROUNDS, MAX_EXECUTION_TIME, P_ORIG, S_ORIG, C_ORIG, bcryptjs_default; +var init_bcryptjs = __esm({ + "../../node_modules/bcryptjs/index.js"() { + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_crypto3(); + randomFallback = null; + __name(randomBytes2, "randomBytes"); + __name(setRandomFallback, "setRandomFallback"); + __name(genSaltSync, "genSaltSync"); + __name(genSalt, "genSalt"); + __name(hashSync, "hashSync"); + __name(hash3, "hash"); + __name(safeStringCompare, "safeStringCompare"); + __name(compareSync, "compareSync"); + __name(compare, "compare"); + __name(getRounds, "getRounds"); + __name(getSalt, "getSalt"); + __name(truncates, "truncates"); + nextTick2 = typeof setImmediate === "function" ? setImmediate : typeof scheduler === "object" && typeof scheduler.postTask === "function" ? scheduler.postTask.bind(scheduler) : setTimeout; + __name(utf8Length, "utf8Length"); + __name(utf8Array, "utf8Array"); + BASE64_CODE = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""); + BASE64_INDEX = [ + -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, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + -1, + -1, + -1, + -1, + -1, + -1, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + -1, + -1, + -1, + -1, + -1 + ]; + __name(base64_encode, "base64_encode"); + __name(base64_decode, "base64_decode"); + BCRYPT_SALT_LEN = 16; + GENSALT_DEFAULT_LOG2_ROUNDS = 10; + BLOWFISH_NUM_ROUNDS = 16; + MAX_EXECUTION_TIME = 100; + P_ORIG = [ + 608135816, + 2242054355, + 320440878, + 57701188, + 2752067618, + 698298832, + 137296536, + 3964562569, + 1160258022, + 953160567, + 3193202383, + 887688300, + 3232508343, + 3380367581, + 1065670069, + 3041331479, + 2450970073, + 2306472731 + ]; + S_ORIG = [ + 3509652390, + 2564797868, + 805139163, + 3491422135, + 3101798381, + 1780907670, + 3128725573, + 4046225305, + 614570311, + 3012652279, + 134345442, + 2240740374, + 1667834072, + 1901547113, + 2757295779, + 4103290238, + 227898511, + 1921955416, + 1904987480, + 2182433518, + 2069144605, + 3260701109, + 2620446009, + 720527379, + 3318853667, + 677414384, + 3393288472, + 3101374703, + 2390351024, + 1614419982, + 1822297739, + 2954791486, + 3608508353, + 3174124327, + 2024746970, + 1432378464, + 3864339955, + 2857741204, + 1464375394, + 1676153920, + 1439316330, + 715854006, + 3033291828, + 289532110, + 2706671279, + 2087905683, + 3018724369, + 1668267050, + 732546397, + 1947742710, + 3462151702, + 2609353502, + 2950085171, + 1814351708, + 2050118529, + 680887927, + 999245976, + 1800124847, + 3300911131, + 1713906067, + 1641548236, + 4213287313, + 1216130144, + 1575780402, + 4018429277, + 3917837745, + 3693486850, + 3949271944, + 596196993, + 3549867205, + 258830323, + 2213823033, + 772490370, + 2760122372, + 1774776394, + 2652871518, + 566650946, + 4142492826, + 1728879713, + 2882767088, + 1783734482, + 3629395816, + 2517608232, + 2874225571, + 1861159788, + 326777828, + 3124490320, + 2130389656, + 2716951837, + 967770486, + 1724537150, + 2185432712, + 2364442137, + 1164943284, + 2105845187, + 998989502, + 3765401048, + 2244026483, + 1075463327, + 1455516326, + 1322494562, + 910128902, + 469688178, + 1117454909, + 936433444, + 3490320968, + 3675253459, + 1240580251, + 122909385, + 2157517691, + 634681816, + 4142456567, + 3825094682, + 3061402683, + 2540495037, + 79693498, + 3249098678, + 1084186820, + 1583128258, + 426386531, + 1761308591, + 1047286709, + 322548459, + 995290223, + 1845252383, + 2603652396, + 3431023940, + 2942221577, + 3202600964, + 3727903485, + 1712269319, + 422464435, + 3234572375, + 1170764815, + 3523960633, + 3117677531, + 1434042557, + 442511882, + 3600875718, + 1076654713, + 1738483198, + 4213154764, + 2393238008, + 3677496056, + 1014306527, + 4251020053, + 793779912, + 2902807211, + 842905082, + 4246964064, + 1395751752, + 1040244610, + 2656851899, + 3396308128, + 445077038, + 3742853595, + 3577915638, + 679411651, + 2892444358, + 2354009459, + 1767581616, + 3150600392, + 3791627101, + 3102740896, + 284835224, + 4246832056, + 1258075500, + 768725851, + 2589189241, + 3069724005, + 3532540348, + 1274779536, + 3789419226, + 2764799539, + 1660621633, + 3471099624, + 4011903706, + 913787905, + 3497959166, + 737222580, + 2514213453, + 2928710040, + 3937242737, + 1804850592, + 3499020752, + 2949064160, + 2386320175, + 2390070455, + 2415321851, + 4061277028, + 2290661394, + 2416832540, + 1336762016, + 1754252060, + 3520065937, + 3014181293, + 791618072, + 3188594551, + 3933548030, + 2332172193, + 3852520463, + 3043980520, + 413987798, + 3465142937, + 3030929376, + 4245938359, + 2093235073, + 3534596313, + 375366246, + 2157278981, + 2479649556, + 555357303, + 3870105701, + 2008414854, + 3344188149, + 4221384143, + 3956125452, + 2067696032, + 3594591187, + 2921233993, + 2428461, + 544322398, + 577241275, + 1471733935, + 610547355, + 4027169054, + 1432588573, + 1507829418, + 2025931657, + 3646575487, + 545086370, + 48609733, + 2200306550, + 1653985193, + 298326376, + 1316178497, + 3007786442, + 2064951626, + 458293330, + 2589141269, + 3591329599, + 3164325604, + 727753846, + 2179363840, + 146436021, + 1461446943, + 4069977195, + 705550613, + 3059967265, + 3887724982, + 4281599278, + 3313849956, + 1404054877, + 2845806497, + 146425753, + 1854211946, + 1266315497, + 3048417604, + 3681880366, + 3289982499, + 290971e4, + 1235738493, + 2632868024, + 2414719590, + 3970600049, + 1771706367, + 1449415276, + 3266420449, + 422970021, + 1963543593, + 2690192192, + 3826793022, + 1062508698, + 1531092325, + 1804592342, + 2583117782, + 2714934279, + 4024971509, + 1294809318, + 4028980673, + 1289560198, + 2221992742, + 1669523910, + 35572830, + 157838143, + 1052438473, + 1016535060, + 1802137761, + 1753167236, + 1386275462, + 3080475397, + 2857371447, + 1040679964, + 2145300060, + 2390574316, + 1461121720, + 2956646967, + 4031777805, + 4028374788, + 33600511, + 2920084762, + 1018524850, + 629373528, + 3691585981, + 3515945977, + 2091462646, + 2486323059, + 586499841, + 988145025, + 935516892, + 3367335476, + 2599673255, + 2839830854, + 265290510, + 3972581182, + 2759138881, + 3795373465, + 1005194799, + 847297441, + 406762289, + 1314163512, + 1332590856, + 1866599683, + 4127851711, + 750260880, + 613907577, + 1450815602, + 3165620655, + 3734664991, + 3650291728, + 3012275730, + 3704569646, + 1427272223, + 778793252, + 1343938022, + 2676280711, + 2052605720, + 1946737175, + 3164576444, + 3914038668, + 3967478842, + 3682934266, + 1661551462, + 3294938066, + 4011595847, + 840292616, + 3712170807, + 616741398, + 312560963, + 711312465, + 1351876610, + 322626781, + 1910503582, + 271666773, + 2175563734, + 1594956187, + 70604529, + 3617834859, + 1007753275, + 1495573769, + 4069517037, + 2549218298, + 2663038764, + 504708206, + 2263041392, + 3941167025, + 2249088522, + 1514023603, + 1998579484, + 1312622330, + 694541497, + 2582060303, + 2151582166, + 1382467621, + 776784248, + 2618340202, + 3323268794, + 2497899128, + 2784771155, + 503983604, + 4076293799, + 907881277, + 423175695, + 432175456, + 1378068232, + 4145222326, + 3954048622, + 3938656102, + 3820766613, + 2793130115, + 2977904593, + 26017576, + 3274890735, + 3194772133, + 1700274565, + 1756076034, + 4006520079, + 3677328699, + 720338349, + 1533947780, + 354530856, + 688349552, + 3973924725, + 1637815568, + 332179504, + 3949051286, + 53804574, + 2852348879, + 3044236432, + 1282449977, + 3583942155, + 3416972820, + 4006381244, + 1617046695, + 2628476075, + 3002303598, + 1686838959, + 431878346, + 2686675385, + 1700445008, + 1080580658, + 1009431731, + 832498133, + 3223435511, + 2605976345, + 2271191193, + 2516031870, + 1648197032, + 4164389018, + 2548247927, + 300782431, + 375919233, + 238389289, + 3353747414, + 2531188641, + 2019080857, + 1475708069, + 455242339, + 2609103871, + 448939670, + 3451063019, + 1395535956, + 2413381860, + 1841049896, + 1491858159, + 885456874, + 4264095073, + 4001119347, + 1565136089, + 3898914787, + 1108368660, + 540939232, + 1173283510, + 2745871338, + 3681308437, + 4207628240, + 3343053890, + 4016749493, + 1699691293, + 1103962373, + 3625875870, + 2256883143, + 3830138730, + 1031889488, + 3479347698, + 1535977030, + 4236805024, + 3251091107, + 2132092099, + 1774941330, + 1199868427, + 1452454533, + 157007616, + 2904115357, + 342012276, + 595725824, + 1480756522, + 206960106, + 497939518, + 591360097, + 863170706, + 2375253569, + 3596610801, + 1814182875, + 2094937945, + 3421402208, + 1082520231, + 3463918190, + 2785509508, + 435703966, + 3908032597, + 1641649973, + 2842273706, + 3305899714, + 1510255612, + 2148256476, + 2655287854, + 3276092548, + 4258621189, + 236887753, + 3681803219, + 274041037, + 1734335097, + 3815195456, + 3317970021, + 1899903192, + 1026095262, + 4050517792, + 356393447, + 2410691914, + 3873677099, + 3682840055, + 3913112168, + 2491498743, + 4132185628, + 2489919796, + 1091903735, + 1979897079, + 3170134830, + 3567386728, + 3557303409, + 857797738, + 1136121015, + 1342202287, + 507115054, + 2535736646, + 337727348, + 3213592640, + 1301675037, + 2528481711, + 1895095763, + 1721773893, + 3216771564, + 62756741, + 2142006736, + 835421444, + 2531993523, + 1442658625, + 3659876326, + 2882144922, + 676362277, + 1392781812, + 170690266, + 3921047035, + 1759253602, + 3611846912, + 1745797284, + 664899054, + 1329594018, + 3901205900, + 3045908486, + 2062866102, + 2865634940, + 3543621612, + 3464012697, + 1080764994, + 553557557, + 3656615353, + 3996768171, + 991055499, + 499776247, + 1265440854, + 648242737, + 3940784050, + 980351604, + 3713745714, + 1749149687, + 3396870395, + 4211799374, + 3640570775, + 1161844396, + 3125318951, + 1431517754, + 545492359, + 4268468663, + 3499529547, + 1437099964, + 2702547544, + 3433638243, + 2581715763, + 2787789398, + 1060185593, + 1593081372, + 2418618748, + 4260947970, + 69676912, + 2159744348, + 86519011, + 2512459080, + 3838209314, + 1220612927, + 3339683548, + 133810670, + 1090789135, + 1078426020, + 1569222167, + 845107691, + 3583754449, + 4072456591, + 1091646820, + 628848692, + 1613405280, + 3757631651, + 526609435, + 236106946, + 48312990, + 2942717905, + 3402727701, + 1797494240, + 859738849, + 992217954, + 4005476642, + 2243076622, + 3870952857, + 3732016268, + 765654824, + 3490871365, + 2511836413, + 1685915746, + 3888969200, + 1414112111, + 2273134842, + 3281911079, + 4080962846, + 172450625, + 2569994100, + 980381355, + 4109958455, + 2819808352, + 2716589560, + 2568741196, + 3681446669, + 3329971472, + 1835478071, + 660984891, + 3704678404, + 4045999559, + 3422617507, + 3040415634, + 1762651403, + 1719377915, + 3470491036, + 2693910283, + 3642056355, + 3138596744, + 1364962596, + 2073328063, + 1983633131, + 926494387, + 3423689081, + 2150032023, + 4096667949, + 1749200295, + 3328846651, + 309677260, + 2016342300, + 1779581495, + 3079819751, + 111262694, + 1274766160, + 443224088, + 298511866, + 1025883608, + 3806446537, + 1145181785, + 168956806, + 3641502830, + 3584813610, + 1689216846, + 3666258015, + 3200248200, + 1692713982, + 2646376535, + 4042768518, + 1618508792, + 1610833997, + 3523052358, + 4130873264, + 2001055236, + 3610705100, + 2202168115, + 4028541809, + 2961195399, + 1006657119, + 2006996926, + 3186142756, + 1430667929, + 3210227297, + 1314452623, + 4074634658, + 4101304120, + 2273951170, + 1399257539, + 3367210612, + 3027628629, + 1190975929, + 2062231137, + 2333990788, + 2221543033, + 2438960610, + 1181637006, + 548689776, + 2362791313, + 3372408396, + 3104550113, + 3145860560, + 296247880, + 1970579870, + 3078560182, + 3769228297, + 1714227617, + 3291629107, + 3898220290, + 166772364, + 1251581989, + 493813264, + 448347421, + 195405023, + 2709975567, + 677966185, + 3703036547, + 1463355134, + 2715995803, + 1338867538, + 1343315457, + 2802222074, + 2684532164, + 233230375, + 2599980071, + 2000651841, + 3277868038, + 1638401717, + 4028070440, + 3237316320, + 6314154, + 819756386, + 300326615, + 590932579, + 1405279636, + 3267499572, + 3150704214, + 2428286686, + 3959192993, + 3461946742, + 1862657033, + 1266418056, + 963775037, + 2089974820, + 2263052895, + 1917689273, + 448879540, + 3550394620, + 3981727096, + 150775221, + 3627908307, + 1303187396, + 508620638, + 2975983352, + 2726630617, + 1817252668, + 1876281319, + 1457606340, + 908771278, + 3720792119, + 3617206836, + 2455994898, + 1729034894, + 1080033504, + 976866871, + 3556439503, + 2881648439, + 1522871579, + 1555064734, + 1336096578, + 3548522304, + 2579274686, + 3574697629, + 3205460757, + 3593280638, + 3338716283, + 3079412587, + 564236357, + 2993598910, + 1781952180, + 1464380207, + 3163844217, + 3332601554, + 1699332808, + 1393555694, + 1183702653, + 3581086237, + 1288719814, + 691649499, + 2847557200, + 2895455976, + 3193889540, + 2717570544, + 1781354906, + 1676643554, + 2592534050, + 3230253752, + 1126444790, + 2770207658, + 2633158820, + 2210423226, + 2615765581, + 2414155088, + 3127139286, + 673620729, + 2805611233, + 1269405062, + 4015350505, + 3341807571, + 4149409754, + 1057255273, + 2012875353, + 2162469141, + 2276492801, + 2601117357, + 993977747, + 3918593370, + 2654263191, + 753973209, + 36408145, + 2530585658, + 25011837, + 3520020182, + 2088578344, + 530523599, + 2918365339, + 1524020338, + 1518925132, + 3760827505, + 3759777254, + 1202760957, + 3985898139, + 3906192525, + 674977740, + 4174734889, + 2031300136, + 2019492241, + 3983892565, + 4153806404, + 3822280332, + 352677332, + 2297720250, + 60907813, + 90501309, + 3286998549, + 1016092578, + 2535922412, + 2839152426, + 457141659, + 509813237, + 4120667899, + 652014361, + 1966332200, + 2975202805, + 55981186, + 2327461051, + 676427537, + 3255491064, + 2882294119, + 3433927263, + 1307055953, + 942726286, + 933058658, + 2468411793, + 3933900994, + 4215176142, + 1361170020, + 2001714738, + 2830558078, + 3274259782, + 1222529897, + 1679025792, + 2729314320, + 3714953764, + 1770335741, + 151462246, + 3013232138, + 1682292957, + 1483529935, + 471910574, + 1539241949, + 458788160, + 3436315007, + 1807016891, + 3718408830, + 978976581, + 1043663428, + 3165965781, + 1927990952, + 4200891579, + 2372276910, + 3208408903, + 3533431907, + 1412390302, + 2931980059, + 4132332400, + 1947078029, + 3881505623, + 4168226417, + 2941484381, + 1077988104, + 1320477388, + 886195818, + 18198404, + 3786409e3, + 2509781533, + 112762804, + 3463356488, + 1866414978, + 891333506, + 18488651, + 661792760, + 1628790961, + 3885187036, + 3141171499, + 876946877, + 2693282273, + 1372485963, + 791857591, + 2686433993, + 3759982718, + 3167212022, + 3472953795, + 2716379847, + 445679433, + 3561995674, + 3504004811, + 3574258232, + 54117162, + 3331405415, + 2381918588, + 3769707343, + 4154350007, + 1140177722, + 4074052095, + 668550556, + 3214352940, + 367459370, + 261225585, + 2610173221, + 4209349473, + 3468074219, + 3265815641, + 314222801, + 3066103646, + 3808782860, + 282218597, + 3406013506, + 3773591054, + 379116347, + 1285071038, + 846784868, + 2669647154, + 3771962079, + 3550491691, + 2305946142, + 453669953, + 1268987020, + 3317592352, + 3279303384, + 3744833421, + 2610507566, + 3859509063, + 266596637, + 3847019092, + 517658769, + 3462560207, + 3443424879, + 370717030, + 4247526661, + 2224018117, + 4143653529, + 4112773975, + 2788324899, + 2477274417, + 1456262402, + 2901442914, + 1517677493, + 1846949527, + 2295493580, + 3734397586, + 2176403920, + 1280348187, + 1908823572, + 3871786941, + 846861322, + 1172426758, + 3287448474, + 3383383037, + 1655181056, + 3139813346, + 901632758, + 1897031941, + 2986607138, + 3066810236, + 3447102507, + 1393639104, + 373351379, + 950779232, + 625454576, + 3124240540, + 4148612726, + 2007998917, + 544563296, + 2244738638, + 2330496472, + 2058025392, + 1291430526, + 424198748, + 50039436, + 29584100, + 3605783033, + 2429876329, + 2791104160, + 1057563949, + 3255363231, + 3075367218, + 3463963227, + 1469046755, + 985887462 + ]; + C_ORIG = [ + 1332899944, + 1700884034, + 1701343084, + 1684370003, + 1668446532, + 1869963892 + ]; + __name(_encipher, "_encipher"); + __name(_streamtoword, "_streamtoword"); + __name(_key, "_key"); + __name(_ekskey, "_ekskey"); + __name(_crypt, "_crypt"); + __name(_hash, "_hash"); + __name(encodeBase642, "encodeBase64"); + __name(decodeBase642, "decodeBase64"); + bcryptjs_default = { + setRandomFallback, + genSaltSync, + genSalt, + hashSync, + hash: hash3, + compareSync, + compare, + getRounds, + getSalt, + truncates, + encodeBase64: encodeBase642, + decodeBase64: decodeBase642 + }; + } +}); + +// src/trpc/apis/admin-apis/apis/staff-user.ts +var staffUserRouter; +var init_staff_user2 = __esm({ + "src/trpc/apis/admin-apis/apis/staff-user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_bcryptjs(); + init_webapi(); + init_env_exporter(); + init_api_error(); + init_dbService(); + staffUserRouter = router2({ + login: publicProcedure.input(external_exports.object({ + name: external_exports.string(), + password: external_exports.string() + })).mutation(async ({ input }) => { + const { name, password } = input; + if (!name || !password) { + throw new ApiError("Name and password are required", 400); + } + const staff = await getStaffUserByName(name); + if (!staff) { + throw new ApiError("Invalid credentials", 401); + } + const isPasswordValid = await bcryptjs_default.compare(password, staff.password); + if (!isPasswordValid) { + throw new ApiError("Invalid credentials", 401); + } + const token = await new SignJWT({ staffId: staff.id, name: staff.name }).setProtectedHeader({ alg: "HS256" }).setExpirationTime("30d").sign(getEncodedJwtSecret()); + return { + message: "Login successful", + token, + staff: { id: staff.id, name: staff.name } + }; + }), + getStaff: protectedProcedure.query(async ({ ctx }) => { + const staff = await getAllStaff(); + const transformedStaff = staff.map((user) => ({ + id: user.id, + name: user.name, + role: user.role ? { + id: user.role.id, + name: user.role.roleName + } : null, + permissions: user.role?.rolePermissions.map((rp) => ({ + id: rp.permission.id, + name: rp.permission.permissionName + })) || [] + })); + return { + staff: transformedStaff + }; + }), + getUsers: protectedProcedure.input(external_exports.object({ + cursor: external_exports.number().optional(), + limit: external_exports.number().default(20), + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { cursor, limit, search } = input; + const { users: usersToReturn, hasMore } = await getAllUsers(cursor, limit, search); + const formattedUsers = usersToReturn.map((user) => ({ + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile, + image: user.userDetails?.profileImage || null + })); + return { + users: formattedUsers, + nextCursor: hasMore ? usersToReturn[usersToReturn.length - 1].id : void 0 + }; + }), + getUserDetails: protectedProcedure.input(external_exports.object({ userId: external_exports.number() })).query(async ({ input }) => { + const { userId } = input; + const user = await getUserWithDetails(userId); + if (!user) { + throw new ApiError("User not found", 404); + } + const lastOrder = user.orders[0]; + return { + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile, + addedOn: user.createdAt, + lastOrdered: lastOrder?.createdAt || null, + isSuspended: user.userDetails?.isSuspended || false + }; + }), + updateUserSuspension: protectedProcedure.input(external_exports.object({ userId: external_exports.number(), isSuspended: external_exports.boolean() })).mutation(async ({ input }) => { + const { userId, isSuspended } = input; + await upsertUserSuspension(userId, isSuspended); + return { success: true }; + }), + createStaffUser: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + password: external_exports.string().min(6, "Password must be at least 6 characters"), + roleId: external_exports.number().int().positive("Role is required") + })).mutation(async ({ input, ctx }) => { + const { name, password, roleId } = input; + const existingUser = await checkStaffUserExists(name); + if (existingUser) { + throw new ApiError("Staff user with this name already exists", 409); + } + const roleExists = await checkStaffRoleExists(roleId); + if (!roleExists) { + throw new ApiError("Invalid role selected", 400); + } + const hashedPassword = await bcryptjs_default.hash(password, 12); + const newUser = await createStaffUser(name, hashedPassword, roleId); + return { success: true, user: { id: newUser.id, name: newUser.name } }; + }), + getRoles: protectedProcedure.query(async ({ ctx }) => { + const roles = await getAllRoles(); + return { + roles: roles.map((role) => ({ + id: role.id, + name: role.roleName + })) + }; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/store.ts +var storeRouter; +var init_store2 = __esm({ + "src/trpc/apis/admin-apis/apis/store.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_s3_client(); + init_store_initializer(); + init_dbService(); + storeRouter = router2({ + getStores: protectedProcedure.query(async ({ ctx }) => { + const stores = await getAllStores(); + await Promise.all(stores.map(async (store) => { + if (store.imageUrl) + store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl); + })).catch((e2) => { + throw new ApiError("Unable to find store image urls"); + }); + return { + stores, + count: stores.length + }; + }), + getStoreById: protectedProcedure.input(external_exports.object({ + id: external_exports.number() + })).query(async ({ input, ctx }) => { + const { id } = input; + const store = await getStoreById(id); + if (!store) { + throw new ApiError("Store not found", 404); + } + store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl); + return { + store + }; + }), + createStore: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + description: external_exports.string().optional(), + imageUrl: external_exports.string().optional(), + owner: external_exports.number().min(1, "Owner is required"), + products: external_exports.array(external_exports.number()).optional() + })).mutation(async ({ input, ctx }) => { + const { name, description, imageUrl, owner, products } = input; + const imageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : void 0; + const newStore = await createStore( + { + name, + description, + imageUrl: imageKey, + owner + }, + products + ); + scheduleStoreInitialization(); + return { + store: newStore, + message: "Store created successfully" + }; + }), + updateStore: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + name: external_exports.string().min(1, "Name is required"), + description: external_exports.string().optional(), + imageUrl: external_exports.string().optional(), + owner: external_exports.number().min(1, "Owner is required"), + products: external_exports.array(external_exports.number()).optional() + })).mutation(async ({ input, ctx }) => { + const { id, name, description, imageUrl, owner, products } = input; + const existingStore = await getStoreById(id); + if (!existingStore) { + throw new ApiError("Store not found", 404); + } + const oldImageKey = existingStore.imageUrl; + const newImageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : oldImageKey; + if (oldImageKey && (newImageKey && newImageKey !== oldImageKey || !newImageKey)) { + try { + await deleteImageUtil({ keys: [oldImageKey] }); + } catch (error50) { + console.error("Failed to delete old image:", error50); + } + } + const updatedStore = await updateStore( + id, + { + name, + description, + imageUrl: newImageKey, + owner + }, + products + ); + scheduleStoreInitialization(); + return { + store: updatedStore, + message: "Store updated successfully" + }; + }), + deleteStore: protectedProcedure.input(external_exports.object({ + storeId: external_exports.number() + })).mutation(async ({ input, ctx }) => { + const { storeId } = input; + const result = await deleteStore(storeId); + scheduleStoreInitialization(); + return result; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/payments.ts +var initiateRefundSchema, adminPaymentsRouter; +var init_payments2 = __esm({ + "src/trpc/apis/admin-apis/apis/payments.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + initiateRefundSchema = external_exports.object({ + orderId: external_exports.number(), + refundPercent: external_exports.number().min(0).max(100).optional(), + refundAmount: external_exports.number().min(0).optional() + }).refine( + (data) => { + const hasPercent = data.refundPercent !== void 0; + const hasAmount = data.refundAmount !== void 0; + return hasPercent && !hasAmount || !hasPercent && hasAmount; + }, + { + message: "Provide either refundPercent or refundAmount, not both or neither" + } + ); + adminPaymentsRouter = router2({ + initiateRefund: protectedProcedure.input(initiateRefundSchema).mutation(async ({ input }) => { + return {}; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/banner.ts +var bannerRouter2; +var init_banner2 = __esm({ + "src/trpc/apis/admin-apis/apis/banner.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_zod(); + init_trpc_index(); + init_s3_client(); + init_api_error(); + init_store_initializer(); + init_dbService(); + bannerRouter2 = router2({ + // Get all banners + getBanners: protectedProcedure.query(async () => { + try { + const banners = await getBanners(); + const bannersWithSignedUrls = await Promise.all( + banners.map(async (banner) => { + try { + return { + ...banner, + imageUrl: banner.imageUrl ? await generateSignedUrlFromS3Url(banner.imageUrl) : banner.imageUrl, + // Ensure productIds is always an array + productIds: banner.productIds || [] + }; + } catch (error50) { + console.error(`Failed to generate signed URL for banner ${banner.id}:`, error50); + return { + ...banner, + imageUrl: banner.imageUrl, + // Keep original on error + // Ensure productIds is always an array + productIds: banner.productIds || [] + }; + } + }) + ); + return { + banners: bannersWithSignedUrls + }; + } catch (e2) { + console.log(e2); + throw new ApiError(e2.message); + } + }), + // Get single banner by ID + getBanner: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).query(async ({ input }) => { + const banner = await getBannerById(input.id); + if (banner) { + try { + if (banner.imageUrl) { + banner.imageUrl = await generateSignedUrlFromS3Url(banner.imageUrl); + } + } catch (error50) { + console.error(`Failed to generate signed URL for banner ${banner.id}:`, error50); + } + if (!banner.productIds) { + banner.productIds = []; + } + } + return banner; + }), + // Create new banner + createBanner: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1), + imageUrl: external_exports.string().url(), + description: external_exports.string().optional(), + productIds: external_exports.array(external_exports.number()).optional(), + redirectUrl: external_exports.string().url().optional() + // serialNum removed completely + })).mutation(async ({ input }) => { + try { + const imageUrl = extractKeyFromPresignedUrl(input.imageUrl); + const banner = await createBanner({ + name: input.name, + imageUrl, + description: input.description ?? null, + productIds: input.productIds || [], + redirectUrl: input.redirectUrl ?? null, + serialNum: 999, + // Default value, not used + isActive: false + // Default to inactive + }); + scheduleStoreInitialization(); + return banner; + } catch (error50) { + console.error("Error creating banner:", error50); + throw error50; + } + }), + // Update banner + updateBanner: protectedProcedure.input(external_exports.object({ + id: external_exports.number(), + name: external_exports.string().min(1).optional(), + imageUrl: external_exports.string().url().optional(), + description: external_exports.string().optional(), + productIds: external_exports.array(external_exports.number()).optional(), + redirectUrl: external_exports.string().url().optional(), + serialNum: external_exports.number().nullable().optional(), + isActive: external_exports.boolean().optional() + })).mutation(async ({ input }) => { + try { + const { id, ...updateData } = input; + const processedData = { + ...updateData, + ...updateData.imageUrl && { + imageUrl: extractKeyFromPresignedUrl(updateData.imageUrl) + } + }; + if ("serialNum" in processedData && processedData.serialNum === null) { + processedData.serialNum = null; + } + const banner = await updateBanner(id, processedData); + scheduleStoreInitialization(); + return banner; + } catch (error50) { + console.error("Error updating banner:", error50); + throw error50; + } + }), + // Delete banner + deleteBanner: protectedProcedure.input(external_exports.object({ id: external_exports.number() })).mutation(async ({ input }) => { + await deleteBanner(input.id); + scheduleStoreInitialization(); + return { success: true }; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/user.ts +var userRouter; +var init_user3 = __esm({ + "src/trpc/apis/admin-apis/apis/user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_notif_job(); + init_user_negativity_store(); + init_dbService(); + userRouter = { + createUserByMobile: protectedProcedure.input(external_exports.object({ + mobile: external_exports.string().min(1, "Mobile number is required") + })).mutation(async ({ input }) => { + const cleanMobile = input.mobile.replace(/\D/g, ""); + if (cleanMobile.length !== 10) { + throw new ApiError("Mobile number must be exactly 10 digits", 400); + } + const existingUser = await getUserByMobile(cleanMobile); + if (existingUser) { + throw new ApiError("User with this mobile number already exists", 409); + } + const newUser = await createUserByMobile(cleanMobile); + return { + success: true, + data: newUser + }; + }), + getEssentials: protectedProcedure.query(async () => { + const count4 = await getUnresolvedComplaintsCount(); + return { + unresolvedComplaints: count4 + }; + }), + getAllUsers: protectedProcedure.input(external_exports.object({ + limit: external_exports.number().min(1).max(100).default(50), + cursor: external_exports.number().optional(), + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { limit, cursor, search } = input; + const { users: usersToReturn, hasMore } = await getAllUsersWithFilters(limit, cursor, search); + const userIds = usersToReturn.map((u5) => u5.id); + const orderCounts = await getOrderCountsByUserIds(userIds); + const lastOrders = await getLastOrdersByUserIds(userIds); + const suspensionStatuses = await getSuspensionStatusesByUserIds(userIds); + const orderCountMap = new Map(orderCounts.map((o2) => [o2.userId, o2.totalOrders])); + const lastOrderMap = new Map(lastOrders.map((o2) => [o2.userId, o2.lastOrderDate])); + const suspensionMap = new Map(suspensionStatuses.map((s2) => [s2.userId, s2.isSuspended])); + const usersWithStats = usersToReturn.map((user) => ({ + ...user, + totalOrders: orderCountMap.get(user.id) || 0, + lastOrderDate: lastOrderMap.get(user.id) || null, + isSuspended: suspensionMap.get(user.id) ?? false + })); + const nextCursor = hasMore ? usersToReturn[usersToReturn.length - 1].id : void 0; + return { + users: usersWithStats, + nextCursor, + hasMore + }; + }), + getUserDetails: protectedProcedure.input(external_exports.object({ + userId: external_exports.number() + })).query(async ({ input }) => { + const { userId } = input; + const user = await getUserBasicInfo(userId); + if (!user) { + throw new ApiError("User not found", 404); + } + const isSuspended = await getUserSuspensionStatus(userId); + const userOrders = await getUserOrders(userId); + const orderIds = userOrders.map((o2) => o2.id); + const orderStatuses = await getOrderStatusesByOrderIds(orderIds); + const itemCounts = await getItemCountsByOrderIds(orderIds); + const statusMap = new Map(orderStatuses.map((s2) => [s2.orderId, s2])); + const itemCountMap = new Map(itemCounts.map((c2) => [c2.orderId, c2.itemCount])); + const getStatus = /* @__PURE__ */ __name((status) => { + if (!status) + return "pending"; + if (status.isCancelled) + return "cancelled"; + if (status.isDelivered) + return "delivered"; + return "pending"; + }, "getStatus"); + const ordersWithDetails = userOrders.map((order) => { + const status = statusMap.get(order.id); + return { + id: order.id, + readableId: order.readableId, + totalAmount: order.totalAmount, + createdAt: order.createdAt, + isFlashDelivery: order.isFlashDelivery, + status: getStatus(status), + itemCount: itemCountMap.get(order.id) || 0 + }; + }); + return { + user: { + ...user, + isSuspended + }, + orders: ordersWithDetails + }; + }), + updateUserSuspension: protectedProcedure.input(external_exports.object({ + userId: external_exports.number(), + isSuspended: external_exports.boolean() + })).mutation(async ({ input }) => { + const { userId, isSuspended } = input; + await upsertUserSuspension(userId, isSuspended); + return { + success: true, + message: `User ${isSuspended ? "suspended" : "unsuspended"} successfully` + }; + }), + getUsersForNotification: protectedProcedure.input(external_exports.object({ + search: external_exports.string().optional() + })).query(async ({ input }) => { + const { search } = input; + const usersList = await searchUsers(search); + const eligibleUsers = await getAllNotifCreds(); + const eligibleSet = new Set(eligibleUsers.map((u5) => u5.userId)); + return { + users: usersList.map((user) => ({ + id: user.id, + name: user.name, + mobile: user.mobile, + isEligibleForNotif: eligibleSet.has(user.id) + })) + }; + }), + sendNotification: protectedProcedure.input(external_exports.object({ + userIds: external_exports.array(external_exports.number()).default([]), + title: external_exports.string().min(1, "Title is required"), + text: external_exports.string().min(1, "Message is required"), + imageUrl: external_exports.string().optional() + })).mutation(async ({ input }) => { + const { userIds, title: title2, text: text2, imageUrl } = input; + let tokens = []; + if (userIds.length === 0) { + const loggedInTokens = await getAllNotifCreds(); + const unloggedTokens = await getAllUnloggedTokens(); + tokens = [ + ...loggedInTokens.map((t9) => t9.token), + ...unloggedTokens.map((t9) => t9.token) + ]; + } else { + const userTokens = await getNotifTokensByUserIds(userIds); + tokens = userTokens.map((t9) => t9.token); + } + let queuedCount = 0; + for (const token of tokens) { + try { + await notificationQueue.add("send-admin-notification", { + token, + title: title2, + body: text2, + imageUrl: imageUrl || null + }, { + attempts: 3, + backoff: { + type: "exponential", + delay: 2e3 + } + }); + queuedCount++; + } catch (error50) { + console.error(`Failed to queue notification for token:`, error50); + } + } + return { + success: true, + message: `Notification queued for ${queuedCount} users` + }; + }), + getUserIncidents: protectedProcedure.input(external_exports.object({ + userId: external_exports.number() + })).query(async ({ input }) => { + const { userId } = input; + const incidents = await getUserIncidentsWithRelations(userId); + return { + incidents: incidents.map((incident) => ({ + id: incident.id, + userId: incident.userId, + orderId: incident.orderId, + dateAdded: incident.dateAdded, + adminComment: incident.adminComment, + addedBy: incident.addedBy?.name || "Unknown", + negativityScore: incident.negativityScore, + orderStatus: incident.order?.orderStatus?.[0]?.isCancelled ? "cancelled" : "active" + })) + }; + }), + addUserIncident: protectedProcedure.input(external_exports.object({ + userId: external_exports.number(), + orderId: external_exports.number().optional(), + adminComment: external_exports.string().optional(), + negativityScore: external_exports.number().optional() + })).mutation(async ({ input, ctx }) => { + const { userId, orderId, adminComment, negativityScore } = input; + const adminUserId = ctx.staffUser?.id; + if (!adminUserId) { + throw new ApiError("Admin user not authenticated", 401); + } + const incident = await createUserIncident( + userId, + orderId, + adminComment, + adminUserId, + negativityScore + ); + recomputeUserNegativityScore(userId); + return { + success: true, + data: incident + }; + }) + }; + } +}); + +// src/trpc/apis/admin-apis/apis/const.ts +var constRouter; +var init_const2 = __esm({ + "src/trpc/apis/admin-apis/apis/const.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_const_store(); + init_const_keys(); + init_dbService(); + constRouter = router2({ + getConstants: protectedProcedure.query(async () => { + const constants2 = await getAllConstants(); + return constants2; + }), + updateConstants: protectedProcedure.input(external_exports.object({ + constants: external_exports.array(external_exports.object({ + key: external_exports.string(), + value: external_exports.any() + })) + })).mutation(async ({ input }) => { + const { constants: constants2 } = input; + const validKeys = Object.values(CONST_KEYS); + const invalidKeys = constants2.filter((c2) => !validKeys.includes(c2.key)).map((c2) => c2.key); + if (invalidKeys.length > 0) { + throw new Error(`Invalid constant keys: ${invalidKeys.join(", ")}`); + } + await upsertConstants(constants2); + await computeConstants(); + return { + success: true, + updatedCount: constants2.length, + keys: constants2.map((c2) => c2.key) + }; + }) + }); + } +}); + +// src/trpc/apis/admin-apis/apis/admin-trpc-index.ts +var adminRouter; +var init_admin_trpc_index = __esm({ + "src/trpc/apis/admin-apis/apis/admin-trpc-index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_complaint3(); + init_coupon3(); + init_order3(); + init_vendor_snippets2(); + init_slots4(); + init_product3(); + init_staff_user2(); + init_store2(); + init_payments2(); + init_banner2(); + init_user3(); + init_const2(); + adminRouter = router2({ + complaint: complaintRouter, + coupon: couponRouter, + order: orderRouter, + vendorSnippets: vendorSnippetsRouter, + slots: slotsRouter2, + product: productRouter, + staffUser: staffUserRouter, + store: storeRouter, + payments: adminPaymentsRouter, + banner: bannerRouter2, + user: userRouter, + const: constRouter + }); + } +}); + +// src/lib/license-util.ts +async function extractCoordsFromRedirectUrl(url2) { + try { + await axios_default.get(url2, { maxRedirects: 0 }); + return null; + } catch (error50) { + if (error50.response?.status === 302 || error50.response?.status === 301) { + const redirectUrl = error50.response.headers.location; + const coordsMatch = redirectUrl.match(/!3d([-\d.]+)!4d([-\d.]+)/); + if (coordsMatch) { + return { + latitude: coordsMatch[1], + longitude: coordsMatch[2] + }; + } + } + return null; + } +} +var init_license_util = __esm({ + "src/lib/license-util.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_axios2(); + __name(extractCoordsFromRedirectUrl, "extractCoordsFromRedirectUrl"); + } +}); + +// src/trpc/apis/user-apis/apis/address.ts +var addressRouter; +var init_address2 = __esm({ + "src/trpc/apis/user-apis/apis/address.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_license_util(); + init_dbService(); + addressRouter = router2({ + getDefaultAddress: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + const defaultAddress = await getDefaultAddress(userId); + return { success: true, data: defaultAddress }; + }), + getUserAddresses: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + const userAddresses = await getUserAddresses(userId); + return { success: true, data: userAddresses }; + }), + createAddress: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + phone: external_exports.string().min(1, "Phone is required"), + addressLine1: external_exports.string().min(1, "Address line 1 is required"), + addressLine2: external_exports.string().optional(), + city: external_exports.string().min(1, "City is required"), + state: external_exports.string().min(1, "State is required"), + pincode: external_exports.string().min(1, "Pincode is required"), + isDefault: external_exports.boolean().optional(), + latitude: external_exports.number().optional(), + longitude: external_exports.number().optional(), + googleMapsUrl: external_exports.string().optional() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { name, phone, addressLine1, addressLine2, city, state, pincode, isDefault, googleMapsUrl } = input; + let { latitude, longitude } = input; + if (googleMapsUrl && latitude === void 0 && longitude === void 0) { + const coords = await extractCoordsFromRedirectUrl(googleMapsUrl); + if (coords) { + latitude = Number(coords.latitude); + longitude = Number(coords.longitude); + } + } + if (!name || !phone || !addressLine1 || !city || !state || !pincode) { + throw new Error("Missing required fields"); + } + if (isDefault) { + await clearDefaultAddress(userId); + } + const newAddress = await createUserAddress({ + userId, + name, + phone, + addressLine1, + addressLine2, + city, + state, + pincode, + isDefault: isDefault || false, + latitude, + longitude, + googleMapsUrl + }); + return { success: true, data: newAddress }; + }), + updateAddress: protectedProcedure.input(external_exports.object({ + id: external_exports.number().int().positive(), + name: external_exports.string().min(1, "Name is required"), + phone: external_exports.string().min(1, "Phone is required"), + addressLine1: external_exports.string().min(1, "Address line 1 is required"), + addressLine2: external_exports.string().optional(), + city: external_exports.string().min(1, "City is required"), + state: external_exports.string().min(1, "State is required"), + pincode: external_exports.string().min(1, "Pincode is required"), + isDefault: external_exports.boolean().optional(), + latitude: external_exports.number().optional(), + longitude: external_exports.number().optional(), + googleMapsUrl: external_exports.string().optional() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { id, name, phone, addressLine1, addressLine2, city, state, pincode, isDefault, googleMapsUrl } = input; + let { latitude, longitude } = input; + if (googleMapsUrl && latitude === void 0 && longitude === void 0) { + const coords = await extractCoordsFromRedirectUrl(googleMapsUrl); + if (coords) { + latitude = Number(coords.latitude); + longitude = Number(coords.longitude); + } + } + const existingAddress = await getUserAddressById(userId, id); + if (!existingAddress) { + throw new Error("Address not found"); + } + if (isDefault) { + await clearDefaultAddress(userId); + } + const updatedAddress = await updateUserAddress({ + userId, + addressId: id, + name, + phone, + addressLine1, + addressLine2, + city, + state, + pincode, + isDefault: isDefault || false, + googleMapsUrl, + latitude, + longitude + }); + return { success: true, data: updatedAddress }; + }), + deleteAddress: protectedProcedure.input(external_exports.object({ + id: external_exports.number().int().positive() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { id } = input; + const existingAddress = await getUserAddressById(userId, id); + if (!existingAddress) { + throw new Error("Address not found or does not belong to user"); + } + const hasOngoingOrders = await hasOngoingOrdersForAddress(id); + if (hasOngoingOrders) { + throw new Error("Address is attached to an ongoing order. Please cancel the order first."); + } + if (existingAddress.isDefault) { + throw new Error("Cannot delete default address. Please set another address as default first."); + } + const deleted = await deleteUserAddress(userId, id); + if (!deleted) { + throw new Error("Address not found or does not belong to user"); + } + return { success: true, message: "Address deleted successfully" }; + }) + }); + } +}); + +// src/lib/otp-utils.ts +function getOtpCreds(mobile) { + const authKey = otpStore.get(mobile); + return authKey || null; +} +async function verifyOtpUtil(mobile, otp, verifId) { + const reqUrl = `https://cpaas.messagecentral.com/verification/v3/validateOtp?&verificationId=${verifId}&code=${otp}`; + const resp = await fetch(reqUrl, { + method: "GET", + headers: { + authToken: otpSenderAuthToken + } + }); + const rawData = await resp.json(); + if (rawData.data?.verificationStatus === "VERIFICATION_COMPLETED") { + return true; + } + return false; +} +var otpStore, setOtpCreds, sendOtp; +var init_otp_utils = __esm({ + "src/lib/otp-utils.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_api_error(); + init_env_exporter(); + otpStore = /* @__PURE__ */ new Map(); + setOtpCreds = /* @__PURE__ */ __name((phone, verificationId) => { + otpStore.set(phone, verificationId); + }, "setOtpCreds"); + __name(getOtpCreds, "getOtpCreds"); + sendOtp = /* @__PURE__ */ __name(async (phone) => { + if (!phone) { + throw new ApiError("Phone number is required", 400); + } + const reqUrl = `https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=${phone}&timeout=300`; + const resp = await fetch(reqUrl, { + headers: { + authToken: otpSenderAuthToken + }, + method: "POST" + }); + const data = await resp.json(); + if (data.message === "SUCCESS") { + setOtpCreds(phone, data.data.verificationId); + return { success: true, message: "OTP sent successfully", verificationId: data.data.verificationId }; + } + if (data.message === "REQUEST_ALREADY_EXISTS") { + return { success: true, message: "OTP already sent. Last OTP is still valid" }; + } + throw new ApiError("Error while sending OTP. Please try again", 500); + }, "sendOtp"); + __name(verifyOtpUtil, "verifyOtpUtil"); + } +}); + +// src/trpc/apis/user-apis/apis/auth.ts +var generateToken, authRouter; +var init_auth4 = __esm({ + "src/trpc/apis/user-apis/apis/auth.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_bcryptjs(); + init_webapi(); + init_s3_client(); + init_api_error(); + init_env_exporter(); + init_otp_utils(); + init_dbService(); + generateToken = /* @__PURE__ */ __name(async (userId) => { + return await new SignJWT({ userId }).setProtectedHeader({ alg: "HS256" }).setExpirationTime("7d").sign(getEncodedJwtSecret()); + }, "generateToken"); + authRouter = router2({ + login: publicProcedure.input(external_exports.object({ + identifier: external_exports.string().min(1, "Email/mobile is required"), + password: external_exports.string().min(1, "Password is required") + })).mutation(async ({ input }) => { + const { identifier, password } = input; + if (!identifier || !password) { + throw new ApiError("Email/mobile and password are required", 400); + } + const user = await getUserByEmail(identifier.toLowerCase()); + let foundUser = user || null; + if (!foundUser) { + const userByMobile = await getUserByMobile2(identifier); + foundUser = userByMobile || null; + } + if (!foundUser) { + throw new ApiError("Invalid credentials", 401); + } + const userCredentials = await getUserCreds(foundUser.id); + if (!userCredentials) { + throw new ApiError("Account setup incomplete. Please contact support.", 401); + } + const userDetail = await getUserDetails(foundUser.id); + const profileImageSignedUrl = userDetail?.profileImage ? await generateSignedUrlFromS3Url(userDetail.profileImage) : null; + const isPasswordValid = await bcryptjs_default.compare(password, userCredentials.userPassword); + if (!isPasswordValid) { + throw new ApiError("Invalid credentials", 401); + } + const token = await generateToken(foundUser.id); + const response = { + token, + user: { + id: foundUser.id, + name: foundUser.name, + email: foundUser.email, + mobile: foundUser.mobile, + createdAt: foundUser.createdAt.toISOString(), + profileImage: profileImageSignedUrl, + bio: userDetail?.bio || null, + dateOfBirth: userDetail?.dateOfBirth ? new Date(userDetail.dateOfBirth).toISOString() : null, + gender: userDetail?.gender || null, + occupation: userDetail?.occupation || null + } + }; + return { + success: true, + data: response + }; + }), + register: publicProcedure.input(external_exports.object({ + name: external_exports.string().min(1, "Name is required"), + email: external_exports.string().email("Invalid email format"), + mobile: external_exports.string().min(1, "Mobile is required"), + password: external_exports.string().min(1, "Password is required"), + profileImageUrl: external_exports.string().nullable().optional() + })).mutation(async ({ input }) => { + const { name, email: email3, mobile, password, profileImageUrl } = input; + if (!name || !email3 || !mobile || !password) { + throw new ApiError("All fields are required", 400); + } + const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + if (!emailRegex.test(email3)) { + throw new ApiError("Invalid email format", 400); + } + const cleanMobile = mobile.replace(/\D/g, ""); + if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) { + throw new ApiError("Invalid mobile number", 400); + } + const existingEmail = await getUserByEmail(email3.toLowerCase()); + if (existingEmail) { + throw new ApiError("Email already registered", 409); + } + const existingMobile = await getUserByMobile2(cleanMobile); + if (existingMobile) { + throw new ApiError("Mobile number already registered", 409); + } + const hashedPassword = await bcryptjs_default.hash(password, 12); + const newUser = await createUserWithProfile({ + name: name.trim(), + email: email3.toLowerCase().trim(), + mobile: cleanMobile, + hashedPassword, + profileImage: profileImageUrl ?? null + }); + const token = await generateToken(newUser.id); + const profileImageSignedUrl = profileImageUrl ? await generateSignedUrlFromS3Url(profileImageUrl) : null; + const response = { + token, + user: { + id: newUser.id, + name: newUser.name, + email: newUser.email, + mobile: newUser.mobile, + createdAt: newUser.createdAt.toISOString(), + profileImage: profileImageSignedUrl + } + }; + return { + success: true, + data: response + }; + }), + sendOtp: publicProcedure.input(external_exports.object({ + mobile: external_exports.string() + })).mutation(async ({ input }) => { + return await sendOtp(input.mobile); + }), + verifyOtp: publicProcedure.input(external_exports.object({ + mobile: external_exports.string(), + otp: external_exports.string() + })).mutation(async ({ input }) => { + const verificationId = getOtpCreds(input.mobile); + if (!verificationId) { + throw new ApiError("OTP not sent or expired", 400); + } + const isVerified = await verifyOtpUtil(input.mobile, input.otp, verificationId); + if (!isVerified) { + throw new ApiError("Invalid OTP", 400); + } + let user = await getUserByMobile2(input.mobile); + if (!user) { + user = await createUserWithMobile(input.mobile); + } + const token = await generateToken(user.id); + return { + success: true, + token, + user: { + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile, + createdAt: user.createdAt.toISOString(), + profileImage: null + } + }; + }), + updatePassword: protectedProcedure.input(external_exports.object({ + password: external_exports.string().min(6, "Password must be at least 6 characters") + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const hashedPassword = await bcryptjs_default.hash(input.password, 10); + await upsertUserPassword(userId, hashedPassword); + return { success: true, message: "Password updated successfully" }; + }), + updateProfile: protectedProcedure.input(external_exports.object({ + name: external_exports.string().min(1).optional(), + email: external_exports.string().email("Invalid email format").optional(), + mobile: external_exports.string().min(1).optional(), + password: external_exports.string().min(6, "Password must be at least 6 characters").optional(), + bio: external_exports.string().optional().nullable(), + dateOfBirth: external_exports.string().optional().nullable(), + gender: external_exports.string().optional().nullable(), + occupation: external_exports.string().optional().nullable(), + profileImageUrl: external_exports.string().optional().nullable() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const { name, email: email3, mobile, password, bio, dateOfBirth, gender, occupation, profileImageUrl } = input; + if (email3) { + const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + if (!emailRegex.test(email3)) { + throw new ApiError("Invalid email format", 400); + } + } + if (mobile) { + const cleanMobile = mobile.replace(/\D/g, ""); + if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) { + throw new ApiError("Invalid mobile number", 400); + } + } + if (email3) { + const existingEmail = await getUserByEmail(email3.toLowerCase()); + if (existingEmail && existingEmail.id !== userId) { + throw new ApiError("Email already registered", 409); + } + } + if (mobile) { + const cleanMobile = mobile.replace(/\D/g, ""); + const existingMobile = await getUserByMobile2(cleanMobile); + if (existingMobile && existingMobile.id !== userId) { + throw new ApiError("Mobile number already registered", 409); + } + } + let hashedPassword; + if (password) { + hashedPassword = await bcryptjs_default.hash(password, 12); + } + const updatedUser = await updateUserProfile(userId, { + name: name?.trim(), + email: email3?.toLowerCase().trim(), + mobile: mobile?.replace(/\D/g, ""), + hashedPassword, + profileImage: profileImageUrl ?? void 0, + bio: bio ?? void 0, + dateOfBirth: dateOfBirth ? new Date(dateOfBirth) : void 0, + gender: gender ?? void 0, + occupation: occupation ?? void 0 + }); + const userDetail = await getUserDetailsByUserId(userId); + const profileImageSignedUrl = userDetail?.profileImage ? await generateSignedUrlFromS3Url(userDetail.profileImage) : null; + const authHeader = ctx.req.header("authorization"); + const token = authHeader?.replace("Bearer ", "") || ""; + const response = { + token, + user: { + id: updatedUser.id, + name: updatedUser.name, + email: updatedUser.email, + mobile: updatedUser.mobile, + createdAt: updatedUser.createdAt?.toISOString?.() || (/* @__PURE__ */ new Date()).toISOString(), + profileImage: profileImageSignedUrl, + bio: userDetail?.bio || null, + dateOfBirth: userDetail?.dateOfBirth ? new Date(userDetail.dateOfBirth).toISOString() : null, + gender: userDetail?.gender || null, + occupation: userDetail?.occupation || null + } + }; + return { + success: true, + data: response + }; + }), + getProfile: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const user = await getUserById(userId); + if (!user) { + throw new ApiError("User not found", 404); + } + return { + success: true, + data: { + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile + } + }; + }), + deleteAccount: protectedProcedure.input(external_exports.object({ + mobile: external_exports.string().min(10, "Mobile number is required") + })).mutation(async ({ ctx, input }) => { + const userId = ctx.user.userId; + const { mobile } = input; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const existingUser = await getUserById(userId); + if (!existingUser) { + throw new ApiError("User not found", 404); + } + if (existingUser.id !== userId) { + throw new ApiError("Unauthorized: Cannot delete another user's account", 403); + } + const cleanInputMobile = mobile.replace(/\D/g, ""); + const cleanUserMobile = existingUser.mobile?.replace(/\D/g, ""); + if (cleanInputMobile !== cleanUserMobile) { + throw new ApiError("Mobile number does not match your registered number", 400); + } + await deleteUserAccount(userId); + return { success: true, message: "Account deleted successfully" }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/cart.ts +var getCartData, cartRouter; +var init_cart2 = __esm({ + "src/trpc/apis/user-apis/apis/cart.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_s3_client(); + init_slot_store(); + init_dbService(); + getCartData = /* @__PURE__ */ __name(async (userId) => { + const cartItemsWithProducts = await getCartItemsWithProducts(userId); + const cartWithSignedUrls = cartItemsWithProducts.map((item) => ({ + ...item, + product: { + ...item.product, + images: scaffoldAssetUrl(item.product.images || []) + } + })); + const totalAmount = cartWithSignedUrls.reduce((sum2, item) => sum2 + item.subtotal, 0); + return { + items: cartWithSignedUrls, + totalItems: cartWithSignedUrls.length, + totalAmount + }; + }, "getCartData"); + cartRouter = router2({ + getCart: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + return await getCartData(userId); + }), + addToCart: protectedProcedure.input(external_exports.object({ + productId: external_exports.number().int().positive(), + quantity: external_exports.number().int().positive() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { productId, quantity } = input; + if (!productId || !quantity || quantity <= 0) { + throw new ApiError("Product ID and positive quantity required", 400); + } + const product = await getProductById2(productId); + if (!product) { + throw new ApiError("Product not found", 404); + } + const existingItem = await getCartItemByUserProduct(userId, productId); + if (existingItem) { + await incrementCartItemQuantity(existingItem.id, quantity); + } else { + await insertCartItem(userId, productId, quantity); + } + return await getCartData(userId); + }), + updateCartItem: protectedProcedure.input(external_exports.object({ + itemId: external_exports.number().int().positive(), + quantity: external_exports.number().int().min(0) + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { itemId, quantity } = input; + if (!quantity || quantity <= 0) { + throw new ApiError("Positive quantity required", 400); + } + const updated = await updateCartItemQuantity(userId, itemId, quantity); + if (!updated) { + throw new ApiError("Cart item not found", 404); + } + return await getCartData(userId); + }), + removeFromCart: protectedProcedure.input(external_exports.object({ + itemId: external_exports.number().int().positive() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { itemId } = input; + const deleted = await deleteCartItem(userId, itemId); + if (!deleted) { + throw new ApiError("Cart item not found", 404); + } + return await getCartData(userId); + }), + clearCart: protectedProcedure.mutation(async ({ ctx }) => { + const userId = ctx.user.userId; + await clearUserCart(userId); + return { + items: [], + totalItems: 0, + totalAmount: 0, + message: "Cart cleared successfully" + }; + }), + // Original DB-based getCartSlots (commented out) + // getCartSlots: publicProcedure + // .input(z.object({ + // productIds: z.array(z.number().int().positive()) + // })) + // .query(async ({ input }) => { + // const { productIds } = input; + // + // if (productIds.length === 0) { + // return {}; + // } + // + // // Get slots for these products where freeze time is after current time + // const slotsData = await db + // .select({ + // productId: productSlots.productId, + // slotId: deliverySlotInfo.id, + // deliveryTime: deliverySlotInfo.deliveryTime, + // freezeTime: deliverySlotInfo.freezeTime, + // isActive: deliverySlotInfo.isActive, + // }) + // .from(productSlots) + // .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id)) + // .where(and( + // inArray(productSlots.productId, productIds), + // gt(deliverySlotInfo.freezeTime, sql`NOW()`), + // eq(deliverySlotInfo.isActive, true) + // )); + // + // // Group by productId + // const result: Record = {}; + // slotsData.forEach(slot => { + // if (!result[slot.productId]) { + // result[slot.productId] = []; + // } + // result[slot.productId].push({ + // id: slot.slotId, + // deliveryTime: slot.deliveryTime, + // freezeTime: slot.freezeTime, + // }); + // }); + // + // return result; + // }), + // Cache-based getCartSlots + getCartSlots: publicProcedure.input(external_exports.object({ + productIds: external_exports.array(external_exports.number().int().positive()) + })).query(async ({ input }) => { + const { productIds } = input; + if (productIds.length === 0) { + return {}; + } + return await getMultipleProductsSlots(productIds); + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/complaint.ts +var complaintRouter2; +var init_complaint4 = __esm({ + "src/trpc/apis/user-apis/apis/complaint.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_dbService(); + complaintRouter2 = router2({ + getAll: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + const userComplaints = await getUserComplaints(userId); + return { + complaints: userComplaints + }; + }), + raise: protectedProcedure.input(external_exports.object({ + orderId: external_exports.string().optional(), + complaintBody: external_exports.string().min(1, "Complaint body is required"), + imageUrls: external_exports.array(external_exports.string()).optional() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { orderId, complaintBody, imageUrls } = input; + let orderIdNum = null; + if (orderId) { + const readableIdMatch = orderId.match(/^ORD(\d+)$/); + if (readableIdMatch) { + orderIdNum = parseInt(readableIdMatch[1]); + } + } + await createComplaint( + userId, + orderIdNum, + complaintBody.trim(), + imageUrls && imageUrls.length > 0 ? imageUrls : null + ); + return { success: true, message: "Complaint raised successfully" }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/order.ts +var placeOrderUtil, orderRouter2; +var init_order4 = __esm({ + "src/trpc/apis/user-apis/apis/order.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_dbService(); + init_common3(); + init_s3_client(); + init_api_error(); + init_notif_job(); + init_const_store(); + init_post_order_handler(); + placeOrderUtil = /* @__PURE__ */ __name(async (params) => { + const { + userId, + selectedItems, + addressId, + paymentMethod, + couponId, + userNotes + } = params; + const constants2 = await getConstants([ + CONST_KEYS.minRegularOrderValue, + CONST_KEYS.deliveryCharge, + CONST_KEYS.flashFreeDeliveryThreshold, + CONST_KEYS.flashDeliveryCharge + ]); + const isFlashDelivery = params.isFlash; + const minOrderValue2 = (isFlashDelivery ? constants2[CONST_KEYS.flashFreeDeliveryThreshold] : constants2[CONST_KEYS.minRegularOrderValue]) || 0; + const deliveryCharge2 = (isFlashDelivery ? constants2[CONST_KEYS.flashDeliveryCharge] : constants2[CONST_KEYS.deliveryCharge]) || 0; + const orderGroupId = `${Date.now()}-${userId}`; + const address = await getAddressByIdAndUser(addressId, userId); + if (!address) { + throw new ApiError("Invalid address", 400); + } + const ordersBySlot = /* @__PURE__ */ new Map(); + for (const item of selectedItems) { + const product = await getProductById4(item.productId); + if (!product) { + throw new ApiError(`Product ${item.productId} not found`, 400); + } + if (!ordersBySlot.has(item.slotId)) { + ordersBySlot.set(item.slotId, []); + } + ordersBySlot.get(item.slotId).push({ ...item, product }); + } + if (params.isFlash) { + for (const item of selectedItems) { + const product = await getProductById4(item.productId); + if (!product?.isFlashAvailable) { + throw new ApiError(`Product ${item.productId} is not available for flash delivery`, 400); + } + } + } + let totalAmount = 0; + for (const [slotId, items] of ordersBySlot) { + const orderTotal = items.reduce( + (sum2, item) => { + if (!item.product) + return sum2; + const basePrice = params.isFlash ? item.product.flashPrice ?? item.product.price : item.product.price; + const itemPrice = parseFloat((basePrice ?? 0).toString()); + return sum2 + itemPrice * item.quantity; + }, + 0 + ); + totalAmount += orderTotal; + } + const appliedCoupon = await validateAndGetCoupon(couponId, userId, totalAmount); + const expectedDeliveryCharge = totalAmount < minOrderValue2 ? deliveryCharge2 : 0; + const totalWithDelivery = totalAmount + expectedDeliveryCharge; + const ordersData = []; + let isFirstOrder = true; + for (const [slotId, items] of ordersBySlot) { + const subOrderTotal = items.reduce( + (sum2, item) => { + if (!item.product) + return sum2; + const basePrice = params.isFlash ? item.product.flashPrice ?? item.product.price : item.product.price; + const itemPrice = parseFloat((basePrice ?? 0).toString()); + return sum2 + itemPrice * item.quantity; + }, + 0 + ); + const subOrderTotalWithDelivery = subOrderTotal + expectedDeliveryCharge; + const orderGroupProportion = subOrderTotal / totalAmount; + const orderTotalAmount = isFirstOrder ? subOrderTotalWithDelivery : subOrderTotal; + const { finalOrderTotal: finalOrderAmount } = applyDiscountToOrder( + orderTotalAmount, + appliedCoupon, + orderGroupProportion + ); + const order = { + userId, + addressId, + slotId: params.isFlash ? null : slotId, + isCod: paymentMethod === "cod", + isOnlinePayment: paymentMethod === "online", + paymentInfoId: null, + totalAmount: finalOrderAmount.toString(), + deliveryCharge: isFirstOrder ? expectedDeliveryCharge.toString() : "0", + readableId: -1, + userNotes: userNotes || null, + orderGroupId, + orderGroupProportion: orderGroupProportion.toString(), + isFlashDelivery: params.isFlash + }; + const validItems = items.filter( + (item) => item.product !== null && item.product !== void 0 + ); + const orderItemsData = validItems.map( + (item) => { + const basePrice = params.isFlash ? item.product.flashPrice ?? item.product.price : item.product.price; + const priceString = (basePrice ?? 0).toString(); + return { + orderId: 0, + productId: item.productId, + quantity: item.quantity.toString(), + price: priceString, + discountedPrice: priceString + }; + } + ); + const orderStatusData = { + userId, + orderId: 0, + paymentStatus: paymentMethod === "cod" ? "cod" : "pending" + }; + ordersData.push({ order, orderItems: orderItemsData, orderStatus: orderStatusData }); + isFirstOrder = false; + } + const createdOrders = await placeOrderTransaction({ + userId, + ordersData, + paymentMethod, + totalWithDelivery + }); + await deleteCartItemsForOrder( + userId, + selectedItems.map((item) => item.productId) + ); + if (appliedCoupon && createdOrders.length > 0) { + await recordCouponUsage( + userId, + appliedCoupon.id, + createdOrders[0].id + ); + } + for (const order of createdOrders) { + sendOrderPlacedNotification(userId, order.id.toString()); + } + await publishFormattedOrder(createdOrders, ordersBySlot); + return { success: true, data: createdOrders }; + }, "placeOrderUtil"); + orderRouter2 = router2({ + placeOrder: protectedProcedure.input( + external_exports.object({ + selectedItems: external_exports.array( + external_exports.object({ + productId: external_exports.number().int().positive(), + quantity: external_exports.number().int().positive(), + slotId: external_exports.union([external_exports.number().int(), external_exports.null()]) + }) + ), + addressId: external_exports.number().int().positive(), + paymentMethod: external_exports.enum(["online", "cod"]), + couponId: external_exports.number().int().positive().optional(), + userNotes: external_exports.string().optional(), + isFlashDelivery: external_exports.boolean().optional().default(false) + }) + ).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const isSuspended = await checkUserSuspended(userId); + if (isSuspended) { + throw new ApiError("Unable to place order", 403); + } + const { + selectedItems, + addressId, + paymentMethod, + couponId, + userNotes, + isFlashDelivery + } = input; + if (isFlashDelivery) { + const isFlashDeliveryEnabled = await getConstant(CONST_KEYS.isFlashDeliveryEnabled); + if (!isFlashDeliveryEnabled) { + throw new ApiError("Flash delivery is currently unavailable. Please opt for scheduled delivery.", 403); + } + } + if (!isFlashDelivery) { + const slotIds = [...new Set(selectedItems.filter((i2) => i2.slotId !== null).map((i2) => i2.slotId))]; + for (const slotId of slotIds) { + const isCapacityFull = await getSlotCapacityStatus(slotId); + if (isCapacityFull) { + throw new ApiError("Selected delivery slot is at full capacity. Please choose another slot.", 403); + } + } + } + let processedItems = selectedItems; + if (isFlashDelivery) { + processedItems = selectedItems.map((item) => ({ + ...item, + slotId: null + })); + } + return await placeOrderUtil({ + userId, + selectedItems: processedItems, + addressId, + paymentMethod, + couponId, + userNotes, + isFlash: isFlashDelivery + }); + }), + getOrders: protectedProcedure.input( + external_exports.object({ + page: external_exports.number().min(1).default(1), + pageSize: external_exports.number().min(1).max(50).default(10) + }).optional() + ).query(async ({ input, ctx }) => { + const { page = 1, pageSize = 10 } = input || {}; + const userId = ctx.user.userId; + const offset = (page - 1) * pageSize; + const totalCount = await getOrderCount(userId); + const userOrders = await getOrdersWithRelations(userId, offset, pageSize); + const mappedOrders = await Promise.all( + userOrders.map(async (order) => { + const status = order.orderStatus[0]; + const refund = order.refunds[0]; + let deliveryStatus; + let orderStatus3; + const allItemsPackaged = order.orderItems.every( + (item) => item.is_packaged + ); + if (status?.isCancelled) { + deliveryStatus = "cancelled"; + orderStatus3 = "cancelled"; + } else if (status?.isDelivered) { + deliveryStatus = "success"; + orderStatus3 = "success"; + } else if (allItemsPackaged) { + deliveryStatus = "packaged"; + orderStatus3 = "success"; + } else { + deliveryStatus = "pending"; + orderStatus3 = "success"; + } + const paymentMode = order.isCod ? "CoD" : "Online"; + const paymentStatus = status?.paymentStatus || "pending"; + const refundStatus = refund?.refundStatus || "none"; + const refundAmount = refund?.refundAmount ? parseFloat(refund.refundAmount.toString()) : null; + const items = await Promise.all( + order.orderItems.map(async (item) => { + const signedImages = item.product.images ? scaffoldAssetUrl( + item.product.images + ) : []; + return { + productName: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat(item.price.toString()), + discountedPrice: parseFloat( + item.discountedPrice?.toString() || item.price.toString() + ), + amount: parseFloat(item.price.toString()) * parseFloat(item.quantity), + image: signedImages[0] || null + }; + }) + ); + return { + id: order.id, + orderId: `ORD${order.id}`, + orderDate: order.createdAt.toISOString(), + deliveryStatus, + deliveryDate: order.slot?.deliveryTime.toISOString(), + orderStatus: orderStatus3, + cancelReason: status?.cancelReason || null, + paymentMode, + totalAmount: Number(order.totalAmount), + deliveryCharge: Number(order.deliveryCharge), + paymentStatus, + refundStatus, + refundAmount, + userNotes: order.userNotes || null, + items, + isFlashDelivery: order.isFlashDelivery, + createdAt: order.createdAt.toISOString() + }; + }) + ); + return { + success: true, + data: mappedOrders, + pagination: { + page, + pageSize, + totalCount, + totalPages: Math.ceil(totalCount / pageSize) + } + }; + }), + getOrderById: protectedProcedure.input(external_exports.object({ orderId: external_exports.string() })).query(async ({ input, ctx }) => { + const { orderId } = input; + const userId = ctx.user.userId; + const order = await getOrderByIdWithRelations(parseInt(orderId), userId); + if (!order) { + throw new Error("Order not found"); + } + const couponUsageData = await getCouponUsageForOrder(order.id); + let couponData = null; + if (couponUsageData.length > 0) { + let totalDiscountAmount = 0; + const orderTotal = parseFloat(order.totalAmount.toString()); + for (const usage of couponUsageData) { + let discountAmount = 0; + if (usage.coupon.discountPercent) { + discountAmount = orderTotal * parseFloat(usage.coupon.discountPercent.toString()) / 100; + } else if (usage.coupon.flatDiscount) { + discountAmount = parseFloat(usage.coupon.flatDiscount.toString()); + } + if (usage.coupon.maxValue && discountAmount > parseFloat(usage.coupon.maxValue.toString())) { + discountAmount = parseFloat(usage.coupon.maxValue.toString()); + } + totalDiscountAmount += discountAmount; + } + couponData = { + couponCode: couponUsageData.map((u5) => u5.coupon.couponCode).join(", "), + couponDescription: `${couponUsageData.length} coupons applied`, + discountAmount: totalDiscountAmount + }; + } + const status = order.orderStatus[0]; + const refund = order.refunds[0]; + let deliveryStatus; + let orderStatusResult; + const allItemsPackaged = order.orderItems.every( + (item) => item.is_packaged + ); + if (status?.isCancelled) { + deliveryStatus = "cancelled"; + orderStatusResult = "cancelled"; + } else if (status?.isDelivered) { + deliveryStatus = "success"; + orderStatusResult = "success"; + } else if (allItemsPackaged) { + deliveryStatus = "packaged"; + orderStatusResult = "success"; + } else { + deliveryStatus = "pending"; + orderStatusResult = "success"; + } + const paymentMode = order.isCod ? "CoD" : "Online"; + const paymentStatus = status?.paymentStatus || "pending"; + const refundStatus = refund?.refundStatus || "none"; + const refundAmount = refund?.refundAmount ? parseFloat(refund.refundAmount.toString()) : null; + const items = await Promise.all( + order.orderItems.map(async (item) => { + const signedImages = item.product.images ? scaffoldAssetUrl( + item.product.images + ) : []; + return { + productName: item.product.name, + quantity: parseFloat(item.quantity), + price: parseFloat(item.price.toString()), + discountedPrice: parseFloat( + item.discountedPrice?.toString() || item.price.toString() + ), + amount: parseFloat(item.price.toString()) * parseFloat(item.quantity), + image: signedImages[0] || null + }; + }) + ); + return { + id: order.id, + orderId: `ORD${order.id}`, + orderDate: order.createdAt.toISOString(), + deliveryStatus, + deliveryDate: order.slot?.deliveryTime.toISOString(), + orderStatus: orderStatusResult, + cancellationStatus: orderStatusResult, + cancelReason: status?.cancelReason || null, + paymentMode, + paymentStatus, + refundStatus, + refundAmount, + userNotes: order.userNotes || null, + items, + couponCode: couponData?.couponCode || null, + couponDescription: couponData?.couponDescription || null, + discountAmount: couponData?.discountAmount || null, + orderAmount: parseFloat(order.totalAmount.toString()), + isFlashDelivery: order.isFlashDelivery, + createdAt: order.createdAt.toISOString(), + totalAmount: parseFloat(order.totalAmount.toString()), + deliveryCharge: parseFloat(order.deliveryCharge.toString()) + }; + }), + cancelOrder: protectedProcedure.input( + external_exports.object({ + id: external_exports.number(), + reason: external_exports.string().min(1, "Cancellation reason is required") + }) + ).mutation(async ({ input, ctx }) => { + try { + const userId = ctx.user.userId; + const { id, reason } = input; + const order = await getOrderBasic(id); + if (!order) { + console.error("Order not found:", id); + throw new ApiError("Order not found", 404); + } + if (order.userId !== userId) { + console.error("Order does not belong to user:", { + orderId: id, + orderUserId: order.userId, + requestUserId: userId + }); + throw new ApiError("Order not found", 404); + } + const status = order.orderStatus[0]; + if (!status) { + console.error("Order status not found for order:", id); + throw new ApiError("Order status not found", 400); + } + if (status.isCancelled) { + console.error("Order is already cancelled:", id); + throw new ApiError("Order is already cancelled", 400); + } + if (status.isDelivered) { + console.error("Cannot cancel delivered order:", id); + throw new ApiError("Cannot cancel delivered order", 400); + } + await cancelOrderTransaction(id, status.id, reason, order.isCod); + await sendOrderCancelledNotification(userId, id.toString()); + await publishCancellation(id, "user", reason); + return { success: true, message: "Order cancelled successfully" }; + } catch (e2) { + console.log(e2); + throw new ApiError("failed to cancel order"); + } + }), + updateUserNotes: protectedProcedure.input( + external_exports.object({ + id: external_exports.number(), + userNotes: external_exports.string() + }) + ).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { id, userNotes } = input; + const order = await getOrderBasic(id); + if (!order) { + console.error("Order not found:", id); + throw new ApiError("Order not found", 404); + } + if (order.userId !== userId) { + console.error("Order does not belong to user:", { + orderId: id, + orderUserId: order.userId, + requestUserId: userId + }); + throw new ApiError("Order not found", 404); + } + const status = order.orderStatus[0]; + if (!status) { + console.error("Order status not found for order:", id); + throw new ApiError("Order status not found", 400); + } + if (status.isDelivered) { + console.error("Cannot update notes for delivered order:", id); + throw new ApiError("Cannot update notes for delivered order", 400); + } + if (status.isCancelled) { + console.error("Cannot update notes for cancelled order:", id); + throw new ApiError("Cannot update notes for cancelled order", 400); + } + await updateOrderNotes2(id, userNotes); + return { success: true, message: "Notes updated successfully" }; + }), + getRecentlyOrderedProducts: protectedProcedure.input( + external_exports.object({ + limit: external_exports.number().min(1).max(50).default(20) + }).optional() + ).query(async ({ input, ctx }) => { + const { limit = 20 } = input || {}; + const userId = ctx.user.userId; + const thirtyDaysAgo = /* @__PURE__ */ new Date(); + thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30); + const recentOrderIds = await getRecentlyDeliveredOrderIds(userId, 10, thirtyDaysAgo); + if (recentOrderIds.length === 0) { + return { success: true, products: [] }; + } + const productIds = await getProductIdsFromOrders(recentOrderIds); + if (productIds.length === 0) { + return { success: true, products: [] }; + } + const productsWithUnits = await getProductsForRecentOrders(productIds, limit); + const formattedProducts = await Promise.all( + productsWithUnits.map(async (product) => { + const nextDeliveryDate = await getNextDeliveryDate(product.id); + return { + id: product.id, + name: product.name, + shortDescription: product.shortDescription, + price: product.price, + unit: product.unitShortNotation, + incrementStep: product.incrementStep, + isOutOfStock: product.isOutOfStock, + nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null, + images: scaffoldAssetUrl( + product.images || [] + ) + }; + }) + ); + return { + success: true, + products: formattedProducts + }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/product.ts +var import_dayjs4, signProductImages, productRouter2; +var init_product4 = __esm({ + "src/trpc/apis/user-apis/apis/product.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_s3_client(); + init_api_error(); + init_product_store(); + import_dayjs4 = __toESM(require_dayjs_min()); + init_dbService(); + signProductImages = /* @__PURE__ */ __name((product) => ({ + ...product, + images: scaffoldAssetUrl(product.images || []) + }), "signProductImages"); + productRouter2 = router2({ + getProductDetails: publicProcedure.input(external_exports.object({ + id: external_exports.string().regex(/^\d+$/, "Invalid product ID") + })).query(async ({ input }) => { + const { id } = input; + const productId = parseInt(id); + if (isNaN(productId)) { + throw new Error("Invalid product ID"); + } + console.log("from the api to get product details"); + const cachedProduct = await getProductById5(productId); + if (cachedProduct) { + const currentTime = /* @__PURE__ */ new Date(); + const filteredSlots = cachedProduct.deliverySlots.filter( + (slot) => (0, import_dayjs4.default)(slot.freezeTime).isAfter(currentTime) && !slot.isCapacityFull + ); + return { + ...cachedProduct, + deliverySlots: filteredSlots + }; + } + const productData = await getProductDetailById(productId); + if (!productData) { + throw new Error("Product not found"); + } + return signProductImages(productData); + }), + getProductReviews: publicProcedure.input(external_exports.object({ + productId: external_exports.number().int().positive(), + limit: external_exports.number().int().min(1).max(50).optional().default(10), + offset: external_exports.number().int().min(0).optional().default(0) + })).query(async ({ input }) => { + const { productId, limit, offset } = input; + const { reviews, totalCount } = await getProductReviews2(productId, limit, offset); + const reviewsWithSignedUrls = reviews.map((review) => ({ + ...review, + signedImageUrls: scaffoldAssetUrl(review.imageUrls || []) + })); + const hasMore = offset + limit < totalCount; + return { reviews: reviewsWithSignedUrls, hasMore }; + }), + createReview: protectedProcedure.input(external_exports.object({ + productId: external_exports.number().int().positive(), + reviewBody: external_exports.string().min(1, "Review body is required"), + ratings: external_exports.number().int().min(1).max(5), + imageUrls: external_exports.array(external_exports.string()).optional().default([]), + uploadUrls: external_exports.array(external_exports.string()).optional().default([]) + })).mutation(async ({ input, ctx }) => { + const { productId, reviewBody, ratings, imageUrls, uploadUrls } = input; + const userId = ctx.user.userId; + const product = await getProductById3(productId); + if (!product) { + throw new ApiError("Product not found", 404); + } + const imageKeys = uploadUrls.map((item) => extractKeyFromPresignedUrl(item)); + const newReview = await createProductReview(userId, productId, reviewBody, ratings, imageKeys); + if (uploadUrls && uploadUrls.length > 0) { + try { + await Promise.all(uploadUrls.map((url2) => claimUploadUrl(url2))); + } catch (error50) { + console.error("Error claiming upload URLs:", error50); + } + } + return { success: true, review: newReview }; + }), + getAllProductsSummary: publicProcedure.query(async () => { + const allCachedProducts = await getAllProducts2(); + const transformedProducts = allCachedProducts.map((product) => ({ + ...product, + images: product.images || [], + deliverySlots: [], + specialDeals: [] + })); + return transformedProducts; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/user.ts +var userRouter2; +var init_user4 = __esm({ + "src/trpc/apis/user-apis/apis/user.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_env_exporter(); + init_s3_client(); + init_dbService(); + userRouter2 = router2({ + getSelfData: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const user = await getUserById2(userId); + if (!user) { + throw new ApiError("User not found", 404); + } + const userDetail = await getUserDetailByUserId(userId); + const profileImageSignedUrl = userDetail?.profileImage ? await generateSignedUrlFromS3Url(userDetail.profileImage) : null; + return { + success: true, + data: { + user: { + id: user.id, + name: user.name, + email: user.email, + mobile: user.mobile, + profileImage: profileImageSignedUrl, + bio: userDetail?.bio || null, + dateOfBirth: userDetail?.dateOfBirth ? new Date(userDetail.dateOfBirth).toISOString() : null, + gender: userDetail?.gender || null, + occupation: userDetail?.occupation || null + } + } + }; + }), + checkProfileComplete: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + if (!userId) { + throw new ApiError("User not authenticated", 401); + } + const result = await getUserWithCreds(userId); + if (!result) { + throw new ApiError("User not found", 404); + } + return { + isComplete: !!(result.user.name && result.user.email && result.creds) + }; + }), + savePushToken: publicProcedure.input(external_exports.object({ token: external_exports.string() })).mutation(async ({ input, ctx }) => { + const { token } = input; + const userId = ctx.user?.userId; + if (userId) { + await upsertNotifCred(userId, token); + await deleteUnloggedToken(token); + } else { + const existing = await getUnloggedToken(token); + if (existing) { + await upsertUnloggedToken(token); + } else { + await upsertUnloggedToken(token); + } + } + return { success: true }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/coupon.ts +var generateCouponDescription, userCouponRouter; +var init_coupon4 = __esm({ + "src/trpc/apis/user-apis/apis/coupon.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_dbService(); + generateCouponDescription = /* @__PURE__ */ __name((coupon) => { + let desc2 = ""; + if (coupon.discountPercent) { + desc2 += `${coupon.discountPercent}% off`; + } else if (coupon.flatDiscount) { + desc2 += `\u20B9${coupon.flatDiscount} off`; + } + if (coupon.minOrder) { + desc2 += ` on orders above \u20B9${coupon.minOrder}`; + } + if (coupon.maxValue) { + desc2 += ` (max discount \u20B9${coupon.maxValue})`; + } + return desc2; + }, "generateCouponDescription"); + userCouponRouter = router2({ + getEligible: protectedProcedure.query(async ({ ctx }) => { + try { + const userId = ctx.user.userId; + const allCoupons = await getActiveCouponsWithRelations(userId); + const applicableCoupons = allCoupons.filter((coupon) => { + if (!coupon.isUserBased) + return true; + const applicableUsers = coupon.applicableUsers || []; + return applicableUsers.some((au2) => au2.userId === userId); + }); + return { success: true, data: applicableCoupons }; + } catch (e2) { + console.log(e2); + throw new ApiError("Unable to get coupons"); + } + }), + getProductCoupons: protectedProcedure.input(external_exports.object({ productId: external_exports.number().int().positive() })).query(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { productId } = input; + const allCoupons = await getActiveCouponsWithRelations(userId); + const applicableCoupons = allCoupons.filter((coupon) => { + const applicableUsers = coupon.applicableUsers || []; + const userApplicable = !coupon.isUserBased || applicableUsers.some((au2) => au2.userId === userId); + const applicableProducts = coupon.applicableProducts || []; + const productApplicable = applicableProducts.length === 0 || applicableProducts.some((ap2) => ap2.productId === productId); + return userApplicable && productApplicable; + }); + return { success: true, data: applicableCoupons }; + }), + getMyCoupons: protectedProcedure.query(async ({ ctx }) => { + const userId = ctx.user.userId; + const allCoupons = await getAllCouponsWithRelations(userId); + const applicableCoupons = allCoupons.filter((coupon) => { + const isNotInvalidated = !coupon.isInvalidated; + const applicableUsers = coupon.applicableUsers || []; + const isApplicable = coupon.isApplyForAll || applicableUsers.some((au2) => au2.userId === userId); + const isNotExpired = !coupon.validTill || new Date(coupon.validTill) > /* @__PURE__ */ new Date(); + return isNotInvalidated && isApplicable && isNotExpired; + }); + const personalCoupons = []; + const generalCoupons = []; + applicableCoupons.forEach((coupon) => { + const usageCount = coupon.usages.length; + const isExpired = false; + const isUsedUp = Boolean(coupon.maxLimitForUser && usageCount >= coupon.maxLimitForUser); + const couponDisplay = { + id: coupon.id, + code: coupon.couponCode, + discountType: coupon.discountPercent ? "percentage" : "flat", + discountValue: parseFloat(coupon.discountPercent || coupon.flatDiscount || "0"), + maxValue: coupon.maxValue ? parseFloat(coupon.maxValue) : void 0, + minOrder: coupon.minOrder ? parseFloat(coupon.minOrder) : void 0, + description: generateCouponDescription(coupon), + validTill: coupon.validTill ? new Date(coupon.validTill) : void 0, + usageCount, + maxLimitForUser: coupon.maxLimitForUser ? parseInt(coupon.maxLimitForUser.toString()) : void 0, + isExpired, + isUsedUp + }; + if ((coupon.applicableUsers || []).some((au2) => au2.userId === userId) && !coupon.isApplyForAll) { + personalCoupons.push(couponDisplay); + } else if (coupon.isApplyForAll) { + generalCoupons.push(couponDisplay); + } + }); + return { + success: true, + data: { + personal: personalCoupons, + general: generalCoupons + } + }; + }), + redeemReservedCoupon: protectedProcedure.input(external_exports.object({ secretCode: external_exports.string() })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { secretCode } = input; + const reservedCoupon = await getReservedCouponByCode(secretCode); + if (!reservedCoupon) { + throw new ApiError("Invalid or already redeemed coupon code", 400); + } + if (reservedCoupon.redeemedBy === userId) { + throw new ApiError("You have already redeemed this coupon", 400); + } + const couponResult = await redeemReservedCoupon(userId, reservedCoupon); + return { success: true, coupon: couponResult }; + }) + }); + } +}); + +// src/lib/payments-utils.ts +var RazorpayPaymentService; +var init_payments_utils = __esm({ + "src/lib/payments-utils.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + RazorpayPaymentService = class { + // private static instance = new Razorpay({ + // key_id: razorpayId, + // key_secret: razorpaySecret, + // }); + // + static async createOrder(orderId, amount) { + } + static async insertPaymentRecord(orderId, razorpayOrder, tx) { + } + static async initiateRefund(paymentId, amount) { + } + static async fetchRefund(refundId) { + } + }; + __name(RazorpayPaymentService, "RazorpayPaymentService"); + } +}); + +// src/trpc/apis/user-apis/apis/payments.ts +var paymentRouter; +var init_payments3 = __esm({ + "src/trpc/apis/user-apis/apis/payments.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_api_error(); + init_crypto3(); + init_env_exporter(); + init_payments_utils(); + init_dbService(); + paymentRouter = router2({ + createRazorpayOrder: protectedProcedure.input(external_exports.object({ + orderId: external_exports.string() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { orderId } = input; + const order = await getOrderById(parseInt(orderId)); + if (!order) { + throw new ApiError("Order not found", 404); + } + if (order.userId !== userId) { + throw new ApiError("Order does not belong to user", 403); + } + const existingPayment = await getPaymentByOrderId(parseInt(orderId)); + if (existingPayment && existingPayment.status === "pending") { + return { + razorpayOrderId: existingPayment.merchantOrderId, + key: razorpayId + }; + } + if (order.totalAmount === null) { + throw new ApiError("Order total is missing", 400); + } + const razorpayOrder = await RazorpayPaymentService.createOrder(parseInt(orderId), order.totalAmount); + await RazorpayPaymentService.insertPaymentRecord(parseInt(orderId), razorpayOrder); + return { + razorpayOrderId: 0, + key: razorpayId + }; + }), + verifyPayment: protectedProcedure.input(external_exports.object({ + razorpay_payment_id: external_exports.string(), + razorpay_order_id: external_exports.string(), + razorpay_signature: external_exports.string() + })).mutation(async ({ input, ctx }) => { + const { razorpay_payment_id, razorpay_order_id, razorpay_signature } = input; + const expectedSignature = crypto_default.createHmac("sha256", razorpaySecret).update(razorpay_order_id + "|" + razorpay_payment_id).digest("hex"); + if (expectedSignature !== razorpay_signature) { + throw new ApiError("Invalid payment signature", 400); + } + const currentPayment = await getPaymentByMerchantOrderId(razorpay_order_id); + if (!currentPayment) { + throw new ApiError("Payment record not found", 404); + } + const updatedPayload = { + ...currentPayment.payload || {}, + payment_id: razorpay_payment_id, + signature: razorpay_signature + }; + const updatedPayment = await updatePaymentSuccess(razorpay_order_id, updatedPayload); + if (!updatedPayment) { + throw new ApiError("Payment record not found", 404); + } + await updateOrderPaymentStatus(updatedPayment.orderId, "success"); + return { + success: true, + message: "Payment verified successfully" + }; + }), + markPaymentFailed: protectedProcedure.input(external_exports.object({ + merchantOrderId: external_exports.string() + })).mutation(async ({ input, ctx }) => { + const userId = ctx.user.userId; + const { merchantOrderId } = input; + const payment = await getPaymentByMerchantOrderId(merchantOrderId); + if (!payment) { + throw new ApiError("Payment not found", 404); + } + const order = await getOrderById(payment.orderId); + if (!order || order.userId !== userId) { + throw new ApiError("Payment does not belong to user", 403); + } + await markPaymentFailed(payment.id); + return { + success: true, + message: "Payment marked as failed" + }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/file-upload.ts +var fileUploadRouter; +var init_file_upload = __esm({ + "src/trpc/apis/user-apis/apis/file-upload.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_s3_client(); + init_api_error(); + fileUploadRouter = router2({ + generateUploadUrls: protectedProcedure.input(external_exports.object({ + contextString: external_exports.enum(["review", "product_info", "notification", "complaint", "profile", "tags"]), + mimeTypes: external_exports.array(external_exports.string()) + })).mutation(async ({ input }) => { + const { contextString, mimeTypes } = input; + const uploadUrls = []; + const keys = []; + for (const mimeType of mimeTypes) { + let folder; + if (contextString === "review") { + folder = "review-images"; + } else if (contextString === "product_info") { + folder = "product-images"; + } else if (contextString === "notification") { + folder = "notification-images"; + } else if (contextString === "complaint") { + folder = "complaint-images"; + } else if (contextString === "profile") { + folder = "profile-images"; + } else if (contextString === "tags") { + folder = "tags"; + } else { + folder = ""; + } + const extension = mimeType === "image/jpeg" ? ".jpg" : mimeType === "image/png" ? ".png" : mimeType === "image/gif" ? ".gif" : ".jpg"; + const key = `${folder}/${Date.now()}${extension}`; + try { + const uploadUrl = await generateUploadUrl(key, mimeType); + uploadUrls.push(uploadUrl); + keys.push(key); + } catch (error50) { + console.error("Error generating upload URL:", error50); + throw new ApiError("Failed to generate upload URL", 500); + } + } + return { uploadUrls }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/tags.ts +var tagsRouter; +var init_tags = __esm({ + "src/trpc/apis/user-apis/apis/tags.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_product_tag_store(); + tagsRouter = router2({ + getTagsByStore: publicProcedure.input(external_exports.object({ + storeId: external_exports.number() + })).query(async ({ input }) => { + const { storeId } = input; + const tags = await getTagsByStoreId(storeId); + return { + tags: tags.map((tag2) => ({ + id: tag2.id, + tagName: tag2.tagName, + tagDescription: tag2.tagDescription, + imageUrl: tag2.imageUrl, + productIds: tag2.productIds + })) + }; + }) + }); + } +}); + +// src/trpc/apis/user-apis/apis/user-trpc-index.ts +var userRouter3; +var init_user_trpc_index = __esm({ + "src/trpc/apis/user-apis/apis/user-trpc-index.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_address2(); + init_auth4(); + init_banners2(); + init_cart2(); + init_complaint4(); + init_order4(); + init_product4(); + init_slots3(); + init_user4(); + init_coupon4(); + init_payments3(); + init_stores2(); + init_file_upload(); + init_tags(); + userRouter3 = router2({ + address: addressRouter, + auth: authRouter, + banner: bannerRouter, + cart: cartRouter, + complaint: complaintRouter2, + order: orderRouter2, + product: productRouter2, + slots: slotsRouter, + user: userRouter2, + coupon: userCouponRouter, + payment: paymentRouter, + stores: storesRouter, + fileUpload: fileUploadRouter, + tags: tagsRouter + }); + } +}); + +// src/trpc/router.ts +var appRouter; +var init_router5 = __esm({ + "src/trpc/router.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_trpc_index(); + init_zod(); + init_admin_trpc_index(); + init_user_trpc_index(); + init_common_trpc_index(); + appRouter = router2({ + hello: publicProcedure.input(external_exports.object({ name: external_exports.string() })).query(({ input }) => { + return { greeting: `Hello ${input.name}!` }; + }), + admin: adminRouter, + user: userRouter3, + common: commonApiRouter + }); + } +}); + +// src/app.ts +var app_exports = {}; +__export(app_exports, { + createApp: () => createApp +}); +var createApp; +var init_app = __esm({ + "src/app.ts"() { + "use strict"; + init_strip_cf_connecting_ip_header(); + init_modules_watch_stub(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); + init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); + init_performance2(); + init_dist(); + init_cors(); + init_logger(); + init_dist2(); + init_dbService(); + init_main_router(); + init_router5(); + init_dist3(); + init_webapi(); + init_env_exporter(); + createApp = /* @__PURE__ */ __name(() => { + const app = new Hono2(); + app.use(cors({ + origin: "http://localhost:5174", + allowMethods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], + allowHeaders: ["Origin", "X-Requested-With", "Content-Type", "Accept", "Authorization"], + credentials: true + })); + app.use(logger()); + app.use("/api/trpc/*", trpcServer({ + router: appRouter, + createContext: async ({ req }) => { + let user = null; + let staffUser = null; + const authHeader = req.headers.get("authorization"); + if (authHeader?.startsWith("Bearer ")) { + const token = authHeader.substring(7); + try { + const { payload } = await jwtVerify(token, getEncodedJwtSecret()); + const decoded = payload; + if (decoded.staffId) { + const staff = await getStaffUserById(decoded.staffId); + if (staff) { + user = staffUser; + staffUser = { + id: staff.id, + name: staff.name + }; + } + } else { + user = decoded; + const suspended = await isUserSuspended(user.userId); + if (suspended) { + throw new TRPCError({ + code: "FORBIDDEN", + message: "Account suspended" + }); + } + } + } catch (err) { + } + } + return { req, user, staffUser }; + }, + onError({ error: error50, path, type, ctx }) { + console.error("\u{1F6A8} tRPC Error :", { + path, + type, + code: error50.code, + message: error50.message, + userId: ctx?.user?.userId, + stack: error50.stack + }); + } + })); + app.route("/api", main_router_default); + app.onError((err, c2) => { + console.error(err); + let status = 500; + let message2 = "Internal Server Error"; + if (err instanceof TRPCError) { + const trpcStatusMap = { + BAD_REQUEST: 400, + UNAUTHORIZED: 401, + FORBIDDEN: 403, + NOT_FOUND: 404, + TIMEOUT: 408, + CONFLICT: 409, + PRECONDITION_FAILED: 412, + PAYLOAD_TOO_LARGE: 413, + METHOD_NOT_SUPPORTED: 405, + UNPROCESSABLE_CONTENT: 422, + TOO_MANY_REQUESTS: 429, + INTERNAL_SERVER_ERROR: 500 + }; + status = trpcStatusMap[err.code] || 500; + message2 = err.message; + } else if (err.statusCode) { + status = err.statusCode; + message2 = err.message; + } else if (err.status) { + status = err.status; + message2 = err.message; + } else if (err.message) { + message2 = err.message; + } + return c2.json({ message: message2 }, status); + }); + return app; + }, "createApp"); + } +}); + +// .wrangler/tmp/bundle-aek2Ls/middleware-loader.entry.ts +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// .wrangler/tmp/bundle-aek2Ls/middleware-insertion-facade.js +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); + +// worker.ts +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var worker_default = { + async fetch(request, env2, ctx) { + ; + globalThis.ENV = env2; + const { createApp: createApp2 } = await Promise.resolve().then(() => (init_app(), app_exports)); + const { initDb: initDb2 } = await Promise.resolve().then(() => (init_dbService(), dbService_exports)); + if (env2.DB) { + initDb2(env2.DB); + } + const app = createApp2(); + return app.fetch(request, env2, ctx); + } +}; + +// ../../node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var drainBody = /* @__PURE__ */ __name(async (request, env2, _ctx, middlewareCtx) => { + try { + return await middlewareCtx.next(request, env2); + } finally { + try { + if (request.body !== null && !request.bodyUsed) { + const reader = request.body.getReader(); + while (!(await reader.read()).done) { + } + } + } catch (e2) { + console.error("Failed to drain the unused request body.", e2); + } + } +}, "drainBody"); +var middleware_ensure_req_body_drained_default = drainBody; + +// ../../node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +function reduceError(e2) { + return { + name: e2?.name, + message: e2?.message ?? String(e2), + stack: e2?.stack, + cause: e2?.cause === void 0 ? void 0 : reduceError(e2.cause) + }; +} +__name(reduceError, "reduceError"); +var jsonError = /* @__PURE__ */ __name(async (request, env2, _ctx, middlewareCtx) => { + try { + return await middlewareCtx.next(request, env2); + } catch (e2) { + const error50 = reduceError(e2); + return Response.json(error50, { + status: 500, + headers: { "MF-Experimental-Error-Stack": "true" } + }); + } +}, "jsonError"); +var middleware_miniflare3_json_error_default = jsonError; + +// .wrangler/tmp/bundle-aek2Ls/middleware-insertion-facade.js +var __INTERNAL_WRANGLER_MIDDLEWARE__ = [ + middleware_ensure_req_body_drained_default, + middleware_miniflare3_json_error_default +]; +var middleware_insertion_facade_default = worker_default; + +// ../../node_modules/wrangler/templates/middleware/common.ts +init_strip_cf_connecting_ip_header(); +init_modules_watch_stub(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process(); +init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console(); +init_performance2(); +var __facade_middleware__ = []; +function __facade_register__(...args) { + __facade_middleware__.push(...args.flat()); +} +__name(__facade_register__, "__facade_register__"); +function __facade_invokeChain__(request, env2, ctx, dispatch, middlewareChain) { + const [head, ...tail] = middlewareChain; + const middlewareCtx = { + dispatch, + next(newRequest, newEnv) { + return __facade_invokeChain__(newRequest, newEnv, ctx, dispatch, tail); + } + }; + return head(request, env2, ctx, middlewareCtx); +} +__name(__facade_invokeChain__, "__facade_invokeChain__"); +function __facade_invoke__(request, env2, ctx, dispatch, finalMiddleware) { + return __facade_invokeChain__(request, env2, ctx, dispatch, [ + ...__facade_middleware__, + finalMiddleware + ]); +} +__name(__facade_invoke__, "__facade_invoke__"); + +// .wrangler/tmp/bundle-aek2Ls/middleware-loader.entry.ts +var __Facade_ScheduledController__ = class { + constructor(scheduledTime, cron, noRetry) { + this.scheduledTime = scheduledTime; + this.cron = cron; + this.#noRetry = noRetry; + } + #noRetry; + noRetry() { + if (!(this instanceof __Facade_ScheduledController__)) { + throw new TypeError("Illegal invocation"); + } + this.#noRetry(); + } +}; +__name(__Facade_ScheduledController__, "__Facade_ScheduledController__"); +function wrapExportedHandler(worker) { + if (__INTERNAL_WRANGLER_MIDDLEWARE__ === void 0 || __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0) { + return worker; + } + for (const middleware2 of __INTERNAL_WRANGLER_MIDDLEWARE__) { + __facade_register__(middleware2); + } + const fetchDispatcher = /* @__PURE__ */ __name(function(request, env2, ctx) { + if (worker.fetch === void 0) { + throw new Error("Handler does not export a fetch() function."); + } + return worker.fetch(request, env2, ctx); + }, "fetchDispatcher"); + return { + ...worker, + fetch(request, env2, ctx) { + const dispatcher = /* @__PURE__ */ __name(function(type, init) { + if (type === "scheduled" && worker.scheduled !== void 0) { + const controller = new __Facade_ScheduledController__( + Date.now(), + init.cron ?? "", + () => { + } + ); + return worker.scheduled(controller, env2, ctx); + } + }, "dispatcher"); + return __facade_invoke__(request, env2, ctx, dispatcher, fetchDispatcher); + } + }; +} +__name(wrapExportedHandler, "wrapExportedHandler"); +function wrapWorkerEntrypoint(klass) { + if (__INTERNAL_WRANGLER_MIDDLEWARE__ === void 0 || __INTERNAL_WRANGLER_MIDDLEWARE__.length === 0) { + return klass; + } + for (const middleware2 of __INTERNAL_WRANGLER_MIDDLEWARE__) { + __facade_register__(middleware2); + } + return class extends klass { + #fetchDispatcher = (request, env2, ctx) => { + this.env = env2; + this.ctx = ctx; + if (super.fetch === void 0) { + throw new Error("Entrypoint class does not define a fetch() function."); + } + return super.fetch(request); + }; + #dispatcher = (type, init) => { + if (type === "scheduled" && super.scheduled !== void 0) { + const controller = new __Facade_ScheduledController__( + Date.now(), + init.cron ?? "", + () => { + } + ); + return super.scheduled(controller); + } + }; + fetch(request) { + return __facade_invoke__( + request, + this.env, + this.ctx, + this.#dispatcher, + this.#fetchDispatcher + ); + } + }; +} +__name(wrapWorkerEntrypoint, "wrapWorkerEntrypoint"); +var WRAPPED_ENTRY; +if (typeof middleware_insertion_facade_default === "object") { + WRAPPED_ENTRY = wrapExportedHandler(middleware_insertion_facade_default); +} else if (typeof middleware_insertion_facade_default === "function") { + WRAPPED_ENTRY = wrapWorkerEntrypoint(middleware_insertion_facade_default); +} +var middleware_loader_entry_default = WRAPPED_ENTRY; +export { + __INTERNAL_WRANGLER_MIDDLEWARE__, + middleware_loader_entry_default as default +}; +/*! Bundled license information: + +@trpc/server/dist/resolveResponse-CHqBlAgR.mjs: + (* istanbul ignore if -- @preserve *) + (*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + *) +*/ +//# sourceMappingURL=worker.js.map diff --git a/apps/backend/.wrangler/tmp/dev-zfhbqS/worker.js.map b/apps/backend/.wrangler/tmp/dev-zfhbqS/worker.js.map new file mode 100644 index 0000000..2af5132 --- /dev/null +++ b/apps/backend/.wrangler/tmp/dev-zfhbqS/worker.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "sources": ["../bundle-aek2Ls/strip-cf-connecting-ip-header.js", "../../../../../node_modules/unenv/dist/runtime/_internal/utils.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/perf_hooks/performance.mjs", "../../../../../node_modules/unenv/dist/runtime/node/perf_hooks.mjs", "../../../../../node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs", "../../../../../node_modules/unenv/dist/runtime/mock/noop.mjs", "../../../../../node_modules/unenv/dist/runtime/node/console.mjs", "../../../../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs", "../../../../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-console", "../../../../../node_modules/unenv/dist/runtime/node/internal/process/hrtime.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/tty/read-stream.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/tty/write-stream.mjs", "../../../../../node_modules/unenv/dist/runtime/node/tty.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/process/process.mjs", "../../../../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs", "../../../../../node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-process", "wrangler-modules-watch:wrangler:modules-watch", "../../../../../node_modules/wrangler/templates/modules-watch-stub.js", "../../../../../node_modules/hono/dist/compose.js", "../../../../../node_modules/hono/dist/http-exception.js", "../../../../../node_modules/hono/dist/request/constants.js", "../../../../../node_modules/hono/dist/utils/body.js", "../../../../../node_modules/hono/dist/utils/url.js", "../../../../../node_modules/hono/dist/request.js", "../../../../../node_modules/hono/dist/utils/html.js", "../../../../../node_modules/hono/dist/context.js", "../../../../../node_modules/hono/dist/router.js", "../../../../../node_modules/hono/dist/utils/constants.js", "../../../../../node_modules/hono/dist/hono-base.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/matcher.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/node.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/trie.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/router.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/prepared-router.js", "../../../../../node_modules/hono/dist/router/reg-exp-router/index.js", "../../../../../node_modules/hono/dist/router/smart-router/router.js", "../../../../../node_modules/hono/dist/router/smart-router/index.js", "../../../../../node_modules/hono/dist/router/trie-router/node.js", "../../../../../node_modules/hono/dist/router/trie-router/router.js", "../../../../../node_modules/hono/dist/router/trie-router/index.js", "../../../../../node_modules/hono/dist/hono.js", "../../../../../node_modules/hono/dist/index.js", "../../../../../node_modules/hono/dist/middleware/cors/index.js", "../../../../../node_modules/hono/dist/utils/color.js", "../../../../../node_modules/hono/dist/middleware/logger/index.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/utils.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/rpc/codes.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/createProxy.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/error/getErrorShape.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/error/formatter.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/error/TRPCError.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/transformer.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/router.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/tracked.ts", "../../../../../node_modules/@trpc/server/src/observable/observable.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/parseConnectionParams.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/contentType.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/abortError.ts", "../../../../../node_modules/@trpc/server/src/vendor/is-plain-object.ts", "../../../../../node_modules/@trpc/server/src/vendor/unpromise/unpromise.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/disposable.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/timerResource.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/createDeferred.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/mergeAsyncIterables.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/readableStreamFrom.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/utils/withPing.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/jsonl.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/stream/sse.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/http/resolveResponse.ts", "../../../../../node_modules/@trpc/server/src/adapters/fetch/fetchRequestHandler.ts", "../../../../../node_modules/hono/dist/helper/route/index.js", "../../../../../node_modules/@hono/trpc-server/src/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/entity.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/logger.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/table.utils.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/table.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/column.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/column-builder.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/foreign-keys.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/tracing-utils.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/unique-constraint.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/utils/array.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/columns/common.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/columns/enum.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/subquery.ts", "../../../../../packages/db_helper_sqlite/node_modules/drizzle-orm/version.js", "../../../../../packages/db_helper_sqlite/node_modules/src/tracing.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/view-common.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/sql.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/utils.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/table.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/pg-core/primary-keys.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/expressions/conditions.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/expressions/select.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/expressions/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/relations.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/alias.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/selection-proxy.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/query-promise.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/foreign-keys.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/unique-constraint.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/common.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/blob.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/custom.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/integer.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/numeric.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/real.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/text.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/all.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/table.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/checks.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/indexes.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/primary-keys.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/utils.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/delete.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/casing.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/errors.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/functions/aggregate.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/functions/vector.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/functions/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sql/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/columns/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/view-base.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/dialect.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/query-builders/query-builder.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/select.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/query-builder.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/insert.ts", "../../../../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/query-builders/select.types.js", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/update.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/count.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/query.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/query-builders/raw.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/db.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/cache/core/cache.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/cache/core/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/alias.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/session.ts", "../../../../../packages/db_helper_sqlite/node_modules/drizzle-orm/sqlite-core/subquery.js", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/view.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/sqlite-core/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/d1/session.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/d1/driver.ts", "../../../../../packages/db_helper_sqlite/node_modules/src/d1/index.ts", "../../../../../packages/db_helper_sqlite/node_modules/drizzle-orm/operations.js", "../../../../../packages/db_helper_sqlite/node_modules/src/index.ts", "../../../../../packages/db_helper_sqlite/src/db/schema.ts", "../../../../../packages/db_helper_sqlite/src/db/db_index.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/banner.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/complaint.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/const.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/coupon.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/order.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/product.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/slots.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/staff-user.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/store.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/user.ts", "../../../../../packages/db_helper_sqlite/src/admin-apis/vendor-snippets.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/address.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/banners.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/cart.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/complaint.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/stores.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/product.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/slots.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/payments.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/auth.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/coupon.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/user.ts", "../../../../../packages/db_helper_sqlite/src/lib/date.ts", "../../../../../packages/db_helper_sqlite/src/user-apis/order.ts", "../../../../../packages/db_helper_sqlite/src/stores/store-helpers.ts", "../../../../../packages/db_helper_sqlite/src/lib/automated-jobs.ts", "../../../../../packages/db_helper_sqlite/src/lib/health-check.ts", "../../../../../packages/db_helper_sqlite/src/lib/delete-orders.ts", "../../../../../packages/db_helper_sqlite/src/helper_methods/upload-url.ts", "../../../../../packages/db_helper_sqlite/src/lib/seed.ts", "../../../../../packages/db_helper_sqlite/index.ts", "../../../src/sqliteImporter.ts", "../../../src/dbService.ts", "../../../../../node_modules/jose/dist/webapi/lib/buffer_utils.js", "../../../../../node_modules/jose/dist/webapi/lib/base64.js", "../../../../../node_modules/jose/dist/webapi/util/base64url.js", "../../../../../node_modules/jose/dist/webapi/lib/crypto_key.js", "../../../../../node_modules/jose/dist/webapi/lib/invalid_key_input.js", "../../../../../node_modules/jose/dist/webapi/util/errors.js", "../../../../../node_modules/jose/dist/webapi/lib/is_key_like.js", "../../../../../node_modules/jose/dist/webapi/lib/helpers.js", "../../../../../node_modules/jose/dist/webapi/lib/type_checks.js", "../../../../../node_modules/jose/dist/webapi/lib/signing.js", "../../../../../node_modules/jose/dist/webapi/lib/jwk_to_key.js", "../../../../../node_modules/jose/dist/webapi/lib/normalize_key.js", "../../../../../node_modules/jose/dist/webapi/lib/validate_crit.js", "../../../../../node_modules/jose/dist/webapi/lib/validate_algorithms.js", "../../../../../node_modules/jose/dist/webapi/lib/check_key_type.js", "../../../../../node_modules/jose/dist/webapi/jws/flattened/verify.js", "../../../../../node_modules/jose/dist/webapi/jws/compact/verify.js", "../../../../../node_modules/jose/dist/webapi/lib/jwt_claims_set.js", "../../../../../node_modules/jose/dist/webapi/jwt/verify.js", "../../../../../node_modules/jose/dist/webapi/jws/flattened/sign.js", "../../../../../node_modules/jose/dist/webapi/jws/compact/sign.js", "../../../../../node_modules/jose/dist/webapi/jwt/sign.js", "../../../../../node_modules/jose/dist/webapi/index.js", "../../../src/lib/api-error.ts", "../../../src/lib/env-exporter.ts", "../../../src/middleware/staff-auth.ts", "../../../src/apis/admin-apis/apis/av-router.ts", "../../../../../node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/extensions/index.js", "../../../../../node_modules/@smithy/types/dist-es/abort.js", "../../../../../node_modules/@smithy/types/dist-es/auth/auth.js", "../../../../../node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js", "../../../../../node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js", "../../../../../node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js", "../../../../../node_modules/@smithy/types/dist-es/auth/HttpSigner.js", "../../../../../node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js", "../../../../../node_modules/@smithy/types/dist-es/auth/index.js", "../../../../../node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js", "../../../../../node_modules/@smithy/types/dist-es/checksum.js", "../../../../../node_modules/@smithy/types/dist-es/client.js", "../../../../../node_modules/@smithy/types/dist-es/command.js", "../../../../../node_modules/@smithy/types/dist-es/connection/config.js", "../../../../../node_modules/@smithy/types/dist-es/connection/manager.js", "../../../../../node_modules/@smithy/types/dist-es/connection/pool.js", "../../../../../node_modules/@smithy/types/dist-es/connection/index.js", "../../../../../node_modules/@smithy/types/dist-es/crypto.js", "../../../../../node_modules/@smithy/types/dist-es/encode.js", "../../../../../node_modules/@smithy/types/dist-es/endpoint.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/shared.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js", "../../../../../node_modules/@smithy/types/dist-es/endpoints/index.js", "../../../../../node_modules/@smithy/types/dist-es/eventStream.js", "../../../../../node_modules/@smithy/types/dist-es/extensions/checksum.js", "../../../../../node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js", "../../../../../node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js", "../../../../../node_modules/@smithy/types/dist-es/extensions/index.js", "../../../../../node_modules/@smithy/types/dist-es/feature-ids.js", "../../../../../node_modules/@smithy/types/dist-es/http.js", "../../../../../node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js", "../../../../../node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js", "../../../../../node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js", "../../../../../node_modules/@smithy/types/dist-es/identity/identity.js", "../../../../../node_modules/@smithy/types/dist-es/identity/tokenIdentity.js", "../../../../../node_modules/@smithy/types/dist-es/identity/index.js", "../../../../../node_modules/@smithy/types/dist-es/logger.js", "../../../../../node_modules/@smithy/types/dist-es/middleware.js", "../../../../../node_modules/@smithy/types/dist-es/pagination.js", "../../../../../node_modules/@smithy/types/dist-es/profile.js", "../../../../../node_modules/@smithy/types/dist-es/response.js", "../../../../../node_modules/@smithy/types/dist-es/retry.js", "../../../../../node_modules/@smithy/types/dist-es/schema/schema.js", "../../../../../node_modules/@smithy/types/dist-es/schema/traits.js", "../../../../../node_modules/@smithy/types/dist-es/schema/schema-deprecated.js", "../../../../../node_modules/@smithy/types/dist-es/schema/sentinels.js", "../../../../../node_modules/@smithy/types/dist-es/schema/static-schemas.js", "../../../../../node_modules/@smithy/types/dist-es/serde.js", "../../../../../node_modules/@smithy/types/dist-es/shapes.js", "../../../../../node_modules/@smithy/types/dist-es/signature.js", "../../../../../node_modules/@smithy/types/dist-es/stream.js", "../../../../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js", "../../../../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js", "../../../../../node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js", "../../../../../node_modules/@smithy/types/dist-es/transfer.js", "../../../../../node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js", "../../../../../node_modules/@smithy/types/dist-es/transform/mutable.js", "../../../../../node_modules/@smithy/types/dist-es/transform/no-undefined.js", "../../../../../node_modules/@smithy/types/dist-es/transform/type-transform.js", "../../../../../node_modules/@smithy/types/dist-es/uri.js", "../../../../../node_modules/@smithy/types/dist-es/util.js", "../../../../../node_modules/@smithy/types/dist-es/waiter.js", "../../../../../node_modules/@smithy/types/dist-es/index.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/Field.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/Fields.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/httpHandler.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/httpRequest.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/httpResponse.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/isValidHostname.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/types.js", "../../../../../node_modules/@smithy/protocol-http/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-expect-continue/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/constants.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/client/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js", "../../../../../node_modules/@smithy/core/dist-es/getSmithyContext.js", "../../../../../node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js", "../../../../../node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js", "../../../../../node_modules/@smithy/util-middleware/dist-es/index.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js", "../../../../../node_modules/@smithy/core/dist-es/middleware-http-signing/index.js", "../../../../../node_modules/@smithy/core/dist-es/normalizeProvider.js", "../../../../../node_modules/@smithy/core/dist-es/pagination/createPaginator.js", "../../../../../node_modules/@smithy/util-base64/dist-es/constants.browser.js", "../../../../../node_modules/@smithy/util-base64/dist-es/fromBase64.browser.js", "../../../../../node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js", "../../../../../node_modules/@smithy/util-utf8/dist-es/toUint8Array.js", "../../../../../node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js", "../../../../../node_modules/@smithy/util-utf8/dist-es/index.js", "../../../../../node_modules/@smithy/util-base64/dist-es/toBase64.browser.js", "../../../../../node_modules/@smithy/util-base64/dist-es/index.js", "../../../../../node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js", "../../../../../node_modules/@smithy/util-stream/dist-es/checksum/ChecksumStream.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/stream-type-check.js", "../../../../../node_modules/@smithy/util-stream/dist-es/checksum/createChecksumStream.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/ByteArrayCollector.js", "../../../../../node_modules/@smithy/util-stream/dist-es/createBufferedReadableStream.js", "../../../../../node_modules/@smithy/util-stream/dist-es/getAwsChunkedEncodingStream.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/headStream.browser.js", "../../../../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri.js", "../../../../../node_modules/@smithy/util-uri-escape/dist-es/escape-uri-path.js", "../../../../../node_modules/@smithy/util-uri-escape/dist-es/index.js", "../../../../../node_modules/@smithy/querystring-builder/dist-es/index.js", "../../../../../node_modules/@smithy/fetch-http-handler/dist-es/create-request.js", "../../../../../node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js", "../../../../../node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js", "../../../../../node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js", "../../../../../node_modules/@smithy/fetch-http-handler/dist-es/index.js", "../../../../../node_modules/@smithy/util-hex-encoding/dist-es/index.js", "../../../../../node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/splitStream.browser.js", "../../../../../node_modules/@smithy/util-stream/dist-es/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/deref.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js", "../../../../../node_modules/@smithy/querystring-parser/dist-es/index.js", "../../../../../node_modules/@smithy/url-parser/dist-es/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/endpoints/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/schema/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js", "../../../../../node_modules/@smithy/uuid/dist-es/randomUUID.browser.js", "../../../../../node_modules/@smithy/uuid/dist-es/v4.js", "../../../../../node_modules/@smithy/uuid/dist-es/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/generateIdempotencyToken.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/split-every.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/serde/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/event-streams/index.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js", "../../../../../node_modules/@smithy/core/dist-es/submodules/protocols/index.js", "../../../../../node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js", "../../../../../node_modules/@smithy/core/dist-es/setFeature.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js", "../../../../../node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js", "../../../../../node_modules/@smithy/core/dist-es/index.js", "../../../../../node_modules/@smithy/property-provider/dist-es/ProviderError.js", "../../../../../node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js", "../../../../../node_modules/@smithy/property-provider/dist-es/TokenProviderError.js", "../../../../../node_modules/@smithy/property-provider/dist-es/chain.js", "../../../../../node_modules/@smithy/property-provider/dist-es/fromStatic.js", "../../../../../node_modules/@smithy/property-provider/dist-es/memoize.js", "../../../../../node_modules/@smithy/property-provider/dist-es/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/constants.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js", "../../../../../node_modules/@smithy/is-array-buffer/dist-es/index.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/headerUtil.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/prepareRequest.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/utilDate.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/SignatureV4.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/signature-v4a-container.js", "../../../../../node_modules/@smithy/signature-v4/dist-es/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js", "../../../../../node_modules/@smithy/util-body-length-browser/dist-es/calculateBodyLength.js", "../../../../../node_modules/@smithy/util-body-length-browser/dist-es/index.js", "../../../../../node_modules/@smithy/middleware-stack/dist-es/MiddlewareStack.js", "../../../../../node_modules/@smithy/middleware-stack/dist-es/index.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/client.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/schemaLogFilter.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/command.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/constants.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/exceptions.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/default-error-handler.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/defaults-mode.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/extensions/retry.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/extensions/index.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/get-array-if-single-item.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/get-value-from-text-node.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/is-serializable-header-value.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/object-mapping.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/resolve-path.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/ser-utils.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/serde-json.js", "../../../../../node_modules/@smithy/smithy-client/dist-es/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/escape-attribute.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/escape-element.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/XmlText.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/XmlNode.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.browser.js", "../../../../../node_modules/@aws-sdk/xml-builder/dist-es/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QuerySerializerSettings.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js", "../../../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js", "../../../../../node_modules/@aws-sdk/core/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmForRequest.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumLocationName.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeader.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/hasHeaderWithPrefix.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isStreaming.js", "../../../../../node_modules/tslib/tslib.es6.mjs", "../../../../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js", "../../../../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js", "../../../../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js", "../../../../../node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-es/index.js", "../../../../../node_modules/@aws-crypto/util/src/convertToBuffer.ts", "../../../../../node_modules/@aws-crypto/util/src/isEmptyData.ts", "../../../../../node_modules/@aws-crypto/util/src/numToUint8.ts", "../../../../../node_modules/@aws-crypto/util/src/uint32ArrayFrom.ts", "../../../../../node_modules/@aws-crypto/util/src/index.ts", "../../../../../node_modules/@aws-crypto/crc32c/src/aws_crc32c.ts", "../../../../../node_modules/@aws-crypto/crc32c/src/index.ts", "../../../../../node_modules/@aws-sdk/crc64-nvme/dist-es/Crc64Nvme.js", "../../../../../node_modules/@aws-sdk/crc64-nvme/dist-es/crc64-nvme-crt-container.js", "../../../../../node_modules/@aws-sdk/crc64-nvme/dist-es/index.js", "../../../../../node_modules/@aws-crypto/crc32/src/aws_crc32.ts", "../../../../../node_modules/@aws-crypto/crc32/src/index.ts", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getCrc32ChecksumAlgorithmFunction.browser.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/types.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/selectChecksumAlgorithmFunction.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/stringHasher.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsInputMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmListForResponse.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/isChecksumWithPartNumber.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksum.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/validateChecksumFromResponse.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsResponseMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getFlexibleChecksumsPlugin.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/resolveFlexibleChecksumsConfig.js", "../../../../../node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-host-header/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-logger/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/configuration.js", "../../../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/recursionDetectionMiddleware.browser.js", "../../../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/getRecursionDetectionPlugin.js", "../../../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/check-content-length-header.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-endpoint-middleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-middleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-expires-middleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCache.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCacheEntry.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityProviderImpl.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/constants.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/SignatureV4S3Express.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/signS3Express.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressHttpSigningMiddleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/index.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3Configuration.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js", "../../../../../node_modules/@aws-sdk/util-arn-parser/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/bucket-endpoint-middleware.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/validate-bucket-name.js", "../../../../../node_modules/@aws-sdk/middleware-sdk-s3/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/cache/EndpointCache.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/isIpAddress.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/isValidHostLabel.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/customEndpointFunctions.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/debug/debugId.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/debug/toDebugString.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/debug/index.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointError.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointFunctions.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointRuleObject.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/ErrorRuleObject.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/RuleSetObject.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/TreeRuleObject.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/shared.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/types/index.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/booleanEquals.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/isSet.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/not.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/parseURL.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/stringEquals.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/substring.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/uriEncode.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/lib/index.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/callFunction.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointUrl.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/utils/index.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js", "../../../../../node_modules/@smithy/util-endpoints/dist-es/index.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/aws.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveDefaultAwsRegionalEndpointsConfig.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js", "../../../../../node_modules/@aws-sdk/util-endpoints/dist-es/index.js", "../../../../../node_modules/@smithy/util-retry/dist-es/config.js", "../../../../../node_modules/@smithy/service-error-classification/dist-es/constants.js", "../../../../../node_modules/@smithy/service-error-classification/dist-es/index.js", "../../../../../node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js", "../../../../../node_modules/@smithy/util-retry/dist-es/constants.js", "../../../../../node_modules/@smithy/util-retry/dist-es/defaultRetryBackoffStrategy.js", "../../../../../node_modules/@smithy/util-retry/dist-es/defaultRetryToken.js", "../../../../../node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js", "../../../../../node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js", "../../../../../node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js", "../../../../../node_modules/@smithy/util-retry/dist-es/types.js", "../../../../../node_modules/@smithy/util-retry/dist-es/index.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/encode-features.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js", "../../../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/index.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseFipsEndpointConfigOptions.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveCustomEndpointsConfig.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/resolveEndpointsConfig.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/index.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/config.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/checkRegion.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/isFipsRegion.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/getRealRegion.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/resolveRegionConfig.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/index.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionInfo/PartitionHash.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionInfo/RegionHash.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionInfo/getRegionInfo.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/regionInfo/index.js", "../../../../../node_modules/@smithy/config-resolver/dist-es/index.js", "../../../../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/EventStreamSerdeConfig.js", "../../../../../node_modules/@smithy/eventstream-serde-config-resolver/dist-es/index.js", "../../../../../node_modules/@smithy/middleware-content-length/dist-es/index.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/s3.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/index.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.browser.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/index.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js", "../../../../../node_modules/@smithy/middleware-serde/dist-es/deserializerMiddleware.js", "../../../../../node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js", "../../../../../node_modules/@smithy/middleware-serde/dist-es/serdePlugin.js", "../../../../../node_modules/@smithy/middleware-serde/dist-es/index.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointRequiredConfig.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/types.js", "../../../../../node_modules/@smithy/middleware-endpoint/dist-es/index.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/delayDecider.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/retryDecider.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/util.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/StandardRetryStrategy.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/AdaptiveRetryStrategy.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/configurations.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/omitRetryHeadersMiddleware.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/isStreamingPayload/isStreamingPayload.browser.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js", "../../../../../node_modules/@smithy/middleware-retry/dist-es/index.js", "../../../../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/signature-v4-crt-container.js", "../../../../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4MultiRegion.js", "../../../../../node_modules/@aws-sdk/signature-v4-multi-region/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/ruleset.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/endpointResolver.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthSchemeProvider.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/errors.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateSessionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/package.json", "../../../../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js", "../../../../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js", "../../../../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js", "../../../../../node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8/dist-es/index.js", "../../../../../node_modules/@aws-crypto/sha1-browser/src/isEmptyData.ts", "../../../../../node_modules/@aws-crypto/sha1-browser/src/constants.ts", "../../../../../node_modules/@aws-sdk/util-locate-window/dist-es/index.js", "../../../../../node_modules/@aws-crypto/sha1-browser/src/webCryptoSha1.ts", "../../../../../node_modules/@aws-crypto/supports-web-crypto/src/supportsWebCrypto.ts", "../../../../../node_modules/@aws-crypto/supports-web-crypto/src/index.ts", "../../../../../node_modules/@aws-crypto/sha1-browser/src/crossPlatformSha1.ts", "../../../../../node_modules/@aws-crypto/sha1-browser/src/index.ts", "../../../../../node_modules/@aws-crypto/sha256-browser/src/constants.ts", "../../../../../node_modules/@aws-crypto/sha256-browser/src/webCryptoSha256.ts", "../../../../../node_modules/@aws-crypto/sha256-js/src/constants.ts", "../../../../../node_modules/@aws-crypto/sha256-js/src/RawSha256.ts", "../../../../../node_modules/@aws-crypto/sha256-js/src/jsSha256.ts", "../../../../../node_modules/@aws-crypto/sha256-js/src/index.ts", "../../../../../node_modules/@aws-crypto/sha256-browser/src/crossPlatformSha256.ts", "../../../../../node_modules/@aws-crypto/sha256-browser/src/index.ts", "../../../../../node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/Int64.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/HeaderMarshaller.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/splitMessage.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/EventStreamCodec.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/Message.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/MessageDecoderStream.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/MessageEncoderStream.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageDecoderStream.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageEncoderStream.js", "../../../../../node_modules/@smithy/eventstream-codec/dist-es/index.js", "../../../../../node_modules/@smithy/eventstream-serde-universal/dist-es/getChunkedStream.js", "../../../../../node_modules/@smithy/eventstream-serde-universal/dist-es/getUnmarshalledStream.js", "../../../../../node_modules/@smithy/eventstream-serde-universal/dist-es/EventStreamMarshaller.js", "../../../../../node_modules/@smithy/eventstream-serde-universal/dist-es/provider.js", "../../../../../node_modules/@smithy/eventstream-serde-universal/dist-es/index.js", "../../../../../node_modules/@smithy/eventstream-serde-browser/dist-es/utils.js", "../../../../../node_modules/@smithy/eventstream-serde-browser/dist-es/EventStreamMarshaller.js", "../../../../../node_modules/@smithy/eventstream-serde-browser/dist-es/provider.js", "../../../../../node_modules/@smithy/eventstream-serde-browser/dist-es/index.js", "../../../../../node_modules/@smithy/chunked-blob-reader/dist-es/index.js", "../../../../../node_modules/@smithy/hash-blob-browser/dist-es/index.js", "../../../../../node_modules/@smithy/invalid-dependency/dist-es/invalidFunction.js", "../../../../../node_modules/@smithy/invalid-dependency/dist-es/invalidProvider.js", "../../../../../node_modules/@smithy/invalid-dependency/dist-es/index.js", "../../../../../node_modules/@smithy/md5-js/dist-es/constants.js", "../../../../../node_modules/@smithy/md5-js/dist-es/index.js", "../../../../../node_modules/@smithy/util-defaults-mode-browser/dist-es/constants.js", "../../../../../node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js", "../../../../../node_modules/@smithy/util-defaults-mode-browser/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.shared.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.browser.js", "../../../../../node_modules/@aws-sdk/region-config-resolver/dist-es/extensions/index.js", "../../../../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/awsRegionConfig.js", "../../../../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/stsRegionDefaultResolver.browser.js", "../../../../../node_modules/@aws-sdk/region-config-resolver/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthExtensionConfiguration.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/runtimeExtensions.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/S3Client.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/AbortMultipartUploadCommand.js", "../../../../../node_modules/@aws-sdk/middleware-ssec/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CompleteMultipartUploadCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CopyObjectCommand.js", "../../../../../node_modules/@aws-sdk/middleware-location-constraint/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketMetadataTableConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/CreateMultipartUploadCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketAnalyticsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCorsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketEncryptionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketIntelligentTieringConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketInventoryConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketLifecycleCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetadataTableConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetricsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketOwnershipControlsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketPolicyCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketReplicationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketWebsiteCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/DeletePublicAccessBlockCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAbacCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAccelerateConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAclCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAnalyticsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketCorsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketEncryptionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketIntelligentTieringConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketInventoryConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLifecycleConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLocationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLoggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetadataTableConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetricsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketNotificationConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketOwnershipControlsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyStatusCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketReplicationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketRequestPaymentCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketVersioningCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketWebsiteCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAclCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAttributesCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLegalHoldCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLockConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectRetentionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTorrentCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/GetPublicAccessBlockCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadBucketCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/HeadObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketAnalyticsConfigurationsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketIntelligentTieringConfigurationsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketInventoryConfigurationsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketMetricsConfigurationsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListDirectoryBucketsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListMultipartUploadsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsV2Command.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectVersionsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/ListPartsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAbacCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAccelerateConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAclCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAnalyticsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketCorsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketEncryptionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketIntelligentTieringConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketInventoryConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLifecycleConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLoggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketMetricsConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketNotificationConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketOwnershipControlsCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketPolicyCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketReplicationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketRequestPaymentCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketVersioningCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketWebsiteCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectAclCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLegalHoldCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLockConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectRetentionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectTaggingCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/PutPublicAccessBlockCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/RenameObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/RestoreObjectCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/SelectObjectContentCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataInventoryTableConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateBucketMetadataJournalTableConfigurationCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/UpdateObjectEncryptionCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCopyCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/WriteGetObjectResponseCommand.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListBucketsPaginator.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListDirectoryBucketsPaginator.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListObjectsV2Paginator.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/ListPartsPaginator.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/circularReplacer.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/utils/sleep.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/waiter.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/poller.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/utils/validate.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/utils/index.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/createWaiter.js", "../../../../../node_modules/@smithy/util-waiter/dist-es/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketExists.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketNotExists.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectExists.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectNotExists.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/S3.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/commands/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/Interfaces.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/pagination/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/waiters/index.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/enums.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/models_0.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/models/models_1.js", "../../../../../node_modules/@aws-sdk/client-s3/dist-es/index.js", "../../../../../node_modules/@aws-sdk/util-format-url/dist-es/index.js", "../../../../../node_modules/@aws-sdk/s3-request-presigner/dist-es/constants.js", "../../../../../node_modules/@aws-sdk/s3-request-presigner/dist-es/presigner.js", "../../../../../node_modules/@aws-sdk/s3-request-presigner/dist-es/getSignedUrl.js", "../../../../../node_modules/@aws-sdk/s3-request-presigner/dist-es/index.js", "../../../src/lib/s3-client.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/middleware.ts", "../../../../../node_modules/@trpc/server/src/vendor/standard-schema-v1/error.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/parser.ts", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js", "../../../../../node_modules/node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/procedureBuilder.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/rootConfig.ts", "../../../../../node_modules/@trpc/server/src/unstable-core-do-not-import/initTRPC.ts", "../../../../../node_modules/@trpc/server/dist/index.mjs", "../../../src/trpc/trpc-index.ts", "../../../src/stores/product-store.ts", "../../../src/stores/product-tag-store.ts", "../../../src/trpc/apis/common-apis/common.ts", "../../../src/apis/common-apis/apis/common-product.controller.ts", "../../../src/apis/common-apis/apis/common-product.router.ts", "../../../src/apis/common-apis/apis/common.router.ts", "../../../src/v1-router.ts", "../../../src/test-controller.ts", "../../../src/middleware/auth.middleware.ts", "../../../src/main-router.ts", "../../../../../node_modules/zod/v4/core/core.js", "../../../../../node_modules/zod/v4/core/util.js", "../../../../../node_modules/zod/v4/core/errors.js", "../../../../../node_modules/zod/v4/core/parse.js", "../../../../../node_modules/zod/v4/core/regexes.js", "../../../../../node_modules/zod/v4/core/checks.js", "../../../../../node_modules/zod/v4/core/doc.js", "../../../../../node_modules/zod/v4/core/versions.js", "../../../../../node_modules/zod/v4/core/schemas.js", "../../../../../node_modules/zod/v4/locales/ar.js", "../../../../../node_modules/zod/v4/locales/az.js", "../../../../../node_modules/zod/v4/locales/be.js", "../../../../../node_modules/zod/v4/locales/bg.js", "../../../../../node_modules/zod/v4/locales/ca.js", "../../../../../node_modules/zod/v4/locales/cs.js", "../../../../../node_modules/zod/v4/locales/da.js", "../../../../../node_modules/zod/v4/locales/de.js", "../../../../../node_modules/zod/v4/locales/en.js", "../../../../../node_modules/zod/v4/locales/eo.js", "../../../../../node_modules/zod/v4/locales/es.js", "../../../../../node_modules/zod/v4/locales/fa.js", "../../../../../node_modules/zod/v4/locales/fi.js", "../../../../../node_modules/zod/v4/locales/fr.js", "../../../../../node_modules/zod/v4/locales/fr-CA.js", "../../../../../node_modules/zod/v4/locales/he.js", "../../../../../node_modules/zod/v4/locales/hu.js", "../../../../../node_modules/zod/v4/locales/hy.js", "../../../../../node_modules/zod/v4/locales/id.js", "../../../../../node_modules/zod/v4/locales/is.js", "../../../../../node_modules/zod/v4/locales/it.js", "../../../../../node_modules/zod/v4/locales/ja.js", "../../../../../node_modules/zod/v4/locales/ka.js", "../../../../../node_modules/zod/v4/locales/km.js", "../../../../../node_modules/zod/v4/locales/kh.js", "../../../../../node_modules/zod/v4/locales/ko.js", "../../../../../node_modules/zod/v4/locales/lt.js", "../../../../../node_modules/zod/v4/locales/mk.js", "../../../../../node_modules/zod/v4/locales/ms.js", "../../../../../node_modules/zod/v4/locales/nl.js", "../../../../../node_modules/zod/v4/locales/no.js", "../../../../../node_modules/zod/v4/locales/ota.js", "../../../../../node_modules/zod/v4/locales/ps.js", "../../../../../node_modules/zod/v4/locales/pl.js", "../../../../../node_modules/zod/v4/locales/pt.js", "../../../../../node_modules/zod/v4/locales/ru.js", "../../../../../node_modules/zod/v4/locales/sl.js", "../../../../../node_modules/zod/v4/locales/sv.js", "../../../../../node_modules/zod/v4/locales/ta.js", "../../../../../node_modules/zod/v4/locales/th.js", "../../../../../node_modules/zod/v4/locales/tr.js", "../../../../../node_modules/zod/v4/locales/uk.js", "../../../../../node_modules/zod/v4/locales/ua.js", "../../../../../node_modules/zod/v4/locales/ur.js", "../../../../../node_modules/zod/v4/locales/uz.js", "../../../../../node_modules/zod/v4/locales/vi.js", "../../../../../node_modules/zod/v4/locales/zh-CN.js", "../../../../../node_modules/zod/v4/locales/zh-TW.js", "../../../../../node_modules/zod/v4/locales/yo.js", "../../../../../node_modules/zod/v4/locales/index.js", "../../../../../node_modules/zod/v4/core/registries.js", "../../../../../node_modules/zod/v4/core/api.js", "../../../../../node_modules/zod/v4/core/to-json-schema.js", "../../../../../node_modules/zod/v4/core/json-schema-processors.js", "../../../../../node_modules/zod/v4/core/json-schema-generator.js", "../../../../../node_modules/zod/v4/core/json-schema.js", "../../../../../node_modules/zod/v4/core/index.js", "../../../../../node_modules/zod/v4/classic/checks.js", "../../../../../node_modules/zod/v4/classic/iso.js", "../../../../../node_modules/zod/v4/classic/errors.js", "../../../../../node_modules/zod/v4/classic/parse.js", "../../../../../node_modules/zod/v4/classic/schemas.js", "../../../../../node_modules/zod/v4/classic/compat.js", "../../../../../node_modules/zod/v4/classic/from-json-schema.js", "../../../../../node_modules/zod/v4/classic/coerce.js", "../../../../../node_modules/zod/v4/classic/external.js", "../../../../../node_modules/zod/index.js", "../../../src/trpc/apis/admin-apis/apis/complaint.ts", "../../../../../node_modules/dayjs/dayjs.min.js", "../../../src/trpc/apis/admin-apis/apis/coupon.ts", "../../../../../node_modules/unenv/dist/runtime/npm/node-fetch.mjs", "required-unenv-alias:node-fetch", "node-built-in-modules:node:assert", "node-built-in-modules:node:zlib", "../../../../../node_modules/promise-limit/index.js", "../../../../../node_modules/err-code/index.js", "../../../../../node_modules/retry/lib/retry_operation.js", "../../../../../node_modules/retry/lib/retry.js", "../../../../../node_modules/retry/index.js", "../../../../../node_modules/promise-retry/index.js", "../../../node_modules/expo-server-sdk/src/ExpoClientValues.ts", "../../../node_modules/expo-server-sdk/package.json", "../../../node_modules/expo-server-sdk/src/ExpoClient.ts", "../../../src/lib/const-strings.ts", "../../../src/lib/notif-job.ts", "../../../src/lib/redis-client.ts", "../../../../../node_modules/axios/lib/helpers/bind.js", "../../../../../node_modules/axios/lib/utils.js", "../../../../../node_modules/axios/lib/core/AxiosError.js", "../../../../../node_modules/axios/lib/helpers/null.js", "../../../../../node_modules/axios/lib/helpers/toFormData.js", "../../../../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js", "../../../../../node_modules/axios/lib/helpers/buildURL.js", "../../../../../node_modules/axios/lib/core/InterceptorManager.js", "../../../../../node_modules/axios/lib/defaults/transitional.js", "../../../../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js", "../../../../../node_modules/axios/lib/platform/browser/classes/FormData.js", "../../../../../node_modules/axios/lib/platform/browser/classes/Blob.js", "../../../../../node_modules/axios/lib/platform/browser/index.js", "../../../../../node_modules/axios/lib/platform/common/utils.js", "../../../../../node_modules/axios/lib/platform/index.js", "../../../../../node_modules/axios/lib/helpers/toURLEncodedForm.js", "../../../../../node_modules/axios/lib/helpers/formDataToJSON.js", "../../../../../node_modules/axios/lib/defaults/index.js", "../../../../../node_modules/axios/lib/helpers/parseHeaders.js", "../../../../../node_modules/axios/lib/core/AxiosHeaders.js", "../../../../../node_modules/axios/lib/core/transformData.js", "../../../../../node_modules/axios/lib/cancel/isCancel.js", "../../../../../node_modules/axios/lib/cancel/CanceledError.js", "../../../../../node_modules/axios/lib/core/settle.js", "../../../../../node_modules/axios/lib/helpers/parseProtocol.js", "../../../../../node_modules/axios/lib/helpers/speedometer.js", "../../../../../node_modules/axios/lib/helpers/throttle.js", "../../../../../node_modules/axios/lib/helpers/progressEventReducer.js", "../../../../../node_modules/axios/lib/helpers/isURLSameOrigin.js", "../../../../../node_modules/axios/lib/helpers/cookies.js", "../../../../../node_modules/axios/lib/helpers/isAbsoluteURL.js", "../../../../../node_modules/axios/lib/helpers/combineURLs.js", "../../../../../node_modules/axios/lib/core/buildFullPath.js", "../../../../../node_modules/axios/lib/core/mergeConfig.js", "../../../../../node_modules/axios/lib/helpers/resolveConfig.js", "../../../../../node_modules/axios/lib/adapters/xhr.js", "../../../../../node_modules/axios/lib/helpers/composeSignals.js", "../../../../../node_modules/axios/lib/helpers/trackStream.js", "../../../../../node_modules/axios/lib/adapters/fetch.js", "../../../../../node_modules/axios/lib/adapters/adapters.js", "../../../../../node_modules/axios/lib/core/dispatchRequest.js", "../../../../../node_modules/axios/lib/env/data.js", "../../../../../node_modules/axios/lib/helpers/validator.js", "../../../../../node_modules/axios/lib/core/Axios.js", "../../../../../node_modules/axios/lib/cancel/CancelToken.js", "../../../../../node_modules/axios/lib/helpers/spread.js", "../../../../../node_modules/axios/lib/helpers/isAxiosError.js", "../../../../../node_modules/axios/lib/helpers/HttpStatusCode.js", "../../../../../node_modules/axios/lib/axios.js", "../../../../../node_modules/axios/index.js", "../../../src/lib/telegram-service.ts", "../../../src/lib/post-order-handler.ts", "../../../src/stores/user-negativity-store.ts", "../../../src/trpc/apis/admin-apis/apis/order.ts", "../../../src/trpc/apis/admin-apis/apis/vendor-snippets.ts", "../../../src/lib/roles-manager.ts", "../../../src/lib/const-keys.ts", "../../../src/lib/const-store.ts", "../../../src/stores/slot-store.ts", "../../../src/stores/banner-store.ts", "../../../../../node_modules/@turf/helpers/index.ts", "../../../../../node_modules/@turf/invariant/index.ts", "../../../../../node_modules/robust-predicates/esm/util.js", "../../../../../node_modules/robust-predicates/esm/orient2d.js", "../../../../../node_modules/robust-predicates/esm/orient3d.js", "../../../../../node_modules/robust-predicates/esm/incircle.js", "../../../../../node_modules/robust-predicates/esm/insphere.js", "../../../../../node_modules/robust-predicates/index.js", "../../../../../node_modules/point-in-polygon-hao/dist/esm/index.js", "../../../../../node_modules/@turf/boolean-point-in-polygon/index.ts", "../../../../../node_modules/@turf/turf/index.ts", "../../../src/lib/mbnr-geojson.ts", "../../../src/trpc/apis/common-apis/common-trpc-index.ts", "../../../src/trpc/apis/user-apis/apis/stores.ts", "../../../src/trpc/apis/user-apis/apis/slots.ts", "../../../src/trpc/apis/user-apis/apis/banners.ts", "../../../../../packages/shared/types/index.ts", "../../../../../packages/shared/index.ts", "../../../src/lib/retry.ts", "../../../src/lib/cloud_cache.ts", "../../../src/stores/store-initializer.ts", "../../../src/trpc/apis/admin-apis/apis/slots.ts", "../../../src/trpc/apis/admin-apis/apis/product.ts", "../../../../../node_modules/unenv/dist/runtime/node/internal/crypto/web.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/crypto/node.mjs", "../../../../../node_modules/unenv/dist/runtime/node/internal/crypto/constants.mjs", "../../../../../node_modules/unenv/dist/runtime/node/crypto.mjs", "../../../../../node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.mjs", "../../../../../node_modules/bcryptjs/index.js", "../../../src/trpc/apis/admin-apis/apis/staff-user.ts", "../../../src/trpc/apis/admin-apis/apis/store.ts", "../../../src/trpc/apis/admin-apis/apis/payments.ts", "../../../src/trpc/apis/admin-apis/apis/banner.ts", "../../../src/trpc/apis/admin-apis/apis/user.ts", "../../../src/trpc/apis/admin-apis/apis/const.ts", "../../../src/trpc/apis/admin-apis/apis/admin-trpc-index.ts", "../../../src/lib/license-util.ts", "../../../src/trpc/apis/user-apis/apis/address.ts", "../../../src/lib/otp-utils.ts", "../../../src/trpc/apis/user-apis/apis/auth.ts", "../../../src/trpc/apis/user-apis/apis/cart.ts", "../../../src/trpc/apis/user-apis/apis/complaint.ts", "../../../src/trpc/apis/user-apis/apis/order.ts", "../../../src/trpc/apis/user-apis/apis/product.ts", "../../../src/trpc/apis/user-apis/apis/user.ts", "../../../src/trpc/apis/user-apis/apis/coupon.ts", "../../../src/lib/payments-utils.ts", "../../../src/trpc/apis/user-apis/apis/payments.ts", "../../../src/trpc/apis/user-apis/apis/file-upload.ts", "../../../src/trpc/apis/user-apis/apis/tags.ts", "../../../src/trpc/apis/user-apis/apis/user-trpc-index.ts", "../../../src/trpc/router.ts", "../../../src/app.ts", "../bundle-aek2Ls/middleware-loader.entry.ts", "../bundle-aek2Ls/middleware-insertion-facade.js", "../../../worker.ts", "../../../../../node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts", "../../../../../node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts", "../../../../../node_modules/wrangler/templates/middleware/common.ts"], + "sourceRoot": "/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/dev-zfhbqS", + "sourcesContent": ["function stripCfConnectingIPHeader(input, init) {\n\tconst request = new Request(input, init);\n\trequest.headers.delete(\"CF-Connecting-IP\");\n\treturn request;\n}\n\nglobalThis.fetch = new Proxy(globalThis.fetch, {\n\tapply(target, thisArg, argArray) {\n\t\treturn Reflect.apply(target, thisArg, [\n\t\t\tstripCfConnectingIPHeader.apply(null, argArray),\n\t\t]);\n\t},\n});\n", "/*@__NO_SIDE_EFFECTS__*/ export function rawHeaders(headers) {\n\tconst rawHeaders = [];\n\tfor (const key in headers) {\n\t\tif (Array.isArray(headers[key])) {\n\t\t\tfor (const h of headers[key]) {\n\t\t\t\trawHeaders.push(key, h);\n\t\t\t}\n\t\t} else {\n\t\t\trawHeaders.push(key, headers[key]);\n\t\t}\n\t}\n\treturn rawHeaders;\n}\n/*@__NO_SIDE_EFFECTS__*/ export function mergeFns(...functions) {\n\treturn function(...args) {\n\t\tfor (const fn of functions) {\n\t\t\tfn(...args);\n\t\t}\n\t};\n}\n/*@__NO_SIDE_EFFECTS__*/ export function createNotImplementedError(name) {\n\treturn new Error(`[unenv] ${name} is not implemented yet!`);\n}\n/*@__NO_SIDE_EFFECTS__*/ export function notImplemented(name) {\n\tconst fn = () => {\n\t\tthrow createNotImplementedError(name);\n\t};\n\treturn Object.assign(fn, { __unenv__: true });\n}\n/*@__NO_SIDE_EFFECTS__*/ export function notImplementedAsync(name) {\n\tconst fn = notImplemented(name);\n\tfn.__promisify__ = () => notImplemented(name + \".__promisify__\");\n\tfn.native = fn;\n\treturn fn;\n}\n/*@__NO_SIDE_EFFECTS__*/ export function notImplementedClass(name) {\n\treturn class {\n\t\t__unenv__ = true;\n\t\tconstructor() {\n\t\t\tthrow new Error(`[unenv] ${name} is not implemented yet!`);\n\t\t}\n\t};\n}\n", "import { createNotImplementedError } from \"../../../_internal/utils.mjs\";\nconst _timeOrigin = globalThis.performance?.timeOrigin ?? Date.now();\nconst _performanceNow = globalThis.performance?.now ? globalThis.performance.now.bind(globalThis.performance) : () => Date.now() - _timeOrigin;\nconst nodeTiming = {\n\tname: \"node\",\n\tentryType: \"node\",\n\tstartTime: 0,\n\tduration: 0,\n\tnodeStart: 0,\n\tv8Start: 0,\n\tbootstrapComplete: 0,\n\tenvironment: 0,\n\tloopStart: 0,\n\tloopExit: 0,\n\tidleTime: 0,\n\tuvMetricsInfo: {\n\t\tloopCount: 0,\n\t\tevents: 0,\n\t\teventsWaiting: 0\n\t},\n\tdetail: undefined,\n\ttoJSON() {\n\t\treturn this;\n\t}\n};\nexport class PerformanceEntry {\n\t__unenv__ = true;\n\tdetail;\n\tentryType = \"event\";\n\tname;\n\tstartTime;\n\tconstructor(name, options) {\n\t\tthis.name = name;\n\t\tthis.startTime = options?.startTime || _performanceNow();\n\t\tthis.detail = options?.detail;\n\t}\n\tget duration() {\n\t\treturn _performanceNow() - this.startTime;\n\t}\n\ttoJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tentryType: this.entryType,\n\t\t\tstartTime: this.startTime,\n\t\t\tduration: this.duration,\n\t\t\tdetail: this.detail\n\t\t};\n\t}\n}\nexport const PerformanceMark = class PerformanceMark extends PerformanceEntry {\n\tentryType = \"mark\";\n\tconstructor() {\n\t\tsuper(...arguments);\n\t}\n\tget duration() {\n\t\treturn 0;\n\t}\n};\nexport class PerformanceMeasure extends PerformanceEntry {\n\tentryType = \"measure\";\n}\nexport class PerformanceResourceTiming extends PerformanceEntry {\n\tentryType = \"resource\";\n\tserverTiming = [];\n\tconnectEnd = 0;\n\tconnectStart = 0;\n\tdecodedBodySize = 0;\n\tdomainLookupEnd = 0;\n\tdomainLookupStart = 0;\n\tencodedBodySize = 0;\n\tfetchStart = 0;\n\tinitiatorType = \"\";\n\tname = \"\";\n\tnextHopProtocol = \"\";\n\tredirectEnd = 0;\n\tredirectStart = 0;\n\trequestStart = 0;\n\tresponseEnd = 0;\n\tresponseStart = 0;\n\tsecureConnectionStart = 0;\n\tstartTime = 0;\n\ttransferSize = 0;\n\tworkerStart = 0;\n\tresponseStatus = 0;\n}\nexport class PerformanceObserverEntryList {\n\t__unenv__ = true;\n\tgetEntries() {\n\t\treturn [];\n\t}\n\tgetEntriesByName(_name, _type) {\n\t\treturn [];\n\t}\n\tgetEntriesByType(type) {\n\t\treturn [];\n\t}\n}\nexport class Performance {\n\t__unenv__ = true;\n\ttimeOrigin = _timeOrigin;\n\teventCounts = new Map();\n\t_entries = [];\n\t_resourceTimingBufferSize = 0;\n\tnavigation = undefined;\n\ttiming = undefined;\n\ttimerify(_fn, _options) {\n\t\tthrow createNotImplementedError(\"Performance.timerify\");\n\t}\n\tget nodeTiming() {\n\t\treturn nodeTiming;\n\t}\n\teventLoopUtilization() {\n\t\treturn {};\n\t}\n\tmarkResourceTiming() {\n\t\treturn new PerformanceResourceTiming(\"\");\n\t}\n\tonresourcetimingbufferfull = null;\n\tnow() {\n\t\tif (this.timeOrigin === _timeOrigin) {\n\t\t\treturn _performanceNow();\n\t\t}\n\t\treturn Date.now() - this.timeOrigin;\n\t}\n\tclearMarks(markName) {\n\t\tthis._entries = markName ? this._entries.filter((e) => e.name !== markName) : this._entries.filter((e) => e.entryType !== \"mark\");\n\t}\n\tclearMeasures(measureName) {\n\t\tthis._entries = measureName ? this._entries.filter((e) => e.name !== measureName) : this._entries.filter((e) => e.entryType !== \"measure\");\n\t}\n\tclearResourceTimings() {\n\t\tthis._entries = this._entries.filter((e) => e.entryType !== \"resource\" || e.entryType !== \"navigation\");\n\t}\n\tgetEntries() {\n\t\treturn this._entries;\n\t}\n\tgetEntriesByName(name, type) {\n\t\treturn this._entries.filter((e) => e.name === name && (!type || e.entryType === type));\n\t}\n\tgetEntriesByType(type) {\n\t\treturn this._entries.filter((e) => e.entryType === type);\n\t}\n\tmark(name, options) {\n\t\tconst entry = new PerformanceMark(name, options);\n\t\tthis._entries.push(entry);\n\t\treturn entry;\n\t}\n\tmeasure(measureName, startOrMeasureOptions, endMark) {\n\t\tlet start;\n\t\tlet end;\n\t\tif (typeof startOrMeasureOptions === \"string\") {\n\t\t\tstart = this.getEntriesByName(startOrMeasureOptions, \"mark\")[0]?.startTime;\n\t\t\tend = this.getEntriesByName(endMark, \"mark\")[0]?.startTime;\n\t\t} else {\n\t\t\tstart = Number.parseFloat(startOrMeasureOptions?.start) || this.now();\n\t\t\tend = Number.parseFloat(startOrMeasureOptions?.end) || this.now();\n\t\t}\n\t\tconst entry = new PerformanceMeasure(measureName, {\n\t\t\tstartTime: start,\n\t\t\tdetail: {\n\t\t\t\tstart,\n\t\t\t\tend\n\t\t\t}\n\t\t});\n\t\tthis._entries.push(entry);\n\t\treturn entry;\n\t}\n\tsetResourceTimingBufferSize(maxSize) {\n\t\tthis._resourceTimingBufferSize = maxSize;\n\t}\n\taddEventListener(type, listener, options) {\n\t\tthrow createNotImplementedError(\"Performance.addEventListener\");\n\t}\n\tremoveEventListener(type, listener, options) {\n\t\tthrow createNotImplementedError(\"Performance.removeEventListener\");\n\t}\n\tdispatchEvent(event) {\n\t\tthrow createNotImplementedError(\"Performance.dispatchEvent\");\n\t}\n\ttoJSON() {\n\t\treturn this;\n\t}\n}\nexport class PerformanceObserver {\n\t__unenv__ = true;\n\tstatic supportedEntryTypes = [];\n\t_callback = null;\n\tconstructor(callback) {\n\t\tthis._callback = callback;\n\t}\n\ttakeRecords() {\n\t\treturn [];\n\t}\n\tdisconnect() {\n\t\tthrow createNotImplementedError(\"PerformanceObserver.disconnect\");\n\t}\n\tobserve(options) {\n\t\tthrow createNotImplementedError(\"PerformanceObserver.observe\");\n\t}\n\tbind(fn) {\n\t\treturn fn;\n\t}\n\trunInAsyncScope(fn, thisArg, ...args) {\n\t\treturn fn.call(thisArg, ...args);\n\t}\n\tasyncId() {\n\t\treturn 0;\n\t}\n\ttriggerAsyncId() {\n\t\treturn 0;\n\t}\n\temitDestroy() {\n\t\treturn this;\n\t}\n}\nexport const performance = globalThis.performance && \"addEventListener\" in globalThis.performance ? globalThis.performance : new Performance();\n", "import { IntervalHistogram, RecordableHistogram } from \"./internal/perf_hooks/histogram.mjs\";\nimport { performance, Performance, PerformanceEntry, PerformanceMark, PerformanceMeasure, PerformanceObserverEntryList, PerformanceObserver, PerformanceResourceTiming } from \"./internal/perf_hooks/performance.mjs\";\nexport * from \"./internal/perf_hooks/performance.mjs\";\nimport { NODE_PERFORMANCE_GC_MAJOR, NODE_PERFORMANCE_GC_MINOR, NODE_PERFORMANCE_GC_INCREMENTAL, NODE_PERFORMANCE_GC_WEAKCB, NODE_PERFORMANCE_GC_FLAGS_NO, NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED, NODE_PERFORMANCE_GC_FLAGS_FORCED, NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING, NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE, NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY, NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE, NODE_PERFORMANCE_ENTRY_TYPE_GC, NODE_PERFORMANCE_ENTRY_TYPE_HTTP, NODE_PERFORMANCE_ENTRY_TYPE_HTTP2, NODE_PERFORMANCE_ENTRY_TYPE_NET, NODE_PERFORMANCE_ENTRY_TYPE_DNS, NODE_PERFORMANCE_MILESTONE_TIME_ORIGIN_TIMESTAMP, NODE_PERFORMANCE_MILESTONE_TIME_ORIGIN, NODE_PERFORMANCE_MILESTONE_ENVIRONMENT, NODE_PERFORMANCE_MILESTONE_NODE_START, NODE_PERFORMANCE_MILESTONE_V8_START, NODE_PERFORMANCE_MILESTONE_LOOP_START, NODE_PERFORMANCE_MILESTONE_LOOP_EXIT, NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE } from \"./internal/perf_hooks/constants.mjs\";\nexport const constants = {\n\tNODE_PERFORMANCE_GC_MAJOR,\n\tNODE_PERFORMANCE_GC_MINOR,\n\tNODE_PERFORMANCE_GC_INCREMENTAL,\n\tNODE_PERFORMANCE_GC_WEAKCB,\n\tNODE_PERFORMANCE_GC_FLAGS_NO,\n\tNODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED,\n\tNODE_PERFORMANCE_GC_FLAGS_FORCED,\n\tNODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING,\n\tNODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE,\n\tNODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY,\n\tNODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE,\n\tNODE_PERFORMANCE_ENTRY_TYPE_GC,\n\tNODE_PERFORMANCE_ENTRY_TYPE_HTTP,\n\tNODE_PERFORMANCE_ENTRY_TYPE_HTTP2,\n\tNODE_PERFORMANCE_ENTRY_TYPE_NET,\n\tNODE_PERFORMANCE_ENTRY_TYPE_DNS,\n\tNODE_PERFORMANCE_MILESTONE_TIME_ORIGIN_TIMESTAMP,\n\tNODE_PERFORMANCE_MILESTONE_TIME_ORIGIN,\n\tNODE_PERFORMANCE_MILESTONE_ENVIRONMENT,\n\tNODE_PERFORMANCE_MILESTONE_NODE_START,\n\tNODE_PERFORMANCE_MILESTONE_V8_START,\n\tNODE_PERFORMANCE_MILESTONE_LOOP_START,\n\tNODE_PERFORMANCE_MILESTONE_LOOP_EXIT,\n\tNODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE\n};\nexport const monitorEventLoopDelay = function(_options) {\n\treturn new IntervalHistogram();\n};\nexport const createHistogram = function(_options) {\n\treturn new RecordableHistogram();\n};\nexport default {\n\tPerformance,\n\tPerformanceMark,\n\tPerformanceEntry,\n\tPerformanceMeasure,\n\tPerformanceObserverEntryList,\n\tPerformanceObserver,\n\tPerformanceResourceTiming,\n\tperformance,\n\tconstants,\n\tcreateHistogram,\n\tmonitorEventLoopDelay\n};\n", "import {\n performance,\n Performance,\n PerformanceEntry,\n PerformanceMark,\n PerformanceMeasure,\n PerformanceObserver,\n PerformanceObserverEntryList,\n PerformanceResourceTiming\n} from \"node:perf_hooks\";\nglobalThis.performance = performance;\nglobalThis.Performance = Performance;\nglobalThis.PerformanceEntry = PerformanceEntry;\nglobalThis.PerformanceMark = PerformanceMark;\nglobalThis.PerformanceMeasure = PerformanceMeasure;\nglobalThis.PerformanceObserver = PerformanceObserver;\nglobalThis.PerformanceObserverEntryList = PerformanceObserverEntryList;\nglobalThis.PerformanceResourceTiming = PerformanceResourceTiming;\n", "export default Object.assign(() => {}, { __unenv__: true });\n", "import { Writable } from \"node:stream\";\nimport noop from \"../mock/noop.mjs\";\nimport { notImplemented, notImplementedClass } from \"../_internal/utils.mjs\";\nconst _console = globalThis.console;\nexport const _ignoreErrors = true;\nexport const _stderr = new Writable();\nexport const _stdout = new Writable();\nexport const log = _console?.log ?? noop;\nexport const info = _console?.info ?? log;\nexport const trace = _console?.trace ?? info;\nexport const debug = _console?.debug ?? log;\nexport const table = _console?.table ?? log;\nexport const error = _console?.error ?? log;\nexport const warn = _console?.warn ?? error;\nexport const createTask = _console?.createTask ?? /*@__PURE__*/ notImplemented(\"console.createTask\");\nexport const assert = /*@__PURE__*/ notImplemented(\"console.assert\");\nexport const clear = _console?.clear ?? noop;\nexport const count = _console?.count ?? noop;\nexport const countReset = _console?.countReset ?? noop;\nexport const dir = _console?.dir ?? noop;\nexport const dirxml = _console?.dirxml ?? noop;\nexport const group = _console?.group ?? noop;\nexport const groupEnd = _console?.groupEnd ?? noop;\nexport const groupCollapsed = _console?.groupCollapsed ?? noop;\nexport const profile = _console?.profile ?? noop;\nexport const profileEnd = _console?.profileEnd ?? noop;\nexport const time = _console?.time ?? noop;\nexport const timeEnd = _console?.timeEnd ?? noop;\nexport const timeLog = _console?.timeLog ?? noop;\nexport const timeStamp = _console?.timeStamp ?? noop;\nexport const Console = _console?.Console ?? /*@__PURE__*/ notImplementedClass(\"console.Console\");\nexport const _times = /*@__PURE__*/ new Map();\nexport function context() {\n\treturn _console;\n}\nexport const _stdoutErrorHandler = noop;\nexport const _stderrErrorHandler = noop;\nexport default {\n\t_times,\n\t_ignoreErrors,\n\t_stdoutErrorHandler,\n\t_stderrErrorHandler,\n\t_stdout,\n\t_stderr,\n\tassert,\n\tclear,\n\tConsole,\n\tcount,\n\tcountReset,\n\tdebug,\n\tdir,\n\tdirxml,\n\terror,\n\tcontext,\n\tcreateTask,\n\tgroup,\n\tgroupEnd,\n\tgroupCollapsed,\n\tinfo,\n\tlog,\n\tprofile,\n\tprofileEnd,\n\ttable,\n\ttime,\n\ttimeEnd,\n\ttimeLog,\n\ttimeStamp,\n\ttrace,\n\twarn\n};\n", "import {\n _ignoreErrors,\n _stderr,\n _stderrErrorHandler,\n _stdout,\n _stdoutErrorHandler,\n _times,\n Console\n} from \"unenv/node/console\";\nexport {\n Console,\n _ignoreErrors,\n _stderr,\n _stderrErrorHandler,\n _stdout,\n _stdoutErrorHandler,\n _times\n} from \"unenv/node/console\";\nconst workerdConsole = globalThis[\"console\"];\nexport const {\n assert,\n clear,\n // @ts-expect-error undocumented public API\n context,\n count,\n countReset,\n // @ts-expect-error undocumented public API\n createTask,\n debug,\n dir,\n dirxml,\n error,\n group,\n groupCollapsed,\n groupEnd,\n info,\n log,\n profile,\n profileEnd,\n table,\n time,\n timeEnd,\n timeLog,\n timeStamp,\n trace,\n warn\n} = workerdConsole;\nObject.assign(workerdConsole, {\n Console,\n _ignoreErrors,\n _stderr,\n _stderrErrorHandler,\n _stdout,\n _stdoutErrorHandler,\n _times\n});\nexport default workerdConsole;\n", "import { default as defaultExport } from \"@cloudflare/unenv-preset/node/console\";\nglobalThis.console = defaultExport;", "export const hrtime = /*@__PURE__*/ Object.assign(function hrtime(startTime) {\n\tconst now = Date.now();\n\tconst seconds = Math.trunc(now / 1e3);\n\tconst nanos = now % 1e3 * 1e6;\n\tif (startTime) {\n\t\tlet diffSeconds = seconds - startTime[0];\n\t\tlet diffNanos = nanos - startTime[0];\n\t\tif (diffNanos < 0) {\n\t\t\tdiffSeconds = diffSeconds - 1;\n\t\t\tdiffNanos = 1e9 + diffNanos;\n\t\t}\n\t\treturn [diffSeconds, diffNanos];\n\t}\n\treturn [seconds, nanos];\n}, { bigint: function bigint() {\n\treturn BigInt(Date.now() * 1e6);\n} });\n", "import { Socket } from \"node:net\";\nexport class ReadStream extends Socket {\n\tfd;\n\tconstructor(fd) {\n\t\tsuper();\n\t\tthis.fd = fd;\n\t}\n\tisRaw = false;\n\tsetRawMode(mode) {\n\t\tthis.isRaw = mode;\n\t\treturn this;\n\t}\n\tisTTY = false;\n}\n", "import { Socket } from \"node:net\";\nexport class WriteStream extends Socket {\n\tfd;\n\tconstructor(fd) {\n\t\tsuper();\n\t\tthis.fd = fd;\n\t}\n\tclearLine(dir, callback) {\n\t\tcallback && callback();\n\t\treturn false;\n\t}\n\tclearScreenDown(callback) {\n\t\tcallback && callback();\n\t\treturn false;\n\t}\n\tcursorTo(x, y, callback) {\n\t\tcallback && typeof callback === \"function\" && callback();\n\t\treturn false;\n\t}\n\tmoveCursor(dx, dy, callback) {\n\t\tcallback && callback();\n\t\treturn false;\n\t}\n\tgetColorDepth(env) {\n\t\treturn 1;\n\t}\n\thasColors(count, env) {\n\t\treturn false;\n\t}\n\tgetWindowSize() {\n\t\treturn [this.columns, this.rows];\n\t}\n\tcolumns = 80;\n\trows = 24;\n\tisTTY = false;\n}\n", "import { ReadStream } from \"./internal/tty/read-stream.mjs\";\nimport { WriteStream } from \"./internal/tty/write-stream.mjs\";\nexport { ReadStream } from \"./internal/tty/read-stream.mjs\";\nexport { WriteStream } from \"./internal/tty/write-stream.mjs\";\nexport const isatty = function() {\n\treturn false;\n};\nexport default {\n\tReadStream,\n\tWriteStream,\n\tisatty\n};\n", "import { EventEmitter } from \"node:events\";\nimport { ReadStream, WriteStream } from \"node:tty\";\nimport { notImplemented, createNotImplementedError } from \"../../../_internal/utils.mjs\";\nexport class Process extends EventEmitter {\n\tenv;\n\thrtime;\n\tnextTick;\n\tconstructor(impl) {\n\t\tsuper();\n\t\tthis.env = impl.env;\n\t\tthis.hrtime = impl.hrtime;\n\t\tthis.nextTick = impl.nextTick;\n\t\tfor (const prop of [...Object.getOwnPropertyNames(Process.prototype), ...Object.getOwnPropertyNames(EventEmitter.prototype)]) {\n\t\t\tconst value = this[prop];\n\t\t\tif (typeof value === \"function\") {\n\t\t\t\tthis[prop] = value.bind(this);\n\t\t\t}\n\t\t}\n\t}\n\temitWarning(warning, type, code) {\n\t\tconsole.warn(`${code ? `[${code}] ` : \"\"}${type ? `${type}: ` : \"\"}${warning}`);\n\t}\n\temit(...args) {\n\t\treturn super.emit(...args);\n\t}\n\tlisteners(eventName) {\n\t\treturn super.listeners(eventName);\n\t}\n\t#stdin;\n\t#stdout;\n\t#stderr;\n\tget stdin() {\n\t\treturn this.#stdin ??= new ReadStream(0);\n\t}\n\tget stdout() {\n\t\treturn this.#stdout ??= new WriteStream(1);\n\t}\n\tget stderr() {\n\t\treturn this.#stderr ??= new WriteStream(2);\n\t}\n\t#cwd = \"/\";\n\tchdir(cwd) {\n\t\tthis.#cwd = cwd;\n\t}\n\tcwd() {\n\t\treturn this.#cwd;\n\t}\n\tarch = \"\";\n\tplatform = \"\";\n\targv = [];\n\targv0 = \"\";\n\texecArgv = [];\n\texecPath = \"\";\n\ttitle = \"\";\n\tpid = 200;\n\tppid = 100;\n\tget version() {\n\t\treturn \"\";\n\t}\n\tget versions() {\n\t\treturn {};\n\t}\n\tget allowedNodeEnvironmentFlags() {\n\t\treturn new Set();\n\t}\n\tget sourceMapsEnabled() {\n\t\treturn false;\n\t}\n\tget debugPort() {\n\t\treturn 0;\n\t}\n\tget throwDeprecation() {\n\t\treturn false;\n\t}\n\tget traceDeprecation() {\n\t\treturn false;\n\t}\n\tget features() {\n\t\treturn {};\n\t}\n\tget release() {\n\t\treturn {};\n\t}\n\tget connected() {\n\t\treturn false;\n\t}\n\tget config() {\n\t\treturn {};\n\t}\n\tget moduleLoadList() {\n\t\treturn [];\n\t}\n\tconstrainedMemory() {\n\t\treturn 0;\n\t}\n\tavailableMemory() {\n\t\treturn 0;\n\t}\n\tuptime() {\n\t\treturn 0;\n\t}\n\tresourceUsage() {\n\t\treturn {};\n\t}\n\tref() {}\n\tunref() {}\n\tumask() {\n\t\tthrow createNotImplementedError(\"process.umask\");\n\t}\n\tgetBuiltinModule() {\n\t\treturn undefined;\n\t}\n\tgetActiveResourcesInfo() {\n\t\tthrow createNotImplementedError(\"process.getActiveResourcesInfo\");\n\t}\n\texit() {\n\t\tthrow createNotImplementedError(\"process.exit\");\n\t}\n\treallyExit() {\n\t\tthrow createNotImplementedError(\"process.reallyExit\");\n\t}\n\tkill() {\n\t\tthrow createNotImplementedError(\"process.kill\");\n\t}\n\tabort() {\n\t\tthrow createNotImplementedError(\"process.abort\");\n\t}\n\tdlopen() {\n\t\tthrow createNotImplementedError(\"process.dlopen\");\n\t}\n\tsetSourceMapsEnabled() {\n\t\tthrow createNotImplementedError(\"process.setSourceMapsEnabled\");\n\t}\n\tloadEnvFile() {\n\t\tthrow createNotImplementedError(\"process.loadEnvFile\");\n\t}\n\tdisconnect() {\n\t\tthrow createNotImplementedError(\"process.disconnect\");\n\t}\n\tcpuUsage() {\n\t\tthrow createNotImplementedError(\"process.cpuUsage\");\n\t}\n\tsetUncaughtExceptionCaptureCallback() {\n\t\tthrow createNotImplementedError(\"process.setUncaughtExceptionCaptureCallback\");\n\t}\n\thasUncaughtExceptionCaptureCallback() {\n\t\tthrow createNotImplementedError(\"process.hasUncaughtExceptionCaptureCallback\");\n\t}\n\tinitgroups() {\n\t\tthrow createNotImplementedError(\"process.initgroups\");\n\t}\n\topenStdin() {\n\t\tthrow createNotImplementedError(\"process.openStdin\");\n\t}\n\tassert() {\n\t\tthrow createNotImplementedError(\"process.assert\");\n\t}\n\tbinding() {\n\t\tthrow createNotImplementedError(\"process.binding\");\n\t}\n\tpermission = { has: /*@__PURE__*/ notImplemented(\"process.permission.has\") };\n\treport = {\n\t\tdirectory: \"\",\n\t\tfilename: \"\",\n\t\tsignal: \"SIGUSR2\",\n\t\tcompact: false,\n\t\treportOnFatalError: false,\n\t\treportOnSignal: false,\n\t\treportOnUncaughtException: false,\n\t\tgetReport: /*@__PURE__*/ notImplemented(\"process.report.getReport\"),\n\t\twriteReport: /*@__PURE__*/ notImplemented(\"process.report.writeReport\")\n\t};\n\tfinalization = {\n\t\tregister: /*@__PURE__*/ notImplemented(\"process.finalization.register\"),\n\t\tunregister: /*@__PURE__*/ notImplemented(\"process.finalization.unregister\"),\n\t\tregisterBeforeExit: /*@__PURE__*/ notImplemented(\"process.finalization.registerBeforeExit\")\n\t};\n\tmemoryUsage = Object.assign(() => ({\n\t\tarrayBuffers: 0,\n\t\trss: 0,\n\t\texternal: 0,\n\t\theapTotal: 0,\n\t\theapUsed: 0\n\t}), { rss: () => 0 });\n\tmainModule = undefined;\n\tdomain = undefined;\n\tsend = undefined;\n\texitCode = undefined;\n\tchannel = undefined;\n\tgetegid = undefined;\n\tgeteuid = undefined;\n\tgetgid = undefined;\n\tgetgroups = undefined;\n\tgetuid = undefined;\n\tsetegid = undefined;\n\tseteuid = undefined;\n\tsetgid = undefined;\n\tsetgroups = undefined;\n\tsetuid = undefined;\n\t_events = undefined;\n\t_eventsCount = undefined;\n\t_exiting = undefined;\n\t_maxListeners = undefined;\n\t_debugEnd = undefined;\n\t_debugProcess = undefined;\n\t_fatalException = undefined;\n\t_getActiveHandles = undefined;\n\t_getActiveRequests = undefined;\n\t_kill = undefined;\n\t_preload_modules = undefined;\n\t_rawDebug = undefined;\n\t_startProfilerIdleNotifier = undefined;\n\t_stopProfilerIdleNotifier = undefined;\n\t_tickCallback = undefined;\n\t_disconnect = undefined;\n\t_handleQueue = undefined;\n\t_pendingMessage = undefined;\n\t_channel = undefined;\n\t_send = undefined;\n\t_linkedBinding = undefined;\n}\n", "import { hrtime as UnenvHrTime } from \"unenv/node/internal/process/hrtime\";\nimport { Process as UnenvProcess } from \"unenv/node/internal/process/process\";\nconst globalProcess = globalThis[\"process\"];\nexport const getBuiltinModule = globalProcess.getBuiltinModule;\nexport const { exit, platform, nextTick } = getBuiltinModule(\n \"node:process\"\n);\nconst unenvProcess = new UnenvProcess({\n env: globalProcess.env,\n hrtime: UnenvHrTime,\n nextTick\n});\nexport const {\n abort,\n addListener,\n allowedNodeEnvironmentFlags,\n hasUncaughtExceptionCaptureCallback,\n setUncaughtExceptionCaptureCallback,\n loadEnvFile,\n sourceMapsEnabled,\n arch,\n argv,\n argv0,\n chdir,\n config,\n connected,\n constrainedMemory,\n availableMemory,\n cpuUsage,\n cwd,\n debugPort,\n dlopen,\n disconnect,\n emit,\n emitWarning,\n env,\n eventNames,\n execArgv,\n execPath,\n finalization,\n features,\n getActiveResourcesInfo,\n getMaxListeners,\n hrtime,\n kill,\n listeners,\n listenerCount,\n memoryUsage,\n on,\n off,\n once,\n pid,\n ppid,\n prependListener,\n prependOnceListener,\n rawListeners,\n release,\n removeAllListeners,\n removeListener,\n report,\n resourceUsage,\n setMaxListeners,\n setSourceMapsEnabled,\n stderr,\n stdin,\n stdout,\n title,\n throwDeprecation,\n traceDeprecation,\n umask,\n uptime,\n version,\n versions,\n domain,\n initgroups,\n moduleLoadList,\n reallyExit,\n openStdin,\n assert,\n binding,\n send,\n exitCode,\n channel,\n getegid,\n geteuid,\n getgid,\n getgroups,\n getuid,\n setegid,\n seteuid,\n setgid,\n setgroups,\n setuid,\n permission,\n mainModule,\n _events,\n _eventsCount,\n _exiting,\n _maxListeners,\n _debugEnd,\n _debugProcess,\n _fatalException,\n _getActiveHandles,\n _getActiveRequests,\n _kill,\n _preload_modules,\n _rawDebug,\n _startProfilerIdleNotifier,\n _stopProfilerIdleNotifier,\n _tickCallback,\n _disconnect,\n _handleQueue,\n _pendingMessage,\n _channel,\n _send,\n _linkedBinding\n} = unenvProcess;\nconst _process = {\n abort,\n addListener,\n allowedNodeEnvironmentFlags,\n hasUncaughtExceptionCaptureCallback,\n setUncaughtExceptionCaptureCallback,\n loadEnvFile,\n sourceMapsEnabled,\n arch,\n argv,\n argv0,\n chdir,\n config,\n connected,\n constrainedMemory,\n availableMemory,\n cpuUsage,\n cwd,\n debugPort,\n dlopen,\n disconnect,\n emit,\n emitWarning,\n env,\n eventNames,\n execArgv,\n execPath,\n exit,\n finalization,\n features,\n getBuiltinModule,\n getActiveResourcesInfo,\n getMaxListeners,\n hrtime,\n kill,\n listeners,\n listenerCount,\n memoryUsage,\n nextTick,\n on,\n off,\n once,\n pid,\n platform,\n ppid,\n prependListener,\n prependOnceListener,\n rawListeners,\n release,\n removeAllListeners,\n removeListener,\n report,\n resourceUsage,\n setMaxListeners,\n setSourceMapsEnabled,\n stderr,\n stdin,\n stdout,\n title,\n throwDeprecation,\n traceDeprecation,\n umask,\n uptime,\n version,\n versions,\n // @ts-expect-error old API\n domain,\n initgroups,\n moduleLoadList,\n reallyExit,\n openStdin,\n assert,\n binding,\n send,\n exitCode,\n channel,\n getegid,\n geteuid,\n getgid,\n getgroups,\n getuid,\n setegid,\n seteuid,\n setgid,\n setgroups,\n setuid,\n permission,\n mainModule,\n _events,\n _eventsCount,\n _exiting,\n _maxListeners,\n _debugEnd,\n _debugProcess,\n _fatalException,\n _getActiveHandles,\n _getActiveRequests,\n _kill,\n _preload_modules,\n _rawDebug,\n _startProfilerIdleNotifier,\n _stopProfilerIdleNotifier,\n _tickCallback,\n _disconnect,\n _handleQueue,\n _pendingMessage,\n _channel,\n _send,\n _linkedBinding\n};\nexport default _process;\n", "import { default as defaultExport } from \"@cloudflare/unenv-preset/node/process\";\nglobalThis.process = defaultExport;", "", "// `esbuild` doesn't support returning `watch*` options from `onStart()`\n// plugin callbacks. Instead, we define an empty virtual module that is\n// imported by this injected file. Importing the module registers watchers.\nimport \"wrangler:modules-watch\";\n", "// src/compose.ts\nvar compose = (middleware, onError, onNotFound) => {\n return (context, next) => {\n let index = -1;\n return dispatch(0);\n async function dispatch(i) {\n if (i <= index) {\n throw new Error(\"next() called multiple times\");\n }\n index = i;\n let res;\n let isError = false;\n let handler;\n if (middleware[i]) {\n handler = middleware[i][0][0];\n context.req.routeIndex = i;\n } else {\n handler = i === middleware.length && next || void 0;\n }\n if (handler) {\n try {\n res = await handler(context, () => dispatch(i + 1));\n } catch (err) {\n if (err instanceof Error && onError) {\n context.error = err;\n res = await onError(err, context);\n isError = true;\n } else {\n throw err;\n }\n }\n } else {\n if (context.finalized === false && onNotFound) {\n res = await onNotFound(context);\n }\n }\n if (res && (context.finalized === false || isError)) {\n context.res = res;\n }\n return context;\n }\n };\n};\nexport {\n compose\n};\n", "// src/http-exception.ts\nvar HTTPException = class extends Error {\n res;\n status;\n /**\n * Creates an instance of `HTTPException`.\n * @param status - HTTP status code for the exception. Defaults to 500.\n * @param options - Additional options for the exception.\n */\n constructor(status = 500, options) {\n super(options?.message, { cause: options?.cause });\n this.res = options?.res;\n this.status = status;\n }\n /**\n * Returns the response object associated with the exception.\n * If a response object is not provided, a new response is created with the error message and status code.\n * @returns The response object.\n */\n getResponse() {\n if (this.res) {\n const newResponse = new Response(this.res.body, {\n status: this.status,\n headers: this.res.headers\n });\n return newResponse;\n }\n return new Response(this.message, {\n status: this.status\n });\n }\n};\nexport {\n HTTPException\n};\n", "// src/request/constants.ts\nvar GET_MATCH_RESULT = /* @__PURE__ */ Symbol();\nexport {\n GET_MATCH_RESULT\n};\n", "// src/utils/body.ts\nimport { HonoRequest } from \"../request.js\";\nvar parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) => {\n const { all = false, dot = false } = options;\n const headers = request instanceof HonoRequest ? request.raw.headers : request.headers;\n const contentType = headers.get(\"Content-Type\");\n if (contentType?.startsWith(\"multipart/form-data\") || contentType?.startsWith(\"application/x-www-form-urlencoded\")) {\n return parseFormData(request, { all, dot });\n }\n return {};\n};\nasync function parseFormData(request, options) {\n const formData = await request.formData();\n if (formData) {\n return convertFormDataToBodyData(formData, options);\n }\n return {};\n}\nfunction convertFormDataToBodyData(formData, options) {\n const form = /* @__PURE__ */ Object.create(null);\n formData.forEach((value, key) => {\n const shouldParseAllValues = options.all || key.endsWith(\"[]\");\n if (!shouldParseAllValues) {\n form[key] = value;\n } else {\n handleParsingAllValues(form, key, value);\n }\n });\n if (options.dot) {\n Object.entries(form).forEach(([key, value]) => {\n const shouldParseDotValues = key.includes(\".\");\n if (shouldParseDotValues) {\n handleParsingNestedValues(form, key, value);\n delete form[key];\n }\n });\n }\n return form;\n}\nvar handleParsingAllValues = (form, key, value) => {\n if (form[key] !== void 0) {\n if (Array.isArray(form[key])) {\n ;\n form[key].push(value);\n } else {\n form[key] = [form[key], value];\n }\n } else {\n if (!key.endsWith(\"[]\")) {\n form[key] = value;\n } else {\n form[key] = [value];\n }\n }\n};\nvar handleParsingNestedValues = (form, key, value) => {\n if (/(?:^|\\.)__proto__\\./.test(key)) {\n return;\n }\n let nestedForm = form;\n const keys = key.split(\".\");\n keys.forEach((key2, index) => {\n if (index === keys.length - 1) {\n nestedForm[key2] = value;\n } else {\n if (!nestedForm[key2] || typeof nestedForm[key2] !== \"object\" || Array.isArray(nestedForm[key2]) || nestedForm[key2] instanceof File) {\n nestedForm[key2] = /* @__PURE__ */ Object.create(null);\n }\n nestedForm = nestedForm[key2];\n }\n });\n};\nexport {\n parseBody\n};\n", "// src/utils/url.ts\nvar splitPath = (path) => {\n const paths = path.split(\"/\");\n if (paths[0] === \"\") {\n paths.shift();\n }\n return paths;\n};\nvar splitRoutingPath = (routePath) => {\n const { groups, path } = extractGroupsFromPath(routePath);\n const paths = splitPath(path);\n return replaceGroupMarks(paths, groups);\n};\nvar extractGroupsFromPath = (path) => {\n const groups = [];\n path = path.replace(/\\{[^}]+\\}/g, (match, index) => {\n const mark = `@${index}`;\n groups.push([mark, match]);\n return mark;\n });\n return { groups, path };\n};\nvar replaceGroupMarks = (paths, groups) => {\n for (let i = groups.length - 1; i >= 0; i--) {\n const [mark] = groups[i];\n for (let j = paths.length - 1; j >= 0; j--) {\n if (paths[j].includes(mark)) {\n paths[j] = paths[j].replace(mark, groups[i][1]);\n break;\n }\n }\n }\n return paths;\n};\nvar patternCache = {};\nvar getPattern = (label, next) => {\n if (label === \"*\") {\n return \"*\";\n }\n const match = label.match(/^\\:([^\\{\\}]+)(?:\\{(.+)\\})?$/);\n if (match) {\n const cacheKey = `${label}#${next}`;\n if (!patternCache[cacheKey]) {\n if (match[2]) {\n patternCache[cacheKey] = next && next[0] !== \":\" && next[0] !== \"*\" ? [cacheKey, match[1], new RegExp(`^${match[2]}(?=/${next})`)] : [label, match[1], new RegExp(`^${match[2]}$`)];\n } else {\n patternCache[cacheKey] = [label, match[1], true];\n }\n }\n return patternCache[cacheKey];\n }\n return null;\n};\nvar tryDecode = (str, decoder) => {\n try {\n return decoder(str);\n } catch {\n return str.replace(/(?:%[0-9A-Fa-f]{2})+/g, (match) => {\n try {\n return decoder(match);\n } catch {\n return match;\n }\n });\n }\n};\nvar tryDecodeURI = (str) => tryDecode(str, decodeURI);\nvar getPath = (request) => {\n const url = request.url;\n const start = url.indexOf(\"/\", url.indexOf(\":\") + 4);\n let i = start;\n for (; i < url.length; i++) {\n const charCode = url.charCodeAt(i);\n if (charCode === 37) {\n const queryIndex = url.indexOf(\"?\", i);\n const hashIndex = url.indexOf(\"#\", i);\n const end = queryIndex === -1 ? hashIndex === -1 ? void 0 : hashIndex : hashIndex === -1 ? queryIndex : Math.min(queryIndex, hashIndex);\n const path = url.slice(start, end);\n return tryDecodeURI(path.includes(\"%25\") ? path.replace(/%25/g, \"%2525\") : path);\n } else if (charCode === 63 || charCode === 35) {\n break;\n }\n }\n return url.slice(start, i);\n};\nvar getQueryStrings = (url) => {\n const queryIndex = url.indexOf(\"?\", 8);\n return queryIndex === -1 ? \"\" : \"?\" + url.slice(queryIndex + 1);\n};\nvar getPathNoStrict = (request) => {\n const result = getPath(request);\n return result.length > 1 && result.at(-1) === \"/\" ? result.slice(0, -1) : result;\n};\nvar mergePath = (base, sub, ...rest) => {\n if (rest.length) {\n sub = mergePath(sub, ...rest);\n }\n return `${base?.[0] === \"/\" ? \"\" : \"/\"}${base}${sub === \"/\" ? \"\" : `${base?.at(-1) === \"/\" ? \"\" : \"/\"}${sub?.[0] === \"/\" ? sub.slice(1) : sub}`}`;\n};\nvar checkOptionalParameter = (path) => {\n if (path.charCodeAt(path.length - 1) !== 63 || !path.includes(\":\")) {\n return null;\n }\n const segments = path.split(\"/\");\n const results = [];\n let basePath = \"\";\n segments.forEach((segment) => {\n if (segment !== \"\" && !/\\:/.test(segment)) {\n basePath += \"/\" + segment;\n } else if (/\\:/.test(segment)) {\n if (/\\?/.test(segment)) {\n if (results.length === 0 && basePath === \"\") {\n results.push(\"/\");\n } else {\n results.push(basePath);\n }\n const optionalSegment = segment.replace(\"?\", \"\");\n basePath += \"/\" + optionalSegment;\n results.push(basePath);\n } else {\n basePath += \"/\" + segment;\n }\n }\n });\n return results.filter((v, i, a) => a.indexOf(v) === i);\n};\nvar _decodeURI = (value) => {\n if (!/[%+]/.test(value)) {\n return value;\n }\n if (value.indexOf(\"+\") !== -1) {\n value = value.replace(/\\+/g, \" \");\n }\n return value.indexOf(\"%\") !== -1 ? tryDecode(value, decodeURIComponent_) : value;\n};\nvar _getQueryParam = (url, key, multiple) => {\n let encoded;\n if (!multiple && key && !/[%+]/.test(key)) {\n let keyIndex2 = url.indexOf(\"?\", 8);\n if (keyIndex2 === -1) {\n return void 0;\n }\n if (!url.startsWith(key, keyIndex2 + 1)) {\n keyIndex2 = url.indexOf(`&${key}`, keyIndex2 + 1);\n }\n while (keyIndex2 !== -1) {\n const trailingKeyCode = url.charCodeAt(keyIndex2 + key.length + 1);\n if (trailingKeyCode === 61) {\n const valueIndex = keyIndex2 + key.length + 2;\n const endIndex = url.indexOf(\"&\", valueIndex);\n return _decodeURI(url.slice(valueIndex, endIndex === -1 ? void 0 : endIndex));\n } else if (trailingKeyCode == 38 || isNaN(trailingKeyCode)) {\n return \"\";\n }\n keyIndex2 = url.indexOf(`&${key}`, keyIndex2 + 1);\n }\n encoded = /[%+]/.test(url);\n if (!encoded) {\n return void 0;\n }\n }\n const results = {};\n encoded ??= /[%+]/.test(url);\n let keyIndex = url.indexOf(\"?\", 8);\n while (keyIndex !== -1) {\n const nextKeyIndex = url.indexOf(\"&\", keyIndex + 1);\n let valueIndex = url.indexOf(\"=\", keyIndex);\n if (valueIndex > nextKeyIndex && nextKeyIndex !== -1) {\n valueIndex = -1;\n }\n let name = url.slice(\n keyIndex + 1,\n valueIndex === -1 ? nextKeyIndex === -1 ? void 0 : nextKeyIndex : valueIndex\n );\n if (encoded) {\n name = _decodeURI(name);\n }\n keyIndex = nextKeyIndex;\n if (name === \"\") {\n continue;\n }\n let value;\n if (valueIndex === -1) {\n value = \"\";\n } else {\n value = url.slice(valueIndex + 1, nextKeyIndex === -1 ? void 0 : nextKeyIndex);\n if (encoded) {\n value = _decodeURI(value);\n }\n }\n if (multiple) {\n if (!(results[name] && Array.isArray(results[name]))) {\n results[name] = [];\n }\n ;\n results[name].push(value);\n } else {\n results[name] ??= value;\n }\n }\n return key ? results[key] : results;\n};\nvar getQueryParam = _getQueryParam;\nvar getQueryParams = (url, key) => {\n return _getQueryParam(url, key, true);\n};\nvar decodeURIComponent_ = decodeURIComponent;\nexport {\n checkOptionalParameter,\n decodeURIComponent_,\n getPath,\n getPathNoStrict,\n getPattern,\n getQueryParam,\n getQueryParams,\n getQueryStrings,\n mergePath,\n splitPath,\n splitRoutingPath,\n tryDecode,\n tryDecodeURI\n};\n", "// src/request.ts\nimport { HTTPException } from \"./http-exception.js\";\nimport { GET_MATCH_RESULT } from \"./request/constants.js\";\nimport { parseBody } from \"./utils/body.js\";\nimport { decodeURIComponent_, getQueryParam, getQueryParams, tryDecode } from \"./utils/url.js\";\nvar tryDecodeURIComponent = (str) => tryDecode(str, decodeURIComponent_);\nvar HonoRequest = class {\n /**\n * `.raw` can get the raw Request object.\n *\n * @see {@link https://hono.dev/docs/api/request#raw}\n *\n * @example\n * ```ts\n * // For Cloudflare Workers\n * app.post('/', async (c) => {\n * const metadata = c.req.raw.cf?.hostMetadata?\n * ...\n * })\n * ```\n */\n raw;\n #validatedData;\n // Short name of validatedData\n #matchResult;\n routeIndex = 0;\n /**\n * `.path` can get the pathname of the request.\n *\n * @see {@link https://hono.dev/docs/api/request#path}\n *\n * @example\n * ```ts\n * app.get('/about/me', (c) => {\n * const pathname = c.req.path // `/about/me`\n * })\n * ```\n */\n path;\n bodyCache = {};\n constructor(request, path = \"/\", matchResult = [[]]) {\n this.raw = request;\n this.path = path;\n this.#matchResult = matchResult;\n this.#validatedData = {};\n }\n param(key) {\n return key ? this.#getDecodedParam(key) : this.#getAllDecodedParams();\n }\n #getDecodedParam(key) {\n const paramKey = this.#matchResult[0][this.routeIndex][1][key];\n const param = this.#getParamValue(paramKey);\n return param && /\\%/.test(param) ? tryDecodeURIComponent(param) : param;\n }\n #getAllDecodedParams() {\n const decoded = {};\n const keys = Object.keys(this.#matchResult[0][this.routeIndex][1]);\n for (const key of keys) {\n const value = this.#getParamValue(this.#matchResult[0][this.routeIndex][1][key]);\n if (value !== void 0) {\n decoded[key] = /\\%/.test(value) ? tryDecodeURIComponent(value) : value;\n }\n }\n return decoded;\n }\n #getParamValue(paramKey) {\n return this.#matchResult[1] ? this.#matchResult[1][paramKey] : paramKey;\n }\n query(key) {\n return getQueryParam(this.url, key);\n }\n queries(key) {\n return getQueryParams(this.url, key);\n }\n header(name) {\n if (name) {\n return this.raw.headers.get(name) ?? void 0;\n }\n const headerData = {};\n this.raw.headers.forEach((value, key) => {\n headerData[key] = value;\n });\n return headerData;\n }\n async parseBody(options) {\n return parseBody(this, options);\n }\n #cachedBody = (key) => {\n const { bodyCache, raw } = this;\n const cachedBody = bodyCache[key];\n if (cachedBody) {\n return cachedBody;\n }\n const anyCachedKey = Object.keys(bodyCache)[0];\n if (anyCachedKey) {\n return bodyCache[anyCachedKey].then((body) => {\n if (anyCachedKey === \"json\") {\n body = JSON.stringify(body);\n }\n return new Response(body)[key]();\n });\n }\n return bodyCache[key] = raw[key]();\n };\n /**\n * `.json()` can parse Request body of type `application/json`\n *\n * @see {@link https://hono.dev/docs/api/request#json}\n *\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.json()\n * })\n * ```\n */\n json() {\n return this.#cachedBody(\"text\").then((text) => JSON.parse(text));\n }\n /**\n * `.text()` can parse Request body of type `text/plain`\n *\n * @see {@link https://hono.dev/docs/api/request#text}\n *\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.text()\n * })\n * ```\n */\n text() {\n return this.#cachedBody(\"text\");\n }\n /**\n * `.arrayBuffer()` parse Request body as an `ArrayBuffer`\n *\n * @see {@link https://hono.dev/docs/api/request#arraybuffer}\n *\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.arrayBuffer()\n * })\n * ```\n */\n arrayBuffer() {\n return this.#cachedBody(\"arrayBuffer\");\n }\n /**\n * Parses the request body as a `Blob`.\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.blob();\n * });\n * ```\n * @see https://hono.dev/docs/api/request#blob\n */\n blob() {\n return this.#cachedBody(\"blob\");\n }\n /**\n * Parses the request body as `FormData`.\n * @example\n * ```ts\n * app.post('/entry', async (c) => {\n * const body = await c.req.formData();\n * });\n * ```\n * @see https://hono.dev/docs/api/request#formdata\n */\n formData() {\n return this.#cachedBody(\"formData\");\n }\n /**\n * Adds validated data to the request.\n *\n * @param target - The target of the validation.\n * @param data - The validated data to add.\n */\n addValidatedData(target, data) {\n this.#validatedData[target] = data;\n }\n valid(target) {\n return this.#validatedData[target];\n }\n /**\n * `.url()` can get the request url strings.\n *\n * @see {@link https://hono.dev/docs/api/request#url}\n *\n * @example\n * ```ts\n * app.get('/about/me', (c) => {\n * const url = c.req.url // `http://localhost:8787/about/me`\n * ...\n * })\n * ```\n */\n get url() {\n return this.raw.url;\n }\n /**\n * `.method()` can get the method name of the request.\n *\n * @see {@link https://hono.dev/docs/api/request#method}\n *\n * @example\n * ```ts\n * app.get('/about/me', (c) => {\n * const method = c.req.method // `GET`\n * })\n * ```\n */\n get method() {\n return this.raw.method;\n }\n get [GET_MATCH_RESULT]() {\n return this.#matchResult;\n }\n /**\n * `.matchedRoutes()` can return a matched route in the handler\n *\n * @deprecated\n *\n * Use matchedRoutes helper defined in \"hono/route\" instead.\n *\n * @see {@link https://hono.dev/docs/api/request#matchedroutes}\n *\n * @example\n * ```ts\n * app.use('*', async function logger(c, next) {\n * await next()\n * c.req.matchedRoutes.forEach(({ handler, method, path }, i) => {\n * const name = handler.name || (handler.length < 2 ? '[handler]' : '[middleware]')\n * console.log(\n * method,\n * ' ',\n * path,\n * ' '.repeat(Math.max(10 - path.length, 0)),\n * name,\n * i === c.req.routeIndex ? '<- respond from here' : ''\n * )\n * })\n * })\n * ```\n */\n get matchedRoutes() {\n return this.#matchResult[0].map(([[, route]]) => route);\n }\n /**\n * `routePath()` can retrieve the path registered within the handler\n *\n * @deprecated\n *\n * Use routePath helper defined in \"hono/route\" instead.\n *\n * @see {@link https://hono.dev/docs/api/request#routepath}\n *\n * @example\n * ```ts\n * app.get('/posts/:id', (c) => {\n * return c.json({ path: c.req.routePath })\n * })\n * ```\n */\n get routePath() {\n return this.#matchResult[0].map(([[, route]]) => route)[this.routeIndex].path;\n }\n};\nvar cloneRawRequest = async (req) => {\n if (!req.raw.bodyUsed) {\n return req.raw.clone();\n }\n const cacheKey = Object.keys(req.bodyCache)[0];\n if (!cacheKey) {\n throw new HTTPException(500, {\n message: \"Cannot clone request: body was already consumed and not cached. Please use HonoRequest methods (e.g., req.json(), req.text()) instead of consuming req.raw directly.\"\n });\n }\n const requestInit = {\n body: await req[cacheKey](),\n cache: req.raw.cache,\n credentials: req.raw.credentials,\n headers: req.header(),\n integrity: req.raw.integrity,\n keepalive: req.raw.keepalive,\n method: req.method,\n mode: req.raw.mode,\n redirect: req.raw.redirect,\n referrer: req.raw.referrer,\n referrerPolicy: req.raw.referrerPolicy,\n signal: req.raw.signal\n };\n return new Request(req.url, requestInit);\n};\nexport {\n HonoRequest,\n cloneRawRequest\n};\n", "// src/utils/html.ts\nvar HtmlEscapedCallbackPhase = {\n Stringify: 1,\n BeforeStream: 2,\n Stream: 3\n};\nvar raw = (value, callbacks) => {\n const escapedString = new String(value);\n escapedString.isEscaped = true;\n escapedString.callbacks = callbacks;\n return escapedString;\n};\nvar escapeRe = /[&<>'\"]/;\nvar stringBufferToString = async (buffer, callbacks) => {\n let str = \"\";\n callbacks ||= [];\n const resolvedBuffer = await Promise.all(buffer);\n for (let i = resolvedBuffer.length - 1; ; i--) {\n str += resolvedBuffer[i];\n i--;\n if (i < 0) {\n break;\n }\n let r = resolvedBuffer[i];\n if (typeof r === \"object\") {\n callbacks.push(...r.callbacks || []);\n }\n const isEscaped = r.isEscaped;\n r = await (typeof r === \"object\" ? r.toString() : r);\n if (typeof r === \"object\") {\n callbacks.push(...r.callbacks || []);\n }\n if (r.isEscaped ?? isEscaped) {\n str += r;\n } else {\n const buf = [str];\n escapeToBuffer(r, buf);\n str = buf[0];\n }\n }\n return raw(str, callbacks);\n};\nvar escapeToBuffer = (str, buffer) => {\n const match = str.search(escapeRe);\n if (match === -1) {\n buffer[0] += str;\n return;\n }\n let escape;\n let index;\n let lastIndex = 0;\n for (index = match; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n escape = \""\";\n break;\n case 39:\n escape = \"'\";\n break;\n case 38:\n escape = \"&\";\n break;\n case 60:\n escape = \"<\";\n break;\n case 62:\n escape = \">\";\n break;\n default:\n continue;\n }\n buffer[0] += str.substring(lastIndex, index) + escape;\n lastIndex = index + 1;\n }\n buffer[0] += str.substring(lastIndex, index);\n};\nvar resolveCallbackSync = (str) => {\n const callbacks = str.callbacks;\n if (!callbacks?.length) {\n return str;\n }\n const buffer = [str];\n const context = {};\n callbacks.forEach((c) => c({ phase: HtmlEscapedCallbackPhase.Stringify, buffer, context }));\n return buffer[0];\n};\nvar resolveCallback = async (str, phase, preserveCallbacks, context, buffer) => {\n if (typeof str === \"object\" && !(str instanceof String)) {\n if (!(str instanceof Promise)) {\n str = str.toString();\n }\n if (str instanceof Promise) {\n str = await str;\n }\n }\n const callbacks = str.callbacks;\n if (!callbacks?.length) {\n return Promise.resolve(str);\n }\n if (buffer) {\n buffer[0] += str;\n } else {\n buffer = [str];\n }\n const resStr = Promise.all(callbacks.map((c) => c({ phase, buffer, context }))).then(\n (res) => Promise.all(\n res.filter(Boolean).map((str2) => resolveCallback(str2, phase, false, context, buffer))\n ).then(() => buffer[0])\n );\n if (preserveCallbacks) {\n return raw(await resStr, callbacks);\n } else {\n return resStr;\n }\n};\nexport {\n HtmlEscapedCallbackPhase,\n escapeToBuffer,\n raw,\n resolveCallback,\n resolveCallbackSync,\n stringBufferToString\n};\n", "// src/context.ts\nimport { HonoRequest } from \"./request.js\";\nimport { HtmlEscapedCallbackPhase, resolveCallback } from \"./utils/html.js\";\nvar TEXT_PLAIN = \"text/plain; charset=UTF-8\";\nvar setDefaultContentType = (contentType, headers) => {\n return {\n \"Content-Type\": contentType,\n ...headers\n };\n};\nvar createResponseInstance = (body, init) => new Response(body, init);\nvar Context = class {\n #rawRequest;\n #req;\n /**\n * `.env` can get bindings (environment variables, secrets, KV namespaces, D1 database, R2 bucket etc.) in Cloudflare Workers.\n *\n * @see {@link https://hono.dev/docs/api/context#env}\n *\n * @example\n * ```ts\n * // Environment object for Cloudflare Workers\n * app.get('*', async c => {\n * const counter = c.env.COUNTER\n * })\n * ```\n */\n env = {};\n #var;\n finalized = false;\n /**\n * `.error` can get the error object from the middleware if the Handler throws an error.\n *\n * @see {@link https://hono.dev/docs/api/context#error}\n *\n * @example\n * ```ts\n * app.use('*', async (c, next) => {\n * await next()\n * if (c.error) {\n * // do something...\n * }\n * })\n * ```\n */\n error;\n #status;\n #executionCtx;\n #res;\n #layout;\n #renderer;\n #notFoundHandler;\n #preparedHeaders;\n #matchResult;\n #path;\n /**\n * Creates an instance of the Context class.\n *\n * @param req - The Request object.\n * @param options - Optional configuration options for the context.\n */\n constructor(req, options) {\n this.#rawRequest = req;\n if (options) {\n this.#executionCtx = options.executionCtx;\n this.env = options.env;\n this.#notFoundHandler = options.notFoundHandler;\n this.#path = options.path;\n this.#matchResult = options.matchResult;\n }\n }\n /**\n * `.req` is the instance of {@link HonoRequest}.\n */\n get req() {\n this.#req ??= new HonoRequest(this.#rawRequest, this.#path, this.#matchResult);\n return this.#req;\n }\n /**\n * @see {@link https://hono.dev/docs/api/context#event}\n * The FetchEvent associated with the current request.\n *\n * @throws Will throw an error if the context does not have a FetchEvent.\n */\n get event() {\n if (this.#executionCtx && \"respondWith\" in this.#executionCtx) {\n return this.#executionCtx;\n } else {\n throw Error(\"This context has no FetchEvent\");\n }\n }\n /**\n * @see {@link https://hono.dev/docs/api/context#executionctx}\n * The ExecutionContext associated with the current request.\n *\n * @throws Will throw an error if the context does not have an ExecutionContext.\n */\n get executionCtx() {\n if (this.#executionCtx) {\n return this.#executionCtx;\n } else {\n throw Error(\"This context has no ExecutionContext\");\n }\n }\n /**\n * @see {@link https://hono.dev/docs/api/context#res}\n * The Response object for the current request.\n */\n get res() {\n return this.#res ||= createResponseInstance(null, {\n headers: this.#preparedHeaders ??= new Headers()\n });\n }\n /**\n * Sets the Response object for the current request.\n *\n * @param _res - The Response object to set.\n */\n set res(_res) {\n if (this.#res && _res) {\n _res = createResponseInstance(_res.body, _res);\n for (const [k, v] of this.#res.headers.entries()) {\n if (k === \"content-type\") {\n continue;\n }\n if (k === \"set-cookie\") {\n const cookies = this.#res.headers.getSetCookie();\n _res.headers.delete(\"set-cookie\");\n for (const cookie of cookies) {\n _res.headers.append(\"set-cookie\", cookie);\n }\n } else {\n _res.headers.set(k, v);\n }\n }\n }\n this.#res = _res;\n this.finalized = true;\n }\n /**\n * `.render()` can create a response within a layout.\n *\n * @see {@link https://hono.dev/docs/api/context#render-setrenderer}\n *\n * @example\n * ```ts\n * app.get('/', (c) => {\n * return c.render('Hello!')\n * })\n * ```\n */\n render = (...args) => {\n this.#renderer ??= (content) => this.html(content);\n return this.#renderer(...args);\n };\n /**\n * Sets the layout for the response.\n *\n * @param layout - The layout to set.\n * @returns The layout function.\n */\n setLayout = (layout) => this.#layout = layout;\n /**\n * Gets the current layout for the response.\n *\n * @returns The current layout function.\n */\n getLayout = () => this.#layout;\n /**\n * `.setRenderer()` can set the layout in the custom middleware.\n *\n * @see {@link https://hono.dev/docs/api/context#render-setrenderer}\n *\n * @example\n * ```tsx\n * app.use('*', async (c, next) => {\n * c.setRenderer((content) => {\n * return c.html(\n * \n * \n *

{content}

\n * \n * \n * )\n * })\n * await next()\n * })\n * ```\n */\n setRenderer = (renderer) => {\n this.#renderer = renderer;\n };\n /**\n * `.header()` can set headers.\n *\n * @see {@link https://hono.dev/docs/api/context#header}\n *\n * @example\n * ```ts\n * app.get('/welcome', (c) => {\n * // Set headers\n * c.header('X-Message', 'Hello!')\n * c.header('Content-Type', 'text/plain')\n *\n * return c.body('Thank you for coming')\n * })\n * ```\n */\n header = (name, value, options) => {\n if (this.finalized) {\n this.#res = createResponseInstance(this.#res.body, this.#res);\n }\n const headers = this.#res ? this.#res.headers : this.#preparedHeaders ??= new Headers();\n if (value === void 0) {\n headers.delete(name);\n } else if (options?.append) {\n headers.append(name, value);\n } else {\n headers.set(name, value);\n }\n };\n status = (status) => {\n this.#status = status;\n };\n /**\n * `.set()` can set the value specified by the key.\n *\n * @see {@link https://hono.dev/docs/api/context#set-get}\n *\n * @example\n * ```ts\n * app.use('*', async (c, next) => {\n * c.set('message', 'Hono is hot!!')\n * await next()\n * })\n * ```\n */\n set = (key, value) => {\n this.#var ??= /* @__PURE__ */ new Map();\n this.#var.set(key, value);\n };\n /**\n * `.get()` can use the value specified by the key.\n *\n * @see {@link https://hono.dev/docs/api/context#set-get}\n *\n * @example\n * ```ts\n * app.get('/', (c) => {\n * const message = c.get('message')\n * return c.text(`The message is \"${message}\"`)\n * })\n * ```\n */\n get = (key) => {\n return this.#var ? this.#var.get(key) : void 0;\n };\n /**\n * `.var` can access the value of a variable.\n *\n * @see {@link https://hono.dev/docs/api/context#var}\n *\n * @example\n * ```ts\n * const result = c.var.client.oneMethod()\n * ```\n */\n // c.var.propName is a read-only\n get var() {\n if (!this.#var) {\n return {};\n }\n return Object.fromEntries(this.#var);\n }\n #newResponse(data, arg, headers) {\n const responseHeaders = this.#res ? new Headers(this.#res.headers) : this.#preparedHeaders ?? new Headers();\n if (typeof arg === \"object\" && \"headers\" in arg) {\n const argHeaders = arg.headers instanceof Headers ? arg.headers : new Headers(arg.headers);\n for (const [key, value] of argHeaders) {\n if (key.toLowerCase() === \"set-cookie\") {\n responseHeaders.append(key, value);\n } else {\n responseHeaders.set(key, value);\n }\n }\n }\n if (headers) {\n for (const [k, v] of Object.entries(headers)) {\n if (typeof v === \"string\") {\n responseHeaders.set(k, v);\n } else {\n responseHeaders.delete(k);\n for (const v2 of v) {\n responseHeaders.append(k, v2);\n }\n }\n }\n }\n const status = typeof arg === \"number\" ? arg : arg?.status ?? this.#status;\n return createResponseInstance(data, { status, headers: responseHeaders });\n }\n newResponse = (...args) => this.#newResponse(...args);\n /**\n * `.body()` can return the HTTP response.\n * You can set headers with `.header()` and set HTTP status code with `.status`.\n * This can also be set in `.text()`, `.json()` and so on.\n *\n * @see {@link https://hono.dev/docs/api/context#body}\n *\n * @example\n * ```ts\n * app.get('/welcome', (c) => {\n * // Set headers\n * c.header('X-Message', 'Hello!')\n * c.header('Content-Type', 'text/plain')\n * // Set HTTP status code\n * c.status(201)\n *\n * // Return the response body\n * return c.body('Thank you for coming')\n * })\n * ```\n */\n body = (data, arg, headers) => this.#newResponse(data, arg, headers);\n /**\n * `.text()` can render text as `Content-Type:text/plain`.\n *\n * @see {@link https://hono.dev/docs/api/context#text}\n *\n * @example\n * ```ts\n * app.get('/say', (c) => {\n * return c.text('Hello!')\n * })\n * ```\n */\n text = (text, arg, headers) => {\n return !this.#preparedHeaders && !this.#status && !arg && !headers && !this.finalized ? new Response(text) : this.#newResponse(\n text,\n arg,\n setDefaultContentType(TEXT_PLAIN, headers)\n );\n };\n /**\n * `.json()` can render JSON as `Content-Type:application/json`.\n *\n * @see {@link https://hono.dev/docs/api/context#json}\n *\n * @example\n * ```ts\n * app.get('/api', (c) => {\n * return c.json({ message: 'Hello!' })\n * })\n * ```\n */\n json = (object, arg, headers) => {\n return this.#newResponse(\n JSON.stringify(object),\n arg,\n setDefaultContentType(\"application/json\", headers)\n );\n };\n html = (html, arg, headers) => {\n const res = (html2) => this.#newResponse(html2, arg, setDefaultContentType(\"text/html; charset=UTF-8\", headers));\n return typeof html === \"object\" ? resolveCallback(html, HtmlEscapedCallbackPhase.Stringify, false, {}).then(res) : res(html);\n };\n /**\n * `.redirect()` can Redirect, default status code is 302.\n *\n * @see {@link https://hono.dev/docs/api/context#redirect}\n *\n * @example\n * ```ts\n * app.get('/redirect', (c) => {\n * return c.redirect('/')\n * })\n * app.get('/redirect-permanently', (c) => {\n * return c.redirect('/', 301)\n * })\n * ```\n */\n redirect = (location, status) => {\n const locationString = String(location);\n this.header(\n \"Location\",\n // Multibyes should be encoded\n // eslint-disable-next-line no-control-regex\n !/[^\\x00-\\xFF]/.test(locationString) ? locationString : encodeURI(locationString)\n );\n return this.newResponse(null, status ?? 302);\n };\n /**\n * `.notFound()` can return the Not Found Response.\n *\n * @see {@link https://hono.dev/docs/api/context#notfound}\n *\n * @example\n * ```ts\n * app.get('/notfound', (c) => {\n * return c.notFound()\n * })\n * ```\n */\n notFound = () => {\n this.#notFoundHandler ??= () => createResponseInstance();\n return this.#notFoundHandler(this);\n };\n};\nexport {\n Context,\n TEXT_PLAIN\n};\n", "// src/router.ts\nvar METHOD_NAME_ALL = \"ALL\";\nvar METHOD_NAME_ALL_LOWERCASE = \"all\";\nvar METHODS = [\"get\", \"post\", \"put\", \"delete\", \"options\", \"patch\"];\nvar MESSAGE_MATCHER_IS_ALREADY_BUILT = \"Can not add a route since the matcher is already built.\";\nvar UnsupportedPathError = class extends Error {\n};\nexport {\n MESSAGE_MATCHER_IS_ALREADY_BUILT,\n METHODS,\n METHOD_NAME_ALL,\n METHOD_NAME_ALL_LOWERCASE,\n UnsupportedPathError\n};\n", "// src/utils/constants.ts\nvar COMPOSED_HANDLER = \"__COMPOSED_HANDLER\";\nexport {\n COMPOSED_HANDLER\n};\n", "// src/hono-base.ts\nimport { compose } from \"./compose.js\";\nimport { Context } from \"./context.js\";\nimport { METHODS, METHOD_NAME_ALL, METHOD_NAME_ALL_LOWERCASE } from \"./router.js\";\nimport { COMPOSED_HANDLER } from \"./utils/constants.js\";\nimport { getPath, getPathNoStrict, mergePath } from \"./utils/url.js\";\nvar notFoundHandler = (c) => {\n return c.text(\"404 Not Found\", 404);\n};\nvar errorHandler = (err, c) => {\n if (\"getResponse\" in err) {\n const res = err.getResponse();\n return c.newResponse(res.body, res);\n }\n console.error(err);\n return c.text(\"Internal Server Error\", 500);\n};\nvar Hono = class _Hono {\n get;\n post;\n put;\n delete;\n options;\n patch;\n all;\n on;\n use;\n /*\n This class is like an abstract class and does not have a router.\n To use it, inherit the class and implement router in the constructor.\n */\n router;\n getPath;\n // Cannot use `#` because it requires visibility at JavaScript runtime.\n _basePath = \"/\";\n #path = \"/\";\n routes = [];\n constructor(options = {}) {\n const allMethods = [...METHODS, METHOD_NAME_ALL_LOWERCASE];\n allMethods.forEach((method) => {\n this[method] = (args1, ...args) => {\n if (typeof args1 === \"string\") {\n this.#path = args1;\n } else {\n this.#addRoute(method, this.#path, args1);\n }\n args.forEach((handler) => {\n this.#addRoute(method, this.#path, handler);\n });\n return this;\n };\n });\n this.on = (method, path, ...handlers) => {\n for (const p of [path].flat()) {\n this.#path = p;\n for (const m of [method].flat()) {\n handlers.map((handler) => {\n this.#addRoute(m.toUpperCase(), this.#path, handler);\n });\n }\n }\n return this;\n };\n this.use = (arg1, ...handlers) => {\n if (typeof arg1 === \"string\") {\n this.#path = arg1;\n } else {\n this.#path = \"*\";\n handlers.unshift(arg1);\n }\n handlers.forEach((handler) => {\n this.#addRoute(METHOD_NAME_ALL, this.#path, handler);\n });\n return this;\n };\n const { strict, ...optionsWithoutStrict } = options;\n Object.assign(this, optionsWithoutStrict);\n this.getPath = strict ?? true ? options.getPath ?? getPath : getPathNoStrict;\n }\n #clone() {\n const clone = new _Hono({\n router: this.router,\n getPath: this.getPath\n });\n clone.errorHandler = this.errorHandler;\n clone.#notFoundHandler = this.#notFoundHandler;\n clone.routes = this.routes;\n return clone;\n }\n #notFoundHandler = notFoundHandler;\n // Cannot use `#` because it requires visibility at JavaScript runtime.\n errorHandler = errorHandler;\n /**\n * `.route()` allows grouping other Hono instance in routes.\n *\n * @see {@link https://hono.dev/docs/api/routing#grouping}\n *\n * @param {string} path - base Path\n * @param {Hono} app - other Hono instance\n * @returns {Hono} routed Hono instance\n *\n * @example\n * ```ts\n * const app = new Hono()\n * const app2 = new Hono()\n *\n * app2.get(\"/user\", (c) => c.text(\"user\"))\n * app.route(\"/api\", app2) // GET /api/user\n * ```\n */\n route(path, app) {\n const subApp = this.basePath(path);\n app.routes.map((r) => {\n let handler;\n if (app.errorHandler === errorHandler) {\n handler = r.handler;\n } else {\n handler = async (c, next) => (await compose([], app.errorHandler)(c, () => r.handler(c, next))).res;\n handler[COMPOSED_HANDLER] = r.handler;\n }\n subApp.#addRoute(r.method, r.path, handler);\n });\n return this;\n }\n /**\n * `.basePath()` allows base paths to be specified.\n *\n * @see {@link https://hono.dev/docs/api/routing#base-path}\n *\n * @param {string} path - base Path\n * @returns {Hono} changed Hono instance\n *\n * @example\n * ```ts\n * const api = new Hono().basePath('/api')\n * ```\n */\n basePath(path) {\n const subApp = this.#clone();\n subApp._basePath = mergePath(this._basePath, path);\n return subApp;\n }\n /**\n * `.onError()` handles an error and returns a customized Response.\n *\n * @see {@link https://hono.dev/docs/api/hono#error-handling}\n *\n * @param {ErrorHandler} handler - request Handler for error\n * @returns {Hono} changed Hono instance\n *\n * @example\n * ```ts\n * app.onError((err, c) => {\n * console.error(`${err}`)\n * return c.text('Custom Error Message', 500)\n * })\n * ```\n */\n onError = (handler) => {\n this.errorHandler = handler;\n return this;\n };\n /**\n * `.notFound()` allows you to customize a Not Found Response.\n *\n * @see {@link https://hono.dev/docs/api/hono#not-found}\n *\n * @param {NotFoundHandler} handler - request handler for not-found\n * @returns {Hono} changed Hono instance\n *\n * @example\n * ```ts\n * app.notFound((c) => {\n * return c.text('Custom 404 Message', 404)\n * })\n * ```\n */\n notFound = (handler) => {\n this.#notFoundHandler = handler;\n return this;\n };\n /**\n * `.mount()` allows you to mount applications built with other frameworks into your Hono application.\n *\n * @see {@link https://hono.dev/docs/api/hono#mount}\n *\n * @param {string} path - base Path\n * @param {Function} applicationHandler - other Request Handler\n * @param {MountOptions} [options] - options of `.mount()`\n * @returns {Hono} mounted Hono instance\n *\n * @example\n * ```ts\n * import { Router as IttyRouter } from 'itty-router'\n * import { Hono } from 'hono'\n * // Create itty-router application\n * const ittyRouter = IttyRouter()\n * // GET /itty-router/hello\n * ittyRouter.get('/hello', () => new Response('Hello from itty-router'))\n *\n * const app = new Hono()\n * app.mount('/itty-router', ittyRouter.handle)\n * ```\n *\n * @example\n * ```ts\n * const app = new Hono()\n * // Send the request to another application without modification.\n * app.mount('/app', anotherApp, {\n * replaceRequest: (req) => req,\n * })\n * ```\n */\n mount(path, applicationHandler, options) {\n let replaceRequest;\n let optionHandler;\n if (options) {\n if (typeof options === \"function\") {\n optionHandler = options;\n } else {\n optionHandler = options.optionHandler;\n if (options.replaceRequest === false) {\n replaceRequest = (request) => request;\n } else {\n replaceRequest = options.replaceRequest;\n }\n }\n }\n const getOptions = optionHandler ? (c) => {\n const options2 = optionHandler(c);\n return Array.isArray(options2) ? options2 : [options2];\n } : (c) => {\n let executionContext = void 0;\n try {\n executionContext = c.executionCtx;\n } catch {\n }\n return [c.env, executionContext];\n };\n replaceRequest ||= (() => {\n const mergedPath = mergePath(this._basePath, path);\n const pathPrefixLength = mergedPath === \"/\" ? 0 : mergedPath.length;\n return (request) => {\n const url = new URL(request.url);\n url.pathname = url.pathname.slice(pathPrefixLength) || \"/\";\n return new Request(url, request);\n };\n })();\n const handler = async (c, next) => {\n const res = await applicationHandler(replaceRequest(c.req.raw), ...getOptions(c));\n if (res) {\n return res;\n }\n await next();\n };\n this.#addRoute(METHOD_NAME_ALL, mergePath(path, \"*\"), handler);\n return this;\n }\n #addRoute(method, path, handler) {\n method = method.toUpperCase();\n path = mergePath(this._basePath, path);\n const r = { basePath: this._basePath, path, method, handler };\n this.router.add(method, path, [handler, r]);\n this.routes.push(r);\n }\n #handleError(err, c) {\n if (err instanceof Error) {\n return this.errorHandler(err, c);\n }\n throw err;\n }\n #dispatch(request, executionCtx, env, method) {\n if (method === \"HEAD\") {\n return (async () => new Response(null, await this.#dispatch(request, executionCtx, env, \"GET\")))();\n }\n const path = this.getPath(request, { env });\n const matchResult = this.router.match(method, path);\n const c = new Context(request, {\n path,\n matchResult,\n env,\n executionCtx,\n notFoundHandler: this.#notFoundHandler\n });\n if (matchResult[0].length === 1) {\n let res;\n try {\n res = matchResult[0][0][0][0](c, async () => {\n c.res = await this.#notFoundHandler(c);\n });\n } catch (err) {\n return this.#handleError(err, c);\n }\n return res instanceof Promise ? res.then(\n (resolved) => resolved || (c.finalized ? c.res : this.#notFoundHandler(c))\n ).catch((err) => this.#handleError(err, c)) : res ?? this.#notFoundHandler(c);\n }\n const composed = compose(matchResult[0], this.errorHandler, this.#notFoundHandler);\n return (async () => {\n try {\n const context = await composed(c);\n if (!context.finalized) {\n throw new Error(\n \"Context is not finalized. Did you forget to return a Response object or `await next()`?\"\n );\n }\n return context.res;\n } catch (err) {\n return this.#handleError(err, c);\n }\n })();\n }\n /**\n * `.fetch()` will be entry point of your app.\n *\n * @see {@link https://hono.dev/docs/api/hono#fetch}\n *\n * @param {Request} request - request Object of request\n * @param {Env} Env - env Object\n * @param {ExecutionContext} - context of execution\n * @returns {Response | Promise} response of request\n *\n */\n fetch = (request, ...rest) => {\n return this.#dispatch(request, rest[1], rest[0], request.method);\n };\n /**\n * `.request()` is a useful method for testing.\n * You can pass a URL or pathname to send a GET request.\n * app will return a Response object.\n * ```ts\n * test('GET /hello is ok', async () => {\n * const res = await app.request('/hello')\n * expect(res.status).toBe(200)\n * })\n * ```\n * @see https://hono.dev/docs/api/hono#request\n */\n request = (input, requestInit, Env, executionCtx) => {\n if (input instanceof Request) {\n return this.fetch(requestInit ? new Request(input, requestInit) : input, Env, executionCtx);\n }\n input = input.toString();\n return this.fetch(\n new Request(\n /^https?:\\/\\//.test(input) ? input : `http://localhost${mergePath(\"/\", input)}`,\n requestInit\n ),\n Env,\n executionCtx\n );\n };\n /**\n * `.fire()` automatically adds a global fetch event listener.\n * This can be useful for environments that adhere to the Service Worker API, such as non-ES module Cloudflare Workers.\n * @deprecated\n * Use `fire` from `hono/service-worker` instead.\n * ```ts\n * import { Hono } from 'hono'\n * import { fire } from 'hono/service-worker'\n *\n * const app = new Hono()\n * // ...\n * fire(app)\n * ```\n * @see https://hono.dev/docs/api/hono#fire\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API\n * @see https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/\n */\n fire = () => {\n addEventListener(\"fetch\", (event) => {\n event.respondWith(this.#dispatch(event.request, event, void 0, event.request.method));\n });\n };\n};\nexport {\n Hono as HonoBase\n};\n", "// src/router/reg-exp-router/matcher.ts\nimport { METHOD_NAME_ALL } from \"../../router.js\";\nvar emptyParam = [];\nfunction match(method, path) {\n const matchers = this.buildAllMatchers();\n const match2 = ((method2, path2) => {\n const matcher = matchers[method2] || matchers[METHOD_NAME_ALL];\n const staticMatch = matcher[2][path2];\n if (staticMatch) {\n return staticMatch;\n }\n const match3 = path2.match(matcher[0]);\n if (!match3) {\n return [[], emptyParam];\n }\n const index = match3.indexOf(\"\", 1);\n return [matcher[1][index], match3];\n });\n this.match = match2;\n return match2(method, path);\n}\nexport {\n emptyParam,\n match\n};\n", "// src/router/reg-exp-router/node.ts\nvar LABEL_REG_EXP_STR = \"[^/]+\";\nvar ONLY_WILDCARD_REG_EXP_STR = \".*\";\nvar TAIL_WILDCARD_REG_EXP_STR = \"(?:|/.*)\";\nvar PATH_ERROR = /* @__PURE__ */ Symbol();\nvar regExpMetaChars = new Set(\".\\\\+*[^]$()\");\nfunction compareKey(a, b) {\n if (a.length === 1) {\n return b.length === 1 ? a < b ? -1 : 1 : -1;\n }\n if (b.length === 1) {\n return 1;\n }\n if (a === ONLY_WILDCARD_REG_EXP_STR || a === TAIL_WILDCARD_REG_EXP_STR) {\n return 1;\n } else if (b === ONLY_WILDCARD_REG_EXP_STR || b === TAIL_WILDCARD_REG_EXP_STR) {\n return -1;\n }\n if (a === LABEL_REG_EXP_STR) {\n return 1;\n } else if (b === LABEL_REG_EXP_STR) {\n return -1;\n }\n return a.length === b.length ? a < b ? -1 : 1 : b.length - a.length;\n}\nvar Node = class _Node {\n #index;\n #varIndex;\n #children = /* @__PURE__ */ Object.create(null);\n insert(tokens, index, paramMap, context, pathErrorCheckOnly) {\n if (tokens.length === 0) {\n if (this.#index !== void 0) {\n throw PATH_ERROR;\n }\n if (pathErrorCheckOnly) {\n return;\n }\n this.#index = index;\n return;\n }\n const [token, ...restTokens] = tokens;\n const pattern = token === \"*\" ? restTokens.length === 0 ? [\"\", \"\", ONLY_WILDCARD_REG_EXP_STR] : [\"\", \"\", LABEL_REG_EXP_STR] : token === \"/*\" ? [\"\", \"\", TAIL_WILDCARD_REG_EXP_STR] : token.match(/^\\:([^\\{\\}]+)(?:\\{(.+)\\})?$/);\n let node;\n if (pattern) {\n const name = pattern[1];\n let regexpStr = pattern[2] || LABEL_REG_EXP_STR;\n if (name && pattern[2]) {\n if (regexpStr === \".*\") {\n throw PATH_ERROR;\n }\n regexpStr = regexpStr.replace(/^\\((?!\\?:)(?=[^)]+\\)$)/, \"(?:\");\n if (/\\((?!\\?:)/.test(regexpStr)) {\n throw PATH_ERROR;\n }\n }\n node = this.#children[regexpStr];\n if (!node) {\n if (Object.keys(this.#children).some(\n (k) => k !== ONLY_WILDCARD_REG_EXP_STR && k !== TAIL_WILDCARD_REG_EXP_STR\n )) {\n throw PATH_ERROR;\n }\n if (pathErrorCheckOnly) {\n return;\n }\n node = this.#children[regexpStr] = new _Node();\n if (name !== \"\") {\n node.#varIndex = context.varIndex++;\n }\n }\n if (!pathErrorCheckOnly && name !== \"\") {\n paramMap.push([name, node.#varIndex]);\n }\n } else {\n node = this.#children[token];\n if (!node) {\n if (Object.keys(this.#children).some(\n (k) => k.length > 1 && k !== ONLY_WILDCARD_REG_EXP_STR && k !== TAIL_WILDCARD_REG_EXP_STR\n )) {\n throw PATH_ERROR;\n }\n if (pathErrorCheckOnly) {\n return;\n }\n node = this.#children[token] = new _Node();\n }\n }\n node.insert(restTokens, index, paramMap, context, pathErrorCheckOnly);\n }\n buildRegExpStr() {\n const childKeys = Object.keys(this.#children).sort(compareKey);\n const strList = childKeys.map((k) => {\n const c = this.#children[k];\n return (typeof c.#varIndex === \"number\" ? `(${k})@${c.#varIndex}` : regExpMetaChars.has(k) ? `\\\\${k}` : k) + c.buildRegExpStr();\n });\n if (typeof this.#index === \"number\") {\n strList.unshift(`#${this.#index}`);\n }\n if (strList.length === 0) {\n return \"\";\n }\n if (strList.length === 1) {\n return strList[0];\n }\n return \"(?:\" + strList.join(\"|\") + \")\";\n }\n};\nexport {\n Node,\n PATH_ERROR\n};\n", "// src/router/reg-exp-router/trie.ts\nimport { Node } from \"./node.js\";\nvar Trie = class {\n #context = { varIndex: 0 };\n #root = new Node();\n insert(path, index, pathErrorCheckOnly) {\n const paramAssoc = [];\n const groups = [];\n for (let i = 0; ; ) {\n let replaced = false;\n path = path.replace(/\\{[^}]+\\}/g, (m) => {\n const mark = `@\\\\${i}`;\n groups[i] = [mark, m];\n i++;\n replaced = true;\n return mark;\n });\n if (!replaced) {\n break;\n }\n }\n const tokens = path.match(/(?::[^\\/]+)|(?:\\/\\*$)|./g) || [];\n for (let i = groups.length - 1; i >= 0; i--) {\n const [mark] = groups[i];\n for (let j = tokens.length - 1; j >= 0; j--) {\n if (tokens[j].indexOf(mark) !== -1) {\n tokens[j] = tokens[j].replace(mark, groups[i][1]);\n break;\n }\n }\n }\n this.#root.insert(tokens, index, paramAssoc, this.#context, pathErrorCheckOnly);\n return paramAssoc;\n }\n buildRegExp() {\n let regexp = this.#root.buildRegExpStr();\n if (regexp === \"\") {\n return [/^$/, [], []];\n }\n let captureIndex = 0;\n const indexReplacementMap = [];\n const paramReplacementMap = [];\n regexp = regexp.replace(/#(\\d+)|@(\\d+)|\\.\\*\\$/g, (_, handlerIndex, paramIndex) => {\n if (handlerIndex !== void 0) {\n indexReplacementMap[++captureIndex] = Number(handlerIndex);\n return \"$()\";\n }\n if (paramIndex !== void 0) {\n paramReplacementMap[Number(paramIndex)] = ++captureIndex;\n return \"\";\n }\n return \"\";\n });\n return [new RegExp(`^${regexp}`), indexReplacementMap, paramReplacementMap];\n }\n};\nexport {\n Trie\n};\n", "// src/router/reg-exp-router/router.ts\nimport {\n MESSAGE_MATCHER_IS_ALREADY_BUILT,\n METHOD_NAME_ALL,\n UnsupportedPathError\n} from \"../../router.js\";\nimport { checkOptionalParameter } from \"../../utils/url.js\";\nimport { match, emptyParam } from \"./matcher.js\";\nimport { PATH_ERROR } from \"./node.js\";\nimport { Trie } from \"./trie.js\";\nvar nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];\nvar wildcardRegExpCache = /* @__PURE__ */ Object.create(null);\nfunction buildWildcardRegExp(path) {\n return wildcardRegExpCache[path] ??= new RegExp(\n path === \"*\" ? \"\" : `^${path.replace(\n /\\/\\*$|([.\\\\+*[^\\]$()])/g,\n (_, metaChar) => metaChar ? `\\\\${metaChar}` : \"(?:|/.*)\"\n )}$`\n );\n}\nfunction clearWildcardRegExpCache() {\n wildcardRegExpCache = /* @__PURE__ */ Object.create(null);\n}\nfunction buildMatcherFromPreprocessedRoutes(routes) {\n const trie = new Trie();\n const handlerData = [];\n if (routes.length === 0) {\n return nullMatcher;\n }\n const routesWithStaticPathFlag = routes.map(\n (route) => [!/\\*|\\/:/.test(route[0]), ...route]\n ).sort(\n ([isStaticA, pathA], [isStaticB, pathB]) => isStaticA ? 1 : isStaticB ? -1 : pathA.length - pathB.length\n );\n const staticMap = /* @__PURE__ */ Object.create(null);\n for (let i = 0, j = -1, len = routesWithStaticPathFlag.length; i < len; i++) {\n const [pathErrorCheckOnly, path, handlers] = routesWithStaticPathFlag[i];\n if (pathErrorCheckOnly) {\n staticMap[path] = [handlers.map(([h]) => [h, /* @__PURE__ */ Object.create(null)]), emptyParam];\n } else {\n j++;\n }\n let paramAssoc;\n try {\n paramAssoc = trie.insert(path, j, pathErrorCheckOnly);\n } catch (e) {\n throw e === PATH_ERROR ? new UnsupportedPathError(path) : e;\n }\n if (pathErrorCheckOnly) {\n continue;\n }\n handlerData[j] = handlers.map(([h, paramCount]) => {\n const paramIndexMap = /* @__PURE__ */ Object.create(null);\n paramCount -= 1;\n for (; paramCount >= 0; paramCount--) {\n const [key, value] = paramAssoc[paramCount];\n paramIndexMap[key] = value;\n }\n return [h, paramIndexMap];\n });\n }\n const [regexp, indexReplacementMap, paramReplacementMap] = trie.buildRegExp();\n for (let i = 0, len = handlerData.length; i < len; i++) {\n for (let j = 0, len2 = handlerData[i].length; j < len2; j++) {\n const map = handlerData[i][j]?.[1];\n if (!map) {\n continue;\n }\n const keys = Object.keys(map);\n for (let k = 0, len3 = keys.length; k < len3; k++) {\n map[keys[k]] = paramReplacementMap[map[keys[k]]];\n }\n }\n }\n const handlerMap = [];\n for (const i in indexReplacementMap) {\n handlerMap[i] = handlerData[indexReplacementMap[i]];\n }\n return [regexp, handlerMap, staticMap];\n}\nfunction findMiddleware(middleware, path) {\n if (!middleware) {\n return void 0;\n }\n for (const k of Object.keys(middleware).sort((a, b) => b.length - a.length)) {\n if (buildWildcardRegExp(k).test(path)) {\n return [...middleware[k]];\n }\n }\n return void 0;\n}\nvar RegExpRouter = class {\n name = \"RegExpRouter\";\n #middleware;\n #routes;\n constructor() {\n this.#middleware = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) };\n this.#routes = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) };\n }\n add(method, path, handler) {\n const middleware = this.#middleware;\n const routes = this.#routes;\n if (!middleware || !routes) {\n throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT);\n }\n if (!middleware[method]) {\n ;\n [middleware, routes].forEach((handlerMap) => {\n handlerMap[method] = /* @__PURE__ */ Object.create(null);\n Object.keys(handlerMap[METHOD_NAME_ALL]).forEach((p) => {\n handlerMap[method][p] = [...handlerMap[METHOD_NAME_ALL][p]];\n });\n });\n }\n if (path === \"/*\") {\n path = \"*\";\n }\n const paramCount = (path.match(/\\/:/g) || []).length;\n if (/\\*$/.test(path)) {\n const re = buildWildcardRegExp(path);\n if (method === METHOD_NAME_ALL) {\n Object.keys(middleware).forEach((m) => {\n middleware[m][path] ||= findMiddleware(middleware[m], path) || findMiddleware(middleware[METHOD_NAME_ALL], path) || [];\n });\n } else {\n middleware[method][path] ||= findMiddleware(middleware[method], path) || findMiddleware(middleware[METHOD_NAME_ALL], path) || [];\n }\n Object.keys(middleware).forEach((m) => {\n if (method === METHOD_NAME_ALL || method === m) {\n Object.keys(middleware[m]).forEach((p) => {\n re.test(p) && middleware[m][p].push([handler, paramCount]);\n });\n }\n });\n Object.keys(routes).forEach((m) => {\n if (method === METHOD_NAME_ALL || method === m) {\n Object.keys(routes[m]).forEach(\n (p) => re.test(p) && routes[m][p].push([handler, paramCount])\n );\n }\n });\n return;\n }\n const paths = checkOptionalParameter(path) || [path];\n for (let i = 0, len = paths.length; i < len; i++) {\n const path2 = paths[i];\n Object.keys(routes).forEach((m) => {\n if (method === METHOD_NAME_ALL || method === m) {\n routes[m][path2] ||= [\n ...findMiddleware(middleware[m], path2) || findMiddleware(middleware[METHOD_NAME_ALL], path2) || []\n ];\n routes[m][path2].push([handler, paramCount - len + i + 1]);\n }\n });\n }\n }\n match = match;\n buildAllMatchers() {\n const matchers = /* @__PURE__ */ Object.create(null);\n Object.keys(this.#routes).concat(Object.keys(this.#middleware)).forEach((method) => {\n matchers[method] ||= this.#buildMatcher(method);\n });\n this.#middleware = this.#routes = void 0;\n clearWildcardRegExpCache();\n return matchers;\n }\n #buildMatcher(method) {\n const routes = [];\n let hasOwnRoute = method === METHOD_NAME_ALL;\n [this.#middleware, this.#routes].forEach((r) => {\n const ownRoute = r[method] ? Object.keys(r[method]).map((path) => [path, r[method][path]]) : [];\n if (ownRoute.length !== 0) {\n hasOwnRoute ||= true;\n routes.push(...ownRoute);\n } else if (method !== METHOD_NAME_ALL) {\n routes.push(\n ...Object.keys(r[METHOD_NAME_ALL]).map((path) => [path, r[METHOD_NAME_ALL][path]])\n );\n }\n });\n if (!hasOwnRoute) {\n return null;\n } else {\n return buildMatcherFromPreprocessedRoutes(routes);\n }\n }\n};\nexport {\n RegExpRouter\n};\n", "// src/router/reg-exp-router/prepared-router.ts\nimport { METHOD_NAME_ALL } from \"../../router.js\";\nimport { match, emptyParam } from \"./matcher.js\";\nimport { RegExpRouter } from \"./router.js\";\nvar PreparedRegExpRouter = class {\n name = \"PreparedRegExpRouter\";\n #matchers;\n #relocateMap;\n constructor(matchers, relocateMap) {\n this.#matchers = matchers;\n this.#relocateMap = relocateMap;\n }\n #addWildcard(method, handlerData) {\n const matcher = this.#matchers[method];\n matcher[1].forEach((list) => list && list.push(handlerData));\n Object.values(matcher[2]).forEach((list) => list[0].push(handlerData));\n }\n #addPath(method, path, handler, indexes, map) {\n const matcher = this.#matchers[method];\n if (!map) {\n matcher[2][path][0].push([handler, {}]);\n } else {\n indexes.forEach((index) => {\n if (typeof index === \"number\") {\n matcher[1][index].push([handler, map]);\n } else {\n ;\n matcher[2][index || path][0].push([handler, map]);\n }\n });\n }\n }\n add(method, path, handler) {\n if (!this.#matchers[method]) {\n const all = this.#matchers[METHOD_NAME_ALL];\n const staticMap = {};\n for (const key in all[2]) {\n staticMap[key] = [all[2][key][0].slice(), emptyParam];\n }\n this.#matchers[method] = [\n all[0],\n all[1].map((list) => Array.isArray(list) ? list.slice() : 0),\n staticMap\n ];\n }\n if (path === \"/*\" || path === \"*\") {\n const handlerData = [handler, {}];\n if (method === METHOD_NAME_ALL) {\n for (const m in this.#matchers) {\n this.#addWildcard(m, handlerData);\n }\n } else {\n this.#addWildcard(method, handlerData);\n }\n return;\n }\n const data = this.#relocateMap[path];\n if (!data) {\n throw new Error(`Path ${path} is not registered`);\n }\n for (const [indexes, map] of data) {\n if (method === METHOD_NAME_ALL) {\n for (const m in this.#matchers) {\n this.#addPath(m, path, handler, indexes, map);\n }\n } else {\n this.#addPath(method, path, handler, indexes, map);\n }\n }\n }\n buildAllMatchers() {\n return this.#matchers;\n }\n match = match;\n};\nvar buildInitParams = ({ paths }) => {\n const RegExpRouterWithMatcherExport = class extends RegExpRouter {\n buildAndExportAllMatchers() {\n return this.buildAllMatchers();\n }\n };\n const router = new RegExpRouterWithMatcherExport();\n for (const path of paths) {\n router.add(METHOD_NAME_ALL, path, path);\n }\n const matchers = router.buildAndExportAllMatchers();\n const all = matchers[METHOD_NAME_ALL];\n const relocateMap = {};\n for (const path of paths) {\n if (path === \"/*\" || path === \"*\") {\n continue;\n }\n all[1].forEach((list, i) => {\n list.forEach(([p, map]) => {\n if (p === path) {\n if (relocateMap[path]) {\n relocateMap[path][0][1] = {\n ...relocateMap[path][0][1],\n ...map\n };\n } else {\n relocateMap[path] = [[[], map]];\n }\n if (relocateMap[path][0][0].findIndex((j) => j === i) === -1) {\n relocateMap[path][0][0].push(i);\n }\n }\n });\n });\n for (const path2 in all[2]) {\n all[2][path2][0].forEach(([p]) => {\n if (p === path) {\n relocateMap[path] ||= [[[]]];\n const value = path2 === path ? \"\" : path2;\n if (relocateMap[path][0][0].findIndex((v) => v === value) === -1) {\n relocateMap[path][0][0].push(value);\n }\n }\n });\n }\n }\n for (let i = 0, len = all[1].length; i < len; i++) {\n all[1][i] = all[1][i] ? [] : 0;\n }\n for (const path in all[2]) {\n all[2][path][0] = [];\n }\n return [matchers, relocateMap];\n};\nvar serializeInitParams = ([matchers, relocateMap]) => {\n const matchersStr = JSON.stringify(\n matchers,\n (_, value) => value instanceof RegExp ? `##${value.toString()}##` : value\n ).replace(/\"##(.+?)##\"/g, (_, str) => str.replace(/\\\\\\\\/g, \"\\\\\"));\n const relocateMapStr = JSON.stringify(relocateMap);\n return `[${matchersStr},${relocateMapStr}]`;\n};\nexport {\n PreparedRegExpRouter,\n buildInitParams,\n serializeInitParams\n};\n", "// src/router/reg-exp-router/index.ts\nimport { RegExpRouter } from \"./router.js\";\nimport { PreparedRegExpRouter, buildInitParams, serializeInitParams } from \"./prepared-router.js\";\nexport {\n PreparedRegExpRouter,\n RegExpRouter,\n buildInitParams,\n serializeInitParams\n};\n", "// src/router/smart-router/router.ts\nimport { MESSAGE_MATCHER_IS_ALREADY_BUILT, UnsupportedPathError } from \"../../router.js\";\nvar SmartRouter = class {\n name = \"SmartRouter\";\n #routers = [];\n #routes = [];\n constructor(init) {\n this.#routers = init.routers;\n }\n add(method, path, handler) {\n if (!this.#routes) {\n throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT);\n }\n this.#routes.push([method, path, handler]);\n }\n match(method, path) {\n if (!this.#routes) {\n throw new Error(\"Fatal error\");\n }\n const routers = this.#routers;\n const routes = this.#routes;\n const len = routers.length;\n let i = 0;\n let res;\n for (; i < len; i++) {\n const router = routers[i];\n try {\n for (let i2 = 0, len2 = routes.length; i2 < len2; i2++) {\n router.add(...routes[i2]);\n }\n res = router.match(method, path);\n } catch (e) {\n if (e instanceof UnsupportedPathError) {\n continue;\n }\n throw e;\n }\n this.match = router.match.bind(router);\n this.#routers = [router];\n this.#routes = void 0;\n break;\n }\n if (i === len) {\n throw new Error(\"Fatal error\");\n }\n this.name = `SmartRouter + ${this.activeRouter.name}`;\n return res;\n }\n get activeRouter() {\n if (this.#routes || this.#routers.length !== 1) {\n throw new Error(\"No active router has been determined yet.\");\n }\n return this.#routers[0];\n }\n};\nexport {\n SmartRouter\n};\n", "// src/router/smart-router/index.ts\nimport { SmartRouter } from \"./router.js\";\nexport {\n SmartRouter\n};\n", "// src/router/trie-router/node.ts\nimport { METHOD_NAME_ALL } from \"../../router.js\";\nimport { getPattern, splitPath, splitRoutingPath } from \"../../utils/url.js\";\nvar emptyParams = /* @__PURE__ */ Object.create(null);\nvar hasChildren = (children) => {\n for (const _ in children) {\n return true;\n }\n return false;\n};\nvar Node = class _Node {\n #methods;\n #children;\n #patterns;\n #order = 0;\n #params = emptyParams;\n constructor(method, handler, children) {\n this.#children = children || /* @__PURE__ */ Object.create(null);\n this.#methods = [];\n if (method && handler) {\n const m = /* @__PURE__ */ Object.create(null);\n m[method] = { handler, possibleKeys: [], score: 0 };\n this.#methods = [m];\n }\n this.#patterns = [];\n }\n insert(method, path, handler) {\n this.#order = ++this.#order;\n let curNode = this;\n const parts = splitRoutingPath(path);\n const possibleKeys = [];\n for (let i = 0, len = parts.length; i < len; i++) {\n const p = parts[i];\n const nextP = parts[i + 1];\n const pattern = getPattern(p, nextP);\n const key = Array.isArray(pattern) ? pattern[0] : p;\n if (key in curNode.#children) {\n curNode = curNode.#children[key];\n if (pattern) {\n possibleKeys.push(pattern[1]);\n }\n continue;\n }\n curNode.#children[key] = new _Node();\n if (pattern) {\n curNode.#patterns.push(pattern);\n possibleKeys.push(pattern[1]);\n }\n curNode = curNode.#children[key];\n }\n curNode.#methods.push({\n [method]: {\n handler,\n possibleKeys: possibleKeys.filter((v, i, a) => a.indexOf(v) === i),\n score: this.#order\n }\n });\n return curNode;\n }\n #pushHandlerSets(handlerSets, node, method, nodeParams, params) {\n for (let i = 0, len = node.#methods.length; i < len; i++) {\n const m = node.#methods[i];\n const handlerSet = m[method] || m[METHOD_NAME_ALL];\n const processedSet = {};\n if (handlerSet !== void 0) {\n handlerSet.params = /* @__PURE__ */ Object.create(null);\n handlerSets.push(handlerSet);\n if (nodeParams !== emptyParams || params && params !== emptyParams) {\n for (let i2 = 0, len2 = handlerSet.possibleKeys.length; i2 < len2; i2++) {\n const key = handlerSet.possibleKeys[i2];\n const processed = processedSet[handlerSet.score];\n handlerSet.params[key] = params?.[key] && !processed ? params[key] : nodeParams[key] ?? params?.[key];\n processedSet[handlerSet.score] = true;\n }\n }\n }\n }\n }\n search(method, path) {\n const handlerSets = [];\n this.#params = emptyParams;\n const curNode = this;\n let curNodes = [curNode];\n const parts = splitPath(path);\n const curNodesQueue = [];\n const len = parts.length;\n let partOffsets = null;\n for (let i = 0; i < len; i++) {\n const part = parts[i];\n const isLast = i === len - 1;\n const tempNodes = [];\n for (let j = 0, len2 = curNodes.length; j < len2; j++) {\n const node = curNodes[j];\n const nextNode = node.#children[part];\n if (nextNode) {\n nextNode.#params = node.#params;\n if (isLast) {\n if (nextNode.#children[\"*\"]) {\n this.#pushHandlerSets(handlerSets, nextNode.#children[\"*\"], method, node.#params);\n }\n this.#pushHandlerSets(handlerSets, nextNode, method, node.#params);\n } else {\n tempNodes.push(nextNode);\n }\n }\n for (let k = 0, len3 = node.#patterns.length; k < len3; k++) {\n const pattern = node.#patterns[k];\n const params = node.#params === emptyParams ? {} : { ...node.#params };\n if (pattern === \"*\") {\n const astNode = node.#children[\"*\"];\n if (astNode) {\n this.#pushHandlerSets(handlerSets, astNode, method, node.#params);\n astNode.#params = params;\n tempNodes.push(astNode);\n }\n continue;\n }\n const [key, name, matcher] = pattern;\n if (!part && !(matcher instanceof RegExp)) {\n continue;\n }\n const child = node.#children[key];\n if (matcher instanceof RegExp) {\n if (partOffsets === null) {\n partOffsets = new Array(len);\n let offset = path[0] === \"/\" ? 1 : 0;\n for (let p = 0; p < len; p++) {\n partOffsets[p] = offset;\n offset += parts[p].length + 1;\n }\n }\n const restPathString = path.substring(partOffsets[i]);\n const m = matcher.exec(restPathString);\n if (m) {\n params[name] = m[0];\n this.#pushHandlerSets(handlerSets, child, method, node.#params, params);\n if (hasChildren(child.#children)) {\n child.#params = params;\n const componentCount = m[0].match(/\\//)?.length ?? 0;\n const targetCurNodes = curNodesQueue[componentCount] ||= [];\n targetCurNodes.push(child);\n }\n continue;\n }\n }\n if (matcher === true || matcher.test(part)) {\n params[name] = part;\n if (isLast) {\n this.#pushHandlerSets(handlerSets, child, method, params, node.#params);\n if (child.#children[\"*\"]) {\n this.#pushHandlerSets(\n handlerSets,\n child.#children[\"*\"],\n method,\n params,\n node.#params\n );\n }\n } else {\n child.#params = params;\n tempNodes.push(child);\n }\n }\n }\n }\n const shifted = curNodesQueue.shift();\n curNodes = shifted ? tempNodes.concat(shifted) : tempNodes;\n }\n if (handlerSets.length > 1) {\n handlerSets.sort((a, b) => {\n return a.score - b.score;\n });\n }\n return [handlerSets.map(({ handler, params }) => [handler, params])];\n }\n};\nexport {\n Node\n};\n", "// src/router/trie-router/router.ts\nimport { checkOptionalParameter } from \"../../utils/url.js\";\nimport { Node } from \"./node.js\";\nvar TrieRouter = class {\n name = \"TrieRouter\";\n #node;\n constructor() {\n this.#node = new Node();\n }\n add(method, path, handler) {\n const results = checkOptionalParameter(path);\n if (results) {\n for (let i = 0, len = results.length; i < len; i++) {\n this.#node.insert(method, results[i], handler);\n }\n return;\n }\n this.#node.insert(method, path, handler);\n }\n match(method, path) {\n return this.#node.search(method, path);\n }\n};\nexport {\n TrieRouter\n};\n", "// src/router/trie-router/index.ts\nimport { TrieRouter } from \"./router.js\";\nexport {\n TrieRouter\n};\n", "// src/hono.ts\nimport { HonoBase } from \"./hono-base.js\";\nimport { RegExpRouter } from \"./router/reg-exp-router/index.js\";\nimport { SmartRouter } from \"./router/smart-router/index.js\";\nimport { TrieRouter } from \"./router/trie-router/index.js\";\nvar Hono = class extends HonoBase {\n /**\n * Creates an instance of the Hono class.\n *\n * @param options - Optional configuration options for the Hono instance.\n */\n constructor(options = {}) {\n super(options);\n this.router = options.router ?? new SmartRouter({\n routers: [new RegExpRouter(), new TrieRouter()]\n });\n }\n};\nexport {\n Hono\n};\n", "// src/index.ts\nimport { Hono } from \"./hono.js\";\nexport {\n Hono\n};\n", "// src/middleware/cors/index.ts\nvar cors = (options) => {\n const defaults = {\n origin: \"*\",\n allowMethods: [\"GET\", \"HEAD\", \"PUT\", \"POST\", \"DELETE\", \"PATCH\"],\n allowHeaders: [],\n exposeHeaders: []\n };\n const opts = {\n ...defaults,\n ...options\n };\n const findAllowOrigin = ((optsOrigin) => {\n if (typeof optsOrigin === \"string\") {\n if (optsOrigin === \"*\") {\n if (opts.credentials) {\n return (origin) => origin || null;\n }\n return () => optsOrigin;\n } else {\n return (origin) => optsOrigin === origin ? origin : null;\n }\n } else if (typeof optsOrigin === \"function\") {\n return optsOrigin;\n } else {\n return (origin) => optsOrigin.includes(origin) ? origin : null;\n }\n })(opts.origin);\n const findAllowMethods = ((optsAllowMethods) => {\n if (typeof optsAllowMethods === \"function\") {\n return optsAllowMethods;\n } else if (Array.isArray(optsAllowMethods)) {\n return () => optsAllowMethods;\n } else {\n return () => [];\n }\n })(opts.allowMethods);\n return async function cors2(c, next) {\n function set(key, value) {\n c.res.headers.set(key, value);\n }\n const allowOrigin = await findAllowOrigin(c.req.header(\"origin\") || \"\", c);\n if (allowOrigin) {\n set(\"Access-Control-Allow-Origin\", allowOrigin);\n }\n if (opts.credentials) {\n set(\"Access-Control-Allow-Credentials\", \"true\");\n }\n if (opts.exposeHeaders?.length) {\n set(\"Access-Control-Expose-Headers\", opts.exposeHeaders.join(\",\"));\n }\n if (c.req.method === \"OPTIONS\") {\n if (opts.origin !== \"*\" || opts.credentials) {\n set(\"Vary\", \"Origin\");\n }\n if (opts.maxAge != null) {\n set(\"Access-Control-Max-Age\", opts.maxAge.toString());\n }\n const allowMethods = await findAllowMethods(c.req.header(\"origin\") || \"\", c);\n if (allowMethods.length) {\n set(\"Access-Control-Allow-Methods\", allowMethods.join(\",\"));\n }\n let headers = opts.allowHeaders;\n if (!headers?.length) {\n const requestHeaders = c.req.header(\"Access-Control-Request-Headers\");\n if (requestHeaders) {\n headers = requestHeaders.split(/\\s*,\\s*/);\n }\n }\n if (headers?.length) {\n set(\"Access-Control-Allow-Headers\", headers.join(\",\"));\n c.res.headers.append(\"Vary\", \"Access-Control-Request-Headers\");\n }\n c.res.headers.delete(\"Content-Length\");\n c.res.headers.delete(\"Content-Type\");\n return new Response(null, {\n headers: c.res.headers,\n status: 204,\n statusText: \"No Content\"\n });\n }\n await next();\n if (opts.origin !== \"*\" || opts.credentials) {\n c.header(\"Vary\", \"Origin\", { append: true });\n }\n };\n};\nexport {\n cors\n};\n", "// src/utils/color.ts\nfunction getColorEnabled() {\n const { process, Deno } = globalThis;\n const isNoColor = typeof Deno?.noColor === \"boolean\" ? Deno.noColor : process !== void 0 ? (\n // eslint-disable-next-line no-unsafe-optional-chaining\n \"NO_COLOR\" in process?.env\n ) : false;\n return !isNoColor;\n}\nasync function getColorEnabledAsync() {\n const { navigator } = globalThis;\n const cfWorkers = \"cloudflare:workers\";\n const isNoColor = navigator !== void 0 && navigator.userAgent === \"Cloudflare-Workers\" ? await (async () => {\n try {\n return \"NO_COLOR\" in ((await import(cfWorkers)).env ?? {});\n } catch {\n return false;\n }\n })() : !getColorEnabled();\n return !isNoColor;\n}\nexport {\n getColorEnabled,\n getColorEnabledAsync\n};\n", "// src/middleware/logger/index.ts\nimport { getColorEnabledAsync } from \"../../utils/color.js\";\nvar humanize = (times) => {\n const [delimiter, separator] = [\",\", \".\"];\n const orderTimes = times.map((v) => v.replace(/(\\d)(?=(\\d\\d\\d)+(?!\\d))/g, \"$1\" + delimiter));\n return orderTimes.join(separator);\n};\nvar time = (start) => {\n const delta = Date.now() - start;\n return humanize([delta < 1e3 ? delta + \"ms\" : Math.round(delta / 1e3) + \"s\"]);\n};\nvar colorStatus = async (status) => {\n const colorEnabled = await getColorEnabledAsync();\n if (colorEnabled) {\n switch (status / 100 | 0) {\n case 5:\n return `\\x1B[31m${status}\\x1B[0m`;\n case 4:\n return `\\x1B[33m${status}\\x1B[0m`;\n case 3:\n return `\\x1B[36m${status}\\x1B[0m`;\n case 2:\n return `\\x1B[32m${status}\\x1B[0m`;\n }\n }\n return `${status}`;\n};\nasync function log(fn, prefix, method, path, status = 0, elapsed) {\n const out = prefix === \"<--\" /* Incoming */ ? `${prefix} ${method} ${path}` : `${prefix} ${method} ${path} ${await colorStatus(status)} ${elapsed}`;\n fn(out);\n}\nvar logger = (fn = console.log) => {\n return async function logger2(c, next) {\n const { method, url } = c.req;\n const path = url.slice(url.indexOf(\"/\", 8));\n await log(fn, \"<--\" /* Incoming */, method, path);\n const start = Date.now();\n await next();\n await log(fn, \"-->\" /* Outgoing */, method, path, c.res.status, time(start));\n };\n};\nexport {\n logger\n};\n", "/** @internal */\nexport type UnsetMarker = 'unsetMarker' & {\n __brand: 'unsetMarker';\n};\n\n/**\n * Ensures there are no duplicate keys when building a procedure.\n * @internal\n */\nexport function mergeWithoutOverrides>(\n obj1: TType,\n ...objs: Partial[]\n): TType {\n const newObj: TType = Object.assign(emptyObject(), obj1);\n\n for (const overrides of objs) {\n for (const key in overrides) {\n if (key in newObj && newObj[key] !== overrides[key]) {\n throw new Error(`Duplicate key ${key}`);\n }\n newObj[key as keyof TType] = overrides[key] as TType[keyof TType];\n }\n }\n return newObj;\n}\n\n/**\n * Check that value is object\n * @internal\n */\nexport function isObject(value: unknown): value is Record {\n return !!value && !Array.isArray(value) && typeof value === 'object';\n}\n\ntype AnyFn = ((...args: any[]) => unknown) & Record;\nexport function isFunction(fn: unknown): fn is AnyFn {\n return typeof fn === 'function';\n}\n\n/**\n * Create an object without inheriting anything from `Object.prototype`\n * @internal\n */\nexport function emptyObject>(): TObj {\n return Object.create(null);\n}\n\nconst asyncIteratorsSupported =\n typeof Symbol === 'function' && !!Symbol.asyncIterator;\n\nexport function isAsyncIterable(\n value: unknown,\n): value is AsyncIterable {\n return (\n asyncIteratorsSupported && isObject(value) && Symbol.asyncIterator in value\n );\n}\n\n/**\n * Run an IIFE\n */\nexport const run = (fn: () => TValue): TValue => fn();\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nexport function noop(): void {}\n\nexport function identity(it: T): T {\n return it;\n}\n\n/**\n * Generic runtime assertion function. Throws, if the condition is not `true`.\n *\n * Can be used as a slightly less dangerous variant of type assertions. Code\n * mistakes would be revealed at runtime then (hopefully during testing).\n */\nexport function assert(\n condition: boolean,\n msg = 'no additional info',\n): asserts condition {\n if (!condition) {\n throw new Error(`AssertionError: ${msg}`);\n }\n}\n\nexport function sleep(ms = 0): Promise {\n return new Promise((res) => setTimeout(res, ms));\n}\n\n/**\n * Ponyfill for\n * [`AbortSignal.any`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/any_static).\n */\nexport function abortSignalsAnyPonyfill(signals: AbortSignal[]): AbortSignal {\n if (typeof AbortSignal.any === 'function') {\n return AbortSignal.any(signals);\n }\n\n const ac = new AbortController();\n\n for (const signal of signals) {\n if (signal.aborted) {\n trigger();\n break;\n }\n signal.addEventListener('abort', trigger, { once: true });\n }\n\n return ac.signal;\n\n function trigger() {\n ac.abort();\n for (const signal of signals) {\n signal.removeEventListener('abort', trigger);\n }\n }\n}\n", "import type { InvertKeyValue, ValueOf } from '../types';\n\n// reference: https://www.jsonrpc.org/specification\n\n/**\n * JSON-RPC 2.0 Error codes\n *\n * `-32000` to `-32099` are reserved for implementation-defined server-errors.\n * For tRPC we're copying the last digits of HTTP 4XX errors.\n */\nexport const TRPC_ERROR_CODES_BY_KEY = {\n /**\n * Invalid JSON was received by the server.\n * An error occurred on the server while parsing the JSON text.\n */\n PARSE_ERROR: -32700,\n /**\n * The JSON sent is not a valid Request object.\n */\n BAD_REQUEST: -32600, // 400\n\n // Internal JSON-RPC error\n INTERNAL_SERVER_ERROR: -32603, // 500\n NOT_IMPLEMENTED: -32603, // 501\n BAD_GATEWAY: -32603, // 502\n SERVICE_UNAVAILABLE: -32603, // 503\n GATEWAY_TIMEOUT: -32603, // 504\n\n // Implementation specific errors\n UNAUTHORIZED: -32001, // 401\n PAYMENT_REQUIRED: -32002, // 402\n FORBIDDEN: -32003, // 403\n NOT_FOUND: -32004, // 404\n METHOD_NOT_SUPPORTED: -32005, // 405\n TIMEOUT: -32008, // 408\n CONFLICT: -32009, // 409\n PRECONDITION_FAILED: -32012, // 412\n PAYLOAD_TOO_LARGE: -32013, // 413\n UNSUPPORTED_MEDIA_TYPE: -32015, // 415\n UNPROCESSABLE_CONTENT: -32022, // 422\n PRECONDITION_REQUIRED: -32028, // 428\n TOO_MANY_REQUESTS: -32029, // 429\n CLIENT_CLOSED_REQUEST: -32099, // 499\n} as const;\n\n// pure\nexport const TRPC_ERROR_CODES_BY_NUMBER: InvertKeyValue<\n typeof TRPC_ERROR_CODES_BY_KEY\n> = {\n [-32700]: 'PARSE_ERROR',\n [-32600]: 'BAD_REQUEST',\n [-32603]: 'INTERNAL_SERVER_ERROR',\n [-32001]: 'UNAUTHORIZED',\n [-32002]: 'PAYMENT_REQUIRED',\n [-32003]: 'FORBIDDEN',\n [-32004]: 'NOT_FOUND',\n [-32005]: 'METHOD_NOT_SUPPORTED',\n [-32008]: 'TIMEOUT',\n [-32009]: 'CONFLICT',\n [-32012]: 'PRECONDITION_FAILED',\n [-32013]: 'PAYLOAD_TOO_LARGE',\n [-32015]: 'UNSUPPORTED_MEDIA_TYPE',\n [-32022]: 'UNPROCESSABLE_CONTENT',\n [-32028]: 'PRECONDITION_REQUIRED',\n [-32029]: 'TOO_MANY_REQUESTS',\n [-32099]: 'CLIENT_CLOSED_REQUEST',\n};\n\nexport type TRPC_ERROR_CODE_NUMBER = ValueOf;\nexport type TRPC_ERROR_CODE_KEY = keyof typeof TRPC_ERROR_CODES_BY_KEY;\n\n/**\n * tRPC error codes that are considered retryable\n * With out of the box SSE, the client will reconnect when these errors are encountered\n */\nexport const retryableRpcCodes: TRPC_ERROR_CODE_NUMBER[] = [\n TRPC_ERROR_CODES_BY_KEY.BAD_GATEWAY,\n TRPC_ERROR_CODES_BY_KEY.SERVICE_UNAVAILABLE,\n TRPC_ERROR_CODES_BY_KEY.GATEWAY_TIMEOUT,\n TRPC_ERROR_CODES_BY_KEY.INTERNAL_SERVER_ERROR,\n];\n", "import { emptyObject } from './utils';\n\ninterface ProxyCallbackOptions {\n path: readonly string[];\n args: readonly unknown[];\n}\ntype ProxyCallback = (opts: ProxyCallbackOptions) => unknown;\n\nconst noop = () => {\n // noop\n};\n\nconst freezeIfAvailable = (obj: object) => {\n if (Object.freeze) {\n Object.freeze(obj);\n }\n};\n\nfunction createInnerProxy(\n callback: ProxyCallback,\n path: readonly string[],\n memo: Record,\n) {\n const cacheKey = path.join('.');\n\n memo[cacheKey] ??= new Proxy(noop, {\n get(_obj, key) {\n if (typeof key !== 'string' || key === 'then') {\n // special case for if the proxy is accidentally treated\n // like a PromiseLike (like in `Promise.resolve(proxy)`)\n return undefined;\n }\n return createInnerProxy(callback, [...path, key], memo);\n },\n apply(_1, _2, args) {\n const lastOfPath = path[path.length - 1];\n\n let opts = { args, path };\n // special handling for e.g. `trpc.hello.call(this, 'there')` and `trpc.hello.apply(this, ['there'])\n if (lastOfPath === 'call') {\n opts = {\n args: args.length >= 2 ? [args[1]] : [],\n path: path.slice(0, -1),\n };\n } else if (lastOfPath === 'apply') {\n opts = {\n args: args.length >= 2 ? args[1] : [],\n path: path.slice(0, -1),\n };\n }\n freezeIfAvailable(opts.args);\n freezeIfAvailable(opts.path);\n return callback(opts);\n },\n });\n\n return memo[cacheKey];\n}\n\n/**\n * Creates a proxy that calls the callback with the path and arguments\n *\n * @internal\n */\nexport const createRecursiveProxy = (\n callback: ProxyCallback,\n): TFaux => createInnerProxy(callback, [], emptyObject()) as TFaux;\n\n/**\n * Used in place of `new Proxy` where each handler will map 1 level deep to another value.\n *\n * @internal\n */\nexport const createFlatProxy = (\n callback: (path: keyof TFaux) => any,\n): TFaux => {\n return new Proxy(noop, {\n get(_obj, name) {\n if (name === 'then') {\n // special case for if the proxy is accidentally treated\n // like a PromiseLike (like in `Promise.resolve(proxy)`)\n return undefined;\n }\n return callback(name as any);\n },\n }) as TFaux;\n};\n", "import type { TRPCError } from '../error/TRPCError';\nimport type { TRPC_ERROR_CODES_BY_KEY, TRPCResponse } from '../rpc';\nimport { TRPC_ERROR_CODES_BY_NUMBER } from '../rpc';\nimport type { InvertKeyValue, ValueOf } from '../types';\nimport { isObject } from '../utils';\n\nexport const JSONRPC2_TO_HTTP_CODE: Record<\n keyof typeof TRPC_ERROR_CODES_BY_KEY,\n number\n> = {\n PARSE_ERROR: 400,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n PAYMENT_REQUIRED: 402,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n METHOD_NOT_SUPPORTED: 405,\n TIMEOUT: 408,\n CONFLICT: 409,\n PRECONDITION_FAILED: 412,\n PAYLOAD_TOO_LARGE: 413,\n UNSUPPORTED_MEDIA_TYPE: 415,\n UNPROCESSABLE_CONTENT: 422,\n PRECONDITION_REQUIRED: 428,\n TOO_MANY_REQUESTS: 429,\n CLIENT_CLOSED_REQUEST: 499,\n INTERNAL_SERVER_ERROR: 500,\n NOT_IMPLEMENTED: 501,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n};\n\nexport const HTTP_CODE_TO_JSONRPC2: InvertKeyValue<\n typeof JSONRPC2_TO_HTTP_CODE\n> = {\n 400: 'BAD_REQUEST',\n 401: 'UNAUTHORIZED',\n 402: 'PAYMENT_REQUIRED',\n 403: 'FORBIDDEN',\n 404: 'NOT_FOUND',\n 405: 'METHOD_NOT_SUPPORTED',\n 408: 'TIMEOUT',\n 409: 'CONFLICT',\n 412: 'PRECONDITION_FAILED',\n 413: 'PAYLOAD_TOO_LARGE',\n 415: 'UNSUPPORTED_MEDIA_TYPE',\n 422: 'UNPROCESSABLE_CONTENT',\n 428: 'PRECONDITION_REQUIRED',\n 429: 'TOO_MANY_REQUESTS',\n 499: 'CLIENT_CLOSED_REQUEST',\n 500: 'INTERNAL_SERVER_ERROR',\n 501: 'NOT_IMPLEMENTED',\n 502: 'BAD_GATEWAY',\n 503: 'SERVICE_UNAVAILABLE',\n 504: 'GATEWAY_TIMEOUT',\n} as const;\n\nexport function getStatusCodeFromKey(\n code: keyof typeof TRPC_ERROR_CODES_BY_KEY,\n) {\n return JSONRPC2_TO_HTTP_CODE[code] ?? 500;\n}\n\nexport function getStatusKeyFromCode(\n code: keyof typeof HTTP_CODE_TO_JSONRPC2,\n): ValueOf {\n return HTTP_CODE_TO_JSONRPC2[code] ?? 'INTERNAL_SERVER_ERROR';\n}\n\nexport function getHTTPStatusCode(json: TRPCResponse | TRPCResponse[]) {\n const arr = Array.isArray(json) ? json : [json];\n const httpStatuses = new Set(\n arr.map((res) => {\n if ('error' in res && isObject(res.error.data)) {\n if (typeof res.error.data?.['httpStatus'] === 'number') {\n return res.error.data['httpStatus'];\n }\n const code = TRPC_ERROR_CODES_BY_NUMBER[res.error.code];\n return getStatusCodeFromKey(code);\n }\n return 200;\n }),\n );\n\n if (httpStatuses.size !== 1) {\n return 207;\n }\n\n const httpStatus = httpStatuses.values().next().value;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return httpStatus!;\n}\n\nexport function getHTTPStatusCodeFromError(error: TRPCError) {\n return getStatusCodeFromKey(error.code);\n}\n", "function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var defineProperty = require(\"./defineProperty.js\");\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nmodule.exports = _objectSpread2, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import { getHTTPStatusCodeFromError } from '../http/getHTTPStatusCode';\nimport type { ProcedureType } from '../procedure';\nimport type { AnyRootTypes, RootConfig } from '../rootConfig';\nimport { TRPC_ERROR_CODES_BY_KEY } from '../rpc';\nimport type { DefaultErrorShape } from './formatter';\nimport type { TRPCError } from './TRPCError';\n\n/**\n * @internal\n */\nexport function getErrorShape(opts: {\n config: RootConfig;\n error: TRPCError;\n type: ProcedureType | 'unknown';\n path: string | undefined;\n input: unknown;\n ctx: TRoot['ctx'] | undefined;\n}): TRoot['errorShape'] {\n const { path, error, config } = opts;\n const { code } = opts.error;\n const shape: DefaultErrorShape = {\n message: error.message,\n code: TRPC_ERROR_CODES_BY_KEY[code],\n data: {\n code,\n httpStatus: getHTTPStatusCodeFromError(error),\n },\n };\n if (config.isDev && typeof opts.error.stack === 'string') {\n shape.data.stack = opts.error.stack;\n }\n if (typeof path === 'string') {\n shape.data.path = path;\n }\n return config.errorFormatter({ ...opts, shape });\n}\n", "import type { ProcedureType } from '../procedure';\nimport type {\n TRPC_ERROR_CODE_KEY,\n TRPC_ERROR_CODE_NUMBER,\n TRPCErrorShape,\n} from '../rpc';\nimport type { TRPCError } from './TRPCError';\n\n/**\n * @internal\n */\nexport type ErrorFormatter = (opts: {\n error: TRPCError;\n type: ProcedureType | 'unknown';\n path: string | undefined;\n input: unknown;\n ctx: TContext | undefined;\n shape: DefaultErrorShape;\n}) => TShape;\n\n/**\n * @internal\n */\nexport type DefaultErrorData = {\n code: TRPC_ERROR_CODE_KEY;\n httpStatus: number;\n /**\n * Path to the procedure that threw the error\n */\n path?: string;\n /**\n * Stack trace of the error (only in development)\n */\n stack?: string;\n};\n\n/**\n * @internal\n */\nexport interface DefaultErrorShape extends TRPCErrorShape {\n message: string;\n code: TRPC_ERROR_CODE_NUMBER;\n}\n\nexport const defaultFormatter: ErrorFormatter = ({ shape }) => {\n return shape;\n};\n", "import type { TRPC_ERROR_CODE_KEY } from '../rpc/codes';\nimport { isObject } from '../utils';\n\nclass UnknownCauseError extends Error {\n [key: string]: unknown;\n}\nexport function getCauseFromUnknown(cause: unknown): Error | undefined {\n if (cause instanceof Error) {\n return cause;\n }\n\n const type = typeof cause;\n if (type === 'undefined' || type === 'function' || cause === null) {\n return undefined;\n }\n\n // Primitive types just get wrapped in an error\n if (type !== 'object') {\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n return new Error(String(cause));\n }\n\n // If it's an object, we'll create a synthetic error\n if (isObject(cause)) {\n return Object.assign(new UnknownCauseError(), cause);\n }\n\n return undefined;\n}\n\nexport function getTRPCErrorFromUnknown(cause: unknown): TRPCError {\n if (cause instanceof TRPCError) {\n return cause;\n }\n if (cause instanceof Error && cause.name === 'TRPCError') {\n // https://github.com/trpc/trpc/pull/4848\n return cause as TRPCError;\n }\n\n const trpcError = new TRPCError({\n code: 'INTERNAL_SERVER_ERROR',\n cause,\n });\n\n // Inherit stack from error\n if (cause instanceof Error && cause.stack) {\n trpcError.stack = cause.stack;\n }\n\n return trpcError;\n}\n\nexport class TRPCError extends Error {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore override doesn't work in all environments due to \"This member cannot have an 'override' modifier because it is not declared in the base class 'Error'\"\n public override readonly cause?: Error;\n public readonly code;\n\n constructor(opts: {\n message?: string;\n code: TRPC_ERROR_CODE_KEY;\n cause?: unknown;\n }) {\n const cause = getCauseFromUnknown(opts.cause);\n const message = opts.message ?? cause?.message ?? opts.code;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore https://github.com/tc39/proposal-error-cause\n super(message, { cause });\n\n this.code = opts.code;\n this.name = 'TRPCError';\n this.cause ??= cause;\n }\n}\n", "import type { AnyRootTypes, RootConfig } from './rootConfig';\nimport type { AnyRouter, inferRouterError } from './router';\nimport type {\n TRPCResponse,\n TRPCResponseMessage,\n TRPCResultMessage,\n} from './rpc';\nimport { isObject } from './utils';\n\n/**\n * @public\n */\nexport interface DataTransformer {\n serialize(object: any): any;\n deserialize(object: any): any;\n}\n\ninterface InputDataTransformer extends DataTransformer {\n /**\n * This function runs **on the client** before sending the data to the server.\n */\n serialize(object: any): any;\n /**\n * This function runs **on the server** to transform the data before it is passed to the resolver\n */\n deserialize(object: any): any;\n}\n\ninterface OutputDataTransformer extends DataTransformer {\n /**\n * This function runs **on the server** before sending the data to the client.\n */\n serialize(object: any): any;\n /**\n * This function runs **only on the client** to transform the data sent from the server.\n */\n deserialize(object: any): any;\n}\n\n/**\n * @public\n */\nexport interface CombinedDataTransformer {\n /**\n * Specify how the data sent from the client to the server should be transformed.\n */\n input: InputDataTransformer;\n /**\n * Specify how the data sent from the server to the client should be transformed.\n */\n output: OutputDataTransformer;\n}\n\n/**\n * @public\n */\nexport type CombinedDataTransformerClient = {\n input: Pick;\n output: Pick;\n};\n\n/**\n * @public\n */\nexport type DataTransformerOptions = CombinedDataTransformer | DataTransformer;\n\n/**\n * @internal\n */\nexport function getDataTransformer(\n transformer: DataTransformerOptions,\n): CombinedDataTransformer {\n if ('input' in transformer) {\n return transformer;\n }\n return { input: transformer, output: transformer };\n}\n\n/**\n * @internal\n */\nexport const defaultTransformer: CombinedDataTransformer = {\n input: { serialize: (obj) => obj, deserialize: (obj) => obj },\n output: { serialize: (obj) => obj, deserialize: (obj) => obj },\n};\n\nfunction transformTRPCResponseItem<\n TResponseItem extends TRPCResponse | TRPCResponseMessage,\n>(config: RootConfig, item: TResponseItem): TResponseItem {\n if ('error' in item) {\n return {\n ...item,\n error: config.transformer.output.serialize(item.error),\n };\n }\n\n if ('data' in item.result) {\n return {\n ...item,\n result: {\n ...item.result,\n data: config.transformer.output.serialize(item.result.data),\n },\n };\n }\n\n return item;\n}\n\n/**\n * Takes a unserialized `TRPCResponse` and serializes it with the router's transformers\n **/\nexport function transformTRPCResponse<\n TResponse extends\n | TRPCResponse\n | TRPCResponse[]\n | TRPCResponseMessage\n | TRPCResponseMessage[],\n>(config: RootConfig, itemOrItems: TResponse) {\n return Array.isArray(itemOrItems)\n ? itemOrItems.map((item) => transformTRPCResponseItem(config, item))\n : transformTRPCResponseItem(config, itemOrItems);\n}\n\n// FIXME:\n// - the generics here are probably unnecessary\n// - the RPC-spec could probably be simplified to combine HTTP + WS\n/** @internal */\nfunction transformResultInner(\n response:\n | TRPCResponse>\n | TRPCResponseMessage>,\n transformer: DataTransformer,\n) {\n if ('error' in response) {\n const error = transformer.deserialize(\n response.error,\n ) as inferRouterError;\n return {\n ok: false,\n error: {\n ...response,\n error,\n },\n } as const;\n }\n\n const result = {\n ...response.result,\n ...((!response.result.type || response.result.type === 'data') && {\n type: 'data',\n data: transformer.deserialize(response.result.data),\n }),\n } as TRPCResultMessage['result'];\n return { ok: true, result } as const;\n}\n\nclass TransformResultError extends Error {\n constructor() {\n super('Unable to transform response from server');\n }\n}\n\n/**\n * Transforms and validates that the result is a valid TRPCResponse\n * @internal\n */\nexport function transformResult(\n response:\n | TRPCResponse>\n | TRPCResponseMessage>,\n transformer: DataTransformer,\n): ReturnType {\n let result: ReturnType;\n try {\n // Use the data transformers on the JSON-response\n result = transformResultInner(response, transformer);\n } catch {\n throw new TransformResultError();\n }\n\n // check that output of the transformers is a valid TRPCResponse\n if (\n !result.ok &&\n (!isObject(result.error.error) ||\n typeof result.error.error['code'] !== 'number')\n ) {\n throw new TransformResultError();\n }\n if (result.ok && !isObject(result.result)) {\n throw new TransformResultError();\n }\n return result;\n}\n", "import type { Observable } from '../observable';\nimport { createRecursiveProxy } from './createProxy';\nimport { defaultFormatter } from './error/formatter';\nimport { getTRPCErrorFromUnknown, TRPCError } from './error/TRPCError';\nimport type {\n AnyProcedure,\n ErrorHandlerOptions,\n inferProcedureInput,\n inferProcedureOutput,\n LegacyObservableSubscriptionProcedure,\n} from './procedure';\nimport type { ProcedureCallOptions } from './procedureBuilder';\nimport type { AnyRootTypes, RootConfig } from './rootConfig';\nimport { defaultTransformer } from './transformer';\nimport type { MaybePromise, ValueOf } from './types';\nimport {\n emptyObject,\n isFunction,\n isObject,\n mergeWithoutOverrides,\n} from './utils';\n\nexport interface RouterRecord {\n [key: string]: AnyProcedure | RouterRecord;\n}\n\ntype DecorateProcedure = (\n input: inferProcedureInput,\n) => Promise<\n TProcedure['_def']['type'] extends 'subscription'\n ? TProcedure extends LegacyObservableSubscriptionProcedure\n ? Observable, TRPCError>\n : inferProcedureOutput\n : inferProcedureOutput\n>;\n\n/**\n * @internal\n */\nexport type DecorateRouterRecord = {\n [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value\n ? $Value extends AnyProcedure\n ? DecorateProcedure<$Value>\n : $Value extends RouterRecord\n ? DecorateRouterRecord<$Value>\n : never\n : never;\n};\n\n/**\n * @internal\n */\n\nexport type RouterCallerErrorHandler = (\n opts: ErrorHandlerOptions,\n) => void;\n\n/**\n * @internal\n */\nexport type RouterCaller<\n TRoot extends AnyRootTypes,\n TRecord extends RouterRecord,\n> = (\n /**\n * @note\n * If passing a function, we recommend it's a cached function\n * e.g. wrapped in `React.cache` to avoid unnecessary computations\n */\n ctx: TRoot['ctx'] | (() => MaybePromise),\n options?: {\n onError?: RouterCallerErrorHandler;\n signal?: AbortSignal;\n },\n) => DecorateRouterRecord;\n\n/**\n * @internal\n */\nconst lazyMarker = 'lazyMarker' as 'lazyMarker' & {\n __brand: 'lazyMarker';\n};\nexport type Lazy = (() => Promise) & { [lazyMarker]: true };\n\ntype LazyLoader = {\n load: () => Promise;\n ref: Lazy;\n};\n\nfunction once(fn: () => T): () => T {\n const uncalled = Symbol();\n let result: T | typeof uncalled = uncalled;\n return (): T => {\n if (result === uncalled) {\n result = fn();\n }\n return result;\n };\n}\n\n/**\n * Lazy load a router\n * @see https://trpc.io/docs/server/merging-routers#lazy-load\n */\nexport function lazy(\n importRouter: () => Promise<\n | TRouter\n | {\n [key: string]: TRouter;\n }\n >,\n): Lazy> {\n async function resolve(): Promise {\n const mod = await importRouter();\n\n // if the module is a router, return it\n if (isRouter(mod)) {\n return mod;\n }\n\n const routers = Object.values(mod);\n\n if (routers.length !== 1 || !isRouter(routers[0])) {\n throw new Error(\n \"Invalid router module - either define exactly 1 export or return the router directly.\\nExample: `lazy(() => import('./slow.js').then((m) => m.slowRouter))`\",\n );\n }\n\n return routers[0];\n }\n\n (resolve as Lazy>)[lazyMarker] = true as const;\n\n return resolve as Lazy>;\n}\n\nfunction isLazy(input: unknown): input is Lazy {\n return typeof input === 'function' && lazyMarker in input;\n}\n\n/**\n * @internal\n */\nexport interface RouterDef<\n TRoot extends AnyRootTypes,\n TRecord extends RouterRecord,\n> {\n _config: RootConfig;\n router: true;\n procedure?: never;\n procedures: TRecord;\n record: TRecord;\n lazy: Record>;\n}\n\nexport interface Router<\n TRoot extends AnyRootTypes,\n TRecord extends RouterRecord,\n> {\n _def: RouterDef;\n /**\n * @see https://trpc.io/docs/v11/server/server-side-calls\n */\n createCaller: RouterCaller;\n}\n\nexport type BuiltRouter<\n TRoot extends AnyRootTypes,\n TRecord extends RouterRecord,\n> = Router & TRecord;\n\nexport interface RouterBuilder {\n (\n _: TIn,\n ): BuiltRouter>;\n}\n\nexport type AnyRouter = Router;\n\nexport type inferRouterRootTypes =\n TRouter['_def']['_config']['$types'];\n\nexport type inferRouterContext =\n inferRouterRootTypes['ctx'];\nexport type inferRouterError =\n inferRouterRootTypes['errorShape'];\nexport type inferRouterMeta =\n inferRouterRootTypes['meta'];\n\nfunction isRouter(value: unknown): value is AnyRouter {\n return (\n isObject(value) && isObject(value['_def']) && 'router' in value['_def']\n );\n}\n\nconst emptyRouter = {\n _ctx: null as any,\n _errorShape: null as any,\n _meta: null as any,\n queries: {},\n mutations: {},\n subscriptions: {},\n errorFormatter: defaultFormatter,\n transformer: defaultTransformer,\n};\n\n/**\n * Reserved words that can't be used as router or procedure names\n */\nconst reservedWords = [\n /**\n * Then is a reserved word because otherwise we can't return a promise that returns a Proxy\n * since JS will think that `.then` is something that exists\n */\n 'then',\n /**\n * `fn.call()` and `fn.apply()` are reserved words because otherwise we can't call a function using `.call` or `.apply`\n */\n 'call',\n 'apply',\n];\n\n/** @internal */\nexport type CreateRouterOptions = {\n [key: string]:\n | AnyProcedure\n | AnyRouter\n | CreateRouterOptions\n | Lazy;\n};\n\n/** @internal */\nexport type DecorateCreateRouterOptions<\n TRouterOptions extends CreateRouterOptions,\n> = {\n [K in keyof TRouterOptions]: TRouterOptions[K] extends infer $Value\n ? $Value extends AnyProcedure\n ? $Value\n : $Value extends Router\n ? TRecord\n : $Value extends Lazy>\n ? TRecord\n : $Value extends CreateRouterOptions\n ? DecorateCreateRouterOptions<$Value>\n : never\n : never;\n};\n\n/**\n * @internal\n */\nexport function createRouterFactory(\n config: RootConfig,\n) {\n function createRouterInner(\n input: TInput,\n ): BuiltRouter> {\n const reservedWordsUsed = new Set(\n Object.keys(input).filter((v) => reservedWords.includes(v)),\n );\n if (reservedWordsUsed.size > 0) {\n throw new Error(\n 'Reserved words used in `router({})` call: ' +\n Array.from(reservedWordsUsed).join(', '),\n );\n }\n\n const procedures: Record = emptyObject();\n const lazy: Record> = emptyObject();\n\n function createLazyLoader(opts: {\n ref: Lazy;\n path: readonly string[];\n key: string;\n aggregate: RouterRecord;\n }): LazyLoader {\n return {\n ref: opts.ref,\n load: once(async () => {\n const router = await opts.ref();\n const lazyPath = [...opts.path, opts.key];\n const lazyKey = lazyPath.join('.');\n\n opts.aggregate[opts.key] = step(router._def.record, lazyPath);\n\n delete lazy[lazyKey];\n\n // add lazy loaders for nested routers\n for (const [nestedKey, nestedItem] of Object.entries(\n router._def.lazy,\n )) {\n const nestedRouterKey = [...lazyPath, nestedKey].join('.');\n\n // console.log('adding lazy', nestedRouterKey);\n lazy[nestedRouterKey] = createLazyLoader({\n ref: nestedItem.ref,\n path: lazyPath,\n key: nestedKey,\n aggregate: opts.aggregate[opts.key] as RouterRecord,\n });\n }\n }),\n };\n }\n\n function step(from: CreateRouterOptions, path: readonly string[] = []) {\n const aggregate: RouterRecord = emptyObject();\n for (const [key, item] of Object.entries(from ?? {})) {\n if (isLazy(item)) {\n lazy[[...path, key].join('.')] = createLazyLoader({\n path,\n ref: item,\n key,\n aggregate,\n });\n continue;\n }\n if (isRouter(item)) {\n aggregate[key] = step(item._def.record, [...path, key]);\n continue;\n }\n if (!isProcedure(item)) {\n // RouterRecord\n aggregate[key] = step(item, [...path, key]);\n continue;\n }\n\n const newPath = [...path, key].join('.');\n\n if (procedures[newPath]) {\n throw new Error(`Duplicate key: ${newPath}`);\n }\n\n procedures[newPath] = item;\n aggregate[key] = item;\n }\n\n return aggregate;\n }\n const record = step(input);\n\n const _def: AnyRouter['_def'] = {\n _config: config,\n router: true,\n procedures,\n lazy,\n ...emptyRouter,\n record,\n };\n\n const router: BuiltRouter = {\n ...(record as {}),\n _def,\n createCaller: createCallerFactory()({\n _def,\n }),\n };\n return router as BuiltRouter>;\n }\n\n return createRouterInner;\n}\n\nfunction isProcedure(\n procedureOrRouter: ValueOf,\n): procedureOrRouter is AnyProcedure {\n return typeof procedureOrRouter === 'function';\n}\n\n/**\n * @internal\n */\nexport async function getProcedureAtPath(\n router: Pick, '_def'>,\n path: string,\n): Promise {\n const { _def } = router;\n let procedure = _def.procedures[path];\n\n while (!procedure) {\n const key = Object.keys(_def.lazy).find((key) => path.startsWith(key));\n // console.log(`found lazy: ${key ?? 'NOPE'} (fullPath: ${fullPath})`);\n\n if (!key) {\n return null;\n }\n // console.log('loading', key, '.......');\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const lazyRouter = _def.lazy[key]!;\n await lazyRouter.load();\n\n procedure = _def.procedures[path];\n }\n\n return procedure;\n}\n\n/**\n * @internal\n */\nexport async function callProcedure(\n opts: ProcedureCallOptions & {\n router: AnyRouter;\n allowMethodOverride?: boolean;\n },\n) {\n const { type, path } = opts;\n const proc = await getProcedureAtPath(opts.router, path);\n if (\n !proc ||\n !isProcedure(proc) ||\n (proc._def.type !== type && !opts.allowMethodOverride)\n ) {\n throw new TRPCError({\n code: 'NOT_FOUND',\n message: `No \"${type}\"-procedure on path \"${path}\"`,\n });\n }\n\n /* istanbul ignore if -- @preserve */\n if (\n proc._def.type !== type &&\n opts.allowMethodOverride &&\n proc._def.type === 'subscription'\n ) {\n throw new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message: `Method override is not supported for subscriptions`,\n });\n }\n\n return proc(opts);\n}\n\nexport interface RouterCallerFactory {\n (\n router: Pick, '_def'>,\n ): RouterCaller;\n}\n\nexport function createCallerFactory<\n TRoot extends AnyRootTypes,\n>(): RouterCallerFactory {\n return function createCallerInner(\n router: Pick, '_def'>,\n ): RouterCaller {\n const { _def } = router;\n type Context = TRoot['ctx'];\n\n return function createCaller(ctxOrCallback, opts) {\n return createRecursiveProxy>>(\n async (innerOpts) => {\n const { path, args } = innerOpts;\n const fullPath = path.join('.');\n\n if (path.length === 1 && path[0] === '_def') {\n return _def;\n }\n\n const procedure = await getProcedureAtPath(router, fullPath);\n\n let ctx: Context | undefined = undefined;\n try {\n if (!procedure) {\n throw new TRPCError({\n code: 'NOT_FOUND',\n message: `No procedure found on path \"${path}\"`,\n });\n }\n ctx = isFunction(ctxOrCallback)\n ? await Promise.resolve(ctxOrCallback())\n : ctxOrCallback;\n\n return await procedure({\n path: fullPath,\n getRawInput: async () => args[0],\n ctx,\n type: procedure._def.type,\n signal: opts?.signal,\n batchIndex: 0,\n });\n } catch (cause) {\n opts?.onError?.({\n ctx,\n error: getTRPCErrorFromUnknown(cause),\n input: args[0],\n path: fullPath,\n type: procedure?._def.type ?? 'unknown',\n });\n throw cause;\n }\n },\n );\n };\n };\n}\n\n/** @internal */\nexport type MergeRouters<\n TRouters extends AnyRouter[],\n TRoot extends AnyRootTypes = TRouters[0]['_def']['_config']['$types'],\n TRecord extends RouterRecord = {},\n> = TRouters extends [\n infer Head extends AnyRouter,\n ...infer Tail extends AnyRouter[],\n]\n ? MergeRouters\n : BuiltRouter;\n\nexport function mergeRouters(\n ...routerList: [...TRouters]\n): MergeRouters {\n const record = mergeWithoutOverrides(\n {},\n ...routerList.map((r) => r._def.record),\n );\n const errorFormatter = routerList.reduce(\n (currentErrorFormatter, nextRouter) => {\n if (\n nextRouter._def._config.errorFormatter &&\n nextRouter._def._config.errorFormatter !== defaultFormatter\n ) {\n if (\n currentErrorFormatter !== defaultFormatter &&\n currentErrorFormatter !== nextRouter._def._config.errorFormatter\n ) {\n throw new Error('You seem to have several error formatters');\n }\n return nextRouter._def._config.errorFormatter;\n }\n return currentErrorFormatter;\n },\n defaultFormatter,\n );\n\n const transformer = routerList.reduce((prev, current) => {\n if (\n current._def._config.transformer &&\n current._def._config.transformer !== defaultTransformer\n ) {\n if (\n prev !== defaultTransformer &&\n prev !== current._def._config.transformer\n ) {\n throw new Error('You seem to have several transformers');\n }\n return current._def._config.transformer;\n }\n return prev;\n }, defaultTransformer);\n\n const router = createRouterFactory({\n errorFormatter,\n transformer,\n isDev: routerList.every((r) => r._def._config.isDev),\n allowOutsideOfServer: routerList.every(\n (r) => r._def._config.allowOutsideOfServer,\n ),\n isServer: routerList.every((r) => r._def._config.isServer),\n $types: routerList[0]?._def._config.$types,\n sse: routerList[0]?._def._config.sse,\n })(record);\n\n return router as MergeRouters;\n}\n", "const trackedSymbol = Symbol();\n\ntype TrackedId = string & {\n __brand: 'TrackedId';\n};\nexport type TrackedEnvelope = [TrackedId, TData, typeof trackedSymbol];\n\nexport interface TrackedData {\n /**\n * The id of the message to keep track of in case the connection gets lost\n */\n id: string;\n /**\n * The data field of the message\n */\n data: TData;\n}\n/**\n * Produce a typed server-sent event message\n * @deprecated use `tracked(id, data)` instead\n */\nexport function sse(event: { id: string; data: TData }) {\n return tracked(event.id, event.data);\n}\n\nexport function isTrackedEnvelope(\n value: unknown,\n): value is TrackedEnvelope {\n return Array.isArray(value) && value[2] === trackedSymbol;\n}\n\n/**\n * Automatically track an event so that it can be resumed from a given id if the connection is lost\n */\nexport function tracked(\n id: string,\n data: TData,\n): TrackedEnvelope {\n if (id === '') {\n // This limitation could be removed by using different SSE event names / channels for tracked event and non-tracked event\n throw new Error(\n '`id` must not be an empty string as empty string is the same as not setting the id at all',\n );\n }\n return [id as TrackedId, data, trackedSymbol];\n}\n\nexport type inferTrackedOutput =\n TData extends TrackedEnvelope ? TrackedData<$Data> : TData;\n", "import type { Result } from '../unstable-core-do-not-import';\nimport type {\n Observable,\n Observer,\n OperatorFunction,\n TeardownLogic,\n UnaryFunction,\n Unsubscribable,\n} from './types';\n\n/** @public */\nexport type inferObservableValue =\n TObservable extends Observable ? TValue : never;\n\n/** @public */\nexport function isObservable(x: unknown): x is Observable {\n return typeof x === 'object' && x !== null && 'subscribe' in x;\n}\n\n/** @public */\nexport function observable(\n subscribe: (observer: Observer) => TeardownLogic,\n): Observable {\n const self: Observable = {\n subscribe(observer) {\n let teardownRef: TeardownLogic | null = null;\n let isDone = false;\n let unsubscribed = false;\n let teardownImmediately = false;\n function unsubscribe() {\n if (teardownRef === null) {\n teardownImmediately = true;\n return;\n }\n if (unsubscribed) {\n return;\n }\n unsubscribed = true;\n\n if (typeof teardownRef === 'function') {\n teardownRef();\n } else if (teardownRef) {\n teardownRef.unsubscribe();\n }\n }\n teardownRef = subscribe({\n next(value) {\n if (isDone) {\n return;\n }\n observer.next?.(value);\n },\n error(err) {\n if (isDone) {\n return;\n }\n isDone = true;\n observer.error?.(err);\n unsubscribe();\n },\n complete() {\n if (isDone) {\n return;\n }\n isDone = true;\n observer.complete?.();\n unsubscribe();\n },\n });\n if (teardownImmediately) {\n unsubscribe();\n }\n return {\n unsubscribe,\n };\n },\n pipe(\n ...operations: OperatorFunction[]\n ): Observable {\n return operations.reduce(pipeReducer, self);\n },\n };\n return self;\n}\n\nfunction pipeReducer(prev: any, fn: UnaryFunction) {\n return fn(prev);\n}\n\n/** @internal */\nexport function observableToPromise(\n observable: Observable,\n) {\n const ac = new AbortController();\n const promise = new Promise((resolve, reject) => {\n let isDone = false;\n function onDone() {\n if (isDone) {\n return;\n }\n isDone = true;\n obs$.unsubscribe();\n }\n ac.signal.addEventListener('abort', () => {\n reject(ac.signal.reason);\n });\n const obs$ = observable.subscribe({\n next(data) {\n isDone = true;\n resolve(data);\n onDone();\n },\n error(data) {\n reject(data);\n },\n complete() {\n ac.abort();\n onDone();\n },\n });\n });\n return promise;\n}\n\n/**\n * @internal\n */\nfunction observableToReadableStream(\n observable: Observable,\n signal: AbortSignal,\n): ReadableStream> {\n let unsub: Unsubscribable | null = null;\n\n const onAbort = () => {\n unsub?.unsubscribe();\n unsub = null;\n signal.removeEventListener('abort', onAbort);\n };\n\n return new ReadableStream>({\n start(controller) {\n unsub = observable.subscribe({\n next(data) {\n controller.enqueue({ ok: true, value: data });\n },\n error(error) {\n controller.enqueue({ ok: false, error });\n controller.close();\n },\n complete() {\n controller.close();\n },\n });\n\n if (signal.aborted) {\n onAbort();\n } else {\n signal.addEventListener('abort', onAbort, { once: true });\n }\n },\n cancel() {\n onAbort();\n },\n });\n}\n\n/** @internal */\nexport function observableToAsyncIterable(\n observable: Observable,\n signal: AbortSignal,\n): AsyncIterable {\n const stream = observableToReadableStream(observable, signal);\n\n const reader = stream.getReader();\n const iterator: AsyncIterator = {\n async next() {\n const value = await reader.read();\n if (value.done) {\n return {\n value: undefined,\n done: true,\n };\n }\n const { value: result } = value;\n if (!result.ok) {\n throw result.error;\n }\n return {\n value: result.value,\n done: false,\n };\n },\n async return() {\n await reader.cancel();\n return {\n value: undefined,\n done: true,\n };\n },\n };\n return {\n [Symbol.asyncIterator]() {\n return iterator;\n },\n };\n}\n", "import { TRPCError } from '../error/TRPCError';\nimport { isObject } from '../utils';\nimport type { TRPCRequestInfo } from './types';\n\nexport function parseConnectionParamsFromUnknown(\n parsed: unknown,\n): TRPCRequestInfo['connectionParams'] {\n try {\n if (parsed === null) {\n return null;\n }\n if (!isObject(parsed)) {\n throw new Error('Expected object');\n }\n const nonStringValues = Object.entries(parsed).filter(\n ([_key, value]) => typeof value !== 'string',\n );\n\n if (nonStringValues.length > 0) {\n throw new Error(\n `Expected connectionParams to be string values. Got ${nonStringValues\n .map(([key, value]) => `${key}: ${typeof value}`)\n .join(', ')}`,\n );\n }\n return parsed as Record;\n } catch (cause) {\n throw new TRPCError({\n code: 'PARSE_ERROR',\n message: 'Invalid connection params shape',\n cause,\n });\n }\n}\nexport function parseConnectionParamsFromString(\n str: string,\n): TRPCRequestInfo['connectionParams'] {\n let parsed: unknown;\n try {\n parsed = JSON.parse(str);\n } catch (cause) {\n throw new TRPCError({\n code: 'PARSE_ERROR',\n message: 'Not JSON-parsable query params',\n cause,\n });\n }\n return parseConnectionParamsFromUnknown(parsed);\n}\n", "import { TRPCError } from '../error/TRPCError';\nimport type { ProcedureType } from '../procedure';\nimport { getProcedureAtPath, type AnyRouter } from '../router';\nimport { emptyObject, isObject } from '../utils';\nimport { parseConnectionParamsFromString } from './parseConnectionParams';\nimport type { TRPCAcceptHeader, TRPCRequestInfo } from './types';\n\nexport function getAcceptHeader(headers: Headers): TRPCAcceptHeader | null {\n return (\n (headers.get('trpc-accept') as TRPCAcceptHeader | null) ??\n (headers\n .get('accept')\n ?.split(',')\n .some((t) => t.trim() === 'application/jsonl')\n ? ('application/jsonl' as TRPCAcceptHeader)\n : null)\n );\n}\n\ntype GetRequestInfoOptions = {\n path: string;\n req: Request;\n url: URL | null;\n searchParams: URLSearchParams;\n headers: Headers;\n router: AnyRouter;\n};\n\ntype ContentTypeHandler = {\n isMatch: (opts: Request) => boolean;\n parse: (opts: GetRequestInfoOptions) => Promise;\n};\n\n/**\n * Memoize a function that takes no arguments\n * @internal\n */\nfunction memo(fn: () => Promise) {\n let promise: Promise | null = null;\n const sym = Symbol.for('@trpc/server/http/memo');\n let value: TReturn | typeof sym = sym;\n return {\n /**\n * Lazily read the value\n */\n read: async (): Promise => {\n if (value !== sym) {\n return value;\n }\n\n // dedupes promises and catches errors\n promise ??= fn().catch((cause) => {\n if (cause instanceof TRPCError) {\n throw cause;\n }\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: cause instanceof Error ? cause.message : 'Invalid input',\n cause,\n });\n });\n\n value = await promise;\n promise = null;\n\n return value;\n },\n /**\n * Get an already stored result\n */\n result: (): TReturn | undefined => {\n return value !== sym ? value : undefined;\n },\n };\n}\n\nconst jsonContentTypeHandler: ContentTypeHandler = {\n isMatch(req) {\n return !!req.headers.get('content-type')?.startsWith('application/json');\n },\n async parse(opts) {\n const { req } = opts;\n const isBatchCall = opts.searchParams.get('batch') === '1';\n const paths = isBatchCall ? opts.path.split(',') : [opts.path];\n\n type InputRecord = Record;\n const getInputs = memo(async (): Promise => {\n let inputs: unknown = undefined;\n if (req.method === 'GET') {\n const queryInput = opts.searchParams.get('input');\n if (queryInput) {\n inputs = JSON.parse(queryInput);\n }\n } else {\n inputs = await req.json();\n }\n if (inputs === undefined) {\n return emptyObject();\n }\n\n if (!isBatchCall) {\n const result: InputRecord = emptyObject();\n result[0] =\n opts.router._def._config.transformer.input.deserialize(inputs);\n return result;\n }\n\n if (!isObject(inputs)) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: '\"input\" needs to be an object when doing a batch call',\n });\n }\n const acc: InputRecord = emptyObject();\n for (const index of paths.keys()) {\n const input = inputs[index];\n if (input !== undefined) {\n acc[index] =\n opts.router._def._config.transformer.input.deserialize(input);\n }\n }\n\n return acc;\n });\n\n const calls = await Promise.all(\n paths.map(\n async (path, index): Promise => {\n const procedure = await getProcedureAtPath(opts.router, path);\n return {\n batchIndex: index,\n path,\n procedure,\n getRawInput: async () => {\n const inputs = await getInputs.read();\n let input = inputs[index];\n\n if (procedure?._def.type === 'subscription') {\n const lastEventId =\n opts.headers.get('last-event-id') ??\n opts.searchParams.get('lastEventId') ??\n opts.searchParams.get('Last-Event-Id');\n\n if (lastEventId) {\n if (isObject(input)) {\n input = {\n ...input,\n lastEventId: lastEventId,\n };\n } else {\n input ??= {\n lastEventId: lastEventId,\n };\n }\n }\n }\n return input;\n },\n result: () => {\n return getInputs.result()?.[index];\n },\n };\n },\n ),\n );\n\n const types = new Set(\n calls.map((call) => call.procedure?._def.type).filter(Boolean),\n );\n\n /* istanbul ignore if -- @preserve */\n if (types.size > 1) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: `Cannot mix procedure types in call: ${Array.from(types).join(\n ', ',\n )}`,\n });\n }\n const type: ProcedureType | 'unknown' =\n types.values().next().value ?? 'unknown';\n\n const connectionParamsStr = opts.searchParams.get('connectionParams');\n\n const info: TRPCRequestInfo = {\n isBatchCall,\n accept: getAcceptHeader(req.headers),\n calls,\n type,\n connectionParams:\n connectionParamsStr === null\n ? null\n : parseConnectionParamsFromString(connectionParamsStr),\n signal: req.signal,\n url: opts.url,\n };\n return info;\n },\n};\n\nconst formDataContentTypeHandler: ContentTypeHandler = {\n isMatch(req) {\n return !!req.headers.get('content-type')?.startsWith('multipart/form-data');\n },\n async parse(opts) {\n const { req } = opts;\n if (req.method !== 'POST') {\n throw new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message:\n 'Only POST requests are supported for multipart/form-data requests',\n });\n }\n const getInputs = memo(async () => {\n const fd = await req.formData();\n return fd;\n });\n const procedure = await getProcedureAtPath(opts.router, opts.path);\n return {\n accept: null,\n calls: [\n {\n batchIndex: 0,\n path: opts.path,\n getRawInput: getInputs.read,\n result: getInputs.result,\n procedure,\n },\n ],\n isBatchCall: false,\n type: 'mutation',\n connectionParams: null,\n signal: req.signal,\n url: opts.url,\n };\n },\n};\n\nconst octetStreamContentTypeHandler: ContentTypeHandler = {\n isMatch(req) {\n return !!req.headers\n .get('content-type')\n ?.startsWith('application/octet-stream');\n },\n async parse(opts) {\n const { req } = opts;\n if (req.method !== 'POST') {\n throw new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message:\n 'Only POST requests are supported for application/octet-stream requests',\n });\n }\n const getInputs = memo(async () => {\n return req.body;\n });\n return {\n calls: [\n {\n batchIndex: 0,\n path: opts.path,\n getRawInput: getInputs.read,\n result: getInputs.result,\n procedure: await getProcedureAtPath(opts.router, opts.path),\n },\n ],\n isBatchCall: false,\n accept: null,\n type: 'mutation',\n connectionParams: null,\n signal: req.signal,\n url: opts.url,\n };\n },\n};\n\nconst handlers = [\n jsonContentTypeHandler,\n formDataContentTypeHandler,\n octetStreamContentTypeHandler,\n];\n\nfunction getContentTypeHandler(req: Request): ContentTypeHandler {\n const handler = handlers.find((handler) => handler.isMatch(req));\n if (handler) {\n return handler;\n }\n\n if (!handler && req.method === 'GET') {\n // fallback to JSON for get requests so GET-requests can be opened in browser easily\n return jsonContentTypeHandler;\n }\n\n throw new TRPCError({\n code: 'UNSUPPORTED_MEDIA_TYPE',\n message: req.headers.has('content-type')\n ? `Unsupported content-type \"${req.headers.get('content-type')}`\n : 'Missing content-type header',\n });\n}\n\nexport async function getRequestInfo(\n opts: GetRequestInfoOptions,\n): Promise {\n const handler = getContentTypeHandler(opts.req);\n return await handler.parse(opts);\n}\n", "import { isObject } from '../utils';\n\nexport function isAbortError(\n error: unknown,\n): error is DOMException | Error | { name: 'AbortError' } {\n return isObject(error) && error['name'] === 'AbortError';\n}\n\nexport function throwAbortError(message = 'AbortError'): never {\n throw new DOMException(message, 'AbortError');\n}\n", "/*!\n * is-plain-object \n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o: unknown): o is Record {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n \nexport function isPlainObject(o: unknown): o is Record {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n};\n", "/* eslint-disable @typescript-eslint/unbound-method */\n \n \n\nimport type {\n PromiseExecutor,\n PromiseWithResolvers,\n ProxyPromise,\n SubscribedPromise,\n} from \"./types\";\n\n/** Memory safe (weakmapped) cache of the ProxyPromise for each Promise,\n * which is retained for the lifetime of the original Promise.\n */\nconst subscribableCache = new WeakMap<\n PromiseLike,\n ProxyPromise\n>();\n\n/** A NOOP function allowing a consistent interface for settled\n * SubscribedPromises (settled promises are not subscribed - they resolve\n * immediately). */\nconst NOOP = () => {\n // noop\n};\n\n/**\n * Every `Promise` can be shadowed by a single `ProxyPromise`. It is\n * created once, cached and reused throughout the lifetime of the Promise. Get a\n * Promise's ProxyPromise using `Unpromise.proxy(promise)`.\n *\n * The `ProxyPromise` attaches handlers to the original `Promise`\n * `.then()` and `.catch()` just once. Promises derived from it use a\n * subscription- (and unsubscription-) based mechanism that monitors these\n * handlers.\n *\n * Every time you call `.subscribe()`, `.then()` `.catch()` or `.finally()` on a\n * `ProxyPromise` it returns a `SubscribedPromise` having an additional\n * `unsubscribe()` method. Calling `unsubscribe()` detaches reference chains\n * from the original, potentially long-lived Promise, eliminating memory leaks.\n *\n * This approach can eliminate the memory leaks that otherwise come about from\n * repeated `race()` or `any()` calls invoking `.then()` and `.catch()` multiple\n * times on the same long-lived native Promise (subscriptions which can never be\n * cleaned up).\n *\n * `Unpromise.race(promises)` is a reference implementation of `Promise.race`\n * avoiding memory leaks when using long-lived unsettled Promises.\n *\n * `Unpromise.any(promises)` is a reference implementation of `Promise.any`\n * avoiding memory leaks when using long-lived unsettled Promises.\n *\n * `Unpromise.resolve(promise)` returns an ephemeral `SubscribedPromise` for\n * any given `Promise` facilitating arbitrary async/await patterns. Behind\n * the scenes, `resolve` is implemented simply as\n * `Unpromise.proxy(promise).subscribe()`. Don't forget to call `.unsubscribe()`\n * to tidy up!\n *\n */\nexport class Unpromise implements ProxyPromise {\n /** INSTANCE IMPLEMENTATION */\n\n /** The promise shadowed by this Unpromise */\n protected readonly promise: Promise | PromiseLike;\n\n /** Promises expecting eventual settlement (unless unsubscribed first). This list is deleted\n * after the original promise settles - no further notifications will be issued. */\n protected subscribers: ReadonlyArray> | null = [];\n\n /** The Promise's settlement (recorded when it fulfils or rejects). This is consulted when\n * calling .subscribe() .then() .catch() .finally() to see if an immediately-resolving Promise\n * can be returned, and therefore subscription can be bypassed. */\n protected settlement: PromiseSettledResult | null = null;\n\n /** Constructor accepts a normal Promise executor function like `new\n * Unpromise((resolve, reject) => {...})` or accepts a pre-existing Promise\n * like `new Unpromise(existingPromise)`. Adds `.then()` and `.catch()`\n * handlers to the Promise. These handlers pass fulfilment and rejection\n * notifications to downstream subscribers and maintains records of value\n * or error if the Promise ever settles. */\n protected constructor(promise: Promise);\n protected constructor(promise: PromiseLike);\n protected constructor(executor: PromiseExecutor);\n protected constructor(arg: Promise | PromiseLike | PromiseExecutor) {\n // handle either a Promise or a Promise executor function\n if (typeof arg === \"function\") {\n this.promise = new Promise(arg);\n } else {\n this.promise = arg;\n }\n\n // subscribe for eventual fulfilment and rejection\n\n // handle PromiseLike objects (that at least have .then)\n const thenReturn = this.promise.then((value) => {\n // atomically record fulfilment and detach subscriber list\n const { subscribers } = this;\n this.subscribers = null;\n this.settlement = {\n status: \"fulfilled\",\n value,\n };\n // notify fulfilment to subscriber list\n subscribers?.forEach(({ resolve }) => {\n resolve(value);\n });\n });\n\n // handle Promise (that also have a .catch behaviour)\n if (\"catch\" in thenReturn) {\n thenReturn.catch((reason) => {\n // atomically record rejection and detach subscriber list\n const { subscribers } = this;\n this.subscribers = null;\n this.settlement = {\n status: \"rejected\",\n reason,\n };\n // notify rejection to subscriber list\n subscribers?.forEach(({ reject }) => {\n reject(reason);\n });\n });\n }\n }\n\n /** Create a promise that mitigates uncontrolled subscription to a long-lived\n * Promise via .then() and .catch() - otherwise a source of memory leaks.\n *\n * The returned promise has an `unsubscribe()` method which can be called when\n * the Promise is no longer being tracked by application logic, and which\n * ensures that there is no reference chain from the original promise to the\n * new one, and therefore no memory leak.\n *\n * If original promise has not yet settled, this adds a new unique promise\n * that listens to then/catch events, along with an `unsubscribe()` method to\n * detach it.\n *\n * If original promise has settled, then creates a new Promise.resolve() or\n * Promise.reject() and provided unsubscribe is a noop.\n *\n * If you call `unsubscribe()` before the returned Promise has settled, it\n * will never settle.\n */\n subscribe(): SubscribedPromise {\n // in all cases we will combine some promise with its unsubscribe function\n let promise: Promise;\n let unsubscribe: () => void;\n\n const { settlement } = this;\n if (settlement === null) {\n // not yet settled - subscribe new promise. Expect eventual settlement\n if (this.subscribers === null) {\n // invariant - it is not settled, so it must have subscribers\n throw new Error(\"Unpromise settled but still has subscribers\");\n }\n const subscriber = withResolvers();\n this.subscribers = listWithMember(this.subscribers, subscriber);\n promise = subscriber.promise;\n unsubscribe = () => {\n if (this.subscribers !== null) {\n this.subscribers = listWithoutMember(this.subscribers, subscriber);\n }\n };\n } else {\n // settled - don't create subscribed promise. Just resolve or reject\n const { status } = settlement;\n if (status === \"fulfilled\") {\n promise = Promise.resolve(settlement.value);\n } else {\n promise = Promise.reject(settlement.reason);\n }\n unsubscribe = NOOP;\n }\n\n // extend promise signature with the extra method\n return Object.assign(promise, { unsubscribe });\n }\n\n /** STANDARD PROMISE METHODS (but returning a SubscribedPromise) */\n\n then(\n onfulfilled?:\n | ((value: T) => TResult1 | PromiseLike)\n | null\n ,\n onrejected?:\n | ((reason: any) => TResult2 | PromiseLike)\n | null\n \n ): SubscribedPromise {\n const subscribed = this.subscribe();\n const { unsubscribe } = subscribed;\n return Object.assign(subscribed.then(onfulfilled, onrejected), {\n unsubscribe,\n });\n }\n\n catch(\n onrejected?:\n | ((reason: any) => TResult | PromiseLike)\n | null\n \n ): SubscribedPromise {\n const subscribed = this.subscribe();\n const { unsubscribe } = subscribed;\n return Object.assign(subscribed.catch(onrejected), {\n unsubscribe,\n });\n }\n\n finally(onfinally?: (() => void) | null ): SubscribedPromise {\n const subscribed = this.subscribe();\n const { unsubscribe } = subscribed;\n return Object.assign(subscribed.finally(onfinally), {\n unsubscribe,\n });\n }\n\n /** TOSTRING SUPPORT */\n\n readonly [Symbol.toStringTag] = \"Unpromise\";\n\n /** Unpromise STATIC METHODS */\n\n /** Create or Retrieve the proxy Unpromise (a re-used Unpromise for the VM lifetime\n * of the provided Promise reference) */\n static proxy(promise: PromiseLike): ProxyPromise {\n const cached = Unpromise.getSubscribablePromise(promise);\n return typeof cached !== \"undefined\"\n ? cached\n : Unpromise.createSubscribablePromise(promise);\n }\n\n /** Create and store an Unpromise keyed by an original Promise. */\n protected static createSubscribablePromise(promise: PromiseLike) {\n const created = new Unpromise(promise);\n subscribableCache.set(promise, created as Unpromise); // resolve promise to unpromise\n subscribableCache.set(created, created as Unpromise); // resolve the unpromise to itself\n return created;\n }\n\n /** Retrieve a previously-created Unpromise keyed by an original Promise. */\n protected static getSubscribablePromise(promise: PromiseLike) {\n return subscribableCache.get(promise) as ProxyPromise | undefined;\n }\n\n /** Promise STATIC METHODS */\n\n /** Lookup the Unpromise for this promise, and derive a SubscribedPromise from\n * it (that can be later unsubscribed to eliminate Memory leaks) */\n static resolve(value: T | PromiseLike) {\n const promise: PromiseLike =\n typeof value === \"object\" &&\n value !== null &&\n \"then\" in value &&\n typeof value.then === \"function\"\n ? value\n : Promise.resolve(value);\n return Unpromise.proxy(promise).subscribe() as SubscribedPromise<\n Awaited\n >;\n }\n\n /** Perform Promise.any() via SubscribedPromises, then unsubscribe them.\n * Equivalent to Promise.any but eliminates memory leaks from long-lived\n * promises accumulating .then() and .catch() subscribers. */\n static async any(\n values: T\n ): Promise>;\n static async any(\n values: Iterable>\n ): Promise> {\n const valuesArray = Array.isArray(values) ? values : [...values];\n const subscribedPromises = valuesArray.map(Unpromise.resolve);\n try {\n return await Promise.any(subscribedPromises);\n } finally {\n subscribedPromises.forEach(({ unsubscribe }) => {\n unsubscribe();\n });\n }\n }\n\n /** Perform Promise.race via SubscribedPromises, then unsubscribe them.\n * Equivalent to Promise.race but eliminates memory leaks from long-lived\n * promises accumulating .then() and .catch() subscribers. */\n static async race(\n values: T\n ): Promise>;\n static async race(\n values: Iterable>\n ): Promise> {\n const valuesArray = Array.isArray(values) ? values : [...values];\n const subscribedPromises = valuesArray.map(Unpromise.resolve);\n try {\n return await Promise.race(subscribedPromises);\n } finally {\n subscribedPromises.forEach(({ unsubscribe }) => {\n unsubscribe();\n });\n }\n }\n\n /** Create a race of SubscribedPromises that will fulfil to a single winning\n * Promise (in a 1-Tuple). Eliminates memory leaks from long-lived promises\n * accumulating .then() and .catch() subscribers. Allows simple logic to\n * consume the result, like...\n * ```ts\n * const [ winner ] = await Unpromise.race([ promiseA, promiseB ]);\n * if(winner === promiseB){\n * const result = await promiseB;\n * // do the thing\n * }\n * ```\n * */\n static async raceReferences>(\n promises: readonly TPromise[]\n ) {\n // map each promise to an eventual 1-tuple containing itself\n const selfPromises = promises.map(resolveSelfTuple);\n\n // now race them. They will fulfil to a readonly [P] or reject.\n try {\n return await Promise.race(selfPromises);\n } finally {\n for (const promise of selfPromises) {\n // unsubscribe proxy promises when the race is over to mitigate memory leaks\n promise.unsubscribe();\n }\n }\n }\n}\n\n/** Promises a 1-tuple containing the original promise when it resolves. Allows\n * awaiting the eventual Promise ***reference*** (easy to destructure and\n * exactly compare with ===). Avoids resolving to the Promise ***value*** (which\n * may be ambiguous and therefore hard to identify as the winner of a race).\n * You can call unsubscribe on the Promise to mitigate memory leaks.\n * */\nexport function resolveSelfTuple>(\n promise: TPromise\n): SubscribedPromise {\n return Unpromise.proxy(promise).then(() => [promise] as const);\n}\n\n/** VENDORED (Future) PROMISE UTILITIES */\n\n/** Reference implementation of https://github.com/tc39/proposal-promise-with-resolvers */\nfunction withResolvers(): PromiseWithResolvers {\n let resolve!: PromiseWithResolvers[\"resolve\"];\n let reject!: PromiseWithResolvers[\"reject\"];\n const promise = new Promise((_resolve, _reject) => {\n resolve = _resolve;\n reject = _reject;\n });\n return {\n promise,\n resolve,\n reject,\n };\n}\n\n/** IMMUTABLE LIST OPERATIONS */\n\nfunction listWithMember(arr: readonly T[], member: T): readonly T[] {\n return [...arr, member];\n}\n\nfunction listWithoutIndex(arr: readonly T[], index: number) {\n return [...arr.slice(0, index), ...arr.slice(index + 1)];\n}\n\nfunction listWithoutMember(arr: readonly T[], member: unknown) {\n const index = arr.indexOf(member as T);\n if (index !== -1) {\n return listWithoutIndex(arr, index);\n }\n return arr;\n}\n", "// @ts-expect-error - polyfilling symbol\n// eslint-disable-next-line no-restricted-syntax\nSymbol.dispose ??= Symbol();\n\n// @ts-expect-error - polyfilling symbol\n// eslint-disable-next-line no-restricted-syntax\nSymbol.asyncDispose ??= Symbol();\n\n/**\n * Takes a value and a dispose function and returns a new object that implements the Disposable interface.\n * The returned object is the original value augmented with a Symbol.dispose method.\n * @param thing The value to make disposable\n * @param dispose Function to call when disposing the resource\n * @returns The original value with Symbol.dispose method added\n */\nexport function makeResource(thing: T, dispose: () => void): T & Disposable {\n const it = thing as T & Partial;\n\n // eslint-disable-next-line no-restricted-syntax\n const existing = it[Symbol.dispose];\n\n // eslint-disable-next-line no-restricted-syntax\n it[Symbol.dispose] = () => {\n dispose();\n existing?.();\n };\n\n return it as T & Disposable;\n}\n\n/**\n * Takes a value and an async dispose function and returns a new object that implements the AsyncDisposable interface.\n * The returned object is the original value augmented with a Symbol.asyncDispose method.\n * @param thing The value to make async disposable\n * @param dispose Async function to call when disposing the resource\n * @returns The original value with Symbol.asyncDispose method added\n */\nexport function makeAsyncResource(\n thing: T,\n dispose: () => Promise,\n): T & AsyncDisposable {\n const it = thing as T & Partial;\n\n // eslint-disable-next-line no-restricted-syntax\n const existing = it[Symbol.asyncDispose];\n\n // eslint-disable-next-line no-restricted-syntax\n it[Symbol.asyncDispose] = async () => {\n await dispose();\n await existing?.();\n };\n\n return it as T & AsyncDisposable;\n}\n", "import { makeResource } from './disposable';\n\nexport const disposablePromiseTimerResult = Symbol();\n\nexport function timerResource(ms: number) {\n let timer: ReturnType | null = null;\n\n return makeResource(\n {\n start() {\n if (timer) {\n throw new Error('Timer already started');\n }\n\n const promise = new Promise(\n (resolve) => {\n timer = setTimeout(() => resolve(disposablePromiseTimerResult), ms);\n },\n );\n return promise;\n },\n },\n () => {\n if (timer) {\n clearTimeout(timer);\n }\n },\n );\n}\n", "function _usingCtx() {\n var r = \"function\" == typeof SuppressedError ? SuppressedError : function (r, e) {\n var n = Error();\n return n.name = \"SuppressedError\", n.error = r, n.suppressed = e, n;\n },\n e = {},\n n = [];\n function using(r, e) {\n if (null != e) {\n if (Object(e) !== e) throw new TypeError(\"using declarations can only be used with objects, functions, null, or undefined.\");\n if (r) var o = e[Symbol.asyncDispose || Symbol[\"for\"](\"Symbol.asyncDispose\")];\n if (void 0 === o && (o = e[Symbol.dispose || Symbol[\"for\"](\"Symbol.dispose\")], r)) var t = o;\n if (\"function\" != typeof o) throw new TypeError(\"Object is not disposable.\");\n t && (o = function o() {\n try {\n t.call(e);\n } catch (r) {\n return Promise.reject(r);\n }\n }), n.push({\n v: e,\n d: o,\n a: r\n });\n } else r && n.push({\n d: e,\n a: r\n });\n return e;\n }\n return {\n e: e,\n u: using.bind(null, !1),\n a: using.bind(null, !0),\n d: function d() {\n var o,\n t = this.e,\n s = 0;\n function next() {\n for (; o = n.pop();) try {\n if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next);\n if (o.d) {\n var r = o.d.call(o.v);\n if (o.a) return s |= 2, Promise.resolve(r).then(next, err);\n } else s |= 1;\n } catch (r) {\n return err(r);\n }\n if (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve();\n if (t !== e) throw t;\n }\n function err(n) {\n return t = t !== e ? new r(n, t) : n, next();\n }\n return next();\n }\n };\n}\nmodule.exports = _usingCtx, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "function _OverloadYield(e, d) {\n this.v = e, this.k = d;\n}\nmodule.exports = _OverloadYield, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var OverloadYield = require(\"./OverloadYield.js\");\nfunction _awaitAsyncGenerator(e) {\n return new OverloadYield(e, 0);\n}\nmodule.exports = _awaitAsyncGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var OverloadYield = require(\"./OverloadYield.js\");\nfunction _wrapAsyncGenerator(e) {\n return function () {\n return new AsyncGenerator(e.apply(this, arguments));\n };\n}\nfunction AsyncGenerator(e) {\n var r, t;\n function resume(r, t) {\n try {\n var n = e[r](t),\n o = n.value,\n u = o instanceof OverloadYield;\n Promise.resolve(u ? o.v : o).then(function (t) {\n if (u) {\n var i = \"return\" === r ? \"return\" : \"next\";\n if (!o.k || t.done) return resume(i, t);\n t = e[i](t).value;\n }\n settle(n.done ? \"return\" : \"normal\", t);\n }, function (e) {\n resume(\"throw\", e);\n });\n } catch (e) {\n settle(\"throw\", e);\n }\n }\n function settle(e, n) {\n switch (e) {\n case \"return\":\n r.resolve({\n value: n,\n done: !0\n });\n break;\n case \"throw\":\n r.reject(n);\n break;\n default:\n r.resolve({\n value: n,\n done: !1\n });\n }\n (r = r.next) ? resume(r.key, r.arg) : t = null;\n }\n this._invoke = function (e, n) {\n return new Promise(function (o, u) {\n var i = {\n key: e,\n arg: n,\n resolve: o,\n reject: u,\n next: null\n };\n t ? t = t.next = i : (r = t = i, resume(e, n));\n });\n }, \"function\" != typeof e[\"return\"] && (this[\"return\"] = void 0);\n}\nAsyncGenerator.prototype[\"function\" == typeof Symbol && Symbol.asyncIterator || \"@@asyncIterator\"] = function () {\n return this;\n}, AsyncGenerator.prototype.next = function (e) {\n return this._invoke(\"next\", e);\n}, AsyncGenerator.prototype[\"throw\"] = function (e) {\n return this._invoke(\"throw\", e);\n}, AsyncGenerator.prototype[\"return\"] = function (e) {\n return this._invoke(\"return\", e);\n};\nmodule.exports = _wrapAsyncGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import { Unpromise } from '../../../vendor/unpromise';\nimport { throwAbortError } from '../../http/abortError';\nimport { makeAsyncResource } from './disposable';\nimport { disposablePromiseTimerResult, timerResource } from './timerResource';\n\nexport function iteratorResource(\n iterable: AsyncIterable,\n): AsyncIterator & AsyncDisposable {\n const iterator = iterable[Symbol.asyncIterator]();\n\n // @ts-expect-error - this is added in node 24 which we don't officially support yet\n // eslint-disable-next-line no-restricted-syntax\n if (iterator[Symbol.asyncDispose]) {\n return iterator as AsyncIterator & AsyncDisposable;\n }\n\n return makeAsyncResource(iterator, async () => {\n await iterator.return?.();\n });\n}\n\n/**\n * Derives a new {@link AsyncGenerator} based of {@link iterable}, that yields its first\n * {@link count} values. Then, a grace period of {@link gracePeriodMs} is started in which further\n * values may still come through. After this period, the generator aborts.\n */\nexport async function* takeWithGrace(\n iterable: AsyncIterable,\n opts: {\n count: number;\n gracePeriodMs: number;\n },\n): AsyncGenerator {\n await using iterator = iteratorResource(iterable);\n\n // declaration outside the loop for garbage collection reasons\n let result: null | IteratorResult | typeof disposablePromiseTimerResult;\n\n using timer = timerResource(opts.gracePeriodMs);\n\n let count = opts.count;\n\n let timerPromise = new Promise(() => {\n // never resolves\n });\n\n while (true) {\n result = await Unpromise.race([iterator.next(), timerPromise]);\n if (result === disposablePromiseTimerResult) {\n throwAbortError();\n }\n if (result.done) {\n return result.value;\n }\n yield result.value;\n if (--count === 0) {\n timerPromise = timer.start();\n }\n // free up reference for garbage collection\n result = null;\n }\n}\n", "/* eslint-disable @typescript-eslint/no-non-null-assertion */\nexport function createDeferred() {\n let resolve: (value: TValue) => void;\n let reject: (error: unknown) => void;\n const promise = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n return { promise, resolve: resolve!, reject: reject! };\n}\nexport type Deferred = ReturnType>;\n", "import { createDeferred } from './createDeferred';\nimport { makeAsyncResource } from './disposable';\n\ntype ManagedIteratorResult =\n | { status: 'yield'; value: TYield }\n | { status: 'return'; value: TReturn }\n | { status: 'error'; error: unknown };\nfunction createManagedIterator(\n iterable: AsyncIterable,\n onResult: (result: ManagedIteratorResult) => void,\n) {\n const iterator = iterable[Symbol.asyncIterator]();\n let state: 'idle' | 'pending' | 'done' = 'idle';\n\n function cleanup() {\n state = 'done';\n onResult = () => {\n // noop\n };\n }\n\n function pull() {\n if (state !== 'idle') {\n return;\n }\n state = 'pending';\n\n const next = iterator.next();\n next\n .then((result) => {\n if (result.done) {\n state = 'done';\n onResult({ status: 'return', value: result.value });\n cleanup();\n return;\n }\n state = 'idle';\n onResult({ status: 'yield', value: result.value });\n })\n .catch((cause) => {\n onResult({ status: 'error', error: cause });\n cleanup();\n });\n }\n\n return {\n pull,\n destroy: async () => {\n cleanup();\n await iterator.return?.();\n },\n };\n}\ntype ManagedIterator = ReturnType<\n typeof createManagedIterator\n>;\n\ninterface MergedAsyncIterables\n extends AsyncIterable {\n add(iterable: AsyncIterable): void;\n}\n\n/**\n * Creates a new async iterable that merges multiple async iterables into a single stream.\n * Values from the input iterables are yielded in the order they resolve, similar to Promise.race().\n *\n * New iterables can be added dynamically using the returned {@link MergedAsyncIterables.add} method, even after iteration has started.\n *\n * If any of the input iterables throws an error, that error will be propagated through the merged stream.\n * Other iterables will not continue to be processed.\n *\n * @template TYield The type of values yielded by the input iterables\n */\nexport function mergeAsyncIterables(): MergedAsyncIterables {\n let state: 'idle' | 'pending' | 'done' = 'idle';\n let flushSignal = createDeferred();\n\n /**\n * used while {@link state} is `idle`\n */\n const iterables: AsyncIterable[] = [];\n /**\n * used while {@link state} is `pending`\n */\n const iterators = new Set>();\n\n const buffer: Array<\n [\n iterator: ManagedIterator,\n result: Exclude<\n ManagedIteratorResult,\n { status: 'return' }\n >,\n ]\n > = [];\n\n function initIterable(iterable: AsyncIterable) {\n if (state !== 'pending') {\n // shouldn't happen\n return;\n }\n const iterator = createManagedIterator(iterable, (result) => {\n if (state !== 'pending') {\n // shouldn't happen\n return;\n }\n switch (result.status) {\n case 'yield':\n buffer.push([iterator, result]);\n break;\n case 'return':\n iterators.delete(iterator);\n break;\n case 'error':\n buffer.push([iterator, result]);\n iterators.delete(iterator);\n break;\n }\n flushSignal.resolve();\n });\n iterators.add(iterator);\n iterator.pull();\n }\n\n return {\n add(iterable: AsyncIterable) {\n switch (state) {\n case 'idle':\n iterables.push(iterable);\n break;\n case 'pending':\n initIterable(iterable);\n break;\n case 'done': {\n // shouldn't happen\n break;\n }\n }\n },\n async *[Symbol.asyncIterator]() {\n if (state !== 'idle') {\n throw new Error('Cannot iterate twice');\n }\n state = 'pending';\n\n await using _finally = makeAsyncResource({}, async () => {\n state = 'done';\n\n const errors: unknown[] = [];\n await Promise.all(\n Array.from(iterators.values()).map(async (it) => {\n try {\n await it.destroy();\n } catch (cause) {\n errors.push(cause);\n }\n }),\n );\n buffer.length = 0;\n iterators.clear();\n flushSignal.resolve();\n\n if (errors.length > 0) {\n throw new AggregateError(errors);\n }\n });\n\n while (iterables.length > 0) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n initIterable(iterables.shift()!);\n }\n\n while (iterators.size > 0) {\n await flushSignal.promise;\n\n while (buffer.length > 0) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const [iterator, result] = buffer.shift()!;\n\n switch (result.status) {\n case 'yield':\n yield result.value;\n iterator.pull();\n break;\n case 'error':\n throw result.error;\n }\n }\n flushSignal = createDeferred();\n }\n },\n };\n}\n", "/**\n * Creates a ReadableStream from an AsyncIterable.\n *\n * @param iterable - The source AsyncIterable to stream from\n * @returns A ReadableStream that yields values from the AsyncIterable\n */\nexport function readableStreamFrom(\n iterable: AsyncIterable,\n): ReadableStream {\n const iterator = iterable[Symbol.asyncIterator]();\n\n return new ReadableStream({\n async cancel() {\n await iterator.return?.();\n },\n\n async pull(controller) {\n const result = await iterator.next();\n\n if (result.done) {\n controller.close();\n return;\n }\n\n controller.enqueue(result.value);\n },\n });\n}\n", "import { Unpromise } from '../../../vendor/unpromise';\nimport { iteratorResource } from './asyncIterable';\nimport { disposablePromiseTimerResult, timerResource } from './timerResource';\n\nexport const PING_SYM = Symbol('ping');\n\n/**\n * Derives a new {@link AsyncGenerator} based of {@link iterable}, that yields {@link PING_SYM}\n * whenever no value has been yielded for {@link pingIntervalMs}.\n */\nexport async function* withPing(\n iterable: AsyncIterable,\n pingIntervalMs: number,\n): AsyncGenerator {\n await using iterator = iteratorResource(iterable);\n\n // declaration outside the loop for garbage collection reasons\n let result:\n | null\n | IteratorResult\n | typeof disposablePromiseTimerResult;\n\n let nextPromise = iterator.next();\n\n while (true) {\n using pingPromise = timerResource(pingIntervalMs);\n\n result = await Unpromise.race([nextPromise, pingPromise.start()]);\n\n if (result === disposablePromiseTimerResult) {\n // cancelled\n\n yield PING_SYM;\n continue;\n }\n\n if (result.done) {\n return result.value;\n }\n\n nextPromise = iterator.next();\n yield result.value;\n\n // free up reference for garbage collection\n result = null;\n }\n}\n", "function _asyncIterator(r) {\n var n,\n t,\n o,\n e = 2;\n for (\"undefined\" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) {\n if (t && null != (n = r[t])) return n.call(r);\n if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r));\n t = \"@@asyncIterator\", o = \"@@iterator\";\n }\n throw new TypeError(\"Object is not async iterable\");\n}\nfunction AsyncFromSyncIterator(r) {\n function AsyncFromSyncIteratorContinuation(r) {\n if (Object(r) !== r) return Promise.reject(new TypeError(r + \" is not an object.\"));\n var n = r.done;\n return Promise.resolve(r.value).then(function (r) {\n return {\n value: r,\n done: n\n };\n });\n }\n return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) {\n this.s = r, this.n = r.next;\n }, AsyncFromSyncIterator.prototype = {\n s: null,\n n: null,\n next: function next() {\n return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));\n },\n \"return\": function _return(r) {\n var n = this.s[\"return\"];\n return void 0 === n ? Promise.resolve({\n value: r,\n done: !0\n }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));\n },\n \"throw\": function _throw(r) {\n var n = this.s[\"return\"];\n return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));\n }\n }, new AsyncFromSyncIterator(r);\n}\nmodule.exports = _asyncIterator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import { isPlainObject } from '@trpc/server/vendor/is-plain-object';\nimport {\n emptyObject,\n isAsyncIterable,\n isFunction,\n isObject,\n run,\n} from '../utils';\nimport { iteratorResource } from './utils/asyncIterable';\nimport type { Deferred } from './utils/createDeferred';\nimport { createDeferred } from './utils/createDeferred';\nimport { makeResource } from './utils/disposable';\nimport { mergeAsyncIterables } from './utils/mergeAsyncIterables';\nimport { readableStreamFrom } from './utils/readableStreamFrom';\nimport { PING_SYM, withPing } from './utils/withPing';\n\n/**\n * A subset of the standard ReadableStream properties needed by tRPC internally.\n * @see ReadableStream from lib.dom.d.ts\n */\nexport type WebReadableStreamEsque = {\n getReader: () => ReadableStreamDefaultReader;\n};\n\nexport type NodeJSReadableStreamEsque = {\n on(\n eventName: string | symbol,\n listener: (...args: any[]) => void,\n ): NodeJSReadableStreamEsque;\n};\n\n// ---------- types\nconst CHUNK_VALUE_TYPE_PROMISE = 0;\ntype CHUNK_VALUE_TYPE_PROMISE = typeof CHUNK_VALUE_TYPE_PROMISE;\nconst CHUNK_VALUE_TYPE_ASYNC_ITERABLE = 1;\ntype CHUNK_VALUE_TYPE_ASYNC_ITERABLE = typeof CHUNK_VALUE_TYPE_ASYNC_ITERABLE;\n\nconst PROMISE_STATUS_FULFILLED = 0;\ntype PROMISE_STATUS_FULFILLED = typeof PROMISE_STATUS_FULFILLED;\nconst PROMISE_STATUS_REJECTED = 1;\ntype PROMISE_STATUS_REJECTED = typeof PROMISE_STATUS_REJECTED;\n\nconst ASYNC_ITERABLE_STATUS_RETURN = 0;\ntype ASYNC_ITERABLE_STATUS_RETURN = typeof ASYNC_ITERABLE_STATUS_RETURN;\nconst ASYNC_ITERABLE_STATUS_YIELD = 1;\ntype ASYNC_ITERABLE_STATUS_YIELD = typeof ASYNC_ITERABLE_STATUS_YIELD;\nconst ASYNC_ITERABLE_STATUS_ERROR = 2;\ntype ASYNC_ITERABLE_STATUS_ERROR = typeof ASYNC_ITERABLE_STATUS_ERROR;\n\ntype ChunkDefinitionKey =\n // root should be replaced\n | null\n // at array path\n | number\n // at key path\n | string;\n\ntype ChunkIndex = number & { __chunkIndex: true };\ntype ChunkValueType =\n | CHUNK_VALUE_TYPE_PROMISE\n | CHUNK_VALUE_TYPE_ASYNC_ITERABLE;\ntype ChunkDefinition = [\n key: ChunkDefinitionKey,\n type: ChunkValueType,\n chunkId: ChunkIndex,\n];\ntype EncodedValue = [\n // data\n [unknown] | [],\n // chunk descriptions\n ...ChunkDefinition[],\n];\n\ntype Head = Record;\ntype PromiseChunk =\n | [\n chunkIndex: ChunkIndex,\n status: PROMISE_STATUS_FULFILLED,\n value: EncodedValue,\n ]\n | [chunkIndex: ChunkIndex, status: PROMISE_STATUS_REJECTED, error: unknown];\ntype IterableChunk =\n | [\n chunkIndex: ChunkIndex,\n status: ASYNC_ITERABLE_STATUS_RETURN,\n value: EncodedValue,\n ]\n | [\n chunkIndex: ChunkIndex,\n status: ASYNC_ITERABLE_STATUS_YIELD,\n value: EncodedValue,\n ]\n | [\n chunkIndex: ChunkIndex,\n status: ASYNC_ITERABLE_STATUS_ERROR,\n error: unknown,\n ];\ntype ChunkData = PromiseChunk | IterableChunk;\ntype PlaceholderValue = 0 & { __placeholder: true };\nexport function isPromise(value: unknown): value is Promise {\n return (\n (isObject(value) || isFunction(value)) &&\n typeof value?.['then'] === 'function' &&\n typeof value?.['catch'] === 'function'\n );\n}\n\ntype Serialize = (value: any) => any;\ntype Deserialize = (value: any) => any;\n\ntype PathArray = readonly (string | number)[];\nexport type ProducerOnError = (opts: {\n error: unknown;\n path: PathArray;\n}) => void;\nexport interface JSONLProducerOptions {\n serialize?: Serialize;\n data: Record | unknown[];\n onError?: ProducerOnError;\n formatError?: (opts: { error: unknown; path: PathArray }) => unknown;\n maxDepth?: number;\n /**\n * Interval in milliseconds to send a ping to the client to keep the connection alive\n * This will be sent as a whitespace character\n * @default undefined\n */\n pingMs?: number;\n}\n\nclass MaxDepthError extends Error {\n constructor(public path: (string | number)[]) {\n super('Max depth reached at path: ' + path.join('.'));\n }\n}\n\nasync function* createBatchStreamProducer(\n opts: JSONLProducerOptions,\n): AsyncIterable {\n const { data } = opts;\n let counter = 0 as ChunkIndex;\n const placeholder = 0 as PlaceholderValue;\n\n const mergedIterables = mergeAsyncIterables();\n function registerAsync(\n callback: (idx: ChunkIndex) => AsyncIterable,\n ) {\n const idx = counter++ as ChunkIndex;\n\n const iterable = callback(idx);\n mergedIterables.add(iterable);\n\n return idx;\n }\n\n function encodePromise(promise: Promise, path: (string | number)[]) {\n return registerAsync(async function* (idx) {\n const error = checkMaxDepth(path);\n if (error) {\n // Catch any errors from the original promise to ensure they're reported\n promise.catch((cause) => {\n opts.onError?.({ error: cause, path });\n });\n // Replace the promise with a rejected one containing the max depth error\n promise = Promise.reject(error);\n }\n try {\n const next = await promise;\n yield [idx, PROMISE_STATUS_FULFILLED, encode(next, path)];\n } catch (cause) {\n opts.onError?.({ error: cause, path });\n yield [\n idx,\n PROMISE_STATUS_REJECTED,\n opts.formatError?.({ error: cause, path }),\n ];\n }\n });\n }\n function encodeAsyncIterable(\n iterable: AsyncIterable,\n path: (string | number)[],\n ) {\n return registerAsync(async function* (idx) {\n const error = checkMaxDepth(path);\n if (error) {\n throw error;\n }\n await using iterator = iteratorResource(iterable);\n\n try {\n while (true) {\n const next = await iterator.next();\n if (next.done) {\n yield [idx, ASYNC_ITERABLE_STATUS_RETURN, encode(next.value, path)];\n break;\n }\n yield [idx, ASYNC_ITERABLE_STATUS_YIELD, encode(next.value, path)];\n }\n } catch (cause) {\n opts.onError?.({ error: cause, path });\n\n yield [\n idx,\n ASYNC_ITERABLE_STATUS_ERROR,\n opts.formatError?.({ error: cause, path }),\n ];\n }\n });\n }\n function checkMaxDepth(path: (string | number)[]) {\n if (opts.maxDepth && path.length > opts.maxDepth) {\n return new MaxDepthError(path);\n }\n return null;\n }\n function encodeAsync(\n value: unknown,\n path: (string | number)[],\n ): null | [type: ChunkValueType, chunkId: ChunkIndex] {\n if (isPromise(value)) {\n return [CHUNK_VALUE_TYPE_PROMISE, encodePromise(value, path)];\n }\n if (isAsyncIterable(value)) {\n if (opts.maxDepth && path.length >= opts.maxDepth) {\n throw new Error('Max depth reached');\n }\n return [\n CHUNK_VALUE_TYPE_ASYNC_ITERABLE,\n encodeAsyncIterable(value, path),\n ];\n }\n return null;\n }\n function encode(value: unknown, path: (string | number)[]): EncodedValue {\n if (value === undefined) {\n return [[]];\n }\n const reg = encodeAsync(value, path);\n if (reg) {\n return [[placeholder], [null, ...reg]];\n }\n\n if (!isPlainObject(value)) {\n return [[value]];\n }\n\n const newObj: Record = emptyObject();\n const asyncValues: ChunkDefinition[] = [];\n for (const [key, item] of Object.entries(value)) {\n const transformed = encodeAsync(item, [...path, key]);\n if (!transformed) {\n newObj[key] = item;\n continue;\n }\n newObj[key] = placeholder;\n asyncValues.push([key, ...transformed]);\n }\n return [[newObj], ...asyncValues];\n }\n\n const newHead: Head = emptyObject();\n for (const [key, item] of Object.entries(data)) {\n newHead[key] = encode(item, [key]);\n }\n\n yield newHead;\n\n let iterable: AsyncIterable =\n mergedIterables;\n if (opts.pingMs) {\n iterable = withPing(mergedIterables, opts.pingMs);\n }\n\n for await (const value of iterable) {\n yield value;\n }\n}\n/**\n * JSON Lines stream producer\n * @see https://jsonlines.org/\n */\nexport function jsonlStreamProducer(opts: JSONLProducerOptions) {\n let stream = readableStreamFrom(createBatchStreamProducer(opts));\n\n const { serialize } = opts;\n if (serialize) {\n stream = stream.pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n if (chunk === PING_SYM) {\n controller.enqueue(PING_SYM);\n } else {\n controller.enqueue(serialize(chunk));\n }\n },\n }),\n );\n }\n\n return stream\n .pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n if (chunk === PING_SYM) {\n controller.enqueue(' ');\n } else {\n controller.enqueue(JSON.stringify(chunk) + '\\n');\n }\n },\n }),\n )\n .pipeThrough(new TextEncoderStream());\n}\n\nclass AsyncError extends Error {\n constructor(public readonly data: unknown) {\n super('Received error from server');\n }\n}\nexport type ConsumerOnError = (opts: { error: unknown }) => void;\n\nconst nodeJsStreamToReaderEsque = (source: NodeJSReadableStreamEsque) => {\n return {\n getReader() {\n const stream = new ReadableStream({\n start(controller) {\n source.on('data', (chunk) => {\n controller.enqueue(chunk);\n });\n source.on('end', () => {\n controller.close();\n });\n source.on('error', (error) => {\n controller.error(error);\n });\n },\n });\n return stream.getReader();\n },\n };\n};\n\nfunction createLineAccumulator(\n from: NodeJSReadableStreamEsque | WebReadableStreamEsque,\n) {\n const reader =\n 'getReader' in from\n ? from.getReader()\n : nodeJsStreamToReaderEsque(from).getReader();\n\n let lineAggregate = '';\n\n return new ReadableStream({\n async pull(controller) {\n const { done, value } = await reader.read();\n\n if (done) {\n controller.close();\n } else {\n controller.enqueue(value);\n }\n },\n cancel() {\n return reader.cancel();\n },\n })\n .pipeThrough(new TextDecoderStream())\n .pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n lineAggregate += chunk;\n const parts = lineAggregate.split('\\n');\n lineAggregate = parts.pop() ?? '';\n for (const part of parts) {\n controller.enqueue(part);\n }\n },\n }),\n );\n}\nfunction createConsumerStream(\n from: NodeJSReadableStreamEsque | WebReadableStreamEsque,\n) {\n const stream = createLineAccumulator(from);\n\n let sentHead = false;\n return stream.pipeThrough(\n new TransformStream({\n transform(line, controller) {\n if (!sentHead) {\n const head = JSON.parse(line);\n controller.enqueue(head as THead);\n sentHead = true;\n } else {\n const chunk: ChunkData = JSON.parse(line);\n controller.enqueue(chunk);\n }\n },\n }),\n );\n}\n\n/**\n * Creates a handler for managing stream controllers and their lifecycle\n */\nfunction createStreamsManager(abortController: AbortController) {\n const controllerMap = new Map<\n ChunkIndex,\n ReturnType\n >();\n\n /**\n * Checks if there are no pending controllers or deferred promises\n */\n function isEmpty() {\n return Array.from(controllerMap.values()).every((c) => c.closed);\n }\n\n /**\n * Creates a stream controller\n */\n function createStreamController() {\n let originalController: ReadableStreamDefaultController;\n const stream = new ReadableStream({\n start(controller) {\n originalController = controller;\n },\n });\n\n const streamController = {\n enqueue: (v: ChunkData) => originalController.enqueue(v),\n close: () => {\n originalController.close();\n\n clear();\n\n if (isEmpty()) {\n abortController.abort();\n }\n },\n closed: false,\n getReaderResource: () => {\n const reader = stream.getReader();\n\n return makeResource(reader, () => {\n streamController.close();\n reader.releaseLock();\n });\n },\n error: (reason: unknown) => {\n originalController.error(reason);\n\n clear();\n },\n };\n function clear() {\n Object.assign(streamController, {\n closed: true,\n close: () => {\n // noop\n },\n enqueue: () => {\n // noop\n },\n getReaderResource: null,\n error: () => {\n // noop\n },\n });\n }\n\n return streamController;\n }\n\n /**\n * Gets or creates a stream controller\n */\n function getOrCreate(chunkId: ChunkIndex) {\n let c = controllerMap.get(chunkId);\n if (!c) {\n c = createStreamController();\n controllerMap.set(chunkId, c);\n }\n return c;\n }\n\n /**\n * Cancels all pending controllers and rejects deferred promises\n */\n function cancelAll(reason: unknown) {\n for (const controller of controllerMap.values()) {\n controller.error(reason);\n }\n }\n\n return {\n getOrCreate,\n cancelAll,\n };\n}\n\n/**\n * JSON Lines stream consumer\n * @see https://jsonlines.org/\n */\nexport async function jsonlStreamConsumer(opts: {\n from: NodeJSReadableStreamEsque | WebReadableStreamEsque;\n deserialize?: Deserialize;\n onError?: ConsumerOnError;\n formatError?: (opts: { error: unknown }) => Error;\n /**\n * This `AbortController` will be triggered when there are no more listeners to the stream.\n */\n abortController: AbortController;\n}) {\n const { deserialize = (v) => v } = opts;\n\n let source = createConsumerStream(opts.from);\n if (deserialize) {\n source = source.pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n controller.enqueue(deserialize(chunk));\n },\n }),\n );\n }\n let headDeferred: null | Deferred = createDeferred();\n\n const streamManager = createStreamsManager(opts.abortController);\n\n function decodeChunkDefinition(value: ChunkDefinition) {\n const [_path, type, chunkId] = value;\n\n const controller = streamManager.getOrCreate(chunkId);\n\n switch (type) {\n case CHUNK_VALUE_TYPE_PROMISE: {\n return run(async () => {\n using reader = controller.getReaderResource();\n\n const { value } = await reader.read();\n const [_chunkId, status, data] = value as PromiseChunk;\n switch (status) {\n case PROMISE_STATUS_FULFILLED:\n return decode(data);\n case PROMISE_STATUS_REJECTED:\n throw opts.formatError?.({ error: data }) ?? new AsyncError(data);\n }\n });\n }\n case CHUNK_VALUE_TYPE_ASYNC_ITERABLE: {\n return run(async function* () {\n using reader = controller.getReaderResource();\n\n while (true) {\n const { value } = await reader.read();\n\n const [_chunkId, status, data] = value as IterableChunk;\n\n switch (status) {\n case ASYNC_ITERABLE_STATUS_YIELD:\n yield decode(data);\n break;\n case ASYNC_ITERABLE_STATUS_RETURN:\n return decode(data);\n case ASYNC_ITERABLE_STATUS_ERROR:\n throw (\n opts.formatError?.({ error: data }) ?? new AsyncError(data)\n );\n }\n }\n });\n }\n }\n }\n\n function decode(value: EncodedValue): unknown {\n const [[data], ...asyncProps] = value;\n\n for (const value of asyncProps) {\n const [key] = value;\n const decoded = decodeChunkDefinition(value);\n\n if (key === null) {\n return decoded;\n }\n\n (data as any)[key] = decoded;\n }\n return data;\n }\n\n const closeOrAbort = (reason?: unknown) => {\n headDeferred?.reject(reason);\n streamManager.cancelAll(reason);\n };\n\n source\n .pipeTo(\n new WritableStream({\n write(chunkOrHead) {\n if (headDeferred) {\n const head = chunkOrHead as Record;\n\n for (const [key, value] of Object.entries(chunkOrHead)) {\n const parsed = decode(value as any);\n head[key] = parsed;\n }\n headDeferred.resolve(head as THead);\n headDeferred = null;\n\n return;\n }\n const chunk = chunkOrHead as ChunkData;\n const [idx] = chunk;\n\n const controller = streamManager.getOrCreate(idx);\n controller.enqueue(chunk);\n },\n close: closeOrAbort,\n abort: closeOrAbort,\n }),\n )\n .catch((error) => {\n opts.onError?.({ error });\n closeOrAbort(error);\n });\n\n return [await headDeferred.promise] as const;\n}\n", "var OverloadYield = require(\"./OverloadYield.js\");\nfunction _asyncGeneratorDelegate(t) {\n var e = {},\n n = !1;\n function pump(e, r) {\n return n = !0, r = new Promise(function (n) {\n n(t[e](r));\n }), {\n done: !1,\n value: new OverloadYield(r, 1)\n };\n }\n return e[\"undefined\" != typeof Symbol && Symbol.iterator || \"@@iterator\"] = function () {\n return this;\n }, e.next = function (t) {\n return n ? (n = !1, t) : pump(\"next\", t);\n }, \"function\" == typeof t[\"throw\"] && (e[\"throw\"] = function (t) {\n if (n) throw n = !1, t;\n return pump(\"throw\", t);\n }), \"function\" == typeof t[\"return\"] && (e[\"return\"] = function (t) {\n return n ? (n = !1, t) : pump(\"return\", t);\n }), e;\n}\nmodule.exports = _asyncGeneratorDelegate, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import { Unpromise } from '../../vendor/unpromise';\nimport { getTRPCErrorFromUnknown } from '../error/TRPCError';\nimport { isAbortError } from '../http/abortError';\nimport type { MaybePromise } from '../types';\nimport { emptyObject, identity, run } from '../utils';\nimport type { EventSourceLike } from './sse.types';\nimport type { inferTrackedOutput } from './tracked';\nimport { isTrackedEnvelope } from './tracked';\nimport { takeWithGrace } from './utils/asyncIterable';\nimport { makeAsyncResource } from './utils/disposable';\nimport { readableStreamFrom } from './utils/readableStreamFrom';\nimport {\n disposablePromiseTimerResult,\n timerResource,\n} from './utils/timerResource';\nimport { PING_SYM, withPing } from './utils/withPing';\n\ntype Serialize = (value: any) => any;\ntype Deserialize = (value: any) => any;\n\n/**\n * @internal\n */\nexport interface SSEPingOptions {\n /**\n * Enable ping comments sent from the server\n * @default false\n */\n enabled: boolean;\n /**\n * Interval in milliseconds\n * @default 1000\n */\n intervalMs?: number;\n}\n\nexport interface SSEClientOptions {\n /**\n * Timeout and reconnect after inactivity in milliseconds\n * @default undefined\n */\n reconnectAfterInactivityMs?: number;\n}\n\nexport interface SSEStreamProducerOptions {\n serialize?: Serialize;\n data: AsyncIterable;\n\n maxDepth?: number;\n ping?: SSEPingOptions;\n /**\n * Maximum duration in milliseconds for the request before ending the stream\n * @default undefined\n */\n maxDurationMs?: number;\n /**\n * End the request immediately after data is sent\n * Only useful for serverless runtimes that do not support streaming responses\n * @default false\n */\n emitAndEndImmediately?: boolean;\n formatError?: (opts: { error: unknown }) => unknown;\n /**\n * Client-specific options - these will be sent to the client as part of the first message\n * @default {}\n */\n client?: SSEClientOptions;\n}\n\nconst PING_EVENT = 'ping';\nconst SERIALIZED_ERROR_EVENT = 'serialized-error';\nconst CONNECTED_EVENT = 'connected';\nconst RETURN_EVENT = 'return';\n\ninterface SSEvent {\n id?: string;\n data: unknown;\n comment?: string;\n event?: string;\n}\n/**\n *\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html\n */\nexport function sseStreamProducer(\n opts: SSEStreamProducerOptions,\n) {\n const { serialize = identity } = opts;\n\n const ping: Required = {\n enabled: opts.ping?.enabled ?? false,\n intervalMs: opts.ping?.intervalMs ?? 1000,\n };\n const client: SSEClientOptions = opts.client ?? {};\n\n if (\n ping.enabled &&\n client.reconnectAfterInactivityMs &&\n ping.intervalMs > client.reconnectAfterInactivityMs\n ) {\n throw new Error(\n `Ping interval must be less than client reconnect interval to prevent unnecessary reconnection - ping.intervalMs: ${ping.intervalMs} client.reconnectAfterInactivityMs: ${client.reconnectAfterInactivityMs}`,\n );\n }\n\n async function* generator(): AsyncIterable {\n yield {\n event: CONNECTED_EVENT,\n data: JSON.stringify(client),\n };\n\n type TIteratorValue = Awaited | typeof PING_SYM;\n\n let iterable: AsyncIterable = opts.data;\n\n if (opts.emitAndEndImmediately) {\n iterable = takeWithGrace(iterable, {\n count: 1,\n gracePeriodMs: 1,\n });\n }\n\n if (ping.enabled && ping.intervalMs !== Infinity && ping.intervalMs > 0) {\n iterable = withPing(iterable, ping.intervalMs);\n }\n\n // We need those declarations outside the loop for garbage collection reasons. If they were\n // declared inside, they would not be freed until the next value is present.\n let value: null | TIteratorValue;\n let chunk: null | SSEvent;\n\n for await (value of iterable) {\n if (value === PING_SYM) {\n yield { event: PING_EVENT, data: '' };\n continue;\n }\n\n chunk = isTrackedEnvelope(value)\n ? { id: value[0], data: value[1] }\n : { data: value };\n\n chunk.data = JSON.stringify(serialize(chunk.data));\n\n yield chunk;\n\n // free up references for garbage collection\n value = null;\n chunk = null;\n }\n }\n\n async function* generatorWithErrorHandling(): AsyncIterable {\n try {\n yield* generator();\n\n yield {\n event: RETURN_EVENT,\n data: '',\n };\n } catch (cause) {\n if (isAbortError(cause)) {\n // ignore abort errors, send any other errors\n return;\n }\n // `err` must be caused by `opts.data`, `JSON.stringify` or `serialize`.\n // So, a user error in any case.\n const error = getTRPCErrorFromUnknown(cause);\n const data = opts.formatError?.({ error }) ?? null;\n yield {\n event: SERIALIZED_ERROR_EVENT,\n data: JSON.stringify(serialize(data)),\n };\n }\n }\n\n const stream = readableStreamFrom(generatorWithErrorHandling());\n\n return stream\n .pipeThrough(\n new TransformStream({\n transform(chunk, controller: TransformStreamDefaultController) {\n if ('event' in chunk) {\n controller.enqueue(`event: ${chunk.event}\\n`);\n }\n if ('data' in chunk) {\n controller.enqueue(`data: ${chunk.data}\\n`);\n }\n if ('id' in chunk) {\n controller.enqueue(`id: ${chunk.id}\\n`);\n }\n if ('comment' in chunk) {\n controller.enqueue(`: ${chunk.comment}\\n`);\n }\n controller.enqueue('\\n\\n');\n },\n }),\n )\n .pipeThrough(new TextEncoderStream());\n}\n\ninterface ConsumerStreamResultBase {\n eventSource: InstanceType | null;\n}\n\ninterface ConsumerStreamResultData\n extends ConsumerStreamResultBase {\n type: 'data';\n data: inferTrackedOutput;\n}\n\ninterface ConsumerStreamResultError\n extends ConsumerStreamResultBase {\n type: 'serialized-error';\n error: TConfig['error'];\n}\n\ninterface ConsumerStreamResultConnecting\n extends ConsumerStreamResultBase {\n type: 'connecting';\n event: EventSourceLike.EventOf | null;\n}\ninterface ConsumerStreamResultTimeout\n extends ConsumerStreamResultBase {\n type: 'timeout';\n ms: number;\n}\ninterface ConsumerStreamResultPing\n extends ConsumerStreamResultBase {\n type: 'ping';\n}\n\ninterface ConsumerStreamResultConnected\n extends ConsumerStreamResultBase {\n type: 'connected';\n options: SSEClientOptions;\n}\n\ntype ConsumerStreamResult =\n | ConsumerStreamResultData\n | ConsumerStreamResultError\n | ConsumerStreamResultConnecting\n | ConsumerStreamResultTimeout\n | ConsumerStreamResultPing\n | ConsumerStreamResultConnected;\n\nexport interface SSEStreamConsumerOptions {\n url: () => MaybePromise;\n init: () =>\n | MaybePromise>\n | undefined;\n signal: AbortSignal;\n deserialize?: Deserialize;\n EventSource: TConfig['EventSource'];\n}\n\ninterface ConsumerConfig {\n data: unknown;\n error: unknown;\n EventSource: EventSourceLike.AnyConstructor;\n}\n\nasync function withTimeout(opts: {\n promise: Promise;\n timeoutMs: number;\n onTimeout: () => Promise>;\n}): Promise {\n using timeoutPromise = timerResource(opts.timeoutMs);\n const res = await Unpromise.race([opts.promise, timeoutPromise.start()]);\n\n if (res === disposablePromiseTimerResult) {\n return await opts.onTimeout();\n }\n return res;\n}\n\n/**\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html\n */\nexport function sseStreamConsumer(\n opts: SSEStreamConsumerOptions,\n): AsyncIterable> {\n const { deserialize = (v) => v } = opts;\n\n let clientOptions: SSEClientOptions = emptyObject();\n\n const signal = opts.signal;\n\n let _es: InstanceType | null = null;\n\n const createStream = () =>\n new ReadableStream>({\n async start(controller) {\n const [url, init] = await Promise.all([opts.url(), opts.init()]);\n const eventSource = (_es = new opts.EventSource(\n url,\n init,\n ) as InstanceType);\n\n controller.enqueue({\n type: 'connecting',\n eventSource: _es,\n event: null,\n });\n\n eventSource.addEventListener(CONNECTED_EVENT, (_msg) => {\n const msg = _msg as EventSourceLike.MessageEvent;\n\n const options: SSEClientOptions = JSON.parse(msg.data);\n\n clientOptions = options;\n controller.enqueue({\n type: 'connected',\n options,\n eventSource,\n });\n });\n\n eventSource.addEventListener(SERIALIZED_ERROR_EVENT, (_msg) => {\n const msg = _msg as EventSourceLike.MessageEvent;\n\n controller.enqueue({\n type: 'serialized-error',\n error: deserialize(JSON.parse(msg.data)),\n eventSource,\n });\n });\n eventSource.addEventListener(PING_EVENT, () => {\n controller.enqueue({\n type: 'ping',\n eventSource,\n });\n });\n eventSource.addEventListener(RETURN_EVENT, () => {\n eventSource.close();\n controller.close();\n _es = null;\n });\n eventSource.addEventListener('error', (event) => {\n if (eventSource.readyState === eventSource.CLOSED) {\n controller.error(event);\n } else {\n controller.enqueue({\n type: 'connecting',\n eventSource,\n event,\n });\n }\n });\n eventSource.addEventListener('message', (_msg) => {\n const msg = _msg as EventSourceLike.MessageEvent;\n\n const chunk = deserialize(JSON.parse(msg.data));\n\n const def: SSEvent = {\n data: chunk,\n };\n if (msg.lastEventId) {\n def.id = msg.lastEventId;\n }\n controller.enqueue({\n type: 'data',\n data: def as inferTrackedOutput,\n eventSource,\n });\n });\n\n const onAbort = () => {\n try {\n eventSource.close();\n controller.close();\n } catch {\n // ignore errors in case the controller is already closed\n }\n };\n if (signal.aborted) {\n onAbort();\n } else {\n signal.addEventListener('abort', onAbort);\n }\n },\n cancel() {\n _es?.close();\n },\n });\n\n const getStreamResource = () => {\n let stream = createStream();\n let reader = stream.getReader();\n\n async function dispose() {\n await reader.cancel();\n _es = null;\n }\n\n return makeAsyncResource(\n {\n read() {\n return reader.read();\n },\n async recreate() {\n await dispose();\n\n stream = createStream();\n reader = stream.getReader();\n },\n },\n dispose,\n );\n };\n\n return run(async function* () {\n await using stream = getStreamResource();\n\n while (true) {\n let promise = stream.read();\n\n const timeoutMs = clientOptions.reconnectAfterInactivityMs;\n if (timeoutMs) {\n promise = withTimeout({\n promise,\n timeoutMs,\n onTimeout: async () => {\n const res: Awaited = {\n value: {\n type: 'timeout',\n ms: timeoutMs,\n eventSource: _es,\n },\n done: false,\n };\n // Close and release old reader\n await stream.recreate();\n\n return res;\n },\n });\n }\n\n const result = await promise;\n\n if (result.done) {\n return result.value;\n }\n yield result.value;\n }\n });\n}\n\nexport const sseHeaders = {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache, no-transform',\n 'X-Accel-Buffering': 'no',\n Connection: 'keep-alive',\n} as const;\n", "/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport {\n isObservable,\n observableToAsyncIterable,\n} from '../../observable/observable';\nimport { getErrorShape } from '../error/getErrorShape';\nimport { getTRPCErrorFromUnknown, TRPCError } from '../error/TRPCError';\nimport type { ProcedureType } from '../procedure';\nimport {\n type AnyRouter,\n type inferRouterContext,\n type inferRouterError,\n} from '../router';\nimport type { TRPCResponse } from '../rpc';\nimport { isPromise, jsonlStreamProducer } from '../stream/jsonl';\nimport { sseHeaders, sseStreamProducer } from '../stream/sse';\nimport { transformTRPCResponse } from '../transformer';\nimport {\n abortSignalsAnyPonyfill,\n isAsyncIterable,\n isObject,\n run,\n} from '../utils';\nimport { getAcceptHeader, getRequestInfo } from './contentType';\nimport { getHTTPStatusCode } from './getHTTPStatusCode';\nimport type {\n HTTPBaseHandlerOptions,\n ResolveHTTPRequestOptionsContextFn,\n TRPCRequestInfo,\n} from './types';\n\nfunction errorToAsyncIterable(err: TRPCError): AsyncIterable {\n return run(async function* () {\n throw err;\n });\n}\ntype HTTPMethods =\n | 'GET'\n | 'POST'\n | 'HEAD'\n | 'OPTIONS'\n | 'PUT'\n | 'DELETE'\n | 'PATCH';\n\nfunction combinedAbortController(signal: AbortSignal) {\n const controller = new AbortController();\n const combinedSignal = abortSignalsAnyPonyfill([signal, controller.signal]);\n return {\n signal: combinedSignal,\n controller,\n };\n}\n\nconst TYPE_ACCEPTED_METHOD_MAP: Record = {\n mutation: ['POST'],\n query: ['GET'],\n subscription: ['GET'],\n};\nconst TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE: Record<\n ProcedureType,\n HTTPMethods[]\n> = {\n // never allow GET to do a mutation\n mutation: ['POST'],\n query: ['GET', 'POST'],\n subscription: ['GET', 'POST'],\n};\n\ninterface ResolveHTTPRequestOptions\n extends HTTPBaseHandlerOptions {\n createContext: ResolveHTTPRequestOptionsContextFn;\n req: Request;\n path: string;\n /**\n * If the request had an issue before reaching the handler\n */\n error: TRPCError | null;\n}\n\nfunction initResponse(initOpts: {\n ctx: inferRouterContext | undefined;\n info: TRPCRequestInfo | undefined;\n responseMeta?: HTTPBaseHandlerOptions['responseMeta'];\n untransformedJSON:\n | TRPCResponse>\n | TRPCResponse>[]\n | null;\n errors: TRPCError[];\n headers: Headers;\n}) {\n const {\n ctx,\n info,\n responseMeta,\n untransformedJSON,\n errors = [],\n headers,\n } = initOpts;\n\n let status = untransformedJSON ? getHTTPStatusCode(untransformedJSON) : 200;\n\n const eagerGeneration = !untransformedJSON;\n const data = eagerGeneration\n ? []\n : Array.isArray(untransformedJSON)\n ? untransformedJSON\n : [untransformedJSON];\n\n const meta =\n responseMeta?.({\n ctx,\n info,\n paths: info?.calls.map((call) => call.path),\n data,\n errors,\n eagerGeneration,\n type:\n info?.calls.find((call) => call.procedure?._def.type)?.procedure?._def\n .type ?? 'unknown',\n }) ?? {};\n\n if (meta.headers) {\n if (meta.headers instanceof Headers) {\n for (const [key, value] of meta.headers.entries()) {\n headers.append(key, value);\n }\n } else {\n /**\n * @deprecated, delete in v12\n */\n for (const [key, value] of Object.entries(meta.headers)) {\n if (Array.isArray(value)) {\n for (const v of value) {\n headers.append(key, v);\n }\n } else if (typeof value === 'string') {\n headers.set(key, value);\n }\n }\n }\n }\n if (meta.status) {\n status = meta.status;\n }\n\n return {\n status,\n };\n}\n\nfunction caughtErrorToData(\n cause: unknown,\n errorOpts: {\n opts: Pick<\n ResolveHTTPRequestOptions,\n 'onError' | 'req' | 'router'\n >;\n ctx: inferRouterContext | undefined;\n type: ProcedureType | 'unknown';\n path?: string;\n input?: unknown;\n },\n) {\n const { router, req, onError } = errorOpts.opts;\n const error = getTRPCErrorFromUnknown(cause);\n onError?.({\n error,\n path: errorOpts.path,\n input: errorOpts.input,\n ctx: errorOpts.ctx,\n type: errorOpts.type,\n req,\n });\n const untransformedJSON = {\n error: getErrorShape({\n config: router._def._config,\n error,\n type: errorOpts.type,\n path: errorOpts.path,\n input: errorOpts.input,\n ctx: errorOpts.ctx,\n }),\n };\n const transformedJSON = transformTRPCResponse(\n router._def._config,\n untransformedJSON,\n );\n const body = JSON.stringify(transformedJSON);\n return {\n error,\n untransformedJSON,\n body,\n };\n}\n\n/**\n * Check if a value is a stream-like object\n * - if it's an async iterable\n * - if it's an object with async iterables or promises\n */\nfunction isDataStream(v: unknown) {\n if (!isObject(v)) {\n return false;\n }\n\n if (isAsyncIterable(v)) {\n return true;\n }\n\n return (\n Object.values(v).some(isPromise) || Object.values(v).some(isAsyncIterable)\n );\n}\n\ntype ResultTuple = [undefined, T] | [TRPCError, undefined];\n\nexport async function resolveResponse(\n opts: ResolveHTTPRequestOptions,\n): Promise {\n const { router, req } = opts;\n const headers = new Headers([['vary', 'trpc-accept, accept']]);\n const config = router._def._config;\n\n const url = new URL(req.url);\n\n if (req.method === 'HEAD') {\n // can be used for lambda warmup\n return new Response(null, {\n status: 204,\n });\n }\n\n const allowBatching = opts.allowBatching ?? opts.batching?.enabled ?? true;\n const allowMethodOverride =\n (opts.allowMethodOverride ?? false) && req.method === 'POST';\n\n type $Context = inferRouterContext;\n\n const infoTuple: ResultTuple = await run(async () => {\n try {\n return [\n undefined,\n await getRequestInfo({\n req,\n path: decodeURIComponent(opts.path),\n router,\n searchParams: url.searchParams,\n headers: opts.req.headers,\n url,\n }),\n ];\n } catch (cause) {\n return [getTRPCErrorFromUnknown(cause), undefined];\n }\n });\n\n interface ContextManager {\n valueOrUndefined: () => $Context | undefined;\n value: () => $Context;\n create: (info: TRPCRequestInfo) => Promise;\n }\n const ctxManager: ContextManager = run(() => {\n let result: ResultTuple<$Context> | undefined = undefined;\n return {\n valueOrUndefined: () => {\n if (!result) {\n return undefined;\n }\n return result[1];\n },\n value: () => {\n const [err, ctx] = result!;\n if (err) {\n throw err;\n }\n return ctx;\n },\n create: async (info) => {\n if (result) {\n throw new Error(\n 'This should only be called once - report a bug in tRPC',\n );\n }\n try {\n const ctx = await opts.createContext({\n info,\n });\n result = [undefined, ctx];\n } catch (cause) {\n result = [getTRPCErrorFromUnknown(cause), undefined];\n }\n },\n };\n });\n\n const methodMapper = allowMethodOverride\n ? TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE\n : TYPE_ACCEPTED_METHOD_MAP;\n\n /**\n * @deprecated\n */\n const isStreamCall = getAcceptHeader(req.headers) === 'application/jsonl';\n\n const experimentalSSE = config.sse?.enabled ?? true;\n try {\n const [infoError, info] = infoTuple;\n if (infoError) {\n throw infoError;\n }\n if (info.isBatchCall && !allowBatching) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: `Batching is not enabled on the server`,\n });\n }\n /* istanbul ignore if -- @preserve */\n if (isStreamCall && !info.isBatchCall) {\n throw new TRPCError({\n message: `Streaming requests must be batched (you can do a batch of 1)`,\n code: 'BAD_REQUEST',\n });\n }\n await ctxManager.create(info);\n\n interface RPCResultOk {\n data: unknown;\n signal?: AbortSignal;\n }\n type RPCResult = ResultTuple;\n const rpcCalls = info.calls.map(async (call): Promise => {\n const proc = call.procedure;\n const combinedAbort = combinedAbortController(opts.req.signal);\n try {\n if (opts.error) {\n throw opts.error;\n }\n\n if (!proc) {\n throw new TRPCError({\n code: 'NOT_FOUND',\n message: `No procedure found on path \"${call.path}\"`,\n });\n }\n\n if (!methodMapper[proc._def.type].includes(req.method as HTTPMethods)) {\n throw new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message: `Unsupported ${req.method}-request to ${proc._def.type} procedure at path \"${call.path}\"`,\n });\n }\n\n if (proc._def.type === 'subscription') {\n /* istanbul ignore if -- @preserve */\n if (info.isBatchCall) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n message: `Cannot batch subscription calls`,\n });\n }\n\n if (config.sse?.maxDurationMs) {\n function cleanup() {\n clearTimeout(timer);\n combinedAbort.signal.removeEventListener('abort', cleanup);\n\n combinedAbort.controller.abort();\n }\n const timer = setTimeout(cleanup, config.sse.maxDurationMs);\n combinedAbort.signal.addEventListener('abort', cleanup);\n }\n }\n const data: unknown = await proc({\n path: call.path,\n getRawInput: call.getRawInput,\n ctx: ctxManager.value(),\n type: proc._def.type,\n signal: combinedAbort.signal,\n batchIndex: call.batchIndex,\n });\n return [\n undefined,\n {\n data,\n signal:\n proc._def.type === 'subscription'\n ? combinedAbort.signal\n : undefined,\n },\n ];\n } catch (cause) {\n const error = getTRPCErrorFromUnknown(cause);\n const input = call.result();\n\n opts.onError?.({\n error,\n path: call.path,\n input,\n ctx: ctxManager.valueOrUndefined(),\n type: call.procedure?._def.type ?? 'unknown',\n req: opts.req,\n });\n\n return [error, undefined];\n }\n });\n\n // ----------- response handlers -----------\n if (!info.isBatchCall) {\n const [call] = info.calls;\n const [error, result] = await rpcCalls[0]!;\n\n switch (info.type) {\n case 'unknown':\n case 'mutation':\n case 'query': {\n // httpLink\n headers.set('content-type', 'application/json');\n\n if (isDataStream(result?.data)) {\n throw new TRPCError({\n code: 'UNSUPPORTED_MEDIA_TYPE',\n message:\n 'Cannot use stream-like response in non-streaming request - use httpBatchStreamLink',\n });\n }\n const res: TRPCResponse> = error\n ? {\n error: getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input: call!.result(),\n path: call!.path,\n type: info.type,\n }),\n }\n : { result: { data: result.data } };\n\n const headResponse = initResponse({\n ctx: ctxManager.valueOrUndefined(),\n info,\n responseMeta: opts.responseMeta,\n errors: error ? [error] : [],\n headers,\n untransformedJSON: [res],\n });\n return new Response(\n JSON.stringify(transformTRPCResponse(config, res)),\n {\n status: headResponse.status,\n headers,\n },\n );\n }\n case 'subscription': {\n // httpSubscriptionLink\n\n const iterable: AsyncIterable = run(() => {\n if (error) {\n return errorToAsyncIterable(error);\n }\n if (!experimentalSSE) {\n return errorToAsyncIterable(\n new TRPCError({\n code: 'METHOD_NOT_SUPPORTED',\n message: 'Missing experimental flag \"sseSubscriptions\"',\n }),\n );\n }\n\n if (!isObservable(result.data) && !isAsyncIterable(result.data)) {\n return errorToAsyncIterable(\n new TRPCError({\n message: `Subscription ${\n call!.path\n } did not return an observable or a AsyncGenerator`,\n code: 'INTERNAL_SERVER_ERROR',\n }),\n );\n }\n const dataAsIterable = isObservable(result.data)\n ? observableToAsyncIterable(result.data, opts.req.signal)\n : result.data;\n return dataAsIterable;\n });\n\n const stream = sseStreamProducer({\n ...config.sse,\n data: iterable,\n serialize: (v) => config.transformer.output.serialize(v),\n formatError(errorOpts) {\n const error = getTRPCErrorFromUnknown(errorOpts.error);\n const input = call?.result();\n const path = call?.path;\n const type = call?.procedure?._def.type ?? 'unknown';\n\n opts.onError?.({\n error,\n path,\n input,\n ctx: ctxManager.valueOrUndefined(),\n req: opts.req,\n type,\n });\n\n const shape = getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input,\n path,\n type,\n });\n\n return shape;\n },\n });\n for (const [key, value] of Object.entries(sseHeaders)) {\n headers.set(key, value);\n }\n\n const headResponse = initResponse({\n ctx: ctxManager.valueOrUndefined(),\n info,\n responseMeta: opts.responseMeta,\n errors: [],\n headers,\n untransformedJSON: null,\n });\n\n const abortSignal = result?.signal;\n let responseBody: ReadableStream = stream;\n\n // Fixes: https://github.com/trpc/trpc/issues/7094\n if (abortSignal) {\n const reader = stream.getReader();\n const onAbort = () => void reader.cancel();\n if (abortSignal.aborted) {\n onAbort();\n } else {\n abortSignal.addEventListener('abort', onAbort, { once: true });\n }\n\n responseBody = new ReadableStream({\n async pull(controller) {\n const chunk = await reader.read();\n if (chunk.done) {\n abortSignal.removeEventListener('abort', onAbort);\n controller.close();\n } else {\n controller.enqueue(chunk.value);\n }\n },\n cancel() {\n abortSignal.removeEventListener('abort', onAbort);\n return reader.cancel();\n },\n });\n }\n\n return new Response(responseBody, {\n headers,\n status: headResponse.status,\n });\n }\n }\n }\n\n // batch response handlers\n if (info.accept === 'application/jsonl') {\n // httpBatchStreamLink\n headers.set('content-type', 'application/json');\n headers.set('transfer-encoding', 'chunked');\n const headResponse = initResponse({\n ctx: ctxManager.valueOrUndefined(),\n info,\n responseMeta: opts.responseMeta,\n errors: [],\n headers,\n untransformedJSON: null,\n });\n const stream = jsonlStreamProducer({\n ...config.jsonl,\n /**\n * Example structure for `maxDepth: 4`:\n * {\n * // 1\n * 0: {\n * // 2\n * result: {\n * // 3\n * data: // 4\n * }\n * }\n * }\n */\n maxDepth: Infinity,\n data: rpcCalls.map(async (res) => {\n const [error, result] = await res;\n\n const call = info.calls[0];\n\n if (error) {\n return {\n error: getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input: call!.result(),\n path: call!.path,\n type: call!.procedure?._def.type ?? 'unknown',\n }),\n };\n }\n\n /**\n * Not very pretty, but we need to wrap nested data in promises\n * Our stream producer will only resolve top-level async values or async values that are directly nested in another async value\n */\n const iterable = isObservable(result.data)\n ? observableToAsyncIterable(result.data, opts.req.signal)\n : Promise.resolve(result.data);\n return {\n result: Promise.resolve({\n data: iterable,\n }),\n };\n }),\n serialize: (data) => config.transformer.output.serialize(data),\n onError: (cause) => {\n opts.onError?.({\n error: getTRPCErrorFromUnknown(cause),\n path: undefined,\n input: undefined,\n ctx: ctxManager.valueOrUndefined(),\n req: opts.req,\n type: info?.type ?? 'unknown',\n });\n },\n\n formatError(errorOpts) {\n const call = info?.calls[errorOpts.path[0] as any];\n\n const error = getTRPCErrorFromUnknown(errorOpts.error);\n const input = call?.result();\n const path = call?.path;\n const type = call?.procedure?._def.type ?? 'unknown';\n\n // no need to call `onError` here as it will be propagated through the stream itself\n\n const shape = getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input,\n path,\n type,\n });\n\n return shape;\n },\n });\n\n return new Response(stream, {\n headers,\n status: headResponse.status,\n });\n }\n\n // httpBatchLink\n /**\n * Non-streaming response:\n * - await all responses in parallel, blocking on the slowest one\n * - create headers with known response body\n * - return a complete HTTPResponse\n */\n headers.set('content-type', 'application/json');\n const results: RPCResult[] = (await Promise.all(rpcCalls)).map(\n (res): RPCResult => {\n const [error, result] = res;\n if (error) {\n return res;\n }\n\n if (isDataStream(result.data)) {\n return [\n new TRPCError({\n code: 'UNSUPPORTED_MEDIA_TYPE',\n message:\n 'Cannot use stream-like response in non-streaming request - use httpBatchStreamLink',\n }),\n undefined,\n ];\n }\n return res;\n },\n );\n const resultAsRPCResponse = results.map(\n (\n [error, result],\n index,\n ): TRPCResponse> => {\n const call = info.calls[index]!;\n if (error) {\n return {\n error: getErrorShape({\n config,\n ctx: ctxManager.valueOrUndefined(),\n error,\n input: call.result(),\n path: call.path,\n type: call.procedure?._def.type ?? 'unknown',\n }),\n };\n }\n return {\n result: { data: result.data },\n };\n },\n );\n\n const errors = results\n .map(([error]) => error)\n .filter(Boolean) as TRPCError[];\n\n const headResponse = initResponse({\n ctx: ctxManager.valueOrUndefined(),\n info,\n responseMeta: opts.responseMeta,\n untransformedJSON: resultAsRPCResponse,\n errors,\n headers,\n });\n\n return new Response(\n JSON.stringify(transformTRPCResponse(config, resultAsRPCResponse)),\n {\n status: headResponse.status,\n headers,\n },\n );\n } catch (cause) {\n const [_infoError, info] = infoTuple;\n const ctx = ctxManager.valueOrUndefined();\n // we get here if\n // - batching is called when it's not enabled\n // - `createContext()` throws\n // - `router._def._config.transformer.output.serialize()` throws\n // - post body is too large\n // - input deserialization fails\n // - `errorFormatter` return value is malformed\n const { error, untransformedJSON, body } = caughtErrorToData(cause, {\n opts,\n ctx: ctxManager.valueOrUndefined(),\n type: info?.type ?? 'unknown',\n });\n\n const headResponse = initResponse({\n ctx,\n info,\n responseMeta: opts.responseMeta,\n untransformedJSON,\n errors: [error],\n headers,\n });\n\n return new Response(body, {\n status: headResponse.status,\n headers,\n });\n }\n}\n", "/**\n * If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`\n *\n * @example\n * ```ts\n * import type { AnyTRPCRouter } from '@trpc/server'\n * import type { HTTPBaseHandlerOptions } from '@trpc/server/http'\n * ```\n */\n// @trpc/server\n\nimport type { AnyRouter } from '../../@trpc/server';\nimport type { ResolveHTTPRequestOptionsContextFn } from '../../@trpc/server/http';\nimport { resolveResponse } from '../../@trpc/server/http';\nimport type { FetchHandlerRequestOptions } from './types';\n\nconst trimSlashes = (path: string): string => {\n path = path.startsWith('/') ? path.slice(1) : path;\n path = path.endsWith('/') ? path.slice(0, -1) : path;\n\n return path;\n};\n\nexport async function fetchRequestHandler(\n opts: FetchHandlerRequestOptions,\n): Promise {\n const resHeaders = new Headers();\n\n const createContext: ResolveHTTPRequestOptionsContextFn = async (\n innerOpts,\n ) => {\n return opts.createContext?.({ req: opts.req, resHeaders, ...innerOpts });\n };\n\n const url = new URL(opts.req.url);\n\n const pathname = trimSlashes(url.pathname);\n const endpoint = trimSlashes(opts.endpoint);\n const path = trimSlashes(pathname.slice(endpoint.length));\n\n return await resolveResponse({\n ...opts,\n req: opts.req,\n createContext,\n path,\n error: null,\n onError(o) {\n opts?.onError?.({ ...o, req: opts.req });\n },\n responseMeta(data) {\n const meta = opts.responseMeta?.(data);\n\n if (meta?.headers) {\n if (meta.headers instanceof Headers) {\n for (const [key, value] of meta.headers.entries()) {\n resHeaders.append(key, value);\n }\n } else {\n /**\n * @deprecated, delete in v12\n */\n for (const [key, value] of Object.entries(meta.headers)) {\n if (Array.isArray(value)) {\n for (const v of value) {\n resHeaders.append(key, v);\n }\n } else if (typeof value === 'string') {\n resHeaders.set(key, value);\n }\n }\n }\n }\n\n return {\n headers: resHeaders,\n status: meta?.status,\n };\n },\n });\n}\n", "// src/helper/route/index.ts\nimport { GET_MATCH_RESULT } from \"../../request/constants.js\";\nimport { getPattern, splitRoutingPath } from \"../../utils/url.js\";\nvar matchedRoutes = (c) => (\n // @ts-expect-error c.req[GET_MATCH_RESULT] is not typed\n c.req[GET_MATCH_RESULT][0].map(([[, route]]) => route)\n);\nvar routePath = (c, index) => matchedRoutes(c).at(index ?? c.req.routeIndex)?.path ?? \"\";\nvar baseRoutePath = (c, index) => matchedRoutes(c).at(index ?? c.req.routeIndex)?.basePath ?? \"\";\nvar basePathCacheMap = /* @__PURE__ */ new WeakMap();\nvar basePath = (c, index) => {\n index ??= c.req.routeIndex;\n const cache = basePathCacheMap.get(c) || [];\n if (typeof cache[index] === \"string\") {\n return cache[index];\n }\n let result;\n const rp = baseRoutePath(c, index);\n if (!/[:*]/.test(rp)) {\n result = rp;\n } else {\n const paths = splitRoutingPath(rp);\n const reqPath = c.req.path;\n let basePathLength = 0;\n for (let i = 0, len = paths.length; i < len; i++) {\n const pattern = getPattern(paths[i], paths[i + 1]);\n if (pattern) {\n const re = pattern[2] === true || pattern === \"*\" ? /[^\\/]+/ : pattern[2];\n basePathLength += reqPath.substring(basePathLength + 1).match(re)?.[0].length || 0;\n } else {\n basePathLength += paths[i].length;\n }\n basePathLength += 1;\n }\n result = reqPath.substring(0, basePathLength);\n }\n cache[index] = result;\n basePathCacheMap.set(c, cache);\n return result;\n};\nexport {\n basePath,\n baseRoutePath,\n matchedRoutes,\n routePath\n};\n", "import type { AnyRouter } from '@trpc/server'\nimport type {\n FetchCreateContextFnOptions,\n FetchHandlerRequestOptions,\n} from '@trpc/server/adapters/fetch'\nimport { fetchRequestHandler } from '@trpc/server/adapters/fetch'\nimport type { Context, MiddlewareHandler } from 'hono'\nimport { routePath } from 'hono/route'\n\ntype tRPCOptions = Omit<\n FetchHandlerRequestOptions,\n 'req' | 'endpoint' | 'createContext'\n> &\n Partial, 'endpoint'>> & {\n createContext?(\n opts: FetchCreateContextFnOptions,\n c: Context\n ): Record | Promise>\n }\n\nexport const trpcServer = ({\n endpoint,\n createContext,\n ...rest\n}: tRPCOptions): MiddlewareHandler => {\n const bodyProps = new Set(['arrayBuffer', 'blob', 'formData', 'json', 'text'] as const)\n type BodyProp = typeof bodyProps extends Set ? T : never\n return async (c) => {\n const canWithBody = c.req.method === 'GET' || c.req.method === 'HEAD'\n\n // Auto-detect endpoint from route path if not explicitly provided\n let resolvedEndpoint = endpoint\n if (!endpoint) {\n const path = routePath(c)\n if (path) {\n // Remove wildcard suffix (e.g., \"/v1/*\" -> \"/v1\")\n resolvedEndpoint = path.replace(/\\/\\*+$/, '') || '/trpc'\n } else {\n resolvedEndpoint = '/trpc'\n }\n }\n\n const res = await fetchRequestHandler({\n ...rest,\n createContext: async (opts) => ({\n ...(createContext ? await createContext(opts, c) : {}),\n // propagate env by default\n env: c.env,\n }),\n endpoint: resolvedEndpoint!,\n req: canWithBody\n ? c.req.raw\n : new Proxy(c.req.raw, {\n get(t, p, _r) {\n if (bodyProps.has(p as BodyProp)) {\n return () => c.req[p as BodyProp]()\n }\n return Reflect.get(t, p, t)\n },\n }),\n })\n return res\n }\n}\n", "export const entityKind = Symbol.for('drizzle:entityKind');\nexport const hasOwnEntityKind = Symbol.for('drizzle:hasOwnEntityKind');\n\nexport interface DrizzleEntity {\n\t[entityKind]: string;\n}\n\nexport type DrizzleEntityClass =\n\t& ((abstract new(...args: any[]) => T) | (new(...args: any[]) => T))\n\t& DrizzleEntity;\n\nexport function is>(value: any, type: T): value is InstanceType {\n\tif (!value || typeof value !== 'object') {\n\t\treturn false;\n\t}\n\n\tif (value instanceof type) { // eslint-disable-line no-instanceof/no-instanceof\n\t\treturn true;\n\t}\n\n\tif (!Object.prototype.hasOwnProperty.call(type, entityKind)) {\n\t\tthrow new Error(\n\t\t\t`Class \"${\n\t\t\t\ttype.name ?? ''\n\t\t\t}\" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`,\n\t\t);\n\t}\n\n\tlet cls = Object.getPrototypeOf(value).constructor;\n\tif (cls) {\n\t\t// Traverse the prototype chain to find the entityKind\n\t\twhile (cls) {\n\t\t\tif (entityKind in cls && cls[entityKind] === type[entityKind]) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tcls = Object.getPrototypeOf(cls);\n\t\t}\n\t}\n\n\treturn false;\n}\n", "import { entityKind } from '~/entity.ts';\n\nexport interface Logger {\n\tlogQuery(query: string, params: unknown[]): void;\n}\n\nexport interface LogWriter {\n\twrite(message: string): void;\n}\n\nexport class ConsoleLogWriter implements LogWriter {\n\tstatic readonly [entityKind]: string = 'ConsoleLogWriter';\n\n\twrite(message: string) {\n\t\tconsole.log(message);\n\t}\n}\n\nexport class DefaultLogger implements Logger {\n\tstatic readonly [entityKind]: string = 'DefaultLogger';\n\n\treadonly writer: LogWriter;\n\n\tconstructor(config?: { writer: LogWriter }) {\n\t\tthis.writer = config?.writer ?? new ConsoleLogWriter();\n\t}\n\n\tlogQuery(query: string, params: unknown[]): void {\n\t\tconst stringifiedParams = params.map((p) => {\n\t\t\ttry {\n\t\t\t\treturn JSON.stringify(p);\n\t\t\t} catch {\n\t\t\t\treturn String(p);\n\t\t\t}\n\t\t});\n\t\tconst paramsStr = stringifiedParams.length ? ` -- params: [${stringifiedParams.join(', ')}]` : '';\n\t\tthis.writer.write(`Query: ${query}${paramsStr}`);\n\t}\n}\n\nexport class NoopLogger implements Logger {\n\tstatic readonly [entityKind]: string = 'NoopLogger';\n\n\tlogQuery(): void {\n\t\t// noop\n\t}\n}\n", "/** @internal */\nexport const TableName = Symbol.for('drizzle:Name');\n", "import type { Column, GetColumnData } from './column.ts';\nimport { entityKind } from './entity.ts';\nimport type { OptionalKeyOnly, RequiredKeyOnly } from './operations.ts';\nimport type { SQLWrapper } from './sql/sql.ts';\nimport { TableName } from './table.utils.ts';\nimport type { Simplify, Update } from './utils.ts';\n\nexport interface TableConfig> {\n\tname: string;\n\tschema: string | undefined;\n\tcolumns: Record;\n\tdialect: string;\n}\n\nexport type UpdateTableConfig> = Required<\n\tUpdate\n>;\n\n/** @internal */\nexport const Schema = Symbol.for('drizzle:Schema');\n\n/** @internal */\nexport const Columns = Symbol.for('drizzle:Columns');\n\n/** @internal */\nexport const ExtraConfigColumns = Symbol.for('drizzle:ExtraConfigColumns');\n\n/** @internal */\nexport const OriginalName = Symbol.for('drizzle:OriginalName');\n\n/** @internal */\nexport const BaseName = Symbol.for('drizzle:BaseName');\n\n/** @internal */\nexport const IsAlias = Symbol.for('drizzle:IsAlias');\n\n/** @internal */\nexport const ExtraConfigBuilder = Symbol.for('drizzle:ExtraConfigBuilder');\n\nconst IsDrizzleTable = Symbol.for('drizzle:IsDrizzleTable');\n\nexport interface Table<\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tT extends TableConfig = TableConfig,\n> extends SQLWrapper {\n\t// SQLWrapper runtime implementation is defined in 'sql/sql.ts'\n}\n\nexport class Table implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Table';\n\n\tdeclare readonly _: {\n\t\treadonly brand: 'Table';\n\t\treadonly config: T;\n\t\treadonly name: T['name'];\n\t\treadonly schema: T['schema'];\n\t\treadonly columns: T['columns'];\n\t\treadonly inferSelect: InferSelectModel>;\n\t\treadonly inferInsert: InferInsertModel>;\n\t};\n\n\tdeclare readonly $inferSelect: InferSelectModel>;\n\tdeclare readonly $inferInsert: InferInsertModel>;\n\n\t/** @internal */\n\tstatic readonly Symbol = {\n\t\tName: TableName as typeof TableName,\n\t\tSchema: Schema as typeof Schema,\n\t\tOriginalName: OriginalName as typeof OriginalName,\n\t\tColumns: Columns as typeof Columns,\n\t\tExtraConfigColumns: ExtraConfigColumns as typeof ExtraConfigColumns,\n\t\tBaseName: BaseName as typeof BaseName,\n\t\tIsAlias: IsAlias as typeof IsAlias,\n\t\tExtraConfigBuilder: ExtraConfigBuilder as typeof ExtraConfigBuilder,\n\t};\n\n\t/**\n\t * @internal\n\t * Can be changed if the table is aliased.\n\t */\n\t[TableName]: string;\n\n\t/**\n\t * @internal\n\t * Used to store the original name of the table, before any aliasing.\n\t */\n\t[OriginalName]: string;\n\n\t/** @internal */\n\t[Schema]: string | undefined;\n\n\t/** @internal */\n\t[Columns]!: T['columns'];\n\n\t/** @internal */\n\t[ExtraConfigColumns]!: Record;\n\n\t/**\n\t * @internal\n\t * Used to store the table name before the transformation via the `tableCreator` functions.\n\t */\n\t[BaseName]: string;\n\n\t/** @internal */\n\t[IsAlias] = false;\n\n\t/** @internal */\n\t[IsDrizzleTable] = true;\n\n\t/** @internal */\n\t[ExtraConfigBuilder]: ((self: any) => Record | unknown[]) | undefined = undefined;\n\n\tconstructor(name: string, schema: string | undefined, baseName: string) {\n\t\tthis[TableName] = this[OriginalName] = name;\n\t\tthis[Schema] = schema;\n\t\tthis[BaseName] = baseName;\n\t}\n}\n\nexport function isTable(table: unknown): table is Table {\n\treturn typeof table === 'object' && table !== null && IsDrizzleTable in table;\n}\n\n/**\n * Any table with a specified boundary.\n *\n * @example\n\t```ts\n\t// Any table with a specific name\n\ttype AnyUsersTable = AnyTable<{ name: 'users' }>;\n\t```\n *\n * To describe any table with any config, simply use `Table` without any type arguments, like this:\n *\n\t```ts\n\tfunction needsTable(table: Table) {\n\t\t...\n\t}\n\t```\n */\nexport type AnyTable> = Table>;\n\nexport function getTableName(table: T): T['_']['name'] {\n\treturn table[TableName];\n}\n\nexport function getTableUniqueName(table: T): `${T['_']['schema']}.${T['_']['name']}` {\n\treturn `${table[Schema] ?? 'public'}.${table[TableName]}`;\n}\n\nexport type MapColumnName =\n\tTDBColumNames extends true ? TColumn['_']['name']\n\t\t: TName;\n\nexport type InferModelFromColumns<\n\tTColumns extends Record,\n\tTInferMode extends 'select' | 'insert' = 'select',\n\tTConfig extends { dbColumnNames: boolean; override?: boolean } = { dbColumnNames: false; override: false },\n> = Simplify<\n\tTInferMode extends 'insert' ?\n\t\t\t& {\n\t\t\t\t[\n\t\t\t\t\tKey in keyof TColumns & string as RequiredKeyOnly<\n\t\t\t\t\t\tMapColumnName,\n\t\t\t\t\t\tTColumns[Key]\n\t\t\t\t\t>\n\t\t\t\t]: GetColumnData;\n\t\t\t}\n\t\t\t& {\n\t\t\t\t[\n\t\t\t\t\tKey in keyof TColumns & string as OptionalKeyOnly<\n\t\t\t\t\t\tMapColumnName,\n\t\t\t\t\t\tTColumns[Key],\n\t\t\t\t\t\tTConfig['override']\n\t\t\t\t\t>\n\t\t\t\t]?: GetColumnData | undefined;\n\t\t\t}\n\t\t: {\n\t\t\t[\n\t\t\t\tKey in keyof TColumns & string as MapColumnName<\n\t\t\t\t\tKey,\n\t\t\t\t\tTColumns[Key],\n\t\t\t\t\tTConfig['dbColumnNames']\n\t\t\t\t>\n\t\t\t]: GetColumnData;\n\t\t}\n>;\n\n/** @deprecated Use one of the alternatives: {@link InferSelectModel} / {@link InferInsertModel}, or `table.$inferSelect` / `table.$inferInsert`\n */\nexport type InferModel<\n\tTTable extends Table,\n\tTInferMode extends 'select' | 'insert' = 'select',\n\tTConfig extends { dbColumnNames: boolean } = { dbColumnNames: false },\n> = InferModelFromColumns;\n\nexport type InferSelectModel<\n\tTTable extends Table,\n\tTConfig extends { dbColumnNames: boolean } = { dbColumnNames: false },\n> = InferModelFromColumns;\n\nexport type InferInsertModel<\n\tTTable extends Table,\n\tTConfig extends { dbColumnNames: boolean; override?: boolean } = { dbColumnNames: false; override: false },\n> = InferModelFromColumns;\n\nexport type InferEnum = T extends { enumValues: readonly (infer U)[] } ? U\n\t: never;\n", "import type {\n\tColumnBuilderBaseConfig,\n\tColumnBuilderRuntimeConfig,\n\tColumnDataType,\n\tGeneratedColumnConfig,\n\tGeneratedIdentityConfig,\n} from './column-builder.ts';\nimport { entityKind } from './entity.ts';\nimport type { DriverValueMapper, SQL, SQLWrapper } from './sql/sql.ts';\nimport type { Table } from './table.ts';\nimport type { Update } from './utils.ts';\n\nexport interface ColumnBaseConfig<\n\tTDataType extends ColumnDataType,\n\tTColumnType extends string,\n> extends ColumnBuilderBaseConfig {\n\ttableName: string;\n\tnotNull: boolean;\n\thasDefault: boolean;\n\tisPrimaryKey: boolean;\n\tisAutoincrement: boolean;\n\thasRuntimeDefault: boolean;\n}\n\nexport type ColumnTypeConfig, TTypeConfig extends object> = T & {\n\tbrand: 'Column';\n\ttableName: T['tableName'];\n\tname: T['name'];\n\tdataType: T['dataType'];\n\tcolumnType: T['columnType'];\n\tdata: T['data'];\n\tdriverParam: T['driverParam'];\n\tnotNull: T['notNull'];\n\thasDefault: T['hasDefault'];\n\tisPrimaryKey: T['isPrimaryKey'];\n\tisAutoincrement: T['isAutoincrement'];\n\thasRuntimeDefault: T['hasRuntimeDefault'];\n\tenumValues: T['enumValues'];\n\tbaseColumn: T extends { baseColumn: infer U } ? U : unknown;\n\tgenerated: GeneratedColumnConfig | undefined;\n\tidentity: undefined | 'always' | 'byDefault';\n} & TTypeConfig;\n\nexport type ColumnRuntimeConfig = ColumnBuilderRuntimeConfig<\n\tTData,\n\tTRuntimeConfig\n>;\n\nexport interface Column<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTRuntimeConfig extends object = object,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTTypeConfig extends object = object,\n> extends DriverValueMapper, SQLWrapper {\n\t// SQLWrapper runtime implementation is defined in 'sql/sql.ts'\n}\n/*\n\t`Column` only accepts a full `ColumnConfig` as its generic.\n\tTo infer parts of the config, use `AnyColumn` that accepts a partial config.\n\tSee `GetColumnData` for example usage of inferring.\n*/\nexport abstract class Column<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n\tTRuntimeConfig extends object = object,\n\tTTypeConfig extends object = object,\n> implements DriverValueMapper, SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Column';\n\n\tdeclare readonly _: ColumnTypeConfig;\n\n\treadonly name: string;\n\treadonly keyAsName: boolean;\n\treadonly primary: boolean;\n\treadonly notNull: boolean;\n\treadonly default: T['data'] | SQL | undefined;\n\treadonly defaultFn: (() => T['data'] | SQL) | undefined;\n\treadonly onUpdateFn: (() => T['data'] | SQL) | undefined;\n\treadonly hasDefault: boolean;\n\treadonly isUnique: boolean;\n\treadonly uniqueName: string | undefined;\n\treadonly uniqueType: string | undefined;\n\treadonly dataType: T['dataType'];\n\treadonly columnType: T['columnType'];\n\treadonly enumValues: T['enumValues'] = undefined;\n\treadonly generated: GeneratedColumnConfig | undefined = undefined;\n\treadonly generatedIdentity: GeneratedIdentityConfig | undefined = undefined;\n\n\tprotected config: ColumnRuntimeConfig;\n\n\tconstructor(\n\t\treadonly table: Table,\n\t\tconfig: ColumnRuntimeConfig,\n\t) {\n\t\tthis.config = config;\n\t\tthis.name = config.name;\n\t\tthis.keyAsName = config.keyAsName;\n\t\tthis.notNull = config.notNull;\n\t\tthis.default = config.default;\n\t\tthis.defaultFn = config.defaultFn;\n\t\tthis.onUpdateFn = config.onUpdateFn;\n\t\tthis.hasDefault = config.hasDefault;\n\t\tthis.primary = config.primaryKey;\n\t\tthis.isUnique = config.isUnique;\n\t\tthis.uniqueName = config.uniqueName;\n\t\tthis.uniqueType = config.uniqueType;\n\t\tthis.dataType = config.dataType as T['dataType'];\n\t\tthis.columnType = config.columnType;\n\t\tthis.generated = config.generated;\n\t\tthis.generatedIdentity = config.generatedIdentity;\n\t}\n\n\tabstract getSQLType(): string;\n\n\tmapFromDriverValue(value: unknown): unknown {\n\t\treturn value;\n\t}\n\n\tmapToDriverValue(value: unknown): unknown {\n\t\treturn value;\n\t}\n\n\t// ** @internal */\n\tshouldDisableInsert(): boolean {\n\t\treturn this.config.generated !== undefined && this.config.generated.type !== 'byDefault';\n\t}\n}\n\nexport type UpdateColConfig<\n\tT extends ColumnBaseConfig,\n\tTUpdate extends Partial>,\n> = Update;\n\nexport type AnyColumn> = {}> = Column<\n\tRequired, TPartial>>\n>;\n\nexport type GetColumnData =\n\t// dprint-ignore\n\tTInferMode extends 'raw' // Raw mode\n\t\t? TColumn['_']['data'] // Just return the underlying type\n\t\t: TColumn['_']['notNull'] extends true // Query mode\n\t\t? TColumn['_']['data'] // Query mode, not null\n\t\t: TColumn['_']['data'] | null; // Query mode, nullable\n\nexport type InferColumnsDataTypes> = {\n\t[Key in keyof TColumns]: GetColumnData;\n};\n", "import { entityKind } from '~/entity.ts';\nimport type { Column } from './column.ts';\nimport type { GelColumn, GelExtraConfigColumn } from './gel-core/index.ts';\nimport type { MySqlColumn } from './mysql-core/index.ts';\nimport type { ExtraConfigColumn, PgColumn, PgSequenceOptions } from './pg-core/index.ts';\nimport type { SingleStoreColumn } from './singlestore-core/index.ts';\nimport type { SQL } from './sql/sql.ts';\nimport type { SQLiteColumn } from './sqlite-core/index.ts';\nimport type { Assume, Simplify } from './utils.ts';\n\nexport type ColumnDataType =\n\t| 'string'\n\t| 'number'\n\t| 'boolean'\n\t| 'array'\n\t| 'json'\n\t| 'date'\n\t| 'bigint'\n\t| 'custom'\n\t| 'buffer'\n\t| 'dateDuration'\n\t| 'duration'\n\t| 'relDuration'\n\t| 'localTime'\n\t| 'localDate'\n\t| 'localDateTime';\n\nexport type Dialect = 'pg' | 'mysql' | 'sqlite' | 'singlestore' | 'common' | 'gel';\n\nexport type GeneratedStorageMode = 'virtual' | 'stored';\n\nexport type GeneratedType = 'always' | 'byDefault';\n\nexport type GeneratedColumnConfig = {\n\tas: TDataType | SQL | (() => SQL);\n\ttype?: GeneratedType;\n\tmode?: GeneratedStorageMode;\n};\n\nexport type GeneratedIdentityConfig = {\n\tsequenceName?: string;\n\tsequenceOptions?: PgSequenceOptions;\n\ttype: 'always' | 'byDefault';\n};\n\nexport interface ColumnBuilderBaseConfig {\n\tname: string;\n\tdataType: TDataType;\n\tcolumnType: TColumnType;\n\tdata: unknown;\n\tdriverParam: unknown;\n\tenumValues: string[] | undefined;\n}\n\nexport type MakeColumnConfig<\n\tT extends ColumnBuilderBaseConfig,\n\tTTableName extends string,\n\tTData = T extends { $type: infer U } ? U : T['data'],\n> = {\n\tname: T['name'];\n\ttableName: TTableName;\n\tdataType: T['dataType'];\n\tcolumnType: T['columnType'];\n\tdata: TData;\n\tdriverParam: T['driverParam'];\n\tnotNull: T extends { notNull: true } ? true : false;\n\thasDefault: T extends { hasDefault: true } ? true : false;\n\tisPrimaryKey: T extends { isPrimaryKey: true } ? true : false;\n\tisAutoincrement: T extends { isAutoincrement: true } ? true : false;\n\thasRuntimeDefault: T extends { hasRuntimeDefault: true } ? true : false;\n\tenumValues: T['enumValues'];\n\tbaseColumn: T extends { baseBuilder: infer U extends ColumnBuilderBase } ? BuildColumn\n\t\t: never;\n\tidentity: T extends { identity: 'always' } ? 'always' : T extends { identity: 'byDefault' } ? 'byDefault' : undefined;\n\tgenerated: T extends { generated: infer G } ? unknown extends G ? undefined\n\t\t: G extends undefined ? undefined\n\t\t: G\n\t\t: undefined;\n} & {};\n\nexport type ColumnBuilderTypeConfig<\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tT extends ColumnBuilderBaseConfig,\n\tTTypeConfig extends object = object,\n> = Simplify<\n\t& {\n\t\tbrand: 'ColumnBuilder';\n\t\tname: T['name'];\n\t\tdataType: T['dataType'];\n\t\tcolumnType: T['columnType'];\n\t\tdata: T['data'];\n\t\tdriverParam: T['driverParam'];\n\t\tnotNull: T extends { notNull: infer U } ? U : boolean;\n\t\thasDefault: T extends { hasDefault: infer U } ? U : boolean;\n\t\tenumValues: T['enumValues'];\n\t\tidentity: T extends { identity: infer U } ? U : unknown;\n\t\tgenerated: T extends { generated: infer G } ? G extends undefined ? unknown : G : unknown;\n\t}\n\t& TTypeConfig\n>;\n\nexport type ColumnBuilderRuntimeConfig = {\n\tname: string;\n\tkeyAsName: boolean;\n\tnotNull: boolean;\n\tdefault: TData | SQL | undefined;\n\tdefaultFn: (() => TData | SQL) | undefined;\n\tonUpdateFn: (() => TData | SQL) | undefined;\n\thasDefault: boolean;\n\tprimaryKey: boolean;\n\tisUnique: boolean;\n\tuniqueName: string | undefined;\n\tuniqueType: string | undefined;\n\tdataType: string;\n\tcolumnType: string;\n\tgenerated: GeneratedColumnConfig | undefined;\n\tgeneratedIdentity: GeneratedIdentityConfig | undefined;\n} & TRuntimeConfig;\n\nexport interface ColumnBuilderExtraConfig {\n\tprimaryKeyHasDefault?: boolean;\n}\n\nexport type NotNull = T & {\n\t_: {\n\t\tnotNull: true;\n\t};\n};\n\nexport type HasDefault = T & {\n\t_: {\n\t\thasDefault: true;\n\t};\n};\n\nexport type IsPrimaryKey = T & {\n\t_: {\n\t\tisPrimaryKey: true;\n\t};\n};\n\nexport type IsAutoincrement = T & {\n\t_: {\n\t\tisAutoincrement: true;\n\t};\n};\n\nexport type HasRuntimeDefault = T & {\n\t_: {\n\t\thasRuntimeDefault: true;\n\t};\n};\n\nexport type $Type = T & {\n\t_: {\n\t\t$type: TType;\n\t};\n};\n\nexport type HasGenerated = T & {\n\t_: {\n\t\thasDefault: true;\n\t\tgenerated: TGenerated;\n\t};\n};\n\nexport type IsIdentity<\n\tT extends ColumnBuilderBase,\n\tTType extends 'always' | 'byDefault',\n> = T & {\n\t_: {\n\t\tnotNull: true;\n\t\thasDefault: true;\n\t\tidentity: TType;\n\t};\n};\nexport interface ColumnBuilderBase<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTTypeConfig extends object = object,\n> {\n\t_: ColumnBuilderTypeConfig;\n}\n\n// To understand how to use `ColumnBuilder` and `AnyColumnBuilder`, see `Column` and `AnyColumn` documentation.\nexport abstract class ColumnBuilder<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTRuntimeConfig extends object = object,\n\tTTypeConfig extends object = object,\n\tTExtraConfig extends ColumnBuilderExtraConfig = ColumnBuilderExtraConfig,\n> implements ColumnBuilderBase {\n\tstatic readonly [entityKind]: string = 'ColumnBuilder';\n\n\tdeclare _: ColumnBuilderTypeConfig;\n\n\tprotected config: ColumnBuilderRuntimeConfig;\n\n\tconstructor(name: T['name'], dataType: T['dataType'], columnType: T['columnType']) {\n\t\tthis.config = {\n\t\t\tname,\n\t\t\tkeyAsName: name === '',\n\t\t\tnotNull: false,\n\t\t\tdefault: undefined,\n\t\t\thasDefault: false,\n\t\t\tprimaryKey: false,\n\t\t\tisUnique: false,\n\t\t\tuniqueName: undefined,\n\t\t\tuniqueType: undefined,\n\t\t\tdataType,\n\t\t\tcolumnType,\n\t\t\tgenerated: undefined,\n\t\t} as ColumnBuilderRuntimeConfig;\n\t}\n\n\t/**\n\t * Changes the data type of the column. Commonly used with `json` columns. Also, useful for branded types.\n\t *\n\t * @example\n\t * ```ts\n\t * const users = pgTable('users', {\n\t * \tid: integer('id').$type().primaryKey(),\n\t * \tdetails: json('details').$type().notNull(),\n\t * });\n\t * ```\n\t */\n\t$type(): $Type {\n\t\treturn this as $Type;\n\t}\n\n\t/**\n\t * Adds a `not null` clause to the column definition.\n\t *\n\t * Affects the `select` model of the table - columns *without* `not null` will be nullable on select.\n\t */\n\tnotNull(): NotNull {\n\t\tthis.config.notNull = true;\n\t\treturn this as NotNull;\n\t}\n\n\t/**\n\t * Adds a `default ` clause to the column definition.\n\t *\n\t * Affects the `insert` model of the table - columns *with* `default` are optional on insert.\n\t *\n\t * If you need to set a dynamic default value, use {@link $defaultFn} instead.\n\t */\n\tdefault(value: (this['_'] extends { $type: infer U } ? U : this['_']['data']) | SQL): HasDefault {\n\t\tthis.config.default = value;\n\t\tthis.config.hasDefault = true;\n\t\treturn this as HasDefault;\n\t}\n\n\t/**\n\t * Adds a dynamic default value to the column.\n\t * The function will be called when the row is inserted, and the returned value will be used as the column value.\n\t *\n\t * **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`.\n\t */\n\t$defaultFn(\n\t\tfn: () => (this['_'] extends { $type: infer U } ? U : this['_']['data']) | SQL,\n\t): HasRuntimeDefault> {\n\t\tthis.config.defaultFn = fn;\n\t\tthis.config.hasDefault = true;\n\t\treturn this as HasRuntimeDefault>;\n\t}\n\n\t/**\n\t * Alias for {@link $defaultFn}.\n\t */\n\t$default = this.$defaultFn;\n\n\t/**\n\t * Adds a dynamic update value to the column.\n\t * The function will be called when the row is updated, and the returned value will be used as the column value if none is provided.\n\t * If no `default` (or `$defaultFn`) value is provided, the function will be called when the row is inserted as well, and the returned value will be used as the column value.\n\t *\n\t * **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`.\n\t */\n\t$onUpdateFn(\n\t\tfn: () => (this['_'] extends { $type: infer U } ? U : this['_']['data']) | SQL,\n\t): HasDefault {\n\t\tthis.config.onUpdateFn = fn;\n\t\tthis.config.hasDefault = true;\n\t\treturn this as HasDefault;\n\t}\n\n\t/**\n\t * Alias for {@link $onUpdateFn}.\n\t */\n\t$onUpdate = this.$onUpdateFn;\n\n\t/**\n\t * Adds a `primary key` clause to the column definition. This implicitly makes the column `not null`.\n\t *\n\t * In SQLite, `integer primary key` implicitly makes the column auto-incrementing.\n\t */\n\tprimaryKey(): TExtraConfig['primaryKeyHasDefault'] extends true ? IsPrimaryKey>>\n\t\t: IsPrimaryKey>\n\t{\n\t\tthis.config.primaryKey = true;\n\t\tthis.config.notNull = true;\n\t\treturn this as TExtraConfig['primaryKeyHasDefault'] extends true ? IsPrimaryKey>>\n\t\t\t: IsPrimaryKey>;\n\t}\n\n\tabstract generatedAlwaysAs(\n\t\tas: SQL | T['data'] | (() => SQL),\n\t\tconfig?: Partial>,\n\t): HasGenerated;\n\n\t/** @internal Sets the name of the column to the key within the table definition if a name was not given. */\n\tsetName(name: string) {\n\t\tif (this.config.name !== '') return;\n\t\tthis.config.name = name;\n\t}\n}\n\nexport type BuildColumn<\n\tTTableName extends string,\n\tTBuilder extends ColumnBuilderBase,\n\tTDialect extends Dialect,\n> = TDialect extends 'pg' ? PgColumn<\n\t\tMakeColumnConfig,\n\t\t{},\n\t\tSimplify | 'brand' | 'dialect'>>\n\t>\n\t: TDialect extends 'mysql' ? MySqlColumn<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify<\n\t\t\t\tOmit<\n\t\t\t\t\tTBuilder['_'],\n\t\t\t\t\t| keyof MakeColumnConfig\n\t\t\t\t\t| 'brand'\n\t\t\t\t\t| 'dialect'\n\t\t\t\t\t| 'primaryKeyHasDefault'\n\t\t\t\t\t| 'mysqlColumnBuilderBrand'\n\t\t\t\t>\n\t\t\t>\n\t\t>\n\t: TDialect extends 'sqlite' ? SQLiteColumn<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify | 'brand' | 'dialect'>>\n\t\t>\n\t: TDialect extends 'common' ? Column<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify | 'brand' | 'dialect'>>\n\t\t>\n\t: TDialect extends 'singlestore' ? SingleStoreColumn<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify<\n\t\t\t\tOmit<\n\t\t\t\t\tTBuilder['_'],\n\t\t\t\t\t| keyof MakeColumnConfig\n\t\t\t\t\t| 'brand'\n\t\t\t\t\t| 'dialect'\n\t\t\t\t\t| 'primaryKeyHasDefault'\n\t\t\t\t\t| 'singlestoreColumnBuilderBrand'\n\t\t\t\t>\n\t\t\t>\n\t\t>\n\t: TDialect extends 'gel' ? GelColumn<\n\t\t\tMakeColumnConfig,\n\t\t\t{},\n\t\t\tSimplify | 'brand' | 'dialect'>>\n\t\t>\n\t: never;\n\nexport type BuildIndexColumn<\n\tTDialect extends Dialect,\n> = TDialect extends 'pg' ? ExtraConfigColumn\n\t: TDialect extends 'gel' ? GelExtraConfigColumn\n\t: never;\n\n// TODO\n// try to make sql as well + indexRaw\n\n// optional after everything will be working as expected\n// also try to leave only needed methods for extraConfig\n// make an error if I pass .asc() to fk and so on\n\nexport type BuildColumns<\n\tTTableName extends string,\n\tTConfigMap extends Record,\n\tTDialect extends Dialect,\n> =\n\t& {\n\t\t[Key in keyof TConfigMap]: BuildColumn\n\t\t\t\t& { name: TConfigMap[Key]['_']['name'] extends '' ? Assume : TConfigMap[Key]['_']['name'] };\n\t\t}, TDialect>;\n\t}\n\t& {};\n\nexport type BuildExtraConfigColumns<\n\t_TTableName extends string,\n\tTConfigMap extends Record,\n\tTDialect extends Dialect,\n> =\n\t& {\n\t\t[Key in keyof TConfigMap]: BuildIndexColumn;\n\t}\n\t& {};\n\nexport type ChangeColumnTableName =\n\tTDialect extends 'pg' ? PgColumn>\n\t\t: TDialect extends 'mysql' ? MySqlColumn>\n\t\t: TDialect extends 'singlestore' ? SingleStoreColumn>\n\t\t: TDialect extends 'sqlite' ? SQLiteColumn>\n\t\t: TDialect extends 'gel' ? GelColumn>\n\t\t: never;\n", "import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { AnyPgColumn, PgColumn } from './columns/index.ts';\nimport type { PgTable } from './table.ts';\n\nexport type UpdateDeleteAction = 'cascade' | 'restrict' | 'no action' | 'set null' | 'set default';\n\nexport type Reference = () => {\n\treadonly name?: string;\n\treadonly columns: PgColumn[];\n\treadonly foreignTable: PgTable;\n\treadonly foreignColumns: PgColumn[];\n};\n\nexport class ForeignKeyBuilder {\n\tstatic readonly [entityKind]: string = 'PgForeignKeyBuilder';\n\n\t/** @internal */\n\treference: Reference;\n\n\t/** @internal */\n\t_onUpdate: UpdateDeleteAction | undefined = 'no action';\n\n\t/** @internal */\n\t_onDelete: UpdateDeleteAction | undefined = 'no action';\n\n\tconstructor(\n\t\tconfig: () => {\n\t\t\tname?: string;\n\t\t\tcolumns: PgColumn[];\n\t\t\tforeignColumns: PgColumn[];\n\t\t},\n\t\tactions?: {\n\t\t\tonUpdate?: UpdateDeleteAction;\n\t\t\tonDelete?: UpdateDeleteAction;\n\t\t} | undefined,\n\t) {\n\t\tthis.reference = () => {\n\t\t\tconst { name, columns, foreignColumns } = config();\n\t\t\treturn { name, columns, foreignTable: foreignColumns[0]!.table as PgTable, foreignColumns };\n\t\t};\n\t\tif (actions) {\n\t\t\tthis._onUpdate = actions.onUpdate;\n\t\t\tthis._onDelete = actions.onDelete;\n\t\t}\n\t}\n\n\tonUpdate(action: UpdateDeleteAction): this {\n\t\tthis._onUpdate = action === undefined ? 'no action' : action;\n\t\treturn this;\n\t}\n\n\tonDelete(action: UpdateDeleteAction): this {\n\t\tthis._onDelete = action === undefined ? 'no action' : action;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: PgTable): ForeignKey {\n\t\treturn new ForeignKey(table, this);\n\t}\n}\n\nexport type AnyForeignKeyBuilder = ForeignKeyBuilder;\n\nexport class ForeignKey {\n\tstatic readonly [entityKind]: string = 'PgForeignKey';\n\n\treadonly reference: Reference;\n\treadonly onUpdate: UpdateDeleteAction | undefined;\n\treadonly onDelete: UpdateDeleteAction | undefined;\n\n\tconstructor(readonly table: PgTable, builder: ForeignKeyBuilder) {\n\t\tthis.reference = builder.reference;\n\t\tthis.onUpdate = builder._onUpdate;\n\t\tthis.onDelete = builder._onDelete;\n\t}\n\n\tgetName(): string {\n\t\tconst { name, columns, foreignColumns } = this.reference();\n\t\tconst columnNames = columns.map((column) => column.name);\n\t\tconst foreignColumnNames = foreignColumns.map((column) => column.name);\n\t\tconst chunks = [\n\t\t\tthis.table[TableName],\n\t\t\t...columnNames,\n\t\t\tforeignColumns[0]!.table[TableName],\n\t\t\t...foreignColumnNames,\n\t\t];\n\t\treturn name ?? `${chunks.join('_')}_fk`;\n\t}\n}\n\ntype ColumnsWithTable<\n\tTTableName extends string,\n\tTColumns extends PgColumn[],\n> = { [Key in keyof TColumns]: AnyPgColumn<{ tableName: TTableName }> };\n\nexport function foreignKey<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends [AnyPgColumn<{ tableName: TTableName }>, ...AnyPgColumn<{ tableName: TTableName }>[]],\n>(\n\tconfig: {\n\t\tname?: string;\n\t\tcolumns: TColumns;\n\t\tforeignColumns: ColumnsWithTable;\n\t},\n): ForeignKeyBuilder {\n\tfunction mappedConfig() {\n\t\tconst { name, columns, foreignColumns } = config;\n\t\treturn {\n\t\t\tname,\n\t\t\tcolumns,\n\t\t\tforeignColumns,\n\t\t};\n\t}\n\n\treturn new ForeignKeyBuilder(mappedConfig);\n}\n", "export function iife(fn: (...args: T) => U, ...args: T): U {\n\treturn fn(...args);\n}\n", "import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { PgColumn } from './columns/index.ts';\nimport type { PgTable } from './table.ts';\n\nexport function unique(name?: string): UniqueOnConstraintBuilder {\n\treturn new UniqueOnConstraintBuilder(name);\n}\n\nexport function uniqueKeyName(table: PgTable, columns: string[]) {\n\treturn `${table[TableName]}_${columns.join('_')}_unique`;\n}\n\nexport class UniqueConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'PgUniqueConstraintBuilder';\n\n\t/** @internal */\n\tcolumns: PgColumn[];\n\t/** @internal */\n\tnullsNotDistinctConfig = false;\n\n\tconstructor(\n\t\tcolumns: PgColumn[],\n\t\tprivate name?: string,\n\t) {\n\t\tthis.columns = columns;\n\t}\n\n\tnullsNotDistinct() {\n\t\tthis.nullsNotDistinctConfig = true;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: PgTable): UniqueConstraint {\n\t\treturn new UniqueConstraint(table, this.columns, this.nullsNotDistinctConfig, this.name);\n\t}\n}\n\nexport class UniqueOnConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'PgUniqueOnConstraintBuilder';\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tname?: string,\n\t) {\n\t\tthis.name = name;\n\t}\n\n\ton(...columns: [PgColumn, ...PgColumn[]]) {\n\t\treturn new UniqueConstraintBuilder(columns, this.name);\n\t}\n}\n\nexport class UniqueConstraint {\n\tstatic readonly [entityKind]: string = 'PgUniqueConstraint';\n\n\treadonly columns: PgColumn[];\n\treadonly name?: string;\n\treadonly nullsNotDistinct: boolean = false;\n\n\tconstructor(readonly table: PgTable, columns: PgColumn[], nullsNotDistinct: boolean, name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name));\n\t\tthis.nullsNotDistinct = nullsNotDistinct;\n\t}\n\n\tgetName() {\n\t\treturn this.name;\n\t}\n}\n", "function parsePgArrayValue(arrayString: string, startFrom: number, inQuotes: boolean): [string, number] {\n\tfor (let i = startFrom; i < arrayString.length; i++) {\n\t\tconst char = arrayString[i];\n\n\t\tif (char === '\\\\') {\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === '\"') {\n\t\t\treturn [arrayString.slice(startFrom, i).replace(/\\\\/g, ''), i + 1];\n\t\t}\n\n\t\tif (inQuotes) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === ',' || char === '}') {\n\t\t\treturn [arrayString.slice(startFrom, i).replace(/\\\\/g, ''), i];\n\t\t}\n\t}\n\n\treturn [arrayString.slice(startFrom).replace(/\\\\/g, ''), arrayString.length];\n}\n\nexport function parsePgNestedArray(arrayString: string, startFrom = 0): [any[], number] {\n\tconst result: any[] = [];\n\tlet i = startFrom;\n\tlet lastCharIsComma = false;\n\n\twhile (i < arrayString.length) {\n\t\tconst char = arrayString[i];\n\n\t\tif (char === ',') {\n\t\t\tif (lastCharIsComma || i === startFrom) {\n\t\t\t\tresult.push('');\n\t\t\t}\n\t\t\tlastCharIsComma = true;\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\n\t\tlastCharIsComma = false;\n\n\t\tif (char === '\\\\') {\n\t\t\ti += 2;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === '\"') {\n\t\t\tconst [value, startFrom] = parsePgArrayValue(arrayString, i + 1, true);\n\t\t\tresult.push(value);\n\t\t\ti = startFrom;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (char === '}') {\n\t\t\treturn [result, i + 1];\n\t\t}\n\n\t\tif (char === '{') {\n\t\t\tconst [value, startFrom] = parsePgNestedArray(arrayString, i + 1);\n\t\t\tresult.push(value);\n\t\t\ti = startFrom;\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst [value, newStartFrom] = parsePgArrayValue(arrayString, i, false);\n\t\tresult.push(value);\n\t\ti = newStartFrom;\n\t}\n\n\treturn [result, i];\n}\n\nexport function parsePgArray(arrayString: string): any[] {\n\tconst [result] = parsePgNestedArray(arrayString, 1);\n\treturn result;\n}\n\nexport function makePgArray(array: any[]): string {\n\treturn `{${\n\t\tarray.map((item) => {\n\t\t\tif (Array.isArray(item)) {\n\t\t\t\treturn makePgArray(item);\n\t\t\t}\n\n\t\t\tif (typeof item === 'string') {\n\t\t\t\treturn `\"${item.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"')}\"`;\n\t\t\t}\n\n\t\t\treturn `${item}`;\n\t\t}).join(',')\n\t}}`;\n}\n", "import type {\n\tColumnBuilderBase,\n\tColumnBuilderBaseConfig,\n\tColumnBuilderExtraConfig,\n\tColumnBuilderRuntimeConfig,\n\tColumnDataType,\n\tHasGenerated,\n\tMakeColumnConfig,\n} from '~/column-builder.ts';\nimport { ColumnBuilder } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { Column } from '~/column.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport type { Simplify, Update } from '~/utils.ts';\n\nimport type { ForeignKey, UpdateDeleteAction } from '~/pg-core/foreign-keys.ts';\nimport { ForeignKeyBuilder } from '~/pg-core/foreign-keys.ts';\nimport type { AnyPgTable, PgTable } from '~/pg-core/table.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport { iife } from '~/tracing-utils.ts';\nimport type { PgIndexOpClass } from '../indexes.ts';\nimport { uniqueKeyName } from '../unique-constraint.ts';\nimport { makePgArray, parsePgArray } from '../utils/array.ts';\n\nexport interface ReferenceConfig {\n\tref: () => PgColumn;\n\tactions: {\n\t\tonUpdate?: UpdateDeleteAction;\n\t\tonDelete?: UpdateDeleteAction;\n\t};\n}\n\nexport interface PgColumnBuilderBase<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTTypeConfig extends object = object,\n> extends ColumnBuilderBase {}\n\nexport abstract class PgColumnBuilder<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTRuntimeConfig extends object = object,\n\tTTypeConfig extends object = object,\n\tTExtraConfig extends ColumnBuilderExtraConfig = ColumnBuilderExtraConfig,\n> extends ColumnBuilder\n\timplements PgColumnBuilderBase\n{\n\tprivate foreignKeyConfigs: ReferenceConfig[] = [];\n\n\tstatic override readonly [entityKind]: string = 'PgColumnBuilder';\n\n\tarray(size?: TSize): PgArrayBuilder<\n\t\t& {\n\t\t\tname: T['name'];\n\t\t\tdataType: 'array';\n\t\t\tcolumnType: 'PgArray';\n\t\t\tdata: T['data'][];\n\t\t\tdriverParam: T['driverParam'][] | string;\n\t\t\tenumValues: T['enumValues'];\n\t\t\tsize: TSize;\n\t\t\tbaseBuilder: T;\n\t\t}\n\t\t& (T extends { notNull: true } ? { notNull: true } : {})\n\t\t& (T extends { hasDefault: true } ? { hasDefault: true } : {}),\n\t\tT\n\t> {\n\t\treturn new PgArrayBuilder(this.config.name, this as PgColumnBuilder, size as any);\n\t}\n\n\treferences(\n\t\tref: ReferenceConfig['ref'],\n\t\tactions: ReferenceConfig['actions'] = {},\n\t): this {\n\t\tthis.foreignKeyConfigs.push({ ref, actions });\n\t\treturn this;\n\t}\n\n\tunique(\n\t\tname?: string,\n\t\tconfig?: { nulls: 'distinct' | 'not distinct' },\n\t): this {\n\t\tthis.config.isUnique = true;\n\t\tthis.config.uniqueName = name;\n\t\tthis.config.uniqueType = config?.nulls;\n\t\treturn this;\n\t}\n\n\tgeneratedAlwaysAs(as: SQL | T['data'] | (() => SQL)): HasGenerated {\n\t\tthis.config.generated = {\n\t\t\tas,\n\t\t\ttype: 'always',\n\t\t\tmode: 'stored',\n\t\t};\n\t\treturn this as HasGenerated;\n\t}\n\n\t/** @internal */\n\tbuildForeignKeys(column: PgColumn, table: PgTable): ForeignKey[] {\n\t\treturn this.foreignKeyConfigs.map(({ ref, actions }) => {\n\t\t\treturn iife(\n\t\t\t\t(ref, actions) => {\n\t\t\t\t\tconst builder = new ForeignKeyBuilder(() => {\n\t\t\t\t\t\tconst foreignColumn = ref();\n\t\t\t\t\t\treturn { columns: [column], foreignColumns: [foreignColumn] };\n\t\t\t\t\t});\n\t\t\t\t\tif (actions.onUpdate) {\n\t\t\t\t\t\tbuilder.onUpdate(actions.onUpdate);\n\t\t\t\t\t}\n\t\t\t\t\tif (actions.onDelete) {\n\t\t\t\t\t\tbuilder.onDelete(actions.onDelete);\n\t\t\t\t\t}\n\t\t\t\t\treturn builder.build(table);\n\t\t\t\t},\n\t\t\t\tref,\n\t\t\t\tactions,\n\t\t\t);\n\t\t});\n\t}\n\n\t/** @internal */\n\tabstract build(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgColumn>;\n\n\t/** @internal */\n\tbuildExtraConfigColumn(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): ExtraConfigColumn {\n\t\treturn new ExtraConfigColumn(table, this.config);\n\t}\n}\n\n// To understand how to use `PgColumn` and `PgColumn`, see `Column` and `AnyColumn` documentation.\nexport abstract class PgColumn<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n\tTRuntimeConfig extends object = {},\n\tTTypeConfig extends object = {},\n> extends Column {\n\tstatic override readonly [entityKind]: string = 'PgColumn';\n\n\tconstructor(\n\t\toverride readonly table: PgTable,\n\t\tconfig: ColumnBuilderRuntimeConfig,\n\t) {\n\t\tif (!config.uniqueName) {\n\t\t\tconfig.uniqueName = uniqueKeyName(table, [config.name]);\n\t\t}\n\t\tsuper(table, config);\n\t}\n}\n\nexport type IndexedExtraConfigType = { order?: 'asc' | 'desc'; nulls?: 'first' | 'last'; opClass?: string };\n\nexport class ExtraConfigColumn<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n> extends PgColumn {\n\tstatic override readonly [entityKind]: string = 'ExtraConfigColumn';\n\n\toverride getSQLType(): string {\n\t\treturn this.getSQLType();\n\t}\n\n\tindexConfig: IndexedExtraConfigType = {\n\t\torder: this.config.order ?? 'asc',\n\t\tnulls: this.config.nulls ?? 'last',\n\t\topClass: this.config.opClass,\n\t};\n\tdefaultConfig: IndexedExtraConfigType = {\n\t\torder: 'asc',\n\t\tnulls: 'last',\n\t\topClass: undefined,\n\t};\n\n\tasc(): Omit {\n\t\tthis.indexConfig.order = 'asc';\n\t\treturn this;\n\t}\n\n\tdesc(): Omit {\n\t\tthis.indexConfig.order = 'desc';\n\t\treturn this;\n\t}\n\n\tnullsFirst(): Omit {\n\t\tthis.indexConfig.nulls = 'first';\n\t\treturn this;\n\t}\n\n\tnullsLast(): Omit {\n\t\tthis.indexConfig.nulls = 'last';\n\t\treturn this;\n\t}\n\n\t/**\n\t * ### PostgreSQL documentation quote\n\t *\n\t * > An operator class with optional parameters can be specified for each column of an index.\n\t * The operator class identifies the operators to be used by the index for that column.\n\t * For example, a B-tree index on four-byte integers would use the int4_ops class;\n\t * this operator class includes comparison functions for four-byte integers.\n\t * In practice the default operator class for the column's data type is usually sufficient.\n\t * The main point of having operator classes is that for some data types, there could be more than one meaningful ordering.\n\t * For example, we might want to sort a complex-number data type either by absolute value or by real part.\n\t * We could do this by defining two operator classes for the data type and then selecting the proper class when creating an index.\n\t * More information about operator classes check:\n\t *\n\t * ### Useful links\n\t * https://www.postgresql.org/docs/current/sql-createindex.html\n\t *\n\t * https://www.postgresql.org/docs/current/indexes-opclass.html\n\t *\n\t * https://www.postgresql.org/docs/current/xindex.html\n\t *\n\t * ### Additional types\n\t * If you have the `pg_vector` extension installed in your database, you can use the\n\t * `vector_l2_ops`, `vector_ip_ops`, `vector_cosine_ops`, `vector_l1_ops`, `bit_hamming_ops`, `bit_jaccard_ops`, `halfvec_l2_ops`, `sparsevec_l2_ops` options, which are predefined types.\n\t *\n\t * **You can always specify any string you want in the operator class, in case Drizzle doesn't have it natively in its types**\n\t *\n\t * @param opClass\n\t * @returns\n\t */\n\top(opClass: PgIndexOpClass): Omit {\n\t\tthis.indexConfig.opClass = opClass;\n\t\treturn this;\n\t}\n}\n\nexport class IndexedColumn {\n\tstatic readonly [entityKind]: string = 'IndexedColumn';\n\tconstructor(\n\t\tname: string | undefined,\n\t\tkeyAsName: boolean,\n\t\ttype: string,\n\t\tindexConfig: IndexedExtraConfigType,\n\t) {\n\t\tthis.name = name;\n\t\tthis.keyAsName = keyAsName;\n\t\tthis.type = type;\n\t\tthis.indexConfig = indexConfig;\n\t}\n\n\tname: string | undefined;\n\tkeyAsName: boolean;\n\ttype: string;\n\tindexConfig: IndexedExtraConfigType;\n}\n\nexport type AnyPgColumn> = {}> = PgColumn<\n\tRequired, TPartial>>\n>;\n\nexport type PgArrayColumnBuilderBaseConfig = ColumnBuilderBaseConfig<'array', 'PgArray'> & {\n\tsize: number | undefined;\n\tbaseBuilder: ColumnBuilderBaseConfig;\n};\n\nexport class PgArrayBuilder<\n\tT extends PgArrayColumnBuilderBaseConfig,\n\tTBase extends ColumnBuilderBaseConfig | PgArrayColumnBuilderBaseConfig,\n> extends PgColumnBuilder<\n\tT,\n\t{\n\t\tbaseBuilder: TBase extends PgArrayColumnBuilderBaseConfig ? PgArrayBuilder<\n\t\t\t\tTBase,\n\t\t\t\tTBase extends { baseBuilder: infer TBaseBuilder extends ColumnBuilderBaseConfig } ? TBaseBuilder\n\t\t\t\t\t: never\n\t\t\t>\n\t\t\t: PgColumnBuilder>>>;\n\t\tsize: T['size'];\n\t},\n\t{\n\t\tbaseBuilder: TBase extends PgArrayColumnBuilderBaseConfig ? PgArrayBuilder<\n\t\t\t\tTBase,\n\t\t\t\tTBase extends { baseBuilder: infer TBaseBuilder extends ColumnBuilderBaseConfig } ? TBaseBuilder\n\t\t\t\t\t: never\n\t\t\t>\n\t\t\t: PgColumnBuilder>>>;\n\t\tsize: T['size'];\n\t}\n> {\n\tstatic override readonly [entityKind] = 'PgArrayBuilder';\n\n\tconstructor(\n\t\tname: string,\n\t\tbaseBuilder: PgArrayBuilder['config']['baseBuilder'],\n\t\tsize: T['size'],\n\t) {\n\t\tsuper(name, 'array', 'PgArray');\n\t\tthis.config.baseBuilder = baseBuilder;\n\t\tthis.config.size = size;\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgArray & { size: T['size']; baseBuilder: T['baseBuilder'] }, TBase> {\n\t\tconst baseColumn = this.config.baseBuilder.build(table);\n\t\treturn new PgArray & { size: T['size']; baseBuilder: T['baseBuilder'] }, TBase>(\n\t\t\ttable as AnyPgTable<{ name: MakeColumnConfig['tableName'] }>,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t\tbaseColumn,\n\t\t);\n\t}\n}\n\nexport class PgArray<\n\tT extends ColumnBaseConfig<'array', 'PgArray'> & {\n\t\tsize: number | undefined;\n\t\tbaseBuilder: ColumnBuilderBaseConfig;\n\t},\n\tTBase extends ColumnBuilderBaseConfig,\n> extends PgColumn {\n\treadonly size: T['size'];\n\n\tstatic override readonly [entityKind]: string = 'PgArray';\n\n\tconstructor(\n\t\ttable: AnyPgTable<{ name: T['tableName'] }>,\n\t\tconfig: PgArrayBuilder['config'],\n\t\treadonly baseColumn: PgColumn,\n\t\treadonly range?: [number | undefined, number | undefined],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.size = config.size;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn `${this.baseColumn.getSQLType()}[${typeof this.size === 'number' ? this.size : ''}]`;\n\t}\n\n\toverride mapFromDriverValue(value: unknown[] | string): T['data'] {\n\t\tif (typeof value === 'string') {\n\t\t\t// Thank you node-postgres for not parsing enum arrays\n\t\t\tvalue = parsePgArray(value);\n\t\t}\n\t\treturn value.map((v) => this.baseColumn.mapFromDriverValue(v));\n\t}\n\n\toverride mapToDriverValue(value: unknown[], isNestedArray = false): unknown[] | string {\n\t\tconst a = value.map((v) =>\n\t\t\tv === null\n\t\t\t\t? null\n\t\t\t\t: is(this.baseColumn, PgArray)\n\t\t\t\t? this.baseColumn.mapToDriverValue(v as unknown[], true)\n\t\t\t\t: this.baseColumn.mapToDriverValue(v)\n\t\t);\n\t\tif (isNestedArray) return a;\n\t\treturn makePgArray(a);\n\t}\n}\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport type { NonArray, Writable } from '~/utils.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\n// Enum as ts enum\n\nexport type PgEnumObjectColumnBuilderInitial = PgEnumObjectColumnBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgEnumObjectColumn';\n\tdata: TValues[keyof TValues];\n\tenumValues: string[];\n\tdriverParam: string;\n}>;\n\nexport interface PgEnumObject {\n\t(): PgEnumObjectColumnBuilderInitial<'', TValues>;\n\t(name: TName): PgEnumObjectColumnBuilderInitial;\n\t(name?: TName): PgEnumObjectColumnBuilderInitial;\n\n\treadonly enumName: string;\n\treadonly enumValues: string[];\n\treadonly schema: string | undefined;\n\t/** @internal */\n\t[isPgEnumSym]: true;\n}\n\nexport class PgEnumObjectColumnBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'PgEnumObjectColumn'> & { enumValues: string[] },\n> extends PgColumnBuilder }> {\n\tstatic override readonly [entityKind]: string = 'PgEnumObjectColumnBuilder';\n\n\tconstructor(name: T['name'], enumInstance: PgEnumObject) {\n\t\tsuper(name, 'string', 'PgEnumObjectColumn');\n\t\tthis.config.enum = enumInstance;\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgEnumObjectColumn> {\n\t\treturn new PgEnumObjectColumn>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class PgEnumObjectColumn & { enumValues: object }>\n\textends PgColumn }>\n{\n\tstatic override readonly [entityKind]: string = 'PgEnumObjectColumn';\n\n\treadonly enum;\n\toverride readonly enumValues = this.config.enum.enumValues;\n\n\tconstructor(\n\t\ttable: AnyPgTable<{ name: T['tableName'] }>,\n\t\tconfig: PgEnumObjectColumnBuilder['config'],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.enum = config.enum;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn this.enum.enumName;\n\t}\n}\n\n// Enum as string union\n\nexport type PgEnumColumnBuilderInitial =\n\tPgEnumColumnBuilder<{\n\t\tname: TName;\n\t\tdataType: 'string';\n\t\tcolumnType: 'PgEnumColumn';\n\t\tdata: TValues[number];\n\t\tenumValues: TValues;\n\t\tdriverParam: string;\n\t}>;\n\nconst isPgEnumSym = Symbol.for('drizzle:isPgEnum');\nexport interface PgEnum {\n\t(): PgEnumColumnBuilderInitial<'', TValues>;\n\t(name: TName): PgEnumColumnBuilderInitial;\n\t(name?: TName): PgEnumColumnBuilderInitial;\n\n\treadonly enumName: string;\n\treadonly enumValues: TValues;\n\treadonly schema: string | undefined;\n\t/** @internal */\n\t[isPgEnumSym]: true;\n}\n\nexport function isPgEnum(obj: unknown): obj is PgEnum<[string, ...string[]]> {\n\treturn !!obj && typeof obj === 'function' && isPgEnumSym in obj && obj[isPgEnumSym] === true;\n}\n\nexport class PgEnumColumnBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'PgEnumColumn'> & { enumValues: [string, ...string[]] },\n> extends PgColumnBuilder }> {\n\tstatic override readonly [entityKind]: string = 'PgEnumColumnBuilder';\n\n\tconstructor(name: T['name'], enumInstance: PgEnum) {\n\t\tsuper(name, 'string', 'PgEnumColumn');\n\t\tthis.config.enum = enumInstance;\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgEnumColumn> {\n\t\treturn new PgEnumColumn>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class PgEnumColumn & { enumValues: [string, ...string[]] }>\n\textends PgColumn }>\n{\n\tstatic override readonly [entityKind]: string = 'PgEnumColumn';\n\n\treadonly enum = this.config.enum;\n\toverride readonly enumValues = this.config.enum.enumValues;\n\n\tconstructor(\n\t\ttable: AnyPgTable<{ name: T['tableName'] }>,\n\t\tconfig: PgEnumColumnBuilder['config'],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.enum = config.enum;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn this.enum.enumName;\n\t}\n}\n\nexport function pgEnum>(\n\tenumName: string,\n\tvalues: T | Writable,\n): PgEnum>;\n\nexport function pgEnum>(\n\tenumName: string,\n\tenumObj: NonArray,\n): PgEnumObject;\n\nexport function pgEnum(\n\tenumName: any,\n\tinput: any,\n): any {\n\treturn Array.isArray(input)\n\t\t? pgEnumWithSchema(enumName, [...input] as [string, ...string[]], undefined)\n\t\t: pgEnumObjectWithSchema(enumName, input, undefined);\n}\n\n/** @internal */\nexport function pgEnumWithSchema>(\n\tenumName: string,\n\tvalues: T | Writable,\n\tschema?: string,\n): PgEnum> {\n\tconst enumInstance: PgEnum> = Object.assign(\n\t\t(name?: TName): PgEnumColumnBuilderInitial> =>\n\t\t\tnew PgEnumColumnBuilder(name ?? '' as TName, enumInstance),\n\t\t{\n\t\t\tenumName,\n\t\t\tenumValues: values,\n\t\t\tschema,\n\t\t\t[isPgEnumSym]: true,\n\t\t} as const,\n\t);\n\n\treturn enumInstance;\n}\n\n/** @internal */\nexport function pgEnumObjectWithSchema(\n\tenumName: string,\n\tvalues: T,\n\tschema?: string,\n): PgEnumObject {\n\tconst enumInstance: PgEnumObject = Object.assign(\n\t\t(name?: TName): PgEnumObjectColumnBuilderInitial =>\n\t\t\tnew PgEnumObjectColumnBuilder(name ?? '' as TName, enumInstance),\n\t\t{\n\t\t\tenumName,\n\t\t\tenumValues: Object.values(values),\n\t\t\tschema,\n\t\t\t[isPgEnumSym]: true,\n\t\t} as const,\n\t);\n\n\treturn enumInstance;\n}\n", "import { entityKind } from './entity.ts';\nimport type { SQL, SQLWrapper } from './sql/sql.ts';\n\nexport interface Subquery<\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTAlias extends string = string,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTSelectedFields extends Record = Record,\n> extends SQLWrapper {\n\t// SQLWrapper runtime implementation is defined in 'sql/sql.ts'\n}\nexport class Subquery<\n\tTAlias extends string = string,\n\tTSelectedFields extends Record = Record,\n> implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Subquery';\n\n\tdeclare _: {\n\t\tbrand: 'Subquery';\n\t\tsql: SQL;\n\t\tselectedFields: TSelectedFields;\n\t\talias: TAlias;\n\t\tisWith: boolean;\n\t\tusedTables?: string[];\n\t};\n\n\tconstructor(sql: SQL, fields: TSelectedFields, alias: string, isWith = false, usedTables: string[] = []) {\n\t\tthis._ = {\n\t\t\tbrand: 'Subquery',\n\t\t\tsql,\n\t\t\tselectedFields: fields as TSelectedFields,\n\t\t\talias: alias as TAlias,\n\t\t\tisWith,\n\t\t\tusedTables,\n\t\t};\n\t}\n\n\t// getSQL(): SQL {\n\t// \treturn new SQL([this]);\n\t// }\n}\n\nexport class WithSubquery<\n\tTAlias extends string = string,\n\tTSelection extends Record = Record,\n> extends Subquery {\n\tstatic override readonly [entityKind]: string = 'WithSubquery';\n}\n\nexport type WithSubqueryWithoutSelection = WithSubquery;\n", "// package.json\nvar version = \"0.44.7\";\n\n// src/version.ts\nvar compatibilityVersion = 10;\nexport {\n compatibilityVersion,\n version as npmVersion\n};\n", "import type { Span, Tracer } from '@opentelemetry/api';\nimport { iife } from '~/tracing-utils.ts';\nimport { npmVersion } from '~/version.ts';\n\nlet otel: typeof import('@opentelemetry/api') | undefined;\nlet rawTracer: Tracer | undefined;\n// try {\n// \totel = await import('@opentelemetry/api');\n// } catch (err: any) {\n// \tif (err.code !== 'MODULE_NOT_FOUND' && err.code !== 'ERR_MODULE_NOT_FOUND') {\n// \t\tthrow err;\n// \t}\n// }\n\ntype SpanName =\n\t| 'drizzle.operation'\n\t| 'drizzle.prepareQuery'\n\t| 'drizzle.buildSQL'\n\t| 'drizzle.execute'\n\t| 'drizzle.driver.execute'\n\t| 'drizzle.mapResponse';\n\n/** @internal */\nexport const tracer = {\n\tstartActiveSpan unknown>(name: SpanName, fn: F): ReturnType {\n\t\tif (!otel) {\n\t\t\treturn fn() as ReturnType;\n\t\t}\n\n\t\tif (!rawTracer) {\n\t\t\trawTracer = otel.trace.getTracer('drizzle-orm', npmVersion);\n\t\t}\n\n\t\treturn iife(\n\t\t\t(otel, rawTracer) =>\n\t\t\t\trawTracer.startActiveSpan(\n\t\t\t\t\tname,\n\t\t\t\t\t((span: Span) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn fn(span);\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tspan.setStatus({\n\t\t\t\t\t\t\t\tcode: otel.SpanStatusCode.ERROR,\n\t\t\t\t\t\t\t\tmessage: e instanceof Error ? e.message : 'Unknown error', // eslint-disable-line no-instanceof/no-instanceof\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tthrow e;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tspan.end();\n\t\t\t\t\t\t}\n\t\t\t\t\t}) as F,\n\t\t\t\t),\n\t\t\totel,\n\t\t\trawTracer,\n\t\t);\n\t},\n};\n", "export const ViewBaseConfig = Symbol.for('drizzle:ViewBaseConfig');\n", "import type { CasingCache } from '~/casing.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport { isPgEnum } from '~/pg-core/columns/enum.ts';\nimport type { SelectResult } from '~/query-builders/select.types.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { tracer } from '~/tracing.ts';\nimport type { Assume, Equal } from '~/utils.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport type { AnyColumn } from '../column.ts';\nimport { Column } from '../column.ts';\nimport { IsAlias, Table } from '../table.ts';\n\n/**\n * This class is used to indicate a primitive param value that is used in `sql` tag.\n * It is only used on type level and is never instantiated at runtime.\n * If you see a value of this type in the code, its runtime value is actually the primitive param value.\n */\nexport class FakePrimitiveParam {\n\tstatic readonly [entityKind]: string = 'FakePrimitiveParam';\n}\n\nexport type Chunk =\n\t| string\n\t| Table\n\t| View\n\t| AnyColumn\n\t| Name\n\t| Param\n\t| Placeholder\n\t| SQL;\n\nexport interface BuildQueryConfig {\n\tcasing: CasingCache;\n\tescapeName(name: string): string;\n\tescapeParam(num: number, value: unknown): string;\n\tescapeString(str: string): string;\n\tprepareTyping?: (encoder: DriverValueEncoder) => QueryTypingsValue;\n\tparamStartIndex?: { value: number };\n\tinlineParams?: boolean;\n\tinvokeSource?: 'indexes' | undefined;\n}\n\nexport type QueryTypingsValue = 'json' | 'decimal' | 'time' | 'timestamp' | 'uuid' | 'date' | 'none';\n\nexport interface Query {\n\tsql: string;\n\tparams: unknown[];\n}\n\nexport interface QueryWithTypings extends Query {\n\ttypings?: QueryTypingsValue[];\n}\n\n/**\n * Any value that implements the `getSQL` method. The implementations include:\n * - `Table`\n * - `Column`\n * - `View`\n * - `Subquery`\n * - `SQL`\n * - `SQL.Aliased`\n * - `Placeholder`\n * - `Param`\n */\nexport interface SQLWrapper {\n\tgetSQL(): SQL;\n\tshouldOmitSQLParens?(): boolean;\n}\n\nexport function isSQLWrapper(value: unknown): value is SQLWrapper {\n\treturn value !== null && value !== undefined && typeof (value as any).getSQL === 'function';\n}\n\nfunction mergeQueries(queries: QueryWithTypings[]): QueryWithTypings {\n\tconst result: QueryWithTypings = { sql: '', params: [] };\n\tfor (const query of queries) {\n\t\tresult.sql += query.sql;\n\t\tresult.params.push(...query.params);\n\t\tif (query.typings?.length) {\n\t\t\tif (!result.typings) {\n\t\t\t\tresult.typings = [];\n\t\t\t}\n\t\t\tresult.typings.push(...query.typings);\n\t\t}\n\t}\n\treturn result;\n}\n\nexport class StringChunk implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'StringChunk';\n\n\treadonly value: string[];\n\n\tconstructor(value: string | string[]) {\n\t\tthis.value = Array.isArray(value) ? value : [value];\n\t}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\nexport class SQL implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'SQL';\n\n\tdeclare _: {\n\t\tbrand: 'SQL';\n\t\ttype: T;\n\t};\n\n\t/** @internal */\n\tdecoder: DriverValueDecoder = noopDecoder;\n\tprivate shouldInlineParams = false;\n\n\t/** @internal */\n\tusedTables: string[] = [];\n\n\tconstructor(readonly queryChunks: SQLChunk[]) {\n\t\tfor (const chunk of queryChunks) {\n\t\t\tif (is(chunk, Table)) {\n\t\t\t\tconst schemaName = chunk[Table.Symbol.Schema];\n\n\t\t\t\tthis.usedTables.push(\n\t\t\t\t\tschemaName === undefined\n\t\t\t\t\t\t? chunk[Table.Symbol.Name]\n\t\t\t\t\t\t: schemaName + '.' + chunk[Table.Symbol.Name],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tappend(query: SQL): this {\n\t\tthis.queryChunks.push(...query.queryChunks);\n\t\treturn this;\n\t}\n\n\ttoQuery(config: BuildQueryConfig): QueryWithTypings {\n\t\treturn tracer.startActiveSpan('drizzle.buildSQL', (span) => {\n\t\t\tconst query = this.buildQueryFromSourceParams(this.queryChunks, config);\n\t\t\tspan?.setAttributes({\n\t\t\t\t'drizzle.query.text': query.sql,\n\t\t\t\t'drizzle.query.params': JSON.stringify(query.params),\n\t\t\t});\n\t\t\treturn query;\n\t\t});\n\t}\n\n\tbuildQueryFromSourceParams(chunks: SQLChunk[], _config: BuildQueryConfig): Query {\n\t\tconst config = Object.assign({}, _config, {\n\t\t\tinlineParams: _config.inlineParams || this.shouldInlineParams,\n\t\t\tparamStartIndex: _config.paramStartIndex || { value: 0 },\n\t\t});\n\n\t\tconst {\n\t\t\tcasing,\n\t\t\tescapeName,\n\t\t\tescapeParam,\n\t\t\tprepareTyping,\n\t\t\tinlineParams,\n\t\t\tparamStartIndex,\n\t\t} = config;\n\n\t\treturn mergeQueries(chunks.map((chunk): QueryWithTypings => {\n\t\t\tif (is(chunk, StringChunk)) {\n\t\t\t\treturn { sql: chunk.value.join(''), params: [] };\n\t\t\t}\n\n\t\t\tif (is(chunk, Name)) {\n\t\t\t\treturn { sql: escapeName(chunk.value), params: [] };\n\t\t\t}\n\n\t\t\tif (chunk === undefined) {\n\t\t\t\treturn { sql: '', params: [] };\n\t\t\t}\n\n\t\t\tif (Array.isArray(chunk)) {\n\t\t\t\tconst result: SQLChunk[] = [new StringChunk('(')];\n\t\t\t\tfor (const [i, p] of chunk.entries()) {\n\t\t\t\t\tresult.push(p);\n\t\t\t\t\tif (i < chunk.length - 1) {\n\t\t\t\t\t\tresult.push(new StringChunk(', '));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult.push(new StringChunk(')'));\n\t\t\t\treturn this.buildQueryFromSourceParams(result, config);\n\t\t\t}\n\n\t\t\tif (is(chunk, SQL)) {\n\t\t\t\treturn this.buildQueryFromSourceParams(chunk.queryChunks, {\n\t\t\t\t\t...config,\n\t\t\t\t\tinlineParams: inlineParams || chunk.shouldInlineParams,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (is(chunk, Table)) {\n\t\t\t\tconst schemaName = chunk[Table.Symbol.Schema];\n\t\t\t\tconst tableName = chunk[Table.Symbol.Name];\n\t\t\t\treturn {\n\t\t\t\t\tsql: schemaName === undefined || chunk[IsAlias]\n\t\t\t\t\t\t? escapeName(tableName)\n\t\t\t\t\t\t: escapeName(schemaName) + '.' + escapeName(tableName),\n\t\t\t\t\tparams: [],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (is(chunk, Column)) {\n\t\t\t\tconst columnName = casing.getColumnCasing(chunk);\n\t\t\t\tif (_config.invokeSource === 'indexes') {\n\t\t\t\t\treturn { sql: escapeName(columnName), params: [] };\n\t\t\t\t}\n\n\t\t\t\tconst schemaName = chunk.table[Table.Symbol.Schema];\n\t\t\t\treturn {\n\t\t\t\t\tsql: chunk.table[IsAlias] || schemaName === undefined\n\t\t\t\t\t\t? escapeName(chunk.table[Table.Symbol.Name]) + '.' + escapeName(columnName)\n\t\t\t\t\t\t: escapeName(schemaName) + '.' + escapeName(chunk.table[Table.Symbol.Name]) + '.'\n\t\t\t\t\t\t\t+ escapeName(columnName),\n\t\t\t\t\tparams: [],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (is(chunk, View)) {\n\t\t\t\tconst schemaName = chunk[ViewBaseConfig].schema;\n\t\t\t\tconst viewName = chunk[ViewBaseConfig].name;\n\t\t\t\treturn {\n\t\t\t\t\tsql: schemaName === undefined || chunk[ViewBaseConfig].isAlias\n\t\t\t\t\t\t? escapeName(viewName)\n\t\t\t\t\t\t: escapeName(schemaName) + '.' + escapeName(viewName),\n\t\t\t\t\tparams: [],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (is(chunk, Param)) {\n\t\t\t\tif (is(chunk.value, Placeholder)) {\n\t\t\t\t\treturn { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ['none'] };\n\t\t\t\t}\n\n\t\t\t\tconst mappedValue = chunk.value === null ? null : chunk.encoder.mapToDriverValue(chunk.value);\n\n\t\t\t\tif (is(mappedValue, SQL)) {\n\t\t\t\t\treturn this.buildQueryFromSourceParams([mappedValue], config);\n\t\t\t\t}\n\n\t\t\t\tif (inlineParams) {\n\t\t\t\t\treturn { sql: this.mapInlineParam(mappedValue, config), params: [] };\n\t\t\t\t}\n\n\t\t\t\tlet typings: QueryTypingsValue[] = ['none'];\n\t\t\t\tif (prepareTyping) {\n\t\t\t\t\ttypings = [prepareTyping(chunk.encoder)];\n\t\t\t\t}\n\n\t\t\t\treturn { sql: escapeParam(paramStartIndex.value++, mappedValue), params: [mappedValue], typings };\n\t\t\t}\n\n\t\t\tif (is(chunk, Placeholder)) {\n\t\t\t\treturn { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ['none'] };\n\t\t\t}\n\n\t\t\tif (is(chunk, SQL.Aliased) && chunk.fieldAlias !== undefined) {\n\t\t\t\treturn { sql: escapeName(chunk.fieldAlias), params: [] };\n\t\t\t}\n\n\t\t\tif (is(chunk, Subquery)) {\n\t\t\t\tif (chunk._.isWith) {\n\t\t\t\t\treturn { sql: escapeName(chunk._.alias), params: [] };\n\t\t\t\t}\n\t\t\t\treturn this.buildQueryFromSourceParams([\n\t\t\t\t\tnew StringChunk('('),\n\t\t\t\t\tchunk._.sql,\n\t\t\t\t\tnew StringChunk(') '),\n\t\t\t\t\tnew Name(chunk._.alias),\n\t\t\t\t], config);\n\t\t\t}\n\n\t\t\tif (isPgEnum(chunk)) {\n\t\t\t\tif (chunk.schema) {\n\t\t\t\t\treturn { sql: escapeName(chunk.schema) + '.' + escapeName(chunk.enumName), params: [] };\n\t\t\t\t}\n\t\t\t\treturn { sql: escapeName(chunk.enumName), params: [] };\n\t\t\t}\n\n\t\t\tif (isSQLWrapper(chunk)) {\n\t\t\t\tif (chunk.shouldOmitSQLParens?.()) {\n\t\t\t\t\treturn this.buildQueryFromSourceParams([chunk.getSQL()], config);\n\t\t\t\t}\n\t\t\t\treturn this.buildQueryFromSourceParams([\n\t\t\t\t\tnew StringChunk('('),\n\t\t\t\t\tchunk.getSQL(),\n\t\t\t\t\tnew StringChunk(')'),\n\t\t\t\t], config);\n\t\t\t}\n\n\t\t\tif (inlineParams) {\n\t\t\t\treturn { sql: this.mapInlineParam(chunk, config), params: [] };\n\t\t\t}\n\n\t\t\treturn { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ['none'] };\n\t\t}));\n\t}\n\n\tprivate mapInlineParam(\n\t\tchunk: unknown,\n\t\t{ escapeString }: BuildQueryConfig,\n\t): string {\n\t\tif (chunk === null) {\n\t\t\treturn 'null';\n\t\t}\n\t\tif (typeof chunk === 'number' || typeof chunk === 'boolean') {\n\t\t\treturn chunk.toString();\n\t\t}\n\t\tif (typeof chunk === 'string') {\n\t\t\treturn escapeString(chunk);\n\t\t}\n\t\tif (typeof chunk === 'object') {\n\t\t\tconst mappedValueAsString = chunk.toString();\n\t\t\tif (mappedValueAsString === '[object Object]') {\n\t\t\t\treturn escapeString(JSON.stringify(chunk));\n\t\t\t}\n\t\t\treturn escapeString(mappedValueAsString);\n\t\t}\n\t\tthrow new Error('Unexpected param value: ' + chunk);\n\t}\n\n\tgetSQL(): SQL {\n\t\treturn this;\n\t}\n\n\tas(alias: string): SQL.Aliased;\n\t/**\n\t * @deprecated\n\t * Use ``sql`query`.as(alias)`` instead.\n\t */\n\tas(): SQL;\n\t/**\n\t * @deprecated\n\t * Use ``sql`query`.as(alias)`` instead.\n\t */\n\tas(alias: string): SQL.Aliased;\n\tas(alias?: string): SQL | SQL.Aliased {\n\t\t// TODO: remove with deprecated overloads\n\t\tif (alias === undefined) {\n\t\t\treturn this;\n\t\t}\n\n\t\treturn new SQL.Aliased(this, alias);\n\t}\n\n\tmapWith<\n\t\tTDecoder extends\n\t\t\t| DriverValueDecoder\n\t\t\t| DriverValueDecoder['mapFromDriverValue'],\n\t>(decoder: TDecoder): SQL> {\n\t\tthis.decoder = typeof decoder === 'function' ? { mapFromDriverValue: decoder } : decoder;\n\t\treturn this as SQL>;\n\t}\n\n\tinlineParams(): this {\n\t\tthis.shouldInlineParams = true;\n\t\treturn this;\n\t}\n\n\t/**\n\t * This method is used to conditionally include a part of the query.\n\t *\n\t * @param condition - Condition to check\n\t * @returns itself if the condition is `true`, otherwise `undefined`\n\t */\n\tif(condition: any | undefined): this | undefined {\n\t\treturn condition ? this : undefined;\n\t}\n}\n\nexport type GetDecoderResult = T extends Column ? T['_']['data'] : T extends\n\t| DriverValueDecoder\n\t| DriverValueDecoder['mapFromDriverValue'] ? TData\n: never;\n\n/**\n * Any DB name (table, column, index etc.)\n */\nexport class Name implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Name';\n\n\tprotected brand!: 'Name';\n\n\tconstructor(readonly value: string) {}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\n/**\n * Any DB name (table, column, index etc.)\n * @deprecated Use `sql.identifier` instead.\n */\nexport function name(value: string): Name {\n\treturn new Name(value);\n}\n\nexport interface DriverValueDecoder {\n\tmapFromDriverValue(value: TDriverParam): TData;\n}\n\nexport interface DriverValueEncoder {\n\tmapToDriverValue(value: TData): TDriverParam | SQL;\n}\n\nexport function isDriverValueEncoder(value: unknown): value is DriverValueEncoder {\n\treturn typeof value === 'object' && value !== null && 'mapToDriverValue' in value\n\t\t&& typeof (value as any).mapToDriverValue === 'function';\n}\n\nexport const noopDecoder: DriverValueDecoder = {\n\tmapFromDriverValue: (value) => value,\n};\n\nexport const noopEncoder: DriverValueEncoder = {\n\tmapToDriverValue: (value) => value,\n};\n\nexport interface DriverValueMapper\n\textends DriverValueDecoder, DriverValueEncoder\n{}\n\nexport const noopMapper: DriverValueMapper = {\n\t...noopDecoder,\n\t...noopEncoder,\n};\n\n/** Parameter value that is optionally bound to an encoder (for example, a column). */\nexport class Param implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Param';\n\n\tprotected brand!: 'BoundParamValue';\n\n\t/**\n\t * @param value - Parameter value\n\t * @param encoder - Encoder to convert the value to a driver parameter\n\t */\n\tconstructor(\n\t\treadonly value: TDataType,\n\t\treadonly encoder: DriverValueEncoder = noopEncoder,\n\t) {}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\n/** @deprecated Use `sql.param` instead. */\nexport function param(\n\tvalue: TData,\n\tencoder?: DriverValueEncoder,\n): Param {\n\treturn new Param(value, encoder);\n}\n\n/**\n * Anything that can be passed to the `` sql`...` `` tagged function.\n */\nexport type SQLChunk =\n\t| StringChunk\n\t| SQLChunk[]\n\t| SQLWrapper\n\t| SQL\n\t| Table\n\t| View\n\t| Subquery\n\t| AnyColumn\n\t| Param\n\t| Name\n\t| undefined\n\t| FakePrimitiveParam\n\t| Placeholder;\n\nexport function sql(strings: TemplateStringsArray, ...params: any[]): SQL;\n/*\n\tThe type of `params` is specified as `SQLChunk[]`, but that's slightly incorrect -\n\tin runtime, users won't pass `FakePrimitiveParam` instances as `params` - they will pass primitive values\n\twhich will be wrapped in `Param`. That's why the overload specifies `params` as `any[]` and not as `SQLSourceParam[]`.\n\tThis type is used to make our lives easier and the type checker happy.\n*/\nexport function sql(strings: TemplateStringsArray, ...params: SQLChunk[]): SQL {\n\tconst queryChunks: SQLChunk[] = [];\n\tif (params.length > 0 || (strings.length > 0 && strings[0] !== '')) {\n\t\tqueryChunks.push(new StringChunk(strings[0]!));\n\t}\n\tfor (const [paramIndex, param] of params.entries()) {\n\t\tqueryChunks.push(param, new StringChunk(strings[paramIndex + 1]!));\n\t}\n\n\treturn new SQL(queryChunks);\n}\n\nexport namespace sql {\n\texport function empty(): SQL {\n\t\treturn new SQL([]);\n\t}\n\n\t/** @deprecated - use `sql.join()` */\n\texport function fromList(list: SQLChunk[]): SQL {\n\t\treturn new SQL(list);\n\t}\n\n\t/**\n\t * Convenience function to create an SQL query from a raw string.\n\t * @param str The raw SQL query string.\n\t */\n\texport function raw(str: string): SQL {\n\t\treturn new SQL([new StringChunk(str)]);\n\t}\n\n\t/**\n\t * Join a list of SQL chunks with a separator.\n\t * @example\n\t * ```ts\n\t * const query = sql.join([sql`a`, sql`b`, sql`c`]);\n\t * // sql`abc`\n\t * ```\n\t * @example\n\t * ```ts\n\t * const query = sql.join([sql`a`, sql`b`, sql`c`], sql`, `);\n\t * // sql`a, b, c`\n\t * ```\n\t */\n\texport function join(chunks: SQLChunk[], separator?: SQLChunk): SQL {\n\t\tconst result: SQLChunk[] = [];\n\t\tfor (const [i, chunk] of chunks.entries()) {\n\t\t\tif (i > 0 && separator !== undefined) {\n\t\t\t\tresult.push(separator);\n\t\t\t}\n\t\t\tresult.push(chunk);\n\t\t}\n\t\treturn new SQL(result);\n\t}\n\n\t/**\n\t * Create a SQL chunk that represents a DB identifier (table, column, index etc.).\n\t * When used in a query, the identifier will be escaped based on the DB engine.\n\t * For example, in PostgreSQL, identifiers are escaped with double quotes.\n\t *\n\t * **WARNING: This function does not offer any protection against SQL injections, so you must validate any user input beforehand.**\n\t *\n\t * @example ```ts\n\t * const query = sql`SELECT * FROM ${sql.identifier('my-table')}`;\n\t * // 'SELECT * FROM \"my-table\"'\n\t * ```\n\t */\n\texport function identifier(value: string): Name {\n\t\treturn new Name(value);\n\t}\n\n\texport function placeholder(name: TName): Placeholder {\n\t\treturn new Placeholder(name);\n\t}\n\n\texport function param(\n\t\tvalue: TData,\n\t\tencoder?: DriverValueEncoder,\n\t): Param {\n\t\treturn new Param(value, encoder);\n\t}\n}\n\nexport namespace SQL {\n\texport class Aliased implements SQLWrapper {\n\t\tstatic readonly [entityKind]: string = 'SQL.Aliased';\n\n\t\tdeclare _: {\n\t\t\tbrand: 'SQL.Aliased';\n\t\t\ttype: T;\n\t\t};\n\n\t\t/** @internal */\n\t\tisSelectionField = false;\n\n\t\tconstructor(\n\t\t\treadonly sql: SQL,\n\t\t\treadonly fieldAlias: string,\n\t\t) {}\n\n\t\tgetSQL(): SQL {\n\t\t\treturn this.sql;\n\t\t}\n\n\t\t/** @internal */\n\t\tclone() {\n\t\t\treturn new Aliased(this.sql, this.fieldAlias);\n\t\t}\n\t}\n}\n\nexport class Placeholder implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'Placeholder';\n\n\tdeclare protected: TValue;\n\n\tconstructor(readonly name: TName) {}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\n/** @deprecated Use `sql.placeholder` instead. */\nexport function placeholder(name: TName): Placeholder {\n\treturn new Placeholder(name);\n}\n\nexport function fillPlaceholders(params: unknown[], values: Record): unknown[] {\n\treturn params.map((p) => {\n\t\tif (is(p, Placeholder)) {\n\t\t\tif (!(p.name in values)) {\n\t\t\t\tthrow new Error(`No value for placeholder \"${p.name}\" was provided`);\n\t\t\t}\n\n\t\t\treturn values[p.name];\n\t\t}\n\n\t\tif (is(p, Param) && is(p.value, Placeholder)) {\n\t\t\tif (!(p.value.name in values)) {\n\t\t\t\tthrow new Error(`No value for placeholder \"${p.value.name}\" was provided`);\n\t\t\t}\n\n\t\t\treturn p.encoder.mapToDriverValue(values[p.value.name]);\n\t\t}\n\n\t\treturn p;\n\t});\n}\n\nexport type ColumnsSelection = Record;\n\nconst IsDrizzleView = Symbol.for('drizzle:IsDrizzleView');\n\nexport abstract class View<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n\tTSelection extends ColumnsSelection = ColumnsSelection,\n> implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'View';\n\n\tdeclare _: {\n\t\tbrand: 'View';\n\t\tviewBrand: string;\n\t\tname: TName;\n\t\texisting: TExisting;\n\t\tselectedFields: TSelection;\n\t};\n\n\t/** @internal */\n\t[ViewBaseConfig]: {\n\t\tname: TName;\n\t\toriginalName: TName;\n\t\tschema: string | undefined;\n\t\tselectedFields: ColumnsSelection;\n\t\tisExisting: TExisting;\n\t\tquery: TExisting extends true ? undefined : SQL;\n\t\tisAlias: boolean;\n\t};\n\n\t/** @internal */\n\t[IsDrizzleView] = true;\n\n\tdeclare readonly $inferSelect: InferSelectViewModel, TExisting, TSelection>>;\n\n\tconstructor(\n\t\t{ name, schema, selectedFields, query }: {\n\t\t\tname: TName;\n\t\t\tschema: string | undefined;\n\t\t\tselectedFields: ColumnsSelection;\n\t\t\tquery: SQL | undefined;\n\t\t},\n\t) {\n\t\tthis[ViewBaseConfig] = {\n\t\t\tname,\n\t\t\toriginalName: name,\n\t\t\tschema,\n\t\t\tselectedFields,\n\t\t\tquery: query as (TExisting extends true ? undefined : SQL),\n\t\t\tisExisting: !query as TExisting,\n\t\t\tisAlias: false,\n\t\t};\n\t}\n\n\tgetSQL(): SQL {\n\t\treturn new SQL([this]);\n\t}\n}\n\nexport function isView(view: unknown): view is View {\n\treturn typeof view === 'object' && view !== null && IsDrizzleView in view;\n}\n\nexport function getViewName(view: T): T['_']['name'] {\n\treturn view[ViewBaseConfig].name;\n}\n\nexport type InferSelectViewModel =\n\tEqual extends true ? { [x: string]: unknown }\n\t\t: SelectResult<\n\t\t\tTView['_']['selectedFields'],\n\t\t\t'single',\n\t\t\tRecord\n\t\t>;\n\n// Defined separately from the Column class to resolve circular dependency\nColumn.prototype.getSQL = function() {\n\treturn new SQL([this]);\n};\n\n// Defined separately from the Table class to resolve circular dependency\nTable.prototype.getSQL = function() {\n\treturn new SQL([this]);\n};\n\n// Defined separately from the Column class to resolve circular dependency\nSubquery.prototype.getSQL = function() {\n\treturn new SQL([this]);\n};\n", "import type { Cache } from './cache/core/cache.ts';\nimport type { AnyColumn } from './column.ts';\nimport { Column } from './column.ts';\nimport { is } from './entity.ts';\nimport type { Logger } from './logger.ts';\nimport type { SelectedFieldsOrdered } from './operations.ts';\nimport type { TableLike } from './query-builders/select.types.ts';\nimport { Param, SQL, View } from './sql/sql.ts';\nimport type { DriverValueDecoder } from './sql/sql.ts';\nimport { Subquery } from './subquery.ts';\nimport { getTableName, Table } from './table.ts';\nimport { ViewBaseConfig } from './view-common.ts';\n\n/** @internal */\nexport function mapResultRow(\n\tcolumns: SelectedFieldsOrdered,\n\trow: unknown[],\n\tjoinsNotNullableMap: Record | undefined,\n): TResult {\n\t// Key -> nested object key, value -> table name if all fields in the nested object are from the same table, false otherwise\n\tconst nullifyMap: Record = {};\n\n\tconst result = columns.reduce>(\n\t\t(result, { path, field }, columnIndex) => {\n\t\t\tlet decoder: DriverValueDecoder;\n\t\t\tif (is(field, Column)) {\n\t\t\t\tdecoder = field;\n\t\t\t} else if (is(field, SQL)) {\n\t\t\t\tdecoder = field.decoder;\n\t\t\t} else {\n\t\t\t\tdecoder = field.sql.decoder;\n\t\t\t}\n\t\t\tlet node = result;\n\t\t\tfor (const [pathChunkIndex, pathChunk] of path.entries()) {\n\t\t\t\tif (pathChunkIndex < path.length - 1) {\n\t\t\t\t\tif (!(pathChunk in node)) {\n\t\t\t\t\t\tnode[pathChunk] = {};\n\t\t\t\t\t}\n\t\t\t\t\tnode = node[pathChunk];\n\t\t\t\t} else {\n\t\t\t\t\tconst rawValue = row[columnIndex]!;\n\t\t\t\t\tconst value = node[pathChunk] = rawValue === null ? null : decoder.mapFromDriverValue(rawValue);\n\n\t\t\t\t\tif (joinsNotNullableMap && is(field, Column) && path.length === 2) {\n\t\t\t\t\t\tconst objectName = path[0]!;\n\t\t\t\t\t\tif (!(objectName in nullifyMap)) {\n\t\t\t\t\t\t\tnullifyMap[objectName] = value === null ? getTableName(field.table) : false;\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\ttypeof nullifyMap[objectName] === 'string' && nullifyMap[objectName] !== getTableName(field.table)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tnullifyMap[objectName] = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t},\n\t\t{},\n\t);\n\n\t// Nullify all nested objects from nullifyMap that are nullable\n\tif (joinsNotNullableMap && Object.keys(nullifyMap).length > 0) {\n\t\tfor (const [objectName, tableName] of Object.entries(nullifyMap)) {\n\t\t\tif (typeof tableName === 'string' && !joinsNotNullableMap[tableName]) {\n\t\t\t\tresult[objectName] = null;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result as TResult;\n}\n\n/** @internal */\nexport function orderSelectedFields(\n\tfields: Record,\n\tpathPrefix?: string[],\n): SelectedFieldsOrdered {\n\treturn Object.entries(fields).reduce>((result, [name, field]) => {\n\t\tif (typeof name !== 'string') {\n\t\t\treturn result;\n\t\t}\n\n\t\tconst newPath = pathPrefix ? [...pathPrefix, name] : [name];\n\t\tif (is(field, Column) || is(field, SQL) || is(field, SQL.Aliased)) {\n\t\t\tresult.push({ path: newPath, field });\n\t\t} else if (is(field, Table)) {\n\t\t\tresult.push(...orderSelectedFields(field[Table.Symbol.Columns], newPath));\n\t\t} else {\n\t\t\tresult.push(...orderSelectedFields(field as Record, newPath));\n\t\t}\n\t\treturn result;\n\t}, []) as SelectedFieldsOrdered;\n}\n\nexport function haveSameKeys(left: Record, right: Record) {\n\tconst leftKeys = Object.keys(left);\n\tconst rightKeys = Object.keys(right);\n\n\tif (leftKeys.length !== rightKeys.length) {\n\t\treturn false;\n\t}\n\n\tfor (const [index, key] of leftKeys.entries()) {\n\t\tif (key !== rightKeys[index]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/** @internal */\nexport function mapUpdateSet(table: Table, values: Record): UpdateSet {\n\tconst entries: [string, UpdateSet[string]][] = Object.entries(values)\n\t\t.filter(([, value]) => value !== undefined)\n\t\t.map(([key, value]) => {\n\t\t\t// eslint-disable-next-line unicorn/prefer-ternary\n\t\t\tif (is(value, SQL) || is(value, Column)) {\n\t\t\t\treturn [key, value];\n\t\t\t} else {\n\t\t\t\treturn [key, new Param(value, table[Table.Symbol.Columns][key])];\n\t\t\t}\n\t\t});\n\n\tif (entries.length === 0) {\n\t\tthrow new Error('No values to set');\n\t}\n\n\treturn Object.fromEntries(entries);\n}\n\nexport type UpdateSet = Record;\n\nexport type OneOrMany = T | T[];\n\nexport type Update =\n\t& {\n\t\t[K in Exclude]: T[K];\n\t}\n\t& TUpdate;\n\nexport type Simplify =\n\t& {\n\t\t// @ts-ignore - \"Type parameter 'K' has a circular constraint\", not sure why\n\t\t[K in keyof T]: T[K];\n\t}\n\t& {};\n\nexport type SimplifyMappedType = [T] extends [unknown] ? T : never;\n\nexport type ShallowRecord = SimplifyMappedType<{ [P in K]: T }>;\n\nexport type Assume = T extends U ? T : U;\n\nexport type Equal = (() => T extends X ? 1 : 2) extends (() => T extends Y ? 1 : 2) ? true : false;\n\nexport interface DrizzleTypeError {\n\t$drizzleTypeError: T;\n}\n\nexport type ValueOrArray = T | T[];\n\n/** @internal */\nexport function applyMixins(baseClass: any, extendedClasses: any[]) {\n\tfor (const extendedClass of extendedClasses) {\n\t\tfor (const name of Object.getOwnPropertyNames(extendedClass.prototype)) {\n\t\t\tif (name === 'constructor') continue;\n\n\t\t\tObject.defineProperty(\n\t\t\t\tbaseClass.prototype,\n\t\t\t\tname,\n\t\t\t\tObject.getOwnPropertyDescriptor(extendedClass.prototype, name) || Object.create(null),\n\t\t\t);\n\t\t}\n\t}\n}\n\nexport type Or = T1 extends true ? true : T2 extends true ? true : false;\n\nexport type IfThenElse = If extends true ? Then : Else;\n\nexport type PromiseOf = T extends Promise ? U : T;\n\nexport type Writable = {\n\t-readonly [P in keyof T]: T[P];\n};\n\nexport type NonArray = T extends any[] ? never : T;\n\nexport function getTableColumns(table: T): T['_']['columns'] {\n\treturn table[Table.Symbol.Columns];\n}\n\nexport function getViewSelectedFields(view: T): T['_']['selectedFields'] {\n\treturn view[ViewBaseConfig].selectedFields;\n}\n\n/** @internal */\nexport function getTableLikeName(table: TableLike): string | undefined {\n\treturn is(table, Subquery)\n\t\t? table._.alias\n\t\t: is(table, View)\n\t\t? table[ViewBaseConfig].name\n\t\t: is(table, SQL)\n\t\t? undefined\n\t\t: table[Table.Symbol.IsAlias]\n\t\t? table[Table.Symbol.Name]\n\t\t: table[Table.Symbol.BaseName];\n}\n\nexport type ColumnsWithTable<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends AnyColumn<{ tableName: TTableName }>[],\n> = { [Key in keyof TColumns]: AnyColumn<{ tableName: TForeignTableName }> };\n\nexport type Casing = 'snake_case' | 'camelCase';\n\nexport interface DrizzleConfig = Record> {\n\tlogger?: boolean | Logger;\n\tschema?: TSchema;\n\tcasing?: Casing;\n\tcache?: Cache;\n}\nexport type ValidateShape = T extends ValidShape\n\t? Exclude extends never ? TResult\n\t: DrizzleTypeError<\n\t\t`Invalid key(s): ${Exclude<(keyof T) & (string | number | bigint | boolean | null | undefined), keyof ValidShape>}`\n\t>\n\t: never;\n\nexport type KnownKeysOnly = {\n\t[K in keyof T]: K extends keyof U ? T[K] : never;\n};\n\nexport type IsAny = 0 extends (1 & T) ? true : false;\n\n/** @internal */\nexport function getColumnNameAndConfig<\n\tTConfig extends Record | undefined,\n>(a: string | TConfig | undefined, b: TConfig | undefined) {\n\treturn {\n\t\tname: typeof a === 'string' && a.length > 0 ? a : '' as string,\n\t\tconfig: typeof a === 'object' ? a : b as TConfig,\n\t};\n}\n\nexport type IfNotImported = unknown extends T ? Y : N;\n\nexport type ImportTypeError =\n\t`Please install \\`${TPackageName}\\` to allow Drizzle ORM to connect to the database`;\n\nexport type RequireAtLeastOne = Keys extends any\n\t? Required> & Partial>\n\t: never;\n\ntype ExpectedConfigShape = {\n\tlogger?: boolean | {\n\t\tlogQuery(query: string, params: unknown[]): void;\n\t};\n\tschema?: Record;\n\tcasing?: 'snake_case' | 'camelCase';\n};\n\n// If this errors, you must update config shape checker function with new config specs\nconst _: DrizzleConfig = {} as ExpectedConfigShape;\nconst __: ExpectedConfigShape = {} as DrizzleConfig;\n\nexport function isConfig(data: any): boolean {\n\tif (typeof data !== 'object' || data === null) return false;\n\n\tif (data.constructor.name !== 'Object') return false;\n\n\tif ('logger' in data) {\n\t\tconst type = typeof data['logger'];\n\t\tif (\n\t\t\ttype !== 'boolean' && (type !== 'object' || typeof data['logger']['logQuery'] !== 'function')\n\t\t\t&& type !== 'undefined'\n\t\t) return false;\n\n\t\treturn true;\n\t}\n\n\tif ('schema' in data) {\n\t\tconst type = typeof data['schema'];\n\t\tif (type !== 'object' && type !== 'undefined') return false;\n\n\t\treturn true;\n\t}\n\n\tif ('casing' in data) {\n\t\tconst type = typeof data['casing'];\n\t\tif (type !== 'string' && type !== 'undefined') return false;\n\n\t\treturn true;\n\t}\n\n\tif ('mode' in data) {\n\t\tif (data['mode'] !== 'default' || data['mode'] !== 'planetscale' || data['mode'] !== undefined) return false;\n\n\t\treturn true;\n\t}\n\n\tif ('connection' in data) {\n\t\tconst type = typeof data['connection'];\n\t\tif (type !== 'string' && type !== 'object' && type !== 'undefined') return false;\n\n\t\treturn true;\n\t}\n\n\tif ('client' in data) {\n\t\tconst type = typeof data['client'];\n\t\tif (type !== 'object' && type !== 'function' && type !== 'undefined') return false;\n\n\t\treturn true;\n\t}\n\n\tif (Object.keys(data).length === 0) return true;\n\n\treturn false;\n}\n\nexport type NeonAuthToken = string | (() => string | Promise);\n\nexport const textDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder();\n", "import type { BuildColumns, BuildExtraConfigColumns } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport { Table, type TableConfig as TableConfigBase, type UpdateTableConfig } from '~/table.ts';\nimport type { CheckBuilder } from './checks.ts';\nimport { getPgColumnBuilders, type PgColumnsBuilders } from './columns/all.ts';\nimport type { ExtraConfigColumn, PgColumn, PgColumnBuilder, PgColumnBuilderBase } from './columns/common.ts';\nimport type { ForeignKey, ForeignKeyBuilder } from './foreign-keys.ts';\nimport type { AnyIndexBuilder } from './indexes.ts';\nimport type { PgPolicy } from './policies.ts';\nimport type { PrimaryKeyBuilder } from './primary-keys.ts';\nimport type { UniqueConstraintBuilder } from './unique-constraint.ts';\n\nexport type PgTableExtraConfigValue =\n\t| AnyIndexBuilder\n\t| CheckBuilder\n\t| ForeignKeyBuilder\n\t| PrimaryKeyBuilder\n\t| UniqueConstraintBuilder\n\t| PgPolicy;\n\nexport type PgTableExtraConfig = Record<\n\tstring,\n\tPgTableExtraConfigValue\n>;\n\nexport type TableConfig = TableConfigBase;\n\n/** @internal */\nexport const InlineForeignKeys = Symbol.for('drizzle:PgInlineForeignKeys');\n/** @internal */\nexport const EnableRLS = Symbol.for('drizzle:EnableRLS');\n\nexport class PgTable extends Table {\n\tstatic override readonly [entityKind]: string = 'PgTable';\n\n\t/** @internal */\n\tstatic override readonly Symbol = Object.assign({}, Table.Symbol, {\n\t\tInlineForeignKeys: InlineForeignKeys as typeof InlineForeignKeys,\n\t\tEnableRLS: EnableRLS as typeof EnableRLS,\n\t});\n\n\t/**@internal */\n\t[InlineForeignKeys]: ForeignKey[] = [];\n\n\t/** @internal */\n\t[EnableRLS]: boolean = false;\n\n\t/** @internal */\n\toverride [Table.Symbol.ExtraConfigBuilder]: ((self: Record) => PgTableExtraConfig) | undefined =\n\t\tundefined;\n\n\t/** @internal */\n\toverride [Table.Symbol.ExtraConfigColumns]: Record = {};\n}\n\nexport type AnyPgTable = {}> = PgTable>;\n\nexport type PgTableWithColumns =\n\t& PgTable\n\t& {\n\t\t[Key in keyof T['columns']]: T['columns'][Key];\n\t}\n\t& {\n\t\tenableRLS: () => Omit<\n\t\t\tPgTableWithColumns,\n\t\t\t'enableRLS'\n\t\t>;\n\t};\n\n/** @internal */\nexport function pgTableWithSchema<\n\tTTableName extends string,\n\tTSchemaName extends string | undefined,\n\tTColumnsMap extends Record,\n>(\n\tname: TTableName,\n\tcolumns: TColumnsMap | ((columnTypes: PgColumnsBuilders) => TColumnsMap),\n\textraConfig:\n\t\t| ((self: BuildExtraConfigColumns) => PgTableExtraConfig | PgTableExtraConfigValue[])\n\t\t| undefined,\n\tschema: TSchemaName,\n\tbaseName = name,\n): PgTableWithColumns<{\n\tname: TTableName;\n\tschema: TSchemaName;\n\tcolumns: BuildColumns;\n\tdialect: 'pg';\n}> {\n\tconst rawTable = new PgTable<{\n\t\tname: TTableName;\n\t\tschema: TSchemaName;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>(name, schema, baseName);\n\n\tconst parsedColumns: TColumnsMap = typeof columns === 'function' ? columns(getPgColumnBuilders()) : columns;\n\n\tconst builtColumns = Object.fromEntries(\n\t\tObject.entries(parsedColumns).map(([name, colBuilderBase]) => {\n\t\t\tconst colBuilder = colBuilderBase as PgColumnBuilder;\n\t\t\tcolBuilder.setName(name);\n\t\t\tconst column = colBuilder.build(rawTable);\n\t\t\trawTable[InlineForeignKeys].push(...colBuilder.buildForeignKeys(column, rawTable));\n\t\t\treturn [name, column];\n\t\t}),\n\t) as unknown as BuildColumns;\n\n\tconst builtColumnsForExtraConfig = Object.fromEntries(\n\t\tObject.entries(parsedColumns).map(([name, colBuilderBase]) => {\n\t\t\tconst colBuilder = colBuilderBase as PgColumnBuilder;\n\t\t\tcolBuilder.setName(name);\n\t\t\tconst column = colBuilder.buildExtraConfigColumn(rawTable);\n\t\t\treturn [name, column];\n\t\t}),\n\t) as unknown as BuildExtraConfigColumns;\n\n\tconst table = Object.assign(rawTable, builtColumns);\n\n\ttable[Table.Symbol.Columns] = builtColumns;\n\ttable[Table.Symbol.ExtraConfigColumns] = builtColumnsForExtraConfig;\n\n\tif (extraConfig) {\n\t\ttable[PgTable.Symbol.ExtraConfigBuilder] = extraConfig as any;\n\t}\n\n\treturn Object.assign(table, {\n\t\tenableRLS: () => {\n\t\t\ttable[PgTable.Symbol.EnableRLS] = true;\n\t\t\treturn table as PgTableWithColumns<{\n\t\t\t\tname: TTableName;\n\t\t\t\tschema: TSchemaName;\n\t\t\t\tcolumns: BuildColumns;\n\t\t\t\tdialect: 'pg';\n\t\t\t}>;\n\t\t},\n\t});\n}\n\nexport interface PgTableFn {\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: TColumnsMap,\n\t\textraConfig?: (\n\t\t\tself: BuildExtraConfigColumns,\n\t\t) => PgTableExtraConfigValue[],\n\t): PgTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>;\n\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: (columnTypes: PgColumnsBuilders) => TColumnsMap,\n\t\textraConfig?: (self: BuildExtraConfigColumns) => PgTableExtraConfigValue[],\n\t): PgTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>;\n\t/**\n\t * @deprecated The third parameter of pgTable is changing and will only accept an array instead of an object\n\t *\n\t * @example\n\t * Deprecated version:\n\t * ```ts\n\t * export const users = pgTable(\"users\", {\n\t * \tid: integer(),\n\t * }, (t) => ({\n\t * \tidx: index('custom_name').on(t.id)\n\t * }));\n\t * ```\n\t *\n\t * New API:\n\t * ```ts\n\t * export const users = pgTable(\"users\", {\n\t * \tid: integer(),\n\t * }, (t) => [\n\t * \tindex('custom_name').on(t.id)\n\t * ]);\n\t * ```\n\t */\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: TColumnsMap,\n\t\textraConfig: (\n\t\t\tself: BuildExtraConfigColumns,\n\t\t) => PgTableExtraConfig,\n\t): PgTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>;\n\n\t/**\n\t * @deprecated The third parameter of pgTable is changing and will only accept an array instead of an object\n\t *\n\t * @example\n\t * Deprecated version:\n\t * ```ts\n\t * export const users = pgTable(\"users\", {\n\t * \tid: integer(),\n\t * }, (t) => ({\n\t * \tidx: index('custom_name').on(t.id)\n\t * }));\n\t * ```\n\t *\n\t * New API:\n\t * ```ts\n\t * export const users = pgTable(\"users\", {\n\t * \tid: integer(),\n\t * }, (t) => [\n\t * \tindex('custom_name').on(t.id)\n\t * ]);\n\t * ```\n\t */\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: (columnTypes: PgColumnsBuilders) => TColumnsMap,\n\t\textraConfig: (self: BuildExtraConfigColumns) => PgTableExtraConfig,\n\t): PgTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'pg';\n\t}>;\n}\n\nexport const pgTable: PgTableFn = (name, columns, extraConfig) => {\n\treturn pgTableWithSchema(name, columns, extraConfig, undefined);\n};\n\nexport function pgTableCreator(customizeTableName: (name: string) => string): PgTableFn {\n\treturn (name, columns, extraConfig) => {\n\t\treturn pgTableWithSchema(customizeTableName(name) as typeof name, columns, extraConfig, undefined, name);\n\t};\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { AnyPgColumn, PgColumn } from './columns/index.ts';\nimport { PgTable } from './table.ts';\n\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumn extends AnyPgColumn<{ tableName: TTableName }>,\n\tTColumns extends AnyPgColumn<{ tableName: TTableName }>[],\n>(config: { name?: string; columns: [TColumn, ...TColumns] }): PrimaryKeyBuilder;\n/**\n * @deprecated: Please use primaryKey({ columns: [] }) instead of this function\n * @param columns\n */\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumns extends AnyPgColumn<{ tableName: TTableName }>[],\n>(...columns: TColumns): PrimaryKeyBuilder;\nexport function primaryKey(...config: any) {\n\tif (config[0].columns) {\n\t\treturn new PrimaryKeyBuilder(config[0].columns, config[0].name);\n\t}\n\treturn new PrimaryKeyBuilder(config);\n}\n\nexport class PrimaryKeyBuilder {\n\tstatic readonly [entityKind]: string = 'PgPrimaryKeyBuilder';\n\n\t/** @internal */\n\tcolumns: PgColumn[];\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tcolumns: PgColumn[],\n\t\tname?: string,\n\t) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\t/** @internal */\n\tbuild(table: PgTable): PrimaryKey {\n\t\treturn new PrimaryKey(table, this.columns, this.name);\n\t}\n}\n\nexport class PrimaryKey {\n\tstatic readonly [entityKind]: string = 'PgPrimaryKey';\n\n\treadonly columns: AnyPgColumn<{}>[];\n\treadonly name?: string;\n\n\tconstructor(readonly table: PgTable, columns: AnyPgColumn<{}>[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\tgetName(): string {\n\t\treturn this.name ?? `${this.table[PgTable.Symbol.Name]}_${this.columns.map((column) => column.name).join('_')}_pk`;\n\t}\n}\n", "import { type AnyColumn, Column, type GetColumnData } from '~/column.ts';\nimport { is } from '~/entity.ts';\nimport { Table } from '~/table.ts';\nimport {\n\tisDriverValueEncoder,\n\tisSQLWrapper,\n\tParam,\n\tPlaceholder,\n\tSQL,\n\tsql,\n\ttype SQLChunk,\n\ttype SQLWrapper,\n\tStringChunk,\n\tView,\n} from '../sql.ts';\n\nexport function bindIfParam(value: unknown, column: SQLWrapper): SQLChunk {\n\tif (\n\t\tisDriverValueEncoder(column)\n\t\t&& !isSQLWrapper(value)\n\t\t&& !is(value, Param)\n\t\t&& !is(value, Placeholder)\n\t\t&& !is(value, Column)\n\t\t&& !is(value, Table)\n\t\t&& !is(value, View)\n\t) {\n\t\treturn new Param(value, column);\n\t}\n\treturn value as SQLChunk;\n}\n\nexport interface BinaryOperator {\n\t(\n\t\tleft: TColumn,\n\t\tright: GetColumnData | SQLWrapper,\n\t): SQL;\n\t(left: SQL.Aliased, right: T | SQLWrapper): SQL;\n\t(\n\t\tleft: Exclude,\n\t\tright: unknown,\n\t): SQL;\n}\n\n/**\n * Test that two values are equal.\n *\n * Remember that the SQL standard dictates that\n * two NULL values are not equal, so if you want to test\n * whether a value is null, you may want to use\n * `isNull` instead.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made by Ford\n * db.select().from(cars)\n * .where(eq(cars.make, 'Ford'))\n * ```\n *\n * @see isNull for a way to test equality to NULL.\n */\nexport const eq: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} = ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test that two values are not equal.\n *\n * Remember that the SQL standard dictates that\n * two NULL values are not equal, so if you want to test\n * whether a value is not null, you may want to use\n * `isNotNull` instead.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars not made by Ford\n * db.select().from(cars)\n * .where(ne(cars.make, 'Ford'))\n * ```\n *\n * @see isNotNull for a way to test whether a value is not null.\n */\nexport const ne: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} <> ${bindIfParam(right, left)}`;\n};\n\n/**\n * Combine a list of conditions with the `and` operator. Conditions\n * that are equal `undefined` are automatically ignored.\n *\n * ## Examples\n *\n * ```ts\n * db.select().from(cars)\n * .where(\n * and(\n * eq(cars.make, 'Volvo'),\n * eq(cars.year, 1950),\n * )\n * )\n * ```\n */\nexport function and(...conditions: (SQLWrapper | undefined)[]): SQL | undefined;\nexport function and(\n\t...unfilteredConditions: (SQLWrapper | undefined)[]\n): SQL | undefined {\n\tconst conditions = unfilteredConditions.filter(\n\t\t(c): c is Exclude => c !== undefined,\n\t);\n\n\tif (conditions.length === 0) {\n\t\treturn undefined;\n\t}\n\n\tif (conditions.length === 1) {\n\t\treturn new SQL(conditions);\n\t}\n\n\treturn new SQL([\n\t\tnew StringChunk('('),\n\t\tsql.join(conditions, new StringChunk(' and ')),\n\t\tnew StringChunk(')'),\n\t]);\n}\n\n/**\n * Combine a list of conditions with the `or` operator. Conditions\n * that are equal `undefined` are automatically ignored.\n *\n * ## Examples\n *\n * ```ts\n * db.select().from(cars)\n * .where(\n * or(\n * eq(cars.make, 'GM'),\n * eq(cars.make, 'Ford'),\n * )\n * )\n * ```\n */\nexport function or(...conditions: (SQLWrapper | undefined)[]): SQL | undefined;\nexport function or(\n\t...unfilteredConditions: (SQLWrapper | undefined)[]\n): SQL | undefined {\n\tconst conditions = unfilteredConditions.filter(\n\t\t(c): c is Exclude => c !== undefined,\n\t);\n\n\tif (conditions.length === 0) {\n\t\treturn undefined;\n\t}\n\n\tif (conditions.length === 1) {\n\t\treturn new SQL(conditions);\n\t}\n\n\treturn new SQL([\n\t\tnew StringChunk('('),\n\t\tsql.join(conditions, new StringChunk(' or ')),\n\t\tnew StringChunk(')'),\n\t]);\n}\n\n/**\n * Negate the meaning of an expression using the `not` keyword.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars _not_ made by GM or Ford.\n * db.select().from(cars)\n * .where(not(inArray(cars.make, ['GM', 'Ford'])))\n * ```\n */\nexport function not(condition: SQLWrapper): SQL {\n\treturn sql`not ${condition}`;\n}\n\n/**\n * Test that the first expression passed is greater than\n * the second expression.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made after 2000.\n * db.select().from(cars)\n * .where(gt(cars.year, 2000))\n * ```\n *\n * @see gte for greater-than-or-equal\n */\nexport const gt: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} > ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test that the first expression passed is greater than\n * or equal to the second expression. Use `gt` to\n * test whether an expression is strictly greater\n * than another.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made on or after 2000.\n * db.select().from(cars)\n * .where(gte(cars.year, 2000))\n * ```\n *\n * @see gt for a strictly greater-than condition\n */\nexport const gte: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} >= ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test that the first expression passed is less than\n * the second expression.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made before 2000.\n * db.select().from(cars)\n * .where(lt(cars.year, 2000))\n * ```\n *\n * @see lte for less-than-or-equal\n */\nexport const lt: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} < ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test that the first expression passed is less than\n * or equal to the second expression.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made before 2000.\n * db.select().from(cars)\n * .where(lte(cars.year, 2000))\n * ```\n *\n * @see lt for a strictly less-than condition\n */\nexport const lte: BinaryOperator = (left: SQLWrapper, right: unknown): SQL => {\n\treturn sql`${left} <= ${bindIfParam(right, left)}`;\n};\n\n/**\n * Test whether the first parameter, a column or expression,\n * has a value from a list passed as the second argument.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made by Ford or GM.\n * db.select().from(cars)\n * .where(inArray(cars.make, ['Ford', 'GM']))\n * ```\n *\n * @see notInArray for the inverse of this test\n */\nexport function inArray(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function inArray(\n\tcolumn: TColumn,\n\tvalues: ReadonlyArray | Placeholder> | SQLWrapper,\n): SQL;\nexport function inArray(\n\tcolumn: Exclude,\n\tvalues: ReadonlyArray | SQLWrapper,\n): SQL;\nexport function inArray(\n\tcolumn: SQLWrapper,\n\tvalues: ReadonlyArray | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\treturn sql`false`;\n\t\t}\n\t\treturn sql`${column} in ${values.map((v) => bindIfParam(v, column))}`;\n\t}\n\n\treturn sql`${column} in ${bindIfParam(values, column)}`;\n}\n\n/**\n * Test whether the first parameter, a column or expression,\n * has a value that is not present in a list passed as the\n * second argument.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made by any company except Ford or GM.\n * db.select().from(cars)\n * .where(notInArray(cars.make, ['Ford', 'GM']))\n * ```\n *\n * @see inArray for the inverse of this test\n */\nexport function notInArray(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function notInArray(\n\tcolumn: TColumn,\n\tvalues: (GetColumnData | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function notInArray(\n\tcolumn: Exclude,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function notInArray(\n\tcolumn: SQLWrapper,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\treturn sql`true`;\n\t\t}\n\t\treturn sql`${column} not in ${values.map((v) => bindIfParam(v, column))}`;\n\t}\n\n\treturn sql`${column} not in ${bindIfParam(values, column)}`;\n}\n\n/**\n * Test whether an expression is NULL. By the SQL standard,\n * NULL is neither equal nor not equal to itself, so\n * it's recommended to use `isNull` and `notIsNull` for\n * comparisons to NULL.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars that have no discontinuedAt date.\n * db.select().from(cars)\n * .where(isNull(cars.discontinuedAt))\n * ```\n *\n * @see isNotNull for the inverse of this test\n */\nexport function isNull(value: SQLWrapper): SQL {\n\treturn sql`${value} is null`;\n}\n\n/**\n * Test whether an expression is not NULL. By the SQL standard,\n * NULL is neither equal nor not equal to itself, so\n * it's recommended to use `isNull` and `notIsNull` for\n * comparisons to NULL.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars that have been discontinued.\n * db.select().from(cars)\n * .where(isNotNull(cars.discontinuedAt))\n * ```\n *\n * @see isNull for the inverse of this test\n */\nexport function isNotNull(value: SQLWrapper): SQL {\n\treturn sql`${value} is not null`;\n}\n\n/**\n * Test whether a subquery evaluates to have any rows.\n *\n * ## Examples\n *\n * ```ts\n * // Users whose `homeCity` column has a match in a cities\n * // table.\n * db\n * .select()\n * .from(users)\n * .where(\n * exists(db.select()\n * .from(cities)\n * .where(eq(users.homeCity, cities.id))),\n * );\n * ```\n *\n * @see notExists for the inverse of this test\n */\nexport function exists(subquery: SQLWrapper): SQL {\n\treturn sql`exists ${subquery}`;\n}\n\n/**\n * Test whether a subquery doesn't include any result\n * rows.\n *\n * ## Examples\n *\n * ```ts\n * // Users whose `homeCity` column doesn't match\n * // a row in the cities table.\n * db\n * .select()\n * .from(users)\n * .where(\n * notExists(db.select()\n * .from(cities)\n * .where(eq(users.homeCity, cities.id))),\n * );\n * ```\n *\n * @see exists for the inverse of this test\n */\nexport function notExists(subquery: SQLWrapper): SQL {\n\treturn sql`not exists ${subquery}`;\n}\n\n/**\n * Test whether an expression is between two values. This\n * is an easier way to express range tests, which would be\n * expressed mathematically as `x <= a <= y` but in SQL\n * would have to be like `a >= x AND a <= y`.\n *\n * Between is inclusive of the endpoints: if `column`\n * is equal to `min` or `max`, it will be TRUE.\n *\n * ## Examples\n *\n * ```ts\n * // Select cars made between 1990 and 2000\n * db.select().from(cars)\n * .where(between(cars.year, 1990, 2000))\n * ```\n *\n * @see notBetween for the inverse of this test\n */\nexport function between(\n\tcolumn: SQL.Aliased,\n\tmin: T | SQLWrapper,\n\tmax: T | SQLWrapper,\n): SQL;\nexport function between(\n\tcolumn: TColumn,\n\tmin: GetColumnData | SQLWrapper,\n\tmax: GetColumnData | SQLWrapper,\n): SQL;\nexport function between(\n\tcolumn: Exclude,\n\tmin: unknown,\n\tmax: unknown,\n): SQL;\nexport function between(column: SQLWrapper, min: unknown, max: unknown): SQL {\n\treturn sql`${column} between ${bindIfParam(min, column)} and ${\n\t\tbindIfParam(\n\t\t\tmax,\n\t\t\tcolumn,\n\t\t)\n\t}`;\n}\n\n/**\n * Test whether an expression is not between two values.\n *\n * This, like `between`, includes its endpoints, so if\n * the `column` is equal to `min` or `max`, in this case\n * it will evaluate to FALSE.\n *\n * ## Examples\n *\n * ```ts\n * // Exclude cars made in the 1970s\n * db.select().from(cars)\n * .where(notBetween(cars.year, 1970, 1979))\n * ```\n *\n * @see between for the inverse of this test\n */\nexport function notBetween(\n\tcolumn: SQL.Aliased,\n\tmin: T | SQLWrapper,\n\tmax: T | SQLWrapper,\n): SQL;\nexport function notBetween(\n\tcolumn: TColumn,\n\tmin: GetColumnData | SQLWrapper,\n\tmax: GetColumnData | SQLWrapper,\n): SQL;\nexport function notBetween(\n\tcolumn: Exclude,\n\tmin: unknown,\n\tmax: unknown,\n): SQL;\nexport function notBetween(\n\tcolumn: SQLWrapper,\n\tmin: unknown,\n\tmax: unknown,\n): SQL {\n\treturn sql`${column} not between ${\n\t\tbindIfParam(\n\t\t\tmin,\n\t\t\tcolumn,\n\t\t)\n\t} and ${bindIfParam(max, column)}`;\n}\n\n/**\n * Compare a column to a pattern, which can include `%` and `_`\n * characters to match multiple variations. Including `%`\n * in the pattern matches zero or more characters, and including\n * `_` will match a single character.\n *\n * ## Examples\n *\n * ```ts\n * // Select all cars with 'Turbo' in their names.\n * db.select().from(cars)\n * .where(like(cars.name, '%Turbo%'))\n * ```\n *\n * @see ilike for a case-insensitive version of this condition\n */\nexport function like(column: Column | SQL.Aliased | SQL, value: string | SQLWrapper): SQL {\n\treturn sql`${column} like ${value}`;\n}\n\n/**\n * The inverse of like - this tests that a given column\n * does not match a pattern, which can include `%` and `_`\n * characters to match multiple variations. Including `%`\n * in the pattern matches zero or more characters, and including\n * `_` will match a single character.\n *\n * ## Examples\n *\n * ```ts\n * // Select all cars that don't have \"ROver\" in their name.\n * db.select().from(cars)\n * .where(notLike(cars.name, '%Rover%'))\n * ```\n *\n * @see like for the inverse condition\n * @see notIlike for a case-insensitive version of this condition\n */\nexport function notLike(column: Column | SQL.Aliased | SQL, value: string | SQLWrapper): SQL {\n\treturn sql`${column} not like ${value}`;\n}\n\n/**\n * Case-insensitively compare a column to a pattern,\n * which can include `%` and `_`\n * characters to match multiple variations. Including `%`\n * in the pattern matches zero or more characters, and including\n * `_` will match a single character.\n *\n * Unlike like, this performs a case-insensitive comparison.\n *\n * ## Examples\n *\n * ```ts\n * // Select all cars with 'Turbo' in their names.\n * db.select().from(cars)\n * .where(ilike(cars.name, '%Turbo%'))\n * ```\n *\n * @see like for a case-sensitive version of this condition\n */\nexport function ilike(column: Column | SQL.Aliased | SQL, value: string | SQLWrapper): SQL {\n\treturn sql`${column} ilike ${value}`;\n}\n\n/**\n * The inverse of ilike - this case-insensitively tests that a given column\n * does not match a pattern, which can include `%` and `_`\n * characters to match multiple variations. Including `%`\n * in the pattern matches zero or more characters, and including\n * `_` will match a single character.\n *\n * ## Examples\n *\n * ```ts\n * // Select all cars that don't have \"Rover\" in their name.\n * db.select().from(cars)\n * .where(notLike(cars.name, '%Rover%'))\n * ```\n *\n * @see ilike for the inverse condition\n * @see notLike for a case-sensitive version of this condition\n */\nexport function notIlike(column: Column | SQL.Aliased | SQL, value: string | SQLWrapper): SQL {\n\treturn sql`${column} not ilike ${value}`;\n}\n\n/**\n * Test that a column or expression contains all elements of\n * the list passed as the second argument.\n *\n * ## Throws\n *\n * The argument passed in the second array can't be empty:\n * if an empty is provided, this method will throw.\n *\n * ## Examples\n *\n * ```ts\n * // Select posts where its tags contain \"Typescript\" and \"ORM\".\n * db.select().from(posts)\n * .where(arrayContains(posts.tags, ['Typescript', 'ORM']))\n * ```\n *\n * @see arrayContained to find if an array contains all elements of a column or expression\n * @see arrayOverlaps to find if a column or expression contains any elements of an array\n */\nexport function arrayContains(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayContains(\n\tcolumn: TColumn,\n\tvalues: (GetColumnData | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayContains(\n\tcolumn: Exclude,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function arrayContains(\n\tcolumn: SQLWrapper,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\tthrow new Error('arrayContains requires at least one value');\n\t\t}\n\t\tconst array = sql`${bindIfParam(values, column)}`;\n\t\treturn sql`${column} @> ${array}`;\n\t}\n\n\treturn sql`${column} @> ${bindIfParam(values, column)}`;\n}\n\n/**\n * Test that the list passed as the second argument contains\n * all elements of a column or expression.\n *\n * ## Throws\n *\n * The argument passed in the second array can't be empty:\n * if an empty is provided, this method will throw.\n *\n * ## Examples\n *\n * ```ts\n * // Select posts where its tags contain \"Typescript\", \"ORM\" or both,\n * // but filtering posts that have additional tags.\n * db.select().from(posts)\n * .where(arrayContained(posts.tags, ['Typescript', 'ORM']))\n * ```\n *\n * @see arrayContains to find if a column or expression contains all elements of an array\n * @see arrayOverlaps to find if a column or expression contains any elements of an array\n */\nexport function arrayContained(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayContained(\n\tcolumn: TColumn,\n\tvalues: (GetColumnData | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayContained(\n\tcolumn: Exclude,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function arrayContained(\n\tcolumn: SQLWrapper,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\tthrow new Error('arrayContained requires at least one value');\n\t\t}\n\t\tconst array = sql`${bindIfParam(values, column)}`;\n\t\treturn sql`${column} <@ ${array}`;\n\t}\n\n\treturn sql`${column} <@ ${bindIfParam(values, column)}`;\n}\n\n/**\n * Test that a column or expression contains any elements of\n * the list passed as the second argument.\n *\n * ## Throws\n *\n * The argument passed in the second array can't be empty:\n * if an empty is provided, this method will throw.\n *\n * ## Examples\n *\n * ```ts\n * // Select posts where its tags contain \"Typescript\", \"ORM\" or both.\n * db.select().from(posts)\n * .where(arrayOverlaps(posts.tags, ['Typescript', 'ORM']))\n * ```\n *\n * @see arrayContains to find if a column or expression contains all elements of an array\n * @see arrayContained to find if an array contains all elements of a column or expression\n */\nexport function arrayOverlaps(\n\tcolumn: SQL.Aliased,\n\tvalues: (T | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayOverlaps(\n\tcolumn: TColumn,\n\tvalues: (GetColumnData | Placeholder) | SQLWrapper,\n): SQL;\nexport function arrayOverlaps(\n\tcolumn: Exclude,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL;\nexport function arrayOverlaps(\n\tcolumn: SQLWrapper,\n\tvalues: (unknown | Placeholder)[] | SQLWrapper,\n): SQL {\n\tif (Array.isArray(values)) {\n\t\tif (values.length === 0) {\n\t\t\tthrow new Error('arrayOverlaps requires at least one value');\n\t\t}\n\t\tconst array = sql`${bindIfParam(values, column)}`;\n\t\treturn sql`${column} && ${array}`;\n\t}\n\n\treturn sql`${column} && ${bindIfParam(values, column)}`;\n}\n", "import type { AnyColumn } from '../../column.ts';\nimport type { SQL, SQLWrapper } from '../sql.ts';\nimport { sql } from '../sql.ts';\n\n/**\n * Used in sorting, this specifies that the given\n * column or expression should be sorted in ascending\n * order. By the SQL standard, ascending order is the\n * default, so it is not usually necessary to specify\n * ascending sort order.\n *\n * ## Examples\n *\n * ```ts\n * // Return cars, starting with the oldest models\n * // and going in ascending order to the newest.\n * db.select().from(cars)\n * .orderBy(asc(cars.year));\n * ```\n *\n * @see desc to sort in descending order\n */\nexport function asc(column: AnyColumn | SQLWrapper): SQL {\n\treturn sql`${column} asc`;\n}\n\n/**\n * Used in sorting, this specifies that the given\n * column or expression should be sorted in descending\n * order.\n *\n * ## Examples\n *\n * ```ts\n * // Select users, with the most recently created\n * // records coming first.\n * db.select().from(users)\n * .orderBy(desc(users.createdAt));\n * ```\n *\n * @see asc to sort in ascending order\n */\nexport function desc(column: AnyColumn | SQLWrapper): SQL {\n\treturn sql`${column} desc`;\n}\n", "export * from './conditions.ts';\nexport * from './select.ts';\n", "import { type AnyTable, getTableUniqueName, type InferModelFromColumns, Table } from '~/table.ts';\nimport { type AnyColumn, Column } from './column.ts';\nimport { entityKind, is } from './entity.ts';\nimport { PrimaryKeyBuilder } from './pg-core/primary-keys.ts';\nimport {\n\tand,\n\tasc,\n\tbetween,\n\tdesc,\n\teq,\n\texists,\n\tgt,\n\tgte,\n\tilike,\n\tinArray,\n\tisNotNull,\n\tisNull,\n\tlike,\n\tlt,\n\tlte,\n\tne,\n\tnot,\n\tnotBetween,\n\tnotExists,\n\tnotIlike,\n\tnotInArray,\n\tnotLike,\n\tor,\n} from './sql/expressions/index.ts';\nimport { type Placeholder, SQL, sql } from './sql/sql.ts';\nimport type { Assume, ColumnsWithTable, Equal, Simplify, ValueOrArray } from './utils.ts';\n\nexport abstract class Relation {\n\tstatic readonly [entityKind]: string = 'Relation';\n\n\tdeclare readonly $brand: 'Relation';\n\treadonly referencedTableName: TTableName;\n\tfieldName!: string;\n\n\tconstructor(\n\t\treadonly sourceTable: Table,\n\t\treadonly referencedTable: AnyTable<{ name: TTableName }>,\n\t\treadonly relationName: string | undefined,\n\t) {\n\t\tthis.referencedTableName = referencedTable[Table.Symbol.Name] as TTableName;\n\t}\n\n\tabstract withFieldName(fieldName: string): Relation;\n}\n\nexport class Relations<\n\tTTableName extends string = string,\n\tTConfig extends Record = Record,\n> {\n\tstatic readonly [entityKind]: string = 'Relations';\n\n\tdeclare readonly $brand: 'Relations';\n\n\tconstructor(\n\t\treadonly table: AnyTable<{ name: TTableName }>,\n\t\treadonly config: (helpers: TableRelationsHelpers) => TConfig,\n\t) {}\n}\n\nexport class One<\n\tTTableName extends string = string,\n\tTIsNullable extends boolean = boolean,\n> extends Relation {\n\tstatic override readonly [entityKind]: string = 'One';\n\n\tdeclare protected $relationBrand: 'One';\n\n\tconstructor(\n\t\tsourceTable: Table,\n\t\treferencedTable: AnyTable<{ name: TTableName }>,\n\t\treadonly config:\n\t\t\t| RelationConfig<\n\t\t\t\tTTableName,\n\t\t\t\tstring,\n\t\t\t\tAnyColumn<{ tableName: TTableName }>[]\n\t\t\t>\n\t\t\t| undefined,\n\t\treadonly isNullable: TIsNullable,\n\t) {\n\t\tsuper(sourceTable, referencedTable, config?.relationName);\n\t}\n\n\twithFieldName(fieldName: string): One {\n\t\tconst relation = new One(\n\t\t\tthis.sourceTable,\n\t\t\tthis.referencedTable,\n\t\t\tthis.config,\n\t\t\tthis.isNullable,\n\t\t);\n\t\trelation.fieldName = fieldName;\n\t\treturn relation;\n\t}\n}\n\nexport class Many extends Relation {\n\tstatic override readonly [entityKind]: string = 'Many';\n\n\tdeclare protected $relationBrand: 'Many';\n\n\tconstructor(\n\t\tsourceTable: Table,\n\t\treferencedTable: AnyTable<{ name: TTableName }>,\n\t\treadonly config: { relationName: string } | undefined,\n\t) {\n\t\tsuper(sourceTable, referencedTable, config?.relationName);\n\t}\n\n\twithFieldName(fieldName: string): Many {\n\t\tconst relation = new Many(\n\t\t\tthis.sourceTable,\n\t\t\tthis.referencedTable,\n\t\t\tthis.config,\n\t\t);\n\t\trelation.fieldName = fieldName;\n\t\treturn relation;\n\t}\n}\n\nexport type TableRelationsKeysOnly<\n\tTSchema extends Record,\n\tTTableName extends string,\n\tK extends keyof TSchema,\n> = TSchema[K] extends Relations ? K : never;\n\nexport type ExtractTableRelationsFromSchema<\n\tTSchema extends Record,\n\tTTableName extends string,\n> = ExtractObjectValues<\n\t{\n\t\t[\n\t\t\tK in keyof TSchema as TableRelationsKeysOnly<\n\t\t\t\tTSchema,\n\t\t\t\tTTableName,\n\t\t\t\tK\n\t\t\t>\n\t\t]: TSchema[K] extends Relations ? TConfig : never;\n\t}\n>;\n\nexport type ExtractObjectValues = T[keyof T];\n\nexport type ExtractRelationsFromTableExtraConfigSchema<\n\tTConfig extends unknown[],\n> = ExtractObjectValues<\n\t{\n\t\t[\n\t\t\tK in keyof TConfig as TConfig[K] extends Relations ? K\n\t\t\t\t: never\n\t\t]: TConfig[K] extends Relations ? TRelationConfig\n\t\t\t: never;\n\t}\n>;\n\nexport function getOperators() {\n\treturn {\n\t\tand,\n\t\tbetween,\n\t\teq,\n\t\texists,\n\t\tgt,\n\t\tgte,\n\t\tilike,\n\t\tinArray,\n\t\tisNull,\n\t\tisNotNull,\n\t\tlike,\n\t\tlt,\n\t\tlte,\n\t\tne,\n\t\tnot,\n\t\tnotBetween,\n\t\tnotExists,\n\t\tnotLike,\n\t\tnotIlike,\n\t\tnotInArray,\n\t\tor,\n\t\tsql,\n\t};\n}\n\nexport type Operators = ReturnType;\n\nexport function getOrderByOperators() {\n\treturn {\n\t\tsql,\n\t\tasc,\n\t\tdesc,\n\t};\n}\n\nexport type OrderByOperators = ReturnType;\n\nexport type FindTableByDBName<\n\tTSchema extends TablesRelationalConfig,\n\tTTableName extends string,\n> = ExtractObjectValues<\n\t{\n\t\t[\n\t\t\tK in keyof TSchema as TSchema[K]['dbName'] extends TTableName ? K\n\t\t\t\t: never\n\t\t]: TSchema[K];\n\t}\n>;\n\nexport type DBQueryConfig<\n\tTRelationType extends 'one' | 'many' = 'one' | 'many',\n\tTIsRoot extends boolean = boolean,\n\tTSchema extends TablesRelationalConfig = TablesRelationalConfig,\n\tTTableConfig extends TableRelationalConfig = TableRelationalConfig,\n> =\n\t& {\n\t\tcolumns?:\n\t\t\t| {\n\t\t\t\t[K in keyof TTableConfig['columns']]?: boolean;\n\t\t\t}\n\t\t\t| undefined;\n\t\twith?:\n\t\t\t| {\n\t\t\t\t[K in keyof TTableConfig['relations']]?:\n\t\t\t\t\t| true\n\t\t\t\t\t| DBQueryConfig<\n\t\t\t\t\t\tTTableConfig['relations'][K] extends One ? 'one' : 'many',\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\tTSchema,\n\t\t\t\t\t\tFindTableByDBName<\n\t\t\t\t\t\t\tTSchema,\n\t\t\t\t\t\t\tTTableConfig['relations'][K]['referencedTableName']\n\t\t\t\t\t\t>\n\t\t\t\t\t>\n\t\t\t\t\t| undefined;\n\t\t\t}\n\t\t\t| undefined;\n\t\textras?:\n\t\t\t| Record\n\t\t\t| ((\n\t\t\t\tfields: Simplify<\n\t\t\t\t\t[TTableConfig['columns']] extends [never] ? {}\n\t\t\t\t\t\t: TTableConfig['columns']\n\t\t\t\t>,\n\t\t\t\toperators: { sql: Operators['sql'] },\n\t\t\t) => Record)\n\t\t\t| undefined;\n\t}\n\t& (TRelationType extends 'many' ?\n\t\t\t& {\n\t\t\t\twhere?:\n\t\t\t\t\t| SQL\n\t\t\t\t\t| undefined\n\t\t\t\t\t| ((\n\t\t\t\t\t\tfields: Simplify<\n\t\t\t\t\t\t\t[TTableConfig['columns']] extends [never] ? {}\n\t\t\t\t\t\t\t\t: TTableConfig['columns']\n\t\t\t\t\t\t>,\n\t\t\t\t\t\toperators: Operators,\n\t\t\t\t\t) => SQL | undefined);\n\t\t\t\torderBy?:\n\t\t\t\t\t| ValueOrArray\n\t\t\t\t\t| ((\n\t\t\t\t\t\tfields: Simplify<\n\t\t\t\t\t\t\t[TTableConfig['columns']] extends [never] ? {}\n\t\t\t\t\t\t\t\t: TTableConfig['columns']\n\t\t\t\t\t\t>,\n\t\t\t\t\t\toperators: OrderByOperators,\n\t\t\t\t\t) => ValueOrArray)\n\t\t\t\t\t| undefined;\n\t\t\t\tlimit?: number | Placeholder | undefined;\n\t\t\t}\n\t\t\t& (TIsRoot extends true ? {\n\t\t\t\t\toffset?: number | Placeholder | undefined;\n\t\t\t\t}\n\t\t\t\t: {})\n\t\t: {});\n\nexport interface TableRelationalConfig {\n\ttsName: string;\n\tdbName: string;\n\tcolumns: Record;\n\trelations: Record;\n\tprimaryKey: AnyColumn[];\n\tschema?: string;\n}\n\nexport type TablesRelationalConfig = Record;\n\nexport interface RelationalSchemaConfig<\n\tTSchema extends TablesRelationalConfig,\n> {\n\tfullSchema: Record;\n\tschema: TSchema;\n\ttableNamesMap: Record;\n}\n\nexport type ExtractTablesWithRelations<\n\tTSchema extends Record,\n> = {\n\t[\n\t\tK in keyof TSchema as TSchema[K] extends Table ? K\n\t\t\t: never\n\t]: TSchema[K] extends Table ? {\n\t\t\ttsName: K & string;\n\t\t\tdbName: TSchema[K]['_']['name'];\n\t\t\tcolumns: TSchema[K]['_']['columns'];\n\t\t\trelations: ExtractTableRelationsFromSchema<\n\t\t\t\tTSchema,\n\t\t\t\tTSchema[K]['_']['name']\n\t\t\t>;\n\t\t\tprimaryKey: AnyColumn[];\n\t\t}\n\t\t: never;\n};\n\nexport type ReturnTypeOrValue = T extends (...args: any[]) => infer R ? R\n\t: T;\n\nexport type BuildRelationResult<\n\tTSchema extends TablesRelationalConfig,\n\tTInclude,\n\tTRelations extends Record,\n> = {\n\t[\n\t\tK in\n\t\t\t& NonUndefinedKeysOnly\n\t\t\t& keyof TRelations\n\t]: TRelations[K] extends infer TRel extends Relation ? BuildQueryResult<\n\t\t\tTSchema,\n\t\t\tFindTableByDBName,\n\t\t\tAssume>\n\t\t> extends infer TResult ? TRel extends One ?\n\t\t\t\t\t| TResult\n\t\t\t\t\t| (Equal extends true ? null : never)\n\t\t\t: TResult[]\n\t\t: never\n\t\t: never;\n};\n\nexport type NonUndefinedKeysOnly =\n\t& ExtractObjectValues<\n\t\t{\n\t\t\t[K in keyof T as T[K] extends undefined ? never : K]: K;\n\t\t}\n\t>\n\t& keyof T;\n\nexport type BuildQueryResult<\n\tTSchema extends TablesRelationalConfig,\n\tTTableConfig extends TableRelationalConfig,\n\tTFullSelection extends true | Record,\n> = Equal extends true ? InferModelFromColumns\n\t: TFullSelection extends Record ? Simplify<\n\t\t\t& (TFullSelection['columns'] extends Record ? InferModelFromColumns<\n\t\t\t\t\t{\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\tK in Equal<\n\t\t\t\t\t\t\t\tExclude<\n\t\t\t\t\t\t\t\t\tTFullSelection['columns'][\n\t\t\t\t\t\t\t\t\t\t& keyof TFullSelection['columns']\n\t\t\t\t\t\t\t\t\t\t& keyof TTableConfig['columns']\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\tundefined\n\t\t\t\t\t\t\t\t>,\n\t\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t\t> extends true ? Exclude<\n\t\t\t\t\t\t\t\t\tkeyof TTableConfig['columns'],\n\t\t\t\t\t\t\t\t\tNonUndefinedKeysOnly\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t\t\t& {\n\t\t\t\t\t\t\t\t\t\t[K in keyof TFullSelection['columns']]: Equal<\n\t\t\t\t\t\t\t\t\t\t\tTFullSelection['columns'][K],\n\t\t\t\t\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t\t\t\t\t> extends true ? K\n\t\t\t\t\t\t\t\t\t\t\t: never;\n\t\t\t\t\t\t\t\t\t}[keyof TFullSelection['columns']]\n\t\t\t\t\t\t\t\t\t& keyof TTableConfig['columns']\n\t\t\t\t\t\t]: TTableConfig['columns'][K];\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t: InferModelFromColumns)\n\t\t\t& (TFullSelection['extras'] extends\n\t\t\t\t| Record\n\t\t\t\t| ((...args: any[]) => Record) ? {\n\t\t\t\t\t[\n\t\t\t\t\t\tK in NonUndefinedKeysOnly<\n\t\t\t\t\t\t\tReturnTypeOrValue\n\t\t\t\t\t\t>\n\t\t\t\t\t]: Assume<\n\t\t\t\t\t\tReturnTypeOrValue[K],\n\t\t\t\t\t\tSQL.Aliased\n\t\t\t\t\t>['_']['type'];\n\t\t\t\t}\n\t\t\t\t: {})\n\t\t\t& (TFullSelection['with'] extends Record ? BuildRelationResult<\n\t\t\t\t\tTSchema,\n\t\t\t\t\tTFullSelection['with'],\n\t\t\t\t\tTTableConfig['relations']\n\t\t\t\t>\n\t\t\t\t: {})\n\t\t>\n\t: never;\n\nexport interface RelationConfig<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends AnyColumn<{ tableName: TTableName }>[],\n> {\n\trelationName?: string;\n\tfields: TColumns;\n\treferences: ColumnsWithTable;\n}\n\nexport function extractTablesRelationalConfig<\n\tTTables extends TablesRelationalConfig,\n>(\n\tschema: Record,\n\tconfigHelpers: (table: Table) => any,\n): { tables: TTables; tableNamesMap: Record } {\n\tif (\n\t\tObject.keys(schema).length === 1\n\t\t&& 'default' in schema\n\t\t&& !is(schema['default'], Table)\n\t) {\n\t\tschema = schema['default'] as Record;\n\t}\n\n\t// table DB name -> schema table key\n\tconst tableNamesMap: Record = {};\n\t// Table relations found before their tables - need to buffer them until we know the schema table key\n\tconst relationsBuffer: Record<\n\t\tstring,\n\t\t{ relations: Record; primaryKey?: AnyColumn[] }\n\t> = {};\n\tconst tablesConfig: TablesRelationalConfig = {};\n\tfor (const [key, value] of Object.entries(schema)) {\n\t\tif (is(value, Table)) {\n\t\t\tconst dbName = getTableUniqueName(value);\n\t\t\tconst bufferedRelations = relationsBuffer[dbName];\n\t\t\ttableNamesMap[dbName] = key;\n\t\t\ttablesConfig[key] = {\n\t\t\t\ttsName: key,\n\t\t\t\tdbName: value[Table.Symbol.Name],\n\t\t\t\tschema: value[Table.Symbol.Schema],\n\t\t\t\tcolumns: value[Table.Symbol.Columns],\n\t\t\t\trelations: bufferedRelations?.relations ?? {},\n\t\t\t\tprimaryKey: bufferedRelations?.primaryKey ?? [],\n\t\t\t};\n\n\t\t\t// Fill in primary keys\n\t\t\tfor (\n\t\t\t\tconst column of Object.values(\n\t\t\t\t\t(value as Table)[Table.Symbol.Columns],\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tif (column.primary) {\n\t\t\t\t\ttablesConfig[key]!.primaryKey.push(column);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst extraConfig = value[Table.Symbol.ExtraConfigBuilder]?.((value as Table)[Table.Symbol.ExtraConfigColumns]);\n\t\t\tif (extraConfig) {\n\t\t\t\tfor (const configEntry of Object.values(extraConfig)) {\n\t\t\t\t\tif (is(configEntry, PrimaryKeyBuilder)) {\n\t\t\t\t\t\ttablesConfig[key]!.primaryKey.push(...configEntry.columns);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (is(value, Relations)) {\n\t\t\tconst dbName = getTableUniqueName(value.table);\n\t\t\tconst tableName = tableNamesMap[dbName];\n\t\t\tconst relations: Record = value.config(\n\t\t\t\tconfigHelpers(value.table),\n\t\t\t);\n\t\t\tlet primaryKey: AnyColumn[] | undefined;\n\n\t\t\tfor (const [relationName, relation] of Object.entries(relations)) {\n\t\t\t\tif (tableName) {\n\t\t\t\t\tconst tableConfig = tablesConfig[tableName]!;\n\t\t\t\t\ttableConfig.relations[relationName] = relation;\n\t\t\t\t\tif (primaryKey) {\n\t\t\t\t\t\ttableConfig.primaryKey.push(...primaryKey);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (!(dbName in relationsBuffer)) {\n\t\t\t\t\t\trelationsBuffer[dbName] = {\n\t\t\t\t\t\t\trelations: {},\n\t\t\t\t\t\t\tprimaryKey,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\trelationsBuffer[dbName]!.relations[relationName] = relation;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { tables: tablesConfig as TTables, tableNamesMap };\n}\n\nexport function relations<\n\tTTableName extends string,\n\tTRelations extends Record>,\n>(\n\ttable: AnyTable<{ name: TTableName }>,\n\trelations: (helpers: TableRelationsHelpers) => TRelations,\n): Relations {\n\treturn new Relations(\n\t\ttable,\n\t\t(helpers: TableRelationsHelpers) =>\n\t\t\tObject.fromEntries(\n\t\t\t\tObject.entries(relations(helpers)).map(([key, value]) => [\n\t\t\t\t\tkey,\n\t\t\t\t\tvalue.withFieldName(key),\n\t\t\t\t]),\n\t\t\t) as TRelations,\n\t);\n}\n\nexport function createOne(sourceTable: Table) {\n\treturn function one<\n\t\tTForeignTable extends Table,\n\t\tTColumns extends [\n\t\t\tAnyColumn<{ tableName: TTableName }>,\n\t\t\t...AnyColumn<{ tableName: TTableName }>[],\n\t\t],\n\t>(\n\t\ttable: TForeignTable,\n\t\tconfig?: RelationConfig,\n\t): One<\n\t\tTForeignTable['_']['name'],\n\t\tEqual\n\t> {\n\t\treturn new One(\n\t\t\tsourceTable,\n\t\t\ttable,\n\t\t\tconfig,\n\t\t\t(config?.fields.reduce((res, f) => res && f.notNull, true)\n\t\t\t\t?? false) as Equal,\n\t\t);\n\t};\n}\n\nexport function createMany(sourceTable: Table) {\n\treturn function many(\n\t\treferencedTable: TForeignTable,\n\t\tconfig?: { relationName: string },\n\t): Many {\n\t\treturn new Many(sourceTable, referencedTable, config);\n\t};\n}\n\nexport interface NormalizedRelation {\n\tfields: AnyColumn[];\n\treferences: AnyColumn[];\n}\n\nexport function normalizeRelation(\n\tschema: TablesRelationalConfig,\n\ttableNamesMap: Record,\n\trelation: Relation,\n): NormalizedRelation {\n\tif (is(relation, One) && relation.config) {\n\t\treturn {\n\t\t\tfields: relation.config.fields,\n\t\t\treferences: relation.config.references,\n\t\t};\n\t}\n\n\tconst referencedTableTsName = tableNamesMap[getTableUniqueName(relation.referencedTable)];\n\tif (!referencedTableTsName) {\n\t\tthrow new Error(\n\t\t\t`Table \"${relation.referencedTable[Table.Symbol.Name]}\" not found in schema`,\n\t\t);\n\t}\n\n\tconst referencedTableConfig = schema[referencedTableTsName];\n\tif (!referencedTableConfig) {\n\t\tthrow new Error(`Table \"${referencedTableTsName}\" not found in schema`);\n\t}\n\n\tconst sourceTable = relation.sourceTable;\n\tconst sourceTableTsName = tableNamesMap[getTableUniqueName(sourceTable)];\n\tif (!sourceTableTsName) {\n\t\tthrow new Error(\n\t\t\t`Table \"${sourceTable[Table.Symbol.Name]}\" not found in schema`,\n\t\t);\n\t}\n\n\tconst reverseRelations: Relation[] = [];\n\tfor (\n\t\tconst referencedTableRelation of Object.values(\n\t\t\treferencedTableConfig.relations,\n\t\t)\n\t) {\n\t\tif (\n\t\t\t(relation.relationName\n\t\t\t\t&& relation !== referencedTableRelation\n\t\t\t\t&& referencedTableRelation.relationName === relation.relationName)\n\t\t\t|| (!relation.relationName\n\t\t\t\t&& referencedTableRelation.referencedTable === relation.sourceTable)\n\t\t) {\n\t\t\treverseRelations.push(referencedTableRelation);\n\t\t}\n\t}\n\n\tif (reverseRelations.length > 1) {\n\t\tthrow relation.relationName\n\t\t\t? new Error(\n\t\t\t\t`There are multiple relations with name \"${relation.relationName}\" in table \"${referencedTableTsName}\"`,\n\t\t\t)\n\t\t\t: new Error(\n\t\t\t\t`There are multiple relations between \"${referencedTableTsName}\" and \"${\n\t\t\t\t\trelation.sourceTable[Table.Symbol.Name]\n\t\t\t\t}\". Please specify relation name`,\n\t\t\t);\n\t}\n\n\tif (\n\t\treverseRelations[0]\n\t\t&& is(reverseRelations[0], One)\n\t\t&& reverseRelations[0].config\n\t) {\n\t\treturn {\n\t\t\tfields: reverseRelations[0].config.references,\n\t\t\treferences: reverseRelations[0].config.fields,\n\t\t};\n\t}\n\n\tthrow new Error(\n\t\t`There is not enough information to infer relation \"${sourceTableTsName}.${relation.fieldName}\"`,\n\t);\n}\n\nexport function createTableRelationsHelpers(\n\tsourceTable: AnyTable<{ name: TTableName }>,\n) {\n\treturn {\n\t\tone: createOne(sourceTable),\n\t\tmany: createMany(sourceTable),\n\t};\n}\n\nexport type TableRelationsHelpers = ReturnType<\n\ttypeof createTableRelationsHelpers\n>;\n\nexport interface BuildRelationalQueryResult<\n\tTTable extends Table = Table,\n\tTColumn extends Column = Column,\n> {\n\ttableTsKey: string;\n\tselection: {\n\t\tdbKey: string;\n\t\ttsKey: string;\n\t\tfield: TColumn | SQL | SQL.Aliased;\n\t\trelationTableTsKey: string | undefined;\n\t\tisJson: boolean;\n\t\tisExtra?: boolean;\n\t\tselection: BuildRelationalQueryResult['selection'];\n\t}[];\n\tsql: TTable | SQL;\n}\n\nexport function mapRelationalRow(\n\ttablesConfig: TablesRelationalConfig,\n\ttableConfig: TableRelationalConfig,\n\trow: unknown[],\n\tbuildQueryResultSelection: BuildRelationalQueryResult['selection'],\n\tmapColumnValue: (value: unknown) => unknown = (value) => value,\n): Record {\n\tconst result: Record = {};\n\n\tfor (\n\t\tconst [\n\t\t\tselectionItemIndex,\n\t\t\tselectionItem,\n\t\t] of buildQueryResultSelection.entries()\n\t) {\n\t\tif (selectionItem.isJson) {\n\t\t\tconst relation = tableConfig.relations[selectionItem.tsKey]!;\n\t\t\tconst rawSubRows = row[selectionItemIndex] as\n\t\t\t\t| unknown[]\n\t\t\t\t| null\n\t\t\t\t| [null]\n\t\t\t\t| string;\n\t\t\tconst subRows = typeof rawSubRows === 'string'\n\t\t\t\t? (JSON.parse(rawSubRows) as unknown[])\n\t\t\t\t: rawSubRows;\n\t\t\tresult[selectionItem.tsKey] = is(relation, One)\n\t\t\t\t? subRows\n\t\t\t\t\t&& mapRelationalRow(\n\t\t\t\t\t\ttablesConfig,\n\t\t\t\t\t\ttablesConfig[selectionItem.relationTableTsKey!]!,\n\t\t\t\t\t\tsubRows,\n\t\t\t\t\t\tselectionItem.selection,\n\t\t\t\t\t\tmapColumnValue,\n\t\t\t\t\t)\n\t\t\t\t: (subRows as unknown[][]).map((subRow) =>\n\t\t\t\t\tmapRelationalRow(\n\t\t\t\t\t\ttablesConfig,\n\t\t\t\t\t\ttablesConfig[selectionItem.relationTableTsKey!]!,\n\t\t\t\t\t\tsubRow,\n\t\t\t\t\t\tselectionItem.selection,\n\t\t\t\t\t\tmapColumnValue,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t} else {\n\t\t\tconst value = mapColumnValue(row[selectionItemIndex]);\n\t\t\tconst field = selectionItem.field!;\n\t\t\tlet decoder;\n\t\t\tif (is(field, Column)) {\n\t\t\t\tdecoder = field;\n\t\t\t} else if (is(field, SQL)) {\n\t\t\t\tdecoder = field.decoder;\n\t\t\t} else {\n\t\t\t\tdecoder = field.sql.decoder;\n\t\t\t}\n\t\t\tresult[selectionItem.tsKey] = value === null ? null : decoder.mapFromDriverValue(value);\n\t\t}\n\t}\n\n\treturn result;\n}\n", "import type { AnyColumn } from './column.ts';\nimport { Column } from './column.ts';\nimport { entityKind, is } from './entity.ts';\nimport type { Relation } from './relations.ts';\nimport type { View } from './sql/sql.ts';\nimport { SQL, sql } from './sql/sql.ts';\nimport { Table } from './table.ts';\nimport { ViewBaseConfig } from './view-common.ts';\n\nexport class ColumnAliasProxyHandler implements ProxyHandler {\n\tstatic readonly [entityKind]: string = 'ColumnAliasProxyHandler';\n\n\tconstructor(private table: Table | View) {}\n\n\tget(columnObj: TColumn, prop: string | symbol): any {\n\t\tif (prop === 'table') {\n\t\t\treturn this.table;\n\t\t}\n\n\t\treturn columnObj[prop as keyof TColumn];\n\t}\n}\n\nexport class TableAliasProxyHandler implements ProxyHandler {\n\tstatic readonly [entityKind]: string = 'TableAliasProxyHandler';\n\n\tconstructor(private alias: string, private replaceOriginalName: boolean) {}\n\n\tget(target: T, prop: string | symbol): any {\n\t\tif (prop === Table.Symbol.IsAlias) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (prop === Table.Symbol.Name) {\n\t\t\treturn this.alias;\n\t\t}\n\n\t\tif (this.replaceOriginalName && prop === Table.Symbol.OriginalName) {\n\t\t\treturn this.alias;\n\t\t}\n\n\t\tif (prop === ViewBaseConfig) {\n\t\t\treturn {\n\t\t\t\t...target[ViewBaseConfig as keyof typeof target],\n\t\t\t\tname: this.alias,\n\t\t\t\tisAlias: true,\n\t\t\t};\n\t\t}\n\n\t\tif (prop === Table.Symbol.Columns) {\n\t\t\tconst columns = (target as Table)[Table.Symbol.Columns];\n\t\t\tif (!columns) {\n\t\t\t\treturn columns;\n\t\t\t}\n\n\t\t\tconst proxiedColumns: { [key: string]: any } = {};\n\n\t\t\tObject.keys(columns).map((key) => {\n\t\t\t\tproxiedColumns[key] = new Proxy(\n\t\t\t\t\tcolumns[key]!,\n\t\t\t\t\tnew ColumnAliasProxyHandler(new Proxy(target, this)),\n\t\t\t\t);\n\t\t\t});\n\n\t\t\treturn proxiedColumns;\n\t\t}\n\n\t\tconst value = target[prop as keyof typeof target];\n\t\tif (is(value, Column)) {\n\t\t\treturn new Proxy(value as AnyColumn, new ColumnAliasProxyHandler(new Proxy(target, this)));\n\t\t}\n\n\t\treturn value;\n\t}\n}\n\nexport class RelationTableAliasProxyHandler implements ProxyHandler {\n\tstatic readonly [entityKind]: string = 'RelationTableAliasProxyHandler';\n\n\tconstructor(private alias: string) {}\n\n\tget(target: T, prop: string | symbol): any {\n\t\tif (prop === 'sourceTable') {\n\t\t\treturn aliasedTable(target.sourceTable, this.alias);\n\t\t}\n\n\t\treturn target[prop as keyof typeof target];\n\t}\n}\n\nexport function aliasedTable(\n\ttable: T,\n\ttableAlias: string,\n): T {\n\treturn new Proxy(table, new TableAliasProxyHandler(tableAlias, false)) as any;\n}\n\nexport function aliasedRelation(relation: T, tableAlias: string): T {\n\treturn new Proxy(relation, new RelationTableAliasProxyHandler(tableAlias));\n}\n\nexport function aliasedTableColumn(column: T, tableAlias: string): T {\n\treturn new Proxy(\n\t\tcolumn,\n\t\tnew ColumnAliasProxyHandler(new Proxy(column.table, new TableAliasProxyHandler(tableAlias, false))),\n\t);\n}\n\nexport function mapColumnsInAliasedSQLToAlias(query: SQL.Aliased, alias: string): SQL.Aliased {\n\treturn new SQL.Aliased(mapColumnsInSQLToAlias(query.sql, alias), query.fieldAlias);\n}\n\nexport function mapColumnsInSQLToAlias(query: SQL, alias: string): SQL {\n\treturn sql.join(query.queryChunks.map((c) => {\n\t\tif (is(c, Column)) {\n\t\t\treturn aliasedTableColumn(c, alias);\n\t\t}\n\t\tif (is(c, SQL)) {\n\t\t\treturn mapColumnsInSQLToAlias(c, alias);\n\t\t}\n\t\tif (is(c, SQL.Aliased)) {\n\t\t\treturn mapColumnsInAliasedSQLToAlias(c, alias);\n\t\t}\n\t\treturn c;\n\t}));\n}\n", "import { ColumnAliasProxyHandler, TableAliasProxyHandler } from './alias.ts';\nimport { Column } from './column.ts';\nimport { entityKind, is } from './entity.ts';\nimport { SQL, View } from './sql/sql.ts';\nimport { Subquery } from './subquery.ts';\nimport { ViewBaseConfig } from './view-common.ts';\n\nexport class SelectionProxyHandler | View>\n\timplements ProxyHandler | View>\n{\n\tstatic readonly [entityKind]: string = 'SelectionProxyHandler';\n\n\tprivate config: {\n\t\t/**\n\t\t * Table alias for the columns\n\t\t */\n\t\talias?: string;\n\t\t/**\n\t\t * What to do when a field is an instance of `SQL.Aliased` and it's not a selection field (from a subquery)\n\t\t *\n\t\t * `sql` - return the underlying SQL expression\n\t\t *\n\t\t * `alias` - return the field alias\n\t\t */\n\t\tsqlAliasedBehavior: 'sql' | 'alias';\n\t\t/**\n\t\t * What to do when a field is an instance of `SQL` and it doesn't have an alias declared\n\t\t *\n\t\t * `sql` - return the underlying SQL expression\n\t\t *\n\t\t * `error` - return a DrizzleTypeError on type level and throw an error on runtime\n\t\t */\n\t\tsqlBehavior: 'sql' | 'error';\n\n\t\t/**\n\t\t * Whether to replace the original name of the column with the alias\n\t\t * Should be set to `true` for views creation\n\t\t * @default false\n\t\t */\n\t\treplaceOriginalName?: boolean;\n\t};\n\n\tconstructor(config: SelectionProxyHandler['config']) {\n\t\tthis.config = { ...config };\n\t}\n\n\tget(subquery: T, prop: string | symbol): any {\n\t\tif (prop === '_') {\n\t\t\treturn {\n\t\t\t\t...subquery['_' as keyof typeof subquery],\n\t\t\t\tselectedFields: new Proxy(\n\t\t\t\t\t(subquery as Subquery)._.selectedFields,\n\t\t\t\t\tthis as ProxyHandler>,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\n\t\tif (prop === ViewBaseConfig) {\n\t\t\treturn {\n\t\t\t\t...subquery[ViewBaseConfig as keyof typeof subquery],\n\t\t\t\tselectedFields: new Proxy(\n\t\t\t\t\t(subquery as View)[ViewBaseConfig].selectedFields,\n\t\t\t\t\tthis as ProxyHandler>,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\n\t\tif (typeof prop === 'symbol') {\n\t\t\treturn subquery[prop as keyof typeof subquery];\n\t\t}\n\n\t\tconst columns = is(subquery, Subquery)\n\t\t\t? subquery._.selectedFields\n\t\t\t: is(subquery, View)\n\t\t\t? subquery[ViewBaseConfig].selectedFields\n\t\t\t: subquery;\n\t\tconst value: unknown = columns[prop as keyof typeof columns];\n\n\t\tif (is(value, SQL.Aliased)) {\n\t\t\t// Never return the underlying SQL expression for a field previously selected in a subquery\n\t\t\tif (this.config.sqlAliasedBehavior === 'sql' && !value.isSelectionField) {\n\t\t\t\treturn value.sql;\n\t\t\t}\n\n\t\t\tconst newValue = value.clone();\n\t\t\tnewValue.isSelectionField = true;\n\t\t\treturn newValue;\n\t\t}\n\n\t\tif (is(value, SQL)) {\n\t\t\tif (this.config.sqlBehavior === 'sql') {\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\tthrow new Error(\n\t\t\t\t`You tried to reference \"${prop}\" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using \".as('alias')\" method.`,\n\t\t\t);\n\t\t}\n\n\t\tif (is(value, Column)) {\n\t\t\tif (this.config.alias) {\n\t\t\t\treturn new Proxy(\n\t\t\t\t\tvalue,\n\t\t\t\t\tnew ColumnAliasProxyHandler(\n\t\t\t\t\t\tnew Proxy(\n\t\t\t\t\t\t\tvalue.table,\n\t\t\t\t\t\t\tnew TableAliasProxyHandler(this.config.alias, this.config.replaceOriginalName ?? false),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\n\t\tif (typeof value !== 'object' || value === null) {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn new Proxy(value, new SelectionProxyHandler(this.config));\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\n\nexport abstract class QueryPromise implements Promise {\n\tstatic readonly [entityKind]: string = 'QueryPromise';\n\n\t[Symbol.toStringTag] = 'QueryPromise';\n\n\tcatch(\n\t\tonRejected?: ((reason: any) => TResult | PromiseLike) | null | undefined,\n\t): Promise {\n\t\treturn this.then(undefined, onRejected);\n\t}\n\n\tfinally(onFinally?: (() => void) | null | undefined): Promise {\n\t\treturn this.then(\n\t\t\t(value) => {\n\t\t\t\tonFinally?.();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\t(reason) => {\n\t\t\t\tonFinally?.();\n\t\t\t\tthrow reason;\n\t\t\t},\n\t\t);\n\t}\n\n\tthen(\n\t\tonFulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null,\n\t\tonRejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null,\n\t): Promise {\n\t\treturn this.execute().then(onFulfilled, onRejected);\n\t}\n\n\tabstract execute(): Promise;\n}\n", "import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { AnySQLiteColumn, SQLiteColumn } from './columns/index.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport type UpdateDeleteAction = 'cascade' | 'restrict' | 'no action' | 'set null' | 'set default';\n\nexport type Reference = () => {\n\treadonly name?: string;\n\treadonly columns: SQLiteColumn[];\n\treadonly foreignTable: SQLiteTable;\n\treadonly foreignColumns: SQLiteColumn[];\n};\n\nexport class ForeignKeyBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteForeignKeyBuilder';\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteForeignKeyBuilder';\n\t\tforeignTableName: 'TForeignTableName';\n\t};\n\n\t/** @internal */\n\treference: Reference;\n\n\t/** @internal */\n\t_onUpdate: UpdateDeleteAction | undefined;\n\n\t/** @internal */\n\t_onDelete: UpdateDeleteAction | undefined;\n\n\tconstructor(\n\t\tconfig: () => {\n\t\t\tname?: string;\n\t\t\tcolumns: SQLiteColumn[];\n\t\t\tforeignColumns: SQLiteColumn[];\n\t\t},\n\t\tactions?: {\n\t\t\tonUpdate?: UpdateDeleteAction;\n\t\t\tonDelete?: UpdateDeleteAction;\n\t\t} | undefined,\n\t) {\n\t\tthis.reference = () => {\n\t\t\tconst { name, columns, foreignColumns } = config();\n\t\t\treturn { name, columns, foreignTable: foreignColumns[0]!.table as SQLiteTable, foreignColumns };\n\t\t};\n\t\tif (actions) {\n\t\t\tthis._onUpdate = actions.onUpdate;\n\t\t\tthis._onDelete = actions.onDelete;\n\t\t}\n\t}\n\n\tonUpdate(action: UpdateDeleteAction): this {\n\t\tthis._onUpdate = action;\n\t\treturn this;\n\t}\n\n\tonDelete(action: UpdateDeleteAction): this {\n\t\tthis._onDelete = action;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): ForeignKey {\n\t\treturn new ForeignKey(table, this);\n\t}\n}\n\nexport class ForeignKey {\n\tstatic readonly [entityKind]: string = 'SQLiteForeignKey';\n\n\treadonly reference: Reference;\n\treadonly onUpdate: UpdateDeleteAction | undefined;\n\treadonly onDelete: UpdateDeleteAction | undefined;\n\n\tconstructor(readonly table: SQLiteTable, builder: ForeignKeyBuilder) {\n\t\tthis.reference = builder.reference;\n\t\tthis.onUpdate = builder._onUpdate;\n\t\tthis.onDelete = builder._onDelete;\n\t}\n\n\tgetName(): string {\n\t\tconst { name, columns, foreignColumns } = this.reference();\n\t\tconst columnNames = columns.map((column) => column.name);\n\t\tconst foreignColumnNames = foreignColumns.map((column) => column.name);\n\t\tconst chunks = [\n\t\t\tthis.table[TableName],\n\t\t\t...columnNames,\n\t\t\tforeignColumns[0]!.table[TableName],\n\t\t\t...foreignColumnNames,\n\t\t];\n\t\treturn name ?? `${chunks.join('_')}_fk`;\n\t}\n}\n\ntype ColumnsWithTable<\n\tTTableName extends string,\n\tTColumns extends SQLiteColumn[],\n> = { [Key in keyof TColumns]: AnySQLiteColumn<{ tableName: TTableName }> };\n\n/**\n * @deprecated please use `foreignKey({ columns: [], foreignColumns: [] })` syntax without callback\n * @param config\n * @returns\n */\nexport function foreignKey<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends [AnySQLiteColumn<{ tableName: TTableName }>, ...AnySQLiteColumn<{ tableName: TTableName }>[]],\n>(\n\tconfig: () => {\n\t\tname?: string;\n\t\tcolumns: TColumns;\n\t\tforeignColumns: ColumnsWithTable;\n\t},\n): ForeignKeyBuilder;\nexport function foreignKey<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends [AnySQLiteColumn<{ tableName: TTableName }>, ...AnySQLiteColumn<{ tableName: TTableName }>[]],\n>(\n\tconfig: {\n\t\tname?: string;\n\t\tcolumns: TColumns;\n\t\tforeignColumns: ColumnsWithTable;\n\t},\n): ForeignKeyBuilder;\nexport function foreignKey(\n\tconfig: any,\n): ForeignKeyBuilder {\n\tfunction mappedConfig() {\n\t\tif (typeof config === 'function') {\n\t\t\tconst { name, columns, foreignColumns } = config();\n\t\t\treturn {\n\t\t\t\tname,\n\t\t\t\tcolumns,\n\t\t\t\tforeignColumns,\n\t\t\t};\n\t\t}\n\t\treturn config;\n\t}\n\n\treturn new ForeignKeyBuilder(mappedConfig);\n}\n", "import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { SQLiteColumn } from './columns/common.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport function uniqueKeyName(table: SQLiteTable, columns: string[]) {\n\treturn `${table[TableName]}_${columns.join('_')}_unique`;\n}\n\nexport function unique(name?: string): UniqueOnConstraintBuilder {\n\treturn new UniqueOnConstraintBuilder(name);\n}\n\nexport class UniqueConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueConstraintBuilder';\n\n\t/** @internal */\n\tcolumns: SQLiteColumn[];\n\n\tconstructor(\n\t\tcolumns: SQLiteColumn[],\n\t\tprivate name?: string,\n\t) {\n\t\tthis.columns = columns;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): UniqueConstraint {\n\t\treturn new UniqueConstraint(table, this.columns, this.name);\n\t}\n}\n\nexport class UniqueOnConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueOnConstraintBuilder';\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tname?: string,\n\t) {\n\t\tthis.name = name;\n\t}\n\n\ton(...columns: [SQLiteColumn, ...SQLiteColumn[]]) {\n\t\treturn new UniqueConstraintBuilder(columns, this.name);\n\t}\n}\n\nexport class UniqueConstraint {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueConstraint';\n\n\treadonly columns: SQLiteColumn[];\n\treadonly name?: string;\n\n\tconstructor(readonly table: SQLiteTable, columns: SQLiteColumn[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name));\n\t}\n\n\tgetName() {\n\t\treturn this.name;\n\t}\n}\n", "import type {\n\tColumnBuilderBase,\n\tColumnBuilderBaseConfig,\n\tColumnBuilderExtraConfig,\n\tColumnBuilderRuntimeConfig,\n\tColumnDataType,\n\tHasGenerated,\n\tMakeColumnConfig,\n} from '~/column-builder.ts';\nimport { ColumnBuilder } from '~/column-builder.ts';\nimport { Column } from '~/column.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { ForeignKey, UpdateDeleteAction } from '~/sqlite-core/foreign-keys.ts';\nimport { ForeignKeyBuilder } from '~/sqlite-core/foreign-keys.ts';\nimport type { AnySQLiteTable, SQLiteTable } from '~/sqlite-core/table.ts';\nimport type { Update } from '~/utils.ts';\nimport { uniqueKeyName } from '../unique-constraint.ts';\n\nexport interface ReferenceConfig {\n\tref: () => SQLiteColumn;\n\tactions: {\n\t\tonUpdate?: UpdateDeleteAction;\n\t\tonDelete?: UpdateDeleteAction;\n\t};\n}\n\nexport interface SQLiteColumnBuilderBase<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTTypeConfig extends object = object,\n> extends ColumnBuilderBase {}\n\nexport interface SQLiteGeneratedColumnConfig {\n\tmode?: 'virtual' | 'stored';\n}\n\nexport abstract class SQLiteColumnBuilder<\n\tT extends ColumnBuilderBaseConfig = ColumnBuilderBaseConfig,\n\tTRuntimeConfig extends object = object,\n\tTTypeConfig extends object = object,\n\tTExtraConfig extends ColumnBuilderExtraConfig = object,\n> extends ColumnBuilder\n\timplements SQLiteColumnBuilderBase\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteColumnBuilder';\n\n\tprivate foreignKeyConfigs: ReferenceConfig[] = [];\n\n\treferences(\n\t\tref: ReferenceConfig['ref'],\n\t\tactions: ReferenceConfig['actions'] = {},\n\t): this {\n\t\tthis.foreignKeyConfigs.push({ ref, actions });\n\t\treturn this;\n\t}\n\n\tunique(\n\t\tname?: string,\n\t): this {\n\t\tthis.config.isUnique = true;\n\t\tthis.config.uniqueName = name;\n\t\treturn this;\n\t}\n\n\tgeneratedAlwaysAs(as: SQL | T['data'] | (() => SQL), config?: SQLiteGeneratedColumnConfig): HasGenerated {\n\t\tthis.config.generated = {\n\t\t\tas,\n\t\t\ttype: 'always',\n\t\t\tmode: config?.mode ?? 'virtual',\n\t\t};\n\t\treturn this as any;\n\t}\n\n\t/** @internal */\n\tbuildForeignKeys(column: SQLiteColumn, table: SQLiteTable): ForeignKey[] {\n\t\treturn this.foreignKeyConfigs.map(({ ref, actions }) => {\n\t\t\treturn ((ref, actions) => {\n\t\t\t\tconst builder = new ForeignKeyBuilder(() => {\n\t\t\t\t\tconst foreignColumn = ref();\n\t\t\t\t\treturn { columns: [column], foreignColumns: [foreignColumn] };\n\t\t\t\t});\n\t\t\t\tif (actions.onUpdate) {\n\t\t\t\t\tbuilder.onUpdate(actions.onUpdate);\n\t\t\t\t}\n\t\t\t\tif (actions.onDelete) {\n\t\t\t\t\tbuilder.onDelete(actions.onDelete);\n\t\t\t\t}\n\t\t\t\treturn builder.build(table);\n\t\t\t})(ref, actions);\n\t\t});\n\t}\n\n\t/** @internal */\n\tabstract build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteColumn>;\n}\n\n// To understand how to use `SQLiteColumn` and `AnySQLiteColumn`, see `Column` and `AnyColumn` documentation.\nexport abstract class SQLiteColumn<\n\tT extends ColumnBaseConfig = ColumnBaseConfig,\n\tTRuntimeConfig extends object = {},\n\tTTypeConfig extends object = {},\n> extends Column {\n\tstatic override readonly [entityKind]: string = 'SQLiteColumn';\n\n\tconstructor(\n\t\toverride readonly table: SQLiteTable,\n\t\tconfig: ColumnBuilderRuntimeConfig,\n\t) {\n\t\tif (!config.uniqueName) {\n\t\t\tconfig.uniqueName = uniqueKeyName(table, [config.name]);\n\t\t}\n\t\tsuper(table, config);\n\t}\n}\n\nexport type AnySQLiteColumn> = {}> = SQLiteColumn<\n\tRequired, TPartial>>\n>;\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySQLiteTable } from '~/sqlite-core/table.ts';\nimport { type Equal, getColumnNameAndConfig, textDecoder } from '~/utils.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\ntype BlobMode = 'buffer' | 'json' | 'bigint';\n\nexport type SQLiteBigIntBuilderInitial = SQLiteBigIntBuilder<{\n\tname: TName;\n\tdataType: 'bigint';\n\tcolumnType: 'SQLiteBigInt';\n\tdata: bigint;\n\tdriverParam: Buffer;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteBigIntBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBigIntBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'bigint', 'SQLiteBigInt');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBigInt> {\n\t\treturn new SQLiteBigInt>(table, this.config as ColumnBuilderRuntimeConfig);\n\t}\n}\n\nexport class SQLiteBigInt> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteBigInt';\n\n\tgetSQLType(): string {\n\t\treturn 'blob';\n\t}\n\n\toverride mapFromDriverValue(value: Buffer | Uint8Array | ArrayBuffer): bigint {\n\t\tif (typeof Buffer !== 'undefined' && Buffer.from) {\n\t\t\tconst buf = Buffer.isBuffer(value)\n\t\t\t\t? value\n\t\t\t\t// eslint-disable-next-line no-instanceof/no-instanceof\n\t\t\t\t: value instanceof ArrayBuffer\n\t\t\t\t? Buffer.from(value)\n\t\t\t\t: value.buffer\n\t\t\t\t? Buffer.from(value.buffer, value.byteOffset, value.byteLength)\n\t\t\t\t: Buffer.from(value);\n\t\t\treturn BigInt(buf.toString('utf8'));\n\t\t}\n\n\t\treturn BigInt(textDecoder!.decode(value));\n\t}\n\n\toverride mapToDriverValue(value: bigint): Buffer {\n\t\treturn Buffer.from(value.toString());\n\t}\n}\n\nexport type SQLiteBlobJsonBuilderInitial = SQLiteBlobJsonBuilder<{\n\tname: TName;\n\tdataType: 'json';\n\tcolumnType: 'SQLiteBlobJson';\n\tdata: unknown;\n\tdriverParam: Buffer;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteBlobJsonBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBlobJsonBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'json', 'SQLiteBlobJson');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBlobJson> {\n\t\treturn new SQLiteBlobJson>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteBlobJson> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteBlobJson';\n\n\tgetSQLType(): string {\n\t\treturn 'blob';\n\t}\n\n\toverride mapFromDriverValue(value: Buffer | Uint8Array | ArrayBuffer): T['data'] {\n\t\tif (typeof Buffer !== 'undefined' && Buffer.from) {\n\t\t\tconst buf = Buffer.isBuffer(value)\n\t\t\t\t? value\n\t\t\t\t// eslint-disable-next-line no-instanceof/no-instanceof\n\t\t\t\t: value instanceof ArrayBuffer\n\t\t\t\t? Buffer.from(value)\n\t\t\t\t: value.buffer\n\t\t\t\t? Buffer.from(value.buffer, value.byteOffset, value.byteLength)\n\t\t\t\t: Buffer.from(value);\n\t\t\treturn JSON.parse(buf.toString('utf8'));\n\t\t}\n\n\t\treturn JSON.parse(textDecoder!.decode(value));\n\t}\n\n\toverride mapToDriverValue(value: T['data']): Buffer {\n\t\treturn Buffer.from(JSON.stringify(value));\n\t}\n}\n\nexport type SQLiteBlobBufferBuilderInitial = SQLiteBlobBufferBuilder<{\n\tname: TName;\n\tdataType: 'buffer';\n\tcolumnType: 'SQLiteBlobBuffer';\n\tdata: Buffer;\n\tdriverParam: Buffer;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteBlobBufferBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBlobBufferBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'buffer', 'SQLiteBlobBuffer');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBlobBuffer> {\n\t\treturn new SQLiteBlobBuffer>(table, this.config as ColumnBuilderRuntimeConfig);\n\t}\n}\n\nexport class SQLiteBlobBuffer> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteBlobBuffer';\n\n\toverride mapFromDriverValue(value: Buffer | Uint8Array | ArrayBuffer): T['data'] {\n\t\tif (Buffer.isBuffer(value)) {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn Buffer.from(value as Uint8Array);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn 'blob';\n\t}\n}\n\nexport interface BlobConfig {\n\tmode: TMode;\n}\n\n/**\n * It's recommended to use `text('...', { mode: 'json' })` instead of `blob` in JSON mode, because it supports JSON functions:\n * >All JSON functions currently throw an error if any of their arguments are BLOBs because BLOBs are reserved for a future enhancement in which BLOBs will store the binary encoding for JSON.\n *\n * https://www.sqlite.org/json1.html\n */\nexport function blob(): SQLiteBlobJsonBuilderInitial<''>;\nexport function blob(\n\tconfig?: BlobConfig,\n): Equal extends true ? SQLiteBigIntBuilderInitial<''>\n\t: Equal extends true ? SQLiteBlobBufferBuilderInitial<''>\n\t: SQLiteBlobJsonBuilderInitial<''>;\nexport function blob(\n\tname: TName,\n\tconfig?: BlobConfig,\n): Equal extends true ? SQLiteBigIntBuilderInitial\n\t: Equal extends true ? SQLiteBlobBufferBuilderInitial\n\t: SQLiteBlobJsonBuilderInitial;\nexport function blob(a?: string | BlobConfig, b?: BlobConfig) {\n\tconst { name, config } = getColumnNameAndConfig(a, b);\n\tif (config?.mode === 'json') {\n\t\treturn new SQLiteBlobJsonBuilder(name);\n\t}\n\tif (config?.mode === 'bigint') {\n\t\treturn new SQLiteBigIntBuilder(name);\n\t}\n\treturn new SQLiteBlobBufferBuilder(name);\n}\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { AnySQLiteTable } from '~/sqlite-core/table.ts';\nimport { type Equal, getColumnNameAndConfig } from '~/utils.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport type ConvertCustomConfig> =\n\t& {\n\t\tname: TName;\n\t\tdataType: 'custom';\n\t\tcolumnType: 'SQLiteCustomColumn';\n\t\tdata: T['data'];\n\t\tdriverParam: T['driverData'];\n\t\tenumValues: undefined;\n\t}\n\t& (T['notNull'] extends true ? { notNull: true } : {})\n\t& (T['default'] extends true ? { hasDefault: true } : {});\n\nexport interface SQLiteCustomColumnInnerConfig {\n\tcustomTypeValues: CustomTypeValues;\n}\n\nexport class SQLiteCustomColumnBuilder>\n\textends SQLiteColumnBuilder<\n\t\tT,\n\t\t{\n\t\t\tfieldConfig: CustomTypeValues['config'];\n\t\t\tcustomTypeParams: CustomTypeParams;\n\t\t},\n\t\t{\n\t\t\tsqliteColumnBuilderBrand: 'SQLiteCustomColumnBuilderBrand';\n\t\t}\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteCustomColumnBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t\tfieldConfig: CustomTypeValues['config'],\n\t\tcustomTypeParams: CustomTypeParams,\n\t) {\n\t\tsuper(name, 'custom', 'SQLiteCustomColumn');\n\t\tthis.config.fieldConfig = fieldConfig;\n\t\tthis.config.customTypeParams = customTypeParams;\n\t}\n\n\t/** @internal */\n\tbuild(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteCustomColumn> {\n\t\treturn new SQLiteCustomColumn>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteCustomColumn> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteCustomColumn';\n\n\tprivate sqlName: string;\n\tprivate mapTo?: (value: T['data']) => T['driverParam'];\n\tprivate mapFrom?: (value: T['driverParam']) => T['data'];\n\n\tconstructor(\n\t\ttable: AnySQLiteTable<{ name: T['tableName'] }>,\n\t\tconfig: SQLiteCustomColumnBuilder['config'],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.sqlName = config.customTypeParams.dataType(config.fieldConfig);\n\t\tthis.mapTo = config.customTypeParams.toDriver;\n\t\tthis.mapFrom = config.customTypeParams.fromDriver;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn this.sqlName;\n\t}\n\n\toverride mapFromDriverValue(value: T['driverParam']): T['data'] {\n\t\treturn typeof this.mapFrom === 'function' ? this.mapFrom(value) : value as T['data'];\n\t}\n\n\toverride mapToDriverValue(value: T['data']): T['driverParam'] {\n\t\treturn typeof this.mapTo === 'function' ? this.mapTo(value) : value as T['data'];\n\t}\n}\n\nexport type CustomTypeValues = {\n\t/**\n\t * Required type for custom column, that will infer proper type model\n\t *\n\t * Examples:\n\t *\n\t * If you want your column to be `string` type after selecting/or on inserting - use `data: string`. Like `text`, `varchar`\n\t *\n\t * If you want your column to be `number` type after selecting/or on inserting - use `data: number`. Like `integer`\n\t */\n\tdata: unknown;\n\n\t/**\n\t * Type helper, that represents what type database driver is accepting for specific database data type\n\t */\n\tdriverData?: unknown;\n\n\t/**\n\t * What config type should be used for {@link CustomTypeParams} `dataType` generation\n\t */\n\tconfig?: Record;\n\n\t/**\n\t * Whether the config argument should be required or not\n\t * @default false\n\t */\n\tconfigRequired?: boolean;\n\n\t/**\n\t * If your custom data type should be notNull by default you can use `notNull: true`\n\t *\n\t * @example\n\t * const customSerial = customType<{ data: number, notNull: true, default: true }>({\n\t * \t dataType() {\n\t * \t return 'serial';\n\t * },\n\t * });\n\t */\n\tnotNull?: boolean;\n\n\t/**\n\t * If your custom data type has default you can use `default: true`\n\t *\n\t * @example\n\t * const customSerial = customType<{ data: number, notNull: true, default: true }>({\n\t * \t dataType() {\n\t * \t return 'serial';\n\t * },\n\t * });\n\t */\n\tdefault?: boolean;\n};\n\nexport interface CustomTypeParams {\n\t/**\n\t * Database data type string representation, that is used for migrations\n\t * @example\n\t * ```\n\t * `jsonb`, `text`\n\t * ```\n\t *\n\t * If database data type needs additional params you can use them from `config` param\n\t * @example\n\t * ```\n\t * `varchar(256)`, `numeric(2,3)`\n\t * ```\n\t *\n\t * To make `config` be of specific type please use config generic in {@link CustomTypeValues}\n\t *\n\t * @example\n\t * Usage example\n\t * ```\n\t * dataType() {\n\t * return 'boolean';\n\t * },\n\t * ```\n\t * Or\n\t * ```\n\t * dataType(config) {\n\t * \t return typeof config.length !== 'undefined' ? `varchar(${config.length})` : `varchar`;\n\t * \t }\n\t * ```\n\t */\n\tdataType: (config: T['config'] | (Equal extends true ? never : undefined)) => string;\n\n\t/**\n\t * Optional mapping function, between user input and driver\n\t * @example\n\t * For example, when using jsonb we need to map JS/TS object to string before writing to database\n\t * ```\n\t * toDriver(value: TData): string {\n\t * \t return JSON.stringify(value);\n\t * }\n\t * ```\n\t */\n\ttoDriver?: (value: T['data']) => T['driverData'] | SQL;\n\n\t/**\n\t * Optional mapping function, that is responsible for data mapping from database to JS/TS code\n\t * @example\n\t * For example, when using timestamp we need to map string Date representation to JS Date\n\t * ```\n\t * fromDriver(value: string): Date {\n\t * \treturn new Date(value);\n\t * },\n\t * ```\n\t */\n\tfromDriver?: (value: T['driverData']) => T['data'];\n}\n\n/**\n * Custom sqlite database data type generator\n */\nexport function customType(\n\tcustomTypeParams: CustomTypeParams,\n): Equal extends true ? {\n\t\t & T['config']>(\n\t\t\tfieldConfig: TConfig,\n\t\t): SQLiteCustomColumnBuilder>;\n\t\t(\n\t\t\tdbName: TName,\n\t\t\tfieldConfig: T['config'],\n\t\t): SQLiteCustomColumnBuilder>;\n\t}\n\t: {\n\t\t(): SQLiteCustomColumnBuilder>;\n\t\t & T['config']>(\n\t\t\tfieldConfig?: TConfig,\n\t\t): SQLiteCustomColumnBuilder>;\n\t\t(\n\t\t\tdbName: TName,\n\t\t\tfieldConfig?: T['config'],\n\t\t): SQLiteCustomColumnBuilder>;\n\t}\n{\n\treturn (\n\t\ta?: TName | T['config'],\n\t\tb?: T['config'],\n\t): SQLiteCustomColumnBuilder> => {\n\t\tconst { name, config } = getColumnNameAndConfig(a, b);\n\t\treturn new SQLiteCustomColumnBuilder(\n\t\t\tname as ConvertCustomConfig['name'],\n\t\t\tconfig,\n\t\t\tcustomTypeParams,\n\t\t);\n\t};\n}\n", "import type {\n\tColumnBuilderBaseConfig,\n\tColumnBuilderRuntimeConfig,\n\tColumnDataType,\n\tHasDefault,\n\tIsPrimaryKey,\n\tMakeColumnConfig,\n\tNotNull,\n} from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport { sql } from '~/sql/sql.ts';\nimport type { OnConflict } from '~/sqlite-core/utils.ts';\nimport { type Equal, getColumnNameAndConfig, type Or } from '~/utils.ts';\nimport type { AnySQLiteTable } from '../table.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport interface PrimaryKeyConfig {\n\tautoIncrement?: boolean;\n\tonConflict?: OnConflict;\n}\n\nexport abstract class SQLiteBaseIntegerBuilder<\n\tT extends ColumnBuilderBaseConfig,\n\tTRuntimeConfig extends object = object,\n> extends SQLiteColumnBuilder<\n\tT,\n\tTRuntimeConfig & { autoIncrement: boolean },\n\t{},\n\t{ primaryKeyHasDefault: true }\n> {\n\tstatic override readonly [entityKind]: string = 'SQLiteBaseIntegerBuilder';\n\n\tconstructor(name: T['name'], dataType: T['dataType'], columnType: T['columnType']) {\n\t\tsuper(name, dataType, columnType);\n\t\tthis.config.autoIncrement = false;\n\t}\n\n\toverride primaryKey(config?: PrimaryKeyConfig): IsPrimaryKey>> {\n\t\tif (config?.autoIncrement) {\n\t\t\tthis.config.autoIncrement = true;\n\t\t}\n\t\tthis.config.hasDefault = true;\n\t\treturn super.primaryKey() as IsPrimaryKey>>;\n\t}\n\n\t/** @internal */\n\tabstract override build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBaseInteger>;\n}\n\nexport abstract class SQLiteBaseInteger<\n\tT extends ColumnBaseConfig,\n\tTRuntimeConfig extends object = object,\n> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteBaseInteger';\n\n\treadonly autoIncrement: boolean = this.config.autoIncrement;\n\n\tgetSQLType(): string {\n\t\treturn 'integer';\n\t}\n}\n\nexport type SQLiteIntegerBuilderInitial = SQLiteIntegerBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'SQLiteInteger';\n\tdata: number;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteIntegerBuilder>\n\textends SQLiteBaseIntegerBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteIntegerBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'SQLiteInteger');\n\t}\n\n\tbuild(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteInteger> {\n\t\treturn new SQLiteInteger>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteInteger> extends SQLiteBaseInteger {\n\tstatic override readonly [entityKind]: string = 'SQLiteInteger';\n}\n\nexport type SQLiteTimestampBuilderInitial = SQLiteTimestampBuilder<{\n\tname: TName;\n\tdataType: 'date';\n\tcolumnType: 'SQLiteTimestamp';\n\tdata: Date;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteTimestampBuilder>\n\textends SQLiteBaseIntegerBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteTimestampBuilder';\n\n\tconstructor(name: T['name'], mode: 'timestamp' | 'timestamp_ms') {\n\t\tsuper(name, 'date', 'SQLiteTimestamp');\n\t\tthis.config.mode = mode;\n\t}\n\n\t/**\n\t * @deprecated Use `default()` with your own expression instead.\n\t *\n\t * Adds `DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer))` to the column, which is the current epoch timestamp in milliseconds.\n\t */\n\tdefaultNow(): HasDefault {\n\t\treturn this.default(sql`(cast((julianday('now') - 2440587.5)*86400000 as integer))`) as any;\n\t}\n\n\tbuild(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteTimestamp> {\n\t\treturn new SQLiteTimestamp>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteTimestamp>\n\textends SQLiteBaseInteger\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteTimestamp';\n\n\treadonly mode: 'timestamp' | 'timestamp_ms' = this.config.mode;\n\n\toverride mapFromDriverValue(value: number): Date {\n\t\tif (this.config.mode === 'timestamp') {\n\t\t\treturn new Date(value * 1000);\n\t\t}\n\t\treturn new Date(value);\n\t}\n\n\toverride mapToDriverValue(value: Date): number {\n\t\tconst unix = value.getTime();\n\t\tif (this.config.mode === 'timestamp') {\n\t\t\treturn Math.floor(unix / 1000);\n\t\t}\n\t\treturn unix;\n\t}\n}\n\nexport type SQLiteBooleanBuilderInitial = SQLiteBooleanBuilder<{\n\tname: TName;\n\tdataType: 'boolean';\n\tcolumnType: 'SQLiteBoolean';\n\tdata: boolean;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteBooleanBuilder>\n\textends SQLiteBaseIntegerBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBooleanBuilder';\n\n\tconstructor(name: T['name'], mode: 'boolean') {\n\t\tsuper(name, 'boolean', 'SQLiteBoolean');\n\t\tthis.config.mode = mode;\n\t}\n\n\tbuild(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteBoolean> {\n\t\treturn new SQLiteBoolean>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteBoolean>\n\textends SQLiteBaseInteger\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteBoolean';\n\n\treadonly mode: 'boolean' = this.config.mode;\n\n\toverride mapFromDriverValue(value: number): boolean {\n\t\treturn Number(value) === 1;\n\t}\n\n\toverride mapToDriverValue(value: boolean): number {\n\t\treturn value ? 1 : 0;\n\t}\n}\n\nexport interface IntegerConfig<\n\tTMode extends 'number' | 'timestamp' | 'timestamp_ms' | 'boolean' =\n\t\t| 'number'\n\t\t| 'timestamp'\n\t\t| 'timestamp_ms'\n\t\t| 'boolean',\n> {\n\tmode: TMode;\n}\n\nexport function integer(): SQLiteIntegerBuilderInitial<''>;\nexport function integer(\n\tconfig?: IntegerConfig,\n): Or, Equal> extends true ? SQLiteTimestampBuilderInitial<''>\n\t: Equal extends true ? SQLiteBooleanBuilderInitial<''>\n\t: SQLiteIntegerBuilderInitial<''>;\nexport function integer(\n\tname: TName,\n\tconfig?: IntegerConfig,\n): Or, Equal> extends true ? SQLiteTimestampBuilderInitial\n\t: Equal extends true ? SQLiteBooleanBuilderInitial\n\t: SQLiteIntegerBuilderInitial;\nexport function integer(a?: string | IntegerConfig, b?: IntegerConfig) {\n\tconst { name, config } = getColumnNameAndConfig(a, b);\n\tif (config?.mode === 'timestamp' || config?.mode === 'timestamp_ms') {\n\t\treturn new SQLiteTimestampBuilder(name, config.mode);\n\t}\n\tif (config?.mode === 'boolean') {\n\t\treturn new SQLiteBooleanBuilder(name, config.mode);\n\t}\n\treturn new SQLiteIntegerBuilder(name);\n}\n\nexport const int = integer;\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySQLiteTable } from '~/sqlite-core/table.ts';\nimport { type Equal, getColumnNameAndConfig } from '~/utils.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport type SQLiteNumericBuilderInitial = SQLiteNumericBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'SQLiteNumeric';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteNumericBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'string', 'SQLiteNumeric');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteNumeric> {\n\t\treturn new SQLiteNumeric>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteNumeric> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteNumeric';\n\n\toverride mapFromDriverValue(value: unknown): string {\n\t\tif (typeof value === 'string') return value;\n\n\t\treturn String(value);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn 'numeric';\n\t}\n}\n\nexport type SQLiteNumericNumberBuilderInitial = SQLiteNumericNumberBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'SQLiteNumericNumber';\n\tdata: number;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteNumericNumberBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericNumberBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'SQLiteNumericNumber');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteNumericNumber> {\n\t\treturn new SQLiteNumericNumber>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteNumericNumber> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericNumber';\n\n\toverride mapFromDriverValue(value: unknown): number {\n\t\tif (typeof value === 'number') return value;\n\n\t\treturn Number(value);\n\t}\n\n\toverride mapToDriverValue = String;\n\n\tgetSQLType(): string {\n\t\treturn 'numeric';\n\t}\n}\n\nexport type SQLiteNumericBigIntBuilderInitial = SQLiteNumericBigIntBuilder<{\n\tname: TName;\n\tdataType: 'bigint';\n\tcolumnType: 'SQLiteNumericBigInt';\n\tdata: bigint;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteNumericBigIntBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericBigIntBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'bigint', 'SQLiteNumericBigInt');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteNumericBigInt> {\n\t\treturn new SQLiteNumericBigInt>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteNumericBigInt> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteNumericBigInt';\n\n\toverride mapFromDriverValue = BigInt;\n\n\toverride mapToDriverValue = String;\n\n\tgetSQLType(): string {\n\t\treturn 'numeric';\n\t}\n}\n\nexport type SQLiteNumericConfig = {\n\tmode: T;\n};\n\nexport function numeric(\n\tconfig?: SQLiteNumericConfig,\n): Equal extends true ? SQLiteNumericNumberBuilderInitial<''>\n\t: Equal extends true ? SQLiteNumericBigIntBuilderInitial<''>\n\t: SQLiteNumericBuilderInitial<''>;\nexport function numeric(\n\tname: TName,\n\tconfig?: SQLiteNumericConfig,\n): Equal extends true ? SQLiteNumericNumberBuilderInitial\n\t: Equal extends true ? SQLiteNumericBigIntBuilderInitial\n\t: SQLiteNumericBuilderInitial;\nexport function numeric(a?: string | SQLiteNumericConfig, b?: SQLiteNumericConfig) {\n\tconst { name, config } = getColumnNameAndConfig(a, b);\n\tconst mode = config?.mode;\n\treturn mode === 'number'\n\t\t? new SQLiteNumericNumberBuilder(name)\n\t\t: mode === 'bigint'\n\t\t? new SQLiteNumericBigIntBuilder(name)\n\t\t: new SQLiteNumericBuilder(name);\n}\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySQLiteTable } from '../table.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport type SQLiteRealBuilderInitial = SQLiteRealBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'SQLiteReal';\n\tdata: number;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class SQLiteRealBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteRealBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'SQLiteReal');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteReal> {\n\t\treturn new SQLiteReal>(table, this.config as ColumnBuilderRuntimeConfig);\n\t}\n}\n\nexport class SQLiteReal> extends SQLiteColumn {\n\tstatic override readonly [entityKind]: string = 'SQLiteReal';\n\n\tgetSQLType(): string {\n\t\treturn 'real';\n\t}\n}\n\nexport function real(): SQLiteRealBuilderInitial<''>;\nexport function real(name: TName): SQLiteRealBuilderInitial;\nexport function real(name?: string) {\n\treturn new SQLiteRealBuilder(name ?? '');\n}\n", "import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySQLiteTable } from '~/sqlite-core/table.ts';\nimport { type Equal, getColumnNameAndConfig, type Writable } from '~/utils.ts';\nimport { SQLiteColumn, SQLiteColumnBuilder } from './common.ts';\n\nexport type SQLiteTextBuilderInitial<\n\tTName extends string,\n\tTEnum extends [string, ...string[]],\n\tTLength extends number | undefined,\n> = SQLiteTextBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'SQLiteText';\n\tdata: TEnum[number];\n\tdriverParam: string;\n\tenumValues: TEnum;\n\tlength: TLength;\n}>;\n\nexport class SQLiteTextBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'SQLiteText'> & { length?: number | undefined },\n> extends SQLiteColumnBuilder<\n\tT,\n\t{ length: T['length']; enumValues: T['enumValues'] },\n\t{ length: T['length'] }\n> {\n\tstatic override readonly [entityKind]: string = 'SQLiteTextBuilder';\n\n\tconstructor(name: T['name'], config: SQLiteTextConfig<'text', T['enumValues'], T['length']>) {\n\t\tsuper(name, 'string', 'SQLiteText');\n\t\tthis.config.enumValues = config.enum;\n\t\tthis.config.length = config.length;\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteText & { length: T['length'] }> {\n\t\treturn new SQLiteText & { length: T['length'] }>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteText & { length?: number | undefined }>\n\textends SQLiteColumn\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteText';\n\n\toverride readonly enumValues = this.config.enumValues;\n\n\treadonly length: T['length'] = this.config.length;\n\n\tconstructor(\n\t\ttable: AnySQLiteTable<{ name: T['tableName'] }>,\n\t\tconfig: SQLiteTextBuilder['config'],\n\t) {\n\t\tsuper(table, config);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn `text${this.config.length ? `(${this.config.length})` : ''}`;\n\t}\n}\n\nexport type SQLiteTextJsonBuilderInitial = SQLiteTextJsonBuilder<{\n\tname: TName;\n\tdataType: 'json';\n\tcolumnType: 'SQLiteTextJson';\n\tdata: unknown;\n\tdriverParam: string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class SQLiteTextJsonBuilder>\n\textends SQLiteColumnBuilder\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteTextJsonBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'json', 'SQLiteTextJson');\n\t}\n\n\t/** @internal */\n\toverride build(\n\t\ttable: AnySQLiteTable<{ name: TTableName }>,\n\t): SQLiteTextJson> {\n\t\treturn new SQLiteTextJson>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig,\n\t\t);\n\t}\n}\n\nexport class SQLiteTextJson>\n\textends SQLiteColumn\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteTextJson';\n\n\tgetSQLType(): string {\n\t\treturn 'text';\n\t}\n\n\toverride mapFromDriverValue(value: string): T['data'] {\n\t\treturn JSON.parse(value);\n\t}\n\n\toverride mapToDriverValue(value: T['data']): string {\n\t\treturn JSON.stringify(value);\n\t}\n}\n\nexport type SQLiteTextConfig<\n\tTMode extends 'text' | 'json' = 'text' | 'json',\n\tTEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined,\n\tTLength extends number | undefined = number | undefined,\n> = TMode extends 'text' ? {\n\t\tmode?: TMode;\n\t\tlength?: TLength;\n\t\tenum?: TEnum;\n\t}\n\t: {\n\t\tmode?: TMode;\n\t};\n\nexport function text(): SQLiteTextBuilderInitial<'', [string, ...string[]], undefined>;\nexport function text<\n\tU extends string,\n\tT extends Readonly<[U, ...U[]]>,\n\tL extends number | undefined,\n\tTMode extends 'text' | 'json' = 'text' | 'json',\n>(\n\tconfig?: SQLiteTextConfig, L>,\n): Equal extends true ? SQLiteTextJsonBuilderInitial<''>\n\t: SQLiteTextBuilderInitial<'', Writable, L>;\nexport function text<\n\tTName extends string,\n\tU extends string,\n\tT extends Readonly<[U, ...U[]]>,\n\tL extends number | undefined,\n\tTMode extends 'text' | 'json' = 'text' | 'json',\n>(\n\tname: TName,\n\tconfig?: SQLiteTextConfig, L>,\n): Equal extends true ? SQLiteTextJsonBuilderInitial\n\t: SQLiteTextBuilderInitial, L>;\nexport function text(a?: string | SQLiteTextConfig, b: SQLiteTextConfig = {}): any {\n\tconst { name, config } = getColumnNameAndConfig(a, b);\n\tif (config.mode === 'json') {\n\t\treturn new SQLiteTextJsonBuilder(name);\n\t}\n\treturn new SQLiteTextBuilder(name, config as any);\n}\n", "import { blob } from './blob.ts';\nimport { customType } from './custom.ts';\nimport { integer } from './integer.ts';\nimport { numeric } from './numeric.ts';\nimport { real } from './real.ts';\nimport { text } from './text.ts';\n\nexport function getSQLiteColumnBuilders() {\n\treturn {\n\t\tblob,\n\t\tcustomType,\n\t\tinteger,\n\t\tnumeric,\n\t\treal,\n\t\ttext,\n\t};\n}\n\nexport type SQLiteColumnBuilders = ReturnType;\n", "import type { BuildColumns, BuildExtraConfigColumns } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport { Table, type TableConfig as TableConfigBase, type UpdateTableConfig } from '~/table.ts';\nimport type { CheckBuilder } from './checks.ts';\nimport { getSQLiteColumnBuilders, type SQLiteColumnBuilders } from './columns/all.ts';\nimport type { SQLiteColumn, SQLiteColumnBuilder, SQLiteColumnBuilderBase } from './columns/common.ts';\nimport type { ForeignKey, ForeignKeyBuilder } from './foreign-keys.ts';\nimport type { IndexBuilder } from './indexes.ts';\nimport type { PrimaryKeyBuilder } from './primary-keys.ts';\nimport type { UniqueConstraintBuilder } from './unique-constraint.ts';\n\nexport type SQLiteTableExtraConfigValue =\n\t| IndexBuilder\n\t| CheckBuilder\n\t| ForeignKeyBuilder\n\t| PrimaryKeyBuilder\n\t| UniqueConstraintBuilder;\n\nexport type SQLiteTableExtraConfig = Record<\n\tstring,\n\tSQLiteTableExtraConfigValue\n>;\n\nexport type TableConfig = TableConfigBase>;\n\n/** @internal */\nexport const InlineForeignKeys = Symbol.for('drizzle:SQLiteInlineForeignKeys');\n\nexport class SQLiteTable extends Table {\n\tstatic override readonly [entityKind]: string = 'SQLiteTable';\n\n\t/** @internal */\n\tstatic override readonly Symbol = Object.assign({}, Table.Symbol, {\n\t\tInlineForeignKeys: InlineForeignKeys as typeof InlineForeignKeys,\n\t});\n\n\t/** @internal */\n\toverride [Table.Symbol.Columns]!: NonNullable;\n\n\t/** @internal */\n\t[InlineForeignKeys]: ForeignKey[] = [];\n\n\t/** @internal */\n\toverride [Table.Symbol.ExtraConfigBuilder]:\n\t\t| ((self: Record) => SQLiteTableExtraConfig)\n\t\t| undefined = undefined;\n}\n\nexport type AnySQLiteTable = {}> = SQLiteTable<\n\tUpdateTableConfig\n>;\n\nexport type SQLiteTableWithColumns =\n\t& SQLiteTable\n\t& {\n\t\t[Key in keyof T['columns']]: T['columns'][Key];\n\t};\n\nexport interface SQLiteTableFn {\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: TColumnsMap,\n\t\textraConfig?: (\n\t\t\tself: BuildColumns,\n\t\t) => SQLiteTableExtraConfigValue[],\n\t): SQLiteTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>;\n\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: (columnTypes: SQLiteColumnBuilders) => TColumnsMap,\n\t\textraConfig?: (self: BuildColumns) => SQLiteTableExtraConfigValue[],\n\t): SQLiteTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>;\n\t/**\n\t * @deprecated The third parameter of sqliteTable is changing and will only accept an array instead of an object\n\t *\n\t * @example\n\t * Deprecated version:\n\t * ```ts\n\t * export const users = sqliteTable(\"users\", {\n\t * \tid: int(),\n\t * }, (t) => ({\n\t * \tidx: index('custom_name').on(t.id)\n\t * }));\n\t * ```\n\t *\n\t * New API:\n\t * ```ts\n\t * export const users = sqliteTable(\"users\", {\n\t * \tid: int(),\n\t * }, (t) => [\n\t * \tindex('custom_name').on(t.id)\n\t * ]);\n\t * ```\n\t */\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: TColumnsMap,\n\t\textraConfig?: (self: BuildColumns) => SQLiteTableExtraConfig,\n\t): SQLiteTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>;\n\n\t/**\n\t * @deprecated The third parameter of sqliteTable is changing and will only accept an array instead of an object\n\t *\n\t * @example\n\t * Deprecated version:\n\t * ```ts\n\t * export const users = sqliteTable(\"users\", {\n\t * \tid: int(),\n\t * }, (t) => ({\n\t * \tidx: index('custom_name').on(t.id)\n\t * }));\n\t * ```\n\t *\n\t * New API:\n\t * ```ts\n\t * export const users = sqliteTable(\"users\", {\n\t * \tid: int(),\n\t * }, (t) => [\n\t * \tindex('custom_name').on(t.id)\n\t * ]);\n\t * ```\n\t */\n\t<\n\t\tTTableName extends string,\n\t\tTColumnsMap extends Record,\n\t>(\n\t\tname: TTableName,\n\t\tcolumns: (columnTypes: SQLiteColumnBuilders) => TColumnsMap,\n\t\textraConfig?: (self: BuildColumns) => SQLiteTableExtraConfig,\n\t): SQLiteTableWithColumns<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>;\n}\n\nfunction sqliteTableBase<\n\tTTableName extends string,\n\tTColumnsMap extends Record,\n\tTSchema extends string | undefined,\n>(\n\tname: TTableName,\n\tcolumns: TColumnsMap | ((columnTypes: SQLiteColumnBuilders) => TColumnsMap),\n\textraConfig:\n\t\t| ((\n\t\t\tself: BuildColumns,\n\t\t) => SQLiteTableExtraConfig | SQLiteTableExtraConfigValue[])\n\t\t| undefined,\n\tschema?: TSchema,\n\tbaseName = name,\n): SQLiteTableWithColumns<{\n\tname: TTableName;\n\tschema: TSchema;\n\tcolumns: BuildColumns;\n\tdialect: 'sqlite';\n}> {\n\tconst rawTable = new SQLiteTable<{\n\t\tname: TTableName;\n\t\tschema: TSchema;\n\t\tcolumns: BuildColumns;\n\t\tdialect: 'sqlite';\n\t}>(name, schema, baseName);\n\n\tconst parsedColumns: TColumnsMap = typeof columns === 'function' ? columns(getSQLiteColumnBuilders()) : columns;\n\n\tconst builtColumns = Object.fromEntries(\n\t\tObject.entries(parsedColumns).map(([name, colBuilderBase]) => {\n\t\t\tconst colBuilder = colBuilderBase as SQLiteColumnBuilder;\n\t\t\tcolBuilder.setName(name);\n\t\t\tconst column = colBuilder.build(rawTable);\n\t\t\trawTable[InlineForeignKeys].push(...colBuilder.buildForeignKeys(column, rawTable));\n\t\t\treturn [name, column];\n\t\t}),\n\t) as unknown as BuildColumns;\n\n\tconst table = Object.assign(rawTable, builtColumns);\n\n\ttable[Table.Symbol.Columns] = builtColumns;\n\ttable[Table.Symbol.ExtraConfigColumns] = builtColumns as unknown as BuildExtraConfigColumns<\n\t\tTTableName,\n\t\tTColumnsMap,\n\t\t'sqlite'\n\t>;\n\n\tif (extraConfig) {\n\t\ttable[SQLiteTable.Symbol.ExtraConfigBuilder] = extraConfig as (\n\t\t\tself: Record,\n\t\t) => SQLiteTableExtraConfig;\n\t}\n\n\treturn table;\n}\n\nexport const sqliteTable: SQLiteTableFn = (name, columns, extraConfig) => {\n\treturn sqliteTableBase(name, columns, extraConfig);\n};\n\nexport function sqliteTableCreator(customizeTableName: (name: string) => string): SQLiteTableFn {\n\treturn (name, columns, extraConfig) => {\n\t\treturn sqliteTableBase(customizeTableName(name) as typeof name, columns, extraConfig, undefined, name);\n\t};\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport class CheckBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteCheckBuilder';\n\n\tprotected brand!: 'SQLiteConstraintBuilder';\n\n\tconstructor(public name: string, public value: SQL) {}\n\n\tbuild(table: SQLiteTable): Check {\n\t\treturn new Check(table, this);\n\t}\n}\n\nexport class Check {\n\tstatic readonly [entityKind]: string = 'SQLiteCheck';\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteCheck';\n\t};\n\n\treadonly name: string;\n\treadonly value: SQL;\n\n\tconstructor(public table: SQLiteTable, builder: CheckBuilder) {\n\t\tthis.name = builder.name;\n\t\tthis.value = builder.value;\n\t}\n}\n\nexport function check(name: string, value: SQL): CheckBuilder {\n\treturn new CheckBuilder(name, value);\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { SQLiteColumn } from './columns/index.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport interface IndexConfig {\n\tname: string;\n\tcolumns: IndexColumn[];\n\tunique: boolean;\n\twhere: SQL | undefined;\n}\n\nexport type IndexColumn = SQLiteColumn | SQL;\n\nexport class IndexBuilderOn {\n\tstatic readonly [entityKind]: string = 'SQLiteIndexBuilderOn';\n\n\tconstructor(private name: string, private unique: boolean) {}\n\n\ton(...columns: [IndexColumn, ...IndexColumn[]]): IndexBuilder {\n\t\treturn new IndexBuilder(this.name, columns, this.unique);\n\t}\n}\n\nexport class IndexBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteIndexBuilder';\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteIndexBuilder';\n\t};\n\n\t/** @internal */\n\tconfig: IndexConfig;\n\n\tconstructor(name: string, columns: IndexColumn[], unique: boolean) {\n\t\tthis.config = {\n\t\t\tname,\n\t\t\tcolumns,\n\t\t\tunique,\n\t\t\twhere: undefined,\n\t\t};\n\t}\n\n\t/**\n\t * Condition for partial index.\n\t */\n\twhere(condition: SQL): this {\n\t\tthis.config.where = condition;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): Index {\n\t\treturn new Index(this.config, table);\n\t}\n}\n\nexport class Index {\n\tstatic readonly [entityKind]: string = 'SQLiteIndex';\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteIndex';\n\t};\n\n\treadonly config: IndexConfig & { table: SQLiteTable };\n\n\tconstructor(config: IndexConfig, table: SQLiteTable) {\n\t\tthis.config = { ...config, table };\n\t}\n}\n\nexport function index(name: string): IndexBuilderOn {\n\treturn new IndexBuilderOn(name, false);\n}\n\nexport function uniqueIndex(name: string): IndexBuilderOn {\n\treturn new IndexBuilderOn(name, true);\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { AnySQLiteColumn, SQLiteColumn } from './columns/index.ts';\nimport { SQLiteTable } from './table.ts';\n\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumn extends AnySQLiteColumn<{ tableName: TTableName }>,\n\tTColumns extends AnySQLiteColumn<{ tableName: TTableName }>[],\n>(config: { name?: string; columns: [TColumn, ...TColumns] }): PrimaryKeyBuilder;\n/**\n * @deprecated: Please use primaryKey({ columns: [] }) instead of this function\n * @param columns\n */\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumns extends AnySQLiteColumn<{ tableName: TTableName }>[],\n>(...columns: TColumns): PrimaryKeyBuilder;\nexport function primaryKey(...config: any) {\n\tif (config[0].columns) {\n\t\treturn new PrimaryKeyBuilder(config[0].columns, config[0].name);\n\t}\n\treturn new PrimaryKeyBuilder(config);\n}\nexport class PrimaryKeyBuilder {\n\tstatic readonly [entityKind]: string = 'SQLitePrimaryKeyBuilder';\n\n\tdeclare _: {\n\t\tbrand: 'SQLitePrimaryKeyBuilder';\n\t};\n\n\t/** @internal */\n\tcolumns: SQLiteColumn[];\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tcolumns: SQLiteColumn[],\n\t\tname?: string,\n\t) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): PrimaryKey {\n\t\treturn new PrimaryKey(table, this.columns, this.name);\n\t}\n}\n\nexport class PrimaryKey {\n\tstatic readonly [entityKind]: string = 'SQLitePrimaryKey';\n\n\treadonly columns: SQLiteColumn[];\n\treadonly name?: string;\n\n\tconstructor(readonly table: SQLiteTable, columns: SQLiteColumn[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\tgetName(): string {\n\t\treturn this.name\n\t\t\t?? `${this.table[SQLiteTable.Symbol.Name]}_${this.columns.map((column) => column.name).join('_')}_pk`;\n\t}\n}\n", "import { is } from '~/entity.ts';\nimport { SQL } from '~/sql/sql.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { Table } from '~/table.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport type { Check } from './checks.ts';\nimport { CheckBuilder } from './checks.ts';\nimport type { ForeignKey } from './foreign-keys.ts';\nimport { ForeignKeyBuilder } from './foreign-keys.ts';\nimport type { Index } from './indexes.ts';\nimport { IndexBuilder } from './indexes.ts';\nimport type { PrimaryKey } from './primary-keys.ts';\nimport { PrimaryKeyBuilder } from './primary-keys.ts';\nimport { SQLiteTable } from './table.ts';\nimport { type UniqueConstraint, UniqueConstraintBuilder } from './unique-constraint.ts';\nimport type { SQLiteViewBase } from './view-base.ts';\nimport type { SQLiteView } from './view.ts';\n\nexport function getTableConfig(table: TTable) {\n\tconst columns = Object.values(table[SQLiteTable.Symbol.Columns]);\n\tconst indexes: Index[] = [];\n\tconst checks: Check[] = [];\n\tconst primaryKeys: PrimaryKey[] = [];\n\tconst uniqueConstraints: UniqueConstraint[] = [];\n\tconst foreignKeys: ForeignKey[] = Object.values(table[SQLiteTable.Symbol.InlineForeignKeys]);\n\tconst name = table[Table.Symbol.Name];\n\n\tconst extraConfigBuilder = table[SQLiteTable.Symbol.ExtraConfigBuilder];\n\n\tif (extraConfigBuilder !== undefined) {\n\t\tconst extraConfig = extraConfigBuilder(table[SQLiteTable.Symbol.Columns]);\n\t\tconst extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) as any[] : Object.values(extraConfig);\n\t\tfor (const builder of Object.values(extraValues)) {\n\t\t\tif (is(builder, IndexBuilder)) {\n\t\t\t\tindexes.push(builder.build(table));\n\t\t\t} else if (is(builder, CheckBuilder)) {\n\t\t\t\tchecks.push(builder.build(table));\n\t\t\t} else if (is(builder, UniqueConstraintBuilder)) {\n\t\t\t\tuniqueConstraints.push(builder.build(table));\n\t\t\t} else if (is(builder, PrimaryKeyBuilder)) {\n\t\t\t\tprimaryKeys.push(builder.build(table));\n\t\t\t} else if (is(builder, ForeignKeyBuilder)) {\n\t\t\t\tforeignKeys.push(builder.build(table));\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tcolumns,\n\t\tindexes,\n\t\tforeignKeys,\n\t\tchecks,\n\t\tprimaryKeys,\n\t\tuniqueConstraints,\n\t\tname,\n\t};\n}\n\nexport function extractUsedTable(table: SQLiteTable | Subquery | SQLiteViewBase | SQL): string[] {\n\tif (is(table, SQLiteTable)) {\n\t\treturn [`${table[Table.Symbol.BaseName]}`];\n\t}\n\tif (is(table, Subquery)) {\n\t\treturn table._.usedTables ?? [];\n\t}\n\tif (is(table, SQL)) {\n\t\treturn table.usedTables ?? [];\n\t}\n\treturn [];\n}\n\nexport type OnConflict = 'rollback' | 'abort' | 'fail' | 'ignore' | 'replace';\n\nexport function getViewConfig<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n>(view: SQLiteView) {\n\treturn {\n\t\t...view[ViewBaseConfig],\n\t\t// ...view[SQLiteViewConfig],\n\t};\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { SelectResultFields } from '~/query-builders/select.types.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { Placeholder, Query, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteDialect } from '~/sqlite-core/dialect.ts';\nimport type { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/session.ts';\nimport { SQLiteTable } from '~/sqlite-core/table.ts';\nimport type { Subquery } from '~/subquery.ts';\nimport { Table } from '~/table.ts';\nimport { type DrizzleTypeError, orderSelectedFields, type ValueOrArray } from '~/utils.ts';\nimport type { SQLiteColumn } from '../columns/common.ts';\nimport { extractUsedTable } from '../utils.ts';\nimport type { SelectedFieldsFlat, SelectedFieldsOrdered } from './select.types.ts';\n\nexport type SQLiteDeleteWithout<\n\tT extends AnySQLiteDeleteBase,\n\tTDynamic extends boolean,\n\tK extends keyof T & string,\n> = TDynamic extends true ? T\n\t: Omit<\n\t\tSQLiteDeleteBase<\n\t\t\tT['_']['table'],\n\t\t\tT['_']['resultType'],\n\t\t\tT['_']['runResult'],\n\t\t\tT['_']['returning'],\n\t\t\tTDynamic,\n\t\t\tT['_']['excludedMethods'] | K\n\t\t>,\n\t\tT['_']['excludedMethods'] | K\n\t>;\n\nexport type SQLiteDelete<\n\tTTable extends SQLiteTable = SQLiteTable,\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = unknown,\n\tTReturning extends Record | undefined = undefined,\n> = SQLiteDeleteBase;\n\nexport interface SQLiteDeleteConfig {\n\twhere?: SQL | undefined;\n\tlimit?: number | Placeholder;\n\torderBy?: (SQLiteColumn | SQL | SQL.Aliased)[];\n\ttable: SQLiteTable;\n\treturning?: SelectedFieldsOrdered;\n\twithList?: Subquery[];\n}\n\nexport type SQLiteDeleteReturningAll<\n\tT extends AnySQLiteDeleteBase,\n\tTDynamic extends boolean,\n> = SQLiteDeleteWithout<\n\tSQLiteDeleteBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['table']['$inferSelect'],\n\t\tT['_']['dynamic'],\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteDeleteReturning<\n\tT extends AnySQLiteDeleteBase,\n\tTDynamic extends boolean,\n\tTSelectedFields extends SelectedFieldsFlat,\n> = SQLiteDeleteWithout<\n\tSQLiteDeleteBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tSelectResultFields,\n\t\tT['_']['dynamic'],\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteDeleteExecute = T['_']['returning'] extends undefined\n\t? T['_']['runResult']\n\t: T['_']['returning'][];\n\nexport type SQLiteDeletePrepare = SQLitePreparedQuery<{\n\ttype: T['_']['resultType'];\n\trun: T['_']['runResult'];\n\tall: T['_']['returning'] extends undefined ? DrizzleTypeError<'.all() cannot be used without .returning()'>\n\t\t: T['_']['returning'][];\n\tget: T['_']['returning'] extends undefined ? DrizzleTypeError<'.get() cannot be used without .returning()'>\n\t\t: T['_']['returning'] | undefined;\n\tvalues: T['_']['returning'] extends undefined ? DrizzleTypeError<'.values() cannot be used without .returning()'>\n\t\t: any[][];\n\texecute: SQLiteDeleteExecute;\n}>;\n\nexport type SQLiteDeleteDynamic = SQLiteDelete<\n\tT['_']['table'],\n\tT['_']['resultType'],\n\tT['_']['runResult'],\n\tT['_']['returning']\n>;\n\nexport type AnySQLiteDeleteBase = SQLiteDeleteBase;\n\nexport interface SQLiteDeleteBase<\n\tTTable extends SQLiteTable,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTReturning extends Record | undefined = undefined,\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n> extends\n\tQueryPromise,\n\tRunnableQuery,\n\tSQLWrapper\n{\n\treadonly _: {\n\t\tdialect: 'sqlite';\n\t\treadonly table: TTable;\n\t\treadonly resultType: TResultType;\n\t\treadonly runResult: TRunResult;\n\t\treadonly returning: TReturning;\n\t\treadonly dynamic: TDynamic;\n\t\treadonly excludedMethods: TExcludedMethods;\n\t\treadonly result: TReturning extends undefined ? TRunResult : TReturning[];\n\t};\n}\n\nexport class SQLiteDeleteBase<\n\tTTable extends SQLiteTable,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTReturning extends Record | undefined = undefined,\n\tTDynamic extends boolean = false,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTExcludedMethods extends string = never,\n> extends QueryPromise\n\timplements RunnableQuery, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteDelete';\n\n\t/** @internal */\n\tconfig: SQLiteDeleteConfig;\n\n\tconstructor(\n\t\tprivate table: TTable,\n\t\tprivate session: SQLiteSession,\n\t\tprivate dialect: SQLiteDialect,\n\t\twithList?: Subquery[],\n\t) {\n\t\tsuper();\n\t\tthis.config = { table, withList };\n\t}\n\n\t/**\n\t * Adds a `where` clause to the query.\n\t *\n\t * Calling this method will delete only those rows that fulfill a specified condition.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/delete}\n\t *\n\t * @param where the `where` clause.\n\t *\n\t * @example\n\t * You can use conditional operators and `sql function` to filter the rows to be deleted.\n\t *\n\t * ```ts\n\t * // Delete all cars with green color\n\t * db.delete(cars).where(eq(cars.color, 'green'));\n\t * // or\n\t * db.delete(cars).where(sql`${cars.color} = 'green'`)\n\t * ```\n\t *\n\t * You can logically combine conditional operators with `and()` and `or()` operators:\n\t *\n\t * ```ts\n\t * // Delete all BMW cars with a green color\n\t * db.delete(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW')));\n\t *\n\t * // Delete all cars with the green or blue color\n\t * db.delete(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue')));\n\t * ```\n\t */\n\twhere(where: SQL | undefined): SQLiteDeleteWithout {\n\t\tthis.config.where = where;\n\t\treturn this as any;\n\t}\n\n\torderBy(\n\t\tbuilder: (deleteTable: TTable) => ValueOrArray,\n\t): SQLiteDeleteWithout;\n\torderBy(...columns: (SQLiteColumn | SQL | SQL.Aliased)[]): SQLiteDeleteWithout;\n\torderBy(\n\t\t...columns:\n\t\t\t| [(deleteTable: TTable) => ValueOrArray]\n\t\t\t| (SQLiteColumn | SQL | SQL.Aliased)[]\n\t): SQLiteDeleteWithout {\n\t\tif (typeof columns[0] === 'function') {\n\t\t\tconst orderBy = columns[0](\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.table[Table.Symbol.Columns],\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'alias', sqlBehavior: 'sql' }),\n\t\t\t\t) as any,\n\t\t\t);\n\n\t\t\tconst orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy];\n\t\t\tthis.config.orderBy = orderByArray;\n\t\t} else {\n\t\t\tconst orderByArray = columns as (SQLiteColumn | SQL | SQL.Aliased)[];\n\t\t\tthis.config.orderBy = orderByArray;\n\t\t}\n\t\treturn this as any;\n\t}\n\n\tlimit(limit: number | Placeholder): SQLiteDeleteWithout {\n\t\tthis.config.limit = limit;\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `returning` clause to the query.\n\t *\n\t * Calling this method will return the specified fields of the deleted rows. If no fields are specified, all fields will be returned.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/delete#delete-with-return}\n\t *\n\t * @example\n\t * ```ts\n\t * // Delete all cars with the green color and return all fields\n\t * const deletedCars: Car[] = await db.delete(cars)\n\t * .where(eq(cars.color, 'green'))\n\t * .returning();\n\t *\n\t * // Delete all cars with the green color and return only their id and brand fields\n\t * const deletedCarsIdsAndBrands: { id: number, brand: string }[] = await db.delete(cars)\n\t * .where(eq(cars.color, 'green'))\n\t * .returning({ id: cars.id, brand: cars.brand });\n\t * ```\n\t */\n\treturning(): SQLiteDeleteReturningAll;\n\treturning(\n\t\tfields: TSelectedFields,\n\t): SQLiteDeleteReturning;\n\treturning(\n\t\tfields: SelectedFieldsFlat = this.table[SQLiteTable.Symbol.Columns],\n\t): SQLiteDeleteReturning {\n\t\tthis.config.returning = orderSelectedFields(fields);\n\t\treturn this as any;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildDeleteQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\t/** @internal */\n\t_prepare(isOneTimeQuery = true): SQLiteDeletePrepare {\n\t\treturn this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tthis.dialect.sqlToQuery(this.getSQL()),\n\t\t\tthis.config.returning,\n\t\t\tthis.config.returning ? 'all' : 'run',\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\ttype: 'delete',\n\t\t\t\ttables: extractUsedTable(this.config.table),\n\t\t\t},\n\t\t) as SQLiteDeletePrepare;\n\t}\n\n\tprepare(): SQLiteDeletePrepare {\n\t\treturn this._prepare(false);\n\t}\n\n\trun: ReturnType['run'] = (placeholderValues) => {\n\t\treturn this._prepare().run(placeholderValues);\n\t};\n\n\tall: ReturnType['all'] = (placeholderValues) => {\n\t\treturn this._prepare().all(placeholderValues);\n\t};\n\n\tget: ReturnType['get'] = (placeholderValues) => {\n\t\treturn this._prepare().get(placeholderValues);\n\t};\n\n\tvalues: ReturnType['values'] = (placeholderValues) => {\n\t\treturn this._prepare().values(placeholderValues);\n\t};\n\n\toverride async execute(placeholderValues?: Record): Promise> {\n\t\treturn this._prepare().execute(placeholderValues) as SQLiteDeleteExecute;\n\t}\n\n\t$dynamic(): SQLiteDeleteDynamic {\n\t\treturn this as any;\n\t}\n}\n", "import type { Column } from '~/column.ts';\nimport { entityKind } from './entity.ts';\nimport { Table } from './table.ts';\nimport type { Casing } from './utils.ts';\n\nexport function toSnakeCase(input: string) {\n\tconst words = input\n\t\t.replace(/['\\u2019]/g, '')\n\t\t.match(/[\\da-z]+|[A-Z]+(?![a-z])|[A-Z][\\da-z]+/g) ?? [];\n\n\treturn words.map((word) => word.toLowerCase()).join('_');\n}\n\nexport function toCamelCase(input: string) {\n\tconst words = input\n\t\t.replace(/['\\u2019]/g, '')\n\t\t.match(/[\\da-z]+|[A-Z]+(?![a-z])|[A-Z][\\da-z]+/g) ?? [];\n\n\treturn words.reduce((acc, word, i) => {\n\t\tconst formattedWord = i === 0 ? word.toLowerCase() : `${word[0]!.toUpperCase()}${word.slice(1)}`;\n\t\treturn acc + formattedWord;\n\t}, '');\n}\n\nfunction noopCase(input: string) {\n\treturn input;\n}\n\nexport class CasingCache {\n\tstatic readonly [entityKind]: string = 'CasingCache';\n\n\t/** @internal */\n\tcache: Record = {};\n\tprivate cachedTables: Record = {};\n\tprivate convert: (input: string) => string;\n\n\tconstructor(casing?: Casing) {\n\t\tthis.convert = casing === 'snake_case'\n\t\t\t? toSnakeCase\n\t\t\t: casing === 'camelCase'\n\t\t\t? toCamelCase\n\t\t\t: noopCase;\n\t}\n\n\tgetColumnCasing(column: Column): string {\n\t\tif (!column.keyAsName) return column.name;\n\n\t\tconst schema = column.table[Table.Symbol.Schema] ?? 'public';\n\t\tconst tableName = column.table[Table.Symbol.OriginalName];\n\t\tconst key = `${schema}.${tableName}.${column.name}`;\n\n\t\tif (!this.cache[key]) {\n\t\t\tthis.cacheTable(column.table);\n\t\t}\n\t\treturn this.cache[key]!;\n\t}\n\n\tprivate cacheTable(table: Table) {\n\t\tconst schema = table[Table.Symbol.Schema] ?? 'public';\n\t\tconst tableName = table[Table.Symbol.OriginalName];\n\t\tconst tableKey = `${schema}.${tableName}`;\n\n\t\tif (!this.cachedTables[tableKey]) {\n\t\t\tfor (const column of Object.values(table[Table.Symbol.Columns])) {\n\t\t\t\tconst columnKey = `${tableKey}.${column.name}`;\n\t\t\t\tthis.cache[columnKey] = this.convert(column.name);\n\t\t\t}\n\t\t\tthis.cachedTables[tableKey] = true;\n\t\t}\n\t}\n\n\tclearCache() {\n\t\tthis.cache = {};\n\t\tthis.cachedTables = {};\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\n\nexport class DrizzleError extends Error {\n\tstatic readonly [entityKind]: string = 'DrizzleError';\n\n\tconstructor({ message, cause }: { message?: string; cause?: unknown }) {\n\t\tsuper(message);\n\t\tthis.name = 'DrizzleError';\n\t\tthis.cause = cause;\n\t}\n}\n\nexport class DrizzleQueryError extends Error {\n\tconstructor(\n\t\tpublic query: string,\n\t\tpublic params: any[],\n\t\tpublic override cause?: Error,\n\t) {\n\t\tsuper(`Failed query: ${query}\\nparams: ${params}`);\n\t\tError.captureStackTrace(this, DrizzleQueryError);\n\n\t\t// ES2022+: preserves original error on `.cause`\n\t\tif (cause) (this as any).cause = cause;\n\t}\n}\n\nexport class TransactionRollbackError extends DrizzleError {\n\tstatic override readonly [entityKind]: string = 'TransactionRollbackError';\n\n\tconstructor() {\n\t\tsuper({ message: 'Rollback' });\n\t}\n}\n", "import { type AnyColumn, Column } from '~/column.ts';\nimport { is } from '~/entity.ts';\nimport { type SQL, sql, type SQLWrapper } from '../sql.ts';\n\n/**\n * Returns the number of values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Number employees with null values\n * db.select({ value: count() }).from(employees)\n * // Number of employees where `name` is not null\n * db.select({ value: count(employees.name) }).from(employees)\n * ```\n *\n * @see countDistinct to get the number of non-duplicate values in `expression`\n */\nexport function count(expression?: SQLWrapper): SQL {\n\treturn sql`count(${expression || sql.raw('*')})`.mapWith(Number);\n}\n\n/**\n * Returns the number of non-duplicate values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Number of employees where `name` is distinct\n * db.select({ value: countDistinct(employees.name) }).from(employees)\n * ```\n *\n * @see count to get the number of values in `expression`, including duplicates\n */\nexport function countDistinct(expression: SQLWrapper): SQL {\n\treturn sql`count(distinct ${expression})`.mapWith(Number);\n}\n\n/**\n * Returns the average (arithmetic mean) of all non-null values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Average salary of an employee\n * db.select({ value: avg(employees.salary) }).from(employees)\n * ```\n *\n * @see avgDistinct to get the average of all non-null and non-duplicate values in `expression`\n */\nexport function avg(expression: SQLWrapper): SQL {\n\treturn sql`avg(${expression})`.mapWith(String);\n}\n\n/**\n * Returns the average (arithmetic mean) of all non-null and non-duplicate values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Average salary of an employee where `salary` is distinct\n * db.select({ value: avgDistinct(employees.salary) }).from(employees)\n * ```\n *\n * @see avg to get the average of all non-null values in `expression`, including duplicates\n */\nexport function avgDistinct(expression: SQLWrapper): SQL {\n\treturn sql`avg(distinct ${expression})`.mapWith(String);\n}\n\n/**\n * Returns the sum of all non-null values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Sum of every employee's salary\n * db.select({ value: sum(employees.salary) }).from(employees)\n * ```\n *\n * @see sumDistinct to get the sum of all non-null and non-duplicate values in `expression`\n */\nexport function sum(expression: SQLWrapper): SQL {\n\treturn sql`sum(${expression})`.mapWith(String);\n}\n\n/**\n * Returns the sum of all non-null and non-duplicate values in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // Sum of every employee's salary where `salary` is distinct (no duplicates)\n * db.select({ value: sumDistinct(employees.salary) }).from(employees)\n * ```\n *\n * @see sum to get the sum of all non-null values in `expression`, including duplicates\n */\nexport function sumDistinct(expression: SQLWrapper): SQL {\n\treturn sql`sum(distinct ${expression})`.mapWith(String);\n}\n\n/**\n * Returns the maximum value in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // The employee with the highest salary\n * db.select({ value: max(employees.salary) }).from(employees)\n * ```\n */\nexport function max(expression: T): SQL<(T extends AnyColumn ? T['_']['data'] : string) | null> {\n\treturn sql`max(${expression})`.mapWith(is(expression, Column) ? expression : String) as any;\n}\n\n/**\n * Returns the minimum value in `expression`.\n *\n * ## Examples\n *\n * ```ts\n * // The employee with the lowest salary\n * db.select({ value: min(employees.salary) }).from(employees)\n * ```\n */\nexport function min(expression: T): SQL<(T extends AnyColumn ? T['_']['data'] : string) | null> {\n\treturn sql`min(${expression})`.mapWith(is(expression, Column) ? expression : String) as any;\n}\n", "import type { AnyColumn } from '~/column.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport { type SQL, sql, type SQLWrapper } from '../sql.ts';\n\nfunction toSql(value: number[] | string[]): string {\n\treturn JSON.stringify(value);\n}\n\n/**\n * Used in sorting and in querying, if used in sorting,\n * this specifies that the given column or expression should be sorted in an order\n * that minimizes the L2 distance to the given value.\n * If used in querying, this specifies that it should return the L2 distance\n * between the given column or expression and the given value.\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(l2Distance(cars.embedding, embedding));\n * ```\n *\n * ```ts\n * // Select distance of cars and embedding\n * // to the given embedding\n * db.select({distance: l2Distance(cars.embedding, embedding)}).from(cars)\n * ```\n */\nexport function l2Distance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <-> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <-> ${value}`;\n}\n\n/**\n * L1 distance is one of the possible distance measures between two probability distribution vectors and it is\n * calculated as the sum of the absolute differences.\n * The smaller the distance between the observed probability vectors, the higher the accuracy of the synthetic data\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(l1Distance(cars.embedding, embedding));\n * ```\n *\n * ```ts\n * // Select distance of cars and embedding\n * // to the given embedding\n * db.select({distance: l1Distance(cars.embedding, embedding)}).from(cars)\n * ```\n */\nexport function l1Distance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <+> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <+> ${value}`;\n}\n\n/**\n * Used in sorting and in querying, if used in sorting,\n * this specifies that the given column or expression should be sorted in an order\n * that minimizes the inner product distance to the given value.\n * If used in querying, this specifies that it should return the inner product distance\n * between the given column or expression and the given value.\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(innerProduct(cars.embedding, embedding));\n * ```\n *\n * ```ts\n * // Select distance of cars and embedding\n * // to the given embedding\n * db.select({ distance: innerProduct(cars.embedding, embedding) }).from(cars)\n * ```\n */\nexport function innerProduct(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <#> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <#> ${value}`;\n}\n\n/**\n * Used in sorting and in querying, if used in sorting,\n * this specifies that the given column or expression should be sorted in an order\n * that minimizes the cosine distance to the given value.\n * If used in querying, this specifies that it should return the cosine distance\n * between the given column or expression and the given value.\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(cosineDistance(cars.embedding, embedding));\n * ```\n *\n * ```ts\n * // Select distance of cars and embedding\n * // to the given embedding\n * db.select({distance: cosineDistance(cars.embedding, embedding)}).from(cars)\n * ```\n */\nexport function cosineDistance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <=> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <=> ${value}`;\n}\n\n/**\n * Hamming distance between two strings or vectors of equal length is the number of positions at which the\n * corresponding symbols are different. In other words, it measures the minimum number of\n * substitutions required to change one string into the other, or equivalently,\n * the minimum number of errors that could have transformed one string into the other\n *\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(hammingDistance(cars.embedding, embedding));\n * ```\n */\nexport function hammingDistance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <~> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <~> ${value}`;\n}\n\n/**\n * ## Examples\n *\n * ```ts\n * // Sort cars by embedding similarity\n * // to the given embedding\n * db.select().from(cars)\n * .orderBy(jaccardDistance(cars.embedding, embedding));\n * ```\n */\nexport function jaccardDistance(\n\tcolumn: SQLWrapper | AnyColumn,\n\tvalue: number[] | string[] | TypedQueryBuilder | string,\n): SQL {\n\tif (Array.isArray(value)) {\n\t\treturn sql`${column} <%> ${toSql(value)}`;\n\t}\n\treturn sql`${column} <%> ${value}`;\n}\n", "export * from './aggregate.ts';\nexport * from './vector.ts';\n", "export * from './expressions/index.ts';\nexport * from './functions/index.ts';\nexport * from './sql.ts';\n", "export * from './blob.ts';\nexport * from './common.ts';\nexport * from './custom.ts';\nexport * from './integer.ts';\nexport * from './numeric.ts';\nexport * from './real.ts';\nexport * from './text.ts';\n", "import { entityKind } from '~/entity.ts';\nimport type { ColumnsSelection } from '~/sql/sql.ts';\nimport { View } from '~/sql/sql.ts';\n\nexport abstract class SQLiteViewBase<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n\tTSelection extends ColumnsSelection = ColumnsSelection,\n> extends View {\n\tstatic override readonly [entityKind]: string = 'SQLiteViewBase';\n\n\tdeclare _: View['_'] & {\n\t\tviewBrand: 'SQLiteView';\n\t};\n}\n", "import { aliasedTable, aliasedTableColumn, mapColumnsInAliasedSQLToAlias, mapColumnsInSQLToAlias } from '~/alias.ts';\nimport { CasingCache } from '~/casing.ts';\nimport type { AnyColumn } from '~/column.ts';\nimport { Column } from '~/column.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport { DrizzleError } from '~/errors.ts';\nimport type { MigrationConfig, MigrationMeta } from '~/migrator.ts';\nimport {\n\ttype BuildRelationalQueryResult,\n\ttype DBQueryConfig,\n\tgetOperators,\n\tgetOrderByOperators,\n\tMany,\n\tnormalizeRelation,\n\tOne,\n\ttype Relation,\n\ttype TableRelationalConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport type { Name, Placeholder } from '~/sql/index.ts';\nimport { and, eq } from '~/sql/index.ts';\nimport { Param, type QueryWithTypings, SQL, sql, type SQLChunk } from '~/sql/sql.ts';\nimport { SQLiteColumn } from '~/sqlite-core/columns/index.ts';\nimport type {\n\tAnySQLiteSelectQueryBuilder,\n\tSQLiteDeleteConfig,\n\tSQLiteInsertConfig,\n\tSQLiteUpdateConfig,\n} from '~/sqlite-core/query-builders/index.ts';\nimport { SQLiteTable } from '~/sqlite-core/table.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { getTableName, getTableUniqueName, Table } from '~/table.ts';\nimport { type Casing, orderSelectedFields, type UpdateSet } from '~/utils.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport type {\n\tSelectedFieldsOrdered,\n\tSQLiteSelectConfig,\n\tSQLiteSelectJoinConfig,\n} from './query-builders/select.types.ts';\nimport type { SQLiteSession } from './session.ts';\nimport { SQLiteViewBase } from './view-base.ts';\n\nexport interface SQLiteDialectConfig {\n\tcasing?: Casing;\n}\n\nexport abstract class SQLiteDialect {\n\tstatic readonly [entityKind]: string = 'SQLiteDialect';\n\n\t/** @internal */\n\treadonly casing: CasingCache;\n\n\tconstructor(config?: SQLiteDialectConfig) {\n\t\tthis.casing = new CasingCache(config?.casing);\n\t}\n\n\tescapeName(name: string): string {\n\t\treturn `\"${name}\"`;\n\t}\n\n\tescapeParam(_num: number): string {\n\t\treturn '?';\n\t}\n\n\tescapeString(str: string): string {\n\t\treturn `'${str.replace(/'/g, \"''\")}'`;\n\t}\n\n\tprivate buildWithCTE(queries: Subquery[] | undefined): SQL | undefined {\n\t\tif (!queries?.length) return undefined;\n\n\t\tconst withSqlChunks = [sql`with `];\n\t\tfor (const [i, w] of queries.entries()) {\n\t\t\twithSqlChunks.push(sql`${sql.identifier(w._.alias)} as (${w._.sql})`);\n\t\t\tif (i < queries.length - 1) {\n\t\t\t\twithSqlChunks.push(sql`, `);\n\t\t\t}\n\t\t}\n\t\twithSqlChunks.push(sql` `);\n\t\treturn sql.join(withSqlChunks);\n\t}\n\n\tbuildDeleteQuery({ table, where, returning, withList, limit, orderBy }: SQLiteDeleteConfig): SQL {\n\t\tconst withSql = this.buildWithCTE(withList);\n\n\t\tconst returningSql = returning\n\t\t\t? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}`\n\t\t\t: undefined;\n\n\t\tconst whereSql = where ? sql` where ${where}` : undefined;\n\n\t\tconst orderBySql = this.buildOrderBy(orderBy);\n\n\t\tconst limitSql = this.buildLimit(limit);\n\n\t\treturn sql`${withSql}delete from ${table}${whereSql}${returningSql}${orderBySql}${limitSql}`;\n\t}\n\n\tbuildUpdateSet(table: SQLiteTable, set: UpdateSet): SQL {\n\t\tconst tableColumns = table[Table.Symbol.Columns];\n\n\t\tconst columnNames = Object.keys(tableColumns).filter((colName) =>\n\t\t\tset[colName] !== undefined || tableColumns[colName]?.onUpdateFn !== undefined\n\t\t);\n\n\t\tconst setSize = columnNames.length;\n\t\treturn sql.join(columnNames.flatMap((colName, i) => {\n\t\t\tconst col = tableColumns[colName]!;\n\n\t\t\tconst value = set[colName] ?? sql.param(col.onUpdateFn!(), col);\n\t\t\tconst res = sql`${sql.identifier(this.casing.getColumnCasing(col))} = ${value}`;\n\n\t\t\tif (i < setSize - 1) {\n\t\t\t\treturn [res, sql.raw(', ')];\n\t\t\t}\n\t\t\treturn [res];\n\t\t}));\n\t}\n\n\tbuildUpdateQuery({ table, set, where, returning, withList, joins, from, limit, orderBy }: SQLiteUpdateConfig): SQL {\n\t\tconst withSql = this.buildWithCTE(withList);\n\n\t\tconst setSql = this.buildUpdateSet(table, set);\n\n\t\tconst fromSql = from && sql.join([sql.raw(' from '), this.buildFromTable(from)]);\n\n\t\tconst joinsSql = this.buildJoins(joins);\n\n\t\tconst returningSql = returning\n\t\t\t? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}`\n\t\t\t: undefined;\n\n\t\tconst whereSql = where ? sql` where ${where}` : undefined;\n\n\t\tconst orderBySql = this.buildOrderBy(orderBy);\n\n\t\tconst limitSql = this.buildLimit(limit);\n\n\t\treturn sql`${withSql}update ${table} set ${setSql}${fromSql}${joinsSql}${whereSql}${returningSql}${orderBySql}${limitSql}`;\n\t}\n\n\t/**\n\t * Builds selection SQL with provided fields/expressions\n\t *\n\t * Examples:\n\t *\n\t * `select from`\n\t *\n\t * `insert ... returning `\n\t *\n\t * If `isSingleTable` is true, then columns won't be prefixed with table name\n\t */\n\tprivate buildSelection(\n\t\tfields: SelectedFieldsOrdered,\n\t\t{ isSingleTable = false }: { isSingleTable?: boolean } = {},\n\t): SQL {\n\t\tconst columnsLen = fields.length;\n\n\t\tconst chunks = fields\n\t\t\t.flatMap(({ field }, i) => {\n\t\t\t\tconst chunk: SQLChunk[] = [];\n\n\t\t\t\tif (is(field, SQL.Aliased) && field.isSelectionField) {\n\t\t\t\t\tchunk.push(sql.identifier(field.fieldAlias));\n\t\t\t\t} else if (is(field, SQL.Aliased) || is(field, SQL)) {\n\t\t\t\t\tconst query = is(field, SQL.Aliased) ? field.sql : field;\n\n\t\t\t\t\tif (isSingleTable) {\n\t\t\t\t\t\tchunk.push(\n\t\t\t\t\t\t\tnew SQL(\n\t\t\t\t\t\t\t\tquery.queryChunks.map((c) => {\n\t\t\t\t\t\t\t\t\tif (is(c, Column)) {\n\t\t\t\t\t\t\t\t\t\treturn sql.identifier(this.casing.getColumnCasing(c));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn c;\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchunk.push(query);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (is(field, SQL.Aliased)) {\n\t\t\t\t\t\tchunk.push(sql` as ${sql.identifier(field.fieldAlias)}`);\n\t\t\t\t\t}\n\t\t\t\t} else if (is(field, Column)) {\n\t\t\t\t\tconst tableName = field.table[Table.Symbol.Name];\n\t\t\t\t\tif (field.columnType === 'SQLiteNumericBigInt') {\n\t\t\t\t\t\tif (isSingleTable) {\n\t\t\t\t\t\t\tchunk.push(sql`cast(${sql.identifier(this.casing.getColumnCasing(field))} as text)`);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchunk.push(\n\t\t\t\t\t\t\t\tsql`cast(${sql.identifier(tableName)}.${sql.identifier(this.casing.getColumnCasing(field))} as text)`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (isSingleTable) {\n\t\t\t\t\t\t\tchunk.push(sql.identifier(this.casing.getColumnCasing(field)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchunk.push(sql`${sql.identifier(tableName)}.${sql.identifier(this.casing.getColumnCasing(field))}`);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (i < columnsLen - 1) {\n\t\t\t\t\tchunk.push(sql`, `);\n\t\t\t\t}\n\n\t\t\t\treturn chunk;\n\t\t\t});\n\n\t\treturn sql.join(chunks);\n\t}\n\n\tprivate buildJoins(joins: SQLiteSelectJoinConfig[] | undefined): SQL | undefined {\n\t\tif (!joins || joins.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst joinsArray: SQL[] = [];\n\n\t\tif (joins) {\n\t\t\tfor (const [index, joinMeta] of joins.entries()) {\n\t\t\t\tif (index === 0) {\n\t\t\t\t\tjoinsArray.push(sql` `);\n\t\t\t\t}\n\t\t\t\tconst table = joinMeta.table;\n\t\t\t\tconst onSql = joinMeta.on ? sql` on ${joinMeta.on}` : undefined;\n\n\t\t\t\tif (is(table, SQLiteTable)) {\n\t\t\t\t\tconst tableName = table[SQLiteTable.Symbol.Name];\n\t\t\t\t\tconst tableSchema = table[SQLiteTable.Symbol.Schema];\n\t\t\t\t\tconst origTableName = table[SQLiteTable.Symbol.OriginalName];\n\t\t\t\t\tconst alias = tableName === origTableName ? undefined : joinMeta.alias;\n\t\t\t\t\tjoinsArray.push(\n\t\t\t\t\t\tsql`${sql.raw(joinMeta.joinType)} join ${tableSchema ? sql`${sql.identifier(tableSchema)}.` : undefined}${\n\t\t\t\t\t\t\tsql.identifier(origTableName)\n\t\t\t\t\t\t}${alias && sql` ${sql.identifier(alias)}`}${onSql}`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tjoinsArray.push(\n\t\t\t\t\t\tsql`${sql.raw(joinMeta.joinType)} join ${table}${onSql}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (index < joins.length - 1) {\n\t\t\t\t\tjoinsArray.push(sql` `);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn sql.join(joinsArray);\n\t}\n\n\tprivate buildLimit(limit: number | Placeholder | undefined): SQL | undefined {\n\t\treturn typeof limit === 'object' || (typeof limit === 'number' && limit >= 0)\n\t\t\t? sql` limit ${limit}`\n\t\t\t: undefined;\n\t}\n\n\tprivate buildOrderBy(orderBy: (SQLiteColumn | SQL | SQL.Aliased)[] | undefined): SQL | undefined {\n\t\tconst orderByList: (SQLiteColumn | SQL | SQL.Aliased)[] = [];\n\n\t\tif (orderBy) {\n\t\t\tfor (const [index, orderByValue] of orderBy.entries()) {\n\t\t\t\torderByList.push(orderByValue);\n\n\t\t\t\tif (index < orderBy.length - 1) {\n\t\t\t\t\torderByList.push(sql`, `);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn orderByList.length > 0 ? sql` order by ${sql.join(orderByList)}` : undefined;\n\t}\n\n\tprivate buildFromTable(\n\t\ttable: SQL | Subquery | SQLiteViewBase | SQLiteTable | undefined,\n\t): SQL | Subquery | SQLiteViewBase | SQLiteTable | undefined {\n\t\tif (is(table, Table) && table[Table.Symbol.IsAlias]) {\n\t\t\treturn sql`${sql`${sql.identifier(table[Table.Symbol.Schema] ?? '')}.`.if(table[Table.Symbol.Schema])}${\n\t\t\t\tsql.identifier(table[Table.Symbol.OriginalName])\n\t\t\t} ${sql.identifier(table[Table.Symbol.Name])}`;\n\t\t}\n\n\t\treturn table;\n\t}\n\n\tbuildSelectQuery(\n\t\t{\n\t\t\twithList,\n\t\t\tfields,\n\t\t\tfieldsFlat,\n\t\t\twhere,\n\t\t\thaving,\n\t\t\ttable,\n\t\t\tjoins,\n\t\t\torderBy,\n\t\t\tgroupBy,\n\t\t\tlimit,\n\t\t\toffset,\n\t\t\tdistinct,\n\t\t\tsetOperators,\n\t\t}: SQLiteSelectConfig,\n\t): SQL {\n\t\tconst fieldsList = fieldsFlat ?? orderSelectedFields(fields);\n\t\tfor (const f of fieldsList) {\n\t\t\tif (\n\t\t\t\tis(f.field, Column)\n\t\t\t\t&& getTableName(f.field.table)\n\t\t\t\t\t!== (is(table, Subquery)\n\t\t\t\t\t\t? table._.alias\n\t\t\t\t\t\t: is(table, SQLiteViewBase)\n\t\t\t\t\t\t? table[ViewBaseConfig].name\n\t\t\t\t\t\t: is(table, SQL)\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: getTableName(table))\n\t\t\t\t&& !((table) =>\n\t\t\t\t\tjoins?.some(({ alias }) =>\n\t\t\t\t\t\talias === (table[Table.Symbol.IsAlias] ? getTableName(table) : table[Table.Symbol.BaseName])\n\t\t\t\t\t))(f.field.table)\n\t\t\t) {\n\t\t\t\tconst tableName = getTableName(f.field.table);\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Your \"${\n\t\t\t\t\t\tf.path.join('->')\n\t\t\t\t\t}\" field references a column \"${tableName}\".\"${f.field.name}\", but the table \"${tableName}\" is not part of the query! Did you forget to join it?`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst isSingleTable = !joins || joins.length === 0;\n\n\t\tconst withSql = this.buildWithCTE(withList);\n\n\t\tconst distinctSql = distinct ? sql` distinct` : undefined;\n\n\t\tconst selection = this.buildSelection(fieldsList, { isSingleTable });\n\n\t\tconst tableSql = this.buildFromTable(table);\n\n\t\tconst joinsSql = this.buildJoins(joins);\n\n\t\tconst whereSql = where ? sql` where ${where}` : undefined;\n\n\t\tconst havingSql = having ? sql` having ${having}` : undefined;\n\n\t\tconst groupByList: (SQL | AnyColumn | SQL.Aliased)[] = [];\n\t\tif (groupBy) {\n\t\t\tfor (const [index, groupByValue] of groupBy.entries()) {\n\t\t\t\tgroupByList.push(groupByValue);\n\n\t\t\t\tif (index < groupBy.length - 1) {\n\t\t\t\t\tgroupByList.push(sql`, `);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst groupBySql = groupByList.length > 0 ? sql` group by ${sql.join(groupByList)}` : undefined;\n\n\t\tconst orderBySql = this.buildOrderBy(orderBy);\n\n\t\tconst limitSql = this.buildLimit(limit);\n\n\t\tconst offsetSql = offset ? sql` offset ${offset}` : undefined;\n\n\t\tconst finalQuery =\n\t\t\tsql`${withSql}select${distinctSql} ${selection} from ${tableSql}${joinsSql}${whereSql}${groupBySql}${havingSql}${orderBySql}${limitSql}${offsetSql}`;\n\n\t\tif (setOperators.length > 0) {\n\t\t\treturn this.buildSetOperations(finalQuery, setOperators);\n\t\t}\n\n\t\treturn finalQuery;\n\t}\n\n\tbuildSetOperations(leftSelect: SQL, setOperators: SQLiteSelectConfig['setOperators']): SQL {\n\t\tconst [setOperator, ...rest] = setOperators;\n\n\t\tif (!setOperator) {\n\t\t\tthrow new Error('Cannot pass undefined values to any set operator');\n\t\t}\n\n\t\tif (rest.length === 0) {\n\t\t\treturn this.buildSetOperationQuery({ leftSelect, setOperator });\n\t\t}\n\n\t\t// Some recursive magic here\n\t\treturn this.buildSetOperations(\n\t\t\tthis.buildSetOperationQuery({ leftSelect, setOperator }),\n\t\t\trest,\n\t\t);\n\t}\n\n\tbuildSetOperationQuery({\n\t\tleftSelect,\n\t\tsetOperator: { type, isAll, rightSelect, limit, orderBy, offset },\n\t}: { leftSelect: SQL; setOperator: SQLiteSelectConfig['setOperators'][number] }): SQL {\n\t\t// SQLite doesn't support parenthesis in set operations\n\t\tconst leftChunk = sql`${leftSelect.getSQL()} `;\n\t\tconst rightChunk = sql`${rightSelect.getSQL()}`;\n\n\t\tlet orderBySql;\n\t\tif (orderBy && orderBy.length > 0) {\n\t\t\tconst orderByValues: (SQL | Name)[] = [];\n\n\t\t\t// The next bit is necessary because the sql operator replaces ${table.column} with `table`.`column`\n\t\t\t// which is invalid Sql syntax, Table from one of the SELECTs cannot be used in global ORDER clause\n\t\t\tfor (const singleOrderBy of orderBy) {\n\t\t\t\tif (is(singleOrderBy, SQLiteColumn)) {\n\t\t\t\t\torderByValues.push(sql.identifier(singleOrderBy.name));\n\t\t\t\t} else if (is(singleOrderBy, SQL)) {\n\t\t\t\t\tfor (let i = 0; i < singleOrderBy.queryChunks.length; i++) {\n\t\t\t\t\t\tconst chunk = singleOrderBy.queryChunks[i];\n\n\t\t\t\t\t\tif (is(chunk, SQLiteColumn)) {\n\t\t\t\t\t\t\tsingleOrderBy.queryChunks[i] = sql.identifier(this.casing.getColumnCasing(chunk));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\torderByValues.push(sql`${singleOrderBy}`);\n\t\t\t\t} else {\n\t\t\t\t\torderByValues.push(sql`${singleOrderBy}`);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\torderBySql = sql` order by ${sql.join(orderByValues, sql`, `)}`;\n\t\t}\n\n\t\tconst limitSql = typeof limit === 'object' || (typeof limit === 'number' && limit >= 0)\n\t\t\t? sql` limit ${limit}`\n\t\t\t: undefined;\n\n\t\tconst operatorChunk = sql.raw(`${type} ${isAll ? 'all ' : ''}`);\n\n\t\tconst offsetSql = offset ? sql` offset ${offset}` : undefined;\n\n\t\treturn sql`${leftChunk}${operatorChunk}${rightChunk}${orderBySql}${limitSql}${offsetSql}`;\n\t}\n\n\tbuildInsertQuery(\n\t\t{ table, values: valuesOrSelect, onConflict, returning, withList, select }: SQLiteInsertConfig,\n\t): SQL {\n\t\t// const isSingleValue = values.length === 1;\n\t\tconst valuesSqlList: ((SQLChunk | SQL)[] | SQL)[] = [];\n\t\tconst columns: Record = table[Table.Symbol.Columns];\n\n\t\tconst colEntries: [string, SQLiteColumn][] = Object.entries(columns).filter(([_, col]) =>\n\t\t\t!col.shouldDisableInsert()\n\t\t);\n\t\tconst insertOrder = colEntries.map(([, column]) => sql.identifier(this.casing.getColumnCasing(column)));\n\n\t\tif (select) {\n\t\t\tconst select = valuesOrSelect as AnySQLiteSelectQueryBuilder | SQL;\n\n\t\t\tif (is(select, SQL)) {\n\t\t\t\tvaluesSqlList.push(select);\n\t\t\t} else {\n\t\t\t\tvaluesSqlList.push(select.getSQL());\n\t\t\t}\n\t\t} else {\n\t\t\tconst values = valuesOrSelect as Record[];\n\t\t\tvaluesSqlList.push(sql.raw('values '));\n\n\t\t\tfor (const [valueIndex, value] of values.entries()) {\n\t\t\t\tconst valueList: (SQLChunk | SQL)[] = [];\n\t\t\t\tfor (const [fieldName, col] of colEntries) {\n\t\t\t\t\tconst colValue = value[fieldName];\n\t\t\t\t\tif (colValue === undefined || (is(colValue, Param) && colValue.value === undefined)) {\n\t\t\t\t\t\tlet defaultValue;\n\t\t\t\t\t\tif (col.default !== null && col.default !== undefined) {\n\t\t\t\t\t\t\tdefaultValue = is(col.default, SQL) ? col.default : sql.param(col.default, col);\n\t\t\t\t\t\t\t// eslint-disable-next-line unicorn/no-negated-condition\n\t\t\t\t\t\t} else if (col.defaultFn !== undefined) {\n\t\t\t\t\t\t\tconst defaultFnResult = col.defaultFn();\n\t\t\t\t\t\t\tdefaultValue = is(defaultFnResult, SQL) ? defaultFnResult : sql.param(defaultFnResult, col);\n\t\t\t\t\t\t\t// eslint-disable-next-line unicorn/no-negated-condition\n\t\t\t\t\t\t} else if (!col.default && col.onUpdateFn !== undefined) {\n\t\t\t\t\t\t\tconst onUpdateFnResult = col.onUpdateFn();\n\t\t\t\t\t\t\tdefaultValue = is(onUpdateFnResult, SQL) ? onUpdateFnResult : sql.param(onUpdateFnResult, col);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdefaultValue = sql`null`;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalueList.push(defaultValue);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalueList.push(colValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvaluesSqlList.push(valueList);\n\t\t\t\tif (valueIndex < values.length - 1) {\n\t\t\t\t\tvaluesSqlList.push(sql`, `);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst withSql = this.buildWithCTE(withList);\n\n\t\tconst valuesSql = sql.join(valuesSqlList);\n\n\t\tconst returningSql = returning\n\t\t\t? sql` returning ${this.buildSelection(returning, { isSingleTable: true })}`\n\t\t\t: undefined;\n\n\t\tconst onConflictSql = onConflict?.length\n\t\t\t? sql.join(onConflict)\n\t\t\t: undefined;\n\n\t\t// if (isSingleValue && valuesSqlList.length === 0){\n\t\t// \treturn sql`insert into ${table} default values ${onConflictSql}${returningSql}`;\n\t\t// }\n\n\t\treturn sql`${withSql}insert into ${table} ${insertOrder} ${valuesSql}${onConflictSql}${returningSql}`;\n\t}\n\n\tsqlToQuery(sql: SQL, invokeSource?: 'indexes' | undefined): QueryWithTypings {\n\t\treturn sql.toQuery({\n\t\t\tcasing: this.casing,\n\t\t\tescapeName: this.escapeName,\n\t\t\tescapeParam: this.escapeParam,\n\t\t\tescapeString: this.escapeString,\n\t\t\tinvokeSource,\n\t\t});\n\t}\n\n\tbuildRelationalQuery({\n\t\tfullSchema,\n\t\tschema,\n\t\ttableNamesMap,\n\t\ttable,\n\t\ttableConfig,\n\t\tqueryConfig: config,\n\t\ttableAlias,\n\t\tnestedQueryRelation,\n\t\tjoinOn,\n\t}: {\n\t\tfullSchema: Record;\n\t\tschema: TablesRelationalConfig;\n\t\ttableNamesMap: Record;\n\t\ttable: SQLiteTable;\n\t\ttableConfig: TableRelationalConfig;\n\t\tqueryConfig: true | DBQueryConfig<'many', true>;\n\t\ttableAlias: string;\n\t\tnestedQueryRelation?: Relation;\n\t\tjoinOn?: SQL;\n\t}): BuildRelationalQueryResult {\n\t\tlet selection: BuildRelationalQueryResult['selection'] = [];\n\t\tlet limit, offset, orderBy: SQLiteSelectConfig['orderBy'] = [], where;\n\t\tconst joins: SQLiteSelectJoinConfig[] = [];\n\n\t\tif (config === true) {\n\t\t\tconst selectionEntries = Object.entries(tableConfig.columns);\n\t\t\tselection = selectionEntries.map((\n\t\t\t\t[key, value],\n\t\t\t) => ({\n\t\t\t\tdbKey: value.name,\n\t\t\t\ttsKey: key,\n\t\t\t\tfield: aliasedTableColumn(value as SQLiteColumn, tableAlias),\n\t\t\t\trelationTableTsKey: undefined,\n\t\t\t\tisJson: false,\n\t\t\t\tselection: [],\n\t\t\t}));\n\t\t} else {\n\t\t\tconst aliasedColumns = Object.fromEntries(\n\t\t\t\tObject.entries(tableConfig.columns).map(([key, value]) => [key, aliasedTableColumn(value, tableAlias)]),\n\t\t\t);\n\n\t\t\tif (config.where) {\n\t\t\t\tconst whereSql = typeof config.where === 'function'\n\t\t\t\t\t? config.where(aliasedColumns, getOperators())\n\t\t\t\t\t: config.where;\n\t\t\t\twhere = whereSql && mapColumnsInSQLToAlias(whereSql, tableAlias);\n\t\t\t}\n\n\t\t\tconst fieldsSelection: { tsKey: string; value: SQLiteColumn | SQL.Aliased }[] = [];\n\t\t\tlet selectedColumns: string[] = [];\n\n\t\t\t// Figure out which columns to select\n\t\t\tif (config.columns) {\n\t\t\t\tlet isIncludeMode = false;\n\n\t\t\t\tfor (const [field, value] of Object.entries(config.columns)) {\n\t\t\t\t\tif (value === undefined) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (field in tableConfig.columns) {\n\t\t\t\t\t\tif (!isIncludeMode && value === true) {\n\t\t\t\t\t\t\tisIncludeMode = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tselectedColumns.push(field);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (selectedColumns.length > 0) {\n\t\t\t\t\tselectedColumns = isIncludeMode\n\t\t\t\t\t\t? selectedColumns.filter((c) => config.columns?.[c] === true)\n\t\t\t\t\t\t: Object.keys(tableConfig.columns).filter((key) => !selectedColumns.includes(key));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Select all columns if selection is not specified\n\t\t\t\tselectedColumns = Object.keys(tableConfig.columns);\n\t\t\t}\n\n\t\t\tfor (const field of selectedColumns) {\n\t\t\t\tconst column = tableConfig.columns[field]! as SQLiteColumn;\n\t\t\t\tfieldsSelection.push({ tsKey: field, value: column });\n\t\t\t}\n\n\t\t\tlet selectedRelations: {\n\t\t\t\ttsKey: string;\n\t\t\t\tqueryConfig: true | DBQueryConfig<'many', false>;\n\t\t\t\trelation: Relation;\n\t\t\t}[] = [];\n\n\t\t\t// Figure out which relations to select\n\t\t\tif (config.with) {\n\t\t\t\tselectedRelations = Object.entries(config.with)\n\t\t\t\t\t.filter((entry): entry is [typeof entry[0], NonNullable] => !!entry[1])\n\t\t\t\t\t.map(([tsKey, queryConfig]) => ({ tsKey, queryConfig, relation: tableConfig.relations[tsKey]! }));\n\t\t\t}\n\n\t\t\tlet extras;\n\n\t\t\t// Figure out which extras to select\n\t\t\tif (config.extras) {\n\t\t\t\textras = typeof config.extras === 'function'\n\t\t\t\t\t? config.extras(aliasedColumns, { sql })\n\t\t\t\t\t: config.extras;\n\t\t\t\tfor (const [tsKey, value] of Object.entries(extras)) {\n\t\t\t\t\tfieldsSelection.push({\n\t\t\t\t\t\ttsKey,\n\t\t\t\t\t\tvalue: mapColumnsInAliasedSQLToAlias(value, tableAlias),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Transform `fieldsSelection` into `selection`\n\t\t\t// `fieldsSelection` shouldn't be used after this point\n\t\t\tfor (const { tsKey, value } of fieldsSelection) {\n\t\t\t\tselection.push({\n\t\t\t\t\tdbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey]!.name,\n\t\t\t\t\ttsKey,\n\t\t\t\t\tfield: is(value, Column) ? aliasedTableColumn(value, tableAlias) : value,\n\t\t\t\t\trelationTableTsKey: undefined,\n\t\t\t\t\tisJson: false,\n\t\t\t\t\tselection: [],\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tlet orderByOrig = typeof config.orderBy === 'function'\n\t\t\t\t? config.orderBy(aliasedColumns, getOrderByOperators())\n\t\t\t\t: config.orderBy ?? [];\n\t\t\tif (!Array.isArray(orderByOrig)) {\n\t\t\t\torderByOrig = [orderByOrig];\n\t\t\t}\n\t\t\torderBy = orderByOrig.map((orderByValue) => {\n\t\t\t\tif (is(orderByValue, Column)) {\n\t\t\t\t\treturn aliasedTableColumn(orderByValue, tableAlias) as SQLiteColumn;\n\t\t\t\t}\n\t\t\t\treturn mapColumnsInSQLToAlias(orderByValue, tableAlias);\n\t\t\t});\n\n\t\t\tlimit = config.limit;\n\t\t\toffset = config.offset;\n\n\t\t\t// Process all relations\n\t\t\tfor (\n\t\t\t\tconst {\n\t\t\t\t\ttsKey: selectedRelationTsKey,\n\t\t\t\t\tqueryConfig: selectedRelationConfigValue,\n\t\t\t\t\trelation,\n\t\t\t\t} of selectedRelations\n\t\t\t) {\n\t\t\t\tconst normalizedRelation = normalizeRelation(schema, tableNamesMap, relation);\n\t\t\t\tconst relationTableName = getTableUniqueName(relation.referencedTable);\n\t\t\t\tconst relationTableTsName = tableNamesMap[relationTableName]!;\n\t\t\t\tconst relationTableAlias = `${tableAlias}_${selectedRelationTsKey}`;\n\t\t\t\t// const relationTable = schema[relationTableTsName]!;\n\t\t\t\tconst joinOn = and(\n\t\t\t\t\t...normalizedRelation.fields.map((field, i) =>\n\t\t\t\t\t\teq(\n\t\t\t\t\t\t\taliasedTableColumn(normalizedRelation.references[i]!, relationTableAlias),\n\t\t\t\t\t\t\taliasedTableColumn(field, tableAlias),\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tconst builtRelation = this.buildRelationalQuery({\n\t\t\t\t\tfullSchema,\n\t\t\t\t\tschema,\n\t\t\t\t\ttableNamesMap,\n\t\t\t\t\ttable: fullSchema[relationTableTsName] as SQLiteTable,\n\t\t\t\t\ttableConfig: schema[relationTableTsName]!,\n\t\t\t\t\tqueryConfig: is(relation, One)\n\t\t\t\t\t\t? (selectedRelationConfigValue === true\n\t\t\t\t\t\t\t? { limit: 1 }\n\t\t\t\t\t\t\t: { ...selectedRelationConfigValue, limit: 1 })\n\t\t\t\t\t\t: selectedRelationConfigValue,\n\t\t\t\t\ttableAlias: relationTableAlias,\n\t\t\t\t\tjoinOn,\n\t\t\t\t\tnestedQueryRelation: relation,\n\t\t\t\t});\n\t\t\t\tconst field = (sql`(${builtRelation.sql})`).as(selectedRelationTsKey);\n\t\t\t\tselection.push({\n\t\t\t\t\tdbKey: selectedRelationTsKey,\n\t\t\t\t\ttsKey: selectedRelationTsKey,\n\t\t\t\t\tfield,\n\t\t\t\t\trelationTableTsKey: relationTableTsName,\n\t\t\t\t\tisJson: true,\n\t\t\t\t\tselection: builtRelation.selection,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (selection.length === 0) {\n\t\t\tthrow new DrizzleError({\n\t\t\t\tmessage:\n\t\t\t\t\t`No fields selected for table \"${tableConfig.tsName}\" (\"${tableAlias}\"). You need to have at least one item in \"columns\", \"with\" or \"extras\". If you need to select all columns, omit the \"columns\" key or set it to undefined.`,\n\t\t\t});\n\t\t}\n\n\t\tlet result;\n\n\t\twhere = and(joinOn, where);\n\n\t\tif (nestedQueryRelation) {\n\t\t\tlet field = sql`json_array(${\n\t\t\t\tsql.join(\n\t\t\t\t\tselection.map(({ field }) =>\n\t\t\t\t\t\tis(field, SQLiteColumn)\n\t\t\t\t\t\t\t? sql.identifier(this.casing.getColumnCasing(field))\n\t\t\t\t\t\t\t: is(field, SQL.Aliased)\n\t\t\t\t\t\t\t? field.sql\n\t\t\t\t\t\t\t: field\n\t\t\t\t\t),\n\t\t\t\t\tsql`, `,\n\t\t\t\t)\n\t\t\t})`;\n\t\t\tif (is(nestedQueryRelation, Many)) {\n\t\t\t\tfield = sql`coalesce(json_group_array(${field}), json_array())`;\n\t\t\t}\n\t\t\tconst nestedSelection = [{\n\t\t\t\tdbKey: 'data',\n\t\t\t\ttsKey: 'data',\n\t\t\t\tfield: field.as('data'),\n\t\t\t\tisJson: true,\n\t\t\t\trelationTableTsKey: tableConfig.tsName,\n\t\t\t\tselection,\n\t\t\t}];\n\n\t\t\tconst needsSubquery = limit !== undefined || offset !== undefined || orderBy.length > 0;\n\n\t\t\tif (needsSubquery) {\n\t\t\t\tresult = this.buildSelectQuery({\n\t\t\t\t\ttable: aliasedTable(table, tableAlias),\n\t\t\t\t\tfields: {},\n\t\t\t\t\tfieldsFlat: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpath: [],\n\t\t\t\t\t\t\tfield: sql.raw('*'),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\twhere,\n\t\t\t\t\tlimit,\n\t\t\t\t\toffset,\n\t\t\t\t\torderBy,\n\t\t\t\t\tsetOperators: [],\n\t\t\t\t});\n\n\t\t\t\twhere = undefined;\n\t\t\t\tlimit = undefined;\n\t\t\t\toffset = undefined;\n\t\t\t\torderBy = undefined;\n\t\t\t} else {\n\t\t\t\tresult = aliasedTable(table, tableAlias);\n\t\t\t}\n\n\t\t\tresult = this.buildSelectQuery({\n\t\t\t\ttable: is(result, SQLiteTable) ? result : new Subquery(result, {}, tableAlias),\n\t\t\t\tfields: {},\n\t\t\t\tfieldsFlat: nestedSelection.map(({ field }) => ({\n\t\t\t\t\tpath: [],\n\t\t\t\t\tfield: is(field, Column) ? aliasedTableColumn(field, tableAlias) : field,\n\t\t\t\t})),\n\t\t\t\tjoins,\n\t\t\t\twhere,\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t\torderBy,\n\t\t\t\tsetOperators: [],\n\t\t\t});\n\t\t} else {\n\t\t\tresult = this.buildSelectQuery({\n\t\t\t\ttable: aliasedTable(table, tableAlias),\n\t\t\t\tfields: {},\n\t\t\t\tfieldsFlat: selection.map(({ field }) => ({\n\t\t\t\t\tpath: [],\n\t\t\t\t\tfield: is(field, Column) ? aliasedTableColumn(field, tableAlias) : field,\n\t\t\t\t})),\n\t\t\t\tjoins,\n\t\t\t\twhere,\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t\torderBy,\n\t\t\t\tsetOperators: [],\n\t\t\t});\n\t\t}\n\n\t\treturn {\n\t\t\ttableTsKey: tableConfig.tsName,\n\t\t\tsql: result,\n\t\t\tselection,\n\t\t};\n\t}\n}\n\nexport class SQLiteSyncDialect extends SQLiteDialect {\n\tstatic override readonly [entityKind]: string = 'SQLiteSyncDialect';\n\n\tmigrate(\n\t\tmigrations: MigrationMeta[],\n\t\tsession: SQLiteSession<'sync', unknown, Record, TablesRelationalConfig>,\n\t\tconfig?: string | MigrationConfig,\n\t): void {\n\t\tconst migrationsTable = config === undefined\n\t\t\t? '__drizzle_migrations'\n\t\t\t: typeof config === 'string'\n\t\t\t? '__drizzle_migrations'\n\t\t\t: config.migrationsTable ?? '__drizzle_migrations';\n\n\t\tconst migrationTableCreate = sql`\n\t\t\tCREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (\n\t\t\t\tid SERIAL PRIMARY KEY,\n\t\t\t\thash text NOT NULL,\n\t\t\t\tcreated_at numeric\n\t\t\t)\n\t\t`;\n\t\tsession.run(migrationTableCreate);\n\n\t\tconst dbMigrations = session.values<[number, string, string]>(\n\t\t\tsql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1`,\n\t\t);\n\n\t\tconst lastDbMigration = dbMigrations[0] ?? undefined;\n\t\tsession.run(sql`BEGIN`);\n\n\t\ttry {\n\t\t\tfor (const migration of migrations) {\n\t\t\t\tif (!lastDbMigration || Number(lastDbMigration[2])! < migration.folderMillis) {\n\t\t\t\t\tfor (const stmt of migration.sql) {\n\t\t\t\t\t\tsession.run(sql.raw(stmt));\n\t\t\t\t\t}\n\t\t\t\t\tsession.run(\n\t\t\t\t\t\tsql`INSERT INTO ${\n\t\t\t\t\t\t\tsql.identifier(migrationsTable)\n\t\t\t\t\t\t} (\"hash\", \"created_at\") VALUES(${migration.hash}, ${migration.folderMillis})`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsession.run(sql`COMMIT`);\n\t\t} catch (e) {\n\t\t\tsession.run(sql`ROLLBACK`);\n\t\t\tthrow e;\n\t\t}\n\t}\n}\n\nexport class SQLiteAsyncDialect extends SQLiteDialect {\n\tstatic override readonly [entityKind]: string = 'SQLiteAsyncDialect';\n\n\tasync migrate(\n\t\tmigrations: MigrationMeta[],\n\t\tsession: SQLiteSession<'async', any, any, any>,\n\t\tconfig?: string | MigrationConfig,\n\t): Promise {\n\t\tconst migrationsTable = config === undefined\n\t\t\t? '__drizzle_migrations'\n\t\t\t: typeof config === 'string'\n\t\t\t? '__drizzle_migrations'\n\t\t\t: config.migrationsTable ?? '__drizzle_migrations';\n\n\t\tconst migrationTableCreate = sql`\n\t\t\tCREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (\n\t\t\t\tid SERIAL PRIMARY KEY,\n\t\t\t\thash text NOT NULL,\n\t\t\t\tcreated_at numeric\n\t\t\t)\n\t\t`;\n\t\tawait session.run(migrationTableCreate);\n\n\t\tconst dbMigrations = await session.values<[number, string, string]>(\n\t\t\tsql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1`,\n\t\t);\n\n\t\tconst lastDbMigration = dbMigrations[0] ?? undefined;\n\n\t\tawait session.transaction(async (tx) => {\n\t\t\tfor (const migration of migrations) {\n\t\t\t\tif (!lastDbMigration || Number(lastDbMigration[2])! < migration.folderMillis) {\n\t\t\t\t\tfor (const stmt of migration.sql) {\n\t\t\t\t\t\tawait tx.run(sql.raw(stmt));\n\t\t\t\t\t}\n\t\t\t\t\tawait tx.run(\n\t\t\t\t\t\tsql`INSERT INTO ${\n\t\t\t\t\t\t\tsql.identifier(migrationsTable)\n\t\t\t\t\t\t} (\"hash\", \"created_at\") VALUES(${migration.hash}, ${migration.folderMillis})`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\nimport type { SQL, SQLWrapper } from '~/sql/index.ts';\n\nexport abstract class TypedQueryBuilder implements SQLWrapper {\n\tstatic readonly [entityKind]: string = 'TypedQueryBuilder';\n\n\tdeclare _: {\n\t\tselectedFields: TSelection;\n\t\tresult: TResult;\n\t\tconfig?: TConfig;\n\t};\n\n\t/** @internal */\n\tgetSelectedFields(): TSelection {\n\t\treturn this._.selectedFields;\n\t}\n\n\tabstract getSQL(): SQL;\n}\n", "import type { CacheConfig, WithCacheConfig } from '~/cache/core/types.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type {\n\tBuildSubquerySelection,\n\tGetSelectTableName,\n\tGetSelectTableSelection,\n\tJoinNullability,\n\tJoinType,\n\tSelectMode,\n\tSelectResult,\n\tSetOperator,\n} from '~/query-builders/select.types.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport { SQL, View } from '~/sql/sql.ts';\nimport type { ColumnsSelection, Placeholder, Query, SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteColumn } from '~/sqlite-core/columns/index.ts';\nimport type { SQLiteDialect } from '~/sqlite-core/dialect.ts';\nimport type { SQLiteSession } from '~/sqlite-core/session.ts';\nimport type { SubqueryWithSelection } from '~/sqlite-core/subquery.ts';\nimport type { SQLiteTable } from '~/sqlite-core/table.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { Table } from '~/table.ts';\nimport {\n\tapplyMixins,\n\tgetTableColumns,\n\tgetTableLikeName,\n\thaveSameKeys,\n\torderSelectedFields,\n\ttype ValueOrArray,\n} from '~/utils.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport { extractUsedTable } from '../utils.ts';\nimport { SQLiteViewBase } from '../view-base.ts';\nimport type {\n\tAnySQLiteSelect,\n\tCreateSQLiteSelectFromBuilderMode,\n\tGetSQLiteSetOperators,\n\tSelectedFields,\n\tSetOperatorRightSelect,\n\tSQLiteCreateSetOperatorFn,\n\tSQLiteSelectConfig,\n\tSQLiteSelectCrossJoinFn,\n\tSQLiteSelectDynamic,\n\tSQLiteSelectExecute,\n\tSQLiteSelectHKT,\n\tSQLiteSelectHKTBase,\n\tSQLiteSelectJoinFn,\n\tSQLiteSelectPrepare,\n\tSQLiteSelectWithout,\n\tSQLiteSetOperatorExcludedMethods,\n\tSQLiteSetOperatorWithResult,\n} from './select.types.ts';\n\nexport class SQLiteSelectBuilder<\n\tTSelection extends SelectedFields | undefined,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTBuilderMode extends 'db' | 'qb' = 'db',\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteSelectBuilder';\n\n\tprivate fields: TSelection;\n\tprivate session: SQLiteSession | undefined;\n\tprivate dialect: SQLiteDialect;\n\tprivate withList: Subquery[] | undefined;\n\tprivate distinct: boolean | undefined;\n\n\tconstructor(\n\t\tconfig: {\n\t\t\tfields: TSelection;\n\t\t\tsession: SQLiteSession | undefined;\n\t\t\tdialect: SQLiteDialect;\n\t\t\twithList?: Subquery[];\n\t\t\tdistinct?: boolean;\n\t\t},\n\t) {\n\t\tthis.fields = config.fields;\n\t\tthis.session = config.session;\n\t\tthis.dialect = config.dialect;\n\t\tthis.withList = config.withList;\n\t\tthis.distinct = config.distinct;\n\t}\n\n\tfrom(\n\t\tsource: TFrom,\n\t): CreateSQLiteSelectFromBuilderMode<\n\t\tTBuilderMode,\n\t\tGetSelectTableName,\n\t\tTResultType,\n\t\tTRunResult,\n\t\tTSelection extends undefined ? GetSelectTableSelection : TSelection,\n\t\tTSelection extends undefined ? 'single' : 'partial'\n\t> {\n\t\tconst isPartialSelect = !!this.fields;\n\n\t\tlet fields: SelectedFields;\n\t\tif (this.fields) {\n\t\t\tfields = this.fields;\n\t\t} else if (is(source, Subquery)) {\n\t\t\t// This is required to use the proxy handler to get the correct field values from the subquery\n\t\t\tfields = Object.fromEntries(\n\t\t\t\tObject.keys(source._.selectedFields).map((\n\t\t\t\t\tkey,\n\t\t\t\t) => [key, source[key as unknown as keyof typeof source] as unknown as SelectedFields[string]]),\n\t\t\t);\n\t\t} else if (is(source, SQLiteViewBase)) {\n\t\t\tfields = source[ViewBaseConfig].selectedFields as SelectedFields;\n\t\t} else if (is(source, SQL)) {\n\t\t\tfields = {};\n\t\t} else {\n\t\t\tfields = getTableColumns(source);\n\t\t}\n\n\t\treturn new SQLiteSelectBase({\n\t\t\ttable: source,\n\t\t\tfields,\n\t\t\tisPartialSelect,\n\t\t\tsession: this.session,\n\t\t\tdialect: this.dialect,\n\t\t\twithList: this.withList,\n\t\t\tdistinct: this.distinct,\n\t\t}) as any;\n\t}\n}\n\nexport abstract class SQLiteSelectQueryBuilderBase<\n\tTHKT extends SQLiteSelectHKTBase,\n\tTTableName extends string | undefined,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTSelection extends ColumnsSelection,\n\tTSelectMode extends SelectMode,\n\tTNullabilityMap extends Record = TTableName extends string ? Record\n\t\t: {},\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n\tTResult extends any[] = SelectResult[],\n\tTSelectedFields extends ColumnsSelection = BuildSubquerySelection,\n> extends TypedQueryBuilder {\n\tstatic override readonly [entityKind]: string = 'SQLiteSelectQueryBuilder';\n\n\toverride readonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly hkt: THKT;\n\t\treadonly tableName: TTableName;\n\t\treadonly resultType: TResultType;\n\t\treadonly runResult: TRunResult;\n\t\treadonly selection: TSelection;\n\t\treadonly selectMode: TSelectMode;\n\t\treadonly nullabilityMap: TNullabilityMap;\n\t\treadonly dynamic: TDynamic;\n\t\treadonly excludedMethods: TExcludedMethods;\n\t\treadonly result: TResult;\n\t\treadonly selectedFields: TSelectedFields;\n\t\treadonly config: SQLiteSelectConfig;\n\t};\n\n\t/** @internal */\n\tconfig: SQLiteSelectConfig;\n\tprotected joinsNotNullableMap: Record;\n\tprivate tableName: string | undefined;\n\tprivate isPartialSelect: boolean;\n\tprotected session: SQLiteSession | undefined;\n\tprotected dialect: SQLiteDialect;\n\tprotected cacheConfig?: WithCacheConfig = undefined;\n\tprotected usedTables: Set = new Set();\n\n\tconstructor(\n\t\t{ table, fields, isPartialSelect, session, dialect, withList, distinct }: {\n\t\t\ttable: SQLiteSelectConfig['table'];\n\t\t\tfields: SQLiteSelectConfig['fields'];\n\t\t\tisPartialSelect: boolean;\n\t\t\tsession: SQLiteSession | undefined;\n\t\t\tdialect: SQLiteDialect;\n\t\t\twithList: Subquery[] | undefined;\n\t\t\tdistinct: boolean | undefined;\n\t\t},\n\t) {\n\t\tsuper();\n\t\tthis.config = {\n\t\t\twithList,\n\t\t\ttable,\n\t\t\tfields: { ...fields },\n\t\t\tdistinct,\n\t\t\tsetOperators: [],\n\t\t};\n\t\tthis.isPartialSelect = isPartialSelect;\n\t\tthis.session = session;\n\t\tthis.dialect = dialect;\n\t\tthis._ = {\n\t\t\tselectedFields: fields as TSelectedFields,\n\t\t\tconfig: this.config,\n\t\t} as this['_'];\n\t\tthis.tableName = getTableLikeName(table);\n\t\tthis.joinsNotNullableMap = typeof this.tableName === 'string' ? { [this.tableName]: true } : {};\n\t\tfor (const item of extractUsedTable(table)) this.usedTables.add(item);\n\t}\n\n\t/** @internal */\n\tgetUsedTables() {\n\t\treturn [...this.usedTables];\n\t}\n\n\tprivate createJoin(\n\t\tjoinType: TJoinType,\n\t): 'cross' extends TJoinType ? SQLiteSelectCrossJoinFn\n\t\t: SQLiteSelectJoinFn\n\t{\n\t\treturn (\n\t\t\ttable: SQLiteTable | Subquery | SQLiteViewBase | SQL,\n\t\t\ton?: ((aliases: TSelection) => SQL | undefined) | SQL | undefined,\n\t\t) => {\n\t\t\tconst baseTableName = this.tableName;\n\t\t\tconst tableName = getTableLikeName(table);\n\n\t\t\t// store all tables used in a query\n\t\t\tfor (const item of extractUsedTable(table)) this.usedTables.add(item);\n\n\t\t\tif (typeof tableName === 'string' && this.config.joins?.some((join) => join.alias === tableName)) {\n\t\t\t\tthrow new Error(`Alias \"${tableName}\" is already used in this query`);\n\t\t\t}\n\n\t\t\tif (!this.isPartialSelect) {\n\t\t\t\t// If this is the first join and this is not a partial select and we're not selecting from raw SQL, \"move\" the fields from the main table to the nested object\n\t\t\t\tif (Object.keys(this.joinsNotNullableMap).length === 1 && typeof baseTableName === 'string') {\n\t\t\t\t\tthis.config.fields = {\n\t\t\t\t\t\t[baseTableName]: this.config.fields,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif (typeof tableName === 'string' && !is(table, SQL)) {\n\t\t\t\t\tconst selection = is(table, Subquery)\n\t\t\t\t\t\t? table._.selectedFields\n\t\t\t\t\t\t: is(table, View)\n\t\t\t\t\t\t? table[ViewBaseConfig].selectedFields\n\t\t\t\t\t\t: table[Table.Symbol.Columns];\n\t\t\t\t\tthis.config.fields[tableName] = selection;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof on === 'function') {\n\t\t\t\ton = on(\n\t\t\t\t\tnew Proxy(\n\t\t\t\t\t\tthis.config.fields,\n\t\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t\t) as TSelection,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (!this.config.joins) {\n\t\t\t\tthis.config.joins = [];\n\t\t\t}\n\t\t\tthis.config.joins.push({ on, table, joinType, alias: tableName });\n\n\t\t\tif (typeof tableName === 'string') {\n\t\t\t\tswitch (joinType) {\n\t\t\t\t\tcase 'left': {\n\t\t\t\t\t\tthis.joinsNotNullableMap[tableName] = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'right': {\n\t\t\t\t\t\tthis.joinsNotNullableMap = Object.fromEntries(\n\t\t\t\t\t\t\tObject.entries(this.joinsNotNullableMap).map(([key]) => [key, false]),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.joinsNotNullableMap[tableName] = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'cross':\n\t\t\t\t\tcase 'inner': {\n\t\t\t\t\t\tthis.joinsNotNullableMap[tableName] = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'full': {\n\t\t\t\t\t\tthis.joinsNotNullableMap = Object.fromEntries(\n\t\t\t\t\t\t\tObject.entries(this.joinsNotNullableMap).map(([key]) => [key, false]),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.joinsNotNullableMap[tableName] = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this as any;\n\t\t};\n\t}\n\n\t/**\n\t * Executes a `left join` operation by adding another table to the current query.\n\t *\n\t * Calling this method associates each row of the table with the corresponding row from the joined table, if a match is found. If no matching row exists, it sets all columns of the joined table to null.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#left-join}\n\t *\n\t * @param table the table to join.\n\t * @param on the `on` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users and their pets\n\t * const usersWithPets: { user: User; pets: Pet | null; }[] = await db.select()\n\t * .from(users)\n\t * .leftJoin(pets, eq(users.id, pets.ownerId))\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number; petId: number | null; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .leftJoin(pets, eq(users.id, pets.ownerId))\n\t * ```\n\t */\n\tleftJoin = this.createJoin('left');\n\n\t/**\n\t * Executes a `right join` operation by adding another table to the current query.\n\t *\n\t * Calling this method associates each row of the joined table with the corresponding row from the main table, if a match is found. If no matching row exists, it sets all columns of the main table to null.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#right-join}\n\t *\n\t * @param table the table to join.\n\t * @param on the `on` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users and their pets\n\t * const usersWithPets: { user: User | null; pets: Pet; }[] = await db.select()\n\t * .from(users)\n\t * .rightJoin(pets, eq(users.id, pets.ownerId))\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number | null; petId: number; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .rightJoin(pets, eq(users.id, pets.ownerId))\n\t * ```\n\t */\n\trightJoin = this.createJoin('right');\n\n\t/**\n\t * Executes an `inner join` operation, creating a new table by combining rows from two tables that have matching values.\n\t *\n\t * Calling this method retrieves rows that have corresponding entries in both joined tables. Rows without matching entries in either table are excluded, resulting in a table that includes only matching pairs.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#inner-join}\n\t *\n\t * @param table the table to join.\n\t * @param on the `on` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users and their pets\n\t * const usersWithPets: { user: User; pets: Pet; }[] = await db.select()\n\t * .from(users)\n\t * .innerJoin(pets, eq(users.id, pets.ownerId))\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number; petId: number; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .innerJoin(pets, eq(users.id, pets.ownerId))\n\t * ```\n\t */\n\tinnerJoin = this.createJoin('inner');\n\n\t/**\n\t * Executes a `full join` operation by combining rows from two tables into a new table.\n\t *\n\t * Calling this method retrieves all rows from both main and joined tables, merging rows with matching values and filling in `null` for non-matching columns.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#full-join}\n\t *\n\t * @param table the table to join.\n\t * @param on the `on` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users and their pets\n\t * const usersWithPets: { user: User | null; pets: Pet | null; }[] = await db.select()\n\t * .from(users)\n\t * .fullJoin(pets, eq(users.id, pets.ownerId))\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number | null; petId: number | null; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .fullJoin(pets, eq(users.id, pets.ownerId))\n\t * ```\n\t */\n\tfullJoin = this.createJoin('full');\n\n\t/**\n\t * Executes a `cross join` operation by combining rows from two tables into a new table.\n\t *\n\t * Calling this method retrieves all rows from both main and joined tables, merging all rows from each table.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/joins#cross-join}\n\t *\n\t * @param table the table to join.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all users, each user with every pet\n\t * const usersWithPets: { user: User; pets: Pet; }[] = await db.select()\n\t * .from(users)\n\t * .crossJoin(pets)\n\t *\n\t * // Select userId and petId\n\t * const usersIdsAndPetIds: { userId: number; petId: number; }[] = await db.select({\n\t * userId: users.id,\n\t * petId: pets.id,\n\t * })\n\t * .from(users)\n\t * .crossJoin(pets)\n\t * ```\n\t */\n\tcrossJoin = this.createJoin('cross');\n\n\tprivate createSetOperator(\n\t\ttype: SetOperator,\n\t\tisAll: boolean,\n\t): >(\n\t\trightSelection:\n\t\t\t| ((setOperators: GetSQLiteSetOperators) => SetOperatorRightSelect)\n\t\t\t| SetOperatorRightSelect,\n\t) => SQLiteSelectWithout<\n\t\tthis,\n\t\tTDynamic,\n\t\tSQLiteSetOperatorExcludedMethods,\n\t\ttrue\n\t> {\n\t\treturn (rightSelection) => {\n\t\t\tconst rightSelect = (typeof rightSelection === 'function'\n\t\t\t\t? rightSelection(getSQLiteSetOperators())\n\t\t\t\t: rightSelection) as TypedQueryBuilder<\n\t\t\t\t\tany,\n\t\t\t\t\tTResult\n\t\t\t\t>;\n\n\t\t\tif (!haveSameKeys(this.getSelectedFields(), rightSelect.getSelectedFields())) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'Set operator error (union / intersect / except): selected fields are not the same or are in a different order',\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.config.setOperators.push({ type, isAll, rightSelect });\n\t\t\treturn this as any;\n\t\t};\n\t}\n\n\t/**\n\t * Adds `union` set operator to the query.\n\t *\n\t * Calling this method will combine the result sets of the `select` statements and remove any duplicate rows that appear across them.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/set-operations#union}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all unique names from customers and users tables\n\t * await db.select({ name: users.name })\n\t * .from(users)\n\t * .union(\n\t * db.select({ name: customers.name }).from(customers)\n\t * );\n\t * // or\n\t * import { union } from 'drizzle-orm/sqlite-core'\n\t *\n\t * await union(\n\t * db.select({ name: users.name }).from(users),\n\t * db.select({ name: customers.name }).from(customers)\n\t * );\n\t * ```\n\t */\n\tunion = this.createSetOperator('union', false);\n\n\t/**\n\t * Adds `union all` set operator to the query.\n\t *\n\t * Calling this method will combine the result-set of the `select` statements and keep all duplicate rows that appear across them.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/set-operations#union-all}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all transaction ids from both online and in-store sales\n\t * await db.select({ transaction: onlineSales.transactionId })\n\t * .from(onlineSales)\n\t * .unionAll(\n\t * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)\n\t * );\n\t * // or\n\t * import { unionAll } from 'drizzle-orm/sqlite-core'\n\t *\n\t * await unionAll(\n\t * db.select({ transaction: onlineSales.transactionId }).from(onlineSales),\n\t * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)\n\t * );\n\t * ```\n\t */\n\tunionAll = this.createSetOperator('union', true);\n\n\t/**\n\t * Adds `intersect` set operator to the query.\n\t *\n\t * Calling this method will retain only the rows that are present in both result sets and eliminate duplicates.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/set-operations#intersect}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select course names that are offered in both departments A and B\n\t * await db.select({ courseName: depA.courseName })\n\t * .from(depA)\n\t * .intersect(\n\t * db.select({ courseName: depB.courseName }).from(depB)\n\t * );\n\t * // or\n\t * import { intersect } from 'drizzle-orm/sqlite-core'\n\t *\n\t * await intersect(\n\t * db.select({ courseName: depA.courseName }).from(depA),\n\t * db.select({ courseName: depB.courseName }).from(depB)\n\t * );\n\t * ```\n\t */\n\tintersect = this.createSetOperator('intersect', false);\n\n\t/**\n\t * Adds `except` set operator to the query.\n\t *\n\t * Calling this method will retrieve all unique rows from the left query, except for the rows that are present in the result set of the right query.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/set-operations#except}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all courses offered in department A but not in department B\n\t * await db.select({ courseName: depA.courseName })\n\t * .from(depA)\n\t * .except(\n\t * db.select({ courseName: depB.courseName }).from(depB)\n\t * );\n\t * // or\n\t * import { except } from 'drizzle-orm/sqlite-core'\n\t *\n\t * await except(\n\t * db.select({ courseName: depA.courseName }).from(depA),\n\t * db.select({ courseName: depB.courseName }).from(depB)\n\t * );\n\t * ```\n\t */\n\texcept = this.createSetOperator('except', false);\n\n\t/** @internal */\n\taddSetOperators(setOperators: SQLiteSelectConfig['setOperators']): SQLiteSelectWithout<\n\t\tthis,\n\t\tTDynamic,\n\t\tSQLiteSetOperatorExcludedMethods,\n\t\ttrue\n\t> {\n\t\tthis.config.setOperators.push(...setOperators);\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `where` clause to the query.\n\t *\n\t * Calling this method will select only those rows that fulfill a specified condition.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#filtering}\n\t *\n\t * @param where the `where` clause.\n\t *\n\t * @example\n\t * You can use conditional operators and `sql function` to filter the rows to be selected.\n\t *\n\t * ```ts\n\t * // Select all cars with green color\n\t * await db.select().from(cars).where(eq(cars.color, 'green'));\n\t * // or\n\t * await db.select().from(cars).where(sql`${cars.color} = 'green'`)\n\t * ```\n\t *\n\t * You can logically combine conditional operators with `and()` and `or()` operators:\n\t *\n\t * ```ts\n\t * // Select all BMW cars with a green color\n\t * await db.select().from(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW')));\n\t *\n\t * // Select all cars with the green or blue color\n\t * await db.select().from(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue')));\n\t * ```\n\t */\n\twhere(\n\t\twhere: ((aliases: TSelection) => SQL | undefined) | SQL | undefined,\n\t): SQLiteSelectWithout {\n\t\tif (typeof where === 'function') {\n\t\t\twhere = where(\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.fields,\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t) as TSelection,\n\t\t\t);\n\t\t}\n\t\tthis.config.where = where;\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `having` clause to the query.\n\t *\n\t * Calling this method will select only those rows that fulfill a specified condition. It is typically used with aggregate functions to filter the aggregated data based on a specified condition.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#aggregations}\n\t *\n\t * @param having the `having` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all brands with more than one car\n\t * await db.select({\n\t * \tbrand: cars.brand,\n\t * \tcount: sql`cast(count(${cars.id}) as int)`,\n\t * })\n\t * .from(cars)\n\t * .groupBy(cars.brand)\n\t * .having(({ count }) => gt(count, 1));\n\t * ```\n\t */\n\thaving(\n\t\thaving: ((aliases: this['_']['selection']) => SQL | undefined) | SQL | undefined,\n\t): SQLiteSelectWithout {\n\t\tif (typeof having === 'function') {\n\t\t\thaving = having(\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.fields,\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t) as TSelection,\n\t\t\t);\n\t\t}\n\t\tthis.config.having = having;\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `group by` clause to the query.\n\t *\n\t * Calling this method will group rows that have the same values into summary rows, often used for aggregation purposes.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#aggregations}\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Group and count people by their last names\n\t * await db.select({\n\t * lastName: people.lastName,\n\t * count: sql`cast(count(*) as int)`\n\t * })\n\t * .from(people)\n\t * .groupBy(people.lastName);\n\t * ```\n\t */\n\tgroupBy(\n\t\tbuilder: (aliases: this['_']['selection']) => ValueOrArray,\n\t): SQLiteSelectWithout;\n\tgroupBy(...columns: (SQLiteColumn | SQL)[]): SQLiteSelectWithout;\n\tgroupBy(\n\t\t...columns:\n\t\t\t| [(aliases: this['_']['selection']) => ValueOrArray]\n\t\t\t| (SQLiteColumn | SQL | SQL.Aliased)[]\n\t): SQLiteSelectWithout {\n\t\tif (typeof columns[0] === 'function') {\n\t\t\tconst groupBy = columns[0](\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.fields,\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'alias', sqlBehavior: 'sql' }),\n\t\t\t\t) as TSelection,\n\t\t\t);\n\t\t\tthis.config.groupBy = Array.isArray(groupBy) ? groupBy : [groupBy];\n\t\t} else {\n\t\t\tthis.config.groupBy = columns as (SQLiteColumn | SQL | SQL.Aliased)[];\n\t\t}\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds an `order by` clause to the query.\n\t *\n\t * Calling this method will sort the result-set in ascending or descending order. By default, the sort order is ascending.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#order-by}\n\t *\n\t * @example\n\t *\n\t * ```\n\t * // Select cars ordered by year\n\t * await db.select().from(cars).orderBy(cars.year);\n\t * ```\n\t *\n\t * You can specify whether results are in ascending or descending order with the `asc()` and `desc()` operators.\n\t *\n\t * ```ts\n\t * // Select cars ordered by year in descending order\n\t * await db.select().from(cars).orderBy(desc(cars.year));\n\t *\n\t * // Select cars ordered by year and price\n\t * await db.select().from(cars).orderBy(asc(cars.year), desc(cars.price));\n\t * ```\n\t */\n\torderBy(\n\t\tbuilder: (aliases: this['_']['selection']) => ValueOrArray,\n\t): SQLiteSelectWithout;\n\torderBy(...columns: (SQLiteColumn | SQL)[]): SQLiteSelectWithout;\n\torderBy(\n\t\t...columns:\n\t\t\t| [(aliases: this['_']['selection']) => ValueOrArray]\n\t\t\t| (SQLiteColumn | SQL | SQL.Aliased)[]\n\t): SQLiteSelectWithout {\n\t\tif (typeof columns[0] === 'function') {\n\t\t\tconst orderBy = columns[0](\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.fields,\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'alias', sqlBehavior: 'sql' }),\n\t\t\t\t) as TSelection,\n\t\t\t);\n\n\t\t\tconst orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy];\n\n\t\t\tif (this.config.setOperators.length > 0) {\n\t\t\t\tthis.config.setOperators.at(-1)!.orderBy = orderByArray;\n\t\t\t} else {\n\t\t\t\tthis.config.orderBy = orderByArray;\n\t\t\t}\n\t\t} else {\n\t\t\tconst orderByArray = columns as (SQLiteColumn | SQL | SQL.Aliased)[];\n\n\t\t\tif (this.config.setOperators.length > 0) {\n\t\t\t\tthis.config.setOperators.at(-1)!.orderBy = orderByArray;\n\t\t\t} else {\n\t\t\t\tthis.config.orderBy = orderByArray;\n\t\t\t}\n\t\t}\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `limit` clause to the query.\n\t *\n\t * Calling this method will set the maximum number of rows that will be returned by this query.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#limit--offset}\n\t *\n\t * @param limit the `limit` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Get the first 10 people from this query.\n\t * await db.select().from(people).limit(10);\n\t * ```\n\t */\n\tlimit(limit: number | Placeholder): SQLiteSelectWithout {\n\t\tif (this.config.setOperators.length > 0) {\n\t\t\tthis.config.setOperators.at(-1)!.limit = limit;\n\t\t} else {\n\t\t\tthis.config.limit = limit;\n\t\t}\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds an `offset` clause to the query.\n\t *\n\t * Calling this method will skip a number of rows when returning results from this query.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#limit--offset}\n\t *\n\t * @param offset the `offset` clause.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Get the 10th-20th people from this query.\n\t * await db.select().from(people).offset(10).limit(10);\n\t * ```\n\t */\n\toffset(offset: number | Placeholder): SQLiteSelectWithout {\n\t\tif (this.config.setOperators.length > 0) {\n\t\t\tthis.config.setOperators.at(-1)!.offset = offset;\n\t\t} else {\n\t\t\tthis.config.offset = offset;\n\t\t}\n\t\treturn this as any;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildSelectQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\tas(\n\t\talias: TAlias,\n\t): SubqueryWithSelection {\n\t\tconst usedTables: string[] = [];\n\t\tusedTables.push(...extractUsedTable(this.config.table));\n\t\tif (this.config.joins) { for (const it of this.config.joins) usedTables.push(...extractUsedTable(it.table)); }\n\n\t\treturn new Proxy(\n\t\t\tnew Subquery(this.getSQL(), this.config.fields, alias, false, [...new Set(usedTables)]),\n\t\t\tnew SelectionProxyHandler({ alias, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t) as SubqueryWithSelection;\n\t}\n\n\t/** @internal */\n\toverride getSelectedFields(): this['_']['selectedFields'] {\n\t\treturn new Proxy(\n\t\t\tthis.config.fields,\n\t\t\tnew SelectionProxyHandler({ alias: this.tableName, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t) as this['_']['selectedFields'];\n\t}\n\n\t$dynamic(): SQLiteSelectDynamic {\n\t\treturn this;\n\t}\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface SQLiteSelectBase<\n\tTTableName extends string | undefined,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTSelection extends ColumnsSelection,\n\tTSelectMode extends SelectMode = 'single',\n\tTNullabilityMap extends Record = TTableName extends string ? Record\n\t\t: {},\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n\tTResult extends any[] = SelectResult[],\n\tTSelectedFields extends ColumnsSelection = BuildSubquerySelection,\n> extends\n\tSQLiteSelectQueryBuilderBase<\n\t\tSQLiteSelectHKT,\n\t\tTTableName,\n\t\tTResultType,\n\t\tTRunResult,\n\t\tTSelection,\n\t\tTSelectMode,\n\t\tTNullabilityMap,\n\t\tTDynamic,\n\t\tTExcludedMethods,\n\t\tTResult,\n\t\tTSelectedFields\n\t>,\n\tQueryPromise\n{}\n\nexport class SQLiteSelectBase<\n\tTTableName extends string | undefined,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTSelection,\n\tTSelectMode extends SelectMode = 'single',\n\tTNullabilityMap extends Record = TTableName extends string ? Record\n\t\t: {},\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n\tTResult = SelectResult[],\n\tTSelectedFields extends ColumnsSelection = BuildSubquerySelection,\n> extends SQLiteSelectQueryBuilderBase<\n\tSQLiteSelectHKT,\n\tTTableName,\n\tTResultType,\n\tTRunResult,\n\tTSelection,\n\tTSelectMode,\n\tTNullabilityMap,\n\tTDynamic,\n\tTExcludedMethods,\n\tTResult,\n\tTSelectedFields\n> implements RunnableQuery, SQLWrapper {\n\tstatic override readonly [entityKind]: string = 'SQLiteSelect';\n\n\t/** @internal */\n\t_prepare(isOneTimeQuery = true): SQLiteSelectPrepare {\n\t\tif (!this.session) {\n\t\t\tthrow new Error('Cannot execute a query on a query builder. Please use a database instance instead.');\n\t\t}\n\t\tconst fieldsList = orderSelectedFields(this.config.fields);\n\t\tconst query = this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tthis.dialect.sqlToQuery(this.getSQL()),\n\t\t\tfieldsList,\n\t\t\t'all',\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\ttype: 'select',\n\t\t\t\ttables: [...this.usedTables],\n\t\t\t},\n\t\t\tthis.cacheConfig,\n\t\t);\n\t\tquery.joinsNotNullableMap = this.joinsNotNullableMap;\n\t\treturn query as ReturnType;\n\t}\n\n\t$withCache(config?: { config?: CacheConfig; tag?: string; autoInvalidate?: boolean } | false) {\n\t\tthis.cacheConfig = config === undefined\n\t\t\t? { config: {}, enable: true, autoInvalidate: true }\n\t\t\t: config === false\n\t\t\t? { enable: false }\n\t\t\t: { enable: true, autoInvalidate: true, ...config };\n\t\treturn this;\n\t}\n\n\tprepare(): SQLiteSelectPrepare {\n\t\treturn this._prepare(false);\n\t}\n\n\trun: ReturnType['run'] = (placeholderValues) => {\n\t\treturn this._prepare().run(placeholderValues);\n\t};\n\n\tall: ReturnType['all'] = (placeholderValues) => {\n\t\treturn this._prepare().all(placeholderValues);\n\t};\n\n\tget: ReturnType['get'] = (placeholderValues) => {\n\t\treturn this._prepare().get(placeholderValues);\n\t};\n\n\tvalues: ReturnType['values'] = (placeholderValues) => {\n\t\treturn this._prepare().values(placeholderValues);\n\t};\n\n\tasync execute(): Promise> {\n\t\treturn this.all() as SQLiteSelectExecute;\n\t}\n}\n\napplyMixins(SQLiteSelectBase, [QueryPromise]);\n\nfunction createSetOperator(type: SetOperator, isAll: boolean): SQLiteCreateSetOperatorFn {\n\treturn (leftSelect, rightSelect, ...restSelects) => {\n\t\tconst setOperators = [rightSelect, ...restSelects].map((select) => ({\n\t\t\ttype,\n\t\t\tisAll,\n\t\t\trightSelect: select as AnySQLiteSelect,\n\t\t}));\n\n\t\tfor (const setOperator of setOperators) {\n\t\t\tif (!haveSameKeys((leftSelect as any).getSelectedFields(), setOperator.rightSelect.getSelectedFields())) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'Set operator error (union / intersect / except): selected fields are not the same or are in a different order',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn (leftSelect as AnySQLiteSelect).addSetOperators(setOperators) as any;\n\t};\n}\n\nconst getSQLiteSetOperators = () => ({\n\tunion,\n\tunionAll,\n\tintersect,\n\texcept,\n});\n\n/**\n * Adds `union` set operator to the query.\n *\n * Calling this method will combine the result sets of the `select` statements and remove any duplicate rows that appear across them.\n *\n * See docs: {@link https://orm.drizzle.team/docs/set-operations#union}\n *\n * @example\n *\n * ```ts\n * // Select all unique names from customers and users tables\n * import { union } from 'drizzle-orm/sqlite-core'\n *\n * await union(\n * db.select({ name: users.name }).from(users),\n * db.select({ name: customers.name }).from(customers)\n * );\n * // or\n * await db.select({ name: users.name })\n * .from(users)\n * .union(\n * db.select({ name: customers.name }).from(customers)\n * );\n * ```\n */\nexport const union = createSetOperator('union', false);\n\n/**\n * Adds `union all` set operator to the query.\n *\n * Calling this method will combine the result-set of the `select` statements and keep all duplicate rows that appear across them.\n *\n * See docs: {@link https://orm.drizzle.team/docs/set-operations#union-all}\n *\n * @example\n *\n * ```ts\n * // Select all transaction ids from both online and in-store sales\n * import { unionAll } from 'drizzle-orm/sqlite-core'\n *\n * await unionAll(\n * db.select({ transaction: onlineSales.transactionId }).from(onlineSales),\n * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)\n * );\n * // or\n * await db.select({ transaction: onlineSales.transactionId })\n * .from(onlineSales)\n * .unionAll(\n * db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)\n * );\n * ```\n */\nexport const unionAll = createSetOperator('union', true);\n\n/**\n * Adds `intersect` set operator to the query.\n *\n * Calling this method will retain only the rows that are present in both result sets and eliminate duplicates.\n *\n * See docs: {@link https://orm.drizzle.team/docs/set-operations#intersect}\n *\n * @example\n *\n * ```ts\n * // Select course names that are offered in both departments A and B\n * import { intersect } from 'drizzle-orm/sqlite-core'\n *\n * await intersect(\n * db.select({ courseName: depA.courseName }).from(depA),\n * db.select({ courseName: depB.courseName }).from(depB)\n * );\n * // or\n * await db.select({ courseName: depA.courseName })\n * .from(depA)\n * .intersect(\n * db.select({ courseName: depB.courseName }).from(depB)\n * );\n * ```\n */\nexport const intersect = createSetOperator('intersect', false);\n\n/**\n * Adds `except` set operator to the query.\n *\n * Calling this method will retrieve all unique rows from the left query, except for the rows that are present in the result set of the right query.\n *\n * See docs: {@link https://orm.drizzle.team/docs/set-operations#except}\n *\n * @example\n *\n * ```ts\n * // Select all courses offered in department A but not in department B\n * import { except } from 'drizzle-orm/sqlite-core'\n *\n * await except(\n * db.select({ courseName: depA.courseName }).from(depA),\n * db.select({ courseName: depB.courseName }).from(depB)\n * );\n * // or\n * await db.select({ courseName: depA.courseName })\n * .from(depA)\n * .except(\n * db.select({ courseName: depB.courseName }).from(depB)\n * );\n * ```\n */\nexport const except = createSetOperator('except', false);\n", "import { entityKind, is } from '~/entity.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { ColumnsSelection, SQL } from '~/sql/sql.ts';\nimport type { SQLiteDialectConfig } from '~/sqlite-core/dialect.ts';\nimport { SQLiteDialect, SQLiteSyncDialect } from '~/sqlite-core/dialect.ts';\nimport type { WithBuilder } from '~/sqlite-core/subquery.ts';\nimport { WithSubquery } from '~/subquery.ts';\nimport { SQLiteSelectBuilder } from './select.ts';\nimport type { SelectedFields } from './select.types.ts';\n\nexport class QueryBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteQueryBuilder';\n\n\tprivate dialect: SQLiteDialect | undefined;\n\tprivate dialectConfig: SQLiteDialectConfig | undefined;\n\n\tconstructor(dialect?: SQLiteDialect | SQLiteDialectConfig) {\n\t\tthis.dialect = is(dialect, SQLiteDialect) ? dialect : undefined;\n\t\tthis.dialectConfig = is(dialect, SQLiteDialect) ? undefined : dialect;\n\t}\n\n\t$with: WithBuilder = (alias: string, selection?: ColumnsSelection) => {\n\t\tconst queryBuilder = this;\n\t\tconst as = (\n\t\t\tqb:\n\t\t\t\t| TypedQueryBuilder\n\t\t\t\t| SQL\n\t\t\t\t| ((qb: QueryBuilder) => TypedQueryBuilder | SQL),\n\t\t) => {\n\t\t\tif (typeof qb === 'function') {\n\t\t\t\tqb = qb(queryBuilder);\n\t\t\t}\n\n\t\t\treturn new Proxy(\n\t\t\t\tnew WithSubquery(\n\t\t\t\t\tqb.getSQL(),\n\t\t\t\t\tselection ?? ('getSelectedFields' in qb ? qb.getSelectedFields() ?? {} : {}) as SelectedFields,\n\t\t\t\t\talias,\n\t\t\t\t\ttrue,\n\t\t\t\t),\n\t\t\t\tnew SelectionProxyHandler({ alias, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t\t) as any;\n\t\t};\n\t\treturn { as };\n\t};\n\n\twith(...queries: WithSubquery[]) {\n\t\tconst self = this;\n\n\t\tfunction select(): SQLiteSelectBuilder;\n\t\tfunction select(\n\t\t\tfields: TSelection,\n\t\t): SQLiteSelectBuilder;\n\t\tfunction select(\n\t\t\tfields?: TSelection,\n\t\t): SQLiteSelectBuilder {\n\t\t\treturn new SQLiteSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: undefined,\n\t\t\t\tdialect: self.getDialect(),\n\t\t\t\twithList: queries,\n\t\t\t});\n\t\t}\n\n\t\tfunction selectDistinct(): SQLiteSelectBuilder;\n\t\tfunction selectDistinct(\n\t\t\tfields: TSelection,\n\t\t): SQLiteSelectBuilder;\n\t\tfunction selectDistinct(\n\t\t\tfields?: TSelection,\n\t\t): SQLiteSelectBuilder {\n\t\t\treturn new SQLiteSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: undefined,\n\t\t\t\tdialect: self.getDialect(),\n\t\t\t\twithList: queries,\n\t\t\t\tdistinct: true,\n\t\t\t});\n\t\t}\n\n\t\treturn { select, selectDistinct };\n\t}\n\n\tselect(): SQLiteSelectBuilder;\n\tselect(\n\t\tfields: TSelection,\n\t): SQLiteSelectBuilder;\n\tselect(\n\t\tfields?: TSelection,\n\t): SQLiteSelectBuilder {\n\t\treturn new SQLiteSelectBuilder({ fields: fields ?? undefined, session: undefined, dialect: this.getDialect() });\n\t}\n\n\tselectDistinct(): SQLiteSelectBuilder;\n\tselectDistinct(\n\t\tfields: TSelection,\n\t): SQLiteSelectBuilder;\n\tselectDistinct(\n\t\tfields?: TSelection,\n\t): SQLiteSelectBuilder {\n\t\treturn new SQLiteSelectBuilder({\n\t\t\tfields: fields ?? undefined,\n\t\t\tsession: undefined,\n\t\t\tdialect: this.getDialect(),\n\t\t\tdistinct: true,\n\t\t});\n\t}\n\n\t// Lazy load dialect to avoid circular dependency\n\tprivate getDialect() {\n\t\tif (!this.dialect) {\n\t\t\tthis.dialect = new SQLiteSyncDialect(this.dialectConfig);\n\t\t}\n\n\t\treturn this.dialect;\n\t}\n}\n", "import { entityKind, is } from '~/entity.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type { SelectResultFields } from '~/query-builders/select.types.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { Placeholder, Query, SQLWrapper } from '~/sql/sql.ts';\nimport { Param, SQL, sql } from '~/sql/sql.ts';\nimport type { SQLiteDialect } from '~/sqlite-core/dialect.ts';\nimport type { IndexColumn } from '~/sqlite-core/indexes.ts';\nimport type { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/session.ts';\nimport { SQLiteTable } from '~/sqlite-core/table.ts';\nimport type { Subquery } from '~/subquery.ts';\nimport { Columns, Table } from '~/table.ts';\nimport { type DrizzleTypeError, haveSameKeys, mapUpdateSet, orderSelectedFields, type Simplify } from '~/utils.ts';\nimport type { AnySQLiteColumn, SQLiteColumn } from '../columns/common.ts';\nimport { extractUsedTable } from '../utils.ts';\nimport { QueryBuilder } from './query-builder.ts';\nimport type { SelectedFieldsFlat, SelectedFieldsOrdered } from './select.types.ts';\nimport type { SQLiteUpdateSetSource } from './update.ts';\n\nexport interface SQLiteInsertConfig {\n\ttable: TTable;\n\tvalues: Record[] | SQLiteInsertSelectQueryBuilder | SQL;\n\twithList?: Subquery[];\n\tonConflict?: SQL[];\n\treturning?: SelectedFieldsOrdered;\n\tselect?: boolean;\n}\n\nexport type SQLiteInsertValue = Simplify<\n\t{\n\t\t[Key in keyof TTable['$inferInsert']]: TTable['$inferInsert'][Key] | SQL | Placeholder;\n\t}\n>;\n\nexport type SQLiteInsertSelectQueryBuilder = TypedQueryBuilder<\n\t{ [K in keyof TTable['$inferInsert']]: AnySQLiteColumn | SQL | SQL.Aliased | TTable['$inferInsert'][K] }\n>;\n\nexport class SQLiteInsertBuilder<\n\tTTable extends SQLiteTable,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteInsertBuilder';\n\n\tconstructor(\n\t\tprotected table: TTable,\n\t\tprotected session: SQLiteSession,\n\t\tprotected dialect: SQLiteDialect,\n\t\tprivate withList?: Subquery[],\n\t) {}\n\n\tvalues(value: SQLiteInsertValue): SQLiteInsertBase;\n\tvalues(values: SQLiteInsertValue[]): SQLiteInsertBase;\n\tvalues(\n\t\tvalues: SQLiteInsertValue | SQLiteInsertValue[],\n\t): SQLiteInsertBase {\n\t\tvalues = Array.isArray(values) ? values : [values];\n\t\tif (values.length === 0) {\n\t\t\tthrow new Error('values() must be called with at least one value');\n\t\t}\n\t\tconst mappedValues = values.map((entry) => {\n\t\t\tconst result: Record = {};\n\t\t\tconst cols = this.table[Table.Symbol.Columns];\n\t\t\tfor (const colKey of Object.keys(entry)) {\n\t\t\t\tconst colValue = entry[colKey as keyof typeof entry];\n\t\t\t\tresult[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]);\n\t\t\t}\n\t\t\treturn result;\n\t\t});\n\n\t\t// if (mappedValues.length > 1 && mappedValues.some((t) => Object.keys(t).length === 0)) {\n\t\t// \tthrow new Error(\n\t\t// \t\t`One of the values you want to insert is empty. In SQLite you can insert only one empty object per statement. For this case Drizzle with use \"INSERT INTO ... DEFAULT VALUES\" syntax`,\n\t\t// \t);\n\t\t// }\n\n\t\treturn new SQLiteInsertBase(this.table, mappedValues, this.session, this.dialect, this.withList);\n\t}\n\n\tselect(\n\t\tselectQuery: (qb: QueryBuilder) => SQLiteInsertSelectQueryBuilder,\n\t): SQLiteInsertBase;\n\tselect(selectQuery: (qb: QueryBuilder) => SQL): SQLiteInsertBase;\n\tselect(selectQuery: SQL): SQLiteInsertBase;\n\tselect(selectQuery: SQLiteInsertSelectQueryBuilder): SQLiteInsertBase;\n\tselect(\n\t\tselectQuery:\n\t\t\t| SQL\n\t\t\t| SQLiteInsertSelectQueryBuilder\n\t\t\t| ((qb: QueryBuilder) => SQLiteInsertSelectQueryBuilder | SQL),\n\t): SQLiteInsertBase {\n\t\tconst select = typeof selectQuery === 'function' ? selectQuery(new QueryBuilder()) : selectQuery;\n\n\t\tif (\n\t\t\t!is(select, SQL)\n\t\t\t&& !haveSameKeys(this.table[Columns], select._.selectedFields)\n\t\t) {\n\t\t\tthrow new Error(\n\t\t\t\t'Insert select error: selected fields are not the same or are in a different order compared to the table definition',\n\t\t\t);\n\t\t}\n\n\t\treturn new SQLiteInsertBase(this.table, select, this.session, this.dialect, this.withList, true);\n\t}\n}\n\nexport type SQLiteInsertWithout =\n\tTDynamic extends true ? T\n\t\t: Omit<\n\t\t\tSQLiteInsertBase<\n\t\t\t\tT['_']['table'],\n\t\t\t\tT['_']['resultType'],\n\t\t\t\tT['_']['runResult'],\n\t\t\t\tT['_']['returning'],\n\t\t\t\tTDynamic,\n\t\t\t\tT['_']['excludedMethods'] | K\n\t\t\t>,\n\t\t\tT['_']['excludedMethods'] | K\n\t\t>;\n\nexport type SQLiteInsertReturning<\n\tT extends AnySQLiteInsert,\n\tTDynamic extends boolean,\n\tTSelectedFields extends SelectedFieldsFlat,\n> = SQLiteInsertWithout<\n\tSQLiteInsertBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tSelectResultFields,\n\t\tTDynamic,\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteInsertReturningAll<\n\tT extends AnySQLiteInsert,\n\tTDynamic extends boolean,\n> = SQLiteInsertWithout<\n\tSQLiteInsertBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['table']['$inferSelect'],\n\t\tTDynamic,\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteInsertOnConflictDoUpdateConfig = {\n\ttarget: IndexColumn | IndexColumn[];\n\t/** @deprecated - use either `targetWhere` or `setWhere` */\n\twhere?: SQL;\n\t// TODO: add tests for targetWhere and setWhere\n\ttargetWhere?: SQL;\n\tsetWhere?: SQL;\n\tset: SQLiteUpdateSetSource;\n};\n\nexport type SQLiteInsertDynamic = SQLiteInsert<\n\tT['_']['table'],\n\tT['_']['resultType'],\n\tT['_']['runResult'],\n\tT['_']['returning']\n>;\n\nexport type SQLiteInsertExecute = T['_']['returning'] extends undefined ? T['_']['runResult']\n\t: T['_']['returning'][];\n\nexport type SQLiteInsertPrepare = SQLitePreparedQuery<\n\t{\n\t\ttype: T['_']['resultType'];\n\t\trun: T['_']['runResult'];\n\t\tall: T['_']['returning'] extends undefined ? DrizzleTypeError<'.all() cannot be used without .returning()'>\n\t\t\t: T['_']['returning'][];\n\t\tget: T['_']['returning'] extends undefined ? DrizzleTypeError<'.get() cannot be used without .returning()'>\n\t\t\t: T['_']['returning'];\n\t\tvalues: T['_']['returning'] extends undefined ? DrizzleTypeError<'.values() cannot be used without .returning()'>\n\t\t\t: any[][];\n\t\texecute: SQLiteInsertExecute;\n\t}\n>;\n\nexport type AnySQLiteInsert = SQLiteInsertBase;\n\nexport type SQLiteInsert<\n\tTTable extends SQLiteTable = SQLiteTable,\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = unknown,\n\tTReturning = any,\n> = SQLiteInsertBase;\n\nexport interface SQLiteInsertBase<\n\tTTable extends SQLiteTable,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTReturning = undefined,\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n> extends\n\tSQLWrapper,\n\tQueryPromise,\n\tRunnableQuery\n{\n\treadonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly table: TTable;\n\t\treadonly resultType: TResultType;\n\t\treadonly runResult: TRunResult;\n\t\treadonly returning: TReturning;\n\t\treadonly dynamic: TDynamic;\n\t\treadonly excludedMethods: TExcludedMethods;\n\t\treadonly result: TReturning extends undefined ? TRunResult : TReturning[];\n\t};\n}\n\nexport class SQLiteInsertBase<\n\tTTable extends SQLiteTable,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTReturning = undefined,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTDynamic extends boolean = false,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTExcludedMethods extends string = never,\n> extends QueryPromise\n\timplements RunnableQuery, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteInsert';\n\n\t/** @internal */\n\tconfig: SQLiteInsertConfig;\n\n\tconstructor(\n\t\ttable: TTable,\n\t\tvalues: SQLiteInsertConfig['values'],\n\t\tprivate session: SQLiteSession,\n\t\tprivate dialect: SQLiteDialect,\n\t\twithList?: Subquery[],\n\t\tselect?: boolean,\n\t) {\n\t\tsuper();\n\t\tthis.config = { table, values: values as any, withList, select };\n\t}\n\n\t/**\n\t * Adds a `returning` clause to the query.\n\t *\n\t * Calling this method will return the specified fields of the inserted rows. If no fields are specified, all fields will be returned.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/insert#insert-returning}\n\t *\n\t * @example\n\t * ```ts\n\t * // Insert one row and return all fields\n\t * const insertedCar: Car[] = await db.insert(cars)\n\t * .values({ brand: 'BMW' })\n\t * .returning();\n\t *\n\t * // Insert one row and return only the id\n\t * const insertedCarId: { id: number }[] = await db.insert(cars)\n\t * .values({ brand: 'BMW' })\n\t * .returning({ id: cars.id });\n\t * ```\n\t */\n\treturning(): SQLiteInsertReturningAll;\n\treturning(\n\t\tfields: TSelectedFields,\n\t): SQLiteInsertReturning;\n\treturning(\n\t\tfields: SelectedFieldsFlat = this.config.table[SQLiteTable.Symbol.Columns],\n\t): SQLiteInsertWithout {\n\t\tthis.config.returning = orderSelectedFields(fields);\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds an `on conflict do nothing` clause to the query.\n\t *\n\t * Calling this method simply avoids inserting a row as its alternative action.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/insert#on-conflict-do-nothing}\n\t *\n\t * @param config The `target` and `where` clauses.\n\t *\n\t * @example\n\t * ```ts\n\t * // Insert one row and cancel the insert if there's a conflict\n\t * await db.insert(cars)\n\t * .values({ id: 1, brand: 'BMW' })\n\t * .onConflictDoNothing();\n\t *\n\t * // Explicitly specify conflict target\n\t * await db.insert(cars)\n\t * .values({ id: 1, brand: 'BMW' })\n\t * .onConflictDoNothing({ target: cars.id });\n\t * ```\n\t */\n\tonConflictDoNothing(config: { target?: IndexColumn | IndexColumn[]; where?: SQL } = {}): this {\n\t\tif (!this.config.onConflict) this.config.onConflict = [];\n\n\t\tif (config.target === undefined) {\n\t\t\tthis.config.onConflict.push(sql` on conflict do nothing`);\n\t\t} else {\n\t\t\tconst targetSql = Array.isArray(config.target) ? sql`${config.target}` : sql`${[config.target]}`;\n\t\t\tconst whereSql = config.where ? sql` where ${config.where}` : sql``;\n\t\t\tthis.config.onConflict.push(sql` on conflict ${targetSql} do nothing${whereSql}`);\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds an `on conflict do update` clause to the query.\n\t *\n\t * Calling this method will update the existing row that conflicts with the row proposed for insertion as its alternative action.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/insert#upserts-and-conflicts}\n\t *\n\t * @param config The `target`, `set` and `where` clauses.\n\t *\n\t * @example\n\t * ```ts\n\t * // Update the row if there's a conflict\n\t * await db.insert(cars)\n\t * .values({ id: 1, brand: 'BMW' })\n\t * .onConflictDoUpdate({\n\t * target: cars.id,\n\t * set: { brand: 'Porsche' }\n\t * });\n\t *\n\t * // Upsert with 'where' clause\n\t * await db.insert(cars)\n\t * .values({ id: 1, brand: 'BMW' })\n\t * .onConflictDoUpdate({\n\t * target: cars.id,\n\t * set: { brand: 'newBMW' },\n\t * where: sql`${cars.createdAt} > '2023-01-01'::date`,\n\t * });\n\t * ```\n\t */\n\tonConflictDoUpdate(config: SQLiteInsertOnConflictDoUpdateConfig): this {\n\t\tif (config.where && (config.targetWhere || config.setWhere)) {\n\t\t\tthrow new Error(\n\t\t\t\t'You cannot use both \"where\" and \"targetWhere\"/\"setWhere\" at the same time - \"where\" is deprecated, use \"targetWhere\" or \"setWhere\" instead.',\n\t\t\t);\n\t\t}\n\n\t\tif (!this.config.onConflict) this.config.onConflict = [];\n\n\t\tconst whereSql = config.where ? sql` where ${config.where}` : undefined;\n\t\tconst targetWhereSql = config.targetWhere ? sql` where ${config.targetWhere}` : undefined;\n\t\tconst setWhereSql = config.setWhere ? sql` where ${config.setWhere}` : undefined;\n\t\tconst targetSql = Array.isArray(config.target) ? sql`${config.target}` : sql`${[config.target]}`;\n\t\tconst setSql = this.dialect.buildUpdateSet(this.config.table, mapUpdateSet(this.config.table, config.set));\n\t\tthis.config.onConflict.push(\n\t\t\tsql` on conflict ${targetSql}${targetWhereSql} do update set ${setSql}${whereSql}${setWhereSql}`,\n\t\t);\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildInsertQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\t/** @internal */\n\t_prepare(isOneTimeQuery = true): SQLiteInsertPrepare {\n\t\treturn this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tthis.dialect.sqlToQuery(this.getSQL()),\n\t\t\tthis.config.returning,\n\t\t\tthis.config.returning ? 'all' : 'run',\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\ttype: 'insert',\n\t\t\t\ttables: extractUsedTable(this.config.table),\n\t\t\t},\n\t\t) as SQLiteInsertPrepare;\n\t}\n\n\tprepare(): SQLiteInsertPrepare {\n\t\treturn this._prepare(false);\n\t}\n\n\trun: ReturnType['run'] = (placeholderValues) => {\n\t\treturn this._prepare().run(placeholderValues);\n\t};\n\n\tall: ReturnType['all'] = (placeholderValues) => {\n\t\treturn this._prepare().all(placeholderValues);\n\t};\n\n\tget: ReturnType['get'] = (placeholderValues) => {\n\t\treturn this._prepare().get(placeholderValues);\n\t};\n\n\tvalues: ReturnType['values'] = (placeholderValues) => {\n\t\treturn this._prepare().values(placeholderValues);\n\t};\n\n\toverride async execute(): Promise> {\n\t\treturn (this.config.returning ? this.all() : this.run()) as SQLiteInsertExecute;\n\t}\n\n\t$dynamic(): SQLiteInsertDynamic {\n\t\treturn this as any;\n\t}\n}\n", "//# sourceMappingURL=select.types.js.map", "import type { GetColumnData } from '~/column.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport type { JoinType, SelectResultFields } from '~/query-builders/select.types.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { Placeholder, Query, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteDialect } from '~/sqlite-core/dialect.ts';\nimport type { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/session.ts';\nimport { SQLiteTable } from '~/sqlite-core/table.ts';\nimport { Subquery } from '~/subquery.ts';\nimport { Table } from '~/table.ts';\nimport {\n\ttype DrizzleTypeError,\n\tgetTableLikeName,\n\tmapUpdateSet,\n\torderSelectedFields,\n\ttype UpdateSet,\n\ttype ValueOrArray,\n} from '~/utils.ts';\nimport { ViewBaseConfig } from '~/view-common.ts';\nimport type { SQLiteColumn } from '../columns/common.ts';\nimport { extractUsedTable } from '../utils.ts';\nimport { SQLiteViewBase } from '../view-base.ts';\nimport type { SelectedFields, SelectedFieldsOrdered, SQLiteSelectJoinConfig } from './select.types.ts';\n\nexport interface SQLiteUpdateConfig {\n\twhere?: SQL | undefined;\n\tlimit?: number | Placeholder;\n\torderBy?: (SQLiteColumn | SQL | SQL.Aliased)[];\n\tset: UpdateSet;\n\ttable: SQLiteTable;\n\tfrom?: SQLiteTable | Subquery | SQLiteViewBase | SQL;\n\tjoins: SQLiteSelectJoinConfig[];\n\treturning?: SelectedFieldsOrdered;\n\twithList?: Subquery[];\n}\n\nexport type SQLiteUpdateSetSource =\n\t& {\n\t\t[Key in keyof TTable['$inferInsert']]?:\n\t\t\t| GetColumnData\n\t\t\t| SQL\n\t\t\t| SQLiteColumn\n\t\t\t| undefined;\n\t}\n\t& {};\n\nexport class SQLiteUpdateBuilder<\n\tTTable extends SQLiteTable,\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteUpdateBuilder';\n\n\tdeclare readonly _: {\n\t\treadonly table: TTable;\n\t};\n\n\tconstructor(\n\t\tprotected table: TTable,\n\t\tprotected session: SQLiteSession,\n\t\tprotected dialect: SQLiteDialect,\n\t\tprivate withList?: Subquery[],\n\t) {}\n\n\tset(\n\t\tvalues: SQLiteUpdateSetSource,\n\t): SQLiteUpdateWithout<\n\t\tSQLiteUpdateBase,\n\t\tfalse,\n\t\t'leftJoin' | 'rightJoin' | 'innerJoin' | 'fullJoin'\n\t> {\n\t\treturn new SQLiteUpdateBase(\n\t\t\tthis.table,\n\t\t\tmapUpdateSet(this.table, values),\n\t\t\tthis.session,\n\t\t\tthis.dialect,\n\t\t\tthis.withList,\n\t\t) as any;\n\t}\n}\n\nexport type SQLiteUpdateWithout<\n\tT extends AnySQLiteUpdate,\n\tTDynamic extends boolean,\n\tK extends keyof T & string,\n> = TDynamic extends true ? T : Omit<\n\tSQLiteUpdateBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['from'],\n\t\tT['_']['returning'],\n\t\tTDynamic,\n\t\tT['_']['excludedMethods'] | K\n\t>,\n\tT['_']['excludedMethods'] | K\n>;\n\nexport type SQLiteUpdateWithJoins<\n\tT extends AnySQLiteUpdate,\n\tTDynamic extends boolean,\n\tTFrom extends SQLiteTable | Subquery | SQLiteViewBase | SQL,\n> = TDynamic extends true ? T : Omit<\n\tSQLiteUpdateBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tTFrom,\n\t\tT['_']['returning'],\n\t\tTDynamic,\n\t\tExclude\n\t>,\n\tExclude\n>;\n\nexport type SQLiteUpdateReturningAll = SQLiteUpdateWithout<\n\tSQLiteUpdateBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['from'],\n\t\tT['_']['table']['$inferSelect'],\n\t\tTDynamic,\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteUpdateReturning<\n\tT extends AnySQLiteUpdate,\n\tTDynamic extends boolean,\n\tTSelectedFields extends SelectedFields,\n> = SQLiteUpdateWithout<\n\tSQLiteUpdateBase<\n\t\tT['_']['table'],\n\t\tT['_']['resultType'],\n\t\tT['_']['runResult'],\n\t\tT['_']['from'],\n\t\tSelectResultFields,\n\t\tTDynamic,\n\t\tT['_']['excludedMethods']\n\t>,\n\tTDynamic,\n\t'returning'\n>;\n\nexport type SQLiteUpdateExecute = T['_']['returning'] extends undefined ? T['_']['runResult']\n\t: T['_']['returning'][];\n\nexport type SQLiteUpdatePrepare = SQLitePreparedQuery<\n\t{\n\t\ttype: T['_']['resultType'];\n\t\trun: T['_']['runResult'];\n\t\tall: T['_']['returning'] extends undefined ? DrizzleTypeError<'.all() cannot be used without .returning()'>\n\t\t\t: T['_']['returning'][];\n\t\tget: T['_']['returning'] extends undefined ? DrizzleTypeError<'.get() cannot be used without .returning()'>\n\t\t\t: T['_']['returning'];\n\t\tvalues: T['_']['returning'] extends undefined ? DrizzleTypeError<'.values() cannot be used without .returning()'>\n\t\t\t: any[][];\n\t\texecute: SQLiteUpdateExecute;\n\t}\n>;\n\nexport type SQLiteUpdateJoinFn<\n\tT extends AnySQLiteUpdate,\n> = <\n\tTJoinedTable extends SQLiteTable | Subquery | SQLiteViewBase | SQL,\n>(\n\ttable: TJoinedTable,\n\ton:\n\t\t| (\n\t\t\t(\n\t\t\t\tupdateTable: T['_']['table']['_']['columns'],\n\t\t\t\tfrom: T['_']['from'] extends SQLiteTable ? T['_']['from']['_']['columns']\n\t\t\t\t\t: T['_']['from'] extends Subquery | SQLiteViewBase ? T['_']['from']['_']['selectedFields']\n\t\t\t\t\t: never,\n\t\t\t) => SQL | undefined\n\t\t)\n\t\t| SQL\n\t\t| undefined,\n) => T;\n\nexport type SQLiteUpdateDynamic = SQLiteUpdate<\n\tT['_']['table'],\n\tT['_']['resultType'],\n\tT['_']['runResult'],\n\tT['_']['returning']\n>;\n\nexport type SQLiteUpdate<\n\tTTable extends SQLiteTable = SQLiteTable,\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = any,\n\tTFrom extends SQLiteTable | Subquery | SQLiteViewBase | SQL | undefined = undefined,\n\tTReturning extends Record | undefined = Record | undefined,\n> = SQLiteUpdateBase;\n\nexport type AnySQLiteUpdate = SQLiteUpdateBase;\n\nexport interface SQLiteUpdateBase<\n\tTTable extends SQLiteTable = SQLiteTable,\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = unknown,\n\tTFrom extends SQLiteTable | Subquery | SQLiteViewBase | SQL | undefined = undefined,\n\tTReturning = undefined,\n\tTDynamic extends boolean = false,\n\tTExcludedMethods extends string = never,\n> extends SQLWrapper, QueryPromise {\n\treadonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly table: TTable;\n\t\treadonly resultType: TResultType;\n\t\treadonly runResult: TRunResult;\n\t\treadonly from: TFrom;\n\t\treadonly returning: TReturning;\n\t\treadonly dynamic: TDynamic;\n\t\treadonly excludedMethods: TExcludedMethods;\n\t\treadonly result: TReturning extends undefined ? TRunResult : TReturning[];\n\t};\n}\n\nexport class SQLiteUpdateBase<\n\tTTable extends SQLiteTable = SQLiteTable,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTResultType extends 'sync' | 'async' = 'sync' | 'async',\n\tTRunResult = unknown,\n\tTFrom extends SQLiteTable | Subquery | SQLiteViewBase | SQL | undefined = undefined,\n\tTReturning = undefined,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTDynamic extends boolean = false,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tTExcludedMethods extends string = never,\n> extends QueryPromise\n\timplements RunnableQuery, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteUpdate';\n\n\t/** @internal */\n\tconfig: SQLiteUpdateConfig;\n\n\tconstructor(\n\t\ttable: TTable,\n\t\tset: UpdateSet,\n\t\tprivate session: SQLiteSession,\n\t\tprivate dialect: SQLiteDialect,\n\t\twithList?: Subquery[],\n\t) {\n\t\tsuper();\n\t\tthis.config = { set, table, withList, joins: [] };\n\t}\n\n\tfrom(\n\t\tsource: TFrom,\n\t): SQLiteUpdateWithJoins {\n\t\tthis.config.from = source;\n\t\treturn this as any;\n\t}\n\n\tprivate createJoin(\n\t\tjoinType: TJoinType,\n\t): SQLiteUpdateJoinFn {\n\t\treturn ((\n\t\t\ttable: SQLiteTable | Subquery | SQLiteViewBase | SQL,\n\t\t\ton: ((updateTable: TTable, from: TFrom) => SQL | undefined) | SQL | undefined,\n\t\t) => {\n\t\t\tconst tableName = getTableLikeName(table);\n\n\t\t\tif (typeof tableName === 'string' && this.config.joins.some((join) => join.alias === tableName)) {\n\t\t\t\tthrow new Error(`Alias \"${tableName}\" is already used in this query`);\n\t\t\t}\n\n\t\t\tif (typeof on === 'function') {\n\t\t\t\tconst from = this.config.from\n\t\t\t\t\t? is(table, SQLiteTable)\n\t\t\t\t\t\t? table[Table.Symbol.Columns]\n\t\t\t\t\t\t: is(table, Subquery)\n\t\t\t\t\t\t? table._.selectedFields\n\t\t\t\t\t\t: is(table, SQLiteViewBase)\n\t\t\t\t\t\t? table[ViewBaseConfig].selectedFields\n\t\t\t\t\t\t: undefined\n\t\t\t\t\t: undefined;\n\t\t\t\ton = on(\n\t\t\t\t\tnew Proxy(\n\t\t\t\t\t\tthis.config.table[Table.Symbol.Columns],\n\t\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t\t) as any,\n\t\t\t\t\tfrom && new Proxy(\n\t\t\t\t\t\tfrom,\n\t\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'sql', sqlBehavior: 'sql' }),\n\t\t\t\t\t) as any,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.config.joins.push({ on, table, joinType, alias: tableName });\n\n\t\t\treturn this as any;\n\t\t}) as any;\n\t}\n\n\tleftJoin = this.createJoin('left');\n\n\trightJoin = this.createJoin('right');\n\n\tinnerJoin = this.createJoin('inner');\n\n\tfullJoin = this.createJoin('full');\n\n\t/**\n\t * Adds a 'where' clause to the query.\n\t *\n\t * Calling this method will update only those rows that fulfill a specified condition.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/update}\n\t *\n\t * @param where the 'where' clause.\n\t *\n\t * @example\n\t * You can use conditional operators and `sql function` to filter the rows to be updated.\n\t *\n\t * ```ts\n\t * // Update all cars with green color\n\t * db.update(cars).set({ color: 'red' })\n\t * .where(eq(cars.color, 'green'));\n\t * // or\n\t * db.update(cars).set({ color: 'red' })\n\t * .where(sql`${cars.color} = 'green'`)\n\t * ```\n\t *\n\t * You can logically combine conditional operators with `and()` and `or()` operators:\n\t *\n\t * ```ts\n\t * // Update all BMW cars with a green color\n\t * db.update(cars).set({ color: 'red' })\n\t * .where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW')));\n\t *\n\t * // Update all cars with the green or blue color\n\t * db.update(cars).set({ color: 'red' })\n\t * .where(or(eq(cars.color, 'green'), eq(cars.color, 'blue')));\n\t * ```\n\t */\n\twhere(where: SQL | undefined): SQLiteUpdateWithout {\n\t\tthis.config.where = where;\n\t\treturn this as any;\n\t}\n\n\torderBy(\n\t\tbuilder: (updateTable: TTable) => ValueOrArray,\n\t): SQLiteUpdateWithout;\n\torderBy(...columns: (SQLiteColumn | SQL | SQL.Aliased)[]): SQLiteUpdateWithout;\n\torderBy(\n\t\t...columns:\n\t\t\t| [(updateTable: TTable) => ValueOrArray]\n\t\t\t| (SQLiteColumn | SQL | SQL.Aliased)[]\n\t): SQLiteUpdateWithout {\n\t\tif (typeof columns[0] === 'function') {\n\t\t\tconst orderBy = columns[0](\n\t\t\t\tnew Proxy(\n\t\t\t\t\tthis.config.table[Table.Symbol.Columns],\n\t\t\t\t\tnew SelectionProxyHandler({ sqlAliasedBehavior: 'alias', sqlBehavior: 'sql' }),\n\t\t\t\t) as any,\n\t\t\t);\n\n\t\t\tconst orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy];\n\t\t\tthis.config.orderBy = orderByArray;\n\t\t} else {\n\t\t\tconst orderByArray = columns as (SQLiteColumn | SQL | SQL.Aliased)[];\n\t\t\tthis.config.orderBy = orderByArray;\n\t\t}\n\t\treturn this as any;\n\t}\n\n\tlimit(limit: number | Placeholder): SQLiteUpdateWithout {\n\t\tthis.config.limit = limit;\n\t\treturn this as any;\n\t}\n\n\t/**\n\t * Adds a `returning` clause to the query.\n\t *\n\t * Calling this method will return the specified fields of the updated rows. If no fields are specified, all fields will be returned.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/update#update-with-returning}\n\t *\n\t * @example\n\t * ```ts\n\t * // Update all cars with the green color and return all fields\n\t * const updatedCars: Car[] = await db.update(cars)\n\t * .set({ color: 'red' })\n\t * .where(eq(cars.color, 'green'))\n\t * .returning();\n\t *\n\t * // Update all cars with the green color and return only their id and brand fields\n\t * const updatedCarsIdsAndBrands: { id: number, brand: string }[] = await db.update(cars)\n\t * .set({ color: 'red' })\n\t * .where(eq(cars.color, 'green'))\n\t * .returning({ id: cars.id, brand: cars.brand });\n\t * ```\n\t */\n\treturning(): SQLiteUpdateReturningAll;\n\treturning(\n\t\tfields: TSelectedFields,\n\t): SQLiteUpdateReturning;\n\treturning(\n\t\tfields: SelectedFields = this.config.table[SQLiteTable.Symbol.Columns],\n\t): SQLiteUpdateWithout {\n\t\tthis.config.returning = orderSelectedFields(fields);\n\t\treturn this as any;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildUpdateQuery(this.config);\n\t}\n\n\ttoSQL(): Query {\n\t\tconst { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());\n\t\treturn rest;\n\t}\n\n\t/** @internal */\n\t_prepare(isOneTimeQuery = true): SQLiteUpdatePrepare {\n\t\treturn this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tthis.dialect.sqlToQuery(this.getSQL()),\n\t\t\tthis.config.returning,\n\t\t\tthis.config.returning ? 'all' : 'run',\n\t\t\ttrue,\n\t\t\tundefined,\n\t\t\t{\n\t\t\t\ttype: 'insert',\n\t\t\t\ttables: extractUsedTable(this.config.table),\n\t\t\t},\n\t\t) as SQLiteUpdatePrepare;\n\t}\n\n\tprepare(): SQLiteUpdatePrepare {\n\t\treturn this._prepare(false);\n\t}\n\n\trun: ReturnType['run'] = (placeholderValues) => {\n\t\treturn this._prepare().run(placeholderValues);\n\t};\n\n\tall: ReturnType['all'] = (placeholderValues) => {\n\t\treturn this._prepare().all(placeholderValues);\n\t};\n\n\tget: ReturnType['get'] = (placeholderValues) => {\n\t\treturn this._prepare().get(placeholderValues);\n\t};\n\n\tvalues: ReturnType['values'] = (placeholderValues) => {\n\t\treturn this._prepare().values(placeholderValues);\n\t};\n\n\toverride async execute(): Promise> {\n\t\treturn (this.config.returning ? this.all() : this.run()) as SQLiteUpdateExecute;\n\t}\n\n\t$dynamic(): SQLiteUpdateDynamic {\n\t\treturn this as any;\n\t}\n}\n", "export * from './delete.ts';\nexport * from './insert.ts';\nexport * from './query-builder.ts';\nexport * from './select.ts';\nexport * from './select.types.ts';\nexport * from './update.ts';\n", "import { entityKind } from '~/entity.ts';\nimport { SQL, sql, type SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteSession } from '../session.ts';\nimport type { SQLiteTable } from '../table.ts';\nimport type { SQLiteView } from '../view.ts';\n\nexport class SQLiteCountBuilder<\n\tTSession extends SQLiteSession,\n> extends SQL implements Promise, SQLWrapper {\n\tprivate sql: SQL;\n\n\tstatic override readonly [entityKind] = 'SQLiteCountBuilderAsync';\n\t[Symbol.toStringTag] = 'SQLiteCountBuilderAsync';\n\n\tprivate session: TSession;\n\n\tprivate static buildEmbeddedCount(\n\t\tsource: SQLiteTable | SQLiteView | SQL | SQLWrapper,\n\t\tfilters?: SQL,\n\t): SQL {\n\t\treturn sql`(select count(*) from ${source}${sql.raw(' where ').if(filters)}${filters})`;\n\t}\n\n\tprivate static buildCount(\n\t\tsource: SQLiteTable | SQLiteView | SQL | SQLWrapper,\n\t\tfilters?: SQL,\n\t): SQL {\n\t\treturn sql`select count(*) from ${source}${sql.raw(' where ').if(filters)}${filters}`;\n\t}\n\n\tconstructor(\n\t\treadonly params: {\n\t\t\tsource: SQLiteTable | SQLiteView | SQL | SQLWrapper;\n\t\t\tfilters?: SQL;\n\t\t\tsession: TSession;\n\t\t},\n\t) {\n\t\tsuper(SQLiteCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);\n\n\t\tthis.session = params.session;\n\n\t\tthis.sql = SQLiteCountBuilder.buildCount(\n\t\t\tparams.source,\n\t\t\tparams.filters,\n\t\t);\n\t}\n\n\tthen(\n\t\tonfulfilled?: ((value: number) => TResult1 | PromiseLike) | null | undefined,\n\t\tonrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined,\n\t): Promise {\n\t\treturn Promise.resolve(this.session.count(this.sql)).then(\n\t\t\tonfulfilled,\n\t\t\tonrejected,\n\t\t);\n\t}\n\n\tcatch(\n\t\tonRejected?: ((reason: any) => never | PromiseLike) | null | undefined,\n\t): Promise {\n\t\treturn this.then(undefined, onRejected);\n\t}\n\n\tfinally(onFinally?: (() => void) | null | undefined): Promise {\n\t\treturn this.then(\n\t\t\t(value) => {\n\t\t\t\tonFinally?.();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\t(reason) => {\n\t\t\t\tonFinally?.();\n\t\t\t\tthrow reason;\n\t\t\t},\n\t\t);\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport {\n\ttype BuildQueryResult,\n\ttype BuildRelationalQueryResult,\n\ttype DBQueryConfig,\n\tmapRelationalRow,\n\ttype TableRelationalConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { Query, QueryWithTypings, SQL, SQLWrapper } from '~/sql/sql.ts';\nimport type { KnownKeysOnly } from '~/utils.ts';\nimport type { SQLiteDialect } from '../dialect.ts';\nimport type { PreparedQueryConfig, SQLitePreparedQuery, SQLiteSession } from '../session.ts';\nimport type { SQLiteTable } from '../table.ts';\n\nexport type SQLiteRelationalQueryKind = TMode extends 'async'\n\t? SQLiteRelationalQuery\n\t: SQLiteSyncRelationalQuery;\n\nexport class RelationalQueryBuilder<\n\tTMode extends 'sync' | 'async',\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n\tTFields extends TableRelationalConfig,\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteAsyncRelationalQueryBuilder';\n\n\tconstructor(\n\t\tprotected mode: TMode,\n\t\tprotected fullSchema: Record,\n\t\tprotected schema: TSchema,\n\t\tprotected tableNamesMap: Record,\n\t\tprotected table: SQLiteTable,\n\t\tprotected tableConfig: TableRelationalConfig,\n\t\tprotected dialect: SQLiteDialect,\n\t\tprotected session: SQLiteSession<'async', unknown, TFullSchema, TSchema>,\n\t) {}\n\n\tfindMany>(\n\t\tconfig?: KnownKeysOnly>,\n\t): SQLiteRelationalQueryKind[]> {\n\t\treturn (this.mode === 'sync'\n\t\t\t? new SQLiteSyncRelationalQuery(\n\t\t\t\tthis.fullSchema,\n\t\t\t\tthis.schema,\n\t\t\t\tthis.tableNamesMap,\n\t\t\t\tthis.table,\n\t\t\t\tthis.tableConfig,\n\t\t\t\tthis.dialect,\n\t\t\t\tthis.session,\n\t\t\t\tconfig ? (config as DBQueryConfig<'many', true>) : {},\n\t\t\t\t'many',\n\t\t\t)\n\t\t\t: new SQLiteRelationalQuery(\n\t\t\t\tthis.fullSchema,\n\t\t\t\tthis.schema,\n\t\t\t\tthis.tableNamesMap,\n\t\t\t\tthis.table,\n\t\t\t\tthis.tableConfig,\n\t\t\t\tthis.dialect,\n\t\t\t\tthis.session,\n\t\t\t\tconfig ? (config as DBQueryConfig<'many', true>) : {},\n\t\t\t\t'many',\n\t\t\t)) as SQLiteRelationalQueryKind[]>;\n\t}\n\n\tfindFirst, 'limit'>>(\n\t\tconfig?: KnownKeysOnly, 'limit'>>,\n\t): SQLiteRelationalQueryKind | undefined> {\n\t\treturn (this.mode === 'sync'\n\t\t\t? new SQLiteSyncRelationalQuery(\n\t\t\t\tthis.fullSchema,\n\t\t\t\tthis.schema,\n\t\t\t\tthis.tableNamesMap,\n\t\t\t\tthis.table,\n\t\t\t\tthis.tableConfig,\n\t\t\t\tthis.dialect,\n\t\t\t\tthis.session,\n\t\t\t\tconfig ? { ...(config as DBQueryConfig<'many', true> | undefined), limit: 1 } : { limit: 1 },\n\t\t\t\t'first',\n\t\t\t)\n\t\t\t: new SQLiteRelationalQuery(\n\t\t\t\tthis.fullSchema,\n\t\t\t\tthis.schema,\n\t\t\t\tthis.tableNamesMap,\n\t\t\t\tthis.table,\n\t\t\t\tthis.tableConfig,\n\t\t\t\tthis.dialect,\n\t\t\t\tthis.session,\n\t\t\t\tconfig ? { ...(config as DBQueryConfig<'many', true> | undefined), limit: 1 } : { limit: 1 },\n\t\t\t\t'first',\n\t\t\t)) as SQLiteRelationalQueryKind | undefined>;\n\t}\n}\n\nexport class SQLiteRelationalQuery extends QueryPromise\n\timplements RunnableQuery, SQLWrapper\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteAsyncRelationalQuery';\n\n\tdeclare readonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly type: TType;\n\t\treadonly result: TResult;\n\t};\n\n\t/** @internal */\n\tmode: 'many' | 'first';\n\n\tconstructor(\n\t\tprivate fullSchema: Record,\n\t\tprivate schema: TablesRelationalConfig,\n\t\tprivate tableNamesMap: Record,\n\t\t/** @internal */\n\t\tpublic table: SQLiteTable,\n\t\tprivate tableConfig: TableRelationalConfig,\n\t\tprivate dialect: SQLiteDialect,\n\t\tprivate session: SQLiteSession<'sync' | 'async', unknown, Record, TablesRelationalConfig>,\n\t\tprivate config: DBQueryConfig<'many', true> | true,\n\t\tmode: 'many' | 'first',\n\t) {\n\t\tsuper();\n\t\tthis.mode = mode;\n\t}\n\n\t/** @internal */\n\tgetSQL(): SQL {\n\t\treturn this.dialect.buildRelationalQuery({\n\t\t\tfullSchema: this.fullSchema,\n\t\t\tschema: this.schema,\n\t\t\ttableNamesMap: this.tableNamesMap,\n\t\t\ttable: this.table,\n\t\t\ttableConfig: this.tableConfig,\n\t\t\tqueryConfig: this.config,\n\t\t\ttableAlias: this.tableConfig.tsName,\n\t\t}).sql as SQL;\n\t}\n\n\t/** @internal */\n\t_prepare(\n\t\tisOneTimeQuery = false,\n\t): SQLitePreparedQuery {\n\t\tconst { query, builtQuery } = this._toSQL();\n\n\t\treturn this.session[isOneTimeQuery ? 'prepareOneTimeQuery' : 'prepareQuery'](\n\t\t\tbuiltQuery,\n\t\t\tundefined,\n\t\t\tthis.mode === 'first' ? 'get' : 'all',\n\t\t\ttrue,\n\t\t\t(rawRows, mapColumnValue) => {\n\t\t\t\tconst rows = rawRows.map((row) =>\n\t\t\t\t\tmapRelationalRow(this.schema, this.tableConfig, row, query.selection, mapColumnValue)\n\t\t\t\t);\n\t\t\t\tif (this.mode === 'first') {\n\t\t\t\t\treturn rows[0] as TResult;\n\t\t\t\t}\n\t\t\t\treturn rows as TResult;\n\t\t\t},\n\t\t) as SQLitePreparedQuery;\n\t}\n\n\tprepare(): SQLitePreparedQuery {\n\t\treturn this._prepare(false);\n\t}\n\n\tprivate _toSQL(): { query: BuildRelationalQueryResult; builtQuery: QueryWithTypings } {\n\t\tconst query = this.dialect.buildRelationalQuery({\n\t\t\tfullSchema: this.fullSchema,\n\t\t\tschema: this.schema,\n\t\t\ttableNamesMap: this.tableNamesMap,\n\t\t\ttable: this.table,\n\t\t\ttableConfig: this.tableConfig,\n\t\t\tqueryConfig: this.config,\n\t\t\ttableAlias: this.tableConfig.tsName,\n\t\t});\n\n\t\tconst builtQuery = this.dialect.sqlToQuery(query.sql as SQL);\n\n\t\treturn { query, builtQuery };\n\t}\n\n\ttoSQL(): Query {\n\t\treturn this._toSQL().builtQuery;\n\t}\n\n\t/** @internal */\n\texecuteRaw(): TResult {\n\t\tif (this.mode === 'first') {\n\t\t\treturn this._prepare(false).get() as TResult;\n\t\t}\n\t\treturn this._prepare(false).all() as TResult;\n\t}\n\n\toverride async execute(): Promise {\n\t\treturn this.executeRaw();\n\t}\n}\n\nexport class SQLiteSyncRelationalQuery extends SQLiteRelationalQuery<'sync', TResult> {\n\tstatic override readonly [entityKind]: string = 'SQLiteSyncRelationalQuery';\n\n\tsync(): TResult {\n\t\treturn this.executeRaw();\n\t}\n}\n", "import { entityKind } from '~/entity.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { PreparedQuery } from '~/session.ts';\nimport type { SQL, SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteAsyncDialect } from '../dialect.ts';\n\ntype SQLiteRawAction = 'all' | 'get' | 'values' | 'run';\nexport interface SQLiteRawConfig {\n\taction: SQLiteRawAction;\n}\n\nexport interface SQLiteRaw extends QueryPromise, RunnableQuery, SQLWrapper {}\n\nexport class SQLiteRaw extends QueryPromise\n\timplements RunnableQuery, SQLWrapper, PreparedQuery\n{\n\tstatic override readonly [entityKind]: string = 'SQLiteRaw';\n\n\tdeclare readonly _: {\n\t\treadonly dialect: 'sqlite';\n\t\treadonly result: TResult;\n\t};\n\n\t/** @internal */\n\tconfig: SQLiteRawConfig;\n\n\tconstructor(\n\t\tpublic execute: () => Promise,\n\t\t/** @internal */\n\t\tpublic getSQL: () => SQL,\n\t\taction: SQLiteRawAction,\n\t\tprivate dialect: SQLiteAsyncDialect,\n\t\tprivate mapBatchResult: (result: unknown) => unknown,\n\t) {\n\t\tsuper();\n\t\tthis.config = { action };\n\t}\n\n\tgetQuery() {\n\t\treturn { ...this.dialect.sqlToQuery(this.getSQL()), method: this.config.action };\n\t}\n\n\tmapResult(result: unknown, isFromBatch?: boolean) {\n\t\treturn isFromBatch ? this.mapBatchResult(result) : result;\n\t}\n\n\t_prepare(): PreparedQuery {\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tisResponseInArrayMode(): boolean {\n\t\treturn false;\n\t}\n}\n", "import type { Cache } from '~/cache/core/cache.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type { ExtractTablesWithRelations, RelationalSchemaConfig, TablesRelationalConfig } from '~/relations.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport { type ColumnsSelection, type SQL, sql, type SQLWrapper } from '~/sql/sql.ts';\nimport type { SQLiteAsyncDialect, SQLiteSyncDialect } from '~/sqlite-core/dialect.ts';\nimport {\n\tQueryBuilder,\n\tSQLiteDeleteBase,\n\tSQLiteInsertBuilder,\n\tSQLiteSelectBuilder,\n\tSQLiteUpdateBuilder,\n} from '~/sqlite-core/query-builders/index.ts';\nimport type {\n\tDBResult,\n\tResult,\n\tSQLiteSession,\n\tSQLiteTransaction,\n\tSQLiteTransactionConfig,\n} from '~/sqlite-core/session.ts';\nimport type { SQLiteTable } from '~/sqlite-core/table.ts';\nimport { WithSubquery } from '~/subquery.ts';\nimport type { DrizzleTypeError } from '~/utils.ts';\nimport { SQLiteCountBuilder } from './query-builders/count.ts';\nimport { RelationalQueryBuilder } from './query-builders/query.ts';\nimport { SQLiteRaw } from './query-builders/raw.ts';\nimport type { SelectedFields } from './query-builders/select.types.ts';\nimport type { WithBuilder } from './subquery.ts';\nimport type { SQLiteViewBase } from './view-base.ts';\n\nexport class BaseSQLiteDatabase<\n\tTResultKind extends 'sync' | 'async',\n\tTRunResult,\n\tTFullSchema extends Record = Record,\n\tTSchema extends TablesRelationalConfig = ExtractTablesWithRelations,\n> {\n\tstatic readonly [entityKind]: string = 'BaseSQLiteDatabase';\n\n\tdeclare readonly _: {\n\t\treadonly schema: TSchema | undefined;\n\t\treadonly fullSchema: TFullSchema;\n\t\treadonly tableNamesMap: Record;\n\t};\n\n\tquery: TFullSchema extends Record\n\t\t? DrizzleTypeError<'Seems like the schema generic is missing - did you forget to add it to your DB type?'>\n\t\t: {\n\t\t\t[K in keyof TSchema]: RelationalQueryBuilder;\n\t\t};\n\n\tconstructor(\n\t\tprivate resultKind: TResultKind,\n\t\t/** @internal */\n\t\treadonly dialect: { sync: SQLiteSyncDialect; async: SQLiteAsyncDialect }[TResultKind],\n\t\t/** @internal */\n\t\treadonly session: SQLiteSession,\n\t\tschema: RelationalSchemaConfig | undefined,\n\t) {\n\t\tthis._ = schema\n\t\t\t? {\n\t\t\t\tschema: schema.schema,\n\t\t\t\tfullSchema: schema.fullSchema as TFullSchema,\n\t\t\t\ttableNamesMap: schema.tableNamesMap,\n\t\t\t}\n\t\t\t: {\n\t\t\t\tschema: undefined,\n\t\t\t\tfullSchema: {} as TFullSchema,\n\t\t\t\ttableNamesMap: {},\n\t\t\t};\n\t\tthis.query = {} as typeof this['query'];\n\t\tconst query = this.query as {\n\t\t\t[K in keyof TSchema]: RelationalQueryBuilder;\n\t\t};\n\t\tif (this._.schema) {\n\t\t\tfor (const [tableName, columns] of Object.entries(this._.schema)) {\n\t\t\t\tquery[tableName as keyof TSchema] = new RelationalQueryBuilder(\n\t\t\t\t\tresultKind,\n\t\t\t\t\tschema!.fullSchema,\n\t\t\t\t\tthis._.schema,\n\t\t\t\t\tthis._.tableNamesMap,\n\t\t\t\t\tschema!.fullSchema[tableName] as SQLiteTable,\n\t\t\t\t\tcolumns,\n\t\t\t\t\tdialect,\n\t\t\t\t\tsession as SQLiteSession as any,\n\t\t\t\t) as typeof query[keyof TSchema];\n\t\t\t}\n\t\t}\n\t\tthis.$cache = { invalidate: async (_params: any) => {} };\n\t}\n\n\t/**\n\t * Creates a subquery that defines a temporary named result set as a CTE.\n\t *\n\t * It is useful for breaking down complex queries into simpler parts and for reusing the result set in subsequent parts of the query.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#with-clause}\n\t *\n\t * @param alias The alias for the subquery.\n\t *\n\t * Failure to provide an alias will result in a DrizzleTypeError, preventing the subquery from being referenced in other queries.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Create a subquery with alias 'sq' and use it in the select query\n\t * const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42)));\n\t *\n\t * const result = await db.with(sq).select().from(sq);\n\t * ```\n\t *\n\t * To select arbitrary SQL values as fields in a CTE and reference them in other CTEs or in the main query, you need to add aliases to them:\n\t *\n\t * ```ts\n\t * // Select an arbitrary SQL value as a field in a CTE and reference it in the main query\n\t * const sq = db.$with('sq').as(db.select({\n\t * name: sql`upper(${users.name})`.as('name'),\n\t * })\n\t * .from(users));\n\t *\n\t * const result = await db.with(sq).select({ name: sq.name }).from(sq);\n\t * ```\n\t */\n\t$with: WithBuilder = (alias: string, selection?: ColumnsSelection) => {\n\t\tconst self = this;\n\t\tconst as = (\n\t\t\tqb:\n\t\t\t\t| TypedQueryBuilder\n\t\t\t\t| SQL\n\t\t\t\t| ((qb: QueryBuilder) => TypedQueryBuilder | SQL),\n\t\t) => {\n\t\t\tif (typeof qb === 'function') {\n\t\t\t\tqb = qb(new QueryBuilder(self.dialect));\n\t\t\t}\n\n\t\t\treturn new Proxy(\n\t\t\t\tnew WithSubquery(\n\t\t\t\t\tqb.getSQL(),\n\t\t\t\t\tselection ?? ('getSelectedFields' in qb ? qb.getSelectedFields() ?? {} : {}) as SelectedFields,\n\t\t\t\t\talias,\n\t\t\t\t\ttrue,\n\t\t\t\t),\n\t\t\t\tnew SelectionProxyHandler({ alias, sqlAliasedBehavior: 'alias', sqlBehavior: 'error' }),\n\t\t\t);\n\t\t};\n\t\treturn { as };\n\t};\n\n\t$count(\n\t\tsource: SQLiteTable | SQLiteViewBase | SQL | SQLWrapper,\n\t\tfilters?: SQL,\n\t) {\n\t\treturn new SQLiteCountBuilder({ source, filters, session: this.session });\n\t}\n\n\t/**\n\t * Incorporates a previously defined CTE (using `$with`) into the main query.\n\t *\n\t * This method allows the main query to reference a temporary named result set.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#with-clause}\n\t *\n\t * @param queries The CTEs to incorporate into the main query.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Define a subquery 'sq' as a CTE using $with\n\t * const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42)));\n\t *\n\t * // Incorporate the CTE 'sq' into the main query and select from it\n\t * const result = await db.with(sq).select().from(sq);\n\t * ```\n\t */\n\twith(...queries: WithSubquery[]) {\n\t\tconst self = this;\n\n\t\t/**\n\t\t * Creates a select query.\n\t\t *\n\t\t * Calling this method with no arguments will select all columns from the table. Pass a selection object to specify the columns you want to select.\n\t\t *\n\t\t * Use `.from()` method to specify which table to select from.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/select}\n\t\t *\n\t\t * @param fields The selection object.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Select all columns and all rows from the 'cars' table\n\t\t * const allCars: Car[] = await db.select().from(cars);\n\t\t *\n\t\t * // Select specific columns and all rows from the 'cars' table\n\t\t * const carsIdsAndBrands: { id: number; brand: string }[] = await db.select({\n\t\t * id: cars.id,\n\t\t * brand: cars.brand\n\t\t * })\n\t\t * .from(cars);\n\t\t * ```\n\t\t *\n\t\t * Like in SQL, you can use arbitrary expressions as selection fields, not just table columns:\n\t\t *\n\t\t * ```ts\n\t\t * // Select specific columns along with expression and all rows from the 'cars' table\n\t\t * const carsIdsAndLowerNames: { id: number; lowerBrand: string }[] = await db.select({\n\t\t * id: cars.id,\n\t\t * lowerBrand: sql`lower(${cars.brand})`,\n\t\t * })\n\t\t * .from(cars);\n\t\t * ```\n\t\t */\n\t\tfunction select(): SQLiteSelectBuilder;\n\t\tfunction select(\n\t\t\tfields: TSelection,\n\t\t): SQLiteSelectBuilder;\n\t\tfunction select(\n\t\t\tfields?: SelectedFields,\n\t\t): SQLiteSelectBuilder {\n\t\t\treturn new SQLiteSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: self.session,\n\t\t\t\tdialect: self.dialect,\n\t\t\t\twithList: queries,\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Adds `distinct` expression to the select query.\n\t\t *\n\t\t * Calling this method will return only unique values. When multiple columns are selected, it returns rows with unique combinations of values in these columns.\n\t\t *\n\t\t * Use `.from()` method to specify which table to select from.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/select#distinct}\n\t\t *\n\t\t * @param fields The selection object.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Select all unique rows from the 'cars' table\n\t\t * await db.selectDistinct()\n\t\t * .from(cars)\n\t\t * .orderBy(cars.id, cars.brand, cars.color);\n\t\t *\n\t\t * // Select all unique brands from the 'cars' table\n\t\t * await db.selectDistinct({ brand: cars.brand })\n\t\t * .from(cars)\n\t\t * .orderBy(cars.brand);\n\t\t * ```\n\t\t */\n\t\tfunction selectDistinct(): SQLiteSelectBuilder;\n\t\tfunction selectDistinct(\n\t\t\tfields: TSelection,\n\t\t): SQLiteSelectBuilder;\n\t\tfunction selectDistinct(\n\t\t\tfields?: SelectedFields,\n\t\t): SQLiteSelectBuilder {\n\t\t\treturn new SQLiteSelectBuilder({\n\t\t\t\tfields: fields ?? undefined,\n\t\t\t\tsession: self.session,\n\t\t\t\tdialect: self.dialect,\n\t\t\t\twithList: queries,\n\t\t\t\tdistinct: true,\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Creates an update query.\n\t\t *\n\t\t * Calling this method without `.where()` clause will update all rows in a table. The `.where()` clause specifies which rows should be updated.\n\t\t *\n\t\t * Use `.set()` method to specify which values to update.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/update}\n\t\t *\n\t\t * @param table The table to update.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Update all rows in the 'cars' table\n\t\t * await db.update(cars).set({ color: 'red' });\n\t\t *\n\t\t * // Update rows with filters and conditions\n\t\t * await db.update(cars).set({ color: 'red' }).where(eq(cars.brand, 'BMW'));\n\t\t *\n\t\t * // Update with returning clause\n\t\t * const updatedCar: Car[] = await db.update(cars)\n\t\t * .set({ color: 'red' })\n\t\t * .where(eq(cars.id, 1))\n\t\t * .returning();\n\t\t * ```\n\t\t */\n\t\tfunction update(table: TTable): SQLiteUpdateBuilder {\n\t\t\treturn new SQLiteUpdateBuilder(table, self.session, self.dialect, queries);\n\t\t}\n\n\t\t/**\n\t\t * Creates an insert query.\n\t\t *\n\t\t * Calling this method will create new rows in a table. Use `.values()` method to specify which values to insert.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/insert}\n\t\t *\n\t\t * @param table The table to insert into.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Insert one row\n\t\t * await db.insert(cars).values({ brand: 'BMW' });\n\t\t *\n\t\t * // Insert multiple rows\n\t\t * await db.insert(cars).values([{ brand: 'BMW' }, { brand: 'Porsche' }]);\n\t\t *\n\t\t * // Insert with returning clause\n\t\t * const insertedCar: Car[] = await db.insert(cars)\n\t\t * .values({ brand: 'BMW' })\n\t\t * .returning();\n\t\t * ```\n\t\t */\n\t\tfunction insert(into: TTable): SQLiteInsertBuilder {\n\t\t\treturn new SQLiteInsertBuilder(into, self.session, self.dialect, queries);\n\t\t}\n\n\t\t/**\n\t\t * Creates a delete query.\n\t\t *\n\t\t * Calling this method without `.where()` clause will delete all rows in a table. The `.where()` clause specifies which rows should be deleted.\n\t\t *\n\t\t * See docs: {@link https://orm.drizzle.team/docs/delete}\n\t\t *\n\t\t * @param table The table to delete from.\n\t\t *\n\t\t * @example\n\t\t *\n\t\t * ```ts\n\t\t * // Delete all rows in the 'cars' table\n\t\t * await db.delete(cars);\n\t\t *\n\t\t * // Delete rows with filters and conditions\n\t\t * await db.delete(cars).where(eq(cars.color, 'green'));\n\t\t *\n\t\t * // Delete with returning clause\n\t\t * const deletedCar: Car[] = await db.delete(cars)\n\t\t * .where(eq(cars.id, 1))\n\t\t * .returning();\n\t\t * ```\n\t\t */\n\t\tfunction delete_(from: TTable): SQLiteDeleteBase {\n\t\t\treturn new SQLiteDeleteBase(from, self.session, self.dialect, queries);\n\t\t}\n\n\t\treturn { select, selectDistinct, update, insert, delete: delete_ };\n\t}\n\n\t/**\n\t * Creates a select query.\n\t *\n\t * Calling this method with no arguments will select all columns from the table. Pass a selection object to specify the columns you want to select.\n\t *\n\t * Use `.from()` method to specify which table to select from.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select}\n\t *\n\t * @param fields The selection object.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all columns and all rows from the 'cars' table\n\t * const allCars: Car[] = await db.select().from(cars);\n\t *\n\t * // Select specific columns and all rows from the 'cars' table\n\t * const carsIdsAndBrands: { id: number; brand: string }[] = await db.select({\n\t * id: cars.id,\n\t * brand: cars.brand\n\t * })\n\t * .from(cars);\n\t * ```\n\t *\n\t * Like in SQL, you can use arbitrary expressions as selection fields, not just table columns:\n\t *\n\t * ```ts\n\t * // Select specific columns along with expression and all rows from the 'cars' table\n\t * const carsIdsAndLowerNames: { id: number; lowerBrand: string }[] = await db.select({\n\t * id: cars.id,\n\t * lowerBrand: sql`lower(${cars.brand})`,\n\t * })\n\t * .from(cars);\n\t * ```\n\t */\n\tselect(): SQLiteSelectBuilder;\n\tselect(\n\t\tfields: TSelection,\n\t): SQLiteSelectBuilder;\n\tselect(fields?: SelectedFields): SQLiteSelectBuilder {\n\t\treturn new SQLiteSelectBuilder({ fields: fields ?? undefined, session: this.session, dialect: this.dialect });\n\t}\n\n\t/**\n\t * Adds `distinct` expression to the select query.\n\t *\n\t * Calling this method will return only unique values. When multiple columns are selected, it returns rows with unique combinations of values in these columns.\n\t *\n\t * Use `.from()` method to specify which table to select from.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/select#distinct}\n\t *\n\t * @param fields The selection object.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Select all unique rows from the 'cars' table\n\t * await db.selectDistinct()\n\t * .from(cars)\n\t * .orderBy(cars.id, cars.brand, cars.color);\n\t *\n\t * // Select all unique brands from the 'cars' table\n\t * await db.selectDistinct({ brand: cars.brand })\n\t * .from(cars)\n\t * .orderBy(cars.brand);\n\t * ```\n\t */\n\tselectDistinct(): SQLiteSelectBuilder;\n\tselectDistinct(\n\t\tfields: TSelection,\n\t): SQLiteSelectBuilder;\n\tselectDistinct(\n\t\tfields?: SelectedFields,\n\t): SQLiteSelectBuilder {\n\t\treturn new SQLiteSelectBuilder({\n\t\t\tfields: fields ?? undefined,\n\t\t\tsession: this.session,\n\t\t\tdialect: this.dialect,\n\t\t\tdistinct: true,\n\t\t});\n\t}\n\n\t/**\n\t * Creates an update query.\n\t *\n\t * Calling this method without `.where()` clause will update all rows in a table. The `.where()` clause specifies which rows should be updated.\n\t *\n\t * Use `.set()` method to specify which values to update.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/update}\n\t *\n\t * @param table The table to update.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Update all rows in the 'cars' table\n\t * await db.update(cars).set({ color: 'red' });\n\t *\n\t * // Update rows with filters and conditions\n\t * await db.update(cars).set({ color: 'red' }).where(eq(cars.brand, 'BMW'));\n\t *\n\t * // Update with returning clause\n\t * const updatedCar: Car[] = await db.update(cars)\n\t * .set({ color: 'red' })\n\t * .where(eq(cars.id, 1))\n\t * .returning();\n\t * ```\n\t */\n\tupdate(table: TTable): SQLiteUpdateBuilder {\n\t\treturn new SQLiteUpdateBuilder(table, this.session, this.dialect);\n\t}\n\n\t$cache: { invalidate: Cache['onMutate'] };\n\n\t/**\n\t * Creates an insert query.\n\t *\n\t * Calling this method will create new rows in a table. Use `.values()` method to specify which values to insert.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/insert}\n\t *\n\t * @param table The table to insert into.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Insert one row\n\t * await db.insert(cars).values({ brand: 'BMW' });\n\t *\n\t * // Insert multiple rows\n\t * await db.insert(cars).values([{ brand: 'BMW' }, { brand: 'Porsche' }]);\n\t *\n\t * // Insert with returning clause\n\t * const insertedCar: Car[] = await db.insert(cars)\n\t * .values({ brand: 'BMW' })\n\t * .returning();\n\t * ```\n\t */\n\tinsert(into: TTable): SQLiteInsertBuilder {\n\t\treturn new SQLiteInsertBuilder(into, this.session, this.dialect);\n\t}\n\n\t/**\n\t * Creates a delete query.\n\t *\n\t * Calling this method without `.where()` clause will delete all rows in a table. The `.where()` clause specifies which rows should be deleted.\n\t *\n\t * See docs: {@link https://orm.drizzle.team/docs/delete}\n\t *\n\t * @param table The table to delete from.\n\t *\n\t * @example\n\t *\n\t * ```ts\n\t * // Delete all rows in the 'cars' table\n\t * await db.delete(cars);\n\t *\n\t * // Delete rows with filters and conditions\n\t * await db.delete(cars).where(eq(cars.color, 'green'));\n\t *\n\t * // Delete with returning clause\n\t * const deletedCar: Car[] = await db.delete(cars)\n\t * .where(eq(cars.id, 1))\n\t * .returning();\n\t * ```\n\t */\n\tdelete(from: TTable): SQLiteDeleteBase {\n\t\treturn new SQLiteDeleteBase(from, this.session, this.dialect);\n\t}\n\n\trun(query: SQLWrapper | string): DBResult {\n\t\tconst sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();\n\t\tif (this.resultKind === 'async') {\n\t\t\treturn new SQLiteRaw(\n\t\t\t\tasync () => this.session.run(sequel),\n\t\t\t\t() => sequel,\n\t\t\t\t'run',\n\t\t\t\tthis.dialect as SQLiteAsyncDialect,\n\t\t\t\tthis.session.extractRawRunValueFromBatchResult.bind(this.session),\n\t\t\t) as DBResult;\n\t\t}\n\t\treturn this.session.run(sequel) as DBResult;\n\t}\n\n\tall(query: SQLWrapper | string): DBResult {\n\t\tconst sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();\n\t\tif (this.resultKind === 'async') {\n\t\t\treturn new SQLiteRaw(\n\t\t\t\tasync () => this.session.all(sequel),\n\t\t\t\t() => sequel,\n\t\t\t\t'all',\n\t\t\t\tthis.dialect as SQLiteAsyncDialect,\n\t\t\t\tthis.session.extractRawAllValueFromBatchResult.bind(this.session),\n\t\t\t) as any;\n\t\t}\n\t\treturn this.session.all(sequel) as DBResult;\n\t}\n\n\tget(query: SQLWrapper | string): DBResult {\n\t\tconst sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();\n\t\tif (this.resultKind === 'async') {\n\t\t\treturn new SQLiteRaw(\n\t\t\t\tasync () => this.session.get(sequel),\n\t\t\t\t() => sequel,\n\t\t\t\t'get',\n\t\t\t\tthis.dialect as SQLiteAsyncDialect,\n\t\t\t\tthis.session.extractRawGetValueFromBatchResult.bind(this.session),\n\t\t\t) as DBResult;\n\t\t}\n\t\treturn this.session.get(sequel) as DBResult;\n\t}\n\n\tvalues(query: SQLWrapper | string): DBResult {\n\t\tconst sequel = typeof query === 'string' ? sql.raw(query) : query.getSQL();\n\t\tif (this.resultKind === 'async') {\n\t\t\treturn new SQLiteRaw(\n\t\t\t\tasync () => this.session.values(sequel),\n\t\t\t\t() => sequel,\n\t\t\t\t'values',\n\t\t\t\tthis.dialect as SQLiteAsyncDialect,\n\t\t\t\tthis.session.extractRawValuesValueFromBatchResult.bind(this.session),\n\t\t\t) as any;\n\t\t}\n\t\treturn this.session.values(sequel) as DBResult;\n\t}\n\n\ttransaction(\n\t\ttransaction: (tx: SQLiteTransaction) => Result,\n\t\tconfig?: SQLiteTransactionConfig,\n\t): Result {\n\t\treturn this.session.transaction(transaction, config);\n\t}\n}\n\nexport type SQLiteWithReplicas = Q & { $primary: Q; $replicas: Q[] };\n\nexport const withReplicas = <\n\tTResultKind extends 'sync' | 'async',\n\tTRunResult,\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n\tQ extends BaseSQLiteDatabase<\n\t\tTResultKind,\n\t\tTRunResult,\n\t\tTFullSchema,\n\t\tTSchema extends Record ? ExtractTablesWithRelations : TSchema\n\t>,\n>(\n\tprimary: Q,\n\treplicas: [Q, ...Q[]],\n\tgetReplica: (replicas: Q[]) => Q = () => replicas[Math.floor(Math.random() * replicas.length)]!,\n): SQLiteWithReplicas => {\n\tconst select: Q['select'] = (...args: []) => getReplica(replicas).select(...args);\n\tconst selectDistinct: Q['selectDistinct'] = (...args: []) => getReplica(replicas).selectDistinct(...args);\n\tconst $count: Q['$count'] = (...args: [any]) => getReplica(replicas).$count(...args);\n\tconst $with: Q['with'] = (...args: []) => getReplica(replicas).with(...args);\n\n\tconst update: Q['update'] = (...args: [any]) => primary.update(...args);\n\tconst insert: Q['insert'] = (...args: [any]) => primary.insert(...args);\n\tconst $delete: Q['delete'] = (...args: [any]) => primary.delete(...args);\n\tconst run: Q['run'] = (...args: [any]) => primary.run(...args);\n\tconst all: Q['all'] = (...args: [any]) => primary.all(...args);\n\tconst get: Q['get'] = (...args: [any]) => primary.get(...args);\n\tconst values: Q['values'] = (...args: [any]) => primary.values(...args);\n\tconst transaction: Q['transaction'] = (...args: [any]) => primary.transaction(...args);\n\n\treturn {\n\t\t...primary,\n\t\tupdate,\n\t\tinsert,\n\t\tdelete: $delete,\n\t\trun,\n\t\tall,\n\t\tget,\n\t\tvalues,\n\t\ttransaction,\n\t\t$primary: primary,\n\t\t$replicas: replicas,\n\t\tselect,\n\t\tselectDistinct,\n\t\t$count,\n\t\twith: $with,\n\t\tget query() {\n\t\t\treturn getReplica(replicas).query;\n\t\t},\n\t};\n};\n", "import { entityKind } from '~/entity.ts';\nimport type { Table } from '~/index.ts';\nimport type { CacheConfig } from './types.ts';\n\nexport abstract class Cache {\n\tstatic readonly [entityKind]: string = 'Cache';\n\n\tabstract strategy(): 'explicit' | 'all';\n\n\t/**\n\t * Invoked if we should check cache for cached response\n\t * @param sql\n\t * @param tables\n\t */\n\tabstract get(\n\t\tkey: string,\n\t\ttables: string[],\n\t\tisTag: boolean,\n\t\tisAutoInvalidate?: boolean,\n\t): Promise;\n\n\t/**\n\t * Invoked if new query should be inserted to cache\n\t * @param sql\n\t * @param tables\n\t */\n\tabstract put(\n\t\thashedQuery: string,\n\t\tresponse: any,\n\t\ttables: string[],\n\t\tisTag: boolean,\n\t\tconfig?: CacheConfig,\n\t): Promise;\n\n\t/**\n\t * Invoked if insert, update, delete was invoked\n\t * @param tables\n\t */\n\tabstract onMutate(\n\t\tparams: MutationOption,\n\t): Promise;\n}\n\nexport class NoopCache extends Cache {\n\toverride strategy() {\n\t\treturn 'all' as const;\n\t}\n\n\tstatic override readonly [entityKind]: string = 'NoopCache';\n\n\toverride async get(_key: string): Promise {\n\t\treturn undefined;\n\t}\n\toverride async put(\n\t\t_hashedQuery: string,\n\t\t_response: any,\n\t\t_tables: string[],\n\t\t_config?: any,\n\t): Promise {\n\t\t// noop\n\t}\n\toverride async onMutate(_params: MutationOption): Promise {\n\t\t// noop\n\t}\n}\n\nexport type MutationOption = { tags?: string | string[]; tables?: Table | Table[] | string | string[] };\n\nexport async function hashQuery(sql: string, params?: any[]) {\n\tconst dataToHash = `${sql}-${JSON.stringify(params)}`;\n\tconst encoder = new TextEncoder();\n\tconst data = encoder.encode(dataToHash);\n\tconst hashBuffer = await crypto.subtle.digest('SHA-256', data);\n\tconst hashArray = [...new Uint8Array(hashBuffer)];\n\tconst hashHex = hashArray.map((b) => b.toString(16).padStart(2, '0')).join('');\n\n\treturn hashHex;\n}\n", "export * from './cache.ts';\n", "import { TableAliasProxyHandler } from '~/alias.ts';\nimport type { BuildAliasTable } from './query-builders/select.types.ts';\n\nimport type { SQLiteTable } from './table.ts';\nimport type { SQLiteViewBase } from './view-base.ts';\n\nexport function alias(\n\ttable: TTable,\n\talias: TAlias,\n): BuildAliasTable {\n\treturn new Proxy(table, new TableAliasProxyHandler(alias, false)) as any;\n}\n", "import { type Cache, hashQuery, NoopCache } from '~/cache/core/cache.ts';\nimport type { WithCacheConfig } from '~/cache/core/types.ts';\nimport { entityKind, is } from '~/entity.ts';\nimport { DrizzleError, DrizzleQueryError, TransactionRollbackError } from '~/errors.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { TablesRelationalConfig } from '~/relations.ts';\nimport type { PreparedQuery } from '~/session.ts';\nimport type { Query, SQL } from '~/sql/sql.ts';\nimport type { SQLiteAsyncDialect, SQLiteSyncDialect } from '~/sqlite-core/dialect.ts';\nimport { BaseSQLiteDatabase } from './db.ts';\nimport type { SQLiteRaw } from './query-builders/raw.ts';\nimport type { SelectedFieldsOrdered } from './query-builders/select.types.ts';\n\nexport interface PreparedQueryConfig {\n\ttype: 'sync' | 'async';\n\trun: unknown;\n\tall: unknown;\n\tget: unknown;\n\tvalues: unknown;\n\texecute: unknown;\n}\n\nexport class ExecuteResultSync extends QueryPromise {\n\tstatic override readonly [entityKind]: string = 'ExecuteResultSync';\n\n\tconstructor(private resultCb: () => T) {\n\t\tsuper();\n\t}\n\n\toverride async execute(): Promise {\n\t\treturn this.resultCb();\n\t}\n\n\tsync(): T {\n\t\treturn this.resultCb();\n\t}\n}\n\nexport type ExecuteResult = TType extends 'async' ? Promise\n\t: ExecuteResultSync;\n\nexport abstract class SQLitePreparedQuery implements PreparedQuery {\n\tstatic readonly [entityKind]: string = 'PreparedQuery';\n\n\t/** @internal */\n\tjoinsNotNullableMap?: Record;\n\n\tconstructor(\n\t\tprivate mode: 'sync' | 'async',\n\t\tprivate executeMethod: SQLiteExecuteMethod,\n\t\tprotected query: Query,\n\t\tprivate cache?: Cache,\n\t\t// per query related metadata\n\t\tprivate queryMetadata?: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t} | undefined,\n\t\t// config that was passed through $withCache\n\t\tprivate cacheConfig?: WithCacheConfig,\n\t) {\n\t\t// it means that no $withCache options were passed and it should be just enabled\n\t\tif (cache && cache.strategy() === 'all' && cacheConfig === undefined) {\n\t\t\tthis.cacheConfig = { enable: true, autoInvalidate: true };\n\t\t}\n\t\tif (!this.cacheConfig?.enable) {\n\t\t\tthis.cacheConfig = undefined;\n\t\t}\n\t}\n\n\t/** @internal */\n\tprotected async queryWithCache(\n\t\tqueryString: string,\n\t\tparams: any[],\n\t\tquery: () => Promise,\n\t): Promise {\n\t\tif (this.cache === undefined || is(this.cache, NoopCache) || this.queryMetadata === undefined) {\n\t\t\ttry {\n\t\t\t\treturn await query();\n\t\t\t} catch (e) {\n\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t}\n\t\t}\n\n\t\t// don't do any mutations, if globally is false\n\t\tif (this.cacheConfig && !this.cacheConfig.enable) {\n\t\t\ttry {\n\t\t\t\treturn await query();\n\t\t\t} catch (e) {\n\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t}\n\t\t}\n\n\t\t// For mutate queries, we should query the database, wait for a response, and then perform invalidation\n\t\tif (\n\t\t\t(\n\t\t\t\tthis.queryMetadata.type === 'insert' || this.queryMetadata.type === 'update'\n\t\t\t\t|| this.queryMetadata.type === 'delete'\n\t\t\t) && this.queryMetadata.tables.length > 0\n\t\t) {\n\t\t\ttry {\n\t\t\t\tconst [res] = await Promise.all([\n\t\t\t\t\tquery(),\n\t\t\t\t\tthis.cache.onMutate({ tables: this.queryMetadata.tables }),\n\t\t\t\t]);\n\t\t\t\treturn res;\n\t\t\t} catch (e) {\n\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t}\n\t\t}\n\n\t\t// don't do any reads if globally disabled\n\t\tif (!this.cacheConfig) {\n\t\t\ttry {\n\t\t\t\treturn await query();\n\t\t\t} catch (e) {\n\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t}\n\t\t}\n\n\t\tif (this.queryMetadata.type === 'select') {\n\t\t\tconst fromCache = await this.cache.get(\n\t\t\t\tthis.cacheConfig.tag ?? await hashQuery(queryString, params),\n\t\t\t\tthis.queryMetadata.tables,\n\t\t\t\tthis.cacheConfig.tag !== undefined,\n\t\t\t\tthis.cacheConfig.autoInvalidate,\n\t\t\t);\n\t\t\tif (fromCache === undefined) {\n\t\t\t\tlet result;\n\t\t\t\ttry {\n\t\t\t\t\tresult = await query();\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t\t\t}\n\n\t\t\t\t// put actual key\n\t\t\t\tawait this.cache.put(\n\t\t\t\t\tthis.cacheConfig.tag ?? await hashQuery(queryString, params),\n\t\t\t\t\tresult,\n\t\t\t\t\t// make sure we send tables that were used in a query only if user wants to invalidate it on each write\n\t\t\t\t\tthis.cacheConfig.autoInvalidate ? this.queryMetadata.tables : [],\n\t\t\t\t\tthis.cacheConfig.tag !== undefined,\n\t\t\t\t\tthis.cacheConfig.config,\n\t\t\t\t);\n\t\t\t\t// put flag if we should invalidate or not\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\treturn fromCache as unknown as T;\n\t\t}\n\t\ttry {\n\t\t\treturn await query();\n\t\t} catch (e) {\n\t\t\tthrow new DrizzleQueryError(queryString, params, e as Error);\n\t\t}\n\t}\n\n\tgetQuery(): Query {\n\t\treturn this.query;\n\t}\n\n\tabstract run(placeholderValues?: Record): Result;\n\n\tmapRunResult(result: unknown, _isFromBatch?: boolean): unknown {\n\t\treturn result;\n\t}\n\n\tabstract all(placeholderValues?: Record): Result;\n\n\tmapAllResult(_result: unknown, _isFromBatch?: boolean): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n\n\tabstract get(placeholderValues?: Record): Result;\n\n\tmapGetResult(_result: unknown, _isFromBatch?: boolean): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n\n\tabstract values(placeholderValues?: Record): Result;\n\n\texecute(placeholderValues?: Record): ExecuteResult {\n\t\tif (this.mode === 'async') {\n\t\t\treturn this[this.executeMethod](placeholderValues) as ExecuteResult;\n\t\t}\n\t\treturn new ExecuteResultSync(() => this[this.executeMethod](placeholderValues));\n\t}\n\n\tmapResult(response: unknown, isFromBatch?: boolean) {\n\t\tswitch (this.executeMethod) {\n\t\t\tcase 'run': {\n\t\t\t\treturn this.mapRunResult(response, isFromBatch);\n\t\t\t}\n\t\t\tcase 'all': {\n\t\t\t\treturn this.mapAllResult(response, isFromBatch);\n\t\t\t}\n\t\t\tcase 'get': {\n\t\t\t\treturn this.mapGetResult(response, isFromBatch);\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @internal */\n\tabstract isResponseInArrayMode(): boolean;\n}\n\nexport interface SQLiteTransactionConfig {\n\tbehavior?: 'deferred' | 'immediate' | 'exclusive';\n}\n\nexport type SQLiteExecuteMethod = 'run' | 'all' | 'get';\n\nexport abstract class SQLiteSession<\n\tTResultKind extends 'sync' | 'async',\n\tTRunResult,\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteSession';\n\n\tconstructor(\n\t\t/** @internal */\n\t\treadonly dialect: { sync: SQLiteSyncDialect; async: SQLiteAsyncDialect }[TResultKind],\n\t) {}\n\n\tabstract prepareQuery(\n\t\tquery: Query,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t\tisResponseInArrayMode: boolean,\n\t\tcustomResultMapper?: (rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => unknown,\n\t\tqueryMetadata?: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t},\n\t\tcacheConfig?: WithCacheConfig,\n\t): SQLitePreparedQuery;\n\n\tprepareOneTimeQuery(\n\t\tquery: Query,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t\tisResponseInArrayMode: boolean,\n\t\tcustomResultMapper?: (rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => unknown,\n\t\tqueryMetadata?: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t},\n\t\tcacheConfig?: WithCacheConfig,\n\t): SQLitePreparedQuery {\n\t\treturn this.prepareQuery(\n\t\t\tquery,\n\t\t\tfields,\n\t\t\texecuteMethod,\n\t\t\tisResponseInArrayMode,\n\t\t\tcustomResultMapper,\n\t\t\tqueryMetadata,\n\t\t\tcacheConfig,\n\t\t);\n\t}\n\n\tabstract transaction(\n\t\ttransaction: (tx: SQLiteTransaction) => Result,\n\t\tconfig?: SQLiteTransactionConfig,\n\t): Result;\n\n\trun(query: SQL): Result {\n\t\tconst staticQuery = this.dialect.sqlToQuery(query);\n\t\ttry {\n\t\t\treturn this.prepareOneTimeQuery(staticQuery, undefined, 'run', false).run() as Result;\n\t\t} catch (err) {\n\t\t\tthrow new DrizzleError({ cause: err, message: `Failed to run the query '${staticQuery.sql}'` });\n\t\t}\n\t}\n\n\t/** @internal */\n\textractRawRunValueFromBatchResult(result: unknown) {\n\t\treturn result;\n\t}\n\n\tall(query: SQL): Result {\n\t\treturn this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), undefined, 'run', false).all() as Result<\n\t\t\tTResultKind,\n\t\t\tT[]\n\t\t>;\n\t}\n\n\t/** @internal */\n\textractRawAllValueFromBatchResult(_result: unknown): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n\n\tget(query: SQL): Result {\n\t\treturn this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), undefined, 'run', false).get() as Result<\n\t\t\tTResultKind,\n\t\t\tT\n\t\t>;\n\t}\n\n\t/** @internal */\n\textractRawGetValueFromBatchResult(_result: unknown): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n\n\tvalues(\n\t\tquery: SQL,\n\t): Result {\n\t\treturn this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), undefined, 'run', false).values() as Result<\n\t\t\tTResultKind,\n\t\t\tT[]\n\t\t>;\n\t}\n\n\tasync count(sql: SQL) {\n\t\tconst result = await this.values(sql) as [[number]];\n\n\t\treturn result[0][0];\n\t}\n\n\t/** @internal */\n\textractRawValuesValueFromBatchResult(_result: unknown): unknown {\n\t\tthrow new Error('Not implemented');\n\t}\n}\n\nexport type Result = { sync: TResult; async: Promise }[TKind];\n\nexport type DBResult = { sync: TResult; async: SQLiteRaw }[TKind];\n\nexport abstract class SQLiteTransaction<\n\tTResultType extends 'sync' | 'async',\n\tTRunResult,\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n> extends BaseSQLiteDatabase {\n\tstatic override readonly [entityKind]: string = 'SQLiteTransaction';\n\n\tconstructor(\n\t\tresultType: TResultType,\n\t\tdialect: { sync: SQLiteSyncDialect; async: SQLiteAsyncDialect }[TResultType],\n\t\tsession: SQLiteSession,\n\t\tprotected schema: {\n\t\t\tfullSchema: Record;\n\t\t\tschema: TSchema;\n\t\t\ttableNamesMap: Record;\n\t\t} | undefined,\n\t\tprotected readonly nestedIndex = 0,\n\t) {\n\t\tsuper(resultType, dialect, session, schema);\n\t}\n\n\trollback(): never {\n\t\tthrow new TransactionRollbackError();\n\t}\n}\n", "//# sourceMappingURL=subquery.js.map", "import type { BuildColumns } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { TypedQueryBuilder } from '~/query-builders/query-builder.ts';\nimport type { AddAliasToSelection } from '~/query-builders/select.types.ts';\nimport { SelectionProxyHandler } from '~/selection-proxy.ts';\nimport type { ColumnsSelection, SQL } from '~/sql/sql.ts';\nimport { getTableColumns } from '~/utils.ts';\nimport type { SQLiteColumn, SQLiteColumnBuilderBase } from './columns/common.ts';\nimport { QueryBuilder } from './query-builders/query-builder.ts';\nimport { sqliteTable } from './table.ts';\nimport { SQLiteViewBase } from './view-base.ts';\n\nexport interface ViewBuilderConfig {\n\talgorithm?: 'undefined' | 'merge' | 'temptable';\n\tdefiner?: string;\n\tsqlSecurity?: 'definer' | 'invoker';\n\twithCheckOption?: 'cascaded' | 'local';\n}\n\nexport class ViewBuilderCore<\n\tTConfig extends { name: string; columns?: unknown },\n> {\n\tstatic readonly [entityKind]: string = 'SQLiteViewBuilderCore';\n\n\tdeclare readonly _: {\n\t\treadonly name: TConfig['name'];\n\t\treadonly columns: TConfig['columns'];\n\t};\n\n\tconstructor(\n\t\tprotected name: TConfig['name'],\n\t) {}\n\n\tprotected config: ViewBuilderConfig = {};\n}\n\nexport class ViewBuilder extends ViewBuilderCore<{ name: TName }> {\n\tstatic override readonly [entityKind]: string = 'SQLiteViewBuilder';\n\n\tas(\n\t\tqb: TypedQueryBuilder | ((qb: QueryBuilder) => TypedQueryBuilder),\n\t): SQLiteViewWithSelection> {\n\t\tif (typeof qb === 'function') {\n\t\t\tqb = qb(new QueryBuilder());\n\t\t}\n\t\tconst selectionProxy = new SelectionProxyHandler({\n\t\t\talias: this.name,\n\t\t\tsqlBehavior: 'error',\n\t\t\tsqlAliasedBehavior: 'alias',\n\t\t\treplaceOriginalName: true,\n\t\t});\n\t\t// const aliasedSelectedFields = new Proxy(qb.getSelectedFields(), selectionProxy);\n\t\tconst aliasedSelectedFields = qb.getSelectedFields();\n\t\treturn new Proxy(\n\t\t\tnew SQLiteView({\n\t\t\t\t// sqliteConfig: this.config,\n\t\t\t\tconfig: {\n\t\t\t\t\tname: this.name,\n\t\t\t\t\tschema: undefined,\n\t\t\t\t\tselectedFields: aliasedSelectedFields,\n\t\t\t\t\tquery: qb.getSQL().inlineParams(),\n\t\t\t\t},\n\t\t\t}),\n\t\t\tselectionProxy as any,\n\t\t) as SQLiteViewWithSelection>;\n\t}\n}\n\nexport class ManualViewBuilder<\n\tTName extends string = string,\n\tTColumns extends Record = Record,\n> extends ViewBuilderCore<\n\t{ name: TName; columns: TColumns }\n> {\n\tstatic override readonly [entityKind]: string = 'SQLiteManualViewBuilder';\n\n\tprivate columns: Record;\n\n\tconstructor(\n\t\tname: TName,\n\t\tcolumns: TColumns,\n\t) {\n\t\tsuper(name);\n\t\tthis.columns = getTableColumns(sqliteTable(name, columns)) as BuildColumns;\n\t}\n\n\texisting(): SQLiteViewWithSelection> {\n\t\treturn new Proxy(\n\t\t\tnew SQLiteView({\n\t\t\t\tconfig: {\n\t\t\t\t\tname: this.name,\n\t\t\t\t\tschema: undefined,\n\t\t\t\t\tselectedFields: this.columns,\n\t\t\t\t\tquery: undefined,\n\t\t\t\t},\n\t\t\t}),\n\t\t\tnew SelectionProxyHandler({\n\t\t\t\talias: this.name,\n\t\t\t\tsqlBehavior: 'error',\n\t\t\t\tsqlAliasedBehavior: 'alias',\n\t\t\t\treplaceOriginalName: true,\n\t\t\t}),\n\t\t) as SQLiteViewWithSelection>;\n\t}\n\n\tas(query: SQL): SQLiteViewWithSelection> {\n\t\treturn new Proxy(\n\t\t\tnew SQLiteView({\n\t\t\t\tconfig: {\n\t\t\t\t\tname: this.name,\n\t\t\t\t\tschema: undefined,\n\t\t\t\t\tselectedFields: this.columns,\n\t\t\t\t\tquery: query.inlineParams(),\n\t\t\t\t},\n\t\t\t}),\n\t\t\tnew SelectionProxyHandler({\n\t\t\t\talias: this.name,\n\t\t\t\tsqlBehavior: 'error',\n\t\t\t\tsqlAliasedBehavior: 'alias',\n\t\t\t\treplaceOriginalName: true,\n\t\t\t}),\n\t\t) as SQLiteViewWithSelection>;\n\t}\n}\n\nexport class SQLiteView<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n\tTSelection extends ColumnsSelection = ColumnsSelection,\n> extends SQLiteViewBase {\n\tstatic override readonly [entityKind]: string = 'SQLiteView';\n\n\tconstructor({ config }: {\n\t\tconfig: {\n\t\t\tname: TName;\n\t\t\tschema: string | undefined;\n\t\t\tselectedFields: ColumnsSelection;\n\t\t\tquery: SQL | undefined;\n\t\t};\n\t}) {\n\t\tsuper(config);\n\t}\n}\n\nexport type SQLiteViewWithSelection<\n\tTName extends string,\n\tTExisting extends boolean,\n\tTSelection extends ColumnsSelection,\n> = SQLiteView & TSelection;\n\nexport function sqliteView(name: TName): ViewBuilder;\nexport function sqliteView>(\n\tname: TName,\n\tcolumns: TColumns,\n): ManualViewBuilder;\nexport function sqliteView(\n\tname: string,\n\tselection?: Record,\n): ViewBuilder | ManualViewBuilder {\n\tif (selection) {\n\t\treturn new ManualViewBuilder(name, selection);\n\t}\n\treturn new ViewBuilder(name);\n}\n\nexport const view = sqliteView;\n", "export * from './alias.ts';\nexport * from './checks.ts';\nexport * from './columns/index.ts';\nexport * from './db.ts';\nexport * from './dialect.ts';\nexport * from './foreign-keys.ts';\nexport * from './indexes.ts';\nexport * from './primary-keys.ts';\nexport * from './query-builders/index.ts';\nexport * from './session.ts';\nexport * from './subquery.ts';\nexport * from './table.ts';\nexport * from './unique-constraint.ts';\nexport * from './utils.ts';\nexport * from './view.ts';\n", "/// \n\nimport type { BatchItem } from '~/batch.ts';\nimport { type Cache, NoopCache } from '~/cache/core/index.ts';\nimport type { WithCacheConfig } from '~/cache/core/types.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { Logger } from '~/logger.ts';\nimport { NoopLogger } from '~/logger.ts';\nimport type { RelationalSchemaConfig, TablesRelationalConfig } from '~/relations.ts';\nimport type { PreparedQuery } from '~/session.ts';\nimport { fillPlaceholders, type Query, sql } from '~/sql/sql.ts';\nimport type { SQLiteAsyncDialect } from '~/sqlite-core/dialect.ts';\nimport { SQLiteTransaction } from '~/sqlite-core/index.ts';\nimport type { SelectedFieldsOrdered } from '~/sqlite-core/query-builders/select.types.ts';\nimport type {\n\tPreparedQueryConfig as PreparedQueryConfigBase,\n\tSQLiteExecuteMethod,\n\tSQLiteTransactionConfig,\n} from '~/sqlite-core/session.ts';\nimport { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/session.ts';\nimport { mapResultRow } from '~/utils.ts';\n\nexport interface SQLiteD1SessionOptions {\n\tlogger?: Logger;\n\tcache?: Cache;\n}\n\ntype PreparedQueryConfig = Omit;\n\nexport class SQLiteD1Session<\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n> extends SQLiteSession<'async', D1Result, TFullSchema, TSchema> {\n\tstatic override readonly [entityKind]: string = 'SQLiteD1Session';\n\n\tprivate logger: Logger;\n\tprivate cache: Cache;\n\n\tconstructor(\n\t\tprivate client: D1Database,\n\t\tdialect: SQLiteAsyncDialect,\n\t\tprivate schema: RelationalSchemaConfig | undefined,\n\t\tprivate options: SQLiteD1SessionOptions = {},\n\t) {\n\t\tsuper(dialect);\n\t\tthis.logger = options.logger ?? new NoopLogger();\n\t\tthis.cache = options.cache ?? new NoopCache();\n\t}\n\n\tprepareQuery(\n\t\tquery: Query,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t\tisResponseInArrayMode: boolean,\n\t\tcustomResultMapper?: (rows: unknown[][]) => unknown,\n\t\tqueryMetadata?: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t},\n\t\tcacheConfig?: WithCacheConfig,\n\t): D1PreparedQuery {\n\t\tconst stmt = this.client.prepare(query.sql);\n\t\treturn new D1PreparedQuery(\n\t\t\tstmt,\n\t\t\tquery,\n\t\t\tthis.logger,\n\t\t\tthis.cache,\n\t\t\tqueryMetadata,\n\t\t\tcacheConfig,\n\t\t\tfields,\n\t\t\texecuteMethod,\n\t\t\tisResponseInArrayMode,\n\t\t\tcustomResultMapper,\n\t\t);\n\t}\n\n\tasync batch[] | readonly BatchItem<'sqlite'>[]>(queries: T) {\n\t\tconst preparedQueries: PreparedQuery[] = [];\n\t\tconst builtQueries: D1PreparedStatement[] = [];\n\n\t\tfor (const query of queries) {\n\t\t\tconst preparedQuery = query._prepare();\n\t\t\tconst builtQuery = preparedQuery.getQuery();\n\t\t\tpreparedQueries.push(preparedQuery);\n\t\t\tif (builtQuery.params.length > 0) {\n\t\t\t\tbuiltQueries.push((preparedQuery as D1PreparedQuery).stmt.bind(...builtQuery.params));\n\t\t\t} else {\n\t\t\t\tconst builtQuery = preparedQuery.getQuery();\n\t\t\t\tbuiltQueries.push(\n\t\t\t\t\tthis.client.prepare(builtQuery.sql).bind(...builtQuery.params),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst batchResults = await this.client.batch(builtQueries);\n\t\treturn batchResults.map((result, i) => preparedQueries[i]!.mapResult(result, true));\n\t}\n\n\toverride extractRawAllValueFromBatchResult(result: unknown): unknown {\n\t\treturn (result as D1Result).results;\n\t}\n\n\toverride extractRawGetValueFromBatchResult(result: unknown): unknown {\n\t\treturn (result as D1Result).results[0];\n\t}\n\n\toverride extractRawValuesValueFromBatchResult(result: unknown): unknown {\n\t\treturn d1ToRawMapping((result as D1Result).results);\n\t}\n\n\toverride async transaction(\n\t\ttransaction: (tx: D1Transaction) => T | Promise,\n\t\tconfig?: SQLiteTransactionConfig,\n\t): Promise {\n\t\tconst tx = new D1Transaction('async', this.dialect, this, this.schema);\n\t\tawait this.run(sql.raw(`begin${config?.behavior ? ' ' + config.behavior : ''}`));\n\t\ttry {\n\t\t\tconst result = await transaction(tx);\n\t\t\tawait this.run(sql`commit`);\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tawait this.run(sql`rollback`);\n\t\t\tthrow err;\n\t\t}\n\t}\n}\n\nexport class D1Transaction<\n\tTFullSchema extends Record,\n\tTSchema extends TablesRelationalConfig,\n> extends SQLiteTransaction<'async', D1Result, TFullSchema, TSchema> {\n\tstatic override readonly [entityKind]: string = 'D1Transaction';\n\n\toverride async transaction(transaction: (tx: D1Transaction) => Promise): Promise {\n\t\tconst savepointName = `sp${this.nestedIndex}`;\n\t\tconst tx = new D1Transaction('async', this.dialect, this.session, this.schema, this.nestedIndex + 1);\n\t\tawait this.session.run(sql.raw(`savepoint ${savepointName}`));\n\t\ttry {\n\t\t\tconst result = await transaction(tx);\n\t\t\tawait this.session.run(sql.raw(`release savepoint ${savepointName}`));\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tawait this.session.run(sql.raw(`rollback to savepoint ${savepointName}`));\n\t\t\tthrow err;\n\t\t}\n\t}\n}\n\n/**\n * This function was taken from the D1 implementation: https://github.com/cloudflare/workerd/blob/4aae9f4c7ae30a59a88ca868c4aff88bda85c956/src/cloudflare/internal/d1-api.ts#L287\n * It may cause issues with duplicated column names in join queries, which should be fixed on the D1 side.\n * @param results\n * @returns\n */\nfunction d1ToRawMapping(results: any) {\n\tconst rows: unknown[][] = [];\n\tfor (const row of results) {\n\t\tconst entry = Object.keys(row).map((k) => row[k]);\n\t\trows.push(entry);\n\t}\n\treturn rows;\n}\n\nexport class D1PreparedQuery extends SQLitePreparedQuery<\n\t{ type: 'async'; run: D1Response; all: T['all']; get: T['get']; values: T['values']; execute: T['execute'] }\n> {\n\tstatic override readonly [entityKind]: string = 'D1PreparedQuery';\n\n\t/** @internal */\n\tcustomResultMapper?: (rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => unknown;\n\n\t/** @internal */\n\tfields?: SelectedFieldsOrdered;\n\n\t/** @internal */\n\tstmt: D1PreparedStatement;\n\n\tconstructor(\n\t\tstmt: D1PreparedStatement,\n\t\tquery: Query,\n\t\tprivate logger: Logger,\n\t\tcache: Cache,\n\t\tqueryMetadata: {\n\t\t\ttype: 'select' | 'update' | 'delete' | 'insert';\n\t\t\ttables: string[];\n\t\t} | undefined,\n\t\tcacheConfig: WithCacheConfig | undefined,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t\tprivate _isResponseInArrayMode: boolean,\n\t\tcustomResultMapper?: (rows: unknown[][]) => unknown,\n\t) {\n\t\tsuper('async', executeMethod, query, cache, queryMetadata, cacheConfig);\n\t\tthis.customResultMapper = customResultMapper;\n\t\tthis.fields = fields;\n\t\tthis.stmt = stmt;\n\t}\n\n\tasync run(placeholderValues?: Record): Promise {\n\t\tconst params = fillPlaceholders(this.query.params, placeholderValues ?? {});\n\t\tthis.logger.logQuery(this.query.sql, params);\n\t\treturn await this.queryWithCache(this.query.sql, params, async () => {\n\t\t\treturn this.stmt.bind(...params).run();\n\t\t});\n\t}\n\n\tasync all(placeholderValues?: Record): Promise {\n\t\tconst { fields, query, logger, stmt, customResultMapper } = this;\n\t\tif (!fields && !customResultMapper) {\n\t\t\tconst params = fillPlaceholders(query.params, placeholderValues ?? {});\n\t\t\tlogger.logQuery(query.sql, params);\n\t\t\treturn await this.queryWithCache(query.sql, params, async () => {\n\t\t\t\treturn stmt.bind(...params).all().then(({ results }) => this.mapAllResult(results!));\n\t\t\t});\n\t\t}\n\n\t\tconst rows = await this.values(placeholderValues);\n\n\t\treturn this.mapAllResult(rows);\n\t}\n\n\toverride mapAllResult(rows: unknown, isFromBatch?: boolean): unknown {\n\t\tif (isFromBatch) {\n\t\t\trows = d1ToRawMapping((rows as D1Result).results);\n\t\t}\n\n\t\tif (!this.fields && !this.customResultMapper) {\n\t\t\treturn rows;\n\t\t}\n\n\t\tif (this.customResultMapper) {\n\t\t\treturn this.customResultMapper(rows as unknown[][]);\n\t\t}\n\n\t\treturn (rows as unknown[][]).map((row) => mapResultRow(this.fields!, row, this.joinsNotNullableMap));\n\t}\n\n\tasync get(placeholderValues?: Record): Promise {\n\t\tconst { fields, joinsNotNullableMap, query, logger, stmt, customResultMapper } = this;\n\t\tif (!fields && !customResultMapper) {\n\t\t\tconst params = fillPlaceholders(query.params, placeholderValues ?? {});\n\t\t\tlogger.logQuery(query.sql, params);\n\t\t\treturn await this.queryWithCache(query.sql, params, async () => {\n\t\t\t\treturn stmt.bind(...params).all().then(({ results }) => results![0]);\n\t\t\t});\n\t\t}\n\n\t\tconst rows = await this.values(placeholderValues);\n\n\t\tif (!rows[0]) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (customResultMapper) {\n\t\t\treturn customResultMapper(rows) as T['all'];\n\t\t}\n\n\t\treturn mapResultRow(fields!, rows[0], joinsNotNullableMap);\n\t}\n\n\toverride mapGetResult(result: unknown, isFromBatch?: boolean): unknown {\n\t\tif (isFromBatch) {\n\t\t\tresult = d1ToRawMapping((result as D1Result).results)[0];\n\t\t}\n\n\t\tif (!this.fields && !this.customResultMapper) {\n\t\t\treturn result;\n\t\t}\n\n\t\tif (this.customResultMapper) {\n\t\t\treturn this.customResultMapper([result as unknown[]]) as T['all'];\n\t\t}\n\n\t\treturn mapResultRow(this.fields!, result as unknown[], this.joinsNotNullableMap);\n\t}\n\n\tasync values(placeholderValues?: Record): Promise {\n\t\tconst params = fillPlaceholders(this.query.params, placeholderValues ?? {});\n\t\tthis.logger.logQuery(this.query.sql, params);\n\t\treturn await this.queryWithCache(this.query.sql, params, async () => {\n\t\t\treturn this.stmt.bind(...params).raw();\n\t\t});\n\t}\n\n\t/** @internal */\n\tisResponseInArrayMode(): boolean {\n\t\treturn this._isResponseInArrayMode;\n\t}\n}\n", "/// \nimport type { D1Database as MiniflareD1Database } from '@miniflare/d1';\nimport type { BatchItem, BatchResponse } from '~/batch.ts';\nimport { entityKind } from '~/entity.ts';\nimport { DefaultLogger } from '~/logger.ts';\nimport {\n\tcreateTableRelationsHelpers,\n\textractTablesRelationalConfig,\n\ttype ExtractTablesWithRelations,\n\ttype RelationalSchemaConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport { BaseSQLiteDatabase } from '~/sqlite-core/db.ts';\nimport { SQLiteAsyncDialect } from '~/sqlite-core/dialect.ts';\nimport type { DrizzleConfig, IfNotImported } from '~/utils.ts';\nimport { SQLiteD1Session } from './session.ts';\n\nexport type AnyD1Database = IfNotImported<\n\tD1Database,\n\tMiniflareD1Database,\n\tD1Database | IfNotImported\n>;\n\nexport class DrizzleD1Database<\n\tTSchema extends Record = Record,\n> extends BaseSQLiteDatabase<'async', D1Result, TSchema> {\n\tstatic override readonly [entityKind]: string = 'D1Database';\n\n\t/** @internal */\n\tdeclare readonly session: SQLiteD1Session>;\n\n\tasync batch, T extends Readonly<[U, ...U[]]>>(\n\t\tbatch: T,\n\t): Promise> {\n\t\treturn this.session.batch(batch) as Promise>;\n\t}\n}\n\nexport function drizzle<\n\tTSchema extends Record = Record,\n\tTClient extends AnyD1Database = AnyD1Database,\n>(\n\tclient: TClient,\n\tconfig: DrizzleConfig = {},\n): DrizzleD1Database & {\n\t$client: TClient;\n} {\n\tconst dialect = new SQLiteAsyncDialect({ casing: config.casing });\n\tlet logger;\n\tif (config.logger === true) {\n\t\tlogger = new DefaultLogger();\n\t} else if (config.logger !== false) {\n\t\tlogger = config.logger;\n\t}\n\n\tlet schema: RelationalSchemaConfig | undefined;\n\tif (config.schema) {\n\t\tconst tablesConfig = extractTablesRelationalConfig(\n\t\t\tconfig.schema,\n\t\t\tcreateTableRelationsHelpers,\n\t\t);\n\t\tschema = {\n\t\t\tfullSchema: config.schema,\n\t\t\tschema: tablesConfig.tables,\n\t\t\ttableNamesMap: tablesConfig.tableNamesMap,\n\t\t};\n\t}\n\n\tconst session = new SQLiteD1Session(client as D1Database, dialect, schema, { logger, cache: config.cache });\n\tconst db = new DrizzleD1Database('async', dialect, session, schema) as DrizzleD1Database;\n\t( db).$client = client;\n\t( db).$cache = config.cache;\n\tif (( db).$cache) {\n\t\t( db).$cache['invalidate'] = config.cache?.onMutate;\n\t}\n\n\treturn db as any;\n}\n", "export * from './driver.ts';\nexport * from './session.ts';\n", "//# sourceMappingURL=operations.js.map", "export * from './alias.ts';\nexport * from './column-builder.ts';\nexport * from './column.ts';\nexport * from './entity.ts';\nexport * from './errors.ts';\nexport * from './logger.ts';\nexport * from './operations.ts';\nexport * from './query-promise.ts';\nexport * from './relations.ts';\nexport * from './sql/index.ts';\nexport * from './subquery.ts';\nexport * from './table.ts';\nexport * from './utils.ts';\nexport * from './view-common.ts';\n", "import {\n sqliteTable,\n integer,\n text,\n real,\n uniqueIndex,\n primaryKey,\n check,\n customType,\n} from 'drizzle-orm/sqlite-core'\nimport { relations, sql } from 'drizzle-orm'\n\nconst jsonText = (name: string) =>\n customType<{ data: T | null; driverData: string | null }>({\n dataType() {\n return 'text'\n },\n toDriver(value) {\n if (value === undefined || value === null) return null\n return JSON.stringify(value)\n },\n fromDriver(value) {\n if (value === null || value === undefined) return null\n try {\n return JSON.parse(String(value)) as T\n } catch {\n return null\n }\n },\n })(name)\n\nconst numericText = (name: string) =>\n customType<{ data: string | null; driverData: string | null }>({\n dataType() {\n return 'text'\n },\n toDriver(value) {\n if (value === undefined || value === null) return null\n return String(value)\n },\n fromDriver(value) {\n if (value === null || value === undefined) return null\n return String(value)\n },\n })(name)\n\nconst staffRoleValues = ['super_admin', 'admin', 'marketer', 'delivery_staff'] as const\nconst staffPermissionValues = ['crud_product', 'make_coupon', 'crud_staff_users'] as const\nconst uploadStatusValues = ['pending', 'claimed'] as const\nconst paymentStatusValues = ['pending', 'success', 'cod', 'failed'] as const\n\nexport const staffRoleEnum = (name: string) => text(name, { enum: staffRoleValues })\nexport const staffPermissionEnum = (name: string) => text(name, { enum: staffPermissionValues })\nexport const uploadStatusEnum = (name: string) => text(name, { enum: uploadStatusValues })\nexport const paymentStatusEnum = (name: string) => text(name, { enum: paymentStatusValues })\n\nexport const users = sqliteTable('users', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text(),\n email: text(),\n mobile: text(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_email: uniqueIndex('unique_email').on(t.email),\n}))\n\nexport const userDetails = sqliteTable('user_details', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id).unique(),\n bio: text('bio'),\n dateOfBirth: integer('date_of_birth', { mode: 'timestamp' }),\n gender: text('gender'),\n occupation: text('occupation'),\n profileImage: text('profile_image'),\n isSuspended: integer('is_suspended', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const userCreds = sqliteTable('user_creds', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n userPassword: text('user_password').notNull(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const addressZones = sqliteTable('address_zones', {\n id: integer().primaryKey({ autoIncrement: true }),\n zoneName: text('zone_name').notNull(),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const addressAreas = sqliteTable('address_areas', {\n id: integer().primaryKey({ autoIncrement: true }),\n placeName: text('place_name').notNull(),\n zoneId: integer('zone_id').references(() => addressZones.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const addresses = sqliteTable('addresses', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n name: text('name').notNull(),\n phone: text('phone').notNull(),\n addressLine1: text('address_line1').notNull(),\n addressLine2: text('address_line2'),\n city: text('city').notNull(),\n state: text('state').notNull(),\n pincode: text('pincode').notNull(),\n isDefault: integer('is_default', { mode: 'boolean' }).notNull().default(false),\n latitude: real('latitude'),\n longitude: real('longitude'),\n googleMapsUrl: text('google_maps_url'),\n adminLatitude: real('admin_latitude'),\n adminLongitude: real('admin_longitude'),\n zoneId: integer('zone_id').references(() => addressZones.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const staffRoles = sqliteTable('staff_roles', {\n id: integer().primaryKey({ autoIncrement: true }),\n roleName: staffRoleEnum('role_name').notNull(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_role_name: uniqueIndex('unique_role_name').on(t.roleName),\n}))\n\nexport const staffPermissions = sqliteTable('staff_permissions', {\n id: integer().primaryKey({ autoIncrement: true }),\n permissionName: staffPermissionEnum('permission_name').notNull(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_permission_name: uniqueIndex('unique_permission_name').on(t.permissionName),\n}))\n\nexport const staffRolePermissions = sqliteTable('staff_role_permissions', {\n id: integer().primaryKey({ autoIncrement: true }),\n staffRoleId: integer('staff_role_id').notNull().references(() => staffRoles.id),\n staffPermissionId: integer('staff_permission_id').notNull().references(() => staffPermissions.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_role_permission: uniqueIndex('unique_role_permission').on(t.staffRoleId, t.staffPermissionId),\n}))\n\nexport const staffUsers = sqliteTable('staff_users', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text().notNull(),\n password: text().notNull(),\n staffRoleId: integer('staff_role_id').references(() => staffRoles.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const storeInfo = sqliteTable('store_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text().notNull(),\n description: text(),\n imageUrl: text('image_url'),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n owner: integer('owner').notNull().references(() => staffUsers.id),\n})\n\nexport const units = sqliteTable('units', {\n id: integer().primaryKey({ autoIncrement: true }),\n shortNotation: text('short_notation').notNull(),\n fullName: text('full_name').notNull(),\n}, (t) => ({\n unq_short_notation: uniqueIndex('unique_short_notation').on(t.shortNotation),\n}))\n\nexport const productInfo = sqliteTable('product_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text().notNull(),\n shortDescription: text('short_description'),\n longDescription: text('long_description'),\n unitId: integer('unit_id').notNull().references(() => units.id),\n price: numericText('price').notNull(),\n marketPrice: numericText('market_price'),\n images: jsonText('images'),\n isOutOfStock: integer('is_out_of_stock', { mode: 'boolean' }).notNull().default(false),\n isSuspended: integer('is_suspended', { mode: 'boolean' }).notNull().default(false),\n isFlashAvailable: integer('is_flash_available', { mode: 'boolean' }).notNull().default(false),\n flashPrice: numericText('flash_price'),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n incrementStep: real('increment_step').notNull().default(1),\n productQuantity: real('product_quantity').notNull().default(1),\n storeId: integer('store_id').references(() => storeInfo.id),\n})\n\nexport const productGroupInfo = sqliteTable('product_group_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n groupName: text('group_name').notNull(),\n description: text(),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productGroupMembership = sqliteTable('product_group_membership', {\n productId: integer('product_id').notNull().references(() => productInfo.id),\n groupId: integer('group_id').notNull().references(() => productGroupInfo.id),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n pk: primaryKey({ columns: [t.productId, t.groupId], name: 'product_group_membership_pk' }),\n}))\n\nexport const homeBanners = sqliteTable('home_banners', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text('name').notNull(),\n imageUrl: text('image_url').notNull(),\n description: text('description'),\n productIds: jsonText('product_ids'),\n redirectUrl: text('redirect_url'),\n serialNum: integer('serial_num'),\n isActive: integer('is_active', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n lastUpdated: integer('last_updated', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productReviews = sqliteTable('product_reviews', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n reviewBody: text('review_body').notNull(),\n imageUrls: jsonText('image_urls').$defaultFn(() => []),\n reviewTime: integer('review_time', { mode: 'timestamp' }).notNull().defaultNow(),\n ratings: real('ratings').notNull(),\n adminResponse: text('admin_response'),\n adminResponseImages: jsonText('admin_response_images').$defaultFn(() => []),\n}, (t) => ({\n ratingCheck: check('rating_check', sql`${t.ratings} >= 1 AND ${t.ratings} <= 5`),\n}))\n\nexport const uploadUrlStatus = sqliteTable('upload_url_status', {\n id: integer().primaryKey({ autoIncrement: true }),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n key: text('key').notNull(),\n status: uploadStatusEnum('status').notNull().default('pending'),\n})\n\nexport const productTagInfo = sqliteTable('product_tag_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n tagName: text('tag_name').notNull().unique(),\n tagDescription: text('tag_description'),\n imageUrl: text('image_url'),\n isDashboardTag: integer('is_dashboard_tag', { mode: 'boolean' }).notNull().default(false),\n relatedStores: jsonText('related_stores').$defaultFn(() => []),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productTags = sqliteTable('product_tags', {\n id: integer().primaryKey({ autoIncrement: true }),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n tagId: integer('tag_id').notNull().references(() => productTagInfo.id),\n assignedAt: integer('assigned_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_product_tag: uniqueIndex('unique_product_tag').on(t.productId, t.tagId),\n}))\n\nexport const deliverySlotInfo = sqliteTable('delivery_slot_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n deliveryTime: integer('delivery_time', { mode: 'timestamp' }).notNull(),\n freezeTime: integer('freeze_time', { mode: 'timestamp' }).notNull(),\n isActive: integer('is_active', { mode: 'boolean' }).notNull().default(true),\n isFlash: integer('is_flash', { mode: 'boolean' }).notNull().default(false),\n isCapacityFull: integer('is_capacity_full', { mode: 'boolean' }).notNull().default(false),\n deliverySequence: jsonText>('delivery_sequence').$defaultFn(() => ({})),\n groupIds: jsonText('group_ids').$defaultFn(() => []),\n})\n\nexport const vendorSnippets = sqliteTable('vendor_snippets', {\n id: integer().primaryKey({ autoIncrement: true }),\n snippetCode: text('snippet_code').notNull().unique(),\n slotId: integer('slot_id').references(() => deliverySlotInfo.id),\n isPermanent: integer('is_permanent', { mode: 'boolean' }).notNull().default(false),\n productIds: jsonText('product_ids').notNull(),\n validTill: integer('valid_till', { mode: 'timestamp' }),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productSlots = sqliteTable('product_slots', {\n productId: integer('product_id').notNull().references(() => productInfo.id),\n slotId: integer('slot_id').notNull().references(() => deliverySlotInfo.id),\n}, (t) => ({\n pk: primaryKey({ columns: [t.productId, t.slotId], name: 'product_slot_pk' }),\n}))\n\nexport const specialDeals = sqliteTable('special_deals', {\n id: integer().primaryKey({ autoIncrement: true }),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n quantity: numericText('quantity').notNull(),\n price: numericText('price').notNull(),\n validTill: integer('valid_till', { mode: 'timestamp' }).notNull(),\n})\n\nexport const paymentInfoTable = sqliteTable('payment_info', {\n id: integer().primaryKey({ autoIncrement: true }),\n status: text().notNull(),\n gateway: text().notNull(),\n orderId: text('order_id'),\n token: text('token'),\n merchantOrderId: text('merchant_order_id').notNull().unique(),\n payload: jsonText('payload'),\n})\n\nexport const orders = sqliteTable('orders', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n addressId: integer('address_id').notNull().references(() => addresses.id),\n slotId: integer('slot_id').references(() => deliverySlotInfo.id),\n isCod: integer('is_cod', { mode: 'boolean' }).notNull().default(false),\n isOnlinePayment: integer('is_online_payment', { mode: 'boolean' }).notNull().default(false),\n paymentInfoId: integer('payment_info_id').references(() => paymentInfoTable.id),\n totalAmount: numericText('total_amount').notNull(),\n deliveryCharge: numericText('delivery_charge').notNull().default('0'),\n readableId: integer('readable_id').notNull(),\n adminNotes: text('admin_notes'),\n userNotes: text('user_notes'),\n orderGroupId: text('order_group_id'),\n orderGroupProportion: numericText('order_group_proportion'),\n isFlashDelivery: integer('is_flash_delivery', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const orderItems = sqliteTable('order_items', {\n id: integer().primaryKey({ autoIncrement: true }),\n orderId: integer('order_id').notNull().references(() => orders.id),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n quantity: text('quantity').notNull(),\n price: numericText('price').notNull(),\n discountedPrice: numericText('discounted_price'),\n is_packaged: integer('is_packaged', { mode: 'boolean' }).notNull().default(false),\n is_package_verified: integer('is_package_verified', { mode: 'boolean' }).notNull().default(false),\n})\n\nexport const orderStatus = sqliteTable('order_status', {\n id: integer().primaryKey({ autoIncrement: true }),\n orderTime: integer('order_time', { mode: 'timestamp' }).notNull().defaultNow(),\n userId: integer('user_id').notNull().references(() => users.id),\n orderId: integer('order_id').notNull().references(() => orders.id),\n isPackaged: integer('is_packaged', { mode: 'boolean' }).notNull().default(false),\n isDelivered: integer('is_delivered', { mode: 'boolean' }).notNull().default(false),\n isCancelled: integer('is_cancelled', { mode: 'boolean' }).notNull().default(false),\n cancelReason: text('cancel_reason'),\n isCancelledByAdmin: integer('is_cancelled_by_admin', { mode: 'boolean' }),\n paymentStatus: paymentStatusEnum('payment_state').notNull().default('pending'),\n cancellationUserNotes: text('cancellation_user_notes'),\n cancellationAdminNotes: text('cancellation_admin_notes'),\n cancellationReviewed: integer('cancellation_reviewed', { mode: 'boolean' }).notNull().default(false),\n cancellationReviewedAt: integer('cancellation_reviewed_at', { mode: 'timestamp' }),\n refundCouponId: integer('refund_coupon_id').references(() => coupons.id),\n})\n\nexport const payments = sqliteTable('payments', {\n id: integer().primaryKey({ autoIncrement: true }),\n status: text().notNull(),\n gateway: text().notNull(),\n orderId: integer('order_id').notNull().references(() => orders.id),\n token: text('token'),\n merchantOrderId: text('merchant_order_id').notNull().unique(),\n payload: jsonText('payload'),\n})\n\nexport const refunds = sqliteTable('refunds', {\n id: integer().primaryKey({ autoIncrement: true }),\n orderId: integer('order_id').notNull().references(() => orders.id),\n refundAmount: numericText('refund_amount'),\n refundStatus: text('refund_status').default('none'),\n merchantRefundId: text('merchant_refund_id'),\n refundProcessedAt: integer('refund_processed_at', { mode: 'timestamp' }),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const keyValStore = sqliteTable('key_val_store', {\n key: text('key').primaryKey(),\n value: jsonText('value'),\n})\n\nexport const notifications = sqliteTable('notifications', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n title: text().notNull(),\n body: text().notNull(),\n type: text(),\n isRead: integer('is_read', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const productCategories = sqliteTable('product_categories', {\n id: integer().primaryKey({ autoIncrement: true }),\n name: text().notNull(),\n description: text(),\n})\n\nexport const cartItems = sqliteTable('cart_items', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n quantity: numericText('quantity').notNull(),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n}, (t) => ({\n unq_user_product: uniqueIndex('unique_user_product').on(t.userId, t.productId),\n}))\n\nexport const complaints = sqliteTable('complaints', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n orderId: integer('order_id').references(() => orders.id),\n complaintBody: text('complaint_body').notNull(),\n images: jsonText('images'),\n response: text('response'),\n isResolved: integer('is_resolved', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const coupons = sqliteTable('coupons', {\n id: integer().primaryKey({ autoIncrement: true }),\n couponCode: text('coupon_code').notNull().unique(),\n isUserBased: integer('is_user_based', { mode: 'boolean' }).notNull().default(false),\n discountPercent: numericText('discount_percent'),\n flatDiscount: numericText('flat_discount'),\n minOrder: numericText('min_order'),\n productIds: jsonText('product_ids'),\n createdBy: integer('created_by').notNull().references(() => staffUsers.id),\n maxValue: numericText('max_value'),\n isApplyForAll: integer('is_apply_for_all', { mode: 'boolean' }).notNull().default(false),\n validTill: integer('valid_till', { mode: 'timestamp' }),\n maxLimitForUser: integer('max_limit_for_user'),\n isInvalidated: integer('is_invalidated', { mode: 'boolean' }).notNull().default(false),\n exclusiveApply: integer('exclusive_apply', { mode: 'boolean' }).notNull().default(false),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const couponUsage = sqliteTable('coupon_usage', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n couponId: integer('coupon_id').notNull().references(() => coupons.id),\n orderId: integer('order_id').references(() => orders.id),\n orderItemId: integer('order_item_id').references(() => orderItems.id),\n usedAt: integer('used_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const couponApplicableUsers = sqliteTable('coupon_applicable_users', {\n id: integer().primaryKey({ autoIncrement: true }),\n couponId: integer('coupon_id').notNull().references(() => coupons.id),\n userId: integer('user_id').notNull().references(() => users.id),\n}, (t) => ({\n unq_coupon_user: uniqueIndex('unique_coupon_user').on(t.couponId, t.userId),\n}))\n\nexport const couponApplicableProducts = sqliteTable('coupon_applicable_products', {\n id: integer().primaryKey({ autoIncrement: true }),\n couponId: integer('coupon_id').notNull().references(() => coupons.id),\n productId: integer('product_id').notNull().references(() => productInfo.id),\n}, (t) => ({\n unq_coupon_product: uniqueIndex('unique_coupon_product').on(t.couponId, t.productId),\n}))\n\nexport const userIncidents = sqliteTable('user_incidents', {\n id: integer().primaryKey({ autoIncrement: true }),\n userId: integer('user_id').notNull().references(() => users.id),\n orderId: integer('order_id').references(() => orders.id),\n dateAdded: integer('date_added', { mode: 'timestamp' }).notNull().defaultNow(),\n adminComment: text('admin_comment'),\n addedBy: integer('added_by').references(() => staffUsers.id),\n negativityScore: integer('negativity_score'),\n})\n\nexport const reservedCoupons = sqliteTable('reserved_coupons', {\n id: integer().primaryKey({ autoIncrement: true }),\n secretCode: text('secret_code').notNull().unique(),\n couponCode: text('coupon_code').notNull(),\n discountPercent: numericText('discount_percent'),\n flatDiscount: numericText('flat_discount'),\n minOrder: numericText('min_order'),\n productIds: jsonText('product_ids'),\n maxValue: numericText('max_value'),\n validTill: integer('valid_till', { mode: 'timestamp' }),\n maxLimitForUser: integer('max_limit_for_user'),\n exclusiveApply: integer('exclusive_apply', { mode: 'boolean' }).notNull().default(false),\n isRedeemed: integer('is_redeemed', { mode: 'boolean' }).notNull().default(false),\n redeemedBy: integer('redeemed_by').references(() => users.id),\n redeemedAt: integer('redeemed_at', { mode: 'timestamp' }),\n createdBy: integer('created_by').notNull().references(() => staffUsers.id),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n})\n\nexport const notifCreds = sqliteTable('notif_creds', {\n id: integer().primaryKey({ autoIncrement: true }),\n token: text().notNull().unique(),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n userId: integer('user_id').notNull().references(() => users.id),\n lastVerified: integer('last_verified', { mode: 'timestamp' }),\n})\n\nexport const unloggedUserTokens = sqliteTable('unlogged_user_tokens', {\n id: integer().primaryKey({ autoIncrement: true }),\n token: text().notNull().unique(),\n addedAt: integer('added_at', { mode: 'timestamp' }).notNull().defaultNow(),\n lastVerified: integer('last_verified', { mode: 'timestamp' }),\n})\n\nexport const userNotifications = sqliteTable('user_notifications', {\n id: integer().primaryKey({ autoIncrement: true }),\n title: text('title').notNull(),\n imageUrl: text('image_url'),\n createdAt: integer('created_at', { mode: 'timestamp' }).notNull().defaultNow(),\n body: text('body').notNull(),\n applicableUsers: jsonText('applicable_users'),\n})\n\n// Relations\nexport const usersRelations = relations(users, ({ many, one }) => ({\n addresses: many(addresses),\n orders: many(orders),\n notifications: many(notifications),\n cartItems: many(cartItems),\n userCreds: one(userCreds),\n coupons: many(coupons),\n couponUsages: many(couponUsage),\n applicableCoupons: many(couponApplicableUsers),\n userDetails: one(userDetails),\n notifCreds: many(notifCreds),\n userIncidents: many(userIncidents),\n}))\n\nexport const userCredsRelations = relations(userCreds, ({ one }) => ({\n user: one(users, { fields: [userCreds.userId], references: [users.id] }),\n}))\n\nexport const staffUsersRelations = relations(staffUsers, ({ one, many }) => ({\n role: one(staffRoles, { fields: [staffUsers.staffRoleId], references: [staffRoles.id] }),\n coupons: many(coupons),\n stores: many(storeInfo),\n}))\n\nexport const addressesRelations = relations(addresses, ({ one, many }) => ({\n user: one(users, { fields: [addresses.userId], references: [users.id] }),\n orders: many(orders),\n zone: one(addressZones, { fields: [addresses.zoneId], references: [addressZones.id] }),\n}))\n\nexport const unitsRelations = relations(units, ({ many }) => ({\n products: many(productInfo),\n}))\n\nexport const productInfoRelations = relations(productInfo, ({ one, many }) => ({\n unit: one(units, { fields: [productInfo.unitId], references: [units.id] }),\n store: one(storeInfo, { fields: [productInfo.storeId], references: [storeInfo.id] }),\n productSlots: many(productSlots),\n specialDeals: many(specialDeals),\n orderItems: many(orderItems),\n cartItems: many(cartItems),\n tags: many(productTags),\n applicableCoupons: many(couponApplicableProducts),\n reviews: many(productReviews),\n groups: many(productGroupMembership),\n}))\n\nexport const productTagInfoRelations = relations(productTagInfo, ({ many }) => ({\n products: many(productTags),\n}))\n\nexport const productTagsRelations = relations(productTags, ({ one }) => ({\n product: one(productInfo, { fields: [productTags.productId], references: [productInfo.id] }),\n tag: one(productTagInfo, { fields: [productTags.tagId], references: [productTagInfo.id] }),\n}))\n\nexport const deliverySlotInfoRelations = relations(deliverySlotInfo, ({ many }) => ({\n productSlots: many(productSlots),\n orders: many(orders),\n vendorSnippets: many(vendorSnippets),\n}))\n\nexport const productSlotsRelations = relations(productSlots, ({ one }) => ({\n product: one(productInfo, { fields: [productSlots.productId], references: [productInfo.id] }),\n slot: one(deliverySlotInfo, { fields: [productSlots.slotId], references: [deliverySlotInfo.id] }),\n}))\n\nexport const specialDealsRelations = relations(specialDeals, ({ one }) => ({\n product: one(productInfo, { fields: [specialDeals.productId], references: [productInfo.id] }),\n}))\n\nexport const ordersRelations = relations(orders, ({ one, many }) => ({\n user: one(users, { fields: [orders.userId], references: [users.id] }),\n address: one(addresses, { fields: [orders.addressId], references: [addresses.id] }),\n slot: one(deliverySlotInfo, { fields: [orders.slotId], references: [deliverySlotInfo.id] }),\n orderItems: many(orderItems),\n payment: one(payments),\n paymentInfo: one(paymentInfoTable, { fields: [orders.paymentInfoId], references: [paymentInfoTable.id] }),\n orderStatus: many(orderStatus),\n refunds: many(refunds),\n couponUsages: many(couponUsage),\n userIncidents: many(userIncidents),\n}))\n\nexport const orderItemsRelations = relations(orderItems, ({ one }) => ({\n order: one(orders, { fields: [orderItems.orderId], references: [orders.id] }),\n product: one(productInfo, { fields: [orderItems.productId], references: [productInfo.id] }),\n}))\n\nexport const orderStatusRelations = relations(orderStatus, ({ one }) => ({\n order: one(orders, { fields: [orderStatus.orderId], references: [orders.id] }),\n user: one(users, { fields: [orderStatus.userId], references: [users.id] }),\n refundCoupon: one(coupons, { fields: [orderStatus.refundCouponId], references: [coupons.id] }),\n}))\n\nexport const paymentInfoRelations = relations(paymentInfoTable, ({ one }) => ({\n order: one(orders, { fields: [paymentInfoTable.id], references: [orders.paymentInfoId] }),\n}))\n\nexport const paymentsRelations = relations(payments, ({ one }) => ({\n order: one(orders, { fields: [payments.orderId], references: [orders.id] }),\n}))\n\nexport const refundsRelations = relations(refunds, ({ one }) => ({\n order: one(orders, { fields: [refunds.orderId], references: [orders.id] }),\n}))\n\nexport const notificationsRelations = relations(notifications, ({ one }) => ({\n user: one(users, { fields: [notifications.userId], references: [users.id] }),\n}))\n\nexport const productCategoriesRelations = relations(productCategories, ({}) => ({}))\n\nexport const cartItemsRelations = relations(cartItems, ({ one }) => ({\n user: one(users, { fields: [cartItems.userId], references: [users.id] }),\n product: one(productInfo, { fields: [cartItems.productId], references: [productInfo.id] }),\n}))\n\nexport const complaintsRelations = relations(complaints, ({ one }) => ({\n user: one(users, { fields: [complaints.userId], references: [users.id] }),\n order: one(orders, { fields: [complaints.orderId], references: [orders.id] }),\n}))\n\nexport const couponsRelations = relations(coupons, ({ one, many }) => ({\n creator: one(staffUsers, { fields: [coupons.createdBy], references: [staffUsers.id] }),\n usages: many(couponUsage),\n applicableUsers: many(couponApplicableUsers),\n applicableProducts: many(couponApplicableProducts),\n}))\n\nexport const couponUsageRelations = relations(couponUsage, ({ one }) => ({\n user: one(users, { fields: [couponUsage.userId], references: [users.id] }),\n coupon: one(coupons, { fields: [couponUsage.couponId], references: [coupons.id] }),\n order: one(orders, { fields: [couponUsage.orderId], references: [orders.id] }),\n orderItem: one(orderItems, { fields: [couponUsage.orderItemId], references: [orderItems.id] }),\n}))\n\nexport const userDetailsRelations = relations(userDetails, ({ one }) => ({\n user: one(users, { fields: [userDetails.userId], references: [users.id] }),\n}))\n\nexport const notifCredsRelations = relations(notifCreds, ({ one }) => ({\n user: one(users, { fields: [notifCreds.userId], references: [users.id] }),\n}))\n\nexport const userNotificationsRelations = relations(userNotifications, ({}) => ({\n // No relations needed for now\n}))\n\nexport const storeInfoRelations = relations(storeInfo, ({ one, many }) => ({\n owner: one(staffUsers, { fields: [storeInfo.owner], references: [staffUsers.id] }),\n products: many(productInfo),\n}))\n\nexport const couponApplicableUsersRelations = relations(couponApplicableUsers, ({ one }) => ({\n coupon: one(coupons, { fields: [couponApplicableUsers.couponId], references: [coupons.id] }),\n user: one(users, { fields: [couponApplicableUsers.userId], references: [users.id] }),\n}))\n\nexport const couponApplicableProductsRelations = relations(couponApplicableProducts, ({ one }) => ({\n coupon: one(coupons, { fields: [couponApplicableProducts.couponId], references: [coupons.id] }),\n product: one(productInfo, { fields: [couponApplicableProducts.productId], references: [productInfo.id] }),\n}))\n\nexport const reservedCouponsRelations = relations(reservedCoupons, ({ one }) => ({\n redeemedUser: one(users, { fields: [reservedCoupons.redeemedBy], references: [users.id] }),\n creator: one(staffUsers, { fields: [reservedCoupons.createdBy], references: [staffUsers.id] }),\n}))\n\nexport const productReviewsRelations = relations(productReviews, ({ one }) => ({\n user: one(users, { fields: [productReviews.userId], references: [users.id] }),\n product: one(productInfo, { fields: [productReviews.productId], references: [productInfo.id] }),\n}))\n\nexport const addressZonesRelations = relations(addressZones, ({ many }) => ({\n addresses: many(addresses),\n areas: many(addressAreas),\n}))\n\nexport const addressAreasRelations = relations(addressAreas, ({ one }) => ({\n zone: one(addressZones, { fields: [addressAreas.zoneId], references: [addressZones.id] }),\n}))\n\nexport const productGroupInfoRelations = relations(productGroupInfo, ({ many }) => ({\n memberships: many(productGroupMembership),\n}))\n\nexport const productGroupMembershipRelations = relations(productGroupMembership, ({ one }) => ({\n product: one(productInfo, { fields: [productGroupMembership.productId], references: [productInfo.id] }),\n group: one(productGroupInfo, { fields: [productGroupMembership.groupId], references: [productGroupInfo.id] }),\n}))\n\nexport const homeBannersRelations = relations(homeBanners, ({}) => ({\n // Relations for productIds array would be more complex, skipping for now\n}))\n\nexport const staffRolesRelations = relations(staffRoles, ({ many }) => ({\n staffUsers: many(staffUsers),\n rolePermissions: many(staffRolePermissions),\n}))\n\nexport const staffPermissionsRelations = relations(staffPermissions, ({ many }) => ({\n rolePermissions: many(staffRolePermissions),\n}))\n\nexport const staffRolePermissionsRelations = relations(staffRolePermissions, ({ one }) => ({\n role: one(staffRoles, { fields: [staffRolePermissions.staffRoleId], references: [staffRoles.id] }),\n permission: one(staffPermissions, { fields: [staffRolePermissions.staffPermissionId], references: [staffPermissions.id] }),\n}))\n\nexport const userIncidentsRelations = relations(userIncidents, ({ one }) => ({\n user: one(users, { fields: [userIncidents.userId], references: [users.id] }),\n order: one(orders, { fields: [userIncidents.orderId], references: [orders.id] }),\n addedBy: one(staffUsers, { fields: [userIncidents.addedBy], references: [staffUsers.id] }),\n}))\n\nexport const vendorSnippetsRelations = relations(vendorSnippets, ({ one }) => ({\n slot: one(deliverySlotInfo, { fields: [vendorSnippets.slotId], references: [deliverySlotInfo.id] }),\n}))\n", "import type { D1Database } from '@cloudflare/workers-types'\nimport { drizzle, type DrizzleD1Database } from 'drizzle-orm/d1'\nimport * as schema from './schema'\n\ntype DbClient = DrizzleD1Database\n\nlet dbInstance: DbClient | null = null\n\nexport function initDb(database: D1Database): void {\n const base = drizzle(database, { schema }) as DbClient\n dbInstance = Object.assign(base, {\n transaction: async (handler: (tx: DbClient) => Promise): Promise => {\n return handler(base)\n },\n })\n}\n\nexport const db = new Proxy({} as DbClient, {\n get(_target, prop: keyof DbClient) {\n if (!dbInstance) {\n throw new Error('D1 database not initialized. Call initDb(env.DB) before using db helpers.')\n }\n\n return dbInstance[prop]\n },\n})\n", "import { db } from '../db/db_index'\nimport { homeBanners, staffUsers } from '../db/schema'\nimport { eq, desc } from 'drizzle-orm'\n\n\nexport interface Banner {\n id: number\n name: string\n imageUrl: string\n description: string | null\n productIds: number[] | null\n redirectUrl: string | null\n serialNum: number | null\n isActive: boolean\n createdAt: Date\n lastUpdated: Date\n}\n\ntype BannerRow = typeof homeBanners.$inferSelect\n\nexport async function getBanners(): Promise {\n const banners = await db.query.homeBanners.findMany({\n orderBy: desc(homeBanners.createdAt),\n }) as BannerRow[]\n\n return banners.map((banner) => ({\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description,\n productIds: banner.productIds || [],\n redirectUrl: banner.redirectUrl,\n serialNum: banner.serialNum,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n }))\n}\n\nexport async function getBannerById(id: number): Promise {\n const banner = await db.query.homeBanners.findFirst({\n where: eq(homeBanners.id, id),\n })\n\n if (!banner) return null\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description,\n productIds: banner.productIds || [],\n redirectUrl: banner.redirectUrl,\n serialNum: banner.serialNum,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n }\n}\n\nexport type CreateBannerInput = Omit\n\nexport async function createBanner(input: CreateBannerInput): Promise {\n const [banner] = await db.insert(homeBanners).values({\n name: input.name,\n imageUrl: input.imageUrl,\n description: input.description,\n productIds: input.productIds || [],\n redirectUrl: input.redirectUrl,\n serialNum: input.serialNum,\n isActive: input.isActive,\n }).returning()\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description,\n productIds: banner.productIds || [],\n redirectUrl: banner.redirectUrl,\n serialNum: banner.serialNum,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n }\n}\n\nexport type UpdateBannerInput = Partial>\n\nexport async function updateBanner(id: number, input: UpdateBannerInput): Promise {\n const [banner] = await db.update(homeBanners)\n .set({\n ...input,\n lastUpdated: new Date(),\n })\n .where(eq(homeBanners.id, id))\n .returning()\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description,\n productIds: banner.productIds || [],\n redirectUrl: banner.redirectUrl,\n serialNum: banner.serialNum,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n }\n}\n\nexport async function deleteBanner(id: number): Promise {\n await db.delete(homeBanners).where(eq(homeBanners.id, id))\n}\n", "import { db } from '../db/db_index'\nimport { complaints, users } from '../db/schema'\nimport { eq, desc, lt } from 'drizzle-orm'\n\nexport interface Complaint {\n id: number\n complaintBody: string\n userId: number\n orderId: number | null\n isResolved: boolean\n response: string | null\n createdAt: Date\n images: string[] | null\n}\n\nexport interface ComplaintWithUser extends Complaint {\n userName: string | null\n userMobile: string | null\n}\n\nexport async function getComplaints(\n cursor?: number,\n limit: number = 20\n): Promise<{ complaints: ComplaintWithUser[]; hasMore: boolean }> {\n const whereCondition = cursor ? lt(complaints.id, cursor) : undefined\n\n const complaintsData = await db\n .select({\n id: complaints.id,\n complaintBody: complaints.complaintBody,\n userId: complaints.userId,\n orderId: complaints.orderId,\n isResolved: complaints.isResolved,\n response: complaints.response,\n createdAt: complaints.createdAt,\n images: complaints.images,\n userName: users.name,\n userMobile: users.mobile,\n })\n .from(complaints)\n .leftJoin(users, eq(complaints.userId, users.id))\n .where(whereCondition)\n .orderBy(desc(complaints.id))\n .limit(limit + 1)\n\n const hasMore = complaintsData.length > limit\n const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData\n\n return {\n complaints: complaintsToReturn.map((c) => ({\n id: c.id,\n complaintBody: c.complaintBody,\n userId: c.userId,\n orderId: c.orderId,\n isResolved: c.isResolved,\n response: c.response,\n createdAt: c.createdAt,\n images: c.images as string[],\n userName: c.userName,\n userMobile: c.userMobile,\n })),\n hasMore,\n }\n}\n\nexport async function resolveComplaint(\n id: number,\n response?: string\n): Promise {\n await db\n .update(complaints)\n .set({ isResolved: true, response })\n .where(eq(complaints.id, id))\n}\n", "import { db } from '../db/db_index'\nimport { keyValStore } from '../db/schema'\n\nexport interface Constant {\n key: string\n value: any\n}\n\nexport async function getAllConstants(): Promise {\n const constants = await db.select().from(keyValStore)\n\n return constants.map(c => ({\n key: c.key,\n value: c.value,\n }))\n}\n\nexport async function upsertConstants(constants: Constant[]): Promise {\n await db.transaction(async (tx) => {\n for (const { key, value } of constants) {\n await tx.insert(keyValStore)\n .values({ key, value })\n .onConflictDoUpdate({\n target: keyValStore.key,\n set: { value },\n })\n }\n })\n}\n", "import { db } from '../db/db_index'\nimport { coupons, reservedCoupons, users, orders, orderStatus, couponApplicableUsers, couponApplicableProducts } from '../db/schema'\nimport { eq, and, like, or, inArray, lt, desc, asc } from 'drizzle-orm'\n\nexport interface Coupon {\n id: number\n couponCode: string\n isUserBased: boolean\n discountPercent: string | null\n flatDiscount: string | null\n minOrder: string | null\n productIds: number[] | null\n maxValue: string | null\n isApplyForAll: boolean\n validTill: Date | null\n maxLimitForUser: number | null\n exclusiveApply: boolean\n isInvalidated: boolean\n createdAt: Date\n createdBy: number\n}\n\nexport async function getAllCoupons(\n cursor?: number,\n limit: number = 50,\n search?: string\n): Promise<{ coupons: any[]; hasMore: boolean }> {\n let whereCondition = undefined\n const conditions = []\n \n if (cursor) {\n conditions.push(lt(coupons.id, cursor))\n }\n \n if (search && search.trim()) {\n conditions.push(like(coupons.couponCode, `%${search}%`))\n }\n \n if (conditions.length > 0) {\n whereCondition = and(...conditions)\n }\n \n const result = await db.query.coupons.findMany({\n where: whereCondition,\n with: {\n creator: true,\n applicableUsers: {\n with: {\n user: true,\n },\n },\n applicableProducts: {\n with: {\n product: true,\n },\n },\n },\n orderBy: desc(coupons.createdAt),\n limit: limit + 1,\n })\n \n const hasMore = result.length > limit\n const couponsList = hasMore ? result.slice(0, limit) : result\n \n return { coupons: couponsList, hasMore }\n}\n\nexport async function getCouponById(id: number): Promise {\n return await db.query.coupons.findFirst({\n where: eq(coupons.id, id),\n with: {\n creator: true,\n applicableUsers: {\n with: {\n user: true,\n },\n },\n applicableProducts: {\n with: {\n product: true,\n },\n },\n },\n })\n}\n\nexport interface CreateCouponInput {\n couponCode: string\n isUserBased: boolean\n discountPercent?: string\n flatDiscount?: string\n minOrder?: string\n productIds?: number[] | null\n maxValue?: string\n isApplyForAll: boolean\n validTill?: Date\n maxLimitForUser?: number\n exclusiveApply: boolean\n createdBy: number\n}\n\nexport async function createCouponWithRelations(\n input: CreateCouponInput,\n applicableUsers?: number[],\n applicableProducts?: number[]\n): Promise {\n return await db.transaction(async (tx) => {\n const [coupon] = await tx.insert(coupons).values({\n couponCode: input.couponCode,\n isUserBased: input.isUserBased,\n discountPercent: input.discountPercent,\n flatDiscount: input.flatDiscount,\n minOrder: input.minOrder,\n productIds: input.productIds,\n createdBy: input.createdBy,\n maxValue: input.maxValue,\n isApplyForAll: input.isApplyForAll,\n validTill: input.validTill,\n maxLimitForUser: input.maxLimitForUser,\n exclusiveApply: input.exclusiveApply,\n }).returning()\n\n if (applicableUsers && applicableUsers.length > 0) {\n await tx.insert(couponApplicableUsers).values(\n applicableUsers.map(userId => ({\n couponId: coupon.id,\n userId,\n }))\n )\n }\n\n if (applicableProducts && applicableProducts.length > 0) {\n await tx.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: coupon.id,\n productId,\n }))\n )\n }\n\n return coupon as Coupon\n })\n}\n\nexport interface UpdateCouponInput {\n couponCode?: string\n isUserBased?: boolean\n discountPercent?: string\n flatDiscount?: string\n minOrder?: string\n productIds?: number[] | null\n maxValue?: string\n isApplyForAll?: boolean\n validTill?: Date | null\n maxLimitForUser?: number\n exclusiveApply?: boolean\n isInvalidated?: boolean\n}\n\nexport async function updateCouponWithRelations(\n id: number,\n input: UpdateCouponInput,\n applicableUsers?: number[],\n applicableProducts?: number[]\n): Promise {\n return await db.transaction(async (tx) => {\n const [coupon] = await tx.update(coupons)\n .set({\n ...input,\n })\n .where(eq(coupons.id, id))\n .returning()\n\n if (applicableUsers !== undefined) {\n await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.couponId, id))\n if (applicableUsers.length > 0) {\n await tx.insert(couponApplicableUsers).values(\n applicableUsers.map(userId => ({\n couponId: id,\n userId,\n }))\n )\n }\n }\n\n if (applicableProducts !== undefined) {\n await tx.delete(couponApplicableProducts).where(eq(couponApplicableProducts.couponId, id))\n if (applicableProducts.length > 0) {\n await tx.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: id,\n productId,\n }))\n )\n }\n }\n\n return coupon as Coupon\n })\n}\n\nexport async function invalidateCoupon(id: number): Promise {\n const result = await db.update(coupons)\n .set({ isInvalidated: true })\n .where(eq(coupons.id, id))\n .returning()\n\n return result[0] as Coupon\n}\n\nexport interface CouponValidationResult {\n valid: boolean\n message?: string\n discountAmount?: number\n coupon?: Partial\n}\n\nexport async function validateCoupon(\n code: string,\n userId: number,\n orderAmount: number\n): Promise {\n const coupon = await db.query.coupons.findFirst({\n where: and(\n eq(coupons.couponCode, code.toUpperCase()),\n eq(coupons.isInvalidated, false)\n ),\n })\n\n if (!coupon) {\n return { valid: false, message: 'Coupon not found or invalidated' }\n }\n\n if (coupon.validTill && new Date(coupon.validTill) < new Date()) {\n return { valid: false, message: 'Coupon has expired' }\n }\n\n if (!coupon.isApplyForAll && !coupon.isUserBased) {\n return { valid: false, message: 'Coupon is not available for use' }\n }\n\n const minOrderValue = coupon.minOrder ? parseFloat(coupon.minOrder) : 0\n if (minOrderValue > 0 && orderAmount < minOrderValue) {\n return { valid: false, message: `Minimum order amount is ${minOrderValue}` }\n }\n\n let discountAmount = 0\n if (coupon.discountPercent) {\n const percent = parseFloat(coupon.discountPercent)\n discountAmount = (orderAmount * percent) / 100\n } else if (coupon.flatDiscount) {\n discountAmount = parseFloat(coupon.flatDiscount)\n }\n\n const maxValueLimit = coupon.maxValue ? parseFloat(coupon.maxValue) : 0\n if (maxValueLimit > 0 && discountAmount > maxValueLimit) {\n discountAmount = maxValueLimit\n }\n\n return {\n valid: true,\n discountAmount,\n coupon: {\n id: coupon.id,\n discountPercent: coupon.discountPercent,\n flatDiscount: coupon.flatDiscount,\n maxValue: coupon.maxValue,\n }\n }\n}\n\nexport async function getReservedCoupons(\n cursor?: number,\n limit: number = 50,\n search?: string\n): Promise<{ coupons: any[]; hasMore: boolean }> {\n let whereCondition = undefined\n const conditions = []\n \n if (cursor) {\n conditions.push(lt(reservedCoupons.id, cursor))\n }\n \n if (search && search.trim()) {\n conditions.push(or(\n like(reservedCoupons.secretCode, `%${search}%`),\n like(reservedCoupons.couponCode, `%${search}%`)\n ))\n }\n \n if (conditions.length > 0) {\n whereCondition = and(...conditions)\n }\n\n const result = await db.query.reservedCoupons.findMany({\n where: whereCondition,\n with: {\n redeemedUser: true,\n creator: true,\n },\n orderBy: desc(reservedCoupons.createdAt),\n limit: limit + 1,\n })\n\n const hasMore = result.length > limit\n const couponsList = hasMore ? result.slice(0, limit) : result\n\n return { coupons: couponsList, hasMore }\n}\n\nexport async function createReservedCouponWithProducts(\n input: any,\n applicableProducts?: number[]\n): Promise {\n return await db.transaction(async (tx) => {\n const [coupon] = await tx.insert(reservedCoupons).values({\n secretCode: input.secretCode,\n couponCode: input.couponCode,\n discountPercent: input.discountPercent,\n flatDiscount: input.flatDiscount,\n minOrder: input.minOrder,\n productIds: input.productIds,\n maxValue: input.maxValue,\n validTill: input.validTill,\n maxLimitForUser: input.maxLimitForUser,\n exclusiveApply: input.exclusiveApply,\n createdBy: input.createdBy,\n }).returning()\n\n if (applicableProducts && applicableProducts.length > 0) {\n await tx.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: coupon.id,\n productId,\n }))\n )\n }\n\n return coupon\n })\n}\n\nexport async function checkUsersExist(userIds: number[]): Promise {\n const existingUsers = await db.query.users.findMany({\n where: inArray(users.id, userIds),\n columns: { id: true },\n })\n return existingUsers.length === userIds.length\n}\n\nexport async function checkCouponExists(couponCode: string): Promise {\n const existing = await db.query.coupons.findFirst({\n where: eq(coupons.couponCode, couponCode),\n })\n return !!existing\n}\n\nexport async function checkReservedCouponExists(secretCode: string): Promise {\n const existing = await db.query.reservedCoupons.findFirst({\n where: eq(reservedCoupons.secretCode, secretCode),\n })\n return !!existing\n}\n\nexport async function generateCancellationCoupon(\n orderId: number,\n staffUserId: number,\n userId: number,\n orderAmount: number,\n couponCode: string\n): Promise {\n return await db.transaction(async (tx) => {\n const expiryDate = new Date()\n expiryDate.setDate(expiryDate.getDate() + 30)\n\n const [coupon] = await tx.insert(coupons).values({\n couponCode,\n isUserBased: true,\n flatDiscount: orderAmount.toString(),\n minOrder: orderAmount.toString(),\n maxValue: orderAmount.toString(),\n validTill: expiryDate,\n maxLimitForUser: 1,\n createdBy: staffUserId,\n isApplyForAll: false,\n }).returning()\n\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId,\n })\n\n await tx.update(orderStatus)\n .set({ refundCouponId: coupon.id })\n .where(eq(orderStatus.orderId, orderId))\n\n return coupon as Coupon\n })\n}\n\nexport async function getOrderWithUser(orderId: number): Promise {\n return await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n user: true,\n },\n })\n}\n\nexport async function createCouponForUser(\n mobile: string,\n couponCode: string,\n staffUserId: number\n): Promise<{ coupon: Coupon; user: { id: number; mobile: string; name: string | null } }> {\n return await db.transaction(async (tx) => {\n let user = await tx.query.users.findFirst({\n where: eq(users.mobile, mobile),\n })\n\n if (!user) {\n const [newUser] = await tx.insert(users).values({\n name: null,\n email: null,\n mobile,\n }).returning()\n user = newUser\n }\n\n const [coupon] = await tx.insert(coupons).values({\n couponCode,\n isUserBased: true,\n discountPercent: '20',\n minOrder: '1000',\n maxValue: '500',\n maxLimitForUser: 1,\n isApplyForAll: false,\n exclusiveApply: false,\n createdBy: staffUserId,\n validTill: new Date(Date.now() + 90 * 24 * 60 * 60 * 1000),\n }).returning()\n\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId: user.id,\n })\n\n return {\n coupon: coupon as Coupon,\n user: {\n id: user.id,\n mobile: user.mobile as string,\n name: user.name,\n },\n }\n })\n}\n\nexport interface UserMiniInfo {\n id: number\n name: string\n mobile: string | null\n}\n\nexport async function getUsersForCoupon(\n search?: string,\n limit: number = 20,\n offset: number = 0\n): Promise<{ users: UserMiniInfo[] }> {\n let whereCondition = undefined\n if (search && search.trim()) {\n whereCondition = or(\n like(users.name, `%${search}%`),\n like(users.mobile, `%${search}%`)\n )\n }\n\n const userList = await db.query.users.findMany({\n where: whereCondition,\n columns: {\n id: true,\n name: true,\n mobile: true,\n },\n limit: limit,\n offset: offset,\n orderBy: asc(users.name),\n })\n\n return {\n users: userList.map((user) => ({\n id: user.id,\n name: user.name || 'Unknown',\n mobile: user.mobile,\n }))\n }\n}\n", "import { db } from '../db/db_index'\nimport {\n addresses,\n complaints,\n couponUsage,\n orderItems,\n orders,\n orderStatus,\n payments,\n refunds,\n} from '../db/schema'\nimport { and, desc, eq, inArray, lt, SQL } from 'drizzle-orm'\nimport type {\n AdminOrderDetails,\n AdminOrderRow,\n AdminOrderStatusRecord,\n AdminOrderUpdateResult,\n AdminOrderItemPackagingResult,\n AdminOrderMessageResult,\n AdminOrderBasicResult,\n AdminGetSlotOrdersResult,\n AdminGetAllOrdersResultWithUserId,\n AdminRebalanceSlotsResult,\n AdminCancelOrderResult,\n AdminRefundRecord,\n RefundStatus,\n PaymentStatus,\n} from '@packages/shared'\nimport type { InferSelectModel } from 'drizzle-orm'\n\nconst isPaymentStatus = (value: string): value is PaymentStatus =>\n value === 'pending' || value === 'success' || value === 'cod' || value === 'failed'\n\nconst isRefundStatus = (value: string): value is RefundStatus =>\n value === 'success' || value === 'pending' || value === 'failed' || value === 'none' || value === 'na' || value === 'processed'\n\ntype OrderStatusRow = InferSelectModel\n\nconst mapOrderStatusRecord = (record: OrderStatusRow): AdminOrderStatusRecord => ({\n id: record.id,\n orderTime: record.orderTime,\n userId: record.userId,\n orderId: record.orderId,\n isPackaged: record.isPackaged,\n isDelivered: record.isDelivered,\n isCancelled: record.isCancelled,\n cancelReason: record.cancelReason ?? null,\n isCancelledByAdmin: record.isCancelledByAdmin ?? null,\n paymentStatus: isPaymentStatus(record.paymentStatus) ? record.paymentStatus : 'pending',\n cancellationUserNotes: record.cancellationUserNotes ?? null,\n cancellationAdminNotes: record.cancellationAdminNotes ?? null,\n cancellationReviewed: record.cancellationReviewed,\n cancellationReviewedAt: record.cancellationReviewedAt ?? null,\n refundCouponId: record.refundCouponId ?? null,\n})\n\nexport async function updateOrderNotes(orderId: number, adminNotes: string | null): Promise {\n const [result] = await db\n .update(orders)\n .set({ adminNotes })\n .where(eq(orders.id, orderId))\n .returning()\n return (result || null) as AdminOrderRow | null\n}\n\nexport async function updateOrderPackaged(orderId: string, isPackaged: boolean): Promise {\n const orderIdNumber = parseInt(orderId)\n\n await db\n .update(orderItems)\n .set({ is_packaged: isPackaged })\n .where(eq(orderItems.orderId, orderIdNumber))\n\n if (!isPackaged) {\n await db\n .update(orderStatus)\n .set({ isPackaged, isDelivered: false })\n .where(eq(orderStatus.orderId, orderIdNumber))\n } else {\n await db\n .update(orderStatus)\n .set({ isPackaged })\n .where(eq(orderStatus.orderId, orderIdNumber))\n }\n\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderIdNumber),\n })\n\n return { success: true, userId: order?.userId ?? null }\n}\n\nexport async function updateOrderDelivered(orderId: string, isDelivered: boolean): Promise {\n const orderIdNumber = parseInt(orderId)\n\n await db\n .update(orderStatus)\n .set({ isDelivered })\n .where(eq(orderStatus.orderId, orderIdNumber))\n\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderIdNumber),\n })\n\n return { success: true, userId: order?.userId ?? null }\n}\n\nexport async function getOrderDetails(orderId: number): Promise {\n // Single optimized query with all relations\n const orderData = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n payment: true,\n paymentInfo: true,\n orderStatus: true,\n refunds: true,\n },\n })\n\n if (!orderData) {\n return null\n }\n\n const couponUsageData = await db.query.couponUsage.findMany({\n where: eq(couponUsage.orderId, orderData.id),\n with: {\n coupon: true,\n },\n })\n\n let couponData = null\n if (couponUsageData.length > 0) {\n let totalDiscountAmount = 0\n const orderTotal = parseFloat((orderData.totalAmount ?? '0').toString())\n\n for (const usage of couponUsageData) {\n let discountAmount = 0\n\n if (usage.coupon.discountPercent) {\n discountAmount =\n (orderTotal * parseFloat(usage.coupon.discountPercent.toString())) /\n 100\n } else if (usage.coupon.flatDiscount) {\n discountAmount = parseFloat(usage.coupon.flatDiscount.toString())\n }\n\n if (\n usage.coupon.maxValue &&\n discountAmount > parseFloat(usage.coupon.maxValue.toString())\n ) {\n discountAmount = parseFloat(usage.coupon.maxValue.toString())\n }\n\n totalDiscountAmount += discountAmount\n }\n\n couponData = {\n couponCode: couponUsageData.map((u: any) => u.coupon.couponCode).join(', '),\n couponDescription: `${couponUsageData.length} coupons applied`,\n discountAmount: totalDiscountAmount,\n }\n }\n\n const statusRecord = orderData.orderStatus?.[0]\n const orderStatusRecord = statusRecord ? mapOrderStatusRecord(statusRecord) : null\n let status: 'pending' | 'delivered' | 'cancelled' = 'pending'\n if (orderStatusRecord?.isCancelled) {\n status = 'cancelled'\n } else if (orderStatusRecord?.isDelivered) {\n status = 'delivered'\n }\n\n const refund = orderData.refunds?.[0]\n const refundStatus = refund?.refundStatus && isRefundStatus(refund.refundStatus)\n ? refund.refundStatus\n : null\n const refundRecord: AdminRefundRecord | null = refund\n ? {\n id: refund.id,\n orderId: refund.orderId,\n refundAmount: refund.refundAmount,\n refundStatus,\n merchantRefundId: refund.merchantRefundId,\n refundProcessedAt: refund.refundProcessedAt,\n createdAt: refund.createdAt,\n }\n : null\n\n return {\n id: orderData.id,\n readableId: orderData.id,\n userId: orderData.user.id,\n customerName: `${orderData.user.name}`,\n customerEmail: orderData.user.email,\n customerMobile: orderData.user.mobile,\n address: {\n name: orderData.address.name,\n line1: orderData.address.addressLine1,\n line2: orderData.address.addressLine2,\n city: orderData.address.city,\n state: orderData.address.state,\n pincode: orderData.address.pincode,\n phone: orderData.address.phone,\n },\n slotInfo: orderData.slot\n ? {\n time: orderData.slot.deliveryTime.toISOString(),\n sequence: orderData.slot.deliverySequence,\n }\n : null,\n isCod: orderData.isCod,\n isOnlinePayment: orderData.isOnlinePayment,\n totalAmount:\n parseFloat(orderData.totalAmount?.toString() || '0') -\n parseFloat(orderData.deliveryCharge?.toString() || '0'),\n deliveryCharge: parseFloat(orderData.deliveryCharge?.toString() || '0'),\n adminNotes: orderData.adminNotes,\n userNotes: orderData.userNotes,\n createdAt: orderData.createdAt,\n status,\n isPackaged: orderStatusRecord?.isPackaged || false,\n isDelivered: orderStatusRecord?.isDelivered || false,\n items: orderData.orderItems.map((item: any) => ({\n id: item.id,\n name: item.product.name,\n quantity: item.quantity,\n productSize: item.product.productQuantity,\n price: item.price,\n unit: item.product.unit?.shortNotation,\n amount: parseFloat(item.price.toString()) * parseFloat(item.quantity || '0'),\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n })),\n payment: orderData.payment\n ? {\n status: orderData.payment.status,\n gateway: orderData.payment.gateway,\n merchantOrderId: orderData.payment.merchantOrderId,\n }\n : null,\n paymentInfo: orderData.paymentInfo\n ? {\n status: orderData.paymentInfo.status,\n gateway: orderData.paymentInfo.gateway,\n merchantOrderId: orderData.paymentInfo.merchantOrderId,\n }\n : null,\n cancelReason: orderStatusRecord?.cancelReason || null,\n cancellationReviewed: orderStatusRecord?.cancellationReviewed || false,\n isRefundDone: refundStatus === 'processed' || false,\n refundStatus,\n refundAmount: refund?.refundAmount\n ? parseFloat(refund.refundAmount.toString())\n : null,\n couponData,\n couponCode: couponData?.couponCode || null,\n couponDescription: couponData?.couponDescription || null,\n discountAmount: couponData?.discountAmount || null,\n orderStatus: orderStatusRecord,\n refundRecord,\n isFlashDelivery: orderData.isFlashDelivery,\n }\n}\n\nexport async function updateOrderItemPackaging(\n orderItemId: number,\n isPackaged?: boolean,\n isPackageVerified?: boolean\n): Promise {\n const orderItem = await db.query.orderItems.findFirst({\n where: eq(orderItems.id, orderItemId),\n })\n\n if (!orderItem) {\n return { success: false, updated: false }\n }\n\n const updateData: Partial<{\n is_packaged: boolean\n is_package_verified: boolean\n }> = {}\n\n if (isPackaged !== undefined) {\n updateData.is_packaged = isPackaged\n }\n if (isPackageVerified !== undefined) {\n updateData.is_package_verified = isPackageVerified\n }\n\n await db\n .update(orderItems)\n .set(updateData)\n .where(eq(orderItems.id, orderItemId))\n\n return { success: true, updated: true }\n}\n\nexport async function removeDeliveryCharge(orderId: number): Promise {\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n })\n\n if (!order) {\n return null\n }\n\n const currentDeliveryCharge = parseFloat(order.deliveryCharge?.toString() || '0')\n const currentTotalAmount = parseFloat(order.totalAmount?.toString() || '0')\n const newTotalAmount = currentTotalAmount - currentDeliveryCharge\n\n await db\n .update(orders)\n .set({\n deliveryCharge: '0',\n totalAmount: newTotalAmount.toString(),\n })\n .where(eq(orders.id, orderId))\n\n return { success: true, message: 'Delivery charge removed' }\n}\n\nexport async function getSlotOrders(slotId: string): Promise {\n const slotOrders = await db.query.orders.findMany({\n where: eq(orders.slotId, parseInt(slotId)),\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n },\n })\n\n const filteredOrders = slotOrders.filter((order: any) => {\n const statusRecord = order.orderStatus[0]\n return order.isCod || (statusRecord && statusRecord.paymentStatus === 'success')\n })\n\n const formattedOrders = filteredOrders.map((order: any) => {\n const statusRecord = order.orderStatus[0]\n let status: 'pending' | 'delivered' | 'cancelled' = 'pending'\n if (statusRecord?.isCancelled) {\n status = 'cancelled'\n } else if (statusRecord?.isDelivered) {\n status = 'delivered'\n }\n\n const items = order.orderItems.map((item: any) => ({\n id: item.id,\n name: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n amount: parseFloat(item.quantity) * parseFloat(item.price.toString()),\n unit: item.product.unit?.shortNotation || '',\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n }))\n\n const paymentMode: 'COD' | 'Online' = order.isCod ? 'COD' : 'Online'\n\n return {\n id: order.id,\n readableId: order.id,\n customerName: order.user.name || order.user.mobile+'',\n address: `${order.address.addressLine1}${\n order.address.addressLine2 ? `, ${order.address.addressLine2}` : ''\n }, ${order.address.city}, ${order.address.state} - ${\n order.address.pincode\n }, Phone: ${order.address.phone}`,\n addressId: order.addressId,\n latitude: order.address.adminLatitude ?? order.address.latitude,\n longitude: order.address.adminLongitude ?? order.address.longitude,\n totalAmount: parseFloat(order.totalAmount),\n items,\n deliveryTime: order.slot?.deliveryTime.toISOString() || null,\n status,\n isPackaged: order.orderItems.every((item: any) => item.is_packaged) || false,\n isDelivered: statusRecord?.isDelivered || false,\n isCod: order.isCod,\n paymentMode,\n paymentStatus: isPaymentStatus(statusRecord?.paymentStatus || 'pending')\n ? statusRecord?.paymentStatus || 'pending'\n : 'pending',\n slotId: order.slotId,\n adminNotes: order.adminNotes,\n userNotes: order.userNotes,\n }\n })\n\n return { success: true, data: formattedOrders }\n}\n\nexport async function updateAddressCoords(\n addressId: number,\n latitude: number,\n longitude: number\n): Promise {\n const result = await db\n .update(addresses)\n .set({\n adminLatitude: latitude,\n adminLongitude: longitude,\n })\n .where(eq(addresses.id, addressId))\n .returning()\n\n return { success: result.length > 0 }\n}\n\ntype GetAllOrdersInput = {\n cursor?: number\n limit: number\n slotId?: number | null\n packagedFilter?: 'all' | 'packaged' | 'not_packaged'\n deliveredFilter?: 'all' | 'delivered' | 'not_delivered'\n cancellationFilter?: 'all' | 'cancelled' | 'not_cancelled'\n flashDeliveryFilter?: 'all' | 'flash' | 'regular'\n}\n\nexport async function getAllOrders(input: GetAllOrdersInput): Promise {\n const {\n cursor,\n limit,\n slotId,\n packagedFilter,\n deliveredFilter,\n cancellationFilter,\n flashDeliveryFilter,\n } = input\n\n let whereCondition: SQL | undefined = eq(orders.id, orders.id)\n if (cursor) {\n whereCondition = and(whereCondition, lt(orders.id, cursor))\n }\n if (slotId) {\n whereCondition = and(whereCondition, eq(orders.slotId, slotId))\n }\n if (packagedFilter === 'packaged') {\n whereCondition = and(whereCondition, eq(orderStatus.isPackaged, true))\n } else if (packagedFilter === 'not_packaged') {\n whereCondition = and(whereCondition, eq(orderStatus.isPackaged, false))\n }\n if (deliveredFilter === 'delivered') {\n whereCondition = and(whereCondition, eq(orderStatus.isDelivered, true))\n } else if (deliveredFilter === 'not_delivered') {\n whereCondition = and(whereCondition, eq(orderStatus.isDelivered, false))\n }\n if (cancellationFilter === 'cancelled') {\n whereCondition = and(whereCondition, eq(orderStatus.isCancelled, true))\n } else if (cancellationFilter === 'not_cancelled') {\n whereCondition = and(whereCondition, eq(orderStatus.isCancelled, false))\n }\n if (flashDeliveryFilter === 'flash') {\n whereCondition = and(whereCondition, eq(orders.isFlashDelivery, true))\n } else if (flashDeliveryFilter === 'regular') {\n whereCondition = and(whereCondition, eq(orders.isFlashDelivery, false))\n }\n\n const allOrders = await db.query.orders.findMany({\n where: whereCondition,\n orderBy: desc(orders.createdAt),\n limit: limit + 1,\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n },\n })\n\n const hasMore = allOrders.length > limit\n const ordersToReturn = hasMore ? allOrders.slice(0, limit) : allOrders\n\n const filteredOrders = ordersToReturn.filter((order: any) => {\n const statusRecord = order.orderStatus[0]\n return order.isCod || (statusRecord && statusRecord.paymentStatus === 'success')\n })\n\n const formattedOrders = filteredOrders.map((order: any) => {\n const statusRecord = order.orderStatus[0]\n let status: 'pending' | 'delivered' | 'cancelled' = 'pending'\n if (statusRecord?.isCancelled) {\n status = 'cancelled'\n } else if (statusRecord?.isDelivered) {\n status = 'delivered'\n }\n\n const items = order.orderItems\n .map((item: any) => ({\n id: item.id,\n name: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n amount: parseFloat(item.quantity) * parseFloat(item.price.toString()),\n unit: item.product.unit?.shortNotation || '',\n productSize: item.product.productQuantity,\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n }))\n .sort((first: any, second: any) => first.id - second.id)\n\n return {\n id: order.id,\n orderId: order.id.toString(),\n readableId: order.id,\n customerName: order.user.name || order.user.mobile + '',\n customerMobile: order.user.mobile,\n address: `${order.address.addressLine1}${\n order.address.addressLine2 ? `, ${order.address.addressLine2}` : ''\n }, ${order.address.city}, ${order.address.state} - ${\n order.address.pincode\n }, Phone: ${order.address.phone}`,\n addressId: order.addressId,\n latitude: order.address.adminLatitude ?? order.address.latitude,\n longitude: order.address.adminLongitude ?? order.address.longitude,\n totalAmount: parseFloat(order.totalAmount),\n deliveryCharge: parseFloat(order.deliveryCharge || '0'),\n items,\n createdAt: order.createdAt,\n deliveryTime: order.slot?.deliveryTime.toISOString() || null,\n status,\n isPackaged: order.orderItems.every((item: any) => item.is_packaged) || false,\n isDelivered: statusRecord?.isDelivered || false,\n isCod: order.isCod,\n isFlashDelivery: order.isFlashDelivery,\n userNotes: order.userNotes,\n adminNotes: order.adminNotes,\n userNegativityScore: 0,\n userId: order.userId,\n }\n })\n\n return {\n orders: formattedOrders,\n nextCursor: hasMore ? ordersToReturn[ordersToReturn.length - 1].id : undefined,\n }\n}\n\nexport async function rebalanceSlots(slotIds: number[]): Promise {\n const ordersList = await db.query.orders.findMany({\n where: inArray(orders.slotId, slotIds),\n with: {\n orderItems: {\n with: {\n product: true,\n },\n },\n couponUsages: {\n with: {\n coupon: true,\n },\n },\n },\n })\n\n const processedOrdersData = ordersList.map((order: any) => {\n let newTotal = order.orderItems.reduce((acc: number, item: any) => {\n const latestPrice = +item.product.price\n const amount = latestPrice * Number(item.quantity)\n return acc + amount\n }, 0)\n\n order.orderItems.forEach((item: any) => {\n item.price = item.product.price\n item.discountedPrice = item.product.price\n })\n\n const coupon = order.couponUsages[0]?.coupon\n\n let discount = 0\n if (coupon && !coupon.isInvalidated && (!coupon.validTill || new Date(coupon.validTill) > new Date())) {\n const proportion = Number(order.orderGroupProportion || 1)\n if (coupon.discountPercent) {\n const maxDiscount = Number(coupon.maxValue || Infinity) * proportion\n discount = Math.min((newTotal * parseFloat(coupon.discountPercent)) / 100, maxDiscount)\n } else {\n discount = Number(coupon.flatDiscount) * proportion\n }\n }\n newTotal -= discount\n\n const { couponUsages, orderItems: orderItemsRaw, ...rest } = order\n const updatedOrderItems = orderItemsRaw.map((item: any) => {\n const { product, ...rawOrderItem } = item\n return rawOrderItem\n })\n return { order: rest, updatedOrderItems, newTotal }\n })\n\n const updatedOrderIds: number[] = []\n await db.transaction(async (tx) => {\n for (const { order, updatedOrderItems, newTotal } of processedOrdersData) {\n await tx.update(orders).set({ totalAmount: newTotal.toString() }).where(eq(orders.id, order.id))\n updatedOrderIds.push(order.id)\n\n for (const item of updatedOrderItems) {\n await tx\n .update(orderItems)\n .set({\n price: item.price,\n discountedPrice: item.discountedPrice,\n })\n .where(eq(orderItems.id, item.id))\n }\n }\n })\n\n return {\n success: true,\n updatedOrders: updatedOrderIds,\n message: `Rebalanced ${updatedOrderIds.length} orders.`,\n }\n}\n\nexport async function cancelOrder(orderId: number, reason: string): Promise {\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n orderStatus: true,\n },\n })\n\n if (!order) {\n return { success: false, message: 'Order not found', error: 'order_not_found' }\n }\n\n const status = order.orderStatus[0]\n if (!status) {\n return { success: false, message: 'Order status not found', error: 'status_not_found' }\n }\n\n if (status.isCancelled) {\n return { success: false, message: 'Order is already cancelled', error: 'already_cancelled' }\n }\n\n if (status.isDelivered) {\n return { success: false, message: 'Cannot cancel delivered order', error: 'already_delivered' }\n }\n\n const result = await db.transaction(async (tx) => {\n await tx\n .update(orderStatus)\n .set({\n isCancelled: true,\n isCancelledByAdmin: true,\n cancelReason: reason,\n cancellationAdminNotes: reason,\n cancellationReviewed: true,\n cancellationReviewedAt: new Date(),\n })\n .where(eq(orderStatus.id, status.id))\n\n const refundStatus = order.isCod ? 'na' : 'pending'\n\n await tx.insert(refunds).values({\n orderId: order.id,\n refundStatus,\n })\n\n return { orderId: order.id, userId: order.userId }\n })\n\n return {\n success: true,\n message: 'Order cancelled successfully',\n orderId: result.orderId,\n userId: result.userId,\n }\n}\n\nexport async function deleteOrderById(orderId: number): Promise {\n await db.transaction(async (tx) => {\n await tx.delete(orderItems).where(eq(orderItems.orderId, orderId))\n await tx.delete(orderStatus).where(eq(orderStatus.orderId, orderId))\n await tx.delete(payments).where(eq(payments.orderId, orderId))\n await tx.delete(refunds).where(eq(refunds.orderId, orderId))\n await tx.delete(couponUsage).where(eq(couponUsage.orderId, orderId))\n await tx.delete(complaints).where(eq(complaints.orderId, orderId))\n await tx.delete(orders).where(eq(orders.id, orderId))\n })\n}\n", "import { db } from '../db/db_index'\nimport {\n productInfo,\n units,\n specialDeals,\n productSlots,\n productTags,\n productReviews,\n productGroupInfo,\n productGroupMembership,\n productTagInfo,\n users,\n storeInfo,\n} from '../db/schema'\nimport { and, desc, eq, inArray, sql } from 'drizzle-orm'\nimport type { InferInsertModel, InferSelectModel } from 'drizzle-orm'\nimport type {\n AdminProduct,\n AdminProductGroupInfo,\n AdminProductTagInfo,\n AdminProductTagWithProducts,\n AdminProductReview,\n AdminProductWithDetails,\n AdminProductWithRelations,\n AdminSpecialDeal,\n AdminUnit,\n AdminUpdateSlotProductsResult,\n Store,\n} from '@packages/shared'\n\ntype ProductRow = InferSelectModel\ntype UnitRow = InferSelectModel\ntype StoreRow = InferSelectModel\ntype SpecialDealRow = InferSelectModel\ntype ProductTagInfoRow = InferSelectModel\ntype ProductTagRow = InferSelectModel\ntype ProductGroupRow = InferSelectModel\ntype ProductGroupMembershipRow = InferSelectModel\ntype ProductReviewRow = InferSelectModel\n\nconst getStringArray = (value: unknown): string[] | null => {\n if (!Array.isArray(value)) return null\n return value.map((item) => String(item))\n}\n\nconst mapUnit = (unit: UnitRow): AdminUnit => ({\n id: unit.id,\n shortNotation: unit.shortNotation,\n fullName: unit.fullName,\n})\n\nconst mapStore = (store: StoreRow): Store => ({\n id: store.id,\n name: store.name,\n description: store.description,\n imageUrl: store.imageUrl,\n owner: store.owner,\n createdAt: store.createdAt,\n // updatedAt: store.createdAt,\n})\n\nconst mapProduct = (product: ProductRow): AdminProduct => ({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription ?? null,\n longDescription: product.longDescription ?? null,\n unitId: product.unitId,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n images: getStringArray(product.images),\n imageKeys: getStringArray(product.images),\n isOutOfStock: product.isOutOfStock,\n isSuspended: product.isSuspended,\n isFlashAvailable: product.isFlashAvailable,\n flashPrice: product.flashPrice ? String(product.flashPrice) : null,\n createdAt: product.createdAt,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n storeId: product.storeId,\n})\n\nconst mapSpecialDeal = (deal: SpecialDealRow): AdminSpecialDeal => ({\n id: deal.id,\n productId: deal.productId,\n quantity: String(deal.quantity ?? '0'),\n price: String(deal.price ?? '0'),\n validTill: deal.validTill,\n})\n\nconst mapTagInfo = (tag: ProductTagInfoRow): AdminProductTagInfo => ({\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription ?? null,\n imageUrl: tag.imageUrl ?? null,\n isDashboardTag: tag.isDashboardTag,\n relatedStores: tag.relatedStores,\n createdAt: tag.createdAt,\n})\n\nexport async function getAllProducts(): Promise {\n type ProductWithRelationsRow = ProductRow & { unit: UnitRow; store: StoreRow | null }\n const products = await db.query.productInfo.findMany({\n orderBy: productInfo.name,\n with: {\n unit: true,\n store: true,\n },\n }) as ProductWithRelationsRow[]\n\n return products.map((product) => ({\n ...mapProduct(product),\n unit: mapUnit(product.unit),\n store: product.store ? mapStore(product.store) : null,\n }))\n}\n\nexport async function getProductById(id: number): Promise {\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, id),\n with: {\n unit: true,\n },\n })\n\n if (!product) {\n return null\n }\n\n const deals = await db.query.specialDeals.findMany({\n where: eq(specialDeals.productId, id),\n orderBy: specialDeals.quantity,\n })\n\n const productTagsData = await db.query.productTags.findMany({\n where: eq(productTags.productId, id),\n with: {\n tag: true,\n },\n }) as Array\n\n return {\n ...mapProduct(product),\n unit: mapUnit(product.unit),\n deals: deals.map(mapSpecialDeal),\n tags: productTagsData.map((tag) => mapTagInfo(tag.tag)),\n }\n}\n\nexport async function deleteProduct(id: number): Promise {\n const [deletedProduct] = await db\n .delete(productInfo)\n .where(eq(productInfo.id, id))\n .returning()\n\n if (!deletedProduct) {\n return null\n }\n\n return mapProduct(deletedProduct)\n}\n\ntype ProductInfoInsert = InferInsertModel\ntype ProductInfoUpdate = Partial\n\nexport async function createProduct(input: ProductInfoInsert): Promise {\n const [product] = await db.insert(productInfo).values(input).returning()\n return mapProduct(product)\n}\n\nexport async function updateProduct(id: number, updates: ProductInfoUpdate): Promise {\n const [product] = await db.update(productInfo)\n .set(updates)\n .where(eq(productInfo.id, id))\n .returning()\n if (!product) {\n return null\n }\n\n return mapProduct(product)\n}\n\nexport async function toggleProductOutOfStock(id: number): Promise {\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, id),\n })\n\n if (!product) {\n return null\n }\n\n const [updatedProduct] = await db\n .update(productInfo)\n .set({\n isOutOfStock: !product.isOutOfStock,\n })\n .where(eq(productInfo.id, id))\n .returning()\n\n if (!updatedProduct) {\n return null\n }\n\n return mapProduct(updatedProduct)\n}\n\nexport async function updateSlotProducts(slotId: string, productIds: string[]): Promise {\n const currentAssociations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, parseInt(slotId)),\n columns: {\n productId: true,\n },\n }) as Array<{ productId: number }>\n\n const currentProductIds = currentAssociations.map((assoc: { productId: number }) => assoc.productId)\n const newProductIds = productIds.map((id: string) => parseInt(id))\n\n const productsToAdd = newProductIds.filter((id: number) => !currentProductIds.includes(id))\n const productsToRemove = currentProductIds.filter((id: number) => !newProductIds.includes(id))\n\n if (productsToRemove.length > 0) {\n await db.delete(productSlots).where(\n and(\n eq(productSlots.slotId, parseInt(slotId)),\n inArray(productSlots.productId, productsToRemove)\n )\n )\n }\n\n if (productsToAdd.length > 0) {\n const newAssociations = productsToAdd.map((productId) => ({\n productId,\n slotId: parseInt(slotId),\n }))\n\n await db.insert(productSlots).values(newAssociations)\n }\n\n return {\n message: 'Slot products updated successfully',\n added: productsToAdd.length,\n removed: productsToRemove.length,\n }\n}\n\nexport async function getSlotProductIds(slotId: string): Promise {\n const associations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, parseInt(slotId)),\n columns: {\n productId: true,\n },\n })\n\n return associations.map((assoc: { productId: number }) => assoc.productId)\n}\n\nexport async function getAllUnits(): Promise {\n const allUnits = await db.query.units.findMany({\n orderBy: units.shortNotation,\n })\n\n return allUnits.map(mapUnit)\n}\n\nexport async function getAllProductTags(): Promise {\n const tags = await db.query.productTagInfo.findMany({\n with: {\n products: {\n with: {\n product: true,\n },\n },\n },\n }) as Array }>\n\n return tags.map((tag: ProductTagInfoRow & { products: Array }) => ({\n ...mapTagInfo(tag),\n products: tag.products.map((assignment: ProductTagRow & { product: ProductRow }) => ({\n productId: assignment.productId,\n tagId: assignment.tagId,\n assignedAt: assignment.assignedAt,\n product: mapProduct(assignment.product),\n })),\n }))\n}\n\nexport async function getAllProductTagInfos(): Promise {\n const tags = await db.query.productTagInfo.findMany({\n orderBy: productTagInfo.tagName,\n })\n\n return tags.map(mapTagInfo)\n}\n\nexport async function getProductTagInfoById(tagId: number): Promise {\n const tag = await db.query.productTagInfo.findFirst({\n where: eq(productTagInfo.id, tagId),\n })\n\n if (!tag) {\n return null\n }\n\n return mapTagInfo(tag)\n}\n\nexport interface CreateProductTagInput {\n tagName: string\n tagDescription?: string | null\n imageUrl?: string | null\n isDashboardTag?: boolean\n relatedStores?: number[]\n}\n\nexport async function createProductTag(input: CreateProductTagInput): Promise {\n const [tag] = await db.insert(productTagInfo).values({\n tagName: input.tagName,\n tagDescription: input.tagDescription || null,\n imageUrl: input.imageUrl || null,\n isDashboardTag: input.isDashboardTag || false,\n relatedStores: input.relatedStores || [],\n }).returning()\n\n return {\n ...mapTagInfo(tag),\n products: [],\n }\n}\n\nexport async function getProductTagById(tagId: number): Promise {\n const tag = await db.query.productTagInfo.findFirst({\n where: eq(productTagInfo.id, tagId),\n with: {\n products: {\n with: {\n product: true,\n },\n },\n },\n })\n\n if (!tag) {\n return null\n }\n\n return {\n ...mapTagInfo(tag),\n products: tag.products.map((assignment: ProductTagRow & { product: ProductRow }) => ({\n productId: assignment.productId,\n tagId: assignment.tagId,\n assignedAt: assignment.assignedAt,\n product: mapProduct(assignment.product),\n })),\n }\n}\n\nexport interface UpdateProductTagInput {\n tagName?: string\n tagDescription?: string | null\n imageUrl?: string | null\n isDashboardTag?: boolean\n relatedStores?: number[]\n}\n\nexport async function updateProductTag(tagId: number, input: UpdateProductTagInput): Promise {\n const [tag] = await db.update(productTagInfo).set({\n ...(input.tagName !== undefined && { tagName: input.tagName }),\n ...(input.tagDescription !== undefined && { tagDescription: input.tagDescription }),\n ...(input.imageUrl !== undefined && { imageUrl: input.imageUrl }),\n ...(input.isDashboardTag !== undefined && { isDashboardTag: input.isDashboardTag }),\n ...(input.relatedStores !== undefined && { relatedStores: input.relatedStores }),\n }).where(eq(productTagInfo.id, tagId)).returning()\n\n const fullTag = await db.query.productTagInfo.findFirst({\n where: eq(productTagInfo.id, tagId),\n with: {\n products: {\n with: {\n product: true,\n },\n },\n },\n })\n\n return {\n ...mapTagInfo(tag),\n products: fullTag?.products.map((assignment: ProductTagRow & { product: ProductRow }) => ({\n productId: assignment.productId,\n tagId: assignment.tagId,\n assignedAt: assignment.assignedAt,\n product: mapProduct(assignment.product),\n })) || [],\n }\n}\n\nexport async function deleteProductTag(tagId: number): Promise {\n await db.delete(productTagInfo).where(eq(productTagInfo.id, tagId))\n}\n\nexport async function checkProductTagExistsByName(tagName: string): Promise {\n const tag = await db.query.productTagInfo.findFirst({\n where: eq(productTagInfo.tagName, tagName),\n })\n return !!tag\n}\n\nexport async function getSlotsProductIds(slotIds: number[]): Promise> {\n if (slotIds.length === 0) {\n return {}\n }\n\n const associations = await db.query.productSlots.findMany({\n where: inArray(productSlots.slotId, slotIds),\n columns: {\n slotId: true,\n productId: true,\n },\n }) as Array<{ slotId: number; productId: number }>\n\n const result: Record = {}\n for (const assoc of associations) {\n if (!result[assoc.slotId]) {\n result[assoc.slotId] = []\n }\n result[assoc.slotId].push(assoc.productId)\n }\n\n slotIds.forEach((slotId) => {\n if (!result[slotId]) {\n result[slotId] = []\n }\n })\n\n return result\n}\n\nexport async function getProductReviews(productId: number, limit: number, offset: number) {\n const reviews = await db\n .select({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n adminResponse: productReviews.adminResponse,\n adminResponseImages: productReviews.adminResponseImages,\n userName: users.name,\n })\n .from(productReviews)\n .innerJoin(users, eq(productReviews.userId, users.id))\n .where(eq(productReviews.productId, productId))\n .orderBy(desc(productReviews.reviewTime))\n .limit(limit)\n .offset(offset)\n\n const totalCountResult = await db\n .select({ count: sql`count(*)` })\n .from(productReviews)\n .where(eq(productReviews.productId, productId))\n\n const totalCount = Number(totalCountResult[0].count)\n\n const mappedReviews: AdminProductReview[] = reviews.map((review: any) => ({\n id: review.id,\n reviewBody: review.reviewBody,\n ratings: review.ratings,\n imageUrls: review.imageUrls,\n reviewTime: review.reviewTime,\n adminResponse: review.adminResponse ?? null,\n adminResponseImages: review.adminResponseImages,\n userName: review.userName ?? null,\n }))\n\n return {\n reviews: mappedReviews,\n totalCount,\n }\n}\n\nexport async function respondToReview(\n reviewId: number,\n adminResponse: string | undefined,\n adminResponseImages: string[]\n): Promise {\n const [updatedReview] = await db\n .update(productReviews)\n .set({\n adminResponse,\n adminResponseImages,\n })\n .where(eq(productReviews.id, reviewId))\n .returning()\n\n if (!updatedReview) {\n return null\n }\n\n return {\n id: updatedReview.id,\n reviewBody: updatedReview.reviewBody,\n ratings: updatedReview.ratings,\n imageUrls: updatedReview.imageUrls,\n reviewTime: updatedReview.reviewTime,\n adminResponse: updatedReview.adminResponse ?? null,\n adminResponseImages: updatedReview.adminResponseImages,\n userName: null,\n }\n}\n\nexport async function getAllProductGroups() {\n const groups = await db.query.productGroupInfo.findMany({\n with: {\n memberships: {\n with: {\n product: true,\n },\n },\n },\n orderBy: desc(productGroupInfo.createdAt),\n })\n\n return groups.map((group: any) => ({\n id: group.id,\n groupName: group.groupName,\n description: group.description ?? null,\n createdAt: group.createdAt,\n products: group.memberships.map((membership: any) => mapProduct(membership.product)),\n productCount: group.memberships.length,\n memberships: group.memberships\n }))\n}\n\nexport async function createProductGroup(\n groupName: string,\n description: string | undefined,\n productIds: number[]\n): Promise {\n const [newGroup] = await db\n .insert(productGroupInfo)\n .values({\n groupName,\n description,\n })\n .returning()\n\n if (productIds.length > 0) {\n const memberships = productIds.map((productId) => ({\n productId,\n groupId: newGroup.id,\n }))\n\n await db.insert(productGroupMembership).values(memberships)\n }\n\n return {\n id: newGroup.id,\n groupName: newGroup.groupName,\n description: newGroup.description ?? null,\n createdAt: newGroup.createdAt,\n }\n}\n\nexport async function updateProductGroup(\n id: number,\n groupName: string | undefined,\n description: string | undefined,\n productIds: number[] | undefined\n): Promise {\n const updateData: Partial<{\n groupName: string\n description: string | null\n }> = {}\n\n if (groupName !== undefined) updateData.groupName = groupName\n if (description !== undefined) updateData.description = description\n\n const [updatedGroup] = await db\n .update(productGroupInfo)\n .set(updateData)\n .where(eq(productGroupInfo.id, id))\n .returning()\n\n if (!updatedGroup) {\n return null\n }\n\n if (productIds !== undefined) {\n await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id))\n\n if (productIds.length > 0) {\n const memberships = productIds.map((productId) => ({\n productId,\n groupId: id,\n }))\n\n await db.insert(productGroupMembership).values(memberships)\n }\n }\n\n return {\n id: updatedGroup.id,\n groupName: updatedGroup.groupName,\n description: updatedGroup.description ?? null,\n createdAt: updatedGroup.createdAt,\n }\n}\n\nexport async function deleteProductGroup(id: number): Promise {\n await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id))\n\n const [deletedGroup] = await db\n .delete(productGroupInfo)\n .where(eq(productGroupInfo.id, id))\n .returning()\n\n if (!deletedGroup) {\n return null\n }\n\n return {\n id: deletedGroup.id,\n groupName: deletedGroup.groupName,\n description: deletedGroup.description ?? null,\n createdAt: deletedGroup.createdAt,\n }\n}\n\nexport async function addProductToGroup(groupId: number, productId: number): Promise {\n await db.insert(productGroupMembership).values({ groupId, productId })\n}\n\nexport async function removeProductFromGroup(groupId: number, productId: number): Promise {\n await db.delete(productGroupMembership)\n .where(and(\n eq(productGroupMembership.groupId, groupId),\n eq(productGroupMembership.productId, productId)\n ))\n}\n\nexport async function updateProductPrices(updates: Array<{\n productId: number\n price?: number\n marketPrice?: number | null\n flashPrice?: number | null\n isFlashAvailable?: boolean\n}>) {\n if (updates.length === 0) {\n return { updatedCount: 0, invalidIds: [] }\n }\n\n const productIds = updates.map((update) => update.productId)\n const existingProducts = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, productIds),\n columns: { id: true },\n }) as Array<{ id: number }>\n\n const existingIds = new Set(existingProducts.map((product: { id: number }) => product.id))\n const invalidIds = productIds.filter((id) => !existingIds.has(id))\n\n if (invalidIds.length > 0) {\n return { updatedCount: 0, invalidIds }\n }\n\n const updatePromises = updates.map((update) => {\n const { productId, price, marketPrice, flashPrice, isFlashAvailable } = update\n const updateData: Partial> = {}\n\n if (price !== undefined) updateData.price = price.toString()\n if (marketPrice !== undefined) updateData.marketPrice = marketPrice === null ? null : marketPrice.toString()\n if (flashPrice !== undefined) updateData.flashPrice = flashPrice === null ? null : flashPrice.toString()\n if (isFlashAvailable !== undefined) updateData.isFlashAvailable = isFlashAvailable\n\n return db\n .update(productInfo)\n .set(updateData)\n .where(eq(productInfo.id, productId))\n })\n\n await Promise.all(updatePromises)\n\n return { updatedCount: updates.length, invalidIds: [] }\n}\n\n\n// ==========================================================================\n// Product Helpers for Admin Controller\n// ==========================================================================\n\nexport async function checkProductExistsByName(name: string): Promise {\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.name, name),\n columns: { id: true },\n })\n\n return !!product\n}\n\nexport async function checkUnitExists(unitId: number): Promise {\n const unit = await db.query.units.findFirst({\n where: eq(units.id, unitId),\n columns: { id: true },\n })\n\n return !!unit\n}\n\nexport async function getProductImagesById(productId: number): Promise {\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n columns: { images: true },\n })\n\n if (!product) {\n return null\n }\n\n return getStringArray(product.images) || []\n}\n\nexport interface CreateSpecialDealInput {\n quantity: number\n price: number\n validTill: string | Date\n}\n\nexport async function createSpecialDealsForProduct(\n productId: number,\n deals: CreateSpecialDealInput[]\n): Promise {\n if (deals.length === 0) {\n return []\n }\n\n const dealInserts = deals.map((deal) => ({\n productId,\n quantity: deal.quantity.toString(),\n price: deal.price.toString(),\n validTill: new Date(deal.validTill),\n }))\n\n const createdDeals = await db\n .insert(specialDeals)\n .values(dealInserts)\n .returning()\n\n return createdDeals.map(mapSpecialDeal)\n}\n\nexport async function updateProductDeals(\n productId: number,\n deals: CreateSpecialDealInput[]\n): Promise {\n if (deals.length === 0) {\n await db.delete(specialDeals).where(eq(specialDeals.productId, productId))\n return\n }\n\n const existingDeals = await db.query.specialDeals.findMany({\n where: eq(specialDeals.productId, productId),\n })\n\n const existingDealsMap = new Map(\n existingDeals.map((deal: SpecialDealRow) => [`${deal.quantity}-${deal.price}`, deal])\n )\n const newDealsMap = new Map(\n deals.map((deal) => [`${deal.quantity}-${deal.price}`, deal])\n )\n\n const dealsToAdd = deals.filter((deal) => {\n const key = `${deal.quantity}-${deal.price}`\n return !existingDealsMap.has(key)\n })\n\n const dealsToRemove = existingDeals.filter((deal: SpecialDealRow) => {\n const key = `${deal.quantity}-${deal.price}`\n return !newDealsMap.has(key)\n })\n\n const dealsToUpdate = deals.filter((deal: CreateSpecialDealInput) => {\n const key = `${deal.quantity}-${deal.price}`\n const existing = existingDealsMap.get(key)\n const nextValidTill = deal.validTill instanceof Date\n ? deal.validTill.toISOString().split('T')[0]\n : String(deal.validTill)\n return existing && existing.validTill.toISOString().split('T')[0] !== nextValidTill\n })\n\n if (dealsToRemove.length > 0) {\n await db.delete(specialDeals).where(\n inArray(specialDeals.id, dealsToRemove.map((deal: SpecialDealRow) => deal.id))\n )\n }\n\n if (dealsToAdd.length > 0) {\n const dealInserts = dealsToAdd.map((deal) => ({\n productId,\n quantity: deal.quantity.toString(),\n price: deal.price.toString(),\n validTill: new Date(deal.validTill),\n }))\n await db.insert(specialDeals).values(dealInserts)\n }\n\n for (const deal of dealsToUpdate) {\n const key = `${deal.quantity}-${deal.price}`\n const existingDeal = existingDealsMap.get(key)\n if (existingDeal) {\n await db.update(specialDeals)\n .set({ validTill: new Date(deal.validTill) })\n .where(eq(specialDeals.id, existingDeal.id))\n }\n }\n}\n\nexport async function replaceProductTags(productId: number, tagIds: number[]): Promise {\n await db.delete(productTags).where(eq(productTags.productId, productId))\n\n if (tagIds.length === 0) {\n return\n }\n\n const tagAssociations = tagIds.map((tagId) => ({\n productId,\n tagId,\n }))\n\n await db.insert(productTags).values(tagAssociations)\n}\n", "import { db } from '../db/db_index'\nimport {\n deliverySlotInfo,\n productSlots,\n productInfo,\n vendorSnippets,\n productGroupInfo,\n} from '../db/schema'\nimport { and, asc, desc, eq, gt, inArray } from 'drizzle-orm'\nimport type {\n AdminDeliverySlot,\n AdminSlotWithProducts,\n AdminSlotWithProductsAndSnippetsBase,\n AdminSlotCreateResult,\n AdminSlotUpdateResult,\n AdminVendorSnippet,\n AdminSlotProductSummary,\n AdminUpdateSlotCapacityResult,\n} from '@packages/shared'\n\ntype SlotSnippetInput = {\n name: string\n productIds: number[]\n validTill?: string\n}\n\nconst getStringArray = (value: unknown): string[] | null => {\n if (!Array.isArray(value)) return null\n return value.map((item) => String(item))\n}\n\nconst getNumberArray = (value: unknown): number[] => {\n if (!Array.isArray(value)) return []\n return value.map((item) => Number(item))\n}\n\nconst mapDeliverySlot = (slot: typeof deliverySlotInfo.$inferSelect): AdminDeliverySlot => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isFlash: slot.isFlash,\n isCapacityFull: slot.isCapacityFull,\n deliverySequence: slot.deliverySequence,\n groupIds: slot.groupIds,\n})\n\nconst mapSlotProductSummary = (product: { id: number; name: string; images: unknown }): AdminSlotProductSummary => ({\n id: product.id,\n name: product.name,\n images: getStringArray(product.images),\n})\n\nconst mapVendorSnippet = (snippet: typeof vendorSnippets.$inferSelect): AdminVendorSnippet => ({\n id: snippet.id,\n snippetCode: snippet.snippetCode,\n slotId: snippet.slotId ?? null,\n productIds: snippet.productIds || [],\n isPermanent: snippet.isPermanent,\n validTill: snippet.validTill ?? null,\n createdAt: snippet.createdAt,\n})\n\nexport async function getActiveSlotsWithProducts(): Promise {\n const slots = await db.query.deliverySlotInfo\n .findMany({\n where: eq(deliverySlotInfo.isActive, true),\n orderBy: desc(deliverySlotInfo.deliveryTime),\n with: {\n productSlots: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n },\n })\n\n return slots.map((slot: any) => ({\n ...mapDeliverySlot(slot),\n deliverySequence: getNumberArray(slot.deliverySequence),\n products: slot.productSlots.map((ps: any) => mapSlotProductSummary(ps.product)),\n }))\n}\n\nexport async function getActiveSlots(): Promise {\n const slots = await db.query.deliverySlotInfo.findMany({\n where: eq(deliverySlotInfo.isActive, true),\n })\n\n return slots.map(mapDeliverySlot)\n}\n\nexport async function getSlotsAfterDate(afterDate: Date): Promise {\n const slots = await db.query.deliverySlotInfo.findMany({\n where: and(\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, afterDate)\n ),\n orderBy: asc(deliverySlotInfo.deliveryTime),\n })\n\n return slots.map(mapDeliverySlot)\n}\n\nexport async function getSlotByIdWithRelations(id: number): Promise {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, id),\n with: {\n productSlots: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n vendorSnippets: true,\n },\n })\n\n if (!slot) {\n return null\n }\n\n return {\n ...mapDeliverySlot(slot),\n deliverySequence: getNumberArray(slot.deliverySequence),\n groupIds: getNumberArray(slot.groupIds),\n products: slot.productSlots.map((ps: any) => mapSlotProductSummary(ps.product)),\n vendorSnippets: slot.vendorSnippets.map(mapVendorSnippet),\n }\n}\n\nexport async function createSlotWithRelations(input: {\n deliveryTime: string\n freezeTime: string\n isActive?: boolean\n productIds?: number[]\n vendorSnippets?: SlotSnippetInput[]\n groupIds?: number[]\n}): Promise {\n const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input\n\n const result = await db.transaction(async (tx) => {\n const [newSlot] = await tx\n .insert(deliverySlotInfo)\n .values({\n deliveryTime: new Date(deliveryTime),\n freezeTime: new Date(freezeTime),\n isActive: isActive !== undefined ? isActive : true,\n groupIds: groupIds !== undefined ? groupIds : [],\n })\n .returning()\n\n if (productIds && productIds.length > 0) {\n const associations = productIds.map((productId) => ({\n productId,\n slotId: newSlot.id,\n }))\n await tx.insert(productSlots).values(associations)\n }\n\n let createdSnippets: AdminVendorSnippet[] = []\n if (snippets && snippets.length > 0) {\n for (const snippet of snippets) {\n const products = await tx.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n })\n if (products.length !== snippet.productIds.length) {\n throw new Error(`One or more invalid product IDs in snippet \"${snippet.name}\"`)\n }\n\n const existingSnippet = await tx.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippet.name),\n })\n if (existingSnippet) {\n throw new Error(`Snippet name \"${snippet.name}\" already exists`)\n }\n\n const [createdSnippet] = await tx.insert(vendorSnippets).values({\n snippetCode: snippet.name,\n slotId: newSlot.id,\n productIds: snippet.productIds,\n validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,\n }).returning()\n\n createdSnippets.push(mapVendorSnippet(createdSnippet))\n }\n }\n\n return {\n slot: mapDeliverySlot(newSlot),\n createdSnippets,\n message: 'Slot created successfully',\n }\n })\n\n return result\n}\n\nexport async function updateSlotWithRelations(input: {\n id: number\n deliveryTime: string\n freezeTime: string\n isActive?: boolean\n productIds?: number[]\n vendorSnippets?: SlotSnippetInput[]\n groupIds?: number[]\n}): Promise {\n const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input\n\n let validGroupIds = groupIds\n if (groupIds && groupIds.length > 0) {\n const existingGroups = await db.query.productGroupInfo.findMany({\n where: inArray(productGroupInfo.id, groupIds),\n columns: { id: true },\n })\n validGroupIds = existingGroups.map((group: { id: number }) => group.id)\n }\n\n const result = await db.transaction(async (tx) => {\n const [updatedSlot] = await tx\n .update(deliverySlotInfo)\n .set({\n deliveryTime: new Date(deliveryTime),\n freezeTime: new Date(freezeTime),\n isActive: isActive !== undefined ? isActive : true,\n groupIds: validGroupIds !== undefined ? validGroupIds : [],\n })\n .where(eq(deliverySlotInfo.id, id))\n .returning()\n\n if (!updatedSlot) {\n return null\n }\n\n if (productIds !== undefined) {\n await tx.delete(productSlots).where(eq(productSlots.slotId, id))\n\n if (productIds.length > 0) {\n const associations = productIds.map((productId) => ({\n productId,\n slotId: id,\n }))\n await tx.insert(productSlots).values(associations)\n }\n }\n\n let createdSnippets: AdminVendorSnippet[] = []\n if (snippets && snippets.length > 0) {\n for (const snippet of snippets) {\n const products = await tx.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n })\n if (products.length !== snippet.productIds.length) {\n throw new Error(`One or more invalid product IDs in snippet \"${snippet.name}\"`)\n }\n\n const existingSnippet = await tx.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippet.name),\n })\n if (existingSnippet) {\n throw new Error(`Snippet name \"${snippet.name}\" already exists`)\n }\n\n const [createdSnippet] = await tx.insert(vendorSnippets).values({\n snippetCode: snippet.name,\n slotId: id,\n productIds: snippet.productIds,\n validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,\n }).returning()\n\n createdSnippets.push(mapVendorSnippet(createdSnippet))\n }\n }\n\n return {\n slot: mapDeliverySlot(updatedSlot),\n createdSnippets,\n message: 'Slot updated successfully',\n }\n })\n\n return result\n}\n\nexport async function deleteSlotById(id: number): Promise {\n const [deletedSlot] = await db\n .update(deliverySlotInfo)\n .set({ isActive: false })\n .where(eq(deliverySlotInfo.id, id))\n .returning()\n\n if (!deletedSlot) {\n return null\n }\n\n return mapDeliverySlot(deletedSlot)\n}\n\nexport async function getSlotDeliverySequence(slotId: number): Promise {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n })\n\n if (!slot) {\n return null\n }\n\n return mapDeliverySlot(slot)\n}\n\nexport async function updateSlotDeliverySequence(slotId: number, sequence: unknown) {\n const [updatedSlot] = await db\n .update(deliverySlotInfo)\n .set({ deliverySequence: sequence as Record })\n .where(eq(deliverySlotInfo.id, slotId))\n .returning({\n id: deliverySlotInfo.id,\n deliverySequence: deliverySlotInfo.deliverySequence,\n })\n\n return updatedSlot || null\n}\n\nexport async function updateSlotCapacity(slotId: number, isCapacityFull: boolean): Promise {\n const [updatedSlot] = await db\n .update(deliverySlotInfo)\n .set({ isCapacityFull })\n .where(eq(deliverySlotInfo.id, slotId))\n .returning()\n\n if (!updatedSlot) {\n return null\n }\n\n return {\n success: true,\n slot: mapDeliverySlot(updatedSlot),\n message: `Slot ${isCapacityFull ? 'marked as full capacity' : 'capacity reset'}`,\n }\n}\n", "import { db } from '../db/db_index'\nimport { staffUsers, staffRoles, users, userDetails, orders } from '../db/schema'\nimport { eq, or, like, and, lt, desc } from 'drizzle-orm'\n\nexport interface StaffUser {\n id: number\n name: string\n password: string\n staffRoleId: number | null\n createdAt: Date\n}\n\nexport async function getStaffUserByName(name: string): Promise {\n const staff = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.name, name),\n })\n\n return staff || null\n}\n\nexport async function getStaffUserById(staffId: number): Promise {\n const staff = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.id, staffId),\n })\n\n return staff || null\n}\n\nexport async function getAllStaff(): Promise {\n const staff = await db.query.staffUsers.findMany({\n columns: {\n id: true,\n name: true,\n },\n with: {\n role: {\n with: {\n rolePermissions: {\n with: {\n permission: true,\n },\n },\n },\n },\n },\n })\n\n return staff\n}\n\nexport async function getAllUsers(\n cursor?: number,\n limit: number = 20,\n search?: string\n): Promise<{ users: any[]; hasMore: boolean }> {\n let whereCondition = undefined\n\n if (search) {\n whereCondition = or(\n like(users.name, `%${search}%`),\n like(users.email, `%${search}%`),\n like(users.mobile, `%${search}%`)\n )\n }\n\n if (cursor) {\n const cursorCondition = lt(users.id, cursor)\n whereCondition = whereCondition ? and(whereCondition, cursorCondition) : cursorCondition\n }\n\n const allUsers = await db.query.users.findMany({\n where: whereCondition,\n with: {\n userDetails: true,\n },\n orderBy: desc(users.id),\n limit: limit + 1,\n })\n\n const hasMore = allUsers.length > limit\n const usersToReturn = hasMore ? allUsers.slice(0, limit) : allUsers\n\n return { users: usersToReturn, hasMore }\n}\n\nexport async function getUserWithDetails(userId: number): Promise {\n const user = await db.query.users.findFirst({\n where: eq(users.id, userId),\n with: {\n userDetails: true,\n orders: {\n orderBy: desc(orders.createdAt),\n limit: 1,\n },\n },\n })\n\n return user || null\n}\n\nexport async function updateUserSuspensionStatus(userId: number, isSuspended: boolean): Promise {\n await db\n .insert(userDetails)\n .values({ userId, isSuspended })\n .onConflictDoUpdate({\n target: userDetails.userId,\n set: { isSuspended },\n })\n}\n\nexport async function checkStaffUserExists(name: string): Promise {\n const existingUser = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.name, name),\n })\n return !!existingUser\n}\n\nexport async function checkStaffRoleExists(roleId: number): Promise {\n const role = await db.query.staffRoles.findFirst({\n where: eq(staffRoles.id, roleId),\n })\n return !!role\n}\n\nexport async function createStaffUser(\n name: string,\n password: string,\n roleId: number\n): Promise {\n const [newUser] = await db.insert(staffUsers).values({\n name: name.trim(),\n password,\n staffRoleId: roleId,\n }).returning()\n\n return {\n id: newUser.id,\n name: newUser.name,\n password: newUser.password,\n staffRoleId: newUser.staffRoleId,\n createdAt: newUser.createdAt,\n }\n}\n\nexport async function getAllRoles(): Promise {\n const roles = await db.query.staffRoles.findMany({\n columns: {\n id: true,\n roleName: true,\n },\n })\n\n return roles\n}\n", "import { db } from '../db/db_index'\nimport { storeInfo, productInfo } from '../db/schema'\nimport { eq, inArray } from 'drizzle-orm'\n\nexport interface Store {\n id: number\n name: string\n description: string | null\n imageUrl: string | null\n owner: number\n createdAt: Date\n // updatedAt: Date\n}\n\nexport async function getAllStores(): Promise {\n const stores = await db.query.storeInfo.findMany({\n with: {\n owner: true,\n },\n })\n\n return stores\n}\n\nexport async function getStoreById(id: number): Promise {\n const store = await db.query.storeInfo.findFirst({\n where: eq(storeInfo.id, id),\n with: {\n owner: true,\n },\n })\n\n return store || null\n}\n\nexport interface CreateStoreInput {\n name: string\n description?: string\n imageUrl?: string\n owner: number\n}\n\nexport async function createStore(\n input: CreateStoreInput,\n products?: number[]\n): Promise {\n const [newStore] = await db\n .insert(storeInfo)\n .values({\n name: input.name,\n description: input.description,\n imageUrl: input.imageUrl,\n owner: input.owner,\n })\n .returning()\n\n if (products && products.length > 0) {\n await db\n .update(productInfo)\n .set({ storeId: newStore.id })\n .where(inArray(productInfo.id, products))\n }\n\n return {\n id: newStore.id,\n name: newStore.name,\n description: newStore.description,\n imageUrl: newStore.imageUrl,\n owner: newStore.owner,\n createdAt: newStore.createdAt,\n // updatedAt: newStore.updatedAt,\n }\n}\n\nexport interface UpdateStoreInput {\n name?: string\n description?: string\n imageUrl?: string\n owner?: number\n}\n\nexport async function updateStore(\n id: number,\n input: UpdateStoreInput,\n products?: number[]\n): Promise {\n const [updatedStore] = await db\n .update(storeInfo)\n .set({\n ...input,\n // updatedAt: new Date(),\n })\n .where(eq(storeInfo.id, id))\n .returning()\n\n if (!updatedStore) {\n throw new Error('Store not found')\n }\n\n if (products !== undefined) {\n await db\n .update(productInfo)\n .set({ storeId: null })\n .where(eq(productInfo.storeId, id))\n\n if (products.length > 0) {\n await db\n .update(productInfo)\n .set({ storeId: id })\n .where(inArray(productInfo.id, products))\n }\n }\n\n return {\n id: updatedStore.id,\n name: updatedStore.name,\n description: updatedStore.description,\n imageUrl: updatedStore.imageUrl,\n owner: updatedStore.owner,\n createdAt: updatedStore.createdAt,\n // updatedAt: updatedStore.updatedAt,\n }\n}\n\nexport async function deleteStore(id: number): Promise<{ message: string }> {\n return await db.transaction(async (tx) => {\n await tx\n .update(productInfo)\n .set({ storeId: null })\n .where(eq(productInfo.storeId, id))\n\n const [deletedStore] = await tx\n .delete(storeInfo)\n .where(eq(storeInfo.id, id))\n .returning()\n\n if (!deletedStore) {\n throw new Error('Store not found')\n }\n\n return {\n message: 'Store deleted successfully',\n }\n })\n}\n", "import { db } from '../db/db_index'\nimport { users, userDetails, orders, orderItems, complaints, notifCreds, unloggedUserTokens, userIncidents, orderStatus } from '../db/schema'\nimport { eq, sql, desc, asc, count, max, inArray } from 'drizzle-orm'\n\nexport async function createUserByMobile(mobile: string): Promise {\n const [newUser] = await db\n .insert(users)\n .values({\n name: null,\n email: null,\n mobile,\n })\n .returning()\n\n return newUser\n}\n\nexport async function getUserByMobile(mobile: string): Promise {\n const [existingUser] = await db\n .select()\n .from(users)\n .where(eq(users.mobile, mobile))\n .limit(1)\n\n return existingUser || null\n}\n\nexport async function getUnresolvedComplaintsCount(): Promise {\n const result = await db\n .select({ count: count(complaints.id) })\n .from(complaints)\n .where(eq(complaints.isResolved, false))\n \n return result[0]?.count || 0\n}\n\nexport async function getAllUsersWithFilters(\n limit: number,\n cursor?: number,\n search?: string\n): Promise<{ users: any[]; hasMore: boolean }> {\n const whereConditions = []\n \n if (search && search.trim()) {\n whereConditions.push(sql`${users.mobile} LIKE ${`%${search.trim()}%`}`)\n }\n \n if (cursor) {\n whereConditions.push(sql`${users.id} > ${cursor}`)\n }\n\n const usersList = await db\n .select({\n id: users.id,\n name: users.name,\n mobile: users.mobile,\n createdAt: users.createdAt,\n })\n .from(users)\n .where(whereConditions.length > 0 ? sql.join(whereConditions, sql` AND `) : undefined)\n .orderBy(asc(users.id))\n .limit(limit + 1)\n\n const hasMore = usersList.length > limit\n const usersToReturn = hasMore ? usersList.slice(0, limit) : usersList\n\n return { users: usersToReturn, hasMore }\n}\n\nexport async function getOrderCountsByUserIds(userIds: number[]): Promise<{ userId: number; totalOrders: number }[]> {\n if (userIds.length === 0) return []\n \n return await db\n .select({\n userId: orders.userId,\n totalOrders: count(orders.id),\n })\n .from(orders)\n .where(sql`${orders.userId} IN (${sql.join(userIds, sql`, `)})`)\n .groupBy(orders.userId)\n}\n\nexport async function getLastOrdersByUserIds(userIds: number[]): Promise<{ userId: number; lastOrderDate: Date | null }[]> {\n if (userIds.length === 0) return []\n \n return await db\n .select({\n userId: orders.userId,\n lastOrderDate: max(orders.createdAt),\n })\n .from(orders)\n .where(sql`${orders.userId} IN (${sql.join(userIds, sql`, `)})`)\n .groupBy(orders.userId)\n}\n\nexport async function getSuspensionStatusesByUserIds(userIds: number[]): Promise<{ userId: number; isSuspended: boolean }[]> {\n if (userIds.length === 0) return []\n \n return await db\n .select({\n userId: userDetails.userId,\n isSuspended: userDetails.isSuspended,\n })\n .from(userDetails)\n .where(sql`${userDetails.userId} IN (${sql.join(userIds, sql`, `)})`)\n}\n\nexport async function getUserBasicInfo(userId: number): Promise {\n const user = await db\n .select({\n id: users.id,\n name: users.name,\n mobile: users.mobile,\n createdAt: users.createdAt,\n })\n .from(users)\n .where(eq(users.id, userId))\n .limit(1)\n\n return user[0] || null\n}\n\nexport async function getUserSuspensionStatus(userId: number): Promise {\n const userDetail = await db\n .select({\n isSuspended: userDetails.isSuspended,\n })\n .from(userDetails)\n .where(eq(userDetails.userId, userId))\n .limit(1)\n\n return userDetail[0]?.isSuspended ?? false\n}\n\nexport async function getUserOrders(userId: number): Promise {\n return await db\n .select({\n id: orders.id,\n readableId: orders.readableId,\n totalAmount: orders.totalAmount,\n createdAt: orders.createdAt,\n isFlashDelivery: orders.isFlashDelivery,\n })\n .from(orders)\n .where(eq(orders.userId, userId))\n .orderBy(desc(orders.createdAt))\n}\n\nexport async function getOrderStatusesByOrderIds(orderIds: number[]): Promise<{ orderId: number; isDelivered: boolean; isCancelled: boolean }[]> {\n if (orderIds.length === 0) return []\n \n return await db\n .select({\n orderId: orderStatus.orderId,\n isDelivered: orderStatus.isDelivered,\n isCancelled: orderStatus.isCancelled,\n })\n .from(orderStatus)\n .where(sql`${orderStatus.orderId} IN (${sql.join(orderIds, sql`, `)})`)\n}\n\nexport async function getItemCountsByOrderIds(orderIds: number[]): Promise<{ orderId: number; itemCount: number }[]> {\n if (orderIds.length === 0) return []\n \n return await db\n .select({\n orderId: orderItems.orderId,\n itemCount: count(orderItems.id),\n })\n .from(orderItems)\n .where(sql`${orderItems.orderId} IN (${sql.join(orderIds, sql`, `)})`)\n .groupBy(orderItems.orderId)\n}\n\nexport async function upsertUserSuspension(userId: number, isSuspended: boolean): Promise {\n const existingDetail = await db\n .select({ id: userDetails.id })\n .from(userDetails)\n .where(eq(userDetails.userId, userId))\n .limit(1)\n\n if (existingDetail.length > 0) {\n await db\n .update(userDetails)\n .set({ isSuspended })\n .where(eq(userDetails.userId, userId))\n } else {\n await db\n .insert(userDetails)\n .values({\n userId,\n isSuspended,\n })\n }\n}\n\nexport async function searchUsers(search?: string): Promise {\n if (search && search.trim()) {\n return await db\n .select({\n id: users.id,\n name: users.name,\n mobile: users.mobile,\n })\n .from(users)\n .where(sql`${users.mobile} LIKE ${`%${search.trim()}%`} OR ${users.name} LIKE ${`%${search.trim()}%`}`)\n } else {\n return await db\n .select({\n id: users.id,\n name: users.name,\n mobile: users.mobile,\n })\n .from(users)\n }\n}\n\nexport async function getAllNotifCreds(): Promise<{ userId: number, token: string }[]> {\n return await db\n .select({ userId: notifCreds.userId, token: notifCreds.token })\n .from(notifCreds)\n}\n\nexport async function getAllUnloggedTokens(): Promise<{ token: string }[]> {\n return await db\n .select({ token: unloggedUserTokens.token })\n .from(unloggedUserTokens)\n}\n\nexport async function getNotifTokensByUserIds(userIds: number[]): Promise<{ token: string }[]> {\n return await db\n .select({ token: notifCreds.token })\n .from(notifCreds)\n .where(inArray(notifCreds.userId, userIds))\n}\n\nexport async function getUserIncidentsWithRelations(userId: number): Promise {\n return await db.query.userIncidents.findMany({\n where: eq(userIncidents.userId, userId),\n with: {\n order: {\n with: {\n orderStatus: true,\n },\n },\n addedBy: true,\n },\n orderBy: desc(userIncidents.dateAdded),\n })\n}\n\nexport async function createUserIncident(\n userId: number,\n orderId: number | undefined,\n adminComment: string | undefined,\n adminUserId: number,\n negativityScore: number | undefined\n): Promise {\n const [incident] = await db.insert(userIncidents)\n .values({\n userId,\n orderId,\n adminComment,\n addedBy: adminUserId,\n negativityScore,\n })\n .returning()\n\n return incident\n}\n", "import { db } from '../db/db_index'\nimport { vendorSnippets, deliverySlotInfo, productInfo, orders, orderItems, orderStatus } from '../db/schema'\nimport { desc, eq, inArray } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type {\n AdminDeliverySlot,\n AdminVendorSnippet,\n AdminVendorSnippetWithSlot,\n AdminVendorSnippetProduct,\n AdminVendorUpdatePackagingResult,\n} from '@packages/shared'\n\ntype VendorSnippetRow = InferSelectModel\ntype DeliverySlotRow = InferSelectModel\ntype ProductRow = InferSelectModel\n\nconst mapVendorSnippet = (snippet: VendorSnippetRow): AdminVendorSnippet => ({\n id: snippet.id,\n snippetCode: snippet.snippetCode,\n slotId: snippet.slotId ?? null,\n productIds: snippet.productIds || [],\n isPermanent: snippet.isPermanent,\n validTill: snippet.validTill ?? null,\n createdAt: snippet.createdAt,\n})\n\nconst mapDeliverySlot = (slot: DeliverySlotRow): AdminDeliverySlot => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isFlash: slot.isFlash,\n isCapacityFull: slot.isCapacityFull,\n deliverySequence: slot.deliverySequence,\n groupIds: slot.groupIds,\n})\n\nconst mapProductSummary = (product: { id: number; name: string }): AdminVendorSnippetProduct => ({\n id: product.id,\n name: product.name,\n})\n\nexport async function checkVendorSnippetExists(snippetCode: string): Promise {\n const existingSnippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n })\n return !!existingSnippet\n}\n\nexport async function getVendorSnippetById(id: number): Promise {\n const snippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.id, id),\n with: {\n slot: true,\n },\n })\n\n if (!snippet) {\n return null\n }\n\n return {\n ...mapVendorSnippet(snippet),\n slot: snippet.slot ? mapDeliverySlot(snippet.slot) : null,\n }\n}\n\nexport async function getVendorSnippetByCode(snippetCode: string): Promise {\n const snippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n })\n\n return snippet ? mapVendorSnippet(snippet) : null\n}\n\nexport async function getAllVendorSnippets(): Promise {\n const snippets = await db.query.vendorSnippets.findMany({\n with: {\n slot: true,\n },\n orderBy: desc(vendorSnippets.createdAt),\n })\n\n return snippets.map((snippet: VendorSnippetRow & { slot: DeliverySlotRow | null }) => ({\n ...mapVendorSnippet(snippet),\n slot: snippet.slot ? mapDeliverySlot(snippet.slot) : null,\n }))\n}\n\nexport async function createVendorSnippet(input: {\n snippetCode: string\n slotId?: number\n productIds: number[]\n isPermanent: boolean\n validTill?: Date\n}): Promise {\n const [result] = await db.insert(vendorSnippets).values({\n snippetCode: input.snippetCode,\n slotId: input.slotId,\n productIds: input.productIds,\n isPermanent: input.isPermanent,\n validTill: input.validTill,\n }).returning()\n\n return mapVendorSnippet(result)\n}\n\nexport async function updateVendorSnippet(id: number, updates: {\n snippetCode?: string\n slotId?: number | null\n productIds?: number[]\n isPermanent?: boolean\n validTill?: Date | null\n}): Promise {\n const [result] = await db.update(vendorSnippets)\n .set(updates)\n .where(eq(vendorSnippets.id, id))\n .returning()\n\n return result ? mapVendorSnippet(result) : null\n}\n\nexport async function deleteVendorSnippet(id: number): Promise {\n const [result] = await db.delete(vendorSnippets)\n .where(eq(vendorSnippets.id, id))\n .returning()\n\n return result ? mapVendorSnippet(result) : null\n}\n\nexport async function getProductsByIds(productIds: number[]): Promise {\n const products = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, productIds),\n columns: { id: true, name: true },\n })\n\n const prods = products.map(mapProductSummary)\n return prods\n}\n\nexport async function getVendorSlotById(slotId: number): Promise {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n })\n\n return slot ? mapDeliverySlot(slot) : null\n}\n\nexport async function getVendorOrdersBySlotId(slotId: number) {\n return await db.query.orders.findMany({\n where: eq(orders.slotId, slotId),\n with: {\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n user: true,\n slot: true,\n },\n orderBy: desc(orders.createdAt),\n })\n}\n\nexport async function getVendorOrders() {\n return await db.query.orders.findMany({\n with: {\n user: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n },\n orderBy: desc(orders.createdAt),\n })\n}\n\nexport async function getOrderItemsByOrderIds(orderIds: number[]) {\n return await db.query.orderItems.findMany({\n where: inArray(orderItems.orderId, orderIds),\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n })\n}\n\nexport async function getOrderStatusByOrderIds(orderIds: number[]) {\n return await db.query.orderStatus.findMany({\n where: inArray(orderStatus.orderId, orderIds),\n })\n}\n\nexport async function updateVendorOrderItemPackaging(\n orderItemId: number,\n isPackaged: boolean\n): Promise {\n const orderItem = await db.query.orderItems.findFirst({\n where: eq(orderItems.id, orderItemId),\n with: {\n order: {\n with: {\n slot: true,\n },\n },\n },\n })\n\n if (!orderItem) {\n return { success: false, message: 'Order item not found' }\n }\n\n if (!orderItem.order.slotId) {\n return { success: false, message: 'Order item not associated with a vendor slot' }\n }\n\n const snippetExists = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.slotId, orderItem.order.slotId),\n })\n\n if (!snippetExists) {\n return { success: false, message: \"No vendor snippet found for this order's slot\" }\n }\n\n const [updatedItem] = await db.update(orderItems)\n .set({\n is_packaged: isPackaged,\n })\n .where(eq(orderItems.id, orderItemId))\n .returning({ id: orderItems.id })\n\n if (!updatedItem) {\n return { success: false, message: 'Failed to update packaging status' }\n }\n\n return { success: true, orderItemId, is_packaged: isPackaged }\n}\n", "import { db } from '../db/db_index'\nimport { addresses, deliverySlotInfo, orders, orderStatus } from '../db/schema'\nimport { and, eq, gte } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserAddress } from '@packages/shared'\n\ntype AddressRow = InferSelectModel\n\nconst mapUserAddress = (address: AddressRow): UserAddress => ({\n id: address.id,\n userId: address.userId,\n name: address.name,\n phone: address.phone,\n addressLine1: address.addressLine1,\n addressLine2: address.addressLine2 ?? null,\n city: address.city,\n state: address.state,\n pincode: address.pincode,\n isDefault: address.isDefault,\n latitude: address.latitude ?? null,\n longitude: address.longitude ?? null,\n googleMapsUrl: address.googleMapsUrl ?? null,\n adminLatitude: address.adminLatitude ?? null,\n adminLongitude: address.adminLongitude ?? null,\n zoneId: address.zoneId ?? null,\n createdAt: address.createdAt,\n})\n\nexport async function getDefaultAddress(userId: number): Promise {\n const [defaultAddress] = await db\n .select()\n .from(addresses)\n .where(and(eq(addresses.userId, userId), eq(addresses.isDefault, true)))\n .limit(1)\n\n return defaultAddress ? mapUserAddress(defaultAddress) : null\n}\n\nexport async function getUserAddresses(userId: number): Promise {\n const userAddresses = await db.select().from(addresses).where(eq(addresses.userId, userId))\n return userAddresses.map(mapUserAddress)\n}\n\nexport async function getUserAddressById(userId: number, addressId: number): Promise {\n const [address] = await db\n .select()\n .from(addresses)\n .where(and(eq(addresses.id, addressId), eq(addresses.userId, userId)))\n .limit(1)\n\n return address ? mapUserAddress(address) : null\n}\n\nexport async function clearDefaultAddress(userId: number): Promise {\n await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId))\n}\n\nexport async function createUserAddress(input: {\n userId: number\n name: string\n phone: string\n addressLine1: string\n addressLine2?: string\n city: string\n state: string\n pincode: string\n isDefault: boolean\n latitude?: number\n longitude?: number\n googleMapsUrl?: string\n}): Promise {\n const [newAddress] = await db.insert(addresses).values({\n userId: input.userId,\n name: input.name,\n phone: input.phone,\n addressLine1: input.addressLine1,\n addressLine2: input.addressLine2,\n city: input.city,\n state: input.state,\n pincode: input.pincode,\n isDefault: input.isDefault,\n latitude: input.latitude,\n longitude: input.longitude,\n googleMapsUrl: input.googleMapsUrl,\n }).returning()\n\n return mapUserAddress(newAddress)\n}\n\nexport async function updateUserAddress(input: {\n userId: number\n addressId: number\n name: string\n phone: string\n addressLine1: string\n addressLine2?: string\n city: string\n state: string\n pincode: string\n isDefault: boolean\n latitude?: number\n longitude?: number\n googleMapsUrl?: string\n}): Promise {\n const [updatedAddress] = await db.update(addresses)\n .set({\n name: input.name,\n phone: input.phone,\n addressLine1: input.addressLine1,\n addressLine2: input.addressLine2,\n city: input.city,\n state: input.state,\n pincode: input.pincode,\n isDefault: input.isDefault,\n googleMapsUrl: input.googleMapsUrl,\n latitude: input.latitude,\n longitude: input.longitude,\n })\n .where(and(eq(addresses.id, input.addressId), eq(addresses.userId, input.userId)))\n .returning()\n\n return updatedAddress ? mapUserAddress(updatedAddress) : null\n}\n\nexport async function deleteUserAddress(userId: number, addressId: number): Promise {\n const [deleted] = await db.delete(addresses)\n .where(and(eq(addresses.id, addressId), eq(addresses.userId, userId)))\n .returning({ id: addresses.id })\n\n return !!deleted\n}\n\nexport async function hasOngoingOrdersForAddress(addressId: number): Promise {\n const ongoingOrders = await db.select({\n orderId: orders.id,\n })\n .from(orders)\n .innerJoin(orderStatus, eq(orders.id, orderStatus.orderId))\n .innerJoin(deliverySlotInfo, eq(orders.slotId, deliverySlotInfo.id))\n .where(and(\n eq(orders.addressId, addressId),\n eq(orderStatus.isCancelled, false),\n gte(deliverySlotInfo.deliveryTime, new Date())\n ))\n .limit(1)\n\n return ongoingOrders.length > 0\n}\n", "import { db } from '../db/db_index'\nimport { homeBanners } from '../db/schema'\nimport { asc, isNotNull } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserBanner } from '@packages/shared'\n\ntype BannerRow = InferSelectModel\n\nconst mapBanner = (banner: BannerRow): UserBanner => ({\n id: banner.id,\n name: banner.name,\n imageUrl: banner.imageUrl,\n description: banner.description ?? null,\n productIds: banner.productIds ?? null,\n redirectUrl: banner.redirectUrl ?? null,\n serialNum: banner.serialNum ?? null,\n isActive: banner.isActive,\n createdAt: banner.createdAt,\n lastUpdated: banner.lastUpdated,\n})\n\nexport async function getActiveBanners(): Promise {\n const banners = await db.query.homeBanners.findMany({\n where: isNotNull(homeBanners.serialNum),\n orderBy: asc(homeBanners.serialNum),\n })\n\n return banners.map(mapBanner)\n}\n", "import { db } from '../db/db_index'\nimport { cartItems, productInfo, units } from '../db/schema'\nimport { and, eq, sql } from 'drizzle-orm'\nimport type { UserCartItem } from '@packages/shared'\n\nconst getStringArray = (value: unknown): string[] => {\n if (!Array.isArray(value)) return []\n return value.map((item) => String(item))\n}\n\nexport async function getCartItemsWithProducts(userId: number): Promise {\n const cartItemsWithProducts = await db\n .select({\n cartId: cartItems.id,\n productId: productInfo.id,\n productName: productInfo.name,\n productPrice: productInfo.price,\n productImages: productInfo.images,\n productQuantity: productInfo.productQuantity,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n quantity: cartItems.quantity,\n addedAt: cartItems.addedAt,\n })\n .from(cartItems)\n .innerJoin(productInfo, eq(cartItems.productId, productInfo.id))\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(eq(cartItems.userId, userId))\n\n return cartItemsWithProducts.map((item) => {\n const priceValue = item.productPrice ?? '0'\n const quantityValue = item.quantity ?? '0'\n return {\n id: item.cartId,\n productId: item.productId,\n quantity: parseFloat(quantityValue),\n addedAt: item.addedAt,\n product: {\n id: item.productId,\n name: item.productName,\n price: priceValue.toString(),\n productQuantity: item.productQuantity,\n unit: item.unitShortNotation,\n isOutOfStock: item.isOutOfStock,\n images: getStringArray(item.productImages),\n },\n subtotal: parseFloat(priceValue.toString()) * parseFloat(quantityValue),\n }\n })\n}\n\nexport async function getProductById(productId: number) {\n return db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n })\n}\n\nexport async function getCartItemByUserProduct(userId: number, productId: number) {\n return db.query.cartItems.findFirst({\n where: and(eq(cartItems.userId, userId), eq(cartItems.productId, productId)),\n })\n}\n\nexport async function incrementCartItemQuantity(itemId: number, quantity: number): Promise {\n await db.update(cartItems)\n .set({\n quantity: sql`${cartItems.quantity} + ${quantity}`,\n })\n .where(eq(cartItems.id, itemId))\n}\n\nexport async function insertCartItem(userId: number, productId: number, quantity: number): Promise {\n await db.insert(cartItems).values({\n userId,\n productId,\n quantity: quantity.toString(),\n })\n}\n\nexport async function updateCartItemQuantity(userId: number, itemId: number, quantity: number) {\n const [updatedItem] = await db.update(cartItems)\n .set({ quantity: quantity.toString() })\n .where(and(eq(cartItems.id, itemId), eq(cartItems.userId, userId)))\n .returning({ id: cartItems.id })\n\n return !!updatedItem\n}\n\nexport async function deleteCartItem(userId: number, itemId: number): Promise {\n const [deletedItem] = await db.delete(cartItems)\n .where(and(eq(cartItems.id, itemId), eq(cartItems.userId, userId)))\n .returning({ id: cartItems.id })\n\n return !!deletedItem\n}\n\nexport async function clearUserCart(userId: number): Promise {\n await db.delete(cartItems).where(eq(cartItems.userId, userId))\n}\n", "import { db } from '../db/db_index'\nimport { complaints } from '../db/schema'\nimport { asc, eq } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserComplaint } from '@packages/shared'\n\ntype ComplaintRow = InferSelectModel\n\nexport async function getUserComplaints(userId: number): Promise {\n const userComplaints = await db\n .select({\n id: complaints.id,\n complaintBody: complaints.complaintBody,\n response: complaints.response,\n isResolved: complaints.isResolved,\n createdAt: complaints.createdAt,\n orderId: complaints.orderId,\n })\n .from(complaints)\n .where(eq(complaints.userId, userId))\n .orderBy(asc(complaints.createdAt))\n\n return userComplaints.map((complaint) => ({\n id: complaint.id,\n complaintBody: complaint.complaintBody,\n response: complaint.response ?? null,\n isResolved: complaint.isResolved,\n createdAt: complaint.createdAt,\n orderId: complaint.orderId ?? null,\n }))\n}\n\nexport async function createComplaint(\n userId: number,\n orderId: number | null,\n complaintBody: string,\n images?: string[] | null\n): Promise {\n await db.insert(complaints).values({\n userId,\n orderId,\n complaintBody,\n images: images || null,\n })\n}\n", "import { db } from '../db/db_index'\nimport { productInfo, storeInfo, units } from '../db/schema'\nimport { and, eq, sql } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserStoreDetailData, UserStoreProductData, UserStoreSummaryData, StoreSummary } from '@packages/shared'\n\ntype StoreRow = InferSelectModel\ntype StoreProductRow = {\n id: number\n name: string\n shortDescription: string | null\n price: string | null\n marketPrice: string | null\n images: unknown\n isOutOfStock: boolean\n incrementStep: number\n unitShortNotation: string\n productQuantity: number\n}\n\nconst getStringArray = (value: unknown): string[] | null => {\n if (!Array.isArray(value)) return null\n return value.map((item) => String(item))\n}\n\nexport async function getStoreSummaries(): Promise {\n const storesData = await db\n .select({\n id: storeInfo.id,\n name: storeInfo.name,\n description: storeInfo.description,\n imageUrl: storeInfo.imageUrl,\n productCount: sql`count(${productInfo.id})`.as('productCount'),\n })\n .from(storeInfo)\n .leftJoin(\n productInfo,\n and(eq(productInfo.storeId, storeInfo.id), eq(productInfo.isSuspended, false))\n )\n .groupBy(storeInfo.id)\n\n const storesWithDetails = await Promise.all(\n storesData.map(async (store) => {\n const sampleProducts = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n images: productInfo.images,\n })\n .from(productInfo)\n .where(and(eq(productInfo.storeId, store.id), eq(productInfo.isSuspended, false)))\n .limit(3)\n\n return {\n id: store.id,\n name: store.name,\n description: store.description ?? null,\n imageUrl: store.imageUrl ?? null,\n productCount: store.productCount || 0,\n sampleProducts: sampleProducts.map((product) => ({\n id: product.id,\n name: product.name,\n images: getStringArray(product.images),\n })),\n }\n })\n )\n\n return storesWithDetails\n}\n\nexport async function getStoreDetail(storeId: number): Promise {\n const storeData = await db.query.storeInfo.findFirst({\n where: eq(storeInfo.id, storeId),\n columns: {\n id: true,\n name: true,\n description: true,\n imageUrl: true,\n },\n })\n\n if (!storeData) {\n return null\n }\n\n const productsData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n incrementStep: productInfo.incrementStep,\n unitShortNotation: units.shortNotation,\n productQuantity: productInfo.productQuantity,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(and(eq(productInfo.storeId, storeId), eq(productInfo.isSuspended, false)))\n\n const products = productsData.map((product: StoreProductRow): UserStoreProductData => ({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription ?? null,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n incrementStep: product.incrementStep,\n unit: product.unitShortNotation,\n unitNotation: product.unitShortNotation,\n images: getStringArray(product.images),\n isOutOfStock: product.isOutOfStock,\n productQuantity: product.productQuantity,\n }))\n\n return {\n store: {\n id: storeData.id,\n name: storeData.name,\n description: storeData.description ?? null,\n imageUrl: storeData.imageUrl ?? null,\n },\n products,\n }\n}\n\n/**\n * Get simple store summary (id, name, description only)\n * Used for common API endpoints\n */\nexport async function getStoresSummary(): Promise {\n return db.query.storeInfo.findMany({\n columns: {\n id: true,\n name: true,\n description: true,\n },\n })\n}\n", "import { db } from '../db/db_index'\nimport { deliverySlotInfo, productInfo, productReviews, productSlots, productTags, specialDeals, storeInfo, units, users } from '../db/schema'\nimport { and, desc, eq, gt, inArray, sql } from 'drizzle-orm'\nimport type { UserProductDetailData, UserProductReview } from '@packages/shared'\n\nconst getStringArray = (value: unknown): string[] | null => {\n if (!Array.isArray(value)) return null\n return value.map((item) => String(item))\n}\n\nexport async function getProductDetailById(productId: number): Promise {\n const productData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n longDescription: productInfo.longDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n storeId: productInfo.storeId,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n productQuantity: productInfo.productQuantity,\n isFlashAvailable: productInfo.isFlashAvailable,\n flashPrice: productInfo.flashPrice,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(eq(productInfo.id, productId))\n .limit(1)\n\n if (productData.length === 0) {\n return null\n }\n\n const product = productData[0]\n\n const storeData = product.storeId ? await db.query.storeInfo.findFirst({\n where: eq(storeInfo.id, product.storeId),\n columns: { id: true, name: true, description: true },\n }) : null\n\n const deliverySlotsData = await db\n .select({\n id: deliverySlotInfo.id,\n deliveryTime: deliverySlotInfo.deliveryTime,\n freezeTime: deliverySlotInfo.freezeTime,\n })\n .from(productSlots)\n .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n .where(\n and(\n eq(productSlots.productId, productId),\n eq(deliverySlotInfo.isActive, true),\n eq(deliverySlotInfo.isCapacityFull, false),\n gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`),\n gt(deliverySlotInfo.freezeTime, sql`CURRENT_TIMESTAMP`)\n )\n )\n .orderBy(deliverySlotInfo.deliveryTime)\n\n const specialDealsData = await db\n .select({\n quantity: specialDeals.quantity,\n price: specialDeals.price,\n validTill: specialDeals.validTill,\n })\n .from(specialDeals)\n .where(\n and(\n eq(specialDeals.productId, productId),\n gt(specialDeals.validTill, sql`CURRENT_TIMESTAMP`)\n )\n )\n .orderBy(specialDeals.quantity)\n\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription ?? null,\n longDescription: product.longDescription ?? null,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n unitNotation: product.unitShortNotation,\n images: getStringArray(product.images),\n isOutOfStock: product.isOutOfStock,\n store: storeData ? {\n id: storeData.id,\n name: storeData.name,\n description: storeData.description ?? null,\n } : null,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n isFlashAvailable: product.isFlashAvailable,\n flashPrice: product.flashPrice?.toString() || null,\n deliverySlots: deliverySlotsData,\n specialDeals: specialDealsData.map((deal) => ({\n quantity: String(deal.quantity ?? '0'),\n price: String(deal.price ?? '0'),\n validTill: deal.validTill,\n })),\n }\n}\n\nexport async function getProductReviews(productId: number, limit: number, offset: number) {\n const reviews = await db\n .select({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n userName: users.name,\n })\n .from(productReviews)\n .innerJoin(users, eq(productReviews.userId, users.id))\n .where(eq(productReviews.productId, productId))\n .orderBy(desc(productReviews.reviewTime))\n .limit(limit)\n .offset(offset)\n\n const totalCountResult = await db\n .select({ count: sql`count(*)` })\n .from(productReviews)\n .where(eq(productReviews.productId, productId))\n\n const totalCount = Number(totalCountResult[0].count)\n\n const mappedReviews: UserProductReview[] = reviews.map((review) => ({\n id: review.id,\n reviewBody: review.reviewBody,\n ratings: review.ratings,\n imageUrls: getStringArray(review.imageUrls),\n reviewTime: review.reviewTime,\n userName: review.userName ?? null,\n }))\n\n return {\n reviews: mappedReviews,\n totalCount,\n }\n}\n\nexport async function getProductById(productId: number) {\n return db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n })\n}\n\nexport async function createProductReview(\n userId: number,\n productId: number,\n reviewBody: string,\n ratings: number,\n imageUrls: string[]\n): Promise {\n const [newReview] = await db.insert(productReviews).values({\n userId,\n productId,\n reviewBody,\n ratings,\n imageUrls,\n }).returning({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n })\n\n return {\n id: newReview.id,\n reviewBody: newReview.reviewBody,\n ratings: newReview.ratings,\n imageUrls: getStringArray(newReview.imageUrls),\n reviewTime: newReview.reviewTime,\n userName: null,\n }\n}\n\nexport interface ProductSummaryData {\n id: number\n name: string\n shortDescription: string | null\n price: string\n marketPrice: string | null\n images: unknown\n isOutOfStock: boolean\n unitShortNotation: string\n productQuantity: number\n}\n\nexport async function getAllProductsWithUnits(tagId?: number): Promise {\n let productIds: number[] | null = null\n\n // If tagId is provided, get products that have this tag\n if (tagId) {\n const taggedProducts = await db\n .select({ productId: productTags.productId })\n .from(productTags)\n .where(eq(productTags.tagId, tagId))\n\n productIds = taggedProducts.map(tp => tp.productId)\n }\n\n let whereCondition = undefined\n\n // Filter by product IDs if tag filtering is applied\n if (productIds && productIds.length > 0) {\n whereCondition = inArray(productInfo.id, productIds)\n }\n\n const results = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n productQuantity: productInfo.productQuantity,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(whereCondition)\n\n return results.map((product) => ({\n ...product,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n }))\n}\n\n/**\n * Get all suspended product IDs\n */\nexport async function getSuspendedProductIds(): Promise {\n const suspendedProducts = await db\n .select({ id: productInfo.id })\n .from(productInfo)\n .where(eq(productInfo.isSuspended, true))\n\n return suspendedProducts.map(sp => sp.id)\n}\n\n/**\n * Get next delivery date for a product (with capacity check)\n * This version filters by both isActive AND isCapacityFull\n */\nexport async function getNextDeliveryDateWithCapacity(productId: number): Promise {\n const result = await db\n .select({ deliveryTime: deliverySlotInfo.deliveryTime })\n .from(productSlots)\n .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n .where(\n and(\n eq(productSlots.productId, productId),\n eq(deliverySlotInfo.isActive, true),\n eq(deliverySlotInfo.isCapacityFull, false),\n gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`)\n )\n )\n .orderBy(deliverySlotInfo.deliveryTime)\n .limit(1)\n\n return result[0]?.deliveryTime || null\n}\n", "import { db } from '../db/db_index'\nimport { deliverySlotInfo, productInfo } from '../db/schema'\nimport { asc, eq } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserDeliverySlot, UserSlotAvailability } from '@packages/shared'\n\ntype SlotRow = InferSelectModel\n\nconst mapSlot = (slot: SlotRow): UserDeliverySlot => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isFlash: slot.isFlash,\n isCapacityFull: slot.isCapacityFull,\n deliverySequence: slot.deliverySequence,\n groupIds: slot.groupIds,\n})\n\nexport async function getActiveSlotsList(): Promise {\n const slots = await db.query.deliverySlotInfo.findMany({\n where: eq(deliverySlotInfo.isActive, true),\n orderBy: asc(deliverySlotInfo.deliveryTime),\n })\n\n return slots.map(mapSlot)\n}\n\nexport async function getProductAvailability(): Promise {\n const products = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n isOutOfStock: productInfo.isOutOfStock,\n isFlashAvailable: productInfo.isFlashAvailable,\n })\n .from(productInfo)\n .where(eq(productInfo.isSuspended, false))\n\n return products.map((product) => ({\n id: product.id,\n name: product.name,\n isOutOfStock: product.isOutOfStock,\n isFlashAvailable: product.isFlashAvailable,\n }))\n}\n", "import { db } from '../db/db_index'\nimport { orders, payments, orderStatus } from '../db/schema'\nimport { eq } from 'drizzle-orm'\n\nexport async function getOrderById(orderId: number) {\n return db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n })\n}\n\nexport async function getPaymentByOrderId(orderId: number) {\n return db.query.payments.findFirst({\n where: eq(payments.orderId, orderId),\n })\n}\n\nexport async function getPaymentByMerchantOrderId(merchantOrderId: string) {\n return db.query.payments.findFirst({\n where: eq(payments.merchantOrderId, merchantOrderId),\n })\n}\n\nexport async function updatePaymentSuccess(merchantOrderId: string, payload: unknown) {\n const [updatedPayment] = await db\n .update(payments)\n .set({\n status: 'success',\n payload,\n })\n .where(eq(payments.merchantOrderId, merchantOrderId))\n .returning({\n id: payments.id,\n orderId: payments.orderId,\n })\n\n return updatedPayment || null\n}\n\nexport async function updateOrderPaymentStatus(orderId: number, status: 'pending' | 'success' | 'cod' | 'failed') {\n await db\n .update(orderStatus)\n .set({ paymentStatus: status })\n .where(eq(orderStatus.orderId, orderId))\n}\n\nexport async function markPaymentFailed(paymentId: number) {\n await db\n .update(payments)\n .set({ status: 'failed' })\n .where(eq(payments.id, paymentId))\n}\n", "import { db } from '../db/db_index'\nimport {\n users,\n userCreds,\n userDetails,\n addresses,\n cartItems,\n complaints,\n couponApplicableUsers,\n couponUsage,\n notifCreds,\n notifications,\n orderItems,\n orderStatus,\n orders,\n payments,\n refunds,\n productReviews,\n reservedCoupons,\n} from '../db/schema'\nimport { eq } from 'drizzle-orm'\n\nexport async function getUserByEmail(email: string) {\n const [user] = await db.select().from(users).where(eq(users.email, email)).limit(1)\n return user || null\n}\n\nexport async function getUserByMobile(mobile: string) {\n const [user] = await db.select().from(users).where(eq(users.mobile, mobile)).limit(1)\n return user || null\n}\n\nexport async function getUserById(userId: number) {\n const [user] = await db.select().from(users).where(eq(users.id, userId)).limit(1)\n return user || null\n}\n\nexport async function getUserCreds(userId: number) {\n const [creds] = await db.select().from(userCreds).where(eq(userCreds.userId, userId)).limit(1)\n return creds || null\n}\n\nexport async function getUserDetails(userId: number) {\n const [details] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1)\n return details || null\n}\n\nexport async function isUserSuspended(userId: number): Promise {\n const details = await getUserDetails(userId)\n return details?.isSuspended ?? false\n}\n\nexport async function createUserWithProfile(input: {\n name: string\n email: string\n mobile: string\n hashedPassword: string\n profileImage?: string | null\n}) {\n return db.transaction(async (tx) => {\n // Create user\n const [user] = await tx.insert(users).values({\n name: input.name,\n email: input.email,\n mobile: input.mobile,\n }).returning()\n\n // Create user credentials\n await tx.insert(userCreds).values({\n userId: user.id,\n userPassword: input.hashedPassword,\n })\n\n // Create user details with profile image\n await tx.insert(userDetails).values({\n userId: user.id,\n profileImage: input.profileImage || null,\n })\n\n return user\n })\n}\n\nexport async function getUserDetailsByUserId(userId: number) {\n const [details] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1)\n return details || null\n}\n\nexport async function updateUserProfile(userId: number, data: {\n name?: string\n email?: string\n mobile?: string\n hashedPassword?: string\n profileImage?: string\n bio?: string\n dateOfBirth?: Date | null\n gender?: string\n occupation?: string\n}) {\n return db.transaction(async (tx) => {\n // Update user table\n const userUpdate: any = {}\n if (data.name !== undefined) userUpdate.name = data.name\n if (data.email !== undefined) userUpdate.email = data.email\n if (data.mobile !== undefined) userUpdate.mobile = data.mobile\n\n if (Object.keys(userUpdate).length > 0) {\n await tx.update(users).set(userUpdate).where(eq(users.id, userId))\n }\n\n // Update password if provided\n if (data.hashedPassword) {\n await tx.update(userCreds).set({\n userPassword: data.hashedPassword,\n }).where(eq(userCreds.userId, userId))\n }\n\n // Update or insert user details\n const detailsUpdate: any = {}\n if (data.bio !== undefined) detailsUpdate.bio = data.bio\n if (data.dateOfBirth !== undefined) detailsUpdate.dateOfBirth = data.dateOfBirth\n if (data.gender !== undefined) detailsUpdate.gender = data.gender\n if (data.occupation !== undefined) detailsUpdate.occupation = data.occupation\n if (data.profileImage !== undefined) detailsUpdate.profileImage = data.profileImage\n detailsUpdate.updatedAt = new Date()\n\n const [existingDetails] = await tx.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1)\n\n if (existingDetails) {\n await tx.update(userDetails).set(detailsUpdate).where(eq(userDetails.userId, userId))\n } else {\n await tx.insert(userDetails).values({\n userId,\n ...detailsUpdate,\n createdAt: new Date(),\n })\n }\n\n // Return updated user\n const [user] = await tx.select().from(users).where(eq(users.id, userId)).limit(1)\n return user\n })\n}\n\nexport async function createUserWithCreds(input: {\n name: string\n email: string\n mobile: string\n hashedPassword: string\n}) {\n return db.transaction(async (tx) => {\n const [user] = await tx.insert(users).values({\n name: input.name,\n email: input.email,\n mobile: input.mobile,\n }).returning()\n\n await tx.insert(userCreds).values({\n userId: user.id,\n userPassword: input.hashedPassword,\n })\n\n return user\n })\n}\n\nexport async function createUserWithMobile(mobile: string) {\n const [user] = await db.insert(users).values({\n name: null,\n email: null,\n mobile,\n }).returning()\n\n return user\n}\n\nexport async function upsertUserPassword(userId: number, hashedPassword: string) {\n try {\n await db.insert(userCreds).values({\n userId,\n userPassword: hashedPassword,\n })\n return\n } catch (error: any) {\n if (error.code === '23505') {\n await db.update(userCreds).set({\n userPassword: hashedPassword,\n }).where(eq(userCreds.userId, userId))\n return\n }\n throw error\n }\n}\n\nexport async function deleteUserAccount(userId: number) {\n await db.transaction(async (tx) => {\n await tx.delete(notifCreds).where(eq(notifCreds.userId, userId))\n await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.userId, userId))\n await tx.delete(couponUsage).where(eq(couponUsage.userId, userId))\n await tx.delete(complaints).where(eq(complaints.userId, userId))\n await tx.delete(cartItems).where(eq(cartItems.userId, userId))\n await tx.delete(notifications).where(eq(notifications.userId, userId))\n await tx.delete(productReviews).where(eq(productReviews.userId, userId))\n\n await tx.update(reservedCoupons)\n .set({ redeemedBy: null })\n .where(eq(reservedCoupons.redeemedBy, userId))\n\n const userOrders = await tx\n .select({ id: orders.id })\n .from(orders)\n .where(eq(orders.userId, userId))\n\n for (const order of userOrders) {\n await tx.delete(orderItems).where(eq(orderItems.orderId, order.id))\n await tx.delete(orderStatus).where(eq(orderStatus.orderId, order.id))\n await tx.delete(payments).where(eq(payments.orderId, order.id))\n await tx.delete(refunds).where(eq(refunds.orderId, order.id))\n await tx.delete(couponUsage).where(eq(couponUsage.orderId, order.id))\n await tx.delete(complaints).where(eq(complaints.orderId, order.id))\n }\n\n await tx.delete(orders).where(eq(orders.userId, userId))\n await tx.delete(addresses).where(eq(addresses.userId, userId))\n await tx.delete(userDetails).where(eq(userDetails.userId, userId))\n await tx.delete(userCreds).where(eq(userCreds.userId, userId))\n await tx.delete(users).where(eq(users.id, userId))\n })\n}\n", "import { db } from '../db/db_index'\nimport {\n couponApplicableProducts,\n couponApplicableUsers,\n couponUsage,\n coupons,\n reservedCoupons,\n} from '../db/schema'\nimport { and, eq, gt, isNull, or } from 'drizzle-orm'\nimport type { InferSelectModel } from 'drizzle-orm'\nimport type { UserCoupon, UserCouponApplicableProduct, UserCouponApplicableUser, UserCouponUsage, UserCouponWithRelations } from '@packages/shared'\n\ntype CouponRow = InferSelectModel\ntype CouponUsageRow = InferSelectModel\ntype CouponApplicableUserRow = InferSelectModel\ntype CouponApplicableProductRow = InferSelectModel\ntype ReservedCouponRow = InferSelectModel\n\nconst mapCoupon = (coupon: CouponRow): UserCoupon => ({\n id: coupon.id,\n couponCode: coupon.couponCode,\n isUserBased: coupon.isUserBased,\n discountPercent: coupon.discountPercent ? coupon.discountPercent.toString() : null,\n flatDiscount: coupon.flatDiscount ? coupon.flatDiscount.toString() : null,\n minOrder: coupon.minOrder ? coupon.minOrder.toString() : null,\n productIds: coupon.productIds,\n maxValue: coupon.maxValue ? coupon.maxValue.toString() : null,\n isApplyForAll: coupon.isApplyForAll,\n validTill: coupon.validTill ?? null,\n maxLimitForUser: coupon.maxLimitForUser ?? null,\n isInvalidated: coupon.isInvalidated,\n exclusiveApply: coupon.exclusiveApply,\n createdAt: coupon.createdAt,\n})\n\nconst mapUsage = (usage: CouponUsageRow): UserCouponUsage => ({\n id: usage.id,\n userId: usage.userId,\n couponId: usage.couponId,\n orderId: usage.orderId ?? null,\n orderItemId: usage.orderItemId ?? null,\n usedAt: usage.usedAt,\n})\n\nconst mapApplicableUser = (applicable: CouponApplicableUserRow): UserCouponApplicableUser => ({\n id: applicable.id,\n couponId: applicable.couponId,\n userId: applicable.userId,\n})\n\nconst mapApplicableProduct = (applicable: CouponApplicableProductRow): UserCouponApplicableProduct => ({\n id: applicable.id,\n couponId: applicable.couponId,\n productId: applicable.productId,\n})\n\nconst mapCouponWithRelations = (coupon: CouponRow & {\n usages: CouponUsageRow[]\n applicableUsers: CouponApplicableUserRow[]\n applicableProducts: CouponApplicableProductRow[]\n}): UserCouponWithRelations => ({\n ...mapCoupon(coupon),\n usages: coupon.usages.map(mapUsage),\n applicableUsers: coupon.applicableUsers.map(mapApplicableUser),\n applicableProducts: coupon.applicableProducts.map(mapApplicableProduct),\n})\n\nexport async function getActiveCouponsWithRelations(userId: number): Promise {\n const allCoupons = await db.query.coupons.findMany({\n where: and(\n eq(coupons.isInvalidated, false),\n or(\n isNull(coupons.validTill),\n gt(coupons.validTill, new Date())\n )\n ),\n with: {\n usages: {\n where: eq(couponUsage.userId, userId),\n },\n applicableUsers: true,\n applicableProducts: true,\n },\n })\n\n return allCoupons.map(mapCouponWithRelations)\n}\n\nexport async function getAllCouponsWithRelations(userId: number): Promise {\n const allCoupons = await db.query.coupons.findMany({\n with: {\n usages: {\n where: eq(couponUsage.userId, userId),\n },\n applicableUsers: true,\n applicableProducts: true,\n },\n })\n\n return allCoupons.map(mapCouponWithRelations)\n}\n\nexport async function getReservedCouponByCode(secretCode: string): Promise {\n const reserved = await db.query.reservedCoupons.findFirst({\n where: and(\n eq(reservedCoupons.secretCode, secretCode.toUpperCase()),\n eq(reservedCoupons.isRedeemed, false)\n ),\n })\n\n return reserved || null\n}\n\nexport async function redeemReservedCoupon(userId: number, reservedCoupon: ReservedCouponRow): Promise {\n const couponResult = await db.transaction(async (tx) => {\n const [coupon] = await tx.insert(coupons).values({\n couponCode: reservedCoupon.couponCode,\n isUserBased: true,\n discountPercent: reservedCoupon.discountPercent,\n flatDiscount: reservedCoupon.flatDiscount,\n minOrder: reservedCoupon.minOrder,\n productIds: reservedCoupon.productIds,\n maxValue: reservedCoupon.maxValue,\n isApplyForAll: false,\n validTill: reservedCoupon.validTill,\n maxLimitForUser: reservedCoupon.maxLimitForUser,\n exclusiveApply: reservedCoupon.exclusiveApply,\n createdBy: reservedCoupon.createdBy,\n }).returning()\n\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId,\n })\n\n await tx.update(reservedCoupons).set({\n isRedeemed: true,\n redeemedBy: userId,\n redeemedAt: new Date(),\n }).where(eq(reservedCoupons.id, reservedCoupon.id))\n\n return coupon\n })\n\n return mapCoupon(couponResult)\n}\n", "import { db } from '../db/db_index'\nimport { notifCreds, unloggedUserTokens, userCreds, userDetails, users } from '../db/schema'\nimport { and, eq } from 'drizzle-orm'\n\nexport async function getUserById(userId: number) {\n const [user] = await db.select().from(users).where(eq(users.id, userId)).limit(1)\n return user || null\n}\n\nexport async function getUserDetailByUserId(userId: number) {\n const [detail] = await db.select().from(userDetails).where(eq(userDetails.userId, userId)).limit(1)\n return detail || null\n}\n\nexport async function getUserWithCreds(userId: number) {\n const result = await db\n .select()\n .from(users)\n .leftJoin(userCreds, eq(users.id, userCreds.userId))\n .where(eq(users.id, userId))\n .limit(1)\n\n if (result.length === 0) return null\n return {\n user: result[0].users,\n creds: result[0].user_creds,\n }\n}\n\nexport async function getNotifCred(userId: number, token: string) {\n return db.query.notifCreds.findFirst({\n where: and(eq(notifCreds.userId, userId), eq(notifCreds.token, token)),\n })\n}\n\nexport async function upsertNotifCred(userId: number, token: string): Promise {\n const existing = await getNotifCred(userId, token)\n if (existing) {\n await db.update(notifCreds)\n .set({ lastVerified: new Date() })\n .where(eq(notifCreds.id, existing.id))\n return\n }\n\n await db.insert(notifCreds).values({\n userId,\n token,\n lastVerified: new Date(),\n })\n}\n\nexport async function deleteUnloggedToken(token: string): Promise {\n await db.delete(unloggedUserTokens).where(eq(unloggedUserTokens.token, token))\n}\n\nexport async function getUnloggedToken(token: string) {\n return db.query.unloggedUserTokens.findFirst({\n where: eq(unloggedUserTokens.token, token),\n })\n}\n\nexport async function upsertUnloggedToken(token: string): Promise {\n const existing = await getUnloggedToken(token)\n if (existing) {\n await db.update(unloggedUserTokens)\n .set({ lastVerified: new Date() })\n .where(eq(unloggedUserTokens.id, existing.id))\n return\n }\n\n await db.insert(unloggedUserTokens).values({\n token,\n lastVerified: new Date(),\n })\n}\n", "export function coerceDate(value: unknown): Date | null {\n if (value instanceof Date) {\n return Number.isNaN(value.getTime()) ? null : value\n }\n\n if (value === null || value === undefined) {\n return null\n }\n\n if (typeof value === 'number') {\n const date = new Date(value)\n return Number.isNaN(date.getTime()) ? null : date\n }\n\n if (typeof value === 'string') {\n const parsed = Date.parse(value)\n if (!Number.isNaN(parsed)) {\n return new Date(parsed)\n }\n\n const asNumber = Number(value)\n if (!Number.isNaN(asNumber)) {\n const date = new Date(asNumber)\n return Number.isNaN(date.getTime()) ? null : date\n }\n }\n\n return null\n}\n", "import { db } from '../db/db_index'\nimport {\n orders,\n orderItems,\n orderStatus,\n addresses,\n productInfo,\n paymentInfoTable,\n coupons,\n couponUsage,\n cartItems,\n refunds,\n units,\n userDetails,\n deliverySlotInfo,\n} from '../db/schema'\nimport { and, eq, inArray, desc, gte, sql } from 'drizzle-orm'\nimport type {\n UserOrderSummary,\n UserOrderDetail,\n UserRecentProduct,\n} from '@packages/shared'\nimport { coerceDate } from '../lib/date'\n\nexport interface OrderItemInput {\n productId: number\n quantity: number\n slotId: number | null\n}\n\nexport interface PlaceOrderInput {\n userId: number\n selectedItems: OrderItemInput[]\n addressId: number\n paymentMethod: 'online' | 'cod'\n couponId?: number\n userNotes?: string\n isFlash?: boolean\n}\n\nexport interface OrderGroupData {\n slotId: number | null\n items: Array<{\n productId: number\n quantity: number\n slotId: number | null\n product: typeof productInfo.$inferSelect\n }>\n}\n\nexport interface PlacedOrder {\n id: number\n userId: number\n addressId: number\n slotId: number | null\n totalAmount: string\n deliveryCharge: string\n isCod: boolean\n isOnlinePayment: boolean\n paymentInfoId: number | null\n readableId: number\n userNotes: string | null\n orderGroupId: string\n orderGroupProportion: string\n isFlashDelivery: boolean\n createdAt: Date\n}\n\nexport interface OrderWithRelations {\n id: number\n userId: number\n addressId: number\n slotId: number | null\n totalAmount: string\n deliveryCharge: string\n isCod: boolean\n isOnlinePayment: boolean\n isFlashDelivery: boolean\n userNotes: string | null\n createdAt: Date\n orderItems: Array<{\n id: number\n productId: number\n quantity: string\n price: string\n discountedPrice: string | null\n is_packaged: boolean\n product: {\n id: number\n name: string\n images: unknown\n }\n }>\n slot: {\n deliveryTime: Date\n } | null\n paymentInfo: {\n id: number\n status: string\n } | null\n orderStatus: Array<{\n id: number\n isCancelled: boolean\n isDelivered: boolean\n paymentStatus: string\n cancelReason: string | null\n }>\n refunds: Array<{\n refundStatus: string\n refundAmount: string | null\n }>\n}\n\nexport interface OrderDetailWithRelations {\n id: number\n userId: number\n addressId: number\n slotId: number | null\n totalAmount: string\n deliveryCharge: string\n isCod: boolean\n isOnlinePayment: boolean\n isFlashDelivery: boolean\n userNotes: string | null\n createdAt: Date\n orderItems: Array<{\n id: number\n productId: number\n quantity: string\n price: string\n discountedPrice: string | null\n is_packaged: boolean\n product: {\n id: number\n name: string\n images: unknown\n }\n }>\n slot: {\n deliveryTime: Date\n } | null\n paymentInfo: {\n id: number\n status: string\n } | null\n orderStatus: Array<{\n id: number\n isCancelled: boolean\n isDelivered: boolean\n paymentStatus: string\n cancelReason: string | null\n }>\n refunds: Array<{\n refundStatus: string\n refundAmount: string | null\n }>\n}\n\nexport interface CouponValidationResult {\n id: number\n couponCode: string\n isInvalidated: boolean\n validTill: Date | null\n maxLimitForUser: number | null\n minOrder: string | null\n discountPercent: string | null\n flatDiscount: string | null\n maxValue: string | null\n usages: Array<{\n id: number\n userId: number\n }>\n}\n\nexport interface CouponUsageWithCoupon {\n id: number\n couponId: number\n orderId: number | null\n coupon: {\n id: number\n couponCode: string\n discountPercent: string | null\n flatDiscount: string | null\n maxValue: string | null\n }\n}\n\nexport async function validateAndGetCoupon(\n couponId: number | undefined,\n userId: number,\n totalAmount: number\n): Promise {\n if (!couponId) return null\n\n const coupon = await db.query.coupons.findFirst({\n where: eq(coupons.id, couponId),\n with: {\n usages: { where: eq(couponUsage.userId, userId) },\n },\n })\n\n if (!coupon) throw new Error('Invalid coupon')\n if (coupon.isInvalidated) throw new Error('Coupon is no longer valid')\n if (coupon.validTill && new Date(coupon.validTill) < new Date())\n throw new Error('Coupon has expired')\n if (\n coupon.maxLimitForUser &&\n coupon.usages.length >= coupon.maxLimitForUser\n )\n throw new Error('Coupon usage limit exceeded')\n if (\n coupon.minOrder &&\n parseFloat(coupon.minOrder.toString()) > totalAmount\n )\n throw new Error('Order amount does not meet coupon minimum requirement')\n\n return coupon as CouponValidationResult\n}\n\nexport function applyDiscountToOrder(\n orderTotal: number,\n appliedCoupon: CouponValidationResult | null,\n proportion: number\n): { finalOrderTotal: number; orderGroupProportion: number } {\n let finalOrderTotal = orderTotal\n \n if (appliedCoupon) {\n if (appliedCoupon.discountPercent) {\n const discount = Math.min(\n (orderTotal *\n parseFloat(appliedCoupon.discountPercent.toString())) /\n 100,\n appliedCoupon.maxValue\n ? parseFloat(appliedCoupon.maxValue.toString()) * proportion\n : Infinity\n )\n finalOrderTotal -= discount\n } else if (appliedCoupon.flatDiscount) {\n const discount = Math.min(\n parseFloat(appliedCoupon.flatDiscount.toString()) * proportion,\n appliedCoupon.maxValue\n ? parseFloat(appliedCoupon.maxValue.toString()) * proportion\n : finalOrderTotal\n )\n finalOrderTotal -= discount\n }\n }\n\n return { finalOrderTotal, orderGroupProportion: proportion }\n}\n\nexport async function getAddressByIdAndUser(\n addressId: number,\n userId: number\n) {\n return db.query.addresses.findFirst({\n where: and(eq(addresses.userId, userId), eq(addresses.id, addressId)),\n })\n}\n\nexport async function getProductById(productId: number) {\n return db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n })\n}\n\nexport async function checkUserSuspended(userId: number): Promise {\n const userDetail = await db.query.userDetails.findFirst({\n where: eq(userDetails.userId, userId),\n })\n return userDetail?.isSuspended ?? false\n}\n\nexport async function getSlotCapacityStatus(slotId: number): Promise {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n columns: {\n isCapacityFull: true,\n },\n })\n return slot?.isCapacityFull ?? false\n}\n\nexport async function placeOrderTransaction(params: {\n userId: number\n ordersData: Array<{\n order: Omit\n orderItems: Omit[]\n orderStatus: Omit\n }>\n paymentMethod: 'online' | 'cod'\n totalWithDelivery: number\n}): Promise {\n const { userId, ordersData, paymentMethod } = params\n\n return db.transaction(async (tx) => {\n let sharedPaymentInfoId: number | null = null\n if (paymentMethod === 'online') {\n const [paymentInfo] = await tx\n .insert(paymentInfoTable)\n .values({\n status: 'pending',\n gateway: 'razorpay',\n merchantOrderId: `multi_order_${Date.now()}`,\n })\n .returning()\n sharedPaymentInfoId = paymentInfo.id\n }\n\n const ordersToInsert: Omit[] =\n ordersData.map((od) => ({\n ...od.order,\n paymentInfoId: sharedPaymentInfoId,\n }))\n\n const insertedOrders = await tx.insert(orders).values(ordersToInsert).returning()\n\n const allOrderItems: Omit[] = []\n const allOrderStatuses: Omit[] = []\n\n insertedOrders.forEach((order, index) => {\n const od = ordersData[index]\n od.orderItems.forEach((item) => {\n allOrderItems.push({ ...item, orderId: order.id })\n })\n allOrderStatuses.push({\n ...od.orderStatus,\n orderId: order.id,\n })\n })\n\n await tx.insert(orderItems).values(allOrderItems)\n await tx.insert(orderStatus).values(allOrderStatuses)\n\n return insertedOrders as PlacedOrder[]\n })\n}\n\nexport async function deleteCartItemsForOrder(\n userId: number,\n productIds: number[]\n): Promise {\n await db.delete(cartItems).where(\n and(\n eq(cartItems.userId, userId),\n inArray(cartItems.productId, productIds)\n )\n )\n}\n\nexport async function recordCouponUsage(\n userId: number,\n couponId: number,\n orderId: number\n): Promise {\n await db.insert(couponUsage).values({\n userId,\n couponId,\n orderId,\n orderItemId: null,\n usedAt: new Date(),\n })\n}\n\nexport async function getOrdersWithRelations(\n userId: number,\n offset: number,\n pageSize: number\n): Promise {\n const ordersWithRelations = await db.query.orders.findMany({\n where: eq(orders.userId, userId),\n with: {\n orderItems: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n slot: {\n columns: {\n deliveryTime: true,\n },\n },\n paymentInfo: {\n columns: {\n id: true,\n status: true,\n },\n },\n orderStatus: {\n columns: {\n id: true,\n isCancelled: true,\n isDelivered: true,\n paymentStatus: true,\n cancelReason: true,\n },\n },\n refunds: {\n columns: {\n refundStatus: true,\n refundAmount: true,\n },\n },\n },\n orderBy: [desc(orders.createdAt)],\n limit: pageSize,\n offset: offset,\n })\n\n return ordersWithRelations.map((order) => {\n const createdAt = coerceDate(order.createdAt) ?? new Date(0)\n const slot = order.slot\n ? {\n ...order.slot,\n deliveryTime: coerceDate(order.slot.deliveryTime) ?? new Date(0),\n }\n : null\n\n return {\n ...order,\n createdAt,\n slot,\n }\n }) as OrderWithRelations[]\n}\n\nexport async function getOrderCount(userId: number): Promise {\n const result = await db\n .select({ count: sql`count(*)` })\n .from(orders)\n .where(eq(orders.userId, userId))\n\n return Number(result[0]?.count ?? 0)\n}\n\nexport async function getOrderByIdWithRelations(\n orderId: number,\n userId: number\n): Promise {\n const order = await db.query.orders.findFirst({\n where: and(eq(orders.id, orderId), eq(orders.userId, userId)),\n with: {\n orderItems: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n slot: {\n columns: {\n deliveryTime: true,\n },\n },\n paymentInfo: {\n columns: {\n id: true,\n status: true,\n },\n },\n orderStatus: {\n columns: {\n id: true,\n isCancelled: true,\n isDelivered: true,\n paymentStatus: true,\n cancelReason: true,\n },\n with: {\n refundCoupon: {\n columns: {\n id: true,\n couponCode: true,\n },\n },\n },\n },\n refunds: {\n columns: {\n refundStatus: true,\n refundAmount: true,\n },\n },\n },\n })\n\n if (!order) {\n return null\n }\n\n const createdAt = coerceDate(order.createdAt) ?? new Date(0)\n const slot = order.slot\n ? {\n ...order.slot,\n deliveryTime: coerceDate(order.slot.deliveryTime) ?? new Date(0),\n }\n : null\n\n return {\n ...order,\n createdAt,\n slot,\n } as OrderDetailWithRelations\n}\n\nexport async function getCouponUsageForOrder(\n orderId: number\n): Promise {\n return db.query.couponUsage.findMany({\n where: eq(couponUsage.orderId, orderId),\n with: {\n coupon: {\n columns: {\n id: true,\n couponCode: true,\n discountPercent: true,\n flatDiscount: true,\n maxValue: true,\n },\n },\n },\n }) as Promise\n}\n\nexport async function getOrderBasic(orderId: number) {\n return db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n orderStatus: {\n columns: {\n id: true,\n isCancelled: true,\n isDelivered: true,\n },\n },\n },\n })\n}\n\nexport async function cancelOrderTransaction(\n orderId: number,\n statusId: number,\n reason: string,\n isCod: boolean\n): Promise {\n await db.transaction(async (tx) => {\n await tx\n .update(orderStatus)\n .set({\n isCancelled: true,\n cancelReason: reason,\n cancellationUserNotes: reason,\n cancellationReviewed: false,\n })\n .where(eq(orderStatus.id, statusId))\n\n const refundStatus = isCod ? 'na' : 'pending'\n\n await tx.insert(refunds).values({\n orderId,\n refundStatus,\n })\n })\n}\n\nexport async function updateOrderNotes(\n orderId: number,\n userNotes: string\n): Promise {\n await db\n .update(orders)\n .set({\n userNotes: userNotes || null,\n })\n .where(eq(orders.id, orderId))\n}\n\nexport async function getRecentlyDeliveredOrderIds(\n userId: number,\n limit: number,\n since: Date\n): Promise {\n const recentOrders = await db\n .select({ id: orders.id })\n .from(orders)\n .innerJoin(orderStatus, eq(orders.id, orderStatus.orderId))\n .where(\n and(\n eq(orders.userId, userId),\n eq(orderStatus.isDelivered, true),\n gte(orders.createdAt, since)\n )\n )\n .orderBy(desc(orders.createdAt))\n .limit(limit)\n\n return recentOrders.map((order) => order.id)\n}\n\nexport async function getProductIdsFromOrders(\n orderIds: number[]\n): Promise {\n const orderItemsResult = await db\n .select({ productId: orderItems.productId })\n .from(orderItems)\n .where(inArray(orderItems.orderId, orderIds))\n\n return [...new Set(orderItemsResult.map((item) => item.productId))]\n}\n\nexport interface RecentProductData {\n id: number\n name: string\n shortDescription: string | null\n price: string\n images: unknown\n isOutOfStock: boolean\n unitShortNotation: string\n incrementStep: number\n}\n\nexport async function getProductsForRecentOrders(\n productIds: number[],\n limit: number\n): Promise {\n const results = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(\n and(\n inArray(productInfo.id, productIds),\n eq(productInfo.isSuspended, false)\n )\n )\n .orderBy(desc(productInfo.createdAt))\n .limit(limit)\n\n return results.map((product) => ({\n ...product,\n price: String(product.price ?? '0'),\n }))\n}\n\n// ============================================================================\n// Post-Order Handler Helpers (for Telegram notifications)\n// ============================================================================\n\nexport interface OrderWithFullData {\n id: number\n totalAmount: string\n isFlashDelivery: boolean\n address: {\n name: string | null\n addressLine1: string | null\n addressLine2: string | null\n city: string | null\n state: string | null\n pincode: string | null\n phone: string | null\n } | null\n orderItems: Array<{\n quantity: string\n product: {\n name: string\n } | null\n }>\n slot: {\n deliveryTime: Date\n } | null\n}\n\nexport async function getOrdersByIdsWithFullData(\n orderIds: number[]\n): Promise {\n return db.query.orders.findMany({\n where: inArray(orders.id, orderIds),\n with: {\n address: {\n columns: {\n name: true,\n addressLine1: true,\n addressLine2: true,\n city: true,\n state: true,\n pincode: true,\n phone: true,\n },\n },\n orderItems: {\n with: {\n product: {\n columns: {\n name: true,\n },\n },\n },\n },\n slot: {\n columns: {\n deliveryTime: true,\n },\n },\n },\n }) as Promise\n}\n\nexport interface OrderWithCancellationData extends OrderWithFullData {\n refunds: Array<{\n refundStatus: string\n }>\n}\n\nexport async function getOrderByIdWithFullData(\n orderId: number\n): Promise {\n return db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n address: {\n columns: {\n name: true,\n addressLine1: true,\n addressLine2: true,\n city: true,\n state: true,\n pincode: true,\n phone: true,\n },\n },\n orderItems: {\n with: {\n product: {\n columns: {\n name: true,\n },\n },\n },\n },\n slot: {\n columns: {\n deliveryTime: true,\n },\n },\n refunds: {\n columns: {\n refundStatus: true,\n },\n },\n },\n }) as Promise\n}\n", "// Store Helpers - Database operations for cache initialization\n// These are used by stores in apps/backend/src/stores/\n\nimport { db } from '../db/db_index'\nimport {\n homeBanners,\n productInfo,\n units,\n productSlots,\n deliverySlotInfo,\n specialDeals,\n storeInfo,\n productTags,\n productTagInfo,\n userIncidents,\n} from '../db/schema'\nimport { eq, and, gt, sql, isNotNull, asc } from 'drizzle-orm'\n\n// ============================================================================\n// BANNER STORE HELPERS\n// ============================================================================\n\nexport interface BannerData {\n id: number\n name: string\n imageUrl: string | null\n serialNum: number | null\n productIds: number[] | null\n createdAt: Date\n}\n\nexport async function getAllBannersForCache(): Promise {\n return db.query.homeBanners.findMany({\n where: isNotNull(homeBanners.serialNum),\n orderBy: asc(homeBanners.serialNum),\n })\n}\n\n// ============================================================================\n// PRODUCT STORE HELPERS\n// ============================================================================\n\nexport interface ProductBasicData {\n id: number\n name: string\n shortDescription: string | null\n longDescription: string | null\n price: string\n marketPrice: string | null\n images: unknown\n isOutOfStock: boolean\n storeId: number | null\n unitShortNotation: string\n incrementStep: number\n productQuantity: number\n isFlashAvailable: boolean\n flashPrice: string | null\n}\n\nexport interface StoreBasicData {\n id: number\n name: string\n description: string | null\n}\n\nexport interface DeliverySlotData {\n productId: number\n id: number\n deliveryTime: Date\n freezeTime: Date\n isCapacityFull: boolean\n}\n\nexport interface SpecialDealData {\n productId: number\n quantity: string\n price: string\n validTill: Date\n}\n\nexport interface ProductTagData {\n productId: number\n tagName: string\n}\n\nexport async function getAllProductsForCache(): Promise {\n const results = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n longDescription: productInfo.longDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n storeId: productInfo.storeId,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n productQuantity: productInfo.productQuantity,\n isFlashAvailable: productInfo.isFlashAvailable,\n flashPrice: productInfo.flashPrice,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n\n return results.map((product) => ({\n ...product,\n price: String(product.price ?? '0'),\n marketPrice: product.marketPrice ? String(product.marketPrice) : null,\n flashPrice: product.flashPrice ? String(product.flashPrice) : null,\n }))\n}\n\nexport async function getAllStoresForCache(): Promise {\n return db.query.storeInfo.findMany({\n columns: { id: true, name: true, description: true },\n })\n}\n\nexport async function getAllDeliverySlotsForCache(): Promise {\n return db\n .select({\n productId: productSlots.productId,\n id: deliverySlotInfo.id,\n deliveryTime: deliverySlotInfo.deliveryTime,\n freezeTime: deliverySlotInfo.freezeTime,\n isCapacityFull: deliverySlotInfo.isCapacityFull,\n })\n .from(productSlots)\n .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n .where(\n and(\n eq(deliverySlotInfo.isActive, true),\n eq(deliverySlotInfo.isCapacityFull, false),\n gt(deliverySlotInfo.deliveryTime, sql`CURRENT_TIMESTAMP`)\n )\n )\n}\n\nexport async function getAllSpecialDealsForCache(): Promise {\n const results = await db\n .select({\n productId: specialDeals.productId,\n quantity: specialDeals.quantity,\n price: specialDeals.price,\n validTill: specialDeals.validTill,\n })\n .from(specialDeals)\n .where(gt(specialDeals.validTill, sql`CURRENT_TIMESTAMP`))\n\n return results.map((deal) => ({\n ...deal,\n quantity: String(deal.quantity ?? '0'),\n price: String(deal.price ?? '0'),\n }))\n}\n\nexport async function getAllProductTagsForCache(): Promise {\n return db\n .select({\n productId: productTags.productId,\n tagName: productTagInfo.tagName,\n })\n .from(productTags)\n .innerJoin(productTagInfo, eq(productTags.tagId, productTagInfo.id))\n}\n\n// ============================================================================\n// PRODUCT TAG STORE HELPERS\n// ============================================================================\n\nexport interface TagBasicData {\n id: number\n tagName: string\n tagDescription: string | null\n imageUrl: string | null\n isDashboardTag: boolean\n relatedStores: unknown\n}\n\nexport interface TagProductMapping {\n tagId: number\n productId: number\n}\n\nexport async function getAllTagsForCache(): Promise {\n return db\n .select({\n id: productTagInfo.id,\n tagName: productTagInfo.tagName,\n tagDescription: productTagInfo.tagDescription,\n imageUrl: productTagInfo.imageUrl,\n isDashboardTag: productTagInfo.isDashboardTag,\n relatedStores: productTagInfo.relatedStores,\n })\n .from(productTagInfo)\n}\n\nexport async function getAllTagProductMappings(): Promise {\n return db\n .select({\n tagId: productTags.tagId,\n productId: productTags.productId,\n })\n .from(productTags)\n}\n\n// ============================================================================\n// SLOT STORE HELPERS\n// ============================================================================\n\nexport interface SlotWithProductsData {\n id: number\n deliveryTime: Date\n freezeTime: Date\n isActive: boolean\n isCapacityFull: boolean\n productSlots: Array<{\n product: {\n id: number\n name: string\n productQuantity: number\n shortDescription: string | null\n price: string\n marketPrice: string | null\n unit: { shortNotation: string } | null\n store: { id: number; name: string; description: string | null } | null\n images: unknown\n isOutOfStock: boolean\n storeId: number | null\n }\n }>\n}\n\nexport async function getAllSlotsWithProductsForCache(): Promise {\n const now = new Date()\n \n return db.query.deliverySlotInfo.findMany({\n where: and(\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, now)\n ),\n with: {\n productSlots: {\n with: {\n product: {\n with: {\n unit: true,\n store: true,\n },\n },\n },\n },\n },\n orderBy: asc(deliverySlotInfo.deliveryTime),\n }) as Promise\n}\n\n// ============================================================================\n// USER NEGATIVITY STORE HELPERS\n// ============================================================================\n\nexport interface UserNegativityData {\n userId: number\n totalNegativityScore: number\n}\n\nexport async function getAllUserNegativityScores(): Promise {\n const results = await db\n .select({\n userId: userIncidents.userId,\n totalNegativityScore: sql`sum(${userIncidents.negativityScore})`,\n })\n .from(userIncidents)\n .groupBy(userIncidents.userId)\n\n return results.map((result) => ({\n userId: result.userId,\n totalNegativityScore: Number(result.totalNegativityScore ?? 0),\n }))\n}\n\nexport async function getUserNegativityScore(userId: number): Promise {\n const [result] = await db\n .select({\n totalNegativityScore: sql`sum(${userIncidents.negativityScore})`,\n })\n .from(userIncidents)\n .where(eq(userIncidents.userId, userId))\n .limit(1)\n\n return Number(result?.totalNegativityScore ?? 0)\n}\n", "import { db } from '../db/db_index'\nimport { productInfo, keyValStore } from '../db/schema'\nimport { inArray, eq } from 'drizzle-orm'\n\n/**\n * Toggle flash delivery availability for specific products\n * @param isAvailable - Whether flash delivery should be available\n * @param productIds - Array of product IDs to update\n */\nexport async function toggleFlashDeliveryForItems(\n isAvailable: boolean,\n productIds: number[]\n): Promise {\n await db\n .update(productInfo)\n .set({ isFlashAvailable: isAvailable })\n .where(inArray(productInfo.id, productIds))\n}\n\n/**\n * Update key-value store\n * @param key - The key to update\n * @param value - The boolean value to set\n */\nexport async function toggleKeyVal(\n key: string,\n value: boolean\n): Promise {\n await db\n .update(keyValStore)\n .set({ value })\n .where(eq(keyValStore.key, key))\n}\n\n/**\n * Get all key-value store constants\n * @returns Array of all key-value pairs\n */\nexport async function getAllKeyValStore(): Promise> {\n return db.select().from(keyValStore)\n}\n", "import { db } from '../db/db_index'\nimport { keyValStore, productInfo } from '../db/schema'\n\n/**\n * Health check - test database connectivity\n * Tries to select from keyValStore first, falls back to productInfo\n */\nexport async function healthCheck(): Promise<{ status: string }> {\n try {\n // Try keyValStore first (smaller table)\n await db.select({ key: keyValStore.key }).from(keyValStore).limit(1)\n return { status: 'ok' }\n } catch {\n // Fallback to productInfo\n await db.select({ name: productInfo.name }).from(productInfo).limit(1)\n return { status: 'ok' }\n }\n}\n", "import { db } from '../db/db_index'\nimport { orders, orderItems, orderStatus, payments, refunds, couponUsage, complaints } from '../db/schema'\nimport { inArray } from 'drizzle-orm'\n\n/**\n * Delete orders and all their related records\n * @param orderIds Array of order IDs to delete\n * @returns Promise\n * @throws Error if deletion fails\n */\nexport async function deleteOrdersWithRelations(orderIds: number[]): Promise {\n if (orderIds.length === 0) {\n return\n }\n\n // Delete child records first (in correct order to avoid FK constraint errors)\n\n // 1. Delete coupon usage records\n await db.delete(couponUsage).where(inArray(couponUsage.orderId, orderIds))\n\n // 2. Delete complaints related to these orders\n await db.delete(complaints).where(inArray(complaints.orderId, orderIds))\n\n // 3. Delete refunds\n await db.delete(refunds).where(inArray(refunds.orderId, orderIds))\n\n // 4. Delete payments\n await db.delete(payments).where(inArray(payments.orderId, orderIds))\n\n // 5. Delete order status records\n await db.delete(orderStatus).where(inArray(orderStatus.orderId, orderIds))\n\n // 6. Delete order items\n await db.delete(orderItems).where(inArray(orderItems.orderId, orderIds))\n\n // 7. Finally delete the orders themselves\n await db.delete(orders).where(inArray(orders.id, orderIds))\n}\n", "import { and, eq } from 'drizzle-orm'\nimport { db } from '../db/db_index'\nimport { uploadUrlStatus } from '../db/schema'\n\nexport async function createUploadUrlStatus(key: string): Promise {\n await db.insert(uploadUrlStatus).values({\n key,\n status: 'pending',\n })\n}\n\nexport async function claimUploadUrlStatus(key: string): Promise {\n const result = await db\n .update(uploadUrlStatus)\n .set({ status: 'claimed' })\n .where(and(eq(uploadUrlStatus.key, key), eq(uploadUrlStatus.status, 'pending')))\n .returning()\n\n return result.length > 0\n}\n", "import { db } from '../db/db_index'\nimport { eq, and } from 'drizzle-orm'\n\n// ============================================================================\n// Unit Seed Helper\n// ============================================================================\n\nexport interface UnitSeedData {\n shortNotation: string\n fullName: string\n}\n\nexport async function seedUnits(unitsToSeed: UnitSeedData[]): Promise {\n for (const unit of unitsToSeed) {\n const { units: unitsTable } = await import('../db/schema')\n const existingUnit = await db.query.units.findFirst({\n where: eq(unitsTable.shortNotation, unit.shortNotation),\n })\n if (!existingUnit) {\n await db.insert(unitsTable).values(unit)\n }\n }\n}\n\n// ============================================================================\n// Staff Role Seed Helper\n// ============================================================================\n\n// Type for staff role names based on the enum values in schema\nexport type StaffRoleName = 'super_admin' | 'admin' | 'marketer' | 'delivery_staff'\n\nexport async function seedStaffRoles(rolesToSeed: StaffRoleName[]): Promise {\n for (const roleName of rolesToSeed) {\n const { staffRoles } = await import('../db/schema')\n const existingRole = await db.query.staffRoles.findFirst({\n where: eq(staffRoles.roleName, roleName),\n })\n if (!existingRole) {\n await db.insert(staffRoles).values({ roleName })\n }\n }\n}\n\n// ============================================================================\n// Staff Permission Seed Helper\n// ============================================================================\n\n// Type for staff permission names based on the enum values in schema\nexport type StaffPermissionName = 'crud_product' | 'make_coupon' | 'crud_staff_users'\n\nexport async function seedStaffPermissions(permissionsToSeed: StaffPermissionName[]): Promise {\n for (const permissionName of permissionsToSeed) {\n const { staffPermissions } = await import('../db/schema')\n const existingPermission = await db.query.staffPermissions.findFirst({\n where: eq(staffPermissions.permissionName, permissionName),\n })\n if (!existingPermission) {\n await db.insert(staffPermissions).values({ permissionName })\n }\n }\n}\n\n// ============================================================================\n// Role-Permission Assignment Helper\n// ============================================================================\n\nexport interface RolePermissionAssignment {\n roleName: StaffRoleName\n permissionName: StaffPermissionName\n}\n\nexport async function seedRolePermissions(assignments: RolePermissionAssignment[]): Promise {\n await db.transaction(async (tx) => {\n const { staffRoles, staffPermissions, staffRolePermissions } = await import('../db/schema')\n\n for (const assignment of assignments) {\n // Get role ID\n const role = await tx.query.staffRoles.findFirst({\n where: eq(staffRoles.roleName, assignment.roleName),\n })\n\n // Get permission ID\n const permission = await tx.query.staffPermissions.findFirst({\n where: eq(staffPermissions.permissionName, assignment.permissionName),\n })\n\n if (role && permission) {\n const existing = await tx.query.staffRolePermissions.findFirst({\n where: and(\n eq(staffRolePermissions.staffRoleId, role.id),\n eq(staffRolePermissions.staffPermissionId, permission.id)\n ),\n })\n if (!existing) {\n await tx.insert(staffRolePermissions).values({\n staffRoleId: role.id,\n staffPermissionId: permission.id,\n })\n }\n }\n }\n })\n}\n\n// ============================================================================\n// Key-Value Store Seed Helper\n// ============================================================================\n\nexport interface KeyValSeedData {\n key: string\n value: any\n}\n\nexport async function seedKeyValStore(constantsToSeed: KeyValSeedData[]): Promise {\n for (const constant of constantsToSeed) {\n const { keyValStore } = await import('../db/schema')\n const existing = await db.query.keyValStore.findFirst({\n where: eq(keyValStore.key, constant.key),\n })\n if (!existing) {\n await db.insert(keyValStore).values({\n key: constant.key,\n value: constant.value,\n })\n }\n }\n}\n", "// Database Helper - SQLite (Cloudflare D1)\n// Main entry point for the package\n\n// Re-export database connection\nexport { db, initDb } from './src/db/db_index'\n// Re-export schema\nexport * from './src/db/schema'\n\n// Export enum types for type safety\nexport { staffRoleEnum, staffPermissionEnum } from './src/db/schema'\n\n// Admin API helpers - explicitly namespaced exports to avoid duplicates\nexport {\n // Banner\n getBanners,\n getBannerById,\n createBanner,\n updateBanner,\n deleteBanner,\n} from './src/admin-apis/banner'\n\nexport {\n // Complaint\n getComplaints,\n resolveComplaint,\n} from './src/admin-apis/complaint'\n\nexport {\n // Constants\n getAllConstants,\n upsertConstants,\n} from './src/admin-apis/const'\n\nexport {\n // Coupon\n getAllCoupons,\n getCouponById,\n invalidateCoupon,\n validateCoupon,\n getReservedCoupons,\n getUsersForCoupon,\n createCouponWithRelations,\n updateCouponWithRelations,\n generateCancellationCoupon,\n createReservedCouponWithProducts,\n createCouponForUser,\n checkUsersExist,\n checkCouponExists,\n checkReservedCouponExists,\n getOrderWithUser,\n} from './src/admin-apis/coupon'\n\nexport {\n // Order\n updateOrderNotes,\n getOrderDetails,\n updateOrderPackaged,\n updateOrderDelivered,\n updateOrderItemPackaging,\n removeDeliveryCharge,\n getSlotOrders,\n updateAddressCoords,\n getAllOrders,\n rebalanceSlots,\n cancelOrder,\n deleteOrderById,\n} from './src/admin-apis/order'\n\nexport {\n // Product\n getAllProducts,\n getProductById,\n deleteProduct,\n createProduct,\n updateProduct,\n checkProductExistsByName,\n checkUnitExists,\n getProductImagesById,\n createSpecialDealsForProduct,\n updateProductDeals,\n replaceProductTags,\n toggleProductOutOfStock,\n updateSlotProducts,\n getSlotProductIds,\n getSlotsProductIds,\n getAllUnits,\n getAllProductTags,\n getAllProductTagInfos,\n getProductTagInfoById,\n createProductTag,\n getProductTagById,\n updateProductTag,\n deleteProductTag,\n checkProductTagExistsByName,\n getProductReviews,\n respondToReview,\n getAllProductGroups,\n createProductGroup,\n updateProductGroup,\n deleteProductGroup,\n addProductToGroup,\n removeProductFromGroup,\n updateProductPrices,\n} from './src/admin-apis/product'\n\nexport {\n // Slots\n getActiveSlotsWithProducts,\n getActiveSlots,\n getSlotsAfterDate,\n getSlotByIdWithRelations,\n createSlotWithRelations,\n updateSlotWithRelations,\n deleteSlotById,\n updateSlotCapacity,\n getSlotDeliverySequence,\n updateSlotDeliverySequence,\n} from './src/admin-apis/slots'\n\nexport {\n // Staff User\n getStaffUserByName,\n getStaffUserById,\n getAllStaff,\n getAllUsers,\n getUserWithDetails,\n updateUserSuspensionStatus,\n checkStaffUserExists,\n checkStaffRoleExists,\n createStaffUser,\n getAllRoles,\n} from './src/admin-apis/staff-user'\n\nexport {\n // Store\n getAllStores,\n getStoreById,\n createStore,\n updateStore,\n deleteStore,\n} from './src/admin-apis/store'\n\nexport {\n // User\n createUserByMobile,\n getUserByMobile,\n getUnresolvedComplaintsCount,\n getAllUsersWithFilters,\n getOrderCountsByUserIds,\n getLastOrdersByUserIds,\n getSuspensionStatusesByUserIds,\n getUserBasicInfo,\n getUserSuspensionStatus,\n getUserOrders,\n getOrderStatusesByOrderIds,\n getItemCountsByOrderIds,\n upsertUserSuspension,\n searchUsers,\n getAllNotifCreds,\n getAllUnloggedTokens,\n getNotifTokensByUserIds,\n getUserIncidentsWithRelations,\n createUserIncident,\n} from './src/admin-apis/user'\n\nexport {\n // Vendor Snippets\n checkVendorSnippetExists,\n getVendorSnippetById,\n getVendorSnippetByCode,\n getAllVendorSnippets,\n createVendorSnippet,\n updateVendorSnippet,\n deleteVendorSnippet,\n getProductsByIds,\n getVendorSlotById,\n getVendorOrdersBySlotId,\n getOrderItemsByOrderIds,\n getOrderStatusByOrderIds,\n updateVendorOrderItemPackaging,\n getVendorOrders,\n} from './src/admin-apis/vendor-snippets'\n\nexport {\n // User Address\n getDefaultAddress as getUserDefaultAddress,\n getUserAddresses,\n getUserAddressById,\n clearDefaultAddress as clearUserDefaultAddress,\n createUserAddress,\n updateUserAddress,\n deleteUserAddress,\n hasOngoingOrdersForAddress,\n} from './src/user-apis/address'\n\nexport {\n // User Banners\n getActiveBanners as getUserActiveBanners,\n} from './src/user-apis/banners'\n\nexport {\n // User Cart\n getCartItemsWithProducts as getUserCartItemsWithProducts,\n getProductById as getUserProductById,\n getCartItemByUserProduct as getUserCartItemByUserProduct,\n incrementCartItemQuantity as incrementUserCartItemQuantity,\n insertCartItem as insertUserCartItem,\n updateCartItemQuantity as updateUserCartItemQuantity,\n deleteCartItem as deleteUserCartItem,\n clearUserCart,\n} from './src/user-apis/cart'\n\nexport {\n // User Complaint\n getUserComplaints as getUserComplaints,\n createComplaint as createUserComplaint,\n} from './src/user-apis/complaint'\n\nexport {\n // User Stores\n getStoreSummaries as getUserStoreSummaries,\n getStoreDetail as getUserStoreDetail,\n} from './src/user-apis/stores'\n\nexport {\n // User Product\n getProductDetailById as getUserProductDetailById,\n getProductReviews as getUserProductReviews,\n getProductById as getUserProductByIdBasic,\n createProductReview as createUserProductReview,\n getAllProductsWithUnits,\n type ProductSummaryData,\n} from './src/user-apis/product'\n\nexport {\n // User Slots\n getActiveSlotsList as getUserActiveSlotsList,\n getProductAvailability as getUserProductAvailability,\n} from './src/user-apis/slots'\n\nexport {\n // User Payments\n getOrderById as getUserPaymentOrderById,\n getPaymentByOrderId as getUserPaymentByOrderId,\n getPaymentByMerchantOrderId as getUserPaymentByMerchantOrderId,\n updatePaymentSuccess as updateUserPaymentSuccess,\n updateOrderPaymentStatus as updateUserOrderPaymentStatus,\n markPaymentFailed as markUserPaymentFailed,\n} from './src/user-apis/payments'\n\nexport {\n // User Auth\n getUserByEmail as getUserAuthByEmail,\n getUserByMobile as getUserAuthByMobile,\n getUserById as getUserAuthById,\n getUserCreds as getUserAuthCreds,\n getUserDetails as getUserAuthDetails,\n isUserSuspended,\n createUserWithCreds as createUserAuthWithCreds,\n createUserWithMobile as createUserAuthWithMobile,\n upsertUserPassword as upsertUserAuthPassword,\n deleteUserAccount as deleteUserAuthAccount,\n // UV API helpers\n createUserWithProfile,\n getUserDetailsByUserId,\n updateUserProfile,\n} from './src/user-apis/auth'\n\nexport {\n // User Coupon\n getActiveCouponsWithRelations as getUserActiveCouponsWithRelations,\n getAllCouponsWithRelations as getUserAllCouponsWithRelations,\n getReservedCouponByCode as getUserReservedCouponByCode,\n redeemReservedCoupon as redeemUserReservedCoupon,\n} from './src/user-apis/coupon'\n\nexport {\n // User Profile\n getUserById as getUserProfileById,\n getUserDetailByUserId as getUserProfileDetailById,\n getUserWithCreds as getUserWithCreds,\n getNotifCred as getUserNotifCred,\n upsertNotifCred as upsertUserNotifCred,\n deleteUnloggedToken as deleteUserUnloggedToken,\n getUnloggedToken as getUserUnloggedToken,\n upsertUnloggedToken as upsertUserUnloggedToken,\n} from './src/user-apis/user'\n\nexport {\n // User Order\n validateAndGetCoupon as validateAndGetUserCoupon,\n applyDiscountToOrder as applyDiscountToUserOrder,\n getAddressByIdAndUser as getUserAddressByIdAndUser,\n getProductById as getOrderProductById,\n checkUserSuspended,\n getSlotCapacityStatus as getUserSlotCapacityStatus,\n placeOrderTransaction as placeUserOrderTransaction,\n deleteCartItemsForOrder as deleteUserCartItemsForOrder,\n recordCouponUsage as recordUserCouponUsage,\n getOrdersWithRelations as getUserOrdersWithRelations,\n getOrderCount as getUserOrderCount,\n getOrderByIdWithRelations as getUserOrderByIdWithRelations,\n getCouponUsageForOrder as getUserCouponUsageForOrder,\n getOrderBasic as getUserOrderBasic,\n cancelOrderTransaction as cancelUserOrderTransaction,\n updateOrderNotes as updateUserOrderNotes,\n getRecentlyDeliveredOrderIds as getUserRecentlyDeliveredOrderIds,\n getProductIdsFromOrders as getUserProductIdsFromOrders,\n getProductsForRecentOrders as getUserProductsForRecentOrders,\n // Post-order handler helpers\n getOrdersByIdsWithFullData,\n getOrderByIdWithFullData,\n type OrderWithFullData,\n type OrderWithCancellationData,\n} from './src/user-apis/order'\n\n// Store Helpers (for cache initialization)\nexport {\n // Banner Store\n getAllBannersForCache,\n type BannerData,\n // Product Store\n getAllProductsForCache,\n getAllStoresForCache,\n getAllDeliverySlotsForCache,\n getAllSpecialDealsForCache,\n getAllProductTagsForCache,\n type ProductBasicData,\n type StoreBasicData,\n type DeliverySlotData,\n type SpecialDealData,\n type ProductTagData,\n // Product Tag Store\n getAllTagsForCache,\n getAllTagProductMappings,\n type TagBasicData,\n type TagProductMapping,\n // Slot Store\n getAllSlotsWithProductsForCache,\n type SlotWithProductsData,\n // User Negativity Store\n getAllUserNegativityScores,\n getUserNegativityScore,\n type UserNegativityData,\n} from './src/stores/store-helpers'\n\n// Automated Jobs Helpers\nexport {\n toggleFlashDeliveryForItems,\n toggleKeyVal,\n getAllKeyValStore,\n} from './src/lib/automated-jobs'\n\n// Health Check\nexport {\n healthCheck,\n} from './src/lib/health-check'\n\n// Common API Helpers\nexport {\n getSuspendedProductIds,\n getNextDeliveryDateWithCapacity,\n} from './src/user-apis/product'\n\nexport {\n getStoresSummary,\n} from './src/user-apis/stores'\n\n// Delete Orders Helper\nexport {\n deleteOrdersWithRelations,\n} from './src/lib/delete-orders'\n\n// Upload URL Helpers\nexport {\n createUploadUrlStatus,\n claimUploadUrlStatus,\n} from './src/helper_methods/upload-url'\n\n// Seed Helpers\nexport {\n seedUnits,\n seedStaffRoles,\n seedStaffPermissions,\n seedRolePermissions,\n seedKeyValStore,\n type UnitSeedData,\n type RolePermissionAssignment,\n type KeyValSeedData,\n type StaffRoleName,\n type StaffPermissionName,\n} from './src/lib/seed'\n", "// SQLite Importer - Intermediate layer to avoid direct db_helper_sqlite imports in dbService\n// This file re-exports everything from sqliteService\n\n// Re-export database connection\nexport { db, initDb } from 'sqliteService'\n\n// Re-export all schema exports\nexport * from 'sqliteService'\n\n// Re-export all helper methods from sqliteService\nexport {\n // Admin - Banner\n getBanners,\n getBannerById,\n createBanner,\n updateBanner,\n deleteBanner,\n // Admin - Complaint\n getComplaints,\n resolveComplaint,\n // Admin - Constants\n getAllConstants,\n upsertConstants,\n // Admin - Coupon\n getAllCoupons,\n getCouponById,\n invalidateCoupon,\n validateCoupon,\n getReservedCoupons,\n getUsersForCoupon,\n createCouponWithRelations,\n updateCouponWithRelations,\n generateCancellationCoupon,\n createReservedCouponWithProducts,\n createCouponForUser,\n checkUsersExist,\n checkCouponExists,\n checkReservedCouponExists,\n getOrderWithUser,\n // Admin - Order\n updateOrderNotes,\n getOrderDetails,\n updateOrderPackaged,\n updateOrderDelivered,\n updateOrderItemPackaging,\n removeDeliveryCharge,\n getSlotOrders,\n updateAddressCoords,\n getAllOrders,\n rebalanceSlots,\n cancelOrder,\n deleteOrderById,\n // Admin - Product\n getAllProducts,\n getProductById,\n deleteProduct,\n createProduct,\n updateProduct,\n checkProductExistsByName,\n checkUnitExists,\n getProductImagesById,\n createSpecialDealsForProduct,\n updateProductDeals,\n replaceProductTags,\n toggleProductOutOfStock,\n updateSlotProducts,\n getSlotProductIds,\n getSlotsProductIds,\n getAllUnits,\n getAllProductTags,\n getAllProductTagInfos,\n getProductTagInfoById,\n createProductTag,\n getProductTagById,\n updateProductTag,\n deleteProductTag,\n checkProductTagExistsByName,\n getProductReviews,\n respondToReview,\n getAllProductGroups,\n createProductGroup,\n updateProductGroup,\n deleteProductGroup,\n addProductToGroup,\n removeProductFromGroup,\n updateProductPrices,\n // Admin - Slots\n getActiveSlotsWithProducts,\n getActiveSlots,\n getSlotsAfterDate,\n getSlotByIdWithRelations,\n createSlotWithRelations,\n updateSlotWithRelations,\n deleteSlotById,\n updateSlotCapacity,\n getSlotDeliverySequence,\n updateSlotDeliverySequence,\n // Admin - Staff User\n getStaffUserByName,\n getStaffUserById,\n getAllStaff,\n getAllUsers,\n getUserWithDetails,\n updateUserSuspensionStatus,\n checkStaffUserExists,\n checkStaffRoleExists,\n createStaffUser,\n getAllRoles,\n // Admin - Store\n getAllStores,\n getStoreById,\n createStore,\n updateStore,\n deleteStore,\n // Admin - User\n createUserByMobile,\n getUserByMobile,\n getUnresolvedComplaintsCount,\n getAllUsersWithFilters,\n getOrderCountsByUserIds,\n getLastOrdersByUserIds,\n getSuspensionStatusesByUserIds,\n getUserBasicInfo,\n getUserSuspensionStatus,\n getUserOrders,\n getOrderStatusesByOrderIds,\n getItemCountsByOrderIds,\n upsertUserSuspension,\n searchUsers,\n getAllNotifCreds,\n getAllUnloggedTokens,\n getNotifTokensByUserIds,\n getUserIncidentsWithRelations,\n createUserIncident,\n // Admin - Vendor Snippets\n checkVendorSnippetExists,\n getVendorSnippetById,\n getVendorSnippetByCode,\n getAllVendorSnippets,\n createVendorSnippet,\n updateVendorSnippet,\n deleteVendorSnippet,\n getProductsByIds,\n getVendorSlotById,\n getVendorOrdersBySlotId,\n getOrderItemsByOrderIds,\n getOrderStatusByOrderIds,\n updateVendorOrderItemPackaging,\n getVendorOrders,\n // User - Address\n getUserDefaultAddress,\n getUserAddresses,\n getUserAddressById,\n clearUserDefaultAddress,\n createUserAddress,\n updateUserAddress,\n deleteUserAddress,\n hasOngoingOrdersForAddress,\n // User - Banners\n getUserActiveBanners,\n // User - Cart\n getUserCartItemsWithProducts,\n getUserProductById,\n getUserCartItemByUserProduct,\n incrementUserCartItemQuantity,\n insertUserCartItem,\n updateUserCartItemQuantity,\n deleteUserCartItem,\n clearUserCart,\n // User - Complaint\n getUserComplaints,\n createUserComplaint,\n // User - Stores\n getUserStoreSummaries,\n getUserStoreDetail,\n // User - Product\n getUserProductDetailById,\n getUserProductReviews,\n getUserProductByIdBasic,\n createUserProductReview,\n getAllProductsWithUnits,\n type ProductSummaryData,\n // User - Slots\n getUserActiveSlotsList,\n getUserProductAvailability,\n // User - Payments\n getUserPaymentOrderById,\n getUserPaymentByOrderId,\n getUserPaymentByMerchantOrderId,\n updateUserPaymentSuccess,\n updateUserOrderPaymentStatus,\n markUserPaymentFailed,\n // User - Auth\n getUserAuthByEmail,\n getUserAuthByMobile,\n getUserAuthById,\n getUserAuthCreds,\n getUserAuthDetails,\n isUserSuspended,\n createUserAuthWithCreds,\n createUserAuthWithMobile,\n upsertUserAuthPassword,\n deleteUserAuthAccount,\n // UV API helpers\n createUserWithProfile,\n getUserDetailsByUserId,\n updateUserProfile,\n // User - Coupon\n getUserActiveCouponsWithRelations,\n getUserAllCouponsWithRelations,\n getUserReservedCouponByCode,\n redeemUserReservedCoupon,\n // User - Profile\n getUserProfileById,\n getUserProfileDetailById,\n getUserWithCreds,\n getUserNotifCred,\n upsertUserNotifCred,\n deleteUserUnloggedToken,\n getUserUnloggedToken,\n upsertUserUnloggedToken,\n // User - Order\n validateAndGetUserCoupon,\n applyDiscountToUserOrder,\n getUserAddressByIdAndUser,\n getOrderProductById,\n checkUserSuspended,\n getUserSlotCapacityStatus,\n placeUserOrderTransaction,\n deleteUserCartItemsForOrder,\n recordUserCouponUsage,\n getUserOrdersWithRelations,\n getUserOrderCount,\n getUserOrderByIdWithRelations,\n getUserCouponUsageForOrder,\n getUserOrderBasic,\n cancelUserOrderTransaction,\n updateUserOrderNotes,\n getUserRecentlyDeliveredOrderIds,\n getUserProductIdsFromOrders,\n getUserProductsForRecentOrders,\n // Store Helpers\n getAllBannersForCache,\n getAllProductsForCache,\n getAllStoresForCache,\n getAllDeliverySlotsForCache,\n getAllSpecialDealsForCache,\n getAllProductTagsForCache,\n getAllTagsForCache,\n getAllTagProductMappings,\n getAllSlotsWithProductsForCache,\n getAllUserNegativityScores,\n getUserNegativityScore,\n type BannerData,\n type ProductBasicData,\n type StoreBasicData,\n type DeliverySlotData,\n type SpecialDealData,\n type ProductTagData,\n type TagBasicData,\n type TagProductMapping,\n type SlotWithProductsData,\n type UserNegativityData,\n // Automated Jobs\n toggleFlashDeliveryForItems,\n toggleKeyVal,\n getAllKeyValStore,\n // Post-order handler helpers\n getOrdersByIdsWithFullData,\n getOrderByIdWithFullData,\n type OrderWithFullData,\n type OrderWithCancellationData,\n // Common API helpers\n getSuspendedProductIds,\n getNextDeliveryDateWithCapacity,\n getStoresSummary,\n healthCheck,\n // Delete orders helper\n deleteOrdersWithRelations,\n // Seed helpers\n seedUnits,\n seedStaffRoles,\n seedStaffPermissions,\n seedRolePermissions,\n seedKeyValStore,\n type UnitSeedData,\n type RolePermissionAssignment,\n type KeyValSeedData,\n type StaffRoleName,\n type StaffPermissionName,\n // Upload URL Helpers\n createUploadUrlStatus,\n claimUploadUrlStatus,\n} from 'sqliteService'\n", "// Database Service - Central export for all database-related imports\n// This file re-exports everything from postgresImporter to provide a clean abstraction layer\n\nimport type { AdminOrderDetails } from '@packages/shared'\n// import { getOrderDetails } from '@/src/postgresImporter'\nimport { getOrderDetails, initDb } from '@/src/sqliteImporter'\n\n// Re-export everything from postgresImporter\n// export * from '@/src/postgresImporter'\n\nexport * from '@/src/sqliteImporter'\n\nexport { initDb }\n\n// Re-export getOrderDetails with the correct signature\nexport async function getOrderDetailsWrapper(orderId: number): Promise {\n return getOrderDetails(orderId)\n}\n\n// Re-export all types from shared package\nexport type {\n // Admin types\n Banner,\n Complaint,\n ComplaintWithUser,\n Constant,\n ConstantUpdateResult,\n Coupon,\n CouponValidationResult,\n UserMiniInfo,\n Store,\n StaffUser,\n StaffRole,\n AdminOrderRow,\n AdminOrderDetails,\n AdminOrderUpdateResult,\n AdminOrderItemPackagingResult,\n AdminOrderMessageResult,\n AdminOrderBasicResult,\n AdminGetSlotOrdersResult,\n AdminGetAllOrdersResult,\n AdminGetAllOrdersResultWithUserId,\n AdminRebalanceSlotsResult,\n AdminCancelOrderResult,\n AdminUnit,\n AdminProduct,\n AdminProductWithRelations,\n AdminProductWithDetails,\n AdminProductTagInfo,\n AdminProductTagWithProducts,\n AdminProductListResponse,\n AdminProductResponse,\n AdminDeleteProductResult,\n AdminToggleOutOfStockResult,\n AdminUpdateSlotProductsResult,\n AdminSlotProductIdsResult,\n AdminSlotsProductIdsResult,\n AdminProductReview,\n AdminProductReviewWithSignedUrls,\n AdminProductReviewsResult,\n AdminProductReviewResponse,\n AdminProductGroup,\n AdminProductGroupsResult,\n AdminProductGroupResponse,\n AdminProductGroupInfo,\n AdminUpdateProductPricesResult,\n AdminDeliverySlot,\n AdminSlotProductSummary,\n AdminSlotWithProducts,\n AdminSlotWithProductsAndSnippets,\n AdminSlotWithProductsAndSnippetsBase,\n AdminSlotsResult,\n AdminSlotsListResult,\n AdminSlotResult,\n AdminSlotCreateResult,\n AdminSlotUpdateResult,\n AdminSlotDeleteResult,\n AdminDeliverySequence,\n AdminDeliverySequenceResult,\n AdminUpdateDeliverySequenceResult,\n AdminUpdateSlotCapacityResult,\n AdminVendorSnippet,\n AdminVendorSnippetWithAccess,\n AdminVendorSnippetWithSlot,\n AdminVendorSnippetProduct,\n AdminVendorSnippetWithProducts,\n AdminVendorSnippetCreateInput,\n AdminVendorSnippetUpdateInput,\n AdminVendorSnippetDeleteResult,\n AdminVendorSnippetOrderProduct,\n AdminVendorSnippetOrderSummary,\n AdminVendorSnippetOrdersResult,\n AdminVendorSnippetOrdersWithSlotResult,\n AdminVendorOrderSummary,\n AdminUpcomingSlotsResult,\n AdminVendorUpdatePackagingResult,\n UserAddress,\n UserAddressResponse,\n UserAddressesResponse,\n UserAddressDeleteResponse,\n UserBanner,\n UserBannersResponse,\n UserCartProduct,\n UserCartItem,\n UserCartResponse,\n UserComplaint,\n UserComplaintsResponse,\n UserRaiseComplaintResponse,\n UserStoreSummary,\n UserStoreSummaryData,\n UserStoresResponse,\n UserStoreSampleProduct,\n UserStoreSampleProductData,\n UserStoreDetail,\n UserStoreDetailData,\n UserStoreProduct,\n UserStoreProductData,\n UserTagSummary,\n UserProductDetail,\n UserProductDetailData,\n UserProductReview,\n UserProductReviewWithSignedUrls,\n UserProductReviewsResponse,\n UserCreateReviewResponse,\n UserSlotProduct,\n UserSlotWithProducts,\n UserSlotData,\n UserSlotAvailability,\n UserDeliverySlot,\n UserSlotsResponse,\n UserSlotsWithProductsResponse,\n UserSlotsListResponse,\n UserPaymentOrderResponse,\n UserPaymentVerifyResponse,\n UserPaymentFailResponse,\n UserAuthProfile,\n UserAuthResponse,\n UserAuthResult,\n UserOtpVerifyResponse,\n UserPasswordUpdateResponse,\n UserProfileResponse,\n UserDeleteAccountResponse,\n UserCouponUsage,\n UserCouponApplicableUser,\n UserCouponApplicableProduct,\n UserCoupon,\n UserCouponWithRelations,\n UserEligibleCouponsResponse,\n UserCouponDisplay,\n UserMyCouponsResponse,\n UserRedeemCouponResponse,\n UserSelfDataResponse,\n UserProfileCompleteResponse,\n UserSavePushTokenResponse,\n UserOrderItemSummary,\n UserOrderSummary,\n UserOrdersResponse,\n UserOrderDetail,\n UserCancelOrderResponse,\n UserUpdateNotesResponse,\n UserRecentProduct,\n UserRecentProductsResponse,\n // Store types\n StoreSummary,\n StoresSummaryResponse,\n} from '@packages/shared';\n\nexport type {\n // User types\n User,\n UserDetails,\n Address,\n Product,\n CartItem,\n Order,\n OrderItem,\n Payment,\n} from '@packages/shared';\n", "export const encoder = new TextEncoder();\nexport const decoder = new TextDecoder();\nconst MAX_INT32 = 2 ** 32;\nexport function concat(...buffers) {\n const size = buffers.reduce((acc, { length }) => acc + length, 0);\n const buf = new Uint8Array(size);\n let i = 0;\n for (const buffer of buffers) {\n buf.set(buffer, i);\n i += buffer.length;\n }\n return buf;\n}\nfunction writeUInt32BE(buf, value, offset) {\n if (value < 0 || value >= MAX_INT32) {\n throw new RangeError(`value must be >= 0 and <= ${MAX_INT32 - 1}. Received ${value}`);\n }\n buf.set([value >>> 24, value >>> 16, value >>> 8, value & 0xff], offset);\n}\nexport function uint64be(value) {\n const high = Math.floor(value / MAX_INT32);\n const low = value % MAX_INT32;\n const buf = new Uint8Array(8);\n writeUInt32BE(buf, high, 0);\n writeUInt32BE(buf, low, 4);\n return buf;\n}\nexport function uint32be(value) {\n const buf = new Uint8Array(4);\n writeUInt32BE(buf, value);\n return buf;\n}\nexport function encode(string) {\n const bytes = new Uint8Array(string.length);\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code > 127) {\n throw new TypeError('non-ASCII string encountered in encode()');\n }\n bytes[i] = code;\n }\n return bytes;\n}\n", "export function encodeBase64(input) {\n if (Uint8Array.prototype.toBase64) {\n return input.toBase64();\n }\n const CHUNK_SIZE = 0x8000;\n const arr = [];\n for (let i = 0; i < input.length; i += CHUNK_SIZE) {\n arr.push(String.fromCharCode.apply(null, input.subarray(i, i + CHUNK_SIZE)));\n }\n return btoa(arr.join(''));\n}\nexport function decodeBase64(encoded) {\n if (Uint8Array.fromBase64) {\n return Uint8Array.fromBase64(encoded);\n }\n const binary = atob(encoded);\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i);\n }\n return bytes;\n}\n", "import { encoder, decoder } from '../lib/buffer_utils.js';\nimport { encodeBase64, decodeBase64 } from '../lib/base64.js';\nexport function decode(input) {\n if (Uint8Array.fromBase64) {\n return Uint8Array.fromBase64(typeof input === 'string' ? input : decoder.decode(input), {\n alphabet: 'base64url',\n });\n }\n let encoded = input;\n if (encoded instanceof Uint8Array) {\n encoded = decoder.decode(encoded);\n }\n encoded = encoded.replace(/-/g, '+').replace(/_/g, '/');\n try {\n return decodeBase64(encoded);\n }\n catch {\n throw new TypeError('The input to be decoded is not correctly encoded.');\n }\n}\nexport function encode(input) {\n let unencoded = input;\n if (typeof unencoded === 'string') {\n unencoded = encoder.encode(unencoded);\n }\n if (Uint8Array.prototype.toBase64) {\n return unencoded.toBase64({ alphabet: 'base64url', omitPadding: true });\n }\n return encodeBase64(unencoded).replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n}\n", "const unusable = (name, prop = 'algorithm.name') => new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`);\nconst isAlgorithm = (algorithm, name) => algorithm.name === name;\nfunction getHashLength(hash) {\n return parseInt(hash.name.slice(4), 10);\n}\nfunction checkHashLength(algorithm, expected) {\n const actual = getHashLength(algorithm.hash);\n if (actual !== expected)\n throw unusable(`SHA-${expected}`, 'algorithm.hash');\n}\nfunction getNamedCurve(alg) {\n switch (alg) {\n case 'ES256':\n return 'P-256';\n case 'ES384':\n return 'P-384';\n case 'ES512':\n return 'P-521';\n default:\n throw new Error('unreachable');\n }\n}\nfunction checkUsage(key, usage) {\n if (usage && !key.usages.includes(usage)) {\n throw new TypeError(`CryptoKey does not support this operation, its usages must include ${usage}.`);\n }\n}\nexport function checkSigCryptoKey(key, alg, usage) {\n switch (alg) {\n case 'HS256':\n case 'HS384':\n case 'HS512': {\n if (!isAlgorithm(key.algorithm, 'HMAC'))\n throw unusable('HMAC');\n checkHashLength(key.algorithm, parseInt(alg.slice(2), 10));\n break;\n }\n case 'RS256':\n case 'RS384':\n case 'RS512': {\n if (!isAlgorithm(key.algorithm, 'RSASSA-PKCS1-v1_5'))\n throw unusable('RSASSA-PKCS1-v1_5');\n checkHashLength(key.algorithm, parseInt(alg.slice(2), 10));\n break;\n }\n case 'PS256':\n case 'PS384':\n case 'PS512': {\n if (!isAlgorithm(key.algorithm, 'RSA-PSS'))\n throw unusable('RSA-PSS');\n checkHashLength(key.algorithm, parseInt(alg.slice(2), 10));\n break;\n }\n case 'Ed25519':\n case 'EdDSA': {\n if (!isAlgorithm(key.algorithm, 'Ed25519'))\n throw unusable('Ed25519');\n break;\n }\n case 'ML-DSA-44':\n case 'ML-DSA-65':\n case 'ML-DSA-87': {\n if (!isAlgorithm(key.algorithm, alg))\n throw unusable(alg);\n break;\n }\n case 'ES256':\n case 'ES384':\n case 'ES512': {\n if (!isAlgorithm(key.algorithm, 'ECDSA'))\n throw unusable('ECDSA');\n const expected = getNamedCurve(alg);\n const actual = key.algorithm.namedCurve;\n if (actual !== expected)\n throw unusable(expected, 'algorithm.namedCurve');\n break;\n }\n default:\n throw new TypeError('CryptoKey does not support this operation');\n }\n checkUsage(key, usage);\n}\nexport function checkEncCryptoKey(key, alg, usage) {\n switch (alg) {\n case 'A128GCM':\n case 'A192GCM':\n case 'A256GCM': {\n if (!isAlgorithm(key.algorithm, 'AES-GCM'))\n throw unusable('AES-GCM');\n const expected = parseInt(alg.slice(1, 4), 10);\n const actual = key.algorithm.length;\n if (actual !== expected)\n throw unusable(expected, 'algorithm.length');\n break;\n }\n case 'A128KW':\n case 'A192KW':\n case 'A256KW': {\n if (!isAlgorithm(key.algorithm, 'AES-KW'))\n throw unusable('AES-KW');\n const expected = parseInt(alg.slice(1, 4), 10);\n const actual = key.algorithm.length;\n if (actual !== expected)\n throw unusable(expected, 'algorithm.length');\n break;\n }\n case 'ECDH': {\n switch (key.algorithm.name) {\n case 'ECDH':\n case 'X25519':\n break;\n default:\n throw unusable('ECDH or X25519');\n }\n break;\n }\n case 'PBES2-HS256+A128KW':\n case 'PBES2-HS384+A192KW':\n case 'PBES2-HS512+A256KW':\n if (!isAlgorithm(key.algorithm, 'PBKDF2'))\n throw unusable('PBKDF2');\n break;\n case 'RSA-OAEP':\n case 'RSA-OAEP-256':\n case 'RSA-OAEP-384':\n case 'RSA-OAEP-512': {\n if (!isAlgorithm(key.algorithm, 'RSA-OAEP'))\n throw unusable('RSA-OAEP');\n checkHashLength(key.algorithm, parseInt(alg.slice(9), 10) || 1);\n break;\n }\n default:\n throw new TypeError('CryptoKey does not support this operation');\n }\n checkUsage(key, usage);\n}\n", "function message(msg, actual, ...types) {\n types = types.filter(Boolean);\n if (types.length > 2) {\n const last = types.pop();\n msg += `one of type ${types.join(', ')}, or ${last}.`;\n }\n else if (types.length === 2) {\n msg += `one of type ${types[0]} or ${types[1]}.`;\n }\n else {\n msg += `of type ${types[0]}.`;\n }\n if (actual == null) {\n msg += ` Received ${actual}`;\n }\n else if (typeof actual === 'function' && actual.name) {\n msg += ` Received function ${actual.name}`;\n }\n else if (typeof actual === 'object' && actual != null) {\n if (actual.constructor?.name) {\n msg += ` Received an instance of ${actual.constructor.name}`;\n }\n }\n return msg;\n}\nexport const invalidKeyInput = (actual, ...types) => message('Key must be ', actual, ...types);\nexport const withAlg = (alg, actual, ...types) => message(`Key for the ${alg} algorithm must be `, actual, ...types);\n", "export class JOSEError extends Error {\n static code = 'ERR_JOSE_GENERIC';\n code = 'ERR_JOSE_GENERIC';\n constructor(message, options) {\n super(message, options);\n this.name = this.constructor.name;\n Error.captureStackTrace?.(this, this.constructor);\n }\n}\nexport class JWTClaimValidationFailed extends JOSEError {\n static code = 'ERR_JWT_CLAIM_VALIDATION_FAILED';\n code = 'ERR_JWT_CLAIM_VALIDATION_FAILED';\n claim;\n reason;\n payload;\n constructor(message, payload, claim = 'unspecified', reason = 'unspecified') {\n super(message, { cause: { claim, reason, payload } });\n this.claim = claim;\n this.reason = reason;\n this.payload = payload;\n }\n}\nexport class JWTExpired extends JOSEError {\n static code = 'ERR_JWT_EXPIRED';\n code = 'ERR_JWT_EXPIRED';\n claim;\n reason;\n payload;\n constructor(message, payload, claim = 'unspecified', reason = 'unspecified') {\n super(message, { cause: { claim, reason, payload } });\n this.claim = claim;\n this.reason = reason;\n this.payload = payload;\n }\n}\nexport class JOSEAlgNotAllowed extends JOSEError {\n static code = 'ERR_JOSE_ALG_NOT_ALLOWED';\n code = 'ERR_JOSE_ALG_NOT_ALLOWED';\n}\nexport class JOSENotSupported extends JOSEError {\n static code = 'ERR_JOSE_NOT_SUPPORTED';\n code = 'ERR_JOSE_NOT_SUPPORTED';\n}\nexport class JWEDecryptionFailed extends JOSEError {\n static code = 'ERR_JWE_DECRYPTION_FAILED';\n code = 'ERR_JWE_DECRYPTION_FAILED';\n constructor(message = 'decryption operation failed', options) {\n super(message, options);\n }\n}\nexport class JWEInvalid extends JOSEError {\n static code = 'ERR_JWE_INVALID';\n code = 'ERR_JWE_INVALID';\n}\nexport class JWSInvalid extends JOSEError {\n static code = 'ERR_JWS_INVALID';\n code = 'ERR_JWS_INVALID';\n}\nexport class JWTInvalid extends JOSEError {\n static code = 'ERR_JWT_INVALID';\n code = 'ERR_JWT_INVALID';\n}\nexport class JWKInvalid extends JOSEError {\n static code = 'ERR_JWK_INVALID';\n code = 'ERR_JWK_INVALID';\n}\nexport class JWKSInvalid extends JOSEError {\n static code = 'ERR_JWKS_INVALID';\n code = 'ERR_JWKS_INVALID';\n}\nexport class JWKSNoMatchingKey extends JOSEError {\n static code = 'ERR_JWKS_NO_MATCHING_KEY';\n code = 'ERR_JWKS_NO_MATCHING_KEY';\n constructor(message = 'no applicable key found in the JSON Web Key Set', options) {\n super(message, options);\n }\n}\nexport class JWKSMultipleMatchingKeys extends JOSEError {\n [Symbol.asyncIterator];\n static code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';\n code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';\n constructor(message = 'multiple matching keys found in the JSON Web Key Set', options) {\n super(message, options);\n }\n}\nexport class JWKSTimeout extends JOSEError {\n static code = 'ERR_JWKS_TIMEOUT';\n code = 'ERR_JWKS_TIMEOUT';\n constructor(message = 'request timed out', options) {\n super(message, options);\n }\n}\nexport class JWSSignatureVerificationFailed extends JOSEError {\n static code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED';\n code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED';\n constructor(message = 'signature verification failed', options) {\n super(message, options);\n }\n}\n", "export function assertCryptoKey(key) {\n if (!isCryptoKey(key)) {\n throw new Error('CryptoKey instance expected');\n }\n}\nexport const isCryptoKey = (key) => {\n if (key?.[Symbol.toStringTag] === 'CryptoKey')\n return true;\n try {\n return key instanceof CryptoKey;\n }\n catch {\n return false;\n }\n};\nexport const isKeyObject = (key) => key?.[Symbol.toStringTag] === 'KeyObject';\nexport const isKeyLike = (key) => isCryptoKey(key) || isKeyObject(key);\n", "import { decode } from '../util/base64url.js';\nexport const unprotected = Symbol();\nexport function assertNotSet(value, name) {\n if (value) {\n throw new TypeError(`${name} can only be called once`);\n }\n}\nexport function decodeBase64url(value, label, ErrorClass) {\n try {\n return decode(value);\n }\n catch {\n throw new ErrorClass(`Failed to base64url decode the ${label}`);\n }\n}\nexport async function digest(algorithm, data) {\n const subtleDigest = `SHA-${algorithm.slice(-3)}`;\n return new Uint8Array(await crypto.subtle.digest(subtleDigest, data));\n}\n", "const isObjectLike = (value) => typeof value === 'object' && value !== null;\nexport function isObject(input) {\n if (!isObjectLike(input) || Object.prototype.toString.call(input) !== '[object Object]') {\n return false;\n }\n if (Object.getPrototypeOf(input) === null) {\n return true;\n }\n let proto = input;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(input) === proto;\n}\nexport function isDisjoint(...headers) {\n const sources = headers.filter(Boolean);\n if (sources.length === 0 || sources.length === 1) {\n return true;\n }\n let acc;\n for (const header of sources) {\n const parameters = Object.keys(header);\n if (!acc || acc.size === 0) {\n acc = new Set(parameters);\n continue;\n }\n for (const parameter of parameters) {\n if (acc.has(parameter)) {\n return false;\n }\n acc.add(parameter);\n }\n }\n return true;\n}\nexport const isJWK = (key) => isObject(key) && typeof key.kty === 'string';\nexport const isPrivateJWK = (key) => key.kty !== 'oct' &&\n ((key.kty === 'AKP' && typeof key.priv === 'string') || typeof key.d === 'string');\nexport const isPublicJWK = (key) => key.kty !== 'oct' && key.d === undefined && key.priv === undefined;\nexport const isSecretJWK = (key) => key.kty === 'oct' && typeof key.k === 'string';\n", "import { JOSENotSupported } from '../util/errors.js';\nimport { checkSigCryptoKey } from './crypto_key.js';\nimport { invalidKeyInput } from './invalid_key_input.js';\nexport function checkKeyLength(alg, key) {\n if (alg.startsWith('RS') || alg.startsWith('PS')) {\n const { modulusLength } = key.algorithm;\n if (typeof modulusLength !== 'number' || modulusLength < 2048) {\n throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);\n }\n }\n}\nfunction subtleAlgorithm(alg, algorithm) {\n const hash = `SHA-${alg.slice(-3)}`;\n switch (alg) {\n case 'HS256':\n case 'HS384':\n case 'HS512':\n return { hash, name: 'HMAC' };\n case 'PS256':\n case 'PS384':\n case 'PS512':\n return { hash, name: 'RSA-PSS', saltLength: parseInt(alg.slice(-3), 10) >> 3 };\n case 'RS256':\n case 'RS384':\n case 'RS512':\n return { hash, name: 'RSASSA-PKCS1-v1_5' };\n case 'ES256':\n case 'ES384':\n case 'ES512':\n return { hash, name: 'ECDSA', namedCurve: algorithm.namedCurve };\n case 'Ed25519':\n case 'EdDSA':\n return { name: 'Ed25519' };\n case 'ML-DSA-44':\n case 'ML-DSA-65':\n case 'ML-DSA-87':\n return { name: alg };\n default:\n throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);\n }\n}\nasync function getSigKey(alg, key, usage) {\n if (key instanceof Uint8Array) {\n if (!alg.startsWith('HS')) {\n throw new TypeError(invalidKeyInput(key, 'CryptoKey', 'KeyObject', 'JSON Web Key'));\n }\n return crypto.subtle.importKey('raw', key, { hash: `SHA-${alg.slice(-3)}`, name: 'HMAC' }, false, [usage]);\n }\n checkSigCryptoKey(key, alg, usage);\n return key;\n}\nexport async function sign(alg, key, data) {\n const cryptoKey = await getSigKey(alg, key, 'sign');\n checkKeyLength(alg, cryptoKey);\n const signature = await crypto.subtle.sign(subtleAlgorithm(alg, cryptoKey.algorithm), cryptoKey, data);\n return new Uint8Array(signature);\n}\nexport async function verify(alg, key, signature, data) {\n const cryptoKey = await getSigKey(alg, key, 'verify');\n checkKeyLength(alg, cryptoKey);\n const algorithm = subtleAlgorithm(alg, cryptoKey.algorithm);\n try {\n return await crypto.subtle.verify(algorithm, cryptoKey, signature, data);\n }\n catch {\n return false;\n }\n}\n", "import { JOSENotSupported } from '../util/errors.js';\nconst unsupportedAlg = 'Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value';\nfunction subtleMapping(jwk) {\n let algorithm;\n let keyUsages;\n switch (jwk.kty) {\n case 'AKP': {\n switch (jwk.alg) {\n case 'ML-DSA-44':\n case 'ML-DSA-65':\n case 'ML-DSA-87':\n algorithm = { name: jwk.alg };\n keyUsages = jwk.priv ? ['sign'] : ['verify'];\n break;\n default:\n throw new JOSENotSupported(unsupportedAlg);\n }\n break;\n }\n case 'RSA': {\n switch (jwk.alg) {\n case 'PS256':\n case 'PS384':\n case 'PS512':\n algorithm = { name: 'RSA-PSS', hash: `SHA-${jwk.alg.slice(-3)}` };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'RS256':\n case 'RS384':\n case 'RS512':\n algorithm = { name: 'RSASSA-PKCS1-v1_5', hash: `SHA-${jwk.alg.slice(-3)}` };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'RSA-OAEP':\n case 'RSA-OAEP-256':\n case 'RSA-OAEP-384':\n case 'RSA-OAEP-512':\n algorithm = {\n name: 'RSA-OAEP',\n hash: `SHA-${parseInt(jwk.alg.slice(-3), 10) || 1}`,\n };\n keyUsages = jwk.d ? ['decrypt', 'unwrapKey'] : ['encrypt', 'wrapKey'];\n break;\n default:\n throw new JOSENotSupported(unsupportedAlg);\n }\n break;\n }\n case 'EC': {\n switch (jwk.alg) {\n case 'ES256':\n case 'ES384':\n case 'ES512':\n algorithm = {\n name: 'ECDSA',\n namedCurve: { ES256: 'P-256', ES384: 'P-384', ES512: 'P-521' }[jwk.alg],\n };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'ECDH-ES':\n case 'ECDH-ES+A128KW':\n case 'ECDH-ES+A192KW':\n case 'ECDH-ES+A256KW':\n algorithm = { name: 'ECDH', namedCurve: jwk.crv };\n keyUsages = jwk.d ? ['deriveBits'] : [];\n break;\n default:\n throw new JOSENotSupported(unsupportedAlg);\n }\n break;\n }\n case 'OKP': {\n switch (jwk.alg) {\n case 'Ed25519':\n case 'EdDSA':\n algorithm = { name: 'Ed25519' };\n keyUsages = jwk.d ? ['sign'] : ['verify'];\n break;\n case 'ECDH-ES':\n case 'ECDH-ES+A128KW':\n case 'ECDH-ES+A192KW':\n case 'ECDH-ES+A256KW':\n algorithm = { name: jwk.crv };\n keyUsages = jwk.d ? ['deriveBits'] : [];\n break;\n default:\n throw new JOSENotSupported(unsupportedAlg);\n }\n break;\n }\n default:\n throw new JOSENotSupported('Invalid or unsupported JWK \"kty\" (Key Type) Parameter value');\n }\n return { algorithm, keyUsages };\n}\nexport async function jwkToKey(jwk) {\n if (!jwk.alg) {\n throw new TypeError('\"alg\" argument is required when \"jwk.alg\" is not present');\n }\n const { algorithm, keyUsages } = subtleMapping(jwk);\n const keyData = { ...jwk };\n if (keyData.kty !== 'AKP') {\n delete keyData.alg;\n }\n delete keyData.use;\n return crypto.subtle.importKey('jwk', keyData, algorithm, jwk.ext ?? (jwk.d || jwk.priv ? false : true), jwk.key_ops ?? keyUsages);\n}\n", "import { isJWK } from './type_checks.js';\nimport { decode } from '../util/base64url.js';\nimport { jwkToKey } from './jwk_to_key.js';\nimport { isCryptoKey, isKeyObject } from './is_key_like.js';\nconst unusableForAlg = 'given KeyObject instance cannot be used for this algorithm';\nlet cache;\nconst handleJWK = async (key, jwk, alg, freeze = false) => {\n cache ||= new WeakMap();\n let cached = cache.get(key);\n if (cached?.[alg]) {\n return cached[alg];\n }\n const cryptoKey = await jwkToKey({ ...jwk, alg });\n if (freeze)\n Object.freeze(key);\n if (!cached) {\n cache.set(key, { [alg]: cryptoKey });\n }\n else {\n cached[alg] = cryptoKey;\n }\n return cryptoKey;\n};\nconst handleKeyObject = (keyObject, alg) => {\n cache ||= new WeakMap();\n let cached = cache.get(keyObject);\n if (cached?.[alg]) {\n return cached[alg];\n }\n const isPublic = keyObject.type === 'public';\n const extractable = isPublic ? true : false;\n let cryptoKey;\n if (keyObject.asymmetricKeyType === 'x25519') {\n switch (alg) {\n case 'ECDH-ES':\n case 'ECDH-ES+A128KW':\n case 'ECDH-ES+A192KW':\n case 'ECDH-ES+A256KW':\n break;\n default:\n throw new TypeError(unusableForAlg);\n }\n cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, isPublic ? [] : ['deriveBits']);\n }\n if (keyObject.asymmetricKeyType === 'ed25519') {\n if (alg !== 'EdDSA' && alg !== 'Ed25519') {\n throw new TypeError(unusableForAlg);\n }\n cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [\n isPublic ? 'verify' : 'sign',\n ]);\n }\n switch (keyObject.asymmetricKeyType) {\n case 'ml-dsa-44':\n case 'ml-dsa-65':\n case 'ml-dsa-87': {\n if (alg !== keyObject.asymmetricKeyType.toUpperCase()) {\n throw new TypeError(unusableForAlg);\n }\n cryptoKey = keyObject.toCryptoKey(keyObject.asymmetricKeyType, extractable, [\n isPublic ? 'verify' : 'sign',\n ]);\n }\n }\n if (keyObject.asymmetricKeyType === 'rsa') {\n let hash;\n switch (alg) {\n case 'RSA-OAEP':\n hash = 'SHA-1';\n break;\n case 'RS256':\n case 'PS256':\n case 'RSA-OAEP-256':\n hash = 'SHA-256';\n break;\n case 'RS384':\n case 'PS384':\n case 'RSA-OAEP-384':\n hash = 'SHA-384';\n break;\n case 'RS512':\n case 'PS512':\n case 'RSA-OAEP-512':\n hash = 'SHA-512';\n break;\n default:\n throw new TypeError(unusableForAlg);\n }\n if (alg.startsWith('RSA-OAEP')) {\n return keyObject.toCryptoKey({\n name: 'RSA-OAEP',\n hash,\n }, extractable, isPublic ? ['encrypt'] : ['decrypt']);\n }\n cryptoKey = keyObject.toCryptoKey({\n name: alg.startsWith('PS') ? 'RSA-PSS' : 'RSASSA-PKCS1-v1_5',\n hash,\n }, extractable, [isPublic ? 'verify' : 'sign']);\n }\n if (keyObject.asymmetricKeyType === 'ec') {\n const nist = new Map([\n ['prime256v1', 'P-256'],\n ['secp384r1', 'P-384'],\n ['secp521r1', 'P-521'],\n ]);\n const namedCurve = nist.get(keyObject.asymmetricKeyDetails?.namedCurve);\n if (!namedCurve) {\n throw new TypeError(unusableForAlg);\n }\n const expectedCurve = { ES256: 'P-256', ES384: 'P-384', ES512: 'P-521' };\n if (expectedCurve[alg] && namedCurve === expectedCurve[alg]) {\n cryptoKey = keyObject.toCryptoKey({\n name: 'ECDSA',\n namedCurve,\n }, extractable, [isPublic ? 'verify' : 'sign']);\n }\n if (alg.startsWith('ECDH-ES')) {\n cryptoKey = keyObject.toCryptoKey({\n name: 'ECDH',\n namedCurve,\n }, extractable, isPublic ? [] : ['deriveBits']);\n }\n }\n if (!cryptoKey) {\n throw new TypeError(unusableForAlg);\n }\n if (!cached) {\n cache.set(keyObject, { [alg]: cryptoKey });\n }\n else {\n cached[alg] = cryptoKey;\n }\n return cryptoKey;\n};\nexport async function normalizeKey(key, alg) {\n if (key instanceof Uint8Array) {\n return key;\n }\n if (isCryptoKey(key)) {\n return key;\n }\n if (isKeyObject(key)) {\n if (key.type === 'secret') {\n return key.export();\n }\n if ('toCryptoKey' in key && typeof key.toCryptoKey === 'function') {\n try {\n return handleKeyObject(key, alg);\n }\n catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n }\n }\n let jwk = key.export({ format: 'jwk' });\n return handleJWK(key, jwk, alg);\n }\n if (isJWK(key)) {\n if (key.k) {\n return decode(key.k);\n }\n return handleJWK(key, key, alg, true);\n }\n throw new Error('unreachable');\n}\n", "import { JOSENotSupported, JWEInvalid, JWSInvalid } from '../util/errors.js';\nexport function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) {\n if (joseHeader.crit !== undefined && protectedHeader?.crit === undefined) {\n throw new Err('\"crit\" (Critical) Header Parameter MUST be integrity protected');\n }\n if (!protectedHeader || protectedHeader.crit === undefined) {\n return new Set();\n }\n if (!Array.isArray(protectedHeader.crit) ||\n protectedHeader.crit.length === 0 ||\n protectedHeader.crit.some((input) => typeof input !== 'string' || input.length === 0)) {\n throw new Err('\"crit\" (Critical) Header Parameter MUST be an array of non-empty strings when present');\n }\n let recognized;\n if (recognizedOption !== undefined) {\n recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]);\n }\n else {\n recognized = recognizedDefault;\n }\n for (const parameter of protectedHeader.crit) {\n if (!recognized.has(parameter)) {\n throw new JOSENotSupported(`Extension Header Parameter \"${parameter}\" is not recognized`);\n }\n if (joseHeader[parameter] === undefined) {\n throw new Err(`Extension Header Parameter \"${parameter}\" is missing`);\n }\n if (recognized.get(parameter) && protectedHeader[parameter] === undefined) {\n throw new Err(`Extension Header Parameter \"${parameter}\" MUST be integrity protected`);\n }\n }\n return new Set(protectedHeader.crit);\n}\n", "export function validateAlgorithms(option, algorithms) {\n if (algorithms !== undefined &&\n (!Array.isArray(algorithms) || algorithms.some((s) => typeof s !== 'string'))) {\n throw new TypeError(`\"${option}\" option must be an array of strings`);\n }\n if (!algorithms) {\n return undefined;\n }\n return new Set(algorithms);\n}\n", "import { withAlg as invalidKeyInput } from './invalid_key_input.js';\nimport { isKeyLike } from './is_key_like.js';\nimport * as jwk from './type_checks.js';\nconst tag = (key) => key?.[Symbol.toStringTag];\nconst jwkMatchesOp = (alg, key, usage) => {\n if (key.use !== undefined) {\n let expected;\n switch (usage) {\n case 'sign':\n case 'verify':\n expected = 'sig';\n break;\n case 'encrypt':\n case 'decrypt':\n expected = 'enc';\n break;\n }\n if (key.use !== expected) {\n throw new TypeError(`Invalid key for this operation, its \"use\" must be \"${expected}\" when present`);\n }\n }\n if (key.alg !== undefined && key.alg !== alg) {\n throw new TypeError(`Invalid key for this operation, its \"alg\" must be \"${alg}\" when present`);\n }\n if (Array.isArray(key.key_ops)) {\n let expectedKeyOp;\n switch (true) {\n case usage === 'sign' || usage === 'verify':\n case alg === 'dir':\n case alg.includes('CBC-HS'):\n expectedKeyOp = usage;\n break;\n case alg.startsWith('PBES2'):\n expectedKeyOp = 'deriveBits';\n break;\n case /^A\\d{3}(?:GCM)?(?:KW)?$/.test(alg):\n if (!alg.includes('GCM') && alg.endsWith('KW')) {\n expectedKeyOp = usage === 'encrypt' ? 'wrapKey' : 'unwrapKey';\n }\n else {\n expectedKeyOp = usage;\n }\n break;\n case usage === 'encrypt' && alg.startsWith('RSA'):\n expectedKeyOp = 'wrapKey';\n break;\n case usage === 'decrypt':\n expectedKeyOp = alg.startsWith('RSA') ? 'unwrapKey' : 'deriveBits';\n break;\n }\n if (expectedKeyOp && key.key_ops?.includes?.(expectedKeyOp) === false) {\n throw new TypeError(`Invalid key for this operation, its \"key_ops\" must include \"${expectedKeyOp}\" when present`);\n }\n }\n return true;\n};\nconst symmetricTypeCheck = (alg, key, usage) => {\n if (key instanceof Uint8Array)\n return;\n if (jwk.isJWK(key)) {\n if (jwk.isSecretJWK(key) && jwkMatchesOp(alg, key, usage))\n return;\n throw new TypeError(`JSON Web Key for symmetric algorithms must have JWK \"kty\" (Key Type) equal to \"oct\" and the JWK \"k\" (Key Value) present`);\n }\n if (!isKeyLike(key)) {\n throw new TypeError(invalidKeyInput(alg, key, 'CryptoKey', 'KeyObject', 'JSON Web Key', 'Uint8Array'));\n }\n if (key.type !== 'secret') {\n throw new TypeError(`${tag(key)} instances for symmetric algorithms must be of type \"secret\"`);\n }\n};\nconst asymmetricTypeCheck = (alg, key, usage) => {\n if (jwk.isJWK(key)) {\n switch (usage) {\n case 'decrypt':\n case 'sign':\n if (jwk.isPrivateJWK(key) && jwkMatchesOp(alg, key, usage))\n return;\n throw new TypeError(`JSON Web Key for this operation must be a private JWK`);\n case 'encrypt':\n case 'verify':\n if (jwk.isPublicJWK(key) && jwkMatchesOp(alg, key, usage))\n return;\n throw new TypeError(`JSON Web Key for this operation must be a public JWK`);\n }\n }\n if (!isKeyLike(key)) {\n throw new TypeError(invalidKeyInput(alg, key, 'CryptoKey', 'KeyObject', 'JSON Web Key'));\n }\n if (key.type === 'secret') {\n throw new TypeError(`${tag(key)} instances for asymmetric algorithms must not be of type \"secret\"`);\n }\n if (key.type === 'public') {\n switch (usage) {\n case 'sign':\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm signing must be of type \"private\"`);\n case 'decrypt':\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm decryption must be of type \"private\"`);\n }\n }\n if (key.type === 'private') {\n switch (usage) {\n case 'verify':\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm verifying must be of type \"public\"`);\n case 'encrypt':\n throw new TypeError(`${tag(key)} instances for asymmetric algorithm encryption must be of type \"public\"`);\n }\n }\n};\nexport function checkKeyType(alg, key, usage) {\n switch (alg.substring(0, 2)) {\n case 'A1':\n case 'A2':\n case 'di':\n case 'HS':\n case 'PB':\n symmetricTypeCheck(alg, key, usage);\n break;\n default:\n asymmetricTypeCheck(alg, key, usage);\n }\n}\n", "import { decode as b64u } from '../../util/base64url.js';\nimport { verify } from '../../lib/signing.js';\nimport { JOSEAlgNotAllowed, JWSInvalid, JWSSignatureVerificationFailed } from '../../util/errors.js';\nimport { concat, encoder, decoder, encode } from '../../lib/buffer_utils.js';\nimport { decodeBase64url } from '../../lib/helpers.js';\nimport { isDisjoint } from '../../lib/type_checks.js';\nimport { isObject } from '../../lib/type_checks.js';\nimport { checkKeyType } from '../../lib/check_key_type.js';\nimport { validateCrit } from '../../lib/validate_crit.js';\nimport { validateAlgorithms } from '../../lib/validate_algorithms.js';\nimport { normalizeKey } from '../../lib/normalize_key.js';\nexport async function flattenedVerify(jws, key, options) {\n if (!isObject(jws)) {\n throw new JWSInvalid('Flattened JWS must be an object');\n }\n if (jws.protected === undefined && jws.header === undefined) {\n throw new JWSInvalid('Flattened JWS must have either of the \"protected\" or \"header\" members');\n }\n if (jws.protected !== undefined && typeof jws.protected !== 'string') {\n throw new JWSInvalid('JWS Protected Header incorrect type');\n }\n if (jws.payload === undefined) {\n throw new JWSInvalid('JWS Payload missing');\n }\n if (typeof jws.signature !== 'string') {\n throw new JWSInvalid('JWS Signature missing or incorrect type');\n }\n if (jws.header !== undefined && !isObject(jws.header)) {\n throw new JWSInvalid('JWS Unprotected Header incorrect type');\n }\n let parsedProt = {};\n if (jws.protected) {\n try {\n const protectedHeader = b64u(jws.protected);\n parsedProt = JSON.parse(decoder.decode(protectedHeader));\n }\n catch {\n throw new JWSInvalid('JWS Protected Header is invalid');\n }\n }\n if (!isDisjoint(parsedProt, jws.header)) {\n throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');\n }\n const joseHeader = {\n ...parsedProt,\n ...jws.header,\n };\n const extensions = validateCrit(JWSInvalid, new Map([['b64', true]]), options?.crit, parsedProt, joseHeader);\n let b64 = true;\n if (extensions.has('b64')) {\n b64 = parsedProt.b64;\n if (typeof b64 !== 'boolean') {\n throw new JWSInvalid('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean');\n }\n }\n const { alg } = joseHeader;\n if (typeof alg !== 'string' || !alg) {\n throw new JWSInvalid('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');\n }\n const algorithms = options && validateAlgorithms('algorithms', options.algorithms);\n if (algorithms && !algorithms.has(alg)) {\n throw new JOSEAlgNotAllowed('\"alg\" (Algorithm) Header Parameter value not allowed');\n }\n if (b64) {\n if (typeof jws.payload !== 'string') {\n throw new JWSInvalid('JWS Payload must be a string');\n }\n }\n else if (typeof jws.payload !== 'string' && !(jws.payload instanceof Uint8Array)) {\n throw new JWSInvalid('JWS Payload must be a string or an Uint8Array instance');\n }\n let resolvedKey = false;\n if (typeof key === 'function') {\n key = await key(parsedProt, jws);\n resolvedKey = true;\n }\n checkKeyType(alg, key, 'verify');\n const data = concat(jws.protected !== undefined ? encode(jws.protected) : new Uint8Array(), encode('.'), typeof jws.payload === 'string'\n ? b64\n ? encode(jws.payload)\n : encoder.encode(jws.payload)\n : jws.payload);\n const signature = decodeBase64url(jws.signature, 'signature', JWSInvalid);\n const k = await normalizeKey(key, alg);\n const verified = await verify(alg, k, signature, data);\n if (!verified) {\n throw new JWSSignatureVerificationFailed();\n }\n let payload;\n if (b64) {\n payload = decodeBase64url(jws.payload, 'payload', JWSInvalid);\n }\n else if (typeof jws.payload === 'string') {\n payload = encoder.encode(jws.payload);\n }\n else {\n payload = jws.payload;\n }\n const result = { payload };\n if (jws.protected !== undefined) {\n result.protectedHeader = parsedProt;\n }\n if (jws.header !== undefined) {\n result.unprotectedHeader = jws.header;\n }\n if (resolvedKey) {\n return { ...result, key: k };\n }\n return result;\n}\n", "import { flattenedVerify } from '../flattened/verify.js';\nimport { JWSInvalid } from '../../util/errors.js';\nimport { decoder } from '../../lib/buffer_utils.js';\nexport async function compactVerify(jws, key, options) {\n if (jws instanceof Uint8Array) {\n jws = decoder.decode(jws);\n }\n if (typeof jws !== 'string') {\n throw new JWSInvalid('Compact JWS must be a string or Uint8Array');\n }\n const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split('.');\n if (length !== 3) {\n throw new JWSInvalid('Invalid Compact JWS');\n }\n const verified = await flattenedVerify({ payload, protected: protectedHeader, signature }, key, options);\n const result = { payload: verified.payload, protectedHeader: verified.protectedHeader };\n if (typeof key === 'function') {\n return { ...result, key: verified.key };\n }\n return result;\n}\n", "import { JWTClaimValidationFailed, JWTExpired, JWTInvalid } from '../util/errors.js';\nimport { encoder, decoder } from './buffer_utils.js';\nimport { isObject } from './type_checks.js';\nconst epoch = (date) => Math.floor(date.getTime() / 1000);\nconst minute = 60;\nconst hour = minute * 60;\nconst day = hour * 24;\nconst week = day * 7;\nconst year = day * 365.25;\nconst REGEX = /^(\\+|\\-)? ?(\\d+|\\d+\\.\\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;\nexport function secs(str) {\n const matched = REGEX.exec(str);\n if (!matched || (matched[4] && matched[1])) {\n throw new TypeError('Invalid time period format');\n }\n const value = parseFloat(matched[2]);\n const unit = matched[3].toLowerCase();\n let numericDate;\n switch (unit) {\n case 'sec':\n case 'secs':\n case 'second':\n case 'seconds':\n case 's':\n numericDate = Math.round(value);\n break;\n case 'minute':\n case 'minutes':\n case 'min':\n case 'mins':\n case 'm':\n numericDate = Math.round(value * minute);\n break;\n case 'hour':\n case 'hours':\n case 'hr':\n case 'hrs':\n case 'h':\n numericDate = Math.round(value * hour);\n break;\n case 'day':\n case 'days':\n case 'd':\n numericDate = Math.round(value * day);\n break;\n case 'week':\n case 'weeks':\n case 'w':\n numericDate = Math.round(value * week);\n break;\n default:\n numericDate = Math.round(value * year);\n break;\n }\n if (matched[1] === '-' || matched[4] === 'ago') {\n return -numericDate;\n }\n return numericDate;\n}\nfunction validateInput(label, input) {\n if (!Number.isFinite(input)) {\n throw new TypeError(`Invalid ${label} input`);\n }\n return input;\n}\nconst normalizeTyp = (value) => {\n if (value.includes('/')) {\n return value.toLowerCase();\n }\n return `application/${value.toLowerCase()}`;\n};\nconst checkAudiencePresence = (audPayload, audOption) => {\n if (typeof audPayload === 'string') {\n return audOption.includes(audPayload);\n }\n if (Array.isArray(audPayload)) {\n return audOption.some(Set.prototype.has.bind(new Set(audPayload)));\n }\n return false;\n};\nexport function validateClaimsSet(protectedHeader, encodedPayload, options = {}) {\n let payload;\n try {\n payload = JSON.parse(decoder.decode(encodedPayload));\n }\n catch {\n }\n if (!isObject(payload)) {\n throw new JWTInvalid('JWT Claims Set must be a top-level JSON object');\n }\n const { typ } = options;\n if (typ &&\n (typeof protectedHeader.typ !== 'string' ||\n normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) {\n throw new JWTClaimValidationFailed('unexpected \"typ\" JWT header value', payload, 'typ', 'check_failed');\n }\n const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options;\n const presenceCheck = [...requiredClaims];\n if (maxTokenAge !== undefined)\n presenceCheck.push('iat');\n if (audience !== undefined)\n presenceCheck.push('aud');\n if (subject !== undefined)\n presenceCheck.push('sub');\n if (issuer !== undefined)\n presenceCheck.push('iss');\n for (const claim of new Set(presenceCheck.reverse())) {\n if (!(claim in payload)) {\n throw new JWTClaimValidationFailed(`missing required \"${claim}\" claim`, payload, claim, 'missing');\n }\n }\n if (issuer &&\n !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) {\n throw new JWTClaimValidationFailed('unexpected \"iss\" claim value', payload, 'iss', 'check_failed');\n }\n if (subject && payload.sub !== subject) {\n throw new JWTClaimValidationFailed('unexpected \"sub\" claim value', payload, 'sub', 'check_failed');\n }\n if (audience &&\n !checkAudiencePresence(payload.aud, typeof audience === 'string' ? [audience] : audience)) {\n throw new JWTClaimValidationFailed('unexpected \"aud\" claim value', payload, 'aud', 'check_failed');\n }\n let tolerance;\n switch (typeof options.clockTolerance) {\n case 'string':\n tolerance = secs(options.clockTolerance);\n break;\n case 'number':\n tolerance = options.clockTolerance;\n break;\n case 'undefined':\n tolerance = 0;\n break;\n default:\n throw new TypeError('Invalid clockTolerance option type');\n }\n const { currentDate } = options;\n const now = epoch(currentDate || new Date());\n if ((payload.iat !== undefined || maxTokenAge) && typeof payload.iat !== 'number') {\n throw new JWTClaimValidationFailed('\"iat\" claim must be a number', payload, 'iat', 'invalid');\n }\n if (payload.nbf !== undefined) {\n if (typeof payload.nbf !== 'number') {\n throw new JWTClaimValidationFailed('\"nbf\" claim must be a number', payload, 'nbf', 'invalid');\n }\n if (payload.nbf > now + tolerance) {\n throw new JWTClaimValidationFailed('\"nbf\" claim timestamp check failed', payload, 'nbf', 'check_failed');\n }\n }\n if (payload.exp !== undefined) {\n if (typeof payload.exp !== 'number') {\n throw new JWTClaimValidationFailed('\"exp\" claim must be a number', payload, 'exp', 'invalid');\n }\n if (payload.exp <= now - tolerance) {\n throw new JWTExpired('\"exp\" claim timestamp check failed', payload, 'exp', 'check_failed');\n }\n }\n if (maxTokenAge) {\n const age = now - payload.iat;\n const max = typeof maxTokenAge === 'number' ? maxTokenAge : secs(maxTokenAge);\n if (age - tolerance > max) {\n throw new JWTExpired('\"iat\" claim timestamp check failed (too far in the past)', payload, 'iat', 'check_failed');\n }\n if (age < 0 - tolerance) {\n throw new JWTClaimValidationFailed('\"iat\" claim timestamp check failed (it should be in the past)', payload, 'iat', 'check_failed');\n }\n }\n return payload;\n}\nexport class JWTClaimsBuilder {\n #payload;\n constructor(payload) {\n if (!isObject(payload)) {\n throw new TypeError('JWT Claims Set MUST be an object');\n }\n this.#payload = structuredClone(payload);\n }\n data() {\n return encoder.encode(JSON.stringify(this.#payload));\n }\n get iss() {\n return this.#payload.iss;\n }\n set iss(value) {\n this.#payload.iss = value;\n }\n get sub() {\n return this.#payload.sub;\n }\n set sub(value) {\n this.#payload.sub = value;\n }\n get aud() {\n return this.#payload.aud;\n }\n set aud(value) {\n this.#payload.aud = value;\n }\n set jti(value) {\n this.#payload.jti = value;\n }\n set nbf(value) {\n if (typeof value === 'number') {\n this.#payload.nbf = validateInput('setNotBefore', value);\n }\n else if (value instanceof Date) {\n this.#payload.nbf = validateInput('setNotBefore', epoch(value));\n }\n else {\n this.#payload.nbf = epoch(new Date()) + secs(value);\n }\n }\n set exp(value) {\n if (typeof value === 'number') {\n this.#payload.exp = validateInput('setExpirationTime', value);\n }\n else if (value instanceof Date) {\n this.#payload.exp = validateInput('setExpirationTime', epoch(value));\n }\n else {\n this.#payload.exp = epoch(new Date()) + secs(value);\n }\n }\n set iat(value) {\n if (value === undefined) {\n this.#payload.iat = epoch(new Date());\n }\n else if (value instanceof Date) {\n this.#payload.iat = validateInput('setIssuedAt', epoch(value));\n }\n else if (typeof value === 'string') {\n this.#payload.iat = validateInput('setIssuedAt', epoch(new Date()) + secs(value));\n }\n else {\n this.#payload.iat = validateInput('setIssuedAt', value);\n }\n }\n}\n", "import { compactVerify } from '../jws/compact/verify.js';\nimport { validateClaimsSet } from '../lib/jwt_claims_set.js';\nimport { JWTInvalid } from '../util/errors.js';\nexport async function jwtVerify(jwt, key, options) {\n const verified = await compactVerify(jwt, key, options);\n if (verified.protectedHeader.crit?.includes('b64') && verified.protectedHeader.b64 === false) {\n throw new JWTInvalid('JWTs MUST NOT use unencoded payload');\n }\n const payload = validateClaimsSet(verified.protectedHeader, verified.payload, options);\n const result = { payload, protectedHeader: verified.protectedHeader };\n if (typeof key === 'function') {\n return { ...result, key: verified.key };\n }\n return result;\n}\n", "import { encode as b64u } from '../../util/base64url.js';\nimport { sign } from '../../lib/signing.js';\nimport { isDisjoint } from '../../lib/type_checks.js';\nimport { JWSInvalid } from '../../util/errors.js';\nimport { concat, encode } from '../../lib/buffer_utils.js';\nimport { checkKeyType } from '../../lib/check_key_type.js';\nimport { validateCrit } from '../../lib/validate_crit.js';\nimport { normalizeKey } from '../../lib/normalize_key.js';\nimport { assertNotSet } from '../../lib/helpers.js';\nexport class FlattenedSign {\n #payload;\n #protectedHeader;\n #unprotectedHeader;\n constructor(payload) {\n if (!(payload instanceof Uint8Array)) {\n throw new TypeError('payload must be an instance of Uint8Array');\n }\n this.#payload = payload;\n }\n setProtectedHeader(protectedHeader) {\n assertNotSet(this.#protectedHeader, 'setProtectedHeader');\n this.#protectedHeader = protectedHeader;\n return this;\n }\n setUnprotectedHeader(unprotectedHeader) {\n assertNotSet(this.#unprotectedHeader, 'setUnprotectedHeader');\n this.#unprotectedHeader = unprotectedHeader;\n return this;\n }\n async sign(key, options) {\n if (!this.#protectedHeader && !this.#unprotectedHeader) {\n throw new JWSInvalid('either setProtectedHeader or setUnprotectedHeader must be called before #sign()');\n }\n if (!isDisjoint(this.#protectedHeader, this.#unprotectedHeader)) {\n throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');\n }\n const joseHeader = {\n ...this.#protectedHeader,\n ...this.#unprotectedHeader,\n };\n const extensions = validateCrit(JWSInvalid, new Map([['b64', true]]), options?.crit, this.#protectedHeader, joseHeader);\n let b64 = true;\n if (extensions.has('b64')) {\n b64 = this.#protectedHeader.b64;\n if (typeof b64 !== 'boolean') {\n throw new JWSInvalid('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean');\n }\n }\n const { alg } = joseHeader;\n if (typeof alg !== 'string' || !alg) {\n throw new JWSInvalid('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');\n }\n checkKeyType(alg, key, 'sign');\n let payloadS;\n let payloadB;\n if (b64) {\n payloadS = b64u(this.#payload);\n payloadB = encode(payloadS);\n }\n else {\n payloadB = this.#payload;\n payloadS = '';\n }\n let protectedHeaderString;\n let protectedHeaderBytes;\n if (this.#protectedHeader) {\n protectedHeaderString = b64u(JSON.stringify(this.#protectedHeader));\n protectedHeaderBytes = encode(protectedHeaderString);\n }\n else {\n protectedHeaderString = '';\n protectedHeaderBytes = new Uint8Array();\n }\n const data = concat(protectedHeaderBytes, encode('.'), payloadB);\n const k = await normalizeKey(key, alg);\n const signature = await sign(alg, k, data);\n const jws = {\n signature: b64u(signature),\n payload: payloadS,\n };\n if (this.#unprotectedHeader) {\n jws.header = this.#unprotectedHeader;\n }\n if (this.#protectedHeader) {\n jws.protected = protectedHeaderString;\n }\n return jws;\n }\n}\n", "import { FlattenedSign } from '../flattened/sign.js';\nexport class CompactSign {\n #flattened;\n constructor(payload) {\n this.#flattened = new FlattenedSign(payload);\n }\n setProtectedHeader(protectedHeader) {\n this.#flattened.setProtectedHeader(protectedHeader);\n return this;\n }\n async sign(key, options) {\n const jws = await this.#flattened.sign(key, options);\n if (jws.payload === undefined) {\n throw new TypeError('use the flattened module for creating JWS with b64: false');\n }\n return `${jws.protected}.${jws.payload}.${jws.signature}`;\n }\n}\n", "import { CompactSign } from '../jws/compact/sign.js';\nimport { JWTInvalid } from '../util/errors.js';\nimport { JWTClaimsBuilder } from '../lib/jwt_claims_set.js';\nexport class SignJWT {\n #protectedHeader;\n #jwt;\n constructor(payload = {}) {\n this.#jwt = new JWTClaimsBuilder(payload);\n }\n setIssuer(issuer) {\n this.#jwt.iss = issuer;\n return this;\n }\n setSubject(subject) {\n this.#jwt.sub = subject;\n return this;\n }\n setAudience(audience) {\n this.#jwt.aud = audience;\n return this;\n }\n setJti(jwtId) {\n this.#jwt.jti = jwtId;\n return this;\n }\n setNotBefore(input) {\n this.#jwt.nbf = input;\n return this;\n }\n setExpirationTime(input) {\n this.#jwt.exp = input;\n return this;\n }\n setIssuedAt(input) {\n this.#jwt.iat = input;\n return this;\n }\n setProtectedHeader(protectedHeader) {\n this.#protectedHeader = protectedHeader;\n return this;\n }\n async sign(key, options) {\n const sig = new CompactSign(this.#jwt.data());\n sig.setProtectedHeader(this.#protectedHeader);\n if (Array.isArray(this.#protectedHeader?.crit) &&\n this.#protectedHeader.crit.includes('b64') &&\n this.#protectedHeader.b64 === false) {\n throw new JWTInvalid('JWTs MUST NOT use unencoded payload');\n }\n return sig.sign(key, options);\n }\n}\n", "export { compactDecrypt } from './jwe/compact/decrypt.js';\nexport { flattenedDecrypt } from './jwe/flattened/decrypt.js';\nexport { generalDecrypt } from './jwe/general/decrypt.js';\nexport { GeneralEncrypt } from './jwe/general/encrypt.js';\nexport { compactVerify } from './jws/compact/verify.js';\nexport { flattenedVerify } from './jws/flattened/verify.js';\nexport { generalVerify } from './jws/general/verify.js';\nexport { jwtVerify } from './jwt/verify.js';\nexport { jwtDecrypt } from './jwt/decrypt.js';\nexport { CompactEncrypt } from './jwe/compact/encrypt.js';\nexport { FlattenedEncrypt } from './jwe/flattened/encrypt.js';\nexport { CompactSign } from './jws/compact/sign.js';\nexport { FlattenedSign } from './jws/flattened/sign.js';\nexport { GeneralSign } from './jws/general/sign.js';\nexport { SignJWT } from './jwt/sign.js';\nexport { EncryptJWT } from './jwt/encrypt.js';\nexport { calculateJwkThumbprint, calculateJwkThumbprintUri } from './jwk/thumbprint.js';\nexport { EmbeddedJWK } from './jwk/embedded.js';\nexport { createLocalJWKSet } from './jwks/local.js';\nexport { createRemoteJWKSet, jwksCache, customFetch } from './jwks/remote.js';\nexport { UnsecuredJWT } from './jwt/unsecured.js';\nexport { exportPKCS8, exportSPKI, exportJWK } from './key/export.js';\nexport { importSPKI, importPKCS8, importX509, importJWK } from './key/import.js';\nexport { decodeProtectedHeader } from './util/decode_protected_header.js';\nexport { decodeJwt } from './util/decode_jwt.js';\nimport * as errors from './util/errors.js';\nexport { errors };\nexport { generateKeyPair } from './key/generate_key_pair.js';\nexport { generateSecret } from './key/generate_secret.js';\nimport * as base64url from './util/base64url.js';\nexport { base64url };\nexport const cryptoRuntime = 'WebCryptoAPI';\n", "export class ApiError extends Error {\n public statusCode: number;\n public details?: any;\n\n constructor(message: string, statusCode: number = 500, details?: any) {\n console.log(message)\n \n super(message);\n this.name = 'ApiError';\n this.statusCode = statusCode;\n this.details = details;\n // Error.captureStackTrace?.(this, ApiError);\n }\n}\n", "\n// Old env loading (Node only)\n// export const appUrl = process.env.APP_URL as string;\n//\n// export const jwtSecret: string = process.env.JWT_SECRET as string\n//\n// export const defaultRoleName = 'gen_user';\n//\n// export const encodedJwtSecret = new TextEncoder().encode(jwtSecret)\n//\n// export const s3AccessKeyId = process.env.S3_ACCESS_KEY_ID as string\n//\n// export const s3SecretAccessKey = process.env.S3_SECRET_ACCESS_KEY as string\n//\n// export const s3BucketName = process.env.S3_BUCKET_NAME as string\n//\n// export const s3Region = process.env.S3_REGION as string\n//\n// export const assetsDomain = process.env.ASSETS_DOMAIN as string;\n//\n// export const apiCacheKey = process.env.API_CACHE_KEY as string;\n//\n// export const cloudflareApiToken = process.env.CLOUDFLARE_API_TOKEN as string;\n//\n// export const cloudflareZoneId = process.env.CLOUDFLARE_ZONE_ID as string;\n//\n// export const s3Url = process.env.S3_URL as string\n//\n// export const redisUrl = process.env.REDIS_URL as string\n//\n//\n// export const expoAccessToken = process.env.EXPO_ACCESS_TOKEN as string;\n//\n// export const phonePeBaseUrl = process.env.PHONE_PE_BASE_URL as string;\n//\n// export const phonePeClientId = process.env.PHONE_PE_CLIENT_ID as string;\n//\n// export const phonePeClientVersion = Number(process.env.PHONE_PE_CLIENT_VERSION as string);\n//\n// export const phonePeClientSecret = process.env.PHONE_PE_CLIENT_SECRET as string;\n//\n// export const phonePeMerchantId = process.env.PHONE_PE_MERCHANT_ID as string;\n//\n// export const razorpayId = process.env.RAZORPAY_KEY as string;\n//\n// export const razorpaySecret = process.env.RAZORPAY_SECRET as string;\n//\n// export const otpSenderAuthToken = process.env.OTP_SENDER_AUTH_TOKEN as string;\n//\n// export const minOrderValue = Number(process.env.MIN_ORDER_VALUE as string);\n//\n// export const deliveryCharge = Number(process.env.DELIVERY_CHARGE as string);\n//\n// export const telegramBotToken = process.env.TELEGRAM_BOT_TOKEN as string;\n//\n// export const telegramChatIds = (process.env.TELEGRAM_CHAT_IDS as string)?.split(',').map(id => id.trim()) || [];\n//\n// export const isDevMode = (process.env.ENV_MODE as string) === 'dev';\n\nconst getRuntimeEnv = () => (globalThis as any).ENV || (globalThis as any).process?.env || {}\n\nconst runtimeEnv = getRuntimeEnv()\n\nexport const appUrl = runtimeEnv.APP_URL as string\n\nexport const jwtSecret: string = runtimeEnv.JWT_SECRET as string\n\nexport const defaultRoleName = 'gen_user';\n\nexport const getEncodedJwtSecret = () => {\n const env = getRuntimeEnv()\n const secret = (env.JWT_SECRET as string) || ''\n return new TextEncoder().encode(secret)\n}\n\nexport const s3AccessKeyId = runtimeEnv.S3_ACCESS_KEY_ID as string\n\nexport const s3SecretAccessKey = runtimeEnv.S3_SECRET_ACCESS_KEY as string\n\nexport const s3BucketName = runtimeEnv.S3_BUCKET_NAME as string\n\nexport const s3Region = runtimeEnv.S3_REGION as string\n\nexport const assetsDomain = runtimeEnv.ASSETS_DOMAIN as string\n\nexport const apiCacheKey = runtimeEnv.API_CACHE_KEY as string\n\nexport const cloudflareApiToken = runtimeEnv.CLOUDFLARE_API_TOKEN as string\n\nexport const cloudflareZoneId = runtimeEnv.CLOUDFLARE_ZONE_ID as string\n\nexport const s3Url = runtimeEnv.S3_URL as string\n\nexport const redisUrl = runtimeEnv.REDIS_URL as string\n\nexport const expoAccessToken = runtimeEnv.EXPO_ACCESS_TOKEN as string\n\nexport const phonePeBaseUrl = runtimeEnv.PHONE_PE_BASE_URL as string\n\nexport const phonePeClientId = runtimeEnv.PHONE_PE_CLIENT_ID as string\n\nexport const phonePeClientVersion = Number(runtimeEnv.PHONE_PE_CLIENT_VERSION as string)\n\nexport const phonePeClientSecret = runtimeEnv.PHONE_PE_CLIENT_SECRET as string\n\nexport const phonePeMerchantId = runtimeEnv.PHONE_PE_MERCHANT_ID as string\n\nexport const razorpayId = runtimeEnv.RAZORPAY_KEY as string\n\nexport const razorpaySecret = runtimeEnv.RAZORPAY_SECRET as string\n\nexport const otpSenderAuthToken = runtimeEnv.OTP_SENDER_AUTH_TOKEN as string\n\nexport const minOrderValue = Number(runtimeEnv.MIN_ORDER_VALUE as string)\n\nexport const deliveryCharge = Number(runtimeEnv.DELIVERY_CHARGE as string)\n\nexport const telegramBotToken = runtimeEnv.TELEGRAM_BOT_TOKEN as string\n\nexport const telegramChatIds = (runtimeEnv.TELEGRAM_CHAT_IDS as string)?.split(',').map(id => id.trim()) || []\n\nexport const isDevMode = (runtimeEnv.ENV_MODE as string) === 'dev'\n", "import { Context, Next } from 'hono';\nimport { jwtVerify } from 'jose';\nimport { getStaffUserById } from '@/src/dbService';\nimport { ApiError } from '@/src/lib/api-error';\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter';\n\n/**\n * Verify JWT token and extract payload\n */\nconst verifyStaffToken = async (token: string) => {\n try {\n const { payload } = await jwtVerify(token, getEncodedJwtSecret());\n return payload;\n } catch (error) {\n throw new ApiError('Access denied. Invalid auth credentials', 401);\n }\n};\n\n/**\n * Middleware to authenticate staff users and attach staffUser to context\n */\nexport const authenticateStaff = async (c: Context, next: Next) => {\n try {\n // Extract token from Authorization header\n const authHeader = c.req.header('authorization');\n\n if (!authHeader || !authHeader.startsWith('Bearer ')) {\n throw new ApiError('Staff authentication required', 401);\n }\n\n const token = authHeader.split(' ')[1];\n\n if (!token) {\n throw new ApiError('Staff authentication token missing', 401);\n }\n\n // Verify token and extract payload\n const decoded = await verifyStaffToken(token) as any;\n\n // Verify staffId exists in token\n if (!decoded.staffId) {\n throw new ApiError('Invalid staff token format', 401);\n }\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { staffUsers } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n const staff = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.id, decoded.staffId),\n });\n */\n\n // Fetch staff user from database\n const staff = await getStaffUserById(decoded.staffId);\n\n if (!staff) {\n throw new ApiError('Staff user not found', 401);\n }\n\n // Attach staff user to context\n c.set('staffUser', {\n id: staff.id,\n name: staff.name,\n });\n\n await next();\n } catch (error) {\n throw error;\n }\n};\n", "import { Hono } from 'hono';\nimport { authenticateStaff } from \"@/src/middleware/staff-auth\";\n\nconst router = new Hono();\n\n// Apply staff authentication to all admin routes\nrouter.use('*', authenticateStaff);\n\nconst avRouter = router;\n\nexport default avRouter;\n", "export const getHttpHandlerExtensionConfiguration = (runtimeConfig) => {\n return {\n setHttpHandler(handler) {\n runtimeConfig.httpHandler = handler;\n },\n httpHandler() {\n return runtimeConfig.httpHandler;\n },\n updateHttpClientConfig(key, value) {\n runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);\n },\n httpHandlerConfigs() {\n return runtimeConfig.httpHandler.httpHandlerConfigs();\n },\n };\n};\nexport const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {\n return {\n httpHandler: httpHandlerExtensionConfiguration.httpHandler(),\n };\n};\n", "export * from \"./httpExtensionConfiguration\";\n", "export {};\n", "export var HttpAuthLocation;\n(function (HttpAuthLocation) {\n HttpAuthLocation[\"HEADER\"] = \"header\";\n HttpAuthLocation[\"QUERY\"] = \"query\";\n})(HttpAuthLocation || (HttpAuthLocation = {}));\n", "export var HttpApiKeyAuthLocation;\n(function (HttpApiKeyAuthLocation) {\n HttpApiKeyAuthLocation[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation[\"QUERY\"] = \"query\";\n})(HttpApiKeyAuthLocation || (HttpApiKeyAuthLocation = {}));\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./auth\";\nexport * from \"./HttpApiKeyAuth\";\nexport * from \"./HttpAuthScheme\";\nexport * from \"./HttpAuthSchemeProvider\";\nexport * from \"./HttpSigner\";\nexport * from \"./IdentityProviderConfig\";\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./config\";\nexport * from \"./manager\";\nexport * from \"./pool\";\n", "export {};\n", "export {};\n", "export var EndpointURLScheme;\n(function (EndpointURLScheme) {\n EndpointURLScheme[\"HTTP\"] = \"http\";\n EndpointURLScheme[\"HTTPS\"] = \"https\";\n})(EndpointURLScheme || (EndpointURLScheme = {}));\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./EndpointRuleObject\";\nexport * from \"./ErrorRuleObject\";\nexport * from \"./RuleSetObject\";\nexport * from \"./shared\";\nexport * from \"./TreeRuleObject\";\n", "export {};\n", "export var AlgorithmId;\n(function (AlgorithmId) {\n AlgorithmId[\"MD5\"] = \"md5\";\n AlgorithmId[\"CRC32\"] = \"crc32\";\n AlgorithmId[\"CRC32C\"] = \"crc32c\";\n AlgorithmId[\"SHA1\"] = \"sha1\";\n AlgorithmId[\"SHA256\"] = \"sha256\";\n})(AlgorithmId || (AlgorithmId = {}));\nexport const getChecksumConfiguration = (runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== undefined) {\n checksumAlgorithms.push({\n algorithmId: () => AlgorithmId.SHA256,\n checksumConstructor: () => runtimeConfig.sha256,\n });\n }\n if (runtimeConfig.md5 != undefined) {\n checksumAlgorithms.push({\n algorithmId: () => AlgorithmId.MD5,\n checksumConstructor: () => runtimeConfig.md5,\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n },\n };\n};\nexport const resolveChecksumRuntimeConfig = (clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n};\n", "import { getChecksumConfiguration, resolveChecksumRuntimeConfig } from \"./checksum\";\nexport const getDefaultClientConfiguration = (runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n};\nexport const resolveDefaultRuntimeConfig = (config) => {\n return resolveChecksumRuntimeConfig(config);\n};\n", "export {};\n", "export * from \"./defaultClientConfiguration\";\nexport * from \"./defaultExtensionConfiguration\";\nexport { AlgorithmId } from \"./checksum\";\n", "export {};\n", "export var FieldPosition;\n(function (FieldPosition) {\n FieldPosition[FieldPosition[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition[FieldPosition[\"TRAILER\"] = 1] = \"TRAILER\";\n})(FieldPosition || (FieldPosition = {}));\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./apiKeyIdentity\";\nexport * from \"./awsCredentialIdentity\";\nexport * from \"./identity\";\nexport * from \"./tokenIdentity\";\n", "export {};\n", "export const SMITHY_CONTEXT_KEY = \"__smithy_context\";\n", "export {};\n", "export var IniSectionType;\n(function (IniSectionType) {\n IniSectionType[\"PROFILE\"] = \"profile\";\n IniSectionType[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType[\"SERVICES\"] = \"services\";\n})(IniSectionType || (IniSectionType = {}));\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export var RequestHandlerProtocol;\n(function (RequestHandlerProtocol) {\n RequestHandlerProtocol[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol[\"TDS_8_0\"] = \"tds/8.0\";\n})(RequestHandlerProtocol || (RequestHandlerProtocol = {}));\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./abort\";\nexport * from \"./auth\";\nexport * from \"./blob/blob-payload-input-types\";\nexport * from \"./checksum\";\nexport * from \"./client\";\nexport * from \"./command\";\nexport * from \"./connection\";\nexport * from \"./crypto\";\nexport * from \"./encode\";\nexport * from \"./endpoint\";\nexport * from \"./endpoints\";\nexport * from \"./eventStream\";\nexport * from \"./extensions\";\nexport * from \"./feature-ids\";\nexport * from \"./http\";\nexport * from \"./http/httpHandlerInitialization\";\nexport * from \"./identity\";\nexport * from \"./logger\";\nexport * from \"./middleware\";\nexport * from \"./pagination\";\nexport * from \"./profile\";\nexport * from \"./response\";\nexport * from \"./retry\";\nexport * from \"./schema/schema\";\nexport * from \"./schema/traits\";\nexport * from \"./schema/schema-deprecated\";\nexport * from \"./schema/sentinels\";\nexport * from \"./schema/static-schemas\";\nexport * from \"./serde\";\nexport * from \"./shapes\";\nexport * from \"./signature\";\nexport * from \"./stream\";\nexport * from \"./streaming-payload/streaming-blob-common-types\";\nexport * from \"./streaming-payload/streaming-blob-payload-input-types\";\nexport * from \"./streaming-payload/streaming-blob-payload-output-types\";\nexport * from \"./transfer\";\nexport * from \"./transform/client-payload-blob-type-narrow\";\nexport * from \"./transform/mutable\";\nexport * from \"./transform/no-undefined\";\nexport * from \"./transform/type-transform\";\nexport * from \"./uri\";\nexport * from \"./util\";\nexport * from \"./waiter\";\n", "import { FieldPosition } from \"@smithy/types\";\nexport class Field {\n name;\n kind;\n values;\n constructor({ name, kind = FieldPosition.HEADER, values = [] }) {\n this.name = name;\n this.kind = kind;\n this.values = values;\n }\n add(value) {\n this.values.push(value);\n }\n set(values) {\n this.values = values;\n }\n remove(value) {\n this.values = this.values.filter((v) => v !== value);\n }\n toString() {\n return this.values.map((v) => (v.includes(\",\") || v.includes(\" \") ? `\"${v}\"` : v)).join(\", \");\n }\n get() {\n return this.values;\n }\n}\n", "export class Fields {\n entries = {};\n encoding;\n constructor({ fields = [], encoding = \"utf-8\" }) {\n fields.forEach(this.setField.bind(this));\n this.encoding = encoding;\n }\n setField(field) {\n this.entries[field.name.toLowerCase()] = field;\n }\n getField(name) {\n return this.entries[name.toLowerCase()];\n }\n removeField(name) {\n delete this.entries[name.toLowerCase()];\n }\n getByType(kind) {\n return Object.values(this.entries).filter((field) => field.kind === kind);\n }\n}\n", "export {};\n", "export class HttpRequest {\n method;\n protocol;\n hostname;\n port;\n path;\n query;\n headers;\n username;\n password;\n fragment;\n body;\n constructor(options) {\n this.method = options.method || \"GET\";\n this.hostname = options.hostname || \"localhost\";\n this.port = options.port;\n this.query = options.query || {};\n this.headers = options.headers || {};\n this.body = options.body;\n this.protocol = options.protocol\n ? options.protocol.slice(-1) !== \":\"\n ? `${options.protocol}:`\n : options.protocol\n : \"https:\";\n this.path = options.path ? (options.path.charAt(0) !== \"/\" ? `/${options.path}` : options.path) : \"/\";\n this.username = options.username;\n this.password = options.password;\n this.fragment = options.fragment;\n }\n static clone(request) {\n const cloned = new HttpRequest({\n ...request,\n headers: { ...request.headers },\n });\n if (cloned.query) {\n cloned.query = cloneQuery(cloned.query);\n }\n return cloned;\n }\n static isInstance(request) {\n if (!request) {\n return false;\n }\n const req = request;\n return (\"method\" in req &&\n \"protocol\" in req &&\n \"hostname\" in req &&\n \"path\" in req &&\n typeof req[\"query\"] === \"object\" &&\n typeof req[\"headers\"] === \"object\");\n }\n clone() {\n return HttpRequest.clone(this);\n }\n}\nfunction cloneQuery(query) {\n return Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param,\n };\n }, {});\n}\n", "export class HttpResponse {\n statusCode;\n reason;\n headers;\n body;\n constructor(options) {\n this.statusCode = options.statusCode;\n this.reason = options.reason;\n this.headers = options.headers || {};\n this.body = options.body;\n }\n static isInstance(response) {\n if (!response)\n return false;\n const resp = response;\n return typeof resp.statusCode === \"number\" && typeof resp.headers === \"object\";\n }\n}\n", "export function isValidHostname(hostname) {\n const hostPattern = /^[a-z0-9][a-z0-9\\.\\-]*[a-z0-9]$/;\n return hostPattern.test(hostname);\n}\n", "export {};\n", "export * from \"./extensions\";\nexport * from \"./Field\";\nexport * from \"./Fields\";\nexport * from \"./httpHandler\";\nexport * from \"./httpRequest\";\nexport * from \"./httpResponse\";\nexport * from \"./isValidHostname\";\nexport * from \"./types\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nexport function addExpectContinueMiddleware(options) {\n return (next) => async (args) => {\n const { request } = args;\n if (options.expectContinueHeader !== false &&\n HttpRequest.isInstance(request) &&\n request.body &&\n options.runtime === \"node\" &&\n options.requestHandler?.constructor?.name !== \"FetchHttpHandler\") {\n let sendHeader = true;\n if (typeof options.expectContinueHeader === \"number\") {\n try {\n const bodyLength = Number(request.headers?.[\"content-length\"]) ?? options.bodyLengthChecker?.(request.body) ?? Infinity;\n sendHeader = bodyLength >= options.expectContinueHeader;\n }\n catch (e) { }\n }\n else {\n sendHeader = !!options.expectContinueHeader;\n }\n if (sendHeader) {\n request.headers.Expect = \"100-continue\";\n }\n }\n return next({\n ...args,\n request,\n });\n };\n}\nexport const addExpectContinueMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_EXPECT_HEADER\", \"EXPECT_HEADER\"],\n name: \"addExpectContinueMiddleware\",\n override: true,\n};\nexport const getAddExpectContinuePlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(addExpectContinueMiddleware(options), addExpectContinueMiddlewareOptions);\n },\n});\n", "export const RequestChecksumCalculation = {\n WHEN_SUPPORTED: \"WHEN_SUPPORTED\",\n WHEN_REQUIRED: \"WHEN_REQUIRED\",\n};\nexport const DEFAULT_REQUEST_CHECKSUM_CALCULATION = RequestChecksumCalculation.WHEN_SUPPORTED;\nexport const ResponseChecksumValidation = {\n WHEN_SUPPORTED: \"WHEN_SUPPORTED\",\n WHEN_REQUIRED: \"WHEN_REQUIRED\",\n};\nexport const DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.WHEN_SUPPORTED;\nexport var ChecksumAlgorithm;\n(function (ChecksumAlgorithm) {\n ChecksumAlgorithm[\"MD5\"] = \"MD5\";\n ChecksumAlgorithm[\"CRC32\"] = \"CRC32\";\n ChecksumAlgorithm[\"CRC32C\"] = \"CRC32C\";\n ChecksumAlgorithm[\"CRC64NVME\"] = \"CRC64NVME\";\n ChecksumAlgorithm[\"SHA1\"] = \"SHA1\";\n ChecksumAlgorithm[\"SHA256\"] = \"SHA256\";\n})(ChecksumAlgorithm || (ChecksumAlgorithm = {}));\nexport var ChecksumLocation;\n(function (ChecksumLocation) {\n ChecksumLocation[\"HEADER\"] = \"header\";\n ChecksumLocation[\"TRAILER\"] = \"trailer\";\n})(ChecksumLocation || (ChecksumLocation = {}));\nexport const DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.CRC32;\n", "import { DEFAULT_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation } from \"./constants\";\nimport { SelectorType, stringUnionSelector } from \"./stringUnionSelector\";\nexport const ENV_REQUEST_CHECKSUM_CALCULATION = \"AWS_REQUEST_CHECKSUM_CALCULATION\";\nexport const CONFIG_REQUEST_CHECKSUM_CALCULATION = \"request_checksum_calculation\";\nexport const NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => stringUnionSelector(env, ENV_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.ENV),\n configFileSelector: (profile) => stringUnionSelector(profile, CONFIG_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.CONFIG),\n default: DEFAULT_REQUEST_CHECKSUM_CALCULATION,\n};\n", "import { DEFAULT_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation } from \"./constants\";\nimport { SelectorType, stringUnionSelector } from \"./stringUnionSelector\";\nexport const ENV_RESPONSE_CHECKSUM_VALIDATION = \"AWS_RESPONSE_CHECKSUM_VALIDATION\";\nexport const CONFIG_RESPONSE_CHECKSUM_VALIDATION = \"response_checksum_validation\";\nexport const NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => stringUnionSelector(env, ENV_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.ENV),\n configFileSelector: (profile) => stringUnionSelector(profile, CONFIG_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.CONFIG),\n default: DEFAULT_RESPONSE_CHECKSUM_VALIDATION,\n};\n", "export const state = {\n warningEmitted: false,\n};\nexport const emitWarningIfUnsupportedVersion = (version) => {\n if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 20) {\n state.warningEmitted = true;\n process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js ${version} in January 2026.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to a supported Node.js LTS version.\n\nMore information can be found at: https://a.co/c895JFp`);\n }\n};\n", "export function setCredentialFeature(credentials, feature, value) {\n if (!credentials.$source) {\n credentials.$source = {};\n }\n credentials.$source[feature] = value;\n return credentials;\n}\n", "export function setFeature(context, feature, value) {\n if (!context.__aws_sdk_context) {\n context.__aws_sdk_context = {\n features: {},\n };\n }\n else if (!context.__aws_sdk_context.features) {\n context.__aws_sdk_context.features = {};\n }\n context.__aws_sdk_context.features[feature] = value;\n}\n", "export function setTokenFeature(token, feature, value) {\n if (!token.$source) {\n token.$source = {};\n }\n token.$source[feature] = value;\n return token;\n}\n", "export * from \"./emitWarningIfUnsupportedVersion\";\nexport * from \"./setCredentialFeature\";\nexport * from \"./setFeature\";\nexport * from \"./setTokenFeature\";\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nexport const getDateHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined;\n", "export const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);\n", "import { getSkewCorrectedDate } from \"./getSkewCorrectedDate\";\nexport const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000;\n", "import { isClockSkewed } from \"./isClockSkewed\";\nexport const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {\n const clockTimeInMs = Date.parse(clockTime);\n if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {\n return clockTimeInMs - Date.now();\n }\n return currentSystemClockOffset;\n};\n", "export * from \"./getDateHeader\";\nexport * from \"./getSkewCorrectedDate\";\nexport * from \"./getUpdatedSystemClockOffset\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { getDateHeader, getSkewCorrectedDate, getUpdatedSystemClockOffset } from \"../utils\";\nconst throwSigningPropertyError = (name, property) => {\n if (!property) {\n throw new Error(`Property \\`${name}\\` is not resolved for AWS SDK SigV4Auth`);\n }\n return property;\n};\nexport const validateSigningProperties = async (signingProperties) => {\n const context = throwSigningPropertyError(\"context\", signingProperties.context);\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const authScheme = context.endpointV2?.properties?.authSchemes?.[0];\n const signerFunction = throwSigningPropertyError(\"signer\", config.signer);\n const signer = await signerFunction(authScheme);\n const signingRegion = signingProperties?.signingRegion;\n const signingRegionSet = signingProperties?.signingRegionSet;\n const signingName = signingProperties?.signingName;\n return {\n config,\n signer,\n signingRegion,\n signingRegionSet,\n signingName,\n };\n};\nexport class AwsSdkSigV4Signer {\n async sign(httpRequest, identity, signingProperties) {\n if (!HttpRequest.isInstance(httpRequest)) {\n throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n }\n const validatedProps = await validateSigningProperties(signingProperties);\n const { config, signer } = validatedProps;\n let { signingRegion, signingName } = validatedProps;\n const handlerExecutionContext = signingProperties.context;\n if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {\n const [first, second] = handlerExecutionContext.authSchemes;\n if (first?.name === \"sigv4a\" && second?.name === \"sigv4\") {\n signingRegion = second?.signingRegion ?? signingRegion;\n signingName = second?.signingName ?? signingName;\n }\n }\n const signedRequest = await signer.sign(httpRequest, {\n signingDate: getSkewCorrectedDate(config.systemClockOffset),\n signingRegion: signingRegion,\n signingService: signingName,\n });\n return signedRequest;\n }\n errorHandler(signingProperties) {\n return (error) => {\n const serverTime = error.ServerTime ?? getDateHeader(error.$response);\n if (serverTime) {\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const initialSystemClockOffset = config.systemClockOffset;\n config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);\n const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;\n if (clockSkewCorrected && error.$metadata) {\n error.$metadata.clockSkewCorrected = true;\n }\n }\n throw error;\n };\n }\n successHandler(httpResponse, signingProperties) {\n const dateHeader = getDateHeader(httpResponse);\n if (dateHeader) {\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);\n }\n }\n}\nexport const AWSSDKSigV4Signer = AwsSdkSigV4Signer;\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { getSkewCorrectedDate } from \"../utils\";\nimport { AwsSdkSigV4Signer, validateSigningProperties } from \"./AwsSdkSigV4Signer\";\nexport class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer {\n async sign(httpRequest, identity, signingProperties) {\n if (!HttpRequest.isInstance(httpRequest)) {\n throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n }\n const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties);\n const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.();\n const multiRegionOverride = (configResolvedSigningRegionSet ??\n signingRegionSet ?? [signingRegion]).join(\",\");\n const signedRequest = await signer.sign(httpRequest, {\n signingDate: getSkewCorrectedDate(config.systemClockOffset),\n signingRegion: multiRegionOverride,\n signingService: signingName,\n });\n return signedRequest;\n }\n}\n", "export const getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\\s-]/g, \"_\").toUpperCase()}`;\n", "import { getArrayForCommaSeparatedString } from \"../utils/getArrayForCommaSeparatedString\";\nimport { getBearerTokenEnvKey } from \"../utils/getBearerTokenEnvKey\";\nconst NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = \"AWS_AUTH_SCHEME_PREFERENCE\";\nconst NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = \"auth_scheme_preference\";\nexport const NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {\n environmentVariableSelector: (env, options) => {\n if (options?.signingName) {\n const bearerTokenKey = getBearerTokenEnvKey(options.signingName);\n if (bearerTokenKey in env)\n return [\"httpBearerAuth\"];\n }\n if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env))\n return undefined;\n return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);\n },\n configFileSelector: (profile) => {\n if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile))\n return undefined;\n return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);\n },\n default: [],\n};\n", "import { SMITHY_CONTEXT_KEY } from \"@smithy/types\";\nexport const getSmithyContext = (context) => context[SMITHY_CONTEXT_KEY] || (context[SMITHY_CONTEXT_KEY] = {});\n", "import { SMITHY_CONTEXT_KEY } from \"@smithy/types\";\nexport const getSmithyContext = (context) => context[SMITHY_CONTEXT_KEY] || (context[SMITHY_CONTEXT_KEY] = {});\n", "export const normalizeProvider = (input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n};\n", "export * from \"./getSmithyContext\";\nexport * from \"./normalizeProvider\";\n", "export const resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => {\n if (!authSchemePreference || authSchemePreference.length === 0) {\n return candidateAuthOptions;\n }\n const preferredAuthOptions = [];\n for (const preferredSchemeName of authSchemePreference) {\n for (const candidateAuthOption of candidateAuthOptions) {\n const candidateAuthSchemeName = candidateAuthOption.schemeId.split(\"#\")[1];\n if (candidateAuthSchemeName === preferredSchemeName) {\n preferredAuthOptions.push(candidateAuthOption);\n }\n }\n }\n for (const candidateAuthOption of candidateAuthOptions) {\n if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) {\n preferredAuthOptions.push(candidateAuthOption);\n }\n }\n return preferredAuthOptions;\n};\n", "import { getSmithyContext } from \"@smithy/util-middleware\";\nimport { resolveAuthOptions } from \"./resolveAuthOptions\";\nfunction convertHttpAuthSchemesToMap(httpAuthSchemes) {\n const map = new Map();\n for (const scheme of httpAuthSchemes) {\n map.set(scheme.schemeId, scheme);\n }\n return map;\n}\nexport const httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => {\n const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input));\n const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];\n const resolvedOptions = resolveAuthOptions(options, authSchemePreference);\n const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);\n const smithyContext = getSmithyContext(context);\n const failureReasons = [];\n for (const option of resolvedOptions) {\n const scheme = authSchemes.get(option.schemeId);\n if (!scheme) {\n failureReasons.push(`HttpAuthScheme \\`${option.schemeId}\\` was not enabled for this service.`);\n continue;\n }\n const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config));\n if (!identityProvider) {\n failureReasons.push(`HttpAuthScheme \\`${option.schemeId}\\` did not have an IdentityProvider configured.`);\n continue;\n }\n const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {};\n option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);\n option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);\n smithyContext.selectedHttpAuthScheme = {\n httpAuthOption: option,\n identity: await identityProvider(option.identityProperties),\n signer: scheme.signer,\n };\n break;\n }\n if (!smithyContext.selectedHttpAuthScheme) {\n throw new Error(failureReasons.join(\"\\n\"));\n }\n return next(args);\n};\n", "import { httpAuthSchemeMiddleware } from \"./httpAuthSchemeMiddleware\";\nexport const httpAuthSchemeEndpointRuleSetMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"HTTP_AUTH_SCHEME\"],\n name: \"httpAuthSchemeMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: \"endpointV2Middleware\",\n};\nexport const getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider,\n }), httpAuthSchemeEndpointRuleSetMiddlewareOptions);\n },\n});\n", "import { httpAuthSchemeMiddleware } from \"./httpAuthSchemeMiddleware\";\nexport const httpAuthSchemeMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"HTTP_AUTH_SCHEME\"],\n name: \"httpAuthSchemeMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: \"serializerMiddleware\",\n};\nexport const getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider,\n }), httpAuthSchemeMiddlewareOptions);\n },\n});\n", "export * from \"./httpAuthSchemeMiddleware\";\nexport * from \"./getHttpAuthSchemeEndpointRuleSetPlugin\";\nexport * from \"./getHttpAuthSchemePlugin\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { getSmithyContext } from \"@smithy/util-middleware\";\nconst defaultErrorHandler = (signingProperties) => (error) => {\n throw error;\n};\nconst defaultSuccessHandler = (httpResponse, signingProperties) => { };\nexport const httpSigningMiddleware = (config) => (next, context) => async (args) => {\n if (!HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n const smithyContext = getSmithyContext(context);\n const scheme = smithyContext.selectedHttpAuthScheme;\n if (!scheme) {\n throw new Error(`No HttpAuthScheme was selected: unable to sign request`);\n }\n const { httpAuthOption: { signingProperties = {} }, identity, signer, } = scheme;\n const output = await next({\n ...args,\n request: await signer.sign(args.request, identity, signingProperties),\n }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));\n (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);\n return output;\n};\n", "import { httpSigningMiddleware } from \"./httpSigningMiddleware\";\nexport const httpSigningMiddlewareOptions = {\n step: \"finalizeRequest\",\n tags: [\"HTTP_SIGNING\"],\n name: \"httpSigningMiddleware\",\n aliases: [\"apiKeyMiddleware\", \"tokenMiddleware\", \"awsAuthMiddleware\"],\n override: true,\n relation: \"after\",\n toMiddleware: \"retryMiddleware\",\n};\nexport const getHttpSigningPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions);\n },\n});\n", "export * from \"./httpSigningMiddleware\";\nexport * from \"./getHttpSigningMiddleware\";\n", "export const normalizeProvider = (input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n};\n", "const makePagedClientRequest = async (CommandCtor, client, input, withCommand = (_) => _, ...args) => {\n let command = new CommandCtor(input);\n command = withCommand(command) ?? command;\n return await client.send(command, ...args);\n};\nexport function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) {\n return async function* paginateOperation(config, input, ...additionalArguments) {\n const _input = input;\n let token = config.startingToken ?? _input[inputTokenName];\n let hasNext = true;\n let page;\n while (hasNext) {\n _input[inputTokenName] = token;\n if (pageSizeTokenName) {\n _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config.pageSize;\n }\n if (config.client instanceof ClientCtor) {\n page = await makePagedClientRequest(CommandCtor, config.client, input, config.withCommand, ...additionalArguments);\n }\n else {\n throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`);\n }\n yield page;\n const prevToken = token;\n token = get(page, outputTokenName);\n hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));\n }\n return undefined;\n };\n}\nconst get = (fromObject, path) => {\n let cursor = fromObject;\n const pathComponents = path.split(\".\");\n for (const step of pathComponents) {\n if (!cursor || typeof cursor !== \"object\") {\n return undefined;\n }\n cursor = cursor[step];\n }\n return cursor;\n};\n", "const chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;\nexport const alphabetByEncoding = Object.entries(chars).reduce((acc, [i, c]) => {\n acc[c] = Number(i);\n return acc;\n}, {});\nexport const alphabetByValue = chars.split(\"\");\nexport const bitsPerLetter = 6;\nexport const bitsPerByte = 8;\nexport const maxLetterValue = 0b111111;\n", "import { alphabetByEncoding, bitsPerByte, bitsPerLetter } from \"./constants.browser\";\nexport const fromBase64 = (input) => {\n let totalByteLength = (input.length / 4) * 3;\n if (input.slice(-2) === \"==\") {\n totalByteLength -= 2;\n }\n else if (input.slice(-1) === \"=\") {\n totalByteLength--;\n }\n const out = new ArrayBuffer(totalByteLength);\n const dataView = new DataView(out);\n for (let i = 0; i < input.length; i += 4) {\n let bits = 0;\n let bitLength = 0;\n for (let j = i, limit = i + 3; j <= limit; j++) {\n if (input[j] !== \"=\") {\n if (!(input[j] in alphabetByEncoding)) {\n throw new TypeError(`Invalid character ${input[j]} in base64 string.`);\n }\n bits |= alphabetByEncoding[input[j]] << ((limit - j) * bitsPerLetter);\n bitLength += bitsPerLetter;\n }\n else {\n bits >>= bitsPerLetter;\n }\n }\n const chunkOffset = (i / 4) * 3;\n bits >>= bitLength % bitsPerByte;\n const byteLength = Math.floor(bitLength / bitsPerByte);\n for (let k = 0; k < byteLength; k++) {\n const offset = (byteLength - k - 1) * bitsPerByte;\n dataView.setUint8(chunkOffset + k, (bits & (255 << offset)) >> offset);\n }\n }\n return new Uint8Array(out);\n};\n", "export const fromUtf8 = (input) => new TextEncoder().encode(input);\n", "import { fromUtf8 } from \"./fromUtf8\";\nexport const toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n", "export const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return new TextDecoder(\"utf-8\").decode(input);\n};\n", "export * from \"./fromUtf8\";\nexport * from \"./toUint8Array\";\nexport * from \"./toUtf8\";\n", "import { fromUtf8 } from \"@smithy/util-utf8\";\nimport { alphabetByValue, bitsPerByte, bitsPerLetter, maxLetterValue } from \"./constants.browser\";\nexport function toBase64(_input) {\n let input;\n if (typeof _input === \"string\") {\n input = fromUtf8(_input);\n }\n else {\n input = _input;\n }\n const isArrayLike = typeof input === \"object\" && typeof input.length === \"number\";\n const isUint8Array = typeof input === \"object\" &&\n typeof input.byteOffset === \"number\" &&\n typeof input.byteLength === \"number\";\n if (!isArrayLike && !isUint8Array) {\n throw new Error(\"@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.\");\n }\n let str = \"\";\n for (let i = 0; i < input.length; i += 3) {\n let bits = 0;\n let bitLength = 0;\n for (let j = i, limit = Math.min(i + 3, input.length); j < limit; j++) {\n bits |= input[j] << ((limit - j - 1) * bitsPerByte);\n bitLength += bitsPerByte;\n }\n const bitClusterCount = Math.ceil(bitLength / bitsPerLetter);\n bits <<= bitClusterCount * bitsPerLetter - bitLength;\n for (let k = 1; k <= bitClusterCount; k++) {\n const offset = (bitClusterCount - k) * bitsPerLetter;\n str += alphabetByValue[(bits & (maxLetterValue << offset)) >> offset];\n }\n str += \"==\".slice(0, 4 - bitClusterCount);\n }\n return str;\n}\n", "export * from \"./fromBase64\";\nexport * from \"./toBase64\";\n", "import { fromBase64, toBase64 } from \"@smithy/util-base64\";\nimport { fromUtf8, toUtf8 } from \"@smithy/util-utf8\";\nexport class Uint8ArrayBlobAdapter extends Uint8Array {\n static fromString(source, encoding = \"utf-8\") {\n if (typeof source === \"string\") {\n if (encoding === \"base64\") {\n return Uint8ArrayBlobAdapter.mutate(fromBase64(source));\n }\n return Uint8ArrayBlobAdapter.mutate(fromUtf8(source));\n }\n throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);\n }\n static mutate(source) {\n Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype);\n return source;\n }\n transformToString(encoding = \"utf-8\") {\n if (encoding === \"base64\") {\n return toBase64(this);\n }\n return toUtf8(this);\n }\n}\n", "const ReadableStreamRef = typeof ReadableStream === \"function\" ? ReadableStream : function () { };\nexport class ChecksumStream extends ReadableStreamRef {\n}\n", "export const isReadableStream = (stream) => typeof ReadableStream === \"function\" &&\n (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream);\nexport const isBlob = (blob) => {\n return typeof Blob === \"function\" && (blob?.constructor?.name === Blob.name || blob instanceof Blob);\n};\n", "import { toBase64 } from \"@smithy/util-base64\";\nimport { isReadableStream } from \"../stream-type-check\";\nimport { ChecksumStream } from \"./ChecksumStream.browser\";\nexport const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => {\n if (!isReadableStream(source)) {\n throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);\n }\n const encoder = base64Encoder ?? toBase64;\n if (typeof TransformStream !== \"function\") {\n throw new Error(\"@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.\");\n }\n const transform = new TransformStream({\n start() { },\n async transform(chunk, controller) {\n checksum.update(chunk);\n controller.enqueue(chunk);\n },\n async flush(controller) {\n const digest = await checksum.digest();\n const received = encoder(digest);\n if (expectedChecksum !== received) {\n const error = new Error(`Checksum mismatch: expected \"${expectedChecksum}\" but received \"${received}\"` +\n ` in response header \"${checksumSourceLocation}\".`);\n controller.error(error);\n }\n else {\n controller.terminate();\n }\n },\n });\n source.pipeThrough(transform);\n const readable = transform.readable;\n Object.setPrototypeOf(readable, ChecksumStream.prototype);\n return readable;\n};\n", "export class ByteArrayCollector {\n allocByteArray;\n byteLength = 0;\n byteArrays = [];\n constructor(allocByteArray) {\n this.allocByteArray = allocByteArray;\n }\n push(byteArray) {\n this.byteArrays.push(byteArray);\n this.byteLength += byteArray.byteLength;\n }\n flush() {\n if (this.byteArrays.length === 1) {\n const bytes = this.byteArrays[0];\n this.reset();\n return bytes;\n }\n const aggregation = this.allocByteArray(this.byteLength);\n let cursor = 0;\n for (let i = 0; i < this.byteArrays.length; ++i) {\n const bytes = this.byteArrays[i];\n aggregation.set(bytes, cursor);\n cursor += bytes.byteLength;\n }\n this.reset();\n return aggregation;\n }\n reset() {\n this.byteArrays = [];\n this.byteLength = 0;\n }\n}\n", "import { ByteArrayCollector } from \"./ByteArrayCollector\";\nexport function createBufferedReadableStream(upstream, size, logger) {\n const reader = upstream.getReader();\n let streamBufferingLoggedWarning = false;\n let bytesSeen = 0;\n const buffers = [\"\", new ByteArrayCollector((size) => new Uint8Array(size))];\n let mode = -1;\n const pull = async (controller) => {\n const { value, done } = await reader.read();\n const chunk = value;\n if (done) {\n if (mode !== -1) {\n const remainder = flush(buffers, mode);\n if (sizeOf(remainder) > 0) {\n controller.enqueue(remainder);\n }\n }\n controller.close();\n }\n else {\n const chunkMode = modeOf(chunk, false);\n if (mode !== chunkMode) {\n if (mode >= 0) {\n controller.enqueue(flush(buffers, mode));\n }\n mode = chunkMode;\n }\n if (mode === -1) {\n controller.enqueue(chunk);\n return;\n }\n const chunkSize = sizeOf(chunk);\n bytesSeen += chunkSize;\n const bufferSize = sizeOf(buffers[mode]);\n if (chunkSize >= size && bufferSize === 0) {\n controller.enqueue(chunk);\n }\n else {\n const newSize = merge(buffers, mode, chunk);\n if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {\n streamBufferingLoggedWarning = true;\n logger?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);\n }\n if (newSize >= size) {\n controller.enqueue(flush(buffers, mode));\n }\n else {\n await pull(controller);\n }\n }\n }\n };\n return new ReadableStream({\n pull,\n });\n}\nexport const createBufferedReadable = createBufferedReadableStream;\nexport function merge(buffers, mode, chunk) {\n switch (mode) {\n case 0:\n buffers[0] += chunk;\n return sizeOf(buffers[0]);\n case 1:\n case 2:\n buffers[mode].push(chunk);\n return sizeOf(buffers[mode]);\n }\n}\nexport function flush(buffers, mode) {\n switch (mode) {\n case 0:\n const s = buffers[0];\n buffers[0] = \"\";\n return s;\n case 1:\n case 2:\n return buffers[mode].flush();\n }\n throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`);\n}\nexport function sizeOf(chunk) {\n return chunk?.byteLength ?? chunk?.length ?? 0;\n}\nexport function modeOf(chunk, allowBuffer = true) {\n if (allowBuffer && typeof Buffer !== \"undefined\" && chunk instanceof Buffer) {\n return 2;\n }\n if (chunk instanceof Uint8Array) {\n return 1;\n }\n if (typeof chunk === \"string\") {\n return 0;\n }\n return -1;\n}\n", "export const getAwsChunkedEncodingStream = (readableStream, options) => {\n const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;\n const checksumRequired = base64Encoder !== undefined &&\n bodyLengthChecker !== undefined &&\n checksumAlgorithmFn !== undefined &&\n checksumLocationName !== undefined &&\n streamHasher !== undefined;\n const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;\n const reader = readableStream.getReader();\n return new ReadableStream({\n async pull(controller) {\n const { value, done } = await reader.read();\n if (done) {\n controller.enqueue(`0\\r\\n`);\n if (checksumRequired) {\n const checksum = base64Encoder(await digest);\n controller.enqueue(`${checksumLocationName}:${checksum}\\r\\n`);\n controller.enqueue(`\\r\\n`);\n }\n controller.close();\n }\n else {\n controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\\r\\n${value}\\r\\n`);\n }\n },\n });\n};\n", "export async function headStream(stream, bytes) {\n let byteLengthCounter = 0;\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n byteLengthCounter += value?.byteLength ?? 0;\n }\n if (byteLengthCounter >= bytes) {\n break;\n }\n isDone = done;\n }\n reader.releaseLock();\n const collected = new Uint8Array(Math.min(bytes, byteLengthCounter));\n let offset = 0;\n for (const chunk of chunks) {\n if (chunk.byteLength > collected.byteLength - offset) {\n collected.set(chunk.subarray(0, collected.byteLength - offset), offset);\n break;\n }\n else {\n collected.set(chunk, offset);\n }\n offset += chunk.length;\n }\n return collected;\n}\n", "export const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);\nconst hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;\n", "import { escapeUri } from \"./escape-uri\";\nexport const escapeUriPath = (uri) => uri.split(\"/\").map(escapeUri).join(\"/\");\n", "export * from \"./escape-uri\";\nexport * from \"./escape-uri-path\";\n", "import { escapeUri } from \"@smithy/util-uri-escape\";\nexport function buildQueryString(query) {\n const parts = [];\n for (let key of Object.keys(query).sort()) {\n const value = query[key];\n key = escapeUri(key);\n if (Array.isArray(value)) {\n for (let i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(`${key}=${escapeUri(value[i])}`);\n }\n }\n else {\n let qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += `=${escapeUri(value)}`;\n }\n parts.push(qsEntry);\n }\n }\n return parts.join(\"&\");\n}\n", "export function createRequest(url, requestOptions) {\n return new Request(url, requestOptions);\n}\n", "export function requestTimeout(timeoutInMs = 0) {\n return new Promise((resolve, reject) => {\n if (timeoutInMs) {\n setTimeout(() => {\n const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);\n timeoutError.name = \"TimeoutError\";\n reject(timeoutError);\n }, timeoutInMs);\n }\n });\n}\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nimport { buildQueryString } from \"@smithy/querystring-builder\";\nimport { createRequest } from \"./create-request\";\nimport { requestTimeout as requestTimeoutFn } from \"./request-timeout\";\nexport const keepAliveSupport = {\n supported: undefined,\n};\nexport class FetchHttpHandler {\n config;\n configProvider;\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new FetchHttpHandler(instanceOrOptions);\n }\n constructor(options) {\n if (typeof options === \"function\") {\n this.configProvider = options().then((opts) => opts || {});\n }\n else {\n this.config = options ?? {};\n this.configProvider = Promise.resolve(this.config);\n }\n if (keepAliveSupport.supported === undefined) {\n keepAliveSupport.supported = Boolean(typeof Request !== \"undefined\" && \"keepalive\" in createRequest(\"https://[::1]\"));\n }\n }\n destroy() {\n }\n async handle(request, { abortSignal, requestTimeout } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n const requestTimeoutInMs = requestTimeout ?? this.config.requestTimeout;\n const keepAlive = this.config.keepAlive === true;\n const credentials = this.config.credentials;\n if (abortSignal?.aborted) {\n const abortError = buildAbortError(abortSignal);\n return Promise.reject(abortError);\n }\n let path = request.path;\n const queryString = buildQueryString(request.query || {});\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const { port, method } = request;\n const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : \"\"}${path}`;\n const body = method === \"GET\" || method === \"HEAD\" ? undefined : request.body;\n const requestOptions = {\n body,\n headers: new Headers(request.headers),\n method: method,\n credentials,\n };\n if (this.config?.cache) {\n requestOptions.cache = this.config.cache;\n }\n if (body) {\n requestOptions.duplex = \"half\";\n }\n if (typeof AbortController !== \"undefined\") {\n requestOptions.signal = abortSignal;\n }\n if (keepAliveSupport.supported) {\n requestOptions.keepalive = keepAlive;\n }\n if (typeof this.config.requestInit === \"function\") {\n Object.assign(requestOptions, this.config.requestInit(request));\n }\n let removeSignalEventListener = () => { };\n const fetchRequest = createRequest(url, requestOptions);\n const raceOfPromises = [\n fetch(fetchRequest).then((response) => {\n const fetchHeaders = response.headers;\n const transformedHeaders = {};\n for (const pair of fetchHeaders.entries()) {\n transformedHeaders[pair[0]] = pair[1];\n }\n const hasReadableStream = response.body != undefined;\n if (!hasReadableStream) {\n return response.blob().then((body) => ({\n response: new HttpResponse({\n headers: transformedHeaders,\n reason: response.statusText,\n statusCode: response.status,\n body,\n }),\n }));\n }\n return {\n response: new HttpResponse({\n headers: transformedHeaders,\n reason: response.statusText,\n statusCode: response.status,\n body: response.body,\n }),\n };\n }),\n requestTimeoutFn(requestTimeoutInMs),\n ];\n if (abortSignal) {\n raceOfPromises.push(new Promise((resolve, reject) => {\n const onAbort = () => {\n const abortError = buildAbortError(abortSignal);\n reject(abortError);\n };\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n removeSignalEventListener = () => signal.removeEventListener(\"abort\", onAbort);\n }\n else {\n abortSignal.onabort = onAbort;\n }\n }));\n }\n return Promise.race(raceOfPromises).finally(removeSignalEventListener);\n }\n updateHttpClientConfig(key, value) {\n this.config = undefined;\n this.configProvider = this.configProvider.then((config) => {\n config[key] = value;\n return config;\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n}\nfunction buildAbortError(abortSignal) {\n const reason = abortSignal && typeof abortSignal === \"object\" && \"reason\" in abortSignal\n ? abortSignal.reason\n : undefined;\n if (reason) {\n if (reason instanceof Error) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n abortError.cause = reason;\n return abortError;\n }\n const abortError = new Error(String(reason));\n abortError.name = \"AbortError\";\n return abortError;\n }\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n return abortError;\n}\n", "import { fromBase64 } from \"@smithy/util-base64\";\nexport const streamCollector = async (stream) => {\n if ((typeof Blob === \"function\" && stream instanceof Blob) || stream.constructor?.name === \"Blob\") {\n if (Blob.prototype.arrayBuffer !== undefined) {\n return new Uint8Array(await stream.arrayBuffer());\n }\n return collectBlob(stream);\n }\n return collectStream(stream);\n};\nasync function collectBlob(blob) {\n const base64 = await readToBase64(blob);\n const arrayBuffer = fromBase64(base64);\n return new Uint8Array(arrayBuffer);\n}\nasync function collectStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n let length = 0;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n isDone = done;\n }\n const collected = new Uint8Array(length);\n let offset = 0;\n for (const chunk of chunks) {\n collected.set(chunk, offset);\n offset += chunk.length;\n }\n return collected;\n}\nfunction readToBase64(blob) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n if (reader.readyState !== 2) {\n return reject(new Error(\"Reader aborted too early\"));\n }\n const result = (reader.result ?? \"\");\n const commaIndex = result.indexOf(\",\");\n const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;\n resolve(result.substring(dataOffset));\n };\n reader.onabort = () => reject(new Error(\"Read aborted\"));\n reader.onerror = () => reject(reader.error);\n reader.readAsDataURL(blob);\n });\n}\n", "export * from \"./fetch-http-handler\";\nexport * from \"./stream-collector\";\n", "const SHORT_TO_HEX = {};\nconst HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\nexport function fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n }\n else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n}\nexport function toHex(bytes) {\n let out = \"\";\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n}\n", "import { streamCollector } from \"@smithy/fetch-http-handler\";\nimport { toBase64 } from \"@smithy/util-base64\";\nimport { toHex } from \"@smithy/util-hex-encoding\";\nimport { toUtf8 } from \"@smithy/util-utf8\";\nimport { isReadableStream } from \"./stream-type-check\";\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nexport const sdkStreamMixin = (stream) => {\n if (!isBlobInstance(stream) && !isReadableStream(stream)) {\n const name = stream?.__proto__?.constructor?.name || stream;\n throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await streamCollector(stream);\n };\n const blobToWebStream = (blob) => {\n if (typeof blob.stream !== \"function\") {\n throw new Error(\"Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\\n\" +\n \"If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body\");\n }\n return blob.stream();\n };\n return Object.assign(stream, {\n transformToByteArray: transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === \"base64\") {\n return toBase64(buf);\n }\n else if (encoding === \"hex\") {\n return toHex(buf);\n }\n else if (encoding === undefined || encoding === \"utf8\" || encoding === \"utf-8\") {\n return toUtf8(buf);\n }\n else if (typeof TextDecoder === \"function\") {\n return new TextDecoder(encoding).decode(buf);\n }\n else {\n throw new Error(\"TextDecoder is not available, please make sure polyfill is provided.\");\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n if (isBlobInstance(stream)) {\n return blobToWebStream(stream);\n }\n else if (isReadableStream(stream)) {\n return stream;\n }\n else {\n throw new Error(`Cannot transform payload to web stream, got ${stream}`);\n }\n },\n });\n};\nconst isBlobInstance = (stream) => typeof Blob === \"function\" && stream instanceof Blob;\n", "export async function splitStream(stream) {\n if (typeof stream.stream === \"function\") {\n stream = stream.stream();\n }\n const readableStream = stream;\n return readableStream.tee();\n}\n", "export * from \"./blob/Uint8ArrayBlobAdapter\";\nexport * from \"./checksum/ChecksumStream\";\nexport * from \"./checksum/createChecksumStream\";\nexport * from \"./createBufferedReadable\";\nexport * from \"./getAwsChunkedEncodingStream\";\nexport * from \"./headStream\";\nexport * from \"./sdk-stream-mixin\";\nexport * from \"./splitStream\";\nexport { isReadableStream, isBlob } from \"./stream-type-check\";\n", "import { Uint8ArrayBlobAdapter } from \"@smithy/util-stream\";\nexport const collectBody = async (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return Uint8ArrayBlobAdapter.mutate(streamBody);\n }\n if (!streamBody) {\n return Uint8ArrayBlobAdapter.mutate(new Uint8Array());\n }\n const fromContext = context.streamCollector(streamBody);\n return Uint8ArrayBlobAdapter.mutate(await fromContext);\n};\n", "export function extendedEncodeURIComponent(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n", "export const deref = (schemaRef) => {\n if (typeof schemaRef === \"function\") {\n return schemaRef();\n }\n return schemaRef;\n};\n", "export const operation = (namespace, name, traits, input, output) => ({\n name,\n namespace,\n traits,\n input,\n output,\n});\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nimport { getSmithyContext } from \"@smithy/util-middleware\";\nimport { operation } from \"../schemas/operation\";\nexport const schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {\n const { response } = await next(args);\n const { operationSchema } = getSmithyContext(context);\n const [, ns, n, t, i, o] = operationSchema ?? [];\n try {\n const parsed = await config.protocol.deserializeResponse(operation(ns, n, t, i, o), {\n ...config,\n ...context,\n }, response);\n return {\n response,\n output: parsed,\n };\n }\n catch (error) {\n Object.defineProperty(error, \"$response\", {\n value: response,\n enumerable: false,\n writable: false,\n configurable: false,\n });\n if (!(\"$metadata\" in error)) {\n const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;\n try {\n error.message += \"\\n \" + hint;\n }\n catch (e) {\n if (!context.logger || context.logger?.constructor?.name === \"NoOpLogger\") {\n console.warn(hint);\n }\n else {\n context.logger?.warn?.(hint);\n }\n }\n if (typeof error.$responseBodyText !== \"undefined\") {\n if (error.$response) {\n error.$response.body = error.$responseBodyText;\n }\n }\n try {\n if (HttpResponse.isInstance(response)) {\n const { headers = {} } = response;\n const headerEntries = Object.entries(headers);\n error.$metadata = {\n httpStatusCode: response.statusCode,\n requestId: findHeader(/^x-[\\w-]+-request-?id$/, headerEntries),\n extendedRequestId: findHeader(/^x-[\\w-]+-id-2$/, headerEntries),\n cfId: findHeader(/^x-[\\w-]+-cf-id$/, headerEntries),\n };\n }\n }\n catch (e) {\n }\n }\n throw error;\n }\n};\nconst findHeader = (pattern, headers) => {\n return (headers.find(([k]) => {\n return k.match(pattern);\n }) || [void 0, void 1])[1];\n};\n", "export function parseQueryString(querystring) {\n const query = {};\n querystring = querystring.replace(/^\\?/, \"\");\n if (querystring) {\n for (const pair of querystring.split(\"&\")) {\n let [key, value = null] = pair.split(\"=\");\n key = decodeURIComponent(key);\n if (value) {\n value = decodeURIComponent(value);\n }\n if (!(key in query)) {\n query[key] = value;\n }\n else if (Array.isArray(query[key])) {\n query[key].push(value);\n }\n else {\n query[key] = [query[key], value];\n }\n }\n }\n return query;\n}\n", "import { parseQueryString } from \"@smithy/querystring-parser\";\nexport const parseUrl = (url) => {\n if (typeof url === \"string\") {\n return parseUrl(new URL(url));\n }\n const { hostname, pathname, port, protocol, search } = url;\n let query;\n if (search) {\n query = parseQueryString(search);\n }\n return {\n hostname,\n port: port ? parseInt(port) : undefined,\n protocol,\n path: pathname,\n query,\n };\n};\n", "import { parseUrl } from \"@smithy/url-parser\";\nexport const toEndpointV1 = (endpoint) => {\n if (typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n const v1Endpoint = parseUrl(endpoint.url);\n if (endpoint.headers) {\n v1Endpoint.headers = {};\n for (const [name, values] of Object.entries(endpoint.headers)) {\n v1Endpoint.headers[name.toLowerCase()] = values.join(\", \");\n }\n }\n return v1Endpoint;\n }\n return endpoint;\n }\n return parseUrl(endpoint);\n};\n", "export * from \"./toEndpointV1\";\n", "import { toEndpointV1 } from \"@smithy/core/endpoints\";\nimport { getSmithyContext } from \"@smithy/util-middleware\";\nimport { operation } from \"../schemas/operation\";\nexport const schemaSerializationMiddleware = (config) => (next, context) => async (args) => {\n const { operationSchema } = getSmithyContext(context);\n const [, ns, n, t, i, o] = operationSchema ?? [];\n const endpoint = context.endpointV2\n ? async () => toEndpointV1(context.endpointV2)\n : config.endpoint;\n const request = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, {\n ...config,\n ...context,\n endpoint,\n });\n return next({\n ...args,\n request,\n });\n};\n", "import { schemaDeserializationMiddleware } from \"./schemaDeserializationMiddleware\";\nimport { schemaSerializationMiddleware } from \"./schemaSerializationMiddleware\";\nexport const deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true,\n};\nexport const serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true,\n};\nexport function getSchemaSerdePlugin(config) {\n return {\n applyToStack: (commandStack) => {\n commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption);\n commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption);\n config.protocol.setSerdeContext(config);\n },\n };\n}\n", "export class Schema {\n name;\n namespace;\n traits;\n static assign(instance, values) {\n const schema = Object.assign(instance, values);\n return schema;\n }\n static [Symbol.hasInstance](lhs) {\n const isPrototype = this.prototype.isPrototypeOf(lhs);\n if (!isPrototype && typeof lhs === \"object\" && lhs !== null) {\n const list = lhs;\n return list.symbol === this.symbol;\n }\n return isPrototype;\n }\n getName() {\n return this.namespace + \"#\" + this.name;\n }\n}\n", "import { Schema } from \"./Schema\";\nexport class ListSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/lis\");\n name;\n traits;\n valueSchema;\n symbol = ListSchema.symbol;\n}\nexport const list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), {\n name,\n namespace,\n traits,\n valueSchema,\n});\n", "import { Schema } from \"./Schema\";\nexport class MapSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/map\");\n name;\n traits;\n keySchema;\n valueSchema;\n symbol = MapSchema.symbol;\n}\nexport const map = (namespace, name, traits, keySchema, valueSchema) => Schema.assign(new MapSchema(), {\n name,\n namespace,\n traits,\n keySchema,\n valueSchema,\n});\n", "import { Schema } from \"./Schema\";\nexport class OperationSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/ope\");\n name;\n traits;\n input;\n output;\n symbol = OperationSchema.symbol;\n}\nexport const op = (namespace, name, traits, input, output) => Schema.assign(new OperationSchema(), {\n name,\n namespace,\n traits,\n input,\n output,\n});\n", "import { Schema } from \"./Schema\";\nexport class StructureSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/str\");\n name;\n traits;\n memberNames;\n memberList;\n symbol = StructureSchema.symbol;\n}\nexport const struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), {\n name,\n namespace,\n traits,\n memberNames,\n memberList,\n});\n", "import { Schema } from \"./Schema\";\nimport { StructureSchema } from \"./StructureSchema\";\nexport class ErrorSchema extends StructureSchema {\n static symbol = Symbol.for(\"@smithy/err\");\n ctor;\n symbol = ErrorSchema.symbol;\n}\nexport const error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), {\n name,\n namespace,\n traits,\n memberNames,\n memberList,\n ctor: null,\n});\n", "export const traitsCache = [];\nexport function translateTraits(indicator) {\n if (typeof indicator === \"object\") {\n return indicator;\n }\n indicator = indicator | 0;\n if (traitsCache[indicator]) {\n return traitsCache[indicator];\n }\n const traits = {};\n let i = 0;\n for (const trait of [\n \"httpLabel\",\n \"idempotent\",\n \"idempotencyToken\",\n \"sensitive\",\n \"httpPayload\",\n \"httpResponseCode\",\n \"httpQueryParams\",\n ]) {\n if (((indicator >> i++) & 1) === 1) {\n traits[trait] = 1;\n }\n }\n return (traitsCache[indicator] = traits);\n}\n", "import { deref } from \"../deref\";\nimport { translateTraits } from \"./translateTraits\";\nconst anno = {\n it: Symbol.for(\"@smithy/nor-struct-it\"),\n ns: Symbol.for(\"@smithy/ns\"),\n};\nexport const simpleSchemaCacheN = [];\nexport const simpleSchemaCacheS = {};\nexport class NormalizedSchema {\n ref;\n memberName;\n static symbol = Symbol.for(\"@smithy/nor\");\n symbol = NormalizedSchema.symbol;\n name;\n schema;\n _isMemberSchema;\n traits;\n memberTraits;\n normalizedTraits;\n constructor(ref, memberName) {\n this.ref = ref;\n this.memberName = memberName;\n const traitStack = [];\n let _ref = ref;\n let schema = ref;\n this._isMemberSchema = false;\n while (isMemberSchema(_ref)) {\n traitStack.push(_ref[1]);\n _ref = _ref[0];\n schema = deref(_ref);\n this._isMemberSchema = true;\n }\n if (traitStack.length > 0) {\n this.memberTraits = {};\n for (let i = traitStack.length - 1; i >= 0; --i) {\n const traitSet = traitStack[i];\n Object.assign(this.memberTraits, translateTraits(traitSet));\n }\n }\n else {\n this.memberTraits = 0;\n }\n if (schema instanceof NormalizedSchema) {\n const computedMemberTraits = this.memberTraits;\n Object.assign(this, schema);\n this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits());\n this.normalizedTraits = void 0;\n this.memberName = memberName ?? schema.memberName;\n return;\n }\n this.schema = deref(schema);\n if (isStaticSchema(this.schema)) {\n this.name = `${this.schema[1]}#${this.schema[2]}`;\n this.traits = this.schema[3];\n }\n else {\n this.name = this.memberName ?? String(schema);\n this.traits = 0;\n }\n if (this._isMemberSchema && !memberName) {\n throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`);\n }\n }\n static [Symbol.hasInstance](lhs) {\n const isPrototype = this.prototype.isPrototypeOf(lhs);\n if (!isPrototype && typeof lhs === \"object\" && lhs !== null) {\n const ns = lhs;\n return ns.symbol === this.symbol;\n }\n return isPrototype;\n }\n static of(ref) {\n const keyAble = typeof ref === \"function\" || (typeof ref === \"object\" && ref !== null);\n if (typeof ref === \"number\") {\n if (simpleSchemaCacheN[ref]) {\n return simpleSchemaCacheN[ref];\n }\n }\n else if (typeof ref === \"string\") {\n if (simpleSchemaCacheS[ref]) {\n return simpleSchemaCacheS[ref];\n }\n }\n else if (keyAble) {\n if (ref[anno.ns]) {\n return ref[anno.ns];\n }\n }\n const sc = deref(ref);\n if (sc instanceof NormalizedSchema) {\n return sc;\n }\n if (isMemberSchema(sc)) {\n const [ns, traits] = sc;\n if (ns instanceof NormalizedSchema) {\n Object.assign(ns.getMergedTraits(), translateTraits(traits));\n return ns;\n }\n throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`);\n }\n const ns = new NormalizedSchema(sc);\n if (keyAble) {\n return (ref[anno.ns] = ns);\n }\n if (typeof sc === \"string\") {\n return (simpleSchemaCacheS[sc] = ns);\n }\n if (typeof sc === \"number\") {\n return (simpleSchemaCacheN[sc] = ns);\n }\n return ns;\n }\n getSchema() {\n const sc = this.schema;\n if (Array.isArray(sc) && sc[0] === 0) {\n return sc[4];\n }\n return sc;\n }\n getName(withNamespace = false) {\n const { name } = this;\n const short = !withNamespace && name && name.includes(\"#\");\n return short ? name.split(\"#\")[1] : name || undefined;\n }\n getMemberName() {\n return this.memberName;\n }\n isMemberSchema() {\n return this._isMemberSchema;\n }\n isListSchema() {\n const sc = this.getSchema();\n return typeof sc === \"number\"\n ? sc >= 64 && sc < 128\n : sc[0] === 1;\n }\n isMapSchema() {\n const sc = this.getSchema();\n return typeof sc === \"number\"\n ? sc >= 128 && sc <= 0b1111_1111\n : sc[0] === 2;\n }\n isStructSchema() {\n const sc = this.getSchema();\n if (typeof sc !== \"object\") {\n return false;\n }\n const id = sc[0];\n return (id === 3 ||\n id === -3 ||\n id === 4);\n }\n isUnionSchema() {\n const sc = this.getSchema();\n if (typeof sc !== \"object\") {\n return false;\n }\n return sc[0] === 4;\n }\n isBlobSchema() {\n const sc = this.getSchema();\n return sc === 21 || sc === 42;\n }\n isTimestampSchema() {\n const sc = this.getSchema();\n return (typeof sc === \"number\" &&\n sc >= 4 &&\n sc <= 7);\n }\n isUnitSchema() {\n return this.getSchema() === \"unit\";\n }\n isDocumentSchema() {\n return this.getSchema() === 15;\n }\n isStringSchema() {\n return this.getSchema() === 0;\n }\n isBooleanSchema() {\n return this.getSchema() === 2;\n }\n isNumericSchema() {\n return this.getSchema() === 1;\n }\n isBigIntegerSchema() {\n return this.getSchema() === 17;\n }\n isBigDecimalSchema() {\n return this.getSchema() === 19;\n }\n isStreaming() {\n const { streaming } = this.getMergedTraits();\n return !!streaming || this.getSchema() === 42;\n }\n isIdempotencyToken() {\n return !!this.getMergedTraits().idempotencyToken;\n }\n getMergedTraits() {\n return (this.normalizedTraits ??\n (this.normalizedTraits = {\n ...this.getOwnTraits(),\n ...this.getMemberTraits(),\n }));\n }\n getMemberTraits() {\n return translateTraits(this.memberTraits);\n }\n getOwnTraits() {\n return translateTraits(this.traits);\n }\n getKeySchema() {\n const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()];\n if (!isDoc && !isMap) {\n throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`);\n }\n const schema = this.getSchema();\n const memberSchema = isDoc\n ? 15\n : schema[4] ?? 0;\n return member([memberSchema, 0], \"key\");\n }\n getValueSchema() {\n const sc = this.getSchema();\n const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()];\n const memberSchema = typeof sc === \"number\"\n ? 0b0011_1111 & sc\n : sc && typeof sc === \"object\" && (isMap || isList)\n ? sc[3 + sc[0]]\n : isDoc\n ? 15\n : void 0;\n if (memberSchema != null) {\n return member([memberSchema, 0], isMap ? \"value\" : \"member\");\n }\n throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`);\n }\n getMemberSchema(memberName) {\n const struct = this.getSchema();\n if (this.isStructSchema() && struct[4].includes(memberName)) {\n const i = struct[4].indexOf(memberName);\n const memberSchema = struct[5][i];\n return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName);\n }\n if (this.isDocumentSchema()) {\n return member([15, 0], memberName);\n }\n throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`);\n }\n getMemberSchemas() {\n const buffer = {};\n try {\n for (const [k, v] of this.structIterator()) {\n buffer[k] = v;\n }\n }\n catch (ignored) { }\n return buffer;\n }\n getEventStreamMember() {\n if (this.isStructSchema()) {\n for (const [memberName, memberSchema] of this.structIterator()) {\n if (memberSchema.isStreaming() && memberSchema.isStructSchema()) {\n return memberName;\n }\n }\n }\n return \"\";\n }\n *structIterator() {\n if (this.isUnitSchema()) {\n return;\n }\n if (!this.isStructSchema()) {\n throw new Error(\"@smithy/core/schema - cannot iterate non-struct schema.\");\n }\n const struct = this.getSchema();\n const z = struct[4].length;\n let it = struct[anno.it];\n if (it && z === it.length) {\n yield* it;\n return;\n }\n it = Array(z);\n for (let i = 0; i < z; ++i) {\n const k = struct[4][i];\n const v = member([struct[5][i], 0], k);\n yield (it[i] = [k, v]);\n }\n struct[anno.it] = it;\n }\n}\nfunction member(memberSchema, memberName) {\n if (memberSchema instanceof NormalizedSchema) {\n return Object.assign(memberSchema, {\n memberName,\n _isMemberSchema: true,\n });\n }\n const internalCtorAccess = NormalizedSchema;\n return new internalCtorAccess(memberSchema, memberName);\n}\nconst isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2;\nexport const isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5;\n", "import { Schema } from \"./Schema\";\nexport class SimpleSchema extends Schema {\n static symbol = Symbol.for(\"@smithy/sim\");\n name;\n schemaRef;\n traits;\n symbol = SimpleSchema.symbol;\n}\nexport const sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), {\n name,\n namespace,\n traits,\n schemaRef,\n});\nexport const simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), {\n name,\n namespace,\n traits,\n schemaRef,\n});\n", "export const SCHEMA = {\n BLOB: 0b0001_0101,\n STREAMING_BLOB: 0b0010_1010,\n BOOLEAN: 0b0000_0010,\n STRING: 0b0000_0000,\n NUMERIC: 0b0000_0001,\n BIG_INTEGER: 0b0001_0001,\n BIG_DECIMAL: 0b0001_0011,\n DOCUMENT: 0b0000_1111,\n TIMESTAMP_DEFAULT: 0b0000_0100,\n TIMESTAMP_DATE_TIME: 0b0000_0101,\n TIMESTAMP_HTTP_DATE: 0b0000_0110,\n TIMESTAMP_EPOCH_SECONDS: 0b0000_0111,\n LIST_MODIFIER: 0b0100_0000,\n MAP_MODIFIER: 0b1000_0000,\n};\n", "export class TypeRegistry {\n namespace;\n schemas;\n exceptions;\n static registries = new Map();\n constructor(namespace, schemas = new Map(), exceptions = new Map()) {\n this.namespace = namespace;\n this.schemas = schemas;\n this.exceptions = exceptions;\n }\n static for(namespace) {\n if (!TypeRegistry.registries.has(namespace)) {\n TypeRegistry.registries.set(namespace, new TypeRegistry(namespace));\n }\n return TypeRegistry.registries.get(namespace);\n }\n copyFrom(other) {\n const { schemas, exceptions } = this;\n for (const [k, v] of other.schemas) {\n if (!schemas.has(k)) {\n schemas.set(k, v);\n }\n }\n for (const [k, v] of other.exceptions) {\n if (!exceptions.has(k)) {\n exceptions.set(k, v);\n }\n }\n }\n register(shapeId, schema) {\n const qualifiedName = this.normalizeShapeId(shapeId);\n for (const r of [this, TypeRegistry.for(qualifiedName.split(\"#\")[0])]) {\n r.schemas.set(qualifiedName, schema);\n }\n }\n getSchema(shapeId) {\n const id = this.normalizeShapeId(shapeId);\n if (!this.schemas.has(id)) {\n throw new Error(`@smithy/core/schema - schema not found for ${id}`);\n }\n return this.schemas.get(id);\n }\n registerError(es, ctor) {\n const $error = es;\n const ns = $error[1];\n for (const r of [this, TypeRegistry.for(ns)]) {\n r.schemas.set(ns + \"#\" + $error[2], $error);\n r.exceptions.set($error, ctor);\n }\n }\n getErrorCtor(es) {\n const $error = es;\n if (this.exceptions.has($error)) {\n return this.exceptions.get($error);\n }\n const registry = TypeRegistry.for($error[1]);\n return registry.exceptions.get($error);\n }\n getBaseException() {\n for (const exceptionKey of this.exceptions.keys()) {\n if (Array.isArray(exceptionKey)) {\n const [, ns, name] = exceptionKey;\n const id = ns + \"#\" + name;\n if (id.startsWith(\"smithy.ts.sdk.synthetic.\") && id.endsWith(\"ServiceException\")) {\n return exceptionKey;\n }\n }\n }\n return undefined;\n }\n find(predicate) {\n return [...this.schemas.values()].find(predicate);\n }\n clear() {\n this.schemas.clear();\n this.exceptions.clear();\n }\n normalizeShapeId(shapeId) {\n if (shapeId.includes(\"#\")) {\n return shapeId;\n }\n return this.namespace + \"#\" + shapeId;\n }\n}\n", "export * from \"./deref\";\nexport * from \"./middleware/getSchemaSerdePlugin\";\nexport * from \"./schemas/ListSchema\";\nexport * from \"./schemas/MapSchema\";\nexport * from \"./schemas/OperationSchema\";\nexport * from \"./schemas/operation\";\nexport * from \"./schemas/ErrorSchema\";\nexport * from \"./schemas/NormalizedSchema\";\nexport * from \"./schemas/Schema\";\nexport * from \"./schemas/SimpleSchema\";\nexport * from \"./schemas/StructureSchema\";\nexport * from \"./schemas/sentinels\";\nexport * from \"./schemas/translateTraits\";\nexport * from \"./TypeRegistry\";\n", "export const copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source;\n", "export const parseBoolean = (value) => {\n switch (value) {\n case \"true\":\n return true;\n case \"false\":\n return false;\n default:\n throw new Error(`Unable to parse boolean value \"${value}\"`);\n }\n};\nexport const expectBoolean = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"number\") {\n if (value === 0 || value === 1) {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (value === 0) {\n return false;\n }\n if (value === 1) {\n return true;\n }\n }\n if (typeof value === \"string\") {\n const lower = value.toLowerCase();\n if (lower === \"false\" || lower === \"true\") {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (lower === \"false\") {\n return false;\n }\n if (lower === \"true\") {\n return true;\n }\n }\n if (typeof value === \"boolean\") {\n return value;\n }\n throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);\n};\nexport const expectNumber = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"string\") {\n const parsed = parseFloat(value);\n if (!Number.isNaN(parsed)) {\n if (String(parsed) !== String(value)) {\n logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));\n }\n return parsed;\n }\n }\n if (typeof value === \"number\") {\n return value;\n }\n throw new TypeError(`Expected number, got ${typeof value}: ${value}`);\n};\nconst MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));\nexport const expectFloat32 = (value) => {\n const expected = expectNumber(value);\n if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {\n if (Math.abs(expected) > MAX_FLOAT) {\n throw new TypeError(`Expected 32-bit float, got ${value}`);\n }\n }\n return expected;\n};\nexport const expectLong = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (Number.isInteger(value) && !Number.isNaN(value)) {\n return value;\n }\n throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);\n};\nexport const expectInt = expectLong;\nexport const expectInt32 = (value) => expectSizedInt(value, 32);\nexport const expectShort = (value) => expectSizedInt(value, 16);\nexport const expectByte = (value) => expectSizedInt(value, 8);\nconst expectSizedInt = (value, size) => {\n const expected = expectLong(value);\n if (expected !== undefined && castInt(expected, size) !== expected) {\n throw new TypeError(`Expected ${size}-bit integer, got ${value}`);\n }\n return expected;\n};\nconst castInt = (value, size) => {\n switch (size) {\n case 32:\n return Int32Array.of(value)[0];\n case 16:\n return Int16Array.of(value)[0];\n case 8:\n return Int8Array.of(value)[0];\n }\n};\nexport const expectNonNull = (value, location) => {\n if (value === null || value === undefined) {\n if (location) {\n throw new TypeError(`Expected a non-null value for ${location}`);\n }\n throw new TypeError(\"Expected a non-null value\");\n }\n return value;\n};\nexport const expectObject = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"object\" && !Array.isArray(value)) {\n return value;\n }\n const receivedType = Array.isArray(value) ? \"array\" : typeof value;\n throw new TypeError(`Expected object, got ${receivedType}: ${value}`);\n};\nexport const expectString = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"string\") {\n return value;\n }\n if ([\"boolean\", \"number\", \"bigint\"].includes(typeof value)) {\n logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));\n return String(value);\n }\n throw new TypeError(`Expected string, got ${typeof value}: ${value}`);\n};\nexport const expectUnion = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n const asObject = expectObject(value);\n const setKeys = Object.entries(asObject)\n .filter(([, v]) => v != null)\n .map(([k]) => k);\n if (setKeys.length === 0) {\n throw new TypeError(`Unions must have exactly one non-null member. None were found.`);\n }\n if (setKeys.length > 1) {\n throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);\n }\n return asObject;\n};\nexport const strictParseDouble = (value) => {\n if (typeof value == \"string\") {\n return expectNumber(parseNumber(value));\n }\n return expectNumber(value);\n};\nexport const strictParseFloat = strictParseDouble;\nexport const strictParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return expectFloat32(parseNumber(value));\n }\n return expectFloat32(value);\n};\nconst NUMBER_REGEX = /(-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)|(-?Infinity)|(NaN)/g;\nconst parseNumber = (value) => {\n const matches = value.match(NUMBER_REGEX);\n if (matches === null || matches[0].length !== value.length) {\n throw new TypeError(`Expected real number, got implicit NaN`);\n }\n return parseFloat(value);\n};\nexport const limitedParseDouble = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectNumber(value);\n};\nexport const handleFloat = limitedParseDouble;\nexport const limitedParseFloat = limitedParseDouble;\nexport const limitedParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectFloat32(value);\n};\nconst parseFloatString = (value) => {\n switch (value) {\n case \"NaN\":\n return NaN;\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n default:\n throw new Error(`Unable to parse float value: ${value}`);\n }\n};\nexport const strictParseLong = (value) => {\n if (typeof value === \"string\") {\n return expectLong(parseNumber(value));\n }\n return expectLong(value);\n};\nexport const strictParseInt = strictParseLong;\nexport const strictParseInt32 = (value) => {\n if (typeof value === \"string\") {\n return expectInt32(parseNumber(value));\n }\n return expectInt32(value);\n};\nexport const strictParseShort = (value) => {\n if (typeof value === \"string\") {\n return expectShort(parseNumber(value));\n }\n return expectShort(value);\n};\nexport const strictParseByte = (value) => {\n if (typeof value === \"string\") {\n return expectByte(parseNumber(value));\n }\n return expectByte(value);\n};\nconst stackTraceWarning = (message) => {\n return String(new TypeError(message).stack || message)\n .split(\"\\n\")\n .slice(0, 5)\n .filter((s) => !s.includes(\"stackTraceWarning\"))\n .join(\"\\n\");\n};\nexport const logger = {\n warn: console.warn,\n};\n", "import { strictParseByte, strictParseDouble, strictParseFloat32, strictParseShort } from \"./parse-utils\";\nconst DAYS = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\nconst MONTHS = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nexport function dateToUtcString(date) {\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const dayOfWeek = date.getUTCDay();\n const dayOfMonthInt = date.getUTCDate();\n const hoursInt = date.getUTCHours();\n const minutesInt = date.getUTCMinutes();\n const secondsInt = date.getUTCSeconds();\n const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;\n const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;\n const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;\n const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;\n return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;\n}\nconst RFC3339 = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?[zZ]$/);\nexport const parseRfc3339DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n};\nconst RFC3339_WITH_OFFSET = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?(([-+]\\d{2}\\:\\d{2})|[zZ])$/);\nexport const parseRfc3339DateTimeWithOffset = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339_WITH_OFFSET.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n if (offsetStr.toUpperCase() != \"Z\") {\n date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));\n }\n return date;\n};\nconst IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/);\nconst RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/);\nconst ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? (\\d{4})$/);\nexport const parseRfc7231DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-7231 date-times must be expressed as strings\");\n }\n let match = IMF_FIXDATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });\n }\n match = RFC_850_DATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), {\n hours,\n minutes,\n seconds,\n fractionalMilliseconds,\n }));\n }\n match = ASC_TIME.exec(value);\n if (match) {\n const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;\n return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), \"day\", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });\n }\n throw new TypeError(\"Invalid RFC-7231 date-time value\");\n};\nexport const parseEpochTimestamp = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n let valueAsDouble;\n if (typeof value === \"number\") {\n valueAsDouble = value;\n }\n else if (typeof value === \"string\") {\n valueAsDouble = strictParseDouble(value);\n }\n else if (typeof value === \"object\" && value.tag === 1) {\n valueAsDouble = value.value;\n }\n else {\n throw new TypeError(\"Epoch timestamps must be expressed as floating point numbers or their string representation\");\n }\n if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid, non-Infinite, non-NaN numerics\");\n }\n return new Date(Math.round(valueAsDouble * 1000));\n};\nconst buildDate = (year, month, day, time) => {\n const adjustedMonth = month - 1;\n validateDayOfMonth(year, adjustedMonth, day);\n return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, \"hour\", 0, 23), parseDateValue(time.minutes, \"minute\", 0, 59), parseDateValue(time.seconds, \"seconds\", 0, 60), parseMilliseconds(time.fractionalMilliseconds)));\n};\nconst parseTwoDigitYear = (value) => {\n const thisYear = new Date().getUTCFullYear();\n const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));\n if (valueInThisCentury < thisYear) {\n return valueInThisCentury + 100;\n }\n return valueInThisCentury;\n};\nconst FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000;\nconst adjustRfc850Year = (input) => {\n if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) {\n return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));\n }\n return input;\n};\nconst parseMonthByShortName = (value) => {\n const monthIdx = MONTHS.indexOf(value);\n if (monthIdx < 0) {\n throw new TypeError(`Invalid month: ${value}`);\n }\n return monthIdx + 1;\n};\nconst DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst validateDayOfMonth = (year, month, day) => {\n let maxDays = DAYS_IN_MONTH[month];\n if (month === 1 && isLeapYear(year)) {\n maxDays = 29;\n }\n if (day > maxDays) {\n throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);\n }\n};\nconst isLeapYear = (year) => {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n};\nconst parseDateValue = (value, type, lower, upper) => {\n const dateVal = strictParseByte(stripLeadingZeroes(value));\n if (dateVal < lower || dateVal > upper) {\n throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);\n }\n return dateVal;\n};\nconst parseMilliseconds = (value) => {\n if (value === null || value === undefined) {\n return 0;\n }\n return strictParseFloat32(\"0.\" + value) * 1000;\n};\nconst parseOffsetToMilliseconds = (value) => {\n const directionStr = value[0];\n let direction = 1;\n if (directionStr == \"+\") {\n direction = 1;\n }\n else if (directionStr == \"-\") {\n direction = -1;\n }\n else {\n throw new TypeError(`Offset direction, ${directionStr}, must be \"+\" or \"-\"`);\n }\n const hour = Number(value.substring(1, 3));\n const minute = Number(value.substring(4, 6));\n return direction * (hour * 60 + minute) * 60 * 1000;\n};\nconst stripLeadingZeroes = (value) => {\n let idx = 0;\n while (idx < value.length - 1 && value.charAt(idx) === \"0\") {\n idx++;\n }\n if (idx === 0) {\n return value;\n }\n return value.slice(idx);\n};\n", "export const randomUUID = typeof crypto !== \"undefined\" && crypto.randomUUID && crypto.randomUUID.bind(crypto);\n", "import { randomUUID } from \"./randomUUID\";\nconst decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, \"0\"));\nexport const v4 = () => {\n if (randomUUID) {\n return randomUUID();\n }\n const rnds = new Uint8Array(16);\n crypto.getRandomValues(rnds);\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n return (decimalToHex[rnds[0]] +\n decimalToHex[rnds[1]] +\n decimalToHex[rnds[2]] +\n decimalToHex[rnds[3]] +\n \"-\" +\n decimalToHex[rnds[4]] +\n decimalToHex[rnds[5]] +\n \"-\" +\n decimalToHex[rnds[6]] +\n decimalToHex[rnds[7]] +\n \"-\" +\n decimalToHex[rnds[8]] +\n decimalToHex[rnds[9]] +\n \"-\" +\n decimalToHex[rnds[10]] +\n decimalToHex[rnds[11]] +\n decimalToHex[rnds[12]] +\n decimalToHex[rnds[13]] +\n decimalToHex[rnds[14]] +\n decimalToHex[rnds[15]]);\n};\n", "export * from \"./v4\";\n", "import { v4 as generateIdempotencyToken } from \"@smithy/uuid\";\nexport { generateIdempotencyToken };\n", "export const LazyJsonString = function LazyJsonString(val) {\n const str = Object.assign(new String(val), {\n deserializeJSON() {\n return JSON.parse(String(val));\n },\n toString() {\n return String(val);\n },\n toJSON() {\n return String(val);\n },\n });\n return str;\n};\nLazyJsonString.from = (object) => {\n if (object && typeof object === \"object\" && (object instanceof LazyJsonString || \"deserializeJSON\" in object)) {\n return object;\n }\n else if (typeof object === \"string\" || Object.getPrototypeOf(object) === String.prototype) {\n return LazyJsonString(String(object));\n }\n return LazyJsonString(JSON.stringify(object));\n};\nLazyJsonString.fromObject = LazyJsonString.from;\n", "export function quoteHeader(part) {\n if (part.includes(\",\") || part.includes('\"')) {\n part = `\"${part.replace(/\"/g, '\\\\\"')}\"`;\n }\n return part;\n}\n", "const ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;\nconst mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;\nconst time = `(\\\\d?\\\\d):(\\\\d{2}):(\\\\d{2})(?:\\\\.(\\\\d+))?`;\nconst date = `(\\\\d?\\\\d)`;\nconst year = `(\\\\d{4})`;\nconst RFC3339_WITH_OFFSET = new RegExp(/^(\\d{4})-(\\d\\d)-(\\d\\d)[tT](\\d\\d):(\\d\\d):(\\d\\d)(\\.(\\d+))?(([-+]\\d\\d:\\d\\d)|[zZ])$/);\nconst IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`);\nconst RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\\\d\\\\d) ${time} GMT$`);\nconst ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\\\d\\\\d) ${time} ${year}$`);\nconst months = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nexport const _parseEpochTimestamp = (value) => {\n if (value == null) {\n return void 0;\n }\n let num = NaN;\n if (typeof value === \"number\") {\n num = value;\n }\n else if (typeof value === \"string\") {\n if (!/^-?\\d*\\.?\\d+$/.test(value)) {\n throw new TypeError(`parseEpochTimestamp - numeric string invalid.`);\n }\n num = Number.parseFloat(value);\n }\n else if (typeof value === \"object\" && value.tag === 1) {\n num = value.value;\n }\n if (isNaN(num) || Math.abs(num) === Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid finite numbers.\");\n }\n return new Date(Math.round(num * 1000));\n};\nexport const _parseRfc3339DateTimeWithOffset = (value) => {\n if (value == null) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC3339 timestamps must be strings\");\n }\n const matches = RFC3339_WITH_OFFSET.exec(value);\n if (!matches) {\n throw new TypeError(`Invalid RFC3339 timestamp format ${value}`);\n }\n const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches;\n range(monthStr, 1, 12);\n range(dayStr, 1, 31);\n range(hours, 0, 23);\n range(minutes, 0, 59);\n range(seconds, 0, 60);\n const date = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1000) : 0));\n date.setUTCFullYear(Number(yearStr));\n if (offsetStr.toUpperCase() != \"Z\") {\n const [, sign, offsetH, offsetM] = /([+-])(\\d\\d):(\\d\\d)/.exec(offsetStr) || [void 0, \"+\", 0, 0];\n const scalar = sign === \"-\" ? 1 : -1;\n date.setTime(date.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1000 + Number(offsetM) * 60 * 1000));\n }\n return date;\n};\nexport const _parseRfc7231DateTime = (value) => {\n if (value == null) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC7231 timestamps must be strings.\");\n }\n let day;\n let month;\n let year;\n let hour;\n let minute;\n let second;\n let fraction;\n let matches;\n if ((matches = IMF_FIXDATE.exec(value))) {\n [, day, month, year, hour, minute, second, fraction] = matches;\n }\n else if ((matches = RFC_850_DATE.exec(value))) {\n [, day, month, year, hour, minute, second, fraction] = matches;\n year = (Number(year) + 1900).toString();\n }\n else if ((matches = ASC_TIME.exec(value))) {\n [, month, day, hour, minute, second, fraction, year] = matches;\n }\n if (year && second) {\n const timestamp = Date.UTC(Number(year), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1000) : 0);\n range(day, 1, 31);\n range(hour, 0, 23);\n range(minute, 0, 59);\n range(second, 0, 60);\n const date = new Date(timestamp);\n date.setUTCFullYear(Number(year));\n return date;\n }\n throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);\n};\nfunction range(v, min, max) {\n const _v = Number(v);\n if (_v < min || _v > max) {\n throw new Error(`Value ${_v} out of range [${min}, ${max}]`);\n }\n}\n", "export function splitEvery(value, delimiter, numDelimiters) {\n if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {\n throw new Error(\"Invalid number of delimiters (\" + numDelimiters + \") for splitEvery.\");\n }\n const segments = value.split(delimiter);\n if (numDelimiters === 1) {\n return segments;\n }\n const compoundSegments = [];\n let currentSegment = \"\";\n for (let i = 0; i < segments.length; i++) {\n if (currentSegment === \"\") {\n currentSegment = segments[i];\n }\n else {\n currentSegment += delimiter + segments[i];\n }\n if ((i + 1) % numDelimiters === 0) {\n compoundSegments.push(currentSegment);\n currentSegment = \"\";\n }\n }\n if (currentSegment !== \"\") {\n compoundSegments.push(currentSegment);\n }\n return compoundSegments;\n}\n", "export const splitHeader = (value) => {\n const z = value.length;\n const values = [];\n let withinQuotes = false;\n let prevChar = undefined;\n let anchor = 0;\n for (let i = 0; i < z; ++i) {\n const char = value[i];\n switch (char) {\n case `\"`:\n if (prevChar !== \"\\\\\") {\n withinQuotes = !withinQuotes;\n }\n break;\n case \",\":\n if (!withinQuotes) {\n values.push(value.slice(anchor, i));\n anchor = i + 1;\n }\n break;\n default:\n }\n prevChar = char;\n }\n values.push(value.slice(anchor));\n return values.map((v) => {\n v = v.trim();\n const z = v.length;\n if (z < 2) {\n return v;\n }\n if (v[0] === `\"` && v[z - 1] === `\"`) {\n v = v.slice(1, z - 1);\n }\n return v.replace(/\\\\\"/g, '\"');\n });\n};\n", "const format = /^-?\\d*(\\.\\d+)?$/;\nexport class NumericValue {\n string;\n type;\n constructor(string, type) {\n this.string = string;\n this.type = type;\n if (!format.test(string)) {\n throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point \".\", and an optional negation prefix \"-\".`);\n }\n }\n toString() {\n return this.string;\n }\n static [Symbol.hasInstance](object) {\n if (!object || typeof object !== \"object\") {\n return false;\n }\n const _nv = object;\n return NumericValue.prototype.isPrototypeOf(object) || (_nv.type === \"bigDecimal\" && format.test(_nv.string));\n }\n}\nexport function nv(input) {\n return new NumericValue(String(input), \"bigDecimal\");\n}\n", "export * from \"./copyDocumentWithTransform\";\nexport * from \"./date-utils\";\nexport * from \"./generateIdempotencyToken\";\nexport * from \"./lazy-json\";\nexport * from \"./parse-utils\";\nexport * from \"./quote-header\";\nexport * from \"./schema-serde-lib/schema-date-utils\";\nexport * from \"./split-every\";\nexport * from \"./split-header\";\nexport * from \"./value/NumericValue\";\n", "export class SerdeContext {\n serdeContext;\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n }\n}\n", "import { fromUtf8, toUtf8 } from \"@smithy/util-utf8\";\nexport class EventStreamSerde {\n marshaller;\n serializer;\n deserializer;\n serdeContext;\n defaultContentType;\n constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }) {\n this.marshaller = marshaller;\n this.serializer = serializer;\n this.deserializer = deserializer;\n this.serdeContext = serdeContext;\n this.defaultContentType = defaultContentType;\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = requestSchema.getEventStreamMember();\n const unionSchema = requestSchema.getMemberSchema(eventStreamMember);\n const serializer = this.serializer;\n const defaultContentType = this.defaultContentType;\n const initialRequestMarker = Symbol(\"initialRequestMarker\");\n const eventStreamIterable = {\n async *[Symbol.asyncIterator]() {\n if (initialRequest) {\n const headers = {\n \":event-type\": { type: \"string\", value: \"initial-request\" },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: defaultContentType },\n };\n serializer.write(requestSchema, initialRequest);\n const body = serializer.flush();\n yield {\n [initialRequestMarker]: true,\n headers,\n body,\n };\n }\n for await (const page of eventStream) {\n yield page;\n }\n },\n };\n return marshaller.serialize(eventStreamIterable, (event) => {\n if (event[initialRequestMarker]) {\n return {\n headers: event.headers,\n body: event.body,\n };\n }\n const unionMember = Object.keys(event).find((key) => {\n return key !== \"__type\";\n }) ?? \"\";\n const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);\n const headers = {\n \":event-type\": { type: \"string\", value: eventType },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: explicitPayloadContentType ?? defaultContentType },\n ...additionalHeaders,\n };\n return {\n headers,\n body,\n };\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = responseSchema.getEventStreamMember();\n const unionSchema = responseSchema.getMemberSchema(eventStreamMember);\n const memberSchemas = unionSchema.getMemberSchemas();\n const initialResponseMarker = Symbol(\"initialResponseMarker\");\n const asyncIterable = marshaller.deserialize(response.body, async (event) => {\n const unionMember = Object.keys(event).find((key) => {\n return key !== \"__type\";\n }) ?? \"\";\n const body = event[unionMember].body;\n if (unionMember === \"initial-response\") {\n const dataObject = await this.deserializer.read(responseSchema, body);\n delete dataObject[eventStreamMember];\n return {\n [initialResponseMarker]: true,\n ...dataObject,\n };\n }\n else if (unionMember in memberSchemas) {\n const eventStreamSchema = memberSchemas[unionMember];\n if (eventStreamSchema.isStructSchema()) {\n const out = {};\n let hasBindings = false;\n for (const [name, member] of eventStreamSchema.structIterator()) {\n const { eventHeader, eventPayload } = member.getMergedTraits();\n hasBindings = hasBindings || Boolean(eventHeader || eventPayload);\n if (eventPayload) {\n if (member.isBlobSchema()) {\n out[name] = body;\n }\n else if (member.isStringSchema()) {\n out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body);\n }\n else if (member.isStructSchema()) {\n out[name] = await this.deserializer.read(member, body);\n }\n }\n else if (eventHeader) {\n const value = event[unionMember].headers[name]?.value;\n if (value != null) {\n if (member.isNumericSchema()) {\n if (value && typeof value === \"object\" && \"bytes\" in value) {\n out[name] = BigInt(value.toString());\n }\n else {\n out[name] = Number(value);\n }\n }\n else {\n out[name] = value;\n }\n }\n }\n }\n if (hasBindings) {\n return {\n [unionMember]: out,\n };\n }\n if (body.byteLength === 0) {\n return {\n [unionMember]: {},\n };\n }\n }\n return {\n [unionMember]: await this.deserializer.read(eventStreamSchema, body),\n };\n }\n else {\n return {\n $unknown: event,\n };\n }\n });\n const asyncIterator = asyncIterable[Symbol.asyncIterator]();\n const firstEvent = await asyncIterator.next();\n if (firstEvent.done) {\n return asyncIterable;\n }\n if (firstEvent.value?.[initialResponseMarker]) {\n if (!responseSchema) {\n throw new Error(\"@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.\");\n }\n for (const [key, value] of Object.entries(firstEvent.value)) {\n initialResponseContainer[key] = value;\n }\n }\n return {\n async *[Symbol.asyncIterator]() {\n if (!firstEvent?.value?.[initialResponseMarker]) {\n yield firstEvent.value;\n }\n while (true) {\n const { done, value } = await asyncIterator.next();\n if (done) {\n break;\n }\n yield value;\n }\n },\n };\n }\n writeEventBody(unionMember, unionSchema, event) {\n const serializer = this.serializer;\n let eventType = unionMember;\n let explicitPayloadMember = null;\n let explicitPayloadContentType;\n const isKnownSchema = (() => {\n const struct = unionSchema.getSchema();\n return struct[4].includes(unionMember);\n })();\n const additionalHeaders = {};\n if (!isKnownSchema) {\n const [type, value] = event[unionMember];\n eventType = type;\n serializer.write(15, value);\n }\n else {\n const eventSchema = unionSchema.getMemberSchema(unionMember);\n if (eventSchema.isStructSchema()) {\n for (const [memberName, memberSchema] of eventSchema.structIterator()) {\n const { eventHeader, eventPayload } = memberSchema.getMergedTraits();\n if (eventPayload) {\n explicitPayloadMember = memberName;\n }\n else if (eventHeader) {\n const value = event[unionMember][memberName];\n let type = \"binary\";\n if (memberSchema.isNumericSchema()) {\n if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) {\n type = \"integer\";\n }\n else {\n type = \"long\";\n }\n }\n else if (memberSchema.isTimestampSchema()) {\n type = \"timestamp\";\n }\n else if (memberSchema.isStringSchema()) {\n type = \"string\";\n }\n else if (memberSchema.isBooleanSchema()) {\n type = \"boolean\";\n }\n if (value != null) {\n additionalHeaders[memberName] = {\n type,\n value,\n };\n delete event[unionMember][memberName];\n }\n }\n }\n if (explicitPayloadMember !== null) {\n const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember);\n if (payloadSchema.isBlobSchema()) {\n explicitPayloadContentType = \"application/octet-stream\";\n }\n else if (payloadSchema.isStringSchema()) {\n explicitPayloadContentType = \"text/plain\";\n }\n serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]);\n }\n else {\n serializer.write(eventSchema, event[unionMember]);\n }\n }\n else if (eventSchema.isUnitSchema()) {\n serializer.write(eventSchema, {});\n }\n else {\n throw new Error(\"@smithy/core/event-streams - non-struct member not supported in event stream union.\");\n }\n }\n const messageSerialization = serializer.flush() ?? new Uint8Array();\n const body = typeof messageSerialization === \"string\"\n ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization)\n : messageSerialization;\n return {\n body,\n eventType,\n explicitPayloadContentType,\n additionalHeaders,\n };\n }\n}\n", "export * from \"./EventStreamSerde\";\n", "import { NormalizedSchema, translateTraits, TypeRegistry } from \"@smithy/core/schema\";\nimport { HttpRequest, HttpResponse } from \"@smithy/protocol-http\";\nimport { SerdeContext } from \"./SerdeContext\";\nexport class HttpProtocol extends SerdeContext {\n options;\n compositeErrorRegistry;\n constructor(options) {\n super();\n this.options = options;\n this.compositeErrorRegistry = TypeRegistry.for(options.defaultNamespace);\n for (const etr of options.errorTypeRegistries ?? []) {\n this.compositeErrorRegistry.copyFrom(etr);\n }\n }\n getRequestType() {\n return HttpRequest;\n }\n getResponseType() {\n return HttpResponse;\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n this.serializer.setSerdeContext(serdeContext);\n this.deserializer.setSerdeContext(serdeContext);\n if (this.getPayloadCodec()) {\n this.getPayloadCodec().setSerdeContext(serdeContext);\n }\n }\n updateServiceEndpoint(request, endpoint) {\n if (\"url\" in endpoint) {\n request.protocol = endpoint.url.protocol;\n request.hostname = endpoint.url.hostname;\n request.port = endpoint.url.port ? Number(endpoint.url.port) : undefined;\n request.path = endpoint.url.pathname;\n request.fragment = endpoint.url.hash || void 0;\n request.username = endpoint.url.username || void 0;\n request.password = endpoint.url.password || void 0;\n if (!request.query) {\n request.query = {};\n }\n for (const [k, v] of endpoint.url.searchParams.entries()) {\n request.query[k] = v;\n }\n if (endpoint.headers) {\n for (const [name, values] of Object.entries(endpoint.headers)) {\n request.headers[name] = values.join(\", \");\n }\n }\n return request;\n }\n else {\n request.protocol = endpoint.protocol;\n request.hostname = endpoint.hostname;\n request.port = endpoint.port ? Number(endpoint.port) : undefined;\n request.path = endpoint.path;\n request.query = {\n ...endpoint.query,\n };\n if (endpoint.headers) {\n for (const [name, value] of Object.entries(endpoint.headers)) {\n request.headers[name] = value;\n }\n }\n return request;\n }\n }\n setHostPrefix(request, operationSchema, input) {\n if (this.serdeContext?.disableHostPrefix) {\n return;\n }\n const inputNs = NormalizedSchema.of(operationSchema.input);\n const opTraits = translateTraits(operationSchema.traits ?? {});\n if (opTraits.endpoint) {\n let hostPrefix = opTraits.endpoint?.[0];\n if (typeof hostPrefix === \"string\") {\n const hostLabelInputs = [...inputNs.structIterator()].filter(([, member]) => member.getMergedTraits().hostLabel);\n for (const [name] of hostLabelInputs) {\n const replacement = input[name];\n if (typeof replacement !== \"string\") {\n throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);\n }\n hostPrefix = hostPrefix.replace(`{${name}}`, replacement);\n }\n request.hostname = hostPrefix + request.hostname;\n }\n }\n }\n deserializeMetadata(output) {\n return {\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n };\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const eventStreamSerde = await this.loadEventStreamCapability();\n return eventStreamSerde.serializeEventStream({\n eventStream,\n requestSchema,\n initialRequest,\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const eventStreamSerde = await this.loadEventStreamCapability();\n return eventStreamSerde.deserializeEventStream({\n response,\n responseSchema,\n initialResponseContainer,\n });\n }\n async loadEventStreamCapability() {\n const { EventStreamSerde } = await import(\"@smithy/core/event-streams\");\n return new EventStreamSerde({\n marshaller: this.getEventStreamMarshaller(),\n serializer: this.serializer,\n deserializer: this.deserializer,\n serdeContext: this.serdeContext,\n defaultContentType: this.getDefaultContentType(),\n });\n }\n getDefaultContentType() {\n throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);\n }\n async deserializeHttpMessage(schema, context, response, arg4, arg5) {\n void schema;\n void context;\n void response;\n void arg4;\n void arg5;\n return [];\n }\n getEventStreamMarshaller() {\n const context = this.serdeContext;\n if (!context.eventStreamMarshaller) {\n throw new Error(\"@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.\");\n }\n return context.eventStreamMarshaller;\n }\n}\n", "import { NormalizedSchema, translateTraits } from \"@smithy/core/schema\";\nimport { splitEvery, splitHeader } from \"@smithy/core/serde\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { sdkStreamMixin } from \"@smithy/util-stream\";\nimport { collectBody } from \"./collect-stream-body\";\nimport { extendedEncodeURIComponent } from \"./extended-encode-uri-component\";\nimport { HttpProtocol } from \"./HttpProtocol\";\nexport class HttpBindingProtocol extends HttpProtocol {\n async serializeRequest(operationSchema, _input, context) {\n const input = {\n ...(_input ?? {}),\n };\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = NormalizedSchema.of(operationSchema?.input);\n const payloadMemberNames = [];\n const payloadMemberSchemas = [];\n let hasNonHttpBindingMember = false;\n let payload;\n const request = new HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: undefined,\n path: \"\",\n fragment: undefined,\n query: query,\n headers: headers,\n body: undefined,\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n const opTraits = translateTraits(operationSchema.traits);\n if (opTraits.http) {\n request.method = opTraits.http[0];\n const [path, search] = opTraits.http[1].split(\"?\");\n if (request.path == \"/\") {\n request.path = path;\n }\n else {\n request.path += path;\n }\n const traitSearchParams = new URLSearchParams(search ?? \"\");\n Object.assign(query, Object.fromEntries(traitSearchParams));\n }\n }\n for (const [memberName, memberNs] of ns.structIterator()) {\n const memberTraits = memberNs.getMergedTraits() ?? {};\n const inputMemberValue = input[memberName];\n if (inputMemberValue == null && !memberNs.isIdempotencyToken()) {\n if (memberTraits.httpLabel) {\n if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) {\n throw new Error(`No value provided for input HTTP label: ${memberName}.`);\n }\n }\n continue;\n }\n if (memberTraits.httpPayload) {\n const isStreaming = memberNs.isStreaming();\n if (isStreaming) {\n const isEventStream = memberNs.isStructSchema();\n if (isEventStream) {\n if (input[memberName]) {\n payload = await this.serializeEventStream({\n eventStream: input[memberName],\n requestSchema: ns,\n });\n }\n }\n else {\n payload = inputMemberValue;\n }\n }\n else {\n serializer.write(memberNs, inputMemberValue);\n payload = serializer.flush();\n }\n delete input[memberName];\n }\n else if (memberTraits.httpLabel) {\n serializer.write(memberNs, inputMemberValue);\n const replacement = serializer.flush();\n if (request.path.includes(`{${memberName}+}`)) {\n request.path = request.path.replace(`{${memberName}+}`, replacement.split(\"/\").map(extendedEncodeURIComponent).join(\"/\"));\n }\n else if (request.path.includes(`{${memberName}}`)) {\n request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));\n }\n delete input[memberName];\n }\n else if (memberTraits.httpHeader) {\n serializer.write(memberNs, inputMemberValue);\n headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());\n delete input[memberName];\n }\n else if (typeof memberTraits.httpPrefixHeaders === \"string\") {\n for (const [key, val] of Object.entries(inputMemberValue)) {\n const amalgam = memberTraits.httpPrefixHeaders + key;\n serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);\n headers[amalgam.toLowerCase()] = serializer.flush();\n }\n delete input[memberName];\n }\n else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {\n this.serializeQuery(memberNs, inputMemberValue, query);\n delete input[memberName];\n }\n else {\n hasNonHttpBindingMember = true;\n payloadMemberNames.push(memberName);\n payloadMemberSchemas.push(memberNs);\n }\n }\n if (hasNonHttpBindingMember && input) {\n const [namespace, name] = (ns.getName(true) ?? \"#Unknown\").split(\"#\");\n const requiredMembers = ns.getSchema()[6];\n const payloadSchema = [\n 3,\n namespace,\n name,\n ns.getMergedTraits(),\n payloadMemberNames,\n payloadMemberSchemas,\n undefined,\n ];\n if (requiredMembers) {\n payloadSchema[6] = requiredMembers;\n }\n else {\n payloadSchema.pop();\n }\n serializer.write(payloadSchema, input);\n payload = serializer.flush();\n }\n request.headers = headers;\n request.query = query;\n request.body = payload;\n return request;\n }\n serializeQuery(ns, data, query) {\n const serializer = this.serializer;\n const traits = ns.getMergedTraits();\n if (traits.httpQueryParams) {\n for (const [key, val] of Object.entries(data)) {\n if (!(key in query)) {\n const valueSchema = ns.getValueSchema();\n Object.assign(valueSchema.getMergedTraits(), {\n ...traits,\n httpQuery: key,\n httpQueryParams: undefined,\n });\n this.serializeQuery(valueSchema, val, query);\n }\n }\n return;\n }\n if (ns.isListSchema()) {\n const sparse = !!ns.getMergedTraits().sparse;\n const buffer = [];\n for (const item of data) {\n serializer.write([ns.getValueSchema(), traits], item);\n const serializable = serializer.flush();\n if (sparse || serializable !== undefined) {\n buffer.push(serializable);\n }\n }\n query[traits.httpQuery] = buffer;\n }\n else {\n serializer.write([ns, traits], data);\n query[traits.httpQuery] = serializer.flush();\n }\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - HTTP Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);\n if (nonHttpBindingMembers.length) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n const dataFromBody = await deserializer.read(ns, bytes);\n for (const member of nonHttpBindingMembers) {\n if (dataFromBody[member] != null) {\n dataObject[member] = dataFromBody[member];\n }\n }\n }\n }\n else if (nonHttpBindingMembers.discardResponseBody) {\n await collectBody(response.body, context);\n }\n dataObject.$metadata = this.deserializeMetadata(response);\n return dataObject;\n }\n async deserializeHttpMessage(schema, context, response, arg4, arg5) {\n let dataObject;\n if (arg4 instanceof Set) {\n dataObject = arg5;\n }\n else {\n dataObject = arg4;\n }\n let discardResponseBody = true;\n const deserializer = this.deserializer;\n const ns = NormalizedSchema.of(schema);\n const nonHttpBindingMembers = [];\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const memberTraits = memberSchema.getMemberTraits();\n if (memberTraits.httpPayload) {\n discardResponseBody = false;\n const isStreaming = memberSchema.isStreaming();\n if (isStreaming) {\n const isEventStream = memberSchema.isStructSchema();\n if (isEventStream) {\n dataObject[memberName] = await this.deserializeEventStream({\n response,\n responseSchema: ns,\n });\n }\n else {\n dataObject[memberName] = sdkStreamMixin(response.body);\n }\n }\n else if (response.body) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n dataObject[memberName] = await deserializer.read(memberSchema, bytes);\n }\n }\n }\n else if (memberTraits.httpHeader) {\n const key = String(memberTraits.httpHeader).toLowerCase();\n const value = response.headers[key];\n if (null != value) {\n if (memberSchema.isListSchema()) {\n const headerListValueSchema = memberSchema.getValueSchema();\n headerListValueSchema.getMergedTraits().httpHeader = key;\n let sections;\n if (headerListValueSchema.isTimestampSchema() &&\n headerListValueSchema.getSchema() === 4) {\n sections = splitEvery(value, \",\", 2);\n }\n else {\n sections = splitHeader(value);\n }\n const list = [];\n for (const section of sections) {\n list.push(await deserializer.read(headerListValueSchema, section.trim()));\n }\n dataObject[memberName] = list;\n }\n else {\n dataObject[memberName] = await deserializer.read(memberSchema, value);\n }\n }\n }\n else if (memberTraits.httpPrefixHeaders !== undefined) {\n dataObject[memberName] = {};\n for (const [header, value] of Object.entries(response.headers)) {\n if (header.startsWith(memberTraits.httpPrefixHeaders)) {\n const valueSchema = memberSchema.getValueSchema();\n valueSchema.getMergedTraits().httpHeader = header;\n dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);\n }\n }\n }\n else if (memberTraits.httpResponseCode) {\n dataObject[memberName] = response.statusCode;\n }\n else {\n nonHttpBindingMembers.push(memberName);\n }\n }\n nonHttpBindingMembers.discardResponseBody = discardResponseBody;\n return nonHttpBindingMembers;\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { collectBody } from \"./collect-stream-body\";\nimport { HttpProtocol } from \"./HttpProtocol\";\nexport class RpcProtocol extends HttpProtocol {\n async serializeRequest(operationSchema, input, context) {\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = NormalizedSchema.of(operationSchema?.input);\n const schema = ns.getSchema();\n let payload;\n const request = new HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: undefined,\n path: \"/\",\n fragment: undefined,\n query: query,\n headers: headers,\n body: undefined,\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n }\n const _input = {\n ...input,\n };\n if (input) {\n const eventStreamMember = ns.getEventStreamMember();\n if (eventStreamMember) {\n if (_input[eventStreamMember]) {\n const initialRequest = {};\n for (const [memberName, memberSchema] of ns.structIterator()) {\n if (memberName !== eventStreamMember && _input[memberName]) {\n serializer.write(memberSchema, _input[memberName]);\n initialRequest[memberName] = serializer.flush();\n }\n }\n payload = await this.serializeEventStream({\n eventStream: _input[eventStreamMember],\n requestSchema: ns,\n initialRequest,\n });\n }\n }\n else {\n serializer.write(schema, _input);\n payload = serializer.flush();\n }\n }\n request.headers = Object.assign(request.headers, headers);\n request.query = query;\n request.body = payload;\n request.method = \"POST\";\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - RPC Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const eventStreamMember = ns.getEventStreamMember();\n if (eventStreamMember) {\n dataObject[eventStreamMember] = await this.deserializeEventStream({\n response,\n responseSchema: ns,\n initialResponseContainer: dataObject,\n });\n }\n else {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(ns, bytes));\n }\n }\n dataObject.$metadata = this.deserializeMetadata(response);\n return dataObject;\n }\n}\n", "import { extendedEncodeURIComponent } from \"./extended-encode-uri-component\";\nexport const resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {\n if (input != null && input[memberName] !== undefined) {\n const labelValue = labelValueProvider();\n if (labelValue == null || labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: \" + memberName + \".\");\n }\n resolvedPath = resolvedPath.replace(uriLabel, isGreedyLabel\n ? labelValue\n .split(\"/\")\n .map((segment) => extendedEncodeURIComponent(segment))\n .join(\"/\")\n : extendedEncodeURIComponent(labelValue));\n }\n else {\n throw new Error(\"No value provided for input HTTP label: \" + memberName + \".\");\n }\n return resolvedPath;\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { resolvedPath } from \"./resolve-path\";\nexport function requestBuilder(input, context) {\n return new RequestBuilder(input, context);\n}\nexport class RequestBuilder {\n input;\n context;\n query = {};\n method = \"\";\n headers = {};\n path = \"\";\n body = null;\n hostname = \"\";\n resolvePathStack = [];\n constructor(input, context) {\n this.input = input;\n this.context = context;\n }\n async build() {\n const { hostname, protocol = \"https\", port, path: basePath } = await this.context.endpoint();\n this.path = basePath;\n for (const resolvePath of this.resolvePathStack) {\n resolvePath(this.path);\n }\n return new HttpRequest({\n protocol,\n hostname: this.hostname || hostname,\n port,\n method: this.method,\n path: this.path,\n query: this.query,\n body: this.body,\n headers: this.headers,\n });\n }\n hn(hostname) {\n this.hostname = hostname;\n return this;\n }\n bp(uriLabel) {\n this.resolvePathStack.push((basePath) => {\n this.path = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + uriLabel;\n });\n return this;\n }\n p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {\n this.resolvePathStack.push((path) => {\n this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);\n });\n return this;\n }\n h(headers) {\n this.headers = headers;\n return this;\n }\n q(query) {\n this.query = query;\n return this;\n }\n b(body) {\n this.body = body;\n return this;\n }\n m(method) {\n this.method = method;\n return this;\n }\n}\n", "export function determineTimestampFormat(ns, settings) {\n if (settings.timestampFormat.useTrait) {\n if (ns.isTimestampSchema() &&\n (ns.getSchema() === 5 ||\n ns.getSchema() === 6 ||\n ns.getSchema() === 7)) {\n return ns.getSchema();\n }\n }\n const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits();\n const bindingFormat = settings.httpBindings\n ? typeof httpPrefixHeaders === \"string\" || Boolean(httpHeader)\n ? 6\n : Boolean(httpQuery) || Boolean(httpLabel)\n ? 5\n : undefined\n : undefined;\n return bindingFormat ?? settings.timestampFormat.default;\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime, LazyJsonString, NumericValue, splitHeader, } from \"@smithy/core/serde\";\nimport { fromBase64 } from \"@smithy/util-base64\";\nimport { toUtf8 } from \"@smithy/util-utf8\";\nimport { SerdeContext } from \"../SerdeContext\";\nimport { determineTimestampFormat } from \"./determineTimestampFormat\";\nexport class FromStringShapeDeserializer extends SerdeContext {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n read(_schema, data) {\n const ns = NormalizedSchema.of(_schema);\n if (ns.isListSchema()) {\n return splitHeader(data).map((item) => this.read(ns.getValueSchema(), item));\n }\n if (ns.isBlobSchema()) {\n return (this.serdeContext?.base64Decoder ?? fromBase64)(data);\n }\n if (ns.isTimestampSchema()) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return _parseRfc3339DateTimeWithOffset(data);\n case 6:\n return _parseRfc7231DateTime(data);\n case 7:\n return _parseEpochTimestamp(data);\n default:\n console.warn(\"Missing timestamp format, parsing value with Date constructor:\", data);\n return new Date(data);\n }\n }\n if (ns.isStringSchema()) {\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = data;\n if (mediaType) {\n if (ns.getMergedTraits().httpHeader) {\n intermediateValue = this.base64ToUtf8(intermediateValue);\n }\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = LazyJsonString.from(intermediateValue);\n }\n return intermediateValue;\n }\n }\n if (ns.isNumericSchema()) {\n return Number(data);\n }\n if (ns.isBigIntegerSchema()) {\n return BigInt(data);\n }\n if (ns.isBigDecimalSchema()) {\n return new NumericValue(data, \"bigDecimal\");\n }\n if (ns.isBooleanSchema()) {\n return String(data).toLowerCase() === \"true\";\n }\n return data;\n }\n base64ToUtf8(base64String) {\n return (this.serdeContext?.utf8Encoder ?? toUtf8)((this.serdeContext?.base64Decoder ?? fromBase64)(base64String));\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { fromUtf8, toUtf8 } from \"@smithy/util-utf8\";\nimport { SerdeContext } from \"../SerdeContext\";\nimport { FromStringShapeDeserializer } from \"./FromStringShapeDeserializer\";\nexport class HttpInterceptingShapeDeserializer extends SerdeContext {\n codecDeserializer;\n stringDeserializer;\n constructor(codecDeserializer, codecSettings) {\n super();\n this.codecDeserializer = codecDeserializer;\n this.stringDeserializer = new FromStringShapeDeserializer(codecSettings);\n }\n setSerdeContext(serdeContext) {\n this.stringDeserializer.setSerdeContext(serdeContext);\n this.codecDeserializer.setSerdeContext(serdeContext);\n this.serdeContext = serdeContext;\n }\n read(schema, data) {\n const ns = NormalizedSchema.of(schema);\n const traits = ns.getMergedTraits();\n const toString = this.serdeContext?.utf8Encoder ?? toUtf8;\n if (traits.httpHeader || traits.httpResponseCode) {\n return this.stringDeserializer.read(ns, toString(data));\n }\n if (traits.httpPayload) {\n if (ns.isBlobSchema()) {\n const toBytes = this.serdeContext?.utf8Decoder ?? fromUtf8;\n if (typeof data === \"string\") {\n return toBytes(data);\n }\n return data;\n }\n else if (ns.isStringSchema()) {\n if (\"byteLength\" in data) {\n return toString(data);\n }\n return data;\n }\n }\n return this.codecDeserializer.read(ns, data);\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { dateToUtcString, generateIdempotencyToken, LazyJsonString, quoteHeader } from \"@smithy/core/serde\";\nimport { toBase64 } from \"@smithy/util-base64\";\nimport { SerdeContext } from \"../SerdeContext\";\nimport { determineTimestampFormat } from \"./determineTimestampFormat\";\nexport class ToStringShapeSerializer extends SerdeContext {\n settings;\n stringBuffer = \"\";\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value) {\n const ns = NormalizedSchema.of(schema);\n switch (typeof value) {\n case \"object\":\n if (value === null) {\n this.stringBuffer = \"null\";\n return;\n }\n if (ns.isTimestampSchema()) {\n if (!(value instanceof Date)) {\n throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`);\n }\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n this.stringBuffer = value.toISOString().replace(\".000Z\", \"Z\");\n break;\n case 6:\n this.stringBuffer = dateToUtcString(value);\n break;\n case 7:\n this.stringBuffer = String(value.getTime() / 1000);\n break;\n default:\n console.warn(\"Missing timestamp format, using epoch seconds\", value);\n this.stringBuffer = String(value.getTime() / 1000);\n }\n return;\n }\n if (ns.isBlobSchema() && \"byteLength\" in value) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(value);\n return;\n }\n if (ns.isListSchema() && Array.isArray(value)) {\n let buffer = \"\";\n for (const item of value) {\n this.write([ns.getValueSchema(), ns.getMergedTraits()], item);\n const headerItem = this.flush();\n const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : quoteHeader(headerItem);\n if (buffer !== \"\") {\n buffer += \", \";\n }\n buffer += serialized;\n }\n this.stringBuffer = buffer;\n return;\n }\n this.stringBuffer = JSON.stringify(value, null, 2);\n break;\n case \"string\":\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = value;\n if (mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = LazyJsonString.from(intermediateValue);\n }\n if (ns.getMergedTraits().httpHeader) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(intermediateValue.toString());\n return;\n }\n }\n this.stringBuffer = value;\n break;\n default:\n if (ns.isIdempotencyToken()) {\n this.stringBuffer = generateIdempotencyToken();\n }\n else {\n this.stringBuffer = String(value);\n }\n }\n }\n flush() {\n const buffer = this.stringBuffer;\n this.stringBuffer = \"\";\n return buffer;\n }\n}\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nimport { ToStringShapeSerializer } from \"./ToStringShapeSerializer\";\nexport class HttpInterceptingShapeSerializer {\n codecSerializer;\n stringSerializer;\n buffer;\n constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) {\n this.codecSerializer = codecSerializer;\n this.stringSerializer = stringSerializer;\n }\n setSerdeContext(serdeContext) {\n this.codecSerializer.setSerdeContext(serdeContext);\n this.stringSerializer.setSerdeContext(serdeContext);\n }\n write(schema, value) {\n const ns = NormalizedSchema.of(schema);\n const traits = ns.getMergedTraits();\n if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {\n this.stringSerializer.write(ns, value);\n this.buffer = this.stringSerializer.flush();\n return;\n }\n return this.codecSerializer.write(ns, value);\n }\n flush() {\n if (this.buffer !== undefined) {\n const buffer = this.buffer;\n this.buffer = undefined;\n return buffer;\n }\n return this.codecSerializer.flush();\n }\n}\n", "export * from \"./collect-stream-body\";\nexport * from \"./extended-encode-uri-component\";\nexport * from \"./HttpBindingProtocol\";\nexport * from \"./HttpProtocol\";\nexport * from \"./RpcProtocol\";\nexport * from \"./requestBuilder\";\nexport * from \"./resolve-path\";\nexport * from \"./serde/FromStringShapeDeserializer\";\nexport * from \"./serde/HttpInterceptingShapeDeserializer\";\nexport * from \"./serde/HttpInterceptingShapeSerializer\";\nexport * from \"./serde/ToStringShapeSerializer\";\nexport * from \"./serde/determineTimestampFormat\";\nexport * from \"./SerdeContext\";\n", "export { requestBuilder } from \"@smithy/core/protocols\";\n", "export function setFeature(context, feature, value) {\n if (!context.__smithy_context) {\n context.__smithy_context = {\n features: {},\n };\n }\n else if (!context.__smithy_context.features) {\n context.__smithy_context.features = {};\n }\n context.__smithy_context.features[feature] = value;\n}\n", "export class DefaultIdentityProviderConfig {\n authSchemes = new Map();\n constructor(config) {\n for (const [key, value] of Object.entries(config)) {\n if (value !== undefined) {\n this.authSchemes.set(key, value);\n }\n }\n }\n getIdentityProvider(schemeId) {\n return this.authSchemes.get(schemeId);\n }\n}\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { HttpApiKeyAuthLocation } from \"@smithy/types\";\nexport class HttpApiKeyAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n if (!signingProperties) {\n throw new Error(\"request could not be signed with `apiKey` since the `name` and `in` signer properties are missing\");\n }\n if (!signingProperties.name) {\n throw new Error(\"request could not be signed with `apiKey` since the `name` signer property is missing\");\n }\n if (!signingProperties.in) {\n throw new Error(\"request could not be signed with `apiKey` since the `in` signer property is missing\");\n }\n if (!identity.apiKey) {\n throw new Error(\"request could not be signed with `apiKey` since the `apiKey` is not defined\");\n }\n const clonedRequest = HttpRequest.clone(httpRequest);\n if (signingProperties.in === HttpApiKeyAuthLocation.QUERY) {\n clonedRequest.query[signingProperties.name] = identity.apiKey;\n }\n else if (signingProperties.in === HttpApiKeyAuthLocation.HEADER) {\n clonedRequest.headers[signingProperties.name] = signingProperties.scheme\n ? `${signingProperties.scheme} ${identity.apiKey}`\n : identity.apiKey;\n }\n else {\n throw new Error(\"request can only be signed with `apiKey` locations `query` or `header`, \" +\n \"but found: `\" +\n signingProperties.in +\n \"`\");\n }\n return clonedRequest;\n }\n}\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nexport class HttpBearerAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n const clonedRequest = HttpRequest.clone(httpRequest);\n if (!identity.token) {\n throw new Error(\"request could not be signed with `token` since the `token` is not defined\");\n }\n clonedRequest.headers[\"Authorization\"] = `Bearer ${identity.token}`;\n return clonedRequest;\n }\n}\n", "export class NoAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n return httpRequest;\n }\n}\n", "export * from \"./httpApiKeyAuth\";\nexport * from \"./httpBearerAuth\";\nexport * from \"./noAuth\";\n", "export const createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired(identity) {\n return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs;\n};\nexport const EXPIRATION_MS = 300_000;\nexport const isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);\nexport const doesIdentityRequireRefresh = (identity) => identity.expiration !== undefined;\nexport const memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => {\n if (provider === undefined) {\n return undefined;\n }\n const normalizedProvider = typeof provider !== \"function\" ? async () => Promise.resolve(provider) : provider;\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = async (options) => {\n if (!pending) {\n pending = normalizedProvider(options);\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n }\n finally {\n pending = undefined;\n }\n return resolved;\n };\n if (isExpired === undefined) {\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider(options);\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider(options);\n }\n if (isConstant) {\n return resolved;\n }\n if (!requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider(options);\n return resolved;\n }\n return resolved;\n };\n};\n", "export * from \"./DefaultIdentityProviderConfig\";\nexport * from \"./httpAuthSchemes\";\nexport * from \"./memoizeIdentityProvider\";\n", "export * from \"./getSmithyContext\";\nexport * from \"./middleware-http-auth-scheme\";\nexport * from \"./middleware-http-signing\";\nexport * from \"./normalizeProvider\";\nexport { createPaginator } from \"./pagination/createPaginator\";\nexport * from \"./request-builder/requestBuilder\";\nexport * from \"./setFeature\";\nexport * from \"./util-identity-and-auth\";\n", "export class ProviderError extends Error {\n name = \"ProviderError\";\n tryNextLink;\n constructor(message, options = true) {\n let logger;\n let tryNextLink = true;\n if (typeof options === \"boolean\") {\n logger = undefined;\n tryNextLink = options;\n }\n else if (options != null && typeof options === \"object\") {\n logger = options.logger;\n tryNextLink = options.tryNextLink ?? true;\n }\n super(message);\n this.tryNextLink = tryNextLink;\n Object.setPrototypeOf(this, ProviderError.prototype);\n logger?.debug?.(`@smithy/property-provider ${tryNextLink ? \"->\" : \"(!)\"} ${message}`);\n }\n static from(error, options = true) {\n return Object.assign(new this(error.message, options), error);\n }\n}\n", "import { ProviderError } from \"./ProviderError\";\nexport class CredentialsProviderError extends ProviderError {\n name = \"CredentialsProviderError\";\n constructor(message, options = true) {\n super(message, options);\n Object.setPrototypeOf(this, CredentialsProviderError.prototype);\n }\n}\n", "import { ProviderError } from \"./ProviderError\";\nexport class TokenProviderError extends ProviderError {\n name = \"TokenProviderError\";\n constructor(message, options = true) {\n super(message, options);\n Object.setPrototypeOf(this, TokenProviderError.prototype);\n }\n}\n", "import { ProviderError } from \"./ProviderError\";\nexport const chain = (...providers) => async () => {\n if (providers.length === 0) {\n throw new ProviderError(\"No providers in chain\");\n }\n let lastProviderError;\n for (const provider of providers) {\n try {\n const credentials = await provider();\n return credentials;\n }\n catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n};\n", "export const fromStatic = (staticValue) => () => Promise.resolve(staticValue);\n", "export const memoize = (provider, isExpired, requiresRefresh) => {\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = async () => {\n if (!pending) {\n pending = provider();\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n }\n finally {\n pending = undefined;\n }\n return resolved;\n };\n if (isExpired === undefined) {\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider();\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider();\n }\n if (isConstant) {\n return resolved;\n }\n if (requiresRefresh && !requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider();\n return resolved;\n }\n return resolved;\n };\n};\n", "export * from \"./CredentialsProviderError\";\nexport * from \"./ProviderError\";\nexport * from \"./TokenProviderError\";\nexport * from \"./chain\";\nexport * from \"./fromStatic\";\nexport * from \"./memoize\";\n", "import { normalizeProvider } from \"@smithy/core\";\nimport { ProviderError } from \"@smithy/property-provider\";\nexport const resolveAwsSdkSigV4AConfig = (config) => {\n config.sigv4aSigningRegionSet = normalizeProvider(config.sigv4aSigningRegionSet);\n return config;\n};\nexport const NODE_SIGV4A_CONFIG_OPTIONS = {\n environmentVariableSelector(env) {\n if (env.AWS_SIGV4A_SIGNING_REGION_SET) {\n return env.AWS_SIGV4A_SIGNING_REGION_SET.split(\",\").map((_) => _.trim());\n }\n throw new ProviderError(\"AWS_SIGV4A_SIGNING_REGION_SET not set in env.\", {\n tryNextLink: true,\n });\n },\n configFileSelector(profile) {\n if (profile.sigv4a_signing_region_set) {\n return (profile.sigv4a_signing_region_set ?? \"\").split(\",\").map((_) => _.trim());\n }\n throw new ProviderError(\"sigv4a_signing_region_set not set in profile.\", {\n tryNextLink: true,\n });\n },\n default: undefined,\n};\n", "export const ALGORITHM_QUERY_PARAM = \"X-Amz-Algorithm\";\nexport const CREDENTIAL_QUERY_PARAM = \"X-Amz-Credential\";\nexport const AMZ_DATE_QUERY_PARAM = \"X-Amz-Date\";\nexport const SIGNED_HEADERS_QUERY_PARAM = \"X-Amz-SignedHeaders\";\nexport const EXPIRES_QUERY_PARAM = \"X-Amz-Expires\";\nexport const SIGNATURE_QUERY_PARAM = \"X-Amz-Signature\";\nexport const TOKEN_QUERY_PARAM = \"X-Amz-Security-Token\";\nexport const REGION_SET_PARAM = \"X-Amz-Region-Set\";\nexport const AUTH_HEADER = \"authorization\";\nexport const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();\nexport const DATE_HEADER = \"date\";\nexport const GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];\nexport const SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();\nexport const SHA256_HEADER = \"x-amz-content-sha256\";\nexport const TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();\nexport const HOST_HEADER = \"host\";\nexport const ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n \"cache-control\": true,\n connection: true,\n expect: true,\n from: true,\n \"keep-alive\": true,\n \"max-forwards\": true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n \"transfer-encoding\": true,\n upgrade: true,\n \"user-agent\": true,\n \"x-amzn-trace-id\": true,\n};\nexport const PROXY_HEADER_PATTERN = /^proxy-/;\nexport const SEC_HEADER_PATTERN = /^sec-/;\nexport const UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i];\nexport const ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256\";\nexport const ALGORITHM_IDENTIFIER_V4A = \"AWS4-ECDSA-P256-SHA256\";\nexport const EVENT_ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256-PAYLOAD\";\nexport const UNSIGNED_PAYLOAD = \"UNSIGNED-PAYLOAD\";\nexport const MAX_CACHE_SIZE = 50;\nexport const KEY_TYPE_IDENTIFIER = \"aws4_request\";\nexport const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;\n", "import { toHex } from \"@smithy/util-hex-encoding\";\nimport { toUint8Array } from \"@smithy/util-utf8\";\nimport { KEY_TYPE_IDENTIFIER, MAX_CACHE_SIZE } from \"./constants\";\nconst signingKeyCache = {};\nconst cacheQueue = [];\nexport const createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`;\nexport const getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => {\n const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);\n const cacheKey = `${shortDate}:${region}:${service}:${toHex(credsHash)}:${credentials.sessionToken}`;\n if (cacheKey in signingKeyCache) {\n return signingKeyCache[cacheKey];\n }\n cacheQueue.push(cacheKey);\n while (cacheQueue.length > MAX_CACHE_SIZE) {\n delete signingKeyCache[cacheQueue.shift()];\n }\n let key = `AWS4${credentials.secretAccessKey}`;\n for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) {\n key = await hmac(sha256Constructor, key, signable);\n }\n return (signingKeyCache[cacheKey] = key);\n};\nexport const clearCredentialCache = () => {\n cacheQueue.length = 0;\n Object.keys(signingKeyCache).forEach((cacheKey) => {\n delete signingKeyCache[cacheKey];\n });\n};\nconst hmac = (ctor, secret, data) => {\n const hash = new ctor(secret);\n hash.update(toUint8Array(data));\n return hash.digest();\n};\n", "import { ALWAYS_UNSIGNABLE_HEADERS, PROXY_HEADER_PATTERN, SEC_HEADER_PATTERN } from \"./constants\";\nexport const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => {\n const canonical = {};\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == undefined) {\n continue;\n }\n const canonicalHeaderName = headerName.toLowerCase();\n if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS ||\n unsignableHeaders?.has(canonicalHeaderName) ||\n PROXY_HEADER_PATTERN.test(canonicalHeaderName) ||\n SEC_HEADER_PATTERN.test(canonicalHeaderName)) {\n if (!signableHeaders || (signableHeaders && !signableHeaders.has(canonicalHeaderName))) {\n continue;\n }\n }\n canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\\s+/g, \" \");\n }\n return canonical;\n};\n", "export const isArrayBuffer = (arg) => (typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer) ||\n Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\";\n", "import { isArrayBuffer } from \"@smithy/is-array-buffer\";\nimport { toHex } from \"@smithy/util-hex-encoding\";\nimport { toUint8Array } from \"@smithy/util-utf8\";\nimport { SHA256_HEADER, UNSIGNED_PAYLOAD } from \"./constants\";\nexport const getPayloadHash = async ({ headers, body }, hashConstructor) => {\n for (const headerName of Object.keys(headers)) {\n if (headerName.toLowerCase() === SHA256_HEADER) {\n return headers[headerName];\n }\n }\n if (body == undefined) {\n return \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\";\n }\n else if (typeof body === \"string\" || ArrayBuffer.isView(body) || isArrayBuffer(body)) {\n const hashCtor = new hashConstructor();\n hashCtor.update(toUint8Array(body));\n return toHex(await hashCtor.digest());\n }\n return UNSIGNED_PAYLOAD;\n};\n", "import { fromHex, toHex } from \"@smithy/util-hex-encoding\";\nimport { fromUtf8 } from \"@smithy/util-utf8\";\nexport class HeaderFormatter {\n format(headers) {\n const chunks = [];\n for (const headerName of Object.keys(headers)) {\n const bytes = fromUtf8(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? 0 : 1]);\n case \"byte\":\n return Uint8Array.from([2, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, 3);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, 4);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = 5;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, 6);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = fromUtf8(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, 7);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = 8;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = 9;\n uuidBytes.set(fromHex(header.value.replace(/\\-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n}\nvar HEADER_VALUE_TYPE;\n(function (HEADER_VALUE_TYPE) {\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolTrue\"] = 0] = \"boolTrue\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolFalse\"] = 1] = \"boolFalse\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byte\"] = 2] = \"byte\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"short\"] = 3] = \"short\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"integer\"] = 4] = \"integer\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"long\"] = 5] = \"long\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byteArray\"] = 6] = \"byteArray\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"string\"] = 7] = \"string\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"timestamp\"] = 8] = \"timestamp\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"uuid\"] = 9] = \"uuid\";\n})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));\nconst UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\nexport class Int64 {\n bytes;\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static fromNumber(number) {\n if (number > 9_223_372_036_854_775_807 || number < -9_223_372_036_854_775_808) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new Int64(bytes);\n }\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 0b10000000;\n if (negative) {\n negate(bytes);\n }\n return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n}\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 0xff;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n", "export const hasHeader = (soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true;\n }\n }\n return false;\n};\nexport const getHeaderValue = (soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return headers[headerName];\n }\n }\n return undefined;\n};\nexport const deleteHeader = (soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n delete headers[headerName];\n }\n }\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nexport const moveHeadersToQuery = (request, options = {}) => {\n const { headers, query = {} } = HttpRequest.clone(request);\n for (const name of Object.keys(headers)) {\n const lname = name.toLowerCase();\n if ((lname.slice(0, 6) === \"x-amz-\" && !options.unhoistableHeaders?.has(lname)) ||\n options.hoistableHeaders?.has(lname)) {\n query[name] = headers[name];\n delete headers[name];\n }\n }\n return {\n ...request,\n headers,\n query,\n };\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { GENERATED_HEADERS } from \"./constants\";\nexport const prepareRequest = (request) => {\n request = HttpRequest.clone(request);\n for (const headerName of Object.keys(request.headers)) {\n if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName];\n }\n }\n return request;\n};\n", "import { escapeUri } from \"@smithy/util-uri-escape\";\nimport { SIGNATURE_HEADER } from \"./constants\";\nexport const getCanonicalQuery = ({ query = {} }) => {\n const keys = [];\n const serialized = {};\n for (const key of Object.keys(query)) {\n if (key.toLowerCase() === SIGNATURE_HEADER) {\n continue;\n }\n const encodedKey = escapeUri(key);\n keys.push(encodedKey);\n const value = query[key];\n if (typeof value === \"string\") {\n serialized[encodedKey] = `${encodedKey}=${escapeUri(value)}`;\n }\n else if (Array.isArray(value)) {\n serialized[encodedKey] = value\n .slice(0)\n .reduce((encoded, value) => encoded.concat([`${encodedKey}=${escapeUri(value)}`]), [])\n .sort()\n .join(\"&\");\n }\n }\n return keys\n .sort()\n .map((key) => serialized[key])\n .filter((serialized) => serialized)\n .join(\"&\");\n};\n", "export const iso8601 = (time) => toDate(time)\n .toISOString()\n .replace(/\\.\\d{3}Z$/, \"Z\");\nexport const toDate = (time) => {\n if (typeof time === \"number\") {\n return new Date(time * 1000);\n }\n if (typeof time === \"string\") {\n if (Number(time)) {\n return new Date(Number(time) * 1000);\n }\n return new Date(time);\n }\n return time;\n};\n", "import { toHex } from \"@smithy/util-hex-encoding\";\nimport { normalizeProvider } from \"@smithy/util-middleware\";\nimport { escapeUri } from \"@smithy/util-uri-escape\";\nimport { toUint8Array } from \"@smithy/util-utf8\";\nimport { getCanonicalQuery } from \"./getCanonicalQuery\";\nimport { iso8601 } from \"./utilDate\";\nexport class SignatureV4Base {\n service;\n regionProvider;\n credentialProvider;\n sha256;\n uriEscapePath;\n applyChecksum;\n constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) {\n this.service = service;\n this.sha256 = sha256;\n this.uriEscapePath = uriEscapePath;\n this.applyChecksum = typeof applyChecksum === \"boolean\" ? applyChecksum : true;\n this.regionProvider = normalizeProvider(region);\n this.credentialProvider = normalizeProvider(credentials);\n }\n createCanonicalRequest(request, canonicalHeaders, payloadHash) {\n const sortedHeaders = Object.keys(canonicalHeaders).sort();\n return `${request.method}\n${this.getCanonicalPath(request)}\n${getCanonicalQuery(request)}\n${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join(\"\\n\")}\n\n${sortedHeaders.join(\";\")}\n${payloadHash}`;\n }\n async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {\n const hash = new this.sha256();\n hash.update(toUint8Array(canonicalRequest));\n const hashedRequest = await hash.digest();\n return `${algorithmIdentifier}\n${longDate}\n${credentialScope}\n${toHex(hashedRequest)}`;\n }\n getCanonicalPath({ path }) {\n if (this.uriEscapePath) {\n const normalizedPathSegments = [];\n for (const pathSegment of path.split(\"/\")) {\n if (pathSegment?.length === 0)\n continue;\n if (pathSegment === \".\")\n continue;\n if (pathSegment === \"..\") {\n normalizedPathSegments.pop();\n }\n else {\n normalizedPathSegments.push(pathSegment);\n }\n }\n const normalizedPath = `${path?.startsWith(\"/\") ? \"/\" : \"\"}${normalizedPathSegments.join(\"/\")}${normalizedPathSegments.length > 0 && path?.endsWith(\"/\") ? \"/\" : \"\"}`;\n const doubleEncoded = escapeUri(normalizedPath);\n return doubleEncoded.replace(/%2F/g, \"/\");\n }\n return path;\n }\n validateResolvedCredentials(credentials) {\n if (typeof credentials !== \"object\" ||\n typeof credentials.accessKeyId !== \"string\" ||\n typeof credentials.secretAccessKey !== \"string\") {\n throw new Error(\"Resolved credential object is not valid\");\n }\n }\n formatDate(now) {\n const longDate = iso8601(now).replace(/[\\-:]/g, \"\");\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n };\n }\n getCanonicalHeaderList(headers) {\n return Object.keys(headers).sort().join(\";\");\n }\n}\n", "import { toHex } from \"@smithy/util-hex-encoding\";\nimport { toUint8Array } from \"@smithy/util-utf8\";\nimport { ALGORITHM_IDENTIFIER, ALGORITHM_QUERY_PARAM, AMZ_DATE_HEADER, AMZ_DATE_QUERY_PARAM, AUTH_HEADER, CREDENTIAL_QUERY_PARAM, EVENT_ALGORITHM_IDENTIFIER, EXPIRES_QUERY_PARAM, MAX_PRESIGNED_TTL, SHA256_HEADER, SIGNATURE_QUERY_PARAM, SIGNED_HEADERS_QUERY_PARAM, TOKEN_HEADER, TOKEN_QUERY_PARAM, } from \"./constants\";\nimport { createScope, getSigningKey } from \"./credentialDerivation\";\nimport { getCanonicalHeaders } from \"./getCanonicalHeaders\";\nimport { getPayloadHash } from \"./getPayloadHash\";\nimport { HeaderFormatter } from \"./HeaderFormatter\";\nimport { hasHeader } from \"./headerUtil\";\nimport { moveHeadersToQuery } from \"./moveHeadersToQuery\";\nimport { prepareRequest } from \"./prepareRequest\";\nimport { SignatureV4Base } from \"./SignatureV4Base\";\nexport class SignatureV4 extends SignatureV4Base {\n headerFormatter = new HeaderFormatter();\n constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) {\n super({\n applyChecksum,\n credentials,\n region,\n service,\n sha256,\n uriEscapePath,\n });\n }\n async presign(originalRequest, options = {}) {\n const { signingDate = new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService, } = options;\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? (await this.regionProvider());\n const { longDate, shortDate } = this.formatDate(signingDate);\n if (expiresIn > MAX_PRESIGNED_TTL) {\n return Promise.reject(\"Signature version 4 presigned URLs\" + \" must have an expiration date less than one week in\" + \" the future\");\n }\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders });\n if (credentials.sessionToken) {\n request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;\n }\n request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;\n request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;\n request.query[AMZ_DATE_QUERY_PARAM] = longDate;\n request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders);\n request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)));\n return request;\n }\n async sign(toSign, options) {\n if (typeof toSign === \"string\") {\n return this.signString(toSign, options);\n }\n else if (toSign.headers && toSign.payload) {\n return this.signEvent(toSign, options);\n }\n else if (toSign.message) {\n return this.signMessage(toSign, options);\n }\n else {\n return this.signRequest(toSign, options);\n }\n }\n async signEvent({ headers, payload }, { signingDate = new Date(), priorSignature, signingRegion, signingService }) {\n const region = signingRegion ?? (await this.regionProvider());\n const { shortDate, longDate } = this.formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256);\n const hash = new this.sha256();\n hash.update(headers);\n const hashedHeaders = toHex(await hash.digest());\n const stringToSign = [\n EVENT_ALGORITHM_IDENTIFIER,\n longDate,\n scope,\n priorSignature,\n hashedHeaders,\n hashedPayload,\n ].join(\"\\n\");\n return this.signString(stringToSign, { signingDate, signingRegion: region, signingService });\n }\n async signMessage(signableMessage, { signingDate = new Date(), signingRegion, signingService }) {\n const promise = this.signEvent({\n headers: this.headerFormatter.format(signableMessage.message.headers),\n payload: signableMessage.message.body,\n }, {\n signingDate,\n signingRegion,\n signingService,\n priorSignature: signableMessage.priorSignature,\n });\n return promise.then((signature) => {\n return { message: signableMessage.message, signature };\n });\n }\n async signString(stringToSign, { signingDate = new Date(), signingRegion, signingService } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? (await this.regionProvider());\n const { shortDate } = this.formatDate(signingDate);\n const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));\n hash.update(toUint8Array(stringToSign));\n return toHex(await hash.digest());\n }\n async signRequest(requestToSign, { signingDate = new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService, } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? (await this.regionProvider());\n const request = prepareRequest(requestToSign);\n const { longDate, shortDate } = this.formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n request.headers[AMZ_DATE_HEADER] = longDate;\n if (credentials.sessionToken) {\n request.headers[TOKEN_HEADER] = credentials.sessionToken;\n }\n const payloadHash = await getPayloadHash(request, this.sha256);\n if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) {\n request.headers[SHA256_HEADER] = payloadHash;\n }\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash));\n request.headers[AUTH_HEADER] =\n `${ALGORITHM_IDENTIFIER} ` +\n `Credential=${credentials.accessKeyId}/${scope}, ` +\n `SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, ` +\n `Signature=${signature}`;\n return request;\n }\n async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {\n const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER);\n const hash = new this.sha256(await keyPromise);\n hash.update(toUint8Array(stringToSign));\n return toHex(await hash.digest());\n }\n getSigningKey(credentials, region, shortDate, service) {\n return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);\n }\n}\n", "export const signatureV4aContainer = {\n SignatureV4a: null,\n};\n", "export * from \"./SignatureV4\";\nexport * from \"./constants\";\nexport { getCanonicalHeaders } from \"./getCanonicalHeaders\";\nexport { getCanonicalQuery } from \"./getCanonicalQuery\";\nexport { getPayloadHash } from \"./getPayloadHash\";\nexport { moveHeadersToQuery } from \"./moveHeadersToQuery\";\nexport { prepareRequest } from \"./prepareRequest\";\nexport * from \"./credentialDerivation\";\nexport { SignatureV4Base } from \"./SignatureV4Base\";\nexport { hasHeader } from \"./headerUtil\";\nexport * from \"./signature-v4a-container\";\n", "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { doesIdentityRequireRefresh, isIdentityExpired, memoizeIdentityProvider, normalizeProvider, } from \"@smithy/core\";\nimport { SignatureV4 } from \"@smithy/signature-v4\";\nexport const resolveAwsSdkSigV4Config = (config) => {\n let inputCredentials = config.credentials;\n let isUserSupplied = !!config.credentials;\n let resolvedCredentials = undefined;\n Object.defineProperty(config, \"credentials\", {\n set(credentials) {\n if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {\n isUserSupplied = true;\n }\n inputCredentials = credentials;\n const memoizedProvider = normalizeCredentialProvider(config, {\n credentials: inputCredentials,\n credentialDefaultProvider: config.credentialDefaultProvider,\n });\n const boundProvider = bindCallerConfig(config, memoizedProvider);\n if (isUserSupplied && !boundProvider.attributed) {\n const isCredentialObject = typeof inputCredentials === \"object\" && inputCredentials !== null;\n resolvedCredentials = async (options) => {\n const creds = await boundProvider(options);\n const attributedCreds = creds;\n if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) {\n return setCredentialFeature(attributedCreds, \"CREDENTIALS_CODE\", \"e\");\n }\n return attributedCreds;\n };\n resolvedCredentials.memoized = boundProvider.memoized;\n resolvedCredentials.configBound = boundProvider.configBound;\n resolvedCredentials.attributed = true;\n }\n else {\n resolvedCredentials = boundProvider;\n }\n },\n get() {\n return resolvedCredentials;\n },\n enumerable: true,\n configurable: true,\n });\n config.credentials = inputCredentials;\n const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256, } = config;\n let signer;\n if (config.signer) {\n signer = normalizeProvider(config.signer);\n }\n else if (config.regionInfoProvider) {\n signer = () => normalizeProvider(config.region)()\n .then(async (region) => [\n (await config.regionInfoProvider(region, {\n useFipsEndpoint: await config.useFipsEndpoint(),\n useDualstackEndpoint: await config.useDualstackEndpoint(),\n })) || {},\n region,\n ])\n .then(([regionInfo, region]) => {\n const { signingRegion, signingService } = regionInfo;\n config.signingRegion = config.signingRegion || signingRegion || region;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: config.credentials,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath,\n };\n const SignerCtor = config.signerConstructor || SignatureV4;\n return new SignerCtor(params);\n });\n }\n else {\n signer = async (authScheme) => {\n authScheme = Object.assign({}, {\n name: \"sigv4\",\n signingName: config.signingName || config.defaultSigningName,\n signingRegion: await normalizeProvider(config.region)(),\n properties: {},\n }, authScheme);\n const signingRegion = authScheme.signingRegion;\n const signingService = authScheme.signingName;\n config.signingRegion = config.signingRegion || signingRegion;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: config.credentials,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath,\n };\n const SignerCtor = config.signerConstructor || SignatureV4;\n return new SignerCtor(params);\n };\n }\n const resolvedConfig = Object.assign(config, {\n systemClockOffset,\n signingEscapePath,\n signer,\n });\n return resolvedConfig;\n};\nexport const resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;\nfunction normalizeCredentialProvider(config, { credentials, credentialDefaultProvider, }) {\n let credentialsProvider;\n if (credentials) {\n if (!credentials?.memoized) {\n credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh);\n }\n else {\n credentialsProvider = credentials;\n }\n }\n else {\n if (credentialDefaultProvider) {\n credentialsProvider = normalizeProvider(credentialDefaultProvider(Object.assign({}, config, {\n parentClientConfig: config,\n })));\n }\n else {\n credentialsProvider = async () => {\n throw new Error(\"@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.\");\n };\n }\n }\n credentialsProvider.memoized = true;\n return credentialsProvider;\n}\nfunction bindCallerConfig(config, credentialsProvider) {\n if (credentialsProvider.configBound) {\n return credentialsProvider;\n }\n const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config });\n fn.memoized = credentialsProvider.memoized;\n fn.configBound = true;\n return fn;\n}\n", "export { AwsSdkSigV4Signer, AWSSDKSigV4Signer, validateSigningProperties } from \"./AwsSdkSigV4Signer\";\nexport { AwsSdkSigV4ASigner } from \"./AwsSdkSigV4ASigner\";\nexport * from \"./NODE_AUTH_SCHEME_PREFERENCE_OPTIONS\";\nexport * from \"./resolveAwsSdkSigV4AConfig\";\nexport * from \"./resolveAwsSdkSigV4Config\";\n", "export * from \"./aws_sdk\";\nexport * from \"./utils/getBearerTokenEnvKey\";\n", "const TEXT_ENCODER = typeof TextEncoder == \"function\" ? new TextEncoder() : null;\nexport const calculateBodyLength = (body) => {\n if (typeof body === \"string\") {\n if (TEXT_ENCODER) {\n return TEXT_ENCODER.encode(body).byteLength;\n }\n let len = body.length;\n for (let i = len - 1; i >= 0; i--) {\n const code = body.charCodeAt(i);\n if (code > 0x7f && code <= 0x7ff)\n len++;\n else if (code > 0x7ff && code <= 0xffff)\n len += 2;\n if (code >= 0xdc00 && code <= 0xdfff)\n i--;\n }\n return len;\n }\n else if (typeof body.byteLength === \"number\") {\n return body.byteLength;\n }\n else if (typeof body.size === \"number\") {\n return body.size;\n }\n throw new Error(`Body Length computation failed for ${body}`);\n};\n", "export * from \"./calculateBodyLength\";\n", "const getAllAliases = (name, aliases) => {\n const _aliases = [];\n if (name) {\n _aliases.push(name);\n }\n if (aliases) {\n for (const alias of aliases) {\n _aliases.push(alias);\n }\n }\n return _aliases;\n};\nconst getMiddlewareNameWithAliases = (name, aliases) => {\n return `${name || \"anonymous\"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(\",\")})` : \"\"}`;\n};\nexport const constructStack = () => {\n let absoluteEntries = [];\n let relativeEntries = [];\n let identifyOnResolve = false;\n const entriesNameSet = new Set();\n const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] ||\n priorityWeights[b.priority || \"normal\"] - priorityWeights[a.priority || \"normal\"]);\n const removeByName = (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n const aliases = getAllAliases(entry.name, entry.aliases);\n if (aliases.includes(toRemove)) {\n isRemoved = true;\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n };\n const removeByReference = (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n if (entry.middleware === toRemove) {\n isRemoved = true;\n for (const alias of getAllAliases(entry.name, entry.aliases)) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n };\n const cloneTo = (toStack) => {\n absoluteEntries.forEach((entry) => {\n toStack.add(entry.middleware, { ...entry });\n });\n relativeEntries.forEach((entry) => {\n toStack.addRelativeTo(entry.middleware, { ...entry });\n });\n toStack.identifyOnResolve?.(stack.identifyOnResolve());\n return toStack;\n };\n const expandRelativeMiddlewareList = (from) => {\n const expandedMiddlewareList = [];\n from.before.forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n }\n else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n expandedMiddlewareList.push(from);\n from.after.reverse().forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n }\n else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n return expandedMiddlewareList;\n };\n const getMiddlewareList = (debug = false) => {\n const normalizedAbsoluteEntries = [];\n const normalizedRelativeEntries = [];\n const normalizedEntriesNameMap = {};\n absoluteEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: [],\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedAbsoluteEntries.push(normalizedEntry);\n });\n relativeEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: [],\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedRelativeEntries.push(normalizedEntry);\n });\n normalizedRelativeEntries.forEach((entry) => {\n if (entry.toMiddleware) {\n const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];\n if (toMiddleware === undefined) {\n if (debug) {\n return;\n }\n throw new Error(`${entry.toMiddleware} is not found when adding ` +\n `${getMiddlewareNameWithAliases(entry.name, entry.aliases)} ` +\n `middleware ${entry.relation} ${entry.toMiddleware}`);\n }\n if (entry.relation === \"after\") {\n toMiddleware.after.push(entry);\n }\n if (entry.relation === \"before\") {\n toMiddleware.before.push(entry);\n }\n }\n });\n const mainChain = sort(normalizedAbsoluteEntries)\n .map(expandRelativeMiddlewareList)\n .reduce((wholeList, expandedMiddlewareList) => {\n wholeList.push(...expandedMiddlewareList);\n return wholeList;\n }, []);\n return mainChain;\n };\n const stack = {\n add: (middleware, options = {}) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n step: \"initialize\",\n priority: \"normal\",\n middleware,\n ...options,\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = absoluteEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias));\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = absoluteEntries[toOverrideIndex];\n if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {\n throw new Error(`\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware with ` +\n `${toOverride.priority} priority in ${toOverride.step} step cannot ` +\n `be overridden by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware with ` +\n `${entry.priority} priority in ${entry.step} step.`);\n }\n absoluteEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n absoluteEntries.push(entry);\n },\n addRelativeTo: (middleware, options) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n middleware,\n ...options,\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = relativeEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias));\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = relativeEntries[toOverrideIndex];\n if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {\n throw new Error(`\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware ` +\n `${toOverride.relation} \"${toOverride.toMiddleware}\" middleware cannot be overridden ` +\n `by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware ${entry.relation} ` +\n `\"${entry.toMiddleware}\" middleware.`);\n }\n relativeEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n relativeEntries.push(entry);\n },\n clone: () => cloneTo(constructStack()),\n use: (plugin) => {\n plugin.applyToStack(stack);\n },\n remove: (toRemove) => {\n if (typeof toRemove === \"string\")\n return removeByName(toRemove);\n else\n return removeByReference(toRemove);\n },\n removeByTag: (toRemove) => {\n let isRemoved = false;\n const filterCb = (entry) => {\n const { tags, name, aliases: _aliases } = entry;\n if (tags && tags.includes(toRemove)) {\n const aliases = getAllAliases(name, _aliases);\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n isRemoved = true;\n return false;\n }\n return true;\n };\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n },\n concat: (from) => {\n const cloned = cloneTo(constructStack());\n cloned.use(from);\n cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false));\n return cloned;\n },\n applyToStack: cloneTo,\n identify: () => {\n return getMiddlewareList(true).map((mw) => {\n const step = mw.step ??\n mw.relation +\n \" \" +\n mw.toMiddleware;\n return getMiddlewareNameWithAliases(mw.name, mw.aliases) + \" - \" + step;\n });\n },\n identifyOnResolve(toggle) {\n if (typeof toggle === \"boolean\")\n identifyOnResolve = toggle;\n return identifyOnResolve;\n },\n resolve: (handler, context) => {\n for (const middleware of getMiddlewareList()\n .map((entry) => entry.middleware)\n .reverse()) {\n handler = middleware(handler, context);\n }\n if (identifyOnResolve) {\n console.log(stack.identify());\n }\n return handler;\n },\n };\n return stack;\n};\nconst stepWeights = {\n initialize: 5,\n serialize: 4,\n build: 3,\n finalizeRequest: 2,\n deserialize: 1,\n};\nconst priorityWeights = {\n high: 3,\n normal: 2,\n low: 1,\n};\n", "export * from \"./MiddlewareStack\";\n", "import { constructStack } from \"@smithy/middleware-stack\";\nexport class Client {\n config;\n middlewareStack = constructStack();\n initConfig;\n handlers;\n constructor(config) {\n this.config = config;\n const { protocol, protocolSettings } = config;\n if (protocolSettings) {\n if (typeof protocol === \"function\") {\n config.protocol = new protocol(protocolSettings);\n }\n }\n }\n send(command, optionsOrCb, cb) {\n const options = typeof optionsOrCb !== \"function\" ? optionsOrCb : undefined;\n const callback = typeof optionsOrCb === \"function\" ? optionsOrCb : cb;\n const useHandlerCache = options === undefined && this.config.cacheMiddleware === true;\n let handler;\n if (useHandlerCache) {\n if (!this.handlers) {\n this.handlers = new WeakMap();\n }\n const handlers = this.handlers;\n if (handlers.has(command.constructor)) {\n handler = handlers.get(command.constructor);\n }\n else {\n handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n handlers.set(command.constructor, handler);\n }\n }\n else {\n delete this.handlers;\n handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n }\n if (callback) {\n handler(command)\n .then((result) => callback(null, result.output), (err) => callback(err))\n .catch(() => { });\n }\n else {\n return handler(command).then((result) => result.output);\n }\n }\n destroy() {\n this.config?.requestHandler?.destroy?.();\n delete this.handlers;\n }\n}\n", "export { collectBody } from \"@smithy/core/protocols\";\n", "import { NormalizedSchema } from \"@smithy/core/schema\";\nconst SENSITIVE_STRING = \"***SensitiveInformation***\";\nexport function schemaLogFilter(schema, data) {\n if (data == null) {\n return data;\n }\n const ns = NormalizedSchema.of(schema);\n if (ns.getMergedTraits().sensitive) {\n return SENSITIVE_STRING;\n }\n if (ns.isListSchema()) {\n const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive;\n if (isSensitive) {\n return SENSITIVE_STRING;\n }\n }\n else if (ns.isMapSchema()) {\n const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive;\n if (isSensitive) {\n return SENSITIVE_STRING;\n }\n }\n else if (ns.isStructSchema() && typeof data === \"object\") {\n const object = data;\n const newObject = {};\n for (const [member, memberNs] of ns.structIterator()) {\n if (object[member] != null) {\n newObject[member] = schemaLogFilter(memberNs, object[member]);\n }\n }\n return newObject;\n }\n return data;\n}\n", "import { constructStack } from \"@smithy/middleware-stack\";\nimport { SMITHY_CONTEXT_KEY } from \"@smithy/types\";\nimport { schemaLogFilter } from \"./schemaLogFilter\";\nexport class Command {\n middlewareStack = constructStack();\n schema;\n static classBuilder() {\n return new ClassBuilder();\n }\n resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor, }) {\n for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {\n this.middlewareStack.use(mw);\n }\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog,\n outputFilterSensitiveLog,\n [SMITHY_CONTEXT_KEY]: {\n commandInstance: this,\n ...smithyContext,\n },\n ...additionalContext,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n}\nclass ClassBuilder {\n _init = () => { };\n _ep = {};\n _middlewareFn = () => [];\n _commandName = \"\";\n _clientName = \"\";\n _additionalContext = {};\n _smithyContext = {};\n _inputFilterSensitiveLog = undefined;\n _outputFilterSensitiveLog = undefined;\n _serializer = null;\n _deserializer = null;\n _operationSchema;\n init(cb) {\n this._init = cb;\n }\n ep(endpointParameterInstructions) {\n this._ep = endpointParameterInstructions;\n return this;\n }\n m(middlewareSupplier) {\n this._middlewareFn = middlewareSupplier;\n return this;\n }\n s(service, operation, smithyContext = {}) {\n this._smithyContext = {\n service,\n operation,\n ...smithyContext,\n };\n return this;\n }\n c(additionalContext = {}) {\n this._additionalContext = additionalContext;\n return this;\n }\n n(clientName, commandName) {\n this._clientName = clientName;\n this._commandName = commandName;\n return this;\n }\n f(inputFilter = (_) => _, outputFilter = (_) => _) {\n this._inputFilterSensitiveLog = inputFilter;\n this._outputFilterSensitiveLog = outputFilter;\n return this;\n }\n ser(serializer) {\n this._serializer = serializer;\n return this;\n }\n de(deserializer) {\n this._deserializer = deserializer;\n return this;\n }\n sc(operation) {\n this._operationSchema = operation;\n this._smithyContext.operationSchema = operation;\n return this;\n }\n build() {\n const closure = this;\n let CommandRef;\n return (CommandRef = class extends Command {\n input;\n static getEndpointParameterInstructions() {\n return closure._ep;\n }\n constructor(...[input]) {\n super();\n this.input = input ?? {};\n closure._init(this);\n this.schema = closure._operationSchema;\n }\n resolveMiddleware(stack, configuration, options) {\n const op = closure._operationSchema;\n const input = op?.[4] ?? op?.input;\n const output = op?.[5] ?? op?.output;\n return this.resolveMiddlewareWithContext(stack, configuration, options, {\n CommandCtor: CommandRef,\n middlewareFn: closure._middlewareFn,\n clientName: closure._clientName,\n commandName: closure._commandName,\n inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_) => _),\n outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_) => _),\n smithyContext: closure._smithyContext,\n additionalContext: closure._additionalContext,\n });\n }\n serialize = closure._serializer;\n deserialize = closure._deserializer;\n });\n }\n}\n", "export const SENSITIVE_STRING = \"***SensitiveInformation***\";\n", "export const createAggregatedClient = (commands, Client, options) => {\n for (const [command, CommandCtor] of Object.entries(commands)) {\n const methodImpl = async function (args, optionsOrCb, cb) {\n const command = new CommandCtor(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expected http options but got ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n };\n const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, \"\");\n Client.prototype[methodName] = methodImpl;\n }\n const { paginators = {}, waiters = {} } = options ?? {};\n for (const [paginatorName, paginatorFn] of Object.entries(paginators)) {\n if (Client.prototype[paginatorName] === void 0) {\n Client.prototype[paginatorName] = function (commandInput = {}, paginationConfiguration, ...rest) {\n return paginatorFn({\n ...paginationConfiguration,\n client: this,\n }, commandInput, ...rest);\n };\n }\n }\n for (const [waiterName, waiterFn] of Object.entries(waiters)) {\n if (Client.prototype[waiterName] === void 0) {\n Client.prototype[waiterName] = async function (commandInput = {}, waiterConfiguration, ...rest) {\n let config = waiterConfiguration;\n if (typeof waiterConfiguration === \"number\") {\n config = {\n maxWaitTime: waiterConfiguration,\n };\n }\n return waiterFn({\n ...config,\n client: this,\n }, commandInput, ...rest);\n };\n }\n }\n};\n", "export class ServiceException extends Error {\n $fault;\n $response;\n $retryable;\n $metadata;\n constructor(options) {\n super(options.message);\n Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype);\n this.name = options.name;\n this.$fault = options.$fault;\n this.$metadata = options.$metadata;\n }\n static isInstance(value) {\n if (!value)\n return false;\n const candidate = value;\n return (ServiceException.prototype.isPrototypeOf(candidate) ||\n (Boolean(candidate.$fault) &&\n Boolean(candidate.$metadata) &&\n (candidate.$fault === \"client\" || candidate.$fault === \"server\")));\n }\n static [Symbol.hasInstance](instance) {\n if (!instance)\n return false;\n const candidate = instance;\n if (this === ServiceException) {\n return ServiceException.isInstance(instance);\n }\n if (ServiceException.isInstance(instance)) {\n if (candidate.name && this.name) {\n return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;\n }\n return this.prototype.isPrototypeOf(instance);\n }\n return false;\n }\n}\nexport const decorateServiceException = (exception, additions = {}) => {\n Object.entries(additions)\n .filter(([, v]) => v !== undefined)\n .forEach(([k, v]) => {\n if (exception[k] == undefined || exception[k] === \"\") {\n exception[k] = v;\n }\n });\n const message = exception.message || exception.Message || \"UnknownError\";\n exception.message = message;\n delete exception.Message;\n return exception;\n};\n", "import { decorateServiceException } from \"./exceptions\";\nexport const throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => {\n const $metadata = deserializeMetadata(output);\n const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + \"\" : undefined;\n const response = new exceptionCtor({\n name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || \"UnknownError\",\n $fault: \"client\",\n $metadata,\n });\n throw decorateServiceException(response, parsedBody);\n};\nexport const withBaseException = (ExceptionCtor) => {\n return ({ output, parsedBody, errorCode }) => {\n throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });\n };\n};\nconst deserializeMetadata = (output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n});\n", "export const loadConfigsForDefaultMode = (mode) => {\n switch (mode) {\n case \"standard\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100,\n };\n case \"in-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 1100,\n };\n case \"cross-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100,\n };\n case \"mobile\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 30000,\n };\n default:\n return {};\n }\n};\n", "let warningEmitted = false;\nexport const emitWarningIfUnsupportedVersion = (version) => {\n if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 16) {\n warningEmitted = true;\n }\n};\n", "export { extendedEncodeURIComponent } from \"@smithy/core/protocols\";\n", "import { AlgorithmId } from \"@smithy/types\";\nexport { AlgorithmId };\nconst knownAlgorithms = Object.values(AlgorithmId);\nexport const getChecksumConfiguration = (runtimeConfig) => {\n const checksumAlgorithms = [];\n for (const id in AlgorithmId) {\n const algorithmId = AlgorithmId[id];\n if (runtimeConfig[algorithmId] === undefined) {\n continue;\n }\n checksumAlgorithms.push({\n algorithmId: () => algorithmId,\n checksumConstructor: () => runtimeConfig[algorithmId],\n });\n }\n for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) {\n checksumAlgorithms.push({\n algorithmId: () => id,\n checksumConstructor: () => ChecksumCtor,\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {};\n const id = algo.algorithmId();\n const ctor = algo.checksumConstructor();\n if (knownAlgorithms.includes(id)) {\n runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor;\n }\n else {\n runtimeConfig.checksumAlgorithms[id] = ctor;\n }\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n },\n };\n};\nexport const resolveChecksumRuntimeConfig = (clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n const id = checksumAlgorithm.algorithmId();\n if (knownAlgorithms.includes(id)) {\n runtimeConfig[id] = checksumAlgorithm.checksumConstructor();\n }\n });\n return runtimeConfig;\n};\n", "export const getRetryConfiguration = (runtimeConfig) => {\n return {\n setRetryStrategy(retryStrategy) {\n runtimeConfig.retryStrategy = retryStrategy;\n },\n retryStrategy() {\n return runtimeConfig.retryStrategy;\n },\n };\n};\nexport const resolveRetryRuntimeConfig = (retryStrategyConfiguration) => {\n const runtimeConfig = {};\n runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();\n return runtimeConfig;\n};\n", "import { getChecksumConfiguration, resolveChecksumRuntimeConfig } from \"./checksum\";\nimport { getRetryConfiguration, resolveRetryRuntimeConfig } from \"./retry\";\nexport const getDefaultExtensionConfiguration = (runtimeConfig) => {\n return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig));\n};\nexport const getDefaultClientConfiguration = getDefaultExtensionConfiguration;\nexport const resolveDefaultRuntimeConfig = (config) => {\n return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config));\n};\n", "export * from \"./defaultExtensionConfiguration\";\n", "export const getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray];\n", "export const getValueFromTextNode = (obj) => {\n const textNodeName = \"#text\";\n for (const key in obj) {\n if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== undefined) {\n obj[key] = obj[key][textNodeName];\n }\n else if (typeof obj[key] === \"object\" && obj[key] !== null) {\n obj[key] = getValueFromTextNode(obj[key]);\n }\n }\n return obj;\n};\n", "export const isSerializableHeaderValue = (value) => {\n return value != null;\n};\n", "export class NoOpLogger {\n trace() { }\n debug() { }\n info() { }\n warn() { }\n error() { }\n}\n", "export function map(arg0, arg1, arg2) {\n let target;\n let filter;\n let instructions;\n if (typeof arg1 === \"undefined\" && typeof arg2 === \"undefined\") {\n target = {};\n instructions = arg0;\n }\n else {\n target = arg0;\n if (typeof arg1 === \"function\") {\n filter = arg1;\n instructions = arg2;\n return mapWithFilter(target, filter, instructions);\n }\n else {\n instructions = arg1;\n }\n }\n for (const key of Object.keys(instructions)) {\n if (!Array.isArray(instructions[key])) {\n target[key] = instructions[key];\n continue;\n }\n applyInstruction(target, null, instructions, key);\n }\n return target;\n}\nexport const convertMap = (target) => {\n const output = {};\n for (const [k, v] of Object.entries(target || {})) {\n output[k] = [, v];\n }\n return output;\n};\nexport const take = (source, instructions) => {\n const out = {};\n for (const key in instructions) {\n applyInstruction(out, source, instructions, key);\n }\n return out;\n};\nconst mapWithFilter = (target, filter, instructions) => {\n return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => {\n if (Array.isArray(value)) {\n _instructions[key] = value;\n }\n else {\n if (typeof value === \"function\") {\n _instructions[key] = [filter, value()];\n }\n else {\n _instructions[key] = [filter, value];\n }\n }\n return _instructions;\n }, {}));\n};\nconst applyInstruction = (target, source, instructions, targetKey) => {\n if (source !== null) {\n let instruction = instructions[targetKey];\n if (typeof instruction === \"function\") {\n instruction = [, instruction];\n }\n const [filter = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;\n if ((typeof filter === \"function\" && filter(source[sourceKey])) || (typeof filter !== \"function\" && !!filter)) {\n target[targetKey] = valueFn(source[sourceKey]);\n }\n return;\n }\n let [filter, value] = instructions[targetKey];\n if (typeof value === \"function\") {\n let _value;\n const defaultFilterPassed = filter === undefined && (_value = value()) != null;\n const customFilterPassed = (typeof filter === \"function\" && !!filter(void 0)) || (typeof filter !== \"function\" && !!filter);\n if (defaultFilterPassed) {\n target[targetKey] = _value;\n }\n else if (customFilterPassed) {\n target[targetKey] = value();\n }\n }\n else {\n const defaultFilterPassed = filter === undefined && value != null;\n const customFilterPassed = (typeof filter === \"function\" && !!filter(value)) || (typeof filter !== \"function\" && !!filter);\n if (defaultFilterPassed || customFilterPassed) {\n target[targetKey] = value;\n }\n }\n};\nconst nonNullish = (_) => _ != null;\nconst pass = (_) => _;\n", "export { resolvedPath } from \"@smithy/core/protocols\";\n", "export const serializeFloat = (value) => {\n if (value !== value) {\n return \"NaN\";\n }\n switch (value) {\n case Infinity:\n return \"Infinity\";\n case -Infinity:\n return \"-Infinity\";\n default:\n return value;\n }\n};\nexport const serializeDateTime = (date) => date.toISOString().replace(\".000Z\", \"Z\");\n", "export const _json = (obj) => {\n if (obj == null) {\n return {};\n }\n if (Array.isArray(obj)) {\n return obj.filter((_) => _ != null).map(_json);\n }\n if (typeof obj === \"object\") {\n const target = {};\n for (const key of Object.keys(obj)) {\n if (obj[key] == null) {\n continue;\n }\n target[key] = _json(obj[key]);\n }\n return target;\n }\n return obj;\n};\n", "export * from \"./client\";\nexport * from \"./collect-stream-body\";\nexport * from \"./command\";\nexport * from \"./constants\";\nexport * from \"./create-aggregated-client\";\nexport * from \"./default-error-handler\";\nexport * from \"./defaults-mode\";\nexport * from \"./emitWarningIfUnsupportedVersion\";\nexport * from \"./exceptions\";\nexport * from \"./extended-encode-uri-component\";\nexport * from \"./extensions\";\nexport * from \"./get-array-if-single-item\";\nexport * from \"./get-value-from-text-node\";\nexport * from \"./is-serializable-header-value\";\nexport * from \"./NoOpLogger\";\nexport * from \"./object-mapping\";\nexport * from \"./resolve-path\";\nexport * from \"./ser-utils\";\nexport * from \"./serde-json\";\nexport * from \"@smithy/core/serde\";\n", "import { NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { decorateServiceException } from \"@smithy/smithy-client\";\nexport class ProtocolLib {\n queryCompat;\n constructor(queryCompat = false) {\n this.queryCompat = queryCompat;\n }\n resolveRestContentType(defaultContentType, inputSchema) {\n const members = inputSchema.getMemberSchemas();\n const httpPayloadMember = Object.values(members).find((m) => {\n return !!m.getMergedTraits().httpPayload;\n });\n if (httpPayloadMember) {\n const mediaType = httpPayloadMember.getMergedTraits().mediaType;\n if (mediaType) {\n return mediaType;\n }\n else if (httpPayloadMember.isStringSchema()) {\n return \"text/plain\";\n }\n else if (httpPayloadMember.isBlobSchema()) {\n return \"application/octet-stream\";\n }\n else {\n return defaultContentType;\n }\n }\n else if (!inputSchema.isUnitSchema()) {\n const hasBody = Object.values(members).find((m) => {\n const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits();\n const noPrefixHeaders = httpPrefixHeaders === void 0;\n return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders;\n });\n if (hasBody) {\n return defaultContentType;\n }\n }\n }\n async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) {\n let namespace = defaultNamespace;\n let errorName = errorIdentifier;\n if (errorIdentifier.includes(\"#\")) {\n [namespace, errorName] = errorIdentifier.split(\"#\");\n }\n const errorMetadata = {\n $metadata: metadata,\n $fault: response.statusCode < 500 ? \"client\" : \"server\",\n };\n const registry = TypeRegistry.for(namespace);\n try {\n const errorSchema = getErrorSchema?.(registry, errorName) ?? registry.getSchema(errorIdentifier);\n return { errorSchema, errorMetadata };\n }\n catch (e) {\n dataObject.message = dataObject.message ?? dataObject.Message ?? \"UnknownError\";\n const synthetic = TypeRegistry.for(\"smithy.ts.sdk.synthetic.\" + namespace);\n const baseExceptionSchema = synthetic.getBaseException();\n if (baseExceptionSchema) {\n const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error;\n throw this.decorateServiceException(Object.assign(new ErrorCtor({ name: errorName }), errorMetadata), dataObject);\n }\n throw this.decorateServiceException(Object.assign(new Error(errorName), errorMetadata), dataObject);\n }\n }\n decorateServiceException(exception, additions = {}) {\n if (this.queryCompat) {\n const msg = exception.Message ?? additions.Message;\n const error = decorateServiceException(exception, additions);\n if (msg) {\n error.message = msg;\n }\n error.Error = {\n ...error.Error,\n Type: error.Error?.Type,\n Code: error.Error?.Code,\n Message: error.Error?.message ?? error.Error?.Message ?? msg,\n };\n const reqId = error.$metadata.requestId;\n if (reqId) {\n error.RequestId = reqId;\n }\n return error;\n }\n return decorateServiceException(exception, additions);\n }\n setQueryCompatError(output, response) {\n const queryErrorHeader = response.headers?.[\"x-amzn-query-error\"];\n if (output !== undefined && queryErrorHeader != null) {\n const [Code, Type] = queryErrorHeader.split(\";\");\n const entries = Object.entries(output);\n const Error = {\n Code,\n Type,\n };\n Object.assign(output, Error);\n for (const [k, v] of entries) {\n Error[k === \"message\" ? \"Message\" : k] = v;\n }\n delete Error.__type;\n output.Error = Error;\n }\n }\n queryCompatOutput(queryCompatErrorData, errorData) {\n if (queryCompatErrorData.Error) {\n errorData.Error = queryCompatErrorData.Error;\n }\n if (queryCompatErrorData.Type) {\n errorData.Type = queryCompatErrorData.Type;\n }\n if (queryCompatErrorData.Code) {\n errorData.Code = queryCompatErrorData.Code;\n }\n }\n findQueryCompatibleError(registry, errorName) {\n try {\n return registry.getSchema(errorName);\n }\n catch (e) {\n return registry.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName);\n }\n }\n}\n", "import { loadSmithyRpcV2CborErrorCode, SmithyRpcV2CborProtocol } from \"@smithy/core/cbor\";\nimport { NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nexport class AwsSmithyRpcV2CborProtocol extends SmithyRpcV2CborProtocol {\n awsQueryCompatible;\n mixin;\n constructor({ defaultNamespace, awsQueryCompatible, }) {\n super({ defaultNamespace });\n this.awsQueryCompatible = !!awsQueryCompatible;\n this.mixin = new ProtocolLib(this.awsQueryCompatible);\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n if (this.awsQueryCompatible) {\n request.headers[\"x-amzn-query-mode\"] = \"true\";\n }\n return request;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n if (this.awsQueryCompatible) {\n this.mixin.setQueryCompatError(dataObject, response);\n }\n const errorName = (() => {\n const compatHeader = response.headers[\"x-amzn-query-error\"];\n if (compatHeader && this.awsQueryCompatible) {\n return compatHeader.split(\";\")[0];\n }\n return loadSmithyRpcV2CborErrorCode(response, dataObject) ?? \"Unknown\";\n })();\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);\n const ns = NormalizedSchema.of(errorSchema);\n const message = dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor(message);\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n if (dataObject[name] != null) {\n output[name] = this.deserializer.readValue(member, dataObject[name]);\n }\n }\n if (this.awsQueryCompatible) {\n this.mixin.queryCompatOutput(dataObject, output);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n}\n", "export const _toStr = (val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"number\" || typeof val === \"bigint\") {\n const warning = new Error(`Received number ${val} where a string was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return String(val);\n }\n if (typeof val === \"boolean\") {\n const warning = new Error(`Received boolean ${val} where a string was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return String(val);\n }\n return val;\n};\nexport const _toBool = (val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"number\") {\n }\n if (typeof val === \"string\") {\n const lowercase = val.toLowerCase();\n if (val !== \"\" && lowercase !== \"false\" && lowercase !== \"true\") {\n const warning = new Error(`Received string \"${val}\" where a boolean was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n }\n return val !== \"\" && lowercase !== \"false\";\n }\n return val;\n};\nexport const _toNum = (val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"boolean\") {\n }\n if (typeof val === \"string\") {\n const num = Number(val);\n if (num.toString() !== val) {\n const warning = new Error(`Received string \"${val}\" where a number was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return val;\n }\n return num;\n }\n return val;\n};\n", "export class SerdeContextConfig {\n serdeContext;\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n }\n}\n", "export class UnionSerde {\n from;\n to;\n keys;\n constructor(from, to) {\n this.from = from;\n this.to = to;\n this.keys = new Set(Object.keys(this.from).filter((k) => k !== \"__type\"));\n }\n mark(key) {\n this.keys.delete(key);\n }\n hasUnknown() {\n return this.keys.size === 1 && Object.keys(this.to).length === 0;\n }\n writeUnknown() {\n if (this.hasUnknown()) {\n const k = this.keys.values().next().value;\n const v = this.from[k];\n this.to.$unknown = [k, v];\n }\n }\n}\n", "import { collectBodyString } from \"../common\";\nexport const parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n try {\n return JSON.parse(encoded);\n }\n catch (e) {\n if (e?.name === \"SyntaxError\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: encoded,\n });\n }\n throw e;\n }\n }\n return {};\n});\nexport const parseJsonErrorBody = async (errorBody, context) => {\n const value = await parseJsonBody(errorBody, context);\n value.message = value.message ?? value.Message;\n return value;\n};\nexport const loadRestJsonErrorCode = (output, data) => {\n const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());\n const sanitizeErrorCode = (rawValue) => {\n let cleanValue = rawValue;\n if (typeof cleanValue === \"number\") {\n cleanValue = cleanValue.toString();\n }\n if (cleanValue.indexOf(\",\") >= 0) {\n cleanValue = cleanValue.split(\",\")[0];\n }\n if (cleanValue.indexOf(\":\") >= 0) {\n cleanValue = cleanValue.split(\":\")[0];\n }\n if (cleanValue.indexOf(\"#\") >= 0) {\n cleanValue = cleanValue.split(\"#\")[1];\n }\n return cleanValue;\n };\n const headerKey = findKey(output.headers, \"x-amzn-errortype\");\n if (headerKey !== undefined) {\n return sanitizeErrorCode(output.headers[headerKey]);\n }\n if (data && typeof data === \"object\") {\n const codeKey = findKey(data, \"code\");\n if (codeKey && data[codeKey] !== undefined) {\n return sanitizeErrorCode(data[codeKey]);\n }\n if (data[\"__type\"] !== undefined) {\n return sanitizeErrorCode(data[\"__type\"]);\n }\n }\n};\n", "import { determineTimestampFormat } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { LazyJsonString, NumericValue, parseEpochTimestamp, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, } from \"@smithy/core/serde\";\nimport { fromBase64 } from \"@smithy/util-base64\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { UnionSerde } from \"../UnionSerde\";\nimport { jsonReviver } from \"./jsonReviver\";\nimport { parseJsonBody } from \"./parseJsonBody\";\nexport class JsonShapeDeserializer extends SerdeContextConfig {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n async read(schema, data) {\n return this._read(schema, typeof data === \"string\" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext));\n }\n readObject(schema, data) {\n return this._read(schema, data);\n }\n _read(schema, value) {\n const isObject = value !== null && typeof value === \"object\";\n const ns = NormalizedSchema.of(schema);\n if (isObject) {\n if (ns.isStructSchema()) {\n const record = value;\n const union = ns.isUnionSchema();\n const out = {};\n let nameMap = void 0;\n const { jsonName } = this.settings;\n if (jsonName) {\n nameMap = {};\n }\n let unionSerde;\n if (union) {\n unionSerde = new UnionSerde(record, out);\n }\n for (const [memberName, memberSchema] of ns.structIterator()) {\n let fromKey = memberName;\n if (jsonName) {\n fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;\n nameMap[fromKey] = memberName;\n }\n if (union) {\n unionSerde.mark(fromKey);\n }\n if (record[fromKey] != null) {\n out[memberName] = this._read(memberSchema, record[fromKey]);\n }\n }\n if (union) {\n unionSerde.writeUnknown();\n }\n else if (typeof record.__type === \"string\") {\n for (const [k, v] of Object.entries(record)) {\n const t = jsonName ? nameMap[k] ?? k : k;\n if (!(t in out)) {\n out[t] = v;\n }\n }\n }\n return out;\n }\n if (Array.isArray(value) && ns.isListSchema()) {\n const listMember = ns.getValueSchema();\n const out = [];\n for (const item of value) {\n out.push(this._read(listMember, item));\n }\n return out;\n }\n if (ns.isMapSchema()) {\n const mapMember = ns.getValueSchema();\n const out = {};\n for (const [_k, _v] of Object.entries(value)) {\n out[_k] = this._read(mapMember, _v);\n }\n return out;\n }\n }\n if (ns.isBlobSchema() && typeof value === \"string\") {\n return fromBase64(value);\n }\n const mediaType = ns.getMergedTraits().mediaType;\n if (ns.isStringSchema() && typeof value === \"string\" && mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n return LazyJsonString.from(value);\n }\n return value;\n }\n if (ns.isTimestampSchema() && value != null) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return parseRfc3339DateTimeWithOffset(value);\n case 6:\n return parseRfc7231DateTime(value);\n case 7:\n return parseEpochTimestamp(value);\n default:\n console.warn(\"Missing timestamp format, parsing value with Date constructor:\", value);\n return new Date(value);\n }\n }\n if (ns.isBigIntegerSchema() && (typeof value === \"number\" || typeof value === \"string\")) {\n return BigInt(value);\n }\n if (ns.isBigDecimalSchema() && value != undefined) {\n if (value instanceof NumericValue) {\n return value;\n }\n const untyped = value;\n if (untyped.type === \"bigDecimal\" && \"string\" in untyped) {\n return new NumericValue(untyped.string, untyped.type);\n }\n return new NumericValue(String(value), \"bigDecimal\");\n }\n if (ns.isNumericSchema() && typeof value === \"string\") {\n switch (value) {\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n case \"NaN\":\n return NaN;\n }\n return value;\n }\n if (ns.isDocumentSchema()) {\n if (isObject) {\n const out = Array.isArray(value) ? [] : {};\n for (const [k, v] of Object.entries(value)) {\n if (v instanceof NumericValue) {\n out[k] = v;\n }\n else {\n out[k] = this._read(ns, v);\n }\n }\n return out;\n }\n else {\n return structuredClone(value);\n }\n }\n return value;\n }\n}\n", "import { determineTimestampFormat } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { dateToUtcString, generateIdempotencyToken, LazyJsonString, NumericValue } from \"@smithy/core/serde\";\nimport { toBase64 } from \"@smithy/util-base64\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { JsonReplacer } from \"./jsonReplacer\";\nexport class JsonShapeSerializer extends SerdeContextConfig {\n settings;\n buffer;\n useReplacer = false;\n rootSchema;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value) {\n this.rootSchema = NormalizedSchema.of(schema);\n this.buffer = this._write(this.rootSchema, value);\n }\n writeDiscriminatedDocument(schema, value) {\n this.write(schema, value);\n if (typeof this.buffer === \"object\") {\n this.buffer.__type = NormalizedSchema.of(schema).getName(true);\n }\n }\n flush() {\n const { rootSchema, useReplacer } = this;\n this.rootSchema = undefined;\n this.useReplacer = false;\n if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) {\n if (!useReplacer) {\n return JSON.stringify(this.buffer);\n }\n const replacer = new JsonReplacer();\n return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0));\n }\n return this.buffer;\n }\n _write(schema, value, container) {\n const isObject = value !== null && typeof value === \"object\";\n const ns = NormalizedSchema.of(schema);\n if (isObject) {\n if (ns.isStructSchema()) {\n const record = value;\n const out = {};\n const { jsonName } = this.settings;\n let nameMap = void 0;\n if (jsonName) {\n nameMap = {};\n }\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const serializableValue = this._write(memberSchema, record[memberName], ns);\n if (serializableValue !== undefined) {\n let targetKey = memberName;\n if (jsonName) {\n targetKey = memberSchema.getMergedTraits().jsonName ?? memberName;\n nameMap[memberName] = targetKey;\n }\n out[targetKey] = serializableValue;\n }\n }\n if (ns.isUnionSchema() && Object.keys(out).length === 0) {\n const { $unknown } = record;\n if (Array.isArray($unknown)) {\n const [k, v] = $unknown;\n out[k] = this._write(15, v);\n }\n }\n else if (typeof record.__type === \"string\") {\n for (const [k, v] of Object.entries(record)) {\n const targetKey = jsonName ? nameMap[k] ?? k : k;\n if (!(targetKey in out)) {\n out[targetKey] = this._write(15, v);\n }\n }\n }\n return out;\n }\n if (Array.isArray(value) && ns.isListSchema()) {\n const listMember = ns.getValueSchema();\n const out = [];\n const sparse = !!ns.getMergedTraits().sparse;\n for (const item of value) {\n if (sparse || item != null) {\n out.push(this._write(listMember, item));\n }\n }\n return out;\n }\n if (ns.isMapSchema()) {\n const mapMember = ns.getValueSchema();\n const out = {};\n const sparse = !!ns.getMergedTraits().sparse;\n for (const [_k, _v] of Object.entries(value)) {\n if (sparse || _v != null) {\n out[_k] = this._write(mapMember, _v);\n }\n }\n return out;\n }\n if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) {\n if (ns === this.rootSchema) {\n return value;\n }\n return (this.serdeContext?.base64Encoder ?? toBase64)(value);\n }\n if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return value.toISOString().replace(\".000Z\", \"Z\");\n case 6:\n return dateToUtcString(value);\n case 7:\n return value.getTime() / 1000;\n default:\n console.warn(\"Missing timestamp format, using epoch seconds\", value);\n return value.getTime() / 1000;\n }\n }\n if (value instanceof NumericValue) {\n this.useReplacer = true;\n }\n }\n if (value === null && container?.isStructSchema()) {\n return void 0;\n }\n if (ns.isStringSchema()) {\n if (typeof value === \"undefined\" && ns.isIdempotencyToken()) {\n return generateIdempotencyToken();\n }\n const mediaType = ns.getMergedTraits().mediaType;\n if (value != null && mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n return LazyJsonString.from(value);\n }\n }\n return value;\n }\n if (typeof value === \"number\" && ns.isNumericSchema()) {\n if (Math.abs(value) === Infinity || isNaN(value)) {\n return String(value);\n }\n return value;\n }\n if (typeof value === \"string\" && ns.isBlobSchema()) {\n if (ns === this.rootSchema) {\n return value;\n }\n return (this.serdeContext?.base64Encoder ?? toBase64)(value);\n }\n if (typeof value === \"bigint\") {\n this.useReplacer = true;\n }\n if (ns.isDocumentSchema()) {\n if (isObject) {\n const out = Array.isArray(value) ? [] : {};\n for (const [k, v] of Object.entries(value)) {\n if (v instanceof NumericValue) {\n this.useReplacer = true;\n out[k] = v;\n }\n else {\n out[k] = this._write(ns, v);\n }\n }\n return out;\n }\n else {\n return structuredClone(value);\n }\n }\n return value;\n }\n}\n", "import { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { JsonShapeDeserializer } from \"./JsonShapeDeserializer\";\nimport { JsonShapeSerializer } from \"./JsonShapeSerializer\";\nexport class JsonCodec extends SerdeContextConfig {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n createSerializer() {\n const serializer = new JsonShapeSerializer(this.settings);\n serializer.setSerdeContext(this.serdeContext);\n return serializer;\n }\n createDeserializer() {\n const deserializer = new JsonShapeDeserializer(this.settings);\n deserializer.setSerdeContext(this.serdeContext);\n return deserializer;\n }\n}\n", "import { RpcProtocol } from \"@smithy/core/protocols\";\nimport { deref, NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { JsonCodec } from \"./JsonCodec\";\nimport { loadRestJsonErrorCode } from \"./parseJsonBody\";\nexport class AwsJsonRpcProtocol extends RpcProtocol {\n serializer;\n deserializer;\n serviceTarget;\n codec;\n mixin;\n awsQueryCompatible;\n constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {\n super({\n defaultNamespace,\n });\n this.serviceTarget = serviceTarget;\n this.codec =\n jsonCodec ??\n new JsonCodec({\n timestampFormat: {\n useTrait: true,\n default: 7,\n },\n jsonName: false,\n });\n this.serializer = this.codec.createSerializer();\n this.deserializer = this.codec.createDeserializer();\n this.awsQueryCompatible = !!awsQueryCompatible;\n this.mixin = new ProtocolLib(this.awsQueryCompatible);\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n if (!request.path.endsWith(\"/\")) {\n request.path += \"/\";\n }\n Object.assign(request.headers, {\n \"content-type\": `application/x-amz-json-${this.getJsonRpcVersion()}`,\n \"x-amz-target\": `${this.serviceTarget}.${operationSchema.name}`,\n });\n if (this.awsQueryCompatible) {\n request.headers[\"x-amzn-query-mode\"] = \"true\";\n }\n if (deref(operationSchema.input) === \"unit\" || !request.body) {\n request.body = \"{}\";\n }\n return request;\n }\n getPayloadCodec() {\n return this.codec;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n if (this.awsQueryCompatible) {\n this.mixin.setQueryCompatError(dataObject, response);\n }\n const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? \"Unknown\";\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined);\n const ns = NormalizedSchema.of(errorSchema);\n const message = dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor(message);\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n if (dataObject[name] != null) {\n output[name] = this.codec.createDeserializer().readObject(member, dataObject[name]);\n }\n }\n if (this.awsQueryCompatible) {\n this.mixin.queryCompatOutput(dataObject, output);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n}\n", "import { AwsJsonRpcProtocol } from \"./AwsJsonRpcProtocol\";\nexport class AwsJson1_0Protocol extends AwsJsonRpcProtocol {\n constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {\n super({\n defaultNamespace,\n serviceTarget,\n awsQueryCompatible,\n jsonCodec,\n });\n }\n getShapeId() {\n return \"aws.protocols#awsJson1_0\";\n }\n getJsonRpcVersion() {\n return \"1.0\";\n }\n getDefaultContentType() {\n return \"application/x-amz-json-1.0\";\n }\n}\n", "import { AwsJsonRpcProtocol } from \"./AwsJsonRpcProtocol\";\nexport class AwsJson1_1Protocol extends AwsJsonRpcProtocol {\n constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) {\n super({\n defaultNamespace,\n serviceTarget,\n awsQueryCompatible,\n jsonCodec,\n });\n }\n getShapeId() {\n return \"aws.protocols#awsJson1_1\";\n }\n getJsonRpcVersion() {\n return \"1.1\";\n }\n getDefaultContentType() {\n return \"application/x-amz-json-1.1\";\n }\n}\n", "import { HttpBindingProtocol, HttpInterceptingShapeDeserializer, HttpInterceptingShapeSerializer, } from \"@smithy/core/protocols\";\nimport { NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { JsonCodec } from \"./JsonCodec\";\nimport { loadRestJsonErrorCode } from \"./parseJsonBody\";\nexport class AwsRestJsonProtocol extends HttpBindingProtocol {\n serializer;\n deserializer;\n codec;\n mixin = new ProtocolLib();\n constructor({ defaultNamespace }) {\n super({\n defaultNamespace,\n });\n const settings = {\n timestampFormat: {\n useTrait: true,\n default: 7,\n },\n httpBindings: true,\n jsonName: true,\n };\n this.codec = new JsonCodec(settings);\n this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);\n this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);\n }\n getShapeId() {\n return \"aws.protocols#restJson1\";\n }\n getPayloadCodec() {\n return this.codec;\n }\n setSerdeContext(serdeContext) {\n this.codec.setSerdeContext(serdeContext);\n super.setSerdeContext(serdeContext);\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n const inputSchema = NormalizedSchema.of(operationSchema.input);\n if (!request.headers[\"content-type\"]) {\n const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);\n if (contentType) {\n request.headers[\"content-type\"] = contentType;\n }\n }\n if (request.body == null && request.headers[\"content-type\"] === this.getDefaultContentType()) {\n request.body = \"{}\";\n }\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const output = await super.deserializeResponse(operationSchema, context, response);\n const outputSchema = NormalizedSchema.of(operationSchema.output);\n for (const [name, member] of outputSchema.structIterator()) {\n if (member.getMemberTraits().httpPayload && !(name in output)) {\n output[name] = null;\n }\n }\n return output;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? \"Unknown\";\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);\n const ns = NormalizedSchema.of(errorSchema);\n const message = dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor(message);\n await this.deserializeHttpMessage(errorSchema, context, response, dataObject);\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n const target = member.getMergedTraits().jsonName ?? name;\n output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n getDefaultContentType() {\n return \"application/json\";\n }\n}\n", "import { expectUnion } from \"@smithy/smithy-client\";\nexport const awsExpectUnion = (value) => {\n if (value == null) {\n return undefined;\n }\n if (typeof value === \"object\" && \"__type\" in value) {\n delete value.__type;\n }\n return expectUnion(value);\n};\n", "export function escapeAttribute(value) {\n return value.replace(/&/g, \"&\").replace(//g, \">\").replace(/\"/g, \""\");\n}\n", "export function escapeElement(value) {\n return value\n .replace(/&/g, \"&\")\n .replace(/\"/g, \""\")\n .replace(/'/g, \"'\")\n .replace(//g, \">\")\n .replace(/\\r/g, \" \")\n .replace(/\\n/g, \" \")\n .replace(/\\u0085/g, \"…\")\n .replace(/\\u2028/, \"
\");\n}\n", "import { escapeElement } from \"./escape-element\";\nexport class XmlText {\n value;\n constructor(value) {\n this.value = value;\n }\n toString() {\n return escapeElement(\"\" + this.value);\n }\n}\n", "import { escapeAttribute } from \"./escape-attribute\";\nimport { XmlText } from \"./XmlText\";\nexport class XmlNode {\n name;\n children;\n attributes = {};\n static of(name, childText, withName) {\n const node = new XmlNode(name);\n if (childText !== undefined) {\n node.addChildNode(new XmlText(childText));\n }\n if (withName !== undefined) {\n node.withName(withName);\n }\n return node;\n }\n constructor(name, children = []) {\n this.name = name;\n this.children = children;\n }\n withName(name) {\n this.name = name;\n return this;\n }\n addAttribute(name, value) {\n this.attributes[name] = value;\n return this;\n }\n addChildNode(child) {\n this.children.push(child);\n return this;\n }\n removeAttribute(name) {\n delete this.attributes[name];\n return this;\n }\n n(name) {\n this.name = name;\n return this;\n }\n c(child) {\n this.children.push(child);\n return this;\n }\n a(name, value) {\n if (value != null) {\n this.attributes[name] = value;\n }\n return this;\n }\n cc(input, field, withName = field) {\n if (input[field] != null) {\n const node = XmlNode.of(field, input[field]).withName(withName);\n this.c(node);\n }\n }\n l(input, listName, memberName, valueProvider) {\n if (input[listName] != null) {\n const nodes = valueProvider();\n nodes.map((node) => {\n node.withName(memberName);\n this.c(node);\n });\n }\n }\n lc(input, listName, memberName, valueProvider) {\n if (input[listName] != null) {\n const nodes = valueProvider();\n const containerNode = new XmlNode(memberName);\n nodes.map((node) => {\n containerNode.c(node);\n });\n this.c(containerNode);\n }\n }\n toString() {\n const hasChildren = Boolean(this.children.length);\n let xmlText = `<${this.name}`;\n const attributes = this.attributes;\n for (const attributeName of Object.keys(attributes)) {\n const attribute = attributes[attributeName];\n if (attribute != null) {\n xmlText += ` ${attributeName}=\"${escapeAttribute(\"\" + attribute)}\"`;\n }\n }\n return (xmlText += !hasChildren ? \"/>\" : `>${this.children.map((c) => c.toString()).join(\"\")}`);\n }\n}\n", "let parser;\nexport function parseXML(xmlString) {\n if (!parser) {\n parser = new DOMParser();\n }\n const xmlDocument = parser.parseFromString(xmlString, \"application/xml\");\n if (xmlDocument.getElementsByTagName(\"parsererror\").length > 0) {\n throw new Error(\"DOMParser XML parsing error.\");\n }\n const xmlToObj = (node) => {\n if (node.nodeType === Node.TEXT_NODE) {\n if (node.textContent?.trim()) {\n return node.textContent;\n }\n }\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node;\n if (element.attributes.length === 0 && element.childNodes.length === 0) {\n return \"\";\n }\n const obj = {};\n const attributes = Array.from(element.attributes);\n for (const attr of attributes) {\n obj[`${attr.name}`] = attr.value;\n }\n const childNodes = Array.from(element.childNodes);\n for (const child of childNodes) {\n const childResult = xmlToObj(child);\n if (childResult != null) {\n const childName = child.nodeName;\n if (childNodes.length === 1 && attributes.length === 0 && childName === \"#text\") {\n return childResult;\n }\n if (obj[childName]) {\n if (Array.isArray(obj[childName])) {\n obj[childName].push(childResult);\n }\n else {\n obj[childName] = [obj[childName], childResult];\n }\n }\n else {\n obj[childName] = childResult;\n }\n }\n else if (childNodes.length === 1 && attributes.length === 0) {\n return element.textContent;\n }\n }\n return obj;\n }\n return null;\n };\n return {\n [xmlDocument.documentElement.nodeName]: xmlToObj(xmlDocument.documentElement),\n };\n}\n", "export * from \"./XmlNode\";\nexport * from \"./XmlText\";\nexport { parseXML } from \"./xml-parser\";\n", "import { parseXML } from \"@aws-sdk/xml-builder\";\nimport { FromStringShapeDeserializer } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { getValueFromTextNode } from \"@smithy/smithy-client\";\nimport { toUtf8 } from \"@smithy/util-utf8\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { UnionSerde } from \"../UnionSerde\";\nexport class XmlShapeDeserializer extends SerdeContextConfig {\n settings;\n stringDeserializer;\n constructor(settings) {\n super();\n this.settings = settings;\n this.stringDeserializer = new FromStringShapeDeserializer(settings);\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n this.stringDeserializer.setSerdeContext(serdeContext);\n }\n read(schema, bytes, key) {\n const ns = NormalizedSchema.of(schema);\n const memberSchemas = ns.getMemberSchemas();\n const isEventPayload = ns.isStructSchema() &&\n ns.isMemberSchema() &&\n !!Object.values(memberSchemas).find((memberNs) => {\n return !!memberNs.getMemberTraits().eventPayload;\n });\n if (isEventPayload) {\n const output = {};\n const memberName = Object.keys(memberSchemas)[0];\n const eventMemberSchema = memberSchemas[memberName];\n if (eventMemberSchema.isBlobSchema()) {\n output[memberName] = bytes;\n }\n else {\n output[memberName] = this.read(memberSchemas[memberName], bytes);\n }\n return output;\n }\n const xmlString = (this.serdeContext?.utf8Encoder ?? toUtf8)(bytes);\n const parsedObject = this.parseXml(xmlString);\n return this.readSchema(schema, key ? parsedObject[key] : parsedObject);\n }\n readSchema(_schema, value) {\n const ns = NormalizedSchema.of(_schema);\n if (ns.isUnitSchema()) {\n return;\n }\n const traits = ns.getMergedTraits();\n if (ns.isListSchema() && !Array.isArray(value)) {\n return this.readSchema(ns, [value]);\n }\n if (value == null) {\n return value;\n }\n if (typeof value === \"object\") {\n const flat = !!traits.xmlFlattened;\n if (ns.isListSchema()) {\n const listValue = ns.getValueSchema();\n const buffer = [];\n const sourceKey = listValue.getMergedTraits().xmlName ?? \"member\";\n const source = flat ? value : (value[0] ?? value)[sourceKey];\n if (source == null) {\n return buffer;\n }\n const sourceArray = Array.isArray(source) ? source : [source];\n for (const v of sourceArray) {\n buffer.push(this.readSchema(listValue, v));\n }\n return buffer;\n }\n const buffer = {};\n if (ns.isMapSchema()) {\n const keyNs = ns.getKeySchema();\n const memberNs = ns.getValueSchema();\n let entries;\n if (flat) {\n entries = Array.isArray(value) ? value : [value];\n }\n else {\n entries = Array.isArray(value.entry) ? value.entry : [value.entry];\n }\n const keyProperty = keyNs.getMergedTraits().xmlName ?? \"key\";\n const valueProperty = memberNs.getMergedTraits().xmlName ?? \"value\";\n for (const entry of entries) {\n const key = entry[keyProperty];\n const value = entry[valueProperty];\n buffer[key] = this.readSchema(memberNs, value);\n }\n return buffer;\n }\n if (ns.isStructSchema()) {\n const union = ns.isUnionSchema();\n let unionSerde;\n if (union) {\n unionSerde = new UnionSerde(value, buffer);\n }\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const memberTraits = memberSchema.getMergedTraits();\n const xmlObjectKey = !memberTraits.httpPayload\n ? memberSchema.getMemberTraits().xmlName ?? memberName\n : memberTraits.xmlName ?? memberSchema.getName();\n if (union) {\n unionSerde.mark(xmlObjectKey);\n }\n if (value[xmlObjectKey] != null) {\n buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]);\n }\n }\n if (union) {\n unionSerde.writeUnknown();\n }\n return buffer;\n }\n if (ns.isDocumentSchema()) {\n return value;\n }\n throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`);\n }\n if (ns.isListSchema()) {\n return [];\n }\n if (ns.isMapSchema() || ns.isStructSchema()) {\n return {};\n }\n return this.stringDeserializer.read(ns, value);\n }\n parseXml(xml) {\n if (xml.length) {\n let parsedObj;\n try {\n parsedObj = parseXML(xml);\n }\n catch (e) {\n if (e && typeof e === \"object\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: xml,\n });\n }\n throw e;\n }\n const textNodeName = \"#text\";\n const key = Object.keys(parsedObj)[0];\n const parsedObjToReturn = parsedObj[key];\n if (parsedObjToReturn[textNodeName]) {\n parsedObjToReturn[key] = parsedObjToReturn[textNodeName];\n delete parsedObjToReturn[textNodeName];\n }\n return getValueFromTextNode(parsedObjToReturn);\n }\n return {};\n }\n}\n", "import { determineTimestampFormat, extendedEncodeURIComponent } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { generateIdempotencyToken, NumericValue } from \"@smithy/core/serde\";\nimport { dateToUtcString } from \"@smithy/smithy-client\";\nimport { toBase64 } from \"@smithy/util-base64\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nexport class QueryShapeSerializer extends SerdeContextConfig {\n settings;\n buffer;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value, prefix = \"\") {\n if (this.buffer === undefined) {\n this.buffer = \"\";\n }\n const ns = NormalizedSchema.of(schema);\n if (prefix && !prefix.endsWith(\".\")) {\n prefix += \".\";\n }\n if (ns.isBlobSchema()) {\n if (typeof value === \"string\" || value instanceof Uint8Array) {\n this.writeKey(prefix);\n this.writeValue((this.serdeContext?.base64Encoder ?? toBase64)(value));\n }\n }\n else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) {\n if (value != null) {\n this.writeKey(prefix);\n this.writeValue(String(value));\n }\n else if (ns.isIdempotencyToken()) {\n this.writeKey(prefix);\n this.writeValue(generateIdempotencyToken());\n }\n }\n else if (ns.isBigIntegerSchema()) {\n if (value != null) {\n this.writeKey(prefix);\n this.writeValue(String(value));\n }\n }\n else if (ns.isBigDecimalSchema()) {\n if (value != null) {\n this.writeKey(prefix);\n this.writeValue(value instanceof NumericValue ? value.string : String(value));\n }\n }\n else if (ns.isTimestampSchema()) {\n if (value instanceof Date) {\n this.writeKey(prefix);\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n this.writeValue(value.toISOString().replace(\".000Z\", \"Z\"));\n break;\n case 6:\n this.writeValue(dateToUtcString(value));\n break;\n case 7:\n this.writeValue(String(value.getTime() / 1000));\n break;\n }\n }\n }\n else if (ns.isDocumentSchema()) {\n if (Array.isArray(value)) {\n this.write(64 | 15, value, prefix);\n }\n else if (value instanceof Date) {\n this.write(4, value, prefix);\n }\n else if (value instanceof Uint8Array) {\n this.write(21, value, prefix);\n }\n else if (value && typeof value === \"object\") {\n this.write(128 | 15, value, prefix);\n }\n else {\n this.writeKey(prefix);\n this.writeValue(String(value));\n }\n }\n else if (ns.isListSchema()) {\n if (Array.isArray(value)) {\n if (value.length === 0) {\n if (this.settings.serializeEmptyLists) {\n this.writeKey(prefix);\n this.writeValue(\"\");\n }\n }\n else {\n const member = ns.getValueSchema();\n const flat = this.settings.flattenLists || ns.getMergedTraits().xmlFlattened;\n let i = 1;\n for (const item of value) {\n if (item == null) {\n continue;\n }\n const traits = member.getMergedTraits();\n const suffix = this.getKey(\"member\", traits.xmlName, traits.ec2QueryName);\n const key = flat ? `${prefix}${i}` : `${prefix}${suffix}.${i}`;\n this.write(member, item, key);\n ++i;\n }\n }\n }\n }\n else if (ns.isMapSchema()) {\n if (value && typeof value === \"object\") {\n const keySchema = ns.getKeySchema();\n const memberSchema = ns.getValueSchema();\n const flat = ns.getMergedTraits().xmlFlattened;\n let i = 1;\n for (const [k, v] of Object.entries(value)) {\n if (v == null) {\n continue;\n }\n const keyTraits = keySchema.getMergedTraits();\n const keySuffix = this.getKey(\"key\", keyTraits.xmlName, keyTraits.ec2QueryName);\n const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`;\n const valTraits = memberSchema.getMergedTraits();\n const valueSuffix = this.getKey(\"value\", valTraits.xmlName, valTraits.ec2QueryName);\n const valueKey = flat ? `${prefix}${i}.${valueSuffix}` : `${prefix}entry.${i}.${valueSuffix}`;\n this.write(keySchema, k, key);\n this.write(memberSchema, v, valueKey);\n ++i;\n }\n }\n }\n else if (ns.isStructSchema()) {\n if (value && typeof value === \"object\") {\n let didWriteMember = false;\n for (const [memberName, member] of ns.structIterator()) {\n if (value[memberName] == null && !member.isIdempotencyToken()) {\n continue;\n }\n const traits = member.getMergedTraits();\n const suffix = this.getKey(memberName, traits.xmlName, traits.ec2QueryName, \"struct\");\n const key = `${prefix}${suffix}`;\n this.write(member, value[memberName], key);\n didWriteMember = true;\n }\n if (!didWriteMember && ns.isUnionSchema()) {\n const { $unknown } = value;\n if (Array.isArray($unknown)) {\n const [k, v] = $unknown;\n const key = `${prefix}${k}`;\n this.write(15, v, key);\n }\n }\n }\n }\n else if (ns.isUnitSchema()) {\n }\n else {\n throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`);\n }\n }\n flush() {\n if (this.buffer === undefined) {\n throw new Error(\"@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.\");\n }\n const str = this.buffer;\n delete this.buffer;\n return str;\n }\n getKey(memberName, xmlName, ec2QueryName, keySource) {\n const { ec2, capitalizeKeys } = this.settings;\n if (ec2 && ec2QueryName) {\n return ec2QueryName;\n }\n const key = xmlName ?? memberName;\n if (capitalizeKeys && keySource === \"struct\") {\n return key[0].toUpperCase() + key.slice(1);\n }\n return key;\n }\n writeKey(key) {\n if (key.endsWith(\".\")) {\n key = key.slice(0, key.length - 1);\n }\n this.buffer += `&${extendedEncodeURIComponent(key)}=`;\n }\n writeValue(value) {\n this.buffer += extendedEncodeURIComponent(value);\n }\n}\n", "import { collectBody, RpcProtocol } from \"@smithy/core/protocols\";\nimport { deref, NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { XmlShapeDeserializer } from \"../xml/XmlShapeDeserializer\";\nimport { QueryShapeSerializer } from \"./QueryShapeSerializer\";\nexport class AwsQueryProtocol extends RpcProtocol {\n options;\n serializer;\n deserializer;\n mixin = new ProtocolLib();\n constructor(options) {\n super({\n defaultNamespace: options.defaultNamespace,\n });\n this.options = options;\n const settings = {\n timestampFormat: {\n useTrait: true,\n default: 5,\n },\n httpBindings: false,\n xmlNamespace: options.xmlNamespace,\n serviceNamespace: options.defaultNamespace,\n serializeEmptyLists: true,\n };\n this.serializer = new QueryShapeSerializer(settings);\n this.deserializer = new XmlShapeDeserializer(settings);\n }\n getShapeId() {\n return \"aws.protocols#awsQuery\";\n }\n setSerdeContext(serdeContext) {\n this.serializer.setSerdeContext(serdeContext);\n this.deserializer.setSerdeContext(serdeContext);\n }\n getPayloadCodec() {\n throw new Error(\"AWSQuery protocol has no payload codec.\");\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n if (!request.path.endsWith(\"/\")) {\n request.path += \"/\";\n }\n Object.assign(request.headers, {\n \"content-type\": `application/x-www-form-urlencoded`,\n });\n if (deref(operationSchema.input) === \"unit\" || !request.body) {\n request.body = \"\";\n }\n const action = operationSchema.name.split(\"#\")[1] ?? operationSchema.name;\n request.body = `Action=${action}&Version=${this.options.version}` + request.body;\n if (request.body.endsWith(\"&\")) {\n request.body = request.body.slice(-1);\n }\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(15, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const shortName = operationSchema.name.split(\"#\")[1] ?? operationSchema.name;\n const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + \"Result\" : undefined;\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));\n }\n const output = {\n $metadata: this.deserializeMetadata(response),\n ...dataObject,\n };\n return output;\n }\n useNestedResult() {\n return true;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? \"Unknown\";\n const errorData = this.loadQueryError(dataObject) ?? {};\n const message = this.loadQueryErrorMessage(dataObject);\n errorData.message = message;\n errorData.Error = {\n Type: errorData.Type,\n Code: errorData.Code,\n Message: message,\n };\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, this.mixin.findQueryCompatibleError);\n const ns = NormalizedSchema.of(errorSchema);\n const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor(message);\n const output = {\n Type: errorData.Error.Type,\n Code: errorData.Error.Code,\n Error: errorData.Error,\n };\n for (const [name, member] of ns.structIterator()) {\n const target = member.getMergedTraits().xmlName ?? name;\n const value = errorData[target] ?? dataObject[target];\n output[name] = this.deserializer.readSchema(member, value);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n loadQueryErrorCode(output, data) {\n const code = (data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error)?.Code;\n if (code !== undefined) {\n return code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n }\n loadQueryError(data) {\n return data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error;\n }\n loadQueryErrorMessage(data) {\n const errorData = this.loadQueryError(data);\n return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? \"Unknown\";\n }\n getDefaultContentType() {\n return \"application/x-www-form-urlencoded\";\n }\n}\n", "import { AwsQueryProtocol } from \"./AwsQueryProtocol\";\nexport class AwsEc2QueryProtocol extends AwsQueryProtocol {\n options;\n constructor(options) {\n super(options);\n this.options = options;\n const ec2Settings = {\n capitalizeKeys: true,\n flattenLists: true,\n serializeEmptyLists: false,\n ec2: true,\n };\n Object.assign(this.serializer.settings, ec2Settings);\n }\n getShapeId() {\n return \"aws.protocols#ec2Query\";\n }\n useNestedResult() {\n return false;\n }\n}\n", "export {};\n", "import { parseXML } from \"@aws-sdk/xml-builder\";\nimport { getValueFromTextNode } from \"@smithy/smithy-client\";\nimport { collectBodyString } from \"../common\";\nexport const parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n let parsedObj;\n try {\n parsedObj = parseXML(encoded);\n }\n catch (e) {\n if (e && typeof e === \"object\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: encoded,\n });\n }\n throw e;\n }\n const textNodeName = \"#text\";\n const key = Object.keys(parsedObj)[0];\n const parsedObjToReturn = parsedObj[key];\n if (parsedObjToReturn[textNodeName]) {\n parsedObjToReturn[key] = parsedObjToReturn[textNodeName];\n delete parsedObjToReturn[textNodeName];\n }\n return getValueFromTextNode(parsedObjToReturn);\n }\n return {};\n});\nexport const parseXmlErrorBody = async (errorBody, context) => {\n const value = await parseXmlBody(errorBody, context);\n if (value.Error) {\n value.Error.message = value.Error.message ?? value.Error.Message;\n }\n return value;\n};\nexport const loadRestXmlErrorCode = (output, data) => {\n if (data?.Error?.Code !== undefined) {\n return data.Error.Code;\n }\n if (data?.Code !== undefined) {\n return data.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n};\n", "import { XmlNode, XmlText } from \"@aws-sdk/xml-builder\";\nimport { determineTimestampFormat } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { generateIdempotencyToken, NumericValue } from \"@smithy/core/serde\";\nimport { dateToUtcString } from \"@smithy/smithy-client\";\nimport { fromBase64, toBase64 } from \"@smithy/util-base64\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nexport class XmlShapeSerializer extends SerdeContextConfig {\n settings;\n stringBuffer;\n byteBuffer;\n buffer;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value) {\n const ns = NormalizedSchema.of(schema);\n if (ns.isStringSchema() && typeof value === \"string\") {\n this.stringBuffer = value;\n }\n else if (ns.isBlobSchema()) {\n this.byteBuffer =\n \"byteLength\" in value\n ? value\n : (this.serdeContext?.base64Decoder ?? fromBase64)(value);\n }\n else {\n this.buffer = this.writeStruct(ns, value, undefined);\n const traits = ns.getMergedTraits();\n if (traits.httpPayload && !traits.xmlName) {\n this.buffer.withName(ns.getName());\n }\n }\n }\n flush() {\n if (this.byteBuffer !== undefined) {\n const bytes = this.byteBuffer;\n delete this.byteBuffer;\n return bytes;\n }\n if (this.stringBuffer !== undefined) {\n const str = this.stringBuffer;\n delete this.stringBuffer;\n return str;\n }\n const buffer = this.buffer;\n if (this.settings.xmlNamespace) {\n if (!buffer?.attributes?.[\"xmlns\"]) {\n buffer.addAttribute(\"xmlns\", this.settings.xmlNamespace);\n }\n }\n delete this.buffer;\n return buffer.toString();\n }\n writeStruct(ns, value, parentXmlns) {\n const traits = ns.getMergedTraits();\n const name = ns.isMemberSchema() && !traits.httpPayload\n ? ns.getMemberTraits().xmlName ?? ns.getMemberName()\n : traits.xmlName ?? ns.getName();\n if (!name || !ns.isStructSchema()) {\n throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${ns.getName(true)}.`);\n }\n const structXmlNode = XmlNode.of(name);\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const val = value[memberName];\n if (val != null || memberSchema.isIdempotencyToken()) {\n if (memberSchema.getMergedTraits().xmlAttribute) {\n structXmlNode.addAttribute(memberSchema.getMergedTraits().xmlName ?? memberName, this.writeSimple(memberSchema, val));\n continue;\n }\n if (memberSchema.isListSchema()) {\n this.writeList(memberSchema, val, structXmlNode, xmlns);\n }\n else if (memberSchema.isMapSchema()) {\n this.writeMap(memberSchema, val, structXmlNode, xmlns);\n }\n else if (memberSchema.isStructSchema()) {\n structXmlNode.addChildNode(this.writeStruct(memberSchema, val, xmlns));\n }\n else {\n const memberNode = XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName());\n this.writeSimpleInto(memberSchema, val, memberNode, xmlns);\n structXmlNode.addChildNode(memberNode);\n }\n }\n }\n const { $unknown } = value;\n if ($unknown && ns.isUnionSchema() && Array.isArray($unknown) && Object.keys(value).length === 1) {\n const [k, v] = $unknown;\n const node = XmlNode.of(k);\n if (typeof v !== \"string\") {\n if (value instanceof XmlNode || value instanceof XmlText) {\n structXmlNode.addChildNode(value);\n }\n else {\n throw new Error(`@aws-sdk - $unknown union member in XML requires ` +\n `value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`);\n }\n }\n this.writeSimpleInto(0, v, node, xmlns);\n structXmlNode.addChildNode(node);\n }\n if (xmlns) {\n structXmlNode.addAttribute(xmlnsAttr, xmlns);\n }\n return structXmlNode;\n }\n writeList(listMember, array, container, parentXmlns) {\n if (!listMember.isMemberSchema()) {\n throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${listMember.getName(true)}`);\n }\n const listTraits = listMember.getMergedTraits();\n const listValueSchema = listMember.getValueSchema();\n const listValueTraits = listValueSchema.getMergedTraits();\n const sparse = !!listValueTraits.sparse;\n const flat = !!listTraits.xmlFlattened;\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(listMember, parentXmlns);\n const writeItem = (container, value) => {\n if (listValueSchema.isListSchema()) {\n this.writeList(listValueSchema, Array.isArray(value) ? value : [value], container, xmlns);\n }\n else if (listValueSchema.isMapSchema()) {\n this.writeMap(listValueSchema, value, container, xmlns);\n }\n else if (listValueSchema.isStructSchema()) {\n const struct = this.writeStruct(listValueSchema, value, xmlns);\n container.addChildNode(struct.withName(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? \"member\"));\n }\n else {\n const listItemNode = XmlNode.of(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? \"member\");\n this.writeSimpleInto(listValueSchema, value, listItemNode, xmlns);\n container.addChildNode(listItemNode);\n }\n };\n if (flat) {\n for (const value of array) {\n if (sparse || value != null) {\n writeItem(container, value);\n }\n }\n }\n else {\n const listNode = XmlNode.of(listTraits.xmlName ?? listMember.getMemberName());\n if (xmlns) {\n listNode.addAttribute(xmlnsAttr, xmlns);\n }\n for (const value of array) {\n if (sparse || value != null) {\n writeItem(listNode, value);\n }\n }\n container.addChildNode(listNode);\n }\n }\n writeMap(mapMember, map, container, parentXmlns, containerIsMap = false) {\n if (!mapMember.isMemberSchema()) {\n throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}`);\n }\n const mapTraits = mapMember.getMergedTraits();\n const mapKeySchema = mapMember.getKeySchema();\n const mapKeyTraits = mapKeySchema.getMergedTraits();\n const keyTag = mapKeyTraits.xmlName ?? \"key\";\n const mapValueSchema = mapMember.getValueSchema();\n const mapValueTraits = mapValueSchema.getMergedTraits();\n const valueTag = mapValueTraits.xmlName ?? \"value\";\n const sparse = !!mapValueTraits.sparse;\n const flat = !!mapTraits.xmlFlattened;\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(mapMember, parentXmlns);\n const addKeyValue = (entry, key, val) => {\n const keyNode = XmlNode.of(keyTag, key);\n const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns);\n if (keyXmlns) {\n keyNode.addAttribute(keyXmlnsAttr, keyXmlns);\n }\n entry.addChildNode(keyNode);\n let valueNode = XmlNode.of(valueTag);\n if (mapValueSchema.isListSchema()) {\n this.writeList(mapValueSchema, val, valueNode, xmlns);\n }\n else if (mapValueSchema.isMapSchema()) {\n this.writeMap(mapValueSchema, val, valueNode, xmlns, true);\n }\n else if (mapValueSchema.isStructSchema()) {\n valueNode = this.writeStruct(mapValueSchema, val, xmlns);\n }\n else {\n this.writeSimpleInto(mapValueSchema, val, valueNode, xmlns);\n }\n entry.addChildNode(valueNode);\n };\n if (flat) {\n for (const [key, val] of Object.entries(map)) {\n if (sparse || val != null) {\n const entry = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());\n addKeyValue(entry, key, val);\n container.addChildNode(entry);\n }\n }\n }\n else {\n let mapNode;\n if (!containerIsMap) {\n mapNode = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());\n if (xmlns) {\n mapNode.addAttribute(xmlnsAttr, xmlns);\n }\n container.addChildNode(mapNode);\n }\n for (const [key, val] of Object.entries(map)) {\n if (sparse || val != null) {\n const entry = XmlNode.of(\"entry\");\n addKeyValue(entry, key, val);\n (containerIsMap ? container : mapNode).addChildNode(entry);\n }\n }\n }\n }\n writeSimple(_schema, value) {\n if (null === value) {\n throw new Error(\"@aws-sdk/core/protocols - (XML serializer) cannot write null value.\");\n }\n const ns = NormalizedSchema.of(_schema);\n let nodeContents = null;\n if (value && typeof value === \"object\") {\n if (ns.isBlobSchema()) {\n nodeContents = (this.serdeContext?.base64Encoder ?? toBase64)(value);\n }\n else if (ns.isTimestampSchema() && value instanceof Date) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n nodeContents = value.toISOString().replace(\".000Z\", \"Z\");\n break;\n case 6:\n nodeContents = dateToUtcString(value);\n break;\n case 7:\n nodeContents = String(value.getTime() / 1000);\n break;\n default:\n console.warn(\"Missing timestamp format, using http date\", value);\n nodeContents = dateToUtcString(value);\n break;\n }\n }\n else if (ns.isBigDecimalSchema() && value) {\n if (value instanceof NumericValue) {\n return value.string;\n }\n return String(value);\n }\n else if (ns.isMapSchema() || ns.isListSchema()) {\n throw new Error(\"@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead.\");\n }\n else {\n throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${ns.getName(true)}`);\n }\n }\n if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {\n nodeContents = String(value);\n }\n if (ns.isStringSchema()) {\n if (value === undefined && ns.isIdempotencyToken()) {\n nodeContents = generateIdempotencyToken();\n }\n else {\n nodeContents = String(value);\n }\n }\n if (nodeContents === null) {\n throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`);\n }\n return nodeContents;\n }\n writeSimpleInto(_schema, value, into, parentXmlns) {\n const nodeContents = this.writeSimple(_schema, value);\n const ns = NormalizedSchema.of(_schema);\n const content = new XmlText(nodeContents);\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);\n if (xmlns) {\n into.addAttribute(xmlnsAttr, xmlns);\n }\n into.addChildNode(content);\n }\n getXmlnsAttribute(ns, parentXmlns) {\n const traits = ns.getMergedTraits();\n const [prefix, xmlns] = traits.xmlNamespace ?? [];\n if (xmlns && xmlns !== parentXmlns) {\n return [prefix ? `xmlns:${prefix}` : \"xmlns\", xmlns];\n }\n return [void 0, void 0];\n }\n}\n", "import { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { XmlShapeDeserializer } from \"./XmlShapeDeserializer\";\nimport { XmlShapeSerializer } from \"./XmlShapeSerializer\";\nexport class XmlCodec extends SerdeContextConfig {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n createSerializer() {\n const serializer = new XmlShapeSerializer(this.settings);\n serializer.setSerdeContext(this.serdeContext);\n return serializer;\n }\n createDeserializer() {\n const deserializer = new XmlShapeDeserializer(this.settings);\n deserializer.setSerdeContext(this.serdeContext);\n return deserializer;\n }\n}\n", "import { HttpBindingProtocol, HttpInterceptingShapeDeserializer, HttpInterceptingShapeSerializer, } from \"@smithy/core/protocols\";\nimport { NormalizedSchema, TypeRegistry } from \"@smithy/core/schema\";\nimport { ProtocolLib } from \"../ProtocolLib\";\nimport { loadRestXmlErrorCode } from \"./parseXmlBody\";\nimport { XmlCodec } from \"./XmlCodec\";\nexport class AwsRestXmlProtocol extends HttpBindingProtocol {\n codec;\n serializer;\n deserializer;\n mixin = new ProtocolLib();\n constructor(options) {\n super(options);\n const settings = {\n timestampFormat: {\n useTrait: true,\n default: 5,\n },\n httpBindings: true,\n xmlNamespace: options.xmlNamespace,\n serviceNamespace: options.defaultNamespace,\n };\n this.codec = new XmlCodec(settings);\n this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);\n this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);\n }\n getPayloadCodec() {\n return this.codec;\n }\n getShapeId() {\n return \"aws.protocols#restXml\";\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n const inputSchema = NormalizedSchema.of(operationSchema.input);\n if (!request.headers[\"content-type\"]) {\n const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);\n if (contentType) {\n request.headers[\"content-type\"] = contentType;\n }\n }\n if (typeof request.body === \"string\" &&\n request.headers[\"content-type\"] === this.getDefaultContentType() &&\n !request.body.startsWith(\"' + request.body;\n }\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n return super.deserializeResponse(operationSchema, context, response);\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? \"Unknown\";\n if (dataObject.Error && typeof dataObject.Error === \"object\") {\n for (const key of Object.keys(dataObject.Error)) {\n dataObject[key] = dataObject.Error[key];\n if (key.toLowerCase() === \"message\") {\n dataObject.message = dataObject.Error[key];\n }\n }\n }\n if (dataObject.RequestId && !metadata.requestId) {\n metadata.requestId = dataObject.RequestId;\n }\n const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);\n const ns = NormalizedSchema.of(errorSchema);\n const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;\n const exception = new ErrorCtor(message);\n await this.deserializeHttpMessage(errorSchema, context, response, dataObject);\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n const target = member.getMergedTraits().xmlName ?? name;\n const value = dataObject.Error?.[target] ?? dataObject[target];\n output[name] = this.codec.createDeserializer().readSchema(member, value);\n }\n throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {\n $fault: ns.getMergedTraits().error,\n message,\n }, output), dataObject);\n }\n getDefaultContentType() {\n return \"application/xml\";\n }\n hasUnstructuredPayloadBinding(ns) {\n for (const [, member] of ns.structIterator()) {\n if (member.getMergedTraits().httpPayload) {\n return !(member.isStructSchema() || member.isMapSchema() || member.isListSchema());\n }\n }\n return false;\n }\n}\n", "export * from \"./cbor/AwsSmithyRpcV2CborProtocol\";\nexport * from \"./coercing-serializers\";\nexport * from \"./json/AwsJson1_0Protocol\";\nexport * from \"./json/AwsJson1_1Protocol\";\nexport * from \"./json/AwsJsonRpcProtocol\";\nexport * from \"./json/AwsRestJsonProtocol\";\nexport * from \"./json/JsonCodec\";\nexport * from \"./json/JsonShapeDeserializer\";\nexport * from \"./json/JsonShapeSerializer\";\nexport * from \"./json/awsExpectUnion\";\nexport * from \"./json/parseJsonBody\";\nexport * from \"./query/AwsEc2QueryProtocol\";\nexport * from \"./query/AwsQueryProtocol\";\nexport * from \"./query/QuerySerializerSettings\";\nexport * from \"./query/QueryShapeSerializer\";\nexport * from \"./xml/AwsRestXmlProtocol\";\nexport * from \"./xml/XmlCodec\";\nexport * from \"./xml/XmlShapeDeserializer\";\nexport * from \"./xml/XmlShapeSerializer\";\nexport * from \"./xml/parseXmlBody\";\n", "export * from \"./submodules/client/index\";\nexport * from \"./submodules/httpAuthSchemes/index\";\nexport * from \"./submodules/protocols/index\";\n", "import { DEFAULT_CHECKSUM_ALGORITHM, RequestChecksumCalculation } from \"./constants\";\nexport const getChecksumAlgorithmForRequest = (input, { requestChecksumRequired, requestAlgorithmMember, requestChecksumCalculation }) => {\n if (!requestAlgorithmMember) {\n return requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired\n ? DEFAULT_CHECKSUM_ALGORITHM\n : undefined;\n }\n if (!input[requestAlgorithmMember]) {\n return undefined;\n }\n const checksumAlgorithm = input[requestAlgorithmMember];\n return checksumAlgorithm;\n};\n", "import { ChecksumAlgorithm } from \"./constants\";\nexport const getChecksumLocationName = (algorithm) => algorithm === ChecksumAlgorithm.MD5 ? \"content-md5\" : `x-amz-checksum-${algorithm.toLowerCase()}`;\n", "export const hasHeader = (header, headers) => {\n const soughtHeader = header.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true;\n }\n }\n return false;\n};\n", "export const hasHeaderWithPrefix = (headerPrefix, headers) => {\n const soughtHeaderPrefix = headerPrefix.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (headerName.toLowerCase().startsWith(soughtHeaderPrefix)) {\n return true;\n }\n }\n return false;\n};\n", "import { isArrayBuffer } from \"@smithy/is-array-buffer\";\nexport const isStreaming = (body) => body !== undefined && typeof body !== \"string\" && !ArrayBuffer.isView(body) && !isArrayBuffer(body);\n", "/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n", "export const fromUtf8 = (input) => new TextEncoder().encode(input);\n", "import { fromUtf8 } from \"./fromUtf8\";\nexport const toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n", "export const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return new TextDecoder(\"utf-8\").decode(input);\n};\n", "export * from \"./fromUtf8\";\nexport * from \"./toUint8Array\";\nexport * from \"./toUtf8\";\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SourceData } from \"@aws-sdk/types\";\nimport { fromUtf8 as fromUtf8Browser } from \"@smithy/util-utf8\";\n\n// Quick polyfill\nconst fromUtf8 =\n typeof Buffer !== \"undefined\" && Buffer.from\n ? (input: string) => Buffer.from(input, \"utf8\")\n : fromUtf8Browser;\n\nexport function convertToBuffer(data: SourceData): Uint8Array {\n // Already a Uint8, do nothing\n if (data instanceof Uint8Array) return data;\n\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(\n data.buffer,\n data.byteOffset,\n data.byteLength / Uint8Array.BYTES_PER_ELEMENT\n );\n }\n\n return new Uint8Array(data);\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SourceData } from \"@aws-sdk/types\";\n\nexport function isEmptyData(data: SourceData): boolean {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n\n return data.byteLength === 0;\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function numToUint8(num: number) {\n return new Uint8Array([\n (num & 0xff000000) >> 24,\n (num & 0x00ff0000) >> 16,\n (num & 0x0000ff00) >> 8,\n num & 0x000000ff,\n ]);\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n// IE 11 does not support Array.from, so we do it manually\nexport function uint32ArrayFrom(a_lookUpTable: Array): Uint32Array {\n if (!Uint32Array.from) {\n const return_array = new Uint32Array(a_lookUpTable.length)\n let a_index = 0\n while (a_index < a_lookUpTable.length) {\n return_array[a_index] = a_lookUpTable[a_index]\n a_index += 1\n }\n return return_array\n }\n return Uint32Array.from(a_lookUpTable)\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport { convertToBuffer } from \"./convertToBuffer\";\nexport { isEmptyData } from \"./isEmptyData\";\nexport { numToUint8 } from \"./numToUint8\";\nexport {uint32ArrayFrom} from './uint32ArrayFrom';\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { convertToBuffer, isEmptyData, numToUint8 } from \"@aws-crypto/util\";\nimport { Crc32c } from \"./index\";\n\nexport class AwsCrc32c implements Checksum {\n private crc32c = new Crc32c();\n\n update(toHash: SourceData) {\n if (isEmptyData(toHash)) return;\n\n this.crc32c.update(convertToBuffer(toHash));\n }\n\n async digest(): Promise {\n return numToUint8(this.crc32c.digest());\n }\n\n reset(): void {\n this.crc32c = new Crc32c();\n }\n}\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport {uint32ArrayFrom} from \"@aws-crypto/util\";\n\nexport function crc32c(data: Uint8Array): number {\n return new Crc32c().update(data).digest();\n}\n\nexport class Crc32c {\n private checksum = 0xffffffff;\n\n update(data: Uint8Array): this {\n for (const byte of data) {\n this.checksum =\n (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff];\n }\n\n return this;\n }\n\n digest(): number {\n return (this.checksum ^ 0xffffffff) >>> 0;\n }\n}\n\n// prettier-ignore\nconst a_lookupTable = [\n 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB,\n 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24,\n 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B, 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384,\n 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B,\n 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A, 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35,\n 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5, 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA,\n 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45, 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A,\n 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595,\n 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957,\n 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198,\n 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38,\n 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8, 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7,\n 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096, 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789,\n 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859, 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46,\n 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6,\n 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829,\n 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93,\n 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C,\n 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3, 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC,\n 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C, 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033,\n 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652, 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D,\n 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982,\n 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622,\n 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED,\n 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F,\n 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF, 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0,\n 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F, 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540,\n 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90, 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F,\n 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1,\n 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E,\n 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E,\n 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351,\n];\n\nconst lookupTable: Uint32Array = uint32ArrayFrom(a_lookupTable)\nexport { AwsCrc32c } from \"./aws_crc32c\";\n", "const generateCRC64NVMETable = () => {\n const sliceLength = 8;\n const tables = new Array(sliceLength);\n for (let slice = 0; slice < sliceLength; slice++) {\n const table = new Array(512);\n for (let i = 0; i < 256; i++) {\n let crc = BigInt(i);\n for (let j = 0; j < 8 * (slice + 1); j++) {\n if (crc & 1n) {\n crc = (crc >> 1n) ^ 0x9a6c9329ac4bc9b5n;\n }\n else {\n crc = crc >> 1n;\n }\n }\n table[i * 2] = Number((crc >> 32n) & 0xffffffffn);\n table[i * 2 + 1] = Number(crc & 0xffffffffn);\n }\n tables[slice] = new Uint32Array(table);\n }\n return tables;\n};\nlet CRC64_NVME_REVERSED_TABLE;\nlet t0, t1, t2, t3;\nlet t4, t5, t6, t7;\nconst ensureTablesInitialized = () => {\n if (!CRC64_NVME_REVERSED_TABLE) {\n CRC64_NVME_REVERSED_TABLE = generateCRC64NVMETable();\n [t0, t1, t2, t3, t4, t5, t6, t7] = CRC64_NVME_REVERSED_TABLE;\n }\n};\nexport class Crc64Nvme {\n c1 = 0;\n c2 = 0;\n constructor() {\n ensureTablesInitialized();\n this.reset();\n }\n update(data) {\n const len = data.length;\n let i = 0;\n let crc1 = this.c1;\n let crc2 = this.c2;\n while (i + 8 <= len) {\n const idx0 = ((crc2 ^ data[i++]) & 255) << 1;\n const idx1 = (((crc2 >>> 8) ^ data[i++]) & 255) << 1;\n const idx2 = (((crc2 >>> 16) ^ data[i++]) & 255) << 1;\n const idx3 = (((crc2 >>> 24) ^ data[i++]) & 255) << 1;\n const idx4 = ((crc1 ^ data[i++]) & 255) << 1;\n const idx5 = (((crc1 >>> 8) ^ data[i++]) & 255) << 1;\n const idx6 = (((crc1 >>> 16) ^ data[i++]) & 255) << 1;\n const idx7 = (((crc1 >>> 24) ^ data[i++]) & 255) << 1;\n crc1 = t7[idx0] ^ t6[idx1] ^ t5[idx2] ^ t4[idx3] ^ t3[idx4] ^ t2[idx5] ^ t1[idx6] ^ t0[idx7];\n crc2 =\n t7[idx0 + 1] ^\n t6[idx1 + 1] ^\n t5[idx2 + 1] ^\n t4[idx3 + 1] ^\n t3[idx4 + 1] ^\n t2[idx5 + 1] ^\n t1[idx6 + 1] ^\n t0[idx7 + 1];\n }\n while (i < len) {\n const idx = ((crc2 ^ data[i]) & 255) << 1;\n crc2 = ((crc2 >>> 8) | ((crc1 & 255) << 24)) >>> 0;\n crc1 = (crc1 >>> 8) ^ t0[idx];\n crc2 ^= t0[idx + 1];\n i++;\n }\n this.c1 = crc1;\n this.c2 = crc2;\n }\n async digest() {\n const c1 = this.c1 ^ 4294967295;\n const c2 = this.c2 ^ 4294967295;\n return new Uint8Array([\n c1 >>> 24,\n (c1 >>> 16) & 255,\n (c1 >>> 8) & 255,\n c1 & 255,\n c2 >>> 24,\n (c2 >>> 16) & 255,\n (c2 >>> 8) & 255,\n c2 & 255,\n ]);\n }\n reset() {\n this.c1 = 4294967295;\n this.c2 = 4294967295;\n }\n}\n", "export const crc64NvmeCrtContainer = {\n CrtCrc64Nvme: null,\n};\n", "export * from \"./Crc64Nvme\";\nexport * from \"./crc64-nvme-crt-container\";\n", "// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SourceData, Checksum } from \"@aws-sdk/types\";\nimport { convertToBuffer, isEmptyData, numToUint8 } from \"@aws-crypto/util\";\nimport { Crc32 } from \"./index\";\n\nexport class AwsCrc32 implements Checksum {\n private crc32 = new Crc32();\n\n update(toHash: SourceData) {\n if (isEmptyData(toHash)) return;\n\n this.crc32.update(convertToBuffer(toHash));\n }\n\n async digest(): Promise {\n return numToUint8(this.crc32.digest());\n }\n\n reset(): void {\n this.crc32 = new Crc32();\n }\n}\n", "import {uint32ArrayFrom} from \"@aws-crypto/util\";\n\nexport function crc32(data: Uint8Array): number {\n return new Crc32().update(data).digest();\n}\n\nexport class Crc32 {\n private checksum = 0xffffffff;\n\n update(data: Uint8Array): this {\n for (const byte of data) {\n this.checksum =\n (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff];\n }\n\n return this;\n }\n\n digest(): number {\n return (this.checksum ^ 0xffffffff) >>> 0;\n }\n}\n\n// prettier-ignore\nconst a_lookUpTable = [\n 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,\n 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,\n 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,\n 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,\n 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,\n 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,\n 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,\n 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,\n 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,\n 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,\n 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,\n 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,\n 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,\n 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,\n 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,\n 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,\n 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,\n 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,\n 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,\n 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,\n 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,\n 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,\n 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,\n 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,\n 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,\n 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,\n 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,\n 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,\n 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,\n 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,\n 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,\n 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,\n 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,\n 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,\n 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,\n 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,\n 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,\n 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,\n 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,\n 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,\n 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,\n 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,\n 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,\n 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,\n 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,\n 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,\n 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,\n 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,\n 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,\n 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,\n 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,\n 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,\n 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,\n 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,\n 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,\n 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,\n 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,\n 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,\n 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,\n 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,\n 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,\n 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,\n 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,\n 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D,\n];\nconst lookupTable: Uint32Array = uint32ArrayFrom(a_lookUpTable)\nexport { AwsCrc32 } from \"./aws_crc32\";\n", "import { AwsCrc32 } from \"@aws-crypto/crc32\";\nexport const getCrc32ChecksumAlgorithmFunction = () => AwsCrc32;\n", "import { ChecksumAlgorithm } from \"./constants\";\nexport const CLIENT_SUPPORTED_ALGORITHMS = [\n ChecksumAlgorithm.CRC32,\n ChecksumAlgorithm.CRC32C,\n ChecksumAlgorithm.CRC64NVME,\n ChecksumAlgorithm.SHA1,\n ChecksumAlgorithm.SHA256,\n];\nexport const PRIORITY_ORDER_ALGORITHMS = [\n ChecksumAlgorithm.SHA256,\n ChecksumAlgorithm.SHA1,\n ChecksumAlgorithm.CRC32,\n ChecksumAlgorithm.CRC32C,\n ChecksumAlgorithm.CRC64NVME,\n];\n", "import { AwsCrc32c } from \"@aws-crypto/crc32c\";\nimport { Crc64Nvme, crc64NvmeCrtContainer } from \"@aws-sdk/crc64-nvme\";\nimport { ChecksumAlgorithm } from \"./constants\";\nimport { getCrc32ChecksumAlgorithmFunction } from \"./getCrc32ChecksumAlgorithmFunction\";\nimport { CLIENT_SUPPORTED_ALGORITHMS } from \"./types\";\nexport const selectChecksumAlgorithmFunction = (checksumAlgorithm, config) => {\n const { checksumAlgorithms = {} } = config;\n switch (checksumAlgorithm) {\n case ChecksumAlgorithm.MD5:\n return checksumAlgorithms?.MD5 ?? config.md5;\n case ChecksumAlgorithm.CRC32:\n return checksumAlgorithms?.CRC32 ?? getCrc32ChecksumAlgorithmFunction();\n case ChecksumAlgorithm.CRC32C:\n return checksumAlgorithms?.CRC32C ?? AwsCrc32c;\n case ChecksumAlgorithm.CRC64NVME:\n if (typeof crc64NvmeCrtContainer.CrtCrc64Nvme !== \"function\") {\n return checksumAlgorithms?.CRC64NVME ?? Crc64Nvme;\n }\n return checksumAlgorithms?.CRC64NVME ?? crc64NvmeCrtContainer.CrtCrc64Nvme;\n case ChecksumAlgorithm.SHA1:\n return checksumAlgorithms?.SHA1 ?? config.sha1;\n case ChecksumAlgorithm.SHA256:\n return checksumAlgorithms?.SHA256 ?? config.sha256;\n default:\n if (checksumAlgorithms?.[checksumAlgorithm]) {\n return checksumAlgorithms[checksumAlgorithm];\n }\n throw new Error(`The checksum algorithm \"${checksumAlgorithm}\" is not supported by the client.` +\n ` Select one of ${CLIENT_SUPPORTED_ALGORITHMS}, or provide an implementation to ` +\n ` the client constructor checksums field.`);\n }\n};\n", "import { toUint8Array } from \"@smithy/util-utf8\";\nexport const stringHasher = (checksumAlgorithmFn, body) => {\n const hash = new checksumAlgorithmFn();\n hash.update(toUint8Array(body || \"\"));\n return hash.digest();\n};\n", "import { setFeature } from \"@aws-sdk/core\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { createBufferedReadable } from \"@smithy/util-stream\";\nimport { ChecksumAlgorithm, DEFAULT_CHECKSUM_ALGORITHM, RequestChecksumCalculation } from \"./constants\";\nimport { getChecksumAlgorithmForRequest } from \"./getChecksumAlgorithmForRequest\";\nimport { getChecksumLocationName } from \"./getChecksumLocationName\";\nimport { hasHeader } from \"./hasHeader\";\nimport { hasHeaderWithPrefix } from \"./hasHeaderWithPrefix\";\nimport { isStreaming } from \"./isStreaming\";\nimport { selectChecksumAlgorithmFunction } from \"./selectChecksumAlgorithmFunction\";\nimport { stringHasher } from \"./stringHasher\";\nexport const flexibleChecksumsMiddlewareOptions = {\n name: \"flexibleChecksumsMiddleware\",\n step: \"build\",\n tags: [\"BODY_CHECKSUM\"],\n override: true,\n};\nexport const flexibleChecksumsMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {\n if (!HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n if (hasHeaderWithPrefix(\"x-amz-checksum-\", args.request.headers)) {\n return next(args);\n }\n const { request, input } = args;\n const { body: requestBody, headers } = request;\n const { base64Encoder, streamHasher } = config;\n const { requestChecksumRequired, requestAlgorithmMember } = middlewareConfig;\n const requestChecksumCalculation = await config.requestChecksumCalculation();\n const requestAlgorithmMemberName = requestAlgorithmMember?.name;\n const requestAlgorithmMemberHttpHeader = requestAlgorithmMember?.httpHeader;\n if (requestAlgorithmMemberName && !input[requestAlgorithmMemberName]) {\n if (requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired) {\n input[requestAlgorithmMemberName] = DEFAULT_CHECKSUM_ALGORITHM;\n if (requestAlgorithmMemberHttpHeader) {\n headers[requestAlgorithmMemberHttpHeader] = DEFAULT_CHECKSUM_ALGORITHM;\n }\n }\n }\n const checksumAlgorithm = getChecksumAlgorithmForRequest(input, {\n requestChecksumRequired,\n requestAlgorithmMember: requestAlgorithmMember?.name,\n requestChecksumCalculation,\n });\n let updatedBody = requestBody;\n let updatedHeaders = headers;\n if (checksumAlgorithm) {\n switch (checksumAlgorithm) {\n case ChecksumAlgorithm.CRC32:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_CRC32\", \"U\");\n break;\n case ChecksumAlgorithm.CRC32C:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_CRC32C\", \"V\");\n break;\n case ChecksumAlgorithm.CRC64NVME:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_CRC64\", \"W\");\n break;\n case ChecksumAlgorithm.SHA1:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_SHA1\", \"X\");\n break;\n case ChecksumAlgorithm.SHA256:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_SHA256\", \"Y\");\n break;\n }\n const checksumLocationName = getChecksumLocationName(checksumAlgorithm);\n const checksumAlgorithmFn = selectChecksumAlgorithmFunction(checksumAlgorithm, config);\n if (isStreaming(requestBody)) {\n const { getAwsChunkedEncodingStream, bodyLengthChecker } = config;\n updatedBody = getAwsChunkedEncodingStream(typeof config.requestStreamBufferSize === \"number\" && config.requestStreamBufferSize >= 8 * 1024\n ? createBufferedReadable(requestBody, config.requestStreamBufferSize, context.logger)\n : requestBody, {\n base64Encoder,\n bodyLengthChecker,\n checksumLocationName,\n checksumAlgorithmFn,\n streamHasher,\n });\n updatedHeaders = {\n ...headers,\n \"content-encoding\": headers[\"content-encoding\"]\n ? `${headers[\"content-encoding\"]},aws-chunked`\n : \"aws-chunked\",\n \"transfer-encoding\": \"chunked\",\n \"x-amz-decoded-content-length\": headers[\"content-length\"],\n \"x-amz-content-sha256\": \"STREAMING-UNSIGNED-PAYLOAD-TRAILER\",\n \"x-amz-trailer\": checksumLocationName,\n };\n delete updatedHeaders[\"content-length\"];\n }\n else if (!hasHeader(checksumLocationName, headers)) {\n const rawChecksum = await stringHasher(checksumAlgorithmFn, requestBody);\n updatedHeaders = {\n ...headers,\n [checksumLocationName]: base64Encoder(rawChecksum),\n };\n }\n }\n try {\n const result = await next({\n ...args,\n request: {\n ...request,\n headers: updatedHeaders,\n body: updatedBody,\n },\n });\n return result;\n }\n catch (e) {\n if (e instanceof Error && e.name === \"InvalidChunkSizeError\") {\n try {\n if (!e.message.endsWith(\".\")) {\n e.message += \".\";\n }\n e.message +=\n \" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream.\";\n }\n catch (ignored) {\n }\n }\n throw e;\n }\n};\n", "import { setFeature } from \"@aws-sdk/core\";\nimport { RequestChecksumCalculation, ResponseChecksumValidation } from \"./constants\";\nexport const flexibleChecksumsInputMiddlewareOptions = {\n name: \"flexibleChecksumsInputMiddleware\",\n toMiddleware: \"serializerMiddleware\",\n relation: \"before\",\n tags: [\"BODY_CHECKSUM\"],\n override: true,\n};\nexport const flexibleChecksumsInputMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {\n const input = args.input;\n const { requestValidationModeMember } = middlewareConfig;\n const requestChecksumCalculation = await config.requestChecksumCalculation();\n const responseChecksumValidation = await config.responseChecksumValidation();\n switch (requestChecksumCalculation) {\n case RequestChecksumCalculation.WHEN_REQUIRED:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED\", \"a\");\n break;\n case RequestChecksumCalculation.WHEN_SUPPORTED:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED\", \"Z\");\n break;\n }\n switch (responseChecksumValidation) {\n case ResponseChecksumValidation.WHEN_REQUIRED:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED\", \"c\");\n break;\n case ResponseChecksumValidation.WHEN_SUPPORTED:\n setFeature(context, \"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED\", \"b\");\n break;\n }\n if (requestValidationModeMember && !input[requestValidationModeMember]) {\n if (responseChecksumValidation === ResponseChecksumValidation.WHEN_SUPPORTED) {\n input[requestValidationModeMember] = \"ENABLED\";\n }\n }\n return next(args);\n};\n", "import { CLIENT_SUPPORTED_ALGORITHMS, PRIORITY_ORDER_ALGORITHMS } from \"./types\";\nexport const getChecksumAlgorithmListForResponse = (responseAlgorithms = []) => {\n const validChecksumAlgorithms = [];\n for (const algorithm of PRIORITY_ORDER_ALGORITHMS) {\n if (!responseAlgorithms.includes(algorithm) || !CLIENT_SUPPORTED_ALGORITHMS.includes(algorithm)) {\n continue;\n }\n validChecksumAlgorithms.push(algorithm);\n }\n return validChecksumAlgorithms;\n};\n", "export const isChecksumWithPartNumber = (checksum) => {\n const lastHyphenIndex = checksum.lastIndexOf(\"-\");\n if (lastHyphenIndex !== -1) {\n const numberPart = checksum.slice(lastHyphenIndex + 1);\n if (!numberPart.startsWith(\"0\")) {\n const number = parseInt(numberPart, 10);\n if (!isNaN(number) && number >= 1 && number <= 10000) {\n return true;\n }\n }\n }\n return false;\n};\n", "import { stringHasher } from \"./stringHasher\";\nexport const getChecksum = async (body, { checksumAlgorithmFn, base64Encoder }) => base64Encoder(await stringHasher(checksumAlgorithmFn, body));\n", "import { createChecksumStream } from \"@smithy/util-stream\";\nimport { ChecksumAlgorithm } from \"./constants\";\nimport { getChecksum } from \"./getChecksum\";\nimport { getChecksumAlgorithmListForResponse } from \"./getChecksumAlgorithmListForResponse\";\nimport { getChecksumLocationName } from \"./getChecksumLocationName\";\nimport { isStreaming } from \"./isStreaming\";\nimport { selectChecksumAlgorithmFunction } from \"./selectChecksumAlgorithmFunction\";\nexport const validateChecksumFromResponse = async (response, { config, responseAlgorithms, logger }) => {\n const checksumAlgorithms = getChecksumAlgorithmListForResponse(responseAlgorithms);\n const { body: responseBody, headers: responseHeaders } = response;\n for (const algorithm of checksumAlgorithms) {\n const responseHeader = getChecksumLocationName(algorithm);\n const checksumFromResponse = responseHeaders[responseHeader];\n if (checksumFromResponse) {\n let checksumAlgorithmFn;\n try {\n checksumAlgorithmFn = selectChecksumAlgorithmFunction(algorithm, config);\n }\n catch (error) {\n if (algorithm === ChecksumAlgorithm.CRC64NVME) {\n logger?.warn(`Skipping ${ChecksumAlgorithm.CRC64NVME} checksum validation: ${error.message}`);\n continue;\n }\n throw error;\n }\n const { base64Encoder } = config;\n if (isStreaming(responseBody)) {\n response.body = createChecksumStream({\n expectedChecksum: checksumFromResponse,\n checksumSourceLocation: responseHeader,\n checksum: new checksumAlgorithmFn(),\n source: responseBody,\n base64Encoder,\n });\n return;\n }\n const checksum = await getChecksum(responseBody, { checksumAlgorithmFn, base64Encoder });\n if (checksum === checksumFromResponse) {\n break;\n }\n throw new Error(`Checksum mismatch: expected \"${checksum}\" but received \"${checksumFromResponse}\"` +\n ` in response header \"${responseHeader}\".`);\n }\n }\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { getChecksumAlgorithmListForResponse } from \"./getChecksumAlgorithmListForResponse\";\nimport { getChecksumLocationName } from \"./getChecksumLocationName\";\nimport { isChecksumWithPartNumber } from \"./isChecksumWithPartNumber\";\nimport { validateChecksumFromResponse } from \"./validateChecksumFromResponse\";\nexport const flexibleChecksumsResponseMiddlewareOptions = {\n name: \"flexibleChecksumsResponseMiddleware\",\n toMiddleware: \"deserializerMiddleware\",\n relation: \"after\",\n tags: [\"BODY_CHECKSUM\"],\n override: true,\n};\nexport const flexibleChecksumsResponseMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {\n if (!HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n const input = args.input;\n const result = await next(args);\n const response = result.response;\n const { requestValidationModeMember, responseAlgorithms } = middlewareConfig;\n if (requestValidationModeMember && input[requestValidationModeMember] === \"ENABLED\") {\n const { clientName, commandName } = context;\n const isS3WholeObjectMultipartGetResponseChecksum = clientName === \"S3Client\" &&\n commandName === \"GetObjectCommand\" &&\n getChecksumAlgorithmListForResponse(responseAlgorithms).every((algorithm) => {\n const responseHeader = getChecksumLocationName(algorithm);\n const checksumFromResponse = response.headers[responseHeader];\n return !checksumFromResponse || isChecksumWithPartNumber(checksumFromResponse);\n });\n if (isS3WholeObjectMultipartGetResponseChecksum) {\n return result;\n }\n await validateChecksumFromResponse(response, {\n config,\n responseAlgorithms,\n logger: context.logger,\n });\n }\n return result;\n};\n", "import { flexibleChecksumsInputMiddleware, flexibleChecksumsInputMiddlewareOptions, } from \"./flexibleChecksumsInputMiddleware\";\nimport { flexibleChecksumsMiddleware, flexibleChecksumsMiddlewareOptions } from \"./flexibleChecksumsMiddleware\";\nimport { flexibleChecksumsResponseMiddleware, flexibleChecksumsResponseMiddlewareOptions, } from \"./flexibleChecksumsResponseMiddleware\";\nexport const getFlexibleChecksumsPlugin = (config, middlewareConfig) => ({\n applyToStack: (clientStack) => {\n clientStack.add(flexibleChecksumsMiddleware(config, middlewareConfig), flexibleChecksumsMiddlewareOptions);\n clientStack.addRelativeTo(flexibleChecksumsInputMiddleware(config, middlewareConfig), flexibleChecksumsInputMiddlewareOptions);\n clientStack.addRelativeTo(flexibleChecksumsResponseMiddleware(config, middlewareConfig), flexibleChecksumsResponseMiddlewareOptions);\n },\n});\n", "import { normalizeProvider } from \"@smithy/util-middleware\";\nimport { DEFAULT_REQUEST_CHECKSUM_CALCULATION, DEFAULT_RESPONSE_CHECKSUM_VALIDATION } from \"./constants\";\nexport const resolveFlexibleChecksumsConfig = (input) => {\n const { requestChecksumCalculation, responseChecksumValidation, requestStreamBufferSize } = input;\n return Object.assign(input, {\n requestChecksumCalculation: normalizeProvider(requestChecksumCalculation ?? DEFAULT_REQUEST_CHECKSUM_CALCULATION),\n responseChecksumValidation: normalizeProvider(responseChecksumValidation ?? DEFAULT_RESPONSE_CHECKSUM_VALIDATION),\n requestStreamBufferSize: Number(requestStreamBufferSize ?? 0),\n checksumAlgorithms: input.checksumAlgorithms ?? {},\n });\n};\n", "export * from \"./NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS\";\nexport * from \"./NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS\";\nexport * from \"./constants\";\nexport * from \"./flexibleChecksumsMiddleware\";\nexport * from \"./getFlexibleChecksumsPlugin\";\nexport * from \"./resolveFlexibleChecksumsConfig\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nexport function resolveHostHeaderConfig(input) {\n return input;\n}\nexport const hostHeaderMiddleware = (options) => (next) => async (args) => {\n if (!HttpRequest.isInstance(args.request))\n return next(args);\n const { request } = args;\n const { handlerProtocol = \"\" } = options.requestHandler.metadata || {};\n if (handlerProtocol.indexOf(\"h2\") >= 0 && !request.headers[\":authority\"]) {\n delete request.headers[\"host\"];\n request.headers[\":authority\"] = request.hostname + (request.port ? \":\" + request.port : \"\");\n }\n else if (!request.headers[\"host\"]) {\n let host = request.hostname;\n if (request.port != null)\n host += `:${request.port}`;\n request.headers[\"host\"] = host;\n }\n return next(args);\n};\nexport const hostHeaderMiddlewareOptions = {\n name: \"hostHeaderMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"HOST\"],\n override: true,\n};\nexport const getHostHeaderPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);\n },\n});\n", "export const loggerMiddleware = () => (next, context) => async (args) => {\n try {\n const response = await next(args);\n const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;\n const { $metadata, ...outputWithoutMetadata } = response.output;\n logger?.info?.({\n clientName,\n commandName,\n input: inputFilterSensitiveLog(args.input),\n output: outputFilterSensitiveLog(outputWithoutMetadata),\n metadata: $metadata,\n });\n return response;\n }\n catch (error) {\n const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n logger?.error?.({\n clientName,\n commandName,\n input: inputFilterSensitiveLog(args.input),\n error,\n metadata: error.$metadata,\n });\n throw error;\n }\n};\nexport const loggerMiddlewareOptions = {\n name: \"loggerMiddleware\",\n tags: [\"LOGGER\"],\n step: \"initialize\",\n override: true,\n};\nexport const getLoggerPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);\n },\n});\n", "export * from \"./loggerMiddleware\";\n", "export const recursionDetectionMiddlewareOptions = {\n step: \"build\",\n tags: [\"RECURSION_DETECTION\"],\n name: \"recursionDetectionMiddleware\",\n override: true,\n priority: \"low\",\n};\n", "export const recursionDetectionMiddleware = () => (next) => async (args) => next(args);\n", "import { recursionDetectionMiddlewareOptions } from \"./configuration\";\nimport { recursionDetectionMiddleware } from \"./recursionDetectionMiddleware\";\nexport const getRecursionDetectionPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions);\n },\n});\n", "export * from \"./getRecursionDetectionPlugin\";\nexport * from \"./recursionDetectionMiddleware\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { NoOpLogger } from \"@smithy/smithy-client\";\nconst CONTENT_LENGTH_HEADER = \"content-length\";\nconst DECODED_CONTENT_LENGTH_HEADER = \"x-amz-decoded-content-length\";\nexport function checkContentLengthHeader() {\n return (next, context) => async (args) => {\n const { request } = args;\n if (HttpRequest.isInstance(request)) {\n if (!(CONTENT_LENGTH_HEADER in request.headers) && !(DECODED_CONTENT_LENGTH_HEADER in request.headers)) {\n const message = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`;\n if (typeof context?.logger?.warn === \"function\" && !(context.logger instanceof NoOpLogger)) {\n context.logger.warn(message);\n }\n else {\n console.warn(message);\n }\n }\n }\n return next({ ...args });\n };\n}\nexport const checkContentLengthHeaderMiddlewareOptions = {\n step: \"finalizeRequest\",\n tags: [\"CHECK_CONTENT_LENGTH_HEADER\"],\n name: \"getCheckContentLengthHeaderPlugin\",\n override: true,\n};\nexport const getCheckContentLengthHeaderPlugin = (unused) => ({\n applyToStack: (clientStack) => {\n clientStack.add(checkContentLengthHeader(), checkContentLengthHeaderMiddlewareOptions);\n },\n});\n", "export const regionRedirectEndpointMiddleware = (config) => {\n return (next, context) => async (args) => {\n const originalRegion = await config.region();\n const regionProviderRef = config.region;\n let unlock = () => { };\n if (context.__s3RegionRedirect) {\n Object.defineProperty(config, \"region\", {\n writable: false,\n value: async () => {\n return context.__s3RegionRedirect;\n },\n });\n unlock = () => Object.defineProperty(config, \"region\", {\n writable: true,\n value: regionProviderRef,\n });\n }\n try {\n const result = await next(args);\n if (context.__s3RegionRedirect) {\n unlock();\n const region = await config.region();\n if (originalRegion !== region) {\n throw new Error(\"Region was not restored following S3 region redirect.\");\n }\n }\n return result;\n }\n catch (e) {\n unlock();\n throw e;\n }\n };\n};\nexport const regionRedirectEndpointMiddlewareOptions = {\n tags: [\"REGION_REDIRECT\", \"S3\"],\n name: \"regionRedirectEndpointMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: \"endpointV2Middleware\",\n};\n", "import { regionRedirectEndpointMiddleware, regionRedirectEndpointMiddlewareOptions, } from \"./region-redirect-endpoint-middleware\";\nexport function regionRedirectMiddleware(clientConfig) {\n return (next, context) => async (args) => {\n try {\n return await next(args);\n }\n catch (err) {\n if (clientConfig.followRegionRedirects) {\n const statusCode = err?.$metadata?.httpStatusCode;\n const isHeadBucket = context.commandName === \"HeadBucketCommand\";\n const bucketRegionHeader = err?.$response?.headers?.[\"x-amz-bucket-region\"];\n if (bucketRegionHeader) {\n if (statusCode === 301 ||\n (statusCode === 400 && (err?.name === \"IllegalLocationConstraintException\" || isHeadBucket))) {\n try {\n const actualRegion = bucketRegionHeader;\n context.logger?.debug(`Redirecting from ${await clientConfig.region()} to ${actualRegion}`);\n context.__s3RegionRedirect = actualRegion;\n }\n catch (e) {\n throw new Error(\"Region redirect failed: \" + e);\n }\n return next(args);\n }\n }\n }\n throw err;\n }\n };\n}\nexport const regionRedirectMiddlewareOptions = {\n step: \"initialize\",\n tags: [\"REGION_REDIRECT\", \"S3\"],\n name: \"regionRedirectMiddleware\",\n override: true,\n};\nexport const getRegionRedirectMiddlewarePlugin = (clientConfig) => ({\n applyToStack: (clientStack) => {\n clientStack.add(regionRedirectMiddleware(clientConfig), regionRedirectMiddlewareOptions);\n clientStack.addRelativeTo(regionRedirectEndpointMiddleware(clientConfig), regionRedirectEndpointMiddlewareOptions);\n },\n});\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nimport { parseRfc7231DateTime } from \"@smithy/smithy-client\";\nexport const s3ExpiresMiddleware = (config) => {\n return (next, context) => async (args) => {\n const result = await next(args);\n const { response } = result;\n if (HttpResponse.isInstance(response)) {\n if (response.headers.expires) {\n response.headers.expiresstring = response.headers.expires;\n try {\n parseRfc7231DateTime(response.headers.expires);\n }\n catch (e) {\n context.logger?.warn(`AWS SDK Warning for ${context.clientName}::${context.commandName} response parsing (${response.headers.expires}): ${e}`);\n delete response.headers.expires;\n }\n }\n }\n return result;\n };\n};\nexport const s3ExpiresMiddlewareOptions = {\n tags: [\"S3\"],\n name: \"s3ExpiresMiddleware\",\n override: true,\n relation: \"after\",\n toMiddleware: \"deserializerMiddleware\",\n};\nexport const getS3ExpiresMiddlewarePlugin = (clientConfig) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(s3ExpiresMiddleware(clientConfig), s3ExpiresMiddlewareOptions);\n },\n});\n", "export class S3ExpressIdentityCache {\n data;\n lastPurgeTime = Date.now();\n static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS = 30_000;\n constructor(data = {}) {\n this.data = data;\n }\n get(key) {\n const entry = this.data[key];\n if (!entry) {\n return;\n }\n return entry;\n }\n set(key, entry) {\n this.data[key] = entry;\n return entry;\n }\n delete(key) {\n delete this.data[key];\n }\n async purgeExpired() {\n const now = Date.now();\n if (this.lastPurgeTime + S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS > now) {\n return;\n }\n for (const key in this.data) {\n const entry = this.data[key];\n if (!entry.isRefreshing) {\n const credential = await entry.identity;\n if (credential.expiration) {\n if (credential.expiration.getTime() < now) {\n delete this.data[key];\n }\n }\n }\n }\n }\n}\n", "export class S3ExpressIdentityCacheEntry {\n _identity;\n isRefreshing;\n accessed;\n constructor(_identity, isRefreshing = false, accessed = Date.now()) {\n this._identity = _identity;\n this.isRefreshing = isRefreshing;\n this.accessed = accessed;\n }\n get identity() {\n this.accessed = Date.now();\n return this._identity;\n }\n}\n", "import { S3ExpressIdentityCache } from \"./S3ExpressIdentityCache\";\nimport { S3ExpressIdentityCacheEntry } from \"./S3ExpressIdentityCacheEntry\";\nexport class S3ExpressIdentityProviderImpl {\n createSessionFn;\n cache;\n static REFRESH_WINDOW_MS = 60_000;\n constructor(createSessionFn, cache = new S3ExpressIdentityCache()) {\n this.createSessionFn = createSessionFn;\n this.cache = cache;\n }\n async getS3ExpressIdentity(awsIdentity, identityProperties) {\n const key = identityProperties.Bucket;\n const { cache } = this;\n const entry = cache.get(key);\n if (entry) {\n return entry.identity.then((identity) => {\n const isExpired = (identity.expiration?.getTime() ?? 0) < Date.now();\n if (isExpired) {\n return cache.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity;\n }\n const isExpiringSoon = (identity.expiration?.getTime() ?? 0) < Date.now() + S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS;\n if (isExpiringSoon && !entry.isRefreshing) {\n entry.isRefreshing = true;\n this.getIdentity(key).then((id) => {\n cache.set(key, new S3ExpressIdentityCacheEntry(Promise.resolve(id)));\n });\n }\n return identity;\n });\n }\n return cache.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity;\n }\n async getIdentity(key) {\n await this.cache.purgeExpired().catch((error) => {\n console.warn(\"Error while clearing expired entries in S3ExpressIdentityCache: \\n\" + error);\n });\n const session = await this.createSessionFn(key);\n if (!session.Credentials?.AccessKeyId || !session.Credentials?.SecretAccessKey) {\n throw new Error(\"s3#createSession response credential missing AccessKeyId or SecretAccessKey.\");\n }\n const identity = {\n accessKeyId: session.Credentials.AccessKeyId,\n secretAccessKey: session.Credentials.SecretAccessKey,\n sessionToken: session.Credentials.SessionToken,\n expiration: session.Credentials.Expiration ? new Date(session.Credentials.Expiration) : undefined,\n };\n return identity;\n }\n}\n", "import { booleanSelector, SelectorType } from \"@smithy/util-config-provider\";\nexport const S3_EXPRESS_BUCKET_TYPE = \"Directory\";\nexport const S3_EXPRESS_BACKEND = \"S3Express\";\nexport const S3_EXPRESS_AUTH_SCHEME = \"sigv4-s3express\";\nexport const SESSION_TOKEN_QUERY_PARAM = \"X-Amz-S3session-Token\";\nexport const SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase();\nexport const NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME = \"AWS_S3_DISABLE_EXPRESS_SESSION_AUTH\";\nexport const NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME = \"s3_disable_express_session_auth\";\nexport const NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = {\n environmentVariableSelector: (env) => booleanSelector(env, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME, SelectorType.ENV),\n configFileSelector: (profile) => booleanSelector(profile, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME, SelectorType.CONFIG),\n default: false,\n};\n", "import { SignatureV4 } from \"@smithy/signature-v4\";\nimport { SESSION_TOKEN_HEADER, SESSION_TOKEN_QUERY_PARAM } from \"../constants\";\nexport class SignatureV4S3Express extends SignatureV4 {\n async signWithCredentials(requestToSign, credentials, options) {\n const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);\n requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken;\n const privateAccess = this;\n setSingleOverride(privateAccess, credentialsWithoutSessionToken);\n return privateAccess.signRequest(requestToSign, options ?? {});\n }\n async presignWithCredentials(requestToSign, credentials, options) {\n const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);\n delete requestToSign.headers[SESSION_TOKEN_HEADER];\n requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;\n requestToSign.query = requestToSign.query ?? {};\n requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;\n const privateAccess = this;\n setSingleOverride(privateAccess, credentialsWithoutSessionToken);\n return this.presign(requestToSign, options);\n }\n}\nfunction getCredentialsWithoutSessionToken(credentials) {\n const credentialsWithoutSessionToken = {\n accessKeyId: credentials.accessKeyId,\n secretAccessKey: credentials.secretAccessKey,\n expiration: credentials.expiration,\n };\n return credentialsWithoutSessionToken;\n}\nfunction setSingleOverride(privateAccess, credentialsWithoutSessionToken) {\n const id = setTimeout(() => {\n throw new Error(\"SignatureV4S3Express credential override was created but not called.\");\n }, 10);\n const currentCredentialProvider = privateAccess.credentialProvider;\n const overrideCredentialsProviderOnce = () => {\n clearTimeout(id);\n privateAccess.credentialProvider = currentCredentialProvider;\n return Promise.resolve(credentialsWithoutSessionToken);\n };\n privateAccess.credentialProvider = overrideCredentialsProviderOnce;\n}\n", "import { setFeature } from \"@aws-sdk/core\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { S3_EXPRESS_AUTH_SCHEME, S3_EXPRESS_BACKEND, S3_EXPRESS_BUCKET_TYPE, SESSION_TOKEN_HEADER } from \"../constants\";\nexport const s3ExpressMiddleware = (options) => {\n return (next, context) => async (args) => {\n if (context.endpointV2) {\n const endpoint = context.endpointV2;\n const isS3ExpressAuth = endpoint.properties?.authSchemes?.[0]?.name === S3_EXPRESS_AUTH_SCHEME;\n const isS3ExpressBucket = endpoint.properties?.backend === S3_EXPRESS_BACKEND ||\n endpoint.properties?.bucketType === S3_EXPRESS_BUCKET_TYPE;\n if (isS3ExpressBucket) {\n setFeature(context, \"S3_EXPRESS_BUCKET\", \"J\");\n context.isS3ExpressBucket = true;\n }\n if (isS3ExpressAuth) {\n const requestBucket = args.input.Bucket;\n if (requestBucket) {\n const s3ExpressIdentity = await options.s3ExpressIdentityProvider.getS3ExpressIdentity(await options.credentials(), {\n Bucket: requestBucket,\n });\n context.s3ExpressIdentity = s3ExpressIdentity;\n if (HttpRequest.isInstance(args.request) && s3ExpressIdentity.sessionToken) {\n args.request.headers[SESSION_TOKEN_HEADER] = s3ExpressIdentity.sessionToken;\n }\n }\n }\n }\n return next(args);\n };\n};\nexport const s3ExpressMiddlewareOptions = {\n name: \"s3ExpressMiddleware\",\n step: \"build\",\n tags: [\"S3\", \"S3_EXPRESS\"],\n override: true,\n};\nexport const getS3ExpressPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(s3ExpressMiddleware(options), s3ExpressMiddlewareOptions);\n },\n});\n", "export const signS3Express = async (s3ExpressIdentity, signingOptions, request, sigV4MultiRegionSigner) => {\n const signedRequest = await sigV4MultiRegionSigner.signWithCredentials(request, s3ExpressIdentity, {});\n if (signedRequest.headers[\"X-Amz-Security-Token\"] || signedRequest.headers[\"x-amz-security-token\"]) {\n throw new Error(\"X-Amz-Security-Token must not be set for s3-express requests.\");\n }\n return signedRequest;\n};\n", "import { httpSigningMiddlewareOptions } from \"@smithy/core\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { getSmithyContext } from \"@smithy/util-middleware\";\nimport { signS3Express } from \"./signS3Express\";\nconst defaultErrorHandler = (signingProperties) => (error) => {\n throw error;\n};\nconst defaultSuccessHandler = (httpResponse, signingProperties) => { };\nexport const s3ExpressHttpSigningMiddlewareOptions = httpSigningMiddlewareOptions;\nexport const s3ExpressHttpSigningMiddleware = (config) => (next, context) => async (args) => {\n if (!HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n const smithyContext = getSmithyContext(context);\n const scheme = smithyContext.selectedHttpAuthScheme;\n if (!scheme) {\n throw new Error(`No HttpAuthScheme was selected: unable to sign request`);\n }\n const { httpAuthOption: { signingProperties = {} }, identity, signer, } = scheme;\n let request;\n if (context.s3ExpressIdentity) {\n request = await signS3Express(context.s3ExpressIdentity, signingProperties, args.request, await config.signer());\n }\n else {\n request = await signer.sign(args.request, identity, signingProperties);\n }\n const output = await next({\n ...args,\n request,\n }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));\n (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);\n return output;\n};\nexport const getS3ExpressHttpSigningPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(s3ExpressHttpSigningMiddleware(config), httpSigningMiddlewareOptions);\n },\n});\n", "export { S3ExpressIdentityCache } from \"./classes/S3ExpressIdentityCache\";\nexport { S3ExpressIdentityCacheEntry } from \"./classes/S3ExpressIdentityCacheEntry\";\nexport { S3ExpressIdentityProviderImpl } from \"./classes/S3ExpressIdentityProviderImpl\";\nexport { SignatureV4S3Express } from \"./classes/SignatureV4S3Express\";\nexport { NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS } from \"./constants\";\nexport { getS3ExpressPlugin, s3ExpressMiddleware, s3ExpressMiddlewareOptions } from \"./functions/s3ExpressMiddleware\";\nexport { getS3ExpressHttpSigningPlugin, s3ExpressHttpSigningMiddleware, s3ExpressHttpSigningMiddlewareOptions, } from \"./functions/s3ExpressHttpSigningMiddleware\";\n", "import { S3ExpressIdentityProviderImpl } from \"./s3-express\";\nexport const resolveS3Config = (input, { session, }) => {\n const [s3ClientProvider, CreateSessionCommandCtor] = session;\n const { forcePathStyle, useAccelerateEndpoint, disableMultiregionAccessPoints, followRegionRedirects, s3ExpressIdentityProvider, bucketEndpoint, expectContinueHeader, } = input;\n return Object.assign(input, {\n forcePathStyle: forcePathStyle ?? false,\n useAccelerateEndpoint: useAccelerateEndpoint ?? false,\n disableMultiregionAccessPoints: disableMultiregionAccessPoints ?? false,\n followRegionRedirects: followRegionRedirects ?? false,\n s3ExpressIdentityProvider: s3ExpressIdentityProvider ??\n new S3ExpressIdentityProviderImpl(async (key) => s3ClientProvider().send(new CreateSessionCommandCtor({\n Bucket: key,\n }))),\n bucketEndpoint: bucketEndpoint ?? false,\n expectContinueHeader: expectContinueHeader ?? 2_097_152,\n });\n};\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nimport { headStream, splitStream } from \"@smithy/util-stream\";\nconst THROW_IF_EMPTY_BODY = {\n CopyObjectCommand: true,\n UploadPartCopyCommand: true,\n CompleteMultipartUploadCommand: true,\n};\nconst MAX_BYTES_TO_INSPECT = 3000;\nexport const throw200ExceptionsMiddleware = (config) => (next, context) => async (args) => {\n const result = await next(args);\n const { response } = result;\n if (!HttpResponse.isInstance(response)) {\n return result;\n }\n const { statusCode, body: sourceBody } = response;\n if (statusCode < 200 || statusCode >= 300) {\n return result;\n }\n const isSplittableStream = typeof sourceBody?.stream === \"function\" ||\n typeof sourceBody?.pipe === \"function\" ||\n typeof sourceBody?.tee === \"function\";\n if (!isSplittableStream) {\n return result;\n }\n let bodyCopy = sourceBody;\n let body = sourceBody;\n if (sourceBody && typeof sourceBody === \"object\" && !(sourceBody instanceof Uint8Array)) {\n [bodyCopy, body] = await splitStream(sourceBody);\n }\n response.body = body;\n const bodyBytes = await collectBody(bodyCopy, {\n streamCollector: async (stream) => {\n return headStream(stream, MAX_BYTES_TO_INSPECT);\n },\n });\n if (typeof bodyCopy?.destroy === \"function\") {\n bodyCopy.destroy();\n }\n const bodyStringTail = config.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16));\n if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context.commandName]) {\n const err = new Error(\"S3 aborted request\");\n err.name = \"InternalError\";\n throw err;\n }\n if (bodyStringTail && bodyStringTail.endsWith(\"\")) {\n response.statusCode = 400;\n }\n return result;\n};\nconst collectBody = (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return Promise.resolve(streamBody);\n }\n return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());\n};\nexport const throw200ExceptionsMiddlewareOptions = {\n relation: \"after\",\n toMiddleware: \"deserializerMiddleware\",\n tags: [\"THROW_200_EXCEPTIONS\", \"S3\"],\n name: \"throw200ExceptionsMiddleware\",\n override: true,\n};\nexport const getThrow200ExceptionsPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(throw200ExceptionsMiddleware(config), throw200ExceptionsMiddlewareOptions);\n },\n});\n", "export const validate = (str) => typeof str === \"string\" && str.indexOf(\"arn:\") === 0 && str.split(\":\").length >= 6;\nexport const parse = (arn) => {\n const segments = arn.split(\":\");\n if (segments.length < 6 || segments[0] !== \"arn\")\n throw new Error(\"Malformed ARN\");\n const [, partition, service, region, accountId, ...resource] = segments;\n return {\n partition,\n service,\n region,\n accountId,\n resource: resource.join(\":\"),\n };\n};\nexport const build = (arnObject) => {\n const { partition = \"aws\", service, region, accountId, resource } = arnObject;\n if ([service, region, accountId, resource].some((segment) => typeof segment !== \"string\")) {\n throw new Error(\"Input ARN object is invalid\");\n }\n return `arn:${partition}:${service}:${region}:${accountId}:${resource}`;\n};\n", "export function bucketEndpointMiddleware(options) {\n return (next, context) => async (args) => {\n if (options.bucketEndpoint) {\n const endpoint = context.endpointV2;\n if (endpoint) {\n const bucket = args.input.Bucket;\n if (typeof bucket === \"string\") {\n try {\n const bucketEndpointUrl = new URL(bucket);\n context.endpointV2 = {\n ...endpoint,\n url: bucketEndpointUrl,\n };\n }\n catch (e) {\n const warning = `@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${bucket} could not be parsed as URL.`;\n if (context.logger?.constructor?.name === \"NoOpLogger\") {\n console.warn(warning);\n }\n else {\n context.logger?.warn?.(warning);\n }\n throw e;\n }\n }\n }\n }\n return next(args);\n };\n}\nexport const bucketEndpointMiddlewareOptions = {\n name: \"bucketEndpointMiddleware\",\n override: true,\n relation: \"after\",\n toMiddleware: \"endpointV2Middleware\",\n};\n", "import { validate as validateArn } from \"@aws-sdk/util-arn-parser\";\nimport { bucketEndpointMiddleware, bucketEndpointMiddlewareOptions } from \"./bucket-endpoint-middleware\";\nexport function validateBucketNameMiddleware({ bucketEndpoint }) {\n return (next) => async (args) => {\n const { input: { Bucket }, } = args;\n if (!bucketEndpoint && typeof Bucket === \"string\" && !validateArn(Bucket) && Bucket.indexOf(\"/\") >= 0) {\n const err = new Error(`Bucket name shouldn't contain '/', received '${Bucket}'`);\n err.name = \"InvalidBucketName\";\n throw err;\n }\n return next({ ...args });\n };\n}\nexport const validateBucketNameMiddlewareOptions = {\n step: \"initialize\",\n tags: [\"VALIDATE_BUCKET_NAME\"],\n name: \"validateBucketNameMiddleware\",\n override: true,\n};\nexport const getValidateBucketNamePlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(validateBucketNameMiddleware(options), validateBucketNameMiddlewareOptions);\n clientStack.addRelativeTo(bucketEndpointMiddleware(options), bucketEndpointMiddlewareOptions);\n },\n});\n", "export * from \"./check-content-length-header\";\nexport * from \"./region-redirect-endpoint-middleware\";\nexport * from \"./region-redirect-middleware\";\nexport * from \"./s3-expires-middleware\";\nexport * from \"./s3-express/index\";\nexport * from \"./s3Configuration\";\nexport * from \"./throw-200-exceptions\";\nexport * from \"./validate-bucket-name\";\n", "import { normalizeProvider } from \"@smithy/core\";\nexport const DEFAULT_UA_APP_ID = undefined;\nfunction isValidUserAgentAppId(appId) {\n if (appId === undefined) {\n return true;\n }\n return typeof appId === \"string\" && appId.length <= 50;\n}\nexport function resolveUserAgentConfig(input) {\n const normalizedAppIdProvider = normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID);\n const { customUserAgent } = input;\n return Object.assign(input, {\n customUserAgent: typeof customUserAgent === \"string\" ? [[customUserAgent]] : customUserAgent,\n userAgentAppId: async () => {\n const appId = await normalizedAppIdProvider();\n if (!isValidUserAgentAppId(appId)) {\n const logger = input.logger?.constructor?.name === \"NoOpLogger\" || !input.logger ? console : input.logger;\n if (typeof appId !== \"string\") {\n logger?.warn(\"userAgentAppId must be a string or undefined.\");\n }\n else if (appId.length > 50) {\n logger?.warn(\"The provided userAgentAppId exceeds the maximum length of 50 characters.\");\n }\n }\n return appId;\n },\n });\n}\n", "export class EndpointCache {\n capacity;\n data = new Map();\n parameters = [];\n constructor({ size, params }) {\n this.capacity = size ?? 50;\n if (params) {\n this.parameters = params;\n }\n }\n get(endpointParams, resolver) {\n const key = this.hash(endpointParams);\n if (key === false) {\n return resolver();\n }\n if (!this.data.has(key)) {\n if (this.data.size > this.capacity + 10) {\n const keys = this.data.keys();\n let i = 0;\n while (true) {\n const { value, done } = keys.next();\n this.data.delete(value);\n if (done || ++i > 10) {\n break;\n }\n }\n }\n this.data.set(key, resolver());\n }\n return this.data.get(key);\n }\n size() {\n return this.data.size;\n }\n hash(endpointParams) {\n let buffer = \"\";\n const { parameters } = this;\n if (parameters.length === 0) {\n return false;\n }\n for (const param of parameters) {\n const val = String(endpointParams[param] ?? \"\");\n if (val.includes(\"|;\")) {\n return false;\n }\n buffer += val + \"|;\";\n }\n return buffer;\n }\n}\n", "const IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}$`);\nexport const isIpAddress = (value) => IP_V4_REGEX.test(value) || (value.startsWith(\"[\") && value.endsWith(\"]\"));\n", "const VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);\nexport const isValidHostLabel = (value, allowSubDomains = false) => {\n if (!allowSubDomains) {\n return VALID_HOST_LABEL_REGEX.test(value);\n }\n const labels = value.split(\".\");\n for (const label of labels) {\n if (!isValidHostLabel(label)) {\n return false;\n }\n }\n return true;\n};\n", "export const customEndpointFunctions = {};\n", "export const debugId = \"endpoints\";\n", "export function toDebugString(input) {\n if (typeof input !== \"object\" || input == null) {\n return input;\n }\n if (\"ref\" in input) {\n return `$${toDebugString(input.ref)}`;\n }\n if (\"fn\" in input) {\n return `${input.fn}(${(input.argv || []).map(toDebugString).join(\", \")})`;\n }\n return JSON.stringify(input, null, 2);\n}\n", "export * from \"./debugId\";\nexport * from \"./toDebugString\";\n", "export class EndpointError extends Error {\n constructor(message) {\n super(message);\n this.name = \"EndpointError\";\n }\n}\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./EndpointError\";\nexport * from \"./EndpointFunctions\";\nexport * from \"./EndpointRuleObject\";\nexport * from \"./ErrorRuleObject\";\nexport * from \"./RuleSetObject\";\nexport * from \"./TreeRuleObject\";\nexport * from \"./shared\";\n", "export const booleanEquals = (value1, value2) => value1 === value2;\n", "import { EndpointError } from \"../types\";\nexport const getAttrPathList = (path) => {\n const parts = path.split(\".\");\n const pathList = [];\n for (const part of parts) {\n const squareBracketIndex = part.indexOf(\"[\");\n if (squareBracketIndex !== -1) {\n if (part.indexOf(\"]\") !== part.length - 1) {\n throw new EndpointError(`Path: '${path}' does not end with ']'`);\n }\n const arrayIndex = part.slice(squareBracketIndex + 1, -1);\n if (Number.isNaN(parseInt(arrayIndex))) {\n throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`);\n }\n if (squareBracketIndex !== 0) {\n pathList.push(part.slice(0, squareBracketIndex));\n }\n pathList.push(arrayIndex);\n }\n else {\n pathList.push(part);\n }\n }\n return pathList;\n};\n", "import { EndpointError } from \"../types\";\nimport { getAttrPathList } from \"./getAttrPathList\";\nexport const getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => {\n if (typeof acc !== \"object\") {\n throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`);\n }\n else if (Array.isArray(acc)) {\n return acc[parseInt(index)];\n }\n return acc[index];\n}, value);\n", "export const isSet = (value) => value != null;\n", "export const not = (value) => !value;\n", "import { EndpointURLScheme } from \"@smithy/types\";\nimport { isIpAddress } from \"./isIpAddress\";\nconst DEFAULT_PORTS = {\n [EndpointURLScheme.HTTP]: 80,\n [EndpointURLScheme.HTTPS]: 443,\n};\nexport const parseURL = (value) => {\n const whatwgURL = (() => {\n try {\n if (value instanceof URL) {\n return value;\n }\n if (typeof value === \"object\" && \"hostname\" in value) {\n const { hostname, port, protocol = \"\", path = \"\", query = {} } = value;\n const url = new URL(`${protocol}//${hostname}${port ? `:${port}` : \"\"}${path}`);\n url.search = Object.entries(query)\n .map(([k, v]) => `${k}=${v}`)\n .join(\"&\");\n return url;\n }\n return new URL(value);\n }\n catch (error) {\n return null;\n }\n })();\n if (!whatwgURL) {\n console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`);\n return null;\n }\n const urlString = whatwgURL.href;\n const { host, hostname, pathname, protocol, search } = whatwgURL;\n if (search) {\n return null;\n }\n const scheme = protocol.slice(0, -1);\n if (!Object.values(EndpointURLScheme).includes(scheme)) {\n return null;\n }\n const isIp = isIpAddress(hostname);\n const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) ||\n (typeof value === \"string\" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`));\n const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`;\n return {\n scheme,\n authority,\n path: pathname,\n normalizedPath: pathname.endsWith(\"/\") ? pathname : `${pathname}/`,\n isIp,\n };\n};\n", "export const stringEquals = (value1, value2) => value1 === value2;\n", "export const substring = (input, start, stop, reverse) => {\n if (start >= stop || input.length < stop || /[^\\u0000-\\u007f]/.test(input)) {\n return null;\n }\n if (!reverse) {\n return input.substring(start, stop);\n }\n return input.substring(input.length - stop, input.length - start);\n};\n", "export const uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);\n", "export * from \"./booleanEquals\";\nexport * from \"./getAttr\";\nexport * from \"./isSet\";\nexport * from \"./isValidHostLabel\";\nexport * from \"./not\";\nexport * from \"./parseURL\";\nexport * from \"./stringEquals\";\nexport * from \"./substring\";\nexport * from \"./uriEncode\";\n", "import { booleanEquals, getAttr, isSet, isValidHostLabel, not, parseURL, stringEquals, substring, uriEncode, } from \"../lib\";\nexport const endpointFunctions = {\n booleanEquals,\n getAttr,\n isSet,\n isValidHostLabel,\n not,\n parseURL,\n stringEquals,\n substring,\n uriEncode,\n};\n", "import { getAttr } from \"../lib\";\nexport const evaluateTemplate = (template, options) => {\n const evaluatedTemplateArr = [];\n const templateContext = {\n ...options.endpointParams,\n ...options.referenceRecord,\n };\n let currentIndex = 0;\n while (currentIndex < template.length) {\n const openingBraceIndex = template.indexOf(\"{\", currentIndex);\n if (openingBraceIndex === -1) {\n evaluatedTemplateArr.push(template.slice(currentIndex));\n break;\n }\n evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex));\n const closingBraceIndex = template.indexOf(\"}\", openingBraceIndex);\n if (closingBraceIndex === -1) {\n evaluatedTemplateArr.push(template.slice(openingBraceIndex));\n break;\n }\n if (template[openingBraceIndex + 1] === \"{\" && template[closingBraceIndex + 1] === \"}\") {\n evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex));\n currentIndex = closingBraceIndex + 2;\n }\n const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex);\n if (parameterName.includes(\"#\")) {\n const [refName, attrName] = parameterName.split(\"#\");\n evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName));\n }\n else {\n evaluatedTemplateArr.push(templateContext[parameterName]);\n }\n currentIndex = closingBraceIndex + 1;\n }\n return evaluatedTemplateArr.join(\"\");\n};\n", "export const getReferenceValue = ({ ref }, options) => {\n const referenceRecord = {\n ...options.endpointParams,\n ...options.referenceRecord,\n };\n return referenceRecord[ref];\n};\n", "import { EndpointError } from \"../types\";\nimport { customEndpointFunctions } from \"./customEndpointFunctions\";\nimport { endpointFunctions } from \"./endpointFunctions\";\nimport { evaluateTemplate } from \"./evaluateTemplate\";\nimport { getReferenceValue } from \"./getReferenceValue\";\nexport const evaluateExpression = (obj, keyName, options) => {\n if (typeof obj === \"string\") {\n return evaluateTemplate(obj, options);\n }\n else if (obj[\"fn\"]) {\n return group.callFunction(obj, options);\n }\n else if (obj[\"ref\"]) {\n return getReferenceValue(obj, options);\n }\n throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);\n};\nexport const callFunction = ({ fn, argv }, options) => {\n const evaluatedArgs = argv.map((arg) => [\"boolean\", \"number\"].includes(typeof arg) ? arg : group.evaluateExpression(arg, \"arg\", options));\n const fnSegments = fn.split(\".\");\n if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) {\n return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs);\n }\n return endpointFunctions[fn](...evaluatedArgs);\n};\nexport const group = {\n evaluateExpression,\n callFunction,\n};\n", "export { callFunction } from \"./evaluateExpression\";\n", "import { debugId, toDebugString } from \"../debug\";\nimport { EndpointError } from \"../types\";\nimport { callFunction } from \"./callFunction\";\nexport const evaluateCondition = ({ assign, ...fnArgs }, options) => {\n if (assign && assign in options.referenceRecord) {\n throw new EndpointError(`'${assign}' is already defined in Reference Record.`);\n }\n const value = callFunction(fnArgs, options);\n options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`);\n return {\n result: value === \"\" ? true : !!value,\n ...(assign != null && { toAssign: { name: assign, value } }),\n };\n};\n", "import { debugId, toDebugString } from \"../debug\";\nimport { evaluateCondition } from \"./evaluateCondition\";\nexport const evaluateConditions = (conditions = [], options) => {\n const conditionsReferenceRecord = {};\n for (const condition of conditions) {\n const { result, toAssign } = evaluateCondition(condition, {\n ...options,\n referenceRecord: {\n ...options.referenceRecord,\n ...conditionsReferenceRecord,\n },\n });\n if (!result) {\n return { result };\n }\n if (toAssign) {\n conditionsReferenceRecord[toAssign.name] = toAssign.value;\n options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`);\n }\n }\n return { result: true, referenceRecord: conditionsReferenceRecord };\n};\n", "import { EndpointError } from \"../types\";\nimport { evaluateExpression } from \"./evaluateExpression\";\nexport const getEndpointHeaders = (headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({\n ...acc,\n [headerKey]: headerVal.map((headerValEntry) => {\n const processedExpr = evaluateExpression(headerValEntry, \"Header value entry\", options);\n if (typeof processedExpr !== \"string\") {\n throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`);\n }\n return processedExpr;\n }),\n}), {});\n", "import { EndpointError } from \"../types\";\nimport { evaluateTemplate } from \"./evaluateTemplate\";\nexport const getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({\n ...acc,\n [propertyKey]: group.getEndpointProperty(propertyVal, options),\n}), {});\nexport const getEndpointProperty = (property, options) => {\n if (Array.isArray(property)) {\n return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));\n }\n switch (typeof property) {\n case \"string\":\n return evaluateTemplate(property, options);\n case \"object\":\n if (property === null) {\n throw new EndpointError(`Unexpected endpoint property: ${property}`);\n }\n return group.getEndpointProperties(property, options);\n case \"boolean\":\n return property;\n default:\n throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`);\n }\n};\nexport const group = {\n getEndpointProperty,\n getEndpointProperties,\n};\n", "import { EndpointError } from \"../types\";\nimport { evaluateExpression } from \"./evaluateExpression\";\nexport const getEndpointUrl = (endpointUrl, options) => {\n const expression = evaluateExpression(endpointUrl, \"Endpoint URL\", options);\n if (typeof expression === \"string\") {\n try {\n return new URL(expression);\n }\n catch (error) {\n console.error(`Failed to construct URL with ${expression}`, error);\n throw error;\n }\n }\n throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`);\n};\n", "import { debugId, toDebugString } from \"../debug\";\nimport { evaluateConditions } from \"./evaluateConditions\";\nimport { getEndpointHeaders } from \"./getEndpointHeaders\";\nimport { getEndpointProperties } from \"./getEndpointProperties\";\nimport { getEndpointUrl } from \"./getEndpointUrl\";\nexport const evaluateEndpointRule = (endpointRule, options) => {\n const { conditions, endpoint } = endpointRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n const endpointRuleOptions = {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord },\n };\n const { url, properties, headers } = endpoint;\n options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`);\n return {\n ...(headers != undefined && {\n headers: getEndpointHeaders(headers, endpointRuleOptions),\n }),\n ...(properties != undefined && {\n properties: getEndpointProperties(properties, endpointRuleOptions),\n }),\n url: getEndpointUrl(url, endpointRuleOptions),\n };\n};\n", "import { EndpointError } from \"../types\";\nimport { evaluateConditions } from \"./evaluateConditions\";\nimport { evaluateExpression } from \"./evaluateExpression\";\nexport const evaluateErrorRule = (errorRule, options) => {\n const { conditions, error } = errorRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n throw new EndpointError(evaluateExpression(error, \"Error\", {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord },\n }));\n};\n", "import { EndpointError } from \"../types\";\nimport { evaluateConditions } from \"./evaluateConditions\";\nimport { evaluateEndpointRule } from \"./evaluateEndpointRule\";\nimport { evaluateErrorRule } from \"./evaluateErrorRule\";\nexport const evaluateRules = (rules, options) => {\n for (const rule of rules) {\n if (rule.type === \"endpoint\") {\n const endpointOrUndefined = evaluateEndpointRule(rule, options);\n if (endpointOrUndefined) {\n return endpointOrUndefined;\n }\n }\n else if (rule.type === \"error\") {\n evaluateErrorRule(rule, options);\n }\n else if (rule.type === \"tree\") {\n const endpointOrUndefined = group.evaluateTreeRule(rule, options);\n if (endpointOrUndefined) {\n return endpointOrUndefined;\n }\n }\n else {\n throw new EndpointError(`Unknown endpoint rule: ${rule}`);\n }\n }\n throw new EndpointError(`Rules evaluation failed`);\n};\nexport const evaluateTreeRule = (treeRule, options) => {\n const { conditions, rules } = treeRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n return group.evaluateRules(rules, {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord },\n });\n};\nexport const group = {\n evaluateRules,\n evaluateTreeRule,\n};\n", "export * from \"./customEndpointFunctions\";\nexport * from \"./evaluateRules\";\n", "import { debugId, toDebugString } from \"./debug\";\nimport { EndpointError } from \"./types\";\nimport { evaluateRules } from \"./utils\";\nexport const resolveEndpoint = (ruleSetObject, options) => {\n const { endpointParams, logger } = options;\n const { parameters, rules } = ruleSetObject;\n options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);\n const paramsWithDefault = Object.entries(parameters)\n .filter(([, v]) => v.default != null)\n .map(([k, v]) => [k, v.default]);\n if (paramsWithDefault.length > 0) {\n for (const [paramKey, paramDefaultValue] of paramsWithDefault) {\n endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue;\n }\n }\n const requiredParams = Object.entries(parameters)\n .filter(([, v]) => v.required)\n .map(([k]) => k);\n for (const requiredParam of requiredParams) {\n if (endpointParams[requiredParam] == null) {\n throw new EndpointError(`Missing required parameter: '${requiredParam}'`);\n }\n }\n const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} });\n options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`);\n return endpoint;\n};\n", "export * from \"./cache/EndpointCache\";\nexport * from \"./lib/isIpAddress\";\nexport * from \"./lib/isValidHostLabel\";\nexport * from \"./utils/customEndpointFunctions\";\nexport * from \"./resolveEndpoint\";\nexport * from \"./types\";\n", "export { isIpAddress } from \"@smithy/util-endpoints\";\n", "import { isValidHostLabel } from \"@smithy/util-endpoints\";\nimport { isIpAddress } from \"../isIpAddress\";\nexport const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {\n if (allowSubDomains) {\n for (const label of value.split(\".\")) {\n if (!isVirtualHostableS3Bucket(label)) {\n return false;\n }\n }\n return true;\n }\n if (!isValidHostLabel(value)) {\n return false;\n }\n if (value.length < 3 || value.length > 63) {\n return false;\n }\n if (value !== value.toLowerCase()) {\n return false;\n }\n if (isIpAddress(value)) {\n return false;\n }\n return true;\n};\n", "const ARN_DELIMITER = \":\";\nconst RESOURCE_DELIMITER = \"/\";\nexport const parseArn = (value) => {\n const segments = value.split(ARN_DELIMITER);\n if (segments.length < 6)\n return null;\n const [arn, partition, service, region, accountId, ...resourcePath] = segments;\n if (arn !== \"arn\" || partition === \"\" || service === \"\" || resourcePath.join(ARN_DELIMITER) === \"\")\n return null;\n const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat();\n return {\n partition,\n service,\n region,\n accountId,\n resourceId,\n };\n};\n", "{\n \"partitions\": [{\n \"id\": \"aws\",\n \"outputs\": {\n \"dnsSuffix\": \"amazonaws.com\",\n \"dualStackDnsSuffix\": \"api.aws\",\n \"implicitGlobalRegion\": \"us-east-1\",\n \"name\": \"aws\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"af-south-1\": {\n \"description\": \"Africa (Cape Town)\"\n },\n \"ap-east-1\": {\n \"description\": \"Asia Pacific (Hong Kong)\"\n },\n \"ap-east-2\": {\n \"description\": \"Asia Pacific (Taipei)\"\n },\n \"ap-northeast-1\": {\n \"description\": \"Asia Pacific (Tokyo)\"\n },\n \"ap-northeast-2\": {\n \"description\": \"Asia Pacific (Seoul)\"\n },\n \"ap-northeast-3\": {\n \"description\": \"Asia Pacific (Osaka)\"\n },\n \"ap-south-1\": {\n \"description\": \"Asia Pacific (Mumbai)\"\n },\n \"ap-south-2\": {\n \"description\": \"Asia Pacific (Hyderabad)\"\n },\n \"ap-southeast-1\": {\n \"description\": \"Asia Pacific (Singapore)\"\n },\n \"ap-southeast-2\": {\n \"description\": \"Asia Pacific (Sydney)\"\n },\n \"ap-southeast-3\": {\n \"description\": \"Asia Pacific (Jakarta)\"\n },\n \"ap-southeast-4\": {\n \"description\": \"Asia Pacific (Melbourne)\"\n },\n \"ap-southeast-5\": {\n \"description\": \"Asia Pacific (Malaysia)\"\n },\n \"ap-southeast-6\": {\n \"description\": \"Asia Pacific (New Zealand)\"\n },\n \"ap-southeast-7\": {\n \"description\": \"Asia Pacific (Thailand)\"\n },\n \"aws-global\": {\n \"description\": \"aws global region\"\n },\n \"ca-central-1\": {\n \"description\": \"Canada (Central)\"\n },\n \"ca-west-1\": {\n \"description\": \"Canada West (Calgary)\"\n },\n \"eu-central-1\": {\n \"description\": \"Europe (Frankfurt)\"\n },\n \"eu-central-2\": {\n \"description\": \"Europe (Zurich)\"\n },\n \"eu-north-1\": {\n \"description\": \"Europe (Stockholm)\"\n },\n \"eu-south-1\": {\n \"description\": \"Europe (Milan)\"\n },\n \"eu-south-2\": {\n \"description\": \"Europe (Spain)\"\n },\n \"eu-west-1\": {\n \"description\": \"Europe (Ireland)\"\n },\n \"eu-west-2\": {\n \"description\": \"Europe (London)\"\n },\n \"eu-west-3\": {\n \"description\": \"Europe (Paris)\"\n },\n \"il-central-1\": {\n \"description\": \"Israel (Tel Aviv)\"\n },\n \"me-central-1\": {\n \"description\": \"Middle East (UAE)\"\n },\n \"me-south-1\": {\n \"description\": \"Middle East (Bahrain)\"\n },\n \"mx-central-1\": {\n \"description\": \"Mexico (Central)\"\n },\n \"sa-east-1\": {\n \"description\": \"South America (Sao Paulo)\"\n },\n \"us-east-1\": {\n \"description\": \"US East (N. Virginia)\"\n },\n \"us-east-2\": {\n \"description\": \"US East (Ohio)\"\n },\n \"us-west-1\": {\n \"description\": \"US West (N. California)\"\n },\n \"us-west-2\": {\n \"description\": \"US West (Oregon)\"\n }\n }\n }, {\n \"id\": \"aws-cn\",\n \"outputs\": {\n \"dnsSuffix\": \"amazonaws.com.cn\",\n \"dualStackDnsSuffix\": \"api.amazonwebservices.com.cn\",\n \"implicitGlobalRegion\": \"cn-northwest-1\",\n \"name\": \"aws-cn\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^cn\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-cn-global\": {\n \"description\": \"aws-cn global region\"\n },\n \"cn-north-1\": {\n \"description\": \"China (Beijing)\"\n },\n \"cn-northwest-1\": {\n \"description\": \"China (Ningxia)\"\n }\n }\n }, {\n \"id\": \"aws-eusc\",\n \"outputs\": {\n \"dnsSuffix\": \"amazonaws.eu\",\n \"dualStackDnsSuffix\": \"api.amazonwebservices.eu\",\n \"implicitGlobalRegion\": \"eusc-de-east-1\",\n \"name\": \"aws-eusc\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"eusc-de-east-1\": {\n \"description\": \"AWS European Sovereign Cloud (Germany)\"\n }\n }\n }, {\n \"id\": \"aws-iso\",\n \"outputs\": {\n \"dnsSuffix\": \"c2s.ic.gov\",\n \"dualStackDnsSuffix\": \"api.aws.ic.gov\",\n \"implicitGlobalRegion\": \"us-iso-east-1\",\n \"name\": \"aws-iso\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-iso-global\": {\n \"description\": \"aws-iso global region\"\n },\n \"us-iso-east-1\": {\n \"description\": \"US ISO East\"\n },\n \"us-iso-west-1\": {\n \"description\": \"US ISO WEST\"\n }\n }\n }, {\n \"id\": \"aws-iso-b\",\n \"outputs\": {\n \"dnsSuffix\": \"sc2s.sgov.gov\",\n \"dualStackDnsSuffix\": \"api.aws.scloud\",\n \"implicitGlobalRegion\": \"us-isob-east-1\",\n \"name\": \"aws-iso-b\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-iso-b-global\": {\n \"description\": \"aws-iso-b global region\"\n },\n \"us-isob-east-1\": {\n \"description\": \"US ISOB East (Ohio)\"\n },\n \"us-isob-west-1\": {\n \"description\": \"US ISOB West\"\n }\n }\n }, {\n \"id\": \"aws-iso-e\",\n \"outputs\": {\n \"dnsSuffix\": \"cloud.adc-e.uk\",\n \"dualStackDnsSuffix\": \"api.cloud-aws.adc-e.uk\",\n \"implicitGlobalRegion\": \"eu-isoe-west-1\",\n \"name\": \"aws-iso-e\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-iso-e-global\": {\n \"description\": \"aws-iso-e global region\"\n },\n \"eu-isoe-west-1\": {\n \"description\": \"EU ISOE West\"\n }\n }\n }, {\n \"id\": \"aws-iso-f\",\n \"outputs\": {\n \"dnsSuffix\": \"csp.hci.ic.gov\",\n \"dualStackDnsSuffix\": \"api.aws.hci.ic.gov\",\n \"implicitGlobalRegion\": \"us-isof-south-1\",\n \"name\": \"aws-iso-f\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-iso-f-global\": {\n \"description\": \"aws-iso-f global region\"\n },\n \"us-isof-east-1\": {\n \"description\": \"US ISOF EAST\"\n },\n \"us-isof-south-1\": {\n \"description\": \"US ISOF SOUTH\"\n }\n }\n }, {\n \"id\": \"aws-us-gov\",\n \"outputs\": {\n \"dnsSuffix\": \"amazonaws.com\",\n \"dualStackDnsSuffix\": \"api.aws\",\n \"implicitGlobalRegion\": \"us-gov-west-1\",\n \"name\": \"aws-us-gov\",\n \"supportsDualStack\": true,\n \"supportsFIPS\": true\n },\n \"regionRegex\": \"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$\",\n \"regions\": {\n \"aws-us-gov-global\": {\n \"description\": \"aws-us-gov global region\"\n },\n \"us-gov-east-1\": {\n \"description\": \"AWS GovCloud (US-East)\"\n },\n \"us-gov-west-1\": {\n \"description\": \"AWS GovCloud (US-West)\"\n }\n }\n }],\n \"version\": \"1.1\"\n}\n", "import partitionsInfo from \"./partitions.json\";\nlet selectedPartitionsInfo = partitionsInfo;\nlet selectedUserAgentPrefix = \"\";\nexport const partition = (value) => {\n const { partitions } = selectedPartitionsInfo;\n for (const partition of partitions) {\n const { regions, outputs } = partition;\n for (const [region, regionData] of Object.entries(regions)) {\n if (region === value) {\n return {\n ...outputs,\n ...regionData,\n };\n }\n }\n }\n for (const partition of partitions) {\n const { regionRegex, outputs } = partition;\n if (new RegExp(regionRegex).test(value)) {\n return {\n ...outputs,\n };\n }\n }\n const DEFAULT_PARTITION = partitions.find((partition) => partition.id === \"aws\");\n if (!DEFAULT_PARTITION) {\n throw new Error(\"Provided region was not found in the partition array or regex,\" +\n \" and default partition with id 'aws' doesn't exist.\");\n }\n return {\n ...DEFAULT_PARTITION.outputs,\n };\n};\nexport const setPartitionInfo = (partitionsInfo, userAgentPrefix = \"\") => {\n selectedPartitionsInfo = partitionsInfo;\n selectedUserAgentPrefix = userAgentPrefix;\n};\nexport const useDefaultPartitionInfo = () => {\n setPartitionInfo(partitionsInfo, \"\");\n};\nexport const getUserAgentPrefix = () => selectedUserAgentPrefix;\n", "import { customEndpointFunctions } from \"@smithy/util-endpoints\";\nimport { isVirtualHostableS3Bucket } from \"./lib/aws/isVirtualHostableS3Bucket\";\nimport { parseArn } from \"./lib/aws/parseArn\";\nimport { partition } from \"./lib/aws/partition\";\nexport const awsEndpointFunctions = {\n isVirtualHostableS3Bucket: isVirtualHostableS3Bucket,\n parseArn: parseArn,\n partition: partition,\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n", "import { parseUrl } from \"@smithy/url-parser\";\nexport const resolveDefaultAwsRegionalEndpointsConfig = (input) => {\n if (typeof input.endpointProvider !== \"function\") {\n throw new Error(\"@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.\");\n }\n const { endpoint } = input;\n if (endpoint === undefined) {\n input.endpoint = async () => {\n return toEndpointV1(input.endpointProvider({\n Region: typeof input.region === \"function\" ? await input.region() : input.region,\n UseDualStack: typeof input.useDualstackEndpoint === \"function\"\n ? await input.useDualstackEndpoint()\n : input.useDualstackEndpoint,\n UseFIPS: typeof input.useFipsEndpoint === \"function\" ? await input.useFipsEndpoint() : input.useFipsEndpoint,\n Endpoint: undefined,\n }, { logger: input.logger }));\n };\n }\n return input;\n};\nexport const toEndpointV1 = (endpoint) => parseUrl(endpoint.url);\n", "export { resolveEndpoint } from \"@smithy/util-endpoints\";\n", "export { EndpointError } from \"@smithy/util-endpoints\";\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export {};\n", "export * from \"./EndpointError\";\nexport * from \"./EndpointRuleObject\";\nexport * from \"./ErrorRuleObject\";\nexport * from \"./RuleSetObject\";\nexport * from \"./TreeRuleObject\";\nexport * from \"./shared\";\n", "export * from \"./aws\";\nexport * from \"./lib/aws/partition\";\nexport * from \"./lib/isIpAddress\";\nexport * from \"./resolveDefaultAwsRegionalEndpointsConfig\";\nexport * from \"./resolveEndpoint\";\nexport * from \"./types\";\n", "export var RETRY_MODES;\n(function (RETRY_MODES) {\n RETRY_MODES[\"STANDARD\"] = \"standard\";\n RETRY_MODES[\"ADAPTIVE\"] = \"adaptive\";\n})(RETRY_MODES || (RETRY_MODES = {}));\nexport const DEFAULT_MAX_ATTEMPTS = 3;\nexport const DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD;\n", "export const CLOCK_SKEW_ERROR_CODES = [\n \"AuthFailure\",\n \"InvalidSignatureException\",\n \"RequestExpired\",\n \"RequestInTheFuture\",\n \"RequestTimeTooSkewed\",\n \"SignatureDoesNotMatch\",\n];\nexport const THROTTLING_ERROR_CODES = [\n \"BandwidthLimitExceeded\",\n \"EC2ThrottledException\",\n \"LimitExceededException\",\n \"PriorRequestNotComplete\",\n \"ProvisionedThroughputExceededException\",\n \"RequestLimitExceeded\",\n \"RequestThrottled\",\n \"RequestThrottledException\",\n \"SlowDown\",\n \"ThrottledException\",\n \"Throttling\",\n \"ThrottlingException\",\n \"TooManyRequestsException\",\n \"TransactionInProgressException\",\n];\nexport const TRANSIENT_ERROR_CODES = [\"TimeoutError\", \"RequestTimeout\", \"RequestTimeoutException\"];\nexport const TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];\nexport const NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"ECONNREFUSED\", \"EPIPE\", \"ETIMEDOUT\"];\nexport const NODEJS_NETWORK_ERROR_CODES = [\"EHOSTUNREACH\", \"ENETUNREACH\", \"ENOTFOUND\"];\n", "import { CLOCK_SKEW_ERROR_CODES, NODEJS_NETWORK_ERROR_CODES, NODEJS_TIMEOUT_ERROR_CODES, THROTTLING_ERROR_CODES, TRANSIENT_ERROR_CODES, TRANSIENT_ERROR_STATUS_CODES, } from \"./constants\";\nexport const isRetryableByTrait = (error) => error?.$retryable !== undefined;\nexport const isClockSkewError = (error) => CLOCK_SKEW_ERROR_CODES.includes(error.name);\nexport const isClockSkewCorrectedError = (error) => error.$metadata?.clockSkewCorrected;\nexport const isBrowserNetworkError = (error) => {\n const errorMessages = new Set([\n \"Failed to fetch\",\n \"NetworkError when attempting to fetch resource\",\n \"The Internet connection appears to be offline\",\n \"Load failed\",\n \"Network request failed\",\n ]);\n const isValid = error && error instanceof TypeError;\n if (!isValid) {\n return false;\n }\n return errorMessages.has(error.message);\n};\nexport const isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 ||\n THROTTLING_ERROR_CODES.includes(error.name) ||\n error.$retryable?.throttling == true;\nexport const isTransientError = (error, depth = 0) => isRetryableByTrait(error) ||\n isClockSkewCorrectedError(error) ||\n TRANSIENT_ERROR_CODES.includes(error.name) ||\n NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || \"\") ||\n NODEJS_NETWORK_ERROR_CODES.includes(error?.code || \"\") ||\n TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) ||\n isBrowserNetworkError(error) ||\n (error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1));\nexport const isServerError = (error) => {\n if (error.$metadata?.httpStatusCode !== undefined) {\n const statusCode = error.$metadata.httpStatusCode;\n if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) {\n return true;\n }\n return false;\n }\n return false;\n};\n", "import { isThrottlingError } from \"@smithy/service-error-classification\";\nexport class DefaultRateLimiter {\n static setTimeoutFn = setTimeout;\n beta;\n minCapacity;\n minFillRate;\n scaleConstant;\n smooth;\n currentCapacity = 0;\n enabled = false;\n lastMaxRate = 0;\n measuredTxRate = 0;\n requestCount = 0;\n fillRate;\n lastThrottleTime;\n lastTimestamp = 0;\n lastTxRateBucket;\n maxCapacity;\n timeWindow = 0;\n constructor(options) {\n this.beta = options?.beta ?? 0.7;\n this.minCapacity = options?.minCapacity ?? 1;\n this.minFillRate = options?.minFillRate ?? 0.5;\n this.scaleConstant = options?.scaleConstant ?? 0.4;\n this.smooth = options?.smooth ?? 0.8;\n const currentTimeInSeconds = this.getCurrentTimeInSeconds();\n this.lastThrottleTime = currentTimeInSeconds;\n this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());\n this.fillRate = this.minFillRate;\n this.maxCapacity = this.minCapacity;\n }\n getCurrentTimeInSeconds() {\n return Date.now() / 1000;\n }\n async getSendToken() {\n return this.acquireTokenBucket(1);\n }\n async acquireTokenBucket(amount) {\n if (!this.enabled) {\n return;\n }\n this.refillTokenBucket();\n if (amount > this.currentCapacity) {\n const delay = ((amount - this.currentCapacity) / this.fillRate) * 1000;\n await new Promise((resolve) => DefaultRateLimiter.setTimeoutFn(resolve, delay));\n }\n this.currentCapacity = this.currentCapacity - amount;\n }\n refillTokenBucket() {\n const timestamp = this.getCurrentTimeInSeconds();\n if (!this.lastTimestamp) {\n this.lastTimestamp = timestamp;\n return;\n }\n const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate;\n this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount);\n this.lastTimestamp = timestamp;\n }\n updateClientSendingRate(response) {\n let calculatedRate;\n this.updateMeasuredRate();\n if (isThrottlingError(response)) {\n const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);\n this.lastMaxRate = rateToUse;\n this.calculateTimeWindow();\n this.lastThrottleTime = this.getCurrentTimeInSeconds();\n calculatedRate = this.cubicThrottle(rateToUse);\n this.enableTokenBucket();\n }\n else {\n this.calculateTimeWindow();\n calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());\n }\n const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);\n this.updateTokenBucketRate(newRate);\n }\n calculateTimeWindow() {\n this.timeWindow = this.getPrecise(Math.pow((this.lastMaxRate * (1 - this.beta)) / this.scaleConstant, 1 / 3));\n }\n cubicThrottle(rateToUse) {\n return this.getPrecise(rateToUse * this.beta);\n }\n cubicSuccess(timestamp) {\n return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate);\n }\n enableTokenBucket() {\n this.enabled = true;\n }\n updateTokenBucketRate(newRate) {\n this.refillTokenBucket();\n this.fillRate = Math.max(newRate, this.minFillRate);\n this.maxCapacity = Math.max(newRate, this.minCapacity);\n this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity);\n }\n updateMeasuredRate() {\n const t = this.getCurrentTimeInSeconds();\n const timeBucket = Math.floor(t * 2) / 2;\n this.requestCount++;\n if (timeBucket > this.lastTxRateBucket) {\n const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);\n this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));\n this.requestCount = 0;\n this.lastTxRateBucket = timeBucket;\n }\n }\n getPrecise(num) {\n return parseFloat(num.toFixed(8));\n }\n}\n", "export const DEFAULT_RETRY_DELAY_BASE = 100;\nexport const MAXIMUM_RETRY_DELAY = 20 * 1000;\nexport const THROTTLING_RETRY_DELAY_BASE = 500;\nexport const INITIAL_RETRY_TOKENS = 500;\nexport const RETRY_COST = 5;\nexport const TIMEOUT_RETRY_COST = 10;\nexport const NO_RETRY_INCREMENT = 1;\nexport const INVOCATION_ID_HEADER = \"amz-sdk-invocation-id\";\nexport const REQUEST_HEADER = \"amz-sdk-request\";\n", "import { DEFAULT_RETRY_DELAY_BASE, MAXIMUM_RETRY_DELAY } from \"./constants\";\nexport const getDefaultRetryBackoffStrategy = () => {\n let delayBase = DEFAULT_RETRY_DELAY_BASE;\n const computeNextBackoffDelay = (attempts) => {\n return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));\n };\n const setDelayBase = (delay) => {\n delayBase = delay;\n };\n return {\n computeNextBackoffDelay,\n setDelayBase,\n };\n};\n", "import { MAXIMUM_RETRY_DELAY } from \"./constants\";\nexport const createDefaultRetryToken = ({ retryDelay, retryCount, retryCost, }) => {\n const getRetryCount = () => retryCount;\n const getRetryDelay = () => Math.min(MAXIMUM_RETRY_DELAY, retryDelay);\n const getRetryCost = () => retryCost;\n return {\n getRetryCount,\n getRetryDelay,\n getRetryCost,\n };\n};\n", "import { DEFAULT_MAX_ATTEMPTS, RETRY_MODES } from \"./config\";\nimport { DEFAULT_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, NO_RETRY_INCREMENT, RETRY_COST, THROTTLING_RETRY_DELAY_BASE, TIMEOUT_RETRY_COST, } from \"./constants\";\nimport { getDefaultRetryBackoffStrategy } from \"./defaultRetryBackoffStrategy\";\nimport { createDefaultRetryToken } from \"./defaultRetryToken\";\nexport class StandardRetryStrategy {\n maxAttempts;\n mode = RETRY_MODES.STANDARD;\n capacity = INITIAL_RETRY_TOKENS;\n retryBackoffStrategy = getDefaultRetryBackoffStrategy();\n maxAttemptsProvider;\n constructor(maxAttempts) {\n this.maxAttempts = maxAttempts;\n this.maxAttemptsProvider = typeof maxAttempts === \"function\" ? maxAttempts : async () => maxAttempts;\n }\n async acquireInitialRetryToken(retryTokenScope) {\n return createDefaultRetryToken({\n retryDelay: DEFAULT_RETRY_DELAY_BASE,\n retryCount: 0,\n });\n }\n async refreshRetryTokenForRetry(token, errorInfo) {\n const maxAttempts = await this.getMaxAttempts();\n if (this.shouldRetry(token, errorInfo, maxAttempts)) {\n const errorType = errorInfo.errorType;\n this.retryBackoffStrategy.setDelayBase(errorType === \"THROTTLING\" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE);\n const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount());\n const retryDelay = errorInfo.retryAfterHint\n ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType)\n : delayFromErrorType;\n const capacityCost = this.getCapacityCost(errorType);\n this.capacity -= capacityCost;\n return createDefaultRetryToken({\n retryDelay,\n retryCount: token.getRetryCount() + 1,\n retryCost: capacityCost,\n });\n }\n throw new Error(\"No retry token available\");\n }\n recordSuccess(token) {\n this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT));\n }\n getCapacity() {\n return this.capacity;\n }\n async getMaxAttempts() {\n try {\n return await this.maxAttemptsProvider();\n }\n catch (error) {\n console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);\n return DEFAULT_MAX_ATTEMPTS;\n }\n }\n shouldRetry(tokenToRenew, errorInfo, maxAttempts) {\n const attempts = tokenToRenew.getRetryCount() + 1;\n return (attempts < maxAttempts &&\n this.capacity >= this.getCapacityCost(errorInfo.errorType) &&\n this.isRetryableError(errorInfo.errorType));\n }\n getCapacityCost(errorType) {\n return errorType === \"TRANSIENT\" ? TIMEOUT_RETRY_COST : RETRY_COST;\n }\n isRetryableError(errorType) {\n return errorType === \"THROTTLING\" || errorType === \"TRANSIENT\";\n }\n}\n", "import { RETRY_MODES } from \"./config\";\nimport { DefaultRateLimiter } from \"./DefaultRateLimiter\";\nimport { StandardRetryStrategy } from \"./StandardRetryStrategy\";\nexport class AdaptiveRetryStrategy {\n maxAttemptsProvider;\n rateLimiter;\n standardRetryStrategy;\n mode = RETRY_MODES.ADAPTIVE;\n constructor(maxAttemptsProvider, options) {\n this.maxAttemptsProvider = maxAttemptsProvider;\n const { rateLimiter } = options ?? {};\n this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();\n this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider);\n }\n async acquireInitialRetryToken(retryTokenScope) {\n await this.rateLimiter.getSendToken();\n return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);\n }\n async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {\n this.rateLimiter.updateClientSendingRate(errorInfo);\n return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);\n }\n recordSuccess(token) {\n this.rateLimiter.updateClientSendingRate({});\n this.standardRetryStrategy.recordSuccess(token);\n }\n}\n", "import { DEFAULT_RETRY_DELAY_BASE } from \"./constants\";\nimport { StandardRetryStrategy } from \"./StandardRetryStrategy\";\nexport class ConfiguredRetryStrategy extends StandardRetryStrategy {\n computeNextBackoffDelay;\n constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) {\n super(typeof maxAttempts === \"function\" ? maxAttempts : async () => maxAttempts);\n if (typeof computeNextBackoffDelay === \"number\") {\n this.computeNextBackoffDelay = () => computeNextBackoffDelay;\n }\n else {\n this.computeNextBackoffDelay = computeNextBackoffDelay;\n }\n }\n async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {\n const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo);\n token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount());\n return token;\n }\n}\n", "export {};\n", "export * from \"./AdaptiveRetryStrategy\";\nexport * from \"./ConfiguredRetryStrategy\";\nexport * from \"./DefaultRateLimiter\";\nexport * from \"./StandardRetryStrategy\";\nexport * from \"./config\";\nexport * from \"./constants\";\nexport * from \"./types\";\n", "import { setFeature } from \"@aws-sdk/core\";\nimport { RETRY_MODES } from \"@smithy/util-retry\";\nconst ACCOUNT_ID_ENDPOINT_REGEX = /\\d{12}\\.ddb/;\nexport async function checkFeatures(context, config, args) {\n const request = args.request;\n if (request?.headers?.[\"smithy-protocol\"] === \"rpc-v2-cbor\") {\n setFeature(context, \"PROTOCOL_RPC_V2_CBOR\", \"M\");\n }\n if (typeof config.retryStrategy === \"function\") {\n const retryStrategy = await config.retryStrategy();\n if (typeof retryStrategy.mode === \"string\") {\n switch (retryStrategy.mode) {\n case RETRY_MODES.ADAPTIVE:\n setFeature(context, \"RETRY_MODE_ADAPTIVE\", \"F\");\n break;\n case RETRY_MODES.STANDARD:\n setFeature(context, \"RETRY_MODE_STANDARD\", \"E\");\n break;\n }\n }\n }\n if (typeof config.accountIdEndpointMode === \"function\") {\n const endpointV2 = context.endpointV2;\n if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {\n setFeature(context, \"ACCOUNT_ID_ENDPOINT\", \"O\");\n }\n switch (await config.accountIdEndpointMode?.()) {\n case \"disabled\":\n setFeature(context, \"ACCOUNT_ID_MODE_DISABLED\", \"Q\");\n break;\n case \"preferred\":\n setFeature(context, \"ACCOUNT_ID_MODE_PREFERRED\", \"P\");\n break;\n case \"required\":\n setFeature(context, \"ACCOUNT_ID_MODE_REQUIRED\", \"R\");\n break;\n }\n }\n const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity;\n if (identity?.$source) {\n const credentials = identity;\n if (credentials.accountId) {\n setFeature(context, \"RESOLVED_ACCOUNT_ID\", \"T\");\n }\n for (const [key, value] of Object.entries(credentials.$source ?? {})) {\n setFeature(context, key, value);\n }\n }\n}\n", "export const USER_AGENT = \"user-agent\";\nexport const X_AMZ_USER_AGENT = \"x-amz-user-agent\";\nexport const SPACE = \" \";\nexport const UA_NAME_SEPARATOR = \"/\";\nexport const UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\\-.^_`|~\\w]/g;\nexport const UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\\-.^_`|~\\w#]/g;\nexport const UA_ESCAPE_CHAR = \"-\";\n", "const BYTE_LIMIT = 1024;\nexport function encodeFeatures(features) {\n let buffer = \"\";\n for (const key in features) {\n const val = features[key];\n if (buffer.length + val.length + 1 <= BYTE_LIMIT) {\n if (buffer.length) {\n buffer += \",\" + val;\n }\n else {\n buffer += val;\n }\n continue;\n }\n break;\n }\n return buffer;\n}\n", "import { getUserAgentPrefix } from \"@aws-sdk/util-endpoints\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { checkFeatures } from \"./check-features\";\nimport { SPACE, UA_ESCAPE_CHAR, UA_NAME_ESCAPE_REGEX, UA_NAME_SEPARATOR, UA_VALUE_ESCAPE_REGEX, USER_AGENT, X_AMZ_USER_AGENT, } from \"./constants\";\nimport { encodeFeatures } from \"./encode-features\";\nexport const userAgentMiddleware = (options) => (next, context) => async (args) => {\n const { request } = args;\n if (!HttpRequest.isInstance(request)) {\n return next(args);\n }\n const { headers } = request;\n const userAgent = context?.userAgent?.map(escapeUserAgent) || [];\n const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);\n await checkFeatures(context, options, args);\n const awsContext = context;\n defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);\n const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];\n const appId = await options.userAgentAppId();\n if (appId) {\n defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`]));\n }\n const prefix = getUserAgentPrefix();\n const sdkUserAgentValue = (prefix ? [prefix] : [])\n .concat([...defaultUserAgent, ...userAgent, ...customUserAgent])\n .join(SPACE);\n const normalUAValue = [\n ...defaultUserAgent.filter((section) => section.startsWith(\"aws-sdk-\")),\n ...customUserAgent,\n ].join(SPACE);\n if (options.runtime !== \"browser\") {\n if (normalUAValue) {\n headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT]\n ? `${headers[USER_AGENT]} ${normalUAValue}`\n : normalUAValue;\n }\n headers[USER_AGENT] = sdkUserAgentValue;\n }\n else {\n headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;\n }\n return next({\n ...args,\n request,\n });\n};\nconst escapeUserAgent = (userAgentPair) => {\n const name = userAgentPair[0]\n .split(UA_NAME_SEPARATOR)\n .map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR))\n .join(UA_NAME_SEPARATOR);\n const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);\n const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);\n const prefix = name.substring(0, prefixSeparatorIndex);\n let uaName = name.substring(prefixSeparatorIndex + 1);\n if (prefix === \"api\") {\n uaName = uaName.toLowerCase();\n }\n return [prefix, uaName, version]\n .filter((item) => item && item.length > 0)\n .reduce((acc, item, index) => {\n switch (index) {\n case 0:\n return item;\n case 1:\n return `${acc}/${item}`;\n default:\n return `${acc}#${item}`;\n }\n }, \"\");\n};\nexport const getUserAgentMiddlewareOptions = {\n name: \"getUserAgentMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"SET_USER_AGENT\", \"USER_AGENT\"],\n override: true,\n};\nexport const getUserAgentPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);\n },\n});\n", "export * from \"./configurations\";\nexport * from \"./user-agent-middleware\";\n", "import { booleanSelector, SelectorType } from \"@smithy/util-config-provider\";\nexport const ENV_USE_DUALSTACK_ENDPOINT = \"AWS_USE_DUALSTACK_ENDPOINT\";\nexport const CONFIG_USE_DUALSTACK_ENDPOINT = \"use_dualstack_endpoint\";\nexport const DEFAULT_USE_DUALSTACK_ENDPOINT = false;\nexport const NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV),\n configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG),\n default: false,\n};\n", "import { booleanSelector, SelectorType } from \"@smithy/util-config-provider\";\nexport const ENV_USE_FIPS_ENDPOINT = \"AWS_USE_FIPS_ENDPOINT\";\nexport const CONFIG_USE_FIPS_ENDPOINT = \"use_fips_endpoint\";\nexport const DEFAULT_USE_FIPS_ENDPOINT = false;\nexport const NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV),\n configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG),\n default: false,\n};\n", "import { normalizeProvider } from \"@smithy/util-middleware\";\nexport const resolveCustomEndpointsConfig = (input) => {\n const { tls, endpoint, urlParser, useDualstackEndpoint } = input;\n return Object.assign(input, {\n tls: tls ?? true,\n endpoint: normalizeProvider(typeof endpoint === \"string\" ? urlParser(endpoint) : endpoint),\n isCustomEndpoint: true,\n useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false),\n });\n};\n", "import { normalizeProvider } from \"@smithy/util-middleware\";\nimport { getEndpointFromRegion } from \"./utils/getEndpointFromRegion\";\nexport const resolveEndpointsConfig = (input) => {\n const useDualstackEndpoint = normalizeProvider(input.useDualstackEndpoint ?? false);\n const { endpoint, useFipsEndpoint, urlParser, tls } = input;\n return Object.assign(input, {\n tls: tls ?? true,\n endpoint: endpoint\n ? normalizeProvider(typeof endpoint === \"string\" ? urlParser(endpoint) : endpoint)\n : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }),\n isCustomEndpoint: !!endpoint,\n useDualstackEndpoint,\n });\n};\n", "export * from \"./NodeUseDualstackEndpointConfigOptions\";\nexport * from \"./NodeUseFipsEndpointConfigOptions\";\nexport * from \"./resolveCustomEndpointsConfig\";\nexport * from \"./resolveEndpointsConfig\";\n", "export const REGION_ENV_NAME = \"AWS_REGION\";\nexport const REGION_INI_NAME = \"region\";\nexport const NODE_REGION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[REGION_ENV_NAME],\n configFileSelector: (profile) => profile[REGION_INI_NAME],\n default: () => {\n throw new Error(\"Region is missing\");\n },\n};\nexport const NODE_REGION_CONFIG_FILE_OPTIONS = {\n preferredFile: \"credentials\",\n};\n", "import { isValidHostLabel } from \"@smithy/util-endpoints\";\nconst validRegions = new Set();\nexport const checkRegion = (region, check = isValidHostLabel) => {\n if (!validRegions.has(region) && !check(region)) {\n if (region === \"*\") {\n console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of \"*\". See \"sigv4a\" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);\n }\n else {\n throw new Error(`Region not accepted: region=\"${region}\" is not a valid hostname component.`);\n }\n }\n else {\n validRegions.add(region);\n }\n};\n", "export const isFipsRegion = (region) => typeof region === \"string\" && (region.startsWith(\"fips-\") || region.endsWith(\"-fips\"));\n", "import { isFipsRegion } from \"./isFipsRegion\";\nexport const getRealRegion = (region) => isFipsRegion(region)\n ? [\"fips-aws-global\", \"aws-fips\"].includes(region)\n ? \"us-east-1\"\n : region.replace(/fips-(dkr-|prod-)?|-fips/, \"\")\n : region;\n", "import { checkRegion } from \"./checkRegion\";\nimport { getRealRegion } from \"./getRealRegion\";\nimport { isFipsRegion } from \"./isFipsRegion\";\nexport const resolveRegionConfig = (input) => {\n const { region, useFipsEndpoint } = input;\n if (!region) {\n throw new Error(\"Region is missing\");\n }\n return Object.assign(input, {\n region: async () => {\n const providedRegion = typeof region === \"function\" ? await region() : region;\n const realRegion = getRealRegion(providedRegion);\n checkRegion(realRegion);\n return realRegion;\n },\n useFipsEndpoint: async () => {\n const providedRegion = typeof region === \"string\" ? region : await region();\n if (isFipsRegion(providedRegion)) {\n return true;\n }\n return typeof useFipsEndpoint !== \"function\" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();\n },\n });\n};\n", "export * from \"./config\";\nexport * from \"./resolveRegionConfig\";\n", "export {};\n", "export {};\n", "import { getHostnameFromVariants } from \"./getHostnameFromVariants\";\nimport { getResolvedHostname } from \"./getResolvedHostname\";\nimport { getResolvedPartition } from \"./getResolvedPartition\";\nimport { getResolvedSigningRegion } from \"./getResolvedSigningRegion\";\nexport const getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash, }) => {\n const partition = getResolvedPartition(region, { partitionHash });\n const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region;\n const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };\n const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions);\n const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions);\n const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });\n if (hostname === undefined) {\n throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);\n }\n const signingRegion = getResolvedSigningRegion(hostname, {\n signingRegion: regionHash[resolvedRegion]?.signingRegion,\n regionRegex: partitionHash[partition].regionRegex,\n useFipsEndpoint,\n });\n return {\n partition,\n signingService,\n hostname,\n ...(signingRegion && { signingRegion }),\n ...(regionHash[resolvedRegion]?.signingService && {\n signingService: regionHash[resolvedRegion].signingService,\n }),\n };\n};\n", "export * from \"./PartitionHash\";\nexport * from \"./RegionHash\";\nexport * from \"./getRegionInfo\";\n", "export * from \"./endpointsConfig\";\nexport * from \"./regionConfig\";\nexport * from \"./regionInfo\";\n", "export const resolveEventStreamSerdeConfig = (input) => Object.assign(input, {\n eventStreamMarshaller: input.eventStreamSerdeProvider(input),\n});\n", "export * from \"./EventStreamSerdeConfig\";\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nconst CONTENT_LENGTH_HEADER = \"content-length\";\nexport function contentLengthMiddleware(bodyLengthChecker) {\n return (next) => async (args) => {\n const request = args.request;\n if (HttpRequest.isInstance(request)) {\n const { body, headers } = request;\n if (body &&\n Object.keys(headers)\n .map((str) => str.toLowerCase())\n .indexOf(CONTENT_LENGTH_HEADER) === -1) {\n try {\n const length = bodyLengthChecker(body);\n request.headers = {\n ...request.headers,\n [CONTENT_LENGTH_HEADER]: String(length),\n };\n }\n catch (error) {\n }\n }\n }\n return next({\n ...args,\n request,\n });\n };\n}\nexport const contentLengthMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_CONTENT_LENGTH\", \"CONTENT_LENGTH\"],\n name: \"contentLengthMiddleware\",\n override: true,\n};\nexport const getContentLengthPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);\n },\n});\n", "export const resolveParamsForS3 = async (endpointParams) => {\n const bucket = endpointParams?.Bucket || \"\";\n if (typeof endpointParams.Bucket === \"string\") {\n endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent(\"#\")).replace(/\\?/g, encodeURIComponent(\"?\"));\n }\n if (isArnBucketName(bucket)) {\n if (endpointParams.ForcePathStyle === true) {\n throw new Error(\"Path-style addressing cannot be used with ARN buckets\");\n }\n }\n else if (!isDnsCompatibleBucketName(bucket) ||\n (bucket.indexOf(\".\") !== -1 && !String(endpointParams.Endpoint).startsWith(\"http:\")) ||\n bucket.toLowerCase() !== bucket ||\n bucket.length < 3) {\n endpointParams.ForcePathStyle = true;\n }\n if (endpointParams.DisableMultiRegionAccessPoints) {\n endpointParams.disableMultiRegionAccessPoints = true;\n endpointParams.DisableMRAP = true;\n }\n return endpointParams;\n};\nconst DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\\.\\-]{1,61}[a-z0-9]$/;\nconst IP_ADDRESS_PATTERN = /(\\d+\\.){3}\\d+/;\nconst DOTS_PATTERN = /\\.\\./;\nexport const DOT_PATTERN = /\\./;\nexport const S3_HOSTNAME_PATTERN = /^(.+\\.)?s3(-fips)?(\\.dualstack)?[.-]([a-z0-9-]+)\\./;\nexport const isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName);\nexport const isArnBucketName = (bucketName) => {\n const [arn, partition, service, , , bucket] = bucketName.split(\":\");\n const isArn = arn === \"arn\" && bucketName.split(\":\").length >= 6;\n const isValidArn = Boolean(isArn && partition && service && bucket);\n if (isArn && !isValidArn) {\n throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);\n }\n return isValidArn;\n};\n", "export * from \"./s3\";\n", "export const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => {\n const configProvider = async () => {\n let configValue;\n if (isClientContextParam) {\n const clientContextParams = config.clientContextParams;\n const nestedValue = clientContextParams?.[configKey];\n configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey];\n }\n else {\n configValue = config[configKey] ?? config[canonicalEndpointParamKey];\n }\n if (typeof configValue === \"function\") {\n return configValue();\n }\n return configValue;\n };\n if (configKey === \"credentialScope\" || canonicalEndpointParamKey === \"CredentialScope\") {\n return async () => {\n const credentials = typeof config.credentials === \"function\" ? await config.credentials() : config.credentials;\n const configValue = credentials?.credentialScope ?? credentials?.CredentialScope;\n return configValue;\n };\n }\n if (configKey === \"accountId\" || canonicalEndpointParamKey === \"AccountId\") {\n return async () => {\n const credentials = typeof config.credentials === \"function\" ? await config.credentials() : config.credentials;\n const configValue = credentials?.accountId ?? credentials?.AccountId;\n return configValue;\n };\n }\n if (configKey === \"endpoint\" || canonicalEndpointParamKey === \"endpoint\") {\n return async () => {\n if (config.isCustomEndpoint === false) {\n return undefined;\n }\n const endpoint = await configProvider();\n if (endpoint && typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n return endpoint.url.href;\n }\n if (\"hostname\" in endpoint) {\n const { protocol, hostname, port, path } = endpoint;\n return `${protocol}//${hostname}${port ? \":\" + port : \"\"}${path}`;\n }\n }\n return endpoint;\n };\n }\n return configProvider;\n};\n", "export const getEndpointFromConfig = async (serviceId) => undefined;\n", "import { parseUrl } from \"@smithy/url-parser\";\nexport const toEndpointV1 = (endpoint) => {\n if (typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n const v1Endpoint = parseUrl(endpoint.url);\n if (endpoint.headers) {\n v1Endpoint.headers = {};\n for (const [name, values] of Object.entries(endpoint.headers)) {\n v1Endpoint.headers[name.toLowerCase()] = values.join(\", \");\n }\n }\n return v1Endpoint;\n }\n return endpoint;\n }\n return parseUrl(endpoint);\n};\n", "import { resolveParamsForS3 } from \"../service-customizations\";\nimport { createConfigValueProvider } from \"./createConfigValueProvider\";\nimport { getEndpointFromConfig } from \"./getEndpointFromConfig\";\nimport { toEndpointV1 } from \"./toEndpointV1\";\nexport const getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => {\n if (!clientConfig.isCustomEndpoint) {\n let endpointFromConfig;\n if (clientConfig.serviceConfiguredEndpoint) {\n endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();\n }\n else {\n endpointFromConfig = await getEndpointFromConfig(clientConfig.serviceId);\n }\n if (endpointFromConfig) {\n clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));\n clientConfig.isCustomEndpoint = true;\n }\n }\n const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);\n if (typeof clientConfig.endpointProvider !== \"function\") {\n throw new Error(\"config.endpointProvider is not set.\");\n }\n const endpoint = clientConfig.endpointProvider(endpointParams, context);\n if (clientConfig.isCustomEndpoint && clientConfig.endpoint) {\n const customEndpoint = await clientConfig.endpoint();\n if (customEndpoint?.headers) {\n endpoint.headers ??= {};\n for (const [name, value] of Object.entries(customEndpoint.headers)) {\n endpoint.headers[name] = Array.isArray(value) ? value : [value];\n }\n }\n }\n return endpoint;\n};\nexport const resolveParams = async (commandInput, instructionsSupplier, clientConfig) => {\n const endpointParams = {};\n const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {};\n for (const [name, instruction] of Object.entries(instructions)) {\n switch (instruction.type) {\n case \"staticContextParams\":\n endpointParams[name] = instruction.value;\n break;\n case \"contextParams\":\n endpointParams[name] = commandInput[instruction.name];\n break;\n case \"clientContextParams\":\n case \"builtInParams\":\n endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== \"builtInParams\")();\n break;\n case \"operationContextParams\":\n endpointParams[name] = instruction.get(commandInput);\n break;\n default:\n throw new Error(\"Unrecognized endpoint parameter instruction: \" + JSON.stringify(instruction));\n }\n }\n if (Object.keys(instructions).length === 0) {\n Object.assign(endpointParams, clientConfig);\n }\n if (String(clientConfig.serviceId).toLowerCase() === \"s3\") {\n await resolveParamsForS3(endpointParams);\n }\n return endpointParams;\n};\n", "export * from \"./getEndpointFromInstructions\";\nexport * from \"./toEndpointV1\";\n", "import { setFeature } from \"@smithy/core\";\nimport { getSmithyContext } from \"@smithy/util-middleware\";\nimport { getEndpointFromInstructions } from \"./adaptors/getEndpointFromInstructions\";\nexport const endpointMiddleware = ({ config, instructions, }) => {\n return (next, context) => async (args) => {\n if (config.isCustomEndpoint) {\n setFeature(context, \"ENDPOINT_OVERRIDE\", \"N\");\n }\n const endpoint = await getEndpointFromInstructions(args.input, {\n getEndpointParameterInstructions() {\n return instructions;\n },\n }, { ...config }, context);\n context.endpointV2 = endpoint;\n context.authSchemes = endpoint.properties?.authSchemes;\n const authScheme = context.authSchemes?.[0];\n if (authScheme) {\n context[\"signing_region\"] = authScheme.signingRegion;\n context[\"signing_service\"] = authScheme.signingName;\n const smithyContext = getSmithyContext(context);\n const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;\n if (httpAuthOption) {\n httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {\n signing_region: authScheme.signingRegion,\n signingRegion: authScheme.signingRegion,\n signing_service: authScheme.signingName,\n signingName: authScheme.signingName,\n signingRegionSet: authScheme.signingRegionSet,\n }, authScheme.properties);\n }\n }\n return next({\n ...args,\n });\n };\n};\n", "import { HttpResponse } from \"@smithy/protocol-http\";\nexport const deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => {\n const { response } = await next(args);\n try {\n const parsed = await deserializer(response, options);\n return {\n response,\n output: parsed,\n };\n }\n catch (error) {\n Object.defineProperty(error, \"$response\", {\n value: response,\n enumerable: false,\n writable: false,\n configurable: false,\n });\n if (!(\"$metadata\" in error)) {\n const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;\n try {\n error.message += \"\\n \" + hint;\n }\n catch (e) {\n if (!context.logger || context.logger?.constructor?.name === \"NoOpLogger\") {\n console.warn(hint);\n }\n else {\n context.logger?.warn?.(hint);\n }\n }\n if (typeof error.$responseBodyText !== \"undefined\") {\n if (error.$response) {\n error.$response.body = error.$responseBodyText;\n }\n }\n try {\n if (HttpResponse.isInstance(response)) {\n const { headers = {} } = response;\n const headerEntries = Object.entries(headers);\n error.$metadata = {\n httpStatusCode: response.statusCode,\n requestId: findHeader(/^x-[\\w-]+-request-?id$/, headerEntries),\n extendedRequestId: findHeader(/^x-[\\w-]+-id-2$/, headerEntries),\n cfId: findHeader(/^x-[\\w-]+-cf-id$/, headerEntries),\n };\n }\n }\n catch (e) {\n }\n }\n throw error;\n }\n};\nconst findHeader = (pattern, headers) => {\n return (headers.find(([k]) => {\n return k.match(pattern);\n }) || [void 0, void 1])[1];\n};\n", "import { toEndpointV1 } from \"@smithy/core/endpoints\";\nexport const serializerMiddleware = (options, serializer) => (next, context) => async (args) => {\n const endpointConfig = options;\n const endpoint = context.endpointV2\n ? async () => toEndpointV1(context.endpointV2)\n : endpointConfig.endpoint;\n if (!endpoint) {\n throw new Error(\"No valid endpoint provider available.\");\n }\n const request = await serializer(args.input, { ...options, endpoint });\n return next({\n ...args,\n request,\n });\n};\n", "import { deserializerMiddleware } from \"./deserializerMiddleware\";\nimport { serializerMiddleware } from \"./serializerMiddleware\";\nexport const deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true,\n};\nexport const serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true,\n};\nexport function getSerdePlugin(config, serializer, deserializer) {\n return {\n applyToStack: (commandStack) => {\n commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);\n commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);\n },\n };\n}\n", "export * from \"./deserializerMiddleware\";\nexport * from \"./serdePlugin\";\nexport * from \"./serializerMiddleware\";\n", "import { serializerMiddlewareOption } from \"@smithy/middleware-serde\";\nimport { endpointMiddleware } from \"./endpointMiddleware\";\nexport const endpointMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"ENDPOINT_PARAMETERS\", \"ENDPOINT_V2\", \"ENDPOINT\"],\n name: \"endpointV2Middleware\",\n override: true,\n relation: \"before\",\n toMiddleware: serializerMiddlewareOption.name,\n};\nexport const getEndpointPlugin = (config, instructions) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(endpointMiddleware({\n config,\n instructions,\n }), endpointMiddlewareOptions);\n },\n});\n", "import { normalizeProvider } from \"@smithy/util-middleware\";\nimport { getEndpointFromConfig } from \"./adaptors/getEndpointFromConfig\";\nimport { toEndpointV1 } from \"./adaptors/toEndpointV1\";\nexport const resolveEndpointConfig = (input) => {\n const tls = input.tls ?? true;\n const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input;\n const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await normalizeProvider(endpoint)()) : undefined;\n const isCustomEndpoint = !!endpoint;\n const resolvedConfig = Object.assign(input, {\n endpoint: customEndpointProvider,\n tls,\n isCustomEndpoint,\n useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false),\n useFipsEndpoint: normalizeProvider(useFipsEndpoint ?? false),\n });\n let configuredEndpointPromise = undefined;\n resolvedConfig.serviceConfiguredEndpoint = async () => {\n if (input.serviceId && !configuredEndpointPromise) {\n configuredEndpointPromise = getEndpointFromConfig(input.serviceId);\n }\n return configuredEndpointPromise;\n };\n return resolvedConfig;\n};\n", "export const resolveEndpointRequiredConfig = (input) => {\n const { endpoint } = input;\n if (endpoint === undefined) {\n input.endpoint = async () => {\n throw new Error(\"@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.\");\n };\n }\n return input;\n};\n", "export {};\n", "export * from \"./adaptors\";\nexport * from \"./endpointMiddleware\";\nexport * from \"./getEndpointPlugin\";\nexport * from \"./resolveEndpointConfig\";\nexport * from \"./resolveEndpointRequiredConfig\";\nexport * from \"./types\";\n", "import { MAXIMUM_RETRY_DELAY } from \"@smithy/util-retry\";\nexport const defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));\n", "import { isClockSkewError, isRetryableByTrait, isThrottlingError, isTransientError, } from \"@smithy/service-error-classification\";\nexport const defaultRetryDecider = (error) => {\n if (!error) {\n return false;\n }\n return isRetryableByTrait(error) || isClockSkewError(error) || isThrottlingError(error) || isTransientError(error);\n};\n", "export const asSdkError = (error) => {\n if (error instanceof Error)\n return error;\n if (error instanceof Object)\n return Object.assign(new Error(), error);\n if (typeof error === \"string\")\n return new Error(error);\n return new Error(`AWS SDK error wrapper for ${error}`);\n};\n", "import { HttpRequest, HttpResponse } from \"@smithy/protocol-http\";\nimport { isThrottlingError } from \"@smithy/service-error-classification\";\nimport { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, INVOCATION_ID_HEADER, REQUEST_HEADER, RETRY_MODES, THROTTLING_RETRY_DELAY_BASE, } from \"@smithy/util-retry\";\nimport { v4 } from \"@smithy/uuid\";\nimport { getDefaultRetryQuota } from \"./defaultRetryQuota\";\nimport { defaultDelayDecider } from \"./delayDecider\";\nimport { defaultRetryDecider } from \"./retryDecider\";\nimport { asSdkError } from \"./util\";\nexport class StandardRetryStrategy {\n maxAttemptsProvider;\n retryDecider;\n delayDecider;\n retryQuota;\n mode = RETRY_MODES.STANDARD;\n constructor(maxAttemptsProvider, options) {\n this.maxAttemptsProvider = maxAttemptsProvider;\n this.retryDecider = options?.retryDecider ?? defaultRetryDecider;\n this.delayDecider = options?.delayDecider ?? defaultDelayDecider;\n this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(INITIAL_RETRY_TOKENS);\n }\n shouldRetry(error, attempts, maxAttempts) {\n return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);\n }\n async getMaxAttempts() {\n let maxAttempts;\n try {\n maxAttempts = await this.maxAttemptsProvider();\n }\n catch (error) {\n maxAttempts = DEFAULT_MAX_ATTEMPTS;\n }\n return maxAttempts;\n }\n async retry(next, args, options) {\n let retryTokenAmount;\n let attempts = 0;\n let totalDelay = 0;\n const maxAttempts = await this.getMaxAttempts();\n const { request } = args;\n if (HttpRequest.isInstance(request)) {\n request.headers[INVOCATION_ID_HEADER] = v4();\n }\n while (true) {\n try {\n if (HttpRequest.isInstance(request)) {\n request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n if (options?.beforeRequest) {\n await options.beforeRequest();\n }\n const { response, output } = await next(args);\n if (options?.afterRequest) {\n options.afterRequest(response);\n }\n this.retryQuota.releaseRetryTokens(retryTokenAmount);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalDelay;\n return { response, output };\n }\n catch (e) {\n const err = asSdkError(e);\n attempts++;\n if (this.shouldRetry(err, attempts, maxAttempts)) {\n retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);\n const delayFromDecider = this.delayDecider(isThrottlingError(err) ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE, attempts);\n const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);\n const delay = Math.max(delayFromResponse || 0, delayFromDecider);\n totalDelay += delay;\n await new Promise((resolve) => setTimeout(resolve, delay));\n continue;\n }\n if (!err.$metadata) {\n err.$metadata = {};\n }\n err.$metadata.attempts = attempts;\n err.$metadata.totalRetryDelay = totalDelay;\n throw err;\n }\n }\n }\n}\nconst getDelayFromRetryAfterHeader = (response) => {\n if (!HttpResponse.isInstance(response))\n return;\n const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === \"retry-after\");\n if (!retryAfterHeaderName)\n return;\n const retryAfter = response.headers[retryAfterHeaderName];\n const retryAfterSeconds = Number(retryAfter);\n if (!Number.isNaN(retryAfterSeconds))\n return retryAfterSeconds * 1000;\n const retryAfterDate = new Date(retryAfter);\n return retryAfterDate.getTime() - Date.now();\n};\n", "import { DefaultRateLimiter, RETRY_MODES } from \"@smithy/util-retry\";\nimport { StandardRetryStrategy } from \"./StandardRetryStrategy\";\nexport class AdaptiveRetryStrategy extends StandardRetryStrategy {\n rateLimiter;\n constructor(maxAttemptsProvider, options) {\n const { rateLimiter, ...superOptions } = options ?? {};\n super(maxAttemptsProvider, superOptions);\n this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();\n this.mode = RETRY_MODES.ADAPTIVE;\n }\n async retry(next, args) {\n return super.retry(next, args, {\n beforeRequest: async () => {\n return this.rateLimiter.getSendToken();\n },\n afterRequest: (response) => {\n this.rateLimiter.updateClientSendingRate(response);\n },\n });\n }\n}\n", "import { normalizeProvider } from \"@smithy/util-middleware\";\nimport { AdaptiveRetryStrategy, DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, RETRY_MODES, StandardRetryStrategy, } from \"@smithy/util-retry\";\nexport const ENV_MAX_ATTEMPTS = \"AWS_MAX_ATTEMPTS\";\nexport const CONFIG_MAX_ATTEMPTS = \"max_attempts\";\nexport const NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => {\n const value = env[ENV_MAX_ATTEMPTS];\n if (!value)\n return undefined;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n configFileSelector: (profile) => {\n const value = profile[CONFIG_MAX_ATTEMPTS];\n if (!value)\n return undefined;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n default: DEFAULT_MAX_ATTEMPTS,\n};\nexport const resolveRetryConfig = (input) => {\n const { retryStrategy, retryMode } = input;\n const maxAttempts = normalizeProvider(input.maxAttempts ?? DEFAULT_MAX_ATTEMPTS);\n let controller = retryStrategy\n ? Promise.resolve(retryStrategy)\n : undefined;\n const getDefault = async () => (await normalizeProvider(retryMode)()) === RETRY_MODES.ADAPTIVE\n ? new AdaptiveRetryStrategy(maxAttempts)\n : new StandardRetryStrategy(maxAttempts);\n return Object.assign(input, {\n maxAttempts,\n retryStrategy: () => (controller ??= getDefault()),\n });\n};\nexport const ENV_RETRY_MODE = \"AWS_RETRY_MODE\";\nexport const CONFIG_RETRY_MODE = \"retry_mode\";\nexport const NODE_RETRY_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_RETRY_MODE],\n configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],\n default: DEFAULT_RETRY_MODE,\n};\n", "import { HttpRequest } from \"@smithy/protocol-http\";\nimport { INVOCATION_ID_HEADER, REQUEST_HEADER } from \"@smithy/util-retry\";\nexport const omitRetryHeadersMiddleware = () => (next) => async (args) => {\n const { request } = args;\n if (HttpRequest.isInstance(request)) {\n delete request.headers[INVOCATION_ID_HEADER];\n delete request.headers[REQUEST_HEADER];\n }\n return next(args);\n};\nexport const omitRetryHeadersMiddlewareOptions = {\n name: \"omitRetryHeadersMiddleware\",\n tags: [\"RETRY\", \"HEADERS\", \"OMIT_RETRY_HEADERS\"],\n relation: \"before\",\n toMiddleware: \"awsAuthMiddleware\",\n override: true,\n};\nexport const getOmitRetryHeadersPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);\n },\n});\n", "export const isStreamingPayload = (request) => request?.body instanceof ReadableStream;\n", "import { HttpRequest, HttpResponse } from \"@smithy/protocol-http\";\nimport { isServerError, isThrottlingError, isTransientError } from \"@smithy/service-error-classification\";\nimport { NoOpLogger } from \"@smithy/smithy-client\";\nimport { INVOCATION_ID_HEADER, REQUEST_HEADER } from \"@smithy/util-retry\";\nimport { v4 } from \"@smithy/uuid\";\nimport { isStreamingPayload } from \"./isStreamingPayload/isStreamingPayload\";\nimport { asSdkError } from \"./util\";\nexport const retryMiddleware = (options) => (next, context) => async (args) => {\n let retryStrategy = await options.retryStrategy();\n const maxAttempts = await options.maxAttempts();\n if (isRetryStrategyV2(retryStrategy)) {\n retryStrategy = retryStrategy;\n let retryToken = await retryStrategy.acquireInitialRetryToken(context[\"partition_id\"]);\n let lastError = new Error();\n let attempts = 0;\n let totalRetryDelay = 0;\n const { request } = args;\n const isRequest = HttpRequest.isInstance(request);\n if (isRequest) {\n request.headers[INVOCATION_ID_HEADER] = v4();\n }\n while (true) {\n try {\n if (isRequest) {\n request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n const { response, output } = await next(args);\n retryStrategy.recordSuccess(retryToken);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalRetryDelay;\n return { response, output };\n }\n catch (e) {\n const retryErrorInfo = getRetryErrorInfo(e);\n lastError = asSdkError(e);\n if (isRequest && isStreamingPayload(request)) {\n (context.logger instanceof NoOpLogger ? console : context.logger)?.warn(\"An error was encountered in a non-retryable streaming request.\");\n throw lastError;\n }\n try {\n retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);\n }\n catch (refreshError) {\n if (!lastError.$metadata) {\n lastError.$metadata = {};\n }\n lastError.$metadata.attempts = attempts + 1;\n lastError.$metadata.totalRetryDelay = totalRetryDelay;\n throw lastError;\n }\n attempts = retryToken.getRetryCount();\n const delay = retryToken.getRetryDelay();\n totalRetryDelay += delay;\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n }\n }\n else {\n retryStrategy = retryStrategy;\n if (retryStrategy?.mode)\n context.userAgent = [...(context.userAgent || []), [\"cfg/retry-mode\", retryStrategy.mode]];\n return retryStrategy.retry(next, args);\n }\n};\nconst isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== \"undefined\" &&\n typeof retryStrategy.refreshRetryTokenForRetry !== \"undefined\" &&\n typeof retryStrategy.recordSuccess !== \"undefined\";\nconst getRetryErrorInfo = (error) => {\n const errorInfo = {\n error,\n errorType: getRetryErrorType(error),\n };\n const retryAfterHint = getRetryAfterHint(error.$response);\n if (retryAfterHint) {\n errorInfo.retryAfterHint = retryAfterHint;\n }\n return errorInfo;\n};\nconst getRetryErrorType = (error) => {\n if (isThrottlingError(error))\n return \"THROTTLING\";\n if (isTransientError(error))\n return \"TRANSIENT\";\n if (isServerError(error))\n return \"SERVER_ERROR\";\n return \"CLIENT_ERROR\";\n};\nexport const retryMiddlewareOptions = {\n name: \"retryMiddleware\",\n tags: [\"RETRY\"],\n step: \"finalizeRequest\",\n priority: \"high\",\n override: true,\n};\nexport const getRetryPlugin = (options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(retryMiddleware(options), retryMiddlewareOptions);\n },\n});\nexport const getRetryAfterHint = (response) => {\n if (!HttpResponse.isInstance(response))\n return;\n const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === \"retry-after\");\n if (!retryAfterHeaderName)\n return;\n const retryAfter = response.headers[retryAfterHeaderName];\n const retryAfterSeconds = Number(retryAfter);\n if (!Number.isNaN(retryAfterSeconds))\n return new Date(retryAfterSeconds * 1000);\n const retryAfterDate = new Date(retryAfter);\n return retryAfterDate;\n};\n", "export * from \"./AdaptiveRetryStrategy\";\nexport * from \"./StandardRetryStrategy\";\nexport * from \"./configurations\";\nexport * from \"./delayDecider\";\nexport * from \"./omitRetryHeadersMiddleware\";\nexport * from \"./retryDecider\";\nexport * from \"./retryMiddleware\";\n", "export const signatureV4CrtContainer = {\n CrtSignerV4: null,\n};\n", "import { SignatureV4S3Express } from \"@aws-sdk/middleware-sdk-s3\";\nimport { signatureV4aContainer } from \"@smithy/signature-v4\";\nimport { signatureV4CrtContainer } from \"./signature-v4-crt-container\";\nexport class SignatureV4MultiRegion {\n sigv4aSigner;\n sigv4Signer;\n signerOptions;\n static sigv4aDependency() {\n if (typeof signatureV4CrtContainer.CrtSignerV4 === \"function\") {\n return \"crt\";\n }\n else if (typeof signatureV4aContainer.SignatureV4a === \"function\") {\n return \"js\";\n }\n return \"none\";\n }\n constructor(options) {\n this.sigv4Signer = new SignatureV4S3Express(options);\n this.signerOptions = options;\n }\n async sign(requestToSign, options = {}) {\n if (options.signingRegion === \"*\") {\n return this.getSigv4aSigner().sign(requestToSign, options);\n }\n return this.sigv4Signer.sign(requestToSign, options);\n }\n async signWithCredentials(requestToSign, credentials, options = {}) {\n if (options.signingRegion === \"*\") {\n const signer = this.getSigv4aSigner();\n const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;\n if (CrtSignerV4 && signer instanceof CrtSignerV4) {\n return signer.signWithCredentials(requestToSign, credentials, options);\n }\n else {\n throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. ` +\n `Please check whether you have installed the \"@aws-sdk/signature-v4-crt\" package explicitly. ` +\n `You must also register the package by calling [require(\"@aws-sdk/signature-v4-crt\");] ` +\n `or an ESM equivalent such as [import \"@aws-sdk/signature-v4-crt\";]. ` +\n `For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);\n }\n }\n return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options);\n }\n async presign(originalRequest, options = {}) {\n if (options.signingRegion === \"*\") {\n const signer = this.getSigv4aSigner();\n const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;\n if (CrtSignerV4 && signer instanceof CrtSignerV4) {\n return signer.presign(originalRequest, options);\n }\n else {\n throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. ` +\n `Please check whether you have installed the \"@aws-sdk/signature-v4-crt\" package explicitly. ` +\n `You must also register the package by calling [require(\"@aws-sdk/signature-v4-crt\");] ` +\n `or an ESM equivalent such as [import \"@aws-sdk/signature-v4-crt\";]. ` +\n `For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);\n }\n }\n return this.sigv4Signer.presign(originalRequest, options);\n }\n async presignWithCredentials(originalRequest, credentials, options = {}) {\n if (options.signingRegion === \"*\") {\n throw new Error(\"Method presignWithCredentials is not supported for [signingRegion=*].\");\n }\n return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options);\n }\n getSigv4aSigner() {\n if (!this.sigv4aSigner) {\n const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;\n const JsSigV4aSigner = signatureV4aContainer.SignatureV4a;\n if (this.signerOptions.runtime === \"node\") {\n if (!CrtSignerV4 && !JsSigV4aSigner) {\n throw new Error(\"Neither CRT nor JS SigV4a implementation is available. \" +\n \"Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. \" +\n \"For more information please go to \" +\n \"https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt\");\n }\n if (CrtSignerV4 && typeof CrtSignerV4 === \"function\") {\n this.sigv4aSigner = new CrtSignerV4({\n ...this.signerOptions,\n signingAlgorithm: 1,\n });\n }\n else if (JsSigV4aSigner && typeof JsSigV4aSigner === \"function\") {\n this.sigv4aSigner = new JsSigV4aSigner({\n ...this.signerOptions,\n });\n }\n else {\n throw new Error(\"Available SigV4a implementation is not a valid constructor. \" +\n \"Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.\" +\n \"For more information please go to \" +\n \"https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt\");\n }\n }\n else {\n if (!JsSigV4aSigner || typeof JsSigV4aSigner !== \"function\") {\n throw new Error(\"JS SigV4a implementation is not available or not a valid constructor. \" +\n \"Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. \" +\n \"You must also register the package by calling [require('@aws-sdk/signature-v4a');] \" +\n \"or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. \" +\n \"For more information please go to \" +\n \"https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a\");\n }\n this.sigv4aSigner = new JsSigV4aSigner({\n ...this.signerOptions,\n });\n }\n }\n return this.sigv4aSigner;\n }\n}\n", "export * from \"./SignatureV4MultiRegion\";\nexport * from \"./signature-v4-crt-container\";\n", "const cs = \"required\", ct = \"type\", cu = \"rules\", cv = \"conditions\", cw = \"fn\", cx = \"argv\", cy = \"ref\", cz = \"assign\", cA = \"url\", cB = \"properties\", cC = \"backend\", cD = \"authSchemes\", cE = \"disableDoubleEncoding\", cF = \"signingName\", cG = \"signingRegion\", cH = \"headers\", cI = \"signingRegionSet\";\nconst a = 6, b = false, c = true, d = \"isSet\", e = \"booleanEquals\", f = \"error\", g = \"aws.partition\", h = \"stringEquals\", i = \"getAttr\", j = \"name\", k = \"substring\", l = \"bucketSuffix\", m = \"parseURL\", n = \"endpoint\", o = \"tree\", p = \"aws.isVirtualHostableS3Bucket\", q = \"{url#scheme}://{Bucket}.{url#authority}{url#path}\", r = \"not\", s = \"accessPointSuffix\", t = \"{url#scheme}://{url#authority}{url#path}\", u = \"hardwareType\", v = \"regionPrefix\", w = \"bucketAliasSuffix\", x = \"outpostId\", y = \"isValidHostLabel\", z = \"sigv4a\", A = \"s3-outposts\", B = \"s3\", C = \"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}\", D = \"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}\", E = \"https://{Bucket}.s3.{partitionResult#dnsSuffix}\", F = \"aws.parseArn\", G = \"bucketArn\", H = \"arnType\", I = \"\", J = \"s3-object-lambda\", K = \"accesspoint\", L = \"accessPointName\", M = \"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}\", N = \"mrapPartition\", O = \"outpostType\", P = \"arnPrefix\", Q = \"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}\", R = \"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", S = \"https://s3.{partitionResult#dnsSuffix}\", T = { [cs]: false, [ct]: \"string\" }, U = { [cs]: true, \"default\": false, [ct]: \"boolean\" }, V = { [cs]: false, [ct]: \"boolean\" }, W = { [cw]: e, [cx]: [{ [cy]: \"Accelerate\" }, true] }, X = { [cw]: e, [cx]: [{ [cy]: \"UseFIPS\" }, true] }, Y = { [cw]: e, [cx]: [{ [cy]: \"UseDualStack\" }, true] }, Z = { [cw]: d, [cx]: [{ [cy]: \"Endpoint\" }] }, aa = { [cw]: g, [cx]: [{ [cy]: \"Region\" }], [cz]: \"partitionResult\" }, ab = { [cw]: h, [cx]: [{ [cw]: i, [cx]: [{ [cy]: \"partitionResult\" }, j] }, \"aws-cn\"] }, ac = { [cw]: d, [cx]: [{ [cy]: \"Bucket\" }] }, ad = { [cy]: \"Bucket\" }, ae = { [cv]: [W], [f]: \"S3Express does not support S3 Accelerate.\", [ct]: f }, af = { [cv]: [Z, { [cw]: m, [cx]: [{ [cy]: \"Endpoint\" }], [cz]: \"url\" }], [cu]: [{ [cv]: [{ [cw]: d, [cx]: [{ [cy]: \"DisableS3ExpressSessionAuth\" }] }, { [cw]: e, [cx]: [{ [cy]: \"DisableS3ExpressSessionAuth\" }, true] }], [cu]: [{ [cv]: [{ [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: \"url\" }, \"isIp\"] }, true] }], [cu]: [{ [cv]: [{ [cw]: \"uriEncode\", [cx]: [ad], [cz]: \"uri_encoded_bucket\" }], [cu]: [{ [n]: { [cA]: \"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: p, [cx]: [ad, false] }], [cu]: [{ [n]: { [cA]: q, [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }], [ct]: o }, { [f]: \"S3Express bucket name is not a valid virtual hostable name.\", [ct]: f }], [ct]: o }, { [cv]: [{ [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: \"url\" }, \"isIp\"] }, true] }], [cu]: [{ [cv]: [{ [cw]: \"uriEncode\", [cx]: [ad], [cz]: \"uri_encoded_bucket\" }], [cu]: [{ [n]: { [cA]: \"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: p, [cx]: [ad, false] }], [cu]: [{ [n]: { [cA]: q, [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }], [ct]: o }, { [f]: \"S3Express bucket name is not a valid virtual hostable name.\", [ct]: f }], [ct]: o }, ag = { [cw]: m, [cx]: [{ [cy]: \"Endpoint\" }], [cz]: \"url\" }, ah = { [cw]: e, [cx]: [{ [cw]: i, [cx]: [{ [cy]: \"url\" }, \"isIp\"] }, true] }, ai = { [cy]: \"url\" }, aj = { [cw]: \"uriEncode\", [cx]: [ad], [cz]: \"uri_encoded_bucket\" }, ak = { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, al = {}, am = { [cw]: p, [cx]: [ad, false] }, an = { [f]: \"S3Express bucket name is not a valid virtual hostable name.\", [ct]: f }, ao = { [cw]: d, [cx]: [{ [cy]: \"UseS3ExpressControlEndpoint\" }] }, ap = { [cw]: e, [cx]: [{ [cy]: \"UseS3ExpressControlEndpoint\" }, true] }, aq = { [cw]: r, [cx]: [Z] }, ar = { [cw]: e, [cx]: [{ [cy]: \"UseDualStack\" }, false] }, as = { [cw]: e, [cx]: [{ [cy]: \"UseFIPS\" }, false] }, at = { [f]: \"Unrecognized S3Express bucket name format.\", [ct]: f }, au = { [cw]: r, [cx]: [ac] }, av = { [cy]: u }, aw = { [cv]: [aq], [f]: \"Expected a endpoint to be specified but no endpoint was found\", [ct]: f }, ax = { [cD]: [{ [cE]: true, [j]: z, [cF]: A, [cI]: [\"*\"] }, { [cE]: true, [j]: \"sigv4\", [cF]: A, [cG]: \"{Region}\" }] }, ay = { [cw]: e, [cx]: [{ [cy]: \"ForcePathStyle\" }, false] }, az = { [cy]: \"ForcePathStyle\" }, aA = { [cw]: e, [cx]: [{ [cy]: \"Accelerate\" }, false] }, aB = { [cw]: h, [cx]: [{ [cy]: \"Region\" }, \"aws-global\"] }, aC = { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: B, [cG]: \"us-east-1\" }] }, aD = { [cw]: r, [cx]: [aB] }, aE = { [cw]: e, [cx]: [{ [cy]: \"UseGlobalEndpoint\" }, true] }, aF = { [cA]: \"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: B, [cG]: \"{Region}\" }] }, [cH]: {} }, aG = { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: B, [cG]: \"{Region}\" }] }, aH = { [cw]: e, [cx]: [{ [cy]: \"UseGlobalEndpoint\" }, false] }, aI = { [cA]: \"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, aJ = { [cA]: \"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, aK = { [cA]: \"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, aL = { [cw]: e, [cx]: [{ [cw]: i, [cx]: [ai, \"isIp\"] }, false] }, aM = { [cA]: C, [cB]: aG, [cH]: {} }, aN = { [cA]: q, [cB]: aG, [cH]: {} }, aO = { [n]: aN, [ct]: n }, aP = { [cA]: D, [cB]: aG, [cH]: {} }, aQ = { [cA]: \"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, aR = { [f]: \"Invalid region: region was not a valid DNS name.\", [ct]: f }, aS = { [cy]: G }, aT = { [cy]: H }, aU = { [cw]: i, [cx]: [aS, \"service\"] }, aV = { [cy]: L }, aW = { [cv]: [Y], [f]: \"S3 Object Lambda does not support Dual-stack\", [ct]: f }, aX = { [cv]: [W], [f]: \"S3 Object Lambda does not support S3 Accelerate\", [ct]: f }, aY = { [cv]: [{ [cw]: d, [cx]: [{ [cy]: \"DisableAccessPoints\" }] }, { [cw]: e, [cx]: [{ [cy]: \"DisableAccessPoints\" }, true] }], [f]: \"Access points are not supported for this operation\", [ct]: f }, aZ = { [cv]: [{ [cw]: d, [cx]: [{ [cy]: \"UseArnRegion\" }] }, { [cw]: e, [cx]: [{ [cy]: \"UseArnRegion\" }, false] }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [aS, \"region\"] }, \"{Region}\"] }] }], [f]: \"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`\", [ct]: f }, ba = { [cw]: i, [cx]: [{ [cy]: \"bucketPartition\" }, j] }, bb = { [cw]: i, [cx]: [aS, \"accountId\"] }, bc = { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: J, [cG]: \"{bucketArn#region}\" }] }, bd = { [f]: \"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`\", [ct]: f }, be = { [f]: \"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`\", [ct]: f }, bf = { [f]: \"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)\", [ct]: f }, bg = { [f]: \"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`\", [ct]: f }, bh = { [f]: \"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.\", [ct]: f }, bi = { [f]: \"Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided\", [ct]: f }, bj = { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: B, [cG]: \"{bucketArn#region}\" }] }, bk = { [cD]: [{ [cE]: true, [j]: z, [cF]: A, [cI]: [\"*\"] }, { [cE]: true, [j]: \"sigv4\", [cF]: A, [cG]: \"{bucketArn#region}\" }] }, bl = { [cw]: F, [cx]: [ad] }, bm = { [cA]: \"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aG, [cH]: {} }, bn = { [cA]: \"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aG, [cH]: {} }, bo = { [cA]: \"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aG, [cH]: {} }, bp = { [cA]: Q, [cB]: aG, [cH]: {} }, bq = { [cA]: \"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aG, [cH]: {} }, br = { [cy]: \"UseObjectLambdaEndpoint\" }, bs = { [cD]: [{ [cE]: true, [j]: \"sigv4\", [cF]: J, [cG]: \"{Region}\" }] }, bt = { [cA]: \"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, bu = { [cA]: \"https://s3-fips.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, bv = { [cA]: \"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, bw = { [cA]: t, [cB]: aG, [cH]: {} }, bx = { [cA]: \"https://s3.{Region}.{partitionResult#dnsSuffix}\", [cB]: aG, [cH]: {} }, by = [{ [cy]: \"Region\" }], bz = [{ [cy]: \"Endpoint\" }], bA = [ad], bB = [W], bC = [Z, ag], bD = [{ [cw]: d, [cx]: [{ [cy]: \"DisableS3ExpressSessionAuth\" }] }, { [cw]: e, [cx]: [{ [cy]: \"DisableS3ExpressSessionAuth\" }, true] }], bE = [aj], bF = [am], bG = [aa], bH = [X, Y], bI = [X, ar], bJ = [as, Y], bK = [as, ar], bL = [{ [cw]: k, [cx]: [ad, 6, 14, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 14, 16, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bM = [{ [cv]: [X, Y], [n]: { [cA]: \"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bI, [n]: { [cA]: \"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bJ, [n]: { [cA]: \"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: {} }, [ct]: n }, { [cv]: bK, [n]: { [cA]: \"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: {} }, [ct]: n }], bN = [{ [cw]: k, [cx]: [ad, 6, 15, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 15, 17, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bO = [{ [cw]: k, [cx]: [ad, 6, 19, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 19, 21, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bP = [{ [cw]: k, [cx]: [ad, 6, 20, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 20, 22, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bQ = [{ [cw]: k, [cx]: [ad, 6, 26, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 26, 28, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bR = [{ [cv]: [X, Y], [n]: { [cA]: \"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }, { [cv]: bI, [n]: { [cA]: \"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }, { [cv]: bJ, [n]: { [cA]: \"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }, { [cv]: bK, [n]: { [cA]: \"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}\", [cB]: { [cC]: \"S3Express\", [cD]: [{ [cE]: true, [j]: \"sigv4-s3express\", [cF]: \"s3express\", [cG]: \"{Region}\" }] }, [cH]: {} }, [ct]: n }], bS = [ad, 0, 7, true], bT = [{ [cw]: k, [cx]: [ad, 7, 15, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 15, 17, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bU = [{ [cw]: k, [cx]: [ad, 7, 16, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 16, 18, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bV = [{ [cw]: k, [cx]: [ad, 7, 20, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 20, 22, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bW = [{ [cw]: k, [cx]: [ad, 7, 21, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 21, 23, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bX = [{ [cw]: k, [cx]: [ad, 7, 27, true], [cz]: \"s3expressAvailabilityZoneId\" }, { [cw]: k, [cx]: [ad, 27, 29, true], [cz]: \"s3expressAvailabilityZoneDelim\" }, { [cw]: h, [cx]: [{ [cy]: \"s3expressAvailabilityZoneDelim\" }, \"--\"] }], bY = [ac], bZ = [{ [cw]: y, [cx]: [{ [cy]: x }, false] }], ca = [{ [cw]: h, [cx]: [{ [cy]: v }, \"beta\"] }], cb = [\"*\"], cc = [{ [cw]: y, [cx]: [{ [cy]: \"Region\" }, false] }], cd = [{ [cw]: h, [cx]: [{ [cy]: \"Region\" }, \"us-east-1\"] }], ce = [{ [cw]: h, [cx]: [aT, K] }], cf = [{ [cw]: i, [cx]: [aS, \"resourceId[1]\"], [cz]: L }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [aV, I] }] }], cg = [aS, \"resourceId[1]\"], ch = [Y], ci = [{ [cw]: r, [cx]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [aS, \"region\"] }, I] }] }], cj = [{ [cw]: r, [cx]: [{ [cw]: d, [cx]: [{ [cw]: i, [cx]: [aS, \"resourceId[2]\"] }] }] }], ck = [aS, \"resourceId[2]\"], cl = [{ [cw]: g, [cx]: [{ [cw]: i, [cx]: [aS, \"region\"] }], [cz]: \"bucketPartition\" }], cm = [{ [cw]: h, [cx]: [ba, { [cw]: i, [cx]: [{ [cy]: \"partitionResult\" }, j] }] }], cn = [{ [cw]: y, [cx]: [{ [cw]: i, [cx]: [aS, \"region\"] }, true] }], co = [{ [cw]: y, [cx]: [bb, false] }], cp = [{ [cw]: y, [cx]: [aV, false] }], cq = [X], cr = [{ [cw]: y, [cx]: [{ [cy]: \"Region\" }, true] }];\nconst _data = { version: \"1.0\", parameters: { Bucket: T, Region: T, UseFIPS: U, UseDualStack: U, Endpoint: T, ForcePathStyle: U, Accelerate: U, UseGlobalEndpoint: U, UseObjectLambdaEndpoint: V, Key: T, Prefix: T, CopySource: T, DisableAccessPoints: V, DisableMultiRegionAccessPoints: U, UseArnRegion: V, UseS3ExpressControlEndpoint: V, DisableS3ExpressSessionAuth: V }, [cu]: [{ [cv]: [{ [cw]: d, [cx]: by }], [cu]: [{ [cv]: [W, X], error: \"Accelerate cannot be used with FIPS\", [ct]: f }, { [cv]: [Y, Z], error: \"Cannot set dual-stack in combination with a custom endpoint.\", [ct]: f }, { [cv]: [Z, X], error: \"A custom endpoint cannot be combined with FIPS\", [ct]: f }, { [cv]: [Z, W], error: \"A custom endpoint cannot be combined with S3 Accelerate\", [ct]: f }, { [cv]: [X, aa, ab], error: \"Partition does not support FIPS\", [ct]: f }, { [cv]: [ac, { [cw]: k, [cx]: [ad, 0, a, c], [cz]: l }, { [cw]: h, [cx]: [{ [cy]: l }, \"--x-s3\"] }], [cu]: [ae, af, { [cv]: [ao, ap], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [aj, aq], [cu]: [{ [cv]: bH, endpoint: { [cA]: \"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: \"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: \"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: \"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: ak, [cH]: al }, [ct]: n }], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: bF, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bD, [cu]: [{ [cv]: bL, [cu]: bM, [ct]: o }, { [cv]: bN, [cu]: bM, [ct]: o }, { [cv]: bO, [cu]: bM, [ct]: o }, { [cv]: bP, [cu]: bM, [ct]: o }, { [cv]: bQ, [cu]: bM, [ct]: o }, at], [ct]: o }, { [cv]: bL, [cu]: bR, [ct]: o }, { [cv]: bN, [cu]: bR, [ct]: o }, { [cv]: bO, [cu]: bR, [ct]: o }, { [cv]: bP, [cu]: bR, [ct]: o }, { [cv]: bQ, [cu]: bR, [ct]: o }, at], [ct]: o }], [ct]: o }, an], [ct]: o }, { [cv]: [ac, { [cw]: k, [cx]: bS, [cz]: s }, { [cw]: h, [cx]: [{ [cy]: s }, \"--xa-s3\"] }], [cu]: [ae, af, { [cv]: bF, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bD, [cu]: [{ [cv]: bT, [cu]: bM, [ct]: o }, { [cv]: bU, [cu]: bM, [ct]: o }, { [cv]: bV, [cu]: bM, [ct]: o }, { [cv]: bW, [cu]: bM, [ct]: o }, { [cv]: bX, [cu]: bM, [ct]: o }, at], [ct]: o }, { [cv]: bT, [cu]: bR, [ct]: o }, { [cv]: bU, [cu]: bR, [ct]: o }, { [cv]: bV, [cu]: bR, [ct]: o }, { [cv]: bW, [cu]: bR, [ct]: o }, { [cv]: bX, [cu]: bR, [ct]: o }, at], [ct]: o }], [ct]: o }, an], [ct]: o }, { [cv]: [au, ao, ap], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: bC, endpoint: { [cA]: t, [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bH, endpoint: { [cA]: \"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: \"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: \"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: \"https://s3express-control.{Region}.{partitionResult#dnsSuffix}\", [cB]: ak, [cH]: al }, [ct]: n }], [ct]: o }], [ct]: o }, { [cv]: [ac, { [cw]: k, [cx]: [ad, 49, 50, c], [cz]: u }, { [cw]: k, [cx]: [ad, 8, 12, c], [cz]: v }, { [cw]: k, [cx]: bS, [cz]: w }, { [cw]: k, [cx]: [ad, 32, 49, c], [cz]: x }, { [cw]: g, [cx]: by, [cz]: \"regionPartition\" }, { [cw]: h, [cx]: [{ [cy]: w }, \"--op-s3\"] }], [cu]: [{ [cv]: bZ, [cu]: [{ [cv]: bF, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [av, \"e\"] }], [cu]: [{ [cv]: ca, [cu]: [aw, { [cv]: bC, endpoint: { [cA]: \"https://{Bucket}.ec2.{url#authority}\", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { endpoint: { [cA]: \"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}\", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { [cv]: [{ [cw]: h, [cx]: [av, \"o\"] }], [cu]: [{ [cv]: ca, [cu]: [aw, { [cv]: bC, endpoint: { [cA]: \"https://{Bucket}.op-{outpostId}.{url#authority}\", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { endpoint: { [cA]: \"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}\", [cB]: ax, [cH]: al }, [ct]: n }], [ct]: o }, { error: \"Unrecognized hardware type: \\\"Expected hardware type o or e but got {hardwareType}\\\"\", [ct]: f }], [ct]: o }, { error: \"Invalid Outposts Bucket alias - it must be a valid bucket name.\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.\", [ct]: f }], [ct]: o }, { [cv]: bY, [cu]: [{ [cv]: [Z, { [cw]: r, [cx]: [{ [cw]: d, [cx]: [{ [cw]: m, [cx]: bz }] }] }], error: \"Custom endpoint `{Endpoint}` was not a valid URI\", [ct]: f }, { [cv]: [ay, am], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cc, [cu]: [{ [cv]: [W, ab], error: \"S3 Accelerate cannot be used in this region\", [ct]: f }, { [cv]: [Y, X, aA, aq, aB], endpoint: { [cA]: \"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, X, aA, aq, aD, aE], [cu]: [{ endpoint: aF, [ct]: n }], [ct]: o }, { [cv]: [Y, X, aA, aq, aD, aH], endpoint: aF, [ct]: n }, { [cv]: [ar, X, aA, aq, aB], endpoint: { [cA]: \"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, X, aA, aq, aD, aE], [cu]: [{ endpoint: aI, [ct]: n }], [ct]: o }, { [cv]: [ar, X, aA, aq, aD, aH], endpoint: aI, [ct]: n }, { [cv]: [Y, as, W, aq, aB], endpoint: { [cA]: \"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, as, W, aq, aD, aE], [cu]: [{ endpoint: aJ, [ct]: n }], [ct]: o }, { [cv]: [Y, as, W, aq, aD, aH], endpoint: aJ, [ct]: n }, { [cv]: [Y, as, aA, aq, aB], endpoint: { [cA]: \"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, as, aA, aq, aD, aE], [cu]: [{ endpoint: aK, [ct]: n }], [ct]: o }, { [cv]: [Y, as, aA, aq, aD, aH], endpoint: aK, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, ah, aB], endpoint: { [cA]: C, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, aL, aB], endpoint: { [cA]: q, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, ah, aD, aE], [cu]: [{ [cv]: cd, endpoint: aM, [ct]: n }, { endpoint: aM, [ct]: n }], [ct]: o }, { [cv]: [ar, as, aA, Z, ag, aL, aD, aE], [cu]: [{ [cv]: cd, endpoint: aN, [ct]: n }, aO], [ct]: o }, { [cv]: [ar, as, aA, Z, ag, ah, aD, aH], endpoint: aM, [ct]: n }, { [cv]: [ar, as, aA, Z, ag, aL, aD, aH], endpoint: aN, [ct]: n }, { [cv]: [ar, as, W, aq, aB], endpoint: { [cA]: D, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, W, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: aP, [ct]: n }, { endpoint: aP, [ct]: n }], [ct]: o }, { [cv]: [ar, as, W, aq, aD, aH], endpoint: aP, [ct]: n }, { [cv]: [ar, as, aA, aq, aB], endpoint: { [cA]: E, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, as, aA, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: E, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: aQ, [ct]: n }], [ct]: o }, { [cv]: [ar, as, aA, aq, aD, aH], endpoint: aQ, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [Z, ag, { [cw]: h, [cx]: [{ [cw]: i, [cx]: [ai, \"scheme\"] }, \"http\"] }, { [cw]: p, [cx]: [ad, c] }, ay, as, ar, aA], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cc, [cu]: [aO], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [ay, { [cw]: F, [cx]: bA, [cz]: G }], [cu]: [{ [cv]: [{ [cw]: i, [cx]: [aS, \"resourceId[0]\"], [cz]: H }, { [cw]: r, [cx]: [{ [cw]: h, [cx]: [aT, I] }] }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [aU, J] }], [cu]: [{ [cv]: ce, [cu]: [{ [cv]: cf, [cu]: [aW, aX, { [cv]: ci, [cu]: [aY, { [cv]: cj, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cm, [cu]: [{ [cv]: cn, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [bb, I] }], error: \"Invalid ARN: Missing account id\", [ct]: f }, { [cv]: co, [cu]: [{ [cv]: cp, [cu]: [{ [cv]: bC, endpoint: { [cA]: M, [cB]: bc, [cH]: al }, [ct]: n }, { [cv]: cq, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bc, [cH]: al }, [ct]: n }, { endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bc, [cH]: al }, [ct]: n }], [ct]: o }, bd], [ct]: o }, be], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, bh], [ct]: o }, { error: \"Invalid ARN: bucket ARN is missing a region\", [ct]: f }], [ct]: o }, bi], [ct]: o }, { error: \"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`\", [ct]: f }], [ct]: o }, { [cv]: ce, [cu]: [{ [cv]: cf, [cu]: [{ [cv]: ci, [cu]: [{ [cv]: ce, [cu]: [{ [cv]: ci, [cu]: [aY, { [cv]: cj, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [ba, \"{partitionResult#name}\"] }], [cu]: [{ [cv]: cn, [cu]: [{ [cv]: [{ [cw]: h, [cx]: [aU, B] }], [cu]: [{ [cv]: co, [cu]: [{ [cv]: cp, [cu]: [{ [cv]: bB, error: \"Access Points do not support S3 Accelerate\", [ct]: f }, { [cv]: bH, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bI, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bJ, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: [as, ar, Z, ag], endpoint: { [cA]: M, [cB]: bj, [cH]: al }, [ct]: n }, { [cv]: bK, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bj, [cH]: al }, [ct]: n }], [ct]: o }, bd], [ct]: o }, be], [ct]: o }, { error: \"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}\", [ct]: f }], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, bh], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: y, [cx]: [aV, c] }], [cu]: [{ [cv]: ch, error: \"S3 MRAP does not support dual-stack\", [ct]: f }, { [cv]: cq, error: \"S3 MRAP does not support FIPS\", [ct]: f }, { [cv]: bB, error: \"S3 MRAP does not support S3 Accelerate\", [ct]: f }, { [cv]: [{ [cw]: e, [cx]: [{ [cy]: \"DisableMultiRegionAccessPoints\" }, c] }], error: \"Invalid configuration: Multi-Region Access Point ARNs are disabled.\", [ct]: f }, { [cv]: [{ [cw]: g, [cx]: by, [cz]: N }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [{ [cw]: i, [cx]: [{ [cy]: N }, j] }, { [cw]: i, [cx]: [aS, \"partition\"] }] }], [cu]: [{ endpoint: { [cA]: \"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}\", [cB]: { [cD]: [{ [cE]: c, name: z, [cF]: B, [cI]: cb }] }, [cH]: al }, [ct]: n }], [ct]: o }, { error: \"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`\", [ct]: f }], [ct]: o }], [ct]: o }, { error: \"Invalid Access Point Name\", [ct]: f }], [ct]: o }, bi], [ct]: o }, { [cv]: [{ [cw]: h, [cx]: [aU, A] }], [cu]: [{ [cv]: ch, error: \"S3 Outposts does not support Dual-stack\", [ct]: f }, { [cv]: cq, error: \"S3 Outposts does not support FIPS\", [ct]: f }, { [cv]: bB, error: \"S3 Outposts does not support S3 Accelerate\", [ct]: f }, { [cv]: [{ [cw]: d, [cx]: [{ [cw]: i, [cx]: [aS, \"resourceId[4]\"] }] }], error: \"Invalid Arn: Outpost Access Point ARN contains sub resources\", [ct]: f }, { [cv]: [{ [cw]: i, [cx]: cg, [cz]: x }], [cu]: [{ [cv]: bZ, [cu]: [aZ, { [cv]: cl, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cm, [cu]: [{ [cv]: cn, [cu]: [{ [cv]: co, [cu]: [{ [cv]: [{ [cw]: i, [cx]: ck, [cz]: O }], [cu]: [{ [cv]: [{ [cw]: i, [cx]: [aS, \"resourceId[3]\"], [cz]: L }], [cu]: [{ [cv]: [{ [cw]: h, [cx]: [{ [cy]: O }, K] }], [cu]: [{ [cv]: bC, endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}\", [cB]: bk, [cH]: al }, [ct]: n }, { endpoint: { [cA]: \"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}\", [cB]: bk, [cH]: al }, [ct]: n }], [ct]: o }, { error: \"Expected an outpost type `accesspoint`, found {outpostType}\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: expected an access point name\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: Expected a 4-component resource\", [ct]: f }], [ct]: o }, be], [ct]: o }, bf], [ct]: o }, bg], [ct]: o }], [ct]: o }], [ct]: o }, { error: \"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: The Outpost Id was not set\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})\", [ct]: f }], [ct]: o }, { error: \"Invalid ARN: No ARN type specified\", [ct]: f }], [ct]: o }, { [cv]: [{ [cw]: k, [cx]: [ad, 0, 4, b], [cz]: P }, { [cw]: h, [cx]: [{ [cy]: P }, \"arn:\"] }, { [cw]: r, [cx]: [{ [cw]: d, [cx]: [bl] }] }], error: \"Invalid ARN: `{Bucket}` was not a valid ARN\", [ct]: f }, { [cv]: [{ [cw]: e, [cx]: [az, c] }, bl], error: \"Path-style addressing cannot be used with ARN buckets\", [ct]: f }, { [cv]: bE, [cu]: [{ [cv]: bG, [cu]: [{ [cv]: [aA], [cu]: [{ [cv]: [Y, aq, X, aB], endpoint: { [cA]: \"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, aq, X, aD, aE], [cu]: [{ endpoint: bm, [ct]: n }], [ct]: o }, { [cv]: [Y, aq, X, aD, aH], endpoint: bm, [ct]: n }, { [cv]: [ar, aq, X, aB], endpoint: { [cA]: \"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, aq, X, aD, aE], [cu]: [{ endpoint: bn, [ct]: n }], [ct]: o }, { [cv]: [ar, aq, X, aD, aH], endpoint: bn, [ct]: n }, { [cv]: [Y, aq, as, aB], endpoint: { [cA]: \"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [Y, aq, as, aD, aE], [cu]: [{ endpoint: bo, [ct]: n }], [ct]: o }, { [cv]: [Y, aq, as, aD, aH], endpoint: bo, [ct]: n }, { [cv]: [ar, Z, ag, as, aB], endpoint: { [cA]: Q, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, Z, ag, as, aD, aE], [cu]: [{ [cv]: cd, endpoint: bp, [ct]: n }, { endpoint: bp, [ct]: n }], [ct]: o }, { [cv]: [ar, Z, ag, as, aD, aH], endpoint: bp, [ct]: n }, { [cv]: [ar, aq, as, aB], endpoint: { [cA]: R, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [ar, aq, as, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: R, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: bq, [ct]: n }], [ct]: o }, { [cv]: [ar, aq, as, aD, aH], endpoint: bq, [ct]: n }], [ct]: o }, { error: \"Path-style addressing cannot be used with S3 Accelerate\", [ct]: f }], [ct]: o }], [ct]: o }], [ct]: o }, { [cv]: [{ [cw]: d, [cx]: [br] }, { [cw]: e, [cx]: [br, c] }], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cr, [cu]: [aW, aX, { [cv]: bC, endpoint: { [cA]: t, [cB]: bs, [cH]: al }, [ct]: n }, { [cv]: cq, endpoint: { [cA]: \"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}\", [cB]: bs, [cH]: al }, [ct]: n }, { endpoint: { [cA]: \"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}\", [cB]: bs, [cH]: al }, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }, { [cv]: [au], [cu]: [{ [cv]: bG, [cu]: [{ [cv]: cr, [cu]: [{ [cv]: [X, Y, aq, aB], endpoint: { [cA]: \"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [X, Y, aq, aD, aE], [cu]: [{ endpoint: bt, [ct]: n }], [ct]: o }, { [cv]: [X, Y, aq, aD, aH], endpoint: bt, [ct]: n }, { [cv]: [X, ar, aq, aB], endpoint: { [cA]: \"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [X, ar, aq, aD, aE], [cu]: [{ endpoint: bu, [ct]: n }], [ct]: o }, { [cv]: [X, ar, aq, aD, aH], endpoint: bu, [ct]: n }, { [cv]: [as, Y, aq, aB], endpoint: { [cA]: \"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}\", [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, Y, aq, aD, aE], [cu]: [{ endpoint: bv, [ct]: n }], [ct]: o }, { [cv]: [as, Y, aq, aD, aH], endpoint: bv, [ct]: n }, { [cv]: [as, ar, Z, ag, aB], endpoint: { [cA]: t, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, ar, Z, ag, aD, aE], [cu]: [{ [cv]: cd, endpoint: bw, [ct]: n }, { endpoint: bw, [ct]: n }], [ct]: o }, { [cv]: [as, ar, Z, ag, aD, aH], endpoint: bw, [ct]: n }, { [cv]: [as, ar, aq, aB], endpoint: { [cA]: S, [cB]: aC, [cH]: al }, [ct]: n }, { [cv]: [as, ar, aq, aD, aE], [cu]: [{ [cv]: cd, endpoint: { [cA]: S, [cB]: aG, [cH]: al }, [ct]: n }, { endpoint: bx, [ct]: n }], [ct]: o }, { [cv]: [as, ar, aq, aD, aH], endpoint: bx, [ct]: n }], [ct]: o }, aR], [ct]: o }], [ct]: o }], [ct]: o }, { error: \"A region must be set when sending requests to S3.\", [ct]: f }] };\nexport const ruleSet = _data;\n", "import { awsEndpointFunctions } from \"@aws-sdk/util-endpoints\";\nimport { customEndpointFunctions, EndpointCache, resolveEndpoint } from \"@smithy/util-endpoints\";\nimport { ruleSet } from \"./ruleset\";\nconst cache = new EndpointCache({\n size: 50,\n params: [\n \"Accelerate\",\n \"Bucket\",\n \"DisableAccessPoints\",\n \"DisableMultiRegionAccessPoints\",\n \"DisableS3ExpressSessionAuth\",\n \"Endpoint\",\n \"ForcePathStyle\",\n \"Region\",\n \"UseArnRegion\",\n \"UseDualStack\",\n \"UseFIPS\",\n \"UseGlobalEndpoint\",\n \"UseObjectLambdaEndpoint\",\n \"UseS3ExpressControlEndpoint\",\n ],\n});\nexport const defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n", "import { resolveAwsSdkSigV4AConfig, resolveAwsSdkSigV4Config, } from \"@aws-sdk/core\";\nimport { SignatureV4MultiRegion } from \"@aws-sdk/signature-v4-multi-region\";\nimport { resolveParams } from \"@smithy/middleware-endpoint\";\nimport { getSmithyContext, normalizeProvider } from \"@smithy/util-middleware\";\nimport { defaultEndpointResolver } from \"../endpoint/endpointResolver\";\nconst createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {\n if (!input) {\n throw new Error(\"Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`\");\n }\n const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);\n const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor\n ?.getEndpointParameterInstructions;\n if (!instructionsFn) {\n throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);\n }\n const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);\n return Object.assign(defaultParameters, endpointParameters);\n};\nconst _defaultS3HttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: getSmithyContext(context).operation,\n region: await normalizeProvider(config.region)() || (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexport const defaultS3HttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultS3HttpAuthSchemeParametersProvider);\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"s3\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createAwsAuthSigv4aHttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4a\",\n signingProperties: {\n name: \"s3\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nconst createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {\n const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {\n const endpoint = defaultEndpointResolver(authParameters);\n const authSchemes = endpoint.properties?.authSchemes;\n if (!authSchemes) {\n return defaultHttpAuthSchemeResolver(authParameters);\n }\n const options = [];\n for (const scheme of authSchemes) {\n const { name: resolvedName, properties = {}, ...rest } = scheme;\n const name = resolvedName.toLowerCase();\n if (resolvedName !== name) {\n console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);\n }\n let schemeId;\n if (name === \"sigv4a\") {\n schemeId = \"aws.auth#sigv4a\";\n const sigv4Present = authSchemes.find((s) => {\n const name = s.name.toLowerCase();\n return name !== \"sigv4a\" && name.startsWith(\"sigv4\");\n });\n if (SignatureV4MultiRegion.sigv4aDependency() === \"none\" && sigv4Present) {\n continue;\n }\n }\n else if (name.startsWith(\"sigv4\")) {\n schemeId = \"aws.auth#sigv4\";\n }\n else {\n throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`);\n }\n const createOption = createHttpAuthOptionFunctions[schemeId];\n if (!createOption) {\n throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);\n }\n const option = createOption(authParameters);\n option.schemeId = schemeId;\n option.signingProperties = { ...(option.signingProperties || {}), ...rest, ...properties };\n options.push(option);\n }\n return options;\n };\n return endpointRuleSetHttpAuthSchemeProvider;\n};\nconst _defaultS3HttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexport const defaultS3HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultS3HttpAuthSchemeProvider, {\n \"aws.auth#sigv4\": createAwsAuthSigv4HttpAuthOption,\n \"aws.auth#sigv4a\": createAwsAuthSigv4aHttpAuthOption,\n});\nexport const resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = resolveAwsSdkSigV4Config(config);\n const config_1 = resolveAwsSdkSigV4AConfig(config_0);\n return Object.assign(config_1, {\n authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n", "const clientContextParamDefaults = {};\nexport const resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n forcePathStyle: options.forcePathStyle ?? false,\n useAccelerateEndpoint: options.useAccelerateEndpoint ?? false,\n useGlobalEndpoint: options.useGlobalEndpoint ?? false,\n disableMultiregionAccessPoints: options.disableMultiregionAccessPoints ?? false,\n defaultSigningName: \"s3\",\n clientContextParams: options.clientContextParams ?? {},\n });\n};\nexport const commonParams = {\n ForcePathStyle: { type: \"clientContextParams\", name: \"forcePathStyle\" },\n UseArnRegion: { type: \"clientContextParams\", name: \"useArnRegion\" },\n DisableMultiRegionAccessPoints: { type: \"clientContextParams\", name: \"disableMultiregionAccessPoints\" },\n Accelerate: { type: \"clientContextParams\", name: \"useAccelerateEndpoint\" },\n DisableS3ExpressSessionAuth: { type: \"clientContextParams\", name: \"disableS3ExpressSessionAuth\" },\n UseGlobalEndpoint: { type: \"builtInParams\", name: \"useGlobalEndpoint\" },\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n", "import { ServiceException as __ServiceException, } from \"@smithy/smithy-client\";\nexport { __ServiceException };\nexport class S3ServiceException extends __ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, S3ServiceException.prototype);\n }\n}\n", "import { S3ServiceException as __BaseException } from \"./S3ServiceException\";\nexport class NoSuchUpload extends __BaseException {\n name = \"NoSuchUpload\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NoSuchUpload\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NoSuchUpload.prototype);\n }\n}\nexport class AccessDenied extends __BaseException {\n name = \"AccessDenied\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"AccessDenied\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AccessDenied.prototype);\n }\n}\nexport class ObjectNotInActiveTierError extends __BaseException {\n name = \"ObjectNotInActiveTierError\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ObjectNotInActiveTierError\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ObjectNotInActiveTierError.prototype);\n }\n}\nexport class BucketAlreadyExists extends __BaseException {\n name = \"BucketAlreadyExists\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"BucketAlreadyExists\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, BucketAlreadyExists.prototype);\n }\n}\nexport class BucketAlreadyOwnedByYou extends __BaseException {\n name = \"BucketAlreadyOwnedByYou\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"BucketAlreadyOwnedByYou\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, BucketAlreadyOwnedByYou.prototype);\n }\n}\nexport class NoSuchBucket extends __BaseException {\n name = \"NoSuchBucket\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NoSuchBucket\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NoSuchBucket.prototype);\n }\n}\nexport class InvalidObjectState extends __BaseException {\n name = \"InvalidObjectState\";\n $fault = \"client\";\n StorageClass;\n AccessTier;\n constructor(opts) {\n super({\n name: \"InvalidObjectState\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidObjectState.prototype);\n this.StorageClass = opts.StorageClass;\n this.AccessTier = opts.AccessTier;\n }\n}\nexport class NoSuchKey extends __BaseException {\n name = \"NoSuchKey\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NoSuchKey\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NoSuchKey.prototype);\n }\n}\nexport class NotFound extends __BaseException {\n name = \"NotFound\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NotFound\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NotFound.prototype);\n }\n}\nexport class EncryptionTypeMismatch extends __BaseException {\n name = \"EncryptionTypeMismatch\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"EncryptionTypeMismatch\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, EncryptionTypeMismatch.prototype);\n }\n}\nexport class InvalidRequest extends __BaseException {\n name = \"InvalidRequest\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidRequest\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidRequest.prototype);\n }\n}\nexport class InvalidWriteOffset extends __BaseException {\n name = \"InvalidWriteOffset\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidWriteOffset\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidWriteOffset.prototype);\n }\n}\nexport class TooManyParts extends __BaseException {\n name = \"TooManyParts\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyParts\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyParts.prototype);\n }\n}\nexport class IdempotencyParameterMismatch extends __BaseException {\n name = \"IdempotencyParameterMismatch\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"IdempotencyParameterMismatch\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, IdempotencyParameterMismatch.prototype);\n }\n}\nexport class ObjectAlreadyInActiveTierError extends __BaseException {\n name = \"ObjectAlreadyInActiveTierError\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ObjectAlreadyInActiveTierError\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ObjectAlreadyInActiveTierError.prototype);\n }\n}\n", "const _A = \"Account\";\nconst _AAO = \"AnalyticsAndOperator\";\nconst _AC = \"AccelerateConfiguration\";\nconst _ACL = \"AccessControlList\";\nconst _ACL_ = \"ACL\";\nconst _ACLn = \"AnalyticsConfigurationList\";\nconst _ACP = \"AccessControlPolicy\";\nconst _ACT = \"AccessControlTranslation\";\nconst _ACn = \"AnalyticsConfiguration\";\nconst _AD = \"AccessDenied\";\nconst _ADb = \"AbortDate\";\nconst _AED = \"AnalyticsExportDestination\";\nconst _AF = \"AnalyticsFilter\";\nconst _AH = \"AllowedHeaders\";\nconst _AHl = \"AllowedHeader\";\nconst _AI = \"AccountId\";\nconst _AIMU = \"AbortIncompleteMultipartUpload\";\nconst _AKI = \"AccessKeyId\";\nconst _AM = \"AllowedMethods\";\nconst _AMU = \"AbortMultipartUpload\";\nconst _AMUO = \"AbortMultipartUploadOutput\";\nconst _AMUR = \"AbortMultipartUploadRequest\";\nconst _AMl = \"AllowedMethod\";\nconst _AO = \"AllowedOrigins\";\nconst _AOl = \"AllowedOrigin\";\nconst _APA = \"AccessPointAlias\";\nconst _APAc = \"AccessPointArn\";\nconst _AQRD = \"AllowQuotedRecordDelimiter\";\nconst _AR = \"AcceptRanges\";\nconst _ARI = \"AbortRuleId\";\nconst _AS = \"AbacStatus\";\nconst _ASBD = \"AnalyticsS3BucketDestination\";\nconst _ASSEBD = \"ApplyServerSideEncryptionByDefault\";\nconst _ASr = \"ArchiveStatus\";\nconst _AT = \"AccessTier\";\nconst _An = \"And\";\nconst _B = \"Bucket\";\nconst _BA = \"BucketArn\";\nconst _BAE = \"BucketAlreadyExists\";\nconst _BAI = \"BucketAccountId\";\nconst _BAOBY = \"BucketAlreadyOwnedByYou\";\nconst _BET = \"BlockedEncryptionTypes\";\nconst _BGR = \"BypassGovernanceRetention\";\nconst _BI = \"BucketInfo\";\nconst _BKE = \"BucketKeyEnabled\";\nconst _BLC = \"BucketLifecycleConfiguration\";\nconst _BLN = \"BucketLocationName\";\nconst _BLS = \"BucketLoggingStatus\";\nconst _BLT = \"BucketLocationType\";\nconst _BN = \"BucketNamespace\";\nconst _BNu = \"BucketName\";\nconst _BP = \"BytesProcessed\";\nconst _BPA = \"BlockPublicAcls\";\nconst _BPP = \"BlockPublicPolicy\";\nconst _BR = \"BucketRegion\";\nconst _BRy = \"BytesReturned\";\nconst _BS = \"BytesScanned\";\nconst _Bo = \"Body\";\nconst _Bu = \"Buckets\";\nconst _C = \"Checksum\";\nconst _CA = \"ChecksumAlgorithm\";\nconst _CACL = \"CannedACL\";\nconst _CB = \"CreateBucket\";\nconst _CBC = \"CreateBucketConfiguration\";\nconst _CBMC = \"CreateBucketMetadataConfiguration\";\nconst _CBMCR = \"CreateBucketMetadataConfigurationRequest\";\nconst _CBMTC = \"CreateBucketMetadataTableConfiguration\";\nconst _CBMTCR = \"CreateBucketMetadataTableConfigurationRequest\";\nconst _CBO = \"CreateBucketOutput\";\nconst _CBR = \"CreateBucketRequest\";\nconst _CC = \"CacheControl\";\nconst _CCRC = \"ChecksumCRC32\";\nconst _CCRCC = \"ChecksumCRC32C\";\nconst _CCRCNVME = \"ChecksumCRC64NVME\";\nconst _CC_ = \"Cache-Control\";\nconst _CD = \"CreationDate\";\nconst _CD_ = \"Content-Disposition\";\nconst _CDo = \"ContentDisposition\";\nconst _CE = \"ContinuationEvent\";\nconst _CE_ = \"Content-Encoding\";\nconst _CEo = \"ContentEncoding\";\nconst _CF = \"CloudFunction\";\nconst _CFC = \"CloudFunctionConfiguration\";\nconst _CL = \"ContentLanguage\";\nconst _CL_ = \"Content-Language\";\nconst _CL__ = \"Content-Length\";\nconst _CLo = \"ContentLength\";\nconst _CM = \"Content-MD5\";\nconst _CMD = \"ContentMD5\";\nconst _CMU = \"CompletedMultipartUpload\";\nconst _CMUO = \"CompleteMultipartUploadOutput\";\nconst _CMUOr = \"CreateMultipartUploadOutput\";\nconst _CMUR = \"CompleteMultipartUploadResult\";\nconst _CMURo = \"CompleteMultipartUploadRequest\";\nconst _CMURr = \"CreateMultipartUploadRequest\";\nconst _CMUo = \"CompleteMultipartUpload\";\nconst _CMUr = \"CreateMultipartUpload\";\nconst _CMh = \"ChecksumMode\";\nconst _CO = \"CopyObject\";\nconst _COO = \"CopyObjectOutput\";\nconst _COR = \"CopyObjectResult\";\nconst _CORSC = \"CORSConfiguration\";\nconst _CORSR = \"CORSRules\";\nconst _CORSRu = \"CORSRule\";\nconst _CORo = \"CopyObjectRequest\";\nconst _CP = \"CommonPrefix\";\nconst _CPL = \"CommonPrefixList\";\nconst _CPLo = \"CompletedPartList\";\nconst _CPR = \"CopyPartResult\";\nconst _CPo = \"CompletedPart\";\nconst _CPom = \"CommonPrefixes\";\nconst _CR = \"ContentRange\";\nconst _CRSBA = \"ConfirmRemoveSelfBucketAccess\";\nconst _CR_ = \"Content-Range\";\nconst _CS = \"CopySource\";\nconst _CSHA = \"ChecksumSHA1\";\nconst _CSHAh = \"ChecksumSHA256\";\nconst _CSIM = \"CopySourceIfMatch\";\nconst _CSIMS = \"CopySourceIfModifiedSince\";\nconst _CSINM = \"CopySourceIfNoneMatch\";\nconst _CSIUS = \"CopySourceIfUnmodifiedSince\";\nconst _CSO = \"CreateSessionOutput\";\nconst _CSR = \"CreateSessionResult\";\nconst _CSRo = \"CopySourceRange\";\nconst _CSRr = \"CreateSessionRequest\";\nconst _CSSSECA = \"CopySourceSSECustomerAlgorithm\";\nconst _CSSSECK = \"CopySourceSSECustomerKey\";\nconst _CSSSECKMD = \"CopySourceSSECustomerKeyMD5\";\nconst _CSV = \"CSV\";\nconst _CSVI = \"CopySourceVersionId\";\nconst _CSVIn = \"CSVInput\";\nconst _CSVO = \"CSVOutput\";\nconst _CSo = \"ConfigurationState\";\nconst _CSr = \"CreateSession\";\nconst _CT = \"ChecksumType\";\nconst _CT_ = \"Content-Type\";\nconst _CTl = \"ClientToken\";\nconst _CTo = \"ContentType\";\nconst _CTom = \"CompressionType\";\nconst _CTon = \"ContinuationToken\";\nconst _Co = \"Condition\";\nconst _Cod = \"Code\";\nconst _Com = \"Comments\";\nconst _Con = \"Contents\";\nconst _Cont = \"Cont\";\nconst _Cr = \"Credentials\";\nconst _D = \"Days\";\nconst _DAI = \"DaysAfterInitiation\";\nconst _DB = \"DeleteBucket\";\nconst _DBAC = \"DeleteBucketAnalyticsConfiguration\";\nconst _DBACR = \"DeleteBucketAnalyticsConfigurationRequest\";\nconst _DBC = \"DeleteBucketCors\";\nconst _DBCR = \"DeleteBucketCorsRequest\";\nconst _DBE = \"DeleteBucketEncryption\";\nconst _DBER = \"DeleteBucketEncryptionRequest\";\nconst _DBIC = \"DeleteBucketInventoryConfiguration\";\nconst _DBICR = \"DeleteBucketInventoryConfigurationRequest\";\nconst _DBITC = \"DeleteBucketIntelligentTieringConfiguration\";\nconst _DBITCR = \"DeleteBucketIntelligentTieringConfigurationRequest\";\nconst _DBL = \"DeleteBucketLifecycle\";\nconst _DBLR = \"DeleteBucketLifecycleRequest\";\nconst _DBMC = \"DeleteBucketMetadataConfiguration\";\nconst _DBMCR = \"DeleteBucketMetadataConfigurationRequest\";\nconst _DBMCRe = \"DeleteBucketMetricsConfigurationRequest\";\nconst _DBMCe = \"DeleteBucketMetricsConfiguration\";\nconst _DBMTC = \"DeleteBucketMetadataTableConfiguration\";\nconst _DBMTCR = \"DeleteBucketMetadataTableConfigurationRequest\";\nconst _DBOC = \"DeleteBucketOwnershipControls\";\nconst _DBOCR = \"DeleteBucketOwnershipControlsRequest\";\nconst _DBP = \"DeleteBucketPolicy\";\nconst _DBPR = \"DeleteBucketPolicyRequest\";\nconst _DBR = \"DeleteBucketRequest\";\nconst _DBRR = \"DeleteBucketReplicationRequest\";\nconst _DBRe = \"DeleteBucketReplication\";\nconst _DBT = \"DeleteBucketTagging\";\nconst _DBTR = \"DeleteBucketTaggingRequest\";\nconst _DBW = \"DeleteBucketWebsite\";\nconst _DBWR = \"DeleteBucketWebsiteRequest\";\nconst _DE = \"DataExport\";\nconst _DIM = \"DestinationIfMatch\";\nconst _DIMS = \"DestinationIfModifiedSince\";\nconst _DINM = \"DestinationIfNoneMatch\";\nconst _DIUS = \"DestinationIfUnmodifiedSince\";\nconst _DM = \"DeleteMarker\";\nconst _DME = \"DeleteMarkerEntry\";\nconst _DMR = \"DeleteMarkerReplication\";\nconst _DMVI = \"DeleteMarkerVersionId\";\nconst _DMe = \"DeleteMarkers\";\nconst _DN = \"DisplayName\";\nconst _DO = \"DeletedObject\";\nconst _DOO = \"DeleteObjectOutput\";\nconst _DOOe = \"DeleteObjectsOutput\";\nconst _DOR = \"DeleteObjectRequest\";\nconst _DORe = \"DeleteObjectsRequest\";\nconst _DOT = \"DeleteObjectTagging\";\nconst _DOTO = \"DeleteObjectTaggingOutput\";\nconst _DOTR = \"DeleteObjectTaggingRequest\";\nconst _DOe = \"DeletedObjects\";\nconst _DOel = \"DeleteObject\";\nconst _DOele = \"DeleteObjects\";\nconst _DPAB = \"DeletePublicAccessBlock\";\nconst _DPABR = \"DeletePublicAccessBlockRequest\";\nconst _DR = \"DataRedundancy\";\nconst _DRe = \"DefaultRetention\";\nconst _DRel = \"DeleteResult\";\nconst _DRes = \"DestinationResult\";\nconst _Da = \"Date\";\nconst _De = \"Delete\";\nconst _Del = \"Deleted\";\nconst _Deli = \"Delimiter\";\nconst _Des = \"Destination\";\nconst _Desc = \"Description\";\nconst _Det = \"Details\";\nconst _E = \"Expiration\";\nconst _EA = \"EmailAddress\";\nconst _EBC = \"EventBridgeConfiguration\";\nconst _EBO = \"ExpectedBucketOwner\";\nconst _EC = \"EncryptionConfiguration\";\nconst _ECr = \"ErrorCode\";\nconst _ED = \"ErrorDetails\";\nconst _EDr = \"ErrorDocument\";\nconst _EE = \"EndEvent\";\nconst _EH = \"ExposeHeaders\";\nconst _EHx = \"ExposeHeader\";\nconst _EM = \"ErrorMessage\";\nconst _EODM = \"ExpiredObjectDeleteMarker\";\nconst _EOR = \"ExistingObjectReplication\";\nconst _ES = \"ExpiresString\";\nconst _ESBO = \"ExpectedSourceBucketOwner\";\nconst _ET = \"EncryptionType\";\nconst _ETL = \"EncryptionTypeList\";\nconst _ETM = \"EncryptionTypeMismatch\";\nconst _ETa = \"ETag\";\nconst _ETn = \"EncodingType\";\nconst _ETv = \"EventThreshold\";\nconst _ETx = \"ExpressionType\";\nconst _En = \"Encryption\";\nconst _Ena = \"Enabled\";\nconst _End = \"End\";\nconst _Er = \"Errors\";\nconst _Err = \"Error\";\nconst _Ev = \"Events\";\nconst _Eve = \"Event\";\nconst _Ex = \"Expires\";\nconst _Exp = \"Expression\";\nconst _F = \"Filter\";\nconst _FD = \"FieldDelimiter\";\nconst _FHI = \"FileHeaderInfo\";\nconst _FO = \"FetchOwner\";\nconst _FR = \"FilterRule\";\nconst _FRL = \"FilterRuleList\";\nconst _FRi = \"FilterRules\";\nconst _Fi = \"Field\";\nconst _Fo = \"Format\";\nconst _Fr = \"Frequency\";\nconst _G = \"Grants\";\nconst _GBA = \"GetBucketAbac\";\nconst _GBAC = \"GetBucketAccelerateConfiguration\";\nconst _GBACO = \"GetBucketAccelerateConfigurationOutput\";\nconst _GBACOe = \"GetBucketAnalyticsConfigurationOutput\";\nconst _GBACR = \"GetBucketAccelerateConfigurationRequest\";\nconst _GBACRe = \"GetBucketAnalyticsConfigurationRequest\";\nconst _GBACe = \"GetBucketAnalyticsConfiguration\";\nconst _GBAO = \"GetBucketAbacOutput\";\nconst _GBAOe = \"GetBucketAclOutput\";\nconst _GBAR = \"GetBucketAbacRequest\";\nconst _GBARe = \"GetBucketAclRequest\";\nconst _GBAe = \"GetBucketAcl\";\nconst _GBC = \"GetBucketCors\";\nconst _GBCO = \"GetBucketCorsOutput\";\nconst _GBCR = \"GetBucketCorsRequest\";\nconst _GBE = \"GetBucketEncryption\";\nconst _GBEO = \"GetBucketEncryptionOutput\";\nconst _GBER = \"GetBucketEncryptionRequest\";\nconst _GBIC = \"GetBucketInventoryConfiguration\";\nconst _GBICO = \"GetBucketInventoryConfigurationOutput\";\nconst _GBICR = \"GetBucketInventoryConfigurationRequest\";\nconst _GBITC = \"GetBucketIntelligentTieringConfiguration\";\nconst _GBITCO = \"GetBucketIntelligentTieringConfigurationOutput\";\nconst _GBITCR = \"GetBucketIntelligentTieringConfigurationRequest\";\nconst _GBL = \"GetBucketLocation\";\nconst _GBLC = \"GetBucketLifecycleConfiguration\";\nconst _GBLCO = \"GetBucketLifecycleConfigurationOutput\";\nconst _GBLCR = \"GetBucketLifecycleConfigurationRequest\";\nconst _GBLO = \"GetBucketLocationOutput\";\nconst _GBLOe = \"GetBucketLoggingOutput\";\nconst _GBLR = \"GetBucketLocationRequest\";\nconst _GBLRe = \"GetBucketLoggingRequest\";\nconst _GBLe = \"GetBucketLogging\";\nconst _GBMC = \"GetBucketMetadataConfiguration\";\nconst _GBMCO = \"GetBucketMetadataConfigurationOutput\";\nconst _GBMCOe = \"GetBucketMetricsConfigurationOutput\";\nconst _GBMCR = \"GetBucketMetadataConfigurationResult\";\nconst _GBMCRe = \"GetBucketMetadataConfigurationRequest\";\nconst _GBMCRet = \"GetBucketMetricsConfigurationRequest\";\nconst _GBMCe = \"GetBucketMetricsConfiguration\";\nconst _GBMTC = \"GetBucketMetadataTableConfiguration\";\nconst _GBMTCO = \"GetBucketMetadataTableConfigurationOutput\";\nconst _GBMTCR = \"GetBucketMetadataTableConfigurationResult\";\nconst _GBMTCRe = \"GetBucketMetadataTableConfigurationRequest\";\nconst _GBNC = \"GetBucketNotificationConfiguration\";\nconst _GBNCR = \"GetBucketNotificationConfigurationRequest\";\nconst _GBOC = \"GetBucketOwnershipControls\";\nconst _GBOCO = \"GetBucketOwnershipControlsOutput\";\nconst _GBOCR = \"GetBucketOwnershipControlsRequest\";\nconst _GBP = \"GetBucketPolicy\";\nconst _GBPO = \"GetBucketPolicyOutput\";\nconst _GBPR = \"GetBucketPolicyRequest\";\nconst _GBPS = \"GetBucketPolicyStatus\";\nconst _GBPSO = \"GetBucketPolicyStatusOutput\";\nconst _GBPSR = \"GetBucketPolicyStatusRequest\";\nconst _GBR = \"GetBucketReplication\";\nconst _GBRO = \"GetBucketReplicationOutput\";\nconst _GBRP = \"GetBucketRequestPayment\";\nconst _GBRPO = \"GetBucketRequestPaymentOutput\";\nconst _GBRPR = \"GetBucketRequestPaymentRequest\";\nconst _GBRR = \"GetBucketReplicationRequest\";\nconst _GBT = \"GetBucketTagging\";\nconst _GBTO = \"GetBucketTaggingOutput\";\nconst _GBTR = \"GetBucketTaggingRequest\";\nconst _GBV = \"GetBucketVersioning\";\nconst _GBVO = \"GetBucketVersioningOutput\";\nconst _GBVR = \"GetBucketVersioningRequest\";\nconst _GBW = \"GetBucketWebsite\";\nconst _GBWO = \"GetBucketWebsiteOutput\";\nconst _GBWR = \"GetBucketWebsiteRequest\";\nconst _GFC = \"GrantFullControl\";\nconst _GJP = \"GlacierJobParameters\";\nconst _GO = \"GetObject\";\nconst _GOA = \"GetObjectAcl\";\nconst _GOAO = \"GetObjectAclOutput\";\nconst _GOAOe = \"GetObjectAttributesOutput\";\nconst _GOAP = \"GetObjectAttributesParts\";\nconst _GOAR = \"GetObjectAclRequest\";\nconst _GOARe = \"GetObjectAttributesResponse\";\nconst _GOARet = \"GetObjectAttributesRequest\";\nconst _GOAe = \"GetObjectAttributes\";\nconst _GOLC = \"GetObjectLockConfiguration\";\nconst _GOLCO = \"GetObjectLockConfigurationOutput\";\nconst _GOLCR = \"GetObjectLockConfigurationRequest\";\nconst _GOLH = \"GetObjectLegalHold\";\nconst _GOLHO = \"GetObjectLegalHoldOutput\";\nconst _GOLHR = \"GetObjectLegalHoldRequest\";\nconst _GOO = \"GetObjectOutput\";\nconst _GOR = \"GetObjectRequest\";\nconst _GORO = \"GetObjectRetentionOutput\";\nconst _GORR = \"GetObjectRetentionRequest\";\nconst _GORe = \"GetObjectRetention\";\nconst _GOT = \"GetObjectTagging\";\nconst _GOTO = \"GetObjectTaggingOutput\";\nconst _GOTOe = \"GetObjectTorrentOutput\";\nconst _GOTR = \"GetObjectTaggingRequest\";\nconst _GOTRe = \"GetObjectTorrentRequest\";\nconst _GOTe = \"GetObjectTorrent\";\nconst _GPAB = \"GetPublicAccessBlock\";\nconst _GPABO = \"GetPublicAccessBlockOutput\";\nconst _GPABR = \"GetPublicAccessBlockRequest\";\nconst _GR = \"GrantRead\";\nconst _GRACP = \"GrantReadACP\";\nconst _GW = \"GrantWrite\";\nconst _GWACP = \"GrantWriteACP\";\nconst _Gr = \"Grant\";\nconst _Gra = \"Grantee\";\nconst _HB = \"HeadBucket\";\nconst _HBO = \"HeadBucketOutput\";\nconst _HBR = \"HeadBucketRequest\";\nconst _HECRE = \"HttpErrorCodeReturnedEquals\";\nconst _HN = \"HostName\";\nconst _HO = \"HeadObject\";\nconst _HOO = \"HeadObjectOutput\";\nconst _HOR = \"HeadObjectRequest\";\nconst _HRC = \"HttpRedirectCode\";\nconst _I = \"Id\";\nconst _IC = \"InventoryConfiguration\";\nconst _ICL = \"InventoryConfigurationList\";\nconst _ID = \"ID\";\nconst _IDn = \"IndexDocument\";\nconst _IDnv = \"InventoryDestination\";\nconst _IE = \"IsEnabled\";\nconst _IEn = \"InventoryEncryption\";\nconst _IF = \"InventoryFilter\";\nconst _IL = \"IsLatest\";\nconst _IM = \"IfMatch\";\nconst _IMIT = \"IfMatchInitiatedTime\";\nconst _IMLMT = \"IfMatchLastModifiedTime\";\nconst _IMS = \"IfMatchSize\";\nconst _IMS_ = \"If-Modified-Since\";\nconst _IMSf = \"IfModifiedSince\";\nconst _IMUR = \"InitiateMultipartUploadResult\";\nconst _IM_ = \"If-Match\";\nconst _INM = \"IfNoneMatch\";\nconst _INM_ = \"If-None-Match\";\nconst _IOF = \"InventoryOptionalFields\";\nconst _IOS = \"InvalidObjectState\";\nconst _IOV = \"IncludedObjectVersions\";\nconst _IP = \"IsPublic\";\nconst _IPA = \"IgnorePublicAcls\";\nconst _IPM = \"IdempotencyParameterMismatch\";\nconst _IR = \"InvalidRequest\";\nconst _IRIP = \"IsRestoreInProgress\";\nconst _IS = \"InputSerialization\";\nconst _ISBD = \"InventoryS3BucketDestination\";\nconst _ISn = \"InventorySchedule\";\nconst _IT = \"IsTruncated\";\nconst _ITAO = \"IntelligentTieringAndOperator\";\nconst _ITC = \"IntelligentTieringConfiguration\";\nconst _ITCL = \"IntelligentTieringConfigurationList\";\nconst _ITCR = \"InventoryTableConfigurationResult\";\nconst _ITCU = \"InventoryTableConfigurationUpdates\";\nconst _ITCn = \"InventoryTableConfiguration\";\nconst _ITF = \"IntelligentTieringFilter\";\nconst _IUS = \"IfUnmodifiedSince\";\nconst _IUS_ = \"If-Unmodified-Since\";\nconst _IWO = \"InvalidWriteOffset\";\nconst _In = \"Initiator\";\nconst _Ini = \"Initiated\";\nconst _JSON = \"JSON\";\nconst _JSONI = \"JSONInput\";\nconst _JSONO = \"JSONOutput\";\nconst _JTC = \"JournalTableConfiguration\";\nconst _JTCR = \"JournalTableConfigurationResult\";\nconst _JTCU = \"JournalTableConfigurationUpdates\";\nconst _K = \"Key\";\nconst _KC = \"KeyCount\";\nconst _KI = \"KeyId\";\nconst _KKA = \"KmsKeyArn\";\nconst _KM = \"KeyMarker\";\nconst _KMSC = \"KMSContext\";\nconst _KMSKA = \"KMSKeyArn\";\nconst _KMSKI = \"KMSKeyId\";\nconst _KMSMKID = \"KMSMasterKeyID\";\nconst _KPE = \"KeyPrefixEquals\";\nconst _L = \"Location\";\nconst _LAMBR = \"ListAllMyBucketsResult\";\nconst _LAMDBR = \"ListAllMyDirectoryBucketsResult\";\nconst _LB = \"ListBuckets\";\nconst _LBAC = \"ListBucketAnalyticsConfigurations\";\nconst _LBACO = \"ListBucketAnalyticsConfigurationsOutput\";\nconst _LBACR = \"ListBucketAnalyticsConfigurationResult\";\nconst _LBACRi = \"ListBucketAnalyticsConfigurationsRequest\";\nconst _LBIC = \"ListBucketInventoryConfigurations\";\nconst _LBICO = \"ListBucketInventoryConfigurationsOutput\";\nconst _LBICR = \"ListBucketInventoryConfigurationsRequest\";\nconst _LBITC = \"ListBucketIntelligentTieringConfigurations\";\nconst _LBITCO = \"ListBucketIntelligentTieringConfigurationsOutput\";\nconst _LBITCR = \"ListBucketIntelligentTieringConfigurationsRequest\";\nconst _LBMC = \"ListBucketMetricsConfigurations\";\nconst _LBMCO = \"ListBucketMetricsConfigurationsOutput\";\nconst _LBMCR = \"ListBucketMetricsConfigurationsRequest\";\nconst _LBO = \"ListBucketsOutput\";\nconst _LBR = \"ListBucketsRequest\";\nconst _LBRi = \"ListBucketResult\";\nconst _LC = \"LocationConstraint\";\nconst _LCi = \"LifecycleConfiguration\";\nconst _LDB = \"ListDirectoryBuckets\";\nconst _LDBO = \"ListDirectoryBucketsOutput\";\nconst _LDBR = \"ListDirectoryBucketsRequest\";\nconst _LE = \"LoggingEnabled\";\nconst _LEi = \"LifecycleExpiration\";\nconst _LFA = \"LambdaFunctionArn\";\nconst _LFC = \"LambdaFunctionConfiguration\";\nconst _LFCL = \"LambdaFunctionConfigurationList\";\nconst _LFCa = \"LambdaFunctionConfigurations\";\nconst _LH = \"LegalHold\";\nconst _LI = \"LocationInfo\";\nconst _LICR = \"ListInventoryConfigurationsResult\";\nconst _LM = \"LastModified\";\nconst _LMCR = \"ListMetricsConfigurationsResult\";\nconst _LMT = \"LastModifiedTime\";\nconst _LMU = \"ListMultipartUploads\";\nconst _LMUO = \"ListMultipartUploadsOutput\";\nconst _LMUR = \"ListMultipartUploadsResult\";\nconst _LMURi = \"ListMultipartUploadsRequest\";\nconst _LM_ = \"Last-Modified\";\nconst _LO = \"ListObjects\";\nconst _LOO = \"ListObjectsOutput\";\nconst _LOR = \"ListObjectsRequest\";\nconst _LOV = \"ListObjectsV2\";\nconst _LOVO = \"ListObjectsV2Output\";\nconst _LOVOi = \"ListObjectVersionsOutput\";\nconst _LOVR = \"ListObjectsV2Request\";\nconst _LOVRi = \"ListObjectVersionsRequest\";\nconst _LOVi = \"ListObjectVersions\";\nconst _LP = \"ListParts\";\nconst _LPO = \"ListPartsOutput\";\nconst _LPR = \"ListPartsResult\";\nconst _LPRi = \"ListPartsRequest\";\nconst _LR = \"LifecycleRule\";\nconst _LRAO = \"LifecycleRuleAndOperator\";\nconst _LRF = \"LifecycleRuleFilter\";\nconst _LRi = \"LifecycleRules\";\nconst _LVR = \"ListVersionsResult\";\nconst _M = \"Metadata\";\nconst _MAO = \"MetricsAndOperator\";\nconst _MAS = \"MaxAgeSeconds\";\nconst _MB = \"MaxBuckets\";\nconst _MC = \"MetadataConfiguration\";\nconst _MCL = \"MetricsConfigurationList\";\nconst _MCR = \"MetadataConfigurationResult\";\nconst _MCe = \"MetricsConfiguration\";\nconst _MD = \"MetadataDirective\";\nconst _MDB = \"MaxDirectoryBuckets\";\nconst _MDf = \"MfaDelete\";\nconst _ME = \"MetadataEntry\";\nconst _MF = \"MetricsFilter\";\nconst _MFA = \"MFA\";\nconst _MFAD = \"MFADelete\";\nconst _MK = \"MaxKeys\";\nconst _MM = \"MissingMeta\";\nconst _MOS = \"MpuObjectSize\";\nconst _MP = \"MaxParts\";\nconst _MTC = \"MetadataTableConfiguration\";\nconst _MTCR = \"MetadataTableConfigurationResult\";\nconst _MTEC = \"MetadataTableEncryptionConfiguration\";\nconst _MU = \"MultipartUpload\";\nconst _MUL = \"MultipartUploadList\";\nconst _MUa = \"MaxUploads\";\nconst _Ma = \"Marker\";\nconst _Me = \"Metrics\";\nconst _Mes = \"Message\";\nconst _Mi = \"Minutes\";\nconst _Mo = \"Mode\";\nconst _N = \"Name\";\nconst _NC = \"NotificationConfiguration\";\nconst _NCF = \"NotificationConfigurationFilter\";\nconst _NCT = \"NextContinuationToken\";\nconst _ND = \"NoncurrentDays\";\nconst _NEKKAS = \"NonEmptyKmsKeyArnString\";\nconst _NF = \"NotFound\";\nconst _NKM = \"NextKeyMarker\";\nconst _NM = \"NextMarker\";\nconst _NNV = \"NewerNoncurrentVersions\";\nconst _NPNM = \"NextPartNumberMarker\";\nconst _NSB = \"NoSuchBucket\";\nconst _NSK = \"NoSuchKey\";\nconst _NSU = \"NoSuchUpload\";\nconst _NUIM = \"NextUploadIdMarker\";\nconst _NVE = \"NoncurrentVersionExpiration\";\nconst _NVIM = \"NextVersionIdMarker\";\nconst _NVT = \"NoncurrentVersionTransitions\";\nconst _NVTL = \"NoncurrentVersionTransitionList\";\nconst _NVTo = \"NoncurrentVersionTransition\";\nconst _O = \"Owner\";\nconst _OA = \"ObjectAttributes\";\nconst _OAIATE = \"ObjectAlreadyInActiveTierError\";\nconst _OC = \"OwnershipControls\";\nconst _OCR = \"OwnershipControlsRule\";\nconst _OCRw = \"OwnershipControlsRules\";\nconst _OE = \"ObjectEncryption\";\nconst _OF = \"OptionalFields\";\nconst _OI = \"ObjectIdentifier\";\nconst _OIL = \"ObjectIdentifierList\";\nconst _OL = \"OutputLocation\";\nconst _OLC = \"ObjectLockConfiguration\";\nconst _OLE = \"ObjectLockEnabled\";\nconst _OLEFB = \"ObjectLockEnabledForBucket\";\nconst _OLLH = \"ObjectLockLegalHold\";\nconst _OLLHS = \"ObjectLockLegalHoldStatus\";\nconst _OLM = \"ObjectLockMode\";\nconst _OLR = \"ObjectLockRetention\";\nconst _OLRUD = \"ObjectLockRetainUntilDate\";\nconst _OLRb = \"ObjectLockRule\";\nconst _OLb = \"ObjectList\";\nconst _ONIATE = \"ObjectNotInActiveTierError\";\nconst _OO = \"ObjectOwnership\";\nconst _OOA = \"OptionalObjectAttributes\";\nconst _OP = \"ObjectParts\";\nconst _OPb = \"ObjectPart\";\nconst _OS = \"ObjectSize\";\nconst _OSGT = \"ObjectSizeGreaterThan\";\nconst _OSLT = \"ObjectSizeLessThan\";\nconst _OSV = \"OutputSchemaVersion\";\nconst _OSu = \"OutputSerialization\";\nconst _OV = \"ObjectVersion\";\nconst _OVL = \"ObjectVersionList\";\nconst _Ob = \"Objects\";\nconst _Obj = \"Object\";\nconst _P = \"Prefix\";\nconst _PABC = \"PublicAccessBlockConfiguration\";\nconst _PBA = \"PutBucketAbac\";\nconst _PBAC = \"PutBucketAccelerateConfiguration\";\nconst _PBACR = \"PutBucketAccelerateConfigurationRequest\";\nconst _PBACRu = \"PutBucketAnalyticsConfigurationRequest\";\nconst _PBACu = \"PutBucketAnalyticsConfiguration\";\nconst _PBAR = \"PutBucketAbacRequest\";\nconst _PBARu = \"PutBucketAclRequest\";\nconst _PBAu = \"PutBucketAcl\";\nconst _PBC = \"PutBucketCors\";\nconst _PBCR = \"PutBucketCorsRequest\";\nconst _PBE = \"PutBucketEncryption\";\nconst _PBER = \"PutBucketEncryptionRequest\";\nconst _PBIC = \"PutBucketInventoryConfiguration\";\nconst _PBICR = \"PutBucketInventoryConfigurationRequest\";\nconst _PBITC = \"PutBucketIntelligentTieringConfiguration\";\nconst _PBITCR = \"PutBucketIntelligentTieringConfigurationRequest\";\nconst _PBL = \"PutBucketLogging\";\nconst _PBLC = \"PutBucketLifecycleConfiguration\";\nconst _PBLCO = \"PutBucketLifecycleConfigurationOutput\";\nconst _PBLCR = \"PutBucketLifecycleConfigurationRequest\";\nconst _PBLR = \"PutBucketLoggingRequest\";\nconst _PBMC = \"PutBucketMetricsConfiguration\";\nconst _PBMCR = \"PutBucketMetricsConfigurationRequest\";\nconst _PBNC = \"PutBucketNotificationConfiguration\";\nconst _PBNCR = \"PutBucketNotificationConfigurationRequest\";\nconst _PBOC = \"PutBucketOwnershipControls\";\nconst _PBOCR = \"PutBucketOwnershipControlsRequest\";\nconst _PBP = \"PutBucketPolicy\";\nconst _PBPR = \"PutBucketPolicyRequest\";\nconst _PBR = \"PutBucketReplication\";\nconst _PBRP = \"PutBucketRequestPayment\";\nconst _PBRPR = \"PutBucketRequestPaymentRequest\";\nconst _PBRR = \"PutBucketReplicationRequest\";\nconst _PBT = \"PutBucketTagging\";\nconst _PBTR = \"PutBucketTaggingRequest\";\nconst _PBV = \"PutBucketVersioning\";\nconst _PBVR = \"PutBucketVersioningRequest\";\nconst _PBW = \"PutBucketWebsite\";\nconst _PBWR = \"PutBucketWebsiteRequest\";\nconst _PC = \"PartsCount\";\nconst _PDS = \"PartitionDateSource\";\nconst _PE = \"ProgressEvent\";\nconst _PI = \"ParquetInput\";\nconst _PL = \"PartsList\";\nconst _PN = \"PartNumber\";\nconst _PNM = \"PartNumberMarker\";\nconst _PO = \"PutObject\";\nconst _POA = \"PutObjectAcl\";\nconst _POAO = \"PutObjectAclOutput\";\nconst _POAR = \"PutObjectAclRequest\";\nconst _POLC = \"PutObjectLockConfiguration\";\nconst _POLCO = \"PutObjectLockConfigurationOutput\";\nconst _POLCR = \"PutObjectLockConfigurationRequest\";\nconst _POLH = \"PutObjectLegalHold\";\nconst _POLHO = \"PutObjectLegalHoldOutput\";\nconst _POLHR = \"PutObjectLegalHoldRequest\";\nconst _POO = \"PutObjectOutput\";\nconst _POR = \"PutObjectRequest\";\nconst _PORO = \"PutObjectRetentionOutput\";\nconst _PORR = \"PutObjectRetentionRequest\";\nconst _PORu = \"PutObjectRetention\";\nconst _POT = \"PutObjectTagging\";\nconst _POTO = \"PutObjectTaggingOutput\";\nconst _POTR = \"PutObjectTaggingRequest\";\nconst _PP = \"PartitionedPrefix\";\nconst _PPAB = \"PutPublicAccessBlock\";\nconst _PPABR = \"PutPublicAccessBlockRequest\";\nconst _PS = \"PolicyStatus\";\nconst _Pa = \"Parts\";\nconst _Par = \"Part\";\nconst _Parq = \"Parquet\";\nconst _Pay = \"Payer\";\nconst _Payl = \"Payload\";\nconst _Pe = \"Permission\";\nconst _Po = \"Policy\";\nconst _Pr = \"Progress\";\nconst _Pri = \"Priority\";\nconst _Pro = \"Protocol\";\nconst _Q = \"Quiet\";\nconst _QA = \"QueueArn\";\nconst _QC = \"QuoteCharacter\";\nconst _QCL = \"QueueConfigurationList\";\nconst _QCu = \"QueueConfigurations\";\nconst _QCue = \"QueueConfiguration\";\nconst _QEC = \"QuoteEscapeCharacter\";\nconst _QF = \"QuoteFields\";\nconst _Qu = \"Queue\";\nconst _R = \"Rules\";\nconst _RART = \"RedirectAllRequestsTo\";\nconst _RC = \"RequestCharged\";\nconst _RCC = \"ResponseCacheControl\";\nconst _RCD = \"ResponseContentDisposition\";\nconst _RCE = \"ResponseContentEncoding\";\nconst _RCL = \"ResponseContentLanguage\";\nconst _RCT = \"ResponseContentType\";\nconst _RCe = \"ReplicationConfiguration\";\nconst _RD = \"RecordDelimiter\";\nconst _RE = \"ResponseExpires\";\nconst _RED = \"RestoreExpiryDate\";\nconst _REe = \"RecordExpiration\";\nconst _REec = \"RecordsEvent\";\nconst _RKKID = \"ReplicaKmsKeyID\";\nconst _RKPW = \"ReplaceKeyPrefixWith\";\nconst _RKW = \"ReplaceKeyWith\";\nconst _RM = \"ReplicaModifications\";\nconst _RO = \"RenameObject\";\nconst _ROO = \"RenameObjectOutput\";\nconst _ROOe = \"RestoreObjectOutput\";\nconst _ROP = \"RestoreOutputPath\";\nconst _ROR = \"RenameObjectRequest\";\nconst _RORe = \"RestoreObjectRequest\";\nconst _ROe = \"RestoreObject\";\nconst _RP = \"RequestPayer\";\nconst _RPB = \"RestrictPublicBuckets\";\nconst _RPC = \"RequestPaymentConfiguration\";\nconst _RPe = \"RequestProgress\";\nconst _RR = \"RoutingRules\";\nconst _RRAO = \"ReplicationRuleAndOperator\";\nconst _RRF = \"ReplicationRuleFilter\";\nconst _RRe = \"ReplicationRule\";\nconst _RRep = \"ReplicationRules\";\nconst _RReq = \"RequestRoute\";\nconst _RRes = \"RestoreRequest\";\nconst _RRo = \"RoutingRule\";\nconst _RS = \"ReplicationStatus\";\nconst _RSe = \"RestoreStatus\";\nconst _RSen = \"RenameSource\";\nconst _RT = \"ReplicationTime\";\nconst _RTV = \"ReplicationTimeValue\";\nconst _RTe = \"RequestToken\";\nconst _RUD = \"RetainUntilDate\";\nconst _Ra = \"Range\";\nconst _Re = \"Restore\";\nconst _Rec = \"Records\";\nconst _Red = \"Redirect\";\nconst _Ret = \"Retention\";\nconst _Ro = \"Role\";\nconst _Ru = \"Rule\";\nconst _S = \"Status\";\nconst _SA = \"StartAfter\";\nconst _SAK = \"SecretAccessKey\";\nconst _SAs = \"SseAlgorithm\";\nconst _SB = \"StreamingBlob\";\nconst _SBD = \"S3BucketDestination\";\nconst _SC = \"StorageClass\";\nconst _SCA = \"StorageClassAnalysis\";\nconst _SCADE = \"StorageClassAnalysisDataExport\";\nconst _SCV = \"SessionCredentialValue\";\nconst _SCe = \"SessionCredentials\";\nconst _SCt = \"StatusCode\";\nconst _SDV = \"SkipDestinationValidation\";\nconst _SE = \"StatsEvent\";\nconst _SIM = \"SourceIfMatch\";\nconst _SIMS = \"SourceIfModifiedSince\";\nconst _SINM = \"SourceIfNoneMatch\";\nconst _SIUS = \"SourceIfUnmodifiedSince\";\nconst _SK = \"SSE-KMS\";\nconst _SKEO = \"SseKmsEncryptedObjects\";\nconst _SKF = \"S3KeyFilter\";\nconst _SKe = \"S3Key\";\nconst _SL = \"S3Location\";\nconst _SM = \"SessionMode\";\nconst _SOC = \"SelectObjectContent\";\nconst _SOCES = \"SelectObjectContentEventStream\";\nconst _SOCO = \"SelectObjectContentOutput\";\nconst _SOCR = \"SelectObjectContentRequest\";\nconst _SP = \"SelectParameters\";\nconst _SPi = \"SimplePrefix\";\nconst _SR = \"ScanRange\";\nconst _SS = \"SSE-S3\";\nconst _SSC = \"SourceSelectionCriteria\";\nconst _SSE = \"ServerSideEncryption\";\nconst _SSEA = \"SSEAlgorithm\";\nconst _SSEBD = \"ServerSideEncryptionByDefault\";\nconst _SSEC = \"ServerSideEncryptionConfiguration\";\nconst _SSECA = \"SSECustomerAlgorithm\";\nconst _SSECK = \"SSECustomerKey\";\nconst _SSECKMD = \"SSECustomerKeyMD5\";\nconst _SSEKMS = \"SSEKMS\";\nconst _SSEKMSE = \"SSEKMSEncryption\";\nconst _SSEKMSEC = \"SSEKMSEncryptionContext\";\nconst _SSEKMSKI = \"SSEKMSKeyId\";\nconst _SSER = \"ServerSideEncryptionRule\";\nconst _SSERe = \"ServerSideEncryptionRules\";\nconst _SSES = \"SSES3\";\nconst _ST = \"SessionToken\";\nconst _STD = \"S3TablesDestination\";\nconst _STDR = \"S3TablesDestinationResult\";\nconst _S_ = \"S3\";\nconst _Sc = \"Schedule\";\nconst _Si = \"Size\";\nconst _St = \"Start\";\nconst _Sta = \"Stats\";\nconst _Su = \"Suffix\";\nconst _T = \"Tags\";\nconst _TA = \"TableArn\";\nconst _TAo = \"TopicArn\";\nconst _TB = \"TargetBucket\";\nconst _TBA = \"TableBucketArn\";\nconst _TBT = \"TableBucketType\";\nconst _TC = \"TagCount\";\nconst _TCL = \"TopicConfigurationList\";\nconst _TCo = \"TopicConfigurations\";\nconst _TCop = \"TopicConfiguration\";\nconst _TD = \"TaggingDirective\";\nconst _TDMOS = \"TransitionDefaultMinimumObjectSize\";\nconst _TG = \"TargetGrants\";\nconst _TGa = \"TargetGrant\";\nconst _TL = \"TieringList\";\nconst _TLr = \"TransitionList\";\nconst _TMP = \"TooManyParts\";\nconst _TN = \"TableNamespace\";\nconst _TNa = \"TableName\";\nconst _TOKF = \"TargetObjectKeyFormat\";\nconst _TP = \"TargetPrefix\";\nconst _TPC = \"TotalPartsCount\";\nconst _TS = \"TagSet\";\nconst _TSa = \"TableStatus\";\nconst _Ta = \"Tag\";\nconst _Tag = \"Tagging\";\nconst _Ti = \"Tier\";\nconst _Tie = \"Tierings\";\nconst _Tier = \"Tiering\";\nconst _Tim = \"Time\";\nconst _To = \"Token\";\nconst _Top = \"Topic\";\nconst _Tr = \"Transitions\";\nconst _Tra = \"Transition\";\nconst _Ty = \"Type\";\nconst _U = \"Uploads\";\nconst _UBMITC = \"UpdateBucketMetadataInventoryTableConfiguration\";\nconst _UBMITCR = \"UpdateBucketMetadataInventoryTableConfigurationRequest\";\nconst _UBMJTC = \"UpdateBucketMetadataJournalTableConfiguration\";\nconst _UBMJTCR = \"UpdateBucketMetadataJournalTableConfigurationRequest\";\nconst _UI = \"UploadId\";\nconst _UIM = \"UploadIdMarker\";\nconst _UM = \"UserMetadata\";\nconst _UOE = \"UpdateObjectEncryption\";\nconst _UOER = \"UpdateObjectEncryptionRequest\";\nconst _UOERp = \"UpdateObjectEncryptionResponse\";\nconst _UP = \"UploadPart\";\nconst _UPC = \"UploadPartCopy\";\nconst _UPCO = \"UploadPartCopyOutput\";\nconst _UPCR = \"UploadPartCopyRequest\";\nconst _UPO = \"UploadPartOutput\";\nconst _UPR = \"UploadPartRequest\";\nconst _URI = \"URI\";\nconst _Up = \"Upload\";\nconst _V = \"Value\";\nconst _VC = \"VersioningConfiguration\";\nconst _VI = \"VersionId\";\nconst _VIM = \"VersionIdMarker\";\nconst _Ve = \"Versions\";\nconst _Ver = \"Version\";\nconst _WC = \"WebsiteConfiguration\";\nconst _WGOR = \"WriteGetObjectResponse\";\nconst _WGORR = \"WriteGetObjectResponseRequest\";\nconst _WOB = \"WriteOffsetBytes\";\nconst _WRL = \"WebsiteRedirectLocation\";\nconst _Y = \"Years\";\nconst _ar = \"accept-ranges\";\nconst _br = \"bucket-region\";\nconst _c = \"client\";\nconst _ct = \"continuation-token\";\nconst _d = \"delimiter\";\nconst _e = \"error\";\nconst _eP = \"eventPayload\";\nconst _en = \"endpoint\";\nconst _et = \"encoding-type\";\nconst _fo = \"fetch-owner\";\nconst _h = \"http\";\nconst _hC = \"httpChecksum\";\nconst _hE = \"httpError\";\nconst _hH = \"httpHeader\";\nconst _hL = \"hostLabel\";\nconst _hP = \"httpPayload\";\nconst _hPH = \"httpPrefixHeaders\";\nconst _hQ = \"httpQuery\";\nconst _hi = \"http://www.w3.org/2001/XMLSchema-instance\";\nconst _i = \"id\";\nconst _iT = \"idempotencyToken\";\nconst _km = \"key-marker\";\nconst _m = \"marker\";\nconst _mb = \"max-buckets\";\nconst _mdb = \"max-directory-buckets\";\nconst _mk = \"max-keys\";\nconst _mp = \"max-parts\";\nconst _mu = \"max-uploads\";\nconst _p = \"prefix\";\nconst _pN = \"partNumber\";\nconst _pnm = \"part-number-marker\";\nconst _rcc = \"response-cache-control\";\nconst _rcd = \"response-content-disposition\";\nconst _rce = \"response-content-encoding\";\nconst _rcl = \"response-content-language\";\nconst _rct = \"response-content-type\";\nconst _re = \"response-expires\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.s3\";\nconst _sa = \"start-after\";\nconst _st = \"streaming\";\nconst _uI = \"uploadId\";\nconst _uim = \"upload-id-marker\";\nconst _vI = \"versionId\";\nconst _vim = \"version-id-marker\";\nconst _x = \"xsi\";\nconst _xA = \"xmlAttribute\";\nconst _xF = \"xmlFlattened\";\nconst _xN = \"xmlName\";\nconst _xNm = \"xmlNamespace\";\nconst _xaa = \"x-amz-acl\";\nconst _xaad = \"x-amz-abort-date\";\nconst _xaapa = \"x-amz-access-point-alias\";\nconst _xaari = \"x-amz-abort-rule-id\";\nconst _xaas = \"x-amz-archive-status\";\nconst _xaba = \"x-amz-bucket-arn\";\nconst _xabgr = \"x-amz-bypass-governance-retention\";\nconst _xabln = \"x-amz-bucket-location-name\";\nconst _xablt = \"x-amz-bucket-location-type\";\nconst _xabn = \"x-amz-bucket-namespace\";\nconst _xabole = \"x-amz-bucket-object-lock-enabled\";\nconst _xabolt = \"x-amz-bucket-object-lock-token\";\nconst _xabr = \"x-amz-bucket-region\";\nconst _xaca = \"x-amz-checksum-algorithm\";\nconst _xacc = \"x-amz-checksum-crc32\";\nconst _xacc_ = \"x-amz-checksum-crc32c\";\nconst _xacc__ = \"x-amz-checksum-crc64nvme\";\nconst _xacm = \"x-amz-checksum-mode\";\nconst _xacrsba = \"x-amz-confirm-remove-self-bucket-access\";\nconst _xacs = \"x-amz-checksum-sha1\";\nconst _xacs_ = \"x-amz-checksum-sha256\";\nconst _xacs__ = \"x-amz-copy-source\";\nconst _xacsim = \"x-amz-copy-source-if-match\";\nconst _xacsims = \"x-amz-copy-source-if-modified-since\";\nconst _xacsinm = \"x-amz-copy-source-if-none-match\";\nconst _xacsius = \"x-amz-copy-source-if-unmodified-since\";\nconst _xacsm = \"x-amz-create-session-mode\";\nconst _xacsr = \"x-amz-copy-source-range\";\nconst _xacssseca = \"x-amz-copy-source-server-side-encryption-customer-algorithm\";\nconst _xacssseck = \"x-amz-copy-source-server-side-encryption-customer-key\";\nconst _xacssseckM = \"x-amz-copy-source-server-side-encryption-customer-key-MD5\";\nconst _xacsvi = \"x-amz-copy-source-version-id\";\nconst _xact = \"x-amz-checksum-type\";\nconst _xact_ = \"x-amz-client-token\";\nconst _xadm = \"x-amz-delete-marker\";\nconst _xae = \"x-amz-expiration\";\nconst _xaebo = \"x-amz-expected-bucket-owner\";\nconst _xafec = \"x-amz-fwd-error-code\";\nconst _xafem = \"x-amz-fwd-error-message\";\nconst _xafhCC = \"x-amz-fwd-header-Cache-Control\";\nconst _xafhCD = \"x-amz-fwd-header-Content-Disposition\";\nconst _xafhCE = \"x-amz-fwd-header-Content-Encoding\";\nconst _xafhCL = \"x-amz-fwd-header-Content-Language\";\nconst _xafhCR = \"x-amz-fwd-header-Content-Range\";\nconst _xafhCT = \"x-amz-fwd-header-Content-Type\";\nconst _xafhE = \"x-amz-fwd-header-ETag\";\nconst _xafhE_ = \"x-amz-fwd-header-Expires\";\nconst _xafhLM = \"x-amz-fwd-header-Last-Modified\";\nconst _xafhar = \"x-amz-fwd-header-accept-ranges\";\nconst _xafhxacc = \"x-amz-fwd-header-x-amz-checksum-crc32\";\nconst _xafhxacc_ = \"x-amz-fwd-header-x-amz-checksum-crc32c\";\nconst _xafhxacc__ = \"x-amz-fwd-header-x-amz-checksum-crc64nvme\";\nconst _xafhxacs = \"x-amz-fwd-header-x-amz-checksum-sha1\";\nconst _xafhxacs_ = \"x-amz-fwd-header-x-amz-checksum-sha256\";\nconst _xafhxadm = \"x-amz-fwd-header-x-amz-delete-marker\";\nconst _xafhxae = \"x-amz-fwd-header-x-amz-expiration\";\nconst _xafhxamm = \"x-amz-fwd-header-x-amz-missing-meta\";\nconst _xafhxampc = \"x-amz-fwd-header-x-amz-mp-parts-count\";\nconst _xafhxaollh = \"x-amz-fwd-header-x-amz-object-lock-legal-hold\";\nconst _xafhxaolm = \"x-amz-fwd-header-x-amz-object-lock-mode\";\nconst _xafhxaolrud = \"x-amz-fwd-header-x-amz-object-lock-retain-until-date\";\nconst _xafhxar = \"x-amz-fwd-header-x-amz-restore\";\nconst _xafhxarc = \"x-amz-fwd-header-x-amz-request-charged\";\nconst _xafhxars = \"x-amz-fwd-header-x-amz-replication-status\";\nconst _xafhxasc = \"x-amz-fwd-header-x-amz-storage-class\";\nconst _xafhxasse = \"x-amz-fwd-header-x-amz-server-side-encryption\";\nconst _xafhxasseakki = \"x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id\";\nconst _xafhxassebke = \"x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled\";\nconst _xafhxasseca = \"x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm\";\nconst _xafhxasseckM = \"x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5\";\nconst _xafhxatc = \"x-amz-fwd-header-x-amz-tagging-count\";\nconst _xafhxavi = \"x-amz-fwd-header-x-amz-version-id\";\nconst _xafs = \"x-amz-fwd-status\";\nconst _xagfc = \"x-amz-grant-full-control\";\nconst _xagr = \"x-amz-grant-read\";\nconst _xagra = \"x-amz-grant-read-acp\";\nconst _xagw = \"x-amz-grant-write\";\nconst _xagwa = \"x-amz-grant-write-acp\";\nconst _xaimit = \"x-amz-if-match-initiated-time\";\nconst _xaimlmt = \"x-amz-if-match-last-modified-time\";\nconst _xaims = \"x-amz-if-match-size\";\nconst _xam = \"x-amz-meta-\";\nconst _xam_ = \"x-amz-mfa\";\nconst _xamd = \"x-amz-metadata-directive\";\nconst _xamm = \"x-amz-missing-meta\";\nconst _xamos = \"x-amz-mp-object-size\";\nconst _xamp = \"x-amz-max-parts\";\nconst _xampc = \"x-amz-mp-parts-count\";\nconst _xaoa = \"x-amz-object-attributes\";\nconst _xaollh = \"x-amz-object-lock-legal-hold\";\nconst _xaolm = \"x-amz-object-lock-mode\";\nconst _xaolrud = \"x-amz-object-lock-retain-until-date\";\nconst _xaoo = \"x-amz-object-ownership\";\nconst _xaooa = \"x-amz-optional-object-attributes\";\nconst _xaos = \"x-amz-object-size\";\nconst _xapnm = \"x-amz-part-number-marker\";\nconst _xar = \"x-amz-restore\";\nconst _xarc = \"x-amz-request-charged\";\nconst _xarop = \"x-amz-restore-output-path\";\nconst _xarp = \"x-amz-request-payer\";\nconst _xarr = \"x-amz-request-route\";\nconst _xars = \"x-amz-replication-status\";\nconst _xars_ = \"x-amz-rename-source\";\nconst _xarsim = \"x-amz-rename-source-if-match\";\nconst _xarsims = \"x-amz-rename-source-if-modified-since\";\nconst _xarsinm = \"x-amz-rename-source-if-none-match\";\nconst _xarsius = \"x-amz-rename-source-if-unmodified-since\";\nconst _xart = \"x-amz-request-token\";\nconst _xasc = \"x-amz-storage-class\";\nconst _xasca = \"x-amz-sdk-checksum-algorithm\";\nconst _xasdv = \"x-amz-skip-destination-validation\";\nconst _xasebo = \"x-amz-source-expected-bucket-owner\";\nconst _xasse = \"x-amz-server-side-encryption\";\nconst _xasseakki = \"x-amz-server-side-encryption-aws-kms-key-id\";\nconst _xassebke = \"x-amz-server-side-encryption-bucket-key-enabled\";\nconst _xassec = \"x-amz-server-side-encryption-context\";\nconst _xasseca = \"x-amz-server-side-encryption-customer-algorithm\";\nconst _xasseck = \"x-amz-server-side-encryption-customer-key\";\nconst _xasseckM = \"x-amz-server-side-encryption-customer-key-MD5\";\nconst _xat = \"x-amz-tagging\";\nconst _xatc = \"x-amz-tagging-count\";\nconst _xatd = \"x-amz-tagging-directive\";\nconst _xatdmos = \"x-amz-transition-default-minimum-object-size\";\nconst _xavi = \"x-amz-version-id\";\nconst _xawob = \"x-amz-write-offset-bytes\";\nconst _xawrl = \"x-amz-website-redirect-location\";\nconst _xs = \"xsi:type\";\nconst n0 = \"com.amazonaws.s3\";\nimport { TypeRegistry } from \"@smithy/core/schema\";\nimport { AccessDenied, BucketAlreadyExists, BucketAlreadyOwnedByYou, EncryptionTypeMismatch, IdempotencyParameterMismatch, InvalidObjectState, InvalidRequest, InvalidWriteOffset, NoSuchBucket, NoSuchKey, NoSuchUpload, NotFound, ObjectAlreadyInActiveTierError, ObjectNotInActiveTierError, TooManyParts, } from \"../models/errors\";\nimport { S3ServiceException } from \"../models/S3ServiceException\";\nconst _s_registry = TypeRegistry.for(_s);\nexport var S3ServiceException$ = [-3, _s, \"S3ServiceException\", 0, [], []];\n_s_registry.registerError(S3ServiceException$, S3ServiceException);\nconst n0_registry = TypeRegistry.for(n0);\nexport var AccessDenied$ = [-3, n0, _AD,\n { [_e]: _c, [_hE]: 403 },\n [],\n []\n];\nn0_registry.registerError(AccessDenied$, AccessDenied);\nexport var BucketAlreadyExists$ = [-3, n0, _BAE,\n { [_e]: _c, [_hE]: 409 },\n [],\n []\n];\nn0_registry.registerError(BucketAlreadyExists$, BucketAlreadyExists);\nexport var BucketAlreadyOwnedByYou$ = [-3, n0, _BAOBY,\n { [_e]: _c, [_hE]: 409 },\n [],\n []\n];\nn0_registry.registerError(BucketAlreadyOwnedByYou$, BucketAlreadyOwnedByYou);\nexport var EncryptionTypeMismatch$ = [-3, n0, _ETM,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(EncryptionTypeMismatch$, EncryptionTypeMismatch);\nexport var IdempotencyParameterMismatch$ = [-3, n0, _IPM,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(IdempotencyParameterMismatch$, IdempotencyParameterMismatch);\nexport var InvalidObjectState$ = [-3, n0, _IOS,\n { [_e]: _c, [_hE]: 403 },\n [_SC, _AT],\n [0, 0]\n];\nn0_registry.registerError(InvalidObjectState$, InvalidObjectState);\nexport var InvalidRequest$ = [-3, n0, _IR,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(InvalidRequest$, InvalidRequest);\nexport var InvalidWriteOffset$ = [-3, n0, _IWO,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(InvalidWriteOffset$, InvalidWriteOffset);\nexport var NoSuchBucket$ = [-3, n0, _NSB,\n { [_e]: _c, [_hE]: 404 },\n [],\n []\n];\nn0_registry.registerError(NoSuchBucket$, NoSuchBucket);\nexport var NoSuchKey$ = [-3, n0, _NSK,\n { [_e]: _c, [_hE]: 404 },\n [],\n []\n];\nn0_registry.registerError(NoSuchKey$, NoSuchKey);\nexport var NoSuchUpload$ = [-3, n0, _NSU,\n { [_e]: _c, [_hE]: 404 },\n [],\n []\n];\nn0_registry.registerError(NoSuchUpload$, NoSuchUpload);\nexport var NotFound$ = [-3, n0, _NF,\n { [_e]: _c },\n [],\n []\n];\nn0_registry.registerError(NotFound$, NotFound);\nexport var ObjectAlreadyInActiveTierError$ = [-3, n0, _OAIATE,\n { [_e]: _c, [_hE]: 403 },\n [],\n []\n];\nn0_registry.registerError(ObjectAlreadyInActiveTierError$, ObjectAlreadyInActiveTierError);\nexport var ObjectNotInActiveTierError$ = [-3, n0, _ONIATE,\n { [_e]: _c, [_hE]: 403 },\n [],\n []\n];\nn0_registry.registerError(ObjectNotInActiveTierError$, ObjectNotInActiveTierError);\nexport var TooManyParts$ = [-3, n0, _TMP,\n { [_e]: _c, [_hE]: 400 },\n [],\n []\n];\nn0_registry.registerError(TooManyParts$, TooManyParts);\nexport const errorTypeRegistries = [\n _s_registry,\n n0_registry,\n];\nvar CopySourceSSECustomerKey = [0, n0, _CSSSECK, 8, 0];\nvar NonEmptyKmsKeyArnString = [0, n0, _NEKKAS, 8, 0];\nvar SessionCredentialValue = [0, n0, _SCV, 8, 0];\nvar SSECustomerKey = [0, n0, _SSECK, 8, 0];\nvar SSEKMSEncryptionContext = [0, n0, _SSEKMSEC, 8, 0];\nvar SSEKMSKeyId = [0, n0, _SSEKMSKI, 8, 0];\nvar StreamingBlob = [0, n0, _SB, { [_st]: 1 }, 42];\nexport var AbacStatus$ = [3, n0, _AS,\n 0,\n [_S],\n [0]\n];\nexport var AbortIncompleteMultipartUpload$ = [3, n0, _AIMU,\n 0,\n [_DAI],\n [1]\n];\nexport var AbortMultipartUploadOutput$ = [3, n0, _AMUO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var AbortMultipartUploadRequest$ = [3, n0, _AMUR,\n 0,\n [_B, _K, _UI, _RP, _EBO, _IMIT],\n [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [6, { [_hH]: _xaimit }]], 3\n];\nexport var AccelerateConfiguration$ = [3, n0, _AC,\n 0,\n [_S],\n [0]\n];\nexport var AccessControlPolicy$ = [3, n0, _ACP,\n 0,\n [_G, _O],\n [[() => Grants, { [_xN]: _ACL }], () => Owner$]\n];\nexport var AccessControlTranslation$ = [3, n0, _ACT,\n 0,\n [_O],\n [0], 1\n];\nexport var AnalyticsAndOperator$ = [3, n0, _AAO,\n 0,\n [_P, _T],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]]\n];\nexport var AnalyticsConfiguration$ = [3, n0, _ACn,\n 0,\n [_I, _SCA, _F],\n [0, () => StorageClassAnalysis$, [() => AnalyticsFilter$, 0]], 2\n];\nexport var AnalyticsExportDestination$ = [3, n0, _AED,\n 0,\n [_SBD],\n [() => AnalyticsS3BucketDestination$], 1\n];\nexport var AnalyticsS3BucketDestination$ = [3, n0, _ASBD,\n 0,\n [_Fo, _B, _BAI, _P],\n [0, 0, 0, 0], 2\n];\nexport var BlockedEncryptionTypes$ = [3, n0, _BET,\n 0,\n [_ET],\n [[() => EncryptionTypeList, { [_xF]: 1 }]]\n];\nexport var Bucket$ = [3, n0, _B,\n 0,\n [_N, _CD, _BR, _BA],\n [0, 4, 0, 0]\n];\nexport var BucketInfo$ = [3, n0, _BI,\n 0,\n [_DR, _Ty],\n [0, 0]\n];\nexport var BucketLifecycleConfiguration$ = [3, n0, _BLC,\n 0,\n [_R],\n [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Ru }]], 1\n];\nexport var BucketLoggingStatus$ = [3, n0, _BLS,\n 0,\n [_LE],\n [[() => LoggingEnabled$, 0]]\n];\nexport var Checksum$ = [3, n0, _C,\n 0,\n [_CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT],\n [0, 0, 0, 0, 0, 0]\n];\nexport var CommonPrefix$ = [3, n0, _CP,\n 0,\n [_P],\n [0]\n];\nexport var CompletedMultipartUpload$ = [3, n0, _CMU,\n 0,\n [_Pa],\n [[() => CompletedPartList, { [_xF]: 1, [_xN]: _Par }]]\n];\nexport var CompletedPart$ = [3, n0, _CPo,\n 0,\n [_ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _PN],\n [0, 0, 0, 0, 0, 0, 1]\n];\nexport var CompleteMultipartUploadOutput$ = [3, n0, _CMUO,\n { [_xN]: _CMUR },\n [_L, _B, _K, _E, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _SSE, _VI, _SSEKMSKI, _BKE, _RC],\n [0, 0, 0, [0, { [_hH]: _xae }], 0, 0, 0, 0, 0, 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]]\n];\nexport var CompleteMultipartUploadRequest$ = [3, n0, _CMURo,\n 0,\n [_B, _K, _UI, _MU, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _MOS, _RP, _EBO, _IM, _INM, _SSECA, _SSECK, _SSECKMD],\n [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [() => CompletedMultipartUpload$, { [_hP]: 1, [_xN]: _CMUo }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamos }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], 3\n];\nexport var Condition$ = [3, n0, _Co,\n 0,\n [_HECRE, _KPE],\n [0, 0]\n];\nexport var ContinuationEvent$ = [3, n0, _CE,\n 0,\n [],\n []\n];\nexport var CopyObjectOutput$ = [3, n0, _COO,\n 0,\n [_COR, _E, _CSVI, _VI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC],\n [[() => CopyObjectResult$, 16], [0, { [_hH]: _xae }], [0, { [_hH]: _xacsvi }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]]\n];\nexport var CopyObjectRequest$ = [3, n0, _CORo,\n 0,\n [_B, _CS, _K, _ACL_, _CC, _CA, _CDo, _CEo, _CL, _CTo, _CSIM, _CSIMS, _CSINM, _CSIUS, _Ex, _GFC, _GR, _GRACP, _GWACP, _IM, _INM, _M, _MD, _TD, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _ESBO],\n [[0, 1], [0, { [_hH]: _xacs__ }], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _xaca }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [4, { [_hH]: _Ex }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xamd }], [0, { [_hH]: _xatd }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], 3\n];\nexport var CopyObjectResult$ = [3, n0, _COR,\n 0,\n [_ETa, _LM, _CT, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh],\n [0, 4, 0, 0, 0, 0, 0, 0]\n];\nexport var CopyPartResult$ = [3, n0, _CPR,\n 0,\n [_ETa, _LM, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh],\n [0, 4, 0, 0, 0, 0, 0]\n];\nexport var CORSConfiguration$ = [3, n0, _CORSC,\n 0,\n [_CORSR],\n [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]], 1\n];\nexport var CORSRule$ = [3, n0, _CORSRu,\n 0,\n [_AM, _AO, _ID, _AH, _EH, _MAS],\n [[64 | 0, { [_xF]: 1, [_xN]: _AMl }], [64 | 0, { [_xF]: 1, [_xN]: _AOl }], 0, [64 | 0, { [_xF]: 1, [_xN]: _AHl }], [64 | 0, { [_xF]: 1, [_xN]: _EHx }], 1], 2\n];\nexport var CreateBucketConfiguration$ = [3, n0, _CBC,\n 0,\n [_LC, _L, _B, _T],\n [0, () => LocationInfo$, () => BucketInfo$, [() => TagSet, 0]]\n];\nexport var CreateBucketMetadataConfigurationRequest$ = [3, n0, _CBMCR,\n 0,\n [_B, _MC, _CMD, _CA, _EBO],\n [[0, 1], [() => MetadataConfiguration$, { [_hP]: 1, [_xN]: _MC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var CreateBucketMetadataTableConfigurationRequest$ = [3, n0, _CBMTCR,\n 0,\n [_B, _MTC, _CMD, _CA, _EBO],\n [[0, 1], [() => MetadataTableConfiguration$, { [_hP]: 1, [_xN]: _MTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var CreateBucketOutput$ = [3, n0, _CBO,\n 0,\n [_L, _BA],\n [[0, { [_hH]: _L }], [0, { [_hH]: _xaba }]]\n];\nexport var CreateBucketRequest$ = [3, n0, _CBR,\n 0,\n [_B, _ACL_, _CBC, _GFC, _GR, _GRACP, _GW, _GWACP, _OLEFB, _OO, _BN],\n [[0, 1], [0, { [_hH]: _xaa }], [() => CreateBucketConfiguration$, { [_hP]: 1, [_xN]: _CBC }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [2, { [_hH]: _xabole }], [0, { [_hH]: _xaoo }], [0, { [_hH]: _xabn }]], 1\n];\nexport var CreateMultipartUploadOutput$ = [3, n0, _CMUOr,\n { [_xN]: _IMUR },\n [_ADb, _ARI, _B, _K, _UI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC, _CA, _CT],\n [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], [0, { [_xN]: _B }], 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]]\n];\nexport var CreateMultipartUploadRequest$ = [3, n0, _CMURr,\n 0,\n [_B, _K, _ACL_, _CC, _CDo, _CEo, _CL, _CTo, _Ex, _GFC, _GR, _GRACP, _GWACP, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO, _CA, _CT],\n [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]], 2\n];\nexport var CreateSessionOutput$ = [3, n0, _CSO,\n { [_xN]: _CSR },\n [_Cr, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE],\n [[() => SessionCredentials$, { [_xN]: _Cr }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], 1\n];\nexport var CreateSessionRequest$ = [3, n0, _CSRr,\n 0,\n [_B, _SM, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE],\n [[0, 1], [0, { [_hH]: _xacsm }], [0, { [_hH]: _xasse }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }]], 1\n];\nexport var CSVInput$ = [3, n0, _CSVIn,\n 0,\n [_FHI, _Com, _QEC, _RD, _FD, _QC, _AQRD],\n [0, 0, 0, 0, 0, 0, 2]\n];\nexport var CSVOutput$ = [3, n0, _CSVO,\n 0,\n [_QF, _QEC, _RD, _FD, _QC],\n [0, 0, 0, 0, 0]\n];\nexport var DefaultRetention$ = [3, n0, _DRe,\n 0,\n [_Mo, _D, _Y],\n [0, 1, 1]\n];\nexport var Delete$ = [3, n0, _De,\n 0,\n [_Ob, _Q],\n [[() => ObjectIdentifierList, { [_xF]: 1, [_xN]: _Obj }], 2], 1\n];\nexport var DeleteBucketAnalyticsConfigurationRequest$ = [3, n0, _DBACR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeleteBucketCorsRequest$ = [3, n0, _DBCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketEncryptionRequest$ = [3, n0, _DBER,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketIntelligentTieringConfigurationRequest$ = [3, n0, _DBITCR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeleteBucketInventoryConfigurationRequest$ = [3, n0, _DBICR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeleteBucketLifecycleRequest$ = [3, n0, _DBLR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketMetadataConfigurationRequest$ = [3, n0, _DBMCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketMetadataTableConfigurationRequest$ = [3, n0, _DBMTCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketMetricsConfigurationRequest$ = [3, n0, _DBMCRe,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeleteBucketOwnershipControlsRequest$ = [3, n0, _DBOCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketPolicyRequest$ = [3, n0, _DBPR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketReplicationRequest$ = [3, n0, _DBRR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketRequest$ = [3, n0, _DBR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketTaggingRequest$ = [3, n0, _DBTR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeleteBucketWebsiteRequest$ = [3, n0, _DBWR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var DeletedObject$ = [3, n0, _DO,\n 0,\n [_K, _VI, _DM, _DMVI],\n [0, 0, 2, 0]\n];\nexport var DeleteMarkerEntry$ = [3, n0, _DME,\n 0,\n [_O, _K, _VI, _IL, _LM],\n [() => Owner$, 0, 0, 2, 4]\n];\nexport var DeleteMarkerReplication$ = [3, n0, _DMR,\n 0,\n [_S],\n [0]\n];\nexport var DeleteObjectOutput$ = [3, n0, _DOO,\n 0,\n [_DM, _VI, _RC],\n [[2, { [_hH]: _xadm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }]]\n];\nexport var DeleteObjectRequest$ = [3, n0, _DOR,\n 0,\n [_B, _K, _MFA, _VI, _RP, _BGR, _EBO, _IM, _IMLMT, _IMS],\n [[0, 1], [0, 1], [0, { [_hH]: _xam_ }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _IM_ }], [6, { [_hH]: _xaimlmt }], [1, { [_hH]: _xaims }]], 2\n];\nexport var DeleteObjectsOutput$ = [3, n0, _DOOe,\n { [_xN]: _DRel },\n [_Del, _RC, _Er],\n [[() => DeletedObjects, { [_xF]: 1 }], [0, { [_hH]: _xarc }], [() => Errors, { [_xF]: 1, [_xN]: _Err }]]\n];\nexport var DeleteObjectsRequest$ = [3, n0, _DORe,\n 0,\n [_B, _De, _MFA, _RP, _BGR, _EBO, _CA],\n [[0, 1], [() => Delete$, { [_hP]: 1, [_xN]: _De }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xarp }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], 2\n];\nexport var DeleteObjectTaggingOutput$ = [3, n0, _DOTO,\n 0,\n [_VI],\n [[0, { [_hH]: _xavi }]]\n];\nexport var DeleteObjectTaggingRequest$ = [3, n0, _DOTR,\n 0,\n [_B, _K, _VI, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var DeletePublicAccessBlockRequest$ = [3, n0, _DPABR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var Destination$ = [3, n0, _Des,\n 0,\n [_B, _A, _SC, _ACT, _EC, _RT, _Me],\n [0, 0, 0, () => AccessControlTranslation$, () => EncryptionConfiguration$, () => ReplicationTime$, () => Metrics$], 1\n];\nexport var DestinationResult$ = [3, n0, _DRes,\n 0,\n [_TBT, _TBA, _TN],\n [0, 0, 0]\n];\nexport var Encryption$ = [3, n0, _En,\n 0,\n [_ET, _KMSKI, _KMSC],\n [0, [() => SSEKMSKeyId, 0], 0], 1\n];\nexport var EncryptionConfiguration$ = [3, n0, _EC,\n 0,\n [_RKKID],\n [0]\n];\nexport var EndEvent$ = [3, n0, _EE,\n 0,\n [],\n []\n];\nexport var _Error$ = [3, n0, _Err,\n 0,\n [_K, _VI, _Cod, _Mes],\n [0, 0, 0, 0]\n];\nexport var ErrorDetails$ = [3, n0, _ED,\n 0,\n [_ECr, _EM],\n [0, 0]\n];\nexport var ErrorDocument$ = [3, n0, _EDr,\n 0,\n [_K],\n [0], 1\n];\nexport var EventBridgeConfiguration$ = [3, n0, _EBC,\n 0,\n [],\n []\n];\nexport var ExistingObjectReplication$ = [3, n0, _EOR,\n 0,\n [_S],\n [0], 1\n];\nexport var FilterRule$ = [3, n0, _FR,\n 0,\n [_N, _V],\n [0, 0]\n];\nexport var GetBucketAbacOutput$ = [3, n0, _GBAO,\n 0,\n [_AS],\n [[() => AbacStatus$, 16]]\n];\nexport var GetBucketAbacRequest$ = [3, n0, _GBAR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketAccelerateConfigurationOutput$ = [3, n0, _GBACO,\n { [_xN]: _AC },\n [_S, _RC],\n [0, [0, { [_hH]: _xarc }]]\n];\nexport var GetBucketAccelerateConfigurationRequest$ = [3, n0, _GBACR,\n 0,\n [_B, _EBO, _RP],\n [[0, 1], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], 1\n];\nexport var GetBucketAclOutput$ = [3, n0, _GBAOe,\n { [_xN]: _ACP },\n [_O, _G],\n [() => Owner$, [() => Grants, { [_xN]: _ACL }]]\n];\nexport var GetBucketAclRequest$ = [3, n0, _GBARe,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketAnalyticsConfigurationOutput$ = [3, n0, _GBACOe,\n 0,\n [_ACn],\n [[() => AnalyticsConfiguration$, 16]]\n];\nexport var GetBucketAnalyticsConfigurationRequest$ = [3, n0, _GBACRe,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetBucketCorsOutput$ = [3, n0, _GBCO,\n { [_xN]: _CORSC },\n [_CORSR],\n [[() => CORSRules, { [_xF]: 1, [_xN]: _CORSRu }]]\n];\nexport var GetBucketCorsRequest$ = [3, n0, _GBCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketEncryptionOutput$ = [3, n0, _GBEO,\n 0,\n [_SSEC],\n [[() => ServerSideEncryptionConfiguration$, 16]]\n];\nexport var GetBucketEncryptionRequest$ = [3, n0, _GBER,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketIntelligentTieringConfigurationOutput$ = [3, n0, _GBITCO,\n 0,\n [_ITC],\n [[() => IntelligentTieringConfiguration$, 16]]\n];\nexport var GetBucketIntelligentTieringConfigurationRequest$ = [3, n0, _GBITCR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetBucketInventoryConfigurationOutput$ = [3, n0, _GBICO,\n 0,\n [_IC],\n [[() => InventoryConfiguration$, 16]]\n];\nexport var GetBucketInventoryConfigurationRequest$ = [3, n0, _GBICR,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetBucketLifecycleConfigurationOutput$ = [3, n0, _GBLCO,\n { [_xN]: _LCi },\n [_R, _TDMOS],\n [[() => LifecycleRules, { [_xF]: 1, [_xN]: _Ru }], [0, { [_hH]: _xatdmos }]]\n];\nexport var GetBucketLifecycleConfigurationRequest$ = [3, n0, _GBLCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketLocationOutput$ = [3, n0, _GBLO,\n { [_xN]: _LC },\n [_LC],\n [0]\n];\nexport var GetBucketLocationRequest$ = [3, n0, _GBLR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketLoggingOutput$ = [3, n0, _GBLOe,\n { [_xN]: _BLS },\n [_LE],\n [[() => LoggingEnabled$, 0]]\n];\nexport var GetBucketLoggingRequest$ = [3, n0, _GBLRe,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketMetadataConfigurationOutput$ = [3, n0, _GBMCO,\n 0,\n [_GBMCR],\n [[() => GetBucketMetadataConfigurationResult$, 16]]\n];\nexport var GetBucketMetadataConfigurationRequest$ = [3, n0, _GBMCRe,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketMetadataConfigurationResult$ = [3, n0, _GBMCR,\n 0,\n [_MCR],\n [() => MetadataConfigurationResult$], 1\n];\nexport var GetBucketMetadataTableConfigurationOutput$ = [3, n0, _GBMTCO,\n 0,\n [_GBMTCR],\n [[() => GetBucketMetadataTableConfigurationResult$, 16]]\n];\nexport var GetBucketMetadataTableConfigurationRequest$ = [3, n0, _GBMTCRe,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketMetadataTableConfigurationResult$ = [3, n0, _GBMTCR,\n 0,\n [_MTCR, _S, _Err],\n [() => MetadataTableConfigurationResult$, 0, () => ErrorDetails$], 2\n];\nexport var GetBucketMetricsConfigurationOutput$ = [3, n0, _GBMCOe,\n 0,\n [_MCe],\n [[() => MetricsConfiguration$, 16]]\n];\nexport var GetBucketMetricsConfigurationRequest$ = [3, n0, _GBMCRet,\n 0,\n [_B, _I, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetBucketNotificationConfigurationRequest$ = [3, n0, _GBNCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketOwnershipControlsOutput$ = [3, n0, _GBOCO,\n 0,\n [_OC],\n [[() => OwnershipControls$, 16]]\n];\nexport var GetBucketOwnershipControlsRequest$ = [3, n0, _GBOCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketPolicyOutput$ = [3, n0, _GBPO,\n 0,\n [_Po],\n [[0, 16]]\n];\nexport var GetBucketPolicyRequest$ = [3, n0, _GBPR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketPolicyStatusOutput$ = [3, n0, _GBPSO,\n 0,\n [_PS],\n [[() => PolicyStatus$, 16]]\n];\nexport var GetBucketPolicyStatusRequest$ = [3, n0, _GBPSR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketReplicationOutput$ = [3, n0, _GBRO,\n 0,\n [_RCe],\n [[() => ReplicationConfiguration$, 16]]\n];\nexport var GetBucketReplicationRequest$ = [3, n0, _GBRR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketRequestPaymentOutput$ = [3, n0, _GBRPO,\n { [_xN]: _RPC },\n [_Pay],\n [0]\n];\nexport var GetBucketRequestPaymentRequest$ = [3, n0, _GBRPR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketTaggingOutput$ = [3, n0, _GBTO,\n { [_xN]: _Tag },\n [_TS],\n [[() => TagSet, 0]], 1\n];\nexport var GetBucketTaggingRequest$ = [3, n0, _GBTR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketVersioningOutput$ = [3, n0, _GBVO,\n { [_xN]: _VC },\n [_S, _MFAD],\n [0, [0, { [_xN]: _MDf }]]\n];\nexport var GetBucketVersioningRequest$ = [3, n0, _GBVR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetBucketWebsiteOutput$ = [3, n0, _GBWO,\n { [_xN]: _WC },\n [_RART, _IDn, _EDr, _RR],\n [() => RedirectAllRequestsTo$, () => IndexDocument$, () => ErrorDocument$, [() => RoutingRules, 0]]\n];\nexport var GetBucketWebsiteRequest$ = [3, n0, _GBWR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetObjectAclOutput$ = [3, n0, _GOAO,\n { [_xN]: _ACP },\n [_O, _G, _RC],\n [() => Owner$, [() => Grants, { [_xN]: _ACL }], [0, { [_hH]: _xarc }]]\n];\nexport var GetObjectAclRequest$ = [3, n0, _GOAR,\n 0,\n [_B, _K, _VI, _RP, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetObjectAttributesOutput$ = [3, n0, _GOAOe,\n { [_xN]: _GOARe },\n [_DM, _LM, _VI, _RC, _ETa, _C, _OP, _SC, _OS],\n [[2, { [_hH]: _xadm }], [4, { [_hH]: _LM_ }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xarc }], 0, () => Checksum$, [() => GetObjectAttributesParts$, 0], 0, 1]\n];\nexport var GetObjectAttributesParts$ = [3, n0, _GOAP,\n 0,\n [_TPC, _PNM, _NPNM, _MP, _IT, _Pa],\n [[1, { [_xN]: _PC }], 0, 0, 1, 2, [() => PartsList, { [_xF]: 1, [_xN]: _Par }]]\n];\nexport var GetObjectAttributesRequest$ = [3, n0, _GOARet,\n 0,\n [_B, _K, _OA, _VI, _MP, _PNM, _SSECA, _SSECK, _SSECKMD, _RP, _EBO],\n [[0, 1], [0, 1], [64 | 0, { [_hH]: _xaoa }], [0, { [_hQ]: _vI }], [1, { [_hH]: _xamp }], [0, { [_hH]: _xapnm }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var GetObjectLegalHoldOutput$ = [3, n0, _GOLHO,\n 0,\n [_LH],\n [[() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }]]\n];\nexport var GetObjectLegalHoldRequest$ = [3, n0, _GOLHR,\n 0,\n [_B, _K, _VI, _RP, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetObjectLockConfigurationOutput$ = [3, n0, _GOLCO,\n 0,\n [_OLC],\n [[() => ObjectLockConfiguration$, 16]]\n];\nexport var GetObjectLockConfigurationRequest$ = [3, n0, _GOLCR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GetObjectOutput$ = [3, n0, _GOO,\n 0,\n [_Bo, _DM, _AR, _E, _Re, _LM, _CLo, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _MM, _VI, _CC, _CDo, _CEo, _CL, _CR, _CTo, _Ex, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS],\n [[() => StreamingBlob, 16], [2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CR_ }], [0, { [_hH]: _CT_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]]\n];\nexport var GetObjectRequest$ = [3, n0, _GOR,\n 0,\n [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh],\n [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm }]], 2\n];\nexport var GetObjectRetentionOutput$ = [3, n0, _GORO,\n 0,\n [_Ret],\n [[() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }]]\n];\nexport var GetObjectRetentionRequest$ = [3, n0, _GORR,\n 0,\n [_B, _K, _VI, _RP, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetObjectTaggingOutput$ = [3, n0, _GOTO,\n { [_xN]: _Tag },\n [_TS, _VI],\n [[() => TagSet, 0], [0, { [_hH]: _xavi }]], 1\n];\nexport var GetObjectTaggingRequest$ = [3, n0, _GOTR,\n 0,\n [_B, _K, _VI, _EBO, _RP],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], 2\n];\nexport var GetObjectTorrentOutput$ = [3, n0, _GOTOe,\n 0,\n [_Bo, _RC],\n [[() => StreamingBlob, 16], [0, { [_hH]: _xarc }]]\n];\nexport var GetObjectTorrentRequest$ = [3, n0, _GOTRe,\n 0,\n [_B, _K, _RP, _EBO],\n [[0, 1], [0, 1], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var GetPublicAccessBlockOutput$ = [3, n0, _GPABO,\n 0,\n [_PABC],\n [[() => PublicAccessBlockConfiguration$, 16]]\n];\nexport var GetPublicAccessBlockRequest$ = [3, n0, _GPABR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var GlacierJobParameters$ = [3, n0, _GJP,\n 0,\n [_Ti],\n [0], 1\n];\nexport var Grant$ = [3, n0, _Gr,\n 0,\n [_Gra, _Pe],\n [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0]\n];\nexport var Grantee$ = [3, n0, _Gra,\n 0,\n [_Ty, _DN, _EA, _ID, _URI],\n [[0, { [_xA]: 1, [_xN]: _xs }], 0, 0, 0, 0], 1\n];\nexport var HeadBucketOutput$ = [3, n0, _HBO,\n 0,\n [_BA, _BLT, _BLN, _BR, _APA],\n [[0, { [_hH]: _xaba }], [0, { [_hH]: _xablt }], [0, { [_hH]: _xabln }], [0, { [_hH]: _xabr }], [2, { [_hH]: _xaapa }]]\n];\nexport var HeadBucketRequest$ = [3, n0, _HBR,\n 0,\n [_B, _EBO],\n [[0, 1], [0, { [_hH]: _xaebo }]], 1\n];\nexport var HeadObjectOutput$ = [3, n0, _HOO,\n 0,\n [_DM, _AR, _E, _Re, _ASr, _LM, _CLo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _ETa, _MM, _VI, _CC, _CDo, _CEo, _CL, _CTo, _CR, _Ex, _ES, _WRL, _SSE, _M, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _SC, _RC, _RS, _PC, _TC, _OLM, _OLRUD, _OLLHS],\n [[2, { [_hH]: _xadm }], [0, { [_hH]: _ar }], [0, { [_hH]: _xae }], [0, { [_hH]: _xar }], [0, { [_hH]: _xaas }], [4, { [_hH]: _LM_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [0, { [_hH]: _ETa }], [1, { [_hH]: _xamm }], [0, { [_hH]: _xavi }], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _CR_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _ES }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasse }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xars }], [1, { [_hH]: _xampc }], [1, { [_hH]: _xatc }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }]]\n];\nexport var HeadObjectRequest$ = [3, n0, _HOR,\n 0,\n [_B, _K, _IM, _IMSf, _INM, _IUS, _Ra, _RCC, _RCD, _RCE, _RCL, _RCT, _RE, _VI, _SSECA, _SSECK, _SSECKMD, _RP, _PN, _EBO, _CMh],\n [[0, 1], [0, 1], [0, { [_hH]: _IM_ }], [4, { [_hH]: _IMS_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _Ra }], [0, { [_hQ]: _rcc }], [0, { [_hQ]: _rcd }], [0, { [_hQ]: _rce }], [0, { [_hQ]: _rcl }], [0, { [_hQ]: _rct }], [6, { [_hQ]: _re }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [1, { [_hQ]: _pN }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xacm }]], 2\n];\nexport var IndexDocument$ = [3, n0, _IDn,\n 0,\n [_Su],\n [0], 1\n];\nexport var Initiator$ = [3, n0, _In,\n 0,\n [_ID, _DN],\n [0, 0]\n];\nexport var InputSerialization$ = [3, n0, _IS,\n 0,\n [_CSV, _CTom, _JSON, _Parq],\n [() => CSVInput$, 0, () => JSONInput$, () => ParquetInput$]\n];\nexport var IntelligentTieringAndOperator$ = [3, n0, _ITAO,\n 0,\n [_P, _T],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]]\n];\nexport var IntelligentTieringConfiguration$ = [3, n0, _ITC,\n 0,\n [_I, _S, _Tie, _F],\n [0, 0, [() => TieringList, { [_xF]: 1, [_xN]: _Tier }], [() => IntelligentTieringFilter$, 0]], 3\n];\nexport var IntelligentTieringFilter$ = [3, n0, _ITF,\n 0,\n [_P, _Ta, _An],\n [0, () => Tag$, [() => IntelligentTieringAndOperator$, 0]]\n];\nexport var InventoryConfiguration$ = [3, n0, _IC,\n 0,\n [_Des, _IE, _I, _IOV, _Sc, _F, _OF],\n [[() => InventoryDestination$, 0], 2, 0, 0, () => InventorySchedule$, () => InventoryFilter$, [() => InventoryOptionalFields, 0]], 5\n];\nexport var InventoryDestination$ = [3, n0, _IDnv,\n 0,\n [_SBD],\n [[() => InventoryS3BucketDestination$, 0]], 1\n];\nexport var InventoryEncryption$ = [3, n0, _IEn,\n 0,\n [_SSES, _SSEKMS],\n [[() => SSES3$, { [_xN]: _SS }], [() => SSEKMS$, { [_xN]: _SK }]]\n];\nexport var InventoryFilter$ = [3, n0, _IF,\n 0,\n [_P],\n [0], 1\n];\nexport var InventoryS3BucketDestination$ = [3, n0, _ISBD,\n 0,\n [_B, _Fo, _AI, _P, _En],\n [0, 0, 0, 0, [() => InventoryEncryption$, 0]], 2\n];\nexport var InventorySchedule$ = [3, n0, _ISn,\n 0,\n [_Fr],\n [0], 1\n];\nexport var InventoryTableConfiguration$ = [3, n0, _ITCn,\n 0,\n [_CSo, _EC],\n [0, () => MetadataTableEncryptionConfiguration$], 1\n];\nexport var InventoryTableConfigurationResult$ = [3, n0, _ITCR,\n 0,\n [_CSo, _TSa, _Err, _TNa, _TA],\n [0, 0, () => ErrorDetails$, 0, 0], 1\n];\nexport var InventoryTableConfigurationUpdates$ = [3, n0, _ITCU,\n 0,\n [_CSo, _EC],\n [0, () => MetadataTableEncryptionConfiguration$], 1\n];\nexport var JournalTableConfiguration$ = [3, n0, _JTC,\n 0,\n [_REe, _EC],\n [() => RecordExpiration$, () => MetadataTableEncryptionConfiguration$], 1\n];\nexport var JournalTableConfigurationResult$ = [3, n0, _JTCR,\n 0,\n [_TSa, _TNa, _REe, _Err, _TA],\n [0, 0, () => RecordExpiration$, () => ErrorDetails$, 0], 3\n];\nexport var JournalTableConfigurationUpdates$ = [3, n0, _JTCU,\n 0,\n [_REe],\n [() => RecordExpiration$], 1\n];\nexport var JSONInput$ = [3, n0, _JSONI,\n 0,\n [_Ty],\n [0]\n];\nexport var JSONOutput$ = [3, n0, _JSONO,\n 0,\n [_RD],\n [0]\n];\nexport var LambdaFunctionConfiguration$ = [3, n0, _LFC,\n 0,\n [_LFA, _Ev, _I, _F],\n [[0, { [_xN]: _CF }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], 2\n];\nexport var LifecycleExpiration$ = [3, n0, _LEi,\n 0,\n [_Da, _D, _EODM],\n [5, 1, 2]\n];\nexport var LifecycleRule$ = [3, n0, _LR,\n 0,\n [_S, _E, _ID, _P, _F, _Tr, _NVT, _NVE, _AIMU],\n [0, () => LifecycleExpiration$, 0, 0, [() => LifecycleRuleFilter$, 0], [() => TransitionList, { [_xF]: 1, [_xN]: _Tra }], [() => NoncurrentVersionTransitionList, { [_xF]: 1, [_xN]: _NVTo }], () => NoncurrentVersionExpiration$, () => AbortIncompleteMultipartUpload$], 1\n];\nexport var LifecycleRuleAndOperator$ = [3, n0, _LRAO,\n 0,\n [_P, _T, _OSGT, _OSLT],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 1, 1]\n];\nexport var LifecycleRuleFilter$ = [3, n0, _LRF,\n 0,\n [_P, _Ta, _OSGT, _OSLT, _An],\n [0, () => Tag$, 1, 1, [() => LifecycleRuleAndOperator$, 0]]\n];\nexport var ListBucketAnalyticsConfigurationsOutput$ = [3, n0, _LBACO,\n { [_xN]: _LBACR },\n [_IT, _CTon, _NCT, _ACLn],\n [2, 0, 0, [() => AnalyticsConfigurationList, { [_xF]: 1, [_xN]: _ACn }]]\n];\nexport var ListBucketAnalyticsConfigurationsRequest$ = [3, n0, _LBACRi,\n 0,\n [_B, _CTon, _EBO],\n [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var ListBucketIntelligentTieringConfigurationsOutput$ = [3, n0, _LBITCO,\n 0,\n [_IT, _CTon, _NCT, _ITCL],\n [2, 0, 0, [() => IntelligentTieringConfigurationList, { [_xF]: 1, [_xN]: _ITC }]]\n];\nexport var ListBucketIntelligentTieringConfigurationsRequest$ = [3, n0, _LBITCR,\n 0,\n [_B, _CTon, _EBO],\n [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var ListBucketInventoryConfigurationsOutput$ = [3, n0, _LBICO,\n { [_xN]: _LICR },\n [_CTon, _ICL, _IT, _NCT],\n [0, [() => InventoryConfigurationList, { [_xF]: 1, [_xN]: _IC }], 2, 0]\n];\nexport var ListBucketInventoryConfigurationsRequest$ = [3, n0, _LBICR,\n 0,\n [_B, _CTon, _EBO],\n [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var ListBucketMetricsConfigurationsOutput$ = [3, n0, _LBMCO,\n { [_xN]: _LMCR },\n [_IT, _CTon, _NCT, _MCL],\n [2, 0, 0, [() => MetricsConfigurationList, { [_xF]: 1, [_xN]: _MCe }]]\n];\nexport var ListBucketMetricsConfigurationsRequest$ = [3, n0, _LBMCR,\n 0,\n [_B, _CTon, _EBO],\n [[0, 1], [0, { [_hQ]: _ct }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var ListBucketsOutput$ = [3, n0, _LBO,\n { [_xN]: _LAMBR },\n [_Bu, _O, _CTon, _P],\n [[() => Buckets, 0], () => Owner$, 0, 0]\n];\nexport var ListBucketsRequest$ = [3, n0, _LBR,\n 0,\n [_MB, _CTon, _P, _BR],\n [[1, { [_hQ]: _mb }], [0, { [_hQ]: _ct }], [0, { [_hQ]: _p }], [0, { [_hQ]: _br }]]\n];\nexport var ListDirectoryBucketsOutput$ = [3, n0, _LDBO,\n { [_xN]: _LAMDBR },\n [_Bu, _CTon],\n [[() => Buckets, 0], 0]\n];\nexport var ListDirectoryBucketsRequest$ = [3, n0, _LDBR,\n 0,\n [_CTon, _MDB],\n [[0, { [_hQ]: _ct }], [1, { [_hQ]: _mdb }]]\n];\nexport var ListMultipartUploadsOutput$ = [3, n0, _LMUO,\n { [_xN]: _LMUR },\n [_B, _KM, _UIM, _NKM, _P, _Deli, _NUIM, _MUa, _IT, _U, _CPom, _ETn, _RC],\n [0, 0, 0, 0, 0, 0, 0, 1, 2, [() => MultipartUploadList, { [_xF]: 1, [_xN]: _Up }], [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]]\n];\nexport var ListMultipartUploadsRequest$ = [3, n0, _LMURi,\n 0,\n [_B, _Deli, _ETn, _KM, _MUa, _P, _UIM, _EBO, _RP],\n [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mu }], [0, { [_hQ]: _p }], [0, { [_hQ]: _uim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], 1\n];\nexport var ListObjectsOutput$ = [3, n0, _LOO,\n { [_xN]: _LBRi },\n [_IT, _Ma, _NM, _Con, _N, _P, _Deli, _MK, _CPom, _ETn, _RC],\n [2, 0, 0, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]]\n];\nexport var ListObjectsRequest$ = [3, n0, _LOR,\n 0,\n [_B, _Deli, _ETn, _Ma, _MK, _P, _RP, _EBO, _OOA],\n [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _m }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], 1\n];\nexport var ListObjectsV2Output$ = [3, n0, _LOVO,\n { [_xN]: _LBRi },\n [_IT, _Con, _N, _P, _Deli, _MK, _CPom, _ETn, _KC, _CTon, _NCT, _SA, _RC],\n [2, [() => ObjectList, { [_xF]: 1 }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, 1, 0, 0, 0, [0, { [_hH]: _xarc }]]\n];\nexport var ListObjectsV2Request$ = [3, n0, _LOVR,\n 0,\n [_B, _Deli, _ETn, _MK, _P, _CTon, _FO, _SA, _RP, _EBO, _OOA],\n [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _ct }], [2, { [_hQ]: _fo }], [0, { [_hQ]: _sa }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [64 | 0, { [_hH]: _xaooa }]], 1\n];\nexport var ListObjectVersionsOutput$ = [3, n0, _LOVOi,\n { [_xN]: _LVR },\n [_IT, _KM, _VIM, _NKM, _NVIM, _Ve, _DMe, _N, _P, _Deli, _MK, _CPom, _ETn, _RC],\n [2, 0, 0, 0, 0, [() => ObjectVersionList, { [_xF]: 1, [_xN]: _Ver }], [() => DeleteMarkers, { [_xF]: 1, [_xN]: _DM }], 0, 0, 0, 1, [() => CommonPrefixList, { [_xF]: 1 }], 0, [0, { [_hH]: _xarc }]]\n];\nexport var ListObjectVersionsRequest$ = [3, n0, _LOVRi,\n 0,\n [_B, _Deli, _ETn, _KM, _MK, _P, _VIM, _EBO, _RP, _OOA],\n [[0, 1], [0, { [_hQ]: _d }], [0, { [_hQ]: _et }], [0, { [_hQ]: _km }], [1, { [_hQ]: _mk }], [0, { [_hQ]: _p }], [0, { [_hQ]: _vim }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }], [64 | 0, { [_hH]: _xaooa }]], 1\n];\nexport var ListPartsOutput$ = [3, n0, _LPO,\n { [_xN]: _LPR },\n [_ADb, _ARI, _B, _K, _UI, _PNM, _NPNM, _MP, _IT, _Pa, _In, _O, _SC, _RC, _CA, _CT],\n [[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], 0, 0, 0, 0, 0, 1, 2, [() => Parts, { [_xF]: 1, [_xN]: _Par }], () => Initiator$, () => Owner$, 0, [0, { [_hH]: _xarc }], 0, 0]\n];\nexport var ListPartsRequest$ = [3, n0, _LPRi,\n 0,\n [_B, _K, _UI, _MP, _PNM, _RP, _EBO, _SSECA, _SSECK, _SSECKMD],\n [[0, 1], [0, 1], [0, { [_hQ]: _uI }], [1, { [_hQ]: _mp }], [0, { [_hQ]: _pnm }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }]], 3\n];\nexport var LocationInfo$ = [3, n0, _LI,\n 0,\n [_Ty, _N],\n [0, 0]\n];\nexport var LoggingEnabled$ = [3, n0, _LE,\n 0,\n [_TB, _TP, _TG, _TOKF],\n [0, 0, [() => TargetGrants, 0], [() => TargetObjectKeyFormat$, 0]], 2\n];\nexport var MetadataConfiguration$ = [3, n0, _MC,\n 0,\n [_JTC, _ITCn],\n [() => JournalTableConfiguration$, () => InventoryTableConfiguration$], 1\n];\nexport var MetadataConfigurationResult$ = [3, n0, _MCR,\n 0,\n [_DRes, _JTCR, _ITCR],\n [() => DestinationResult$, () => JournalTableConfigurationResult$, () => InventoryTableConfigurationResult$], 1\n];\nexport var MetadataEntry$ = [3, n0, _ME,\n 0,\n [_N, _V],\n [0, 0]\n];\nexport var MetadataTableConfiguration$ = [3, n0, _MTC,\n 0,\n [_STD],\n [() => S3TablesDestination$], 1\n];\nexport var MetadataTableConfigurationResult$ = [3, n0, _MTCR,\n 0,\n [_STDR],\n [() => S3TablesDestinationResult$], 1\n];\nexport var MetadataTableEncryptionConfiguration$ = [3, n0, _MTEC,\n 0,\n [_SAs, _KKA],\n [0, 0], 1\n];\nexport var Metrics$ = [3, n0, _Me,\n 0,\n [_S, _ETv],\n [0, () => ReplicationTimeValue$], 1\n];\nexport var MetricsAndOperator$ = [3, n0, _MAO,\n 0,\n [_P, _T, _APAc],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }], 0]\n];\nexport var MetricsConfiguration$ = [3, n0, _MCe,\n 0,\n [_I, _F],\n [0, [() => MetricsFilter$, 0]], 1\n];\nexport var MultipartUpload$ = [3, n0, _MU,\n 0,\n [_UI, _K, _Ini, _SC, _O, _In, _CA, _CT],\n [0, 0, 4, 0, () => Owner$, () => Initiator$, 0, 0]\n];\nexport var NoncurrentVersionExpiration$ = [3, n0, _NVE,\n 0,\n [_ND, _NNV],\n [1, 1]\n];\nexport var NoncurrentVersionTransition$ = [3, n0, _NVTo,\n 0,\n [_ND, _SC, _NNV],\n [1, 0, 1]\n];\nexport var NotificationConfiguration$ = [3, n0, _NC,\n 0,\n [_TCo, _QCu, _LFCa, _EBC],\n [[() => TopicConfigurationList, { [_xF]: 1, [_xN]: _TCop }], [() => QueueConfigurationList, { [_xF]: 1, [_xN]: _QCue }], [() => LambdaFunctionConfigurationList, { [_xF]: 1, [_xN]: _CFC }], () => EventBridgeConfiguration$]\n];\nexport var NotificationConfigurationFilter$ = [3, n0, _NCF,\n 0,\n [_K],\n [[() => S3KeyFilter$, { [_xN]: _SKe }]]\n];\nexport var _Object$ = [3, n0, _Obj,\n 0,\n [_K, _LM, _ETa, _CA, _CT, _Si, _SC, _O, _RSe],\n [0, 4, 0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, () => Owner$, () => RestoreStatus$]\n];\nexport var ObjectIdentifier$ = [3, n0, _OI,\n 0,\n [_K, _VI, _ETa, _LMT, _Si],\n [0, 0, 0, 6, 1], 1\n];\nexport var ObjectLockConfiguration$ = [3, n0, _OLC,\n 0,\n [_OLE, _Ru],\n [0, () => ObjectLockRule$]\n];\nexport var ObjectLockLegalHold$ = [3, n0, _OLLH,\n 0,\n [_S],\n [0]\n];\nexport var ObjectLockRetention$ = [3, n0, _OLR,\n 0,\n [_Mo, _RUD],\n [0, 5]\n];\nexport var ObjectLockRule$ = [3, n0, _OLRb,\n 0,\n [_DRe],\n [() => DefaultRetention$]\n];\nexport var ObjectPart$ = [3, n0, _OPb,\n 0,\n [_PN, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh],\n [1, 1, 0, 0, 0, 0, 0]\n];\nexport var ObjectVersion$ = [3, n0, _OV,\n 0,\n [_ETa, _CA, _CT, _Si, _SC, _K, _VI, _IL, _LM, _O, _RSe],\n [0, [64 | 0, { [_xF]: 1 }], 0, 1, 0, 0, 0, 2, 4, () => Owner$, () => RestoreStatus$]\n];\nexport var OutputLocation$ = [3, n0, _OL,\n 0,\n [_S_],\n [[() => S3Location$, 0]]\n];\nexport var OutputSerialization$ = [3, n0, _OSu,\n 0,\n [_CSV, _JSON],\n [() => CSVOutput$, () => JSONOutput$]\n];\nexport var Owner$ = [3, n0, _O,\n 0,\n [_DN, _ID],\n [0, 0]\n];\nexport var OwnershipControls$ = [3, n0, _OC,\n 0,\n [_R],\n [[() => OwnershipControlsRules, { [_xF]: 1, [_xN]: _Ru }]], 1\n];\nexport var OwnershipControlsRule$ = [3, n0, _OCR,\n 0,\n [_OO],\n [0], 1\n];\nexport var ParquetInput$ = [3, n0, _PI,\n 0,\n [],\n []\n];\nexport var Part$ = [3, n0, _Par,\n 0,\n [_PN, _LM, _ETa, _Si, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh],\n [1, 4, 0, 1, 0, 0, 0, 0, 0]\n];\nexport var PartitionedPrefix$ = [3, n0, _PP,\n { [_xN]: _PP },\n [_PDS],\n [0]\n];\nexport var PolicyStatus$ = [3, n0, _PS,\n 0,\n [_IP],\n [[2, { [_xN]: _IP }]]\n];\nexport var Progress$ = [3, n0, _Pr,\n 0,\n [_BS, _BP, _BRy],\n [1, 1, 1]\n];\nexport var ProgressEvent$ = [3, n0, _PE,\n 0,\n [_Det],\n [[() => Progress$, { [_eP]: 1 }]]\n];\nexport var PublicAccessBlockConfiguration$ = [3, n0, _PABC,\n 0,\n [_BPA, _IPA, _BPP, _RPB],\n [[2, { [_xN]: _BPA }], [2, { [_xN]: _IPA }], [2, { [_xN]: _BPP }], [2, { [_xN]: _RPB }]]\n];\nexport var PutBucketAbacRequest$ = [3, n0, _PBAR,\n 0,\n [_B, _AS, _CMD, _CA, _EBO],\n [[0, 1], [() => AbacStatus$, { [_hP]: 1, [_xN]: _AS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketAccelerateConfigurationRequest$ = [3, n0, _PBACR,\n 0,\n [_B, _AC, _EBO, _CA],\n [[0, 1], [() => AccelerateConfiguration$, { [_hP]: 1, [_xN]: _AC }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], 2\n];\nexport var PutBucketAclRequest$ = [3, n0, _PBARu,\n 0,\n [_B, _ACL_, _ACP, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _EBO],\n [[0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var PutBucketAnalyticsConfigurationRequest$ = [3, n0, _PBACRu,\n 0,\n [_B, _I, _ACn, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [() => AnalyticsConfiguration$, { [_hP]: 1, [_xN]: _ACn }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var PutBucketCorsRequest$ = [3, n0, _PBCR,\n 0,\n [_B, _CORSC, _CMD, _CA, _EBO],\n [[0, 1], [() => CORSConfiguration$, { [_hP]: 1, [_xN]: _CORSC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketEncryptionRequest$ = [3, n0, _PBER,\n 0,\n [_B, _SSEC, _CMD, _CA, _EBO],\n [[0, 1], [() => ServerSideEncryptionConfiguration$, { [_hP]: 1, [_xN]: _SSEC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketIntelligentTieringConfigurationRequest$ = [3, n0, _PBITCR,\n 0,\n [_B, _I, _ITC, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [() => IntelligentTieringConfiguration$, { [_hP]: 1, [_xN]: _ITC }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var PutBucketInventoryConfigurationRequest$ = [3, n0, _PBICR,\n 0,\n [_B, _I, _IC, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [() => InventoryConfiguration$, { [_hP]: 1, [_xN]: _IC }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var PutBucketLifecycleConfigurationOutput$ = [3, n0, _PBLCO,\n 0,\n [_TDMOS],\n [[0, { [_hH]: _xatdmos }]]\n];\nexport var PutBucketLifecycleConfigurationRequest$ = [3, n0, _PBLCR,\n 0,\n [_B, _CA, _LCi, _EBO, _TDMOS],\n [[0, 1], [0, { [_hH]: _xasca }], [() => BucketLifecycleConfiguration$, { [_hP]: 1, [_xN]: _LCi }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xatdmos }]], 1\n];\nexport var PutBucketLoggingRequest$ = [3, n0, _PBLR,\n 0,\n [_B, _BLS, _CMD, _CA, _EBO],\n [[0, 1], [() => BucketLoggingStatus$, { [_hP]: 1, [_xN]: _BLS }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketMetricsConfigurationRequest$ = [3, n0, _PBMCR,\n 0,\n [_B, _I, _MCe, _EBO],\n [[0, 1], [0, { [_hQ]: _i }], [() => MetricsConfiguration$, { [_hP]: 1, [_xN]: _MCe }], [0, { [_hH]: _xaebo }]], 3\n];\nexport var PutBucketNotificationConfigurationRequest$ = [3, n0, _PBNCR,\n 0,\n [_B, _NC, _EBO, _SDV],\n [[0, 1], [() => NotificationConfiguration$, { [_hP]: 1, [_xN]: _NC }], [0, { [_hH]: _xaebo }], [2, { [_hH]: _xasdv }]], 2\n];\nexport var PutBucketOwnershipControlsRequest$ = [3, n0, _PBOCR,\n 0,\n [_B, _OC, _CMD, _EBO, _CA],\n [[0, 1], [() => OwnershipControls$, { [_hP]: 1, [_xN]: _OC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasca }]], 2\n];\nexport var PutBucketPolicyRequest$ = [3, n0, _PBPR,\n 0,\n [_B, _Po, _CMD, _CA, _CRSBA, _EBO],\n [[0, 1], [0, 16], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [2, { [_hH]: _xacrsba }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketReplicationRequest$ = [3, n0, _PBRR,\n 0,\n [_B, _RCe, _CMD, _CA, _To, _EBO],\n [[0, 1], [() => ReplicationConfiguration$, { [_hP]: 1, [_xN]: _RCe }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketRequestPaymentRequest$ = [3, n0, _PBRPR,\n 0,\n [_B, _RPC, _CMD, _CA, _EBO],\n [[0, 1], [() => RequestPaymentConfiguration$, { [_hP]: 1, [_xN]: _RPC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketTaggingRequest$ = [3, n0, _PBTR,\n 0,\n [_B, _Tag, _CMD, _CA, _EBO],\n [[0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketVersioningRequest$ = [3, n0, _PBVR,\n 0,\n [_B, _VC, _CMD, _CA, _MFA, _EBO],\n [[0, 1], [() => VersioningConfiguration$, { [_hP]: 1, [_xN]: _VC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xam_ }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutBucketWebsiteRequest$ = [3, n0, _PBWR,\n 0,\n [_B, _WC, _CMD, _CA, _EBO],\n [[0, 1], [() => WebsiteConfiguration$, { [_hP]: 1, [_xN]: _WC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectAclOutput$ = [3, n0, _POAO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var PutObjectAclRequest$ = [3, n0, _POAR,\n 0,\n [_B, _K, _ACL_, _ACP, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _RP, _VI, _EBO],\n [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => AccessControlPolicy$, { [_hP]: 1, [_xN]: _ACP }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagw }], [0, { [_hH]: _xagwa }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectLegalHoldOutput$ = [3, n0, _POLHO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var PutObjectLegalHoldRequest$ = [3, n0, _POLHR,\n 0,\n [_B, _K, _LH, _RP, _VI, _CMD, _CA, _EBO],\n [[0, 1], [0, 1], [() => ObjectLockLegalHold$, { [_hP]: 1, [_xN]: _LH }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectLockConfigurationOutput$ = [3, n0, _POLCO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var PutObjectLockConfigurationRequest$ = [3, n0, _POLCR,\n 0,\n [_B, _OLC, _RP, _To, _CMD, _CA, _EBO],\n [[0, 1], [() => ObjectLockConfiguration$, { [_hP]: 1, [_xN]: _OLC }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xabolt }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 1\n];\nexport var PutObjectOutput$ = [3, n0, _POO,\n 0,\n [_E, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _CT, _SSE, _VI, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _Si, _RC],\n [[0, { [_hH]: _xae }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xact }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xavi }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [1, { [_hH]: _xaos }], [0, { [_hH]: _xarc }]]\n];\nexport var PutObjectRequest$ = [3, n0, _POR,\n 0,\n [_B, _K, _ACL_, _Bo, _CC, _CDo, _CEo, _CL, _CLo, _CMD, _CTo, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _Ex, _IM, _INM, _GFC, _GR, _GRACP, _GWACP, _WOB, _M, _SSE, _SC, _WRL, _SSECA, _SSECK, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RP, _Tag, _OLM, _OLRUD, _OLLHS, _EBO],\n [[0, 1], [0, 1], [0, { [_hH]: _xaa }], [() => StreamingBlob, 16], [0, { [_hH]: _CC_ }], [0, { [_hH]: _CD_ }], [0, { [_hH]: _CE_ }], [0, { [_hH]: _CL_ }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [4, { [_hH]: _Ex }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [0, { [_hH]: _xagfc }], [0, { [_hH]: _xagr }], [0, { [_hH]: _xagra }], [0, { [_hH]: _xagwa }], [1, { [_hH]: _xawob }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasc }], [0, { [_hH]: _xawrl }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xat }], [0, { [_hH]: _xaolm }], [5, { [_hH]: _xaolrud }], [0, { [_hH]: _xaollh }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectRetentionOutput$ = [3, n0, _PORO,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var PutObjectRetentionRequest$ = [3, n0, _PORR,\n 0,\n [_B, _K, _Ret, _RP, _VI, _BGR, _CMD, _CA, _EBO],\n [[0, 1], [0, 1], [() => ObjectLockRetention$, { [_hP]: 1, [_xN]: _Ret }], [0, { [_hH]: _xarp }], [0, { [_hQ]: _vI }], [2, { [_hH]: _xabgr }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var PutObjectTaggingOutput$ = [3, n0, _POTO,\n 0,\n [_VI],\n [[0, { [_hH]: _xavi }]]\n];\nexport var PutObjectTaggingRequest$ = [3, n0, _POTR,\n 0,\n [_B, _K, _Tag, _VI, _CMD, _CA, _EBO, _RP],\n [[0, 1], [0, 1], [() => Tagging$, { [_hP]: 1, [_xN]: _Tag }], [0, { [_hQ]: _vI }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xarp }]], 3\n];\nexport var PutPublicAccessBlockRequest$ = [3, n0, _PPABR,\n 0,\n [_B, _PABC, _CMD, _CA, _EBO],\n [[0, 1], [() => PublicAccessBlockConfiguration$, { [_hP]: 1, [_xN]: _PABC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var QueueConfiguration$ = [3, n0, _QCue,\n 0,\n [_QA, _Ev, _I, _F],\n [[0, { [_xN]: _Qu }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], 2\n];\nexport var RecordExpiration$ = [3, n0, _REe,\n 0,\n [_E, _D],\n [0, 1], 1\n];\nexport var RecordsEvent$ = [3, n0, _REec,\n 0,\n [_Payl],\n [[21, { [_eP]: 1 }]]\n];\nexport var Redirect$ = [3, n0, _Red,\n 0,\n [_HN, _HRC, _Pro, _RKPW, _RKW],\n [0, 0, 0, 0, 0]\n];\nexport var RedirectAllRequestsTo$ = [3, n0, _RART,\n 0,\n [_HN, _Pro],\n [0, 0], 1\n];\nexport var RenameObjectOutput$ = [3, n0, _ROO,\n 0,\n [],\n []\n];\nexport var RenameObjectRequest$ = [3, n0, _ROR,\n 0,\n [_B, _K, _RSen, _DIM, _DINM, _DIMS, _DIUS, _SIM, _SINM, _SIMS, _SIUS, _CTl],\n [[0, 1], [0, 1], [0, { [_hH]: _xars_ }], [0, { [_hH]: _IM_ }], [0, { [_hH]: _INM_ }], [4, { [_hH]: _IMS_ }], [4, { [_hH]: _IUS_ }], [0, { [_hH]: _xarsim }], [0, { [_hH]: _xarsinm }], [6, { [_hH]: _xarsims }], [6, { [_hH]: _xarsius }], [0, { [_hH]: _xact_, [_iT]: 1 }]], 3\n];\nexport var ReplicaModifications$ = [3, n0, _RM,\n 0,\n [_S],\n [0], 1\n];\nexport var ReplicationConfiguration$ = [3, n0, _RCe,\n 0,\n [_Ro, _R],\n [0, [() => ReplicationRules, { [_xF]: 1, [_xN]: _Ru }]], 2\n];\nexport var ReplicationRule$ = [3, n0, _RRe,\n 0,\n [_S, _Des, _ID, _Pri, _P, _F, _SSC, _EOR, _DMR],\n [0, () => Destination$, 0, 1, 0, [() => ReplicationRuleFilter$, 0], () => SourceSelectionCriteria$, () => ExistingObjectReplication$, () => DeleteMarkerReplication$], 2\n];\nexport var ReplicationRuleAndOperator$ = [3, n0, _RRAO,\n 0,\n [_P, _T],\n [0, [() => TagSet, { [_xF]: 1, [_xN]: _Ta }]]\n];\nexport var ReplicationRuleFilter$ = [3, n0, _RRF,\n 0,\n [_P, _Ta, _An],\n [0, () => Tag$, [() => ReplicationRuleAndOperator$, 0]]\n];\nexport var ReplicationTime$ = [3, n0, _RT,\n 0,\n [_S, _Tim],\n [0, () => ReplicationTimeValue$], 2\n];\nexport var ReplicationTimeValue$ = [3, n0, _RTV,\n 0,\n [_Mi],\n [1]\n];\nexport var RequestPaymentConfiguration$ = [3, n0, _RPC,\n 0,\n [_Pay],\n [0], 1\n];\nexport var RequestProgress$ = [3, n0, _RPe,\n 0,\n [_Ena],\n [2]\n];\nexport var RestoreObjectOutput$ = [3, n0, _ROOe,\n 0,\n [_RC, _ROP],\n [[0, { [_hH]: _xarc }], [0, { [_hH]: _xarop }]]\n];\nexport var RestoreObjectRequest$ = [3, n0, _RORe,\n 0,\n [_B, _K, _VI, _RRes, _RP, _CA, _EBO],\n [[0, 1], [0, 1], [0, { [_hQ]: _vI }], [() => RestoreRequest$, { [_hP]: 1, [_xN]: _RRes }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var RestoreRequest$ = [3, n0, _RRes,\n 0,\n [_D, _GJP, _Ty, _Ti, _Desc, _SP, _OL],\n [1, () => GlacierJobParameters$, 0, 0, 0, () => SelectParameters$, [() => OutputLocation$, 0]]\n];\nexport var RestoreStatus$ = [3, n0, _RSe,\n 0,\n [_IRIP, _RED],\n [2, 4]\n];\nexport var RoutingRule$ = [3, n0, _RRo,\n 0,\n [_Red, _Co],\n [() => Redirect$, () => Condition$], 1\n];\nexport var S3KeyFilter$ = [3, n0, _SKF,\n 0,\n [_FRi],\n [[() => FilterRuleList, { [_xF]: 1, [_xN]: _FR }]]\n];\nexport var S3Location$ = [3, n0, _SL,\n 0,\n [_BNu, _P, _En, _CACL, _ACL, _Tag, _UM, _SC],\n [0, 0, [() => Encryption$, 0], 0, [() => Grants, 0], [() => Tagging$, 0], [() => UserMetadata, 0], 0], 2\n];\nexport var S3TablesDestination$ = [3, n0, _STD,\n 0,\n [_TBA, _TNa],\n [0, 0], 2\n];\nexport var S3TablesDestinationResult$ = [3, n0, _STDR,\n 0,\n [_TBA, _TNa, _TA, _TN],\n [0, 0, 0, 0], 4\n];\nexport var ScanRange$ = [3, n0, _SR,\n 0,\n [_St, _End],\n [1, 1]\n];\nexport var SelectObjectContentOutput$ = [3, n0, _SOCO,\n 0,\n [_Payl],\n [[() => SelectObjectContentEventStream$, 16]]\n];\nexport var SelectObjectContentRequest$ = [3, n0, _SOCR,\n 0,\n [_B, _K, _Exp, _ETx, _IS, _OSu, _SSECA, _SSECK, _SSECKMD, _RPe, _SR, _EBO],\n [[0, 1], [0, 1], 0, 0, () => InputSerialization$, () => OutputSerialization$, [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], () => RequestProgress$, () => ScanRange$, [0, { [_hH]: _xaebo }]], 6\n];\nexport var SelectParameters$ = [3, n0, _SP,\n 0,\n [_IS, _ETx, _Exp, _OSu],\n [() => InputSerialization$, 0, 0, () => OutputSerialization$], 4\n];\nexport var ServerSideEncryptionByDefault$ = [3, n0, _SSEBD,\n 0,\n [_SSEA, _KMSMKID],\n [0, [() => SSEKMSKeyId, 0]], 1\n];\nexport var ServerSideEncryptionConfiguration$ = [3, n0, _SSEC,\n 0,\n [_R],\n [[() => ServerSideEncryptionRules, { [_xF]: 1, [_xN]: _Ru }]], 1\n];\nexport var ServerSideEncryptionRule$ = [3, n0, _SSER,\n 0,\n [_ASSEBD, _BKE, _BET],\n [[() => ServerSideEncryptionByDefault$, 0], 2, [() => BlockedEncryptionTypes$, 0]]\n];\nexport var SessionCredentials$ = [3, n0, _SCe,\n 0,\n [_AKI, _SAK, _ST, _E],\n [[0, { [_xN]: _AKI }], [() => SessionCredentialValue, { [_xN]: _SAK }], [() => SessionCredentialValue, { [_xN]: _ST }], [4, { [_xN]: _E }]], 4\n];\nexport var SimplePrefix$ = [3, n0, _SPi,\n { [_xN]: _SPi },\n [],\n []\n];\nexport var SourceSelectionCriteria$ = [3, n0, _SSC,\n 0,\n [_SKEO, _RM],\n [() => SseKmsEncryptedObjects$, () => ReplicaModifications$]\n];\nexport var SSEKMS$ = [3, n0, _SSEKMS,\n { [_xN]: _SK },\n [_KI],\n [[() => SSEKMSKeyId, 0]], 1\n];\nexport var SseKmsEncryptedObjects$ = [3, n0, _SKEO,\n 0,\n [_S],\n [0], 1\n];\nexport var SSEKMSEncryption$ = [3, n0, _SSEKMSE,\n { [_xN]: _SK },\n [_KMSKA, _BKE],\n [[() => NonEmptyKmsKeyArnString, 0], 2], 1\n];\nexport var SSES3$ = [3, n0, _SSES,\n { [_xN]: _SS },\n [],\n []\n];\nexport var Stats$ = [3, n0, _Sta,\n 0,\n [_BS, _BP, _BRy],\n [1, 1, 1]\n];\nexport var StatsEvent$ = [3, n0, _SE,\n 0,\n [_Det],\n [[() => Stats$, { [_eP]: 1 }]]\n];\nexport var StorageClassAnalysis$ = [3, n0, _SCA,\n 0,\n [_DE],\n [() => StorageClassAnalysisDataExport$]\n];\nexport var StorageClassAnalysisDataExport$ = [3, n0, _SCADE,\n 0,\n [_OSV, _Des],\n [0, () => AnalyticsExportDestination$], 2\n];\nexport var Tag$ = [3, n0, _Ta,\n 0,\n [_K, _V],\n [0, 0], 2\n];\nexport var Tagging$ = [3, n0, _Tag,\n 0,\n [_TS],\n [[() => TagSet, 0]], 1\n];\nexport var TargetGrant$ = [3, n0, _TGa,\n 0,\n [_Gra, _Pe],\n [[() => Grantee$, { [_xNm]: [_x, _hi] }], 0]\n];\nexport var TargetObjectKeyFormat$ = [3, n0, _TOKF,\n 0,\n [_SPi, _PP],\n [[() => SimplePrefix$, { [_xN]: _SPi }], [() => PartitionedPrefix$, { [_xN]: _PP }]]\n];\nexport var Tiering$ = [3, n0, _Tier,\n 0,\n [_D, _AT],\n [1, 0], 2\n];\nexport var TopicConfiguration$ = [3, n0, _TCop,\n 0,\n [_TAo, _Ev, _I, _F],\n [[0, { [_xN]: _Top }], [64 | 0, { [_xF]: 1, [_xN]: _Eve }], 0, [() => NotificationConfigurationFilter$, 0]], 2\n];\nexport var Transition$ = [3, n0, _Tra,\n 0,\n [_Da, _D, _SC],\n [5, 1, 0]\n];\nexport var UpdateBucketMetadataInventoryTableConfigurationRequest$ = [3, n0, _UBMITCR,\n 0,\n [_B, _ITCn, _CMD, _CA, _EBO],\n [[0, 1], [() => InventoryTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _ITCn }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var UpdateBucketMetadataJournalTableConfigurationRequest$ = [3, n0, _UBMJTCR,\n 0,\n [_B, _JTC, _CMD, _CA, _EBO],\n [[0, 1], [() => JournalTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _JTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2\n];\nexport var UpdateObjectEncryptionRequest$ = [3, n0, _UOER,\n 0,\n [_B, _K, _OE, _VI, _RP, _EBO, _CMD, _CA],\n [[0, 1], [0, 1], [() => ObjectEncryption$, 16], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }]], 3\n];\nexport var UpdateObjectEncryptionResponse$ = [3, n0, _UOERp,\n 0,\n [_RC],\n [[0, { [_hH]: _xarc }]]\n];\nexport var UploadPartCopyOutput$ = [3, n0, _UPCO,\n 0,\n [_CSVI, _CPR, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC],\n [[0, { [_hH]: _xacsvi }], [() => CopyPartResult$, 16], [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]]\n];\nexport var UploadPartCopyRequest$ = [3, n0, _UPCR,\n 0,\n [_B, _CS, _K, _PN, _UI, _CSIM, _CSIMS, _CSINM, _CSIUS, _CSRo, _SSECA, _SSECK, _SSECKMD, _CSSSECA, _CSSSECK, _CSSSECKMD, _RP, _EBO, _ESBO],\n [[0, 1], [0, { [_hH]: _xacs__ }], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [0, { [_hH]: _xacsim }], [4, { [_hH]: _xacsims }], [0, { [_hH]: _xacsinm }], [4, { [_hH]: _xacsius }], [0, { [_hH]: _xacsr }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xacssseca }], [() => CopySourceSSECustomerKey, { [_hH]: _xacssseck }], [0, { [_hH]: _xacssseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _xasebo }]], 5\n];\nexport var UploadPartOutput$ = [3, n0, _UPO,\n 0,\n [_SSE, _ETa, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC],\n [[0, { [_hH]: _xasse }], [0, { [_hH]: _ETa }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }]]\n];\nexport var UploadPartRequest$ = [3, n0, _UPR,\n 0,\n [_B, _K, _PN, _UI, _Bo, _CLo, _CMD, _CA, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _SSECA, _SSECK, _SSECKMD, _RP, _EBO],\n [[0, 1], [0, 1], [1, { [_hQ]: _pN }], [0, { [_hQ]: _uI }], [() => StreamingBlob, 16], [1, { [_hH]: _CL__ }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xacc }], [0, { [_hH]: _xacc_ }], [0, { [_hH]: _xacc__ }], [0, { [_hH]: _xacs }], [0, { [_hH]: _xacs_ }], [0, { [_hH]: _xasseca }], [() => SSECustomerKey, { [_hH]: _xasseck }], [0, { [_hH]: _xasseckM }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }]], 4\n];\nexport var VersioningConfiguration$ = [3, n0, _VC,\n 0,\n [_MFAD, _S],\n [[0, { [_xN]: _MDf }], 0]\n];\nexport var WebsiteConfiguration$ = [3, n0, _WC,\n 0,\n [_EDr, _IDn, _RART, _RR],\n [() => ErrorDocument$, () => IndexDocument$, () => RedirectAllRequestsTo$, [() => RoutingRules, 0]]\n];\nexport var WriteGetObjectResponseRequest$ = [3, n0, _WGORR,\n 0,\n [_RReq, _RTe, _Bo, _SCt, _ECr, _EM, _AR, _CC, _CDo, _CEo, _CL, _CLo, _CR, _CTo, _CCRC, _CCRCC, _CCRCNVME, _CSHA, _CSHAh, _DM, _ETa, _Ex, _E, _LM, _MM, _M, _OLM, _OLLHS, _OLRUD, _PC, _RS, _RC, _Re, _SSE, _SSECA, _SSEKMSKI, _SSECKMD, _SC, _TC, _VI, _BKE],\n [[0, { [_hL]: 1, [_hH]: _xarr }], [0, { [_hH]: _xart }], [() => StreamingBlob, 16], [1, { [_hH]: _xafs }], [0, { [_hH]: _xafec }], [0, { [_hH]: _xafem }], [0, { [_hH]: _xafhar }], [0, { [_hH]: _xafhCC }], [0, { [_hH]: _xafhCD }], [0, { [_hH]: _xafhCE }], [0, { [_hH]: _xafhCL }], [1, { [_hH]: _CL__ }], [0, { [_hH]: _xafhCR }], [0, { [_hH]: _xafhCT }], [0, { [_hH]: _xafhxacc }], [0, { [_hH]: _xafhxacc_ }], [0, { [_hH]: _xafhxacc__ }], [0, { [_hH]: _xafhxacs }], [0, { [_hH]: _xafhxacs_ }], [2, { [_hH]: _xafhxadm }], [0, { [_hH]: _xafhE }], [4, { [_hH]: _xafhE_ }], [0, { [_hH]: _xafhxae }], [4, { [_hH]: _xafhLM }], [1, { [_hH]: _xafhxamm }], [128 | 0, { [_hPH]: _xam }], [0, { [_hH]: _xafhxaolm }], [0, { [_hH]: _xafhxaollh }], [5, { [_hH]: _xafhxaolrud }], [1, { [_hH]: _xafhxampc }], [0, { [_hH]: _xafhxars }], [0, { [_hH]: _xafhxarc }], [0, { [_hH]: _xafhxar }], [0, { [_hH]: _xafhxasse }], [0, { [_hH]: _xafhxasseca }], [() => SSEKMSKeyId, { [_hH]: _xafhxasseakki }], [0, { [_hH]: _xafhxasseckM }], [0, { [_hH]: _xafhxasc }], [1, { [_hH]: _xafhxatc }], [0, { [_hH]: _xafhxavi }], [2, { [_hH]: _xafhxassebke }]], 2\n];\nvar __Unit = \"unit\";\nvar AllowedHeaders = 64 | 0;\nvar AllowedMethods = 64 | 0;\nvar AllowedOrigins = 64 | 0;\nvar AnalyticsConfigurationList = [1, n0, _ACLn,\n 0, [() => AnalyticsConfiguration$,\n 0]\n];\nvar Buckets = [1, n0, _Bu,\n 0, [() => Bucket$,\n { [_xN]: _B }]\n];\nvar ChecksumAlgorithmList = 64 | 0;\nvar CommonPrefixList = [1, n0, _CPL,\n 0, () => CommonPrefix$\n];\nvar CompletedPartList = [1, n0, _CPLo,\n 0, () => CompletedPart$\n];\nvar CORSRules = [1, n0, _CORSR,\n 0, [() => CORSRule$,\n 0]\n];\nvar DeletedObjects = [1, n0, _DOe,\n 0, () => DeletedObject$\n];\nvar DeleteMarkers = [1, n0, _DMe,\n 0, () => DeleteMarkerEntry$\n];\nvar EncryptionTypeList = [1, n0, _ETL,\n 0, [0,\n { [_xN]: _ET }]\n];\nvar Errors = [1, n0, _Er,\n 0, () => _Error$\n];\nvar EventList = 64 | 0;\nvar ExposeHeaders = 64 | 0;\nvar FilterRuleList = [1, n0, _FRL,\n 0, () => FilterRule$\n];\nvar Grants = [1, n0, _G,\n 0, [() => Grant$,\n { [_xN]: _Gr }]\n];\nvar IntelligentTieringConfigurationList = [1, n0, _ITCL,\n 0, [() => IntelligentTieringConfiguration$,\n 0]\n];\nvar InventoryConfigurationList = [1, n0, _ICL,\n 0, [() => InventoryConfiguration$,\n 0]\n];\nvar InventoryOptionalFields = [1, n0, _IOF,\n 0, [0,\n { [_xN]: _Fi }]\n];\nvar LambdaFunctionConfigurationList = [1, n0, _LFCL,\n 0, [() => LambdaFunctionConfiguration$,\n 0]\n];\nvar LifecycleRules = [1, n0, _LRi,\n 0, [() => LifecycleRule$,\n 0]\n];\nvar MetricsConfigurationList = [1, n0, _MCL,\n 0, [() => MetricsConfiguration$,\n 0]\n];\nvar MultipartUploadList = [1, n0, _MUL,\n 0, () => MultipartUpload$\n];\nvar NoncurrentVersionTransitionList = [1, n0, _NVTL,\n 0, () => NoncurrentVersionTransition$\n];\nvar ObjectAttributesList = 64 | 0;\nvar ObjectIdentifierList = [1, n0, _OIL,\n 0, () => ObjectIdentifier$\n];\nvar ObjectList = [1, n0, _OLb,\n 0, [() => _Object$,\n 0]\n];\nvar ObjectVersionList = [1, n0, _OVL,\n 0, [() => ObjectVersion$,\n 0]\n];\nvar OptionalObjectAttributesList = 64 | 0;\nvar OwnershipControlsRules = [1, n0, _OCRw,\n 0, () => OwnershipControlsRule$\n];\nvar Parts = [1, n0, _Pa,\n 0, () => Part$\n];\nvar PartsList = [1, n0, _PL,\n 0, () => ObjectPart$\n];\nvar QueueConfigurationList = [1, n0, _QCL,\n 0, [() => QueueConfiguration$,\n 0]\n];\nvar ReplicationRules = [1, n0, _RRep,\n 0, [() => ReplicationRule$,\n 0]\n];\nvar RoutingRules = [1, n0, _RR,\n 0, [() => RoutingRule$,\n { [_xN]: _RRo }]\n];\nvar ServerSideEncryptionRules = [1, n0, _SSERe,\n 0, [() => ServerSideEncryptionRule$,\n 0]\n];\nvar TagSet = [1, n0, _TS,\n 0, [() => Tag$,\n { [_xN]: _Ta }]\n];\nvar TargetGrants = [1, n0, _TG,\n 0, [() => TargetGrant$,\n { [_xN]: _Gr }]\n];\nvar TieringList = [1, n0, _TL,\n 0, () => Tiering$\n];\nvar TopicConfigurationList = [1, n0, _TCL,\n 0, [() => TopicConfiguration$,\n 0]\n];\nvar TransitionList = [1, n0, _TLr,\n 0, () => Transition$\n];\nvar UserMetadata = [1, n0, _UM,\n 0, [() => MetadataEntry$,\n { [_xN]: _ME }]\n];\nvar Metadata = 128 | 0;\nexport var AnalyticsFilter$ = [4, n0, _AF,\n 0,\n [_P, _Ta, _An],\n [0, () => Tag$, [() => AnalyticsAndOperator$, 0]]\n];\nexport var MetricsFilter$ = [4, n0, _MF,\n 0,\n [_P, _Ta, _APAc, _An],\n [0, () => Tag$, 0, [() => MetricsAndOperator$, 0]]\n];\nexport var ObjectEncryption$ = [4, n0, _OE,\n 0,\n [_SSEKMS],\n [[() => SSEKMSEncryption$, { [_xN]: _SK }]]\n];\nexport var SelectObjectContentEventStream$ = [4, n0, _SOCES,\n { [_st]: 1 },\n [_Rec, _Sta, _Pr, _Cont, _End],\n [[() => RecordsEvent$, 0], [() => StatsEvent$, 0], [() => ProgressEvent$, 0], () => ContinuationEvent$, () => EndEvent$]\n];\nexport var AbortMultipartUpload$ = [9, n0, _AMU,\n { [_h]: [\"DELETE\", \"/{Key+}?x-id=AbortMultipartUpload\", 204] }, () => AbortMultipartUploadRequest$, () => AbortMultipartUploadOutput$\n];\nexport var CompleteMultipartUpload$ = [9, n0, _CMUo,\n { [_h]: [\"POST\", \"/{Key+}\", 200] }, () => CompleteMultipartUploadRequest$, () => CompleteMultipartUploadOutput$\n];\nexport var CopyObject$ = [9, n0, _CO,\n { [_h]: [\"PUT\", \"/{Key+}?x-id=CopyObject\", 200] }, () => CopyObjectRequest$, () => CopyObjectOutput$\n];\nexport var CreateBucket$ = [9, n0, _CB,\n { [_h]: [\"PUT\", \"/\", 200] }, () => CreateBucketRequest$, () => CreateBucketOutput$\n];\nexport var CreateBucketMetadataConfiguration$ = [9, n0, _CBMC,\n { [_hC]: \"-\", [_h]: [\"POST\", \"/?metadataConfiguration\", 200] }, () => CreateBucketMetadataConfigurationRequest$, () => __Unit\n];\nexport var CreateBucketMetadataTableConfiguration$ = [9, n0, _CBMTC,\n { [_hC]: \"-\", [_h]: [\"POST\", \"/?metadataTable\", 200] }, () => CreateBucketMetadataTableConfigurationRequest$, () => __Unit\n];\nexport var CreateMultipartUpload$ = [9, n0, _CMUr,\n { [_h]: [\"POST\", \"/{Key+}?uploads\", 200] }, () => CreateMultipartUploadRequest$, () => CreateMultipartUploadOutput$\n];\nexport var CreateSession$ = [9, n0, _CSr,\n { [_h]: [\"GET\", \"/?session\", 200] }, () => CreateSessionRequest$, () => CreateSessionOutput$\n];\nexport var DeleteBucket$ = [9, n0, _DB,\n { [_h]: [\"DELETE\", \"/\", 204] }, () => DeleteBucketRequest$, () => __Unit\n];\nexport var DeleteBucketAnalyticsConfiguration$ = [9, n0, _DBAC,\n { [_h]: [\"DELETE\", \"/?analytics\", 204] }, () => DeleteBucketAnalyticsConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketCors$ = [9, n0, _DBC,\n { [_h]: [\"DELETE\", \"/?cors\", 204] }, () => DeleteBucketCorsRequest$, () => __Unit\n];\nexport var DeleteBucketEncryption$ = [9, n0, _DBE,\n { [_h]: [\"DELETE\", \"/?encryption\", 204] }, () => DeleteBucketEncryptionRequest$, () => __Unit\n];\nexport var DeleteBucketIntelligentTieringConfiguration$ = [9, n0, _DBITC,\n { [_h]: [\"DELETE\", \"/?intelligent-tiering\", 204] }, () => DeleteBucketIntelligentTieringConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketInventoryConfiguration$ = [9, n0, _DBIC,\n { [_h]: [\"DELETE\", \"/?inventory\", 204] }, () => DeleteBucketInventoryConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketLifecycle$ = [9, n0, _DBL,\n { [_h]: [\"DELETE\", \"/?lifecycle\", 204] }, () => DeleteBucketLifecycleRequest$, () => __Unit\n];\nexport var DeleteBucketMetadataConfiguration$ = [9, n0, _DBMC,\n { [_h]: [\"DELETE\", \"/?metadataConfiguration\", 204] }, () => DeleteBucketMetadataConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketMetadataTableConfiguration$ = [9, n0, _DBMTC,\n { [_h]: [\"DELETE\", \"/?metadataTable\", 204] }, () => DeleteBucketMetadataTableConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketMetricsConfiguration$ = [9, n0, _DBMCe,\n { [_h]: [\"DELETE\", \"/?metrics\", 204] }, () => DeleteBucketMetricsConfigurationRequest$, () => __Unit\n];\nexport var DeleteBucketOwnershipControls$ = [9, n0, _DBOC,\n { [_h]: [\"DELETE\", \"/?ownershipControls\", 204] }, () => DeleteBucketOwnershipControlsRequest$, () => __Unit\n];\nexport var DeleteBucketPolicy$ = [9, n0, _DBP,\n { [_h]: [\"DELETE\", \"/?policy\", 204] }, () => DeleteBucketPolicyRequest$, () => __Unit\n];\nexport var DeleteBucketReplication$ = [9, n0, _DBRe,\n { [_h]: [\"DELETE\", \"/?replication\", 204] }, () => DeleteBucketReplicationRequest$, () => __Unit\n];\nexport var DeleteBucketTagging$ = [9, n0, _DBT,\n { [_h]: [\"DELETE\", \"/?tagging\", 204] }, () => DeleteBucketTaggingRequest$, () => __Unit\n];\nexport var DeleteBucketWebsite$ = [9, n0, _DBW,\n { [_h]: [\"DELETE\", \"/?website\", 204] }, () => DeleteBucketWebsiteRequest$, () => __Unit\n];\nexport var DeleteObject$ = [9, n0, _DOel,\n { [_h]: [\"DELETE\", \"/{Key+}?x-id=DeleteObject\", 204] }, () => DeleteObjectRequest$, () => DeleteObjectOutput$\n];\nexport var DeleteObjects$ = [9, n0, _DOele,\n { [_hC]: \"-\", [_h]: [\"POST\", \"/?delete\", 200] }, () => DeleteObjectsRequest$, () => DeleteObjectsOutput$\n];\nexport var DeleteObjectTagging$ = [9, n0, _DOT,\n { [_h]: [\"DELETE\", \"/{Key+}?tagging\", 204] }, () => DeleteObjectTaggingRequest$, () => DeleteObjectTaggingOutput$\n];\nexport var DeletePublicAccessBlock$ = [9, n0, _DPAB,\n { [_h]: [\"DELETE\", \"/?publicAccessBlock\", 204] }, () => DeletePublicAccessBlockRequest$, () => __Unit\n];\nexport var GetBucketAbac$ = [9, n0, _GBA,\n { [_h]: [\"GET\", \"/?abac\", 200] }, () => GetBucketAbacRequest$, () => GetBucketAbacOutput$\n];\nexport var GetBucketAccelerateConfiguration$ = [9, n0, _GBAC,\n { [_h]: [\"GET\", \"/?accelerate\", 200] }, () => GetBucketAccelerateConfigurationRequest$, () => GetBucketAccelerateConfigurationOutput$\n];\nexport var GetBucketAcl$ = [9, n0, _GBAe,\n { [_h]: [\"GET\", \"/?acl\", 200] }, () => GetBucketAclRequest$, () => GetBucketAclOutput$\n];\nexport var GetBucketAnalyticsConfiguration$ = [9, n0, _GBACe,\n { [_h]: [\"GET\", \"/?analytics&x-id=GetBucketAnalyticsConfiguration\", 200] }, () => GetBucketAnalyticsConfigurationRequest$, () => GetBucketAnalyticsConfigurationOutput$\n];\nexport var GetBucketCors$ = [9, n0, _GBC,\n { [_h]: [\"GET\", \"/?cors\", 200] }, () => GetBucketCorsRequest$, () => GetBucketCorsOutput$\n];\nexport var GetBucketEncryption$ = [9, n0, _GBE,\n { [_h]: [\"GET\", \"/?encryption\", 200] }, () => GetBucketEncryptionRequest$, () => GetBucketEncryptionOutput$\n];\nexport var GetBucketIntelligentTieringConfiguration$ = [9, n0, _GBITC,\n { [_h]: [\"GET\", \"/?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration\", 200] }, () => GetBucketIntelligentTieringConfigurationRequest$, () => GetBucketIntelligentTieringConfigurationOutput$\n];\nexport var GetBucketInventoryConfiguration$ = [9, n0, _GBIC,\n { [_h]: [\"GET\", \"/?inventory&x-id=GetBucketInventoryConfiguration\", 200] }, () => GetBucketInventoryConfigurationRequest$, () => GetBucketInventoryConfigurationOutput$\n];\nexport var GetBucketLifecycleConfiguration$ = [9, n0, _GBLC,\n { [_h]: [\"GET\", \"/?lifecycle\", 200] }, () => GetBucketLifecycleConfigurationRequest$, () => GetBucketLifecycleConfigurationOutput$\n];\nexport var GetBucketLocation$ = [9, n0, _GBL,\n { [_h]: [\"GET\", \"/?location\", 200] }, () => GetBucketLocationRequest$, () => GetBucketLocationOutput$\n];\nexport var GetBucketLogging$ = [9, n0, _GBLe,\n { [_h]: [\"GET\", \"/?logging\", 200] }, () => GetBucketLoggingRequest$, () => GetBucketLoggingOutput$\n];\nexport var GetBucketMetadataConfiguration$ = [9, n0, _GBMC,\n { [_h]: [\"GET\", \"/?metadataConfiguration\", 200] }, () => GetBucketMetadataConfigurationRequest$, () => GetBucketMetadataConfigurationOutput$\n];\nexport var GetBucketMetadataTableConfiguration$ = [9, n0, _GBMTC,\n { [_h]: [\"GET\", \"/?metadataTable\", 200] }, () => GetBucketMetadataTableConfigurationRequest$, () => GetBucketMetadataTableConfigurationOutput$\n];\nexport var GetBucketMetricsConfiguration$ = [9, n0, _GBMCe,\n { [_h]: [\"GET\", \"/?metrics&x-id=GetBucketMetricsConfiguration\", 200] }, () => GetBucketMetricsConfigurationRequest$, () => GetBucketMetricsConfigurationOutput$\n];\nexport var GetBucketNotificationConfiguration$ = [9, n0, _GBNC,\n { [_h]: [\"GET\", \"/?notification\", 200] }, () => GetBucketNotificationConfigurationRequest$, () => NotificationConfiguration$\n];\nexport var GetBucketOwnershipControls$ = [9, n0, _GBOC,\n { [_h]: [\"GET\", \"/?ownershipControls\", 200] }, () => GetBucketOwnershipControlsRequest$, () => GetBucketOwnershipControlsOutput$\n];\nexport var GetBucketPolicy$ = [9, n0, _GBP,\n { [_h]: [\"GET\", \"/?policy\", 200] }, () => GetBucketPolicyRequest$, () => GetBucketPolicyOutput$\n];\nexport var GetBucketPolicyStatus$ = [9, n0, _GBPS,\n { [_h]: [\"GET\", \"/?policyStatus\", 200] }, () => GetBucketPolicyStatusRequest$, () => GetBucketPolicyStatusOutput$\n];\nexport var GetBucketReplication$ = [9, n0, _GBR,\n { [_h]: [\"GET\", \"/?replication\", 200] }, () => GetBucketReplicationRequest$, () => GetBucketReplicationOutput$\n];\nexport var GetBucketRequestPayment$ = [9, n0, _GBRP,\n { [_h]: [\"GET\", \"/?requestPayment\", 200] }, () => GetBucketRequestPaymentRequest$, () => GetBucketRequestPaymentOutput$\n];\nexport var GetBucketTagging$ = [9, n0, _GBT,\n { [_h]: [\"GET\", \"/?tagging\", 200] }, () => GetBucketTaggingRequest$, () => GetBucketTaggingOutput$\n];\nexport var GetBucketVersioning$ = [9, n0, _GBV,\n { [_h]: [\"GET\", \"/?versioning\", 200] }, () => GetBucketVersioningRequest$, () => GetBucketVersioningOutput$\n];\nexport var GetBucketWebsite$ = [9, n0, _GBW,\n { [_h]: [\"GET\", \"/?website\", 200] }, () => GetBucketWebsiteRequest$, () => GetBucketWebsiteOutput$\n];\nexport var GetObject$ = [9, n0, _GO,\n { [_hC]: \"-\", [_h]: [\"GET\", \"/{Key+}?x-id=GetObject\", 200] }, () => GetObjectRequest$, () => GetObjectOutput$\n];\nexport var GetObjectAcl$ = [9, n0, _GOA,\n { [_h]: [\"GET\", \"/{Key+}?acl\", 200] }, () => GetObjectAclRequest$, () => GetObjectAclOutput$\n];\nexport var GetObjectAttributes$ = [9, n0, _GOAe,\n { [_h]: [\"GET\", \"/{Key+}?attributes\", 200] }, () => GetObjectAttributesRequest$, () => GetObjectAttributesOutput$\n];\nexport var GetObjectLegalHold$ = [9, n0, _GOLH,\n { [_h]: [\"GET\", \"/{Key+}?legal-hold\", 200] }, () => GetObjectLegalHoldRequest$, () => GetObjectLegalHoldOutput$\n];\nexport var GetObjectLockConfiguration$ = [9, n0, _GOLC,\n { [_h]: [\"GET\", \"/?object-lock\", 200] }, () => GetObjectLockConfigurationRequest$, () => GetObjectLockConfigurationOutput$\n];\nexport var GetObjectRetention$ = [9, n0, _GORe,\n { [_h]: [\"GET\", \"/{Key+}?retention\", 200] }, () => GetObjectRetentionRequest$, () => GetObjectRetentionOutput$\n];\nexport var GetObjectTagging$ = [9, n0, _GOT,\n { [_h]: [\"GET\", \"/{Key+}?tagging\", 200] }, () => GetObjectTaggingRequest$, () => GetObjectTaggingOutput$\n];\nexport var GetObjectTorrent$ = [9, n0, _GOTe,\n { [_h]: [\"GET\", \"/{Key+}?torrent\", 200] }, () => GetObjectTorrentRequest$, () => GetObjectTorrentOutput$\n];\nexport var GetPublicAccessBlock$ = [9, n0, _GPAB,\n { [_h]: [\"GET\", \"/?publicAccessBlock\", 200] }, () => GetPublicAccessBlockRequest$, () => GetPublicAccessBlockOutput$\n];\nexport var HeadBucket$ = [9, n0, _HB,\n { [_h]: [\"HEAD\", \"/\", 200] }, () => HeadBucketRequest$, () => HeadBucketOutput$\n];\nexport var HeadObject$ = [9, n0, _HO,\n { [_h]: [\"HEAD\", \"/{Key+}\", 200] }, () => HeadObjectRequest$, () => HeadObjectOutput$\n];\nexport var ListBucketAnalyticsConfigurations$ = [9, n0, _LBAC,\n { [_h]: [\"GET\", \"/?analytics&x-id=ListBucketAnalyticsConfigurations\", 200] }, () => ListBucketAnalyticsConfigurationsRequest$, () => ListBucketAnalyticsConfigurationsOutput$\n];\nexport var ListBucketIntelligentTieringConfigurations$ = [9, n0, _LBITC,\n { [_h]: [\"GET\", \"/?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations\", 200] }, () => ListBucketIntelligentTieringConfigurationsRequest$, () => ListBucketIntelligentTieringConfigurationsOutput$\n];\nexport var ListBucketInventoryConfigurations$ = [9, n0, _LBIC,\n { [_h]: [\"GET\", \"/?inventory&x-id=ListBucketInventoryConfigurations\", 200] }, () => ListBucketInventoryConfigurationsRequest$, () => ListBucketInventoryConfigurationsOutput$\n];\nexport var ListBucketMetricsConfigurations$ = [9, n0, _LBMC,\n { [_h]: [\"GET\", \"/?metrics&x-id=ListBucketMetricsConfigurations\", 200] }, () => ListBucketMetricsConfigurationsRequest$, () => ListBucketMetricsConfigurationsOutput$\n];\nexport var ListBuckets$ = [9, n0, _LB,\n { [_h]: [\"GET\", \"/?x-id=ListBuckets\", 200] }, () => ListBucketsRequest$, () => ListBucketsOutput$\n];\nexport var ListDirectoryBuckets$ = [9, n0, _LDB,\n { [_h]: [\"GET\", \"/?x-id=ListDirectoryBuckets\", 200] }, () => ListDirectoryBucketsRequest$, () => ListDirectoryBucketsOutput$\n];\nexport var ListMultipartUploads$ = [9, n0, _LMU,\n { [_h]: [\"GET\", \"/?uploads\", 200] }, () => ListMultipartUploadsRequest$, () => ListMultipartUploadsOutput$\n];\nexport var ListObjects$ = [9, n0, _LO,\n { [_h]: [\"GET\", \"/\", 200] }, () => ListObjectsRequest$, () => ListObjectsOutput$\n];\nexport var ListObjectsV2$ = [9, n0, _LOV,\n { [_h]: [\"GET\", \"/?list-type=2\", 200] }, () => ListObjectsV2Request$, () => ListObjectsV2Output$\n];\nexport var ListObjectVersions$ = [9, n0, _LOVi,\n { [_h]: [\"GET\", \"/?versions\", 200] }, () => ListObjectVersionsRequest$, () => ListObjectVersionsOutput$\n];\nexport var ListParts$ = [9, n0, _LP,\n { [_h]: [\"GET\", \"/{Key+}?x-id=ListParts\", 200] }, () => ListPartsRequest$, () => ListPartsOutput$\n];\nexport var PutBucketAbac$ = [9, n0, _PBA,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?abac\", 200] }, () => PutBucketAbacRequest$, () => __Unit\n];\nexport var PutBucketAccelerateConfiguration$ = [9, n0, _PBAC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?accelerate\", 200] }, () => PutBucketAccelerateConfigurationRequest$, () => __Unit\n];\nexport var PutBucketAcl$ = [9, n0, _PBAu,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?acl\", 200] }, () => PutBucketAclRequest$, () => __Unit\n];\nexport var PutBucketAnalyticsConfiguration$ = [9, n0, _PBACu,\n { [_h]: [\"PUT\", \"/?analytics\", 200] }, () => PutBucketAnalyticsConfigurationRequest$, () => __Unit\n];\nexport var PutBucketCors$ = [9, n0, _PBC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?cors\", 200] }, () => PutBucketCorsRequest$, () => __Unit\n];\nexport var PutBucketEncryption$ = [9, n0, _PBE,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?encryption\", 200] }, () => PutBucketEncryptionRequest$, () => __Unit\n];\nexport var PutBucketIntelligentTieringConfiguration$ = [9, n0, _PBITC,\n { [_h]: [\"PUT\", \"/?intelligent-tiering\", 200] }, () => PutBucketIntelligentTieringConfigurationRequest$, () => __Unit\n];\nexport var PutBucketInventoryConfiguration$ = [9, n0, _PBIC,\n { [_h]: [\"PUT\", \"/?inventory\", 200] }, () => PutBucketInventoryConfigurationRequest$, () => __Unit\n];\nexport var PutBucketLifecycleConfiguration$ = [9, n0, _PBLC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?lifecycle\", 200] }, () => PutBucketLifecycleConfigurationRequest$, () => PutBucketLifecycleConfigurationOutput$\n];\nexport var PutBucketLogging$ = [9, n0, _PBL,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?logging\", 200] }, () => PutBucketLoggingRequest$, () => __Unit\n];\nexport var PutBucketMetricsConfiguration$ = [9, n0, _PBMC,\n { [_h]: [\"PUT\", \"/?metrics\", 200] }, () => PutBucketMetricsConfigurationRequest$, () => __Unit\n];\nexport var PutBucketNotificationConfiguration$ = [9, n0, _PBNC,\n { [_h]: [\"PUT\", \"/?notification\", 200] }, () => PutBucketNotificationConfigurationRequest$, () => __Unit\n];\nexport var PutBucketOwnershipControls$ = [9, n0, _PBOC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?ownershipControls\", 200] }, () => PutBucketOwnershipControlsRequest$, () => __Unit\n];\nexport var PutBucketPolicy$ = [9, n0, _PBP,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?policy\", 200] }, () => PutBucketPolicyRequest$, () => __Unit\n];\nexport var PutBucketReplication$ = [9, n0, _PBR,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?replication\", 200] }, () => PutBucketReplicationRequest$, () => __Unit\n];\nexport var PutBucketRequestPayment$ = [9, n0, _PBRP,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?requestPayment\", 200] }, () => PutBucketRequestPaymentRequest$, () => __Unit\n];\nexport var PutBucketTagging$ = [9, n0, _PBT,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?tagging\", 200] }, () => PutBucketTaggingRequest$, () => __Unit\n];\nexport var PutBucketVersioning$ = [9, n0, _PBV,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?versioning\", 200] }, () => PutBucketVersioningRequest$, () => __Unit\n];\nexport var PutBucketWebsite$ = [9, n0, _PBW,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?website\", 200] }, () => PutBucketWebsiteRequest$, () => __Unit\n];\nexport var PutObject$ = [9, n0, _PO,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?x-id=PutObject\", 200] }, () => PutObjectRequest$, () => PutObjectOutput$\n];\nexport var PutObjectAcl$ = [9, n0, _POA,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?acl\", 200] }, () => PutObjectAclRequest$, () => PutObjectAclOutput$\n];\nexport var PutObjectLegalHold$ = [9, n0, _POLH,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?legal-hold\", 200] }, () => PutObjectLegalHoldRequest$, () => PutObjectLegalHoldOutput$\n];\nexport var PutObjectLockConfiguration$ = [9, n0, _POLC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?object-lock\", 200] }, () => PutObjectLockConfigurationRequest$, () => PutObjectLockConfigurationOutput$\n];\nexport var PutObjectRetention$ = [9, n0, _PORu,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?retention\", 200] }, () => PutObjectRetentionRequest$, () => PutObjectRetentionOutput$\n];\nexport var PutObjectTagging$ = [9, n0, _POT,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?tagging\", 200] }, () => PutObjectTaggingRequest$, () => PutObjectTaggingOutput$\n];\nexport var PutPublicAccessBlock$ = [9, n0, _PPAB,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?publicAccessBlock\", 200] }, () => PutPublicAccessBlockRequest$, () => __Unit\n];\nexport var RenameObject$ = [9, n0, _RO,\n { [_h]: [\"PUT\", \"/{Key+}?renameObject\", 200] }, () => RenameObjectRequest$, () => RenameObjectOutput$\n];\nexport var RestoreObject$ = [9, n0, _ROe,\n { [_hC]: \"-\", [_h]: [\"POST\", \"/{Key+}?restore\", 200] }, () => RestoreObjectRequest$, () => RestoreObjectOutput$\n];\nexport var SelectObjectContent$ = [9, n0, _SOC,\n { [_h]: [\"POST\", \"/{Key+}?select&select-type=2\", 200] }, () => SelectObjectContentRequest$, () => SelectObjectContentOutput$\n];\nexport var UpdateBucketMetadataInventoryTableConfiguration$ = [9, n0, _UBMITC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?metadataInventoryTable\", 200] }, () => UpdateBucketMetadataInventoryTableConfigurationRequest$, () => __Unit\n];\nexport var UpdateBucketMetadataJournalTableConfiguration$ = [9, n0, _UBMJTC,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/?metadataJournalTable\", 200] }, () => UpdateBucketMetadataJournalTableConfigurationRequest$, () => __Unit\n];\nexport var UpdateObjectEncryption$ = [9, n0, _UOE,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?encryption\", 200] }, () => UpdateObjectEncryptionRequest$, () => UpdateObjectEncryptionResponse$\n];\nexport var UploadPart$ = [9, n0, _UP,\n { [_hC]: \"-\", [_h]: [\"PUT\", \"/{Key+}?x-id=UploadPart\", 200] }, () => UploadPartRequest$, () => UploadPartOutput$\n];\nexport var UploadPartCopy$ = [9, n0, _UPC,\n { [_h]: [\"PUT\", \"/{Key+}?x-id=UploadPartCopy\", 200] }, () => UploadPartCopyRequest$, () => UploadPartCopyOutput$\n];\nexport var WriteGetObjectResponse$ = [9, n0, _WGOR,\n { [_en]: [\"{RequestRoute}.\"], [_h]: [\"POST\", \"/WriteGetObjectResponse\", 200] }, () => WriteGetObjectResponseRequest$, () => __Unit\n];\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CreateSession$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CreateSessionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n DisableS3ExpressSessionAuth: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"CreateSession\", {})\n .n(\"S3Client\", \"CreateSessionCommand\")\n .sc(CreateSession$)\n .build() {\n}\n", "{\n \"name\": \"@aws-sdk/client-s3\",\n \"description\": \"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native\",\n \"version\": \"3.1009.0\",\n \"scripts\": {\n \"build\": \"concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs\",\n \"build:cjs\": \"node ../../scripts/compilation/inline client-s3\",\n \"build:es\": \"tsc -p tsconfig.es.json\",\n \"build:include:deps\": \"yarn g:turbo run build -F=\\\"$npm_package_name\\\"\",\n \"build:types\": \"tsc -p tsconfig.types.json\",\n \"build:types:downlevel\": \"downlevel-dts dist-types dist-types/ts3.4\",\n \"clean\": \"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo\",\n \"extract:docs\": \"api-extractor run --local\",\n \"generate:client\": \"node ../../scripts/generate-clients/single-service --solo s3\",\n \"test\": \"yarn g:vitest run\",\n \"test:browser\": \"node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.mts\",\n \"test:browser:watch\": \"node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.mts\",\n \"test:e2e\": \"yarn g:vitest run -c vitest.config.e2e.mts && yarn test:browser\",\n \"test:e2e:watch\": \"yarn g:vitest watch -c vitest.config.e2e.mts\",\n \"test:index\": \"tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs\",\n \"test:integration\": \"yarn g:vitest run -c vitest.config.integ.mts\",\n \"test:integration:watch\": \"yarn g:vitest watch -c vitest.config.integ.mts\",\n \"test:watch\": \"yarn g:vitest watch\"\n },\n \"main\": \"./dist-cjs/index.js\",\n \"types\": \"./dist-types/index.d.ts\",\n \"module\": \"./dist-es/index.js\",\n \"sideEffects\": false,\n \"dependencies\": {\n \"@aws-crypto/sha1-browser\": \"5.2.0\",\n \"@aws-crypto/sha256-browser\": \"5.2.0\",\n \"@aws-crypto/sha256-js\": \"5.2.0\",\n \"@aws-sdk/core\": \"^3.973.20\",\n \"@aws-sdk/credential-provider-node\": \"^3.972.21\",\n \"@aws-sdk/middleware-bucket-endpoint\": \"^3.972.8\",\n \"@aws-sdk/middleware-expect-continue\": \"^3.972.8\",\n \"@aws-sdk/middleware-flexible-checksums\": \"^3.973.6\",\n \"@aws-sdk/middleware-host-header\": \"^3.972.8\",\n \"@aws-sdk/middleware-location-constraint\": \"^3.972.8\",\n \"@aws-sdk/middleware-logger\": \"^3.972.8\",\n \"@aws-sdk/middleware-recursion-detection\": \"^3.972.8\",\n \"@aws-sdk/middleware-sdk-s3\": \"^3.972.20\",\n \"@aws-sdk/middleware-ssec\": \"^3.972.8\",\n \"@aws-sdk/middleware-user-agent\": \"^3.972.21\",\n \"@aws-sdk/region-config-resolver\": \"^3.972.8\",\n \"@aws-sdk/signature-v4-multi-region\": \"^3.996.8\",\n \"@aws-sdk/types\": \"^3.973.6\",\n \"@aws-sdk/util-endpoints\": \"^3.996.5\",\n \"@aws-sdk/util-user-agent-browser\": \"^3.972.8\",\n \"@aws-sdk/util-user-agent-node\": \"^3.973.7\",\n \"@smithy/config-resolver\": \"^4.4.11\",\n \"@smithy/core\": \"^3.23.11\",\n \"@smithy/eventstream-serde-browser\": \"^4.2.12\",\n \"@smithy/eventstream-serde-config-resolver\": \"^4.3.12\",\n \"@smithy/eventstream-serde-node\": \"^4.2.12\",\n \"@smithy/fetch-http-handler\": \"^5.3.15\",\n \"@smithy/hash-blob-browser\": \"^4.2.13\",\n \"@smithy/hash-node\": \"^4.2.12\",\n \"@smithy/hash-stream-node\": \"^4.2.12\",\n \"@smithy/invalid-dependency\": \"^4.2.12\",\n \"@smithy/md5-js\": \"^4.2.12\",\n \"@smithy/middleware-content-length\": \"^4.2.12\",\n \"@smithy/middleware-endpoint\": \"^4.4.25\",\n \"@smithy/middleware-retry\": \"^4.4.42\",\n \"@smithy/middleware-serde\": \"^4.2.14\",\n \"@smithy/middleware-stack\": \"^4.2.12\",\n \"@smithy/node-config-provider\": \"^4.3.12\",\n \"@smithy/node-http-handler\": \"^4.4.16\",\n \"@smithy/protocol-http\": \"^5.3.12\",\n \"@smithy/smithy-client\": \"^4.12.5\",\n \"@smithy/types\": \"^4.13.1\",\n \"@smithy/url-parser\": \"^4.2.12\",\n \"@smithy/util-base64\": \"^4.3.2\",\n \"@smithy/util-body-length-browser\": \"^4.2.2\",\n \"@smithy/util-body-length-node\": \"^4.2.3\",\n \"@smithy/util-defaults-mode-browser\": \"^4.3.41\",\n \"@smithy/util-defaults-mode-node\": \"^4.2.44\",\n \"@smithy/util-endpoints\": \"^3.3.3\",\n \"@smithy/util-middleware\": \"^4.2.12\",\n \"@smithy/util-retry\": \"^4.2.12\",\n \"@smithy/util-stream\": \"^4.5.19\",\n \"@smithy/util-utf8\": \"^4.2.2\",\n \"@smithy/util-waiter\": \"^4.2.13\",\n \"tslib\": \"^2.6.2\"\n },\n \"devDependencies\": {\n \"@aws-sdk/signature-v4-crt\": \"3.1009.0\",\n \"@smithy/snapshot-testing\": \"^2.0.2\",\n \"@tsconfig/node20\": \"20.1.8\",\n \"@types/node\": \"^20.14.8\",\n \"concurrently\": \"7.0.0\",\n \"downlevel-dts\": \"0.10.1\",\n \"premove\": \"4.0.0\",\n \"typescript\": \"~5.8.3\",\n \"vitest\": \"^4.0.17\"\n },\n \"engines\": {\n \"node\": \">=20.0.0\"\n },\n \"typesVersions\": {\n \"<4.5\": {\n \"dist-types/*\": [\n \"dist-types/ts3.4/*\"\n ]\n }\n },\n \"files\": [\n \"dist-*/**\"\n ],\n \"author\": {\n \"name\": \"AWS SDK for JavaScript Team\",\n \"url\": \"https://aws.amazon.com/javascript/\"\n },\n \"license\": \"Apache-2.0\",\n \"browser\": {\n \"./dist-es/runtimeConfig\": \"./dist-es/runtimeConfig.browser\"\n },\n \"react-native\": {\n \"./dist-es/runtimeConfig\": \"./dist-es/runtimeConfig.native\"\n },\n \"homepage\": \"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/aws/aws-sdk-js-v3.git\",\n \"directory\": \"clients/client-s3\"\n }\n}\n", "export const fromUtf8 = (input) => new TextEncoder().encode(input);\n", "import { fromUtf8 } from \"./fromUtf8\";\nexport const toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n", "export const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return new TextDecoder(\"utf-8\").decode(input);\n};\n", "export * from \"./fromUtf8\";\nexport * from \"./toUint8Array\";\nexport * from \"./toUtf8\";\n", "import { SourceData } from \"@aws-sdk/types\";\n\nexport function isEmptyData(data: SourceData): boolean {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n\n return data.byteLength === 0;\n}\n", "export const SHA_1_HASH: { name: \"SHA-1\" } = { name: \"SHA-1\" };\n\nexport const SHA_1_HMAC_ALGO: { name: \"HMAC\"; hash: { name: \"SHA-1\" } } = {\n name: \"HMAC\",\n hash: SHA_1_HASH,\n};\n\nexport const EMPTY_DATA_SHA_1 = new Uint8Array([\n 218,\n 57,\n 163,\n 238,\n 94,\n 107,\n 75,\n 13,\n 50,\n 85,\n 191,\n 239,\n 149,\n 96,\n 24,\n 144,\n 175,\n 216,\n 7,\n 9,\n]);\n", "const fallbackWindow = {};\nexport function locateWindow() {\n if (typeof window !== \"undefined\") {\n return window;\n }\n else if (typeof self !== \"undefined\") {\n return self;\n }\n return fallbackWindow;\n}\n", "import { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { fromUtf8 } from \"@smithy/util-utf8\";\nimport { isEmptyData } from \"./isEmptyData\";\nimport { EMPTY_DATA_SHA_1, SHA_1_HASH, SHA_1_HMAC_ALGO } from \"./constants\";\nimport { locateWindow } from \"@aws-sdk/util-locate-window\";\n\nexport class Sha1 implements Checksum {\n private readonly key: Promise | undefined;\n private toHash: Uint8Array = new Uint8Array(0);\n\n constructor(secret?: SourceData) {\n if (secret !== void 0) {\n this.key = new Promise((resolve, reject) => {\n locateWindow()\n .crypto.subtle.importKey(\n \"raw\",\n convertToBuffer(secret),\n SHA_1_HMAC_ALGO,\n false,\n [\"sign\"]\n )\n .then(resolve, reject);\n });\n this.key.catch(() => {});\n }\n }\n\n update(data: SourceData): void {\n if (isEmptyData(data)) {\n return;\n }\n\n const update = convertToBuffer(data);\n const typedArray = new Uint8Array(\n this.toHash.byteLength + update.byteLength\n );\n typedArray.set(this.toHash, 0);\n typedArray.set(update, this.toHash.byteLength);\n this.toHash = typedArray;\n }\n\n digest(): Promise {\n if (this.key) {\n return this.key.then((key) =>\n locateWindow()\n .crypto.subtle.sign(SHA_1_HMAC_ALGO, key, this.toHash)\n .then((data) => new Uint8Array(data))\n );\n }\n\n if (isEmptyData(this.toHash)) {\n return Promise.resolve(EMPTY_DATA_SHA_1);\n }\n\n return Promise.resolve()\n .then(() => locateWindow().crypto.subtle.digest(SHA_1_HASH, this.toHash))\n .then((data) => Promise.resolve(new Uint8Array(data)));\n }\n\n reset(): void {\n this.toHash = new Uint8Array(0);\n }\n}\n\nfunction convertToBuffer(data: SourceData): Uint8Array {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(\n data.buffer,\n data.byteOffset,\n data.byteLength / Uint8Array.BYTES_PER_ELEMENT\n );\n }\n\n return new Uint8Array(data);\n}\n", "type SubtleCryptoMethod =\n | \"decrypt\"\n | \"digest\"\n | \"encrypt\"\n | \"exportKey\"\n | \"generateKey\"\n | \"importKey\"\n | \"sign\"\n | \"verify\";\n\nconst subtleCryptoMethods: Array = [\n \"decrypt\",\n \"digest\",\n \"encrypt\",\n \"exportKey\",\n \"generateKey\",\n \"importKey\",\n \"sign\",\n \"verify\"\n];\n\nexport function supportsWebCrypto(window: Window): boolean {\n if (\n supportsSecureRandom(window) &&\n typeof window.crypto.subtle === \"object\"\n ) {\n const { subtle } = window.crypto;\n\n return supportsSubtleCrypto(subtle);\n }\n\n return false;\n}\n\nexport function supportsSecureRandom(window: Window): boolean {\n if (typeof window === \"object\" && typeof window.crypto === \"object\") {\n const { getRandomValues } = window.crypto;\n\n return typeof getRandomValues === \"function\";\n }\n\n return false;\n}\n\nexport function supportsSubtleCrypto(subtle: SubtleCrypto) {\n return (\n subtle &&\n subtleCryptoMethods.every(\n methodName => typeof subtle[methodName] === \"function\"\n )\n );\n}\n\nexport async function supportsZeroByteGCM(subtle: SubtleCrypto) {\n if (!supportsSubtleCrypto(subtle)) return false;\n try {\n const key = await subtle.generateKey(\n { name: \"AES-GCM\", length: 128 },\n false,\n [\"encrypt\"]\n );\n const zeroByteAuthTag = await subtle.encrypt(\n {\n name: \"AES-GCM\",\n iv: new Uint8Array(Array(12)),\n additionalData: new Uint8Array(Array(16)),\n tagLength: 128\n },\n key,\n new Uint8Array(0)\n );\n return zeroByteAuthTag.byteLength === 16;\n } catch {\n return false;\n }\n}\n", "export * from \"./supportsWebCrypto\";\n", "import { Sha1 as WebCryptoSha1 } from \"./webCryptoSha1\";\nimport { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { supportsWebCrypto } from \"@aws-crypto/supports-web-crypto\";\nimport { locateWindow } from \"@aws-sdk/util-locate-window\";\nimport { convertToBuffer } from \"@aws-crypto/util\";\n\nexport class Sha1 implements Checksum {\n private hash: Checksum;\n\n constructor(secret?: SourceData) {\n if (supportsWebCrypto(locateWindow())) {\n this.hash = new WebCryptoSha1(secret);\n } else {\n throw new Error(\"SHA1 not supported\");\n }\n }\n\n update(data: SourceData, encoding?: \"utf8\" | \"ascii\" | \"latin1\"): void {\n this.hash.update(convertToBuffer(data));\n }\n\n digest(): Promise {\n return this.hash.digest();\n }\n\n reset(): void {\n this.hash.reset();\n }\n}\n", "export * from \"./crossPlatformSha1\";\nexport { Sha1 as WebCryptoSha1 } from \"./webCryptoSha1\";\n", "export const SHA_256_HASH: { name: \"SHA-256\" } = { name: \"SHA-256\" };\n\nexport const SHA_256_HMAC_ALGO: { name: \"HMAC\"; hash: { name: \"SHA-256\" } } = {\n name: \"HMAC\",\n hash: SHA_256_HASH\n};\n\nexport const EMPTY_DATA_SHA_256 = new Uint8Array([\n 227,\n 176,\n 196,\n 66,\n 152,\n 252,\n 28,\n 20,\n 154,\n 251,\n 244,\n 200,\n 153,\n 111,\n 185,\n 36,\n 39,\n 174,\n 65,\n 228,\n 100,\n 155,\n 147,\n 76,\n 164,\n 149,\n 153,\n 27,\n 120,\n 82,\n 184,\n 85\n]);\n", "import { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { isEmptyData, convertToBuffer } from \"@aws-crypto/util\";\nimport {\n EMPTY_DATA_SHA_256,\n SHA_256_HASH,\n SHA_256_HMAC_ALGO,\n} from \"./constants\";\nimport { locateWindow } from \"@aws-sdk/util-locate-window\";\n\nexport class Sha256 implements Checksum {\n private readonly secret?: SourceData;\n private key: Promise | undefined;\n private toHash: Uint8Array = new Uint8Array(0);\n\n constructor(secret?: SourceData) {\n this.secret = secret;\n this.reset();\n }\n\n update(data: SourceData): void {\n if (isEmptyData(data)) {\n return;\n }\n\n const update = convertToBuffer(data);\n const typedArray = new Uint8Array(\n this.toHash.byteLength + update.byteLength\n );\n typedArray.set(this.toHash, 0);\n typedArray.set(update, this.toHash.byteLength);\n this.toHash = typedArray;\n }\n\n digest(): Promise {\n if (this.key) {\n return this.key.then((key) =>\n locateWindow()\n .crypto.subtle.sign(SHA_256_HMAC_ALGO, key, this.toHash)\n .then((data) => new Uint8Array(data))\n );\n }\n\n if (isEmptyData(this.toHash)) {\n return Promise.resolve(EMPTY_DATA_SHA_256);\n }\n\n return Promise.resolve()\n .then(() =>\n locateWindow().crypto.subtle.digest(SHA_256_HASH, this.toHash)\n )\n .then((data) => Promise.resolve(new Uint8Array(data)));\n }\n\n reset(): void {\n this.toHash = new Uint8Array(0);\n if (this.secret && this.secret !== void 0) {\n this.key = new Promise((resolve, reject) => {\n locateWindow()\n .crypto.subtle.importKey(\n \"raw\",\n convertToBuffer(this.secret as SourceData),\n SHA_256_HMAC_ALGO,\n false,\n [\"sign\"]\n )\n .then(resolve, reject);\n });\n this.key.catch(() => {});\n }\n }\n}\n", "/**\n * @internal\n */\nexport const BLOCK_SIZE: number = 64;\n\n/**\n * @internal\n */\nexport const DIGEST_LENGTH: number = 32;\n\n/**\n * @internal\n */\nexport const KEY = new Uint32Array([\n 0x428a2f98,\n 0x71374491,\n 0xb5c0fbcf,\n 0xe9b5dba5,\n 0x3956c25b,\n 0x59f111f1,\n 0x923f82a4,\n 0xab1c5ed5,\n 0xd807aa98,\n 0x12835b01,\n 0x243185be,\n 0x550c7dc3,\n 0x72be5d74,\n 0x80deb1fe,\n 0x9bdc06a7,\n 0xc19bf174,\n 0xe49b69c1,\n 0xefbe4786,\n 0x0fc19dc6,\n 0x240ca1cc,\n 0x2de92c6f,\n 0x4a7484aa,\n 0x5cb0a9dc,\n 0x76f988da,\n 0x983e5152,\n 0xa831c66d,\n 0xb00327c8,\n 0xbf597fc7,\n 0xc6e00bf3,\n 0xd5a79147,\n 0x06ca6351,\n 0x14292967,\n 0x27b70a85,\n 0x2e1b2138,\n 0x4d2c6dfc,\n 0x53380d13,\n 0x650a7354,\n 0x766a0abb,\n 0x81c2c92e,\n 0x92722c85,\n 0xa2bfe8a1,\n 0xa81a664b,\n 0xc24b8b70,\n 0xc76c51a3,\n 0xd192e819,\n 0xd6990624,\n 0xf40e3585,\n 0x106aa070,\n 0x19a4c116,\n 0x1e376c08,\n 0x2748774c,\n 0x34b0bcb5,\n 0x391c0cb3,\n 0x4ed8aa4a,\n 0x5b9cca4f,\n 0x682e6ff3,\n 0x748f82ee,\n 0x78a5636f,\n 0x84c87814,\n 0x8cc70208,\n 0x90befffa,\n 0xa4506ceb,\n 0xbef9a3f7,\n 0xc67178f2\n]);\n\n/**\n * @internal\n */\nexport const INIT = [\n 0x6a09e667,\n 0xbb67ae85,\n 0x3c6ef372,\n 0xa54ff53a,\n 0x510e527f,\n 0x9b05688c,\n 0x1f83d9ab,\n 0x5be0cd19\n];\n\n/**\n * @internal\n */\nexport const MAX_HASHABLE_LENGTH = 2 ** 53 - 1;\n", "import {\n BLOCK_SIZE,\n DIGEST_LENGTH,\n INIT,\n KEY,\n MAX_HASHABLE_LENGTH\n} from \"./constants\";\n\n/**\n * @internal\n */\nexport class RawSha256 {\n private state: Int32Array = Int32Array.from(INIT);\n private temp: Int32Array = new Int32Array(64);\n private buffer: Uint8Array = new Uint8Array(64);\n private bufferLength: number = 0;\n private bytesHashed: number = 0;\n\n /**\n * @internal\n */\n finished: boolean = false;\n\n update(data: Uint8Array): void {\n if (this.finished) {\n throw new Error(\"Attempted to update an already finished hash.\");\n }\n\n let position = 0;\n let { byteLength } = data;\n this.bytesHashed += byteLength;\n\n if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) {\n throw new Error(\"Cannot hash more than 2^53 - 1 bits\");\n }\n\n while (byteLength > 0) {\n this.buffer[this.bufferLength++] = data[position++];\n byteLength--;\n\n if (this.bufferLength === BLOCK_SIZE) {\n this.hashBuffer();\n this.bufferLength = 0;\n }\n }\n }\n\n digest(): Uint8Array {\n if (!this.finished) {\n const bitsHashed = this.bytesHashed * 8;\n const bufferView = new DataView(\n this.buffer.buffer,\n this.buffer.byteOffset,\n this.buffer.byteLength\n );\n\n const undecoratedLength = this.bufferLength;\n bufferView.setUint8(this.bufferLength++, 0x80);\n\n // Ensure the final block has enough room for the hashed length\n if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) {\n for (let i = this.bufferLength; i < BLOCK_SIZE; i++) {\n bufferView.setUint8(i, 0);\n }\n this.hashBuffer();\n this.bufferLength = 0;\n }\n\n for (let i = this.bufferLength; i < BLOCK_SIZE - 8; i++) {\n bufferView.setUint8(i, 0);\n }\n bufferView.setUint32(\n BLOCK_SIZE - 8,\n Math.floor(bitsHashed / 0x100000000),\n true\n );\n bufferView.setUint32(BLOCK_SIZE - 4, bitsHashed);\n\n this.hashBuffer();\n\n this.finished = true;\n }\n\n // The value in state is little-endian rather than big-endian, so flip\n // each word into a new Uint8Array\n const out = new Uint8Array(DIGEST_LENGTH);\n for (let i = 0; i < 8; i++) {\n out[i * 4] = (this.state[i] >>> 24) & 0xff;\n out[i * 4 + 1] = (this.state[i] >>> 16) & 0xff;\n out[i * 4 + 2] = (this.state[i] >>> 8) & 0xff;\n out[i * 4 + 3] = (this.state[i] >>> 0) & 0xff;\n }\n\n return out;\n }\n\n private hashBuffer(): void {\n const { buffer, state } = this;\n\n let state0 = state[0],\n state1 = state[1],\n state2 = state[2],\n state3 = state[3],\n state4 = state[4],\n state5 = state[5],\n state6 = state[6],\n state7 = state[7];\n\n for (let i = 0; i < BLOCK_SIZE; i++) {\n if (i < 16) {\n this.temp[i] =\n ((buffer[i * 4] & 0xff) << 24) |\n ((buffer[i * 4 + 1] & 0xff) << 16) |\n ((buffer[i * 4 + 2] & 0xff) << 8) |\n (buffer[i * 4 + 3] & 0xff);\n } else {\n let u = this.temp[i - 2];\n const t1 =\n ((u >>> 17) | (u << 15)) ^ ((u >>> 19) | (u << 13)) ^ (u >>> 10);\n\n u = this.temp[i - 15];\n const t2 =\n ((u >>> 7) | (u << 25)) ^ ((u >>> 18) | (u << 14)) ^ (u >>> 3);\n\n this.temp[i] =\n ((t1 + this.temp[i - 7]) | 0) + ((t2 + this.temp[i - 16]) | 0);\n }\n\n const t1 =\n ((((((state4 >>> 6) | (state4 << 26)) ^\n ((state4 >>> 11) | (state4 << 21)) ^\n ((state4 >>> 25) | (state4 << 7))) +\n ((state4 & state5) ^ (~state4 & state6))) |\n 0) +\n ((state7 + ((KEY[i] + this.temp[i]) | 0)) | 0)) |\n 0;\n\n const t2 =\n ((((state0 >>> 2) | (state0 << 30)) ^\n ((state0 >>> 13) | (state0 << 19)) ^\n ((state0 >>> 22) | (state0 << 10))) +\n ((state0 & state1) ^ (state0 & state2) ^ (state1 & state2))) |\n 0;\n\n state7 = state6;\n state6 = state5;\n state5 = state4;\n state4 = (state3 + t1) | 0;\n state3 = state2;\n state2 = state1;\n state1 = state0;\n state0 = (t1 + t2) | 0;\n }\n\n state[0] += state0;\n state[1] += state1;\n state[2] += state2;\n state[3] += state3;\n state[4] += state4;\n state[5] += state5;\n state[6] += state6;\n state[7] += state7;\n }\n}\n", "import { BLOCK_SIZE } from \"./constants\";\nimport { RawSha256 } from \"./RawSha256\";\nimport { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { isEmptyData, convertToBuffer } from \"@aws-crypto/util\";\n\nexport class Sha256 implements Checksum {\n private readonly secret?: SourceData;\n private hash: RawSha256;\n private outer?: RawSha256;\n private error: any;\n\n constructor(secret?: SourceData) {\n this.secret = secret;\n this.hash = new RawSha256();\n this.reset();\n }\n\n update(toHash: SourceData): void {\n if (isEmptyData(toHash) || this.error) {\n return;\n }\n\n try {\n this.hash.update(convertToBuffer(toHash));\n } catch (e) {\n this.error = e;\n }\n }\n\n /* This synchronous method keeps compatibility\n * with the v2 aws-sdk.\n */\n digestSync(): Uint8Array {\n if (this.error) {\n throw this.error;\n }\n\n if (this.outer) {\n if (!this.outer.finished) {\n this.outer.update(this.hash.digest());\n }\n\n return this.outer.digest();\n }\n\n return this.hash.digest();\n }\n\n /* The underlying digest method here is synchronous.\n * To keep the same interface with the other hash functions\n * the default is to expose this as an async method.\n * However, it can sometimes be useful to have a sync method.\n */\n async digest(): Promise {\n return this.digestSync();\n }\n\n reset(): void {\n this.hash = new RawSha256();\n if (this.secret) {\n this.outer = new RawSha256();\n const inner = bufferFromSecret(this.secret);\n const outer = new Uint8Array(BLOCK_SIZE);\n outer.set(inner);\n\n for (let i = 0; i < BLOCK_SIZE; i++) {\n inner[i] ^= 0x36;\n outer[i] ^= 0x5c;\n }\n\n this.hash.update(inner);\n this.outer.update(outer);\n\n // overwrite the copied key in memory\n for (let i = 0; i < inner.byteLength; i++) {\n inner[i] = 0;\n }\n }\n }\n}\n\nfunction bufferFromSecret(secret: SourceData): Uint8Array {\n let input = convertToBuffer(secret);\n\n if (input.byteLength > BLOCK_SIZE) {\n const bufferHash = new RawSha256();\n bufferHash.update(input);\n input = bufferHash.digest();\n }\n\n const buffer = new Uint8Array(BLOCK_SIZE);\n buffer.set(input);\n return buffer;\n}\n", "export * from \"./jsSha256\";\n", "import { Sha256 as WebCryptoSha256 } from \"./webCryptoSha256\";\nimport { Sha256 as JsSha256 } from \"@aws-crypto/sha256-js\";\nimport { Checksum, SourceData } from \"@aws-sdk/types\";\nimport { supportsWebCrypto } from \"@aws-crypto/supports-web-crypto\";\nimport { locateWindow } from \"@aws-sdk/util-locate-window\";\nimport { convertToBuffer } from \"@aws-crypto/util\";\n\nexport class Sha256 implements Checksum {\n private hash: Checksum;\n\n constructor(secret?: SourceData) {\n if (supportsWebCrypto(locateWindow())) {\n this.hash = new WebCryptoSha256(secret);\n } else {\n this.hash = new JsSha256(secret);\n }\n }\n\n update(data: SourceData, encoding?: \"utf8\" | \"ascii\" | \"latin1\"): void {\n this.hash.update(convertToBuffer(data));\n }\n\n digest(): Promise {\n return this.hash.digest();\n }\n\n reset(): void {\n this.hash.reset();\n }\n}\n", "export * from \"./crossPlatformSha256\";\nexport { Sha256 as WebCryptoSha256 } from \"./webCryptoSha256\";\n", "export { createUserAgentStringParsingProvider } from \"./createUserAgentStringParsingProvider\";\nexport const createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => async (config) => {\n const navigator = typeof window !== \"undefined\" ? window.navigator : undefined;\n const uaString = navigator?.userAgent ?? \"\";\n const osName = navigator?.userAgentData?.platform ?? fallback.os(uaString) ?? \"other\";\n const osVersion = undefined;\n const brands = navigator?.userAgentData?.brands ?? [];\n const brand = brands[brands.length - 1];\n const browserName = brand?.brand ?? fallback.browser(uaString) ?? \"unknown\";\n const browserVersion = brand?.version ?? \"unknown\";\n const sections = [\n [\"aws-sdk-js\", clientVersion],\n [\"ua\", \"2.1\"],\n [`os/${osName}`, osVersion],\n [\"lang/js\"],\n [\"md/browser\", `${browserName}_${browserVersion}`],\n ];\n if (serviceId) {\n sections.push([`api/${serviceId}`, clientVersion]);\n }\n const appId = await config?.userAgentAppId?.();\n if (appId) {\n sections.push([`app/${appId}`]);\n }\n return sections;\n};\nexport const fallback = {\n os(ua) {\n if (/iPhone|iPad|iPod/.test(ua))\n return \"iOS\";\n if (/Macintosh|Mac OS X/.test(ua))\n return \"macOS\";\n if (/Windows NT/.test(ua))\n return \"Windows\";\n if (/Android/.test(ua))\n return \"Android\";\n if (/Linux/.test(ua))\n return \"Linux\";\n return undefined;\n },\n browser(ua) {\n if (/EdgiOS|EdgA|Edg\\//.test(ua))\n return \"Microsoft Edge\";\n if (/Firefox\\//.test(ua))\n return \"Firefox\";\n if (/Chrome\\//.test(ua))\n return \"Chrome\";\n if (/Safari\\//.test(ua))\n return \"Safari\";\n return undefined;\n },\n};\nexport const defaultUserAgent = createDefaultUserAgentProvider;\n", "import { toHex } from \"@smithy/util-hex-encoding\";\nexport class Int64 {\n bytes;\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static fromNumber(number) {\n if (number > 9_223_372_036_854_775_807 || number < -9_223_372_036_854_775_808) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new Int64(bytes);\n }\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 0b10000000;\n if (negative) {\n negate(bytes);\n }\n return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n}\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 0xff;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n", "import { fromHex, toHex } from \"@smithy/util-hex-encoding\";\nimport { Int64 } from \"./Int64\";\nexport class HeaderMarshaller {\n toUtf8;\n fromUtf8;\n constructor(toUtf8, fromUtf8) {\n this.toUtf8 = toUtf8;\n this.fromUtf8 = fromUtf8;\n }\n format(headers) {\n const chunks = [];\n for (const headerName of Object.keys(headers)) {\n const bytes = this.fromUtf8(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? 0 : 1]);\n case \"byte\":\n return Uint8Array.from([2, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, 3);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, 4);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = 5;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, 6);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = this.fromUtf8(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, 7);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = 8;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = 9;\n uuidBytes.set(fromHex(header.value.replace(/\\-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n parse(headers) {\n const out = {};\n let position = 0;\n while (position < headers.byteLength) {\n const nameLength = headers.getUint8(position++);\n const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));\n position += nameLength;\n switch (headers.getUint8(position++)) {\n case 0:\n out[name] = {\n type: BOOLEAN_TAG,\n value: true,\n };\n break;\n case 1:\n out[name] = {\n type: BOOLEAN_TAG,\n value: false,\n };\n break;\n case 2:\n out[name] = {\n type: BYTE_TAG,\n value: headers.getInt8(position++),\n };\n break;\n case 3:\n out[name] = {\n type: SHORT_TAG,\n value: headers.getInt16(position, false),\n };\n position += 2;\n break;\n case 4:\n out[name] = {\n type: INT_TAG,\n value: headers.getInt32(position, false),\n };\n position += 4;\n break;\n case 5:\n out[name] = {\n type: LONG_TAG,\n value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)),\n };\n position += 8;\n break;\n case 6:\n const binaryLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: BINARY_TAG,\n value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength),\n };\n position += binaryLength;\n break;\n case 7:\n const stringLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: STRING_TAG,\n value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)),\n };\n position += stringLength;\n break;\n case 8:\n out[name] = {\n type: TIMESTAMP_TAG,\n value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()),\n };\n position += 8;\n break;\n case 9:\n const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);\n position += 16;\n out[name] = {\n type: UUID_TAG,\n value: `${toHex(uuidBytes.subarray(0, 4))}-${toHex(uuidBytes.subarray(4, 6))}-${toHex(uuidBytes.subarray(6, 8))}-${toHex(uuidBytes.subarray(8, 10))}-${toHex(uuidBytes.subarray(10))}`,\n };\n break;\n default:\n throw new Error(`Unrecognized header type tag`);\n }\n }\n return out;\n }\n}\nvar HEADER_VALUE_TYPE;\n(function (HEADER_VALUE_TYPE) {\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolTrue\"] = 0] = \"boolTrue\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolFalse\"] = 1] = \"boolFalse\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byte\"] = 2] = \"byte\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"short\"] = 3] = \"short\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"integer\"] = 4] = \"integer\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"long\"] = 5] = \"long\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byteArray\"] = 6] = \"byteArray\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"string\"] = 7] = \"string\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"timestamp\"] = 8] = \"timestamp\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"uuid\"] = 9] = \"uuid\";\n})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));\nconst BOOLEAN_TAG = \"boolean\";\nconst BYTE_TAG = \"byte\";\nconst SHORT_TAG = \"short\";\nconst INT_TAG = \"integer\";\nconst LONG_TAG = \"long\";\nconst BINARY_TAG = \"binary\";\nconst STRING_TAG = \"string\";\nconst TIMESTAMP_TAG = \"timestamp\";\nconst UUID_TAG = \"uuid\";\nconst UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\n", "import { Crc32 } from \"@aws-crypto/crc32\";\nconst PRELUDE_MEMBER_LENGTH = 4;\nconst PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;\nconst CHECKSUM_LENGTH = 4;\nconst MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;\nexport function splitMessage({ byteLength, byteOffset, buffer }) {\n if (byteLength < MINIMUM_MESSAGE_LENGTH) {\n throw new Error(\"Provided message too short to accommodate event stream message overhead\");\n }\n const view = new DataView(buffer, byteOffset, byteLength);\n const messageLength = view.getUint32(0, false);\n if (byteLength !== messageLength) {\n throw new Error(\"Reported message length does not match received message length\");\n }\n const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);\n const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);\n const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);\n const checksummer = new Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH));\n if (expectedPreludeChecksum !== checksummer.digest()) {\n throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`);\n }\n checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)));\n if (expectedMessageChecksum !== checksummer.digest()) {\n throw new Error(`The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`);\n }\n return {\n headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength),\n body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)),\n };\n}\n", "import { Crc32 } from \"@aws-crypto/crc32\";\nimport { HeaderMarshaller } from \"./HeaderMarshaller\";\nimport { splitMessage } from \"./splitMessage\";\nexport class EventStreamCodec {\n headerMarshaller;\n messageBuffer;\n isEndOfStream;\n constructor(toUtf8, fromUtf8) {\n this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8);\n this.messageBuffer = [];\n this.isEndOfStream = false;\n }\n feed(message) {\n this.messageBuffer.push(this.decode(message));\n }\n endOfStream() {\n this.isEndOfStream = true;\n }\n getMessage() {\n const message = this.messageBuffer.pop();\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessage() {\n return message;\n },\n isEndOfStream() {\n return isEndOfStream;\n },\n };\n }\n getAvailableMessages() {\n const messages = this.messageBuffer;\n this.messageBuffer = [];\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessages() {\n return messages;\n },\n isEndOfStream() {\n return isEndOfStream;\n },\n };\n }\n encode({ headers: rawHeaders, body }) {\n const headers = this.headerMarshaller.format(rawHeaders);\n const length = headers.byteLength + body.byteLength + 16;\n const out = new Uint8Array(length);\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n const checksum = new Crc32();\n view.setUint32(0, length, false);\n view.setUint32(4, headers.byteLength, false);\n view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false);\n out.set(headers, 12);\n out.set(body, headers.byteLength + 12);\n view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false);\n return out;\n }\n decode(message) {\n const { headers, body } = splitMessage(message);\n return { headers: this.headerMarshaller.parse(headers), body };\n }\n formatHeaders(rawHeaders) {\n return this.headerMarshaller.format(rawHeaders);\n }\n}\n", "export {};\n", "export class MessageDecoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const bytes of this.options.inputStream) {\n const decoded = this.options.decoder.decode(bytes);\n yield decoded;\n }\n }\n}\n", "export class MessageEncoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const msg of this.options.messageStream) {\n const encoded = this.options.encoder.encode(msg);\n yield encoded;\n }\n if (this.options.includeEndFrame) {\n yield new Uint8Array(0);\n }\n }\n}\n", "export class SmithyMessageDecoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const message of this.options.messageStream) {\n const deserialized = await this.options.deserializer(message);\n if (deserialized === undefined)\n continue;\n yield deserialized;\n }\n }\n}\n", "export class SmithyMessageEncoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const chunk of this.options.inputStream) {\n const payloadBuf = this.options.serializer(chunk);\n yield payloadBuf;\n }\n }\n}\n", "export * from \"./EventStreamCodec\";\nexport * from \"./HeaderMarshaller\";\nexport * from \"./Int64\";\nexport * from \"./Message\";\nexport * from \"./MessageDecoderStream\";\nexport * from \"./MessageEncoderStream\";\nexport * from \"./SmithyMessageDecoderStream\";\nexport * from \"./SmithyMessageEncoderStream\";\n", "export function getChunkedStream(source) {\n let currentMessageTotalLength = 0;\n let currentMessagePendingLength = 0;\n let currentMessage = null;\n let messageLengthBuffer = null;\n const allocateMessage = (size) => {\n if (typeof size !== \"number\") {\n throw new Error(\"Attempted to allocate an event message where size was not a number: \" + size);\n }\n currentMessageTotalLength = size;\n currentMessagePendingLength = 4;\n currentMessage = new Uint8Array(size);\n const currentMessageView = new DataView(currentMessage.buffer);\n currentMessageView.setUint32(0, size, false);\n };\n const iterator = async function* () {\n const sourceIterator = source[Symbol.asyncIterator]();\n while (true) {\n const { value, done } = await sourceIterator.next();\n if (done) {\n if (!currentMessageTotalLength) {\n return;\n }\n else if (currentMessageTotalLength === currentMessagePendingLength) {\n yield currentMessage;\n }\n else {\n throw new Error(\"Truncated event message received.\");\n }\n return;\n }\n const chunkLength = value.length;\n let currentOffset = 0;\n while (currentOffset < chunkLength) {\n if (!currentMessage) {\n const bytesRemaining = chunkLength - currentOffset;\n if (!messageLengthBuffer) {\n messageLengthBuffer = new Uint8Array(4);\n }\n const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining);\n messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength);\n currentMessagePendingLength += numBytesForTotal;\n currentOffset += numBytesForTotal;\n if (currentMessagePendingLength < 4) {\n break;\n }\n allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false));\n messageLengthBuffer = null;\n }\n const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset);\n currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength);\n currentMessagePendingLength += numBytesToWrite;\n currentOffset += numBytesToWrite;\n if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) {\n yield currentMessage;\n currentMessage = null;\n currentMessageTotalLength = 0;\n currentMessagePendingLength = 0;\n }\n }\n }\n };\n return {\n [Symbol.asyncIterator]: iterator,\n };\n}\n", "export function getUnmarshalledStream(source, options) {\n const messageUnmarshaller = getMessageUnmarshaller(options.deserializer, options.toUtf8);\n return {\n [Symbol.asyncIterator]: async function* () {\n for await (const chunk of source) {\n const message = options.eventStreamCodec.decode(chunk);\n const type = await messageUnmarshaller(message);\n if (type === undefined)\n continue;\n yield type;\n }\n },\n };\n}\nexport function getMessageUnmarshaller(deserializer, toUtf8) {\n return async function (message) {\n const { value: messageType } = message.headers[\":message-type\"];\n if (messageType === \"error\") {\n const unmodeledError = new Error(message.headers[\":error-message\"].value || \"UnknownError\");\n unmodeledError.name = message.headers[\":error-code\"].value;\n throw unmodeledError;\n }\n else if (messageType === \"exception\") {\n const code = message.headers[\":exception-type\"].value;\n const exception = { [code]: message };\n const deserializedException = await deserializer(exception);\n if (deserializedException.$unknown) {\n const error = new Error(toUtf8(message.body));\n error.name = code;\n throw error;\n }\n throw deserializedException[code];\n }\n else if (messageType === \"event\") {\n const event = {\n [message.headers[\":event-type\"].value]: message,\n };\n const deserialized = await deserializer(event);\n if (deserialized.$unknown)\n return;\n return deserialized;\n }\n else {\n throw Error(`Unrecognizable event type: ${message.headers[\":event-type\"].value}`);\n }\n };\n}\n", "import { EventStreamCodec, MessageDecoderStream, MessageEncoderStream, SmithyMessageDecoderStream, SmithyMessageEncoderStream, } from \"@smithy/eventstream-codec\";\nimport { getChunkedStream } from \"./getChunkedStream\";\nimport { getMessageUnmarshaller } from \"./getUnmarshalledStream\";\nexport class EventStreamMarshaller {\n eventStreamCodec;\n utfEncoder;\n constructor({ utf8Encoder, utf8Decoder }) {\n this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder);\n this.utfEncoder = utf8Encoder;\n }\n deserialize(body, deserializer) {\n const inputStream = getChunkedStream(body);\n return new SmithyMessageDecoderStream({\n messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }),\n deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder),\n });\n }\n serialize(inputStream, serializer) {\n return new MessageEncoderStream({\n messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }),\n encoder: this.eventStreamCodec,\n includeEndFrame: true,\n });\n }\n}\n", "import { EventStreamMarshaller } from \"./EventStreamMarshaller\";\nexport const eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);\n", "export * from \"./EventStreamMarshaller\";\nexport * from \"./provider\";\n", "export const readableStreamtoIterable = (readableStream) => ({\n [Symbol.asyncIterator]: async function* () {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done)\n return;\n yield value;\n }\n }\n finally {\n reader.releaseLock();\n }\n },\n});\nexport const iterableToReadableStream = (asyncIterable) => {\n const iterator = asyncIterable[Symbol.asyncIterator]();\n return new ReadableStream({\n async pull(controller) {\n const { done, value } = await iterator.next();\n if (done) {\n return controller.close();\n }\n controller.enqueue(value);\n },\n });\n};\n", "import { EventStreamMarshaller as UniversalEventStreamMarshaller } from \"@smithy/eventstream-serde-universal\";\nimport { iterableToReadableStream, readableStreamtoIterable } from \"./utils\";\nexport class EventStreamMarshaller {\n universalMarshaller;\n constructor({ utf8Encoder, utf8Decoder }) {\n this.universalMarshaller = new UniversalEventStreamMarshaller({\n utf8Decoder,\n utf8Encoder,\n });\n }\n deserialize(body, deserializer) {\n const bodyIterable = isReadableStream(body) ? readableStreamtoIterable(body) : body;\n return this.universalMarshaller.deserialize(bodyIterable, deserializer);\n }\n serialize(input, serializer) {\n const serialziedIterable = this.universalMarshaller.serialize(input, serializer);\n return typeof ReadableStream === \"function\" ? iterableToReadableStream(serialziedIterable) : serialziedIterable;\n }\n}\nconst isReadableStream = (body) => typeof ReadableStream === \"function\" && body instanceof ReadableStream;\n", "import { EventStreamMarshaller } from \"./EventStreamMarshaller\";\nexport const eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);\n", "export * from \"./EventStreamMarshaller\";\nexport * from \"./provider\";\nexport * from \"./utils\";\n", "export async function blobReader(blob, onChunk, chunkSize = 1024 * 1024) {\n const size = blob.size;\n let totalBytesRead = 0;\n while (totalBytesRead < size) {\n const slice = blob.slice(totalBytesRead, Math.min(size, totalBytesRead + chunkSize));\n onChunk(new Uint8Array(await slice.arrayBuffer()));\n totalBytesRead += slice.size;\n }\n}\n", "import { blobReader } from \"@smithy/chunked-blob-reader\";\nexport const blobHasher = async function blobHasher(hashCtor, blob) {\n const hash = new hashCtor();\n await blobReader(blob, (chunk) => {\n hash.update(chunk);\n });\n return hash.digest();\n};\n", "export const invalidFunction = (message) => () => {\n throw new Error(message);\n};\n", "export const invalidProvider = (message) => () => Promise.reject(message);\n", "export * from \"./invalidFunction\";\nexport * from \"./invalidProvider\";\n", "export const BLOCK_SIZE = 64;\nexport const DIGEST_LENGTH = 16;\nexport const INIT = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476];\n", "import { fromUtf8 } from \"@smithy/util-utf8\";\nimport { BLOCK_SIZE, DIGEST_LENGTH, INIT } from \"./constants\";\nexport class Md5 {\n state;\n buffer;\n bufferLength;\n bytesHashed;\n finished;\n constructor() {\n this.reset();\n }\n update(sourceData) {\n if (isEmptyData(sourceData)) {\n return;\n }\n else if (this.finished) {\n throw new Error(\"Attempted to update an already finished hash.\");\n }\n const data = convertToBuffer(sourceData);\n let position = 0;\n let { byteLength } = data;\n this.bytesHashed += byteLength;\n while (byteLength > 0) {\n this.buffer.setUint8(this.bufferLength++, data[position++]);\n byteLength--;\n if (this.bufferLength === BLOCK_SIZE) {\n this.hashBuffer();\n this.bufferLength = 0;\n }\n }\n }\n async digest() {\n if (!this.finished) {\n const { buffer, bufferLength: undecoratedLength, bytesHashed } = this;\n const bitsHashed = bytesHashed * 8;\n buffer.setUint8(this.bufferLength++, 0b10000000);\n if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) {\n for (let i = this.bufferLength; i < BLOCK_SIZE; i++) {\n buffer.setUint8(i, 0);\n }\n this.hashBuffer();\n this.bufferLength = 0;\n }\n for (let i = this.bufferLength; i < BLOCK_SIZE - 8; i++) {\n buffer.setUint8(i, 0);\n }\n buffer.setUint32(BLOCK_SIZE - 8, bitsHashed >>> 0, true);\n buffer.setUint32(BLOCK_SIZE - 4, Math.floor(bitsHashed / 0x100000000), true);\n this.hashBuffer();\n this.finished = true;\n }\n const out = new DataView(new ArrayBuffer(DIGEST_LENGTH));\n for (let i = 0; i < 4; i++) {\n out.setUint32(i * 4, this.state[i], true);\n }\n return new Uint8Array(out.buffer, out.byteOffset, out.byteLength);\n }\n hashBuffer() {\n const { buffer, state } = this;\n let a = state[0], b = state[1], c = state[2], d = state[3];\n a = ff(a, b, c, d, buffer.getUint32(0, true), 7, 0xd76aa478);\n d = ff(d, a, b, c, buffer.getUint32(4, true), 12, 0xe8c7b756);\n c = ff(c, d, a, b, buffer.getUint32(8, true), 17, 0x242070db);\n b = ff(b, c, d, a, buffer.getUint32(12, true), 22, 0xc1bdceee);\n a = ff(a, b, c, d, buffer.getUint32(16, true), 7, 0xf57c0faf);\n d = ff(d, a, b, c, buffer.getUint32(20, true), 12, 0x4787c62a);\n c = ff(c, d, a, b, buffer.getUint32(24, true), 17, 0xa8304613);\n b = ff(b, c, d, a, buffer.getUint32(28, true), 22, 0xfd469501);\n a = ff(a, b, c, d, buffer.getUint32(32, true), 7, 0x698098d8);\n d = ff(d, a, b, c, buffer.getUint32(36, true), 12, 0x8b44f7af);\n c = ff(c, d, a, b, buffer.getUint32(40, true), 17, 0xffff5bb1);\n b = ff(b, c, d, a, buffer.getUint32(44, true), 22, 0x895cd7be);\n a = ff(a, b, c, d, buffer.getUint32(48, true), 7, 0x6b901122);\n d = ff(d, a, b, c, buffer.getUint32(52, true), 12, 0xfd987193);\n c = ff(c, d, a, b, buffer.getUint32(56, true), 17, 0xa679438e);\n b = ff(b, c, d, a, buffer.getUint32(60, true), 22, 0x49b40821);\n a = gg(a, b, c, d, buffer.getUint32(4, true), 5, 0xf61e2562);\n d = gg(d, a, b, c, buffer.getUint32(24, true), 9, 0xc040b340);\n c = gg(c, d, a, b, buffer.getUint32(44, true), 14, 0x265e5a51);\n b = gg(b, c, d, a, buffer.getUint32(0, true), 20, 0xe9b6c7aa);\n a = gg(a, b, c, d, buffer.getUint32(20, true), 5, 0xd62f105d);\n d = gg(d, a, b, c, buffer.getUint32(40, true), 9, 0x02441453);\n c = gg(c, d, a, b, buffer.getUint32(60, true), 14, 0xd8a1e681);\n b = gg(b, c, d, a, buffer.getUint32(16, true), 20, 0xe7d3fbc8);\n a = gg(a, b, c, d, buffer.getUint32(36, true), 5, 0x21e1cde6);\n d = gg(d, a, b, c, buffer.getUint32(56, true), 9, 0xc33707d6);\n c = gg(c, d, a, b, buffer.getUint32(12, true), 14, 0xf4d50d87);\n b = gg(b, c, d, a, buffer.getUint32(32, true), 20, 0x455a14ed);\n a = gg(a, b, c, d, buffer.getUint32(52, true), 5, 0xa9e3e905);\n d = gg(d, a, b, c, buffer.getUint32(8, true), 9, 0xfcefa3f8);\n c = gg(c, d, a, b, buffer.getUint32(28, true), 14, 0x676f02d9);\n b = gg(b, c, d, a, buffer.getUint32(48, true), 20, 0x8d2a4c8a);\n a = hh(a, b, c, d, buffer.getUint32(20, true), 4, 0xfffa3942);\n d = hh(d, a, b, c, buffer.getUint32(32, true), 11, 0x8771f681);\n c = hh(c, d, a, b, buffer.getUint32(44, true), 16, 0x6d9d6122);\n b = hh(b, c, d, a, buffer.getUint32(56, true), 23, 0xfde5380c);\n a = hh(a, b, c, d, buffer.getUint32(4, true), 4, 0xa4beea44);\n d = hh(d, a, b, c, buffer.getUint32(16, true), 11, 0x4bdecfa9);\n c = hh(c, d, a, b, buffer.getUint32(28, true), 16, 0xf6bb4b60);\n b = hh(b, c, d, a, buffer.getUint32(40, true), 23, 0xbebfbc70);\n a = hh(a, b, c, d, buffer.getUint32(52, true), 4, 0x289b7ec6);\n d = hh(d, a, b, c, buffer.getUint32(0, true), 11, 0xeaa127fa);\n c = hh(c, d, a, b, buffer.getUint32(12, true), 16, 0xd4ef3085);\n b = hh(b, c, d, a, buffer.getUint32(24, true), 23, 0x04881d05);\n a = hh(a, b, c, d, buffer.getUint32(36, true), 4, 0xd9d4d039);\n d = hh(d, a, b, c, buffer.getUint32(48, true), 11, 0xe6db99e5);\n c = hh(c, d, a, b, buffer.getUint32(60, true), 16, 0x1fa27cf8);\n b = hh(b, c, d, a, buffer.getUint32(8, true), 23, 0xc4ac5665);\n a = ii(a, b, c, d, buffer.getUint32(0, true), 6, 0xf4292244);\n d = ii(d, a, b, c, buffer.getUint32(28, true), 10, 0x432aff97);\n c = ii(c, d, a, b, buffer.getUint32(56, true), 15, 0xab9423a7);\n b = ii(b, c, d, a, buffer.getUint32(20, true), 21, 0xfc93a039);\n a = ii(a, b, c, d, buffer.getUint32(48, true), 6, 0x655b59c3);\n d = ii(d, a, b, c, buffer.getUint32(12, true), 10, 0x8f0ccc92);\n c = ii(c, d, a, b, buffer.getUint32(40, true), 15, 0xffeff47d);\n b = ii(b, c, d, a, buffer.getUint32(4, true), 21, 0x85845dd1);\n a = ii(a, b, c, d, buffer.getUint32(32, true), 6, 0x6fa87e4f);\n d = ii(d, a, b, c, buffer.getUint32(60, true), 10, 0xfe2ce6e0);\n c = ii(c, d, a, b, buffer.getUint32(24, true), 15, 0xa3014314);\n b = ii(b, c, d, a, buffer.getUint32(52, true), 21, 0x4e0811a1);\n a = ii(a, b, c, d, buffer.getUint32(16, true), 6, 0xf7537e82);\n d = ii(d, a, b, c, buffer.getUint32(44, true), 10, 0xbd3af235);\n c = ii(c, d, a, b, buffer.getUint32(8, true), 15, 0x2ad7d2bb);\n b = ii(b, c, d, a, buffer.getUint32(36, true), 21, 0xeb86d391);\n state[0] = (a + state[0]) & 0xffffffff;\n state[1] = (b + state[1]) & 0xffffffff;\n state[2] = (c + state[2]) & 0xffffffff;\n state[3] = (d + state[3]) & 0xffffffff;\n }\n reset() {\n this.state = Uint32Array.from(INIT);\n this.buffer = new DataView(new ArrayBuffer(BLOCK_SIZE));\n this.bufferLength = 0;\n this.bytesHashed = 0;\n this.finished = false;\n }\n}\nfunction cmn(q, a, b, x, s, t) {\n a = (((a + q) & 0xffffffff) + ((x + t) & 0xffffffff)) & 0xffffffff;\n return (((a << s) | (a >>> (32 - s))) + b) & 0xffffffff;\n}\nfunction ff(a, b, c, d, x, s, t) {\n return cmn((b & c) | (~b & d), a, b, x, s, t);\n}\nfunction gg(a, b, c, d, x, s, t) {\n return cmn((b & d) | (c & ~d), a, b, x, s, t);\n}\nfunction hh(a, b, c, d, x, s, t) {\n return cmn(b ^ c ^ d, a, b, x, s, t);\n}\nfunction ii(a, b, c, d, x, s, t) {\n return cmn(c ^ (b | ~d), a, b, x, s, t);\n}\nfunction isEmptyData(data) {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n return data.byteLength === 0;\n}\nfunction convertToBuffer(data) {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}\n", "export const DEFAULTS_MODE_OPTIONS = [\"in-region\", \"cross-region\", \"mobile\", \"standard\", \"legacy\"];\n", "import { memoize } from \"@smithy/property-provider\";\nimport { DEFAULTS_MODE_OPTIONS } from \"./constants\";\nexport const resolveDefaultsModeConfig = ({ defaultsMode, } = {}) => memoize(async () => {\n const mode = typeof defaultsMode === \"function\" ? await defaultsMode() : defaultsMode;\n switch (mode?.toLowerCase()) {\n case \"auto\":\n return Promise.resolve(useMobileConfiguration() ? \"mobile\" : \"standard\");\n case \"mobile\":\n case \"in-region\":\n case \"cross-region\":\n case \"standard\":\n case \"legacy\":\n return Promise.resolve(mode?.toLocaleLowerCase());\n case undefined:\n return Promise.resolve(\"legacy\");\n default:\n throw new Error(`Invalid parameter for \"defaultsMode\", expect ${DEFAULTS_MODE_OPTIONS.join(\", \")}, got ${mode}`);\n }\n});\nconst useMobileConfiguration = () => {\n const navigator = window?.navigator;\n if (navigator?.connection) {\n const { effectiveType, rtt, downlink } = navigator?.connection;\n const slow = (typeof effectiveType === \"string\" && effectiveType !== \"4g\") || Number(rtt) > 100 || Number(downlink) < 10;\n if (slow) {\n return true;\n }\n }\n return (navigator?.userAgentData?.mobile || (typeof navigator?.maxTouchPoints === \"number\" && navigator?.maxTouchPoints > 1));\n};\n", "export * from \"./resolveDefaultsModeConfig\";\n", "import { AwsSdkSigV4ASigner, AwsSdkSigV4Signer } from \"@aws-sdk/core\";\nimport { AwsRestXmlProtocol } from \"@aws-sdk/core/protocols\";\nimport { SignatureV4MultiRegion } from \"@aws-sdk/signature-v4-multi-region\";\nimport { NoOpLogger } from \"@smithy/smithy-client\";\nimport { parseUrl } from \"@smithy/url-parser\";\nimport { fromBase64, toBase64 } from \"@smithy/util-base64\";\nimport { getAwsChunkedEncodingStream, sdkStreamMixin } from \"@smithy/util-stream\";\nimport { fromUtf8, toUtf8 } from \"@smithy/util-utf8\";\nimport { defaultS3HttpAuthSchemeProvider } from \"./auth/httpAuthSchemeProvider\";\nimport { defaultEndpointResolver } from \"./endpoint/endpointResolver\";\nimport { errorTypeRegistries } from \"./schemas/schemas_0\";\nexport const getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2006-03-01\",\n base64Decoder: config?.base64Decoder ?? fromBase64,\n base64Encoder: config?.base64Encoder ?? toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n getAwsChunkedEncodingStream: config?.getAwsChunkedEncodingStream ?? getAwsChunkedEncodingStream,\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultS3HttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"aws.auth#sigv4a\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4a\"),\n signer: new AwsSdkSigV4ASigner(),\n },\n ],\n logger: config?.logger ?? new NoOpLogger(),\n protocol: config?.protocol ?? AwsRestXmlProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.s3\",\n errorTypeRegistries,\n xmlNamespace: \"http://s3.amazonaws.com/doc/2006-03-01/\",\n version: \"2006-03-01\",\n serviceTarget: \"AmazonS3\",\n },\n sdkStreamMixin: config?.sdkStreamMixin ?? sdkStreamMixin,\n serviceId: config?.serviceId ?? \"S3\",\n signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,\n signingEscapePath: config?.signingEscapePath ?? false,\n urlParser: config?.urlParser ?? parseUrl,\n useArnRegion: config?.useArnRegion ?? undefined,\n utf8Decoder: config?.utf8Decoder ?? fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? toUtf8,\n };\n};\n", "import packageInfo from \"../package.json\";\nimport { Sha1 } from \"@aws-crypto/sha1-browser\";\nimport { Sha256 } from \"@aws-crypto/sha256-browser\";\nimport { createDefaultUserAgentProvider } from \"@aws-sdk/util-user-agent-browser\";\nimport { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from \"@smithy/config-resolver\";\nimport { eventStreamSerdeProvider } from \"@smithy/eventstream-serde-browser\";\nimport { FetchHttpHandler as RequestHandler, streamCollector } from \"@smithy/fetch-http-handler\";\nimport { blobHasher as streamHasher } from \"@smithy/hash-blob-browser\";\nimport { invalidProvider } from \"@smithy/invalid-dependency\";\nimport { Md5 } from \"@smithy/md5-js\";\nimport { loadConfigsForDefaultMode } from \"@smithy/smithy-client\";\nimport { calculateBodyLength } from \"@smithy/util-body-length-browser\";\nimport { resolveDefaultsModeConfig } from \"@smithy/util-defaults-mode-browser\";\nimport { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from \"@smithy/util-retry\";\nimport { getRuntimeConfig as getSharedRuntimeConfig } from \"./runtimeConfig.shared\";\nexport const getRuntimeConfig = (config) => {\n const defaultsMode = resolveDefaultsModeConfig(config);\n const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);\n const clientSharedValues = getSharedRuntimeConfig(config);\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"browser\",\n defaultsMode,\n bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,\n credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error(\"Credential is missing\"))),\n defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,\n maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,\n md5: config?.md5 ?? Md5,\n region: config?.region ?? invalidProvider(\"Region is missing\"),\n requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),\n sha1: config?.sha1 ?? Sha1,\n sha256: config?.sha256 ?? Sha256,\n streamCollector: config?.streamCollector ?? streamCollector,\n streamHasher: config?.streamHasher ?? streamHasher,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),\n useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),\n };\n};\n", "export const getAwsRegionExtensionConfiguration = (runtimeConfig) => {\n return {\n setRegion(region) {\n runtimeConfig.region = region;\n },\n region() {\n return runtimeConfig.region;\n },\n };\n};\nexport const resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => {\n return {\n region: awsRegionExtensionConfiguration.region(),\n };\n};\n", "export { REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, } from \"@smithy/config-resolver\";\nexport { resolveRegionConfig } from \"@smithy/config-resolver\";\n", "export function stsRegionDefaultResolver() {\n return async () => \"us-east-1\";\n}\n", "export * from \"./extensions\";\nexport * from \"./regionConfig/awsRegionConfig\";\nexport * from \"./regionConfig/stsRegionDefaultResolver\";\n", "export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nexport const resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n", "import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from \"@aws-sdk/region-config-resolver\";\nimport { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from \"@smithy/protocol-http\";\nimport { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from \"@smithy/smithy-client\";\nimport { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from \"./auth/httpAuthExtensionConfiguration\";\nexport const resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n", "import { getAddExpectContinuePlugin } from \"@aws-sdk/middleware-expect-continue\";\nimport { resolveFlexibleChecksumsConfig, } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getHostHeaderPlugin, resolveHostHeaderConfig, } from \"@aws-sdk/middleware-host-header\";\nimport { getLoggerPlugin } from \"@aws-sdk/middleware-logger\";\nimport { getRecursionDetectionPlugin } from \"@aws-sdk/middleware-recursion-detection\";\nimport { getRegionRedirectMiddlewarePlugin, getS3ExpressHttpSigningPlugin, getS3ExpressPlugin, getValidateBucketNamePlugin, resolveS3Config, } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getUserAgentPlugin, resolveUserAgentConfig, } from \"@aws-sdk/middleware-user-agent\";\nimport { resolveRegionConfig } from \"@smithy/config-resolver\";\nimport { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from \"@smithy/core\";\nimport { getSchemaSerdePlugin } from \"@smithy/core/schema\";\nimport { resolveEventStreamSerdeConfig, } from \"@smithy/eventstream-serde-config-resolver\";\nimport { getContentLengthPlugin } from \"@smithy/middleware-content-length\";\nimport { resolveEndpointConfig, } from \"@smithy/middleware-endpoint\";\nimport { getRetryPlugin, resolveRetryConfig, } from \"@smithy/middleware-retry\";\nimport { Client as __Client, } from \"@smithy/smithy-client\";\nimport { defaultS3HttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from \"./auth/httpAuthSchemeProvider\";\nimport { CreateSessionCommand, } from \"./commands/CreateSessionCommand\";\nimport { resolveClientEndpointParameters, } from \"./endpoint/EndpointParameters\";\nimport { getRuntimeConfig as __getRuntimeConfig } from \"./runtimeConfig\";\nimport { resolveRuntimeExtensions } from \"./runtimeExtensions\";\nexport { __Client };\nexport class S3Client extends __Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = __getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = resolveUserAgentConfig(_config_1);\n const _config_3 = resolveFlexibleChecksumsConfig(_config_2);\n const _config_4 = resolveRetryConfig(_config_3);\n const _config_5 = resolveRegionConfig(_config_4);\n const _config_6 = resolveHostHeaderConfig(_config_5);\n const _config_7 = resolveEndpointConfig(_config_6);\n const _config_8 = resolveEventStreamSerdeConfig(_config_7);\n const _config_9 = resolveHttpAuthSchemeConfig(_config_8);\n const _config_10 = resolveS3Config(_config_9, { session: [() => this, CreateSessionCommand] });\n const _config_11 = resolveRuntimeExtensions(_config_10, configuration?.extensions || []);\n this.config = _config_11;\n this.middlewareStack.use(getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(getUserAgentPlugin(this.config));\n this.middlewareStack.use(getRetryPlugin(this.config));\n this.middlewareStack.use(getContentLengthPlugin(this.config));\n this.middlewareStack.use(getHostHeaderPlugin(this.config));\n this.middlewareStack.use(getLoggerPlugin(this.config));\n this.middlewareStack.use(getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultS3HttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n \"aws.auth#sigv4a\": config.credentials,\n }),\n }));\n this.middlewareStack.use(getHttpSigningPlugin(this.config));\n this.middlewareStack.use(getValidateBucketNamePlugin(this.config));\n this.middlewareStack.use(getAddExpectContinuePlugin(this.config));\n this.middlewareStack.use(getRegionRedirectMiddlewarePlugin(this.config));\n this.middlewareStack.use(getS3ExpressPlugin(this.config));\n this.middlewareStack.use(getS3ExpressHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { AbortMultipartUpload$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class AbortMultipartUploadCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"AbortMultipartUpload\", {})\n .n(\"S3Client\", \"AbortMultipartUploadCommand\")\n .sc(AbortMultipartUpload$)\n .build() {\n}\n", "export function ssecMiddleware(options) {\n return (next) => async (args) => {\n const input = { ...args.input };\n const properties = [\n {\n target: \"SSECustomerKey\",\n hash: \"SSECustomerKeyMD5\",\n },\n {\n target: \"CopySourceSSECustomerKey\",\n hash: \"CopySourceSSECustomerKeyMD5\",\n },\n ];\n for (const prop of properties) {\n const value = input[prop.target];\n if (value) {\n let valueForHash;\n if (typeof value === \"string\") {\n if (isValidBase64EncodedSSECustomerKey(value, options)) {\n valueForHash = options.base64Decoder(value);\n }\n else {\n valueForHash = options.utf8Decoder(value);\n input[prop.target] = options.base64Encoder(valueForHash);\n }\n }\n else {\n valueForHash = ArrayBuffer.isView(value)\n ? new Uint8Array(value.buffer, value.byteOffset, value.byteLength)\n : new Uint8Array(value);\n input[prop.target] = options.base64Encoder(valueForHash);\n }\n const hash = new options.md5();\n hash.update(valueForHash);\n input[prop.hash] = options.base64Encoder(await hash.digest());\n }\n }\n return next({\n ...args,\n input,\n });\n };\n}\nexport const ssecMiddlewareOptions = {\n name: \"ssecMiddleware\",\n step: \"initialize\",\n tags: [\"SSE\"],\n override: true,\n};\nexport const getSsecPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.add(ssecMiddleware(config), ssecMiddlewareOptions);\n },\n});\nexport function isValidBase64EncodedSSECustomerKey(str, options) {\n const base64Regex = /^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;\n if (!base64Regex.test(str))\n return false;\n try {\n const decodedBytes = options.base64Decoder(str);\n return decodedBytes.length === 32;\n }\n catch {\n return false;\n }\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CompleteMultipartUpload$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CompleteMultipartUploadCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"CompleteMultipartUpload\", {})\n .n(\"S3Client\", \"CompleteMultipartUploadCommand\")\n .sc(CompleteMultipartUpload$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CopyObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CopyObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n DisableS3ExpressSessionAuth: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n CopySource: { type: \"contextParams\", name: \"CopySource\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"CopyObject\", {})\n .n(\"S3Client\", \"CopyObjectCommand\")\n .sc(CopyObject$)\n .build() {\n}\n", "export function locationConstraintMiddleware(options) {\n return (next) => async (args) => {\n const { CreateBucketConfiguration } = args.input;\n const region = await options.region();\n if (!CreateBucketConfiguration?.LocationConstraint && !CreateBucketConfiguration?.Location) {\n if (region !== \"us-east-1\") {\n args.input.CreateBucketConfiguration = args.input.CreateBucketConfiguration ?? {};\n args.input.CreateBucketConfiguration.LocationConstraint = region;\n }\n }\n return next(args);\n };\n}\nexport const locationConstraintMiddlewareOptions = {\n step: \"initialize\",\n tags: [\"LOCATION_CONSTRAINT\", \"CREATE_BUCKET_CONFIGURATION\"],\n name: \"locationConstraintMiddleware\",\n override: true,\n};\nexport const getLocationConstraintPlugin = (config) => ({\n applyToStack: (clientStack) => {\n clientStack.add(locationConstraintMiddleware(config), locationConstraintMiddlewareOptions);\n },\n});\n", "import { getLocationConstraintPlugin } from \"@aws-sdk/middleware-location-constraint\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CreateBucket$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CreateBucketCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n DisableAccessPoints: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getLocationConstraintPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"CreateBucket\", {})\n .n(\"S3Client\", \"CreateBucketCommand\")\n .sc(CreateBucket$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CreateBucketMetadataConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CreateBucketMetadataConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"CreateBucketMetadataConfiguration\", {})\n .n(\"S3Client\", \"CreateBucketMetadataConfigurationCommand\")\n .sc(CreateBucketMetadataConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CreateBucketMetadataTableConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CreateBucketMetadataTableConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"CreateBucketMetadataTableConfiguration\", {})\n .n(\"S3Client\", \"CreateBucketMetadataTableConfigurationCommand\")\n .sc(CreateBucketMetadataTableConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { CreateMultipartUpload$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class CreateMultipartUploadCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"CreateMultipartUpload\", {})\n .n(\"S3Client\", \"CreateMultipartUploadCommand\")\n .sc(CreateMultipartUpload$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketAnalyticsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketAnalyticsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketAnalyticsConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketAnalyticsConfigurationCommand\")\n .sc(DeleteBucketAnalyticsConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucket$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucket\", {})\n .n(\"S3Client\", \"DeleteBucketCommand\")\n .sc(DeleteBucket$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketCors$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketCorsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketCors\", {})\n .n(\"S3Client\", \"DeleteBucketCorsCommand\")\n .sc(DeleteBucketCors$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketEncryption$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketEncryptionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketEncryption\", {})\n .n(\"S3Client\", \"DeleteBucketEncryptionCommand\")\n .sc(DeleteBucketEncryption$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketIntelligentTieringConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketIntelligentTieringConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketIntelligentTieringConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketIntelligentTieringConfigurationCommand\")\n .sc(DeleteBucketIntelligentTieringConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketInventoryConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketInventoryConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketInventoryConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketInventoryConfigurationCommand\")\n .sc(DeleteBucketInventoryConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketLifecycle$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketLifecycleCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketLifecycle\", {})\n .n(\"S3Client\", \"DeleteBucketLifecycleCommand\")\n .sc(DeleteBucketLifecycle$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketMetadataConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketMetadataConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketMetadataConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketMetadataConfigurationCommand\")\n .sc(DeleteBucketMetadataConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketMetadataTableConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketMetadataTableConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketMetadataTableConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketMetadataTableConfigurationCommand\")\n .sc(DeleteBucketMetadataTableConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketMetricsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketMetricsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketMetricsConfiguration\", {})\n .n(\"S3Client\", \"DeleteBucketMetricsConfigurationCommand\")\n .sc(DeleteBucketMetricsConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketOwnershipControls$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketOwnershipControlsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketOwnershipControls\", {})\n .n(\"S3Client\", \"DeleteBucketOwnershipControlsCommand\")\n .sc(DeleteBucketOwnershipControls$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketPolicy$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketPolicyCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketPolicy\", {})\n .n(\"S3Client\", \"DeleteBucketPolicyCommand\")\n .sc(DeleteBucketPolicy$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketReplication$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketReplicationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketReplication\", {})\n .n(\"S3Client\", \"DeleteBucketReplicationCommand\")\n .sc(DeleteBucketReplication$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketTagging\", {})\n .n(\"S3Client\", \"DeleteBucketTaggingCommand\")\n .sc(DeleteBucketTagging$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteBucketWebsite$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteBucketWebsiteCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeleteBucketWebsite\", {})\n .n(\"S3Client\", \"DeleteBucketWebsiteCommand\")\n .sc(DeleteBucketWebsite$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"DeleteObject\", {})\n .n(\"S3Client\", \"DeleteObjectCommand\")\n .sc(DeleteObject$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteObjects$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteObjectsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"DeleteObjects\", {})\n .n(\"S3Client\", \"DeleteObjectsCommand\")\n .sc(DeleteObjects$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeleteObjectTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeleteObjectTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"DeleteObjectTagging\", {})\n .n(\"S3Client\", \"DeleteObjectTaggingCommand\")\n .sc(DeleteObjectTagging$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { DeletePublicAccessBlock$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class DeletePublicAccessBlockCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"DeletePublicAccessBlock\", {})\n .n(\"S3Client\", \"DeletePublicAccessBlockCommand\")\n .sc(DeletePublicAccessBlock$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketAbac$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketAbacCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketAbac\", {})\n .n(\"S3Client\", \"GetBucketAbacCommand\")\n .sc(GetBucketAbac$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketAccelerateConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketAccelerateConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketAccelerateConfiguration\", {})\n .n(\"S3Client\", \"GetBucketAccelerateConfigurationCommand\")\n .sc(GetBucketAccelerateConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketAcl$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketAclCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketAcl\", {})\n .n(\"S3Client\", \"GetBucketAclCommand\")\n .sc(GetBucketAcl$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketAnalyticsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketAnalyticsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketAnalyticsConfiguration\", {})\n .n(\"S3Client\", \"GetBucketAnalyticsConfigurationCommand\")\n .sc(GetBucketAnalyticsConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketCors$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketCorsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketCors\", {})\n .n(\"S3Client\", \"GetBucketCorsCommand\")\n .sc(GetBucketCors$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketEncryption$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketEncryptionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketEncryption\", {})\n .n(\"S3Client\", \"GetBucketEncryptionCommand\")\n .sc(GetBucketEncryption$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketIntelligentTieringConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketIntelligentTieringConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketIntelligentTieringConfiguration\", {})\n .n(\"S3Client\", \"GetBucketIntelligentTieringConfigurationCommand\")\n .sc(GetBucketIntelligentTieringConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketInventoryConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketInventoryConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketInventoryConfiguration\", {})\n .n(\"S3Client\", \"GetBucketInventoryConfigurationCommand\")\n .sc(GetBucketInventoryConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketLifecycleConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketLifecycleConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketLifecycleConfiguration\", {})\n .n(\"S3Client\", \"GetBucketLifecycleConfigurationCommand\")\n .sc(GetBucketLifecycleConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketLocation$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketLocationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketLocation\", {})\n .n(\"S3Client\", \"GetBucketLocationCommand\")\n .sc(GetBucketLocation$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketLogging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketLoggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketLogging\", {})\n .n(\"S3Client\", \"GetBucketLoggingCommand\")\n .sc(GetBucketLogging$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketMetadataConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketMetadataConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketMetadataConfiguration\", {})\n .n(\"S3Client\", \"GetBucketMetadataConfigurationCommand\")\n .sc(GetBucketMetadataConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketMetadataTableConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketMetadataTableConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketMetadataTableConfiguration\", {})\n .n(\"S3Client\", \"GetBucketMetadataTableConfigurationCommand\")\n .sc(GetBucketMetadataTableConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketMetricsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketMetricsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketMetricsConfiguration\", {})\n .n(\"S3Client\", \"GetBucketMetricsConfigurationCommand\")\n .sc(GetBucketMetricsConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketNotificationConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketNotificationConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketNotificationConfiguration\", {})\n .n(\"S3Client\", \"GetBucketNotificationConfigurationCommand\")\n .sc(GetBucketNotificationConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketOwnershipControls$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketOwnershipControlsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketOwnershipControls\", {})\n .n(\"S3Client\", \"GetBucketOwnershipControlsCommand\")\n .sc(GetBucketOwnershipControls$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketPolicy$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketPolicyCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketPolicy\", {})\n .n(\"S3Client\", \"GetBucketPolicyCommand\")\n .sc(GetBucketPolicy$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketPolicyStatus$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketPolicyStatusCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketPolicyStatus\", {})\n .n(\"S3Client\", \"GetBucketPolicyStatusCommand\")\n .sc(GetBucketPolicyStatus$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketReplication$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketReplicationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketReplication\", {})\n .n(\"S3Client\", \"GetBucketReplicationCommand\")\n .sc(GetBucketReplication$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketRequestPayment$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketRequestPaymentCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketRequestPayment\", {})\n .n(\"S3Client\", \"GetBucketRequestPaymentCommand\")\n .sc(GetBucketRequestPayment$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketTagging\", {})\n .n(\"S3Client\", \"GetBucketTaggingCommand\")\n .sc(GetBucketTagging$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketVersioning$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketVersioningCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketVersioning\", {})\n .n(\"S3Client\", \"GetBucketVersioningCommand\")\n .sc(GetBucketVersioning$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetBucketWebsite$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetBucketWebsiteCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetBucketWebsite\", {})\n .n(\"S3Client\", \"GetBucketWebsiteCommand\")\n .sc(GetBucketWebsite$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectAcl$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectAclCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectAcl\", {})\n .n(\"S3Client\", \"GetObjectAclCommand\")\n .sc(GetObjectAcl$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectAttributes$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectAttributesCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectAttributes\", {})\n .n(\"S3Client\", \"GetObjectAttributesCommand\")\n .sc(GetObjectAttributes$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getS3ExpiresMiddlewarePlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestChecksumRequired: false,\n requestValidationModeMember: 'ChecksumMode',\n 'responseAlgorithms': ['CRC64NVME', 'CRC32', 'CRC32C', 'SHA256', 'SHA1'],\n }),\n getSsecPlugin(config),\n getS3ExpiresMiddlewarePlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObject\", {})\n .n(\"S3Client\", \"GetObjectCommand\")\n .sc(GetObject$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectLegalHold$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectLegalHoldCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectLegalHold\", {})\n .n(\"S3Client\", \"GetObjectLegalHoldCommand\")\n .sc(GetObjectLegalHold$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectLockConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectLockConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectLockConfiguration\", {})\n .n(\"S3Client\", \"GetObjectLockConfigurationCommand\")\n .sc(GetObjectLockConfiguration$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectRetention$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectRetentionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectRetention\", {})\n .n(\"S3Client\", \"GetObjectRetentionCommand\")\n .sc(GetObjectRetention$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetObjectTagging\", {})\n .n(\"S3Client\", \"GetObjectTaggingCommand\")\n .sc(GetObjectTagging$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetObjectTorrent$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetObjectTorrentCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"GetObjectTorrent\", {})\n .n(\"S3Client\", \"GetObjectTorrentCommand\")\n .sc(GetObjectTorrent$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { GetPublicAccessBlock$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class GetPublicAccessBlockCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"GetPublicAccessBlock\", {})\n .n(\"S3Client\", \"GetPublicAccessBlockCommand\")\n .sc(GetPublicAccessBlock$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { HeadBucket$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class HeadBucketCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"HeadBucket\", {})\n .n(\"S3Client\", \"HeadBucketCommand\")\n .sc(HeadBucket$)\n .build() {\n}\n", "import { getS3ExpiresMiddlewarePlugin, getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { HeadObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class HeadObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n getS3ExpiresMiddlewarePlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"HeadObject\", {})\n .n(\"S3Client\", \"HeadObjectCommand\")\n .sc(HeadObject$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListBucketAnalyticsConfigurations$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListBucketAnalyticsConfigurationsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListBucketAnalyticsConfigurations\", {})\n .n(\"S3Client\", \"ListBucketAnalyticsConfigurationsCommand\")\n .sc(ListBucketAnalyticsConfigurations$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListBucketIntelligentTieringConfigurations$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListBucketIntelligentTieringConfigurationsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListBucketIntelligentTieringConfigurations\", {})\n .n(\"S3Client\", \"ListBucketIntelligentTieringConfigurationsCommand\")\n .sc(ListBucketIntelligentTieringConfigurations$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListBucketInventoryConfigurations$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListBucketInventoryConfigurationsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListBucketInventoryConfigurations\", {})\n .n(\"S3Client\", \"ListBucketInventoryConfigurationsCommand\")\n .sc(ListBucketInventoryConfigurations$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListBucketMetricsConfigurations$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListBucketMetricsConfigurationsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListBucketMetricsConfigurations\", {})\n .n(\"S3Client\", \"ListBucketMetricsConfigurationsCommand\")\n .sc(ListBucketMetricsConfigurations$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListBuckets$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListBucketsCommand extends $Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListBuckets\", {})\n .n(\"S3Client\", \"ListBucketsCommand\")\n .sc(ListBuckets$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListDirectoryBuckets$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListDirectoryBucketsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListDirectoryBuckets\", {})\n .n(\"S3Client\", \"ListDirectoryBucketsCommand\")\n .sc(ListDirectoryBuckets$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListMultipartUploads$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListMultipartUploadsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Prefix: { type: \"contextParams\", name: \"Prefix\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListMultipartUploads\", {})\n .n(\"S3Client\", \"ListMultipartUploadsCommand\")\n .sc(ListMultipartUploads$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListObjects$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListObjectsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Prefix: { type: \"contextParams\", name: \"Prefix\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListObjects\", {})\n .n(\"S3Client\", \"ListObjectsCommand\")\n .sc(ListObjects$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListObjectsV2$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListObjectsV2Command extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Prefix: { type: \"contextParams\", name: \"Prefix\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListObjectsV2\", {})\n .n(\"S3Client\", \"ListObjectsV2Command\")\n .sc(ListObjectsV2$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListObjectVersions$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListObjectVersionsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Prefix: { type: \"contextParams\", name: \"Prefix\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListObjectVersions\", {})\n .n(\"S3Client\", \"ListObjectVersionsCommand\")\n .sc(ListObjectVersions$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { ListParts$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class ListPartsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"ListParts\", {})\n .n(\"S3Client\", \"ListPartsCommand\")\n .sc(ListParts$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketAbac$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketAbacCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: false,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketAbac\", {})\n .n(\"S3Client\", \"PutBucketAbacCommand\")\n .sc(PutBucketAbac$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketAccelerateConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketAccelerateConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: false,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketAccelerateConfiguration\", {})\n .n(\"S3Client\", \"PutBucketAccelerateConfigurationCommand\")\n .sc(PutBucketAccelerateConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketAcl$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketAclCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketAcl\", {})\n .n(\"S3Client\", \"PutBucketAclCommand\")\n .sc(PutBucketAcl$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketAnalyticsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketAnalyticsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"PutBucketAnalyticsConfiguration\", {})\n .n(\"S3Client\", \"PutBucketAnalyticsConfigurationCommand\")\n .sc(PutBucketAnalyticsConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketCors$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketCorsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketCors\", {})\n .n(\"S3Client\", \"PutBucketCorsCommand\")\n .sc(PutBucketCors$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketEncryption$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketEncryptionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketEncryption\", {})\n .n(\"S3Client\", \"PutBucketEncryptionCommand\")\n .sc(PutBucketEncryption$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketIntelligentTieringConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketIntelligentTieringConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"PutBucketIntelligentTieringConfiguration\", {})\n .n(\"S3Client\", \"PutBucketIntelligentTieringConfigurationCommand\")\n .sc(PutBucketIntelligentTieringConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketInventoryConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketInventoryConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"PutBucketInventoryConfiguration\", {})\n .n(\"S3Client\", \"PutBucketInventoryConfigurationCommand\")\n .sc(PutBucketInventoryConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketLifecycleConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketLifecycleConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketLifecycleConfiguration\", {})\n .n(\"S3Client\", \"PutBucketLifecycleConfigurationCommand\")\n .sc(PutBucketLifecycleConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketLogging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketLoggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketLogging\", {})\n .n(\"S3Client\", \"PutBucketLoggingCommand\")\n .sc(PutBucketLogging$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketMetricsConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketMetricsConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"PutBucketMetricsConfiguration\", {})\n .n(\"S3Client\", \"PutBucketMetricsConfigurationCommand\")\n .sc(PutBucketMetricsConfiguration$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketNotificationConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketNotificationConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"PutBucketNotificationConfiguration\", {})\n .n(\"S3Client\", \"PutBucketNotificationConfigurationCommand\")\n .sc(PutBucketNotificationConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketOwnershipControls$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketOwnershipControlsCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketOwnershipControls\", {})\n .n(\"S3Client\", \"PutBucketOwnershipControlsCommand\")\n .sc(PutBucketOwnershipControls$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketPolicy$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketPolicyCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketPolicy\", {})\n .n(\"S3Client\", \"PutBucketPolicyCommand\")\n .sc(PutBucketPolicy$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketReplication$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketReplicationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketReplication\", {})\n .n(\"S3Client\", \"PutBucketReplicationCommand\")\n .sc(PutBucketReplication$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketRequestPayment$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketRequestPaymentCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketRequestPayment\", {})\n .n(\"S3Client\", \"PutBucketRequestPaymentCommand\")\n .sc(PutBucketRequestPayment$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketTagging\", {})\n .n(\"S3Client\", \"PutBucketTaggingCommand\")\n .sc(PutBucketTagging$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketVersioning$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketVersioningCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketVersioning\", {})\n .n(\"S3Client\", \"PutBucketVersioningCommand\")\n .sc(PutBucketVersioning$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutBucketWebsite$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutBucketWebsiteCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutBucketWebsite\", {})\n .n(\"S3Client\", \"PutBucketWebsiteCommand\")\n .sc(PutBucketWebsite$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObjectAcl$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectAclCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObjectAcl\", {})\n .n(\"S3Client\", \"PutObjectAclCommand\")\n .sc(PutObjectAcl$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getCheckContentLengthHeaderPlugin, getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: false,\n }),\n getCheckContentLengthHeaderPlugin(config),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObject\", {})\n .n(\"S3Client\", \"PutObjectCommand\")\n .sc(PutObject$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObjectLegalHold$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectLegalHoldCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObjectLegalHold\", {})\n .n(\"S3Client\", \"PutObjectLegalHoldCommand\")\n .sc(PutObjectLegalHold$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObjectLockConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectLockConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObjectLockConfiguration\", {})\n .n(\"S3Client\", \"PutObjectLockConfigurationCommand\")\n .sc(PutObjectLockConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObjectRetention$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectRetentionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObjectRetention\", {})\n .n(\"S3Client\", \"PutObjectRetentionCommand\")\n .sc(PutObjectRetention$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutObjectTagging$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutObjectTaggingCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"PutObjectTagging\", {})\n .n(\"S3Client\", \"PutObjectTaggingCommand\")\n .sc(PutObjectTagging$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { PutPublicAccessBlock$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class PutPublicAccessBlockCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"PutPublicAccessBlock\", {})\n .n(\"S3Client\", \"PutPublicAccessBlockCommand\")\n .sc(PutPublicAccessBlock$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { RenameObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class RenameObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"RenameObject\", {})\n .n(\"S3Client\", \"RenameObjectCommand\")\n .sc(RenameObject$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { RestoreObject$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class RestoreObjectCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: false,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"RestoreObject\", {})\n .n(\"S3Client\", \"RestoreObjectCommand\")\n .sc(RestoreObject$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { SelectObjectContent$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class SelectObjectContentCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"SelectObjectContent\", {\n eventStream: {\n output: true,\n },\n})\n .n(\"S3Client\", \"SelectObjectContentCommand\")\n .sc(SelectObjectContent$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { UpdateBucketMetadataInventoryTableConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class UpdateBucketMetadataInventoryTableConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"UpdateBucketMetadataInventoryTableConfiguration\", {})\n .n(\"S3Client\", \"UpdateBucketMetadataInventoryTableConfigurationCommand\")\n .sc(UpdateBucketMetadataInventoryTableConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { UpdateBucketMetadataJournalTableConfiguration$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class UpdateBucketMetadataJournalTableConfigurationCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseS3ExpressControlEndpoint: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n ];\n})\n .s(\"AmazonS3\", \"UpdateBucketMetadataJournalTableConfiguration\", {})\n .n(\"S3Client\", \"UpdateBucketMetadataJournalTableConfigurationCommand\")\n .sc(UpdateBucketMetadataJournalTableConfiguration$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { UpdateObjectEncryption$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class UpdateObjectEncryptionCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: true,\n }),\n getThrow200ExceptionsPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"UpdateObjectEncryption\", {})\n .n(\"S3Client\", \"UpdateObjectEncryptionCommand\")\n .sc(UpdateObjectEncryption$)\n .build() {\n}\n", "import { getFlexibleChecksumsPlugin } from \"@aws-sdk/middleware-flexible-checksums\";\nimport { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { UploadPart$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class UploadPartCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n Key: { type: \"contextParams\", name: \"Key\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getFlexibleChecksumsPlugin(config, {\n requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },\n requestChecksumRequired: false,\n }),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"UploadPart\", {})\n .n(\"S3Client\", \"UploadPartCommand\")\n .sc(UploadPart$)\n .build() {\n}\n", "import { getThrow200ExceptionsPlugin } from \"@aws-sdk/middleware-sdk-s3\";\nimport { getSsecPlugin } from \"@aws-sdk/middleware-ssec\";\nimport { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { UploadPartCopy$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class UploadPartCopyCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n DisableS3ExpressSessionAuth: { type: \"staticContextParams\", value: true },\n Bucket: { type: \"contextParams\", name: \"Bucket\" },\n})\n .m(function (Command, cs, config, o) {\n return [\n getEndpointPlugin(config, Command.getEndpointParameterInstructions()),\n getThrow200ExceptionsPlugin(config),\n getSsecPlugin(config),\n ];\n})\n .s(\"AmazonS3\", \"UploadPartCopy\", {})\n .n(\"S3Client\", \"UploadPartCopyCommand\")\n .sc(UploadPartCopy$)\n .build() {\n}\n", "import { getEndpointPlugin } from \"@smithy/middleware-endpoint\";\nimport { Command as $Command } from \"@smithy/smithy-client\";\nimport { commonParams } from \"../endpoint/EndpointParameters\";\nimport { WriteGetObjectResponse$ } from \"../schemas/schemas_0\";\nexport { $Command };\nexport class WriteGetObjectResponseCommand extends $Command\n .classBuilder()\n .ep({\n ...commonParams,\n UseObjectLambdaEndpoint: { type: \"staticContextParams\", value: true },\n})\n .m(function (Command, cs, config, o) {\n return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AmazonS3\", \"WriteGetObjectResponse\", {})\n .n(\"S3Client\", \"WriteGetObjectResponseCommand\")\n .sc(WriteGetObjectResponse$)\n .build() {\n}\n", "import { createPaginator } from \"@smithy/core\";\nimport { ListBucketsCommand } from \"../commands/ListBucketsCommand\";\nimport { S3Client } from \"../S3Client\";\nexport const paginateListBuckets = createPaginator(S3Client, ListBucketsCommand, \"ContinuationToken\", \"ContinuationToken\", \"MaxBuckets\");\n", "import { createPaginator } from \"@smithy/core\";\nimport { ListDirectoryBucketsCommand, } from \"../commands/ListDirectoryBucketsCommand\";\nimport { S3Client } from \"../S3Client\";\nexport const paginateListDirectoryBuckets = createPaginator(S3Client, ListDirectoryBucketsCommand, \"ContinuationToken\", \"ContinuationToken\", \"MaxDirectoryBuckets\");\n", "import { createPaginator } from \"@smithy/core\";\nimport { ListObjectsV2Command, } from \"../commands/ListObjectsV2Command\";\nimport { S3Client } from \"../S3Client\";\nexport const paginateListObjectsV2 = createPaginator(S3Client, ListObjectsV2Command, \"ContinuationToken\", \"NextContinuationToken\", \"MaxKeys\");\n", "import { createPaginator } from \"@smithy/core\";\nimport { ListPartsCommand } from \"../commands/ListPartsCommand\";\nimport { S3Client } from \"../S3Client\";\nexport const paginateListParts = createPaginator(S3Client, ListPartsCommand, \"PartNumberMarker\", \"NextPartNumberMarker\", \"MaxParts\");\n", "export const getCircularReplacer = () => {\n const seen = new WeakSet();\n return (key, value) => {\n if (typeof value === \"object\" && value !== null) {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n }\n return value;\n };\n};\n", "export const sleep = (seconds) => {\n return new Promise((resolve) => setTimeout(resolve, seconds * 1000));\n};\n", "import { getCircularReplacer } from \"./circularReplacer\";\nexport const waiterServiceDefaults = {\n minDelay: 2,\n maxDelay: 120,\n};\nexport var WaiterState;\n(function (WaiterState) {\n WaiterState[\"ABORTED\"] = \"ABORTED\";\n WaiterState[\"FAILURE\"] = \"FAILURE\";\n WaiterState[\"SUCCESS\"] = \"SUCCESS\";\n WaiterState[\"RETRY\"] = \"RETRY\";\n WaiterState[\"TIMEOUT\"] = \"TIMEOUT\";\n})(WaiterState || (WaiterState = {}));\nexport const checkExceptions = (result) => {\n if (result.state === WaiterState.ABORTED) {\n const abortError = new Error(`${JSON.stringify({\n ...result,\n reason: \"Request was aborted\",\n }, getCircularReplacer())}`);\n abortError.name = \"AbortError\";\n throw abortError;\n }\n else if (result.state === WaiterState.TIMEOUT) {\n const timeoutError = new Error(`${JSON.stringify({\n ...result,\n reason: \"Waiter has timed out\",\n }, getCircularReplacer())}`);\n timeoutError.name = \"TimeoutError\";\n throw timeoutError;\n }\n else if (result.state !== WaiterState.SUCCESS) {\n throw new Error(`${JSON.stringify(result, getCircularReplacer())}`);\n }\n return result;\n};\n", "import { getCircularReplacer } from \"./circularReplacer\";\nimport { sleep } from \"./utils/sleep\";\nimport { WaiterState } from \"./waiter\";\nconst exponentialBackoffWithJitter = (minDelay, maxDelay, attemptCeiling, attempt) => {\n if (attempt > attemptCeiling)\n return maxDelay;\n const delay = minDelay * 2 ** (attempt - 1);\n return randomInRange(minDelay, delay);\n};\nconst randomInRange = (min, max) => min + Math.random() * (max - min);\nexport const runPolling = async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => {\n const observedResponses = {};\n const { state, reason } = await acceptorChecks(client, input);\n if (reason) {\n const message = createMessageFromResponse(reason);\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n }\n if (state !== WaiterState.RETRY) {\n return { state, reason, observedResponses };\n }\n let currentAttempt = 1;\n const waitUntil = Date.now() + maxWaitTime * 1000;\n const attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1;\n while (true) {\n if (abortController?.signal?.aborted || abortSignal?.aborted) {\n const message = \"AbortController signal aborted.\";\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n return { state: WaiterState.ABORTED, observedResponses };\n }\n const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt);\n if (Date.now() + delay * 1000 > waitUntil) {\n return { state: WaiterState.TIMEOUT, observedResponses };\n }\n await sleep(delay);\n const { state, reason } = await acceptorChecks(client, input);\n if (reason) {\n const message = createMessageFromResponse(reason);\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n }\n if (state !== WaiterState.RETRY) {\n return { state, reason, observedResponses };\n }\n currentAttempt += 1;\n }\n};\nconst createMessageFromResponse = (reason) => {\n if (reason?.$responseBodyText) {\n return `Deserialization error for body: ${reason.$responseBodyText}`;\n }\n if (reason?.$metadata?.httpStatusCode) {\n if (reason.$response || reason.message) {\n return `${reason.$response?.statusCode ?? reason.$metadata.httpStatusCode ?? \"Unknown\"}: ${reason.message}`;\n }\n return `${reason.$metadata.httpStatusCode}: OK`;\n }\n return String(reason?.message ?? JSON.stringify(reason, getCircularReplacer()) ?? \"Unknown\");\n};\n", "export const validateWaiterOptions = (options) => {\n if (options.maxWaitTime <= 0) {\n throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`);\n }\n else if (options.minDelay <= 0) {\n throw new Error(`WaiterConfiguration.minDelay must be greater than 0`);\n }\n else if (options.maxDelay <= 0) {\n throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`);\n }\n else if (options.maxWaitTime <= options.minDelay) {\n throw new Error(`WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`);\n }\n else if (options.maxDelay < options.minDelay) {\n throw new Error(`WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`);\n }\n};\n", "export * from \"./sleep\";\nexport * from \"./validate\";\n", "import { runPolling } from \"./poller\";\nimport { validateWaiterOptions } from \"./utils\";\nimport { waiterServiceDefaults, WaiterState } from \"./waiter\";\nconst abortTimeout = (abortSignal) => {\n let onAbort;\n const promise = new Promise((resolve) => {\n onAbort = () => resolve({ state: WaiterState.ABORTED });\n if (typeof abortSignal.addEventListener === \"function\") {\n abortSignal.addEventListener(\"abort\", onAbort);\n }\n else {\n abortSignal.onabort = onAbort;\n }\n });\n return {\n clearListener() {\n if (typeof abortSignal.removeEventListener === \"function\") {\n abortSignal.removeEventListener(\"abort\", onAbort);\n }\n },\n aborted: promise,\n };\n};\nexport const createWaiter = async (options, input, acceptorChecks) => {\n const params = {\n ...waiterServiceDefaults,\n ...options,\n };\n validateWaiterOptions(params);\n const exitConditions = [runPolling(params, input, acceptorChecks)];\n const finalize = [];\n if (options.abortSignal) {\n const { aborted, clearListener } = abortTimeout(options.abortSignal);\n finalize.push(clearListener);\n exitConditions.push(aborted);\n }\n if (options.abortController?.signal) {\n const { aborted, clearListener } = abortTimeout(options.abortController.signal);\n finalize.push(clearListener);\n exitConditions.push(aborted);\n }\n return Promise.race(exitConditions).then((result) => {\n for (const fn of finalize) {\n fn();\n }\n return result;\n });\n};\n", "export * from \"./createWaiter\";\nexport * from \"./waiter\";\n", "import { checkExceptions, createWaiter, WaiterState } from \"@smithy/util-waiter\";\nimport { HeadBucketCommand } from \"../commands/HeadBucketCommand\";\nconst checkState = async (client, input) => {\n let reason;\n try {\n let result = await client.send(new HeadBucketCommand(input));\n reason = result;\n return { state: WaiterState.SUCCESS, reason };\n }\n catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"NotFound\") {\n return { state: WaiterState.RETRY, reason };\n }\n }\n return { state: WaiterState.RETRY, reason };\n};\nexport const waitForBucketExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n return createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n};\nexport const waitUntilBucketExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n return checkExceptions(result);\n};\n", "import { checkExceptions, createWaiter, WaiterState } from \"@smithy/util-waiter\";\nimport { HeadBucketCommand } from \"../commands/HeadBucketCommand\";\nconst checkState = async (client, input) => {\n let reason;\n try {\n let result = await client.send(new HeadBucketCommand(input));\n reason = result;\n }\n catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"NotFound\") {\n return { state: WaiterState.SUCCESS, reason };\n }\n }\n return { state: WaiterState.RETRY, reason };\n};\nexport const waitForBucketNotExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n return createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n};\nexport const waitUntilBucketNotExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n return checkExceptions(result);\n};\n", "import { checkExceptions, createWaiter, WaiterState } from \"@smithy/util-waiter\";\nimport { HeadObjectCommand } from \"../commands/HeadObjectCommand\";\nconst checkState = async (client, input) => {\n let reason;\n try {\n let result = await client.send(new HeadObjectCommand(input));\n reason = result;\n return { state: WaiterState.SUCCESS, reason };\n }\n catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"NotFound\") {\n return { state: WaiterState.RETRY, reason };\n }\n }\n return { state: WaiterState.RETRY, reason };\n};\nexport const waitForObjectExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n return createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n};\nexport const waitUntilObjectExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n return checkExceptions(result);\n};\n", "import { checkExceptions, createWaiter, WaiterState } from \"@smithy/util-waiter\";\nimport { HeadObjectCommand } from \"../commands/HeadObjectCommand\";\nconst checkState = async (client, input) => {\n let reason;\n try {\n let result = await client.send(new HeadObjectCommand(input));\n reason = result;\n }\n catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"NotFound\") {\n return { state: WaiterState.SUCCESS, reason };\n }\n }\n return { state: WaiterState.RETRY, reason };\n};\nexport const waitForObjectNotExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n return createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n};\nexport const waitUntilObjectNotExists = async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);\n return checkExceptions(result);\n};\n", "import { createAggregatedClient } from \"@smithy/smithy-client\";\nimport { AbortMultipartUploadCommand, } from \"./commands/AbortMultipartUploadCommand\";\nimport { CompleteMultipartUploadCommand, } from \"./commands/CompleteMultipartUploadCommand\";\nimport { CopyObjectCommand } from \"./commands/CopyObjectCommand\";\nimport { CreateBucketCommand, } from \"./commands/CreateBucketCommand\";\nimport { CreateBucketMetadataConfigurationCommand, } from \"./commands/CreateBucketMetadataConfigurationCommand\";\nimport { CreateBucketMetadataTableConfigurationCommand, } from \"./commands/CreateBucketMetadataTableConfigurationCommand\";\nimport { CreateMultipartUploadCommand, } from \"./commands/CreateMultipartUploadCommand\";\nimport { CreateSessionCommand, } from \"./commands/CreateSessionCommand\";\nimport { DeleteBucketAnalyticsConfigurationCommand, } from \"./commands/DeleteBucketAnalyticsConfigurationCommand\";\nimport { DeleteBucketCommand, } from \"./commands/DeleteBucketCommand\";\nimport { DeleteBucketCorsCommand, } from \"./commands/DeleteBucketCorsCommand\";\nimport { DeleteBucketEncryptionCommand, } from \"./commands/DeleteBucketEncryptionCommand\";\nimport { DeleteBucketIntelligentTieringConfigurationCommand, } from \"./commands/DeleteBucketIntelligentTieringConfigurationCommand\";\nimport { DeleteBucketInventoryConfigurationCommand, } from \"./commands/DeleteBucketInventoryConfigurationCommand\";\nimport { DeleteBucketLifecycleCommand, } from \"./commands/DeleteBucketLifecycleCommand\";\nimport { DeleteBucketMetadataConfigurationCommand, } from \"./commands/DeleteBucketMetadataConfigurationCommand\";\nimport { DeleteBucketMetadataTableConfigurationCommand, } from \"./commands/DeleteBucketMetadataTableConfigurationCommand\";\nimport { DeleteBucketMetricsConfigurationCommand, } from \"./commands/DeleteBucketMetricsConfigurationCommand\";\nimport { DeleteBucketOwnershipControlsCommand, } from \"./commands/DeleteBucketOwnershipControlsCommand\";\nimport { DeleteBucketPolicyCommand, } from \"./commands/DeleteBucketPolicyCommand\";\nimport { DeleteBucketReplicationCommand, } from \"./commands/DeleteBucketReplicationCommand\";\nimport { DeleteBucketTaggingCommand, } from \"./commands/DeleteBucketTaggingCommand\";\nimport { DeleteBucketWebsiteCommand, } from \"./commands/DeleteBucketWebsiteCommand\";\nimport { DeleteObjectCommand, } from \"./commands/DeleteObjectCommand\";\nimport { DeleteObjectsCommand, } from \"./commands/DeleteObjectsCommand\";\nimport { DeleteObjectTaggingCommand, } from \"./commands/DeleteObjectTaggingCommand\";\nimport { DeletePublicAccessBlockCommand, } from \"./commands/DeletePublicAccessBlockCommand\";\nimport { GetBucketAbacCommand, } from \"./commands/GetBucketAbacCommand\";\nimport { GetBucketAccelerateConfigurationCommand, } from \"./commands/GetBucketAccelerateConfigurationCommand\";\nimport { GetBucketAclCommand, } from \"./commands/GetBucketAclCommand\";\nimport { GetBucketAnalyticsConfigurationCommand, } from \"./commands/GetBucketAnalyticsConfigurationCommand\";\nimport { GetBucketCorsCommand, } from \"./commands/GetBucketCorsCommand\";\nimport { GetBucketEncryptionCommand, } from \"./commands/GetBucketEncryptionCommand\";\nimport { GetBucketIntelligentTieringConfigurationCommand, } from \"./commands/GetBucketIntelligentTieringConfigurationCommand\";\nimport { GetBucketInventoryConfigurationCommand, } from \"./commands/GetBucketInventoryConfigurationCommand\";\nimport { GetBucketLifecycleConfigurationCommand, } from \"./commands/GetBucketLifecycleConfigurationCommand\";\nimport { GetBucketLocationCommand, } from \"./commands/GetBucketLocationCommand\";\nimport { GetBucketLoggingCommand, } from \"./commands/GetBucketLoggingCommand\";\nimport { GetBucketMetadataConfigurationCommand, } from \"./commands/GetBucketMetadataConfigurationCommand\";\nimport { GetBucketMetadataTableConfigurationCommand, } from \"./commands/GetBucketMetadataTableConfigurationCommand\";\nimport { GetBucketMetricsConfigurationCommand, } from \"./commands/GetBucketMetricsConfigurationCommand\";\nimport { GetBucketNotificationConfigurationCommand, } from \"./commands/GetBucketNotificationConfigurationCommand\";\nimport { GetBucketOwnershipControlsCommand, } from \"./commands/GetBucketOwnershipControlsCommand\";\nimport { GetBucketPolicyCommand, } from \"./commands/GetBucketPolicyCommand\";\nimport { GetBucketPolicyStatusCommand, } from \"./commands/GetBucketPolicyStatusCommand\";\nimport { GetBucketReplicationCommand, } from \"./commands/GetBucketReplicationCommand\";\nimport { GetBucketRequestPaymentCommand, } from \"./commands/GetBucketRequestPaymentCommand\";\nimport { GetBucketTaggingCommand, } from \"./commands/GetBucketTaggingCommand\";\nimport { GetBucketVersioningCommand, } from \"./commands/GetBucketVersioningCommand\";\nimport { GetBucketWebsiteCommand, } from \"./commands/GetBucketWebsiteCommand\";\nimport { GetObjectAclCommand, } from \"./commands/GetObjectAclCommand\";\nimport { GetObjectAttributesCommand, } from \"./commands/GetObjectAttributesCommand\";\nimport { GetObjectCommand } from \"./commands/GetObjectCommand\";\nimport { GetObjectLegalHoldCommand, } from \"./commands/GetObjectLegalHoldCommand\";\nimport { GetObjectLockConfigurationCommand, } from \"./commands/GetObjectLockConfigurationCommand\";\nimport { GetObjectRetentionCommand, } from \"./commands/GetObjectRetentionCommand\";\nimport { GetObjectTaggingCommand, } from \"./commands/GetObjectTaggingCommand\";\nimport { GetObjectTorrentCommand, } from \"./commands/GetObjectTorrentCommand\";\nimport { GetPublicAccessBlockCommand, } from \"./commands/GetPublicAccessBlockCommand\";\nimport { HeadBucketCommand } from \"./commands/HeadBucketCommand\";\nimport { HeadObjectCommand } from \"./commands/HeadObjectCommand\";\nimport { ListBucketAnalyticsConfigurationsCommand, } from \"./commands/ListBucketAnalyticsConfigurationsCommand\";\nimport { ListBucketIntelligentTieringConfigurationsCommand, } from \"./commands/ListBucketIntelligentTieringConfigurationsCommand\";\nimport { ListBucketInventoryConfigurationsCommand, } from \"./commands/ListBucketInventoryConfigurationsCommand\";\nimport { ListBucketMetricsConfigurationsCommand, } from \"./commands/ListBucketMetricsConfigurationsCommand\";\nimport { ListBucketsCommand } from \"./commands/ListBucketsCommand\";\nimport { ListDirectoryBucketsCommand, } from \"./commands/ListDirectoryBucketsCommand\";\nimport { ListMultipartUploadsCommand, } from \"./commands/ListMultipartUploadsCommand\";\nimport { ListObjectsCommand } from \"./commands/ListObjectsCommand\";\nimport { ListObjectsV2Command, } from \"./commands/ListObjectsV2Command\";\nimport { ListObjectVersionsCommand, } from \"./commands/ListObjectVersionsCommand\";\nimport { ListPartsCommand } from \"./commands/ListPartsCommand\";\nimport { PutBucketAbacCommand, } from \"./commands/PutBucketAbacCommand\";\nimport { PutBucketAccelerateConfigurationCommand, } from \"./commands/PutBucketAccelerateConfigurationCommand\";\nimport { PutBucketAclCommand, } from \"./commands/PutBucketAclCommand\";\nimport { PutBucketAnalyticsConfigurationCommand, } from \"./commands/PutBucketAnalyticsConfigurationCommand\";\nimport { PutBucketCorsCommand, } from \"./commands/PutBucketCorsCommand\";\nimport { PutBucketEncryptionCommand, } from \"./commands/PutBucketEncryptionCommand\";\nimport { PutBucketIntelligentTieringConfigurationCommand, } from \"./commands/PutBucketIntelligentTieringConfigurationCommand\";\nimport { PutBucketInventoryConfigurationCommand, } from \"./commands/PutBucketInventoryConfigurationCommand\";\nimport { PutBucketLifecycleConfigurationCommand, } from \"./commands/PutBucketLifecycleConfigurationCommand\";\nimport { PutBucketLoggingCommand, } from \"./commands/PutBucketLoggingCommand\";\nimport { PutBucketMetricsConfigurationCommand, } from \"./commands/PutBucketMetricsConfigurationCommand\";\nimport { PutBucketNotificationConfigurationCommand, } from \"./commands/PutBucketNotificationConfigurationCommand\";\nimport { PutBucketOwnershipControlsCommand, } from \"./commands/PutBucketOwnershipControlsCommand\";\nimport { PutBucketPolicyCommand, } from \"./commands/PutBucketPolicyCommand\";\nimport { PutBucketReplicationCommand, } from \"./commands/PutBucketReplicationCommand\";\nimport { PutBucketRequestPaymentCommand, } from \"./commands/PutBucketRequestPaymentCommand\";\nimport { PutBucketTaggingCommand, } from \"./commands/PutBucketTaggingCommand\";\nimport { PutBucketVersioningCommand, } from \"./commands/PutBucketVersioningCommand\";\nimport { PutBucketWebsiteCommand, } from \"./commands/PutBucketWebsiteCommand\";\nimport { PutObjectAclCommand, } from \"./commands/PutObjectAclCommand\";\nimport { PutObjectCommand } from \"./commands/PutObjectCommand\";\nimport { PutObjectLegalHoldCommand, } from \"./commands/PutObjectLegalHoldCommand\";\nimport { PutObjectLockConfigurationCommand, } from \"./commands/PutObjectLockConfigurationCommand\";\nimport { PutObjectRetentionCommand, } from \"./commands/PutObjectRetentionCommand\";\nimport { PutObjectTaggingCommand, } from \"./commands/PutObjectTaggingCommand\";\nimport { PutPublicAccessBlockCommand, } from \"./commands/PutPublicAccessBlockCommand\";\nimport { RenameObjectCommand, } from \"./commands/RenameObjectCommand\";\nimport { RestoreObjectCommand, } from \"./commands/RestoreObjectCommand\";\nimport { SelectObjectContentCommand, } from \"./commands/SelectObjectContentCommand\";\nimport { UpdateBucketMetadataInventoryTableConfigurationCommand, } from \"./commands/UpdateBucketMetadataInventoryTableConfigurationCommand\";\nimport { UpdateBucketMetadataJournalTableConfigurationCommand, } from \"./commands/UpdateBucketMetadataJournalTableConfigurationCommand\";\nimport { UpdateObjectEncryptionCommand, } from \"./commands/UpdateObjectEncryptionCommand\";\nimport { UploadPartCommand } from \"./commands/UploadPartCommand\";\nimport { UploadPartCopyCommand, } from \"./commands/UploadPartCopyCommand\";\nimport { WriteGetObjectResponseCommand, } from \"./commands/WriteGetObjectResponseCommand\";\nimport { paginateListBuckets } from \"./pagination/ListBucketsPaginator\";\nimport { paginateListDirectoryBuckets } from \"./pagination/ListDirectoryBucketsPaginator\";\nimport { paginateListObjectsV2 } from \"./pagination/ListObjectsV2Paginator\";\nimport { paginateListParts } from \"./pagination/ListPartsPaginator\";\nimport { S3Client } from \"./S3Client\";\nimport { waitUntilBucketExists } from \"./waiters/waitForBucketExists\";\nimport { waitUntilBucketNotExists } from \"./waiters/waitForBucketNotExists\";\nimport { waitUntilObjectExists } from \"./waiters/waitForObjectExists\";\nimport { waitUntilObjectNotExists } from \"./waiters/waitForObjectNotExists\";\nconst commands = {\n AbortMultipartUploadCommand,\n CompleteMultipartUploadCommand,\n CopyObjectCommand,\n CreateBucketCommand,\n CreateBucketMetadataConfigurationCommand,\n CreateBucketMetadataTableConfigurationCommand,\n CreateMultipartUploadCommand,\n CreateSessionCommand,\n DeleteBucketCommand,\n DeleteBucketAnalyticsConfigurationCommand,\n DeleteBucketCorsCommand,\n DeleteBucketEncryptionCommand,\n DeleteBucketIntelligentTieringConfigurationCommand,\n DeleteBucketInventoryConfigurationCommand,\n DeleteBucketLifecycleCommand,\n DeleteBucketMetadataConfigurationCommand,\n DeleteBucketMetadataTableConfigurationCommand,\n DeleteBucketMetricsConfigurationCommand,\n DeleteBucketOwnershipControlsCommand,\n DeleteBucketPolicyCommand,\n DeleteBucketReplicationCommand,\n DeleteBucketTaggingCommand,\n DeleteBucketWebsiteCommand,\n DeleteObjectCommand,\n DeleteObjectsCommand,\n DeleteObjectTaggingCommand,\n DeletePublicAccessBlockCommand,\n GetBucketAbacCommand,\n GetBucketAccelerateConfigurationCommand,\n GetBucketAclCommand,\n GetBucketAnalyticsConfigurationCommand,\n GetBucketCorsCommand,\n GetBucketEncryptionCommand,\n GetBucketIntelligentTieringConfigurationCommand,\n GetBucketInventoryConfigurationCommand,\n GetBucketLifecycleConfigurationCommand,\n GetBucketLocationCommand,\n GetBucketLoggingCommand,\n GetBucketMetadataConfigurationCommand,\n GetBucketMetadataTableConfigurationCommand,\n GetBucketMetricsConfigurationCommand,\n GetBucketNotificationConfigurationCommand,\n GetBucketOwnershipControlsCommand,\n GetBucketPolicyCommand,\n GetBucketPolicyStatusCommand,\n GetBucketReplicationCommand,\n GetBucketRequestPaymentCommand,\n GetBucketTaggingCommand,\n GetBucketVersioningCommand,\n GetBucketWebsiteCommand,\n GetObjectCommand,\n GetObjectAclCommand,\n GetObjectAttributesCommand,\n GetObjectLegalHoldCommand,\n GetObjectLockConfigurationCommand,\n GetObjectRetentionCommand,\n GetObjectTaggingCommand,\n GetObjectTorrentCommand,\n GetPublicAccessBlockCommand,\n HeadBucketCommand,\n HeadObjectCommand,\n ListBucketAnalyticsConfigurationsCommand,\n ListBucketIntelligentTieringConfigurationsCommand,\n ListBucketInventoryConfigurationsCommand,\n ListBucketMetricsConfigurationsCommand,\n ListBucketsCommand,\n ListDirectoryBucketsCommand,\n ListMultipartUploadsCommand,\n ListObjectsCommand,\n ListObjectsV2Command,\n ListObjectVersionsCommand,\n ListPartsCommand,\n PutBucketAbacCommand,\n PutBucketAccelerateConfigurationCommand,\n PutBucketAclCommand,\n PutBucketAnalyticsConfigurationCommand,\n PutBucketCorsCommand,\n PutBucketEncryptionCommand,\n PutBucketIntelligentTieringConfigurationCommand,\n PutBucketInventoryConfigurationCommand,\n PutBucketLifecycleConfigurationCommand,\n PutBucketLoggingCommand,\n PutBucketMetricsConfigurationCommand,\n PutBucketNotificationConfigurationCommand,\n PutBucketOwnershipControlsCommand,\n PutBucketPolicyCommand,\n PutBucketReplicationCommand,\n PutBucketRequestPaymentCommand,\n PutBucketTaggingCommand,\n PutBucketVersioningCommand,\n PutBucketWebsiteCommand,\n PutObjectCommand,\n PutObjectAclCommand,\n PutObjectLegalHoldCommand,\n PutObjectLockConfigurationCommand,\n PutObjectRetentionCommand,\n PutObjectTaggingCommand,\n PutPublicAccessBlockCommand,\n RenameObjectCommand,\n RestoreObjectCommand,\n SelectObjectContentCommand,\n UpdateBucketMetadataInventoryTableConfigurationCommand,\n UpdateBucketMetadataJournalTableConfigurationCommand,\n UpdateObjectEncryptionCommand,\n UploadPartCommand,\n UploadPartCopyCommand,\n WriteGetObjectResponseCommand,\n};\nconst paginators = {\n paginateListBuckets,\n paginateListDirectoryBuckets,\n paginateListObjectsV2,\n paginateListParts,\n};\nconst waiters = {\n waitUntilBucketExists,\n waitUntilBucketNotExists,\n waitUntilObjectExists,\n waitUntilObjectNotExists,\n};\nexport class S3 extends S3Client {\n}\ncreateAggregatedClient(commands, S3, { paginators, waiters });\n", "export * from \"./AbortMultipartUploadCommand\";\nexport * from \"./CompleteMultipartUploadCommand\";\nexport * from \"./CopyObjectCommand\";\nexport * from \"./CreateBucketCommand\";\nexport * from \"./CreateBucketMetadataConfigurationCommand\";\nexport * from \"./CreateBucketMetadataTableConfigurationCommand\";\nexport * from \"./CreateMultipartUploadCommand\";\nexport * from \"./CreateSessionCommand\";\nexport * from \"./DeleteBucketAnalyticsConfigurationCommand\";\nexport * from \"./DeleteBucketCommand\";\nexport * from \"./DeleteBucketCorsCommand\";\nexport * from \"./DeleteBucketEncryptionCommand\";\nexport * from \"./DeleteBucketIntelligentTieringConfigurationCommand\";\nexport * from \"./DeleteBucketInventoryConfigurationCommand\";\nexport * from \"./DeleteBucketLifecycleCommand\";\nexport * from \"./DeleteBucketMetadataConfigurationCommand\";\nexport * from \"./DeleteBucketMetadataTableConfigurationCommand\";\nexport * from \"./DeleteBucketMetricsConfigurationCommand\";\nexport * from \"./DeleteBucketOwnershipControlsCommand\";\nexport * from \"./DeleteBucketPolicyCommand\";\nexport * from \"./DeleteBucketReplicationCommand\";\nexport * from \"./DeleteBucketTaggingCommand\";\nexport * from \"./DeleteBucketWebsiteCommand\";\nexport * from \"./DeleteObjectCommand\";\nexport * from \"./DeleteObjectTaggingCommand\";\nexport * from \"./DeleteObjectsCommand\";\nexport * from \"./DeletePublicAccessBlockCommand\";\nexport * from \"./GetBucketAbacCommand\";\nexport * from \"./GetBucketAccelerateConfigurationCommand\";\nexport * from \"./GetBucketAclCommand\";\nexport * from \"./GetBucketAnalyticsConfigurationCommand\";\nexport * from \"./GetBucketCorsCommand\";\nexport * from \"./GetBucketEncryptionCommand\";\nexport * from \"./GetBucketIntelligentTieringConfigurationCommand\";\nexport * from \"./GetBucketInventoryConfigurationCommand\";\nexport * from \"./GetBucketLifecycleConfigurationCommand\";\nexport * from \"./GetBucketLocationCommand\";\nexport * from \"./GetBucketLoggingCommand\";\nexport * from \"./GetBucketMetadataConfigurationCommand\";\nexport * from \"./GetBucketMetadataTableConfigurationCommand\";\nexport * from \"./GetBucketMetricsConfigurationCommand\";\nexport * from \"./GetBucketNotificationConfigurationCommand\";\nexport * from \"./GetBucketOwnershipControlsCommand\";\nexport * from \"./GetBucketPolicyCommand\";\nexport * from \"./GetBucketPolicyStatusCommand\";\nexport * from \"./GetBucketReplicationCommand\";\nexport * from \"./GetBucketRequestPaymentCommand\";\nexport * from \"./GetBucketTaggingCommand\";\nexport * from \"./GetBucketVersioningCommand\";\nexport * from \"./GetBucketWebsiteCommand\";\nexport * from \"./GetObjectAclCommand\";\nexport * from \"./GetObjectAttributesCommand\";\nexport * from \"./GetObjectCommand\";\nexport * from \"./GetObjectLegalHoldCommand\";\nexport * from \"./GetObjectLockConfigurationCommand\";\nexport * from \"./GetObjectRetentionCommand\";\nexport * from \"./GetObjectTaggingCommand\";\nexport * from \"./GetObjectTorrentCommand\";\nexport * from \"./GetPublicAccessBlockCommand\";\nexport * from \"./HeadBucketCommand\";\nexport * from \"./HeadObjectCommand\";\nexport * from \"./ListBucketAnalyticsConfigurationsCommand\";\nexport * from \"./ListBucketIntelligentTieringConfigurationsCommand\";\nexport * from \"./ListBucketInventoryConfigurationsCommand\";\nexport * from \"./ListBucketMetricsConfigurationsCommand\";\nexport * from \"./ListBucketsCommand\";\nexport * from \"./ListDirectoryBucketsCommand\";\nexport * from \"./ListMultipartUploadsCommand\";\nexport * from \"./ListObjectVersionsCommand\";\nexport * from \"./ListObjectsCommand\";\nexport * from \"./ListObjectsV2Command\";\nexport * from \"./ListPartsCommand\";\nexport * from \"./PutBucketAbacCommand\";\nexport * from \"./PutBucketAccelerateConfigurationCommand\";\nexport * from \"./PutBucketAclCommand\";\nexport * from \"./PutBucketAnalyticsConfigurationCommand\";\nexport * from \"./PutBucketCorsCommand\";\nexport * from \"./PutBucketEncryptionCommand\";\nexport * from \"./PutBucketIntelligentTieringConfigurationCommand\";\nexport * from \"./PutBucketInventoryConfigurationCommand\";\nexport * from \"./PutBucketLifecycleConfigurationCommand\";\nexport * from \"./PutBucketLoggingCommand\";\nexport * from \"./PutBucketMetricsConfigurationCommand\";\nexport * from \"./PutBucketNotificationConfigurationCommand\";\nexport * from \"./PutBucketOwnershipControlsCommand\";\nexport * from \"./PutBucketPolicyCommand\";\nexport * from \"./PutBucketReplicationCommand\";\nexport * from \"./PutBucketRequestPaymentCommand\";\nexport * from \"./PutBucketTaggingCommand\";\nexport * from \"./PutBucketVersioningCommand\";\nexport * from \"./PutBucketWebsiteCommand\";\nexport * from \"./PutObjectAclCommand\";\nexport * from \"./PutObjectCommand\";\nexport * from \"./PutObjectLegalHoldCommand\";\nexport * from \"./PutObjectLockConfigurationCommand\";\nexport * from \"./PutObjectRetentionCommand\";\nexport * from \"./PutObjectTaggingCommand\";\nexport * from \"./PutPublicAccessBlockCommand\";\nexport * from \"./RenameObjectCommand\";\nexport * from \"./RestoreObjectCommand\";\nexport * from \"./SelectObjectContentCommand\";\nexport * from \"./UpdateBucketMetadataInventoryTableConfigurationCommand\";\nexport * from \"./UpdateBucketMetadataJournalTableConfigurationCommand\";\nexport * from \"./UpdateObjectEncryptionCommand\";\nexport * from \"./UploadPartCommand\";\nexport * from \"./UploadPartCopyCommand\";\nexport * from \"./WriteGetObjectResponseCommand\";\n", "export {};\n", "export * from \"./Interfaces\";\nexport * from \"./ListBucketsPaginator\";\nexport * from \"./ListDirectoryBucketsPaginator\";\nexport * from \"./ListObjectsV2Paginator\";\nexport * from \"./ListPartsPaginator\";\n", "export * from \"./waitForBucketExists\";\nexport * from \"./waitForBucketNotExists\";\nexport * from \"./waitForObjectExists\";\nexport * from \"./waitForObjectNotExists\";\n", "export const BucketAbacStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const RequestCharged = {\n requester: \"requester\",\n};\nexport const RequestPayer = {\n requester: \"requester\",\n};\nexport const BucketAccelerateStatus = {\n Enabled: \"Enabled\",\n Suspended: \"Suspended\",\n};\nexport const Type = {\n AmazonCustomerByEmail: \"AmazonCustomerByEmail\",\n CanonicalUser: \"CanonicalUser\",\n Group: \"Group\",\n};\nexport const Permission = {\n FULL_CONTROL: \"FULL_CONTROL\",\n READ: \"READ\",\n READ_ACP: \"READ_ACP\",\n WRITE: \"WRITE\",\n WRITE_ACP: \"WRITE_ACP\",\n};\nexport const OwnerOverride = {\n Destination: \"Destination\",\n};\nexport const ChecksumType = {\n COMPOSITE: \"COMPOSITE\",\n FULL_OBJECT: \"FULL_OBJECT\",\n};\nexport const ServerSideEncryption = {\n AES256: \"AES256\",\n aws_fsx: \"aws:fsx\",\n aws_kms: \"aws:kms\",\n aws_kms_dsse: \"aws:kms:dsse\",\n};\nexport const ObjectCannedACL = {\n authenticated_read: \"authenticated-read\",\n aws_exec_read: \"aws-exec-read\",\n bucket_owner_full_control: \"bucket-owner-full-control\",\n bucket_owner_read: \"bucket-owner-read\",\n private: \"private\",\n public_read: \"public-read\",\n public_read_write: \"public-read-write\",\n};\nexport const ChecksumAlgorithm = {\n CRC32: \"CRC32\",\n CRC32C: \"CRC32C\",\n CRC64NVME: \"CRC64NVME\",\n SHA1: \"SHA1\",\n SHA256: \"SHA256\",\n};\nexport const MetadataDirective = {\n COPY: \"COPY\",\n REPLACE: \"REPLACE\",\n};\nexport const ObjectLockLegalHoldStatus = {\n OFF: \"OFF\",\n ON: \"ON\",\n};\nexport const ObjectLockMode = {\n COMPLIANCE: \"COMPLIANCE\",\n GOVERNANCE: \"GOVERNANCE\",\n};\nexport const StorageClass = {\n DEEP_ARCHIVE: \"DEEP_ARCHIVE\",\n EXPRESS_ONEZONE: \"EXPRESS_ONEZONE\",\n FSX_ONTAP: \"FSX_ONTAP\",\n FSX_OPENZFS: \"FSX_OPENZFS\",\n GLACIER: \"GLACIER\",\n GLACIER_IR: \"GLACIER_IR\",\n INTELLIGENT_TIERING: \"INTELLIGENT_TIERING\",\n ONEZONE_IA: \"ONEZONE_IA\",\n OUTPOSTS: \"OUTPOSTS\",\n REDUCED_REDUNDANCY: \"REDUCED_REDUNDANCY\",\n SNOW: \"SNOW\",\n STANDARD: \"STANDARD\",\n STANDARD_IA: \"STANDARD_IA\",\n};\nexport const TaggingDirective = {\n COPY: \"COPY\",\n REPLACE: \"REPLACE\",\n};\nexport const BucketCannedACL = {\n authenticated_read: \"authenticated-read\",\n private: \"private\",\n public_read: \"public-read\",\n public_read_write: \"public-read-write\",\n};\nexport const BucketNamespace = {\n ACCOUNT_REGIONAL: \"account-regional\",\n GLOBAL: \"global\",\n};\nexport const DataRedundancy = {\n SingleAvailabilityZone: \"SingleAvailabilityZone\",\n SingleLocalZone: \"SingleLocalZone\",\n};\nexport const BucketType = {\n Directory: \"Directory\",\n};\nexport const LocationType = {\n AvailabilityZone: \"AvailabilityZone\",\n LocalZone: \"LocalZone\",\n};\nexport const BucketLocationConstraint = {\n EU: \"EU\",\n af_south_1: \"af-south-1\",\n ap_east_1: \"ap-east-1\",\n ap_northeast_1: \"ap-northeast-1\",\n ap_northeast_2: \"ap-northeast-2\",\n ap_northeast_3: \"ap-northeast-3\",\n ap_south_1: \"ap-south-1\",\n ap_south_2: \"ap-south-2\",\n ap_southeast_1: \"ap-southeast-1\",\n ap_southeast_2: \"ap-southeast-2\",\n ap_southeast_3: \"ap-southeast-3\",\n ap_southeast_4: \"ap-southeast-4\",\n ap_southeast_5: \"ap-southeast-5\",\n ca_central_1: \"ca-central-1\",\n cn_north_1: \"cn-north-1\",\n cn_northwest_1: \"cn-northwest-1\",\n eu_central_1: \"eu-central-1\",\n eu_central_2: \"eu-central-2\",\n eu_north_1: \"eu-north-1\",\n eu_south_1: \"eu-south-1\",\n eu_south_2: \"eu-south-2\",\n eu_west_1: \"eu-west-1\",\n eu_west_2: \"eu-west-2\",\n eu_west_3: \"eu-west-3\",\n il_central_1: \"il-central-1\",\n me_central_1: \"me-central-1\",\n me_south_1: \"me-south-1\",\n sa_east_1: \"sa-east-1\",\n us_east_2: \"us-east-2\",\n us_gov_east_1: \"us-gov-east-1\",\n us_gov_west_1: \"us-gov-west-1\",\n us_west_1: \"us-west-1\",\n us_west_2: \"us-west-2\",\n};\nexport const ObjectOwnership = {\n BucketOwnerEnforced: \"BucketOwnerEnforced\",\n BucketOwnerPreferred: \"BucketOwnerPreferred\",\n ObjectWriter: \"ObjectWriter\",\n};\nexport const InventoryConfigurationState = {\n DISABLED: \"DISABLED\",\n ENABLED: \"ENABLED\",\n};\nexport const TableSseAlgorithm = {\n AES256: \"AES256\",\n aws_kms: \"aws:kms\",\n};\nexport const ExpirationState = {\n DISABLED: \"DISABLED\",\n ENABLED: \"ENABLED\",\n};\nexport const SessionMode = {\n ReadOnly: \"ReadOnly\",\n ReadWrite: \"ReadWrite\",\n};\nexport const AnalyticsS3ExportFileFormat = {\n CSV: \"CSV\",\n};\nexport const StorageClassAnalysisSchemaVersion = {\n V_1: \"V_1\",\n};\nexport const EncryptionType = {\n NONE: \"NONE\",\n SSE_C: \"SSE-C\",\n};\nexport const IntelligentTieringStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const IntelligentTieringAccessTier = {\n ARCHIVE_ACCESS: \"ARCHIVE_ACCESS\",\n DEEP_ARCHIVE_ACCESS: \"DEEP_ARCHIVE_ACCESS\",\n};\nexport const InventoryFormat = {\n CSV: \"CSV\",\n ORC: \"ORC\",\n Parquet: \"Parquet\",\n};\nexport const InventoryIncludedObjectVersions = {\n All: \"All\",\n Current: \"Current\",\n};\nexport const InventoryOptionalField = {\n BucketKeyStatus: \"BucketKeyStatus\",\n ChecksumAlgorithm: \"ChecksumAlgorithm\",\n ETag: \"ETag\",\n EncryptionStatus: \"EncryptionStatus\",\n IntelligentTieringAccessTier: \"IntelligentTieringAccessTier\",\n IsMultipartUploaded: \"IsMultipartUploaded\",\n LastModifiedDate: \"LastModifiedDate\",\n LifecycleExpirationDate: \"LifecycleExpirationDate\",\n ObjectAccessControlList: \"ObjectAccessControlList\",\n ObjectLockLegalHoldStatus: \"ObjectLockLegalHoldStatus\",\n ObjectLockMode: \"ObjectLockMode\",\n ObjectLockRetainUntilDate: \"ObjectLockRetainUntilDate\",\n ObjectOwner: \"ObjectOwner\",\n ReplicationStatus: \"ReplicationStatus\",\n Size: \"Size\",\n StorageClass: \"StorageClass\",\n};\nexport const InventoryFrequency = {\n Daily: \"Daily\",\n Weekly: \"Weekly\",\n};\nexport const TransitionStorageClass = {\n DEEP_ARCHIVE: \"DEEP_ARCHIVE\",\n GLACIER: \"GLACIER\",\n GLACIER_IR: \"GLACIER_IR\",\n INTELLIGENT_TIERING: \"INTELLIGENT_TIERING\",\n ONEZONE_IA: \"ONEZONE_IA\",\n STANDARD_IA: \"STANDARD_IA\",\n};\nexport const ExpirationStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const TransitionDefaultMinimumObjectSize = {\n all_storage_classes_128K: \"all_storage_classes_128K\",\n varies_by_storage_class: \"varies_by_storage_class\",\n};\nexport const BucketLogsPermission = {\n FULL_CONTROL: \"FULL_CONTROL\",\n READ: \"READ\",\n WRITE: \"WRITE\",\n};\nexport const PartitionDateSource = {\n DeliveryTime: \"DeliveryTime\",\n EventTime: \"EventTime\",\n};\nexport const S3TablesBucketType = {\n aws: \"aws\",\n customer: \"customer\",\n};\nexport const Event = {\n s3_IntelligentTiering: \"s3:IntelligentTiering\",\n s3_LifecycleExpiration_: \"s3:LifecycleExpiration:*\",\n s3_LifecycleExpiration_Delete: \"s3:LifecycleExpiration:Delete\",\n s3_LifecycleExpiration_DeleteMarkerCreated: \"s3:LifecycleExpiration:DeleteMarkerCreated\",\n s3_LifecycleTransition: \"s3:LifecycleTransition\",\n s3_ObjectAcl_Put: \"s3:ObjectAcl:Put\",\n s3_ObjectCreated_: \"s3:ObjectCreated:*\",\n s3_ObjectCreated_CompleteMultipartUpload: \"s3:ObjectCreated:CompleteMultipartUpload\",\n s3_ObjectCreated_Copy: \"s3:ObjectCreated:Copy\",\n s3_ObjectCreated_Post: \"s3:ObjectCreated:Post\",\n s3_ObjectCreated_Put: \"s3:ObjectCreated:Put\",\n s3_ObjectRemoved_: \"s3:ObjectRemoved:*\",\n s3_ObjectRemoved_Delete: \"s3:ObjectRemoved:Delete\",\n s3_ObjectRemoved_DeleteMarkerCreated: \"s3:ObjectRemoved:DeleteMarkerCreated\",\n s3_ObjectRestore_: \"s3:ObjectRestore:*\",\n s3_ObjectRestore_Completed: \"s3:ObjectRestore:Completed\",\n s3_ObjectRestore_Delete: \"s3:ObjectRestore:Delete\",\n s3_ObjectRestore_Post: \"s3:ObjectRestore:Post\",\n s3_ObjectTagging_: \"s3:ObjectTagging:*\",\n s3_ObjectTagging_Delete: \"s3:ObjectTagging:Delete\",\n s3_ObjectTagging_Put: \"s3:ObjectTagging:Put\",\n s3_ReducedRedundancyLostObject: \"s3:ReducedRedundancyLostObject\",\n s3_Replication_: \"s3:Replication:*\",\n s3_Replication_OperationFailedReplication: \"s3:Replication:OperationFailedReplication\",\n s3_Replication_OperationMissedThreshold: \"s3:Replication:OperationMissedThreshold\",\n s3_Replication_OperationNotTracked: \"s3:Replication:OperationNotTracked\",\n s3_Replication_OperationReplicatedAfterThreshold: \"s3:Replication:OperationReplicatedAfterThreshold\",\n};\nexport const FilterRuleName = {\n prefix: \"prefix\",\n suffix: \"suffix\",\n};\nexport const DeleteMarkerReplicationStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const MetricsStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const ReplicationTimeStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const ExistingObjectReplicationStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const ReplicaModificationsStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const SseKmsEncryptedObjectsStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const ReplicationRuleStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const Payer = {\n BucketOwner: \"BucketOwner\",\n Requester: \"Requester\",\n};\nexport const MFADeleteStatus = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const BucketVersioningStatus = {\n Enabled: \"Enabled\",\n Suspended: \"Suspended\",\n};\nexport const Protocol = {\n http: \"http\",\n https: \"https\",\n};\nexport const ReplicationStatus = {\n COMPLETE: \"COMPLETE\",\n COMPLETED: \"COMPLETED\",\n FAILED: \"FAILED\",\n PENDING: \"PENDING\",\n REPLICA: \"REPLICA\",\n};\nexport const ChecksumMode = {\n ENABLED: \"ENABLED\",\n};\nexport const ObjectAttributes = {\n CHECKSUM: \"Checksum\",\n ETAG: \"ETag\",\n OBJECT_PARTS: \"ObjectParts\",\n OBJECT_SIZE: \"ObjectSize\",\n STORAGE_CLASS: \"StorageClass\",\n};\nexport const ObjectLockEnabled = {\n Enabled: \"Enabled\",\n};\nexport const ObjectLockRetentionMode = {\n COMPLIANCE: \"COMPLIANCE\",\n GOVERNANCE: \"GOVERNANCE\",\n};\nexport const ArchiveStatus = {\n ARCHIVE_ACCESS: \"ARCHIVE_ACCESS\",\n DEEP_ARCHIVE_ACCESS: \"DEEP_ARCHIVE_ACCESS\",\n};\nexport const EncodingType = {\n url: \"url\",\n};\nexport const ObjectStorageClass = {\n DEEP_ARCHIVE: \"DEEP_ARCHIVE\",\n EXPRESS_ONEZONE: \"EXPRESS_ONEZONE\",\n FSX_ONTAP: \"FSX_ONTAP\",\n FSX_OPENZFS: \"FSX_OPENZFS\",\n GLACIER: \"GLACIER\",\n GLACIER_IR: \"GLACIER_IR\",\n INTELLIGENT_TIERING: \"INTELLIGENT_TIERING\",\n ONEZONE_IA: \"ONEZONE_IA\",\n OUTPOSTS: \"OUTPOSTS\",\n REDUCED_REDUNDANCY: \"REDUCED_REDUNDANCY\",\n SNOW: \"SNOW\",\n STANDARD: \"STANDARD\",\n STANDARD_IA: \"STANDARD_IA\",\n};\nexport const OptionalObjectAttributes = {\n RESTORE_STATUS: \"RestoreStatus\",\n};\nexport const ObjectVersionStorageClass = {\n STANDARD: \"STANDARD\",\n};\nexport const MFADelete = {\n Disabled: \"Disabled\",\n Enabled: \"Enabled\",\n};\nexport const Tier = {\n Bulk: \"Bulk\",\n Expedited: \"Expedited\",\n Standard: \"Standard\",\n};\nexport const ExpressionType = {\n SQL: \"SQL\",\n};\nexport const CompressionType = {\n BZIP2: \"BZIP2\",\n GZIP: \"GZIP\",\n NONE: \"NONE\",\n};\nexport const FileHeaderInfo = {\n IGNORE: \"IGNORE\",\n NONE: \"NONE\",\n USE: \"USE\",\n};\nexport const JSONType = {\n DOCUMENT: \"DOCUMENT\",\n LINES: \"LINES\",\n};\nexport const QuoteFields = {\n ALWAYS: \"ALWAYS\",\n ASNEEDED: \"ASNEEDED\",\n};\nexport const RestoreRequestType = {\n SELECT: \"SELECT\",\n};\n", "export {};\n", "export {};\n", "export * from \"./S3Client\";\nexport * from \"./S3\";\nexport * from \"./commands\";\nexport * from \"./schemas/schemas_0\";\nexport * from \"./pagination\";\nexport * from \"./waiters\";\nexport * from \"./models/enums\";\nexport * from \"./models/errors\";\nexport * from \"./models/models_0\";\nexport * from \"./models/models_1\";\nexport { S3ServiceException } from \"./models/S3ServiceException\";\n", "import { buildQueryString } from \"@smithy/querystring-builder\";\nexport function formatUrl(request) {\n const { port, query } = request;\n let { protocol, path, hostname } = request;\n if (protocol && protocol.slice(-1) !== \":\") {\n protocol += \":\";\n }\n if (port) {\n hostname += `:${port}`;\n }\n if (path && path.charAt(0) !== \"/\") {\n path = `/${path}`;\n }\n let queryString = query ? buildQueryString(query) : \"\";\n if (queryString && queryString[0] !== \"?\") {\n queryString = `?${queryString}`;\n }\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n let fragment = \"\";\n if (request.fragment) {\n fragment = `#${request.fragment}`;\n }\n return `${protocol}//${auth}${hostname}${path}${queryString}${fragment}`;\n}\n", "export const UNSIGNED_PAYLOAD = \"UNSIGNED-PAYLOAD\";\nexport const SHA256_HEADER = \"X-Amz-Content-Sha256\";\nexport const ALGORITHM_QUERY_PARAM = \"X-Amz-Algorithm\";\nexport const CREDENTIAL_QUERY_PARAM = \"X-Amz-Credential\";\nexport const AMZ_DATE_QUERY_PARAM = \"X-Amz-Date\";\nexport const SIGNED_HEADERS_QUERY_PARAM = \"X-Amz-SignedHeaders\";\nexport const EXPIRES_QUERY_PARAM = \"X-Amz-Expires\";\nexport const HOST_HEADER = \"host\";\nexport const ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256\";\n", "import { SignatureV4MultiRegion } from \"@aws-sdk/signature-v4-multi-region\";\nimport { SHA256_HEADER, UNSIGNED_PAYLOAD } from \"./constants\";\nexport class S3RequestPresigner {\n signer;\n constructor(options) {\n const resolvedOptions = {\n service: options.signingName || options.service || \"s3\",\n uriEscapePath: options.uriEscapePath || false,\n applyChecksum: options.applyChecksum || false,\n ...options,\n };\n this.signer = new SignatureV4MultiRegion(resolvedOptions);\n }\n presign(requestToSign, { unsignableHeaders = new Set(), hoistableHeaders = new Set(), unhoistableHeaders = new Set(), ...options } = {}) {\n this.prepareRequest(requestToSign, {\n unsignableHeaders,\n unhoistableHeaders,\n hoistableHeaders,\n });\n return this.signer.presign(requestToSign, {\n expiresIn: 900,\n unsignableHeaders,\n unhoistableHeaders,\n ...options,\n });\n }\n presignWithCredentials(requestToSign, credentials, { unsignableHeaders = new Set(), hoistableHeaders = new Set(), unhoistableHeaders = new Set(), ...options } = {}) {\n this.prepareRequest(requestToSign, {\n unsignableHeaders,\n unhoistableHeaders,\n hoistableHeaders,\n });\n return this.signer.presignWithCredentials(requestToSign, credentials, {\n expiresIn: 900,\n unsignableHeaders,\n unhoistableHeaders,\n ...options,\n });\n }\n prepareRequest(requestToSign, { unsignableHeaders = new Set(), unhoistableHeaders = new Set(), hoistableHeaders = new Set(), } = {}) {\n unsignableHeaders.add(\"content-type\");\n Object.keys(requestToSign.headers)\n .map((header) => header.toLowerCase())\n .filter((header) => header.startsWith(\"x-amz-server-side-encryption\"))\n .forEach((header) => {\n if (!hoistableHeaders.has(header)) {\n unhoistableHeaders.add(header);\n }\n });\n requestToSign.headers[SHA256_HEADER] = UNSIGNED_PAYLOAD;\n const currentHostHeader = requestToSign.headers.host;\n const port = requestToSign.port;\n const expectedHostHeader = `${requestToSign.hostname}${requestToSign.port != null ? \":\" + port : \"\"}`;\n if (!currentHostHeader || (currentHostHeader === requestToSign.hostname && requestToSign.port != null)) {\n requestToSign.headers.host = expectedHostHeader;\n }\n }\n}\n", "import { formatUrl } from \"@aws-sdk/util-format-url\";\nimport { getEndpointFromInstructions } from \"@smithy/middleware-endpoint\";\nimport { HttpRequest } from \"@smithy/protocol-http\";\nimport { S3RequestPresigner } from \"./presigner\";\nexport const getSignedUrl = async (client, command, options = {}) => {\n let s3Presigner;\n let region;\n if (typeof client.config.endpointProvider === \"function\") {\n const endpointV2 = await getEndpointFromInstructions(command.input, command.constructor, client.config);\n const authScheme = endpointV2.properties?.authSchemes?.[0];\n if (authScheme?.name === \"sigv4a\") {\n region = authScheme?.signingRegionSet?.join(\",\");\n }\n else {\n region = authScheme?.signingRegion;\n }\n s3Presigner = new S3RequestPresigner({\n ...client.config,\n signingName: authScheme?.signingName,\n region: async () => region,\n });\n }\n else {\n s3Presigner = new S3RequestPresigner(client.config);\n }\n const presignInterceptMiddleware = (next, context) => async (args) => {\n const { request } = args;\n if (!HttpRequest.isInstance(request)) {\n throw new Error(\"Request to be presigned is not an valid HTTP request.\");\n }\n delete request.headers[\"amz-sdk-invocation-id\"];\n delete request.headers[\"amz-sdk-request\"];\n delete request.headers[\"x-amz-user-agent\"];\n let presigned;\n const presignerOptions = {\n ...options,\n signingRegion: options.signingRegion ?? context[\"signing_region\"] ?? region,\n signingService: options.signingService ?? context[\"signing_service\"],\n };\n if (context.s3ExpressIdentity) {\n presigned = await s3Presigner.presignWithCredentials(request, context.s3ExpressIdentity, presignerOptions);\n }\n else {\n presigned = await s3Presigner.presign(request, presignerOptions);\n }\n return {\n response: {},\n output: {\n $metadata: { httpStatusCode: 200 },\n presigned,\n },\n };\n };\n const middlewareName = \"presignInterceptMiddleware\";\n const clientStack = client.middlewareStack.clone();\n clientStack.addRelativeTo(presignInterceptMiddleware, {\n name: middlewareName,\n relation: \"before\",\n toMiddleware: \"awsAuthMiddleware\",\n override: true,\n });\n const handler = command.resolveMiddleware(clientStack, client.config, {});\n const { output } = await handler({ input: command.input });\n const { presigned } = output;\n return formatUrl(presigned);\n};\n", "export * from \"./getSignedUrl\";\nexport * from \"./presigner\";\n", "// import { s3A, awsBucketName, awsRegion, awsSecretAccessKey } from \"@/src/lib/env-exporter\"\nimport { DeleteObjectCommand, DeleteObjectsCommand, PutObjectCommand, S3Client, GetObjectCommand } from \"@aws-sdk/client-s3\"\nimport { getSignedUrl } from \"@aws-sdk/s3-request-presigner\"\n// import signedUrlCache from \"@/src/lib/signed-url-cache\" // Disabled for Workers compatibility\nimport { claimUploadUrlStatus, createUploadUrlStatus } from '@/src/dbService'\nimport { s3AccessKeyId, s3Region, s3Url, s3SecretAccessKey, s3BucketName, assetsDomain } from \"@/src/lib/env-exporter\"\n\nconst s3Client = new S3Client({\n region: s3Region,\n endpoint: s3Url,\n forcePathStyle: true,\n credentials: {\n accessKeyId: s3AccessKeyId,\n secretAccessKey: s3SecretAccessKey,\n },\n})\nexport default s3Client;\n\nexport const imageUploadS3 = async(body: Buffer, type: string, key:string) => {\n // const key = `${category}/${Date.now()}`\n const command = new PutObjectCommand({\n Bucket: s3BucketName,\n Key: key,\n Body: body,\n ContentType: type,\n })\n const resp = await s3Client.send(command)\n \n const imageUrl = `${key}`\n return imageUrl;\n}\n\n\n// export async function deleteImageUtil(...keys:string[]):Promise;\n\nexport async function deleteImageUtil({bucket = s3BucketName, keys}:{bucket?:string, keys: string[]}) {\n \n if (keys.length === 0) {\n return true;\n }\n try {\n const deleteParams = {\n Bucket: bucket,\n Delete: {\n Objects: keys.map((key) => ({ Key: key })),\n Quiet: false,\n }\n }\n \n const deleteCommand = new DeleteObjectsCommand(deleteParams)\n await s3Client.send(deleteCommand)\n return true\n }\n catch (error) {\n console.error(\"Error deleting image:\", error)\n throw new Error(\"Failed to delete image\")\n return false;\n }\n}\n\nexport function scaffoldAssetUrl(input: string | null): string\nexport function scaffoldAssetUrl(input: (string | null)[]): string[]\nexport function scaffoldAssetUrl(input: string | null | (string | null)[]): string | string[] {\n if (Array.isArray(input)) {\n return input.map(key => scaffoldAssetUrl(key) as string);\n }\n if (!input) {\n return '';\n }\n const normalizedKey = input.replace(/^\\/+/, '');\n const domain = assetsDomain.endsWith('/')\n ? assetsDomain.slice(0, -1)\n : assetsDomain;\n return `${domain}/${normalizedKey}`;\n}\n\n\n/**\n * Generate a signed URL from an S3 URL\n * @param s3Url The full S3 URL (e.g., https://bucket-name.s3.region.amazonaws.com/path/to/object)\n * @param expiresIn Expiration time in seconds (default: 259200 seconds = 3 days)\n * @returns A pre-signed URL that provides temporary access to the object\n */\nexport async function generateSignedUrlFromS3Url(s3UrlRaw: string|null, expiresIn: number = 259200): Promise {\n if (!s3UrlRaw) {\n return '';\n }\n\n const s3Url = s3UrlRaw\n \n try {\n // Cache disabled for Workers compatibility\n // const cachedUrl = signedUrlCache.get(s3Url);\n // if (cachedUrl) {\n // return cachedUrl;\n // }\n \n // Create the command to get the object\n const command = new GetObjectCommand({\n Bucket: s3BucketName,\n Key: s3Url,\n });\n \n // Generate the signed URL\n const signedUrl = await getSignedUrl(s3Client, command, { expiresIn });\n \n // Cache disabled for Workers compatibility\n // signedUrlCache.set(s3Url, signedUrl, (expiresIn * 1000) - 60000);\n \n return signedUrl;\n } catch (error) {\n console.error(\"Error generating signed URL:\", error);\n throw new Error(\"Failed to generate signed URL\");\n }\n}\n\n/**\n * Get the original S3 URL from a signed URL\n * @param signedUrl The signed URL \n * @returns The original S3 URL if found in cache, otherwise null\n */\nexport function getOriginalUrlFromSignedUrl(signedUrl: string|null): string|null {\n // Cache disabled for Workers compatibility - cannot retrieve original URL without cache\n // To re-enable, migrate signed-url-cache to object storage (R2/S3)\n return null;\n}\n\n/**\n * Generate signed URLs for multiple S3 URLs\n * @param s3Urls Array of S3 URLs or null values\n * @param expiresIn Expiration time in seconds (default: 259200 seconds = 3 days)\n * @returns Array of signed URLs (empty strings for null/invalid inputs)\n */\nexport async function generateSignedUrlsFromS3Urls(s3Urls: (string|null)[], expiresIn: number = 259200): Promise {\n if (!s3Urls || !s3Urls.length) {\n return [];\n }\n\n try {\n // Process URLs in parallel for better performance\n const signedUrls = await Promise.all(\n s3Urls.map(url => generateSignedUrlFromS3Url(url, expiresIn).catch(() => ''))\n );\n \n return signedUrls;\n } catch (error) {\n console.error(\"Error generating multiple signed URLs:\", error);\n // Return an array of empty strings with the same length as input\n return s3Urls.map(() => '');\n }\n}\n\nexport async function generateUploadUrl(key: string, mimeType: string, expiresIn: number = 180): Promise {\n try {\n // Insert record into upload_url_status\n await createUploadUrlStatus(key)\n\n // Generate signed upload URL\n const command = new PutObjectCommand({\n Bucket: s3BucketName,\n Key: key,\n ContentType: mimeType,\n });\n\n const signedUrl = await getSignedUrl(s3Client, command, { expiresIn });\n return signedUrl;\n } catch (error) {\n console.error('Error generating upload URL:', error);\n throw new Error('Failed to generate upload URL');\n }\n}\n\n\n// export function extractKeyFromPresignedUrl(url:string) {\n// const u = new URL(url);\n// const rawKey = u.pathname.replace(/^\\/+/, \"\"); // remove leading slash\n// return decodeURIComponent(rawKey);\n// }\n\n// New function (excludes bucket name)\nexport function extractKeyFromPresignedUrl(url: string): string {\n const u = new URL(url);\n const rawKey = u.pathname.replace(/^\\/+/, \"\"); // remove leading slash\n const decodedKey = decodeURIComponent(rawKey);\n // Remove bucket prefix\n const parts = decodedKey.split('/');\n parts.shift(); // Remove bucket name\n return parts.join('/');\n}\n\nexport async function claimUploadUrl(url: string): Promise {\n try {\n const semiKey = extractKeyFromPresignedUrl(url);\n\n // Update status to 'claimed' if currently 'pending'\n const updated = await claimUploadUrlStatus(semiKey)\n \n if (!updated) {\n throw new Error('Upload URL not found or already claimed');\n }\n } catch (error) {\n console.error('Error claiming upload URL:', error);\n throw new Error('Failed to claim upload URL');\n }\n}\n", "import { TRPCError } from './error/TRPCError';\nimport type { ParseFn } from './parser';\nimport type { ProcedureType } from './procedure';\nimport type { GetRawInputFn, Overwrite, Simplify } from './types';\nimport { isObject } from './utils';\n\n/** @internal */\nexport const middlewareMarker = 'middlewareMarker' as 'middlewareMarker' & {\n __brand: 'middlewareMarker';\n};\ntype MiddlewareMarker = typeof middlewareMarker;\n\ninterface MiddlewareResultBase {\n /**\n * All middlewares should pass through their `next()`'s output.\n * Requiring this marker makes sure that can't be forgotten at compile-time.\n */\n readonly marker: MiddlewareMarker;\n}\n\ninterface MiddlewareOKResult<_TContextOverride> extends MiddlewareResultBase {\n ok: true;\n data: unknown;\n // this could be extended with `input`/`rawInput` later\n}\n\ninterface MiddlewareErrorResult<_TContextOverride>\n extends MiddlewareResultBase {\n ok: false;\n error: TRPCError;\n}\n\n/**\n * @internal\n */\nexport type MiddlewareResult<_TContextOverride> =\n | MiddlewareErrorResult<_TContextOverride>\n | MiddlewareOKResult<_TContextOverride>;\n\n/**\n * @internal\n */\nexport interface MiddlewareBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n> {\n /**\n * Create a new builder based on the current middleware builder\n */\n unstable_pipe<$ContextOverridesOut>(\n fn:\n | MiddlewareFunction<\n TContext,\n TMeta,\n TContextOverrides,\n $ContextOverridesOut,\n TInputOut\n >\n | MiddlewareBuilder<\n Overwrite,\n TMeta,\n $ContextOverridesOut,\n TInputOut\n >,\n ): MiddlewareBuilder<\n TContext,\n TMeta,\n Overwrite,\n TInputOut\n >;\n\n /**\n * List of middlewares within this middleware builder\n */\n _middlewares: MiddlewareFunction<\n TContext,\n TMeta,\n TContextOverrides,\n object,\n TInputOut\n >[];\n}\n\n/**\n * @internal\n */\nexport type MiddlewareFunction<\n TContext,\n TMeta,\n TContextOverridesIn,\n $ContextOverridesOut,\n TInputOut,\n> = {\n (opts: {\n ctx: Simplify>;\n type: ProcedureType;\n path: string;\n input: TInputOut;\n getRawInput: GetRawInputFn;\n meta: TMeta | undefined;\n signal: AbortSignal | undefined;\n /**\n * The index of this call in a batch request.\n */\n batchIndex: number;\n next: {\n (): Promise>;\n <$ContextOverride>(opts: {\n ctx?: $ContextOverride;\n input?: unknown;\n }): Promise>;\n (opts: {\n getRawInput: GetRawInputFn;\n }): Promise>;\n };\n }): Promise>;\n _type?: string | undefined;\n};\n\nexport type AnyMiddlewareFunction = MiddlewareFunction;\nexport type AnyMiddlewareBuilder = MiddlewareBuilder;\n/**\n * @internal\n */\nexport function createMiddlewareFactory<\n TContext,\n TMeta,\n TInputOut = unknown,\n>() {\n function createMiddlewareInner(\n middlewares: AnyMiddlewareFunction[],\n ): AnyMiddlewareBuilder {\n return {\n _middlewares: middlewares,\n unstable_pipe(middlewareBuilderOrFn) {\n const pipedMiddleware =\n '_middlewares' in middlewareBuilderOrFn\n ? middlewareBuilderOrFn._middlewares\n : [middlewareBuilderOrFn];\n\n return createMiddlewareInner([...middlewares, ...pipedMiddleware]);\n },\n };\n }\n\n function createMiddleware<$ContextOverrides>(\n fn: MiddlewareFunction<\n TContext,\n TMeta,\n object,\n $ContextOverrides,\n TInputOut\n >,\n ): MiddlewareBuilder {\n return createMiddlewareInner([fn]);\n }\n\n return createMiddleware;\n}\n\n/**\n * Create a standalone middleware\n * @see https://trpc.io/docs/v11/server/middlewares#experimental-standalone-middlewares\n * @deprecated use `.concat()` instead\n */\nexport const experimental_standaloneMiddleware = <\n TCtx extends {\n ctx?: object;\n meta?: object;\n input?: unknown;\n },\n>() => ({\n create: createMiddlewareFactory<\n TCtx extends { ctx: infer T extends object } ? T : any,\n TCtx extends { meta: infer T extends object } ? T : object,\n TCtx extends { input: infer T } ? T : unknown\n >(),\n});\n\n/**\n * @internal\n * Please note, `trpc-openapi` uses this function.\n */\nexport function createInputMiddleware(parse: ParseFn) {\n const inputMiddleware: AnyMiddlewareFunction =\n async function inputValidatorMiddleware(opts) {\n let parsedInput: ReturnType;\n\n const rawInput = await opts.getRawInput();\n try {\n parsedInput = await parse(rawInput);\n } catch (cause) {\n throw new TRPCError({\n code: 'BAD_REQUEST',\n cause,\n });\n }\n\n // Multiple input parsers\n const combinedInput =\n isObject(opts.input) && isObject(parsedInput)\n ? {\n ...opts.input,\n ...parsedInput,\n }\n : parsedInput;\n\n return opts.next({ input: combinedInput });\n };\n inputMiddleware._type = 'input';\n return inputMiddleware;\n}\n\n/**\n * @internal\n */\nexport function createOutputMiddleware(parse: ParseFn) {\n const outputMiddleware: AnyMiddlewareFunction =\n async function outputValidatorMiddleware({ next }) {\n const result = await next();\n if (!result.ok) {\n // pass through failures without validating\n return result;\n }\n try {\n const data = await parse(result.data);\n return {\n ...result,\n data,\n };\n } catch (cause) {\n throw new TRPCError({\n message: 'Output validation failed',\n code: 'INTERNAL_SERVER_ERROR',\n cause,\n });\n }\n };\n outputMiddleware._type = 'output';\n return outputMiddleware;\n}\n", "import type { StandardSchemaV1 } from \"./spec\";\n\n/** A schema error with useful information. */\n\nexport class StandardSchemaV1Error extends Error {\n /** The schema issues. */\n public readonly issues: ReadonlyArray;\n\n /**\n * Creates a schema error with useful information.\n *\n * @param issues The schema issues.\n */\n constructor(issues: ReadonlyArray) {\n super(issues[0]?.message);\n this.name = 'SchemaError';\n this.issues = issues;\n }\n}\n", "import { StandardSchemaV1Error } from '../vendor/standard-schema-v1/error';\nimport { type StandardSchemaV1 } from '../vendor/standard-schema-v1/spec';\n\n// zod / typeschema\nexport type ParserZodEsque = {\n _input: TInput;\n _output: TParsedInput;\n};\n\nexport type ParserValibotEsque = {\n schema: {\n _types?: {\n input: TInput;\n output: TParsedInput;\n };\n };\n};\n\nexport type ParserArkTypeEsque = {\n inferIn: TInput;\n infer: TParsedInput;\n};\n\nexport type ParserStandardSchemaEsque = StandardSchemaV1<\n TInput,\n TParsedInput\n>;\n\nexport type ParserMyZodEsque = {\n parse: (input: any) => TInput;\n};\n\nexport type ParserSuperstructEsque = {\n create: (input: unknown) => TInput;\n};\n\nexport type ParserCustomValidatorEsque = (\n input: unknown,\n) => Promise | TInput;\n\nexport type ParserYupEsque = {\n validateSync: (input: unknown) => TInput;\n};\n\nexport type ParserScaleEsque = {\n assert(value: unknown): asserts value is TInput;\n};\n\nexport type ParserWithoutInput =\n | ParserCustomValidatorEsque\n | ParserMyZodEsque\n | ParserScaleEsque\n | ParserSuperstructEsque\n | ParserYupEsque;\n\nexport type ParserWithInputOutput =\n | ParserZodEsque\n | ParserValibotEsque\n | ParserArkTypeEsque\n | ParserStandardSchemaEsque;\n\nexport type Parser = ParserWithInputOutput | ParserWithoutInput;\n\nexport type inferParser =\n TParser extends ParserStandardSchemaEsque\n ? {\n in: $TIn;\n out: $TOut;\n }\n : TParser extends ParserWithInputOutput\n ? {\n in: $TIn;\n out: $TOut;\n }\n : TParser extends ParserWithoutInput\n ? {\n in: $InOut;\n out: $InOut;\n }\n : never;\n\nexport type ParseFn = (value: unknown) => Promise | TType;\n\nexport function getParseFn(procedureParser: Parser): ParseFn {\n const parser = procedureParser as any;\n const isStandardSchema = '~standard' in parser;\n\n if (typeof parser === 'function' && typeof parser.assert === 'function') {\n // ParserArkTypeEsque - arktype schemas shouldn't be called as a function because they return a union type instead of throwing\n return parser.assert.bind(parser);\n }\n\n if (typeof parser === 'function' && !isStandardSchema) {\n // ParserValibotEsque (>= v0.31.0)\n // ParserCustomValidatorEsque - note the check for standard-schema conformance - some libraries like `effect` use function schemas which are *not* a \"parse\" function.\n return parser;\n }\n\n if (typeof parser.parseAsync === 'function') {\n // ParserZodEsque\n return parser.parseAsync.bind(parser);\n }\n\n if (typeof parser.parse === 'function') {\n // ParserZodEsque\n // ParserValibotEsque (< v0.13.0)\n return parser.parse.bind(parser);\n }\n\n if (typeof parser.validateSync === 'function') {\n // ParserYupEsque\n return parser.validateSync.bind(parser);\n }\n\n if (typeof parser.create === 'function') {\n // ParserSuperstructEsque\n return parser.create.bind(parser);\n }\n\n if (typeof parser.assert === 'function') {\n // ParserScaleEsque\n return (value) => {\n parser.assert(value);\n return value as TType;\n };\n }\n\n if (isStandardSchema) {\n // StandardSchemaEsque\n return async (value) => {\n const result = await parser['~standard'].validate(value);\n if (result.issues) {\n throw new StandardSchemaV1Error(result.issues);\n }\n return result.value;\n };\n }\n\n throw new Error('Could not find a validator fn');\n}\n", "function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.includes(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose.js\");\nfunction _objectWithoutProperties(e, t) {\n if (null == e) return {};\n var o,\n r,\n i = objectWithoutPropertiesLoose(e, t);\n if (Object.getOwnPropertySymbols) {\n var s = Object.getOwnPropertySymbols(e);\n for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n }\n return i;\n}\nmodule.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "import type { inferObservableValue, Observable } from '../observable';\nimport { getTRPCErrorFromUnknown, TRPCError } from './error/TRPCError';\nimport type {\n AnyMiddlewareFunction,\n MiddlewareBuilder,\n MiddlewareFunction,\n MiddlewareResult,\n} from './middleware';\nimport {\n createInputMiddleware,\n createOutputMiddleware,\n middlewareMarker,\n} from './middleware';\nimport type { inferParser, Parser } from './parser';\nimport { getParseFn } from './parser';\nimport type {\n AnyMutationProcedure,\n AnyProcedure,\n AnyQueryProcedure,\n LegacyObservableSubscriptionProcedure,\n MutationProcedure,\n ProcedureType,\n QueryProcedure,\n SubscriptionProcedure,\n} from './procedure';\nimport type { inferTrackedOutput } from './stream/tracked';\nimport type {\n GetRawInputFn,\n MaybePromise,\n Overwrite,\n Simplify,\n TypeError,\n} from './types';\nimport type { UnsetMarker } from './utils';\nimport { mergeWithoutOverrides } from './utils';\n\ntype IntersectIfDefined = TType extends UnsetMarker\n ? TWith\n : TWith extends UnsetMarker\n ? TType\n : Simplify;\n\ntype DefaultValue = TValue extends UnsetMarker\n ? TFallback\n : TValue;\n\ntype inferAsyncIterable =\n TOutput extends AsyncIterable\n ? {\n yield: $Yield;\n return: $Return;\n next: $Next;\n }\n : never;\ntype inferSubscriptionOutput =\n TOutput extends AsyncIterable\n ? AsyncIterable<\n inferTrackedOutput['yield']>,\n inferAsyncIterable['return'],\n inferAsyncIterable['next']\n >\n : TypeError<'Subscription output could not be inferred'>;\n\nexport type CallerOverride = (opts: {\n args: unknown[];\n invoke: (opts: ProcedureCallOptions) => Promise;\n _def: AnyProcedure['_def'];\n}) => Promise;\ntype ProcedureBuilderDef = {\n procedure: true;\n inputs: Parser[];\n output?: Parser;\n meta?: TMeta;\n resolver?: ProcedureBuilderResolver;\n middlewares: AnyMiddlewareFunction[];\n /**\n * @deprecated use `type` instead\n */\n mutation?: boolean;\n /**\n * @deprecated use `type` instead\n */\n query?: boolean;\n /**\n * @deprecated use `type` instead\n */\n subscription?: boolean;\n type?: ProcedureType;\n caller?: CallerOverride;\n};\n\ntype AnyProcedureBuilderDef = ProcedureBuilderDef;\n\n/**\n * Procedure resolver options (what the `.query()`, `.mutation()`, and `.subscription()` functions receive)\n * @internal\n */\nexport interface ProcedureResolverOptions<\n TContext,\n _TMeta,\n TContextOverridesIn,\n TInputOut,\n> {\n ctx: Simplify>;\n input: TInputOut extends UnsetMarker ? undefined : TInputOut;\n /**\n * The AbortSignal of the request\n */\n signal: AbortSignal | undefined;\n /**\n * The path of the procedure\n */\n path: string;\n /**\n * The index of this call in a batch request.\n * Will be set when the procedure is called as part of a batch.\n */\n batchIndex?: number;\n}\n\n/**\n * A procedure resolver\n */\ntype ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputParserIn,\n $Output,\n> = (\n opts: ProcedureResolverOptions,\n) => MaybePromise<\n // If an output parser is defined, we need to return what the parser expects, otherwise we return the inferred type\n DefaultValue\n>;\n\ntype AnyResolver = ProcedureResolver;\nexport type AnyProcedureBuilder = ProcedureBuilder<\n any,\n any,\n any,\n any,\n any,\n any,\n any,\n any\n>;\n\n/**\n * Infer the context type from a procedure builder\n * Useful to create common helper functions for different procedures\n */\nexport type inferProcedureBuilderResolverOptions<\n TProcedureBuilder extends AnyProcedureBuilder,\n> =\n TProcedureBuilder extends ProcedureBuilder<\n infer TContext,\n infer TMeta,\n infer TContextOverrides,\n infer _TInputIn,\n infer TInputOut,\n infer _TOutputIn,\n infer _TOutputOut,\n infer _TCaller\n >\n ? ProcedureResolverOptions<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut extends UnsetMarker\n ? // if input is not set, we don't want to infer it as `undefined` since a procedure further down the chain might have set an input\n unknown\n : TInputOut extends object\n ? Simplify<\n TInputOut & {\n /**\n * Extra input params might have been added by a `.input()` further down the chain\n */\n [keyAddedByInputCallFurtherDown: string]: unknown;\n }\n >\n : TInputOut\n >\n : never;\n\nexport interface ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputIn,\n TInputOut,\n TOutputIn,\n TOutputOut,\n TCaller extends boolean,\n> {\n /**\n * Add an input parser to the procedure.\n * @see https://trpc.io/docs/v11/server/validators\n */\n input<$Parser extends Parser>(\n schema: TInputOut extends UnsetMarker\n ? $Parser\n : inferParser<$Parser>['out'] extends Record | undefined\n ? TInputOut extends Record | undefined\n ? undefined extends inferParser<$Parser>['out'] // if current is optional the previous must be too\n ? undefined extends TInputOut\n ? $Parser\n : TypeError<'Cannot chain an optional parser to a required parser'>\n : $Parser\n : TypeError<'All input parsers did not resolve to an object'>\n : TypeError<'All input parsers did not resolve to an object'>,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n IntersectIfDefined['in']>,\n IntersectIfDefined['out']>,\n TOutputIn,\n TOutputOut,\n TCaller\n >;\n /**\n * Add an output parser to the procedure.\n * @see https://trpc.io/docs/v11/server/validators\n */\n output<$Parser extends Parser>(\n schema: $Parser,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputIn,\n TInputOut,\n IntersectIfDefined['in']>,\n IntersectIfDefined['out']>,\n TCaller\n >;\n /**\n * Add a meta data to the procedure.\n * @see https://trpc.io/docs/v11/server/metadata\n */\n meta(\n meta: TMeta,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputIn,\n TInputOut,\n TOutputIn,\n TOutputOut,\n TCaller\n >;\n /**\n * Add a middleware to the procedure.\n * @see https://trpc.io/docs/v11/server/middlewares\n */\n use<$ContextOverridesOut>(\n fn:\n | MiddlewareBuilder<\n Overwrite,\n TMeta,\n $ContextOverridesOut,\n TInputOut\n >\n | MiddlewareFunction<\n TContext,\n TMeta,\n TContextOverrides,\n $ContextOverridesOut,\n TInputOut\n >,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n Overwrite,\n TInputIn,\n TInputOut,\n TOutputIn,\n TOutputOut,\n TCaller\n >;\n\n /**\n * @deprecated use {@link concat} instead\n */\n unstable_concat<\n $Context,\n $Meta,\n $ContextOverrides,\n $InputIn,\n $InputOut,\n $OutputIn,\n $OutputOut,\n >(\n builder: Overwrite extends $Context\n ? TMeta extends $Meta\n ? ProcedureBuilder<\n $Context,\n $Meta,\n $ContextOverrides,\n $InputIn,\n $InputOut,\n $OutputIn,\n $OutputOut,\n TCaller\n >\n : TypeError<'Meta mismatch'>\n : TypeError<'Context mismatch'>,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n Overwrite,\n IntersectIfDefined,\n IntersectIfDefined,\n IntersectIfDefined,\n IntersectIfDefined,\n TCaller\n >;\n\n /**\n * Combine two procedure builders\n */\n concat<\n $Context,\n $Meta,\n $ContextOverrides,\n $InputIn,\n $InputOut,\n $OutputIn,\n $OutputOut,\n >(\n builder: Overwrite extends $Context\n ? TMeta extends $Meta\n ? ProcedureBuilder<\n $Context,\n $Meta,\n $ContextOverrides,\n $InputIn,\n $InputOut,\n $OutputIn,\n $OutputOut,\n TCaller\n >\n : TypeError<'Meta mismatch'>\n : TypeError<'Context mismatch'>,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n Overwrite,\n IntersectIfDefined,\n IntersectIfDefined,\n IntersectIfDefined,\n IntersectIfDefined,\n TCaller\n >;\n /**\n * Query procedure\n * @see https://trpc.io/docs/v11/concepts#vocabulary\n */\n query<$Output>(\n resolver: ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputIn,\n $Output\n >,\n ): TCaller extends true\n ? (\n input: DefaultValue,\n ) => Promise>\n : QueryProcedure<{\n input: DefaultValue;\n output: DefaultValue;\n meta: TMeta;\n }>;\n\n /**\n * Mutation procedure\n * @see https://trpc.io/docs/v11/concepts#vocabulary\n */\n mutation<$Output>(\n resolver: ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputIn,\n $Output\n >,\n ): TCaller extends true\n ? (\n input: DefaultValue,\n ) => Promise>\n : MutationProcedure<{\n input: DefaultValue;\n output: DefaultValue;\n meta: TMeta;\n }>;\n\n /**\n * Subscription procedure\n * @see https://trpc.io/docs/v11/server/subscriptions\n */\n subscription<$Output extends AsyncIterable>(\n resolver: ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputIn,\n $Output\n >,\n ): TCaller extends true\n ? TypeError<'Not implemented'>\n : SubscriptionProcedure<{\n input: DefaultValue;\n output: inferSubscriptionOutput>;\n meta: TMeta;\n }>;\n /**\n * @deprecated Using subscriptions with an observable is deprecated. Use an async generator instead.\n * This feature will be removed in v12 of tRPC.\n * @see https://trpc.io/docs/v11/server/subscriptions\n */\n subscription<$Output extends Observable>(\n resolver: ProcedureResolver<\n TContext,\n TMeta,\n TContextOverrides,\n TInputOut,\n TOutputIn,\n $Output\n >,\n ): TCaller extends true\n ? TypeError<'Not implemented'>\n : LegacyObservableSubscriptionProcedure<{\n input: DefaultValue;\n output: inferObservableValue>;\n meta: TMeta;\n }>;\n /**\n * Overrides the way a procedure is invoked\n * Do not use this unless you know what you're doing - this is an experimental API\n */\n experimental_caller(\n caller: CallerOverride,\n ): ProcedureBuilder<\n TContext,\n TMeta,\n TContextOverrides,\n TInputIn,\n TInputOut,\n TOutputIn,\n TOutputOut,\n true\n >;\n /**\n * @internal\n */\n _def: ProcedureBuilderDef;\n}\n\ntype ProcedureBuilderResolver = (\n opts: ProcedureResolverOptions,\n) => Promise;\n\nfunction createNewBuilder(\n def1: AnyProcedureBuilderDef,\n def2: Partial,\n): AnyProcedureBuilder {\n const { middlewares = [], inputs, meta, ...rest } = def2;\n\n // TODO: maybe have a fn here to warn about calls\n return createBuilder({\n ...mergeWithoutOverrides(def1, rest),\n inputs: [...def1.inputs, ...(inputs ?? [])],\n middlewares: [...def1.middlewares, ...middlewares],\n meta: def1.meta && meta ? { ...def1.meta, ...meta } : (meta ?? def1.meta),\n });\n}\n\nexport function createBuilder(\n initDef: Partial = {},\n): ProcedureBuilder<\n TContext,\n TMeta,\n object,\n UnsetMarker,\n UnsetMarker,\n UnsetMarker,\n UnsetMarker,\n false\n> {\n const _def: AnyProcedureBuilderDef = {\n procedure: true,\n inputs: [],\n middlewares: [],\n ...initDef,\n };\n\n const builder: AnyProcedureBuilder = {\n _def,\n input(input) {\n const parser = getParseFn(input as Parser);\n return createNewBuilder(_def, {\n inputs: [input as Parser],\n middlewares: [createInputMiddleware(parser)],\n });\n },\n output(output: Parser) {\n const parser = getParseFn(output);\n return createNewBuilder(_def, {\n output,\n middlewares: [createOutputMiddleware(parser)],\n });\n },\n meta(meta) {\n return createNewBuilder(_def, {\n meta,\n });\n },\n use(middlewareBuilderOrFn) {\n // Distinguish between a middleware builder and a middleware function\n const middlewares =\n '_middlewares' in middlewareBuilderOrFn\n ? middlewareBuilderOrFn._middlewares\n : [middlewareBuilderOrFn];\n\n return createNewBuilder(_def, {\n middlewares: middlewares,\n });\n },\n unstable_concat(builder) {\n return createNewBuilder(_def, (builder as AnyProcedureBuilder)._def);\n },\n concat(builder) {\n return createNewBuilder(_def, (builder as AnyProcedureBuilder)._def);\n },\n query(resolver) {\n return createResolver(\n { ..._def, type: 'query' },\n resolver,\n ) as AnyQueryProcedure;\n },\n mutation(resolver) {\n return createResolver(\n { ..._def, type: 'mutation' },\n resolver,\n ) as AnyMutationProcedure;\n },\n subscription(resolver: ProcedureResolver) {\n return createResolver({ ..._def, type: 'subscription' }, resolver) as any;\n },\n experimental_caller(caller) {\n return createNewBuilder(_def, {\n caller,\n }) as any;\n },\n };\n\n return builder;\n}\n\nfunction createResolver(\n _defIn: AnyProcedureBuilderDef & { type: ProcedureType },\n resolver: AnyResolver,\n) {\n const finalBuilder = createNewBuilder(_defIn, {\n resolver,\n middlewares: [\n async function resolveMiddleware(opts) {\n const data = await resolver(opts);\n return {\n marker: middlewareMarker,\n ok: true,\n data,\n ctx: opts.ctx,\n } as const;\n },\n ],\n });\n const _def: AnyProcedure['_def'] = {\n ...finalBuilder._def,\n type: _defIn.type,\n experimental_caller: Boolean(finalBuilder._def.caller),\n meta: finalBuilder._def.meta,\n $types: null as any,\n };\n\n const invoke = createProcedureCaller(finalBuilder._def);\n const callerOverride = finalBuilder._def.caller;\n if (!callerOverride) {\n return invoke;\n }\n const callerWrapper = async (...args: unknown[]) => {\n return await callerOverride({\n args,\n invoke,\n _def: _def,\n });\n };\n\n callerWrapper._def = _def;\n\n return callerWrapper;\n}\n\n/**\n * @internal\n */\nexport interface ProcedureCallOptions {\n ctx: TContext;\n getRawInput: GetRawInputFn;\n input?: unknown;\n path: string;\n type: ProcedureType;\n signal: AbortSignal | undefined;\n /**\n * The index of this call in a batch request.\n */\n batchIndex: number;\n}\n\nconst codeblock = `\nThis is a client-only function.\nIf you want to call this function on the server, see https://trpc.io/docs/v11/server/server-side-calls\n`.trim();\n\n// run the middlewares recursively with the resolver as the last one\nasync function callRecursive(\n index: number,\n _def: AnyProcedureBuilderDef,\n opts: ProcedureCallOptions,\n): Promise> {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const middleware = _def.middlewares[index]!;\n const result = await middleware({\n ...opts,\n meta: _def.meta,\n input: opts.input,\n next(_nextOpts?: any) {\n const nextOpts = _nextOpts as\n | {\n ctx?: Record;\n input?: unknown;\n getRawInput?: GetRawInputFn;\n }\n | undefined;\n\n return callRecursive(index + 1, _def, {\n ...opts,\n ctx: nextOpts?.ctx ? { ...opts.ctx, ...nextOpts.ctx } : opts.ctx,\n input: nextOpts && 'input' in nextOpts ? nextOpts.input : opts.input,\n getRawInput: nextOpts?.getRawInput ?? opts.getRawInput,\n });\n },\n });\n\n return result;\n } catch (cause) {\n return {\n ok: false,\n error: getTRPCErrorFromUnknown(cause),\n marker: middlewareMarker,\n };\n }\n}\n\nfunction createProcedureCaller(_def: AnyProcedureBuilderDef): AnyProcedure {\n async function procedure(opts: ProcedureCallOptions) {\n // is direct server-side call\n if (!opts || !('getRawInput' in opts)) {\n throw new Error(codeblock);\n }\n\n // there's always at least one \"next\" since we wrap this.resolver in a middleware\n const result = await callRecursive(0, _def, opts);\n\n if (!result) {\n throw new TRPCError({\n code: 'INTERNAL_SERVER_ERROR',\n message:\n 'No result from middlewares - did you forget to `return next()`?',\n });\n }\n if (!result.ok) {\n // re-throw original error\n throw result.error;\n }\n return result.data;\n }\n\n procedure._def = _def;\n procedure.procedure = true;\n procedure.meta = _def.meta;\n\n // FIXME typecast shouldn't be needed - fixittt\n return procedure as unknown as AnyProcedure;\n}\n", "import type { CombinedDataTransformer } from '../unstable-core-do-not-import';\nimport type { DefaultErrorShape, ErrorFormatter } from './error/formatter';\nimport type { JSONLProducerOptions } from './stream/jsonl';\nimport type { SSEStreamProducerOptions } from './stream/sse';\n\n/**\n * The initial generics that are used in the init function\n * @internal\n */\nexport interface RootTypes {\n ctx: object;\n meta: object;\n errorShape: DefaultErrorShape;\n transformer: boolean;\n}\n\n/**\n * The default check to see if we're in a server\n */\nexport const isServerDefault: boolean =\n typeof window === 'undefined' ||\n 'Deno' in window ||\n // eslint-disable-next-line @typescript-eslint/dot-notation\n globalThis.process?.env?.['NODE_ENV'] === 'test' ||\n !!globalThis.process?.env?.['JEST_WORKER_ID'] ||\n !!globalThis.process?.env?.['VITEST_WORKER_ID'];\n\n/**\n * The tRPC root config\n * @internal\n */\nexport interface RootConfig {\n /**\n * The types that are used in the config\n * @internal\n */\n $types: TTypes;\n /**\n * Use a data transformer\n * @see https://trpc.io/docs/v11/data-transformers\n */\n transformer: CombinedDataTransformer;\n /**\n * Use custom error formatting\n * @see https://trpc.io/docs/v11/error-formatting\n */\n errorFormatter: ErrorFormatter;\n /**\n * Allow `@trpc/server` to run in non-server environments\n * @warning **Use with caution**, this should likely mainly be used within testing.\n * @default false\n */\n allowOutsideOfServer: boolean;\n /**\n * Is this a server environment?\n * @warning **Use with caution**, this should likely mainly be used within testing.\n * @default typeof window === 'undefined' || 'Deno' in window || process.env.NODE_ENV === 'test'\n */\n isServer: boolean;\n /**\n * Is this development?\n * Will be used to decide if the API should return stack traces\n * @default process.env.NODE_ENV !== 'production'\n */\n isDev: boolean;\n\n defaultMeta?: TTypes['meta'] extends object ? TTypes['meta'] : never;\n\n /**\n * Options for server-sent events (SSE) subscriptions\n * @see https://trpc.io/docs/client/links/httpSubscriptionLink\n */\n sse?: {\n /**\n * Enable server-sent events (SSE) subscriptions\n * @default true\n */\n enabled?: boolean;\n } & Pick<\n SSEStreamProducerOptions,\n 'ping' | 'emitAndEndImmediately' | 'maxDurationMs' | 'client'\n >;\n\n /**\n * Options for batch stream\n * @see https://trpc.io/docs/client/links/httpBatchStreamLink\n */\n jsonl?: Pick;\n experimental?: {};\n}\n\n/**\n * @internal\n */\nexport type CreateRootTypes = TGenerics;\n\nexport type AnyRootTypes = CreateRootTypes<{\n ctx: any;\n meta: any;\n errorShape: any;\n transformer: any;\n}>;\n\ntype PartialIf = TCondition extends true\n ? Partial\n : TType;\n\n/**\n * Adds a `createContext` option with a given callback function\n * If context is the default value, then the `createContext` option is optional\n */\nexport type CreateContextCallback<\n TContext,\n TFunction extends (...args: any[]) => any,\n> = PartialIf<\n object extends TContext ? true : false,\n {\n /**\n * @see https://trpc.io/docs/v11/context\n **/\n createContext: TFunction;\n }\n>;\n", "import {\n defaultFormatter,\n type DefaultErrorShape,\n type ErrorFormatter,\n} from './error/formatter';\nimport type { MiddlewareBuilder, MiddlewareFunction } from './middleware';\nimport { createMiddlewareFactory } from './middleware';\nimport type { ProcedureBuilder } from './procedureBuilder';\nimport { createBuilder } from './procedureBuilder';\nimport type { AnyRootTypes, CreateRootTypes } from './rootConfig';\nimport { isServerDefault, type RootConfig } from './rootConfig';\nimport type {\n AnyRouter,\n MergeRouters,\n RouterBuilder,\n RouterCallerFactory,\n} from './router';\nimport {\n createCallerFactory,\n createRouterFactory,\n mergeRouters,\n} from './router';\nimport type { DataTransformerOptions } from './transformer';\nimport { defaultTransformer, getDataTransformer } from './transformer';\nimport type { Unwrap, ValidateShape } from './types';\nimport type { UnsetMarker } from './utils';\n\ntype inferErrorFormatterShape =\n TType extends ErrorFormatter ? TShape : DefaultErrorShape;\n/** @internal */\nexport interface RuntimeConfigOptions<\n TContext extends object,\n TMeta extends object,\n> extends Partial<\n Omit<\n RootConfig<{\n ctx: TContext;\n meta: TMeta;\n errorShape: any;\n transformer: any;\n }>,\n '$types' | 'transformer'\n >\n > {\n /**\n * Use a data transformer\n * @see https://trpc.io/docs/v11/data-transformers\n */\n transformer?: DataTransformerOptions;\n}\n\ntype ContextCallback = (...args: any[]) => object | Promise;\n\nexport interface TRPCRootObject<\n TContext extends object,\n TMeta extends object,\n TOptions extends RuntimeConfigOptions,\n $Root extends AnyRootTypes = {\n ctx: TContext;\n meta: TMeta;\n errorShape: undefined extends TOptions['errorFormatter']\n ? DefaultErrorShape\n : inferErrorFormatterShape;\n transformer: undefined extends TOptions['transformer'] ? false : true;\n },\n> {\n /**\n * Your router config\n * @internal\n */\n _config: RootConfig<$Root>;\n\n /**\n * Builder object for creating procedures\n * @see https://trpc.io/docs/v11/server/procedures\n */\n procedure: ProcedureBuilder<\n TContext,\n TMeta,\n object,\n UnsetMarker,\n UnsetMarker,\n UnsetMarker,\n UnsetMarker,\n false\n >;\n\n /**\n * Create reusable middlewares\n * @see https://trpc.io/docs/v11/server/middlewares\n */\n middleware: <$ContextOverrides>(\n fn: MiddlewareFunction,\n ) => MiddlewareBuilder;\n\n /**\n * Create a router\n * @see https://trpc.io/docs/v11/server/routers\n */\n router: RouterBuilder<$Root>;\n\n /**\n * Merge Routers\n * @see https://trpc.io/docs/v11/server/merging-routers\n */\n mergeRouters: (\n ...routerList: [...TRouters]\n ) => MergeRouters;\n\n /**\n * Create a server-side caller for a router\n * @see https://trpc.io/docs/v11/server/server-side-calls\n */\n createCallerFactory: RouterCallerFactory<$Root>;\n}\n\nclass TRPCBuilder {\n /**\n * Add a context shape as a generic to the root object\n * @see https://trpc.io/docs/v11/server/context\n */\n context() {\n return new TRPCBuilder<\n TNewContext extends ContextCallback ? Unwrap : TNewContext,\n TMeta\n >();\n }\n\n /**\n * Add a meta shape as a generic to the root object\n * @see https://trpc.io/docs/v11/quickstart\n */\n meta() {\n return new TRPCBuilder();\n }\n\n /**\n * Create the root object\n * @see https://trpc.io/docs/v11/server/routers#initialize-trpc\n */\n create>(\n opts?: ValidateShape>,\n ): TRPCRootObject {\n type $Root = CreateRootTypes<{\n ctx: TContext;\n meta: TMeta;\n errorShape: undefined extends TOptions['errorFormatter']\n ? DefaultErrorShape\n : inferErrorFormatterShape;\n transformer: undefined extends TOptions['transformer'] ? false : true;\n }>;\n\n const config: RootConfig<$Root> = {\n ...opts,\n transformer: getDataTransformer(opts?.transformer ?? defaultTransformer),\n isDev:\n opts?.isDev ??\n // eslint-disable-next-line @typescript-eslint/dot-notation\n globalThis.process?.env['NODE_ENV'] !== 'production',\n allowOutsideOfServer: opts?.allowOutsideOfServer ?? false,\n errorFormatter: opts?.errorFormatter ?? defaultFormatter,\n isServer: opts?.isServer ?? isServerDefault,\n /**\n * These are just types, they can't be used at runtime\n * @internal\n */\n $types: null as any,\n };\n\n {\n // Server check\n const isServer: boolean = opts?.isServer ?? isServerDefault;\n\n if (!isServer && opts?.allowOutsideOfServer !== true) {\n throw new Error(\n `You're trying to use @trpc/server in a non-server environment. This is not supported by default.`,\n );\n }\n }\n return {\n /**\n * Your router config\n * @internal\n */\n _config: config,\n /**\n * Builder object for creating procedures\n * @see https://trpc.io/docs/v11/server/procedures\n */\n procedure: createBuilder<$Root['ctx'], $Root['meta']>({\n meta: opts?.defaultMeta,\n }),\n /**\n * Create reusable middlewares\n * @see https://trpc.io/docs/v11/server/middlewares\n */\n middleware: createMiddlewareFactory<$Root['ctx'], $Root['meta']>(),\n /**\n * Create a router\n * @see https://trpc.io/docs/v11/server/routers\n */\n router: createRouterFactory<$Root>(config),\n /**\n * Merge Routers\n * @see https://trpc.io/docs/v11/server/merging-routers\n */\n mergeRouters,\n /**\n * Create a server-side caller for a router\n * @see https://trpc.io/docs/v11/server/server-side-calls\n */\n createCallerFactory: createCallerFactory<$Root>(),\n };\n }\n}\n\n/**\n * Builder to initialize the tRPC root object - use this exactly once per backend\n * @see https://trpc.io/docs/v11/quickstart\n */\nexport const initTRPC = new TRPCBuilder();\nexport type { TRPCBuilder };\n", "import { createFlatProxy, createRecursiveProxy, getErrorShape } from \"./getErrorShape-vC8mUXJD.mjs\";\nimport \"./codes-DagpWZLc.mjs\";\nimport { TRPCError, callProcedure, getTRPCErrorFromUnknown, isTrackedEnvelope, lazy, sse, tracked, transformTRPCResponse } from \"./tracked-Bjtgv3wJ.mjs\";\nimport { StandardSchemaV1Error, experimental_standaloneMiddleware, initTRPC } from \"./initTRPC-RoZMIBeA.mjs\";\n\nexport { StandardSchemaV1Error, TRPCError, callProcedure as callTRPCProcedure, createFlatProxy as createTRPCFlatProxy, createRecursiveProxy as createTRPCRecursiveProxy, lazy as experimental_lazy, experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware, getErrorShape, getTRPCErrorFromUnknown, getErrorShape as getTRPCErrorShape, initTRPC, isTrackedEnvelope, lazy, sse, tracked, transformTRPCResponse };", "import { initTRPC, TRPCError } from '@trpc/server';\nimport type { Context as HonoContext } from 'hono';\n\nexport interface Context {\n req: HonoContext['req'];\n user?: any;\n staffUser?: {\n id: number;\n name: string;\n } | null;\n}\n\nconst t = initTRPC.context().create();\n\nexport const middleware = t.middleware;\nexport const router = t.router;\nexport { TRPCError };\n\n// Global error logger middleware\nconst errorLoggerMiddleware = middleware(async ({ path, type, next, ctx }) => {\n const start = Date.now();\n\n try {\n const result = await next();\n const duration = Date.now() - start;\n\n // Log successful operations in development\n if (process.env.NODE_ENV === 'development') {\n console.log(`\u2705 ${type} ${path} - ${duration}ms`);\n }\n\n return result;\n } catch (error) {\n const duration = Date.now() - start;\n const err = error as any; // Type assertion for error object\n\n // Comprehensive error logging\n console.error('\uD83D\uDEA8 tRPC Error:', {\n timestamp: new Date().toISOString(),\n path,\n type,\n duration: `${duration}ms`,\n userId: ctx?.user?.userId || ctx?.staffUser?.id || 'anonymous',\n error: {\n name: err.name,\n message: err.message,\n code: err.code,\n stack: err.stack,\n },\n // Add SQL-specific details if available\n ...(err.code && { sqlCode: err.code }),\n ...(err.meta && { sqlMeta: err.meta }),\n ...(err.sql && { sql: err.sql }),\n });\n\n throw error; // Re-throw to maintain error flow\n }\n});\n\nexport const publicProcedure = t.procedure.use(errorLoggerMiddleware);\nexport const protectedProcedure = t.procedure.use(errorLoggerMiddleware).use(\n middleware(async ({ ctx, next }) => {\n\n if ((!ctx.user && !ctx.staffUser)) {\n throw new TRPCError({ code: 'UNAUTHORIZED' });\n }\n return next();\n })\n);\n\nexport const createCallerFactory = t.createCallerFactory;\nexport const createTRPCRouter = t.router;\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllProductsForCache,\n getAllStoresForCache,\n getAllDeliverySlotsForCache,\n getAllSpecialDealsForCache,\n getAllProductTagsForCache,\n getProductById as getProductByIdFromDb,\n type ProductBasicData,\n type StoreBasicData,\n type DeliverySlotData,\n type SpecialDealData,\n type ProductTagData,\n} from '@/src/dbService'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\n\n// Uniform Product Type (matches getProductDetails return)\ninterface Product {\n id: number\n name: string\n shortDescription: string | null\n longDescription: string | null\n price: string\n marketPrice: string | null\n unitNotation: string\n images: string[]\n isOutOfStock: boolean\n store: { id: number; name: string; description: string | null } | null\n incrementStep: number\n productQuantity: number\n isFlashAvailable: boolean\n flashPrice: string | null\n deliverySlots: Array<{ id: number; deliveryTime: Date; freezeTime: Date; isCapacityFull: boolean }>\n specialDeals: Array<{ quantity: string; price: string; validTill: Date }>\n productTags: string[]\n}\n\nexport async function initializeProducts(): Promise {\n try {\n console.log('Initializing product store in Redis...')\n\n // Fetch all products with full details (similar to productMega logic)\n const productsData = await getAllProductsForCache()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { productInfo, units } from '@/src/db/schema'\n\n const productsData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n longDescription: productInfo.longDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n storeId: productInfo.storeId,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n productQuantity: productInfo.productQuantity,\n isFlashAvailable: productInfo.isFlashAvailable,\n flashPrice: productInfo.flashPrice,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id));\n */\n\n // Fetch all stores\n const allStores = await getAllStoresForCache()\n const storeMap = new Map(allStores.map((s) => [s.id, s]))\n\n // Fetch all delivery slots (excluding full capacity slots)\n const allDeliverySlots = await getAllDeliverySlotsForCache()\n const deliverySlotsMap = new Map()\n for (const slot of allDeliverySlots) {\n if (!deliverySlotsMap.has(slot.productId))\n deliverySlotsMap.set(slot.productId, [])\n deliverySlotsMap.get(slot.productId)!.push(slot)\n }\n\n // Fetch all special deals\n const allSpecialDeals = await getAllSpecialDealsForCache()\n const specialDealsMap = new Map()\n for (const deal of allSpecialDeals) {\n if (!specialDealsMap.has(deal.productId))\n specialDealsMap.set(deal.productId, [])\n specialDealsMap.get(deal.productId)!.push(deal)\n }\n\n // Fetch all product tags\n const allProductTags = await getAllProductTagsForCache()\n const productTagsMap = new Map()\n for (const tag of allProductTags) {\n if (!productTagsMap.has(tag.productId))\n productTagsMap.set(tag.productId, [])\n productTagsMap.get(tag.productId)!.push(tag.tagName)\n }\n\n // Store each product in Redis\n // for (const product of productsData) {\n // const signedImages = scaffoldAssetUrl(\n // (product.images as string[]) || []\n // )\n // const store = product.storeId\n // ? storeMap.get(product.storeId) || null\n // : null\n // const deliverySlots = deliverySlotsMap.get(product.id) || []\n // const specialDeals = specialDealsMap.get(product.id) || []\n // const productTags = productTagsMap.get(product.id) || []\n //\n // const productObj: Product = {\n // id: product.id,\n // name: product.name,\n // shortDescription: product.shortDescription,\n // longDescription: product.longDescription,\n // price: product.price.toString(),\n // marketPrice: product.marketPrice?.toString() || null,\n // unitNotation: product.unitShortNotation,\n // images: signedImages,\n // isOutOfStock: product.isOutOfStock,\n // store: store\n // ? { id: store.id, name: store.name, description: store.description }\n // : null,\n // incrementStep: product.incrementStep,\n // productQuantity: product.productQuantity,\n // isFlashAvailable: product.isFlashAvailable,\n // flashPrice: product.flashPrice?.toString() || null,\n // deliverySlots: deliverySlots.map((s) => ({\n // id: s.id,\n // deliveryTime: s.deliveryTime,\n // freezeTime: s.freezeTime,\n // isCapacityFull: s.isCapacityFull,\n // })),\n // specialDeals: specialDeals.map((d) => ({\n // quantity: d.quantity.toString(),\n // price: d.price.toString(),\n // validTill: d.validTill,\n // })),\n // productTags: productTags,\n // }\n //\n // await redisClient.set(`product:${product.id}`, JSON.stringify(productObj))\n // }\n\n console.log('Product store initialized successfully')\n } catch (error) {\n console.error('Error initializing product store:', error)\n }\n}\n\nexport async function getProductById(id: number): Promise {\n try {\n // const key = `product:${id}`\n // const data = await redisClient.get(key)\n // if (!data) return null\n // return JSON.parse(data) as Product\n\n const product = await getProductByIdFromDb(id)\n if (!product) return null\n\n const signedImages = scaffoldAssetUrl(\n (product.images as string[]) || []\n )\n\n // Fetch store info\n const allStores = await getAllStoresForCache()\n const store = product.storeId\n ? allStores.find(s => s.id === product.storeId) || null\n : null\n\n // Fetch delivery slots for this product\n const allDeliverySlots = await getAllDeliverySlotsForCache()\n const productSlots = allDeliverySlots.filter(s => s.productId === id)\n\n // Fetch special deals for this product\n const allSpecialDeals = await getAllSpecialDealsForCache()\n const productDeals = allSpecialDeals.filter(d => d.productId === id)\n\n // Fetch product tags for this product\n const allProductTags = await getAllProductTagsForCache()\n const productTagNames = allProductTags\n .filter(t => t.productId === id)\n .map(t => t.tagName)\n\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n longDescription: product.longDescription,\n price: product.price.toString(),\n marketPrice: product.marketPrice?.toString() || null,\n unitNotation: product.unit.shortNotation,\n images: signedImages,\n isOutOfStock: product.isOutOfStock,\n store: store\n ? { id: store.id, name: store.name, description: store.description }\n : null,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n isFlashAvailable: product.isFlashAvailable,\n flashPrice: product.flashPrice?.toString() || null,\n deliverySlots: productSlots.map((s) => ({\n id: s.id,\n deliveryTime: s.deliveryTime,\n freezeTime: s.freezeTime,\n isCapacityFull: s.isCapacityFull,\n })),\n specialDeals: productDeals.map((d) => ({\n quantity: d.quantity.toString(),\n price: d.price.toString(),\n validTill: d.validTill,\n })),\n productTags: productTagNames,\n }\n } catch (error) {\n console.error(`Error getting product ${id}:`, error)\n return null\n }\n}\n\nexport async function getAllProducts(): Promise {\n try {\n // Get all keys matching the pattern \"product:*\"\n // const keys = await redisClient.KEYS('product:*')\n //\n // if (keys.length === 0) {\n // return []\n // }\n //\n // // Get all products using MGET for better performance\n // const productsData = await redisClient.MGET(keys)\n //\n // const products: Product[] = []\n // for (const productData of productsData) {\n // if (productData) {\n // products.push(JSON.parse(productData) as Product)\n // }\n // }\n //\n // return products\n\n const productsData = await getAllProductsForCache()\n\n const allStores = await getAllStoresForCache()\n const storeMap = new Map(allStores.map((s) => [s.id, s]))\n\n const allDeliverySlots = await getAllDeliverySlotsForCache()\n const deliverySlotsMap = new Map()\n for (const slot of allDeliverySlots) {\n if (!deliverySlotsMap.has(slot.productId))\n deliverySlotsMap.set(slot.productId, [])\n deliverySlotsMap.get(slot.productId)!.push(slot)\n }\n\n const allSpecialDeals = await getAllSpecialDealsForCache()\n const specialDealsMap = new Map()\n for (const deal of allSpecialDeals) {\n if (!specialDealsMap.has(deal.productId))\n specialDealsMap.set(deal.productId, [])\n specialDealsMap.get(deal.productId)!.push(deal)\n }\n\n const allProductTags = await getAllProductTagsForCache()\n const productTagsMap = new Map()\n for (const tag of allProductTags) {\n if (!productTagsMap.has(tag.productId))\n productTagsMap.set(tag.productId, [])\n productTagsMap.get(tag.productId)!.push(tag.tagName)\n }\n\n const products: Product[] = []\n for (const product of productsData) {\n const signedImages = scaffoldAssetUrl(\n (product.images as string[]) || []\n )\n const store = product.storeId\n ? storeMap.get(product.storeId) || null\n : null\n const deliverySlots = deliverySlotsMap.get(product.id) || []\n const specialDeals = specialDealsMap.get(product.id) || []\n const productTags = productTagsMap.get(product.id) || []\n\n products.push({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n longDescription: product.longDescription,\n price: product.price.toString(),\n marketPrice: product.marketPrice?.toString() || null,\n unitNotation: product.unitShortNotation,\n images: signedImages,\n isOutOfStock: product.isOutOfStock,\n store: store\n ? { id: store.id, name: store.name, description: store.description }\n : null,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n isFlashAvailable: product.isFlashAvailable,\n flashPrice: product.flashPrice?.toString() || null,\n deliverySlots: deliverySlots.map((s) => ({\n id: s.id,\n deliveryTime: s.deliveryTime,\n freezeTime: s.freezeTime,\n isCapacityFull: s.isCapacityFull,\n })),\n specialDeals: specialDeals.map((d) => ({\n quantity: d.quantity.toString(),\n price: d.price.toString(),\n validTill: d.validTill,\n })),\n productTags: productTags,\n })\n }\n\n return products\n } catch (error) {\n console.error('Error getting all products:', error)\n return []\n }\n}\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllTagsForCache,\n getAllTagProductMappings,\n getAllProductTags,\n getProductTagById as getProductTagByIdFromDb,\n type TagBasicData,\n type TagProductMapping,\n} from '@/src/dbService'\nimport { generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\n\n// Tag Type (matches getDashboardTags return)\ninterface Tag {\n id: number\n tagName: string\n tagDescription: string | null\n imageUrl: string | null\n isDashboardTag: boolean\n relatedStores: number[]\n productIds: number[]\n}\n\nasync function transformTagToStoreTag(tag: {\n id: number\n tagName: string\n tagDescription: string | null\n imageUrl: string | null\n isDashboardTag: boolean\n relatedStores: unknown\n products?: Array<{ productId: number }>\n}): Promise {\n const signedImageUrl = tag.imageUrl\n ? await generateSignedUrlFromS3Url(tag.imageUrl)\n : null\n\n return {\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription,\n imageUrl: signedImageUrl,\n isDashboardTag: tag.isDashboardTag,\n relatedStores: (tag.relatedStores as number[]) || [],\n productIds: tag.products ? tag.products.map(p => p.productId) : [],\n }\n}\n\nexport async function initializeProductTagStore(): Promise {\n try {\n console.log('Initializing product tag store in Redis...')\n\n // Fetch all tags\n const tagsData = await getAllTagsForCache()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { productTagInfo } from '@/src/db/schema'\n\n const tagsData = await db\n .select({\n id: productTagInfo.id,\n tagName: productTagInfo.tagName,\n tagDescription: productTagInfo.tagDescription,\n imageUrl: productTagInfo.imageUrl,\n isDashboardTag: productTagInfo.isDashboardTag,\n relatedStores: productTagInfo.relatedStores,\n })\n .from(productTagInfo);\n */\n\n // Fetch product IDs for each tag\n const productTagsData = await getAllTagProductMappings()\n\n /*\n // Old implementation - direct DB queries:\n import { productTags } from '@/src/db/schema'\n import { inArray } from 'drizzle-orm'\n\n const tagIds = tagsData.map(t => t.id);\n const productTagsData = await db\n .select({\n tagId: productTags.tagId,\n productId: productTags.productId,\n })\n .from(productTags)\n .where(inArray(productTags.tagId, tagIds));\n */\n\n // Group product IDs by tag\n const productIdsByTag = new Map()\n for (const pt of productTagsData) {\n if (!productIdsByTag.has(pt.tagId)) {\n productIdsByTag.set(pt.tagId, [])\n }\n productIdsByTag.get(pt.tagId)!.push(pt.productId)\n }\n\n // Store each tag in Redis\n // for (const tag of tagsData) {\n // const signedImageUrl = tag.imageUrl\n // ? await generateSignedUrlFromS3Url(tag.imageUrl)\n // : null\n //\n // const tagObj: Tag = {\n // id: tag.id,\n // tagName: tag.tagName,\n // tagDescription: tag.tagDescription,\n // imageUrl: signedImageUrl,\n // isDashboardTag: tag.isDashboardTag,\n // relatedStores: (tag.relatedStores as number[]) || [],\n // productIds: productIdsByTag.get(tag.id) || [],\n // }\n //\n // await redisClient.set(`tag:${tag.id}`, JSON.stringify(tagObj))\n // }\n\n console.log('Product tag store initialized successfully')\n } catch (error) {\n console.error('Error initializing product tag store:', error)\n }\n}\n\nexport async function getTagById(id: number): Promise {\n try {\n // const key = `tag:${id}`\n // const data = await redisClient.get(key)\n // if (!data) return null\n // return JSON.parse(data) as Tag\n\n const tag = await getProductTagByIdFromDb(id)\n if (!tag) return null\n\n return transformTagToStoreTag(tag)\n } catch (error) {\n console.error(`Error getting tag ${id}:`, error)\n return null\n }\n}\n\nexport async function getAllTags(): Promise {\n try {\n // Get all keys matching the pattern \"tag:*\"\n // const keys = await redisClient.KEYS('tag:*')\n //\n // if (keys.length === 0) {\n // return []\n // }\n //\n // // Get all tags using MGET for better performance\n // const tagsData = await redisClient.MGET(keys)\n //\n // const tags: Tag[] = []\n // for (const tagData of tagsData) {\n // if (tagData) {\n // tags.push(JSON.parse(tagData) as Tag)\n // }\n // }\n //\n // return tags\n\n const tags = await getAllProductTags()\n\n const result: Tag[] = []\n for (const tag of tags) {\n result.push(await transformTagToStoreTag(tag))\n }\n return result\n } catch (error) {\n console.error('Error getting all tags:', error)\n return []\n }\n}\n\nexport async function getDashboardTags(): Promise {\n try {\n // Get all keys matching the pattern \"tag:*\"\n // const keys = await redisClient.KEYS('tag:*')\n //\n // if (keys.length === 0) {\n // return []\n // }\n //\n // // Get all tags using MGET for better performance\n // const tagsData = await redisClient.MGET(keys)\n //\n // const dashboardTags: Tag[] = []\n // for (const tagData of tagsData) {\n // if (tagData) {\n // const tag = JSON.parse(tagData) as Tag\n // if (tag.isDashboardTag) {\n // dashboardTags.push(tag)\n // }\n // }\n // }\n //\n // return dashboardTags\n\n const tags = await getAllProductTags()\n\n const result: Tag[] = []\n for (const tag of tags) {\n if (tag.isDashboardTag) {\n result.push(await transformTagToStoreTag(tag))\n }\n }\n return result\n } catch (error) {\n console.error('Error getting dashboard tags:', error)\n return []\n }\n}\n\nexport async function getTagsByStoreId(storeId: number): Promise {\n try {\n // Get all keys matching the pattern \"tag:*\"\n // const keys = await redisClient.KEYS('tag:*')\n //\n // if (keys.length === 0) {\n // return []\n // }\n //\n // // Get all tags using MGET for better performance\n // const tagsData = await redisClient.MGET(keys)\n //\n // const storeTags: Tag[] = []\n // for (const tagData of tagsData) {\n // if (tagData) {\n // const tag = JSON.parse(tagData) as Tag\n // if (tag.relatedStores.includes(storeId)) {\n // storeTags.push(tag)\n // }\n // }\n // }\n //\n // return storeTags\n\n const tags = await getAllProductTags()\n\n const result: Tag[] = []\n for (const tag of tags) {\n const relatedStores = (tag.relatedStores as number[]) || []\n if (relatedStores.includes(storeId)) {\n result.push(await transformTagToStoreTag(tag))\n }\n }\n return result\n } catch (error) {\n console.error(`Error getting tags for store ${storeId}:`, error)\n return []\n }\n}\n", "import { router, publicProcedure } from '@/src/trpc/trpc-index'\nimport {\n getSuspendedProductIds,\n getNextDeliveryDateWithCapacity,\n getStoresSummary,\n} from '@/src/dbService'\nimport { generateSignedUrlsFromS3Urls, generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport { getAllProducts as getAllProductsFromCache } from '@/src/stores/product-store'\nimport { getDashboardTags as getDashboardTagsFromCache } from '@/src/stores/product-tag-store'\n\n// Re-export with original name for backwards compatibility\nexport const getNextDeliveryDate = getNextDeliveryDateWithCapacity\n\nexport async function scaffoldProducts() {\n // Get all products from cache\n let products = await getAllProductsFromCache();\n products = products.filter(item => Boolean(item.id))\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { productInfo } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n // Get suspended product IDs to filter them out\n const suspendedProducts = await db\n .select({ id: productInfo.id })\n .from(productInfo)\n .where(eq(productInfo.isSuspended, true));\n */\n\n const suspendedProductIds = new Set(await getSuspendedProductIds());\n\n // Filter out suspended products\n products = products.filter(product => !suspendedProductIds.has(product.id));\n\n // Format products to match the expected response structure\n const formattedProducts = await Promise.all(\n products.map(async (product) => {\n const nextDeliveryDate = await getNextDeliveryDateWithCapacity(product.id);\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: parseFloat(product.price),\n marketPrice: product.marketPrice ? parseFloat(product.marketPrice) : null,\n unit: product.unitNotation,\n unitNotation: product.unitNotation,\n incrementStep: product.incrementStep,\n productQuantity: product.productQuantity,\n storeId: product.store?.id || null,\n isOutOfStock: product.isOutOfStock,\n isFlashAvailable: product.isFlashAvailable,\n nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null,\n images: product.images,\n flashPrice: product.flashPrice\n };\n })\n );\n\n return {\n products: formattedProducts,\n count: formattedProducts.length,\n };\n}\n\nexport const commonRouter = router({\n getDashboardTags: publicProcedure\n .query(async () => {\n // Get dashboard tags from cache\n const tags = await getDashboardTagsFromCache();\n\n return {\n tags: tags,\n };\n }),\n\n getAllProductsSummary: publicProcedure\n .query(async () => {\n const response = await scaffoldProducts();\n return response;\n }),\n\n /*\n // Old implementation - moved to common-trpc-index.ts:\n getStoresSummary: publicProcedure\n .query(async () => {\n const stores = await getStoresSummary();\n return { stores };\n }),\n\n healthCheck: publicProcedure\n .query(async () => {\n const result = await healthCheck();\n return result;\n }),\n */\n});\n", "import { Context } from 'hono';\nimport { scaffoldAssetUrl } from \"@/src/lib/s3-client\"\nimport { getNextDeliveryDate } from \"@/src/trpc/apis/common-apis/common\"\nimport {\n getAllProductsWithUnits,\n type ProductSummaryData,\n} from \"@/src/dbService\"\n\n/**\n * Get all products summary for dropdown\n */\nexport const getAllProductsSummary = async (c: Context) => {\n try {\n const tagId = c.req.query('tagId');\n const tagIdNum = tagId ? parseInt(tagId) : undefined;\n\n // If tagId is provided but no products found, return empty array\n if (tagIdNum) {\n const products = await getAllProductsWithUnits(tagIdNum);\n if (products.length === 0) {\n return c.json({\n products: [],\n count: 0,\n }, 200);\n }\n }\n\n const productsWithUnits = await getAllProductsWithUnits(tagIdNum);\n\n // Generate signed URLs for product images\n const formattedProducts = await Promise.all(\n productsWithUnits.map(async (product: ProductSummaryData) => {\n const nextDeliveryDate = await getNextDeliveryDate(product.id);\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n marketPrice: product.marketPrice,\n unit: product.unitShortNotation,\n productQuantity: product.productQuantity,\n isOutOfStock: product.isOutOfStock,\n nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null,\n images: scaffoldAssetUrl((product.images as string[]) || []),\n };\n })\n );\n\n return c.json({\n products: formattedProducts,\n count: formattedProducts.length,\n }, 200);\n } catch (error) {\n console.error(\"Get products summary error:\", error);\n return c.json({ error: \"Failed to fetch products summary\" }, 500);\n }\n};\n\n/*\n// Old implementation - direct DB queries:\nimport { eq, gt, and, sql, inArray } from \"drizzle-orm\";\nimport { db } from \"@/src/db/db_index\"\nimport { productInfo, units, productSlots, deliverySlotInfo, productTags } from \"@/src/db/schema\"\n\nconst getNextDeliveryDate = async (productId: number): Promise => {\n const result = await db\n .select({ deliveryTime: deliverySlotInfo.deliveryTime })\n .from(productSlots)\n .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n .where(\n and(\n eq(productSlots.productId, productId),\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, sql`NOW()`)\n )\n )\n .orderBy(deliverySlotInfo.deliveryTime)\n .limit(1);\n \n return result[0]?.deliveryTime || null;\n};\n\nexport const getAllProductsSummary = async (req: Request, res: Response) => {\n try {\n const { tagId } = req.query;\n const tagIdNum = tagId ? parseInt(tagId as string) : null;\n\n let productIds: number[] | null = null;\n\n // If tagId is provided, get products that have this tag\n if (tagIdNum) {\n const taggedProducts = await db\n .select({ productId: productTags.productId })\n .from(productTags)\n .where(eq(productTags.tagId, tagIdNum));\n\n productIds = taggedProducts.map(tp => tp.productId);\n }\n\n let whereCondition = undefined;\n\n // Filter by product IDs if tag filtering is applied\n if (productIds && productIds.length > 0) {\n whereCondition = inArray(productInfo.id, productIds);\n } else if (tagIdNum) {\n // If tagId was provided but no products found, return empty array\n return res.status(200).json({\n products: [],\n count: 0,\n });\n }\n\n const productsWithUnits = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n productQuantity: productInfo.productQuantity,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(whereCondition);\n\n // Generate signed URLs for product images\n const formattedProducts = await Promise.all(\n productsWithUnits.map(async (product) => {\n const nextDeliveryDate = await getNextDeliveryDate(product.id);\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n marketPrice: product.marketPrice,\n unit: product.unitShortNotation,\n productQuantity: product.productQuantity,\n isOutOfStock: product.isOutOfStock,\n nextDeliveryDate: nextDeliveryDate ? nextDeliveryDate.toISOString() : null,\n images: scaffoldAssetUrl((product.images as string[]) || []),\n };\n })\n );\n\n return res.status(200).json({\n products: formattedProducts,\n count: formattedProducts.length,\n });\n } catch (error) {\n console.error(\"Get products summary error:\", error);\n return res.status(500).json({ error: \"Failed to fetch products summary\" });\n }\n};\n*/\n", "import { Hono } from 'hono';\nimport { getAllProductsSummary } from \"@/src/apis/common-apis/apis/common-product.controller\"\n\nconst router = new Hono();\n\nrouter.get(\"/summary\", getAllProductsSummary);\n\n\nconst commonProductsRouter= router;\nexport default commonProductsRouter;\n", "import { Hono } from 'hono';\nimport commonProductsRouter from \"@/src/apis/common-apis/apis/common-product.router\"\n\nconst router = new Hono();\n\nrouter.route('/products', commonProductsRouter)\n\nconst commonRouter = router;\n\nexport default commonRouter;\n", "import { Hono } from 'hono';\nimport avRouter from \"@/src/apis/admin-apis/apis/av-router\"\nimport commonRouter from \"@/src/apis/common-apis/apis/common.router\"\n\nconst router = new Hono();\n\nrouter.route('/av', avRouter);\nrouter.route('/cm', commonRouter);\n\nconst v1Router = router;\n\nexport default v1Router;\n", "import { Hono } from 'hono';\n\nconst router = new Hono();\n\nrouter.get('/', (c) => {\n return c.json({\n status: 'ok',\n message: 'Health check passed',\n timestamp: new Date().toISOString(),\n });\n});\n\nexport default router;\n", "import { Context, Next } from 'hono';\nimport { jwtVerify } from 'jose';\nimport { getStaffUserById, isUserSuspended } from '@/src/dbService';\nimport { ApiError } from '@/src/lib/api-error';\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter';\n\ninterface UserContext {\n userId: number;\n name?: string;\n email?: string;\n mobile?: string;\n}\n\ninterface StaffContext {\n id: number;\n name: string;\n}\n\nexport const authenticateUser = async (c: Context, next: Next) => {\n try {\n const authHeader = c.req.header('authorization');\n\n if (!authHeader?.startsWith('Bearer ')) {\n throw new ApiError('Authorization token required', 401);\n }\n\n const token = authHeader.substring(7);\n console.log(c.req.header)\n\n const { payload } = await jwtVerify(token, getEncodedJwtSecret());\n const decoded = payload as any;\n\n // Check if this is a staff token (has staffId)\n if (decoded.staffId) {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { staffUsers } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n const staff = await db.query.staffUsers.findFirst({\n where: eq(staffUsers.id, decoded.staffId),\n });\n */\n\n // This is a staff token, verify staff exists\n const staff = await getStaffUserById(decoded.staffId);\n\n if (!staff) {\n throw new ApiError('Invalid staff token', 401);\n }\n\n c.set('staffUser', {\n id: staff.id,\n name: staff.name,\n });\n } else {\n // This is a regular user token\n c.set('user', decoded);\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { userDetails } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n const details = await db.query.userDetails.findFirst({\n where: eq(userDetails.userId, decoded.userId),\n });\n\n if (details?.isSuspended) {\n throw new ApiError('Account suspended', 403);\n }\n */\n\n // Check if user is suspended\n const suspended = await isUserSuspended(decoded.userId);\n\n if (suspended) {\n throw new ApiError('Account suspended', 403);\n }\n }\n\n await next();\n } catch (error) {\n throw error;\n }\n};\n", "import { Hono } from 'hono';\nimport avRouter from \"@/src/apis/admin-apis/apis/av-router\"\nimport { ApiError } from \"@/src/lib/api-error\"\nimport v1Router from \"@/src/v1-router\"\nimport testController from \"@/src/test-controller\"\nimport { authenticateUser } from \"@/src/middleware/auth.middleware\"\n\nconst router = new Hono();\n\n// Health check endpoints (no auth required)\nrouter.get('/health', (c) => {\n return c.json({\n status: 'OK',\n timestamp: new Date().toISOString(),\n uptime: process.uptime(),\n message: 'Hello world'\n });\n});\n\nrouter.get('/seed', (c) => {\n return c.json({\n status: 'OK',\n timestamp: new Date().toISOString(),\n uptime: process.uptime()\n });\n});\n\n// Apply authentication middleware to all subsequent routes\nrouter.use('*', authenticateUser);\n\nrouter.route('/v1', v1Router);\n// router.route('/av', avRouter);\nrouter.route('/test', testController);\n\nconst mainRouter = router;\n\nexport default mainRouter;\n", "/** A special constant with type `never` */\nexport const NEVER = Object.freeze({\n status: \"aborted\",\n});\nexport /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, params) {\n function init(inst, def) {\n if (!inst._zod) {\n Object.defineProperty(inst, \"_zod\", {\n value: {\n def,\n constr: _,\n traits: new Set(),\n },\n enumerable: false,\n });\n }\n if (inst._zod.traits.has(name)) {\n return;\n }\n inst._zod.traits.add(name);\n initializer(inst, def);\n // support prototype modifications\n const proto = _.prototype;\n const keys = Object.keys(proto);\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i];\n if (!(k in inst)) {\n inst[k] = proto[k].bind(inst);\n }\n }\n }\n // doesn't work if Parent has a constructor with arguments\n const Parent = params?.Parent ?? Object;\n class Definition extends Parent {\n }\n Object.defineProperty(Definition, \"name\", { value: name });\n function _(def) {\n var _a;\n const inst = params?.Parent ? new Definition() : this;\n init(inst, def);\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n for (const fn of inst._zod.deferred) {\n fn();\n }\n return inst;\n }\n Object.defineProperty(_, \"init\", { value: init });\n Object.defineProperty(_, Symbol.hasInstance, {\n value: (inst) => {\n if (params?.Parent && inst instanceof params.Parent)\n return true;\n return inst?._zod?.traits?.has(name);\n },\n });\n Object.defineProperty(_, \"name\", { value: name });\n return _;\n}\n////////////////////////////// UTILITIES ///////////////////////////////////////\nexport const $brand = Symbol(\"zod_brand\");\nexport class $ZodAsyncError extends Error {\n constructor() {\n super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n }\n}\nexport class $ZodEncodeError extends Error {\n constructor(name) {\n super(`Encountered unidirectional transform during encode: ${name}`);\n this.name = \"ZodEncodeError\";\n }\n}\nexport const globalConfig = {};\nexport function config(newConfig) {\n if (newConfig)\n Object.assign(globalConfig, newConfig);\n return globalConfig;\n}\n", "// functions\nexport function assertEqual(val) {\n return val;\n}\nexport function assertNotEqual(val) {\n return val;\n}\nexport function assertIs(_arg) { }\nexport function assertNever(_x) {\n throw new Error(\"Unexpected value in exhaustive check\");\n}\nexport function assert(_) { }\nexport function getEnumValues(entries) {\n const numericValues = Object.values(entries).filter((v) => typeof v === \"number\");\n const values = Object.entries(entries)\n .filter(([k, _]) => numericValues.indexOf(+k) === -1)\n .map(([_, v]) => v);\n return values;\n}\nexport function joinValues(array, separator = \"|\") {\n return array.map((val) => stringifyPrimitive(val)).join(separator);\n}\nexport function jsonStringifyReplacer(_, value) {\n if (typeof value === \"bigint\")\n return value.toString();\n return value;\n}\nexport function cached(getter) {\n const set = false;\n return {\n get value() {\n if (!set) {\n const value = getter();\n Object.defineProperty(this, \"value\", { value });\n return value;\n }\n throw new Error(\"cached value already set\");\n },\n };\n}\nexport function nullish(input) {\n return input === null || input === undefined;\n}\nexport function cleanRegex(source) {\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n return source.slice(start, end);\n}\nexport function floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepString = step.toString();\n let stepDecCount = (stepString.split(\".\")[1] || \"\").length;\n if (stepDecCount === 0 && /\\d?e-\\d?/.test(stepString)) {\n const match = stepString.match(/\\d?e-(\\d?)/);\n if (match?.[1]) {\n stepDecCount = Number.parseInt(match[1]);\n }\n }\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / 10 ** decCount;\n}\nconst EVALUATING = Symbol(\"evaluating\");\nexport function defineLazy(object, key, getter) {\n let value = undefined;\n Object.defineProperty(object, key, {\n get() {\n if (value === EVALUATING) {\n // Circular reference detected, return undefined to break the cycle\n return undefined;\n }\n if (value === undefined) {\n value = EVALUATING;\n value = getter();\n }\n return value;\n },\n set(v) {\n Object.defineProperty(object, key, {\n value: v,\n // configurable: true,\n });\n // object[key] = v;\n },\n configurable: true,\n });\n}\nexport function objectClone(obj) {\n return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));\n}\nexport function assignProp(target, prop, value) {\n Object.defineProperty(target, prop, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n}\nexport function mergeDefs(...defs) {\n const mergedDescriptors = {};\n for (const def of defs) {\n const descriptors = Object.getOwnPropertyDescriptors(def);\n Object.assign(mergedDescriptors, descriptors);\n }\n return Object.defineProperties({}, mergedDescriptors);\n}\nexport function cloneDef(schema) {\n return mergeDefs(schema._zod.def);\n}\nexport function getElementAtPath(obj, path) {\n if (!path)\n return obj;\n return path.reduce((acc, key) => acc?.[key], obj);\n}\nexport function promiseAllObject(promisesObj) {\n const keys = Object.keys(promisesObj);\n const promises = keys.map((key) => promisesObj[key]);\n return Promise.all(promises).then((results) => {\n const resolvedObj = {};\n for (let i = 0; i < keys.length; i++) {\n resolvedObj[keys[i]] = results[i];\n }\n return resolvedObj;\n });\n}\nexport function randomString(length = 10) {\n const chars = \"abcdefghijklmnopqrstuvwxyz\";\n let str = \"\";\n for (let i = 0; i < length; i++) {\n str += chars[Math.floor(Math.random() * chars.length)];\n }\n return str;\n}\nexport function esc(str) {\n return JSON.stringify(str);\n}\nexport function slugify(input) {\n return input\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/[\\s_-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\nexport const captureStackTrace = (\"captureStackTrace\" in Error ? Error.captureStackTrace : (..._args) => { });\nexport function isObject(data) {\n return typeof data === \"object\" && data !== null && !Array.isArray(data);\n}\nexport const allowsEval = cached(() => {\n // @ts-ignore\n if (typeof navigator !== \"undefined\" && navigator?.userAgent?.includes(\"Cloudflare\")) {\n return false;\n }\n try {\n const F = Function;\n new F(\"\");\n return true;\n }\n catch (_) {\n return false;\n }\n});\nexport function isPlainObject(o) {\n if (isObject(o) === false)\n return false;\n // modified constructor\n const ctor = o.constructor;\n if (ctor === undefined)\n return true;\n if (typeof ctor !== \"function\")\n return true;\n // modified prototype\n const prot = ctor.prototype;\n if (isObject(prot) === false)\n return false;\n // ctor doesn't have static `isPrototypeOf`\n if (Object.prototype.hasOwnProperty.call(prot, \"isPrototypeOf\") === false) {\n return false;\n }\n return true;\n}\nexport function shallowClone(o) {\n if (isPlainObject(o))\n return { ...o };\n if (Array.isArray(o))\n return [...o];\n return o;\n}\nexport function numKeys(data) {\n let keyCount = 0;\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n keyCount++;\n }\n }\n return keyCount;\n}\nexport const getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return \"undefined\";\n case \"string\":\n return \"string\";\n case \"number\":\n return Number.isNaN(data) ? \"nan\" : \"number\";\n case \"boolean\":\n return \"boolean\";\n case \"function\":\n return \"function\";\n case \"bigint\":\n return \"bigint\";\n case \"symbol\":\n return \"symbol\";\n case \"object\":\n if (Array.isArray(data)) {\n return \"array\";\n }\n if (data === null) {\n return \"null\";\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return \"promise\";\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return \"map\";\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return \"set\";\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return \"date\";\n }\n // @ts-ignore\n if (typeof File !== \"undefined\" && data instanceof File) {\n return \"file\";\n }\n return \"object\";\n default:\n throw new Error(`Unknown data type: ${t}`);\n }\n};\nexport const propertyKeyTypes = new Set([\"string\", \"number\", \"symbol\"]);\nexport const primitiveTypes = new Set([\"string\", \"number\", \"bigint\", \"boolean\", \"symbol\", \"undefined\"]);\nexport function escapeRegex(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n// zod-specific utils\nexport function clone(inst, def, params) {\n const cl = new inst._zod.constr(def ?? inst._zod.def);\n if (!def || params?.parent)\n cl._zod.parent = inst;\n return cl;\n}\nexport function normalizeParams(_params) {\n const params = _params;\n if (!params)\n return {};\n if (typeof params === \"string\")\n return { error: () => params };\n if (params?.message !== undefined) {\n if (params?.error !== undefined)\n throw new Error(\"Cannot specify both `message` and `error` params\");\n params.error = params.message;\n }\n delete params.message;\n if (typeof params.error === \"string\")\n return { ...params, error: () => params.error };\n return params;\n}\nexport function createTransparentProxy(getter) {\n let target;\n return new Proxy({}, {\n get(_, prop, receiver) {\n target ?? (target = getter());\n return Reflect.get(target, prop, receiver);\n },\n set(_, prop, value, receiver) {\n target ?? (target = getter());\n return Reflect.set(target, prop, value, receiver);\n },\n has(_, prop) {\n target ?? (target = getter());\n return Reflect.has(target, prop);\n },\n deleteProperty(_, prop) {\n target ?? (target = getter());\n return Reflect.deleteProperty(target, prop);\n },\n ownKeys(_) {\n target ?? (target = getter());\n return Reflect.ownKeys(target);\n },\n getOwnPropertyDescriptor(_, prop) {\n target ?? (target = getter());\n return Reflect.getOwnPropertyDescriptor(target, prop);\n },\n defineProperty(_, prop, descriptor) {\n target ?? (target = getter());\n return Reflect.defineProperty(target, prop, descriptor);\n },\n });\n}\nexport function stringifyPrimitive(value) {\n if (typeof value === \"bigint\")\n return value.toString() + \"n\";\n if (typeof value === \"string\")\n return `\"${value}\"`;\n return `${value}`;\n}\nexport function optionalKeys(shape) {\n return Object.keys(shape).filter((k) => {\n return shape[k]._zod.optin === \"optional\" && shape[k]._zod.optout === \"optional\";\n });\n}\nexport const NUMBER_FORMAT_RANGES = {\n safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],\n int32: [-2147483648, 2147483647],\n uint32: [0, 4294967295],\n float32: [-3.4028234663852886e38, 3.4028234663852886e38],\n float64: [-Number.MAX_VALUE, Number.MAX_VALUE],\n};\nexport const BIGINT_FORMAT_RANGES = {\n int64: [/* @__PURE__*/ BigInt(\"-9223372036854775808\"), /* @__PURE__*/ BigInt(\"9223372036854775807\")],\n uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt(\"18446744073709551615\")],\n};\nexport function pick(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".pick() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = {};\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n newShape[key] = currDef.shape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function omit(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".omit() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = { ...schema._zod.def.shape };\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n delete newShape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function extend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to extend: expected a plain object\");\n }\n const checks = schema._zod.def.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n // Only throw if new shape overlaps with existing shape\n // Use getOwnPropertyDescriptor to check key existence without accessing values\n const existingShape = schema._zod.def.shape;\n for (const key in shape) {\n if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {\n throw new Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\");\n }\n }\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function safeExtend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to safeExtend: expected a plain object\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function merge(a, b) {\n const def = mergeDefs(a._zod.def, {\n get shape() {\n const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n get catchall() {\n return b._zod.def.catchall;\n },\n checks: [], // delete existing checks\n });\n return clone(a, def);\n}\nexport function partial(Class, schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".partial() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in oldShape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n else {\n for (const key in oldShape) {\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function required(Class, schema, mask) {\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n else {\n for (const key in oldShape) {\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n });\n return clone(schema, def);\n}\n// invalid_type | too_big | too_small | invalid_format | not_multiple_of | unrecognized_keys | invalid_union | invalid_key | invalid_element | invalid_value | custom\nexport function aborted(x, startIndex = 0) {\n if (x.aborted === true)\n return true;\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue !== true) {\n return true;\n }\n }\n return false;\n}\nexport function prefixIssues(path, issues) {\n return issues.map((iss) => {\n var _a;\n (_a = iss).path ?? (_a.path = []);\n iss.path.unshift(path);\n return iss;\n });\n}\nexport function unwrapMessage(message) {\n return typeof message === \"string\" ? message : message?.message;\n}\nexport function finalizeIssue(iss, ctx, config) {\n const full = { ...iss, path: iss.path ?? [] };\n // for backwards compatibility\n if (!iss.message) {\n const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??\n unwrapMessage(ctx?.error?.(iss)) ??\n unwrapMessage(config.customError?.(iss)) ??\n unwrapMessage(config.localeError?.(iss)) ??\n \"Invalid input\";\n full.message = message;\n }\n // delete (full as any).def;\n delete full.inst;\n delete full.continue;\n if (!ctx?.reportInput) {\n delete full.input;\n }\n return full;\n}\nexport function getSizableOrigin(input) {\n if (input instanceof Set)\n return \"set\";\n if (input instanceof Map)\n return \"map\";\n // @ts-ignore\n if (input instanceof File)\n return \"file\";\n return \"unknown\";\n}\nexport function getLengthableOrigin(input) {\n if (Array.isArray(input))\n return \"array\";\n if (typeof input === \"string\")\n return \"string\";\n return \"unknown\";\n}\nexport function parsedType(data) {\n const t = typeof data;\n switch (t) {\n case \"number\": {\n return Number.isNaN(data) ? \"nan\" : \"number\";\n }\n case \"object\": {\n if (data === null) {\n return \"null\";\n }\n if (Array.isArray(data)) {\n return \"array\";\n }\n const obj = data;\n if (obj && Object.getPrototypeOf(obj) !== Object.prototype && \"constructor\" in obj && obj.constructor) {\n return obj.constructor.name;\n }\n }\n }\n return t;\n}\nexport function issue(...args) {\n const [iss, input, inst] = args;\n if (typeof iss === \"string\") {\n return {\n message: iss,\n code: \"custom\",\n input,\n inst,\n };\n }\n return { ...iss };\n}\nexport function cleanEnum(obj) {\n return Object.entries(obj)\n .filter(([k, _]) => {\n // return true if NaN, meaning it's not a number, thus a string key\n return Number.isNaN(Number.parseInt(k, 10));\n })\n .map((el) => el[1]);\n}\n// Codec utility functions\nexport function base64ToUint8Array(base64) {\n const binaryString = atob(base64);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n return bytes;\n}\nexport function uint8ArrayToBase64(bytes) {\n let binaryString = \"\";\n for (let i = 0; i < bytes.length; i++) {\n binaryString += String.fromCharCode(bytes[i]);\n }\n return btoa(binaryString);\n}\nexport function base64urlToUint8Array(base64url) {\n const base64 = base64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padding = \"=\".repeat((4 - (base64.length % 4)) % 4);\n return base64ToUint8Array(base64 + padding);\n}\nexport function uint8ArrayToBase64url(bytes) {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\nexport function hexToUint8Array(hex) {\n const cleanHex = hex.replace(/^0x/, \"\");\n if (cleanHex.length % 2 !== 0) {\n throw new Error(\"Invalid hex string length\");\n }\n const bytes = new Uint8Array(cleanHex.length / 2);\n for (let i = 0; i < cleanHex.length; i += 2) {\n bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);\n }\n return bytes;\n}\nexport function uint8ArrayToHex(bytes) {\n return Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n// instanceof\nexport class Class {\n constructor(..._args) { }\n}\n", "import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n Object.defineProperty(inst, \"_zod\", {\n value: inst._zod,\n enumerable: false,\n });\n Object.defineProperty(inst, \"issues\", {\n value: def,\n enumerable: false,\n });\n inst.message = JSON.stringify(def, util.jsonStringifyReplacer, 2);\n Object.defineProperty(inst, \"toString\", {\n value: () => inst.message,\n enumerable: false,\n });\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, { Parent: Error });\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues });\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues });\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a, _b;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, issue.path));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_b = curr.items)[el] ?? (_b[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * \u2716 Expected number, received string at \"username\n * favoriteNumbers[0]\n * \u2716 Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n const segs = [];\n const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`\u2716 ${issue.message}`);\n if (issue.path?.length)\n lines.push(` \u2192 at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\\n\");\n}\n", "import * as core from \"./core.js\";\nimport * as errors from \"./errors.js\";\nimport * as util from \"./util.js\";\nexport const _parse = (_Err) => (schema, value, _ctx, _params) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n if (result.issues.length) {\n const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, _params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parse = /* @__PURE__*/ _parse(errors.$ZodRealError);\nexport const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n if (result.issues.length) {\n const e = new (params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parseAsync = /* @__PURE__*/ _parseAsync(errors.$ZodRealError);\nexport const _safeParse = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n return result.issues.length\n ? {\n success: false,\n error: new (_Err ?? errors.$ZodError)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodRealError);\nexport const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n return result.issues.length\n ? {\n success: false,\n error: new _Err(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodRealError);\nexport const _encode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _parse(_Err)(schema, value, ctx);\n};\nexport const encode = /* @__PURE__*/ _encode(errors.$ZodRealError);\nexport const _decode = (_Err) => (schema, value, _ctx) => {\n return _parse(_Err)(schema, value, _ctx);\n};\nexport const decode = /* @__PURE__*/ _decode(errors.$ZodRealError);\nexport const _encodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _parseAsync(_Err)(schema, value, ctx);\n};\nexport const encodeAsync = /* @__PURE__*/ _encodeAsync(errors.$ZodRealError);\nexport const _decodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _parseAsync(_Err)(schema, value, _ctx);\n};\nexport const decodeAsync = /* @__PURE__*/ _decodeAsync(errors.$ZodRealError);\nexport const _safeEncode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _safeParse(_Err)(schema, value, ctx);\n};\nexport const safeEncode = /* @__PURE__*/ _safeEncode(errors.$ZodRealError);\nexport const _safeDecode = (_Err) => (schema, value, _ctx) => {\n return _safeParse(_Err)(schema, value, _ctx);\n};\nexport const safeDecode = /* @__PURE__*/ _safeDecode(errors.$ZodRealError);\nexport const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _safeParseAsync(_Err)(schema, value, ctx);\n};\nexport const safeEncodeAsync = /* @__PURE__*/ _safeEncodeAsync(errors.$ZodRealError);\nexport const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _safeParseAsync(_Err)(schema, value, _ctx);\n};\nexport const safeDecodeAsync = /* @__PURE__*/ _safeDecodeAsync(errors.$ZodRealError);\n", "import * as util from \"./util.js\";\nexport const cuid = /^[cC][^\\s-]{8,}$/;\nexport const cuid2 = /^[0-9a-z]+$/;\nexport const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;\nexport const xid = /^[0-9a-vA-V]{20}$/;\nexport const ksuid = /^[A-Za-z0-9]{27}$/;\nexport const nanoid = /^[a-zA-Z0-9_-]{21}$/;\n/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */\nexport const duration = /^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;\n/** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */\nexport const extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */\nexport const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;\n/** Returns a regex for validating an RFC 9562/4122 UUID.\n *\n * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */\nexport const uuid = (version) => {\n if (!version)\n return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;\n return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);\n};\nexport const uuid4 = /*@__PURE__*/ uuid(4);\nexport const uuid6 = /*@__PURE__*/ uuid(6);\nexport const uuid7 = /*@__PURE__*/ uuid(7);\n/** Practical email validation */\nexport const email = /^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;\n/** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */\nexport const html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n/** The classic emailregex.com regex for RFC 5322-compliant emails */\nexport const rfc5322Email = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n/** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */\nexport const unicodeEmail = /^[^\\s@\"]{1,64}@[^\\s@]{1,255}$/u;\nexport const idnEmail = unicodeEmail;\nexport const browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emoji = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nexport function emoji() {\n return new RegExp(_emoji, \"u\");\n}\nexport const ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\nexport const ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;\nexport const mac = (delimiter) => {\n const escapedDelim = util.escapeRegex(delimiter ?? \":\");\n return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);\n};\nexport const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/;\nexport const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nexport const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;\nexport const base64url = /^[A-Za-z0-9_-]*$/;\n// based on https://stackoverflow.com/questions/106179/regular-expression-to-match-dns-hostname-or-ip-address\n// export const hostname: RegExp = /^([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+$/;\nexport const hostname = /^(?=.{1,253}\\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\\.?$/;\nexport const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/;\n// https://blog.stevenlevithan.com/archives/validate-phone-number#r4-3 (regex sans spaces)\n// E.164: leading digit must be 1-9; total digits (excluding '+') between 7-15\nexport const e164 = /^\\+[1-9]\\d{6,14}$/;\n// const dateSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\nconst dateSource = `(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))`;\nexport const date = /*@__PURE__*/ new RegExp(`^${dateSource}$`);\nfunction timeSource(args) {\n const hhmm = `(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;\n const regex = typeof args.precision === \"number\"\n ? args.precision === -1\n ? `${hhmm}`\n : args.precision === 0\n ? `${hhmm}:[0-5]\\\\d`\n : `${hhmm}:[0-5]\\\\d\\\\.\\\\d{${args.precision}}`\n : `${hhmm}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`;\n return regex;\n}\nexport function time(args) {\n return new RegExp(`^${timeSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nexport function datetime(args) {\n const time = timeSource({ precision: args.precision });\n const opts = [\"Z\"];\n if (args.local)\n opts.push(\"\");\n // if (args.offset) opts.push(`([+-]\\\\d{2}:\\\\d{2})`);\n if (args.offset)\n opts.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);\n const timeRegex = `${time}(?:${opts.join(\"|\")})`;\n return new RegExp(`^${dateSource}T(?:${timeRegex})$`);\n}\nexport const string = (params) => {\n const regex = params ? `[\\\\s\\\\S]{${params?.minimum ?? 0},${params?.maximum ?? \"\"}}` : `[\\\\s\\\\S]*`;\n return new RegExp(`^${regex}$`);\n};\nexport const bigint = /^-?\\d+n?$/;\nexport const integer = /^-?\\d+$/;\nexport const number = /^-?\\d+(?:\\.\\d+)?$/;\nexport const boolean = /^(?:true|false)$/i;\nconst _null = /^null$/i;\nexport { _null as null };\nconst _undefined = /^undefined$/i;\nexport { _undefined as undefined };\n// regex for string with no uppercase letters\nexport const lowercase = /^[^A-Z]*$/;\n// regex for string with no lowercase letters\nexport const uppercase = /^[^a-z]*$/;\n// regex for hexadecimal strings (any length)\nexport const hex = /^[0-9a-fA-F]*$/;\n// Hash regexes for different algorithms and encodings\n// Helper function to create base64 regex with exact length and padding\nfunction fixedBase64(bodyLength, padding) {\n return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);\n}\n// Helper function to create base64url regex with exact length (no padding)\nfunction fixedBase64url(length) {\n return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);\n}\n// MD5 (16 bytes): base64 = 24 chars total (22 + \"==\")\nexport const md5_hex = /^[0-9a-fA-F]{32}$/;\nexport const md5_base64 = /*@__PURE__*/ fixedBase64(22, \"==\");\nexport const md5_base64url = /*@__PURE__*/ fixedBase64url(22);\n// SHA1 (20 bytes): base64 = 28 chars total (27 + \"=\")\nexport const sha1_hex = /^[0-9a-fA-F]{40}$/;\nexport const sha1_base64 = /*@__PURE__*/ fixedBase64(27, \"=\");\nexport const sha1_base64url = /*@__PURE__*/ fixedBase64url(27);\n// SHA256 (32 bytes): base64 = 44 chars total (43 + \"=\")\nexport const sha256_hex = /^[0-9a-fA-F]{64}$/;\nexport const sha256_base64 = /*@__PURE__*/ fixedBase64(43, \"=\");\nexport const sha256_base64url = /*@__PURE__*/ fixedBase64url(43);\n// SHA384 (48 bytes): base64 = 64 chars total (no padding)\nexport const sha384_hex = /^[0-9a-fA-F]{96}$/;\nexport const sha384_base64 = /*@__PURE__*/ fixedBase64(64, \"\");\nexport const sha384_base64url = /*@__PURE__*/ fixedBase64url(64);\n// SHA512 (64 bytes): base64 = 88 chars total (86 + \"==\")\nexport const sha512_hex = /^[0-9a-fA-F]{128}$/;\nexport const sha512_base64 = /*@__PURE__*/ fixedBase64(86, \"==\");\nexport const sha512_base64url = /*@__PURE__*/ fixedBase64url(86);\n", "// import { $ZodType } from \"./schemas.js\";\nimport * as core from \"./core.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nexport const $ZodCheck = /*@__PURE__*/ core.$constructor(\"$ZodCheck\", (inst, def) => {\n var _a;\n inst._zod ?? (inst._zod = {});\n inst._zod.def = def;\n (_a = inst._zod).onattach ?? (_a.onattach = []);\n});\nconst numericOriginMap = {\n number: \"number\",\n bigint: \"bigint\",\n object: \"date\",\n};\nexport const $ZodCheckLessThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckLessThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;\n if (def.value < curr) {\n if (def.inclusive)\n bag.maximum = def.value;\n else\n bag.exclusiveMaximum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckGreaterThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckGreaterThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;\n if (def.value > curr) {\n if (def.inclusive)\n bag.minimum = def.value;\n else\n bag.exclusiveMinimum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMultipleOf = \n/*@__PURE__*/ core.$constructor(\"$ZodCheckMultipleOf\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n var _a;\n (_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);\n });\n inst._zod.check = (payload) => {\n if (typeof payload.value !== typeof def.value)\n throw new Error(\"Cannot mix number and bigint in multiple_of check.\");\n const isMultiple = typeof payload.value === \"bigint\"\n ? payload.value % def.value === BigInt(0)\n : util.floatSafeRemainder(payload.value, def.value) === 0;\n if (isMultiple)\n return;\n payload.issues.push({\n origin: typeof payload.value,\n code: \"not_multiple_of\",\n divisor: def.value,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckNumberFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n def.format = def.format || \"float64\";\n const isInt = def.format?.includes(\"int\");\n const origin = isInt ? \"int\" : \"number\";\n const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n if (isInt)\n bag.pattern = regexes.integer;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (isInt) {\n if (!Number.isInteger(input)) {\n // invalid_format issue\n // payload.issues.push({\n // expected: def.format,\n // format: def.format,\n // code: \"invalid_format\",\n // input,\n // inst,\n // });\n // invalid_type issue\n payload.issues.push({\n expected: origin,\n format: def.format,\n code: \"invalid_type\",\n continue: false,\n input,\n inst,\n });\n return;\n // not_multiple_of issue\n // payload.issues.push({\n // code: \"not_multiple_of\",\n // origin: \"number\",\n // input,\n // inst,\n // divisor: 1,\n // });\n }\n if (!Number.isSafeInteger(input)) {\n if (input > 0) {\n // too_big\n payload.issues.push({\n input,\n code: \"too_big\",\n maximum: Number.MAX_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n else {\n // too_small\n payload.issues.push({\n input,\n code: \"too_small\",\n minimum: Number.MIN_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n return;\n }\n }\n if (input < minimum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_small\",\n minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckBigIntFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (input < minimum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_small\",\n minimum: minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckMaxSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size <= def.maximum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size >= def.minimum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckSizeEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckSizeEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.size;\n bag.maximum = def.size;\n bag.size = def.size;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size === def.size)\n return;\n const tooBig = size > def.size;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n ...(tooBig ? { code: \"too_big\", maximum: def.size } : { code: \"too_small\", minimum: def.size }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMaxLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length <= def.maximum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length >= def.minimum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckLengthEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.length;\n bag.maximum = def.length;\n bag.length = def.length;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length === def.length)\n return;\n const origin = util.getLengthableOrigin(input);\n const tooBig = length > def.length;\n payload.issues.push({\n origin,\n ...(tooBig ? { code: \"too_big\", maximum: def.length } : { code: \"too_small\", minimum: def.length }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckStringFormat\", (inst, def) => {\n var _a, _b;\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n if (def.pattern) {\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(def.pattern);\n }\n });\n if (def.pattern)\n (_a = inst._zod).check ?? (_a.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n ...(def.pattern ? { pattern: def.pattern.toString() } : {}),\n inst,\n continue: !def.abort,\n });\n });\n else\n (_b = inst._zod).check ?? (_b.check = () => { });\n});\nexport const $ZodCheckRegex = /*@__PURE__*/ core.$constructor(\"$ZodCheckRegex\", (inst, def) => {\n $ZodCheckStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"regex\",\n input: payload.value,\n pattern: def.pattern.toString(),\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLowerCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckLowerCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.lowercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckUpperCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckUpperCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.uppercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckIncludes = /*@__PURE__*/ core.$constructor(\"$ZodCheckIncludes\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const escapedRegex = util.escapeRegex(def.includes);\n const pattern = new RegExp(typeof def.position === \"number\" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);\n def.pattern = pattern;\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.includes(def.includes, def.position))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"includes\",\n includes: def.includes,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStartsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckStartsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.startsWith(def.prefix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"starts_with\",\n prefix: def.prefix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckEndsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckEndsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.endsWith(def.suffix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"ends_with\",\n suffix: def.suffix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n///////////////////////////////////\n///// $ZodCheckProperty /////\n///////////////////////////////////\nfunction handleCheckPropertyResult(result, payload, property) {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(property, result.issues));\n }\n}\nexport const $ZodCheckProperty = /*@__PURE__*/ core.$constructor(\"$ZodCheckProperty\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n const result = def.schema._zod.run({\n value: payload.value[def.property],\n issues: [],\n }, {});\n if (result instanceof Promise) {\n return result.then((result) => handleCheckPropertyResult(result, payload, def.property));\n }\n handleCheckPropertyResult(result, payload, def.property);\n return;\n };\n});\nexport const $ZodCheckMimeType = /*@__PURE__*/ core.$constructor(\"$ZodCheckMimeType\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const mimeSet = new Set(def.mime);\n inst._zod.onattach.push((inst) => {\n inst._zod.bag.mime = def.mime;\n });\n inst._zod.check = (payload) => {\n if (mimeSet.has(payload.value.type))\n return;\n payload.issues.push({\n code: \"invalid_value\",\n values: def.mime,\n input: payload.value.type,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckOverwrite = /*@__PURE__*/ core.$constructor(\"$ZodCheckOverwrite\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n payload.value = def.tx(payload.value);\n };\n});\n", "export class Doc {\n constructor(args = []) {\n this.content = [];\n this.indent = 0;\n if (this)\n this.args = args;\n }\n indented(fn) {\n this.indent += 1;\n fn(this);\n this.indent -= 1;\n }\n write(arg) {\n if (typeof arg === \"function\") {\n arg(this, { execution: \"sync\" });\n arg(this, { execution: \"async\" });\n return;\n }\n const content = arg;\n const lines = content.split(\"\\n\").filter((x) => x);\n const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));\n const dedented = lines.map((x) => x.slice(minIndent)).map((x) => \" \".repeat(this.indent * 2) + x);\n for (const line of dedented) {\n this.content.push(line);\n }\n }\n compile() {\n const F = Function;\n const args = this?.args;\n const content = this?.content ?? [``];\n const lines = [...content.map((x) => ` ${x}`)];\n // console.log(lines.join(\"\\n\"));\n return new F(...args, lines.join(\"\\n\"));\n }\n}\n", "export const version = {\n major: 4,\n minor: 3,\n patch: 6,\n};\n", "import * as checks from \"./checks.js\";\nimport * as core from \"./core.js\";\nimport { Doc } from \"./doc.js\";\nimport { parse, parseAsync, safeParse, safeParseAsync } from \"./parse.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nimport { version } from \"./versions.js\";\nexport const $ZodType = /*@__PURE__*/ core.$constructor(\"$ZodType\", (inst, def) => {\n var _a;\n inst ?? (inst = {});\n inst._zod.def = def; // set _def property\n inst._zod.bag = inst._zod.bag || {}; // initialize _bag object\n inst._zod.version = version;\n const checks = [...(inst._zod.def.checks ?? [])];\n // if inst is itself a checks.$ZodCheck, run it as a check\n if (inst._zod.traits.has(\"$ZodCheck\")) {\n checks.unshift(inst);\n }\n for (const ch of checks) {\n for (const fn of ch._zod.onattach) {\n fn(inst);\n }\n }\n if (checks.length === 0) {\n // deferred initializer\n // inst._zod.parse is not yet defined\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred?.push(() => {\n inst._zod.run = inst._zod.parse;\n });\n }\n else {\n const runChecks = (payload, checks, ctx) => {\n let isAborted = util.aborted(payload);\n let asyncResult;\n for (const ch of checks) {\n if (ch._zod.def.when) {\n const shouldRun = ch._zod.def.when(payload);\n if (!shouldRun)\n continue;\n }\n else if (isAborted) {\n continue;\n }\n const currLen = payload.issues.length;\n const _ = ch._zod.check(payload);\n if (_ instanceof Promise && ctx?.async === false) {\n throw new core.$ZodAsyncError();\n }\n if (asyncResult || _ instanceof Promise) {\n asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {\n await _;\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n return;\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n });\n }\n else {\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n continue;\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n }\n }\n if (asyncResult) {\n return asyncResult.then(() => {\n return payload;\n });\n }\n return payload;\n };\n const handleCanaryResult = (canary, payload, ctx) => {\n // abort if the canary is aborted\n if (util.aborted(canary)) {\n canary.aborted = true;\n return canary;\n }\n // run checks first, then\n const checkResult = runChecks(payload, checks, ctx);\n if (checkResult instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));\n }\n return inst._zod.parse(checkResult, ctx);\n };\n inst._zod.run = (payload, ctx) => {\n if (ctx.skipChecks) {\n return inst._zod.parse(payload, ctx);\n }\n if (ctx.direction === \"backward\") {\n // run canary\n // initial pass (no checks)\n const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });\n if (canary instanceof Promise) {\n return canary.then((canary) => {\n return handleCanaryResult(canary, payload, ctx);\n });\n }\n return handleCanaryResult(canary, payload, ctx);\n }\n // forward\n const result = inst._zod.parse(payload, ctx);\n if (result instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return result.then((result) => runChecks(result, checks, ctx));\n }\n return runChecks(result, checks, ctx);\n };\n }\n // Lazy initialize ~standard to avoid creating objects for every schema\n util.defineLazy(inst, \"~standard\", () => ({\n validate: (value) => {\n try {\n const r = safeParse(inst, value);\n return r.success ? { value: r.data } : { issues: r.error?.issues };\n }\n catch (_) {\n return safeParseAsync(inst, value).then((r) => (r.success ? { value: r.data } : { issues: r.error?.issues }));\n }\n },\n vendor: \"zod\",\n version: 1,\n }));\n});\nexport { clone } from \"./util.js\";\nexport const $ZodString = /*@__PURE__*/ core.$constructor(\"$ZodString\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? regexes.string(inst._zod.bag);\n inst._zod.parse = (payload, _) => {\n if (def.coerce)\n try {\n payload.value = String(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"string\")\n return payload;\n payload.issues.push({\n expected: \"string\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodStringFormat\", (inst, def) => {\n // check initialization must come first\n checks.$ZodCheckStringFormat.init(inst, def);\n $ZodString.init(inst, def);\n});\nexport const $ZodGUID = /*@__PURE__*/ core.$constructor(\"$ZodGUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.guid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodUUID = /*@__PURE__*/ core.$constructor(\"$ZodUUID\", (inst, def) => {\n if (def.version) {\n const versionMap = {\n v1: 1,\n v2: 2,\n v3: 3,\n v4: 4,\n v5: 5,\n v6: 6,\n v7: 7,\n v8: 8,\n };\n const v = versionMap[def.version];\n if (v === undefined)\n throw new Error(`Invalid UUID version: \"${def.version}\"`);\n def.pattern ?? (def.pattern = regexes.uuid(v));\n }\n else\n def.pattern ?? (def.pattern = regexes.uuid());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodEmail = /*@__PURE__*/ core.$constructor(\"$ZodEmail\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.email);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodURL = /*@__PURE__*/ core.$constructor(\"$ZodURL\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n try {\n // Trim whitespace from input\n const trimmed = payload.value.trim();\n // @ts-ignore\n const url = new URL(trimmed);\n if (def.hostname) {\n def.hostname.lastIndex = 0;\n if (!def.hostname.test(url.hostname)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid hostname\",\n pattern: def.hostname.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n }\n if (def.protocol) {\n def.protocol.lastIndex = 0;\n if (!def.protocol.test(url.protocol.endsWith(\":\") ? url.protocol.slice(0, -1) : url.protocol)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid protocol\",\n pattern: def.protocol.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n }\n // Set the output value based on normalize flag\n if (def.normalize) {\n // Use normalized URL\n payload.value = url.href;\n }\n else {\n // Preserve the original input (trimmed)\n payload.value = trimmed;\n }\n return;\n }\n catch (_) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodEmoji = /*@__PURE__*/ core.$constructor(\"$ZodEmoji\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.emoji());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodNanoID = /*@__PURE__*/ core.$constructor(\"$ZodNanoID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.nanoid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID = /*@__PURE__*/ core.$constructor(\"$ZodCUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID2 = /*@__PURE__*/ core.$constructor(\"$ZodCUID2\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid2);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodULID = /*@__PURE__*/ core.$constructor(\"$ZodULID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ulid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodXID = /*@__PURE__*/ core.$constructor(\"$ZodXID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.xid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodKSUID = /*@__PURE__*/ core.$constructor(\"$ZodKSUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ksuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODateTime = /*@__PURE__*/ core.$constructor(\"$ZodISODateTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.datetime(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODate = /*@__PURE__*/ core.$constructor(\"$ZodISODate\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.date);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISOTime = /*@__PURE__*/ core.$constructor(\"$ZodISOTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.time(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODuration = /*@__PURE__*/ core.$constructor(\"$ZodISODuration\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.duration);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodIPv4 = /*@__PURE__*/ core.$constructor(\"$ZodIPv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv4);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv4`;\n});\nexport const $ZodIPv6 = /*@__PURE__*/ core.$constructor(\"$ZodIPv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv6);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv6`;\n inst._zod.check = (payload) => {\n try {\n // @ts-ignore\n new URL(`http://[${payload.value}]`);\n // return;\n }\n catch {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"ipv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodMAC = /*@__PURE__*/ core.$constructor(\"$ZodMAC\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.mac(def.delimiter));\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `mac`;\n});\nexport const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv4);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n const parts = payload.value.split(\"/\");\n try {\n if (parts.length !== 2)\n throw new Error();\n const [address, prefix] = parts;\n if (!prefix)\n throw new Error();\n const prefixNum = Number(prefix);\n if (`${prefixNum}` !== prefix)\n throw new Error();\n if (prefixNum < 0 || prefixNum > 128)\n throw new Error();\n // @ts-ignore\n new URL(`http://[${address}]`);\n }\n catch {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"cidrv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64(data) {\n if (data === \"\")\n return true;\n if (data.length % 4 !== 0)\n return false;\n try {\n // @ts-ignore\n atob(data);\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodBase64 = /*@__PURE__*/ core.$constructor(\"$ZodBase64\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64\";\n inst._zod.check = (payload) => {\n if (isValidBase64(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64URL(data) {\n if (!regexes.base64url.test(data))\n return false;\n const base64 = data.replace(/[-_]/g, (c) => (c === \"-\" ? \"+\" : \"/\"));\n const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, \"=\");\n return isValidBase64(padded);\n}\nexport const $ZodBase64URL = /*@__PURE__*/ core.$constructor(\"$ZodBase64URL\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64url);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64url\";\n inst._zod.check = (payload) => {\n if (isValidBase64URL(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodE164 = /*@__PURE__*/ core.$constructor(\"$ZodE164\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.e164);\n $ZodStringFormat.init(inst, def);\n});\n////////////////////////////// ZodJWT //////////////////////////////\nexport function isValidJWT(token, algorithm = null) {\n try {\n const tokensParts = token.split(\".\");\n if (tokensParts.length !== 3)\n return false;\n const [header] = tokensParts;\n if (!header)\n return false;\n // @ts-ignore\n const parsedHeader = JSON.parse(atob(header));\n if (\"typ\" in parsedHeader && parsedHeader?.typ !== \"JWT\")\n return false;\n if (!parsedHeader.alg)\n return false;\n if (algorithm && (!(\"alg\" in parsedHeader) || parsedHeader.alg !== algorithm))\n return false;\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodJWT = /*@__PURE__*/ core.$constructor(\"$ZodJWT\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidJWT(payload.value, def.alg))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"jwt\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCustomStringFormat\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (def.fn(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodNumber = /*@__PURE__*/ core.$constructor(\"$ZodNumber\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Number(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"number\" && !Number.isNaN(input) && Number.isFinite(input)) {\n return payload;\n }\n const received = typeof input === \"number\"\n ? Number.isNaN(input)\n ? \"NaN\"\n : !Number.isFinite(input)\n ? \"Infinity\"\n : undefined\n : undefined;\n payload.issues.push({\n expected: \"number\",\n code: \"invalid_type\",\n input,\n inst,\n ...(received ? { received } : {}),\n });\n return payload;\n };\n});\nexport const $ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodNumberFormat\", (inst, def) => {\n checks.$ZodCheckNumberFormat.init(inst, def);\n $ZodNumber.init(inst, def); // no format checks\n});\nexport const $ZodBoolean = /*@__PURE__*/ core.$constructor(\"$ZodBoolean\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.boolean;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Boolean(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"boolean\")\n return payload;\n payload.issues.push({\n expected: \"boolean\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigInt = /*@__PURE__*/ core.$constructor(\"$ZodBigInt\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.bigint;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = BigInt(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"bigint\")\n return payload;\n payload.issues.push({\n expected: \"bigint\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodBigIntFormat\", (inst, def) => {\n checks.$ZodCheckBigIntFormat.init(inst, def);\n $ZodBigInt.init(inst, def); // no format checks\n});\nexport const $ZodSymbol = /*@__PURE__*/ core.$constructor(\"$ZodSymbol\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"symbol\")\n return payload;\n payload.issues.push({\n expected: \"symbol\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodUndefined = /*@__PURE__*/ core.$constructor(\"$ZodUndefined\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.undefined;\n inst._zod.values = new Set([undefined]);\n inst._zod.optin = \"optional\";\n inst._zod.optout = \"optional\";\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"undefined\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodNull = /*@__PURE__*/ core.$constructor(\"$ZodNull\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.null;\n inst._zod.values = new Set([null]);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (input === null)\n return payload;\n payload.issues.push({\n expected: \"null\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodAny = /*@__PURE__*/ core.$constructor(\"$ZodAny\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodUnknown = /*@__PURE__*/ core.$constructor(\"$ZodUnknown\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodNever = /*@__PURE__*/ core.$constructor(\"$ZodNever\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n payload.issues.push({\n expected: \"never\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodVoid = /*@__PURE__*/ core.$constructor(\"$ZodVoid\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"void\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodDate = /*@__PURE__*/ core.$constructor(\"$ZodDate\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce) {\n try {\n payload.value = new Date(payload.value);\n }\n catch (_err) { }\n }\n const input = payload.value;\n const isDate = input instanceof Date;\n const isValidDate = isDate && !Number.isNaN(input.getTime());\n if (isValidDate)\n return payload;\n payload.issues.push({\n expected: \"date\",\n code: \"invalid_type\",\n input,\n ...(isDate ? { received: \"Invalid Date\" } : {}),\n inst,\n });\n return payload;\n };\n});\nfunction handleArrayResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodArray = /*@__PURE__*/ core.$constructor(\"$ZodArray\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n expected: \"array\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = Array(input.length);\n const proms = [];\n for (let i = 0; i < input.length; i++) {\n const item = input[i];\n const result = def.element._zod.run({\n value: item,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleArrayResult(result, payload, i)));\n }\n else {\n handleArrayResult(result, payload, i);\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload; //handleArrayResultsAsync(parseResults, final);\n };\n});\nfunction handlePropertyResult(result, final, key, input, isOptionalOut) {\n if (result.issues.length) {\n // For optional-out schemas, ignore errors on absent keys\n if (isOptionalOut && !(key in input)) {\n return;\n }\n final.issues.push(...util.prefixIssues(key, result.issues));\n }\n if (result.value === undefined) {\n if (key in input) {\n final.value[key] = undefined;\n }\n }\n else {\n final.value[key] = result.value;\n }\n}\nfunction normalizeDef(def) {\n const keys = Object.keys(def.shape);\n for (const k of keys) {\n if (!def.shape?.[k]?._zod?.traits?.has(\"$ZodType\")) {\n throw new Error(`Invalid element at key \"${k}\": expected a Zod schema`);\n }\n }\n const okeys = util.optionalKeys(def.shape);\n return {\n ...def,\n keys,\n keySet: new Set(keys),\n numKeys: keys.length,\n optionalKeys: new Set(okeys),\n };\n}\nfunction handleCatchall(proms, input, payload, ctx, def, inst) {\n const unrecognized = [];\n // iterate over input keys\n const keySet = def.keySet;\n const _catchall = def.catchall._zod;\n const t = _catchall.def.type;\n const isOptionalOut = _catchall.optout === \"optional\";\n for (const key in input) {\n if (keySet.has(key))\n continue;\n if (t === \"never\") {\n unrecognized.push(key);\n continue;\n }\n const r = _catchall.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n }\n else {\n handlePropertyResult(r, payload, key, input, isOptionalOut);\n }\n }\n if (unrecognized.length) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n keys: unrecognized,\n input,\n inst,\n });\n }\n if (!proms.length)\n return payload;\n return Promise.all(proms).then(() => {\n return payload;\n });\n}\nexport const $ZodObject = /*@__PURE__*/ core.$constructor(\"$ZodObject\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodType.init(inst, def);\n // const sh = def.shape;\n const desc = Object.getOwnPropertyDescriptor(def, \"shape\");\n if (!desc?.get) {\n const sh = def.shape;\n Object.defineProperty(def, \"shape\", {\n get: () => {\n const newSh = { ...sh };\n Object.defineProperty(def, \"shape\", {\n value: newSh,\n });\n return newSh;\n },\n });\n }\n const _normalized = util.cached(() => normalizeDef(def));\n util.defineLazy(inst._zod, \"propValues\", () => {\n const shape = def.shape;\n const propValues = {};\n for (const key in shape) {\n const field = shape[key]._zod;\n if (field.values) {\n propValues[key] ?? (propValues[key] = new Set());\n for (const v of field.values)\n propValues[key].add(v);\n }\n }\n return propValues;\n });\n const isObject = util.isObject;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = {};\n const proms = [];\n const shape = value.shape;\n for (const key of value.keys) {\n const el = shape[key];\n const isOptionalOut = el._zod.optout === \"optional\";\n const r = el._zod.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n }\n else {\n handlePropertyResult(r, payload, key, input, isOptionalOut);\n }\n }\n if (!catchall) {\n return proms.length ? Promise.all(proms).then(() => payload) : payload;\n }\n return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);\n };\n});\nexport const $ZodObjectJIT = /*@__PURE__*/ core.$constructor(\"$ZodObjectJIT\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodObject.init(inst, def);\n const superParse = inst._zod.parse;\n const _normalized = util.cached(() => normalizeDef(def));\n const generateFastpass = (shape) => {\n const doc = new Doc([\"shape\", \"payload\", \"ctx\"]);\n const normalized = _normalized.value;\n const parseStr = (key) => {\n const k = util.esc(key);\n return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;\n };\n doc.write(`const input = payload.value;`);\n const ids = Object.create(null);\n let counter = 0;\n for (const key of normalized.keys) {\n ids[key] = `key_${counter++}`;\n }\n // A: preserve key order {\n doc.write(`const newResult = {};`);\n for (const key of normalized.keys) {\n const id = ids[key];\n const k = util.esc(key);\n const schema = shape[key];\n const isOptionalOut = schema?._zod?.optout === \"optional\";\n doc.write(`const ${id} = ${parseStr(key)};`);\n if (isOptionalOut) {\n // For optional-out schemas, ignore errors on absent keys\n doc.write(`\n if (${id}.issues.length) {\n if (${k} in input) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n }\n \n if (${id}.value === undefined) {\n if (${k} in input) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n \n `);\n }\n else {\n doc.write(`\n if (${id}.issues.length) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n \n if (${id}.value === undefined) {\n if (${k} in input) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n \n `);\n }\n }\n doc.write(`payload.value = newResult;`);\n doc.write(`return payload;`);\n const fn = doc.compile();\n return (payload, ctx) => fn(shape, payload, ctx);\n };\n let fastpass;\n const isObject = util.isObject;\n const jit = !core.globalConfig.jitless;\n const allowsEval = util.allowsEval;\n const fastEnabled = jit && allowsEval.value; // && !def.catchall;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {\n // always synchronous\n if (!fastpass)\n fastpass = generateFastpass(def.shape);\n payload = fastpass(payload, ctx);\n if (!catchall)\n return payload;\n return handleCatchall([], input, payload, ctx, value, inst);\n }\n return superParse(payload, ctx);\n };\n});\nfunction handleUnionResults(results, final, inst, ctx) {\n for (const result of results) {\n if (result.issues.length === 0) {\n final.value = result.value;\n return final;\n }\n }\n const nonaborted = results.filter((r) => !util.aborted(r));\n if (nonaborted.length === 1) {\n final.value = nonaborted[0].value;\n return nonaborted[0];\n }\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n return final;\n}\nexport const $ZodUnion = /*@__PURE__*/ core.$constructor(\"$ZodUnion\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.options.some((o) => o._zod.optin === \"optional\") ? \"optional\" : undefined);\n util.defineLazy(inst._zod, \"optout\", () => def.options.some((o) => o._zod.optout === \"optional\") ? \"optional\" : undefined);\n util.defineLazy(inst._zod, \"values\", () => {\n if (def.options.every((o) => o._zod.values)) {\n return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));\n }\n return undefined;\n });\n util.defineLazy(inst._zod, \"pattern\", () => {\n if (def.options.every((o) => o._zod.pattern)) {\n const patterns = def.options.map((o) => o._zod.pattern);\n return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join(\"|\")})$`);\n }\n return undefined;\n });\n const single = def.options.length === 1;\n const first = def.options[0]._zod.run;\n inst._zod.parse = (payload, ctx) => {\n if (single) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n if (result.issues.length === 0)\n return result;\n results.push(result);\n }\n }\n if (!async)\n return handleUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleUnionResults(results, payload, inst, ctx);\n });\n };\n});\nfunction handleExclusiveUnionResults(results, final, inst, ctx) {\n const successes = results.filter((r) => r.issues.length === 0);\n if (successes.length === 1) {\n final.value = successes[0].value;\n return final;\n }\n if (successes.length === 0) {\n // No matches - same as regular union\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n }\n else {\n // Multiple matches - exclusive union failure\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: [],\n inclusive: false,\n });\n }\n return final;\n}\nexport const $ZodXor = /*@__PURE__*/ core.$constructor(\"$ZodXor\", (inst, def) => {\n $ZodUnion.init(inst, def);\n def.inclusive = false;\n const single = def.options.length === 1;\n const first = def.options[0]._zod.run;\n inst._zod.parse = (payload, ctx) => {\n if (single) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n results.push(result);\n }\n }\n if (!async)\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n });\n };\n});\nexport const $ZodDiscriminatedUnion = \n/*@__PURE__*/\ncore.$constructor(\"$ZodDiscriminatedUnion\", (inst, def) => {\n def.inclusive = false;\n $ZodUnion.init(inst, def);\n const _super = inst._zod.parse;\n util.defineLazy(inst._zod, \"propValues\", () => {\n const propValues = {};\n for (const option of def.options) {\n const pv = option._zod.propValues;\n if (!pv || Object.keys(pv).length === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(option)}\"`);\n for (const [k, v] of Object.entries(pv)) {\n if (!propValues[k])\n propValues[k] = new Set();\n for (const val of v) {\n propValues[k].add(val);\n }\n }\n }\n return propValues;\n });\n const disc = util.cached(() => {\n const opts = def.options;\n const map = new Map();\n for (const o of opts) {\n const values = o._zod.propValues?.[def.discriminator];\n if (!values || values.size === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(o)}\"`);\n for (const v of values) {\n if (map.has(v)) {\n throw new Error(`Duplicate discriminator value \"${String(v)}\"`);\n }\n map.set(v, o);\n }\n }\n return map;\n });\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isObject(input)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"object\",\n input,\n inst,\n });\n return payload;\n }\n const opt = disc.value.get(input?.[def.discriminator]);\n if (opt) {\n return opt._zod.run(payload, ctx);\n }\n if (def.unionFallback) {\n return _super(payload, ctx);\n }\n // no matching discriminator\n payload.issues.push({\n code: \"invalid_union\",\n errors: [],\n note: \"No matching discriminator\",\n discriminator: def.discriminator,\n input,\n path: [def.discriminator],\n inst,\n });\n return payload;\n };\n});\nexport const $ZodIntersection = /*@__PURE__*/ core.$constructor(\"$ZodIntersection\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n const left = def.left._zod.run({ value: input, issues: [] }, ctx);\n const right = def.right._zod.run({ value: input, issues: [] }, ctx);\n const async = left instanceof Promise || right instanceof Promise;\n if (async) {\n return Promise.all([left, right]).then(([left, right]) => {\n return handleIntersectionResults(payload, left, right);\n });\n }\n return handleIntersectionResults(payload, left, right);\n };\n});\nfunction mergeValues(a, b) {\n // const aType = parse.t(a);\n // const bType = parse.t(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n if (a instanceof Date && b instanceof Date && +a === +b) {\n return { valid: true, data: a };\n }\n if (util.isPlainObject(a) && util.isPlainObject(b)) {\n const bKeys = Object.keys(b);\n const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [key, ...sharedValue.mergeErrorPath],\n };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) {\n return { valid: false, mergeErrorPath: [] };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [index, ...sharedValue.mergeErrorPath],\n };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n return { valid: false, mergeErrorPath: [] };\n}\nfunction handleIntersectionResults(result, left, right) {\n // Track which side(s) report each key as unrecognized\n const unrecKeys = new Map();\n let unrecIssue;\n for (const iss of left.issues) {\n if (iss.code === \"unrecognized_keys\") {\n unrecIssue ?? (unrecIssue = iss);\n for (const k of iss.keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k).l = true;\n }\n }\n else {\n result.issues.push(iss);\n }\n }\n for (const iss of right.issues) {\n if (iss.code === \"unrecognized_keys\") {\n for (const k of iss.keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k).r = true;\n }\n }\n else {\n result.issues.push(iss);\n }\n }\n // Report only keys unrecognized by BOTH sides\n const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);\n if (bothKeys.length && unrecIssue) {\n result.issues.push({ ...unrecIssue, keys: bothKeys });\n }\n if (util.aborted(result))\n return result;\n const merged = mergeValues(left.value, right.value);\n if (!merged.valid) {\n throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);\n }\n result.value = merged.data;\n return result;\n}\nexport const $ZodTuple = /*@__PURE__*/ core.$constructor(\"$ZodTuple\", (inst, def) => {\n $ZodType.init(inst, def);\n const items = def.items;\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n input,\n inst,\n expected: \"tuple\",\n code: \"invalid_type\",\n });\n return payload;\n }\n payload.value = [];\n const proms = [];\n const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== \"optional\");\n const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;\n if (!def.rest) {\n const tooBig = input.length > items.length;\n const tooSmall = input.length < optStart - 1;\n if (tooBig || tooSmall) {\n payload.issues.push({\n ...(tooBig\n ? { code: \"too_big\", maximum: items.length, inclusive: true }\n : { code: \"too_small\", minimum: items.length }),\n input,\n inst,\n origin: \"array\",\n });\n return payload;\n }\n }\n let i = -1;\n for (const item of items) {\n i++;\n if (i >= input.length)\n if (i >= optStart)\n continue;\n const result = item._zod.run({\n value: input[i],\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleTupleResult(result, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n if (def.rest) {\n const rest = input.slice(items.length);\n for (const el of rest) {\n i++;\n const result = def.rest._zod.run({\n value: el,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleTupleResult(result, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleTupleResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodRecord = /*@__PURE__*/ core.$constructor(\"$ZodRecord\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isPlainObject(input)) {\n payload.issues.push({\n expected: \"record\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n const values = def.keyType._zod.values;\n if (values) {\n payload.value = {};\n const recordKeys = new Set();\n for (const key of values) {\n if (typeof key === \"string\" || typeof key === \"number\" || typeof key === \"symbol\") {\n recordKeys.add(typeof key === \"number\" ? key.toString() : key);\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[key] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[key] = result.value;\n }\n }\n }\n let unrecognized;\n for (const key in input) {\n if (!recordKeys.has(key)) {\n unrecognized = unrecognized ?? [];\n unrecognized.push(key);\n }\n }\n if (unrecognized && unrecognized.length > 0) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n input,\n inst,\n keys: unrecognized,\n });\n }\n }\n else {\n payload.value = {};\n for (const key of Reflect.ownKeys(input)) {\n if (key === \"__proto__\")\n continue;\n let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n if (keyResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n // Numeric string fallback: if key is a numeric string and failed, retry with Number(key)\n // This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals\n const checkNumericKey = typeof key === \"string\" && regexes.number.test(key) && keyResult.issues.length;\n if (checkNumericKey) {\n const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);\n if (retryResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n if (retryResult.issues.length === 0) {\n keyResult = retryResult;\n }\n }\n if (keyResult.issues.length) {\n if (def.mode === \"loose\") {\n // Pass through unchanged\n payload.value[key] = input[key];\n }\n else {\n // Default \"strict\" behavior: error on invalid key\n payload.issues.push({\n code: \"invalid_key\",\n origin: \"record\",\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n input: key,\n path: [key],\n inst,\n });\n }\n continue;\n }\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[keyResult.value] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[keyResult.value] = result.value;\n }\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload;\n };\n});\nexport const $ZodMap = /*@__PURE__*/ core.$constructor(\"$ZodMap\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Map)) {\n payload.issues.push({\n expected: \"map\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n payload.value = new Map();\n for (const [key, value] of input) {\n const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);\n if (keyResult instanceof Promise || valueResult instanceof Promise) {\n proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }));\n }\n else {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {\n if (keyResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, keyResult.issues));\n }\n else {\n final.issues.push({\n code: \"invalid_key\",\n origin: \"map\",\n input,\n inst,\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n if (valueResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, valueResult.issues));\n }\n else {\n final.issues.push({\n origin: \"map\",\n code: \"invalid_element\",\n input,\n inst,\n key: key,\n issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n final.value.set(keyResult.value, valueResult.value);\n}\nexport const $ZodSet = /*@__PURE__*/ core.$constructor(\"$ZodSet\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Set)) {\n payload.issues.push({\n input,\n inst,\n expected: \"set\",\n code: \"invalid_type\",\n });\n return payload;\n }\n const proms = [];\n payload.value = new Set();\n for (const item of input) {\n const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleSetResult(result, payload)));\n }\n else\n handleSetResult(result, payload);\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleSetResult(result, final) {\n if (result.issues.length) {\n final.issues.push(...result.issues);\n }\n final.value.add(result.value);\n}\nexport const $ZodEnum = /*@__PURE__*/ core.$constructor(\"$ZodEnum\", (inst, def) => {\n $ZodType.init(inst, def);\n const values = util.getEnumValues(def.entries);\n const valuesSet = new Set(values);\n inst._zod.values = valuesSet;\n inst._zod.pattern = new RegExp(`^(${values\n .filter((k) => util.propertyKeyTypes.has(typeof k))\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o.toString()))\n .join(\"|\")})$`);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (valuesSet.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodLiteral = /*@__PURE__*/ core.$constructor(\"$ZodLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n if (def.values.length === 0) {\n throw new Error(\"Cannot create literal schema with no valid values\");\n }\n const values = new Set(def.values);\n inst._zod.values = values;\n inst._zod.pattern = new RegExp(`^(${def.values\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o)))\n .join(\"|\")})$`);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (values.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values: def.values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodFile = /*@__PURE__*/ core.$constructor(\"$ZodFile\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n // @ts-ignore\n if (input instanceof File)\n return payload;\n payload.issues.push({\n expected: \"file\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodTransform = /*@__PURE__*/ core.$constructor(\"$ZodTransform\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n const _out = def.transform(payload.value, payload);\n if (ctx.async) {\n const output = _out instanceof Promise ? _out : Promise.resolve(_out);\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n if (_out instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n payload.value = _out;\n return payload;\n };\n});\nfunction handleOptionalResult(result, input) {\n if (result.issues.length && input === undefined) {\n return { issues: [], value: undefined };\n }\n return result;\n}\nexport const $ZodOptional = /*@__PURE__*/ core.$constructor(\"$ZodOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n inst._zod.optout = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => {\n return def.innerType._zod.values ? new Set([...def.innerType._zod.values, undefined]) : undefined;\n });\n util.defineLazy(inst._zod, \"pattern\", () => {\n const pattern = def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n if (def.innerType._zod.optin === \"optional\") {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise)\n return result.then((r) => handleOptionalResult(r, payload.value));\n return handleOptionalResult(result, payload.value);\n }\n if (payload.value === undefined) {\n return payload;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodExactOptional = /*@__PURE__*/ core.$constructor(\"$ZodExactOptional\", (inst, def) => {\n // Call parent init - inherits optin/optout = \"optional\"\n $ZodOptional.init(inst, def);\n // Override values/pattern to NOT add undefined\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n util.defineLazy(inst._zod, \"pattern\", () => def.innerType._zod.pattern);\n // Override parse to just delegate (no undefined handling)\n inst._zod.parse = (payload, ctx) => {\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNullable = /*@__PURE__*/ core.$constructor(\"$ZodNullable\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n util.defineLazy(inst._zod, \"pattern\", () => {\n const pattern = def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;\n });\n util.defineLazy(inst._zod, \"values\", () => {\n return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n // Forward direction (decode): allow null to pass through\n if (payload.value === null)\n return payload;\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodDefault = /*@__PURE__*/ core.$constructor(\"$ZodDefault\", (inst, def) => {\n $ZodType.init(inst, def);\n // inst._zod.qin = \"true\";\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply defaults for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n /**\n * $ZodDefault returns the default value immediately in forward direction.\n * It doesn't pass the default value into the validator (\"prefault\"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a \"prefault\" for the pipe. */\n return payload;\n }\n // Forward direction: continue with default handling\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleDefaultResult(result, def));\n }\n return handleDefaultResult(result, def);\n };\n});\nfunction handleDefaultResult(payload, def) {\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return payload;\n}\nexport const $ZodPrefault = /*@__PURE__*/ core.$constructor(\"$ZodPrefault\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply prefault for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNonOptional = /*@__PURE__*/ core.$constructor(\"$ZodNonOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => {\n const v = def.innerType._zod.values;\n return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleNonOptionalResult(result, inst));\n }\n return handleNonOptionalResult(result, inst);\n };\n});\nfunction handleNonOptionalResult(payload, inst) {\n if (!payload.issues.length && payload.value === undefined) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: payload.value,\n inst,\n });\n }\n return payload;\n}\nexport const $ZodSuccess = /*@__PURE__*/ core.$constructor(\"$ZodSuccess\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(\"ZodSuccess\");\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.issues.length === 0;\n return payload;\n });\n }\n payload.value = result.issues.length === 0;\n return payload;\n };\n});\nexport const $ZodCatch = /*@__PURE__*/ core.$constructor(\"$ZodCatch\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply catch logic\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.value;\n if (result.issues.length) {\n payload.value = def.catchValue({\n ...payload,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n payload.issues = [];\n }\n return payload;\n });\n }\n payload.value = result.value;\n if (result.issues.length) {\n payload.value = def.catchValue({\n ...payload,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n payload.issues = [];\n }\n return payload;\n };\n});\nexport const $ZodNaN = /*@__PURE__*/ core.$constructor(\"$ZodNaN\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"number\" || !Number.isNaN(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"nan\",\n code: \"invalid_type\",\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodPipe = /*@__PURE__*/ core.$constructor(\"$ZodPipe\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => def.in._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n util.defineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handlePipeResult(right, def.in, ctx));\n }\n return handlePipeResult(right, def.in, ctx);\n }\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handlePipeResult(left, def.out, ctx));\n }\n return handlePipeResult(left, def.out, ctx);\n };\n});\nfunction handlePipeResult(left, next, ctx) {\n if (left.issues.length) {\n // prevent further checks\n left.aborted = true;\n return left;\n }\n return next._zod.run({ value: left.value, issues: left.issues }, ctx);\n}\nexport const $ZodCodec = /*@__PURE__*/ core.$constructor(\"$ZodCodec\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => def.in._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n util.defineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handleCodecAResult(left, def, ctx));\n }\n return handleCodecAResult(left, def, ctx);\n }\n else {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handleCodecAResult(right, def, ctx));\n }\n return handleCodecAResult(right, def, ctx);\n }\n };\n});\nfunction handleCodecAResult(result, def, ctx) {\n if (result.issues.length) {\n // prevent further checks\n result.aborted = true;\n return result;\n }\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const transformed = def.transform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));\n }\n return handleCodecTxResult(result, transformed, def.out, ctx);\n }\n else {\n const transformed = def.reverseTransform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));\n }\n return handleCodecTxResult(result, transformed, def.in, ctx);\n }\n}\nfunction handleCodecTxResult(left, value, nextSchema, ctx) {\n // Check if transform added any issues\n if (left.issues.length) {\n left.aborted = true;\n return left;\n }\n return nextSchema._zod.run({ value, issues: left.issues }, ctx);\n}\nexport const $ZodReadonly = /*@__PURE__*/ core.$constructor(\"$ZodReadonly\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"propValues\", () => def.innerType._zod.propValues);\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType?._zod?.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType?._zod?.optout);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then(handleReadonlyResult);\n }\n return handleReadonlyResult(result);\n };\n});\nfunction handleReadonlyResult(payload) {\n payload.value = Object.freeze(payload.value);\n return payload;\n}\nexport const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"$ZodTemplateLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n const regexParts = [];\n for (const part of def.parts) {\n if (typeof part === \"object\" && part !== null) {\n // is Zod schema\n if (!part._zod.pattern) {\n // if (!source)\n throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);\n }\n const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;\n if (!source)\n throw new Error(`Invalid template literal part: ${part._zod.traits}`);\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n regexParts.push(source.slice(start, end));\n }\n else if (part === null || util.primitiveTypes.has(typeof part)) {\n regexParts.push(util.escapeRegex(`${part}`));\n }\n else {\n throw new Error(`Invalid template literal part: ${part}`);\n }\n }\n inst._zod.pattern = new RegExp(`^${regexParts.join(\"\")}$`);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"string\") {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"string\",\n code: \"invalid_type\",\n });\n return payload;\n }\n inst._zod.pattern.lastIndex = 0;\n if (!inst._zod.pattern.test(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n code: \"invalid_format\",\n format: def.format ?? \"template_literal\",\n pattern: inst._zod.pattern.source,\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodFunction = /*@__PURE__*/ core.$constructor(\"$ZodFunction\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._def = def;\n inst._zod.def = def;\n inst.implement = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implement() must be called with a function\");\n }\n return function (...args) {\n const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;\n const result = Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return parse(inst._def.output, result);\n }\n return result;\n };\n };\n inst.implementAsync = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implementAsync() must be called with a function\");\n }\n return async function (...args) {\n const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;\n const result = await Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return await parseAsync(inst._def.output, result);\n }\n return result;\n };\n };\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"function\") {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"function\",\n input: payload.value,\n inst,\n });\n return payload;\n }\n // Check if output is a promise type to determine if we should use async implementation\n const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === \"promise\";\n if (hasPromiseOutput) {\n payload.value = inst.implementAsync(payload.value);\n }\n else {\n payload.value = inst.implement(payload.value);\n }\n return payload;\n };\n inst.input = (...args) => {\n const F = inst.constructor;\n if (Array.isArray(args[0])) {\n return new F({\n type: \"function\",\n input: new $ZodTuple({\n type: \"tuple\",\n items: args[0],\n rest: args[1],\n }),\n output: inst._def.output,\n });\n }\n return new F({\n type: \"function\",\n input: args[0],\n output: inst._def.output,\n });\n };\n inst.output = (output) => {\n const F = inst.constructor;\n return new F({\n type: \"function\",\n input: inst._def.input,\n output,\n });\n };\n return inst;\n});\nexport const $ZodPromise = /*@__PURE__*/ core.$constructor(\"$ZodPromise\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));\n };\n});\nexport const $ZodLazy = /*@__PURE__*/ core.$constructor(\"$ZodLazy\", (inst, def) => {\n $ZodType.init(inst, def);\n // let _innerType!: any;\n // util.defineLazy(def, \"getter\", () => {\n // if (!_innerType) {\n // _innerType = def.getter();\n // }\n // return () => _innerType;\n // });\n util.defineLazy(inst._zod, \"innerType\", () => def.getter());\n util.defineLazy(inst._zod, \"pattern\", () => inst._zod.innerType?._zod?.pattern);\n util.defineLazy(inst._zod, \"propValues\", () => inst._zod.innerType?._zod?.propValues);\n util.defineLazy(inst._zod, \"optin\", () => inst._zod.innerType?._zod?.optin ?? undefined);\n util.defineLazy(inst._zod, \"optout\", () => inst._zod.innerType?._zod?.optout ?? undefined);\n inst._zod.parse = (payload, ctx) => {\n const inner = inst._zod.innerType;\n return inner._zod.run(payload, ctx);\n };\n});\nexport const $ZodCustom = /*@__PURE__*/ core.$constructor(\"$ZodCustom\", (inst, def) => {\n checks.$ZodCheck.init(inst, def);\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _) => {\n return payload;\n };\n inst._zod.check = (payload) => {\n const input = payload.value;\n const r = def.fn(input);\n if (r instanceof Promise) {\n return r.then((r) => handleRefineResult(r, payload, input, inst));\n }\n handleRefineResult(r, payload, input, inst);\n return;\n };\n});\nfunction handleRefineResult(result, payload, input, inst) {\n if (!result) {\n const _iss = {\n code: \"custom\",\n input,\n inst, // incorporates params.error into issue reporting\n path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting\n continue: !inst._zod.def.abort,\n // params: inst._zod.def.params,\n };\n if (inst._zod.def.params)\n _iss.params = inst._zod.def.params;\n payload.issues.push(util.issue(_iss));\n }\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u062D\u0631\u0641\", verb: \"\u0623\u0646 \u064A\u062D\u0648\u064A\" },\n file: { unit: \"\u0628\u0627\u064A\u062A\", verb: \"\u0623\u0646 \u064A\u062D\u0648\u064A\" },\n array: { unit: \"\u0639\u0646\u0635\u0631\", verb: \"\u0623\u0646 \u064A\u062D\u0648\u064A\" },\n set: { unit: \"\u0639\u0646\u0635\u0631\", verb: \"\u0623\u0646 \u064A\u062D\u0648\u064A\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0645\u062F\u062E\u0644\",\n email: \"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A\",\n url: \"\u0631\u0627\u0628\u0637\",\n emoji: \"\u0625\u064A\u0645\u0648\u062C\u064A\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO\",\n date: \"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO\",\n time: \"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO\",\n duration: \"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO\",\n ipv4: \"\u0639\u0646\u0648\u0627\u0646 IPv4\",\n ipv6: \"\u0639\u0646\u0648\u0627\u0646 IPv6\",\n cidrv4: \"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4\",\n cidrv6: \"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6\",\n base64: \"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded\",\n base64url: \"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded\",\n json_string: \"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON\",\n e164: \"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0645\u062F\u062E\u0644\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${issue.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`;\n }\n return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue.origin ?? \"\u0627\u0644\u0642\u064A\u0645\u0629\"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"\u0639\u0646\u0635\u0631\"}`;\n return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue.origin ?? \"\u0627\u0644\u0642\u064A\u0645\u0629\"} ${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 \"${issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`;\n }\n case \"not_multiple_of\":\n return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u0645\u0639\u0631\u0641${issue.keys.length > 1 ? \"\u0627\u062A\" : \"\"} \u063A\u0631\u064A\u0628${issue.keys.length > 1 ? \"\u0629\" : \"\"}: ${util.joinValues(issue.keys, \"\u060C \")}`;\n case \"invalid_key\":\n return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue.origin}`;\n case \"invalid_union\":\n return \"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\";\n case \"invalid_element\":\n return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue.origin}`;\n default:\n return \"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\";\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"simvol\", verb: \"olmal\u0131d\u0131r\" },\n file: { unit: \"bayt\", verb: \"olmal\u0131d\u0131r\" },\n array: { unit: \"element\", verb: \"olmal\u0131d\u0131r\" },\n set: { unit: \"element\", verb: \"olmal\u0131d\u0131r\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"email address\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datetime\",\n date: \"ISO date\",\n time: \"ISO time\",\n duration: \"ISO duration\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded string\",\n base64url: \"base64url-encoded string\",\n json_string: \"JSON string\",\n e164: \"E.164 number\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Yanl\u0131\u015F d\u0259y\u0259r: g\u00F6zl\u0259nil\u0259n instanceof ${issue.expected}, daxil olan ${received}`;\n }\n return `Yanl\u0131\u015F d\u0259y\u0259r: g\u00F6zl\u0259nil\u0259n ${expected}, daxil olan ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Yanl\u0131\u015F d\u0259y\u0259r: g\u00F6zl\u0259nil\u0259n ${util.stringifyPrimitive(issue.values[0])}`;\n return `Yanl\u0131\u015F se\u00E7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u00C7ox b\u00F6y\u00FCk: g\u00F6zl\u0259nil\u0259n ${issue.origin ?? \"d\u0259y\u0259r\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"element\"}`;\n return `\u00C7ox b\u00F6y\u00FCk: g\u00F6zl\u0259nil\u0259n ${issue.origin ?? \"d\u0259y\u0259r\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u00C7ox ki\u00E7ik: g\u00F6zl\u0259nil\u0259n ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n return `\u00C7ox ki\u00E7ik: g\u00F6zl\u0259nil\u0259n ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Yanl\u0131\u015F m\u0259tn: \"${_issue.prefix}\" il\u0259 ba\u015Flamal\u0131d\u0131r`;\n if (_issue.format === \"ends_with\")\n return `Yanl\u0131\u015F m\u0259tn: \"${_issue.suffix}\" il\u0259 bitm\u0259lidir`;\n if (_issue.format === \"includes\")\n return `Yanl\u0131\u015F m\u0259tn: \"${_issue.includes}\" daxil olmal\u0131d\u0131r`;\n if (_issue.format === \"regex\")\n return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`;\n return `Yanl\u0131\u015F ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Yanl\u0131\u015F \u0259d\u0259d: ${issue.divisor} il\u0259 b\u00F6l\u00FCn\u0259 bil\u0259n olmal\u0131d\u0131r`;\n case \"unrecognized_keys\":\n return `Tan\u0131nmayan a\u00E7ar${issue.keys.length > 1 ? \"lar\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} daxilind\u0259 yanl\u0131\u015F a\u00E7ar`;\n case \"invalid_union\":\n return \"Yanl\u0131\u015F d\u0259y\u0259r\";\n case \"invalid_element\":\n return `${issue.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;\n default:\n return `Yanl\u0131\u015F d\u0259y\u0259r`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nfunction getBelarusianPlural(count, one, few, many) {\n const absCount = Math.abs(count);\n const lastDigit = absCount % 10;\n const lastTwoDigits = absCount % 100;\n if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {\n return many;\n }\n if (lastDigit === 1) {\n return one;\n }\n if (lastDigit >= 2 && lastDigit <= 4) {\n return few;\n }\n return many;\n}\nconst error = () => {\n const Sizable = {\n string: {\n unit: {\n one: \"\u0441\u0456\u043C\u0432\u0430\u043B\",\n few: \"\u0441\u0456\u043C\u0432\u0430\u043B\u044B\",\n many: \"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E\",\n },\n verb: \"\u043C\u0435\u0446\u044C\",\n },\n array: {\n unit: {\n one: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\",\n few: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B\",\n many: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E\",\n },\n verb: \"\u043C\u0435\u0446\u044C\",\n },\n set: {\n unit: {\n one: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\",\n few: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B\",\n many: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E\",\n },\n verb: \"\u043C\u0435\u0446\u044C\",\n },\n file: {\n unit: {\n one: \"\u0431\u0430\u0439\u0442\",\n few: \"\u0431\u0430\u0439\u0442\u044B\",\n many: \"\u0431\u0430\u0439\u0442\u0430\u045E\",\n },\n verb: \"\u043C\u0435\u0446\u044C\",\n },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0443\u0432\u043E\u0434\",\n email: \"email \u0430\u0434\u0440\u0430\u0441\",\n url: \"URL\",\n emoji: \"\u044D\u043C\u043E\u0434\u0437\u0456\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441\",\n date: \"ISO \u0434\u0430\u0442\u0430\",\n time: \"ISO \u0447\u0430\u0441\",\n duration: \"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C\",\n ipv4: \"IPv4 \u0430\u0434\u0440\u0430\u0441\",\n ipv6: \"IPv6 \u0430\u0434\u0440\u0430\u0441\",\n cidrv4: \"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D\",\n cidrv6: \"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D\",\n base64: \"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64\",\n base64url: \"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url\",\n json_string: \"JSON \u0440\u0430\u0434\u043E\u043A\",\n e164: \"\u043D\u0443\u043C\u0430\u0440 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0443\u0432\u043E\u0434\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u043B\u0456\u043A\",\n array: \"\u043C\u0430\u0441\u0456\u045E\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${issue.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`;\n }\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const maxValue = Number(issue.maximum);\n const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435\"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue.maximum.toString()} ${unit}`;\n }\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435\"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const minValue = Number(issue.minimum);\n const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue.minimum.toString()} ${unit}`;\n }\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue.keys.length > 1 ? \"\u043A\u043B\u044E\u0447\u044B\" : \"\u043A\u043B\u044E\u0447\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434\";\n case \"invalid_element\":\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue.origin}`;\n default:\n return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0441\u0438\u043C\u0432\u043E\u043B\u0430\", verb: \"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\" },\n file: { unit: \"\u0431\u0430\u0439\u0442\u0430\", verb: \"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\" },\n array: { unit: \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430\", verb: \"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\" },\n set: { unit: \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430\", verb: \"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0432\u0445\u043E\u0434\",\n email: \"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441\",\n url: \"URL\",\n emoji: \"\u0435\u043C\u043E\u0434\u0436\u0438\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0432\u0440\u0435\u043C\u0435\",\n date: \"ISO \u0434\u0430\u0442\u0430\",\n time: \"ISO \u0432\u0440\u0435\u043C\u0435\",\n duration: \"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442\",\n ipv4: \"IPv4 \u0430\u0434\u0440\u0435\u0441\",\n ipv6: \"IPv6 \u0430\u0434\u0440\u0435\u0441\",\n cidrv4: \"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\",\n cidrv6: \"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\",\n base64: \"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437\",\n base64url: \"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437\",\n json_string: \"JSON \u043D\u0438\u0437\",\n e164: \"E.164 \u043D\u043E\u043C\u0435\u0440\",\n jwt: \"JWT\",\n template_literal: \"\u0432\u0445\u043E\u0434\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0447\u0438\u0441\u043B\u043E\",\n array: \"\u043C\u0430\u0441\u0438\u0432\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${issue.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`;\n }\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue.origin ?? \"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430\"}`;\n return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue.origin ?? \"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`;\n let invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D\";\n if (_issue.format === \"emoji\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E\";\n if (_issue.format === \"datetime\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E\";\n if (_issue.format === \"date\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430\";\n if (_issue.format === \"time\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E\";\n if (_issue.format === \"duration\")\n invalid_adj = \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430\";\n return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue.keys.length > 1 ? \"\u0438\" : \"\"} \u043A\u043B\u044E\u0447${issue.keys.length > 1 ? \"\u043E\u0432\u0435\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434\";\n case \"invalid_element\":\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue.origin}`;\n default:\n return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"car\u00E0cters\", verb: \"contenir\" },\n file: { unit: \"bytes\", verb: \"contenir\" },\n array: { unit: \"elements\", verb: \"contenir\" },\n set: { unit: \"elements\", verb: \"contenir\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entrada\",\n email: \"adre\u00E7a electr\u00F2nica\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"data i hora ISO\",\n date: \"data ISO\",\n time: \"hora ISO\",\n duration: \"durada ISO\",\n ipv4: \"adre\u00E7a IPv4\",\n ipv6: \"adre\u00E7a IPv6\",\n cidrv4: \"rang IPv4\",\n cidrv6: \"rang IPv6\",\n base64: \"cadena codificada en base64\",\n base64url: \"cadena codificada en base64url\",\n json_string: \"cadena JSON\",\n e164: \"n\u00FAmero E.164\",\n jwt: \"JWT\",\n template_literal: \"entrada\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Tipus inv\u00E0lid: s'esperava instanceof ${issue.expected}, s'ha rebut ${received}`;\n }\n return `Tipus inv\u00E0lid: s'esperava ${expected}, s'ha rebut ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Valor inv\u00E0lid: s'esperava ${util.stringifyPrimitive(issue.values[0])}`;\n return `Opci\u00F3 inv\u00E0lida: s'esperava una de ${util.joinValues(issue.values, \" o \")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"com a m\u00E0xim\" : \"menys de\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Massa gran: s'esperava que ${issue.origin ?? \"el valor\"} contingu\u00E9s ${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"elements\"}`;\n return `Massa gran: s'esperava que ${issue.origin ?? \"el valor\"} fos ${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"com a m\u00EDnim\" : \"m\u00E9s de\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Massa petit: s'esperava que ${issue.origin} contingu\u00E9s ${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Massa petit: s'esperava que ${issue.origin} fos ${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Format inv\u00E0lid: ha de comen\u00E7ar amb \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Format inv\u00E0lid: ha d'acabar amb \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Format inv\u00E0lid: ha d'incloure \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Format inv\u00E0lid: ha de coincidir amb el patr\u00F3 ${_issue.pattern}`;\n return `Format inv\u00E0lid per a ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `N\u00FAmero inv\u00E0lid: ha de ser m\u00FAltiple de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Clau${issue.keys.length > 1 ? \"s\" : \"\"} no reconeguda${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Clau inv\u00E0lida a ${issue.origin}`;\n case \"invalid_union\":\n return \"Entrada inv\u00E0lida\"; // Could also be \"Tipus d'uni\u00F3 inv\u00E0lid\" but \"Entrada inv\u00E0lida\" is more general\n case \"invalid_element\":\n return `Element inv\u00E0lid a ${issue.origin}`;\n default:\n return `Entrada inv\u00E0lida`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"znak\u016F\", verb: \"m\u00EDt\" },\n file: { unit: \"bajt\u016F\", verb: \"m\u00EDt\" },\n array: { unit: \"prvk\u016F\", verb: \"m\u00EDt\" },\n set: { unit: \"prvk\u016F\", verb: \"m\u00EDt\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"regul\u00E1rn\u00ED v\u00FDraz\",\n email: \"e-mailov\u00E1 adresa\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"datum a \u010Das ve form\u00E1tu ISO\",\n date: \"datum ve form\u00E1tu ISO\",\n time: \"\u010Das ve form\u00E1tu ISO\",\n duration: \"doba trv\u00E1n\u00ED ISO\",\n ipv4: \"IPv4 adresa\",\n ipv6: \"IPv6 adresa\",\n cidrv4: \"rozsah IPv4\",\n cidrv6: \"rozsah IPv6\",\n base64: \"\u0159et\u011Bzec zak\u00F3dovan\u00FD ve form\u00E1tu base64\",\n base64url: \"\u0159et\u011Bzec zak\u00F3dovan\u00FD ve form\u00E1tu base64url\",\n json_string: \"\u0159et\u011Bzec ve form\u00E1tu JSON\",\n e164: \"\u010D\u00EDslo E.164\",\n jwt: \"JWT\",\n template_literal: \"vstup\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u010D\u00EDslo\",\n string: \"\u0159et\u011Bzec\",\n function: \"funkce\",\n array: \"pole\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Neplatn\u00FD vstup: o\u010Dek\u00E1v\u00E1no instanceof ${issue.expected}, obdr\u017Eeno ${received}`;\n }\n return `Neplatn\u00FD vstup: o\u010Dek\u00E1v\u00E1no ${expected}, obdr\u017Eeno ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Neplatn\u00FD vstup: o\u010Dek\u00E1v\u00E1no ${util.stringifyPrimitive(issue.values[0])}`;\n return `Neplatn\u00E1 mo\u017Enost: o\u010Dek\u00E1v\u00E1na jedna z hodnot ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Hodnota je p\u0159\u00EDli\u0161 velk\u00E1: ${issue.origin ?? \"hodnota\"} mus\u00ED m\u00EDt ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"prvk\u016F\"}`;\n }\n return `Hodnota je p\u0159\u00EDli\u0161 velk\u00E1: ${issue.origin ?? \"hodnota\"} mus\u00ED b\u00FDt ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Hodnota je p\u0159\u00EDli\u0161 mal\u00E1: ${issue.origin ?? \"hodnota\"} mus\u00ED m\u00EDt ${adj}${issue.minimum.toString()} ${sizing.unit ?? \"prvk\u016F\"}`;\n }\n return `Hodnota je p\u0159\u00EDli\u0161 mal\u00E1: ${issue.origin ?? \"hodnota\"} mus\u00ED b\u00FDt ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Neplatn\u00FD \u0159et\u011Bzec: mus\u00ED za\u010D\u00EDnat na \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Neplatn\u00FD \u0159et\u011Bzec: mus\u00ED kon\u010Dit na \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Neplatn\u00FD \u0159et\u011Bzec: mus\u00ED obsahovat \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Neplatn\u00FD \u0159et\u011Bzec: mus\u00ED odpov\u00EDdat vzoru ${_issue.pattern}`;\n return `Neplatn\u00FD form\u00E1t ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Neplatn\u00E9 \u010D\u00EDslo: mus\u00ED b\u00FDt n\u00E1sobkem ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Nezn\u00E1m\u00E9 kl\u00ED\u010De: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Neplatn\u00FD kl\u00ED\u010D v ${issue.origin}`;\n case \"invalid_union\":\n return \"Neplatn\u00FD vstup\";\n case \"invalid_element\":\n return `Neplatn\u00E1 hodnota v ${issue.origin}`;\n default:\n return `Neplatn\u00FD vstup`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"tegn\", verb: \"havde\" },\n file: { unit: \"bytes\", verb: \"havde\" },\n array: { unit: \"elementer\", verb: \"indeholdt\" },\n set: { unit: \"elementer\", verb: \"indeholdt\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"e-mailadresse\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO dato- og klokkesl\u00E6t\",\n date: \"ISO-dato\",\n time: \"ISO-klokkesl\u00E6t\",\n duration: \"ISO-varighed\",\n ipv4: \"IPv4-omr\u00E5de\",\n ipv6: \"IPv6-omr\u00E5de\",\n cidrv4: \"IPv4-spektrum\",\n cidrv6: \"IPv6-spektrum\",\n base64: \"base64-kodet streng\",\n base64url: \"base64url-kodet streng\",\n json_string: \"JSON-streng\",\n e164: \"E.164-nummer\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n string: \"streng\",\n number: \"tal\",\n boolean: \"boolean\",\n array: \"liste\",\n object: \"objekt\",\n set: \"s\u00E6t\",\n file: \"fil\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ugyldigt input: forventede instanceof ${issue.expected}, fik ${received}`;\n }\n return `Ugyldigt input: forventede ${expected}, fik ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ugyldig v\u00E6rdi: forventede ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ugyldigt valg: forventede en af f\u00F8lgende ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n if (sizing)\n return `For stor: forventede ${origin ?? \"value\"} ${sizing.verb} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"elementer\"}`;\n return `For stor: forventede ${origin ?? \"value\"} havde ${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n if (sizing) {\n return `For lille: forventede ${origin} ${sizing.verb} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `For lille: forventede ${origin} havde ${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Ugyldig streng: skal starte med \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Ugyldig streng: skal ende med \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Ugyldig streng: skal indeholde \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Ugyldig streng: skal matche m\u00F8nsteret ${_issue.pattern}`;\n return `Ugyldig ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ugyldigt tal: skal v\u00E6re deleligt med ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Ukendte n\u00F8gler\" : \"Ukendt n\u00F8gle\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ugyldig n\u00F8gle i ${issue.origin}`;\n case \"invalid_union\":\n return \"Ugyldigt input: matcher ingen af de tilladte typer\";\n case \"invalid_element\":\n return `Ugyldig v\u00E6rdi i ${issue.origin}`;\n default:\n return `Ugyldigt input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"Zeichen\", verb: \"zu haben\" },\n file: { unit: \"Bytes\", verb: \"zu haben\" },\n array: { unit: \"Elemente\", verb: \"zu haben\" },\n set: { unit: \"Elemente\", verb: \"zu haben\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"Eingabe\",\n email: \"E-Mail-Adresse\",\n url: \"URL\",\n emoji: \"Emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-Datum und -Uhrzeit\",\n date: \"ISO-Datum\",\n time: \"ISO-Uhrzeit\",\n duration: \"ISO-Dauer\",\n ipv4: \"IPv4-Adresse\",\n ipv6: \"IPv6-Adresse\",\n cidrv4: \"IPv4-Bereich\",\n cidrv6: \"IPv6-Bereich\",\n base64: \"Base64-codierter String\",\n base64url: \"Base64-URL-codierter String\",\n json_string: \"JSON-String\",\n e164: \"E.164-Nummer\",\n jwt: \"JWT\",\n template_literal: \"Eingabe\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"Zahl\",\n array: \"Array\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ung\u00FCltige Eingabe: erwartet instanceof ${issue.expected}, erhalten ${received}`;\n }\n return `Ung\u00FCltige Eingabe: erwartet ${expected}, erhalten ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ung\u00FCltige Eingabe: erwartet ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ung\u00FCltige Option: erwartet eine von ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Zu gro\u00DF: erwartet, dass ${issue.origin ?? \"Wert\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"Elemente\"} hat`;\n return `Zu gro\u00DF: erwartet, dass ${issue.origin ?? \"Wert\"} ${adj}${issue.maximum.toString()} ist`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Zu klein: erwartet, dass ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} hat`;\n }\n return `Zu klein: erwartet, dass ${issue.origin} ${adj}${issue.minimum.toString()} ist`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Ung\u00FCltiger String: muss mit \"${_issue.prefix}\" beginnen`;\n if (_issue.format === \"ends_with\")\n return `Ung\u00FCltiger String: muss mit \"${_issue.suffix}\" enden`;\n if (_issue.format === \"includes\")\n return `Ung\u00FCltiger String: muss \"${_issue.includes}\" enthalten`;\n if (_issue.format === \"regex\")\n return `Ung\u00FCltiger String: muss dem Muster ${_issue.pattern} entsprechen`;\n return `Ung\u00FCltig: ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ung\u00FCltige Zahl: muss ein Vielfaches von ${issue.divisor} sein`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Unbekannte Schl\u00FCssel\" : \"Unbekannter Schl\u00FCssel\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ung\u00FCltiger Schl\u00FCssel in ${issue.origin}`;\n case \"invalid_union\":\n return \"Ung\u00FCltige Eingabe\";\n case \"invalid_element\":\n return `Ung\u00FCltiger Wert in ${issue.origin}`;\n default:\n return `Ung\u00FCltige Eingabe`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"characters\", verb: \"to have\" },\n file: { unit: \"bytes\", verb: \"to have\" },\n array: { unit: \"items\", verb: \"to have\" },\n set: { unit: \"items\", verb: \"to have\" },\n map: { unit: \"entries\", verb: \"to have\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"email address\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datetime\",\n date: \"ISO date\",\n time: \"ISO time\",\n duration: \"ISO duration\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n mac: \"MAC address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded string\",\n base64url: \"base64url-encoded string\",\n json_string: \"JSON string\",\n e164: \"E.164 number\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n // type names: missing keys = do not translate (use raw value via ?? fallback)\n const TypeDictionary = {\n // Compatibility: \"nan\" -> \"NaN\" for display\n nan: \"NaN\",\n // All other type names omitted - they fall back to raw values via ?? operator\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n return `Invalid input: expected ${expected}, received ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;\n return `Invalid option: expected one of ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Too big: expected ${issue.origin ?? \"value\"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elements\"}`;\n return `Too big: expected ${issue.origin ?? \"value\"} to be ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Invalid string: must start with \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Invalid string: must end with \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Invalid string: must include \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Invalid string: must match pattern ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Invalid number: must be a multiple of ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Unrecognized key${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Invalid key in ${issue.origin}`;\n case \"invalid_union\":\n return \"Invalid input\";\n case \"invalid_element\":\n return `Invalid value in ${issue.origin}`;\n default:\n return `Invalid input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"karaktrojn\", verb: \"havi\" },\n file: { unit: \"bajtojn\", verb: \"havi\" },\n array: { unit: \"elementojn\", verb: \"havi\" },\n set: { unit: \"elementojn\", verb: \"havi\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"enigo\",\n email: \"retadreso\",\n url: \"URL\",\n emoji: \"emo\u011Dio\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-datotempo\",\n date: \"ISO-dato\",\n time: \"ISO-tempo\",\n duration: \"ISO-da\u016Dro\",\n ipv4: \"IPv4-adreso\",\n ipv6: \"IPv6-adreso\",\n cidrv4: \"IPv4-rango\",\n cidrv6: \"IPv6-rango\",\n base64: \"64-ume kodita karaktraro\",\n base64url: \"URL-64-ume kodita karaktraro\",\n json_string: \"JSON-karaktraro\",\n e164: \"E.164-nombro\",\n jwt: \"JWT\",\n template_literal: \"enigo\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"nombro\",\n array: \"tabelo\",\n null: \"senvalora\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Nevalida enigo: atendi\u011Dis instanceof ${issue.expected}, ricevi\u011Dis ${received}`;\n }\n return `Nevalida enigo: atendi\u011Dis ${expected}, ricevi\u011Dis ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Nevalida enigo: atendi\u011Dis ${util.stringifyPrimitive(issue.values[0])}`;\n return `Nevalida opcio: atendi\u011Dis unu el ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Tro granda: atendi\u011Dis ke ${issue.origin ?? \"valoro\"} havu ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementojn\"}`;\n return `Tro granda: atendi\u011Dis ke ${issue.origin ?? \"valoro\"} havu ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Tro malgranda: atendi\u011Dis ke ${issue.origin} havu ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Tro malgranda: atendi\u011Dis ke ${issue.origin} estu ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Nevalida karaktraro: devas komenci\u011Di per \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Nevalida karaktraro: devas fini\u011Di per \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Nevalida karaktraro: devas inkluzivi \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;\n return `Nevalida ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Nevalida nombro: devas esti oblo de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Nekonata${issue.keys.length > 1 ? \"j\" : \"\"} \u015Dlosilo${issue.keys.length > 1 ? \"j\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Nevalida \u015Dlosilo en ${issue.origin}`;\n case \"invalid_union\":\n return \"Nevalida enigo\";\n case \"invalid_element\":\n return `Nevalida valoro en ${issue.origin}`;\n default:\n return `Nevalida enigo`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caracteres\", verb: \"tener\" },\n file: { unit: \"bytes\", verb: \"tener\" },\n array: { unit: \"elementos\", verb: \"tener\" },\n set: { unit: \"elementos\", verb: \"tener\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entrada\",\n email: \"direcci\u00F3n de correo electr\u00F3nico\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"fecha y hora ISO\",\n date: \"fecha ISO\",\n time: \"hora ISO\",\n duration: \"duraci\u00F3n ISO\",\n ipv4: \"direcci\u00F3n IPv4\",\n ipv6: \"direcci\u00F3n IPv6\",\n cidrv4: \"rango IPv4\",\n cidrv6: \"rango IPv6\",\n base64: \"cadena codificada en base64\",\n base64url: \"URL codificada en base64\",\n json_string: \"cadena JSON\",\n e164: \"n\u00FAmero E.164\",\n jwt: \"JWT\",\n template_literal: \"entrada\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n string: \"texto\",\n number: \"n\u00FAmero\",\n boolean: \"booleano\",\n array: \"arreglo\",\n object: \"objeto\",\n set: \"conjunto\",\n file: \"archivo\",\n date: \"fecha\",\n bigint: \"n\u00FAmero grande\",\n symbol: \"s\u00EDmbolo\",\n undefined: \"indefinido\",\n null: \"nulo\",\n function: \"funci\u00F3n\",\n map: \"mapa\",\n record: \"registro\",\n tuple: \"tupla\",\n enum: \"enumeraci\u00F3n\",\n union: \"uni\u00F3n\",\n literal: \"literal\",\n promise: \"promesa\",\n void: \"vac\u00EDo\",\n never: \"nunca\",\n unknown: \"desconocido\",\n any: \"cualquiera\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Entrada inv\u00E1lida: se esperaba instanceof ${issue.expected}, recibido ${received}`;\n }\n return `Entrada inv\u00E1lida: se esperaba ${expected}, recibido ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entrada inv\u00E1lida: se esperaba ${util.stringifyPrimitive(issue.values[0])}`;\n return `Opci\u00F3n inv\u00E1lida: se esperaba una de ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n if (sizing)\n return `Demasiado grande: se esperaba que ${origin ?? \"valor\"} tuviera ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementos\"}`;\n return `Demasiado grande: se esperaba que ${origin ?? \"valor\"} fuera ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n if (sizing) {\n return `Demasiado peque\u00F1o: se esperaba que ${origin} tuviera ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Demasiado peque\u00F1o: se esperaba que ${origin} fuera ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Cadena inv\u00E1lida: debe comenzar con \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Cadena inv\u00E1lida: debe terminar en \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Cadena inv\u00E1lida: debe incluir \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Cadena inv\u00E1lida: debe coincidir con el patr\u00F3n ${_issue.pattern}`;\n return `Inv\u00E1lido ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `N\u00FAmero inv\u00E1lido: debe ser m\u00FAltiplo de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Llave${issue.keys.length > 1 ? \"s\" : \"\"} desconocida${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Llave inv\u00E1lida en ${TypeDictionary[issue.origin] ?? issue.origin}`;\n case \"invalid_union\":\n return \"Entrada inv\u00E1lida\";\n case \"invalid_element\":\n return `Valor inv\u00E1lido en ${TypeDictionary[issue.origin] ?? issue.origin}`;\n default:\n return `Entrada inv\u00E1lida`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631\", verb: \"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F\" },\n file: { unit: \"\u0628\u0627\u06CC\u062A\", verb: \"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F\" },\n array: { unit: \"\u0622\u06CC\u062A\u0645\", verb: \"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F\" },\n set: { unit: \"\u0622\u06CC\u062A\u0645\", verb: \"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0648\u0631\u0648\u062F\u06CC\",\n email: \"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644\",\n url: \"URL\",\n emoji: \"\u0627\u06CC\u0645\u0648\u062C\u06CC\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648\",\n date: \"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648\",\n time: \"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648\",\n duration: \"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648\",\n ipv4: \"IPv4 \u0622\u062F\u0631\u0633\",\n ipv6: \"IPv6 \u0622\u062F\u0631\u0633\",\n cidrv4: \"IPv4 \u062F\u0627\u0645\u0646\u0647\",\n cidrv6: \"IPv6 \u062F\u0627\u0645\u0646\u0647\",\n base64: \"base64-encoded \u0631\u0634\u062A\u0647\",\n base64url: \"base64url-encoded \u0631\u0634\u062A\u0647\",\n json_string: \"JSON \u0631\u0634\u062A\u0647\",\n e164: \"E.164 \u0639\u062F\u062F\",\n jwt: \"JWT\",\n template_literal: \"\u0648\u0631\u0648\u062F\u06CC\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0639\u062F\u062F\",\n array: \"\u0622\u0631\u0627\u06CC\u0647\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${issue.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;\n }\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1) {\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${util.stringifyPrimitive(issue.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`;\n }\n return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${util.joinValues(issue.values, \"|\")} \u0645\u06CC\u200C\u0628\u0648\u062F`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue.origin ?? \"\u0645\u0642\u062F\u0627\u0631\"} \u0628\u0627\u06CC\u062F ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0639\u0646\u0635\u0631\"} \u0628\u0627\u0634\u062F`;\n }\n return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue.origin ?? \"\u0645\u0642\u062F\u0627\u0631\"} \u0628\u0627\u06CC\u062F ${adj}${issue.maximum.toString()} \u0628\u0627\u0634\u062F`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue.origin} \u0628\u0627\u06CC\u062F ${adj}${issue.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`;\n }\n return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue.origin} \u0628\u0627\u06CC\u062F ${adj}${issue.minimum.toString()} \u0628\u0627\u0634\u062F`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \"${_issue.prefix}\" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`;\n }\n if (_issue.format === \"ends_with\") {\n return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \"${_issue.suffix}\" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`;\n }\n if (_issue.format === \"includes\") {\n return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 \"${_issue.includes}\" \u0628\u0627\u0634\u062F`;\n }\n if (_issue.format === \"regex\") {\n return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`;\n }\n return `${FormatDictionary[_issue.format] ?? issue.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;\n }\n case \"not_multiple_of\":\n return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue.divisor} \u0628\u0627\u0634\u062F`;\n case \"unrecognized_keys\":\n return `\u06A9\u0644\u06CC\u062F${issue.keys.length > 1 ? \"\u0647\u0627\u06CC\" : \"\"} \u0646\u0627\u0634\u0646\u0627\u0633: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue.origin}`;\n case \"invalid_union\":\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;\n case \"invalid_element\":\n return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue.origin}`;\n default:\n return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"merkki\u00E4\", subject: \"merkkijonon\" },\n file: { unit: \"tavua\", subject: \"tiedoston\" },\n array: { unit: \"alkiota\", subject: \"listan\" },\n set: { unit: \"alkiota\", subject: \"joukon\" },\n number: { unit: \"\", subject: \"luvun\" },\n bigint: { unit: \"\", subject: \"suuren kokonaisluvun\" },\n int: { unit: \"\", subject: \"kokonaisluvun\" },\n date: { unit: \"\", subject: \"p\u00E4iv\u00E4m\u00E4\u00E4r\u00E4n\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"s\u00E4\u00E4nn\u00F6llinen lauseke\",\n email: \"s\u00E4hk\u00F6postiosoite\",\n url: \"URL-osoite\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-aikaleima\",\n date: \"ISO-p\u00E4iv\u00E4m\u00E4\u00E4r\u00E4\",\n time: \"ISO-aika\",\n duration: \"ISO-kesto\",\n ipv4: \"IPv4-osoite\",\n ipv6: \"IPv6-osoite\",\n cidrv4: \"IPv4-alue\",\n cidrv6: \"IPv6-alue\",\n base64: \"base64-koodattu merkkijono\",\n base64url: \"base64url-koodattu merkkijono\",\n json_string: \"JSON-merkkijono\",\n e164: \"E.164-luku\",\n jwt: \"JWT\",\n template_literal: \"templaattimerkkijono\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Virheellinen tyyppi: odotettiin instanceof ${issue.expected}, oli ${received}`;\n }\n return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Virheellinen sy\u00F6te: t\u00E4ytyy olla ${util.stringifyPrimitive(issue.values[0])}`;\n return `Virheellinen valinta: t\u00E4ytyy olla yksi seuraavista: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Liian suuri: ${sizing.subject} t\u00E4ytyy olla ${adj}${issue.maximum.toString()} ${sizing.unit}`.trim();\n }\n return `Liian suuri: arvon t\u00E4ytyy olla ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Liian pieni: ${sizing.subject} t\u00E4ytyy olla ${adj}${issue.minimum.toString()} ${sizing.unit}`.trim();\n }\n return `Liian pieni: arvon t\u00E4ytyy olla ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Virheellinen sy\u00F6te: t\u00E4ytyy alkaa \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Virheellinen sy\u00F6te: t\u00E4ytyy loppua \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Virheellinen sy\u00F6te: t\u00E4ytyy sis\u00E4lt\u00E4\u00E4 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\") {\n return `Virheellinen sy\u00F6te: t\u00E4ytyy vastata s\u00E4\u00E4nn\u00F6llist\u00E4 lauseketta ${_issue.pattern}`;\n }\n return `Virheellinen ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Virheellinen luku: t\u00E4ytyy olla luvun ${issue.divisor} monikerta`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Tuntemattomat avaimet\" : \"Tuntematon avain\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return \"Virheellinen avain tietueessa\";\n case \"invalid_union\":\n return \"Virheellinen unioni\";\n case \"invalid_element\":\n return \"Virheellinen arvo joukossa\";\n default:\n return `Virheellinen sy\u00F6te`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caract\u00E8res\", verb: \"avoir\" },\n file: { unit: \"octets\", verb: \"avoir\" },\n array: { unit: \"\u00E9l\u00E9ments\", verb: \"avoir\" },\n set: { unit: \"\u00E9l\u00E9ments\", verb: \"avoir\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entr\u00E9e\",\n email: \"adresse e-mail\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"date et heure ISO\",\n date: \"date ISO\",\n time: \"heure ISO\",\n duration: \"dur\u00E9e ISO\",\n ipv4: \"adresse IPv4\",\n ipv6: \"adresse IPv6\",\n cidrv4: \"plage IPv4\",\n cidrv6: \"plage IPv6\",\n base64: \"cha\u00EEne encod\u00E9e en base64\",\n base64url: \"cha\u00EEne encod\u00E9e en base64url\",\n json_string: \"cha\u00EEne JSON\",\n e164: \"num\u00E9ro E.164\",\n jwt: \"JWT\",\n template_literal: \"entr\u00E9e\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"nombre\",\n array: \"tableau\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Entr\u00E9e invalide : instanceof ${issue.expected} attendu, ${received} re\u00E7u`;\n }\n return `Entr\u00E9e invalide : ${expected} attendu, ${received} re\u00E7u`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entr\u00E9e invalide : ${util.stringifyPrimitive(issue.values[0])} attendu`;\n return `Option invalide : une valeur parmi ${util.joinValues(issue.values, \"|\")} attendue`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Trop grand : ${issue.origin ?? \"valeur\"} doit ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u00E9l\u00E9ment(s)\"}`;\n return `Trop grand : ${issue.origin ?? \"valeur\"} doit \u00EAtre ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Trop petit : ${issue.origin} doit ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Trop petit : ${issue.origin} doit \u00EAtre ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Cha\u00EEne invalide : doit commencer par \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Cha\u00EEne invalide : doit se terminer par \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Cha\u00EEne invalide : doit inclure \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Cha\u00EEne invalide : doit correspondre au mod\u00E8le ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} invalide`;\n }\n case \"not_multiple_of\":\n return `Nombre invalide : doit \u00EAtre un multiple de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Cl\u00E9${issue.keys.length > 1 ? \"s\" : \"\"} non reconnue${issue.keys.length > 1 ? \"s\" : \"\"} : ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Cl\u00E9 invalide dans ${issue.origin}`;\n case \"invalid_union\":\n return \"Entr\u00E9e invalide\";\n case \"invalid_element\":\n return `Valeur invalide dans ${issue.origin}`;\n default:\n return `Entr\u00E9e invalide`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caract\u00E8res\", verb: \"avoir\" },\n file: { unit: \"octets\", verb: \"avoir\" },\n array: { unit: \"\u00E9l\u00E9ments\", verb: \"avoir\" },\n set: { unit: \"\u00E9l\u00E9ments\", verb: \"avoir\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entr\u00E9e\",\n email: \"adresse courriel\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"date-heure ISO\",\n date: \"date ISO\",\n time: \"heure ISO\",\n duration: \"dur\u00E9e ISO\",\n ipv4: \"adresse IPv4\",\n ipv6: \"adresse IPv6\",\n cidrv4: \"plage IPv4\",\n cidrv6: \"plage IPv6\",\n base64: \"cha\u00EEne encod\u00E9e en base64\",\n base64url: \"cha\u00EEne encod\u00E9e en base64url\",\n json_string: \"cha\u00EEne JSON\",\n e164: \"num\u00E9ro E.164\",\n jwt: \"JWT\",\n template_literal: \"entr\u00E9e\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Entr\u00E9e invalide : attendu instanceof ${issue.expected}, re\u00E7u ${received}`;\n }\n return `Entr\u00E9e invalide : attendu ${expected}, re\u00E7u ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entr\u00E9e invalide : attendu ${util.stringifyPrimitive(issue.values[0])}`;\n return `Option invalide : attendu l'une des valeurs suivantes ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"\u2264\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Trop grand : attendu que ${issue.origin ?? \"la valeur\"} ait ${adj}${issue.maximum.toString()} ${sizing.unit}`;\n return `Trop grand : attendu que ${issue.origin ?? \"la valeur\"} soit ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"\u2265\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Trop petit : attendu que ${issue.origin} ait ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Trop petit : attendu que ${issue.origin} soit ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Cha\u00EEne invalide : doit commencer par \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Cha\u00EEne invalide : doit se terminer par \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Cha\u00EEne invalide : doit inclure \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Cha\u00EEne invalide : doit correspondre au motif ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} invalide`;\n }\n case \"not_multiple_of\":\n return `Nombre invalide : doit \u00EAtre un multiple de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Cl\u00E9${issue.keys.length > 1 ? \"s\" : \"\"} non reconnue${issue.keys.length > 1 ? \"s\" : \"\"} : ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Cl\u00E9 invalide dans ${issue.origin}`;\n case \"invalid_union\":\n return \"Entr\u00E9e invalide\";\n case \"invalid_element\":\n return `Valeur invalide dans ${issue.origin}`;\n default:\n return `Entr\u00E9e invalide`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n // Hebrew labels + grammatical gender\n const TypeNames = {\n string: { label: \"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA\", gender: \"f\" },\n number: { label: \"\u05DE\u05E1\u05E4\u05E8\", gender: \"m\" },\n boolean: { label: \"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9\", gender: \"m\" },\n bigint: { label: \"BigInt\", gender: \"m\" },\n date: { label: \"\u05EA\u05D0\u05E8\u05D9\u05DA\", gender: \"m\" },\n array: { label: \"\u05DE\u05E2\u05E8\u05DA\", gender: \"m\" },\n object: { label: \"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8\", gender: \"m\" },\n null: { label: \"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)\", gender: \"m\" },\n undefined: { label: \"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)\", gender: \"m\" },\n symbol: { label: \"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)\", gender: \"m\" },\n function: { label: \"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4\", gender: \"f\" },\n map: { label: \"\u05DE\u05E4\u05D4 (Map)\", gender: \"f\" },\n set: { label: \"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)\", gender: \"f\" },\n file: { label: \"\u05E7\u05D5\u05D1\u05E5\", gender: \"m\" },\n promise: { label: \"Promise\", gender: \"m\" },\n NaN: { label: \"NaN\", gender: \"m\" },\n unknown: { label: \"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2\", gender: \"m\" },\n value: { label: \"\u05E2\u05E8\u05DA\", gender: \"m\" },\n };\n // Sizing units for size-related messages + localized origin labels\n const Sizable = {\n string: { unit: \"\u05EA\u05D5\u05D5\u05D9\u05DD\", shortLabel: \"\u05E7\u05E6\u05E8\", longLabel: \"\u05D0\u05E8\u05D5\u05DA\" },\n file: { unit: \"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD\", shortLabel: \"\u05E7\u05D8\u05DF\", longLabel: \"\u05D2\u05D3\u05D5\u05DC\" },\n array: { unit: \"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD\", shortLabel: \"\u05E7\u05D8\u05DF\", longLabel: \"\u05D2\u05D3\u05D5\u05DC\" },\n set: { unit: \"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD\", shortLabel: \"\u05E7\u05D8\u05DF\", longLabel: \"\u05D2\u05D3\u05D5\u05DC\" },\n number: { unit: \"\", shortLabel: \"\u05E7\u05D8\u05DF\", longLabel: \"\u05D2\u05D3\u05D5\u05DC\" }, // no unit\n };\n // Helpers \u2014 labels, articles, and verbs\n const typeEntry = (t) => (t ? TypeNames[t] : undefined);\n const typeLabel = (t) => {\n const e = typeEntry(t);\n if (e)\n return e.label;\n // fallback: show raw string if unknown\n return t ?? TypeNames.unknown.label;\n };\n const withDefinite = (t) => `\u05D4${typeLabel(t)}`;\n const verbFor = (t) => {\n const e = typeEntry(t);\n const gender = e?.gender ?? \"m\";\n return gender === \"f\" ? \"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA\" : \"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA\";\n };\n const getSizing = (origin) => {\n if (!origin)\n return null;\n return Sizable[origin] ?? null;\n };\n const FormatDictionary = {\n regex: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n email: { label: \"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC\", gender: \"f\" },\n url: { label: \"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA\", gender: \"f\" },\n emoji: { label: \"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9\", gender: \"m\" },\n uuid: { label: \"UUID\", gender: \"m\" },\n nanoid: { label: \"nanoid\", gender: \"m\" },\n guid: { label: \"GUID\", gender: \"m\" },\n cuid: { label: \"cuid\", gender: \"m\" },\n cuid2: { label: \"cuid2\", gender: \"m\" },\n ulid: { label: \"ULID\", gender: \"m\" },\n xid: { label: \"XID\", gender: \"m\" },\n ksuid: { label: \"KSUID\", gender: \"m\" },\n datetime: { label: \"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO\", gender: \"m\" },\n date: { label: \"\u05EA\u05D0\u05E8\u05D9\u05DA ISO\", gender: \"m\" },\n time: { label: \"\u05D6\u05DE\u05DF ISO\", gender: \"m\" },\n duration: { label: \"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO\", gender: \"m\" },\n ipv4: { label: \"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4\", gender: \"f\" },\n ipv6: { label: \"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6\", gender: \"f\" },\n cidrv4: { label: \"\u05D8\u05D5\u05D5\u05D7 IPv4\", gender: \"m\" },\n cidrv6: { label: \"\u05D8\u05D5\u05D5\u05D7 IPv6\", gender: \"m\" },\n base64: { label: \"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64\", gender: \"f\" },\n base64url: { label: \"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA\", gender: \"f\" },\n json_string: { label: \"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON\", gender: \"f\" },\n e164: { label: \"\u05DE\u05E1\u05E4\u05E8 E.164\", gender: \"m\" },\n jwt: { label: \"JWT\", gender: \"m\" },\n ends_with: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n includes: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n lowercase: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n starts_with: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n uppercase: { label: \"\u05E7\u05DC\u05D8\", gender: \"m\" },\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n // Expected type: show without definite article for clearer Hebrew\n const expectedKey = issue.expected;\n const expected = TypeDictionary[expectedKey ?? \"\"] ?? typeLabel(expectedKey);\n // Received: show localized label if known, otherwise constructor/raw\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`;\n }\n return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`;\n }\n case \"invalid_value\": {\n if (issue.values.length === 1) {\n return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${util.stringifyPrimitive(issue.values[0])}`;\n }\n // Join values with proper Hebrew formatting\n const stringified = issue.values.map((v) => util.stringifyPrimitive(v));\n if (issue.values.length === 2) {\n return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`;\n }\n // For 3+ values: \"a\", \"b\" \u05D0\u05D5 \"c\"\n const lastValue = stringified[stringified.length - 1];\n const restValues = stringified.slice(0, -1).join(\", \");\n return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`;\n }\n case \"too_big\": {\n const sizing = getSizing(issue.origin);\n const subject = withDefinite(issue.origin ?? \"value\");\n if (issue.origin === \"string\") {\n // Special handling for strings - more natural Hebrew\n return `${sizing?.longLabel ?? \"\u05D0\u05E8\u05D5\u05DA\"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue.maximum.toString()} ${sizing?.unit ?? \"\"} ${issue.inclusive ? \"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA\" : \"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8\"}`.trim();\n }\n if (issue.origin === \"number\") {\n // Natural Hebrew for numbers\n const comparison = issue.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue.maximum}`;\n return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`;\n }\n if (issue.origin === \"array\" || issue.origin === \"set\") {\n // Natural Hebrew for arrays and sets\n const verb = issue.origin === \"set\" ? \"\u05E6\u05E8\u05D9\u05DB\u05D4\" : \"\u05E6\u05E8\u05D9\u05DA\";\n const comparison = issue.inclusive\n ? `${issue.maximum} ${sizing?.unit ?? \"\"} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`\n : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue.maximum} ${sizing?.unit ?? \"\"}`;\n return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();\n }\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const be = verbFor(issue.origin ?? \"value\");\n if (sizing?.unit) {\n return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue.maximum.toString()} ${sizing.unit}`;\n }\n return `${sizing?.longLabel ?? \"\u05D2\u05D3\u05D5\u05DC\"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const sizing = getSizing(issue.origin);\n const subject = withDefinite(issue.origin ?? \"value\");\n if (issue.origin === \"string\") {\n // Special handling for strings - more natural Hebrew\n return `${sizing?.shortLabel ?? \"\u05E7\u05E6\u05E8\"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue.minimum.toString()} ${sizing?.unit ?? \"\"} ${issue.inclusive ? \"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8\" : \"\u05DC\u05E4\u05D7\u05D5\u05EA\"}`.trim();\n }\n if (issue.origin === \"number\") {\n // Natural Hebrew for numbers\n const comparison = issue.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue.minimum}`;\n return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`;\n }\n if (issue.origin === \"array\" || issue.origin === \"set\") {\n // Natural Hebrew for arrays and sets\n const verb = issue.origin === \"set\" ? \"\u05E6\u05E8\u05D9\u05DB\u05D4\" : \"\u05E6\u05E8\u05D9\u05DA\";\n // Special case for singular (minimum === 1)\n if (issue.minimum === 1 && issue.inclusive) {\n const singularPhrase = issue.origin === \"set\" ? \"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3\" : \"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3\";\n return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`;\n }\n const comparison = issue.inclusive\n ? `${issue.minimum} ${sizing?.unit ?? \"\"} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`\n : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue.minimum} ${sizing?.unit ?? \"\"}`;\n return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim();\n }\n const adj = issue.inclusive ? \">=\" : \">\";\n const be = verbFor(issue.origin ?? \"value\");\n if (sizing?.unit) {\n return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `${sizing?.shortLabel ?? \"\u05E7\u05D8\u05DF\"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n // These apply to strings \u2014 use feminine grammar + \u05D4\u05F3 \u05D4\u05D9\u05D3\u05D9\u05E2\u05D4\n if (_issue.format === \"starts_with\")\n return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`;\n // Handle gender agreement for formats\n const nounEntry = FormatDictionary[_issue.format];\n const noun = nounEntry?.label ?? _issue.format;\n const gender = nounEntry?.gender ?? \"m\";\n const adjective = gender === \"f\" ? \"\u05EA\u05E7\u05D9\u05E0\u05D4\" : \"\u05EA\u05E7\u05D9\u05DF\";\n return `${noun} \u05DC\u05D0 ${adjective}`;\n }\n case \"not_multiple_of\":\n return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u05DE\u05E4\u05EA\u05D7${issue.keys.length > 1 ? \"\u05D5\u05EA\" : \"\"} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue.keys.length > 1 ? \"\u05D9\u05DD\" : \"\u05D4\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\": {\n return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`;\n }\n case \"invalid_union\":\n return \"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF\";\n case \"invalid_element\": {\n const place = withDefinite(issue.origin ?? \"array\");\n return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`;\n }\n default:\n return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"karakter\", verb: \"legyen\" },\n file: { unit: \"byte\", verb: \"legyen\" },\n array: { unit: \"elem\", verb: \"legyen\" },\n set: { unit: \"elem\", verb: \"legyen\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"bemenet\",\n email: \"email c\u00EDm\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO id\u0151b\u00E9lyeg\",\n date: \"ISO d\u00E1tum\",\n time: \"ISO id\u0151\",\n duration: \"ISO id\u0151intervallum\",\n ipv4: \"IPv4 c\u00EDm\",\n ipv6: \"IPv6 c\u00EDm\",\n cidrv4: \"IPv4 tartom\u00E1ny\",\n cidrv6: \"IPv6 tartom\u00E1ny\",\n base64: \"base64-k\u00F3dolt string\",\n base64url: \"base64url-k\u00F3dolt string\",\n json_string: \"JSON string\",\n e164: \"E.164 sz\u00E1m\",\n jwt: \"JWT\",\n template_literal: \"bemenet\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"sz\u00E1m\",\n array: \"t\u00F6mb\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u00C9rv\u00E9nytelen bemenet: a v\u00E1rt \u00E9rt\u00E9k instanceof ${issue.expected}, a kapott \u00E9rt\u00E9k ${received}`;\n }\n return `\u00C9rv\u00E9nytelen bemenet: a v\u00E1rt \u00E9rt\u00E9k ${expected}, a kapott \u00E9rt\u00E9k ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u00C9rv\u00E9nytelen bemenet: a v\u00E1rt \u00E9rt\u00E9k ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u00C9rv\u00E9nytelen opci\u00F3: valamelyik \u00E9rt\u00E9k v\u00E1rt ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `T\u00FAl nagy: ${issue.origin ?? \"\u00E9rt\u00E9k\"} m\u00E9rete t\u00FAl nagy ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elem\"}`;\n return `T\u00FAl nagy: a bemeneti \u00E9rt\u00E9k ${issue.origin ?? \"\u00E9rt\u00E9k\"} t\u00FAl nagy: ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `T\u00FAl kicsi: a bemeneti \u00E9rt\u00E9k ${issue.origin} m\u00E9rete t\u00FAl kicsi ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `T\u00FAl kicsi: a bemeneti \u00E9rt\u00E9k ${issue.origin} t\u00FAl kicsi ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u00C9rv\u00E9nytelen string: \"${_issue.prefix}\" \u00E9rt\u00E9kkel kell kezd\u0151dnie`;\n if (_issue.format === \"ends_with\")\n return `\u00C9rv\u00E9nytelen string: \"${_issue.suffix}\" \u00E9rt\u00E9kkel kell v\u00E9gz\u0151dnie`;\n if (_issue.format === \"includes\")\n return `\u00C9rv\u00E9nytelen string: \"${_issue.includes}\" \u00E9rt\u00E9ket kell tartalmaznia`;\n if (_issue.format === \"regex\")\n return `\u00C9rv\u00E9nytelen string: ${_issue.pattern} mint\u00E1nak kell megfelelnie`;\n return `\u00C9rv\u00E9nytelen ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u00C9rv\u00E9nytelen sz\u00E1m: ${issue.divisor} t\u00F6bbsz\u00F6r\u00F6s\u00E9nek kell lennie`;\n case \"unrecognized_keys\":\n return `Ismeretlen kulcs${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u00C9rv\u00E9nytelen kulcs ${issue.origin}`;\n case \"invalid_union\":\n return \"\u00C9rv\u00E9nytelen bemenet\";\n case \"invalid_element\":\n return `\u00C9rv\u00E9nytelen \u00E9rt\u00E9k: ${issue.origin}`;\n default:\n return `\u00C9rv\u00E9nytelen bemenet`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nfunction getArmenianPlural(count, one, many) {\n return Math.abs(count) === 1 ? one : many;\n}\nfunction withDefiniteArticle(word) {\n if (!word)\n return \"\";\n const vowels = [\"\u0561\", \"\u0565\", \"\u0568\", \"\u056B\", \"\u0578\", \"\u0578\u0582\", \"\u0585\"];\n const lastChar = word[word.length - 1];\n return word + (vowels.includes(lastChar) ? \"\u0576\" : \"\u0568\");\n}\nconst error = () => {\n const Sizable = {\n string: {\n unit: {\n one: \"\u0576\u0577\u0561\u0576\",\n many: \"\u0576\u0577\u0561\u0576\u0576\u0565\u0580\",\n },\n verb: \"\u0578\u0582\u0576\u0565\u0576\u0561\u056C\",\n },\n file: {\n unit: {\n one: \"\u0562\u0561\u0575\u0569\",\n many: \"\u0562\u0561\u0575\u0569\u0565\u0580\",\n },\n verb: \"\u0578\u0582\u0576\u0565\u0576\u0561\u056C\",\n },\n array: {\n unit: {\n one: \"\u057F\u0561\u0580\u0580\",\n many: \"\u057F\u0561\u0580\u0580\u0565\u0580\",\n },\n verb: \"\u0578\u0582\u0576\u0565\u0576\u0561\u056C\",\n },\n set: {\n unit: {\n one: \"\u057F\u0561\u0580\u0580\",\n many: \"\u057F\u0561\u0580\u0580\u0565\u0580\",\n },\n verb: \"\u0578\u0582\u0576\u0565\u0576\u0561\u056C\",\n },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0574\u0578\u0582\u057F\u0584\",\n email: \"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565\",\n url: \"URL\",\n emoji: \"\u0567\u0574\u0578\u057B\u056B\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574\",\n date: \"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E\",\n time: \"ISO \u056A\u0561\u0574\",\n duration: \"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576\",\n ipv4: \"IPv4 \u0570\u0561\u057D\u0581\u0565\",\n ipv6: \"IPv6 \u0570\u0561\u057D\u0581\u0565\",\n cidrv4: \"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584\",\n cidrv6: \"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584\",\n base64: \"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572\",\n base64url: \"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572\",\n json_string: \"JSON \u057F\u0578\u0572\",\n e164: \"E.164 \u0570\u0561\u0574\u0561\u0580\",\n jwt: \"JWT\",\n template_literal: \"\u0574\u0578\u0582\u057F\u0584\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0569\u056B\u057E\",\n array: \"\u0566\u0561\u0576\u0563\u057E\u0561\u056E\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${issue.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`;\n }\n return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${util.stringifyPrimitive(issue.values[1])}`;\n return `\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const maxValue = Number(issue.maximum);\n const unit = getArmenianPlural(maxValue, sizing.unit.one, sizing.unit.many);\n return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue.origin ?? \"\u0561\u0580\u056A\u0565\u0584\")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue.maximum.toString()} ${unit}`;\n }\n return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue.origin ?? \"\u0561\u0580\u056A\u0565\u0584\")} \u056C\u056B\u0576\u056B ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const minValue = Number(issue.minimum);\n const unit = getArmenianPlural(minValue, sizing.unit.one, sizing.unit.many);\n return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue.minimum.toString()} ${unit}`;\n }\n return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue.origin)} \u056C\u056B\u0576\u056B ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B \"${_issue.prefix}\"-\u0578\u057E`;\n if (_issue.format === \"ends_with\")\n return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B \"${_issue.suffix}\"-\u0578\u057E`;\n if (_issue.format === \"includes\")\n return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${_issue.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`;\n return `\u054D\u056D\u0561\u056C ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${issue.divisor}-\u056B`;\n case \"unrecognized_keys\":\n return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${issue.keys.length > 1 ? \"\u0576\u0565\u0580\" : \"\"}. ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${withDefiniteArticle(issue.origin)}-\u0578\u0582\u0574`;\n case \"invalid_union\":\n return \"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\";\n case \"invalid_element\":\n return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${withDefiniteArticle(issue.origin)}-\u0578\u0582\u0574`;\n default:\n return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"karakter\", verb: \"memiliki\" },\n file: { unit: \"byte\", verb: \"memiliki\" },\n array: { unit: \"item\", verb: \"memiliki\" },\n set: { unit: \"item\", verb: \"memiliki\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"alamat email\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"tanggal dan waktu format ISO\",\n date: \"tanggal format ISO\",\n time: \"jam format ISO\",\n duration: \"durasi format ISO\",\n ipv4: \"alamat IPv4\",\n ipv6: \"alamat IPv6\",\n cidrv4: \"rentang alamat IPv4\",\n cidrv6: \"rentang alamat IPv6\",\n base64: \"string dengan enkode base64\",\n base64url: \"string dengan enkode base64url\",\n json_string: \"string JSON\",\n e164: \"angka E.164\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Input tidak valid: diharapkan instanceof ${issue.expected}, diterima ${received}`;\n }\n return `Input tidak valid: diharapkan ${expected}, diterima ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Input tidak valid: diharapkan ${util.stringifyPrimitive(issue.values[0])}`;\n return `Pilihan tidak valid: diharapkan salah satu dari ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Terlalu besar: diharapkan ${issue.origin ?? \"value\"} memiliki ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elemen\"}`;\n return `Terlalu besar: diharapkan ${issue.origin ?? \"value\"} menjadi ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Terlalu kecil: diharapkan ${issue.origin} memiliki ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Terlalu kecil: diharapkan ${issue.origin} menjadi ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `String tidak valid: harus dimulai dengan \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `String tidak valid: harus berakhir dengan \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `String tidak valid: harus menyertakan \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `String tidak valid: harus sesuai pola ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} tidak valid`;\n }\n case \"not_multiple_of\":\n return `Angka tidak valid: harus kelipatan dari ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Kunci tidak dikenali ${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Kunci tidak valid di ${issue.origin}`;\n case \"invalid_union\":\n return \"Input tidak valid\";\n case \"invalid_element\":\n return `Nilai tidak valid di ${issue.origin}`;\n default:\n return `Input tidak valid`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"stafi\", verb: \"a\u00F0 hafa\" },\n file: { unit: \"b\u00E6ti\", verb: \"a\u00F0 hafa\" },\n array: { unit: \"hluti\", verb: \"a\u00F0 hafa\" },\n set: { unit: \"hluti\", verb: \"a\u00F0 hafa\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"gildi\",\n email: \"netfang\",\n url: \"vefsl\u00F3\u00F0\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO dagsetning og t\u00EDmi\",\n date: \"ISO dagsetning\",\n time: \"ISO t\u00EDmi\",\n duration: \"ISO t\u00EDmalengd\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded strengur\",\n base64url: \"base64url-encoded strengur\",\n json_string: \"JSON strengur\",\n e164: \"E.164 t\u00F6lugildi\",\n jwt: \"JWT\",\n template_literal: \"gildi\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"n\u00FAmer\",\n array: \"fylki\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Rangt gildi: \u00DE\u00FA sl\u00F3st inn ${received} \u00FEar sem \u00E1 a\u00F0 vera instanceof ${issue.expected}`;\n }\n return `Rangt gildi: \u00DE\u00FA sl\u00F3st inn ${received} \u00FEar sem \u00E1 a\u00F0 vera ${expected}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Rangt gildi: gert r\u00E1\u00F0 fyrir ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u00D3gilt val: m\u00E1 vera eitt af eftirfarandi ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Of st\u00F3rt: gert er r\u00E1\u00F0 fyrir a\u00F0 ${issue.origin ?? \"gildi\"} hafi ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"hluti\"}`;\n return `Of st\u00F3rt: gert er r\u00E1\u00F0 fyrir a\u00F0 ${issue.origin ?? \"gildi\"} s\u00E9 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Of l\u00EDti\u00F0: gert er r\u00E1\u00F0 fyrir a\u00F0 ${issue.origin} hafi ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Of l\u00EDti\u00F0: gert er r\u00E1\u00F0 fyrir a\u00F0 ${issue.origin} s\u00E9 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u00D3gildur strengur: ver\u00F0ur a\u00F0 byrja \u00E1 \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u00D3gildur strengur: ver\u00F0ur a\u00F0 enda \u00E1 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u00D3gildur strengur: ver\u00F0ur a\u00F0 innihalda \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u00D3gildur strengur: ver\u00F0ur a\u00F0 fylgja mynstri ${_issue.pattern}`;\n return `Rangt ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `R\u00F6ng tala: ver\u00F0ur a\u00F0 vera margfeldi af ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u00D3\u00FEekkt ${issue.keys.length > 1 ? \"ir lyklar\" : \"ur lykill\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Rangur lykill \u00ED ${issue.origin}`;\n case \"invalid_union\":\n return \"Rangt gildi\";\n case \"invalid_element\":\n return `Rangt gildi \u00ED ${issue.origin}`;\n default:\n return `Rangt gildi`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caratteri\", verb: \"avere\" },\n file: { unit: \"byte\", verb: \"avere\" },\n array: { unit: \"elementi\", verb: \"avere\" },\n set: { unit: \"elementi\", verb: \"avere\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"indirizzo email\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"data e ora ISO\",\n date: \"data ISO\",\n time: \"ora ISO\",\n duration: \"durata ISO\",\n ipv4: \"indirizzo IPv4\",\n ipv6: \"indirizzo IPv6\",\n cidrv4: \"intervallo IPv4\",\n cidrv6: \"intervallo IPv6\",\n base64: \"stringa codificata in base64\",\n base64url: \"URL codificata in base64\",\n json_string: \"stringa JSON\",\n e164: \"numero E.164\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"numero\",\n array: \"vettore\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Input non valido: atteso instanceof ${issue.expected}, ricevuto ${received}`;\n }\n return `Input non valido: atteso ${expected}, ricevuto ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Input non valido: atteso ${util.stringifyPrimitive(issue.values[0])}`;\n return `Opzione non valida: atteso uno tra ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Troppo grande: ${issue.origin ?? \"valore\"} deve avere ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementi\"}`;\n return `Troppo grande: ${issue.origin ?? \"valore\"} deve essere ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Troppo piccolo: ${issue.origin} deve avere ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Troppo piccolo: ${issue.origin} deve essere ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Stringa non valida: deve iniziare con \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Stringa non valida: deve terminare con \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Stringa non valida: deve includere \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Numero non valido: deve essere un multiplo di ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Chiav${issue.keys.length > 1 ? \"i\" : \"e\"} non riconosciut${issue.keys.length > 1 ? \"e\" : \"a\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Chiave non valida in ${issue.origin}`;\n case \"invalid_union\":\n return \"Input non valido\";\n case \"invalid_element\":\n return `Valore non valido in ${issue.origin}`;\n default:\n return `Input non valido`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u6587\u5B57\", verb: \"\u3067\u3042\u308B\" },\n file: { unit: \"\u30D0\u30A4\u30C8\", verb: \"\u3067\u3042\u308B\" },\n array: { unit: \"\u8981\u7D20\", verb: \"\u3067\u3042\u308B\" },\n set: { unit: \"\u8981\u7D20\", verb: \"\u3067\u3042\u308B\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u5165\u529B\u5024\",\n email: \"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\",\n url: \"URL\",\n emoji: \"\u7D75\u6587\u5B57\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO\u65E5\u6642\",\n date: \"ISO\u65E5\u4ED8\",\n time: \"ISO\u6642\u523B\",\n duration: \"ISO\u671F\u9593\",\n ipv4: \"IPv4\u30A2\u30C9\u30EC\u30B9\",\n ipv6: \"IPv6\u30A2\u30C9\u30EC\u30B9\",\n cidrv4: \"IPv4\u7BC4\u56F2\",\n cidrv6: \"IPv6\u7BC4\u56F2\",\n base64: \"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217\",\n base64url: \"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217\",\n json_string: \"JSON\u6587\u5B57\u5217\",\n e164: \"E.164\u756A\u53F7\",\n jwt: \"JWT\",\n template_literal: \"\u5165\u529B\u5024\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u6570\u5024\",\n array: \"\u914D\u5217\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u7121\u52B9\u306A\u5165\u529B: instanceof ${issue.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;\n }\n return `\u7121\u52B9\u306A\u5165\u529B: ${expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u7121\u52B9\u306A\u5165\u529B: ${util.stringifyPrimitive(issue.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`;\n return `\u7121\u52B9\u306A\u9078\u629E: ${util.joinValues(issue.values, \"\u3001\")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"\u4EE5\u4E0B\u3067\u3042\u308B\" : \"\u3088\u308A\u5C0F\u3055\u3044\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue.origin ?? \"\u5024\"}\u306F${issue.maximum.toString()}${sizing.unit ?? \"\u8981\u7D20\"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue.origin ?? \"\u5024\"}\u306F${issue.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"\u4EE5\u4E0A\u3067\u3042\u308B\" : \"\u3088\u308A\u5927\u304D\u3044\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue.origin}\u306F${issue.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue.origin}\u306F${issue.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \"${_issue.prefix}\"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n if (_issue.format === \"ends_with\")\n return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \"${_issue.suffix}\"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n if (_issue.format === \"includes\")\n return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \"${_issue.includes}\"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n if (_issue.format === \"regex\")\n return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n return `\u7121\u52B9\u306A${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u7121\u52B9\u306A\u6570\u5024: ${issue.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;\n case \"unrecognized_keys\":\n return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue.keys.length > 1 ? \"\u7FA4\" : \"\"}: ${util.joinValues(issue.keys, \"\u3001\")}`;\n case \"invalid_key\":\n return `${issue.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;\n case \"invalid_union\":\n return \"\u7121\u52B9\u306A\u5165\u529B\";\n case \"invalid_element\":\n return `${issue.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;\n default:\n return `\u7121\u52B9\u306A\u5165\u529B`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD\", verb: \"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1\" },\n file: { unit: \"\u10D1\u10D0\u10D8\u10E2\u10D8\", verb: \"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1\" },\n array: { unit: \"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8\", verb: \"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1\" },\n set: { unit: \"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8\", verb: \"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0\",\n email: \"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8\",\n url: \"URL\",\n emoji: \"\u10D4\u10DB\u10DD\u10EF\u10D8\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD\",\n date: \"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8\",\n time: \"\u10D3\u10E0\u10DD\",\n duration: \"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0\",\n ipv4: \"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8\",\n ipv6: \"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8\",\n cidrv4: \"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8\",\n cidrv6: \"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8\",\n base64: \"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8\",\n base64url: \"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8\",\n json_string: \"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8\",\n e164: \"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8\",\n jwt: \"JWT\",\n template_literal: \"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8\",\n string: \"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8\",\n boolean: \"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8\",\n function: \"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0\",\n array: \"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${issue.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`;\n }\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${util.joinValues(issue.values, \"|\")}-\u10D3\u10D0\u10DC`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue.origin ?? \"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0\"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit}`;\n return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue.origin ?? \"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0\"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \"${_issue.prefix}\"-\u10D8\u10D7`;\n }\n if (_issue.format === \"ends_with\")\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \"${_issue.suffix}\"-\u10D8\u10D7`;\n if (_issue.format === \"includes\")\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 \"${_issue.includes}\"-\u10E1`;\n if (_issue.format === \"regex\")\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;\n case \"unrecognized_keys\":\n return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue.keys.length > 1 ? \"\u10D4\u10D1\u10D8\" : \"\u10D8\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue.origin}-\u10E8\u10D8`;\n case \"invalid_union\":\n return \"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0\";\n case \"invalid_element\":\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue.origin}-\u10E8\u10D8`;\n default:\n return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A\", verb: \"\u1782\u17BD\u179A\u1798\u17B6\u1793\" },\n file: { unit: \"\u1794\u17C3\", verb: \"\u1782\u17BD\u179A\u1798\u17B6\u1793\" },\n array: { unit: \"\u1792\u17B6\u178F\u17BB\", verb: \"\u1782\u17BD\u179A\u1798\u17B6\u1793\" },\n set: { unit: \"\u1792\u17B6\u178F\u17BB\", verb: \"\u1782\u17BD\u179A\u1798\u17B6\u1793\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\",\n email: \"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B\",\n url: \"URL\",\n emoji: \"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO\",\n date: \"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO\",\n time: \"\u1798\u17C9\u17C4\u1784 ISO\",\n duration: \"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO\",\n ipv4: \"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4\",\n ipv6: \"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6\",\n cidrv4: \"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4\",\n cidrv6: \"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6\",\n base64: \"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64\",\n base64url: \"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url\",\n json_string: \"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON\",\n e164: \"\u179B\u17C1\u1781 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u179B\u17C1\u1781\",\n array: \"\u17A2\u17B6\u179A\u17C1 (Array)\",\n null: \"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${issue.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`;\n }\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue.origin ?? \"\u178F\u1798\u17D2\u179B\u17C3\"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"\u1792\u17B6\u178F\u17BB\"}`;\n return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue.origin ?? \"\u178F\u1798\u17D2\u179B\u17C3\"} ${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue.origin} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue.origin} ${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`;\n return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue.origin}`;\n case \"invalid_union\":\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`;\n case \"invalid_element\":\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue.origin}`;\n default:\n return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import km from \"./km.js\";\n/** @deprecated Use `km` instead. */\nexport default function () {\n return km();\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\uBB38\uC790\", verb: \"to have\" },\n file: { unit: \"\uBC14\uC774\uD2B8\", verb: \"to have\" },\n array: { unit: \"\uAC1C\", verb: \"to have\" },\n set: { unit: \"\uAC1C\", verb: \"to have\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\uC785\uB825\",\n email: \"\uC774\uBA54\uC77C \uC8FC\uC18C\",\n url: \"URL\",\n emoji: \"\uC774\uBAA8\uC9C0\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \uB0A0\uC9DC\uC2DC\uAC04\",\n date: \"ISO \uB0A0\uC9DC\",\n time: \"ISO \uC2DC\uAC04\",\n duration: \"ISO \uAE30\uAC04\",\n ipv4: \"IPv4 \uC8FC\uC18C\",\n ipv6: \"IPv6 \uC8FC\uC18C\",\n cidrv4: \"IPv4 \uBC94\uC704\",\n cidrv6: \"IPv6 \uBC94\uC704\",\n base64: \"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4\",\n base64url: \"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4\",\n json_string: \"JSON \uBB38\uC790\uC5F4\",\n e164: \"E.164 \uBC88\uD638\",\n jwt: \"JWT\",\n template_literal: \"\uC785\uB825\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${issue.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`;\n }\n return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${util.stringifyPrimitive(issue.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`;\n return `\uC798\uBABB\uB41C \uC635\uC158: ${util.joinValues(issue.values, \"\uB610\uB294 \")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"\uC774\uD558\" : \"\uBBF8\uB9CC\";\n const suffix = adj === \"\uBBF8\uB9CC\" ? \"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4\" : \"\uC5EC\uC57C \uD569\uB2C8\uB2E4\";\n const sizing = getSizing(issue.origin);\n const unit = sizing?.unit ?? \"\uC694\uC18C\";\n if (sizing)\n return `${issue.origin ?? \"\uAC12\"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue.maximum.toString()}${unit} ${adj}${suffix}`;\n return `${issue.origin ?? \"\uAC12\"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue.maximum.toString()} ${adj}${suffix}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"\uC774\uC0C1\" : \"\uCD08\uACFC\";\n const suffix = adj === \"\uC774\uC0C1\" ? \"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4\" : \"\uC5EC\uC57C \uD569\uB2C8\uB2E4\";\n const sizing = getSizing(issue.origin);\n const unit = sizing?.unit ?? \"\uC694\uC18C\";\n if (sizing) {\n return `${issue.origin ?? \"\uAC12\"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue.minimum.toString()}${unit} ${adj}${suffix}`;\n }\n return `${issue.origin ?? \"\uAC12\"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue.minimum.toString()} ${adj}${suffix}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \"${_issue.prefix}\"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`;\n }\n if (_issue.format === \"ends_with\")\n return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \"${_issue.suffix}\"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`;\n if (_issue.format === \"includes\")\n return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \"${_issue.includes}\"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`;\n if (_issue.format === \"regex\")\n return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`;\n return `\uC798\uBABB\uB41C ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;\n case \"unrecognized_keys\":\n return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\uC798\uBABB\uB41C \uD0A4: ${issue.origin}`;\n case \"invalid_union\":\n return `\uC798\uBABB\uB41C \uC785\uB825`;\n case \"invalid_element\":\n return `\uC798\uBABB\uB41C \uAC12: ${issue.origin}`;\n default:\n return `\uC798\uBABB\uB41C \uC785\uB825`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst capitalizeFirstCharacter = (text) => {\n return text.charAt(0).toUpperCase() + text.slice(1);\n};\nfunction getUnitTypeFromNumber(number) {\n const abs = Math.abs(number);\n const last = abs % 10;\n const last2 = abs % 100;\n if ((last2 >= 11 && last2 <= 19) || last === 0)\n return \"many\";\n if (last === 1)\n return \"one\";\n return \"few\";\n}\nconst error = () => {\n const Sizable = {\n string: {\n unit: {\n one: \"simbolis\",\n few: \"simboliai\",\n many: \"simboli\u0173\",\n },\n verb: {\n smaller: {\n inclusive: \"turi b\u016Bti ne ilgesn\u0117 kaip\",\n notInclusive: \"turi b\u016Bti trumpesn\u0117 kaip\",\n },\n bigger: {\n inclusive: \"turi b\u016Bti ne trumpesn\u0117 kaip\",\n notInclusive: \"turi b\u016Bti ilgesn\u0117 kaip\",\n },\n },\n },\n file: {\n unit: {\n one: \"baitas\",\n few: \"baitai\",\n many: \"bait\u0173\",\n },\n verb: {\n smaller: {\n inclusive: \"turi b\u016Bti ne didesnis kaip\",\n notInclusive: \"turi b\u016Bti ma\u017Eesnis kaip\",\n },\n bigger: {\n inclusive: \"turi b\u016Bti ne ma\u017Eesnis kaip\",\n notInclusive: \"turi b\u016Bti didesnis kaip\",\n },\n },\n },\n array: {\n unit: {\n one: \"element\u0105\",\n few: \"elementus\",\n many: \"element\u0173\",\n },\n verb: {\n smaller: {\n inclusive: \"turi tur\u0117ti ne daugiau kaip\",\n notInclusive: \"turi tur\u0117ti ma\u017Eiau kaip\",\n },\n bigger: {\n inclusive: \"turi tur\u0117ti ne ma\u017Eiau kaip\",\n notInclusive: \"turi tur\u0117ti daugiau kaip\",\n },\n },\n },\n set: {\n unit: {\n one: \"element\u0105\",\n few: \"elementus\",\n many: \"element\u0173\",\n },\n verb: {\n smaller: {\n inclusive: \"turi tur\u0117ti ne daugiau kaip\",\n notInclusive: \"turi tur\u0117ti ma\u017Eiau kaip\",\n },\n bigger: {\n inclusive: \"turi tur\u0117ti ne ma\u017Eiau kaip\",\n notInclusive: \"turi tur\u0117ti daugiau kaip\",\n },\n },\n },\n };\n function getSizing(origin, unitType, inclusive, targetShouldBe) {\n const result = Sizable[origin] ?? null;\n if (result === null)\n return result;\n return {\n unit: result.unit[unitType],\n verb: result.verb[targetShouldBe][inclusive ? \"inclusive\" : \"notInclusive\"],\n };\n }\n const FormatDictionary = {\n regex: \"\u012Fvestis\",\n email: \"el. pa\u0161to adresas\",\n url: \"URL\",\n emoji: \"jaustukas\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO data ir laikas\",\n date: \"ISO data\",\n time: \"ISO laikas\",\n duration: \"ISO trukm\u0117\",\n ipv4: \"IPv4 adresas\",\n ipv6: \"IPv6 adresas\",\n cidrv4: \"IPv4 tinklo prefiksas (CIDR)\",\n cidrv6: \"IPv6 tinklo prefiksas (CIDR)\",\n base64: \"base64 u\u017Ekoduota eilut\u0117\",\n base64url: \"base64url u\u017Ekoduota eilut\u0117\",\n json_string: \"JSON eilut\u0117\",\n e164: \"E.164 numeris\",\n jwt: \"JWT\",\n template_literal: \"\u012Fvestis\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"skai\u010Dius\",\n bigint: \"sveikasis skai\u010Dius\",\n string: \"eilut\u0117\",\n boolean: \"login\u0117 reik\u0161m\u0117\",\n undefined: \"neapibr\u0117\u017Eta reik\u0161m\u0117\",\n function: \"funkcija\",\n symbol: \"simbolis\",\n array: \"masyvas\",\n object: \"objektas\",\n null: \"nulin\u0117 reik\u0161m\u0117\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Gautas tipas ${received}, o tik\u0117tasi - instanceof ${issue.expected}`;\n }\n return `Gautas tipas ${received}, o tik\u0117tasi - ${expected}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Privalo b\u016Bti ${util.stringifyPrimitive(issue.values[0])}`;\n return `Privalo b\u016Bti vienas i\u0161 ${util.joinValues(issue.values, \"|\")} pasirinkim\u0173`;\n case \"too_big\": {\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n const sizing = getSizing(issue.origin, getUnitTypeFromNumber(Number(issue.maximum)), issue.inclusive ?? false, \"smaller\");\n if (sizing?.verb)\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} ${sizing.verb} ${issue.maximum.toString()} ${sizing.unit ?? \"element\u0173\"}`;\n const adj = issue.inclusive ? \"ne didesnis kaip\" : \"ma\u017Eesnis kaip\";\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} turi b\u016Bti ${adj} ${issue.maximum.toString()} ${sizing?.unit}`;\n }\n case \"too_small\": {\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n const sizing = getSizing(issue.origin, getUnitTypeFromNumber(Number(issue.minimum)), issue.inclusive ?? false, \"bigger\");\n if (sizing?.verb)\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} ${sizing.verb} ${issue.minimum.toString()} ${sizing.unit ?? \"element\u0173\"}`;\n const adj = issue.inclusive ? \"ne ma\u017Eesnis kaip\" : \"didesnis kaip\";\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} turi b\u016Bti ${adj} ${issue.minimum.toString()} ${sizing?.unit}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Eilut\u0117 privalo prasid\u0117ti \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Eilut\u0117 privalo pasibaigti \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Eilut\u0117 privalo \u012Ftraukti \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Eilut\u0117 privalo atitikti ${_issue.pattern}`;\n return `Neteisingas ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Skai\u010Dius privalo b\u016Bti ${issue.divisor} kartotinis.`;\n case \"unrecognized_keys\":\n return `Neatpa\u017Eint${issue.keys.length > 1 ? \"i\" : \"as\"} rakt${issue.keys.length > 1 ? \"ai\" : \"as\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return \"Rastas klaidingas raktas\";\n case \"invalid_union\":\n return \"Klaidinga \u012Fvestis\";\n case \"invalid_element\": {\n const origin = TypeDictionary[issue.origin] ?? issue.origin;\n return `${capitalizeFirstCharacter(origin ?? issue.origin ?? \"reik\u0161m\u0117\")} turi klaiding\u0105 \u012Fvest\u012F`;\n }\n default:\n return \"Klaidinga \u012Fvestis\";\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0437\u043D\u0430\u0446\u0438\", verb: \"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442\" },\n file: { unit: \"\u0431\u0430\u0458\u0442\u0438\", verb: \"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442\" },\n array: { unit: \"\u0441\u0442\u0430\u0432\u043A\u0438\", verb: \"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442\" },\n set: { unit: \"\u0441\u0442\u0430\u0432\u043A\u0438\", verb: \"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0432\u043D\u0435\u0441\",\n email: \"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430\",\n url: \"URL\",\n emoji: \"\u0435\u043C\u043E\u045F\u0438\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435\",\n date: \"ISO \u0434\u0430\u0442\u0443\u043C\",\n time: \"ISO \u0432\u0440\u0435\u043C\u0435\",\n duration: \"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435\",\n ipv4: \"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430\",\n ipv6: \"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430\",\n cidrv4: \"IPv4 \u043E\u043F\u0441\u0435\u0433\",\n cidrv6: \"IPv6 \u043E\u043F\u0441\u0435\u0433\",\n base64: \"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430\",\n base64url: \"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430\",\n json_string: \"JSON \u043D\u0438\u0437\u0430\",\n e164: \"E.164 \u0431\u0440\u043E\u0458\",\n jwt: \"JWT\",\n template_literal: \"\u0432\u043D\u0435\u0441\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0431\u0440\u043E\u0458\",\n array: \"\u043D\u0438\u0437\u0430\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${issue.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`;\n }\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue.origin ?? \"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430\"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438\"}`;\n return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue.origin ?? \"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430\"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438\" : \"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue.origin}`;\n case \"invalid_union\":\n return \"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441\";\n case \"invalid_element\":\n return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue.origin}`;\n default:\n return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"aksara\", verb: \"mempunyai\" },\n file: { unit: \"bait\", verb: \"mempunyai\" },\n array: { unit: \"elemen\", verb: \"mempunyai\" },\n set: { unit: \"elemen\", verb: \"mempunyai\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"alamat e-mel\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"tarikh masa ISO\",\n date: \"tarikh ISO\",\n time: \"masa ISO\",\n duration: \"tempoh ISO\",\n ipv4: \"alamat IPv4\",\n ipv6: \"alamat IPv6\",\n cidrv4: \"julat IPv4\",\n cidrv6: \"julat IPv6\",\n base64: \"string dikodkan base64\",\n base64url: \"string dikodkan base64url\",\n json_string: \"string JSON\",\n e164: \"nombor E.164\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"nombor\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Input tidak sah: dijangka instanceof ${issue.expected}, diterima ${received}`;\n }\n return `Input tidak sah: dijangka ${expected}, diterima ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Input tidak sah: dijangka ${util.stringifyPrimitive(issue.values[0])}`;\n return `Pilihan tidak sah: dijangka salah satu daripada ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Terlalu besar: dijangka ${issue.origin ?? \"nilai\"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elemen\"}`;\n return `Terlalu besar: dijangka ${issue.origin ?? \"nilai\"} adalah ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Terlalu kecil: dijangka ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Terlalu kecil: dijangka ${issue.origin} adalah ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `String tidak sah: mesti bermula dengan \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `String tidak sah: mesti berakhir dengan \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `String tidak sah: mesti mengandungi \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} tidak sah`;\n }\n case \"not_multiple_of\":\n return `Nombor tidak sah: perlu gandaan ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Kunci tidak dikenali: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Kunci tidak sah dalam ${issue.origin}`;\n case \"invalid_union\":\n return \"Input tidak sah\";\n case \"invalid_element\":\n return `Nilai tidak sah dalam ${issue.origin}`;\n default:\n return `Input tidak sah`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"tekens\", verb: \"heeft\" },\n file: { unit: \"bytes\", verb: \"heeft\" },\n array: { unit: \"elementen\", verb: \"heeft\" },\n set: { unit: \"elementen\", verb: \"heeft\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"invoer\",\n email: \"emailadres\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datum en tijd\",\n date: \"ISO datum\",\n time: \"ISO tijd\",\n duration: \"ISO duur\",\n ipv4: \"IPv4-adres\",\n ipv6: \"IPv6-adres\",\n cidrv4: \"IPv4-bereik\",\n cidrv6: \"IPv6-bereik\",\n base64: \"base64-gecodeerde tekst\",\n base64url: \"base64 URL-gecodeerde tekst\",\n json_string: \"JSON string\",\n e164: \"E.164-nummer\",\n jwt: \"JWT\",\n template_literal: \"invoer\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"getal\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ongeldige invoer: verwacht instanceof ${issue.expected}, ontving ${received}`;\n }\n return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ongeldige invoer: verwacht ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ongeldige optie: verwacht \u00E9\u00E9n van ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n const longName = issue.origin === \"date\" ? \"laat\" : issue.origin === \"string\" ? \"lang\" : \"groot\";\n if (sizing)\n return `Te ${longName}: verwacht dat ${issue.origin ?? \"waarde\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementen\"} ${sizing.verb}`;\n return `Te ${longName}: verwacht dat ${issue.origin ?? \"waarde\"} ${adj}${issue.maximum.toString()} is`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n const shortName = issue.origin === \"date\" ? \"vroeg\" : issue.origin === \"string\" ? \"kort\" : \"klein\";\n if (sizing) {\n return `Te ${shortName}: verwacht dat ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} ${sizing.verb}`;\n }\n return `Te ${shortName}: verwacht dat ${issue.origin} ${adj}${issue.minimum.toString()} is`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Ongeldige tekst: moet met \"${_issue.prefix}\" beginnen`;\n }\n if (_issue.format === \"ends_with\")\n return `Ongeldige tekst: moet op \"${_issue.suffix}\" eindigen`;\n if (_issue.format === \"includes\")\n return `Ongeldige tekst: moet \"${_issue.includes}\" bevatten`;\n if (_issue.format === \"regex\")\n return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`;\n return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ongeldig getal: moet een veelvoud van ${issue.divisor} zijn`;\n case \"unrecognized_keys\":\n return `Onbekende key${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ongeldige key in ${issue.origin}`;\n case \"invalid_union\":\n return \"Ongeldige invoer\";\n case \"invalid_element\":\n return `Ongeldige waarde in ${issue.origin}`;\n default:\n return `Ongeldige invoer`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"tegn\", verb: \"\u00E5 ha\" },\n file: { unit: \"bytes\", verb: \"\u00E5 ha\" },\n array: { unit: \"elementer\", verb: \"\u00E5 inneholde\" },\n set: { unit: \"elementer\", verb: \"\u00E5 inneholde\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"e-postadresse\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO dato- og klokkeslett\",\n date: \"ISO-dato\",\n time: \"ISO-klokkeslett\",\n duration: \"ISO-varighet\",\n ipv4: \"IPv4-omr\u00E5de\",\n ipv6: \"IPv6-omr\u00E5de\",\n cidrv4: \"IPv4-spekter\",\n cidrv6: \"IPv6-spekter\",\n base64: \"base64-enkodet streng\",\n base64url: \"base64url-enkodet streng\",\n json_string: \"JSON-streng\",\n e164: \"E.164-nummer\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"tall\",\n array: \"liste\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ugyldig input: forventet instanceof ${issue.expected}, fikk ${received}`;\n }\n return `Ugyldig input: forventet ${expected}, fikk ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ugyldig verdi: forventet ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ugyldig valg: forventet en av ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `For stor(t): forventet ${issue.origin ?? \"value\"} til \u00E5 ha ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementer\"}`;\n return `For stor(t): forventet ${issue.origin ?? \"value\"} til \u00E5 ha ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `For lite(n): forventet ${issue.origin} til \u00E5 ha ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `For lite(n): forventet ${issue.origin} til \u00E5 ha ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Ugyldig streng: m\u00E5 starte med \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Ugyldig streng: m\u00E5 ende med \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Ugyldig streng: m\u00E5 inneholde \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Ugyldig streng: m\u00E5 matche m\u00F8nsteret ${_issue.pattern}`;\n return `Ugyldig ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ugyldig tall: m\u00E5 v\u00E6re et multiplum av ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Ukjente n\u00F8kler\" : \"Ukjent n\u00F8kkel\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ugyldig n\u00F8kkel i ${issue.origin}`;\n case \"invalid_union\":\n return \"Ugyldig input\";\n case \"invalid_element\":\n return `Ugyldig verdi i ${issue.origin}`;\n default:\n return `Ugyldig input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"harf\", verb: \"olmal\u0131d\u0131r\" },\n file: { unit: \"bayt\", verb: \"olmal\u0131d\u0131r\" },\n array: { unit: \"unsur\", verb: \"olmal\u0131d\u0131r\" },\n set: { unit: \"unsur\", verb: \"olmal\u0131d\u0131r\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"giren\",\n email: \"epostag\u00E2h\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO heng\u00E2m\u0131\",\n date: \"ISO tarihi\",\n time: \"ISO zaman\u0131\",\n duration: \"ISO m\u00FCddeti\",\n ipv4: \"IPv4 ni\u015F\u00E2n\u0131\",\n ipv6: \"IPv6 ni\u015F\u00E2n\u0131\",\n cidrv4: \"IPv4 menzili\",\n cidrv6: \"IPv6 menzili\",\n base64: \"base64-\u015Fifreli metin\",\n base64url: \"base64url-\u015Fifreli metin\",\n json_string: \"JSON metin\",\n e164: \"E.164 say\u0131s\u0131\",\n jwt: \"JWT\",\n template_literal: \"giren\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"numara\",\n array: \"saf\",\n null: \"gayb\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `F\u00E2sit giren: umulan instanceof ${issue.expected}, al\u0131nan ${received}`;\n }\n return `F\u00E2sit giren: umulan ${expected}, al\u0131nan ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `F\u00E2sit giren: umulan ${util.stringifyPrimitive(issue.values[0])}`;\n return `F\u00E2sit tercih: m\u00FBteberler ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Fazla b\u00FCy\u00FCk: ${issue.origin ?? \"value\"}, ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elements\"} sahip olmal\u0131yd\u0131.`;\n return `Fazla b\u00FCy\u00FCk: ${issue.origin ?? \"value\"}, ${adj}${issue.maximum.toString()} olmal\u0131yd\u0131.`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Fazla k\u00FC\u00E7\u00FCk: ${issue.origin}, ${adj}${issue.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`;\n }\n return `Fazla k\u00FC\u00E7\u00FCk: ${issue.origin}, ${adj}${issue.minimum.toString()} olmal\u0131yd\u0131.`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `F\u00E2sit metin: \"${_issue.prefix}\" ile ba\u015Flamal\u0131.`;\n if (_issue.format === \"ends_with\")\n return `F\u00E2sit metin: \"${_issue.suffix}\" ile bitmeli.`;\n if (_issue.format === \"includes\")\n return `F\u00E2sit metin: \"${_issue.includes}\" ihtiv\u00E2 etmeli.`;\n if (_issue.format === \"regex\")\n return `F\u00E2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`;\n return `F\u00E2sit ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `F\u00E2sit say\u0131: ${issue.divisor} kat\u0131 olmal\u0131yd\u0131.`;\n case \"unrecognized_keys\":\n return `Tan\u0131nmayan anahtar ${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} i\u00E7in tan\u0131nmayan anahtar var.`;\n case \"invalid_union\":\n return \"Giren tan\u0131namad\u0131.\";\n case \"invalid_element\":\n return `${issue.origin} i\u00E7in tan\u0131nmayan k\u0131ymet var.`;\n default:\n return `K\u0131ymet tan\u0131namad\u0131.`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u062A\u0648\u06A9\u064A\", verb: \"\u0648\u0644\u0631\u064A\" },\n file: { unit: \"\u0628\u0627\u06CC\u067C\u0633\", verb: \"\u0648\u0644\u0631\u064A\" },\n array: { unit: \"\u062A\u0648\u06A9\u064A\", verb: \"\u0648\u0644\u0631\u064A\" },\n set: { unit: \"\u062A\u0648\u06A9\u064A\", verb: \"\u0648\u0644\u0631\u064A\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0648\u0631\u0648\u062F\u064A\",\n email: \"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9\",\n url: \"\u06CC\u0648 \u0622\u0631 \u0627\u0644\",\n emoji: \"\u0627\u06CC\u0645\u0648\u062C\u064A\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A\",\n date: \"\u0646\u06D0\u067C\u0647\",\n time: \"\u0648\u062E\u062A\",\n duration: \"\u0645\u0648\u062F\u0647\",\n ipv4: \"\u062F IPv4 \u067E\u062A\u0647\",\n ipv6: \"\u062F IPv6 \u067E\u062A\u0647\",\n cidrv4: \"\u062F IPv4 \u0633\u0627\u062D\u0647\",\n cidrv6: \"\u062F IPv6 \u0633\u0627\u062D\u0647\",\n base64: \"base64-encoded \u0645\u062A\u0646\",\n base64url: \"base64url-encoded \u0645\u062A\u0646\",\n json_string: \"JSON \u0645\u062A\u0646\",\n e164: \"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647\",\n jwt: \"JWT\",\n template_literal: \"\u0648\u0631\u0648\u062F\u064A\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0639\u062F\u062F\",\n array: \"\u0627\u0631\u06D0\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${issue.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;\n }\n return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1) {\n return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${util.stringifyPrimitive(issue.values[0])} \u0648\u0627\u06CC`;\n }\n return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${util.joinValues(issue.values, \"|\")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue.origin ?? \"\u0627\u0631\u0632\u069A\u062A\"} \u0628\u0627\u06CC\u062F ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0639\u0646\u0635\u0631\u0648\u0646\u0647\"} \u0648\u0644\u0631\u064A`;\n }\n return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue.origin ?? \"\u0627\u0631\u0632\u069A\u062A\"} \u0628\u0627\u06CC\u062F ${adj}${issue.maximum.toString()} \u0648\u064A`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue.origin} \u0628\u0627\u06CC\u062F ${adj}${issue.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`;\n }\n return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue.origin} \u0628\u0627\u06CC\u062F ${adj}${issue.minimum.toString()} \u0648\u064A`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F \"${_issue.prefix}\" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`;\n }\n if (_issue.format === \"ends_with\") {\n return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F \"${_issue.suffix}\" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`;\n }\n if (_issue.format === \"includes\") {\n return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \"${_issue.includes}\" \u0648\u0644\u0631\u064A`;\n }\n if (_issue.format === \"regex\") {\n return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`;\n }\n return `${FormatDictionary[_issue.format] ?? issue.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`;\n }\n case \"not_multiple_of\":\n return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;\n case \"unrecognized_keys\":\n return `\u0646\u0627\u0633\u0645 ${issue.keys.length > 1 ? \"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647\" : \"\u06A9\u0644\u06CC\u0689\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue.origin} \u06A9\u06D0`;\n case \"invalid_union\":\n return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`;\n case \"invalid_element\":\n return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue.origin} \u06A9\u06D0`;\n default:\n return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"znak\u00F3w\", verb: \"mie\u0107\" },\n file: { unit: \"bajt\u00F3w\", verb: \"mie\u0107\" },\n array: { unit: \"element\u00F3w\", verb: \"mie\u0107\" },\n set: { unit: \"element\u00F3w\", verb: \"mie\u0107\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"wyra\u017Cenie\",\n email: \"adres email\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"data i godzina w formacie ISO\",\n date: \"data w formacie ISO\",\n time: \"godzina w formacie ISO\",\n duration: \"czas trwania ISO\",\n ipv4: \"adres IPv4\",\n ipv6: \"adres IPv6\",\n cidrv4: \"zakres IPv4\",\n cidrv6: \"zakres IPv6\",\n base64: \"ci\u0105g znak\u00F3w zakodowany w formacie base64\",\n base64url: \"ci\u0105g znak\u00F3w zakodowany w formacie base64url\",\n json_string: \"ci\u0105g znak\u00F3w w formacie JSON\",\n e164: \"liczba E.164\",\n jwt: \"JWT\",\n template_literal: \"wej\u015Bcie\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"liczba\",\n array: \"tablica\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${issue.expected}, otrzymano ${received}`;\n }\n return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${expected}, otrzymano ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${util.stringifyPrimitive(issue.values[0])}`;\n return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue.origin ?? \"warto\u015B\u0107\"} b\u0119dzie mie\u0107 ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"element\u00F3w\"}`;\n }\n return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue.origin ?? \"warto\u015B\u0107\"} b\u0119dzie wynosi\u0107 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue.origin ?? \"warto\u015B\u0107\"} b\u0119dzie mie\u0107 ${adj}${issue.minimum.toString()} ${sizing.unit ?? \"element\u00F3w\"}`;\n }\n return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue.origin ?? \"warto\u015B\u0107\"} b\u0119dzie wynosi\u0107 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Nieprawid\u0142owy ci\u0105g znak\u00F3w: musi zaczyna\u0107 si\u0119 od \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Nieprawid\u0142owy ci\u0105g znak\u00F3w: musi ko\u0144czy\u0107 si\u0119 na \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Nieprawid\u0142owy ci\u0105g znak\u00F3w: musi zawiera\u0107 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Nieprawid\u0142owy ci\u0105g znak\u00F3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`;\n return `Nieprawid\u0142ow(y/a/e) ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Nierozpoznane klucze${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Nieprawid\u0142owy klucz w ${issue.origin}`;\n case \"invalid_union\":\n return \"Nieprawid\u0142owe dane wej\u015Bciowe\";\n case \"invalid_element\":\n return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue.origin}`;\n default:\n return `Nieprawid\u0142owe dane wej\u015Bciowe`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caracteres\", verb: \"ter\" },\n file: { unit: \"bytes\", verb: \"ter\" },\n array: { unit: \"itens\", verb: \"ter\" },\n set: { unit: \"itens\", verb: \"ter\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"padr\u00E3o\",\n email: \"endere\u00E7o de e-mail\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"data e hora ISO\",\n date: \"data ISO\",\n time: \"hora ISO\",\n duration: \"dura\u00E7\u00E3o ISO\",\n ipv4: \"endere\u00E7o IPv4\",\n ipv6: \"endere\u00E7o IPv6\",\n cidrv4: \"faixa de IPv4\",\n cidrv6: \"faixa de IPv6\",\n base64: \"texto codificado em base64\",\n base64url: \"URL codificada em base64\",\n json_string: \"texto JSON\",\n e164: \"n\u00FAmero E.164\",\n jwt: \"JWT\",\n template_literal: \"entrada\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"n\u00FAmero\",\n null: \"nulo\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Tipo inv\u00E1lido: esperado instanceof ${issue.expected}, recebido ${received}`;\n }\n return `Tipo inv\u00E1lido: esperado ${expected}, recebido ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entrada inv\u00E1lida: esperado ${util.stringifyPrimitive(issue.values[0])}`;\n return `Op\u00E7\u00E3o inv\u00E1lida: esperada uma das ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Muito grande: esperado que ${issue.origin ?? \"valor\"} tivesse ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementos\"}`;\n return `Muito grande: esperado que ${issue.origin ?? \"valor\"} fosse ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Muito pequeno: esperado que ${issue.origin} tivesse ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Muito pequeno: esperado que ${issue.origin} fosse ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Texto inv\u00E1lido: deve come\u00E7ar com \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Texto inv\u00E1lido: deve terminar com \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Texto inv\u00E1lido: deve incluir \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Texto inv\u00E1lido: deve corresponder ao padr\u00E3o ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} inv\u00E1lido`;\n }\n case \"not_multiple_of\":\n return `N\u00FAmero inv\u00E1lido: deve ser m\u00FAltiplo de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Chave${issue.keys.length > 1 ? \"s\" : \"\"} desconhecida${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Chave inv\u00E1lida em ${issue.origin}`;\n case \"invalid_union\":\n return \"Entrada inv\u00E1lida\";\n case \"invalid_element\":\n return `Valor inv\u00E1lido em ${issue.origin}`;\n default:\n return `Campo inv\u00E1lido`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nfunction getRussianPlural(count, one, few, many) {\n const absCount = Math.abs(count);\n const lastDigit = absCount % 10;\n const lastTwoDigits = absCount % 100;\n if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {\n return many;\n }\n if (lastDigit === 1) {\n return one;\n }\n if (lastDigit >= 2 && lastDigit <= 4) {\n return few;\n }\n return many;\n}\nconst error = () => {\n const Sizable = {\n string: {\n unit: {\n one: \"\u0441\u0438\u043C\u0432\u043E\u043B\",\n few: \"\u0441\u0438\u043C\u0432\u043E\u043B\u0430\",\n many: \"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432\",\n },\n verb: \"\u0438\u043C\u0435\u0442\u044C\",\n },\n file: {\n unit: {\n one: \"\u0431\u0430\u0439\u0442\",\n few: \"\u0431\u0430\u0439\u0442\u0430\",\n many: \"\u0431\u0430\u0439\u0442\",\n },\n verb: \"\u0438\u043C\u0435\u0442\u044C\",\n },\n array: {\n unit: {\n one: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\",\n few: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\",\n many: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432\",\n },\n verb: \"\u0438\u043C\u0435\u0442\u044C\",\n },\n set: {\n unit: {\n one: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\",\n few: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\",\n many: \"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432\",\n },\n verb: \"\u0438\u043C\u0435\u0442\u044C\",\n },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0432\u0432\u043E\u0434\",\n email: \"email \u0430\u0434\u0440\u0435\u0441\",\n url: \"URL\",\n emoji: \"\u044D\u043C\u043E\u0434\u0437\u0438\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F\",\n date: \"ISO \u0434\u0430\u0442\u0430\",\n time: \"ISO \u0432\u0440\u0435\u043C\u044F\",\n duration: \"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C\",\n ipv4: \"IPv4 \u0430\u0434\u0440\u0435\u0441\",\n ipv6: \"IPv6 \u0430\u0434\u0440\u0435\u0441\",\n cidrv4: \"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\",\n cidrv6: \"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\",\n base64: \"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64\",\n base64url: \"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url\",\n json_string: \"JSON \u0441\u0442\u0440\u043E\u043A\u0430\",\n e164: \"\u043D\u043E\u043C\u0435\u0440 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0432\u0432\u043E\u0434\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0447\u0438\u0441\u043B\u043E\",\n array: \"\u043C\u0430\u0441\u0441\u0438\u0432\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${issue.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`;\n }\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const maxValue = Number(issue.maximum);\n const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);\n return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435\"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue.maximum.toString()} ${unit}`;\n }\n return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435\"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n const minValue = Number(issue.minimum);\n const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);\n return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue.minimum.toString()} ${unit}`;\n }\n return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue.keys.length > 1 ? \"\u044B\u0435\" : \"\u044B\u0439\"} \u043A\u043B\u044E\u0447${issue.keys.length > 1 ? \"\u0438\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\";\n case \"invalid_element\":\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue.origin}`;\n default:\n return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"znakov\", verb: \"imeti\" },\n file: { unit: \"bajtov\", verb: \"imeti\" },\n array: { unit: \"elementov\", verb: \"imeti\" },\n set: { unit: \"elementov\", verb: \"imeti\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"vnos\",\n email: \"e-po\u0161tni naslov\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datum in \u010Das\",\n date: \"ISO datum\",\n time: \"ISO \u010Das\",\n duration: \"ISO trajanje\",\n ipv4: \"IPv4 naslov\",\n ipv6: \"IPv6 naslov\",\n cidrv4: \"obseg IPv4\",\n cidrv6: \"obseg IPv6\",\n base64: \"base64 kodiran niz\",\n base64url: \"base64url kodiran niz\",\n json_string: \"JSON niz\",\n e164: \"E.164 \u0161tevilka\",\n jwt: \"JWT\",\n template_literal: \"vnos\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0161tevilo\",\n array: \"tabela\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Neveljaven vnos: pri\u010Dakovano instanceof ${issue.expected}, prejeto ${received}`;\n }\n return `Neveljaven vnos: pri\u010Dakovano ${expected}, prejeto ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Neveljaven vnos: pri\u010Dakovano ${util.stringifyPrimitive(issue.values[0])}`;\n return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Preveliko: pri\u010Dakovano, da bo ${issue.origin ?? \"vrednost\"} imelo ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elementov\"}`;\n return `Preveliko: pri\u010Dakovano, da bo ${issue.origin ?? \"vrednost\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Premajhno: pri\u010Dakovano, da bo ${issue.origin} imelo ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Premajhno: pri\u010Dakovano, da bo ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Neveljaven niz: mora se za\u010Deti z \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Neveljaven niz: mora se kon\u010Dati z \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Neveljaven niz: mora vsebovati \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`;\n return `Neveljaven ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Neprepoznan${issue.keys.length > 1 ? \"i klju\u010Di\" : \" klju\u010D\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Neveljaven klju\u010D v ${issue.origin}`;\n case \"invalid_union\":\n return \"Neveljaven vnos\";\n case \"invalid_element\":\n return `Neveljavna vrednost v ${issue.origin}`;\n default:\n return \"Neveljaven vnos\";\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"tecken\", verb: \"att ha\" },\n file: { unit: \"bytes\", verb: \"att ha\" },\n array: { unit: \"objekt\", verb: \"att inneh\u00E5lla\" },\n set: { unit: \"objekt\", verb: \"att inneh\u00E5lla\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"regulj\u00E4rt uttryck\",\n email: \"e-postadress\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-datum och tid\",\n date: \"ISO-datum\",\n time: \"ISO-tid\",\n duration: \"ISO-varaktighet\",\n ipv4: \"IPv4-intervall\",\n ipv6: \"IPv6-intervall\",\n cidrv4: \"IPv4-spektrum\",\n cidrv6: \"IPv6-spektrum\",\n base64: \"base64-kodad str\u00E4ng\",\n base64url: \"base64url-kodad str\u00E4ng\",\n json_string: \"JSON-str\u00E4ng\",\n e164: \"E.164-nummer\",\n jwt: \"JWT\",\n template_literal: \"mall-literal\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"antal\",\n array: \"lista\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ogiltig inmatning: f\u00F6rv\u00E4ntat instanceof ${issue.expected}, fick ${received}`;\n }\n return `Ogiltig inmatning: f\u00F6rv\u00E4ntat ${expected}, fick ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ogiltig inmatning: f\u00F6rv\u00E4ntat ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ogiltigt val: f\u00F6rv\u00E4ntade en av ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `F\u00F6r stor(t): f\u00F6rv\u00E4ntade ${issue.origin ?? \"v\u00E4rdet\"} att ha ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"element\"}`;\n }\n return `F\u00F6r stor(t): f\u00F6rv\u00E4ntat ${issue.origin ?? \"v\u00E4rdet\"} att ha ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `F\u00F6r lite(t): f\u00F6rv\u00E4ntade ${issue.origin ?? \"v\u00E4rdet\"} att ha ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `F\u00F6r lite(t): f\u00F6rv\u00E4ntade ${issue.origin ?? \"v\u00E4rdet\"} att ha ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Ogiltig str\u00E4ng: m\u00E5ste b\u00F6rja med \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Ogiltig str\u00E4ng: m\u00E5ste sluta med \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Ogiltig str\u00E4ng: m\u00E5ste inneh\u00E5lla \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Ogiltig str\u00E4ng: m\u00E5ste matcha m\u00F6nstret \"${_issue.pattern}\"`;\n return `Ogiltig(t) ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ogiltigt tal: m\u00E5ste vara en multipel av ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Ok\u00E4nda nycklar\" : \"Ok\u00E4nd nyckel\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Ogiltig nyckel i ${issue.origin ?? \"v\u00E4rdet\"}`;\n case \"invalid_union\":\n return \"Ogiltig input\";\n case \"invalid_element\":\n return `Ogiltigt v\u00E4rde i ${issue.origin ?? \"v\u00E4rdet\"}`;\n default:\n return `Ogiltig input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD\", verb: \"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD\" },\n file: { unit: \"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD\", verb: \"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD\" },\n array: { unit: \"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD\", verb: \"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD\" },\n set: { unit: \"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD\", verb: \"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1\",\n email: \"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD\",\n date: \"ISO \u0BA4\u0BC7\u0BA4\u0BBF\",\n time: \"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD\",\n duration: \"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1\",\n ipv4: \"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF\",\n ipv6: \"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF\",\n cidrv4: \"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1\",\n cidrv6: \"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1\",\n base64: \"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD\",\n base64url: \"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD\",\n json_string: \"JSON \u0B9A\u0BB0\u0BAE\u0BCD\",\n e164: \"E.164 \u0B8E\u0BA3\u0BCD\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0B8E\u0BA3\u0BCD\",\n array: \"\u0B85\u0BA3\u0BBF\",\n null: \"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${issue.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`;\n }\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${util.joinValues(issue.values, \"|\")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue.origin ?? \"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD\"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n }\n return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue.origin ?? \"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1\"} ${adj}${issue.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; //\n }\n return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue.origin} ${adj}${issue.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: \"${_issue.prefix}\" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n if (_issue.format === \"ends_with\")\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: \"${_issue.suffix}\" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n if (_issue.format === \"includes\")\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: \"${_issue.includes}\" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n if (_issue.format === \"regex\")\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;\n case \"unrecognized_keys\":\n return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue.keys.length > 1 ? \"\u0B95\u0BB3\u0BCD\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;\n case \"invalid_union\":\n return \"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1\";\n case \"invalid_element\":\n return `${issue.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;\n default:\n return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\", verb: \"\u0E04\u0E27\u0E23\u0E21\u0E35\" },\n file: { unit: \"\u0E44\u0E1A\u0E15\u0E4C\", verb: \"\u0E04\u0E27\u0E23\u0E21\u0E35\" },\n array: { unit: \"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\", verb: \"\u0E04\u0E27\u0E23\u0E21\u0E35\" },\n set: { unit: \"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\", verb: \"\u0E04\u0E27\u0E23\u0E21\u0E35\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19\",\n email: \"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25\",\n url: \"URL\",\n emoji: \"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO\",\n date: \"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO\",\n time: \"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO\",\n duration: \"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO\",\n ipv4: \"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4\",\n ipv6: \"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6\",\n cidrv4: \"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4\",\n cidrv6: \"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6\",\n base64: \"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64\",\n base64url: \"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL\",\n json_string: \"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON\",\n e164: \"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)\",\n jwt: \"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT\",\n template_literal: \"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\",\n array: \"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)\",\n null: \"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;\n }\n return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19\" : \"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue.origin ?? \"\u0E04\u0E48\u0E32\"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue.maximum.toString()} ${sizing.unit ?? \"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\"}`;\n return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue.origin ?? \"\u0E04\u0E48\u0E32\"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22\" : \"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 \"${_issue.includes}\" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`;\n if (_issue.format === \"regex\")\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`;\n return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;\n case \"unrecognized_keys\":\n return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49\";\n case \"invalid_element\":\n return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue.origin}`;\n default:\n return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"karakter\", verb: \"olmal\u0131\" },\n file: { unit: \"bayt\", verb: \"olmal\u0131\" },\n array: { unit: \"\u00F6\u011Fe\", verb: \"olmal\u0131\" },\n set: { unit: \"\u00F6\u011Fe\", verb: \"olmal\u0131\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"girdi\",\n email: \"e-posta adresi\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO tarih ve saat\",\n date: \"ISO tarih\",\n time: \"ISO saat\",\n duration: \"ISO s\u00FCre\",\n ipv4: \"IPv4 adresi\",\n ipv6: \"IPv6 adresi\",\n cidrv4: \"IPv4 aral\u0131\u011F\u0131\",\n cidrv6: \"IPv6 aral\u0131\u011F\u0131\",\n base64: \"base64 ile \u015Fifrelenmi\u015F metin\",\n base64url: \"base64url ile \u015Fifrelenmi\u015F metin\",\n json_string: \"JSON dizesi\",\n e164: \"E.164 say\u0131s\u0131\",\n jwt: \"JWT\",\n template_literal: \"\u015Eablon dizesi\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Ge\u00E7ersiz de\u011Fer: beklenen instanceof ${issue.expected}, al\u0131nan ${received}`;\n }\n return `Ge\u00E7ersiz de\u011Fer: beklenen ${expected}, al\u0131nan ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Ge\u00E7ersiz de\u011Fer: beklenen ${util.stringifyPrimitive(issue.values[0])}`;\n return `Ge\u00E7ersiz se\u00E7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u00C7ok b\u00FCy\u00FCk: beklenen ${issue.origin ?? \"de\u011Fer\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u00F6\u011Fe\"}`;\n return `\u00C7ok b\u00FCy\u00FCk: beklenen ${issue.origin ?? \"de\u011Fer\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u00C7ok k\u00FC\u00E7\u00FCk: beklenen ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n return `\u00C7ok k\u00FC\u00E7\u00FCk: beklenen ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Ge\u00E7ersiz metin: \"${_issue.prefix}\" ile ba\u015Flamal\u0131`;\n if (_issue.format === \"ends_with\")\n return `Ge\u00E7ersiz metin: \"${_issue.suffix}\" ile bitmeli`;\n if (_issue.format === \"includes\")\n return `Ge\u00E7ersiz metin: \"${_issue.includes}\" i\u00E7ermeli`;\n if (_issue.format === \"regex\")\n return `Ge\u00E7ersiz metin: ${_issue.pattern} desenine uymal\u0131`;\n return `Ge\u00E7ersiz ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Ge\u00E7ersiz say\u0131: ${issue.divisor} ile tam b\u00F6l\u00FCnebilmeli`;\n case \"unrecognized_keys\":\n return `Tan\u0131nmayan anahtar${issue.keys.length > 1 ? \"lar\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} i\u00E7inde ge\u00E7ersiz anahtar`;\n case \"invalid_union\":\n return \"Ge\u00E7ersiz de\u011Fer\";\n case \"invalid_element\":\n return `${issue.origin} i\u00E7inde ge\u00E7ersiz de\u011Fer`;\n default:\n return `Ge\u00E7ersiz de\u011Fer`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432\", verb: \"\u043C\u0430\u0442\u0438\u043C\u0435\" },\n file: { unit: \"\u0431\u0430\u0439\u0442\u0456\u0432\", verb: \"\u043C\u0430\u0442\u0438\u043C\u0435\" },\n array: { unit: \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432\", verb: \"\u043C\u0430\u0442\u0438\u043C\u0435\" },\n set: { unit: \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432\", verb: \"\u043C\u0430\u0442\u0438\u043C\u0435\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456\",\n email: \"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438\",\n url: \"URL\",\n emoji: \"\u0435\u043C\u043E\u0434\u0437\u0456\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO\",\n date: \"\u0434\u0430\u0442\u0430 ISO\",\n time: \"\u0447\u0430\u0441 ISO\",\n duration: \"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO\",\n ipv4: \"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4\",\n ipv6: \"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6\",\n cidrv4: \"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4\",\n cidrv6: \"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6\",\n base64: \"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64\",\n base64url: \"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url\",\n json_string: \"\u0440\u044F\u0434\u043E\u043A JSON\",\n e164: \"\u043D\u043E\u043C\u0435\u0440 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0447\u0438\u0441\u043B\u043E\",\n array: \"\u043C\u0430\u0441\u0438\u0432\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${issue.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`;\n }\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F\"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432\"}`;\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue.origin ?? \"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F\"} \u0431\u0443\u0434\u0435 ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue.origin} \u0431\u0443\u0434\u0435 ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`;\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue.keys.length > 1 ? \"\u0456\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue.origin}`;\n case \"invalid_union\":\n return \"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456\";\n case \"invalid_element\":\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue.origin}`;\n default:\n return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import uk from \"./uk.js\";\n/** @deprecated Use `uk` instead. */\nexport default function () {\n return uk();\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u062D\u0631\u0648\u0641\", verb: \"\u06C1\u0648\u0646\u0627\" },\n file: { unit: \"\u0628\u0627\u0626\u0679\u0633\", verb: \"\u06C1\u0648\u0646\u0627\" },\n array: { unit: \"\u0622\u0626\u0679\u0645\u0632\", verb: \"\u06C1\u0648\u0646\u0627\" },\n set: { unit: \"\u0622\u0626\u0679\u0645\u0632\", verb: \"\u06C1\u0648\u0646\u0627\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0627\u0646 \u067E\u0679\",\n email: \"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633\",\n url: \"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644\",\n emoji: \"\u0627\u06CC\u0645\u0648\u062C\u06CC\",\n uuid: \"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n uuidv4: \"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4\",\n uuidv6: \"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6\",\n nanoid: \"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n guid: \"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n cuid: \"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n cuid2: \"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2\",\n ulid: \"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC\",\n xid: \"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC\",\n ksuid: \"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC\",\n datetime: \"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645\",\n date: \"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E\",\n time: \"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A\",\n duration: \"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A\",\n ipv4: \"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633\",\n ipv6: \"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633\",\n cidrv4: \"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C\",\n cidrv6: \"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C\",\n base64: \"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF\",\n base64url: \"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF\",\n json_string: \"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF\",\n e164: \"\u0627\u06CC 164 \u0646\u0645\u0628\u0631\",\n jwt: \"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC\",\n template_literal: \"\u0627\u0646 \u067E\u0679\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u0646\u0645\u0628\u0631\",\n array: \"\u0622\u0631\u06D2\",\n null: \"\u0646\u0644\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${issue.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;\n }\n return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${util.stringifyPrimitive(issue.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;\n return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${util.joinValues(issue.values, \"|\")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue.origin ?? \"\u0648\u06CC\u0644\u06CC\u0648\"} \u06A9\u06D2 ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u0639\u0646\u0627\u0635\u0631\"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;\n return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue.origin ?? \"\u0648\u06CC\u0644\u06CC\u0648\"} \u06A9\u0627 ${adj}${issue.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue.origin} \u06A9\u06D2 ${adj}${issue.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`;\n }\n return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue.origin} \u06A9\u0627 ${adj}${issue.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \"${_issue.prefix}\" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n }\n if (_issue.format === \"ends_with\")\n return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \"${_issue.suffix}\" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n if (_issue.format === \"includes\")\n return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \"${_issue.includes}\" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n if (_issue.format === \"regex\")\n return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n return `\u063A\u0644\u0637 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;\n case \"unrecognized_keys\":\n return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue.keys.length > 1 ? \"\u0632\" : \"\"}: ${util.joinValues(issue.keys, \"\u060C \")}`;\n case \"invalid_key\":\n return `${issue.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;\n case \"invalid_union\":\n return \"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679\";\n case \"invalid_element\":\n return `${issue.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;\n default:\n return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"belgi\", verb: \"bo\u2018lishi kerak\" },\n file: { unit: \"bayt\", verb: \"bo\u2018lishi kerak\" },\n array: { unit: \"element\", verb: \"bo\u2018lishi kerak\" },\n set: { unit: \"element\", verb: \"bo\u2018lishi kerak\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"kirish\",\n email: \"elektron pochta manzili\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO sana va vaqti\",\n date: \"ISO sana\",\n time: \"ISO vaqt\",\n duration: \"ISO davomiylik\",\n ipv4: \"IPv4 manzil\",\n ipv6: \"IPv6 manzil\",\n mac: \"MAC manzil\",\n cidrv4: \"IPv4 diapazon\",\n cidrv6: \"IPv6 diapazon\",\n base64: \"base64 kodlangan satr\",\n base64url: \"base64url kodlangan satr\",\n json_string: \"JSON satr\",\n e164: \"E.164 raqam\",\n jwt: \"JWT\",\n template_literal: \"kirish\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"raqam\",\n array: \"massiv\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Noto\u2018g\u2018ri kirish: kutilgan instanceof ${issue.expected}, qabul qilingan ${received}`;\n }\n return `Noto\u2018g\u2018ri kirish: kutilgan ${expected}, qabul qilingan ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Noto\u2018g\u2018ri kirish: kutilgan ${util.stringifyPrimitive(issue.values[0])}`;\n return `Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Juda katta: kutilgan ${issue.origin ?? \"qiymat\"} ${adj}${issue.maximum.toString()} ${sizing.unit} ${sizing.verb}`;\n return `Juda katta: kutilgan ${issue.origin ?? \"qiymat\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Juda kichik: kutilgan ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} ${sizing.verb}`;\n }\n return `Juda kichik: kutilgan ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Noto\u2018g\u2018ri satr: \"${_issue.prefix}\" bilan boshlanishi kerak`;\n if (_issue.format === \"ends_with\")\n return `Noto\u2018g\u2018ri satr: \"${_issue.suffix}\" bilan tugashi kerak`;\n if (_issue.format === \"includes\")\n return `Noto\u2018g\u2018ri satr: \"${_issue.includes}\" ni o\u2018z ichiga olishi kerak`;\n if (_issue.format === \"regex\")\n return `Noto\u2018g\u2018ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`;\n return `Noto\u2018g\u2018ri ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Noto\u2018g\u2018ri raqam: ${issue.divisor} ning karralisi bo\u2018lishi kerak`;\n case \"unrecognized_keys\":\n return `Noma\u2019lum kalit${issue.keys.length > 1 ? \"lar\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} dagi kalit noto\u2018g\u2018ri`;\n case \"invalid_union\":\n return \"Noto\u2018g\u2018ri kirish\";\n case \"invalid_element\":\n return `${issue.origin} da noto\u2018g\u2018ri qiymat`;\n default:\n return `Noto\u2018g\u2018ri kirish`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"k\u00FD t\u1EF1\", verb: \"c\u00F3\" },\n file: { unit: \"byte\", verb: \"c\u00F3\" },\n array: { unit: \"ph\u1EA7n t\u1EED\", verb: \"c\u00F3\" },\n set: { unit: \"ph\u1EA7n t\u1EED\", verb: \"c\u00F3\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u0111\u1EA7u v\u00E0o\",\n email: \"\u0111\u1ECBa ch\u1EC9 email\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ng\u00E0y gi\u1EDD ISO\",\n date: \"ng\u00E0y ISO\",\n time: \"gi\u1EDD ISO\",\n duration: \"kho\u1EA3ng th\u1EDDi gian ISO\",\n ipv4: \"\u0111\u1ECBa ch\u1EC9 IPv4\",\n ipv6: \"\u0111\u1ECBa ch\u1EC9 IPv6\",\n cidrv4: \"d\u1EA3i IPv4\",\n cidrv6: \"d\u1EA3i IPv6\",\n base64: \"chu\u1ED7i m\u00E3 h\u00F3a base64\",\n base64url: \"chu\u1ED7i m\u00E3 h\u00F3a base64url\",\n json_string: \"chu\u1ED7i JSON\",\n e164: \"s\u1ED1 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u0111\u1EA7u v\u00E0o\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"s\u1ED1\",\n array: \"m\u1EA3ng\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${issue.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`;\n }\n return `\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${util.stringifyPrimitive(issue.values[0])}`;\n return `T\u00F9y ch\u1ECDn kh\u00F4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\u00E1c gi\u00E1 tr\u1ECB ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Qu\u00E1 l\u1EDBn: mong \u0111\u1EE3i ${issue.origin ?? \"gi\u00E1 tr\u1ECB\"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"ph\u1EA7n t\u1EED\"}`;\n return `Qu\u00E1 l\u1EDBn: mong \u0111\u1EE3i ${issue.origin ?? \"gi\u00E1 tr\u1ECB\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Qu\u00E1 nh\u1ECF: mong \u0111\u1EE3i ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Qu\u00E1 nh\u1ECF: mong \u0111\u1EE3i ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Chu\u1ED7i kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Chu\u1ED7i kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\u00FAc b\u1EB1ng \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Chu\u1ED7i kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Chu\u1ED7i kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} kh\u00F4ng h\u1EE3p l\u1EC7`;\n }\n case \"not_multiple_of\":\n return `S\u1ED1 kh\u00F4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\u00E0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Kh\u00F3a kh\u00F4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Kh\u00F3a kh\u00F4ng h\u1EE3p l\u1EC7 trong ${issue.origin}`;\n case \"invalid_union\":\n return \"\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7\";\n case \"invalid_element\":\n return `Gi\u00E1 tr\u1ECB kh\u00F4ng h\u1EE3p l\u1EC7 trong ${issue.origin}`;\n default:\n return `\u0110\u1EA7u v\u00E0o kh\u00F4ng h\u1EE3p l\u1EC7`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u5B57\u7B26\", verb: \"\u5305\u542B\" },\n file: { unit: \"\u5B57\u8282\", verb: \"\u5305\u542B\" },\n array: { unit: \"\u9879\", verb: \"\u5305\u542B\" },\n set: { unit: \"\u9879\", verb: \"\u5305\u542B\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u8F93\u5165\",\n email: \"\u7535\u5B50\u90AE\u4EF6\",\n url: \"URL\",\n emoji: \"\u8868\u60C5\u7B26\u53F7\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO\u65E5\u671F\u65F6\u95F4\",\n date: \"ISO\u65E5\u671F\",\n time: \"ISO\u65F6\u95F4\",\n duration: \"ISO\u65F6\u957F\",\n ipv4: \"IPv4\u5730\u5740\",\n ipv6: \"IPv6\u5730\u5740\",\n cidrv4: \"IPv4\u7F51\u6BB5\",\n cidrv6: \"IPv6\u7F51\u6BB5\",\n base64: \"base64\u7F16\u7801\u5B57\u7B26\u4E32\",\n base64url: \"base64url\u7F16\u7801\u5B57\u7B26\u4E32\",\n json_string: \"JSON\u5B57\u7B26\u4E32\",\n e164: \"E.164\u53F7\u7801\",\n jwt: \"JWT\",\n template_literal: \"\u8F93\u5165\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"\u6570\u5B57\",\n array: \"\u6570\u7EC4\",\n null: \"\u7A7A\u503C(null)\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${issue.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`;\n }\n return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue.origin ?? \"\u503C\"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u4E2A\u5143\u7D20\"}`;\n return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue.origin ?? \"\u503C\"} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue.origin} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 \"${_issue.prefix}\" \u5F00\u5934`;\n if (_issue.format === \"ends_with\")\n return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 \"${_issue.suffix}\" \u7ED3\u5C3E`;\n if (_issue.format === \"includes\")\n return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`;\n return `\u65E0\u6548${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue.divisor} \u7684\u500D\u6570`;\n case \"unrecognized_keys\":\n return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `${issue.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;\n case \"invalid_union\":\n return \"\u65E0\u6548\u8F93\u5165\";\n case \"invalid_element\":\n return `${issue.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;\n default:\n return `\u65E0\u6548\u8F93\u5165`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u5B57\u5143\", verb: \"\u64C1\u6709\" },\n file: { unit: \"\u4F4D\u5143\u7D44\", verb: \"\u64C1\u6709\" },\n array: { unit: \"\u9805\u76EE\", verb: \"\u64C1\u6709\" },\n set: { unit: \"\u9805\u76EE\", verb: \"\u64C1\u6709\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u8F38\u5165\",\n email: \"\u90F5\u4EF6\u5730\u5740\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO \u65E5\u671F\u6642\u9593\",\n date: \"ISO \u65E5\u671F\",\n time: \"ISO \u6642\u9593\",\n duration: \"ISO \u671F\u9593\",\n ipv4: \"IPv4 \u4F4D\u5740\",\n ipv6: \"IPv6 \u4F4D\u5740\",\n cidrv4: \"IPv4 \u7BC4\u570D\",\n cidrv6: \"IPv6 \u7BC4\u570D\",\n base64: \"base64 \u7DE8\u78BC\u5B57\u4E32\",\n base64url: \"base64url \u7DE8\u78BC\u5B57\u4E32\",\n json_string: \"JSON \u5B57\u4E32\",\n e164: \"E.164 \u6578\u503C\",\n jwt: \"JWT\",\n template_literal: \"\u8F38\u5165\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${issue.expected}\uFF0C\u4F46\u6536\u5230 ${received}`;\n }\n return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${expected}\uFF0C\u4F46\u6536\u5230 ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue.origin ?? \"\u503C\"} \u61C9\u70BA ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"\u500B\u5143\u7D20\"}`;\n return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue.origin ?? \"\u503C\"} \u61C9\u70BA ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue.origin} \u61C9\u70BA ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue.origin} \u61C9\u70BA ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 \"${_issue.prefix}\" \u958B\u982D`;\n }\n if (_issue.format === \"ends_with\")\n return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 \"${_issue.suffix}\" \u7D50\u5C3E`;\n if (_issue.format === \"includes\")\n return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`;\n return `\u7121\u6548\u7684 ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue.divisor} \u7684\u500D\u6578`;\n case \"unrecognized_keys\":\n return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue.keys.length > 1 ? \"\u5011\" : \"\"}\uFF1A${util.joinValues(issue.keys, \"\u3001\")}`;\n case \"invalid_key\":\n return `${issue.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;\n case \"invalid_union\":\n return \"\u7121\u6548\u7684\u8F38\u5165\u503C\";\n case \"invalid_element\":\n return `${issue.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;\n default:\n return `\u7121\u6548\u7684\u8F38\u5165\u503C`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"\u00E0mi\", verb: \"n\u00ED\" },\n file: { unit: \"bytes\", verb: \"n\u00ED\" },\n array: { unit: \"nkan\", verb: \"n\u00ED\" },\n set: { unit: \"nkan\", verb: \"n\u00ED\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"\u1EB9\u0300r\u1ECD \u00ECb\u00E1w\u1ECDl\u00E9\",\n email: \"\u00E0d\u00EDr\u1EB9\u0301s\u00EC \u00ECm\u1EB9\u0301l\u00EC\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"\u00E0k\u00F3k\u00F2 ISO\",\n date: \"\u1ECDj\u1ECD\u0301 ISO\",\n time: \"\u00E0k\u00F3k\u00F2 ISO\",\n duration: \"\u00E0k\u00F3k\u00F2 t\u00F3 p\u00E9 ISO\",\n ipv4: \"\u00E0d\u00EDr\u1EB9\u0301s\u00EC IPv4\",\n ipv6: \"\u00E0d\u00EDr\u1EB9\u0301s\u00EC IPv6\",\n cidrv4: \"\u00E0gb\u00E8gb\u00E8 IPv4\",\n cidrv6: \"\u00E0gb\u00E8gb\u00E8 IPv6\",\n base64: \"\u1ECD\u0300r\u1ECD\u0300 t\u00ED a k\u1ECD\u0301 n\u00ED base64\",\n base64url: \"\u1ECD\u0300r\u1ECD\u0300 base64url\",\n json_string: \"\u1ECD\u0300r\u1ECD\u0300 JSON\",\n e164: \"n\u1ECD\u0301mb\u00E0 E.164\",\n jwt: \"JWT\",\n template_literal: \"\u1EB9\u0300r\u1ECD \u00ECb\u00E1w\u1ECDl\u00E9\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"n\u1ECD\u0301mb\u00E0\",\n array: \"akop\u1ECD\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e: a n\u00ED l\u00E1ti fi instanceof ${issue.expected}, \u00E0m\u1ECD\u0300 a r\u00ED ${received}`;\n }\n return `\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e: a n\u00ED l\u00E1ti fi ${expected}, \u00E0m\u1ECD\u0300 a r\u00ED ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e: a n\u00ED l\u00E1ti fi ${util.stringifyPrimitive(issue.values[0])}`;\n return `\u00C0\u1E63\u00E0y\u00E0n a\u1E63\u00EC\u1E63e: yan \u1ECD\u0300kan l\u00E1ra ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `T\u00F3 p\u1ECD\u0300 j\u00F9: a n\u00ED l\u00E1ti j\u1EB9\u0301 p\u00E9 ${issue.origin ?? \"iye\"} ${sizing.verb} ${adj}${issue.maximum} ${sizing.unit}`;\n return `T\u00F3 p\u1ECD\u0300 j\u00F9: a n\u00ED l\u00E1ti j\u1EB9\u0301 ${adj}${issue.maximum}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `K\u00E9r\u00E9 ju: a n\u00ED l\u00E1ti j\u1EB9\u0301 p\u00E9 ${issue.origin} ${sizing.verb} ${adj}${issue.minimum} ${sizing.unit}`;\n return `K\u00E9r\u00E9 ju: a n\u00ED l\u00E1ti j\u1EB9\u0301 ${adj}${issue.minimum}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\u00FA \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\u00ED p\u1EB9\u0300l\u00FA \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\u00ED \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u00E1 \u00E0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`;\n return `A\u1E63\u00EC\u1E63e: ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `N\u1ECD\u0301mb\u00E0 a\u1E63\u00EC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \u00E8y\u00E0 p\u00EDp\u00EDn ti ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `B\u1ECDt\u00ECn\u00EC \u00E0\u00ECm\u1ECD\u0300: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `B\u1ECDt\u00ECn\u00EC a\u1E63\u00EC\u1E63e n\u00EDn\u00FA ${issue.origin}`;\n case \"invalid_union\":\n return \"\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e\";\n case \"invalid_element\":\n return `Iye a\u1E63\u00EC\u1E63e n\u00EDn\u00FA ${issue.origin}`;\n default:\n return \"\u00CCb\u00E1w\u1ECDl\u00E9 a\u1E63\u00EC\u1E63e\";\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n", "export { default as ar } from \"./ar.js\";\nexport { default as az } from \"./az.js\";\nexport { default as be } from \"./be.js\";\nexport { default as bg } from \"./bg.js\";\nexport { default as ca } from \"./ca.js\";\nexport { default as cs } from \"./cs.js\";\nexport { default as da } from \"./da.js\";\nexport { default as de } from \"./de.js\";\nexport { default as en } from \"./en.js\";\nexport { default as eo } from \"./eo.js\";\nexport { default as es } from \"./es.js\";\nexport { default as fa } from \"./fa.js\";\nexport { default as fi } from \"./fi.js\";\nexport { default as fr } from \"./fr.js\";\nexport { default as frCA } from \"./fr-CA.js\";\nexport { default as he } from \"./he.js\";\nexport { default as hu } from \"./hu.js\";\nexport { default as hy } from \"./hy.js\";\nexport { default as id } from \"./id.js\";\nexport { default as is } from \"./is.js\";\nexport { default as it } from \"./it.js\";\nexport { default as ja } from \"./ja.js\";\nexport { default as ka } from \"./ka.js\";\nexport { default as kh } from \"./kh.js\";\nexport { default as km } from \"./km.js\";\nexport { default as ko } from \"./ko.js\";\nexport { default as lt } from \"./lt.js\";\nexport { default as mk } from \"./mk.js\";\nexport { default as ms } from \"./ms.js\";\nexport { default as nl } from \"./nl.js\";\nexport { default as no } from \"./no.js\";\nexport { default as ota } from \"./ota.js\";\nexport { default as ps } from \"./ps.js\";\nexport { default as pl } from \"./pl.js\";\nexport { default as pt } from \"./pt.js\";\nexport { default as ru } from \"./ru.js\";\nexport { default as sl } from \"./sl.js\";\nexport { default as sv } from \"./sv.js\";\nexport { default as ta } from \"./ta.js\";\nexport { default as th } from \"./th.js\";\nexport { default as tr } from \"./tr.js\";\nexport { default as ua } from \"./ua.js\";\nexport { default as uk } from \"./uk.js\";\nexport { default as ur } from \"./ur.js\";\nexport { default as uz } from \"./uz.js\";\nexport { default as vi } from \"./vi.js\";\nexport { default as zhCN } from \"./zh-CN.js\";\nexport { default as zhTW } from \"./zh-TW.js\";\nexport { default as yo } from \"./yo.js\";\n", "var _a;\nexport const $output = Symbol(\"ZodOutput\");\nexport const $input = Symbol(\"ZodInput\");\nexport class $ZodRegistry {\n constructor() {\n this._map = new WeakMap();\n this._idmap = new Map();\n }\n add(schema, ..._meta) {\n const meta = _meta[0];\n this._map.set(schema, meta);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.set(meta.id, schema);\n }\n return this;\n }\n clear() {\n this._map = new WeakMap();\n this._idmap = new Map();\n return this;\n }\n remove(schema) {\n const meta = this._map.get(schema);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.delete(meta.id);\n }\n this._map.delete(schema);\n return this;\n }\n get(schema) {\n // return this._map.get(schema) as any;\n // inherit metadata\n const p = schema._zod.parent;\n if (p) {\n const pm = { ...(this.get(p) ?? {}) };\n delete pm.id; // do not inherit id\n const f = { ...pm, ...this._map.get(schema) };\n return Object.keys(f).length ? f : undefined;\n }\n return this._map.get(schema);\n }\n has(schema) {\n return this._map.has(schema);\n }\n}\n// registries\nexport function registry() {\n return new $ZodRegistry();\n}\n(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());\nexport const globalRegistry = globalThis.__zod_globalRegistry;\n", "import * as checks from \"./checks.js\";\nimport * as registries from \"./registries.js\";\nimport * as schemas from \"./schemas.js\";\nimport * as util from \"./util.js\";\n// @__NO_SIDE_EFFECTS__\nexport function _string(Class, params) {\n return new Class({\n type: \"string\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedString(Class, params) {\n return new Class({\n type: \"string\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _email(Class, params) {\n return new Class({\n type: \"string\",\n format: \"email\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _guid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"guid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v4\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v6\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv7(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v7\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _emoji(Class, params) {\n return new Class({\n type: \"string\",\n format: \"emoji\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nanoid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"nanoid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid2(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid2\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ulid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ulid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _xid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"xid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ksuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ksuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mac(Class, params) {\n return new Class({\n type: \"string\",\n format: \"mac\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _e164(Class, params) {\n return new Class({\n type: \"string\",\n format: \"e164\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _jwt(Class, params) {\n return new Class({\n type: \"string\",\n format: \"jwt\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport const TimePrecision = {\n Any: null,\n Minute: -1,\n Second: 0,\n Millisecond: 3,\n Microsecond: 6,\n};\n// @__NO_SIDE_EFFECTS__\nexport function _isoDateTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"datetime\",\n check: \"string_format\",\n offset: false,\n local: false,\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDate(Class, params) {\n return new Class({\n type: \"string\",\n format: \"date\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"time\",\n check: \"string_format\",\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDuration(Class, params) {\n return new Class({\n type: \"string\",\n format: \"duration\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _number(Class, params) {\n return new Class({\n type: \"number\",\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedNumber(Class, params) {\n return new Class({\n type: \"number\",\n coerce: true,\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"safeint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float64(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"int32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"uint32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _boolean(Class, params) {\n return new Class({\n type: \"boolean\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBoolean(Class, params) {\n return new Class({\n type: \"boolean\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _bigint(Class, params) {\n return new Class({\n type: \"bigint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBigint(Class, params) {\n return new Class({\n type: \"bigint\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"int64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"uint64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _symbol(Class, params) {\n return new Class({\n type: \"symbol\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _undefined(Class, params) {\n return new Class({\n type: \"undefined\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _null(Class, params) {\n return new Class({\n type: \"null\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _any(Class) {\n return new Class({\n type: \"any\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _unknown(Class) {\n return new Class({\n type: \"unknown\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _never(Class, params) {\n return new Class({\n type: \"never\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _void(Class, params) {\n return new Class({\n type: \"void\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _date(Class, params) {\n return new Class({\n type: \"date\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedDate(Class, params) {\n return new Class({\n type: \"date\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nan(Class, params) {\n return new Class({\n type: \"nan\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lt(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lte(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.lte()` instead. */\n_lte as _max, };\n// @__NO_SIDE_EFFECTS__\nexport function _gt(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _gte(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.gte()` instead. */\n_gte as _min, };\n// @__NO_SIDE_EFFECTS__\nexport function _positive(params) {\n return _gt(0, params);\n}\n// negative\n// @__NO_SIDE_EFFECTS__\nexport function _negative(params) {\n return _lt(0, params);\n}\n// nonpositive\n// @__NO_SIDE_EFFECTS__\nexport function _nonpositive(params) {\n return _lte(0, params);\n}\n// nonnegative\n// @__NO_SIDE_EFFECTS__\nexport function _nonnegative(params) {\n return _gte(0, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function _multipleOf(value, params) {\n return new checks.$ZodCheckMultipleOf({\n check: \"multiple_of\",\n ...util.normalizeParams(params),\n value,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxSize(maximum, params) {\n return new checks.$ZodCheckMaxSize({\n check: \"max_size\",\n ...util.normalizeParams(params),\n maximum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minSize(minimum, params) {\n return new checks.$ZodCheckMinSize({\n check: \"min_size\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _size(size, params) {\n return new checks.$ZodCheckSizeEquals({\n check: \"size_equals\",\n ...util.normalizeParams(params),\n size,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxLength(maximum, params) {\n const ch = new checks.$ZodCheckMaxLength({\n check: \"max_length\",\n ...util.normalizeParams(params),\n maximum,\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minLength(minimum, params) {\n return new checks.$ZodCheckMinLength({\n check: \"min_length\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _length(length, params) {\n return new checks.$ZodCheckLengthEquals({\n check: \"length_equals\",\n ...util.normalizeParams(params),\n length,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _regex(pattern, params) {\n return new checks.$ZodCheckRegex({\n check: \"string_format\",\n format: \"regex\",\n ...util.normalizeParams(params),\n pattern,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lowercase(params) {\n return new checks.$ZodCheckLowerCase({\n check: \"string_format\",\n format: \"lowercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uppercase(params) {\n return new checks.$ZodCheckUpperCase({\n check: \"string_format\",\n format: \"uppercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _includes(includes, params) {\n return new checks.$ZodCheckIncludes({\n check: \"string_format\",\n format: \"includes\",\n ...util.normalizeParams(params),\n includes,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _startsWith(prefix, params) {\n return new checks.$ZodCheckStartsWith({\n check: \"string_format\",\n format: \"starts_with\",\n ...util.normalizeParams(params),\n prefix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _endsWith(suffix, params) {\n return new checks.$ZodCheckEndsWith({\n check: \"string_format\",\n format: \"ends_with\",\n ...util.normalizeParams(params),\n suffix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _property(property, schema, params) {\n return new checks.$ZodCheckProperty({\n check: \"property\",\n property,\n schema,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mime(types, params) {\n return new checks.$ZodCheckMimeType({\n check: \"mime_type\",\n mime: types,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _overwrite(tx) {\n return new checks.$ZodCheckOverwrite({\n check: \"overwrite\",\n tx,\n });\n}\n// normalize\n// @__NO_SIDE_EFFECTS__\nexport function _normalize(form) {\n return _overwrite((input) => input.normalize(form));\n}\n// trim\n// @__NO_SIDE_EFFECTS__\nexport function _trim() {\n return _overwrite((input) => input.trim());\n}\n// toLowerCase\n// @__NO_SIDE_EFFECTS__\nexport function _toLowerCase() {\n return _overwrite((input) => input.toLowerCase());\n}\n// toUpperCase\n// @__NO_SIDE_EFFECTS__\nexport function _toUpperCase() {\n return _overwrite((input) => input.toUpperCase());\n}\n// slugify\n// @__NO_SIDE_EFFECTS__\nexport function _slugify() {\n return _overwrite((input) => util.slugify(input));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _array(Class, element, params) {\n return new Class({\n type: \"array\",\n element,\n // get element() {\n // return element;\n // },\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _union(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n ...util.normalizeParams(params),\n });\n}\nexport function _xor(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _discriminatedUnion(Class, discriminator, options, params) {\n return new Class({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _intersection(Class, left, right) {\n return new Class({\n type: \"intersection\",\n left,\n right,\n });\n}\n// export function _tuple(\n// Class: util.SchemaClass,\n// items: [],\n// params?: string | $ZodTupleParams\n// ): schemas.$ZodTuple<[], null>;\n// @__NO_SIDE_EFFECTS__\nexport function _tuple(Class, items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof schemas.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new Class({\n type: \"tuple\",\n items,\n rest,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _record(Class, keyType, valueType, params) {\n return new Class({\n type: \"record\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _map(Class, keyType, valueType, params) {\n return new Class({\n type: \"map\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _set(Class, valueType, params) {\n return new Class({\n type: \"set\",\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _enum(Class, values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n // if (Array.isArray(values)) {\n // for (const value of values) {\n // entries[value] = value;\n // }\n // } else {\n // Object.assign(entries, values);\n // }\n // const entries: util.EnumLike = {};\n // for (const val of values) {\n // entries[val] = val;\n // }\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function _nativeEnum(Class, entries, params) {\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _literal(Class, value, params) {\n return new Class({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _file(Class, params) {\n return new Class({\n type: \"file\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _transform(Class, fn) {\n return new Class({\n type: \"transform\",\n transform: fn,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _optional(Class, innerType) {\n return new Class({\n type: \"optional\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nullable(Class, innerType) {\n return new Class({\n type: \"nullable\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _default(Class, innerType, defaultValue) {\n return new Class({\n type: \"default\",\n innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nonoptional(Class, innerType, params) {\n return new Class({\n type: \"nonoptional\",\n innerType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _success(Class, innerType) {\n return new Class({\n type: \"success\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _catch(Class, innerType, catchValue) {\n return new Class({\n type: \"catch\",\n innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _pipe(Class, in_, out) {\n return new Class({\n type: \"pipe\",\n in: in_,\n out,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _readonly(Class, innerType) {\n return new Class({\n type: \"readonly\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _templateLiteral(Class, parts, params) {\n return new Class({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lazy(Class, getter) {\n return new Class({\n type: \"lazy\",\n getter,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _promise(Class, innerType) {\n return new Class({\n type: \"promise\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _custom(Class, fn, _params) {\n const norm = util.normalizeParams(_params);\n norm.abort ?? (norm.abort = true); // default to abort:false\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...norm,\n });\n return schema;\n}\n// same as _custom but defaults to abort:false\n// @__NO_SIDE_EFFECTS__\nexport function _refine(Class, fn, _params) {\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...util.normalizeParams(_params),\n });\n return schema;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _superRefine(fn) {\n const ch = _check((payload) => {\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, ch._zod.def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n _issue.input ?? (_issue.input = payload.value);\n _issue.inst ?? (_issue.inst = ch);\n _issue.continue ?? (_issue.continue = !ch._zod.def.abort); // abort is always undefined, so this is always true...\n payload.issues.push(util.issue(_issue));\n }\n };\n return fn(payload.value, payload);\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _check(fn, params) {\n const ch = new checks.$ZodCheck({\n check: \"custom\",\n ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function describe(description) {\n const ch = new checks.$ZodCheck({ check: \"describe\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, description });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function meta(metadata) {\n const ch = new checks.$ZodCheck({ check: \"meta\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, ...metadata });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringbool(Classes, _params) {\n const params = util.normalizeParams(_params);\n let truthyArray = params.truthy ?? [\"true\", \"1\", \"yes\", \"on\", \"y\", \"enabled\"];\n let falsyArray = params.falsy ?? [\"false\", \"0\", \"no\", \"off\", \"n\", \"disabled\"];\n if (params.case !== \"sensitive\") {\n truthyArray = truthyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n falsyArray = falsyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n }\n const truthySet = new Set(truthyArray);\n const falsySet = new Set(falsyArray);\n const _Codec = Classes.Codec ?? schemas.$ZodCodec;\n const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;\n const _String = Classes.String ?? schemas.$ZodString;\n const stringSchema = new _String({ type: \"string\", error: params.error });\n const booleanSchema = new _Boolean({ type: \"boolean\", error: params.error });\n const codec = new _Codec({\n type: \"pipe\",\n in: stringSchema,\n out: booleanSchema,\n transform: ((input, payload) => {\n let data = input;\n if (params.case !== \"sensitive\")\n data = data.toLowerCase();\n if (truthySet.has(data)) {\n return true;\n }\n else if (falsySet.has(data)) {\n return false;\n }\n else {\n payload.issues.push({\n code: \"invalid_value\",\n expected: \"stringbool\",\n values: [...truthySet, ...falsySet],\n input: payload.value,\n inst: codec,\n continue: false,\n });\n return {};\n }\n }),\n reverseTransform: ((input, _payload) => {\n if (input === true) {\n return truthyArray[0] || \"true\";\n }\n else {\n return falsyArray[0] || \"false\";\n }\n }),\n error: params.error,\n });\n return codec;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringFormat(Class, format, fnOrRegex, _params = {}) {\n const params = util.normalizeParams(_params);\n const def = {\n ...util.normalizeParams(_params),\n check: \"string_format\",\n type: \"string\",\n format,\n fn: typeof fnOrRegex === \"function\" ? fnOrRegex : (val) => fnOrRegex.test(val),\n ...params,\n };\n if (fnOrRegex instanceof RegExp) {\n def.pattern = fnOrRegex;\n }\n const inst = new Class(def);\n return inst;\n}\n", "import { globalRegistry } from \"./registries.js\";\n// function initializeContext(inputs: JSONSchemaGeneratorParams): ToJSONSchemaContext {\n// return {\n// processor: inputs.processor,\n// metadataRegistry: inputs.metadata ?? globalRegistry,\n// target: inputs.target ?? \"draft-2020-12\",\n// unrepresentable: inputs.unrepresentable ?? \"throw\",\n// };\n// }\nexport function initializeContext(params) {\n // Normalize target: convert old non-hyphenated versions to hyphenated versions\n let target = params?.target ?? \"draft-2020-12\";\n if (target === \"draft-4\")\n target = \"draft-04\";\n if (target === \"draft-7\")\n target = \"draft-07\";\n return {\n processors: params.processors ?? {},\n metadataRegistry: params?.metadata ?? globalRegistry,\n target,\n unrepresentable: params?.unrepresentable ?? \"throw\",\n override: params?.override ?? (() => { }),\n io: params?.io ?? \"output\",\n counter: 0,\n seen: new Map(),\n cycles: params?.cycles ?? \"ref\",\n reused: params?.reused ?? \"inline\",\n external: params?.external ?? undefined,\n };\n}\nexport function process(schema, ctx, _params = { path: [], schemaPath: [] }) {\n var _a;\n const def = schema._zod.def;\n // check for schema in seens\n const seen = ctx.seen.get(schema);\n if (seen) {\n seen.count++;\n // check if cycle\n const isCycle = _params.schemaPath.includes(schema);\n if (isCycle) {\n seen.cycle = _params.path;\n }\n return seen.schema;\n }\n // initialize\n const result = { schema: {}, count: 1, cycle: undefined, path: _params.path };\n ctx.seen.set(schema, result);\n // custom method overrides default behavior\n const overrideSchema = schema._zod.toJSONSchema?.();\n if (overrideSchema) {\n result.schema = overrideSchema;\n }\n else {\n const params = {\n ..._params,\n schemaPath: [..._params.schemaPath, schema],\n path: _params.path,\n };\n if (schema._zod.processJSONSchema) {\n schema._zod.processJSONSchema(ctx, result.schema, params);\n }\n else {\n const _json = result.schema;\n const processor = ctx.processors[def.type];\n if (!processor) {\n throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);\n }\n processor(schema, ctx, _json, params);\n }\n const parent = schema._zod.parent;\n if (parent) {\n // Also set ref if processor didn't (for inheritance)\n if (!result.ref)\n result.ref = parent;\n process(parent, ctx, params);\n ctx.seen.get(parent).isParent = true;\n }\n }\n // metadata\n const meta = ctx.metadataRegistry.get(schema);\n if (meta)\n Object.assign(result.schema, meta);\n if (ctx.io === \"input\" && isTransforming(schema)) {\n // examples/defaults only apply to output type of pipe\n delete result.schema.examples;\n delete result.schema.default;\n }\n // set prefault as default\n if (ctx.io === \"input\" && result.schema._prefault)\n (_a = result.schema).default ?? (_a.default = result.schema._prefault);\n delete result.schema._prefault;\n // pulling fresh from ctx.seen in case it was overwritten\n const _result = ctx.seen.get(schema);\n return _result.schema;\n}\nexport function extractDefs(ctx, schema\n// params: EmitParams\n) {\n // iterate over seen map;\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // Track ids to detect duplicates across different schemas\n const idToSchema = new Map();\n for (const entry of ctx.seen.entries()) {\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n const existing = idToSchema.get(id);\n if (existing && existing !== entry[0]) {\n throw new Error(`Duplicate schema id \"${id}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);\n }\n idToSchema.set(id, entry[0]);\n }\n }\n // returns a ref to the schema\n // defId will be empty if the ref points to an external schema (or #)\n const makeURI = (entry) => {\n // comparing the seen objects because sometimes\n // multiple schemas map to the same seen object.\n // e.g. lazy\n // external is configured\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (ctx.external) {\n const externalId = ctx.external.registry.get(entry[0])?.id; // ?? \"__shared\";// `__schema${ctx.counter++}`;\n // check if schema is in the external registry\n const uriGenerator = ctx.external.uri ?? ((id) => id);\n if (externalId) {\n return { ref: uriGenerator(externalId) };\n }\n // otherwise, add to __shared\n const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;\n entry[1].defId = id; // set defId so it will be reused if needed\n return { defId: id, ref: `${uriGenerator(\"__shared\")}#/${defsSegment}/${id}` };\n }\n if (entry[1] === root) {\n return { ref: \"#\" };\n }\n // self-contained schema\n const uriPrefix = `#`;\n const defUriPrefix = `${uriPrefix}/${defsSegment}/`;\n const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;\n return { defId, ref: defUriPrefix + defId };\n };\n // stored cached version in `def` property\n // remove all properties, set $ref\n const extractToDef = (entry) => {\n // if the schema is already a reference, do not extract it\n if (entry[1].schema.$ref) {\n return;\n }\n const seen = entry[1];\n const { ref, defId } = makeURI(entry);\n seen.def = { ...seen.schema };\n // defId won't be set if the schema is a reference to an external schema\n // or if the schema is the root schema\n if (defId)\n seen.defId = defId;\n // wipe away all properties except $ref\n const schema = seen.schema;\n for (const key in schema) {\n delete schema[key];\n }\n schema.$ref = ref;\n };\n // throw on cycles\n // break cycles\n if (ctx.cycles === \"throw\") {\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.cycle) {\n throw new Error(\"Cycle detected: \" +\n `#/${seen.cycle?.join(\"/\")}/` +\n '\\n\\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.');\n }\n }\n }\n // extract schemas into $defs\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n // convert root schema to # $ref\n if (schema === entry[0]) {\n extractToDef(entry); // this has special handling for the root schema\n continue;\n }\n // extract schemas that are in the external registry\n if (ctx.external) {\n const ext = ctx.external.registry.get(entry[0])?.id;\n if (schema !== entry[0] && ext) {\n extractToDef(entry);\n continue;\n }\n }\n // extract schemas with `id` meta\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n extractToDef(entry);\n continue;\n }\n // break cycles\n if (seen.cycle) {\n // any\n extractToDef(entry);\n continue;\n }\n // extract reused schemas\n if (seen.count > 1) {\n if (ctx.reused === \"ref\") {\n extractToDef(entry);\n // biome-ignore lint:\n continue;\n }\n }\n }\n}\nexport function finalize(ctx, schema) {\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // flatten refs - inherit properties from parent schemas\n const flattenRef = (zodSchema) => {\n const seen = ctx.seen.get(zodSchema);\n // already processed\n if (seen.ref === null)\n return;\n const schema = seen.def ?? seen.schema;\n const _cached = { ...schema };\n const ref = seen.ref;\n seen.ref = null; // prevent infinite recursion\n if (ref) {\n flattenRef(ref);\n const refSeen = ctx.seen.get(ref);\n const refSchema = refSeen.schema;\n // merge referenced schema into current\n if (refSchema.$ref && (ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\")) {\n // older drafts can't combine $ref with other properties\n schema.allOf = schema.allOf ?? [];\n schema.allOf.push(refSchema);\n }\n else {\n Object.assign(schema, refSchema);\n }\n // restore child's own properties (child wins)\n Object.assign(schema, _cached);\n const isParentRef = zodSchema._zod.parent === ref;\n // For parent chain, child is a refinement - remove parent-only properties\n if (isParentRef) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (!(key in _cached)) {\n delete schema[key];\n }\n }\n }\n // When ref was extracted to $defs, remove properties that match the definition\n if (refSchema.$ref && refSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n // If parent was extracted (has $ref), propagate $ref to this schema\n // This handles cases like: readonly().meta({id}).describe()\n // where processor sets ref to innerType but parent should be referenced\n const parent = zodSchema._zod.parent;\n if (parent && parent !== ref) {\n // Ensure parent is processed first so its def has inherited properties\n flattenRef(parent);\n const parentSeen = ctx.seen.get(parent);\n if (parentSeen?.schema.$ref) {\n schema.$ref = parentSeen.schema.$ref;\n // De-duplicate with parent's definition\n if (parentSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n }\n // execute overrides\n ctx.override({\n zodSchema: zodSchema,\n jsonSchema: schema,\n path: seen.path ?? [],\n });\n };\n for (const entry of [...ctx.seen.entries()].reverse()) {\n flattenRef(entry[0]);\n }\n const result = {};\n if (ctx.target === \"draft-2020-12\") {\n result.$schema = \"https://json-schema.org/draft/2020-12/schema\";\n }\n else if (ctx.target === \"draft-07\") {\n result.$schema = \"http://json-schema.org/draft-07/schema#\";\n }\n else if (ctx.target === \"draft-04\") {\n result.$schema = \"http://json-schema.org/draft-04/schema#\";\n }\n else if (ctx.target === \"openapi-3.0\") {\n // OpenAPI 3.0 schema objects should not include a $schema property\n }\n else {\n // Arbitrary string values are allowed but won't have a $schema property set\n }\n if (ctx.external?.uri) {\n const id = ctx.external.registry.get(schema)?.id;\n if (!id)\n throw new Error(\"Schema is missing an `id` property\");\n result.$id = ctx.external.uri(id);\n }\n Object.assign(result, root.def ?? root.schema);\n // build defs object\n const defs = ctx.external?.defs ?? {};\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.def && seen.defId) {\n defs[seen.defId] = seen.def;\n }\n }\n // set definitions in result\n if (ctx.external) {\n }\n else {\n if (Object.keys(defs).length > 0) {\n if (ctx.target === \"draft-2020-12\") {\n result.$defs = defs;\n }\n else {\n result.definitions = defs;\n }\n }\n }\n try {\n // this \"finalizes\" this schema and ensures all cycles are removed\n // each call to finalize() is functionally independent\n // though the seen map is shared\n const finalized = JSON.parse(JSON.stringify(result));\n Object.defineProperty(finalized, \"~standard\", {\n value: {\n ...schema[\"~standard\"],\n jsonSchema: {\n input: createStandardJSONSchemaMethod(schema, \"input\", ctx.processors),\n output: createStandardJSONSchemaMethod(schema, \"output\", ctx.processors),\n },\n },\n enumerable: false,\n writable: false,\n });\n return finalized;\n }\n catch (_err) {\n throw new Error(\"Error converting schema to JSON.\");\n }\n}\nfunction isTransforming(_schema, _ctx) {\n const ctx = _ctx ?? { seen: new Set() };\n if (ctx.seen.has(_schema))\n return false;\n ctx.seen.add(_schema);\n const def = _schema._zod.def;\n if (def.type === \"transform\")\n return true;\n if (def.type === \"array\")\n return isTransforming(def.element, ctx);\n if (def.type === \"set\")\n return isTransforming(def.valueType, ctx);\n if (def.type === \"lazy\")\n return isTransforming(def.getter(), ctx);\n if (def.type === \"promise\" ||\n def.type === \"optional\" ||\n def.type === \"nonoptional\" ||\n def.type === \"nullable\" ||\n def.type === \"readonly\" ||\n def.type === \"default\" ||\n def.type === \"prefault\") {\n return isTransforming(def.innerType, ctx);\n }\n if (def.type === \"intersection\") {\n return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);\n }\n if (def.type === \"record\" || def.type === \"map\") {\n return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);\n }\n if (def.type === \"pipe\") {\n return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);\n }\n if (def.type === \"object\") {\n for (const key in def.shape) {\n if (isTransforming(def.shape[key], ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"union\") {\n for (const option of def.options) {\n if (isTransforming(option, ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"tuple\") {\n for (const item of def.items) {\n if (isTransforming(item, ctx))\n return true;\n }\n if (def.rest && isTransforming(def.rest, ctx))\n return true;\n return false;\n }\n return false;\n}\n/**\n * Creates a toJSONSchema method for a schema instance.\n * This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.\n */\nexport const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {\n const ctx = initializeContext({ ...params, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\nexport const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {\n const { libraryOptions, target } = params ?? {};\n const ctx = initializeContext({ ...(libraryOptions ?? {}), target, io, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\n", "import { extractDefs, finalize, initializeContext, process, } from \"./to-json-schema.js\";\nimport { getEnumValues } from \"./util.js\";\nconst formatMap = {\n guid: \"uuid\",\n url: \"uri\",\n datetime: \"date-time\",\n json_string: \"json-string\",\n regex: \"\", // do not set\n};\n// ==================== SIMPLE TYPE PROCESSORS ====================\nexport const stringProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n json.type = \"string\";\n const { minimum, maximum, format, patterns, contentEncoding } = schema._zod\n .bag;\n if (typeof minimum === \"number\")\n json.minLength = minimum;\n if (typeof maximum === \"number\")\n json.maxLength = maximum;\n // custom pattern overrides format\n if (format) {\n json.format = formatMap[format] ?? format;\n if (json.format === \"\")\n delete json.format; // empty format is not valid\n // JSON Schema format: \"time\" requires a full time with offset or Z\n // z.iso.time() does not include timezone information, so format: \"time\" should never be used\n if (format === \"time\") {\n delete json.format;\n }\n }\n if (contentEncoding)\n json.contentEncoding = contentEncoding;\n if (patterns && patterns.size > 0) {\n const regexes = [...patterns];\n if (regexes.length === 1)\n json.pattern = regexes[0].source;\n else if (regexes.length > 1) {\n json.allOf = [\n ...regexes.map((regex) => ({\n ...(ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\"\n ? { type: \"string\" }\n : {}),\n pattern: regex.source,\n })),\n ];\n }\n }\n};\nexport const numberProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;\n if (typeof format === \"string\" && format.includes(\"int\"))\n json.type = \"integer\";\n else\n json.type = \"number\";\n if (typeof exclusiveMinimum === \"number\") {\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.minimum = exclusiveMinimum;\n json.exclusiveMinimum = true;\n }\n else {\n json.exclusiveMinimum = exclusiveMinimum;\n }\n }\n if (typeof minimum === \"number\") {\n json.minimum = minimum;\n if (typeof exclusiveMinimum === \"number\" && ctx.target !== \"draft-04\") {\n if (exclusiveMinimum >= minimum)\n delete json.minimum;\n else\n delete json.exclusiveMinimum;\n }\n }\n if (typeof exclusiveMaximum === \"number\") {\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.maximum = exclusiveMaximum;\n json.exclusiveMaximum = true;\n }\n else {\n json.exclusiveMaximum = exclusiveMaximum;\n }\n }\n if (typeof maximum === \"number\") {\n json.maximum = maximum;\n if (typeof exclusiveMaximum === \"number\" && ctx.target !== \"draft-04\") {\n if (exclusiveMaximum <= maximum)\n delete json.maximum;\n else\n delete json.exclusiveMaximum;\n }\n }\n if (typeof multipleOf === \"number\")\n json.multipleOf = multipleOf;\n};\nexport const booleanProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const bigintProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"BigInt cannot be represented in JSON Schema\");\n }\n};\nexport const symbolProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Symbols cannot be represented in JSON Schema\");\n }\n};\nexport const nullProcessor = (_schema, ctx, json, _params) => {\n if (ctx.target === \"openapi-3.0\") {\n json.type = \"string\";\n json.nullable = true;\n json.enum = [null];\n }\n else {\n json.type = \"null\";\n }\n};\nexport const undefinedProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Undefined cannot be represented in JSON Schema\");\n }\n};\nexport const voidProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Void cannot be represented in JSON Schema\");\n }\n};\nexport const neverProcessor = (_schema, _ctx, json, _params) => {\n json.not = {};\n};\nexport const anyProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const unknownProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const dateProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Date cannot be represented in JSON Schema\");\n }\n};\nexport const enumProcessor = (schema, _ctx, json, _params) => {\n const def = schema._zod.def;\n const values = getEnumValues(def.entries);\n // Number enums can have both string and number values\n if (values.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (values.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n json.enum = values;\n};\nexport const literalProcessor = (schema, ctx, json, _params) => {\n const def = schema._zod.def;\n const vals = [];\n for (const val of def.values) {\n if (val === undefined) {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Literal `undefined` cannot be represented in JSON Schema\");\n }\n else {\n // do not add to vals\n }\n }\n else if (typeof val === \"bigint\") {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"BigInt literals cannot be represented in JSON Schema\");\n }\n else {\n vals.push(Number(val));\n }\n }\n else {\n vals.push(val);\n }\n }\n if (vals.length === 0) {\n // do nothing (an undefined literal was stripped)\n }\n else if (vals.length === 1) {\n const val = vals[0];\n json.type = val === null ? \"null\" : typeof val;\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.enum = [val];\n }\n else {\n json.const = val;\n }\n }\n else {\n if (vals.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (vals.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n if (vals.every((v) => typeof v === \"boolean\"))\n json.type = \"boolean\";\n if (vals.every((v) => v === null))\n json.type = \"null\";\n json.enum = vals;\n }\n};\nexport const nanProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"NaN cannot be represented in JSON Schema\");\n }\n};\nexport const templateLiteralProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const pattern = schema._zod.pattern;\n if (!pattern)\n throw new Error(\"Pattern not found in template literal\");\n _json.type = \"string\";\n _json.pattern = pattern.source;\n};\nexport const fileProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const file = {\n type: \"string\",\n format: \"binary\",\n contentEncoding: \"binary\",\n };\n const { minimum, maximum, mime } = schema._zod.bag;\n if (minimum !== undefined)\n file.minLength = minimum;\n if (maximum !== undefined)\n file.maxLength = maximum;\n if (mime) {\n if (mime.length === 1) {\n file.contentMediaType = mime[0];\n Object.assign(_json, file);\n }\n else {\n Object.assign(_json, file); // shared props at root\n _json.anyOf = mime.map((m) => ({ contentMediaType: m })); // only contentMediaType differs\n }\n }\n else {\n Object.assign(_json, file);\n }\n};\nexport const successProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const customProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Custom types cannot be represented in JSON Schema\");\n }\n};\nexport const functionProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Function types cannot be represented in JSON Schema\");\n }\n};\nexport const transformProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Transforms cannot be represented in JSON Schema\");\n }\n};\nexport const mapProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Map cannot be represented in JSON Schema\");\n }\n};\nexport const setProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Set cannot be represented in JSON Schema\");\n }\n};\n// ==================== COMPOSITE TYPE PROCESSORS ====================\nexport const arrayProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n json.type = \"array\";\n json.items = process(def.element, ctx, { ...params, path: [...params.path, \"items\"] });\n};\nexport const objectProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n json.properties = {};\n const shape = def.shape;\n for (const key in shape) {\n json.properties[key] = process(shape[key], ctx, {\n ...params,\n path: [...params.path, \"properties\", key],\n });\n }\n // required keys\n const allKeys = new Set(Object.keys(shape));\n const requiredKeys = new Set([...allKeys].filter((key) => {\n const v = def.shape[key]._zod;\n if (ctx.io === \"input\") {\n return v.optin === undefined;\n }\n else {\n return v.optout === undefined;\n }\n }));\n if (requiredKeys.size > 0) {\n json.required = Array.from(requiredKeys);\n }\n // catchall\n if (def.catchall?._zod.def.type === \"never\") {\n // strict\n json.additionalProperties = false;\n }\n else if (!def.catchall) {\n // regular\n if (ctx.io === \"output\")\n json.additionalProperties = false;\n }\n else if (def.catchall) {\n json.additionalProperties = process(def.catchall, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n};\nexport const unionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n // Exclusive unions (inclusive === false) use oneOf (exactly one match) instead of anyOf (one or more matches)\n // This includes both z.xor() and discriminated unions\n const isExclusive = def.inclusive === false;\n const options = def.options.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, isExclusive ? \"oneOf\" : \"anyOf\", i],\n }));\n if (isExclusive) {\n json.oneOf = options;\n }\n else {\n json.anyOf = options;\n }\n};\nexport const intersectionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const a = process(def.left, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 0],\n });\n const b = process(def.right, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 1],\n });\n const isSimpleIntersection = (val) => \"allOf\" in val && Object.keys(val).length === 1;\n const allOf = [\n ...(isSimpleIntersection(a) ? a.allOf : [a]),\n ...(isSimpleIntersection(b) ? b.allOf : [b]),\n ];\n json.allOf = allOf;\n};\nexport const tupleProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"array\";\n const prefixPath = ctx.target === \"draft-2020-12\" ? \"prefixItems\" : \"items\";\n const restPath = ctx.target === \"draft-2020-12\" ? \"items\" : ctx.target === \"openapi-3.0\" ? \"items\" : \"additionalItems\";\n const prefixItems = def.items.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, prefixPath, i],\n }));\n const rest = def.rest\n ? process(def.rest, ctx, {\n ...params,\n path: [...params.path, restPath, ...(ctx.target === \"openapi-3.0\" ? [def.items.length] : [])],\n })\n : null;\n if (ctx.target === \"draft-2020-12\") {\n json.prefixItems = prefixItems;\n if (rest) {\n json.items = rest;\n }\n }\n else if (ctx.target === \"openapi-3.0\") {\n json.items = {\n anyOf: prefixItems,\n };\n if (rest) {\n json.items.anyOf.push(rest);\n }\n json.minItems = prefixItems.length;\n if (!rest) {\n json.maxItems = prefixItems.length;\n }\n }\n else {\n json.items = prefixItems;\n if (rest) {\n json.additionalItems = rest;\n }\n }\n // length\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n};\nexport const recordProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n // For looseRecord with regex patterns, use patternProperties\n // This correctly represents \"only validate keys matching the pattern\" semantics\n // and composes well with allOf (intersections)\n const keyType = def.keyType;\n const keyBag = keyType._zod.bag;\n const patterns = keyBag?.patterns;\n if (def.mode === \"loose\" && patterns && patterns.size > 0) {\n // Use patternProperties for looseRecord with regex patterns\n const valueSchema = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"patternProperties\", \"*\"],\n });\n json.patternProperties = {};\n for (const pattern of patterns) {\n json.patternProperties[pattern.source] = valueSchema;\n }\n }\n else {\n // Default behavior: use propertyNames + additionalProperties\n if (ctx.target === \"draft-07\" || ctx.target === \"draft-2020-12\") {\n json.propertyNames = process(def.keyType, ctx, {\n ...params,\n path: [...params.path, \"propertyNames\"],\n });\n }\n json.additionalProperties = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n // Add required for keys with discrete values (enum, literal, etc.)\n const keyValues = keyType._zod.values;\n if (keyValues) {\n const validKeyValues = [...keyValues].filter((v) => typeof v === \"string\" || typeof v === \"number\");\n if (validKeyValues.length > 0) {\n json.required = validKeyValues;\n }\n }\n};\nexport const nullableProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const inner = process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n if (ctx.target === \"openapi-3.0\") {\n seen.ref = def.innerType;\n json.nullable = true;\n }\n else {\n json.anyOf = [inner, { type: \"null\" }];\n }\n};\nexport const nonoptionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const defaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.default = JSON.parse(JSON.stringify(def.defaultValue));\n};\nexport const prefaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n if (ctx.io === \"input\")\n json._prefault = JSON.parse(JSON.stringify(def.defaultValue));\n};\nexport const catchProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n let catchValue;\n try {\n catchValue = def.catchValue(undefined);\n }\n catch {\n throw new Error(\"Dynamic catch values are not supported in JSON Schema\");\n }\n json.default = catchValue;\n};\nexport const pipeProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n const innerType = ctx.io === \"input\" ? (def.in._zod.def.type === \"transform\" ? def.out : def.in) : def.out;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\nexport const readonlyProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.readOnly = true;\n};\nexport const promiseProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const optionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const lazyProcessor = (schema, ctx, _json, params) => {\n const innerType = schema._zod.innerType;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\n// ==================== ALL PROCESSORS ====================\nexport const allProcessors = {\n string: stringProcessor,\n number: numberProcessor,\n boolean: booleanProcessor,\n bigint: bigintProcessor,\n symbol: symbolProcessor,\n null: nullProcessor,\n undefined: undefinedProcessor,\n void: voidProcessor,\n never: neverProcessor,\n any: anyProcessor,\n unknown: unknownProcessor,\n date: dateProcessor,\n enum: enumProcessor,\n literal: literalProcessor,\n nan: nanProcessor,\n template_literal: templateLiteralProcessor,\n file: fileProcessor,\n success: successProcessor,\n custom: customProcessor,\n function: functionProcessor,\n transform: transformProcessor,\n map: mapProcessor,\n set: setProcessor,\n array: arrayProcessor,\n object: objectProcessor,\n union: unionProcessor,\n intersection: intersectionProcessor,\n tuple: tupleProcessor,\n record: recordProcessor,\n nullable: nullableProcessor,\n nonoptional: nonoptionalProcessor,\n default: defaultProcessor,\n prefault: prefaultProcessor,\n catch: catchProcessor,\n pipe: pipeProcessor,\n readonly: readonlyProcessor,\n promise: promiseProcessor,\n optional: optionalProcessor,\n lazy: lazyProcessor,\n};\nexport function toJSONSchema(input, params) {\n if (\"_idmap\" in input) {\n // Registry case\n const registry = input;\n const ctx = initializeContext({ ...params, processors: allProcessors });\n const defs = {};\n // First pass: process all schemas to build the seen map\n for (const entry of registry._idmap.entries()) {\n const [_, schema] = entry;\n process(schema, ctx);\n }\n const schemas = {};\n const external = {\n registry,\n uri: params?.uri,\n defs,\n };\n // Update the context with external configuration\n ctx.external = external;\n // Second pass: emit each schema\n for (const entry of registry._idmap.entries()) {\n const [key, schema] = entry;\n extractDefs(ctx, schema);\n schemas[key] = finalize(ctx, schema);\n }\n if (Object.keys(defs).length > 0) {\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n schemas.__shared = {\n [defsSegment]: defs,\n };\n }\n return { schemas };\n }\n // Single schema case\n const ctx = initializeContext({ ...params, processors: allProcessors });\n process(input, ctx);\n extractDefs(ctx, input);\n return finalize(ctx, input);\n}\n", "import { allProcessors } from \"./json-schema-processors.js\";\nimport { extractDefs, finalize, initializeContext, process, } from \"./to-json-schema.js\";\n/**\n * Legacy class-based interface for JSON Schema generation.\n * This class wraps the new functional implementation to provide backward compatibility.\n *\n * @deprecated Use the `toJSONSchema` function instead for new code.\n *\n * @example\n * ```typescript\n * // Legacy usage (still supported)\n * const gen = new JSONSchemaGenerator({ target: \"draft-07\" });\n * gen.process(schema);\n * const result = gen.emit(schema);\n *\n * // Preferred modern usage\n * const result = toJSONSchema(schema, { target: \"draft-07\" });\n * ```\n */\nexport class JSONSchemaGenerator {\n /** @deprecated Access via ctx instead */\n get metadataRegistry() {\n return this.ctx.metadataRegistry;\n }\n /** @deprecated Access via ctx instead */\n get target() {\n return this.ctx.target;\n }\n /** @deprecated Access via ctx instead */\n get unrepresentable() {\n return this.ctx.unrepresentable;\n }\n /** @deprecated Access via ctx instead */\n get override() {\n return this.ctx.override;\n }\n /** @deprecated Access via ctx instead */\n get io() {\n return this.ctx.io;\n }\n /** @deprecated Access via ctx instead */\n get counter() {\n return this.ctx.counter;\n }\n set counter(value) {\n this.ctx.counter = value;\n }\n /** @deprecated Access via ctx instead */\n get seen() {\n return this.ctx.seen;\n }\n constructor(params) {\n // Normalize target for internal context\n let normalizedTarget = params?.target ?? \"draft-2020-12\";\n if (normalizedTarget === \"draft-4\")\n normalizedTarget = \"draft-04\";\n if (normalizedTarget === \"draft-7\")\n normalizedTarget = \"draft-07\";\n this.ctx = initializeContext({\n processors: allProcessors,\n target: normalizedTarget,\n ...(params?.metadata && { metadata: params.metadata }),\n ...(params?.unrepresentable && { unrepresentable: params.unrepresentable }),\n ...(params?.override && { override: params.override }),\n ...(params?.io && { io: params.io }),\n });\n }\n /**\n * Process a schema to prepare it for JSON Schema generation.\n * This must be called before emit().\n */\n process(schema, _params = { path: [], schemaPath: [] }) {\n return process(schema, this.ctx, _params);\n }\n /**\n * Emit the final JSON Schema after processing.\n * Must call process() first.\n */\n emit(schema, _params) {\n // Apply emit params to the context\n if (_params) {\n if (_params.cycles)\n this.ctx.cycles = _params.cycles;\n if (_params.reused)\n this.ctx.reused = _params.reused;\n if (_params.external)\n this.ctx.external = _params.external;\n }\n extractDefs(this.ctx, schema);\n const result = finalize(this.ctx, schema);\n // Strip ~standard property to match old implementation's return type\n const { \"~standard\": _, ...plainResult } = result;\n return plainResult;\n }\n}\n", "export {};\n", "export * from \"./core.js\";\nexport * from \"./parse.js\";\nexport * from \"./errors.js\";\nexport * from \"./schemas.js\";\nexport * from \"./checks.js\";\nexport * from \"./versions.js\";\nexport * as util from \"./util.js\";\nexport * as regexes from \"./regexes.js\";\nexport * as locales from \"../locales/index.js\";\nexport * from \"./registries.js\";\nexport * from \"./doc.js\";\nexport * from \"./api.js\";\nexport * from \"./to-json-schema.js\";\nexport { toJSONSchema } from \"./json-schema-processors.js\";\nexport { JSONSchemaGenerator } from \"./json-schema-generator.js\";\nexport * as JSONSchema from \"./json-schema.js\";\n", "export { _lt as lt, _lte as lte, _gt as gt, _gte as gte, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, _slugify as slugify, } from \"../core/index.js\";\n", "import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\nexport const ZodISODateTime = /*@__PURE__*/ core.$constructor(\"ZodISODateTime\", (inst, def) => {\n core.$ZodISODateTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function datetime(params) {\n return core._isoDateTime(ZodISODateTime, params);\n}\nexport const ZodISODate = /*@__PURE__*/ core.$constructor(\"ZodISODate\", (inst, def) => {\n core.$ZodISODate.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function date(params) {\n return core._isoDate(ZodISODate, params);\n}\nexport const ZodISOTime = /*@__PURE__*/ core.$constructor(\"ZodISOTime\", (inst, def) => {\n core.$ZodISOTime.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function time(params) {\n return core._isoTime(ZodISOTime, params);\n}\nexport const ZodISODuration = /*@__PURE__*/ core.$constructor(\"ZodISODuration\", (inst, def) => {\n core.$ZodISODuration.init(inst, def);\n schemas.ZodStringFormat.init(inst, def);\n});\nexport function duration(params) {\n return core._isoDuration(ZodISODuration, params);\n}\n", "import * as core from \"../core/index.js\";\nimport { $ZodError } from \"../core/index.js\";\nimport * as util from \"../core/util.js\";\nconst initializer = (inst, issues) => {\n $ZodError.init(inst, issues);\n inst.name = \"ZodError\";\n Object.defineProperties(inst, {\n format: {\n value: (mapper) => core.formatError(inst, mapper),\n // enumerable: false,\n },\n flatten: {\n value: (mapper) => core.flattenError(inst, mapper),\n // enumerable: false,\n },\n addIssue: {\n value: (issue) => {\n inst.issues.push(issue);\n inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);\n },\n // enumerable: false,\n },\n addIssues: {\n value: (issues) => {\n inst.issues.push(...issues);\n inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);\n },\n // enumerable: false,\n },\n isEmpty: {\n get() {\n return inst.issues.length === 0;\n },\n // enumerable: false,\n },\n });\n // Object.defineProperty(inst, \"isEmpty\", {\n // get() {\n // return inst.issues.length === 0;\n // },\n // });\n};\nexport const ZodError = core.$constructor(\"ZodError\", initializer);\nexport const ZodRealError = core.$constructor(\"ZodError\", initializer, {\n Parent: Error,\n});\n// /** @deprecated Use `z.core.$ZodErrorMapCtx` instead. */\n// export type ErrorMapCtx = core.$ZodErrorMapCtx;\n", "import * as core from \"../core/index.js\";\nimport { ZodRealError } from \"./errors.js\";\nexport const parse = /* @__PURE__ */ core._parse(ZodRealError);\nexport const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);\nexport const safeParse = /* @__PURE__ */ core._safeParse(ZodRealError);\nexport const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodRealError);\n// Codec functions\nexport const encode = /* @__PURE__ */ core._encode(ZodRealError);\nexport const decode = /* @__PURE__ */ core._decode(ZodRealError);\nexport const encodeAsync = /* @__PURE__ */ core._encodeAsync(ZodRealError);\nexport const decodeAsync = /* @__PURE__ */ core._decodeAsync(ZodRealError);\nexport const safeEncode = /* @__PURE__ */ core._safeEncode(ZodRealError);\nexport const safeDecode = /* @__PURE__ */ core._safeDecode(ZodRealError);\nexport const safeEncodeAsync = /* @__PURE__ */ core._safeEncodeAsync(ZodRealError);\nexport const safeDecodeAsync = /* @__PURE__ */ core._safeDecodeAsync(ZodRealError);\n", "import * as core from \"../core/index.js\";\nimport { util } from \"../core/index.js\";\nimport * as processors from \"../core/json-schema-processors.js\";\nimport { createStandardJSONSchemaMethod, createToJSONSchemaMethod } from \"../core/to-json-schema.js\";\nimport * as checks from \"./checks.js\";\nimport * as iso from \"./iso.js\";\nimport * as parse from \"./parse.js\";\nexport const ZodType = /*@__PURE__*/ core.$constructor(\"ZodType\", (inst, def) => {\n core.$ZodType.init(inst, def);\n Object.assign(inst[\"~standard\"], {\n jsonSchema: {\n input: createStandardJSONSchemaMethod(inst, \"input\"),\n output: createStandardJSONSchemaMethod(inst, \"output\"),\n },\n });\n inst.toJSONSchema = createToJSONSchemaMethod(inst, {});\n inst.def = def;\n inst.type = def.type;\n Object.defineProperty(inst, \"_def\", { value: def });\n // base methods\n inst.check = (...checks) => {\n return inst.clone(util.mergeDefs(def, {\n checks: [\n ...(def.checks ?? []),\n ...checks.map((ch) => typeof ch === \"function\" ? { _zod: { check: ch, def: { check: \"custom\" }, onattach: [] } } : ch),\n ],\n }), {\n parent: true,\n });\n };\n inst.with = inst.check;\n inst.clone = (def, params) => core.clone(inst, def, params);\n inst.brand = () => inst;\n inst.register = ((reg, meta) => {\n reg.add(inst, meta);\n return inst;\n });\n // parsing\n inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });\n inst.safeParse = (data, params) => parse.safeParse(inst, data, params);\n inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });\n inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);\n inst.spa = inst.safeParseAsync;\n // encoding/decoding\n inst.encode = (data, params) => parse.encode(inst, data, params);\n inst.decode = (data, params) => parse.decode(inst, data, params);\n inst.encodeAsync = async (data, params) => parse.encodeAsync(inst, data, params);\n inst.decodeAsync = async (data, params) => parse.decodeAsync(inst, data, params);\n inst.safeEncode = (data, params) => parse.safeEncode(inst, data, params);\n inst.safeDecode = (data, params) => parse.safeDecode(inst, data, params);\n inst.safeEncodeAsync = async (data, params) => parse.safeEncodeAsync(inst, data, params);\n inst.safeDecodeAsync = async (data, params) => parse.safeDecodeAsync(inst, data, params);\n // refinements\n inst.refine = (check, params) => inst.check(refine(check, params));\n inst.superRefine = (refinement) => inst.check(superRefine(refinement));\n inst.overwrite = (fn) => inst.check(checks.overwrite(fn));\n // wrappers\n inst.optional = () => optional(inst);\n inst.exactOptional = () => exactOptional(inst);\n inst.nullable = () => nullable(inst);\n inst.nullish = () => optional(nullable(inst));\n inst.nonoptional = (params) => nonoptional(inst, params);\n inst.array = () => array(inst);\n inst.or = (arg) => union([inst, arg]);\n inst.and = (arg) => intersection(inst, arg);\n inst.transform = (tx) => pipe(inst, transform(tx));\n inst.default = (def) => _default(inst, def);\n inst.prefault = (def) => prefault(inst, def);\n // inst.coalesce = (def, params) => coalesce(inst, def, params);\n inst.catch = (params) => _catch(inst, params);\n inst.pipe = (target) => pipe(inst, target);\n inst.readonly = () => readonly(inst);\n // meta\n inst.describe = (description) => {\n const cl = inst.clone();\n core.globalRegistry.add(cl, { description });\n return cl;\n };\n Object.defineProperty(inst, \"description\", {\n get() {\n return core.globalRegistry.get(inst)?.description;\n },\n configurable: true,\n });\n inst.meta = (...args) => {\n if (args.length === 0) {\n return core.globalRegistry.get(inst);\n }\n const cl = inst.clone();\n core.globalRegistry.add(cl, args[0]);\n return cl;\n };\n // helpers\n inst.isOptional = () => inst.safeParse(undefined).success;\n inst.isNullable = () => inst.safeParse(null).success;\n inst.apply = (fn) => fn(inst);\n return inst;\n});\n/** @internal */\nexport const _ZodString = /*@__PURE__*/ core.$constructor(\"_ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.stringProcessor(inst, ctx, json, params);\n const bag = inst._zod.bag;\n inst.format = bag.format ?? null;\n inst.minLength = bag.minimum ?? null;\n inst.maxLength = bag.maximum ?? null;\n // validations\n inst.regex = (...args) => inst.check(checks.regex(...args));\n inst.includes = (...args) => inst.check(checks.includes(...args));\n inst.startsWith = (...args) => inst.check(checks.startsWith(...args));\n inst.endsWith = (...args) => inst.check(checks.endsWith(...args));\n inst.min = (...args) => inst.check(checks.minLength(...args));\n inst.max = (...args) => inst.check(checks.maxLength(...args));\n inst.length = (...args) => inst.check(checks.length(...args));\n inst.nonempty = (...args) => inst.check(checks.minLength(1, ...args));\n inst.lowercase = (params) => inst.check(checks.lowercase(params));\n inst.uppercase = (params) => inst.check(checks.uppercase(params));\n // transforms\n inst.trim = () => inst.check(checks.trim());\n inst.normalize = (...args) => inst.check(checks.normalize(...args));\n inst.toLowerCase = () => inst.check(checks.toLowerCase());\n inst.toUpperCase = () => inst.check(checks.toUpperCase());\n inst.slugify = () => inst.check(checks.slugify());\n});\nexport const ZodString = /*@__PURE__*/ core.$constructor(\"ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n _ZodString.init(inst, def);\n inst.email = (params) => inst.check(core._email(ZodEmail, params));\n inst.url = (params) => inst.check(core._url(ZodURL, params));\n inst.jwt = (params) => inst.check(core._jwt(ZodJWT, params));\n inst.emoji = (params) => inst.check(core._emoji(ZodEmoji, params));\n inst.guid = (params) => inst.check(core._guid(ZodGUID, params));\n inst.uuid = (params) => inst.check(core._uuid(ZodUUID, params));\n inst.uuidv4 = (params) => inst.check(core._uuidv4(ZodUUID, params));\n inst.uuidv6 = (params) => inst.check(core._uuidv6(ZodUUID, params));\n inst.uuidv7 = (params) => inst.check(core._uuidv7(ZodUUID, params));\n inst.nanoid = (params) => inst.check(core._nanoid(ZodNanoID, params));\n inst.guid = (params) => inst.check(core._guid(ZodGUID, params));\n inst.cuid = (params) => inst.check(core._cuid(ZodCUID, params));\n inst.cuid2 = (params) => inst.check(core._cuid2(ZodCUID2, params));\n inst.ulid = (params) => inst.check(core._ulid(ZodULID, params));\n inst.base64 = (params) => inst.check(core._base64(ZodBase64, params));\n inst.base64url = (params) => inst.check(core._base64url(ZodBase64URL, params));\n inst.xid = (params) => inst.check(core._xid(ZodXID, params));\n inst.ksuid = (params) => inst.check(core._ksuid(ZodKSUID, params));\n inst.ipv4 = (params) => inst.check(core._ipv4(ZodIPv4, params));\n inst.ipv6 = (params) => inst.check(core._ipv6(ZodIPv6, params));\n inst.cidrv4 = (params) => inst.check(core._cidrv4(ZodCIDRv4, params));\n inst.cidrv6 = (params) => inst.check(core._cidrv6(ZodCIDRv6, params));\n inst.e164 = (params) => inst.check(core._e164(ZodE164, params));\n // iso\n inst.datetime = (params) => inst.check(iso.datetime(params));\n inst.date = (params) => inst.check(iso.date(params));\n inst.time = (params) => inst.check(iso.time(params));\n inst.duration = (params) => inst.check(iso.duration(params));\n});\nexport function string(params) {\n return core._string(ZodString, params);\n}\nexport const ZodStringFormat = /*@__PURE__*/ core.$constructor(\"ZodStringFormat\", (inst, def) => {\n core.$ZodStringFormat.init(inst, def);\n _ZodString.init(inst, def);\n});\nexport const ZodEmail = /*@__PURE__*/ core.$constructor(\"ZodEmail\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmail.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function email(params) {\n return core._email(ZodEmail, params);\n}\nexport const ZodGUID = /*@__PURE__*/ core.$constructor(\"ZodGUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodGUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function guid(params) {\n return core._guid(ZodGUID, params);\n}\nexport const ZodUUID = /*@__PURE__*/ core.$constructor(\"ZodUUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodUUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function uuid(params) {\n return core._uuid(ZodUUID, params);\n}\nexport function uuidv4(params) {\n return core._uuidv4(ZodUUID, params);\n}\n// ZodUUIDv6\nexport function uuidv6(params) {\n return core._uuidv6(ZodUUID, params);\n}\n// ZodUUIDv7\nexport function uuidv7(params) {\n return core._uuidv7(ZodUUID, params);\n}\nexport const ZodURL = /*@__PURE__*/ core.$constructor(\"ZodURL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodURL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function url(params) {\n return core._url(ZodURL, params);\n}\nexport function httpUrl(params) {\n return core._url(ZodURL, {\n protocol: /^https?$/,\n hostname: core.regexes.domain,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEmoji = /*@__PURE__*/ core.$constructor(\"ZodEmoji\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmoji.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function emoji(params) {\n return core._emoji(ZodEmoji, params);\n}\nexport const ZodNanoID = /*@__PURE__*/ core.$constructor(\"ZodNanoID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodNanoID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function nanoid(params) {\n return core._nanoid(ZodNanoID, params);\n}\nexport const ZodCUID = /*@__PURE__*/ core.$constructor(\"ZodCUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cuid(params) {\n return core._cuid(ZodCUID, params);\n}\nexport const ZodCUID2 = /*@__PURE__*/ core.$constructor(\"ZodCUID2\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID2.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cuid2(params) {\n return core._cuid2(ZodCUID2, params);\n}\nexport const ZodULID = /*@__PURE__*/ core.$constructor(\"ZodULID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodULID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ulid(params) {\n return core._ulid(ZodULID, params);\n}\nexport const ZodXID = /*@__PURE__*/ core.$constructor(\"ZodXID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodXID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function xid(params) {\n return core._xid(ZodXID, params);\n}\nexport const ZodKSUID = /*@__PURE__*/ core.$constructor(\"ZodKSUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodKSUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ksuid(params) {\n return core._ksuid(ZodKSUID, params);\n}\nexport const ZodIPv4 = /*@__PURE__*/ core.$constructor(\"ZodIPv4\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv4(params) {\n return core._ipv4(ZodIPv4, params);\n}\nexport const ZodMAC = /*@__PURE__*/ core.$constructor(\"ZodMAC\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodMAC.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function mac(params) {\n return core._mac(ZodMAC, params);\n}\nexport const ZodIPv6 = /*@__PURE__*/ core.$constructor(\"ZodIPv6\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv6(params) {\n return core._ipv6(ZodIPv6, params);\n}\nexport const ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv4\", (inst, def) => {\n core.$ZodCIDRv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv4(params) {\n return core._cidrv4(ZodCIDRv4, params);\n}\nexport const ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv6\", (inst, def) => {\n core.$ZodCIDRv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv6(params) {\n return core._cidrv6(ZodCIDRv6, params);\n}\nexport const ZodBase64 = /*@__PURE__*/ core.$constructor(\"ZodBase64\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64(params) {\n return core._base64(ZodBase64, params);\n}\nexport const ZodBase64URL = /*@__PURE__*/ core.$constructor(\"ZodBase64URL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64URL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64url(params) {\n return core._base64url(ZodBase64URL, params);\n}\nexport const ZodE164 = /*@__PURE__*/ core.$constructor(\"ZodE164\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodE164.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function e164(params) {\n return core._e164(ZodE164, params);\n}\nexport const ZodJWT = /*@__PURE__*/ core.$constructor(\"ZodJWT\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodJWT.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function jwt(params) {\n return core._jwt(ZodJWT, params);\n}\nexport const ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"ZodCustomStringFormat\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCustomStringFormat.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function stringFormat(format, fnOrRegex, _params = {}) {\n return core._stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);\n}\nexport function hostname(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hostname\", core.regexes.hostname, _params);\n}\nexport function hex(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hex\", core.regexes.hex, _params);\n}\nexport function hash(alg, params) {\n const enc = params?.enc ?? \"hex\";\n const format = `${alg}_${enc}`;\n const regex = core.regexes[format];\n if (!regex)\n throw new Error(`Unrecognized hash format: ${format}`);\n return core._stringFormat(ZodCustomStringFormat, format, regex, params);\n}\nexport const ZodNumber = /*@__PURE__*/ core.$constructor(\"ZodNumber\", (inst, def) => {\n core.$ZodNumber.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.numberProcessor(inst, ctx, json, params);\n inst.gt = (value, params) => inst.check(checks.gt(value, params));\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.lt = (value, params) => inst.check(checks.lt(value, params));\n inst.lte = (value, params) => inst.check(checks.lte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n inst.int = (params) => inst.check(int(params));\n inst.safe = (params) => inst.check(int(params));\n inst.positive = (params) => inst.check(checks.gt(0, params));\n inst.nonnegative = (params) => inst.check(checks.gte(0, params));\n inst.negative = (params) => inst.check(checks.lt(0, params));\n inst.nonpositive = (params) => inst.check(checks.lte(0, params));\n inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));\n inst.step = (value, params) => inst.check(checks.multipleOf(value, params));\n // inst.finite = (params) => inst.check(core.finite(params));\n inst.finite = () => inst;\n const bag = inst._zod.bag;\n inst.minValue =\n Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;\n inst.maxValue =\n Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;\n inst.isInt = (bag.format ?? \"\").includes(\"int\") || Number.isSafeInteger(bag.multipleOf ?? 0.5);\n inst.isFinite = true;\n inst.format = bag.format ?? null;\n});\nexport function number(params) {\n return core._number(ZodNumber, params);\n}\nexport const ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"ZodNumberFormat\", (inst, def) => {\n core.$ZodNumberFormat.init(inst, def);\n ZodNumber.init(inst, def);\n});\nexport function int(params) {\n return core._int(ZodNumberFormat, params);\n}\nexport function float32(params) {\n return core._float32(ZodNumberFormat, params);\n}\nexport function float64(params) {\n return core._float64(ZodNumberFormat, params);\n}\nexport function int32(params) {\n return core._int32(ZodNumberFormat, params);\n}\nexport function uint32(params) {\n return core._uint32(ZodNumberFormat, params);\n}\nexport const ZodBoolean = /*@__PURE__*/ core.$constructor(\"ZodBoolean\", (inst, def) => {\n core.$ZodBoolean.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.booleanProcessor(inst, ctx, json, params);\n});\nexport function boolean(params) {\n return core._boolean(ZodBoolean, params);\n}\nexport const ZodBigInt = /*@__PURE__*/ core.$constructor(\"ZodBigInt\", (inst, def) => {\n core.$ZodBigInt.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.bigintProcessor(inst, ctx, json, params);\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.gt = (value, params) => inst.check(checks.gt(value, params));\n inst.gte = (value, params) => inst.check(checks.gte(value, params));\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.lt = (value, params) => inst.check(checks.lt(value, params));\n inst.lte = (value, params) => inst.check(checks.lte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n inst.positive = (params) => inst.check(checks.gt(BigInt(0), params));\n inst.negative = (params) => inst.check(checks.lt(BigInt(0), params));\n inst.nonpositive = (params) => inst.check(checks.lte(BigInt(0), params));\n inst.nonnegative = (params) => inst.check(checks.gte(BigInt(0), params));\n inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));\n const bag = inst._zod.bag;\n inst.minValue = bag.minimum ?? null;\n inst.maxValue = bag.maximum ?? null;\n inst.format = bag.format ?? null;\n});\nexport function bigint(params) {\n return core._bigint(ZodBigInt, params);\n}\nexport const ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"ZodBigIntFormat\", (inst, def) => {\n core.$ZodBigIntFormat.init(inst, def);\n ZodBigInt.init(inst, def);\n});\n// int64\nexport function int64(params) {\n return core._int64(ZodBigIntFormat, params);\n}\n// uint64\nexport function uint64(params) {\n return core._uint64(ZodBigIntFormat, params);\n}\nexport const ZodSymbol = /*@__PURE__*/ core.$constructor(\"ZodSymbol\", (inst, def) => {\n core.$ZodSymbol.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.symbolProcessor(inst, ctx, json, params);\n});\nexport function symbol(params) {\n return core._symbol(ZodSymbol, params);\n}\nexport const ZodUndefined = /*@__PURE__*/ core.$constructor(\"ZodUndefined\", (inst, def) => {\n core.$ZodUndefined.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.undefinedProcessor(inst, ctx, json, params);\n});\nfunction _undefined(params) {\n return core._undefined(ZodUndefined, params);\n}\nexport { _undefined as undefined };\nexport const ZodNull = /*@__PURE__*/ core.$constructor(\"ZodNull\", (inst, def) => {\n core.$ZodNull.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullProcessor(inst, ctx, json, params);\n});\nfunction _null(params) {\n return core._null(ZodNull, params);\n}\nexport { _null as null };\nexport const ZodAny = /*@__PURE__*/ core.$constructor(\"ZodAny\", (inst, def) => {\n core.$ZodAny.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.anyProcessor(inst, ctx, json, params);\n});\nexport function any() {\n return core._any(ZodAny);\n}\nexport const ZodUnknown = /*@__PURE__*/ core.$constructor(\"ZodUnknown\", (inst, def) => {\n core.$ZodUnknown.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unknownProcessor(inst, ctx, json, params);\n});\nexport function unknown() {\n return core._unknown(ZodUnknown);\n}\nexport const ZodNever = /*@__PURE__*/ core.$constructor(\"ZodNever\", (inst, def) => {\n core.$ZodNever.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.neverProcessor(inst, ctx, json, params);\n});\nexport function never(params) {\n return core._never(ZodNever, params);\n}\nexport const ZodVoid = /*@__PURE__*/ core.$constructor(\"ZodVoid\", (inst, def) => {\n core.$ZodVoid.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.voidProcessor(inst, ctx, json, params);\n});\nfunction _void(params) {\n return core._void(ZodVoid, params);\n}\nexport { _void as void };\nexport const ZodDate = /*@__PURE__*/ core.$constructor(\"ZodDate\", (inst, def) => {\n core.$ZodDate.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.dateProcessor(inst, ctx, json, params);\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n const c = inst._zod.bag;\n inst.minDate = c.minimum ? new Date(c.minimum) : null;\n inst.maxDate = c.maximum ? new Date(c.maximum) : null;\n});\nexport function date(params) {\n return core._date(ZodDate, params);\n}\nexport const ZodArray = /*@__PURE__*/ core.$constructor(\"ZodArray\", (inst, def) => {\n core.$ZodArray.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.arrayProcessor(inst, ctx, json, params);\n inst.element = def.element;\n inst.min = (minLength, params) => inst.check(checks.minLength(minLength, params));\n inst.nonempty = (params) => inst.check(checks.minLength(1, params));\n inst.max = (maxLength, params) => inst.check(checks.maxLength(maxLength, params));\n inst.length = (len, params) => inst.check(checks.length(len, params));\n inst.unwrap = () => inst.element;\n});\nexport function array(element, params) {\n return core._array(ZodArray, element, params);\n}\n// .keyof\nexport function keyof(schema) {\n const shape = schema._zod.def.shape;\n return _enum(Object.keys(shape));\n}\nexport const ZodObject = /*@__PURE__*/ core.$constructor(\"ZodObject\", (inst, def) => {\n core.$ZodObjectJIT.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.objectProcessor(inst, ctx, json, params);\n util.defineLazy(inst, \"shape\", () => {\n return def.shape;\n });\n inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));\n inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall: catchall });\n inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });\n inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });\n inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });\n inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });\n inst.extend = (incoming) => {\n return util.extend(inst, incoming);\n };\n inst.safeExtend = (incoming) => {\n return util.safeExtend(inst, incoming);\n };\n inst.merge = (other) => util.merge(inst, other);\n inst.pick = (mask) => util.pick(inst, mask);\n inst.omit = (mask) => util.omit(inst, mask);\n inst.partial = (...args) => util.partial(ZodOptional, inst, args[0]);\n inst.required = (...args) => util.required(ZodNonOptional, inst, args[0]);\n});\nexport function object(shape, params) {\n const def = {\n type: \"object\",\n shape: shape ?? {},\n ...util.normalizeParams(params),\n };\n return new ZodObject(def);\n}\n// strictObject\nexport function strictObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: never(),\n ...util.normalizeParams(params),\n });\n}\n// looseObject\nexport function looseObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: unknown(),\n ...util.normalizeParams(params),\n });\n}\nexport const ZodUnion = /*@__PURE__*/ core.$constructor(\"ZodUnion\", (inst, def) => {\n core.$ZodUnion.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\nexport function union(options, params) {\n return new ZodUnion({\n type: \"union\",\n options: options,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodXor = /*@__PURE__*/ core.$constructor(\"ZodXor\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodXor.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\n/** Creates an exclusive union (XOR) where exactly one option must match.\n * Unlike regular unions that succeed when any option matches, xor fails if\n * zero or more than one option matches the input. */\nexport function xor(options, params) {\n return new ZodXor({\n type: \"union\",\n options: options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodDiscriminatedUnion = /*@__PURE__*/ core.$constructor(\"ZodDiscriminatedUnion\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodDiscriminatedUnion.init(inst, def);\n});\nexport function discriminatedUnion(discriminator, options, params) {\n // const [options, params] = args;\n return new ZodDiscriminatedUnion({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodIntersection = /*@__PURE__*/ core.$constructor(\"ZodIntersection\", (inst, def) => {\n core.$ZodIntersection.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.intersectionProcessor(inst, ctx, json, params);\n});\nexport function intersection(left, right) {\n return new ZodIntersection({\n type: \"intersection\",\n left: left,\n right: right,\n });\n}\nexport const ZodTuple = /*@__PURE__*/ core.$constructor(\"ZodTuple\", (inst, def) => {\n core.$ZodTuple.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.tupleProcessor(inst, ctx, json, params);\n inst.rest = (rest) => inst.clone({\n ...inst._zod.def,\n rest: rest,\n });\n});\nexport function tuple(items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof core.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new ZodTuple({\n type: \"tuple\",\n items: items,\n rest,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodRecord = /*@__PURE__*/ core.$constructor(\"ZodRecord\", (inst, def) => {\n core.$ZodRecord.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.recordProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n});\nexport function record(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\n// type alksjf = core.output;\nexport function partialRecord(keyType, valueType, params) {\n const k = core.clone(keyType);\n k._zod.values = undefined;\n return new ZodRecord({\n type: \"record\",\n keyType: k,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport function looseRecord(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n mode: \"loose\",\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMap = /*@__PURE__*/ core.$constructor(\"ZodMap\", (inst, def) => {\n core.$ZodMap.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.mapProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function map(keyType, valueType, params) {\n return new ZodMap({\n type: \"map\",\n keyType: keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSet = /*@__PURE__*/ core.$constructor(\"ZodSet\", (inst, def) => {\n core.$ZodSet.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.setProcessor(inst, ctx, json, params);\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function set(valueType, params) {\n return new ZodSet({\n type: \"set\",\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEnum = /*@__PURE__*/ core.$constructor(\"ZodEnum\", (inst, def) => {\n core.$ZodEnum.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.enumProcessor(inst, ctx, json, params);\n inst.enum = def.entries;\n inst.options = Object.values(def.entries);\n const keys = new Set(Object.keys(def.entries));\n inst.extract = (values, params) => {\n const newEntries = {};\n for (const value of values) {\n if (keys.has(value)) {\n newEntries[value] = def.entries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n inst.exclude = (values, params) => {\n const newEntries = { ...def.entries };\n for (const value of values) {\n if (keys.has(value)) {\n delete newEntries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n});\nfunction _enum(values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport { _enum as enum };\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function nativeEnum(entries, params) {\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLiteral = /*@__PURE__*/ core.$constructor(\"ZodLiteral\", (inst, def) => {\n core.$ZodLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.literalProcessor(inst, ctx, json, params);\n inst.values = new Set(def.values);\n Object.defineProperty(inst, \"value\", {\n get() {\n if (def.values.length > 1) {\n throw new Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");\n }\n return def.values[0];\n },\n });\n});\nexport function literal(value, params) {\n return new ZodLiteral({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\nexport const ZodFile = /*@__PURE__*/ core.$constructor(\"ZodFile\", (inst, def) => {\n core.$ZodFile.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.fileProcessor(inst, ctx, json, params);\n inst.min = (size, params) => inst.check(core._minSize(size, params));\n inst.max = (size, params) => inst.check(core._maxSize(size, params));\n inst.mime = (types, params) => inst.check(core._mime(Array.isArray(types) ? types : [types], params));\n});\nexport function file(params) {\n return core._file(ZodFile, params);\n}\nexport const ZodTransform = /*@__PURE__*/ core.$constructor(\"ZodTransform\", (inst, def) => {\n core.$ZodTransform.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.transformProcessor(inst, ctx, json, params);\n inst._zod.parse = (payload, _ctx) => {\n if (_ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n _issue.input ?? (_issue.input = payload.value);\n _issue.inst ?? (_issue.inst = inst);\n // _issue.continue ??= true;\n payload.issues.push(util.issue(_issue));\n }\n };\n const output = def.transform(payload.value, payload);\n if (output instanceof Promise) {\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n payload.value = output;\n return payload;\n };\n});\nexport function transform(fn) {\n return new ZodTransform({\n type: \"transform\",\n transform: fn,\n });\n}\nexport const ZodOptional = /*@__PURE__*/ core.$constructor(\"ZodOptional\", (inst, def) => {\n core.$ZodOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function optional(innerType) {\n return new ZodOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodExactOptional = /*@__PURE__*/ core.$constructor(\"ZodExactOptional\", (inst, def) => {\n core.$ZodExactOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function exactOptional(innerType) {\n return new ZodExactOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodNullable = /*@__PURE__*/ core.$constructor(\"ZodNullable\", (inst, def) => {\n core.$ZodNullable.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullableProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nullable(innerType) {\n return new ZodNullable({\n type: \"nullable\",\n innerType: innerType,\n });\n}\n// nullish\nexport function nullish(innerType) {\n return optional(nullable(innerType));\n}\nexport const ZodDefault = /*@__PURE__*/ core.$constructor(\"ZodDefault\", (inst, def) => {\n core.$ZodDefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.defaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeDefault = inst.unwrap;\n});\nexport function _default(innerType, defaultValue) {\n return new ZodDefault({\n type: \"default\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodPrefault = /*@__PURE__*/ core.$constructor(\"ZodPrefault\", (inst, def) => {\n core.$ZodPrefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.prefaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function prefault(innerType, defaultValue) {\n return new ZodPrefault({\n type: \"prefault\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodNonOptional = /*@__PURE__*/ core.$constructor(\"ZodNonOptional\", (inst, def) => {\n core.$ZodNonOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nonoptionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nonoptional(innerType, params) {\n return new ZodNonOptional({\n type: \"nonoptional\",\n innerType: innerType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSuccess = /*@__PURE__*/ core.$constructor(\"ZodSuccess\", (inst, def) => {\n core.$ZodSuccess.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.successProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function success(innerType) {\n return new ZodSuccess({\n type: \"success\",\n innerType: innerType,\n });\n}\nexport const ZodCatch = /*@__PURE__*/ core.$constructor(\"ZodCatch\", (inst, def) => {\n core.$ZodCatch.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.catchProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeCatch = inst.unwrap;\n});\nfunction _catch(innerType, catchValue) {\n return new ZodCatch({\n type: \"catch\",\n innerType: innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\nexport { _catch as catch };\nexport const ZodNaN = /*@__PURE__*/ core.$constructor(\"ZodNaN\", (inst, def) => {\n core.$ZodNaN.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nanProcessor(inst, ctx, json, params);\n});\nexport function nan(params) {\n return core._nan(ZodNaN, params);\n}\nexport const ZodPipe = /*@__PURE__*/ core.$constructor(\"ZodPipe\", (inst, def) => {\n core.$ZodPipe.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.pipeProcessor(inst, ctx, json, params);\n inst.in = def.in;\n inst.out = def.out;\n});\nexport function pipe(in_, out) {\n return new ZodPipe({\n type: \"pipe\",\n in: in_,\n out: out,\n // ...util.normalizeParams(params),\n });\n}\nexport const ZodCodec = /*@__PURE__*/ core.$constructor(\"ZodCodec\", (inst, def) => {\n ZodPipe.init(inst, def);\n core.$ZodCodec.init(inst, def);\n});\nexport function codec(in_, out, params) {\n return new ZodCodec({\n type: \"pipe\",\n in: in_,\n out: out,\n transform: params.decode,\n reverseTransform: params.encode,\n });\n}\nexport const ZodReadonly = /*@__PURE__*/ core.$constructor(\"ZodReadonly\", (inst, def) => {\n core.$ZodReadonly.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.readonlyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function readonly(innerType) {\n return new ZodReadonly({\n type: \"readonly\",\n innerType: innerType,\n });\n}\nexport const ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"ZodTemplateLiteral\", (inst, def) => {\n core.$ZodTemplateLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.templateLiteralProcessor(inst, ctx, json, params);\n});\nexport function templateLiteral(parts, params) {\n return new ZodTemplateLiteral({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLazy = /*@__PURE__*/ core.$constructor(\"ZodLazy\", (inst, def) => {\n core.$ZodLazy.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.lazyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.getter();\n});\nexport function lazy(getter) {\n return new ZodLazy({\n type: \"lazy\",\n getter: getter,\n });\n}\nexport const ZodPromise = /*@__PURE__*/ core.$constructor(\"ZodPromise\", (inst, def) => {\n core.$ZodPromise.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.promiseProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function promise(innerType) {\n return new ZodPromise({\n type: \"promise\",\n innerType: innerType,\n });\n}\nexport const ZodFunction = /*@__PURE__*/ core.$constructor(\"ZodFunction\", (inst, def) => {\n core.$ZodFunction.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.functionProcessor(inst, ctx, json, params);\n});\nexport function _function(params) {\n return new ZodFunction({\n type: \"function\",\n input: Array.isArray(params?.input) ? tuple(params?.input) : (params?.input ?? array(unknown())),\n output: params?.output ?? unknown(),\n });\n}\nexport { _function as function };\nexport const ZodCustom = /*@__PURE__*/ core.$constructor(\"ZodCustom\", (inst, def) => {\n core.$ZodCustom.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.customProcessor(inst, ctx, json, params);\n});\n// custom checks\nexport function check(fn) {\n const ch = new core.$ZodCheck({\n check: \"custom\",\n // ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\nexport function custom(fn, _params) {\n return core._custom(ZodCustom, fn ?? (() => true), _params);\n}\nexport function refine(fn, _params = {}) {\n return core._refine(ZodCustom, fn, _params);\n}\n// superRefine\nexport function superRefine(fn) {\n return core._superRefine(fn);\n}\n// Re-export describe and meta from core\nexport const describe = core.describe;\nexport const meta = core.meta;\nfunction _instanceof(cls, params = {}) {\n const inst = new ZodCustom({\n type: \"custom\",\n check: \"custom\",\n fn: (data) => data instanceof cls,\n abort: true,\n ...util.normalizeParams(params),\n });\n inst._zod.bag.Class = cls;\n // Override check to emit invalid_type instead of custom\n inst._zod.check = (payload) => {\n if (!(payload.value instanceof cls)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: cls.name,\n input: payload.value,\n inst,\n path: [...(inst._zod.def.path ?? [])],\n });\n }\n };\n return inst;\n}\nexport { _instanceof as instanceof };\n// stringbool\nexport const stringbool = (...args) => core._stringbool({\n Codec: ZodCodec,\n Boolean: ZodBoolean,\n String: ZodString,\n}, ...args);\nexport function json(params) {\n const jsonSchema = lazy(() => {\n return union([string(params), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);\n });\n return jsonSchema;\n}\n// preprocess\n// /** @deprecated Use `z.pipe()` and `z.transform()` instead. */\nexport function preprocess(fn, schema) {\n return pipe(transform(fn), schema);\n}\n", "// Zod 3 compat layer\nimport * as core from \"../core/index.js\";\n/** @deprecated Use the raw string literal codes instead, e.g. \"invalid_type\". */\nexport const ZodIssueCode = {\n invalid_type: \"invalid_type\",\n too_big: \"too_big\",\n too_small: \"too_small\",\n invalid_format: \"invalid_format\",\n not_multiple_of: \"not_multiple_of\",\n unrecognized_keys: \"unrecognized_keys\",\n invalid_union: \"invalid_union\",\n invalid_key: \"invalid_key\",\n invalid_element: \"invalid_element\",\n invalid_value: \"invalid_value\",\n custom: \"custom\",\n};\nexport { $brand, config } from \"../core/index.js\";\n/** @deprecated Use `z.config(params)` instead. */\nexport function setErrorMap(map) {\n core.config({\n customError: map,\n });\n}\n/** @deprecated Use `z.config()` instead. */\nexport function getErrorMap() {\n return core.config().customError;\n}\n/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */\nexport var ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\n", "import { globalRegistry } from \"../core/registries.js\";\nimport * as _checks from \"./checks.js\";\nimport * as _iso from \"./iso.js\";\nimport * as _schemas from \"./schemas.js\";\n// Local z object to avoid circular dependency with ../index.js\nconst z = {\n ..._schemas,\n ..._checks,\n iso: _iso,\n};\n// Keys that are recognized and handled by the conversion logic\nconst RECOGNIZED_KEYS = new Set([\n // Schema identification\n \"$schema\",\n \"$ref\",\n \"$defs\",\n \"definitions\",\n // Core schema keywords\n \"$id\",\n \"id\",\n \"$comment\",\n \"$anchor\",\n \"$vocabulary\",\n \"$dynamicRef\",\n \"$dynamicAnchor\",\n // Type\n \"type\",\n \"enum\",\n \"const\",\n // Composition\n \"anyOf\",\n \"oneOf\",\n \"allOf\",\n \"not\",\n // Object\n \"properties\",\n \"required\",\n \"additionalProperties\",\n \"patternProperties\",\n \"propertyNames\",\n \"minProperties\",\n \"maxProperties\",\n // Array\n \"items\",\n \"prefixItems\",\n \"additionalItems\",\n \"minItems\",\n \"maxItems\",\n \"uniqueItems\",\n \"contains\",\n \"minContains\",\n \"maxContains\",\n // String\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"format\",\n // Number\n \"minimum\",\n \"maximum\",\n \"exclusiveMinimum\",\n \"exclusiveMaximum\",\n \"multipleOf\",\n // Already handled metadata\n \"description\",\n \"default\",\n // Content\n \"contentEncoding\",\n \"contentMediaType\",\n \"contentSchema\",\n // Unsupported (error-throwing)\n \"unevaluatedItems\",\n \"unevaluatedProperties\",\n \"if\",\n \"then\",\n \"else\",\n \"dependentSchemas\",\n \"dependentRequired\",\n // OpenAPI\n \"nullable\",\n \"readOnly\",\n]);\nfunction detectVersion(schema, defaultTarget) {\n const $schema = schema.$schema;\n if ($schema === \"https://json-schema.org/draft/2020-12/schema\") {\n return \"draft-2020-12\";\n }\n if ($schema === \"http://json-schema.org/draft-07/schema#\") {\n return \"draft-7\";\n }\n if ($schema === \"http://json-schema.org/draft-04/schema#\") {\n return \"draft-4\";\n }\n // Use defaultTarget if provided, otherwise default to draft-2020-12\n return defaultTarget ?? \"draft-2020-12\";\n}\nfunction resolveRef(ref, ctx) {\n if (!ref.startsWith(\"#\")) {\n throw new Error(\"External $ref is not supported, only local refs (#/...) are allowed\");\n }\n const path = ref.slice(1).split(\"/\").filter(Boolean);\n // Handle root reference \"#\"\n if (path.length === 0) {\n return ctx.rootSchema;\n }\n const defsKey = ctx.version === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (path[0] === defsKey) {\n const key = path[1];\n if (!key || !ctx.defs[key]) {\n throw new Error(`Reference not found: ${ref}`);\n }\n return ctx.defs[key];\n }\n throw new Error(`Reference not found: ${ref}`);\n}\nfunction convertBaseSchema(schema, ctx) {\n // Handle unsupported features\n if (schema.not !== undefined) {\n // Special case: { not: {} } represents never\n if (typeof schema.not === \"object\" && Object.keys(schema.not).length === 0) {\n return z.never();\n }\n throw new Error(\"not is not supported in Zod (except { not: {} } for never)\");\n }\n if (schema.unevaluatedItems !== undefined) {\n throw new Error(\"unevaluatedItems is not supported\");\n }\n if (schema.unevaluatedProperties !== undefined) {\n throw new Error(\"unevaluatedProperties is not supported\");\n }\n if (schema.if !== undefined || schema.then !== undefined || schema.else !== undefined) {\n throw new Error(\"Conditional schemas (if/then/else) are not supported\");\n }\n if (schema.dependentSchemas !== undefined || schema.dependentRequired !== undefined) {\n throw new Error(\"dependentSchemas and dependentRequired are not supported\");\n }\n // Handle $ref\n if (schema.$ref) {\n const refPath = schema.$ref;\n if (ctx.refs.has(refPath)) {\n return ctx.refs.get(refPath);\n }\n if (ctx.processing.has(refPath)) {\n // Circular reference - use lazy\n return z.lazy(() => {\n if (!ctx.refs.has(refPath)) {\n throw new Error(`Circular reference not resolved: ${refPath}`);\n }\n return ctx.refs.get(refPath);\n });\n }\n ctx.processing.add(refPath);\n const resolved = resolveRef(refPath, ctx);\n const zodSchema = convertSchema(resolved, ctx);\n ctx.refs.set(refPath, zodSchema);\n ctx.processing.delete(refPath);\n return zodSchema;\n }\n // Handle enum\n if (schema.enum !== undefined) {\n const enumValues = schema.enum;\n // Special case: OpenAPI 3.0 null representation { type: \"string\", nullable: true, enum: [null] }\n if (ctx.version === \"openapi-3.0\" &&\n schema.nullable === true &&\n enumValues.length === 1 &&\n enumValues[0] === null) {\n return z.null();\n }\n if (enumValues.length === 0) {\n return z.never();\n }\n if (enumValues.length === 1) {\n return z.literal(enumValues[0]);\n }\n // Check if all values are strings\n if (enumValues.every((v) => typeof v === \"string\")) {\n return z.enum(enumValues);\n }\n // Mixed types - use union of literals\n const literalSchemas = enumValues.map((v) => z.literal(v));\n if (literalSchemas.length < 2) {\n return literalSchemas[0];\n }\n return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);\n }\n // Handle const\n if (schema.const !== undefined) {\n return z.literal(schema.const);\n }\n // Handle type\n const type = schema.type;\n if (Array.isArray(type)) {\n // Expand type array into anyOf union\n const typeSchemas = type.map((t) => {\n const typeSchema = { ...schema, type: t };\n return convertBaseSchema(typeSchema, ctx);\n });\n if (typeSchemas.length === 0) {\n return z.never();\n }\n if (typeSchemas.length === 1) {\n return typeSchemas[0];\n }\n return z.union(typeSchemas);\n }\n if (!type) {\n // No type specified - empty schema (any)\n return z.any();\n }\n let zodSchema;\n switch (type) {\n case \"string\": {\n let stringSchema = z.string();\n // Apply format using .check() with Zod format functions\n if (schema.format) {\n const format = schema.format;\n // Map common formats to Zod check functions\n if (format === \"email\") {\n stringSchema = stringSchema.check(z.email());\n }\n else if (format === \"uri\" || format === \"uri-reference\") {\n stringSchema = stringSchema.check(z.url());\n }\n else if (format === \"uuid\" || format === \"guid\") {\n stringSchema = stringSchema.check(z.uuid());\n }\n else if (format === \"date-time\") {\n stringSchema = stringSchema.check(z.iso.datetime());\n }\n else if (format === \"date\") {\n stringSchema = stringSchema.check(z.iso.date());\n }\n else if (format === \"time\") {\n stringSchema = stringSchema.check(z.iso.time());\n }\n else if (format === \"duration\") {\n stringSchema = stringSchema.check(z.iso.duration());\n }\n else if (format === \"ipv4\") {\n stringSchema = stringSchema.check(z.ipv4());\n }\n else if (format === \"ipv6\") {\n stringSchema = stringSchema.check(z.ipv6());\n }\n else if (format === \"mac\") {\n stringSchema = stringSchema.check(z.mac());\n }\n else if (format === \"cidr\") {\n stringSchema = stringSchema.check(z.cidrv4());\n }\n else if (format === \"cidr-v6\") {\n stringSchema = stringSchema.check(z.cidrv6());\n }\n else if (format === \"base64\") {\n stringSchema = stringSchema.check(z.base64());\n }\n else if (format === \"base64url\") {\n stringSchema = stringSchema.check(z.base64url());\n }\n else if (format === \"e164\") {\n stringSchema = stringSchema.check(z.e164());\n }\n else if (format === \"jwt\") {\n stringSchema = stringSchema.check(z.jwt());\n }\n else if (format === \"emoji\") {\n stringSchema = stringSchema.check(z.emoji());\n }\n else if (format === \"nanoid\") {\n stringSchema = stringSchema.check(z.nanoid());\n }\n else if (format === \"cuid\") {\n stringSchema = stringSchema.check(z.cuid());\n }\n else if (format === \"cuid2\") {\n stringSchema = stringSchema.check(z.cuid2());\n }\n else if (format === \"ulid\") {\n stringSchema = stringSchema.check(z.ulid());\n }\n else if (format === \"xid\") {\n stringSchema = stringSchema.check(z.xid());\n }\n else if (format === \"ksuid\") {\n stringSchema = stringSchema.check(z.ksuid());\n }\n // Note: json-string format is not currently supported by Zod\n // Custom formats are ignored - keep as plain string\n }\n // Apply constraints\n if (typeof schema.minLength === \"number\") {\n stringSchema = stringSchema.min(schema.minLength);\n }\n if (typeof schema.maxLength === \"number\") {\n stringSchema = stringSchema.max(schema.maxLength);\n }\n if (schema.pattern) {\n // JSON Schema patterns are not implicitly anchored (match anywhere in string)\n stringSchema = stringSchema.regex(new RegExp(schema.pattern));\n }\n zodSchema = stringSchema;\n break;\n }\n case \"number\":\n case \"integer\": {\n let numberSchema = type === \"integer\" ? z.number().int() : z.number();\n // Apply constraints\n if (typeof schema.minimum === \"number\") {\n numberSchema = numberSchema.min(schema.minimum);\n }\n if (typeof schema.maximum === \"number\") {\n numberSchema = numberSchema.max(schema.maximum);\n }\n if (typeof schema.exclusiveMinimum === \"number\") {\n numberSchema = numberSchema.gt(schema.exclusiveMinimum);\n }\n else if (schema.exclusiveMinimum === true && typeof schema.minimum === \"number\") {\n numberSchema = numberSchema.gt(schema.minimum);\n }\n if (typeof schema.exclusiveMaximum === \"number\") {\n numberSchema = numberSchema.lt(schema.exclusiveMaximum);\n }\n else if (schema.exclusiveMaximum === true && typeof schema.maximum === \"number\") {\n numberSchema = numberSchema.lt(schema.maximum);\n }\n if (typeof schema.multipleOf === \"number\") {\n numberSchema = numberSchema.multipleOf(schema.multipleOf);\n }\n zodSchema = numberSchema;\n break;\n }\n case \"boolean\": {\n zodSchema = z.boolean();\n break;\n }\n case \"null\": {\n zodSchema = z.null();\n break;\n }\n case \"object\": {\n const shape = {};\n const properties = schema.properties || {};\n const requiredSet = new Set(schema.required || []);\n // Convert properties - mark optional ones\n for (const [key, propSchema] of Object.entries(properties)) {\n const propZodSchema = convertSchema(propSchema, ctx);\n // If not in required array, make it optional\n shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional();\n }\n // Handle propertyNames\n if (schema.propertyNames) {\n const keySchema = convertSchema(schema.propertyNames, ctx);\n const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === \"object\"\n ? convertSchema(schema.additionalProperties, ctx)\n : z.any();\n // Case A: No properties (pure record)\n if (Object.keys(shape).length === 0) {\n zodSchema = z.record(keySchema, valueSchema);\n break;\n }\n // Case B: With properties (intersection of object and looseRecord)\n const objectSchema = z.object(shape).passthrough();\n const recordSchema = z.looseRecord(keySchema, valueSchema);\n zodSchema = z.intersection(objectSchema, recordSchema);\n break;\n }\n // Handle patternProperties\n if (schema.patternProperties) {\n // patternProperties: keys matching pattern must satisfy corresponding schema\n // Use loose records so non-matching keys pass through\n const patternProps = schema.patternProperties;\n const patternKeys = Object.keys(patternProps);\n const looseRecords = [];\n for (const pattern of patternKeys) {\n const patternValue = convertSchema(patternProps[pattern], ctx);\n const keySchema = z.string().regex(new RegExp(pattern));\n looseRecords.push(z.looseRecord(keySchema, patternValue));\n }\n // Build intersection: object schema + all pattern property records\n const schemasToIntersect = [];\n if (Object.keys(shape).length > 0) {\n // Use passthrough so patternProperties can validate additional keys\n schemasToIntersect.push(z.object(shape).passthrough());\n }\n schemasToIntersect.push(...looseRecords);\n if (schemasToIntersect.length === 0) {\n zodSchema = z.object({}).passthrough();\n }\n else if (schemasToIntersect.length === 1) {\n zodSchema = schemasToIntersect[0];\n }\n else {\n // Chain intersections: (A & B) & C & D ...\n let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);\n for (let i = 2; i < schemasToIntersect.length; i++) {\n result = z.intersection(result, schemasToIntersect[i]);\n }\n zodSchema = result;\n }\n break;\n }\n // Handle additionalProperties\n // In JSON Schema, additionalProperties defaults to true (allow any extra properties)\n // In Zod, objects strip unknown keys by default, so we need to handle this explicitly\n const objectSchema = z.object(shape);\n if (schema.additionalProperties === false) {\n // Strict mode - no extra properties allowed\n zodSchema = objectSchema.strict();\n }\n else if (typeof schema.additionalProperties === \"object\") {\n // Extra properties must match the specified schema\n zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));\n }\n else {\n // additionalProperties is true or undefined - allow any extra properties (passthrough)\n zodSchema = objectSchema.passthrough();\n }\n break;\n }\n case \"array\": {\n // TODO: uniqueItems is not supported\n // TODO: contains/minContains/maxContains are not supported\n // Check if this is a tuple (prefixItems or items as array)\n const prefixItems = schema.prefixItems;\n const items = schema.items;\n if (prefixItems && Array.isArray(prefixItems)) {\n // Tuple with prefixItems (draft-2020-12)\n const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));\n const rest = items && typeof items === \"object\" && !Array.isArray(items)\n ? convertSchema(items, ctx)\n : undefined;\n if (rest) {\n zodSchema = z.tuple(tupleItems).rest(rest);\n }\n else {\n zodSchema = z.tuple(tupleItems);\n }\n // Apply minItems/maxItems constraints to tuples\n if (typeof schema.minItems === \"number\") {\n zodSchema = zodSchema.check(z.minLength(schema.minItems));\n }\n if (typeof schema.maxItems === \"number\") {\n zodSchema = zodSchema.check(z.maxLength(schema.maxItems));\n }\n }\n else if (Array.isArray(items)) {\n // Tuple with items array (draft-7)\n const tupleItems = items.map((item) => convertSchema(item, ctx));\n const rest = schema.additionalItems && typeof schema.additionalItems === \"object\"\n ? convertSchema(schema.additionalItems, ctx)\n : undefined; // additionalItems: false means no rest, handled by default tuple behavior\n if (rest) {\n zodSchema = z.tuple(tupleItems).rest(rest);\n }\n else {\n zodSchema = z.tuple(tupleItems);\n }\n // Apply minItems/maxItems constraints to tuples\n if (typeof schema.minItems === \"number\") {\n zodSchema = zodSchema.check(z.minLength(schema.minItems));\n }\n if (typeof schema.maxItems === \"number\") {\n zodSchema = zodSchema.check(z.maxLength(schema.maxItems));\n }\n }\n else if (items !== undefined) {\n // Regular array\n const element = convertSchema(items, ctx);\n let arraySchema = z.array(element);\n // Apply constraints\n if (typeof schema.minItems === \"number\") {\n arraySchema = arraySchema.min(schema.minItems);\n }\n if (typeof schema.maxItems === \"number\") {\n arraySchema = arraySchema.max(schema.maxItems);\n }\n zodSchema = arraySchema;\n }\n else {\n // No items specified - array of any\n zodSchema = z.array(z.any());\n }\n break;\n }\n default:\n throw new Error(`Unsupported type: ${type}`);\n }\n // Apply metadata\n if (schema.description) {\n zodSchema = zodSchema.describe(schema.description);\n }\n if (schema.default !== undefined) {\n zodSchema = zodSchema.default(schema.default);\n }\n return zodSchema;\n}\nfunction convertSchema(schema, ctx) {\n if (typeof schema === \"boolean\") {\n return schema ? z.any() : z.never();\n }\n // Convert base schema first (ignoring composition keywords)\n let baseSchema = convertBaseSchema(schema, ctx);\n const hasExplicitType = schema.type || schema.enum !== undefined || schema.const !== undefined;\n // Process composition keywords LAST (they can appear together)\n // Handle anyOf - wrap base schema with union\n if (schema.anyOf && Array.isArray(schema.anyOf)) {\n const options = schema.anyOf.map((s) => convertSchema(s, ctx));\n const anyOfUnion = z.union(options);\n baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion;\n }\n // Handle oneOf - exclusive union (exactly one must match)\n if (schema.oneOf && Array.isArray(schema.oneOf)) {\n const options = schema.oneOf.map((s) => convertSchema(s, ctx));\n const oneOfUnion = z.xor(options);\n baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion;\n }\n // Handle allOf - wrap base schema with intersection\n if (schema.allOf && Array.isArray(schema.allOf)) {\n if (schema.allOf.length === 0) {\n baseSchema = hasExplicitType ? baseSchema : z.any();\n }\n else {\n let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);\n const startIdx = hasExplicitType ? 0 : 1;\n for (let i = startIdx; i < schema.allOf.length; i++) {\n result = z.intersection(result, convertSchema(schema.allOf[i], ctx));\n }\n baseSchema = result;\n }\n }\n // Handle nullable (OpenAPI 3.0)\n if (schema.nullable === true && ctx.version === \"openapi-3.0\") {\n baseSchema = z.nullable(baseSchema);\n }\n // Handle readOnly\n if (schema.readOnly === true) {\n baseSchema = z.readonly(baseSchema);\n }\n // Collect metadata: core schema keywords and unrecognized keys\n const extraMeta = {};\n // Core schema keywords that should be captured as metadata\n const coreMetadataKeys = [\"$id\", \"id\", \"$comment\", \"$anchor\", \"$vocabulary\", \"$dynamicRef\", \"$dynamicAnchor\"];\n for (const key of coreMetadataKeys) {\n if (key in schema) {\n extraMeta[key] = schema[key];\n }\n }\n // Content keywords - store as metadata\n const contentMetadataKeys = [\"contentEncoding\", \"contentMediaType\", \"contentSchema\"];\n for (const key of contentMetadataKeys) {\n if (key in schema) {\n extraMeta[key] = schema[key];\n }\n }\n // Unrecognized keys (custom metadata)\n for (const key of Object.keys(schema)) {\n if (!RECOGNIZED_KEYS.has(key)) {\n extraMeta[key] = schema[key];\n }\n }\n if (Object.keys(extraMeta).length > 0) {\n ctx.registry.add(baseSchema, extraMeta);\n }\n return baseSchema;\n}\n/**\n * Converts a JSON Schema to a Zod schema. This function should be considered semi-experimental. It's behavior is liable to change. */\nexport function fromJSONSchema(schema, params) {\n // Handle boolean schemas\n if (typeof schema === \"boolean\") {\n return schema ? z.any() : z.never();\n }\n const version = detectVersion(schema, params?.defaultTarget);\n const defs = (schema.$defs || schema.definitions || {});\n const ctx = {\n version,\n defs,\n refs: new Map(),\n processing: new Set(),\n rootSchema: schema,\n registry: params?.registry ?? globalRegistry,\n };\n return convertSchema(schema, ctx);\n}\n", "import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\nexport function string(params) {\n return core._coercedString(schemas.ZodString, params);\n}\nexport function number(params) {\n return core._coercedNumber(schemas.ZodNumber, params);\n}\nexport function boolean(params) {\n return core._coercedBoolean(schemas.ZodBoolean, params);\n}\nexport function bigint(params) {\n return core._coercedBigint(schemas.ZodBigInt, params);\n}\nexport function date(params) {\n return core._coercedDate(schemas.ZodDate, params);\n}\n", "export * as core from \"../core/index.js\";\nexport * from \"./schemas.js\";\nexport * from \"./checks.js\";\nexport * from \"./errors.js\";\nexport * from \"./parse.js\";\nexport * from \"./compat.js\";\n// zod-specified\nimport { config } from \"../core/index.js\";\nimport en from \"../locales/en.js\";\nconfig(en());\nexport { globalRegistry, registry, config, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, } from \"../core/index.js\";\nexport { toJSONSchema } from \"../core/json-schema-processors.js\";\nexport { fromJSONSchema } from \"./from-json-schema.js\";\nexport * as locales from \"../locales/index.js\";\n// iso\n// must be exported from top-level\n// https://github.com/colinhacks/zod/issues/4491\nexport { ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration } from \"./iso.js\";\nexport * as iso from \"./iso.js\";\nexport * as coerce from \"./coerce.js\";\n", "import * as z from \"./v4/classic/external.js\";\nexport * from \"./v4/classic/external.js\";\nexport { z };\nexport default z;\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport { generateSignedUrlsFromS3Urls } from '@/src/lib/s3-client'\nimport { getComplaints as getComplaintsFromDb, resolveComplaint as resolveComplaintInDb } from '@/src/dbService'\nimport type { ComplaintWithUser } from '@packages/shared'\n\nexport const complaintRouter = router({\n getAll: protectedProcedure\n .input(z.object({\n cursor: z.number().optional(),\n limit: z.number().default(20),\n }))\n .query(async ({ input }): Promise<{\n complaints: Array<{\n id: number;\n text: string;\n userId: number;\n userName: string | null;\n userMobile: string | null;\n orderId: number | null;\n status: string;\n createdAt: Date;\n images: string[];\n }>;\n nextCursor?: number;\n }> => {\n const { cursor, limit } = input;\n\n // Using dbService helper (new implementation)\n const { complaints: complaintsData, hasMore } = await getComplaintsFromDb(cursor, limit);\n\n /*\n // Old implementation - direct DB query:\n const { cursor, limit } = input;\n\n let whereCondition = cursor \n ? lt(complaints.id, cursor) \n : undefined;\n\n const complaintsData = await db\n .select({\n id: complaints.id,\n complaintBody: complaints.complaintBody,\n userId: complaints.userId,\n orderId: complaints.orderId,\n isResolved: complaints.isResolved,\n createdAt: complaints.createdAt,\n userName: users.name,\n userMobile: users.mobile,\n images: complaints.images,\n })\n .from(complaints)\n .leftJoin(users, eq(complaints.userId, users.id))\n .where(whereCondition)\n .orderBy(desc(complaints.id))\n .limit(limit + 1);\n\n const hasMore = complaintsData.length > limit;\n const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData;\n */\n\n const complaintsToReturn = hasMore ? complaintsData.slice(0, limit) : complaintsData;\n\n const complaintsWithSignedImages = await Promise.all(\n complaintsToReturn.map(async (c: ComplaintWithUser) => {\n const signedImages = c.images\n ? await generateSignedUrlsFromS3Urls(c.images as string[])\n : [];\n\n return {\n id: c.id,\n text: c.complaintBody,\n userId: c.userId,\n userName: c.userName,\n userMobile: c.userMobile,\n orderId: c.orderId,\n status: c.isResolved ? 'resolved' : 'pending',\n createdAt: c.createdAt,\n images: signedImages,\n };\n })\n );\n\n return {\n complaints: complaintsWithSignedImages,\n nextCursor: hasMore\n ? complaintsToReturn[complaintsToReturn.length - 1].id\n : undefined,\n };\n }),\n\n resolve: protectedProcedure\n .input(z.object({ id: z.string(), response: z.string().optional() }))\n .mutation(async ({ input }): Promise<{ message: string }> => {\n // Using dbService helper (new implementation)\n await resolveComplaintInDb(parseInt(input.id), input.response);\n\n /*\n // Old implementation - direct DB query:\n await db\n .update(complaints)\n .set({ isResolved: true, response: input.response })\n .where(eq(complaints.id, parseInt(input.id)));\n */\n\n return { message: 'Complaint resolved successfully' };\n }),\n});\n", "!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t) => {\n const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableUsers, applicableProducts, maxValue, isApplyForAll, validTill, maxLimitForUser, exclusiveApply } = input;\n\n // Validation: ensure at least one discount type is provided\n if ((!discountPercent && !flatDiscount) || (discountPercent && flatDiscount)) {\n throw new Error(\"Either discountPercent or flatDiscount must be provided (but not both)\");\n }\n\n // If user-based, applicableUsers is required (unless it's apply for all)\n if (isUserBased && (!applicableUsers || applicableUsers.length === 0) && !isApplyForAll) {\n throw new Error(\"applicableUsers is required for user-based coupons (or set isApplyForAll to true)\");\n }\n\n // Cannot be both user-based and apply for all\n if (isUserBased && isApplyForAll) {\n throw new Error(\"Cannot be both user-based and apply for all users\");\n }\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n\n // Generate coupon code if not provided\n let finalCouponCode = couponCode;\n if (!finalCouponCode) {\n const timestamp = Date.now().toString().slice(-6);\n const random = Math.random().toString(36).substring(2, 8).toUpperCase();\n finalCouponCode = `MF${timestamp}${random}`;\n }\n\n // Using dbService helper (new implementation)\n const codeExists = await checkCouponExists(finalCouponCode);\n if (codeExists) {\n throw new Error(\"Coupon code already exists\");\n }\n\n // If applicableUsers is provided, verify users exist\n if (applicableUsers && applicableUsers.length > 0) {\n const usersExist = await checkUsersExist(applicableUsers);\n if (!usersExist) {\n throw new Error(\"Some applicable users not found\");\n }\n }\n\n const coupon = await createCouponWithRelations(\n {\n couponCode: finalCouponCode,\n isUserBased: isUserBased || false,\n discountPercent: discountPercent?.toString(),\n flatDiscount: flatDiscount?.toString(),\n minOrder: minOrder?.toString(),\n productIds: productIds || null,\n createdBy: staffUserId,\n maxValue: maxValue?.toString(),\n isApplyForAll: isApplyForAll || false,\n validTill: validTill ? dayjs(validTill).toDate() : undefined,\n maxLimitForUser,\n exclusiveApply: exclusiveApply || false,\n },\n applicableUsers,\n applicableProducts\n );\n\n /*\n // Old implementation - direct DB query with transaction:\n const result = await db.insert(coupons).values({\n couponCode: finalCouponCode,\n isUserBased: isUserBased || false,\n discountPercent: discountPercent?.toString(),\n flatDiscount: flatDiscount?.toString(),\n minOrder: minOrder?.toString(),\n productIds: productIds || null,\n createdBy: staffUserId,\n maxValue: maxValue?.toString(),\n isApplyForAll: isApplyForAll || false,\n validTill: validTill ? dayjs(validTill).toDate() : undefined,\n maxLimitForUser,\n exclusiveApply: exclusiveApply || false,\n }).returning();\n\n const coupon = result[0];\n\n // Insert applicable users\n if (applicableUsers && applicableUsers.length > 0) {\n await db.insert(couponApplicableUsers).values(\n applicableUsers.map(userId => ({\n couponId: coupon.id,\n userId,\n }))\n );\n }\n\n // Insert applicable products\n if (applicableProducts && applicableProducts.length > 0) {\n await db.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: coupon.id,\n productId,\n }))\n );\n }\n */\n\n return coupon;\n }),\n\n getAll: protectedProcedure\n .input(z.object({\n cursor: z.number().optional(),\n limit: z.number().default(50),\n search: z.string().optional(),\n }))\n .query(async ({ input }): Promise<{ coupons: any[]; nextCursor?: number }> => {\n const { cursor, limit, search } = input;\n \n const { coupons: couponsList, hasMore } = await getAllCouponsFromDb(cursor, limit, search);\n\n const nextCursor = hasMore ? couponsList[couponsList.length - 1].id : undefined;\n \n return { coupons: couponsList, nextCursor };\n }),\n\n getById: protectedProcedure\n .input(z.object({ id: z.number() }))\n .query(async ({ input }): Promise => {\n const couponId = input.id;\n\n const result = await getCouponByIdFromDb(couponId);\n\n if (!result) {\n throw new Error(\"Coupon not found\");\n }\n\n return {\n ...result,\n productIds: (result.productIds as number[]) || undefined,\n applicableUsers: result.applicableUsers.map((au: any) => au.user),\n applicableProducts: result.applicableProducts.map((ap: any) => ap.product),\n };\n }),\n\n update: protectedProcedure\n .input(z.object({\n id: z.number(),\n updates: createCouponBodySchema.extend({\n isInvalidated: z.boolean().optional(),\n }),\n }))\n .mutation(async ({ input }): Promise => {\n const { id, updates } = input;\n\n // Validation: ensure discount types are valid\n if (updates.discountPercent !== undefined && updates.flatDiscount !== undefined) {\n if (updates.discountPercent && updates.flatDiscount) {\n throw new Error(\"Cannot have both discountPercent and flatDiscount\");\n }\n }\n\n // Prepare update data\n const updateData: any = {};\n if (updates.couponCode !== undefined) updateData.couponCode = updates.couponCode;\n if (updates.isUserBased !== undefined) updateData.isUserBased = updates.isUserBased;\n if (updates.discountPercent !== undefined) updateData.discountPercent = updates.discountPercent?.toString();\n if (updates.flatDiscount !== undefined) updateData.flatDiscount = updates.flatDiscount?.toString();\n if (updates.minOrder !== undefined) updateData.minOrder = updates.minOrder?.toString();\n if (updates.maxValue !== undefined) updateData.maxValue = updates.maxValue?.toString();\n if (updates.isApplyForAll !== undefined) updateData.isApplyForAll = updates.isApplyForAll;\n if (updates.validTill !== undefined) updateData.validTill = updates.validTill ? dayjs(updates.validTill).toDate() : null;\n if (updates.maxLimitForUser !== undefined) updateData.maxLimitForUser = updates.maxLimitForUser;\n if (updates.exclusiveApply !== undefined) updateData.exclusiveApply = updates.exclusiveApply;\n if (updates.isInvalidated !== undefined) updateData.isInvalidated = updates.isInvalidated;\n if (updates.productIds !== undefined) updateData.productIds = updates.productIds;\n\n // Using dbService helper (new implementation)\n const coupon = await updateCouponWithRelations(\n id,\n updateData,\n updates.applicableUsers,\n updates.applicableProducts\n );\n\n /*\n // Old implementation - direct DB query:\n const result = await db.update(coupons)\n .set(updateData)\n .where(eq(coupons.id, id))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Coupon not found\");\n }\n\n // Update applicable users: delete existing and insert new\n if (updates.applicableUsers !== undefined) {\n await db.delete(couponApplicableUsers).where(eq(couponApplicableUsers.couponId, id));\n if (updates.applicableUsers.length > 0) {\n await db.insert(couponApplicableUsers).values(\n updates.applicableUsers.map(userId => ({\n couponId: id,\n userId,\n }))\n );\n }\n }\n\n // Update applicable products: delete existing and insert new\n if (updates.applicableProducts !== undefined) {\n await db.delete(couponApplicableProducts).where(eq(couponApplicableProducts.couponId, id));\n if (updates.applicableProducts.length > 0) {\n await db.insert(couponApplicableProducts).values(\n updates.applicableProducts.map(productId => ({\n couponId: id,\n productId,\n }))\n );\n }\n }\n */\n\n return coupon;\n }),\n\n delete: protectedProcedure\n .input(z.object({ id: z.number() }))\n .mutation(async ({ input }): Promise<{ message: string }> => {\n const { id } = input;\n\n await invalidateCouponInDb(id);\n\n return { message: \"Coupon invalidated successfully\" };\n }),\n\n validate: protectedProcedure\n .input(validateCouponBodySchema)\n .query(async ({ input }): Promise => {\n const { code, userId, orderAmount } = input;\n\n if (!code || typeof code !== 'string') {\n return { valid: false, message: \"Invalid coupon code\" };\n }\n\n const result = await validateCouponInDb(code, userId, orderAmount);\n\n return result;\n }),\n\n generateCancellationCoupon: protectedProcedure\n .input(\n z.object({\n orderId: z.number(),\n })\n )\n .mutation(async ({ input, ctx }): Promise => {\n const { orderId } = input;\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n\n // Using dbService helper (new implementation)\n const order = await getOrderWithUser(orderId);\n\n if (!order) {\n throw new Error(\"Order not found\");\n }\n\n if (!order.user) {\n throw new Error(\"User not found for this order\");\n }\n\n // Generate coupon code: first 3 letters of user name or mobile + orderId\n const userNamePrefix = (order.user.name || order.user.mobile || 'USR').substring(0, 3).toUpperCase();\n const couponCode = `${userNamePrefix}${orderId}`;\n\n // Check if coupon code already exists\n const codeExists = await checkCouponExists(couponCode);\n if (codeExists) {\n throw new Error(\"Coupon code already exists\");\n }\n\n // Get order total amount\n const orderAmount = parseFloat(order.totalAmount);\n\n const coupon = await generateCancellationCoupon(\n orderId,\n staffUserId,\n order.userId,\n orderAmount,\n couponCode\n );\n\n /*\n // Old implementation - direct DB query with transaction:\n const coupon = await db.transaction(async (tx) => {\n // Calculate expiry date (30 days from now)\n const expiryDate = new Date();\n expiryDate.setDate(expiryDate.getDate() + 30);\n\n // Create the coupon\n const result = await tx.insert(coupons).values({\n couponCode,\n isUserBased: true,\n flatDiscount: orderAmount.toString(),\n minOrder: orderAmount.toString(),\n maxValue: orderAmount.toString(),\n validTill: expiryDate,\n maxLimitForUser: 1,\n createdBy: staffUserId,\n isApplyForAll: false,\n }).returning();\n\n const coupon = result[0];\n\n // Insert applicable users\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId: order.userId,\n });\n\n // Update order_status with refund coupon ID\n await tx.update(orderStatus)\n .set({ refundCouponId: coupon.id })\n .where(eq(orderStatus.orderId, orderId));\n\n return coupon;\n });\n */\n\n return coupon;\n }),\n\n getReservedCoupons: protectedProcedure\n .input(z.object({\n cursor: z.number().optional(),\n limit: z.number().default(50),\n search: z.string().optional(),\n }))\n .query(async ({ input }): Promise<{ coupons: any[]; nextCursor?: number }> => {\n const { cursor, limit, search } = input;\n\n const { coupons: result, hasMore } = await getReservedCouponsFromDb(cursor, limit, search);\n\n const nextCursor = hasMore ? result[result.length - 1].id : undefined;\n\n return {\n coupons: result,\n nextCursor,\n };\n }),\n\n createReservedCoupon: protectedProcedure\n .input(createCouponBodySchema)\n .mutation(async ({ input, ctx }): Promise => {\n const { couponCode, isUserBased, discountPercent, flatDiscount, minOrder, productIds, applicableProducts, maxValue, validTill, maxLimitForUser, exclusiveApply } = input;\n\n // Validation: ensure at least one discount type is provided\n if ((!discountPercent && !flatDiscount) || (discountPercent && flatDiscount)) {\n throw new Error(\"Either discountPercent or flatDiscount must be provided (but not both)\");\n }\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n\n // Generate secret code if not provided\n let secretCode = couponCode || `SECRET${Date.now().toString().slice(-6)}${Math.random().toString(36).substring(2, 8).toUpperCase()}`;\n\n // Using dbService helper (new implementation)\n const codeExists = await checkReservedCouponExists(secretCode);\n if (codeExists) {\n throw new Error(\"Secret code already exists\");\n }\n\n const coupon = await createReservedCouponWithProducts(\n {\n secretCode,\n couponCode: couponCode || `RESERVED${Date.now().toString().slice(-6)}`,\n discountPercent: discountPercent?.toString(),\n flatDiscount: flatDiscount?.toString(),\n minOrder: minOrder?.toString(),\n productIds,\n maxValue: maxValue?.toString(),\n validTill: validTill ? dayjs(validTill).toDate() : undefined,\n maxLimitForUser,\n exclusiveApply: exclusiveApply || false,\n createdBy: staffUserId,\n },\n applicableProducts\n );\n\n /*\n // Old implementation - direct DB query:\n const result = await db.insert(reservedCoupons).values({\n secretCode,\n couponCode: couponCode || RESERVED${Date.now().toString().slice(-6)},\n discountPercent: discountPercent?.toString(),\n flatDiscount: flatDiscount?.toString(),\n minOrder: minOrder?.toString(),\n productIds,\n maxValue: maxValue?.toString(),\n validTill: validTill ? dayjs(validTill).toDate() : undefined,\n maxLimitForUser,\n exclusiveApply: exclusiveApply || false,\n createdBy: staffUserId,\n }).returning();\n\n const coupon = result[0];\n\n // Insert applicable products if provided\n if (applicableProducts && applicableProducts.length > 0) {\n await db.insert(couponApplicableProducts).values(\n applicableProducts.map(productId => ({\n couponId: coupon.id,\n productId,\n }))\n );\n }\n */\n\n return coupon;\n }),\n\n getUsersMiniInfo: protectedProcedure\n .input(z.object({\n search: z.string().optional(),\n limit: z.number().min(1).max(50).default(20),\n offset: z.number().min(0).default(0),\n }))\n .query(async ({ input }): Promise<{ users: UserMiniInfo[] }> => {\n const { search, limit, offset } = input;\n\n const result = await getUsersForCouponFromDb(search, limit, offset);\n\n return result;\n }),\n\n createCoupon: protectedProcedure\n .input(z.object({\n mobile: z.string().min(1, 'Mobile number is required'),\n }))\n .mutation(async ({ input, ctx }): Promise<{ success: boolean; coupon: any }> => {\n const { mobile } = input;\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n\n // Clean mobile number (remove non-digits)\n const cleanMobile = mobile.replace(/\\D/g, '');\n\n // Validate: exactly 10 digits\n if (cleanMobile.length !== 10) {\n throw new Error(\"Mobile number must be exactly 10 digits\");\n }\n\n // Generate unique coupon code\n const timestamp = Date.now().toString().slice(-6);\n const random = Math.random().toString(36).substring(2, 6).toUpperCase();\n const couponCode = `MF${cleanMobile.slice(-4)}${timestamp}${random}`;\n\n // Using dbService helper (new implementation)\n const codeExists = await checkCouponExists(couponCode);\n if (codeExists) {\n throw new Error(\"Generated coupon code already exists - please try again\");\n }\n\n const { coupon, user } = await createCouponForUser(cleanMobile, couponCode, staffUserId);\n\n /*\n // Old implementation - direct DB query with transaction:\n // Check if user exists, create if not\n let user = await db.query.users.findFirst({\n where: eq(users.mobile, cleanMobile),\n });\n\n if (!user) {\n const [newUser] = await db.insert(users).values({\n name: null,\n email: null,\n mobile: cleanMobile,\n }).returning();\n user = newUser;\n }\n\n // Create the coupon\n const [coupon] = await db.insert(coupons).values({\n couponCode,\n isUserBased: true,\n discountPercent: \"20\",\n minOrder: \"1000\",\n maxValue: \"500\",\n maxLimitForUser: 1,\n isApplyForAll: false,\n exclusiveApply: false,\n createdBy: staffUserId,\n validTill: dayjs().add(90, 'days').toDate(),\n }).returning();\n\n // Associate coupon with user\n await db.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId: user.id,\n });\n */\n\n return {\n success: true,\n coupon: {\n id: coupon.id,\n couponCode: coupon.couponCode,\n userId: user.id,\n userMobile: user.mobile,\n discountPercent: 20,\n minOrder: 1000,\n maxValue: 500,\n maxLimitForUser: 1,\n },\n };\n }),\n});\n", "export const fetch = (...args) => globalThis.fetch(...args);\nexport const Headers = globalThis.Headers;\nexport const Request = globalThis.Request;\nexport const Response = globalThis.Response;\nexport const AbortController = globalThis.AbortController;\nexport const FetchError = Error;\nexport const AbortError = Error;\nconst redirectStatus = new Set([\n\t301,\n\t302,\n\t303,\n\t307,\n\t308\n]);\nexport const isRedirect = (code) => redirectStatus.has(code);\nfetch.Promise = globalThis.Promise;\nfetch.isRedirect = isRedirect;\nexport default fetch;\n", "import * as esm from 'node-fetch';\nmodule.exports = Object.entries(esm)\n\t\t\t.filter(([k,]) => k !== 'default')\n\t\t\t.reduce((cjs, [k, value]) =>\n\t\t\t\tObject.defineProperty(cjs, k, { value, enumerable: true }),\n\t\t\t\t\"default\" in esm ? esm.default : {}\n\t\t\t);", "import libDefault from 'node:assert';\nmodule.exports = libDefault;", "import libDefault from 'node:zlib';\nmodule.exports = libDefault;", "function limiter (count) {\n var outstanding = 0\n var jobs = []\n\n function remove () {\n outstanding--\n\n if (outstanding < count) {\n dequeue()\n }\n }\n\n function dequeue () {\n var job = jobs.shift()\n semaphore.queue = jobs.length\n\n if (job) {\n run(job.fn).then(job.resolve).catch(job.reject)\n }\n }\n\n function queue (fn) {\n return new Promise(function (resolve, reject) {\n jobs.push({fn: fn, resolve: resolve, reject: reject})\n semaphore.queue = jobs.length\n })\n }\n\n function run (fn) {\n outstanding++\n try {\n return Promise.resolve(fn()).then(function (result) {\n remove()\n return result\n }, function (error) {\n remove()\n throw error\n })\n } catch (err) {\n remove()\n return Promise.reject(err)\n }\n }\n\n var semaphore = function (fn) {\n if (outstanding >= count) {\n return queue(fn)\n } else {\n return run(fn)\n }\n }\n\n return semaphore\n}\n\nfunction map (items, mapper) {\n var failed = false\n\n var limit = this\n\n return Promise.all(items.map(function () {\n var args = arguments\n return limit(function () {\n if (!failed) {\n return mapper.apply(undefined, args).catch(function (e) {\n failed = true\n throw e\n })\n }\n })\n }))\n}\n\nfunction addExtras (fn) {\n fn.queue = 0\n fn.map = map\n return fn\n}\n\nmodule.exports = function (count) {\n if (count) {\n return addExtras(limiter(count))\n } else {\n return addExtras(function (fn) {\n return fn()\n })\n }\n}\n", "'use strict';\n\nfunction assign(obj, props) {\n for (const key in props) {\n Object.defineProperty(obj, key, {\n value: props[key],\n enumerable: true,\n configurable: true,\n });\n }\n\n return obj;\n}\n\nfunction createError(err, code, props) {\n if (!err || typeof err === 'string') {\n throw new TypeError('Please pass an Error to err-code');\n }\n\n if (!props) {\n props = {};\n }\n\n if (typeof code === 'object') {\n props = code;\n code = undefined;\n }\n\n if (code != null) {\n props.code = code;\n }\n\n try {\n return assign(err, props);\n } catch (_) {\n props.message = err.message;\n props.stack = err.stack;\n\n const ErrClass = function () {};\n\n ErrClass.prototype = Object.create(Object.getPrototypeOf(err));\n\n return assign(new ErrClass(), props);\n }\n}\n\nmodule.exports = createError;\n", "function RetryOperation(timeouts, options) {\n // Compatibility for the old (timeouts, retryForever) signature\n if (typeof options === 'boolean') {\n options = { forever: options };\n }\n\n this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));\n this._timeouts = timeouts;\n this._options = options || {};\n this._maxRetryTime = options && options.maxRetryTime || Infinity;\n this._fn = null;\n this._errors = [];\n this._attempts = 1;\n this._operationTimeout = null;\n this._operationTimeoutCb = null;\n this._timeout = null;\n this._operationStart = null;\n\n if (this._options.forever) {\n this._cachedTimeouts = this._timeouts.slice(0);\n }\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.reset = function() {\n this._attempts = 1;\n this._timeouts = this._originalTimeouts;\n}\n\nRetryOperation.prototype.stop = function() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n this._timeouts = [];\n this._cachedTimeouts = null;\n};\n\nRetryOperation.prototype.retry = function(err) {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n if (!err) {\n return false;\n }\n var currentTime = new Date().getTime();\n if (err && currentTime - this._operationStart >= this._maxRetryTime) {\n this._errors.unshift(new Error('RetryOperation timeout occurred'));\n return false;\n }\n\n this._errors.push(err);\n\n var timeout = this._timeouts.shift();\n if (timeout === undefined) {\n if (this._cachedTimeouts) {\n // retry forever, only keep last error\n this._errors.splice(this._errors.length - 1, this._errors.length);\n this._timeouts = this._cachedTimeouts.slice(0);\n timeout = this._timeouts.shift();\n } else {\n return false;\n }\n }\n\n var self = this;\n var timer = setTimeout(function() {\n self._attempts++;\n\n if (self._operationTimeoutCb) {\n self._timeout = setTimeout(function() {\n self._operationTimeoutCb(self._attempts);\n }, self._operationTimeout);\n\n if (self._options.unref) {\n self._timeout.unref();\n }\n }\n\n self._fn(self._attempts);\n }, timeout);\n\n if (this._options.unref) {\n timer.unref();\n }\n\n return true;\n};\n\nRetryOperation.prototype.attempt = function(fn, timeoutOps) {\n this._fn = fn;\n\n if (timeoutOps) {\n if (timeoutOps.timeout) {\n this._operationTimeout = timeoutOps.timeout;\n }\n if (timeoutOps.cb) {\n this._operationTimeoutCb = timeoutOps.cb;\n }\n }\n\n var self = this;\n if (this._operationTimeoutCb) {\n this._timeout = setTimeout(function() {\n self._operationTimeoutCb();\n }, self._operationTimeout);\n }\n\n this._operationStart = new Date().getTime();\n\n this._fn(this._attempts);\n};\n\nRetryOperation.prototype.try = function(fn) {\n console.log('Using RetryOperation.try() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = function(fn) {\n console.log('Using RetryOperation.start() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = RetryOperation.prototype.try;\n\nRetryOperation.prototype.errors = function() {\n return this._errors;\n};\n\nRetryOperation.prototype.attempts = function() {\n return this._attempts;\n};\n\nRetryOperation.prototype.mainError = function() {\n if (this._errors.length === 0) {\n return null;\n }\n\n var counts = {};\n var mainError = null;\n var mainErrorCount = 0;\n\n for (var i = 0; i < this._errors.length; i++) {\n var error = this._errors[i];\n var message = error.message;\n var count = (counts[message] || 0) + 1;\n\n counts[message] = count;\n\n if (count >= mainErrorCount) {\n mainError = error;\n mainErrorCount = count;\n }\n }\n\n return mainError;\n};\n", "var RetryOperation = require('./retry_operation');\n\nexports.operation = function(options) {\n var timeouts = exports.timeouts(options);\n return new RetryOperation(timeouts, {\n forever: options && options.forever,\n unref: options && options.unref,\n maxRetryTime: options && options.maxRetryTime\n });\n};\n\nexports.timeouts = function(options) {\n if (options instanceof Array) {\n return [].concat(options);\n }\n\n var opts = {\n retries: 10,\n factor: 2,\n minTimeout: 1 * 1000,\n maxTimeout: Infinity,\n randomize: false\n };\n for (var key in options) {\n opts[key] = options[key];\n }\n\n if (opts.minTimeout > opts.maxTimeout) {\n throw new Error('minTimeout is greater than maxTimeout');\n }\n\n var timeouts = [];\n for (var i = 0; i < opts.retries; i++) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n if (options && options.forever && !timeouts.length) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n // sort the array numerically ascending\n timeouts.sort(function(a,b) {\n return a - b;\n });\n\n return timeouts;\n};\n\nexports.createTimeout = function(attempt, opts) {\n var random = (opts.randomize)\n ? (Math.random() + 1)\n : 1;\n\n var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));\n timeout = Math.min(timeout, opts.maxTimeout);\n\n return timeout;\n};\n\nexports.wrap = function(obj, options, methods) {\n if (options instanceof Array) {\n methods = options;\n options = null;\n }\n\n if (!methods) {\n methods = [];\n for (var key in obj) {\n if (typeof obj[key] === 'function') {\n methods.push(key);\n }\n }\n }\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n var original = obj[method];\n\n obj[method] = function retryWrapper(original) {\n var op = exports.operation(options);\n var args = Array.prototype.slice.call(arguments, 1);\n var callback = args.pop();\n\n args.push(function(err) {\n if (op.retry(err)) {\n return;\n }\n if (err) {\n arguments[0] = op.mainError();\n }\n callback.apply(this, arguments);\n });\n\n op.attempt(function() {\n original.apply(obj, args);\n });\n }.bind(obj, original);\n obj[method].options = options;\n }\n};\n", "module.exports = require('./lib/retry');", "'use strict';\n\nvar errcode = require('err-code');\nvar retry = require('retry');\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n\nfunction isRetryError(err) {\n return err && err.code === 'EPROMISERETRY' && hasOwn.call(err, 'retried');\n}\n\nfunction promiseRetry(fn, options) {\n var temp;\n var operation;\n\n if (typeof fn === 'object' && typeof options === 'function') {\n // Swap options and fn when using alternate signature (options, fn)\n temp = options;\n options = fn;\n fn = temp;\n }\n\n operation = retry.operation(options);\n\n return new Promise(function (resolve, reject) {\n operation.attempt(function (number) {\n Promise.resolve()\n .then(function () {\n return fn(function (err) {\n if (isRetryError(err)) {\n err = err.retried;\n }\n\n throw errcode(new Error('Retrying'), 'EPROMISERETRY', { retried: err });\n }, number);\n })\n .then(resolve, function (err) {\n if (isRetryError(err)) {\n err = err.retried;\n\n if (operation.retry(err || new Error())) {\n return;\n }\n }\n\n reject(err);\n });\n });\n });\n}\n\nmodule.exports = promiseRetry;\n", null, "{\n \"name\": \"expo-server-sdk\",\n \"version\": \"4.0.0\",\n \"description\": \"Server-side library for working with Expo using Node.js\",\n \"main\": \"build/ExpoClient.js\",\n \"types\": \"build/ExpoClient.d.ts\",\n \"files\": [\n \"build\"\n ],\n \"engines\": {\n \"node\": \">=20\"\n },\n \"scripts\": {\n \"build\": \"yarn prepack\",\n \"lint\": \"eslint\",\n \"prepack\": \"tsc --project tsconfig.build.json\",\n \"test\": \"jest\",\n \"tsc\": \"tsc\",\n \"watch\": \"tsc --watch\"\n },\n \"jest\": {\n \"coverageDirectory\": \"/../coverage\",\n \"coverageThreshold\": {\n \"global\": {\n \"branches\": 100,\n \"functions\": 100,\n \"lines\": 100,\n \"statements\": 0\n }\n },\n \"preset\": \"ts-jest\",\n \"rootDir\": \"src\",\n \"testEnvironment\": \"node\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/expo/expo-server-sdk-node.git\"\n },\n \"keywords\": [\n \"expo\",\n \"push-notifications\"\n ],\n \"author\": \"support@expo.dev\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/expo/expo-server-sdk-node/issues\"\n },\n \"homepage\": \"https://github.com/expo/expo-server-sdk-node#readme\",\n \"dependencies\": {\n \"node-fetch\": \"^2.6.0\",\n \"promise-limit\": \"^2.7.0\",\n \"promise-retry\": \"^2.0.1\"\n },\n \"devDependencies\": {\n \"@tsconfig/node20\": \"20.1.6\",\n \"@tsconfig/strictest\": \"2.0.5\",\n \"@types/node\": \"22.17.2\",\n \"@types/node-fetch\": \"2.6.12\",\n \"@types/promise-retry\": \"1.1.6\",\n \"eslint\": \"9.33.0\",\n \"eslint-config-universe\": \"15.0.3\",\n \"jest\": \"29.7.0\",\n \"jiti\": \"2.4.2\",\n \"msw\": \"2.10.5\",\n \"prettier\": \"3.6.2\",\n \"ts-jest\": \"29.4.1\",\n \"typescript\": \"5.9.2\"\n },\n \"packageManager\": \"yarn@4.9.2\"\n}\n", null, "/**\n * This file contains constants that are used throughout the application\n * to avoid hardcoding strings in multiple places\n */\n\n// User role and designation constants\nexport const READABLE_ORDER_ID_KEY = 'readableOrderId';\n\n// Queue constants\nexport const NOTIFS_QUEUE = 'notifications';\nexport const OTP_COMMENT_NAME='otp-comment'\n\n// Notification message constants\nexport const ORDER_PLACED_MESSAGE = 'Your order has been placed successfully!';\nexport const PAYMENT_FAILED_MESSAGE = 'Payment failed. Please try again.';\nexport const ORDER_PACKAGED_MESSAGE = 'Your order has been packaged and is ready for delivery.';\nexport const ORDER_OUT_FOR_DELIVERY_MESSAGE = 'Your order is out for delivery.';\nexport const ORDER_DELIVERED_MESSAGE = 'Your order has been delivered.';\nexport const ORDER_CANCELLED_MESSAGE = 'Your order has been cancelled.';\nexport const REFUND_INITIATED_MESSAGE = 'Refund has been initiated for your order.';\nexport const WELCOME_MESSAGE = 'Welcome to Farm2Door! Thank you for joining us.';\n\nexport const REFUND_STATUS = {\n PENDING: 'none',\n NOT_APPLICABLE: 'na',\n PROCESSING: 'initiated',\n SUCCESS: 'success',\n};", "// import { Queue, Worker } from 'bullmq';\nimport { Expo } from 'expo-server-sdk';\nimport { redisUrl } from '@/src/lib/env-exporter'\n// import { db } from '@/src/db/db_index'\nimport { generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport {\n NOTIFS_QUEUE,\n ORDER_PLACED_MESSAGE,\n PAYMENT_FAILED_MESSAGE,\n ORDER_PACKAGED_MESSAGE,\n ORDER_OUT_FOR_DELIVERY_MESSAGE,\n ORDER_DELIVERED_MESSAGE,\n ORDER_CANCELLED_MESSAGE,\n REFUND_INITIATED_MESSAGE\n} from '@/src/lib/const-strings';\n\n\nexport const notificationQueue:any = {};\n\n// export const notificationQueue = new Queue(NOTIFS_QUEUE, {\n// connection: { url: redisUrl },\n// defaultJobOptions: {\n// removeOnComplete: true,\n// removeOnFail: 10,\n// attempts: 3,\n// },\n// });\n\nexport const notificationWorker:any = {};\n// export const notificationWorker = new Worker(NOTIFS_QUEUE, async (job) => {\n// if (!job) return;\n//\n// const { name, data } = job;\n// console.log(`Processing notification job ${job.id} - ${name}`);\n//\n// if (name === 'send-admin-notification') {\n// await sendAdminNotification(data);\n// } else if (name === 'send-notification') {\n// // Handle legacy notification type\n// console.log('Legacy notification job - not implemented yet');\n// }\n// }, {\n// connection: { url: redisUrl },\n// concurrency: 5,\n// });\n\nasync function sendAdminNotification(data: {\n token: string;\n title: string;\n body: string;\n imageUrl: string | null;\n}) {\n const { token, title, body, imageUrl } = data;\n \n // Validate Expo push token\n if (!Expo.isExpoPushToken(token)) {\n console.error(`Invalid Expo push token: ${token}`);\n return;\n }\n \n // Generate signed URL for image if provided\n const signedImageUrl = imageUrl ? await generateSignedUrlFromS3Url(imageUrl) : null;\n \n // Send notification\n const expo = new Expo();\n const message = {\n to: token,\n sound: 'default',\n title,\n body,\n data: { imageUrl },\n ...(signedImageUrl ? {\n attachments: [\n {\n url: signedImageUrl,\n contentType: 'image/jpeg',\n }\n ]\n } : {}),\n };\n \n try {\n const [ticket] = await expo.sendPushNotificationsAsync([message]);\n console.log(`Notification sent:`, ticket);\n } catch (error) {\n console.error(`Failed to send notification:`, error);\n throw error;\n }\n}\n\n// notificationWorker.on('completed', (job) => {\n// if (job) console.log(`Notification job ${job.id} completed`);\n// });\n// notificationWorker.on('failed', (job, err) => {\n// if (job) console.error(`Notification job ${job.id} failed:`, err);\n// });\n\nexport async function scheduleNotification(userId: number, payload: any, options?: { delay?: number; priority?: number }) {\n const jobData = { userId, ...payload };\n await notificationQueue.add('send-notification', jobData, options);\n}\n\n// Utility methods for specific notification events\nexport async function sendOrderPlacedNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Order Placed',\n body: ORDER_PLACED_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendPaymentFailedNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Payment Failed',\n body: PAYMENT_FAILED_MESSAGE,\n type: 'payment',\n orderId\n });\n}\n\nexport async function sendOrderPackagedNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Order Packaged',\n body: ORDER_PACKAGED_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendOrderOutForDeliveryNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Out for Delivery',\n body: ORDER_OUT_FOR_DELIVERY_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendOrderDeliveredNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Order Delivered',\n body: ORDER_DELIVERED_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendOrderCancelledNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Order Cancelled',\n body: ORDER_CANCELLED_MESSAGE,\n type: 'order',\n orderId\n });\n}\n\nexport async function sendRefundInitiatedNotification(userId: number, orderId?: string) {\n await scheduleNotification(userId, {\n title: 'Refund Initiated',\n body: REFUND_INITIATED_MESSAGE,\n type: 'refund',\n orderId\n });\n}\n//\n// process.on('SIGTERM', async () => {\n// await notificationQueue.close();\n// await notificationWorker.close();\n// });\n", "// import { createClient, RedisClientType } from 'redis';\nimport { redisUrl } from '@/src/lib/env-exporter'\n\nconst createClient = (args:any) => {}\nclass RedisClient {\n // private client: RedisClientType;\n // private subscriberClient: RedisClientType | null = null;\n // private isConnected: boolean = false;\n //\n private client: any;\n private subscriberrlient: any;\n private isConnected: any = false;\n\n\n constructor() {\n this.client = createClient({\n url: redisUrl,\n });\n\n // this.client.on('error', (err) => {\n // console.error('Redis Client Error:', err);\n // });\n //\n // this.client.on('connect', () => {\n // console.log('Redis Client Connected');\n // this.isConnected = true;\n // });\n //\n // this.client.on('disconnect', () => {\n // console.log('Redis Client Disconnected');\n // this.isConnected = false;\n // });\n //\n // this.client.on('ready', () => {\n // console.log('Redis Client Ready');\n // });\n //\n // this.client.on('reconnecting', () => {\n // console.log('Redis Client Reconnecting');\n // });\n\n // Connect immediately (fire and forget)\n // this.client.connect().catch((err) => {\n // console.error('Failed to connect Redis:', err);\n // });\n }\n\n async set(key: string, value: string, ttlSeconds?: number): Promise {\n if (ttlSeconds) {\n return await this.client.setEx(key, ttlSeconds, value);\n } else {\n return await this.client.set(key, value);\n }\n }\n\n async get(key: string): Promise {\n return await this.client.get(key);\n }\n\n async exists(key: string): Promise {\n const result = await this.client.exists(key);\n return result === 1;\n }\n\n async delete(key: string): Promise {\n return await this.client.del(key);\n }\n\n async lPush(key: string, value: string): Promise {\n return await this.client.lPush(key, value);\n }\n\n async KEYS(pattern: string): Promise {\n return await this.client.KEYS(pattern);\n }\n\n async MGET(keys: string[]): Promise<(string | null)[]> {\n return await this.client.MGET(keys);\n }\n\n // Publish message to a channel\n async publish(channel: string, message: string): Promise {\n return await this.client.publish(channel, message);\n }\n\n // Subscribe to a channel with callback\n async subscribe(channel: string, callback: (message: string) => void): Promise {\n // if (!this.subscriberClient) {\n // this.subscriberClient = createClient({\n // url: redisUrl,\n // });\n //\n // this.subscriberClient.on('error', (err) => {\n // console.error('Redis Subscriber Error:', err);\n // });\n //\n // this.subscriberClient.on('connect', () => {\n // console.log('Redis Subscriber Connected');\n // });\n //\n // await this.subscriberClient.connect();\n // }\n //\n // await this.subscriberClient.subscribe(channel, callback);\n console.log(`Subscribed to channel: ${channel}`);\n }\n\n // Unsubscribe from a channel\n async unsubscribe(channel: string): Promise {\n // if (this.subscriberClient) {\n // await this.subscriberClient.unsubscribe(channel);\n // console.log(`Unsubscribed from channel: ${channel}`);\n // }\n }\n\n disconnect(): void {\n // if (this.isConnected) {\n // this.client.disconnect();\n // }\n // if (this.subscriberClient) {\n // this.subscriberClient.disconnect();\n // }\n }\n\n get isClientConnected(): boolean {\n return this.isConnected;\n }\n}\n\nconst redisClient = new RedisClient();\n\nexport default redisClient;\nexport { RedisClient };\n", "'use strict';\n\n/**\n * Create a bound version of a function with a specified `this` context\n *\n * @param {Function} fn - The function to bind\n * @param {*} thisArg - The value to be passed as the `this` parameter\n * @returns {Function} A new function that will call the original function with the specified `this` context\n */\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n", "'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst { toString } = Object.prototype;\nconst { getPrototypeOf } = Object;\nconst { iterator, toStringTag } = Symbol;\n\nconst kindOf = ((cache) => (thing) => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type;\n};\n\nconst typeOfTest = (type) => (thing) => typeof thing === type;\n\n/**\n * Determine if a value is a non-null object\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst { isArray } = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return (\n val !== null &&\n !isUndefined(val) &&\n val.constructor !== null &&\n !isUndefined(val.constructor) &&\n isFunction(val.constructor.isBuffer) &&\n val.constructor.isBuffer(val)\n );\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n result = ArrayBuffer.isView(val);\n } else {\n result = val && val.buffer && isArrayBuffer(val.buffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = (thing) => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (\n (prototype === null ||\n prototype === Object.prototype ||\n Object.getPrototypeOf(prototype) === null) &&\n !(toStringTag in val) &&\n !(iterator in val)\n );\n};\n\n/**\n * Determine if a value is an empty object (safely handles Buffers)\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an empty object, otherwise false\n */\nconst isEmptyObject = (val) => {\n // Early return for non-objects or Buffers to prevent RangeError\n if (!isObject(val) || isBuffer(val)) {\n return false;\n }\n\n try {\n return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;\n } catch (e) {\n // Fallback for any other objects that might cause RangeError with Object.keys()\n return false;\n }\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a React Native Blob\n * React Native \"blob\": an object with a `uri` attribute. Optionally, it can\n * also have a `name` and `type` attribute to specify filename and content type\n *\n * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71\n * \n * @param {*} value The value to test\n * \n * @returns {boolean} True if value is a React Native Blob, otherwise false\n */\nconst isReactNativeBlob = (value) => {\n return !!(value && typeof value.uri !== 'undefined');\n}\n\n/**\n * Determine if environment is React Native\n * ReactNative `FormData` has a non-standard `getParts()` method\n * \n * @param {*} formData The formData to test\n * \n * @returns {boolean} True if environment is React Native, otherwise false\n */\nconst isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction getGlobal() {\n if (typeof globalThis !== 'undefined') return globalThis;\n if (typeof self !== 'undefined') return self;\n if (typeof window !== 'undefined') return window;\n if (typeof global !== 'undefined') return global;\n return {};\n}\n\nconst G = getGlobal();\nconst FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;\n\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (FormDataCtor && thing instanceof FormDataCtor) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n );\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = [\n 'ReadableStream',\n 'Request',\n 'Response',\n 'Headers',\n].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => {\n return str.trim ? str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n};\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, { allOwnKeys = false } = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Buffer check\n if (isBuffer(obj)) {\n return;\n }\n\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\n/**\n * Finds a key in an object, case-insensitive, returning the actual key name.\n * Returns null if the object is a Buffer or if no match is found.\n *\n * @param {Object} obj - The object to search.\n * @param {string} key - The key to find (case-insensitive).\n * @returns {?string} The actual key name if found, otherwise null.\n */\nfunction findKey(obj, key) {\n if (isBuffer(obj)) {\n return null;\n }\n\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== 'undefined') return globalThis;\n return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * const result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};\n const result = {};\n const assignValue = (val, key) => {\n // Skip dangerous property names to prevent prototype pollution\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return;\n }\n\n const targetKey = (caseless && findKey(result, key)) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else if (!skipUndefined || !isUndefined(val)) {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, { allOwnKeys } = {}) => {\n forEach(\n b,\n (val, key) => {\n if (thisArg && isFunction(val)) {\n Object.defineProperty(a, key, {\n value: bind(val, thisArg),\n writable: true,\n enumerable: true,\n configurable: true,\n });\n } else {\n Object.defineProperty(a, key, {\n value: val,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n },\n { allOwnKeys }\n );\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xfeff) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n Object.defineProperty(constructor.prototype, 'constructor', {\n value: constructor,\n writable: true,\n enumerable: false,\n configurable: true,\n });\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype,\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = ((TypedArray) => {\n // eslint-disable-next-line func-names\n return (thing) => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[iterator];\n\n const _iterator = generator.call(obj);\n\n let result;\n\n while ((result = _iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = (str) => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g, function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n });\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (\n ({ hasOwnProperty }) =>\n (obj, prop) =>\n hasOwnProperty.call(obj, prop)\n)(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error(\"Can not rewrite read-only method '\" + name + \"'\");\n };\n }\n });\n};\n\n/**\n * Converts an array or a delimited string into an object set with values as keys and true as values.\n * Useful for fast membership checks.\n *\n * @param {Array|string} arrayOrString - The array or string to convert.\n * @param {string} delimiter - The delimiter to use if input is a string.\n * @returns {Object} An object with keys from the array or string, values set to true.\n */\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach((value) => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite((value = +value)) ? value : defaultValue;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(\n thing &&\n isFunction(thing.append) &&\n thing[toStringTag] === 'FormData' &&\n thing[iterator]\n );\n}\n\n/**\n * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.\n *\n * @param {Object} obj - The object to convert.\n * @returns {Object} The JSON-compatible object.\n */\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n //Buffer check\n if (isBuffer(source)) {\n return source;\n }\n\n if (!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\n/**\n * Determines if a value is an async function.\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is an async function, otherwise false.\n */\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\n/**\n * Determines if a value is thenable (has then and catch methods).\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is thenable, otherwise false.\n */\nconst isThenable = (thing) =>\n thing &&\n (isObject(thing) || isFunction(thing)) &&\n isFunction(thing.then) &&\n isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\n/**\n * Provides a cross-platform setImmediate implementation.\n * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.\n *\n * @param {boolean} setImmediateSupported - Whether setImmediate is supported.\n * @param {boolean} postMessageSupported - Whether postMessage is supported.\n * @returns {Function} A function to schedule a callback asynchronously.\n */\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported\n ? ((token, callbacks) => {\n _global.addEventListener(\n 'message',\n ({ source, data }) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n },\n false\n );\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, '*');\n };\n })(`axios@${Math.random()}`, [])\n : (cb) => setTimeout(cb);\n})(typeof setImmediate === 'function', isFunction(_global.postMessage));\n\n/**\n * Schedules a microtask or asynchronous callback as soon as possible.\n * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.\n *\n * @type {Function}\n */\nconst asap =\n typeof queueMicrotask !== 'undefined'\n ? queueMicrotask.bind(_global)\n : (typeof process !== 'undefined' && process.nextTick) || _setImmediate;\n\n// *********************\n\nconst isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isEmptyObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isReactNativeBlob,\n isReactNative,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap,\n isIterable,\n};\n", "'use strict';\n\nimport utils from '../utils.js';\n\nclass AxiosError extends Error {\n static from(error, code, config, request, response, customProps) {\n const axiosError = new AxiosError(error.message, code || error.code, config, request, response);\n axiosError.cause = error;\n axiosError.name = error.name;\n\n // Preserve status from the original error if not already set from response\n if (error.status != null && axiosError.status == null) {\n axiosError.status = error.status;\n }\n\n customProps && Object.assign(axiosError, customProps);\n return axiosError;\n }\n\n /**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\n constructor(message, code, config, request, response) {\n super(message);\n \n // Make message enumerable to maintain backward compatibility\n // The native Error constructor sets message as non-enumerable,\n // but axios < v1.13.3 had it as enumerable\n Object.defineProperty(this, 'message', {\n value: message,\n enumerable: true,\n writable: true,\n configurable: true\n });\n \n this.name = 'AxiosError';\n this.isAxiosError = true;\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status;\n }\n }\n\n toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.status,\n };\n }\n}\n\n// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.\nAxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';\nAxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';\nAxiosError.ECONNABORTED = 'ECONNABORTED';\nAxiosError.ETIMEDOUT = 'ETIMEDOUT';\nAxiosError.ERR_NETWORK = 'ERR_NETWORK';\nAxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';\nAxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';\nAxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';\nAxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';\nAxiosError.ERR_CANCELED = 'ERR_CANCELED';\nAxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';\nAxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';\n\nexport default AxiosError;\n", "// eslint-disable-next-line strict\nexport default null;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path\n .concat(key)\n .map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n })\n .join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(\n options,\n {\n metaTokens: true,\n dots: false,\n indexes: false,\n },\n false,\n function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n }\n );\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (utils.isBoolean(value)) {\n return value.toString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (utils.isReactNative(formData) && utils.isReactNativeBlob(value)) {\n formData.append(renderKey(path, key, dots), convertValue(value));\n return false;\n }\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value)))\n ) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) &&\n formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true\n ? renderKey([key], index, dots)\n : indexes === null\n ? key\n : key + '[]',\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable,\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result =\n !(utils.isUndefined(el) || el === null) &&\n visitor.call(formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers);\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n", "'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00',\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder\n ? function (value) {\n return encoder.call(this, value, encode);\n }\n : encode;\n\n return this._pairs\n .map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '')\n .join('&');\n};\n\nexport default AxiosURLSearchParams;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val)\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',')\n .replace(/%20/g, '+');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n if (!params) {\n return url;\n }\n\n const _encode = (options && options.encode) || encode;\n\n const _options = utils.isFunction(options)\n ? {\n serialize: options,\n }\n : options;\n\n const serializeFn = _options && _options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, _options);\n } else {\n serializedParams = utils.isURLSearchParams(params)\n ? params.toString()\n : new AxiosURLSearchParams(params, _options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf('#');\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n", "'use strict';\n\nimport utils from '../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n * @param {Object} options The options for the interceptor, synchronous and runWhen\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null,\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {void}\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n", "'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false,\n legacyInterceptorReqResOrdering: true,\n};\n", "'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n", "'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n", "'use strict';\n\nexport default typeof Blob !== 'undefined' ? Blob : null;\n", "import URLSearchParams from './classes/URLSearchParams.js';\nimport FormData from './classes/FormData.js';\nimport Blob from './classes/Blob.js';\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob,\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],\n};\n", "const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = (typeof navigator === 'object' && navigator) || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv =\n hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = (hasBrowserEnv && window.location.href) || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin,\n};\n", "import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform,\n};\n", "'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), {\n visitor: function (value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n },\n ...options,\n });\n}\n", "'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map((match) => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [\n function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if (\n (isFileList = utils.isFileList(data)) ||\n contentType.indexOf('multipart/form-data') > -1\n ) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? { 'files[]': data } : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n },\n ],\n\n transformResponse: [\n function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (\n data &&\n utils.isString(data) &&\n ((forcedJSONParsing && !this.responseType) || JSONRequested)\n ) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data, this.parseReviver);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n },\n ],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob,\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': undefined,\n },\n },\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n", "'use strict';\n\nimport utils from '../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age',\n 'authorization',\n 'content-length',\n 'content-type',\n 'etag',\n 'expires',\n 'from',\n 'host',\n 'if-modified-since',\n 'if-unmodified-since',\n 'last-modified',\n 'location',\n 'max-forwards',\n 'proxy-authorization',\n 'referer',\n 'retry-after',\n 'user-agent',\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default (rawHeaders) => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders &&\n rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n", "'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header\n .trim()\n .toLowerCase()\n .replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach((methodName) => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function (arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true,\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if (\n !key ||\n self[key] === undefined ||\n _rewrite === true ||\n (_rewrite === undefined && self[key] !== false)\n ) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isObject(header) && utils.isIterable(header)) {\n let obj = {},\n dest,\n key;\n for (const entry of header) {\n if (!utils.isArray(entry)) {\n throw TypeError('Object iterator must return a key-value pair');\n }\n\n obj[(key = entry[0])] = (dest = obj[key])\n ? utils.isArray(dest)\n ? [...dest, entry[1]]\n : [dest, entry[1]]\n : entry[1];\n }\n\n setHeaders(obj, valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(\n key &&\n this[key] !== undefined &&\n (!matcher || matchHeaderValue(this, this[key], key, matcher))\n );\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null &&\n value !== false &&\n (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON())\n .map(([header, value]) => header + ': ' + value)\n .join('\\n');\n }\n\n getSetCookie() {\n return this.get('set-cookie') || [];\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals =\n (this[$internals] =\n this[$internals] =\n {\n accessors: {},\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor([\n 'Content-Type',\n 'Content-Length',\n 'Accept',\n 'Accept-Encoding',\n 'User-Agent',\n 'Authorization',\n]);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n },\n };\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n", "'use strict';\n\nimport utils from '../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n", "'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n", "'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\n\nclass CanceledError extends AxiosError {\n /**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\n constructor(message, config, request) {\n super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n this.__CANCEL__ = true;\n }\n}\n\nexport default CanceledError;\n", "'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(\n new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][\n Math.floor(response.status / 100) - 4\n ],\n response.config,\n response.request,\n response\n )\n );\n }\n}\n", "'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return (match && match[1]) || '';\n}\n", "'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round((bytesCount * 1000) / passed) : undefined;\n };\n}\n\nexport default speedometer;\n", "/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn(...args);\n };\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if (passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs);\n }, threshold - passed);\n }\n }\n };\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n", "import speedometer from './speedometer.js';\nimport throttle from './throttle.js';\nimport utils from '../utils.js';\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle((e) => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? loaded / total : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true,\n };\n\n listener(data);\n }, freq);\n};\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [\n (loaded) =>\n throttled[0]({\n lengthComputable,\n total,\n loaded,\n }),\n throttled[1],\n ];\n};\n\nexport const asyncDecorator =\n (fn) =>\n (...args) =>\n utils.asap(() => fn(...args));\n", "import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n })(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n )\n : () => true;\n", "import utils from '../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n ? // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure, sameSite) {\n if (typeof document === 'undefined') return;\n\n const cookie = [`${name}=${encodeURIComponent(value)}`];\n\n if (utils.isNumber(expires)) {\n cookie.push(`expires=${new Date(expires).toUTCString()}`);\n }\n if (utils.isString(path)) {\n cookie.push(`path=${path}`);\n }\n if (utils.isString(domain)) {\n cookie.push(`domain=${domain}`);\n }\n if (secure === true) {\n cookie.push('secure');\n }\n if (utils.isString(sameSite)) {\n cookie.push(`SameSite=${sameSite}`);\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n if (typeof document === 'undefined') return null;\n const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));\n return match ? decodeURIComponent(match[1]) : null;\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000, '/');\n },\n }\n : // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {},\n };\n", "'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n if (typeof url !== 'string') {\n return false;\n }\n\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n", "'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n", "'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n", "'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst headersToObject = (thing) => (thing instanceof AxiosHeaders ? { ...thing } : thing);\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({ caseless }, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(a, b, prop, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b, prop) =>\n mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),\n };\n\n utils.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {\n if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;\n const merge = utils.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n", "import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport isURLSameOrigin from './isURLSameOrigin.js';\nimport cookies from './cookies.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport mergeConfig from '../core/mergeConfig.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport buildURL from './buildURL.js';\n\nexport default (config) => {\n const newConfig = mergeConfig({}, config);\n\n let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(\n buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),\n config.params,\n config.paramsSerializer\n );\n\n // HTTP basic authentication\n if (auth) {\n headers.set(\n 'Authorization',\n 'Basic ' +\n btoa(\n (auth.username || '') +\n ':' +\n (auth.password ? unescape(encodeURIComponent(auth.password)) : '')\n )\n );\n }\n\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // browser handles it\n } else if (utils.isFunction(data.getHeaders)) {\n // Node.js FormData (like form-data package)\n const formHeaders = data.getHeaders();\n // Only set safe headers to avoid overwriting security headers\n const allowedHeaders = ['content-type', 'content-length'];\n Object.entries(formHeaders).forEach(([key, val]) => {\n if (allowedHeaders.includes(key.toLowerCase())) {\n headers.set(key, val);\n }\n });\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n};\n", "import utils from '../utils.js';\nimport settle from '../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport { progressEventReducer } from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported &&\n function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let { responseType, onUploadProgress, onDownloadProgress } = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData =\n !responseType || responseType === 'text' || responseType === 'json'\n ? request.responseText\n : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request,\n };\n\n settle(\n function _resolve(value) {\n resolve(value);\n done();\n },\n function _reject(err) {\n reject(err);\n done();\n },\n response\n );\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (\n request.status === 0 &&\n !(request.responseURL && request.responseURL.indexOf('file:') === 0)\n ) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError(event) {\n // Browsers deliver a ProgressEvent in XHR onerror\n // (message may be empty; when present, surface it)\n // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event\n const msg = event && event.message ? event.message : 'Network Error';\n const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);\n // attach the underlying event for consumers who want details\n err.event = event || null;\n reject(err);\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout\n ? 'timeout of ' + _config.timeout + 'ms exceeded'\n : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(\n new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request\n )\n );\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = (cancel) => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted\n ? onCanceled()\n : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(\n new AxiosError(\n 'Unsupported protocol ' + protocol + ':',\n AxiosError.ERR_BAD_REQUEST,\n config\n )\n );\n return;\n }\n\n // Send the request\n request.send(requestData || null);\n });\n };\n", "import CanceledError from '../cancel/CanceledError.js';\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n const { length } = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(\n err instanceof AxiosError\n ? err\n : new CanceledError(err instanceof Error ? err.message : err)\n );\n }\n };\n\n let timer =\n timeout &&\n setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));\n }, timeout);\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach((signal) => {\n signal.unsubscribe\n ? signal.unsubscribe(onabort)\n : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n };\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const { signal } = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n }\n};\n\nexport default composeSignals;\n", "export const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n};\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n};\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n};\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n };\n\n return new ReadableStream(\n {\n async pull(controller) {\n try {\n const { done, value } = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = (bytes += len);\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n },\n },\n {\n highWaterMark: 2,\n }\n );\n};\n", "import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport composeSignals from '../helpers/composeSignals.js';\nimport { trackStream } from '../helpers/trackStream.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {\n progressEventReducer,\n progressEventDecorator,\n asyncDecorator,\n} from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\nimport settle from '../core/settle.js';\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst { isFunction } = utils;\n\nconst globalFetchAPI = (({ Request, Response }) => ({\n Request,\n Response,\n}))(utils.global);\n\nconst { ReadableStream, TextEncoder } = utils.global;\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false;\n }\n};\n\nconst factory = (env) => {\n env = utils.merge.call(\n {\n skipUndefined: true,\n },\n globalFetchAPI,\n env\n );\n\n const { fetch: envFetch, Request, Response } = env;\n const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';\n const isRequestSupported = isFunction(Request);\n const isResponseSupported = isFunction(Response);\n\n if (!isFetchSupported) {\n return false;\n }\n\n const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);\n\n const encodeText =\n isFetchSupported &&\n (typeof TextEncoder === 'function'\n ? (\n (encoder) => (str) =>\n encoder.encode(str)\n )(new TextEncoder())\n : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));\n\n const supportsRequestStream =\n isRequestSupported &&\n isReadableStreamSupported &&\n test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n });\n\n const supportsResponseStream =\n isResponseSupported &&\n isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n const resolvers = {\n stream: supportsResponseStream && ((res) => res.body),\n };\n\n isFetchSupported &&\n (() => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {\n !resolvers[type] &&\n (resolvers[type] = (res, config) => {\n let method = res && res[type];\n\n if (method) {\n return method.call(res);\n }\n\n throw new AxiosError(\n `Response type '${type}' is not supported`,\n AxiosError.ERR_NOT_SUPPORT,\n config\n );\n });\n });\n })();\n\n const getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if (utils.isBlob(body)) {\n return body.size;\n }\n\n if (utils.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if (utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if (utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if (utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n };\n\n const resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n };\n\n return async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions,\n } = resolveConfig(config);\n\n let _fetch = envFetch || fetch;\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals(\n [signal, cancelToken && cancelToken.toAbortSignal()],\n timeout\n );\n\n let request = null;\n\n const unsubscribe =\n composedSignal &&\n composedSignal.unsubscribe &&\n (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress &&\n supportsRequestStream &&\n method !== 'get' &&\n method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: 'half',\n });\n\n let contentTypeHeader;\n\n if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader);\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;\n\n const resolvedOptions = {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: 'half',\n credentials: isCredentialsSupported ? withCredentials : undefined,\n };\n\n request = isRequestSupported && new Request(url, resolvedOptions);\n\n let response = await (isRequestSupported\n ? _fetch(request, fetchOptions)\n : _fetch(url, resolvedOptions));\n\n const isStreamResponse =\n supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach((prop) => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] =\n (onDownloadProgress &&\n progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n )) ||\n [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](\n response,\n config\n );\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request,\n });\n });\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError(\n 'Network Error',\n AxiosError.ERR_NETWORK,\n config,\n request,\n err && err.response\n ),\n {\n cause: err.cause || err,\n }\n );\n }\n\n throw AxiosError.from(err, err && err.code, config, request, err && err.response);\n }\n };\n};\n\nconst seedCache = new Map();\n\nexport const getFetch = (config) => {\n let env = (config && config.env) || {};\n const { fetch, Request, Response } = env;\n const seeds = [Request, Response, fetch];\n\n let len = seeds.length,\n i = len,\n seed,\n target,\n map = seedCache;\n\n while (i--) {\n seed = seeds[i];\n target = map.get(seed);\n\n target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));\n\n map = target;\n }\n\n return target;\n};\n\nconst adapter = getFetch();\n\nexport default adapter;\n", "import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport * as fetchAdapter from './fetch.js';\nimport AxiosError from '../core/AxiosError.js';\n\n/**\n * Known adapters mapping.\n * Provides environment-specific adapters for Axios:\n * - `http` for Node.js\n * - `xhr` for browsers\n * - `fetch` for fetch API-based requests\n *\n * @type {Object}\n */\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: {\n get: fetchAdapter.getFetch,\n },\n};\n\n// Assign adapter names for easier debugging and identification\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', { value });\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', { value });\n }\n});\n\n/**\n * Render a rejection reason string for unknown or unsupported adapters\n *\n * @param {string} reason\n * @returns {string}\n */\nconst renderReason = (reason) => `- ${reason}`;\n\n/**\n * Check if the adapter is resolved (function, null, or false)\n *\n * @param {Function|null|false} adapter\n * @returns {boolean}\n */\nconst isResolvedHandle = (adapter) =>\n utils.isFunction(adapter) || adapter === null || adapter === false;\n\n/**\n * Get the first suitable adapter from the provided list.\n * Tries each adapter in order until a supported one is found.\n * Throws an AxiosError if no adapter is suitable.\n *\n * @param {Array|string|Function} adapters - Adapter(s) by name or function.\n * @param {Object} config - Axios request configuration\n * @throws {AxiosError} If no suitable adapter is available\n * @returns {Function} The resolved adapter function\n */\nfunction getAdapter(adapters, config) {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const { length } = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n const reasons = Object.entries(rejectedReasons).map(\n ([id, state]) =>\n `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length\n ? reasons.length > 1\n ? 'since :\\n' + reasons.map(renderReason).join('\\n')\n : ' ' + renderReason(reasons[0])\n : 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n}\n\n/**\n * Exports Axios adapters and utility to resolve an adapter\n */\nexport default {\n /**\n * Resolve an adapter from a list of adapter names or functions.\n * @type {Function}\n */\n getAdapter,\n\n /**\n * Exposes all known adapters\n * @type {Object}\n */\n adapters: knownAdapters,\n};\n", "'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from '../adapters/adapters.js';\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(config, config.transformRequest);\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);\n\n return adapter(config).then(\n function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(config, config.transformResponse, response);\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n },\n function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n }\n );\n}\n", "export const VERSION = \"1.13.6\";", "'use strict';\n\nimport { VERSION } from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return (\n '[Axios v' +\n VERSION +\n \"] Transitional option '\" +\n opt +\n \"'\" +\n desc +\n (message ? '. ' + message : '')\n );\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError(\n 'option ' + opt + ' must be ' + result,\n AxiosError.ERR_BAD_OPTION_VALUE\n );\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators,\n};\n", "'use strict';\n\nimport utils from '../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\nimport transitionalDefaults from '../defaults/transitional.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig || {};\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager(),\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n try {\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n } catch (e) {\n // ignore the case where \"stack\" is an un-writable property\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const { transitional, paramsSerializer, headers } = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(\n transitional,\n {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean),\n legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),\n },\n false\n );\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer,\n };\n } else {\n validator.assertOptions(\n paramsSerializer,\n {\n encode: validators.function,\n serialize: validators.function,\n },\n true\n );\n }\n }\n\n // Set config.allowAbsoluteUrls\n if (config.allowAbsoluteUrls !== undefined) {\n // do nothing\n } else if (this.defaults.allowAbsoluteUrls !== undefined) {\n config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n } else {\n config.allowAbsoluteUrls = true;\n }\n\n validator.assertOptions(\n config,\n {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken'),\n },\n true\n );\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(headers.common, headers[config.method]);\n\n headers &&\n utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {\n delete headers[method];\n });\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n const transitional = config.transitional || transitionalDefaults;\n const legacyInterceptorReqResOrdering =\n transitional && transitional.legacyInterceptorReqResOrdering;\n\n if (legacyInterceptorReqResOrdering) {\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n } else {\n requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n }\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift(...requestInterceptorChain);\n chain.push(...responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function (url, config) {\n return this.request(\n mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data,\n })\n );\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(\n mergeConfig(config || {}, {\n method,\n headers: isForm\n ? {\n 'Content-Type': 'multipart/form-data',\n }\n : {},\n url,\n data,\n })\n );\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n", "'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then((cancel) => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = (onfulfilled) => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise((resolve) => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel,\n };\n }\n}\n\nexport default CancelToken;\n", "'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * const args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n", "'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && payload.isAxiosError === true;\n}\n", "const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n WebServerIsDown: 521,\n ConnectionTimedOut: 522,\n OriginIsUnreachable: 523,\n TimeoutOccurred: 524,\n SslHandshakeFailed: 525,\n InvalidSslCertificate: 526,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n", "'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport { VERSION } from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from './core/AxiosHeaders.js';\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, { allOwnKeys: true });\n\n // Copy context to instance\n utils.extend(instance, context, null, { allOwnKeys: true });\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = (thing) => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios;\n", "import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig,\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig,\n};\n", "import axios from 'axios';\nimport { isDevMode, telegramBotToken, telegramChatIds } from '@/src/lib/env-exporter'\n\nconst BOT_TOKEN = telegramBotToken;\nconst CHAT_IDS = telegramChatIds;\nconst TELEGRAM_API_URL = `https://api.telegram.org/bot${BOT_TOKEN}`;\n\n/**\n * Send a message to Telegram bot\n * @param message The message text to send\n * @returns Promise indicating success, failure, or null if dev mode\n */\nexport const sendTelegramMessage = async (message: string): Promise => {\n if (isDevMode) {\n return null;\n }\n try {\n const results = await Promise.all(\n CHAT_IDS.map(async (chatId) => {\n try {\n const response = await axios.post(`${TELEGRAM_API_URL}/sendMessage`, {\n chat_id: chatId,\n text: message,\n parse_mode: 'HTML',\n });\n\n if (response.data && response.data.ok) {\n console.log(`Telegram message sent successfully to ${chatId}`);\n return true;\n } else {\n console.error(`Telegram API error for ${chatId}:`, response.data);\n return false;\n }\n } catch (error) {\n console.error(`Failed to send Telegram message to ${chatId}:`, error);\n return false;\n }\n })\n ); \n\n console.log('sent telegram message successfully')\n \n\n // Return true if at least one message was sent successfully\n return results.some((result) => result);\n } catch (error) {\n console.error('Failed to send Telegram message:', error);\n return false;\n }\n};\n", "import {\n getOrdersByIdsWithFullData,\n getOrderByIdWithFullData,\n} from '@/src/dbService'\nimport redisClient from '@/src/lib/redis-client'\nimport { sendTelegramMessage } from '@/src/lib/telegram-service'\n\nconst ORDER_CHANNEL = 'orders:placed';\nconst CANCELLED_CHANNEL = 'orders:cancelled';\n\ninterface OrderIdMessage {\n orderIds: number[];\n}\n\ninterface CancellationMessage {\n orderId: number;\n cancelledBy: 'user' | 'admin';\n reason: string;\n cancelledAt: string;\n}\n\nconst formatDateTime = (dateStr: string | null | undefined): string => {\n if (!dateStr) return 'N/A';\n return new Date(dateStr).toLocaleString('en-IN', {\n dateStyle: 'medium',\n timeStyle: 'short',\n timeZone: 'Asia/Kolkata',\n });\n};\n\nconst formatOrderMessageWithFullData = (ordersData: any[]): string => {\n let message = '\uD83D\uDED2 New Order Placed\\n\\n';\n\n ordersData.forEach((order, index) => {\n message += `Order ${order.id}\\n`;\n\n message += '\uD83D\uDCE6 Items:\\n';\n order.orderItems?.forEach((item: any) => {\n message += ` \u2022 ${item.product?.name || 'Unknown'} x${item.quantity}\\n`;\n });\n\n message += `\\n\uD83D\uDCB0 Total: \u20B9${order.totalAmount}\\n`;\n\n message += `\uD83D\uDE9A Delivery: ${\n order.isFlashDelivery ? 'Flash Delivery' : formatDateTime(order.slot?.deliveryTime)\n }\\n`;\n\n message += `\\n\uD83D\uDCCD Address:\\n`;\n message += ` ${order.address?.name || 'N/A'}\\n`;\n message += ` ${order.address?.addressLine1 || ''}\\n`;\n if (order.address?.addressLine2) {\n message += ` ${order.address.addressLine2}\\n`;\n }\n message += ` ${order.address?.city || ''}, ${order.address?.state || ''} - ${order.address?.pincode || ''}\\n`;\n if (order.address?.phone) {\n message += ` \uD83D\uDCDE ${order.address.phone}\\n`;\n }\n\n if (index < ordersData.length - 1) {\n message += '\\n---\\n\\n';\n }\n });\n\n return message;\n};\n\nconst formatCancellationMessage = (orderData: any, cancellationData: CancellationMessage): string => {\n const message = `\u274C Order Cancelled\n\nOrder #${orderData.id}\n\n\uD83D\uDC64 Name: ${orderData.address?.name || 'N/A'}\n\uD83D\uDCDE Phone: ${orderData.address?.phone || 'N/A'}\n\n\uD83D\uDCE6 Items:\n${orderData.orderItems?.map((item: any) => ` \u2022 ${item.product?.name || 'Unknown'} x${item.quantity}`).join('\\n') || ' N/A'}\n\n\uD83D\uDCB0 Total: \u20B9${orderData.totalAmount}\n\uD83D\uDCB3 Refund: ${orderData.refundStatus === 'na' ? 'N/A (COD)' : orderData.refundStatus || 'Pending'}\n\n\u2753 Reason: ${cancellationData.reason}\n\uD83D\uDC64 Cancelled by: ${cancellationData.cancelledBy === 'admin' ? 'Admin' : 'User'}\n\u23F0 Time: ${formatDateTime(cancellationData.cancelledAt)}\n`;\n\n return message;\n};\n\n/**\n * Start the post order handler\n * Subscribes to the orders:placed channel and sends to Telegram\n */\nexport const startOrderHandler = async (): Promise => {\n try {\n console.log('Starting post order handler...');\n\n await redisClient.subscribe(ORDER_CHANNEL, async (message: string) => {\n try {\n const { orderIds }: OrderIdMessage = JSON.parse(message);\n console.log('New order received, sending to Telegram...');\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { orders } from '@/src/db/schema'\n import { inArray } from 'drizzle-orm';\n\n const ordersData = await db.query.orders.findMany({\n where: inArray(orders.id, orderIds),\n with: {\n address: true,\n orderItems: { with: { product: true } },\n slot: true,\n },\n });\n */\n\n const ordersData = await getOrdersByIdsWithFullData(orderIds);\n\n const telegramMessage = formatOrderMessageWithFullData(ordersData);\n await sendTelegramMessage(telegramMessage);\n } catch (error) {\n console.error('Failed to process order message:', error);\n await sendTelegramMessage(`\u26A0\uFE0F Error parsing order: ${message}`);\n }\n });\n\n console.log('Post order handler started successfully');\n } catch (error) {\n console.error('Failed to start post order handler:', error);\n throw error;\n }\n};\n\n/**\n * Stop the post order handler\n */\nexport const stopOrderHandler = async (): Promise => {\n try {\n await redisClient.unsubscribe(ORDER_CHANNEL);\n console.log('Post order handler stopped');\n } catch (error) {\n console.error('Error stopping post order handler:', error);\n }\n};\n\nexport const startCancellationHandler = async (): Promise => {\n try {\n console.log('Starting cancellation handler...');\n\n await redisClient.subscribe(CANCELLED_CHANNEL, async (message: string) => {\n try {\n const cancellationData: CancellationMessage = JSON.parse(message);\n console.log('Order cancellation received, sending to Telegram...');\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { orders } from '@/src/db/schema'\n import { eq } from 'drizzle-orm';\n\n const orderData = await db.query.orders.findFirst({\n where: eq(orders.id, cancellationData.orderId),\n with: {\n address: true,\n orderItems: { with: { product: true } },\n refunds: true,\n },\n });\n */\n\n const orderData = await getOrderByIdWithFullData(cancellationData.orderId);\n\n if (!orderData) {\n console.error('Order not found for cancellation:', cancellationData.orderId);\n await sendTelegramMessage(`\u26A0\uFE0F Order ${cancellationData.orderId} was cancelled but could not be found in database`);\n return;\n }\n\n const refundStatus = orderData.refunds?.[0]?.refundStatus || 'pending';\n\n const telegramMessage = formatCancellationMessage({ ...orderData, refundStatus }, cancellationData);\n await sendTelegramMessage(telegramMessage);\n } catch (error) {\n console.error('Failed to process cancellation message:', error);\n await sendTelegramMessage(`\u26A0\uFE0F Error processing cancellation: ${message}`);\n }\n });\n\n console.log('Cancellation handler started successfully');\n } catch (error) {\n console.error('Failed to start cancellation handler:', error);\n throw error;\n }\n};\n\nexport const stopCancellationHandler = async (): Promise => {\n try {\n await redisClient.unsubscribe(CANCELLED_CHANNEL);\n console.log('Cancellation handler stopped');\n } catch (error) {\n console.error('Error stopping cancellation handler:', error);\n }\n};\n\nexport const publishOrder = async (orderDetails: OrderIdMessage): Promise => {\n try {\n const message = JSON.stringify(orderDetails);\n await redisClient.publish(ORDER_CHANNEL, message);\n return true;\n } catch (error) {\n console.error('Failed to publish order:', error);\n return false;\n }\n};\n\nexport const publishFormattedOrder = async (\n createdOrders: any[],\n ordersBySlot: Map\n): Promise => {\n try {\n const orderIds = createdOrders.map(order => order.id);\n return await publishOrder({ orderIds });\n } catch (error) {\n console.error('Failed to format and publish order:', error);\n return false;\n }\n};\n\nexport const publishCancellation = async (\n orderId: number,\n cancelledBy: 'user' | 'admin',\n reason: string\n): Promise => {\n try {\n const message: CancellationMessage = {\n orderId,\n cancelledBy,\n reason,\n cancelledAt: new Date().toISOString(),\n };\n await redisClient.publish(CANCELLED_CHANNEL, JSON.stringify(message));\n console.log('Cancellation published to Redis:', orderId);\n return true;\n } catch (error) {\n console.error('Failed to publish cancellation:', error);\n return false;\n }\n};\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllUserNegativityScores as getAllUserNegativityScoresFromDb,\n getUserNegativityScore as getUserNegativityScoreFromDb,\n type UserNegativityData,\n} from '@/src/dbService'\n\nexport async function initializeUserNegativityStore(): Promise {\n try {\n console.log('Initializing user negativity store in Redis...')\n\n const results = await getAllUserNegativityScoresFromDb()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { userIncidents } from '@/src/db/schema'\n import { sum } from 'drizzle-orm'\n\n const results = await db\n .select({\n userId: userIncidents.userId,\n totalNegativityScore: sum(userIncidents.negativityScore).mapWith(Number),\n })\n .from(userIncidents)\n .groupBy(userIncidents.userId);\n */\n\n // for (const { userId, totalNegativityScore } of results) {\n // await redisClient.set(\n // `user:negativity:${userId}`,\n // totalNegativityScore.toString()\n // )\n // }\n\n console.log(`User negativity store initialized for ${results.length} users`)\n } catch (error) {\n console.error('Error initializing user negativity store:', error)\n throw error\n }\n}\n\nexport async function getUserNegativity(userId: number): Promise {\n try {\n // const key = `user:negativity:${userId}`\n // const data = await redisClient.get(key)\n //\n // if (!data) {\n // return 0\n // }\n //\n // return parseInt(data, 10)\n\n return await getUserNegativityScoreFromDb(userId)\n } catch (error) {\n console.error(`Error getting negativity score for user ${userId}:`, error)\n return 0\n }\n}\n\nexport async function getAllUserNegativityScores(): Promise> {\n try {\n // const keys = await redisClient.KEYS('user:negativity:*')\n //\n // if (keys.length === 0) return {}\n //\n // const values = await redisClient.MGET(keys)\n //\n // const result: Record = {}\n // for (let i = 0; i < keys.length; i++) {\n // const key = keys[i]\n // const value = values[i]\n //\n // const match = key.match(/user:negativity:(\\d+)/)\n // if (match && value) {\n // const userId = parseInt(match[1], 10)\n // result[userId] = parseInt(value, 10)\n // }\n // }\n //\n // return result\n\n const results = await getAllUserNegativityScoresFromDb()\n\n const result: Record = {}\n for (const { userId, totalNegativityScore } of results) {\n result[userId] = totalNegativityScore\n }\n return result\n } catch (error) {\n console.error('Error getting all user negativity scores:', error)\n return {}\n }\n}\n\nexport async function getMultipleUserNegativityScores(\n userIds: number[]\n): Promise> {\n try {\n if (userIds.length === 0) return {}\n\n // const keys = userIds.map((id) => `user:negativity:${id}`)\n //\n // const values = await redisClient.MGET(keys)\n //\n // const result: Record = {}\n // for (let i = 0; i < userIds.length; i++) {\n // const value = values[i]\n // if (value) {\n // result[userIds[i]] = parseInt(value, 10)\n // } else {\n // result[userIds[i]] = 0\n // }\n // }\n //\n // return result\n\n const result: Record = {}\n for (const userId of userIds) {\n result[userId] = await getUserNegativityScoreFromDb(userId)\n }\n return result\n } catch (error) {\n console.error('Error getting multiple user negativity scores:', error)\n return {}\n }\n}\n\nexport async function recomputeUserNegativityScore(userId: number): Promise {\n try {\n const totalScore = await getUserNegativityScoreFromDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { userIncidents } from '@/src/db/schema'\n import { eq, sum } from 'drizzle-orm'\n\n const [result] = await db\n .select({\n totalNegativityScore: sum(userIncidents.negativityScore).mapWith(Number),\n })\n .from(userIncidents)\n .where(eq(userIncidents.userId, userId))\n .limit(1);\n\n const totalScore = result?.totalNegativityScore || 0;\n */\n\n // const key = `user:negativity:${userId}`\n // await redisClient.set(key, totalScore.toString())\n } catch (error) {\n console.error(`Error recomputing negativity score for user ${userId}:`, error)\n throw error\n }\n}\n", "import { router, protectedProcedure } from \"@/src/trpc/trpc-index\"\nimport { z } from \"zod\";\nimport { ApiError } from \"@/src/lib/api-error\"\nimport {\n sendOrderPackagedNotification,\n sendOrderDeliveredNotification,\n} from \"@/src/lib/notif-job\";\nimport { publishCancellation } from \"@/src/lib/post-order-handler\"\nimport { getMultipleUserNegativityScores } from \"@/src/stores/user-negativity-store\"\nimport {\n updateOrderNotes as updateOrderNotesInDb,\n getOrderDetails as getOrderDetailsInDb,\n updateOrderPackaged as updateOrderPackagedInDb,\n updateOrderDelivered as updateOrderDeliveredInDb,\n updateOrderItemPackaging as updateOrderItemPackagingInDb,\n removeDeliveryCharge as removeDeliveryChargeInDb,\n getSlotOrders as getSlotOrdersInDb,\n updateAddressCoords as updateAddressCoordsInDb,\n getAllOrders as getAllOrdersInDb,\n rebalanceSlots as rebalanceSlotsInDb,\n cancelOrder as cancelOrderInDb,\n deleteOrderById as deleteOrderByIdInDb,\n} from '@/src/dbService'\nimport type {\n AdminCancelOrderResult,\n AdminGetAllOrdersResult,\n AdminGetSlotOrdersResult,\n AdminOrderBasicResult,\n AdminOrderDetails,\n AdminOrderItemPackagingResult,\n AdminOrderMessageResult,\n AdminOrderRow,\n AdminOrderUpdateResult,\n AdminRebalanceSlotsResult,\n} from \"@packages/shared\"\n\nconst updateOrderNotesSchema = z.object({\n orderId: z.number(),\n adminNotes: z.string(),\n});\n\nconst getOrderDetailsSchema = z.object({\n orderId: z.number(),\n});\n\nconst updatePackagedSchema = z.object({\n orderId: z.string(),\n isPackaged: z.boolean(),\n});\n\nconst updateDeliveredSchema = z.object({\n orderId: z.string(),\n isDelivered: z.boolean(),\n});\n\nconst updateOrderItemPackagingSchema = z.object({\n orderItemId: z.number(),\n isPackaged: z.boolean().optional(),\n isPackageVerified: z.boolean().optional(),\n});\n\nconst getSlotOrdersSchema = z.object({\n slotId: z.string(),\n});\n\nconst getAllOrdersSchema = z.object({\n cursor: z.number().optional(),\n limit: z.number().default(20),\n slotId: z.number().optional().nullable(),\n packagedFilter: z\n .enum([\"all\", \"packaged\", \"not_packaged\"])\n .optional()\n .default(\"all\"),\n deliveredFilter: z\n .enum([\"all\", \"delivered\", \"not_delivered\"])\n .optional()\n .default(\"all\"),\n cancellationFilter: z\n .enum([\"all\", \"cancelled\", \"not_cancelled\"])\n .optional()\n .default(\"all\"),\n flashDeliveryFilter: z\n .enum([\"all\", \"flash\", \"regular\"])\n .optional()\n .default(\"all\"),\n});\n\nexport const orderRouter = router({\n updateNotes: protectedProcedure\n .input(updateOrderNotesSchema)\n .mutation(async ({ input }): Promise => {\n const { orderId, adminNotes } = input;\n\n const result = await updateOrderNotesInDb(orderId, adminNotes || null)\n\n /*\n // Old implementation - direct DB query:\n const result = await db\n .update(orders)\n .set({\n adminNotes: adminNotes || null,\n })\n .where(eq(orders.id, orderId))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Order not found\");\n }\n */\n\n if (!result) {\n throw new Error(\"Order not found\")\n }\n\n return result as AdminOrderRow;\n }),\n\n getOrderDetails: protectedProcedure\n .input(getOrderDetailsSchema)\n .query(async ({ input }): Promise => {\n const { orderId } = input;\n\n const orderDetails = await getOrderDetailsInDb(orderId)\n\n /*\n // Old implementation - direct DB queries:\n // Single optimized query with all relations\n const orderData = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n payment: true,\n paymentInfo: true,\n orderStatus: true,\n refunds: true,\n },\n });\n\n if (!orderData) {\n throw new Error(\"Order not found\");\n }\n\n // Get coupon usage for this specific order using new orderId field\n const couponUsageData = await db.query.couponUsage.findMany({\n where: eq(couponUsage.orderId, orderData.id),\n with: {\n coupon: true,\n },\n });\n\n let couponData = null;\n if (couponUsageData.length > 0) {\n // Calculate total discount from multiple coupons\n let totalDiscountAmount = 0;\n const orderTotal = parseFloat(orderData.totalAmount.toString());\n\n for (const usage of couponUsageData) {\n let discountAmount = 0;\n\n if (usage.coupon.discountPercent) {\n discountAmount =\n (orderTotal *\n parseFloat(usage.coupon.discountPercent.toString())) /\n 100;\n } else if (usage.coupon.flatDiscount) {\n discountAmount = parseFloat(usage.coupon.flatDiscount.toString());\n }\n\n // Apply max value limit if set\n if (\n usage.coupon.maxValue &&\n discountAmount > parseFloat(usage.coupon.maxValue.toString())\n ) {\n discountAmount = parseFloat(usage.coupon.maxValue.toString());\n }\n\n totalDiscountAmount += discountAmount;\n }\n\n couponData = {\n couponCode: couponUsageData\n .map((u) => u.coupon.couponCode)\n .join(\", \"),\n couponDescription: `${couponUsageData.length} coupons applied`,\n discountAmount: totalDiscountAmount,\n };\n }\n\n // Status determination from included relation\n const statusRecord = orderData.orderStatus?.[0];\n let status: \"pending\" | \"delivered\" | \"cancelled\" = \"pending\";\n if (statusRecord?.isCancelled) {\n status = \"cancelled\";\n } else if (statusRecord?.isDelivered) {\n status = \"delivered\";\n }\n\n // Always include refund data (will be null/undefined if not cancelled)\n const refund = orderData.refunds?.[0];\n\n return {\n id: orderData.id,\n readableId: orderData.id,\n userId: orderData.user.id,\n customerName: `${orderData.user.name}`,\n customerEmail: orderData.user.email,\n customerMobile: orderData.user.mobile,\n address: {\n name: orderData.address.name,\n line1: orderData.address.addressLine1,\n line2: orderData.address.addressLine2,\n city: orderData.address.city,\n state: orderData.address.state,\n pincode: orderData.address.pincode,\n phone: orderData.address.phone,\n },\n slotInfo: orderData.slot\n ? {\n time: orderData.slot.deliveryTime.toISOString(),\n sequence: orderData.slot.deliverySequence,\n }\n : null,\n isCod: orderData.isCod,\n isOnlinePayment: orderData.isOnlinePayment,\n totalAmount: parseFloat(orderData.totalAmount?.toString() || '0') - parseFloat(orderData.deliveryCharge?.toString() || '0'),\n deliveryCharge: parseFloat(orderData.deliveryCharge?.toString() || '0'),\n adminNotes: orderData.adminNotes,\n userNotes: orderData.userNotes,\n createdAt: orderData.createdAt,\n status,\n isPackaged: statusRecord?.isPackaged || false,\n isDelivered: statusRecord?.isDelivered || false,\n items: orderData.orderItems.map((item) => ({\n id: item.id,\n name: item.product.name,\n quantity: item.quantity,\n productSize: item.product.productQuantity,\n price: item.price,\n unit: item.product.unit?.shortNotation,\n amount:\n parseFloat(item.price.toString()) *\n parseFloat(item.quantity || \"0\"),\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n })),\n payment: orderData.payment\n ? {\n status: orderData.payment.status,\n gateway: orderData.payment.gateway,\n merchantOrderId: orderData.payment.merchantOrderId,\n }\n : null,\n paymentInfo: orderData.paymentInfo\n ? {\n status: orderData.paymentInfo.status,\n gateway: orderData.paymentInfo.gateway,\n merchantOrderId: orderData.paymentInfo.merchantOrderId,\n }\n : null,\n // Cancellation details (always included, null if not cancelled)\n cancelReason: statusRecord?.cancelReason || null,\n cancellationReviewed: statusRecord?.cancellationReviewed || false,\n isRefundDone: refund?.refundStatus === \"processed\" || false,\n refundStatus: refund?.refundStatus as RefundStatus,\n refundAmount: refund?.refundAmount\n ? parseFloat(refund.refundAmount.toString())\n : null,\n // Coupon information\n couponData: couponData,\n couponCode: couponData?.couponCode || null,\n couponDescription: couponData?.couponDescription || null,\n discountAmount: couponData?.discountAmount || null,\n orderStatus: statusRecord,\n refundRecord: refund,\n isFlashDelivery: orderData.isFlashDelivery,\n };\n */\n\n if (!orderDetails) {\n throw new Error('Order not found')\n }\n\n return orderDetails\n }),\n\n updatePackaged: protectedProcedure\n .input(updatePackagedSchema)\n .mutation(async ({ input }): Promise => {\n const { orderId, isPackaged } = input;\n\n const result = await updateOrderPackagedInDb(orderId, isPackaged)\n\n /*\n // Old implementation - direct DB queries:\n // Update all order items to the specified packaged state\n await db\n .update(orderItems)\n .set({ is_packaged: isPackaged })\n .where(eq(orderItems.orderId, parseInt(orderId)));\n\n // Also update the order status table for backward compatibility\n if (!isPackaged) {\n await db\n .update(orderStatus)\n .set({ isPackaged, isDelivered: false })\n .where(eq(orderStatus.orderId, parseInt(orderId)));\n } else {\n await db\n .update(orderStatus)\n .set({ isPackaged })\n .where(eq(orderStatus.orderId, parseInt(orderId)));\n }\n\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, parseInt(orderId)),\n });\n if (order) await sendOrderPackagedNotification(order.userId, orderId);\n\n return { success: true };\n */\n\n if (result.userId) await sendOrderPackagedNotification(result.userId, orderId)\n\n return { success: true, userId: result.userId }\n }),\n\n updateDelivered: protectedProcedure\n .input(updateDeliveredSchema)\n .mutation(async ({ input }): Promise => {\n const { orderId, isDelivered } = input;\n\n const result = await updateOrderDeliveredInDb(orderId, isDelivered)\n\n /*\n // Old implementation - direct DB queries:\n await db\n .update(orderStatus)\n .set({ isDelivered })\n .where(eq(orderStatus.orderId, parseInt(orderId)));\n\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, parseInt(orderId)),\n });\n if (order) await sendOrderDeliveredNotification(order.userId, orderId);\n\n return { success: true };\n */\n\n if (result.userId) await sendOrderDeliveredNotification(result.userId, orderId)\n\n return { success: true, userId: result.userId }\n }),\n\n updateOrderItemPackaging: protectedProcedure\n .input(updateOrderItemPackagingSchema)\n .mutation(async ({ input }): Promise => {\n const { orderItemId, isPackaged, isPackageVerified } = input;\n\n const result = await updateOrderItemPackagingInDb(orderItemId, isPackaged, isPackageVerified)\n\n /*\n // Old implementation - direct DB queries:\n // Validate that orderItem exists\n const orderItem = await db.query.orderItems.findFirst({\n where: eq(orderItems.id, orderItemId),\n });\n\n if (!orderItem) {\n throw new ApiError(\"Order item not found\", 404);\n }\n\n // Build update object with only provided fields\n const updateData: any = {};\n if (isPackaged !== undefined) {\n updateData.is_packaged = isPackaged;\n }\n if (isPackageVerified !== undefined) {\n updateData.is_package_verified = isPackageVerified;\n }\n\n // Update the order item\n await db\n .update(orderItems)\n .set(updateData)\n .where(eq(orderItems.id, orderItemId));\n\n return { success: true };\n */\n\n if (!result.updated) {\n throw new ApiError('Order item not found', 404)\n }\n\n return result\n }),\n\n removeDeliveryCharge: protectedProcedure\n .input(z.object({ orderId: z.number() }))\n .mutation(async ({ input }): Promise => {\n const { orderId } = input;\n\n const result = await removeDeliveryChargeInDb(orderId)\n\n /*\n // Old implementation - direct DB queries:\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n });\n\n if (!order) {\n throw new Error('Order not found');\n }\n\n const currentDeliveryCharge = parseFloat(order.deliveryCharge?.toString() || '0');\n const currentTotalAmount = parseFloat(order.totalAmount?.toString() || '0');\n const newTotalAmount = currentTotalAmount - currentDeliveryCharge;\n\n await db\n .update(orders)\n .set({ \n deliveryCharge: '0',\n totalAmount: newTotalAmount.toString()\n })\n .where(eq(orders.id, orderId));\n\n return { success: true, message: 'Delivery charge removed' };\n */\n\n if (!result) {\n throw new Error('Order not found')\n }\n\n return result\n }),\n\n getSlotOrders: protectedProcedure\n .input(getSlotOrdersSchema)\n .query(async ({ input }): Promise => {\n const { slotId } = input;\n\n const result = await getSlotOrdersInDb(slotId)\n\n /*\n // Old implementation - direct DB queries:\n const slotOrders = await db.query.orders.findMany({\n where: eq(orders.slotId, parseInt(slotId)),\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n },\n });\n\n const filteredOrders = slotOrders.filter((order) => {\n const statusRecord = order.orderStatus[0];\n return (\n order.isCod ||\n (statusRecord && statusRecord.paymentStatus === \"success\")\n );\n });\n\n const formattedOrders = filteredOrders.map((order) => {\n const statusRecord = order.orderStatus[0]; // assuming one status per order\n let status: \"pending\" | \"delivered\" | \"cancelled\" = \"pending\";\n if (statusRecord?.isCancelled) {\n status = \"cancelled\";\n } else if (statusRecord?.isDelivered) {\n status = \"delivered\";\n }\n\n const items = order.orderItems.map((item) => ({\n id: item.id,\n name: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n amount: parseFloat(item.quantity) * parseFloat(item.price.toString()),\n unit: item.product.unit?.shortNotation || \"\",\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n }));\n\n return {\n id: order.id,\n readableId: order.id,\n customerName: order.user.name,\n address: `${order.address.addressLine1}${\n order.address.addressLine2 ? `, ${order.address.addressLine2}` : \"\"\n }, ${order.address.city}, ${order.address.state} - ${\n order.address.pincode\n }, Phone: ${order.address.phone}`,\n addressId: order.addressId,\n latitude: order.address.adminLatitude ?? order.address.latitude,\n longitude: order.address.adminLongitude ?? order.address.longitude,\n totalAmount: parseFloat(order.totalAmount),\n items,\n deliveryTime: order.slot?.deliveryTime.toISOString() || null,\n status,\n isPackaged:\n order.orderItems.every((item) => item.is_packaged) || false,\n isDelivered: statusRecord?.isDelivered || false,\n isCod: order.isCod,\n paymentMode: order.isCod ? \"COD\" : \"Online\",\n paymentStatus: statusRecord?.paymentStatus || \"pending\",\n slotId: order.slotId,\n adminNotes: order.adminNotes,\n userNotes: order.userNotes,\n };\n });\n\n return { success: true, data: formattedOrders };\n */\n\n return result\n }),\n\n updateAddressCoords: protectedProcedure\n .input(\n z.object({\n addressId: z.number(),\n latitude: z.number(),\n longitude: z.number(),\n })\n )\n .mutation(async ({ input }): Promise => {\n const { addressId, latitude, longitude } = input;\n\n const result = await updateAddressCoordsInDb(addressId, latitude, longitude)\n\n /*\n // Old implementation - direct DB queries:\n const result = await db\n .update(addresses)\n .set({\n adminLatitude: latitude,\n adminLongitude: longitude,\n })\n .where(eq(addresses.id, addressId))\n .returning();\n\n if (result.length === 0) {\n throw new ApiError(\"Address not found\", 404);\n }\n\n return { success: true };\n */\n\n if (!result.success) {\n throw new ApiError('Address not found', 404)\n }\n\n return result\n }),\n\n getAll: protectedProcedure\n .input(getAllOrdersSchema)\n .query(async ({ input }): Promise => {\n try {\n const result = await getAllOrdersInDb(input)\n const userIds = [...new Set(result.orders.map((order) => order.userId))]\n const negativityScores = await getMultipleUserNegativityScores(userIds)\n\n const orders = result.orders.map((order) => {\n const { userId, userNegativityScore, ...rest } = order\n return {\n ...rest,\n userNegativityScore: negativityScores[userId] || 0,\n }\n })\n\n /*\n // Old implementation - direct DB queries:\n const {\n cursor,\n limit,\n slotId,\n packagedFilter,\n deliveredFilter,\n cancellationFilter,\n flashDeliveryFilter,\n } = input;\n\n let whereCondition: SQL | undefined = eq(orders.id, orders.id); // always true\n if (cursor) {\n whereCondition = and(whereCondition, lt(orders.id, cursor));\n }\n if (slotId) {\n whereCondition = and(whereCondition, eq(orders.slotId, slotId));\n }\n if (packagedFilter === \"packaged\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isPackaged, true)\n );\n } else if (packagedFilter === \"not_packaged\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isPackaged, false)\n );\n }\n if (deliveredFilter === \"delivered\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isDelivered, true)\n );\n } else if (deliveredFilter === \"not_delivered\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isDelivered, false)\n );\n }\n if (cancellationFilter === \"cancelled\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isCancelled, true)\n );\n } else if (cancellationFilter === \"not_cancelled\") {\n whereCondition = and(\n whereCondition,\n eq(orderStatus.isCancelled, false)\n );\n }\n if (flashDeliveryFilter === \"flash\") {\n whereCondition = and(\n whereCondition,\n eq(orders.isFlashDelivery, true)\n );\n } else if (flashDeliveryFilter === \"regular\") {\n whereCondition = and(\n whereCondition,\n eq(orders.isFlashDelivery, false)\n );\n }\n\n const allOrders = await db.query.orders.findMany({\n where: whereCondition,\n orderBy: desc(orders.createdAt),\n limit: limit + 1, // fetch one extra to check if there's more\n with: {\n user: true,\n address: true,\n slot: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n },\n });\n\n const hasMore = allOrders.length > limit;\n const ordersToReturn = hasMore ? allOrders.slice(0, limit) : allOrders;\n\n const userIds = [...new Set(ordersToReturn.map(o => o.userId))];\n const negativityScores = await getMultipleUserNegativityScores(userIds);\n\n const filteredOrders = ordersToReturn.filter((order) => {\n const statusRecord = order.orderStatus[0];\n return (\n order.isCod ||\n (statusRecord && statusRecord.paymentStatus === \"success\")\n );\n });\n\n const formattedOrders = filteredOrders.map((order) => {\n const statusRecord = order.orderStatus[0];\n let status: \"pending\" | \"delivered\" | \"cancelled\" = \"pending\";\n if (statusRecord?.isCancelled) {\n status = \"cancelled\";\n } else if (statusRecord?.isDelivered) {\n status = \"delivered\";\n }\n\n const items = order.orderItems\n .map((item) => ({\n id: item.id,\n name: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n amount:\n parseFloat(item.quantity) * parseFloat(item.price.toString()),\n unit: item.product.unit?.shortNotation || \"\",\n productSize: item.product.productQuantity,\n isPackaged: item.is_packaged,\n isPackageVerified: item.is_package_verified,\n }))\n .sort((first, second) => first.id - second.id);\n dayjs.extend(utc);\n return {\n id: order.id,\n orderId: order.id.toString(),\n readableId: order.id,\n customerName: order.user.name,\n customerMobile: order.user.mobile,\n address: `${order.address.addressLine1}${\n order.address.addressLine2\n ? `, ${order.address.addressLine2}`\n : \"\"\n }, ${order.address.city}, ${order.address.state} - ${\n order.address.pincode\n }, Phone: ${order.address.phone}`,\n addressId: order.addressId,\n latitude: order.address.adminLatitude ?? order.address.latitude,\n longitude: order.address.adminLongitude ?? order.address.longitude,\n totalAmount: parseFloat(order.totalAmount),\n deliveryCharge: parseFloat(order.deliveryCharge || \"0\"),\n items,\n createdAt: order.createdAt,\n // deliveryTime: order.slot ? dayjs.utc(order.slot.deliveryTime).format('ddd, MMM D \u2022 h:mm A') : 'Not scheduled',\n deliveryTime: order.slot?.deliveryTime.toISOString() || null,\n status,\n isPackaged:\n order.orderItems.every((item) => item.is_packaged) || false,\n isDelivered: statusRecord?.isDelivered || false,\n isCod: order.isCod,\n isFlashDelivery: order.isFlashDelivery,\n userNotes: order.userNotes,\n adminNotes: order.adminNotes,\n userNegativityScore: negativityScores[order.userId] || 0,\n };\n });\n \n return {\n orders: formattedOrders,\n nextCursor: hasMore\n ? ordersToReturn[ordersToReturn.length - 1].id\n : undefined,\n };\n */\n\n return {\n orders,\n nextCursor: result.nextCursor,\n }\n } catch (e) {\n console.log({ e });\n }\n }),\n\n rebalanceSlots: protectedProcedure\n .input(z.object({ slotIds: z.array(z.number()).min(1).max(50) }))\n .mutation(async ({ input }): Promise => {\n const slotIds = input.slotIds;\n\n const result = await rebalanceSlotsInDb(slotIds)\n\n /*\n // Old implementation - direct DB queries:\n const ordersList = await db.query.orders.findMany({\n where: inArray(orders.slotId, slotIds),\n with: {\n orderItems: {\n with: {\n product: true\n }\n },\n couponUsages: {\n with: {\n coupon: true\n }\n },\n }\n });\n\n const processedOrdersData = ordersList.map((order) => {\n\n let newTotal = order.orderItems.reduce((acc,item) => {\n const latestPrice = +item.product.price;\n const amount = (latestPrice * Number(item.quantity));\n return acc+amount;\n },0)\n\n order.orderItems.forEach(item => {\n item.price = item.product.price;\n item.discountedPrice = item.product.price\n })\n\n const coupon = order.couponUsages[0]?.coupon;\n\n let discount = 0;\n if(coupon && !coupon.isInvalidated && (!coupon.validTill || new Date(coupon.validTill) > new Date())) {\n const proportion = Number(order.orderGroupProportion || 1);\n if(coupon.discountPercent) {\n const maxDiscount = Number(coupon.maxValue || Infinity) * proportion;\n discount = Math.min((newTotal * parseFloat(coupon.discountPercent)) / 100, maxDiscount);\n }\n else {\n discount = Number(coupon.flatDiscount) * proportion;\n }\n }\n newTotal -= discount\n\n const { couponUsages, orderItems: orderItemsRaw, ...rest} = order;\n const updatedOrderItems = orderItemsRaw.map(item => {\n const { product, ...rawOrderItem } = item;\n return rawOrderItem;\n })\n return {order: rest, updatedOrderItems, newTotal }\n })\n\n const updatedOrderIds: number[] = [];\n await db.transaction(async (tx) => {\n for (const { order, updatedOrderItems, newTotal } of processedOrdersData) {\n await tx.update(orders).set({ totalAmount: newTotal.toString() }).where(eq(orders.id, order.id));\n updatedOrderIds.push(order.id);\n\n for (const item of updatedOrderItems) {\n await tx.update(orderItems).set({\n price: item.price,\n discountedPrice: item.discountedPrice\n }).where(eq(orderItems.id, item.id));\n }\n }\n });\n\n return { success: true, updatedOrders: updatedOrderIds, message: `Rebalanced ${updatedOrderIds.length} orders.` };\n */\n\n return result\n }),\n\n cancelOrder: protectedProcedure\n .input(z.object({\n orderId: z.number(),\n reason: z.string().min(1, \"Cancellation reason is required\"),\n }))\n .mutation(async ({ input }): Promise => {\n const { orderId, reason } = input;\n\n const result = await cancelOrderInDb(orderId, reason)\n\n /*\n // Old implementation - direct DB queries:\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, orderId),\n with: {\n orderStatus: true,\n },\n });\n\n if (!order) {\n throw new ApiError(\"Order not found\", 404);\n }\n\n const status = order.orderStatus[0];\n if (!status) {\n throw new ApiError(\"Order status not found\", 400);\n }\n\n if (status.isCancelled) {\n throw new ApiError(\"Order is already cancelled\", 400);\n }\n\n if (status.isDelivered) {\n throw new ApiError(\"Cannot cancel delivered order\", 400);\n }\n\n const result = await db.transaction(async (tx) => {\n await tx\n .update(orderStatus)\n .set({\n isCancelled: true,\n isCancelledByAdmin: true,\n cancelReason: reason,\n cancellationAdminNotes: reason,\n cancellationReviewed: true,\n cancellationReviewedAt: new Date(),\n })\n .where(eq(orderStatus.id, status.id));\n\n const refundStatus = order.isCod ? \"na\" : \"pending\";\n\n await tx.insert(refunds).values({\n orderId: order.id,\n refundStatus,\n });\n\n return { orderId: order.id, userId: order.userId };\n });\n\n // Publish to Redis for Telegram notification\n await publishCancellation(result.orderId, 'admin', reason);\n\n return { success: true, message: \"Order cancelled successfully\" };\n */\n\n if (!result.success) {\n if (result.error === 'order_not_found') {\n throw new ApiError(result.message, 404)\n }\n if (result.error === 'status_not_found') {\n throw new ApiError(result.message, 400)\n }\n if (result.error === 'already_cancelled') {\n throw new ApiError(result.message, 400)\n }\n if (result.error === 'already_delivered') {\n throw new ApiError(result.message, 400)\n }\n\n throw new ApiError(result.message, 400)\n }\n\n if (result.orderId) {\n await publishCancellation(result.orderId, 'admin', reason)\n }\n\n return { success: true, message: result.message }\n }),\n});\n\n// {\"id\": \"order_Rhh00qJNdjUp8o\", \"notes\": {\"retry\": \"true\", \"customerOrderId\": \"14\"}, \"amount\": 21000, \"entity\": \"order\", \"status\": \"created\", \"receipt\": \"order_14_retry\", \"attempts\": 0, \"currency\": \"INR\", \"offer_id\": null, \"signature\": \"6df20655021f1d6841340f2a2ef2ef9378cb3d43495ab09e85f08aea1a851583\", \"amount_due\": 21000, \"created_at\": 1763575791, \"payment_id\": \"pay_Rhh15cLL28YM7j\", \"amount_paid\": 0}\n\nexport async function deleteOrderById(orderId: number): Promise {\n await deleteOrderByIdInDb(orderId)\n\n /*\n // Old implementation - direct DB queries:\n await db.transaction(async (tx) => {\n await tx.delete(orderItems).where(eq(orderItems.orderId, orderId));\n await tx.delete(orderStatus).where(eq(orderStatus.orderId, orderId));\n await tx.delete(payments).where(eq(payments.orderId, orderId));\n await tx.delete(refunds).where(eq(refunds.orderId, orderId));\n await tx.delete(couponUsage).where(eq(couponUsage.orderId, orderId));\n await tx.delete(complaints).where(eq(complaints.orderId, orderId));\n await tx.delete(orders).where(eq(orders.id, orderId));\n });\n */\n}\n", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport dayjs from 'dayjs'\nimport { appUrl } from '@/src/lib/env-exporter'\nimport {\n checkVendorSnippetExists as checkVendorSnippetExistsInDb,\n getVendorSnippetById as getVendorSnippetByIdInDb,\n getVendorSnippetByCode as getVendorSnippetByCodeInDb,\n getAllVendorSnippets as getAllVendorSnippetsInDb,\n createVendorSnippet as createVendorSnippetInDb,\n updateVendorSnippet as updateVendorSnippetInDb,\n deleteVendorSnippet as deleteVendorSnippetInDb,\n getProductsByIds as getProductsByIdsInDb,\n getVendorSlotById as getVendorSlotByIdInDb,\n getVendorOrdersBySlotId as getVendorOrdersBySlotIdInDb,\n getVendorOrders as getVendorOrdersInDb,\n updateVendorOrderItemPackaging as updateVendorOrderItemPackagingInDb,\n getSlotsAfterDate as getSlotsAfterDateInDb,\n} from '@/src/dbService'\nimport type {\n AdminVendorSnippet,\n AdminVendorSnippetWithProducts,\n AdminVendorSnippetWithSlot,\n AdminVendorSnippetDeleteResult,\n AdminVendorSnippetOrdersResult,\n AdminVendorSnippetOrdersWithSlotResult,\n AdminVendorOrderSummary,\n AdminUpcomingSlotsResult,\n AdminVendorUpdatePackagingResult,\n} from '@packages/shared'\n\nconst createSnippetSchema = z.object({\n snippetCode: z.string().min(1, \"Snippet code is required\"),\n slotId: z.number().optional(),\n productIds: z.array(z.number().int().positive()).min(1, \"At least one product is required\"),\n validTill: z.string().optional(),\n isPermanent: z.boolean().default(false)\n});\n\nconst updateSnippetSchema = z.object({\n id: z.number().int().positive(),\n updates: createSnippetSchema.partial().extend({\n snippetCode: z.string().min(1).optional(),\n productIds: z.array(z.number().int().positive()).optional(),\n isPermanent: z.boolean().default(false)\n }),\n});\n\nexport const vendorSnippetsRouter = router({\n create: protectedProcedure\n .input(createSnippetSchema)\n .mutation(async ({ input, ctx }): Promise => {\n const { snippetCode, slotId, productIds, validTill, isPermanent } = input;\n\n // Get staff user ID from auth middleware\n const staffUserId = ctx.staffUser?.id;\n if (!staffUserId) {\n throw new Error(\"Unauthorized\");\n }\n \n if(slotId) {\n const slot = await getVendorSlotByIdInDb(slotId)\n if (!slot) {\n throw new Error(\"Invalid slot ID\")\n }\n }\n\n const products = await getProductsByIdsInDb(productIds)\n if (products.length !== productIds.length) {\n throw new Error(\"One or more invalid product IDs\")\n }\n\n const existingSnippet = await checkVendorSnippetExistsInDb(snippetCode)\n if (existingSnippet) {\n throw new Error(\"Snippet code already exists\")\n }\n\n const result = await createVendorSnippetInDb({\n snippetCode,\n slotId,\n productIds,\n isPermanent,\n validTill: validTill ? new Date(validTill) : undefined,\n })\n\n /*\n // Old implementation - direct DB queries:\n // Validate slot exists\n if(slotId) {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n });\n if (!slot) {\n throw new Error(\"Invalid slot ID\");\n }\n }\n\n // Validate products exist\n const products = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, productIds),\n });\n if (products.length !== productIds.length) {\n throw new Error(\"One or more invalid product IDs\");\n }\n\n // Check if snippet code already exists\n const existingSnippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n });\n if (existingSnippet) {\n throw new Error(\"Snippet code already exists\");\n }\n\n const result = await db.insert(vendorSnippets).values({\n snippetCode,\n slotId,\n productIds,\n isPermanent,\n validTill: validTill ? new Date(validTill) : undefined,\n }).returning();\n\n return result[0];\n */\n\n return result\n }),\n\n getAll: protectedProcedure\n .query(async (): Promise => {\n console.log('from the vendor snipptes methods')\n\n try {\n const result = await getAllVendorSnippetsInDb()\n\n const snippetsWithProducts = await Promise.all(\n result.map(async (snippet) => {\n const products = await getProductsByIdsInDb(snippet.productIds)\n\n return {\n ...snippet,\n accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`,\n products,\n }\n })\n )\n\n /*\n // Old implementation - direct DB queries:\n const result = await db.query.vendorSnippets.findMany({\n with: {\n slot: true,\n },\n orderBy: (vendorSnippets, { desc }) => [desc(vendorSnippets.createdAt)],\n });\n\n const snippetsWithProducts = await Promise.all(\n result.map(async (snippet) => {\n const products = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n columns: { id: true, name: true },\n });\n\n return {\n ...snippet,\n accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`,\n products: products.map(p => ({ id: p.id, name: p.name })),\n };\n })\n );\n\n return snippetsWithProducts;\n */\n\n return snippetsWithProducts\n }\n catch(e) {\n console.log(e)\n }\n return []\n }),\n\n getById: protectedProcedure\n .input(z.object({ id: z.number().int().positive() }))\n .query(async ({ input }): Promise => {\n const { id } = input;\n\n const result = await getVendorSnippetByIdInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const result = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.id, id),\n with: {\n slot: true,\n },\n });\n\n if (!result) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n return result;\n */\n\n if (!result) {\n throw new Error('Vendor snippet not found')\n }\n\n return result\n }),\n\n update: protectedProcedure\n .input(updateSnippetSchema)\n .mutation(async ({ input }): Promise => {\n const { id, updates } = input;\n \n const existingSnippet = await getVendorSnippetByIdInDb(id)\n if (!existingSnippet) {\n throw new Error('Vendor snippet not found')\n }\n\n if (updates.slotId) {\n const slot = await getVendorSlotByIdInDb(updates.slotId)\n if (!slot) {\n throw new Error('Invalid slot ID')\n }\n }\n\n if (updates.productIds) {\n const products = await getProductsByIdsInDb(updates.productIds)\n if (products.length !== updates.productIds.length) {\n throw new Error('One or more invalid product IDs')\n }\n }\n\n if (updates.snippetCode && updates.snippetCode !== existingSnippet.snippetCode) {\n const duplicateSnippet = await checkVendorSnippetExistsInDb(updates.snippetCode)\n if (duplicateSnippet) {\n throw new Error('Snippet code already exists')\n }\n }\n\n const updateData = {\n ...updates,\n validTill: updates.validTill !== undefined\n ? (updates.validTill ? new Date(updates.validTill) : null)\n : undefined,\n }\n\n const result = await updateVendorSnippetInDb(id, updateData)\n\n /*\n // Old implementation - direct DB queries:\n const existingSnippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.id, id),\n });\n if (!existingSnippet) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n // Validate slot if being updated\n if (updates.slotId) {\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, updates.slotId),\n });\n if (!slot) {\n throw new Error(\"Invalid slot ID\");\n }\n }\n\n // Validate products if being updated\n if (updates.productIds) {\n const products = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, updates.productIds),\n });\n if (products.length !== updates.productIds.length) {\n throw new Error(\"One or more invalid product IDs\");\n }\n }\n\n // Check snippet code uniqueness if being updated\n if (updates.snippetCode && updates.snippetCode !== existingSnippet.snippetCode) {\n const duplicateSnippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, updates.snippetCode),\n });\n if (duplicateSnippet) {\n throw new Error(\"Snippet code already exists\");\n }\n }\n\n const updateData: any = { ...updates };\n if (updates.validTill !== undefined) {\n updateData.validTill = updates.validTill ? new Date(updates.validTill) : null;\n }\n\n const result = await db.update(vendorSnippets)\n .set(updateData)\n .where(eq(vendorSnippets.id, id))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Failed to update vendor snippet\");\n }\n\n return result[0];\n */\n\n if (!result) {\n throw new Error('Failed to update vendor snippet')\n }\n\n return result\n }),\n\n delete: protectedProcedure\n .input(z.object({ id: z.number().int().positive() }))\n .mutation(async ({ input }): Promise => {\n const { id } = input;\n\n const result = await deleteVendorSnippetInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const result = await db.delete(vendorSnippets)\n .where(eq(vendorSnippets.id, id))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n return { message: \"Vendor snippet deleted successfully\" };\n */\n\n if (!result) {\n throw new Error('Vendor snippet not found')\n }\n\n return { message: 'Vendor snippet deleted successfully' }\n }),\n\n getOrdersBySnippet: publicProcedure\n .input(z.object({\n snippetCode: z.string().min(1, \"Snippet code is required\")\n }))\n .query(async ({ input }): Promise => {\n const { snippetCode } = input;\n\n const snippet = await getVendorSnippetByCodeInDb(snippetCode)\n\n /*\n // Old implementation - direct DB queries:\n // Find the snippet\n const snippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n });\n\n if (!snippet) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n // Check if snippet is still valid\n if (snippet.validTill && new Date(snippet.validTill) < new Date()) {\n throw new Error(\"Vendor snippet has expired\");\n }\n\n // Query orders that match the snippet criteria\n const matchingOrders = await db.query.orders.findMany({\n where: eq(orders.slotId, snippet.slotId!),\n with: {\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n user: true,\n slot: true,\n },\n orderBy: (orders, { desc }) => [desc(orders.createdAt)],\n });\n */\n\n if (!snippet) {\n throw new Error('Vendor snippet not found')\n }\n\n if (snippet.validTill && new Date(snippet.validTill) < new Date()) {\n throw new Error('Vendor snippet has expired')\n }\n\n if (!snippet.slotId) {\n throw new Error('Vendor snippet not associated with a slot')\n }\n\n const matchingOrders = await getVendorOrdersBySlotIdInDb(snippet.slotId)\n\n // Filter orders that contain at least one of the snippet's products\n const filteredOrders = matchingOrders.filter(order => {\n const status = order.orderStatus;\n if (status[0].isCancelled) return false;\n const orderProductIds = order.orderItems.map(item => item.productId);\n return snippet.productIds.some(productId => orderProductIds.includes(productId));\n });\n\n // Format the response\n const formattedOrders = filteredOrders.map(order => {\n // Filter orderItems to only include products attached to the snippet\n const attachedOrderItems = order.orderItems.filter(item =>\n snippet.productIds.includes(item.productId)\n );\n\n const products = attachedOrderItems.map(item => ({\n orderItemId: item.id,\n productId: item.productId,\n productName: item.product.name,\n quantity: parseFloat(item.quantity),\n productSize: item.product.productQuantity,\n price: parseFloat((item.price ?? 0).toString()),\n unit: item.product.unit?.shortNotation || 'unit',\n subtotal: parseFloat((item.price ?? 0).toString()) * parseFloat(item.quantity),\n is_packaged: item.is_packaged,\n is_package_verified: item.is_package_verified,\n }));\n\n const orderTotal = products.reduce((sum, p) => sum + p.subtotal, 0);\n\n return {\n orderId: `ORD${order.id}`,\n orderDate: order.createdAt.toISOString(),\n customerName: order.user.name || '',\n totalAmount: orderTotal,\n slotInfo: order.slot ? {\n time: order.slot.deliveryTime.toISOString(),\n sequence: order.slot.deliverySequence,\n } : null,\n products,\n matchedProducts: snippet.productIds, // All snippet products are considered matched\n snippetCode: snippet.snippetCode,\n };\n });\n\n return {\n success: true,\n data: formattedOrders,\n snippet: {\n id: snippet.id,\n snippetCode: snippet.snippetCode,\n slotId: snippet.slotId,\n productIds: snippet.productIds,\n validTill: snippet.validTill?.toISOString(),\n createdAt: snippet.createdAt.toISOString(),\n isPermanent: snippet.isPermanent,\n },\n }\n }),\n\n getVendorOrders: protectedProcedure\n .query(async (): Promise => {\n const vendorOrders = await getVendorOrdersInDb()\n\n /*\n // Old implementation - direct DB queries:\n const vendorOrders = await db.query.orders.findMany({\n with: {\n user: true,\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n },\n orderBy: (orders, { desc }) => [desc(orders.createdAt)],\n });\n */\n\n return vendorOrders.map(order => ({\n id: order.id,\n status: 'pending',\n orderDate: order.createdAt.toISOString(),\n totalQuantity: order.orderItems.reduce((sum, item) => sum + parseFloat(item.quantity || '0'), 0),\n products: order.orderItems.map(item => ({\n name: item.product.name,\n quantity: parseFloat(item.quantity || '0'),\n unit: item.product.unit?.shortNotation || 'unit',\n })),\n }))\n }),\n\n getUpcomingSlots: publicProcedure\n .query(async (): Promise => {\n const threeHoursAgo = dayjs().subtract(3, 'hour').toDate();\n const slots = await getSlotsAfterDateInDb(threeHoursAgo)\n\n /*\n // Old implementation - direct DB queries:\n const slots = await db.query.deliverySlotInfo.findMany({\n where: and(\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, threeHoursAgo)\n ),\n orderBy: asc(deliverySlotInfo.deliveryTime),\n });\n */\n\n return {\n success: true,\n data: slots.map(slot => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime.toISOString(),\n freezeTime: slot.freezeTime.toISOString(),\n deliverySequence: slot.deliverySequence,\n })),\n }\n }),\n\n getOrdersBySnippetAndSlot: publicProcedure\n .input(z.object({\n snippetCode: z.string().min(1, \"Snippet code is required\"),\n slotId: z.number().int().positive(\"Valid slot ID is required\"),\n }))\n .query(async ({ input }): Promise => {\n const { snippetCode, slotId } = input;\n\n const snippet = await getVendorSnippetByCodeInDb(snippetCode)\n const slot = await getVendorSlotByIdInDb(slotId)\n\n /*\n // Old implementation - direct DB queries:\n // Find the snippet\n const snippet = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippetCode),\n });\n\n if (!snippet) {\n throw new Error(\"Vendor snippet not found\");\n }\n\n // Find the slot\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n });\n\n if (!slot) {\n throw new Error(\"Slot not found\");\n }\n \n // Query orders that match the slot and snippet criteria\n const matchingOrders = await db.query.orders.findMany({\n where: eq(orders.slotId, slotId),\n with: {\n orderItems: {\n with: {\n product: {\n with: {\n unit: true,\n },\n },\n },\n },\n orderStatus: true,\n user: true,\n slot: true,\n },\n orderBy: (orders, { desc }) => [desc(orders.createdAt)],\n });\n */\n\n if (!snippet) {\n throw new Error('Vendor snippet not found')\n }\n\n if (!slot) {\n throw new Error('Slot not found')\n }\n\n const matchingOrders = await getVendorOrdersBySlotIdInDb(slotId)\n\n // Filter orders that contain at least one of the snippet's products\n const filteredOrders = matchingOrders.filter(order => {\n const status = order.orderStatus;\n if (status[0]?.isCancelled) return false;\n const orderProductIds = order.orderItems.map(item => item.productId);\n return snippet.productIds.some(productId => orderProductIds.includes(productId));\n });\n\n // Format the response\n const formattedOrders = filteredOrders.map(order => {\n // Filter orderItems to only include products attached to the snippet\n const attachedOrderItems = order.orderItems.filter(item =>\n snippet.productIds.includes(item.productId)\n );\n\n const products = attachedOrderItems.map(item => ({\n orderItemId: item.id,\n productId: item.productId,\n productName: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat((item.price ?? 0).toString()),\n unit: item.product.unit?.shortNotation || 'unit',\n subtotal: parseFloat((item.price ?? 0).toString()) * parseFloat(item.quantity),\n productSize: item.product.productQuantity,\n is_packaged: item.is_packaged,\n is_package_verified: item.is_package_verified,\n }));\n\n const orderTotal = products.reduce((sum, p) => sum + p.subtotal, 0);\n\n return {\n orderId: `ORD${order.id}`,\n orderDate: order.createdAt.toISOString(),\n customerName: order.user.name || '',\n totalAmount: orderTotal,\n slotInfo: order.slot ? {\n time: order.slot.deliveryTime.toISOString(),\n sequence: order.slot.deliverySequence,\n } : null,\n products,\n matchedProducts: snippet.productIds,\n snippetCode: snippet.snippetCode,\n };\n });\n\n return {\n success: true,\n data: formattedOrders,\n snippet: {\n id: snippet.id,\n snippetCode: snippet.snippetCode,\n slotId: snippet.slotId,\n productIds: snippet.productIds,\n validTill: snippet.validTill?.toISOString(),\n createdAt: snippet.createdAt.toISOString(),\n isPermanent: snippet.isPermanent,\n },\n selectedSlot: {\n id: slot.id,\n deliveryTime: slot.deliveryTime.toISOString(),\n freezeTime: slot.freezeTime.toISOString(),\n deliverySequence: slot.deliverySequence,\n },\n }\n }),\n\n updateOrderItemPackaging: publicProcedure\n .input(z.object({\n orderItemId: z.number().int().positive(\"Valid order item ID required\"),\n is_packaged: z.boolean()\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const { orderItemId, is_packaged } = input;\n\n // Get staff user ID from auth middleware\n // const staffUserId = ctx.staffUser?.id;\n // if (!staffUserId) {\n // throw new Error(\"Unauthorized\");\n // }\n\n const result = await updateVendorOrderItemPackagingInDb(orderItemId, is_packaged)\n\n /*\n // Old implementation - direct DB queries:\n // Check if order item exists and get related data\n const orderItem = await db.query.orderItems.findFirst({\n where: eq(orderItems.id, orderItemId),\n with: {\n order: {\n with: {\n slot: true\n }\n }\n }\n });\n\n if (!orderItem) {\n throw new Error(\"Order item not found\");\n }\n\n // Check if this order item belongs to a slot that has vendor snippets\n // This ensures only order items from vendor-accessible orders can be updated\n if (!orderItem.order.slotId) {\n throw new Error(\"Order item not associated with a vendor slot\");\n }\n\n const snippetExists = await db.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.slotId, orderItem.order.slotId),\n });\n\n if (!snippetExists) {\n throw new Error(\"No vendor snippet found for this order's slot\");\n }\n\n // Update the is_packaged field\n const result = await db.update(orderItems)\n .set({ is_packaged })\n .where(eq(orderItems.id, orderItemId))\n .returning();\n\n if (result.length === 0) {\n throw new Error(\"Failed to update packaging status\");\n }\n\n return {\n success: true,\n orderItemId,\n is_packaged\n };\n */\n\n if (!result.success) {\n throw new Error(result.message)\n }\n\n return result\n }),\n});\n", "/**\n * Constants for role names to avoid hardcoding and typos\n */\nexport const ROLE_NAMES = {\n ADMIN: 'admin',\n GENERAL_USER: 'gen_user',\n HOSPITAL_ADMIN: 'hospital_admin',\n DOCTOR: 'doctor',\n RECEPTIONIST: 'receptionist'\n};\n\nexport const defaultRole = ROLE_NAMES.GENERAL_USER;\n\n/**\n * RoleManager class to handle caching and retrieving role information\n * Provides methods to fetch roles from DB and cache them for quick access\n */\nclass RoleManager {\n private roles: Map = new Map();\n private rolesByName: Map = new Map();\n private isInitialized: boolean = false;\n\n constructor() {\n // Singleton instance\n }\n\n /**\n * Fetch all roles from the database and cache them\n * This should be called during application startup\n */\n public async fetchRoles(): Promise {\n try {\n // const roles = await db.query.roleInfoTable.findMany();\n \n // // Clear existing maps before adding new data\n // this.roles.clear();\n // this.rolesByName.clear();\n \n // // Cache roles by ID and by name for quick lookup\n // roles.forEach(role => {\n // this.roles.set(role.id, role);\n // this.rolesByName.set(role.name, role);\n // });\n \n // this.isInitialized = true;\n // console.log(`[RoleManager] Cached ${roles.length} roles`);\n } catch (error) {\n console.error('[RoleManager] Error fetching roles:', error);\n throw error;\n }\n }\n\n /**\n * Get all roles from cache\n * If not initialized, fetches roles from DB first\n */\n public async getRoles(): Promise<{ id: number; name: string; description: string | null }[]> {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n return Array.from(this.roles.values());\n }\n\n /**\n * Get role by ID\n * @param id Role ID\n */\n public async getRoleById(id: number): Promise<{ id: number; name: string; description: string | null } | undefined> {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n return this.roles.get(id);\n }\n\n /**\n * Get role by name\n * @param name Role name\n */\n public async getRoleByName(name: string): Promise<{ id: number; name: string; description: string | null } | undefined> {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n return this.rolesByName.get(name);\n }\n\n /**\n * Check if a role exists by name\n * @param name Role name\n */\n public async roleExists(name: string): Promise {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n return this.rolesByName.has(name);\n }\n\n /**\n * Get business roles (roles that are not 'admin' or 'gen_user')\n */\n public async getBusinessRoles(): Promise<{ id: number; name: string; description: string | null }[]> {\n if (!this.isInitialized) {\n await this.fetchRoles();\n }\n \n return Array.from(this.roles.values()).filter(\n role => role.name !== ROLE_NAMES.ADMIN && role.name !== ROLE_NAMES.GENERAL_USER\n );\n }\n\n /**\n * Force refresh the roles cache\n */\n public async refreshRoles(): Promise {\n await this.fetchRoles();\n }\n}\n\n// Create a singleton instance\nconst roleManager = new RoleManager();\n\n// Export the singleton instance\nexport default roleManager;\n", "export const CONST_KEYS = {\n minRegularOrderValue: 'minRegularOrderValue',\n freeDeliveryThreshold: 'freeDeliveryThreshold',\n deliveryCharge: 'deliveryCharge',\n flashFreeDeliveryThreshold: 'flashFreeDeliveryThreshold',\n flashDeliveryCharge: 'flashDeliveryCharge',\n platformFeePercent: 'platformFeePercent',\n taxRate: 'taxRate',\n tester: 'tester',\n minOrderAmountForCoupon: 'minOrderAmountForCoupon',\n maxCouponDiscount: 'maxCouponDiscount',\n flashDeliverySlotId: 'flashDeliverySlotId',\n readableOrderId: 'readableOrderId',\n versionNum: 'versionNum',\n playStoreUrl: 'playStoreUrl',\n appStoreUrl: 'appStoreUrl',\n popularItems: 'popularItems',\n allItemsOrder: 'allItemsOrder',\n isFlashDeliveryEnabled: 'isFlashDeliveryEnabled',\n supportMobile: 'supportMobile',\n supportEmail: 'supportEmail',\n} as const;\n\nexport const CONST_LABELS: Record = {\n minRegularOrderValue: 'Minimum Regular Order Value',\n freeDeliveryThreshold: 'Free Delivery Threshold',\n deliveryCharge: 'Delivery Charge',\n flashFreeDeliveryThreshold: 'Flash Free Delivery Threshold',\n flashDeliveryCharge: 'Flash Delivery Charge',\n platformFeePercent: 'Platform Fee Percent',\n taxRate: 'Tax Rate',\n tester: 'Tester',\n minOrderAmountForCoupon: 'Minimum Order Amount for Coupon',\n maxCouponDiscount: 'Maximum Coupon Discount',\n flashDeliverySlotId: 'Flash Delivery Slot ID',\n readableOrderId: 'Readable Order ID',\n versionNum: 'Version Number',\n playStoreUrl: 'Play Store URL',\n appStoreUrl: 'App Store URL',\n popularItems: 'Popular Items',\n allItemsOrder: 'All Items Order',\n isFlashDeliveryEnabled: 'Enable Flash Delivery',\n supportMobile: 'Support Mobile',\n supportEmail: 'Support Email',\n};\n\nexport type ConstKey = (typeof CONST_KEYS)[keyof typeof CONST_KEYS];\n\nexport const CONST_KEYS_ARRAY = Object.values(CONST_KEYS) as ConstKey[];\n", "import { getAllKeyValStore } from '@/src/dbService'\n// import redisClient from '@/src/lib/redis-client'\nimport { CONST_KEYS, CONST_KEYS_ARRAY, type ConstKey } from '@/src/lib/const-keys'\n\n// const CONST_REDIS_PREFIX = 'const:';\n\nexport const computeConstants = async (): Promise => {\n try {\n console.log('Computing constants from database...');\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { keyValStore } from '@/src/db/schema'\n\n const constants = await db.select().from(keyValStore);\n */\n\n const constants = await getAllKeyValStore();\n\n // for (const constant of constants) {\n // const redisKey = `${CONST_REDIS_PREFIX}${constant.key}`;\n // const value = JSON.stringify(constant.value);\n // await redisClient.set(redisKey, value);\n // }\n\n console.log(`Computed ${constants.length} constants from DB`);\n } catch (error) {\n console.error('Failed to compute constants:', error);\n throw error;\n }\n};\n\nexport const getConstant = async (key: string): Promise => {\n // const redisKey = `${CONST_REDIS_PREFIX}${key}`;\n // const value = await redisClient.get(redisKey);\n //\n // if (!value) {\n // return null;\n // }\n //\n // try {\n // return JSON.parse(value) as T;\n // } catch {\n // return value as unknown as T;\n // }\n\n const constants = await getAllKeyValStore();\n const entry = constants.find(c => c.key === key);\n\n if (!entry) {\n return null;\n }\n\n return entry.value as T;\n};\n\nexport const getConstants = async (keys: string[]): Promise> => {\n // const redisKeys = keys.map(key => `${CONST_REDIS_PREFIX}${key}`);\n // const values = await redisClient.MGET(redisKeys);\n //\n // const result: Record = {};\n // keys.forEach((key, index) => {\n // const value = values[index];\n // if (!value) {\n // result[key] = null;\n // } else {\n // try {\n // result[key] = JSON.parse(value) as T;\n // } catch {\n // result[key] = value as unknown as T;\n // }\n // }\n // });\n //\n // return result;\n\n const constants = await getAllKeyValStore();\n const constantsMap = new Map(constants.map(c => [c.key, c.value]));\n\n const result: Record = {};\n for (const key of keys) {\n const value = constantsMap.get(key);\n result[key] = (value !== undefined ? value : null) as T | null;\n }\n\n return result;\n};\n\nexport const getAllConstValues = async (): Promise> => {\n // const result: Record = {};\n //\n // for (const key of CONST_KEYS_ARRAY) {\n // result[key] = await getConstant(key);\n // }\n //\n // return result as Record;\n\n const constants = await getAllKeyValStore();\n const constantsMap = new Map(constants.map(c => [c.key, c.value]));\n\n const result: Record = {};\n for (const key of CONST_KEYS_ARRAY) {\n result[key] = constantsMap.get(key) ?? null;\n }\n\n return result as Record;\n};\n\nexport { CONST_KEYS, CONST_KEYS_ARRAY };\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllSlotsWithProductsForCache,\n type SlotWithProductsData,\n} from '@/src/dbService'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport dayjs from 'dayjs'\n\n// Define the structure for slot with products\ninterface SlotWithProducts {\n id: number\n deliveryTime: Date\n freezeTime: Date\n isActive: boolean\n isCapacityFull: boolean\n products: Array<{\n id: number\n name: string\n shortDescription: string | null\n productQuantity: number\n price: string\n marketPrice: string | null\n unit: string | null\n images: string[]\n isOutOfStock: boolean\n storeId: number | null\n nextDeliveryDate: Date\n }>\n}\n\ninterface SlotInfo {\n id: number\n deliveryTime: Date\n freezeTime: Date\n isCapacityFull: boolean\n}\n\nasync function transformSlotToStoreSlot(slot: SlotWithProductsData): Promise {\n return {\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isCapacityFull: slot.isCapacityFull,\n products: slot.productSlots.map((productSlot) => ({\n id: productSlot.product.id,\n name: productSlot.product.name,\n productQuantity: productSlot.product.productQuantity,\n shortDescription: productSlot.product.shortDescription,\n price: productSlot.product.price.toString(),\n marketPrice: productSlot.product.marketPrice?.toString() || null,\n unit: productSlot.product.unit?.shortNotation || null,\n images: scaffoldAssetUrl(\n (productSlot.product.images as string[]) || []\n ),\n isOutOfStock: productSlot.product.isOutOfStock,\n storeId: productSlot.product.storeId,\n nextDeliveryDate: slot.deliveryTime,\n })),\n }\n}\n\nfunction extractSlotInfo(slot: SlotWithProductsData): SlotInfo {\n return {\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isCapacityFull: slot.isCapacityFull,\n }\n}\n\nasync function fetchAllTransformedSlots(): Promise {\n const slots = await getAllSlotsWithProductsForCache()\n return Promise.all(slots.map(transformSlotToStoreSlot))\n}\n\nexport async function initializeSlotStore(): Promise {\n try {\n console.log('Initializing slot store in Redis...')\n\n // Fetch active delivery slots with future delivery times\n const slots = await getAllSlotsWithProductsForCache()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { deliverySlotInfo } from '@/src/db/schema'\n import { eq, gt, and, asc } from 'drizzle-orm'\n\n const now = new Date();\n const slots = await db.query.deliverySlotInfo.findMany({\n where: and(\n eq(deliverySlotInfo.isActive, true),\n gt(deliverySlotInfo.deliveryTime, now),\n ),\n with: {\n productSlots: {\n with: {\n product: {\n with: {\n unit: true,\n store: true,\n },\n },\n },\n },\n },\n orderBy: asc(deliverySlotInfo.deliveryTime),\n });\n */\n\n // Transform data for storage\n const slotsWithProducts = await Promise.all(\n slots.map(async (slot) => ({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isActive: slot.isActive,\n isCapacityFull: slot.isCapacityFull,\n products: await Promise.all(\n slot.productSlots.map(async (productSlot) => ({\n id: productSlot.product.id,\n name: productSlot.product.name,\n productQuantity: productSlot.product.productQuantity,\n shortDescription: productSlot.product.shortDescription,\n price: productSlot.product.price.toString(),\n marketPrice: productSlot.product.marketPrice?.toString() || null,\n unit: productSlot.product.unit?.shortNotation || null,\n images: scaffoldAssetUrl(\n (productSlot.product.images as string[]) || []\n ),\n isOutOfStock: productSlot.product.isOutOfStock,\n storeId: productSlot.product.storeId,\n nextDeliveryDate: slot.deliveryTime,\n }))\n ),\n }))\n )\n\n // Store each slot in Redis with key pattern \"slot:{id}\"\n // for (const slot of slotsWithProducts) {\n // await redisClient.set(`slot:${slot.id}`, JSON.stringify(slot))\n // }\n\n // Build and store product-slots map\n // Group slots by productId\n const productSlotsMap: Record = {}\n\n for (const slot of slotsWithProducts) {\n for (const product of slot.products) {\n if (!productSlotsMap[product.id]) {\n productSlotsMap[product.id] = []\n }\n productSlotsMap[product.id].push({\n id: slot.id,\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n isCapacityFull: slot.isCapacityFull,\n })\n }\n }\n\n // Store each product's slots in Redis with key pattern \"product:{id}:slots\"\n // for (const [productId, slotInfos] of Object.entries(productSlotsMap)) {\n // await redisClient.set(\n // `product:${productId}:slots`,\n // JSON.stringify(slotInfos)\n // )\n // }\n\n console.log('Slot store initialized successfully')\n } catch (error) {\n console.error('Error initializing slot store:', error)\n }\n}\n\nexport async function getSlotById(slotId: number): Promise {\n try {\n // const key = `slot:${slotId}`\n // const data = await redisClient.get(key)\n // if (!data) return null\n // return JSON.parse(data) as SlotWithProducts\n\n const slots = await getAllSlotsWithProductsForCache()\n const slot = slots.find(s => s.id === slotId)\n if (!slot) return null\n\n return transformSlotToStoreSlot(slot)\n } catch (error) {\n console.error(`Error getting slot ${slotId}:`, error)\n return null\n }\n}\n\nexport async function getAllSlots(): Promise {\n try {\n // Get all keys matching the pattern \"slot:*\"\n // const keys = await redisClient.KEYS('slot:*')\n //\n // if (keys.length === 0) return []\n //\n // // Get all slots using MGET for better performance\n // const slotsData = await redisClient.MGET(keys)\n //\n // const slots: SlotWithProducts[] = []\n // for (const slotData of slotsData) {\n // if (slotData) {\n // slots.push(JSON.parse(slotData) as SlotWithProducts)\n // }\n // }\n //\n // return slots\n\n return fetchAllTransformedSlots()\n } catch (error) {\n console.error('Error getting all slots:', error)\n return []\n }\n}\n\nexport async function getProductSlots(productId: number): Promise {\n try {\n // const key = `product:${productId}:slots`\n // const data = await redisClient.get(key)\n // if (!data) return []\n // return JSON.parse(data) as SlotInfo[]\n\n const slots = await getAllSlotsWithProductsForCache()\n const productSlots: SlotInfo[] = []\n\n for (const slot of slots) {\n const hasProduct = slot.productSlots.some(ps => ps.product.id === productId)\n if (hasProduct) {\n productSlots.push(extractSlotInfo(slot))\n }\n }\n\n return productSlots\n } catch (error) {\n console.error(`Error getting slots for product ${productId}:`, error)\n return []\n }\n}\n\nexport async function getAllProductsSlots(): Promise> {\n try {\n // Get all keys matching the pattern \"product:*:slots\"\n // const keys = await redisClient.KEYS('product:*:slots')\n //\n // if (keys.length === 0) return {}\n //\n // // Get all product slots using MGET for better performance\n // const productsData = await redisClient.MGET(keys)\n //\n // const result: Record = {}\n // for (const key of keys) {\n // // Extract productId from key \"product:{id}:slots\"\n // const match = key.match(/product:(\\d+):slots/)\n // if (match) {\n // const productId = parseInt(match[1], 10)\n // const dataIndex = keys.indexOf(key)\n // if (productsData[dataIndex]) {\n // result[productId] = JSON.parse(productsData[dataIndex]) as SlotInfo[]\n // }\n // }\n // }\n //\n // return result\n\n const slots = await getAllSlotsWithProductsForCache()\n const result: Record = {}\n\n for (const slot of slots) {\n const slotInfo = extractSlotInfo(slot)\n for (const productSlot of slot.productSlots) {\n const productId = productSlot.product.id\n if (!result[productId]) {\n result[productId] = []\n }\n result[productId].push(slotInfo)\n }\n }\n\n return result\n } catch (error) {\n console.error('Error getting all products slots:', error)\n return {}\n }\n}\n\nexport async function getMultipleProductsSlots(\n productIds: number[]\n): Promise> {\n try {\n if (productIds.length === 0) return {}\n\n // Build keys for all productIds\n // const keys = productIds.map((id) => `product:${id}:slots`)\n //\n // // Use MGET for batch retrieval\n // const productsData = await redisClient.MGET(keys)\n //\n // const result: Record = {}\n // for (let i = 0; i < productIds.length; i++) {\n // const data = productsData[i]\n // if (data) {\n // const slots = JSON.parse(data) as SlotInfo[]\n // // Filter out slots that are at full capacity\n // result[productIds[i]] = slots.filter((slot) => !slot.isCapacityFull)\n // }\n // }\n //\n // return result\n\n const slots = await getAllSlotsWithProductsForCache()\n const productIdSet = new Set(productIds)\n const result: Record = {}\n\n for (const productId of productIds) {\n result[productId] = []\n }\n\n for (const slot of slots) {\n const slotInfo = extractSlotInfo(slot)\n for (const productSlot of slot.productSlots) {\n const pid = productSlot.product.id\n if (productIdSet.has(pid) && !slot.isCapacityFull) {\n result[pid].push(slotInfo)\n }\n }\n }\n\n return result\n } catch (error) {\n console.error('Error getting products slots:', error)\n return {}\n }\n}\n", "// import redisClient from '@/src/lib/redis-client'\nimport {\n getAllBannersForCache,\n getBanners,\n getBannerById as getBannerByIdFromDb,\n type BannerData,\n} from '@/src/dbService'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\n\n// Banner Type (matches getBanners return)\ninterface Banner {\n id: number\n name: string\n imageUrl: string | null\n serialNum: number | null\n productIds: number[] | null\n createdAt: Date\n}\n\nexport async function initializeBannerStore(): Promise {\n try {\n console.log('Initializing banner store in Redis...')\n\n const banners = await getAllBannersForCache()\n\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { homeBanners } from '@/src/db/schema'\n import { isNotNull, asc } from 'drizzle-orm'\n\n const banners = await db.query.homeBanners.findMany({\n where: isNotNull(homeBanners.serialNum),\n orderBy: asc(homeBanners.serialNum),\n });\n */\n\n // Store each banner in Redis\n // for (const banner of banners) {\n // const signedImageUrl = banner.imageUrl\n // ? scaffoldAssetUrl(banner.imageUrl)\n // : banner.imageUrl\n //\n // const bannerObj: Banner = {\n // id: banner.id,\n // name: banner.name,\n // imageUrl: signedImageUrl,\n // serialNum: banner.serialNum,\n // productIds: banner.productIds,\n // createdAt: banner.createdAt,\n // }\n //\n // await redisClient.set(`banner:${banner.id}`, JSON.stringify(bannerObj))\n // }\n\n console.log('Banner store initialized successfully')\n } catch (error) {\n console.error('Error initializing banner store:', error)\n }\n}\n\nexport async function getBannerById(id: number): Promise {\n try {\n // const key = `banner:${id}`\n // const data = await redisClient.get(key)\n // if (!data) return null\n // return JSON.parse(data) as Banner\n\n const banner = await getBannerByIdFromDb(id)\n if (!banner) return null\n\n const signedImageUrl = banner.imageUrl\n ? scaffoldAssetUrl(banner.imageUrl)\n : banner.imageUrl\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: signedImageUrl,\n serialNum: banner.serialNum,\n productIds: banner.productIds,\n createdAt: banner.createdAt,\n }\n } catch (error) {\n console.error(`Error getting banner ${id}:`, error)\n return null\n }\n}\n\nexport async function getAllBanners(): Promise {\n try {\n // Get all keys matching the pattern \"banner:*\"\n // const keys = await redisClient.KEYS('banner:*')\n //\n // if (keys.length === 0) return []\n //\n // // Get all banners using MGET for better performance\n // const bannersData = await redisClient.MGET(keys)\n //\n // const banners: Banner[] = []\n // for (const bannerData of bannersData) {\n // if (bannerData) {\n // banners.push(JSON.parse(bannerData) as Banner)\n // }\n // }\n //\n // // Sort by serialNum to maintain the same order as the original query\n // banners.sort((a, b) => (a.serialNum || 0) - (b.serialNum || 0))\n //\n // return banners\n\n const banners = await getBanners()\n\n return banners.map((banner) => {\n const signedImageUrl = banner.imageUrl\n ? scaffoldAssetUrl(banner.imageUrl)\n : banner.imageUrl\n\n return {\n id: banner.id,\n name: banner.name,\n imageUrl: signedImageUrl,\n serialNum: banner.serialNum,\n productIds: banner.productIds,\n createdAt: banner.createdAt,\n }\n })\n } catch (error) {\n console.error('Error getting all banners:', error)\n return []\n }\n}\n", "import {\n BBox,\n Feature,\n FeatureCollection,\n Geometry,\n GeometryCollection,\n GeometryObject,\n LineString,\n MultiLineString,\n MultiPoint,\n MultiPolygon,\n Point,\n Polygon,\n Position,\n GeoJsonProperties,\n} from \"geojson\";\n\nimport { Id } from \"./lib/geojson.js\";\nexport * from \"./lib/geojson.js\";\n\n/**\n * @module helpers\n */\n\n// TurfJS Combined Types\nexport type Coord = Feature | Point | Position;\n\n/**\n * Linear measurement units.\n *\n * ⚠️ Warning. Be aware of the implications of using radian or degree units to\n * measure distance. The distance represented by a degree of longitude *varies*\n * depending on latitude.\n *\n * See https://www.thoughtco.com/degree-of-latitude-and-longitude-distance-4070616\n * for an illustration of this behaviour.\n *\n * @typedef\n */\nexport type Units =\n | \"meters\"\n | \"metres\"\n | \"millimeters\"\n | \"millimetres\"\n | \"centimeters\"\n | \"centimetres\"\n | \"kilometers\"\n | \"kilometres\"\n | \"miles\"\n | \"nauticalmiles\"\n | \"inches\"\n | \"yards\"\n | \"feet\"\n | \"radians\"\n | \"degrees\";\n\n/**\n * Area measurement units.\n *\n * @typedef\n */\nexport type AreaUnits =\n | Exclude\n | \"acres\"\n | \"hectares\";\n\n/**\n * Grid types.\n *\n * @typedef\n */\nexport type Grid = \"point\" | \"square\" | \"hex\" | \"triangle\";\n\n/**\n * Shorthand corner identifiers.\n *\n * @typedef\n */\nexport type Corners = \"sw\" | \"se\" | \"nw\" | \"ne\" | \"center\" | \"centroid\";\n\n/**\n * Geometries made up of lines i.e. lines and polygons.\n *\n * @typedef\n */\nexport type Lines = LineString | MultiLineString | Polygon | MultiPolygon;\n\n/**\n * Convenience type for all possible GeoJSON.\n *\n * @typedef\n */\nexport type AllGeoJSON =\n | Feature\n | FeatureCollection\n | Geometry\n | GeometryCollection;\n\n/**\n * The Earth radius in meters. Used by Turf modules that model the Earth as a sphere. The {@link https://en.wikipedia.org/wiki/Earth_radius#Arithmetic_mean_radius mean radius} was selected because it is {@link https://rosettacode.org/wiki/Haversine_formula#:~:text=This%20value%20is%20recommended recommended } by the Haversine formula (used by turf/distance) to reduce error.\n *\n * @constant\n */\nexport const earthRadius = 6371008.8;\n\n/**\n * Unit of measurement factors based on earthRadius.\n *\n * Keys are the name of the unit, values are the number of that unit in a single radian\n *\n * @constant\n */\nexport const factors: Record = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: 360 / (2 * Math.PI),\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n\n/**\n\n * Area of measurement factors based on 1 square meter.\n *\n * @constant\n */\nexport const areaFactors: Record = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n nauticalmiles: 2.9155334959812285e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @function\n * @param {GeometryObject} geometry input geometry\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature<\n G extends GeometryObject = Geometry,\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n geom: G | null,\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n const feat: any = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @function\n * @param {(\"Point\" | \"LineString\" | \"Polygon\" | \"MultiPoint\" | \"MultiLineString\" | \"MultiPolygon\")} type Geometry Type\n * @param {Array} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry<\n T extends\n | \"Point\"\n | \"LineString\"\n | \"Polygon\"\n | \"MultiPoint\"\n | \"MultiLineString\"\n | \"MultiPolygon\",\n>(\n type: T,\n coordinates: any[],\n _options: Record = {}\n): Extract {\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry as Extract;\n case \"LineString\":\n return lineString(coordinates).geometry as Extract;\n case \"Polygon\":\n return polygon(coordinates).geometry as Extract;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry as Extract;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry as Extract<\n Geometry,\n { type: T }\n >;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry as Extract<\n Geometry,\n { type: T }\n >;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @function\n * @param {Position} coordinates longitude, latitude position (each in decimal degrees)\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point

(\n coordinates: Position,\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n\n const geom: Point = {\n type: \"Point\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @function\n * @param {Position[]} coordinates an array of Points\n * @param {GeoJsonProperties} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {Id} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points

(\n coordinates: Position[],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection {\n return featureCollection(\n coordinates.map((coords) => {\n return point(coords, properties);\n }),\n options\n );\n}\n\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @function\n * @param {Position[][]} coordinates an array of LinearRings\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon

(\n coordinates: Position[][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n for (const ring of coordinates) {\n if (ring.length < 4) {\n throw new Error(\n \"Each LinearRing of a Polygon must have 4 or more Positions.\"\n );\n }\n\n if (ring[ring.length - 1].length !== ring[0].length) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n\n for (let j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n const geom: Polygon = {\n type: \"Polygon\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @function\n * @param {Position[][][]} coordinates an array of Polygon coordinates\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons

(\n coordinates: Position[][][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection {\n return featureCollection(\n coordinates.map((coords) => {\n return polygon(coords, properties);\n }),\n options\n );\n}\n\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @function\n * @param {Position[]} coordinates an array of Positions\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString

(\n coordinates: Position[],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n const geom: LineString = {\n type: \"LineString\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @function\n * @param {Position[][]} coordinates an array of LinearRings\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {Id} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings

(\n coordinates: Position[][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection {\n return featureCollection(\n coordinates.map((coords) => {\n return lineString(coords, properties);\n }),\n options\n );\n}\n\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @function\n * @param {Array>} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection<\n G extends GeometryObject = Geometry,\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n features: Array>,\n options: { bbox?: BBox; id?: Id } = {}\n): FeatureCollection {\n const fc: any = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n\n/**\n * Creates a {@link Feature}<{@link MultiLineString}> based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Position[][]} coordinates an array of LineStrings\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString<\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n coordinates: Position[][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n const geom: MultiLineString = {\n type: \"MultiLineString\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Feature}<{@link MultiPoint}> based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Position[]} coordinates an array of Positions\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint

(\n coordinates: Position[],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n const geom: MultiPoint = {\n type: \"MultiPoint\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a {@link Feature}<{@link MultiPolygon}> based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Position[][][]} coordinates an array of Polygons\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon

(\n coordinates: Position[][][],\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature {\n const geom: MultiPolygon = {\n type: \"MultiPolygon\",\n coordinates,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Creates a Feature based on a\n * coordinate array. Properties can be added optionally.\n *\n * @function\n * @param {Array} geometries an array of GeoJSON Geometries\n * @param {GeoJsonProperties} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {BBox} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {Id} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection<\n G extends\n | Point\n | LineString\n | Polygon\n | MultiPoint\n | MultiLineString\n | MultiPolygon,\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n geometries: Array,\n properties?: P,\n options: { bbox?: BBox; id?: Id } = {}\n): Feature, P> {\n const geom: GeometryCollection = {\n type: \"GeometryCollection\",\n geometries,\n };\n return feature(geom, properties, options);\n}\n\n/**\n * Round number to precision\n *\n * @function\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num: number, precision = 0): number {\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n const multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @function\n * @param {number} radians in radians across the sphere\n * @param {Units} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(\n radians: number,\n units: Units = \"kilometers\"\n): number {\n const factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @function\n * @param {number} distance in real units\n * @param {Units} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(\n distance: number,\n units: Units = \"kilometers\"\n): number {\n const factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @function\n * @param {number} distance in real units\n * @param {Units} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance: number, units?: Units): number {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @function\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing: number): number {\n let angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n\n/**\n * Converts any azimuth angle from the north line direction (positive clockwise)\n * and returns an angle between -180 and +180 degrees (positive clockwise), 0 being the north line\n *\n * @function\n * @param {number} angle between 0 and 360 degrees\n * @returns {number} bearing between -180 and +180 degrees\n */\nexport function azimuthToBearing(angle: number): number {\n // Ignore full revolutions (multiples of 360)\n angle = angle % 360;\n\n if (angle > 180) {\n return angle - 360;\n } else if (angle < -180) {\n return angle + 360;\n }\n\n return angle;\n}\n\n/**\n * Converts an angle in radians to degrees\n *\n * @function\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians: number): number {\n // % (2 * Math.PI) radians in case someone passes value > 2π\n const normalisedRadians = radians % (2 * Math.PI);\n return (normalisedRadians * 180) / Math.PI;\n}\n\n/**\n * Converts an angle in degrees to radians\n *\n * @function\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees: number): number {\n // % 360 degrees in case someone passes value > 360\n const normalisedDegrees = degrees % 360;\n return (normalisedDegrees * Math.PI) / 180;\n}\n\n/**\n * Converts a length from one unit to another.\n *\n * @function\n * @param {number} length Length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] Input length unit\n * @param {Units} [finalUnit=\"kilometers\"] Returned length unit\n * @returns {number} The converted length\n */\nexport function convertLength(\n length: number,\n originalUnit: Units = \"kilometers\",\n finalUnit: Units = \"kilometers\"\n): number {\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n\n/**\n * Converts an area from one unit to another.\n *\n * @function\n * @param {number} area Area to be converted\n * @param {AreaUnits} [originalUnit=\"meters\"] Input area unit\n * @param {AreaUnits} [finalUnit=\"kilometers\"] Returned area unit\n * @returns {number} The converted length\n */\nexport function convertArea(\n area: number,\n originalUnit: AreaUnits = \"meters\",\n finalUnit: AreaUnits = \"kilometers\"\n): number {\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n\n const startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n\n const finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n\n return (area / startFactor) * finalFactor;\n}\n\n/**\n * isNumber\n *\n * @function\n * @param {any} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num: any): boolean {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n\n/**\n * isObject\n *\n * @function\n * @param {any} input variable to validate\n * @returns {boolean} true/false, including false for Arrays and Functions\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input: any): boolean {\n return input !== null && typeof input === \"object\" && !Array.isArray(input);\n}\n\n/**\n * Validate BBox\n *\n * @private\n * @param {any} bbox BBox to validate\n * @returns {void}\n * @throws {Error} if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox: any): void {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach((num) => {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n\n/**\n * Validate Id\n *\n * @private\n * @param {any} id Id to validate\n * @returns {void}\n * @throws {Error} if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id: any): void {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n", "import {\n Feature,\n FeatureCollection,\n Geometry,\n LineString,\n MultiPoint,\n MultiLineString,\n MultiPolygon,\n Point,\n Polygon,\n} from \"geojson\";\nimport { isNumber } from \"@turf/helpers\";\n\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @function\n * @param {Array|Geometry|Feature} coord GeoJSON Point or an Array of numbers\n * @returns {Array} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nfunction getCoord(coord: Feature | Point | number[]): number[] {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n\n if (!Array.isArray(coord)) {\n if (\n coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\"\n ) {\n return [...coord.geometry.coordinates];\n }\n if (coord.type === \"Point\") {\n return [...coord.coordinates];\n }\n }\n if (\n Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])\n ) {\n return [...coord];\n }\n\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @function\n * @param {Array|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nfunction getCoords<\n G extends\n | Point\n | LineString\n | Polygon\n | MultiPoint\n | MultiLineString\n | MultiPolygon,\n>(coords: any[] | Feature | G): any[] {\n if (Array.isArray(coords)) {\n return coords;\n }\n\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n } else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n\n throw new Error(\n \"coords must be GeoJSON Feature, Geometry Object or an Array\"\n );\n}\n\n/**\n * Checks if coordinates contains a number\n *\n * @function\n * @param {Array} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nfunction containsNumber(coordinates: any[]): boolean {\n if (\n coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])\n ) {\n return true;\n }\n\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @function\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction geojsonType(value: any, type: string, name: string): void {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n\n if (!value || value.type !== type) {\n throw new Error(\n \"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type\n );\n }\n}\n\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @function\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nfunction featureOf(feature: Feature, type: string, name: string): void {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\n \"Invalid input to \" + name + \", Feature with geometry required\"\n );\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\n \"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type\n );\n }\n}\n\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @function\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction collectionOf(\n featureCollection: FeatureCollection,\n type: string,\n name: string\n) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\n \"Invalid input to \" + name + \", FeatureCollection required\"\n );\n }\n for (const feature of featureCollection.features) {\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\n \"Invalid input to \" + name + \", Feature with geometry required\"\n );\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\n \"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type\n );\n }\n }\n}\n\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nfunction getGeom(geojson: Feature | G): G {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nfunction getType(\n geojson: Feature | FeatureCollection | Geometry,\n _name?: string\n): string {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n\nexport {\n getCoord,\n getCoords,\n containsNumber,\n geojsonType,\n featureOf,\n collectionOf,\n getGeom,\n getType,\n};\n// No default export!\n", "export const epsilon = 1.1102230246251565e-16;\nexport const splitter = 134217729;\nexport const resulterrbound = (3 + 8 * epsilon) * epsilon;\n\n// fast_expansion_sum_zeroelim routine from oritinal code\nexport function sum(elen, e, flen, f, h) {\n let Q, Qnew, hh, bvirt;\n let enow = e[0];\n let fnow = f[0];\n let eindex = 0;\n let findex = 0;\n if ((fnow > enow) === (fnow > -enow)) {\n Q = enow;\n enow = e[++eindex];\n } else {\n Q = fnow;\n fnow = f[++findex];\n }\n let hindex = 0;\n if (eindex < elen && findex < flen) {\n if ((fnow > enow) === (fnow > -enow)) {\n Qnew = enow + Q;\n hh = Q - (Qnew - enow);\n enow = e[++eindex];\n } else {\n Qnew = fnow + Q;\n hh = Q - (Qnew - fnow);\n fnow = f[++findex];\n }\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n while (eindex < elen && findex < flen) {\n if ((fnow > enow) === (fnow > -enow)) {\n Qnew = Q + enow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (enow - bvirt);\n enow = e[++eindex];\n } else {\n Qnew = Q + fnow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n fnow = f[++findex];\n }\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n }\n while (eindex < elen) {\n Qnew = Q + enow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (enow - bvirt);\n enow = e[++eindex];\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n while (findex < flen) {\n Qnew = Q + fnow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n fnow = f[++findex];\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n if (Q !== 0 || hindex === 0) {\n h[hindex++] = Q;\n }\n return hindex;\n}\n\nexport function sum_three(alen, a, blen, b, clen, c, tmp, out) {\n return sum(sum(alen, a, blen, b, tmp), tmp, clen, c, out);\n}\n\n// scale_expansion_zeroelim routine from oritinal code\nexport function scale(elen, e, b, h) {\n let Q, sum, hh, product1, product0;\n let bvirt, c, ahi, alo, bhi, blo;\n\n c = splitter * b;\n bhi = c - (c - b);\n blo = b - bhi;\n let enow = e[0];\n Q = enow * b;\n c = splitter * enow;\n ahi = c - (c - enow);\n alo = enow - ahi;\n hh = alo * blo - (Q - ahi * bhi - alo * bhi - ahi * blo);\n let hindex = 0;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n for (let i = 1; i < elen; i++) {\n enow = e[i];\n product1 = enow * b;\n c = splitter * enow;\n ahi = c - (c - enow);\n alo = enow - ahi;\n product0 = alo * blo - (product1 - ahi * bhi - alo * bhi - ahi * blo);\n sum = Q + product0;\n bvirt = sum - Q;\n hh = Q - (sum - bvirt) + (product0 - bvirt);\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n Q = product1 + sum;\n hh = sum - (Q - product1);\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n if (Q !== 0 || hindex === 0) {\n h[hindex++] = Q;\n }\n return hindex;\n}\n\nexport function negate(elen, e) {\n for (let i = 0; i < elen; i++) e[i] = -e[i];\n return elen;\n}\n\nexport function estimate(elen, e) {\n let Q = e[0];\n for (let i = 1; i < elen; i++) Q += e[i];\n return Q;\n}\n\nexport function vec(n) {\n return new Float64Array(n);\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum} from './util.js';\n\nconst ccwerrboundA = (3 + 16 * epsilon) * epsilon;\nconst ccwerrboundB = (2 + 12 * epsilon) * epsilon;\nconst ccwerrboundC = (9 + 64 * epsilon) * epsilon * epsilon;\n\nconst B = vec(4);\nconst C1 = vec(8);\nconst C2 = vec(12);\nconst D = vec(16);\nconst u = vec(4);\n\nfunction orient2dadapt(ax, ay, bx, by, cx, cy, detsum) {\n let acxtail, acytail, bcxtail, bcytail;\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n const acx = ax - cx;\n const bcx = bx - cx;\n const acy = ay - cy;\n const bcy = by - cy;\n\n s1 = acx * bcy;\n c = splitter * acx;\n ahi = c - (c - acx);\n alo = acx - ahi;\n c = splitter * bcy;\n bhi = c - (c - bcy);\n blo = bcy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acy * bcx;\n c = splitter * acy;\n ahi = c - (c - acy);\n alo = acy - ahi;\n c = splitter * bcx;\n bhi = c - (c - bcx);\n blo = bcx - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n B[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n B[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n B[2] = _j - (u3 - bvirt) + (_i - bvirt);\n B[3] = u3;\n\n let det = estimate(4, B);\n let errbound = ccwerrboundB * detsum;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - acx;\n acxtail = ax - (acx + bvirt) + (bvirt - cx);\n bvirt = bx - bcx;\n bcxtail = bx - (bcx + bvirt) + (bvirt - cx);\n bvirt = ay - acy;\n acytail = ay - (acy + bvirt) + (bvirt - cy);\n bvirt = by - bcy;\n bcytail = by - (bcy + bvirt) + (bvirt - cy);\n\n if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) {\n return det;\n }\n\n errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det);\n det += (acx * bcytail + bcy * acxtail) - (acy * bcxtail + bcx * acytail);\n if (det >= errbound || -det >= errbound) return det;\n\n s1 = acxtail * bcy;\n c = splitter * acxtail;\n ahi = c - (c - acxtail);\n alo = acxtail - ahi;\n c = splitter * bcy;\n bhi = c - (c - bcy);\n blo = bcy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acytail * bcx;\n c = splitter * acytail;\n ahi = c - (c - acytail);\n alo = acytail - ahi;\n c = splitter * bcx;\n bhi = c - (c - bcx);\n blo = bcx - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const C1len = sum(4, B, 4, u, C1);\n\n s1 = acx * bcytail;\n c = splitter * acx;\n ahi = c - (c - acx);\n alo = acx - ahi;\n c = splitter * bcytail;\n bhi = c - (c - bcytail);\n blo = bcytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acy * bcxtail;\n c = splitter * acy;\n ahi = c - (c - acy);\n alo = acy - ahi;\n c = splitter * bcxtail;\n bhi = c - (c - bcxtail);\n blo = bcxtail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const C2len = sum(C1len, C1, 4, u, C2);\n\n s1 = acxtail * bcytail;\n c = splitter * acxtail;\n ahi = c - (c - acxtail);\n alo = acxtail - ahi;\n c = splitter * bcytail;\n bhi = c - (c - bcytail);\n blo = bcytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acytail * bcxtail;\n c = splitter * acytail;\n ahi = c - (c - acytail);\n alo = acytail - ahi;\n c = splitter * bcxtail;\n bhi = c - (c - bcxtail);\n blo = bcxtail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const Dlen = sum(C2len, C2, 4, u, D);\n\n return D[Dlen - 1];\n}\n\nexport function orient2d(ax, ay, bx, by, cx, cy) {\n const detleft = (ay - cy) * (bx - cx);\n const detright = (ax - cx) * (by - cy);\n const det = detleft - detright;\n\n const detsum = Math.abs(detleft + detright);\n if (Math.abs(det) >= ccwerrboundA * detsum) return det;\n\n return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum);\n}\n\nexport function orient2dfast(ax, ay, bx, by, cx, cy) {\n return (ay - cy) * (bx - cx) - (ax - cx) * (by - cy);\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum, scale} from './util.js';\n\nconst o3derrboundA = (7 + 56 * epsilon) * epsilon;\nconst o3derrboundB = (3 + 28 * epsilon) * epsilon;\nconst o3derrboundC = (26 + 288 * epsilon) * epsilon * epsilon;\n\nconst bc = vec(4);\nconst ca = vec(4);\nconst ab = vec(4);\nconst at_b = vec(4);\nconst at_c = vec(4);\nconst bt_c = vec(4);\nconst bt_a = vec(4);\nconst ct_a = vec(4);\nconst ct_b = vec(4);\nconst bct = vec(8);\nconst cat = vec(8);\nconst abt = vec(8);\nconst u = vec(4);\n\nconst _8 = vec(8);\nconst _8b = vec(8);\nconst _16 = vec(8);\nconst _12 = vec(12);\n\nlet fin = vec(192);\nlet fin2 = vec(192);\n\nfunction finadd(finlen, alen, a) {\n finlen = sum(finlen, fin, alen, a, fin2);\n const tmp = fin; fin = fin2; fin2 = tmp;\n return finlen;\n}\n\nfunction tailinit(xtail, ytail, ax, ay, bx, by, a, b) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3, negate;\n if (xtail === 0) {\n if (ytail === 0) {\n a[0] = 0;\n b[0] = 0;\n return 1;\n } else {\n negate = -ytail;\n s1 = negate * ax;\n c = splitter * negate;\n ahi = c - (c - negate);\n alo = negate - ahi;\n c = splitter * ax;\n bhi = c - (c - ax);\n blo = ax - bhi;\n a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n a[1] = s1;\n s1 = ytail * bx;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * bx;\n bhi = c - (c - bx);\n blo = bx - bhi;\n b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n b[1] = s1;\n return 2;\n }\n } else {\n if (ytail === 0) {\n s1 = xtail * ay;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n a[1] = s1;\n negate = -xtail;\n s1 = negate * by;\n c = splitter * negate;\n ahi = c - (c - negate);\n alo = negate - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n b[1] = s1;\n return 2;\n } else {\n s1 = xtail * ay;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ytail * ax;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * ax;\n bhi = c - (c - ax);\n blo = ax - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n a[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n a[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n a[2] = _j - (u3 - bvirt) + (_i - bvirt);\n a[3] = u3;\n s1 = ytail * bx;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * bx;\n bhi = c - (c - bx);\n blo = bx - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = xtail * by;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n b[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n b[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n b[2] = _j - (u3 - bvirt) + (_i - bvirt);\n b[3] = u3;\n return 4;\n }\n }\n}\n\nfunction tailadd(finlen, a, b, k, z) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, u3;\n s1 = a * b;\n c = splitter * a;\n ahi = c - (c - a);\n alo = a - ahi;\n c = splitter * b;\n bhi = c - (c - b);\n blo = b - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n c = splitter * k;\n bhi = c - (c - k);\n blo = k - bhi;\n _i = s0 * k;\n c = splitter * s0;\n ahi = c - (c - s0);\n alo = s0 - ahi;\n u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n _j = s1 * k;\n c = splitter * s1;\n ahi = c - (c - s1);\n alo = s1 - ahi;\n _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n _k = _i + _0;\n bvirt = _k - _i;\n u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n u3 = _j + _k;\n u[2] = _k - (u3 - _j);\n u[3] = u3;\n finlen = finadd(finlen, 4, u);\n if (z !== 0) {\n c = splitter * z;\n bhi = c - (c - z);\n blo = z - bhi;\n _i = s0 * z;\n c = splitter * s0;\n ahi = c - (c - s0);\n alo = s0 - ahi;\n u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n _j = s1 * z;\n c = splitter * s1;\n ahi = c - (c - s1);\n alo = s1 - ahi;\n _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n _k = _i + _0;\n bvirt = _k - _i;\n u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n u3 = _j + _k;\n u[2] = _k - (u3 - _j);\n u[3] = u3;\n finlen = finadd(finlen, 4, u);\n }\n return finlen;\n}\n\nfunction orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent) {\n let finlen;\n let adxtail, bdxtail, cdxtail;\n let adytail, bdytail, cdytail;\n let adztail, bdztail, cdztail;\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3;\n\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n s1 = bdx * cdy;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * bdy;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cdx * ady;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * cdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ca[3] = u3;\n s1 = adx * bdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * ady;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n\n finlen = sum(\n sum(\n scale(4, bc, adz, _8), _8,\n scale(4, ca, bdz, _8b), _8b, _16), _16,\n scale(4, ab, cdz, _8), _8, fin);\n\n let det = estimate(finlen, fin);\n let errbound = o3derrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - adx;\n adxtail = ax - (adx + bvirt) + (bvirt - dx);\n bvirt = bx - bdx;\n bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n bvirt = cx - cdx;\n cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n bvirt = ay - ady;\n adytail = ay - (ady + bvirt) + (bvirt - dy);\n bvirt = by - bdy;\n bdytail = by - (bdy + bvirt) + (bvirt - dy);\n bvirt = cy - cdy;\n cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n bvirt = az - adz;\n adztail = az - (adz + bvirt) + (bvirt - dz);\n bvirt = bz - bdz;\n bdztail = bz - (bdz + bvirt) + (bvirt - dz);\n bvirt = cz - cdz;\n cdztail = cz - (cdz + bvirt) + (bvirt - dz);\n\n if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 &&\n adytail === 0 && bdytail === 0 && cdytail === 0 &&\n adztail === 0 && bdztail === 0 && cdztail === 0) {\n return det;\n }\n\n errbound = o3derrboundC * permanent + resulterrbound * Math.abs(det);\n det +=\n adz * (bdx * cdytail + cdy * bdxtail - (bdy * cdxtail + cdx * bdytail)) + adztail * (bdx * cdy - bdy * cdx) +\n bdz * (cdx * adytail + ady * cdxtail - (cdy * adxtail + adx * cdytail)) + bdztail * (cdx * ady - cdy * adx) +\n cdz * (adx * bdytail + bdy * adxtail - (ady * bdxtail + bdx * adytail)) + cdztail * (adx * bdy - ady * bdx);\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n const at_len = tailinit(adxtail, adytail, bdx, bdy, cdx, cdy, at_b, at_c);\n const bt_len = tailinit(bdxtail, bdytail, cdx, cdy, adx, ady, bt_c, bt_a);\n const ct_len = tailinit(cdxtail, cdytail, adx, ady, bdx, bdy, ct_a, ct_b);\n\n const bctlen = sum(bt_len, bt_c, ct_len, ct_b, bct);\n finlen = finadd(finlen, scale(bctlen, bct, adz, _16), _16);\n\n const catlen = sum(ct_len, ct_a, at_len, at_c, cat);\n finlen = finadd(finlen, scale(catlen, cat, bdz, _16), _16);\n\n const abtlen = sum(at_len, at_b, bt_len, bt_a, abt);\n finlen = finadd(finlen, scale(abtlen, abt, cdz, _16), _16);\n\n if (adztail !== 0) {\n finlen = finadd(finlen, scale(4, bc, adztail, _12), _12);\n finlen = finadd(finlen, scale(bctlen, bct, adztail, _16), _16);\n }\n if (bdztail !== 0) {\n finlen = finadd(finlen, scale(4, ca, bdztail, _12), _12);\n finlen = finadd(finlen, scale(catlen, cat, bdztail, _16), _16);\n }\n if (cdztail !== 0) {\n finlen = finadd(finlen, scale(4, ab, cdztail, _12), _12);\n finlen = finadd(finlen, scale(abtlen, abt, cdztail, _16), _16);\n }\n\n if (adxtail !== 0) {\n if (bdytail !== 0) {\n finlen = tailadd(finlen, adxtail, bdytail, cdz, cdztail);\n }\n if (cdytail !== 0) {\n finlen = tailadd(finlen, -adxtail, cdytail, bdz, bdztail);\n }\n }\n if (bdxtail !== 0) {\n if (cdytail !== 0) {\n finlen = tailadd(finlen, bdxtail, cdytail, adz, adztail);\n }\n if (adytail !== 0) {\n finlen = tailadd(finlen, -bdxtail, adytail, cdz, cdztail);\n }\n }\n if (cdxtail !== 0) {\n if (adytail !== 0) {\n finlen = tailadd(finlen, cdxtail, adytail, bdz, bdztail);\n }\n if (bdytail !== 0) {\n finlen = tailadd(finlen, -cdxtail, bdytail, adz, adztail);\n }\n }\n\n return fin[finlen - 1];\n}\n\nexport function orient3d(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n const bdxcdy = bdx * cdy;\n const cdxbdy = cdx * bdy;\n\n const cdxady = cdx * ady;\n const adxcdy = adx * cdy;\n\n const adxbdy = adx * bdy;\n const bdxady = bdx * ady;\n\n const det =\n adz * (bdxcdy - cdxbdy) +\n bdz * (cdxady - adxcdy) +\n cdz * (adxbdy - bdxady);\n\n const permanent =\n (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * Math.abs(adz) +\n (Math.abs(cdxady) + Math.abs(adxcdy)) * Math.abs(bdz) +\n (Math.abs(adxbdy) + Math.abs(bdxady)) * Math.abs(cdz);\n\n const errbound = o3derrboundA * permanent;\n if (det > errbound || -det > errbound) {\n return det;\n }\n\n return orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent);\n}\n\nexport function orient3dfast(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n return adx * (bdy * cdz - bdz * cdy) +\n bdx * (cdy * adz - cdz * ady) +\n cdx * (ady * bdz - adz * bdy);\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum, sum_three, scale} from './util.js';\n\nconst iccerrboundA = (10 + 96 * epsilon) * epsilon;\nconst iccerrboundB = (4 + 48 * epsilon) * epsilon;\nconst iccerrboundC = (44 + 576 * epsilon) * epsilon * epsilon;\n\nconst bc = vec(4);\nconst ca = vec(4);\nconst ab = vec(4);\nconst aa = vec(4);\nconst bb = vec(4);\nconst cc = vec(4);\nconst u = vec(4);\nconst v = vec(4);\nconst axtbc = vec(8);\nconst aytbc = vec(8);\nconst bxtca = vec(8);\nconst bytca = vec(8);\nconst cxtab = vec(8);\nconst cytab = vec(8);\nconst abt = vec(8);\nconst bct = vec(8);\nconst cat = vec(8);\nconst abtt = vec(4);\nconst bctt = vec(4);\nconst catt = vec(4);\n\nconst _8 = vec(8);\nconst _16 = vec(16);\nconst _16b = vec(16);\nconst _16c = vec(16);\nconst _32 = vec(32);\nconst _32b = vec(32);\nconst _48 = vec(48);\nconst _64 = vec(64);\n\nlet fin = vec(1152);\nlet fin2 = vec(1152);\n\nfunction finadd(finlen, a, alen) {\n finlen = sum(finlen, fin, a, alen, fin2);\n const tmp = fin; fin = fin2; fin2 = tmp;\n return finlen;\n}\n\nfunction incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent) {\n let finlen;\n let adxtail, bdxtail, cdxtail, adytail, bdytail, cdytail;\n let axtbclen, aytbclen, bxtcalen, bytcalen, cxtablen, cytablen;\n let abtlen, bctlen, catlen;\n let abttlen, bcttlen, cattlen;\n let n1, n0;\n\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n\n s1 = bdx * cdy;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * bdy;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cdx * ady;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * cdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ca[3] = u3;\n s1 = adx * bdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * ady;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n\n finlen = sum(\n sum(\n sum(\n scale(scale(4, bc, adx, _8), _8, adx, _16), _16,\n scale(scale(4, bc, ady, _8), _8, ady, _16b), _16b, _32), _32,\n sum(\n scale(scale(4, ca, bdx, _8), _8, bdx, _16), _16,\n scale(scale(4, ca, bdy, _8), _8, bdy, _16b), _16b, _32b), _32b, _64), _64,\n sum(\n scale(scale(4, ab, cdx, _8), _8, cdx, _16), _16,\n scale(scale(4, ab, cdy, _8), _8, cdy, _16b), _16b, _32), _32, fin);\n\n let det = estimate(finlen, fin);\n let errbound = iccerrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - adx;\n adxtail = ax - (adx + bvirt) + (bvirt - dx);\n bvirt = ay - ady;\n adytail = ay - (ady + bvirt) + (bvirt - dy);\n bvirt = bx - bdx;\n bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n bvirt = by - bdy;\n bdytail = by - (bdy + bvirt) + (bvirt - dy);\n bvirt = cx - cdx;\n cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n bvirt = cy - cdy;\n cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 && adytail === 0 && bdytail === 0 && cdytail === 0) {\n return det;\n }\n\n errbound = iccerrboundC * permanent + resulterrbound * Math.abs(det);\n det += ((adx * adx + ady * ady) * ((bdx * cdytail + cdy * bdxtail) - (bdy * cdxtail + cdx * bdytail)) +\n 2 * (adx * adxtail + ady * adytail) * (bdx * cdy - bdy * cdx)) +\n ((bdx * bdx + bdy * bdy) * ((cdx * adytail + ady * cdxtail) - (cdy * adxtail + adx * cdytail)) +\n 2 * (bdx * bdxtail + bdy * bdytail) * (cdx * ady - cdy * adx)) +\n ((cdx * cdx + cdy * cdy) * ((adx * bdytail + bdy * adxtail) - (ady * bdxtail + bdx * adytail)) +\n 2 * (cdx * cdxtail + cdy * cdytail) * (adx * bdy - ady * bdx));\n\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n s1 = adx * adx;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = ady * ady;\n c = splitter * ady;\n ahi = c - (c - ady);\n alo = ady - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n aa[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n aa[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n aa[2] = _j - (u3 - bvirt) + (_i - bvirt);\n aa[3] = u3;\n }\n if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n s1 = bdx * bdx;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = bdy * bdy;\n c = splitter * bdy;\n ahi = c - (c - bdy);\n alo = bdy - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n bb[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n bb[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bb[3] = u3;\n }\n if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n s1 = cdx * cdx;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = cdy * cdy;\n c = splitter * cdy;\n ahi = c - (c - cdy);\n alo = cdy - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n cc[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n cc[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n cc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n cc[3] = u3;\n }\n\n if (adxtail !== 0) {\n axtbclen = scale(4, bc, adxtail, axtbc);\n finlen = finadd(finlen, sum_three(\n scale(axtbclen, axtbc, 2 * adx, _16), _16,\n scale(scale(4, cc, adxtail, _8), _8, bdy, _16b), _16b,\n scale(scale(4, bb, adxtail, _8), _8, -cdy, _16c), _16c, _32, _48), _48);\n }\n if (adytail !== 0) {\n aytbclen = scale(4, bc, adytail, aytbc);\n finlen = finadd(finlen, sum_three(\n scale(aytbclen, aytbc, 2 * ady, _16), _16,\n scale(scale(4, bb, adytail, _8), _8, cdx, _16b), _16b,\n scale(scale(4, cc, adytail, _8), _8, -bdx, _16c), _16c, _32, _48), _48);\n }\n if (bdxtail !== 0) {\n bxtcalen = scale(4, ca, bdxtail, bxtca);\n finlen = finadd(finlen, sum_three(\n scale(bxtcalen, bxtca, 2 * bdx, _16), _16,\n scale(scale(4, aa, bdxtail, _8), _8, cdy, _16b), _16b,\n scale(scale(4, cc, bdxtail, _8), _8, -ady, _16c), _16c, _32, _48), _48);\n }\n if (bdytail !== 0) {\n bytcalen = scale(4, ca, bdytail, bytca);\n finlen = finadd(finlen, sum_three(\n scale(bytcalen, bytca, 2 * bdy, _16), _16,\n scale(scale(4, cc, bdytail, _8), _8, adx, _16b), _16b,\n scale(scale(4, aa, bdytail, _8), _8, -cdx, _16c), _16c, _32, _48), _48);\n }\n if (cdxtail !== 0) {\n cxtablen = scale(4, ab, cdxtail, cxtab);\n finlen = finadd(finlen, sum_three(\n scale(cxtablen, cxtab, 2 * cdx, _16), _16,\n scale(scale(4, bb, cdxtail, _8), _8, ady, _16b), _16b,\n scale(scale(4, aa, cdxtail, _8), _8, -bdy, _16c), _16c, _32, _48), _48);\n }\n if (cdytail !== 0) {\n cytablen = scale(4, ab, cdytail, cytab);\n finlen = finadd(finlen, sum_three(\n scale(cytablen, cytab, 2 * cdy, _16), _16,\n scale(scale(4, aa, cdytail, _8), _8, bdx, _16b), _16b,\n scale(scale(4, bb, cdytail, _8), _8, -adx, _16c), _16c, _32, _48), _48);\n }\n\n if (adxtail !== 0 || adytail !== 0) {\n if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n s1 = bdxtail * cdy;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * cdytail;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n s1 = cdxtail * -bdy;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * -bdy;\n bhi = c - (c - -bdy);\n blo = -bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * -bdytail;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * -bdytail;\n bhi = c - (c - -bdytail);\n blo = -bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n bctlen = sum(4, u, 4, v, bct);\n s1 = bdxtail * cdytail;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdxtail * bdytail;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bctt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bctt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bctt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bctt[3] = u3;\n bcttlen = 4;\n } else {\n bct[0] = 0;\n bctlen = 1;\n bctt[0] = 0;\n bcttlen = 1;\n }\n if (adxtail !== 0) {\n const len = scale(bctlen, bct, adxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(axtbclen, axtbc, adxtail, _16), _16,\n scale(len, _16c, 2 * adx, _32), _32, _48), _48);\n\n const len2 = scale(bcttlen, bctt, adxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * adx, _16), _16,\n scale(len2, _8, adxtail, _16b), _16b,\n scale(len, _16c, adxtail, _32), _32, _32b, _64), _64);\n\n if (bdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, cc, adxtail, _8), _8, bdytail, _16), _16);\n }\n if (cdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, bb, -adxtail, _8), _8, cdytail, _16), _16);\n }\n }\n if (adytail !== 0) {\n const len = scale(bctlen, bct, adytail, _16c);\n finlen = finadd(finlen, sum(\n scale(aytbclen, aytbc, adytail, _16), _16,\n scale(len, _16c, 2 * ady, _32), _32, _48), _48);\n\n const len2 = scale(bcttlen, bctt, adytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * ady, _16), _16,\n scale(len2, _8, adytail, _16b), _16b,\n scale(len, _16c, adytail, _32), _32, _32b, _64), _64);\n }\n }\n if (bdxtail !== 0 || bdytail !== 0) {\n if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n s1 = cdxtail * ady;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * adytail;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n n1 = -cdy;\n n0 = -cdytail;\n s1 = adxtail * n1;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * n1;\n bhi = c - (c - n1);\n blo = n1 - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * n0;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * n0;\n bhi = c - (c - n0);\n blo = n0 - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n catlen = sum(4, u, 4, v, cat);\n s1 = cdxtail * adytail;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adxtail * cdytail;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n catt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n catt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n catt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n catt[3] = u3;\n cattlen = 4;\n } else {\n cat[0] = 0;\n catlen = 1;\n catt[0] = 0;\n cattlen = 1;\n }\n if (bdxtail !== 0) {\n const len = scale(catlen, cat, bdxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(bxtcalen, bxtca, bdxtail, _16), _16,\n scale(len, _16c, 2 * bdx, _32), _32, _48), _48);\n\n const len2 = scale(cattlen, catt, bdxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * bdx, _16), _16,\n scale(len2, _8, bdxtail, _16b), _16b,\n scale(len, _16c, bdxtail, _32), _32, _32b, _64), _64);\n\n if (cdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, aa, bdxtail, _8), _8, cdytail, _16), _16);\n }\n if (adytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, cc, -bdxtail, _8), _8, adytail, _16), _16);\n }\n }\n if (bdytail !== 0) {\n const len = scale(catlen, cat, bdytail, _16c);\n finlen = finadd(finlen, sum(\n scale(bytcalen, bytca, bdytail, _16), _16,\n scale(len, _16c, 2 * bdy, _32), _32, _48), _48);\n\n const len2 = scale(cattlen, catt, bdytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * bdy, _16), _16,\n scale(len2, _8, bdytail, _16b), _16b,\n scale(len, _16c, bdytail, _32), _32, _32b, _64), _64);\n }\n }\n if (cdxtail !== 0 || cdytail !== 0) {\n if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n s1 = adxtail * bdy;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * bdytail;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n n1 = -ady;\n n0 = -adytail;\n s1 = bdxtail * n1;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * n1;\n bhi = c - (c - n1);\n blo = n1 - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * n0;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * n0;\n bhi = c - (c - n0);\n blo = n0 - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n abtlen = sum(4, u, 4, v, abt);\n s1 = adxtail * bdytail;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdxtail * adytail;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n abtt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n abtt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n abtt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n abtt[3] = u3;\n abttlen = 4;\n } else {\n abt[0] = 0;\n abtlen = 1;\n abtt[0] = 0;\n abttlen = 1;\n }\n if (cdxtail !== 0) {\n const len = scale(abtlen, abt, cdxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(cxtablen, cxtab, cdxtail, _16), _16,\n scale(len, _16c, 2 * cdx, _32), _32, _48), _48);\n\n const len2 = scale(abttlen, abtt, cdxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * cdx, _16), _16,\n scale(len2, _8, cdxtail, _16b), _16b,\n scale(len, _16c, cdxtail, _32), _32, _32b, _64), _64);\n\n if (adytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, bb, cdxtail, _8), _8, adytail, _16), _16);\n }\n if (bdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, aa, -cdxtail, _8), _8, bdytail, _16), _16);\n }\n }\n if (cdytail !== 0) {\n const len = scale(abtlen, abt, cdytail, _16c);\n finlen = finadd(finlen, sum(\n scale(cytablen, cytab, cdytail, _16), _16,\n scale(len, _16c, 2 * cdy, _32), _32, _48), _48);\n\n const len2 = scale(abttlen, abtt, cdytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * cdy, _16), _16,\n scale(len2, _8, cdytail, _16b), _16b,\n scale(len, _16c, cdytail, _32), _32, _32b, _64), _64);\n }\n }\n\n return fin[finlen - 1];\n}\n\nexport function incircle(ax, ay, bx, by, cx, cy, dx, dy) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n\n const bdxcdy = bdx * cdy;\n const cdxbdy = cdx * bdy;\n const alift = adx * adx + ady * ady;\n\n const cdxady = cdx * ady;\n const adxcdy = adx * cdy;\n const blift = bdx * bdx + bdy * bdy;\n\n const adxbdy = adx * bdy;\n const bdxady = bdx * ady;\n const clift = cdx * cdx + cdy * cdy;\n\n const det =\n alift * (bdxcdy - cdxbdy) +\n blift * (cdxady - adxcdy) +\n clift * (adxbdy - bdxady);\n\n const permanent =\n (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * alift +\n (Math.abs(cdxady) + Math.abs(adxcdy)) * blift +\n (Math.abs(adxbdy) + Math.abs(bdxady)) * clift;\n\n const errbound = iccerrboundA * permanent;\n\n if (det > errbound || -det > errbound) {\n return det;\n }\n return incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent);\n}\n\nexport function incirclefast(ax, ay, bx, by, cx, cy, dx, dy) {\n const adx = ax - dx;\n const ady = ay - dy;\n const bdx = bx - dx;\n const bdy = by - dy;\n const cdx = cx - dx;\n const cdy = cy - dy;\n\n const abdet = adx * bdy - bdx * ady;\n const bcdet = bdx * cdy - cdx * bdy;\n const cadet = cdx * ady - adx * cdy;\n const alift = adx * adx + ady * ady;\n const blift = bdx * bdx + bdy * bdy;\n const clift = cdx * cdx + cdy * cdy;\n\n return alift * bcdet + blift * cadet + clift * abdet;\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum, sum_three, scale, negate} from './util.js';\n\nconst isperrboundA = (16 + 224 * epsilon) * epsilon;\nconst isperrboundB = (5 + 72 * epsilon) * epsilon;\nconst isperrboundC = (71 + 1408 * epsilon) * epsilon * epsilon;\n\nconst ab = vec(4);\nconst bc = vec(4);\nconst cd = vec(4);\nconst de = vec(4);\nconst ea = vec(4);\nconst ac = vec(4);\nconst bd = vec(4);\nconst ce = vec(4);\nconst da = vec(4);\nconst eb = vec(4);\n\nconst abc = vec(24);\nconst bcd = vec(24);\nconst cde = vec(24);\nconst dea = vec(24);\nconst eab = vec(24);\nconst abd = vec(24);\nconst bce = vec(24);\nconst cda = vec(24);\nconst deb = vec(24);\nconst eac = vec(24);\n\nconst adet = vec(1152);\nconst bdet = vec(1152);\nconst cdet = vec(1152);\nconst ddet = vec(1152);\nconst edet = vec(1152);\nconst abdet = vec(2304);\nconst cddet = vec(2304);\nconst cdedet = vec(3456);\nconst deter = vec(5760);\n\nconst _8 = vec(8);\nconst _8b = vec(8);\nconst _8c = vec(8);\nconst _16 = vec(16);\nconst _24 = vec(24);\nconst _48 = vec(48);\nconst _48b = vec(48);\nconst _96 = vec(96);\nconst _192 = vec(192);\nconst _384x = vec(384);\nconst _384y = vec(384);\nconst _384z = vec(384);\nconst _768 = vec(768);\n\nfunction sum_three_scale(a, b, c, az, bz, cz, out) {\n return sum_three(\n scale(4, a, az, _8), _8,\n scale(4, b, bz, _8b), _8b,\n scale(4, c, cz, _8c), _8c, _16, out);\n}\n\nfunction liftexact(alen, a, blen, b, clen, c, dlen, d, x, y, z, out) {\n const len = sum(\n sum(alen, a, blen, b, _48), _48,\n negate(sum(clen, c, dlen, d, _48b), _48b), _48b, _96);\n\n return sum_three(\n scale(scale(len, _96, x, _192), _192, x, _384x), _384x,\n scale(scale(len, _96, y, _192), _192, y, _384y), _384y,\n scale(scale(len, _96, z, _192), _192, z, _384z), _384z, _768, out);\n}\n\nfunction insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n s1 = ax * by;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bx * ay;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n s1 = bx * cy;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cx * by;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cx * dy;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dx * cy;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n cd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n cd[3] = u3;\n s1 = dx * ey;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ex * dy;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n de[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n de[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n de[2] = _j - (u3 - bvirt) + (_i - bvirt);\n de[3] = u3;\n s1 = ex * ay;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ax * ey;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ea[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ea[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ea[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ea[3] = u3;\n s1 = ax * cy;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cx * ay;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ac[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ac[3] = u3;\n s1 = bx * dy;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dx * by;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bd[3] = u3;\n s1 = cx * ey;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ex * cy;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ce[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ce[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ce[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ce[3] = u3;\n s1 = dx * ay;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ax * dy;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n da[2] = _j - (u3 - bvirt) + (_i - bvirt);\n da[3] = u3;\n s1 = ex * by;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bx * ey;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n eb[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n eb[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n eb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n eb[3] = u3;\n\n const abclen = sum_three_scale(ab, bc, ac, cz, az, -bz, abc);\n const bcdlen = sum_three_scale(bc, cd, bd, dz, bz, -cz, bcd);\n const cdelen = sum_three_scale(cd, de, ce, ez, cz, -dz, cde);\n const dealen = sum_three_scale(de, ea, da, az, dz, -ez, dea);\n const eablen = sum_three_scale(ea, ab, eb, bz, ez, -az, eab);\n const abdlen = sum_three_scale(ab, bd, da, dz, az, bz, abd);\n const bcelen = sum_three_scale(bc, ce, eb, ez, bz, cz, bce);\n const cdalen = sum_three_scale(cd, da, ac, az, cz, dz, cda);\n const deblen = sum_three_scale(de, eb, bd, bz, dz, ez, deb);\n const eaclen = sum_three_scale(ea, ac, ce, cz, ez, az, eac);\n\n const deterlen = sum_three(\n liftexact(cdelen, cde, bcelen, bce, deblen, deb, bcdlen, bcd, ax, ay, az, adet), adet,\n liftexact(dealen, dea, cdalen, cda, eaclen, eac, cdelen, cde, bx, by, bz, bdet), bdet,\n sum_three(\n liftexact(eablen, eab, deblen, deb, abdlen, abd, dealen, dea, cx, cy, cz, cdet), cdet,\n liftexact(abclen, abc, eaclen, eac, bcelen, bce, eablen, eab, dx, dy, dz, ddet), ddet,\n liftexact(bcdlen, bcd, abdlen, abd, cdalen, cda, abclen, abc, ex, ey, ez, edet), edet, cddet, cdedet), cdedet, abdet, deter);\n\n return deter[deterlen - 1];\n}\n\nconst xdet = vec(96);\nconst ydet = vec(96);\nconst zdet = vec(96);\nconst fin = vec(1152);\n\nfunction liftadapt(a, b, c, az, bz, cz, x, y, z, out) {\n const len = sum_three_scale(a, b, c, az, bz, cz, _24);\n return sum_three(\n scale(scale(len, _24, x, _48), _48, x, xdet), xdet,\n scale(scale(len, _24, y, _48), _48, y, ydet), ydet,\n scale(scale(len, _24, z, _48), _48, z, zdet), zdet, _192, out);\n}\n\nfunction insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent) {\n let ab3, bc3, cd3, da3, ac3, bd3;\n\n let aextail, bextail, cextail, dextail;\n let aeytail, beytail, ceytail, deytail;\n let aeztail, beztail, ceztail, deztail;\n\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0;\n\n const aex = ax - ex;\n const bex = bx - ex;\n const cex = cx - ex;\n const dex = dx - ex;\n const aey = ay - ey;\n const bey = by - ey;\n const cey = cy - ey;\n const dey = dy - ey;\n const aez = az - ez;\n const bez = bz - ez;\n const cez = cz - ez;\n const dez = dz - ez;\n\n s1 = aex * bey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bex * aey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n ab3 = _j + _i;\n bvirt = ab3 - _j;\n ab[2] = _j - (ab3 - bvirt) + (_i - bvirt);\n ab[3] = ab3;\n s1 = bex * cey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cex * bey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n bc3 = _j + _i;\n bvirt = bc3 - _j;\n bc[2] = _j - (bc3 - bvirt) + (_i - bvirt);\n bc[3] = bc3;\n s1 = cex * dey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dex * cey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n cd3 = _j + _i;\n bvirt = cd3 - _j;\n cd[2] = _j - (cd3 - bvirt) + (_i - bvirt);\n cd[3] = cd3;\n s1 = dex * aey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = aex * dey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n da3 = _j + _i;\n bvirt = da3 - _j;\n da[2] = _j - (da3 - bvirt) + (_i - bvirt);\n da[3] = da3;\n s1 = aex * cey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cex * aey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n ac3 = _j + _i;\n bvirt = ac3 - _j;\n ac[2] = _j - (ac3 - bvirt) + (_i - bvirt);\n ac[3] = ac3;\n s1 = bex * dey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dex * bey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n bd3 = _j + _i;\n bvirt = bd3 - _j;\n bd[2] = _j - (bd3 - bvirt) + (_i - bvirt);\n bd[3] = bd3;\n\n const finlen = sum(\n sum(\n negate(liftadapt(bc, cd, bd, dez, bez, -cez, aex, aey, aez, adet), adet), adet,\n liftadapt(cd, da, ac, aez, cez, dez, bex, bey, bez, bdet), bdet, abdet), abdet,\n sum(\n negate(liftadapt(da, ab, bd, bez, dez, aez, cex, cey, cez, cdet), cdet), cdet,\n liftadapt(ab, bc, ac, cez, aez, -bez, dex, dey, dez, ddet), ddet, cddet), cddet, fin);\n\n let det = estimate(finlen, fin);\n let errbound = isperrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - aex;\n aextail = ax - (aex + bvirt) + (bvirt - ex);\n bvirt = ay - aey;\n aeytail = ay - (aey + bvirt) + (bvirt - ey);\n bvirt = az - aez;\n aeztail = az - (aez + bvirt) + (bvirt - ez);\n bvirt = bx - bex;\n bextail = bx - (bex + bvirt) + (bvirt - ex);\n bvirt = by - bey;\n beytail = by - (bey + bvirt) + (bvirt - ey);\n bvirt = bz - bez;\n beztail = bz - (bez + bvirt) + (bvirt - ez);\n bvirt = cx - cex;\n cextail = cx - (cex + bvirt) + (bvirt - ex);\n bvirt = cy - cey;\n ceytail = cy - (cey + bvirt) + (bvirt - ey);\n bvirt = cz - cez;\n ceztail = cz - (cez + bvirt) + (bvirt - ez);\n bvirt = dx - dex;\n dextail = dx - (dex + bvirt) + (bvirt - ex);\n bvirt = dy - dey;\n deytail = dy - (dey + bvirt) + (bvirt - ey);\n bvirt = dz - dez;\n deztail = dz - (dez + bvirt) + (bvirt - ez);\n if (aextail === 0 && aeytail === 0 && aeztail === 0 &&\n bextail === 0 && beytail === 0 && beztail === 0 &&\n cextail === 0 && ceytail === 0 && ceztail === 0 &&\n dextail === 0 && deytail === 0 && deztail === 0) {\n return det;\n }\n\n errbound = isperrboundC * permanent + resulterrbound * Math.abs(det);\n\n const abeps = (aex * beytail + bey * aextail) - (aey * bextail + bex * aeytail);\n const bceps = (bex * ceytail + cey * bextail) - (bey * cextail + cex * beytail);\n const cdeps = (cex * deytail + dey * cextail) - (cey * dextail + dex * ceytail);\n const daeps = (dex * aeytail + aey * dextail) - (dey * aextail + aex * deytail);\n const aceps = (aex * ceytail + cey * aextail) - (aey * cextail + cex * aeytail);\n const bdeps = (bex * deytail + dey * bextail) - (bey * dextail + dex * beytail);\n det +=\n (((bex * bex + bey * bey + bez * bez) * ((cez * daeps + dez * aceps + aez * cdeps) +\n (ceztail * da3 + deztail * ac3 + aeztail * cd3)) + (dex * dex + dey * dey + dez * dez) *\n ((aez * bceps - bez * aceps + cez * abeps) + (aeztail * bc3 - beztail * ac3 + ceztail * ab3))) -\n ((aex * aex + aey * aey + aez * aez) * ((bez * cdeps - cez * bdeps + dez * bceps) +\n (beztail * cd3 - ceztail * bd3 + deztail * bc3)) + (cex * cex + cey * cey + cez * cez) *\n ((dez * abeps + aez * bdeps + bez * daeps) + (deztail * ab3 + aeztail * bd3 + beztail * da3)))) +\n 2 * (((bex * bextail + bey * beytail + bez * beztail) * (cez * da3 + dez * ac3 + aez * cd3) +\n (dex * dextail + dey * deytail + dez * deztail) * (aez * bc3 - bez * ac3 + cez * ab3)) -\n ((aex * aextail + aey * aeytail + aez * aeztail) * (bez * cd3 - cez * bd3 + dez * bc3) +\n (cex * cextail + cey * ceytail + cez * ceztail) * (dez * ab3 + aez * bd3 + bez * da3)));\n\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n return insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez);\n}\n\nexport function insphere(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n const aex = ax - ex;\n const bex = bx - ex;\n const cex = cx - ex;\n const dex = dx - ex;\n const aey = ay - ey;\n const bey = by - ey;\n const cey = cy - ey;\n const dey = dy - ey;\n const aez = az - ez;\n const bez = bz - ez;\n const cez = cz - ez;\n const dez = dz - ez;\n\n const aexbey = aex * bey;\n const bexaey = bex * aey;\n const ab = aexbey - bexaey;\n const bexcey = bex * cey;\n const cexbey = cex * bey;\n const bc = bexcey - cexbey;\n const cexdey = cex * dey;\n const dexcey = dex * cey;\n const cd = cexdey - dexcey;\n const dexaey = dex * aey;\n const aexdey = aex * dey;\n const da = dexaey - aexdey;\n const aexcey = aex * cey;\n const cexaey = cex * aey;\n const ac = aexcey - cexaey;\n const bexdey = bex * dey;\n const dexbey = dex * bey;\n const bd = bexdey - dexbey;\n\n const alift = aex * aex + aey * aey + aez * aez;\n const blift = bex * bex + bey * bey + bez * bez;\n const clift = cex * cex + cey * cey + cez * cez;\n const dlift = dex * dex + dey * dey + dez * dez;\n\n const det =\n (clift * (dez * ab + aez * bd + bez * da) - dlift * (aez * bc - bez * ac + cez * ab)) +\n (alift * (bez * cd - cez * bd + dez * bc) - blift * (cez * da + dez * ac + aez * cd));\n\n const aezplus = Math.abs(aez);\n const bezplus = Math.abs(bez);\n const cezplus = Math.abs(cez);\n const dezplus = Math.abs(dez);\n const aexbeyplus = Math.abs(aexbey) + Math.abs(bexaey);\n const bexceyplus = Math.abs(bexcey) + Math.abs(cexbey);\n const cexdeyplus = Math.abs(cexdey) + Math.abs(dexcey);\n const dexaeyplus = Math.abs(dexaey) + Math.abs(aexdey);\n const aexceyplus = Math.abs(aexcey) + Math.abs(cexaey);\n const bexdeyplus = Math.abs(bexdey) + Math.abs(dexbey);\n const permanent =\n (cexdeyplus * bezplus + bexdeyplus * cezplus + bexceyplus * dezplus) * alift +\n (dexaeyplus * cezplus + aexceyplus * dezplus + cexdeyplus * aezplus) * blift +\n (aexbeyplus * dezplus + bexdeyplus * aezplus + dexaeyplus * bezplus) * clift +\n (bexceyplus * aezplus + aexceyplus * bezplus + aexbeyplus * cezplus) * dlift;\n\n const errbound = isperrboundA * permanent;\n if (det > errbound || -det > errbound) {\n return det;\n }\n return -insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent);\n}\n\nexport function inspherefast(pax, pay, paz, pbx, pby, pbz, pcx, pcy, pcz, pdx, pdy, pdz, pex, pey, pez) {\n const aex = pax - pex;\n const bex = pbx - pex;\n const cex = pcx - pex;\n const dex = pdx - pex;\n const aey = pay - pey;\n const bey = pby - pey;\n const cey = pcy - pey;\n const dey = pdy - pey;\n const aez = paz - pez;\n const bez = pbz - pez;\n const cez = pcz - pez;\n const dez = pdz - pez;\n\n const ab = aex * bey - bex * aey;\n const bc = bex * cey - cex * bey;\n const cd = cex * dey - dex * cey;\n const da = dex * aey - aex * dey;\n const ac = aex * cey - cex * aey;\n const bd = bex * dey - dex * bey;\n\n const abc = aez * bc - bez * ac + cez * ab;\n const bcd = bez * cd - cez * bd + dez * bc;\n const cda = cez * da + dez * ac + aez * cd;\n const dab = dez * ab + aez * bd + bez * da;\n\n const alift = aex * aex + aey * aey + aez * aez;\n const blift = bex * bex + bey * bey + bez * bez;\n const clift = cex * cex + cey * cey + cez * cez;\n const dlift = dex * dex + dey * dey + dez * dez;\n\n return (clift * dab - dlift * abc) + (alift * bcd - blift * cda);\n}\n", "\nexport {orient2d, orient2dfast} from './esm/orient2d.js';\nexport {orient3d, orient3dfast} from './esm/orient3d.js';\nexport {incircle, incirclefast} from './esm/incircle.js';\nexport {insphere, inspherefast} from './esm/insphere.js';\n", "import { orient2d } from 'robust-predicates';\n\nfunction pointInPolygon(p, polygon) {\n var i;\n var ii;\n var k = 0;\n var f;\n var u1;\n var v1;\n var u2;\n var v2;\n var currentP;\n var nextP;\n\n var x = p[0];\n var y = p[1];\n\n var numContours = polygon.length;\n for (i = 0; i < numContours; i++) {\n ii = 0;\n var contour = polygon[i];\n var contourLen = contour.length - 1;\n\n currentP = contour[0];\n if (currentP[0] !== contour[contourLen][0] &&\n currentP[1] !== contour[contourLen][1]) {\n throw new Error('First and last coordinates in a ring must be the same')\n }\n\n u1 = currentP[0] - x;\n v1 = currentP[1] - y;\n\n for (ii; ii < contourLen; ii++) {\n nextP = contour[ii + 1];\n\n u2 = nextP[0] - x;\n v2 = nextP[1] - y;\n\n if (v1 === 0 && v2 === 0) {\n if ((u2 <= 0 && u1 >= 0) || (u1 <= 0 && u2 >= 0)) { return 0 }\n } else if ((v2 >= 0 && v1 <= 0) || (v2 <= 0 && v1 >= 0)) {\n f = orient2d(u1, u2, v1, v2, 0, 0);\n if (f === 0) { return 0 }\n if ((f > 0 && v2 > 0 && v1 <= 0) || (f < 0 && v2 <= 0 && v1 > 0)) { k++; }\n }\n currentP = nextP;\n v1 = v2;\n u1 = u2;\n }\n }\n\n if (k % 2 === 0) { return false }\n return true\n}\n\nexport { pointInPolygon as default };\n", "import pip from \"point-in-polygon-hao\";\nimport {\n BBox,\n Feature,\n MultiPolygon,\n Polygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { Coord } from \"@turf/helpers\";\nimport { getCoord, getGeom } from \"@turf/invariant\";\n\n// http://en.wikipedia.org/wiki/Even%E2%80%93odd_rule\n// modified from: https://github.com/substack/point-in-polygon/blob/master/index.js\n// which was modified from http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html\n/**\n * Takes a {@link Point} and a {@link Polygon} or {@link MultiPolygon} and determines if the point\n * resides inside the polygon. The polygon can be convex or concave. The function accounts for holes.\n *\n * @function\n * @param {Coord} point input point\n * @param {Feature} polygon input polygon or multipolygon\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.ignoreBoundary=false] True if polygon boundary should be ignored when determining if\n * the point is inside the polygon otherwise false.\n * @returns {boolean} `true` if the Point is inside the Polygon; `false` if the Point is not inside the Polygon\n * @example\n * var pt = turf.point([-77, 44]);\n * var poly = turf.polygon([[\n * [-81, 41],\n * [-81, 47],\n * [-72, 47],\n * [-72, 41],\n * [-81, 41]\n * ]]);\n *\n * turf.booleanPointInPolygon(pt, poly);\n * //= true\n */\nfunction booleanPointInPolygon<\n G extends Polygon | MultiPolygon,\n P extends GeoJsonProperties = GeoJsonProperties,\n>(\n point: Coord,\n polygon: Feature | G,\n options: {\n ignoreBoundary?: boolean;\n } = {}\n) {\n // validation\n if (!point) {\n throw new Error(\"point is required\");\n }\n if (!polygon) {\n throw new Error(\"polygon is required\");\n }\n\n const pt = getCoord(point);\n const geom = getGeom(polygon);\n const type = geom.type;\n const bbox = polygon.bbox;\n let polys: any[] = geom.coordinates;\n\n // Quick elimination if point is not inside bbox\n if (bbox && inBBox(pt, bbox) === false) {\n return false;\n }\n\n if (type === \"Polygon\") {\n polys = [polys];\n }\n let result = false;\n for (var i = 0; i < polys.length; ++i) {\n const polyResult = pip(pt, polys[i]);\n if (polyResult === 0) return options.ignoreBoundary ? false : true;\n else if (polyResult) result = true;\n }\n\n return result;\n}\n\n/**\n * inBBox\n *\n * @private\n * @param {Position} pt point [x,y]\n * @param {BBox} bbox BBox [west, south, east, north]\n * @returns {boolean} true/false if point is inside BBox\n */\nfunction inBBox(pt: number[], bbox: BBox) {\n return (\n bbox[0] <= pt[0] && bbox[1] <= pt[1] && bbox[2] >= pt[0] && bbox[3] >= pt[1]\n );\n}\n\nexport { booleanPointInPolygon };\nexport default booleanPointInPolygon;\n", "/**\n * Turf is a modular geospatial analysis engine written in JavaScript. It performs geospatial\n * processing tasks with GeoJSON data and can be run on a server or in a browser.\n *\n * @module turf\n * @summary Geospatial analysis for JavaScript\n */\nexport { along } from \"@turf/along\";\nexport { angle } from \"@turf/angle\";\nexport { area } from \"@turf/area\";\nexport { bbox } from \"@turf/bbox\";\nexport { bboxClip } from \"@turf/bbox-clip\";\nexport { bboxPolygon } from \"@turf/bbox-polygon\";\nexport { bearing } from \"@turf/bearing\";\nexport { bezierSpline } from \"@turf/bezier-spline\";\nexport { booleanClockwise } from \"@turf/boolean-clockwise\";\nexport { booleanConcave } from \"@turf/boolean-concave\";\nexport { booleanContains } from \"@turf/boolean-contains\";\nexport { booleanCrosses } from \"@turf/boolean-crosses\";\nexport { booleanDisjoint } from \"@turf/boolean-disjoint\";\nexport { booleanEqual } from \"@turf/boolean-equal\";\nexport { booleanIntersects } from \"@turf/boolean-intersects\";\nexport { booleanOverlap } from \"@turf/boolean-overlap\";\nexport { booleanParallel } from \"@turf/boolean-parallel\";\nexport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nexport { booleanPointOnLine } from \"@turf/boolean-point-on-line\";\nexport { booleanTouches } from \"@turf/boolean-touches\";\nexport { booleanValid } from \"@turf/boolean-valid\";\nexport { booleanWithin } from \"@turf/boolean-within\";\nexport { buffer } from \"@turf/buffer\"; // JSTS Module\nexport { center } from \"@turf/center\";\nexport { centerMean } from \"@turf/center-mean\";\nexport { centerMedian } from \"@turf/center-median\";\nexport { centerOfMass } from \"@turf/center-of-mass\";\nexport { centroid } from \"@turf/centroid\";\nexport { circle } from \"@turf/circle\";\nexport { cleanCoords } from \"@turf/clean-coords\";\nexport * from \"@turf/clone\";\nexport * from \"@turf/clusters\";\nexport * as clusters from \"@turf/clusters\";\nexport { clustersDbscan } from \"@turf/clusters-dbscan\";\nexport { clustersKmeans } from \"@turf/clusters-kmeans\";\nexport { collect } from \"@turf/collect\";\nexport { combine } from \"@turf/combine\";\nexport { concave } from \"@turf/concave\";\nexport { convex } from \"@turf/convex\";\nexport { destination } from \"@turf/destination\";\nexport { difference } from \"@turf/difference\"; // JSTS Module\nexport { dissolve } from \"@turf/dissolve\"; // JSTS Sub-Model\nexport { distance } from \"@turf/distance\";\nexport { distanceWeight } from \"@turf/distance-weight\";\nexport { ellipse } from \"@turf/ellipse\";\nexport { envelope } from \"@turf/envelope\";\nexport { explode } from \"@turf/explode\";\nexport { flatten } from \"@turf/flatten\";\nexport { flip } from \"@turf/flip\";\nexport { geojsonRbush } from \"@turf/geojson-rbush\";\nexport { greatCircle } from \"@turf/great-circle\";\nexport * from \"@turf/helpers\";\nexport * as helpers from \"@turf/helpers\";\nexport { hexGrid } from \"@turf/hex-grid\"; // JSTS Sub-Model\nexport { interpolate } from \"@turf/interpolate\"; // JSTS Sub-Model\nexport { intersect } from \"@turf/intersect\"; // JSTS Module\nexport * from \"@turf/invariant\";\nexport * as invariant from \"@turf/invariant\";\nexport { isobands } from \"@turf/isobands\";\nexport { isolines } from \"@turf/isolines\";\nexport { kinks } from \"@turf/kinks\";\nexport { length } from \"@turf/length\";\nexport { lineArc } from \"@turf/line-arc\";\nexport { lineChunk } from \"@turf/line-chunk\";\nexport { lineIntersect } from \"@turf/line-intersect\";\nexport { lineOffset } from \"@turf/line-offset\";\nexport { lineOverlap } from \"@turf/line-overlap\";\nexport { lineSegment } from \"@turf/line-segment\";\nexport { lineSlice } from \"@turf/line-slice\";\nexport { lineSliceAlong } from \"@turf/line-slice-along\";\nexport { lineSplit } from \"@turf/line-split\";\nexport { lineToPolygon } from \"@turf/line-to-polygon\";\nexport { mask } from \"@turf/mask\"; // JSTS Sub-Model\nexport * from \"@turf/meta\";\nexport * as meta from \"@turf/meta\";\nexport { midpoint } from \"@turf/midpoint\";\nexport { moranIndex } from \"@turf/moran-index\";\nexport * from \"@turf/nearest-neighbor-analysis\";\nexport { nearestPoint } from \"@turf/nearest-point\";\nexport { nearestPointOnLine } from \"@turf/nearest-point-on-line\";\nexport { nearestPointToLine } from \"@turf/nearest-point-to-line\";\nexport { planepoint } from \"@turf/planepoint\";\nexport { pointGrid } from \"@turf/point-grid\";\nexport { pointOnFeature } from \"@turf/point-on-feature\";\nexport { pointsWithinPolygon } from \"@turf/points-within-polygon\";\nexport { pointToLineDistance } from \"@turf/point-to-line-distance\";\nexport { pointToPolygonDistance } from \"@turf/point-to-polygon-distance\";\nexport { polygonize } from \"@turf/polygonize\";\nexport { polygonSmooth } from \"@turf/polygon-smooth\";\nexport { polygonTangents } from \"@turf/polygon-tangents\";\nexport { polygonToLine } from \"@turf/polygon-to-line\";\nexport * from \"@turf/projection\";\nexport * as projection from \"@turf/projection\";\nexport * from \"@turf/quadrat-analysis\";\nexport * from \"@turf/random\";\nexport * as random from \"@turf/random\";\nexport { rectangleGrid } from \"@turf/rectangle-grid\"; // JSTS Sub-Model\nexport { rewind } from \"@turf/rewind\";\nexport { rhumbBearing } from \"@turf/rhumb-bearing\";\nexport { rhumbDestination } from \"@turf/rhumb-destination\";\nexport { rhumbDistance } from \"@turf/rhumb-distance\";\nexport { sample } from \"@turf/sample\";\nexport { sector } from \"@turf/sector\";\nexport { shortestPath } from \"@turf/shortest-path\";\nexport { simplify } from \"@turf/simplify\";\nexport { square } from \"@turf/square\";\nexport { squareGrid } from \"@turf/square-grid\"; // JSTS Sub-Model\nexport { standardDeviationalEllipse } from \"@turf/standard-deviational-ellipse\";\nexport { tag } from \"@turf/tag\";\nexport { tesselate } from \"@turf/tesselate\";\nexport { tin } from \"@turf/tin\";\nexport { transformRotate } from \"@turf/transform-rotate\";\nexport { transformScale } from \"@turf/transform-scale\";\nexport { transformTranslate } from \"@turf/transform-translate\";\nexport { triangleGrid } from \"@turf/triangle-grid\"; // JSTS Sub-Model\nexport { truncate } from \"@turf/truncate\";\nexport { union } from \"@turf/union\"; // JSTS Module\nexport { unkinkPolygon } from \"@turf/unkink-polygon\";\nexport { voronoi } from \"@turf/voronoi\";\n", "export const mbnrGeoJson = {\n \"type\": \"FeatureCollection\",\n \"features\": [\n {\n \"type\": \"Feature\",\n \"properties\": {},\n \"geometry\": {\n \"coordinates\": [\n [\n [\n 78.0540565157155,\n 16.750355644371382\n ],\n [\n 78.02147549424018,\n 16.72066473405593\n ],\n [\n 78.03026125246384,\n 16.71696749930787\n ],\n [\n 78.0438058450269,\n 16.72191442229257\n ],\n [\n 78.01378723066603,\n 16.729427120762438\n ],\n [\n 78.01192390645633,\n 16.767270033080678\n ],\n [\n 77.98897480599248,\n 16.78383139678816\n ],\n [\n 77.98650506846502,\n 16.779477610410623\n ],\n [\n 77.99211289459566,\n 16.764294442899583\n ],\n [\n 77.9917733766166,\n 16.760247911187193\n ],\n [\n 77.9871626670851,\n 16.762487176781022\n ],\n [\n 77.98216269568468,\n 16.762520539253813\n ],\n [\n 77.9728079653313,\n 16.75895746646411\n ],\n [\n 77.97076993211158,\n 16.749241850772236\n ],\n [\n 77.97290869571145,\n 16.714289841456335\n ],\n [\n 77.98673742913684,\n 16.716189282573396\n ],\n [\n 78.00286970994557,\n 16.718191131206893\n ],\n [\n 78.02757966423519,\n 16.720603921728966\n ],\n [\n 78.01653780770818,\n 16.73184590223127\n ],\n [\n 78.0064695230268,\n 16.760236966033375\n ],\n [\n 78.0148831108591,\n 16.760801801995825\n ],\n [\n 78.01488756695255,\n 16.75827980335133\n ],\n [\n 78.0244311364159,\n 16.744778942163208\n ],\n [\n 78.03342267256608,\n 16.760773251410058\n ],\n [\n 78.05078586709863,\n 16.763902127913653\n ],\n [\n 78.0540565157155,\n 16.750355644371382\n ]\n ]\n ],\n \"type\": \"Polygon\"\n }\n }\n ]\n};", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { commonRouter } from '@/src/trpc/apis/common-apis/common'\nimport {\n getStoresSummary,\n healthCheck,\n} from '@/src/dbService'\nimport type { StoresSummaryResponse } from '@packages/shared'\nimport * as turf from '@turf/turf';\nimport { z } from 'zod';\nimport { mbnrGeoJson } from '@/src/lib/mbnr-geojson'\nimport { generateUploadUrl } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getAllConstValues } from '@/src/lib/const-store'\nimport { CONST_KEYS } from '@/src/lib/const-keys'\nimport { assetsDomain, apiCacheKey } from '@/src/lib/env-exporter'\n\nconst polygon = turf.polygon(mbnrGeoJson.features[0].geometry.coordinates);\n\nexport async function scaffoldEssentialConsts() {\n const consts = await getAllConstValues();\n\n return {\n freeDeliveryThreshold: consts[CONST_KEYS.freeDeliveryThreshold] ?? 200,\n deliveryCharge: consts[CONST_KEYS.deliveryCharge] ?? 0,\n flashFreeDeliveryThreshold: consts[CONST_KEYS.flashFreeDeliveryThreshold] ?? 500,\n flashDeliveryCharge: consts[CONST_KEYS.flashDeliveryCharge] ?? 69,\n popularItems: consts[CONST_KEYS.popularItems] ?? '5,3,2,4,1',\n versionNum: consts[CONST_KEYS.versionNum] ?? '1.1.0',\n playStoreUrl: consts[CONST_KEYS.playStoreUrl] ?? 'https://play.google.com/store/apps/details?id=in.freshyo.app',\n appStoreUrl: consts[CONST_KEYS.appStoreUrl] ?? 'https://apps.apple.com/in/app/freshyo/id6756889077',\n webViewHtml: null,\n isWebviewClosable: true,\n isFlashDeliveryEnabled: consts[CONST_KEYS.isFlashDeliveryEnabled] ?? true,\n supportMobile: consts[CONST_KEYS.supportMobile] ?? '',\n supportEmail: consts[CONST_KEYS.supportEmail] ?? '',\n assetsDomain,\n apiCacheKey,\n };\n}\n\nexport const commonApiRouter = router({\n product: commonRouter,\n\n getStoresSummary: publicProcedure\n .query(async (): Promise => {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { storeInfo } from '@/src/db/schema'\n\n const stores = await db.query.storeInfo.findMany({\n columns: {\n id: true,\n name: true,\n description: true,\n },\n });\n */\n\n const stores = await getStoresSummary();\n\n return {\n stores,\n };\n }),\n\n checkLocationInPolygon: publicProcedure\n .input(z.object({\n lat: z.number().min(-90).max(90),\n lng: z.number().min(-180).max(180),\n }))\n .query(({ input }) => {\n try {\n const { lat, lng } = input;\n const point = turf.point([lng, lat]); // GeoJSON: [longitude, latitude]\n const isInside = turf.booleanPointInPolygon(point, polygon);\n return { isInside };\n } catch (error) {\n throw new Error('Invalid coordinates or polygon data');\n }\n }),\n\n generateUploadUrls: protectedProcedure\n .input(z.object({\n contextString: z.enum(['review', 'review_response', 'product_info', 'notification', 'store', 'complaint', 'profile', 'tags']),\n mimeTypes: z.array(z.string()),\n }))\n .mutation(async ({ input }): Promise<{ uploadUrls: string[] }> => {\n const { contextString, mimeTypes } = input;\n\n const uploadUrls: string[] = [];\n const keys: string[] = [];\n\n for (const mimeType of mimeTypes) {\n // Generate key based on context and mime type\n let folder: string;\n if (contextString === 'review') {\n folder = 'review-images';\n } else if (contextString === 'product_info') {\n folder = 'product-images';\n } else if (contextString === 'store') {\n folder = 'store-images';\n } else if (contextString === 'review_response') {\n folder = 'review-response-images';\n } else if (contextString === 'complaint') {\n folder = 'complaint-images';\n } else if (contextString === 'profile') {\n folder = 'profile-images';\n } else if (contextString === 'tags') {\n folder = 'tags';\n } else {\n folder = '';\n }\n\n const extension = mimeType === 'image/jpeg' ? '.jpg' :\n mimeType === 'image/png' ? '.png' :\n mimeType === 'image/gif' ? '.gif' : '.jpg';\n const key = `${folder}/${Date.now()}${extension}`;\n\n try {\n const uploadUrl = await generateUploadUrl(key, mimeType);\n uploadUrls.push(uploadUrl);\n keys.push(key);\n\n } catch (error) {\n console.error('Error generating upload URL:', error);\n throw new ApiError('Failed to generate upload URL', 500);\n }\n }\n return { uploadUrls };\n }),\n\n healthCheck: publicProcedure\n .query(async () => {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { keyValStore, productInfo } from '@/src/db/schema'\n\n // Test DB connection by selecting product names\n // await db.select({ name: productInfo.name }).from(productInfo).limit(1);\n await db.select({ key: keyValStore.key }).from(keyValStore).limit(1);\n */\n\n const result = await healthCheck();\n return result;\n }),\n\n essentialConsts: publicProcedure\n .query(async () => {\n const response = await scaffoldEssentialConsts();\n return response;\n }),\n});\n\nexport type CommonApiRouter = typeof commonApiRouter;\n", "import { router, publicProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getTagsByStoreId } from '@/src/stores/product-tag-store'\nimport {\n getUserStoreSummaries as getUserStoreSummariesInDb,\n getUserStoreDetail as getUserStoreDetailInDb,\n} from '@/src/dbService'\nimport type {\n UserStoresResponse,\n UserStoreDetail,\n UserStoreSummary,\n} from '@packages/shared'\n\nexport async function scaffoldStores(): Promise {\n const storesData = await getUserStoreSummariesInDb()\n\n /*\n // Old implementation - direct DB queries:\n const storesData = await db\n .select({\n id: storeInfo.id,\n name: storeInfo.name,\n description: storeInfo.description,\n imageUrl: storeInfo.imageUrl,\n productCount: sql`count(${productInfo.id})`.as('productCount'),\n })\n .from(storeInfo)\n .leftJoin(\n productInfo,\n and(eq(productInfo.storeId, storeInfo.id), eq(productInfo.isSuspended, false))\n )\n .groupBy(storeInfo.id);\n */\n\n const storesWithDetails: UserStoreSummary[] = storesData.map((store) => {\n const signedImageUrl = store.imageUrl ? scaffoldAssetUrl(store.imageUrl) : null\n const sampleProducts = store.sampleProducts.map((product) => ({\n id: product.id,\n name: product.name,\n signedImageUrl: product.images && product.images.length > 0\n ? scaffoldAssetUrl(product.images[0])\n : null,\n }))\n\n return {\n id: store.id,\n name: store.name,\n description: store.description,\n signedImageUrl,\n productCount: store.productCount,\n sampleProducts,\n }\n })\n\n return {\n stores: storesWithDetails,\n }\n}\n\nexport async function scaffoldStoreWithProducts(storeId: number): Promise {\n const storeDetail = await getUserStoreDetailInDb(storeId)\n\n /*\n // Old implementation - direct DB queries:\n const storeData = await db.query.storeInfo.findFirst({\n where: eq(storeInfo.id, storeId),\n columns: {\n id: true,\n name: true,\n description: true,\n imageUrl: true,\n },\n });\n\n if (!storeData) {\n throw new ApiError('Store not found', 404);\n }\n\n const signedImageUrl = storeData.imageUrl ? scaffoldAssetUrl(storeData.imageUrl) : null;\n\n const productsData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n incrementStep: productInfo.incrementStep,\n unitShortNotation: units.shortNotation,\n unitNotation: units.shortNotation,\n productQuantity: productInfo.productQuantity,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(and(eq(productInfo.storeId, storeId), eq(productInfo.isSuspended, false)));\n\n const productsWithSignedUrls = await Promise.all(\n productsData.map(async (product) => ({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n marketPrice: product.marketPrice,\n incrementStep: product.incrementStep,\n unit: product.unitShortNotation,\n unitNotation: product.unitNotation,\n images: scaffoldAssetUrl((product.images as string[]) || []),\n isOutOfStock: product.isOutOfStock,\n productQuantity: product.productQuantity\n }))\n );\n\n const tags = await getTagsByStoreId(storeId);\n\n return {\n store: {\n id: storeData.id,\n name: storeData.name,\n description: storeData.description,\n signedImageUrl,\n },\n products: productsWithSignedUrls,\n tags: tags.map(tag => ({\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription,\n imageUrl: tag.imageUrl,\n productIds: tag.productIds,\n })),\n };\n */\n\n if (!storeDetail) {\n throw new ApiError('Store not found', 404)\n }\n\n const signedImageUrl = storeDetail.store.imageUrl\n ? scaffoldAssetUrl(storeDetail.store.imageUrl)\n : null\n\n const productsWithSignedUrls = storeDetail.products.map((product) => ({\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n marketPrice: product.marketPrice,\n incrementStep: product.incrementStep,\n unit: product.unit,\n unitNotation: product.unitNotation,\n images: scaffoldAssetUrl(product.images || []),\n isOutOfStock: product.isOutOfStock,\n productQuantity: product.productQuantity,\n }))\n\n const tags = await getTagsByStoreId(storeId)\n\n return {\n store: {\n id: storeDetail.store.id,\n name: storeDetail.store.name,\n description: storeDetail.store.description,\n signedImageUrl,\n },\n products: productsWithSignedUrls,\n tags: tags.map(tag => ({\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription,\n imageUrl: tag.imageUrl,\n productIds: tag.productIds,\n })),\n }\n}\n\nexport const storesRouter = router({\n getStores: publicProcedure\n .query(async (): Promise => {\n const response = await scaffoldStores();\n return response;\n }),\n\n getStoreWithProducts: publicProcedure\n .input(z.object({\n storeId: z.number(),\n }))\n .query(async ({ input }): Promise => {\n const { storeId } = input;\n const response = await scaffoldStoreWithProducts(storeId);\n return response;\n }),\n});\n", "import { router, publicProcedure } from \"@/src/trpc/trpc-index\"\nimport { z } from \"zod\"\nimport { getAllSlots as getAllSlotsFromCache, getSlotById as getSlotByIdFromCache } from \"@/src/stores/slot-store\"\nimport dayjs from 'dayjs'\nimport { getUserActiveSlotsList as getUserActiveSlotsListInDb, getUserProductAvailability as getUserProductAvailabilityInDb } from '@/src/dbService'\nimport type { UserSlotData, UserSlotsListResponse, UserSlotsWithProductsResponse } from '@packages/shared'\n\n// Helper method to get formatted slot data by ID\nasync function getSlotData(slotId: number) {\n const slot = await getSlotByIdFromCache(slotId);\n\n if (!slot) {\n return null;\n }\n\n const currentTime = new Date();\n if (dayjs(slot.freezeTime).isBefore(currentTime)) {\n return null;\n }\n\n return {\n deliveryTime: slot.deliveryTime,\n freezeTime: slot.freezeTime,\n slotId: slot.id,\n products: slot.products.filter((product) => !product.isOutOfStock),\n };\n}\n\nexport async function scaffoldSlotsWithProducts(): Promise {\n const allSlots = await getAllSlotsFromCache();\n const currentTime = new Date();\n const validSlots = allSlots\n .filter((slot) => {\n return dayjs(slot.freezeTime).isAfter(currentTime) &&\n dayjs(slot.deliveryTime).isAfter(currentTime) &&\n !slot.isCapacityFull;\n })\n .sort((a, b) => dayjs(a.deliveryTime).valueOf() - dayjs(b.deliveryTime).valueOf());\n\n const productAvailability = await getUserProductAvailabilityInDb()\n\n /*\n // Old implementation - direct DB query:\n const allProducts = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n isOutOfStock: productInfo.isOutOfStock,\n isFlashAvailable: productInfo.isFlashAvailable,\n })\n .from(productInfo)\n .where(eq(productInfo.isSuspended, false));\n\n const productAvailability = allProducts.map(product => ({\n id: product.id,\n name: product.name,\n isOutOfStock: product.isOutOfStock,\n isFlashAvailable: product.isFlashAvailable,\n }));\n */\n\n return {\n slots: validSlots,\n productAvailability,\n count: validSlots.length,\n };\n}\n\nexport const slotsRouter = router({\n getSlots: publicProcedure.query(async (): Promise => {\n const slots = await getUserActiveSlotsListInDb()\n\n /*\n // Old implementation - direct DB query:\n const slots = await db.query.deliverySlotInfo.findMany({\n where: eq(deliverySlotInfo.isActive, true),\n });\n */\n\n return {\n slots,\n count: slots.length,\n }\n }),\n\n getSlotsWithProducts: publicProcedure.query(async (): Promise => {\n const response = await scaffoldSlotsWithProducts();\n return response;\n }),\n\n getSlotById: publicProcedure\n .input(z.object({ slotId: z.number() }))\n .query(async ({ input }): Promise => {\n return await getSlotData(input.slotId);\n }),\n});\n", "import { publicProcedure, router } from '@/src/trpc/trpc-index'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport { getUserActiveBanners as getUserActiveBannersInDb } from '@/src/dbService'\nimport type { UserBannersResponse } from '@packages/shared'\n\nexport async function scaffoldBanners(): Promise {\n const banners = await getUserActiveBannersInDb()\n\n /*\n // Old implementation - direct DB queries:\n const banners = await db.query.homeBanners.findMany({\n where: isNotNull(homeBanners.serialNum), // Only show assigned banners\n orderBy: asc(homeBanners.serialNum), // Order by slot number 1-4\n });\n */\n\n const bannersWithSignedUrls = banners.map((banner) => ({\n ...banner,\n imageUrl: banner.imageUrl ? scaffoldAssetUrl(banner.imageUrl) : banner.imageUrl,\n }))\n\n return {\n banners: bannersWithSignedUrls,\n }\n}\n\nexport const bannerRouter = router({\n getBanners: publicProcedure\n .query(async () => {\n const response = await scaffoldBanners();\n return response;\n }),\n});\n", "// Central types export file\n// Re-export all types from the types folder\n\nexport type * from './admin';\nexport type * from './user';\nexport type * from './store.types';\n", "export const CACHE_FILENAMES = {\n products: 'products.json',\n stores: 'stores.json',\n slots: 'slots.json',\n essentialConsts: 'essential-consts.json',\n banners: 'banners.json',\n} as const\n\nexport type CacheFilename = typeof CACHE_FILENAMES[keyof typeof CACHE_FILENAMES]\n\n// Re-export all types from the types folder\nexport * from './types'\n", "export async function retryWithExponentialBackoff(\n fn: () => Promise,\n maxRetries: number = 3,\n delayMs: number = 1000\n): Promise {\n let lastError: Error | undefined\n \n for (let attempt = 1; attempt <= maxRetries; attempt++) {\n try {\n return await fn()\n } catch (error) {\n lastError = error instanceof Error ? error : new Error(String(error))\n \n if (attempt < maxRetries) {\n console.log(`Attempt ${attempt} failed, retrying in ${delayMs}ms...`)\n await new Promise(resolve => setTimeout(resolve, delayMs))\n delayMs *= 2\n }\n }\n }\n \n throw lastError\n}", "import axios from 'axios'\nimport { scaffoldProducts } from '@/src/trpc/apis/common-apis/common'\nimport { scaffoldEssentialConsts } from '@/src/trpc/apis/common-apis/common-trpc-index'\nimport { scaffoldStores } from '@/src/trpc/apis/user-apis/apis/stores'\nimport { scaffoldSlotsWithProducts } from '@/src/trpc/apis/user-apis/apis/slots'\nimport { scaffoldBanners } from '@/src/trpc/apis/user-apis/apis/banners'\nimport { scaffoldStoreWithProducts } from '@/src/trpc/apis/user-apis/apis/stores'\nimport { getStoresSummary } from '@/src/dbService'\nimport { imageUploadS3 } from '@/src/lib/s3-client'\nimport { apiCacheKey, cloudflareApiToken, cloudflareZoneId, assetsDomain } from '@/src/lib/env-exporter'\nimport { CACHE_FILENAMES } from '@packages/shared'\nimport { retryWithExponentialBackoff } from '@/src/lib/retry'\n\nfunction constructCacheUrl(path: string): string {\n return `${assetsDomain}${apiCacheKey}/${path}`\n}\n\nexport async function createProductsFile(): Promise {\n // Get products data from the API method\n const productsData = await scaffoldProducts()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(productsData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.products}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.products)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createEssentialConstsFile(): Promise {\n // Get essential consts data from the API method\n const essentialConstsData = await scaffoldEssentialConsts()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(essentialConstsData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.essentialConsts}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.essentialConsts)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createStoresFile(): Promise {\n // Get stores data from the API method\n const storesData = await scaffoldStores()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(storesData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.stores}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.stores)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createSlotsFile(): Promise {\n // Get slots data from the API method\n const slotsData = await scaffoldSlotsWithProducts()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(slotsData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.slots}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.slots)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createBannersFile(): Promise {\n // Get banners data from the API method\n const bannersData = await scaffoldBanners()\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(bannersData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.banners}`)\n\n // Purge cache with retry\n const url = constructCacheUrl(CACHE_FILENAMES.banners)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createStoreFile(storeId: number): Promise {\n // Get store data from the API method\n const storeData = await scaffoldStoreWithProducts(storeId)\n\n // Convert to JSON string with pretty formatting\n const jsonContent = JSON.stringify(storeData, null, 2)\n\n // Convert to Buffer for S3 upload\n const buffer = Buffer.from(jsonContent, 'utf-8')\n\n // Upload to S3 at the specified path using apiCacheKey\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/stores/${storeId}.json`)\n\n // Purge cache with retry\n const url = constructCacheUrl(`stores/${storeId}.json`)\n try {\n await retryWithExponentialBackoff(() => clearUrlCache([url]))\n console.log(`Cache purged for ${url}`)\n } catch (error) {\n console.error(`Failed to purge cache for ${url} after 3 retries:`, error)\n }\n\n return s3Key\n}\n\nexport async function createAllStoresFiles(): Promise {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { storeInfo } from '@/src/db/schema'\n\n const stores = await db.select({ id: storeInfo.id }).from(storeInfo)\n */\n\n // Fetch all store IDs from database using helper\n const stores = await getStoresSummary()\n\n // Create cache files for all stores and collect URLs\n const results: string[] = []\n const urls: string[] = []\n\n for (const store of stores) {\n const s3Key = await createStoreFile(store.id)\n results.push(s3Key)\n urls.push(constructCacheUrl(`stores/${store.id}.json`))\n }\n\n console.log(`Created ${results.length} store cache files`)\n\n // Purge all store caches in one batch with retry\n try {\n await retryWithExponentialBackoff(() => clearUrlCache(urls))\n console.log(`Cache purged for ${urls.length} store files`)\n } catch (error) {\n console.error(`Failed to purge cache for store files after 3 retries. URLs: ${urls.join(', ')}`, error)\n }\n\n return results\n}\n\nexport interface CreateAllCacheFilesResult {\n products: string\n essentialConsts: string\n stores: string\n slots: string\n banners: string\n individualStores: string[]\n}\n\nexport async function createAllCacheFiles(): Promise {\n console.log('Starting creation of all cache files...')\n\n // Create all global cache files in parallel\n const [\n productsKey,\n essentialConstsKey,\n storesKey,\n slotsKey,\n bannersKey,\n individualStoreKeys,\n ] = await Promise.all([\n createProductsFileInternal(),\n createEssentialConstsFileInternal(),\n createStoresFileInternal(),\n createSlotsFileInternal(),\n createBannersFileInternal(),\n createAllStoresFilesInternal(),\n ])\n\n // Collect all URLs for batch cache purge\n const urls = [\n constructCacheUrl(CACHE_FILENAMES.products),\n constructCacheUrl(CACHE_FILENAMES.essentialConsts),\n constructCacheUrl(CACHE_FILENAMES.stores),\n constructCacheUrl(CACHE_FILENAMES.slots),\n constructCacheUrl(CACHE_FILENAMES.banners),\n ...individualStoreKeys.map((_, index) => constructCacheUrl(`stores/${index + 1}.json`)),\n ]\n\n // Purge all caches in one batch with retry\n try {\n await retryWithExponentialBackoff(() => clearUrlCache(urls))\n console.log(`Cache purged for all ${urls.length} files`)\n } catch (error) {\n console.error(`Failed to purge cache for all files after 3 retries`, error)\n }\n\n console.log('All cache files created successfully')\n\n return {\n products: productsKey,\n essentialConsts: essentialConstsKey,\n stores: storesKey,\n slots: slotsKey,\n banners: bannersKey,\n individualStores: individualStoreKeys,\n }\n}\n\n// Internal versions that skip cache purging (for batch operations)\nasync function createProductsFileInternal(): Promise {\n const productsData = await scaffoldProducts()\n const jsonContent = JSON.stringify(productsData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.products}`)\n}\n\nasync function createEssentialConstsFileInternal(): Promise {\n const essentialConstsData = await scaffoldEssentialConsts()\n const jsonContent = JSON.stringify(essentialConstsData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.essentialConsts}`)\n}\n\nasync function createStoresFileInternal(): Promise {\n const storesData = await scaffoldStores()\n const jsonContent = JSON.stringify(storesData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.stores}`)\n}\n\nasync function createSlotsFileInternal(): Promise {\n const slotsData = await scaffoldSlotsWithProducts()\n const jsonContent = JSON.stringify(slotsData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.slots}`)\n}\n\nasync function createBannersFileInternal(): Promise {\n const bannersData = await scaffoldBanners()\n const jsonContent = JSON.stringify(bannersData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n return await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/${CACHE_FILENAMES.banners}`)\n}\n\nasync function createAllStoresFilesInternal(): Promise {\n /*\n // Old implementation - direct DB queries:\n import { db } from '@/src/db/db_index'\n import { storeInfo } from '@/src/db/schema'\n\n const stores = await db.select({ id: storeInfo.id }).from(storeInfo)\n */\n\n const stores = await getStoresSummary()\n const results: string[] = []\n\n for (const store of stores) {\n const storeData = await scaffoldStoreWithProducts(store.id)\n const jsonContent = JSON.stringify(storeData, null, 2)\n const buffer = Buffer.from(jsonContent, 'utf-8')\n const s3Key = await imageUploadS3(buffer, 'application/json', `${apiCacheKey}/stores/${store.id}.json`)\n results.push(s3Key)\n }\n\n console.log(`Created ${results.length} store cache files`)\n return results\n}\n\nexport async function clearUrlCache(urls: string[]): Promise<{ success: boolean; errors?: string[] }> {\n if (!cloudflareApiToken || !cloudflareZoneId) {\n console.warn('Cloudflare credentials not configured, skipping cache clear')\n return { success: false, errors: ['Cloudflare credentials not configured'] }\n }\n\n try {\n const response = await axios.post(\n `https://api.cloudflare.com/client/v4/zones/${cloudflareZoneId}/purge_cache`,\n { files: urls },\n {\n headers: {\n 'Authorization': `Bearer ${cloudflareApiToken}`,\n 'Content-Type': 'application/json',\n },\n }\n )\n\n const result = response.data as { success: boolean; errors?: { message: string }[] }\n\n if (!result.success) {\n const errorMessages = result.errors?.map(e => e.message) || ['Unknown error']\n console.error(`Cloudflare cache purge failed for URLs: ${urls.join(', ')}`, errorMessages)\n return { success: false, errors: errorMessages }\n }\n\n console.log(`Successfully purged ${urls.length} URLs from Cloudflare cache: ${urls.join(', ')}`)\n return { success: true }\n } catch (error) {\n console.log(error)\n const errorMessage = error instanceof Error ? error.message : 'Unknown error'\n console.error(`Error clearing Cloudflare cache for URLs: ${urls.join(', ')}`, errorMessage)\n return { success: false, errors: [errorMessage] }\n }\n}\n\nexport async function clearAllCache(): Promise<{ success: boolean; errors?: string[] }> {\n if (!cloudflareApiToken || !cloudflareZoneId) {\n console.warn('Cloudflare credentials not configured, skipping cache clear')\n return { success: false, errors: ['Cloudflare credentials not configured'] }\n }\n\n try {\n const response = await axios.post(\n `https://api.cloudflare.com/client/v4/zones/${cloudflareZoneId}/purge_cache`,\n { purge_everything: true },\n {\n headers: {\n 'Authorization': `Bearer ${cloudflareApiToken}`,\n 'Content-Type': 'application/json',\n },\n }\n )\n\n const result = response.data as { success: boolean; errors?: { message: string }[] }\n\n if (!result.success) {\n const errorMessages = result.errors?.map(e => e.message) || ['Unknown error']\n console.error('Cloudflare cache purge failed:', errorMessages)\n return { success: false, errors: errorMessages }\n }\n\n console.log('Successfully purged all cache from Cloudflare')\n return { success: true }\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error'\n console.error('Error clearing Cloudflare cache:', errorMessage)\n return { success: false, errors: [errorMessage] }\n }\n}\n", "import roleManager from '@/src/lib/roles-manager'\nimport { computeConstants } from '@/src/lib/const-store'\nimport { initializeProducts } from '@/src/stores/product-store'\nimport { initializeProductTagStore } from '@/src/stores/product-tag-store'\nimport { initializeSlotStore } from '@/src/stores/slot-store'\nimport { initializeBannerStore } from '@/src/stores/banner-store'\nimport { createAllCacheFiles } from '@/src/lib/cloud_cache'\n\nconst STORE_INIT_DELAY_MS = 3 * 60 * 1000\nlet storeInitializationTimeout: NodeJS.Timeout | null = null\n\n/**\n * Initialize all application stores\n * This function handles initialization of:\n * - Role Manager (fetches and caches all roles)\n * - Const Store (syncs constants from DB to Redis)\n * - Product Store (caches all products in Redis)\n * - Product Tag Store (caches all product tags in Redis)\n * - Slot Store (caches all delivery slots with products in Redis)\n * - Banner Store (caches all banners in Redis)\n */\nexport const initializeAllStores = async (): Promise => {\n try {\n console.log('Starting application stores initialization...');\n\n await Promise.all([\n roleManager.fetchRoles(),\n computeConstants(),\n initializeProducts(),\n initializeProductTagStore(),\n initializeSlotStore(),\n initializeBannerStore(),\n ]);\n\n console.log('All application stores initialized successfully');\n\n // Regenerate all cache files (fire-and-forget)\n createAllCacheFiles().catch(error => {\n console.error('Failed to regenerate cache files during store initialization:', error)\n })\n } catch (error) {\n console.error('Application stores initialization failed:', error);\n throw error;\n }\n};\n\nexport const scheduleStoreInitialization = (): void => {\n if (storeInitializationTimeout) {\n clearTimeout(storeInitializationTimeout)\n storeInitializationTimeout = null\n }\n\n storeInitializationTimeout = setTimeout(() => {\n storeInitializationTimeout = null\n initializeAllStores().catch(error => {\n console.error('Scheduled store initialization failed:', error)\n })\n }, STORE_INIT_DELAY_MS)\n}\n", "import { router, protectedProcedure } from \"@/src/trpc/trpc-index\"\nimport { TRPCError } from \"@trpc/server\";\nimport { z } from \"zod\";\nimport { ApiError } from \"@/src/lib/api-error\"\nimport { appUrl } from \"@/src/lib/env-exporter\"\n// import redisClient from \"@/src/lib/redis-client\"\n// import { getSlotSequenceKey } from \"@/src/lib/redisKeyGetters\"\nimport { scheduleStoreInitialization } from '@/src/stores/store-initializer'\nimport {\n getActiveSlotsWithProducts as getActiveSlotsWithProductsInDb,\n getActiveSlots as getActiveSlotsInDb,\n getSlotsAfterDate as getSlotsAfterDateInDb,\n getSlotByIdWithRelations as getSlotByIdWithRelationsInDb,\n createSlotWithRelations as createSlotWithRelationsInDb,\n updateSlotWithRelations as updateSlotWithRelationsInDb,\n deleteSlotById as deleteSlotByIdInDb,\n updateSlotCapacity as updateSlotCapacityInDb,\n getSlotDeliverySequence as getSlotDeliverySequenceInDb,\n updateSlotDeliverySequence as updateSlotDeliverySequenceInDb,\n updateSlotProducts as updateSlotProductsInDb,\n getSlotsProductIds as getSlotsProductIdsInDb,\n} from '@/src/dbService'\nimport type {\n AdminDeliverySequenceResult,\n AdminSlotResult,\n AdminSlotsResult,\n AdminSlotsListResult,\n AdminSlotCreateResult,\n AdminSlotUpdateResult,\n AdminSlotDeleteResult,\n AdminUpdateDeliverySequenceResult,\n AdminUpdateSlotCapacityResult,\n AdminSlotsProductIdsResult,\n AdminUpdateSlotProductsResult,\n} from '@packages/shared'\n\n\ninterface CachedDeliverySequence {\n [userId: string]: number[];\n}\n\nconst cachedSequenceSchema = z.record(z.string(), z.array(z.number()));\n\nconst createSlotSchema = z.object({\n deliveryTime: z.string(),\n freezeTime: z.string(),\n isActive: z.boolean().optional(),\n productIds: z.array(z.number()).optional(),\n vendorSnippets: z.array(z.object({\n name: z.string().min(1),\n productIds: z.array(z.number().int().positive()).min(1),\n validTill: z.string().optional(),\n })).optional(),\n groupIds: z.array(z.number()).optional(),\n});\n\nconst getSlotByIdSchema = z.object({\n id: z.number(),\n});\n\nconst updateSlotSchema = z.object({\n id: z.number(),\n deliveryTime: z.string(),\n freezeTime: z.string(),\n isActive: z.boolean().optional(),\n productIds: z.array(z.number()).optional(),\n vendorSnippets: z.array(z.object({\n name: z.string().min(1),\n productIds: z.array(z.number().int().positive()).min(1),\n validTill: z.string().optional(),\n })).optional(),\n groupIds: z.array(z.number()).optional(),\n});\n\nconst deleteSlotSchema = z.object({\n id: z.number(),\n});\n\nconst getDeliverySequenceSchema = z.object({\n id: z.string(),\n});\n\nconst updateDeliverySequenceSchema = z.object({\n id: z.number(),\n // deliverySequence: z.array(z.number()),\n deliverySequence: z.any(),\n});\n\nexport const slotsRouter = router({\n // Exact replica of GET /av/slots\n getAll: protectedProcedure.query(async ({ ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const slots = await getActiveSlotsWithProductsInDb()\n\n /*\n // Old implementation - direct DB queries:\n const slots = await db.query.deliverySlotInfo\n .findMany({\n where: eq(deliverySlotInfo.isActive, true),\n orderBy: desc(deliverySlotInfo.deliveryTime),\n with: {\n productSlots: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n },\n })\n .then((slots) =>\n slots.map((slot) => ({\n ...slot,\n deliverySequence: slot.deliverySequence as number[],\n products: slot.productSlots.map((ps) => ps.product),\n }))\n );\n */\n\n return {\n slots,\n count: slots.length,\n }\n }),\n\n // Exact replica of POST /av/products/slots/product-ids\n getSlotsProductIds: protectedProcedure\n .input(z.object({ slotIds: z.array(z.number()) }))\n .query(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { slotIds } = input;\n\n if (!Array.isArray(slotIds)) {\n throw new TRPCError({\n code: \"BAD_REQUEST\",\n message: \"slotIds must be an array\",\n });\n }\n\n const result = await getSlotsProductIdsInDb(slotIds)\n\n /*\n // Old implementation - direct DB queries:\n if (slotIds.length === 0) {\n return {};\n }\n\n // Fetch all associations for the requested slots\n const associations = await db.query.productSlots.findMany({\n where: inArray(productSlots.slotId, slotIds),\n columns: {\n slotId: true,\n productId: true,\n },\n });\n\n // Group by slotId\n const result = associations.reduce((acc, assoc) => {\n if (!acc[assoc.slotId]) {\n acc[assoc.slotId] = [];\n }\n acc[assoc.slotId].push(assoc.productId);\n return acc;\n }, {} as Record);\n\n // Ensure all requested slots have entries (even if empty)\n slotIds.forEach((slotId) => {\n if (!result[slotId]) {\n result[slotId] = [];\n }\n });\n\n return result;\n */\n\n return result\n }),\n\n // Exact replica of PUT /av/products/slots/:slotId/products\n updateSlotProducts: protectedProcedure\n .input(\n z.object({\n slotId: z.number(),\n productIds: z.array(z.number()),\n })\n )\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { slotId, productIds } = input;\n\n if (!Array.isArray(productIds)) {\n throw new TRPCError({\n code: \"BAD_REQUEST\",\n message: \"productIds must be an array\",\n });\n }\n\n const result = await updateSlotProductsInDb(String(slotId), productIds.map(String))\n\n /*\n // Old implementation - direct DB queries:\n // Get current associations\n const currentAssociations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, slotId),\n columns: {\n productId: true,\n },\n });\n\n const currentProductIds = currentAssociations.map(\n (assoc) => assoc.productId\n );\n const newProductIds = productIds;\n\n // Find products to add and remove\n const productsToAdd = newProductIds.filter(\n (id) => !currentProductIds.includes(id)\n );\n const productsToRemove = currentProductIds.filter(\n (id) => !newProductIds.includes(id)\n );\n\n // Remove associations for products that are no longer selected\n if (productsToRemove.length > 0) {\n await db\n .delete(productSlots)\n .where(\n and(\n eq(productSlots.slotId, slotId),\n inArray(productSlots.productId, productsToRemove)\n )\n );\n }\n\n // Add associations for newly selected products\n if (productsToAdd.length > 0) {\n const newAssociations = productsToAdd.map((productId) => ({\n productId,\n slotId,\n }));\n\n await db.insert(productSlots).values(newAssociations);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: \"Slot products updated successfully\",\n added: productsToAdd.length,\n removed: productsToRemove.length,\n };\n */\n\n scheduleStoreInitialization()\n\n return {\n message: result.message,\n added: result.added,\n removed: result.removed,\n }\n }),\n\n createSlot: protectedProcedure\n .input(createSlotSchema)\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input;\n\n // Validate required fields\n if (!deliveryTime || !freezeTime) {\n throw new ApiError(\"Delivery time and orders close time are required\", 400);\n }\n\n const result = await createSlotWithRelationsInDb({\n deliveryTime,\n freezeTime,\n isActive,\n productIds,\n vendorSnippets: snippets,\n groupIds,\n })\n\n /*\n // Old implementation - direct DB queries:\n const result = await db.transaction(async (tx) => {\n // Create slot\n const [newSlot] = await tx\n .insert(deliverySlotInfo)\n .values({\n deliveryTime: new Date(deliveryTime),\n freezeTime: new Date(freezeTime),\n isActive: isActive !== undefined ? isActive : true,\n groupIds: groupIds !== undefined ? groupIds : [],\n })\n .returning();\n\n // Insert product associations if provided\n if (productIds && productIds.length > 0) {\n const associations = productIds.map((productId) => ({\n productId,\n slotId: newSlot.id,\n }));\n await tx.insert(productSlots).values(associations);\n }\n\n // Create vendor snippets if provided\n let createdSnippets: any[] = [];\n if (snippets && snippets.length > 0) {\n for (const snippet of snippets) {\n // Validate products exist\n const products = await tx.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n });\n if (products.length !== snippet.productIds.length) {\n throw new ApiError(`One or more invalid product IDs in snippet \"${snippet.name}\"`, 400);\n }\n\n // Check if snippet name already exists\n const existingSnippet = await tx.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippet.name),\n });\n if (existingSnippet) {\n throw new ApiError(`Snippet name \"${snippet.name}\" already exists`, 400);\n }\n\n const [createdSnippet] = await tx.insert(vendorSnippets).values({\n snippetCode: snippet.name,\n slotId: newSlot.id,\n productIds: snippet.productIds,\n validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,\n }).returning();\n\n createdSnippets.push(createdSnippet);\n }\n }\n\n return {\n slot: newSlot,\n createdSnippets,\n message: \"Slot created successfully\",\n };\n });\n */\n\n // Reinitialize stores to reflect changes (outside transaction)\n scheduleStoreInitialization()\n\n return result\n }),\n\n getSlots: protectedProcedure.query(async ({ ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const slots = await getActiveSlotsInDb()\n\n /*\n // Old implementation - direct DB queries:\n const slots = await db.query.deliverySlotInfo.findMany({\n where: eq(deliverySlotInfo.isActive, true),\n });\n */\n\n return {\n slots,\n count: slots.length,\n }\n }),\n\n getSlotById: protectedProcedure\n .input(getSlotByIdSchema)\n .query(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { id } = input;\n\n const slot = await getSlotByIdWithRelationsInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, id),\n with: {\n productSlots: {\n with: {\n product: {\n columns: {\n id: true,\n name: true,\n images: true,\n },\n },\n },\n },\n vendorSnippets: true,\n },\n });\n */\n\n if (!slot) {\n throw new ApiError('Slot not found', 404)\n }\n\n return {\n slot: {\n ...slot,\n vendorSnippets: slot.vendorSnippets.map(snippet => ({\n ...snippet,\n accessUrl: `${appUrl}/vendor-order-list?id=${snippet.snippetCode}`,\n })),\n },\n }\n }),\n\n updateSlot: protectedProcedure\n .input(updateSlotSchema)\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n try{\n const { id, deliveryTime, freezeTime, isActive, productIds, vendorSnippets: snippets, groupIds } = input;\n\n if (!deliveryTime || !freezeTime) {\n throw new ApiError(\"Delivery time and orders close time are required\", 400);\n }\n\n const result = await updateSlotWithRelationsInDb({\n id,\n deliveryTime,\n freezeTime,\n isActive,\n productIds,\n vendorSnippets: snippets,\n groupIds,\n })\n\n /*\n // Old implementation - direct DB queries:\n // Filter groupIds to only include valid (existing) groups\n let validGroupIds = groupIds;\n if (groupIds && groupIds.length > 0) {\n const existingGroups = await db.query.productGroupInfo.findMany({\n where: inArray(productGroupInfo.id, groupIds),\n columns: { id: true },\n });\n validGroupIds = existingGroups.map(g => g.id);\n }\n\n const result = await db.transaction(async (tx) => {\n const [updatedSlot] = await tx\n .update(deliverySlotInfo)\n .set({\n deliveryTime: new Date(deliveryTime),\n freezeTime: new Date(freezeTime),\n isActive: isActive !== undefined ? isActive : true,\n groupIds: validGroupIds !== undefined ? validGroupIds : [],\n })\n .where(eq(deliverySlotInfo.id, id))\n .returning();\n\n if (!updatedSlot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n\n // Update product associations\n if (productIds !== undefined) {\n // Delete existing associations\n await tx.delete(productSlots).where(eq(productSlots.slotId, id));\n\n // Insert new associations\n if (productIds.length > 0) {\n const associations = productIds.map((productId) => ({\n productId,\n slotId: id,\n }));\n await tx.insert(productSlots).values(associations);\n }\n }\n\n // Create vendor snippets if provided\n let createdSnippets: any[] = [];\n if (snippets && snippets.length > 0) {\n for (const snippet of snippets) {\n // Validate products exist\n const products = await tx.query.productInfo.findMany({\n where: inArray(productInfo.id, snippet.productIds),\n });\n if (products.length !== snippet.productIds.length) {\n throw new ApiError(`One or more invalid product IDs in snippet \"${snippet.name}\"`, 400);\n }\n\n // Check if snippet name already exists\n const existingSnippet = await tx.query.vendorSnippets.findFirst({\n where: eq(vendorSnippets.snippetCode, snippet.name),\n });\n if (existingSnippet) {\n throw new ApiError(`Snippet name \"${snippet.name}\" already exists`, 400);\n }\n \n const [createdSnippet] = await tx.insert(vendorSnippets).values({\n snippetCode: snippet.name,\n slotId: id,\n productIds: snippet.productIds,\n validTill: snippet.validTill ? new Date(snippet.validTill) : undefined,\n\n }).returning();\n\n createdSnippets.push(createdSnippet);\n }\n }\n\n return {\n slot: updatedSlot,\n createdSnippets,\n message: \"Slot updated successfully\",\n };\n });\n */\n\n if (!result) {\n throw new ApiError('Slot not found', 404)\n }\n\n // Reinitialize stores to reflect changes (outside transaction)\n scheduleStoreInitialization()\n\n return result\n }\n catch(e) {\n console.log(e)\n throw new ApiError(\"Unable to Update Slot\");\n }\n }),\n\n deleteSlot: protectedProcedure\n .input(deleteSlotSchema)\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { id } = input;\n\n const deletedSlot = await deleteSlotByIdInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const [deletedSlot] = await db\n .update(deliverySlotInfo)\n .set({ isActive: false })\n .where(eq(deliverySlotInfo.id, id))\n .returning();\n\n if (!deletedSlot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n */\n\n if (!deletedSlot) {\n throw new ApiError('Slot not found', 404)\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: 'Slot deleted successfully',\n }\n }),\n\n getDeliverySequence: protectedProcedure\n .input(getDeliverySequenceSchema)\n .query(async ({ input, ctx }): Promise => {\n\n const { id } = input;\n const slotId = parseInt(id);\n // const cacheKey = getSlotSequenceKey(slotId);\n\n // try {\n // const cached = await redisClient.get(cacheKey);\n // if (cached) {\n // const parsed = JSON.parse(cached);\n // const validated = cachedSequenceSchema.parse(parsed);\n // console.log('sending cached response')\n // \n // return { deliverySequence: validated };\n // }\n // } catch (error) {\n // console.warn('Redis cache read/validation failed, falling back to DB:', error);\n // // Continue to DB fallback\n // }\n\n // Fallback to DB\n const slot = await getSlotDeliverySequenceInDb(slotId)\n\n /*\n // Old implementation - direct DB queries:\n const slot = await db.query.deliverySlotInfo.findFirst({\n where: eq(deliverySlotInfo.id, slotId),\n });\n\n if (!slot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n\n const sequence = cachedSequenceSchema.parse(slot.deliverySequence || {});\n */\n\n if (!slot) {\n throw new ApiError('Slot not found', 404)\n }\n\n const sequence = (slot.deliverySequence || {}) as CachedDeliverySequence;\n\n // Cache the validated result\n // try {\n // const validated = cachedSequenceSchema.parse(sequence);\n // await redisClient.set(cacheKey, JSON.stringify(validated), 3600);\n // } catch (cacheError) {\n // console.warn('Redis cache write failed:', cacheError);\n // }\n\n return { deliverySequence: sequence }\n }),\n\n updateDeliverySequence: protectedProcedure\n .input(updateDeliverySequenceSchema)\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { id, deliverySequence } = input;\n\n const updatedSlot = await updateSlotDeliverySequenceInDb(id, deliverySequence)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedSlot] = await db\n .update(deliverySlotInfo)\n .set({ deliverySequence })\n .where(eq(deliverySlotInfo.id, id))\n .returning({\n id: deliverySlotInfo.id,\n deliverySequence: deliverySlotInfo.deliverySequence,\n });\n\n if (!updatedSlot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n */\n\n if (!updatedSlot) {\n throw new ApiError('Slot not found', 404)\n }\n\n // Cache the updated sequence\n // const cacheKey = getSlotSequenceKey(id);\n // try {\n // const validated = cachedSequenceSchema.parse(deliverySequence);\n // await redisClient.set(cacheKey, JSON.stringify(validated), 3600);\n // } catch (cacheError) {\n // console.warn('Redis cache write failed:', cacheError);\n // }\n\n return {\n slot: updatedSlot,\n message: 'Delivery sequence updated successfully',\n }\n }),\n\n updateSlotCapacity: protectedProcedure\n .input(z.object({\n slotId: z.number(),\n isCapacityFull: z.boolean(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n if (!ctx.staffUser?.id) {\n throw new TRPCError({ code: \"UNAUTHORIZED\", message: \"Access denied\" });\n }\n\n const { slotId, isCapacityFull } = input;\n\n const result = await updateSlotCapacityInDb(slotId, isCapacityFull)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedSlot] = await db\n .update(deliverySlotInfo)\n .set({ isCapacityFull })\n .where(eq(deliverySlotInfo.id, slotId))\n .returning();\n\n if (!updatedSlot) {\n throw new ApiError(\"Slot not found\", 404);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n success: true,\n slot: updatedSlot,\n message: `Slot ${isCapacityFull ? 'marked as full capacity' : 'capacity reset'}`,\n };\n */\n\n if (!result) {\n throw new ApiError('Slot not found', 404)\n }\n\n scheduleStoreInitialization()\n\n return result\n }),\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport { generateSignedUrlsFromS3Urls, generateSignedUrlFromS3Url, claimUploadUrl, extractKeyFromPresignedUrl, deleteImageUtil } from '@/src/lib/s3-client'\nimport { scheduleStoreInitialization } from '@/src/stores/store-initializer'\nimport {\n getAllProducts as getAllProductsInDb,\n getProductById as getProductByIdInDb,\n deleteProduct as deleteProductInDb,\n toggleProductOutOfStock as toggleProductOutOfStockInDb,\n updateSlotProducts as updateSlotProductsInDb,\n getSlotProductIds as getSlotProductIdsInDb,\n getSlotsProductIds as getSlotsProductIdsInDb,\n getProductReviews as getProductReviewsInDb,\n respondToReview as respondToReviewInDb,\n getAllProductGroups as getAllProductGroupsInDb,\n createProductGroup as createProductGroupInDb,\n updateProductGroup as updateProductGroupInDb,\n deleteProductGroup as deleteProductGroupInDb,\n updateProductPrices as updateProductPricesInDb,\n checkProductExistsByName,\n checkUnitExists,\n createProduct as createProductInDb,\n createSpecialDealsForProduct,\n replaceProductTags,\n getProductImagesById,\n updateProduct as updateProductInDb,\n updateProductDeals,\n checkProductTagExistsByName,\n createProductTag as createProductTagInDb,\n updateProductTag as updateProductTagInDb,\n deleteProductTag as deleteProductTagInDb,\n getAllProductTagInfos as getAllProductTagInfosInDb,\n getProductTagInfoById as getProductTagInfoByIdInDb,\n} from '@/src/dbService'\nimport type {\n AdminProduct,\n AdminSpecialDeal,\n AdminProductGroupsResult,\n AdminProductGroupResponse,\n AdminProductReviewsResult,\n AdminProductReviewResponse,\n AdminProductListResponse,\n AdminProductResponse,\n AdminDeleteProductResult,\n AdminToggleOutOfStockResult,\n AdminUpdateSlotProductsResult,\n AdminSlotProductIdsResult,\n AdminSlotsProductIdsResult,\n AdminUpdateProductPricesResult,\n} from '@packages/shared'\n\n\nexport const productRouter = router({\n getProducts: protectedProcedure\n .query(async (): Promise => {\n const products = await getAllProductsInDb()\n\n /*\n // Old implementation - direct DB query:\n const products = await db.query.productInfo.findMany({\n orderBy: productInfo.name,\n with: {\n unit: true,\n store: true,\n },\n });\n */\n\n const productsWithSignedUrls = await Promise.all(\n products.map(async (product) => ({\n ...product,\n images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),\n }))\n )\n\n return {\n products: productsWithSignedUrls,\n count: productsWithSignedUrls.length,\n }\n }),\n\n getProductById: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .query(async ({ input }): Promise => {\n const { id } = input;\n\n const product = await getProductByIdInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, id),\n with: {\n unit: true,\n },\n });\n\n if (!product) {\n throw new ApiError(\"Product not found\", 404);\n }\n\n // Fetch special deals for this product\n const deals = await db.query.specialDeals.findMany({\n where: eq(specialDeals.productId, id),\n orderBy: specialDeals.quantity,\n });\n\n // Fetch associated tags for this product\n const productTagsData = await db.query.productTags.findMany({\n where: eq(productTags.productId, id),\n with: {\n tag: true,\n },\n });\n\n // Generate signed URLs for product images\n const productWithSignedUrls = {\n ...product,\n images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),\n deals,\n tags: productTagsData.map(pt => pt.tag),\n };\n\n return {\n product: productWithSignedUrls,\n };\n */\n\n if (!product) {\n throw new ApiError('Product not found', 404)\n }\n\n const productWithSignedUrls = {\n ...product,\n images: await generateSignedUrlsFromS3Urls((product.images as string[]) || []),\n }\n\n return {\n product: productWithSignedUrls,\n }\n }),\n\n deleteProduct: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .mutation(async ({ input }): Promise => {\n const { id } = input;\n\n const deletedProduct = await deleteProductInDb(id)\n\n /*\n // Old implementation - direct DB query:\n const [deletedProduct] = await db\n .delete(productInfo)\n .where(eq(productInfo.id, id))\n .returning();\n\n if (!deletedProduct) {\n throw new ApiError(\"Product not found\", 404);\n }\n */\n\n if (!deletedProduct) {\n throw new ApiError('Product not found', 404)\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: 'Product deleted successfully',\n }\n }),\n\n toggleOutOfStock: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .mutation(async ({ input }): Promise => {\n const { id } = input;\n\n const updatedProduct = await toggleProductOutOfStockInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, id),\n });\n\n if (!product) {\n throw new ApiError(\"Product not found\", 404);\n }\n\n const [updatedProduct] = await db\n .update(productInfo)\n .set({\n isOutOfStock: !product.isOutOfStock,\n })\n .where(eq(productInfo.id, id))\n .returning();\n */\n\n if (!updatedProduct) {\n throw new ApiError('Product not found', 404)\n }\n\n scheduleStoreInitialization()\n\n return {\n product: updatedProduct,\n message: `Product marked as ${updatedProduct.isOutOfStock ? 'out of stock' : 'in stock'}`,\n }\n }),\n\n createProduct: protectedProcedure\n .input(z.object({\n name: z.string().min(1, 'Name is required'),\n shortDescription: z.string().optional(),\n longDescription: z.string().optional(),\n unitId: z.number().min(1, 'Unit is required'),\n storeId: z.number().min(1, 'Store is required'),\n price: z.number().positive('Price must be positive'),\n marketPrice: z.number().optional(),\n incrementStep: z.number().optional().default(1),\n productQuantity: z.number().optional().default(1),\n isSuspended: z.boolean().optional().default(false),\n isFlashAvailable: z.boolean().optional().default(false),\n flashPrice: z.number().optional(),\n uploadUrls: z.array(z.string()).optional().default([]),\n deals: z.array(z.object({\n quantity: z.number(),\n price: z.number(),\n validTill: z.string(),\n })).optional(),\n tagIds: z.array(z.number()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise<{ product: AdminProduct; deals: AdminSpecialDeal[]; message: string }> => {\n const { name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, uploadUrls, deals, tagIds } = input\n\n const existingProduct = await checkProductExistsByName(name.trim())\n if (existingProduct) {\n throw new ApiError('A product with this name already exists', 400)\n }\n\n const unitExists = await checkUnitExists(unitId)\n if (!unitExists) {\n throw new ApiError('Invalid unit ID', 400)\n }\n\n const imageKeys = uploadUrls.map(url => extractKeyFromPresignedUrl(url))\n\n const newProduct = await createProductInDb({\n name,\n shortDescription,\n longDescription,\n unitId,\n storeId,\n price: price.toString(),\n marketPrice: marketPrice?.toString(),\n incrementStep,\n productQuantity,\n isSuspended,\n isFlashAvailable,\n flashPrice: flashPrice?.toString(),\n images: imageKeys,\n })\n\n let createdDeals: AdminSpecialDeal[] = []\n if (deals && deals.length > 0) {\n createdDeals = await createSpecialDealsForProduct(newProduct.id, deals)\n }\n\n if (tagIds.length > 0) {\n await replaceProductTags(newProduct.id, tagIds)\n }\n\n if (uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)))\n }\n\n scheduleStoreInitialization()\n\n return {\n product: newProduct,\n deals: createdDeals,\n message: 'Product created successfully',\n }\n }),\n\n updateProduct: protectedProcedure\n .input(z.object({\n id: z.number(),\n name: z.string().min(1, 'Name is required'),\n shortDescription: z.string().optional(),\n longDescription: z.string().optional(),\n unitId: z.number().min(1, 'Unit is required'),\n storeId: z.number().min(1, 'Store is required'),\n price: z.number().positive('Price must be positive'),\n marketPrice: z.number().optional(),\n incrementStep: z.number().optional().default(1),\n productQuantity: z.number().optional().default(1),\n isSuspended: z.boolean().optional().default(false),\n isFlashAvailable: z.boolean().optional().default(false),\n flashPrice: z.number().nullable().optional(),\n uploadUrls: z.array(z.string()).optional().default([]),\n imagesToDelete: z.array(z.string()).optional().default([]),\n deals: z.array(z.object({\n quantity: z.number(),\n price: z.number(),\n validTill: z.string(),\n })).optional(),\n tagIds: z.array(z.number()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise<{ product: AdminProduct; message: string }> => {\n const { id, name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, uploadUrls, imagesToDelete, deals, tagIds } = input\n\n const unitExists = await checkUnitExists(unitId)\n if (!unitExists) {\n throw new ApiError('Invalid unit ID', 400)\n }\n\n const currentImages = await getProductImagesById(id)\n if (!currentImages) {\n throw new ApiError('Product not found', 404)\n }\n\n let updatedImages = currentImages || []\n if (imagesToDelete.length > 0) {\n const imagesToRemove = updatedImages.filter(img => imagesToDelete.includes(img))\n await deleteImageUtil({ keys: imagesToRemove })\n updatedImages = updatedImages.filter(img => !imagesToRemove.includes(img))\n }\n\n const newImageKeys = uploadUrls.map(url => extractKeyFromPresignedUrl(url))\n const finalImages = [...updatedImages, ...newImageKeys]\n\n const updatedProduct = await updateProductInDb(id, {\n name,\n shortDescription,\n longDescription,\n unitId,\n storeId,\n price: price.toString(),\n marketPrice: marketPrice?.toString(),\n incrementStep,\n productQuantity,\n isSuspended,\n isFlashAvailable,\n flashPrice: flashPrice?.toString() ?? null,\n images: finalImages,\n })\n\n if (!updatedProduct) {\n throw new ApiError('Product not found', 404)\n }\n\n if (deals && deals.length > 0) {\n await updateProductDeals(id, deals)\n }\n\n if (tagIds.length > 0) {\n await replaceProductTags(id, tagIds)\n }\n\n if (uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)))\n }\n\n scheduleStoreInitialization()\n\n return {\n product: updatedProduct,\n message: 'Product updated successfully',\n }\n }),\n\n updateSlotProducts: protectedProcedure\n .input(z.object({\n slotId: z.string(),\n productIds: z.array(z.string()),\n }))\n .mutation(async ({ input }): Promise => {\n const { slotId, productIds } = input;\n\n if (!Array.isArray(productIds)) {\n throw new ApiError(\"productIds must be an array\", 400);\n }\n\n const result = await updateSlotProductsInDb(slotId, productIds)\n\n /*\n // Old implementation - direct DB queries:\n // Get current associations\n const currentAssociations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, parseInt(slotId)),\n columns: {\n productId: true,\n },\n });\n\n const currentProductIds = currentAssociations.map(assoc => assoc.productId);\n const newProductIds = productIds.map((id: string) => parseInt(id));\n\n // Find products to add and remove\n const productsToAdd = newProductIds.filter(id => !currentProductIds.includes(id));\n const productsToRemove = currentProductIds.filter(id => !newProductIds.includes(id));\n\n // Remove associations for products that are no longer selected\n if (productsToRemove.length > 0) {\n await db.delete(productSlots).where(\n and(\n eq(productSlots.slotId, parseInt(slotId)),\n inArray(productSlots.productId, productsToRemove)\n )\n );\n }\n\n // Add associations for newly selected products\n if (productsToAdd.length > 0) {\n const newAssociations = productsToAdd.map(productId => ({\n productId,\n slotId: parseInt(slotId),\n }));\n\n await db.insert(productSlots).values(newAssociations);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: \"Slot products updated successfully\",\n added: productsToAdd.length,\n removed: productsToRemove.length,\n };\n */\n\n scheduleStoreInitialization()\n\n return {\n message: 'Slot products updated successfully',\n added: result.added,\n removed: result.removed,\n }\n }),\n\n getSlotProductIds: protectedProcedure\n .input(z.object({\n slotId: z.string(),\n }))\n .query(async ({ input }): Promise => {\n const { slotId } = input;\n\n const productIds = await getSlotProductIdsInDb(slotId)\n\n /*\n // Old implementation - direct DB queries:\n const associations = await db.query.productSlots.findMany({\n where: eq(productSlots.slotId, parseInt(slotId)),\n columns: {\n productId: true,\n },\n });\n\n const productIds = associations.map(assoc => assoc.productId);\n\n return {\n productIds,\n };\n */\n\n return {\n productIds,\n }\n }),\n\n getSlotsProductIds: protectedProcedure\n .input(z.object({\n slotIds: z.array(z.number()),\n }))\n .query(async ({ input }): Promise => {\n const { slotIds } = input;\n\n if (!Array.isArray(slotIds)) {\n throw new ApiError(\"slotIds must be an array\", 400);\n }\n\n const result = await getSlotsProductIdsInDb(slotIds)\n\n /*\n // Old implementation - direct DB queries:\n if (slotIds.length === 0) {\n return {};\n }\n\n // Fetch all associations for the requested slots\n const associations = await db.query.productSlots.findMany({\n where: inArray(productSlots.slotId, slotIds),\n columns: {\n slotId: true,\n productId: true,\n },\n });\n\n // Group by slotId\n const result = associations.reduce((acc, assoc) => {\n if (!acc[assoc.slotId]) {\n acc[assoc.slotId] = [];\n }\n acc[assoc.slotId].push(assoc.productId);\n return acc;\n }, {} as Record);\n\n // Ensure all requested slots have entries (even if empty)\n slotIds.forEach(slotId => {\n if (!result[slotId]) {\n result[slotId] = [];\n }\n });\n\n return result;\n */\n\n return result\n }),\n\n getProductReviews: protectedProcedure\n .input(z.object({\n productId: z.number().int().positive(),\n limit: z.number().int().min(1).max(50).optional().default(10),\n offset: z.number().int().min(0).optional().default(0),\n }))\n .query(async ({ input }): Promise => {\n const { productId, limit, offset } = input;\n\n const { reviews, totalCount } = await getProductReviewsInDb(productId, limit, offset)\n\n /*\n // Old implementation - direct DB queries:\n const reviews = await db\n .select({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n adminResponse: productReviews.adminResponse,\n adminResponseImages: productReviews.adminResponseImages,\n userName: users.name,\n })\n .from(productReviews)\n .innerJoin(users, eq(productReviews.userId, users.id))\n .where(eq(productReviews.productId, productId))\n .orderBy(desc(productReviews.reviewTime))\n .limit(limit)\n .offset(offset);\n\n // Generate signed URLs for images\n const reviewsWithSignedUrls = await Promise.all(\n reviews.map(async (review) => ({\n ...review,\n signedImageUrls: await generateSignedUrlsFromS3Urls((review.imageUrls as string[]) || []),\n signedAdminImageUrls: await generateSignedUrlsFromS3Urls((review.adminResponseImages as string[]) || []),\n }))\n );\n\n // Check if more reviews exist\n const totalCountResult = await db\n .select({ count: sql`count(*)` })\n .from(productReviews)\n .where(eq(productReviews.productId, productId));\n\n const totalCount = Number(totalCountResult[0].count);\n const hasMore = offset + limit < totalCount;\n\n return { reviews: reviewsWithSignedUrls, hasMore };\n */\n\n const reviewsWithSignedUrls = await Promise.all(\n reviews.map(async (review) => ({\n ...review,\n signedImageUrls: await generateSignedUrlsFromS3Urls((review.imageUrls as string[]) || []),\n signedAdminImageUrls: await generateSignedUrlsFromS3Urls((review.adminResponseImages as string[]) || []),\n }))\n )\n\n const hasMore = offset + limit < totalCount\n\n return { reviews: reviewsWithSignedUrls, hasMore }\n }),\n\n respondToReview: protectedProcedure\n .input(z.object({\n reviewId: z.number().int().positive(),\n adminResponse: z.string().optional(),\n adminResponseImages: z.array(z.string()).optional().default([]),\n uploadUrls: z.array(z.string()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise => {\n const { reviewId, adminResponse, adminResponseImages, uploadUrls } = input;\n\n const updatedReview = await respondToReviewInDb(reviewId, adminResponse, adminResponseImages)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedReview] = await db\n .update(productReviews)\n .set({\n adminResponse,\n adminResponseImages,\n })\n .where(eq(productReviews.id, reviewId))\n .returning();\n\n if (!updatedReview) {\n throw new ApiError('Review not found', 404);\n }\n\n // Claim upload URLs\n if (uploadUrls && uploadUrls.length > 0) {\n // const { claimUploadUrl } = await import('@/src/lib/s3-client');\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)));\n }\n\n return { success: true, review: updatedReview };\n */\n\n if (!updatedReview) {\n throw new ApiError('Review not found', 404)\n }\n\n if (uploadUrls && uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)))\n }\n\n return { success: true, review: updatedReview }\n }),\n\n getGroups: protectedProcedure\n .query(async (): Promise => {\n const groups = await getAllProductGroupsInDb()\n\n /*\n // Old implementation - direct DB queries:\n const groups = await db.query.productGroupInfo.findMany({\n with: {\n memberships: {\n with: {\n product: true,\n },\n },\n },\n orderBy: desc(productGroupInfo.createdAt),\n });\n */\n\n return {\n groups: groups.map(group => ({\n ...group,\n products: group.memberships.map((m: any) => ({\n ...(m.product as AdminProduct),\n images: (m.product.images as string[]) || null,\n })),\n productCount: group.memberships.length,\n })),\n }\n }),\n\n createGroup: protectedProcedure\n .input(z.object({\n group_name: z.string().min(1),\n description: z.string().optional(),\n product_ids: z.array(z.number()).default([]),\n }))\n .mutation(async ({ input }): Promise => {\n const { group_name, description, product_ids } = input;\n\n const newGroup = await createProductGroupInDb(group_name, description, product_ids)\n\n /*\n // Old implementation - direct DB queries:\n const [newGroup] = await db\n .insert(productGroupInfo)\n .values({\n groupName: group_name,\n description,\n })\n .returning();\n\n if (product_ids.length > 0) {\n const memberships = product_ids.map(productId => ({\n productId,\n groupId: newGroup.id,\n }));\n\n await db.insert(productGroupMembership).values(memberships);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n group: newGroup,\n message: 'Group created successfully',\n };\n */\n\n scheduleStoreInitialization()\n\n return {\n group: newGroup,\n message: 'Group created successfully',\n }\n }),\n\n updateGroup: protectedProcedure\n .input(z.object({\n id: z.number(),\n group_name: z.string().optional(),\n description: z.string().optional(),\n product_ids: z.array(z.number()).optional(),\n }))\n .mutation(async ({ input }): Promise => {\n const { id, group_name, description, product_ids } = input;\n\n const updatedGroup = await updateProductGroupInDb(id, group_name, description, product_ids)\n\n /*\n // Old implementation - direct DB queries:\n const updateData: any = {};\n if (group_name !== undefined) updateData.groupName = group_name;\n if (description !== undefined) updateData.description = description;\n\n const [updatedGroup] = await db\n .update(productGroupInfo)\n .set(updateData)\n .where(eq(productGroupInfo.id, id))\n .returning();\n\n if (!updatedGroup) {\n throw new ApiError('Group not found', 404);\n }\n\n if (product_ids !== undefined) {\n // Delete existing memberships\n await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id));\n\n // Insert new memberships\n if (product_ids.length > 0) {\n const memberships = product_ids.map(productId => ({\n productId,\n groupId: id,\n }));\n\n await db.insert(productGroupMembership).values(memberships);\n }\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n group: updatedGroup,\n message: 'Group updated successfully',\n };\n */\n\n if (!updatedGroup) {\n throw new ApiError('Group not found', 404)\n }\n\n scheduleStoreInitialization()\n\n return {\n group: updatedGroup,\n message: 'Group updated successfully',\n }\n }),\n\n deleteGroup: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .mutation(async ({ input }): Promise => {\n const { id } = input;\n\n const deletedGroup = await deleteProductGroupInDb(id)\n\n /*\n // Old implementation - direct DB queries:\n // Delete memberships first\n await db.delete(productGroupMembership).where(eq(productGroupMembership.groupId, id));\n\n // Delete group\n const [deletedGroup] = await db\n .delete(productGroupInfo)\n .where(eq(productGroupInfo.id, id))\n .returning();\n\n if (!deletedGroup) {\n throw new ApiError('Group not found', 404);\n }\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: 'Group deleted successfully',\n };\n */\n\n if (!deletedGroup) {\n throw new ApiError('Group not found', 404)\n }\n\n scheduleStoreInitialization()\n\n return {\n message: 'Group deleted successfully',\n }\n }),\n\n updateProductPrices: protectedProcedure\n .input(z.object({\n updates: z.array(z.object({\n productId: z.number(),\n price: z.number().optional(),\n marketPrice: z.number().nullable().optional(),\n flashPrice: z.number().nullable().optional(),\n isFlashAvailable: z.boolean().optional(),\n })),\n }))\n .mutation(async ({ input }): Promise => {\n const { updates } = input;\n\n if (updates.length === 0) {\n throw new ApiError('No updates provided', 400)\n }\n\n const result = await updateProductPricesInDb(updates)\n\n /*\n // Old implementation - direct DB queries:\n if (updates.length === 0) {\n throw new ApiError('No updates provided', 400);\n }\n\n // Validate that all productIds exist\n const productIds = updates.map(u => u.productId);\n const existingProducts = await db.query.productInfo.findMany({\n where: inArray(productInfo.id, productIds),\n columns: { id: true },\n });\n\n const existingIds = new Set(existingProducts.map(p => p.id));\n const invalidIds = productIds.filter(id => !existingIds.has(id));\n\n if (invalidIds.length > 0) {\n throw new ApiError(`Invalid product IDs: ${invalidIds.join(', ')}`, 400);\n }\n\n // Perform batch update\n const updatePromises = updates.map(async (update) => {\n const { productId, price, marketPrice, flashPrice, isFlashAvailable } = update;\n const updateData: any = {};\n if (price !== undefined) updateData.price = price;\n if (marketPrice !== undefined) updateData.marketPrice = marketPrice;\n if (flashPrice !== undefined) updateData.flashPrice = flashPrice;\n if (isFlashAvailable !== undefined) updateData.isFlashAvailable = isFlashAvailable;\n\n return db\n .update(productInfo)\n .set(updateData)\n .where(eq(productInfo.id, productId));\n });\n\n await Promise.all(updatePromises);\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n message: `Updated prices for ${updates.length} product(s)`,\n updatedCount: updates.length,\n };\n */\n\n if (result.invalidIds.length > 0) {\n throw new ApiError(`Invalid product IDs: ${result.invalidIds.join(', ')}`, 400)\n }\n\n scheduleStoreInitialization()\n\n return {\n message: `Updated prices for ${result.updatedCount} product(s)`,\n updatedCount: result.updatedCount,\n }\n }),\n\n getProductTags: protectedProcedure\n .query(async (): Promise<{ tags: Array<{ id: number; tagName: string; tagDescription: string | null; imageUrl: string | null; isDashboardTag: boolean; relatedStores: unknown; createdAt: Date }>; message: string }> => {\n const tags = await getAllProductTagInfosInDb()\n\n const tagsWithSignedUrls = await Promise.all(\n tags.map(async (tag) => ({\n ...tag,\n imageUrl: tag.imageUrl ? await generateSignedUrlFromS3Url(tag.imageUrl) : null,\n }))\n )\n\n return {\n tags: tagsWithSignedUrls,\n message: 'Tags retrieved successfully',\n }\n }),\n\n getProductTagById: protectedProcedure\n .input(z.object({ id: z.number() }))\n .query(async ({ input }): Promise<{ tag: { id: number; tagName: string; tagDescription: string | null; imageUrl: string | null; isDashboardTag: boolean; relatedStores: unknown; createdAt: Date }; message: string }> => {\n const tag = await getProductTagInfoByIdInDb(input.id)\n\n if (!tag) {\n throw new ApiError('Tag not found', 404)\n }\n\n const tagWithSignedUrl = {\n ...tag,\n imageUrl: tag.imageUrl ? await generateSignedUrlFromS3Url(tag.imageUrl) : null,\n }\n\n return {\n tag: tagWithSignedUrl,\n message: 'Tag retrieved successfully',\n }\n }),\n\n createProductTag: protectedProcedure\n .input(z.object({\n tagName: z.string().min(1, 'Tag name is required'),\n tagDescription: z.string().optional(),\n imageUrl: z.string().optional().nullable(),\n isDashboardTag: z.boolean().optional().default(false),\n relatedStores: z.array(z.number()).optional().default([]),\n uploadUrls: z.array(z.string()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise<{ tag: { id: number; tagName: string; tagDescription: string | null; imageUrl: string | null; isDashboardTag: boolean; relatedStores: unknown; createdAt: Date }; message: string }> => {\n const { tagName, tagDescription, imageUrl, isDashboardTag, relatedStores, uploadUrls } = input\n\n const existingTag = await checkProductTagExistsByName(tagName.trim())\n if (existingTag) {\n throw new ApiError('A tag with this name already exists', 400)\n }\n\n const createdTag = await createProductTagInDb({\n tagName: tagName.trim(),\n tagDescription,\n imageUrl: imageUrl ?? null,\n isDashboardTag,\n relatedStores,\n })\n\n if (uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map((url) => claimUploadUrl(url)))\n }\n\n scheduleStoreInitialization()\n\n const { products, ...createdTagInfo } = createdTag\n\n return {\n tag: {\n ...createdTagInfo,\n imageUrl: createdTagInfo.imageUrl ? await generateSignedUrlFromS3Url(createdTagInfo.imageUrl) : null,\n },\n message: 'Tag created successfully',\n }\n }),\n\n updateProductTag: protectedProcedure\n .input(z.object({\n id: z.number(),\n tagName: z.string().min(1).optional(),\n tagDescription: z.string().optional().nullable(),\n imageUrl: z.string().optional().nullable(),\n isDashboardTag: z.boolean().optional(),\n relatedStores: z.array(z.number()).optional(),\n uploadUrls: z.array(z.string()).optional().default([]),\n }))\n .mutation(async ({ input }): Promise<{ tag: { id: number; tagName: string; tagDescription: string | null; imageUrl: string | null; isDashboardTag: boolean; relatedStores: unknown; createdAt: Date }; message: string }> => {\n const { id, tagName, tagDescription, imageUrl, isDashboardTag, relatedStores, uploadUrls } = input\n\n const currentTag = await getProductTagInfoByIdInDb(id)\n\n if (!currentTag) {\n throw new ApiError('Tag not found', 404)\n }\n\n if (imageUrl !== undefined && imageUrl !== currentTag.imageUrl) {\n if (currentTag.imageUrl) {\n await deleteImageUtil({ keys: [currentTag.imageUrl] })\n }\n }\n\n const updatedTag = await updateProductTagInDb(id, {\n tagName: tagName?.trim(),\n tagDescription: tagDescription ?? undefined,\n imageUrl: imageUrl ?? undefined,\n isDashboardTag,\n relatedStores,\n })\n\n if (uploadUrls.length > 0) {\n await Promise.all(uploadUrls.map((url) => claimUploadUrl(url)))\n }\n\n scheduleStoreInitialization()\n\n const { products, ...updatedTagInfo } = updatedTag\n\n return {\n tag: {\n ...updatedTagInfo,\n imageUrl: updatedTagInfo.imageUrl ? await generateSignedUrlFromS3Url(updatedTagInfo.imageUrl) : null,\n },\n message: 'Tag updated successfully',\n }\n }),\n\n deleteProductTag: protectedProcedure\n .input(z.object({ id: z.number() }))\n .mutation(async ({ input }): Promise<{ message: string }> => {\n const tag = await getProductTagInfoByIdInDb(input.id)\n\n if (!tag) {\n throw new ApiError('Tag not found', 404)\n }\n\n if (tag.imageUrl) {\n await deleteImageUtil({ keys: [tag.imageUrl] })\n }\n\n await deleteProductTagInDb(input.id)\n\n scheduleStoreInitialization()\n\n return { message: 'Tag deleted successfully' }\n }),\n });\n", "export const subtle = globalThis.crypto?.subtle;\nexport const randomUUID = () => {\n\treturn globalThis.crypto?.randomUUID();\n};\nexport const getRandomValues = (array) => {\n\treturn globalThis.crypto?.getRandomValues(array);\n};\n", "import { notImplemented, notImplementedClass } from \"../../../_internal/utils.mjs\";\nimport { getRandomValues } from \"./web.mjs\";\nconst MAX_RANDOM_VALUE_BYTES = 65536;\nexport const webcrypto = new Proxy(globalThis.crypto, { get(_, key) {\n\tif (key === \"CryptoKey\") {\n\t\treturn globalThis.CryptoKey;\n\t}\n\tif (typeof globalThis.crypto[key] === \"function\") {\n\t\treturn globalThis.crypto[key].bind(globalThis.crypto);\n\t}\n\treturn globalThis.crypto[key];\n} });\nexport const randomBytes = (size, cb) => {\n\tconst bytes = Buffer.alloc(size, 0, undefined);\n\tfor (let generated = 0; generated < size; generated += MAX_RANDOM_VALUE_BYTES) {\n\t\tgetRandomValues(\n\t\t\t// Use subarray to get a view of the buffer\n\t\t\tUint8Array.prototype.subarray.call(bytes, generated, generated + MAX_RANDOM_VALUE_BYTES)\n);\n\t}\n\tif (typeof cb === \"function\") {\n\t\tcb(null, bytes);\n\t\treturn undefined;\n\t}\n\treturn bytes;\n};\nexport const rng = randomBytes;\nexport const prng = randomBytes;\nexport const fips = false;\nexport const checkPrime = /*@__PURE__*/ notImplemented(\"crypto.checkPrime\");\nexport const checkPrimeSync = /*@__PURE__*/ notImplemented(\"crypto.checkPrimeSync\");\n/** @deprecated */\nexport const createCipher = /*@__PURE__*/ notImplemented(\"crypto.createCipher\");\n/** @deprecated */\nexport const createDecipher = /*@__PURE__*/ notImplemented(\"crypto.createDecipher\");\nexport const pseudoRandomBytes = /*@__PURE__*/ notImplemented(\"crypto.pseudoRandomBytes\");\nexport const createCipheriv = /*@__PURE__*/ notImplemented(\"crypto.createCipheriv\");\nexport const createDecipheriv = /*@__PURE__*/ notImplemented(\"crypto.createDecipheriv\");\nexport const createDiffieHellman = /*@__PURE__*/ notImplemented(\"crypto.createDiffieHellman\");\nexport const createDiffieHellmanGroup = /*@__PURE__*/ notImplemented(\"crypto.createDiffieHellmanGroup\");\nexport const createECDH = /*@__PURE__*/ notImplemented(\"crypto.createECDH\");\nexport const createHash = /*@__PURE__*/ notImplemented(\"crypto.createHash\");\nexport const createHmac = /*@__PURE__*/ notImplemented(\"crypto.createHmac\");\nexport const createPrivateKey = /*@__PURE__*/ notImplemented(\"crypto.createPrivateKey\");\nexport const createPublicKey = /*@__PURE__*/ notImplemented(\"crypto.createPublicKey\");\nexport const createSecretKey = /*@__PURE__*/ notImplemented(\"crypto.createSecretKey\");\nexport const createSign = /*@__PURE__*/ notImplemented(\"crypto.createSign\");\nexport const createVerify = /*@__PURE__*/ notImplemented(\"crypto.createVerify\");\nexport const diffieHellman = /*@__PURE__*/ notImplemented(\"crypto.diffieHellman\");\nexport const generatePrime = /*@__PURE__*/ notImplemented(\"crypto.generatePrime\");\nexport const generatePrimeSync = /*@__PURE__*/ notImplemented(\"crypto.generatePrimeSync\");\nexport const getCiphers = /*@__PURE__*/ notImplemented(\"crypto.getCiphers\");\nexport const getCipherInfo = /*@__PURE__*/ notImplemented(\"crypto.getCipherInfo\");\nexport const getCurves = /*@__PURE__*/ notImplemented(\"crypto.getCurves\");\nexport const getDiffieHellman = /*@__PURE__*/ notImplemented(\"crypto.getDiffieHellman\");\nexport const getHashes = /*@__PURE__*/ notImplemented(\"crypto.getHashes\");\nexport const hkdf = /*@__PURE__*/ notImplemented(\"crypto.hkdf\");\nexport const hkdfSync = /*@__PURE__*/ notImplemented(\"crypto.hkdfSync\");\nexport const pbkdf2 = /*@__PURE__*/ notImplemented(\"crypto.pbkdf2\");\nexport const pbkdf2Sync = /*@__PURE__*/ notImplemented(\"crypto.pbkdf2Sync\");\nexport const generateKeyPair = /*@__PURE__*/ notImplemented(\"crypto.generateKeyPair\");\nexport const generateKeyPairSync = /*@__PURE__*/ notImplemented(\"crypto.generateKeyPairSync\");\nexport const generateKey = /*@__PURE__*/ notImplemented(\"crypto.generateKey\");\nexport const generateKeySync = /*@__PURE__*/ notImplemented(\"crypto.generateKeySync\");\nexport const privateDecrypt = /*@__PURE__*/ notImplemented(\"crypto.privateDecrypt\");\nexport const privateEncrypt = /*@__PURE__*/ notImplemented(\"crypto.privateEncrypt\");\nexport const publicDecrypt = /*@__PURE__*/ notImplemented(\"crypto.publicDecrypt\");\nexport const publicEncrypt = /*@__PURE__*/ notImplemented(\"crypto.publicEncrypt\");\nexport const randomFill = /*@__PURE__*/ notImplemented(\"crypto.randomFill\");\nexport const randomFillSync = /*@__PURE__*/ notImplemented(\"crypto.randomFillSync\");\nexport const randomInt = /*@__PURE__*/ notImplemented(\"crypto.randomInt\");\nexport const scrypt = /*@__PURE__*/ notImplemented(\"crypto.scrypt\");\nexport const scryptSync = /*@__PURE__*/ notImplemented(\"crypto.scryptSync\");\nexport const sign = /*@__PURE__*/ notImplemented(\"crypto.sign\");\nexport const setEngine = /*@__PURE__*/ notImplemented(\"crypto.setEngine\");\nexport const timingSafeEqual = /*@__PURE__*/ notImplemented(\"crypto.timingSafeEqual\");\nexport const getFips = /*@__PURE__*/ notImplemented(\"crypto.getFips\");\nexport const setFips = /*@__PURE__*/ notImplemented(\"crypto.setFips\");\nexport const verify = /*@__PURE__*/ notImplemented(\"crypto.verify\");\nexport const secureHeapUsed = /*@__PURE__*/ notImplemented(\"crypto.secureHeapUsed\");\nexport const hash = /*@__PURE__*/ notImplemented(\"crypto.hash\");\nexport const Certificate = /*@__PURE__*/ notImplementedClass(\"crypto.Certificate\");\nexport const Cipher = /*@__PURE__*/ notImplementedClass(\"crypto.Cipher\");\nexport const Cipheriv = /*@__PURE__*/ notImplementedClass(\n\t\"crypto.Cipheriv\"\n\t// @ts-expect-error not typed yet\n);\nexport const Decipher = /*@__PURE__*/ notImplementedClass(\"crypto.Decipher\");\nexport const Decipheriv = /*@__PURE__*/ notImplementedClass(\n\t\"crypto.Decipheriv\"\n\t// @ts-expect-error not typed yet\n);\nexport const DiffieHellman = /*@__PURE__*/ notImplementedClass(\"crypto.DiffieHellman\");\nexport const DiffieHellmanGroup = /*@__PURE__*/ notImplementedClass(\"crypto.DiffieHellmanGroup\");\nexport const ECDH = /*@__PURE__*/ notImplementedClass(\"crypto.ECDH\");\nexport const Hash = /*@__PURE__*/ notImplementedClass(\"crypto.Hash\");\nexport const Hmac = /*@__PURE__*/ notImplementedClass(\"crypto.Hmac\");\nexport const KeyObject = /*@__PURE__*/ notImplementedClass(\"crypto.KeyObject\");\nexport const Sign = /*@__PURE__*/ notImplementedClass(\"crypto.Sign\");\nexport const Verify = /*@__PURE__*/ notImplementedClass(\"crypto.Verify\");\nexport const X509Certificate = /*@__PURE__*/ notImplementedClass(\"crypto.X509Certificate\");\n", "export const SSL_OP_ALL = 2147485776;\nexport const SSL_OP_ALLOW_NO_DHE_KEX = 1024;\nexport const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION = 262144;\nexport const SSL_OP_CIPHER_SERVER_PREFERENCE = 4194304;\nexport const SSL_OP_CISCO_ANYCONNECT = 32768;\nexport const SSL_OP_COOKIE_EXCHANGE = 8192;\nexport const SSL_OP_CRYPTOPRO_TLSEXT_BUG = 2147483648;\nexport const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS = 2048;\nexport const SSL_OP_LEGACY_SERVER_CONNECT = 4;\nexport const SSL_OP_NO_COMPRESSION = 131072;\nexport const SSL_OP_NO_ENCRYPT_THEN_MAC = 524288;\nexport const SSL_OP_NO_QUERY_MTU = 4096;\nexport const SSL_OP_NO_RENEGOTIATION = 1073741824;\nexport const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION = 65536;\nexport const SSL_OP_NO_SSLv2 = 0;\nexport const SSL_OP_NO_SSLv3 = 33554432;\nexport const SSL_OP_NO_TICKET = 16384;\nexport const SSL_OP_NO_TLSv1 = 67108864;\nexport const SSL_OP_NO_TLSv1_1 = 268435456;\nexport const SSL_OP_NO_TLSv1_2 = 134217728;\nexport const SSL_OP_NO_TLSv1_3 = 536870912;\nexport const SSL_OP_PRIORITIZE_CHACHA = 2097152;\nexport const SSL_OP_TLS_ROLLBACK_BUG = 8388608;\nexport const ENGINE_METHOD_RSA = 1;\nexport const ENGINE_METHOD_DSA = 2;\nexport const ENGINE_METHOD_DH = 4;\nexport const ENGINE_METHOD_RAND = 8;\nexport const ENGINE_METHOD_EC = 2048;\nexport const ENGINE_METHOD_CIPHERS = 64;\nexport const ENGINE_METHOD_DIGESTS = 128;\nexport const ENGINE_METHOD_PKEY_METHS = 512;\nexport const ENGINE_METHOD_PKEY_ASN1_METHS = 1024;\nexport const ENGINE_METHOD_ALL = 65535;\nexport const ENGINE_METHOD_NONE = 0;\nexport const DH_CHECK_P_NOT_SAFE_PRIME = 2;\nexport const DH_CHECK_P_NOT_PRIME = 1;\nexport const DH_UNABLE_TO_CHECK_GENERATOR = 4;\nexport const DH_NOT_SUITABLE_GENERATOR = 8;\nexport const RSA_PKCS1_PADDING = 1;\nexport const RSA_NO_PADDING = 3;\nexport const RSA_PKCS1_OAEP_PADDING = 4;\nexport const RSA_X931_PADDING = 5;\nexport const RSA_PKCS1_PSS_PADDING = 6;\nexport const RSA_PSS_SALTLEN_DIGEST = -1;\nexport const RSA_PSS_SALTLEN_MAX_SIGN = -2;\nexport const RSA_PSS_SALTLEN_AUTO = -2;\nexport const POINT_CONVERSION_COMPRESSED = 2;\nexport const POINT_CONVERSION_UNCOMPRESSED = 4;\nexport const POINT_CONVERSION_HYBRID = 6;\nexport const defaultCoreCipherList = \"\";\nexport const defaultCipherList = \"\";\nexport const OPENSSL_VERSION_NUMBER = 0;\nexport const TLS1_VERSION = 0;\nexport const TLS1_1_VERSION = 0;\nexport const TLS1_2_VERSION = 0;\nexport const TLS1_3_VERSION = 0;\n", "import { getRandomValues, randomUUID, subtle } from \"./internal/crypto/web.mjs\";\nimport { Certificate, Cipher, Cipheriv, Decipher, Decipheriv, DiffieHellman, DiffieHellmanGroup, ECDH, Hash, Hmac, KeyObject, Sign, Verify, X509Certificate, checkPrime, checkPrimeSync, createCipheriv, createDecipheriv, createDiffieHellman, createDiffieHellmanGroup, createECDH, createHash, createHmac, createPrivateKey, createPublicKey, createSecretKey, createSign, createVerify, diffieHellman, fips, generateKey, generateKeyPair, generateKeyPairSync, generateKeySync, generatePrime, generatePrimeSync, getCipherInfo, getCiphers, getCurves, getDiffieHellman, getFips, getHashes, hash, hkdf, hkdfSync, pbkdf2, pbkdf2Sync, privateDecrypt, privateEncrypt, pseudoRandomBytes, publicDecrypt, prng, publicEncrypt, randomBytes, randomFill, randomFillSync, randomInt, rng, scrypt, scryptSync, secureHeapUsed, setEngine, setFips, sign, timingSafeEqual, verify, webcrypto } from \"./internal/crypto/node.mjs\";\nimport { OPENSSL_VERSION_NUMBER, SSL_OP_ALL, SSL_OP_ALLOW_NO_DHE_KEX, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION, SSL_OP_CIPHER_SERVER_PREFERENCE, SSL_OP_CISCO_ANYCONNECT, SSL_OP_COOKIE_EXCHANGE, SSL_OP_CRYPTOPRO_TLSEXT_BUG, SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS, SSL_OP_LEGACY_SERVER_CONNECT, SSL_OP_NO_COMPRESSION, SSL_OP_NO_ENCRYPT_THEN_MAC, SSL_OP_NO_QUERY_MTU, SSL_OP_NO_RENEGOTIATION, SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION, SSL_OP_NO_SSLv2, SSL_OP_NO_SSLv3, SSL_OP_NO_TICKET, SSL_OP_NO_TLSv1, SSL_OP_NO_TLSv1_1, SSL_OP_NO_TLSv1_2, SSL_OP_NO_TLSv1_3, SSL_OP_PRIORITIZE_CHACHA, SSL_OP_TLS_ROLLBACK_BUG, ENGINE_METHOD_RSA, ENGINE_METHOD_DSA, ENGINE_METHOD_DH, ENGINE_METHOD_RAND, ENGINE_METHOD_EC, ENGINE_METHOD_CIPHERS, ENGINE_METHOD_DIGESTS, ENGINE_METHOD_PKEY_METHS, ENGINE_METHOD_PKEY_ASN1_METHS, ENGINE_METHOD_ALL, ENGINE_METHOD_NONE, DH_CHECK_P_NOT_SAFE_PRIME, DH_CHECK_P_NOT_PRIME, DH_UNABLE_TO_CHECK_GENERATOR, DH_NOT_SUITABLE_GENERATOR, RSA_PKCS1_PADDING, RSA_NO_PADDING, RSA_PKCS1_OAEP_PADDING, RSA_X931_PADDING, RSA_PKCS1_PSS_PADDING, RSA_PSS_SALTLEN_DIGEST, RSA_PSS_SALTLEN_MAX_SIGN, RSA_PSS_SALTLEN_AUTO, defaultCoreCipherList, TLS1_VERSION, TLS1_1_VERSION, TLS1_2_VERSION, TLS1_3_VERSION, POINT_CONVERSION_COMPRESSED, POINT_CONVERSION_UNCOMPRESSED, POINT_CONVERSION_HYBRID, defaultCipherList } from \"./internal/crypto/constants.mjs\";\nexport * from \"./internal/crypto/web.mjs\";\nexport * from \"./internal/crypto/node.mjs\";\nexport const constants = {\n\tOPENSSL_VERSION_NUMBER,\n\tSSL_OP_ALL,\n\tSSL_OP_ALLOW_NO_DHE_KEX,\n\tSSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION,\n\tSSL_OP_CIPHER_SERVER_PREFERENCE,\n\tSSL_OP_CISCO_ANYCONNECT,\n\tSSL_OP_COOKIE_EXCHANGE,\n\tSSL_OP_CRYPTOPRO_TLSEXT_BUG,\n\tSSL_OP_DONT_INSERT_EMPTY_FRAGMENTS,\n\tSSL_OP_LEGACY_SERVER_CONNECT,\n\tSSL_OP_NO_COMPRESSION,\n\tSSL_OP_NO_ENCRYPT_THEN_MAC,\n\tSSL_OP_NO_QUERY_MTU,\n\tSSL_OP_NO_RENEGOTIATION,\n\tSSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION,\n\tSSL_OP_NO_SSLv2,\n\tSSL_OP_NO_SSLv3,\n\tSSL_OP_NO_TICKET,\n\tSSL_OP_NO_TLSv1,\n\tSSL_OP_NO_TLSv1_1,\n\tSSL_OP_NO_TLSv1_2,\n\tSSL_OP_NO_TLSv1_3,\n\tSSL_OP_PRIORITIZE_CHACHA,\n\tSSL_OP_TLS_ROLLBACK_BUG,\n\tENGINE_METHOD_RSA,\n\tENGINE_METHOD_DSA,\n\tENGINE_METHOD_DH,\n\tENGINE_METHOD_RAND,\n\tENGINE_METHOD_EC,\n\tENGINE_METHOD_CIPHERS,\n\tENGINE_METHOD_DIGESTS,\n\tENGINE_METHOD_PKEY_METHS,\n\tENGINE_METHOD_PKEY_ASN1_METHS,\n\tENGINE_METHOD_ALL,\n\tENGINE_METHOD_NONE,\n\tDH_CHECK_P_NOT_SAFE_PRIME,\n\tDH_CHECK_P_NOT_PRIME,\n\tDH_UNABLE_TO_CHECK_GENERATOR,\n\tDH_NOT_SUITABLE_GENERATOR,\n\tRSA_PKCS1_PADDING,\n\tRSA_NO_PADDING,\n\tRSA_PKCS1_OAEP_PADDING,\n\tRSA_X931_PADDING,\n\tRSA_PKCS1_PSS_PADDING,\n\tRSA_PSS_SALTLEN_DIGEST,\n\tRSA_PSS_SALTLEN_MAX_SIGN,\n\tRSA_PSS_SALTLEN_AUTO,\n\tdefaultCoreCipherList,\n\tTLS1_VERSION,\n\tTLS1_1_VERSION,\n\tTLS1_2_VERSION,\n\tTLS1_3_VERSION,\n\tPOINT_CONVERSION_COMPRESSED,\n\tPOINT_CONVERSION_UNCOMPRESSED,\n\tPOINT_CONVERSION_HYBRID,\n\tdefaultCipherList\n};\nexport default {\n\tconstants,\n\tgetRandomValues,\n\trandomUUID,\n\tsubtle,\n\tCertificate,\n\tCipher,\n\tCipheriv,\n\tDecipher,\n\tDecipheriv,\n\tDiffieHellman,\n\tDiffieHellmanGroup,\n\tECDH,\n\tHash,\n\tHmac,\n\tKeyObject,\n\tSign,\n\tVerify,\n\tX509Certificate,\n\tcheckPrime,\n\tcheckPrimeSync,\n\tcreateCipheriv,\n\tcreateDecipheriv,\n\tcreateDiffieHellman,\n\tcreateDiffieHellmanGroup,\n\tcreateECDH,\n\tcreateHash,\n\tcreateHmac,\n\tcreatePrivateKey,\n\tcreatePublicKey,\n\tcreateSecretKey,\n\tcreateSign,\n\tcreateVerify,\n\tdiffieHellman,\n\tfips,\n\tgenerateKey,\n\tgenerateKeyPair,\n\tgenerateKeyPairSync,\n\tgenerateKeySync,\n\tgeneratePrime,\n\tgeneratePrimeSync,\n\tgetCipherInfo,\n\tgetCiphers,\n\tgetCurves,\n\tgetDiffieHellman,\n\tgetFips,\n\tgetHashes,\n\thash,\n\thkdf,\n\thkdfSync,\n\tpbkdf2,\n\tpbkdf2Sync,\n\tprivateDecrypt,\n\tprivateEncrypt,\n\tpseudoRandomBytes,\n\tpublicDecrypt,\n\tprng,\n\tpublicEncrypt,\n\trandomBytes,\n\trandomFill,\n\trandomFillSync,\n\trandomInt,\n\trng,\n\tscrypt,\n\tscryptSync,\n\tsecureHeapUsed,\n\tsetEngine,\n\tsetFips,\n\tsign,\n\ttimingSafeEqual,\n\tverify,\n\twebcrypto\n};\n", "import {\n Cipher,\n Cipheriv,\n constants,\n createCipher,\n createCipheriv,\n createDecipher,\n createDecipheriv,\n createECDH,\n createSign,\n createVerify,\n Decipher,\n Decipheriv,\n diffieHellman,\n ECDH,\n getCipherInfo,\n hash,\n privateDecrypt,\n privateEncrypt,\n pseudoRandomBytes,\n publicDecrypt,\n publicEncrypt,\n Sign,\n sign,\n webcrypto as unenvCryptoWebcrypto,\n Verify,\n verify\n} from \"unenv/node/crypto\";\nexport {\n Cipher,\n Cipheriv,\n Decipher,\n Decipheriv,\n ECDH,\n Sign,\n Verify,\n constants,\n createCipheriv,\n createDecipheriv,\n createECDH,\n createSign,\n createVerify,\n diffieHellman,\n getCipherInfo,\n hash,\n privateDecrypt,\n privateEncrypt,\n publicDecrypt,\n publicEncrypt,\n sign,\n verify\n} from \"unenv/node/crypto\";\nconst workerdCrypto = process.getBuiltinModule(\"node:crypto\");\nexport const {\n Certificate,\n DiffieHellman,\n DiffieHellmanGroup,\n Hash,\n Hmac,\n KeyObject,\n X509Certificate,\n checkPrime,\n checkPrimeSync,\n createDiffieHellman,\n createDiffieHellmanGroup,\n createHash,\n createHmac,\n createPrivateKey,\n createPublicKey,\n createSecretKey,\n generateKey,\n generateKeyPair,\n generateKeyPairSync,\n generateKeySync,\n generatePrime,\n generatePrimeSync,\n getCiphers,\n getCurves,\n getDiffieHellman,\n getFips,\n getHashes,\n hkdf,\n hkdfSync,\n pbkdf2,\n pbkdf2Sync,\n randomBytes,\n randomFill,\n randomFillSync,\n randomInt,\n randomUUID,\n scrypt,\n scryptSync,\n secureHeapUsed,\n setEngine,\n setFips,\n subtle,\n timingSafeEqual\n} = workerdCrypto;\nexport const getRandomValues = workerdCrypto.getRandomValues.bind(\n workerdCrypto.webcrypto\n);\nexport const webcrypto = {\n // @ts-expect-error unenv has unknown type\n CryptoKey: unenvCryptoWebcrypto.CryptoKey,\n getRandomValues,\n randomUUID,\n subtle\n};\nconst fips = workerdCrypto.fips;\nexport default {\n /**\n * manually unroll unenv-polyfilled-symbols to make it tree-shakeable\n */\n Certificate,\n Cipher,\n Cipheriv,\n Decipher,\n Decipheriv,\n ECDH,\n Sign,\n Verify,\n X509Certificate,\n // @ts-expect-error @types/node is out of date - this is a bug in typings\n constants,\n // @ts-expect-error unenv has unknown type\n createCipheriv,\n // @ts-expect-error unenv has unknown type\n createDecipheriv,\n // @ts-expect-error unenv has unknown type\n createECDH,\n // @ts-expect-error unenv has unknown type\n createSign,\n // @ts-expect-error unenv has unknown type\n createVerify,\n // @ts-expect-error unenv has unknown type\n diffieHellman,\n // @ts-expect-error unenv has unknown type\n getCipherInfo,\n // @ts-expect-error unenv has unknown type\n hash,\n // @ts-expect-error unenv has unknown type\n privateDecrypt,\n // @ts-expect-error unenv has unknown type\n privateEncrypt,\n // @ts-expect-error unenv has unknown type\n publicDecrypt,\n // @ts-expect-error unenv has unknown type\n publicEncrypt,\n scrypt,\n scryptSync,\n // @ts-expect-error unenv has unknown type\n sign,\n // @ts-expect-error unenv has unknown type\n verify,\n // default-only export from unenv\n // @ts-expect-error unenv has unknown type\n createCipher,\n // @ts-expect-error unenv has unknown type\n createDecipher,\n // @ts-expect-error unenv has unknown type\n pseudoRandomBytes,\n /**\n * manually unroll workerd-polyfilled-symbols to make it tree-shakeable\n */\n DiffieHellman,\n DiffieHellmanGroup,\n Hash,\n Hmac,\n KeyObject,\n checkPrime,\n checkPrimeSync,\n createDiffieHellman,\n createDiffieHellmanGroup,\n createHash,\n createHmac,\n createPrivateKey,\n createPublicKey,\n createSecretKey,\n generateKey,\n generateKeyPair,\n generateKeyPairSync,\n generateKeySync,\n generatePrime,\n generatePrimeSync,\n getCiphers,\n getCurves,\n getDiffieHellman,\n getFips,\n getHashes,\n getRandomValues,\n hkdf,\n hkdfSync,\n pbkdf2,\n pbkdf2Sync,\n randomBytes,\n randomFill,\n randomFillSync,\n randomInt,\n randomUUID,\n secureHeapUsed,\n setEngine,\n setFips,\n subtle,\n timingSafeEqual,\n // default-only export from workerd\n fips,\n // special-cased deep merged symbols\n webcrypto\n};\n", "/*\n Copyright (c) 2012 Nevins Bartolomeo \n Copyright (c) 2012 Shane Girish \n Copyright (c) 2025 Daniel Wirtz \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n 3. The name of the author may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// The Node.js crypto module is used as a fallback for the Web Crypto API. When\n// building for the browser, inclusion of the crypto module should be disabled,\n// which the package hints at in its package.json for bundlers that support it.\nimport nodeCrypto from \"crypto\";\n\n/**\n * The random implementation to use as a fallback.\n * @type {?function(number):!Array.}\n * @inner\n */\nvar randomFallback = null;\n\n/**\n * Generates cryptographically secure random bytes.\n * @function\n * @param {number} len Bytes length\n * @returns {!Array.} Random bytes\n * @throws {Error} If no random implementation is available\n * @inner\n */\nfunction randomBytes(len) {\n // Web Crypto API. Globally available in the browser and in Node.js >=23.\n try {\n return crypto.getRandomValues(new Uint8Array(len));\n } catch {}\n // Node.js crypto module for non-browser environments.\n try {\n return nodeCrypto.randomBytes(len);\n } catch {}\n // Custom fallback specified with `setRandomFallback`.\n if (!randomFallback) {\n throw Error(\n \"Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative\",\n );\n }\n return randomFallback(len);\n}\n\n/**\n * Sets the pseudo random number generator to use as a fallback if neither node's `crypto` module nor the Web Crypto\n * API is available. Please note: It is highly important that the PRNG used is cryptographically secure and that it\n * is seeded properly!\n * @param {?function(number):!Array.} random Function taking the number of bytes to generate as its\n * sole argument, returning the corresponding array of cryptographically secure random byte values.\n * @see http://nodejs.org/api/crypto.html\n * @see http://www.w3.org/TR/WebCryptoAPI/\n */\nexport function setRandomFallback(random) {\n randomFallback = random;\n}\n\n/**\n * Synchronously generates a salt.\n * @param {number=} rounds Number of rounds to use, defaults to 10 if omitted\n * @param {number=} seed_length Not supported.\n * @returns {string} Resulting salt\n * @throws {Error} If a random fallback is required but not set\n */\nexport function genSaltSync(rounds, seed_length) {\n rounds = rounds || GENSALT_DEFAULT_LOG2_ROUNDS;\n if (typeof rounds !== \"number\")\n throw Error(\n \"Illegal arguments: \" + typeof rounds + \", \" + typeof seed_length,\n );\n if (rounds < 4) rounds = 4;\n else if (rounds > 31) rounds = 31;\n var salt = [];\n salt.push(\"$2b$\");\n if (rounds < 10) salt.push(\"0\");\n salt.push(rounds.toString());\n salt.push(\"$\");\n salt.push(base64_encode(randomBytes(BCRYPT_SALT_LEN), BCRYPT_SALT_LEN)); // May throw\n return salt.join(\"\");\n}\n\n/**\n * Asynchronously generates a salt.\n * @param {(number|function(Error, string=))=} rounds Number of rounds to use, defaults to 10 if omitted\n * @param {(number|function(Error, string=))=} seed_length Not supported.\n * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting salt\n * @returns {!Promise} If `callback` has been omitted\n * @throws {Error} If `callback` is present but not a function\n */\nexport function genSalt(rounds, seed_length, callback) {\n if (typeof seed_length === \"function\")\n (callback = seed_length), (seed_length = undefined); // Not supported.\n if (typeof rounds === \"function\") (callback = rounds), (rounds = undefined);\n if (typeof rounds === \"undefined\") rounds = GENSALT_DEFAULT_LOG2_ROUNDS;\n else if (typeof rounds !== \"number\")\n throw Error(\"illegal arguments: \" + typeof rounds);\n\n function _async(callback) {\n nextTick(function () {\n // Pretty thin, but salting is fast enough\n try {\n callback(null, genSaltSync(rounds));\n } catch (err) {\n callback(err);\n }\n });\n }\n\n if (callback) {\n if (typeof callback !== \"function\")\n throw Error(\"Illegal callback: \" + typeof callback);\n _async(callback);\n } else\n return new Promise(function (resolve, reject) {\n _async(function (err, res) {\n if (err) {\n reject(err);\n return;\n }\n resolve(res);\n });\n });\n}\n\n/**\n * Synchronously generates a hash for the given password.\n * @param {string} password Password to hash\n * @param {(number|string)=} salt Salt length to generate or salt to use, default to 10\n * @returns {string} Resulting hash\n */\nexport function hashSync(password, salt) {\n if (typeof salt === \"undefined\") salt = GENSALT_DEFAULT_LOG2_ROUNDS;\n if (typeof salt === \"number\") salt = genSaltSync(salt);\n if (typeof password !== \"string\" || typeof salt !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof password + \", \" + typeof salt);\n return _hash(password, salt);\n}\n\n/**\n * Asynchronously generates a hash for the given password.\n * @param {string} password Password to hash\n * @param {number|string} salt Salt length to generate or salt to use\n * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting hash\n * @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed\n * (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.\n * @returns {!Promise} If `callback` has been omitted\n * @throws {Error} If `callback` is present but not a function\n */\nexport function hash(password, salt, callback, progressCallback) {\n function _async(callback) {\n if (typeof password === \"string\" && typeof salt === \"number\")\n genSalt(salt, function (err, salt) {\n _hash(password, salt, callback, progressCallback);\n });\n else if (typeof password === \"string\" && typeof salt === \"string\")\n _hash(password, salt, callback, progressCallback);\n else\n nextTick(\n callback.bind(\n this,\n Error(\"Illegal arguments: \" + typeof password + \", \" + typeof salt),\n ),\n );\n }\n\n if (callback) {\n if (typeof callback !== \"function\")\n throw Error(\"Illegal callback: \" + typeof callback);\n _async(callback);\n } else\n return new Promise(function (resolve, reject) {\n _async(function (err, res) {\n if (err) {\n reject(err);\n return;\n }\n resolve(res);\n });\n });\n}\n\n/**\n * Compares two strings of the same length in constant time.\n * @param {string} known Must be of the correct length\n * @param {string} unknown Must be the same length as `known`\n * @returns {boolean}\n * @inner\n */\nfunction safeStringCompare(known, unknown) {\n var diff = known.length ^ unknown.length;\n for (var i = 0; i < known.length; ++i) {\n diff |= known.charCodeAt(i) ^ unknown.charCodeAt(i);\n }\n return diff === 0;\n}\n\n/**\n * Synchronously tests a password against a hash.\n * @param {string} password Password to compare\n * @param {string} hash Hash to test against\n * @returns {boolean} true if matching, otherwise false\n * @throws {Error} If an argument is illegal\n */\nexport function compareSync(password, hash) {\n if (typeof password !== \"string\" || typeof hash !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof password + \", \" + typeof hash);\n if (hash.length !== 60) return false;\n return safeStringCompare(\n hashSync(password, hash.substring(0, hash.length - 31)),\n hash,\n );\n}\n\n/**\n * Asynchronously tests a password against a hash.\n * @param {string} password Password to compare\n * @param {string} hashValue Hash to test against\n * @param {function(Error, boolean)=} callback Callback receiving the error, if any, otherwise the result\n * @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed\n * (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.\n * @returns {!Promise} If `callback` has been omitted\n * @throws {Error} If `callback` is present but not a function\n */\nexport function compare(password, hashValue, callback, progressCallback) {\n function _async(callback) {\n if (typeof password !== \"string\" || typeof hashValue !== \"string\") {\n nextTick(\n callback.bind(\n this,\n Error(\n \"Illegal arguments: \" + typeof password + \", \" + typeof hashValue,\n ),\n ),\n );\n return;\n }\n if (hashValue.length !== 60) {\n nextTick(callback.bind(this, null, false));\n return;\n }\n hash(\n password,\n hashValue.substring(0, 29),\n function (err, comp) {\n if (err) callback(err);\n else callback(null, safeStringCompare(comp, hashValue));\n },\n progressCallback,\n );\n }\n\n if (callback) {\n if (typeof callback !== \"function\")\n throw Error(\"Illegal callback: \" + typeof callback);\n _async(callback);\n } else\n return new Promise(function (resolve, reject) {\n _async(function (err, res) {\n if (err) {\n reject(err);\n return;\n }\n resolve(res);\n });\n });\n}\n\n/**\n * Gets the number of rounds used to encrypt the specified hash.\n * @param {string} hash Hash to extract the used number of rounds from\n * @returns {number} Number of rounds used\n * @throws {Error} If `hash` is not a string\n */\nexport function getRounds(hash) {\n if (typeof hash !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof hash);\n return parseInt(hash.split(\"$\")[2], 10);\n}\n\n/**\n * Gets the salt portion from a hash. Does not validate the hash.\n * @param {string} hash Hash to extract the salt from\n * @returns {string} Extracted salt part\n * @throws {Error} If `hash` is not a string or otherwise invalid\n */\nexport function getSalt(hash) {\n if (typeof hash !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof hash);\n if (hash.length !== 60)\n throw Error(\"Illegal hash length: \" + hash.length + \" != 60\");\n return hash.substring(0, 29);\n}\n\n/**\n * Tests if a password will be truncated when hashed, that is its length is\n * greater than 72 bytes when converted to UTF-8.\n * @param {string} password The password to test\n * @returns {boolean} `true` if truncated, otherwise `false`\n */\nexport function truncates(password) {\n if (typeof password !== \"string\")\n throw Error(\"Illegal arguments: \" + typeof password);\n return utf8Length(password) > 72;\n}\n\n/**\n * Continues with the callback after yielding to the event loop.\n * @function\n * @param {function(...[*])} callback Callback to execute\n * @inner\n */\nvar nextTick =\n typeof setImmediate === \"function\"\n ? setImmediate\n : typeof scheduler === \"object\" && typeof scheduler.postTask === \"function\"\n ? scheduler.postTask.bind(scheduler)\n : setTimeout;\n\n/** Calculates the byte length of a string encoded as UTF8. */\nfunction utf8Length(string) {\n var len = 0,\n c = 0;\n for (var i = 0; i < string.length; ++i) {\n c = string.charCodeAt(i);\n if (c < 128) len += 1;\n else if (c < 2048) len += 2;\n else if (\n (c & 0xfc00) === 0xd800 &&\n (string.charCodeAt(i + 1) & 0xfc00) === 0xdc00\n ) {\n ++i;\n len += 4;\n } else len += 3;\n }\n return len;\n}\n\n/** Converts a string to an array of UTF8 bytes. */\nfunction utf8Array(string) {\n var offset = 0,\n c1,\n c2;\n var buffer = new Array(utf8Length(string));\n for (var i = 0, k = string.length; i < k; ++i) {\n c1 = string.charCodeAt(i);\n if (c1 < 128) {\n buffer[offset++] = c1;\n } else if (c1 < 2048) {\n buffer[offset++] = (c1 >> 6) | 192;\n buffer[offset++] = (c1 & 63) | 128;\n } else if (\n (c1 & 0xfc00) === 0xd800 &&\n ((c2 = string.charCodeAt(i + 1)) & 0xfc00) === 0xdc00\n ) {\n c1 = 0x10000 + ((c1 & 0x03ff) << 10) + (c2 & 0x03ff);\n ++i;\n buffer[offset++] = (c1 >> 18) | 240;\n buffer[offset++] = ((c1 >> 12) & 63) | 128;\n buffer[offset++] = ((c1 >> 6) & 63) | 128;\n buffer[offset++] = (c1 & 63) | 128;\n } else {\n buffer[offset++] = (c1 >> 12) | 224;\n buffer[offset++] = ((c1 >> 6) & 63) | 128;\n buffer[offset++] = (c1 & 63) | 128;\n }\n }\n return buffer;\n}\n\n// A base64 implementation for the bcrypt algorithm. This is partly non-standard.\n\n/**\n * bcrypt's own non-standard base64 dictionary.\n * @type {!Array.}\n * @const\n * @inner\n **/\nvar BASE64_CODE =\n \"./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\".split(\"\");\n\n/**\n * @type {!Array.}\n * @const\n * @inner\n **/\nvar BASE64_INDEX = [\n -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,\n -1, -1, -1, -1, -1, -1, -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, 28,\n 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,\n 48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1,\n];\n\n/**\n * Encodes a byte array to base64 with up to len bytes of input.\n * @param {!Array.} b Byte array\n * @param {number} len Maximum input length\n * @returns {string}\n * @inner\n */\nfunction base64_encode(b, len) {\n var off = 0,\n rs = [],\n c1,\n c2;\n if (len <= 0 || len > b.length) throw Error(\"Illegal len: \" + len);\n while (off < len) {\n c1 = b[off++] & 0xff;\n rs.push(BASE64_CODE[(c1 >> 2) & 0x3f]);\n c1 = (c1 & 0x03) << 4;\n if (off >= len) {\n rs.push(BASE64_CODE[c1 & 0x3f]);\n break;\n }\n c2 = b[off++] & 0xff;\n c1 |= (c2 >> 4) & 0x0f;\n rs.push(BASE64_CODE[c1 & 0x3f]);\n c1 = (c2 & 0x0f) << 2;\n if (off >= len) {\n rs.push(BASE64_CODE[c1 & 0x3f]);\n break;\n }\n c2 = b[off++] & 0xff;\n c1 |= (c2 >> 6) & 0x03;\n rs.push(BASE64_CODE[c1 & 0x3f]);\n rs.push(BASE64_CODE[c2 & 0x3f]);\n }\n return rs.join(\"\");\n}\n\n/**\n * Decodes a base64 encoded string to up to len bytes of output.\n * @param {string} s String to decode\n * @param {number} len Maximum output length\n * @returns {!Array.}\n * @inner\n */\nfunction base64_decode(s, len) {\n var off = 0,\n slen = s.length,\n olen = 0,\n rs = [],\n c1,\n c2,\n c3,\n c4,\n o,\n code;\n if (len <= 0) throw Error(\"Illegal len: \" + len);\n while (off < slen - 1 && olen < len) {\n code = s.charCodeAt(off++);\n c1 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;\n code = s.charCodeAt(off++);\n c2 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;\n if (c1 == -1 || c2 == -1) break;\n o = (c1 << 2) >>> 0;\n o |= (c2 & 0x30) >> 4;\n rs.push(String.fromCharCode(o));\n if (++olen >= len || off >= slen) break;\n code = s.charCodeAt(off++);\n c3 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;\n if (c3 == -1) break;\n o = ((c2 & 0x0f) << 4) >>> 0;\n o |= (c3 & 0x3c) >> 2;\n rs.push(String.fromCharCode(o));\n if (++olen >= len || off >= slen) break;\n code = s.charCodeAt(off++);\n c4 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1;\n o = ((c3 & 0x03) << 6) >>> 0;\n o |= c4;\n rs.push(String.fromCharCode(o));\n ++olen;\n }\n var res = [];\n for (off = 0; off < olen; off++) res.push(rs[off].charCodeAt(0));\n return res;\n}\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar BCRYPT_SALT_LEN = 16;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar GENSALT_DEFAULT_LOG2_ROUNDS = 10;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar BLOWFISH_NUM_ROUNDS = 16;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar MAX_EXECUTION_TIME = 100;\n\n/**\n * @type {Array.}\n * @const\n * @inner\n */\nvar P_ORIG = [\n 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, 0x299f31d0,\n 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,\n 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, 0x9216d5d9, 0x8979fb1b,\n];\n\n/**\n * @type {Array.}\n * @const\n * @inner\n */\nvar S_ORIG = [\n 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, 0xb8e1afed, 0x6a267e96,\n 0xba7c9045, 0xf12c7f99, 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16,\n 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, 0x0d95748f, 0x728eb658,\n 0x718bcd58, 0x82154aee, 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,\n 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, 0x8e79dcb0, 0x603a180e,\n 0x6c9e0e8b, 0xb01e8a3e, 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,\n 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, 0x55ca396a, 0x2aab10b6,\n 0xb4cc5c34, 0x1141e8ce, 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,\n 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, 0xafd6ba33, 0x6c24cf5c,\n 0x7a325381, 0x28958677, 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,\n 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, 0xef845d5d, 0xe98575b1,\n 0xdc262302, 0xeb651b88, 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,\n 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, 0x21c66842, 0xf6e96c9a,\n 0x670c9c61, 0xabd388f0, 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3,\n 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, 0xa1f1651d, 0x39af0176,\n 0x66ca593e, 0x82430e88, 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,\n 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, 0x4ed3aa62, 0x363f7706,\n 0x1bfedf72, 0x429b023d, 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,\n 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, 0xe3fe501a, 0xb6794c3b,\n 0x976ce0bd, 0x04c006ba, 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,\n 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, 0x6dfc511f, 0x9b30952c,\n 0xcc814544, 0xaf5ebd09, 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3,\n 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, 0x5579c0bd, 0x1a60320a,\n 0xd6a100c6, 0x402c7279, 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,\n 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, 0x323db5fa, 0xfd238760,\n 0x53317b48, 0x3e00df82, 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db,\n 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, 0x695b27b0, 0xbbca58c8,\n 0xe1ffa35d, 0xb8f011a0, 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b,\n 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, 0xe1ddf2da, 0xa4cb7e33,\n 0x62fb1341, 0xcee4c6e8, 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,\n 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, 0xd08ed1d0, 0xafc725e0,\n 0x8e3c5b2f, 0x8e7594b7, 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c,\n 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, 0x2f2f2218, 0xbe0e1777,\n 0xea752dfe, 0x8b021fa1, 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299,\n 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, 0x165fa266, 0x80957705,\n 0x93cc7314, 0x211a1477, 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,\n 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, 0x00250e2d, 0x2071b35e,\n 0x226800bb, 0x57b8e0af, 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa,\n 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, 0x83260376, 0x6295cfa9,\n 0x11c81968, 0x4e734a41, 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,\n 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, 0x08ba6fb5, 0x571be91f,\n 0xf296ec6b, 0x2a0dd915, 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664,\n 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a, 0x4b7a70e9, 0xb5b32944,\n 0xdb75092e, 0xc4192623, 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266,\n 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, 0x193602a5, 0x75094c29,\n 0xa0591340, 0xe4183a3e, 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6,\n 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, 0x4cdd2086, 0x8470eb26,\n 0x6382e9c6, 0x021ecc5e, 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1,\n 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, 0x3e07841c, 0x7fdeae5c,\n 0x8e7d44ec, 0x5716f2b8, 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff,\n 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, 0xd19113f9, 0x7ca92ff6,\n 0x94324773, 0x22f54701, 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7,\n 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, 0xe238cd99, 0x3bea0e2f,\n 0x3280bba1, 0x183eb331, 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf,\n 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, 0xde9a771f, 0xd9930810,\n 0xb38bae12, 0xdccf3f2e, 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87,\n 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, 0xec7aec3a, 0xdb851dfa,\n 0x63094366, 0xc464c3d2, 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16,\n 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, 0x71dff89e, 0x10314e55,\n 0x81ac77d6, 0x5f11199b, 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,\n 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, 0x86e34570, 0xeae96fb1,\n 0x860e5e0a, 0x5a3e2ab3, 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f,\n 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, 0xc6150eba, 0x94e2ea78,\n 0xa5fc3c53, 0x1e0a2df4, 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960,\n 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, 0xe3bc4595, 0xa67bc883,\n 0xb17f37d1, 0x018cff28, 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802,\n 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, 0x1521b628, 0x29076170,\n 0xecdd4775, 0x619f1510, 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf,\n 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, 0xeecc86bc, 0x60622ca7,\n 0x9cab5cab, 0xb2f3846e, 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50,\n 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, 0x9b540b19, 0x875fa099,\n 0x95f7997e, 0x623d7da8, 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281,\n 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, 0x57f584a5, 0x1b227263,\n 0x9b83c3ff, 0x1ac24696, 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128,\n 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, 0x5d4a14d9, 0xe864b7e3,\n 0x42105d14, 0x203e13e0, 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0,\n 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, 0xd81e799e, 0x86854dc7,\n 0xe44b476a, 0x3d816250, 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3,\n 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, 0x095bbf00, 0xad19489d,\n 0x1462b174, 0x23820e00, 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061,\n 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, 0x7cde3759, 0xcbee7460,\n 0x4085f2a7, 0xce77326e, 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735,\n 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, 0x9e447a2e, 0xc3453484,\n 0xfdd56705, 0x0e1e9ec9, 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340,\n 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, 0x153e21e7, 0x8fb03d4a,\n 0xe6e39f2b, 0xdb83adf7, 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934,\n 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, 0xd4082471, 0x3320f46a,\n 0x43b7d4b7, 0x500061af, 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840,\n 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, 0xbfbc09ec, 0x03bd9785,\n 0x7fac6dd0, 0x31cb8504, 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,\n 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, 0x68dc1462, 0xd7486900,\n 0x680ec0a4, 0x27a18dee, 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6,\n 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, 0x20fe9e35, 0xd9f385b9,\n 0xee39d7ab, 0x3b124e8b, 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2,\n 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, 0xfb0af54e, 0xd8feb397,\n 0x454056ac, 0xba489527, 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b,\n 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, 0xa62a4a56, 0x3f3125f9,\n 0x5ef47e1c, 0x9029317c, 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3,\n 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, 0x07f9c9ee, 0x41041f0f,\n 0x404779a4, 0x5d886e17, 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564,\n 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, 0x0e12b4c2, 0x02e1329e,\n 0xaf664fd1, 0xcad18115, 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922,\n 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, 0xd0127845, 0x95b794fd,\n 0x647d0862, 0xe7ccf5f0, 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e,\n 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, 0xa812dc60, 0xa1ebddf8,\n 0x991be14c, 0xdb6e6b0d, 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804,\n 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, 0x667b9ffb, 0xcedb7d9c,\n 0xa091cf0b, 0xd9155ea3, 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb,\n 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, 0x6842ada7, 0xc66a2b3b,\n 0x12754ccc, 0x782ef11c, 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350,\n 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, 0x44421659, 0x0a121386,\n 0xd90cec6e, 0xd5abea2a, 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe,\n 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, 0xd1fd8346, 0xf6381fb0,\n 0x7745ae04, 0xd736fccc, 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f,\n 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, 0x4e58f48f, 0xf2ddfda2,\n 0xf474ef38, 0x8789bdc2, 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9,\n 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, 0x466e598e, 0x20b45770,\n 0x8cd55591, 0xc902de4c, 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e,\n 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, 0xe85a1f02, 0x09f0be8c,\n 0x4a99a025, 0x1d6efe10, 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,\n 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, 0x50115e01, 0xa70683fa,\n 0xa002b5c4, 0x0de6d027, 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5,\n 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, 0x11e69ed7, 0x2338ea63,\n 0x53c2dd94, 0xc2c21634, 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76,\n 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, 0x86e3725f, 0x724d9db9,\n 0x1ac15bb4, 0xd39eb8fc, 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4,\n 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, 0x6fd5c7e7, 0x56e14ec4,\n 0x362abfce, 0xddc6c837, 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0,\n 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, 0x5cb0679e, 0x4fa33742,\n 0xd3822740, 0x99bc9bbe, 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,\n 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, 0x5748ab2f, 0xbc946e79,\n 0xc6a376d2, 0x6549c2c8, 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,\n 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, 0xa1fad5f0, 0x6a2d519a,\n 0x63ef8ce2, 0x9a86ee22, 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4,\n 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, 0x2826a2f9, 0xa73a3ae1,\n 0x4ba99586, 0xef5562e9, 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59,\n 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, 0xe990fd5a, 0x9e34d797,\n 0x2cf0b7d9, 0x022b8b51, 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28,\n 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, 0xe029ac71, 0xe019a5e6,\n 0x47b0acfd, 0xed93fa9b, 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,\n 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, 0x15056dd4, 0x88f46dba,\n 0x03a16125, 0x0564f0bd, 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a,\n 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, 0x7533d928, 0xb155fdf5,\n 0x03563482, 0x8aba3cbb, 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,\n 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, 0xea7a90c2, 0xfb3e7bce,\n 0x5121ce64, 0x774fbe32, 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680,\n 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, 0xb39a460a, 0x6445c0dd,\n 0x586cdecf, 0x1c20c8ae, 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb,\n 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, 0x72eacea8, 0xfa6484bb,\n 0x8d6612ae, 0xbf3c6f47, 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,\n 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, 0x4040cb08, 0x4eb4e2cc,\n 0x34d2466a, 0x0115af84, 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048,\n 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, 0x611560b1, 0xe7933fdc,\n 0xbb3a792b, 0x344525bd, 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9,\n 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, 0x1a908749, 0xd44fbd9a,\n 0xd0dadecb, 0xd50ada38, 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,\n 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, 0xbf97222c, 0x15e6fc2a,\n 0x0f91fc71, 0x9b941525, 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1,\n 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, 0xe0ec6e0e, 0x1698db3b,\n 0x4c98a0be, 0x3278e964, 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,\n 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, 0xdf359f8d, 0x9b992f2e,\n 0xe60b6f47, 0x0fe3f11d, 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f,\n 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, 0xf523f357, 0xa6327623,\n 0x93a83531, 0x56cccd02, 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc,\n 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, 0xe6c6c7bd, 0x327a140a,\n 0x45e1d006, 0xc3f27b9a, 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6,\n 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, 0x53113ec0, 0x1640e3d3,\n 0x38abbd60, 0x2547adf0, 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,\n 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, 0x1948c25c, 0x02fb8a8c,\n 0x01c36ae4, 0xd6ebe1f9, 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,\n 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6,\n];\n\n/**\n * @type {Array.}\n * @const\n * @inner\n */\nvar C_ORIG = [\n 0x4f727068, 0x65616e42, 0x65686f6c, 0x64657253, 0x63727944, 0x6f756274,\n];\n\n/**\n * @param {Array.} lr\n * @param {number} off\n * @param {Array.} P\n * @param {Array.} S\n * @returns {Array.}\n * @inner\n */\nfunction _encipher(lr, off, P, S) {\n // This is our bottleneck: 1714/1905 ticks / 90% - see profile.txt\n var n,\n l = lr[off],\n r = lr[off + 1];\n\n l ^= P[0];\n\n /*\n for (var i=0, k=BLOWFISH_NUM_ROUNDS-2; i<=k;)\n // Feistel substitution on left word\n n = S[l >>> 24],\n n += S[0x100 | ((l >> 16) & 0xff)],\n n ^= S[0x200 | ((l >> 8) & 0xff)],\n n += S[0x300 | (l & 0xff)],\n r ^= n ^ P[++i],\n // Feistel substitution on right word\n n = S[r >>> 24],\n n += S[0x100 | ((r >> 16) & 0xff)],\n n ^= S[0x200 | ((r >> 8) & 0xff)],\n n += S[0x300 | (r & 0xff)],\n l ^= n ^ P[++i];\n */\n\n //The following is an unrolled version of the above loop.\n //Iteration 0\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[1];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[2];\n //Iteration 1\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[3];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[4];\n //Iteration 2\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[5];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[6];\n //Iteration 3\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[7];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[8];\n //Iteration 4\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[9];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[10];\n //Iteration 5\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[11];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[12];\n //Iteration 6\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[13];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[14];\n //Iteration 7\n n = S[l >>> 24];\n n += S[0x100 | ((l >> 16) & 0xff)];\n n ^= S[0x200 | ((l >> 8) & 0xff)];\n n += S[0x300 | (l & 0xff)];\n r ^= n ^ P[15];\n n = S[r >>> 24];\n n += S[0x100 | ((r >> 16) & 0xff)];\n n ^= S[0x200 | ((r >> 8) & 0xff)];\n n += S[0x300 | (r & 0xff)];\n l ^= n ^ P[16];\n\n lr[off] = r ^ P[BLOWFISH_NUM_ROUNDS + 1];\n lr[off + 1] = l;\n return lr;\n}\n\n/**\n * @param {Array.} data\n * @param {number} offp\n * @returns {{key: number, offp: number}}\n * @inner\n */\nfunction _streamtoword(data, offp) {\n for (var i = 0, word = 0; i < 4; ++i)\n (word = (word << 8) | (data[offp] & 0xff)),\n (offp = (offp + 1) % data.length);\n return { key: word, offp: offp };\n}\n\n/**\n * @param {Array.} key\n * @param {Array.} P\n * @param {Array.} S\n * @inner\n */\nfunction _key(key, P, S) {\n var offset = 0,\n lr = [0, 0],\n plen = P.length,\n slen = S.length,\n sw;\n for (var i = 0; i < plen; i++)\n (sw = _streamtoword(key, offset)),\n (offset = sw.offp),\n (P[i] = P[i] ^ sw.key);\n for (i = 0; i < plen; i += 2)\n (lr = _encipher(lr, 0, P, S)), (P[i] = lr[0]), (P[i + 1] = lr[1]);\n for (i = 0; i < slen; i += 2)\n (lr = _encipher(lr, 0, P, S)), (S[i] = lr[0]), (S[i + 1] = lr[1]);\n}\n\n/**\n * Expensive key schedule Blowfish.\n * @param {Array.} data\n * @param {Array.} key\n * @param {Array.} P\n * @param {Array.} S\n * @inner\n */\nfunction _ekskey(data, key, P, S) {\n var offp = 0,\n lr = [0, 0],\n plen = P.length,\n slen = S.length,\n sw;\n for (var i = 0; i < plen; i++)\n (sw = _streamtoword(key, offp)), (offp = sw.offp), (P[i] = P[i] ^ sw.key);\n offp = 0;\n for (i = 0; i < plen; i += 2)\n (sw = _streamtoword(data, offp)),\n (offp = sw.offp),\n (lr[0] ^= sw.key),\n (sw = _streamtoword(data, offp)),\n (offp = sw.offp),\n (lr[1] ^= sw.key),\n (lr = _encipher(lr, 0, P, S)),\n (P[i] = lr[0]),\n (P[i + 1] = lr[1]);\n for (i = 0; i < slen; i += 2)\n (sw = _streamtoword(data, offp)),\n (offp = sw.offp),\n (lr[0] ^= sw.key),\n (sw = _streamtoword(data, offp)),\n (offp = sw.offp),\n (lr[1] ^= sw.key),\n (lr = _encipher(lr, 0, P, S)),\n (S[i] = lr[0]),\n (S[i + 1] = lr[1]);\n}\n\n/**\n * Internaly crypts a string.\n * @param {Array.} b Bytes to crypt\n * @param {Array.} salt Salt bytes to use\n * @param {number} rounds Number of rounds\n * @param {function(Error, Array.=)=} callback Callback receiving the error, if any, and the resulting bytes. If\n * omitted, the operation will be performed synchronously.\n * @param {function(number)=} progressCallback Callback called with the current progress\n * @returns {!Array.|undefined} Resulting bytes if callback has been omitted, otherwise `undefined`\n * @inner\n */\nfunction _crypt(b, salt, rounds, callback, progressCallback) {\n var cdata = C_ORIG.slice(),\n clen = cdata.length,\n err;\n\n // Validate\n if (rounds < 4 || rounds > 31) {\n err = Error(\"Illegal number of rounds (4-31): \" + rounds);\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n if (salt.length !== BCRYPT_SALT_LEN) {\n err = Error(\n \"Illegal salt length: \" + salt.length + \" != \" + BCRYPT_SALT_LEN,\n );\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n rounds = (1 << rounds) >>> 0;\n\n var P,\n S,\n i = 0,\n j;\n\n //Use typed arrays when available - huge speedup!\n if (typeof Int32Array === \"function\") {\n P = new Int32Array(P_ORIG);\n S = new Int32Array(S_ORIG);\n } else {\n P = P_ORIG.slice();\n S = S_ORIG.slice();\n }\n\n _ekskey(salt, b, P, S);\n\n /**\n * Calcualtes the next round.\n * @returns {Array.|undefined} Resulting array if callback has been omitted, otherwise `undefined`\n * @inner\n */\n function next() {\n if (progressCallback) progressCallback(i / rounds);\n if (i < rounds) {\n var start = Date.now();\n for (; i < rounds; ) {\n i = i + 1;\n _key(b, P, S);\n _key(salt, P, S);\n if (Date.now() - start > MAX_EXECUTION_TIME) break;\n }\n } else {\n for (i = 0; i < 64; i++)\n for (j = 0; j < clen >> 1; j++) _encipher(cdata, j << 1, P, S);\n var ret = [];\n for (i = 0; i < clen; i++)\n ret.push(((cdata[i] >> 24) & 0xff) >>> 0),\n ret.push(((cdata[i] >> 16) & 0xff) >>> 0),\n ret.push(((cdata[i] >> 8) & 0xff) >>> 0),\n ret.push((cdata[i] & 0xff) >>> 0);\n if (callback) {\n callback(null, ret);\n return;\n } else return ret;\n }\n if (callback) nextTick(next);\n }\n\n // Async\n if (typeof callback !== \"undefined\") {\n next();\n\n // Sync\n } else {\n var res;\n while (true) if (typeof (res = next()) !== \"undefined\") return res || [];\n }\n}\n\n/**\n * Internally hashes a password.\n * @param {string} password Password to hash\n * @param {?string} salt Salt to use, actually never null\n * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting hash. If omitted,\n * hashing is performed synchronously.\n * @param {function(number)=} progressCallback Callback called with the current progress\n * @returns {string|undefined} Resulting hash if callback has been omitted, otherwise `undefined`\n * @inner\n */\nfunction _hash(password, salt, callback, progressCallback) {\n var err;\n if (typeof password !== \"string\" || typeof salt !== \"string\") {\n err = Error(\"Invalid string / salt: Not a string\");\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n\n // Validate the salt\n var minor, offset;\n if (salt.charAt(0) !== \"$\" || salt.charAt(1) !== \"2\") {\n err = Error(\"Invalid salt version: \" + salt.substring(0, 2));\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n if (salt.charAt(2) === \"$\") (minor = String.fromCharCode(0)), (offset = 3);\n else {\n minor = salt.charAt(2);\n if (\n (minor !== \"a\" && minor !== \"b\" && minor !== \"y\") ||\n salt.charAt(3) !== \"$\"\n ) {\n err = Error(\"Invalid salt revision: \" + salt.substring(2, 4));\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n offset = 4;\n }\n\n // Extract number of rounds\n if (salt.charAt(offset + 2) > \"$\") {\n err = Error(\"Missing salt rounds\");\n if (callback) {\n nextTick(callback.bind(this, err));\n return;\n } else throw err;\n }\n var r1 = parseInt(salt.substring(offset, offset + 1), 10) * 10,\n r2 = parseInt(salt.substring(offset + 1, offset + 2), 10),\n rounds = r1 + r2,\n real_salt = salt.substring(offset + 3, offset + 25);\n password += minor >= \"a\" ? \"\\x00\" : \"\";\n\n var passwordb = utf8Array(password),\n saltb = base64_decode(real_salt, BCRYPT_SALT_LEN);\n\n /**\n * Finishes hashing.\n * @param {Array.} bytes Byte array\n * @returns {string}\n * @inner\n */\n function finish(bytes) {\n var res = [];\n res.push(\"$2\");\n if (minor >= \"a\") res.push(minor);\n res.push(\"$\");\n if (rounds < 10) res.push(\"0\");\n res.push(rounds.toString());\n res.push(\"$\");\n res.push(base64_encode(saltb, saltb.length));\n res.push(base64_encode(bytes, C_ORIG.length * 4 - 1));\n return res.join(\"\");\n }\n\n // Sync\n if (typeof callback == \"undefined\")\n return finish(_crypt(passwordb, saltb, rounds));\n // Async\n else {\n _crypt(\n passwordb,\n saltb,\n rounds,\n function (err, bytes) {\n if (err) callback(err, null);\n else callback(null, finish(bytes));\n },\n progressCallback,\n );\n }\n}\n\n/**\n * Encodes a byte array to base64 with up to len bytes of input, using the custom bcrypt alphabet.\n * @function\n * @param {!Array.} bytes Byte array\n * @param {number} length Maximum input length\n * @returns {string}\n */\nexport function encodeBase64(bytes, length) {\n return base64_encode(bytes, length);\n}\n\n/**\n * Decodes a base64 encoded string to up to len bytes of output, using the custom bcrypt alphabet.\n * @function\n * @param {string} string String to decode\n * @param {number} length Maximum output length\n * @returns {!Array.}\n */\nexport function decodeBase64(string, length) {\n return base64_decode(string, length);\n}\n\nexport default {\n setRandomFallback,\n genSaltSync,\n genSalt,\n hashSync,\n hash,\n compareSync,\n compare,\n getRounds,\n getSalt,\n truncates,\n encodeBase64,\n decodeBase64,\n};\n", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport bcrypt from 'bcryptjs';\nimport { SignJWT } from 'jose';\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter';\nimport { ApiError } from '@/src/lib/api-error'\nimport {\n getStaffUserByName,\n getAllStaff,\n getAllUsers,\n getUserWithDetails,\n upsertUserSuspension,\n checkStaffUserExists,\n checkStaffRoleExists,\n createStaffUser,\n getAllRoles,\n} from '@/src/dbService'\nimport type { StaffUser, StaffRole } from '@packages/shared'\n\nexport const staffUserRouter = router({\n login: publicProcedure\n .input(z.object({\n name: z.string(),\n password: z.string(),\n }))\n .mutation(async ({ input }) => {\n const { name, password } = input;\n\n if (!name || !password) {\n throw new ApiError('Name and password are required', 400);\n }\n\n const staff = await getStaffUserByName(name);\n\n if (!staff) {\n throw new ApiError('Invalid credentials', 401);\n }\n\n const isPasswordValid = await bcrypt.compare(password, staff.password);\n if (!isPasswordValid) {\n throw new ApiError('Invalid credentials', 401);\n }\n\n const token = await new SignJWT({ staffId: staff.id, name: staff.name })\n .setProtectedHeader({ alg: 'HS256' })\n .setExpirationTime('30d')\n .sign(getEncodedJwtSecret());\n\n return {\n message: 'Login successful',\n token,\n staff: { id: staff.id, name: staff.name },\n };\n }),\n\n getStaff: protectedProcedure\n .query(async ({ ctx }) => {\n const staff = await getAllStaff();\n\n // Transform the data to include role and permissions in a cleaner format\n const transformedStaff = staff.map((user) => ({\n id: user.id,\n name: user.name,\n role: user.role ? {\n id: user.role.id,\n name: user.role.roleName,\n } : null,\n permissions: user.role?.rolePermissions.map((rp: any) => ({\n id: rp.permission.id,\n name: rp.permission.permissionName,\n })) || [],\n }));\n\n return {\n staff: transformedStaff,\n };\n }),\n\n getUsers: protectedProcedure\n .input(z.object({\n cursor: z.number().optional(),\n limit: z.number().default(20),\n search: z.string().optional(),\n }))\n .query(async ({ input }) => {\n const { cursor, limit, search } = input;\n\n const { users: usersToReturn, hasMore } = await getAllUsers(cursor, limit, search);\n\n const formattedUsers = usersToReturn.map((user: any) => ({\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n image: user.userDetails?.profileImage || null,\n }));\n\n return {\n users: formattedUsers,\n nextCursor: hasMore ? usersToReturn[usersToReturn.length - 1].id : undefined,\n };\n }),\n\n getUserDetails: protectedProcedure\n .input(z.object({ userId: z.number() }))\n .query(async ({ input }) => {\n const { userId } = input;\n\n const user = await getUserWithDetails(userId);\n\n if (!user) {\n throw new ApiError(\"User not found\", 404);\n }\n\n const lastOrder = user.orders[0];\n\n return {\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n addedOn: user.createdAt,\n lastOrdered: lastOrder?.createdAt || null,\n isSuspended: user.userDetails?.isSuspended || false,\n };\n }),\n\n updateUserSuspension: protectedProcedure\n .input(z.object({ userId: z.number(), isSuspended: z.boolean() }))\n .mutation(async ({ input }) => {\n const { userId, isSuspended } = input;\n\n await upsertUserSuspension(userId, isSuspended);\n\n return { success: true };\n }),\n\n createStaffUser: protectedProcedure\n .input(z.object({\n name: z.string().min(1, 'Name is required'),\n password: z.string().min(6, 'Password must be at least 6 characters'),\n roleId: z.number().int().positive('Role is required'),\n }))\n .mutation(async ({ input, ctx }) => {\n const { name, password, roleId } = input;\n\n // Check if staff user already exists\n const existingUser = await checkStaffUserExists(name);\n\n if (existingUser) {\n throw new ApiError('Staff user with this name already exists', 409);\n }\n\n // Check if role exists\n const roleExists = await checkStaffRoleExists(roleId);\n\n if (!roleExists) {\n throw new ApiError('Invalid role selected', 400);\n }\n\n // Hash password\n const hashedPassword = await bcrypt.hash(password, 12);\n\n // Create staff user\n const newUser = await createStaffUser(name, hashedPassword, roleId);\n\n return { success: true, user: { id: newUser.id, name: newUser.name } };\n }),\n\n getRoles: protectedProcedure\n .query(async ({ ctx }) => {\n const roles = await getAllRoles();\n\n return {\n roles: roles.map((role: any) => ({\n id: role.id,\n name: role.roleName,\n })),\n };\n }),\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport { ApiError } from '@/src/lib/api-error'\nimport { extractKeyFromPresignedUrl, deleteImageUtil, generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport { scheduleStoreInitialization } from '@/src/stores/store-initializer'\nimport {\n getAllStores as getAllStoresFromDb,\n getStoreById as getStoreByIdFromDb,\n createStore as createStoreInDb,\n updateStore as updateStoreInDb,\n deleteStore as deleteStoreFromDb,\n} from '@/src/dbService'\nimport type { Store } from '@packages/shared'\n\nexport const storeRouter = router({\n getStores: protectedProcedure\n .query(async ({ ctx }): Promise<{ stores: any[]; count: number }> => {\n const stores = await getAllStoresFromDb();\n\n await Promise.all(stores.map(async store => {\n if(store.imageUrl)\n store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl)\n })).catch((e) => {\n throw new ApiError(\"Unable to find store image urls\")\n })\n\n return {\n stores,\n count: stores.length,\n };\n }),\n\n getStoreById: protectedProcedure\n .input(z.object({\n id: z.number(),\n }))\n .query(async ({ input, ctx }): Promise<{ store: any }> => {\n const { id } = input;\n\n const store = await getStoreByIdFromDb(id);\n\n if (!store) {\n throw new ApiError(\"Store not found\", 404);\n }\n store.imageUrl = await generateSignedUrlFromS3Url(store.imageUrl);\n return {\n store,\n };\n }),\n\n createStore: protectedProcedure\n .input(z.object({\n name: z.string().min(1, \"Name is required\"),\n description: z.string().optional(),\n imageUrl: z.string().optional(),\n owner: z.number().min(1, \"Owner is required\"),\n products: z.array(z.number()).optional(),\n }))\n .mutation(async ({ input, ctx }): Promise<{ store: Store; message: string }> => {\n const { name, description, imageUrl, owner, products } = input;\n\n const imageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : undefined;\n\n const newStore = await createStoreInDb(\n {\n name,\n description,\n imageUrl: imageKey,\n owner,\n },\n products\n );\n\n /*\n // Old implementation - direct DB query:\n const [newStore] = await db\n .insert(storeInfo)\n .values({\n name,\n description,\n imageUrl: imageKey,\n owner,\n })\n .returning();\n\n // Assign selected products to this store\n if (products && products.length > 0) {\n await db\n .update(productInfo)\n .set({ storeId: newStore.id })\n .where(inArray(productInfo.id, products));\n }\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n store: newStore,\n message: \"Store created successfully\",\n };\n }),\n\n updateStore: protectedProcedure\n .input(z.object({\n id: z.number(),\n name: z.string().min(1, \"Name is required\"),\n description: z.string().optional(),\n imageUrl: z.string().optional(),\n owner: z.number().min(1, \"Owner is required\"),\n products: z.array(z.number()).optional(),\n }))\n .mutation(async ({ input, ctx }): Promise<{ store: Store; message: string }> => {\n const { id, name, description, imageUrl, owner, products } = input;\n\n const existingStore = await getStoreByIdFromDb(id);\n\n if (!existingStore) {\n throw new ApiError(\"Store not found\", 404);\n }\n\n const oldImageKey = existingStore.imageUrl;\n const newImageKey = imageUrl ? extractKeyFromPresignedUrl(imageUrl) : oldImageKey;\n\n // Delete old image only if:\n // 1. New image provided and keys are different, OR\n // 2. No new image but old exists (clearing the image)\n if (oldImageKey && (\n (newImageKey && newImageKey !== oldImageKey) ||\n (!newImageKey)\n )) {\n try {\n await deleteImageUtil({keys: [oldImageKey]});\n } catch (error) {\n console.error('Failed to delete old image:', error);\n // Continue with update even if deletion fails\n }\n }\n\n const updatedStore = await updateStoreInDb(\n id,\n {\n name,\n description,\n imageUrl: newImageKey,\n owner,\n },\n products\n );\n\n /*\n // Old implementation - direct DB query:\n const [updatedStore] = await db\n .update(storeInfo)\n .set({\n name,\n description,\n imageUrl: newImageKey,\n owner,\n })\n .where(eq(storeInfo.id, id))\n .returning();\n\n if (!updatedStore) {\n throw new ApiError(\"Store not found\", 404);\n }\n\n // Update products if provided\n if (products) {\n // First, set storeId to null for products not in the list but currently assigned to this store\n await db\n .update(productInfo)\n .set({ storeId: null })\n .where(eq(productInfo.storeId, id));\n\n // Then, assign the selected products to this store\n if (products.length > 0) {\n await db\n .update(productInfo)\n .set({ storeId: id })\n .where(inArray(productInfo.id, products));\n }\n }\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return {\n store: updatedStore,\n message: \"Store updated successfully\",\n };\n }),\n\n deleteStore: protectedProcedure\n .input(z.object({\n storeId: z.number(),\n }))\n .mutation(async ({ input, ctx }): Promise<{ message: string }> => {\n const { storeId } = input;\n\n const result = await deleteStoreFromDb(storeId);\n\n /*\n // Old implementation - direct DB query with transaction:\n const result = await db.transaction(async (tx) => {\n // First, update all products of this store to set storeId to null\n await tx\n .update(productInfo)\n .set({ storeId: null })\n .where(eq(productInfo.storeId, storeId));\n\n // Then delete the store\n const [deletedStore] = await tx\n .delete(storeInfo)\n .where(eq(storeInfo.id, storeId))\n .returning();\n\n if (!deletedStore) {\n throw new ApiError(\"Store not found\", 404);\n }\n\n return {\n message: \"Store deleted successfully\",\n };\n });\n */\n\n // Reinitialize stores to reflect changes (outside transaction)\n scheduleStoreInitialization()\n\n return result;\n }),\n});\n", "import { router, protectedProcedure } from \"@/src/trpc/trpc-index\"\nimport { z } from \"zod\";\n\nconst initiateRefundSchema = z\n .object({\n orderId: z.number(),\n refundPercent: z.number().min(0).max(100).optional(),\n refundAmount: z.number().min(0).optional(),\n })\n .refine(\n (data) => {\n const hasPercent = data.refundPercent !== undefined;\n const hasAmount = data.refundAmount !== undefined;\n return (hasPercent && !hasAmount) || (!hasPercent && hasAmount);\n },\n {\n message:\n \"Provide either refundPercent or refundAmount, not both or neither\",\n }\n );\n\nexport const adminPaymentsRouter = router({\n initiateRefund: protectedProcedure\n .input(initiateRefundSchema)\n .mutation(async ({ input }) => {\n return {}\n }),\n});\n", "import { z } from 'zod';\nimport { protectedProcedure, router } from '@/src/trpc/trpc-index'\nimport { extractKeyFromPresignedUrl, generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error';\nimport { scheduleStoreInitialization } from '@/src/stores/store-initializer'\nimport {\n getBanners as getBannersFromDb,\n getBannerById as getBannerByIdFromDb,\n createBanner as createBannerInDb,\n updateBanner as updateBannerInDb,\n deleteBanner as deleteBannerFromDb,\n} from '@/src/dbService'\nimport type { Banner } from '@packages/shared'\n\n\nexport const bannerRouter = router({\n // Get all banners\n getBanners: protectedProcedure\n .query(async (): Promise<{ banners: Banner[] }> => {\n try {\n\n // Using dbService helper (new implementation)\n const banners = await getBannersFromDb();\n\n \n // Old implementation - direct DB query:\n // const banners = await db.query.homeBanners.findMany({\n // orderBy: desc(homeBanners.createdAt), // Order by creation date instead\n // Removed product relationship since we now use productIds array\n // });\n \n\n // Convert S3 keys to signed URLs for client\n const bannersWithSignedUrls = await Promise.all(\n banners.map(async (banner) => {\n try {\n return {\n ...banner,\n imageUrl: banner.imageUrl ? await generateSignedUrlFromS3Url(banner.imageUrl) : banner.imageUrl,\n // Ensure productIds is always an array\n productIds: banner.productIds || [],\n };\n } catch (error) {\n console.error(`Failed to generate signed URL for banner ${banner.id}:`, error);\n return {\n ...banner,\n imageUrl: banner.imageUrl, // Keep original on error\n // Ensure productIds is always an array\n productIds: banner.productIds || [],\n };\n }\n })\n );\n\n return {\n banners: bannersWithSignedUrls,\n };\n }\n catch(e:any) {\n console.log(e)\n \n throw new ApiError(e.message);\n }\n }),\n\n // Get single banner by ID\n getBanner: protectedProcedure\n .input(z.object({ id: z.number() }))\n .query(async ({ input }): Promise => {\n // Using dbService helper (new implementation)\n const banner = await getBannerByIdFromDb(input.id);\n \n /*\n // Old implementation - direct DB query:\n const banner = await db.query.homeBanners.findFirst({\n where: eq(homeBanners.id, input.id),\n // Removed product relationship since we now use productIds array\n });\n */\n\n if (banner) {\n try {\n // Convert S3 key to signed URL for client\n if (banner.imageUrl) {\n banner.imageUrl = await generateSignedUrlFromS3Url(banner.imageUrl);\n }\n } catch (error) {\n console.error(`Failed to generate signed URL for banner ${banner.id}:`, error);\n // Keep original imageUrl on error\n }\n\n // Ensure productIds is always an array (handle migration compatibility)\n if (!banner.productIds) {\n banner.productIds = [];\n }\n }\n\n return banner;\n }),\n\n // Create new banner\n createBanner: protectedProcedure\n .input(z.object({\n name: z.string().min(1),\n imageUrl: z.string().url(),\n description: z.string().optional(),\n productIds: z.array(z.number()).optional(),\n redirectUrl: z.string().url().optional(),\n // serialNum removed completely\n }))\n .mutation(async ({ input }): Promise => {\n try {\n // Using dbService helper (new implementation)\n const imageUrl = extractKeyFromPresignedUrl(input.imageUrl)\n const banner = await createBannerInDb({\n name: input.name,\n imageUrl: imageUrl,\n description: input.description ?? null,\n productIds: input.productIds || [],\n redirectUrl: input.redirectUrl ?? null,\n serialNum: 999, // Default value, not used\n isActive: false, // Default to inactive\n });\n\n /*\n // Old implementation - direct DB query:\n const imageUrl = extractKeyFromPresignedUrl(input.imageUrl)\n const [banner] = await db.insert(homeBanners).values({\n name: input.name,\n imageUrl: imageUrl,\n description: input.description,\n productIds: input.productIds || [],\n redirectUrl: input.redirectUrl,\n serialNum: 999, // Default value, not used\n isActive: false, // Default to inactive\n }).returning();\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return banner;\n } catch (error) {\n console.error('Error creating banner:', error);\n throw error; // Re-throw to maintain tRPC error handling\n }\n }),\n\n // Update banner\n updateBanner: protectedProcedure\n .input(z.object({\n id: z.number(),\n name: z.string().min(1).optional(),\n imageUrl: z.string().url().optional(),\n description: z.string().optional(),\n productIds: z.array(z.number()).optional(),\n redirectUrl: z.string().url().optional(),\n serialNum: z.number().nullable().optional(),\n isActive: z.boolean().optional(),\n }))\n .mutation(async ({ input }): Promise => {\n try {\n // Using dbService helper (new implementation)\n const { id, ...updateData } = input;\n\n // Extract S3 key from presigned URL if imageUrl is provided\n const processedData = {\n ...updateData,\n ...(updateData.imageUrl && {\n imageUrl: extractKeyFromPresignedUrl(updateData.imageUrl)\n }),\n };\n\n // Handle serialNum null case\n if ('serialNum' in processedData && processedData.serialNum === null) {\n processedData.serialNum = null;\n }\n\n const banner = await updateBannerInDb(id, processedData);\n\n /*\n // Old implementation - direct DB query:\n const { id, ...updateData } = input;\n const incomingProductIds = input.productIds;\n // Extract S3 key from presigned URL if imageUrl is provided\n const processedData = {\n ...updateData,\n ...(updateData.imageUrl && {\n imageUrl: extractKeyFromPresignedUrl(updateData.imageUrl)\n }),\n };\n\n // Handle serialNum null case\n const finalData: any = { ...processedData };\n if ('serialNum' in finalData && finalData.serialNum === null) {\n // Set to null explicitly\n finalData.serialNum = null;\n }\n\n const [banner] = await db.update(homeBanners)\n .set({ ...finalData, lastUpdated: new Date(), })\n .where(eq(homeBanners.id, id))\n .returning();\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return banner;\n } catch (error) {\n console.error('Error updating banner:', error);\n throw error;\n }\n }),\n\n // Delete banner\n deleteBanner: protectedProcedure\n .input(z.object({ id: z.number() }))\n .mutation(async ({ input }): Promise<{ success: true }> => {\n // Using dbService helper (new implementation)\n await deleteBannerFromDb(input.id);\n\n /*\n // Old implementation - direct DB query:\n await db.delete(homeBanners).where(eq(homeBanners.id, input.id));\n */\n\n // Reinitialize stores to reflect changes\n scheduleStoreInitialization()\n\n return { success: true };\n }),\n});\n", "import { protectedProcedure } from '@/src/trpc/trpc-index';\nimport { z } from 'zod';\nimport { ApiError } from '@/src/lib/api-error';\nimport { notificationQueue } from '@/src/lib/notif-job';\nimport { recomputeUserNegativityScore } from '@/src/stores/user-negativity-store';\nimport {\n createUserByMobile,\n getUserByMobile,\n getUnresolvedComplaintsCount,\n getAllUsersWithFilters,\n getOrderCountsByUserIds,\n getLastOrdersByUserIds,\n getSuspensionStatusesByUserIds,\n getUserBasicInfo,\n getUserSuspensionStatus,\n getUserOrders,\n getOrderStatusesByOrderIds,\n getItemCountsByOrderIds,\n upsertUserSuspension,\n searchUsers,\n getAllNotifCreds,\n getAllUnloggedTokens,\n getNotifTokensByUserIds,\n getUserIncidentsWithRelations,\n createUserIncident,\n} from '@/src/dbService';\n\nexport const userRouter = {\n createUserByMobile: protectedProcedure\n .input(z.object({\n mobile: z.string().min(1, 'Mobile number is required'),\n }))\n .mutation(async ({ input }) => {\n // Clean mobile number (remove non-digits)\n const cleanMobile = input.mobile.replace(/\\D/g, '');\n\n // Validate: exactly 10 digits\n if (cleanMobile.length !== 10) {\n throw new ApiError('Mobile number must be exactly 10 digits', 400);\n }\n\n // Check if user already exists\n const existingUser = await getUserByMobile(cleanMobile);\n\n if (existingUser) {\n throw new ApiError('User with this mobile number already exists', 409);\n }\n\n const newUser = await createUserByMobile(cleanMobile);\n\n return {\n success: true,\n data: newUser,\n };\n }),\n\n getEssentials: protectedProcedure\n .query(async () => {\n const count = await getUnresolvedComplaintsCount();\n \n return {\n unresolvedComplaints: count,\n };\n }),\n\n getAllUsers: protectedProcedure\n .input(z.object({\n limit: z.number().min(1).max(100).default(50),\n cursor: z.number().optional(),\n search: z.string().optional(),\n }))\n .query(async ({ input }) => {\n const { limit, cursor, search } = input;\n \n const { users: usersToReturn, hasMore } = await getAllUsersWithFilters(limit, cursor, search);\n\n // Get order stats for each user\n const userIds = usersToReturn.map((u: any) => u.id);\n \n const orderCounts = await getOrderCountsByUserIds(userIds);\n const lastOrders = await getLastOrdersByUserIds(userIds);\n const suspensionStatuses = await getSuspensionStatusesByUserIds(userIds);\n \n // Create lookup maps\n const orderCountMap = new Map(orderCounts.map(o => [o.userId, o.totalOrders]));\n const lastOrderMap = new Map(lastOrders.map(o => [o.userId, o.lastOrderDate]));\n const suspensionMap = new Map(suspensionStatuses.map(s => [s.userId, s.isSuspended]));\n\n // Combine data\n const usersWithStats = usersToReturn.map((user: any) => ({\n ...user,\n totalOrders: orderCountMap.get(user.id) || 0,\n lastOrderDate: lastOrderMap.get(user.id) || null,\n isSuspended: suspensionMap.get(user.id) ?? false,\n }));\n\n // Get next cursor\n const nextCursor = hasMore ? usersToReturn[usersToReturn.length - 1].id : undefined;\n\n return {\n users: usersWithStats,\n nextCursor,\n hasMore,\n };\n }),\n\n getUserDetails: protectedProcedure\n .input(z.object({\n userId: z.number(),\n }))\n .query(async ({ input }) => {\n const { userId } = input;\n\n // Get user info\n const user = await getUserBasicInfo(userId);\n\n if (!user) {\n throw new ApiError('User not found', 404);\n }\n\n // Get user suspension status\n const isSuspended = await getUserSuspensionStatus(userId);\n\n // Get all orders for this user\n const userOrders = await getUserOrders(userId);\n\n // Get order status for each order\n const orderIds = userOrders.map((o: any) => o.id);\n const orderStatuses = await getOrderStatusesByOrderIds(orderIds);\n\n // Get item counts for each order\n const itemCounts = await getItemCountsByOrderIds(orderIds);\n\n // Create lookup maps\n const statusMap = new Map(orderStatuses.map(s => [s.orderId, s]));\n const itemCountMap = new Map(itemCounts.map(c => [c.orderId, c.itemCount]));\n\n // Determine status string\n const getStatus = (status: { isDelivered: boolean; isCancelled: boolean } | undefined) => {\n if (!status) return 'pending';\n if (status.isCancelled) return 'cancelled';\n if (status.isDelivered) return 'delivered';\n return 'pending';\n };\n\n // Combine data\n const ordersWithDetails = userOrders.map((order: any) => {\n const status = statusMap.get(order.id);\n return {\n id: order.id,\n readableId: order.readableId,\n totalAmount: order.totalAmount,\n createdAt: order.createdAt,\n isFlashDelivery: order.isFlashDelivery,\n status: getStatus(status),\n itemCount: itemCountMap.get(order.id) || 0,\n };\n });\n\n return {\n user: {\n ...user,\n isSuspended,\n },\n orders: ordersWithDetails,\n };\n }),\n\n updateUserSuspension: protectedProcedure\n .input(z.object({\n userId: z.number(),\n isSuspended: z.boolean(),\n }))\n .mutation(async ({ input }) => {\n const { userId, isSuspended } = input;\n\n await upsertUserSuspension(userId, isSuspended);\n\n return {\n success: true,\n message: `User ${isSuspended ? 'suspended' : 'unsuspended'} successfully`,\n };\n }),\n\n getUsersForNotification: protectedProcedure\n .input(z.object({\n search: z.string().optional(),\n }))\n .query(async ({ input }) => {\n const { search } = input;\n\n const usersList = await searchUsers(search);\n\n // Get eligible users (have notif_creds entry)\n const eligibleUsers = await getAllNotifCreds();\n\n const eligibleSet = new Set(eligibleUsers.map(u => u.userId));\n\n return {\n users: usersList.map((user: any) => ({\n id: user.id,\n name: user.name,\n mobile: user.mobile,\n isEligibleForNotif: eligibleSet.has(user.id),\n })),\n };\n }),\n\n sendNotification: protectedProcedure\n .input(z.object({\n userIds: z.array(z.number()).default([]),\n title: z.string().min(1, 'Title is required'),\n text: z.string().min(1, 'Message is required'),\n imageUrl: z.string().optional(),\n }))\n .mutation(async ({ input }) => {\n const { userIds, title, text, imageUrl } = input;\n\n let tokens: string[] = [];\n\n if (userIds.length === 0) {\n // Send to all users - get tokens from both logged-in and unlogged users\n const loggedInTokens = await getAllNotifCreds();\n const unloggedTokens = await getAllUnloggedTokens();\n \n tokens = [\n ...loggedInTokens.map(t => t.token),\n ...unloggedTokens.map(t => t.token)\n ];\n } else {\n // Send to specific users - get their tokens\n const userTokens = await getNotifTokensByUserIds(userIds);\n tokens = userTokens.map(t => t.token);\n }\n\n // Queue one job per token\n let queuedCount = 0;\n for (const token of tokens) {\n try {\n await notificationQueue.add('send-admin-notification', {\n token,\n title,\n body: text,\n imageUrl: imageUrl || null,\n }, {\n attempts: 3,\n backoff: {\n type: 'exponential',\n delay: 2000,\n },\n });\n queuedCount++;\n } catch (error) {\n console.error(`Failed to queue notification for token:`, error);\n }\n }\n\n return {\n success: true,\n message: `Notification queued for ${queuedCount} users`,\n };\n }),\n\n getUserIncidents: protectedProcedure\n .input(z.object({\n userId: z.number(),\n }))\n .query(async ({ input }) => {\n const { userId } = input;\n\n const incidents = await getUserIncidentsWithRelations(userId);\n\n return {\n incidents: incidents.map((incident: any) => ({\n id: incident.id,\n userId: incident.userId,\n orderId: incident.orderId,\n dateAdded: incident.dateAdded,\n adminComment: incident.adminComment,\n addedBy: incident.addedBy?.name || 'Unknown',\n negativityScore: incident.negativityScore,\n orderStatus: incident.order?.orderStatus?.[0]?.isCancelled ? 'cancelled' : 'active',\n })),\n };\n }),\n\n addUserIncident: protectedProcedure\n .input(z.object({\n userId: z.number(),\n orderId: z.number().optional(),\n adminComment: z.string().optional(),\n negativityScore: z.number().optional(),\n }))\n .mutation(async ({ input, ctx }) => {\n const { userId, orderId, adminComment, negativityScore } = input;\n \n const adminUserId = ctx.staffUser?.id;\n \n if (!adminUserId) {\n throw new ApiError('Admin user not authenticated', 401);\n }\n\n const incident = await createUserIncident(\n userId,\n orderId,\n adminComment,\n adminUserId,\n negativityScore\n );\n\n recomputeUserNegativityScore(userId);\n\n return {\n success: true,\n data: incident,\n };\n }),\n};\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport { computeConstants } from '@/src/lib/const-store'\nimport { CONST_KEYS } from '@/src/lib/const-keys'\nimport { getAllConstants as getAllConstantsFromDb, upsertConstants as upsertConstantsInDb } from '@/src/dbService'\nimport type { Constant, ConstantUpdateResult } from '@packages/shared'\n\nexport const constRouter = router({\n getConstants: protectedProcedure\n .query(async (): Promise => {\n // Using dbService helper (new implementation)\n const constants = await getAllConstantsFromDb();\n\n /*\n // Old implementation - direct DB query:\n const constants = await db.select().from(keyValStore);\n\n const resp = constants.map(c => ({\n key: c.key,\n value: c.value,\n }));\n */\n \n return constants;\n }),\n\n updateConstants: protectedProcedure\n .input(z.object({\n constants: z.array(z.object({\n key: z.string(),\n value: z.any(),\n })),\n }))\n .mutation(async ({ input }): Promise => {\n const { constants } = input;\n\n const validKeys = Object.values(CONST_KEYS) as string[];\n const invalidKeys = constants\n .filter(c => !validKeys.includes(c.key))\n .map(c => c.key);\n\n if (invalidKeys.length > 0) {\n throw new Error(`Invalid constant keys: ${invalidKeys.join(', ')}`);\n }\n\n // Using dbService helper (new implementation)\n await upsertConstantsInDb(constants);\n\n /*\n // Old implementation - direct DB query:\n await db.transaction(async (tx) => {\n for (const { key, value } of constants) {\n await tx.insert(keyValStore)\n .values({ key, value })\n .onConflictDoUpdate({\n target: keyValStore.key,\n set: { value },\n });\n }\n });\n */\n\n // Refresh all constants in Redis after database update\n await computeConstants();\n\n return {\n success: true,\n updatedCount: constants.length,\n keys: constants.map(c => c.key),\n };\n }),\n});\n", "// import { router } from '@/src/trpc/trpc-index';\nimport { router } from '@/src/trpc/trpc-index'\nimport { complaintRouter } from '@/src/trpc/apis/admin-apis/apis/complaint'\nimport { couponRouter } from '@/src/trpc/apis/admin-apis/apis/coupon'\nimport { orderRouter } from '@/src/trpc/apis/admin-apis/apis/order'\nimport { vendorSnippetsRouter } from '@/src/trpc/apis/admin-apis/apis/vendor-snippets'\nimport { slotsRouter } from '@/src/trpc/apis/admin-apis/apis/slots'\nimport { productRouter } from '@/src/trpc/apis/admin-apis/apis/product'\nimport { staffUserRouter } from '@/src/trpc/apis/admin-apis/apis/staff-user'\nimport { storeRouter } from '@/src/trpc/apis/admin-apis/apis/store'\nimport { adminPaymentsRouter } from '@/src/trpc/apis/admin-apis/apis/payments'\nimport { bannerRouter } from '@/src/trpc/apis/admin-apis/apis/banner'\nimport { userRouter } from '@/src/trpc/apis/admin-apis/apis/user'\nimport { constRouter } from '@/src/trpc/apis/admin-apis/apis/const'\n\nexport const adminRouter = router({\n complaint: complaintRouter,\n coupon: couponRouter,\n order: orderRouter,\n vendorSnippets: vendorSnippetsRouter,\n slots: slotsRouter,\n product: productRouter,\n staffUser: staffUserRouter,\n store: storeRouter,\n payments: adminPaymentsRouter,\n banner: bannerRouter,\n user: userRouter,\n const: constRouter,\n});\n\nexport type AdminRouter = typeof adminRouter;\n", "import axios from 'axios';\n\nexport async function extractCoordsFromRedirectUrl(url: string): Promise<{ latitude: string; longitude: string } | null> {\n try {\n await axios.get(url, { maxRedirects: 0 });\n return null;\n } catch (error: any) {\n if (error.response?.status === 302 || error.response?.status === 301) {\n const redirectUrl = error.response.headers.location;\n const coordsMatch = redirectUrl.match(/!3d([-\\d.]+)!4d([-\\d.]+)/);\n if (coordsMatch) {\n return {\n latitude: coordsMatch[1],\n longitude: coordsMatch[2],\n };\n }\n }\n return null;\n }\n}\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { extractCoordsFromRedirectUrl } from '@/src/lib/license-util'\nimport {\n getUserDefaultAddress as getDefaultAddressInDb,\n getUserAddresses as getUserAddressesInDb,\n getUserAddressById as getUserAddressByIdInDb,\n clearUserDefaultAddress as clearDefaultAddressInDb,\n createUserAddress as createUserAddressInDb,\n updateUserAddress as updateUserAddressInDb,\n deleteUserAddress as deleteUserAddressInDb,\n hasOngoingOrdersForAddress as hasOngoingOrdersForAddressInDb,\n} from '@/src/dbService'\nimport type {\n UserAddressResponse,\n UserAddressesResponse,\n UserAddressDeleteResponse,\n} from '@packages/shared'\n\nexport const addressRouter = router({\n getDefaultAddress: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n const defaultAddress = await getDefaultAddressInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const [defaultAddress] = await db\n .select()\n .from(addresses)\n .where(and(eq(addresses.userId, userId), eq(addresses.isDefault, true)))\n .limit(1);\n */\n\n return { success: true, data: defaultAddress }\n }),\n\n getUserAddresses: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n const userAddresses = await getUserAddressesInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const userAddresses = await db.select().from(addresses).where(eq(addresses.userId, userId));\n */\n\n return { success: true, data: userAddresses }\n }),\n\n createAddress: protectedProcedure\n .input(z.object({\n name: z.string().min(1, 'Name is required'),\n phone: z.string().min(1, 'Phone is required'),\n addressLine1: z.string().min(1, 'Address line 1 is required'),\n addressLine2: z.string().optional(),\n city: z.string().min(1, 'City is required'),\n state: z.string().min(1, 'State is required'),\n pincode: z.string().min(1, 'Pincode is required'),\n isDefault: z.boolean().optional(),\n latitude: z.number().optional(),\n longitude: z.number().optional(),\n googleMapsUrl: z.string().optional(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { name, phone, addressLine1, addressLine2, city, state, pincode, isDefault, googleMapsUrl } = input;\n\n let { latitude, longitude } = input;\n\n if (googleMapsUrl && latitude === undefined && longitude === undefined) {\n const coords = await extractCoordsFromRedirectUrl(googleMapsUrl);\n if (coords) {\n latitude = Number(coords.latitude);\n longitude = Number(coords.longitude);\n }\n }\n\n // Validate required fields\n if (!name || !phone || !addressLine1 || !city || !state || !pincode) {\n throw new Error('Missing required fields');\n }\n\n // If setting as default, unset other defaults\n if (isDefault) {\n await clearDefaultAddressInDb(userId)\n }\n\n const newAddress = await createUserAddressInDb({\n userId,\n name,\n phone,\n addressLine1,\n addressLine2,\n city,\n state,\n pincode,\n isDefault: isDefault || false,\n latitude,\n longitude,\n googleMapsUrl,\n })\n\n /*\n // Old implementation - direct DB queries:\n if (isDefault) {\n await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId));\n }\n\n const [newAddress] = await db.insert(addresses).values({\n userId,\n name,\n phone,\n addressLine1,\n addressLine2,\n city,\n state,\n pincode,\n isDefault: isDefault || false,\n latitude,\n longitude,\n googleMapsUrl,\n }).returning();\n */\n\n return { success: true, data: newAddress }\n }),\n\n updateAddress: protectedProcedure\n .input(z.object({\n id: z.number().int().positive(),\n name: z.string().min(1, 'Name is required'),\n phone: z.string().min(1, 'Phone is required'),\n addressLine1: z.string().min(1, 'Address line 1 is required'),\n addressLine2: z.string().optional(),\n city: z.string().min(1, 'City is required'),\n state: z.string().min(1, 'State is required'),\n pincode: z.string().min(1, 'Pincode is required'),\n isDefault: z.boolean().optional(),\n latitude: z.number().optional(),\n longitude: z.number().optional(),\n googleMapsUrl: z.string().optional(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { id, name, phone, addressLine1, addressLine2, city, state, pincode, isDefault, googleMapsUrl } = input;\n\n let { latitude, longitude } = input;\n\n if (googleMapsUrl && latitude === undefined && longitude === undefined) {\n const coords = await extractCoordsFromRedirectUrl(googleMapsUrl);\n if (coords) {\n latitude = Number(coords.latitude);\n longitude = Number(coords.longitude);\n }\n }\n\n // Check if address exists and belongs to user\n const existingAddress = await getUserAddressByIdInDb(userId, id)\n if (!existingAddress) {\n throw new Error('Address not found')\n }\n\n // If setting as default, unset other defaults\n if (isDefault) {\n await clearDefaultAddressInDb(userId)\n }\n\n const updatedAddress = await updateUserAddressInDb({\n userId,\n addressId: id,\n name,\n phone,\n addressLine1,\n addressLine2,\n city,\n state,\n pincode,\n isDefault: isDefault || false,\n googleMapsUrl,\n latitude,\n longitude,\n })\n\n /*\n // Old implementation - direct DB queries:\n if (isDefault) {\n await db.update(addresses).set({ isDefault: false }).where(eq(addresses.userId, userId));\n }\n\n const updateData: any = {\n name,\n phone,\n addressLine1,\n addressLine2,\n city,\n state,\n pincode,\n isDefault: isDefault || false,\n googleMapsUrl,\n };\n\n if (latitude !== undefined) {\n updateData.latitude = latitude;\n }\n if (longitude !== undefined) {\n updateData.longitude = longitude;\n }\n\n const [updatedAddress] = await db.update(addresses).set(updateData).where(and(eq(addresses.id, id), eq(addresses.userId, userId))).returning();\n */\n\n return { success: true, data: updatedAddress }\n }),\n\n deleteAddress: protectedProcedure\n .input(z.object({\n id: z.number().int().positive(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { id } = input;\n\n const existingAddress = await getUserAddressByIdInDb(userId, id)\n if (!existingAddress) {\n throw new Error('Address not found or does not belong to user')\n }\n\n const hasOngoingOrders = await hasOngoingOrdersForAddressInDb(id)\n if (hasOngoingOrders) {\n throw new Error('Address is attached to an ongoing order. Please cancel the order first.')\n }\n\n if (existingAddress.isDefault) {\n throw new Error('Cannot delete default address. Please set another address as default first.')\n }\n\n const deleted = await deleteUserAddressInDb(userId, id)\n\n /*\n // Old implementation - direct DB queries:\n const existingAddress = await db.select().from(addresses).where(and(eq(addresses.id, id), eq(addresses.userId, userId))).limit(1);\n if (existingAddress.length === 0) {\n throw new Error('Address not found or does not belong to user');\n }\n\n const ongoingOrders = await db.select({\n order: orders,\n status: orderStatus,\n slot: deliverySlotInfo\n })\n .from(orders)\n .innerJoin(orderStatus, eq(orders.id, orderStatus.orderId))\n .innerJoin(deliverySlotInfo, eq(orders.slotId, deliverySlotInfo.id))\n .where(and(\n eq(orders.addressId, id),\n eq(orderStatus.isCancelled, false),\n gte(deliverySlotInfo.deliveryTime, new Date())\n ))\n .limit(1);\n\n if (ongoingOrders.length > 0) {\n throw new Error('Address is attached to an ongoing order. Please cancel the order first.');\n }\n\n if (existingAddress[0].isDefault) {\n throw new Error('Cannot delete default address. Please set another address as default first.');\n }\n\n await db.delete(addresses).where(and(eq(addresses.id, id), eq(addresses.userId, userId)));\n */\n\n if (!deleted) {\n throw new Error('Address not found or does not belong to user')\n }\n\n return { success: true, message: 'Address deleted successfully' }\n }),\n});\n", "import { ApiError } from '@/src/lib/api-error'\nimport { otpSenderAuthToken } from '@/src/lib/env-exporter'\n\nconst otpStore = new Map();\n\nconst setOtpCreds = (phone: string, verificationId: string) => {\n otpStore.set(phone, verificationId);\n};\n\nexport function getOtpCreds(mobile: string) {\n const authKey = otpStore.get(mobile);\n\n return authKey || null;\n}\n\nexport const sendOtp = async (phone: string) => {\n if (!phone) {\n throw new ApiError(\"Phone number is required\", 400);\n }\n const reqUrl = `https://cpaas.messagecentral.com/verification/v3/send?countryCode=91&flowType=SMS&mobileNumber=${phone}&timeout=300`;\n const resp = await fetch(reqUrl, {\n headers: {\n authToken: otpSenderAuthToken,\n },\n method: \"POST\",\n });\n const data = await resp.json();\n\n if (data.message === \"SUCCESS\") {\n setOtpCreds(phone, data.data.verificationId);\n return { success: true, message: \"OTP sent successfully\", verificationId: data.data.verificationId };\n }\n if (data.message === \"REQUEST_ALREADY_EXISTS\") {\n return { success: true, message: \"OTP already sent. Last OTP is still valid\" };\n }\n\n throw new ApiError(\"Error while sending OTP. Please try again\", 500);\n};\n\nexport async function verifyOtpUtil(mobile: string, otp: string, verifId: string):Promise {\n const reqUrl = `https://cpaas.messagecentral.com/verification/v3/validateOtp?&verificationId=${verifId}&code=${otp}`;\n const resp = await fetch(reqUrl, {\n method: \"GET\",\n headers: {\n authToken: otpSenderAuthToken,\n },\n });\n\n const rawData = await resp.json();\n if (rawData.data?.verificationStatus === \"VERIFICATION_COMPLETED\") {\n // delete the verificationId from the local storage\n return true;\n }\n return false;\n}", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport bcrypt from 'bcryptjs'\nimport { SignJWT } from 'jose';\nimport { generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter'\nimport { sendOtp, verifyOtpUtil, getOtpCreds } from '@/src/lib/otp-utils'\nimport {\n getUserAuthByEmail as getUserAuthByEmailInDb,\n getUserAuthByMobile as getUserAuthByMobileInDb,\n getUserAuthById as getUserAuthByIdInDb,\n getUserAuthCreds as getUserAuthCredsInDb,\n getUserAuthDetails as getUserAuthDetailsInDb,\n createUserAuthWithMobile as createUserAuthWithMobileInDb,\n upsertUserAuthPassword as upsertUserAuthPasswordInDb,\n deleteUserAuthAccount as deleteUserAuthAccountInDb,\n createUserWithProfile as createUserWithProfileInDb,\n updateUserProfile as updateUserProfileInDb,\n getUserDetailsByUserId as getUserDetailsByUserIdInDb,\n} from '@/src/dbService'\nimport type {\n UserAuthResult,\n UserAuthResponse,\n UserOtpVerifyResponse,\n UserPasswordUpdateResponse,\n UserProfileResponse,\n UserDeleteAccountResponse,\n} from '@packages/shared'\n\ninterface LoginRequest {\n identifier: string;\n password: string;\n}\n\ninterface RegisterRequest {\n name: string;\n email: string;\n mobile: string;\n password: string;\n profileImageUrl?: string | null;\n}\n\nconst generateToken = async (userId: number): Promise => {\n return await new SignJWT({ userId })\n .setProtectedHeader({ alg: 'HS256' })\n .setExpirationTime('7d')\n .sign(getEncodedJwtSecret());\n};\n\n\n\nexport const authRouter = router({\n login: publicProcedure\n .input(z.object({\n identifier: z.string().min(1, 'Email/mobile is required'),\n password: z.string().min(1, 'Password is required'),\n }))\n .mutation(async ({ input }): Promise => {\n const { identifier, password }: LoginRequest = input;\n\n if (!identifier || !password) {\n throw new ApiError('Email/mobile and password are required', 400);\n }\n\n // Find user by email or mobile\n const user = await getUserAuthByEmailInDb(identifier.toLowerCase())\n let foundUser = user || null\n\n if (!foundUser) {\n // Try mobile if email didn't work\n const userByMobile = await getUserAuthByMobileInDb(identifier)\n foundUser = userByMobile || null\n }\n\n if (!foundUser) {\n throw new ApiError('Invalid credentials', 401);\n }\n\n // Get user credentials\n const userCredentials = await getUserAuthCredsInDb(foundUser.id)\n\n if (!userCredentials) {\n throw new ApiError('Account setup incomplete. Please contact support.', 401);\n }\n\n // Get user details for profile image\n const userDetail = await getUserAuthDetailsInDb(foundUser.id)\n\n // Generate signed URL for profile image if it exists\n const profileImageSignedUrl = userDetail?.profileImage\n ? await generateSignedUrlFromS3Url(userDetail.profileImage)\n : null;\n\n // Verify password\n const isPasswordValid = await bcrypt.compare(password, userCredentials.userPassword);\n if (!isPasswordValid) {\n throw new ApiError('Invalid credentials', 401);\n }\n\n const token = await generateToken(foundUser.id);\n\n const response: UserAuthResponse = {\n token,\n user: {\n id: foundUser.id,\n name: foundUser.name,\n email: foundUser.email,\n mobile: foundUser.mobile,\n createdAt: foundUser.createdAt.toISOString(),\n profileImage: profileImageSignedUrl,\n bio: userDetail?.bio || null,\n dateOfBirth: userDetail?.dateOfBirth\n ? new Date(userDetail.dateOfBirth as any).toISOString()\n : null,\n gender: userDetail?.gender || null,\n occupation: userDetail?.occupation || null,\n },\n };\n\n return {\n success: true,\n data: response,\n }\n }),\n\n register: publicProcedure\n .input(z.object({\n name: z.string().min(1, 'Name is required'),\n email: z.string().email('Invalid email format'),\n mobile: z.string().min(1, 'Mobile is required'),\n password: z.string().min(1, 'Password is required'),\n profileImageUrl: z.string().nullable().optional(),\n }))\n .mutation(async ({ input }): Promise => {\n const { name, email, mobile, password, profileImageUrl }: RegisterRequest = input;\n\n if (!name || !email || !mobile || !password) {\n throw new ApiError('All fields are required', 400);\n }\n\n // Validate email format\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!emailRegex.test(email)) {\n throw new ApiError('Invalid email format', 400);\n }\n\n // Validate mobile format (Indian mobile numbers)\n const cleanMobile = mobile.replace(/\\D/g, '');\n if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) {\n throw new ApiError('Invalid mobile number', 400);\n }\n\n // Check if email already exists\n const existingEmail = await getUserAuthByEmailInDb(email.toLowerCase())\n\n if (existingEmail) {\n throw new ApiError('Email already registered', 409);\n }\n\n // Check if mobile already exists\n const existingMobile = await getUserAuthByMobileInDb(cleanMobile)\n\n if (existingMobile) {\n throw new ApiError('Mobile number already registered', 409);\n }\n\n // Hash password\n const hashedPassword = await bcrypt.hash(password, 12);\n\n // Create user and credentials in a transaction\n const newUser = await createUserWithProfileInDb({\n name: name.trim(),\n email: email.toLowerCase().trim(),\n mobile: cleanMobile,\n hashedPassword,\n profileImage: profileImageUrl ?? null,\n })\n\n const token = await generateToken(newUser.id);\n\n const profileImageSignedUrl = profileImageUrl\n ? await generateSignedUrlFromS3Url(profileImageUrl)\n : null\n\n const response: UserAuthResponse = {\n token,\n user: {\n id: newUser.id,\n name: newUser.name,\n email: newUser.email,\n mobile: newUser.mobile,\n createdAt: newUser.createdAt.toISOString(),\n profileImage: profileImageSignedUrl,\n },\n };\n\n return {\n success: true,\n data: response,\n }\n }),\n\n sendOtp: publicProcedure\n .input(z.object({\n mobile: z.string(),\n }))\n .mutation(async ({ input }) => {\n \n return await sendOtp(input.mobile);\n }),\n\n verifyOtp: publicProcedure\n .input(z.object({\n mobile: z.string(),\n otp: z.string(),\n }))\n .mutation(async ({ input }): Promise => {\n const verificationId = getOtpCreds(input.mobile);\n if (!verificationId) {\n throw new ApiError(\"OTP not sent or expired\", 400);\n }\n const isVerified = await verifyOtpUtil(input.mobile, input.otp, verificationId);\n\n if (!isVerified) {\n throw new ApiError(\"Invalid OTP\", 400);\n }\n\n // Find user\n let user = await getUserAuthByMobileInDb(input.mobile)\n\n // If user doesn't exist, create one\n if (!user) {\n user = await createUserAuthWithMobileInDb(input.mobile)\n }\n\n // Generate JWT\n const token = await generateToken(user.id);\n\n return {\n success: true,\n token,\n user: {\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n createdAt: user.createdAt.toISOString(),\n profileImage: null,\n },\n }\n }),\n\n updatePassword: protectedProcedure\n .input(z.object({\n password: z.string().min(6, 'Password must be at least 6 characters'),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const hashedPassword = await bcrypt.hash(input.password, 10);\n\n // Insert if not exists, then update if exists\n await upsertUserAuthPasswordInDb(userId, hashedPassword)\n\n /*\n // Old implementation - direct DB queries:\n try {\n await db.insert(userCreds).values({\n userId: userId,\n userPassword: hashedPassword,\n });\n } catch (error: any) {\n if (error.code === '23505') {\n await db.update(userCreds).set({\n userPassword: hashedPassword,\n }).where(eq(userCreds.userId, userId));\n } else {\n throw error;\n }\n }\n */\n\n return { success: true, message: 'Password updated successfully' }\n }),\n\n updateProfile: protectedProcedure\n .input(z.object({\n name: z.string().min(1).optional(),\n email: z.string().email('Invalid email format').optional(),\n mobile: z.string().min(1).optional(),\n password: z.string().min(6, 'Password must be at least 6 characters').optional(),\n bio: z.string().optional().nullable(),\n dateOfBirth: z.string().optional().nullable(),\n gender: z.string().optional().nullable(),\n occupation: z.string().optional().nullable(),\n profileImageUrl: z.string().optional().nullable(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const { name, email, mobile, password, bio, dateOfBirth, gender, occupation, profileImageUrl } = input\n\n if (email) {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!emailRegex.test(email)) {\n throw new ApiError('Invalid email format', 400);\n }\n }\n\n if (mobile) {\n const cleanMobile = mobile.replace(/\\D/g, '');\n if (cleanMobile.length !== 10 || !/^[6-9]/.test(cleanMobile)) {\n throw new ApiError('Invalid mobile number', 400);\n }\n }\n\n if (email) {\n const existingEmail = await getUserAuthByEmailInDb(email.toLowerCase())\n if (existingEmail && existingEmail.id !== userId) {\n throw new ApiError('Email already registered', 409)\n }\n }\n\n if (mobile) {\n const cleanMobile = mobile.replace(/\\D/g, '')\n const existingMobile = await getUserAuthByMobileInDb(cleanMobile)\n if (existingMobile && existingMobile.id !== userId) {\n throw new ApiError('Mobile number already registered', 409)\n }\n }\n\n let hashedPassword: string | undefined;\n if (password) {\n hashedPassword = await bcrypt.hash(password, 12)\n }\n\n const updatedUser = await updateUserProfileInDb(userId, {\n name: name?.trim(),\n email: email?.toLowerCase().trim(),\n mobile: mobile?.replace(/\\D/g, ''),\n hashedPassword,\n profileImage: profileImageUrl ?? undefined,\n bio: bio ?? undefined,\n dateOfBirth: dateOfBirth ? new Date(dateOfBirth) : undefined,\n gender: gender ?? undefined,\n occupation: occupation ?? undefined,\n })\n\n const userDetail = await getUserDetailsByUserIdInDb(userId)\n const profileImageSignedUrl = userDetail?.profileImage\n ? await generateSignedUrlFromS3Url(userDetail.profileImage)\n : null\n\n const authHeader = ctx.req.header('authorization');\n const token = authHeader?.replace('Bearer ', '') || ''\n\n const response: UserAuthResponse = {\n token,\n user: {\n id: updatedUser.id,\n name: updatedUser.name,\n email: updatedUser.email,\n mobile: updatedUser.mobile,\n createdAt: updatedUser.createdAt?.toISOString?.() || new Date().toISOString(),\n profileImage: profileImageSignedUrl,\n bio: userDetail?.bio || null,\n dateOfBirth: userDetail?.dateOfBirth\n ? new Date(userDetail.dateOfBirth as any).toISOString()\n : null,\n gender: userDetail?.gender || null,\n occupation: userDetail?.occupation || null,\n },\n }\n\n return {\n success: true,\n data: response,\n }\n }),\n\n getProfile: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const user = await getUserAuthByIdInDb(userId)\n\n if (!user) {\n throw new ApiError('User not found', 404);\n }\n\n return {\n success: true,\n data: {\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n },\n }\n }),\n\n deleteAccount: protectedProcedure\n .input(z.object({\n mobile: z.string().min(10, 'Mobile number is required'),\n }))\n .mutation(async ({ ctx, input }): Promise => {\n const userId = ctx.user.userId;\n const { mobile } = input;\n \n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n // Double-check: verify user exists and is the authenticated user\n const existingUser = await getUserAuthByIdInDb(userId)\n\n if (!existingUser) {\n throw new ApiError('User not found', 404);\n }\n\n // Additional verification: ensure we're not deleting someone else's data\n // The JWT token should already ensure this, but double-checking\n if (existingUser.id !== userId) {\n throw new ApiError('Unauthorized: Cannot delete another user\\'s account', 403);\n }\n\n // Verify mobile number matches user's registered mobile\n const cleanInputMobile = mobile.replace(/\\D/g, '');\n const cleanUserMobile = existingUser.mobile?.replace(/\\D/g, '');\n\n if (cleanInputMobile !== cleanUserMobile) {\n throw new ApiError('Mobile number does not match your registered number', 400);\n }\n\n // Use transaction for atomic deletion\n await deleteUserAuthAccountInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n await db.transaction(async (tx) => {\n await tx.delete(notifCreds).where(eq(notifCreds.userId, userId));\n await tx.delete(couponApplicableUsers).where(eq(couponApplicableUsers.userId, userId));\n await tx.delete(couponUsage).where(eq(couponUsage.userId, userId));\n await tx.delete(complaints).where(eq(complaints.userId, userId));\n await tx.delete(cartItems).where(eq(cartItems.userId, userId));\n await tx.delete(notifications).where(eq(notifications.userId, userId));\n await tx.delete(productReviews).where(eq(productReviews.userId, userId));\n await tx.update(reservedCoupons)\n .set({ redeemedBy: null })\n .where(eq(reservedCoupons.redeemedBy, userId));\n\n const userOrders = await tx\n .select({ id: orders.id })\n .from(orders)\n .where(eq(orders.userId, userId));\n\n for (const order of userOrders) {\n await tx.delete(orderItems).where(eq(orderItems.orderId, order.id));\n await tx.delete(orderStatus).where(eq(orderStatus.orderId, order.id));\n await tx.delete(payments).where(eq(payments.orderId, order.id));\n await tx.delete(refunds).where(eq(refunds.orderId, order.id));\n await tx.delete(couponUsage).where(eq(couponUsage.orderId, order.id));\n await tx.delete(complaints).where(eq(complaints.orderId, order.id));\n }\n\n await tx.delete(orders).where(eq(orders.userId, userId));\n await tx.delete(addresses).where(eq(addresses.userId, userId));\n await tx.delete(userDetails).where(eq(userDetails.userId, userId));\n await tx.delete(userCreds).where(eq(userCreds.userId, userId));\n await tx.delete(users).where(eq(users.id, userId));\n });\n */\n\n return { success: true, message: 'Account deleted successfully' }\n }),\n});\n", "import { router, protectedProcedure, publicProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport { scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport { getMultipleProductsSlots } from '@/src/stores/slot-store'\nimport {\n getUserCartItemsWithProducts as getUserCartItemsWithProductsInDb,\n getUserProductById as getUserProductByIdInDb,\n getUserCartItemByUserProduct as getUserCartItemByUserProductInDb,\n incrementUserCartItemQuantity as incrementUserCartItemQuantityInDb,\n insertUserCartItem as insertUserCartItemInDb,\n updateUserCartItemQuantity as updateUserCartItemQuantityInDb,\n deleteUserCartItem as deleteUserCartItemInDb,\n clearUserCart as clearUserCartInDb,\n} from '@/src/dbService'\nimport type { UserCartResponse } from '@packages/shared'\n\nconst getCartData = async (userId: number): Promise => {\n const cartItemsWithProducts = await getUserCartItemsWithProductsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const cartItemsWithProducts = await db\n .select({\n cartId: cartItems.id,\n productId: productInfo.id,\n productName: productInfo.name,\n productPrice: productInfo.price,\n productImages: productInfo.images,\n productQuantity: productInfo.productQuantity,\n isOutOfStock: productInfo.isOutOfStock,\n unitShortNotation: units.shortNotation,\n quantity: cartItems.quantity,\n addedAt: cartItems.addedAt,\n })\n .from(cartItems)\n .innerJoin(productInfo, eq(cartItems.productId, productInfo.id))\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(eq(cartItems.userId, userId));\n */\n\n const cartWithSignedUrls = cartItemsWithProducts.map((item) => ({\n ...item,\n product: {\n ...item.product,\n images: scaffoldAssetUrl(item.product.images || []),\n },\n }))\n\n const totalAmount = cartWithSignedUrls.reduce((sum, item) => sum + item.subtotal, 0)\n\n return {\n items: cartWithSignedUrls,\n totalItems: cartWithSignedUrls.length,\n totalAmount,\n }\n}\n\nexport const cartRouter = router({\n getCart: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n return await getCartData(userId);\n }),\n\n addToCart: protectedProcedure\n .input(z.object({\n productId: z.number().int().positive(),\n quantity: z.number().int().positive(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { productId, quantity } = input;\n\n // Validate input\n if (!productId || !quantity || quantity <= 0) {\n throw new ApiError(\"Product ID and positive quantity required\", 400);\n }\n\n // Check if product exists\n const product = await getUserProductByIdInDb(productId)\n\n if (!product) {\n throw new ApiError('Product not found', 404)\n }\n\n const existingItem = await getUserCartItemByUserProductInDb(userId, productId)\n\n if (existingItem) {\n await incrementUserCartItemQuantityInDb(existingItem.id, quantity)\n } else {\n await insertUserCartItemInDb(userId, productId, quantity)\n }\n\n /*\n // Old implementation - direct DB queries:\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n });\n\n if (!product) {\n throw new ApiError(\"Product not found\", 404);\n }\n\n const existingItem = await db.query.cartItems.findFirst({\n where: and(eq(cartItems.userId, userId), eq(cartItems.productId, productId)),\n });\n\n if (existingItem) {\n await db.update(cartItems)\n .set({\n quantity: sql`${cartItems.quantity} + ${quantity}`,\n })\n .where(eq(cartItems.id, existingItem.id));\n } else {\n await db.insert(cartItems).values({\n userId,\n productId,\n quantity: quantity.toString(),\n });\n }\n */\n\n // Return updated cart\n return await getCartData(userId)\n }),\n\n updateCartItem: protectedProcedure\n .input(z.object({\n itemId: z.number().int().positive(),\n quantity: z.number().int().min(0),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { itemId, quantity } = input;\n\n if (!quantity || quantity <= 0) {\n throw new ApiError(\"Positive quantity required\", 400);\n }\n\n const updated = await updateUserCartItemQuantityInDb(userId, itemId, quantity)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedItem] = await db.update(cartItems)\n .set({ quantity: quantity.toString() })\n .where(and(\n eq(cartItems.id, itemId),\n eq(cartItems.userId, userId)\n ))\n .returning();\n\n if (!updatedItem) {\n throw new ApiError(\"Cart item not found\", 404);\n }\n */\n\n if (!updated) {\n throw new ApiError('Cart item not found', 404)\n }\n\n // Return updated cart\n return await getCartData(userId)\n }),\n\n removeFromCart: protectedProcedure\n .input(z.object({\n itemId: z.number().int().positive(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { itemId } = input;\n\n const deleted = await deleteUserCartItemInDb(userId, itemId)\n\n /*\n // Old implementation - direct DB queries:\n const [deletedItem] = await db.delete(cartItems)\n .where(and(\n eq(cartItems.id, itemId),\n eq(cartItems.userId, userId)\n ))\n .returning();\n\n if (!deletedItem) {\n throw new ApiError(\"Cart item not found\", 404);\n }\n */\n\n if (!deleted) {\n throw new ApiError('Cart item not found', 404)\n }\n\n // Return updated cart\n return await getCartData(userId)\n }),\n\n clearCart: protectedProcedure\n .mutation(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n await clearUserCartInDb(userId)\n\n /*\n // Old implementation - direct DB query:\n await db.delete(cartItems).where(eq(cartItems.userId, userId));\n */\n\n return {\n items: [],\n totalItems: 0,\n totalAmount: 0,\n message: \"Cart cleared successfully\",\n }\n }),\n\n // Original DB-based getCartSlots (commented out)\n // getCartSlots: publicProcedure\n // .input(z.object({\n // productIds: z.array(z.number().int().positive())\n // }))\n // .query(async ({ input }) => {\n // const { productIds } = input;\n //\n // if (productIds.length === 0) {\n // return {};\n // }\n //\n // // Get slots for these products where freeze time is after current time\n // const slotsData = await db\n // .select({\n // productId: productSlots.productId,\n // slotId: deliverySlotInfo.id,\n // deliveryTime: deliverySlotInfo.deliveryTime,\n // freezeTime: deliverySlotInfo.freezeTime,\n // isActive: deliverySlotInfo.isActive,\n // })\n // .from(productSlots)\n // .innerJoin(deliverySlotInfo, eq(productSlots.slotId, deliverySlotInfo.id))\n // .where(and(\n // inArray(productSlots.productId, productIds),\n // gt(deliverySlotInfo.freezeTime, sql`NOW()`),\n // eq(deliverySlotInfo.isActive, true)\n // ));\n //\n // // Group by productId\n // const result: Record = {};\n // slotsData.forEach(slot => {\n // if (!result[slot.productId]) {\n // result[slot.productId] = [];\n // }\n // result[slot.productId].push({\n // id: slot.slotId,\n // deliveryTime: slot.deliveryTime,\n // freezeTime: slot.freezeTime,\n // });\n // });\n //\n // return result;\n // }),\n\n // Cache-based getCartSlots\n getCartSlots: publicProcedure\n .input(z.object({\n productIds: z.array(z.number().int().positive())\n }))\n .query(async ({ input }) => {\n const { productIds } = input;\n\n if (productIds.length === 0) {\n return {};\n }\n\n return await getMultipleProductsSlots(productIds);\n }),\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport {\n getUserComplaints as getUserComplaintsInDb,\n createUserComplaint as createUserComplaintInDb,\n} from '@/src/dbService'\nimport type { UserComplaintsResponse, UserRaiseComplaintResponse } from '@packages/shared'\n\nexport const complaintRouter = router({\n getAll: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n const userComplaints = await getUserComplaintsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const userComplaints = await db\n .select({\n id: complaints.id,\n complaintBody: complaints.complaintBody,\n response: complaints.response,\n isResolved: complaints.isResolved,\n createdAt: complaints.createdAt,\n orderId: complaints.orderId,\n })\n .from(complaints)\n .where(eq(complaints.userId, userId))\n .orderBy(complaints.createdAt);\n\n return {\n complaints: userComplaints.map(c => ({\n id: c.id,\n complaintBody: c.complaintBody,\n response: c.response,\n isResolved: c.isResolved,\n createdAt: c.createdAt,\n orderId: c.orderId,\n })),\n };\n */\n\n return {\n complaints: userComplaints,\n }\n }),\n\n raise: protectedProcedure\n .input(z.object({\n orderId: z.string().optional(),\n complaintBody: z.string().min(1, 'Complaint body is required'),\n imageUrls: z.array(z.string()).optional(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { orderId, complaintBody, imageUrls } = input;\n\n let orderIdNum: number | null = null;\n\n if (orderId) {\n const readableIdMatch = orderId.match(/^ORD(\\d+)$/);\n if (readableIdMatch) {\n orderIdNum = parseInt(readableIdMatch[1]);\n }\n }\n\n await createUserComplaintInDb(\n userId,\n orderIdNum,\n complaintBody.trim(),\n imageUrls && imageUrls.length > 0 ? imageUrls : null\n )\n\n /*\n // Old implementation - direct DB query:\n await db.insert(complaints).values({\n userId,\n orderId: orderIdNum,\n complaintBody: complaintBody.trim(),\n });\n */\n\n return { success: true, message: 'Complaint raised successfully' }\n }),\n});\n", "import { router, protectedProcedure } from \"@/src/trpc/trpc-index\";\nimport { z } from \"zod\";\nimport {\n applyDiscountToUserOrder,\n cancelUserOrderTransaction,\n checkUserSuspended,\n db,\n deleteUserCartItemsForOrder,\n getOrderProductById,\n getUserAddressByIdAndUser,\n getUserCouponUsageForOrder,\n getUserOrderBasic,\n getUserOrderByIdWithRelations,\n getUserOrderCount,\n getUserOrdersWithRelations,\n getUserProductIdsFromOrders,\n getUserProductsForRecentOrders,\n getUserRecentlyDeliveredOrderIds,\n getUserSlotCapacityStatus,\n orders,\n orderItems,\n orderStatus,\n placeUserOrderTransaction,\n recordUserCouponUsage,\n updateUserOrderNotes,\n validateAndGetUserCoupon,\n} from \"@/src/dbService\";\nimport { getNextDeliveryDate } from \"@/src/trpc/apis/common-apis/common\";\nimport { scaffoldAssetUrl } from \"@/src/lib/s3-client\";\nimport { ApiError } from \"@/src/lib/api-error\";\nimport {\n sendOrderPlacedNotification,\n sendOrderCancelledNotification,\n} from \"@/src/lib/notif-job\";\nimport { CONST_KEYS, getConstant, getConstants } from \"@/src/lib/const-store\";\nimport { publishFormattedOrder, publishCancellation } from \"@/src/lib/post-order-handler\";\nimport { getSlotById } from \"@/src/stores/slot-store\";\nimport type {\n UserOrdersResponse,\n UserOrderDetail,\n UserCancelOrderResponse,\n UserUpdateNotesResponse,\n UserRecentProductsResponse,\n} from \"@/src/dbService\";\n\nconst placeOrderUtil = async (params: {\n userId: number;\n selectedItems: Array<{\n productId: number;\n quantity: number;\n slotId: number | null;\n }>;\n addressId: number;\n paymentMethod: \"online\" | \"cod\";\n couponId?: number;\n userNotes?: string;\n isFlash?: boolean;\n}) => {\n const {\n userId,\n selectedItems,\n addressId,\n paymentMethod,\n couponId,\n userNotes,\n } = params;\n\n const constants = await getConstants([\n CONST_KEYS.minRegularOrderValue,\n CONST_KEYS.deliveryCharge,\n CONST_KEYS.flashFreeDeliveryThreshold,\n CONST_KEYS.flashDeliveryCharge,\n ]);\n\n const isFlashDelivery = params.isFlash;\n const minOrderValue = (isFlashDelivery ? constants[CONST_KEYS.flashFreeDeliveryThreshold] : constants[CONST_KEYS.minRegularOrderValue]) || 0;\n const deliveryCharge = (isFlashDelivery ? constants[CONST_KEYS.flashDeliveryCharge] : constants[CONST_KEYS.deliveryCharge]) || 0;\n\n const orderGroupId = `${Date.now()}-${userId}`;\n\n const address = await getUserAddressByIdAndUser(addressId, userId);\n if (!address) {\n throw new ApiError(\"Invalid address\", 400);\n }\n\n const ordersBySlot = new Map<\n number | null,\n Array<{\n productId: number;\n quantity: number;\n slotId: number | null;\n product: Awaited>;\n }>\n >();\n\n for (const item of selectedItems) {\n const product = await getOrderProductById(item.productId);\n if (!product) {\n throw new ApiError(`Product ${item.productId} not found`, 400);\n }\n\n if (!ordersBySlot.has(item.slotId)) {\n ordersBySlot.set(item.slotId, []);\n }\n ordersBySlot.get(item.slotId)!.push({ ...item, product });\n }\n\n if (params.isFlash) {\n for (const item of selectedItems) {\n const product = await getOrderProductById(item.productId);\n if (!product?.isFlashAvailable) {\n throw new ApiError(`Product ${item.productId} is not available for flash delivery`, 400);\n }\n }\n }\n\n let totalAmount = 0;\n for (const [slotId, items] of ordersBySlot) {\n const orderTotal = items.reduce(\n (sum, item) => {\n if (!item.product) return sum\n const basePrice = params.isFlash\n ? (item.product.flashPrice ?? item.product.price)\n : item.product.price\n const itemPrice = parseFloat((basePrice ?? 0).toString())\n return sum + itemPrice * item.quantity;\n },\n 0\n );\n totalAmount += orderTotal;\n }\n\n const appliedCoupon = await validateAndGetUserCoupon(couponId, userId, totalAmount);\n\n const expectedDeliveryCharge =\n totalAmount < minOrderValue ? deliveryCharge : 0;\n\n const totalWithDelivery = totalAmount + expectedDeliveryCharge;\n\n type OrderData = {\n order: Omit;\n orderItems: Omit[];\n orderStatus: Omit;\n };\n\n const ordersData: OrderData[] = [];\n let isFirstOrder = true;\n\n for (const [slotId, items] of ordersBySlot) {\n const subOrderTotal = items.reduce(\n (sum, item) => {\n if (!item.product) return sum\n const basePrice = params.isFlash\n ? (item.product.flashPrice ?? item.product.price)\n : item.product.price\n const itemPrice = parseFloat((basePrice ?? 0).toString())\n return sum + itemPrice * item.quantity;\n },\n 0\n );\n const subOrderTotalWithDelivery = subOrderTotal + expectedDeliveryCharge;\n\n const orderGroupProportion = subOrderTotal / totalAmount;\n const orderTotalAmount = isFirstOrder ? subOrderTotalWithDelivery : subOrderTotal;\n\n const { finalOrderTotal: finalOrderAmount } = applyDiscountToUserOrder(\n orderTotalAmount,\n appliedCoupon,\n orderGroupProportion\n );\n\n const order: Omit = {\n userId,\n addressId,\n slotId: params.isFlash ? null : slotId,\n isCod: paymentMethod === \"cod\",\n isOnlinePayment: paymentMethod === \"online\",\n paymentInfoId: null,\n totalAmount: finalOrderAmount.toString(),\n deliveryCharge: isFirstOrder ? expectedDeliveryCharge.toString() : \"0\",\n readableId: -1,\n userNotes: userNotes || null,\n orderGroupId,\n orderGroupProportion: orderGroupProportion.toString(),\n isFlashDelivery: params.isFlash,\n };\n\n const validItems = items.filter(\n (item): item is typeof item & { product: NonNullable } =>\n item.product !== null && item.product !== undefined\n )\n const orderItemsData: Omit[] = validItems.map(\n (item) => {\n const basePrice = params.isFlash\n ? (item.product.flashPrice ?? item.product.price)\n : item.product.price\n const priceString = (basePrice ?? 0).toString()\n\n return {\n orderId: 0,\n productId: item.productId,\n quantity: item.quantity.toString(),\n price: priceString,\n discountedPrice: priceString,\n }\n }\n );\n\n const orderStatusData: Omit = {\n userId,\n orderId: 0,\n paymentStatus: paymentMethod === \"cod\" ? \"cod\" : \"pending\",\n };\n\n ordersData.push({ order, orderItems: orderItemsData, orderStatus: orderStatusData });\n isFirstOrder = false;\n }\n\n const createdOrders = await placeUserOrderTransaction({\n userId,\n ordersData,\n paymentMethod,\n totalWithDelivery,\n });\n\n await deleteUserCartItemsForOrder(\n userId,\n selectedItems.map((item) => item.productId)\n );\n\n if (appliedCoupon && createdOrders.length > 0) {\n await recordUserCouponUsage(\n userId,\n appliedCoupon.id,\n createdOrders[0].id\n );\n }\n\n for (const order of createdOrders) {\n sendOrderPlacedNotification(userId, order.id.toString());\n }\n\n await publishFormattedOrder(createdOrders, ordersBySlot);\n\n return { success: true, data: createdOrders };\n};\n\nexport const orderRouter = router({\n placeOrder: protectedProcedure\n .input(\n z.object({\n selectedItems: z.array(\n z.object({\n productId: z.number().int().positive(),\n quantity: z.number().int().positive(),\n slotId: z.union([z.number().int(), z.null()]),\n })\n ),\n addressId: z.number().int().positive(),\n paymentMethod: z.enum([\"online\", \"cod\"]),\n couponId: z.number().int().positive().optional(),\n userNotes: z.string().optional(),\n isFlashDelivery: z.boolean().optional().default(false),\n })\n )\n .mutation(async ({ input, ctx }) => {\n const userId = ctx.user.userId;\n\n const isSuspended = await checkUserSuspended(userId);\n if (isSuspended) {\n throw new ApiError(\"Unable to place order\", 403);\n }\n\n const {\n selectedItems,\n addressId,\n paymentMethod,\n couponId,\n userNotes,\n isFlashDelivery,\n } = input;\n\n if (isFlashDelivery) {\n const isFlashDeliveryEnabled = await getConstant(CONST_KEYS.isFlashDeliveryEnabled);\n if (!isFlashDeliveryEnabled) {\n throw new ApiError(\"Flash delivery is currently unavailable. Please opt for scheduled delivery.\", 403);\n }\n }\n\n if (!isFlashDelivery) {\n const slotIds = [...new Set(selectedItems.filter(i => i.slotId !== null).map(i => i.slotId as number))];\n for (const slotId of slotIds) {\n const isCapacityFull = await getUserSlotCapacityStatus(slotId);\n if (isCapacityFull) {\n throw new ApiError(\"Selected delivery slot is at full capacity. Please choose another slot.\", 403);\n }\n }\n }\n\n let processedItems = selectedItems;\n\n if (isFlashDelivery) {\n processedItems = selectedItems.map(item => ({\n ...item,\n slotId: null as any,\n }));\n }\n\n return await placeOrderUtil({\n userId,\n selectedItems: processedItems,\n addressId,\n paymentMethod,\n couponId,\n userNotes,\n isFlash: isFlashDelivery,\n });\n }),\n\n getOrders: protectedProcedure\n .input(\n z\n .object({\n page: z.number().min(1).default(1),\n pageSize: z.number().min(1).max(50).default(10),\n })\n .optional()\n )\n .query(async ({ input, ctx }): Promise => {\n const { page = 1, pageSize = 10 } = input || {};\n const userId = ctx.user.userId;\n const offset = (page - 1) * pageSize;\n\n const totalCount = await getUserOrderCount(userId);\n const userOrders = await getUserOrdersWithRelations(userId, offset, pageSize);\n\n const mappedOrders = await Promise.all(\n userOrders.map(async (order) => {\n const status = order.orderStatus[0];\n const refund = order.refunds[0];\n\n type DeliveryStatus = \"cancelled\" | \"success\" | \"pending\" | \"packaged\";\n type OrderStatus = \"cancelled\" | \"success\";\n\n let deliveryStatus: DeliveryStatus;\n let orderStatus: OrderStatus;\n\n const allItemsPackaged = order.orderItems.every(\n (item) => item.is_packaged\n );\n\n if (status?.isCancelled) {\n deliveryStatus = \"cancelled\";\n orderStatus = \"cancelled\";\n } else if (status?.isDelivered) {\n deliveryStatus = \"success\";\n orderStatus = \"success\";\n } else if (allItemsPackaged) {\n deliveryStatus = \"packaged\";\n orderStatus = \"success\";\n } else {\n deliveryStatus = \"pending\";\n orderStatus = \"success\";\n }\n\n const paymentMode = order.isCod ? \"CoD\" : \"Online\";\n const paymentStatus = status?.paymentStatus || \"pending\";\n const refundStatus = refund?.refundStatus || \"none\";\n const refundAmount = refund?.refundAmount\n ? parseFloat(refund.refundAmount.toString())\n : null;\n\n const items = await Promise.all(\n order.orderItems.map(async (item) => {\n const signedImages = item.product.images\n ? scaffoldAssetUrl(\n item.product.images as string[]\n )\n : [];\n return {\n productName: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n discountedPrice: parseFloat(\n item.discountedPrice?.toString() || item.price.toString()\n ),\n amount:\n parseFloat(item.price.toString()) * parseFloat(item.quantity),\n image: signedImages[0] || null,\n };\n })\n );\n\n return {\n id: order.id,\n orderId: `ORD${order.id}`,\n orderDate: order.createdAt.toISOString(),\n deliveryStatus,\n deliveryDate: order.slot?.deliveryTime.toISOString(),\n orderStatus,\n cancelReason: status?.cancelReason || null,\n paymentMode,\n totalAmount: Number(order.totalAmount),\n deliveryCharge: Number(order.deliveryCharge),\n paymentStatus,\n refundStatus,\n refundAmount,\n userNotes: order.userNotes || null,\n items,\n isFlashDelivery: order.isFlashDelivery,\n createdAt: order.createdAt.toISOString(),\n };\n })\n );\n\n return {\n success: true,\n data: mappedOrders,\n pagination: {\n page,\n pageSize,\n totalCount,\n totalPages: Math.ceil(totalCount / pageSize),\n },\n };\n }),\n\n getOrderById: protectedProcedure\n .input(z.object({ orderId: z.string() }))\n .query(async ({ input, ctx }): Promise => {\n const { orderId } = input;\n const userId = ctx.user.userId;\n\n const order = await getUserOrderByIdWithRelations(parseInt(orderId), userId);\n\n if (!order) {\n throw new Error(\"Order not found\");\n }\n\n const couponUsageData = await getUserCouponUsageForOrder(order.id);\n\n let couponData = null;\n if (couponUsageData.length > 0) {\n let totalDiscountAmount = 0;\n const orderTotal = parseFloat(order.totalAmount.toString());\n\n for (const usage of couponUsageData) {\n let discountAmount = 0;\n\n if (usage.coupon.discountPercent) {\n discountAmount =\n (orderTotal *\n parseFloat(usage.coupon.discountPercent.toString())) /\n 100;\n } else if (usage.coupon.flatDiscount) {\n discountAmount = parseFloat(usage.coupon.flatDiscount.toString());\n }\n\n if (\n usage.coupon.maxValue &&\n discountAmount > parseFloat(usage.coupon.maxValue.toString())\n ) {\n discountAmount = parseFloat(usage.coupon.maxValue.toString());\n }\n\n totalDiscountAmount += discountAmount;\n }\n\n couponData = {\n couponCode: couponUsageData\n .map((u) => u.coupon.couponCode)\n .join(\", \"),\n couponDescription: `${couponUsageData.length} coupons applied`,\n discountAmount: totalDiscountAmount,\n };\n }\n\n const status = order.orderStatus[0];\n const refund = order.refunds[0];\n\n type DeliveryStatus = \"cancelled\" | \"success\" | \"pending\" | \"packaged\";\n type OrderStatus = \"cancelled\" | \"success\";\n\n let deliveryStatus: DeliveryStatus;\n let orderStatusResult: OrderStatus;\n\n const allItemsPackaged = order.orderItems.every(\n (item) => item.is_packaged\n );\n\n if (status?.isCancelled) {\n deliveryStatus = \"cancelled\";\n orderStatusResult = \"cancelled\";\n } else if (status?.isDelivered) {\n deliveryStatus = \"success\";\n orderStatusResult = \"success\";\n } else if (allItemsPackaged) {\n deliveryStatus = \"packaged\";\n orderStatusResult = \"success\";\n } else {\n deliveryStatus = \"pending\";\n orderStatusResult = \"success\";\n }\n\n const paymentMode = order.isCod ? \"CoD\" : \"Online\";\n const paymentStatus = status?.paymentStatus || \"pending\";\n const refundStatus = refund?.refundStatus || \"none\";\n const refundAmount = refund?.refundAmount\n ? parseFloat(refund.refundAmount.toString())\n : null;\n\n const items = await Promise.all(\n order.orderItems.map(async (item) => {\n const signedImages = item.product.images\n ? scaffoldAssetUrl(\n item.product.images as string[]\n )\n : [];\n return {\n productName: item.product.name,\n quantity: parseFloat(item.quantity),\n price: parseFloat(item.price.toString()),\n discountedPrice: parseFloat(\n item.discountedPrice?.toString() || item.price.toString()\n ),\n amount:\n parseFloat(item.price.toString()) * parseFloat(item.quantity),\n image: signedImages[0] || null,\n };\n })\n );\n\n return {\n id: order.id,\n orderId: `ORD${order.id}`,\n orderDate: order.createdAt.toISOString(),\n deliveryStatus,\n deliveryDate: order.slot?.deliveryTime.toISOString(),\n orderStatus: orderStatusResult,\n cancellationStatus: orderStatusResult,\n cancelReason: status?.cancelReason || null,\n paymentMode,\n paymentStatus,\n refundStatus,\n refundAmount,\n userNotes: order.userNotes || null,\n items,\n couponCode: couponData?.couponCode || null,\n couponDescription: couponData?.couponDescription || null,\n discountAmount: couponData?.discountAmount || null,\n orderAmount: parseFloat(order.totalAmount.toString()),\n isFlashDelivery: order.isFlashDelivery,\n createdAt: order.createdAt.toISOString(),\n totalAmount: parseFloat(order.totalAmount.toString()),\n deliveryCharge: parseFloat(order.deliveryCharge.toString()),\n };\n }),\n\n cancelOrder: protectedProcedure\n .input(\n z.object({\n id: z.number(),\n reason: z.string().min(1, \"Cancellation reason is required\"),\n })\n )\n .mutation(async ({ input, ctx }): Promise => {\n try {\n const userId = ctx.user.userId;\n const { id, reason } = input;\n\n const order = await getUserOrderBasic(id);\n\n if (!order) {\n console.error(\"Order not found:\", id);\n throw new ApiError(\"Order not found\", 404);\n }\n\n if (order.userId !== userId) {\n console.error(\"Order does not belong to user:\", {\n orderId: id,\n orderUserId: order.userId,\n requestUserId: userId,\n });\n\n throw new ApiError(\"Order not found\", 404);\n }\n\n const status = order.orderStatus[0];\n if (!status) {\n console.error(\"Order status not found for order:\", id);\n throw new ApiError(\"Order status not found\", 400);\n }\n\n if (status.isCancelled) {\n console.error(\"Order is already cancelled:\", id);\n throw new ApiError(\"Order is already cancelled\", 400);\n }\n\n if (status.isDelivered) {\n console.error(\"Cannot cancel delivered order:\", id);\n throw new ApiError(\"Cannot cancel delivered order\", 400);\n }\n\n await cancelUserOrderTransaction(id, status.id, reason, order.isCod);\n\n await sendOrderCancelledNotification(userId, id.toString());\n\n await publishCancellation(id, 'user', reason);\n\n return { success: true, message: \"Order cancelled successfully\" };\n } catch (e) {\n console.log(e);\n throw new ApiError(\"failed to cancel order\");\n }\n }),\n\n updateUserNotes: protectedProcedure\n .input(\n z.object({\n id: z.number(),\n userNotes: z.string(),\n })\n )\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { id, userNotes } = input;\n\n const order = await getUserOrderBasic(id);\n\n if (!order) {\n console.error(\"Order not found:\", id);\n throw new ApiError(\"Order not found\", 404);\n }\n\n if (order.userId !== userId) {\n console.error(\"Order does not belong to user:\", {\n orderId: id,\n orderUserId: order.userId,\n requestUserId: userId,\n });\n throw new ApiError(\"Order not found\", 404);\n }\n\n const status = order.orderStatus[0];\n if (!status) {\n console.error(\"Order status not found for order:\", id);\n throw new ApiError(\"Order status not found\", 400);\n }\n\n if (status.isDelivered) {\n console.error(\"Cannot update notes for delivered order:\", id);\n throw new ApiError(\"Cannot update notes for delivered order\", 400);\n }\n\n if (status.isCancelled) {\n console.error(\"Cannot update notes for cancelled order:\", id);\n throw new ApiError(\"Cannot update notes for cancelled order\", 400);\n }\n\n await updateUserOrderNotes(id, userNotes);\n\n return { success: true, message: \"Notes updated successfully\" };\n }),\n\n getRecentlyOrderedProducts: protectedProcedure\n .input(\n z\n .object({\n limit: z.number().min(1).max(50).default(20),\n })\n .optional()\n )\n .query(async ({ input, ctx }): Promise => {\n const { limit = 20 } = input || {};\n const userId = ctx.user.userId;\n\n const thirtyDaysAgo = new Date();\n thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30);\n\n const recentOrderIds = await getUserRecentlyDeliveredOrderIds(userId, 10, thirtyDaysAgo);\n\n if (recentOrderIds.length === 0) {\n return { success: true, products: [] };\n }\n\n const productIds = await getUserProductIdsFromOrders(recentOrderIds);\n\n if (productIds.length === 0) {\n return { success: true, products: [] };\n }\n\n const productsWithUnits = await getUserProductsForRecentOrders(productIds, limit);\n\n const formattedProducts = await Promise.all(\n productsWithUnits.map(async (product) => {\n const nextDeliveryDate = await getNextDeliveryDate(product.id);\n return {\n id: product.id,\n name: product.name,\n shortDescription: product.shortDescription,\n price: product.price,\n unit: product.unitShortNotation,\n incrementStep: product.incrementStep,\n isOutOfStock: product.isOutOfStock,\n nextDeliveryDate: nextDeliveryDate\n ? nextDeliveryDate.toISOString()\n : null,\n images: scaffoldAssetUrl(\n (product.images as string[]) || []\n ),\n };\n })\n );\n\n return {\n success: true,\n products: formattedProducts,\n };\n }),\n});\n", "import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { claimUploadUrl, extractKeyFromPresignedUrl, scaffoldAssetUrl } from '@/src/lib/s3-client'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getProductById as getProductByIdFromCache, getAllProducts as getAllProductsFromCache } from '@/src/stores/product-store'\nimport dayjs from 'dayjs'\nimport {\n getUserProductDetailById as getUserProductDetailByIdInDb,\n getUserProductReviews as getUserProductReviewsInDb,\n getUserProductByIdBasic as getUserProductByIdBasicInDb,\n createUserProductReview as createUserProductReviewInDb,\n} from '@/src/dbService'\nimport type {\n UserProductDetail,\n UserProductDetailData,\n UserProductReviewsResponse,\n UserCreateReviewResponse,\n UserProductReviewWithSignedUrls,\n} from '@packages/shared'\n\nconst signProductImages = (product: UserProductDetailData): UserProductDetail => ({\n ...product,\n images: scaffoldAssetUrl(product.images || []),\n})\n\nexport const productRouter = router({\n getProductDetails: publicProcedure\n .input(z.object({\n id: z.string().regex(/^\\d+$/, 'Invalid product ID'),\n }))\n .query(async ({ input }): Promise => {\n const { id } = input;\n const productId = parseInt(id);\n\n if (isNaN(productId)) {\n throw new Error('Invalid product ID');\n }\n\n console.log('from the api to get product details')\n\n// First, try to get the product from Redis cache\n const cachedProduct = await getProductByIdFromCache(productId);\n \n if (cachedProduct) {\n // Filter delivery slots to only include those with future freeze times and not at full capacity\n const currentTime = new Date();\n const filteredSlots = cachedProduct.deliverySlots.filter(slot => \n dayjs(slot.freezeTime).isAfter(currentTime) && !slot.isCapacityFull\n );\n \n return {\n ...cachedProduct,\n deliverySlots: filteredSlots\n };\n }\n\n // If not in cache, fetch from database (fallback)\n const productData = await getUserProductDetailByIdInDb(productId)\n\n /*\n // Old implementation - direct DB queries:\n const productData = await db\n .select({\n id: productInfo.id,\n name: productInfo.name,\n shortDescription: productInfo.shortDescription,\n longDescription: productInfo.longDescription,\n price: productInfo.price,\n marketPrice: productInfo.marketPrice,\n images: productInfo.images,\n isOutOfStock: productInfo.isOutOfStock,\n storeId: productInfo.storeId,\n unitShortNotation: units.shortNotation,\n incrementStep: productInfo.incrementStep,\n productQuantity: productInfo.productQuantity,\n isFlashAvailable: productInfo.isFlashAvailable,\n flashPrice: productInfo.flashPrice,\n })\n .from(productInfo)\n .innerJoin(units, eq(productInfo.unitId, units.id))\n .where(eq(productInfo.id, productId))\n .limit(1);\n */\n\n if (!productData) {\n throw new Error('Product not found')\n }\n\n return signProductImages(productData)\n }),\n\n getProductReviews: publicProcedure\n .input(z.object({\n productId: z.number().int().positive(),\n limit: z.number().int().min(1).max(50).optional().default(10),\n offset: z.number().int().min(0).optional().default(0),\n }))\n .query(async ({ input }): Promise => {\n const { productId, limit, offset } = input;\n\n const { reviews, totalCount } = await getUserProductReviewsInDb(productId, limit, offset)\n\n /*\n // Old implementation - direct DB queries:\n const reviews = await db\n .select({\n id: productReviews.id,\n reviewBody: productReviews.reviewBody,\n ratings: productReviews.ratings,\n imageUrls: productReviews.imageUrls,\n reviewTime: productReviews.reviewTime,\n userName: users.name,\n })\n .from(productReviews)\n .innerJoin(users, eq(productReviews.userId, users.id))\n .where(eq(productReviews.productId, productId))\n .orderBy(desc(productReviews.reviewTime))\n .limit(limit)\n .offset(offset);\n\n const totalCountResult = await db\n .select({ count: sql`count(*)` })\n .from(productReviews)\n .where(eq(productReviews.productId, productId));\n\n const totalCount = Number(totalCountResult[0].count);\n const hasMore = offset + limit < totalCount;\n */\n\n const reviewsWithSignedUrls: UserProductReviewWithSignedUrls[] = reviews.map((review) => ({\n ...review,\n signedImageUrls: scaffoldAssetUrl(review.imageUrls || []),\n }))\n\n const hasMore = offset + limit < totalCount\n\n return { reviews: reviewsWithSignedUrls, hasMore }\n }),\n\n createReview: protectedProcedure\n .input(z.object({\n productId: z.number().int().positive(),\n reviewBody: z.string().min(1, 'Review body is required'),\n ratings: z.number().int().min(1).max(5),\n imageUrls: z.array(z.string()).optional().default([]),\n uploadUrls: z.array(z.string()).optional().default([]),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const { productId, reviewBody, ratings, imageUrls, uploadUrls } = input;\n const userId = ctx.user.userId;\n\n const product = await getUserProductByIdBasicInDb(productId)\n if (!product) {\n throw new ApiError('Product not found', 404)\n }\n\n const imageKeys = uploadUrls.map(item => extractKeyFromPresignedUrl(item))\n const newReview = await createUserProductReviewInDb(userId, productId, reviewBody, ratings, imageKeys)\n\n /*\n // Old implementation - direct DB queries:\n const product = await db.query.productInfo.findFirst({\n where: eq(productInfo.id, productId),\n });\n if (!product) {\n throw new ApiError('Product not found', 404);\n }\n\n const [newReview] = await db.insert(productReviews).values({\n userId,\n productId,\n reviewBody,\n ratings,\n imageUrls: uploadUrls.map(item => extractKeyFromPresignedUrl(item)),\n }).returning();\n */\n\n // Claim upload URLs\n if (uploadUrls && uploadUrls.length > 0) {\n try {\n await Promise.all(uploadUrls.map(url => claimUploadUrl(url)));\n } catch (error) {\n console.error('Error claiming upload URLs:', error);\n // Don't fail the review creation\n }\n }\n\n return { success: true, review: newReview }\n }),\n\n \n getAllProductsSummary: publicProcedure\n .query(async (): Promise => {\n // Get all products from cache\n const allCachedProducts = await getAllProductsFromCache();\n\n // Transform the cached products to match the expected summary format\n // (with empty deliverySlots and specialDeals arrays for summary view)\n const transformedProducts: UserProductDetail[] = allCachedProducts.map(product => ({\n ...product,\n images: product.images || [],\n deliverySlots: [],\n specialDeals: [],\n }))\n\n return transformedProducts\n }),\n\n});\n", "import { router, protectedProcedure, publicProcedure } from '@/src/trpc/trpc-index'\nimport { SignJWT } from 'jose'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter'\nimport { generateSignedUrlFromS3Url } from '@/src/lib/s3-client'\nimport {\n getUserProfileById as getUserProfileByIdInDb,\n getUserProfileDetailById as getUserProfileDetailByIdInDb,\n getUserWithCreds as getUserWithCredsInDb,\n upsertUserNotifCred as upsertUserNotifCredInDb,\n deleteUserUnloggedToken as deleteUserUnloggedTokenInDb,\n getUserUnloggedToken as getUserUnloggedTokenInDb,\n upsertUserUnloggedToken as upsertUserUnloggedTokenInDb,\n} from '@/src/dbService'\nimport type {\n UserSelfDataResponse,\n UserProfileCompleteResponse,\n UserSavePushTokenResponse,\n} from '@packages/shared'\n\nconst generateToken = async (userId: number): Promise => {\n return await new SignJWT({ userId })\n .setProtectedHeader({ alg: 'HS256' })\n .setExpirationTime('7d')\n .sign(getEncodedJwtSecret());\n};\n\nexport const userRouter = router({\n getSelfData: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const user = await getUserProfileByIdInDb(userId)\n\n if (!user) {\n throw new ApiError('User not found', 404);\n }\n\n // Get user details for profile image\n const userDetail = await getUserProfileDetailByIdInDb(userId)\n\n // Generate signed URL for profile image if it exists\n const profileImageSignedUrl = userDetail?.profileImage\n ? await generateSignedUrlFromS3Url(userDetail.profileImage)\n : null;\n\n return {\n success: true,\n data: {\n user: {\n id: user.id,\n name: user.name,\n email: user.email,\n mobile: user.mobile,\n profileImage: profileImageSignedUrl,\n bio: userDetail?.bio || null,\n dateOfBirth: userDetail?.dateOfBirth\n ? new Date(userDetail.dateOfBirth as any).toISOString()\n : null,\n gender: userDetail?.gender || null,\n occupation: userDetail?.occupation || null,\n },\n },\n }\n }),\n\n checkProfileComplete: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n if (!userId) {\n throw new ApiError('User not authenticated', 401);\n }\n\n const result = await getUserWithCredsInDb(userId)\n\n if (!result) {\n throw new ApiError('User not found', 404)\n }\n\n return {\n isComplete: !!(result.user.name && result.user.email && result.creds),\n };\n }),\n\n savePushToken: publicProcedure\n .input(z.object({ token: z.string() }))\n .mutation(async ({ input, ctx }): Promise => {\n const { token } = input;\n const userId = ctx.user?.userId;\n\n if (userId) {\n // AUTHENTICATED USER\n // Check if token exists in notif_creds for this user\n await upsertUserNotifCredInDb(userId, token)\n await deleteUserUnloggedTokenInDb(token)\n\n } else {\n // UNAUTHENTICATED USER\n // Save/update in unlogged_user_tokens\n const existing = await getUserUnloggedTokenInDb(token)\n if (existing) {\n await upsertUserUnloggedTokenInDb(token)\n } else {\n await upsertUserUnloggedTokenInDb(token)\n }\n }\n\n return { success: true }\n }),\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport {\n getUserActiveCouponsWithRelations as getUserActiveCouponsWithRelationsInDb,\n getUserAllCouponsWithRelations as getUserAllCouponsWithRelationsInDb,\n getUserReservedCouponByCode as getUserReservedCouponByCodeInDb,\n redeemUserReservedCoupon as redeemUserReservedCouponInDb,\n} from '@/src/dbService'\nimport type {\n UserCouponDisplay,\n UserEligibleCouponsResponse,\n UserMyCouponsResponse,\n UserRedeemCouponResponse,\n} from '@packages/shared'\n\nconst generateCouponDescription = (coupon: { discountPercent?: string | null; flatDiscount?: string | null; minOrder?: string | null; maxValue?: string | null }): string => {\n let desc = '';\n\n if (coupon.discountPercent) {\n desc += `${coupon.discountPercent}% off`;\n } else if (coupon.flatDiscount) {\n desc += `\u20B9${coupon.flatDiscount} off`;\n }\n\n if (coupon.minOrder) {\n desc += ` on orders above \u20B9${coupon.minOrder}`;\n }\n\n if (coupon.maxValue) {\n desc += ` (max discount \u20B9${coupon.maxValue})`;\n }\n\n return desc;\n};\n\nexport const userCouponRouter = router({\n getEligible: protectedProcedure\n .query(async ({ ctx }): Promise => {\n try {\n\n const userId = ctx.user.userId;\n \n const allCoupons = await getUserActiveCouponsWithRelationsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const allCoupons = await db.query.coupons.findMany({\n where: and(\n eq(coupons.isInvalidated, false),\n or(\n isNull(coupons.validTill),\n gt(coupons.validTill, new Date())\n )\n ),\n with: {\n usages: {\n where: eq(couponUsage.userId, userId)\n },\n applicableUsers: {\n with: {\n user: true\n }\n },\n applicableProducts: {\n with: {\n product: true\n }\n },\n }\n });\n */\n\n // Filter to only coupons applicable to current user\n const applicableCoupons = allCoupons.filter(coupon => {\n if(!coupon.isUserBased) return true;\n const applicableUsers = coupon.applicableUsers || [];\n return applicableUsers.some(au => au.userId === userId);\n });\n\n return { success: true, data: applicableCoupons };\n }\n catch(e) {\n console.log(e)\n throw new ApiError(\"Unable to get coupons\")\n }\n }),\n\n getProductCoupons: protectedProcedure\n .input(z.object({ productId: z.number().int().positive() }))\n .query(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { productId } = input;\n\n // Get all active, non-expired coupons\n const allCoupons = await getUserActiveCouponsWithRelationsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const allCoupons = await db.query.coupons.findMany({\n where: and(\n eq(coupons.isInvalidated, false),\n or(\n isNull(coupons.validTill),\n gt(coupons.validTill, new Date())\n )\n ),\n with: {\n usages: {\n where: eq(couponUsage.userId, userId)\n },\n applicableUsers: {\n with: {\n user: true\n }\n },\n applicableProducts: {\n with: {\n product: true\n }\n },\n }\n });\n */\n\n // Filter to only coupons applicable to current user and product\n const applicableCoupons = allCoupons.filter(coupon => {\n const applicableUsers = coupon.applicableUsers || [];\n const userApplicable = !coupon.isUserBased || applicableUsers.some(au => au.userId === userId);\n\n const applicableProducts = coupon.applicableProducts || [];\n const productApplicable = applicableProducts.length === 0 || applicableProducts.some(ap => ap.productId === productId);\n\n return userApplicable && productApplicable;\n });\n\n return { success: true, data: applicableCoupons };\n }),\n\n getMyCoupons: protectedProcedure\n .query(async ({ ctx }): Promise => {\n const userId = ctx.user.userId;\n\n const allCoupons = await getUserAllCouponsWithRelationsInDb(userId)\n\n /*\n // Old implementation - direct DB queries:\n const allCoupons = await db.query.coupons.findMany({\n with: {\n usages: {\n where: eq(couponUsage.userId, userId)\n },\n applicableUsers: {\n with: {\n user: true\n }\n }\n }\n });\n */\n\n // Filter coupons in JS: not invalidated, applicable to user, and not expired\n const applicableCoupons = allCoupons.filter(coupon => {\n const isNotInvalidated = !coupon.isInvalidated;\n const applicableUsers = coupon.applicableUsers || [];\n const isApplicable = coupon.isApplyForAll || applicableUsers.some(au => au.userId === userId);\n const isNotExpired = !coupon.validTill || new Date(coupon.validTill) > new Date();\n return isNotInvalidated && isApplicable && isNotExpired;\n });\n\n // Categorize coupons\n const personalCoupons: UserCouponDisplay[] = [];\n const generalCoupons: UserCouponDisplay[] = [];\n\n applicableCoupons.forEach(coupon => {\n const usageCount = coupon.usages.length;\n const isExpired = false; // Already filtered out expired coupons\n const isUsedUp = Boolean(coupon.maxLimitForUser && usageCount >= coupon.maxLimitForUser);\n\n const couponDisplay: UserCouponDisplay = {\n id: coupon.id,\n code: coupon.couponCode,\n discountType: coupon.discountPercent ? 'percentage' : 'flat',\n discountValue: parseFloat(coupon.discountPercent || coupon.flatDiscount || '0'),\n maxValue: coupon.maxValue ? parseFloat(coupon.maxValue) : undefined,\n minOrder: coupon.minOrder ? parseFloat(coupon.minOrder) : undefined,\n description: generateCouponDescription(coupon),\n validTill: coupon.validTill ? new Date(coupon.validTill) : undefined,\n usageCount,\n maxLimitForUser: coupon.maxLimitForUser ? parseInt(coupon.maxLimitForUser.toString()) : undefined,\n isExpired,\n isUsedUp,\n };\n\n if ((coupon.applicableUsers || []).some(au => au.userId === userId) && !coupon.isApplyForAll) {\n // Personal coupon\n personalCoupons.push(couponDisplay);\n } else if (coupon.isApplyForAll) {\n // General coupon\n generalCoupons.push(couponDisplay);\n }\n });\n\n return {\n success: true,\n data: {\n personal: personalCoupons,\n general: generalCoupons,\n }\n };\n }),\n\n redeemReservedCoupon: protectedProcedure\n .input(z.object({ secretCode: z.string() }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { secretCode } = input;\n\n const reservedCoupon = await getUserReservedCouponByCodeInDb(secretCode)\n\n /*\n // Old implementation - direct DB queries:\n const reservedCoupon = await db.query.reservedCoupons.findFirst({\n where: and(\n eq(reservedCoupons.secretCode, secretCode.toUpperCase()),\n eq(reservedCoupons.isRedeemed, false)\n ),\n });\n */\n\n if (!reservedCoupon) {\n throw new ApiError(\"Invalid or already redeemed coupon code\", 400);\n }\n\n // Check if already redeemed by this user (in case of multiple attempts)\n if (reservedCoupon.redeemedBy === userId) {\n throw new ApiError(\"You have already redeemed this coupon\", 400);\n }\n\n const couponResult = await redeemUserReservedCouponInDb(userId, reservedCoupon)\n\n /*\n // Old implementation - direct DB queries:\n const couponResult = await db.transaction(async (tx) => {\n const couponInsert = await tx.insert(coupons).values({\n couponCode: reservedCoupon.couponCode,\n isUserBased: true,\n discountPercent: reservedCoupon.discountPercent,\n flatDiscount: reservedCoupon.flatDiscount,\n minOrder: reservedCoupon.minOrder,\n productIds: reservedCoupon.productIds,\n maxValue: reservedCoupon.maxValue,\n isApplyForAll: false,\n validTill: reservedCoupon.validTill,\n maxLimitForUser: reservedCoupon.maxLimitForUser,\n exclusiveApply: reservedCoupon.exclusiveApply,\n createdBy: reservedCoupon.createdBy,\n }).returning();\n\n const coupon = couponInsert[0];\n\n await tx.insert(couponApplicableUsers).values({\n couponId: coupon.id,\n userId,\n });\n\n await tx.update(reservedCoupons).set({\n isRedeemed: true,\n redeemedBy: userId,\n redeemedAt: new Date(),\n }).where(eq(reservedCoupons.id, reservedCoupon.id));\n\n return coupon;\n });\n */\n\n return { success: true, coupon: couponResult };\n }),\n});\n", "// import Razorpay from \"razorpay\";\nimport { razorpayId, razorpaySecret } from \"@/src/lib/env-exporter\"\n\nexport class RazorpayPaymentService {\n // private static instance = new Razorpay({\n // key_id: razorpayId,\n // key_secret: razorpaySecret,\n // });\n //\n static async createOrder(orderId: number, amount: string) {\n // Create Razorpay order\n // const razorpayOrder = await this.instance.orders.create({\n // amount: parseFloat(amount) * 100, // Convert to paisa\n // currency: 'INR',\n // receipt: `order_${orderId}`,\n // notes: {\n // customerOrderId: orderId.toString(),\n // },\n // });\n //\n // return razorpayOrder;\n }\n\n static async insertPaymentRecord(orderId: number, razorpayOrder: any, tx?: unknown) {\n // Use transaction if provided, otherwise use db\n // const dbInstance = tx || db;\n //\n // // Insert payment record\n // const [payment] = await dbInstance\n // .insert(payments)\n // .values({\n // status: 'pending',\n // gateway: 'razorpay',\n // orderId,\n // token: orderId.toString(),\n // merchantOrderId: razorpayOrder.id,\n // payload: razorpayOrder,\n // })\n // .returning();\n //\n // return payment;\n }\n\n static async initiateRefund(paymentId: string, amount: number) {\n // const refund = await this.instance.payments.refund(paymentId, {\n // amount,\n // });\n // return refund;\n }\n\n static async fetchRefund(refundId: string) {\n // const refund = await this.instance.refunds.fetch(refundId);\n // return refund;\n }\n}\n", "\nimport { router, protectedProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod'\nimport { ApiError } from '@/src/lib/api-error'\nimport crypto from 'crypto'\nimport { razorpayId, razorpaySecret } from \"@/src/lib/env-exporter\"\nimport { RazorpayPaymentService } from \"@/src/lib/payments-utils\"\nimport {\n getUserPaymentOrderById as getUserPaymentOrderByIdInDb,\n getUserPaymentByOrderId as getUserPaymentByOrderIdInDb,\n getUserPaymentByMerchantOrderId as getUserPaymentByMerchantOrderIdInDb,\n updateUserPaymentSuccess as updateUserPaymentSuccessInDb,\n updateUserOrderPaymentStatus as updateUserOrderPaymentStatusInDb,\n markUserPaymentFailed as markUserPaymentFailedInDb,\n} from '@/src/dbService'\nimport type {\n UserPaymentOrderResponse,\n UserPaymentVerifyResponse,\n UserPaymentFailResponse,\n} from '@packages/shared'\n\n\n\n\nexport const paymentRouter = router({\n createRazorpayOrder: protectedProcedure //either create a new payment order or return the existing one\n .input(z.object({\n orderId: z.string(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { orderId } = input;\n\n const order = await getUserPaymentOrderByIdInDb(parseInt(orderId))\n\n /*\n // Old implementation - direct DB queries:\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, parseInt(orderId)),\n });\n */\n\n if (!order) {\n throw new ApiError(\"Order not found\", 404)\n }\n\n if (order.userId !== userId) {\n throw new ApiError(\"Order does not belong to user\", 403)\n }\n\n // Check for existing pending payment\n const existingPayment = await getUserPaymentByOrderIdInDb(parseInt(orderId))\n\n /*\n // Old implementation - direct DB queries:\n const existingPayment = await db.query.payments.findFirst({\n where: eq(payments.orderId, parseInt(orderId)),\n });\n */\n\n if (existingPayment && existingPayment.status === 'pending') {\n return {\n razorpayOrderId: existingPayment.merchantOrderId,\n key: razorpayId,\n };\n }\n\n // Create Razorpay order and insert payment record\n if (order.totalAmount === null) {\n throw new ApiError('Order total is missing', 400)\n }\n const razorpayOrder = await RazorpayPaymentService.createOrder(parseInt(orderId), order.totalAmount);\n await RazorpayPaymentService.insertPaymentRecord(parseInt(orderId), razorpayOrder);\n\n return {\n razorpayOrderId: 0,\n key: razorpayId,\n }\n }),\n\n\n\n verifyPayment: protectedProcedure\n .input(z.object({\n razorpay_payment_id: z.string(),\n razorpay_order_id: z.string(),\n razorpay_signature: z.string(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const { razorpay_payment_id, razorpay_order_id, razorpay_signature } = input;\n\n // Verify signature\n const expectedSignature = crypto\n .createHmac('sha256', razorpaySecret)\n .update(razorpay_order_id + '|' + razorpay_payment_id)\n .digest('hex');\n\n if (expectedSignature !== razorpay_signature) {\n throw new ApiError(\"Invalid payment signature\", 400);\n }\n\n // Get current payment record\n const currentPayment = await getUserPaymentByMerchantOrderIdInDb(razorpay_order_id)\n\n /*\n // Old implementation - direct DB queries:\n const currentPayment = await db.query.payments.findFirst({\n where: eq(payments.merchantOrderId, razorpay_order_id),\n });\n */\n\n if (!currentPayment) {\n throw new ApiError(\"Payment record not found\", 404);\n }\n\n // Update payment status and payload\n const updatedPayload = {\n ...((currentPayment.payload as any) || {}),\n payment_id: razorpay_payment_id,\n signature: razorpay_signature,\n };\n\n const updatedPayment = await updateUserPaymentSuccessInDb(razorpay_order_id, updatedPayload)\n\n /*\n // Old implementation - direct DB queries:\n const [updatedPayment] = await db\n .update(payments)\n .set({\n status: 'success',\n payload: updatedPayload,\n })\n .where(eq(payments.merchantOrderId, razorpay_order_id))\n .returning();\n\n await db\n .update(orderStatus)\n .set({\n paymentStatus: 'success',\n })\n .where(eq(orderStatus.orderId, updatedPayment.orderId));\n */\n\n if (!updatedPayment) {\n throw new ApiError(\"Payment record not found\", 404)\n }\n\n await updateUserOrderPaymentStatusInDb(updatedPayment.orderId, 'success')\n\n return {\n success: true,\n message: \"Payment verified successfully\",\n }\n }),\n\n markPaymentFailed: protectedProcedure\n .input(z.object({\n merchantOrderId: z.string(),\n }))\n .mutation(async ({ input, ctx }): Promise => {\n const userId = ctx.user.userId;\n const { merchantOrderId } = input;\n\n // Find payment by merchantOrderId\n const payment = await getUserPaymentByMerchantOrderIdInDb(merchantOrderId)\n\n /*\n // Old implementation - direct DB queries:\n const payment = await db.query.payments.findFirst({\n where: eq(payments.merchantOrderId, merchantOrderId),\n });\n */\n\n if (!payment) {\n throw new ApiError(\"Payment not found\", 404);\n }\n\n // Check if payment belongs to user's order\n const order = await getUserPaymentOrderByIdInDb(payment.orderId)\n\n /*\n // Old implementation - direct DB queries:\n const order = await db.query.orders.findFirst({\n where: eq(orders.id, payment.orderId),\n });\n */\n\n if (!order || order.userId !== userId) {\n throw new ApiError(\"Payment does not belong to user\", 403);\n }\n\n // Update payment status to failed\n await markUserPaymentFailedInDb(payment.id)\n\n /*\n // Old implementation - direct DB queries:\n await db\n .update(payments)\n .set({ status: 'failed' })\n .where(eq(payments.id, payment.id));\n */\n\n return {\n success: true,\n message: \"Payment marked as failed\",\n }\n }),\n\n});\n", "import { router, protectedProcedure } from '@/src/trpc/trpc-index';\nimport { z } from 'zod';\nimport { generateUploadUrl } from '@/src/lib/s3-client';\nimport { ApiError } from '@/src/lib/api-error';\n\nexport const fileUploadRouter = router({\n generateUploadUrls: protectedProcedure\n .input(z.object({\n contextString: z.enum(['review', 'product_info', 'notification', 'complaint', 'profile', 'tags']),\n mimeTypes: z.array(z.string()),\n }))\n .mutation(async ({ input }): Promise<{ uploadUrls: string[] }> => {\n const { contextString, mimeTypes } = input;\n\n const uploadUrls: string[] = [];\n const keys: string[] = [];\n\n for (const mimeType of mimeTypes) {\n // Generate key based on context and mime type\n let folder: string;\n if (contextString === 'review') {\n folder = 'review-images';\n } else if(contextString === 'product_info') {\n folder = 'product-images';\n }\n // else if(contextString === 'review_response') {\n // folder = 'review-response-images'\n // } \n else if(contextString === 'notification') {\n folder = 'notification-images'\n } else if (contextString === 'complaint') {\n folder = 'complaint-images'\n } else if (contextString === 'profile') {\n folder = 'profile-images'\n } else if (contextString === 'tags') {\n folder = 'tags'\n } else {\n folder = '';\n }\n\n const extension = mimeType === 'image/jpeg' ? '.jpg' :\n mimeType === 'image/png' ? '.png' :\n mimeType === 'image/gif' ? '.gif' : '.jpg';\n const key = `${folder}/${Date.now()}${extension}`;\n\n try {\n const uploadUrl = await generateUploadUrl(key, mimeType);\n uploadUrls.push(uploadUrl);\n keys.push(key);\n \n } catch (error) {\n console.error('Error generating upload URL:', error);\n throw new ApiError('Failed to generate upload URL', 500);\n }\n }\n \n return { uploadUrls };\n }),\n});\n\nexport type FileUploadRouter = typeof fileUploadRouter;\n", "import { router, publicProcedure } from '@/src/trpc/trpc-index';\nimport { z } from 'zod';\nimport { getTagsByStoreId } from '@/src/stores/product-tag-store';\nimport { ApiError } from '@/src/lib/api-error';\n\nexport const tagsRouter = router({\n getTagsByStore: publicProcedure\n .input(z.object({\n storeId: z.number(),\n }))\n .query(async ({ input }) => {\n const { storeId } = input;\n\n // Get tags from cache that are related to this store\n const tags = await getTagsByStoreId(storeId);\n \n\n return {\n tags: tags.map(tag => ({\n id: tag.id,\n tagName: tag.tagName,\n tagDescription: tag.tagDescription,\n imageUrl: tag.imageUrl,\n productIds: tag.productIds,\n })),\n };\n }),\n});\n", "import { router } from '@/src/trpc/trpc-index';\nimport { addressRouter } from '@/src/trpc/apis/user-apis/apis/address';\nimport { authRouter } from '@/src/trpc/apis/user-apis/apis/auth';\nimport { bannerRouter } from '@/src/trpc/apis/user-apis/apis/banners';\nimport { cartRouter } from '@/src/trpc/apis/user-apis/apis/cart';\nimport { complaintRouter } from '@/src/trpc/apis/user-apis/apis/complaint';\nimport { orderRouter } from '@/src/trpc/apis/user-apis/apis/order';\nimport { productRouter } from '@/src/trpc/apis/user-apis/apis/product';\nimport { slotsRouter } from '@/src/trpc/apis/user-apis/apis/slots';\nimport { userRouter as userDataRouter } from '@/src/trpc/apis/user-apis/apis/user';\nimport { userCouponRouter } from '@/src/trpc/apis/user-apis/apis/coupon';\nimport { paymentRouter } from '@/src/trpc/apis/user-apis/apis/payments';\nimport { storesRouter } from '@/src/trpc/apis/user-apis/apis/stores';\nimport { fileUploadRouter } from '@/src/trpc/apis/user-apis/apis/file-upload';\nimport { tagsRouter } from '@/src/trpc/apis/user-apis/apis/tags';\n\nexport const userRouter = router({\n address: addressRouter,\n auth: authRouter,\n banner: bannerRouter,\n cart: cartRouter,\n complaint: complaintRouter,\n order: orderRouter,\n product: productRouter,\n slots: slotsRouter,\n user: userDataRouter,\n coupon: userCouponRouter,\n payment: paymentRouter,\n stores: storesRouter,\n fileUpload: fileUploadRouter,\n tags: tagsRouter,\n});\n\nexport type UserRouter = typeof userRouter;\n", "import { router, publicProcedure } from '@/src/trpc/trpc-index'\nimport { z } from 'zod';\nimport { adminRouter } from '@/src/trpc/apis/admin-apis/apis/admin-trpc-index'\nimport { userRouter } from '@/src/trpc/apis/user-apis/apis/user-trpc-index'\nimport { commonApiRouter } from '@/src/trpc/apis/common-apis/common-trpc-index'\nimport { scaffoldProducts } from './apis/common-apis/common';\nimport { scaffoldStores, scaffoldStoreWithProducts } from './apis/user-apis/apis/stores';\nimport { scaffoldSlotsWithProducts } from './apis/user-apis/apis/slots';\nimport { scaffoldEssentialConsts } from './apis/common-apis/common-trpc-index';\nimport { scaffoldBanners } from './apis/user-apis/apis/banners';\n\n// Create the main app router\nexport const appRouter = router({\n hello: publicProcedure\n .input(z.object({ name: z.string() }))\n .query(({ input }) => {\n return { greeting: `Hello ${input.name}!` };\n }),\n admin: adminRouter,\n user: userRouter,\n common: commonApiRouter,\n});\n\n\n// Export type definition of API\nexport type AppRouter = typeof appRouter;\n\nexport type AllProductsApiType = Awaited>;\nexport type StoresApiType = Awaited>;\nexport type SlotsApiType = Awaited>;\nexport type EssentialConstsApiType = Awaited>;\nexport type BannersApiType = Awaited>;\nexport type StoreWithProductsApiType = Awaited>;\n", "import { Hono } from 'hono'\nimport { cors } from 'hono/cors'\nimport { logger } from 'hono/logger'\nimport { trpcServer } from '@hono/trpc-server'\nimport { getStaffUserById, isUserSuspended } from '@/src/dbService'\nimport mainRouter from '@/src/main-router'\nimport { appRouter } from '@/src/trpc/router'\nimport { TRPCError } from '@trpc/server'\nimport { jwtVerify } from 'jose'\nimport { getEncodedJwtSecret } from '@/src/lib/env-exporter'\n\nexport const createApp = () => {\n const app = new Hono()\n\n // CORS middleware\n app.use(cors({\n origin: 'http://localhost:5174',\n allowMethods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],\n allowHeaders: ['Origin', 'X-Requested-With', 'Content-Type', 'Accept', 'Authorization'],\n credentials: true,\n }))\n\n // Logger middleware\n app.use(logger())\n\n // tRPC middleware\n app.use('/api/trpc/*', trpcServer({\n router: appRouter,\n createContext: async ({ req }) => {\n let user = null\n let staffUser = null\n const authHeader = req.headers.get('authorization')\n\n if (authHeader?.startsWith('Bearer ')) {\n const token = authHeader.substring(7)\n try {\n const { payload } = await jwtVerify(token, getEncodedJwtSecret())\n const decoded = payload as any\n\n // Check if this is a staff token (has staffId)\n if (decoded.staffId) {\n // This is a staff token, verify staff exists\n const staff = await getStaffUserById(decoded.staffId)\n\n if (staff) {\n user = staffUser\n staffUser = {\n id: staff.id,\n name: staff.name,\n }\n }\n } else {\n // This is a regular user token\n user = decoded\n\n // Check if user is suspended\n const suspended = await isUserSuspended(user.userId)\n\n if (suspended) {\n throw new TRPCError({\n code: 'FORBIDDEN',\n message: 'Account suspended',\n })\n }\n }\n } catch (err) {\n // Invalid token, both user and staffUser remain null\n }\n }\n return { req, user, staffUser }\n },\n onError({ error, path, type, ctx }) {\n console.error('\uD83D\uDEA8 tRPC Error :', {\n path,\n type,\n code: error.code,\n message: error.message,\n userId: ctx?.user?.userId,\n stack: error.stack,\n })\n },\n }))\n\n // Mount main router\n app.route('/api', mainRouter)\n\n // Global error handler\n app.onError((err, c) => {\n console.error(err)\n // Handle different error types\n let status = 500\n let message = 'Internal Server Error'\n\n if (err instanceof TRPCError) {\n // Map TRPC error codes to HTTP status codes\n const trpcStatusMap: Record = {\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n TIMEOUT: 408,\n CONFLICT: 409,\n PRECONDITION_FAILED: 412,\n PAYLOAD_TOO_LARGE: 413,\n METHOD_NOT_SUPPORTED: 405,\n UNPROCESSABLE_CONTENT: 422,\n TOO_MANY_REQUESTS: 429,\n INTERNAL_SERVER_ERROR: 500,\n }\n status = trpcStatusMap[err.code] || 500\n message = err.message\n } else if ((err as any).statusCode) {\n status = (err as any).statusCode\n message = err.message\n } else if ((err as any).status) {\n status = (err as any).status\n message = err.message\n } else if (err.message) {\n message = err.message\n }\n\n return c.json({ message }, status as any)\n })\n\n return app\n}\n", "// This loads all middlewares exposed on the middleware object and then starts\n// the invocation chain. The big idea is that we can add these to the middleware\n// export dynamically through wrangler, or we can potentially let users directly\n// add them as a sort of \"plugin\" system.\n\nimport ENTRY, { __INTERNAL_WRANGLER_MIDDLEWARE__ } from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/bundle-aek2Ls/middleware-insertion-facade.js\";\nimport { __facade_invoke__, __facade_register__, Dispatcher } from \"/Users/mohammedshafiuddin/WebDev/freshyo/node_modules/wrangler/templates/middleware/common.ts\";\nimport type { WorkerEntrypointConstructor } from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/bundle-aek2Ls/middleware-insertion-facade.js\";\n\n// Preserve all the exports from the worker\nexport * from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/.wrangler/tmp/bundle-aek2Ls/middleware-insertion-facade.js\";\n\nclass __Facade_ScheduledController__ implements ScheduledController {\n\treadonly #noRetry: ScheduledController[\"noRetry\"];\n\n\tconstructor(\n\t\treadonly scheduledTime: number,\n\t\treadonly cron: string,\n\t\tnoRetry: ScheduledController[\"noRetry\"]\n\t) {\n\t\tthis.#noRetry = noRetry;\n\t}\n\n\tnoRetry() {\n\t\tif (!(this instanceof __Facade_ScheduledController__)) {\n\t\t\tthrow new TypeError(\"Illegal invocation\");\n\t\t}\n\t\t// Need to call native method immediately in case uncaught error thrown\n\t\tthis.#noRetry();\n\t}\n}\n\nfunction wrapExportedHandler(worker: ExportedHandler): ExportedHandler {\n\t// If we don't have any middleware defined, just return the handler as is\n\tif (\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__ === undefined ||\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__.length === 0\n\t) {\n\t\treturn worker;\n\t}\n\t// Otherwise, register all middleware once\n\tfor (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {\n\t\t__facade_register__(middleware);\n\t}\n\n\tconst fetchDispatcher: ExportedHandlerFetchHandler = function (\n\t\trequest,\n\t\tenv,\n\t\tctx\n\t) {\n\t\tif (worker.fetch === undefined) {\n\t\t\tthrow new Error(\"Handler does not export a fetch() function.\");\n\t\t}\n\t\treturn worker.fetch(request, env, ctx);\n\t};\n\n\treturn {\n\t\t...worker,\n\t\tfetch(request, env, ctx) {\n\t\t\tconst dispatcher: Dispatcher = function (type, init) {\n\t\t\t\tif (type === \"scheduled\" && worker.scheduled !== undefined) {\n\t\t\t\t\tconst controller = new __Facade_ScheduledController__(\n\t\t\t\t\t\tDate.now(),\n\t\t\t\t\t\tinit.cron ?? \"\",\n\t\t\t\t\t\t() => {}\n\t\t\t\t\t);\n\t\t\t\t\treturn worker.scheduled(controller, env, ctx);\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn __facade_invoke__(request, env, ctx, dispatcher, fetchDispatcher);\n\t\t},\n\t};\n}\n\nfunction wrapWorkerEntrypoint(\n\tklass: WorkerEntrypointConstructor\n): WorkerEntrypointConstructor {\n\t// If we don't have any middleware defined, just return the handler as is\n\tif (\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__ === undefined ||\n\t\t__INTERNAL_WRANGLER_MIDDLEWARE__.length === 0\n\t) {\n\t\treturn klass;\n\t}\n\t// Otherwise, register all middleware once\n\tfor (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {\n\t\t__facade_register__(middleware);\n\t}\n\n\t// `extend`ing `klass` here so other RPC methods remain callable\n\treturn class extends klass {\n\t\t#fetchDispatcher: ExportedHandlerFetchHandler> = (\n\t\t\trequest,\n\t\t\tenv,\n\t\t\tctx\n\t\t) => {\n\t\t\tthis.env = env;\n\t\t\tthis.ctx = ctx;\n\t\t\tif (super.fetch === undefined) {\n\t\t\t\tthrow new Error(\"Entrypoint class does not define a fetch() function.\");\n\t\t\t}\n\t\t\treturn super.fetch(request);\n\t\t};\n\n\t\t#dispatcher: Dispatcher = (type, init) => {\n\t\t\tif (type === \"scheduled\" && super.scheduled !== undefined) {\n\t\t\t\tconst controller = new __Facade_ScheduledController__(\n\t\t\t\t\tDate.now(),\n\t\t\t\t\tinit.cron ?? \"\",\n\t\t\t\t\t() => {}\n\t\t\t\t);\n\t\t\t\treturn super.scheduled(controller);\n\t\t\t}\n\t\t};\n\n\t\tfetch(request: Request) {\n\t\t\treturn __facade_invoke__(\n\t\t\t\trequest,\n\t\t\t\tthis.env,\n\t\t\t\tthis.ctx,\n\t\t\t\tthis.#dispatcher,\n\t\t\t\tthis.#fetchDispatcher\n\t\t\t);\n\t\t}\n\t};\n}\n\nlet WRAPPED_ENTRY: ExportedHandler | WorkerEntrypointConstructor | undefined;\nif (typeof ENTRY === \"object\") {\n\tWRAPPED_ENTRY = wrapExportedHandler(ENTRY);\n} else if (typeof ENTRY === \"function\") {\n\tWRAPPED_ENTRY = wrapWorkerEntrypoint(ENTRY);\n}\nexport default WRAPPED_ENTRY;\n", "\t\t\t\timport worker, * as OTHER_EXPORTS from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/worker.ts\";\n\t\t\t\timport * as __MIDDLEWARE_0__ from \"/Users/mohammedshafiuddin/WebDev/freshyo/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts\";\nimport * as __MIDDLEWARE_1__ from \"/Users/mohammedshafiuddin/WebDev/freshyo/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts\";\n\n\t\t\t\texport * from \"/Users/mohammedshafiuddin/WebDev/freshyo/apps/backend/worker.ts\";\n\n\t\t\t\texport const __INTERNAL_WRANGLER_MIDDLEWARE__ = [\n\t\t\t\t\t\n\t\t\t\t\t__MIDDLEWARE_0__.default,__MIDDLEWARE_1__.default\n\t\t\t\t]\n\t\t\t\texport default worker;", "import type { ExecutionContext, D1Database } from '@cloudflare/workers-types'\n\nexport default {\n async fetch(\n request: Request,\n env: Record & { DB?: D1Database },\n ctx: ExecutionContext\n ) {\n ;(globalThis as any).ENV = env\n const { createApp } = await import('./src/app')\n const { initDb } = await import('./src/dbService')\n if (env.DB) {\n initDb(env.DB)\n }\n const app = createApp()\n return app.fetch(request, env, ctx)\n },\n}\n", "import type { Middleware } from \"./common\";\n\nconst drainBody: Middleware = async (request, env, _ctx, middlewareCtx) => {\n\ttry {\n\t\treturn await middlewareCtx.next(request, env);\n\t} finally {\n\t\ttry {\n\t\t\tif (request.body !== null && !request.bodyUsed) {\n\t\t\t\tconst reader = request.body.getReader();\n\t\t\t\twhile (!(await reader.read()).done) {}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(\"Failed to drain the unused request body.\", e);\n\t\t}\n\t}\n};\n\nexport default drainBody;\n", "import type { Middleware } from \"./common\";\n\ninterface JsonError {\n\tmessage?: string;\n\tname?: string;\n\tstack?: string;\n\tcause?: JsonError;\n}\n\nfunction reduceError(e: any): JsonError {\n\treturn {\n\t\tname: e?.name,\n\t\tmessage: e?.message ?? String(e),\n\t\tstack: e?.stack,\n\t\tcause: e?.cause === undefined ? undefined : reduceError(e.cause),\n\t};\n}\n\n// See comment in `bundle.ts` for details on why this is needed\nconst jsonError: Middleware = async (request, env, _ctx, middlewareCtx) => {\n\ttry {\n\t\treturn await middlewareCtx.next(request, env);\n\t} catch (e: any) {\n\t\tconst error = reduceError(e);\n\t\treturn Response.json(error, {\n\t\t\tstatus: 500,\n\t\t\theaders: { \"MF-Experimental-Error-Stack\": \"true\" },\n\t\t});\n\t}\n};\n\nexport default jsonError;\n", "export type Awaitable = T | Promise;\n// TODO: allow dispatching more events?\nexport type Dispatcher = (\n\ttype: \"scheduled\",\n\tinit: { cron?: string }\n) => Awaitable;\n\nexport type IncomingRequest = Request<\n\tunknown,\n\tIncomingRequestCfProperties\n>;\n\nexport interface MiddlewareContext {\n\tdispatch: Dispatcher;\n\tnext(request: IncomingRequest, env: any): Awaitable;\n}\n\nexport type Middleware = (\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tmiddlewareCtx: MiddlewareContext\n) => Awaitable;\n\nconst __facade_middleware__: Middleware[] = [];\n\n// The register functions allow for the insertion of one or many middleware,\n// We register internal middleware first in the stack, but have no way of controlling\n// the order that addMiddleware is run in service workers so need an internal function.\nexport function __facade_register__(...args: (Middleware | Middleware[])[]) {\n\t__facade_middleware__.push(...args.flat());\n}\nexport function __facade_registerInternal__(\n\t...args: (Middleware | Middleware[])[]\n) {\n\t__facade_middleware__.unshift(...args.flat());\n}\n\nfunction __facade_invokeChain__(\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tdispatch: Dispatcher,\n\tmiddlewareChain: Middleware[]\n): Awaitable {\n\tconst [head, ...tail] = middlewareChain;\n\tconst middlewareCtx: MiddlewareContext = {\n\t\tdispatch,\n\t\tnext(newRequest, newEnv) {\n\t\t\treturn __facade_invokeChain__(newRequest, newEnv, ctx, dispatch, tail);\n\t\t},\n\t};\n\treturn head(request, env, ctx, middlewareCtx);\n}\n\nexport function __facade_invoke__(\n\trequest: IncomingRequest,\n\tenv: any,\n\tctx: ExecutionContext,\n\tdispatch: Dispatcher,\n\tfinalMiddleware: Middleware\n): Awaitable {\n\treturn __facade_invokeChain__(request, env, ctx, dispatch, [\n\t\t...__facade_middleware__,\n\t\tfinalMiddleware,\n\t]);\n}\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,0BAA0B,OAAO,MAAM;AAC/C,QAAM,UAAU,IAAI,QAAQ,OAAO,IAAI;AACvC,UAAQ,QAAQ,OAAO,kBAAkB;AACzC,SAAO;AACR;AAJA;AAAA;AAAA;AAAS;AAMT,eAAW,QAAQ,IAAI,MAAM,WAAW,OAAO;AAAA,MAC9C,MAAM,QAAQ,SAAS,UAAU;AAChC,eAAO,QAAQ,MAAM,QAAQ,SAAS;AAAA,UACrC,0BAA0B,MAAM,MAAM,QAAQ;AAAA,QAC/C,CAAC;AAAA,MACF;AAAA,IACD,CAAC;AAAA;AAAA;;;ACQ+B,SAAS,0BAA0B,MAAM;AACxE,SAAO,IAAI,MAAM,WAAW,8BAA8B;AAC3D;AACgC,SAAS,eAAe,MAAM;AAC7D,QAAM,KAAK,6BAAM;AAChB,UAAM,0BAA0B,IAAI;AAAA,EACrC,GAFW;AAGX,SAAO,OAAO,OAAO,IAAI,EAAE,WAAW,KAAK,CAAC;AAC7C;AAOgC,SAAS,oBAAoB,MAAM;AAClE,SAAO,MAAM;AAAA,IACZ,YAAY;AAAA,IACZ,cAAc;AACb,YAAM,IAAI,MAAM,WAAW,8BAA8B;AAAA,IAC1D;AAAA,EACD;AACD;AA1CA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA;AAoByC;AAGA;AAYA;AAAA;AAAA;;;ACnCzC,IACM,aACA,iBACA,YAsBO,kBAwBA,iBASA,oBAGA,2BAwBA,8BAYA,aAsFA,qBAgCA;AAvNb;AAAA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AAA,MAC7B,4BAA4B;AAAA,MAC5B,gBAAgB;AAAA,MAChB,cAAc;AAAA,MACd,eAAe;AAAA,MACf,kBAAkB;AAAA,MAClB,WAAW;AAAA,MACX,QAAQ;AAAA,MACR,iBAAiB;AAAA,IAClB;AAzNa;AAAA;AAAA;;;ACHb,IAEM,eACO,kBACE,MAAM,UAAU,UAGzB,cAMJ,OACA,aACA,6BACA,qCACA,qCACA,aACA,mBACA,MACA,MACA,OACA,OACA,QACA,WACA,mBACA,iBACA,UACA,KACA,WACA,QACA,YACA,MACA,aACA,KACA,YACA,UACA,UACA,cACA,UACA,wBACA,iBACAC,SACA,MACA,WACA,eACA,aACA,IACA,KACA,MACA,KACA,MACA,iBACA,qBACA,cACA,SACA,oBACA,gBACA,QACA,eACA,iBACA,sBACA,QACA,OACA,QACA,OACA,kBACA,kBACA,OACA,QACA,SACA,UACA,QACA,YACA,gBACA,YACA,WACAC,SACA,SACA,MACA,UACA,SACA,SACA,SACA,QACA,WACA,QACA,SACA,SACA,QACA,WACA,QACA,YACA,YACA,SACA,cACA,UACA,eACA,WACA,eACA,iBACA,mBACA,oBACA,OACA,kBACA,WACA,4BACA,2BACA,eACA,aACA,cACA,iBACA,UACA,OACA,gBAEI,UA8GC;AAnOP,IAAAC,gBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AACA;AACA,IAAM,gBAAgB,WAAW,SAAS;AACnC,IAAM,mBAAmB,cAAc;AACvC,KAAM,EAAE,MAAM,UAAU,aAAa;AAAA,MAC1C;AAAA,IACF;AACA,IAAM,eAAe,IAAI,QAAa;AAAA,MACpC,KAAK,cAAc;AAAA,MACnB;AAAA,MACA;AAAA,IACF,CAAC;AACM,KAAM;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAAH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAAC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,QACE;AACJ,IAAM,WAAW;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA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a;AAYN,IAAM,iCAAN,cAA6C,mBAAgB;AAAA,MAChE,OAAO;AAAA,MACP,SAAS;AAAA,MACT,YAAY,MAAM;AACd,cAAM;AAAA,UACF,MAAM;AAAA,UACN,QAAQ;AAAA,UACR,GAAG;AAAA,QACP,CAAC;AACD,eAAO,eAAe,MAAM,+BAA+B,SAAS;AAAA,MACxE;AAAA,IACJ;AAXa;AAAA;AAAA;;;AC7Kb,IAAM,IACA,MACA,KACA,MACA,OACA,OACA,MACA,MACA,MACA,KACA,MACA,MACA,KACA,KACA,MACA,KACA,OACA,MACA,KACA,MACA,OACA,OACA,MACA,KACA,MACA,MACA,OACA,OACA,KACA,MACA,KACA,OACA,SACA,MACA,KACA,KACA,IACA,KACA,MACA,MACA,QACA,MACA,MACA,KACA,MACA,MACA,MACA,MACA,MACA,KACA,MACA,KACA,MACA,MACA,KACA,MACA,KACA,KACA,KACA,IACA,KACA,OACA,KACA,MACA,OACA,QACA,QACA,SACA,MACA,MACA,KACA,OACA,QACA,WACA,MACA,KACA,MACA,MACA,KACA,MACA,MACA,KACA,MACA,KACA,MACA,OACA,MACA,KACA,MACA,MACA,OACA,QACA,OACA,QACA,QACA,OACA,OACA,MACA,KACA,MACA,MACA,QACA,QACA,SACA,OACA,KACA,MACA,OACA,MACA,MACA,OACA,KACA,QACA,MACA,KACA,OACA,QACA,OACA,QACA,QACA,QACA,MACA,MACA,OACA,OACA,UACA,UACA,YACA,MACA,OACA,QACA,OACA,MACA,MACA,KACA,MACA,MACA,MACA,OACA,OACA,KACA,MACA,MACA,MACA,OACA,KACA,IACA,MACA,KACA,OACA,QACA,MACA,OACA,MACA,OACA,OACA,QACA,QACA,SACA,MACA,OACA,OACA,QACA,SACA,QACA,QACA,SACA,OACA,QACA,MACA,OACA,MACA,OACA,OACA,MACA,OACA,MACA,OACA,KACA,MACA,OACA,OACA,OACA,KACA,MACA,MACA,OACA,MACA,KACA,KACA,MACA,OACA,MACA,OACA,MACA,OACA,OACA,MACA,OACA,QACA,OACA,QACA,KACA,MACA,OACA,OACA,KACA,KACA,MACA,OACA,MACA,OACA,MACA,IACA,KACA,MACA,MACA,KACA,MACA,KACA,MACA,KACA,KACA,MACA,KACA,OACA,MACA,KACA,OACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,MACA,MACA,KACA,MACA,KACA,MACA,KACA,MACA,IACA,KACA,MACA,KACA,KACA,MACA,MACA,KACA,KACA,KACA,IACA,MACA,OACA,QACA,SACA,QACA,SACA,QACA,OACA,QACA,OACA,QACA,OACA,MACA,OACA,OACA,MACA,OACA,OACA,OACA,QACA,QACA,QACA,SACA,SACA,MACA,OACA,QACA,QACA,OACA,QACA,OACA,QACA,OACA,OACA,QACA,SACA,QACA,SACA,UACA,QACA,QACA,SACA,SACA,UACA,OACA,QACA,OACA,QACA,QACA,MACA,OACA,OACA,OACA,QACA,QACA,MACA,OACA,OACA,QACA,QACA,OACA,MACA,OACA,OACA,MACA,OACA,OACA,MACA,OACA,OACA,MACA,MACA,KACA,MACA,OACA,QACA,OACA,OACA,QACA,SACA,OACA,OACA,QACA,QACA,OACA,QACA,QACA,MACA,MACA,OACA,OACA,OACA,MACA,OACA,QACA,OACA,QACA,OACA,OACA,QACA,QACA,KACA,QACA,KACA,QACA,KACA,MACA,KACA,MACA,MACA,QACA,KACA,KACA,MACA,MACA,MACA,IACA,KACA,MACA,KACA,MACA,OACA,KACA,MACA,KACA,KACA,KACA,OACA,QACA,MACA,OACA,OACA,OACA,MACA,MACA,OACA,MACA,MACA,MACA,KACA,MACA,MACA,KACA,OACA,KACA,OACA,MACA,KACA,OACA,MACA,OACA,OACA,OACA,OACA,MACA,MACA,OACA,MACA,KACA,MACA,OACA,QACA,QACA,MACA,OACA,OACA,IACA,KACA,KACA,MACA,KACA,OACA,QACA,QACA,UACA,MACA,IACA,QACA,SACA,KACA,OACA,QACA,QACA,SACA,OACA,QACA,QACA,QACA,SACA,SACA,OACA,QACA,QACA,MACA,MACA,OACA,KACA,MACA,MACA,OACA,OACA,KACA,MACA,MACA,MACA,OACA,OACA,KACA,KACA,OACA,KACA,OACA,MACA,MACA,OACA,OACA,QACA,MACA,KACA,MACA,MACA,MACA,OACA,QACA,OACA,QACA,OACA,KACA,MACA,MACA,OACA,KACA,OACA,MACA,MACA,MACA,IACA,MACA,MACA,KACA,KACA,MACA,MACA,MACA,KACA,MACA,MACA,KACA,KACA,MACA,OACA,KACA,KACA,MACA,KACA,MACA,OACA,OACA,KACA,MACA,MACA,KACA,KACA,MACA,KACA,KACA,IACA,KACA,MACA,MACA,KACA,SACA,KACA,MACA,KACA,MACA,OACA,MACA,MACA,MACA,OACA,MACA,OACA,MACA,OACA,OACA,IACA,KACA,SACA,KACA,MACA,OACA,KACA,KACA,KACA,MACA,KACA,MACA,MACA,QACA,OACA,QACA,MACA,MACA,QACA,OACA,MACA,SACA,KACA,MACA,KACA,MACA,KACA,OACA,OACA,MACA,MACA,KACA,MACA,KACA,MACA,IACA,OACA,MACA,OACA,QACA,SACA,QACA,OACA,QACA,OACA,MACA,OACA,MACA,OACA,OACA,QACA,QACA,SACA,MACA,OACA,QACA,QACA,OACA,OACA,QACA,OACA,QACA,OACA,QACA,MACA,OACA,MACA,OACA,QACA,OACA,MACA,OACA,MACA,OACA,MACA,OACA,KACA,MACA,KACA,KACA,KACA,KACA,MACA,KACA,MACA,OACA,OACA,OACA,QACA,QACA,OACA,QACA,QACA,MACA,MACA,OACA,OACA,OACA,MACA,OACA,OACA,KACA,OACA,QACA,KACA,KACA,MACA,OACA,MACA,OACA,KACA,KACA,KACA,MACA,MACA,IACA,KACA,KACA,MACA,MACA,OACA,MACA,KACA,KACA,IACA,OACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,MACA,MACA,OACA,QACA,OACA,MACA,KACA,KACA,MACA,OACA,MACA,MACA,OACA,MACA,KACA,MACA,MACA,MACA,KACA,OACA,MACA,MACA,OACA,OACA,OACA,MACA,KACA,MACA,OACA,KACA,MACA,MACA,MACA,KACA,KACA,MACA,MACA,MACA,KACA,KACA,IACA,KACA,MACA,MACA,KACA,MACA,KACA,MACA,QACA,MACA,MACA,MACA,MACA,KACA,MACA,OACA,OACA,OACA,KACA,OACA,MACA,MACA,KACA,KACA,MACA,QACA,OACA,OACA,KACA,MACA,KACA,KACA,MACA,MACA,OACA,QACA,OACA,QACA,QACA,UACA,SACA,UACA,WACA,WACA,OACA,QACA,OACA,KACA,MACA,OACA,KACA,KACA,KACA,KACA,MACA,KACA,IACA,KACA,MACA,KACA,MACA,MACA,KACA,MACA,MACA,OACA,KACA,QACA,KACA,MACA,KACA,MACA,MACA,KACA,MACA,OACA,KACA,MACA,KACA,MACA,KACA,MACA,KACA,MACA,OACA,MACA,KACA,MACA,KACA,MACA,KACA,IACA,SACA,UACA,SACA,UACA,KACA,MACA,KACA,MACA,OACA,QACA,KACA,MACA,OACA,OACA,MACA,MACA,MACA,KACA,IACA,KACA,KACA,MACA,KACA,MACA,KACA,OACA,QACA,MACA,MACA,IACA,KACA,KACA,IACA,KACA,IACA,IACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,MACA,KACA,KACA,IACA,KACA,KACA,IACA,KACA,MACA,KACA,KACA,KACA,IACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,IACA,KACA,KACA,KACA,MACA,KACA,MACA,IACA,KACA,KACA,KACA,MACA,MACA,OACA,QACA,QACA,OACA,OACA,QACA,QACA,QACA,OACA,SACA,SACA,OACA,OACA,OACA,QACA,SACA,OACA,UACA,OACA,QACA,SACA,SACA,UACA,UACA,UACA,QACA,QACA,YACA,YACA,aACA,SACA,OACA,QACA,OACA,MACA,QACA,QACA,QACA,SACA,SACA,SACA,SACA,SACA,SACA,QACA,SACA,SACA,SACA,WACA,YACA,aACA,WACA,YACA,WACA,UACA,WACA,YACA,aACA,YACA,cACA,UACA,WACA,WACA,WACA,YACA,gBACA,eACA,cACA,eACA,WACA,WACA,OACA,QACA,OACA,QACA,OACA,QACA,SACA,UAC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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAM,WAAW;AAAA,MACb;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AACA,IAAM,aAAa;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AACA,IAAM,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AACO,IAAM,KAAN,cAAiB,SAAS;AAAA,IACjC;AADa;AAEb,2BAAuB,UAAU,IAAI,EAAE,YAAY,QAAQ,CAAC;AAAA;AAAA;;;AChP5D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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;AACtC,IAAM,0BAA0B;AAChC,IAAM,wBAAwB;AAC9B,IAAM,oBAAoB;AAC1B,IAAM,yBAAyB;AAC/B,IAAM,eAAe;AACrB,IAAM,iBAAiB;AACvB,IAAM,iBAAiB;AACvB,IAAM,iBAAiB;AAAA;AAAA;;;ACvD9B,IAKa;AALb,IAAAC,eAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC;AAEA,IAAAC;AACA;AACA,IAAAC;AACO,IAAM,YAAY;AAAA,MACxB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA;AAAA;;;AC9DA,IAoDM,eAEJ,aACA,eACA,oBACA,MACA,MACA,WACA,iBACA,YACA,gBACA,qBACA,0BACA,YACA,YACA,kBACA,iBACA,iBACA,aACA,iBACA,qBACA,iBACA,eACA,mBACA,YACA,WACA,kBACA,SACA,WACA,MACA,UACA,QACA,YACA,aACA,YACA,gBACA,WACAC,aACA,QACA,YACA,gBACA,WACA,SACAC,SACA,iBAEW,iBAGAC,YAOP,MACC;AA7GP,IAAAC,eAAA;AAAA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C,WAAW,GAC3C;AACD,WAAO;AAAA,EACR;AAEA,aAAWD,eAAc,kCAAkC;AAC1D,wBAAoBA,WAAU;AAAA,EAC/B;AAGA,SAAO,cAAc,MAAM;AAAA,IAC1B,mBAAyE,CACxE,SACAC,MACA,QACI;AACJ,WAAK,MAAMA;AACX,WAAK,MAAM;AACX,UAAI,MAAM,UAAU,QAAW;AAC9B,cAAM,IAAI,MAAM,sDAAsD;AAAA,MACvE;AACA,aAAO,MAAM,MAAM,OAAO;AAAA,IAC3B;AAAA,IAEA,cAA0B,CAAC,MAAM,SAAS;AACzC,UAAI,SAAS,eAAe,MAAM,cAAc,QAAW;AAC1D,cAAM,aAAa,IAAI;AAAA,UACtB,KAAK,IAAI;AAAA,UACT,KAAK,QAAQ;AAAA,UACb,MAAM;AAAA,UAAC;AAAA,QACR;AACA,eAAO,MAAM,UAAU,UAAU;AAAA,MAClC;AAAA,IACD;AAAA,IAEA,MAAM,SAAwD;AAC7D,aAAO;AAAA,QACN;AAAA,QACA,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,MACN;AAAA,IACD;AAAA,EACD;AACD;AAnDS;AAqDT,IAAI;AACJ,IAAI,OAAO,wCAAU,UAAU;AAC9B,kBAAgB,oBAAoB,mCAAK;AAC1C,WAAW,OAAO,wCAAU,YAAY;AACvC,kBAAgB,qBAAqB,mCAAK;AAC3C;AACA,IAAO,kCAAQ;", + "names": ["init_performance", "init_performance", "PerformanceMark", "e", "init_performance", "init_performance", "init_performance", "init_performance", "clear", "count", "countReset", "createTask", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "profile", "profileEnd", "table", "time", "timeEnd", "timeLog", "timeStamp", "trace", "warn", "init_console", "init_performance", "init_console", "init_performance", "hrtime", "init_performance", "Socket", "init_performance", "dir", "x", "y", "env", "count", "init_performance", "init_performance", "cwd", "hrtime", "assert", "init_process", "init_performance", "init_process", "init_performance", "init_performance", "middleware", "context", "i", "init_performance", "init_performance", "init_performance", "all", "init_performance", "routePath", "match", "i", "j", "decoder", "url", "v", "a", "init_performance", "raw", "text", "init_performance", "context", "c", "init_performance", "k", "v", "v2", "text", "object", "init_performance", "init_constants", "init_performance", "init_performance", "init_constants", "c", "handlers", "p", "m", "clone", "r", "url", "env", "context", "init_performance", "a", "b", "Node", "init_performance", "context", "k", "c", "init_performance", "Node", "i", "m", "j", "i", "j", "handlers", "h", "e", "map", "k", "middleware", "a", "b", "init_router", "init_performance", "p", "m", "r", "init_performance", "init_router", "init_performance", "init_router", "init_router", "init_performance", "i", "router", "i2", "e", "init_performance", "init_router", "Node", "init_node", "init_performance", "_Node", "m", "i", "p", "v", "a", "i2", "j", "k", "b", "init_router", "init_performance", "init_node", "Node", "i", "init_performance", "init_router", "Hono", "init_performance", "init_performance", "init_performance", "defaults", "origin", "c", "set", "process", "navigator", "init_performance", "log", "time", "init_performance", "v", "logger2", "c", "url", "obj1: TType", "newObj: TType", "value: unknown", "fn: unknown", "it: T", "signals: AbortSignal[]", "ac", "TRPC_ERROR_CODES_BY_NUMBER: InvertKeyValue<\n typeof TRPC_ERROR_CODES_BY_KEY\n>", "retryableRpcCodes: TRPC_ERROR_CODE_NUMBER[]", "fn: () => TValue", "callback: ProxyCallback", "path: readonly string[]", "memo: Record", "memo", "code: keyof typeof TRPC_ERROR_CODES_BY_KEY", "json: TRPCResponse | TRPCResponse[]", "json", "error: TRPCError", "error", "opts: {\n config: RootConfig;\n error: TRPCError;\n type: ProcedureType | 'unknown';\n path: string | undefined;\n input: unknown;\n ctx: TRoot['ctx'] | undefined;\n}", "config", "shape: DefaultErrorShape", "JSONRPC2_TO_HTTP_CODE: Record<\n keyof typeof TRPC_ERROR_CODES_BY_KEY,\n number\n>", "obj: object", "_typeof", "o", "toPrimitive", "t", "r", "e", "i", "toPropertyKey", "cause: unknown", "transformer: DataTransformerOptions", "config: RootConfig", "item: TResponseItem", "config", "itemOrItems: TResponse", "once", "fn: () => T", "result: T | typeof uncalled", "input: unknown", "value: unknown", "config: RootConfig", "input: TInput", "v", "procedures: Record", "lazy: Record>", "opts: {\n ref: Lazy;\n path: readonly string[];\n key: string;\n aggregate: RouterRecord;\n }", "router", "lazy", "from: CreateRouterOptions", "path: readonly string[]", "aggregate: RouterRecord", "record", "_def: AnyRouter['_def']", "router: BuiltRouter", "procedureOrRouter: ValueOf", "router: Pick, '_def'>", "path: string", "key", "router: Pick, '_def'>", "ctx: Context | undefined", "r", "defaultFormatter: ErrorFormatter", "defaultTransformer: CombinedDataTransformer", "opts: {\n message?: string;\n code: TRPC_ERROR_CODE_KEY;\n cause?: unknown;\n }", "message", "x: unknown", "x", "observable: Observable", "signal: AbortSignal", "unsub: Unsubscribable | null", "error", "observable", "iterator: AsyncIterator", "iterator", "parsed: unknown", "_key", "str: string", "headers: Headers", "t", "fn: () => Promise", "promise: Promise | null", "value: TReturn | typeof sym", "_promise", "promise", "req: Request", "handler", "opts: GetRequestInfoOptions", "error: unknown", "error", "message", "isObject", "o: unknown", "o", "promise: TPromise", "resolve!: PromiseWithResolvers[\"resolve\"]", "reject!: PromiseWithResolvers[\"reject\"]", "arr: readonly T[]", "member: T", "member", "index: number", "member: unknown", "thing: T", "dispose: () => void", "dispose: () => Promise", "ms: number", "timer: ReturnType | null", "iterable: AsyncIterable", "iterator", "_x", "_x2", "iterable: AsyncIterable", "opts: {\n count: number;\n gracePeriodMs: number;\n }", "result: null | IteratorResult | typeof disposablePromiseTimerResult", "count", "resolve: (value: TValue) => void", "reject: (error: unknown) => void", "iterable: AsyncIterable", "onResult: (result: ManagedIteratorResult) => void", "state: 'idle' | 'pending' | 'done'", "iterables: AsyncIterable[]", "buffer: Array<\n [\n iterator: ManagedIterator,\n result: Exclude<\n ManagedIteratorResult,\n { status: 'return' }\n >,\n ]\n >", "iterable: AsyncIterable", "errors: unknown[]", "iterable: AsyncIterable", "iterable: AsyncIterable", "pingIntervalMs: number", "result:\n | null\n | IteratorResult\n | typeof disposablePromiseTimerResult", "value: unknown", "opts: JSONLProducerOptions", "callback: (idx: ChunkIndex) => AsyncIterable", "iterable", "promise: Promise", "path: (string | number)[]", "encode", "iterable: AsyncIterable", "encodeAsync", "newObj: Record", "asyncValues: ChunkDefinition[]", "newHead: Head", "iterable: AsyncIterable", "opts: SSEStreamProducerOptions", "ping: Required", "client: SSEClientOptions", "iterable: AsyncIterable", "value: null | TIteratorValue", "chunk: null | SSEvent", "controller: TransformStreamDefaultController", "err: TRPCError", "signal: AbortSignal", "initOpts: {\n ctx: inferRouterContext | undefined;\n info: TRPCRequestInfo | undefined;\n responseMeta?: HTTPBaseHandlerOptions['responseMeta'];\n untransformedJSON:\n | TRPCResponse>\n | TRPCResponse>[]\n | null;\n errors: TRPCError[];\n headers: Headers;\n}", "info", "meta", "v", "cause: unknown", "errorOpts: {\n opts: Pick<\n ResolveHTTPRequestOptions,\n 'onError' | 'req' | 'router'\n >;\n ctx: inferRouterContext | undefined;\n type: ProcedureType | 'unknown';\n path?: string;\n input?: unknown;\n }", "router", "v: unknown", "opts: ResolveHTTPRequestOptions", "config", "url", "infoTuple: ResultTuple", "ctxManager: ContextManager", "result: ResultTuple<$Context> | undefined", "data: unknown", "res: TRPCResponse>", "headResponse", "import_objectSpread2", "responseBody: ReadableStream", "results: RPCResult[]", "jsonContentTypeHandler: ContentTypeHandler", "formDataContentTypeHandler: ContentTypeHandler", "octetStreamContentTypeHandler: ContentTypeHandler", "TYPE_ACCEPTED_METHOD_MAP: Record", "TYPE_ACCEPTED_METHOD_MAP_WITH_METHOD_OVERRIDE: Record<\n ProcedureType,\n HTTPMethods[]\n>", "inputs: unknown", "result: InputRecord", "acc: InputRecord", "import_objectSpread2$1", "type: ProcedureType | 'unknown'", "info: TRPCRequestInfo", "Unpromise", "arg: Promise | PromiseLike | PromiseExecutor", "promise: Promise", "unsubscribe: () => void", "onfulfilled?:\n | ((value: T) => TResult1 | PromiseLike)\n | null", "onrejected?:\n | ((reason: any) => TResult2 | PromiseLike)\n | null", "onrejected?:\n | ((reason: any) => TResult | PromiseLike)\n | null", "onfinally?: (() => void) | null", "promise: PromiseLike", "cached", "value: T | PromiseLike", "values: Iterable>", "promises: readonly TPromise[]", "r", "e", "n", "d", "s", "OverloadYield", "_awaitAsyncGenerator", "_wrapAsyncGenerator", "u", "i", "settle", "_asyncIterator", "AsyncFromSyncIterator", "_asyncGeneratorDelegate", "opts: FetchHandlerRequestOptions", "createContext: ResolveHTTPRequestOptionsContextFn", "import_objectSpread2", "url", "o", "meta", "v", "path: string", "init_performance", "c", "c", "t", "p", "init_performance", "_a", "init_logger", "init_performance", "message", "config", "p", "init_performance", "table", "_a", "init_performance", "_a", "init_performance", "table", "config", "_a", "init_performance", "_a", "init_performance", "config", "table", "init_performance", "table", "_a", "init_performance", "i", "value", "startFrom", "array", "init_performance", "_a", "init_performance", "config", "as", "table", "ref", "actions", "range", "v", "a", "_a", "init_performance", "table", "config", "_a", "init_performance", "sql", "version", "init_performance", "init_performance", "version", "otel", "rawTracer", "e", "init_performance", "param", "p", "_a", "init_performance", "config", "i", "decoder", "encoder", "sql", "raw", "placeholder", "name", "SQL", "result", "decoder", "table", "a", "b", "init_utils", "init_performance", "_a", "init_table", "init_performance", "_a", "init_performance", "init_table", "table", "c", "v", "max", "init_performance", "init_performance", "init_performance", "relations", "primaryKey", "table", "config", "f", "decoder", "_a", "init_performance", "table", "c", "_a", "init_performance", "_a", "init_performance", "config", "_a", "init_performance", "_a", "ForeignKeyBuilder", "ForeignKey", "init_foreign_keys", "init_performance", "config", "table", "uniqueKeyName", "table", "_a", "UniqueConstraintBuilder", "UniqueOnConstraintBuilder", "UniqueConstraint", "init_unique_constraint", "init_performance", "_a", "init_common", "init_performance", "init_foreign_keys", "init_unique_constraint", "as", "config", "table", "ref", "actions", "ForeignKeyBuilder", "uniqueKeyName", "a", "b", "config", "_a", "init_performance", "init_utils", "init_common", "table", "a", "b", "config", "_a", "init_performance", "init_utils", "init_common", "table", "a", "b", "config", "_a", "init_performance", "init_utils", "init_common", "table", "a", "b", "config", "_a", "init_performance", "init_utils", "init_common", "table", "_a", "init_performance", "init_common", "table", "a", "b", "config", "_a", "init_performance", "init_utils", "init_common", "table", "init_performance", "name", "InlineForeignKeys", "table", "_a", "init_table", "init_performance", "_a", "init_performance", "table", "_a", "init_performance", "table", "config", "config", "PrimaryKeyBuilder", "_a", "PrimaryKey", "init_primary_keys", "init_performance", "init_table", "table", "table", "init_utils", "init_performance", "init_table", "_a", "init_performance", "init_table", "init_utils", "table", "i", "_a", "init_performance", "table", "_a", "init_performance", "message", "count", "init_performance", "init_performance", "init_performance", "init_sql", "init_performance", "init_performance", "init_common", "_a", "init_performance", "_a", "init_performance", "init_sql", "init_table", "init_utils", "config", "i", "w", "table", "set", "c", "f", "select", "sql", "joinOn", "field", "e", "_a", "init_performance", "_a", "init_select", "init_performance", "init_utils", "config", "table", "on", "_a", "init_query_builder", "init_performance", "init_select", "as", "self", "_a", "init_performance", "init_table", "init_utils", "init_query_builder", "table", "config", "init_performance", "_a", "init_performance", "init_table", "init_utils", "table", "set", "on", "init_performance", "init_query_builder", "init_select", "_a", "init_performance", "_a", "init_performance", "table", "config", "_a", "init_performance", "_a", "init_performance", "self", "as", "table", "config", "sql", "encoder", "b", "_a", "init_performance", "_key", "init_performance", "init_alias", "init_performance", "_a", "init_performance", "cache", "e", "sql", "init_subquery", "init_performance", "_a", "init_performance", "init_utils", "init_query_builder", "init_table", "config", "init_performance", "init_alias", "init_foreign_keys", "init_primary_keys", "init_subquery", "init_table", "init_unique_constraint", "init_utils", "k", "_a", "init_session", "init_performance", "init_logger", "init_utils", "builtQuery", "i", "config", "logger", "cache", "config", "logger", "db", "_a", "init_performance", "init_logger", "init_session", "init_performance", "init_session", "init_performance", "init_performance", "init_logger", "init_sql", "init_utils", "init_performance", "t", "init_performance", "init_performance", "c", "init_performance", "constants", "c", "init_performance", "minOrderValue", "init_performance", "u", "init_performance", "record", "tag", "group", "init_performance", "group", "getStringArray", "init_performance", "init_performance", "init_performance", "count", "init_performance", "mapVendorSnippet", "mapDeliverySlot", "init_performance", "init_performance", "init_performance", "getStringArray", "getProductById", "init_performance", "init_complaint", "init_performance", "getStringArray", "init_performance", "getStringArray", "getProductReviews", "getProductById", "init_product", "init_performance", "init_slots", "init_performance", "init_performance", "email", "getUserByMobile", "error", "init_performance", "init_coupon", "init_performance", "getUserById", "init_user", "init_performance", "date", "init_performance", "getProductById", "updateOrderNotes", "init_order", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "staffRoles", "staffPermissions", "staffRolePermissions", "permission", "keyValStore", "init_performance", "init_performance", "init_complaint", "init_product", "init_slots", "init_coupon", "init_user", "init_order", "init_performance", "getProductById", "getUserByMobile", "getProductReviews", "getUserById", "updateOrderNotes", "init_performance", "i", "string", "init_performance", "i", "init_performance", "encode", "init_performance", "hash", "init_performance", "init_performance", "init_errors", "init_performance", "message", "init_performance", "init_performance", "isObject", "init_performance", "hash", "init_performance", "init_errors", "init_performance", "init_errors", "init_performance", "cached", "hash", "init_performance", "init_errors", "s", "init_performance", "init_performance", "isObject", "k", "init_performance", "init_errors", "init_verify", "init_performance", "init_errors", "isObject", "max", "init_performance", "init_errors", "date", "jwt", "init_verify", "init_performance", "init_errors", "init_performance", "init_errors", "encode", "k", "init_sign", "init_performance", "init_sign", "init_performance", "init_errors", "init_performance", "init_verify", "init_sign", "init_performance", "message", "init_performance", "env", "init_performance", "error", "c", "init_performance", "Hono", "init_performance", "init_performance", "init_performance", "init_auth", "init_performance", "HttpAuthLocation", "init_performance", "HttpApiKeyAuthLocation", "init_performance", "init_performance", "init_performance", "init_performance", "init_auth", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "EndpointURLScheme", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_checksum", "init_performance", "AlgorithmId", "init_performance", "init_performance", "init_extensions", "init_performance", "init_checksum", "init_performance", "init_performance", "FieldPosition", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_identity", "init_performance", "init_logger", "init_performance", "init_performance", "init_performance", "init_performance", "IniSectionType", "init_performance", "init_performance", "init_schema", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "RequestHandlerProtocol", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_auth", "init_extensions", "init_identity", "init_logger", "init_schema", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "e", "init_dist_es", "init_performance", "init_constants", "init_performance", "ChecksumAlgorithm", "ChecksumLocation", "init_performance", "init_performance", "init_performance", "feature", "init_performance", "context", "feature", "init_performance", "init_performance", "init_client", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_performance", "init_utils", "init_performance", "init_performance", "init_dist_es", "init_utils", "context", "config", "identity", "error", "init_performance", "init_dist_es", "init_utils", "identity", "config", "init_performance", "init_performance", "init_performance", "init_getSmithyContext", "init_performance", "context", "init_performance", "init_dist_es", "init_performance", "init_getSmithyContext", "init_performance", "map", "init_performance", "init_dist_es", "config", "context", "init_performance", "config", "init_performance", "init_performance", "init_performance", "init_dist_es", "error", "config", "context", "identity", "init_performance", "config", "init_performance", "normalizeProvider", "init_normalizeProvider", "init_performance", "config", "init_performance", "init_performance", "i", "c", "init_performance", "i", "j", "k", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "i", "j", "k", "init_performance", "init_dist_es", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_performance", "init_dist_es", "encoder", "transform", "error", "init_performance", "i", "logger", "size", "s", "init_performance", "init_performance", "init_performance", "init_performance", "c", "init_performance", "init_dist_es", "init_performance", "i", "init_dist_es", "init_performance", "url", "init_performance", "init_performance", "abortError", "init_performance", "init_dist_es", "requestTimeout", "url", "body", "config", "blob", "base64", "init_performance", "init_dist_es", "init_dist_es", "init_performance", "i", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "blob", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "context", "c", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "config", "context", "n", "t", "i", "o", "error", "e", "k", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "url", "hostname", "init_performance", "init_dist_es", "init_endpoints", "init_performance", "init_performance", "init_endpoints", "init_dist_es", "config", "context", "n", "t", "i", "o", "config", "init_performance", "Schema", "init_performance", "init_performance", "Schema", "init_performance", "Schema", "init_performance", "Schema", "init_performance", "Schema", "init_performance", "i", "init_performance", "init_performance", "i", "ns", "k", "v", "z", "init_performance", "Schema", "init_sentinels", "init_performance", "init_performance", "k", "v", "r", "registry", "init_schema", "init_performance", "init_sentinels", "init_performance", "logger", "init_performance", "message", "s", "date", "year", "init_performance", "match", "day", "time", "init_performance", "init_performance", "i", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_performance", "LazyJsonString", "object", "init_performance", "v", "max", "time", "year", "RFC3339_WITH_OFFSET", "IMF_FIXDATE", "RFC_850_DATE", "ASC_TIME", "init_performance", "date", "sign", "day", "hour", "minute", "i", "init_performance", "init_performance", "z", "i", "v", "init_performance", "string", "object", "init_serde", "init_performance", "init_performance", "init_performance", "init_dist_es", "member", "init_performance", "init_performance", "init_schema", "init_dist_es", "k", "v", "member", "EventStreamSerde", "context", "init_performance", "init_schema", "init_serde", "init_dist_es", "context", "isStreaming", "member", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_schema", "init_serde", "init_dist_es", "format", "init_performance", "init_schema", "init_dist_es", "toString", "init_performance", "init_schema", "init_serde", "init_dist_es", "format", "init_performance", "init_schema", "init_performance", "init_requestBuilder", "init_performance", "setFeature", "context", "feature", "init_setFeature", "init_performance", "init_performance", "config", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "isIdentityExpired", "identity", "init_performance", "init_dist_es", "init_performance", "init_normalizeProvider", "init_requestBuilder", "init_setFeature", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "config", "normalizeProvider", "init_constants", "init_performance", "init_performance", "init_dist_es", "init_constants", "hash", "init_performance", "init_constants", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_constants", "i", "init_performance", "init_dist_es", "HEADER_VALUE_TYPE", "number", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_constants", "init_performance", "init_dist_es", "init_constants", "value", "serialized", "init_performance", "time", "init_performance", "init_dist_es", "hash", "init_performance", "init_dist_es", "init_constants", "hash", "promise", "init_performance", "init_dist_es", "init_performance", "init_constants", "config", "normalizeProvider", "init_performance", "init_client", "init_dist_es", "init_performance", "init_httpAuthSchemes", "init_performance", "init_performance", "i", "init_dist_es", "init_performance", "init_performance", "a", "b", "debug", "middleware", "entry", "context", "init_dist_es", "init_performance", "init_client", "init_performance", "init_dist_es", "config", "cb", "handlers", "init_collect_stream_body", "init_performance", "object", "member", "init_performance", "init_schema", "init_command", "init_performance", "init_dist_es", "logger", "cb", "operation", "init_constants", "init_performance", "init_performance", "commands", "Client", "cb", "command", "paginators", "waiters", "config", "init_performance", "v", "k", "message", "init_performance", "init_performance", "init_emitWarningIfUnsupportedVersion", "init_performance", "init_extended_encode_uri_component", "init_performance", "init_checksum", "init_performance", "init_retry", "init_performance", "init_defaultExtensionConfiguration", "init_performance", "init_checksum", "init_retry", "config", "init_extensions", "init_performance", "init_defaultExtensionConfiguration", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_resolve_path", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_client", "init_collect_stream_body", "init_command", "init_constants", "init_emitWarningIfUnsupportedVersion", "init_extended_encode_uri_component", "init_extensions", "init_resolve_path", "init_serde", "init_performance", "init_schema", "init_dist_es", "m", "registry", "e", "error", "Error", "k", "v", "init_performance", "init_performance", "init_performance", "init_performance", "k", "v", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "hasChildren", "c", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_schema", "buffer", "v", "value", "union", "e", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_schema", "init_serde", "k", "v", "array", "container", "map", "format", "init_performance", "init_performance", "init_schema", "context", "message", "member", "init_protocols", "init_performance", "init_dist_es", "init_performance", "init_client", "init_httpAuthSchemes", "init_protocols", "init_performance", "init_constants", "init_performance", "init_constants", "hasHeader", "init_performance", "init_performance", "init_performance", "init_dist_es", "P", "e", "t", "f", "y", "g", "n", "v", "o", "s", "m", "i", "init_performance", "fromUtf8", "init_fromUtf8_browser", "init_performance", "init_toUint8Array", "init_performance", "init_fromUtf8_browser", "init_toUtf8_browser", "init_performance", "init_dist_es", "init_performance", "init_fromUtf8_browser", "init_toUint8Array", "init_toUtf8_browser", "fromUtf8", "init_performance", "init_dist_es", "init_performance", "init_performance", "a_lookUpTable", "init_performance", "init_performance", "init_performance", "init_module", "AwsCrc32c", "init_module", "init_performance", "Crc32c", "init_performance", "table", "i", "j", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_module", "AwsCrc32", "lookupTable", "Crc32", "init_performance", "init_module", "init_types", "init_performance", "init_constants", "init_performance", "init_module", "init_dist_es", "init_constants", "init_types", "config", "init_performance", "init_dist_es", "hash", "init_performance", "init_dist_es", "init_constants", "config", "context", "getAwsChunkedEncodingStream", "hasHeader", "e", "init_performance", "init_dist_es", "init_constants", "config", "context", "init_performance", "init_types", "init_performance", "number", "init_performance", "init_performance", "init_dist_es", "init_constants", "config", "logger", "error", "init_performance", "init_dist_es", "config", "context", "init_performance", "config", "init_performance", "init_dist_es", "init_constants", "init_dist_es", "init_performance", "init_constants", "init_dist_es", "init_performance", "init_performance", "context", "logger", "error", "init_dist_es", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "context", "message", "init_performance", "init_dist_es", "init_performance", "config", "context", "e", "context", "e", "init_performance", "init_performance", "init_dist_es", "config", "context", "e", "init_performance", "init_performance", "init_performance", "cache", "identity", "error", "init_constants", "init_performance", "init_performance", "init_dist_es", "init_constants", "init_performance", "init_dist_es", "init_constants", "context", "init_performance", "defaultErrorHandler", "defaultSuccessHandler", "init_performance", "init_dist_es", "error", "config", "context", "identity", "init_performance", "init_performance", "collectBody", "init_performance", "init_dist_es", "config", "context", "init_dist_es", "init_performance", "context", "e", "init_performance", "init_performance", "init_dist_es", "init_dist_es", "init_performance", "normalizeProvider", "logger", "init_performance", "init_dist_es", "init_performance", "i", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "message", "init_performance", "init_EndpointRuleObject", "init_performance", "init_ErrorRuleObject", "init_performance", "init_RuleSetObject", "init_performance", "init_TreeRuleObject", "init_performance", "init_shared", "init_performance", "init_types", "init_performance", "init_EndpointRuleObject", "init_ErrorRuleObject", "init_RuleSetObject", "init_TreeRuleObject", "init_shared", "init_performance", "init_performance", "init_types", "init_performance", "init_types", "init_performance", "not", "init_performance", "init_performance", "hostname", "protocol", "url", "k", "v", "error", "init_performance", "init_performance", "init_performance", "c", "init_performance", "init_performance", "not", "init_performance", "init_performance", "group", "init_performance", "init_types", "argv", "init_performance", "init_performance", "init_types", "init_performance", "init_performance", "init_types", "group", "init_performance", "init_types", "init_performance", "init_types", "error", "init_performance", "url", "init_performance", "init_types", "error", "group", "init_performance", "init_types", "init_utils", "init_performance", "init_performance", "init_types", "init_utils", "logger", "v", "k", "init_dist_es", "init_performance", "init_types", "init_isIpAddress", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_isIpAddress", "init_performance", "partition", "init_performance", "partition", "init_performance", "init_dist_es", "init_performance", "init_resolveEndpoint", "init_performance", "init_EndpointError", "init_performance", "init_EndpointRuleObject", "init_performance", "init_ErrorRuleObject", "init_performance", "init_RuleSetObject", "init_performance", "init_TreeRuleObject", "init_performance", "init_shared", "init_performance", "init_types", "init_performance", "init_EndpointError", "init_EndpointRuleObject", "init_ErrorRuleObject", "init_RuleSetObject", "init_TreeRuleObject", "init_shared", "init_dist_es", "init_performance", "init_isIpAddress", "init_resolveEndpoint", "init_types", "init_config", "init_performance", "RETRY_MODES", "init_constants", "init_performance", "init_dist_es", "init_performance", "init_constants", "error", "init_performance", "init_dist_es", "t", "init_constants", "init_performance", "init_performance", "init_constants", "init_performance", "init_constants", "init_performance", "init_config", "init_constants", "error", "init_performance", "init_config", "init_performance", "init_types", "init_performance", "init_dist_es", "init_performance", "init_config", "init_constants", "init_types", "context", "config", "identity", "init_performance", "init_dist_es", "init_constants", "init_performance", "features", "init_performance", "init_performance", "init_dist_es", "init_constants", "context", "version", "config", "init_dist_es", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_config", "init_performance", "init_performance", "init_dist_es", "check", "init_performance", "init_performance", "init_performance", "init_performance", "init_config", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_performance", "CONTENT_LENGTH_HEADER", "error", "init_dist_es", "init_performance", "init_performance", "partition", "init_performance", "init_performance", "config", "hostname", "init_performance", "toEndpointV1", "init_toEndpointV1", "init_performance", "init_dist_es", "init_performance", "init_toEndpointV1", "context", "toEndpointV1", "init_performance", "init_toEndpointV1", "init_performance", "init_dist_es", "config", "context", "setFeature", "init_performance", "init_performance", "serializerMiddlewareOption", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "serializerMiddlewareOption", "config", "init_performance", "init_dist_es", "init_toEndpointV1", "toEndpointV1", "init_performance", "init_types", "init_performance", "init_dist_es", "init_performance", "init_types", "init_performance", "init_performance", "init_util", "init_performance", "error", "init_StandardRetryStrategy", "init_performance", "init_AdaptiveRetryStrategy", "init_performance", "init_configurations", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_util", "context", "isRequest", "e", "error", "init_dist_es", "init_performance", "init_AdaptiveRetryStrategy", "init_StandardRetryStrategy", "init_configurations", "init_performance", "init_performance", "init_dist_es", "init_dist_es", "init_performance", "init_performance", "cache", "init_performance", "init_dist_es", "context", "config", "context", "init_performance", "init_dist_es", "defaultEndpointResolver", "s", "name", "init_performance", "init_performance", "init_dist_es", "init_errors", "init_performance", "init_performance", "init_schema", "init_errors", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "fromUtf8", "init_fromUtf8_browser", "init_performance", "init_toUint8Array", "init_performance", "init_fromUtf8_browser", "init_toUtf8_browser", "init_performance", "init_dist_es", "init_performance", "init_fromUtf8_browser", "init_toUint8Array", "init_toUtf8_browser", "isEmptyData", "init_isEmptyData", "init_performance", "init_constants", "init_performance", "init_dist_es", "init_performance", "convertToBuffer", "fromUtf8", "init_performance", "init_dist_es", "init_isEmptyData", "init_constants", "Sha1", "isEmptyData", "window", "subtle", "getRandomValues", "init_module", "init_performance", "Sha1", "init_performance", "init_module", "init_dist_es", "init_module", "init_performance", "init_constants", "init_performance", "init_performance", "init_constants", "init_dist_es", "Sha256", "init_constants", "init_performance", "init_performance", "init_constants", "RawSha256", "i", "_a", "u", "t1", "t2", "Sha256", "init_constants", "e", "i", "init_module", "init_performance", "Sha256", "init_performance", "init_module", "init_dist_es", "init_module", "init_performance", "init_dist_es", "init_performance", "config", "navigator", "negate", "i", "Int64", "init_performance", "init_dist_es", "number", "HEADER_VALUE_TYPE", "UUID_PATTERN", "init_performance", "init_dist_es", "toUtf8", "fromUtf8", "Int64", "init_performance", "init_module", "init_performance", "init_module", "toUtf8", "fromUtf8", "message", "init_performance", "init_performance", "init_performance", "init_performance", "message", "init_performance", "init_dist_es", "init_performance", "iterator", "init_performance", "toUtf8", "message", "error", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "init_utils", "init_performance", "iterator", "EventStreamMarshaller", "isReadableStream", "init_EventStreamMarshaller", "init_performance", "init_dist_es", "init_utils", "init_provider", "init_performance", "init_EventStreamMarshaller", "EventStreamMarshaller", "init_dist_es", "init_performance", "init_EventStreamMarshaller", "init_provider", "init_utils", "blob", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "blobHasher", "blob", "hash", "init_performance", "init_performance", "message", "init_dist_es", "init_performance", "BLOCK_SIZE", "DIGEST_LENGTH", "INIT", "init_constants", "init_performance", "q", "a", "b", "x", "s", "t", "c", "d", "isEmptyData", "convertToBuffer", "init_dist_es", "init_performance", "init_constants", "BLOCK_SIZE", "i", "DIGEST_LENGTH", "INIT", "init_constants", "init_performance", "init_performance", "init_dist_es", "init_constants", "navigator", "init_dist_es", "init_performance", "init_performance", "init_dist_es", "init_protocols", "config", "getRuntimeConfig", "init_performance", "init_module", "init_dist_es", "config", "Sha1", "Sha256", "init_extensions", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_extensions", "init_performance", "config", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_schema", "getRuntimeConfig", "config", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "hash", "init_dist_es", "init_performance", "config", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_dist_es", "init_performance", "config", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "Command", "cs", "config", "o", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_waiter", "init_performance", "WaiterState", "init_performance", "init_waiter", "max", "message", "state", "reason", "init_performance", "init_utils", "init_performance", "init_performance", "init_utils", "init_waiter", "promise", "finalize", "aborted", "init_dist_es", "init_performance", "init_waiter", "init_performance", "init_dist_es", "checkState", "init_performance", "init_dist_es", "checkState", "init_performance", "init_dist_es", "checkState", "init_performance", "init_dist_es", "init_performance", "init_dist_es", "init_performance", "init_performance", "init_pagination", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_dist_es", "init_performance", "init_pagination", "init_errors", "hostname", "init_dist_es", "init_performance", "UNSIGNED_PAYLOAD", "SHA256_HEADER", "init_constants", "init_performance", "init_performance", "init_dist_es", "init_constants", "SHA256_HEADER", "UNSIGNED_PAYLOAD", "init_performance", "init_dist_es", "context", "presigned", "init_dist_es", "init_performance", "error", "domain", "s3Url", "url", "u", "init_performance", "init_dist_es", "middlewares: AnyMiddlewareFunction[]", "fn: MiddlewareFunction<\n TContext,\n TMeta,\n object,\n $ContextOverrides,\n TInputOut\n >", "parse: ParseFn", "inputMiddleware: AnyMiddlewareFunction", "parsedInput: ReturnType", "parse", "parse: ParseFn", "outputMiddleware: AnyMiddlewareFunction", "procedureParser: Parser", "parser", "def1: AnyProcedureBuilderDef", "def2: Partial", "meta", "import_objectSpread2$1", "initDef: Partial", "_def: AnyProcedureBuilderDef", "builder: AnyProcedureBuilder", "output: Parser", "builder", "resolver: ProcedureResolver", "_defIn: AnyProcedureBuilderDef & { type: ProcedureType }", "resolver: AnyResolver", "_def: AnyProcedure['_def']", "index: number", "opts: ProcedureCallOptions", "middleware", "_nextOpts?: any", "opts: ProcedureCallOptions", "isServerDefault: boolean", "issues: ReadonlyArray", "r", "e", "t", "n", "_objectWithoutProperties", "o", "i", "s", "TRPCBuilder", "opts?: ValidateShape>", "config: RootConfig<$Root>", "isServer: boolean", "config", "init_dist", "init_performance", "t", "router", "createCallerFactory", "init_performance", "init_dist", "duration", "error", "s", "tag", "error", "getProductById", "productSlots", "d", "t", "getAllProducts", "specialDeals", "productTags", "init_performance", "tag", "p", "error", "init_performance", "getAllProducts", "init_common", "init_performance", "router", "init_performance", "init_common", "c", "error", "router", "init_performance", "Hono", "router", "commonRouter", "init_performance", "Hono", "router", "init_performance", "Hono", "router", "init_performance", "Hono", "c", "init_performance", "c", "error", "router", "init_performance", "Hono", "c", "initializer", "i", "k", "_a", "config", "init_core", "init_performance", "assert", "isObject", "isPlainObject", "merge", "_x", "v", "k", "array", "set", "match", "object", "i", "chars", "o", "cl", "a", "b", "Class", "x", "_a", "message", "config", "t", "base64", "base64url", "hex", "init_util", "init_performance", "F", "error", "issue", "i", "_a", "a", "b", "init_errors", "init_performance", "init_core", "init_util", "encode", "decode", "init_performance", "init_core", "init_errors", "init_util", "_Err", "e", "config", "bigint", "date", "domain", "integer", "time", "init_performance", "init_util", "version", "init_checks", "init_performance", "init_core", "init_util", "_a", "origin", "inst", "integer", "result", "init_performance", "x", "F", "version", "init_performance", "base64", "c", "k", "t", "r", "config", "a", "b", "isPlainObject", "f", "init_performance", "init_checks", "init_core", "init_util", "_a", "version", "ch", "checks", "checkResult", "canary", "result", "_", "v", "url", "date", "time", "bigint", "isDate", "i", "desc", "isObject", "allowsEval", "o", "p", "results", "map", "left", "right", "keyResult", "valueResult", "output", "x", "F", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "count", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "t", "e", "origin", "issue", "v", "be", "error", "init_performance", "init_util", "origin", "issue", "count", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "init_performance", "error", "init_performance", "init_util", "origin", "issue", "number", "error", "init_performance", "init_util", "text", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "count", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "init_performance", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "error", "init_performance", "init_util", "origin", "issue", "init_performance", "_a", "init_performance", "meta", "p", "f", "Class", "_emoji", "_undefined", "_null", "ch", "v", "issue", "codec", "format", "init_performance", "init_checks", "init_util", "process", "_a", "meta", "id", "schema", "init_performance", "registry", "ctx", "process", "init_performance", "init_util", "json", "format", "v", "file", "m", "x", "i", "a", "b", "init_performance", "process", "init_performance", "core_exports", "_emoji", "_null", "_undefined", "config", "decode", "encode", "process", "version", "init_core", "init_performance", "init_errors", "init_checks", "init_util", "checks_exports", "init_checks", "init_performance", "init_core", "date", "datetime", "duration", "time", "init_performance", "init_core", "init_schemas", "initializer", "init_errors", "init_performance", "init_core", "init_util", "issue", "issues", "parse", "parseAsync", "safeParse", "safeParseAsync", "encode", "decode", "encodeAsync", "decodeAsync", "safeEncode", "safeDecode", "safeEncodeAsync", "safeDecodeAsync", "init_parse", "init_performance", "init_core", "init_errors", "schemas_exports", "_default", "base64", "base64url", "bigint", "boolean", "_catch", "check", "cidrv4", "cidrv6", "cuid", "cuid2", "date", "describe", "e164", "email", "emoji", "_enum", "guid", "hex", "hostname", "ipv4", "ipv6", "ksuid", "lazy", "mac", "meta", "nanoid", "_null", "nullish", "number", "string", "ulid", "_undefined", "union", "uuid", "_void", "xid", "_emoji", "format", "k", "v", "ch", "init_schemas", "init_performance", "init_core", "init_checks", "init_parse", "def", "parse", "safeParse", "parseAsync", "safeParseAsync", "encode", "decode", "encodeAsync", "decodeAsync", "safeEncode", "safeDecode", "safeEncodeAsync", "safeDecodeAsync", "cl", "json", "datetime", "time", "duration", "c", "issue", "output", "map", "config", "init_performance", "init_core", "ZodFirstPartyTypeKind", "z", "zodSchema", "v", "t", "format", "objectSchema", "i", "s", "version", "init_performance", "init_checks", "init_schemas", "schemas_exports", "checks_exports", "bigint", "boolean", "date", "number", "string", "init_performance", "init_core", "init_schemas", "_default", "base64", "base64url", "bigint", "boolean", "_catch", "check", "cidrv4", "cidrv6", "config", "core_exports", "cuid", "cuid2", "date", "decode", "decodeAsync", "describe", "e164", "email", "emoji", "encode", "encodeAsync", "_enum", "guid", "hex", "hostname", "ipv4", "ipv6", "ksuid", "lazy", "mac", "meta", "nanoid", "_null", "nullish", "number", "parse", "parseAsync", "safeDecode", "safeDecodeAsync", "safeEncode", "safeEncodeAsync", "safeParse", "safeParseAsync", "string", "ulid", "_undefined", "union", "uuid", "_void", "xid", "init_performance", "init_core", "init_schemas", "init_checks", "init_errors", "init_parse", "init_performance", "init_complaint", "init_performance", "router", "c", "init_performance", "t", "e", "n", "r", "i", "s", "u", "a", "o", "c", "f", "h", "d", "l", "y", "M", "m", "v", "g", "D", "p", "S", "w", "O", "b", "$", "k", "init_coupon", "init_performance", "router", "dayjs", "au", "ap", "AbortController", "Headers", "Request", "Response", "fetch", "init_performance", "init_performance", "k", "init_performance", "libDefault", "init_performance", "init_performance", "count", "run", "error", "map", "e", "init_performance", "init_performance", "self", "i", "error", "message", "count", "init_performance", "i", "a", "b", "original", "require_retry", "init_performance", "init_performance", "operation", "number", "url", "e", "message", "json", "text", "error", "Expo", "init_performance", "init_performance", "init_performance", "channel", "message", "init_performance", "isFunction", "isArrayBuffer", "i", "l", "_key", "merge", "isPlainObject", "isObject", "G", "isReadableStream", "extend", "toCamelCase", "noop", "init_utils", "init_performance", "cache", "prototype", "e", "context", "a", "b", "filter", "m", "hasOwnProperty", "define", "cb", "init_performance", "init_utils", "error", "config", "message", "init_performance", "i", "init_performance", "init_utils", "encode", "match", "init_performance", "toString", "encoder", "_encode", "encode", "url", "_encode", "init_performance", "init_utils", "init_performance", "init_utils", "h", "init_performance", "init_performance", "init_performance", "init_performance", "init_performance", "init_utils", "init_performance", "init_performance", "init_utils", "init_performance", "init_utils", "match", "i", "init_performance", "init_utils", "parser", "encoder", "e", "init_performance", "init_utils", "isFormData", "isFileList", "transitional", "init_performance", "init_utils", "i", "parser", "match", "context", "filter", "w", "init_performance", "init_utils", "self", "parser", "i", "format", "prototype", "config", "context", "transform", "init_performance", "init_utils", "init_performance", "init_performance", "message", "config", "validateStatus", "init_performance", "url", "match", "init_performance", "i", "init_performance", "flush", "init_performance", "init_performance", "init_utils", "e", "init_performance", "origin", "url", "init_performance", "init_utils", "domain", "match", "url", "init_performance", "init_performance", "init_performance", "config2", "config", "a", "b", "merge", "init_performance", "init_utils", "init_performance", "init_utils", "config", "init_performance", "init_utils", "config", "transitional", "init_performance", "init_utils", "aborted", "signal", "init_performance", "iterator", "e", "done", "isFunction", "ReadableStream", "TextEncoder", "init_fetch", "init_performance", "init_utils", "Request", "Response", "e", "env", "encoder", "config", "url", "flush", "fetch", "i", "map", "config", "adapter", "i", "s", "init_performance", "init_utils", "init_fetch", "e", "config", "adapter", "init_performance", "init_performance", "i", "init_performance", "version", "message", "desc", "validators", "init_performance", "init_utils", "config", "e", "transitional", "promise", "i", "error", "url", "init_performance", "i", "promise", "message", "config", "abort", "c", "init_performance", "init_performance", "init_utils", "init_performance", "context", "init_performance", "init_utils", "Axios", "AxiosError", "CanceledError", "isCancel", "CancelToken", "VERSION", "all", "isAxiosError", "spread", "toFormData", "AxiosHeaders", "HttpStatusCode", "getAdapter", "mergeConfig", "init_axios", "init_performance", "init_performance", "init_performance", "message", "error", "error", "init_performance", "init_order", "init_performance", "router", "orders", "e", "import_dayjs", "init_vendor_snippets", "init_performance", "router", "e", "sum", "p", "dayjs", "init_performance", "error", "init_performance", "init_performance", "constants", "error", "c", "error", "s", "pid", "init_performance", "error", "init_performance", "isNumber", "j", "e", "f", "h", "Q", "hh", "i", "n", "init_util", "init_performance", "ax", "ay", "bx", "by", "cx", "cy", "c", "_i", "t1", "t0", "u3", "B", "u", "D", "init_performance", "init_util", "bc", "ca", "ab", "u", "init_performance", "init_util", "bc", "ca", "ab", "aa", "bb", "cc", "u", "v", "abt", "bct", "cat", "_8", "_16", "fin", "fin2", "init_performance", "init_util", "ab", "bc", "cd", "ac", "bd", "ce", "_8", "_8b", "_16", "_48", "fin", "init_performance", "init_util", "init_performance", "p", "polygon", "i", "ii", "k", "f", "u2", "v2", "x", "y", "init_esm", "init_performance", "point", "polygon", "i", "init_esm", "init_esm", "init_performance", "polygon", "init_performance", "init_common", "init_esm", "router", "point", "error", "tag", "init_stores", "init_performance", "router", "dayjs", "a", "b", "import_dayjs", "init_slots", "init_performance", "router", "init_banners", "init_performance", "router", "init_types", "init_performance", "init_shared", "init_performance", "init_types", "error", "init_retry", "init_performance", "error", "e", "init_performance", "init_axios", "init_common", "init_stores", "init_slots", "init_banners", "init_shared", "init_retry", "init_performance", "error", "slotsRouter", "init_slots", "init_performance", "init_dist", "router", "e", "init_product", "init_performance", "router", "url", "group", "m", "tag", "init_performance", "sign", "verify", "hash", "init_node", "init_performance", "init_constants", "init_performance", "init_crypto", "init_performance", "init_constants", "init_node", "randomUUID", "subtle", "webcrypto", "init_crypto", "init_performance", "hash", "sign", "verify", "randomBytes", "callback", "nextTick", "hash", "salt", "unknown", "i", "string", "c", "k", "b", "off", "s", "o", "P", "S", "n", "l", "r", "j", "err", "encodeBase64", "decodeBase64", "init_performance", "init_crypto", "init_staff_user", "init_performance", "router", "init_store", "init_performance", "router", "e", "error", "init_payments", "init_performance", "router", "bannerRouter", "init_banner", "init_performance", "router", "error", "e", "init_user", "init_performance", "count", "u", "o", "s", "c", "title", "text", "t", "error", "init_const", "init_performance", "router", "constants", "c", "init_performance", "init_complaint", "init_coupon", "init_order", "init_vendor_snippets", "init_slots", "init_product", "init_staff_user", "init_store", "init_payments", "init_banner", "init_user", "init_const", "router", "slotsRouter", "bannerRouter", "url", "error", "init_performance", "init_axios", "init_address", "init_performance", "router", "init_performance", "init_auth", "init_performance", "router", "getUserByMobile", "email", "init_cart", "init_performance", "sum", "router", "getProductById", "complaintRouter", "init_complaint", "init_performance", "router", "orderRouter", "init_order", "init_performance", "init_common", "constants", "minOrderValue", "deliveryCharge", "getProductById", "sum", "router", "i", "orderStatus", "u", "e", "updateOrderNotes", "import_dayjs", "productRouter", "init_product", "init_performance", "router", "getProductById", "dayjs", "getProductReviews", "url", "error", "getAllProducts", "userRouter", "init_user", "init_performance", "router", "getUserById", "init_coupon", "init_performance", "desc", "router", "au", "e", "ap", "init_performance", "init_payments", "init_performance", "init_crypto", "router", "init_performance", "router", "error", "init_performance", "router", "tag", "userRouter", "init_performance", "init_address", "init_auth", "init_banners", "init_cart", "init_complaint", "init_order", "init_product", "init_slots", "init_user", "init_coupon", "init_payments", "init_stores", "router", "complaintRouter", "orderRouter", "productRouter", "init_router", "init_performance", "router", "userRouter", "init_performance", "init_dist", "init_router", "Hono", "error", "c", "message", "init_performance", "init_performance", "init_performance", "env", "createApp", "initDb", "init_performance", "env", "e", "init_performance", "e", "env", "error", "init_performance", "env", "middleware", "env"] +} diff --git a/apps/backend/drop_all.sql b/apps/backend/drop_all.sql new file mode 100644 index 0000000..5c76d70 --- /dev/null +++ b/apps/backend/drop_all.sql @@ -0,0 +1,48 @@ +PRAGMA foreign_keys=OFF; +BEGIN TRANSACTION; +DROP TABLE IF EXISTS "vendor_snippets"; +DROP TABLE IF EXISTS "users"; +DROP TABLE IF EXISTS "user_notifications"; +DROP TABLE IF EXISTS "user_incidents"; +DROP TABLE IF EXISTS "user_details"; +DROP TABLE IF EXISTS "user_creds"; +DROP TABLE IF EXISTS "upload_url_status"; +DROP TABLE IF EXISTS "unlogged_user_tokens"; +DROP TABLE IF EXISTS "units"; +DROP TABLE IF EXISTS "store_info"; +DROP TABLE IF EXISTS "staff_users"; +DROP TABLE IF EXISTS "staff_roles"; +DROP TABLE IF EXISTS "staff_role_permissions"; +DROP TABLE IF EXISTS "staff_permissions"; +DROP TABLE IF EXISTS "special_deals"; +DROP TABLE IF EXISTS "reserved_coupons"; +DROP TABLE IF EXISTS "refunds"; +DROP TABLE IF EXISTS "product_tags"; +DROP TABLE IF EXISTS "product_tag_info"; +DROP TABLE IF EXISTS "product_slots"; +DROP TABLE IF EXISTS "product_reviews"; +DROP TABLE IF EXISTS "product_info"; +DROP TABLE IF EXISTS "product_group_membership"; +DROP TABLE IF EXISTS "product_group_info"; +DROP TABLE IF EXISTS "product_categories"; +DROP TABLE IF EXISTS "product_availability_schedules"; +DROP TABLE IF EXISTS "payments"; +DROP TABLE IF EXISTS "payment_info"; +DROP TABLE IF EXISTS "orders"; +DROP TABLE IF EXISTS "order_status"; +DROP TABLE IF EXISTS "order_items"; +DROP TABLE IF EXISTS "notifications"; +DROP TABLE IF EXISTS "notif_creds"; +DROP TABLE IF EXISTS "key_val_store"; +DROP TABLE IF EXISTS "home_banners"; +DROP TABLE IF EXISTS "delivery_slot_info"; +DROP TABLE IF EXISTS "coupons"; +DROP TABLE IF EXISTS "coupon_usage"; +DROP TABLE IF EXISTS "coupon_applicable_users"; +DROP TABLE IF EXISTS "coupon_applicable_products"; +DROP TABLE IF EXISTS "complaints"; +DROP TABLE IF EXISTS "cart_items"; +DROP TABLE IF EXISTS "addresses"; +DROP TABLE IF EXISTS "address_zones"; +DROP TABLE IF EXISTS "address_areas"; +COMMIT; diff --git a/apps/backend/migrated.sql b/apps/backend/migrated.sql new file mode 100644 index 0000000..599265a --- /dev/null +++ b/apps/backend/migrated.sql @@ -0,0 +1,21840 @@ +PRAGMA foreign_keys=OFF; +BEGIN TRANSACTION; +CREATE TABLE IF NOT EXISTS "address_areas" ("id" INTEGER PRIMARY KEY, "place_name" TEXT NOT NULL, "zone_id" INTEGER, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO address_areas VALUES(1,'Housing Board',1,'2025-12-10T14:30:58.912Z'); +INSERT INTO address_areas VALUES(2,'Mettugadda',2,'2025-12-10T14:31:22.451Z'); +CREATE TABLE IF NOT EXISTS "address_zones" ("id" INTEGER PRIMARY KEY, "zone_name" TEXT NOT NULL, "added_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO address_zones VALUES(1,'zone 1','2025-12-10T14:30:40.126Z'); +INSERT INTO address_zones VALUES(2,'Zone 2','2025-12-10T14:31:12.245Z'); +CREATE TABLE IF NOT EXISTS "addresses" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "is_default" INTEGER NOT NULL DEFAULT false, "name" TEXT NOT NULL, "phone" TEXT NOT NULL, "address_line1" TEXT NOT NULL, "address_line2" TEXT, "city" TEXT NOT NULL, "state" TEXT NOT NULL, "pincode" TEXT NOT NULL, "latitude" REAL, "longitude" REAL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "zone_id" INTEGER, "admin_latitude" REAL, "admin_longitude" REAL, "google_maps_url" TEXT); +INSERT INTO addresses VALUES(1,3,0,'Bushra ','9000190484','Mahabubnagar ','Noor nagar','Mahabubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:13:54.439Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(2,3,0,'Bushra ','9000190484','Mahabubnagar ','Noor nagar','Mahabubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:13:56.852Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(3,3,0,'Bushra ','9000190484','Mahabubnagar ','Noor nagar','Mahabubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:13:59.752Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(4,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:15:59.602Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(5,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:09.066Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(6,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:10.587Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(7,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:13.227Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(8,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:14.410Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(9,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:15.341Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(10,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:16.029Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(11,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:16.818Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(12,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:17.605Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(13,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:18.595Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(14,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:20.593Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(15,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:25.042Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(16,3,1,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:26.343Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(17,1,1,'Mohammed Shafiuddin','9676651496','Hno: 1-9-25/25, Noor Nagar','Nawabpet Road','Mahabubnagar','Telangana','509001',16.73764400000000041,78.00380999999999787,'2025-11-19T07:36:43.907Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(18,1,0,'Mohammed Rafiuddin','9676651496','H No: 1-9-25/25, Noor Nagar','Nawabpet Road','Mahabubnagar','Telangana','509001',37.785834999999998728,-122.40641999999999356,'2025-11-19T07:40:54.902Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(19,1,0,'Khamar Jahan','8297666911','H no: 1-9-25/25, Noor Nagar','Nawabpet Road','Mahabubnagar','Telangana','509001',37.785834999999998728,-122.40641999999999356,'2025-11-19T07:49:04.462Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(20,2,1,'Qusham ','8688182552','5-7-30/L/9','','Mahabubnagar','Telangana','509001',16.741472000000001685,78.011600000000003163,'2025-11-21T08:45:46.550Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(21,4,0,'Shafi ','8688326100','1-4-6/9/12','Noor nagar','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-02T09:55:46.194Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(22,4,0,'Saniya','8688326100','1-4/25/L','Mothinagar','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-02T09:57:32.847Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(23,14,0,'Saqib Mujtaba','9390567030','S s guyta','','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-19T00:53:31.858Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(24,15,0,'Arif uddin','9866116948','Noor nagar','Noor nagar ','Mahabubnagar','Telangana','509001',16.741569999999999396,78.011669999999995184,'2025-12-19T01:00:27.678Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(25,15,0,'Arif uddin','9866116948','Noor nagar','Nawapet road','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-19T01:02:03.968Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(26,17,1,'Bbavani','7013167289','Market','','Mahabubnagar','Telangana','509001',16.760310000000000485,77.99338000000000548,'2025-12-19T03:01:51.649Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(28,17,0,'H','6666666666','Hh','H','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-19T03:42:49.915Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(29,17,0,'Bhavaniiiiiii kumar SEDAMKAR iii','6666666666','Hh','H','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-19T10:11:23.603Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(30,20,0,'Md waseed','9676010763','Mothi nagar','Mothi nagar','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-22T09:04:00.235Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(31,22,0,'Myhome','8885456295','1-10','11','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-23T21:09:01.181Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(32,16,1,'Pradeep kumar ','7799420184','Near the sub Post office, OLD PALAMOOR ','MAHABUBNAGAR ','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-26T19:30:44.314Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(33,12,0,'Marlu','6302478945','Yogi tiffin ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-27T23:56:10.399Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(34,26,1,'Faiz ','9652180398','Gol masjid ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-03T02:42:42.263Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(35,21,0,'Sailesh','9701690010','Sailesh Nilayam, Sagara colony','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-04T13:19:25.837Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(36,30,1,'Tirmaldev gate ','8341217812','T.d gutta ','Kosgi road','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-06T07:45:37.451Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(37,22,0,'My brother''s home','8885456295','Hjuu','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-07T10:24:39.504Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(38,34,1,'Habeeb','1218182456','Shah ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-13T09:26:06.610Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(39,36,1,'Rimsha','9985785747','near bharath talkies road,beside punjab bakery','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-14T03:26:36.657Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(40,22,1,'Address name afroz','8862958999','Address line 1','Address line 2 optional','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-18T10:23:28.923Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(41,42,1,'Inzamam ','8019548522','Goal masjid near sr graden','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-21T00:01:32.400Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(42,39,0,'Shabana begum ','6281768720','6-5-50/1, Habeeb nagar,menaka theatre ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T10:23:54.676Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(43,25,1,'Mohsin Dk','9848296296','TD GUTTA ','AL MADINA CHICKEN CENTRE','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T10:37:26.594Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(44,49,0,'Akram hashmi ','9182043867','Rb function hall ','Talab katta ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T13:49:40.718Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(45,50,0,'Shaista ','9390338662','A S chicken center Bhageerata colony road ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T13:58:33.695Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(46,51,1,'Santhosh Guptha','8606465444','Kamakshi Smart City Block A-101 ','Venkateshwara Colony ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T23:00:16.057Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(47,1,0,'Mohammed Rafiuddin','7330875929','Noor Nagar, Nawabpet Road','Mahabubnagar','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T23:08:31.533Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(48,1,0,'Mohammed Fasiuddin','9441740551','Noor Nagar, Nawabpet Road','Mahabubnagar','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T23:10:52.880Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(50,22,0,'7-38 BK reddy colony ','8885456295','Near masjid e Umar Farooq ','','Mahabubnagar','Telangana','509001',16.740442000000001598,78.007355000000000444,'2026-01-24T20:43:47.162Z',NULL,16.732927000000000106,77.993509999999997006,NULL); +INSERT INTO addresses VALUES(51,29,1,'Zahed Habeeb ','6302300646','5-7-30/L/9 gaolnl masjid','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-25T23:35:14.565Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(52,55,1,'rahman junaid','7780659850','Bk reddy colony road no.1','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-26T09:30:35.593Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(53,59,0,'Mohammed yahiya khan ','9490585051','House no 1-1-77/b/3','Opp golbanglaw beside royal cement n steel','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-26T13:08:50.114Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(54,60,1,'Srinivasulu ','8331989727','Koilkonda X Road','TD GUTTA','Mahabubnagar','Telangana','509001',16.760335999999997902,77.993645000000002553,'2026-01-26T22:21:40.119Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(55,64,1,'Sayeed Pasha','9985383270','Goal masjid ','5-7-30/L/9','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-27T06:43:54.588Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(56,65,1,'Mahesh','9381637374','Beside Dl Narayana tuitions','Panchowrastha','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-27T11:28:27.599Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(57,54,0,'Abdul ahad ','9849759289','Veernapet shareef calony ','Fz water plant patel masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-27T11:43:53.572Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(58,66,1,'Faizan ','9618791714','Near farooq masjid ','Bk reddy colony ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-28T01:30:42.348Z',NULL,16.760255999999998266,77.993515000000002146,NULL); +INSERT INTO addresses VALUES(59,6,1,'TANVEER ','9346436140','BN REDDY COLONY ','BESIDE PASULA KISTA REDDY FUNCTION HALL ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-28T06:33:17.478Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(60,58,0,'Mohd Bilal','9603333080','Edira road before masjid-e-soulath','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-28T10:39:59.776Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(63,1,0,'Saniya Shaik','9676651496','Noor Nagar, Nawabpet Road','Near FCI Godown','Mahabubnagar','Telangana','509001',37.785834999999998728,-122.40641999999999356,'2026-01-29T14:11:38.999Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(65,1,0,'John Wick','9676651496','Noor Nagar','Mahabubnagar','Mahabubnagar','Telangana','509001',16.731055999999999706,78.011049999999997339,'2026-01-29T14:54:04.995Z',NULL,NULL,NULL,'https://maps.app.goo.gl/B3X3kkkgXdp6YbGW9'); +INSERT INTO addresses VALUES(66,38,0,'Inzamam Innu','9492230173','Ar talent school','Sr garden habeeb nagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-29T22:40:44.484Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(67,77,0,'Tauheed Ahmed ','7287952112','B.k reddy Omer Farooq masjid road','','Mahabubnagar','Telangana','509001',16.739729000000000525,78.006410000000006021,'2026-01-30T14:07:03.540Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(69,54,1,'Abdul ahad ','9849759289','3-11-137/A/11Veernapet shareef calony ','Fz water plant patel masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-31T02:30:19.844Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(70,78,1,'Vidya sagar','9059201201','65/a brundavana gardens','Svs dental hospital behind ashok leyland showroom','Mahabubnagar','Telangana','509001',16.759952999999998546,78.052940000000008424,'2026-01-31T04:25:12.551Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(71,7,1,'Umair ','7386623412','Brundavan colony near MG show room ','','Mahabubnagar','Telangana','509001',16.755016000000000353,78.052220000000005484,'2026-02-01T00:27:45.058Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(72,82,0,'Noushin','7981337554','Habib nagar','Near kirshima kirna','Mahabubnagar','Telangana','509001',16.733945999999999543,77.989480000000002135,'2026-02-01T01:03:36.263Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(73,74,1,'Mohd ','8639145664','Mahabubnagar habeeb nagar near karishma kirna','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T01:31:41.702Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(74,83,0,'Mohd Fasiuddin ','9441740551','H. No. 1-9-25/B/1/A.Nawab pet road','Noor. Nagar Mahabub Nagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T02:12:41.964Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(79,1,0,'Ethan Hunt','9676651496','Noor Nagar','Nawabpet Road','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T02:51:47.852Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(80,1,0,'Ethan Hunt','9676651496','NN','NN','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T02:58:10.268Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(81,84,1,'H.No. 8-1-72/B','8639762655','Road No. 4, Teacher''s Colony','Near Ramalayam','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T04:29:57.712Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(82,86,0,'heena begum','9121585783','hanumanpura ','jamaulamma nagar temple road ','Mahabubnagar','Telangana','509001',16.728843999999998715,77.987433999999993261,'2026-02-01T05:44:57.399Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(83,88,1,'Hani','9398199100','Goal masjid 5-7-30/L/9','Mahabubnagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T10:07:03.325Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(84,89,1,'Khaja mujeebuddin','8919308867','Srinivas colony','Beside geetam school taj residency','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T23:25:14.868Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(85,91,1,'H No 14-5-208/13/A','9347168525','2A Road, Krishna Nagar Colony,','Bhageeratha Colony Road','Mahabubnagar','Telangana','509001',16.735164999999998514,78.002075000000008486,'2026-02-02T04:29:24.308Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(86,92,0,'Asif','6305442889','Balaji convention hall','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-02T04:52:59.786Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(87,93,1,'md ghouse moin uddin','9705107988','rayeesa masjid trasfaram mbnr','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-02T04:57:17.798Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(88,95,1,'Mohammed arham','6301612623','Madina masjid','Karachi bakery back side','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-02T06:39:17.730Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(89,73,0,'Ameen ','9652801308','Bharath takies opp mm poly clinic','Madina masjid','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-02T20:23:12.850Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(90,97,1,'K Krishnaiah','9441565235','Hno 10-6-ye0033, srinivasa colony','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-02T23:57:41.024Z',NULL,NULL,NULL,'https://maps.app.goo.gl/7PsHmbWYvzbdkMHm8'); +INSERT INTO addresses VALUES(91,98,1,'Abdul ahad ','9381165946','3-11-137/A/11','Fz water plant veernapet patel masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-03T00:26:41.356Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(92,24,0,'Tausif ali','9948350118','14-8-87/4 iqbal manzil marlu','Iqbal manzil marlu','Mahabubnagar','Telangana','509001',16.741389999999998217,78.011604000000005498,'2026-02-03T03:06:18.057Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(93,46,0,'Sidra','9392266793','Gol masjid Sr garden ','Sr garden 1 flore','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-03T07:32:53.282Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(94,81,0,'SYED','9652338446','H.no 14-8-121','Near, Masjid e Mustafa ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-03T10:16:08.941Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(95,96,0,'Arif hussain','9848466280','Near mvs college, christianpally, opposite true value showroom','Bhavani nagar colony 2-96/2','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-04T01:34:16.516Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(96,103,0,'Zaid','6302119072','Opposite of Malabar gold and diamonds ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-05T03:15:46.045Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(98,105,1,'Ayesha mahmeen','9063857682','Ramaiah bowli; one town; mahabubanagar','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-05T22:58:26.450Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(99,107,0,'Saad','9573989830','Road no 6d ','Bhageritha colony ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T02:47:54.809Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(100,108,0,'SADIYA TAZEEN','9949035807','RB palace function hall ','RB palace function hall ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T03:10:35.120Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(101,109,0,'Aman','9063508083','1-8-17/10 T.d gutta fire station, Nalbowli Durdkhna.','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T03:14:49.128Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(102,113,0,'Kamal','9052741123','Marlu ','Brundavan colony','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T05:00:45.506Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(103,114,0,'Md.khizar Ahmed','9052323490','RB palace functionhall','RB palace functionhall ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T05:49:47.686Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(104,71,1,'Karthik ','9110314975','Line 7 balajinagar ','','Mahabubnagar','Telangana','509001',16.728182000000000329,77.997190000000005127,'2026-02-06T06:25:28.389Z',NULL,NULL,NULL,'PXHW+7WQ, Lane No. 7, BalajiNagar Colony, Mahbubnagar, Telangana 509001'); +INSERT INTO addresses VALUES(105,115,0,'Nadera','9985232643','H.no.1-10-19/3/6/a','Opp two taps','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T10:26:24.248Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(106,118,0,'Nida','9966022031','Shiva Shakti nagar ','Shiva Shakti nagar kaman','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T22:55:26.874Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(107,119,0,'Mohd Mujahed ','9059318255','Madina masjid old hospital ','Madina masjid kumarvadi','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-07T07:06:08.579Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(108,120,0,'Raza','7013641457','Hno5-7-30/n/6 habeebnagar Mahabubnagar ','Near zamzam kiranam habeebnagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-07T23:10:58.038Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(109,121,1,'Ram reddy','5457545442','Ganesh Nagar ','','Mahabubnagar','Telangana','509001',16.736355000000000536,77.986789999999999167,'2026-02-08T00:48:19.094Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(110,122,1,'MD SULTAN','9642339427','Hno 5-7-30/n/6 habeebnagar mahbubnagar','','Mahabubnagar','Telangana','509001',16.731957999999997888,77.989800000000002455,'2026-02-08T04:33:41.585Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(111,123,0,'Tahera begum','6305184261','Hn function hall veerana pet Mahabubnagar','Hn function hall veerana pet Mahabubnagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-09T05:50:43.617Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(112,125,0,'Ayesha','8341078342','Opp redbucket biryani lane','Padmavati colony ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-09T07:56:36.555Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(113,127,1,'khaja aleem uddin','7989653339','7-133/4 sun city colony sha sahab gutta','razzak masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-10T05:41:41.020Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(114,114,0,'Zunera','9052333490','Rb palace','Kitchen side','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-14T01:01:09.499Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(115,131,1,'Fathima ','9966710280','Seshadri nagar colony street 0/7','bk reddy colony, beside bc hostel ','Mahabubnagar','Telangana','509001',16.739141000000000047,78.004074000000001021,'2026-02-15T00:33:30.890Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(116,134,1,'Kaleem','9133621540','Shah shah gutta','Beside ss gutta masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-16T04:02:17.458Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(117,136,0,'Arman ','9390785046','Employees colony ','Road no 3','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-17T07:30:03.424Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(118,137,1,'Abdul Gaffar','8555938403','6-107/5','Sheshadri Nagar Road no 1 ','Mahabubnagar','Telangana','509001',16.74219099999999738,78.006219999999997227,'2026-02-17T08:53:09.780Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(119,140,0,'Sara','9848738554','Golmasjid mahaboobnagar ','Zam zam opposite ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-17T13:48:37.631Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(120,141,0,'Inzamam','8919042963','Sr garden back side gate','Gol masjid','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-17T19:47:20.768Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(121,143,0,'Samir','7286888001','Employees colony ','Road 3','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-17T22:56:28.656Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(122,130,1,'Rahiman','9912951895','Flat no 202,Aayra manzil Beside veeresh kiranam near Ibrahim Masjid','Street no:6/B,Sheshadri Nagar','Mahabubnagar','Telangana','509001',16.738883999999998763,78.004279999999992512,'2026-02-17T23:27:21.024Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(123,132,1,'Muzammil ','9110526651','5-7-30/L/2/C ,opp ghousiya kiranam gol masjid ','','Mahabubnagar','Telangana','509001',16.732962000000000557,77.990610000000000212,'2026-02-18T00:28:03.816Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(124,145,0,'Naheed','8179264991','5-7-30/L/7/H Habeeb Nagar Near Rayeesa Masjid','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-18T03:46:16.471Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(125,138,0,'Mahek','8328369823','B k ready colony ','Near omer Farooq masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-18T05:15:32.019Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(126,147,1,'Mohammad ','9885579134','H.no.5-7-30/L/10/C','Opp rayeesa masjid line','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-18T05:15:47.126Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(127,148,0,'Abdul razeek ','9100529645','Shavia shakti nagar ','','Mahabubnagar','Telangana','509001',16.735370000000000523,77.995819999999991267,'2026-02-18T07:31:27.609Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(128,150,1,'Khaleel Ahmed','9700630611','B.k Reddy Colony near Umar Farooq masjid ,Aziz kiranam opposite lane','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-18T09:13:27.828Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(129,144,1,'Asad','7981140388','Yenugonda Opp Masjid','','Mahabubnagar','Telangana','509001',16.754571999999998688,78.036539999999998684,'2026-02-18T10:09:17.009Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(130,149,1,'Moulali ','8519862344','Rayeesa masjid ','Habeeb Nagar ','Mahabubnagar','Telangana','509001',16.730108000000001311,77.99151600000000073,'2026-02-18T22:18:46.343Z',NULL,16.731068000000000495,77.990629999999994126,NULL); +INSERT INTO addresses VALUES(131,156,0,'Arshed','9381371156','H.no4-2, beside wisdom school ','Ramaiah Bowli ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-18T23:58:56.880Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(132,99,1,'Saniya','7893499520','H.No: 4-2-7/2a Tayyabnagar Ramaiyah bowli ','Near Almas function hall opp lane ','Mahabubnagar','Telangana','509001',16.740355999999998459,77.991410000000005453,'2026-02-19T01:03:59.675Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(133,159,0,'Mohd.Mujahid','9182114853','14-107/2,suncity colony','Sheshadrinagar,near masjid e razzaq ','Mahabubnagar','Telangana','509001',16.742678000000001503,78.006249999999992539,'2026-02-19T03:40:34.252Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(134,160,1,'Mohmmed pro','9642417025','50','Ibadur raheman masjed opposite road Shiva Shakti road iron shop opposite ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-19T03:49:45.149Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(135,151,0,'Anjum','9346508676','H۔No:6-5-57/10 Habeeb nagar ','Beside Hanan masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-19T04:09:11.514Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(136,4,0,'Saniya','8688326100','Marlu , near Ali tower ','','Mahabubnagar','Telangana','509001',16.741472000000001685,78.011610000000004561,'2026-02-19T04:16:33.494Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(137,162,0,'Shaik Hussain','6302798105','Zehra School Noori Nagar','Masjid a noore Ilahi','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-19T05:08:26.454Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(138,32,1,'Md kaif','8919304169','14_6_13/9/a2','Pasula kistta reddy colony','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-19T06:14:03.397Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(139,163,0,'farhana begum','7032026589','Marlu , employes colony','Road no. 3','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-19T06:49:20.611Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(140,165,0,'Rumana ','6281349676','Govt hospital back side mahabubnagr ','Tawakal bekry mahabubnagr 8-1-39/1','Mahabubnagar','Telangana','509001',16.749452999999999036,78.00876999999999839,'2026-02-19T10:27:50.727Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(141,168,0,'Aladdin','8498937807','S.s gutta mahabubnagar bhagat Singh colony ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-20T03:29:56.135Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(142,169,1,'Ahmed Ali','7799420422','Near Mustafa masjid','Marlu','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-20T03:37:22.057Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(143,171,1,'Mohammed Mudassir','6281738569','H.No:5-7-30/N/9, Old Palamoor Location, Near Rayeesa Masjid','First Right turn after S.M.Tent House','Mahabubnagar','Telangana','509001',16.73113299999999981,77.990329999999996601,'2026-02-20T03:57:59.497Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(144,170,0,'Raheel','9901294914','1-10-79/B, ShahSaheb Gutta','Vasavi college lane.','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-20T03:59:16.614Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(145,176,0,'Arshad Ali','9885578647','14-8-120 Near Masjid e Mustafa','Marlu','Mahabubnagar','Telangana','509001',16.743597000000001173,78.010283999999998627,'2026-02-20T06:01:46.916Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(146,163,0,'farhana begum','7032026589','Marlu , employes colony mbnr','Road no. 3','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-20T07:20:46.386Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(147,181,1,'Khaled ','9885252564','1-10-87/3/A','1-10-87/3/A','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-20T13:34:13.988Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(148,184,1,'Shazia ','9160481161','Near puchamma temple bk reddy colony ','Near puchamma temple bk reddy colony ','Mahabubnagar','Telangana','509001',16.742122999999999422,78.0064849999999943,'2026-02-20T22:47:32.316Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(149,186,0,'Faiz ul Rahman ','9550541366','Masdoos Nagar ','','Mahabubnagar','Telangana','509001',16.732306999999999597,77.990759999999994533,'2026-02-21T03:45:12.460Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(150,187,0,'Mohd Fasi','9703691566','Habeebnagar ','Near Narmada Honda Showroom ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-21T05:40:59.163Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(151,189,0,'Chintu','8019231723','Road no 6B','BHAGEERATHA colony ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-21T13:02:30.211Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(152,178,0,'Abdul khadar ','7799492001','Nakha Pride apartment,door no 304','Near district court, telangana chowrasta ','Mahabubnagar','Telangana','509001',16.751510000000000566,77.992390000000000327,'2026-02-21T20:56:08.971Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(153,193,0,'Raza','7207490881','5-7-30/n/6 habeebnagar mbnr','Near zamzam kiranam','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-21T22:53:08.954Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(154,194,1,'Syed Aijaz','6302774527','Al noor school straight shashabgutta','Alkouser madarsa backnside','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T00:16:09.557Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(155,195,0,'Aditya','6301375032','Old palamoor','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T00:58:09.170Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(156,196,0,'Rani','8978874860','Vinayak Nagar, housing board colony ','Near edira Bypass X Road','Mahabubnagar','Telangana','509001',16.747900000000002229,78.04578999999999489,'2026-02-22T00:59:40.685Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(157,197,0,'Habeeb Hasham','7842321671','14-6-14/6','Beside masjid e ibrahim back road','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T01:07:34.153Z',NULL,NULL,NULL,'https://maps.app.goo.gl/P5sxjAGjgjELdnh37?g_st=ic'); +INSERT INTO addresses VALUES(158,198,0,'Atiya sikandar','7799311559','3-2-3, afzal manzil, beside hamdard clinic makka masjid road verrannapet','','Mahabubnagar','Telangana','509001',16.744990000000001373,77.98212399999999711,'2026-02-22T01:08:33.396Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(159,200,1,'Srinath','8328216406','Manyamkonda ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T02:02:31.789Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(160,201,0,'Imaduddin ','9121477995','Near Mothinagar government High school ','Near SV godam','Mahabubnagar','Telangana','509001',16.759189999999999365,77.997765000000001123,'2026-02-22T02:03:54.841Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(161,205,1,'nasir','9177629869','Hanuman pura masjid e jabbar','mahabubngar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T03:45:47.686Z',NULL,16.730706999999997997,77.988939999999997709,NULL); +INSERT INTO addresses VALUES(162,206,0,'M.A MALIK','9000452637','14-7-91/2/1/C','Marlu Jr palace','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T04:21:36.419Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(163,208,0,'Amer','9618770682','H no 6-3-44/D/10/2/1, hanuman pura,Imran kiranam','9059566856','Mahabubnagar','Telangana','509001',16.729278999999999122,77.989990000000002368,'2026-02-22T04:39:03.925Z',NULL,16.729820000000000135,77.990039999999991593,NULL); +INSERT INTO addresses VALUES(164,209,0,'Shakeel','7993744243','Shiva shakthi nagar','telugu geri','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T04:45:09.965Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(165,212,0,'Salma ','7670818331','5-5-11 dist jail khana riyaz ul Jannah masjid old palamoor mahabubnagar ','Riyaz ul Jannah masjid mahabubnagar telengana 509001','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T06:04:13.075Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(166,213,1,'Ahmed ','9392816978','Habeeb nagar ','Zam Zam kiranam ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T08:01:50.655Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(167,50,0,'Shaista','9390338662','Santosh Nagar colony beside maheshwari theatre ','','Mahabubnagar','Telangana','509001',16.750419999999999198,78.033630000000000492,'2026-02-22T14:05:23.161Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(168,223,0,'Syed','9398876512','S.S gutta 2 nal galli ','Tipu sultan chowk ','Mahabubnagar','Telangana','509001',16.746738000000000567,78.00908999999999871,'2026-02-23T03:47:19.976Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(169,224,1,'Saud Amodi ','8374782337','Shah Sahab gutta','Shah Sahab Gupta A1 chicken center Gali ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-23T04:40:34.997Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(170,225,0,'Akheel ','9666426396','3-3-48','Nagar mahabubnagar Telangana ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-23T06:45:56.079Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(171,226,0,'Anas Affuaf ','9391479179','Near Taiba masjid Ramaiah bowli ','Mahabubnagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-23T08:32:01.241Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(172,228,1,'Abdur rahman','9966138248','Plot 22 Opp children''s park last lane z and z colony ','1 town back side alis mart colony','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-23T22:39:52.264Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(173,229,1,'Abdul kaleem','9885575791','5-4-85/f/14/2','Opposite Amena masjid tayyab nagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-24T01:41:59.722Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(174,230,0,'Mehreen','9398645142','Opposite to bright school, marlu','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-24T01:44:03.723Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(175,219,1,'Naseer','7569573638','5-3-71/2/C masdoos nagar near gouds colony','','Mahabubnagar','Telangana','509001',16.735652999999999224,77.989829999999997767,'2026-02-24T02:55:23.438Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(176,158,0,'Shabana ','9381289050','Wisdom school near','Ramaiah bowli','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-24T04:02:06.921Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(177,232,1,'Sultan bahiyal','9059525115','Adjcent to laxmi tiffin centre, old hospital road, madina masjid ','','Mahabubnagar','Telangana','509001',16.74373200000000228,77.985489999999995092,'2026-02-24T14:51:10.955Z',NULL,NULL,NULL,NULL); +CREATE TABLE IF NOT EXISTS "cart_items" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "product_id" INTEGER NOT NULL, "quantity" REAL NOT NULL, "added_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO cart_items VALUES(32,3,3,1.0,'2025-11-24T06:25:02.963Z'); +INSERT INTO cart_items VALUES(48,3,9,2.0,'2025-11-28T09:43:04.203Z'); +INSERT INTO cart_items VALUES(49,7,11,1.0,'2025-11-28T22:20:23.104Z'); +INSERT INTO cart_items VALUES(99,4,11,1.0,'2025-11-29T11:36:06.140Z'); +INSERT INTO cart_items VALUES(100,4,12,1.0,'2025-12-02T09:50:53.817Z'); +INSERT INTO cart_items VALUES(102,4,3,2.0,'2025-12-02T09:53:19.217Z'); +INSERT INTO cart_items VALUES(108,6,11,1.0,'2025-12-06T01:58:02.112Z'); +INSERT INTO cart_items VALUES(109,6,3,1.0,'2025-12-06T02:02:59.975Z'); +INSERT INTO cart_items VALUES(112,10,1,1.0,'2025-12-07T23:18:24.863Z'); +INSERT INTO cart_items VALUES(114,2,12,2.0,'2025-12-09T06:57:51.258Z'); +INSERT INTO cart_items VALUES(128,11,1,1.0,'2025-12-14T07:52:10.000Z'); +CREATE TABLE IF NOT EXISTS "complaints" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "order_id" INTEGER, "complaint_body" TEXT NOT NULL, "is_resolved" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "response" TEXT, "images" TEXT); +INSERT INTO complaints VALUES(1,3,1,'Some eggs are broken',1,'2025-11-19T11:01:59.549Z','We sent you the apples not eggs 😁',NULL); +INSERT INTO complaints VALUES(2,1,54,'This item is not good at all. You guys should stop this immediately',1,'2025-11-29T11:53:25.720Z','Okk',NULL); +INSERT INTO complaints VALUES(3,1,NULL,'Test Complaint',1,'2025-11-29T23:22:44.507Z','Hi','["complaint-images/1764478363144-0"]'); +INSERT INTO complaints VALUES(4,17,NULL,'Hello',1,'2025-12-19T03:04:32.924Z','Hi',NULL); +INSERT INTO complaints VALUES(5,17,NULL,'Hello',1,'2025-12-19T04:02:59.187Z','','["complaint-images/1766136777180-0"]'); +INSERT INTO complaints VALUES(6,15,NULL,'THIS ITEM IS NOT GOOD REMOVE THIS ITEM 🚫',1,'2025-12-19T07:17:34.114Z','Ok',NULL); +INSERT INTO complaints VALUES(7,17,NULL,'Gg',1,'2025-12-20T21:38:30.627Z','Okk',NULL); +INSERT INTO complaints VALUES(8,17,NULL,'Hh',1,'2025-12-23T11:48:56.053Z','Bla',NULL); +INSERT INTO complaints VALUES(9,1,NULL,'Funny comparing',1,'2026-01-15T13:22:10.666Z','Resolving as test ','["complaint-images/1768503130322-0"]'); +INSERT INTO complaints VALUES(10,22,NULL,'Raise a complaint scenario when order is placed and at shipping status',1,'2026-01-18T09:59:59.381Z','Okk',NULL); +INSERT INTO complaints VALUES(11,22,NULL,'Hi product quality is not good can you please do a replacement for this.',1,'2026-01-18T21:59:20.647Z','No',NULL); +INSERT INTO complaints VALUES(12,22,66,'Bad quality nai paki papai aur',1,'2026-01-28T10:42:13.347Z','"From next time, we''ll take care.','["complaint-images/1769616732515-0","complaint-images/1769616732516-1"]'); +INSERT INTO complaints VALUES(13,54,81,'I needed it quickly',1,'2026-01-31T02:03:32.243Z','Not answered call',NULL); +INSERT INTO complaints VALUES(14,46,137,'Yes',1,'2026-02-03T07:34:35.816Z','Resolvedd',NULL); +INSERT INTO complaints VALUES(15,81,143,replace('Is someone looking at complaints :) \n\nTest','\n',char(10)),1,'2026-02-03T10:20:23.832Z','Yeah... Complaints are being actively monitored. We welcome feedback and criticism',NULL); +INSERT INTO complaints VALUES(16,121,NULL,'We by its sorry please cancel it',1,'2026-02-08T00:56:29.295Z','',NULL); +INSERT INTO complaints VALUES(17,121,NULL,'It is only 50 right why RS 60 showing',1,'2026-02-08T04:33:16.782Z','It''s the authentic rate',NULL); +INSERT INTO complaints VALUES(18,119,NULL,'I need the order early',1,'2026-02-18T01:58:37.530Z','',NULL); +INSERT INTO complaints VALUES(19,82,NULL,'Where order',1,'2026-02-19T05:01:41.560Z','',NULL); +INSERT INTO complaints VALUES(20,162,NULL,'Ky time hota oder aana',1,'2026-02-19T05:11:21.737Z','',NULL); +INSERT INTO complaints VALUES(21,82,NULL,'Its late',1,'2026-02-19T05:30:11.017Z','Sorry. Will take care from next time',NULL); +INSERT INTO complaints VALUES(22,160,NULL,'Bohot Acha items good and fresh hai sab chez think u freshyo',1,'2026-02-19T06:42:28.833Z','Thank you...our service will improve further. ',NULL); +INSERT INTO complaints VALUES(23,225,NULL,'Akheel',1,'2026-02-23T06:55:20.175Z','Complaint not clear',NULL); +INSERT INTO complaints VALUES(24,225,NULL,'Cash',1,'2026-02-23T06:56:45.780Z','Complaint not clear',NULL); +INSERT INTO complaints VALUES(25,225,NULL,'Cash',1,'2026-02-23T07:00:17.914Z','Complaint not clear',NULL); +INSERT INTO complaints VALUES(58,1,385,'No order',0,'2026-03-22T04:45:39.793Z',NULL,'["complaint-images/1774174538370.jpg"]'); +INSERT INTO complaints VALUES(59,1,385,'Hii',0,'2026-03-22T04:57:51.234Z',NULL,'["complaint-images/1774175270043.jpg"]'); +INSERT INTO complaints VALUES(60,1,385,'Another fest',0,'2026-03-22T05:06:02.150Z',NULL,'["complaint-images/1774175760765.jpg"]'); +INSERT INTO complaints VALUES(61,1,384,'Testing again',0,'2026-03-22T05:08:55.745Z',NULL,'["complaint-images/1774175933889.jpg"]'); +INSERT INTO complaints VALUES(62,1,383,'Last test',1,'2026-03-22T05:10:05.820Z','Doneee','["complaint-images/1774176003038.jpg","complaint-images/1774176003229.jpg","complaint-images/1774176003414.jpg"]'); +CREATE TABLE IF NOT EXISTS "coupon_applicable_products" ("id" INTEGER PRIMARY KEY, "coupon_id" INTEGER NOT NULL, "product_id" INTEGER NOT NULL); +INSERT INTO coupon_applicable_products VALUES(1,8,25); +CREATE TABLE IF NOT EXISTS "coupon_applicable_users" ("id" INTEGER PRIMARY KEY, "coupon_id" INTEGER NOT NULL, "user_id" INTEGER NOT NULL); +INSERT INTO coupon_applicable_users VALUES(1,11,1); +INSERT INTO coupon_applicable_users VALUES(2,11,4); +INSERT INTO coupon_applicable_users VALUES(3,13,1); +INSERT INTO coupon_applicable_users VALUES(4,14,1); +INSERT INTO coupon_applicable_users VALUES(5,15,1); +INSERT INTO coupon_applicable_users VALUES(6,18,145); +CREATE TABLE IF NOT EXISTS "coupon_usage" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "coupon_id" INTEGER NOT NULL, "used_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "order_id" INTEGER, "order_item_id" INTEGER); +INSERT INTO coupon_usage VALUES(1,2,4,'2025-11-25T00:59:10.947Z',NULL,NULL); +INSERT INTO coupon_usage VALUES(2,1,4,'2025-11-25T05:22:34.453Z',NULL,NULL); +INSERT INTO coupon_usage VALUES(3,1,4,'2025-11-27T06:03:27.515Z',NULL,NULL); +INSERT INTO coupon_usage VALUES(4,1,3,'2025-11-28T05:42:31.979Z',27,NULL); +INSERT INTO coupon_usage VALUES(5,1,4,'2025-11-28T05:42:31.979Z',27,NULL); +INSERT INTO coupon_usage VALUES(6,1,5,'2025-11-28T05:42:31.979Z',27,NULL); +INSERT INTO coupon_usage VALUES(7,1,4,'2025-11-28T08:13:29.610Z',28,39); +INSERT INTO coupon_usage VALUES(8,1,4,'2025-11-28T08:13:29.610Z',28,40); +INSERT INTO coupon_usage VALUES(9,1,4,'2025-11-28T22:34:42.745Z',32,48); +INSERT INTO coupon_usage VALUES(10,1,4,'2025-11-28T22:34:42.745Z',32,49); +INSERT INTO coupon_usage VALUES(11,1,4,'2025-11-28T22:34:42.745Z',32,50); +INSERT INTO coupon_usage VALUES(12,1,4,'2025-11-28T22:36:51.615Z',33,51); +INSERT INTO coupon_usage VALUES(13,1,4,'2025-11-28T22:52:17.337Z',34,52); +INSERT INTO coupon_usage VALUES(14,1,4,'2025-11-28T22:52:17.337Z',34,53); +INSERT INTO coupon_usage VALUES(15,1,4,'2025-11-28T22:52:17.337Z',34,54); +INSERT INTO coupon_usage VALUES(16,1,4,'2025-11-28T22:58:19.949Z',35,55); +INSERT INTO coupon_usage VALUES(17,1,4,'2025-11-28T23:17:00.736Z',39,64); +INSERT INTO coupon_usage VALUES(18,1,4,'2025-11-28T23:17:00.736Z',39,65); +INSERT INTO coupon_usage VALUES(19,1,4,'2025-11-28T23:17:56.567Z',40,66); +INSERT INTO coupon_usage VALUES(20,1,4,'2025-11-28T23:17:56.567Z',40,67); +INSERT INTO coupon_usage VALUES(21,1,4,'2025-11-28T23:22:24.357Z',41,68); +INSERT INTO coupon_usage VALUES(22,1,4,'2025-11-28T23:22:24.357Z',41,69); +INSERT INTO coupon_usage VALUES(23,1,4,'2025-11-28T23:23:26.876Z',42,70); +INSERT INTO coupon_usage VALUES(24,1,4,'2025-11-28T23:23:26.876Z',42,71); +INSERT INTO coupon_usage VALUES(25,1,4,'2025-11-28T23:31:56.572Z',43,72); +INSERT INTO coupon_usage VALUES(26,1,4,'2025-11-28T23:31:56.572Z',43,73); +INSERT INTO coupon_usage VALUES(27,1,4,'2025-11-28T23:31:56.572Z',43,74); +INSERT INTO coupon_usage VALUES(28,1,4,'2025-11-28T23:33:28.518Z',44,75); +INSERT INTO coupon_usage VALUES(29,1,4,'2025-11-28T23:33:28.518Z',44,76); +INSERT INTO coupon_usage VALUES(30,1,4,'2025-11-28T23:33:28.518Z',44,77); +INSERT INTO coupon_usage VALUES(31,1,4,'2025-11-28T23:35:19.817Z',45,78); +INSERT INTO coupon_usage VALUES(32,1,4,'2025-11-28T23:35:19.817Z',45,79); +INSERT INTO coupon_usage VALUES(33,1,4,'2025-11-28T23:35:19.817Z',45,80); +INSERT INTO coupon_usage VALUES(34,1,4,'2025-11-28T23:42:35.845Z',46,81); +INSERT INTO coupon_usage VALUES(35,1,4,'2025-11-28T23:42:35.845Z',46,82); +INSERT INTO coupon_usage VALUES(36,1,4,'2025-11-28T23:42:35.845Z',46,83); +INSERT INTO coupon_usage VALUES(37,1,4,'2025-11-29T00:35:34.926Z',47,84); +INSERT INTO coupon_usage VALUES(38,1,4,'2025-11-29T00:35:34.926Z',47,85); +INSERT INTO coupon_usage VALUES(39,1,3,'2025-11-29T00:47:38.510Z',48,86); +INSERT INTO coupon_usage VALUES(40,1,3,'2025-11-29T00:47:38.510Z',48,87); +INSERT INTO coupon_usage VALUES(41,1,3,'2025-11-29T00:47:38.510Z',48,88); +INSERT INTO coupon_usage VALUES(42,1,4,'2025-11-29T00:47:38.510Z',48,86); +INSERT INTO coupon_usage VALUES(43,1,4,'2025-11-29T00:47:38.510Z',48,87); +INSERT INTO coupon_usage VALUES(44,1,4,'2025-11-29T00:47:38.510Z',48,88); +INSERT INTO coupon_usage VALUES(45,1,3,'2025-11-29T00:51:58.214Z',49,89); +INSERT INTO coupon_usage VALUES(46,1,3,'2025-11-29T00:51:58.214Z',49,90); +INSERT INTO coupon_usage VALUES(47,1,3,'2025-11-29T00:51:58.214Z',49,91); +INSERT INTO coupon_usage VALUES(48,1,3,'2025-11-29T00:51:58.214Z',49,92); +INSERT INTO coupon_usage VALUES(49,1,4,'2025-11-29T00:51:58.214Z',49,89); +INSERT INTO coupon_usage VALUES(50,1,4,'2025-11-29T00:51:58.214Z',49,90); +INSERT INTO coupon_usage VALUES(51,1,4,'2025-11-29T00:51:58.214Z',49,91); +INSERT INTO coupon_usage VALUES(52,1,4,'2025-11-29T00:51:58.214Z',49,92); +INSERT INTO coupon_usage VALUES(53,1,3,'2025-11-29T01:06:19.496Z',50,NULL); +INSERT INTO coupon_usage VALUES(54,1,4,'2025-11-29T01:06:19.496Z',50,NULL); +INSERT INTO coupon_usage VALUES(55,1,4,'2025-11-29T01:57:48.593Z',53,NULL); +INSERT INTO coupon_usage VALUES(56,2,5,'2025-12-04T23:32:41.260Z',55,NULL); +INSERT INTO coupon_usage VALUES(57,17,5,'2025-12-19T03:46:32.077Z',74,NULL); +INSERT INTO coupon_usage VALUES(58,17,7,'2025-12-19T11:01:02.235Z',85,NULL); +INSERT INTO coupon_usage VALUES(59,2,8,'2025-12-27T12:09:01.970Z',117,NULL); +INSERT INTO coupon_usage VALUES(60,2,8,'2025-12-28T08:41:24.922Z',121,NULL); +INSERT INTO coupon_usage VALUES(61,2,10,'2026-01-01T03:14:07.880Z',125,NULL); +INSERT INTO coupon_usage VALUES(62,2,12,'2026-01-01T06:40:15.200Z',127,NULL); +INSERT INTO coupon_usage VALUES(63,1,13,'2026-01-06T07:21:22.063Z',132,NULL); +INSERT INTO coupon_usage VALUES(64,21,5,'2026-01-06T11:13:08.886Z',134,NULL); +INSERT INTO coupon_usage VALUES(65,2,16,'2026-01-15T10:38:51.425Z',149,NULL); +INSERT INTO coupon_usage VALUES(66,2,16,'2026-01-16T07:20:20.484Z',151,NULL); +INSERT INTO coupon_usage VALUES(67,2,16,'2026-01-16T07:20:39.331Z',152,NULL); +INSERT INTO coupon_usage VALUES(68,2,16,'2026-01-16T07:21:00.372Z',153,NULL); +INSERT INTO coupon_usage VALUES(69,2,16,'2026-01-16T07:21:27.067Z',154,NULL); +INSERT INTO coupon_usage VALUES(70,2,16,'2026-01-16T07:22:32.774Z',155,NULL); +INSERT INTO coupon_usage VALUES(71,7,17,'2026-02-01T00:28:05.860Z',191,NULL); +INSERT INTO coupon_usage VALUES(72,38,17,'2026-02-01T02:19:04.935Z',194,NULL); +INSERT INTO coupon_usage VALUES(77,7,17,'2026-02-02T08:27:54.169Z',206,NULL); +INSERT INTO coupon_usage VALUES(78,1,17,'2026-02-02T12:53:25.042Z',208,NULL); +INSERT INTO coupon_usage VALUES(79,38,17,'2026-02-02T22:40:01.684Z',209,NULL); +INSERT INTO coupon_usage VALUES(80,38,17,'2026-02-03T08:43:00.805Z',215,NULL); +INSERT INTO coupon_usage VALUES(81,96,17,'2026-02-04T01:36:25.150Z',217,NULL); +INSERT INTO coupon_usage VALUES(82,81,17,'2026-02-04T02:41:07.529Z',218,NULL); +INSERT INTO coupon_usage VALUES(83,24,17,'2026-02-05T04:00:30.760Z',221,NULL); +INSERT INTO coupon_usage VALUES(84,115,17,'2026-02-06T10:26:39.549Z',226,NULL); +INSERT INTO coupon_usage VALUES(85,103,17,'2026-02-06T23:28:37.564Z',230,NULL); +INSERT INTO coupon_usage VALUES(86,103,17,'2026-02-06T23:36:55.440Z',231,NULL); +INSERT INTO coupon_usage VALUES(87,120,17,'2026-02-07T23:11:07.314Z',235,NULL); +INSERT INTO coupon_usage VALUES(88,2,17,'2026-02-10T21:59:33.775Z',250,NULL); +INSERT INTO coupon_usage VALUES(89,2,17,'2026-02-16T01:21:48.065Z',256,NULL); +INSERT INTO coupon_usage VALUES(90,134,17,'2026-02-16T04:14:55.536Z',257,NULL); +INSERT INTO coupon_usage VALUES(91,120,17,'2026-02-17T00:44:27.989Z',259,NULL); +INSERT INTO coupon_usage VALUES(92,145,17,'2026-02-18T03:46:31.310Z',271,NULL); +INSERT INTO coupon_usage VALUES(93,81,17,'2026-02-21T03:19:33.184Z',312,NULL); +INSERT INTO coupon_usage VALUES(94,7,17,'2026-02-21T12:32:34.322Z',318,NULL); +INSERT INTO coupon_usage VALUES(95,141,17,'2026-02-21T19:42:40.636Z',319,NULL); +INSERT INTO coupon_usage VALUES(96,120,17,'2026-02-21T22:34:37.455Z',321,NULL); +INSERT INTO coupon_usage VALUES(97,193,17,'2026-02-21T22:53:17.777Z',322,NULL); +INSERT INTO coupon_usage VALUES(98,130,17,'2026-02-21T23:38:18.551Z',324,NULL); +INSERT INTO coupon_usage VALUES(99,223,17,'2026-02-23T03:47:30.752Z',334,NULL); +CREATE TABLE IF NOT EXISTS "coupons" ("id" INTEGER PRIMARY KEY, "is_user_based" INTEGER NOT NULL DEFAULT false, "discount_percent" REAL, "flat_discount" REAL, "min_order" REAL, "created_by" INTEGER, "max_value" REAL, "is_invalidated" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "is_apply_for_all" INTEGER NOT NULL DEFAULT false, "valid_till" TEXT, "max_limit_for_user" INTEGER, "coupon_code" TEXT NOT NULL, "product_ids" INTEGER, "exclusive_apply" INTEGER NOT NULL DEFAULT false); +INSERT INTO coupons VALUES(1,0,20.0,NULL,500.0,1,NULL,1,'2025-11-21T08:44:20.264Z',1,'2025-11-29T18:30:00.000Z',NULL,'BIG50',NULL,0); +INSERT INTO coupons VALUES(2,0,50.0,NULL,1000.0,1,500.0,1,'2025-11-22T03:29:29.904Z',1,'2026-01-06T18:30:00.000Z',1,'SAVEMORE',NULL,0); +INSERT INTO coupons VALUES(3,0,20.0,NULL,5000.0,1,NULL,0,'2025-11-24T06:11:19.047Z',1,'2025-12-24T18:30:00.000Z',NULL,'BIG100',NULL,0); +INSERT INTO coupons VALUES(4,0,20.0,NULL,500.0,1,NULL,0,'2025-11-24T06:13:06.090Z',1,'2025-11-29T18:30:00.000Z',NULL,'BIG150',NULL,0); +INSERT INTO coupons VALUES(5,0,NULL,150.0,700.0,1,150.0,0,'2025-11-26T14:20:29.369Z',1,'2026-01-29T14:20:00.000Z',1,'FIRST150',NULL,0); +INSERT INTO coupons VALUES(6,1,NULL,4686.0,0.0,1,4686.0,0,'2025-11-29T01:35:51.215Z',0,'2025-12-29T01:35:51.214Z',1,'MOHORD050',NULL,0); +INSERT INTO coupons VALUES(7,1,NULL,22.0,22.0,1,22.0,0,'2025-12-19T10:00:13.297Z',0,'2026-01-18T10:00:13.297Z',1,'BHA82',NULL,0); +INSERT INTO coupons VALUES(8,0,10.0,20.0,200.0,1,20.0,1,'2025-12-22T05:20:27.988Z',1,'2025-12-29T18:30:00.000Z',6,'135',NULL,0); +INSERT INTO coupons VALUES(9,1,NULL,236.0,236.0,1,236.0,0,'2025-12-27T12:04:22.196Z',0,'2026-01-26T12:04:22.195Z',1,'MOH115',NULL,0); +INSERT INTO coupons VALUES(10,1,NULL,128.41999999999997861,128.41999999999997861,1,128.41999999999997861,0,'2025-12-27T19:11:57.259Z',0,'2026-01-26T19:11:57.259Z',1,'868117',NULL,0); +INSERT INTO coupons VALUES(11,1,20.0,NULL,500.0,1,250.0,0,'2026-01-01T04:39:53.608Z',0,'2026-01-30T04:39:00.000Z',3,'SHAFITEST2',NULL,0); +INSERT INTO coupons VALUES(12,0,10.0,NULL,500.0,1,50.0,0,'2026-01-01T06:39:22.230Z',1,'2026-01-07T06:37:00.000Z',1,'SAVEMORE0',NULL,0); +INSERT INTO coupons VALUES(13,1,30.0,NULL,2000.0,1,850.0,0,'2026-01-06T07:19:44.069Z',0,'2026-01-30T07:19:00.000Z',5,'TESTDISCOUNT',NULL,0); +INSERT INTO coupons VALUES(14,1,20.0,NULL,1200.0,1,600.0,0,'2026-01-06T13:10:01.161Z',0,'2026-02-27T13:09:00.000Z',4,'TESTCOUPON3',NULL,0); +INSERT INTO coupons VALUES(15,1,25.0,NULL,1000.0,1,250.0,0,'2026-01-12T03:28:20.356Z',0,'2026-01-30T07:46:00.000Z',2,'RESERVE_TEST34',NULL,0); +INSERT INTO coupons VALUES(16,0,10.0,NULL,500.0,1,50.0,0,'2026-01-15T10:27:07.302Z',1,'2026-01-19T18:30:00.000Z',2,'SAVEOFF10U',NULL,0); +INSERT INTO coupons VALUES(17,0,10.0,NULL,359.0,1,50.0,0,'2026-01-25T13:00:26.545Z',1,'2026-03-30T18:30:00.000Z',3,'START10',NULL,0); +INSERT INTO coupons VALUES(18,1,10.0,NULL,100.0,1,50.0,0,'2026-02-18T03:44:14.005Z',0,'2026-02-28T03:44:00.000Z',2,'NAHEED10',NULL,0); +CREATE TABLE IF NOT EXISTS "delivery_slot_info" ("id" INTEGER PRIMARY KEY, "delivery_time" TEXT NOT NULL, "freeze_time" TEXT NOT NULL, "is_active" INTEGER NOT NULL DEFAULT true, "delivery_sequence" TEXT, "is_flash" INTEGER NOT NULL DEFAULT false, "group_ids" TEXT, "is_capacity_full" INTEGER NOT NULL DEFAULT false); +INSERT INTO delivery_slot_info VALUES(1,'2025-11-25T20:00:00.000Z','2025-11-21T18:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(2,'2025-11-30T01:39:00.000Z','2025-11-29T01:40:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(3,'2025-11-22T19:01:00.000Z','2025-11-23T19:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(4,'2025-11-29T19:30:00.000Z','2025-11-29T17:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(5,'2025-12-10T00:00:00.000Z','2025-12-06T19:50:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(6,'2025-12-10T18:59:00.000Z','2025-12-10T18:59:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(7,'2025-12-15T03:00:00.000Z','2025-12-15T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(8,'2025-12-24T14:00:00.000Z','2025-12-25T00:00:00.000Z',1,'{"1":[72,71,67],"2":[70],"3":[69,73,74,76,75]}',0,NULL,0); +INSERT INTO delivery_slot_info VALUES(9,'2025-12-24T23:00:00.000Z','2025-12-24T21:00:00.000Z',1,'{"1":[62,60]}',0,NULL,0); +INSERT INTO delivery_slot_info VALUES(10,'2025-12-25T05:20:00.000Z','2025-12-24T18:25:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(11,'2025-12-20T16:00:00.000Z','2025-12-19T07:46:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(12,'2025-12-22T16:00:00.000Z','2025-12-23T17:51:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(13,'2025-12-19T09:52:00.000Z','2025-12-19T10:52:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(14,'2025-12-19T10:05:00.000Z','2025-12-19T12:05:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(15,'2025-12-19T10:08:00.000Z','2025-12-18T14:08:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(16,'2025-12-29T21:00:00.000Z','2025-12-29T19:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(17,'2025-12-30T15:10:00.000Z','2025-12-30T19:37:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(18,'2025-12-30T08:00:00.000Z','2025-12-29T18:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(19,'2025-12-28T19:00:00.000Z','2025-12-28T19:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(20,'2026-01-04T21:00:00.000Z','2026-01-04T19:00:00.000Z',1,'{"1":[123,124]}',0,NULL,0); +INSERT INTO delivery_slot_info VALUES(21,'2026-01-05T22:00:00.000Z','2026-01-05T21:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(22,'2026-01-09T22:00:00.000Z','2026-01-09T21:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(23,'2026-01-22T03:00:00.000Z','2026-01-20T03:00:00.000Z',1,'{"1":[149,151,139,142,148]}',0,NULL,0); +INSERT INTO delivery_slot_info VALUES(24,'2026-01-13T04:27:08.055Z','2026-01-13T04:27:08.055Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(25,'2026-01-13T04:46:11.387Z','2026-01-13T04:46:11.387Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(26,'2026-01-14T13:38:58.391Z','2026-01-14T13:38:58.391Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(27,'2026-01-14T13:53:52.798Z','2026-01-14T13:53:52.798Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(28,'2026-01-14T13:54:46.003Z','2026-01-14T13:54:46.003Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(29,'2026-01-14T13:59:46.565Z','2026-01-14T13:59:46.565Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(30,'2026-01-14T14:07:19.783Z','2026-01-14T14:07:19.783Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(31,'2026-01-15T20:00:00.000Z','2026-01-15T20:00:00.000Z',1,'{"1":[150]}',0,NULL,0); +INSERT INTO delivery_slot_info VALUES(32,'2026-01-16T21:00:00.000Z','2026-01-16T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(33,'2026-01-17T00:16:00.000Z','2026-01-17T00:16:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(34,'2026-01-21T03:00:00.000Z','2026-01-20T23:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(35,'2026-01-23T20:00:00.000Z','2026-01-23T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(37,'2026-01-24T00:00:00.000Z','2026-01-23T23:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(38,'2026-01-24T01:00:00.000Z','2026-01-24T00:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(39,'2026-01-29T08:00:00.000Z','2026-01-29T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(40,'2026-01-23T08:00:00.000Z','2026-01-23T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(41,'2026-01-25T20:00:00.000Z','2026-01-25T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(43,'2026-01-25T21:00:00.000Z','2026-01-25T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(44,'2026-01-26T00:00:00.000Z','2026-01-26T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(45,'2026-01-26T01:00:00.000Z','2026-01-26T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(46,'2026-01-26T07:00:00.000Z','2026-01-26T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(47,'2026-01-26T20:00:00.000Z','2026-01-26T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(48,'2026-01-26T21:00:00.000Z','2026-01-26T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(49,'2026-01-27T00:00:00.000Z','2026-01-27T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(50,'2026-01-27T20:00:00.000Z','2026-01-27T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(51,'2026-01-27T21:00:00.000Z','2026-01-27T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(52,'2026-01-28T00:00:00.000Z','2026-01-28T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(53,'2026-01-28T01:00:00.000Z','2026-01-28T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(54,'2026-01-28T07:00:00.000Z','2026-01-28T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(55,'2026-01-28T20:00:00.000Z','2026-01-28T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(56,'2026-01-29T20:00:00.000Z','2026-01-29T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(57,'2026-01-29T21:00:00.000Z','2026-01-29T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(58,'2026-01-30T00:00:00.000Z','2026-01-30T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(59,'2026-01-30T01:00:00.000Z','2026-01-30T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(60,'2026-01-30T07:00:00.000Z','2026-01-30T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(61,'2026-01-30T08:00:00.000Z','2026-01-30T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(62,'2026-01-30T20:00:00.000Z','2026-01-30T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(63,'2026-01-30T21:00:00.000Z','2026-01-30T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(64,'2026-01-31T00:00:00.000Z','2026-01-31T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(65,'2026-01-31T01:00:00.000Z','2026-01-31T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(66,'2026-01-31T07:00:00.000Z','2026-01-31T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(67,'2026-01-31T08:00:00.000Z','2026-01-31T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(68,'2026-01-31T20:00:00.000Z','2026-01-31T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(69,'2026-01-31T21:00:00.000Z','2026-01-31T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(70,'2026-02-01T00:00:00.000Z','2026-02-01T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(71,'2026-02-01T04:00:00.000Z','2026-02-01T03:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(72,'2026-02-01T07:00:00.000Z','2026-02-01T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(73,'2026-02-01T08:00:00.000Z','2026-02-01T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(74,'2026-02-01T20:00:00.000Z','2026-02-01T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(75,'2026-02-01T21:00:00.000Z','2026-02-01T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(76,'2026-02-02T00:00:00.000Z','2026-02-02T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(77,'2026-02-02T01:00:00.000Z','2026-02-02T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(78,'2026-02-02T04:00:00.000Z','2026-02-02T04:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(79,'2026-02-02T07:00:00.000Z','2026-02-02T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(80,'2026-02-02T08:00:00.000Z','2026-02-02T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(81,'2026-02-02T20:00:00.000Z','2026-02-02T20:00:00.000Z',1,NULL,0,'[5,7,8,10]',0); +INSERT INTO delivery_slot_info VALUES(82,'2026-02-02T21:00:00.000Z','2026-02-02T21:00:00.000Z',1,NULL,0,'[5,7,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(83,'2026-02-03T00:00:00.000Z','2026-02-03T00:00:00.000Z',1,NULL,0,'[5,7,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(84,'2026-02-03T01:00:00.000Z','2026-02-03T01:00:00.000Z',1,NULL,0,'[8,7,5,10,9]',0); +INSERT INTO delivery_slot_info VALUES(85,'2026-02-03T07:00:00.000Z','2026-02-03T07:00:00.000Z',1,NULL,0,'[8,5,10]',0); +INSERT INTO delivery_slot_info VALUES(86,'2026-02-03T08:00:00.000Z','2026-02-03T08:00:00.000Z',1,NULL,0,'[8,5,10]',0); +INSERT INTO delivery_slot_info VALUES(87,'2026-02-03T04:00:00.000Z','2026-02-03T04:00:00.000Z',1,NULL,0,'[5,7,8,10]',0); +INSERT INTO delivery_slot_info VALUES(88,'2026-02-03T20:00:00.000Z','2026-02-03T20:00:00.000Z',1,NULL,0,'[10,8,5,7]',0); +INSERT INTO delivery_slot_info VALUES(89,'2026-02-03T21:00:00.000Z','2026-02-03T21:00:00.000Z',1,NULL,0,'[8,5,10]',0); +INSERT INTO delivery_slot_info VALUES(90,'2026-02-04T00:00:00.000Z','2026-02-04T00:00:00.000Z',1,NULL,0,'[8,5,10,7,9]',0); +INSERT INTO delivery_slot_info VALUES(91,'2026-02-04T01:00:00.000Z','2026-02-04T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5]',0); +INSERT INTO delivery_slot_info VALUES(92,'2026-02-04T04:00:00.000Z','2026-02-04T04:00:00.000Z',1,NULL,0,'[5,8,10]',0); +INSERT INTO delivery_slot_info VALUES(93,'2026-02-04T07:00:00.000Z','2026-02-04T07:00:00.000Z',1,NULL,0,'[10,8,5]',0); +INSERT INTO delivery_slot_info VALUES(94,'2026-02-04T08:00:00.000Z','2026-02-04T08:00:00.000Z',1,NULL,0,'[10,8,5]',0); +INSERT INTO delivery_slot_info VALUES(95,'2026-02-04T20:00:00.000Z','2026-02-04T19:45:00.000Z',1,NULL,0,'[10,8,5,7]',0); +INSERT INTO delivery_slot_info VALUES(96,'2026-02-04T21:00:00.000Z','2026-02-04T20:45:00.000Z',1,NULL,0,'[8,5,10]',0); +INSERT INTO delivery_slot_info VALUES(97,'2026-02-05T00:00:00.000Z','2026-02-04T23:45:00.000Z',1,NULL,0,'[8,5,10,7,9]',0); +INSERT INTO delivery_slot_info VALUES(98,'2026-02-05T01:00:00.000Z','2026-02-05T00:45:00.000Z',1,NULL,0,'[10,9,8,7,5]',0); +INSERT INTO delivery_slot_info VALUES(99,'2026-02-05T04:00:00.000Z','2026-02-05T03:45:00.000Z',1,NULL,0,'[5,8,10]',0); +INSERT INTO delivery_slot_info VALUES(100,'2026-02-05T07:00:00.000Z','2026-02-05T06:45:00.000Z',1,NULL,0,'[10,8,5]',0); +INSERT INTO delivery_slot_info VALUES(101,'2026-02-05T20:00:00.000Z','2026-02-05T20:00:00.000Z',1,NULL,0,'[8,7,5]',0); +INSERT INTO delivery_slot_info VALUES(102,'2026-02-05T21:00:00.000Z','2026-02-05T21:00:00.000Z',1,NULL,0,'[8,7,5,9,10,3]',0); +INSERT INTO delivery_slot_info VALUES(103,'2026-02-06T00:00:00.000Z','2026-02-06T00:00:00.000Z',1,NULL,0,'[8,7,5,9,10,3]',0); +INSERT INTO delivery_slot_info VALUES(104,'2026-02-06T01:00:00.000Z','2026-02-06T01:00:00.000Z',1,NULL,0,'[8,7,5,9,10,3]',0); +INSERT INTO delivery_slot_info VALUES(105,'2026-02-06T04:00:00.000Z','2026-02-06T04:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(106,'2026-02-06T07:00:00.000Z','2026-02-06T07:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(107,'2026-02-05T20:00:00.000Z','2026-02-05T20:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(108,'2026-02-06T08:00:00.000Z','2026-02-06T08:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(109,'2026-02-06T20:00:00.000Z','2026-02-06T20:00:00.000Z',1,NULL,0,'[8,5,10,3,7]',0); +INSERT INTO delivery_slot_info VALUES(110,'2026-02-06T21:00:00.000Z','2026-02-06T21:00:00.000Z',1,NULL,0,'[8,5,10,3,7,9]',0); +INSERT INTO delivery_slot_info VALUES(111,'2026-02-07T00:00:00.000Z','2026-02-07T00:00:00.000Z',1,NULL,0,'[8,5,10,3,7,9]',0); +INSERT INTO delivery_slot_info VALUES(112,'2026-02-07T01:00:00.000Z','2026-02-07T01:00:00.000Z',1,NULL,0,'[8,5,10,3,7,9]',0); +INSERT INTO delivery_slot_info VALUES(113,'2026-02-07T04:00:00.000Z','2026-02-07T04:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(114,'2026-02-07T07:00:00.000Z','2026-02-07T07:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(115,'2026-02-07T08:00:00.000Z','2026-02-07T08:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(116,'2026-02-07T20:00:00.000Z','2026-02-07T20:00:00.000Z',1,NULL,0,'[9,8,7,5]',0); +INSERT INTO delivery_slot_info VALUES(117,'2026-02-07T21:00:00.000Z','2026-02-07T21:00:00.000Z',1,NULL,0,'[3,5,7,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(118,'2026-02-08T00:00:00.000Z','2026-02-08T00:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(119,'2026-02-08T01:00:00.000Z','2026-02-08T01:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(120,'2026-02-08T04:00:00.000Z','2026-02-08T04:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(121,'2026-02-08T07:00:00.000Z','2026-02-08T07:00:00.000Z',1,NULL,0,'[10,8,5,3,9]',0); +INSERT INTO delivery_slot_info VALUES(122,'2026-02-08T08:00:00.000Z','2026-02-08T08:00:00.000Z',1,NULL,0,'[10,8,5,3,9]',0); +INSERT INTO delivery_slot_info VALUES(123,'2026-02-08T20:00:00.000Z','2026-02-08T20:00:00.000Z',1,NULL,0,'[9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(124,'2026-02-08T21:00:00.000Z','2026-02-08T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(125,'2026-02-09T00:00:00.000Z','2026-02-09T00:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(126,'2026-02-09T01:00:00.000Z','2026-02-09T01:00:00.000Z',1,NULL,0,'[9,8,7,5,3,10]',0); +INSERT INTO delivery_slot_info VALUES(127,'2026-02-09T04:00:00.000Z','2026-02-09T04:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(128,'2026-02-09T07:00:00.000Z','2026-02-09T07:00:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(129,'2026-02-09T08:00:00.000Z','2026-02-09T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(130,'2026-02-09T20:00:00.000Z','2026-02-09T20:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(131,'2026-02-09T21:00:00.000Z','2026-02-09T21:00:00.000Z',1,NULL,0,'[10,9,8,5,3,7]',0); +INSERT INTO delivery_slot_info VALUES(132,'2026-02-10T00:00:00.000Z','2026-02-10T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(133,'2026-02-10T01:00:00.000Z','2026-02-10T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(134,'2026-02-10T04:00:00.000Z','2026-02-10T04:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(135,'2026-02-10T07:00:00.000Z','2026-02-10T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(136,'2026-02-10T08:00:00.000Z','2026-02-10T08:00:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(137,'2026-02-10T20:00:00.000Z','2026-02-10T20:00:00.000Z',1,NULL,0,'[9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(138,'2026-02-10T21:00:00.000Z','2026-02-10T21:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(139,'2026-02-11T00:00:00.000Z','2026-02-11T00:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(140,'2026-02-11T01:00:00.000Z','2026-02-11T01:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(141,'2026-02-11T04:00:00.000Z','2026-02-11T04:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(142,'2026-02-11T07:00:00.000Z','2026-02-11T07:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(143,'2026-02-11T08:00:00.000Z','2026-02-11T08:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(144,'2026-02-11T20:00:00.000Z','2026-02-11T20:00:00.000Z',1,NULL,0,'[9,8,7,5]',0); +INSERT INTO delivery_slot_info VALUES(145,'2026-02-11T21:00:00.000Z','2026-02-11T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(146,'2026-02-12T00:00:00.000Z','2026-02-12T00:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(147,'2026-02-12T01:00:00.000Z','2026-02-12T00:45:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(148,'2026-02-12T20:00:00.000Z','2026-02-12T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(149,'2026-02-12T21:00:00.000Z','2026-02-12T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(150,'2026-02-13T00:00:00.000Z','2026-02-13T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(151,'2026-02-13T01:00:00.000Z','2026-02-13T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(152,'2026-02-13T04:00:00.000Z','2026-02-13T04:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(153,'2026-02-13T07:00:00.000Z','2026-02-13T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(154,'2026-02-13T08:00:00.000Z','2026-02-13T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(155,'2026-02-13T20:00:00.000Z','2026-02-13T20:00:00.000Z',1,NULL,0,'[10,9,8,5,3,7]',0); +INSERT INTO delivery_slot_info VALUES(156,'2026-02-13T21:00:00.000Z','2026-02-13T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(157,'2026-02-14T00:00:00.000Z','2026-02-14T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(158,'2026-02-14T01:00:00.000Z','2026-02-14T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(159,'2026-02-14T04:00:00.000Z','2026-02-14T04:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(160,'2026-02-14T07:00:00.000Z','2026-02-14T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(161,'2026-02-14T08:00:00.000Z','2026-02-14T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(162,'2026-02-14T20:00:00.000Z','2026-02-14T20:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(163,'2026-02-14T21:00:00.000Z','2026-02-14T21:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(164,'2026-02-15T00:00:00.000Z','2026-02-15T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(165,'2026-02-15T01:00:00.000Z','2026-02-15T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(166,'2026-02-15T04:00:00.000Z','2026-02-15T04:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(167,'2026-02-15T07:00:00.000Z','2026-02-15T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(168,'2026-02-15T08:00:00.000Z','2026-02-15T08:00:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(169,'2026-02-15T20:00:00.000Z','2026-02-15T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(170,'2026-02-15T21:00:00.000Z','2026-02-15T21:00:00.000Z',1,NULL,0,'[10,8,9,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(171,'2026-02-16T00:00:00.000Z','2026-02-16T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(172,'2026-02-16T01:00:00.000Z','2026-02-16T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(173,'2026-02-16T04:30:00.000Z','2026-02-16T04:30:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(174,'2026-02-16T07:00:00.000Z','2026-02-16T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(175,'2026-02-16T08:00:00.000Z','2026-02-16T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(176,'2026-02-16T20:00:00.000Z','2026-02-16T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(177,'2026-02-16T21:00:00.000Z','2026-02-16T20:45:00.000Z',1,NULL,0,'[10,8,9,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(178,'2026-02-17T00:00:00.000Z','2026-02-16T23:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(179,'2026-02-17T01:00:00.000Z','2026-02-17T00:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(180,'2026-02-17T04:30:00.000Z','2026-02-17T04:15:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(181,'2026-02-17T07:00:00.000Z','2026-02-17T07:00:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(182,'2026-02-17T08:00:00.000Z','2026-02-17T08:00:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(183,'2026-02-17T20:00:00.000Z','2026-02-17T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(184,'2026-02-17T21:00:00.000Z','2026-02-17T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(185,'2026-02-18T00:00:00.000Z','2026-02-18T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(186,'2026-02-18T01:00:00.000Z','2026-02-18T01:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(187,'2026-02-18T04:00:00.000Z','2026-02-18T04:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(188,'2026-02-18T07:00:00.000Z','2026-02-18T07:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(189,'2026-02-18T08:00:00.000Z','2026-02-18T08:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(190,'2026-02-18T20:00:00.000Z','2026-02-18T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(191,'2026-02-18T21:00:00.000Z','2026-02-18T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(192,'2026-02-19T00:00:00.000Z','2026-02-19T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(193,'2026-02-19T21:00:00.000Z','2026-02-19T21:00:00.000Z',1,NULL,0,'[3,5,8,7,9,10]',0); +INSERT INTO delivery_slot_info VALUES(194,'2026-02-19T04:00:00.000Z','2026-02-19T04:00:00.000Z',1,NULL,0,'[3,5,8,7,9,10]',0); +INSERT INTO delivery_slot_info VALUES(195,'2026-02-19T07:00:00.000Z','2026-02-19T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(196,'2026-02-19T08:00:00.000Z','2026-02-19T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(197,'2026-02-19T06:00:00.000Z','2026-02-19T06:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(198,'2026-02-18T20:00:00.000Z','2026-02-18T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(199,'2026-02-18T21:00:00.000Z','2026-02-18T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(200,'2026-02-19T20:00:00.000Z','2026-02-19T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(201,'2026-02-19T21:00:00.000Z','2026-02-19T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(202,'2026-02-20T00:00:00.000Z','2026-02-20T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(203,'2026-02-20T01:00:00.000Z','2026-02-20T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(204,'2026-02-20T04:00:00.000Z','2026-02-20T04:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(205,'2026-02-19T20:00:00.000Z','2026-02-19T20:00:00.000Z',1,NULL,0,'[3,5,8,7,9,10]',0); +INSERT INTO delivery_slot_info VALUES(206,'2026-02-20T08:00:00.000Z','2026-02-20T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(207,'2026-02-20T05:00:00.000Z','2026-02-20T05:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(208,'2026-02-20T20:00:00.000Z','2026-02-20T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(209,'2026-02-20T21:00:00.000Z','2026-02-20T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(210,'2026-02-21T00:00:00.000Z','2026-02-21T00:00:00.000Z',1,NULL,0,'[3,5,8,7,9,10]',0); +INSERT INTO delivery_slot_info VALUES(211,'2026-02-21T01:00:00.000Z','2026-02-21T00:45:00.000Z',1,NULL,0,'[3,5,8,7,9,10]',0); +INSERT INTO delivery_slot_info VALUES(212,'2026-02-21T04:00:00.000Z','2026-02-21T03:45:00.000Z',1,NULL,0,'[3,5,8,9,10]',0); +INSERT INTO delivery_slot_info VALUES(213,'2026-02-21T05:00:00.000Z','2026-02-21T04:45:00.000Z',1,NULL,0,'[3,5,8,9,10]',0); +INSERT INTO delivery_slot_info VALUES(214,'2026-02-21T08:00:00.000Z','2026-02-21T07:45:00.000Z',1,NULL,0,'[3,5,8,9,10]',0); +INSERT INTO delivery_slot_info VALUES(215,'2026-02-21T06:30:00.000Z','2026-02-21T06:30:00.000Z',1,NULL,0,'[3,5,8,9,10]',0); +INSERT INTO delivery_slot_info VALUES(216,'2026-02-21T20:00:00.000Z','2026-02-21T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(217,'2026-02-21T21:00:00.000Z','2026-02-21T20:45:00.000Z',1,NULL,0,'[10,9,8,5,7,3]',0); +INSERT INTO delivery_slot_info VALUES(218,'2026-02-22T00:00:00.000Z','2026-02-21T23:44:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(219,'2026-02-22T01:00:00.000Z','2026-02-22T00:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(220,'2026-02-22T04:00:00.000Z','2026-02-22T03:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(221,'2026-02-22T05:00:00.000Z','2026-02-22T04:45:00.000Z',1,NULL,0,'[3,5,8,9,10]',0); +INSERT INTO delivery_slot_info VALUES(222,'2026-02-22T08:00:00.000Z','2026-02-22T07:45:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(223,'2026-02-22T20:00:00.000Z','2026-02-22T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(224,'2026-02-22T21:00:00.000Z','2026-02-22T20:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(225,'2026-02-23T00:00:00.000Z','2026-02-22T23:44:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(226,'2026-02-23T01:00:00.000Z','2026-02-23T00:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(227,'2026-02-23T04:00:00.000Z','2026-02-23T03:45:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(228,'2026-02-23T05:00:00.000Z','2026-02-23T04:45:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(229,'2026-02-23T08:00:00.000Z','2026-02-23T07:45:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(230,'2026-02-23T20:00:00.000Z','2026-02-23T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(231,'2026-02-23T21:00:00.000Z','2026-02-23T20:45:00.000Z',1,NULL,0,'[5,7,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(232,'2026-02-24T00:00:00.000Z','2026-02-23T23:50:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(233,'2026-02-24T05:00:00.000Z','2026-02-24T04:50:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(234,'2026-02-24T01:00:00.000Z','2026-02-24T00:50:00.000Z',1,NULL,0,'[10,8,9,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(235,'2026-02-24T04:00:00.000Z','2026-02-24T03:50:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(236,'2026-02-24T08:00:00.000Z','2026-02-24T07:50:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(237,'2026-02-24T20:00:00.000Z','2026-02-24T19:50:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(238,'2026-02-24T21:00:00.000Z','2026-02-25T08:50:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(239,'2026-02-25T00:00:00.000Z','2026-02-25T00:50:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(240,'2026-02-25T01:00:00.000Z','2026-02-25T00:50:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(241,'2026-02-25T04:00:00.000Z','2026-02-25T03:50:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(242,'2026-02-25T05:00:00.000Z','2026-02-25T04:50:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(243,'2026-02-25T08:00:00.000Z','2026-02-25T07:50:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(244,'2026-02-24T05:00:00.000Z','2026-02-24T04:50:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(274,'2026-03-04T20:00:00.000Z','2026-03-04T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(275,'2026-03-08T02:04:00.000Z','2026-03-08T02:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(276,'2026-03-08T04:59:17.000Z','2026-03-08T04:44:17.000Z',1,NULL,0,'[]',0); +INSERT INTO delivery_slot_info VALUES(277,'2026-03-08T05:27:40.000Z','2026-03-08T05:12:40.000Z',1,NULL,0,'[7]',0); +INSERT INTO delivery_slot_info VALUES(278,'2026-03-08T06:38:16.000Z','2026-03-08T06:23:16.000Z',1,NULL,0,'[7]',0); +INSERT INTO delivery_slot_info VALUES(279,'2026-03-10T10:00:00.000Z','2026-03-10T08:00:00.000Z',1,NULL,0,'[7,8,9,10,5,3,2,1]',0); +INSERT INTO delivery_slot_info VALUES(280,'2026-03-13T09:00:00.000Z','2026-03-13T08:30:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(281,'2026-03-15T08:00:00.000Z','2026-03-15T07:30:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(282,'2026-03-15T21:00:00.000Z','2026-03-15T20:50:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(283,'2026-03-20T20:00:00.000Z','2026-03-20T19:50:00.000Z',1,NULL,0,'[9,10,8]',0); +INSERT INTO delivery_slot_info VALUES(284,'2026-03-22T08:00:00.000Z','2026-03-22T07:45:00.000Z',1,NULL,0,'[9,10,8]',0); +INSERT INTO delivery_slot_info VALUES(285,'2026-03-23T07:00:00.000Z','2026-03-23T06:28:00.000Z',1,NULL,0,'[9,10,8]',0); +INSERT INTO delivery_slot_info VALUES(286,'2026-03-27T01:00:00.000Z','2026-03-27T00:04:00.000Z',1,NULL,0,'[9,10,8]',0); +INSERT INTO delivery_slot_info VALUES(287,'2026-03-27T06:02:00.000Z','2026-03-27T05:54:00.000Z',1,NULL,0,'[9,10,8]',0); +CREATE TABLE IF NOT EXISTS "home_banners" ("id" INTEGER PRIMARY KEY, "name" TEXT NOT NULL, "image_url" TEXT NOT NULL, "description" TEXT, "redirect_url" TEXT, "serial_num" INTEGER, "is_active" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "last_updated" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "product_ids" TEXT); +INSERT INTO home_banners VALUES(9,'10%off ','store-images/1770281046297.jpg',NULL,NULL,1,0,'2026-02-05T03:14:06.996Z','2026-02-05T03:14:40.930Z','[]'); +INSERT INTO home_banners VALUES(11,'Daily veggies ','store-images/1770429593455.jpg','Under 19 ',NULL,2,0,'2026-02-06T20:29:57.566Z','2026-02-06T20:30:39.410Z','[45,72,76,97,70,32,74,77,33]'); +INSERT INTO home_banners VALUES(44,'Demo2','store-images/1774018257330.jpg','Demo to test image upload',NULL,999,0,'2026-03-20T09:20:59.008Z','2026-03-20T09:20:59.008Z','[33]'); +INSERT INTO home_banners VALUES(45,'Demo4','store-images/1774104855151.jpg','Ferocious',NULL,999,0,'2026-03-21T09:24:17.745Z','2026-03-21T09:24:17.745Z','[]'); +INSERT INTO home_banners VALUES(46,'Tests banner','store-images/1774365560714.jpg','Testing things again',NULL,999,0,'2026-03-24T09:49:25.241Z','2026-03-24T09:49:25.241Z','[]'); +CREATE TABLE IF NOT EXISTS "key_val_store" ("key" TEXT, "value" TEXT); +INSERT INTO key_val_store VALUES('allItemsOrder','[10,57,99,75,33,90,51,27,6,35,67,97,58,29,65,77,79,5,19,20,14,82,25,56,66,16,83,91,64,36,22,11,1,76,43,94,93,17,47,87,81,50,2,44,59,45,38,85,42,13,55,95,37,34,31,28,18,60,9,84,61,80,7,68,49,69,23,53,4,52,98,63,73,21,78,24,8,74,46,89,40,88,100,72,96,41,86,70,92,26,54,71,48,15,32,62,39,12,3,30]'); +INSERT INTO key_val_store VALUES('androidVersion','1.2.0'); +INSERT INTO key_val_store VALUES('appStoreUrl','https://info.freshyo.in/qr-based-download'); +INSERT INTO key_val_store VALUES('deliveryCharge','12.0'); +INSERT INTO key_val_store VALUES('flashDeliveryCharge','45.0'); +INSERT INTO key_val_store VALUES('flashFreeDeliveryThreshold','500.0'); +INSERT INTO key_val_store VALUES('freeDeliveryThreshold','180.0'); +INSERT INTO key_val_store VALUES('iosVersion','1.2.0'); +INSERT INTO key_val_store VALUES('isFlashDeliveryEnabled','1.0'); +INSERT INTO key_val_store VALUES('minRegularOrderValue','180.0'); +INSERT INTO key_val_store VALUES('playStoreUrl','https://info.freshyo.in/qr-based-download'); +INSERT INTO key_val_store VALUES('popularItems','[23,9,75,98,6,24,59]'); +INSERT INTO key_val_store VALUES('readableOrderId','160.0'); +INSERT INTO key_val_store VALUES('supportEmail','qushammohd@gmail.com'); +INSERT INTO key_val_store VALUES('supportMobile','9000885620.0'); +INSERT INTO key_val_store VALUES('tester','value41'); +INSERT INTO key_val_store VALUES('versionNum','1.2.0'); +CREATE TABLE IF NOT EXISTS "notif_creds" ("id" INTEGER PRIMARY KEY, "token" TEXT NOT NULL, "added_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "user_id" INTEGER NOT NULL, "last_verified" TEXT); +INSERT INTO notif_creds VALUES(3,'ExponentPushToken[iv6POIJTUIiGpkElL84fG7]','2026-02-07T11:16:24.831Z',7,'2026-02-24T00:15:43.239Z'); +INSERT INTO notif_creds VALUES(5,'ExponentPushToken[HnHTZNKG8TO0uuxIEus-PG]','2026-02-07T22:03:08.347Z',91,'2026-02-07T22:03:13.416Z'); +INSERT INTO notif_creds VALUES(6,'ExponentPushToken[UHMotrBnf-vEcprdmbwgIZ]','2026-02-07T23:41:11.318Z',98,'2026-02-08T00:48:44.187Z'); +INSERT INTO notif_creds VALUES(7,'ExponentPushToken[5lelv4B74He5Nhvhsar6bz]','2026-02-08T00:39:52.317Z',121,'2026-02-08T00:42:39.299Z'); +INSERT INTO notif_creds VALUES(8,'ExponentPushToken[v9sccYJj1ubyT6IIQxbvnI]','2026-02-08T01:20:56.512Z',121,'2026-02-08T04:34:48.600Z'); +INSERT INTO notif_creds VALUES(9,'ExponentPushToken[Gzd1aWPU7x-2s4MHC66HgW]','2026-02-08T02:59:16.517Z',21,'2026-02-09T02:55:46.044Z'); +INSERT INTO notif_creds VALUES(10,'ExponentPushToken[qDmbx7D1wEHMyxdeTQj70d]','2026-02-08T04:32:21.955Z',122,'2026-02-08T04:32:21.954Z'); +INSERT INTO notif_creds VALUES(11,'ExponentPushToken[Tsdy4SCnFIXCEU3c2rWW2f]','2026-02-08T04:50:08.729Z',12,'2026-02-14T00:57:01.965Z'); +INSERT INTO notif_creds VALUES(12,'ExponentPushToken[TEbTuZC7F2E9OJTzFHNeoa]','2026-02-08T08:30:08.387Z',2,'2026-02-10T09:45:05.213Z'); +INSERT INTO notif_creds VALUES(14,'ExponentPushToken[RZKHsOC-WpryYm3Q50I86K]','2026-02-08T11:35:05.556Z',39,'2026-02-15T01:04:02.876Z'); +INSERT INTO notif_creds VALUES(15,'ExponentPushToken[VISDPrNjHVUy58fOF4jDWM]','2026-02-08T13:18:22.587Z',1,'2026-02-25T03:03:24.766Z'); +INSERT INTO notif_creds VALUES(16,'ExponentPushToken[w4KTsLKnnp8SbURdl5-Q6x]','2026-02-08T23:42:12.594Z',22,'2026-02-08T23:42:15.073Z'); +INSERT INTO notif_creds VALUES(17,'ExponentPushToken[CvSnNAF6ZN9qCVAsEH21kv]','2026-02-09T03:27:37.036Z',65,'2026-02-16T09:52:41.038Z'); +INSERT INTO notif_creds VALUES(18,'ExponentPushToken[qjCI58EqTOeyVk5yLFHGRq]','2026-02-09T05:48:51.370Z',123,'2026-02-09T05:48:51.369Z'); +INSERT INTO notif_creds VALUES(19,'ExponentPushToken[mZo3TECtB4tDVgxkDOwev6]','2026-02-09T06:32:26.730Z',124,'2026-02-15T05:21:29.871Z'); +INSERT INTO notif_creds VALUES(20,'ExponentPushToken[l527a0C4KT5Ez8aJL7K76l]','2026-02-09T06:40:39.831Z',107,'2026-02-09T06:40:43.875Z'); +INSERT INTO notif_creds VALUES(21,'ExponentPushToken[WxQDABD09Hd7JBURDocB67]','2026-02-09T07:54:12.209Z',125,'2026-02-11T13:07:59.678Z'); +INSERT INTO notif_creds VALUES(22,'ExponentPushToken[81Io9TG3Qg0s3N0V8L86T-]','2026-02-09T08:42:50.649Z',4,'2026-02-23T03:15:48.191Z'); +INSERT INTO notif_creds VALUES(23,'ExponentPushToken[buJyUUCfCpMmsiXqb1--T4]','2026-02-09T10:27:32.198Z',38,'2026-02-25T00:37:28.465Z'); +INSERT INTO notif_creds VALUES(24,'ExponentPushToken[B2zWnHNaumIgbeFFKO-15D]','2026-02-09T14:23:37.594Z',113,'2026-02-10T02:13:48.632Z'); +INSERT INTO notif_creds VALUES(25,'ExponentPushToken[wIhrdlAmwj0Eytvz3W3TTZ]','2026-02-10T05:39:24.848Z',127,'2026-02-11T10:41:39.340Z'); +INSERT INTO notif_creds VALUES(26,'ExponentPushToken[hFUlPFOKMdAUgtDP7EtSzM]','2026-02-10T06:03:43.821Z',3,'2026-02-24T05:46:46.799Z'); +INSERT INTO notif_creds VALUES(27,'ExponentPushToken[NymZTEED3G7YCyDg7ihgBA]','2026-02-10T21:46:04.540Z',2,'2026-02-25T02:12:27.021Z'); +INSERT INTO notif_creds VALUES(28,'ExponentPushToken[ARCT4KD7CJ_pFF_GkywepP]','2026-02-11T06:04:32.238Z',115,'2026-02-22T11:49:39.347Z'); +INSERT INTO notif_creds VALUES(29,'ExponentPushToken[NN4v16BFslBX8ryVXDwQIg]','2026-02-12T03:16:42.421Z',128,'2026-02-17T13:34:12.936Z'); +INSERT INTO notif_creds VALUES(30,'ExponentPushToken[qbteKBC1wbLMCe1ltpul7u]','2026-02-12T07:58:00.376Z',129,'2026-02-12T07:58:00.375Z'); +INSERT INTO notif_creds VALUES(31,'ExponentPushToken[PfjMc_CTRvSvOWtSNmaHhL]','2026-02-14T04:55:41.451Z',131,'2026-02-21T01:58:28.454Z'); +INSERT INTO notif_creds VALUES(32,'ExponentPushToken[dugZtvNyRBevvIcQED783-]','2026-02-14T13:12:44.549Z',120,'2026-02-21T22:33:17.004Z'); +INSERT INTO notif_creds VALUES(33,'ExponentPushToken[5AOIo1AxGkk5zpoVANRRxq]','2026-02-14T23:05:26.237Z',132,'2026-02-25T02:45:27.434Z'); +INSERT INTO notif_creds VALUES(34,'ExponentPushToken[1ZJ_ubPRINgtgfF4JcRz7Q]','2026-02-15T01:15:32.122Z',133,'2026-02-15T01:15:32.121Z'); +INSERT INTO notif_creds VALUES(35,'ExponentPushToken[pIQ2waNDjjSHjQYJbXKD8m]','2026-02-15T01:44:10.912Z',9,'2026-02-15T01:44:10.910Z'); +INSERT INTO notif_creds VALUES(36,'ExponentPushToken[93-_2gEHMwejR3miLX0RGU]','2026-02-15T22:24:33.307Z',1,'2026-03-26T05:56:10.685Z'); +INSERT INTO notif_creds VALUES(37,'ExponentPushToken[kq0I8ADfcQ4VcsZ0yK0Mlc]','2026-02-15T22:31:56.375Z',102,'2026-02-15T22:31:56.374Z'); +INSERT INTO notif_creds VALUES(38,'ExponentPushToken[8wH85rFtQRMk7ciFszmirX]','2026-02-16T04:00:32.930Z',134,'2026-02-22T01:32:06.467Z'); +INSERT INTO notif_creds VALUES(39,'ExponentPushToken[YJRSQmMUEUbaI2VCZLaoN_]','2026-02-16T04:19:56.439Z',6,'2026-02-22T05:05:18.294Z'); +INSERT INTO notif_creds VALUES(40,'ExponentPushToken[QoWbURL2N8-3jRhQwfnRP_]','2026-02-17T03:29:14.561Z',135,'2026-02-17T03:29:14.561Z'); +INSERT INTO notif_creds VALUES(41,'ExponentPushToken[sz_g75Il_CNAG6KpEAxYUH]','2026-02-17T07:26:33.589Z',136,'2026-02-21T03:12:45.220Z'); +INSERT INTO notif_creds VALUES(42,'ExponentPushToken[JMEvkUHKT0n34hcs-MiJAJ]','2026-02-17T08:52:02.805Z',137,'2026-02-17T13:05:14.821Z'); +INSERT INTO notif_creds VALUES(43,'ExponentPushToken[1msqBjJghAi4y8iYwJU-mS]','2026-02-17T09:06:43.131Z',138,'2026-02-23T02:25:49.796Z'); +INSERT INTO notif_creds VALUES(44,'ExponentPushToken[Wvc-xZKA5atNZTuIldtSIw]','2026-02-17T09:22:56.267Z',139,'2026-02-22T03:54:47.956Z'); +INSERT INTO notif_creds VALUES(45,'ExponentPushToken[cZOImkGKtoAxHQZgVtqP2K]','2026-02-17T13:47:10.364Z',140,'2026-02-20T04:17:44.482Z'); +INSERT INTO notif_creds VALUES(46,'ExponentPushToken[Z9RdieHVKXjshIx5Fde2N_]','2026-02-17T19:44:42.642Z',141,'2026-02-23T22:43:32.802Z'); +INSERT INTO notif_creds VALUES(47,'ExponentPushToken[y_gztJB3YIgxaTIe90h081]','2026-02-17T21:39:14.285Z',26,'2026-02-21T01:15:53.015Z'); +INSERT INTO notif_creds VALUES(48,'ExponentPushToken[PwdA7uENlBKK9zfX0IUQHX]','2026-02-17T22:23:25.609Z',142,'2026-02-17T22:28:05.274Z'); +INSERT INTO notif_creds VALUES(49,'ExponentPushToken[I9t84QIYuJ2wkBXTQCrWiO]','2026-02-17T22:54:14.079Z',143,'2026-02-20T01:53:38.305Z'); +INSERT INTO notif_creds VALUES(50,'ExponentPushToken[q6CpdyAjzrLcX5h-XyT2qd]','2026-02-18T00:19:05.701Z',119,'2026-02-18T01:54:00.101Z'); +INSERT INTO notif_creds VALUES(51,'ExponentPushToken[t9-luuLjLIZy__1AFGQne9]','2026-02-18T03:32:56.669Z',144,'2026-02-18T10:07:23.052Z'); +INSERT INTO notif_creds VALUES(52,'ExponentPushToken[LMwZ9hA618rm1SBbnSpLka]','2026-02-18T03:39:58.906Z',145,'2026-02-18T04:47:29.431Z'); +INSERT INTO notif_creds VALUES(53,'ExponentPushToken[Gb4KieGJIaPnwHmzTYtcMv]','2026-02-18T04:29:40.489Z',146,'2026-02-25T01:51:55.372Z'); +INSERT INTO notif_creds VALUES(54,'ExponentPushToken[B74UidJrvnrP8wBb_rHdAC]','2026-02-18T05:14:13.691Z',147,'2026-02-23T03:08:19.771Z'); +INSERT INTO notif_creds VALUES(55,'ExponentPushToken[x2VSb-OGOkn6ivVxpzk6tX]','2026-02-18T06:52:43.429Z',24,'2026-02-23T02:24:07.334Z'); +INSERT INTO notif_creds VALUES(56,'ExponentPushToken[qh6APjAuydb_LnlN4DqYsO]','2026-02-18T07:16:15.407Z',82,'2026-02-22T17:42:52.899Z'); +INSERT INTO notif_creds VALUES(57,'ExponentPushToken[2o572RMsmVSFjUamLuEcoU]','2026-02-18T07:29:53.266Z',148,'2026-02-20T06:08:25.014Z'); +INSERT INTO notif_creds VALUES(58,'ExponentPushToken[3kQdCMDTdTPoDMGP05IITB]','2026-02-18T09:09:16.947Z',149,'2026-02-24T07:04:44.462Z'); +INSERT INTO notif_creds VALUES(59,'ExponentPushToken[oHNDFzFcWPaMrr6UuCUaUd]','2026-02-18T09:11:42.373Z',150,'2026-02-19T04:45:17.727Z'); +INSERT INTO notif_creds VALUES(60,'ExponentPushToken[yjbwNxNUlwI3Gg2xmg_zEL]','2026-02-18T09:21:04.075Z',151,'2026-02-23T03:16:34.760Z'); +INSERT INTO notif_creds VALUES(61,'ExponentPushToken[WoLNBzF_Z7S79-otdUf4hA]','2026-02-18T10:43:23.031Z',152,'2026-02-18T10:47:26.759Z'); +INSERT INTO notif_creds VALUES(62,'ExponentPushToken[VBwbhYESzYkrYBaJNOr_Cd]','2026-02-18T13:29:45.807Z',153,'2026-02-24T13:08:44.803Z'); +INSERT INTO notif_creds VALUES(63,'ExponentPushToken[efBUNsNPuI9UiZMSyisyrS]','2026-02-18T23:28:22.392Z',154,'2026-02-18T23:28:55.761Z'); +INSERT INTO notif_creds VALUES(64,'ExponentPushToken[yoRlFwEZScYynd7F-b0EbZ]','2026-02-18T23:41:30.251Z',155,'2026-02-23T09:36:00.904Z'); +INSERT INTO notif_creds VALUES(65,'ExponentPushToken[QYu6kOP5XdkvJoa8BrF94D]','2026-02-18T23:57:33.153Z',156,'2026-02-23T06:19:11.964Z'); +INSERT INTO notif_creds VALUES(66,'ExponentPushToken[XB2QNBIw79ZsuLKMvoC75T]','2026-02-19T01:01:38.648Z',99,'2026-02-24T08:37:14.569Z'); +INSERT INTO notif_creds VALUES(67,'ExponentPushToken[JR8jlxCcjA6zSt1sIsEaFs]','2026-02-19T01:25:18.880Z',157,'2026-02-19T01:28:03.367Z'); +INSERT INTO notif_creds VALUES(68,'ExponentPushToken[yF2OgLNRsS-YpjLTkltwb7]','2026-02-19T01:44:36.670Z',158,'2026-02-24T05:24:44.962Z'); +INSERT INTO notif_creds VALUES(69,'ExponentPushToken[x4igFdIV9grI1HW3WI-4pI]','2026-02-19T02:15:42.349Z',66,'2026-02-25T02:57:31.607Z'); +INSERT INTO notif_creds VALUES(70,'ExponentPushToken[UrQXC8Eln55JuaZPjM9Ui-]','2026-02-19T02:26:27.728Z',118,'2026-02-19T02:26:27.727Z'); +INSERT INTO notif_creds VALUES(71,'ExponentPushToken[V3hUgLCihO9nsDNBx0uPA6]','2026-02-19T03:38:53.530Z',159,'2026-02-19T05:45:13.240Z'); +INSERT INTO notif_creds VALUES(72,'ExponentPushToken[ivyzcdINsQ3zwCkjlvbAv6]','2026-02-19T03:46:26.528Z',160,'2026-02-23T00:16:28.336Z'); +INSERT INTO notif_creds VALUES(73,'ExponentPushToken[UBKsoGEwMZLkm4B3wUtx5S]','2026-02-19T03:53:26.723Z',64,'2026-02-21T02:22:49.103Z'); +INSERT INTO notif_creds VALUES(74,'ExponentPushToken[8DeRubBDyrcnTSLEd0eYje]','2026-02-19T04:25:24.491Z',161,'2026-02-22T04:34:09.916Z'); +INSERT INTO notif_creds VALUES(76,'ExponentPushToken[AYJ8CwAMYzVS9VIFLdgWZw]','2026-02-19T05:06:22.547Z',162,'2026-02-19T05:09:49.327Z'); +INSERT INTO notif_creds VALUES(77,'ExponentPushToken[tgDCJ1Ht7X4xhJgvosny0I]','2026-02-19T06:46:50.611Z',163,'2026-02-23T01:08:20.953Z'); +INSERT INTO notif_creds VALUES(78,'ExponentPushToken[3ytgOdB6DwYeWZEbsYrcPT]','2026-02-19T07:01:01.329Z',164,'2026-02-19T07:01:01.328Z'); +INSERT INTO notif_creds VALUES(79,'ExponentPushToken[jYpwSQIh9pvCLtSH0WYq5F]','2026-02-19T10:26:49.976Z',165,'2026-02-22T04:41:48.209Z'); +INSERT INTO notif_creds VALUES(80,'ExponentPushToken[dcm7FmItp3TsKicDlHnkc2]','2026-02-19T12:05:06.988Z',166,'2026-02-19T12:05:06.987Z'); +INSERT INTO notif_creds VALUES(83,'ExponentPushToken[4AaCLjFOFe00dA_VppqThU]','2026-02-20T03:19:35.125Z',167,'2026-02-23T07:58:42.730Z'); +INSERT INTO notif_creds VALUES(84,'ExponentPushToken[58ID1kBjfcym3CJINcQD1b]','2026-02-20T03:35:57.056Z',169,'2026-02-20T11:05:08.705Z'); +INSERT INTO notif_creds VALUES(85,'ExponentPushToken[1BrdooOKzJj_P5fDkR3VWJ]','2026-02-20T03:53:54.652Z',170,'2026-02-24T04:56:33.324Z'); +INSERT INTO notif_creds VALUES(86,'ExponentPushToken[j1wJcqI6zGjw3c5oI-Dx9x]','2026-02-20T04:00:53.707Z',172,'2026-02-20T05:14:51.085Z'); +INSERT INTO notif_creds VALUES(89,'ExponentPushToken[6y3qNeJGgyakoSunKhEJT-]','2026-02-20T04:08:13.997Z',173,'2026-02-21T02:20:17.087Z'); +INSERT INTO notif_creds VALUES(93,'ExponentPushToken[T7gjPaDVOJQtJ5anemtNYZ]','2026-02-20T05:29:10.123Z',174,'2026-02-21T11:21:22.446Z'); +INSERT INTO notif_creds VALUES(94,'ExponentPushToken[bSn2s-AWE2bPZFmNbR3wBr]','2026-02-20T05:49:58.947Z',175,'2026-02-23T11:23:09.680Z'); +INSERT INTO notif_creds VALUES(95,'ExponentPushToken[nP7cTjChjAdo68V5rXbjX2]','2026-02-20T05:59:42.482Z',176,'2026-02-20T08:05:40.295Z'); +INSERT INTO notif_creds VALUES(96,'ExponentPushToken[7mwTBgFGWCsZ5bQW2Xn-8j]','2026-02-20T06:50:35.197Z',177,'2026-02-20T09:32:51.775Z'); +INSERT INTO notif_creds VALUES(97,'ExponentPushToken[Y1nFTyC4zbqVCw38UPwEh1]','2026-02-20T07:20:34.337Z',74,'2026-02-21T08:16:21.124Z'); +INSERT INTO notif_creds VALUES(98,'ExponentPushToken[SiFDTqAbkzt6Gqhy7CDvup]','2026-02-20T08:36:23.058Z',178,'2026-02-21T20:53:16.045Z'); +INSERT INTO notif_creds VALUES(99,'ExponentPushToken[a140_7HNF0K2YvX7h4ARWx]','2026-02-20T10:08:25.067Z',179,'2026-02-20T10:08:25.066Z'); +INSERT INTO notif_creds VALUES(100,'ExponentPushToken[2ZZr7mF_h2lch2VVqcFCLs]','2026-02-20T10:57:04.669Z',180,'2026-02-20T10:57:18.409Z'); +INSERT INTO notif_creds VALUES(101,'ExponentPushToken[6l-WlJL-dUG2BixclCkzSa]','2026-02-20T13:32:52.357Z',181,'2026-02-21T10:23:21.219Z'); +INSERT INTO notif_creds VALUES(102,'ExponentPushToken[GWm8_aOevnr5ec38AN858s]','2026-02-20T17:13:24.944Z',182,'2026-02-20T17:13:24.942Z'); +INSERT INTO notif_creds VALUES(103,'ExponentPushToken[IfWmkbPqhvki2Ddpx20WN5]','2026-02-20T18:20:19.602Z',183,'2026-02-20T18:20:19.601Z'); +INSERT INTO notif_creds VALUES(106,'ExponentPushToken[DPeHKsBNbTJ74b4C69d_1e]','2026-02-20T22:45:31.155Z',184,'2026-02-24T05:12:12.438Z'); +INSERT INTO notif_creds VALUES(107,'ExponentPushToken[4mdT-7ILy1RkxkKGHVeFih]','2026-02-21T02:47:55.879Z',185,'2026-02-21T02:48:55.139Z'); +INSERT INTO notif_creds VALUES(108,'ExponentPushToken[OYJNU2Hl_BHC8vNmnh5nIa]','2026-02-21T03:35:03.666Z',186,'2026-02-21T18:26:53.165Z'); +INSERT INTO notif_creds VALUES(110,'ExponentPushToken[2KeIQoIW7_xfYnmYKLjIxX]','2026-02-21T07:16:33.392Z',188,'2026-02-21T07:16:33.391Z'); +INSERT INTO notif_creds VALUES(112,'ExponentPushToken[-o5CHgOgd7yq4gBoUKQdhA]','2026-02-21T13:01:23.842Z',189,'2026-02-21T13:04:47.429Z'); +INSERT INTO notif_creds VALUES(113,'ExponentPushToken[QC4khLHZvU0B2xDfMuLxrr]','2026-02-21T13:29:03.311Z',190,'2026-02-24T07:23:45.452Z'); +INSERT INTO notif_creds VALUES(115,'ExponentPushToken[7xOFPzKtSr9Q3QjuGP_1RY]','2026-02-21T17:55:28.063Z',191,'2026-02-23T05:05:54.186Z'); +INSERT INTO notif_creds VALUES(117,'ExponentPushToken[FQkh_ZP1lkQyiNnxXEqr4E]','2026-02-22T00:12:36.263Z',194,'2026-02-25T02:28:06.068Z'); +INSERT INTO notif_creds VALUES(118,'ExponentPushToken[FCF4nPGQZlVobJpYtPMA1V]','2026-02-22T00:57:19.376Z',195,'2026-02-22T00:57:19.375Z'); +INSERT INTO notif_creds VALUES(119,'ExponentPushToken[IwM94nPyLTuoLgc-dgwPTq]','2026-02-22T00:58:28.876Z',196,'2026-02-22T01:49:01.069Z'); +INSERT INTO notif_creds VALUES(120,'ExponentPushToken[jIY_4pLTlau3wASP_0TYDq]','2026-02-22T01:05:29.613Z',197,'2026-02-22T02:22:29.991Z'); +INSERT INTO notif_creds VALUES(121,'ExponentPushToken[HaF3clPj70n8AdWkidFnJY]','2026-02-22T01:07:17.891Z',198,'2026-02-22T04:30:02.306Z'); +INSERT INTO notif_creds VALUES(122,'ExponentPushToken[dqK4JpEi2SUuPBPRqDHGTE]','2026-02-22T01:14:27.496Z',199,'2026-02-24T23:33:42.767Z'); +INSERT INTO notif_creds VALUES(123,'ExponentPushToken[gJFheJE7Ie9y42gYqTz0cv]','2026-02-22T02:01:38.770Z',200,'2026-02-22T02:01:38.769Z'); +INSERT INTO notif_creds VALUES(124,'ExponentPushToken[Z07jHhEkYiW820OA8-mYma]','2026-02-22T02:01:45.615Z',201,'2026-02-22T02:01:45.614Z'); +INSERT INTO notif_creds VALUES(125,'ExponentPushToken[I4TLMrA8fhjU4YDnC9ssrj]','2026-02-22T02:17:38.253Z',202,'2026-02-22T02:17:38.252Z'); +INSERT INTO notif_creds VALUES(126,'ExponentPushToken[zOk8M4FBYHztnQIxr7ZhzY]','2026-02-22T03:02:38.558Z',203,'2026-02-22T03:02:38.558Z'); +INSERT INTO notif_creds VALUES(127,'ExponentPushToken[H94IyWDEhTwZiV_PsomZ86]','2026-02-22T03:19:56.829Z',204,'2026-02-22T07:59:51.430Z'); +INSERT INTO notif_creds VALUES(128,'ExponentPushToken[700fYUMqIA-ft5HcmU1tmR]','2026-02-22T03:22:47.498Z',205,'2026-02-22T03:53:07.395Z'); +INSERT INTO notif_creds VALUES(129,'ExponentPushToken[1Mq1TLEfmyCHBvCoTdYzlA]','2026-02-22T04:20:20.012Z',206,'2026-02-22T05:05:52.419Z'); +INSERT INTO notif_creds VALUES(130,'ExponentPushToken[_4SQFkNreSaKN8HJCwkO0d]','2026-02-22T04:24:10.912Z',207,'2026-02-22T04:24:10.911Z'); +INSERT INTO notif_creds VALUES(131,'ExponentPushToken[nMmoPDNa2B-FzS0tTKUVJq]','2026-02-22T04:37:00.262Z',208,'2026-02-25T03:26:36.919Z'); +INSERT INTO notif_creds VALUES(132,'ExponentPushToken[_KlKvdPBjid4uWtGl9oj1w]','2026-02-22T04:43:50.020Z',209,'2026-02-22T04:43:50.019Z'); +INSERT INTO notif_creds VALUES(133,'ExponentPushToken[lUQnqhGJAN_4YY4wQ9AsxU]','2026-02-22T05:14:35.973Z',210,'2026-02-22T05:14:35.972Z'); +INSERT INTO notif_creds VALUES(134,'ExponentPushToken[9MdSNKGJEuTvO7e_pUGutQ]','2026-02-22T06:00:13.290Z',212,'2026-02-23T00:39:33.185Z'); +INSERT INTO notif_creds VALUES(135,'ExponentPushToken[O8hwqtKbEc8aWG_xDyiTng]','2026-02-22T06:29:49.199Z',213,'2026-02-25T01:01:33.072Z'); +INSERT INTO notif_creds VALUES(136,'ExponentPushToken[8C19GxE0u9UAVhJurTSUCD]','2026-02-22T06:33:55.924Z',214,'2026-02-22T06:33:55.924Z'); +INSERT INTO notif_creds VALUES(137,'ExponentPushToken[O-HudjMpRjEPPtOY7P8xNf]','2026-02-22T06:59:10.922Z',215,'2026-02-22T06:59:10.921Z'); +INSERT INTO notif_creds VALUES(138,'ExponentPushToken[3vLy4aIVVz6JhDs28edZ7A]','2026-02-22T07:13:12.618Z',216,'2026-02-22T07:13:12.618Z'); +INSERT INTO notif_creds VALUES(139,'ExponentPushToken[gd9P-IJzX8mPS8WIQ4L_aO]','2026-02-22T07:30:21.756Z',217,'2026-02-24T03:15:03.767Z'); +INSERT INTO notif_creds VALUES(140,'ExponentPushToken[Lyp_JhEp-mzptQkxT2gV5j]','2026-02-22T14:03:46.271Z',50,'2026-02-24T23:40:50.787Z'); +INSERT INTO notif_creds VALUES(141,'ExponentPushToken[bKljnNAKOQhNtEuFH61wdv]','2026-02-23T00:50:17.502Z',219,'2026-02-24T02:54:24.861Z'); +INSERT INTO notif_creds VALUES(143,'ExponentPushToken[4MaEIUHLXJTeIUk5Tw2Bre]','2026-02-23T01:39:34.734Z',220,'2026-02-23T01:39:34.734Z'); +INSERT INTO notif_creds VALUES(144,'ExponentPushToken[WFqHJnGXt5zJQgezyZMT-F]','2026-02-23T02:13:14.745Z',221,'2026-02-23T02:13:14.744Z'); +INSERT INTO notif_creds VALUES(146,'ExponentPushToken[_w34c8IpadSoTyzQIgfiRf]','2026-02-23T03:24:04.981Z',222,'2026-02-23T07:32:10.879Z'); +INSERT INTO notif_creds VALUES(147,'ExponentPushToken[BAMOz8A3uZ98l8lIIF5cvC]','2026-02-23T03:32:38.907Z',218,'2026-02-24T23:29:49.706Z'); +INSERT INTO notif_creds VALUES(148,'ExponentPushToken[PnJS6KN--CeuepgdgEOUKz]','2026-02-23T03:46:06.431Z',223,'2026-02-23T06:35:54.102Z'); +INSERT INTO notif_creds VALUES(149,'ExponentPushToken[q6LVtfMMHCmI-CVuzkjete]','2026-02-23T04:36:52.684Z',224,'2026-02-24T03:00:47.885Z'); +INSERT INTO notif_creds VALUES(151,'ExponentPushToken[qFtLZVFHGA-08finEVoLvk]','2026-02-23T06:41:17.865Z',225,'2026-02-23T11:53:56.553Z'); +INSERT INTO notif_creds VALUES(152,'ExponentPushToken[f8BfgiIMzCgsrT8D0GrcbC]','2026-02-23T08:30:40.686Z',226,'2026-02-24T01:31:30.979Z'); +INSERT INTO notif_creds VALUES(153,'ExponentPushToken[Tlj0Y5ENGMH1gqQMOE4Vet]','2026-02-23T22:38:49.132Z',228,'2026-02-23T22:38:49.131Z'); +INSERT INTO notif_creds VALUES(154,'ExponentPushToken[xpA3OSLWnk2-oUz2J_jq9V]','2026-02-24T07:52:52.533Z',15,'2026-02-24T07:52:52.532Z'); +INSERT INTO notif_creds VALUES(155,'ExponentPushToken[LkHZ5lKBW9CMi6UWZ1jZvJ]','2026-02-24T12:27:39.430Z',231,'2026-02-24T12:27:39.429Z'); +INSERT INTO notif_creds VALUES(156,'ExponentPushToken[HpS7v_O9a0YX-ctUWczWc9]','2026-02-24T14:49:55.883Z',232,'2026-02-24T14:49:55.882Z'); +CREATE TABLE IF NOT EXISTS "notifications" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "title" TEXT NOT NULL, "body" TEXT NOT NULL, "type" TEXT, "is_read" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +CREATE TABLE IF NOT EXISTS "order_items" ("id" INTEGER PRIMARY KEY, "order_id" INTEGER NOT NULL, "product_id" INTEGER NOT NULL, "quantity" TEXT NOT NULL, "price" REAL NOT NULL, "discounted_price" REAL, "is_packaged" INTEGER NOT NULL DEFAULT false, "is_package_verified" INTEGER NOT NULL DEFAULT false); +INSERT INTO order_items VALUES(1,1,6,'2',22.0,NULL,0,0); +INSERT INTO order_items VALUES(2,2,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(3,3,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(4,4,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(5,4,1,'1',210.0,NULL,0,0); +INSERT INTO order_items VALUES(6,5,4,'1',700.0,NULL,0,0); +INSERT INTO order_items VALUES(7,6,6,'1',22.0,NULL,0,0); +INSERT INTO order_items VALUES(8,7,6,'1',22.0,NULL,0,0); +INSERT INTO order_items VALUES(9,8,6,'1',22.0,NULL,0,0); +INSERT INTO order_items VALUES(10,9,3,'2',250.0,NULL,0,0); +INSERT INTO order_items VALUES(11,10,3,'2',250.0,NULL,0,0); +INSERT INTO order_items VALUES(12,11,6,'2',22.0,NULL,0,0); +INSERT INTO order_items VALUES(13,12,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(14,13,6,'1',22.0,NULL,0,0); +INSERT INTO order_items VALUES(15,14,1,'1',210.0,NULL,0,0); +INSERT INTO order_items VALUES(16,15,4,'1',700.0,NULL,0,0); +INSERT INTO order_items VALUES(17,16,4,'1',700.0,NULL,0,0); +INSERT INTO order_items VALUES(18,17,1,'1',210.0,NULL,0,0); +INSERT INTO order_items VALUES(19,18,1,'4',210.0,NULL,0,0); +INSERT INTO order_items VALUES(20,19,3,'1',250.0,NULL,0,0); +INSERT INTO order_items VALUES(21,19,9,'1',280.0,NULL,0,0); +INSERT INTO order_items VALUES(22,20,3,'1',250.0,NULL,0,0); +INSERT INTO order_items VALUES(23,20,9,'1',280.0,NULL,0,0); +INSERT INTO order_items VALUES(24,21,4,'1',700.0,NULL,0,0); +INSERT INTO order_items VALUES(25,21,6,'1',22.0,NULL,0,0); +INSERT INTO order_items VALUES(26,22,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(27,23,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(28,24,3,'3',250.0,NULL,0,0); +INSERT INTO order_items VALUES(29,25,2,'25',220.0,NULL,0,0); +INSERT INTO order_items VALUES(30,25,7,'4',50.0,NULL,0,0); +INSERT INTO order_items VALUES(31,26,5,'4',72.0,NULL,0,0); +INSERT INTO order_items VALUES(32,26,1,'3',210.0,NULL,0,0); +INSERT INTO order_items VALUES(33,26,4,'3',700.0,NULL,0,0); +INSERT INTO order_items VALUES(34,26,10,'3',210.0,NULL,0,0); +INSERT INTO order_items VALUES(35,26,8,'4',20.0,NULL,0,0); +INSERT INTO order_items VALUES(36,26,11,'6',1400.0,NULL,0,0); +INSERT INTO order_items VALUES(37,27,11,'9',1400.0,NULL,0,0); +INSERT INTO order_items VALUES(38,27,3,'13',250.0,NULL,0,0); +INSERT INTO order_items VALUES(39,28,10,'5',210.0,168.0,0,0); +INSERT INTO order_items VALUES(40,28,6,'6',22.0,17.600000000000002309,0,0); +INSERT INTO order_items VALUES(41,29,4,'2',700.0,700.0,0,0); +INSERT INTO order_items VALUES(42,30,2,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(43,30,11,'5',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(44,30,3,'2',250.0,250.0,0,0); +INSERT INTO order_items VALUES(45,31,2,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(46,31,11,'5',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(47,31,3,'2',250.0,250.0,0,0); +INSERT INTO order_items VALUES(48,32,2,'1',220.0,176.0,0,0); +INSERT INTO order_items VALUES(49,32,11,'5',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(50,32,3,'1',250.0,200.0,0,0); +INSERT INTO order_items VALUES(51,33,4,'3',700.0,560.0,0,0); +INSERT INTO order_items VALUES(52,34,2,'1',220.0,176.0,0,0); +INSERT INTO order_items VALUES(53,34,11,'1',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(54,34,3,'1',250.0,200.0,0,0); +INSERT INTO order_items VALUES(55,35,11,'2',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(56,36,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(57,36,4,'1',700.0,700.0,0,0); +INSERT INTO order_items VALUES(58,36,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(59,37,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(60,37,4,'1',700.0,700.0,0,0); +INSERT INTO order_items VALUES(61,37,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(62,38,2,'1',220.0,220.0,0,0); +INSERT INTO order_items VALUES(63,38,11,'2',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(64,39,3,'1',250.0,200.0,0,0); +INSERT INTO order_items VALUES(65,39,11,'2',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(66,40,11,'3',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(67,40,3,'4',250.0,200.0,0,0); +INSERT INTO order_items VALUES(68,41,11,'2',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(69,41,3,'2',250.0,200.0,0,0); +INSERT INTO order_items VALUES(70,42,2,'4',220.0,176.0,0,0); +INSERT INTO order_items VALUES(71,42,3,'4',250.0,200.0,0,0); +INSERT INTO order_items VALUES(72,43,11,'1',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(73,43,2,'5',220.0,176.0,0,0); +INSERT INTO order_items VALUES(74,43,10,'3',210.0,168.0,0,0); +INSERT INTO order_items VALUES(75,44,11,'1',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(76,44,2,'5',220.0,176.0,0,0); +INSERT INTO order_items VALUES(77,44,10,'3',210.0,168.0,0,0); +INSERT INTO order_items VALUES(78,45,11,'3',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(79,45,2,'5',220.0,176.0,0,0); +INSERT INTO order_items VALUES(80,45,3,'3',250.0,200.0,0,0); +INSERT INTO order_items VALUES(81,46,11,'5',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(82,46,3,'4',250.0,200.0,0,0); +INSERT INTO order_items VALUES(83,46,10,'3',210.0,168.0,0,0); +INSERT INTO order_items VALUES(84,47,3,'2',250.0,250.0,0,0); +INSERT INTO order_items VALUES(85,47,2,'2',220.0,220.0,0,0); +INSERT INTO order_items VALUES(86,48,3,'5',250.0,150.0,0,0); +INSERT INTO order_items VALUES(87,48,11,'3',1400.0,840.0,0,0); +INSERT INTO order_items VALUES(88,48,2,'3',220.0,132.0,0,0); +INSERT INTO order_items VALUES(89,49,10,'5',210.0,210.0,0,0); +INSERT INTO order_items VALUES(90,49,2,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(91,49,11,'2',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(92,49,3,'3',250.0,250.0,0,0); +INSERT INTO order_items VALUES(93,50,4,'3',700.0,700.0,0,0); +INSERT INTO order_items VALUES(94,50,10,'3',210.0,210.0,0,0); +INSERT INTO order_items VALUES(95,50,2,'4',220.0,220.0,0,0); +INSERT INTO order_items VALUES(96,50,11,'3',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(97,51,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(98,52,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(99,53,3,'2',250.0,250.0,0,0); +INSERT INTO order_items VALUES(100,54,4,'3',700.0,700.0,0,0); +INSERT INTO order_items VALUES(101,54,3,'3',250.0,250.0,0,0); +INSERT INTO order_items VALUES(102,55,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(103,55,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(104,55,1,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(105,56,8,'1',20.0,20.0,0,0); +INSERT INTO order_items VALUES(106,56,6,'2',22.0,22.0,0,0); +INSERT INTO order_items VALUES(107,57,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(108,58,1,'28',210.0,210.0,0,0); +INSERT INTO order_items VALUES(109,58,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(110,58,3,'3',250.0,250.0,0,0); +INSERT INTO order_items VALUES(111,58,2,'1',220.0,220.0,0,0); +INSERT INTO order_items VALUES(112,59,1,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(113,60,12,'1',350.0,350.0,0,0); +INSERT INTO order_items VALUES(114,61,1,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(115,62,12,'2',350.0,350.0,0,0); +INSERT INTO order_items VALUES(116,63,1,'2',210.0,210.0,0,0); +INSERT INTO order_items VALUES(117,63,12,'2',350.0,350.0,0,0); +INSERT INTO order_items VALUES(118,64,1,'2',210.0,210.0,0,0); +INSERT INTO order_items VALUES(119,65,12,'2',350.0,350.0,0,0); +INSERT INTO order_items VALUES(120,66,12,'1',350.0,350.0,0,0); +INSERT INTO order_items VALUES(121,66,1,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(122,67,15,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(123,68,15,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(124,69,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(125,70,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(126,71,11,'1',1400.0,1400.0,1,0); +INSERT INTO order_items VALUES(127,71,15,'1',220.0,220.0,1,0); +INSERT INTO order_items VALUES(128,71,6,'1',22.0,22.0,1,0); +INSERT INTO order_items VALUES(129,72,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(130,73,5,'3',72.0,72.0,0,0); +INSERT INTO order_items VALUES(131,74,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(132,74,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(133,75,11,'15',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(134,76,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(135,77,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(136,78,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(137,79,25,'3',100.0,100.0,0,0); +INSERT INTO order_items VALUES(138,80,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(139,81,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(140,82,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(141,83,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(142,84,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(143,85,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(144,86,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(145,87,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(146,88,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(147,89,15,'1',140.0,140.0,0,0); +INSERT INTO order_items VALUES(148,89,11,'2',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(149,90,6,'2',22.0,22.0,0,0); +INSERT INTO order_items VALUES(150,91,19,'1',40.0,40.0,0,0); +INSERT INTO order_items VALUES(151,92,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(152,93,25,'2',100.0,100.0,0,0); +INSERT INTO order_items VALUES(153,94,26,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(154,95,6,'6',22.0,22.0,0,0); +INSERT INTO order_items VALUES(155,96,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(156,97,25,'2',100.0,100.0,0,0); +INSERT INTO order_items VALUES(157,98,6,'2',22.0,22.0,0,0); +INSERT INTO order_items VALUES(158,99,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(159,100,16,'10',100.0,100.0,0,0); +INSERT INTO order_items VALUES(160,101,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(161,102,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(162,103,16,'1',100.0,100.0,0,0); +INSERT INTO order_items VALUES(163,104,5,'5',72.0,72.0,0,0); +INSERT INTO order_items VALUES(164,104,6,'108',22.0,22.0,0,0); +INSERT INTO order_items VALUES(165,105,12,'22',350.0,350.0,0,0); +INSERT INTO order_items VALUES(166,106,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(167,106,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(168,107,8,'1',20.0,20.0,1,0); +INSERT INTO order_items VALUES(169,107,26,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(170,108,25,'1',100.0,100.0,0,0); +INSERT INTO order_items VALUES(171,109,13,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(172,110,6,'2',22.0,22.0,0,0); +INSERT INTO order_items VALUES(173,111,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(174,111,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(175,111,12,'1',350.0,350.0,0,0); +INSERT INTO order_items VALUES(176,112,8,'1',20.0,20.0,0,0); +INSERT INTO order_items VALUES(177,113,12,'1',350.0,350.0,0,0); +INSERT INTO order_items VALUES(178,114,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(179,115,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(180,115,6,'2',22.0,22.0,0,0); +INSERT INTO order_items VALUES(181,115,16,'1',100.0,100.0,0,0); +INSERT INTO order_items VALUES(182,116,15,'4',140.0,140.0,0,0); +INSERT INTO order_items VALUES(183,117,6,'2',22.0,22.0,1,0); +INSERT INTO order_items VALUES(184,117,5,'1',72.0,72.0,1,0); +INSERT INTO order_items VALUES(185,118,13,'1',120.0,120.0,0,1); +INSERT INTO order_items VALUES(186,119,8,'1',20.0,20.0,0,0); +INSERT INTO order_items VALUES(187,119,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(188,120,21,'1',380.0,380.0,0,0); +INSERT INTO order_items VALUES(189,120,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(190,121,10,'1',210.0,210.0,1,1); +INSERT INTO order_items VALUES(191,121,24,'1',230.0,230.0,1,1); +INSERT INTO order_items VALUES(192,122,5,'1',72.0,72.0,1,1); +INSERT INTO order_items VALUES(193,122,11,'1',1400.0,1400.0,1,1); +INSERT INTO order_items VALUES(194,122,13,'1',120.0,120.0,1,1); +INSERT INTO order_items VALUES(195,122,6,'1',22.0,22.0,1,1); +INSERT INTO order_items VALUES(196,123,35,'1',485.0,485.0,0,0); +INSERT INTO order_items VALUES(197,124,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(198,125,22,'1',680.0,680.0,0,0); +INSERT INTO order_items VALUES(199,126,10,'1',210.0,210.0,1,1); +INSERT INTO order_items VALUES(200,126,6,'1',22.0,22.0,1,1); +INSERT INTO order_items VALUES(201,127,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(202,127,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(203,127,24,'1',230.0,230.0,0,0); +INSERT INTO order_items VALUES(204,127,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(205,127,20,'1',340.0,340.0,0,0); +INSERT INTO order_items VALUES(206,128,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(207,128,15,'1',140.0,140.0,0,0); +INSERT INTO order_items VALUES(208,129,24,'1',230.0,230.0,0,0); +INSERT INTO order_items VALUES(209,129,4,'1',780.0,780.0,0,0); +INSERT INTO order_items VALUES(210,129,21,'1',380.0,380.0,0,0); +INSERT INTO order_items VALUES(211,130,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(212,131,20,'1',340.0,340.0,0,0); +INSERT INTO order_items VALUES(213,132,10,'1',240.0,240.0,1,0); +INSERT INTO order_items VALUES(214,132,23,'2',300.0,300.0,1,0); +INSERT INTO order_items VALUES(215,132,11,'2',1400.0,1400.0,1,0); +INSERT INTO order_items VALUES(216,133,4,'1',780.0,780.0,0,0); +INSERT INTO order_items VALUES(217,134,6,'1',24.0,24.0,0,0); +INSERT INTO order_items VALUES(218,134,13,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(219,134,8,'1',20.0,20.0,0,0); +INSERT INTO order_items VALUES(220,134,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(221,134,25,'1',100.0,100.0,0,0); +INSERT INTO order_items VALUES(222,134,26,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(223,134,38,'1',100.0,100.0,0,0); +INSERT INTO order_items VALUES(224,134,39,'1',150.0,150.0,0,0); +INSERT INTO order_items VALUES(225,134,20,'1',340.0,340.0,0,0); +INSERT INTO order_items VALUES(226,134,14,'1',180.0,180.0,0,0); +INSERT INTO order_items VALUES(227,134,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(228,134,10,'1',240.0,240.0,0,0); +INSERT INTO order_items VALUES(229,134,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(230,134,23,'1',300.0,300.0,0,0); +INSERT INTO order_items VALUES(231,134,22,'1',680.0,680.0,0,0); +INSERT INTO order_items VALUES(232,135,20,'5',340.0,340.0,0,0); +INSERT INTO order_items VALUES(233,136,20,'3',340.0,340.0,0,0); +INSERT INTO order_items VALUES(234,137,13,'5',120.0,120.0,0,0); +INSERT INTO order_items VALUES(235,138,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(236,138,21,'1',380.0,380.0,0,0); +INSERT INTO order_items VALUES(237,139,4,'1',780.0,780.0,0,0); +INSERT INTO order_items VALUES(238,140,14,'3',180.0,180.0,0,0); +INSERT INTO order_items VALUES(239,141,14,'3',180.0,180.0,0,0); +INSERT INTO order_items VALUES(240,142,6,'1',24.0,24.0,0,0); +INSERT INTO order_items VALUES(241,143,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(242,143,14,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(243,144,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(244,144,14,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(245,145,1,'2',120.0,120.0,0,0); +INSERT INTO order_items VALUES(246,145,14,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(247,146,1,'2',120.0,120.0,0,0); +INSERT INTO order_items VALUES(248,146,14,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(249,147,1,'3',120.0,120.0,1,0); +INSERT INTO order_items VALUES(250,147,14,'3',220.0,220.0,1,0); +INSERT INTO order_items VALUES(251,148,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(252,148,35,'2',499.0,499.0,0,0); +INSERT INTO order_items VALUES(253,149,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(254,150,1,'1',120.0,120.0,1,0); +INSERT INTO order_items VALUES(255,150,3,'1',250.0,250.0,1,0); +INSERT INTO order_items VALUES(256,151,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(257,151,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(258,151,10,'1',240.0,240.0,0,0); +INSERT INTO order_items VALUES(259,152,21,'1',489.0,489.0,0,0); +INSERT INTO order_items VALUES(260,152,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(261,153,22,'1',680.0,680.0,0,0); +INSERT INTO order_items VALUES(262,154,23,'1',300.0,300.0,0,0); +INSERT INTO order_items VALUES(263,154,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(264,155,21,'1',489.0,489.0,0,0); +INSERT INTO order_items VALUES(265,155,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(266,156,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(267,156,14,'1',220.0,220.0,0,0); +INSERT INTO order_items VALUES(268,157,75,'3',25.0,25.0,1,0); +INSERT INTO order_items VALUES(269,158,21,'1',559.0,559.0,0,0); +INSERT INTO order_items VALUES(270,158,3,'1',76.0,76.0,0,0); +INSERT INTO order_items VALUES(271,158,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(272,158,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(273,158,35,'1',499.0,499.0,0,0); +INSERT INTO order_items VALUES(274,159,77,'56',22.0,22.0,0,0); +INSERT INTO order_items VALUES(275,160,77,'6',22.0,22.0,0,0); +INSERT INTO order_items VALUES(276,161,77,'14',22.0,22.0,0,0); +INSERT INTO order_items VALUES(277,162,77,'8',22.0,22.0,1,0); +INSERT INTO order_items VALUES(278,163,24,'7',249.0,249.0,0,0); +INSERT INTO order_items VALUES(279,164,3,'4',76.0,76.0,0,0); +INSERT INTO order_items VALUES(280,165,4,'1',820.0,820.0,0,0); +INSERT INTO order_items VALUES(281,166,7,'1',49.0,49.0,0,0); +INSERT INTO order_items VALUES(282,167,10,'1',240.0,240.0,0,0); +INSERT INTO order_items VALUES(283,167,6,'1',154.0,154.0,0,0); +INSERT INTO order_items VALUES(284,167,24,'1',249.0,249.0,0,0); +INSERT INTO order_items VALUES(285,168,35,'2',410.0,410.0,0,0); +INSERT INTO order_items VALUES(286,168,3,'2',76.0,76.0,0,0); +INSERT INTO order_items VALUES(287,168,4,'2',820.0,820.0,0,0); +INSERT INTO order_items VALUES(288,169,37,'3',29.0,29.0,0,0); +INSERT INTO order_items VALUES(289,170,23,'1',146.0,146.0,1,0); +INSERT INTO order_items VALUES(290,171,35,'1',429.0,429.0,1,1); +INSERT INTO order_items VALUES(291,172,13,'1',35.0,35.0,1,1); +INSERT INTO order_items VALUES(292,172,5,'1',17.0,17.0,1,1); +INSERT INTO order_items VALUES(293,172,68,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(294,173,56,'1',44.0,44.0,1,1); +INSERT INTO order_items VALUES(295,174,47,'1',109.0,109.0,1,1); +INSERT INTO order_items VALUES(296,174,38,'1',69.0,69.0,1,1); +INSERT INTO order_items VALUES(297,175,19,'1',27.0,27.0,1,1); +INSERT INTO order_items VALUES(298,176,56,'1',67.0,67.0,1,1); +INSERT INTO order_items VALUES(299,176,23,'1',146.0,146.0,1,1); +INSERT INTO order_items VALUES(300,177,58,'2',79.0,79.0,1,1); +INSERT INTO order_items VALUES(301,178,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(302,179,23,'1',146.0,146.0,1,0); +INSERT INTO order_items VALUES(303,180,13,'2',47.0,47.0,1,0); +INSERT INTO order_items VALUES(304,181,71,'1',17.0,17.0,1,0); +INSERT INTO order_items VALUES(305,182,59,'1',39.0,39.0,1,0); +INSERT INTO order_items VALUES(306,183,66,'1',32.0,32.0,0,0); +INSERT INTO order_items VALUES(307,184,41,'1',179.0,179.0,1,1); +INSERT INTO order_items VALUES(308,185,76,'1',25.0,25.0,0,0); +INSERT INTO order_items VALUES(309,185,32,'1',23.0,23.0,0,0); +INSERT INTO order_items VALUES(310,185,97,'1',19.0,19.0,0,0); +INSERT INTO order_items VALUES(311,186,24,'1',218.0,218.0,0,0); +INSERT INTO order_items VALUES(312,186,1,'1',89.0,89.0,0,0); +INSERT INTO order_items VALUES(313,187,67,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(314,187,45,'1',25.0,25.0,1,1); +INSERT INTO order_items VALUES(315,188,9,'1',296.0,296.0,0,0); +INSERT INTO order_items VALUES(316,189,23,'2',146.0,146.0,1,1); +INSERT INTO order_items VALUES(317,190,71,'1',17.0,17.0,0,0); +INSERT INTO order_items VALUES(318,191,23,'2',135.0,135.0,1,1); +INSERT INTO order_items VALUES(319,192,24,'2',210.0,210.0,1,1); +INSERT INTO order_items VALUES(320,193,10,'1',269.0,269.0,1,1); +INSERT INTO order_items VALUES(321,194,41,'1',179.0,179.0,1,1); +INSERT INTO order_items VALUES(322,194,4,'1',820.0,820.0,1,1); +INSERT INTO order_items VALUES(323,195,96,'1',109.0,109.0,1,1); +INSERT INTO order_items VALUES(324,196,41,'1',179.0,179.0,0,0); +INSERT INTO order_items VALUES(325,197,41,'1',179.0,179.0,1,1); +INSERT INTO order_items VALUES(326,197,10,'1',269.0,269.0,1,1); +INSERT INTO order_items VALUES(332,202,40,'1',135.0,135.0,1,0); +INSERT INTO order_items VALUES(333,203,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(334,204,51,'1',79.0,79.0,0,0); +INSERT INTO order_items VALUES(335,205,51,'1',79.0,79.0,1,1); +INSERT INTO order_items VALUES(336,206,4,'1',820.0,820.0,0,0); +INSERT INTO order_items VALUES(337,207,14,'1',369.0,369.0,0,0); +INSERT INTO order_items VALUES(338,208,98,'1',420.0,420.0,1,0); +INSERT INTO order_items VALUES(339,209,40,'2',135.0,135.0,1,1); +INSERT INTO order_items VALUES(340,209,38,'1',69.0,69.0,1,1); +INSERT INTO order_items VALUES(341,209,8,'1',119.0,119.0,1,1); +INSERT INTO order_items VALUES(342,210,24,'1',210.0,210.0,1,0); +INSERT INTO order_items VALUES(343,211,76,'1',25.0,25.0,1,1); +INSERT INTO order_items VALUES(344,211,19,'1',27.0,27.0,1,1); +INSERT INTO order_items VALUES(345,211,32,'1',23.0,23.0,1,1); +INSERT INTO order_items VALUES(346,211,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(347,212,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(348,213,18,'2',44.0,44.0,0,0); +INSERT INTO order_items VALUES(349,214,13,'2',49.0,49.0,0,0); +INSERT INTO order_items VALUES(350,215,13,'4',69.0,69.0,1,1); +INSERT INTO order_items VALUES(351,216,7,'1',49.0,49.0,0,0); +INSERT INTO order_items VALUES(352,216,8,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(353,216,46,'1',109.0,109.0,0,0); +INSERT INTO order_items VALUES(354,216,6,'1',109.0,109.0,0,0); +INSERT INTO order_items VALUES(355,217,38,'1',76.0,76.0,1,0); +INSERT INTO order_items VALUES(356,217,85,'1',259.0,259.0,1,0); +INSERT INTO order_items VALUES(357,218,6,'2',109.0,109.0,1,1); +INSERT INTO order_items VALUES(358,218,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(359,218,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(360,218,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(361,218,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(362,219,96,'1',109.0,109.0,0,0); +INSERT INTO order_items VALUES(363,220,6,'1',109.0,109.0,1,0); +INSERT INTO order_items VALUES(364,220,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(365,221,6,'1',109.0,109.0,1,1); +INSERT INTO order_items VALUES(366,221,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(367,221,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(368,222,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(369,222,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(370,222,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(371,223,7,'1',49.0,49.0,0,0); +INSERT INTO order_items VALUES(372,223,78,'1',29.0,29.0,0,0); +INSERT INTO order_items VALUES(373,223,45,'1',19.0,19.0,0,0); +INSERT INTO order_items VALUES(374,224,42,'1',149.0,149.0,1,0); +INSERT INTO order_items VALUES(375,225,59,'1',98.0,98.0,0,0); +INSERT INTO order_items VALUES(376,226,91,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(377,226,45,'2',19.0,19.0,1,1); +INSERT INTO order_items VALUES(378,226,71,'1',17.0,17.0,1,1); +INSERT INTO order_items VALUES(379,226,95,'1',39.0,39.0,1,1); +INSERT INTO order_items VALUES(380,227,14,'1',379.0,379.0,1,0); +INSERT INTO order_items VALUES(381,228,16,'1',28.0,28.0,0,0); +INSERT INTO order_items VALUES(382,228,91,'2',29.0,29.0,0,0); +INSERT INTO order_items VALUES(383,228,45,'2',19.0,19.0,0,0); +INSERT INTO order_items VALUES(384,228,71,'1',17.0,17.0,0,0); +INSERT INTO order_items VALUES(385,228,95,'1',39.0,39.0,0,0); +INSERT INTO order_items VALUES(386,229,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(387,229,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(388,229,77,'1',18.0,18.0,1,1); +INSERT INTO order_items VALUES(389,229,29,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(390,229,68,'1',32.0,32.0,1,1); +INSERT INTO order_items VALUES(391,230,45,'1',19.0,19.0,0,0); +INSERT INTO order_items VALUES(392,230,31,'2',29.0,29.0,0,0); +INSERT INTO order_items VALUES(393,230,6,'1',109.0,109.0,0,0); +INSERT INTO order_items VALUES(394,231,6,'2',109.0,109.0,1,1); +INSERT INTO order_items VALUES(395,231,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(396,232,2,'1',219.0,219.0,0,0); +INSERT INTO order_items VALUES(397,233,24,'1',219.0,219.0,0,0); +INSERT INTO order_items VALUES(398,234,24,'1',219.0,219.0,1,1); +INSERT INTO order_items VALUES(399,235,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(400,236,23,'1',139.0,139.0,1,0); +INSERT INTO order_items VALUES(401,237,13,'2',69.0,69.0,1,0); +INSERT INTO order_items VALUES(402,238,67,'4',24.0,24.0,0,0); +INSERT INTO order_items VALUES(403,239,67,'4',24.0,24.0,0,0); +INSERT INTO order_items VALUES(404,240,40,'1',160.0,160.0,0,0); +INSERT INTO order_items VALUES(405,241,40,'1',160.0,160.0,0,0); +INSERT INTO order_items VALUES(406,242,66,'1',27.0,27.0,0,0); +INSERT INTO order_items VALUES(407,243,19,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(408,244,82,'1',389.0,389.0,0,0); +INSERT INTO order_items VALUES(409,245,59,'10',98.0,98.0,0,0); +INSERT INTO order_items VALUES(410,246,23,'1',139.0,139.0,0,0); +INSERT INTO order_items VALUES(411,247,42,'1',149.0,149.0,0,0); +INSERT INTO order_items VALUES(412,248,23,'1',139.0,139.0,1,0); +INSERT INTO order_items VALUES(413,248,7,'1',49.0,49.0,1,0); +INSERT INTO order_items VALUES(414,249,96,'1',109.0,109.0,1,1); +INSERT INTO order_items VALUES(415,250,98,'1',419.0,419.0,0,0); +INSERT INTO order_items VALUES(416,250,80,'1',849.0,849.0,0,0); +INSERT INTO order_items VALUES(417,250,58,'1',59.0,59.0,0,0); +INSERT INTO order_items VALUES(418,251,48,'2',55.0,55.0,1,0); +INSERT INTO order_items VALUES(419,252,78,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(420,252,91,'2',39.0,39.0,1,0); +INSERT INTO order_items VALUES(421,253,19,'2',27.0,27.0,1,0); +INSERT INTO order_items VALUES(422,253,72,'2',18.0,18.0,1,0); +INSERT INTO order_items VALUES(423,253,16,'1',28.0,28.0,1,0); +INSERT INTO order_items VALUES(424,254,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(425,254,19,'1',27.0,27.0,1,1); +INSERT INTO order_items VALUES(426,254,32,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(427,254,27,'1',24.0,24.0,1,1); +INSERT INTO order_items VALUES(428,254,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(429,254,74,'1',17.0,17.0,1,1); +INSERT INTO order_items VALUES(430,255,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(431,256,98,'1',419.0,419.0,0,0); +INSERT INTO order_items VALUES(432,257,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(433,258,58,'1',59.0,59.0,1,1); +INSERT INTO order_items VALUES(434,259,35,'1',459.0,459.0,1,1); +INSERT INTO order_items VALUES(435,260,40,'1',150.0,150.0,0,0); +INSERT INTO order_items VALUES(436,260,24,'1',230.0,230.0,0,0); +INSERT INTO order_items VALUES(437,261,73,'2',59.0,59.0,1,0); +INSERT INTO order_items VALUES(438,262,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(439,263,40,'1',150.0,150.0,0,0); +INSERT INTO order_items VALUES(440,264,24,'2',198.0,198.0,1,0); +INSERT INTO order_items VALUES(441,264,66,'1',27.0,27.0,1,0); +INSERT INTO order_items VALUES(442,265,73,'2',59.0,59.0,1,0); +INSERT INTO order_items VALUES(443,266,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(444,267,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(445,267,60,'1',78.0,78.0,1,0); +INSERT INTO order_items VALUES(446,267,8,'1',119.0,119.0,1,0); +INSERT INTO order_items VALUES(447,267,58,'1',59.0,59.0,1,0); +INSERT INTO order_items VALUES(448,268,35,'1',429.0,429.0,1,1); +INSERT INTO order_items VALUES(449,269,24,'2',198.0,198.0,0,0); +INSERT INTO order_items VALUES(450,270,2,'1',230.0,230.0,1,0); +INSERT INTO order_items VALUES(451,271,100,'1',99.0,99.0,1,0); +INSERT INTO order_items VALUES(452,271,69,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(453,271,9,'1',296.0,296.0,1,0); +INSERT INTO order_items VALUES(454,272,58,'1',59.0,59.0,0,0); +INSERT INTO order_items VALUES(455,273,58,'1',59.0,59.0,0,0); +INSERT INTO order_items VALUES(456,274,9,'1',296.0,296.0,1,1); +INSERT INTO order_items VALUES(457,274,85,'1',259.0,259.0,1,1); +INSERT INTO order_items VALUES(458,275,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(459,275,23,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(460,276,45,'2',19.0,19.0,1,1); +INSERT INTO order_items VALUES(461,276,91,'1',39.0,39.0,1,1); +INSERT INTO order_items VALUES(462,276,35,'1',429.0,429.0,1,1); +INSERT INTO order_items VALUES(463,277,97,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(464,277,95,'1',39.0,39.0,1,1); +INSERT INTO order_items VALUES(465,277,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(466,277,90,'1',27.0,27.0,1,0); +INSERT INTO order_items VALUES(467,277,19,'1',23.0,23.0,1,1); +INSERT INTO order_items VALUES(468,277,27,'1',24.0,24.0,1,1); +INSERT INTO order_items VALUES(469,277,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(470,277,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(471,277,29,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(472,277,45,'2',19.0,19.0,1,0); +INSERT INTO order_items VALUES(473,277,67,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(474,277,66,'1',27.0,27.0,1,1); +INSERT INTO order_items VALUES(475,277,65,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(476,277,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(477,278,24,'2',198.0,198.0,1,0); +INSERT INTO order_items VALUES(478,279,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(479,280,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(480,280,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(481,280,72,'1',14.0,14.0,1,1); +INSERT INTO order_items VALUES(482,280,92,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(483,280,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(484,280,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(485,280,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(486,281,91,'1',39.0,39.0,1,1); +INSERT INTO order_items VALUES(487,281,19,'2',23.0,23.0,1,1); +INSERT INTO order_items VALUES(488,281,10,'2',249.0,249.0,1,0); +INSERT INTO order_items VALUES(489,282,59,'1',98.0,98.0,0,0); +INSERT INTO order_items VALUES(490,283,73,'2',59.0,59.0,1,0); +INSERT INTO order_items VALUES(491,283,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(492,284,7,'1',49.0,49.0,1,0); +INSERT INTO order_items VALUES(493,284,48,'1',55.0,55.0,1,0); +INSERT INTO order_items VALUES(494,284,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(495,285,38,'1',76.0,76.0,0,0); +INSERT INTO order_items VALUES(496,285,56,'1',67.0,67.0,0,0); +INSERT INTO order_items VALUES(497,285,96,'1',109.0,109.0,0,0); +INSERT INTO order_items VALUES(498,285,47,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(499,286,27,'1',24.0,24.0,1,0); +INSERT INTO order_items VALUES(500,286,5,'1',26.0,26.0,1,0); +INSERT INTO order_items VALUES(501,286,32,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(502,286,16,'1',28.0,28.0,1,0); +INSERT INTO order_items VALUES(503,286,33,'1',15.0,15.0,1,0); +INSERT INTO order_items VALUES(504,286,89,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(505,286,58,'1',59.0,59.0,1,0); +INSERT INTO order_items VALUES(506,286,48,'1',55.0,55.0,1,0); +INSERT INTO order_items VALUES(507,287,97,'6',19.0,19.0,0,0); +INSERT INTO order_items VALUES(508,288,38,'1',76.0,76.0,0,0); +INSERT INTO order_items VALUES(509,289,31,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(510,290,24,'1',198.0,198.0,1,1); +INSERT INTO order_items VALUES(511,290,41,'1',189.0,189.0,1,0); +INSERT INTO order_items VALUES(512,291,21,'1',559.0,559.0,1,1); +INSERT INTO order_items VALUES(513,292,59,'1',98.0,98.0,0,0); +INSERT INTO order_items VALUES(514,293,59,'1',98.0,98.0,0,0); +INSERT INTO order_items VALUES(515,294,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(516,295,73,'4',59.0,59.0,1,0); +INSERT INTO order_items VALUES(517,296,4,'1',819.0,819.0,0,0); +INSERT INTO order_items VALUES(518,297,23,'2',125.0,125.0,1,1); +INSERT INTO order_items VALUES(519,297,76,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(520,297,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(521,297,32,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(522,298,33,'1',15.0,15.0,1,0); +INSERT INTO order_items VALUES(523,298,89,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(524,298,32,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(525,299,48,'1',55.0,55.0,1,0); +INSERT INTO order_items VALUES(526,299,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(527,300,44,'2',119.0,119.0,1,1); +INSERT INTO order_items VALUES(528,301,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(529,301,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(530,301,100,'1',99.0,99.0,1,1); +INSERT INTO order_items VALUES(531,301,83,'1',159.0,159.0,1,1); +INSERT INTO order_items VALUES(532,301,40,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(533,301,23,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(534,301,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(535,301,29,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(536,301,72,'3',14.0,14.0,1,0); +INSERT INTO order_items VALUES(537,301,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(538,301,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(539,301,92,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(540,301,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(541,301,19,'2',23.0,23.0,1,1); +INSERT INTO order_items VALUES(542,301,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(543,301,77,'3',16.0,16.0,1,1); +INSERT INTO order_items VALUES(544,301,33,'1',15.0,15.0,1,0); +INSERT INTO order_items VALUES(545,301,95,'1',39.0,39.0,1,0); +INSERT INTO order_items VALUES(546,301,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(547,301,79,'1',33.0,33.0,1,0); +INSERT INTO order_items VALUES(548,301,76,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(549,302,41,'1',189.0,189.0,1,0); +INSERT INTO order_items VALUES(550,303,61,'1',99.0,99.0,1,0); +INSERT INTO order_items VALUES(551,303,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(552,304,9,'1',296.0,296.0,1,1); +INSERT INTO order_items VALUES(553,304,24,'1',198.0,198.0,1,1); +INSERT INTO order_items VALUES(554,305,73,'5',59.0,59.0,1,0); +INSERT INTO order_items VALUES(555,306,23,'2',125.0,125.0,1,1); +INSERT INTO order_items VALUES(556,306,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(557,306,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(558,307,73,'4',59.0,59.0,1,1); +INSERT INTO order_items VALUES(559,308,35,'1',429.0,429.0,1,0); +INSERT INTO order_items VALUES(560,309,40,'1',150.0,150.0,1,1); +INSERT INTO order_items VALUES(561,309,23,'1',149.0,149.0,1,1); +INSERT INTO order_items VALUES(562,309,19,'2',50.0,50.0,1,1); +INSERT INTO order_items VALUES(563,309,45,'3',19.0,19.0,1,1); +INSERT INTO order_items VALUES(564,309,29,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(565,309,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(566,309,76,'2',19.0,19.0,1,1); +INSERT INTO order_items VALUES(567,309,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(568,309,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(569,309,27,'1',24.0,24.0,1,1); +INSERT INTO order_items VALUES(570,310,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(571,311,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(572,311,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(573,311,56,'1',67.0,67.0,1,1); +INSERT INTO order_items VALUES(574,311,65,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(575,311,58,'1',59.0,59.0,1,1); +INSERT INTO order_items VALUES(576,311,100,'1',99.0,99.0,1,1); +INSERT INTO order_items VALUES(577,311,79,'1',33.0,33.0,1,1); +INSERT INTO order_items VALUES(578,312,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(579,312,58,'1',59.0,59.0,1,1); +INSERT INTO order_items VALUES(580,312,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(581,312,46,'1',109.0,109.0,1,1); +INSERT INTO order_items VALUES(582,312,100,'1',99.0,99.0,1,1); +INSERT INTO order_items VALUES(583,312,56,'1',67.0,67.0,1,1); +INSERT INTO order_items VALUES(584,312,8,'1',119.0,119.0,1,1); +INSERT INTO order_items VALUES(585,313,23,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(586,313,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(587,314,40,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(588,315,76,'1',19.0,19.0,0,0); +INSERT INTO order_items VALUES(589,315,19,'1',23.0,23.0,0,0); +INSERT INTO order_items VALUES(590,315,48,'1',55.0,55.0,0,0); +INSERT INTO order_items VALUES(591,316,19,'1',23.0,23.0,1,1); +INSERT INTO order_items VALUES(592,316,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(593,316,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(594,316,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(595,317,23,'1',149.0,149.0,0,0); +INSERT INTO order_items VALUES(596,318,14,'2',389.0,389.0,1,1); +INSERT INTO order_items VALUES(597,318,98,'2',419.0,419.0,1,1); +INSERT INTO order_items VALUES(598,319,11,'1',119.0,119.0,1,0); +INSERT INTO order_items VALUES(599,319,79,'2',33.0,33.0,1,0); +INSERT INTO order_items VALUES(600,320,38,'1',76.0,76.0,1,1); +INSERT INTO order_items VALUES(601,320,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(602,320,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(603,320,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(604,320,33,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(605,320,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(606,321,98,'1',419.0,419.0,0,0); +INSERT INTO order_items VALUES(607,322,35,'1',429.0,429.0,1,0); +INSERT INTO order_items VALUES(608,323,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(609,323,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(610,323,37,'1',139.0,139.0,1,1); +INSERT INTO order_items VALUES(611,323,76,'4',19.0,19.0,1,1); +INSERT INTO order_items VALUES(612,323,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(613,323,72,'1',14.0,14.0,1,1); +INSERT INTO order_items VALUES(614,323,92,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(615,323,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(616,323,97,'2',19.0,19.0,1,1); +INSERT INTO order_items VALUES(617,323,24,'1',198.0,198.0,1,1); +INSERT INTO order_items VALUES(618,324,8,'1',119.0,119.0,1,1); +INSERT INTO order_items VALUES(619,324,51,'1',169.0,169.0,1,0); +INSERT INTO order_items VALUES(620,324,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(621,324,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(622,324,100,'1',99.0,99.0,1,1); +INSERT INTO order_items VALUES(623,325,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(624,325,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(625,325,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(626,325,19,'1',23.0,23.0,1,1); +INSERT INTO order_items VALUES(627,325,23,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(628,326,2,'1',198.0,198.0,1,1); +INSERT INTO order_items VALUES(629,326,23,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(630,327,58,'1',59.0,59.0,1,0); +INSERT INTO order_items VALUES(631,327,38,'1',76.0,76.0,1,0); +INSERT INTO order_items VALUES(632,327,79,'2',33.0,33.0,1,0); +INSERT INTO order_items VALUES(633,328,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(634,329,13,'1',69.0,69.0,1,1); +INSERT INTO order_items VALUES(635,329,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(636,329,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(637,329,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(638,329,50,'1',119.0,119.0,1,1); +INSERT INTO order_items VALUES(639,330,72,'2',14.0,14.0,1,1); +INSERT INTO order_items VALUES(640,331,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(641,331,37,'1',139.0,139.0,1,0); +INSERT INTO order_items VALUES(642,332,38,'1',76.0,76.0,1,0); +INSERT INTO order_items VALUES(643,332,53,'1',239.0,239.0,1,1); +INSERT INTO order_items VALUES(644,333,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(645,333,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(646,333,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(647,333,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(648,333,19,'1',23.0,23.0,1,1); +INSERT INTO order_items VALUES(649,333,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(650,334,45,'2',19.0,19.0,1,1); +INSERT INTO order_items VALUES(651,334,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(652,334,94,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(653,334,33,'2',15.0,15.0,1,1); +INSERT INTO order_items VALUES(654,334,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(655,334,72,'2',14.0,14.0,1,1); +INSERT INTO order_items VALUES(656,334,19,'2',23.0,23.0,1,1); +INSERT INTO order_items VALUES(657,334,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(658,334,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(659,334,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(660,334,5,'1',26.0,26.0,1,0); +INSERT INTO order_items VALUES(661,334,65,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(662,334,13,'1',69.0,69.0,1,1); +INSERT INTO order_items VALUES(663,335,59,'2',98.0,98.0,0,0); +INSERT INTO order_items VALUES(664,335,60,'2',78.0,78.0,0,0); +INSERT INTO order_items VALUES(665,335,8,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(666,336,8,'1',119.0,119.0,1,1); +INSERT INTO order_items VALUES(667,336,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(668,336,60,'1',78.0,78.0,1,1); +INSERT INTO order_items VALUES(669,337,76,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(670,337,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(671,337,97,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(672,338,23,'2',125.0,125.0,1,1); +INSERT INTO order_items VALUES(673,339,65,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(674,339,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(675,339,13,'1',69.0,69.0,1,1); +INSERT INTO order_items VALUES(676,340,58,'1',59.0,59.0,1,0); +INSERT INTO order_items VALUES(677,340,7,'1',49.0,49.0,1,0); +INSERT INTO order_items VALUES(678,340,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(679,340,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(680,341,23,'2',125.0,125.0,1,0); +INSERT INTO order_items VALUES(681,342,9,'1',296.0,296.0,1,0); +INSERT INTO order_items VALUES(682,342,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(683,342,19,'2',50.0,50.0,1,0); +INSERT INTO order_items VALUES(684,342,60,'1',78.0,78.0,1,0); +INSERT INTO order_items VALUES(685,342,48,'3',55.0,55.0,1,0); +INSERT INTO order_items VALUES(686,343,58,'1',59.0,59.0,1,0); +INSERT INTO order_items VALUES(687,343,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(688,344,40,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(689,344,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(690,345,7,'1',49.0,49.0,1,0); +INSERT INTO order_items VALUES(691,345,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(692,345,44,'1',119.0,119.0,1,0); +INSERT INTO order_items VALUES(693,345,60,'1',78.0,78.0,1,0); +INSERT INTO order_items VALUES(694,345,48,'1',55.0,55.0,1,0); +INSERT INTO order_items VALUES(695,346,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(696,346,67,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(697,346,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(698,346,91,'1',39.0,39.0,1,1); +INSERT INTO order_items VALUES(699,346,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(700,346,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(701,346,74,'1',18.0,18.0,1,1); +INSERT INTO order_items VALUES(702,346,72,'1',14.0,14.0,1,1); +INSERT INTO order_items VALUES(703,347,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(704,347,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(705,347,65,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(706,347,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(707,347,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(708,347,29,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(709,347,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(710,347,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(711,347,72,'1',14.0,14.0,1,1); +INSERT INTO order_items VALUES(712,347,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(713,347,33,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(714,347,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(715,348,35,'1',429.0,429.0,0,0); +INSERT INTO order_items VALUES(748,381,1,'1',99.0,99.0,0,0); +INSERT INTO order_items VALUES(749,381,9,'1',296.0,296.0,0,0); +INSERT INTO order_items VALUES(750,382,91,'1',39.0,39.0,0,0); +INSERT INTO order_items VALUES(751,382,25,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(752,382,31,'1',29.0,29.0,0,0); +INSERT INTO order_items VALUES(753,383,25,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(754,384,84,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(755,384,36,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(756,385,79,'2',39.0,39.0,0,0); +INSERT INTO order_items VALUES(757,385,23,'2',133.0,133.0,0,0); +INSERT INTO order_items VALUES(758,386,91,'1',39.0,39.0,0,0); +CREATE TABLE IF NOT EXISTS "order_status" ("id" INTEGER PRIMARY KEY, "order_time" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "user_id" INTEGER NOT NULL, "order_id" INTEGER NOT NULL, "is_packaged" INTEGER NOT NULL DEFAULT false, "is_delivered" INTEGER NOT NULL DEFAULT false, "is_cancelled" INTEGER NOT NULL DEFAULT false, "cancel_reason" TEXT, "payment_state" TEXT NOT NULL DEFAULT 'pending', "cancellation_user_notes" TEXT, "cancellation_admin_notes" TEXT, "cancellation_reviewed" INTEGER NOT NULL DEFAULT false, "cancellation_reviewed_at" TEXT, "refund_coupon_id" INTEGER, "is_cancelled_by_admin" INTEGER); +INSERT INTO order_status VALUES(1,'2025-11-19T09:21:36.005Z',3,1,1,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(2,'2025-11-19T09:38:30.002Z',1,2,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(3,'2025-11-19T11:46:20.300Z',1,3,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(4,'2025-11-19T11:47:33.139Z',1,4,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(5,'2025-11-19T11:57:48.269Z',1,5,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(6,'2025-11-19T12:13:52.466Z',1,6,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(7,'2025-11-19T12:15:06.264Z',1,7,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(8,'2025-11-19T12:18:02.760Z',1,8,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(9,'2025-11-19T12:23:19.913Z',1,9,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(10,'2025-11-19T12:24:04.853Z',1,10,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(11,'2025-11-19T12:32:19.093Z',1,11,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(12,'2025-11-19T12:34:24.892Z',1,12,0,0,1,'Simply','success','Simply',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(13,'2025-11-19T12:36:42.741Z',1,13,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(14,'2025-11-19T12:39:28.501Z',1,14,0,0,1,'Simply','success','Simply',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(15,'2025-11-20T13:57:28.656Z',1,15,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(16,'2025-11-20T13:58:25.443Z',1,16,0,0,1,'Just for fun','pending','Just for fun',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(17,'2025-11-20T13:59:33.401Z',1,17,0,0,1,'Simply','pending','Simply',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(18,'2025-11-22T06:22:17.202Z',1,18,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(19,'2025-11-22T22:47:06.288Z',2,19,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(20,'2025-11-22T22:47:51.311Z',2,20,0,0,1,'Demo ','cod','Demo ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(21,'2025-11-23T06:17:57.049Z',1,21,1,1,1,'Having some fun','success','Having some fun',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(22,'2025-11-24T05:57:28.143Z',3,22,1,1,1,'On more need','cod','On more need',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(23,'2025-11-24T05:57:47.787Z',3,23,1,1,1,'No more need','success','No more need',NULL,1,'2025-11-24T06:07:29.145Z',NULL,NULL); +INSERT INTO order_status VALUES(24,'2025-11-25T00:59:10.926Z',2,24,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(25,'2025-11-25T05:22:32.946Z',1,25,0,0,1,'Will order again. ','success','Will order again. ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(26,'2025-11-27T06:03:25.875Z',1,26,0,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(27,'2025-11-28T05:42:30.513Z',1,27,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(28,'2025-11-28T08:13:28.023Z',1,28,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(29,'2025-11-28T13:35:07.141Z',1,29,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(30,'2025-11-28T22:21:06.630Z',1,30,0,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(31,'2025-11-28T22:24:57.085Z',1,31,0,0,1,'Not paid for','pending','Not paid for',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(32,'2025-11-28T22:34:41.736Z',1,32,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(33,'2025-11-28T22:36:50.767Z',1,33,0,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(34,'2025-11-28T22:52:17.319Z',1,34,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(35,'2025-11-28T22:58:18.465Z',1,35,0,0,1,'Payment failed','pending','Payment failed',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(36,'2025-11-28T23:08:27.789Z',1,36,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(37,'2025-11-28T23:09:42.893Z',1,37,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(38,'2025-11-28T23:11:19.776Z',1,38,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(39,'2025-11-28T23:17:00.716Z',1,39,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(40,'2025-11-28T23:17:55.763Z',1,40,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(41,'2025-11-28T23:22:23.472Z',1,41,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(42,'2025-11-28T23:23:26.081Z',1,42,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(43,'2025-11-28T23:31:53.995Z',1,43,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(44,'2025-11-28T23:33:25.999Z',1,44,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(45,'2025-11-28T23:35:17.386Z',1,45,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(46,'2025-11-28T23:42:33.188Z',1,46,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(47,'2025-11-29T00:35:31.578Z',1,47,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(48,'2025-11-29T00:47:37.657Z',1,48,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(49,'2025-11-29T00:51:57.402Z',1,49,0,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(50,'2025-11-29T01:06:18.087Z',1,50,0,0,1,'Testing cancellation functionality','success','Testing cancellation functionality',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(51,'2025-11-29T01:40:22.677Z',1,51,0,0,1,'Testingg','success','Testingg',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(52,'2025-11-29T01:51:02.498Z',1,52,0,0,1,'Testing','success','Testing',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(53,'2025-11-29T01:57:47.891Z',1,53,0,0,1,'Testing 3','success','Testing 3',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(54,'2025-11-29T03:01:07.992Z',1,54,1,1,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(55,'2025-12-04T23:32:41.242Z',2,55,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(56,'2025-12-10T10:02:38.859Z',4,56,0,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(57,'2025-12-10T10:04:32.211Z',4,57,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(58,'2025-12-13T11:19:59.242Z',1,58,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(59,'2025-12-13T11:23:12.720Z',1,59,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(60,'2025-12-13T11:23:12.720Z',1,60,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(61,'2025-12-13T11:24:58.073Z',1,61,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(62,'2025-12-13T11:24:58.073Z',1,62,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(63,'2025-12-13T11:30:04.358Z',1,63,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(64,'2025-12-13T11:31:12.284Z',1,64,0,0,1,'just for fun','pending','just for fun',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(65,'2025-12-13T11:31:12.284Z',1,65,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(66,'2025-12-15T09:42:52.294Z',1,66,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(67,'2025-12-15T09:46:00.443Z',1,67,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(68,'2025-12-15T09:57:50.680Z',1,68,0,0,1,'funnn','cod','funnn',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(69,'2025-12-18T04:55:00.617Z',2,69,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(70,'2025-12-19T01:02:15.969Z',15,70,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(71,'2025-12-19T03:02:11.838Z',17,71,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(72,'2025-12-19T03:07:12.056Z',17,72,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(73,'2025-12-19T03:40:04.180Z',17,73,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(74,'2025-12-19T03:46:32.062Z',17,74,0,0,1,'Xdf','cod','Xdf',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(75,'2025-12-19T03:55:08.427Z',17,75,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(76,'2025-12-19T03:57:05.639Z',17,76,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(77,'2025-12-19T04:02:06.098Z',17,77,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(78,'2025-12-19T07:02:11.424Z',15,78,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(79,'2025-12-19T07:53:09.910Z',15,79,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(80,'2025-12-19T09:10:25.557Z',17,80,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(81,'2025-12-19T09:49:01.904Z',17,81,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(82,'2025-12-19T09:55:53.524Z',17,82,1,1,0,NULL,'cod',NULL,NULL,0,NULL,7,NULL); +INSERT INTO order_status VALUES(83,'2025-12-19T10:37:21.739Z',17,83,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(84,'2025-12-19T10:46:56.208Z',17,84,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(85,'2025-12-19T11:01:02.225Z',17,85,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(86,'2025-12-19T11:26:56.607Z',17,86,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(87,'2025-12-19T11:38:46.198Z',17,87,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(88,'2025-12-20T05:46:31.197Z',17,88,0,0,1,'Hh','cod','Hh',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(89,'2025-12-20T15:09:16.076Z',1,89,0,0,1,'Simply','cod','Simply',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(90,'2025-12-20T21:38:45.891Z',17,90,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(91,'2025-12-20T21:39:35.232Z',17,91,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(92,'2025-12-22T05:12:52.301Z',15,92,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(93,'2025-12-22T05:22:59.518Z',15,93,0,0,1,replace('Plz cancle this order \nIt''s mistake to order ','\n',char(10)),'cod',replace('Plz cancle this order \nIt''s mistake to order ','\n',char(10)),NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(94,'2025-12-22T08:12:49.911Z',15,94,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(95,'2025-12-22T08:40:14.765Z',15,95,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(96,'2025-12-22T09:05:51.054Z',20,96,0,0,1,'Sorry by mistake ordered ','cod','Sorry by mistake ordered ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(97,'2025-12-23T00:47:34.830Z',2,97,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(98,'2025-12-23T00:47:34.830Z',2,98,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(99,'2025-12-23T00:50:21.885Z',2,99,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(100,'2025-12-23T08:23:28.094Z',15,100,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(101,'2025-12-23T11:45:50.591Z',17,101,0,0,1,'Hh','cod','Hh',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(102,'2025-12-23T11:49:14.841Z',17,102,0,0,1,'Gg','cod','Gg',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(103,'2025-12-23T21:09:04.114Z',22,103,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(104,'2025-12-23T21:20:33.284Z',22,104,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(105,'2025-12-23T21:20:33.284Z',22,105,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(106,'2025-12-24T05:02:01.957Z',15,106,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(107,'2025-12-24T05:02:01.957Z',15,107,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(108,'2025-12-24T05:02:01.957Z',15,108,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(109,'2025-12-24T05:02:01.957Z',15,109,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(110,'2025-12-25T07:48:48.478Z',1,110,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(111,'2025-12-25T10:06:02.108Z',1,111,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(112,'2025-12-25T10:06:02.108Z',1,112,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(113,'2025-12-25T10:32:45.526Z',1,113,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(114,'2025-12-26T19:38:17.686Z',16,114,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(115,'2025-12-26T23:02:15.299Z',1,115,0,0,0,NULL,'cod',NULL,NULL,0,NULL,9,NULL); +INSERT INTO order_status VALUES(116,'2025-12-26T23:02:15.299Z',1,116,1,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(117,'2025-12-27T12:09:01.944Z',2,117,1,1,0,NULL,'cod',NULL,NULL,0,NULL,10,NULL); +INSERT INTO order_status VALUES(118,'2025-12-27T12:09:01.944Z',2,118,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(119,'2025-12-27T12:09:01.944Z',2,119,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(120,'2025-12-28T08:37:33.787Z',2,120,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(121,'2025-12-28T08:41:24.904Z',2,121,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(122,'2025-12-28T22:17:14.213Z',1,122,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(123,'2026-01-01T03:08:22.110Z',2,123,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(124,'2026-01-01T03:09:11.420Z',2,124,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(125,'2026-01-01T03:14:07.865Z',2,125,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(126,'2026-01-01T05:09:15.780Z',2,126,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(127,'2026-01-01T06:40:15.182Z',2,127,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(128,'2026-01-03T02:42:48.013Z',26,128,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(129,'2026-01-04T07:35:41.022Z',2,129,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(130,'2026-01-04T07:37:44.994Z',12,130,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(131,'2026-01-04T13:20:00.136Z',21,131,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(132,'2026-01-06T07:21:22.047Z',1,132,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(133,'2026-01-06T07:45:52.275Z',30,133,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(134,'2026-01-06T11:13:08.862Z',21,134,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(135,'2026-01-07T09:32:56.404Z',22,135,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(136,'2026-01-07T10:17:55.795Z',22,136,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(137,'2026-01-07T10:22:37.964Z',22,137,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(138,'2026-01-07T18:03:50.419Z',2,138,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(139,'2026-01-12T08:37:09.285Z',2,139,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(140,'2026-01-13T03:57:08.501Z',1,140,0,0,1,'Cancell','cod','Cancell',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(141,'2026-01-13T04:16:11.800Z',1,141,0,0,1,'Cancell','cod','Cancell',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(142,'2026-01-13T09:26:55.340Z',34,142,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(143,'2026-01-14T13:37:20.272Z',1,143,0,0,1,'Cancell','cod','Cancell',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(144,'2026-01-14T13:40:52.673Z',1,144,0,0,1,'Cancelll','cod','Cancelll',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(145,'2026-01-14T13:43:51.004Z',1,145,0,0,1,'Cabcell','cod','Cabcell',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(146,'2026-01-14T13:46:29.183Z',1,146,0,0,1,'Cancel','cod',NULL,'Cancel',1,'2026-01-28T00:39:48.321Z',NULL,1); +INSERT INTO order_status VALUES(147,'2026-01-14T13:48:47.459Z',1,147,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(148,'2026-01-14T14:18:23.106Z',1,148,0,0,1,'Area Not Serviced yet','cod',NULL,'Area Not Serviced yet',1,'2026-01-17T23:01:50.046Z',NULL,1); +INSERT INTO order_status VALUES(149,'2026-01-15T10:38:51.399Z',2,149,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(150,'2026-01-15T10:38:51.399Z',2,150,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(151,'2026-01-16T07:20:20.462Z',2,151,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(152,'2026-01-16T07:20:39.316Z',2,152,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(153,'2026-01-16T07:21:00.354Z',2,153,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(154,'2026-01-16T07:21:27.051Z',2,154,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(155,'2026-01-16T07:22:32.758Z',2,155,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(156,'2026-01-16T23:21:39.925Z',2,156,0,0,1,'Cancel ','cod',NULL,'Cancel ',1,'2026-01-27T22:30:19.302Z',NULL,1); +INSERT INTO order_status VALUES(157,'2026-01-18T00:56:50.633Z',22,157,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(158,'2026-01-18T03:02:03.729Z',2,158,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(159,'2026-01-18T09:53:08.648Z',22,159,0,0,1,'Reason for cancellation ','cod','Reason for cancellation ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(160,'2026-01-18T10:14:06.341Z',22,160,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(161,'2026-01-18T10:20:14.848Z',22,161,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(162,'2026-01-18T10:24:09.003Z',22,162,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(163,'2026-01-18T21:46:46.398Z',22,163,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(164,'2026-01-19T14:17:52.639Z',1,164,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(165,'2026-01-23T03:22:03.840Z',2,165,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(166,'2026-01-23T10:37:42.952Z',25,166,0,0,1,'I''ll order later','cod','I''ll order later',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(167,'2026-01-24T02:56:06.720Z',2,167,0,0,1,'Unnecessary order','cod',NULL,'Unnecessary order',1,'2026-01-27T22:26:35.510Z',NULL,1); +INSERT INTO order_status VALUES(168,'2026-01-24T14:56:52.645Z',1,168,0,0,1,'Cancel ','cod',NULL,'Cancel ',1,'2026-01-27T22:27:15.817Z',NULL,1); +INSERT INTO order_status VALUES(169,'2026-01-24T20:44:03.566Z',22,169,0,0,1,'Cancel ','cod',NULL,'Cancel ',1,'2026-01-27T22:27:32.422Z',NULL,1); +INSERT INTO order_status VALUES(170,'2026-01-25T23:35:31.364Z',29,170,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(171,'2026-01-27T06:44:08.218Z',64,171,0,0,1,'Unnecessary','cod',NULL,'Unnecessary',1,'2026-01-27T22:25:10.943Z',NULL,1); +INSERT INTO order_status VALUES(172,'2026-01-27T11:29:12.321Z',65,172,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(173,'2026-01-27T11:29:12.321Z',65,173,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(174,'2026-01-28T00:03:00.256Z',60,174,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(175,'2026-01-28T00:38:05.827Z',1,175,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(176,'2026-01-28T00:38:05.827Z',1,176,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(177,'2026-01-28T01:51:10.288Z',22,177,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(178,'2026-01-28T01:51:10.288Z',22,178,1,1,1,'Cancel ','cod',NULL,'Cancel ',1,'2026-01-28T10:02:31.195Z',NULL,1); +INSERT INTO order_status VALUES(179,'2026-01-28T10:40:36.187Z',58,179,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(180,'2026-01-29T22:42:25.446Z',38,180,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(181,'2026-01-30T00:31:02.610Z',1,181,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(182,'2026-01-30T00:46:59.261Z',38,182,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(183,'2026-01-30T01:42:25.118Z',1,183,0,0,1,'Not a serious order','cod',NULL,'Not a serious order',1,'2026-01-30T02:09:22.274Z',NULL,1); +INSERT INTO order_status VALUES(184,'2026-01-30T03:13:07.360Z',38,184,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(185,'2026-01-31T01:44:10.735Z',54,185,0,0,1,'No response from customer ','cod',NULL,'No response from customer ',1,'2026-01-31T07:36:00.972Z',NULL,1); +INSERT INTO order_status VALUES(186,'2026-01-31T01:44:48.105Z',54,186,0,0,1,'No response from customer','cod',NULL,'No response from customer',1,'2026-01-31T07:35:41.324Z',NULL,1); +INSERT INTO order_status VALUES(187,'2026-01-31T04:25:19.495Z',78,187,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(188,'2026-01-31T05:26:01.981Z',1,188,0,0,1,'Cancel','cod','Cancel',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(189,'2026-01-31T06:32:04.589Z',1,189,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(190,'2026-01-31T22:04:46.197Z',1,190,0,0,1,'Yes’s cancel','cod','Yes’s cancel',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(191,'2026-02-01T00:28:05.843Z',7,191,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(192,'2026-02-01T01:31:50.642Z',74,192,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(193,'2026-02-01T01:56:14.147Z',74,193,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(194,'2026-02-01T02:19:04.918Z',38,194,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(195,'2026-02-01T03:22:19.400Z',22,195,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(196,'2026-02-01T04:41:15.161Z',82,196,0,0,1,'Zdyt','cod','Zdyt',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(197,'2026-02-01T04:46:41.872Z',82,197,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(202,'2026-02-01T10:07:16.233Z',88,202,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(203,'2026-02-02T04:53:54.970Z',92,203,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(204,'2026-02-02T06:48:31.456Z',38,204,0,0,1,'Mistake ','cod','Mistake ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(205,'2026-02-02T06:50:24.727Z',38,205,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(206,'2026-02-02T08:27:54.149Z',7,206,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(207,'2026-02-02T09:01:16.193Z',1,207,0,0,1,'Will order Mutton','cod','Will order Mutton',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(208,'2026-02-02T12:53:25.021Z',1,208,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(209,'2026-02-02T22:40:01.666Z',38,209,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(210,'2026-02-03T00:26:45.500Z',98,210,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(211,'2026-02-03T00:28:30.230Z',98,211,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(212,'2026-02-03T03:11:48.475Z',24,212,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(213,'2026-02-03T07:33:13.302Z',46,213,0,0,1,'Yes','cod','Yes',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(214,'2026-02-03T08:40:49.538Z',38,214,0,0,1,'I want to change shedule ','cod','I want to change shedule ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(215,'2026-02-03T08:43:00.789Z',38,215,1,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(216,'2026-02-03T10:16:16.915Z',81,216,0,0,1,'No response from customer','cod',NULL,'No response from customer',1,'2026-02-03T23:34:45.350Z',NULL,1); +INSERT INTO order_status VALUES(217,'2026-02-04T01:36:25.133Z',96,217,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(218,'2026-02-04T02:41:07.508Z',81,218,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(219,'2026-02-04T07:47:53.067Z',1,219,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(220,'2026-02-05T03:15:53.554Z',103,220,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(221,'2026-02-05T04:00:30.739Z',24,221,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(222,'2026-02-06T05:49:57.315Z',114,222,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(223,'2026-02-06T06:21:43.659Z',1,223,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(224,'2026-02-06T06:25:36.038Z',71,224,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(225,'2026-02-06T08:53:10.229Z',1,225,0,0,1,'Testing cancel Telegram Notification ','cod',NULL,'Testing cancel Telegram Notification ',1,'2026-02-06T23:20:32.419Z',NULL,1); +INSERT INTO order_status VALUES(226,'2026-02-06T10:26:39.531Z',115,226,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(227,'2026-02-06T10:26:39.531Z',115,227,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(228,'2026-02-06T16:16:47.346Z',115,228,0,0,1,'Ordered by mistake','cod','Ordered by mistake',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(229,'2026-02-06T23:01:13.646Z',109,229,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(230,'2026-02-06T23:28:37.545Z',103,230,0,0,1,'Wrong address ','cod','Wrong address ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(231,'2026-02-06T23:36:55.424Z',103,231,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(232,'2026-02-07T07:06:17.096Z',119,232,0,0,1,'The order is still pending ','cod','The order is still pending ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(233,'2026-02-07T07:24:42.810Z',38,233,0,0,1,'Change shedule ','cod','Change shedule ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(234,'2026-02-07T07:25:52.698Z',38,234,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(235,'2026-02-07T23:11:07.297Z',120,235,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(236,'2026-02-07T23:43:00.160Z',98,236,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(237,'2026-02-07T23:58:12.863Z',38,237,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(238,'2026-02-08T00:48:23.089Z',121,238,0,0,1,'We buy','cod','We buy',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(239,'2026-02-08T00:55:15.154Z',121,239,0,0,1,'Sorry that is cost is more expensive then market price','cod','Sorry that is cost is more expensive then market price',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(240,'2026-02-08T04:28:56.405Z',121,240,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(241,'2026-02-08T04:29:20.307Z',121,241,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(242,'2026-02-08T04:29:55.364Z',121,242,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(243,'2026-02-08T04:30:37.777Z',121,243,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(244,'2026-02-08T04:32:20.374Z',121,244,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(245,'2026-02-08T04:33:59.746Z',121,245,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(246,'2026-02-08T05:09:24.720Z',12,246,0,0,1,'J','cod',NULL,'J',1,'2026-02-08T23:17:27.385Z',NULL,1); +INSERT INTO order_status VALUES(247,'2026-02-09T01:52:55.524Z',2,247,0,0,1,'Demo for correct location ','cod','Demo for correct location ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(248,'2026-02-09T07:56:42.048Z',125,248,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(249,'2026-02-10T06:04:04.471Z',3,249,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(250,'2026-02-10T21:59:33.763Z',2,250,0,0,1,'Demo','cod',NULL,'Demo',1,'2026-02-10T22:00:06.670Z',NULL,1); +INSERT INTO order_status VALUES(251,'2026-02-11T16:13:20.142Z',115,251,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(252,'2026-02-11T16:13:20.142Z',115,252,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(253,'2026-02-11T16:13:20.142Z',115,253,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(254,'2026-02-14T01:01:13.769Z',114,254,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(255,'2026-02-15T00:00:53.358Z',120,255,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(256,'2026-02-16T01:21:48.050Z',2,256,0,0,1,'Demo','cod',NULL,'Demo',1,'2026-02-16T01:22:51.309Z',NULL,1); +INSERT INTO order_status VALUES(257,'2026-02-16T04:14:55.522Z',134,257,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(258,'2026-02-16T04:22:00.592Z',134,258,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(259,'2026-02-17T00:44:27.971Z',120,259,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(260,'2026-02-17T07:16:27.421Z',1,260,0,0,1,'D','cod',NULL,'D',1,'2026-02-18T06:14:42.228Z',NULL,1); +INSERT INTO order_status VALUES(261,'2026-02-17T07:30:07.521Z',136,261,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(262,'2026-02-17T07:45:43.734Z',136,262,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(263,'2026-02-17T07:52:41.197Z',3,263,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(264,'2026-02-17T19:47:31.551Z',141,264,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(265,'2026-02-17T22:56:42.974Z',143,265,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(266,'2026-02-17T23:04:14.592Z',143,266,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(267,'2026-02-17T23:27:35.908Z',130,267,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(268,'2026-02-18T00:28:16.181Z',132,268,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(269,'2026-02-18T01:34:08.441Z',119,269,0,0,1,'No response from customer','cod',NULL,'No response from customer',1,'2026-02-18T04:17:30.092Z',NULL,1); +INSERT INTO order_status VALUES(270,'2026-02-18T02:04:32.495Z',119,270,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(271,'2026-02-18T03:46:31.297Z',145,271,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(272,'2026-02-18T05:15:38.160Z',138,272,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(273,'2026-02-18T05:15:38.161Z',138,273,0,0,1,'Cancel order ','cod','Cancel order ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(274,'2026-02-18T05:15:59.580Z',147,274,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(275,'2026-02-18T06:53:25.416Z',24,275,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(276,'2026-02-18T07:16:24.911Z',82,276,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(277,'2026-02-18T07:31:33.186Z',148,277,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(278,'2026-02-18T23:12:20.428Z',38,278,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(279,'2026-02-19T00:00:57.733Z',156,279,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(280,'2026-02-19T01:04:09.663Z',99,280,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(281,'2026-02-19T01:57:57.613Z',82,281,0,0,1,'Its late','cod','Its late',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(282,'2026-02-19T01:59:43.093Z',82,282,0,0,1,'Its late','cod','Its late',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(283,'2026-02-19T02:16:07.844Z',66,283,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(284,'2026-02-19T03:09:55.456Z',120,284,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(285,'2026-02-19T03:40:51.549Z',159,285,0,0,1,'So late and slow service ','cod','So late and slow service ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(286,'2026-02-19T03:49:55.745Z',160,286,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(287,'2026-02-19T03:54:05.397Z',64,287,0,0,1,'N','cod',NULL,'N',1,'2026-02-19T04:40:17.239Z',NULL,1); +INSERT INTO order_status VALUES(288,'2026-02-19T03:54:05.397Z',64,288,0,0,1,'D','cod',NULL,'D',1,'2026-02-19T04:37:45.087Z',NULL,1); +INSERT INTO order_status VALUES(289,'2026-02-19T04:00:41.001Z',160,289,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(290,'2026-02-19T04:09:35.859Z',151,290,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(291,'2026-02-19T04:16:50.189Z',4,291,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(292,'2026-02-19T05:08:36.439Z',162,292,0,0,1,'No response from customer ','cod',NULL,'No response from customer ',1,'2026-02-19T07:22:49.182Z',NULL,1); +INSERT INTO order_status VALUES(293,'2026-02-19T05:08:36.736Z',162,293,0,0,1,'No response from customer ','cod',NULL,'No response from customer ',1,'2026-02-19T07:22:21.525Z',NULL,1); +INSERT INTO order_status VALUES(294,'2026-02-19T06:14:11.047Z',32,294,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(295,'2026-02-19T06:49:34.891Z',163,295,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(296,'2026-02-19T12:38:24.984Z',38,296,0,0,1,'I don''t walt this because I will buy on Sunday ','cod','I don''t walt this because I will buy on Sunday ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(297,'2026-02-19T15:48:55.517Z',82,297,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(298,'2026-02-20T01:39:04.912Z',66,298,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(299,'2026-02-20T02:41:56.608Z',66,299,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(300,'2026-02-20T03:24:43.556Z',140,300,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(301,'2026-02-20T03:37:43.245Z',169,301,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(302,'2026-02-20T03:59:51.171Z',170,302,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(303,'2026-02-20T04:04:04.909Z',170,303,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(304,'2026-02-20T04:47:12.538Z',132,304,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(305,'2026-02-20T06:02:01.579Z',176,305,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(306,'2026-02-20T06:41:12.043Z',99,306,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(307,'2026-02-20T07:21:21.906Z',163,307,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(308,'2026-02-20T07:41:37.350Z',74,308,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(309,'2026-02-20T09:08:15.335Z',115,309,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(310,'2026-02-20T13:06:33.249Z',38,310,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(311,'2026-02-20T22:50:10.927Z',184,311,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(312,'2026-02-21T03:19:33.169Z',81,312,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(313,'2026-02-21T03:33:25.012Z',24,313,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(314,'2026-02-21T03:45:19.764Z',186,314,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(315,'2026-02-21T04:36:43.124Z',160,315,0,0,1,'Double order','cod',NULL,'Double order',1,'2026-02-21T04:45:00.817Z',NULL,1); +INSERT INTO order_status VALUES(316,'2026-02-21T04:40:27.736Z',160,316,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(317,'2026-02-21T06:23:19.310Z',32,317,0,0,1,'I want to change my order','cod','I want to change my order',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(318,'2026-02-21T12:32:34.307Z',7,318,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(319,'2026-02-21T19:42:40.619Z',141,319,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(320,'2026-02-21T19:42:40.619Z',141,320,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(321,'2026-02-21T22:34:37.439Z',120,321,0,0,1,replace('Kheema\n','\n',char(10)),'cod',replace('Kheema\n','\n',char(10)),NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(322,'2026-02-21T22:53:17.760Z',193,322,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(323,'2026-02-21T23:09:55.795Z',132,323,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(324,'2026-02-21T23:38:18.540Z',130,324,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(325,'2026-02-22T00:16:21.567Z',194,325,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(326,'2026-02-22T01:08:52.833Z',198,326,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(327,'2026-02-22T01:13:15.958Z',184,327,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(328,'2026-02-22T01:13:15.958Z',184,328,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(329,'2026-02-22T03:46:06.235Z',205,329,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(330,'2026-02-22T04:21:41.707Z',206,330,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(331,'2026-02-22T04:39:37.484Z',208,331,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(332,'2026-02-22T14:05:39.863Z',50,332,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(333,'2026-02-23T03:21:16.555Z',151,333,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(334,'2026-02-23T03:47:30.738Z',223,334,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(335,'2026-02-23T04:40:46.728Z',224,335,0,0,1,'By mistake ','cod','By mistake ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(336,'2026-02-23T04:44:00.644Z',224,336,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(337,'2026-02-23T04:45:56.017Z',224,337,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(338,'2026-02-23T05:51:07.943Z',38,338,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(339,'2026-02-23T06:46:04.203Z',225,339,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(340,'2026-02-23T22:40:33.438Z',228,340,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(341,'2026-02-24T01:44:30.406Z',230,341,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(342,'2026-02-24T01:46:05.872Z',229,342,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(343,'2026-02-24T02:52:22.431Z',224,343,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(344,'2026-02-24T04:15:41.683Z',158,344,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(345,'2026-02-24T05:47:59.572Z',3,345,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(346,'2026-02-24T07:17:54.419Z',149,346,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(347,'2026-02-24T12:55:21.432Z',50,347,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(348,'2026-02-25T02:47:44.024Z',132,348,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(381,'2026-02-26T11:24:06.998Z',1,381,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(382,'2026-02-26T11:30:33.419Z',1,382,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(383,'2026-02-26T11:34:03.543Z',1,383,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(384,'2026-02-26T11:36:20.560Z',1,384,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(385,'2026-03-09T10:16:59.219Z',1,385,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(386,'2026-03-26T01:19:29.108Z',1,386,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +CREATE TABLE IF NOT EXISTS "orders" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "address_id" INTEGER NOT NULL, "slot_id" INTEGER, "total_amount" REAL NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "is_cod" INTEGER NOT NULL DEFAULT false, "is_online_payment" INTEGER NOT NULL DEFAULT false, "payment_info_id" INTEGER, "readable_id" INTEGER NOT NULL, "admin_notes" TEXT, "user_notes" TEXT, "delivery_charge" REAL NOT NULL DEFAULT '0', "order_group_id" TEXT, "order_group_proportion" REAL, "is_flash_delivery" INTEGER NOT NULL DEFAULT false); +INSERT INTO orders VALUES(1,3,1,1,44.0,'2025-11-19T09:21:36.005Z',0,1,1,1,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(2,1,17,1,220.0,'2025-11-19T09:38:30.002Z',0,1,2,2,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(3,1,17,1,220.0,'2025-11-19T11:46:20.300Z',0,1,3,3,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(4,1,17,1,430.0,'2025-11-19T11:47:33.139Z',0,1,4,4,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(5,1,17,1,700.0,'2025-11-19T11:57:48.269Z',0,1,5,5,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(6,1,17,1,22.0,'2025-11-19T12:13:52.466Z',0,1,6,6,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(7,1,17,1,22.0,'2025-11-19T12:15:06.264Z',0,1,7,7,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(8,1,17,1,22.0,'2025-11-19T12:18:02.760Z',0,1,8,8,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(9,1,17,1,500.0,'2025-11-19T12:23:19.913Z',0,1,9,9,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(10,1,17,1,500.0,'2025-11-19T12:24:04.853Z',1,0,NULL,10,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(11,1,17,1,44.0,'2025-11-19T12:32:19.093Z',0,1,10,11,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(12,1,19,1,220.0,'2025-11-19T12:34:24.892Z',0,1,11,12,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(13,1,17,1,22.0,'2025-11-19T12:36:42.741Z',0,1,12,13,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(14,1,19,1,210.0,'2025-11-19T12:39:28.501Z',0,1,13,14,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(15,1,19,1,700.0,'2025-11-20T13:57:28.656Z',0,1,14,15,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(16,1,17,1,700.0,'2025-11-20T13:58:25.443Z',0,1,15,16,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(17,1,17,1,210.0,'2025-11-20T13:59:33.401Z',0,1,16,17,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(18,1,17,2,840.0,'2025-11-22T06:22:17.202Z',1,0,NULL,18,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(19,2,20,3,530.0,'2025-11-22T22:47:06.288Z',0,1,17,19,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(20,2,20,3,530.0,'2025-11-22T22:47:51.311Z',1,0,NULL,20,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(21,1,17,2,722.0,'2025-11-23T06:17:57.049Z',0,1,18,21,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(22,3,1,2,220.0,'2025-11-24T05:57:28.143Z',1,0,NULL,22,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(23,3,1,2,220.0,'2025-11-24T05:57:47.787Z',0,1,19,23,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(24,2,20,2,600.0,'2025-11-25T00:59:10.926Z',1,0,NULL,24,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(25,1,17,2,4560.0,'2025-11-25T05:22:32.946Z',0,1,20,25,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(26,1,19,4,9702.3999999999990251,'2025-11-27T06:03:25.875Z',0,1,21,26,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(27,1,19,4,9360.0,'2025-11-28T05:42:30.513Z',1,0,NULL,27,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(28,1,17,4,185.59999999999998721,'2025-11-28T08:13:28.023Z',1,0,NULL,28,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(29,1,17,2,700.0,'2025-11-28T13:35:07.141Z',1,0,NULL,29,NULL,'Fresh and no wastage ',0.0,NULL,NULL,0); +INSERT INTO orders VALUES(30,1,19,4,1870.0,'2025-11-28T22:21:06.630Z',0,1,22,30,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(31,1,19,4,1870.0,'2025-11-28T22:24:57.085Z',0,1,23,31,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(32,1,19,4,1496.0,'2025-11-28T22:34:41.736Z',0,1,24,32,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(33,1,19,4,560.0,'2025-11-28T22:36:50.767Z',0,1,25,33,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(34,1,19,4,1496.0,'2025-11-28T22:52:17.319Z',1,0,NULL,34,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(35,1,19,4,1120.0,'2025-11-28T22:58:18.465Z',0,1,26,35,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(36,1,19,4,2310.0,'2025-11-28T23:08:27.789Z',1,0,NULL,36,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(37,1,19,4,2310.0,'2025-11-28T23:09:42.893Z',0,1,27,37,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(38,1,19,4,1620.0,'2025-11-28T23:11:19.776Z',0,1,28,38,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(39,1,19,4,1320.0,'2025-11-28T23:17:00.716Z',1,0,NULL,39,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(40,1,19,4,1320.0,'2025-11-28T23:17:55.763Z',0,1,29,40,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(41,1,19,4,1320.0,'2025-11-28T23:22:23.472Z',0,1,30,41,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(42,1,19,4,376.0,'2025-11-28T23:23:26.081Z',0,1,31,42,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(43,1,19,4,1464.0,'2025-11-28T23:31:53.995Z',0,1,32,43,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(44,1,19,4,1464.0,'2025-11-28T23:33:25.999Z',0,1,33,44,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(45,1,19,4,1496.0,'2025-11-28T23:35:17.386Z',0,1,34,45,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(46,1,19,4,6904.0,'2025-11-28T23:42:33.188Z',0,1,35,46,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(47,1,19,4,752.0,'2025-11-29T00:35:31.578Z',0,1,36,47,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(48,1,19,4,1122.0,'2025-11-29T00:47:37.657Z',0,1,37,48,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(49,1,19,4,3156.0,'2025-11-29T00:51:57.402Z',0,1,38,49,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(50,1,19,4,4686.0,'2025-11-29T01:06:18.087Z',0,1,39,50,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(51,1,17,4,250.0,'2025-11-29T01:40:22.677Z',0,1,40,51,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(52,1,17,4,250.0,'2025-11-29T01:51:02.498Z',0,1,41,52,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(53,1,17,4,400.0,'2025-11-29T01:57:47.891Z',0,1,42,53,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(54,1,19,4,2850.0,'2025-11-29T03:01:07.992Z',0,1,43,54,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(55,2,20,5,1710.0,'2025-12-04T23:32:41.242Z',1,0,NULL,55,NULL,'Good packaging',0.0,NULL,NULL,0); +INSERT INTO orders VALUES(56,4,21,6,64.0,'2025-12-10T10:02:38.859Z',0,1,44,56,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(57,4,22,6,72.0,'2025-12-10T10:04:32.211Z',0,1,45,57,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(58,1,19,7,6900.0,'2025-12-13T11:19:59.242Z',1,0,NULL,58,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(59,1,19,7,210.0,'2025-12-13T11:23:12.720Z',1,0,NULL,60,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(60,1,19,9,350.0,'2025-12-13T11:23:12.720Z',1,0,NULL,61,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(61,1,19,7,210.0,'2025-12-13T11:24:58.073Z',1,0,NULL,63,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(62,1,19,9,700.0,'2025-12-13T11:24:58.073Z',1,0,NULL,64,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(63,1,19,7,1120.0,'2025-12-13T11:30:04.358Z',0,1,46,66,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(64,1,19,7,420.0,'2025-12-13T11:31:12.284Z',0,1,47,68,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(65,1,19,9,700.0,'2025-12-13T11:31:12.284Z',0,1,47,69,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(66,1,17,9,560.0,'2025-12-15T09:42:52.294Z',1,0,NULL,71,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(67,1,17,8,660.0,'2025-12-15T09:46:00.443Z',1,0,NULL,73,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(68,1,17,9,660.0,'2025-12-15T09:57:50.680Z',1,0,NULL,75,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(69,2,20,8,1400.0,'2025-12-18T04:55:00.617Z',1,0,NULL,77,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(70,15,25,8,50.0,'2025-12-19T01:02:15.969Z',1,0,NULL,79,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(71,17,26,8,1642.0,'2025-12-19T03:02:11.838Z',1,0,NULL,81,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(72,17,26,8,50.0,'2025-12-19T03:07:12.056Z',1,0,NULL,83,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(73,17,26,8,216.0,'2025-12-19T03:40:04.180Z',1,0,NULL,85,NULL,'Hello',0.0,NULL,NULL,0); +INSERT INTO orders VALUES(74,17,28,8,1500.0,'2025-12-19T03:46:32.062Z',1,0,NULL,87,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(75,17,28,8,21000.0,'2025-12-19T03:55:08.427Z',1,0,NULL,89,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(76,17,28,8,250.0,'2025-12-19T03:57:05.639Z',1,0,NULL,91,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(77,17,28,8,22.0,'2025-12-19T04:02:06.098Z',1,0,NULL,93,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(78,15,25,8,1400.0,'2025-12-19T07:02:11.424Z',1,0,NULL,95,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(79,15,24,12,300.0,'2025-12-19T07:53:09.910Z',1,0,NULL,97,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(80,17,28,8,1400.0,'2025-12-19T09:10:25.557Z',1,0,NULL,99,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(81,17,28,8,72.0,'2025-12-19T09:49:01.904Z',1,0,NULL,101,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(82,17,28,13,22.0,'2025-12-19T09:55:53.524Z',1,0,NULL,103,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(83,17,26,8,72.0,'2025-12-19T10:37:21.739Z',1,0,NULL,105,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(84,17,26,8,72.0,'2025-12-19T10:46:56.208Z',1,0,NULL,107,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(85,17,26,8,50.0,'2025-12-19T11:01:02.225Z',1,0,NULL,109,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(86,17,26,9,120.0,'2025-12-19T11:26:56.607Z',1,0,NULL,111,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(87,17,26,8,72.0,'2025-12-19T11:38:46.198Z',1,0,NULL,113,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(88,17,26,8,22.0,'2025-12-20T05:46:31.197Z',1,0,NULL,115,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(89,1,17,8,2940.0,'2025-12-20T15:09:16.076Z',1,0,NULL,117,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(90,17,26,8,64.0,'2025-12-20T21:38:45.891Z',1,0,NULL,119,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(91,17,26,10,60.0,'2025-12-20T21:39:35.232Z',1,0,NULL,121,NULL,'Fff',20.0,NULL,NULL,0); +INSERT INTO orders VALUES(92,15,25,8,42.0,'2025-12-22T05:12:52.301Z',1,0,NULL,123,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(93,15,25,12,220.0,'2025-12-22T05:22:59.518Z',1,0,NULL,125,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(94,15,25,17,140.0,'2025-12-22T08:12:49.911Z',1,0,NULL,127,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(95,15,25,8,152.0,'2025-12-22T08:40:14.765Z',1,0,NULL,129,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(96,20,30,8,70.0,'2025-12-22T09:05:51.054Z',1,0,NULL,131,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(97,2,20,10,220.0,'2025-12-23T00:47:34.830Z',1,0,NULL,133,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(98,2,20,8,44.0,'2025-12-23T00:47:34.830Z',1,0,NULL,134,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(99,2,20,8,1400.0,'2025-12-23T00:50:21.885Z',1,0,NULL,136,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(100,15,24,16,1000.0,'2025-12-23T08:23:28.094Z',1,0,NULL,138,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(101,17,26,8,42.0,'2025-12-23T11:45:50.591Z',1,0,NULL,140,NULL,'Hello',20.0,NULL,NULL,0); +INSERT INTO orders VALUES(102,17,26,8,92.0,'2025-12-23T11:49:14.841Z',1,0,NULL,142,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(103,22,31,16,120.0,'2025-12-23T21:09:04.114Z',1,0,NULL,144,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(104,22,31,8,2736.0,'2025-12-23T21:20:33.284Z',1,0,NULL,146,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(105,22,31,9,7700.0,'2025-12-23T21:20:33.284Z',1,0,NULL,147,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(106,15,24,8,92.0,'2025-12-24T05:02:01.957Z',1,0,NULL,149,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(107,15,24,17,140.0,'2025-12-24T05:02:01.957Z',1,0,NULL,150,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(108,15,24,10,100.0,'2025-12-24T05:02:01.957Z',1,0,NULL,151,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(109,15,24,16,120.0,'2025-12-24T05:02:01.957Z',1,0,NULL,152,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(110,1,17,16,64.0,'2025-12-25T07:48:48.478Z',1,0,NULL,154,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(111,1,17,16,444.0,'2025-12-25T10:06:02.108Z',1,0,NULL,156,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(112,1,17,18,20.0,'2025-12-25T10:06:02.108Z',1,0,NULL,157,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(113,1,17,16,350.0,'2025-12-25T10:32:45.526Z',1,0,NULL,159,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(114,16,32,16,92.0,'2025-12-26T19:38:17.686Z',1,0,NULL,161,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(115,1,17,16,236.0,'2025-12-26T23:02:15.299Z',1,0,NULL,163,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(116,1,17,18,560.0,'2025-12-26T23:02:15.299Z',1,0,NULL,164,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(117,2,20,16,128.41999999999997861,'2025-12-27T12:09:01.944Z',1,0,NULL,166,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(118,2,20,18,112.15999999999999303,'2025-12-27T12:09:01.944Z',1,0,NULL,167,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(119,2,20,17,65.419999999999998152,'2025-12-27T12:09:01.944Z',1,0,NULL,168,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(120,2,20,19,590.0,'2025-12-28T08:37:33.787Z',1,0,NULL,170,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(121,2,20,19,420.0,'2025-12-28T08:41:24.904Z',1,0,NULL,172,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(122,1,17,16,1614.0,'2025-12-28T22:17:14.213Z',1,0,NULL,174,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(123,2,20,20,485.0,'2026-01-01T03:08:22.110Z',1,0,NULL,176,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(124,2,20,20,230.0,'2026-01-01T03:09:11.420Z',1,0,NULL,178,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(125,2,20,21,551.58000000000004803,'2026-01-01T03:14:07.865Z',1,0,NULL,180,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(126,2,20,20,252.0,'2026-01-01T05:09:15.780Z',1,0,NULL,182,'Beside RR downtown in Yenugonda. around 1km away from the main road. ',NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(127,2,20,20,1130.0,'2026-01-01T06:40:15.182Z',1,0,NULL,184,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(128,26,34,20,420.0,'2026-01-03T02:42:48.013Z',1,0,NULL,186,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(129,2,20,20,1390.0,'2026-01-04T07:35:41.022Z',1,0,NULL,188,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(130,12,33,20,230.0,'2026-01-04T07:37:44.994Z',1,0,NULL,190,NULL,'Beside alo tower',20.0,NULL,NULL,0); +INSERT INTO orders VALUES(131,21,35,20,340.0,'2026-01-04T13:20:00.136Z',1,0,NULL,192,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(132,1,17,22,2790.0,'2026-01-06T07:21:22.047Z',1,0,NULL,194,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(133,30,36,22,780.0,'2026-01-06T07:45:52.275Z',1,0,NULL,196,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(134,21,35,22,2644.0,'2026-01-06T11:13:08.862Z',1,0,NULL,198,NULL,NULL,0.0,'1767717788828-21',1.0,0); +INSERT INTO orders VALUES(135,22,31,22,1700.0,'2026-01-07T09:32:56.404Z',1,0,NULL,200,NULL,NULL,0.0,'1767798176399-22',1.0,0); +INSERT INTO orders VALUES(136,22,31,22,1020.0,'2026-01-07T10:17:55.795Z',1,0,NULL,202,NULL,NULL,0.0,'1767800875792-22',1.0,0); +INSERT INTO orders VALUES(137,22,31,22,600.0,'2026-01-07T10:22:37.964Z',1,0,NULL,204,NULL,replace('Please call to my brother after reaching home.\nNumber is abcd8688y777','\n',char(10)),0.0,'1767801157960-22',1.0,0); +INSERT INTO orders VALUES(138,2,20,22,660.0,'2026-01-07T18:03:50.419Z',1,0,NULL,206,NULL,NULL,0.0,'1767828830413-2',1.0,0); +INSERT INTO orders VALUES(139,2,20,23,780.0,'2026-01-12T08:37:09.285Z',1,0,NULL,208,NULL,NULL,0.0,'1768226829276-2',1.0,0); +INSERT INTO orders VALUES(140,1,17,NULL,660.0,'2026-01-13T03:57:08.501Z',1,0,NULL,210,NULL,NULL,0.0,'1768296428205-1',1.0,1); +INSERT INTO orders VALUES(141,1,17,NULL,660.0,'2026-01-13T04:16:11.800Z',1,0,NULL,212,NULL,NULL,0.0,'1768297571530-1',1.0,1); +INSERT INTO orders VALUES(142,34,38,23,24.0,'2026-01-13T09:26:55.340Z',1,0,NULL,214,NULL,NULL,20.0,'1768316215336-34',1.0,0); +INSERT INTO orders VALUES(143,1,17,NULL,780.0,'2026-01-14T13:37:20.272Z',1,0,NULL,1,NULL,NULL,0.0,'1768417639897-1',1.0,1); +INSERT INTO orders VALUES(144,1,17,NULL,780.0,'2026-01-14T13:40:52.673Z',1,0,NULL,3,NULL,NULL,0.0,'1768417852308-1',1.0,1); +INSERT INTO orders VALUES(145,1,17,NULL,900.0,'2026-01-14T13:43:51.004Z',1,0,NULL,5,NULL,NULL,0.0,'1768418030542-1',1.0,1); +INSERT INTO orders VALUES(146,1,17,NULL,900.0,'2026-01-14T13:46:29.183Z',1,0,NULL,7,NULL,NULL,0.0,'1768418188748-1',1.0,1); +INSERT INTO orders VALUES(147,1,17,NULL,1020.0,'2026-01-14T13:48:47.459Z',1,0,NULL,9,NULL,NULL,0.0,'1768418327051-1',1.0,1); +INSERT INTO orders VALUES(148,1,17,23,2398.0,'2026-01-14T14:18:23.106Z',1,0,NULL,11,NULL,NULL,0.0,'1768420102803-1',1.0,0); +INSERT INTO orders VALUES(149,2,20,23,258.46000000000000085,'2026-01-15T10:38:51.399Z',1,0,NULL,13,NULL,NULL,0.0,'1768493331389-2',0.43079999999999998294,0); +INSERT INTO orders VALUES(150,2,20,31,341.53999999999999914,'2026-01-15T10:38:51.399Z',1,0,NULL,14,NULL,NULL,0.0,'1768493331389-2',0.56920000000000001705,0); +INSERT INTO orders VALUES(151,2,20,23,590.0,'2026-01-16T07:20:20.462Z',1,0,NULL,16,NULL,NULL,0.0,'1768567820452-2',1.0,0); +INSERT INTO orders VALUES(152,2,20,23,689.0,'2026-01-16T07:20:39.316Z',1,0,NULL,18,NULL,NULL,0.0,'1768567839309-2',1.0,0); +INSERT INTO orders VALUES(153,2,20,23,630.0,'2026-01-16T07:21:00.354Z',1,0,NULL,20,NULL,NULL,0.0,'1768567860348-2',1.0,0); +INSERT INTO orders VALUES(154,2,20,23,500.0,'2026-01-16T07:21:27.051Z',1,0,NULL,22,NULL,NULL,0.0,'1768567887044-2',1.0,0); +INSERT INTO orders VALUES(155,2,20,23,689.0,'2026-01-16T07:22:32.758Z',1,0,NULL,24,NULL,NULL,0.0,'1768567952750-2',1.0,0); +INSERT INTO orders VALUES(156,2,20,NULL,500.0,'2026-01-16T23:21:39.925Z',1,0,NULL,26,NULL,NULL,0.0,'1768625499917-2',1.0,1); +INSERT INTO orders VALUES(157,22,31,23,75.0,'2026-01-18T00:56:50.633Z',1,0,NULL,28,NULL,NULL,20.0,'1768717610629-22',1.0,0); +INSERT INTO orders VALUES(158,2,20,23,1534.0,'2026-01-18T03:02:03.729Z',1,0,NULL,30,NULL,NULL,0.0,'1768725123718-2',1.0,0); +INSERT INTO orders VALUES(159,22,37,23,1232.0,'2026-01-18T09:53:08.648Z',1,0,NULL,32,'Nothing just getting',NULL,0.0,'1768749788638-22',1.0,0); +INSERT INTO orders VALUES(160,22,31,23,132.0,'2026-01-18T10:14:06.341Z',1,0,NULL,34,'Testing admin notes','Call on 9199osisbushn',20.0,'1768751046336-22',1.0,0); +INSERT INTO orders VALUES(161,22,31,23,308.0,'2026-01-18T10:20:14.848Z',1,0,NULL,36,NULL,NULL,0.0,'1768751414843-22',1.0,0); +INSERT INTO orders VALUES(162,22,40,23,176.0,'2026-01-18T10:24:09.003Z',1,0,NULL,38,NULL,replace('Instructions no limit max limit low limit ui ux \nInstructions no limit max limit low limit ui ux \n\nInstructions no limit max limit low limit ui ux ','\n',char(10)),20.0,'1768751648997-22',1.0,0); +INSERT INTO orders VALUES(163,22,37,23,1743.0,'2026-01-18T21:46:46.398Z',1,0,NULL,40,NULL,NULL,0.0,'1768792606394-22',1.0,0); +INSERT INTO orders VALUES(164,1,17,23,304.0,'2026-01-19T14:17:52.639Z',1,0,NULL,42,NULL,NULL,0.0,'1768852072633-1',1.0,0); +INSERT INTO orders VALUES(165,2,20,40,820.0,'2026-01-23T03:22:03.840Z',1,0,NULL,44,NULL,NULL,0.0,'1769158323836-2',1.0,0); +INSERT INTO orders VALUES(166,25,43,35,49.0,'2026-01-23T10:37:42.952Z',1,0,NULL,46,NULL,NULL,20.0,'1769184462944-25',1.0,0); +INSERT INTO orders VALUES(167,2,20,39,643.0,'2026-01-24T02:56:06.720Z',1,0,NULL,48,NULL,NULL,0.0,'1769243166713-2',1.0,0); +INSERT INTO orders VALUES(168,1,17,39,2612.0,'2026-01-24T14:56:52.645Z',1,0,NULL,50,NULL,NULL,0.0,'1769286412630-1',1.0,0); +INSERT INTO orders VALUES(169,22,40,39,87.0,'2026-01-24T20:44:03.566Z',1,0,NULL,52,NULL,NULL,20.0,'1769307243555-22',1.0,0); +INSERT INTO orders VALUES(170,29,51,45,146.0,'2026-01-25T23:35:31.364Z',1,0,NULL,54,NULL,NULL,20.0,'1769403931353-29',1.0,0); +INSERT INTO orders VALUES(171,64,55,39,429.0,'2026-01-27T06:44:08.218Z',1,0,NULL,56,NULL,NULL,0.0,'1769516048207-64',1.0,0); +INSERT INTO orders VALUES(172,65,56,50,81.0,'2026-01-27T11:29:12.321Z',1,0,NULL,58,NULL,NULL,20.0,'1769533152305-65',0.64800000000000004263,0); +INSERT INTO orders VALUES(173,65,56,51,44.0,'2026-01-27T11:29:12.321Z',1,0,NULL,59,NULL,NULL,0.0,'1769533152305-65',0.35199999999999995736,0); +INSERT INTO orders VALUES(174,60,54,53,178.0,'2026-01-28T00:03:00.256Z',1,0,NULL,61,NULL,NULL,20.0,'1769578380246-60',1.0,0); +INSERT INTO orders VALUES(175,1,17,54,27.0,'2026-01-28T00:38:05.827Z',1,0,NULL,63,NULL,NULL,20.0,'1769580485819-1',0.1125,0); +INSERT INTO orders VALUES(176,1,17,53,213.0,'2026-01-28T00:38:05.827Z',1,0,NULL,64,NULL,NULL,0.0,'1769580485819-1',0.8875,0); +INSERT INTO orders VALUES(177,22,40,54,158.0,'2026-01-28T01:51:10.288Z',1,0,NULL,66,NULL,NULL,20.0,'1769584870283-22',0.76330000000000000071,0); +INSERT INTO orders VALUES(178,22,40,39,49.0,'2026-01-28T01:51:10.288Z',1,0,NULL,67,NULL,NULL,0.0,'1769584870283-22',0.23669999999999999928,0); +INSERT INTO orders VALUES(179,58,60,39,146.0,'2026-01-28T10:40:36.187Z',1,0,NULL,69,NULL,NULL,20.0,'1769616636177-58',1.0,0); +INSERT INTO orders VALUES(180,38,66,58,104.0,'2026-01-29T22:42:25.446Z',1,0,NULL,71,NULL,'Hi I''m inzamam come slowly ',20.0,'1769746345431-38',1.0,0); +INSERT INTO orders VALUES(181,1,17,59,17.0,'2026-01-30T00:31:02.610Z',1,0,NULL,73,NULL,NULL,10.0,'1769752862605-1',1.0,0); +INSERT INTO orders VALUES(182,38,66,59,49.0,'2026-01-30T00:46:59.261Z',1,0,NULL,75,NULL,NULL,10.0,'1769753819256-38',1.0,0); +INSERT INTO orders VALUES(183,1,17,60,42.0,'2026-01-30T01:42:25.118Z',1,0,NULL,77,NULL,NULL,10.0,'1769757144875-1',1.0,0); +INSERT INTO orders VALUES(184,38,66,60,179.0,'2026-01-30T03:13:07.360Z',1,0,NULL,79,NULL,NULL,0.0,'1769762587355-38',1.0,0); +INSERT INTO orders VALUES(185,54,57,66,77.0,'2026-01-31T01:44:10.735Z',1,0,NULL,81,NULL,'I needed it quickly',10.0,'1769843650726-54',1.0,0); +INSERT INTO orders VALUES(186,54,57,66,307.0,'2026-01-31T01:44:48.105Z',1,0,NULL,83,NULL,NULL,0.0,'1769843688098-54',1.0,0); +INSERT INTO orders VALUES(187,78,70,66,64.0,'2026-01-31T04:25:19.495Z',1,0,NULL,85,NULL,NULL,10.0,'1769853319488-78',1.0,0); +INSERT INTO orders VALUES(188,1,17,66,296.0,'2026-01-31T05:26:01.981Z',1,0,NULL,87,NULL,NULL,0.0,'1769856961704-1',1.0,0); +INSERT INTO orders VALUES(189,1,17,66,292.0,'2026-01-31T06:32:04.589Z',1,0,NULL,89,NULL,NULL,0.0,'1769860924583-1',1.0,0); +INSERT INTO orders VALUES(190,1,17,70,27.0,'2026-01-31T22:04:46.197Z',1,0,NULL,91,NULL,NULL,10.0,'1769916886192-1',1.0,0); +INSERT INTO orders VALUES(191,7,71,72,243.0,'2026-02-01T00:28:05.843Z',1,0,NULL,93,NULL,replace(' Half chest and half leg \n Pura chest piece ich mat lao bhai ....','\n',char(10)),0.0,'1769925485827-7',1.0,0); +INSERT INTO orders VALUES(192,74,73,72,420.0,'2026-02-01T01:31:50.642Z',1,0,NULL,95,NULL,NULL,0.0,'1769929310636-74',1.0,0); +INSERT INTO orders VALUES(193,74,73,72,269.0,'2026-02-01T01:56:14.147Z',1,0,NULL,97,NULL,NULL,0.0,'1769930774143-74',1.0,0); +INSERT INTO orders VALUES(194,38,66,71,999.0,'2026-02-01T02:19:04.918Z',1,0,NULL,99,NULL,NULL,0.0,'1769932144902-38',1.0,0); +INSERT INTO orders VALUES(195,22,50,71,119.0,'2026-02-01T03:22:19.400Z',1,0,NULL,101,NULL,NULL,10.0,'1769935939395-22',1.0,0); +INSERT INTO orders VALUES(196,82,72,72,179.0,'2026-02-01T04:41:15.161Z',1,0,NULL,103,NULL,NULL,0.0,'1769940675157-82',1.0,0); +INSERT INTO orders VALUES(197,82,72,72,448.0,'2026-02-01T04:46:41.872Z',1,0,NULL,105,NULL,NULL,0.0,'1769941001866-82',1.0,0); +INSERT INTO orders VALUES(202,88,83,76,135.0,'2026-02-01T10:07:16.233Z',1,0,NULL,115,NULL,NULL,0.0,'1769960236219-88',1.0,0); +INSERT INTO orders VALUES(203,92,86,79,49.0,'2026-02-02T04:53:54.970Z',1,0,NULL,117,NULL,NULL,10.0,'1770027834964-92',1.0,0); +INSERT INTO orders VALUES(204,38,66,79,79.0,'2026-02-02T06:48:31.456Z',1,0,NULL,119,NULL,NULL,10.0,'1770034711451-38',1.0,0); +INSERT INTO orders VALUES(205,38,66,79,79.0,'2026-02-02T06:50:24.727Z',1,0,NULL,121,NULL,NULL,10.0,'1770034824717-38',1.0,0); +INSERT INTO orders VALUES(206,7,71,83,770.0,'2026-02-02T08:27:54.149Z',1,0,NULL,123,NULL,NULL,0.0,'1770040674142-7',1.0,0); +INSERT INTO orders VALUES(207,1,17,81,369.0,'2026-02-02T09:01:16.193Z',1,0,NULL,125,NULL,NULL,0.0,'1770042676188-1',1.0,0); +INSERT INTO orders VALUES(208,1,17,81,378.0,'2026-02-02T12:53:25.021Z',1,0,NULL,127,NULL,NULL,0.0,'1770056605014-1',1.0,0); +INSERT INTO orders VALUES(209,38,66,83,412.19999999999998863,'2026-02-02T22:40:01.666Z',1,0,NULL,129,NULL,NULL,0.0,'1770091801642-38',1.0,0); +INSERT INTO orders VALUES(210,98,91,84,210.0,'2026-02-03T00:26:45.500Z',1,0,NULL,131,NULL,NULL,0.0,'1770098205495-98',1.0,0); +INSERT INTO orders VALUES(211,98,91,84,94.0,'2026-02-03T00:28:30.230Z',1,0,NULL,133,NULL,NULL,10.0,'1770098310221-98',1.0,0); +INSERT INTO orders VALUES(212,24,92,87,419.0,'2026-02-03T03:11:48.475Z',1,0,NULL,135,NULL,NULL,0.0,'1770108108470-24',1.0,0); +INSERT INTO orders VALUES(213,46,93,86,88.0,'2026-02-03T07:33:13.302Z',1,0,NULL,137,NULL,replace('Gol masjid Sr garden \n1flore\n','\n',char(10)),10.0,'1770123793291-46',1.0,0); +INSERT INTO orders VALUES(214,38,66,88,98.0,'2026-02-03T08:40:49.538Z',1,0,NULL,139,NULL,NULL,10.0,'1770127849534-38',1.0,0); +INSERT INTO orders VALUES(215,38,66,89,248.39999999999999857,'2026-02-03T08:43:00.789Z',1,0,NULL,141,NULL,NULL,0.0,'1770127980775-38',1.0,0); +INSERT INTO orders VALUES(216,81,94,88,386.0,'2026-02-03T10:16:16.915Z',1,0,NULL,143,NULL,NULL,0.0,'1770133576898-81',1.0,0); +INSERT INTO orders VALUES(217,96,95,92,301.50000000000001243,'2026-02-04T01:36:25.133Z',1,0,NULL,145,NULL,NULL,0.0,'1770188785117-96',1.0,0); +INSERT INTO orders VALUES(218,81,94,92,401.39999999999993463,'2026-02-04T02:41:07.508Z',1,0,NULL,147,NULL,NULL,0.0,'1770192667485-81',1.0,0); +INSERT INTO orders VALUES(219,1,17,94,109.0,'2026-02-04T07:47:53.067Z',1,0,NULL,149,NULL,NULL,10.0,'1770211073063-1',1.0,0); +INSERT INTO orders VALUES(220,103,96,99,158.0,'2026-02-05T03:15:53.554Z',1,0,NULL,151,NULL,NULL,0.0,'1770281153546-103',1.0,0); +INSERT INTO orders VALUES(221,24,92,100,235.80000000000000959,'2026-02-05T04:00:30.739Z',1,0,NULL,153,NULL,NULL,0.0,'1770283830726-24',1.0,0); +INSERT INTO orders VALUES(222,114,103,106,97.0,'2026-02-06T05:49:57.315Z',1,0,NULL,155,NULL,NULL,10.0,'1770376797308-114',1.0,0); +INSERT INTO orders VALUES(223,1,17,106,97.0,'2026-02-06T06:21:43.659Z',1,0,NULL,157,NULL,NULL,10.0,'1770378703652-1',1.0,0); +INSERT INTO orders VALUES(224,71,104,106,149.0,'2026-02-06T06:25:36.038Z',1,0,NULL,159,NULL,NULL,0.0,'1770378936033-71',1.0,0); +INSERT INTO orders VALUES(225,1,17,111,108.0,'2026-02-06T08:53:10.229Z',1,0,NULL,-1,NULL,NULL,10.0,'1770387790223-1',1.0,0); +INSERT INTO orders VALUES(226,115,105,113,110.74999999999999289,'2026-02-06T10:26:39.531Z',1,0,NULL,-1,NULL,NULL,0.0,'1770393399507-115',0.24500000000000001776,0); +INSERT INTO orders VALUES(227,115,105,112,341.25000000000000888,'2026-02-06T10:26:39.531Z',1,0,NULL,-1,NULL,NULL,0.0,'1770393399507-115',0.75499999999999998223,0); +INSERT INTO orders VALUES(228,115,105,113,180.0,'2026-02-06T16:16:47.346Z',1,0,NULL,-1,NULL,NULL,0.0,'1770414407330-115',1.0,0); +INSERT INTO orders VALUES(229,109,101,111,127.0,'2026-02-06T23:01:13.646Z',1,0,NULL,-1,NULL,NULL,0.0,'1770438673632-109',1.0,0); +INSERT INTO orders VALUES(230,103,96,111,167.40000000000001989,'2026-02-06T23:28:37.545Z',1,0,NULL,-1,NULL,NULL,0.0,'1770440317529-103',1.0,0); +INSERT INTO orders VALUES(231,103,96,111,213.30000000000000071,'2026-02-06T23:36:55.424Z',1,0,NULL,-1,NULL,NULL,0.0,'1770440815414-103',1.0,0); +INSERT INTO orders VALUES(232,119,107,115,219.0,'2026-02-07T07:06:17.096Z',1,0,NULL,-1,NULL,NULL,0.0,'1770467777091-119',1.0,0); +INSERT INTO orders VALUES(233,38,66,115,219.0,'2026-02-07T07:24:42.810Z',1,0,NULL,-1,NULL,NULL,0.0,'1770468882806-38',1.0,0); +INSERT INTO orders VALUES(234,38,66,115,219.0,'2026-02-07T07:25:52.698Z',1,0,NULL,-1,NULL,NULL,0.0,'1770468952694-38',1.0,0); +INSERT INTO orders VALUES(235,120,108,118,377.10000000000003517,'2026-02-07T23:11:07.297Z',1,0,NULL,-1,NULL,NULL,0.0,'1770525667289-120',1.0,0); +INSERT INTO orders VALUES(236,98,91,118,149.0,'2026-02-07T23:43:00.160Z',1,0,NULL,-1,NULL,NULL,10.0,'1770527580152-98',1.0,0); +INSERT INTO orders VALUES(237,38,66,118,148.0,'2026-02-07T23:58:12.863Z',1,0,NULL,-1,NULL,NULL,10.0,'1770528492859-38',1.0,0); +INSERT INTO orders VALUES(238,121,109,119,106.0,'2026-02-08T00:48:23.089Z',1,0,NULL,-1,NULL,NULL,10.0,'1770531503085-121',1.0,0); +INSERT INTO orders VALUES(239,121,109,119,106.0,'2026-02-08T00:55:15.154Z',1,0,NULL,-1,NULL,NULL,10.0,'1770531915149-121',1.0,0); +INSERT INTO orders VALUES(240,121,109,NULL,170.0,'2026-02-08T04:28:56.405Z',1,0,NULL,-1,NULL,NULL,10.0,'1770544736398-121',1.0,1); +INSERT INTO orders VALUES(241,121,109,NULL,170.0,'2026-02-08T04:29:20.307Z',1,0,NULL,-1,NULL,NULL,10.0,'1770544760296-121',1.0,1); +INSERT INTO orders VALUES(242,121,109,121,37.0,'2026-02-08T04:29:55.364Z',1,0,NULL,-1,NULL,NULL,10.0,'1770544795359-121',1.0,0); +INSERT INTO orders VALUES(243,121,109,NULL,60.0,'2026-02-08T04:30:37.777Z',1,0,NULL,-1,NULL,NULL,10.0,'1770544837770-121',1.0,1); +INSERT INTO orders VALUES(244,121,109,121,389.0,'2026-02-08T04:32:20.374Z',1,0,NULL,-1,NULL,NULL,0.0,'1770544940368-121',1.0,0); +INSERT INTO orders VALUES(245,121,109,121,980.0,'2026-02-08T04:33:59.746Z',1,0,NULL,-1,NULL,NULL,0.0,'1770545039741-121',1.0,0); +INSERT INTO orders VALUES(246,12,33,121,149.0,'2026-02-08T05:09:24.720Z',1,0,NULL,-1,NULL,NULL,10.0,'1770547164704-12',1.0,0); +INSERT INTO orders VALUES(247,2,20,127,159.0,'2026-02-09T01:52:55.524Z',1,0,NULL,-1,NULL,NULL,10.0,'1770621775517-2',1.0,0); +INSERT INTO orders VALUES(248,125,112,129,188.0,'2026-02-09T07:56:42.048Z',1,0,NULL,-1,NULL,NULL,0.0,'1770643602042-125',1.0,0); +INSERT INTO orders VALUES(249,3,16,135,119.0,'2026-02-10T06:04:04.471Z',1,0,NULL,-1,NULL,NULL,10.0,'1770723244466-3',1.0,0); +INSERT INTO orders VALUES(250,2,20,139,1277.0,'2026-02-10T21:59:33.763Z',1,0,NULL,-1,NULL,NULL,0.0,'1770780573747-2',1.0,0); +INSERT INTO orders VALUES(251,115,105,145,110.0,'2026-02-11T16:13:20.142Z',1,0,NULL,-1,NULL,NULL,0.0,'1770846200125-115',0.32840000000000002522,0); +INSERT INTO orders VALUES(252,115,105,144,107.0,'2026-02-11T16:13:20.142Z',1,0,NULL,-1,NULL,NULL,0.0,'1770846200125-115',0.31939999999999999502,0); +INSERT INTO orders VALUES(253,115,105,147,118.0,'2026-02-11T16:13:20.142Z',1,0,NULL,-1,NULL,NULL,0.0,'1770846200125-115',0.35220000000000002415,0); +INSERT INTO orders VALUES(254,114,114,158,145.0,'2026-02-14T01:01:13.769Z',1,0,NULL,-1,NULL,replace('Rb palace \n','\n',char(10)),10.0,'1771050673757-114',1.0,0); +INSERT INTO orders VALUES(255,120,108,165,419.0,'2026-02-15T00:00:53.358Z',1,0,NULL,-1,NULL,'Can you deliver it now pls its urgent',0.0,'1771133453347-120',1.0,0); +INSERT INTO orders VALUES(256,2,20,173,377.10000000000003517,'2026-02-16T01:21:48.050Z',1,0,NULL,-1,NULL,NULL,0.0,'1771224708041-2',1.0,0); +INSERT INTO orders VALUES(257,134,116,173,377.10000000000003517,'2026-02-16T04:14:55.522Z',1,0,NULL,-1,NULL,'Come faster ',0.0,'1771235095508-134',1.0,0); +INSERT INTO orders VALUES(258,134,116,174,74.0,'2026-02-16T04:22:00.592Z',1,0,NULL,-1,NULL,NULL,15.0,'1771235520588-134',1.0,0); +INSERT INTO orders VALUES(259,120,108,179,413.10000000000002273,'2026-02-17T00:44:27.971Z',1,0,NULL,-1,NULL,NULL,0.0,'1771308867959-120',1.0,0); +INSERT INTO orders VALUES(260,1,17,NULL,380.0,'2026-02-17T07:16:27.421Z',1,0,NULL,-1,NULL,NULL,0.0,'1771332387411-1',1.0,1); +INSERT INTO orders VALUES(261,136,117,182,130.0,'2026-02-17T07:30:07.521Z',1,0,NULL,-1,NULL,NULL,12.0,'1771333207516-136',1.0,0); +INSERT INTO orders VALUES(262,136,117,182,67.0,'2026-02-17T07:45:43.734Z',1,0,NULL,-1,NULL,NULL,12.0,'1771334143729-136',1.0,0); +INSERT INTO orders VALUES(263,3,16,NULL,162.0,'2026-02-17T07:52:41.197Z',1,0,NULL,-1,NULL,NULL,12.0,'1771334561185-3',1.0,1); +INSERT INTO orders VALUES(264,141,120,184,423.0,'2026-02-17T19:47:31.551Z',1,0,NULL,-1,NULL,NULL,0.0,'1771377451545-141',1.0,0); +INSERT INTO orders VALUES(265,143,121,185,130.0,'2026-02-17T22:56:42.974Z',1,0,NULL,-1,NULL,'Employees colony colony ',12.0,'1771388802969-143',1.0,0); +INSERT INTO orders VALUES(266,143,121,185,110.0,'2026-02-17T23:04:14.592Z',1,0,NULL,-1,NULL,NULL,12.0,'1771389254586-143',1.0,0); +INSERT INTO orders VALUES(267,130,122,186,305.0,'2026-02-17T23:27:35.908Z',1,0,NULL,-1,NULL,NULL,0.0,'1771390655900-130',1.0,0); +INSERT INTO orders VALUES(268,132,123,186,429.0,'2026-02-18T00:28:16.181Z',1,0,NULL,-1,NULL,NULL,0.0,'1771394296177-132',1.0,0); +INSERT INTO orders VALUES(269,119,107,187,396.0,'2026-02-18T01:34:08.441Z',1,0,NULL,-1,NULL,NULL,0.0,'1771398248436-119',1.0,0); +INSERT INTO orders VALUES(270,119,107,NULL,230.0,'2026-02-18T02:04:32.495Z',1,0,NULL,-1,NULL,NULL,0.0,'1771400072481-119',1.0,1); +INSERT INTO orders VALUES(271,145,124,187,381.60000000000003694,'2026-02-18T03:46:31.297Z',1,0,NULL,-1,NULL,NULL,0.0,'1771406191279-145',1.0,0); +INSERT INTO orders VALUES(272,138,125,188,71.0,'2026-02-18T05:15:38.160Z',1,0,NULL,-1,NULL,NULL,12.0,'1771411538154-138',1.0,0); +INSERT INTO orders VALUES(273,138,125,188,71.0,'2026-02-18T05:15:38.161Z',1,0,NULL,-1,NULL,NULL,12.0,'1771411538155-138',1.0,0); +INSERT INTO orders VALUES(274,147,126,NULL,555.0,'2026-02-18T05:15:59.580Z',1,0,NULL,-1,NULL,NULL,0.0,'1771411559572-147',1.0,1); +INSERT INTO orders VALUES(275,24,92,188,223.0,'2026-02-18T06:53:25.416Z',1,0,NULL,-1,NULL,NULL,0.0,'1771417405404-24',1.0,0); +INSERT INTO orders VALUES(276,82,72,189,506.0,'2026-02-18T07:16:24.911Z',1,0,NULL,-1,NULL,NULL,0.0,'1771418784904-82',1.0,0); +INSERT INTO orders VALUES(277,148,127,189,388.0,'2026-02-18T07:31:33.186Z',1,0,NULL,-1,NULL,NULL,0.0,'1771419693158-148',1.0,0); +INSERT INTO orders VALUES(278,38,66,192,396.0,'2026-02-18T23:12:20.428Z',1,0,NULL,-1,NULL,'Come slowly and drive slowly ',0.0,'1771476140424-38',1.0,0); +INSERT INTO orders VALUES(279,156,131,192,419.0,'2026-02-19T00:00:57.733Z',1,0,NULL,-1,NULL,NULL,0.0,'1771479057729-156',1.0,0); +INSERT INTO orders VALUES(280,99,132,194,170.0,'2026-02-19T01:04:09.663Z',1,0,NULL,-1,NULL,NULL,12.0,'1771482849644-99',1.0,0); +INSERT INTO orders VALUES(281,82,72,194,583.0,'2026-02-19T01:57:57.613Z',1,0,NULL,-1,NULL,NULL,0.0,'1771486077606-82',1.0,0); +INSERT INTO orders VALUES(282,82,72,194,110.0,'2026-02-19T01:59:43.093Z',1,0,NULL,-1,NULL,NULL,12.0,'1771486183088-82',1.0,0); +INSERT INTO orders VALUES(283,66,58,194,216.0,'2026-02-19T02:16:07.844Z',1,0,NULL,-1,NULL,NULL,0.0,'1771487167839-66',1.0,0); +INSERT INTO orders VALUES(284,120,108,194,202.0,'2026-02-19T03:09:55.456Z',1,0,NULL,-1,NULL,NULL,0.0,'1771490395448-120',1.0,0); +INSERT INTO orders VALUES(285,159,133,194,371.0,'2026-02-19T03:40:51.549Z',1,0,NULL,-1,NULL,NULL,0.0,'1771492251530-159',1.0,0); +INSERT INTO orders VALUES(286,160,134,194,255.0,'2026-02-19T03:49:55.745Z',1,0,NULL,-1,NULL,NULL,0.0,'1771492795724-160',1.0,0); +INSERT INTO orders VALUES(287,64,55,194,114.0,'2026-02-19T03:54:05.397Z',1,0,NULL,-1,NULL,NULL,0.0,'1771493045384-64',0.6,0); +INSERT INTO orders VALUES(288,64,55,196,76.0,'2026-02-19T03:54:05.397Z',1,0,NULL,-1,NULL,NULL,0.0,'1771493045384-64',0.4,0); +INSERT INTO orders VALUES(289,160,134,197,41.0,'2026-02-19T04:00:41.001Z',1,0,NULL,-1,NULL,NULL,12.0,'1771493440990-160',1.0,0); +INSERT INTO orders VALUES(290,151,135,197,387.0,'2026-02-19T04:09:35.859Z',1,0,NULL,-1,NULL,NULL,0.0,'1771493975853-151',1.0,0); +INSERT INTO orders VALUES(291,4,136,195,559.0,'2026-02-19T04:16:50.189Z',1,0,NULL,-1,NULL,NULL,0.0,'1771494410183-4',1.0,0); +INSERT INTO orders VALUES(292,162,137,197,110.0,'2026-02-19T05:08:36.439Z',1,0,NULL,-1,NULL,NULL,12.0,'1771497516435-162',1.0,0); +INSERT INTO orders VALUES(293,162,137,197,110.0,'2026-02-19T05:08:36.736Z',1,0,NULL,-1,NULL,NULL,12.0,'1771497516732-162',1.0,0); +INSERT INTO orders VALUES(294,32,138,195,110.0,'2026-02-19T06:14:11.047Z',1,0,NULL,-1,NULL,NULL,12.0,'1771501451044-32',1.0,0); +INSERT INTO orders VALUES(295,163,139,195,236.0,'2026-02-19T06:49:34.891Z',1,0,NULL,-1,NULL,NULL,0.0,'1771503574888-163',1.0,0); +INSERT INTO orders VALUES(296,38,66,200,819.0,'2026-02-19T12:38:24.984Z',1,0,NULL,-1,NULL,NULL,0.0,'1771524504980-38',1.0,0); +INSERT INTO orders VALUES(297,82,72,201,307.0,'2026-02-19T15:48:55.517Z',1,0,NULL,-1,NULL,NULL,0.0,'1771535935502-82',1.0,0); +INSERT INTO orders VALUES(298,66,58,204,85.0,'2026-02-20T01:39:04.912Z',1,0,NULL,-1,NULL,replace('Employee''s colony road no 3 \nmahabubnagar 9618791714','\n',char(10)),12.0,'1771571344901-66',1.0,0); +INSERT INTO orders VALUES(299,66,58,204,165.0,'2026-02-20T02:41:56.608Z',1,0,NULL,-1,NULL,NULL,12.0,'1771575116599-66',1.0,0); +INSERT INTO orders VALUES(300,140,119,204,238.0,'2026-02-20T03:24:43.556Z',1,0,NULL,-1,NULL,NULL,0.0,'1771577683547-140',1.0,0); +INSERT INTO orders VALUES(301,169,142,204,1116.0,'2026-02-20T03:37:43.245Z',1,0,NULL,-1,NULL,NULL,0.0,'1771578463205-169',1.0,0); +INSERT INTO orders VALUES(302,170,144,204,189.0,'2026-02-20T03:59:51.171Z',1,0,NULL,-1,NULL,NULL,0.0,'1771579791166-170',1.0,0); +INSERT INTO orders VALUES(303,170,144,207,197.0,'2026-02-20T04:04:04.909Z',1,0,NULL,-1,NULL,NULL,0.0,'1771580044903-170',1.0,0); +INSERT INTO orders VALUES(304,132,123,207,494.0,'2026-02-20T04:47:12.538Z',1,0,NULL,-1,NULL,NULL,0.0,'1771582632531-132',1.0,0); +INSERT INTO orders VALUES(305,176,145,206,295.0,'2026-02-20T06:02:01.579Z',1,0,NULL,-1,NULL,NULL,0.0,'1771587121570-176',1.0,0); +INSERT INTO orders VALUES(306,99,132,206,294.0,'2026-02-20T06:41:12.043Z',1,0,NULL,-1,NULL,NULL,0.0,'1771589472035-99',1.0,0); +INSERT INTO orders VALUES(307,163,146,NULL,236.0,'2026-02-20T07:21:21.906Z',1,0,NULL,-1,NULL,NULL,0.0,'1771591881894-163',1.0,1); +INSERT INTO orders VALUES(308,74,73,208,429.0,'2026-02-20T07:41:37.350Z',1,0,NULL,-1,NULL,NULL,0.0,'1771593097346-74',1.0,0); +INSERT INTO orders VALUES(309,115,105,NULL,624.0,'2026-02-20T09:08:15.335Z',1,0,NULL,-1,NULL,NULL,0.0,'1771598295290-115',1.0,1); +INSERT INTO orders VALUES(310,38,66,208,419.0,'2026-02-20T13:06:33.249Z',1,0,NULL,-1,NULL,'Bheje lalo bhaiya 3',0.0,'1771612593245-38',1.0,0); +INSERT INTO orders VALUES(311,184,148,211,364.0,'2026-02-20T22:50:10.927Z',1,0,NULL,-1,NULL,NULL,0.0,'1771647610908-184',1.0,0); +INSERT INTO orders VALUES(312,81,94,212,550.0,'2026-02-21T03:19:33.169Z',1,0,NULL,-1,NULL,NULL,0.0,'1771663773148-81',1.0,0); +INSERT INTO orders VALUES(313,24,92,212,223.0,'2026-02-21T03:33:25.012Z',1,0,NULL,-1,NULL,NULL,0.0,'1771664605006-24',1.0,0); +INSERT INTO orders VALUES(314,186,149,214,137.0,'2026-02-21T03:45:19.764Z',1,0,NULL,-1,NULL,NULL,12.0,'1771665319759-186',1.0,0); +INSERT INTO orders VALUES(315,160,134,213,109.0,'2026-02-21T04:36:43.124Z',1,0,NULL,-1,NULL,NULL,12.0,'1771668403117-160',1.0,0); +INSERT INTO orders VALUES(316,160,134,213,138.0,'2026-02-21T04:40:27.736Z',1,0,NULL,-1,NULL,NULL,12.0,'1771668627722-160',1.0,0); +INSERT INTO orders VALUES(317,32,138,NULL,161.0,'2026-02-21T06:23:19.310Z',1,0,NULL,-1,NULL,NULL,12.0,'1771674799304-32',1.0,1); +INSERT INTO orders VALUES(318,7,71,217,1566.0,'2026-02-21T12:32:34.307Z',1,0,NULL,-1,NULL,replace('Boti me chikna kam karo \nBoti ke pooray parts rehna dekho bhai \nExcept tilli\n\nMutton zara acha lalo \nBone quantity kam kar ke ','\n',char(10)),0.0,'1771696954291-7',1.0,0); +INSERT INTO orders VALUES(319,141,120,219,166.50000000000000355,'2026-02-21T19:42:40.619Z',1,0,NULL,-1,NULL,NULL,0.0,'1771722760597-141',0.5027000000000000135,0); +INSERT INTO orders VALUES(320,141,120,218,164.69999999999997974,'2026-02-21T19:42:40.619Z',1,0,NULL,-1,NULL,NULL,0.0,'1771722760597-141',0.49729999999999998649,0); +INSERT INTO orders VALUES(321,120,108,218,377.10000000000003517,'2026-02-21T22:34:37.439Z',1,0,NULL,-1,NULL,NULL,0.0,'1771733077431-120',1.0,0); +INSERT INTO orders VALUES(322,193,153,218,386.10000000000002984,'2026-02-21T22:53:17.760Z',1,0,NULL,-1,NULL,NULL,0.0,'1771734197748-193',1.0,0); +INSERT INTO orders VALUES(323,132,123,218,583.0,'2026-02-21T23:09:55.795Z',1,0,NULL,-1,NULL,NULL,0.0,'1771735195777-132',1.0,0); +INSERT INTO orders VALUES(324,130,122,218,490.0,'2026-02-21T23:38:18.540Z',1,0,NULL,-1,NULL,NULL,0.0,'1771736898523-130',1.0,0); +INSERT INTO orders VALUES(325,194,154,219,232.0,'2026-02-22T00:16:21.567Z',1,0,NULL,-1,NULL,NULL,0.0,'1771739181558-194',1.0,0); +INSERT INTO orders VALUES(326,198,158,220,323.0,'2026-02-22T01:08:52.833Z',1,0,NULL,-1,NULL,NULL,0.0,'1771742332826-198',1.0,0); +INSERT INTO orders VALUES(327,184,148,221,201.0,'2026-02-22T01:13:15.958Z',1,0,NULL,-1,NULL,NULL,0.0,'1771742595948-184',0.80400000000000009237,0); +INSERT INTO orders VALUES(328,184,148,220,49.0,'2026-02-22T01:13:15.958Z',1,0,NULL,-1,NULL,NULL,0.0,'1771742595948-184',0.19599999999999999644,0); +INSERT INTO orders VALUES(329,205,161,222,272.0,'2026-02-22T03:46:06.235Z',1,0,NULL,-1,NULL,NULL,0.0,'1771751766217-205',1.0,0); +INSERT INTO orders VALUES(330,206,162,221,40.0,'2026-02-22T04:21:41.707Z',1,0,NULL,-1,NULL,NULL,12.0,'1771753901703-206',1.0,0); +INSERT INTO orders VALUES(331,208,163,221,166.0,'2026-02-22T04:39:37.484Z',1,0,NULL,-1,NULL,NULL,12.0,'1771754977472-208',1.0,0); +INSERT INTO orders VALUES(332,50,167,224,315.0,'2026-02-22T14:05:39.863Z',1,0,NULL,-1,NULL,NULL,0.0,'1771788939856-50',1.0,0); +INSERT INTO orders VALUES(333,151,135,227,136.0,'2026-02-23T03:21:16.555Z',1,0,NULL,-1,NULL,NULL,12.0,'1771836676538-151',1.0,0); +INSERT INTO orders VALUES(334,223,168,227,373.49999999999998756,'2026-02-23T03:47:30.738Z',1,0,NULL,-1,NULL,NULL,0.0,'1771838250710-223',1.0,0); +INSERT INTO orders VALUES(335,224,169,228,471.0,'2026-02-23T04:40:46.728Z',1,0,NULL,-1,NULL,NULL,0.0,'1771841446722-224',1.0,0); +INSERT INTO orders VALUES(336,224,169,228,295.0,'2026-02-23T04:44:00.644Z',1,0,NULL,-1,NULL,NULL,0.0,'1771841640635-224',1.0,0); +INSERT INTO orders VALUES(337,224,169,227,69.0,'2026-02-23T04:45:56.017Z',1,0,NULL,-1,NULL,NULL,12.0,'1771841756009-224',1.0,0); +INSERT INTO orders VALUES(338,38,66,229,250.0,'2026-02-23T05:51:07.943Z',1,0,NULL,-1,NULL,'Plz bring fast please jaldi lalo thoda',0.0,'1771845667938-38',1.0,0); +INSERT INTO orders VALUES(339,225,170,229,138.0,'2026-02-23T06:46:04.203Z',1,0,NULL,-1,NULL,NULL,12.0,'1771848964196-225',1.0,0); +INSERT INTO orders VALUES(340,228,172,232,261.0,'2026-02-23T22:40:33.438Z',1,0,NULL,-1,NULL,'Back side alis mart beside lane last lane ,opp children''s park ground floor house ',0.0,'1771906233428-228',1.0,0); +INSERT INTO orders VALUES(341,230,174,235,250.0,'2026-02-24T01:44:30.406Z',1,0,NULL,-1,NULL,NULL,0.0,'1771917270395-230',1.0,0); +INSERT INTO orders VALUES(342,229,173,NULL,737.0,'2026-02-24T01:46:05.872Z',1,0,NULL,-1,NULL,NULL,0.0,'1771917365846-229',1.0,1); +INSERT INTO orders VALUES(343,224,169,227,169.0,'2026-02-24T02:52:22.431Z',1,0,NULL,-1,NULL,NULL,12.0,'1771921342425-224',1.0,0); +INSERT INTO orders VALUES(344,158,176,236,186.0,'2026-02-24T04:15:41.683Z',1,0,NULL,-1,NULL,NULL,12.0,'1771926341678-158',1.0,0); +INSERT INTO orders VALUES(345,3,16,NULL,399.0,'2026-02-24T05:47:59.572Z',1,0,NULL,-1,NULL,NULL,0.0,'1771931879550-3',1.0,1); +INSERT INTO orders VALUES(346,149,130,236,181.0,'2026-02-24T07:17:54.419Z',1,0,NULL,-1,NULL,NULL,0.0,'1771937274400-149',1.0,0); +INSERT INTO orders VALUES(347,50,45,238,281.0,'2026-02-24T12:55:21.432Z',1,0,NULL,-1,NULL,'If I don''t attend the call please call to this number 86888065996',0.0,'1771957521407-50',1.0,0); +INSERT INTO orders VALUES(348,132,123,242,429.0,'2026-02-25T02:47:44.024Z',1,0,NULL,-1,NULL,NULL,0.0,'1772007464014-132',1.0,0); +INSERT INTO orders VALUES(381,1,17,NULL,395.0,'2026-02-26T11:24:06.998Z',1,0,NULL,-1,NULL,NULL,0.0,'1772124844672-1',1.0,1); +INSERT INTO orders VALUES(382,1,17,NULL,187.0,'2026-02-26T11:30:33.419Z',1,0,NULL,-1,NULL,NULL,0.0,'1772125229922-1',1.0,1); +INSERT INTO orders VALUES(383,1,17,NULL,164.0,'2026-02-26T11:34:03.543Z',1,0,NULL,-1,NULL,NULL,45.0,'1772125441817-1',1.0,1); +INSERT INTO orders VALUES(384,1,17,NULL,444.0,'2026-02-26T11:36:20.560Z',1,0,NULL,-1,NULL,NULL,45.0,'1772125578199-1',1.0,1); +INSERT INTO orders VALUES(385,1,17,279,344.0,'2026-03-09T10:16:59.219Z',1,0,NULL,-1,NULL,NULL,0.0,'1773071219214-1',1.0,0); +INSERT INTO orders VALUES(386,1,17,286,51.0,'2026-03-26T01:19:29.108Z',1,0,NULL,-1,NULL,NULL,12.0,'1774507768653-1',1.0,0); +CREATE TABLE IF NOT EXISTS "payment_info" ("id" INTEGER PRIMARY KEY, "status" TEXT NOT NULL, "gateway" TEXT NOT NULL, "order_id" TEXT, "token" TEXT, "merchant_order_id" TEXT NOT NULL, "payload" TEXT); +INSERT INTO payment_info VALUES(1,'pending','phonepe',NULL,NULL,'order_1763563896010',NULL); +INSERT INTO payment_info VALUES(2,'pending','phonepe',NULL,NULL,'order_1763564910006',NULL); +INSERT INTO payment_info VALUES(3,'pending','phonepe',NULL,NULL,'order_1763572580304',NULL); +INSERT INTO payment_info VALUES(4,'pending','phonepe',NULL,NULL,'order_1763572653144',NULL); +INSERT INTO payment_info VALUES(5,'pending','phonepe',NULL,NULL,'order_1763573268603',NULL); +INSERT INTO payment_info VALUES(6,'pending','phonepe',NULL,NULL,'order_1763574232471',NULL); +INSERT INTO payment_info VALUES(7,'pending','phonepe',NULL,NULL,'order_1763574306269',NULL); +INSERT INTO payment_info VALUES(8,'pending','phonepe',NULL,NULL,'order_1763574482764',NULL); +INSERT INTO payment_info VALUES(9,'pending','phonepe',NULL,NULL,'order_1763574799918',NULL); +INSERT INTO payment_info VALUES(10,'pending','phonepe',NULL,NULL,'order_1763575339097',NULL); +INSERT INTO payment_info VALUES(11,'pending','phonepe',NULL,NULL,'order_1763575464896',NULL); +INSERT INTO payment_info VALUES(12,'pending','phonepe',NULL,NULL,'order_1763575602750',NULL); +INSERT INTO payment_info VALUES(13,'pending','phonepe',NULL,NULL,'order_1763575768505',NULL); +INSERT INTO payment_info VALUES(14,'pending','phonepe',NULL,NULL,'order_1763666849104',NULL); +INSERT INTO payment_info VALUES(15,'pending','phonepe',NULL,NULL,'order_1763666905893',NULL); +INSERT INTO payment_info VALUES(16,'pending','phonepe',NULL,NULL,'order_1763666973849',NULL); +INSERT INTO payment_info VALUES(17,'pending','phonepe',NULL,NULL,'order_1763871426295',NULL); +INSERT INTO payment_info VALUES(18,'pending','phonepe',NULL,NULL,'order_1763898477055',NULL); +INSERT INTO payment_info VALUES(19,'pending','phonepe',NULL,NULL,'order_1763983667789',NULL); +INSERT INTO payment_info VALUES(20,'pending','phonepe',NULL,NULL,'order_1764067952957',NULL); +INSERT INTO payment_info VALUES(21,'pending','phonepe',NULL,NULL,'order_1764243205881',NULL); +INSERT INTO payment_info VALUES(22,'pending','phonepe',NULL,NULL,'order_1764388266634',NULL); +INSERT INTO payment_info VALUES(23,'pending','phonepe',NULL,NULL,'order_1764388497092',NULL); +INSERT INTO payment_info VALUES(24,'pending','phonepe',NULL,NULL,'order_1764389081742',NULL); +INSERT INTO payment_info VALUES(25,'pending','phonepe',NULL,NULL,'order_1764389210771',NULL); +INSERT INTO payment_info VALUES(26,'pending','phonepe',NULL,NULL,'order_1764390498471',NULL); +INSERT INTO payment_info VALUES(27,'pending','phonepe',NULL,NULL,'order_1764391183329',NULL); +INSERT INTO payment_info VALUES(28,'pending','phonepe',NULL,NULL,'order_1764391279780',NULL); +INSERT INTO payment_info VALUES(29,'pending','phonepe',NULL,NULL,'order_1764391675769',NULL); +INSERT INTO payment_info VALUES(30,'pending','phonepe',NULL,NULL,'order_1764391943478',NULL); +INSERT INTO payment_info VALUES(31,'pending','phonepe',NULL,NULL,'order_1764392006085',NULL); +INSERT INTO payment_info VALUES(32,'pending','razorpay',NULL,NULL,'order_1764392514440',NULL); +INSERT INTO payment_info VALUES(33,'pending','razorpay',NULL,NULL,'order_1764392606452',NULL); +INSERT INTO payment_info VALUES(34,'pending','razorpay',NULL,NULL,'order_1764392717827',NULL); +INSERT INTO payment_info VALUES(35,'pending','razorpay',NULL,NULL,'order_1764393153653',NULL); +INSERT INTO payment_info VALUES(36,'pending','razorpay',NULL,NULL,'order_1764396332043',NULL); +INSERT INTO payment_info VALUES(37,'pending','phonepe',NULL,NULL,'order_1764397057662',NULL); +INSERT INTO payment_info VALUES(38,'pending','razorpay',NULL,NULL,'order_1764397317408',NULL); +INSERT INTO payment_info VALUES(39,'pending','razorpay',NULL,NULL,'order_1764398178092',NULL); +INSERT INTO payment_info VALUES(40,'pending','razorpay',NULL,NULL,'order_1764400222682',NULL); +INSERT INTO payment_info VALUES(41,'pending','razorpay',NULL,NULL,'order_1764400862503',NULL); +INSERT INTO payment_info VALUES(42,'pending','razorpay',NULL,NULL,'order_1764401267896',NULL); +INSERT INTO payment_info VALUES(43,'pending','razorpay',NULL,NULL,'order_1764405067997',NULL); +INSERT INTO payment_info VALUES(44,'pending','razorpay',NULL,NULL,'order_1765380758868',NULL); +INSERT INTO payment_info VALUES(45,'pending','razorpay',NULL,NULL,'order_1765380872212',NULL); +INSERT INTO payment_info VALUES(46,'pending','razorpay',NULL,NULL,'multi_order_1765645204515',NULL); +INSERT INTO payment_info VALUES(47,'pending','razorpay',NULL,NULL,'multi_order_1765645272415',NULL); +CREATE TABLE IF NOT EXISTS "payments" ("id" INTEGER PRIMARY KEY, "order_id" INTEGER NOT NULL, "status" TEXT NOT NULL, "gateway" TEXT NOT NULL, "token" TEXT, "merchant_order_id" TEXT NOT NULL, "payload" TEXT); +INSERT INTO payments VALUES(1,1,'success','razorpay','1','order_RhdccfyUTkxlH4','{"id":"order_RhdccfyUTkxlH4","notes":{"customerOrderId":"1"},"amount":4400,"entity":"order","status":"created","receipt":"order_1","attempts":0,"currency":"INR","offer_id":null,"signature":"b767a4fdda78476999d21bb7e1cfa72a938e21d592870bd6873ea1bc33336da5","amount_due":4400,"created_at":1763563898,"payment_id":"pay_RheSGc35HYPRPH","amount_paid":0}'); +INSERT INTO payments VALUES(2,2,'pending','razorpay','2','order_RhduSaAJIuFBzZ','{"id":"order_RhduSaAJIuFBzZ","notes":{"customerOrderId":"2"},"amount":22000,"entity":"order","status":"created","receipt":"order_2","attempts":0,"currency":"INR","offer_id":null,"amount_due":22000,"created_at":1763564911,"amount_paid":0}'); +INSERT INTO payments VALUES(3,3,'pending','razorpay','3','order_Rhg5W23p2znoMY','{"id":"order_Rhg5W23p2znoMY","notes":{"customerOrderId":"3"},"amount":22000,"entity":"order","status":"created","receipt":"order_3","attempts":0,"currency":"INR","offer_id":null,"amount_due":22000,"created_at":1763572582,"amount_paid":0}'); +INSERT INTO payments VALUES(4,4,'pending','razorpay','4','order_Rhg6mh3BUvamRb','{"id":"order_Rhg6mh3BUvamRb","notes":{"customerOrderId":"4"},"amount":43000,"entity":"order","status":"created","receipt":"order_4","attempts":0,"currency":"INR","offer_id":null,"amount_due":43000,"created_at":1763572654,"amount_paid":0}'); +INSERT INTO payments VALUES(5,5,'failed','razorpay','5','order_RhgHdO0tN2ze09','{"id":"order_RhgHdO0tN2ze09","notes":{"customerOrderId":"5"},"amount":70000,"entity":"order","status":"created","receipt":"order_5","attempts":0,"currency":"INR","offer_id":null,"amount_due":70000,"created_at":1763573270,"amount_paid":0}'); +INSERT INTO payments VALUES(6,6,'pending','razorpay','6','order_RhgYaSCauk0Q2K','{"id":"order_RhgYaSCauk0Q2K","notes":{"customerOrderId":"6"},"amount":2200,"entity":"order","status":"created","receipt":"order_6","attempts":0,"currency":"INR","offer_id":null,"amount_due":2200,"created_at":1763574233,"amount_paid":0}'); +INSERT INTO payments VALUES(7,7,'pending','razorpay','7','order_RhgZsq1zxjncFX','{"id":"order_RhgZsq1zxjncFX","notes":{"customerOrderId":"7"},"amount":2200,"entity":"order","status":"created","receipt":"order_7","attempts":0,"currency":"INR","offer_id":null,"amount_due":2200,"created_at":1763574307,"amount_paid":0}'); +INSERT INTO payments VALUES(8,8,'pending','razorpay','8','order_Rhgczd7LM2RlaP','{"id":"order_Rhgczd7LM2RlaP","notes":{"customerOrderId":"8"},"amount":2200,"entity":"order","status":"created","receipt":"order_8","attempts":0,"currency":"INR","offer_id":null,"amount_due":2200,"created_at":1763574483,"amount_paid":0}'); +INSERT INTO payments VALUES(9,9,'pending','razorpay','9','order_RhgiZalLiVPuH8','{"id":"order_RhgiZalLiVPuH8","notes":{"customerOrderId":"9"},"amount":50000,"entity":"order","status":"created","receipt":"order_9","attempts":0,"currency":"INR","offer_id":null,"amount_due":50000,"created_at":1763574800,"amount_paid":0}'); +INSERT INTO payments VALUES(10,11,'pending','razorpay','11','order_Rhgs4FOJ0LP3Ey','{"id":"order_Rhgs4FOJ0LP3Ey","notes":{"customerOrderId":"11"},"amount":4400,"entity":"order","status":"created","receipt":"order_11","attempts":0,"currency":"INR","offer_id":null,"amount_due":4400,"created_at":1763575340,"amount_paid":0}'); +INSERT INTO payments VALUES(11,12,'failed','razorpay','12','order_RhguHTMNkOdUwp','{"id":"order_RhguHTMNkOdUwp","notes":{"customerOrderId":"12"},"amount":22000,"entity":"order","status":"created","receipt":"order_12","attempts":0,"currency":"INR","offer_id":null,"amount_due":22000,"created_at":1763575465,"amount_paid":0}'); +INSERT INTO payments VALUES(12,13,'pending','razorpay','13','order_RhgwhwZZdjweOR','{"id":"order_RhgwhwZZdjweOR","notes":{"customerOrderId":"13"},"amount":2200,"entity":"order","status":"created","receipt":"order_13","attempts":0,"currency":"INR","offer_id":null,"amount_due":2200,"created_at":1763575603,"amount_paid":0}'); +INSERT INTO payments VALUES(13,14,'failed','razorpay','14','order_RhgzcqerOQNs98','{"id":"order_RhgzcqerOQNs98","notes":{"customerOrderId":"14"},"amount":21000,"entity":"order","status":"created","receipt":"order_14","attempts":0,"currency":"INR","offer_id":null,"amount_due":21000,"created_at":1763575769,"amount_paid":0}'); +INSERT INTO payments VALUES(14,14,'success','razorpay','14','order_Rhh00qJNdjUp8o','{"id":"order_Rhh00qJNdjUp8o","notes":{"retry":"true","customerOrderId":"14"},"amount":21000,"entity":"order","status":"created","receipt":"order_14_retry","attempts":0,"currency":"INR","offer_id":null,"signature":"6df20655021f1d6841340f2a2ef2ef9378cb3d43495ab09e85f08aea1a851583","amount_due":21000,"created_at":1763575791,"payment_id":"pay_Rhh15cLL28YM7j","amount_paid":0}'); +INSERT INTO payments VALUES(15,12,'success','razorpay','12','order_Rhh1R5ViTgI0Zs','{"id":"order_Rhh1R5ViTgI0Zs","notes":{"retry":"true","customerOrderId":"12"},"amount":22000,"entity":"order","status":"created","receipt":"order_12_retry","attempts":0,"currency":"INR","offer_id":null,"signature":"bef3958fa069c43b61801c1f16edf8372835a324e17bc2448f8ec6a28a8eb7f4","amount_due":22000,"created_at":1763575872,"payment_id":"pay_Rhh1qKLJknk3n4","amount_paid":0}'); +INSERT INTO payments VALUES(16,5,'pending','razorpay','5','order_Rhh2UWeTun3fju','{"id":"order_Rhh2UWeTun3fju","notes":{"retry":"true","customerOrderId":"5"},"amount":70000,"entity":"order","status":"created","receipt":"order_5_retry","attempts":0,"currency":"INR","offer_id":null,"amount_due":70000,"created_at":1763575932,"amount_paid":0}'); +INSERT INTO payments VALUES(17,15,'failed','razorpay','15','order_Ri6rB90w7pYBr9','{"id":"order_Ri6rB90w7pYBr9","notes":{"customerOrderId":"15"},"amount":70000,"entity":"order","status":"created","receipt":"order_15","attempts":0,"currency":"INR","offer_id":null,"amount_due":70000,"created_at":1763666851,"amount_paid":0}'); +INSERT INTO payments VALUES(18,16,'failed','razorpay','16','order_Ri6sAWser4nop7','{"id":"order_Ri6sAWser4nop7","notes":{"customerOrderId":"16"},"amount":70000,"entity":"order","status":"created","receipt":"order_16","attempts":0,"currency":"INR","offer_id":null,"amount_due":70000,"created_at":1763666907,"amount_paid":0}'); +INSERT INTO payments VALUES(19,17,'failed','razorpay','17','order_Ri6tMMIZdzeqis','{"id":"order_Ri6tMMIZdzeqis","notes":{"customerOrderId":"17"},"amount":21000,"entity":"order","status":"created","receipt":"order_17","attempts":0,"currency":"INR","offer_id":null,"amount_due":21000,"created_at":1763666975,"amount_paid":0}'); +INSERT INTO payments VALUES(20,17,'failed','razorpay','17','order_Ri6tQL1UNaANTQ','{"id":"order_Ri6tQL1UNaANTQ","notes":{"customerOrderId":"17"},"amount":21000,"entity":"order","status":"created","receipt":"order_17","attempts":0,"currency":"INR","offer_id":null,"amount_due":21000,"created_at":1763666979,"amount_paid":0}'); +INSERT INTO payments VALUES(21,17,'failed','razorpay','17','order_Ri6tVB8hDRO076','{"id":"order_Ri6tVB8hDRO076","notes":{"customerOrderId":"17"},"amount":21000,"entity":"order","status":"created","receipt":"order_17","attempts":0,"currency":"INR","offer_id":null,"amount_due":21000,"created_at":1763666983,"amount_paid":0}'); +INSERT INTO payments VALUES(22,19,'failed','razorpay','19','order_Rj2wr3MPXGMjHS','{"id":"order_Rj2wr3MPXGMjHS","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1763871427,"amount_paid":0}'); +INSERT INTO payments VALUES(23,21,'success','razorpay','21','order_RjAd65gFHGAF4g','{"id":"order_RjAd65gFHGAF4g","notes":{"customerOrderId":"21"},"amount":72200,"entity":"order","status":"created","receipt":"order_21","attempts":0,"currency":"INR","offer_id":null,"signature":"7f4ec6ff7361e0f2a5e0a27d409506fee107402f84d0c4ad86767d84fb6e75d0","amount_due":72200,"created_at":1763898478,"payment_id":"pay_RjAe9Zb7Si4j4o","amount_paid":0}'); +INSERT INTO payments VALUES(24,23,'success','razorpay','23','order_RjYovXkkXeehgQ','{"id":"order_RjYovXkkXeehgQ","notes":{"customerOrderId":"23"},"amount":22000,"entity":"order","status":"created","receipt":"order_23","attempts":0,"currency":"INR","offer_id":null,"signature":"099541f6002cc931b300141af765c194c016f07d89717c962667a743b8694c21","amount_due":22000,"created_at":1763983669,"payment_id":"pay_RjYtSlsBMHg07p","amount_paid":0}'); +INSERT INTO payments VALUES(25,25,'success','razorpay','25','order_Rjwkoef4xrIElJ','{"id":"order_Rjwkoef4xrIElJ","notes":{"customerOrderId":"25"},"amount":456000,"entity":"order","status":"created","receipt":"order_25","attempts":0,"currency":"INR","offer_id":null,"signature":"7c17e6edf771b124218cdc4ecaa4957bf4410c39a70d38e0c5610266e36aeb2c","amount_due":456000,"created_at":1764067954,"payment_id":"pay_RjwmIVh7dXngbZ","amount_paid":0}'); +INSERT INTO payments VALUES(26,26,'success','razorpay','26','order_RkkWFDKoRb26Wl','{"id":"order_RkkWFDKoRb26Wl","notes":{"customerOrderId":"26"},"amount":970240,"entity":"order","status":"created","receipt":"order_26","attempts":0,"currency":"INR","offer_id":null,"signature":"dfd2a9b63673d6fc1293c7206a14907a699d0da094c8e8a483cfaa75f76447fc","amount_due":970240,"created_at":1764243207,"payment_id":"pay_RkkWqcVVg01uW6","amount_paid":0}'); +INSERT INTO payments VALUES(27,30,'success','razorpay','30','order_RlPi7QaPW4b8Gw','{"id":"order_RlPi7QaPW4b8Gw","notes":{"customerOrderId":"30"},"amount":187000,"entity":"order","status":"created","receipt":"order_30","attempts":0,"currency":"INR","offer_id":null,"signature":"5e42cb3791ed3fb19b4d13f4c8a21f30de1f74ec5e0babf31510bb4249edd483","amount_due":187000,"created_at":1764388268,"payment_id":"pay_RlPjeb1hpjBIt6","amount_paid":0}'); +INSERT INTO payments VALUES(28,31,'failed','razorpay','31','order_RlPmA6xXh1YRDc','{"id":"order_RlPmA6xXh1YRDc","notes":{"customerOrderId":"31"},"amount":187000,"entity":"order","status":"created","receipt":"order_31","attempts":0,"currency":"INR","offer_id":null,"amount_due":187000,"created_at":1764388497,"amount_paid":0}'); +INSERT INTO payments VALUES(29,32,'failed','razorpay','32','order_RlPwSYB4XqfQB7','{"id":"order_RlPwSYB4XqfQB7","notes":{"customerOrderId":"32"},"amount":149600,"entity":"order","status":"created","receipt":"order_32","attempts":0,"currency":"INR","offer_id":null,"amount_due":149600,"created_at":1764389082,"amount_paid":0}'); +INSERT INTO payments VALUES(30,33,'success','razorpay','33','order_RlPyjETea6ty73','{"id":"order_RlPyjETea6ty73","notes":{"customerOrderId":"33"},"amount":56000,"entity":"order","status":"created","receipt":"order_33","attempts":0,"currency":"INR","offer_id":null,"signature":"e72f5ca9b95f1837861b5efc2f2289f9f556c908ba2a19cf85e1d545980eee7c","amount_due":56000,"created_at":1764389211,"payment_id":"pay_RlPzYBu93IT0Vi","amount_paid":0}'); +INSERT INTO payments VALUES(31,35,'failed','razorpay','35','order_RlQLPUSRDheMYA','{"id":"order_RlQLPUSRDheMYA","notes":{"customerOrderId":"35"},"amount":112000,"entity":"order","status":"created","receipt":"order_35","attempts":0,"currency":"INR","offer_id":null,"amount_due":112000,"created_at":1764390499,"amount_paid":0}'); +INSERT INTO payments VALUES(32,37,'failed','razorpay','37','order_RlQXT2rr7csMdO','{"id":"order_RlQXT2rr7csMdO","notes":{"customerOrderId":"37"},"amount":231000,"entity":"order","status":"created","receipt":"order_37","attempts":0,"currency":"INR","offer_id":null,"amount_due":231000,"created_at":1764391184,"amount_paid":0}'); +INSERT INTO payments VALUES(33,38,'failed','razorpay','38','order_RlQZ9Z4bHiEctz','{"id":"order_RlQZ9Z4bHiEctz","notes":{"customerOrderId":"38"},"amount":162000,"entity":"order","status":"created","receipt":"order_38","attempts":0,"currency":"INR","offer_id":null,"amount_due":162000,"created_at":1764391280,"amount_paid":0}'); +INSERT INTO payments VALUES(34,40,'failed','razorpay','40','order_RlQg7pdyZk07ev','{"id":"order_RlQg7pdyZk07ev","notes":{"customerOrderId":"40"},"amount":132000,"entity":"order","status":"created","receipt":"order_40","attempts":0,"currency":"INR","offer_id":null,"amount_due":132000,"created_at":1764391676,"amount_paid":0}'); +INSERT INTO payments VALUES(35,41,'pending','razorpay','41','order_RlQkq8lYf2blRm','{"id":"order_RlQkq8lYf2blRm","notes":{"customerOrderId":"41"},"amount":132000,"entity":"order","status":"created","receipt":"order_41","attempts":0,"currency":"INR","offer_id":null,"amount_due":132000,"created_at":1764391944,"amount_paid":0}'); +INSERT INTO payments VALUES(36,42,'pending','razorpay','42','order_RlQlwOKfGfD8Ew','{"id":"order_RlQlwOKfGfD8Ew","notes":{"customerOrderId":"42"},"amount":37600,"entity":"order","status":"created","receipt":"order_42","attempts":0,"currency":"INR","offer_id":null,"amount_due":37600,"created_at":1764392006,"amount_paid":0}'); +INSERT INTO payments VALUES(37,43,'pending','razorpay','43','order_RlQuu1EUfczKPN','{"id":"order_RlQuu1EUfczKPN","notes":{"customerOrderId":"43"},"amount":146400,"entity":"order","status":"created","receipt":"order_43","attempts":0,"currency":"INR","offer_id":null,"amount_due":146400,"created_at":1764392515,"amount_paid":0}'); +INSERT INTO payments VALUES(38,44,'pending','razorpay','44','order_RlQwWNsgADgxDz','{"id":"order_RlQwWNsgADgxDz","notes":{"customerOrderId":"44"},"amount":146400,"entity":"order","status":"created","receipt":"order_44","attempts":0,"currency":"INR","offer_id":null,"amount_due":146400,"created_at":1764392607,"amount_paid":0}'); +INSERT INTO payments VALUES(39,45,'pending','razorpay','45','order_RlQyTsabL2V16b','{"id":"order_RlQyTsabL2V16b","notes":{"customerOrderId":"45"},"amount":149600,"entity":"order","status":"created","receipt":"order_45","attempts":0,"currency":"INR","offer_id":null,"amount_due":149600,"created_at":1764392719,"amount_paid":0}'); +INSERT INTO payments VALUES(40,46,'pending','razorpay','46','order_RlR69lcxwqstb6','{"id":"order_RlR69lcxwqstb6","notes":{"customerOrderId":"46"},"amount":690400,"entity":"order","status":"created","receipt":"order_46","attempts":0,"currency":"INR","offer_id":null,"amount_due":690400,"created_at":1764393155,"amount_paid":0}'); +INSERT INTO payments VALUES(41,47,'pending','razorpay','47','order_RlS07mRZPryR3t','{"id":"order_RlS07mRZPryR3t","notes":{"customerOrderId":"47"},"amount":75200,"entity":"order","status":"created","receipt":"order_47","attempts":0,"currency":"INR","offer_id":null,"amount_due":75200,"created_at":1764396334,"amount_paid":0}'); +INSERT INTO payments VALUES(42,48,'failed','razorpay','48','order_RlSCsTHyNKuOhn','{"id":"order_RlSCsTHyNKuOhn","notes":{"customerOrderId":"48"},"amount":112200,"entity":"order","status":"created","receipt":"order_48","attempts":0,"currency":"INR","offer_id":null,"amount_due":112200,"created_at":1764397058,"amount_paid":0}'); +INSERT INTO payments VALUES(43,49,'success','razorpay','49','order_RlSHRuwHdMoUye','{"id":"order_RlSHRuwHdMoUye","notes":{"customerOrderId":"49"},"amount":315600,"entity":"order","status":"created","receipt":"order_49","attempts":0,"currency":"INR","offer_id":null,"signature":"7822497f6f5c8894b139e0565223a2d3c6fb5df298a4998f9979efbe474d24e6","amount_due":315600,"created_at":1764397318,"payment_id":"pay_RlSHwidHn91jay","amount_paid":0}'); +INSERT INTO payments VALUES(44,50,'success','razorpay','50','order_RlSWc4NJJ69f7V','{"id":"order_RlSWc4NJJ69f7V","notes":{"customerOrderId":"50"},"amount":468600,"entity":"order","status":"created","receipt":"order_50","attempts":0,"currency":"INR","offer_id":null,"signature":"839a9f6ccf1306ca400587567b80ef8865972855657e228126dfabecd65866e7","amount_due":468600,"created_at":1764398179,"payment_id":"pay_RlSX31RGtluYVh","amount_paid":0}'); +INSERT INTO payments VALUES(45,51,'success','razorpay','51','order_RlT6bwRhArlEkf','{"id":"order_RlT6bwRhArlEkf","notes":{"customerOrderId":"51"},"amount":25000,"entity":"order","status":"created","receipt":"order_51","attempts":0,"currency":"INR","offer_id":null,"signature":"59150ddcdd04d841a95e7e3a7d3f209b267e46ecfe2cf91b85c96eb977f9b026","amount_due":25000,"created_at":1764400224,"payment_id":"pay_RlT7JjVCrxXRHC","amount_paid":0}'); +INSERT INTO payments VALUES(46,52,'success','razorpay','52','order_RlTHrPLnw2EujN','{"id":"order_RlTHrPLnw2EujN","notes":{"customerOrderId":"52"},"amount":25000,"entity":"order","status":"created","receipt":"order_52","attempts":0,"currency":"INR","offer_id":null,"signature":"45d931069bf90287f48010decf24a9eba589909069ecb184f0bc8311105cb673","amount_due":25000,"created_at":1764400863,"payment_id":"pay_RlTIbvllphqQnW","amount_paid":0}'); +INSERT INTO payments VALUES(47,53,'success','razorpay','53','order_RlTOzxz8DaDOwf','{"id":"order_RlTOzxz8DaDOwf","notes":{"customerOrderId":"53"},"amount":40000,"entity":"order","status":"created","receipt":"order_53","attempts":0,"currency":"INR","offer_id":null,"signature":"5452ac1b6535e0348ff7f91eee9d597856cf32a9ec64dfc467e7d2b53e8fef95","amount_due":40000,"created_at":1764401268,"payment_id":"pay_RlTPeKJPkdLz7Z","amount_paid":0}'); +INSERT INTO payments VALUES(48,54,'success','razorpay','54','order_RlUTuqAZzfNeUv','{"id":"order_RlUTuqAZzfNeUv","notes":{"customerOrderId":"54"},"amount":285000,"entity":"order","status":"created","receipt":"order_54","attempts":0,"currency":"INR","offer_id":null,"signature":"724b5c2ca061a38dd2a8d21c43a2f7caf246936d628961d9739bbea1edffc4bd","amount_due":285000,"created_at":1764405069,"payment_id":"pay_RlUUaZfFUQu0bw","amount_paid":0}'); +INSERT INTO payments VALUES(49,19,'pending','razorpay','19','order_RpVxTzSti5nJlk','{"id":"order_RpVxTzSti5nJlk","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1765283630,"amount_paid":0}'); +INSERT INTO payments VALUES(50,19,'pending','razorpay','19','order_RpVxUPtLxk2htm','{"id":"order_RpVxUPtLxk2htm","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1765283631,"amount_paid":0}'); +INSERT INTO payments VALUES(51,56,'success','razorpay','56','order_RpxXVYjAZ9hKRs','{"id":"order_RpxXVYjAZ9hKRs","notes":{"customerOrderId":"56"},"amount":6400,"entity":"order","status":"created","receipt":"order_56","attempts":0,"currency":"INR","offer_id":null,"signature":"a0bf4ed36bfc2f29c3744374450dcfc516f7d59493102959fc2acb03d1bf09ab","amount_due":6400,"created_at":1765380760,"payment_id":"pay_RpxYgEbuw15e12","amount_paid":0}'); +INSERT INTO payments VALUES(52,57,'failed','razorpay','57','order_RpxZTOWJFF0sor','{"id":"order_RpxZTOWJFF0sor","notes":{"customerOrderId":"57"},"amount":7200,"entity":"order","status":"created","receipt":"order_57","attempts":0,"currency":"INR","offer_id":null,"amount_due":7200,"created_at":1765380872,"amount_paid":0}'); +INSERT INTO payments VALUES(53,57,'pending','razorpay','57','order_RpxaFYaBBoE3xA','{"id":"order_RpxaFYaBBoE3xA","notes":{"customerOrderId":"57"},"amount":7200,"entity":"order","status":"created","receipt":"order_57","attempts":0,"currency":"INR","offer_id":null,"amount_due":7200,"created_at":1765380916,"amount_paid":0}'); +INSERT INTO payments VALUES(54,46,'pending','razorpay','46','order_RrAdEPX05BXXGH','{"id":"order_RrAdEPX05BXXGH","notes":{"customerOrderId":"46"},"amount":112000,"entity":"order","status":"created","receipt":"order_46","attempts":0,"currency":"INR","offer_id":null,"amount_due":112000,"created_at":1765645206,"amount_paid":0}'); +INSERT INTO payments VALUES(55,63,'failed','razorpay','63','order_RrAdG1zzVqBNBX','{"id":"order_RrAdG1zzVqBNBX","notes":{"customerOrderId":"63"},"amount":112000,"entity":"order","status":"created","receipt":"order_63","attempts":0,"currency":"INR","offer_id":null,"amount_due":112000,"created_at":1765645208,"amount_paid":0}'); +INSERT INTO payments VALUES(56,47,'pending','razorpay','47','order_RrAePs61Rzlajz','{"id":"order_RrAePs61Rzlajz","notes":{"customerOrderId":"47"},"amount":112000,"entity":"order","status":"created","receipt":"order_47","attempts":0,"currency":"INR","offer_id":null,"amount_due":112000,"created_at":1765645274,"amount_paid":0}'); +INSERT INTO payments VALUES(57,64,'failed','razorpay','64','order_RrAeRKPcgCqCH5','{"id":"order_RrAeRKPcgCqCH5","notes":{"customerOrderId":"64"},"amount":42000,"entity":"order","status":"created","receipt":"order_64","attempts":0,"currency":"INR","offer_id":null,"amount_due":42000,"created_at":1765645275,"amount_paid":0}'); +INSERT INTO payments VALUES(58,64,'failed','razorpay','64','order_RrAeVlINAOaLMi','{"id":"order_RrAeVlINAOaLMi","notes":{"customerOrderId":"64"},"amount":42000,"entity":"order","status":"created","receipt":"order_64","attempts":0,"currency":"INR","offer_id":null,"amount_due":42000,"created_at":1765645279,"amount_paid":0}'); +INSERT INTO payments VALUES(59,19,'pending','razorpay','19','order_Rx3m1bvIbeGnQy','{"id":"order_Rx3m1bvIbeGnQy","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1766931095,"amount_paid":0}'); +INSERT INTO payments VALUES(60,19,'pending','razorpay','19','order_Rx3m23b4jndeAR','{"id":"order_Rx3m23b4jndeAR","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1766931096,"amount_paid":0}'); +INSERT INTO payments VALUES(61,19,'pending','razorpay','19','order_Rx3m2DF1gpeu8L','{"id":"order_Rx3m2DF1gpeu8L","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1766931096,"amount_paid":0}'); +CREATE TABLE IF NOT EXISTS "product_availability_schedules" ("id" INTEGER PRIMARY KEY, "time" TEXT NOT NULL, "schedule_name" TEXT NOT NULL, "action" TEXT NOT NULL, "product_ids" TEXT NOT NULL DEFAULT '[]', "group_ids" TEXT NOT NULL DEFAULT '[]', "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "last_updated" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO product_availability_schedules VALUES(1,'22:00','Demo schedule','in','[9,83,81,75,82,22,102,6,14,35,86,4,99,98]','[9,7]','2026-03-19T08:25:27.311Z','2026-03-19T08:25:27.311Z'); +INSERT INTO product_availability_schedules VALUES(3,'00:22','Test4','in','[50]','[]','2026-03-19T13:20:01.972Z','2026-03-19T13:20:01.972Z'); +INSERT INTO product_availability_schedules VALUES(4,'12:00','Mutton off','out','[6,14,35,86,4,99,98]','[7]','2026-03-20T11:27:20.629Z','2026-03-20T11:27:20.629Z'); +CREATE TABLE IF NOT EXISTS "product_categories" ("id" INTEGER PRIMARY KEY, "name" TEXT NOT NULL, "description" TEXT); +CREATE TABLE IF NOT EXISTS "product_group_info" ("id" INTEGER PRIMARY KEY, "group_name" TEXT NOT NULL, "description" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO product_group_info VALUES(1,'Vegetables','All Market Vegetables','2025-12-31T22:12:45.110Z'); +INSERT INTO product_group_info VALUES(2,'Chicken Items','All Chicken Items','2025-12-31T22:13:41.539Z'); +INSERT INTO product_group_info VALUES(3,'Fruits','All Fruits','2025-12-31T22:15:13.138Z'); +INSERT INTO product_group_info VALUES(5,'All Chicken items ','All chicken items only ','2026-01-25T08:24:51.769Z'); +INSERT INTO product_group_info VALUES(7,'All mutton items','All mutton items ','2026-01-25T08:32:15.938Z'); +INSERT INTO product_group_info VALUES(8,'All vegetables items ','All vegetables items ','2026-01-25T08:35:03.380Z'); +INSERT INTO product_group_info VALUES(9,'All fish ','All fish ','2026-01-25T08:57:31.702Z'); +INSERT INTO product_group_info VALUES(10,'All fruits items ','','2026-01-30T09:39:13.561Z'); +CREATE TABLE IF NOT EXISTS "product_group_membership" ("product_id" INTEGER NOT NULL, "group_id" INTEGER NOT NULL, "added_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO product_group_membership VALUES(1,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(2,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(2,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(3,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(3,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(4,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(5,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(6,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(6,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(6,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(6,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(7,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(7,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(8,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(8,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(9,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(10,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(10,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(11,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(11,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(13,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(13,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(13,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(14,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(15,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(16,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(17,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(17,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(18,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(18,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(19,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(19,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(21,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(21,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(22,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(23,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(23,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(24,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(24,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(25,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(25,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(26,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(26,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(27,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(27,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(28,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(28,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(29,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(29,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(30,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(30,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(31,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(31,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(32,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(32,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(33,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(33,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(34,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(35,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(36,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(36,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(37,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(37,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(38,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(38,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(39,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(39,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(40,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(41,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(42,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(43,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(43,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(44,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(44,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(45,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(46,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(46,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(47,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(47,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(48,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(49,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(49,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(50,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(50,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(51,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(51,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(52,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(52,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(53,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(53,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(54,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(54,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(55,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(55,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(56,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(56,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(57,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(57,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(58,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(58,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(59,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(59,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(60,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(60,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(61,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(61,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(62,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(62,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(63,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(63,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(64,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(65,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(66,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(67,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(68,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(69,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(70,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(71,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(72,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(73,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(73,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(74,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(75,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(76,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(77,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(78,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(79,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(80,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(81,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(82,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(83,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(86,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(88,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(89,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(90,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(91,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(92,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(94,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(95,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(96,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(96,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(97,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(98,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(99,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(100,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(100,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(101,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(102,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(103,8,'2026-02-23T03:23:13.305Z'); +CREATE TABLE IF NOT EXISTS "product_info" ("id" INTEGER PRIMARY KEY, "name" TEXT NOT NULL, "short_description" TEXT, "long_description" TEXT, "unit_id" INTEGER NOT NULL, "price" REAL NOT NULL, "images" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "is_out_of_stock" INTEGER NOT NULL DEFAULT false, "market_price" REAL, "store_id" INTEGER, "is_suspended" INTEGER NOT NULL DEFAULT false, "increment_step" REAL NOT NULL DEFAULT 1, "is_flash_available" INTEGER NOT NULL DEFAULT false, "flash_price" REAL, "product_quantity" REAL NOT NULL DEFAULT 1, "scheduled_availability" INTEGER NOT NULL DEFAULT true); +INSERT INTO product_info VALUES(1,'Chicken Liver','Liver sourced from the farm hens.',replace('Bring home the deep, hearty taste of fresh Chicken Liver, sourced from healthy, farm-raised chickens. Each piece is carefully cleaned and handled with care to retain its natural richness, smooth texture, and vibrant color.\n\nPerfect for making creamy pâtés, spicy fry dishes, gravies, or traditional home-style recipes, our chicken liver delivers authentic flavor and exceptional freshness in every bite.','\n',char(10)),1,99.0,'["product-images/1768478127128-0","product-images/1768478472220-0"]','2025-11-18T08:06:27.505Z',0,110.0,1,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(2,'Chicken Breast 500 g','Farm Chicken Breast uncut and solid.',replace('Experience the rich taste of fresh, premium-quality chicken sourced directly from trusted farms. Each bird is carefully cleaned, processed hygienically, and delivered chilled to preserve its natural flavor, tenderness, and juiciness.\n\nWhether you''re preparing a hearty curry, roasting for a family meal, or grilling for a weekend cookout, our whole chicken offers consistent texture, rich aroma, and superior taste in every bite.','\n',char(10)),1,198.0,'["product-images/1768397780093-0","product-images/1768479562478-0"]','2025-11-18T08:32:49.003Z',0,220.0,1,0,1.0,1,230.0,0.5,1); +INSERT INTO product_info VALUES(3,'Chicken Lollipops','Chicken cut for lollipop starter dish',replace('Turn any meal into a celebration with our premium Chicken Lollipop Cuts, expertly carved from fresh chicken drumettes and wings. Each piece is shaped cleanly into the classic “lollipop” form—perfect for frying, grilling, or tossing in your favorite tangy sauces.\n\nEnjoy the ideal balance of meatiness, tenderness, and crunch potential, making it a must-have for home chefs, party hosts, and spice lovers alike.','\n',char(10)),1,76.0,'["product-images/1768475599800-0"]','2025-11-18T08:56:07.106Z',1,89.0,1,0,1.0,0,120.0,0.25,1); +INSERT INTO product_info VALUES(4,'Mutton','Fresh, tender mutton cut from quality goat meat, cleaned and prepared hygienically for rich taste and authentic curries.',replace('Our mutton is sourced from healthy, quality goats and cut fresh to ensure natural flavor and tenderness. Each piece is carefully cleaned and processed under hygienic conditions to retain its juiciness and traditional taste. Known for its deep, rich flavor, this mutton is ideal for curries, biryanis, gravies, roasts, and slow-cooked dishes. No chemicals, no preservatives—just pure mutton that cooks well, absorbs spices properly, and delivers the taste people actually expect from good meat.\n','\n',char(10)),1,819.0,'["product-images/1767636171845-0"]','2025-11-18T08:57:53.779Z',1,860.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(5,'Cucumber(Kheera)','High water content, helps hydration, and keeps the body cool.',replace('\nThis fresh cucumber is crisp, juicy, and mild in taste, making it perfect for everyday use. Carefully selected for firmness and freshness, it’s ideal for salads, raita, juices, and garnishing. With high water content and a clean, refreshing bite, cucumber is best enjoyed fresh and chilled.','\n',char(10)),1,26.0,'["product-images/1768710099841-0"]','2025-11-18T08:59:53.556Z',0,33.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(6,'Apple ( pack of 3) ','Kashmiri Apples',replace('These apples are fresh, firm, and crisp with a clean, naturally sweet flavor. Handpicked for quality and freshness, they’re ideal for everyday snacking, salads, or cooking. Simple, reliable fruit that fits easily into daily meals.\n','\n',char(10)),4,109.0,'["product-images/1768640936747-0"]','2025-11-18T09:02:29.167Z',1,120.0,2,0,1.0,1,NULL,3.0,1); +INSERT INTO product_info VALUES(7,'Banana','Fresh bananas with a naturally sweet taste and soft, creamy texture.','Bananas supporting heart health through potassium, improving digestion with fiber, and providing an energy boost from carbohydrates. ',3,49.0,'["product-images/1768640009078-0"]','2025-11-22T01:37:58.613Z',0,60.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(8,'Kiwi','Fresh kiwis with sweet-tart flavor, juicy green flesh, and edible seeds.','Kiwi is rich in Vitamin C, which boosts immunity and keeps the body strong. It also has fiber that helps in digestion and keeps the stomach healthy. Eating kiwi improves skin glow and supports heart health.',4,119.0,'["product-images/1768647119198-0"]','2025-11-22T01:49:17.573Z',0,130.0,2,0,1.0,1,NULL,4.0,1); +INSERT INTO product_info VALUES(9,'Apollo Fish',replace('Boneless\nFresh tuna fish, high in protein and omega-3, ideal for curries, grilling, and pan-fry.','\n',char(10)),'Fresh sea-caught tuna fish with firm texture and rich flavor. Widely used for curries, steaks, grilling, and shallow frying. Naturally high in protein and omega-3 fatty acids, supporting muscle health and heart health. Cleaned and cut hygienically to retain freshness and taste.',1,296.0,'["product-images/1768832690994-0"]','2025-11-22T22:17:08.582Z',0,340.0,1,0,1.0,0,355.0,0.7,1); +INSERT INTO product_info VALUES(10,'Chicken leg piece ','6 pieces ','Fresh, meaty leg pieces with rich flavor and soft texture. Ideal for tandoori, BBQ, and home-style recipes.',4,249.0,'["product-images/1768390245969-0"]','2025-11-22T22:28:25.741Z',0,269.0,1,0,1.0,1,270.0,6.0,1); +INSERT INTO product_info VALUES(11,'Nagpur orange (pack 5)','Fresh oranges with juicy, sweet-tangy flesh and a refreshing citrus taste.','These oranges have a naturally juicy interior with a balanced sweet and tangy flavor. Though green on the outside, the flesh inside is bright, fresh, and full of citrus goodness. Ideal for everyday eating, fresh juice, or adding a refreshing twist to meals.',4,119.0,'["product-images/1768641635898-0"]','2025-11-22T22:30:28.878Z',0,150.0,2,0,1.0,1,150.0,5.0,1); +INSERT INTO product_info VALUES(12,'Lamb Mutton','','"Indulge in the rich, savory experience of our premium mutton. Sourced from the finest cuts, our muttons offers unparalleled tenderness and flavor. Whether you''re grilling a juicy steak, slow-cooking a tender roast, or creating a hearty stew, our mutton is the perfect choice for any culinary creation. Experience the difference quality makes – savor every delicious bite."',1,850.0,'["product-images/1764500702143-0","product-images/1764500702144-1"]','2025-11-30T05:35:04.520Z',1,870.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(13,'Amla (Gooseberry)','Fresh amla with a tangy, slightly sour taste and firm texture.','These fresh amlas are firm, tangy, and packed with natural goodness. Carefully selected for size and freshness, they’re perfect for eating raw, making juice, pickles, or adding to traditional recipes. A healthy fruit full of Vitamin C, with a natural bite and authentic flavor.',1,69.0,'["product-images/1768641988607-0"]','2025-11-30T05:46:29.900Z',0,79.0,2,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(14,'Mutton Boti (Goat Intestines)','Fresh mutton boti, rich in protein and iron, ideal for traditional curries and spicy dishes.','Freshly cleaned mutton boti sourced from healthy goats. Carefully washed and prepared for cooking traditional recipes like boti curry and spicy gravies. Rich in protein and iron, commonly used in regional cuisines. Cleaned hygienically and packed fresh.',1,389.0,'["product-images/1768834170995-0"]','2025-12-04T22:10:55.354Z',1,400.0,1,0,1.0,0,420.0,1.0,1); +INSERT INTO product_info VALUES(15,'Chicken Gizard','Fresh, cleaned chicken gizzards with a rich, meaty texture-ideal for curries, fry recipes, and traditional dishes.','Chicken gizzard is a flavorful and nutrient-rich cut known for its firm texture and deep taste. Carefully cleaned and hygienically packed, our gizzards are sourced fresh to ensure quality and freshness. Perfect for slow-cooked curries, spicy fries, stir-fries, and regional delicacies, chicken gizzard absorbs spices beautifully and delivers a hearty bite in every dish.',1,210.0,'["product-images/1768477813647-0","product-images/1768477813648-1"]','2025-12-06T12:35:43.241Z',1,250.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(16,'Arvi (Arbi) – Colocasia Root','Fresh arvi with soft texture when cooked, ideal for curries, fries, and dry sabzi.','Arvi, also known as colocasia or taro root, is a popular root vegetable used in many Indian dishes. When cooked properly, it becomes soft and creamy with a mildly nutty flavour. Arvi is commonly used in dry sabzis, gravies, and fried preparations. It absorbs spices well and pairs perfectly with both mild and spicy masalas. Naturally rich in dietary fiber and essential nutrients, arvi supports digestion and provides long-lasting energy. Freshly sourced and cleaned to ensure quality and taste. Must be washed and cooked thoroughly before consumption.',1,28.0,'["product-images/1769397372526-0"]','2025-12-12T03:09:59.286Z',0,33.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(17,'Tomato ','Healthy, tasty, and fresh tomatoes','Fresh, red, and juicy tomatoes to make your meals healthier and tastier.',1,28.0,'["product-images/1768640233068-0"]','2025-12-18T02:22:23.436Z',1,35.0,4,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(18,'Onions ','Fresh and flavorful onions for everyday cooking.','Healthy, fresh onions at the best quality and price',1,44.0,'["product-images/1769351976737-0"]','2025-12-18T03:37:08.849Z',0,48.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(19,'Potato','Fresh, healthy potatoes perfect for every dish.','A versatile vegetable every kitchen needs.',1,23.0,'["product-images/1768639707515-0"]','2025-12-18T03:40:28.496Z',0,29.0,4,0,1.0,1,50.0,0.5,1); +INSERT INTO product_info VALUES(20,'Mutton Head','Fresh mutton head rich in protein and collagen, ideal for traditional curries and soups.','Freshly sourced goat head, commonly used in traditional dishes and slow-cooked recipes. Contains head meat (sira) and bones that release rich flavor and collagen when cooked slowly. Popular in regional cuisines for its taste and nourishment. Cleaned thoroughly and packed hygienically.',4,379.0,'["product-images/1769353802270-0"]','2025-12-19T03:42:31.946Z',0,400.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(21,'Whole chicken - fresh cut','Fresh, tender whole chicken cleaned and cut hygienically for rich taste and high protein meals.','Our Whole Chicken is farm-fresh, carefully cleaned, and hygienically processed to lock in natural tenderness and flavor. Rich in protein and essential nutrients, it''s perfect for curries, roasting, grilling, or slow cooking. Delivered fresh to your doorstep, ensuring quality, taste, and nutrition in every bite.',1,559.0,'["product-images/1768539930897-0","product-images/1768539930899-1"]','2025-12-19T03:45:54.143Z',0,620.0,1,0,1.0,0,NULL,2.0,1); +INSERT INTO product_info VALUES(22,'Tuna Fish boneless ','Fresh tuna fish, high in protein and omega-3, ideal for curries, grilling, and pan-fry.',replace('Fresh sea-caught tuna with firm texture and rich flavor. Suitable for curry preparations, steaks, grilling, and shallow frying. Naturally high in protein and omega-3 fatty acids, supporting muscle and heart health. Cleaned and cut hygienically to retain freshness.\nBrutal truth','\n',char(10)),1,469.0,'["product-images/1768834996932-0"]','2025-12-19T03:53:12.867Z',0,529.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(23,'Chicken ( regular cut )- Small pieces ','Fresh, bone-in chicken pieces ideal for making rich and flavorful curries.','Freshly cut, bone-in chicken pieces perfect for rich, flavorful curries. Cleaned and hygienically packed to lock in tenderness and taste for a delicious home-style meal every time.',1,140.0,'["product-images/1767635527063-0"]','2025-12-19T03:53:53.748Z',1,160.0,1,0,1.0,1,149.0,0.5,1); +INSERT INTO product_info VALUES(24,'Chicken boneless','Fresh, tender boneless chicken pieces, perfectly trimmed for quick cooking. Ideal for curries, stir-fries, grills, and biryanis.','Fresh, tender boneless chicken pieces, perfectly trimmed for quick cooking. Ideal for curries, stir-fries, grills, and biryanis.',1,198.0,'["product-images/1768484106870-0"]','2025-12-19T03:59:46.418Z',0,220.0,1,0,1.0,1,230.0,0.5,1); +INSERT INTO product_info VALUES(25,'White Dragon Fruit','Fresh white dragon fruit with mild sweetness and soft, juicy flesh.','This white dragon fruit is fresh, mildly sweet, and refreshing with soft white flesh and tiny edible seeds. Carefully selected for size and freshness, it’s ideal for eating fresh, adding to fruit bowls, or blending into smoothies. Light on taste, easy to digest, and perfect for everyday healthy eating.',4,119.0,'["product-images/1768649838027-0"]','2025-12-19T07:39:11.874Z',0,130.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(26,'Fig (Anjeer)','Fresh fig with a soft flesh and mild, naturally sweet flavor.','These fresh figs are soft, juicy, and mildly sweet with a delicate texture. Carefully selected to avoid overripeness, they’re best enjoyed fresh or paired with desserts and salads. A premium fruit meant to be eaten gently and enjoyed slowly.',1,78.0,'["product-images/1768640645444-0"]','2025-12-22T05:34:50.001Z',1,94.0,2,0,1.0,0,NULL,0.25,1); +INSERT INTO product_info VALUES(27,'Brinjal ','Fresh medium-sized brinjal, rich in fiber, low in calories, and ideal for everyday curries and fries.','Freshly harvested brinjal with smooth skin and tender flesh. Mild in taste and versatile in cooking, it is commonly used in curries, stir-fries, bharta, and gravies. Naturally rich in fiber and antioxidants, making it suitable for regular home cooking. Washed and packed hygienically.',1,24.0,'["product-images/1768639645423-0"]','2025-12-22T06:01:30.466Z',0,30.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(28,'Mutton Boneless ','Tender boneless mutton rich in protein, ideal for quick curries, fry, and kebabs.','Freshly cut boneless mutton pieces with minimal fat and strong natural flavour. Suitable for fast-cooking dishes such as gravies, stir-fries, kebabs, and biryani. High in protein and essential minerals, supporting strength and energy. Cleaned and packed hygienically to ensure freshness and quality.',1,855.0,'["product-images/1769356702593-0"]','2025-12-22T06:14:24.499Z',1,879.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(29,' Bottle Gourd (Lauki)','Fresh medium-sized bottle gourd, low in calories, high in water content, easy to digest, and ideal for healthy everyday cooking.','Fresh bottle gourd with smooth green skin and soft, tender flesh. Light in taste and easy to digest, it is widely used in Indian home cooking for curries, dals, soups, and juices. Naturally low in calories and rich in water content, making it suitable for daily meals. Handpicked for freshness and packed hygienically.',4,29.0,'["product-images/1768823985921-0"]','2025-12-22T06:15:31.316Z',0,32.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(30,' Bitter Gourd (Karela)','Fresh bitter gourd, known to help control blood sugar and support digestion.','Fresh bitter gourd with firm texture and deep green color. Widely used in Indian cooking for stir-fries, curries, and juices. Naturally low in calories and rich in fiber, vitamins, and antioxidants. Commonly consumed for its potential benefits in blood sugar management and digestion. Wash thoroughly before use.',1,34.0,'["product-images/1768726783083-0"]','2025-12-22T06:16:16.981Z',0,42.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(31,'Lady Finger (Okra / Bhindi)','Fresh tender lady finger, soft and non-fibrous, ideal for fries and curries.','Lady finger, also known as okra or bhindi, is a popular vegetable used in everyday Indian cooking. Tender lady finger has a soft texture and mild flavour, making it perfect for fries, stir-fries, curries, and gravies. When fresh, it cooks evenly without becoming too sticky. Rich in dietary fiber, vitamins, and antioxidants, it supports digestion and overall health. Carefully sourced and packed to maintain freshness and tenderness. Wash well and trim the ends before cooking.',1,29.0,'["product-images/1769574792720-0"]','2025-12-22T06:17:07.804Z',0,34.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(32,'Lemons ','Farm-fresh lemons with high juice content and natural tangy flavor. Perfect for daily cooking, juices, and salads.','Fresh, handpicked lemons known for their strong aroma, thin skin, and high juice yield. Ideal for nimbu pani, curries, marinades, chutneys, and garnishing. Carefully selected to ensure firmness, freshness, and bright yellow color. Stored and delivered with proper care to maintain natural taste and quality.',4,29.0,'["product-images/1766406273176-0","product-images/1766406273178-1"]','2025-12-22T06:54:35.209Z',0,36.0,4,0,1.0,1,NULL,6.0,1); +INSERT INTO product_info VALUES(33,'Small Methi / Baby Fenugreek Leaves','Fresh small methi leaves with a mild bitterness, perfect for everyday cooking and quick stir-fries.','Small methi, also known as baby fenugreek leaves, is a tender and flavorful leafy vegetable widely used in Indian kitchens. Compared to regular methi, these leaves are smaller, softer, and less bitter, making them ideal for curries, dal, parathas, and simple stir-fries. They cook quickly and blend well with spices without overpowering the dish. Small methi is naturally rich in fiber, iron, and essential nutrients that support digestion and overall health. Carefully cleaned and freshly sourced, these leaves bring authentic taste and freshness to your daily meals.',4,15.0,'["product-images/1769396046557-0"]','2025-12-22T06:55:49.838Z',0,20.0,4,0,1.0,0,NULL,8.0,1); +INSERT INTO product_info VALUES(34,' Mutton Boneless – Mini Pack','Tender boneless mutton, high in protein, easy to cook, ideal for quick curries and fry.','Freshly cut boneless mutton pieces with minimal fat, perfect for quick cooking dishes like stir-fries, gravies, and kebabs. High in protein and rich in flavor, this mini pack is ideal for small families or single meals. Cleaned and packed hygienically to ensure freshness.',1,465.0,'["product-images/1769356039418-0"]','2025-12-22T06:56:25.537Z',1,489.0,1,0,1.0,0,NULL,0.25,1); +INSERT INTO product_info VALUES(35,'Mutton kheema','Freshly minced premium mutton, finely ground for rich flavor and juicy texture—perfect for kebabs, keema curry, cutlets, and stuffing.','Our mutton mince is prepared from carefully selected fresh cuts, hygienically cleaned and finely minced to deliver bold, authentic flavor in every bite. It has the ideal fat balance to stay juicy while cooking, making it suitable for keema curry, seekh kebabs, koftas, samosas, and stuffed parathas. No additives, no preservatives—just pure, high-quality mutton processed under strict hygiene standards for consistent taste, texture, and freshness.',1,429.0,'["product-images/1767636561867-0"]','2025-12-24T22:43:30.811Z',1,450.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(36,'Chicken Leg With Thigh Pack of 3','Fresh chicken leg with thigh, cut from tender, juicy chicken. Rich in flavor, naturally succulent, and ideal for frying, roasting, grilling, and curries.',replace('Chicken leg with thigh is a flavorful cut taken from the lower and upper leg portion of the chicken, known for its juicy texture and rich taste. This cut retains moisture during cooking, making it perfect for deep frying, tandoori, grilling, roasting, and slow-cooked curries. Hygienically cleaned and neatly cut to ensure freshness and quality. High in protein and full of natural flavor, it delivers a satisfying, tender bite in every dish.\nIf this is for a premium app, we can refine the tone.\nIf it’s for mass-market, this is already more than enough.\nStop being unclear—next time, say where it will be used.','\n',char(10)),1,266.0,'["product-images/1768413754684-0"]','2025-12-24T22:44:23.272Z',0,280.0,1,0,1.0,1,280.0,1.0,1); +INSERT INTO product_info VALUES(37,'Drum sticks ','Rich in fiber, vitamins, supports digestion.','Fresh, tender moringa pods used in sambar, curries, and stir-fries.',4,79.0,'["product-images/1766636589779-0"]','2025-12-24T22:53:10.791Z',0,89.0,4,0,1.0,0,NULL,6.0,1); +INSERT INTO product_info VALUES(38,'Sapota (Chikoo)','Fresh sapota with a soft texture and naturally sweet, malty flavor.','This sapota is fresh, ripe, and naturally sweet with a soft, grainy texture. Selected for good ripeness and flavor, it’s perfect for eating as it is or adding to desserts and milkshakes. A classic fruit with a rich taste and satisfying bite.',1,76.0,'["product-images/1768640403001-0"]','2025-12-24T22:53:56.874Z',1,85.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(39,'Mango','Fresh seasonal mangoes with juicy flesh and natural sweetness.','These mangoes are fresh, ripe, and full of natural sweetness with juicy, flavorful flesh. Carefully selected for ripeness and quality, they’re perfect for eating fresh, making juices, smoothies, or desserts. A seasonal favorite that brings rich taste and aroma to every bite.',1,149.0,'["product-images/1768650081183-0"]','2025-12-24T22:55:16.935Z',1,169.0,2,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(40,'Chicken (regular cut) Large pieces ','Fresh chicken curry cut with large pieces, high in protein and ideal for rich gravies and slow cooking.','Fresh broiler chicken cut into large curry-sized pieces for hearty home-style cooking. Ideal for slow-cooked curries, biryanis, and gravies where bigger pieces retain juiciness and flavor. High in protein and prepared hygienically to ensure freshness and quality.',1,133.0,'["product-images/1767637606890-0"]','2026-01-05T12:56:48.180Z',0,145.0,1,0,1.0,1,150.0,0.5,1); +INSERT INTO product_info VALUES(41,'Chicken mince/kheema 500 g','Fresh, lean chicken mince made from premium chicken meat. Finely ground, high in protein, low in fat—perfect for kebabs, cutlets, burgers, curries, and wraps.',replace('Our chicken mince is prepared from carefully selected, fresh chicken meat and finely ground to achieve a smooth, consistent texture. It is naturally lean, rich in high-quality protein, and free from added preservatives, fillers, or artificial colors.\nThis mince cooks quickly and absorbs spices exceptionally well, making it ideal for a wide range of dishes—from juicy kebabs, patties, and meatballs to flavorful curries, stuffed parathas, and wraps. Every batch is hygienically processed and packed to retain freshness, flavor, and nutritional value.\nIf you’re serious about clean eating, muscle-friendly meals, or simply better taste, this chicken mince does the job without compromises.','\n',char(10)),1,189.0,'["product-images/1768307047191-0"]','2026-01-13T06:54:08.959Z',0,200.0,1,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(42,'Chicken Breast Boneless - Mini Pack','Fresh boneless chicken breast mini pack. Lean, tender, and high in protein—perfect for quick meals, salads, grilling, and stir-fries.','Our boneless chicken breast mini pack is made from premium, skinless chicken breast, carefully trimmed and hygienically processed. This cut is lean, low in fat, and rich in protein, making it ideal for healthy cooking. The mini pack size is perfect for small households or single meals, ensuring minimal waste and maximum freshness. Suitable for grilling, pan-frying, boiling, salads, wraps, and meal prep recipes. Free from added preservatives and artificial colors.',1,139.0,'["product-images/1768393778962-0"]','2026-01-14T06:59:39.928Z',0,150.0,1,0,1.0,1,160.0,0.25,1); +INSERT INTO product_info VALUES(43,'Strawberry ','Fresh, juicy strawberries with a natural sweetness and soft bite. Handpicked for vibrant color, rich aroma, and everyday freshness.','Bright red, naturally sweet, and bursting with juice — these strawberries are selected at peak ripeness for their bold flavor and smooth texture. Perfect for desserts, smoothies, or eating straight from the box.',1,135.0,'["product-images/1768638795991-0"]','2026-01-17T03:03:16.953Z',1,160.0,2,0,1.0,0,NULL,0.2,1); +INSERT INTO product_info VALUES(44,'Kinu Oranges (pack of 5)','Fresh, juicy oranges with a natural balance of sweetness and tang. Perfect for snacking or fresh juice.','These oranges are naturally juicy, refreshing, and full of real citrus flavor. Grown and picked at the right time, they have a firm peel, bright color, and a sweet-tangy taste inside. Ideal for everyday eating, fresh juice, or adding a fresh citrus touch to your meals.',4,119.0,'["product-images/1768639090932-0"]','2026-01-17T03:08:11.731Z',0,130.0,2,0,1.0,1,NULL,5.0,1); +INSERT INTO product_info VALUES(45,replace('Tomato\n','\n',char(10)),replace('Indian Tomato\n\nJuicy, tangy & ideal for all Indian curries\n500 g','\n',char(10)),'',1,19.0,'["product-images/1768639292540-0"]','2026-01-17T03:11:32.838Z',0,25.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(46,'Pomegranate ','Fresh pomegranate with deep red seeds and a naturally sweet-tangy taste.','This pomegranate is fresh, juicy, and full of vibrant red seeds with a balanced sweet and slightly tangy flavor. Carefully selected for firmness and freshness, it’s perfect for eating on its own, adding to salads, or using in fresh juice. No artificial shine — just real fruit with real taste.',4,109.0,'["product-images/1768639705530-0"]','2026-01-17T03:18:26.329Z',0,130.0,2,0,1.0,1,NULL,3.0,1); +INSERT INTO product_info VALUES(47,'Green Apple (pack 2) ','Crisp green apples with a tangy-sweet taste and firm, juicy texture.','These green apples are fresh, firm, and naturally crisp with a tangy-sweet flavor. Handpicked for quality and freshness, they’re perfect for snacking, making salads, or juicing. A refreshing fruit that adds a burst of natural flavor to any meal or snack.',4,119.0,'["product-images/1768642455479-0"]','2026-01-17T04:04:16.269Z',0,130.0,2,0,1.0,1,NULL,2.0,1); +INSERT INTO product_info VALUES(48,'Guava (Jama Kaya)','Fresh guavas with a sweet-tangy flavor and crisp, juicy texture.','These guavas are fresh, firm, and packed with natural sweetness and tang. Carefully selected for ripeness and flavor, they’re perfect for eating raw, adding to salads, or making juice. A nutritious fruit that’s rich in vitamins and refreshing in every bite.',1,55.0,'["product-images/1768642724520-0"]','2026-01-17T04:08:44.824Z',0,68.0,2,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(49,'Pear','Fresh pears with soft, juicy texture and a naturally sweet flavor.','These fresh pears are firm yet tender, naturally juicy, and mildly sweet. Handpicked for quality and ripeness, they’re perfect for eating as-is, adding to fruit salads, or using in desserts. A refreshing fruit that balances sweetness and softness in every bite.',4,119.0,'["product-images/1768643138910-0"]','2026-01-17T04:15:39.802Z',1,159.0,2,0,1.0,1,NULL,4.0,1); +INSERT INTO product_info VALUES(50,'Alu Bukhara (Plum / Prunes)','Fresh plums (Alu Bukhara) with a juicy, sweet‑tart flavor, perfect for snacking or making chutneys and juices.','Alu Bukhara refers to ripe plums with rich, juicy flesh and a natural sweet‑tart taste. These plums are refreshing and flavorful, great for eating fresh or using in chutneys, jams, and traditional dishes. When dried, they’re also known as prunes — a nutritious, fiber‑rich snack with long shelf life. Packed with vitamins and antioxidants, they’re a wholesome addition to your fruit selection. ',4,119.0,'["product-images/1768643354251-0"]','2026-01-17T04:19:14.555Z',0,128.0,2,0,1.0,0,NULL,4.0,1); +INSERT INTO product_info VALUES(51,'Shahtoot (Mulberry)','Fresh mulberries with a naturally sweet flavor and juicy, soft texture.','These fresh mulberries are ripe, juicy, and naturally sweet with a delicate texture. Perfect for snacking, smoothies, desserts, or topping cereals and salads. Carefully selected for freshness and flavor, mulberries are also packed with vitamins and antioxidants, making them a healthy and delicious choice.',1,169.0,'["product-images/1768646295695-0"]','2026-01-17T05:08:16.491Z',1,180.0,2,0,1.0,0,NULL,0.25,1); +INSERT INTO product_info VALUES(52,'Sugarcane','Fresh sugarcane stalks with natural sweetness, juicy and perfect for chewing or juice extraction.','These sugarcane stalks are fresh, juicy, and naturally sweet. Perfect for chewing directly or extracting fresh sugarcane juice at home. Carefully selected for quality and ripeness, sugarcane provides a refreshing, natural source of energy and flavor.',4,29.0,'["product-images/1768646744949-0"]','2026-01-17T05:15:45.254Z',1,40.0,2,0,1.0,0,NULL,2.0,1); +INSERT INTO product_info VALUES(53,'Hass Avocado','Creamy Hass avocados with rich, buttery texture and mild, nutty flavor.','Hass avocados are known for their distinct creamy texture and mild, nutty flavor. With thick, bumpy skin that darkens as it ripens, these avocados offer smooth, rich green flesh perfect for salads, smoothies, sandwiches, or spreads like guacamole. Packed with healthy fats, fiber, and essential vitamins, they’re a nutritious addition to any diet. Treat them gently and ripen at room temperature for best taste and texture.',4,239.0,'["product-images/1768646932088-0"]','2026-01-17T05:18:52.342Z',0,250.0,2,0,1.0,0,NULL,2.0,1); +INSERT INTO product_info VALUES(54,'Blueberry','Fresh blueberries with a sweet-tart flavor, juicy texture, and rich purple color.','These fresh blueberries are plump, juicy, and naturally sweet-tart with deep purple color. Perfect for snacking, adding to cereals, desserts, or smoothies. Packed with antioxidants, vitamins, and flavor, blueberries are a nutritious and premium fruit choice. Handle carefully as they’re delicate and perishable.',1,280.0,'["product-images/1768649454994-0"]','2026-01-17T06:00:55.308Z',0,310.0,2,0,1.0,0,NULL,0.15,1); +INSERT INTO product_info VALUES(55,'Muscat Grapes','Fresh seasonal mangoes with juicy flesh and natural sweetness.','These mangoes are fresh, ripe, and full of natural sweetness with juicy, flavorful flesh. Carefully selected for ripeness and quality, they’re perfect for eating fresh, making juices, smoothies, or desserts. A seasonal favorite that brings rich taste and aroma to every bite.',1,69.0,'["product-images/1768650709484-0"]','2026-01-17T06:21:49.844Z',1,80.0,2,0,1.0,0,NULL,0.25,1); +INSERT INTO product_info VALUES(56,'Muskmelon (Kharbuja)','For bigger-sized muskmelon, choose the 1 kg option.','This fresh muskmelon (kharbuja) has a naturally sweet aroma and soft, juicy orange flesh. Carefully selected for ripeness, it’s refreshing, hydrating, and perfect for eating fresh, fruit salads, or summer juices. Best enjoyed chilled for maximum sweetness and flavor.',1,67.0,'["product-images/1768651334320-0"]','2026-01-17T06:32:14.675Z',0,72.0,2,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(57,'Pineapple','Note: This is a medium-size pineapple.','This fresh pineapple is naturally juicy with a sweet and slightly tangy flavor. Selected for ripeness and freshness, it’s perfect for eating fresh, juices, salads, and desserts. Best enjoyed chilled for maximum taste.',4,59.0,'["product-images/1768651774899-0"]','2026-01-17T06:39:35.228Z',1,69.0,2,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(58,'Papaya','Note: This is a medium-size papaya.','This fresh papaya is naturally soft, mildly sweet, and easy to digest. Carefully selected for ripeness, it’s ideal for eating fresh, fruit bowls, smoothies, or breakfast plates. Best consumed ripe for smooth texture and better taste.',4,59.0,'["product-images/1768652061701-0"]','2026-01-17T06:44:22.034Z',0,75.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(59,'Watermelon','Add 1kg if you want watermelon in big size','This fresh watermelon has bright red, juicy flesh with natural sweetness and high water content. Perfect for summer refreshment, fruit salads, juices, or eating chilled. Carefully selected for freshness and firmness.',1,98.0,'["product-images/1768653009851-0"]','2026-01-17T07:00:10.168Z',0,110.0,2,0,1.0,1,NULL,2.5,1); +INSERT INTO product_info VALUES(60,'Green Grapes','Supports immunity, provides natural energy, and is rich in antioxidants.','These fresh green grapes are handpicked for firm texture and sweet, juicy flavor. Perfect for snacking, fruit salads, juices, or desserts, they’re packed with vitamins and antioxidants. Carefully stored to maintain freshness from farm to table.',1,78.0,'["product-images/1768653997561-0"]','2026-01-17T07:16:37.967Z',0,90.0,2,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(61,'Red Globe Grapes','High in antioxidants, supports immunity, and provides natural energy. Seeded','These Red Globe grapes are large, plump, and naturally sweet with firm, juicy flesh. Carefully selected for size and freshness, they’re perfect for snacking, fruit salads, desserts, or making fresh juice. Packed with vitamins and antioxidants, Red Globe grapes are a healthy and premium choice for everyday consumption.',1,99.0,'["product-images/1768654475850-0"]','2026-01-17T07:24:36.247Z',0,119.0,2,0,1.0,1,NULL,0.25,1); +INSERT INTO product_info VALUES(62,'Black Grapes','Supports immunity, rich in antioxidants, and provides natural energy.','These black grapes are handpicked for firm texture, juiciness, and natural sweetness. Perfect for snacking, fruit salads, desserts, or making fresh juice. Rich in vitamins and antioxidants, they’re a healthy and refreshing fruit for everyday consumption.',1,78.0,'["product-images/1768654740988-0"]','2026-01-17T07:29:01.488Z',0,91.0,2,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(63,'Pink Dragon Fruit','Boosts immunity, rich in antioxidants, supports digestion, and provides natural energy.','This pink dragon fruit is fresh, juicy, and mildly sweet with soft flesh and tiny edible seeds. Carefully selected for ripeness and quality, it’s perfect for eating fresh, adding to fruit bowls, smoothies, or desserts. Exotic in appearance, nutritious, and rich in antioxidants.',4,269.0,'["product-images/1768658094891-0"]','2026-01-17T08:24:55.423Z',1,289.0,2,0,1.0,1,NULL,2.0,1); +INSERT INTO product_info VALUES(64,'Broccoli',replace('Note: This is a medium-size broccoli.\nRich in fiber and vitamins, supports digestion and overall nutrition.','\n',char(10)),'This fresh broccoli is crisp, green, and carefully selected for firmness and freshness. Ideal for stir-fries, salads, soups, or steaming. Mild in taste and versatile in cooking, it’s best used fresh for good texture and flavor.',1,59.0,'["product-images/1768709567040-0"]','2026-01-17T22:42:48.248Z',1,69.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(65,'Beetroot','Supports blood health, rich in fiber, and helps maintain energy levels.','This fresh beetroot is firm, clean, and naturally rich in color. Carefully selected for freshness, it’s ideal for cooking, salads, juices, and curries. Mildly sweet when cooked and earthy in flavor, beetroot is a versatile vegetable used in everyday meals.',1,28.0,'["product-images/1768710434326-0"]','2026-01-17T22:57:14.620Z',0,35.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(66,'Cabbage(Patta Gobhi)',replace('Note: This is a medium-size cabbage.\nRich in fiber, supports digestion, and low in calories.','\n',char(10)),'This fresh green cabbage is medium-sized, firm, and tightly packed with pale green leaves. It has a mild flavor and crunchy texture, making it ideal for curries, stir-fries, salads, soups, and fried snacks. Carefully selected for freshness and cleanliness, this cabbage is suitable for everyday cooking.',4,27.0,'["product-images/1768710760133-0"]','2026-01-17T23:02:40.448Z',0,35.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(67,'Cauliflower(Phool Gobhi)',replace('Note: This is a medium-size cauliflower.\nHigh in fiber and vitamin C, supports digestion and immunity.','\n',char(10)),'This fresh medium-sized cauliflower has compact, creamy-white florets and crisp green leaves. Carefully selected for firmness and freshness, it is ideal for curries, stir-fries, fried snacks, soups, and biryani-style dishes. Clean and naturally grown, suitable for daily home cooking.',4,28.0,'["product-images/1768711261174-0"]','2026-01-17T23:11:02.227Z',0,32.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(68,'Sweet Potato','High in fiber, supports digestion, and provides natural energy.','These medium-sized red sweet potatoes have smooth skin and pale, creamy flesh with a mildly sweet taste. Ideal for boiling, roasting, frying, and traditional Indian dishes, they cook evenly and remain soft inside. Carefully selected for freshness and quality, suitable for daily home cooking.',1,32.0,'["product-images/1768711919135-0"]','2026-01-17T23:21:59.416Z',0,34.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(69,'Carrot','Rich in vitamin A, supports eye health and immunity.','These fresh medium-sized carrots are firm, smooth-skinned, and bright in color. They have a crisp texture and mildly sweet taste, making them perfect for salads, curries, stir-fries, juices, and snacks. Carefully selected for freshness and quality, suitable for everyday cooking.',1,29.0,'["product-images/1768712093829-0"]','2026-01-17T23:24:54.154Z',0,35.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(70,'White Radish(Mooli)','Aids digestion, rich in fibre, supports gut health.','Fresh white radish (mullangi) is crisp, juicy, and naturally pungent with a refreshing bite. Ideal for sambar, curries, stir-fries, salads, and chutneys. Carefully sourced to ensure firmness, clean skin, and freshness for daily home cooking.',4,19.0,'["product-images/1768712490280-0"]','2026-01-17T23:31:30.647Z',0,25.0,4,0,1.0,0,NULL,2.0,1); +INSERT INTO product_info VALUES(71,replace('Curry Leaves(Karivepak)\n','\n',char(10)),replace('1 bunch\nAdds aroma, supports digestion, and enhances flavour in cooking.','\n',char(10)),'These fresh curry leaves are aromatic, clean, and deep green in colour. Carefully selected to enhance flavour, they are essential for tempering and everyday South Indian cooking. Best used fresh for maximum aroma and taste.',4,15.0,'["product-images/1768713206145-0"]','2026-01-17T23:43:26.487Z',0,22.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(72,'Spinach (Palak)','Rich in iron, supports blood health, and boosts immunity.','Fresh spinach (palak) leaves are medium-sized, crisp, and bright green. Carefully selected for freshness, they are ideal for curries, soups, smoothies, salads, and dals. Best consumed fresh to retain nutrients, flavor, and texture.',4,14.0,'["product-images/1768713537512-0"]','2026-01-17T23:48:57.829Z',0,19.0,4,0,1.0,1,NULL,7.0,1); +INSERT INTO product_info VALUES(73,'Coconut','Rich in natural electrolytes, supports hydration, and provides energy.','This fresh medium-sized coconut is carefully selected for quality and freshness. Ideal for drinking tender coconut water, making coconut milk, chutneys, desserts, or cooking. Naturally nutritious and rich in flavor, it’s perfect for daily home use.',4,59.0,'["product-images/1768718685357-0"]','2026-01-17T23:51:54.586Z',0,79.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(74,'Fenugreek Leaves(Methi)','Rich in vitamins, supports digestion, and enhances flavor in cooking.','These fresh fenugreek leaves (methi) are medium-sized, aromatic, and vibrant green. Carefully selected for freshness, they are ideal for curries, parathas, dals, and seasoning. Best used fresh to retain aroma, flavor, and nutritional value.',4,18.0,'["product-images/1768713886512-0"]','2026-01-17T23:54:47.138Z',0,25.0,4,0,1.0,0,NULL,10.0,1); +INSERT INTO product_info VALUES(75,'Murrel / Korameenu / కోరమీను - Live','Fresh murrel fish, high in protein, known for aiding recovery and boosting strength.',' Fresh freshwater murrel fish (snakehead) known for its firm flesh and rich taste. Highly valued in Indian households for its nutritional benefits, especially during recovery and post-illness diets. Rich in protein and essential nutrients. Ideal for curries and traditional preparations. Cleaned and packed hygienically to retain freshness.',1,489.0,'["product-images/1768817786453-0","product-images/1768817786455-1"]','2026-01-18T00:08:16.173Z',0,580.0,1,0,1.0,1,600.0,1.0,1); +INSERT INTO product_info VALUES(76,'Coriander Leaves (Kothimeer)','Fresh coriander leaves with a strong aroma, perfect for garnishing and cooking.','Freshly harvested coriander leaves with tender stems and vibrant green color. Widely used in Indian cooking for garnishing curries, chutneys, salads, and rice dishes. Adds a refreshing flavor and aroma to everyday meals. Wash thoroughly before use.',4,19.0,'["product-images/1768727264220-0"]','2026-01-18T03:37:45.047Z',0,25.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(77,'Gongura (Sorrel Leaves)','Fresh gongura leaves with a natural tangy taste, perfect for traditional Andhra dishes and chutneys.','Gongura, also known as sorrel leaves, is a popular leafy vegetable widely used in Andhra and Telangana cuisine. Known for its unique sour and refreshing flavour, gongura adds a distinctive taste to dals, curries, chutneys, and pickles. The leaves are tender and aromatic, making them ideal for both cooking and grinding. Naturally rich in iron, antioxidants, and essential vitamins, gongura supports digestion and overall health. Freshly sourced and carefully cleaned to retain its natural taste and quality. Wash thoroughly before use and cook fresh for the best flavour.',4,16.0,'["product-images/1769396724595-0"]','2026-01-18T08:56:30.867Z',0,19.0,4,0,1.0,0,NULL,6.0,1); +INSERT INTO product_info VALUES(78,'Green Chillies','Fresh green chillies rich in vitamin C, add heat and flavor to everyday cooking.',' Fresh green chillies with bright green color and firm texture. Commonly used in Indian cooking to add spice and aroma to curries, stir-fries, chutneys, and snacks. Naturally rich in vitamin C and antioxidants. Wash thoroughly before use. Packed fresh for daily kitchen needs.',1,29.0,'["product-images/1769241234003-0"]','2026-01-18T09:03:36.108Z',0,32.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(79,'Red Carrot ','Big-sized red carrots with natural sweetness, ideal for salads, juices, and cooking.','Fresh big-sized red carrots with deep red color and firm texture. Naturally sweet and juicy, these carrots are rich in beta-carotene, fiber, and antioxidants. Perfect for raw salads, juices, halwa, soups, and everyday cooking. Carefully selected for size and freshness, cleaned and packed hygienically.',1,39.0,'["product-images/1768822893380-0"]','2026-01-19T06:11:34.210Z',0,47.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(80,'Country Chicken (Desi / Natu Kodi)','Fresh country chicken, high in protein and rich in natural flavor, ideal for traditional slow-cooked dishes.','Freshly sourced country chicken known for its firm texture and strong taste. Preferred for traditional curries, soups, and slow-cooked recipes. Naturally high in protein and considered more nutritious than broiler chicken. Cleaned and cut hygienically for safe cooking.',1,849.0,'["product-images/1769063336125-0"]','2026-01-22T00:58:57.053Z',0,920.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(81,'Tigers prawns large ','Premium tiger prawns rich in protein and omega-3, ideal for grilling, frying, and special dishes.','Fresh premium tiger prawns known for their large size, firm texture, and rich taste. Perfect for grilling, frying, curries, and restaurant-style recipes. High in protein and omega-3 fatty acids, supporting muscle and heart health. Available cleaned or uncleaned and packed hygienically to maintain freshness.',1,669.0,'["product-images/1769063467386-0"]','2026-01-22T01:01:08.364Z',0,700.0,1,0,1.0,0,NULL,0.65,1); +INSERT INTO product_info VALUES(82,'Fresh Prawns – Medium (Cleaned & Deveined)','High in protein and omega-3, supports muscle growth and heart health.','Fresh prawns with firm texture and natural sweetness. Ideal for curries, fry, grills, and Asian-style dishes. Rich in protein and omega-3 fatty acids, supporting muscle and heart health. Available cleaned or uncleaned and packed hygienically to maintain freshness.',1,389.0,'["product-images/1769063660493-0"]','2026-01-22T01:04:21.712Z',0,419.0,1,0,1.0,0,NULL,0.65,1); +INSERT INTO product_info VALUES(83,'Rohu- రోహు live ','Fresh rohu fish rich in protein and omega-3, ideal for everyday curries and home cooking.','Freshwater rohu fish with soft texture and mild flavor, widely used in Indian households for daily meals. Suitable for curry preparations and light frying. Naturally rich in protein and omega-3 fatty acids, supporting muscle health and balanced nutrition. Cleaned and cut hygienically to ensure freshness and quality.',1,159.0,'["product-images/1769149204037-0"]','2026-01-23T00:50:05.311Z',0,180.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(84,'Mutton Brain (Bheja). మటన్ బ్రెయిన్ (భేజా)','Fresh mutton brain, rich in healthy fats and protein, ideal for traditional bheja fry and curries.','Freshly sourced mutton brain (bheja) from healthy goats. Known for its soft texture and rich taste, it is commonly used in traditional dishes like bheja fry and masala. Rich in healthy fats and nutrients. Cleaned carefully and packed hygienically to maintain freshness.',4,119.0,'["product-images/1769149707440-0"]','2026-01-23T00:56:40.140Z',0,130.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(85,'Mutton Paya (Goat Trotters)','Fresh mutton paya rich in collagen and minerals, ideal for nourishing paya soup.','Freshly cleaned mutton paya (goat trotters) commonly used to prepare traditional paya soup. When slow-cooked, paya releases natural collagen and minerals, making the soup rich, flavorful, and nourishing. Popular for strength recovery and home-style remedies. Cleaned thoroughly and packed hygienically for freshness.',4,259.0,'["product-images/1769150471654-0","product-images/1769150471655-1"]','2026-01-23T01:11:12.693Z',0,270.0,1,0,1.0,0,NULL,4.0,1); +INSERT INTO product_info VALUES(86,'Mutton Chops - మటన్ చాప్స్','Fresh mutton chops, rich in protein and iron, ideal for curries and slow cooking.','Fresh mutton chops cut from tender sections with bone, known for rich flavor and juiciness. Perfect for slow-cooked curries, gravies, and traditional dishes where bone enhances taste. High in protein and iron, supporting strength and energy. Cleaned and cut hygienically for freshness.',1,419.0,'["product-images/1769151216776-0"]','2026-01-23T01:23:37.665Z',1,440.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(87,'Mutton Soup Bones -మటన్ సూప్ ఎముకలు','Fresh mutton soup bones rich in collagen and minerals, ideal for nourishing soups and broths.',' Fresh mutton soup bones cut from healthy goat meat, perfect for preparing rich and flavorful soups and bone broths. Slowly cooked bones release natural collagen, minerals, and nutrients, making them ideal for strength recovery and traditional home remedies. Cleaned hygienically and packed fresh for daily cooking.',1,149.0,'["product-images/1769151844424-0"]','2026-01-23T01:34:05.440Z',0,179.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(88,'Purple Cabbage (Red Cabbage)',replace('Medium-sized purple cabbage\nFresh purple cabbage rich in antioxidants and fiber, supports digestion and immunity.','\n',char(10)),'Fresh purple (red) cabbage with crisp texture and vibrant color. Commonly used in salads, stir-fries, slaws, and garnishing. Naturally rich in antioxidants, fiber, and vitamin C, helping support digestion and overall health. Wash thoroughly before use. Packed fresh for daily cooking.',4,99.0,'["product-images/1769394457296-0"]','2026-01-25T20:57:37.763Z',0,110.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(89,'Light Purple Brinjal','Fresh light purple brinjal rich in fiber and antioxidants, ideal for curries and fries.','Fresh light purple brinjal with smooth skin and tender flesh, handpicked for everyday cooking. This variety cooks quickly and absorbs spices well, making it perfect for curries, fries, bharta, and stir-fried dishes. Mild in taste and easy to digest, it is a regular choice in Indian kitchens. Rich in fiber and antioxidants, it supports digestion and overall health. Wash thoroughly before use. Best used fresh for maximum taste and texture.',1,29.0,'["product-images/1769395184980-0"]','2026-01-25T21:09:46.227Z',0,40.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(90,'Indian Yellow Cucumber (Madras / Dosakai)','Fresh Indian yellow cucumber, also known as Madras cucumber, mild and crisp, perfect for salads, pickles, and cooking.','Indian yellow cucumber, also called Madras cucumber, is a rare and vibrant variety with tender yellow skin and crisp, juicy flesh. Favored in Indian kitchens, it is perfect for fresh salads, traditional pickles, or lightly cooked curries. Naturally rich in fiber, vitamins, and antioxidants, it promotes digestion and overall wellness. Carefully harvested and packed to retain freshness, this cucumber delivers mild sweetness and a refreshing crunch to everyday meals. Wash thoroughly before use and consume fresh for maximum taste.',1,27.0,'["product-images/1769398103853-0"]','2026-01-25T21:58:24.668Z',0,29.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(91,'Green Peas','Fresh green peas with natural sweetness, ideal for curries, pulao, and snacks.','Fresh green peas, carefully harvested for their sweetness, tenderness, and bright green color. Perfect for adding to Indian curries, pulao, stir-fries, soups, and snacks. Rich in protein, fiber, vitamins, and minerals, green peas support digestion and overall health. Available fresh or shelled for convenience, these peas are packed to retain their crisp texture and natural flavor. Wash thoroughly before use and cook fresh for the best taste.',1,39.0,'["product-images/1769398710713-0"]','2026-01-25T22:08:31.554Z',0,44.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(92,'French Beans (Chikkudukaya)','Fresh Benis with crisp texture, ideal for stir-fries, curries, and salads.','Fresh Benis, also known as French beans or cluster beans, are tender and crisp vegetables widely used in Indian cooking. Perfect for stir-fries, curries, and salads, these beans cook quickly and absorb spices well. Naturally rich in fiber, vitamins, and minerals, Benis supports digestion and overall wellness. Carefully handpicked and packed to retain freshness, these beans bring color, crunch, and nutrition to your daily meals. Wash thoroughly before cooking.',1,29.0,'["product-images/1769399617573-0"]','2026-01-25T22:23:38.391Z',0,32.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(93,'Red & Yellow Capsicum (Bell Peppers)','Fresh red and yellow capsicum with crisp texture and mild sweetness, perfect for cooking and salads.','Red and yellow capsicum, also known as bell peppers, are vibrant, crunchy vegetables with a naturally mild and slightly sweet flavour. Commonly used in stir-fries, curries, salads, and continental dishes, these capsicums add colour and nutrition to meals. Rich in vitamin C, antioxidants, and dietary fiber, they help support immunity and overall health. Carefully selected and packed to maintain freshness, firmness, and bright colour. Wash thoroughly and cut as required before use.',1,89.0,'["product-images/1769571126092-0"]','2026-01-27T22:02:07.050Z',0,96.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(94,'Gawar Beans (Cluster Beans)','Fresh tender gawar beans, ideal for stir-fries, curries, and traditional dishes.','Gawar beans, also known as cluster beans, are a traditional vegetable widely used in Indian cooking. These tender green pods have a slightly earthy flavour and firm texture, making them perfect for stir-fries, dry sabzis, curries, and dals. Rich in dietary fiber, vitamins, and minerals, gawar beans support digestion and help maintain blood sugar balance. Carefully sourced and packed to retain freshness, tenderness, and natural colour. Wash thoroughly, trim ends, and cook well before consumption.',1,29.0,'["product-images/1769571810861-0"]','2026-01-27T22:13:31.656Z',0,35.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(95,'Dondakaya (Ivy Gourd)','Fresh tender ivy gourd, ideal for fries, stir-fries, and curries.',replace('Long Description (human-written, not robotic)\nIvy gourd, commonly known as tindora or dondakaya, is a popular vegetable used in daily Indian cooking. These small green gourds have a mild taste and firm texture that works perfectly for shallow frying, stir-fries, and traditional curries. Tender ivy gourd cooks quickly and absorbs spices well without turning mushy. It is naturally low in calories and rich in fiber, making it suitable for light and healthy meals. Carefully selected to ensure freshness, uniform size, and good cooking quality.','\n',char(10)),1,39.0,'["product-images/1769571978680-0"]','2026-01-27T22:16:18.992Z',0,50.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(96,'Pineapple – Large','Large-sized fresh pineapple with juicy, sweet-tangy flesh.','This large pineapple is carefully selected for size and ripeness, offering juicy golden flesh with a naturally sweet and mildly tangy taste. Perfect for fresh juices, fruit salads, desserts, and cooking, it delivers more pulp and better value. Ideal for families or recipes that need a generous quantity of fresh pineapple.',4,109.0,'["product-images/1769576743718-0"]','2026-01-27T23:35:44.520Z',0,120.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(97,'Pudina (Mint Leaves)','Fresh aromatic mint leaves, ideal for chutneys, curries, and drinks.','Pudina, also known as mint leaves, is a fragrant herb widely used in Indian cooking. Its refreshing aroma and cooling taste make it perfect for chutneys, raitas, biryani, curries, and beverages like mint water and mojito. Carefully selected for freshness, these tender green leaves add both flavor and aroma to everyday dishes and are best used fresh.',4,19.0,'["product-images/1769577010969-0"]','2026-01-27T23:40:11.263Z',0,25.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(98,'Mutton Curry Cut (Regular)– 500 g','Fresh mutton curry cut with bone, suitable for everyday curries.','Mutton curry cut (regular) includes a balanced mix of bone and meat, making it ideal for everyday home-style curries and gravies. Cut from fresh goat meat, these pieces cook well in slow and pressure-cooked dishes, releasing rich flavour into the gravy. Cleaned and cut hygienically, this pack is suitable for regular family meals.',1,419.0,'["product-images/1770051810386-0"]','2026-02-02T11:33:31.411Z',1,459.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(99,'Mutton Curry Cut (Regular) – 750 g','Fresh mutton curry cut with bone, ideal for family-sized curries.','Mutton curry cut (regular) – 750 g includes a well-balanced mix of bone and meat, perfect for preparing rich and flavorful curries. Cut from fresh goat meat, these pieces are suitable for slow cooking and pressure cooking, allowing the meat to turn tender while enhancing the taste of the gravy. Cleaned and cut hygienically, this pack is ideal for medium to large family meals.',1,635.0,'["product-images/1770051959669-0"]','2026-02-02T11:36:00.205Z',1,660.0,1,0,1.0,0,NULL,0.75,1); +INSERT INTO product_info VALUES(100,'Irani Apple. Pack of (4)','Fresh Irani apples with crisp texture and mildly sweet taste.','Irani apples, also known as Iranian apples, are known for their firm texture, long shelf life, and mildly sweet flavor. These apples are crisp and juicy, making them suitable for fresh consumption, fruit salads, and juicing. Carefully selected for quality and freshness, Irani apples are a popular everyday fruit choice due to their balanced taste and good keeping quality. Wash thoroughly before consumption.',4,99.0,'["product-images/1770212631435-0"]','2026-02-04T08:13:52.295Z',0,119.0,2,0,1.0,1,NULL,4.0,1); +INSERT INTO product_info VALUES(101,'Coriander Leaves (Kothimeer) small 1 ','','',4,12.0,'["product-images/1771249922306-0"]','2026-02-16T08:22:03.573Z',0,15.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(102,' Basa Fish Fillets','','',1,499.0,'["product-images/1771411526889-0"]','2026-02-18T05:15:27.907Z',0,550.0,1,0,1.0,0,NULL,0.8,1); +INSERT INTO product_info VALUES(103,'Ridge Gourd (Turai) ..(Beerkaya)','','',1,29.0,'["product-images/1771647812442-0"]','2026-02-20T22:53:33.321Z',0,35.0,4,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(136,'Demo product','Demo product demo','Demo Product and just for fun description',1,222.0,'[]','2026-03-21T10:37:26.835Z',0,233.0,8,0,1.0,1,233.0,1.0,1); +INSERT INTO product_info VALUES(137,'Demo3','Demo3','Demo3',1,233.0,'["product-images/1774110996916.jpg","product-images/1774111917349.jpg","product-images/1774111977156.jpg"]','2026-03-21T10:39:54.216Z',0,233.0,1,0,1.0,1,233.0,1.0,1); +INSERT INTO product_info VALUES(138,'Demo4','Demo4','Demo4',1,233.0,'["product-images/1774109641982.jpg","product-images/1774109642211.jpg"]','2026-03-21T10:44:05.635Z',0,233.0,8,0,1.0,1,233.0,1.0,1); +INSERT INTO product_info VALUES(139,'Demo5','Demo5','Demo5 ',1,233.0,'["product-images/1774109875092.jpg","product-images/1774109875283.jpg"]','2026-03-21T10:47:58.585Z',0,235.0,1,0,1.0,1,235.0,1.0,1); +INSERT INTO product_info VALUES(140,'Demo Productsz','Demooo','Demoooo',1,250.0,'["product-images/1774524524649.jpg","product-images/1774524524845.jpg","product-images/1774524525034.jpg","product-images/1774525511146.jpg"]','2026-03-26T05:58:47.322Z',0,285.0,1,0,1.0,1,300.0,1.0,1); +CREATE TABLE IF NOT EXISTS "product_reviews" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "product_id" INTEGER NOT NULL, "review_body" TEXT NOT NULL, "image_urls" TEXT, "review_time" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "ratings" REAL NOT NULL, "admin_response" TEXT, "admin_response_images" TEXT); +INSERT INTO product_reviews VALUES(1,1,9,'Nice','["review-images/1765087473110.jpg","review-images/1765087473110.jpg"]','2025-12-07T00:35:23.088Z',4.0,'Thank Youu','["review-images/1765108852104.jpg"]'); +INSERT INTO product_reviews VALUES(2,1,9,'Nice','["review-images/1765093365201.jpg"]','2025-12-07T02:12:47.173Z',4.0,'','["review-images/1765106307190.jpg"]'); +INSERT INTO product_reviews VALUES(3,1,14,'Not Good','["review-images/1765096663203.jpg","review-images/1765096663403.jpg","review-images/1765096663575.png"]','2025-12-07T03:07:47.450Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(4,1,14,'Another test review this is.','["review-images/1765097892914.jpg","review-images/1765097893129.png"]','2025-12-07T03:28:13.977Z',3.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(5,1,14,'test again','["review-images/1765098183876.jpg"]','2025-12-07T03:33:04.648Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(6,1,14,'review 4','["review-images/1765098361309.jpg"]','2025-12-07T03:36:02.126Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(7,1,14,'another review','["review-images/1765098480284.jpg"]','2025-12-07T03:38:01.100Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(8,1,14,'5 star review','["review-images/1765098638162.jpg"]','2025-12-07T03:40:40.683Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(9,1,14,'another testing round','["review-images/1765098885608.jpg","review-images/1765098885808.png"]','2025-12-07T03:44:49.071Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(10,1,14,'testing again','["review-images/1765098955365.jpg"]','2025-12-07T03:45:56.837Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(11,1,14,'test review','["review-images/1765099082661.jpg"]','2025-12-07T03:48:04.218Z',3.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(12,1,14,'testing continues','["review-images/1765099476101.jpg","review-images/1765099476297.png"]','2025-12-07T03:54:39.689Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(13,1,14,'It should work now','["review-images/1765101095057.jpg","review-images/1765101095257.png"]','2025-12-07T04:21:44.960Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(14,1,14,'It should work now','["review-images/1765101103591.jpg","review-images/1765101103758.png"]','2025-12-07T04:21:46.666Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(15,1,1,'Very nutritious','["review-images/1765101241219.jpg"]','2025-12-07T04:24:02.615Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(16,1,1,'Item was fresh and juicy','["review-images/1765119932782.jpg","review-images/1765119932802.jpg"]','2025-12-07T09:35:37.267Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(17,1,1,'Item was fresh and juicy','["review-images/1765119935171.jpg","review-images/1765119935174.jpg"]','2025-12-07T09:35:40.420Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(18,17,5,'R','[]','2025-12-19T09:47:47.194Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(19,17,5,'G','["review-images/1766157495262.jpg"]','2025-12-19T09:48:17.365Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(20,17,5,'G','["review-images/1766157496653.jpg"]','2025-12-19T09:48:18.989Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(21,17,5,'R','[]','2025-12-19T09:48:42.279Z',3.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(22,17,23,'Ff','[]','2025-12-19T10:02:56.865Z',1.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(23,17,17,'Aa','[]','2025-12-19T10:48:05.094Z',1.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(24,17,16,'Dd','[]','2025-12-20T05:52:01.527Z',2.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(25,1,6,'Nice Item','["review-images/1766423329579.jpg"]','2025-12-22T11:38:51.838Z',3.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(26,17,22,'Bb','[]','2025-12-23T11:55:36.314Z',3.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(27,15,6,replace('Excellent \n👍👍','\n',char(10)),'["review-images/1766572700543.jpg"]','2025-12-24T05:08:21.515Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(28,15,6,replace('Excellent \n👍👍','\n',char(10)),'["review-images/1766572700880.jpg"]','2025-12-24T05:08:22.057Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(29,15,6,replace('Excellent \n👍👍','\n',char(10)),'["review-images/1766572701138.jpg"]','2025-12-24T05:08:22.587Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(30,15,6,replace('Excellent \n👍👍','\n',char(10)),'["review-images/1766572701266.jpg"]','2025-12-24T05:08:23.203Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(31,15,6,replace('Excellent \n👍👍','\n',char(10)),'["review-images/1766572701490.jpg"]','2025-12-24T05:08:25.076Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(32,2,6,replace('Good \n','\n',char(10)),'[]','2026-01-01T06:04:48.298Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(33,2,3,'That''s a great cut of meat and a good quantity','[]','2026-01-03T05:21:46.903Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(34,2,3,'That''s a great cut of meat and a good quantity','[]','2026-01-03T05:21:47.197Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(35,22,24,'Test review ','["review-images/1768792441275.jpg"]','2026-01-18T21:44:02.726Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(36,22,24,'Test review ','["review-images/1768792441748.jpg"]','2026-01-18T21:44:03.075Z',5.0,NULL,'[]'); +CREATE TABLE IF NOT EXISTS "product_slots" ("product_id" INTEGER NOT NULL, "slot_id" INTEGER NOT NULL); +INSERT INTO product_slots VALUES(1,1); +INSERT INTO product_slots VALUES(1,2); +INSERT INTO product_slots VALUES(1,3); +INSERT INTO product_slots VALUES(1,4); +INSERT INTO product_slots VALUES(1,5); +INSERT INTO product_slots VALUES(1,6); +INSERT INTO product_slots VALUES(1,7); +INSERT INTO product_slots VALUES(1,9); +INSERT INTO product_slots VALUES(1,12); +INSERT INTO product_slots VALUES(1,18); +INSERT INTO product_slots VALUES(1,19); +INSERT INTO product_slots VALUES(1,20); +INSERT INTO product_slots VALUES(1,21); +INSERT INTO product_slots VALUES(1,22); +INSERT INTO product_slots VALUES(1,23); +INSERT INTO product_slots VALUES(1,31); +INSERT INTO product_slots VALUES(1,33); +INSERT INTO product_slots VALUES(1,35); +INSERT INTO product_slots VALUES(1,37); +INSERT INTO product_slots VALUES(1,38); +INSERT INTO product_slots VALUES(1,39); +INSERT INTO product_slots VALUES(1,40); +INSERT INTO product_slots VALUES(1,59); +INSERT INTO product_slots VALUES(1,63); +INSERT INTO product_slots VALUES(1,64); +INSERT INTO product_slots VALUES(1,65); +INSERT INTO product_slots VALUES(1,66); +INSERT INTO product_slots VALUES(1,67); +INSERT INTO product_slots VALUES(1,72); +INSERT INTO product_slots VALUES(1,73); +INSERT INTO product_slots VALUES(1,74); +INSERT INTO product_slots VALUES(1,279); +INSERT INTO product_slots VALUES(2,1); +INSERT INTO product_slots VALUES(2,2); +INSERT INTO product_slots VALUES(2,3); +INSERT INTO product_slots VALUES(2,4); +INSERT INTO product_slots VALUES(2,5); +INSERT INTO product_slots VALUES(2,6); +INSERT INTO product_slots VALUES(2,7); +INSERT INTO product_slots VALUES(2,18); +INSERT INTO product_slots VALUES(2,19); +INSERT INTO product_slots VALUES(2,20); +INSERT INTO product_slots VALUES(2,21); +INSERT INTO product_slots VALUES(2,22); +INSERT INTO product_slots VALUES(2,23); +INSERT INTO product_slots VALUES(2,31); +INSERT INTO product_slots VALUES(2,33); +INSERT INTO product_slots VALUES(2,35); +INSERT INTO product_slots VALUES(2,37); +INSERT INTO product_slots VALUES(2,38); +INSERT INTO product_slots VALUES(2,39); +INSERT INTO product_slots VALUES(2,40); +INSERT INTO product_slots VALUES(2,41); +INSERT INTO product_slots VALUES(2,43); +INSERT INTO product_slots VALUES(2,45); +INSERT INTO product_slots VALUES(2,46); +INSERT INTO product_slots VALUES(2,47); +INSERT INTO product_slots VALUES(2,48); +INSERT INTO product_slots VALUES(2,49); +INSERT INTO product_slots VALUES(2,50); +INSERT INTO product_slots VALUES(2,51); +INSERT INTO product_slots VALUES(2,52); +INSERT INTO product_slots VALUES(2,53); +INSERT INTO product_slots VALUES(2,54); +INSERT INTO product_slots VALUES(2,55); +INSERT INTO product_slots VALUES(2,56); +INSERT INTO product_slots VALUES(2,57); +INSERT INTO product_slots VALUES(2,58); +INSERT INTO product_slots VALUES(2,59); +INSERT INTO product_slots VALUES(2,60); +INSERT INTO product_slots VALUES(2,61); +INSERT INTO product_slots VALUES(2,62); +INSERT INTO product_slots VALUES(2,63); +INSERT INTO product_slots VALUES(2,64); +INSERT INTO product_slots VALUES(2,65); +INSERT INTO product_slots VALUES(2,66); +INSERT INTO product_slots VALUES(2,67); +INSERT INTO product_slots VALUES(2,68); +INSERT INTO product_slots VALUES(2,69); +INSERT INTO product_slots VALUES(2,70); +INSERT INTO product_slots VALUES(2,71); +INSERT INTO product_slots VALUES(2,72); +INSERT INTO product_slots VALUES(2,73); +INSERT INTO product_slots VALUES(2,74); +INSERT INTO product_slots VALUES(2,75); +INSERT INTO product_slots VALUES(2,76); +INSERT INTO product_slots VALUES(2,77); +INSERT INTO product_slots VALUES(2,78); +INSERT INTO product_slots VALUES(2,79); +INSERT INTO product_slots VALUES(2,80); +INSERT INTO product_slots VALUES(2,81); +INSERT INTO product_slots VALUES(2,82); +INSERT INTO product_slots VALUES(2,83); +INSERT INTO product_slots VALUES(2,84); +INSERT INTO product_slots VALUES(2,85); +INSERT INTO product_slots VALUES(2,86); +INSERT INTO product_slots VALUES(2,87); +INSERT INTO product_slots VALUES(2,88); +INSERT INTO product_slots VALUES(2,89); +INSERT INTO product_slots VALUES(2,90); +INSERT INTO product_slots VALUES(2,91); +INSERT INTO product_slots VALUES(2,92); +INSERT INTO product_slots VALUES(2,93); +INSERT INTO product_slots VALUES(2,94); +INSERT INTO product_slots VALUES(2,95); +INSERT INTO product_slots VALUES(2,96); +INSERT INTO product_slots VALUES(2,97); +INSERT INTO product_slots VALUES(2,98); +INSERT INTO product_slots VALUES(2,99); +INSERT INTO product_slots VALUES(2,100); +INSERT INTO product_slots VALUES(2,101); +INSERT INTO product_slots VALUES(2,102); +INSERT INTO product_slots VALUES(2,103); +INSERT INTO product_slots VALUES(2,104); +INSERT INTO product_slots VALUES(2,105); +INSERT INTO product_slots VALUES(2,106); +INSERT INTO product_slots VALUES(2,107); +INSERT INTO product_slots VALUES(2,108); +INSERT INTO product_slots VALUES(2,109); +INSERT INTO product_slots VALUES(2,110); +INSERT INTO product_slots VALUES(2,111); +INSERT INTO product_slots VALUES(2,112); +INSERT INTO product_slots VALUES(2,113); +INSERT INTO product_slots VALUES(2,114); +INSERT INTO product_slots VALUES(2,115); +INSERT INTO product_slots VALUES(2,116); +INSERT INTO product_slots VALUES(2,117); +INSERT INTO product_slots VALUES(2,118); +INSERT INTO product_slots VALUES(2,119); +INSERT INTO product_slots VALUES(2,120); +INSERT INTO product_slots VALUES(2,121); +INSERT INTO product_slots VALUES(2,122); +INSERT INTO product_slots VALUES(2,123); +INSERT INTO product_slots VALUES(2,124); +INSERT INTO product_slots VALUES(2,125); +INSERT INTO product_slots VALUES(2,126); +INSERT INTO product_slots VALUES(2,127); +INSERT INTO product_slots VALUES(2,128); +INSERT INTO product_slots VALUES(2,129); +INSERT INTO product_slots VALUES(2,130); +INSERT INTO product_slots VALUES(2,131); +INSERT INTO product_slots VALUES(2,132); +INSERT INTO product_slots VALUES(2,133); +INSERT INTO product_slots VALUES(2,134); +INSERT INTO product_slots VALUES(2,135); +INSERT INTO product_slots VALUES(2,136); +INSERT INTO product_slots VALUES(2,137); +INSERT INTO product_slots VALUES(2,138); +INSERT INTO product_slots VALUES(2,139); +INSERT INTO product_slots VALUES(2,140); +INSERT INTO product_slots VALUES(2,141); +INSERT INTO product_slots VALUES(2,142); +INSERT INTO product_slots VALUES(2,143); +INSERT INTO product_slots VALUES(2,144); +INSERT INTO product_slots VALUES(2,145); +INSERT INTO product_slots VALUES(2,146); +INSERT INTO product_slots VALUES(2,147); +INSERT INTO product_slots VALUES(2,148); +INSERT INTO product_slots VALUES(2,149); +INSERT INTO product_slots VALUES(2,150); +INSERT INTO product_slots VALUES(2,151); +INSERT INTO product_slots VALUES(2,152); +INSERT INTO product_slots VALUES(2,153); +INSERT INTO product_slots VALUES(2,154); +INSERT INTO product_slots VALUES(2,155); +INSERT INTO product_slots VALUES(2,156); +INSERT INTO product_slots VALUES(2,157); +INSERT INTO product_slots VALUES(2,158); +INSERT INTO product_slots VALUES(2,159); +INSERT INTO product_slots VALUES(2,160); +INSERT INTO product_slots VALUES(2,161); +INSERT INTO product_slots VALUES(2,162); +INSERT INTO product_slots VALUES(2,163); +INSERT INTO product_slots VALUES(2,164); +INSERT INTO product_slots VALUES(2,165); +INSERT INTO product_slots VALUES(2,166); +INSERT INTO product_slots VALUES(2,167); +INSERT INTO product_slots VALUES(2,168); +INSERT INTO product_slots VALUES(2,169); +INSERT INTO product_slots VALUES(2,170); +INSERT INTO product_slots VALUES(2,171); +INSERT INTO product_slots VALUES(2,172); +INSERT INTO product_slots VALUES(2,173); +INSERT INTO product_slots VALUES(2,174); +INSERT INTO product_slots VALUES(2,175); +INSERT INTO product_slots VALUES(2,176); +INSERT INTO product_slots VALUES(2,177); +INSERT INTO product_slots VALUES(2,178); +INSERT INTO product_slots VALUES(2,179); +INSERT INTO product_slots VALUES(2,180); +INSERT INTO product_slots VALUES(2,181); +INSERT INTO product_slots VALUES(2,182); +INSERT INTO product_slots VALUES(2,183); +INSERT INTO product_slots VALUES(2,184); +INSERT INTO product_slots VALUES(2,185); +INSERT INTO product_slots VALUES(2,186); +INSERT INTO product_slots VALUES(2,187); +INSERT INTO product_slots VALUES(2,188); +INSERT INTO product_slots VALUES(2,189); +INSERT INTO product_slots VALUES(2,190); +INSERT INTO product_slots VALUES(2,191); +INSERT INTO product_slots VALUES(2,192); +INSERT INTO product_slots VALUES(2,193); +INSERT INTO product_slots VALUES(2,194); +INSERT INTO product_slots VALUES(2,195); +INSERT INTO product_slots VALUES(2,196); +INSERT INTO product_slots VALUES(2,197); +INSERT INTO product_slots VALUES(2,198); +INSERT INTO product_slots VALUES(2,199); +INSERT INTO product_slots VALUES(2,200); +INSERT INTO product_slots VALUES(2,201); +INSERT INTO product_slots VALUES(2,202); +INSERT INTO product_slots VALUES(2,203); +INSERT INTO product_slots VALUES(2,204); +INSERT INTO product_slots VALUES(2,205); +INSERT INTO product_slots VALUES(2,206); +INSERT INTO product_slots VALUES(2,207); +INSERT INTO product_slots VALUES(2,208); +INSERT INTO product_slots VALUES(2,209); +INSERT INTO product_slots VALUES(2,210); +INSERT INTO product_slots VALUES(2,211); +INSERT INTO product_slots VALUES(2,212); +INSERT INTO product_slots VALUES(2,213); +INSERT INTO product_slots VALUES(2,214); +INSERT INTO product_slots VALUES(2,215); +INSERT INTO product_slots VALUES(2,216); +INSERT INTO product_slots VALUES(2,217); +INSERT INTO product_slots VALUES(2,218); +INSERT INTO product_slots VALUES(2,219); +INSERT INTO product_slots VALUES(2,220); +INSERT INTO product_slots VALUES(2,221); +INSERT INTO product_slots VALUES(2,222); +INSERT INTO product_slots VALUES(2,223); +INSERT INTO product_slots VALUES(2,224); +INSERT INTO product_slots VALUES(2,225); +INSERT INTO product_slots VALUES(2,226); +INSERT INTO product_slots VALUES(2,227); +INSERT INTO product_slots VALUES(2,228); +INSERT INTO product_slots VALUES(2,229); +INSERT INTO product_slots VALUES(2,230); +INSERT INTO product_slots VALUES(2,231); +INSERT INTO product_slots VALUES(2,232); +INSERT INTO product_slots VALUES(2,234); +INSERT INTO product_slots VALUES(2,235); +INSERT INTO product_slots VALUES(2,236); +INSERT INTO product_slots VALUES(2,237); +INSERT INTO product_slots VALUES(2,238); +INSERT INTO product_slots VALUES(2,239); +INSERT INTO product_slots VALUES(2,240); +INSERT INTO product_slots VALUES(2,241); +INSERT INTO product_slots VALUES(2,242); +INSERT INTO product_slots VALUES(2,243); +INSERT INTO product_slots VALUES(2,244); +INSERT INTO product_slots VALUES(2,274); +INSERT INTO product_slots VALUES(2,275); +INSERT INTO product_slots VALUES(2,279); +INSERT INTO product_slots VALUES(2,280); +INSERT INTO product_slots VALUES(2,281); +INSERT INTO product_slots VALUES(2,282); +INSERT INTO product_slots VALUES(3,1); +INSERT INTO product_slots VALUES(3,2); +INSERT INTO product_slots VALUES(3,3); +INSERT INTO product_slots VALUES(3,4); +INSERT INTO product_slots VALUES(3,5); +INSERT INTO product_slots VALUES(3,6); +INSERT INTO product_slots VALUES(3,7); +INSERT INTO product_slots VALUES(3,8); +INSERT INTO product_slots VALUES(3,12); +INSERT INTO product_slots VALUES(3,18); +INSERT INTO product_slots VALUES(3,19); +INSERT INTO product_slots VALUES(3,20); +INSERT INTO product_slots VALUES(3,21); +INSERT INTO product_slots VALUES(3,22); +INSERT INTO product_slots VALUES(3,23); +INSERT INTO product_slots VALUES(3,31); +INSERT INTO product_slots VALUES(3,33); +INSERT INTO product_slots VALUES(3,35); +INSERT INTO product_slots VALUES(3,37); +INSERT INTO product_slots VALUES(3,38); +INSERT INTO product_slots VALUES(3,39); +INSERT INTO product_slots VALUES(3,40); +INSERT INTO product_slots VALUES(3,41); +INSERT INTO product_slots VALUES(3,43); +INSERT INTO product_slots VALUES(3,45); +INSERT INTO product_slots VALUES(3,46); +INSERT INTO product_slots VALUES(3,47); +INSERT INTO product_slots VALUES(3,48); +INSERT INTO product_slots VALUES(3,49); +INSERT INTO product_slots VALUES(3,50); +INSERT INTO product_slots VALUES(3,51); +INSERT INTO product_slots VALUES(3,52); +INSERT INTO product_slots VALUES(3,53); +INSERT INTO product_slots VALUES(3,54); +INSERT INTO product_slots VALUES(3,55); +INSERT INTO product_slots VALUES(3,56); +INSERT INTO product_slots VALUES(3,57); +INSERT INTO product_slots VALUES(3,58); +INSERT INTO product_slots VALUES(3,59); +INSERT INTO product_slots VALUES(3,60); +INSERT INTO product_slots VALUES(3,61); +INSERT INTO product_slots VALUES(3,62); +INSERT INTO product_slots VALUES(3,63); +INSERT INTO product_slots VALUES(3,64); +INSERT INTO product_slots VALUES(3,65); +INSERT INTO product_slots VALUES(3,66); +INSERT INTO product_slots VALUES(3,67); +INSERT INTO product_slots VALUES(3,68); +INSERT INTO product_slots VALUES(3,69); +INSERT INTO product_slots VALUES(3,70); +INSERT INTO product_slots VALUES(3,71); +INSERT INTO product_slots VALUES(3,72); +INSERT INTO product_slots VALUES(3,73); +INSERT INTO product_slots VALUES(3,74); +INSERT INTO product_slots VALUES(3,75); +INSERT INTO product_slots VALUES(3,76); +INSERT INTO product_slots VALUES(3,77); +INSERT INTO product_slots VALUES(3,78); +INSERT INTO product_slots VALUES(3,79); +INSERT INTO product_slots VALUES(3,80); +INSERT INTO product_slots VALUES(3,81); +INSERT INTO product_slots VALUES(3,82); +INSERT INTO product_slots VALUES(3,83); +INSERT INTO product_slots VALUES(3,84); +INSERT INTO product_slots VALUES(3,85); +INSERT INTO product_slots VALUES(3,86); +INSERT INTO product_slots VALUES(3,87); +INSERT INTO product_slots VALUES(3,88); +INSERT INTO product_slots VALUES(3,89); +INSERT INTO product_slots VALUES(3,90); +INSERT INTO product_slots VALUES(3,91); +INSERT INTO product_slots VALUES(3,92); +INSERT INTO product_slots VALUES(3,93); +INSERT INTO product_slots VALUES(3,94); +INSERT INTO product_slots VALUES(3,95); +INSERT INTO product_slots VALUES(3,96); +INSERT INTO product_slots VALUES(3,97); +INSERT INTO product_slots VALUES(3,98); +INSERT INTO product_slots VALUES(3,99); +INSERT INTO product_slots VALUES(3,100); +INSERT INTO product_slots VALUES(3,101); +INSERT INTO product_slots VALUES(3,102); +INSERT INTO product_slots VALUES(3,103); +INSERT INTO product_slots VALUES(3,104); +INSERT INTO product_slots VALUES(3,105); +INSERT INTO product_slots VALUES(3,106); +INSERT INTO product_slots VALUES(3,107); +INSERT INTO product_slots VALUES(3,108); +INSERT INTO product_slots VALUES(3,109); +INSERT INTO product_slots VALUES(3,110); +INSERT INTO product_slots VALUES(3,111); +INSERT INTO product_slots VALUES(3,112); +INSERT INTO product_slots VALUES(3,113); +INSERT INTO product_slots VALUES(3,114); +INSERT INTO product_slots VALUES(3,115); +INSERT INTO product_slots VALUES(3,116); +INSERT INTO product_slots VALUES(3,117); +INSERT INTO product_slots VALUES(3,118); +INSERT INTO product_slots VALUES(3,119); +INSERT INTO product_slots VALUES(3,120); +INSERT INTO product_slots VALUES(3,121); +INSERT INTO product_slots VALUES(3,122); +INSERT INTO product_slots VALUES(3,123); +INSERT INTO product_slots VALUES(3,124); +INSERT INTO product_slots VALUES(3,125); +INSERT INTO product_slots VALUES(3,126); +INSERT INTO product_slots VALUES(3,127); +INSERT INTO product_slots VALUES(3,128); +INSERT INTO product_slots VALUES(3,129); +INSERT INTO product_slots VALUES(3,130); +INSERT INTO product_slots VALUES(3,131); +INSERT INTO product_slots VALUES(3,132); +INSERT INTO product_slots VALUES(3,133); +INSERT INTO product_slots VALUES(3,134); +INSERT INTO product_slots VALUES(3,135); +INSERT INTO product_slots VALUES(3,136); +INSERT INTO product_slots VALUES(3,137); +INSERT INTO product_slots VALUES(3,138); +INSERT INTO product_slots VALUES(3,139); +INSERT INTO product_slots VALUES(3,140); +INSERT INTO product_slots VALUES(3,141); +INSERT INTO product_slots VALUES(3,142); +INSERT INTO product_slots VALUES(3,143); +INSERT INTO product_slots VALUES(3,144); +INSERT INTO product_slots VALUES(3,145); +INSERT INTO product_slots VALUES(3,146); +INSERT INTO product_slots VALUES(3,147); +INSERT INTO product_slots VALUES(3,148); +INSERT INTO product_slots VALUES(3,149); +INSERT INTO product_slots VALUES(3,150); +INSERT INTO product_slots VALUES(3,151); +INSERT INTO product_slots VALUES(3,152); +INSERT INTO product_slots VALUES(3,153); +INSERT INTO product_slots VALUES(3,154); +INSERT INTO product_slots VALUES(3,155); +INSERT INTO product_slots VALUES(3,156); +INSERT INTO product_slots VALUES(3,157); +INSERT INTO product_slots VALUES(3,158); +INSERT INTO product_slots VALUES(3,159); +INSERT INTO product_slots VALUES(3,160); +INSERT INTO product_slots VALUES(3,161); +INSERT INTO product_slots VALUES(3,162); +INSERT INTO product_slots VALUES(3,163); +INSERT INTO product_slots VALUES(3,164); +INSERT INTO product_slots VALUES(3,165); +INSERT INTO product_slots VALUES(3,166); +INSERT INTO product_slots VALUES(3,167); +INSERT INTO product_slots VALUES(3,168); +INSERT INTO product_slots VALUES(3,169); +INSERT INTO product_slots VALUES(3,170); +INSERT INTO product_slots VALUES(3,171); +INSERT INTO product_slots VALUES(3,172); +INSERT INTO product_slots VALUES(3,173); +INSERT INTO product_slots VALUES(3,174); +INSERT INTO product_slots VALUES(3,175); +INSERT INTO product_slots VALUES(3,176); +INSERT INTO product_slots VALUES(3,177); +INSERT INTO product_slots VALUES(3,178); +INSERT INTO product_slots VALUES(3,179); +INSERT INTO product_slots VALUES(3,180); +INSERT INTO product_slots VALUES(3,181); +INSERT INTO product_slots VALUES(3,182); +INSERT INTO product_slots VALUES(3,183); +INSERT INTO product_slots VALUES(3,184); +INSERT INTO product_slots VALUES(3,185); +INSERT INTO product_slots VALUES(3,186); +INSERT INTO product_slots VALUES(3,187); +INSERT INTO product_slots VALUES(3,188); +INSERT INTO product_slots VALUES(3,189); +INSERT INTO product_slots VALUES(3,190); +INSERT INTO product_slots VALUES(3,191); +INSERT INTO product_slots VALUES(3,192); +INSERT INTO product_slots VALUES(3,193); +INSERT INTO product_slots VALUES(3,194); +INSERT INTO product_slots VALUES(3,195); +INSERT INTO product_slots VALUES(3,196); +INSERT INTO product_slots VALUES(3,197); +INSERT INTO product_slots VALUES(3,198); +INSERT INTO product_slots VALUES(3,199); +INSERT INTO product_slots VALUES(3,200); +INSERT INTO product_slots VALUES(3,201); +INSERT INTO product_slots VALUES(3,202); +INSERT INTO product_slots VALUES(3,203); +INSERT INTO product_slots VALUES(3,204); +INSERT INTO product_slots VALUES(3,205); +INSERT INTO product_slots VALUES(3,206); +INSERT INTO product_slots VALUES(3,207); +INSERT INTO product_slots VALUES(3,208); +INSERT INTO product_slots VALUES(3,209); +INSERT INTO product_slots VALUES(3,210); +INSERT INTO product_slots VALUES(3,211); +INSERT INTO product_slots VALUES(3,212); +INSERT INTO product_slots VALUES(3,213); +INSERT INTO product_slots VALUES(3,214); +INSERT INTO product_slots VALUES(3,215); +INSERT INTO product_slots VALUES(3,216); +INSERT INTO product_slots VALUES(3,217); +INSERT INTO product_slots VALUES(3,218); +INSERT INTO product_slots VALUES(3,219); +INSERT INTO product_slots VALUES(3,220); +INSERT INTO product_slots VALUES(3,221); +INSERT INTO product_slots VALUES(3,222); +INSERT INTO product_slots VALUES(3,223); +INSERT INTO product_slots VALUES(3,224); +INSERT INTO product_slots VALUES(3,225); +INSERT INTO product_slots VALUES(3,226); +INSERT INTO product_slots VALUES(3,227); +INSERT INTO product_slots VALUES(3,228); +INSERT INTO product_slots VALUES(3,229); +INSERT INTO product_slots VALUES(3,230); +INSERT INTO product_slots VALUES(3,231); +INSERT INTO product_slots VALUES(3,232); +INSERT INTO product_slots VALUES(3,234); +INSERT INTO product_slots VALUES(3,235); +INSERT INTO product_slots VALUES(3,236); +INSERT INTO product_slots VALUES(3,237); +INSERT INTO product_slots VALUES(3,238); +INSERT INTO product_slots VALUES(3,239); +INSERT INTO product_slots VALUES(3,240); +INSERT INTO product_slots VALUES(3,241); +INSERT INTO product_slots VALUES(3,242); +INSERT INTO product_slots VALUES(3,243); +INSERT INTO product_slots VALUES(3,244); +INSERT INTO product_slots VALUES(3,274); +INSERT INTO product_slots VALUES(3,275); +INSERT INTO product_slots VALUES(3,279); +INSERT INTO product_slots VALUES(3,280); +INSERT INTO product_slots VALUES(3,281); +INSERT INTO product_slots VALUES(3,282); +INSERT INTO product_slots VALUES(4,1); +INSERT INTO product_slots VALUES(4,2); +INSERT INTO product_slots VALUES(4,3); +INSERT INTO product_slots VALUES(4,4); +INSERT INTO product_slots VALUES(4,5); +INSERT INTO product_slots VALUES(4,6); +INSERT INTO product_slots VALUES(4,7); +INSERT INTO product_slots VALUES(4,18); +INSERT INTO product_slots VALUES(4,19); +INSERT INTO product_slots VALUES(4,20); +INSERT INTO product_slots VALUES(4,21); +INSERT INTO product_slots VALUES(4,22); +INSERT INTO product_slots VALUES(4,33); +INSERT INTO product_slots VALUES(4,35); +INSERT INTO product_slots VALUES(4,37); +INSERT INTO product_slots VALUES(4,38); +INSERT INTO product_slots VALUES(4,39); +INSERT INTO product_slots VALUES(4,40); +INSERT INTO product_slots VALUES(4,41); +INSERT INTO product_slots VALUES(4,43); +INSERT INTO product_slots VALUES(4,45); +INSERT INTO product_slots VALUES(4,46); +INSERT INTO product_slots VALUES(4,47); +INSERT INTO product_slots VALUES(4,48); +INSERT INTO product_slots VALUES(4,49); +INSERT INTO product_slots VALUES(4,50); +INSERT INTO product_slots VALUES(4,51); +INSERT INTO product_slots VALUES(4,52); +INSERT INTO product_slots VALUES(4,53); +INSERT INTO product_slots VALUES(4,54); +INSERT INTO product_slots VALUES(4,55); +INSERT INTO product_slots VALUES(4,56); +INSERT INTO product_slots VALUES(4,57); +INSERT INTO product_slots VALUES(4,58); +INSERT INTO product_slots VALUES(4,59); +INSERT INTO product_slots VALUES(4,60); +INSERT INTO product_slots VALUES(4,61); +INSERT INTO product_slots VALUES(4,62); +INSERT INTO product_slots VALUES(4,63); +INSERT INTO product_slots VALUES(4,64); +INSERT INTO product_slots VALUES(4,65); +INSERT INTO product_slots VALUES(4,66); +INSERT INTO product_slots VALUES(4,67); +INSERT INTO product_slots VALUES(4,68); +INSERT INTO product_slots VALUES(4,69); +INSERT INTO product_slots VALUES(4,70); +INSERT INTO product_slots VALUES(4,71); +INSERT INTO product_slots VALUES(4,74); +INSERT INTO product_slots VALUES(4,75); +INSERT INTO product_slots VALUES(4,76); +INSERT INTO product_slots VALUES(4,77); +INSERT INTO product_slots VALUES(4,78); +INSERT INTO product_slots VALUES(4,81); +INSERT INTO product_slots VALUES(4,82); +INSERT INTO product_slots VALUES(4,83); +INSERT INTO product_slots VALUES(4,84); +INSERT INTO product_slots VALUES(4,87); +INSERT INTO product_slots VALUES(4,88); +INSERT INTO product_slots VALUES(4,89); +INSERT INTO product_slots VALUES(4,90); +INSERT INTO product_slots VALUES(4,91); +INSERT INTO product_slots VALUES(4,95); +INSERT INTO product_slots VALUES(4,96); +INSERT INTO product_slots VALUES(4,97); +INSERT INTO product_slots VALUES(4,98); +INSERT INTO product_slots VALUES(4,101); +INSERT INTO product_slots VALUES(4,102); +INSERT INTO product_slots VALUES(4,103); +INSERT INTO product_slots VALUES(4,104); +INSERT INTO product_slots VALUES(4,109); +INSERT INTO product_slots VALUES(4,110); +INSERT INTO product_slots VALUES(4,111); +INSERT INTO product_slots VALUES(4,112); +INSERT INTO product_slots VALUES(4,116); +INSERT INTO product_slots VALUES(4,117); +INSERT INTO product_slots VALUES(4,118); +INSERT INTO product_slots VALUES(4,119); +INSERT INTO product_slots VALUES(4,120); +INSERT INTO product_slots VALUES(4,123); +INSERT INTO product_slots VALUES(4,124); +INSERT INTO product_slots VALUES(4,125); +INSERT INTO product_slots VALUES(4,126); +INSERT INTO product_slots VALUES(4,130); +INSERT INTO product_slots VALUES(4,131); +INSERT INTO product_slots VALUES(4,132); +INSERT INTO product_slots VALUES(4,133); +INSERT INTO product_slots VALUES(4,137); +INSERT INTO product_slots VALUES(4,138); +INSERT INTO product_slots VALUES(4,139); +INSERT INTO product_slots VALUES(4,140); +INSERT INTO product_slots VALUES(4,144); +INSERT INTO product_slots VALUES(4,145); +INSERT INTO product_slots VALUES(4,146); +INSERT INTO product_slots VALUES(4,147); +INSERT INTO product_slots VALUES(4,148); +INSERT INTO product_slots VALUES(4,149); +INSERT INTO product_slots VALUES(4,150); +INSERT INTO product_slots VALUES(4,151); +INSERT INTO product_slots VALUES(4,155); +INSERT INTO product_slots VALUES(4,156); +INSERT INTO product_slots VALUES(4,157); +INSERT INTO product_slots VALUES(4,158); +INSERT INTO product_slots VALUES(4,162); +INSERT INTO product_slots VALUES(4,163); +INSERT INTO product_slots VALUES(4,164); +INSERT INTO product_slots VALUES(4,165); +INSERT INTO product_slots VALUES(4,166); +INSERT INTO product_slots VALUES(4,169); +INSERT INTO product_slots VALUES(4,170); +INSERT INTO product_slots VALUES(4,171); +INSERT INTO product_slots VALUES(4,172); +INSERT INTO product_slots VALUES(4,173); +INSERT INTO product_slots VALUES(4,176); +INSERT INTO product_slots VALUES(4,177); +INSERT INTO product_slots VALUES(4,178); +INSERT INTO product_slots VALUES(4,179); +INSERT INTO product_slots VALUES(4,180); +INSERT INTO product_slots VALUES(4,181); +INSERT INTO product_slots VALUES(4,182); +INSERT INTO product_slots VALUES(4,183); +INSERT INTO product_slots VALUES(4,184); +INSERT INTO product_slots VALUES(4,185); +INSERT INTO product_slots VALUES(4,186); +INSERT INTO product_slots VALUES(4,187); +INSERT INTO product_slots VALUES(4,188); +INSERT INTO product_slots VALUES(4,189); +INSERT INTO product_slots VALUES(4,190); +INSERT INTO product_slots VALUES(4,191); +INSERT INTO product_slots VALUES(4,192); +INSERT INTO product_slots VALUES(4,193); +INSERT INTO product_slots VALUES(4,194); +INSERT INTO product_slots VALUES(4,198); +INSERT INTO product_slots VALUES(4,199); +INSERT INTO product_slots VALUES(4,200); +INSERT INTO product_slots VALUES(4,201); +INSERT INTO product_slots VALUES(4,202); +INSERT INTO product_slots VALUES(4,203); +INSERT INTO product_slots VALUES(4,205); +INSERT INTO product_slots VALUES(4,208); +INSERT INTO product_slots VALUES(4,209); +INSERT INTO product_slots VALUES(4,210); +INSERT INTO product_slots VALUES(4,211); +INSERT INTO product_slots VALUES(4,216); +INSERT INTO product_slots VALUES(4,217); +INSERT INTO product_slots VALUES(4,218); +INSERT INTO product_slots VALUES(4,219); +INSERT INTO product_slots VALUES(4,220); +INSERT INTO product_slots VALUES(4,223); +INSERT INTO product_slots VALUES(4,224); +INSERT INTO product_slots VALUES(4,225); +INSERT INTO product_slots VALUES(4,226); +INSERT INTO product_slots VALUES(4,230); +INSERT INTO product_slots VALUES(4,231); +INSERT INTO product_slots VALUES(4,232); +INSERT INTO product_slots VALUES(4,234); +INSERT INTO product_slots VALUES(4,237); +INSERT INTO product_slots VALUES(4,238); +INSERT INTO product_slots VALUES(4,239); +INSERT INTO product_slots VALUES(4,240); +INSERT INTO product_slots VALUES(4,274); +INSERT INTO product_slots VALUES(4,275); +INSERT INTO product_slots VALUES(4,277); +INSERT INTO product_slots VALUES(4,278); +INSERT INTO product_slots VALUES(4,279); +INSERT INTO product_slots VALUES(5,1); +INSERT INTO product_slots VALUES(5,3); +INSERT INTO product_slots VALUES(5,4); +INSERT INTO product_slots VALUES(5,5); +INSERT INTO product_slots VALUES(5,6); +INSERT INTO product_slots VALUES(5,7); +INSERT INTO product_slots VALUES(5,8); +INSERT INTO product_slots VALUES(5,16); +INSERT INTO product_slots VALUES(5,18); +INSERT INTO product_slots VALUES(5,20); +INSERT INTO product_slots VALUES(5,21); +INSERT INTO product_slots VALUES(5,22); +INSERT INTO product_slots VALUES(5,33); +INSERT INTO product_slots VALUES(5,35); +INSERT INTO product_slots VALUES(5,37); +INSERT INTO product_slots VALUES(5,38); +INSERT INTO product_slots VALUES(5,39); +INSERT INTO product_slots VALUES(5,40); +INSERT INTO product_slots VALUES(5,41); +INSERT INTO product_slots VALUES(5,43); +INSERT INTO product_slots VALUES(5,44); +INSERT INTO product_slots VALUES(5,45); +INSERT INTO product_slots VALUES(5,46); +INSERT INTO product_slots VALUES(5,47); +INSERT INTO product_slots VALUES(5,48); +INSERT INTO product_slots VALUES(5,49); +INSERT INTO product_slots VALUES(5,50); +INSERT INTO product_slots VALUES(5,51); +INSERT INTO product_slots VALUES(5,52); +INSERT INTO product_slots VALUES(5,53); +INSERT INTO product_slots VALUES(5,54); +INSERT INTO product_slots VALUES(5,55); +INSERT INTO product_slots VALUES(5,56); +INSERT INTO product_slots VALUES(5,57); +INSERT INTO product_slots VALUES(5,58); +INSERT INTO product_slots VALUES(5,59); +INSERT INTO product_slots VALUES(5,60); +INSERT INTO product_slots VALUES(5,61); +INSERT INTO product_slots VALUES(5,62); +INSERT INTO product_slots VALUES(5,63); +INSERT INTO product_slots VALUES(5,64); +INSERT INTO product_slots VALUES(5,65); +INSERT INTO product_slots VALUES(5,66); +INSERT INTO product_slots VALUES(5,67); +INSERT INTO product_slots VALUES(5,68); +INSERT INTO product_slots VALUES(5,69); +INSERT INTO product_slots VALUES(5,70); +INSERT INTO product_slots VALUES(5,71); +INSERT INTO product_slots VALUES(5,72); +INSERT INTO product_slots VALUES(5,73); +INSERT INTO product_slots VALUES(5,74); +INSERT INTO product_slots VALUES(5,75); +INSERT INTO product_slots VALUES(5,76); +INSERT INTO product_slots VALUES(5,77); +INSERT INTO product_slots VALUES(5,78); +INSERT INTO product_slots VALUES(5,79); +INSERT INTO product_slots VALUES(5,80); +INSERT INTO product_slots VALUES(5,81); +INSERT INTO product_slots VALUES(5,82); +INSERT INTO product_slots VALUES(5,83); +INSERT INTO product_slots VALUES(5,84); +INSERT INTO product_slots VALUES(5,85); +INSERT INTO product_slots VALUES(5,86); +INSERT INTO product_slots VALUES(5,87); +INSERT INTO product_slots VALUES(5,88); +INSERT INTO product_slots VALUES(5,89); +INSERT INTO product_slots VALUES(5,90); +INSERT INTO product_slots VALUES(5,91); +INSERT INTO product_slots VALUES(5,92); +INSERT INTO product_slots VALUES(5,93); +INSERT INTO product_slots VALUES(5,94); +INSERT INTO product_slots VALUES(5,95); +INSERT INTO product_slots VALUES(5,96); +INSERT INTO product_slots VALUES(5,97); +INSERT INTO product_slots VALUES(5,98); +INSERT INTO product_slots VALUES(5,99); +INSERT INTO product_slots VALUES(5,100); +INSERT INTO product_slots VALUES(5,101); +INSERT INTO product_slots VALUES(5,102); +INSERT INTO product_slots VALUES(5,103); +INSERT INTO product_slots VALUES(5,104); +INSERT INTO product_slots VALUES(5,105); +INSERT INTO product_slots VALUES(5,106); +INSERT INTO product_slots VALUES(5,107); +INSERT INTO product_slots VALUES(5,108); +INSERT INTO product_slots VALUES(5,109); +INSERT INTO product_slots VALUES(5,110); +INSERT INTO product_slots VALUES(5,111); +INSERT INTO product_slots VALUES(5,112); +INSERT INTO product_slots VALUES(5,113); +INSERT INTO product_slots VALUES(5,114); +INSERT INTO product_slots VALUES(5,115); +INSERT INTO product_slots VALUES(5,116); +INSERT INTO product_slots VALUES(5,117); +INSERT INTO product_slots VALUES(5,118); +INSERT INTO product_slots VALUES(5,119); +INSERT INTO product_slots VALUES(5,120); +INSERT INTO product_slots VALUES(5,121); +INSERT INTO product_slots VALUES(5,122); +INSERT INTO product_slots VALUES(5,123); +INSERT INTO product_slots VALUES(5,124); +INSERT INTO product_slots VALUES(5,125); +INSERT INTO product_slots VALUES(5,126); +INSERT INTO product_slots VALUES(5,127); +INSERT INTO product_slots VALUES(5,128); +INSERT INTO product_slots VALUES(5,129); +INSERT INTO product_slots VALUES(5,130); +INSERT INTO product_slots VALUES(5,131); +INSERT INTO product_slots VALUES(5,132); +INSERT INTO product_slots VALUES(5,133); +INSERT INTO product_slots VALUES(5,134); +INSERT INTO product_slots VALUES(5,135); +INSERT INTO product_slots VALUES(5,136); +INSERT INTO product_slots VALUES(5,137); +INSERT INTO product_slots VALUES(5,138); +INSERT INTO product_slots VALUES(5,139); +INSERT INTO product_slots VALUES(5,140); +INSERT INTO product_slots VALUES(5,141); +INSERT INTO product_slots VALUES(5,142); +INSERT INTO product_slots VALUES(5,143); +INSERT INTO product_slots VALUES(5,144); +INSERT INTO product_slots VALUES(5,145); +INSERT INTO product_slots VALUES(5,146); +INSERT INTO product_slots VALUES(5,147); +INSERT INTO product_slots VALUES(5,148); +INSERT INTO product_slots VALUES(5,149); +INSERT INTO product_slots VALUES(5,150); +INSERT INTO product_slots VALUES(5,151); +INSERT INTO product_slots VALUES(5,152); +INSERT INTO product_slots VALUES(5,153); +INSERT INTO product_slots VALUES(5,154); +INSERT INTO product_slots VALUES(5,155); +INSERT INTO product_slots VALUES(5,156); +INSERT INTO product_slots VALUES(5,157); +INSERT INTO product_slots VALUES(5,158); +INSERT INTO product_slots VALUES(5,159); +INSERT INTO product_slots VALUES(5,160); +INSERT INTO product_slots VALUES(5,161); +INSERT INTO product_slots VALUES(5,162); +INSERT INTO product_slots VALUES(5,163); +INSERT INTO product_slots VALUES(5,164); +INSERT INTO product_slots VALUES(5,165); +INSERT INTO product_slots VALUES(5,166); +INSERT INTO product_slots VALUES(5,167); +INSERT INTO product_slots VALUES(5,168); +INSERT INTO product_slots VALUES(5,169); +INSERT INTO product_slots VALUES(5,170); +INSERT INTO product_slots VALUES(5,171); +INSERT INTO product_slots VALUES(5,172); +INSERT INTO product_slots VALUES(5,173); +INSERT INTO product_slots VALUES(5,174); +INSERT INTO product_slots VALUES(5,175); +INSERT INTO product_slots VALUES(5,176); +INSERT INTO product_slots VALUES(5,177); +INSERT INTO product_slots VALUES(5,178); +INSERT INTO product_slots VALUES(5,179); +INSERT INTO product_slots VALUES(5,180); +INSERT INTO product_slots VALUES(5,181); +INSERT INTO product_slots VALUES(5,182); +INSERT INTO product_slots VALUES(5,183); +INSERT INTO product_slots VALUES(5,184); +INSERT INTO product_slots VALUES(5,185); +INSERT INTO product_slots VALUES(5,186); +INSERT INTO product_slots VALUES(5,187); +INSERT INTO product_slots VALUES(5,188); +INSERT INTO product_slots VALUES(5,189); +INSERT INTO product_slots VALUES(5,190); +INSERT INTO product_slots VALUES(5,191); +INSERT INTO product_slots VALUES(5,192); +INSERT INTO product_slots VALUES(5,193); +INSERT INTO product_slots VALUES(5,194); +INSERT INTO product_slots VALUES(5,195); +INSERT INTO product_slots VALUES(5,196); +INSERT INTO product_slots VALUES(5,197); +INSERT INTO product_slots VALUES(5,198); +INSERT INTO product_slots VALUES(5,199); +INSERT INTO product_slots VALUES(5,200); +INSERT INTO product_slots VALUES(5,201); +INSERT INTO product_slots VALUES(5,202); +INSERT INTO product_slots VALUES(5,203); +INSERT INTO product_slots VALUES(5,204); +INSERT INTO product_slots VALUES(5,205); +INSERT INTO product_slots VALUES(5,206); +INSERT INTO product_slots VALUES(5,207); +INSERT INTO product_slots VALUES(5,208); +INSERT INTO product_slots VALUES(5,209); +INSERT INTO product_slots VALUES(5,210); +INSERT INTO product_slots VALUES(5,211); +INSERT INTO product_slots VALUES(5,212); +INSERT INTO product_slots VALUES(5,213); +INSERT INTO product_slots VALUES(5,214); +INSERT INTO product_slots VALUES(5,215); +INSERT INTO product_slots VALUES(5,216); +INSERT INTO product_slots VALUES(5,217); +INSERT INTO product_slots VALUES(5,218); +INSERT INTO product_slots VALUES(5,219); +INSERT INTO product_slots VALUES(5,220); +INSERT INTO product_slots VALUES(5,221); +INSERT INTO product_slots VALUES(5,222); +INSERT INTO product_slots VALUES(5,223); +INSERT INTO product_slots VALUES(5,224); +INSERT INTO product_slots VALUES(5,225); +INSERT INTO product_slots VALUES(5,226); +INSERT INTO product_slots VALUES(5,227); +INSERT INTO product_slots VALUES(5,228); +INSERT INTO product_slots VALUES(5,229); +INSERT INTO product_slots VALUES(5,230); +INSERT INTO product_slots VALUES(5,231); +INSERT INTO product_slots VALUES(5,232); +INSERT INTO product_slots VALUES(5,233); +INSERT INTO product_slots VALUES(5,234); +INSERT INTO product_slots VALUES(5,235); +INSERT INTO product_slots VALUES(5,236); +INSERT INTO product_slots VALUES(5,237); +INSERT INTO product_slots VALUES(5,238); +INSERT INTO product_slots VALUES(5,239); +INSERT INTO product_slots VALUES(5,240); +INSERT INTO product_slots VALUES(5,241); +INSERT INTO product_slots VALUES(5,242); +INSERT INTO product_slots VALUES(5,243); +INSERT INTO product_slots VALUES(5,244); +INSERT INTO product_slots VALUES(5,274); +INSERT INTO product_slots VALUES(5,275); +INSERT INTO product_slots VALUES(5,279); +INSERT INTO product_slots VALUES(5,280); +INSERT INTO product_slots VALUES(5,281); +INSERT INTO product_slots VALUES(5,282); +INSERT INTO product_slots VALUES(5,283); +INSERT INTO product_slots VALUES(5,284); +INSERT INTO product_slots VALUES(5,285); +INSERT INTO product_slots VALUES(5,286); +INSERT INTO product_slots VALUES(5,287); +INSERT INTO product_slots VALUES(6,1); +INSERT INTO product_slots VALUES(6,2); +INSERT INTO product_slots VALUES(6,3); +INSERT INTO product_slots VALUES(6,4); +INSERT INTO product_slots VALUES(6,5); +INSERT INTO product_slots VALUES(6,6); +INSERT INTO product_slots VALUES(6,7); +INSERT INTO product_slots VALUES(6,8); +INSERT INTO product_slots VALUES(6,13); +INSERT INTO product_slots VALUES(6,14); +INSERT INTO product_slots VALUES(6,16); +INSERT INTO product_slots VALUES(6,17); +INSERT INTO product_slots VALUES(6,18); +INSERT INTO product_slots VALUES(6,20); +INSERT INTO product_slots VALUES(6,21); +INSERT INTO product_slots VALUES(6,22); +INSERT INTO product_slots VALUES(6,33); +INSERT INTO product_slots VALUES(6,35); +INSERT INTO product_slots VALUES(6,37); +INSERT INTO product_slots VALUES(6,38); +INSERT INTO product_slots VALUES(6,39); +INSERT INTO product_slots VALUES(6,40); +INSERT INTO product_slots VALUES(6,41); +INSERT INTO product_slots VALUES(6,43); +INSERT INTO product_slots VALUES(6,44); +INSERT INTO product_slots VALUES(6,45); +INSERT INTO product_slots VALUES(6,46); +INSERT INTO product_slots VALUES(6,47); +INSERT INTO product_slots VALUES(6,48); +INSERT INTO product_slots VALUES(6,49); +INSERT INTO product_slots VALUES(6,50); +INSERT INTO product_slots VALUES(6,51); +INSERT INTO product_slots VALUES(6,52); +INSERT INTO product_slots VALUES(6,53); +INSERT INTO product_slots VALUES(6,54); +INSERT INTO product_slots VALUES(6,55); +INSERT INTO product_slots VALUES(6,56); +INSERT INTO product_slots VALUES(6,57); +INSERT INTO product_slots VALUES(6,58); +INSERT INTO product_slots VALUES(6,59); +INSERT INTO product_slots VALUES(6,60); +INSERT INTO product_slots VALUES(6,61); +INSERT INTO product_slots VALUES(6,62); +INSERT INTO product_slots VALUES(6,63); +INSERT INTO product_slots VALUES(6,64); +INSERT INTO product_slots VALUES(6,65); +INSERT INTO product_slots VALUES(6,66); +INSERT INTO product_slots VALUES(6,67); +INSERT INTO product_slots VALUES(6,68); +INSERT INTO product_slots VALUES(6,69); +INSERT INTO product_slots VALUES(6,70); +INSERT INTO product_slots VALUES(6,71); +INSERT INTO product_slots VALUES(6,72); +INSERT INTO product_slots VALUES(6,73); +INSERT INTO product_slots VALUES(6,74); +INSERT INTO product_slots VALUES(6,75); +INSERT INTO product_slots VALUES(6,76); +INSERT INTO product_slots VALUES(6,77); +INSERT INTO product_slots VALUES(6,78); +INSERT INTO product_slots VALUES(6,79); +INSERT INTO product_slots VALUES(6,80); +INSERT INTO product_slots VALUES(6,81); +INSERT INTO product_slots VALUES(6,82); +INSERT INTO product_slots VALUES(6,83); +INSERT INTO product_slots VALUES(6,84); +INSERT INTO product_slots VALUES(6,87); +INSERT INTO product_slots VALUES(6,88); +INSERT INTO product_slots VALUES(6,89); +INSERT INTO product_slots VALUES(6,90); +INSERT INTO product_slots VALUES(6,91); +INSERT INTO product_slots VALUES(6,92); +INSERT INTO product_slots VALUES(6,93); +INSERT INTO product_slots VALUES(6,94); +INSERT INTO product_slots VALUES(6,95); +INSERT INTO product_slots VALUES(6,96); +INSERT INTO product_slots VALUES(6,97); +INSERT INTO product_slots VALUES(6,98); +INSERT INTO product_slots VALUES(6,99); +INSERT INTO product_slots VALUES(6,100); +INSERT INTO product_slots VALUES(6,102); +INSERT INTO product_slots VALUES(6,103); +INSERT INTO product_slots VALUES(6,104); +INSERT INTO product_slots VALUES(6,109); +INSERT INTO product_slots VALUES(6,110); +INSERT INTO product_slots VALUES(6,111); +INSERT INTO product_slots VALUES(6,112); +INSERT INTO product_slots VALUES(6,117); +INSERT INTO product_slots VALUES(6,118); +INSERT INTO product_slots VALUES(6,119); +INSERT INTO product_slots VALUES(6,120); +INSERT INTO product_slots VALUES(6,121); +INSERT INTO product_slots VALUES(6,122); +INSERT INTO product_slots VALUES(6,123); +INSERT INTO product_slots VALUES(6,124); +INSERT INTO product_slots VALUES(6,125); +INSERT INTO product_slots VALUES(6,126); +INSERT INTO product_slots VALUES(6,127); +INSERT INTO product_slots VALUES(6,128); +INSERT INTO product_slots VALUES(6,129); +INSERT INTO product_slots VALUES(6,130); +INSERT INTO product_slots VALUES(6,131); +INSERT INTO product_slots VALUES(6,132); +INSERT INTO product_slots VALUES(6,133); +INSERT INTO product_slots VALUES(6,134); +INSERT INTO product_slots VALUES(6,135); +INSERT INTO product_slots VALUES(6,136); +INSERT INTO product_slots VALUES(6,138); +INSERT INTO product_slots VALUES(6,139); +INSERT INTO product_slots VALUES(6,140); +INSERT INTO product_slots VALUES(6,141); +INSERT INTO product_slots VALUES(6,142); +INSERT INTO product_slots VALUES(6,143); +INSERT INTO product_slots VALUES(6,145); +INSERT INTO product_slots VALUES(6,146); +INSERT INTO product_slots VALUES(6,147); +INSERT INTO product_slots VALUES(6,148); +INSERT INTO product_slots VALUES(6,149); +INSERT INTO product_slots VALUES(6,150); +INSERT INTO product_slots VALUES(6,151); +INSERT INTO product_slots VALUES(6,152); +INSERT INTO product_slots VALUES(6,153); +INSERT INTO product_slots VALUES(6,154); +INSERT INTO product_slots VALUES(6,155); +INSERT INTO product_slots VALUES(6,156); +INSERT INTO product_slots VALUES(6,157); +INSERT INTO product_slots VALUES(6,158); +INSERT INTO product_slots VALUES(6,159); +INSERT INTO product_slots VALUES(6,160); +INSERT INTO product_slots VALUES(6,161); +INSERT INTO product_slots VALUES(6,162); +INSERT INTO product_slots VALUES(6,163); +INSERT INTO product_slots VALUES(6,164); +INSERT INTO product_slots VALUES(6,165); +INSERT INTO product_slots VALUES(6,166); +INSERT INTO product_slots VALUES(6,169); +INSERT INTO product_slots VALUES(6,170); +INSERT INTO product_slots VALUES(6,171); +INSERT INTO product_slots VALUES(6,172); +INSERT INTO product_slots VALUES(6,173); +INSERT INTO product_slots VALUES(6,174); +INSERT INTO product_slots VALUES(6,175); +INSERT INTO product_slots VALUES(6,176); +INSERT INTO product_slots VALUES(6,177); +INSERT INTO product_slots VALUES(6,178); +INSERT INTO product_slots VALUES(6,179); +INSERT INTO product_slots VALUES(6,180); +INSERT INTO product_slots VALUES(6,181); +INSERT INTO product_slots VALUES(6,182); +INSERT INTO product_slots VALUES(6,183); +INSERT INTO product_slots VALUES(6,184); +INSERT INTO product_slots VALUES(6,185); +INSERT INTO product_slots VALUES(6,186); +INSERT INTO product_slots VALUES(6,187); +INSERT INTO product_slots VALUES(6,188); +INSERT INTO product_slots VALUES(6,189); +INSERT INTO product_slots VALUES(6,190); +INSERT INTO product_slots VALUES(6,191); +INSERT INTO product_slots VALUES(6,192); +INSERT INTO product_slots VALUES(6,193); +INSERT INTO product_slots VALUES(6,194); +INSERT INTO product_slots VALUES(6,198); +INSERT INTO product_slots VALUES(6,199); +INSERT INTO product_slots VALUES(6,200); +INSERT INTO product_slots VALUES(6,201); +INSERT INTO product_slots VALUES(6,202); +INSERT INTO product_slots VALUES(6,203); +INSERT INTO product_slots VALUES(6,204); +INSERT INTO product_slots VALUES(6,205); +INSERT INTO product_slots VALUES(6,206); +INSERT INTO product_slots VALUES(6,207); +INSERT INTO product_slots VALUES(6,208); +INSERT INTO product_slots VALUES(6,209); +INSERT INTO product_slots VALUES(6,210); +INSERT INTO product_slots VALUES(6,211); +INSERT INTO product_slots VALUES(6,212); +INSERT INTO product_slots VALUES(6,213); +INSERT INTO product_slots VALUES(6,214); +INSERT INTO product_slots VALUES(6,215); +INSERT INTO product_slots VALUES(6,216); +INSERT INTO product_slots VALUES(6,217); +INSERT INTO product_slots VALUES(6,218); +INSERT INTO product_slots VALUES(6,219); +INSERT INTO product_slots VALUES(6,220); +INSERT INTO product_slots VALUES(6,222); +INSERT INTO product_slots VALUES(6,223); +INSERT INTO product_slots VALUES(6,224); +INSERT INTO product_slots VALUES(6,225); +INSERT INTO product_slots VALUES(6,226); +INSERT INTO product_slots VALUES(6,227); +INSERT INTO product_slots VALUES(6,228); +INSERT INTO product_slots VALUES(6,229); +INSERT INTO product_slots VALUES(6,230); +INSERT INTO product_slots VALUES(6,231); +INSERT INTO product_slots VALUES(6,232); +INSERT INTO product_slots VALUES(6,234); +INSERT INTO product_slots VALUES(6,235); +INSERT INTO product_slots VALUES(6,236); +INSERT INTO product_slots VALUES(6,237); +INSERT INTO product_slots VALUES(6,238); +INSERT INTO product_slots VALUES(6,239); +INSERT INTO product_slots VALUES(6,240); +INSERT INTO product_slots VALUES(6,244); +INSERT INTO product_slots VALUES(6,274); +INSERT INTO product_slots VALUES(6,275); +INSERT INTO product_slots VALUES(6,277); +INSERT INTO product_slots VALUES(6,278); +INSERT INTO product_slots VALUES(6,279); +INSERT INTO product_slots VALUES(6,283); +INSERT INTO product_slots VALUES(6,284); +INSERT INTO product_slots VALUES(6,285); +INSERT INTO product_slots VALUES(6,286); +INSERT INTO product_slots VALUES(6,287); +INSERT INTO product_slots VALUES(7,1); +INSERT INTO product_slots VALUES(7,2); +INSERT INTO product_slots VALUES(7,3); +INSERT INTO product_slots VALUES(7,4); +INSERT INTO product_slots VALUES(7,5); +INSERT INTO product_slots VALUES(7,6); +INSERT INTO product_slots VALUES(7,7); +INSERT INTO product_slots VALUES(7,8); +INSERT INTO product_slots VALUES(7,9); +INSERT INTO product_slots VALUES(7,17); +INSERT INTO product_slots VALUES(7,18); +INSERT INTO product_slots VALUES(7,20); +INSERT INTO product_slots VALUES(7,21); +INSERT INTO product_slots VALUES(7,22); +INSERT INTO product_slots VALUES(7,33); +INSERT INTO product_slots VALUES(7,35); +INSERT INTO product_slots VALUES(7,37); +INSERT INTO product_slots VALUES(7,38); +INSERT INTO product_slots VALUES(7,39); +INSERT INTO product_slots VALUES(7,40); +INSERT INTO product_slots VALUES(7,43); +INSERT INTO product_slots VALUES(7,45); +INSERT INTO product_slots VALUES(7,46); +INSERT INTO product_slots VALUES(7,48); +INSERT INTO product_slots VALUES(7,49); +INSERT INTO product_slots VALUES(7,51); +INSERT INTO product_slots VALUES(7,52); +INSERT INTO product_slots VALUES(7,53); +INSERT INTO product_slots VALUES(7,54); +INSERT INTO product_slots VALUES(7,57); +INSERT INTO product_slots VALUES(7,58); +INSERT INTO product_slots VALUES(7,59); +INSERT INTO product_slots VALUES(7,60); +INSERT INTO product_slots VALUES(7,61); +INSERT INTO product_slots VALUES(7,62); +INSERT INTO product_slots VALUES(7,63); +INSERT INTO product_slots VALUES(7,64); +INSERT INTO product_slots VALUES(7,65); +INSERT INTO product_slots VALUES(7,66); +INSERT INTO product_slots VALUES(7,67); +INSERT INTO product_slots VALUES(7,68); +INSERT INTO product_slots VALUES(7,69); +INSERT INTO product_slots VALUES(7,70); +INSERT INTO product_slots VALUES(7,71); +INSERT INTO product_slots VALUES(7,72); +INSERT INTO product_slots VALUES(7,73); +INSERT INTO product_slots VALUES(7,74); +INSERT INTO product_slots VALUES(7,75); +INSERT INTO product_slots VALUES(7,76); +INSERT INTO product_slots VALUES(7,77); +INSERT INTO product_slots VALUES(7,78); +INSERT INTO product_slots VALUES(7,79); +INSERT INTO product_slots VALUES(7,80); +INSERT INTO product_slots VALUES(7,81); +INSERT INTO product_slots VALUES(7,82); +INSERT INTO product_slots VALUES(7,83); +INSERT INTO product_slots VALUES(7,84); +INSERT INTO product_slots VALUES(7,85); +INSERT INTO product_slots VALUES(7,86); +INSERT INTO product_slots VALUES(7,87); +INSERT INTO product_slots VALUES(7,88); +INSERT INTO product_slots VALUES(7,89); +INSERT INTO product_slots VALUES(7,90); +INSERT INTO product_slots VALUES(7,91); +INSERT INTO product_slots VALUES(7,92); +INSERT INTO product_slots VALUES(7,93); +INSERT INTO product_slots VALUES(7,94); +INSERT INTO product_slots VALUES(7,95); +INSERT INTO product_slots VALUES(7,96); +INSERT INTO product_slots VALUES(7,97); +INSERT INTO product_slots VALUES(7,98); +INSERT INTO product_slots VALUES(7,99); +INSERT INTO product_slots VALUES(7,100); +INSERT INTO product_slots VALUES(7,102); +INSERT INTO product_slots VALUES(7,103); +INSERT INTO product_slots VALUES(7,104); +INSERT INTO product_slots VALUES(7,105); +INSERT INTO product_slots VALUES(7,106); +INSERT INTO product_slots VALUES(7,107); +INSERT INTO product_slots VALUES(7,108); +INSERT INTO product_slots VALUES(7,109); +INSERT INTO product_slots VALUES(7,110); +INSERT INTO product_slots VALUES(7,111); +INSERT INTO product_slots VALUES(7,112); +INSERT INTO product_slots VALUES(7,113); +INSERT INTO product_slots VALUES(7,114); +INSERT INTO product_slots VALUES(7,115); +INSERT INTO product_slots VALUES(7,117); +INSERT INTO product_slots VALUES(7,118); +INSERT INTO product_slots VALUES(7,119); +INSERT INTO product_slots VALUES(7,120); +INSERT INTO product_slots VALUES(7,121); +INSERT INTO product_slots VALUES(7,122); +INSERT INTO product_slots VALUES(7,123); +INSERT INTO product_slots VALUES(7,124); +INSERT INTO product_slots VALUES(7,125); +INSERT INTO product_slots VALUES(7,126); +INSERT INTO product_slots VALUES(7,127); +INSERT INTO product_slots VALUES(7,128); +INSERT INTO product_slots VALUES(7,129); +INSERT INTO product_slots VALUES(7,130); +INSERT INTO product_slots VALUES(7,131); +INSERT INTO product_slots VALUES(7,132); +INSERT INTO product_slots VALUES(7,133); +INSERT INTO product_slots VALUES(7,134); +INSERT INTO product_slots VALUES(7,135); +INSERT INTO product_slots VALUES(7,136); +INSERT INTO product_slots VALUES(7,138); +INSERT INTO product_slots VALUES(7,139); +INSERT INTO product_slots VALUES(7,140); +INSERT INTO product_slots VALUES(7,141); +INSERT INTO product_slots VALUES(7,142); +INSERT INTO product_slots VALUES(7,143); +INSERT INTO product_slots VALUES(7,145); +INSERT INTO product_slots VALUES(7,146); +INSERT INTO product_slots VALUES(7,147); +INSERT INTO product_slots VALUES(7,148); +INSERT INTO product_slots VALUES(7,149); +INSERT INTO product_slots VALUES(7,150); +INSERT INTO product_slots VALUES(7,151); +INSERT INTO product_slots VALUES(7,152); +INSERT INTO product_slots VALUES(7,153); +INSERT INTO product_slots VALUES(7,154); +INSERT INTO product_slots VALUES(7,155); +INSERT INTO product_slots VALUES(7,156); +INSERT INTO product_slots VALUES(7,157); +INSERT INTO product_slots VALUES(7,158); +INSERT INTO product_slots VALUES(7,159); +INSERT INTO product_slots VALUES(7,160); +INSERT INTO product_slots VALUES(7,161); +INSERT INTO product_slots VALUES(7,162); +INSERT INTO product_slots VALUES(7,163); +INSERT INTO product_slots VALUES(7,164); +INSERT INTO product_slots VALUES(7,165); +INSERT INTO product_slots VALUES(7,166); +INSERT INTO product_slots VALUES(7,167); +INSERT INTO product_slots VALUES(7,168); +INSERT INTO product_slots VALUES(7,169); +INSERT INTO product_slots VALUES(7,170); +INSERT INTO product_slots VALUES(7,171); +INSERT INTO product_slots VALUES(7,172); +INSERT INTO product_slots VALUES(7,173); +INSERT INTO product_slots VALUES(7,174); +INSERT INTO product_slots VALUES(7,175); +INSERT INTO product_slots VALUES(7,176); +INSERT INTO product_slots VALUES(7,177); +INSERT INTO product_slots VALUES(7,178); +INSERT INTO product_slots VALUES(7,179); +INSERT INTO product_slots VALUES(7,180); +INSERT INTO product_slots VALUES(7,181); +INSERT INTO product_slots VALUES(7,182); +INSERT INTO product_slots VALUES(7,183); +INSERT INTO product_slots VALUES(7,184); +INSERT INTO product_slots VALUES(7,185); +INSERT INTO product_slots VALUES(7,186); +INSERT INTO product_slots VALUES(7,187); +INSERT INTO product_slots VALUES(7,188); +INSERT INTO product_slots VALUES(7,189); +INSERT INTO product_slots VALUES(7,190); +INSERT INTO product_slots VALUES(7,191); +INSERT INTO product_slots VALUES(7,192); +INSERT INTO product_slots VALUES(7,193); +INSERT INTO product_slots VALUES(7,194); +INSERT INTO product_slots VALUES(7,195); +INSERT INTO product_slots VALUES(7,196); +INSERT INTO product_slots VALUES(7,197); +INSERT INTO product_slots VALUES(7,198); +INSERT INTO product_slots VALUES(7,199); +INSERT INTO product_slots VALUES(7,200); +INSERT INTO product_slots VALUES(7,201); +INSERT INTO product_slots VALUES(7,202); +INSERT INTO product_slots VALUES(7,203); +INSERT INTO product_slots VALUES(7,204); +INSERT INTO product_slots VALUES(7,205); +INSERT INTO product_slots VALUES(7,206); +INSERT INTO product_slots VALUES(7,207); +INSERT INTO product_slots VALUES(7,208); +INSERT INTO product_slots VALUES(7,209); +INSERT INTO product_slots VALUES(7,210); +INSERT INTO product_slots VALUES(7,211); +INSERT INTO product_slots VALUES(7,212); +INSERT INTO product_slots VALUES(7,213); +INSERT INTO product_slots VALUES(7,214); +INSERT INTO product_slots VALUES(7,215); +INSERT INTO product_slots VALUES(7,216); +INSERT INTO product_slots VALUES(7,217); +INSERT INTO product_slots VALUES(7,218); +INSERT INTO product_slots VALUES(7,219); +INSERT INTO product_slots VALUES(7,220); +INSERT INTO product_slots VALUES(7,221); +INSERT INTO product_slots VALUES(7,222); +INSERT INTO product_slots VALUES(7,223); +INSERT INTO product_slots VALUES(7,224); +INSERT INTO product_slots VALUES(7,225); +INSERT INTO product_slots VALUES(7,226); +INSERT INTO product_slots VALUES(7,227); +INSERT INTO product_slots VALUES(7,228); +INSERT INTO product_slots VALUES(7,229); +INSERT INTO product_slots VALUES(7,230); +INSERT INTO product_slots VALUES(7,231); +INSERT INTO product_slots VALUES(7,232); +INSERT INTO product_slots VALUES(7,233); +INSERT INTO product_slots VALUES(7,234); +INSERT INTO product_slots VALUES(7,235); +INSERT INTO product_slots VALUES(7,236); +INSERT INTO product_slots VALUES(7,237); +INSERT INTO product_slots VALUES(7,238); +INSERT INTO product_slots VALUES(7,239); +INSERT INTO product_slots VALUES(7,240); +INSERT INTO product_slots VALUES(7,241); +INSERT INTO product_slots VALUES(7,242); +INSERT INTO product_slots VALUES(7,243); +INSERT INTO product_slots VALUES(7,244); +INSERT INTO product_slots VALUES(7,274); +INSERT INTO product_slots VALUES(7,275); +INSERT INTO product_slots VALUES(7,279); +INSERT INTO product_slots VALUES(7,280); +INSERT INTO product_slots VALUES(7,281); +INSERT INTO product_slots VALUES(7,282); +INSERT INTO product_slots VALUES(7,283); +INSERT INTO product_slots VALUES(7,284); +INSERT INTO product_slots VALUES(7,285); +INSERT INTO product_slots VALUES(7,286); +INSERT INTO product_slots VALUES(7,287); +INSERT INTO product_slots VALUES(8,1); +INSERT INTO product_slots VALUES(8,2); +INSERT INTO product_slots VALUES(8,3); +INSERT INTO product_slots VALUES(8,4); +INSERT INTO product_slots VALUES(8,5); +INSERT INTO product_slots VALUES(8,6); +INSERT INTO product_slots VALUES(8,7); +INSERT INTO product_slots VALUES(8,12); +INSERT INTO product_slots VALUES(8,17); +INSERT INTO product_slots VALUES(8,18); +INSERT INTO product_slots VALUES(8,20); +INSERT INTO product_slots VALUES(8,21); +INSERT INTO product_slots VALUES(8,22); +INSERT INTO product_slots VALUES(8,33); +INSERT INTO product_slots VALUES(8,35); +INSERT INTO product_slots VALUES(8,37); +INSERT INTO product_slots VALUES(8,38); +INSERT INTO product_slots VALUES(8,39); +INSERT INTO product_slots VALUES(8,40); +INSERT INTO product_slots VALUES(8,43); +INSERT INTO product_slots VALUES(8,45); +INSERT INTO product_slots VALUES(8,46); +INSERT INTO product_slots VALUES(8,48); +INSERT INTO product_slots VALUES(8,49); +INSERT INTO product_slots VALUES(8,51); +INSERT INTO product_slots VALUES(8,52); +INSERT INTO product_slots VALUES(8,53); +INSERT INTO product_slots VALUES(8,54); +INSERT INTO product_slots VALUES(8,57); +INSERT INTO product_slots VALUES(8,58); +INSERT INTO product_slots VALUES(8,59); +INSERT INTO product_slots VALUES(8,60); +INSERT INTO product_slots VALUES(8,61); +INSERT INTO product_slots VALUES(8,62); +INSERT INTO product_slots VALUES(8,63); +INSERT INTO product_slots VALUES(8,64); +INSERT INTO product_slots VALUES(8,65); +INSERT INTO product_slots VALUES(8,66); +INSERT INTO product_slots VALUES(8,67); +INSERT INTO product_slots VALUES(8,68); +INSERT INTO product_slots VALUES(8,69); +INSERT INTO product_slots VALUES(8,70); +INSERT INTO product_slots VALUES(8,71); +INSERT INTO product_slots VALUES(8,72); +INSERT INTO product_slots VALUES(8,73); +INSERT INTO product_slots VALUES(8,74); +INSERT INTO product_slots VALUES(8,75); +INSERT INTO product_slots VALUES(8,76); +INSERT INTO product_slots VALUES(8,77); +INSERT INTO product_slots VALUES(8,78); +INSERT INTO product_slots VALUES(8,79); +INSERT INTO product_slots VALUES(8,80); +INSERT INTO product_slots VALUES(8,81); +INSERT INTO product_slots VALUES(8,82); +INSERT INTO product_slots VALUES(8,83); +INSERT INTO product_slots VALUES(8,84); +INSERT INTO product_slots VALUES(8,85); +INSERT INTO product_slots VALUES(8,86); +INSERT INTO product_slots VALUES(8,87); +INSERT INTO product_slots VALUES(8,88); +INSERT INTO product_slots VALUES(8,89); +INSERT INTO product_slots VALUES(8,90); +INSERT INTO product_slots VALUES(8,91); +INSERT INTO product_slots VALUES(8,92); +INSERT INTO product_slots VALUES(8,93); +INSERT INTO product_slots VALUES(8,94); +INSERT INTO product_slots VALUES(8,95); +INSERT INTO product_slots VALUES(8,96); +INSERT INTO product_slots VALUES(8,97); +INSERT INTO product_slots VALUES(8,98); +INSERT INTO product_slots VALUES(8,99); +INSERT INTO product_slots VALUES(8,100); +INSERT INTO product_slots VALUES(8,102); +INSERT INTO product_slots VALUES(8,103); +INSERT INTO product_slots VALUES(8,104); +INSERT INTO product_slots VALUES(8,105); +INSERT INTO product_slots VALUES(8,106); +INSERT INTO product_slots VALUES(8,107); +INSERT INTO product_slots VALUES(8,108); +INSERT INTO product_slots VALUES(8,109); +INSERT INTO product_slots VALUES(8,110); +INSERT INTO product_slots VALUES(8,111); +INSERT INTO product_slots VALUES(8,112); +INSERT INTO product_slots VALUES(8,113); +INSERT INTO product_slots VALUES(8,114); +INSERT INTO product_slots VALUES(8,115); +INSERT INTO product_slots VALUES(8,117); +INSERT INTO product_slots VALUES(8,118); +INSERT INTO product_slots VALUES(8,119); +INSERT INTO product_slots VALUES(8,120); +INSERT INTO product_slots VALUES(8,121); +INSERT INTO product_slots VALUES(8,122); +INSERT INTO product_slots VALUES(8,123); +INSERT INTO product_slots VALUES(8,124); +INSERT INTO product_slots VALUES(8,125); +INSERT INTO product_slots VALUES(8,126); +INSERT INTO product_slots VALUES(8,127); +INSERT INTO product_slots VALUES(8,128); +INSERT INTO product_slots VALUES(8,129); +INSERT INTO product_slots VALUES(8,130); +INSERT INTO product_slots VALUES(8,131); +INSERT INTO product_slots VALUES(8,132); +INSERT INTO product_slots VALUES(8,133); +INSERT INTO product_slots VALUES(8,134); +INSERT INTO product_slots VALUES(8,135); +INSERT INTO product_slots VALUES(8,136); +INSERT INTO product_slots VALUES(8,138); +INSERT INTO product_slots VALUES(8,139); +INSERT INTO product_slots VALUES(8,140); +INSERT INTO product_slots VALUES(8,141); +INSERT INTO product_slots VALUES(8,142); +INSERT INTO product_slots VALUES(8,143); +INSERT INTO product_slots VALUES(8,145); +INSERT INTO product_slots VALUES(8,146); +INSERT INTO product_slots VALUES(8,147); +INSERT INTO product_slots VALUES(8,148); +INSERT INTO product_slots VALUES(8,149); +INSERT INTO product_slots VALUES(8,150); +INSERT INTO product_slots VALUES(8,151); +INSERT INTO product_slots VALUES(8,152); +INSERT INTO product_slots VALUES(8,153); +INSERT INTO product_slots VALUES(8,154); +INSERT INTO product_slots VALUES(8,155); +INSERT INTO product_slots VALUES(8,156); +INSERT INTO product_slots VALUES(8,157); +INSERT INTO product_slots VALUES(8,158); +INSERT INTO product_slots VALUES(8,159); +INSERT INTO product_slots VALUES(8,160); +INSERT INTO product_slots VALUES(8,161); +INSERT INTO product_slots VALUES(8,162); +INSERT INTO product_slots VALUES(8,163); +INSERT INTO product_slots VALUES(8,164); +INSERT INTO product_slots VALUES(8,165); +INSERT INTO product_slots VALUES(8,166); +INSERT INTO product_slots VALUES(8,167); +INSERT INTO product_slots VALUES(8,168); +INSERT INTO product_slots VALUES(8,169); +INSERT INTO product_slots VALUES(8,170); +INSERT INTO product_slots VALUES(8,171); +INSERT INTO product_slots VALUES(8,172); +INSERT INTO product_slots VALUES(8,173); +INSERT INTO product_slots VALUES(8,174); +INSERT INTO product_slots VALUES(8,175); +INSERT INTO product_slots VALUES(8,176); +INSERT INTO product_slots VALUES(8,177); +INSERT INTO product_slots VALUES(8,178); +INSERT INTO product_slots VALUES(8,179); +INSERT INTO product_slots VALUES(8,180); +INSERT INTO product_slots VALUES(8,181); +INSERT INTO product_slots VALUES(8,182); +INSERT INTO product_slots VALUES(8,183); +INSERT INTO product_slots VALUES(8,184); +INSERT INTO product_slots VALUES(8,185); +INSERT INTO product_slots VALUES(8,186); +INSERT INTO product_slots VALUES(8,187); +INSERT INTO product_slots VALUES(8,188); +INSERT INTO product_slots VALUES(8,189); +INSERT INTO product_slots VALUES(8,190); +INSERT INTO product_slots VALUES(8,191); +INSERT INTO product_slots VALUES(8,192); +INSERT INTO product_slots VALUES(8,193); +INSERT INTO product_slots VALUES(8,194); +INSERT INTO product_slots VALUES(8,195); +INSERT INTO product_slots VALUES(8,196); +INSERT INTO product_slots VALUES(8,197); +INSERT INTO product_slots VALUES(8,198); +INSERT INTO product_slots VALUES(8,199); +INSERT INTO product_slots VALUES(8,200); +INSERT INTO product_slots VALUES(8,201); +INSERT INTO product_slots VALUES(8,202); +INSERT INTO product_slots VALUES(8,203); +INSERT INTO product_slots VALUES(8,204); +INSERT INTO product_slots VALUES(8,205); +INSERT INTO product_slots VALUES(8,206); +INSERT INTO product_slots VALUES(8,207); +INSERT INTO product_slots VALUES(8,208); +INSERT INTO product_slots VALUES(8,209); +INSERT INTO product_slots VALUES(8,210); +INSERT INTO product_slots VALUES(8,211); +INSERT INTO product_slots VALUES(8,212); +INSERT INTO product_slots VALUES(8,213); +INSERT INTO product_slots VALUES(8,214); +INSERT INTO product_slots VALUES(8,215); +INSERT INTO product_slots VALUES(8,216); +INSERT INTO product_slots VALUES(8,217); +INSERT INTO product_slots VALUES(8,218); +INSERT INTO product_slots VALUES(8,219); +INSERT INTO product_slots VALUES(8,220); +INSERT INTO product_slots VALUES(8,221); +INSERT INTO product_slots VALUES(8,222); +INSERT INTO product_slots VALUES(8,223); +INSERT INTO product_slots VALUES(8,224); +INSERT INTO product_slots VALUES(8,225); +INSERT INTO product_slots VALUES(8,226); +INSERT INTO product_slots VALUES(8,227); +INSERT INTO product_slots VALUES(8,228); +INSERT INTO product_slots VALUES(8,229); +INSERT INTO product_slots VALUES(8,230); +INSERT INTO product_slots VALUES(8,231); +INSERT INTO product_slots VALUES(8,232); +INSERT INTO product_slots VALUES(8,233); +INSERT INTO product_slots VALUES(8,234); +INSERT INTO product_slots VALUES(8,235); +INSERT INTO product_slots VALUES(8,236); +INSERT INTO product_slots VALUES(8,237); +INSERT INTO product_slots VALUES(8,238); +INSERT INTO product_slots VALUES(8,239); +INSERT INTO product_slots VALUES(8,240); +INSERT INTO product_slots VALUES(8,241); +INSERT INTO product_slots VALUES(8,242); +INSERT INTO product_slots VALUES(8,243); +INSERT INTO product_slots VALUES(8,244); +INSERT INTO product_slots VALUES(8,274); +INSERT INTO product_slots VALUES(8,275); +INSERT INTO product_slots VALUES(8,279); +INSERT INTO product_slots VALUES(8,280); +INSERT INTO product_slots VALUES(8,281); +INSERT INTO product_slots VALUES(8,282); +INSERT INTO product_slots VALUES(8,283); +INSERT INTO product_slots VALUES(8,284); +INSERT INTO product_slots VALUES(8,285); +INSERT INTO product_slots VALUES(8,286); +INSERT INTO product_slots VALUES(8,287); +INSERT INTO product_slots VALUES(9,1); +INSERT INTO product_slots VALUES(9,2); +INSERT INTO product_slots VALUES(9,3); +INSERT INTO product_slots VALUES(9,4); +INSERT INTO product_slots VALUES(9,5); +INSERT INTO product_slots VALUES(9,6); +INSERT INTO product_slots VALUES(9,7); +INSERT INTO product_slots VALUES(9,12); +INSERT INTO product_slots VALUES(9,18); +INSERT INTO product_slots VALUES(9,19); +INSERT INTO product_slots VALUES(9,20); +INSERT INTO product_slots VALUES(9,21); +INSERT INTO product_slots VALUES(9,22); +INSERT INTO product_slots VALUES(9,33); +INSERT INTO product_slots VALUES(9,35); +INSERT INTO product_slots VALUES(9,37); +INSERT INTO product_slots VALUES(9,38); +INSERT INTO product_slots VALUES(9,39); +INSERT INTO product_slots VALUES(9,40); +INSERT INTO product_slots VALUES(9,43); +INSERT INTO product_slots VALUES(9,45); +INSERT INTO product_slots VALUES(9,48); +INSERT INTO product_slots VALUES(9,49); +INSERT INTO product_slots VALUES(9,51); +INSERT INTO product_slots VALUES(9,52); +INSERT INTO product_slots VALUES(9,57); +INSERT INTO product_slots VALUES(9,58); +INSERT INTO product_slots VALUES(9,59); +INSERT INTO product_slots VALUES(9,62); +INSERT INTO product_slots VALUES(9,63); +INSERT INTO product_slots VALUES(9,64); +INSERT INTO product_slots VALUES(9,65); +INSERT INTO product_slots VALUES(9,66); +INSERT INTO product_slots VALUES(9,67); +INSERT INTO product_slots VALUES(9,69); +INSERT INTO product_slots VALUES(9,70); +INSERT INTO product_slots VALUES(9,71); +INSERT INTO product_slots VALUES(9,72); +INSERT INTO product_slots VALUES(9,73); +INSERT INTO product_slots VALUES(9,75); +INSERT INTO product_slots VALUES(9,82); +INSERT INTO product_slots VALUES(9,83); +INSERT INTO product_slots VALUES(9,84); +INSERT INTO product_slots VALUES(9,90); +INSERT INTO product_slots VALUES(9,91); +INSERT INTO product_slots VALUES(9,92); +INSERT INTO product_slots VALUES(9,93); +INSERT INTO product_slots VALUES(9,94); +INSERT INTO product_slots VALUES(9,97); +INSERT INTO product_slots VALUES(9,98); +INSERT INTO product_slots VALUES(9,99); +INSERT INTO product_slots VALUES(9,100); +INSERT INTO product_slots VALUES(9,102); +INSERT INTO product_slots VALUES(9,103); +INSERT INTO product_slots VALUES(9,104); +INSERT INTO product_slots VALUES(9,110); +INSERT INTO product_slots VALUES(9,111); +INSERT INTO product_slots VALUES(9,112); +INSERT INTO product_slots VALUES(9,116); +INSERT INTO product_slots VALUES(9,117); +INSERT INTO product_slots VALUES(9,118); +INSERT INTO product_slots VALUES(9,119); +INSERT INTO product_slots VALUES(9,120); +INSERT INTO product_slots VALUES(9,121); +INSERT INTO product_slots VALUES(9,122); +INSERT INTO product_slots VALUES(9,123); +INSERT INTO product_slots VALUES(9,124); +INSERT INTO product_slots VALUES(9,125); +INSERT INTO product_slots VALUES(9,126); +INSERT INTO product_slots VALUES(9,127); +INSERT INTO product_slots VALUES(9,128); +INSERT INTO product_slots VALUES(9,129); +INSERT INTO product_slots VALUES(9,130); +INSERT INTO product_slots VALUES(9,131); +INSERT INTO product_slots VALUES(9,132); +INSERT INTO product_slots VALUES(9,133); +INSERT INTO product_slots VALUES(9,134); +INSERT INTO product_slots VALUES(9,135); +INSERT INTO product_slots VALUES(9,136); +INSERT INTO product_slots VALUES(9,137); +INSERT INTO product_slots VALUES(9,138); +INSERT INTO product_slots VALUES(9,139); +INSERT INTO product_slots VALUES(9,140); +INSERT INTO product_slots VALUES(9,141); +INSERT INTO product_slots VALUES(9,142); +INSERT INTO product_slots VALUES(9,143); +INSERT INTO product_slots VALUES(9,144); +INSERT INTO product_slots VALUES(9,145); +INSERT INTO product_slots VALUES(9,146); +INSERT INTO product_slots VALUES(9,147); +INSERT INTO product_slots VALUES(9,148); +INSERT INTO product_slots VALUES(9,149); +INSERT INTO product_slots VALUES(9,150); +INSERT INTO product_slots VALUES(9,151); +INSERT INTO product_slots VALUES(9,152); +INSERT INTO product_slots VALUES(9,153); +INSERT INTO product_slots VALUES(9,154); +INSERT INTO product_slots VALUES(9,155); +INSERT INTO product_slots VALUES(9,156); +INSERT INTO product_slots VALUES(9,157); +INSERT INTO product_slots VALUES(9,158); +INSERT INTO product_slots VALUES(9,159); +INSERT INTO product_slots VALUES(9,160); +INSERT INTO product_slots VALUES(9,161); +INSERT INTO product_slots VALUES(9,162); +INSERT INTO product_slots VALUES(9,163); +INSERT INTO product_slots VALUES(9,164); +INSERT INTO product_slots VALUES(9,165); +INSERT INTO product_slots VALUES(9,166); +INSERT INTO product_slots VALUES(9,167); +INSERT INTO product_slots VALUES(9,168); +INSERT INTO product_slots VALUES(9,169); +INSERT INTO product_slots VALUES(9,170); +INSERT INTO product_slots VALUES(9,171); +INSERT INTO product_slots VALUES(9,172); +INSERT INTO product_slots VALUES(9,173); +INSERT INTO product_slots VALUES(9,174); +INSERT INTO product_slots VALUES(9,175); +INSERT INTO product_slots VALUES(9,176); +INSERT INTO product_slots VALUES(9,177); +INSERT INTO product_slots VALUES(9,178); +INSERT INTO product_slots VALUES(9,179); +INSERT INTO product_slots VALUES(9,180); +INSERT INTO product_slots VALUES(9,181); +INSERT INTO product_slots VALUES(9,182); +INSERT INTO product_slots VALUES(9,183); +INSERT INTO product_slots VALUES(9,184); +INSERT INTO product_slots VALUES(9,185); +INSERT INTO product_slots VALUES(9,186); +INSERT INTO product_slots VALUES(9,187); +INSERT INTO product_slots VALUES(9,188); +INSERT INTO product_slots VALUES(9,189); +INSERT INTO product_slots VALUES(9,190); +INSERT INTO product_slots VALUES(9,191); +INSERT INTO product_slots VALUES(9,192); +INSERT INTO product_slots VALUES(9,193); +INSERT INTO product_slots VALUES(9,194); +INSERT INTO product_slots VALUES(9,195); +INSERT INTO product_slots VALUES(9,196); +INSERT INTO product_slots VALUES(9,197); +INSERT INTO product_slots VALUES(9,198); +INSERT INTO product_slots VALUES(9,199); +INSERT INTO product_slots VALUES(9,200); +INSERT INTO product_slots VALUES(9,201); +INSERT INTO product_slots VALUES(9,202); +INSERT INTO product_slots VALUES(9,203); +INSERT INTO product_slots VALUES(9,204); +INSERT INTO product_slots VALUES(9,205); +INSERT INTO product_slots VALUES(9,206); +INSERT INTO product_slots VALUES(9,207); +INSERT INTO product_slots VALUES(9,208); +INSERT INTO product_slots VALUES(9,209); +INSERT INTO product_slots VALUES(9,210); +INSERT INTO product_slots VALUES(9,211); +INSERT INTO product_slots VALUES(9,212); +INSERT INTO product_slots VALUES(9,213); +INSERT INTO product_slots VALUES(9,214); +INSERT INTO product_slots VALUES(9,215); +INSERT INTO product_slots VALUES(9,216); +INSERT INTO product_slots VALUES(9,217); +INSERT INTO product_slots VALUES(9,218); +INSERT INTO product_slots VALUES(9,219); +INSERT INTO product_slots VALUES(9,220); +INSERT INTO product_slots VALUES(9,221); +INSERT INTO product_slots VALUES(9,222); +INSERT INTO product_slots VALUES(9,223); +INSERT INTO product_slots VALUES(9,224); +INSERT INTO product_slots VALUES(9,225); +INSERT INTO product_slots VALUES(9,226); +INSERT INTO product_slots VALUES(9,227); +INSERT INTO product_slots VALUES(9,228); +INSERT INTO product_slots VALUES(9,229); +INSERT INTO product_slots VALUES(9,230); +INSERT INTO product_slots VALUES(9,231); +INSERT INTO product_slots VALUES(9,232); +INSERT INTO product_slots VALUES(9,233); +INSERT INTO product_slots VALUES(9,234); +INSERT INTO product_slots VALUES(9,235); +INSERT INTO product_slots VALUES(9,236); +INSERT INTO product_slots VALUES(9,237); +INSERT INTO product_slots VALUES(9,238); +INSERT INTO product_slots VALUES(9,239); +INSERT INTO product_slots VALUES(9,240); +INSERT INTO product_slots VALUES(9,241); +INSERT INTO product_slots VALUES(9,242); +INSERT INTO product_slots VALUES(9,243); +INSERT INTO product_slots VALUES(9,244); +INSERT INTO product_slots VALUES(9,274); +INSERT INTO product_slots VALUES(9,275); +INSERT INTO product_slots VALUES(9,279); +INSERT INTO product_slots VALUES(9,280); +INSERT INTO product_slots VALUES(9,281); +INSERT INTO product_slots VALUES(9,282); +INSERT INTO product_slots VALUES(9,283); +INSERT INTO product_slots VALUES(9,284); +INSERT INTO product_slots VALUES(9,285); +INSERT INTO product_slots VALUES(9,286); +INSERT INTO product_slots VALUES(9,287); +INSERT INTO product_slots VALUES(10,1); +INSERT INTO product_slots VALUES(10,3); +INSERT INTO product_slots VALUES(10,4); +INSERT INTO product_slots VALUES(10,5); +INSERT INTO product_slots VALUES(10,6); +INSERT INTO product_slots VALUES(10,7); +INSERT INTO product_slots VALUES(10,12); +INSERT INTO product_slots VALUES(10,18); +INSERT INTO product_slots VALUES(10,19); +INSERT INTO product_slots VALUES(10,20); +INSERT INTO product_slots VALUES(10,21); +INSERT INTO product_slots VALUES(10,22); +INSERT INTO product_slots VALUES(10,23); +INSERT INTO product_slots VALUES(10,31); +INSERT INTO product_slots VALUES(10,33); +INSERT INTO product_slots VALUES(10,35); +INSERT INTO product_slots VALUES(10,37); +INSERT INTO product_slots VALUES(10,38); +INSERT INTO product_slots VALUES(10,39); +INSERT INTO product_slots VALUES(10,40); +INSERT INTO product_slots VALUES(10,41); +INSERT INTO product_slots VALUES(10,43); +INSERT INTO product_slots VALUES(10,45); +INSERT INTO product_slots VALUES(10,46); +INSERT INTO product_slots VALUES(10,47); +INSERT INTO product_slots VALUES(10,48); +INSERT INTO product_slots VALUES(10,49); +INSERT INTO product_slots VALUES(10,50); +INSERT INTO product_slots VALUES(10,51); +INSERT INTO product_slots VALUES(10,52); +INSERT INTO product_slots VALUES(10,53); +INSERT INTO product_slots VALUES(10,54); +INSERT INTO product_slots VALUES(10,55); +INSERT INTO product_slots VALUES(10,56); +INSERT INTO product_slots VALUES(10,57); +INSERT INTO product_slots VALUES(10,58); +INSERT INTO product_slots VALUES(10,59); +INSERT INTO product_slots VALUES(10,60); +INSERT INTO product_slots VALUES(10,61); +INSERT INTO product_slots VALUES(10,62); +INSERT INTO product_slots VALUES(10,63); +INSERT INTO product_slots VALUES(10,64); +INSERT INTO product_slots VALUES(10,65); +INSERT INTO product_slots VALUES(10,66); +INSERT INTO product_slots VALUES(10,67); +INSERT INTO product_slots VALUES(10,68); +INSERT INTO product_slots VALUES(10,69); +INSERT INTO product_slots VALUES(10,70); +INSERT INTO product_slots VALUES(10,71); +INSERT INTO product_slots VALUES(10,72); +INSERT INTO product_slots VALUES(10,73); +INSERT INTO product_slots VALUES(10,74); +INSERT INTO product_slots VALUES(10,75); +INSERT INTO product_slots VALUES(10,76); +INSERT INTO product_slots VALUES(10,77); +INSERT INTO product_slots VALUES(10,78); +INSERT INTO product_slots VALUES(10,79); +INSERT INTO product_slots VALUES(10,80); +INSERT INTO product_slots VALUES(10,81); +INSERT INTO product_slots VALUES(10,82); +INSERT INTO product_slots VALUES(10,83); +INSERT INTO product_slots VALUES(10,84); +INSERT INTO product_slots VALUES(10,85); +INSERT INTO product_slots VALUES(10,86); +INSERT INTO product_slots VALUES(10,87); +INSERT INTO product_slots VALUES(10,88); +INSERT INTO product_slots VALUES(10,89); +INSERT INTO product_slots VALUES(10,90); +INSERT INTO product_slots VALUES(10,91); +INSERT INTO product_slots VALUES(10,92); +INSERT INTO product_slots VALUES(10,93); +INSERT INTO product_slots VALUES(10,94); +INSERT INTO product_slots VALUES(10,95); +INSERT INTO product_slots VALUES(10,96); +INSERT INTO product_slots VALUES(10,97); +INSERT INTO product_slots VALUES(10,98); +INSERT INTO product_slots VALUES(10,99); +INSERT INTO product_slots VALUES(10,100); +INSERT INTO product_slots VALUES(10,101); +INSERT INTO product_slots VALUES(10,102); +INSERT INTO product_slots VALUES(10,103); +INSERT INTO product_slots VALUES(10,104); +INSERT INTO product_slots VALUES(10,105); +INSERT INTO product_slots VALUES(10,106); +INSERT INTO product_slots VALUES(10,107); +INSERT INTO product_slots VALUES(10,108); +INSERT INTO product_slots VALUES(10,109); +INSERT INTO product_slots VALUES(10,110); +INSERT INTO product_slots VALUES(10,111); +INSERT INTO product_slots VALUES(10,112); +INSERT INTO product_slots VALUES(10,113); +INSERT INTO product_slots VALUES(10,114); +INSERT INTO product_slots VALUES(10,115); +INSERT INTO product_slots VALUES(10,116); +INSERT INTO product_slots VALUES(10,117); +INSERT INTO product_slots VALUES(10,118); +INSERT INTO product_slots VALUES(10,119); +INSERT INTO product_slots VALUES(10,120); +INSERT INTO product_slots VALUES(10,121); +INSERT INTO product_slots VALUES(10,122); +INSERT INTO product_slots VALUES(10,123); +INSERT INTO product_slots VALUES(10,124); +INSERT INTO product_slots VALUES(10,125); +INSERT INTO product_slots VALUES(10,126); +INSERT INTO product_slots VALUES(10,127); +INSERT INTO product_slots VALUES(10,128); +INSERT INTO product_slots VALUES(10,129); +INSERT INTO product_slots VALUES(10,130); +INSERT INTO product_slots VALUES(10,131); +INSERT INTO product_slots VALUES(10,132); +INSERT INTO product_slots VALUES(10,133); +INSERT INTO product_slots VALUES(10,134); +INSERT INTO product_slots VALUES(10,135); +INSERT INTO product_slots VALUES(10,136); +INSERT INTO product_slots VALUES(10,137); +INSERT INTO product_slots VALUES(10,138); +INSERT INTO product_slots VALUES(10,139); +INSERT INTO product_slots VALUES(10,140); +INSERT INTO product_slots VALUES(10,141); +INSERT INTO product_slots VALUES(10,142); +INSERT INTO product_slots VALUES(10,143); +INSERT INTO product_slots VALUES(10,144); +INSERT INTO product_slots VALUES(10,145); +INSERT INTO product_slots VALUES(10,146); +INSERT INTO product_slots VALUES(10,147); +INSERT INTO product_slots VALUES(10,148); +INSERT INTO product_slots VALUES(10,149); +INSERT INTO product_slots VALUES(10,150); +INSERT INTO product_slots VALUES(10,151); +INSERT INTO product_slots VALUES(10,152); +INSERT INTO product_slots VALUES(10,153); +INSERT INTO product_slots VALUES(10,154); +INSERT INTO product_slots VALUES(10,155); +INSERT INTO product_slots VALUES(10,156); +INSERT INTO product_slots VALUES(10,157); +INSERT INTO product_slots VALUES(10,158); +INSERT INTO product_slots VALUES(10,159); +INSERT INTO product_slots VALUES(10,160); +INSERT INTO product_slots VALUES(10,161); +INSERT INTO product_slots VALUES(10,162); +INSERT INTO product_slots VALUES(10,163); +INSERT INTO product_slots VALUES(10,164); +INSERT INTO product_slots VALUES(10,165); +INSERT INTO product_slots VALUES(10,166); +INSERT INTO product_slots VALUES(10,167); +INSERT INTO product_slots VALUES(10,168); +INSERT INTO product_slots VALUES(10,169); +INSERT INTO product_slots VALUES(10,170); +INSERT INTO product_slots VALUES(10,171); +INSERT INTO product_slots VALUES(10,172); +INSERT INTO product_slots VALUES(10,173); +INSERT INTO product_slots VALUES(10,174); +INSERT INTO product_slots VALUES(10,175); +INSERT INTO product_slots VALUES(10,176); +INSERT INTO product_slots VALUES(10,177); +INSERT INTO product_slots VALUES(10,178); +INSERT INTO product_slots VALUES(10,179); +INSERT INTO product_slots VALUES(10,180); +INSERT INTO product_slots VALUES(10,181); +INSERT INTO product_slots VALUES(10,182); +INSERT INTO product_slots VALUES(10,183); +INSERT INTO product_slots VALUES(10,184); +INSERT INTO product_slots VALUES(10,185); +INSERT INTO product_slots VALUES(10,186); +INSERT INTO product_slots VALUES(10,187); +INSERT INTO product_slots VALUES(10,188); +INSERT INTO product_slots VALUES(10,189); +INSERT INTO product_slots VALUES(10,190); +INSERT INTO product_slots VALUES(10,191); +INSERT INTO product_slots VALUES(10,192); +INSERT INTO product_slots VALUES(10,193); +INSERT INTO product_slots VALUES(10,194); +INSERT INTO product_slots VALUES(10,195); +INSERT INTO product_slots VALUES(10,196); +INSERT INTO product_slots VALUES(10,197); +INSERT INTO product_slots VALUES(10,198); +INSERT INTO product_slots VALUES(10,199); +INSERT INTO product_slots VALUES(10,200); +INSERT INTO product_slots VALUES(10,201); +INSERT INTO product_slots VALUES(10,202); +INSERT INTO product_slots VALUES(10,203); +INSERT INTO product_slots VALUES(10,204); +INSERT INTO product_slots VALUES(10,205); +INSERT INTO product_slots VALUES(10,206); +INSERT INTO product_slots VALUES(10,207); +INSERT INTO product_slots VALUES(10,208); +INSERT INTO product_slots VALUES(10,209); +INSERT INTO product_slots VALUES(10,210); +INSERT INTO product_slots VALUES(10,211); +INSERT INTO product_slots VALUES(10,212); +INSERT INTO product_slots VALUES(10,213); +INSERT INTO product_slots VALUES(10,214); +INSERT INTO product_slots VALUES(10,215); +INSERT INTO product_slots VALUES(10,216); +INSERT INTO product_slots VALUES(10,217); +INSERT INTO product_slots VALUES(10,218); +INSERT INTO product_slots VALUES(10,219); +INSERT INTO product_slots VALUES(10,220); +INSERT INTO product_slots VALUES(10,221); +INSERT INTO product_slots VALUES(10,222); +INSERT INTO product_slots VALUES(10,223); +INSERT INTO product_slots VALUES(10,224); +INSERT INTO product_slots VALUES(10,225); +INSERT INTO product_slots VALUES(10,226); +INSERT INTO product_slots VALUES(10,227); +INSERT INTO product_slots VALUES(10,228); +INSERT INTO product_slots VALUES(10,229); +INSERT INTO product_slots VALUES(10,230); +INSERT INTO product_slots VALUES(10,231); +INSERT INTO product_slots VALUES(10,232); +INSERT INTO product_slots VALUES(10,234); +INSERT INTO product_slots VALUES(10,235); +INSERT INTO product_slots VALUES(10,236); +INSERT INTO product_slots VALUES(10,237); +INSERT INTO product_slots VALUES(10,238); +INSERT INTO product_slots VALUES(10,239); +INSERT INTO product_slots VALUES(10,240); +INSERT INTO product_slots VALUES(10,241); +INSERT INTO product_slots VALUES(10,242); +INSERT INTO product_slots VALUES(10,243); +INSERT INTO product_slots VALUES(10,244); +INSERT INTO product_slots VALUES(10,274); +INSERT INTO product_slots VALUES(10,275); +INSERT INTO product_slots VALUES(10,279); +INSERT INTO product_slots VALUES(10,280); +INSERT INTO product_slots VALUES(10,281); +INSERT INTO product_slots VALUES(10,282); +INSERT INTO product_slots VALUES(11,1); +INSERT INTO product_slots VALUES(11,3); +INSERT INTO product_slots VALUES(11,4); +INSERT INTO product_slots VALUES(11,5); +INSERT INTO product_slots VALUES(11,6); +INSERT INTO product_slots VALUES(11,7); +INSERT INTO product_slots VALUES(11,8); +INSERT INTO product_slots VALUES(11,9); +INSERT INTO product_slots VALUES(11,12); +INSERT INTO product_slots VALUES(11,16); +INSERT INTO product_slots VALUES(11,18); +INSERT INTO product_slots VALUES(11,20); +INSERT INTO product_slots VALUES(11,21); +INSERT INTO product_slots VALUES(11,22); +INSERT INTO product_slots VALUES(11,33); +INSERT INTO product_slots VALUES(11,35); +INSERT INTO product_slots VALUES(11,37); +INSERT INTO product_slots VALUES(11,38); +INSERT INTO product_slots VALUES(11,40); +INSERT INTO product_slots VALUES(11,59); +INSERT INTO product_slots VALUES(11,62); +INSERT INTO product_slots VALUES(11,63); +INSERT INTO product_slots VALUES(11,64); +INSERT INTO product_slots VALUES(11,65); +INSERT INTO product_slots VALUES(11,66); +INSERT INTO product_slots VALUES(11,67); +INSERT INTO product_slots VALUES(11,68); +INSERT INTO product_slots VALUES(11,69); +INSERT INTO product_slots VALUES(11,70); +INSERT INTO product_slots VALUES(11,71); +INSERT INTO product_slots VALUES(11,72); +INSERT INTO product_slots VALUES(11,73); +INSERT INTO product_slots VALUES(11,74); +INSERT INTO product_slots VALUES(11,75); +INSERT INTO product_slots VALUES(11,76); +INSERT INTO product_slots VALUES(11,77); +INSERT INTO product_slots VALUES(11,78); +INSERT INTO product_slots VALUES(11,79); +INSERT INTO product_slots VALUES(11,80); +INSERT INTO product_slots VALUES(11,81); +INSERT INTO product_slots VALUES(11,82); +INSERT INTO product_slots VALUES(11,83); +INSERT INTO product_slots VALUES(11,84); +INSERT INTO product_slots VALUES(11,85); +INSERT INTO product_slots VALUES(11,86); +INSERT INTO product_slots VALUES(11,87); +INSERT INTO product_slots VALUES(11,88); +INSERT INTO product_slots VALUES(11,89); +INSERT INTO product_slots VALUES(11,90); +INSERT INTO product_slots VALUES(11,91); +INSERT INTO product_slots VALUES(11,92); +INSERT INTO product_slots VALUES(11,93); +INSERT INTO product_slots VALUES(11,94); +INSERT INTO product_slots VALUES(11,95); +INSERT INTO product_slots VALUES(11,96); +INSERT INTO product_slots VALUES(11,97); +INSERT INTO product_slots VALUES(11,98); +INSERT INTO product_slots VALUES(11,99); +INSERT INTO product_slots VALUES(11,100); +INSERT INTO product_slots VALUES(11,102); +INSERT INTO product_slots VALUES(11,103); +INSERT INTO product_slots VALUES(11,104); +INSERT INTO product_slots VALUES(11,105); +INSERT INTO product_slots VALUES(11,106); +INSERT INTO product_slots VALUES(11,107); +INSERT INTO product_slots VALUES(11,108); +INSERT INTO product_slots VALUES(11,109); +INSERT INTO product_slots VALUES(11,110); +INSERT INTO product_slots VALUES(11,111); +INSERT INTO product_slots VALUES(11,112); +INSERT INTO product_slots VALUES(11,113); +INSERT INTO product_slots VALUES(11,114); +INSERT INTO product_slots VALUES(11,115); +INSERT INTO product_slots VALUES(11,117); +INSERT INTO product_slots VALUES(11,118); +INSERT INTO product_slots VALUES(11,119); +INSERT INTO product_slots VALUES(11,120); +INSERT INTO product_slots VALUES(11,121); +INSERT INTO product_slots VALUES(11,122); +INSERT INTO product_slots VALUES(11,123); +INSERT INTO product_slots VALUES(11,124); +INSERT INTO product_slots VALUES(11,125); +INSERT INTO product_slots VALUES(11,126); +INSERT INTO product_slots VALUES(11,127); +INSERT INTO product_slots VALUES(11,128); +INSERT INTO product_slots VALUES(11,129); +INSERT INTO product_slots VALUES(11,130); +INSERT INTO product_slots VALUES(11,131); +INSERT INTO product_slots VALUES(11,132); +INSERT INTO product_slots VALUES(11,133); +INSERT INTO product_slots VALUES(11,134); +INSERT INTO product_slots VALUES(11,135); +INSERT INTO product_slots VALUES(11,136); +INSERT INTO product_slots VALUES(11,138); +INSERT INTO product_slots VALUES(11,139); +INSERT INTO product_slots VALUES(11,140); +INSERT INTO product_slots VALUES(11,141); +INSERT INTO product_slots VALUES(11,142); +INSERT INTO product_slots VALUES(11,143); +INSERT INTO product_slots VALUES(11,145); +INSERT INTO product_slots VALUES(11,146); +INSERT INTO product_slots VALUES(11,147); +INSERT INTO product_slots VALUES(11,148); +INSERT INTO product_slots VALUES(11,149); +INSERT INTO product_slots VALUES(11,150); +INSERT INTO product_slots VALUES(11,151); +INSERT INTO product_slots VALUES(11,152); +INSERT INTO product_slots VALUES(11,153); +INSERT INTO product_slots VALUES(11,154); +INSERT INTO product_slots VALUES(11,155); +INSERT INTO product_slots VALUES(11,156); +INSERT INTO product_slots VALUES(11,157); +INSERT INTO product_slots VALUES(11,158); +INSERT INTO product_slots VALUES(11,159); +INSERT INTO product_slots VALUES(11,160); +INSERT INTO product_slots VALUES(11,161); +INSERT INTO product_slots VALUES(11,162); +INSERT INTO product_slots VALUES(11,163); +INSERT INTO product_slots VALUES(11,164); +INSERT INTO product_slots VALUES(11,165); +INSERT INTO product_slots VALUES(11,166); +INSERT INTO product_slots VALUES(11,167); +INSERT INTO product_slots VALUES(11,168); +INSERT INTO product_slots VALUES(11,169); +INSERT INTO product_slots VALUES(11,170); +INSERT INTO product_slots VALUES(11,171); +INSERT INTO product_slots VALUES(11,172); +INSERT INTO product_slots VALUES(11,173); +INSERT INTO product_slots VALUES(11,174); +INSERT INTO product_slots VALUES(11,175); +INSERT INTO product_slots VALUES(11,176); +INSERT INTO product_slots VALUES(11,177); +INSERT INTO product_slots VALUES(11,178); +INSERT INTO product_slots VALUES(11,179); +INSERT INTO product_slots VALUES(11,180); +INSERT INTO product_slots VALUES(11,181); +INSERT INTO product_slots VALUES(11,182); +INSERT INTO product_slots VALUES(11,183); +INSERT INTO product_slots VALUES(11,184); +INSERT INTO product_slots VALUES(11,185); +INSERT INTO product_slots VALUES(11,186); +INSERT INTO product_slots VALUES(11,187); +INSERT INTO product_slots VALUES(11,188); +INSERT INTO product_slots VALUES(11,189); +INSERT INTO product_slots VALUES(11,190); +INSERT INTO product_slots VALUES(11,191); +INSERT INTO product_slots VALUES(11,192); +INSERT INTO product_slots VALUES(11,193); +INSERT INTO product_slots VALUES(11,194); +INSERT INTO product_slots VALUES(11,195); +INSERT INTO product_slots VALUES(11,196); +INSERT INTO product_slots VALUES(11,197); +INSERT INTO product_slots VALUES(11,198); +INSERT INTO product_slots VALUES(11,199); +INSERT INTO product_slots VALUES(11,200); +INSERT INTO product_slots VALUES(11,201); +INSERT INTO product_slots VALUES(11,202); +INSERT INTO product_slots VALUES(11,203); +INSERT INTO product_slots VALUES(11,204); +INSERT INTO product_slots VALUES(11,205); +INSERT INTO product_slots VALUES(11,206); +INSERT INTO product_slots VALUES(11,207); +INSERT INTO product_slots VALUES(11,208); +INSERT INTO product_slots VALUES(11,209); +INSERT INTO product_slots VALUES(11,210); +INSERT INTO product_slots VALUES(11,211); +INSERT INTO product_slots VALUES(11,212); +INSERT INTO product_slots VALUES(11,213); +INSERT INTO product_slots VALUES(11,214); +INSERT INTO product_slots VALUES(11,215); +INSERT INTO product_slots VALUES(11,216); +INSERT INTO product_slots VALUES(11,217); +INSERT INTO product_slots VALUES(11,218); +INSERT INTO product_slots VALUES(11,219); +INSERT INTO product_slots VALUES(11,220); +INSERT INTO product_slots VALUES(11,221); +INSERT INTO product_slots VALUES(11,222); +INSERT INTO product_slots VALUES(11,223); +INSERT INTO product_slots VALUES(11,224); +INSERT INTO product_slots VALUES(11,225); +INSERT INTO product_slots VALUES(11,226); +INSERT INTO product_slots VALUES(11,227); +INSERT INTO product_slots VALUES(11,228); +INSERT INTO product_slots VALUES(11,229); +INSERT INTO product_slots VALUES(11,230); +INSERT INTO product_slots VALUES(11,231); +INSERT INTO product_slots VALUES(11,232); +INSERT INTO product_slots VALUES(11,233); +INSERT INTO product_slots VALUES(11,234); +INSERT INTO product_slots VALUES(11,235); +INSERT INTO product_slots VALUES(11,236); +INSERT INTO product_slots VALUES(11,237); +INSERT INTO product_slots VALUES(11,238); +INSERT INTO product_slots VALUES(11,239); +INSERT INTO product_slots VALUES(11,240); +INSERT INTO product_slots VALUES(11,241); +INSERT INTO product_slots VALUES(11,242); +INSERT INTO product_slots VALUES(11,243); +INSERT INTO product_slots VALUES(11,244); +INSERT INTO product_slots VALUES(11,274); +INSERT INTO product_slots VALUES(11,275); +INSERT INTO product_slots VALUES(11,279); +INSERT INTO product_slots VALUES(11,280); +INSERT INTO product_slots VALUES(11,281); +INSERT INTO product_slots VALUES(11,282); +INSERT INTO product_slots VALUES(11,283); +INSERT INTO product_slots VALUES(11,284); +INSERT INTO product_slots VALUES(11,285); +INSERT INTO product_slots VALUES(11,286); +INSERT INTO product_slots VALUES(11,287); +INSERT INTO product_slots VALUES(12,5); +INSERT INTO product_slots VALUES(12,6); +INSERT INTO product_slots VALUES(12,7); +INSERT INTO product_slots VALUES(12,9); +INSERT INTO product_slots VALUES(12,16); +INSERT INTO product_slots VALUES(12,18); +INSERT INTO product_slots VALUES(12,20); +INSERT INTO product_slots VALUES(12,21); +INSERT INTO product_slots VALUES(12,22); +INSERT INTO product_slots VALUES(12,33); +INSERT INTO product_slots VALUES(12,35); +INSERT INTO product_slots VALUES(12,37); +INSERT INTO product_slots VALUES(12,38); +INSERT INTO product_slots VALUES(12,40); +INSERT INTO product_slots VALUES(13,5); +INSERT INTO product_slots VALUES(13,6); +INSERT INTO product_slots VALUES(13,7); +INSERT INTO product_slots VALUES(13,15); +INSERT INTO product_slots VALUES(13,16); +INSERT INTO product_slots VALUES(13,17); +INSERT INTO product_slots VALUES(13,18); +INSERT INTO product_slots VALUES(13,20); +INSERT INTO product_slots VALUES(13,21); +INSERT INTO product_slots VALUES(13,22); +INSERT INTO product_slots VALUES(13,33); +INSERT INTO product_slots VALUES(13,35); +INSERT INTO product_slots VALUES(13,37); +INSERT INTO product_slots VALUES(13,38); +INSERT INTO product_slots VALUES(13,39); +INSERT INTO product_slots VALUES(13,40); +INSERT INTO product_slots VALUES(13,43); +INSERT INTO product_slots VALUES(13,44); +INSERT INTO product_slots VALUES(13,45); +INSERT INTO product_slots VALUES(13,46); +INSERT INTO product_slots VALUES(13,47); +INSERT INTO product_slots VALUES(13,48); +INSERT INTO product_slots VALUES(13,49); +INSERT INTO product_slots VALUES(13,50); +INSERT INTO product_slots VALUES(13,51); +INSERT INTO product_slots VALUES(13,52); +INSERT INTO product_slots VALUES(13,53); +INSERT INTO product_slots VALUES(13,54); +INSERT INTO product_slots VALUES(13,55); +INSERT INTO product_slots VALUES(13,56); +INSERT INTO product_slots VALUES(13,57); +INSERT INTO product_slots VALUES(13,58); +INSERT INTO product_slots VALUES(13,59); +INSERT INTO product_slots VALUES(13,60); +INSERT INTO product_slots VALUES(13,61); +INSERT INTO product_slots VALUES(13,62); +INSERT INTO product_slots VALUES(13,63); +INSERT INTO product_slots VALUES(13,64); +INSERT INTO product_slots VALUES(13,65); +INSERT INTO product_slots VALUES(13,66); +INSERT INTO product_slots VALUES(13,67); +INSERT INTO product_slots VALUES(13,68); +INSERT INTO product_slots VALUES(13,69); +INSERT INTO product_slots VALUES(13,70); +INSERT INTO product_slots VALUES(13,71); +INSERT INTO product_slots VALUES(13,72); +INSERT INTO product_slots VALUES(13,73); +INSERT INTO product_slots VALUES(13,74); +INSERT INTO product_slots VALUES(13,75); +INSERT INTO product_slots VALUES(13,76); +INSERT INTO product_slots VALUES(13,77); +INSERT INTO product_slots VALUES(13,78); +INSERT INTO product_slots VALUES(13,79); +INSERT INTO product_slots VALUES(13,80); +INSERT INTO product_slots VALUES(13,81); +INSERT INTO product_slots VALUES(13,82); +INSERT INTO product_slots VALUES(13,83); +INSERT INTO product_slots VALUES(13,84); +INSERT INTO product_slots VALUES(13,85); +INSERT INTO product_slots VALUES(13,86); +INSERT INTO product_slots VALUES(13,87); +INSERT INTO product_slots VALUES(13,88); +INSERT INTO product_slots VALUES(13,89); +INSERT INTO product_slots VALUES(13,90); +INSERT INTO product_slots VALUES(13,91); +INSERT INTO product_slots VALUES(13,92); +INSERT INTO product_slots VALUES(13,93); +INSERT INTO product_slots VALUES(13,94); +INSERT INTO product_slots VALUES(13,95); +INSERT INTO product_slots VALUES(13,96); +INSERT INTO product_slots VALUES(13,97); +INSERT INTO product_slots VALUES(13,98); +INSERT INTO product_slots VALUES(13,99); +INSERT INTO product_slots VALUES(13,100); +INSERT INTO product_slots VALUES(13,102); +INSERT INTO product_slots VALUES(13,103); +INSERT INTO product_slots VALUES(13,104); +INSERT INTO product_slots VALUES(13,105); +INSERT INTO product_slots VALUES(13,106); +INSERT INTO product_slots VALUES(13,107); +INSERT INTO product_slots VALUES(13,108); +INSERT INTO product_slots VALUES(13,109); +INSERT INTO product_slots VALUES(13,110); +INSERT INTO product_slots VALUES(13,111); +INSERT INTO product_slots VALUES(13,112); +INSERT INTO product_slots VALUES(13,113); +INSERT INTO product_slots VALUES(13,114); +INSERT INTO product_slots VALUES(13,115); +INSERT INTO product_slots VALUES(13,117); +INSERT INTO product_slots VALUES(13,118); +INSERT INTO product_slots VALUES(13,119); +INSERT INTO product_slots VALUES(13,120); +INSERT INTO product_slots VALUES(13,121); +INSERT INTO product_slots VALUES(13,122); +INSERT INTO product_slots VALUES(13,123); +INSERT INTO product_slots VALUES(13,124); +INSERT INTO product_slots VALUES(13,125); +INSERT INTO product_slots VALUES(13,126); +INSERT INTO product_slots VALUES(13,127); +INSERT INTO product_slots VALUES(13,128); +INSERT INTO product_slots VALUES(13,129); +INSERT INTO product_slots VALUES(13,130); +INSERT INTO product_slots VALUES(13,131); +INSERT INTO product_slots VALUES(13,132); +INSERT INTO product_slots VALUES(13,133); +INSERT INTO product_slots VALUES(13,134); +INSERT INTO product_slots VALUES(13,135); +INSERT INTO product_slots VALUES(13,136); +INSERT INTO product_slots VALUES(13,138); +INSERT INTO product_slots VALUES(13,139); +INSERT INTO product_slots VALUES(13,140); +INSERT INTO product_slots VALUES(13,141); +INSERT INTO product_slots VALUES(13,142); +INSERT INTO product_slots VALUES(13,143); +INSERT INTO product_slots VALUES(13,145); +INSERT INTO product_slots VALUES(13,146); +INSERT INTO product_slots VALUES(13,147); +INSERT INTO product_slots VALUES(13,148); +INSERT INTO product_slots VALUES(13,149); +INSERT INTO product_slots VALUES(13,150); +INSERT INTO product_slots VALUES(13,151); +INSERT INTO product_slots VALUES(13,152); +INSERT INTO product_slots VALUES(13,153); +INSERT INTO product_slots VALUES(13,154); +INSERT INTO product_slots VALUES(13,155); +INSERT INTO product_slots VALUES(13,156); +INSERT INTO product_slots VALUES(13,157); +INSERT INTO product_slots VALUES(13,158); +INSERT INTO product_slots VALUES(13,159); +INSERT INTO product_slots VALUES(13,160); +INSERT INTO product_slots VALUES(13,161); +INSERT INTO product_slots VALUES(13,162); +INSERT INTO product_slots VALUES(13,163); +INSERT INTO product_slots VALUES(13,164); +INSERT INTO product_slots VALUES(13,165); +INSERT INTO product_slots VALUES(13,166); +INSERT INTO product_slots VALUES(13,167); +INSERT INTO product_slots VALUES(13,168); +INSERT INTO product_slots VALUES(13,169); +INSERT INTO product_slots VALUES(13,170); +INSERT INTO product_slots VALUES(13,171); +INSERT INTO product_slots VALUES(13,172); +INSERT INTO product_slots VALUES(13,173); +INSERT INTO product_slots VALUES(13,174); +INSERT INTO product_slots VALUES(13,175); +INSERT INTO product_slots VALUES(13,176); +INSERT INTO product_slots VALUES(13,177); +INSERT INTO product_slots VALUES(13,178); +INSERT INTO product_slots VALUES(13,179); +INSERT INTO product_slots VALUES(13,180); +INSERT INTO product_slots VALUES(13,181); +INSERT INTO product_slots VALUES(13,182); +INSERT INTO product_slots VALUES(13,183); +INSERT INTO product_slots VALUES(13,184); +INSERT INTO product_slots VALUES(13,185); +INSERT INTO product_slots VALUES(13,186); +INSERT INTO product_slots VALUES(13,187); +INSERT INTO product_slots VALUES(13,188); +INSERT INTO product_slots VALUES(13,189); +INSERT INTO product_slots VALUES(13,190); +INSERT INTO product_slots VALUES(13,191); +INSERT INTO product_slots VALUES(13,192); +INSERT INTO product_slots VALUES(13,193); +INSERT INTO product_slots VALUES(13,194); +INSERT INTO product_slots VALUES(13,195); +INSERT INTO product_slots VALUES(13,196); +INSERT INTO product_slots VALUES(13,197); +INSERT INTO product_slots VALUES(13,198); +INSERT INTO product_slots VALUES(13,199); +INSERT INTO product_slots VALUES(13,200); +INSERT INTO product_slots VALUES(13,201); +INSERT INTO product_slots VALUES(13,202); +INSERT INTO product_slots VALUES(13,203); +INSERT INTO product_slots VALUES(13,204); +INSERT INTO product_slots VALUES(13,205); +INSERT INTO product_slots VALUES(13,206); +INSERT INTO product_slots VALUES(13,207); +INSERT INTO product_slots VALUES(13,208); +INSERT INTO product_slots VALUES(13,209); +INSERT INTO product_slots VALUES(13,210); +INSERT INTO product_slots VALUES(13,211); +INSERT INTO product_slots VALUES(13,212); +INSERT INTO product_slots VALUES(13,213); +INSERT INTO product_slots VALUES(13,214); +INSERT INTO product_slots VALUES(13,215); +INSERT INTO product_slots VALUES(13,216); +INSERT INTO product_slots VALUES(13,217); +INSERT INTO product_slots VALUES(13,218); +INSERT INTO product_slots VALUES(13,219); +INSERT INTO product_slots VALUES(13,220); +INSERT INTO product_slots VALUES(13,221); +INSERT INTO product_slots VALUES(13,222); +INSERT INTO product_slots VALUES(13,223); +INSERT INTO product_slots VALUES(13,224); +INSERT INTO product_slots VALUES(13,225); +INSERT INTO product_slots VALUES(13,226); +INSERT INTO product_slots VALUES(13,227); +INSERT INTO product_slots VALUES(13,228); +INSERT INTO product_slots VALUES(13,229); +INSERT INTO product_slots VALUES(13,230); +INSERT INTO product_slots VALUES(13,231); +INSERT INTO product_slots VALUES(13,232); +INSERT INTO product_slots VALUES(13,233); +INSERT INTO product_slots VALUES(13,234); +INSERT INTO product_slots VALUES(13,235); +INSERT INTO product_slots VALUES(13,236); +INSERT INTO product_slots VALUES(13,237); +INSERT INTO product_slots VALUES(13,238); +INSERT INTO product_slots VALUES(13,239); +INSERT INTO product_slots VALUES(13,240); +INSERT INTO product_slots VALUES(13,241); +INSERT INTO product_slots VALUES(13,242); +INSERT INTO product_slots VALUES(13,243); +INSERT INTO product_slots VALUES(13,244); +INSERT INTO product_slots VALUES(13,274); +INSERT INTO product_slots VALUES(13,275); +INSERT INTO product_slots VALUES(13,279); +INSERT INTO product_slots VALUES(13,280); +INSERT INTO product_slots VALUES(13,281); +INSERT INTO product_slots VALUES(13,282); +INSERT INTO product_slots VALUES(13,283); +INSERT INTO product_slots VALUES(13,284); +INSERT INTO product_slots VALUES(13,285); +INSERT INTO product_slots VALUES(13,286); +INSERT INTO product_slots VALUES(13,287); +INSERT INTO product_slots VALUES(14,5); +INSERT INTO product_slots VALUES(14,6); +INSERT INTO product_slots VALUES(14,7); +INSERT INTO product_slots VALUES(14,12); +INSERT INTO product_slots VALUES(14,18); +INSERT INTO product_slots VALUES(14,20); +INSERT INTO product_slots VALUES(14,21); +INSERT INTO product_slots VALUES(14,22); +INSERT INTO product_slots VALUES(14,33); +INSERT INTO product_slots VALUES(14,35); +INSERT INTO product_slots VALUES(14,37); +INSERT INTO product_slots VALUES(14,38); +INSERT INTO product_slots VALUES(14,39); +INSERT INTO product_slots VALUES(14,40); +INSERT INTO product_slots VALUES(14,41); +INSERT INTO product_slots VALUES(14,43); +INSERT INTO product_slots VALUES(14,45); +INSERT INTO product_slots VALUES(14,46); +INSERT INTO product_slots VALUES(14,47); +INSERT INTO product_slots VALUES(14,48); +INSERT INTO product_slots VALUES(14,49); +INSERT INTO product_slots VALUES(14,50); +INSERT INTO product_slots VALUES(14,51); +INSERT INTO product_slots VALUES(14,52); +INSERT INTO product_slots VALUES(14,53); +INSERT INTO product_slots VALUES(14,54); +INSERT INTO product_slots VALUES(14,55); +INSERT INTO product_slots VALUES(14,56); +INSERT INTO product_slots VALUES(14,57); +INSERT INTO product_slots VALUES(14,58); +INSERT INTO product_slots VALUES(14,59); +INSERT INTO product_slots VALUES(14,60); +INSERT INTO product_slots VALUES(14,61); +INSERT INTO product_slots VALUES(14,62); +INSERT INTO product_slots VALUES(14,63); +INSERT INTO product_slots VALUES(14,64); +INSERT INTO product_slots VALUES(14,65); +INSERT INTO product_slots VALUES(14,66); +INSERT INTO product_slots VALUES(14,67); +INSERT INTO product_slots VALUES(14,68); +INSERT INTO product_slots VALUES(14,69); +INSERT INTO product_slots VALUES(14,70); +INSERT INTO product_slots VALUES(14,71); +INSERT INTO product_slots VALUES(14,74); +INSERT INTO product_slots VALUES(14,75); +INSERT INTO product_slots VALUES(14,76); +INSERT INTO product_slots VALUES(14,77); +INSERT INTO product_slots VALUES(14,78); +INSERT INTO product_slots VALUES(14,81); +INSERT INTO product_slots VALUES(14,82); +INSERT INTO product_slots VALUES(14,83); +INSERT INTO product_slots VALUES(14,84); +INSERT INTO product_slots VALUES(14,87); +INSERT INTO product_slots VALUES(14,88); +INSERT INTO product_slots VALUES(14,89); +INSERT INTO product_slots VALUES(14,90); +INSERT INTO product_slots VALUES(14,91); +INSERT INTO product_slots VALUES(14,95); +INSERT INTO product_slots VALUES(14,96); +INSERT INTO product_slots VALUES(14,97); +INSERT INTO product_slots VALUES(14,98); +INSERT INTO product_slots VALUES(14,101); +INSERT INTO product_slots VALUES(14,102); +INSERT INTO product_slots VALUES(14,103); +INSERT INTO product_slots VALUES(14,104); +INSERT INTO product_slots VALUES(14,109); +INSERT INTO product_slots VALUES(14,110); +INSERT INTO product_slots VALUES(14,111); +INSERT INTO product_slots VALUES(14,112); +INSERT INTO product_slots VALUES(14,116); +INSERT INTO product_slots VALUES(14,117); +INSERT INTO product_slots VALUES(14,118); +INSERT INTO product_slots VALUES(14,119); +INSERT INTO product_slots VALUES(14,120); +INSERT INTO product_slots VALUES(14,123); +INSERT INTO product_slots VALUES(14,124); +INSERT INTO product_slots VALUES(14,125); +INSERT INTO product_slots VALUES(14,126); +INSERT INTO product_slots VALUES(14,130); +INSERT INTO product_slots VALUES(14,131); +INSERT INTO product_slots VALUES(14,132); +INSERT INTO product_slots VALUES(14,133); +INSERT INTO product_slots VALUES(14,137); +INSERT INTO product_slots VALUES(14,138); +INSERT INTO product_slots VALUES(14,139); +INSERT INTO product_slots VALUES(14,140); +INSERT INTO product_slots VALUES(14,144); +INSERT INTO product_slots VALUES(14,145); +INSERT INTO product_slots VALUES(14,146); +INSERT INTO product_slots VALUES(14,147); +INSERT INTO product_slots VALUES(14,148); +INSERT INTO product_slots VALUES(14,149); +INSERT INTO product_slots VALUES(14,150); +INSERT INTO product_slots VALUES(14,151); +INSERT INTO product_slots VALUES(14,155); +INSERT INTO product_slots VALUES(14,156); +INSERT INTO product_slots VALUES(14,157); +INSERT INTO product_slots VALUES(14,158); +INSERT INTO product_slots VALUES(14,162); +INSERT INTO product_slots VALUES(14,163); +INSERT INTO product_slots VALUES(14,164); +INSERT INTO product_slots VALUES(14,165); +INSERT INTO product_slots VALUES(14,166); +INSERT INTO product_slots VALUES(14,169); +INSERT INTO product_slots VALUES(14,170); +INSERT INTO product_slots VALUES(14,171); +INSERT INTO product_slots VALUES(14,172); +INSERT INTO product_slots VALUES(14,176); +INSERT INTO product_slots VALUES(14,177); +INSERT INTO product_slots VALUES(14,178); +INSERT INTO product_slots VALUES(14,179); +INSERT INTO product_slots VALUES(14,183); +INSERT INTO product_slots VALUES(14,184); +INSERT INTO product_slots VALUES(14,185); +INSERT INTO product_slots VALUES(14,186); +INSERT INTO product_slots VALUES(14,187); +INSERT INTO product_slots VALUES(14,188); +INSERT INTO product_slots VALUES(14,189); +INSERT INTO product_slots VALUES(14,190); +INSERT INTO product_slots VALUES(14,191); +INSERT INTO product_slots VALUES(14,192); +INSERT INTO product_slots VALUES(14,193); +INSERT INTO product_slots VALUES(14,194); +INSERT INTO product_slots VALUES(14,198); +INSERT INTO product_slots VALUES(14,199); +INSERT INTO product_slots VALUES(14,200); +INSERT INTO product_slots VALUES(14,201); +INSERT INTO product_slots VALUES(14,202); +INSERT INTO product_slots VALUES(14,203); +INSERT INTO product_slots VALUES(14,205); +INSERT INTO product_slots VALUES(14,208); +INSERT INTO product_slots VALUES(14,209); +INSERT INTO product_slots VALUES(14,210); +INSERT INTO product_slots VALUES(14,211); +INSERT INTO product_slots VALUES(14,216); +INSERT INTO product_slots VALUES(14,217); +INSERT INTO product_slots VALUES(14,218); +INSERT INTO product_slots VALUES(14,219); +INSERT INTO product_slots VALUES(14,220); +INSERT INTO product_slots VALUES(14,223); +INSERT INTO product_slots VALUES(14,224); +INSERT INTO product_slots VALUES(14,225); +INSERT INTO product_slots VALUES(14,226); +INSERT INTO product_slots VALUES(14,230); +INSERT INTO product_slots VALUES(14,231); +INSERT INTO product_slots VALUES(14,232); +INSERT INTO product_slots VALUES(14,234); +INSERT INTO product_slots VALUES(14,237); +INSERT INTO product_slots VALUES(14,238); +INSERT INTO product_slots VALUES(14,239); +INSERT INTO product_slots VALUES(14,240); +INSERT INTO product_slots VALUES(14,274); +INSERT INTO product_slots VALUES(14,275); +INSERT INTO product_slots VALUES(14,277); +INSERT INTO product_slots VALUES(14,278); +INSERT INTO product_slots VALUES(14,279); +INSERT INTO product_slots VALUES(15,5); +INSERT INTO product_slots VALUES(15,6); +INSERT INTO product_slots VALUES(15,7); +INSERT INTO product_slots VALUES(15,8); +INSERT INTO product_slots VALUES(15,9); +INSERT INTO product_slots VALUES(15,12); +INSERT INTO product_slots VALUES(15,18); +INSERT INTO product_slots VALUES(15,19); +INSERT INTO product_slots VALUES(15,20); +INSERT INTO product_slots VALUES(15,21); +INSERT INTO product_slots VALUES(15,22); +INSERT INTO product_slots VALUES(15,23); +INSERT INTO product_slots VALUES(15,31); +INSERT INTO product_slots VALUES(15,33); +INSERT INTO product_slots VALUES(15,35); +INSERT INTO product_slots VALUES(15,37); +INSERT INTO product_slots VALUES(15,38); +INSERT INTO product_slots VALUES(15,39); +INSERT INTO product_slots VALUES(15,40); +INSERT INTO product_slots VALUES(15,59); +INSERT INTO product_slots VALUES(15,62); +INSERT INTO product_slots VALUES(15,63); +INSERT INTO product_slots VALUES(15,64); +INSERT INTO product_slots VALUES(15,65); +INSERT INTO product_slots VALUES(15,66); +INSERT INTO product_slots VALUES(15,67); +INSERT INTO product_slots VALUES(15,72); +INSERT INTO product_slots VALUES(15,73); +INSERT INTO product_slots VALUES(15,279); +INSERT INTO product_slots VALUES(16,16); +INSERT INTO product_slots VALUES(16,18); +INSERT INTO product_slots VALUES(16,20); +INSERT INTO product_slots VALUES(16,39); +INSERT INTO product_slots VALUES(16,44); +INSERT INTO product_slots VALUES(16,46); +INSERT INTO product_slots VALUES(16,47); +INSERT INTO product_slots VALUES(16,48); +INSERT INTO product_slots VALUES(16,49); +INSERT INTO product_slots VALUES(16,50); +INSERT INTO product_slots VALUES(16,51); +INSERT INTO product_slots VALUES(16,52); +INSERT INTO product_slots VALUES(16,53); +INSERT INTO product_slots VALUES(16,54); +INSERT INTO product_slots VALUES(16,55); +INSERT INTO product_slots VALUES(16,56); +INSERT INTO product_slots VALUES(16,57); +INSERT INTO product_slots VALUES(16,58); +INSERT INTO product_slots VALUES(16,59); +INSERT INTO product_slots VALUES(16,60); +INSERT INTO product_slots VALUES(16,61); +INSERT INTO product_slots VALUES(16,62); +INSERT INTO product_slots VALUES(16,63); +INSERT INTO product_slots VALUES(16,64); +INSERT INTO product_slots VALUES(16,65); +INSERT INTO product_slots VALUES(16,66); +INSERT INTO product_slots VALUES(16,67); +INSERT INTO product_slots VALUES(16,68); +INSERT INTO product_slots VALUES(16,69); +INSERT INTO product_slots VALUES(16,70); +INSERT INTO product_slots VALUES(16,71); +INSERT INTO product_slots VALUES(16,72); +INSERT INTO product_slots VALUES(16,73); +INSERT INTO product_slots VALUES(16,74); +INSERT INTO product_slots VALUES(16,75); +INSERT INTO product_slots VALUES(16,76); +INSERT INTO product_slots VALUES(16,77); +INSERT INTO product_slots VALUES(16,78); +INSERT INTO product_slots VALUES(16,79); +INSERT INTO product_slots VALUES(16,80); +INSERT INTO product_slots VALUES(16,81); +INSERT INTO product_slots VALUES(16,82); +INSERT INTO product_slots VALUES(16,83); +INSERT INTO product_slots VALUES(16,84); +INSERT INTO product_slots VALUES(16,85); +INSERT INTO product_slots VALUES(16,86); +INSERT INTO product_slots VALUES(16,87); +INSERT INTO product_slots VALUES(16,88); +INSERT INTO product_slots VALUES(16,89); +INSERT INTO product_slots VALUES(16,90); +INSERT INTO product_slots VALUES(16,91); +INSERT INTO product_slots VALUES(16,92); +INSERT INTO product_slots VALUES(16,93); +INSERT INTO product_slots VALUES(16,94); +INSERT INTO product_slots VALUES(16,95); +INSERT INTO product_slots VALUES(16,96); +INSERT INTO product_slots VALUES(16,97); +INSERT INTO product_slots VALUES(16,98); +INSERT INTO product_slots VALUES(16,99); +INSERT INTO product_slots VALUES(16,100); +INSERT INTO product_slots VALUES(16,101); +INSERT INTO product_slots VALUES(16,102); +INSERT INTO product_slots VALUES(16,103); +INSERT INTO product_slots VALUES(16,104); +INSERT INTO product_slots VALUES(16,105); +INSERT INTO product_slots VALUES(16,106); +INSERT INTO product_slots VALUES(16,107); +INSERT INTO product_slots VALUES(16,108); +INSERT INTO product_slots VALUES(16,109); +INSERT INTO product_slots VALUES(16,110); +INSERT INTO product_slots VALUES(16,111); +INSERT INTO product_slots VALUES(16,112); +INSERT INTO product_slots VALUES(16,113); +INSERT INTO product_slots VALUES(16,114); +INSERT INTO product_slots VALUES(16,115); +INSERT INTO product_slots VALUES(16,116); +INSERT INTO product_slots VALUES(16,117); +INSERT INTO product_slots VALUES(16,118); +INSERT INTO product_slots VALUES(16,119); +INSERT INTO product_slots VALUES(16,120); +INSERT INTO product_slots VALUES(16,121); +INSERT INTO product_slots VALUES(16,122); +INSERT INTO product_slots VALUES(16,123); +INSERT INTO product_slots VALUES(16,124); +INSERT INTO product_slots VALUES(16,125); +INSERT INTO product_slots VALUES(16,126); +INSERT INTO product_slots VALUES(16,127); +INSERT INTO product_slots VALUES(16,128); +INSERT INTO product_slots VALUES(16,129); +INSERT INTO product_slots VALUES(16,130); +INSERT INTO product_slots VALUES(16,131); +INSERT INTO product_slots VALUES(16,132); +INSERT INTO product_slots VALUES(16,133); +INSERT INTO product_slots VALUES(16,134); +INSERT INTO product_slots VALUES(16,135); +INSERT INTO product_slots VALUES(16,136); +INSERT INTO product_slots VALUES(16,137); +INSERT INTO product_slots VALUES(16,138); +INSERT INTO product_slots VALUES(16,139); +INSERT INTO product_slots VALUES(16,140); +INSERT INTO product_slots VALUES(16,141); +INSERT INTO product_slots VALUES(16,142); +INSERT INTO product_slots VALUES(16,143); +INSERT INTO product_slots VALUES(16,144); +INSERT INTO product_slots VALUES(16,145); +INSERT INTO product_slots VALUES(16,146); +INSERT INTO product_slots VALUES(16,147); +INSERT INTO product_slots VALUES(16,148); +INSERT INTO product_slots VALUES(16,149); +INSERT INTO product_slots VALUES(16,150); +INSERT INTO product_slots VALUES(16,151); +INSERT INTO product_slots VALUES(16,152); +INSERT INTO product_slots VALUES(16,153); +INSERT INTO product_slots VALUES(16,154); +INSERT INTO product_slots VALUES(16,155); +INSERT INTO product_slots VALUES(16,156); +INSERT INTO product_slots VALUES(16,157); +INSERT INTO product_slots VALUES(16,158); +INSERT INTO product_slots VALUES(16,159); +INSERT INTO product_slots VALUES(16,160); +INSERT INTO product_slots VALUES(16,161); +INSERT INTO product_slots VALUES(16,162); +INSERT INTO product_slots VALUES(16,163); +INSERT INTO product_slots VALUES(16,164); +INSERT INTO product_slots VALUES(16,165); +INSERT INTO product_slots VALUES(16,166); +INSERT INTO product_slots VALUES(16,167); +INSERT INTO product_slots VALUES(16,168); +INSERT INTO product_slots VALUES(16,169); +INSERT INTO product_slots VALUES(16,170); +INSERT INTO product_slots VALUES(16,171); +INSERT INTO product_slots VALUES(16,172); +INSERT INTO product_slots VALUES(16,173); +INSERT INTO product_slots VALUES(16,174); +INSERT INTO product_slots VALUES(16,175); +INSERT INTO product_slots VALUES(16,176); +INSERT INTO product_slots VALUES(16,177); +INSERT INTO product_slots VALUES(16,178); +INSERT INTO product_slots VALUES(16,179); +INSERT INTO product_slots VALUES(16,180); +INSERT INTO product_slots VALUES(16,181); +INSERT INTO product_slots VALUES(16,182); +INSERT INTO product_slots VALUES(16,183); +INSERT INTO product_slots VALUES(16,184); +INSERT INTO product_slots VALUES(16,185); +INSERT INTO product_slots VALUES(16,186); +INSERT INTO product_slots VALUES(16,187); +INSERT INTO product_slots VALUES(16,188); +INSERT INTO product_slots VALUES(16,189); +INSERT INTO product_slots VALUES(16,190); +INSERT INTO product_slots VALUES(16,191); +INSERT INTO product_slots VALUES(16,192); +INSERT INTO product_slots VALUES(16,193); +INSERT INTO product_slots VALUES(16,194); +INSERT INTO product_slots VALUES(16,195); +INSERT INTO product_slots VALUES(16,196); +INSERT INTO product_slots VALUES(16,197); +INSERT INTO product_slots VALUES(16,198); +INSERT INTO product_slots VALUES(16,199); +INSERT INTO product_slots VALUES(16,200); +INSERT INTO product_slots VALUES(16,201); +INSERT INTO product_slots VALUES(16,202); +INSERT INTO product_slots VALUES(16,203); +INSERT INTO product_slots VALUES(16,204); +INSERT INTO product_slots VALUES(16,205); +INSERT INTO product_slots VALUES(16,206); +INSERT INTO product_slots VALUES(16,207); +INSERT INTO product_slots VALUES(16,208); +INSERT INTO product_slots VALUES(16,209); +INSERT INTO product_slots VALUES(16,210); +INSERT INTO product_slots VALUES(16,211); +INSERT INTO product_slots VALUES(16,212); +INSERT INTO product_slots VALUES(16,213); +INSERT INTO product_slots VALUES(16,214); +INSERT INTO product_slots VALUES(16,215); +INSERT INTO product_slots VALUES(16,216); +INSERT INTO product_slots VALUES(16,217); +INSERT INTO product_slots VALUES(16,218); +INSERT INTO product_slots VALUES(16,219); +INSERT INTO product_slots VALUES(16,220); +INSERT INTO product_slots VALUES(16,221); +INSERT INTO product_slots VALUES(16,222); +INSERT INTO product_slots VALUES(16,223); +INSERT INTO product_slots VALUES(16,224); +INSERT INTO product_slots VALUES(16,225); +INSERT INTO product_slots VALUES(16,226); +INSERT INTO product_slots VALUES(16,227); +INSERT INTO product_slots VALUES(16,228); +INSERT INTO product_slots VALUES(16,229); +INSERT INTO product_slots VALUES(16,230); +INSERT INTO product_slots VALUES(16,231); +INSERT INTO product_slots VALUES(16,232); +INSERT INTO product_slots VALUES(16,233); +INSERT INTO product_slots VALUES(16,234); +INSERT INTO product_slots VALUES(16,235); +INSERT INTO product_slots VALUES(16,236); +INSERT INTO product_slots VALUES(16,237); +INSERT INTO product_slots VALUES(16,238); +INSERT INTO product_slots VALUES(16,239); +INSERT INTO product_slots VALUES(16,240); +INSERT INTO product_slots VALUES(16,241); +INSERT INTO product_slots VALUES(16,242); +INSERT INTO product_slots VALUES(16,243); +INSERT INTO product_slots VALUES(16,244); +INSERT INTO product_slots VALUES(16,274); +INSERT INTO product_slots VALUES(16,275); +INSERT INTO product_slots VALUES(16,279); +INSERT INTO product_slots VALUES(16,280); +INSERT INTO product_slots VALUES(16,281); +INSERT INTO product_slots VALUES(16,282); +INSERT INTO product_slots VALUES(16,283); +INSERT INTO product_slots VALUES(16,284); +INSERT INTO product_slots VALUES(16,285); +INSERT INTO product_slots VALUES(16,286); +INSERT INTO product_slots VALUES(16,287); +INSERT INTO product_slots VALUES(17,12); +INSERT INTO product_slots VALUES(17,18); +INSERT INTO product_slots VALUES(17,20); +INSERT INTO product_slots VALUES(17,21); +INSERT INTO product_slots VALUES(17,33); +INSERT INTO product_slots VALUES(17,35); +INSERT INTO product_slots VALUES(17,37); +INSERT INTO product_slots VALUES(17,38); +INSERT INTO product_slots VALUES(17,39); +INSERT INTO product_slots VALUES(17,40); +INSERT INTO product_slots VALUES(17,41); +INSERT INTO product_slots VALUES(17,43); +INSERT INTO product_slots VALUES(17,44); +INSERT INTO product_slots VALUES(17,45); +INSERT INTO product_slots VALUES(17,46); +INSERT INTO product_slots VALUES(17,47); +INSERT INTO product_slots VALUES(17,48); +INSERT INTO product_slots VALUES(17,49); +INSERT INTO product_slots VALUES(17,50); +INSERT INTO product_slots VALUES(17,51); +INSERT INTO product_slots VALUES(17,52); +INSERT INTO product_slots VALUES(17,53); +INSERT INTO product_slots VALUES(17,54); +INSERT INTO product_slots VALUES(17,55); +INSERT INTO product_slots VALUES(17,56); +INSERT INTO product_slots VALUES(17,57); +INSERT INTO product_slots VALUES(17,58); +INSERT INTO product_slots VALUES(17,59); +INSERT INTO product_slots VALUES(17,60); +INSERT INTO product_slots VALUES(17,61); +INSERT INTO product_slots VALUES(17,62); +INSERT INTO product_slots VALUES(17,63); +INSERT INTO product_slots VALUES(17,64); +INSERT INTO product_slots VALUES(17,65); +INSERT INTO product_slots VALUES(17,66); +INSERT INTO product_slots VALUES(17,67); +INSERT INTO product_slots VALUES(17,68); +INSERT INTO product_slots VALUES(17,69); +INSERT INTO product_slots VALUES(17,70); +INSERT INTO product_slots VALUES(17,71); +INSERT INTO product_slots VALUES(17,72); +INSERT INTO product_slots VALUES(17,73); +INSERT INTO product_slots VALUES(17,74); +INSERT INTO product_slots VALUES(17,75); +INSERT INTO product_slots VALUES(17,76); +INSERT INTO product_slots VALUES(17,77); +INSERT INTO product_slots VALUES(17,78); +INSERT INTO product_slots VALUES(17,79); +INSERT INTO product_slots VALUES(17,80); +INSERT INTO product_slots VALUES(17,81); +INSERT INTO product_slots VALUES(17,82); +INSERT INTO product_slots VALUES(17,83); +INSERT INTO product_slots VALUES(17,84); +INSERT INTO product_slots VALUES(17,85); +INSERT INTO product_slots VALUES(17,86); +INSERT INTO product_slots VALUES(17,87); +INSERT INTO product_slots VALUES(17,88); +INSERT INTO product_slots VALUES(17,89); +INSERT INTO product_slots VALUES(17,90); +INSERT INTO product_slots VALUES(17,91); +INSERT INTO product_slots VALUES(17,92); +INSERT INTO product_slots VALUES(17,93); +INSERT INTO product_slots VALUES(17,94); +INSERT INTO product_slots VALUES(17,95); +INSERT INTO product_slots VALUES(17,96); +INSERT INTO product_slots VALUES(17,97); +INSERT INTO product_slots VALUES(17,98); +INSERT INTO product_slots VALUES(17,99); +INSERT INTO product_slots VALUES(17,100); +INSERT INTO product_slots VALUES(17,101); +INSERT INTO product_slots VALUES(17,102); +INSERT INTO product_slots VALUES(17,103); +INSERT INTO product_slots VALUES(17,104); +INSERT INTO product_slots VALUES(17,105); +INSERT INTO product_slots VALUES(17,106); +INSERT INTO product_slots VALUES(17,107); +INSERT INTO product_slots VALUES(17,108); +INSERT INTO product_slots VALUES(17,109); +INSERT INTO product_slots VALUES(17,110); +INSERT INTO product_slots VALUES(17,111); +INSERT INTO product_slots VALUES(17,112); +INSERT INTO product_slots VALUES(17,113); +INSERT INTO product_slots VALUES(17,114); +INSERT INTO product_slots VALUES(17,115); +INSERT INTO product_slots VALUES(17,116); +INSERT INTO product_slots VALUES(17,117); +INSERT INTO product_slots VALUES(17,118); +INSERT INTO product_slots VALUES(17,119); +INSERT INTO product_slots VALUES(17,120); +INSERT INTO product_slots VALUES(17,121); +INSERT INTO product_slots VALUES(17,122); +INSERT INTO product_slots VALUES(17,123); +INSERT INTO product_slots VALUES(17,124); +INSERT INTO product_slots VALUES(17,125); +INSERT INTO product_slots VALUES(17,126); +INSERT INTO product_slots VALUES(17,127); +INSERT INTO product_slots VALUES(17,128); +INSERT INTO product_slots VALUES(17,129); +INSERT INTO product_slots VALUES(17,130); +INSERT INTO product_slots VALUES(17,131); +INSERT INTO product_slots VALUES(17,132); +INSERT INTO product_slots VALUES(17,133); +INSERT INTO product_slots VALUES(17,134); +INSERT INTO product_slots VALUES(17,135); +INSERT INTO product_slots VALUES(17,136); +INSERT INTO product_slots VALUES(17,137); +INSERT INTO product_slots VALUES(17,138); +INSERT INTO product_slots VALUES(17,139); +INSERT INTO product_slots VALUES(17,140); +INSERT INTO product_slots VALUES(17,141); +INSERT INTO product_slots VALUES(17,142); +INSERT INTO product_slots VALUES(17,143); +INSERT INTO product_slots VALUES(17,144); +INSERT INTO product_slots VALUES(17,145); +INSERT INTO product_slots VALUES(17,146); +INSERT INTO product_slots VALUES(17,147); +INSERT INTO product_slots VALUES(17,148); +INSERT INTO product_slots VALUES(17,149); +INSERT INTO product_slots VALUES(17,150); +INSERT INTO product_slots VALUES(17,151); +INSERT INTO product_slots VALUES(17,152); +INSERT INTO product_slots VALUES(17,153); +INSERT INTO product_slots VALUES(17,154); +INSERT INTO product_slots VALUES(17,155); +INSERT INTO product_slots VALUES(17,156); +INSERT INTO product_slots VALUES(17,157); +INSERT INTO product_slots VALUES(17,158); +INSERT INTO product_slots VALUES(17,159); +INSERT INTO product_slots VALUES(17,160); +INSERT INTO product_slots VALUES(17,161); +INSERT INTO product_slots VALUES(17,162); +INSERT INTO product_slots VALUES(17,163); +INSERT INTO product_slots VALUES(17,164); +INSERT INTO product_slots VALUES(17,165); +INSERT INTO product_slots VALUES(17,166); +INSERT INTO product_slots VALUES(17,167); +INSERT INTO product_slots VALUES(17,168); +INSERT INTO product_slots VALUES(17,169); +INSERT INTO product_slots VALUES(17,170); +INSERT INTO product_slots VALUES(17,171); +INSERT INTO product_slots VALUES(17,172); +INSERT INTO product_slots VALUES(17,173); +INSERT INTO product_slots VALUES(17,174); +INSERT INTO product_slots VALUES(17,175); +INSERT INTO product_slots VALUES(17,176); +INSERT INTO product_slots VALUES(17,177); +INSERT INTO product_slots VALUES(17,178); +INSERT INTO product_slots VALUES(17,179); +INSERT INTO product_slots VALUES(17,180); +INSERT INTO product_slots VALUES(17,181); +INSERT INTO product_slots VALUES(17,182); +INSERT INTO product_slots VALUES(17,183); +INSERT INTO product_slots VALUES(17,184); +INSERT INTO product_slots VALUES(17,185); +INSERT INTO product_slots VALUES(17,186); +INSERT INTO product_slots VALUES(17,187); +INSERT INTO product_slots VALUES(17,188); +INSERT INTO product_slots VALUES(17,189); +INSERT INTO product_slots VALUES(17,190); +INSERT INTO product_slots VALUES(17,191); +INSERT INTO product_slots VALUES(17,192); +INSERT INTO product_slots VALUES(17,193); +INSERT INTO product_slots VALUES(17,194); +INSERT INTO product_slots VALUES(17,195); +INSERT INTO product_slots VALUES(17,196); +INSERT INTO product_slots VALUES(17,197); +INSERT INTO product_slots VALUES(17,198); +INSERT INTO product_slots VALUES(17,199); +INSERT INTO product_slots VALUES(17,200); +INSERT INTO product_slots VALUES(17,201); +INSERT INTO product_slots VALUES(17,202); +INSERT INTO product_slots VALUES(17,203); +INSERT INTO product_slots VALUES(17,204); +INSERT INTO product_slots VALUES(17,205); +INSERT INTO product_slots VALUES(17,206); +INSERT INTO product_slots VALUES(17,207); +INSERT INTO product_slots VALUES(17,208); +INSERT INTO product_slots VALUES(17,209); +INSERT INTO product_slots VALUES(17,210); +INSERT INTO product_slots VALUES(17,211); +INSERT INTO product_slots VALUES(17,212); +INSERT INTO product_slots VALUES(17,213); +INSERT INTO product_slots VALUES(17,214); +INSERT INTO product_slots VALUES(17,215); +INSERT INTO product_slots VALUES(17,216); +INSERT INTO product_slots VALUES(17,217); +INSERT INTO product_slots VALUES(17,218); +INSERT INTO product_slots VALUES(17,219); +INSERT INTO product_slots VALUES(17,220); +INSERT INTO product_slots VALUES(17,221); +INSERT INTO product_slots VALUES(17,222); +INSERT INTO product_slots VALUES(17,223); +INSERT INTO product_slots VALUES(17,224); +INSERT INTO product_slots VALUES(17,225); +INSERT INTO product_slots VALUES(17,226); +INSERT INTO product_slots VALUES(17,227); +INSERT INTO product_slots VALUES(17,228); +INSERT INTO product_slots VALUES(17,229); +INSERT INTO product_slots VALUES(17,230); +INSERT INTO product_slots VALUES(17,231); +INSERT INTO product_slots VALUES(17,232); +INSERT INTO product_slots VALUES(17,233); +INSERT INTO product_slots VALUES(17,234); +INSERT INTO product_slots VALUES(17,235); +INSERT INTO product_slots VALUES(17,236); +INSERT INTO product_slots VALUES(17,237); +INSERT INTO product_slots VALUES(17,238); +INSERT INTO product_slots VALUES(17,239); +INSERT INTO product_slots VALUES(17,240); +INSERT INTO product_slots VALUES(17,241); +INSERT INTO product_slots VALUES(17,242); +INSERT INTO product_slots VALUES(17,243); +INSERT INTO product_slots VALUES(17,244); +INSERT INTO product_slots VALUES(17,274); +INSERT INTO product_slots VALUES(17,275); +INSERT INTO product_slots VALUES(17,279); +INSERT INTO product_slots VALUES(17,280); +INSERT INTO product_slots VALUES(17,281); +INSERT INTO product_slots VALUES(17,282); +INSERT INTO product_slots VALUES(17,283); +INSERT INTO product_slots VALUES(17,284); +INSERT INTO product_slots VALUES(17,285); +INSERT INTO product_slots VALUES(17,286); +INSERT INTO product_slots VALUES(17,287); +INSERT INTO product_slots VALUES(18,12); +INSERT INTO product_slots VALUES(18,18); +INSERT INTO product_slots VALUES(18,20); +INSERT INTO product_slots VALUES(18,21); +INSERT INTO product_slots VALUES(18,33); +INSERT INTO product_slots VALUES(18,35); +INSERT INTO product_slots VALUES(18,37); +INSERT INTO product_slots VALUES(18,38); +INSERT INTO product_slots VALUES(18,39); +INSERT INTO product_slots VALUES(18,40); +INSERT INTO product_slots VALUES(18,44); +INSERT INTO product_slots VALUES(18,46); +INSERT INTO product_slots VALUES(18,47); +INSERT INTO product_slots VALUES(18,48); +INSERT INTO product_slots VALUES(18,49); +INSERT INTO product_slots VALUES(18,50); +INSERT INTO product_slots VALUES(18,51); +INSERT INTO product_slots VALUES(18,52); +INSERT INTO product_slots VALUES(18,53); +INSERT INTO product_slots VALUES(18,54); +INSERT INTO product_slots VALUES(18,55); +INSERT INTO product_slots VALUES(18,56); +INSERT INTO product_slots VALUES(18,57); +INSERT INTO product_slots VALUES(18,58); +INSERT INTO product_slots VALUES(18,59); +INSERT INTO product_slots VALUES(18,60); +INSERT INTO product_slots VALUES(18,61); +INSERT INTO product_slots VALUES(18,62); +INSERT INTO product_slots VALUES(18,63); +INSERT INTO product_slots VALUES(18,64); +INSERT INTO product_slots VALUES(18,65); +INSERT INTO product_slots VALUES(18,66); +INSERT INTO product_slots VALUES(18,67); +INSERT INTO product_slots VALUES(18,68); +INSERT INTO product_slots VALUES(18,69); +INSERT INTO product_slots VALUES(18,70); +INSERT INTO product_slots VALUES(18,71); +INSERT INTO product_slots VALUES(18,72); +INSERT INTO product_slots VALUES(18,73); +INSERT INTO product_slots VALUES(18,74); +INSERT INTO product_slots VALUES(18,75); +INSERT INTO product_slots VALUES(18,76); +INSERT INTO product_slots VALUES(18,77); +INSERT INTO product_slots VALUES(18,78); +INSERT INTO product_slots VALUES(18,79); +INSERT INTO product_slots VALUES(18,80); +INSERT INTO product_slots VALUES(18,81); +INSERT INTO product_slots VALUES(18,82); +INSERT INTO product_slots VALUES(18,83); +INSERT INTO product_slots VALUES(18,84); +INSERT INTO product_slots VALUES(18,85); +INSERT INTO product_slots VALUES(18,86); +INSERT INTO product_slots VALUES(18,87); +INSERT INTO product_slots VALUES(18,88); +INSERT INTO product_slots VALUES(18,89); +INSERT INTO product_slots VALUES(18,90); +INSERT INTO product_slots VALUES(18,91); +INSERT INTO product_slots VALUES(18,92); +INSERT INTO product_slots VALUES(18,93); +INSERT INTO product_slots VALUES(18,94); +INSERT INTO product_slots VALUES(18,95); +INSERT INTO product_slots VALUES(18,96); +INSERT INTO product_slots VALUES(18,97); +INSERT INTO product_slots VALUES(18,98); +INSERT INTO product_slots VALUES(18,99); +INSERT INTO product_slots VALUES(18,100); +INSERT INTO product_slots VALUES(18,101); +INSERT INTO product_slots VALUES(18,102); +INSERT INTO product_slots VALUES(18,103); +INSERT INTO product_slots VALUES(18,104); +INSERT INTO product_slots VALUES(18,105); +INSERT INTO product_slots VALUES(18,106); +INSERT INTO product_slots VALUES(18,107); +INSERT INTO product_slots VALUES(18,108); +INSERT INTO product_slots VALUES(18,109); +INSERT INTO product_slots VALUES(18,110); +INSERT INTO product_slots VALUES(18,111); +INSERT INTO product_slots VALUES(18,112); +INSERT INTO product_slots VALUES(18,113); +INSERT INTO product_slots VALUES(18,114); +INSERT INTO product_slots VALUES(18,115); +INSERT INTO product_slots VALUES(18,116); +INSERT INTO product_slots VALUES(18,117); +INSERT INTO product_slots VALUES(18,118); +INSERT INTO product_slots VALUES(18,119); +INSERT INTO product_slots VALUES(18,120); +INSERT INTO product_slots VALUES(18,121); +INSERT INTO product_slots VALUES(18,122); +INSERT INTO product_slots VALUES(18,123); +INSERT INTO product_slots VALUES(18,124); +INSERT INTO product_slots VALUES(18,125); +INSERT INTO product_slots VALUES(18,126); +INSERT INTO product_slots VALUES(18,127); +INSERT INTO product_slots VALUES(18,128); +INSERT INTO product_slots VALUES(18,129); +INSERT INTO product_slots VALUES(18,130); +INSERT INTO product_slots VALUES(18,131); +INSERT INTO product_slots VALUES(18,132); +INSERT INTO product_slots VALUES(18,133); +INSERT INTO product_slots VALUES(18,134); +INSERT INTO product_slots VALUES(18,135); +INSERT INTO product_slots VALUES(18,136); +INSERT INTO product_slots VALUES(18,137); +INSERT INTO product_slots VALUES(18,138); +INSERT INTO product_slots VALUES(18,139); +INSERT INTO product_slots VALUES(18,140); +INSERT INTO product_slots VALUES(18,141); +INSERT INTO product_slots VALUES(18,142); +INSERT INTO product_slots VALUES(18,143); +INSERT INTO product_slots VALUES(18,144); +INSERT INTO product_slots VALUES(18,145); +INSERT INTO product_slots VALUES(18,146); +INSERT INTO product_slots VALUES(18,147); +INSERT INTO product_slots VALUES(18,148); +INSERT INTO product_slots VALUES(18,149); +INSERT INTO product_slots VALUES(18,150); +INSERT INTO product_slots VALUES(18,151); +INSERT INTO product_slots VALUES(18,152); +INSERT INTO product_slots VALUES(18,153); +INSERT INTO product_slots VALUES(18,154); +INSERT INTO product_slots VALUES(18,155); +INSERT INTO product_slots VALUES(18,156); +INSERT INTO product_slots VALUES(18,157); +INSERT INTO product_slots VALUES(18,158); +INSERT INTO product_slots VALUES(18,159); +INSERT INTO product_slots VALUES(18,160); +INSERT INTO product_slots VALUES(18,161); +INSERT INTO product_slots VALUES(18,162); +INSERT INTO product_slots VALUES(18,163); +INSERT INTO product_slots VALUES(18,164); +INSERT INTO product_slots VALUES(18,165); +INSERT INTO product_slots VALUES(18,166); +INSERT INTO product_slots VALUES(18,167); +INSERT INTO product_slots VALUES(18,168); +INSERT INTO product_slots VALUES(18,169); +INSERT INTO product_slots VALUES(18,170); +INSERT INTO product_slots VALUES(18,171); +INSERT INTO product_slots VALUES(18,172); +INSERT INTO product_slots VALUES(18,173); +INSERT INTO product_slots VALUES(18,174); +INSERT INTO product_slots VALUES(18,175); +INSERT INTO product_slots VALUES(18,176); +INSERT INTO product_slots VALUES(18,177); +INSERT INTO product_slots VALUES(18,178); +INSERT INTO product_slots VALUES(18,179); +INSERT INTO product_slots VALUES(18,180); +INSERT INTO product_slots VALUES(18,181); +INSERT INTO product_slots VALUES(18,182); +INSERT INTO product_slots VALUES(18,183); +INSERT INTO product_slots VALUES(18,184); +INSERT INTO product_slots VALUES(18,185); +INSERT INTO product_slots VALUES(18,186); +INSERT INTO product_slots VALUES(18,187); +INSERT INTO product_slots VALUES(18,188); +INSERT INTO product_slots VALUES(18,189); +INSERT INTO product_slots VALUES(18,190); +INSERT INTO product_slots VALUES(18,191); +INSERT INTO product_slots VALUES(18,192); +INSERT INTO product_slots VALUES(18,193); +INSERT INTO product_slots VALUES(18,194); +INSERT INTO product_slots VALUES(18,195); +INSERT INTO product_slots VALUES(18,196); +INSERT INTO product_slots VALUES(18,197); +INSERT INTO product_slots VALUES(18,198); +INSERT INTO product_slots VALUES(18,199); +INSERT INTO product_slots VALUES(18,200); +INSERT INTO product_slots VALUES(18,201); +INSERT INTO product_slots VALUES(18,202); +INSERT INTO product_slots VALUES(18,203); +INSERT INTO product_slots VALUES(18,204); +INSERT INTO product_slots VALUES(18,205); +INSERT INTO product_slots VALUES(18,206); +INSERT INTO product_slots VALUES(18,207); +INSERT INTO product_slots VALUES(18,208); +INSERT INTO product_slots VALUES(18,209); +INSERT INTO product_slots VALUES(18,210); +INSERT INTO product_slots VALUES(18,211); +INSERT INTO product_slots VALUES(18,212); +INSERT INTO product_slots VALUES(18,213); +INSERT INTO product_slots VALUES(18,214); +INSERT INTO product_slots VALUES(18,215); +INSERT INTO product_slots VALUES(18,216); +INSERT INTO product_slots VALUES(18,217); +INSERT INTO product_slots VALUES(18,218); +INSERT INTO product_slots VALUES(18,219); +INSERT INTO product_slots VALUES(18,220); +INSERT INTO product_slots VALUES(18,221); +INSERT INTO product_slots VALUES(18,222); +INSERT INTO product_slots VALUES(18,223); +INSERT INTO product_slots VALUES(18,224); +INSERT INTO product_slots VALUES(18,225); +INSERT INTO product_slots VALUES(18,226); +INSERT INTO product_slots VALUES(18,227); +INSERT INTO product_slots VALUES(18,228); +INSERT INTO product_slots VALUES(18,229); +INSERT INTO product_slots VALUES(18,230); +INSERT INTO product_slots VALUES(18,231); +INSERT INTO product_slots VALUES(18,232); +INSERT INTO product_slots VALUES(18,233); +INSERT INTO product_slots VALUES(18,234); +INSERT INTO product_slots VALUES(18,235); +INSERT INTO product_slots VALUES(18,236); +INSERT INTO product_slots VALUES(18,237); +INSERT INTO product_slots VALUES(18,238); +INSERT INTO product_slots VALUES(18,239); +INSERT INTO product_slots VALUES(18,240); +INSERT INTO product_slots VALUES(18,241); +INSERT INTO product_slots VALUES(18,242); +INSERT INTO product_slots VALUES(18,243); +INSERT INTO product_slots VALUES(18,244); +INSERT INTO product_slots VALUES(18,274); +INSERT INTO product_slots VALUES(18,275); +INSERT INTO product_slots VALUES(18,279); +INSERT INTO product_slots VALUES(18,280); +INSERT INTO product_slots VALUES(18,281); +INSERT INTO product_slots VALUES(18,282); +INSERT INTO product_slots VALUES(18,283); +INSERT INTO product_slots VALUES(18,284); +INSERT INTO product_slots VALUES(18,285); +INSERT INTO product_slots VALUES(18,286); +INSERT INTO product_slots VALUES(18,287); +INSERT INTO product_slots VALUES(19,10); +INSERT INTO product_slots VALUES(19,12); +INSERT INTO product_slots VALUES(19,18); +INSERT INTO product_slots VALUES(19,20); +INSERT INTO product_slots VALUES(19,21); +INSERT INTO product_slots VALUES(19,33); +INSERT INTO product_slots VALUES(19,35); +INSERT INTO product_slots VALUES(19,37); +INSERT INTO product_slots VALUES(19,38); +INSERT INTO product_slots VALUES(19,39); +INSERT INTO product_slots VALUES(19,40); +INSERT INTO product_slots VALUES(19,41); +INSERT INTO product_slots VALUES(19,43); +INSERT INTO product_slots VALUES(19,44); +INSERT INTO product_slots VALUES(19,45); +INSERT INTO product_slots VALUES(19,46); +INSERT INTO product_slots VALUES(19,47); +INSERT INTO product_slots VALUES(19,48); +INSERT INTO product_slots VALUES(19,49); +INSERT INTO product_slots VALUES(19,50); +INSERT INTO product_slots VALUES(19,51); +INSERT INTO product_slots VALUES(19,52); +INSERT INTO product_slots VALUES(19,53); +INSERT INTO product_slots VALUES(19,54); +INSERT INTO product_slots VALUES(19,55); +INSERT INTO product_slots VALUES(19,56); +INSERT INTO product_slots VALUES(19,57); +INSERT INTO product_slots VALUES(19,58); +INSERT INTO product_slots VALUES(19,59); +INSERT INTO product_slots VALUES(19,60); +INSERT INTO product_slots VALUES(19,61); +INSERT INTO product_slots VALUES(19,62); +INSERT INTO product_slots VALUES(19,63); +INSERT INTO product_slots VALUES(19,64); +INSERT INTO product_slots VALUES(19,65); +INSERT INTO product_slots VALUES(19,66); +INSERT INTO product_slots VALUES(19,67); +INSERT INTO product_slots VALUES(19,68); +INSERT INTO product_slots VALUES(19,69); +INSERT INTO product_slots VALUES(19,70); +INSERT INTO product_slots VALUES(19,71); +INSERT INTO product_slots VALUES(19,72); +INSERT INTO product_slots VALUES(19,73); +INSERT INTO product_slots VALUES(19,74); +INSERT INTO product_slots VALUES(19,75); +INSERT INTO product_slots VALUES(19,76); +INSERT INTO product_slots VALUES(19,77); +INSERT INTO product_slots VALUES(19,78); +INSERT INTO product_slots VALUES(19,79); +INSERT INTO product_slots VALUES(19,80); +INSERT INTO product_slots VALUES(19,81); +INSERT INTO product_slots VALUES(19,82); +INSERT INTO product_slots VALUES(19,83); +INSERT INTO product_slots VALUES(19,84); +INSERT INTO product_slots VALUES(19,85); +INSERT INTO product_slots VALUES(19,86); +INSERT INTO product_slots VALUES(19,87); +INSERT INTO product_slots VALUES(19,88); +INSERT INTO product_slots VALUES(19,89); +INSERT INTO product_slots VALUES(19,90); +INSERT INTO product_slots VALUES(19,91); +INSERT INTO product_slots VALUES(19,92); +INSERT INTO product_slots VALUES(19,93); +INSERT INTO product_slots VALUES(19,94); +INSERT INTO product_slots VALUES(19,95); +INSERT INTO product_slots VALUES(19,96); +INSERT INTO product_slots VALUES(19,97); +INSERT INTO product_slots VALUES(19,98); +INSERT INTO product_slots VALUES(19,99); +INSERT INTO product_slots VALUES(19,100); +INSERT INTO product_slots VALUES(19,101); +INSERT INTO product_slots VALUES(19,102); +INSERT INTO product_slots VALUES(19,103); +INSERT INTO product_slots VALUES(19,104); +INSERT INTO product_slots VALUES(19,105); +INSERT INTO product_slots VALUES(19,106); +INSERT INTO product_slots VALUES(19,107); +INSERT INTO product_slots VALUES(19,108); +INSERT INTO product_slots VALUES(19,109); +INSERT INTO product_slots VALUES(19,110); +INSERT INTO product_slots VALUES(19,111); +INSERT INTO product_slots VALUES(19,112); +INSERT INTO product_slots VALUES(19,113); +INSERT INTO product_slots VALUES(19,114); +INSERT INTO product_slots VALUES(19,115); +INSERT INTO product_slots VALUES(19,116); +INSERT INTO product_slots VALUES(19,117); +INSERT INTO product_slots VALUES(19,118); +INSERT INTO product_slots VALUES(19,119); +INSERT INTO product_slots VALUES(19,120); +INSERT INTO product_slots VALUES(19,121); +INSERT INTO product_slots VALUES(19,122); +INSERT INTO product_slots VALUES(19,123); +INSERT INTO product_slots VALUES(19,124); +INSERT INTO product_slots VALUES(19,125); +INSERT INTO product_slots VALUES(19,126); +INSERT INTO product_slots VALUES(19,127); +INSERT INTO product_slots VALUES(19,128); +INSERT INTO product_slots VALUES(19,129); +INSERT INTO product_slots VALUES(19,130); +INSERT INTO product_slots VALUES(19,131); +INSERT INTO product_slots VALUES(19,132); +INSERT INTO product_slots VALUES(19,133); +INSERT INTO product_slots VALUES(19,134); +INSERT INTO product_slots VALUES(19,135); +INSERT INTO product_slots VALUES(19,136); +INSERT INTO product_slots VALUES(19,137); +INSERT INTO product_slots VALUES(19,138); +INSERT INTO product_slots VALUES(19,139); +INSERT INTO product_slots VALUES(19,140); +INSERT INTO product_slots VALUES(19,141); +INSERT INTO product_slots VALUES(19,142); +INSERT INTO product_slots VALUES(19,143); +INSERT INTO product_slots VALUES(19,144); +INSERT INTO product_slots VALUES(19,145); +INSERT INTO product_slots VALUES(19,146); +INSERT INTO product_slots VALUES(19,147); +INSERT INTO product_slots VALUES(19,148); +INSERT INTO product_slots VALUES(19,149); +INSERT INTO product_slots VALUES(19,150); +INSERT INTO product_slots VALUES(19,151); +INSERT INTO product_slots VALUES(19,152); +INSERT INTO product_slots VALUES(19,153); +INSERT INTO product_slots VALUES(19,154); +INSERT INTO product_slots VALUES(19,155); +INSERT INTO product_slots VALUES(19,156); +INSERT INTO product_slots VALUES(19,157); +INSERT INTO product_slots VALUES(19,158); +INSERT INTO product_slots VALUES(19,159); +INSERT INTO product_slots VALUES(19,160); +INSERT INTO product_slots VALUES(19,161); +INSERT INTO product_slots VALUES(19,162); +INSERT INTO product_slots VALUES(19,163); +INSERT INTO product_slots VALUES(19,164); +INSERT INTO product_slots VALUES(19,165); +INSERT INTO product_slots VALUES(19,166); +INSERT INTO product_slots VALUES(19,167); +INSERT INTO product_slots VALUES(19,168); +INSERT INTO product_slots VALUES(19,169); +INSERT INTO product_slots VALUES(19,170); +INSERT INTO product_slots VALUES(19,171); +INSERT INTO product_slots VALUES(19,172); +INSERT INTO product_slots VALUES(19,173); +INSERT INTO product_slots VALUES(19,174); +INSERT INTO product_slots VALUES(19,175); +INSERT INTO product_slots VALUES(19,176); +INSERT INTO product_slots VALUES(19,177); +INSERT INTO product_slots VALUES(19,178); +INSERT INTO product_slots VALUES(19,179); +INSERT INTO product_slots VALUES(19,180); +INSERT INTO product_slots VALUES(19,181); +INSERT INTO product_slots VALUES(19,182); +INSERT INTO product_slots VALUES(19,183); +INSERT INTO product_slots VALUES(19,184); +INSERT INTO product_slots VALUES(19,185); +INSERT INTO product_slots VALUES(19,186); +INSERT INTO product_slots VALUES(19,187); +INSERT INTO product_slots VALUES(19,188); +INSERT INTO product_slots VALUES(19,189); +INSERT INTO product_slots VALUES(19,190); +INSERT INTO product_slots VALUES(19,191); +INSERT INTO product_slots VALUES(19,192); +INSERT INTO product_slots VALUES(19,193); +INSERT INTO product_slots VALUES(19,194); +INSERT INTO product_slots VALUES(19,195); +INSERT INTO product_slots VALUES(19,196); +INSERT INTO product_slots VALUES(19,197); +INSERT INTO product_slots VALUES(19,198); +INSERT INTO product_slots VALUES(19,199); +INSERT INTO product_slots VALUES(19,200); +INSERT INTO product_slots VALUES(19,201); +INSERT INTO product_slots VALUES(19,202); +INSERT INTO product_slots VALUES(19,203); +INSERT INTO product_slots VALUES(19,204); +INSERT INTO product_slots VALUES(19,205); +INSERT INTO product_slots VALUES(19,206); +INSERT INTO product_slots VALUES(19,207); +INSERT INTO product_slots VALUES(19,208); +INSERT INTO product_slots VALUES(19,209); +INSERT INTO product_slots VALUES(19,210); +INSERT INTO product_slots VALUES(19,211); +INSERT INTO product_slots VALUES(19,212); +INSERT INTO product_slots VALUES(19,213); +INSERT INTO product_slots VALUES(19,214); +INSERT INTO product_slots VALUES(19,215); +INSERT INTO product_slots VALUES(19,216); +INSERT INTO product_slots VALUES(19,217); +INSERT INTO product_slots VALUES(19,218); +INSERT INTO product_slots VALUES(19,219); +INSERT INTO product_slots VALUES(19,220); +INSERT INTO product_slots VALUES(19,221); +INSERT INTO product_slots VALUES(19,222); +INSERT INTO product_slots VALUES(19,223); +INSERT INTO product_slots VALUES(19,224); +INSERT INTO product_slots VALUES(19,225); +INSERT INTO product_slots VALUES(19,226); +INSERT INTO product_slots VALUES(19,227); +INSERT INTO product_slots VALUES(19,228); +INSERT INTO product_slots VALUES(19,229); +INSERT INTO product_slots VALUES(19,230); +INSERT INTO product_slots VALUES(19,231); +INSERT INTO product_slots VALUES(19,232); +INSERT INTO product_slots VALUES(19,233); +INSERT INTO product_slots VALUES(19,234); +INSERT INTO product_slots VALUES(19,235); +INSERT INTO product_slots VALUES(19,236); +INSERT INTO product_slots VALUES(19,237); +INSERT INTO product_slots VALUES(19,238); +INSERT INTO product_slots VALUES(19,239); +INSERT INTO product_slots VALUES(19,240); +INSERT INTO product_slots VALUES(19,241); +INSERT INTO product_slots VALUES(19,242); +INSERT INTO product_slots VALUES(19,243); +INSERT INTO product_slots VALUES(19,244); +INSERT INTO product_slots VALUES(19,274); +INSERT INTO product_slots VALUES(19,275); +INSERT INTO product_slots VALUES(19,279); +INSERT INTO product_slots VALUES(19,280); +INSERT INTO product_slots VALUES(19,281); +INSERT INTO product_slots VALUES(19,282); +INSERT INTO product_slots VALUES(19,283); +INSERT INTO product_slots VALUES(19,284); +INSERT INTO product_slots VALUES(19,285); +INSERT INTO product_slots VALUES(19,286); +INSERT INTO product_slots VALUES(19,287); +INSERT INTO product_slots VALUES(20,12); +INSERT INTO product_slots VALUES(20,18); +INSERT INTO product_slots VALUES(20,20); +INSERT INTO product_slots VALUES(20,21); +INSERT INTO product_slots VALUES(20,22); +INSERT INTO product_slots VALUES(20,33); +INSERT INTO product_slots VALUES(20,35); +INSERT INTO product_slots VALUES(20,37); +INSERT INTO product_slots VALUES(20,38); +INSERT INTO product_slots VALUES(20,40); +INSERT INTO product_slots VALUES(20,59); +INSERT INTO product_slots VALUES(20,81); +INSERT INTO product_slots VALUES(20,82); +INSERT INTO product_slots VALUES(20,83); +INSERT INTO product_slots VALUES(20,105); +INSERT INTO product_slots VALUES(20,106); +INSERT INTO product_slots VALUES(20,107); +INSERT INTO product_slots VALUES(20,108); +INSERT INTO product_slots VALUES(20,109); +INSERT INTO product_slots VALUES(20,110); +INSERT INTO product_slots VALUES(20,111); +INSERT INTO product_slots VALUES(20,112); +INSERT INTO product_slots VALUES(20,113); +INSERT INTO product_slots VALUES(20,114); +INSERT INTO product_slots VALUES(20,115); +INSERT INTO product_slots VALUES(20,120); +INSERT INTO product_slots VALUES(20,134); +INSERT INTO product_slots VALUES(20,135); +INSERT INTO product_slots VALUES(20,136); +INSERT INTO product_slots VALUES(20,187); +INSERT INTO product_slots VALUES(21,12); +INSERT INTO product_slots VALUES(21,18); +INSERT INTO product_slots VALUES(21,19); +INSERT INTO product_slots VALUES(21,20); +INSERT INTO product_slots VALUES(21,21); +INSERT INTO product_slots VALUES(21,22); +INSERT INTO product_slots VALUES(21,23); +INSERT INTO product_slots VALUES(21,31); +INSERT INTO product_slots VALUES(21,33); +INSERT INTO product_slots VALUES(21,35); +INSERT INTO product_slots VALUES(21,37); +INSERT INTO product_slots VALUES(21,38); +INSERT INTO product_slots VALUES(21,39); +INSERT INTO product_slots VALUES(21,40); +INSERT INTO product_slots VALUES(21,41); +INSERT INTO product_slots VALUES(21,43); +INSERT INTO product_slots VALUES(21,45); +INSERT INTO product_slots VALUES(21,46); +INSERT INTO product_slots VALUES(21,47); +INSERT INTO product_slots VALUES(21,48); +INSERT INTO product_slots VALUES(21,49); +INSERT INTO product_slots VALUES(21,50); +INSERT INTO product_slots VALUES(21,51); +INSERT INTO product_slots VALUES(21,52); +INSERT INTO product_slots VALUES(21,53); +INSERT INTO product_slots VALUES(21,54); +INSERT INTO product_slots VALUES(21,55); +INSERT INTO product_slots VALUES(21,56); +INSERT INTO product_slots VALUES(21,57); +INSERT INTO product_slots VALUES(21,58); +INSERT INTO product_slots VALUES(21,59); +INSERT INTO product_slots VALUES(21,60); +INSERT INTO product_slots VALUES(21,61); +INSERT INTO product_slots VALUES(21,62); +INSERT INTO product_slots VALUES(21,63); +INSERT INTO product_slots VALUES(21,64); +INSERT INTO product_slots VALUES(21,65); +INSERT INTO product_slots VALUES(21,66); +INSERT INTO product_slots VALUES(21,67); +INSERT INTO product_slots VALUES(21,68); +INSERT INTO product_slots VALUES(21,69); +INSERT INTO product_slots VALUES(21,70); +INSERT INTO product_slots VALUES(21,71); +INSERT INTO product_slots VALUES(21,72); +INSERT INTO product_slots VALUES(21,73); +INSERT INTO product_slots VALUES(21,74); +INSERT INTO product_slots VALUES(21,75); +INSERT INTO product_slots VALUES(21,76); +INSERT INTO product_slots VALUES(21,77); +INSERT INTO product_slots VALUES(21,78); +INSERT INTO product_slots VALUES(21,79); +INSERT INTO product_slots VALUES(21,80); +INSERT INTO product_slots VALUES(21,81); +INSERT INTO product_slots VALUES(21,82); +INSERT INTO product_slots VALUES(21,83); +INSERT INTO product_slots VALUES(21,84); +INSERT INTO product_slots VALUES(21,85); +INSERT INTO product_slots VALUES(21,86); +INSERT INTO product_slots VALUES(21,87); +INSERT INTO product_slots VALUES(21,88); +INSERT INTO product_slots VALUES(21,89); +INSERT INTO product_slots VALUES(21,90); +INSERT INTO product_slots VALUES(21,91); +INSERT INTO product_slots VALUES(21,92); +INSERT INTO product_slots VALUES(21,93); +INSERT INTO product_slots VALUES(21,94); +INSERT INTO product_slots VALUES(21,95); +INSERT INTO product_slots VALUES(21,96); +INSERT INTO product_slots VALUES(21,97); +INSERT INTO product_slots VALUES(21,98); +INSERT INTO product_slots VALUES(21,99); +INSERT INTO product_slots VALUES(21,100); +INSERT INTO product_slots VALUES(21,101); +INSERT INTO product_slots VALUES(21,102); +INSERT INTO product_slots VALUES(21,103); +INSERT INTO product_slots VALUES(21,104); +INSERT INTO product_slots VALUES(21,105); +INSERT INTO product_slots VALUES(21,106); +INSERT INTO product_slots VALUES(21,107); +INSERT INTO product_slots VALUES(21,108); +INSERT INTO product_slots VALUES(21,109); +INSERT INTO product_slots VALUES(21,110); +INSERT INTO product_slots VALUES(21,111); +INSERT INTO product_slots VALUES(21,112); +INSERT INTO product_slots VALUES(21,113); +INSERT INTO product_slots VALUES(21,114); +INSERT INTO product_slots VALUES(21,115); +INSERT INTO product_slots VALUES(21,116); +INSERT INTO product_slots VALUES(21,117); +INSERT INTO product_slots VALUES(21,118); +INSERT INTO product_slots VALUES(21,119); +INSERT INTO product_slots VALUES(21,120); +INSERT INTO product_slots VALUES(21,121); +INSERT INTO product_slots VALUES(21,122); +INSERT INTO product_slots VALUES(21,123); +INSERT INTO product_slots VALUES(21,124); +INSERT INTO product_slots VALUES(21,125); +INSERT INTO product_slots VALUES(21,126); +INSERT INTO product_slots VALUES(21,127); +INSERT INTO product_slots VALUES(21,128); +INSERT INTO product_slots VALUES(21,129); +INSERT INTO product_slots VALUES(21,130); +INSERT INTO product_slots VALUES(21,131); +INSERT INTO product_slots VALUES(21,132); +INSERT INTO product_slots VALUES(21,133); +INSERT INTO product_slots VALUES(21,134); +INSERT INTO product_slots VALUES(21,135); +INSERT INTO product_slots VALUES(21,136); +INSERT INTO product_slots VALUES(21,137); +INSERT INTO product_slots VALUES(21,138); +INSERT INTO product_slots VALUES(21,139); +INSERT INTO product_slots VALUES(21,140); +INSERT INTO product_slots VALUES(21,141); +INSERT INTO product_slots VALUES(21,142); +INSERT INTO product_slots VALUES(21,143); +INSERT INTO product_slots VALUES(21,144); +INSERT INTO product_slots VALUES(21,145); +INSERT INTO product_slots VALUES(21,146); +INSERT INTO product_slots VALUES(21,147); +INSERT INTO product_slots VALUES(21,148); +INSERT INTO product_slots VALUES(21,149); +INSERT INTO product_slots VALUES(21,150); +INSERT INTO product_slots VALUES(21,151); +INSERT INTO product_slots VALUES(21,152); +INSERT INTO product_slots VALUES(21,153); +INSERT INTO product_slots VALUES(21,154); +INSERT INTO product_slots VALUES(21,155); +INSERT INTO product_slots VALUES(21,156); +INSERT INTO product_slots VALUES(21,157); +INSERT INTO product_slots VALUES(21,158); +INSERT INTO product_slots VALUES(21,159); +INSERT INTO product_slots VALUES(21,160); +INSERT INTO product_slots VALUES(21,161); +INSERT INTO product_slots VALUES(21,162); +INSERT INTO product_slots VALUES(21,163); +INSERT INTO product_slots VALUES(21,164); +INSERT INTO product_slots VALUES(21,165); +INSERT INTO product_slots VALUES(21,166); +INSERT INTO product_slots VALUES(21,167); +INSERT INTO product_slots VALUES(21,168); +INSERT INTO product_slots VALUES(21,169); +INSERT INTO product_slots VALUES(21,170); +INSERT INTO product_slots VALUES(21,171); +INSERT INTO product_slots VALUES(21,172); +INSERT INTO product_slots VALUES(21,173); +INSERT INTO product_slots VALUES(21,174); +INSERT INTO product_slots VALUES(21,175); +INSERT INTO product_slots VALUES(21,176); +INSERT INTO product_slots VALUES(21,177); +INSERT INTO product_slots VALUES(21,178); +INSERT INTO product_slots VALUES(21,179); +INSERT INTO product_slots VALUES(21,180); +INSERT INTO product_slots VALUES(21,181); +INSERT INTO product_slots VALUES(21,182); +INSERT INTO product_slots VALUES(21,183); +INSERT INTO product_slots VALUES(21,184); +INSERT INTO product_slots VALUES(21,185); +INSERT INTO product_slots VALUES(21,186); +INSERT INTO product_slots VALUES(21,187); +INSERT INTO product_slots VALUES(21,188); +INSERT INTO product_slots VALUES(21,189); +INSERT INTO product_slots VALUES(21,190); +INSERT INTO product_slots VALUES(21,191); +INSERT INTO product_slots VALUES(21,192); +INSERT INTO product_slots VALUES(21,193); +INSERT INTO product_slots VALUES(21,194); +INSERT INTO product_slots VALUES(21,195); +INSERT INTO product_slots VALUES(21,196); +INSERT INTO product_slots VALUES(21,197); +INSERT INTO product_slots VALUES(21,198); +INSERT INTO product_slots VALUES(21,199); +INSERT INTO product_slots VALUES(21,200); +INSERT INTO product_slots VALUES(21,201); +INSERT INTO product_slots VALUES(21,202); +INSERT INTO product_slots VALUES(21,203); +INSERT INTO product_slots VALUES(21,204); +INSERT INTO product_slots VALUES(21,205); +INSERT INTO product_slots VALUES(21,206); +INSERT INTO product_slots VALUES(21,207); +INSERT INTO product_slots VALUES(21,208); +INSERT INTO product_slots VALUES(21,209); +INSERT INTO product_slots VALUES(21,210); +INSERT INTO product_slots VALUES(21,211); +INSERT INTO product_slots VALUES(21,212); +INSERT INTO product_slots VALUES(21,213); +INSERT INTO product_slots VALUES(21,214); +INSERT INTO product_slots VALUES(21,215); +INSERT INTO product_slots VALUES(21,216); +INSERT INTO product_slots VALUES(21,217); +INSERT INTO product_slots VALUES(21,218); +INSERT INTO product_slots VALUES(21,219); +INSERT INTO product_slots VALUES(21,220); +INSERT INTO product_slots VALUES(21,221); +INSERT INTO product_slots VALUES(21,222); +INSERT INTO product_slots VALUES(21,223); +INSERT INTO product_slots VALUES(21,224); +INSERT INTO product_slots VALUES(21,225); +INSERT INTO product_slots VALUES(21,226); +INSERT INTO product_slots VALUES(21,227); +INSERT INTO product_slots VALUES(21,228); +INSERT INTO product_slots VALUES(21,229); +INSERT INTO product_slots VALUES(21,230); +INSERT INTO product_slots VALUES(21,231); +INSERT INTO product_slots VALUES(21,232); +INSERT INTO product_slots VALUES(21,234); +INSERT INTO product_slots VALUES(21,235); +INSERT INTO product_slots VALUES(21,236); +INSERT INTO product_slots VALUES(21,237); +INSERT INTO product_slots VALUES(21,238); +INSERT INTO product_slots VALUES(21,239); +INSERT INTO product_slots VALUES(21,240); +INSERT INTO product_slots VALUES(21,241); +INSERT INTO product_slots VALUES(21,242); +INSERT INTO product_slots VALUES(21,243); +INSERT INTO product_slots VALUES(21,244); +INSERT INTO product_slots VALUES(21,274); +INSERT INTO product_slots VALUES(21,275); +INSERT INTO product_slots VALUES(21,279); +INSERT INTO product_slots VALUES(21,280); +INSERT INTO product_slots VALUES(21,281); +INSERT INTO product_slots VALUES(21,282); +INSERT INTO product_slots VALUES(22,12); +INSERT INTO product_slots VALUES(22,18); +INSERT INTO product_slots VALUES(22,20); +INSERT INTO product_slots VALUES(22,21); +INSERT INTO product_slots VALUES(22,22); +INSERT INTO product_slots VALUES(22,33); +INSERT INTO product_slots VALUES(22,35); +INSERT INTO product_slots VALUES(22,37); +INSERT INTO product_slots VALUES(22,38); +INSERT INTO product_slots VALUES(22,40); +INSERT INTO product_slots VALUES(22,203); +INSERT INTO product_slots VALUES(22,204); +INSERT INTO product_slots VALUES(22,205); +INSERT INTO product_slots VALUES(22,206); +INSERT INTO product_slots VALUES(22,207); +INSERT INTO product_slots VALUES(22,208); +INSERT INTO product_slots VALUES(22,209); +INSERT INTO product_slots VALUES(22,210); +INSERT INTO product_slots VALUES(22,211); +INSERT INTO product_slots VALUES(22,212); +INSERT INTO product_slots VALUES(22,213); +INSERT INTO product_slots VALUES(22,214); +INSERT INTO product_slots VALUES(22,215); +INSERT INTO product_slots VALUES(22,216); +INSERT INTO product_slots VALUES(22,217); +INSERT INTO product_slots VALUES(22,218); +INSERT INTO product_slots VALUES(22,219); +INSERT INTO product_slots VALUES(22,220); +INSERT INTO product_slots VALUES(22,221); +INSERT INTO product_slots VALUES(22,222); +INSERT INTO product_slots VALUES(22,223); +INSERT INTO product_slots VALUES(22,224); +INSERT INTO product_slots VALUES(22,225); +INSERT INTO product_slots VALUES(22,226); +INSERT INTO product_slots VALUES(22,227); +INSERT INTO product_slots VALUES(22,228); +INSERT INTO product_slots VALUES(22,229); +INSERT INTO product_slots VALUES(22,230); +INSERT INTO product_slots VALUES(22,231); +INSERT INTO product_slots VALUES(22,232); +INSERT INTO product_slots VALUES(22,233); +INSERT INTO product_slots VALUES(22,234); +INSERT INTO product_slots VALUES(22,235); +INSERT INTO product_slots VALUES(22,236); +INSERT INTO product_slots VALUES(22,237); +INSERT INTO product_slots VALUES(22,238); +INSERT INTO product_slots VALUES(22,239); +INSERT INTO product_slots VALUES(22,240); +INSERT INTO product_slots VALUES(22,241); +INSERT INTO product_slots VALUES(22,242); +INSERT INTO product_slots VALUES(22,243); +INSERT INTO product_slots VALUES(22,244); +INSERT INTO product_slots VALUES(22,274); +INSERT INTO product_slots VALUES(22,275); +INSERT INTO product_slots VALUES(22,279); +INSERT INTO product_slots VALUES(22,280); +INSERT INTO product_slots VALUES(22,281); +INSERT INTO product_slots VALUES(22,282); +INSERT INTO product_slots VALUES(22,283); +INSERT INTO product_slots VALUES(22,284); +INSERT INTO product_slots VALUES(22,285); +INSERT INTO product_slots VALUES(22,286); +INSERT INTO product_slots VALUES(22,287); +INSERT INTO product_slots VALUES(23,12); +INSERT INTO product_slots VALUES(23,18); +INSERT INTO product_slots VALUES(23,19); +INSERT INTO product_slots VALUES(23,20); +INSERT INTO product_slots VALUES(23,21); +INSERT INTO product_slots VALUES(23,22); +INSERT INTO product_slots VALUES(23,23); +INSERT INTO product_slots VALUES(23,31); +INSERT INTO product_slots VALUES(23,33); +INSERT INTO product_slots VALUES(23,35); +INSERT INTO product_slots VALUES(23,37); +INSERT INTO product_slots VALUES(23,38); +INSERT INTO product_slots VALUES(23,39); +INSERT INTO product_slots VALUES(23,40); +INSERT INTO product_slots VALUES(23,41); +INSERT INTO product_slots VALUES(23,43); +INSERT INTO product_slots VALUES(23,45); +INSERT INTO product_slots VALUES(23,46); +INSERT INTO product_slots VALUES(23,47); +INSERT INTO product_slots VALUES(23,48); +INSERT INTO product_slots VALUES(23,49); +INSERT INTO product_slots VALUES(23,50); +INSERT INTO product_slots VALUES(23,51); +INSERT INTO product_slots VALUES(23,52); +INSERT INTO product_slots VALUES(23,53); +INSERT INTO product_slots VALUES(23,54); +INSERT INTO product_slots VALUES(23,55); +INSERT INTO product_slots VALUES(23,56); +INSERT INTO product_slots VALUES(23,57); +INSERT INTO product_slots VALUES(23,58); +INSERT INTO product_slots VALUES(23,59); +INSERT INTO product_slots VALUES(23,60); +INSERT INTO product_slots VALUES(23,61); +INSERT INTO product_slots VALUES(23,62); +INSERT INTO product_slots VALUES(23,63); +INSERT INTO product_slots VALUES(23,64); +INSERT INTO product_slots VALUES(23,65); +INSERT INTO product_slots VALUES(23,66); +INSERT INTO product_slots VALUES(23,67); +INSERT INTO product_slots VALUES(23,68); +INSERT INTO product_slots VALUES(23,69); +INSERT INTO product_slots VALUES(23,70); +INSERT INTO product_slots VALUES(23,71); +INSERT INTO product_slots VALUES(23,72); +INSERT INTO product_slots VALUES(23,73); +INSERT INTO product_slots VALUES(23,74); +INSERT INTO product_slots VALUES(23,75); +INSERT INTO product_slots VALUES(23,76); +INSERT INTO product_slots VALUES(23,77); +INSERT INTO product_slots VALUES(23,78); +INSERT INTO product_slots VALUES(23,79); +INSERT INTO product_slots VALUES(23,80); +INSERT INTO product_slots VALUES(23,81); +INSERT INTO product_slots VALUES(23,82); +INSERT INTO product_slots VALUES(23,83); +INSERT INTO product_slots VALUES(23,84); +INSERT INTO product_slots VALUES(23,85); +INSERT INTO product_slots VALUES(23,86); +INSERT INTO product_slots VALUES(23,87); +INSERT INTO product_slots VALUES(23,88); +INSERT INTO product_slots VALUES(23,89); +INSERT INTO product_slots VALUES(23,90); +INSERT INTO product_slots VALUES(23,91); +INSERT INTO product_slots VALUES(23,92); +INSERT INTO product_slots VALUES(23,93); +INSERT INTO product_slots VALUES(23,94); +INSERT INTO product_slots VALUES(23,95); +INSERT INTO product_slots VALUES(23,96); +INSERT INTO product_slots VALUES(23,97); +INSERT INTO product_slots VALUES(23,98); +INSERT INTO product_slots VALUES(23,99); +INSERT INTO product_slots VALUES(23,100); +INSERT INTO product_slots VALUES(23,101); +INSERT INTO product_slots VALUES(23,102); +INSERT INTO product_slots VALUES(23,103); +INSERT INTO product_slots VALUES(23,104); +INSERT INTO product_slots VALUES(23,105); +INSERT INTO product_slots VALUES(23,106); +INSERT INTO product_slots VALUES(23,107); +INSERT INTO product_slots VALUES(23,108); +INSERT INTO product_slots VALUES(23,109); +INSERT INTO product_slots VALUES(23,110); +INSERT INTO product_slots VALUES(23,111); +INSERT INTO product_slots VALUES(23,112); +INSERT INTO product_slots VALUES(23,113); +INSERT INTO product_slots VALUES(23,114); +INSERT INTO product_slots VALUES(23,115); +INSERT INTO product_slots VALUES(23,116); +INSERT INTO product_slots VALUES(23,117); +INSERT INTO product_slots VALUES(23,118); +INSERT INTO product_slots VALUES(23,119); +INSERT INTO product_slots VALUES(23,120); +INSERT INTO product_slots VALUES(23,121); +INSERT INTO product_slots VALUES(23,122); +INSERT INTO product_slots VALUES(23,123); +INSERT INTO product_slots VALUES(23,124); +INSERT INTO product_slots VALUES(23,125); +INSERT INTO product_slots VALUES(23,126); +INSERT INTO product_slots VALUES(23,127); +INSERT INTO product_slots VALUES(23,128); +INSERT INTO product_slots VALUES(23,129); +INSERT INTO product_slots VALUES(23,130); +INSERT INTO product_slots VALUES(23,131); +INSERT INTO product_slots VALUES(23,132); +INSERT INTO product_slots VALUES(23,133); +INSERT INTO product_slots VALUES(23,134); +INSERT INTO product_slots VALUES(23,135); +INSERT INTO product_slots VALUES(23,136); +INSERT INTO product_slots VALUES(23,137); +INSERT INTO product_slots VALUES(23,138); +INSERT INTO product_slots VALUES(23,139); +INSERT INTO product_slots VALUES(23,140); +INSERT INTO product_slots VALUES(23,141); +INSERT INTO product_slots VALUES(23,142); +INSERT INTO product_slots VALUES(23,143); +INSERT INTO product_slots VALUES(23,144); +INSERT INTO product_slots VALUES(23,145); +INSERT INTO product_slots VALUES(23,146); +INSERT INTO product_slots VALUES(23,147); +INSERT INTO product_slots VALUES(23,148); +INSERT INTO product_slots VALUES(23,149); +INSERT INTO product_slots VALUES(23,150); +INSERT INTO product_slots VALUES(23,151); +INSERT INTO product_slots VALUES(23,152); +INSERT INTO product_slots VALUES(23,153); +INSERT INTO product_slots VALUES(23,154); +INSERT INTO product_slots VALUES(23,155); +INSERT INTO product_slots VALUES(23,156); +INSERT INTO product_slots VALUES(23,157); +INSERT INTO product_slots VALUES(23,158); +INSERT INTO product_slots VALUES(23,159); +INSERT INTO product_slots VALUES(23,160); +INSERT INTO product_slots VALUES(23,161); +INSERT INTO product_slots VALUES(23,162); +INSERT INTO product_slots VALUES(23,163); +INSERT INTO product_slots VALUES(23,164); +INSERT INTO product_slots VALUES(23,165); +INSERT INTO product_slots VALUES(23,166); +INSERT INTO product_slots VALUES(23,167); +INSERT INTO product_slots VALUES(23,168); +INSERT INTO product_slots VALUES(23,169); +INSERT INTO product_slots VALUES(23,170); +INSERT INTO product_slots VALUES(23,171); +INSERT INTO product_slots VALUES(23,172); +INSERT INTO product_slots VALUES(23,173); +INSERT INTO product_slots VALUES(23,174); +INSERT INTO product_slots VALUES(23,175); +INSERT INTO product_slots VALUES(23,176); +INSERT INTO product_slots VALUES(23,177); +INSERT INTO product_slots VALUES(23,178); +INSERT INTO product_slots VALUES(23,179); +INSERT INTO product_slots VALUES(23,180); +INSERT INTO product_slots VALUES(23,181); +INSERT INTO product_slots VALUES(23,182); +INSERT INTO product_slots VALUES(23,183); +INSERT INTO product_slots VALUES(23,184); +INSERT INTO product_slots VALUES(23,185); +INSERT INTO product_slots VALUES(23,186); +INSERT INTO product_slots VALUES(23,187); +INSERT INTO product_slots VALUES(23,188); +INSERT INTO product_slots VALUES(23,189); +INSERT INTO product_slots VALUES(23,190); +INSERT INTO product_slots VALUES(23,191); +INSERT INTO product_slots VALUES(23,192); +INSERT INTO product_slots VALUES(23,193); +INSERT INTO product_slots VALUES(23,194); +INSERT INTO product_slots VALUES(23,195); +INSERT INTO product_slots VALUES(23,196); +INSERT INTO product_slots VALUES(23,197); +INSERT INTO product_slots VALUES(23,198); +INSERT INTO product_slots VALUES(23,199); +INSERT INTO product_slots VALUES(23,200); +INSERT INTO product_slots VALUES(23,201); +INSERT INTO product_slots VALUES(23,202); +INSERT INTO product_slots VALUES(23,203); +INSERT INTO product_slots VALUES(23,204); +INSERT INTO product_slots VALUES(23,205); +INSERT INTO product_slots VALUES(23,206); +INSERT INTO product_slots VALUES(23,207); +INSERT INTO product_slots VALUES(23,208); +INSERT INTO product_slots VALUES(23,209); +INSERT INTO product_slots VALUES(23,210); +INSERT INTO product_slots VALUES(23,211); +INSERT INTO product_slots VALUES(23,212); +INSERT INTO product_slots VALUES(23,213); +INSERT INTO product_slots VALUES(23,214); +INSERT INTO product_slots VALUES(23,215); +INSERT INTO product_slots VALUES(23,216); +INSERT INTO product_slots VALUES(23,217); +INSERT INTO product_slots VALUES(23,218); +INSERT INTO product_slots VALUES(23,219); +INSERT INTO product_slots VALUES(23,220); +INSERT INTO product_slots VALUES(23,221); +INSERT INTO product_slots VALUES(23,222); +INSERT INTO product_slots VALUES(23,223); +INSERT INTO product_slots VALUES(23,224); +INSERT INTO product_slots VALUES(23,225); +INSERT INTO product_slots VALUES(23,226); +INSERT INTO product_slots VALUES(23,227); +INSERT INTO product_slots VALUES(23,228); +INSERT INTO product_slots VALUES(23,229); +INSERT INTO product_slots VALUES(23,230); +INSERT INTO product_slots VALUES(23,231); +INSERT INTO product_slots VALUES(23,232); +INSERT INTO product_slots VALUES(23,234); +INSERT INTO product_slots VALUES(23,235); +INSERT INTO product_slots VALUES(23,236); +INSERT INTO product_slots VALUES(23,237); +INSERT INTO product_slots VALUES(23,238); +INSERT INTO product_slots VALUES(23,239); +INSERT INTO product_slots VALUES(23,240); +INSERT INTO product_slots VALUES(23,241); +INSERT INTO product_slots VALUES(23,242); +INSERT INTO product_slots VALUES(23,243); +INSERT INTO product_slots VALUES(23,244); +INSERT INTO product_slots VALUES(23,274); +INSERT INTO product_slots VALUES(23,275); +INSERT INTO product_slots VALUES(23,279); +INSERT INTO product_slots VALUES(23,280); +INSERT INTO product_slots VALUES(23,281); +INSERT INTO product_slots VALUES(23,282); +INSERT INTO product_slots VALUES(24,12); +INSERT INTO product_slots VALUES(24,18); +INSERT INTO product_slots VALUES(24,19); +INSERT INTO product_slots VALUES(24,20); +INSERT INTO product_slots VALUES(24,21); +INSERT INTO product_slots VALUES(24,22); +INSERT INTO product_slots VALUES(24,23); +INSERT INTO product_slots VALUES(24,31); +INSERT INTO product_slots VALUES(24,33); +INSERT INTO product_slots VALUES(24,35); +INSERT INTO product_slots VALUES(24,37); +INSERT INTO product_slots VALUES(24,38); +INSERT INTO product_slots VALUES(24,39); +INSERT INTO product_slots VALUES(24,40); +INSERT INTO product_slots VALUES(24,41); +INSERT INTO product_slots VALUES(24,43); +INSERT INTO product_slots VALUES(24,45); +INSERT INTO product_slots VALUES(24,46); +INSERT INTO product_slots VALUES(24,47); +INSERT INTO product_slots VALUES(24,48); +INSERT INTO product_slots VALUES(24,49); +INSERT INTO product_slots VALUES(24,50); +INSERT INTO product_slots VALUES(24,51); +INSERT INTO product_slots VALUES(24,52); +INSERT INTO product_slots VALUES(24,53); +INSERT INTO product_slots VALUES(24,54); +INSERT INTO product_slots VALUES(24,55); +INSERT INTO product_slots VALUES(24,56); +INSERT INTO product_slots VALUES(24,57); +INSERT INTO product_slots VALUES(24,58); +INSERT INTO product_slots VALUES(24,59); +INSERT INTO product_slots VALUES(24,60); +INSERT INTO product_slots VALUES(24,61); +INSERT INTO product_slots VALUES(24,62); +INSERT INTO product_slots VALUES(24,63); +INSERT INTO product_slots VALUES(24,64); +INSERT INTO product_slots VALUES(24,65); +INSERT INTO product_slots VALUES(24,66); +INSERT INTO product_slots VALUES(24,67); +INSERT INTO product_slots VALUES(24,68); +INSERT INTO product_slots VALUES(24,69); +INSERT INTO product_slots VALUES(24,70); +INSERT INTO product_slots VALUES(24,71); +INSERT INTO product_slots VALUES(24,72); +INSERT INTO product_slots VALUES(24,73); +INSERT INTO product_slots VALUES(24,74); +INSERT INTO product_slots VALUES(24,75); +INSERT INTO product_slots VALUES(24,76); +INSERT INTO product_slots VALUES(24,77); +INSERT INTO product_slots VALUES(24,78); +INSERT INTO product_slots VALUES(24,79); +INSERT INTO product_slots VALUES(24,80); +INSERT INTO product_slots VALUES(24,81); +INSERT INTO product_slots VALUES(24,82); +INSERT INTO product_slots VALUES(24,83); +INSERT INTO product_slots VALUES(24,84); +INSERT INTO product_slots VALUES(24,85); +INSERT INTO product_slots VALUES(24,86); +INSERT INTO product_slots VALUES(24,87); +INSERT INTO product_slots VALUES(24,88); +INSERT INTO product_slots VALUES(24,89); +INSERT INTO product_slots VALUES(24,90); +INSERT INTO product_slots VALUES(24,91); +INSERT INTO product_slots VALUES(24,92); +INSERT INTO product_slots VALUES(24,93); +INSERT INTO product_slots VALUES(24,94); +INSERT INTO product_slots VALUES(24,95); +INSERT INTO product_slots VALUES(24,96); +INSERT INTO product_slots VALUES(24,97); +INSERT INTO product_slots VALUES(24,98); +INSERT INTO product_slots VALUES(24,99); +INSERT INTO product_slots VALUES(24,100); +INSERT INTO product_slots VALUES(24,101); +INSERT INTO product_slots VALUES(24,102); +INSERT INTO product_slots VALUES(24,103); +INSERT INTO product_slots VALUES(24,104); +INSERT INTO product_slots VALUES(24,105); +INSERT INTO product_slots VALUES(24,106); +INSERT INTO product_slots VALUES(24,107); +INSERT INTO product_slots VALUES(24,108); +INSERT INTO product_slots VALUES(24,109); +INSERT INTO product_slots VALUES(24,110); +INSERT INTO product_slots VALUES(24,111); +INSERT INTO product_slots VALUES(24,112); +INSERT INTO product_slots VALUES(24,113); +INSERT INTO product_slots VALUES(24,114); +INSERT INTO product_slots VALUES(24,115); +INSERT INTO product_slots VALUES(24,116); +INSERT INTO product_slots VALUES(24,117); +INSERT INTO product_slots VALUES(24,118); +INSERT INTO product_slots VALUES(24,119); +INSERT INTO product_slots VALUES(24,120); +INSERT INTO product_slots VALUES(24,121); +INSERT INTO product_slots VALUES(24,122); +INSERT INTO product_slots VALUES(24,123); +INSERT INTO product_slots VALUES(24,124); +INSERT INTO product_slots VALUES(24,125); +INSERT INTO product_slots VALUES(24,126); +INSERT INTO product_slots VALUES(24,127); +INSERT INTO product_slots VALUES(24,128); +INSERT INTO product_slots VALUES(24,129); +INSERT INTO product_slots VALUES(24,130); +INSERT INTO product_slots VALUES(24,131); +INSERT INTO product_slots VALUES(24,132); +INSERT INTO product_slots VALUES(24,133); +INSERT INTO product_slots VALUES(24,134); +INSERT INTO product_slots VALUES(24,135); +INSERT INTO product_slots VALUES(24,136); +INSERT INTO product_slots VALUES(24,137); +INSERT INTO product_slots VALUES(24,138); +INSERT INTO product_slots VALUES(24,139); +INSERT INTO product_slots VALUES(24,140); +INSERT INTO product_slots VALUES(24,141); +INSERT INTO product_slots VALUES(24,142); +INSERT INTO product_slots VALUES(24,143); +INSERT INTO product_slots VALUES(24,144); +INSERT INTO product_slots VALUES(24,145); +INSERT INTO product_slots VALUES(24,146); +INSERT INTO product_slots VALUES(24,147); +INSERT INTO product_slots VALUES(24,148); +INSERT INTO product_slots VALUES(24,149); +INSERT INTO product_slots VALUES(24,150); +INSERT INTO product_slots VALUES(24,151); +INSERT INTO product_slots VALUES(24,152); +INSERT INTO product_slots VALUES(24,153); +INSERT INTO product_slots VALUES(24,154); +INSERT INTO product_slots VALUES(24,155); +INSERT INTO product_slots VALUES(24,156); +INSERT INTO product_slots VALUES(24,157); +INSERT INTO product_slots VALUES(24,158); +INSERT INTO product_slots VALUES(24,159); +INSERT INTO product_slots VALUES(24,160); +INSERT INTO product_slots VALUES(24,161); +INSERT INTO product_slots VALUES(24,162); +INSERT INTO product_slots VALUES(24,163); +INSERT INTO product_slots VALUES(24,164); +INSERT INTO product_slots VALUES(24,165); +INSERT INTO product_slots VALUES(24,166); +INSERT INTO product_slots VALUES(24,167); +INSERT INTO product_slots VALUES(24,168); +INSERT INTO product_slots VALUES(24,169); +INSERT INTO product_slots VALUES(24,170); +INSERT INTO product_slots VALUES(24,171); +INSERT INTO product_slots VALUES(24,172); +INSERT INTO product_slots VALUES(24,173); +INSERT INTO product_slots VALUES(24,174); +INSERT INTO product_slots VALUES(24,175); +INSERT INTO product_slots VALUES(24,176); +INSERT INTO product_slots VALUES(24,177); +INSERT INTO product_slots VALUES(24,178); +INSERT INTO product_slots VALUES(24,179); +INSERT INTO product_slots VALUES(24,180); +INSERT INTO product_slots VALUES(24,181); +INSERT INTO product_slots VALUES(24,182); +INSERT INTO product_slots VALUES(24,183); +INSERT INTO product_slots VALUES(24,184); +INSERT INTO product_slots VALUES(24,185); +INSERT INTO product_slots VALUES(24,186); +INSERT INTO product_slots VALUES(24,187); +INSERT INTO product_slots VALUES(24,188); +INSERT INTO product_slots VALUES(24,189); +INSERT INTO product_slots VALUES(24,190); +INSERT INTO product_slots VALUES(24,191); +INSERT INTO product_slots VALUES(24,192); +INSERT INTO product_slots VALUES(24,193); +INSERT INTO product_slots VALUES(24,194); +INSERT INTO product_slots VALUES(24,195); +INSERT INTO product_slots VALUES(24,196); +INSERT INTO product_slots VALUES(24,197); +INSERT INTO product_slots VALUES(24,198); +INSERT INTO product_slots VALUES(24,199); +INSERT INTO product_slots VALUES(24,200); +INSERT INTO product_slots VALUES(24,201); +INSERT INTO product_slots VALUES(24,202); +INSERT INTO product_slots VALUES(24,203); +INSERT INTO product_slots VALUES(24,204); +INSERT INTO product_slots VALUES(24,205); +INSERT INTO product_slots VALUES(24,206); +INSERT INTO product_slots VALUES(24,207); +INSERT INTO product_slots VALUES(24,208); +INSERT INTO product_slots VALUES(24,209); +INSERT INTO product_slots VALUES(24,210); +INSERT INTO product_slots VALUES(24,211); +INSERT INTO product_slots VALUES(24,212); +INSERT INTO product_slots VALUES(24,213); +INSERT INTO product_slots VALUES(24,214); +INSERT INTO product_slots VALUES(24,215); +INSERT INTO product_slots VALUES(24,216); +INSERT INTO product_slots VALUES(24,217); +INSERT INTO product_slots VALUES(24,218); +INSERT INTO product_slots VALUES(24,219); +INSERT INTO product_slots VALUES(24,220); +INSERT INTO product_slots VALUES(24,221); +INSERT INTO product_slots VALUES(24,222); +INSERT INTO product_slots VALUES(24,223); +INSERT INTO product_slots VALUES(24,224); +INSERT INTO product_slots VALUES(24,225); +INSERT INTO product_slots VALUES(24,226); +INSERT INTO product_slots VALUES(24,227); +INSERT INTO product_slots VALUES(24,228); +INSERT INTO product_slots VALUES(24,229); +INSERT INTO product_slots VALUES(24,230); +INSERT INTO product_slots VALUES(24,231); +INSERT INTO product_slots VALUES(24,232); +INSERT INTO product_slots VALUES(24,234); +INSERT INTO product_slots VALUES(24,235); +INSERT INTO product_slots VALUES(24,236); +INSERT INTO product_slots VALUES(24,237); +INSERT INTO product_slots VALUES(24,238); +INSERT INTO product_slots VALUES(24,239); +INSERT INTO product_slots VALUES(24,240); +INSERT INTO product_slots VALUES(24,241); +INSERT INTO product_slots VALUES(24,242); +INSERT INTO product_slots VALUES(24,243); +INSERT INTO product_slots VALUES(24,244); +INSERT INTO product_slots VALUES(24,274); +INSERT INTO product_slots VALUES(24,275); +INSERT INTO product_slots VALUES(24,279); +INSERT INTO product_slots VALUES(24,280); +INSERT INTO product_slots VALUES(24,281); +INSERT INTO product_slots VALUES(24,282); +INSERT INTO product_slots VALUES(25,10); +INSERT INTO product_slots VALUES(25,11); +INSERT INTO product_slots VALUES(25,12); +INSERT INTO product_slots VALUES(25,17); +INSERT INTO product_slots VALUES(25,18); +INSERT INTO product_slots VALUES(25,20); +INSERT INTO product_slots VALUES(25,21); +INSERT INTO product_slots VALUES(25,22); +INSERT INTO product_slots VALUES(25,33); +INSERT INTO product_slots VALUES(25,35); +INSERT INTO product_slots VALUES(25,37); +INSERT INTO product_slots VALUES(25,38); +INSERT INTO product_slots VALUES(25,39); +INSERT INTO product_slots VALUES(25,40); +INSERT INTO product_slots VALUES(25,43); +INSERT INTO product_slots VALUES(25,45); +INSERT INTO product_slots VALUES(25,46); +INSERT INTO product_slots VALUES(25,48); +INSERT INTO product_slots VALUES(25,49); +INSERT INTO product_slots VALUES(25,51); +INSERT INTO product_slots VALUES(25,52); +INSERT INTO product_slots VALUES(25,53); +INSERT INTO product_slots VALUES(25,54); +INSERT INTO product_slots VALUES(25,57); +INSERT INTO product_slots VALUES(25,58); +INSERT INTO product_slots VALUES(25,59); +INSERT INTO product_slots VALUES(25,60); +INSERT INTO product_slots VALUES(25,61); +INSERT INTO product_slots VALUES(25,62); +INSERT INTO product_slots VALUES(25,63); +INSERT INTO product_slots VALUES(25,64); +INSERT INTO product_slots VALUES(25,65); +INSERT INTO product_slots VALUES(25,66); +INSERT INTO product_slots VALUES(25,67); +INSERT INTO product_slots VALUES(25,68); +INSERT INTO product_slots VALUES(25,69); +INSERT INTO product_slots VALUES(25,70); +INSERT INTO product_slots VALUES(25,71); +INSERT INTO product_slots VALUES(25,72); +INSERT INTO product_slots VALUES(25,73); +INSERT INTO product_slots VALUES(25,74); +INSERT INTO product_slots VALUES(25,75); +INSERT INTO product_slots VALUES(25,76); +INSERT INTO product_slots VALUES(25,77); +INSERT INTO product_slots VALUES(25,78); +INSERT INTO product_slots VALUES(25,79); +INSERT INTO product_slots VALUES(25,80); +INSERT INTO product_slots VALUES(25,81); +INSERT INTO product_slots VALUES(25,82); +INSERT INTO product_slots VALUES(25,83); +INSERT INTO product_slots VALUES(25,84); +INSERT INTO product_slots VALUES(25,85); +INSERT INTO product_slots VALUES(25,86); +INSERT INTO product_slots VALUES(25,87); +INSERT INTO product_slots VALUES(25,88); +INSERT INTO product_slots VALUES(25,89); +INSERT INTO product_slots VALUES(25,90); +INSERT INTO product_slots VALUES(25,91); +INSERT INTO product_slots VALUES(25,92); +INSERT INTO product_slots VALUES(25,93); +INSERT INTO product_slots VALUES(25,94); +INSERT INTO product_slots VALUES(25,95); +INSERT INTO product_slots VALUES(25,96); +INSERT INTO product_slots VALUES(25,97); +INSERT INTO product_slots VALUES(25,98); +INSERT INTO product_slots VALUES(25,99); +INSERT INTO product_slots VALUES(25,100); +INSERT INTO product_slots VALUES(25,102); +INSERT INTO product_slots VALUES(25,103); +INSERT INTO product_slots VALUES(25,104); +INSERT INTO product_slots VALUES(25,105); +INSERT INTO product_slots VALUES(25,106); +INSERT INTO product_slots VALUES(25,107); +INSERT INTO product_slots VALUES(25,108); +INSERT INTO product_slots VALUES(25,109); +INSERT INTO product_slots VALUES(25,110); +INSERT INTO product_slots VALUES(25,111); +INSERT INTO product_slots VALUES(25,112); +INSERT INTO product_slots VALUES(25,113); +INSERT INTO product_slots VALUES(25,114); +INSERT INTO product_slots VALUES(25,115); +INSERT INTO product_slots VALUES(25,117); +INSERT INTO product_slots VALUES(25,118); +INSERT INTO product_slots VALUES(25,119); +INSERT INTO product_slots VALUES(25,120); +INSERT INTO product_slots VALUES(25,121); +INSERT INTO product_slots VALUES(25,122); +INSERT INTO product_slots VALUES(25,123); +INSERT INTO product_slots VALUES(25,124); +INSERT INTO product_slots VALUES(25,125); +INSERT INTO product_slots VALUES(25,126); +INSERT INTO product_slots VALUES(25,127); +INSERT INTO product_slots VALUES(25,128); +INSERT INTO product_slots VALUES(25,129); +INSERT INTO product_slots VALUES(25,130); +INSERT INTO product_slots VALUES(25,131); +INSERT INTO product_slots VALUES(25,132); +INSERT INTO product_slots VALUES(25,133); +INSERT INTO product_slots VALUES(25,134); +INSERT INTO product_slots VALUES(25,135); +INSERT INTO product_slots VALUES(25,136); +INSERT INTO product_slots VALUES(25,138); +INSERT INTO product_slots VALUES(25,139); +INSERT INTO product_slots VALUES(25,140); +INSERT INTO product_slots VALUES(25,141); +INSERT INTO product_slots VALUES(25,142); +INSERT INTO product_slots VALUES(25,143); +INSERT INTO product_slots VALUES(25,145); +INSERT INTO product_slots VALUES(25,146); +INSERT INTO product_slots VALUES(25,147); +INSERT INTO product_slots VALUES(25,148); +INSERT INTO product_slots VALUES(25,149); +INSERT INTO product_slots VALUES(25,150); +INSERT INTO product_slots VALUES(25,151); +INSERT INTO product_slots VALUES(25,152); +INSERT INTO product_slots VALUES(25,153); +INSERT INTO product_slots VALUES(25,154); +INSERT INTO product_slots VALUES(25,155); +INSERT INTO product_slots VALUES(25,156); +INSERT INTO product_slots VALUES(25,157); +INSERT INTO product_slots VALUES(25,158); +INSERT INTO product_slots VALUES(25,159); +INSERT INTO product_slots VALUES(25,160); +INSERT INTO product_slots VALUES(25,161); +INSERT INTO product_slots VALUES(25,162); +INSERT INTO product_slots VALUES(25,163); +INSERT INTO product_slots VALUES(25,164); +INSERT INTO product_slots VALUES(25,165); +INSERT INTO product_slots VALUES(25,166); +INSERT INTO product_slots VALUES(25,167); +INSERT INTO product_slots VALUES(25,168); +INSERT INTO product_slots VALUES(25,169); +INSERT INTO product_slots VALUES(25,170); +INSERT INTO product_slots VALUES(25,171); +INSERT INTO product_slots VALUES(25,172); +INSERT INTO product_slots VALUES(25,173); +INSERT INTO product_slots VALUES(25,174); +INSERT INTO product_slots VALUES(25,175); +INSERT INTO product_slots VALUES(25,176); +INSERT INTO product_slots VALUES(25,177); +INSERT INTO product_slots VALUES(25,178); +INSERT INTO product_slots VALUES(25,179); +INSERT INTO product_slots VALUES(25,180); +INSERT INTO product_slots VALUES(25,181); +INSERT INTO product_slots VALUES(25,182); +INSERT INTO product_slots VALUES(25,183); +INSERT INTO product_slots VALUES(25,184); +INSERT INTO product_slots VALUES(25,185); +INSERT INTO product_slots VALUES(25,186); +INSERT INTO product_slots VALUES(25,187); +INSERT INTO product_slots VALUES(25,188); +INSERT INTO product_slots VALUES(25,189); +INSERT INTO product_slots VALUES(25,190); +INSERT INTO product_slots VALUES(25,191); +INSERT INTO product_slots VALUES(25,192); +INSERT INTO product_slots VALUES(25,193); +INSERT INTO product_slots VALUES(25,194); +INSERT INTO product_slots VALUES(25,195); +INSERT INTO product_slots VALUES(25,196); +INSERT INTO product_slots VALUES(25,197); +INSERT INTO product_slots VALUES(25,198); +INSERT INTO product_slots VALUES(25,199); +INSERT INTO product_slots VALUES(25,200); +INSERT INTO product_slots VALUES(25,201); +INSERT INTO product_slots VALUES(25,202); +INSERT INTO product_slots VALUES(25,203); +INSERT INTO product_slots VALUES(25,204); +INSERT INTO product_slots VALUES(25,205); +INSERT INTO product_slots VALUES(25,206); +INSERT INTO product_slots VALUES(25,207); +INSERT INTO product_slots VALUES(25,208); +INSERT INTO product_slots VALUES(25,209); +INSERT INTO product_slots VALUES(25,210); +INSERT INTO product_slots VALUES(25,211); +INSERT INTO product_slots VALUES(25,212); +INSERT INTO product_slots VALUES(25,213); +INSERT INTO product_slots VALUES(25,214); +INSERT INTO product_slots VALUES(25,215); +INSERT INTO product_slots VALUES(25,216); +INSERT INTO product_slots VALUES(25,217); +INSERT INTO product_slots VALUES(25,218); +INSERT INTO product_slots VALUES(25,219); +INSERT INTO product_slots VALUES(25,220); +INSERT INTO product_slots VALUES(25,221); +INSERT INTO product_slots VALUES(25,222); +INSERT INTO product_slots VALUES(25,223); +INSERT INTO product_slots VALUES(25,224); +INSERT INTO product_slots VALUES(25,225); +INSERT INTO product_slots VALUES(25,226); +INSERT INTO product_slots VALUES(25,227); +INSERT INTO product_slots VALUES(25,228); +INSERT INTO product_slots VALUES(25,229); +INSERT INTO product_slots VALUES(25,230); +INSERT INTO product_slots VALUES(25,231); +INSERT INTO product_slots VALUES(25,232); +INSERT INTO product_slots VALUES(25,233); +INSERT INTO product_slots VALUES(25,234); +INSERT INTO product_slots VALUES(25,235); +INSERT INTO product_slots VALUES(25,236); +INSERT INTO product_slots VALUES(25,237); +INSERT INTO product_slots VALUES(25,238); +INSERT INTO product_slots VALUES(25,239); +INSERT INTO product_slots VALUES(25,240); +INSERT INTO product_slots VALUES(25,241); +INSERT INTO product_slots VALUES(25,242); +INSERT INTO product_slots VALUES(25,243); +INSERT INTO product_slots VALUES(25,244); +INSERT INTO product_slots VALUES(25,274); +INSERT INTO product_slots VALUES(25,275); +INSERT INTO product_slots VALUES(25,279); +INSERT INTO product_slots VALUES(25,280); +INSERT INTO product_slots VALUES(25,281); +INSERT INTO product_slots VALUES(25,282); +INSERT INTO product_slots VALUES(25,283); +INSERT INTO product_slots VALUES(25,284); +INSERT INTO product_slots VALUES(25,285); +INSERT INTO product_slots VALUES(25,286); +INSERT INTO product_slots VALUES(25,287); +INSERT INTO product_slots VALUES(26,17); +INSERT INTO product_slots VALUES(26,18); +INSERT INTO product_slots VALUES(26,20); +INSERT INTO product_slots VALUES(26,21); +INSERT INTO product_slots VALUES(26,22); +INSERT INTO product_slots VALUES(26,33); +INSERT INTO product_slots VALUES(26,35); +INSERT INTO product_slots VALUES(26,37); +INSERT INTO product_slots VALUES(26,38); +INSERT INTO product_slots VALUES(26,40); +INSERT INTO product_slots VALUES(26,64); +INSERT INTO product_slots VALUES(26,65); +INSERT INTO product_slots VALUES(26,66); +INSERT INTO product_slots VALUES(26,67); +INSERT INTO product_slots VALUES(26,68); +INSERT INTO product_slots VALUES(26,69); +INSERT INTO product_slots VALUES(26,70); +INSERT INTO product_slots VALUES(26,71); +INSERT INTO product_slots VALUES(26,72); +INSERT INTO product_slots VALUES(26,73); +INSERT INTO product_slots VALUES(26,74); +INSERT INTO product_slots VALUES(26,75); +INSERT INTO product_slots VALUES(26,76); +INSERT INTO product_slots VALUES(26,77); +INSERT INTO product_slots VALUES(26,78); +INSERT INTO product_slots VALUES(26,79); +INSERT INTO product_slots VALUES(26,80); +INSERT INTO product_slots VALUES(26,81); +INSERT INTO product_slots VALUES(26,82); +INSERT INTO product_slots VALUES(26,83); +INSERT INTO product_slots VALUES(26,84); +INSERT INTO product_slots VALUES(26,85); +INSERT INTO product_slots VALUES(26,86); +INSERT INTO product_slots VALUES(26,87); +INSERT INTO product_slots VALUES(26,88); +INSERT INTO product_slots VALUES(26,89); +INSERT INTO product_slots VALUES(26,90); +INSERT INTO product_slots VALUES(26,91); +INSERT INTO product_slots VALUES(26,92); +INSERT INTO product_slots VALUES(26,93); +INSERT INTO product_slots VALUES(26,94); +INSERT INTO product_slots VALUES(26,95); +INSERT INTO product_slots VALUES(26,96); +INSERT INTO product_slots VALUES(26,97); +INSERT INTO product_slots VALUES(26,98); +INSERT INTO product_slots VALUES(26,99); +INSERT INTO product_slots VALUES(26,100); +INSERT INTO product_slots VALUES(26,102); +INSERT INTO product_slots VALUES(26,103); +INSERT INTO product_slots VALUES(26,104); +INSERT INTO product_slots VALUES(26,105); +INSERT INTO product_slots VALUES(26,106); +INSERT INTO product_slots VALUES(26,107); +INSERT INTO product_slots VALUES(26,108); +INSERT INTO product_slots VALUES(26,109); +INSERT INTO product_slots VALUES(26,110); +INSERT INTO product_slots VALUES(26,111); +INSERT INTO product_slots VALUES(26,112); +INSERT INTO product_slots VALUES(26,113); +INSERT INTO product_slots VALUES(26,114); +INSERT INTO product_slots VALUES(26,115); +INSERT INTO product_slots VALUES(26,117); +INSERT INTO product_slots VALUES(26,118); +INSERT INTO product_slots VALUES(26,119); +INSERT INTO product_slots VALUES(26,120); +INSERT INTO product_slots VALUES(26,121); +INSERT INTO product_slots VALUES(26,122); +INSERT INTO product_slots VALUES(26,123); +INSERT INTO product_slots VALUES(26,124); +INSERT INTO product_slots VALUES(26,125); +INSERT INTO product_slots VALUES(26,126); +INSERT INTO product_slots VALUES(26,127); +INSERT INTO product_slots VALUES(26,128); +INSERT INTO product_slots VALUES(26,129); +INSERT INTO product_slots VALUES(26,130); +INSERT INTO product_slots VALUES(26,131); +INSERT INTO product_slots VALUES(26,132); +INSERT INTO product_slots VALUES(26,133); +INSERT INTO product_slots VALUES(26,134); +INSERT INTO product_slots VALUES(26,135); +INSERT INTO product_slots VALUES(26,136); +INSERT INTO product_slots VALUES(26,138); +INSERT INTO product_slots VALUES(26,139); +INSERT INTO product_slots VALUES(26,140); +INSERT INTO product_slots VALUES(26,141); +INSERT INTO product_slots VALUES(26,142); +INSERT INTO product_slots VALUES(26,143); +INSERT INTO product_slots VALUES(26,145); +INSERT INTO product_slots VALUES(26,146); +INSERT INTO product_slots VALUES(26,147); +INSERT INTO product_slots VALUES(26,148); +INSERT INTO product_slots VALUES(26,149); +INSERT INTO product_slots VALUES(26,150); +INSERT INTO product_slots VALUES(26,151); +INSERT INTO product_slots VALUES(26,152); +INSERT INTO product_slots VALUES(26,153); +INSERT INTO product_slots VALUES(26,154); +INSERT INTO product_slots VALUES(26,155); +INSERT INTO product_slots VALUES(26,156); +INSERT INTO product_slots VALUES(26,157); +INSERT INTO product_slots VALUES(26,158); +INSERT INTO product_slots VALUES(26,159); +INSERT INTO product_slots VALUES(26,160); +INSERT INTO product_slots VALUES(26,161); +INSERT INTO product_slots VALUES(26,162); +INSERT INTO product_slots VALUES(26,163); +INSERT INTO product_slots VALUES(26,164); +INSERT INTO product_slots VALUES(26,165); +INSERT INTO product_slots VALUES(26,166); +INSERT INTO product_slots VALUES(26,167); +INSERT INTO product_slots VALUES(26,168); +INSERT INTO product_slots VALUES(26,169); +INSERT INTO product_slots VALUES(26,170); +INSERT INTO product_slots VALUES(26,171); +INSERT INTO product_slots VALUES(26,172); +INSERT INTO product_slots VALUES(26,173); +INSERT INTO product_slots VALUES(26,174); +INSERT INTO product_slots VALUES(26,175); +INSERT INTO product_slots VALUES(26,176); +INSERT INTO product_slots VALUES(26,177); +INSERT INTO product_slots VALUES(26,178); +INSERT INTO product_slots VALUES(26,179); +INSERT INTO product_slots VALUES(26,180); +INSERT INTO product_slots VALUES(26,181); +INSERT INTO product_slots VALUES(26,182); +INSERT INTO product_slots VALUES(26,183); +INSERT INTO product_slots VALUES(26,184); +INSERT INTO product_slots VALUES(26,185); +INSERT INTO product_slots VALUES(26,186); +INSERT INTO product_slots VALUES(26,187); +INSERT INTO product_slots VALUES(26,188); +INSERT INTO product_slots VALUES(26,189); +INSERT INTO product_slots VALUES(26,190); +INSERT INTO product_slots VALUES(26,191); +INSERT INTO product_slots VALUES(26,192); +INSERT INTO product_slots VALUES(26,193); +INSERT INTO product_slots VALUES(26,194); +INSERT INTO product_slots VALUES(26,195); +INSERT INTO product_slots VALUES(26,196); +INSERT INTO product_slots VALUES(26,197); +INSERT INTO product_slots VALUES(26,198); +INSERT INTO product_slots VALUES(26,199); +INSERT INTO product_slots VALUES(26,200); +INSERT INTO product_slots VALUES(26,201); +INSERT INTO product_slots VALUES(26,202); +INSERT INTO product_slots VALUES(26,203); +INSERT INTO product_slots VALUES(26,204); +INSERT INTO product_slots VALUES(26,205); +INSERT INTO product_slots VALUES(26,206); +INSERT INTO product_slots VALUES(26,207); +INSERT INTO product_slots VALUES(26,208); +INSERT INTO product_slots VALUES(26,209); +INSERT INTO product_slots VALUES(26,210); +INSERT INTO product_slots VALUES(26,211); +INSERT INTO product_slots VALUES(26,212); +INSERT INTO product_slots VALUES(26,213); +INSERT INTO product_slots VALUES(26,214); +INSERT INTO product_slots VALUES(26,215); +INSERT INTO product_slots VALUES(26,216); +INSERT INTO product_slots VALUES(26,217); +INSERT INTO product_slots VALUES(26,218); +INSERT INTO product_slots VALUES(26,219); +INSERT INTO product_slots VALUES(26,220); +INSERT INTO product_slots VALUES(26,221); +INSERT INTO product_slots VALUES(26,222); +INSERT INTO product_slots VALUES(26,223); +INSERT INTO product_slots VALUES(26,224); +INSERT INTO product_slots VALUES(26,225); +INSERT INTO product_slots VALUES(26,226); +INSERT INTO product_slots VALUES(26,227); +INSERT INTO product_slots VALUES(26,228); +INSERT INTO product_slots VALUES(26,229); +INSERT INTO product_slots VALUES(26,230); +INSERT INTO product_slots VALUES(26,231); +INSERT INTO product_slots VALUES(26,232); +INSERT INTO product_slots VALUES(26,233); +INSERT INTO product_slots VALUES(26,234); +INSERT INTO product_slots VALUES(26,235); +INSERT INTO product_slots VALUES(26,236); +INSERT INTO product_slots VALUES(26,237); +INSERT INTO product_slots VALUES(26,238); +INSERT INTO product_slots VALUES(26,239); +INSERT INTO product_slots VALUES(26,240); +INSERT INTO product_slots VALUES(26,241); +INSERT INTO product_slots VALUES(26,242); +INSERT INTO product_slots VALUES(26,243); +INSERT INTO product_slots VALUES(26,244); +INSERT INTO product_slots VALUES(26,274); +INSERT INTO product_slots VALUES(26,275); +INSERT INTO product_slots VALUES(26,279); +INSERT INTO product_slots VALUES(26,280); +INSERT INTO product_slots VALUES(26,281); +INSERT INTO product_slots VALUES(26,282); +INSERT INTO product_slots VALUES(26,283); +INSERT INTO product_slots VALUES(26,284); +INSERT INTO product_slots VALUES(26,285); +INSERT INTO product_slots VALUES(26,286); +INSERT INTO product_slots VALUES(26,287); +INSERT INTO product_slots VALUES(27,18); +INSERT INTO product_slots VALUES(27,20); +INSERT INTO product_slots VALUES(27,21); +INSERT INTO product_slots VALUES(27,33); +INSERT INTO product_slots VALUES(27,35); +INSERT INTO product_slots VALUES(27,37); +INSERT INTO product_slots VALUES(27,38); +INSERT INTO product_slots VALUES(27,39); +INSERT INTO product_slots VALUES(27,40); +INSERT INTO product_slots VALUES(27,41); +INSERT INTO product_slots VALUES(27,43); +INSERT INTO product_slots VALUES(27,44); +INSERT INTO product_slots VALUES(27,45); +INSERT INTO product_slots VALUES(27,46); +INSERT INTO product_slots VALUES(27,47); +INSERT INTO product_slots VALUES(27,48); +INSERT INTO product_slots VALUES(27,49); +INSERT INTO product_slots VALUES(27,50); +INSERT INTO product_slots VALUES(27,51); +INSERT INTO product_slots VALUES(27,52); +INSERT INTO product_slots VALUES(27,53); +INSERT INTO product_slots VALUES(27,54); +INSERT INTO product_slots VALUES(27,55); +INSERT INTO product_slots VALUES(27,56); +INSERT INTO product_slots VALUES(27,57); +INSERT INTO product_slots VALUES(27,58); +INSERT INTO product_slots VALUES(27,59); +INSERT INTO product_slots VALUES(27,60); +INSERT INTO product_slots VALUES(27,61); +INSERT INTO product_slots VALUES(27,62); +INSERT INTO product_slots VALUES(27,63); +INSERT INTO product_slots VALUES(27,64); +INSERT INTO product_slots VALUES(27,65); +INSERT INTO product_slots VALUES(27,66); +INSERT INTO product_slots VALUES(27,67); +INSERT INTO product_slots VALUES(27,68); +INSERT INTO product_slots VALUES(27,69); +INSERT INTO product_slots VALUES(27,70); +INSERT INTO product_slots VALUES(27,71); +INSERT INTO product_slots VALUES(27,72); +INSERT INTO product_slots VALUES(27,73); +INSERT INTO product_slots VALUES(27,74); +INSERT INTO product_slots VALUES(27,75); +INSERT INTO product_slots VALUES(27,76); +INSERT INTO product_slots VALUES(27,77); +INSERT INTO product_slots VALUES(27,78); +INSERT INTO product_slots VALUES(27,79); +INSERT INTO product_slots VALUES(27,80); +INSERT INTO product_slots VALUES(27,81); +INSERT INTO product_slots VALUES(27,82); +INSERT INTO product_slots VALUES(27,83); +INSERT INTO product_slots VALUES(27,84); +INSERT INTO product_slots VALUES(27,85); +INSERT INTO product_slots VALUES(27,86); +INSERT INTO product_slots VALUES(27,87); +INSERT INTO product_slots VALUES(27,88); +INSERT INTO product_slots VALUES(27,89); +INSERT INTO product_slots VALUES(27,90); +INSERT INTO product_slots VALUES(27,91); +INSERT INTO product_slots VALUES(27,92); +INSERT INTO product_slots VALUES(27,93); +INSERT INTO product_slots VALUES(27,94); +INSERT INTO product_slots VALUES(27,95); +INSERT INTO product_slots VALUES(27,96); +INSERT INTO product_slots VALUES(27,97); +INSERT INTO product_slots VALUES(27,98); +INSERT INTO product_slots VALUES(27,99); +INSERT INTO product_slots VALUES(27,100); +INSERT INTO product_slots VALUES(27,101); +INSERT INTO product_slots VALUES(27,102); +INSERT INTO product_slots VALUES(27,103); +INSERT INTO product_slots VALUES(27,104); +INSERT INTO product_slots VALUES(27,105); +INSERT INTO product_slots VALUES(27,106); +INSERT INTO product_slots VALUES(27,107); +INSERT INTO product_slots VALUES(27,108); +INSERT INTO product_slots VALUES(27,109); +INSERT INTO product_slots VALUES(27,110); +INSERT INTO product_slots VALUES(27,111); +INSERT INTO product_slots VALUES(27,112); +INSERT INTO product_slots VALUES(27,113); +INSERT INTO product_slots VALUES(27,114); +INSERT INTO product_slots VALUES(27,115); +INSERT INTO product_slots VALUES(27,116); +INSERT INTO product_slots VALUES(27,117); +INSERT INTO product_slots VALUES(27,118); +INSERT INTO product_slots VALUES(27,119); +INSERT INTO product_slots VALUES(27,120); +INSERT INTO product_slots VALUES(27,121); +INSERT INTO product_slots VALUES(27,122); +INSERT INTO product_slots VALUES(27,123); +INSERT INTO product_slots VALUES(27,124); +INSERT INTO product_slots VALUES(27,125); +INSERT INTO product_slots VALUES(27,126); +INSERT INTO product_slots VALUES(27,127); +INSERT INTO product_slots VALUES(27,128); +INSERT INTO product_slots VALUES(27,129); +INSERT INTO product_slots VALUES(27,130); +INSERT INTO product_slots VALUES(27,131); +INSERT INTO product_slots VALUES(27,132); +INSERT INTO product_slots VALUES(27,133); +INSERT INTO product_slots VALUES(27,134); +INSERT INTO product_slots VALUES(27,135); +INSERT INTO product_slots VALUES(27,136); +INSERT INTO product_slots VALUES(27,137); +INSERT INTO product_slots VALUES(27,138); +INSERT INTO product_slots VALUES(27,139); +INSERT INTO product_slots VALUES(27,140); +INSERT INTO product_slots VALUES(27,141); +INSERT INTO product_slots VALUES(27,142); +INSERT INTO product_slots VALUES(27,143); +INSERT INTO product_slots VALUES(27,144); +INSERT INTO product_slots VALUES(27,145); +INSERT INTO product_slots VALUES(27,146); +INSERT INTO product_slots VALUES(27,147); +INSERT INTO product_slots VALUES(27,148); +INSERT INTO product_slots VALUES(27,149); +INSERT INTO product_slots VALUES(27,150); +INSERT INTO product_slots VALUES(27,151); +INSERT INTO product_slots VALUES(27,152); +INSERT INTO product_slots VALUES(27,153); +INSERT INTO product_slots VALUES(27,154); +INSERT INTO product_slots VALUES(27,155); +INSERT INTO product_slots VALUES(27,156); +INSERT INTO product_slots VALUES(27,157); +INSERT INTO product_slots VALUES(27,158); +INSERT INTO product_slots VALUES(27,159); +INSERT INTO product_slots VALUES(27,160); +INSERT INTO product_slots VALUES(27,161); +INSERT INTO product_slots VALUES(27,162); +INSERT INTO product_slots VALUES(27,163); +INSERT INTO product_slots VALUES(27,164); +INSERT INTO product_slots VALUES(27,165); +INSERT INTO product_slots VALUES(27,166); +INSERT INTO product_slots VALUES(27,167); +INSERT INTO product_slots VALUES(27,168); +INSERT INTO product_slots VALUES(27,169); +INSERT INTO product_slots VALUES(27,170); +INSERT INTO product_slots VALUES(27,171); +INSERT INTO product_slots VALUES(27,172); +INSERT INTO product_slots VALUES(27,173); +INSERT INTO product_slots VALUES(27,174); +INSERT INTO product_slots VALUES(27,175); +INSERT INTO product_slots VALUES(27,176); +INSERT INTO product_slots VALUES(27,177); +INSERT INTO product_slots VALUES(27,178); +INSERT INTO product_slots VALUES(27,179); +INSERT INTO product_slots VALUES(27,180); +INSERT INTO product_slots VALUES(27,181); +INSERT INTO product_slots VALUES(27,182); +INSERT INTO product_slots VALUES(27,183); +INSERT INTO product_slots VALUES(27,184); +INSERT INTO product_slots VALUES(27,185); +INSERT INTO product_slots VALUES(27,186); +INSERT INTO product_slots VALUES(27,187); +INSERT INTO product_slots VALUES(27,188); +INSERT INTO product_slots VALUES(27,189); +INSERT INTO product_slots VALUES(27,190); +INSERT INTO product_slots VALUES(27,191); +INSERT INTO product_slots VALUES(27,192); +INSERT INTO product_slots VALUES(27,193); +INSERT INTO product_slots VALUES(27,194); +INSERT INTO product_slots VALUES(27,195); +INSERT INTO product_slots VALUES(27,196); +INSERT INTO product_slots VALUES(27,197); +INSERT INTO product_slots VALUES(27,198); +INSERT INTO product_slots VALUES(27,199); +INSERT INTO product_slots VALUES(27,200); +INSERT INTO product_slots VALUES(27,201); +INSERT INTO product_slots VALUES(27,202); +INSERT INTO product_slots VALUES(27,203); +INSERT INTO product_slots VALUES(27,204); +INSERT INTO product_slots VALUES(27,205); +INSERT INTO product_slots VALUES(27,206); +INSERT INTO product_slots VALUES(27,207); +INSERT INTO product_slots VALUES(27,208); +INSERT INTO product_slots VALUES(27,209); +INSERT INTO product_slots VALUES(27,210); +INSERT INTO product_slots VALUES(27,211); +INSERT INTO product_slots VALUES(27,212); +INSERT INTO product_slots VALUES(27,213); +INSERT INTO product_slots VALUES(27,214); +INSERT INTO product_slots VALUES(27,215); +INSERT INTO product_slots VALUES(27,216); +INSERT INTO product_slots VALUES(27,217); +INSERT INTO product_slots VALUES(27,218); +INSERT INTO product_slots VALUES(27,219); +INSERT INTO product_slots VALUES(27,220); +INSERT INTO product_slots VALUES(27,221); +INSERT INTO product_slots VALUES(27,222); +INSERT INTO product_slots VALUES(27,223); +INSERT INTO product_slots VALUES(27,224); +INSERT INTO product_slots VALUES(27,225); +INSERT INTO product_slots VALUES(27,226); +INSERT INTO product_slots VALUES(27,227); +INSERT INTO product_slots VALUES(27,228); +INSERT INTO product_slots VALUES(27,229); +INSERT INTO product_slots VALUES(27,230); +INSERT INTO product_slots VALUES(27,231); +INSERT INTO product_slots VALUES(27,232); +INSERT INTO product_slots VALUES(27,233); +INSERT INTO product_slots VALUES(27,234); +INSERT INTO product_slots VALUES(27,235); +INSERT INTO product_slots VALUES(27,236); +INSERT INTO product_slots VALUES(27,237); +INSERT INTO product_slots VALUES(27,238); +INSERT INTO product_slots VALUES(27,239); +INSERT INTO product_slots VALUES(27,240); +INSERT INTO product_slots VALUES(27,241); +INSERT INTO product_slots VALUES(27,242); +INSERT INTO product_slots VALUES(27,243); +INSERT INTO product_slots VALUES(27,244); +INSERT INTO product_slots VALUES(27,274); +INSERT INTO product_slots VALUES(27,275); +INSERT INTO product_slots VALUES(27,279); +INSERT INTO product_slots VALUES(27,280); +INSERT INTO product_slots VALUES(27,281); +INSERT INTO product_slots VALUES(27,282); +INSERT INTO product_slots VALUES(27,283); +INSERT INTO product_slots VALUES(27,284); +INSERT INTO product_slots VALUES(27,285); +INSERT INTO product_slots VALUES(27,286); +INSERT INTO product_slots VALUES(27,287); +INSERT INTO product_slots VALUES(28,18); +INSERT INTO product_slots VALUES(28,20); +INSERT INTO product_slots VALUES(28,21); +INSERT INTO product_slots VALUES(28,33); +INSERT INTO product_slots VALUES(28,35); +INSERT INTO product_slots VALUES(28,37); +INSERT INTO product_slots VALUES(28,38); +INSERT INTO product_slots VALUES(28,39); +INSERT INTO product_slots VALUES(28,40); +INSERT INTO product_slots VALUES(28,41); +INSERT INTO product_slots VALUES(28,43); +INSERT INTO product_slots VALUES(28,44); +INSERT INTO product_slots VALUES(28,45); +INSERT INTO product_slots VALUES(28,46); +INSERT INTO product_slots VALUES(28,47); +INSERT INTO product_slots VALUES(28,48); +INSERT INTO product_slots VALUES(28,49); +INSERT INTO product_slots VALUES(28,50); +INSERT INTO product_slots VALUES(28,51); +INSERT INTO product_slots VALUES(28,52); +INSERT INTO product_slots VALUES(28,53); +INSERT INTO product_slots VALUES(28,54); +INSERT INTO product_slots VALUES(28,55); +INSERT INTO product_slots VALUES(28,56); +INSERT INTO product_slots VALUES(28,57); +INSERT INTO product_slots VALUES(28,58); +INSERT INTO product_slots VALUES(28,59); +INSERT INTO product_slots VALUES(28,60); +INSERT INTO product_slots VALUES(28,61); +INSERT INTO product_slots VALUES(28,62); +INSERT INTO product_slots VALUES(28,63); +INSERT INTO product_slots VALUES(28,64); +INSERT INTO product_slots VALUES(28,65); +INSERT INTO product_slots VALUES(28,66); +INSERT INTO product_slots VALUES(28,67); +INSERT INTO product_slots VALUES(28,68); +INSERT INTO product_slots VALUES(28,69); +INSERT INTO product_slots VALUES(28,70); +INSERT INTO product_slots VALUES(28,71); +INSERT INTO product_slots VALUES(28,72); +INSERT INTO product_slots VALUES(28,73); +INSERT INTO product_slots VALUES(28,74); +INSERT INTO product_slots VALUES(28,75); +INSERT INTO product_slots VALUES(28,76); +INSERT INTO product_slots VALUES(28,77); +INSERT INTO product_slots VALUES(28,78); +INSERT INTO product_slots VALUES(28,79); +INSERT INTO product_slots VALUES(28,80); +INSERT INTO product_slots VALUES(28,81); +INSERT INTO product_slots VALUES(28,82); +INSERT INTO product_slots VALUES(28,83); +INSERT INTO product_slots VALUES(28,84); +INSERT INTO product_slots VALUES(28,85); +INSERT INTO product_slots VALUES(28,86); +INSERT INTO product_slots VALUES(28,87); +INSERT INTO product_slots VALUES(28,88); +INSERT INTO product_slots VALUES(28,89); +INSERT INTO product_slots VALUES(28,90); +INSERT INTO product_slots VALUES(28,91); +INSERT INTO product_slots VALUES(28,92); +INSERT INTO product_slots VALUES(28,93); +INSERT INTO product_slots VALUES(28,94); +INSERT INTO product_slots VALUES(28,95); +INSERT INTO product_slots VALUES(28,96); +INSERT INTO product_slots VALUES(28,97); +INSERT INTO product_slots VALUES(28,98); +INSERT INTO product_slots VALUES(28,99); +INSERT INTO product_slots VALUES(28,100); +INSERT INTO product_slots VALUES(28,101); +INSERT INTO product_slots VALUES(28,102); +INSERT INTO product_slots VALUES(28,103); +INSERT INTO product_slots VALUES(28,104); +INSERT INTO product_slots VALUES(28,105); +INSERT INTO product_slots VALUES(28,106); +INSERT INTO product_slots VALUES(28,107); +INSERT INTO product_slots VALUES(28,108); +INSERT INTO product_slots VALUES(28,109); +INSERT INTO product_slots VALUES(28,110); +INSERT INTO product_slots VALUES(28,111); +INSERT INTO product_slots VALUES(28,112); +INSERT INTO product_slots VALUES(28,113); +INSERT INTO product_slots VALUES(28,114); +INSERT INTO product_slots VALUES(28,115); +INSERT INTO product_slots VALUES(28,116); +INSERT INTO product_slots VALUES(28,117); +INSERT INTO product_slots VALUES(28,118); +INSERT INTO product_slots VALUES(28,119); +INSERT INTO product_slots VALUES(28,120); +INSERT INTO product_slots VALUES(28,121); +INSERT INTO product_slots VALUES(28,122); +INSERT INTO product_slots VALUES(28,123); +INSERT INTO product_slots VALUES(28,124); +INSERT INTO product_slots VALUES(28,125); +INSERT INTO product_slots VALUES(28,126); +INSERT INTO product_slots VALUES(28,127); +INSERT INTO product_slots VALUES(28,128); +INSERT INTO product_slots VALUES(28,129); +INSERT INTO product_slots VALUES(28,130); +INSERT INTO product_slots VALUES(28,131); +INSERT INTO product_slots VALUES(28,132); +INSERT INTO product_slots VALUES(28,133); +INSERT INTO product_slots VALUES(28,134); +INSERT INTO product_slots VALUES(28,135); +INSERT INTO product_slots VALUES(28,136); +INSERT INTO product_slots VALUES(28,137); +INSERT INTO product_slots VALUES(28,138); +INSERT INTO product_slots VALUES(28,139); +INSERT INTO product_slots VALUES(28,140); +INSERT INTO product_slots VALUES(28,144); +INSERT INTO product_slots VALUES(28,145); +INSERT INTO product_slots VALUES(28,146); +INSERT INTO product_slots VALUES(28,147); +INSERT INTO product_slots VALUES(28,148); +INSERT INTO product_slots VALUES(28,149); +INSERT INTO product_slots VALUES(28,150); +INSERT INTO product_slots VALUES(28,151); +INSERT INTO product_slots VALUES(28,152); +INSERT INTO product_slots VALUES(28,153); +INSERT INTO product_slots VALUES(28,154); +INSERT INTO product_slots VALUES(28,155); +INSERT INTO product_slots VALUES(28,156); +INSERT INTO product_slots VALUES(28,157); +INSERT INTO product_slots VALUES(28,158); +INSERT INTO product_slots VALUES(28,159); +INSERT INTO product_slots VALUES(28,160); +INSERT INTO product_slots VALUES(28,161); +INSERT INTO product_slots VALUES(28,162); +INSERT INTO product_slots VALUES(28,163); +INSERT INTO product_slots VALUES(28,164); +INSERT INTO product_slots VALUES(28,165); +INSERT INTO product_slots VALUES(28,166); +INSERT INTO product_slots VALUES(28,167); +INSERT INTO product_slots VALUES(28,169); +INSERT INTO product_slots VALUES(28,170); +INSERT INTO product_slots VALUES(28,171); +INSERT INTO product_slots VALUES(28,172); +INSERT INTO product_slots VALUES(28,173); +INSERT INTO product_slots VALUES(28,174); +INSERT INTO product_slots VALUES(28,175); +INSERT INTO product_slots VALUES(28,176); +INSERT INTO product_slots VALUES(28,177); +INSERT INTO product_slots VALUES(28,178); +INSERT INTO product_slots VALUES(28,179); +INSERT INTO product_slots VALUES(28,180); +INSERT INTO product_slots VALUES(28,181); +INSERT INTO product_slots VALUES(28,182); +INSERT INTO product_slots VALUES(28,183); +INSERT INTO product_slots VALUES(28,184); +INSERT INTO product_slots VALUES(28,185); +INSERT INTO product_slots VALUES(28,186); +INSERT INTO product_slots VALUES(28,187); +INSERT INTO product_slots VALUES(28,188); +INSERT INTO product_slots VALUES(28,189); +INSERT INTO product_slots VALUES(28,190); +INSERT INTO product_slots VALUES(28,191); +INSERT INTO product_slots VALUES(28,192); +INSERT INTO product_slots VALUES(28,193); +INSERT INTO product_slots VALUES(28,194); +INSERT INTO product_slots VALUES(28,195); +INSERT INTO product_slots VALUES(28,196); +INSERT INTO product_slots VALUES(28,197); +INSERT INTO product_slots VALUES(28,198); +INSERT INTO product_slots VALUES(28,199); +INSERT INTO product_slots VALUES(28,200); +INSERT INTO product_slots VALUES(28,201); +INSERT INTO product_slots VALUES(28,202); +INSERT INTO product_slots VALUES(28,203); +INSERT INTO product_slots VALUES(28,204); +INSERT INTO product_slots VALUES(28,205); +INSERT INTO product_slots VALUES(28,206); +INSERT INTO product_slots VALUES(28,207); +INSERT INTO product_slots VALUES(28,208); +INSERT INTO product_slots VALUES(28,209); +INSERT INTO product_slots VALUES(28,210); +INSERT INTO product_slots VALUES(28,211); +INSERT INTO product_slots VALUES(28,212); +INSERT INTO product_slots VALUES(28,213); +INSERT INTO product_slots VALUES(28,214); +INSERT INTO product_slots VALUES(28,215); +INSERT INTO product_slots VALUES(28,216); +INSERT INTO product_slots VALUES(28,217); +INSERT INTO product_slots VALUES(28,218); +INSERT INTO product_slots VALUES(28,219); +INSERT INTO product_slots VALUES(28,220); +INSERT INTO product_slots VALUES(28,221); +INSERT INTO product_slots VALUES(28,222); +INSERT INTO product_slots VALUES(28,223); +INSERT INTO product_slots VALUES(28,224); +INSERT INTO product_slots VALUES(28,225); +INSERT INTO product_slots VALUES(28,226); +INSERT INTO product_slots VALUES(28,227); +INSERT INTO product_slots VALUES(28,228); +INSERT INTO product_slots VALUES(28,229); +INSERT INTO product_slots VALUES(28,230); +INSERT INTO product_slots VALUES(28,231); +INSERT INTO product_slots VALUES(28,232); +INSERT INTO product_slots VALUES(28,233); +INSERT INTO product_slots VALUES(28,234); +INSERT INTO product_slots VALUES(28,235); +INSERT INTO product_slots VALUES(28,236); +INSERT INTO product_slots VALUES(28,237); +INSERT INTO product_slots VALUES(28,238); +INSERT INTO product_slots VALUES(28,239); +INSERT INTO product_slots VALUES(28,240); +INSERT INTO product_slots VALUES(28,241); +INSERT INTO product_slots VALUES(28,242); +INSERT INTO product_slots VALUES(28,243); +INSERT INTO product_slots VALUES(28,244); +INSERT INTO product_slots VALUES(28,274); +INSERT INTO product_slots VALUES(28,275); +INSERT INTO product_slots VALUES(28,279); +INSERT INTO product_slots VALUES(28,280); +INSERT INTO product_slots VALUES(28,281); +INSERT INTO product_slots VALUES(28,282); +INSERT INTO product_slots VALUES(28,283); +INSERT INTO product_slots VALUES(28,284); +INSERT INTO product_slots VALUES(28,285); +INSERT INTO product_slots VALUES(28,286); +INSERT INTO product_slots VALUES(28,287); +INSERT INTO product_slots VALUES(29,18); +INSERT INTO product_slots VALUES(29,20); +INSERT INTO product_slots VALUES(29,21); +INSERT INTO product_slots VALUES(29,33); +INSERT INTO product_slots VALUES(29,35); +INSERT INTO product_slots VALUES(29,37); +INSERT INTO product_slots VALUES(29,38); +INSERT INTO product_slots VALUES(29,39); +INSERT INTO product_slots VALUES(29,40); +INSERT INTO product_slots VALUES(29,41); +INSERT INTO product_slots VALUES(29,43); +INSERT INTO product_slots VALUES(29,44); +INSERT INTO product_slots VALUES(29,45); +INSERT INTO product_slots VALUES(29,46); +INSERT INTO product_slots VALUES(29,47); +INSERT INTO product_slots VALUES(29,48); +INSERT INTO product_slots VALUES(29,49); +INSERT INTO product_slots VALUES(29,50); +INSERT INTO product_slots VALUES(29,51); +INSERT INTO product_slots VALUES(29,52); +INSERT INTO product_slots VALUES(29,53); +INSERT INTO product_slots VALUES(29,54); +INSERT INTO product_slots VALUES(29,55); +INSERT INTO product_slots VALUES(29,56); +INSERT INTO product_slots VALUES(29,57); +INSERT INTO product_slots VALUES(29,58); +INSERT INTO product_slots VALUES(29,59); +INSERT INTO product_slots VALUES(29,60); +INSERT INTO product_slots VALUES(29,61); +INSERT INTO product_slots VALUES(29,62); +INSERT INTO product_slots VALUES(29,63); +INSERT INTO product_slots VALUES(29,64); +INSERT INTO product_slots VALUES(29,65); +INSERT INTO product_slots VALUES(29,66); +INSERT INTO product_slots VALUES(29,67); +INSERT INTO product_slots VALUES(29,68); +INSERT INTO product_slots VALUES(29,69); +INSERT INTO product_slots VALUES(29,70); +INSERT INTO product_slots VALUES(29,71); +INSERT INTO product_slots VALUES(29,72); +INSERT INTO product_slots VALUES(29,73); +INSERT INTO product_slots VALUES(29,74); +INSERT INTO product_slots VALUES(29,75); +INSERT INTO product_slots VALUES(29,76); +INSERT INTO product_slots VALUES(29,77); +INSERT INTO product_slots VALUES(29,78); +INSERT INTO product_slots VALUES(29,79); +INSERT INTO product_slots VALUES(29,80); +INSERT INTO product_slots VALUES(29,81); +INSERT INTO product_slots VALUES(29,82); +INSERT INTO product_slots VALUES(29,83); +INSERT INTO product_slots VALUES(29,84); +INSERT INTO product_slots VALUES(29,85); +INSERT INTO product_slots VALUES(29,86); +INSERT INTO product_slots VALUES(29,87); +INSERT INTO product_slots VALUES(29,88); +INSERT INTO product_slots VALUES(29,89); +INSERT INTO product_slots VALUES(29,90); +INSERT INTO product_slots VALUES(29,91); +INSERT INTO product_slots VALUES(29,92); +INSERT INTO product_slots VALUES(29,93); +INSERT INTO product_slots VALUES(29,94); +INSERT INTO product_slots VALUES(29,95); +INSERT INTO product_slots VALUES(29,96); +INSERT INTO product_slots VALUES(29,97); +INSERT INTO product_slots VALUES(29,98); +INSERT INTO product_slots VALUES(29,99); +INSERT INTO product_slots VALUES(29,100); +INSERT INTO product_slots VALUES(29,101); +INSERT INTO product_slots VALUES(29,102); +INSERT INTO product_slots VALUES(29,103); +INSERT INTO product_slots VALUES(29,104); +INSERT INTO product_slots VALUES(29,105); +INSERT INTO product_slots VALUES(29,106); +INSERT INTO product_slots VALUES(29,107); +INSERT INTO product_slots VALUES(29,108); +INSERT INTO product_slots VALUES(29,109); +INSERT INTO product_slots VALUES(29,110); +INSERT INTO product_slots VALUES(29,111); +INSERT INTO product_slots VALUES(29,112); +INSERT INTO product_slots VALUES(29,113); +INSERT INTO product_slots VALUES(29,114); +INSERT INTO product_slots VALUES(29,115); +INSERT INTO product_slots VALUES(29,116); +INSERT INTO product_slots VALUES(29,117); +INSERT INTO product_slots VALUES(29,118); +INSERT INTO product_slots VALUES(29,119); +INSERT INTO product_slots VALUES(29,120); +INSERT INTO product_slots VALUES(29,121); +INSERT INTO product_slots VALUES(29,122); +INSERT INTO product_slots VALUES(29,123); +INSERT INTO product_slots VALUES(29,124); +INSERT INTO product_slots VALUES(29,125); +INSERT INTO product_slots VALUES(29,126); +INSERT INTO product_slots VALUES(29,127); +INSERT INTO product_slots VALUES(29,128); +INSERT INTO product_slots VALUES(29,129); +INSERT INTO product_slots VALUES(29,130); +INSERT INTO product_slots VALUES(29,131); +INSERT INTO product_slots VALUES(29,132); +INSERT INTO product_slots VALUES(29,133); +INSERT INTO product_slots VALUES(29,134); +INSERT INTO product_slots VALUES(29,135); +INSERT INTO product_slots VALUES(29,136); +INSERT INTO product_slots VALUES(29,137); +INSERT INTO product_slots VALUES(29,138); +INSERT INTO product_slots VALUES(29,139); +INSERT INTO product_slots VALUES(29,140); +INSERT INTO product_slots VALUES(29,141); +INSERT INTO product_slots VALUES(29,142); +INSERT INTO product_slots VALUES(29,143); +INSERT INTO product_slots VALUES(29,144); +INSERT INTO product_slots VALUES(29,145); +INSERT INTO product_slots VALUES(29,146); +INSERT INTO product_slots VALUES(29,147); +INSERT INTO product_slots VALUES(29,148); +INSERT INTO product_slots VALUES(29,149); +INSERT INTO product_slots VALUES(29,150); +INSERT INTO product_slots VALUES(29,151); +INSERT INTO product_slots VALUES(29,152); +INSERT INTO product_slots VALUES(29,153); +INSERT INTO product_slots VALUES(29,154); +INSERT INTO product_slots VALUES(29,155); +INSERT INTO product_slots VALUES(29,156); +INSERT INTO product_slots VALUES(29,157); +INSERT INTO product_slots VALUES(29,158); +INSERT INTO product_slots VALUES(29,159); +INSERT INTO product_slots VALUES(29,160); +INSERT INTO product_slots VALUES(29,161); +INSERT INTO product_slots VALUES(29,162); +INSERT INTO product_slots VALUES(29,163); +INSERT INTO product_slots VALUES(29,164); +INSERT INTO product_slots VALUES(29,165); +INSERT INTO product_slots VALUES(29,166); +INSERT INTO product_slots VALUES(29,167); +INSERT INTO product_slots VALUES(29,168); +INSERT INTO product_slots VALUES(29,169); +INSERT INTO product_slots VALUES(29,170); +INSERT INTO product_slots VALUES(29,171); +INSERT INTO product_slots VALUES(29,172); +INSERT INTO product_slots VALUES(29,173); +INSERT INTO product_slots VALUES(29,174); +INSERT INTO product_slots VALUES(29,175); +INSERT INTO product_slots VALUES(29,176); +INSERT INTO product_slots VALUES(29,177); +INSERT INTO product_slots VALUES(29,178); +INSERT INTO product_slots VALUES(29,179); +INSERT INTO product_slots VALUES(29,180); +INSERT INTO product_slots VALUES(29,181); +INSERT INTO product_slots VALUES(29,182); +INSERT INTO product_slots VALUES(29,183); +INSERT INTO product_slots VALUES(29,184); +INSERT INTO product_slots VALUES(29,185); +INSERT INTO product_slots VALUES(29,186); +INSERT INTO product_slots VALUES(29,187); +INSERT INTO product_slots VALUES(29,188); +INSERT INTO product_slots VALUES(29,189); +INSERT INTO product_slots VALUES(29,190); +INSERT INTO product_slots VALUES(29,191); +INSERT INTO product_slots VALUES(29,192); +INSERT INTO product_slots VALUES(29,193); +INSERT INTO product_slots VALUES(29,194); +INSERT INTO product_slots VALUES(29,195); +INSERT INTO product_slots VALUES(29,196); +INSERT INTO product_slots VALUES(29,197); +INSERT INTO product_slots VALUES(29,198); +INSERT INTO product_slots VALUES(29,199); +INSERT INTO product_slots VALUES(29,200); +INSERT INTO product_slots VALUES(29,201); +INSERT INTO product_slots VALUES(29,202); +INSERT INTO product_slots VALUES(29,203); +INSERT INTO product_slots VALUES(29,204); +INSERT INTO product_slots VALUES(29,205); +INSERT INTO product_slots VALUES(29,206); +INSERT INTO product_slots VALUES(29,207); +INSERT INTO product_slots VALUES(29,208); +INSERT INTO product_slots VALUES(29,209); +INSERT INTO product_slots VALUES(29,210); +INSERT INTO product_slots VALUES(29,211); +INSERT INTO product_slots VALUES(29,212); +INSERT INTO product_slots VALUES(29,213); +INSERT INTO product_slots VALUES(29,214); +INSERT INTO product_slots VALUES(29,215); +INSERT INTO product_slots VALUES(29,216); +INSERT INTO product_slots VALUES(29,217); +INSERT INTO product_slots VALUES(29,218); +INSERT INTO product_slots VALUES(29,219); +INSERT INTO product_slots VALUES(29,220); +INSERT INTO product_slots VALUES(29,221); +INSERT INTO product_slots VALUES(29,222); +INSERT INTO product_slots VALUES(29,223); +INSERT INTO product_slots VALUES(29,224); +INSERT INTO product_slots VALUES(29,225); +INSERT INTO product_slots VALUES(29,226); +INSERT INTO product_slots VALUES(29,227); +INSERT INTO product_slots VALUES(29,228); +INSERT INTO product_slots VALUES(29,229); +INSERT INTO product_slots VALUES(29,230); +INSERT INTO product_slots VALUES(29,231); +INSERT INTO product_slots VALUES(29,232); +INSERT INTO product_slots VALUES(29,233); +INSERT INTO product_slots VALUES(29,234); +INSERT INTO product_slots VALUES(29,235); +INSERT INTO product_slots VALUES(29,236); +INSERT INTO product_slots VALUES(29,237); +INSERT INTO product_slots VALUES(29,238); +INSERT INTO product_slots VALUES(29,239); +INSERT INTO product_slots VALUES(29,240); +INSERT INTO product_slots VALUES(29,241); +INSERT INTO product_slots VALUES(29,242); +INSERT INTO product_slots VALUES(29,243); +INSERT INTO product_slots VALUES(29,244); +INSERT INTO product_slots VALUES(29,274); +INSERT INTO product_slots VALUES(29,275); +INSERT INTO product_slots VALUES(29,279); +INSERT INTO product_slots VALUES(29,280); +INSERT INTO product_slots VALUES(29,281); +INSERT INTO product_slots VALUES(29,282); +INSERT INTO product_slots VALUES(29,283); +INSERT INTO product_slots VALUES(29,284); +INSERT INTO product_slots VALUES(29,285); +INSERT INTO product_slots VALUES(29,286); +INSERT INTO product_slots VALUES(29,287); +INSERT INTO product_slots VALUES(30,18); +INSERT INTO product_slots VALUES(30,20); +INSERT INTO product_slots VALUES(30,21); +INSERT INTO product_slots VALUES(30,33); +INSERT INTO product_slots VALUES(30,35); +INSERT INTO product_slots VALUES(30,37); +INSERT INTO product_slots VALUES(30,38); +INSERT INTO product_slots VALUES(30,39); +INSERT INTO product_slots VALUES(30,40); +INSERT INTO product_slots VALUES(30,41); +INSERT INTO product_slots VALUES(30,43); +INSERT INTO product_slots VALUES(30,44); +INSERT INTO product_slots VALUES(30,45); +INSERT INTO product_slots VALUES(30,46); +INSERT INTO product_slots VALUES(30,47); +INSERT INTO product_slots VALUES(30,48); +INSERT INTO product_slots VALUES(30,49); +INSERT INTO product_slots VALUES(30,50); +INSERT INTO product_slots VALUES(30,51); +INSERT INTO product_slots VALUES(30,52); +INSERT INTO product_slots VALUES(30,53); +INSERT INTO product_slots VALUES(30,54); +INSERT INTO product_slots VALUES(30,55); +INSERT INTO product_slots VALUES(30,56); +INSERT INTO product_slots VALUES(30,57); +INSERT INTO product_slots VALUES(30,58); +INSERT INTO product_slots VALUES(30,59); +INSERT INTO product_slots VALUES(30,60); +INSERT INTO product_slots VALUES(30,61); +INSERT INTO product_slots VALUES(30,62); +INSERT INTO product_slots VALUES(30,63); +INSERT INTO product_slots VALUES(30,64); +INSERT INTO product_slots VALUES(30,65); +INSERT INTO product_slots VALUES(30,66); +INSERT INTO product_slots VALUES(30,67); +INSERT INTO product_slots VALUES(30,68); +INSERT INTO product_slots VALUES(30,69); +INSERT INTO product_slots VALUES(30,70); +INSERT INTO product_slots VALUES(30,71); +INSERT INTO product_slots VALUES(30,72); +INSERT INTO product_slots VALUES(30,73); +INSERT INTO product_slots VALUES(30,74); +INSERT INTO product_slots VALUES(30,75); +INSERT INTO product_slots VALUES(30,76); +INSERT INTO product_slots VALUES(30,77); +INSERT INTO product_slots VALUES(30,78); +INSERT INTO product_slots VALUES(30,79); +INSERT INTO product_slots VALUES(30,80); +INSERT INTO product_slots VALUES(30,81); +INSERT INTO product_slots VALUES(30,82); +INSERT INTO product_slots VALUES(30,83); +INSERT INTO product_slots VALUES(30,84); +INSERT INTO product_slots VALUES(30,85); +INSERT INTO product_slots VALUES(30,86); +INSERT INTO product_slots VALUES(30,87); +INSERT INTO product_slots VALUES(30,88); +INSERT INTO product_slots VALUES(30,89); +INSERT INTO product_slots VALUES(30,90); +INSERT INTO product_slots VALUES(30,91); +INSERT INTO product_slots VALUES(30,92); +INSERT INTO product_slots VALUES(30,93); +INSERT INTO product_slots VALUES(30,94); +INSERT INTO product_slots VALUES(30,95); +INSERT INTO product_slots VALUES(30,96); +INSERT INTO product_slots VALUES(30,97); +INSERT INTO product_slots VALUES(30,98); +INSERT INTO product_slots VALUES(30,99); +INSERT INTO product_slots VALUES(30,100); +INSERT INTO product_slots VALUES(30,101); +INSERT INTO product_slots VALUES(30,102); +INSERT INTO product_slots VALUES(30,103); +INSERT INTO product_slots VALUES(30,104); +INSERT INTO product_slots VALUES(30,105); +INSERT INTO product_slots VALUES(30,106); +INSERT INTO product_slots VALUES(30,107); +INSERT INTO product_slots VALUES(30,108); +INSERT INTO product_slots VALUES(30,109); +INSERT INTO product_slots VALUES(30,110); +INSERT INTO product_slots VALUES(30,111); +INSERT INTO product_slots VALUES(30,112); +INSERT INTO product_slots VALUES(30,113); +INSERT INTO product_slots VALUES(30,114); +INSERT INTO product_slots VALUES(30,115); +INSERT INTO product_slots VALUES(30,116); +INSERT INTO product_slots VALUES(30,117); +INSERT INTO product_slots VALUES(30,118); +INSERT INTO product_slots VALUES(30,119); +INSERT INTO product_slots VALUES(30,120); +INSERT INTO product_slots VALUES(30,121); +INSERT INTO product_slots VALUES(30,122); +INSERT INTO product_slots VALUES(30,123); +INSERT INTO product_slots VALUES(30,124); +INSERT INTO product_slots VALUES(30,125); +INSERT INTO product_slots VALUES(30,126); +INSERT INTO product_slots VALUES(30,127); +INSERT INTO product_slots VALUES(30,128); +INSERT INTO product_slots VALUES(30,129); +INSERT INTO product_slots VALUES(30,130); +INSERT INTO product_slots VALUES(30,131); +INSERT INTO product_slots VALUES(30,132); +INSERT INTO product_slots VALUES(30,133); +INSERT INTO product_slots VALUES(30,134); +INSERT INTO product_slots VALUES(30,135); +INSERT INTO product_slots VALUES(30,136); +INSERT INTO product_slots VALUES(30,137); +INSERT INTO product_slots VALUES(30,138); +INSERT INTO product_slots VALUES(30,139); +INSERT INTO product_slots VALUES(30,140); +INSERT INTO product_slots VALUES(30,141); +INSERT INTO product_slots VALUES(30,142); +INSERT INTO product_slots VALUES(30,143); +INSERT INTO product_slots VALUES(30,144); +INSERT INTO product_slots VALUES(30,145); +INSERT INTO product_slots VALUES(30,146); +INSERT INTO product_slots VALUES(30,147); +INSERT INTO product_slots VALUES(30,148); +INSERT INTO product_slots VALUES(30,149); +INSERT INTO product_slots VALUES(30,150); +INSERT INTO product_slots VALUES(30,151); +INSERT INTO product_slots VALUES(30,152); +INSERT INTO product_slots VALUES(30,153); +INSERT INTO product_slots VALUES(30,154); +INSERT INTO product_slots VALUES(30,155); +INSERT INTO product_slots VALUES(30,156); +INSERT INTO product_slots VALUES(30,157); +INSERT INTO product_slots VALUES(30,158); +INSERT INTO product_slots VALUES(30,159); +INSERT INTO product_slots VALUES(30,160); +INSERT INTO product_slots VALUES(30,161); +INSERT INTO product_slots VALUES(30,162); +INSERT INTO product_slots VALUES(30,163); +INSERT INTO product_slots VALUES(30,164); +INSERT INTO product_slots VALUES(30,165); +INSERT INTO product_slots VALUES(30,166); +INSERT INTO product_slots VALUES(30,167); +INSERT INTO product_slots VALUES(30,168); +INSERT INTO product_slots VALUES(30,169); +INSERT INTO product_slots VALUES(30,170); +INSERT INTO product_slots VALUES(30,171); +INSERT INTO product_slots VALUES(30,172); +INSERT INTO product_slots VALUES(30,173); +INSERT INTO product_slots VALUES(30,174); +INSERT INTO product_slots VALUES(30,175); +INSERT INTO product_slots VALUES(30,176); +INSERT INTO product_slots VALUES(30,177); +INSERT INTO product_slots VALUES(30,178); +INSERT INTO product_slots VALUES(30,179); +INSERT INTO product_slots VALUES(30,180); +INSERT INTO product_slots VALUES(30,181); +INSERT INTO product_slots VALUES(30,182); +INSERT INTO product_slots VALUES(30,183); +INSERT INTO product_slots VALUES(30,184); +INSERT INTO product_slots VALUES(30,185); +INSERT INTO product_slots VALUES(30,186); +INSERT INTO product_slots VALUES(30,187); +INSERT INTO product_slots VALUES(30,188); +INSERT INTO product_slots VALUES(30,189); +INSERT INTO product_slots VALUES(30,190); +INSERT INTO product_slots VALUES(30,191); +INSERT INTO product_slots VALUES(30,192); +INSERT INTO product_slots VALUES(30,193); +INSERT INTO product_slots VALUES(30,194); +INSERT INTO product_slots VALUES(30,195); +INSERT INTO product_slots VALUES(30,196); +INSERT INTO product_slots VALUES(30,197); +INSERT INTO product_slots VALUES(30,198); +INSERT INTO product_slots VALUES(30,199); +INSERT INTO product_slots VALUES(30,200); +INSERT INTO product_slots VALUES(30,201); +INSERT INTO product_slots VALUES(30,202); +INSERT INTO product_slots VALUES(30,203); +INSERT INTO product_slots VALUES(30,204); +INSERT INTO product_slots VALUES(30,205); +INSERT INTO product_slots VALUES(30,206); +INSERT INTO product_slots VALUES(30,207); +INSERT INTO product_slots VALUES(30,208); +INSERT INTO product_slots VALUES(30,209); +INSERT INTO product_slots VALUES(30,210); +INSERT INTO product_slots VALUES(30,211); +INSERT INTO product_slots VALUES(30,212); +INSERT INTO product_slots VALUES(30,213); +INSERT INTO product_slots VALUES(30,214); +INSERT INTO product_slots VALUES(30,215); +INSERT INTO product_slots VALUES(30,216); +INSERT INTO product_slots VALUES(30,217); +INSERT INTO product_slots VALUES(30,218); +INSERT INTO product_slots VALUES(30,219); +INSERT INTO product_slots VALUES(30,220); +INSERT INTO product_slots VALUES(30,221); +INSERT INTO product_slots VALUES(30,222); +INSERT INTO product_slots VALUES(30,223); +INSERT INTO product_slots VALUES(30,224); +INSERT INTO product_slots VALUES(30,225); +INSERT INTO product_slots VALUES(30,226); +INSERT INTO product_slots VALUES(30,227); +INSERT INTO product_slots VALUES(30,228); +INSERT INTO product_slots VALUES(30,229); +INSERT INTO product_slots VALUES(30,230); +INSERT INTO product_slots VALUES(30,231); +INSERT INTO product_slots VALUES(30,232); +INSERT INTO product_slots VALUES(30,233); +INSERT INTO product_slots VALUES(30,234); +INSERT INTO product_slots VALUES(30,235); +INSERT INTO product_slots VALUES(30,236); +INSERT INTO product_slots VALUES(30,237); +INSERT INTO product_slots VALUES(30,238); +INSERT INTO product_slots VALUES(30,239); +INSERT INTO product_slots VALUES(30,240); +INSERT INTO product_slots VALUES(30,241); +INSERT INTO product_slots VALUES(30,242); +INSERT INTO product_slots VALUES(30,243); +INSERT INTO product_slots VALUES(30,244); +INSERT INTO product_slots VALUES(30,274); +INSERT INTO product_slots VALUES(30,275); +INSERT INTO product_slots VALUES(30,279); +INSERT INTO product_slots VALUES(30,280); +INSERT INTO product_slots VALUES(30,281); +INSERT INTO product_slots VALUES(30,282); +INSERT INTO product_slots VALUES(30,283); +INSERT INTO product_slots VALUES(30,284); +INSERT INTO product_slots VALUES(30,285); +INSERT INTO product_slots VALUES(30,286); +INSERT INTO product_slots VALUES(30,287); +INSERT INTO product_slots VALUES(31,18); +INSERT INTO product_slots VALUES(31,20); +INSERT INTO product_slots VALUES(31,21); +INSERT INTO product_slots VALUES(31,33); +INSERT INTO product_slots VALUES(31,35); +INSERT INTO product_slots VALUES(31,37); +INSERT INTO product_slots VALUES(31,38); +INSERT INTO product_slots VALUES(31,39); +INSERT INTO product_slots VALUES(31,40); +INSERT INTO product_slots VALUES(31,44); +INSERT INTO product_slots VALUES(31,46); +INSERT INTO product_slots VALUES(31,47); +INSERT INTO product_slots VALUES(31,48); +INSERT INTO product_slots VALUES(31,49); +INSERT INTO product_slots VALUES(31,50); +INSERT INTO product_slots VALUES(31,51); +INSERT INTO product_slots VALUES(31,52); +INSERT INTO product_slots VALUES(31,53); +INSERT INTO product_slots VALUES(31,54); +INSERT INTO product_slots VALUES(31,55); +INSERT INTO product_slots VALUES(31,56); +INSERT INTO product_slots VALUES(31,57); +INSERT INTO product_slots VALUES(31,58); +INSERT INTO product_slots VALUES(31,59); +INSERT INTO product_slots VALUES(31,60); +INSERT INTO product_slots VALUES(31,61); +INSERT INTO product_slots VALUES(31,62); +INSERT INTO product_slots VALUES(31,63); +INSERT INTO product_slots VALUES(31,64); +INSERT INTO product_slots VALUES(31,65); +INSERT INTO product_slots VALUES(31,66); +INSERT INTO product_slots VALUES(31,67); +INSERT INTO product_slots VALUES(31,68); +INSERT INTO product_slots VALUES(31,69); +INSERT INTO product_slots VALUES(31,70); +INSERT INTO product_slots VALUES(31,71); +INSERT INTO product_slots VALUES(31,72); +INSERT INTO product_slots VALUES(31,73); +INSERT INTO product_slots VALUES(31,74); +INSERT INTO product_slots VALUES(31,75); +INSERT INTO product_slots VALUES(31,76); +INSERT INTO product_slots VALUES(31,77); +INSERT INTO product_slots VALUES(31,78); +INSERT INTO product_slots VALUES(31,79); +INSERT INTO product_slots VALUES(31,80); +INSERT INTO product_slots VALUES(31,81); +INSERT INTO product_slots VALUES(31,82); +INSERT INTO product_slots VALUES(31,83); +INSERT INTO product_slots VALUES(31,84); +INSERT INTO product_slots VALUES(31,85); +INSERT INTO product_slots VALUES(31,86); +INSERT INTO product_slots VALUES(31,87); +INSERT INTO product_slots VALUES(31,88); +INSERT INTO product_slots VALUES(31,89); +INSERT INTO product_slots VALUES(31,90); +INSERT INTO product_slots VALUES(31,91); +INSERT INTO product_slots VALUES(31,92); +INSERT INTO product_slots VALUES(31,93); +INSERT INTO product_slots VALUES(31,94); +INSERT INTO product_slots VALUES(31,95); +INSERT INTO product_slots VALUES(31,96); +INSERT INTO product_slots VALUES(31,97); +INSERT INTO product_slots VALUES(31,98); +INSERT INTO product_slots VALUES(31,99); +INSERT INTO product_slots VALUES(31,100); +INSERT INTO product_slots VALUES(31,101); +INSERT INTO product_slots VALUES(31,102); +INSERT INTO product_slots VALUES(31,103); +INSERT INTO product_slots VALUES(31,104); +INSERT INTO product_slots VALUES(31,105); +INSERT INTO product_slots VALUES(31,106); +INSERT INTO product_slots VALUES(31,107); +INSERT INTO product_slots VALUES(31,108); +INSERT INTO product_slots VALUES(31,109); +INSERT INTO product_slots VALUES(31,110); +INSERT INTO product_slots VALUES(31,111); +INSERT INTO product_slots VALUES(31,112); +INSERT INTO product_slots VALUES(31,113); +INSERT INTO product_slots VALUES(31,114); +INSERT INTO product_slots VALUES(31,115); +INSERT INTO product_slots VALUES(31,116); +INSERT INTO product_slots VALUES(31,117); +INSERT INTO product_slots VALUES(31,118); +INSERT INTO product_slots VALUES(31,119); +INSERT INTO product_slots VALUES(31,120); +INSERT INTO product_slots VALUES(31,121); +INSERT INTO product_slots VALUES(31,122); +INSERT INTO product_slots VALUES(31,123); +INSERT INTO product_slots VALUES(31,124); +INSERT INTO product_slots VALUES(31,125); +INSERT INTO product_slots VALUES(31,126); +INSERT INTO product_slots VALUES(31,127); +INSERT INTO product_slots VALUES(31,128); +INSERT INTO product_slots VALUES(31,129); +INSERT INTO product_slots VALUES(31,130); +INSERT INTO product_slots VALUES(31,131); +INSERT INTO product_slots VALUES(31,132); +INSERT INTO product_slots VALUES(31,133); +INSERT INTO product_slots VALUES(31,134); +INSERT INTO product_slots VALUES(31,135); +INSERT INTO product_slots VALUES(31,136); +INSERT INTO product_slots VALUES(31,137); +INSERT INTO product_slots VALUES(31,138); +INSERT INTO product_slots VALUES(31,139); +INSERT INTO product_slots VALUES(31,140); +INSERT INTO product_slots VALUES(31,141); +INSERT INTO product_slots VALUES(31,142); +INSERT INTO product_slots VALUES(31,143); +INSERT INTO product_slots VALUES(31,144); +INSERT INTO product_slots VALUES(31,145); +INSERT INTO product_slots VALUES(31,146); +INSERT INTO product_slots VALUES(31,147); +INSERT INTO product_slots VALUES(31,148); +INSERT INTO product_slots VALUES(31,149); +INSERT INTO product_slots VALUES(31,150); +INSERT INTO product_slots VALUES(31,151); +INSERT INTO product_slots VALUES(31,152); +INSERT INTO product_slots VALUES(31,153); +INSERT INTO product_slots VALUES(31,154); +INSERT INTO product_slots VALUES(31,155); +INSERT INTO product_slots VALUES(31,156); +INSERT INTO product_slots VALUES(31,157); +INSERT INTO product_slots VALUES(31,158); +INSERT INTO product_slots VALUES(31,159); +INSERT INTO product_slots VALUES(31,160); +INSERT INTO product_slots VALUES(31,161); +INSERT INTO product_slots VALUES(31,162); +INSERT INTO product_slots VALUES(31,163); +INSERT INTO product_slots VALUES(31,164); +INSERT INTO product_slots VALUES(31,165); +INSERT INTO product_slots VALUES(31,166); +INSERT INTO product_slots VALUES(31,167); +INSERT INTO product_slots VALUES(31,168); +INSERT INTO product_slots VALUES(31,169); +INSERT INTO product_slots VALUES(31,170); +INSERT INTO product_slots VALUES(31,171); +INSERT INTO product_slots VALUES(31,172); +INSERT INTO product_slots VALUES(31,173); +INSERT INTO product_slots VALUES(31,174); +INSERT INTO product_slots VALUES(31,175); +INSERT INTO product_slots VALUES(31,176); +INSERT INTO product_slots VALUES(31,177); +INSERT INTO product_slots VALUES(31,178); +INSERT INTO product_slots VALUES(31,179); +INSERT INTO product_slots VALUES(31,180); +INSERT INTO product_slots VALUES(31,181); +INSERT INTO product_slots VALUES(31,182); +INSERT INTO product_slots VALUES(31,183); +INSERT INTO product_slots VALUES(31,184); +INSERT INTO product_slots VALUES(31,185); +INSERT INTO product_slots VALUES(31,186); +INSERT INTO product_slots VALUES(31,187); +INSERT INTO product_slots VALUES(31,188); +INSERT INTO product_slots VALUES(31,189); +INSERT INTO product_slots VALUES(31,190); +INSERT INTO product_slots VALUES(31,191); +INSERT INTO product_slots VALUES(31,192); +INSERT INTO product_slots VALUES(31,193); +INSERT INTO product_slots VALUES(31,194); +INSERT INTO product_slots VALUES(31,195); +INSERT INTO product_slots VALUES(31,196); +INSERT INTO product_slots VALUES(31,197); +INSERT INTO product_slots VALUES(31,198); +INSERT INTO product_slots VALUES(31,199); +INSERT INTO product_slots VALUES(31,200); +INSERT INTO product_slots VALUES(31,201); +INSERT INTO product_slots VALUES(31,202); +INSERT INTO product_slots VALUES(31,203); +INSERT INTO product_slots VALUES(31,204); +INSERT INTO product_slots VALUES(31,205); +INSERT INTO product_slots VALUES(31,206); +INSERT INTO product_slots VALUES(31,207); +INSERT INTO product_slots VALUES(31,208); +INSERT INTO product_slots VALUES(31,209); +INSERT INTO product_slots VALUES(31,210); +INSERT INTO product_slots VALUES(31,211); +INSERT INTO product_slots VALUES(31,212); +INSERT INTO product_slots VALUES(31,213); +INSERT INTO product_slots VALUES(31,214); +INSERT INTO product_slots VALUES(31,215); +INSERT INTO product_slots VALUES(31,216); +INSERT INTO product_slots VALUES(31,217); +INSERT INTO product_slots VALUES(31,218); +INSERT INTO product_slots VALUES(31,219); +INSERT INTO product_slots VALUES(31,220); +INSERT INTO product_slots VALUES(31,221); +INSERT INTO product_slots VALUES(31,222); +INSERT INTO product_slots VALUES(31,223); +INSERT INTO product_slots VALUES(31,224); +INSERT INTO product_slots VALUES(31,225); +INSERT INTO product_slots VALUES(31,226); +INSERT INTO product_slots VALUES(31,227); +INSERT INTO product_slots VALUES(31,228); +INSERT INTO product_slots VALUES(31,229); +INSERT INTO product_slots VALUES(31,230); +INSERT INTO product_slots VALUES(31,231); +INSERT INTO product_slots VALUES(31,232); +INSERT INTO product_slots VALUES(31,233); +INSERT INTO product_slots VALUES(31,234); +INSERT INTO product_slots VALUES(31,235); +INSERT INTO product_slots VALUES(31,236); +INSERT INTO product_slots VALUES(31,237); +INSERT INTO product_slots VALUES(31,238); +INSERT INTO product_slots VALUES(31,239); +INSERT INTO product_slots VALUES(31,240); +INSERT INTO product_slots VALUES(31,241); +INSERT INTO product_slots VALUES(31,242); +INSERT INTO product_slots VALUES(31,243); +INSERT INTO product_slots VALUES(31,244); +INSERT INTO product_slots VALUES(31,274); +INSERT INTO product_slots VALUES(31,275); +INSERT INTO product_slots VALUES(31,279); +INSERT INTO product_slots VALUES(31,280); +INSERT INTO product_slots VALUES(31,281); +INSERT INTO product_slots VALUES(31,282); +INSERT INTO product_slots VALUES(31,283); +INSERT INTO product_slots VALUES(31,284); +INSERT INTO product_slots VALUES(31,285); +INSERT INTO product_slots VALUES(31,286); +INSERT INTO product_slots VALUES(31,287); +INSERT INTO product_slots VALUES(32,18); +INSERT INTO product_slots VALUES(32,20); +INSERT INTO product_slots VALUES(32,21); +INSERT INTO product_slots VALUES(32,33); +INSERT INTO product_slots VALUES(32,35); +INSERT INTO product_slots VALUES(32,37); +INSERT INTO product_slots VALUES(32,38); +INSERT INTO product_slots VALUES(32,39); +INSERT INTO product_slots VALUES(32,40); +INSERT INTO product_slots VALUES(32,41); +INSERT INTO product_slots VALUES(32,43); +INSERT INTO product_slots VALUES(32,44); +INSERT INTO product_slots VALUES(32,45); +INSERT INTO product_slots VALUES(32,46); +INSERT INTO product_slots VALUES(32,47); +INSERT INTO product_slots VALUES(32,48); +INSERT INTO product_slots VALUES(32,49); +INSERT INTO product_slots VALUES(32,50); +INSERT INTO product_slots VALUES(32,51); +INSERT INTO product_slots VALUES(32,52); +INSERT INTO product_slots VALUES(32,53); +INSERT INTO product_slots VALUES(32,54); +INSERT INTO product_slots VALUES(32,55); +INSERT INTO product_slots VALUES(32,56); +INSERT INTO product_slots VALUES(32,57); +INSERT INTO product_slots VALUES(32,58); +INSERT INTO product_slots VALUES(32,59); +INSERT INTO product_slots VALUES(32,60); +INSERT INTO product_slots VALUES(32,61); +INSERT INTO product_slots VALUES(32,62); +INSERT INTO product_slots VALUES(32,63); +INSERT INTO product_slots VALUES(32,64); +INSERT INTO product_slots VALUES(32,65); +INSERT INTO product_slots VALUES(32,66); +INSERT INTO product_slots VALUES(32,67); +INSERT INTO product_slots VALUES(32,68); +INSERT INTO product_slots VALUES(32,69); +INSERT INTO product_slots VALUES(32,70); +INSERT INTO product_slots VALUES(32,71); +INSERT INTO product_slots VALUES(32,72); +INSERT INTO product_slots VALUES(32,73); +INSERT INTO product_slots VALUES(32,74); +INSERT INTO product_slots VALUES(32,75); +INSERT INTO product_slots VALUES(32,76); +INSERT INTO product_slots VALUES(32,77); +INSERT INTO product_slots VALUES(32,78); +INSERT INTO product_slots VALUES(32,79); +INSERT INTO product_slots VALUES(32,80); +INSERT INTO product_slots VALUES(32,81); +INSERT INTO product_slots VALUES(32,82); +INSERT INTO product_slots VALUES(32,83); +INSERT INTO product_slots VALUES(32,84); +INSERT INTO product_slots VALUES(32,85); +INSERT INTO product_slots VALUES(32,86); +INSERT INTO product_slots VALUES(32,87); +INSERT INTO product_slots VALUES(32,88); +INSERT INTO product_slots VALUES(32,89); +INSERT INTO product_slots VALUES(32,90); +INSERT INTO product_slots VALUES(32,91); +INSERT INTO product_slots VALUES(32,92); +INSERT INTO product_slots VALUES(32,93); +INSERT INTO product_slots VALUES(32,94); +INSERT INTO product_slots VALUES(32,95); +INSERT INTO product_slots VALUES(32,96); +INSERT INTO product_slots VALUES(32,97); +INSERT INTO product_slots VALUES(32,98); +INSERT INTO product_slots VALUES(32,99); +INSERT INTO product_slots VALUES(32,100); +INSERT INTO product_slots VALUES(32,101); +INSERT INTO product_slots VALUES(32,102); +INSERT INTO product_slots VALUES(32,103); +INSERT INTO product_slots VALUES(32,104); +INSERT INTO product_slots VALUES(32,105); +INSERT INTO product_slots VALUES(32,106); +INSERT INTO product_slots VALUES(32,107); +INSERT INTO product_slots VALUES(32,108); +INSERT INTO product_slots VALUES(32,109); +INSERT INTO product_slots VALUES(32,110); +INSERT INTO product_slots VALUES(32,111); +INSERT INTO product_slots VALUES(32,112); +INSERT INTO product_slots VALUES(32,113); +INSERT INTO product_slots VALUES(32,114); +INSERT INTO product_slots VALUES(32,115); +INSERT INTO product_slots VALUES(32,116); +INSERT INTO product_slots VALUES(32,117); +INSERT INTO product_slots VALUES(32,118); +INSERT INTO product_slots VALUES(32,119); +INSERT INTO product_slots VALUES(32,120); +INSERT INTO product_slots VALUES(32,121); +INSERT INTO product_slots VALUES(32,122); +INSERT INTO product_slots VALUES(32,123); +INSERT INTO product_slots VALUES(32,124); +INSERT INTO product_slots VALUES(32,125); +INSERT INTO product_slots VALUES(32,126); +INSERT INTO product_slots VALUES(32,127); +INSERT INTO product_slots VALUES(32,128); +INSERT INTO product_slots VALUES(32,129); +INSERT INTO product_slots VALUES(32,130); +INSERT INTO product_slots VALUES(32,131); +INSERT INTO product_slots VALUES(32,132); +INSERT INTO product_slots VALUES(32,133); +INSERT INTO product_slots VALUES(32,134); +INSERT INTO product_slots VALUES(32,135); +INSERT INTO product_slots VALUES(32,136); +INSERT INTO product_slots VALUES(32,137); +INSERT INTO product_slots VALUES(32,138); +INSERT INTO product_slots VALUES(32,139); +INSERT INTO product_slots VALUES(32,140); +INSERT INTO product_slots VALUES(32,141); +INSERT INTO product_slots VALUES(32,142); +INSERT INTO product_slots VALUES(32,143); +INSERT INTO product_slots VALUES(32,144); +INSERT INTO product_slots VALUES(32,145); +INSERT INTO product_slots VALUES(32,146); +INSERT INTO product_slots VALUES(32,147); +INSERT INTO product_slots VALUES(32,148); +INSERT INTO product_slots VALUES(32,149); +INSERT INTO product_slots VALUES(32,150); +INSERT INTO product_slots VALUES(32,151); +INSERT INTO product_slots VALUES(32,152); +INSERT INTO product_slots VALUES(32,153); +INSERT INTO product_slots VALUES(32,154); +INSERT INTO product_slots VALUES(32,155); +INSERT INTO product_slots VALUES(32,156); +INSERT INTO product_slots VALUES(32,157); +INSERT INTO product_slots VALUES(32,158); +INSERT INTO product_slots VALUES(32,159); +INSERT INTO product_slots VALUES(32,160); +INSERT INTO product_slots VALUES(32,161); +INSERT INTO product_slots VALUES(32,162); +INSERT INTO product_slots VALUES(32,163); +INSERT INTO product_slots VALUES(32,164); +INSERT INTO product_slots VALUES(32,165); +INSERT INTO product_slots VALUES(32,166); +INSERT INTO product_slots VALUES(32,167); +INSERT INTO product_slots VALUES(32,168); +INSERT INTO product_slots VALUES(32,169); +INSERT INTO product_slots VALUES(32,170); +INSERT INTO product_slots VALUES(32,171); +INSERT INTO product_slots VALUES(32,172); +INSERT INTO product_slots VALUES(32,173); +INSERT INTO product_slots VALUES(32,174); +INSERT INTO product_slots VALUES(32,175); +INSERT INTO product_slots VALUES(32,176); +INSERT INTO product_slots VALUES(32,177); +INSERT INTO product_slots VALUES(32,178); +INSERT INTO product_slots VALUES(32,179); +INSERT INTO product_slots VALUES(32,180); +INSERT INTO product_slots VALUES(32,181); +INSERT INTO product_slots VALUES(32,182); +INSERT INTO product_slots VALUES(32,183); +INSERT INTO product_slots VALUES(32,184); +INSERT INTO product_slots VALUES(32,185); +INSERT INTO product_slots VALUES(32,186); +INSERT INTO product_slots VALUES(32,187); +INSERT INTO product_slots VALUES(32,188); +INSERT INTO product_slots VALUES(32,189); +INSERT INTO product_slots VALUES(32,190); +INSERT INTO product_slots VALUES(32,191); +INSERT INTO product_slots VALUES(32,192); +INSERT INTO product_slots VALUES(32,193); +INSERT INTO product_slots VALUES(32,194); +INSERT INTO product_slots VALUES(32,195); +INSERT INTO product_slots VALUES(32,196); +INSERT INTO product_slots VALUES(32,197); +INSERT INTO product_slots VALUES(32,198); +INSERT INTO product_slots VALUES(32,199); +INSERT INTO product_slots VALUES(32,200); +INSERT INTO product_slots VALUES(32,201); +INSERT INTO product_slots VALUES(32,202); +INSERT INTO product_slots VALUES(32,203); +INSERT INTO product_slots VALUES(32,204); +INSERT INTO product_slots VALUES(32,205); +INSERT INTO product_slots VALUES(32,206); +INSERT INTO product_slots VALUES(32,207); +INSERT INTO product_slots VALUES(32,208); +INSERT INTO product_slots VALUES(32,209); +INSERT INTO product_slots VALUES(32,210); +INSERT INTO product_slots VALUES(32,211); +INSERT INTO product_slots VALUES(32,212); +INSERT INTO product_slots VALUES(32,213); +INSERT INTO product_slots VALUES(32,214); +INSERT INTO product_slots VALUES(32,215); +INSERT INTO product_slots VALUES(32,216); +INSERT INTO product_slots VALUES(32,217); +INSERT INTO product_slots VALUES(32,218); +INSERT INTO product_slots VALUES(32,219); +INSERT INTO product_slots VALUES(32,220); +INSERT INTO product_slots VALUES(32,221); +INSERT INTO product_slots VALUES(32,222); +INSERT INTO product_slots VALUES(32,223); +INSERT INTO product_slots VALUES(32,224); +INSERT INTO product_slots VALUES(32,225); +INSERT INTO product_slots VALUES(32,226); +INSERT INTO product_slots VALUES(32,227); +INSERT INTO product_slots VALUES(32,228); +INSERT INTO product_slots VALUES(32,229); +INSERT INTO product_slots VALUES(32,230); +INSERT INTO product_slots VALUES(32,231); +INSERT INTO product_slots VALUES(32,232); +INSERT INTO product_slots VALUES(32,233); +INSERT INTO product_slots VALUES(32,234); +INSERT INTO product_slots VALUES(32,235); +INSERT INTO product_slots VALUES(32,236); +INSERT INTO product_slots VALUES(32,237); +INSERT INTO product_slots VALUES(32,238); +INSERT INTO product_slots VALUES(32,239); +INSERT INTO product_slots VALUES(32,240); +INSERT INTO product_slots VALUES(32,241); +INSERT INTO product_slots VALUES(32,242); +INSERT INTO product_slots VALUES(32,243); +INSERT INTO product_slots VALUES(32,244); +INSERT INTO product_slots VALUES(32,274); +INSERT INTO product_slots VALUES(32,275); +INSERT INTO product_slots VALUES(32,279); +INSERT INTO product_slots VALUES(32,280); +INSERT INTO product_slots VALUES(32,281); +INSERT INTO product_slots VALUES(32,282); +INSERT INTO product_slots VALUES(32,283); +INSERT INTO product_slots VALUES(32,284); +INSERT INTO product_slots VALUES(32,285); +INSERT INTO product_slots VALUES(32,286); +INSERT INTO product_slots VALUES(32,287); +INSERT INTO product_slots VALUES(33,18); +INSERT INTO product_slots VALUES(33,20); +INSERT INTO product_slots VALUES(33,21); +INSERT INTO product_slots VALUES(33,33); +INSERT INTO product_slots VALUES(33,35); +INSERT INTO product_slots VALUES(33,37); +INSERT INTO product_slots VALUES(33,38); +INSERT INTO product_slots VALUES(33,39); +INSERT INTO product_slots VALUES(33,40); +INSERT INTO product_slots VALUES(33,44); +INSERT INTO product_slots VALUES(33,46); +INSERT INTO product_slots VALUES(33,47); +INSERT INTO product_slots VALUES(33,48); +INSERT INTO product_slots VALUES(33,49); +INSERT INTO product_slots VALUES(33,50); +INSERT INTO product_slots VALUES(33,51); +INSERT INTO product_slots VALUES(33,52); +INSERT INTO product_slots VALUES(33,53); +INSERT INTO product_slots VALUES(33,54); +INSERT INTO product_slots VALUES(33,55); +INSERT INTO product_slots VALUES(33,56); +INSERT INTO product_slots VALUES(33,57); +INSERT INTO product_slots VALUES(33,58); +INSERT INTO product_slots VALUES(33,59); +INSERT INTO product_slots VALUES(33,60); +INSERT INTO product_slots VALUES(33,61); +INSERT INTO product_slots VALUES(33,62); +INSERT INTO product_slots VALUES(33,63); +INSERT INTO product_slots VALUES(33,64); +INSERT INTO product_slots VALUES(33,65); +INSERT INTO product_slots VALUES(33,66); +INSERT INTO product_slots VALUES(33,67); +INSERT INTO product_slots VALUES(33,68); +INSERT INTO product_slots VALUES(33,69); +INSERT INTO product_slots VALUES(33,70); +INSERT INTO product_slots VALUES(33,71); +INSERT INTO product_slots VALUES(33,72); +INSERT INTO product_slots VALUES(33,73); +INSERT INTO product_slots VALUES(33,74); +INSERT INTO product_slots VALUES(33,75); +INSERT INTO product_slots VALUES(33,76); +INSERT INTO product_slots VALUES(33,77); +INSERT INTO product_slots VALUES(33,78); +INSERT INTO product_slots VALUES(33,79); +INSERT INTO product_slots VALUES(33,80); +INSERT INTO product_slots VALUES(33,81); +INSERT INTO product_slots VALUES(33,82); +INSERT INTO product_slots VALUES(33,83); +INSERT INTO product_slots VALUES(33,84); +INSERT INTO product_slots VALUES(33,85); +INSERT INTO product_slots VALUES(33,86); +INSERT INTO product_slots VALUES(33,87); +INSERT INTO product_slots VALUES(33,88); +INSERT INTO product_slots VALUES(33,89); +INSERT INTO product_slots VALUES(33,90); +INSERT INTO product_slots VALUES(33,91); +INSERT INTO product_slots VALUES(33,92); +INSERT INTO product_slots VALUES(33,93); +INSERT INTO product_slots VALUES(33,94); +INSERT INTO product_slots VALUES(33,95); +INSERT INTO product_slots VALUES(33,96); +INSERT INTO product_slots VALUES(33,97); +INSERT INTO product_slots VALUES(33,98); +INSERT INTO product_slots VALUES(33,99); +INSERT INTO product_slots VALUES(33,100); +INSERT INTO product_slots VALUES(33,101); +INSERT INTO product_slots VALUES(33,102); +INSERT INTO product_slots VALUES(33,103); +INSERT INTO product_slots VALUES(33,104); +INSERT INTO product_slots VALUES(33,105); +INSERT INTO product_slots VALUES(33,106); +INSERT INTO product_slots VALUES(33,107); +INSERT INTO product_slots VALUES(33,108); +INSERT INTO product_slots VALUES(33,109); +INSERT INTO product_slots VALUES(33,110); +INSERT INTO product_slots VALUES(33,111); +INSERT INTO product_slots VALUES(33,112); +INSERT INTO product_slots VALUES(33,113); +INSERT INTO product_slots VALUES(33,114); +INSERT INTO product_slots VALUES(33,115); +INSERT INTO product_slots VALUES(33,116); +INSERT INTO product_slots VALUES(33,117); +INSERT INTO product_slots VALUES(33,118); +INSERT INTO product_slots VALUES(33,119); +INSERT INTO product_slots VALUES(33,120); +INSERT INTO product_slots VALUES(33,121); +INSERT INTO product_slots VALUES(33,122); +INSERT INTO product_slots VALUES(33,123); +INSERT INTO product_slots VALUES(33,124); +INSERT INTO product_slots VALUES(33,125); +INSERT INTO product_slots VALUES(33,126); +INSERT INTO product_slots VALUES(33,127); +INSERT INTO product_slots VALUES(33,128); +INSERT INTO product_slots VALUES(33,129); +INSERT INTO product_slots VALUES(33,130); +INSERT INTO product_slots VALUES(33,131); +INSERT INTO product_slots VALUES(33,132); +INSERT INTO product_slots VALUES(33,133); +INSERT INTO product_slots VALUES(33,134); +INSERT INTO product_slots VALUES(33,135); +INSERT INTO product_slots VALUES(33,136); +INSERT INTO product_slots VALUES(33,137); +INSERT INTO product_slots VALUES(33,138); +INSERT INTO product_slots VALUES(33,139); +INSERT INTO product_slots VALUES(33,140); +INSERT INTO product_slots VALUES(33,141); +INSERT INTO product_slots VALUES(33,142); +INSERT INTO product_slots VALUES(33,143); +INSERT INTO product_slots VALUES(33,144); +INSERT INTO product_slots VALUES(33,145); +INSERT INTO product_slots VALUES(33,146); +INSERT INTO product_slots VALUES(33,147); +INSERT INTO product_slots VALUES(33,148); +INSERT INTO product_slots VALUES(33,149); +INSERT INTO product_slots VALUES(33,150); +INSERT INTO product_slots VALUES(33,151); +INSERT INTO product_slots VALUES(33,152); +INSERT INTO product_slots VALUES(33,153); +INSERT INTO product_slots VALUES(33,154); +INSERT INTO product_slots VALUES(33,155); +INSERT INTO product_slots VALUES(33,156); +INSERT INTO product_slots VALUES(33,157); +INSERT INTO product_slots VALUES(33,158); +INSERT INTO product_slots VALUES(33,159); +INSERT INTO product_slots VALUES(33,160); +INSERT INTO product_slots VALUES(33,161); +INSERT INTO product_slots VALUES(33,162); +INSERT INTO product_slots VALUES(33,163); +INSERT INTO product_slots VALUES(33,164); +INSERT INTO product_slots VALUES(33,165); +INSERT INTO product_slots VALUES(33,166); +INSERT INTO product_slots VALUES(33,167); +INSERT INTO product_slots VALUES(33,168); +INSERT INTO product_slots VALUES(33,169); +INSERT INTO product_slots VALUES(33,170); +INSERT INTO product_slots VALUES(33,171); +INSERT INTO product_slots VALUES(33,172); +INSERT INTO product_slots VALUES(33,173); +INSERT INTO product_slots VALUES(33,174); +INSERT INTO product_slots VALUES(33,175); +INSERT INTO product_slots VALUES(33,176); +INSERT INTO product_slots VALUES(33,177); +INSERT INTO product_slots VALUES(33,178); +INSERT INTO product_slots VALUES(33,179); +INSERT INTO product_slots VALUES(33,180); +INSERT INTO product_slots VALUES(33,181); +INSERT INTO product_slots VALUES(33,182); +INSERT INTO product_slots VALUES(33,183); +INSERT INTO product_slots VALUES(33,184); +INSERT INTO product_slots VALUES(33,185); +INSERT INTO product_slots VALUES(33,186); +INSERT INTO product_slots VALUES(33,187); +INSERT INTO product_slots VALUES(33,188); +INSERT INTO product_slots VALUES(33,189); +INSERT INTO product_slots VALUES(33,190); +INSERT INTO product_slots VALUES(33,191); +INSERT INTO product_slots VALUES(33,192); +INSERT INTO product_slots VALUES(33,193); +INSERT INTO product_slots VALUES(33,194); +INSERT INTO product_slots VALUES(33,195); +INSERT INTO product_slots VALUES(33,196); +INSERT INTO product_slots VALUES(33,197); +INSERT INTO product_slots VALUES(33,198); +INSERT INTO product_slots VALUES(33,199); +INSERT INTO product_slots VALUES(33,200); +INSERT INTO product_slots VALUES(33,201); +INSERT INTO product_slots VALUES(33,202); +INSERT INTO product_slots VALUES(33,203); +INSERT INTO product_slots VALUES(33,204); +INSERT INTO product_slots VALUES(33,205); +INSERT INTO product_slots VALUES(33,206); +INSERT INTO product_slots VALUES(33,207); +INSERT INTO product_slots VALUES(33,208); +INSERT INTO product_slots VALUES(33,209); +INSERT INTO product_slots VALUES(33,210); +INSERT INTO product_slots VALUES(33,211); +INSERT INTO product_slots VALUES(33,212); +INSERT INTO product_slots VALUES(33,213); +INSERT INTO product_slots VALUES(33,214); +INSERT INTO product_slots VALUES(33,215); +INSERT INTO product_slots VALUES(33,216); +INSERT INTO product_slots VALUES(33,217); +INSERT INTO product_slots VALUES(33,218); +INSERT INTO product_slots VALUES(33,219); +INSERT INTO product_slots VALUES(33,220); +INSERT INTO product_slots VALUES(33,221); +INSERT INTO product_slots VALUES(33,222); +INSERT INTO product_slots VALUES(33,223); +INSERT INTO product_slots VALUES(33,224); +INSERT INTO product_slots VALUES(33,225); +INSERT INTO product_slots VALUES(33,226); +INSERT INTO product_slots VALUES(33,227); +INSERT INTO product_slots VALUES(33,228); +INSERT INTO product_slots VALUES(33,229); +INSERT INTO product_slots VALUES(33,230); +INSERT INTO product_slots VALUES(33,231); +INSERT INTO product_slots VALUES(33,232); +INSERT INTO product_slots VALUES(33,233); +INSERT INTO product_slots VALUES(33,234); +INSERT INTO product_slots VALUES(33,235); +INSERT INTO product_slots VALUES(33,236); +INSERT INTO product_slots VALUES(33,237); +INSERT INTO product_slots VALUES(33,238); +INSERT INTO product_slots VALUES(33,239); +INSERT INTO product_slots VALUES(33,240); +INSERT INTO product_slots VALUES(33,241); +INSERT INTO product_slots VALUES(33,242); +INSERT INTO product_slots VALUES(33,243); +INSERT INTO product_slots VALUES(33,244); +INSERT INTO product_slots VALUES(33,274); +INSERT INTO product_slots VALUES(33,275); +INSERT INTO product_slots VALUES(33,279); +INSERT INTO product_slots VALUES(33,280); +INSERT INTO product_slots VALUES(33,281); +INSERT INTO product_slots VALUES(33,282); +INSERT INTO product_slots VALUES(33,283); +INSERT INTO product_slots VALUES(33,284); +INSERT INTO product_slots VALUES(33,285); +INSERT INTO product_slots VALUES(33,286); +INSERT INTO product_slots VALUES(33,287); +INSERT INTO product_slots VALUES(34,18); +INSERT INTO product_slots VALUES(34,20); +INSERT INTO product_slots VALUES(34,21); +INSERT INTO product_slots VALUES(34,33); +INSERT INTO product_slots VALUES(34,35); +INSERT INTO product_slots VALUES(34,37); +INSERT INTO product_slots VALUES(34,38); +INSERT INTO product_slots VALUES(34,40); +INSERT INTO product_slots VALUES(34,82); +INSERT INTO product_slots VALUES(34,87); +INSERT INTO product_slots VALUES(34,279); +INSERT INTO product_slots VALUES(35,18); +INSERT INTO product_slots VALUES(35,19); +INSERT INTO product_slots VALUES(35,20); +INSERT INTO product_slots VALUES(35,21); +INSERT INTO product_slots VALUES(35,22); +INSERT INTO product_slots VALUES(35,33); +INSERT INTO product_slots VALUES(35,35); +INSERT INTO product_slots VALUES(35,37); +INSERT INTO product_slots VALUES(35,38); +INSERT INTO product_slots VALUES(35,39); +INSERT INTO product_slots VALUES(35,40); +INSERT INTO product_slots VALUES(35,41); +INSERT INTO product_slots VALUES(35,43); +INSERT INTO product_slots VALUES(35,45); +INSERT INTO product_slots VALUES(35,46); +INSERT INTO product_slots VALUES(35,47); +INSERT INTO product_slots VALUES(35,48); +INSERT INTO product_slots VALUES(35,49); +INSERT INTO product_slots VALUES(35,50); +INSERT INTO product_slots VALUES(35,51); +INSERT INTO product_slots VALUES(35,52); +INSERT INTO product_slots VALUES(35,53); +INSERT INTO product_slots VALUES(35,54); +INSERT INTO product_slots VALUES(35,55); +INSERT INTO product_slots VALUES(35,56); +INSERT INTO product_slots VALUES(35,57); +INSERT INTO product_slots VALUES(35,58); +INSERT INTO product_slots VALUES(35,59); +INSERT INTO product_slots VALUES(35,60); +INSERT INTO product_slots VALUES(35,61); +INSERT INTO product_slots VALUES(35,62); +INSERT INTO product_slots VALUES(35,63); +INSERT INTO product_slots VALUES(35,64); +INSERT INTO product_slots VALUES(35,65); +INSERT INTO product_slots VALUES(35,66); +INSERT INTO product_slots VALUES(35,67); +INSERT INTO product_slots VALUES(35,68); +INSERT INTO product_slots VALUES(35,69); +INSERT INTO product_slots VALUES(35,70); +INSERT INTO product_slots VALUES(35,71); +INSERT INTO product_slots VALUES(35,74); +INSERT INTO product_slots VALUES(35,75); +INSERT INTO product_slots VALUES(35,76); +INSERT INTO product_slots VALUES(35,77); +INSERT INTO product_slots VALUES(35,78); +INSERT INTO product_slots VALUES(35,81); +INSERT INTO product_slots VALUES(35,82); +INSERT INTO product_slots VALUES(35,83); +INSERT INTO product_slots VALUES(35,84); +INSERT INTO product_slots VALUES(35,87); +INSERT INTO product_slots VALUES(35,88); +INSERT INTO product_slots VALUES(35,89); +INSERT INTO product_slots VALUES(35,90); +INSERT INTO product_slots VALUES(35,91); +INSERT INTO product_slots VALUES(35,95); +INSERT INTO product_slots VALUES(35,96); +INSERT INTO product_slots VALUES(35,97); +INSERT INTO product_slots VALUES(35,98); +INSERT INTO product_slots VALUES(35,101); +INSERT INTO product_slots VALUES(35,102); +INSERT INTO product_slots VALUES(35,103); +INSERT INTO product_slots VALUES(35,104); +INSERT INTO product_slots VALUES(35,109); +INSERT INTO product_slots VALUES(35,110); +INSERT INTO product_slots VALUES(35,111); +INSERT INTO product_slots VALUES(35,112); +INSERT INTO product_slots VALUES(35,116); +INSERT INTO product_slots VALUES(35,117); +INSERT INTO product_slots VALUES(35,118); +INSERT INTO product_slots VALUES(35,119); +INSERT INTO product_slots VALUES(35,120); +INSERT INTO product_slots VALUES(35,123); +INSERT INTO product_slots VALUES(35,124); +INSERT INTO product_slots VALUES(35,125); +INSERT INTO product_slots VALUES(35,126); +INSERT INTO product_slots VALUES(35,130); +INSERT INTO product_slots VALUES(35,131); +INSERT INTO product_slots VALUES(35,132); +INSERT INTO product_slots VALUES(35,133); +INSERT INTO product_slots VALUES(35,137); +INSERT INTO product_slots VALUES(35,138); +INSERT INTO product_slots VALUES(35,139); +INSERT INTO product_slots VALUES(35,140); +INSERT INTO product_slots VALUES(35,144); +INSERT INTO product_slots VALUES(35,145); +INSERT INTO product_slots VALUES(35,146); +INSERT INTO product_slots VALUES(35,147); +INSERT INTO product_slots VALUES(35,148); +INSERT INTO product_slots VALUES(35,149); +INSERT INTO product_slots VALUES(35,150); +INSERT INTO product_slots VALUES(35,151); +INSERT INTO product_slots VALUES(35,155); +INSERT INTO product_slots VALUES(35,156); +INSERT INTO product_slots VALUES(35,157); +INSERT INTO product_slots VALUES(35,158); +INSERT INTO product_slots VALUES(35,162); +INSERT INTO product_slots VALUES(35,163); +INSERT INTO product_slots VALUES(35,164); +INSERT INTO product_slots VALUES(35,165); +INSERT INTO product_slots VALUES(35,166); +INSERT INTO product_slots VALUES(35,169); +INSERT INTO product_slots VALUES(35,170); +INSERT INTO product_slots VALUES(35,171); +INSERT INTO product_slots VALUES(35,172); +INSERT INTO product_slots VALUES(35,176); +INSERT INTO product_slots VALUES(35,177); +INSERT INTO product_slots VALUES(35,178); +INSERT INTO product_slots VALUES(35,179); +INSERT INTO product_slots VALUES(35,183); +INSERT INTO product_slots VALUES(35,184); +INSERT INTO product_slots VALUES(35,185); +INSERT INTO product_slots VALUES(35,186); +INSERT INTO product_slots VALUES(35,187); +INSERT INTO product_slots VALUES(35,188); +INSERT INTO product_slots VALUES(35,189); +INSERT INTO product_slots VALUES(35,190); +INSERT INTO product_slots VALUES(35,191); +INSERT INTO product_slots VALUES(35,192); +INSERT INTO product_slots VALUES(35,193); +INSERT INTO product_slots VALUES(35,194); +INSERT INTO product_slots VALUES(35,198); +INSERT INTO product_slots VALUES(35,199); +INSERT INTO product_slots VALUES(35,200); +INSERT INTO product_slots VALUES(35,201); +INSERT INTO product_slots VALUES(35,202); +INSERT INTO product_slots VALUES(35,203); +INSERT INTO product_slots VALUES(35,205); +INSERT INTO product_slots VALUES(35,208); +INSERT INTO product_slots VALUES(35,209); +INSERT INTO product_slots VALUES(35,210); +INSERT INTO product_slots VALUES(35,211); +INSERT INTO product_slots VALUES(35,216); +INSERT INTO product_slots VALUES(35,217); +INSERT INTO product_slots VALUES(35,218); +INSERT INTO product_slots VALUES(35,219); +INSERT INTO product_slots VALUES(35,220); +INSERT INTO product_slots VALUES(35,223); +INSERT INTO product_slots VALUES(35,224); +INSERT INTO product_slots VALUES(35,225); +INSERT INTO product_slots VALUES(35,226); +INSERT INTO product_slots VALUES(35,230); +INSERT INTO product_slots VALUES(35,231); +INSERT INTO product_slots VALUES(35,232); +INSERT INTO product_slots VALUES(35,234); +INSERT INTO product_slots VALUES(35,237); +INSERT INTO product_slots VALUES(35,238); +INSERT INTO product_slots VALUES(35,239); +INSERT INTO product_slots VALUES(35,240); +INSERT INTO product_slots VALUES(35,274); +INSERT INTO product_slots VALUES(35,275); +INSERT INTO product_slots VALUES(35,277); +INSERT INTO product_slots VALUES(35,278); +INSERT INTO product_slots VALUES(35,279); +INSERT INTO product_slots VALUES(36,18); +INSERT INTO product_slots VALUES(36,19); +INSERT INTO product_slots VALUES(36,20); +INSERT INTO product_slots VALUES(36,21); +INSERT INTO product_slots VALUES(36,22); +INSERT INTO product_slots VALUES(36,23); +INSERT INTO product_slots VALUES(36,31); +INSERT INTO product_slots VALUES(36,33); +INSERT INTO product_slots VALUES(36,35); +INSERT INTO product_slots VALUES(36,37); +INSERT INTO product_slots VALUES(36,38); +INSERT INTO product_slots VALUES(36,39); +INSERT INTO product_slots VALUES(36,40); +INSERT INTO product_slots VALUES(36,41); +INSERT INTO product_slots VALUES(36,43); +INSERT INTO product_slots VALUES(36,45); +INSERT INTO product_slots VALUES(36,46); +INSERT INTO product_slots VALUES(36,47); +INSERT INTO product_slots VALUES(36,48); +INSERT INTO product_slots VALUES(36,49); +INSERT INTO product_slots VALUES(36,50); +INSERT INTO product_slots VALUES(36,51); +INSERT INTO product_slots VALUES(36,52); +INSERT INTO product_slots VALUES(36,53); +INSERT INTO product_slots VALUES(36,54); +INSERT INTO product_slots VALUES(36,55); +INSERT INTO product_slots VALUES(36,56); +INSERT INTO product_slots VALUES(36,57); +INSERT INTO product_slots VALUES(36,58); +INSERT INTO product_slots VALUES(36,59); +INSERT INTO product_slots VALUES(36,60); +INSERT INTO product_slots VALUES(36,61); +INSERT INTO product_slots VALUES(36,62); +INSERT INTO product_slots VALUES(36,63); +INSERT INTO product_slots VALUES(36,64); +INSERT INTO product_slots VALUES(36,65); +INSERT INTO product_slots VALUES(36,66); +INSERT INTO product_slots VALUES(36,67); +INSERT INTO product_slots VALUES(36,68); +INSERT INTO product_slots VALUES(36,69); +INSERT INTO product_slots VALUES(36,70); +INSERT INTO product_slots VALUES(36,71); +INSERT INTO product_slots VALUES(36,72); +INSERT INTO product_slots VALUES(36,73); +INSERT INTO product_slots VALUES(36,74); +INSERT INTO product_slots VALUES(36,75); +INSERT INTO product_slots VALUES(36,76); +INSERT INTO product_slots VALUES(36,77); +INSERT INTO product_slots VALUES(36,78); +INSERT INTO product_slots VALUES(36,79); +INSERT INTO product_slots VALUES(36,80); +INSERT INTO product_slots VALUES(36,81); +INSERT INTO product_slots VALUES(36,82); +INSERT INTO product_slots VALUES(36,83); +INSERT INTO product_slots VALUES(36,84); +INSERT INTO product_slots VALUES(36,85); +INSERT INTO product_slots VALUES(36,86); +INSERT INTO product_slots VALUES(36,87); +INSERT INTO product_slots VALUES(36,88); +INSERT INTO product_slots VALUES(36,89); +INSERT INTO product_slots VALUES(36,90); +INSERT INTO product_slots VALUES(36,91); +INSERT INTO product_slots VALUES(36,92); +INSERT INTO product_slots VALUES(36,93); +INSERT INTO product_slots VALUES(36,94); +INSERT INTO product_slots VALUES(36,95); +INSERT INTO product_slots VALUES(36,96); +INSERT INTO product_slots VALUES(36,97); +INSERT INTO product_slots VALUES(36,98); +INSERT INTO product_slots VALUES(36,99); +INSERT INTO product_slots VALUES(36,100); +INSERT INTO product_slots VALUES(36,101); +INSERT INTO product_slots VALUES(36,102); +INSERT INTO product_slots VALUES(36,103); +INSERT INTO product_slots VALUES(36,104); +INSERT INTO product_slots VALUES(36,105); +INSERT INTO product_slots VALUES(36,106); +INSERT INTO product_slots VALUES(36,107); +INSERT INTO product_slots VALUES(36,108); +INSERT INTO product_slots VALUES(36,109); +INSERT INTO product_slots VALUES(36,110); +INSERT INTO product_slots VALUES(36,111); +INSERT INTO product_slots VALUES(36,112); +INSERT INTO product_slots VALUES(36,113); +INSERT INTO product_slots VALUES(36,114); +INSERT INTO product_slots VALUES(36,115); +INSERT INTO product_slots VALUES(36,116); +INSERT INTO product_slots VALUES(36,117); +INSERT INTO product_slots VALUES(36,118); +INSERT INTO product_slots VALUES(36,119); +INSERT INTO product_slots VALUES(36,120); +INSERT INTO product_slots VALUES(36,121); +INSERT INTO product_slots VALUES(36,122); +INSERT INTO product_slots VALUES(36,123); +INSERT INTO product_slots VALUES(36,124); +INSERT INTO product_slots VALUES(36,125); +INSERT INTO product_slots VALUES(36,126); +INSERT INTO product_slots VALUES(36,127); +INSERT INTO product_slots VALUES(36,128); +INSERT INTO product_slots VALUES(36,129); +INSERT INTO product_slots VALUES(36,130); +INSERT INTO product_slots VALUES(36,131); +INSERT INTO product_slots VALUES(36,132); +INSERT INTO product_slots VALUES(36,133); +INSERT INTO product_slots VALUES(36,134); +INSERT INTO product_slots VALUES(36,135); +INSERT INTO product_slots VALUES(36,136); +INSERT INTO product_slots VALUES(36,137); +INSERT INTO product_slots VALUES(36,138); +INSERT INTO product_slots VALUES(36,139); +INSERT INTO product_slots VALUES(36,140); +INSERT INTO product_slots VALUES(36,141); +INSERT INTO product_slots VALUES(36,142); +INSERT INTO product_slots VALUES(36,143); +INSERT INTO product_slots VALUES(36,144); +INSERT INTO product_slots VALUES(36,145); +INSERT INTO product_slots VALUES(36,146); +INSERT INTO product_slots VALUES(36,147); +INSERT INTO product_slots VALUES(36,148); +INSERT INTO product_slots VALUES(36,149); +INSERT INTO product_slots VALUES(36,150); +INSERT INTO product_slots VALUES(36,151); +INSERT INTO product_slots VALUES(36,152); +INSERT INTO product_slots VALUES(36,153); +INSERT INTO product_slots VALUES(36,154); +INSERT INTO product_slots VALUES(36,155); +INSERT INTO product_slots VALUES(36,156); +INSERT INTO product_slots VALUES(36,157); +INSERT INTO product_slots VALUES(36,158); +INSERT INTO product_slots VALUES(36,159); +INSERT INTO product_slots VALUES(36,160); +INSERT INTO product_slots VALUES(36,161); +INSERT INTO product_slots VALUES(36,162); +INSERT INTO product_slots VALUES(36,163); +INSERT INTO product_slots VALUES(36,164); +INSERT INTO product_slots VALUES(36,165); +INSERT INTO product_slots VALUES(36,166); +INSERT INTO product_slots VALUES(36,167); +INSERT INTO product_slots VALUES(36,168); +INSERT INTO product_slots VALUES(36,169); +INSERT INTO product_slots VALUES(36,170); +INSERT INTO product_slots VALUES(36,171); +INSERT INTO product_slots VALUES(36,172); +INSERT INTO product_slots VALUES(36,173); +INSERT INTO product_slots VALUES(36,174); +INSERT INTO product_slots VALUES(36,175); +INSERT INTO product_slots VALUES(36,176); +INSERT INTO product_slots VALUES(36,177); +INSERT INTO product_slots VALUES(36,178); +INSERT INTO product_slots VALUES(36,179); +INSERT INTO product_slots VALUES(36,180); +INSERT INTO product_slots VALUES(36,181); +INSERT INTO product_slots VALUES(36,182); +INSERT INTO product_slots VALUES(36,183); +INSERT INTO product_slots VALUES(36,184); +INSERT INTO product_slots VALUES(36,185); +INSERT INTO product_slots VALUES(36,186); +INSERT INTO product_slots VALUES(36,187); +INSERT INTO product_slots VALUES(36,188); +INSERT INTO product_slots VALUES(36,189); +INSERT INTO product_slots VALUES(36,190); +INSERT INTO product_slots VALUES(36,191); +INSERT INTO product_slots VALUES(36,192); +INSERT INTO product_slots VALUES(36,193); +INSERT INTO product_slots VALUES(36,194); +INSERT INTO product_slots VALUES(36,195); +INSERT INTO product_slots VALUES(36,196); +INSERT INTO product_slots VALUES(36,197); +INSERT INTO product_slots VALUES(36,198); +INSERT INTO product_slots VALUES(36,199); +INSERT INTO product_slots VALUES(36,200); +INSERT INTO product_slots VALUES(36,201); +INSERT INTO product_slots VALUES(36,202); +INSERT INTO product_slots VALUES(36,203); +INSERT INTO product_slots VALUES(36,204); +INSERT INTO product_slots VALUES(36,205); +INSERT INTO product_slots VALUES(36,206); +INSERT INTO product_slots VALUES(36,207); +INSERT INTO product_slots VALUES(36,208); +INSERT INTO product_slots VALUES(36,209); +INSERT INTO product_slots VALUES(36,210); +INSERT INTO product_slots VALUES(36,211); +INSERT INTO product_slots VALUES(36,212); +INSERT INTO product_slots VALUES(36,213); +INSERT INTO product_slots VALUES(36,214); +INSERT INTO product_slots VALUES(36,215); +INSERT INTO product_slots VALUES(36,216); +INSERT INTO product_slots VALUES(36,217); +INSERT INTO product_slots VALUES(36,218); +INSERT INTO product_slots VALUES(36,219); +INSERT INTO product_slots VALUES(36,220); +INSERT INTO product_slots VALUES(36,221); +INSERT INTO product_slots VALUES(36,222); +INSERT INTO product_slots VALUES(36,223); +INSERT INTO product_slots VALUES(36,224); +INSERT INTO product_slots VALUES(36,225); +INSERT INTO product_slots VALUES(36,226); +INSERT INTO product_slots VALUES(36,227); +INSERT INTO product_slots VALUES(36,228); +INSERT INTO product_slots VALUES(36,229); +INSERT INTO product_slots VALUES(36,230); +INSERT INTO product_slots VALUES(36,231); +INSERT INTO product_slots VALUES(36,232); +INSERT INTO product_slots VALUES(36,234); +INSERT INTO product_slots VALUES(36,235); +INSERT INTO product_slots VALUES(36,236); +INSERT INTO product_slots VALUES(36,237); +INSERT INTO product_slots VALUES(36,238); +INSERT INTO product_slots VALUES(36,239); +INSERT INTO product_slots VALUES(36,240); +INSERT INTO product_slots VALUES(36,241); +INSERT INTO product_slots VALUES(36,242); +INSERT INTO product_slots VALUES(36,243); +INSERT INTO product_slots VALUES(36,244); +INSERT INTO product_slots VALUES(36,274); +INSERT INTO product_slots VALUES(36,275); +INSERT INTO product_slots VALUES(36,279); +INSERT INTO product_slots VALUES(36,280); +INSERT INTO product_slots VALUES(36,281); +INSERT INTO product_slots VALUES(36,282); +INSERT INTO product_slots VALUES(37,18); +INSERT INTO product_slots VALUES(37,20); +INSERT INTO product_slots VALUES(37,21); +INSERT INTO product_slots VALUES(37,33); +INSERT INTO product_slots VALUES(37,35); +INSERT INTO product_slots VALUES(37,37); +INSERT INTO product_slots VALUES(37,38); +INSERT INTO product_slots VALUES(37,39); +INSERT INTO product_slots VALUES(37,40); +INSERT INTO product_slots VALUES(37,41); +INSERT INTO product_slots VALUES(37,43); +INSERT INTO product_slots VALUES(37,44); +INSERT INTO product_slots VALUES(37,45); +INSERT INTO product_slots VALUES(37,46); +INSERT INTO product_slots VALUES(37,47); +INSERT INTO product_slots VALUES(37,48); +INSERT INTO product_slots VALUES(37,49); +INSERT INTO product_slots VALUES(37,50); +INSERT INTO product_slots VALUES(37,51); +INSERT INTO product_slots VALUES(37,52); +INSERT INTO product_slots VALUES(37,53); +INSERT INTO product_slots VALUES(37,54); +INSERT INTO product_slots VALUES(37,55); +INSERT INTO product_slots VALUES(37,56); +INSERT INTO product_slots VALUES(37,57); +INSERT INTO product_slots VALUES(37,58); +INSERT INTO product_slots VALUES(37,59); +INSERT INTO product_slots VALUES(37,60); +INSERT INTO product_slots VALUES(37,61); +INSERT INTO product_slots VALUES(37,62); +INSERT INTO product_slots VALUES(37,63); +INSERT INTO product_slots VALUES(37,64); +INSERT INTO product_slots VALUES(37,65); +INSERT INTO product_slots VALUES(37,66); +INSERT INTO product_slots VALUES(37,67); +INSERT INTO product_slots VALUES(37,68); +INSERT INTO product_slots VALUES(37,69); +INSERT INTO product_slots VALUES(37,70); +INSERT INTO product_slots VALUES(37,71); +INSERT INTO product_slots VALUES(37,72); +INSERT INTO product_slots VALUES(37,73); +INSERT INTO product_slots VALUES(37,74); +INSERT INTO product_slots VALUES(37,75); +INSERT INTO product_slots VALUES(37,76); +INSERT INTO product_slots VALUES(37,77); +INSERT INTO product_slots VALUES(37,78); +INSERT INTO product_slots VALUES(37,79); +INSERT INTO product_slots VALUES(37,80); +INSERT INTO product_slots VALUES(37,81); +INSERT INTO product_slots VALUES(37,82); +INSERT INTO product_slots VALUES(37,83); +INSERT INTO product_slots VALUES(37,84); +INSERT INTO product_slots VALUES(37,85); +INSERT INTO product_slots VALUES(37,86); +INSERT INTO product_slots VALUES(37,87); +INSERT INTO product_slots VALUES(37,88); +INSERT INTO product_slots VALUES(37,89); +INSERT INTO product_slots VALUES(37,90); +INSERT INTO product_slots VALUES(37,91); +INSERT INTO product_slots VALUES(37,92); +INSERT INTO product_slots VALUES(37,93); +INSERT INTO product_slots VALUES(37,94); +INSERT INTO product_slots VALUES(37,95); +INSERT INTO product_slots VALUES(37,96); +INSERT INTO product_slots VALUES(37,97); +INSERT INTO product_slots VALUES(37,98); +INSERT INTO product_slots VALUES(37,99); +INSERT INTO product_slots VALUES(37,100); +INSERT INTO product_slots VALUES(37,101); +INSERT INTO product_slots VALUES(37,102); +INSERT INTO product_slots VALUES(37,103); +INSERT INTO product_slots VALUES(37,104); +INSERT INTO product_slots VALUES(37,105); +INSERT INTO product_slots VALUES(37,106); +INSERT INTO product_slots VALUES(37,107); +INSERT INTO product_slots VALUES(37,108); +INSERT INTO product_slots VALUES(37,109); +INSERT INTO product_slots VALUES(37,110); +INSERT INTO product_slots VALUES(37,111); +INSERT INTO product_slots VALUES(37,112); +INSERT INTO product_slots VALUES(37,113); +INSERT INTO product_slots VALUES(37,114); +INSERT INTO product_slots VALUES(37,115); +INSERT INTO product_slots VALUES(37,116); +INSERT INTO product_slots VALUES(37,117); +INSERT INTO product_slots VALUES(37,118); +INSERT INTO product_slots VALUES(37,119); +INSERT INTO product_slots VALUES(37,120); +INSERT INTO product_slots VALUES(37,121); +INSERT INTO product_slots VALUES(37,122); +INSERT INTO product_slots VALUES(37,123); +INSERT INTO product_slots VALUES(37,124); +INSERT INTO product_slots VALUES(37,125); +INSERT INTO product_slots VALUES(37,126); +INSERT INTO product_slots VALUES(37,127); +INSERT INTO product_slots VALUES(37,128); +INSERT INTO product_slots VALUES(37,129); +INSERT INTO product_slots VALUES(37,130); +INSERT INTO product_slots VALUES(37,131); +INSERT INTO product_slots VALUES(37,132); +INSERT INTO product_slots VALUES(37,133); +INSERT INTO product_slots VALUES(37,134); +INSERT INTO product_slots VALUES(37,135); +INSERT INTO product_slots VALUES(37,136); +INSERT INTO product_slots VALUES(37,137); +INSERT INTO product_slots VALUES(37,138); +INSERT INTO product_slots VALUES(37,139); +INSERT INTO product_slots VALUES(37,140); +INSERT INTO product_slots VALUES(37,141); +INSERT INTO product_slots VALUES(37,142); +INSERT INTO product_slots VALUES(37,143); +INSERT INTO product_slots VALUES(37,144); +INSERT INTO product_slots VALUES(37,145); +INSERT INTO product_slots VALUES(37,146); +INSERT INTO product_slots VALUES(37,147); +INSERT INTO product_slots VALUES(37,148); +INSERT INTO product_slots VALUES(37,149); +INSERT INTO product_slots VALUES(37,150); +INSERT INTO product_slots VALUES(37,151); +INSERT INTO product_slots VALUES(37,152); +INSERT INTO product_slots VALUES(37,153); +INSERT INTO product_slots VALUES(37,154); +INSERT INTO product_slots VALUES(37,155); +INSERT INTO product_slots VALUES(37,156); +INSERT INTO product_slots VALUES(37,157); +INSERT INTO product_slots VALUES(37,158); +INSERT INTO product_slots VALUES(37,159); +INSERT INTO product_slots VALUES(37,160); +INSERT INTO product_slots VALUES(37,161); +INSERT INTO product_slots VALUES(37,162); +INSERT INTO product_slots VALUES(37,163); +INSERT INTO product_slots VALUES(37,164); +INSERT INTO product_slots VALUES(37,165); +INSERT INTO product_slots VALUES(37,166); +INSERT INTO product_slots VALUES(37,167); +INSERT INTO product_slots VALUES(37,168); +INSERT INTO product_slots VALUES(37,169); +INSERT INTO product_slots VALUES(37,170); +INSERT INTO product_slots VALUES(37,171); +INSERT INTO product_slots VALUES(37,172); +INSERT INTO product_slots VALUES(37,173); +INSERT INTO product_slots VALUES(37,174); +INSERT INTO product_slots VALUES(37,175); +INSERT INTO product_slots VALUES(37,176); +INSERT INTO product_slots VALUES(37,177); +INSERT INTO product_slots VALUES(37,178); +INSERT INTO product_slots VALUES(37,179); +INSERT INTO product_slots VALUES(37,180); +INSERT INTO product_slots VALUES(37,181); +INSERT INTO product_slots VALUES(37,182); +INSERT INTO product_slots VALUES(37,183); +INSERT INTO product_slots VALUES(37,184); +INSERT INTO product_slots VALUES(37,185); +INSERT INTO product_slots VALUES(37,186); +INSERT INTO product_slots VALUES(37,187); +INSERT INTO product_slots VALUES(37,188); +INSERT INTO product_slots VALUES(37,189); +INSERT INTO product_slots VALUES(37,190); +INSERT INTO product_slots VALUES(37,191); +INSERT INTO product_slots VALUES(37,192); +INSERT INTO product_slots VALUES(37,193); +INSERT INTO product_slots VALUES(37,194); +INSERT INTO product_slots VALUES(37,195); +INSERT INTO product_slots VALUES(37,196); +INSERT INTO product_slots VALUES(37,197); +INSERT INTO product_slots VALUES(37,198); +INSERT INTO product_slots VALUES(37,199); +INSERT INTO product_slots VALUES(37,200); +INSERT INTO product_slots VALUES(37,201); +INSERT INTO product_slots VALUES(37,202); +INSERT INTO product_slots VALUES(37,203); +INSERT INTO product_slots VALUES(37,204); +INSERT INTO product_slots VALUES(37,205); +INSERT INTO product_slots VALUES(37,206); +INSERT INTO product_slots VALUES(37,207); +INSERT INTO product_slots VALUES(37,208); +INSERT INTO product_slots VALUES(37,209); +INSERT INTO product_slots VALUES(37,210); +INSERT INTO product_slots VALUES(37,211); +INSERT INTO product_slots VALUES(37,212); +INSERT INTO product_slots VALUES(37,213); +INSERT INTO product_slots VALUES(37,214); +INSERT INTO product_slots VALUES(37,215); +INSERT INTO product_slots VALUES(37,216); +INSERT INTO product_slots VALUES(37,217); +INSERT INTO product_slots VALUES(37,218); +INSERT INTO product_slots VALUES(37,219); +INSERT INTO product_slots VALUES(37,220); +INSERT INTO product_slots VALUES(37,221); +INSERT INTO product_slots VALUES(37,222); +INSERT INTO product_slots VALUES(37,223); +INSERT INTO product_slots VALUES(37,224); +INSERT INTO product_slots VALUES(37,225); +INSERT INTO product_slots VALUES(37,226); +INSERT INTO product_slots VALUES(37,227); +INSERT INTO product_slots VALUES(37,228); +INSERT INTO product_slots VALUES(37,229); +INSERT INTO product_slots VALUES(37,230); +INSERT INTO product_slots VALUES(37,231); +INSERT INTO product_slots VALUES(37,232); +INSERT INTO product_slots VALUES(37,233); +INSERT INTO product_slots VALUES(37,234); +INSERT INTO product_slots VALUES(37,235); +INSERT INTO product_slots VALUES(37,236); +INSERT INTO product_slots VALUES(37,237); +INSERT INTO product_slots VALUES(37,238); +INSERT INTO product_slots VALUES(37,239); +INSERT INTO product_slots VALUES(37,240); +INSERT INTO product_slots VALUES(37,241); +INSERT INTO product_slots VALUES(37,242); +INSERT INTO product_slots VALUES(37,243); +INSERT INTO product_slots VALUES(37,244); +INSERT INTO product_slots VALUES(37,274); +INSERT INTO product_slots VALUES(37,275); +INSERT INTO product_slots VALUES(37,279); +INSERT INTO product_slots VALUES(37,280); +INSERT INTO product_slots VALUES(37,281); +INSERT INTO product_slots VALUES(37,282); +INSERT INTO product_slots VALUES(37,283); +INSERT INTO product_slots VALUES(37,284); +INSERT INTO product_slots VALUES(37,285); +INSERT INTO product_slots VALUES(37,286); +INSERT INTO product_slots VALUES(37,287); +INSERT INTO product_slots VALUES(38,18); +INSERT INTO product_slots VALUES(38,20); +INSERT INTO product_slots VALUES(38,21); +INSERT INTO product_slots VALUES(38,22); +INSERT INTO product_slots VALUES(38,33); +INSERT INTO product_slots VALUES(38,35); +INSERT INTO product_slots VALUES(38,37); +INSERT INTO product_slots VALUES(38,38); +INSERT INTO product_slots VALUES(38,39); +INSERT INTO product_slots VALUES(38,40); +INSERT INTO product_slots VALUES(38,43); +INSERT INTO product_slots VALUES(38,45); +INSERT INTO product_slots VALUES(38,46); +INSERT INTO product_slots VALUES(38,48); +INSERT INTO product_slots VALUES(38,49); +INSERT INTO product_slots VALUES(38,51); +INSERT INTO product_slots VALUES(38,52); +INSERT INTO product_slots VALUES(38,53); +INSERT INTO product_slots VALUES(38,54); +INSERT INTO product_slots VALUES(38,57); +INSERT INTO product_slots VALUES(38,58); +INSERT INTO product_slots VALUES(38,59); +INSERT INTO product_slots VALUES(38,60); +INSERT INTO product_slots VALUES(38,61); +INSERT INTO product_slots VALUES(38,62); +INSERT INTO product_slots VALUES(38,63); +INSERT INTO product_slots VALUES(38,64); +INSERT INTO product_slots VALUES(38,65); +INSERT INTO product_slots VALUES(38,66); +INSERT INTO product_slots VALUES(38,67); +INSERT INTO product_slots VALUES(38,68); +INSERT INTO product_slots VALUES(38,69); +INSERT INTO product_slots VALUES(38,70); +INSERT INTO product_slots VALUES(38,71); +INSERT INTO product_slots VALUES(38,72); +INSERT INTO product_slots VALUES(38,73); +INSERT INTO product_slots VALUES(38,74); +INSERT INTO product_slots VALUES(38,75); +INSERT INTO product_slots VALUES(38,76); +INSERT INTO product_slots VALUES(38,77); +INSERT INTO product_slots VALUES(38,78); +INSERT INTO product_slots VALUES(38,79); +INSERT INTO product_slots VALUES(38,80); +INSERT INTO product_slots VALUES(38,81); +INSERT INTO product_slots VALUES(38,82); +INSERT INTO product_slots VALUES(38,83); +INSERT INTO product_slots VALUES(38,84); +INSERT INTO product_slots VALUES(38,85); +INSERT INTO product_slots VALUES(38,86); +INSERT INTO product_slots VALUES(38,87); +INSERT INTO product_slots VALUES(38,88); +INSERT INTO product_slots VALUES(38,89); +INSERT INTO product_slots VALUES(38,90); +INSERT INTO product_slots VALUES(38,91); +INSERT INTO product_slots VALUES(38,92); +INSERT INTO product_slots VALUES(38,93); +INSERT INTO product_slots VALUES(38,94); +INSERT INTO product_slots VALUES(38,95); +INSERT INTO product_slots VALUES(38,96); +INSERT INTO product_slots VALUES(38,97); +INSERT INTO product_slots VALUES(38,98); +INSERT INTO product_slots VALUES(38,99); +INSERT INTO product_slots VALUES(38,100); +INSERT INTO product_slots VALUES(38,102); +INSERT INTO product_slots VALUES(38,103); +INSERT INTO product_slots VALUES(38,104); +INSERT INTO product_slots VALUES(38,105); +INSERT INTO product_slots VALUES(38,106); +INSERT INTO product_slots VALUES(38,107); +INSERT INTO product_slots VALUES(38,108); +INSERT INTO product_slots VALUES(38,109); +INSERT INTO product_slots VALUES(38,110); +INSERT INTO product_slots VALUES(38,111); +INSERT INTO product_slots VALUES(38,112); +INSERT INTO product_slots VALUES(38,113); +INSERT INTO product_slots VALUES(38,114); +INSERT INTO product_slots VALUES(38,115); +INSERT INTO product_slots VALUES(38,117); +INSERT INTO product_slots VALUES(38,118); +INSERT INTO product_slots VALUES(38,119); +INSERT INTO product_slots VALUES(38,120); +INSERT INTO product_slots VALUES(38,121); +INSERT INTO product_slots VALUES(38,122); +INSERT INTO product_slots VALUES(38,123); +INSERT INTO product_slots VALUES(38,124); +INSERT INTO product_slots VALUES(38,125); +INSERT INTO product_slots VALUES(38,126); +INSERT INTO product_slots VALUES(38,127); +INSERT INTO product_slots VALUES(38,128); +INSERT INTO product_slots VALUES(38,129); +INSERT INTO product_slots VALUES(38,130); +INSERT INTO product_slots VALUES(38,131); +INSERT INTO product_slots VALUES(38,132); +INSERT INTO product_slots VALUES(38,133); +INSERT INTO product_slots VALUES(38,134); +INSERT INTO product_slots VALUES(38,135); +INSERT INTO product_slots VALUES(38,136); +INSERT INTO product_slots VALUES(38,138); +INSERT INTO product_slots VALUES(38,139); +INSERT INTO product_slots VALUES(38,140); +INSERT INTO product_slots VALUES(38,141); +INSERT INTO product_slots VALUES(38,142); +INSERT INTO product_slots VALUES(38,143); +INSERT INTO product_slots VALUES(38,145); +INSERT INTO product_slots VALUES(38,146); +INSERT INTO product_slots VALUES(38,147); +INSERT INTO product_slots VALUES(38,148); +INSERT INTO product_slots VALUES(38,149); +INSERT INTO product_slots VALUES(38,150); +INSERT INTO product_slots VALUES(38,151); +INSERT INTO product_slots VALUES(38,152); +INSERT INTO product_slots VALUES(38,153); +INSERT INTO product_slots VALUES(38,154); +INSERT INTO product_slots VALUES(38,155); +INSERT INTO product_slots VALUES(38,156); +INSERT INTO product_slots VALUES(38,157); +INSERT INTO product_slots VALUES(38,158); +INSERT INTO product_slots VALUES(38,159); +INSERT INTO product_slots VALUES(38,160); +INSERT INTO product_slots VALUES(38,161); +INSERT INTO product_slots VALUES(38,162); +INSERT INTO product_slots VALUES(38,163); +INSERT INTO product_slots VALUES(38,164); +INSERT INTO product_slots VALUES(38,165); +INSERT INTO product_slots VALUES(38,166); +INSERT INTO product_slots VALUES(38,167); +INSERT INTO product_slots VALUES(38,168); +INSERT INTO product_slots VALUES(38,169); +INSERT INTO product_slots VALUES(38,170); +INSERT INTO product_slots VALUES(38,171); +INSERT INTO product_slots VALUES(38,172); +INSERT INTO product_slots VALUES(38,173); +INSERT INTO product_slots VALUES(38,174); +INSERT INTO product_slots VALUES(38,175); +INSERT INTO product_slots VALUES(38,176); +INSERT INTO product_slots VALUES(38,177); +INSERT INTO product_slots VALUES(38,178); +INSERT INTO product_slots VALUES(38,179); +INSERT INTO product_slots VALUES(38,180); +INSERT INTO product_slots VALUES(38,181); +INSERT INTO product_slots VALUES(38,182); +INSERT INTO product_slots VALUES(38,183); +INSERT INTO product_slots VALUES(38,184); +INSERT INTO product_slots VALUES(38,185); +INSERT INTO product_slots VALUES(38,186); +INSERT INTO product_slots VALUES(38,187); +INSERT INTO product_slots VALUES(38,188); +INSERT INTO product_slots VALUES(38,189); +INSERT INTO product_slots VALUES(38,190); +INSERT INTO product_slots VALUES(38,191); +INSERT INTO product_slots VALUES(38,192); +INSERT INTO product_slots VALUES(38,193); +INSERT INTO product_slots VALUES(38,194); +INSERT INTO product_slots VALUES(38,195); +INSERT INTO product_slots VALUES(38,196); +INSERT INTO product_slots VALUES(38,197); +INSERT INTO product_slots VALUES(38,198); +INSERT INTO product_slots VALUES(38,199); +INSERT INTO product_slots VALUES(38,200); +INSERT INTO product_slots VALUES(38,201); +INSERT INTO product_slots VALUES(38,202); +INSERT INTO product_slots VALUES(38,203); +INSERT INTO product_slots VALUES(38,204); +INSERT INTO product_slots VALUES(38,205); +INSERT INTO product_slots VALUES(38,206); +INSERT INTO product_slots VALUES(38,207); +INSERT INTO product_slots VALUES(38,208); +INSERT INTO product_slots VALUES(38,209); +INSERT INTO product_slots VALUES(38,210); +INSERT INTO product_slots VALUES(38,211); +INSERT INTO product_slots VALUES(38,212); +INSERT INTO product_slots VALUES(38,213); +INSERT INTO product_slots VALUES(38,214); +INSERT INTO product_slots VALUES(38,215); +INSERT INTO product_slots VALUES(38,216); +INSERT INTO product_slots VALUES(38,217); +INSERT INTO product_slots VALUES(38,218); +INSERT INTO product_slots VALUES(38,219); +INSERT INTO product_slots VALUES(38,220); +INSERT INTO product_slots VALUES(38,221); +INSERT INTO product_slots VALUES(38,222); +INSERT INTO product_slots VALUES(38,223); +INSERT INTO product_slots VALUES(38,224); +INSERT INTO product_slots VALUES(38,225); +INSERT INTO product_slots VALUES(38,226); +INSERT INTO product_slots VALUES(38,227); +INSERT INTO product_slots VALUES(38,228); +INSERT INTO product_slots VALUES(38,229); +INSERT INTO product_slots VALUES(38,230); +INSERT INTO product_slots VALUES(38,231); +INSERT INTO product_slots VALUES(38,232); +INSERT INTO product_slots VALUES(38,233); +INSERT INTO product_slots VALUES(38,234); +INSERT INTO product_slots VALUES(38,235); +INSERT INTO product_slots VALUES(38,236); +INSERT INTO product_slots VALUES(38,237); +INSERT INTO product_slots VALUES(38,238); +INSERT INTO product_slots VALUES(38,239); +INSERT INTO product_slots VALUES(38,240); +INSERT INTO product_slots VALUES(38,241); +INSERT INTO product_slots VALUES(38,242); +INSERT INTO product_slots VALUES(38,243); +INSERT INTO product_slots VALUES(38,244); +INSERT INTO product_slots VALUES(38,274); +INSERT INTO product_slots VALUES(38,275); +INSERT INTO product_slots VALUES(38,279); +INSERT INTO product_slots VALUES(38,280); +INSERT INTO product_slots VALUES(38,281); +INSERT INTO product_slots VALUES(38,282); +INSERT INTO product_slots VALUES(38,283); +INSERT INTO product_slots VALUES(38,284); +INSERT INTO product_slots VALUES(38,285); +INSERT INTO product_slots VALUES(38,286); +INSERT INTO product_slots VALUES(38,287); +INSERT INTO product_slots VALUES(39,18); +INSERT INTO product_slots VALUES(39,20); +INSERT INTO product_slots VALUES(39,21); +INSERT INTO product_slots VALUES(39,22); +INSERT INTO product_slots VALUES(39,33); +INSERT INTO product_slots VALUES(39,35); +INSERT INTO product_slots VALUES(39,37); +INSERT INTO product_slots VALUES(39,38); +INSERT INTO product_slots VALUES(39,40); +INSERT INTO product_slots VALUES(39,64); +INSERT INTO product_slots VALUES(39,65); +INSERT INTO product_slots VALUES(39,66); +INSERT INTO product_slots VALUES(39,67); +INSERT INTO product_slots VALUES(39,68); +INSERT INTO product_slots VALUES(39,69); +INSERT INTO product_slots VALUES(39,70); +INSERT INTO product_slots VALUES(39,71); +INSERT INTO product_slots VALUES(39,72); +INSERT INTO product_slots VALUES(39,73); +INSERT INTO product_slots VALUES(39,74); +INSERT INTO product_slots VALUES(39,75); +INSERT INTO product_slots VALUES(39,76); +INSERT INTO product_slots VALUES(39,77); +INSERT INTO product_slots VALUES(39,78); +INSERT INTO product_slots VALUES(39,79); +INSERT INTO product_slots VALUES(39,80); +INSERT INTO product_slots VALUES(39,81); +INSERT INTO product_slots VALUES(39,82); +INSERT INTO product_slots VALUES(39,83); +INSERT INTO product_slots VALUES(39,84); +INSERT INTO product_slots VALUES(39,85); +INSERT INTO product_slots VALUES(39,86); +INSERT INTO product_slots VALUES(39,87); +INSERT INTO product_slots VALUES(39,88); +INSERT INTO product_slots VALUES(39,89); +INSERT INTO product_slots VALUES(39,90); +INSERT INTO product_slots VALUES(39,91); +INSERT INTO product_slots VALUES(39,92); +INSERT INTO product_slots VALUES(39,93); +INSERT INTO product_slots VALUES(39,94); +INSERT INTO product_slots VALUES(39,95); +INSERT INTO product_slots VALUES(39,96); +INSERT INTO product_slots VALUES(39,97); +INSERT INTO product_slots VALUES(39,98); +INSERT INTO product_slots VALUES(39,99); +INSERT INTO product_slots VALUES(39,100); +INSERT INTO product_slots VALUES(39,102); +INSERT INTO product_slots VALUES(39,103); +INSERT INTO product_slots VALUES(39,104); +INSERT INTO product_slots VALUES(39,105); +INSERT INTO product_slots VALUES(39,106); +INSERT INTO product_slots VALUES(39,107); +INSERT INTO product_slots VALUES(39,108); +INSERT INTO product_slots VALUES(39,109); +INSERT INTO product_slots VALUES(39,110); +INSERT INTO product_slots VALUES(39,111); +INSERT INTO product_slots VALUES(39,112); +INSERT INTO product_slots VALUES(39,113); +INSERT INTO product_slots VALUES(39,114); +INSERT INTO product_slots VALUES(39,115); +INSERT INTO product_slots VALUES(39,117); +INSERT INTO product_slots VALUES(39,118); +INSERT INTO product_slots VALUES(39,119); +INSERT INTO product_slots VALUES(39,120); +INSERT INTO product_slots VALUES(39,121); +INSERT INTO product_slots VALUES(39,122); +INSERT INTO product_slots VALUES(39,123); +INSERT INTO product_slots VALUES(39,124); +INSERT INTO product_slots VALUES(39,125); +INSERT INTO product_slots VALUES(39,126); +INSERT INTO product_slots VALUES(39,127); +INSERT INTO product_slots VALUES(39,128); +INSERT INTO product_slots VALUES(39,129); +INSERT INTO product_slots VALUES(39,130); +INSERT INTO product_slots VALUES(39,131); +INSERT INTO product_slots VALUES(39,132); +INSERT INTO product_slots VALUES(39,133); +INSERT INTO product_slots VALUES(39,134); +INSERT INTO product_slots VALUES(39,135); +INSERT INTO product_slots VALUES(39,136); +INSERT INTO product_slots VALUES(39,138); +INSERT INTO product_slots VALUES(39,139); +INSERT INTO product_slots VALUES(39,140); +INSERT INTO product_slots VALUES(39,141); +INSERT INTO product_slots VALUES(39,142); +INSERT INTO product_slots VALUES(39,143); +INSERT INTO product_slots VALUES(39,145); +INSERT INTO product_slots VALUES(39,146); +INSERT INTO product_slots VALUES(39,147); +INSERT INTO product_slots VALUES(39,148); +INSERT INTO product_slots VALUES(39,149); +INSERT INTO product_slots VALUES(39,150); +INSERT INTO product_slots VALUES(39,151); +INSERT INTO product_slots VALUES(39,152); +INSERT INTO product_slots VALUES(39,153); +INSERT INTO product_slots VALUES(39,154); +INSERT INTO product_slots VALUES(39,155); +INSERT INTO product_slots VALUES(39,156); +INSERT INTO product_slots VALUES(39,157); +INSERT INTO product_slots VALUES(39,158); +INSERT INTO product_slots VALUES(39,159); +INSERT INTO product_slots VALUES(39,160); +INSERT INTO product_slots VALUES(39,161); +INSERT INTO product_slots VALUES(39,162); +INSERT INTO product_slots VALUES(39,163); +INSERT INTO product_slots VALUES(39,164); +INSERT INTO product_slots VALUES(39,165); +INSERT INTO product_slots VALUES(39,166); +INSERT INTO product_slots VALUES(39,167); +INSERT INTO product_slots VALUES(39,168); +INSERT INTO product_slots VALUES(39,169); +INSERT INTO product_slots VALUES(39,170); +INSERT INTO product_slots VALUES(39,171); +INSERT INTO product_slots VALUES(39,172); +INSERT INTO product_slots VALUES(39,173); +INSERT INTO product_slots VALUES(39,174); +INSERT INTO product_slots VALUES(39,175); +INSERT INTO product_slots VALUES(39,176); +INSERT INTO product_slots VALUES(39,177); +INSERT INTO product_slots VALUES(39,178); +INSERT INTO product_slots VALUES(39,179); +INSERT INTO product_slots VALUES(39,180); +INSERT INTO product_slots VALUES(39,181); +INSERT INTO product_slots VALUES(39,182); +INSERT INTO product_slots VALUES(39,183); +INSERT INTO product_slots VALUES(39,184); +INSERT INTO product_slots VALUES(39,185); +INSERT INTO product_slots VALUES(39,186); +INSERT INTO product_slots VALUES(39,187); +INSERT INTO product_slots VALUES(39,188); +INSERT INTO product_slots VALUES(39,189); +INSERT INTO product_slots VALUES(39,190); +INSERT INTO product_slots VALUES(39,191); +INSERT INTO product_slots VALUES(39,192); +INSERT INTO product_slots VALUES(39,193); +INSERT INTO product_slots VALUES(39,194); +INSERT INTO product_slots VALUES(39,195); +INSERT INTO product_slots VALUES(39,196); +INSERT INTO product_slots VALUES(39,197); +INSERT INTO product_slots VALUES(39,198); +INSERT INTO product_slots VALUES(39,199); +INSERT INTO product_slots VALUES(39,200); +INSERT INTO product_slots VALUES(39,201); +INSERT INTO product_slots VALUES(39,202); +INSERT INTO product_slots VALUES(39,203); +INSERT INTO product_slots VALUES(39,204); +INSERT INTO product_slots VALUES(39,205); +INSERT INTO product_slots VALUES(39,206); +INSERT INTO product_slots VALUES(39,207); +INSERT INTO product_slots VALUES(39,208); +INSERT INTO product_slots VALUES(39,209); +INSERT INTO product_slots VALUES(39,210); +INSERT INTO product_slots VALUES(39,211); +INSERT INTO product_slots VALUES(39,212); +INSERT INTO product_slots VALUES(39,213); +INSERT INTO product_slots VALUES(39,214); +INSERT INTO product_slots VALUES(39,215); +INSERT INTO product_slots VALUES(39,216); +INSERT INTO product_slots VALUES(39,217); +INSERT INTO product_slots VALUES(39,218); +INSERT INTO product_slots VALUES(39,219); +INSERT INTO product_slots VALUES(39,220); +INSERT INTO product_slots VALUES(39,221); +INSERT INTO product_slots VALUES(39,222); +INSERT INTO product_slots VALUES(39,223); +INSERT INTO product_slots VALUES(39,224); +INSERT INTO product_slots VALUES(39,225); +INSERT INTO product_slots VALUES(39,226); +INSERT INTO product_slots VALUES(39,227); +INSERT INTO product_slots VALUES(39,228); +INSERT INTO product_slots VALUES(39,229); +INSERT INTO product_slots VALUES(39,230); +INSERT INTO product_slots VALUES(39,231); +INSERT INTO product_slots VALUES(39,232); +INSERT INTO product_slots VALUES(39,233); +INSERT INTO product_slots VALUES(39,234); +INSERT INTO product_slots VALUES(39,235); +INSERT INTO product_slots VALUES(39,236); +INSERT INTO product_slots VALUES(39,237); +INSERT INTO product_slots VALUES(39,238); +INSERT INTO product_slots VALUES(39,239); +INSERT INTO product_slots VALUES(39,240); +INSERT INTO product_slots VALUES(39,241); +INSERT INTO product_slots VALUES(39,242); +INSERT INTO product_slots VALUES(39,243); +INSERT INTO product_slots VALUES(39,244); +INSERT INTO product_slots VALUES(39,274); +INSERT INTO product_slots VALUES(39,275); +INSERT INTO product_slots VALUES(39,279); +INSERT INTO product_slots VALUES(39,280); +INSERT INTO product_slots VALUES(39,281); +INSERT INTO product_slots VALUES(39,282); +INSERT INTO product_slots VALUES(39,283); +INSERT INTO product_slots VALUES(39,284); +INSERT INTO product_slots VALUES(39,285); +INSERT INTO product_slots VALUES(39,286); +INSERT INTO product_slots VALUES(39,287); +INSERT INTO product_slots VALUES(40,31); +INSERT INTO product_slots VALUES(40,39); +INSERT INTO product_slots VALUES(40,41); +INSERT INTO product_slots VALUES(40,43); +INSERT INTO product_slots VALUES(40,45); +INSERT INTO product_slots VALUES(40,46); +INSERT INTO product_slots VALUES(40,47); +INSERT INTO product_slots VALUES(40,48); +INSERT INTO product_slots VALUES(40,49); +INSERT INTO product_slots VALUES(40,50); +INSERT INTO product_slots VALUES(40,51); +INSERT INTO product_slots VALUES(40,52); +INSERT INTO product_slots VALUES(40,53); +INSERT INTO product_slots VALUES(40,54); +INSERT INTO product_slots VALUES(40,55); +INSERT INTO product_slots VALUES(40,56); +INSERT INTO product_slots VALUES(40,57); +INSERT INTO product_slots VALUES(40,58); +INSERT INTO product_slots VALUES(40,59); +INSERT INTO product_slots VALUES(40,60); +INSERT INTO product_slots VALUES(40,61); +INSERT INTO product_slots VALUES(40,62); +INSERT INTO product_slots VALUES(40,63); +INSERT INTO product_slots VALUES(40,64); +INSERT INTO product_slots VALUES(40,65); +INSERT INTO product_slots VALUES(40,66); +INSERT INTO product_slots VALUES(40,67); +INSERT INTO product_slots VALUES(40,68); +INSERT INTO product_slots VALUES(40,69); +INSERT INTO product_slots VALUES(40,70); +INSERT INTO product_slots VALUES(40,71); +INSERT INTO product_slots VALUES(40,72); +INSERT INTO product_slots VALUES(40,73); +INSERT INTO product_slots VALUES(40,74); +INSERT INTO product_slots VALUES(40,75); +INSERT INTO product_slots VALUES(40,76); +INSERT INTO product_slots VALUES(40,77); +INSERT INTO product_slots VALUES(40,78); +INSERT INTO product_slots VALUES(40,79); +INSERT INTO product_slots VALUES(40,80); +INSERT INTO product_slots VALUES(40,81); +INSERT INTO product_slots VALUES(40,82); +INSERT INTO product_slots VALUES(40,83); +INSERT INTO product_slots VALUES(40,84); +INSERT INTO product_slots VALUES(40,85); +INSERT INTO product_slots VALUES(40,86); +INSERT INTO product_slots VALUES(40,87); +INSERT INTO product_slots VALUES(40,88); +INSERT INTO product_slots VALUES(40,89); +INSERT INTO product_slots VALUES(40,90); +INSERT INTO product_slots VALUES(40,91); +INSERT INTO product_slots VALUES(40,92); +INSERT INTO product_slots VALUES(40,93); +INSERT INTO product_slots VALUES(40,94); +INSERT INTO product_slots VALUES(40,95); +INSERT INTO product_slots VALUES(40,96); +INSERT INTO product_slots VALUES(40,97); +INSERT INTO product_slots VALUES(40,98); +INSERT INTO product_slots VALUES(40,99); +INSERT INTO product_slots VALUES(40,100); +INSERT INTO product_slots VALUES(40,101); +INSERT INTO product_slots VALUES(40,102); +INSERT INTO product_slots VALUES(40,103); +INSERT INTO product_slots VALUES(40,104); +INSERT INTO product_slots VALUES(40,105); +INSERT INTO product_slots VALUES(40,106); +INSERT INTO product_slots VALUES(40,107); +INSERT INTO product_slots VALUES(40,108); +INSERT INTO product_slots VALUES(40,109); +INSERT INTO product_slots VALUES(40,110); +INSERT INTO product_slots VALUES(40,111); +INSERT INTO product_slots VALUES(40,112); +INSERT INTO product_slots VALUES(40,113); +INSERT INTO product_slots VALUES(40,114); +INSERT INTO product_slots VALUES(40,115); +INSERT INTO product_slots VALUES(40,116); +INSERT INTO product_slots VALUES(40,117); +INSERT INTO product_slots VALUES(40,118); +INSERT INTO product_slots VALUES(40,119); +INSERT INTO product_slots VALUES(40,120); +INSERT INTO product_slots VALUES(40,121); +INSERT INTO product_slots VALUES(40,122); +INSERT INTO product_slots VALUES(40,123); +INSERT INTO product_slots VALUES(40,124); +INSERT INTO product_slots VALUES(40,125); +INSERT INTO product_slots VALUES(40,126); +INSERT INTO product_slots VALUES(40,127); +INSERT INTO product_slots VALUES(40,128); +INSERT INTO product_slots VALUES(40,129); +INSERT INTO product_slots VALUES(40,130); +INSERT INTO product_slots VALUES(40,131); +INSERT INTO product_slots VALUES(40,132); +INSERT INTO product_slots VALUES(40,133); +INSERT INTO product_slots VALUES(40,134); +INSERT INTO product_slots VALUES(40,135); +INSERT INTO product_slots VALUES(40,136); +INSERT INTO product_slots VALUES(40,137); +INSERT INTO product_slots VALUES(40,138); +INSERT INTO product_slots VALUES(40,139); +INSERT INTO product_slots VALUES(40,140); +INSERT INTO product_slots VALUES(40,141); +INSERT INTO product_slots VALUES(40,142); +INSERT INTO product_slots VALUES(40,143); +INSERT INTO product_slots VALUES(40,144); +INSERT INTO product_slots VALUES(40,145); +INSERT INTO product_slots VALUES(40,146); +INSERT INTO product_slots VALUES(40,147); +INSERT INTO product_slots VALUES(40,148); +INSERT INTO product_slots VALUES(40,149); +INSERT INTO product_slots VALUES(40,150); +INSERT INTO product_slots VALUES(40,151); +INSERT INTO product_slots VALUES(40,152); +INSERT INTO product_slots VALUES(40,153); +INSERT INTO product_slots VALUES(40,154); +INSERT INTO product_slots VALUES(40,155); +INSERT INTO product_slots VALUES(40,156); +INSERT INTO product_slots VALUES(40,157); +INSERT INTO product_slots VALUES(40,158); +INSERT INTO product_slots VALUES(40,159); +INSERT INTO product_slots VALUES(40,160); +INSERT INTO product_slots VALUES(40,161); +INSERT INTO product_slots VALUES(40,162); +INSERT INTO product_slots VALUES(40,163); +INSERT INTO product_slots VALUES(40,164); +INSERT INTO product_slots VALUES(40,165); +INSERT INTO product_slots VALUES(40,166); +INSERT INTO product_slots VALUES(40,167); +INSERT INTO product_slots VALUES(40,168); +INSERT INTO product_slots VALUES(40,169); +INSERT INTO product_slots VALUES(40,170); +INSERT INTO product_slots VALUES(40,171); +INSERT INTO product_slots VALUES(40,172); +INSERT INTO product_slots VALUES(40,173); +INSERT INTO product_slots VALUES(40,174); +INSERT INTO product_slots VALUES(40,175); +INSERT INTO product_slots VALUES(40,176); +INSERT INTO product_slots VALUES(40,177); +INSERT INTO product_slots VALUES(40,178); +INSERT INTO product_slots VALUES(40,179); +INSERT INTO product_slots VALUES(40,180); +INSERT INTO product_slots VALUES(40,181); +INSERT INTO product_slots VALUES(40,182); +INSERT INTO product_slots VALUES(40,183); +INSERT INTO product_slots VALUES(40,184); +INSERT INTO product_slots VALUES(40,185); +INSERT INTO product_slots VALUES(40,186); +INSERT INTO product_slots VALUES(40,187); +INSERT INTO product_slots VALUES(40,188); +INSERT INTO product_slots VALUES(40,189); +INSERT INTO product_slots VALUES(40,190); +INSERT INTO product_slots VALUES(40,191); +INSERT INTO product_slots VALUES(40,192); +INSERT INTO product_slots VALUES(40,193); +INSERT INTO product_slots VALUES(40,194); +INSERT INTO product_slots VALUES(40,195); +INSERT INTO product_slots VALUES(40,196); +INSERT INTO product_slots VALUES(40,197); +INSERT INTO product_slots VALUES(40,198); +INSERT INTO product_slots VALUES(40,199); +INSERT INTO product_slots VALUES(40,200); +INSERT INTO product_slots VALUES(40,201); +INSERT INTO product_slots VALUES(40,202); +INSERT INTO product_slots VALUES(40,203); +INSERT INTO product_slots VALUES(40,204); +INSERT INTO product_slots VALUES(40,205); +INSERT INTO product_slots VALUES(40,206); +INSERT INTO product_slots VALUES(40,207); +INSERT INTO product_slots VALUES(40,208); +INSERT INTO product_slots VALUES(40,209); +INSERT INTO product_slots VALUES(40,210); +INSERT INTO product_slots VALUES(40,211); +INSERT INTO product_slots VALUES(40,212); +INSERT INTO product_slots VALUES(40,213); +INSERT INTO product_slots VALUES(40,214); +INSERT INTO product_slots VALUES(40,215); +INSERT INTO product_slots VALUES(40,216); +INSERT INTO product_slots VALUES(40,217); +INSERT INTO product_slots VALUES(40,218); +INSERT INTO product_slots VALUES(40,219); +INSERT INTO product_slots VALUES(40,220); +INSERT INTO product_slots VALUES(40,221); +INSERT INTO product_slots VALUES(40,222); +INSERT INTO product_slots VALUES(40,223); +INSERT INTO product_slots VALUES(40,224); +INSERT INTO product_slots VALUES(40,225); +INSERT INTO product_slots VALUES(40,226); +INSERT INTO product_slots VALUES(40,227); +INSERT INTO product_slots VALUES(40,228); +INSERT INTO product_slots VALUES(40,229); +INSERT INTO product_slots VALUES(40,230); +INSERT INTO product_slots VALUES(40,231); +INSERT INTO product_slots VALUES(40,232); +INSERT INTO product_slots VALUES(40,233); +INSERT INTO product_slots VALUES(40,234); +INSERT INTO product_slots VALUES(40,235); +INSERT INTO product_slots VALUES(40,236); +INSERT INTO product_slots VALUES(40,237); +INSERT INTO product_slots VALUES(40,238); +INSERT INTO product_slots VALUES(40,239); +INSERT INTO product_slots VALUES(40,240); +INSERT INTO product_slots VALUES(40,241); +INSERT INTO product_slots VALUES(40,242); +INSERT INTO product_slots VALUES(40,243); +INSERT INTO product_slots VALUES(40,244); +INSERT INTO product_slots VALUES(40,274); +INSERT INTO product_slots VALUES(40,275); +INSERT INTO product_slots VALUES(40,279); +INSERT INTO product_slots VALUES(40,280); +INSERT INTO product_slots VALUES(40,281); +INSERT INTO product_slots VALUES(40,282); +INSERT INTO product_slots VALUES(41,31); +INSERT INTO product_slots VALUES(41,39); +INSERT INTO product_slots VALUES(41,41); +INSERT INTO product_slots VALUES(41,43); +INSERT INTO product_slots VALUES(41,45); +INSERT INTO product_slots VALUES(41,46); +INSERT INTO product_slots VALUES(41,47); +INSERT INTO product_slots VALUES(41,48); +INSERT INTO product_slots VALUES(41,49); +INSERT INTO product_slots VALUES(41,50); +INSERT INTO product_slots VALUES(41,51); +INSERT INTO product_slots VALUES(41,52); +INSERT INTO product_slots VALUES(41,53); +INSERT INTO product_slots VALUES(41,54); +INSERT INTO product_slots VALUES(41,55); +INSERT INTO product_slots VALUES(41,56); +INSERT INTO product_slots VALUES(41,57); +INSERT INTO product_slots VALUES(41,58); +INSERT INTO product_slots VALUES(41,59); +INSERT INTO product_slots VALUES(41,60); +INSERT INTO product_slots VALUES(41,61); +INSERT INTO product_slots VALUES(41,62); +INSERT INTO product_slots VALUES(41,63); +INSERT INTO product_slots VALUES(41,64); +INSERT INTO product_slots VALUES(41,65); +INSERT INTO product_slots VALUES(41,66); +INSERT INTO product_slots VALUES(41,67); +INSERT INTO product_slots VALUES(41,68); +INSERT INTO product_slots VALUES(41,69); +INSERT INTO product_slots VALUES(41,70); +INSERT INTO product_slots VALUES(41,71); +INSERT INTO product_slots VALUES(41,72); +INSERT INTO product_slots VALUES(41,73); +INSERT INTO product_slots VALUES(41,74); +INSERT INTO product_slots VALUES(41,75); +INSERT INTO product_slots VALUES(41,76); +INSERT INTO product_slots VALUES(41,77); +INSERT INTO product_slots VALUES(41,78); +INSERT INTO product_slots VALUES(41,79); +INSERT INTO product_slots VALUES(41,80); +INSERT INTO product_slots VALUES(41,81); +INSERT INTO product_slots VALUES(41,82); +INSERT INTO product_slots VALUES(41,83); +INSERT INTO product_slots VALUES(41,84); +INSERT INTO product_slots VALUES(41,85); +INSERT INTO product_slots VALUES(41,86); +INSERT INTO product_slots VALUES(41,87); +INSERT INTO product_slots VALUES(41,88); +INSERT INTO product_slots VALUES(41,89); +INSERT INTO product_slots VALUES(41,90); +INSERT INTO product_slots VALUES(41,91); +INSERT INTO product_slots VALUES(41,92); +INSERT INTO product_slots VALUES(41,93); +INSERT INTO product_slots VALUES(41,94); +INSERT INTO product_slots VALUES(41,95); +INSERT INTO product_slots VALUES(41,96); +INSERT INTO product_slots VALUES(41,97); +INSERT INTO product_slots VALUES(41,98); +INSERT INTO product_slots VALUES(41,99); +INSERT INTO product_slots VALUES(41,100); +INSERT INTO product_slots VALUES(41,101); +INSERT INTO product_slots VALUES(41,102); +INSERT INTO product_slots VALUES(41,103); +INSERT INTO product_slots VALUES(41,104); +INSERT INTO product_slots VALUES(41,105); +INSERT INTO product_slots VALUES(41,106); +INSERT INTO product_slots VALUES(41,107); +INSERT INTO product_slots VALUES(41,108); +INSERT INTO product_slots VALUES(41,109); +INSERT INTO product_slots VALUES(41,110); +INSERT INTO product_slots VALUES(41,111); +INSERT INTO product_slots VALUES(41,112); +INSERT INTO product_slots VALUES(41,113); +INSERT INTO product_slots VALUES(41,114); +INSERT INTO product_slots VALUES(41,115); +INSERT INTO product_slots VALUES(41,116); +INSERT INTO product_slots VALUES(41,117); +INSERT INTO product_slots VALUES(41,118); +INSERT INTO product_slots VALUES(41,119); +INSERT INTO product_slots VALUES(41,120); +INSERT INTO product_slots VALUES(41,121); +INSERT INTO product_slots VALUES(41,122); +INSERT INTO product_slots VALUES(41,123); +INSERT INTO product_slots VALUES(41,124); +INSERT INTO product_slots VALUES(41,125); +INSERT INTO product_slots VALUES(41,126); +INSERT INTO product_slots VALUES(41,127); +INSERT INTO product_slots VALUES(41,128); +INSERT INTO product_slots VALUES(41,129); +INSERT INTO product_slots VALUES(41,130); +INSERT INTO product_slots VALUES(41,131); +INSERT INTO product_slots VALUES(41,132); +INSERT INTO product_slots VALUES(41,133); +INSERT INTO product_slots VALUES(41,134); +INSERT INTO product_slots VALUES(41,135); +INSERT INTO product_slots VALUES(41,136); +INSERT INTO product_slots VALUES(41,137); +INSERT INTO product_slots VALUES(41,138); +INSERT INTO product_slots VALUES(41,139); +INSERT INTO product_slots VALUES(41,140); +INSERT INTO product_slots VALUES(41,141); +INSERT INTO product_slots VALUES(41,142); +INSERT INTO product_slots VALUES(41,143); +INSERT INTO product_slots VALUES(41,144); +INSERT INTO product_slots VALUES(41,145); +INSERT INTO product_slots VALUES(41,146); +INSERT INTO product_slots VALUES(41,147); +INSERT INTO product_slots VALUES(41,148); +INSERT INTO product_slots VALUES(41,149); +INSERT INTO product_slots VALUES(41,150); +INSERT INTO product_slots VALUES(41,151); +INSERT INTO product_slots VALUES(41,152); +INSERT INTO product_slots VALUES(41,153); +INSERT INTO product_slots VALUES(41,154); +INSERT INTO product_slots VALUES(41,155); +INSERT INTO product_slots VALUES(41,156); +INSERT INTO product_slots VALUES(41,157); +INSERT INTO product_slots VALUES(41,158); +INSERT INTO product_slots VALUES(41,159); +INSERT INTO product_slots VALUES(41,160); +INSERT INTO product_slots VALUES(41,161); +INSERT INTO product_slots VALUES(41,162); +INSERT INTO product_slots VALUES(41,163); +INSERT INTO product_slots VALUES(41,164); +INSERT INTO product_slots VALUES(41,165); +INSERT INTO product_slots VALUES(41,166); +INSERT INTO product_slots VALUES(41,167); +INSERT INTO product_slots VALUES(41,168); +INSERT INTO product_slots VALUES(41,169); +INSERT INTO product_slots VALUES(41,170); +INSERT INTO product_slots VALUES(41,171); +INSERT INTO product_slots VALUES(41,172); +INSERT INTO product_slots VALUES(41,173); +INSERT INTO product_slots VALUES(41,174); +INSERT INTO product_slots VALUES(41,175); +INSERT INTO product_slots VALUES(41,176); +INSERT INTO product_slots VALUES(41,177); +INSERT INTO product_slots VALUES(41,178); +INSERT INTO product_slots VALUES(41,179); +INSERT INTO product_slots VALUES(41,180); +INSERT INTO product_slots VALUES(41,181); +INSERT INTO product_slots VALUES(41,182); +INSERT INTO product_slots VALUES(41,183); +INSERT INTO product_slots VALUES(41,184); +INSERT INTO product_slots VALUES(41,185); +INSERT INTO product_slots VALUES(41,186); +INSERT INTO product_slots VALUES(41,187); +INSERT INTO product_slots VALUES(41,188); +INSERT INTO product_slots VALUES(41,189); +INSERT INTO product_slots VALUES(41,190); +INSERT INTO product_slots VALUES(41,191); +INSERT INTO product_slots VALUES(41,192); +INSERT INTO product_slots VALUES(41,193); +INSERT INTO product_slots VALUES(41,194); +INSERT INTO product_slots VALUES(41,195); +INSERT INTO product_slots VALUES(41,196); +INSERT INTO product_slots VALUES(41,197); +INSERT INTO product_slots VALUES(41,198); +INSERT INTO product_slots VALUES(41,199); +INSERT INTO product_slots VALUES(41,200); +INSERT INTO product_slots VALUES(41,201); +INSERT INTO product_slots VALUES(41,202); +INSERT INTO product_slots VALUES(41,203); +INSERT INTO product_slots VALUES(41,204); +INSERT INTO product_slots VALUES(41,205); +INSERT INTO product_slots VALUES(41,206); +INSERT INTO product_slots VALUES(41,207); +INSERT INTO product_slots VALUES(41,208); +INSERT INTO product_slots VALUES(41,209); +INSERT INTO product_slots VALUES(41,210); +INSERT INTO product_slots VALUES(41,211); +INSERT INTO product_slots VALUES(41,212); +INSERT INTO product_slots VALUES(41,213); +INSERT INTO product_slots VALUES(41,214); +INSERT INTO product_slots VALUES(41,215); +INSERT INTO product_slots VALUES(41,216); +INSERT INTO product_slots VALUES(41,217); +INSERT INTO product_slots VALUES(41,218); +INSERT INTO product_slots VALUES(41,219); +INSERT INTO product_slots VALUES(41,220); +INSERT INTO product_slots VALUES(41,221); +INSERT INTO product_slots VALUES(41,222); +INSERT INTO product_slots VALUES(41,223); +INSERT INTO product_slots VALUES(41,224); +INSERT INTO product_slots VALUES(41,225); +INSERT INTO product_slots VALUES(41,226); +INSERT INTO product_slots VALUES(41,227); +INSERT INTO product_slots VALUES(41,228); +INSERT INTO product_slots VALUES(41,229); +INSERT INTO product_slots VALUES(41,230); +INSERT INTO product_slots VALUES(41,231); +INSERT INTO product_slots VALUES(41,232); +INSERT INTO product_slots VALUES(41,233); +INSERT INTO product_slots VALUES(41,234); +INSERT INTO product_slots VALUES(41,235); +INSERT INTO product_slots VALUES(41,236); +INSERT INTO product_slots VALUES(41,237); +INSERT INTO product_slots VALUES(41,238); +INSERT INTO product_slots VALUES(41,239); +INSERT INTO product_slots VALUES(41,240); +INSERT INTO product_slots VALUES(41,241); +INSERT INTO product_slots VALUES(41,242); +INSERT INTO product_slots VALUES(41,243); +INSERT INTO product_slots VALUES(41,244); +INSERT INTO product_slots VALUES(41,274); +INSERT INTO product_slots VALUES(41,275); +INSERT INTO product_slots VALUES(41,279); +INSERT INTO product_slots VALUES(41,280); +INSERT INTO product_slots VALUES(41,281); +INSERT INTO product_slots VALUES(41,282); +INSERT INTO product_slots VALUES(42,31); +INSERT INTO product_slots VALUES(42,39); +INSERT INTO product_slots VALUES(42,41); +INSERT INTO product_slots VALUES(42,43); +INSERT INTO product_slots VALUES(42,45); +INSERT INTO product_slots VALUES(42,46); +INSERT INTO product_slots VALUES(42,47); +INSERT INTO product_slots VALUES(42,48); +INSERT INTO product_slots VALUES(42,49); +INSERT INTO product_slots VALUES(42,50); +INSERT INTO product_slots VALUES(42,51); +INSERT INTO product_slots VALUES(42,52); +INSERT INTO product_slots VALUES(42,53); +INSERT INTO product_slots VALUES(42,54); +INSERT INTO product_slots VALUES(42,55); +INSERT INTO product_slots VALUES(42,56); +INSERT INTO product_slots VALUES(42,57); +INSERT INTO product_slots VALUES(42,58); +INSERT INTO product_slots VALUES(42,59); +INSERT INTO product_slots VALUES(42,60); +INSERT INTO product_slots VALUES(42,61); +INSERT INTO product_slots VALUES(42,62); +INSERT INTO product_slots VALUES(42,63); +INSERT INTO product_slots VALUES(42,64); +INSERT INTO product_slots VALUES(42,65); +INSERT INTO product_slots VALUES(42,66); +INSERT INTO product_slots VALUES(42,67); +INSERT INTO product_slots VALUES(42,68); +INSERT INTO product_slots VALUES(42,69); +INSERT INTO product_slots VALUES(42,70); +INSERT INTO product_slots VALUES(42,71); +INSERT INTO product_slots VALUES(42,72); +INSERT INTO product_slots VALUES(42,73); +INSERT INTO product_slots VALUES(42,74); +INSERT INTO product_slots VALUES(42,75); +INSERT INTO product_slots VALUES(42,76); +INSERT INTO product_slots VALUES(42,77); +INSERT INTO product_slots VALUES(42,78); +INSERT INTO product_slots VALUES(42,79); +INSERT INTO product_slots VALUES(42,80); +INSERT INTO product_slots VALUES(42,81); +INSERT INTO product_slots VALUES(42,82); +INSERT INTO product_slots VALUES(42,83); +INSERT INTO product_slots VALUES(42,84); +INSERT INTO product_slots VALUES(42,85); +INSERT INTO product_slots VALUES(42,86); +INSERT INTO product_slots VALUES(42,87); +INSERT INTO product_slots VALUES(42,88); +INSERT INTO product_slots VALUES(42,89); +INSERT INTO product_slots VALUES(42,90); +INSERT INTO product_slots VALUES(42,91); +INSERT INTO product_slots VALUES(42,92); +INSERT INTO product_slots VALUES(42,93); +INSERT INTO product_slots VALUES(42,94); +INSERT INTO product_slots VALUES(42,95); +INSERT INTO product_slots VALUES(42,96); +INSERT INTO product_slots VALUES(42,97); +INSERT INTO product_slots VALUES(42,98); +INSERT INTO product_slots VALUES(42,99); +INSERT INTO product_slots VALUES(42,100); +INSERT INTO product_slots VALUES(42,101); +INSERT INTO product_slots VALUES(42,102); +INSERT INTO product_slots VALUES(42,103); +INSERT INTO product_slots VALUES(42,104); +INSERT INTO product_slots VALUES(42,105); +INSERT INTO product_slots VALUES(42,106); +INSERT INTO product_slots VALUES(42,107); +INSERT INTO product_slots VALUES(42,108); +INSERT INTO product_slots VALUES(42,109); +INSERT INTO product_slots VALUES(42,110); +INSERT INTO product_slots VALUES(42,111); +INSERT INTO product_slots VALUES(42,112); +INSERT INTO product_slots VALUES(42,113); +INSERT INTO product_slots VALUES(42,114); +INSERT INTO product_slots VALUES(42,115); +INSERT INTO product_slots VALUES(42,116); +INSERT INTO product_slots VALUES(42,117); +INSERT INTO product_slots VALUES(42,118); +INSERT INTO product_slots VALUES(42,119); +INSERT INTO product_slots VALUES(42,120); +INSERT INTO product_slots VALUES(42,121); +INSERT INTO product_slots VALUES(42,122); +INSERT INTO product_slots VALUES(42,123); +INSERT INTO product_slots VALUES(42,124); +INSERT INTO product_slots VALUES(42,125); +INSERT INTO product_slots VALUES(42,126); +INSERT INTO product_slots VALUES(42,127); +INSERT INTO product_slots VALUES(42,128); +INSERT INTO product_slots VALUES(42,129); +INSERT INTO product_slots VALUES(42,130); +INSERT INTO product_slots VALUES(42,131); +INSERT INTO product_slots VALUES(42,132); +INSERT INTO product_slots VALUES(42,133); +INSERT INTO product_slots VALUES(42,134); +INSERT INTO product_slots VALUES(42,135); +INSERT INTO product_slots VALUES(42,136); +INSERT INTO product_slots VALUES(42,137); +INSERT INTO product_slots VALUES(42,138); +INSERT INTO product_slots VALUES(42,139); +INSERT INTO product_slots VALUES(42,140); +INSERT INTO product_slots VALUES(42,141); +INSERT INTO product_slots VALUES(42,142); +INSERT INTO product_slots VALUES(42,143); +INSERT INTO product_slots VALUES(42,144); +INSERT INTO product_slots VALUES(42,145); +INSERT INTO product_slots VALUES(42,146); +INSERT INTO product_slots VALUES(42,147); +INSERT INTO product_slots VALUES(42,148); +INSERT INTO product_slots VALUES(42,149); +INSERT INTO product_slots VALUES(42,150); +INSERT INTO product_slots VALUES(42,151); +INSERT INTO product_slots VALUES(42,152); +INSERT INTO product_slots VALUES(42,153); +INSERT INTO product_slots VALUES(42,154); +INSERT INTO product_slots VALUES(42,155); +INSERT INTO product_slots VALUES(42,156); +INSERT INTO product_slots VALUES(42,157); +INSERT INTO product_slots VALUES(42,158); +INSERT INTO product_slots VALUES(42,159); +INSERT INTO product_slots VALUES(42,160); +INSERT INTO product_slots VALUES(42,161); +INSERT INTO product_slots VALUES(42,162); +INSERT INTO product_slots VALUES(42,163); +INSERT INTO product_slots VALUES(42,164); +INSERT INTO product_slots VALUES(42,165); +INSERT INTO product_slots VALUES(42,166); +INSERT INTO product_slots VALUES(42,167); +INSERT INTO product_slots VALUES(42,168); +INSERT INTO product_slots VALUES(42,169); +INSERT INTO product_slots VALUES(42,170); +INSERT INTO product_slots VALUES(42,171); +INSERT INTO product_slots VALUES(42,172); +INSERT INTO product_slots VALUES(42,173); +INSERT INTO product_slots VALUES(42,174); +INSERT INTO product_slots VALUES(42,175); +INSERT INTO product_slots VALUES(42,176); +INSERT INTO product_slots VALUES(42,177); +INSERT INTO product_slots VALUES(42,178); +INSERT INTO product_slots VALUES(42,179); +INSERT INTO product_slots VALUES(42,180); +INSERT INTO product_slots VALUES(42,181); +INSERT INTO product_slots VALUES(42,182); +INSERT INTO product_slots VALUES(42,183); +INSERT INTO product_slots VALUES(42,184); +INSERT INTO product_slots VALUES(42,185); +INSERT INTO product_slots VALUES(42,186); +INSERT INTO product_slots VALUES(42,187); +INSERT INTO product_slots VALUES(42,188); +INSERT INTO product_slots VALUES(42,189); +INSERT INTO product_slots VALUES(42,190); +INSERT INTO product_slots VALUES(42,191); +INSERT INTO product_slots VALUES(42,192); +INSERT INTO product_slots VALUES(42,193); +INSERT INTO product_slots VALUES(42,194); +INSERT INTO product_slots VALUES(42,195); +INSERT INTO product_slots VALUES(42,196); +INSERT INTO product_slots VALUES(42,197); +INSERT INTO product_slots VALUES(42,198); +INSERT INTO product_slots VALUES(42,199); +INSERT INTO product_slots VALUES(42,200); +INSERT INTO product_slots VALUES(42,201); +INSERT INTO product_slots VALUES(42,202); +INSERT INTO product_slots VALUES(42,203); +INSERT INTO product_slots VALUES(42,204); +INSERT INTO product_slots VALUES(42,205); +INSERT INTO product_slots VALUES(42,206); +INSERT INTO product_slots VALUES(42,207); +INSERT INTO product_slots VALUES(42,208); +INSERT INTO product_slots VALUES(42,209); +INSERT INTO product_slots VALUES(42,210); +INSERT INTO product_slots VALUES(42,211); +INSERT INTO product_slots VALUES(42,212); +INSERT INTO product_slots VALUES(42,213); +INSERT INTO product_slots VALUES(42,214); +INSERT INTO product_slots VALUES(42,215); +INSERT INTO product_slots VALUES(42,216); +INSERT INTO product_slots VALUES(42,217); +INSERT INTO product_slots VALUES(42,218); +INSERT INTO product_slots VALUES(42,219); +INSERT INTO product_slots VALUES(42,220); +INSERT INTO product_slots VALUES(42,221); +INSERT INTO product_slots VALUES(42,222); +INSERT INTO product_slots VALUES(42,223); +INSERT INTO product_slots VALUES(42,224); +INSERT INTO product_slots VALUES(42,225); +INSERT INTO product_slots VALUES(42,226); +INSERT INTO product_slots VALUES(42,227); +INSERT INTO product_slots VALUES(42,228); +INSERT INTO product_slots VALUES(42,229); +INSERT INTO product_slots VALUES(42,230); +INSERT INTO product_slots VALUES(42,231); +INSERT INTO product_slots VALUES(42,232); +INSERT INTO product_slots VALUES(42,233); +INSERT INTO product_slots VALUES(42,234); +INSERT INTO product_slots VALUES(42,235); +INSERT INTO product_slots VALUES(42,236); +INSERT INTO product_slots VALUES(42,237); +INSERT INTO product_slots VALUES(42,238); +INSERT INTO product_slots VALUES(42,239); +INSERT INTO product_slots VALUES(42,240); +INSERT INTO product_slots VALUES(42,241); +INSERT INTO product_slots VALUES(42,242); +INSERT INTO product_slots VALUES(42,243); +INSERT INTO product_slots VALUES(42,244); +INSERT INTO product_slots VALUES(42,274); +INSERT INTO product_slots VALUES(42,275); +INSERT INTO product_slots VALUES(42,279); +INSERT INTO product_slots VALUES(42,280); +INSERT INTO product_slots VALUES(42,281); +INSERT INTO product_slots VALUES(42,282); +INSERT INTO product_slots VALUES(43,39); +INSERT INTO product_slots VALUES(43,40); +INSERT INTO product_slots VALUES(43,43); +INSERT INTO product_slots VALUES(43,45); +INSERT INTO product_slots VALUES(43,46); +INSERT INTO product_slots VALUES(43,48); +INSERT INTO product_slots VALUES(43,49); +INSERT INTO product_slots VALUES(43,51); +INSERT INTO product_slots VALUES(43,52); +INSERT INTO product_slots VALUES(43,53); +INSERT INTO product_slots VALUES(43,54); +INSERT INTO product_slots VALUES(43,57); +INSERT INTO product_slots VALUES(43,58); +INSERT INTO product_slots VALUES(43,59); +INSERT INTO product_slots VALUES(43,60); +INSERT INTO product_slots VALUES(43,61); +INSERT INTO product_slots VALUES(43,62); +INSERT INTO product_slots VALUES(43,63); +INSERT INTO product_slots VALUES(43,64); +INSERT INTO product_slots VALUES(43,65); +INSERT INTO product_slots VALUES(43,66); +INSERT INTO product_slots VALUES(43,67); +INSERT INTO product_slots VALUES(43,68); +INSERT INTO product_slots VALUES(43,69); +INSERT INTO product_slots VALUES(43,70); +INSERT INTO product_slots VALUES(43,71); +INSERT INTO product_slots VALUES(43,72); +INSERT INTO product_slots VALUES(43,73); +INSERT INTO product_slots VALUES(43,74); +INSERT INTO product_slots VALUES(43,75); +INSERT INTO product_slots VALUES(43,76); +INSERT INTO product_slots VALUES(43,77); +INSERT INTO product_slots VALUES(43,78); +INSERT INTO product_slots VALUES(43,79); +INSERT INTO product_slots VALUES(43,80); +INSERT INTO product_slots VALUES(43,81); +INSERT INTO product_slots VALUES(43,82); +INSERT INTO product_slots VALUES(43,83); +INSERT INTO product_slots VALUES(43,84); +INSERT INTO product_slots VALUES(43,85); +INSERT INTO product_slots VALUES(43,86); +INSERT INTO product_slots VALUES(43,87); +INSERT INTO product_slots VALUES(43,88); +INSERT INTO product_slots VALUES(43,89); +INSERT INTO product_slots VALUES(43,90); +INSERT INTO product_slots VALUES(43,91); +INSERT INTO product_slots VALUES(43,92); +INSERT INTO product_slots VALUES(43,93); +INSERT INTO product_slots VALUES(43,94); +INSERT INTO product_slots VALUES(43,95); +INSERT INTO product_slots VALUES(43,96); +INSERT INTO product_slots VALUES(43,97); +INSERT INTO product_slots VALUES(43,98); +INSERT INTO product_slots VALUES(43,99); +INSERT INTO product_slots VALUES(43,100); +INSERT INTO product_slots VALUES(43,102); +INSERT INTO product_slots VALUES(43,103); +INSERT INTO product_slots VALUES(43,104); +INSERT INTO product_slots VALUES(43,105); +INSERT INTO product_slots VALUES(43,106); +INSERT INTO product_slots VALUES(43,107); +INSERT INTO product_slots VALUES(43,108); +INSERT INTO product_slots VALUES(43,109); +INSERT INTO product_slots VALUES(43,110); +INSERT INTO product_slots VALUES(43,111); +INSERT INTO product_slots VALUES(43,112); +INSERT INTO product_slots VALUES(43,113); +INSERT INTO product_slots VALUES(43,114); +INSERT INTO product_slots VALUES(43,115); +INSERT INTO product_slots VALUES(43,117); +INSERT INTO product_slots VALUES(43,118); +INSERT INTO product_slots VALUES(43,119); +INSERT INTO product_slots VALUES(43,120); +INSERT INTO product_slots VALUES(43,121); +INSERT INTO product_slots VALUES(43,122); +INSERT INTO product_slots VALUES(43,123); +INSERT INTO product_slots VALUES(43,124); +INSERT INTO product_slots VALUES(43,125); +INSERT INTO product_slots VALUES(43,126); +INSERT INTO product_slots VALUES(43,127); +INSERT INTO product_slots VALUES(43,128); +INSERT INTO product_slots VALUES(43,129); +INSERT INTO product_slots VALUES(43,130); +INSERT INTO product_slots VALUES(43,131); +INSERT INTO product_slots VALUES(43,132); +INSERT INTO product_slots VALUES(43,133); +INSERT INTO product_slots VALUES(43,134); +INSERT INTO product_slots VALUES(43,135); +INSERT INTO product_slots VALUES(43,136); +INSERT INTO product_slots VALUES(43,138); +INSERT INTO product_slots VALUES(43,139); +INSERT INTO product_slots VALUES(43,140); +INSERT INTO product_slots VALUES(43,141); +INSERT INTO product_slots VALUES(43,142); +INSERT INTO product_slots VALUES(43,143); +INSERT INTO product_slots VALUES(43,145); +INSERT INTO product_slots VALUES(43,146); +INSERT INTO product_slots VALUES(43,147); +INSERT INTO product_slots VALUES(43,148); +INSERT INTO product_slots VALUES(43,149); +INSERT INTO product_slots VALUES(43,150); +INSERT INTO product_slots VALUES(43,151); +INSERT INTO product_slots VALUES(43,152); +INSERT INTO product_slots VALUES(43,153); +INSERT INTO product_slots VALUES(43,154); +INSERT INTO product_slots VALUES(43,155); +INSERT INTO product_slots VALUES(43,156); +INSERT INTO product_slots VALUES(43,157); +INSERT INTO product_slots VALUES(43,158); +INSERT INTO product_slots VALUES(43,159); +INSERT INTO product_slots VALUES(43,160); +INSERT INTO product_slots VALUES(43,161); +INSERT INTO product_slots VALUES(43,162); +INSERT INTO product_slots VALUES(43,163); +INSERT INTO product_slots VALUES(43,164); +INSERT INTO product_slots VALUES(43,165); +INSERT INTO product_slots VALUES(43,166); +INSERT INTO product_slots VALUES(43,167); +INSERT INTO product_slots VALUES(43,168); +INSERT INTO product_slots VALUES(43,169); +INSERT INTO product_slots VALUES(43,170); +INSERT INTO product_slots VALUES(43,171); +INSERT INTO product_slots VALUES(43,172); +INSERT INTO product_slots VALUES(43,173); +INSERT INTO product_slots VALUES(43,174); +INSERT INTO product_slots VALUES(43,175); +INSERT INTO product_slots VALUES(43,176); +INSERT INTO product_slots VALUES(43,177); +INSERT INTO product_slots VALUES(43,178); +INSERT INTO product_slots VALUES(43,179); +INSERT INTO product_slots VALUES(43,180); +INSERT INTO product_slots VALUES(43,181); +INSERT INTO product_slots VALUES(43,182); +INSERT INTO product_slots VALUES(43,183); +INSERT INTO product_slots VALUES(43,184); +INSERT INTO product_slots VALUES(43,185); +INSERT INTO product_slots VALUES(43,186); +INSERT INTO product_slots VALUES(43,187); +INSERT INTO product_slots VALUES(43,188); +INSERT INTO product_slots VALUES(43,189); +INSERT INTO product_slots VALUES(43,190); +INSERT INTO product_slots VALUES(43,191); +INSERT INTO product_slots VALUES(43,192); +INSERT INTO product_slots VALUES(43,193); +INSERT INTO product_slots VALUES(43,194); +INSERT INTO product_slots VALUES(43,195); +INSERT INTO product_slots VALUES(43,196); +INSERT INTO product_slots VALUES(43,197); +INSERT INTO product_slots VALUES(43,198); +INSERT INTO product_slots VALUES(43,199); +INSERT INTO product_slots VALUES(43,200); +INSERT INTO product_slots VALUES(43,201); +INSERT INTO product_slots VALUES(43,202); +INSERT INTO product_slots VALUES(43,203); +INSERT INTO product_slots VALUES(43,204); +INSERT INTO product_slots VALUES(43,205); +INSERT INTO product_slots VALUES(43,206); +INSERT INTO product_slots VALUES(43,207); +INSERT INTO product_slots VALUES(43,208); +INSERT INTO product_slots VALUES(43,209); +INSERT INTO product_slots VALUES(43,210); +INSERT INTO product_slots VALUES(43,211); +INSERT INTO product_slots VALUES(43,212); +INSERT INTO product_slots VALUES(43,213); +INSERT INTO product_slots VALUES(43,214); +INSERT INTO product_slots VALUES(43,215); +INSERT INTO product_slots VALUES(43,216); +INSERT INTO product_slots VALUES(43,217); +INSERT INTO product_slots VALUES(43,218); +INSERT INTO product_slots VALUES(43,219); +INSERT INTO product_slots VALUES(43,220); +INSERT INTO product_slots VALUES(43,221); +INSERT INTO product_slots VALUES(43,222); +INSERT INTO product_slots VALUES(43,223); +INSERT INTO product_slots VALUES(43,224); +INSERT INTO product_slots VALUES(43,225); +INSERT INTO product_slots VALUES(43,226); +INSERT INTO product_slots VALUES(43,227); +INSERT INTO product_slots VALUES(43,228); +INSERT INTO product_slots VALUES(43,229); +INSERT INTO product_slots VALUES(43,230); +INSERT INTO product_slots VALUES(43,231); +INSERT INTO product_slots VALUES(43,232); +INSERT INTO product_slots VALUES(43,233); +INSERT INTO product_slots VALUES(43,234); +INSERT INTO product_slots VALUES(43,235); +INSERT INTO product_slots VALUES(43,236); +INSERT INTO product_slots VALUES(43,237); +INSERT INTO product_slots VALUES(43,238); +INSERT INTO product_slots VALUES(43,239); +INSERT INTO product_slots VALUES(43,240); +INSERT INTO product_slots VALUES(43,241); +INSERT INTO product_slots VALUES(43,242); +INSERT INTO product_slots VALUES(43,243); +INSERT INTO product_slots VALUES(43,244); +INSERT INTO product_slots VALUES(43,274); +INSERT INTO product_slots VALUES(43,275); +INSERT INTO product_slots VALUES(43,279); +INSERT INTO product_slots VALUES(43,280); +INSERT INTO product_slots VALUES(43,281); +INSERT INTO product_slots VALUES(43,282); +INSERT INTO product_slots VALUES(43,283); +INSERT INTO product_slots VALUES(43,284); +INSERT INTO product_slots VALUES(43,285); +INSERT INTO product_slots VALUES(43,286); +INSERT INTO product_slots VALUES(43,287); +INSERT INTO product_slots VALUES(44,39); +INSERT INTO product_slots VALUES(44,40); +INSERT INTO product_slots VALUES(44,43); +INSERT INTO product_slots VALUES(44,45); +INSERT INTO product_slots VALUES(44,46); +INSERT INTO product_slots VALUES(44,48); +INSERT INTO product_slots VALUES(44,49); +INSERT INTO product_slots VALUES(44,51); +INSERT INTO product_slots VALUES(44,52); +INSERT INTO product_slots VALUES(44,53); +INSERT INTO product_slots VALUES(44,54); +INSERT INTO product_slots VALUES(44,57); +INSERT INTO product_slots VALUES(44,58); +INSERT INTO product_slots VALUES(44,59); +INSERT INTO product_slots VALUES(44,60); +INSERT INTO product_slots VALUES(44,61); +INSERT INTO product_slots VALUES(44,62); +INSERT INTO product_slots VALUES(44,63); +INSERT INTO product_slots VALUES(44,64); +INSERT INTO product_slots VALUES(44,65); +INSERT INTO product_slots VALUES(44,66); +INSERT INTO product_slots VALUES(44,67); +INSERT INTO product_slots VALUES(44,68); +INSERT INTO product_slots VALUES(44,69); +INSERT INTO product_slots VALUES(44,70); +INSERT INTO product_slots VALUES(44,71); +INSERT INTO product_slots VALUES(44,72); +INSERT INTO product_slots VALUES(44,73); +INSERT INTO product_slots VALUES(44,74); +INSERT INTO product_slots VALUES(44,75); +INSERT INTO product_slots VALUES(44,76); +INSERT INTO product_slots VALUES(44,77); +INSERT INTO product_slots VALUES(44,78); +INSERT INTO product_slots VALUES(44,79); +INSERT INTO product_slots VALUES(44,80); +INSERT INTO product_slots VALUES(44,81); +INSERT INTO product_slots VALUES(44,82); +INSERT INTO product_slots VALUES(44,83); +INSERT INTO product_slots VALUES(44,84); +INSERT INTO product_slots VALUES(44,85); +INSERT INTO product_slots VALUES(44,86); +INSERT INTO product_slots VALUES(44,87); +INSERT INTO product_slots VALUES(44,88); +INSERT INTO product_slots VALUES(44,89); +INSERT INTO product_slots VALUES(44,90); +INSERT INTO product_slots VALUES(44,91); +INSERT INTO product_slots VALUES(44,92); +INSERT INTO product_slots VALUES(44,93); +INSERT INTO product_slots VALUES(44,94); +INSERT INTO product_slots VALUES(44,95); +INSERT INTO product_slots VALUES(44,96); +INSERT INTO product_slots VALUES(44,97); +INSERT INTO product_slots VALUES(44,98); +INSERT INTO product_slots VALUES(44,99); +INSERT INTO product_slots VALUES(44,100); +INSERT INTO product_slots VALUES(44,102); +INSERT INTO product_slots VALUES(44,103); +INSERT INTO product_slots VALUES(44,104); +INSERT INTO product_slots VALUES(44,105); +INSERT INTO product_slots VALUES(44,106); +INSERT INTO product_slots VALUES(44,107); +INSERT INTO product_slots VALUES(44,108); +INSERT INTO product_slots VALUES(44,109); +INSERT INTO product_slots VALUES(44,110); +INSERT INTO product_slots VALUES(44,111); +INSERT INTO product_slots VALUES(44,112); +INSERT INTO product_slots VALUES(44,113); +INSERT INTO product_slots VALUES(44,114); +INSERT INTO product_slots VALUES(44,115); +INSERT INTO product_slots VALUES(44,117); +INSERT INTO product_slots VALUES(44,118); +INSERT INTO product_slots VALUES(44,119); +INSERT INTO product_slots VALUES(44,120); +INSERT INTO product_slots VALUES(44,121); +INSERT INTO product_slots VALUES(44,122); +INSERT INTO product_slots VALUES(44,123); +INSERT INTO product_slots VALUES(44,124); +INSERT INTO product_slots VALUES(44,125); +INSERT INTO product_slots VALUES(44,126); +INSERT INTO product_slots VALUES(44,127); +INSERT INTO product_slots VALUES(44,128); +INSERT INTO product_slots VALUES(44,129); +INSERT INTO product_slots VALUES(44,130); +INSERT INTO product_slots VALUES(44,131); +INSERT INTO product_slots VALUES(44,132); +INSERT INTO product_slots VALUES(44,133); +INSERT INTO product_slots VALUES(44,134); +INSERT INTO product_slots VALUES(44,135); +INSERT INTO product_slots VALUES(44,136); +INSERT INTO product_slots VALUES(44,138); +INSERT INTO product_slots VALUES(44,139); +INSERT INTO product_slots VALUES(44,140); +INSERT INTO product_slots VALUES(44,141); +INSERT INTO product_slots VALUES(44,142); +INSERT INTO product_slots VALUES(44,143); +INSERT INTO product_slots VALUES(44,145); +INSERT INTO product_slots VALUES(44,146); +INSERT INTO product_slots VALUES(44,147); +INSERT INTO product_slots VALUES(44,148); +INSERT INTO product_slots VALUES(44,149); +INSERT INTO product_slots VALUES(44,150); +INSERT INTO product_slots VALUES(44,151); +INSERT INTO product_slots VALUES(44,152); +INSERT INTO product_slots VALUES(44,153); +INSERT INTO product_slots VALUES(44,154); +INSERT INTO product_slots VALUES(44,155); +INSERT INTO product_slots VALUES(44,156); +INSERT INTO product_slots VALUES(44,157); +INSERT INTO product_slots VALUES(44,158); +INSERT INTO product_slots VALUES(44,159); +INSERT INTO product_slots VALUES(44,160); +INSERT INTO product_slots VALUES(44,161); +INSERT INTO product_slots VALUES(44,162); +INSERT INTO product_slots VALUES(44,163); +INSERT INTO product_slots VALUES(44,164); +INSERT INTO product_slots VALUES(44,165); +INSERT INTO product_slots VALUES(44,166); +INSERT INTO product_slots VALUES(44,167); +INSERT INTO product_slots VALUES(44,168); +INSERT INTO product_slots VALUES(44,169); +INSERT INTO product_slots VALUES(44,170); +INSERT INTO product_slots VALUES(44,171); +INSERT INTO product_slots VALUES(44,172); +INSERT INTO product_slots VALUES(44,173); +INSERT INTO product_slots VALUES(44,174); +INSERT INTO product_slots VALUES(44,175); +INSERT INTO product_slots VALUES(44,176); +INSERT INTO product_slots VALUES(44,177); +INSERT INTO product_slots VALUES(44,178); +INSERT INTO product_slots VALUES(44,179); +INSERT INTO product_slots VALUES(44,180); +INSERT INTO product_slots VALUES(44,181); +INSERT INTO product_slots VALUES(44,182); +INSERT INTO product_slots VALUES(44,183); +INSERT INTO product_slots VALUES(44,184); +INSERT INTO product_slots VALUES(44,185); +INSERT INTO product_slots VALUES(44,186); +INSERT INTO product_slots VALUES(44,187); +INSERT INTO product_slots VALUES(44,188); +INSERT INTO product_slots VALUES(44,189); +INSERT INTO product_slots VALUES(44,190); +INSERT INTO product_slots VALUES(44,191); +INSERT INTO product_slots VALUES(44,192); +INSERT INTO product_slots VALUES(44,193); +INSERT INTO product_slots VALUES(44,194); +INSERT INTO product_slots VALUES(44,195); +INSERT INTO product_slots VALUES(44,196); +INSERT INTO product_slots VALUES(44,197); +INSERT INTO product_slots VALUES(44,198); +INSERT INTO product_slots VALUES(44,199); +INSERT INTO product_slots VALUES(44,200); +INSERT INTO product_slots VALUES(44,201); +INSERT INTO product_slots VALUES(44,202); +INSERT INTO product_slots VALUES(44,203); +INSERT INTO product_slots VALUES(44,204); +INSERT INTO product_slots VALUES(44,205); +INSERT INTO product_slots VALUES(44,206); +INSERT INTO product_slots VALUES(44,207); +INSERT INTO product_slots VALUES(44,208); +INSERT INTO product_slots VALUES(44,209); +INSERT INTO product_slots VALUES(44,210); +INSERT INTO product_slots VALUES(44,211); +INSERT INTO product_slots VALUES(44,212); +INSERT INTO product_slots VALUES(44,213); +INSERT INTO product_slots VALUES(44,214); +INSERT INTO product_slots VALUES(44,215); +INSERT INTO product_slots VALUES(44,216); +INSERT INTO product_slots VALUES(44,217); +INSERT INTO product_slots VALUES(44,218); +INSERT INTO product_slots VALUES(44,219); +INSERT INTO product_slots VALUES(44,220); +INSERT INTO product_slots VALUES(44,221); +INSERT INTO product_slots VALUES(44,222); +INSERT INTO product_slots VALUES(44,223); +INSERT INTO product_slots VALUES(44,224); +INSERT INTO product_slots VALUES(44,225); +INSERT INTO product_slots VALUES(44,226); +INSERT INTO product_slots VALUES(44,227); +INSERT INTO product_slots VALUES(44,228); +INSERT INTO product_slots VALUES(44,229); +INSERT INTO product_slots VALUES(44,230); +INSERT INTO product_slots VALUES(44,231); +INSERT INTO product_slots VALUES(44,232); +INSERT INTO product_slots VALUES(44,233); +INSERT INTO product_slots VALUES(44,234); +INSERT INTO product_slots VALUES(44,235); +INSERT INTO product_slots VALUES(44,236); +INSERT INTO product_slots VALUES(44,237); +INSERT INTO product_slots VALUES(44,238); +INSERT INTO product_slots VALUES(44,239); +INSERT INTO product_slots VALUES(44,240); +INSERT INTO product_slots VALUES(44,241); +INSERT INTO product_slots VALUES(44,242); +INSERT INTO product_slots VALUES(44,243); +INSERT INTO product_slots VALUES(44,244); +INSERT INTO product_slots VALUES(44,274); +INSERT INTO product_slots VALUES(44,275); +INSERT INTO product_slots VALUES(44,279); +INSERT INTO product_slots VALUES(44,280); +INSERT INTO product_slots VALUES(44,281); +INSERT INTO product_slots VALUES(44,282); +INSERT INTO product_slots VALUES(44,283); +INSERT INTO product_slots VALUES(44,284); +INSERT INTO product_slots VALUES(44,285); +INSERT INTO product_slots VALUES(44,286); +INSERT INTO product_slots VALUES(44,287); +INSERT INTO product_slots VALUES(45,39); +INSERT INTO product_slots VALUES(45,41); +INSERT INTO product_slots VALUES(45,43); +INSERT INTO product_slots VALUES(45,44); +INSERT INTO product_slots VALUES(45,45); +INSERT INTO product_slots VALUES(45,46); +INSERT INTO product_slots VALUES(45,47); +INSERT INTO product_slots VALUES(45,48); +INSERT INTO product_slots VALUES(45,49); +INSERT INTO product_slots VALUES(45,50); +INSERT INTO product_slots VALUES(45,51); +INSERT INTO product_slots VALUES(45,52); +INSERT INTO product_slots VALUES(45,53); +INSERT INTO product_slots VALUES(45,54); +INSERT INTO product_slots VALUES(45,55); +INSERT INTO product_slots VALUES(45,56); +INSERT INTO product_slots VALUES(45,57); +INSERT INTO product_slots VALUES(45,58); +INSERT INTO product_slots VALUES(45,59); +INSERT INTO product_slots VALUES(45,60); +INSERT INTO product_slots VALUES(45,61); +INSERT INTO product_slots VALUES(45,62); +INSERT INTO product_slots VALUES(45,63); +INSERT INTO product_slots VALUES(45,64); +INSERT INTO product_slots VALUES(45,65); +INSERT INTO product_slots VALUES(45,66); +INSERT INTO product_slots VALUES(45,67); +INSERT INTO product_slots VALUES(45,68); +INSERT INTO product_slots VALUES(45,69); +INSERT INTO product_slots VALUES(45,70); +INSERT INTO product_slots VALUES(45,71); +INSERT INTO product_slots VALUES(45,72); +INSERT INTO product_slots VALUES(45,73); +INSERT INTO product_slots VALUES(45,74); +INSERT INTO product_slots VALUES(45,75); +INSERT INTO product_slots VALUES(45,76); +INSERT INTO product_slots VALUES(45,77); +INSERT INTO product_slots VALUES(45,78); +INSERT INTO product_slots VALUES(45,79); +INSERT INTO product_slots VALUES(45,80); +INSERT INTO product_slots VALUES(45,81); +INSERT INTO product_slots VALUES(45,82); +INSERT INTO product_slots VALUES(45,83); +INSERT INTO product_slots VALUES(45,84); +INSERT INTO product_slots VALUES(45,85); +INSERT INTO product_slots VALUES(45,86); +INSERT INTO product_slots VALUES(45,87); +INSERT INTO product_slots VALUES(45,88); +INSERT INTO product_slots VALUES(45,89); +INSERT INTO product_slots VALUES(45,90); +INSERT INTO product_slots VALUES(45,91); +INSERT INTO product_slots VALUES(45,92); +INSERT INTO product_slots VALUES(45,93); +INSERT INTO product_slots VALUES(45,94); +INSERT INTO product_slots VALUES(45,95); +INSERT INTO product_slots VALUES(45,96); +INSERT INTO product_slots VALUES(45,97); +INSERT INTO product_slots VALUES(45,98); +INSERT INTO product_slots VALUES(45,99); +INSERT INTO product_slots VALUES(45,100); +INSERT INTO product_slots VALUES(45,101); +INSERT INTO product_slots VALUES(45,102); +INSERT INTO product_slots VALUES(45,103); +INSERT INTO product_slots VALUES(45,104); +INSERT INTO product_slots VALUES(45,105); +INSERT INTO product_slots VALUES(45,106); +INSERT INTO product_slots VALUES(45,107); +INSERT INTO product_slots VALUES(45,108); +INSERT INTO product_slots VALUES(45,109); +INSERT INTO product_slots VALUES(45,110); +INSERT INTO product_slots VALUES(45,111); +INSERT INTO product_slots VALUES(45,112); +INSERT INTO product_slots VALUES(45,113); +INSERT INTO product_slots VALUES(45,114); +INSERT INTO product_slots VALUES(45,115); +INSERT INTO product_slots VALUES(45,116); +INSERT INTO product_slots VALUES(45,117); +INSERT INTO product_slots VALUES(45,118); +INSERT INTO product_slots VALUES(45,119); +INSERT INTO product_slots VALUES(45,120); +INSERT INTO product_slots VALUES(45,121); +INSERT INTO product_slots VALUES(45,122); +INSERT INTO product_slots VALUES(45,123); +INSERT INTO product_slots VALUES(45,124); +INSERT INTO product_slots VALUES(45,125); +INSERT INTO product_slots VALUES(45,126); +INSERT INTO product_slots VALUES(45,127); +INSERT INTO product_slots VALUES(45,128); +INSERT INTO product_slots VALUES(45,129); +INSERT INTO product_slots VALUES(45,130); +INSERT INTO product_slots VALUES(45,131); +INSERT INTO product_slots VALUES(45,132); +INSERT INTO product_slots VALUES(45,133); +INSERT INTO product_slots VALUES(45,134); +INSERT INTO product_slots VALUES(45,135); +INSERT INTO product_slots VALUES(45,136); +INSERT INTO product_slots VALUES(45,137); +INSERT INTO product_slots VALUES(45,138); +INSERT INTO product_slots VALUES(45,139); +INSERT INTO product_slots VALUES(45,140); +INSERT INTO product_slots VALUES(45,141); +INSERT INTO product_slots VALUES(45,142); +INSERT INTO product_slots VALUES(45,143); +INSERT INTO product_slots VALUES(45,144); +INSERT INTO product_slots VALUES(45,145); +INSERT INTO product_slots VALUES(45,146); +INSERT INTO product_slots VALUES(45,147); +INSERT INTO product_slots VALUES(45,148); +INSERT INTO product_slots VALUES(45,149); +INSERT INTO product_slots VALUES(45,150); +INSERT INTO product_slots VALUES(45,151); +INSERT INTO product_slots VALUES(45,152); +INSERT INTO product_slots VALUES(45,153); +INSERT INTO product_slots VALUES(45,154); +INSERT INTO product_slots VALUES(45,155); +INSERT INTO product_slots VALUES(45,156); +INSERT INTO product_slots VALUES(45,157); +INSERT INTO product_slots VALUES(45,158); +INSERT INTO product_slots VALUES(45,159); +INSERT INTO product_slots VALUES(45,160); +INSERT INTO product_slots VALUES(45,161); +INSERT INTO product_slots VALUES(45,162); +INSERT INTO product_slots VALUES(45,163); +INSERT INTO product_slots VALUES(45,164); +INSERT INTO product_slots VALUES(45,165); +INSERT INTO product_slots VALUES(45,166); +INSERT INTO product_slots VALUES(45,167); +INSERT INTO product_slots VALUES(45,168); +INSERT INTO product_slots VALUES(45,169); +INSERT INTO product_slots VALUES(45,170); +INSERT INTO product_slots VALUES(45,171); +INSERT INTO product_slots VALUES(45,172); +INSERT INTO product_slots VALUES(45,173); +INSERT INTO product_slots VALUES(45,174); +INSERT INTO product_slots VALUES(45,175); +INSERT INTO product_slots VALUES(45,176); +INSERT INTO product_slots VALUES(45,177); +INSERT INTO product_slots VALUES(45,178); +INSERT INTO product_slots VALUES(45,179); +INSERT INTO product_slots VALUES(45,180); +INSERT INTO product_slots VALUES(45,181); +INSERT INTO product_slots VALUES(45,182); +INSERT INTO product_slots VALUES(45,183); +INSERT INTO product_slots VALUES(45,184); +INSERT INTO product_slots VALUES(45,185); +INSERT INTO product_slots VALUES(45,186); +INSERT INTO product_slots VALUES(45,187); +INSERT INTO product_slots VALUES(45,188); +INSERT INTO product_slots VALUES(45,189); +INSERT INTO product_slots VALUES(45,190); +INSERT INTO product_slots VALUES(45,191); +INSERT INTO product_slots VALUES(45,192); +INSERT INTO product_slots VALUES(45,193); +INSERT INTO product_slots VALUES(45,194); +INSERT INTO product_slots VALUES(45,195); +INSERT INTO product_slots VALUES(45,196); +INSERT INTO product_slots VALUES(45,197); +INSERT INTO product_slots VALUES(45,198); +INSERT INTO product_slots VALUES(45,199); +INSERT INTO product_slots VALUES(45,200); +INSERT INTO product_slots VALUES(45,201); +INSERT INTO product_slots VALUES(45,202); +INSERT INTO product_slots VALUES(45,203); +INSERT INTO product_slots VALUES(45,204); +INSERT INTO product_slots VALUES(45,205); +INSERT INTO product_slots VALUES(45,206); +INSERT INTO product_slots VALUES(45,207); +INSERT INTO product_slots VALUES(45,208); +INSERT INTO product_slots VALUES(45,209); +INSERT INTO product_slots VALUES(45,210); +INSERT INTO product_slots VALUES(45,211); +INSERT INTO product_slots VALUES(45,212); +INSERT INTO product_slots VALUES(45,213); +INSERT INTO product_slots VALUES(45,214); +INSERT INTO product_slots VALUES(45,215); +INSERT INTO product_slots VALUES(45,216); +INSERT INTO product_slots VALUES(45,217); +INSERT INTO product_slots VALUES(45,218); +INSERT INTO product_slots VALUES(45,219); +INSERT INTO product_slots VALUES(45,220); +INSERT INTO product_slots VALUES(45,221); +INSERT INTO product_slots VALUES(45,222); +INSERT INTO product_slots VALUES(45,223); +INSERT INTO product_slots VALUES(45,224); +INSERT INTO product_slots VALUES(45,225); +INSERT INTO product_slots VALUES(45,226); +INSERT INTO product_slots VALUES(45,227); +INSERT INTO product_slots VALUES(45,228); +INSERT INTO product_slots VALUES(45,229); +INSERT INTO product_slots VALUES(45,230); +INSERT INTO product_slots VALUES(45,231); +INSERT INTO product_slots VALUES(45,232); +INSERT INTO product_slots VALUES(45,233); +INSERT INTO product_slots VALUES(45,234); +INSERT INTO product_slots VALUES(45,235); +INSERT INTO product_slots VALUES(45,236); +INSERT INTO product_slots VALUES(45,237); +INSERT INTO product_slots VALUES(45,238); +INSERT INTO product_slots VALUES(45,239); +INSERT INTO product_slots VALUES(45,240); +INSERT INTO product_slots VALUES(45,241); +INSERT INTO product_slots VALUES(45,242); +INSERT INTO product_slots VALUES(45,243); +INSERT INTO product_slots VALUES(45,244); +INSERT INTO product_slots VALUES(45,274); +INSERT INTO product_slots VALUES(45,275); +INSERT INTO product_slots VALUES(45,279); +INSERT INTO product_slots VALUES(45,280); +INSERT INTO product_slots VALUES(45,281); +INSERT INTO product_slots VALUES(45,282); +INSERT INTO product_slots VALUES(45,283); +INSERT INTO product_slots VALUES(45,284); +INSERT INTO product_slots VALUES(45,285); +INSERT INTO product_slots VALUES(45,286); +INSERT INTO product_slots VALUES(45,287); +INSERT INTO product_slots VALUES(46,39); +INSERT INTO product_slots VALUES(46,40); +INSERT INTO product_slots VALUES(46,43); +INSERT INTO product_slots VALUES(46,45); +INSERT INTO product_slots VALUES(46,46); +INSERT INTO product_slots VALUES(46,48); +INSERT INTO product_slots VALUES(46,49); +INSERT INTO product_slots VALUES(46,51); +INSERT INTO product_slots VALUES(46,52); +INSERT INTO product_slots VALUES(46,53); +INSERT INTO product_slots VALUES(46,54); +INSERT INTO product_slots VALUES(46,57); +INSERT INTO product_slots VALUES(46,58); +INSERT INTO product_slots VALUES(46,59); +INSERT INTO product_slots VALUES(46,60); +INSERT INTO product_slots VALUES(46,61); +INSERT INTO product_slots VALUES(46,62); +INSERT INTO product_slots VALUES(46,63); +INSERT INTO product_slots VALUES(46,64); +INSERT INTO product_slots VALUES(46,65); +INSERT INTO product_slots VALUES(46,66); +INSERT INTO product_slots VALUES(46,67); +INSERT INTO product_slots VALUES(46,68); +INSERT INTO product_slots VALUES(46,69); +INSERT INTO product_slots VALUES(46,70); +INSERT INTO product_slots VALUES(46,71); +INSERT INTO product_slots VALUES(46,72); +INSERT INTO product_slots VALUES(46,73); +INSERT INTO product_slots VALUES(46,74); +INSERT INTO product_slots VALUES(46,75); +INSERT INTO product_slots VALUES(46,76); +INSERT INTO product_slots VALUES(46,77); +INSERT INTO product_slots VALUES(46,78); +INSERT INTO product_slots VALUES(46,79); +INSERT INTO product_slots VALUES(46,80); +INSERT INTO product_slots VALUES(46,81); +INSERT INTO product_slots VALUES(46,82); +INSERT INTO product_slots VALUES(46,83); +INSERT INTO product_slots VALUES(46,84); +INSERT INTO product_slots VALUES(46,85); +INSERT INTO product_slots VALUES(46,86); +INSERT INTO product_slots VALUES(46,87); +INSERT INTO product_slots VALUES(46,88); +INSERT INTO product_slots VALUES(46,89); +INSERT INTO product_slots VALUES(46,90); +INSERT INTO product_slots VALUES(46,91); +INSERT INTO product_slots VALUES(46,92); +INSERT INTO product_slots VALUES(46,93); +INSERT INTO product_slots VALUES(46,94); +INSERT INTO product_slots VALUES(46,95); +INSERT INTO product_slots VALUES(46,96); +INSERT INTO product_slots VALUES(46,97); +INSERT INTO product_slots VALUES(46,98); +INSERT INTO product_slots VALUES(46,99); +INSERT INTO product_slots VALUES(46,100); +INSERT INTO product_slots VALUES(46,102); +INSERT INTO product_slots VALUES(46,103); +INSERT INTO product_slots VALUES(46,104); +INSERT INTO product_slots VALUES(46,105); +INSERT INTO product_slots VALUES(46,106); +INSERT INTO product_slots VALUES(46,107); +INSERT INTO product_slots VALUES(46,108); +INSERT INTO product_slots VALUES(46,109); +INSERT INTO product_slots VALUES(46,110); +INSERT INTO product_slots VALUES(46,111); +INSERT INTO product_slots VALUES(46,112); +INSERT INTO product_slots VALUES(46,113); +INSERT INTO product_slots VALUES(46,114); +INSERT INTO product_slots VALUES(46,115); +INSERT INTO product_slots VALUES(46,117); +INSERT INTO product_slots VALUES(46,118); +INSERT INTO product_slots VALUES(46,119); +INSERT INTO product_slots VALUES(46,120); +INSERT INTO product_slots VALUES(46,121); +INSERT INTO product_slots VALUES(46,122); +INSERT INTO product_slots VALUES(46,123); +INSERT INTO product_slots VALUES(46,124); +INSERT INTO product_slots VALUES(46,125); +INSERT INTO product_slots VALUES(46,126); +INSERT INTO product_slots VALUES(46,127); +INSERT INTO product_slots VALUES(46,128); +INSERT INTO product_slots VALUES(46,129); +INSERT INTO product_slots VALUES(46,130); +INSERT INTO product_slots VALUES(46,131); +INSERT INTO product_slots VALUES(46,132); +INSERT INTO product_slots VALUES(46,133); +INSERT INTO product_slots VALUES(46,134); +INSERT INTO product_slots VALUES(46,135); +INSERT INTO product_slots VALUES(46,136); +INSERT INTO product_slots VALUES(46,138); +INSERT INTO product_slots VALUES(46,139); +INSERT INTO product_slots VALUES(46,140); +INSERT INTO product_slots VALUES(46,141); +INSERT INTO product_slots VALUES(46,142); +INSERT INTO product_slots VALUES(46,143); +INSERT INTO product_slots VALUES(46,145); +INSERT INTO product_slots VALUES(46,146); +INSERT INTO product_slots VALUES(46,147); +INSERT INTO product_slots VALUES(46,148); +INSERT INTO product_slots VALUES(46,149); +INSERT INTO product_slots VALUES(46,150); +INSERT INTO product_slots VALUES(46,151); +INSERT INTO product_slots VALUES(46,152); +INSERT INTO product_slots VALUES(46,153); +INSERT INTO product_slots VALUES(46,154); +INSERT INTO product_slots VALUES(46,155); +INSERT INTO product_slots VALUES(46,156); +INSERT INTO product_slots VALUES(46,157); +INSERT INTO product_slots VALUES(46,158); +INSERT INTO product_slots VALUES(46,159); +INSERT INTO product_slots VALUES(46,160); +INSERT INTO product_slots VALUES(46,161); +INSERT INTO product_slots VALUES(46,162); +INSERT INTO product_slots VALUES(46,163); +INSERT INTO product_slots VALUES(46,164); +INSERT INTO product_slots VALUES(46,165); +INSERT INTO product_slots VALUES(46,166); +INSERT INTO product_slots VALUES(46,167); +INSERT INTO product_slots VALUES(46,168); +INSERT INTO product_slots VALUES(46,169); +INSERT INTO product_slots VALUES(46,170); +INSERT INTO product_slots VALUES(46,171); +INSERT INTO product_slots VALUES(46,172); +INSERT INTO product_slots VALUES(46,173); +INSERT INTO product_slots VALUES(46,174); +INSERT INTO product_slots VALUES(46,175); +INSERT INTO product_slots VALUES(46,176); +INSERT INTO product_slots VALUES(46,177); +INSERT INTO product_slots VALUES(46,178); +INSERT INTO product_slots VALUES(46,179); +INSERT INTO product_slots VALUES(46,180); +INSERT INTO product_slots VALUES(46,181); +INSERT INTO product_slots VALUES(46,182); +INSERT INTO product_slots VALUES(46,183); +INSERT INTO product_slots VALUES(46,184); +INSERT INTO product_slots VALUES(46,185); +INSERT INTO product_slots VALUES(46,186); +INSERT INTO product_slots VALUES(46,187); +INSERT INTO product_slots VALUES(46,188); +INSERT INTO product_slots VALUES(46,189); +INSERT INTO product_slots VALUES(46,190); +INSERT INTO product_slots VALUES(46,191); +INSERT INTO product_slots VALUES(46,192); +INSERT INTO product_slots VALUES(46,193); +INSERT INTO product_slots VALUES(46,194); +INSERT INTO product_slots VALUES(46,195); +INSERT INTO product_slots VALUES(46,196); +INSERT INTO product_slots VALUES(46,197); +INSERT INTO product_slots VALUES(46,198); +INSERT INTO product_slots VALUES(46,199); +INSERT INTO product_slots VALUES(46,200); +INSERT INTO product_slots VALUES(46,201); +INSERT INTO product_slots VALUES(46,202); +INSERT INTO product_slots VALUES(46,203); +INSERT INTO product_slots VALUES(46,204); +INSERT INTO product_slots VALUES(46,205); +INSERT INTO product_slots VALUES(46,206); +INSERT INTO product_slots VALUES(46,207); +INSERT INTO product_slots VALUES(46,208); +INSERT INTO product_slots VALUES(46,209); +INSERT INTO product_slots VALUES(46,210); +INSERT INTO product_slots VALUES(46,211); +INSERT INTO product_slots VALUES(46,212); +INSERT INTO product_slots VALUES(46,213); +INSERT INTO product_slots VALUES(46,214); +INSERT INTO product_slots VALUES(46,215); +INSERT INTO product_slots VALUES(46,216); +INSERT INTO product_slots VALUES(46,217); +INSERT INTO product_slots VALUES(46,218); +INSERT INTO product_slots VALUES(46,219); +INSERT INTO product_slots VALUES(46,220); +INSERT INTO product_slots VALUES(46,221); +INSERT INTO product_slots VALUES(46,222); +INSERT INTO product_slots VALUES(46,223); +INSERT INTO product_slots VALUES(46,224); +INSERT INTO product_slots VALUES(46,225); +INSERT INTO product_slots VALUES(46,226); +INSERT INTO product_slots VALUES(46,227); +INSERT INTO product_slots VALUES(46,228); +INSERT INTO product_slots VALUES(46,229); +INSERT INTO product_slots VALUES(46,230); +INSERT INTO product_slots VALUES(46,231); +INSERT INTO product_slots VALUES(46,232); +INSERT INTO product_slots VALUES(46,233); +INSERT INTO product_slots VALUES(46,234); +INSERT INTO product_slots VALUES(46,235); +INSERT INTO product_slots VALUES(46,236); +INSERT INTO product_slots VALUES(46,237); +INSERT INTO product_slots VALUES(46,238); +INSERT INTO product_slots VALUES(46,239); +INSERT INTO product_slots VALUES(46,240); +INSERT INTO product_slots VALUES(46,241); +INSERT INTO product_slots VALUES(46,242); +INSERT INTO product_slots VALUES(46,243); +INSERT INTO product_slots VALUES(46,244); +INSERT INTO product_slots VALUES(46,274); +INSERT INTO product_slots VALUES(46,275); +INSERT INTO product_slots VALUES(46,279); +INSERT INTO product_slots VALUES(46,280); +INSERT INTO product_slots VALUES(46,281); +INSERT INTO product_slots VALUES(46,282); +INSERT INTO product_slots VALUES(46,283); +INSERT INTO product_slots VALUES(46,284); +INSERT INTO product_slots VALUES(46,285); +INSERT INTO product_slots VALUES(46,286); +INSERT INTO product_slots VALUES(46,287); +INSERT INTO product_slots VALUES(47,39); +INSERT INTO product_slots VALUES(47,40); +INSERT INTO product_slots VALUES(47,43); +INSERT INTO product_slots VALUES(47,45); +INSERT INTO product_slots VALUES(47,46); +INSERT INTO product_slots VALUES(47,48); +INSERT INTO product_slots VALUES(47,49); +INSERT INTO product_slots VALUES(47,51); +INSERT INTO product_slots VALUES(47,52); +INSERT INTO product_slots VALUES(47,53); +INSERT INTO product_slots VALUES(47,54); +INSERT INTO product_slots VALUES(47,57); +INSERT INTO product_slots VALUES(47,58); +INSERT INTO product_slots VALUES(47,59); +INSERT INTO product_slots VALUES(47,60); +INSERT INTO product_slots VALUES(47,61); +INSERT INTO product_slots VALUES(47,62); +INSERT INTO product_slots VALUES(47,63); +INSERT INTO product_slots VALUES(47,64); +INSERT INTO product_slots VALUES(47,65); +INSERT INTO product_slots VALUES(47,66); +INSERT INTO product_slots VALUES(47,67); +INSERT INTO product_slots VALUES(47,68); +INSERT INTO product_slots VALUES(47,69); +INSERT INTO product_slots VALUES(47,70); +INSERT INTO product_slots VALUES(47,71); +INSERT INTO product_slots VALUES(47,72); +INSERT INTO product_slots VALUES(47,73); +INSERT INTO product_slots VALUES(47,74); +INSERT INTO product_slots VALUES(47,75); +INSERT INTO product_slots VALUES(47,76); +INSERT INTO product_slots VALUES(47,77); +INSERT INTO product_slots VALUES(47,78); +INSERT INTO product_slots VALUES(47,79); +INSERT INTO product_slots VALUES(47,80); +INSERT INTO product_slots VALUES(47,81); +INSERT INTO product_slots VALUES(47,82); +INSERT INTO product_slots VALUES(47,83); +INSERT INTO product_slots VALUES(47,84); +INSERT INTO product_slots VALUES(47,85); +INSERT INTO product_slots VALUES(47,86); +INSERT INTO product_slots VALUES(47,87); +INSERT INTO product_slots VALUES(47,88); +INSERT INTO product_slots VALUES(47,89); +INSERT INTO product_slots VALUES(47,90); +INSERT INTO product_slots VALUES(47,91); +INSERT INTO product_slots VALUES(47,92); +INSERT INTO product_slots VALUES(47,93); +INSERT INTO product_slots VALUES(47,94); +INSERT INTO product_slots VALUES(47,95); +INSERT INTO product_slots VALUES(47,96); +INSERT INTO product_slots VALUES(47,97); +INSERT INTO product_slots VALUES(47,98); +INSERT INTO product_slots VALUES(47,99); +INSERT INTO product_slots VALUES(47,100); +INSERT INTO product_slots VALUES(47,102); +INSERT INTO product_slots VALUES(47,103); +INSERT INTO product_slots VALUES(47,104); +INSERT INTO product_slots VALUES(47,105); +INSERT INTO product_slots VALUES(47,106); +INSERT INTO product_slots VALUES(47,107); +INSERT INTO product_slots VALUES(47,108); +INSERT INTO product_slots VALUES(47,109); +INSERT INTO product_slots VALUES(47,110); +INSERT INTO product_slots VALUES(47,111); +INSERT INTO product_slots VALUES(47,112); +INSERT INTO product_slots VALUES(47,113); +INSERT INTO product_slots VALUES(47,114); +INSERT INTO product_slots VALUES(47,115); +INSERT INTO product_slots VALUES(47,117); +INSERT INTO product_slots VALUES(47,118); +INSERT INTO product_slots VALUES(47,119); +INSERT INTO product_slots VALUES(47,120); +INSERT INTO product_slots VALUES(47,121); +INSERT INTO product_slots VALUES(47,122); +INSERT INTO product_slots VALUES(47,123); +INSERT INTO product_slots VALUES(47,124); +INSERT INTO product_slots VALUES(47,125); +INSERT INTO product_slots VALUES(47,126); +INSERT INTO product_slots VALUES(47,127); +INSERT INTO product_slots VALUES(47,128); +INSERT INTO product_slots VALUES(47,129); +INSERT INTO product_slots VALUES(47,130); +INSERT INTO product_slots VALUES(47,131); +INSERT INTO product_slots VALUES(47,132); +INSERT INTO product_slots VALUES(47,133); +INSERT INTO product_slots VALUES(47,134); +INSERT INTO product_slots VALUES(47,135); +INSERT INTO product_slots VALUES(47,136); +INSERT INTO product_slots VALUES(47,138); +INSERT INTO product_slots VALUES(47,139); +INSERT INTO product_slots VALUES(47,140); +INSERT INTO product_slots VALUES(47,141); +INSERT INTO product_slots VALUES(47,142); +INSERT INTO product_slots VALUES(47,143); +INSERT INTO product_slots VALUES(47,145); +INSERT INTO product_slots VALUES(47,146); +INSERT INTO product_slots VALUES(47,147); +INSERT INTO product_slots VALUES(47,148); +INSERT INTO product_slots VALUES(47,149); +INSERT INTO product_slots VALUES(47,150); +INSERT INTO product_slots VALUES(47,151); +INSERT INTO product_slots VALUES(47,152); +INSERT INTO product_slots VALUES(47,153); +INSERT INTO product_slots VALUES(47,154); +INSERT INTO product_slots VALUES(47,155); +INSERT INTO product_slots VALUES(47,156); +INSERT INTO product_slots VALUES(47,157); +INSERT INTO product_slots VALUES(47,158); +INSERT INTO product_slots VALUES(47,159); +INSERT INTO product_slots VALUES(47,160); +INSERT INTO product_slots VALUES(47,161); +INSERT INTO product_slots VALUES(47,162); +INSERT INTO product_slots VALUES(47,163); +INSERT INTO product_slots VALUES(47,164); +INSERT INTO product_slots VALUES(47,165); +INSERT INTO product_slots VALUES(47,166); +INSERT INTO product_slots VALUES(47,167); +INSERT INTO product_slots VALUES(47,168); +INSERT INTO product_slots VALUES(47,169); +INSERT INTO product_slots VALUES(47,170); +INSERT INTO product_slots VALUES(47,171); +INSERT INTO product_slots VALUES(47,172); +INSERT INTO product_slots VALUES(47,173); +INSERT INTO product_slots VALUES(47,174); +INSERT INTO product_slots VALUES(47,175); +INSERT INTO product_slots VALUES(47,176); +INSERT INTO product_slots VALUES(47,177); +INSERT INTO product_slots VALUES(47,178); +INSERT INTO product_slots VALUES(47,179); +INSERT INTO product_slots VALUES(47,180); +INSERT INTO product_slots VALUES(47,181); +INSERT INTO product_slots VALUES(47,182); +INSERT INTO product_slots VALUES(47,183); +INSERT INTO product_slots VALUES(47,184); +INSERT INTO product_slots VALUES(47,185); +INSERT INTO product_slots VALUES(47,186); +INSERT INTO product_slots VALUES(47,187); +INSERT INTO product_slots VALUES(47,188); +INSERT INTO product_slots VALUES(47,189); +INSERT INTO product_slots VALUES(47,190); +INSERT INTO product_slots VALUES(47,191); +INSERT INTO product_slots VALUES(47,192); +INSERT INTO product_slots VALUES(47,193); +INSERT INTO product_slots VALUES(47,194); +INSERT INTO product_slots VALUES(47,195); +INSERT INTO product_slots VALUES(47,196); +INSERT INTO product_slots VALUES(47,197); +INSERT INTO product_slots VALUES(47,198); +INSERT INTO product_slots VALUES(47,199); +INSERT INTO product_slots VALUES(47,200); +INSERT INTO product_slots VALUES(47,201); +INSERT INTO product_slots VALUES(47,202); +INSERT INTO product_slots VALUES(47,203); +INSERT INTO product_slots VALUES(47,204); +INSERT INTO product_slots VALUES(47,205); +INSERT INTO product_slots VALUES(47,206); +INSERT INTO product_slots VALUES(47,207); +INSERT INTO product_slots VALUES(47,208); +INSERT INTO product_slots VALUES(47,209); +INSERT INTO product_slots VALUES(47,210); +INSERT INTO product_slots VALUES(47,211); +INSERT INTO product_slots VALUES(47,212); +INSERT INTO product_slots VALUES(47,213); +INSERT INTO product_slots VALUES(47,214); +INSERT INTO product_slots VALUES(47,215); +INSERT INTO product_slots VALUES(47,216); +INSERT INTO product_slots VALUES(47,217); +INSERT INTO product_slots VALUES(47,218); +INSERT INTO product_slots VALUES(47,219); +INSERT INTO product_slots VALUES(47,220); +INSERT INTO product_slots VALUES(47,221); +INSERT INTO product_slots VALUES(47,222); +INSERT INTO product_slots VALUES(47,223); +INSERT INTO product_slots VALUES(47,224); +INSERT INTO product_slots VALUES(47,225); +INSERT INTO product_slots VALUES(47,226); +INSERT INTO product_slots VALUES(47,227); +INSERT INTO product_slots VALUES(47,228); +INSERT INTO product_slots VALUES(47,229); +INSERT INTO product_slots VALUES(47,230); +INSERT INTO product_slots VALUES(47,231); +INSERT INTO product_slots VALUES(47,232); +INSERT INTO product_slots VALUES(47,233); +INSERT INTO product_slots VALUES(47,234); +INSERT INTO product_slots VALUES(47,235); +INSERT INTO product_slots VALUES(47,236); +INSERT INTO product_slots VALUES(47,237); +INSERT INTO product_slots VALUES(47,238); +INSERT INTO product_slots VALUES(47,239); +INSERT INTO product_slots VALUES(47,240); +INSERT INTO product_slots VALUES(47,241); +INSERT INTO product_slots VALUES(47,242); +INSERT INTO product_slots VALUES(47,243); +INSERT INTO product_slots VALUES(47,244); +INSERT INTO product_slots VALUES(47,274); +INSERT INTO product_slots VALUES(47,275); +INSERT INTO product_slots VALUES(47,279); +INSERT INTO product_slots VALUES(47,280); +INSERT INTO product_slots VALUES(47,281); +INSERT INTO product_slots VALUES(47,282); +INSERT INTO product_slots VALUES(47,283); +INSERT INTO product_slots VALUES(47,284); +INSERT INTO product_slots VALUES(47,285); +INSERT INTO product_slots VALUES(47,286); +INSERT INTO product_slots VALUES(47,287); +INSERT INTO product_slots VALUES(48,39); +INSERT INTO product_slots VALUES(48,43); +INSERT INTO product_slots VALUES(48,45); +INSERT INTO product_slots VALUES(48,46); +INSERT INTO product_slots VALUES(48,48); +INSERT INTO product_slots VALUES(48,49); +INSERT INTO product_slots VALUES(48,51); +INSERT INTO product_slots VALUES(48,52); +INSERT INTO product_slots VALUES(48,53); +INSERT INTO product_slots VALUES(48,54); +INSERT INTO product_slots VALUES(48,57); +INSERT INTO product_slots VALUES(48,58); +INSERT INTO product_slots VALUES(48,59); +INSERT INTO product_slots VALUES(48,60); +INSERT INTO product_slots VALUES(48,61); +INSERT INTO product_slots VALUES(48,62); +INSERT INTO product_slots VALUES(48,63); +INSERT INTO product_slots VALUES(48,64); +INSERT INTO product_slots VALUES(48,65); +INSERT INTO product_slots VALUES(48,66); +INSERT INTO product_slots VALUES(48,67); +INSERT INTO product_slots VALUES(48,68); +INSERT INTO product_slots VALUES(48,69); +INSERT INTO product_slots VALUES(48,70); +INSERT INTO product_slots VALUES(48,71); +INSERT INTO product_slots VALUES(48,72); +INSERT INTO product_slots VALUES(48,73); +INSERT INTO product_slots VALUES(48,74); +INSERT INTO product_slots VALUES(48,75); +INSERT INTO product_slots VALUES(48,76); +INSERT INTO product_slots VALUES(48,77); +INSERT INTO product_slots VALUES(48,78); +INSERT INTO product_slots VALUES(48,79); +INSERT INTO product_slots VALUES(48,80); +INSERT INTO product_slots VALUES(48,81); +INSERT INTO product_slots VALUES(48,82); +INSERT INTO product_slots VALUES(48,83); +INSERT INTO product_slots VALUES(48,84); +INSERT INTO product_slots VALUES(48,85); +INSERT INTO product_slots VALUES(48,86); +INSERT INTO product_slots VALUES(48,87); +INSERT INTO product_slots VALUES(48,88); +INSERT INTO product_slots VALUES(48,89); +INSERT INTO product_slots VALUES(48,90); +INSERT INTO product_slots VALUES(48,91); +INSERT INTO product_slots VALUES(48,92); +INSERT INTO product_slots VALUES(48,93); +INSERT INTO product_slots VALUES(48,94); +INSERT INTO product_slots VALUES(48,95); +INSERT INTO product_slots VALUES(48,96); +INSERT INTO product_slots VALUES(48,97); +INSERT INTO product_slots VALUES(48,98); +INSERT INTO product_slots VALUES(48,99); +INSERT INTO product_slots VALUES(48,100); +INSERT INTO product_slots VALUES(48,102); +INSERT INTO product_slots VALUES(48,103); +INSERT INTO product_slots VALUES(48,104); +INSERT INTO product_slots VALUES(48,105); +INSERT INTO product_slots VALUES(48,106); +INSERT INTO product_slots VALUES(48,107); +INSERT INTO product_slots VALUES(48,108); +INSERT INTO product_slots VALUES(48,109); +INSERT INTO product_slots VALUES(48,110); +INSERT INTO product_slots VALUES(48,111); +INSERT INTO product_slots VALUES(48,112); +INSERT INTO product_slots VALUES(48,113); +INSERT INTO product_slots VALUES(48,114); +INSERT INTO product_slots VALUES(48,115); +INSERT INTO product_slots VALUES(48,117); +INSERT INTO product_slots VALUES(48,118); +INSERT INTO product_slots VALUES(48,119); +INSERT INTO product_slots VALUES(48,120); +INSERT INTO product_slots VALUES(48,121); +INSERT INTO product_slots VALUES(48,122); +INSERT INTO product_slots VALUES(48,124); +INSERT INTO product_slots VALUES(48,125); +INSERT INTO product_slots VALUES(48,126); +INSERT INTO product_slots VALUES(48,127); +INSERT INTO product_slots VALUES(48,128); +INSERT INTO product_slots VALUES(48,129); +INSERT INTO product_slots VALUES(48,130); +INSERT INTO product_slots VALUES(48,131); +INSERT INTO product_slots VALUES(48,132); +INSERT INTO product_slots VALUES(48,133); +INSERT INTO product_slots VALUES(48,134); +INSERT INTO product_slots VALUES(48,135); +INSERT INTO product_slots VALUES(48,136); +INSERT INTO product_slots VALUES(48,138); +INSERT INTO product_slots VALUES(48,139); +INSERT INTO product_slots VALUES(48,140); +INSERT INTO product_slots VALUES(48,141); +INSERT INTO product_slots VALUES(48,142); +INSERT INTO product_slots VALUES(48,143); +INSERT INTO product_slots VALUES(48,145); +INSERT INTO product_slots VALUES(48,146); +INSERT INTO product_slots VALUES(48,147); +INSERT INTO product_slots VALUES(48,148); +INSERT INTO product_slots VALUES(48,149); +INSERT INTO product_slots VALUES(48,150); +INSERT INTO product_slots VALUES(48,151); +INSERT INTO product_slots VALUES(48,152); +INSERT INTO product_slots VALUES(48,153); +INSERT INTO product_slots VALUES(48,154); +INSERT INTO product_slots VALUES(48,155); +INSERT INTO product_slots VALUES(48,156); +INSERT INTO product_slots VALUES(48,157); +INSERT INTO product_slots VALUES(48,158); +INSERT INTO product_slots VALUES(48,159); +INSERT INTO product_slots VALUES(48,160); +INSERT INTO product_slots VALUES(48,161); +INSERT INTO product_slots VALUES(48,162); +INSERT INTO product_slots VALUES(48,163); +INSERT INTO product_slots VALUES(48,164); +INSERT INTO product_slots VALUES(48,165); +INSERT INTO product_slots VALUES(48,166); +INSERT INTO product_slots VALUES(48,167); +INSERT INTO product_slots VALUES(48,168); +INSERT INTO product_slots VALUES(48,169); +INSERT INTO product_slots VALUES(48,170); +INSERT INTO product_slots VALUES(48,171); +INSERT INTO product_slots VALUES(48,172); +INSERT INTO product_slots VALUES(48,173); +INSERT INTO product_slots VALUES(48,174); +INSERT INTO product_slots VALUES(48,175); +INSERT INTO product_slots VALUES(48,176); +INSERT INTO product_slots VALUES(48,177); +INSERT INTO product_slots VALUES(48,178); +INSERT INTO product_slots VALUES(48,179); +INSERT INTO product_slots VALUES(48,180); +INSERT INTO product_slots VALUES(48,181); +INSERT INTO product_slots VALUES(48,182); +INSERT INTO product_slots VALUES(48,183); +INSERT INTO product_slots VALUES(48,184); +INSERT INTO product_slots VALUES(48,185); +INSERT INTO product_slots VALUES(48,186); +INSERT INTO product_slots VALUES(48,187); +INSERT INTO product_slots VALUES(48,188); +INSERT INTO product_slots VALUES(48,189); +INSERT INTO product_slots VALUES(48,190); +INSERT INTO product_slots VALUES(48,191); +INSERT INTO product_slots VALUES(48,192); +INSERT INTO product_slots VALUES(48,193); +INSERT INTO product_slots VALUES(48,194); +INSERT INTO product_slots VALUES(48,195); +INSERT INTO product_slots VALUES(48,196); +INSERT INTO product_slots VALUES(48,197); +INSERT INTO product_slots VALUES(48,198); +INSERT INTO product_slots VALUES(48,199); +INSERT INTO product_slots VALUES(48,200); +INSERT INTO product_slots VALUES(48,201); +INSERT INTO product_slots VALUES(48,202); +INSERT INTO product_slots VALUES(48,203); +INSERT INTO product_slots VALUES(48,204); +INSERT INTO product_slots VALUES(48,205); +INSERT INTO product_slots VALUES(48,206); +INSERT INTO product_slots VALUES(48,207); +INSERT INTO product_slots VALUES(48,208); +INSERT INTO product_slots VALUES(48,209); +INSERT INTO product_slots VALUES(48,210); +INSERT INTO product_slots VALUES(48,211); +INSERT INTO product_slots VALUES(48,212); +INSERT INTO product_slots VALUES(48,213); +INSERT INTO product_slots VALUES(48,214); +INSERT INTO product_slots VALUES(48,215); +INSERT INTO product_slots VALUES(48,216); +INSERT INTO product_slots VALUES(48,217); +INSERT INTO product_slots VALUES(48,218); +INSERT INTO product_slots VALUES(48,219); +INSERT INTO product_slots VALUES(48,220); +INSERT INTO product_slots VALUES(48,221); +INSERT INTO product_slots VALUES(48,222); +INSERT INTO product_slots VALUES(48,223); +INSERT INTO product_slots VALUES(48,224); +INSERT INTO product_slots VALUES(48,225); +INSERT INTO product_slots VALUES(48,226); +INSERT INTO product_slots VALUES(48,227); +INSERT INTO product_slots VALUES(48,228); +INSERT INTO product_slots VALUES(48,229); +INSERT INTO product_slots VALUES(48,230); +INSERT INTO product_slots VALUES(48,231); +INSERT INTO product_slots VALUES(48,232); +INSERT INTO product_slots VALUES(48,233); +INSERT INTO product_slots VALUES(48,234); +INSERT INTO product_slots VALUES(48,235); +INSERT INTO product_slots VALUES(48,236); +INSERT INTO product_slots VALUES(48,237); +INSERT INTO product_slots VALUES(48,238); +INSERT INTO product_slots VALUES(48,239); +INSERT INTO product_slots VALUES(48,240); +INSERT INTO product_slots VALUES(48,241); +INSERT INTO product_slots VALUES(48,242); +INSERT INTO product_slots VALUES(48,243); +INSERT INTO product_slots VALUES(48,244); +INSERT INTO product_slots VALUES(48,274); +INSERT INTO product_slots VALUES(48,275); +INSERT INTO product_slots VALUES(48,279); +INSERT INTO product_slots VALUES(48,280); +INSERT INTO product_slots VALUES(48,281); +INSERT INTO product_slots VALUES(48,282); +INSERT INTO product_slots VALUES(48,283); +INSERT INTO product_slots VALUES(48,284); +INSERT INTO product_slots VALUES(48,285); +INSERT INTO product_slots VALUES(48,286); +INSERT INTO product_slots VALUES(48,287); +INSERT INTO product_slots VALUES(49,40); +INSERT INTO product_slots VALUES(49,74); +INSERT INTO product_slots VALUES(49,75); +INSERT INTO product_slots VALUES(49,76); +INSERT INTO product_slots VALUES(49,77); +INSERT INTO product_slots VALUES(49,78); +INSERT INTO product_slots VALUES(49,79); +INSERT INTO product_slots VALUES(49,80); +INSERT INTO product_slots VALUES(49,102); +INSERT INTO product_slots VALUES(49,103); +INSERT INTO product_slots VALUES(49,104); +INSERT INTO product_slots VALUES(49,105); +INSERT INTO product_slots VALUES(49,106); +INSERT INTO product_slots VALUES(49,107); +INSERT INTO product_slots VALUES(49,108); +INSERT INTO product_slots VALUES(49,109); +INSERT INTO product_slots VALUES(49,110); +INSERT INTO product_slots VALUES(49,111); +INSERT INTO product_slots VALUES(49,112); +INSERT INTO product_slots VALUES(49,113); +INSERT INTO product_slots VALUES(49,114); +INSERT INTO product_slots VALUES(49,115); +INSERT INTO product_slots VALUES(49,117); +INSERT INTO product_slots VALUES(49,118); +INSERT INTO product_slots VALUES(49,119); +INSERT INTO product_slots VALUES(49,120); +INSERT INTO product_slots VALUES(49,121); +INSERT INTO product_slots VALUES(49,122); +INSERT INTO product_slots VALUES(49,123); +INSERT INTO product_slots VALUES(49,124); +INSERT INTO product_slots VALUES(49,125); +INSERT INTO product_slots VALUES(49,126); +INSERT INTO product_slots VALUES(49,127); +INSERT INTO product_slots VALUES(49,128); +INSERT INTO product_slots VALUES(49,129); +INSERT INTO product_slots VALUES(49,130); +INSERT INTO product_slots VALUES(49,131); +INSERT INTO product_slots VALUES(49,132); +INSERT INTO product_slots VALUES(49,133); +INSERT INTO product_slots VALUES(49,134); +INSERT INTO product_slots VALUES(49,135); +INSERT INTO product_slots VALUES(49,136); +INSERT INTO product_slots VALUES(49,137); +INSERT INTO product_slots VALUES(49,138); +INSERT INTO product_slots VALUES(49,139); +INSERT INTO product_slots VALUES(49,140); +INSERT INTO product_slots VALUES(49,141); +INSERT INTO product_slots VALUES(49,142); +INSERT INTO product_slots VALUES(49,143); +INSERT INTO product_slots VALUES(49,145); +INSERT INTO product_slots VALUES(49,146); +INSERT INTO product_slots VALUES(49,147); +INSERT INTO product_slots VALUES(49,148); +INSERT INTO product_slots VALUES(49,149); +INSERT INTO product_slots VALUES(49,150); +INSERT INTO product_slots VALUES(49,151); +INSERT INTO product_slots VALUES(49,152); +INSERT INTO product_slots VALUES(49,153); +INSERT INTO product_slots VALUES(49,154); +INSERT INTO product_slots VALUES(49,155); +INSERT INTO product_slots VALUES(49,156); +INSERT INTO product_slots VALUES(49,157); +INSERT INTO product_slots VALUES(49,158); +INSERT INTO product_slots VALUES(49,159); +INSERT INTO product_slots VALUES(49,160); +INSERT INTO product_slots VALUES(49,161); +INSERT INTO product_slots VALUES(49,162); +INSERT INTO product_slots VALUES(49,163); +INSERT INTO product_slots VALUES(49,164); +INSERT INTO product_slots VALUES(49,165); +INSERT INTO product_slots VALUES(49,166); +INSERT INTO product_slots VALUES(49,167); +INSERT INTO product_slots VALUES(49,168); +INSERT INTO product_slots VALUES(49,169); +INSERT INTO product_slots VALUES(49,170); +INSERT INTO product_slots VALUES(49,171); +INSERT INTO product_slots VALUES(49,172); +INSERT INTO product_slots VALUES(49,173); +INSERT INTO product_slots VALUES(49,174); +INSERT INTO product_slots VALUES(49,175); +INSERT INTO product_slots VALUES(49,176); +INSERT INTO product_slots VALUES(49,177); +INSERT INTO product_slots VALUES(49,178); +INSERT INTO product_slots VALUES(49,179); +INSERT INTO product_slots VALUES(49,180); +INSERT INTO product_slots VALUES(49,181); +INSERT INTO product_slots VALUES(49,182); +INSERT INTO product_slots VALUES(49,183); +INSERT INTO product_slots VALUES(49,184); +INSERT INTO product_slots VALUES(49,185); +INSERT INTO product_slots VALUES(49,186); +INSERT INTO product_slots VALUES(49,187); +INSERT INTO product_slots VALUES(49,188); +INSERT INTO product_slots VALUES(49,189); +INSERT INTO product_slots VALUES(49,190); +INSERT INTO product_slots VALUES(49,191); +INSERT INTO product_slots VALUES(49,192); +INSERT INTO product_slots VALUES(49,193); +INSERT INTO product_slots VALUES(49,194); +INSERT INTO product_slots VALUES(49,195); +INSERT INTO product_slots VALUES(49,196); +INSERT INTO product_slots VALUES(49,197); +INSERT INTO product_slots VALUES(49,198); +INSERT INTO product_slots VALUES(49,199); +INSERT INTO product_slots VALUES(49,200); +INSERT INTO product_slots VALUES(49,201); +INSERT INTO product_slots VALUES(49,202); +INSERT INTO product_slots VALUES(49,203); +INSERT INTO product_slots VALUES(49,204); +INSERT INTO product_slots VALUES(49,205); +INSERT INTO product_slots VALUES(49,206); +INSERT INTO product_slots VALUES(49,207); +INSERT INTO product_slots VALUES(49,208); +INSERT INTO product_slots VALUES(49,209); +INSERT INTO product_slots VALUES(49,210); +INSERT INTO product_slots VALUES(49,211); +INSERT INTO product_slots VALUES(49,212); +INSERT INTO product_slots VALUES(49,213); +INSERT INTO product_slots VALUES(49,214); +INSERT INTO product_slots VALUES(49,215); +INSERT INTO product_slots VALUES(49,216); +INSERT INTO product_slots VALUES(49,217); +INSERT INTO product_slots VALUES(49,218); +INSERT INTO product_slots VALUES(49,219); +INSERT INTO product_slots VALUES(49,220); +INSERT INTO product_slots VALUES(49,221); +INSERT INTO product_slots VALUES(49,222); +INSERT INTO product_slots VALUES(49,223); +INSERT INTO product_slots VALUES(49,224); +INSERT INTO product_slots VALUES(49,225); +INSERT INTO product_slots VALUES(49,226); +INSERT INTO product_slots VALUES(49,227); +INSERT INTO product_slots VALUES(49,228); +INSERT INTO product_slots VALUES(49,229); +INSERT INTO product_slots VALUES(49,230); +INSERT INTO product_slots VALUES(49,231); +INSERT INTO product_slots VALUES(49,232); +INSERT INTO product_slots VALUES(49,233); +INSERT INTO product_slots VALUES(49,234); +INSERT INTO product_slots VALUES(49,235); +INSERT INTO product_slots VALUES(49,236); +INSERT INTO product_slots VALUES(49,237); +INSERT INTO product_slots VALUES(49,238); +INSERT INTO product_slots VALUES(49,239); +INSERT INTO product_slots VALUES(49,240); +INSERT INTO product_slots VALUES(49,241); +INSERT INTO product_slots VALUES(49,242); +INSERT INTO product_slots VALUES(49,243); +INSERT INTO product_slots VALUES(49,244); +INSERT INTO product_slots VALUES(49,274); +INSERT INTO product_slots VALUES(49,275); +INSERT INTO product_slots VALUES(49,279); +INSERT INTO product_slots VALUES(49,280); +INSERT INTO product_slots VALUES(49,281); +INSERT INTO product_slots VALUES(49,282); +INSERT INTO product_slots VALUES(49,283); +INSERT INTO product_slots VALUES(49,284); +INSERT INTO product_slots VALUES(49,285); +INSERT INTO product_slots VALUES(49,286); +INSERT INTO product_slots VALUES(49,287); +INSERT INTO product_slots VALUES(50,39); +INSERT INTO product_slots VALUES(50,40); +INSERT INTO product_slots VALUES(50,43); +INSERT INTO product_slots VALUES(50,45); +INSERT INTO product_slots VALUES(50,46); +INSERT INTO product_slots VALUES(50,48); +INSERT INTO product_slots VALUES(50,49); +INSERT INTO product_slots VALUES(50,51); +INSERT INTO product_slots VALUES(50,52); +INSERT INTO product_slots VALUES(50,53); +INSERT INTO product_slots VALUES(50,54); +INSERT INTO product_slots VALUES(50,57); +INSERT INTO product_slots VALUES(50,58); +INSERT INTO product_slots VALUES(50,59); +INSERT INTO product_slots VALUES(50,60); +INSERT INTO product_slots VALUES(50,61); +INSERT INTO product_slots VALUES(50,62); +INSERT INTO product_slots VALUES(50,63); +INSERT INTO product_slots VALUES(50,64); +INSERT INTO product_slots VALUES(50,65); +INSERT INTO product_slots VALUES(50,66); +INSERT INTO product_slots VALUES(50,67); +INSERT INTO product_slots VALUES(50,68); +INSERT INTO product_slots VALUES(50,69); +INSERT INTO product_slots VALUES(50,70); +INSERT INTO product_slots VALUES(50,71); +INSERT INTO product_slots VALUES(50,72); +INSERT INTO product_slots VALUES(50,73); +INSERT INTO product_slots VALUES(50,74); +INSERT INTO product_slots VALUES(50,75); +INSERT INTO product_slots VALUES(50,76); +INSERT INTO product_slots VALUES(50,77); +INSERT INTO product_slots VALUES(50,78); +INSERT INTO product_slots VALUES(50,79); +INSERT INTO product_slots VALUES(50,80); +INSERT INTO product_slots VALUES(50,81); +INSERT INTO product_slots VALUES(50,82); +INSERT INTO product_slots VALUES(50,83); +INSERT INTO product_slots VALUES(50,84); +INSERT INTO product_slots VALUES(50,85); +INSERT INTO product_slots VALUES(50,86); +INSERT INTO product_slots VALUES(50,87); +INSERT INTO product_slots VALUES(50,88); +INSERT INTO product_slots VALUES(50,89); +INSERT INTO product_slots VALUES(50,90); +INSERT INTO product_slots VALUES(50,91); +INSERT INTO product_slots VALUES(50,92); +INSERT INTO product_slots VALUES(50,93); +INSERT INTO product_slots VALUES(50,94); +INSERT INTO product_slots VALUES(50,95); +INSERT INTO product_slots VALUES(50,96); +INSERT INTO product_slots VALUES(50,97); +INSERT INTO product_slots VALUES(50,98); +INSERT INTO product_slots VALUES(50,99); +INSERT INTO product_slots VALUES(50,100); +INSERT INTO product_slots VALUES(50,102); +INSERT INTO product_slots VALUES(50,103); +INSERT INTO product_slots VALUES(50,104); +INSERT INTO product_slots VALUES(50,105); +INSERT INTO product_slots VALUES(50,106); +INSERT INTO product_slots VALUES(50,107); +INSERT INTO product_slots VALUES(50,108); +INSERT INTO product_slots VALUES(50,109); +INSERT INTO product_slots VALUES(50,110); +INSERT INTO product_slots VALUES(50,111); +INSERT INTO product_slots VALUES(50,112); +INSERT INTO product_slots VALUES(50,113); +INSERT INTO product_slots VALUES(50,114); +INSERT INTO product_slots VALUES(50,115); +INSERT INTO product_slots VALUES(50,117); +INSERT INTO product_slots VALUES(50,118); +INSERT INTO product_slots VALUES(50,119); +INSERT INTO product_slots VALUES(50,120); +INSERT INTO product_slots VALUES(50,121); +INSERT INTO product_slots VALUES(50,122); +INSERT INTO product_slots VALUES(50,123); +INSERT INTO product_slots VALUES(50,124); +INSERT INTO product_slots VALUES(50,125); +INSERT INTO product_slots VALUES(50,126); +INSERT INTO product_slots VALUES(50,127); +INSERT INTO product_slots VALUES(50,128); +INSERT INTO product_slots VALUES(50,129); +INSERT INTO product_slots VALUES(50,130); +INSERT INTO product_slots VALUES(50,131); +INSERT INTO product_slots VALUES(50,132); +INSERT INTO product_slots VALUES(50,133); +INSERT INTO product_slots VALUES(50,134); +INSERT INTO product_slots VALUES(50,135); +INSERT INTO product_slots VALUES(50,136); +INSERT INTO product_slots VALUES(50,138); +INSERT INTO product_slots VALUES(50,139); +INSERT INTO product_slots VALUES(50,140); +INSERT INTO product_slots VALUES(50,141); +INSERT INTO product_slots VALUES(50,142); +INSERT INTO product_slots VALUES(50,143); +INSERT INTO product_slots VALUES(50,145); +INSERT INTO product_slots VALUES(50,146); +INSERT INTO product_slots VALUES(50,147); +INSERT INTO product_slots VALUES(50,148); +INSERT INTO product_slots VALUES(50,149); +INSERT INTO product_slots VALUES(50,150); +INSERT INTO product_slots VALUES(50,151); +INSERT INTO product_slots VALUES(50,152); +INSERT INTO product_slots VALUES(50,153); +INSERT INTO product_slots VALUES(50,154); +INSERT INTO product_slots VALUES(50,155); +INSERT INTO product_slots VALUES(50,156); +INSERT INTO product_slots VALUES(50,157); +INSERT INTO product_slots VALUES(50,158); +INSERT INTO product_slots VALUES(50,159); +INSERT INTO product_slots VALUES(50,160); +INSERT INTO product_slots VALUES(50,161); +INSERT INTO product_slots VALUES(50,162); +INSERT INTO product_slots VALUES(50,163); +INSERT INTO product_slots VALUES(50,164); +INSERT INTO product_slots VALUES(50,165); +INSERT INTO product_slots VALUES(50,166); +INSERT INTO product_slots VALUES(50,167); +INSERT INTO product_slots VALUES(50,168); +INSERT INTO product_slots VALUES(50,169); +INSERT INTO product_slots VALUES(50,170); +INSERT INTO product_slots VALUES(50,171); +INSERT INTO product_slots VALUES(50,172); +INSERT INTO product_slots VALUES(50,173); +INSERT INTO product_slots VALUES(50,174); +INSERT INTO product_slots VALUES(50,175); +INSERT INTO product_slots VALUES(50,176); +INSERT INTO product_slots VALUES(50,177); +INSERT INTO product_slots VALUES(50,178); +INSERT INTO product_slots VALUES(50,179); +INSERT INTO product_slots VALUES(50,180); +INSERT INTO product_slots VALUES(50,181); +INSERT INTO product_slots VALUES(50,182); +INSERT INTO product_slots VALUES(50,183); +INSERT INTO product_slots VALUES(50,184); +INSERT INTO product_slots VALUES(50,185); +INSERT INTO product_slots VALUES(50,186); +INSERT INTO product_slots VALUES(50,187); +INSERT INTO product_slots VALUES(50,188); +INSERT INTO product_slots VALUES(50,189); +INSERT INTO product_slots VALUES(50,190); +INSERT INTO product_slots VALUES(50,191); +INSERT INTO product_slots VALUES(50,192); +INSERT INTO product_slots VALUES(50,193); +INSERT INTO product_slots VALUES(50,194); +INSERT INTO product_slots VALUES(50,195); +INSERT INTO product_slots VALUES(50,196); +INSERT INTO product_slots VALUES(50,197); +INSERT INTO product_slots VALUES(50,198); +INSERT INTO product_slots VALUES(50,199); +INSERT INTO product_slots VALUES(50,200); +INSERT INTO product_slots VALUES(50,201); +INSERT INTO product_slots VALUES(50,202); +INSERT INTO product_slots VALUES(50,203); +INSERT INTO product_slots VALUES(50,204); +INSERT INTO product_slots VALUES(50,205); +INSERT INTO product_slots VALUES(50,206); +INSERT INTO product_slots VALUES(50,207); +INSERT INTO product_slots VALUES(50,208); +INSERT INTO product_slots VALUES(50,209); +INSERT INTO product_slots VALUES(50,210); +INSERT INTO product_slots VALUES(50,211); +INSERT INTO product_slots VALUES(50,212); +INSERT INTO product_slots VALUES(50,213); +INSERT INTO product_slots VALUES(50,214); +INSERT INTO product_slots VALUES(50,215); +INSERT INTO product_slots VALUES(50,216); +INSERT INTO product_slots VALUES(50,217); +INSERT INTO product_slots VALUES(50,218); +INSERT INTO product_slots VALUES(50,219); +INSERT INTO product_slots VALUES(50,220); +INSERT INTO product_slots VALUES(50,221); +INSERT INTO product_slots VALUES(50,222); +INSERT INTO product_slots VALUES(50,223); +INSERT INTO product_slots VALUES(50,224); +INSERT INTO product_slots VALUES(50,225); +INSERT INTO product_slots VALUES(50,226); +INSERT INTO product_slots VALUES(50,227); +INSERT INTO product_slots VALUES(50,228); +INSERT INTO product_slots VALUES(50,229); +INSERT INTO product_slots VALUES(50,230); +INSERT INTO product_slots VALUES(50,231); +INSERT INTO product_slots VALUES(50,232); +INSERT INTO product_slots VALUES(50,233); +INSERT INTO product_slots VALUES(50,234); +INSERT INTO product_slots VALUES(50,235); +INSERT INTO product_slots VALUES(50,236); +INSERT INTO product_slots VALUES(50,237); +INSERT INTO product_slots VALUES(50,238); +INSERT INTO product_slots VALUES(50,239); +INSERT INTO product_slots VALUES(50,240); +INSERT INTO product_slots VALUES(50,241); +INSERT INTO product_slots VALUES(50,242); +INSERT INTO product_slots VALUES(50,243); +INSERT INTO product_slots VALUES(50,244); +INSERT INTO product_slots VALUES(50,274); +INSERT INTO product_slots VALUES(50,275); +INSERT INTO product_slots VALUES(50,279); +INSERT INTO product_slots VALUES(50,280); +INSERT INTO product_slots VALUES(50,281); +INSERT INTO product_slots VALUES(50,282); +INSERT INTO product_slots VALUES(50,283); +INSERT INTO product_slots VALUES(50,284); +INSERT INTO product_slots VALUES(50,285); +INSERT INTO product_slots VALUES(50,286); +INSERT INTO product_slots VALUES(50,287); +INSERT INTO product_slots VALUES(51,40); +INSERT INTO product_slots VALUES(51,64); +INSERT INTO product_slots VALUES(51,65); +INSERT INTO product_slots VALUES(51,66); +INSERT INTO product_slots VALUES(51,67); +INSERT INTO product_slots VALUES(51,68); +INSERT INTO product_slots VALUES(51,69); +INSERT INTO product_slots VALUES(51,70); +INSERT INTO product_slots VALUES(51,71); +INSERT INTO product_slots VALUES(51,72); +INSERT INTO product_slots VALUES(51,73); +INSERT INTO product_slots VALUES(51,74); +INSERT INTO product_slots VALUES(51,75); +INSERT INTO product_slots VALUES(51,76); +INSERT INTO product_slots VALUES(51,77); +INSERT INTO product_slots VALUES(51,78); +INSERT INTO product_slots VALUES(51,79); +INSERT INTO product_slots VALUES(51,80); +INSERT INTO product_slots VALUES(51,81); +INSERT INTO product_slots VALUES(51,82); +INSERT INTO product_slots VALUES(51,83); +INSERT INTO product_slots VALUES(51,84); +INSERT INTO product_slots VALUES(51,85); +INSERT INTO product_slots VALUES(51,86); +INSERT INTO product_slots VALUES(51,87); +INSERT INTO product_slots VALUES(51,88); +INSERT INTO product_slots VALUES(51,89); +INSERT INTO product_slots VALUES(51,90); +INSERT INTO product_slots VALUES(51,91); +INSERT INTO product_slots VALUES(51,92); +INSERT INTO product_slots VALUES(51,93); +INSERT INTO product_slots VALUES(51,94); +INSERT INTO product_slots VALUES(51,95); +INSERT INTO product_slots VALUES(51,96); +INSERT INTO product_slots VALUES(51,97); +INSERT INTO product_slots VALUES(51,98); +INSERT INTO product_slots VALUES(51,99); +INSERT INTO product_slots VALUES(51,100); +INSERT INTO product_slots VALUES(51,102); +INSERT INTO product_slots VALUES(51,103); +INSERT INTO product_slots VALUES(51,104); +INSERT INTO product_slots VALUES(51,105); +INSERT INTO product_slots VALUES(51,106); +INSERT INTO product_slots VALUES(51,107); +INSERT INTO product_slots VALUES(51,108); +INSERT INTO product_slots VALUES(51,109); +INSERT INTO product_slots VALUES(51,110); +INSERT INTO product_slots VALUES(51,111); +INSERT INTO product_slots VALUES(51,112); +INSERT INTO product_slots VALUES(51,113); +INSERT INTO product_slots VALUES(51,114); +INSERT INTO product_slots VALUES(51,115); +INSERT INTO product_slots VALUES(51,117); +INSERT INTO product_slots VALUES(51,118); +INSERT INTO product_slots VALUES(51,119); +INSERT INTO product_slots VALUES(51,120); +INSERT INTO product_slots VALUES(51,121); +INSERT INTO product_slots VALUES(51,122); +INSERT INTO product_slots VALUES(51,123); +INSERT INTO product_slots VALUES(51,124); +INSERT INTO product_slots VALUES(51,125); +INSERT INTO product_slots VALUES(51,126); +INSERT INTO product_slots VALUES(51,127); +INSERT INTO product_slots VALUES(51,128); +INSERT INTO product_slots VALUES(51,129); +INSERT INTO product_slots VALUES(51,130); +INSERT INTO product_slots VALUES(51,131); +INSERT INTO product_slots VALUES(51,132); +INSERT INTO product_slots VALUES(51,133); +INSERT INTO product_slots VALUES(51,134); +INSERT INTO product_slots VALUES(51,135); +INSERT INTO product_slots VALUES(51,136); +INSERT INTO product_slots VALUES(51,138); +INSERT INTO product_slots VALUES(51,139); +INSERT INTO product_slots VALUES(51,140); +INSERT INTO product_slots VALUES(51,141); +INSERT INTO product_slots VALUES(51,142); +INSERT INTO product_slots VALUES(51,143); +INSERT INTO product_slots VALUES(51,145); +INSERT INTO product_slots VALUES(51,146); +INSERT INTO product_slots VALUES(51,147); +INSERT INTO product_slots VALUES(51,148); +INSERT INTO product_slots VALUES(51,149); +INSERT INTO product_slots VALUES(51,150); +INSERT INTO product_slots VALUES(51,151); +INSERT INTO product_slots VALUES(51,152); +INSERT INTO product_slots VALUES(51,153); +INSERT INTO product_slots VALUES(51,154); +INSERT INTO product_slots VALUES(51,155); +INSERT INTO product_slots VALUES(51,156); +INSERT INTO product_slots VALUES(51,157); +INSERT INTO product_slots VALUES(51,158); +INSERT INTO product_slots VALUES(51,159); +INSERT INTO product_slots VALUES(51,160); +INSERT INTO product_slots VALUES(51,161); +INSERT INTO product_slots VALUES(51,162); +INSERT INTO product_slots VALUES(51,163); +INSERT INTO product_slots VALUES(51,164); +INSERT INTO product_slots VALUES(51,165); +INSERT INTO product_slots VALUES(51,166); +INSERT INTO product_slots VALUES(51,167); +INSERT INTO product_slots VALUES(51,168); +INSERT INTO product_slots VALUES(51,169); +INSERT INTO product_slots VALUES(51,170); +INSERT INTO product_slots VALUES(51,171); +INSERT INTO product_slots VALUES(51,172); +INSERT INTO product_slots VALUES(51,173); +INSERT INTO product_slots VALUES(51,174); +INSERT INTO product_slots VALUES(51,175); +INSERT INTO product_slots VALUES(51,176); +INSERT INTO product_slots VALUES(51,177); +INSERT INTO product_slots VALUES(51,178); +INSERT INTO product_slots VALUES(51,179); +INSERT INTO product_slots VALUES(51,180); +INSERT INTO product_slots VALUES(51,181); +INSERT INTO product_slots VALUES(51,182); +INSERT INTO product_slots VALUES(51,183); +INSERT INTO product_slots VALUES(51,184); +INSERT INTO product_slots VALUES(51,185); +INSERT INTO product_slots VALUES(51,186); +INSERT INTO product_slots VALUES(51,187); +INSERT INTO product_slots VALUES(51,188); +INSERT INTO product_slots VALUES(51,189); +INSERT INTO product_slots VALUES(51,190); +INSERT INTO product_slots VALUES(51,191); +INSERT INTO product_slots VALUES(51,192); +INSERT INTO product_slots VALUES(51,193); +INSERT INTO product_slots VALUES(51,194); +INSERT INTO product_slots VALUES(51,195); +INSERT INTO product_slots VALUES(51,196); +INSERT INTO product_slots VALUES(51,197); +INSERT INTO product_slots VALUES(51,198); +INSERT INTO product_slots VALUES(51,199); +INSERT INTO product_slots VALUES(51,200); +INSERT INTO product_slots VALUES(51,201); +INSERT INTO product_slots VALUES(51,202); +INSERT INTO product_slots VALUES(51,203); +INSERT INTO product_slots VALUES(51,204); +INSERT INTO product_slots VALUES(51,205); +INSERT INTO product_slots VALUES(51,206); +INSERT INTO product_slots VALUES(51,207); +INSERT INTO product_slots VALUES(51,208); +INSERT INTO product_slots VALUES(51,209); +INSERT INTO product_slots VALUES(51,210); +INSERT INTO product_slots VALUES(51,211); +INSERT INTO product_slots VALUES(51,212); +INSERT INTO product_slots VALUES(51,213); +INSERT INTO product_slots VALUES(51,214); +INSERT INTO product_slots VALUES(51,215); +INSERT INTO product_slots VALUES(51,216); +INSERT INTO product_slots VALUES(51,217); +INSERT INTO product_slots VALUES(51,218); +INSERT INTO product_slots VALUES(51,219); +INSERT INTO product_slots VALUES(51,220); +INSERT INTO product_slots VALUES(51,221); +INSERT INTO product_slots VALUES(51,222); +INSERT INTO product_slots VALUES(51,223); +INSERT INTO product_slots VALUES(51,224); +INSERT INTO product_slots VALUES(51,225); +INSERT INTO product_slots VALUES(51,226); +INSERT INTO product_slots VALUES(51,227); +INSERT INTO product_slots VALUES(51,228); +INSERT INTO product_slots VALUES(51,229); +INSERT INTO product_slots VALUES(51,230); +INSERT INTO product_slots VALUES(51,231); +INSERT INTO product_slots VALUES(51,232); +INSERT INTO product_slots VALUES(51,233); +INSERT INTO product_slots VALUES(51,234); +INSERT INTO product_slots VALUES(51,235); +INSERT INTO product_slots VALUES(51,236); +INSERT INTO product_slots VALUES(51,237); +INSERT INTO product_slots VALUES(51,238); +INSERT INTO product_slots VALUES(51,239); +INSERT INTO product_slots VALUES(51,240); +INSERT INTO product_slots VALUES(51,241); +INSERT INTO product_slots VALUES(51,242); +INSERT INTO product_slots VALUES(51,243); +INSERT INTO product_slots VALUES(51,244); +INSERT INTO product_slots VALUES(51,274); +INSERT INTO product_slots VALUES(51,275); +INSERT INTO product_slots VALUES(51,279); +INSERT INTO product_slots VALUES(51,280); +INSERT INTO product_slots VALUES(51,281); +INSERT INTO product_slots VALUES(51,282); +INSERT INTO product_slots VALUES(51,283); +INSERT INTO product_slots VALUES(51,284); +INSERT INTO product_slots VALUES(51,285); +INSERT INTO product_slots VALUES(51,286); +INSERT INTO product_slots VALUES(51,287); +INSERT INTO product_slots VALUES(52,40); +INSERT INTO product_slots VALUES(52,64); +INSERT INTO product_slots VALUES(52,65); +INSERT INTO product_slots VALUES(52,66); +INSERT INTO product_slots VALUES(52,67); +INSERT INTO product_slots VALUES(52,68); +INSERT INTO product_slots VALUES(52,69); +INSERT INTO product_slots VALUES(52,70); +INSERT INTO product_slots VALUES(52,71); +INSERT INTO product_slots VALUES(52,72); +INSERT INTO product_slots VALUES(52,73); +INSERT INTO product_slots VALUES(52,74); +INSERT INTO product_slots VALUES(52,75); +INSERT INTO product_slots VALUES(52,76); +INSERT INTO product_slots VALUES(52,77); +INSERT INTO product_slots VALUES(52,78); +INSERT INTO product_slots VALUES(52,79); +INSERT INTO product_slots VALUES(52,80); +INSERT INTO product_slots VALUES(52,81); +INSERT INTO product_slots VALUES(52,82); +INSERT INTO product_slots VALUES(52,83); +INSERT INTO product_slots VALUES(52,84); +INSERT INTO product_slots VALUES(52,85); +INSERT INTO product_slots VALUES(52,86); +INSERT INTO product_slots VALUES(52,87); +INSERT INTO product_slots VALUES(52,88); +INSERT INTO product_slots VALUES(52,89); +INSERT INTO product_slots VALUES(52,90); +INSERT INTO product_slots VALUES(52,91); +INSERT INTO product_slots VALUES(52,92); +INSERT INTO product_slots VALUES(52,93); +INSERT INTO product_slots VALUES(52,94); +INSERT INTO product_slots VALUES(52,95); +INSERT INTO product_slots VALUES(52,96); +INSERT INTO product_slots VALUES(52,97); +INSERT INTO product_slots VALUES(52,98); +INSERT INTO product_slots VALUES(52,99); +INSERT INTO product_slots VALUES(52,100); +INSERT INTO product_slots VALUES(52,102); +INSERT INTO product_slots VALUES(52,103); +INSERT INTO product_slots VALUES(52,104); +INSERT INTO product_slots VALUES(52,105); +INSERT INTO product_slots VALUES(52,106); +INSERT INTO product_slots VALUES(52,107); +INSERT INTO product_slots VALUES(52,108); +INSERT INTO product_slots VALUES(52,109); +INSERT INTO product_slots VALUES(52,110); +INSERT INTO product_slots VALUES(52,111); +INSERT INTO product_slots VALUES(52,112); +INSERT INTO product_slots VALUES(52,113); +INSERT INTO product_slots VALUES(52,114); +INSERT INTO product_slots VALUES(52,115); +INSERT INTO product_slots VALUES(52,117); +INSERT INTO product_slots VALUES(52,118); +INSERT INTO product_slots VALUES(52,119); +INSERT INTO product_slots VALUES(52,120); +INSERT INTO product_slots VALUES(52,121); +INSERT INTO product_slots VALUES(52,122); +INSERT INTO product_slots VALUES(52,123); +INSERT INTO product_slots VALUES(52,124); +INSERT INTO product_slots VALUES(52,125); +INSERT INTO product_slots VALUES(52,126); +INSERT INTO product_slots VALUES(52,127); +INSERT INTO product_slots VALUES(52,128); +INSERT INTO product_slots VALUES(52,129); +INSERT INTO product_slots VALUES(52,130); +INSERT INTO product_slots VALUES(52,131); +INSERT INTO product_slots VALUES(52,132); +INSERT INTO product_slots VALUES(52,133); +INSERT INTO product_slots VALUES(52,134); +INSERT INTO product_slots VALUES(52,135); +INSERT INTO product_slots VALUES(52,136); +INSERT INTO product_slots VALUES(52,138); +INSERT INTO product_slots VALUES(52,139); +INSERT INTO product_slots VALUES(52,140); +INSERT INTO product_slots VALUES(52,141); +INSERT INTO product_slots VALUES(52,142); +INSERT INTO product_slots VALUES(52,143); +INSERT INTO product_slots VALUES(52,145); +INSERT INTO product_slots VALUES(52,146); +INSERT INTO product_slots VALUES(52,147); +INSERT INTO product_slots VALUES(52,148); +INSERT INTO product_slots VALUES(52,149); +INSERT INTO product_slots VALUES(52,150); +INSERT INTO product_slots VALUES(52,151); +INSERT INTO product_slots VALUES(52,152); +INSERT INTO product_slots VALUES(52,153); +INSERT INTO product_slots VALUES(52,154); +INSERT INTO product_slots VALUES(52,155); +INSERT INTO product_slots VALUES(52,156); +INSERT INTO product_slots VALUES(52,157); +INSERT INTO product_slots VALUES(52,158); +INSERT INTO product_slots VALUES(52,159); +INSERT INTO product_slots VALUES(52,160); +INSERT INTO product_slots VALUES(52,161); +INSERT INTO product_slots VALUES(52,162); +INSERT INTO product_slots VALUES(52,163); +INSERT INTO product_slots VALUES(52,164); +INSERT INTO product_slots VALUES(52,165); +INSERT INTO product_slots VALUES(52,166); +INSERT INTO product_slots VALUES(52,167); +INSERT INTO product_slots VALUES(52,168); +INSERT INTO product_slots VALUES(52,169); +INSERT INTO product_slots VALUES(52,170); +INSERT INTO product_slots VALUES(52,171); +INSERT INTO product_slots VALUES(52,172); +INSERT INTO product_slots VALUES(52,173); +INSERT INTO product_slots VALUES(52,174); +INSERT INTO product_slots VALUES(52,175); +INSERT INTO product_slots VALUES(52,176); +INSERT INTO product_slots VALUES(52,177); +INSERT INTO product_slots VALUES(52,178); +INSERT INTO product_slots VALUES(52,179); +INSERT INTO product_slots VALUES(52,180); +INSERT INTO product_slots VALUES(52,181); +INSERT INTO product_slots VALUES(52,182); +INSERT INTO product_slots VALUES(52,183); +INSERT INTO product_slots VALUES(52,184); +INSERT INTO product_slots VALUES(52,185); +INSERT INTO product_slots VALUES(52,186); +INSERT INTO product_slots VALUES(52,187); +INSERT INTO product_slots VALUES(52,188); +INSERT INTO product_slots VALUES(52,189); +INSERT INTO product_slots VALUES(52,190); +INSERT INTO product_slots VALUES(52,191); +INSERT INTO product_slots VALUES(52,192); +INSERT INTO product_slots VALUES(52,193); +INSERT INTO product_slots VALUES(52,194); +INSERT INTO product_slots VALUES(52,195); +INSERT INTO product_slots VALUES(52,196); +INSERT INTO product_slots VALUES(52,197); +INSERT INTO product_slots VALUES(52,198); +INSERT INTO product_slots VALUES(52,199); +INSERT INTO product_slots VALUES(52,200); +INSERT INTO product_slots VALUES(52,201); +INSERT INTO product_slots VALUES(52,202); +INSERT INTO product_slots VALUES(52,203); +INSERT INTO product_slots VALUES(52,204); +INSERT INTO product_slots VALUES(52,205); +INSERT INTO product_slots VALUES(52,206); +INSERT INTO product_slots VALUES(52,207); +INSERT INTO product_slots VALUES(52,208); +INSERT INTO product_slots VALUES(52,209); +INSERT INTO product_slots VALUES(52,210); +INSERT INTO product_slots VALUES(52,211); +INSERT INTO product_slots VALUES(52,212); +INSERT INTO product_slots VALUES(52,213); +INSERT INTO product_slots VALUES(52,214); +INSERT INTO product_slots VALUES(52,215); +INSERT INTO product_slots VALUES(52,216); +INSERT INTO product_slots VALUES(52,217); +INSERT INTO product_slots VALUES(52,218); +INSERT INTO product_slots VALUES(52,219); +INSERT INTO product_slots VALUES(52,220); +INSERT INTO product_slots VALUES(52,221); +INSERT INTO product_slots VALUES(52,222); +INSERT INTO product_slots VALUES(52,223); +INSERT INTO product_slots VALUES(52,224); +INSERT INTO product_slots VALUES(52,225); +INSERT INTO product_slots VALUES(52,226); +INSERT INTO product_slots VALUES(52,227); +INSERT INTO product_slots VALUES(52,228); +INSERT INTO product_slots VALUES(52,229); +INSERT INTO product_slots VALUES(52,230); +INSERT INTO product_slots VALUES(52,231); +INSERT INTO product_slots VALUES(52,232); +INSERT INTO product_slots VALUES(52,233); +INSERT INTO product_slots VALUES(52,234); +INSERT INTO product_slots VALUES(52,235); +INSERT INTO product_slots VALUES(52,236); +INSERT INTO product_slots VALUES(52,237); +INSERT INTO product_slots VALUES(52,238); +INSERT INTO product_slots VALUES(52,239); +INSERT INTO product_slots VALUES(52,240); +INSERT INTO product_slots VALUES(52,241); +INSERT INTO product_slots VALUES(52,242); +INSERT INTO product_slots VALUES(52,243); +INSERT INTO product_slots VALUES(52,244); +INSERT INTO product_slots VALUES(52,274); +INSERT INTO product_slots VALUES(52,275); +INSERT INTO product_slots VALUES(52,279); +INSERT INTO product_slots VALUES(52,280); +INSERT INTO product_slots VALUES(52,281); +INSERT INTO product_slots VALUES(52,282); +INSERT INTO product_slots VALUES(52,283); +INSERT INTO product_slots VALUES(52,284); +INSERT INTO product_slots VALUES(52,285); +INSERT INTO product_slots VALUES(52,286); +INSERT INTO product_slots VALUES(52,287); +INSERT INTO product_slots VALUES(53,39); +INSERT INTO product_slots VALUES(53,40); +INSERT INTO product_slots VALUES(53,43); +INSERT INTO product_slots VALUES(53,45); +INSERT INTO product_slots VALUES(53,46); +INSERT INTO product_slots VALUES(53,48); +INSERT INTO product_slots VALUES(53,49); +INSERT INTO product_slots VALUES(53,51); +INSERT INTO product_slots VALUES(53,52); +INSERT INTO product_slots VALUES(53,53); +INSERT INTO product_slots VALUES(53,54); +INSERT INTO product_slots VALUES(53,57); +INSERT INTO product_slots VALUES(53,58); +INSERT INTO product_slots VALUES(53,59); +INSERT INTO product_slots VALUES(53,60); +INSERT INTO product_slots VALUES(53,61); +INSERT INTO product_slots VALUES(53,62); +INSERT INTO product_slots VALUES(53,63); +INSERT INTO product_slots VALUES(53,64); +INSERT INTO product_slots VALUES(53,65); +INSERT INTO product_slots VALUES(53,66); +INSERT INTO product_slots VALUES(53,67); +INSERT INTO product_slots VALUES(53,68); +INSERT INTO product_slots VALUES(53,69); +INSERT INTO product_slots VALUES(53,70); +INSERT INTO product_slots VALUES(53,71); +INSERT INTO product_slots VALUES(53,72); +INSERT INTO product_slots VALUES(53,73); +INSERT INTO product_slots VALUES(53,74); +INSERT INTO product_slots VALUES(53,75); +INSERT INTO product_slots VALUES(53,76); +INSERT INTO product_slots VALUES(53,77); +INSERT INTO product_slots VALUES(53,78); +INSERT INTO product_slots VALUES(53,79); +INSERT INTO product_slots VALUES(53,80); +INSERT INTO product_slots VALUES(53,81); +INSERT INTO product_slots VALUES(53,82); +INSERT INTO product_slots VALUES(53,83); +INSERT INTO product_slots VALUES(53,84); +INSERT INTO product_slots VALUES(53,85); +INSERT INTO product_slots VALUES(53,86); +INSERT INTO product_slots VALUES(53,87); +INSERT INTO product_slots VALUES(53,88); +INSERT INTO product_slots VALUES(53,89); +INSERT INTO product_slots VALUES(53,90); +INSERT INTO product_slots VALUES(53,91); +INSERT INTO product_slots VALUES(53,92); +INSERT INTO product_slots VALUES(53,93); +INSERT INTO product_slots VALUES(53,94); +INSERT INTO product_slots VALUES(53,95); +INSERT INTO product_slots VALUES(53,96); +INSERT INTO product_slots VALUES(53,97); +INSERT INTO product_slots VALUES(53,98); +INSERT INTO product_slots VALUES(53,99); +INSERT INTO product_slots VALUES(53,100); +INSERT INTO product_slots VALUES(53,102); +INSERT INTO product_slots VALUES(53,103); +INSERT INTO product_slots VALUES(53,104); +INSERT INTO product_slots VALUES(53,105); +INSERT INTO product_slots VALUES(53,106); +INSERT INTO product_slots VALUES(53,107); +INSERT INTO product_slots VALUES(53,108); +INSERT INTO product_slots VALUES(53,109); +INSERT INTO product_slots VALUES(53,110); +INSERT INTO product_slots VALUES(53,111); +INSERT INTO product_slots VALUES(53,112); +INSERT INTO product_slots VALUES(53,113); +INSERT INTO product_slots VALUES(53,114); +INSERT INTO product_slots VALUES(53,115); +INSERT INTO product_slots VALUES(53,117); +INSERT INTO product_slots VALUES(53,118); +INSERT INTO product_slots VALUES(53,119); +INSERT INTO product_slots VALUES(53,120); +INSERT INTO product_slots VALUES(53,121); +INSERT INTO product_slots VALUES(53,122); +INSERT INTO product_slots VALUES(53,123); +INSERT INTO product_slots VALUES(53,124); +INSERT INTO product_slots VALUES(53,125); +INSERT INTO product_slots VALUES(53,126); +INSERT INTO product_slots VALUES(53,127); +INSERT INTO product_slots VALUES(53,128); +INSERT INTO product_slots VALUES(53,129); +INSERT INTO product_slots VALUES(53,130); +INSERT INTO product_slots VALUES(53,131); +INSERT INTO product_slots VALUES(53,132); +INSERT INTO product_slots VALUES(53,133); +INSERT INTO product_slots VALUES(53,134); +INSERT INTO product_slots VALUES(53,135); +INSERT INTO product_slots VALUES(53,136); +INSERT INTO product_slots VALUES(53,138); +INSERT INTO product_slots VALUES(53,139); +INSERT INTO product_slots VALUES(53,140); +INSERT INTO product_slots VALUES(53,141); +INSERT INTO product_slots VALUES(53,142); +INSERT INTO product_slots VALUES(53,143); +INSERT INTO product_slots VALUES(53,145); +INSERT INTO product_slots VALUES(53,146); +INSERT INTO product_slots VALUES(53,147); +INSERT INTO product_slots VALUES(53,148); +INSERT INTO product_slots VALUES(53,149); +INSERT INTO product_slots VALUES(53,150); +INSERT INTO product_slots VALUES(53,151); +INSERT INTO product_slots VALUES(53,152); +INSERT INTO product_slots VALUES(53,153); +INSERT INTO product_slots VALUES(53,154); +INSERT INTO product_slots VALUES(53,155); +INSERT INTO product_slots VALUES(53,156); +INSERT INTO product_slots VALUES(53,157); +INSERT INTO product_slots VALUES(53,158); +INSERT INTO product_slots VALUES(53,159); +INSERT INTO product_slots VALUES(53,160); +INSERT INTO product_slots VALUES(53,161); +INSERT INTO product_slots VALUES(53,162); +INSERT INTO product_slots VALUES(53,163); +INSERT INTO product_slots VALUES(53,164); +INSERT INTO product_slots VALUES(53,165); +INSERT INTO product_slots VALUES(53,166); +INSERT INTO product_slots VALUES(53,167); +INSERT INTO product_slots VALUES(53,168); +INSERT INTO product_slots VALUES(53,169); +INSERT INTO product_slots VALUES(53,170); +INSERT INTO product_slots VALUES(53,171); +INSERT INTO product_slots VALUES(53,172); +INSERT INTO product_slots VALUES(53,173); +INSERT INTO product_slots VALUES(53,174); +INSERT INTO product_slots VALUES(53,175); +INSERT INTO product_slots VALUES(53,176); +INSERT INTO product_slots VALUES(53,177); +INSERT INTO product_slots VALUES(53,178); +INSERT INTO product_slots VALUES(53,179); +INSERT INTO product_slots VALUES(53,180); +INSERT INTO product_slots VALUES(53,181); +INSERT INTO product_slots VALUES(53,182); +INSERT INTO product_slots VALUES(53,183); +INSERT INTO product_slots VALUES(53,184); +INSERT INTO product_slots VALUES(53,185); +INSERT INTO product_slots VALUES(53,186); +INSERT INTO product_slots VALUES(53,187); +INSERT INTO product_slots VALUES(53,188); +INSERT INTO product_slots VALUES(53,189); +INSERT INTO product_slots VALUES(53,190); +INSERT INTO product_slots VALUES(53,191); +INSERT INTO product_slots VALUES(53,192); +INSERT INTO product_slots VALUES(53,193); +INSERT INTO product_slots VALUES(53,194); +INSERT INTO product_slots VALUES(53,195); +INSERT INTO product_slots VALUES(53,196); +INSERT INTO product_slots VALUES(53,197); +INSERT INTO product_slots VALUES(53,198); +INSERT INTO product_slots VALUES(53,199); +INSERT INTO product_slots VALUES(53,200); +INSERT INTO product_slots VALUES(53,201); +INSERT INTO product_slots VALUES(53,202); +INSERT INTO product_slots VALUES(53,203); +INSERT INTO product_slots VALUES(53,204); +INSERT INTO product_slots VALUES(53,205); +INSERT INTO product_slots VALUES(53,206); +INSERT INTO product_slots VALUES(53,207); +INSERT INTO product_slots VALUES(53,208); +INSERT INTO product_slots VALUES(53,209); +INSERT INTO product_slots VALUES(53,210); +INSERT INTO product_slots VALUES(53,211); +INSERT INTO product_slots VALUES(53,212); +INSERT INTO product_slots VALUES(53,213); +INSERT INTO product_slots VALUES(53,214); +INSERT INTO product_slots VALUES(53,215); +INSERT INTO product_slots VALUES(53,216); +INSERT INTO product_slots VALUES(53,217); +INSERT INTO product_slots VALUES(53,218); +INSERT INTO product_slots VALUES(53,219); +INSERT INTO product_slots VALUES(53,220); +INSERT INTO product_slots VALUES(53,221); +INSERT INTO product_slots VALUES(53,222); +INSERT INTO product_slots VALUES(53,223); +INSERT INTO product_slots VALUES(53,224); +INSERT INTO product_slots VALUES(53,225); +INSERT INTO product_slots VALUES(53,226); +INSERT INTO product_slots VALUES(53,227); +INSERT INTO product_slots VALUES(53,228); +INSERT INTO product_slots VALUES(53,229); +INSERT INTO product_slots VALUES(53,230); +INSERT INTO product_slots VALUES(53,231); +INSERT INTO product_slots VALUES(53,232); +INSERT INTO product_slots VALUES(53,233); +INSERT INTO product_slots VALUES(53,234); +INSERT INTO product_slots VALUES(53,235); +INSERT INTO product_slots VALUES(53,236); +INSERT INTO product_slots VALUES(53,237); +INSERT INTO product_slots VALUES(53,238); +INSERT INTO product_slots VALUES(53,239); +INSERT INTO product_slots VALUES(53,240); +INSERT INTO product_slots VALUES(53,241); +INSERT INTO product_slots VALUES(53,242); +INSERT INTO product_slots VALUES(53,243); +INSERT INTO product_slots VALUES(53,244); +INSERT INTO product_slots VALUES(53,274); +INSERT INTO product_slots VALUES(53,275); +INSERT INTO product_slots VALUES(53,279); +INSERT INTO product_slots VALUES(53,280); +INSERT INTO product_slots VALUES(53,281); +INSERT INTO product_slots VALUES(53,282); +INSERT INTO product_slots VALUES(53,283); +INSERT INTO product_slots VALUES(53,284); +INSERT INTO product_slots VALUES(53,285); +INSERT INTO product_slots VALUES(53,286); +INSERT INTO product_slots VALUES(53,287); +INSERT INTO product_slots VALUES(54,40); +INSERT INTO product_slots VALUES(54,62); +INSERT INTO product_slots VALUES(54,63); +INSERT INTO product_slots VALUES(54,64); +INSERT INTO product_slots VALUES(54,65); +INSERT INTO product_slots VALUES(54,66); +INSERT INTO product_slots VALUES(54,67); +INSERT INTO product_slots VALUES(54,68); +INSERT INTO product_slots VALUES(54,69); +INSERT INTO product_slots VALUES(54,70); +INSERT INTO product_slots VALUES(54,71); +INSERT INTO product_slots VALUES(54,72); +INSERT INTO product_slots VALUES(54,73); +INSERT INTO product_slots VALUES(54,74); +INSERT INTO product_slots VALUES(54,75); +INSERT INTO product_slots VALUES(54,76); +INSERT INTO product_slots VALUES(54,77); +INSERT INTO product_slots VALUES(54,78); +INSERT INTO product_slots VALUES(54,79); +INSERT INTO product_slots VALUES(54,80); +INSERT INTO product_slots VALUES(54,81); +INSERT INTO product_slots VALUES(54,82); +INSERT INTO product_slots VALUES(54,83); +INSERT INTO product_slots VALUES(54,84); +INSERT INTO product_slots VALUES(54,85); +INSERT INTO product_slots VALUES(54,86); +INSERT INTO product_slots VALUES(54,87); +INSERT INTO product_slots VALUES(54,88); +INSERT INTO product_slots VALUES(54,89); +INSERT INTO product_slots VALUES(54,90); +INSERT INTO product_slots VALUES(54,91); +INSERT INTO product_slots VALUES(54,92); +INSERT INTO product_slots VALUES(54,93); +INSERT INTO product_slots VALUES(54,94); +INSERT INTO product_slots VALUES(54,95); +INSERT INTO product_slots VALUES(54,96); +INSERT INTO product_slots VALUES(54,97); +INSERT INTO product_slots VALUES(54,98); +INSERT INTO product_slots VALUES(54,99); +INSERT INTO product_slots VALUES(54,100); +INSERT INTO product_slots VALUES(54,102); +INSERT INTO product_slots VALUES(54,103); +INSERT INTO product_slots VALUES(54,104); +INSERT INTO product_slots VALUES(54,105); +INSERT INTO product_slots VALUES(54,106); +INSERT INTO product_slots VALUES(54,107); +INSERT INTO product_slots VALUES(54,108); +INSERT INTO product_slots VALUES(54,109); +INSERT INTO product_slots VALUES(54,110); +INSERT INTO product_slots VALUES(54,111); +INSERT INTO product_slots VALUES(54,112); +INSERT INTO product_slots VALUES(54,113); +INSERT INTO product_slots VALUES(54,114); +INSERT INTO product_slots VALUES(54,115); +INSERT INTO product_slots VALUES(54,117); +INSERT INTO product_slots VALUES(54,118); +INSERT INTO product_slots VALUES(54,119); +INSERT INTO product_slots VALUES(54,120); +INSERT INTO product_slots VALUES(54,121); +INSERT INTO product_slots VALUES(54,122); +INSERT INTO product_slots VALUES(54,123); +INSERT INTO product_slots VALUES(54,124); +INSERT INTO product_slots VALUES(54,125); +INSERT INTO product_slots VALUES(54,126); +INSERT INTO product_slots VALUES(54,127); +INSERT INTO product_slots VALUES(54,128); +INSERT INTO product_slots VALUES(54,129); +INSERT INTO product_slots VALUES(54,130); +INSERT INTO product_slots VALUES(54,131); +INSERT INTO product_slots VALUES(54,132); +INSERT INTO product_slots VALUES(54,133); +INSERT INTO product_slots VALUES(54,134); +INSERT INTO product_slots VALUES(54,135); +INSERT INTO product_slots VALUES(54,136); +INSERT INTO product_slots VALUES(54,138); +INSERT INTO product_slots VALUES(54,139); +INSERT INTO product_slots VALUES(54,140); +INSERT INTO product_slots VALUES(54,141); +INSERT INTO product_slots VALUES(54,142); +INSERT INTO product_slots VALUES(54,143); +INSERT INTO product_slots VALUES(54,145); +INSERT INTO product_slots VALUES(54,146); +INSERT INTO product_slots VALUES(54,147); +INSERT INTO product_slots VALUES(54,148); +INSERT INTO product_slots VALUES(54,149); +INSERT INTO product_slots VALUES(54,150); +INSERT INTO product_slots VALUES(54,151); +INSERT INTO product_slots VALUES(54,152); +INSERT INTO product_slots VALUES(54,153); +INSERT INTO product_slots VALUES(54,154); +INSERT INTO product_slots VALUES(54,155); +INSERT INTO product_slots VALUES(54,156); +INSERT INTO product_slots VALUES(54,157); +INSERT INTO product_slots VALUES(54,158); +INSERT INTO product_slots VALUES(54,159); +INSERT INTO product_slots VALUES(54,160); +INSERT INTO product_slots VALUES(54,161); +INSERT INTO product_slots VALUES(54,162); +INSERT INTO product_slots VALUES(54,163); +INSERT INTO product_slots VALUES(54,164); +INSERT INTO product_slots VALUES(54,165); +INSERT INTO product_slots VALUES(54,166); +INSERT INTO product_slots VALUES(54,167); +INSERT INTO product_slots VALUES(54,168); +INSERT INTO product_slots VALUES(54,169); +INSERT INTO product_slots VALUES(54,170); +INSERT INTO product_slots VALUES(54,171); +INSERT INTO product_slots VALUES(54,172); +INSERT INTO product_slots VALUES(54,173); +INSERT INTO product_slots VALUES(54,174); +INSERT INTO product_slots VALUES(54,175); +INSERT INTO product_slots VALUES(54,176); +INSERT INTO product_slots VALUES(54,177); +INSERT INTO product_slots VALUES(54,178); +INSERT INTO product_slots VALUES(54,179); +INSERT INTO product_slots VALUES(54,180); +INSERT INTO product_slots VALUES(54,181); +INSERT INTO product_slots VALUES(54,182); +INSERT INTO product_slots VALUES(54,183); +INSERT INTO product_slots VALUES(54,184); +INSERT INTO product_slots VALUES(54,185); +INSERT INTO product_slots VALUES(54,186); +INSERT INTO product_slots VALUES(54,187); +INSERT INTO product_slots VALUES(54,188); +INSERT INTO product_slots VALUES(54,189); +INSERT INTO product_slots VALUES(54,190); +INSERT INTO product_slots VALUES(54,191); +INSERT INTO product_slots VALUES(54,192); +INSERT INTO product_slots VALUES(54,193); +INSERT INTO product_slots VALUES(54,194); +INSERT INTO product_slots VALUES(54,195); +INSERT INTO product_slots VALUES(54,196); +INSERT INTO product_slots VALUES(54,197); +INSERT INTO product_slots VALUES(54,198); +INSERT INTO product_slots VALUES(54,199); +INSERT INTO product_slots VALUES(54,200); +INSERT INTO product_slots VALUES(54,201); +INSERT INTO product_slots VALUES(54,202); +INSERT INTO product_slots VALUES(54,203); +INSERT INTO product_slots VALUES(54,204); +INSERT INTO product_slots VALUES(54,205); +INSERT INTO product_slots VALUES(54,206); +INSERT INTO product_slots VALUES(54,207); +INSERT INTO product_slots VALUES(54,208); +INSERT INTO product_slots VALUES(54,209); +INSERT INTO product_slots VALUES(54,210); +INSERT INTO product_slots VALUES(54,211); +INSERT INTO product_slots VALUES(54,212); +INSERT INTO product_slots VALUES(54,213); +INSERT INTO product_slots VALUES(54,214); +INSERT INTO product_slots VALUES(54,215); +INSERT INTO product_slots VALUES(54,216); +INSERT INTO product_slots VALUES(54,217); +INSERT INTO product_slots VALUES(54,218); +INSERT INTO product_slots VALUES(54,219); +INSERT INTO product_slots VALUES(54,220); +INSERT INTO product_slots VALUES(54,221); +INSERT INTO product_slots VALUES(54,222); +INSERT INTO product_slots VALUES(54,223); +INSERT INTO product_slots VALUES(54,224); +INSERT INTO product_slots VALUES(54,225); +INSERT INTO product_slots VALUES(54,226); +INSERT INTO product_slots VALUES(54,227); +INSERT INTO product_slots VALUES(54,228); +INSERT INTO product_slots VALUES(54,229); +INSERT INTO product_slots VALUES(54,230); +INSERT INTO product_slots VALUES(54,231); +INSERT INTO product_slots VALUES(54,232); +INSERT INTO product_slots VALUES(54,233); +INSERT INTO product_slots VALUES(54,234); +INSERT INTO product_slots VALUES(54,235); +INSERT INTO product_slots VALUES(54,236); +INSERT INTO product_slots VALUES(54,237); +INSERT INTO product_slots VALUES(54,238); +INSERT INTO product_slots VALUES(54,239); +INSERT INTO product_slots VALUES(54,240); +INSERT INTO product_slots VALUES(54,241); +INSERT INTO product_slots VALUES(54,242); +INSERT INTO product_slots VALUES(54,243); +INSERT INTO product_slots VALUES(54,244); +INSERT INTO product_slots VALUES(54,274); +INSERT INTO product_slots VALUES(54,275); +INSERT INTO product_slots VALUES(54,279); +INSERT INTO product_slots VALUES(54,280); +INSERT INTO product_slots VALUES(54,281); +INSERT INTO product_slots VALUES(54,282); +INSERT INTO product_slots VALUES(54,283); +INSERT INTO product_slots VALUES(54,284); +INSERT INTO product_slots VALUES(54,285); +INSERT INTO product_slots VALUES(54,286); +INSERT INTO product_slots VALUES(54,287); +INSERT INTO product_slots VALUES(55,40); +INSERT INTO product_slots VALUES(55,59); +INSERT INTO product_slots VALUES(55,62); +INSERT INTO product_slots VALUES(55,63); +INSERT INTO product_slots VALUES(55,64); +INSERT INTO product_slots VALUES(55,65); +INSERT INTO product_slots VALUES(55,66); +INSERT INTO product_slots VALUES(55,67); +INSERT INTO product_slots VALUES(55,68); +INSERT INTO product_slots VALUES(55,69); +INSERT INTO product_slots VALUES(55,70); +INSERT INTO product_slots VALUES(55,71); +INSERT INTO product_slots VALUES(55,72); +INSERT INTO product_slots VALUES(55,73); +INSERT INTO product_slots VALUES(55,74); +INSERT INTO product_slots VALUES(55,75); +INSERT INTO product_slots VALUES(55,76); +INSERT INTO product_slots VALUES(55,77); +INSERT INTO product_slots VALUES(55,78); +INSERT INTO product_slots VALUES(55,79); +INSERT INTO product_slots VALUES(55,80); +INSERT INTO product_slots VALUES(55,81); +INSERT INTO product_slots VALUES(55,82); +INSERT INTO product_slots VALUES(55,83); +INSERT INTO product_slots VALUES(55,84); +INSERT INTO product_slots VALUES(55,85); +INSERT INTO product_slots VALUES(55,86); +INSERT INTO product_slots VALUES(55,87); +INSERT INTO product_slots VALUES(55,88); +INSERT INTO product_slots VALUES(55,89); +INSERT INTO product_slots VALUES(55,90); +INSERT INTO product_slots VALUES(55,91); +INSERT INTO product_slots VALUES(55,92); +INSERT INTO product_slots VALUES(55,93); +INSERT INTO product_slots VALUES(55,94); +INSERT INTO product_slots VALUES(55,95); +INSERT INTO product_slots VALUES(55,96); +INSERT INTO product_slots VALUES(55,97); +INSERT INTO product_slots VALUES(55,98); +INSERT INTO product_slots VALUES(55,99); +INSERT INTO product_slots VALUES(55,100); +INSERT INTO product_slots VALUES(55,102); +INSERT INTO product_slots VALUES(55,103); +INSERT INTO product_slots VALUES(55,104); +INSERT INTO product_slots VALUES(55,105); +INSERT INTO product_slots VALUES(55,106); +INSERT INTO product_slots VALUES(55,107); +INSERT INTO product_slots VALUES(55,108); +INSERT INTO product_slots VALUES(55,109); +INSERT INTO product_slots VALUES(55,110); +INSERT INTO product_slots VALUES(55,111); +INSERT INTO product_slots VALUES(55,112); +INSERT INTO product_slots VALUES(55,113); +INSERT INTO product_slots VALUES(55,114); +INSERT INTO product_slots VALUES(55,115); +INSERT INTO product_slots VALUES(55,117); +INSERT INTO product_slots VALUES(55,118); +INSERT INTO product_slots VALUES(55,119); +INSERT INTO product_slots VALUES(55,120); +INSERT INTO product_slots VALUES(55,121); +INSERT INTO product_slots VALUES(55,122); +INSERT INTO product_slots VALUES(55,123); +INSERT INTO product_slots VALUES(55,124); +INSERT INTO product_slots VALUES(55,125); +INSERT INTO product_slots VALUES(55,126); +INSERT INTO product_slots VALUES(55,127); +INSERT INTO product_slots VALUES(55,128); +INSERT INTO product_slots VALUES(55,129); +INSERT INTO product_slots VALUES(55,130); +INSERT INTO product_slots VALUES(55,131); +INSERT INTO product_slots VALUES(55,132); +INSERT INTO product_slots VALUES(55,133); +INSERT INTO product_slots VALUES(55,134); +INSERT INTO product_slots VALUES(55,135); +INSERT INTO product_slots VALUES(55,136); +INSERT INTO product_slots VALUES(55,138); +INSERT INTO product_slots VALUES(55,139); +INSERT INTO product_slots VALUES(55,140); +INSERT INTO product_slots VALUES(55,141); +INSERT INTO product_slots VALUES(55,142); +INSERT INTO product_slots VALUES(55,143); +INSERT INTO product_slots VALUES(55,145); +INSERT INTO product_slots VALUES(55,146); +INSERT INTO product_slots VALUES(55,147); +INSERT INTO product_slots VALUES(55,148); +INSERT INTO product_slots VALUES(55,149); +INSERT INTO product_slots VALUES(55,150); +INSERT INTO product_slots VALUES(55,151); +INSERT INTO product_slots VALUES(55,152); +INSERT INTO product_slots VALUES(55,153); +INSERT INTO product_slots VALUES(55,154); +INSERT INTO product_slots VALUES(55,155); +INSERT INTO product_slots VALUES(55,156); +INSERT INTO product_slots VALUES(55,157); +INSERT INTO product_slots VALUES(55,158); +INSERT INTO product_slots VALUES(55,159); +INSERT INTO product_slots VALUES(55,160); +INSERT INTO product_slots VALUES(55,161); +INSERT INTO product_slots VALUES(55,162); +INSERT INTO product_slots VALUES(55,163); +INSERT INTO product_slots VALUES(55,164); +INSERT INTO product_slots VALUES(55,165); +INSERT INTO product_slots VALUES(55,166); +INSERT INTO product_slots VALUES(55,167); +INSERT INTO product_slots VALUES(55,168); +INSERT INTO product_slots VALUES(55,169); +INSERT INTO product_slots VALUES(55,170); +INSERT INTO product_slots VALUES(55,171); +INSERT INTO product_slots VALUES(55,172); +INSERT INTO product_slots VALUES(55,173); +INSERT INTO product_slots VALUES(55,174); +INSERT INTO product_slots VALUES(55,175); +INSERT INTO product_slots VALUES(55,176); +INSERT INTO product_slots VALUES(55,177); +INSERT INTO product_slots VALUES(55,178); +INSERT INTO product_slots VALUES(55,179); +INSERT INTO product_slots VALUES(55,180); +INSERT INTO product_slots VALUES(55,181); +INSERT INTO product_slots VALUES(55,182); +INSERT INTO product_slots VALUES(55,183); +INSERT INTO product_slots VALUES(55,184); +INSERT INTO product_slots VALUES(55,185); +INSERT INTO product_slots VALUES(55,186); +INSERT INTO product_slots VALUES(55,187); +INSERT INTO product_slots VALUES(55,188); +INSERT INTO product_slots VALUES(55,189); +INSERT INTO product_slots VALUES(55,190); +INSERT INTO product_slots VALUES(55,191); +INSERT INTO product_slots VALUES(55,192); +INSERT INTO product_slots VALUES(55,193); +INSERT INTO product_slots VALUES(55,194); +INSERT INTO product_slots VALUES(55,195); +INSERT INTO product_slots VALUES(55,196); +INSERT INTO product_slots VALUES(55,197); +INSERT INTO product_slots VALUES(55,198); +INSERT INTO product_slots VALUES(55,199); +INSERT INTO product_slots VALUES(55,200); +INSERT INTO product_slots VALUES(55,201); +INSERT INTO product_slots VALUES(55,202); +INSERT INTO product_slots VALUES(55,203); +INSERT INTO product_slots VALUES(55,204); +INSERT INTO product_slots VALUES(55,205); +INSERT INTO product_slots VALUES(55,206); +INSERT INTO product_slots VALUES(55,207); +INSERT INTO product_slots VALUES(55,208); +INSERT INTO product_slots VALUES(55,209); +INSERT INTO product_slots VALUES(55,210); +INSERT INTO product_slots VALUES(55,211); +INSERT INTO product_slots VALUES(55,212); +INSERT INTO product_slots VALUES(55,213); +INSERT INTO product_slots VALUES(55,214); +INSERT INTO product_slots VALUES(55,215); +INSERT INTO product_slots VALUES(55,216); +INSERT INTO product_slots VALUES(55,217); +INSERT INTO product_slots VALUES(55,218); +INSERT INTO product_slots VALUES(55,219); +INSERT INTO product_slots VALUES(55,220); +INSERT INTO product_slots VALUES(55,221); +INSERT INTO product_slots VALUES(55,222); +INSERT INTO product_slots VALUES(55,223); +INSERT INTO product_slots VALUES(55,224); +INSERT INTO product_slots VALUES(55,225); +INSERT INTO product_slots VALUES(55,226); +INSERT INTO product_slots VALUES(55,227); +INSERT INTO product_slots VALUES(55,228); +INSERT INTO product_slots VALUES(55,229); +INSERT INTO product_slots VALUES(55,230); +INSERT INTO product_slots VALUES(55,231); +INSERT INTO product_slots VALUES(55,232); +INSERT INTO product_slots VALUES(55,233); +INSERT INTO product_slots VALUES(55,234); +INSERT INTO product_slots VALUES(55,235); +INSERT INTO product_slots VALUES(55,236); +INSERT INTO product_slots VALUES(55,237); +INSERT INTO product_slots VALUES(55,238); +INSERT INTO product_slots VALUES(55,239); +INSERT INTO product_slots VALUES(55,240); +INSERT INTO product_slots VALUES(55,241); +INSERT INTO product_slots VALUES(55,242); +INSERT INTO product_slots VALUES(55,243); +INSERT INTO product_slots VALUES(55,244); +INSERT INTO product_slots VALUES(55,274); +INSERT INTO product_slots VALUES(55,275); +INSERT INTO product_slots VALUES(55,279); +INSERT INTO product_slots VALUES(55,280); +INSERT INTO product_slots VALUES(55,281); +INSERT INTO product_slots VALUES(55,282); +INSERT INTO product_slots VALUES(55,283); +INSERT INTO product_slots VALUES(55,284); +INSERT INTO product_slots VALUES(55,285); +INSERT INTO product_slots VALUES(55,286); +INSERT INTO product_slots VALUES(55,287); +INSERT INTO product_slots VALUES(56,39); +INSERT INTO product_slots VALUES(56,40); +INSERT INTO product_slots VALUES(56,43); +INSERT INTO product_slots VALUES(56,45); +INSERT INTO product_slots VALUES(56,46); +INSERT INTO product_slots VALUES(56,48); +INSERT INTO product_slots VALUES(56,49); +INSERT INTO product_slots VALUES(56,51); +INSERT INTO product_slots VALUES(56,52); +INSERT INTO product_slots VALUES(56,53); +INSERT INTO product_slots VALUES(56,54); +INSERT INTO product_slots VALUES(56,57); +INSERT INTO product_slots VALUES(56,58); +INSERT INTO product_slots VALUES(56,59); +INSERT INTO product_slots VALUES(56,60); +INSERT INTO product_slots VALUES(56,61); +INSERT INTO product_slots VALUES(56,62); +INSERT INTO product_slots VALUES(56,63); +INSERT INTO product_slots VALUES(56,64); +INSERT INTO product_slots VALUES(56,65); +INSERT INTO product_slots VALUES(56,66); +INSERT INTO product_slots VALUES(56,67); +INSERT INTO product_slots VALUES(56,68); +INSERT INTO product_slots VALUES(56,69); +INSERT INTO product_slots VALUES(56,70); +INSERT INTO product_slots VALUES(56,71); +INSERT INTO product_slots VALUES(56,72); +INSERT INTO product_slots VALUES(56,73); +INSERT INTO product_slots VALUES(56,74); +INSERT INTO product_slots VALUES(56,75); +INSERT INTO product_slots VALUES(56,76); +INSERT INTO product_slots VALUES(56,77); +INSERT INTO product_slots VALUES(56,78); +INSERT INTO product_slots VALUES(56,79); +INSERT INTO product_slots VALUES(56,80); +INSERT INTO product_slots VALUES(56,81); +INSERT INTO product_slots VALUES(56,82); +INSERT INTO product_slots VALUES(56,83); +INSERT INTO product_slots VALUES(56,84); +INSERT INTO product_slots VALUES(56,85); +INSERT INTO product_slots VALUES(56,86); +INSERT INTO product_slots VALUES(56,87); +INSERT INTO product_slots VALUES(56,88); +INSERT INTO product_slots VALUES(56,89); +INSERT INTO product_slots VALUES(56,90); +INSERT INTO product_slots VALUES(56,91); +INSERT INTO product_slots VALUES(56,92); +INSERT INTO product_slots VALUES(56,93); +INSERT INTO product_slots VALUES(56,94); +INSERT INTO product_slots VALUES(56,95); +INSERT INTO product_slots VALUES(56,96); +INSERT INTO product_slots VALUES(56,97); +INSERT INTO product_slots VALUES(56,98); +INSERT INTO product_slots VALUES(56,99); +INSERT INTO product_slots VALUES(56,100); +INSERT INTO product_slots VALUES(56,102); +INSERT INTO product_slots VALUES(56,103); +INSERT INTO product_slots VALUES(56,104); +INSERT INTO product_slots VALUES(56,105); +INSERT INTO product_slots VALUES(56,106); +INSERT INTO product_slots VALUES(56,107); +INSERT INTO product_slots VALUES(56,108); +INSERT INTO product_slots VALUES(56,109); +INSERT INTO product_slots VALUES(56,110); +INSERT INTO product_slots VALUES(56,111); +INSERT INTO product_slots VALUES(56,112); +INSERT INTO product_slots VALUES(56,113); +INSERT INTO product_slots VALUES(56,114); +INSERT INTO product_slots VALUES(56,115); +INSERT INTO product_slots VALUES(56,117); +INSERT INTO product_slots VALUES(56,118); +INSERT INTO product_slots VALUES(56,119); +INSERT INTO product_slots VALUES(56,120); +INSERT INTO product_slots VALUES(56,121); +INSERT INTO product_slots VALUES(56,122); +INSERT INTO product_slots VALUES(56,123); +INSERT INTO product_slots VALUES(56,124); +INSERT INTO product_slots VALUES(56,125); +INSERT INTO product_slots VALUES(56,126); +INSERT INTO product_slots VALUES(56,127); +INSERT INTO product_slots VALUES(56,128); +INSERT INTO product_slots VALUES(56,129); +INSERT INTO product_slots VALUES(56,130); +INSERT INTO product_slots VALUES(56,131); +INSERT INTO product_slots VALUES(56,132); +INSERT INTO product_slots VALUES(56,133); +INSERT INTO product_slots VALUES(56,134); +INSERT INTO product_slots VALUES(56,135); +INSERT INTO product_slots VALUES(56,136); +INSERT INTO product_slots VALUES(56,138); +INSERT INTO product_slots VALUES(56,139); +INSERT INTO product_slots VALUES(56,140); +INSERT INTO product_slots VALUES(56,141); +INSERT INTO product_slots VALUES(56,142); +INSERT INTO product_slots VALUES(56,143); +INSERT INTO product_slots VALUES(56,145); +INSERT INTO product_slots VALUES(56,146); +INSERT INTO product_slots VALUES(56,147); +INSERT INTO product_slots VALUES(56,148); +INSERT INTO product_slots VALUES(56,149); +INSERT INTO product_slots VALUES(56,150); +INSERT INTO product_slots VALUES(56,151); +INSERT INTO product_slots VALUES(56,152); +INSERT INTO product_slots VALUES(56,153); +INSERT INTO product_slots VALUES(56,154); +INSERT INTO product_slots VALUES(56,155); +INSERT INTO product_slots VALUES(56,156); +INSERT INTO product_slots VALUES(56,157); +INSERT INTO product_slots VALUES(56,158); +INSERT INTO product_slots VALUES(56,159); +INSERT INTO product_slots VALUES(56,160); +INSERT INTO product_slots VALUES(56,161); +INSERT INTO product_slots VALUES(56,162); +INSERT INTO product_slots VALUES(56,163); +INSERT INTO product_slots VALUES(56,164); +INSERT INTO product_slots VALUES(56,165); +INSERT INTO product_slots VALUES(56,166); +INSERT INTO product_slots VALUES(56,167); +INSERT INTO product_slots VALUES(56,168); +INSERT INTO product_slots VALUES(56,169); +INSERT INTO product_slots VALUES(56,170); +INSERT INTO product_slots VALUES(56,171); +INSERT INTO product_slots VALUES(56,172); +INSERT INTO product_slots VALUES(56,173); +INSERT INTO product_slots VALUES(56,174); +INSERT INTO product_slots VALUES(56,175); +INSERT INTO product_slots VALUES(56,176); +INSERT INTO product_slots VALUES(56,177); +INSERT INTO product_slots VALUES(56,178); +INSERT INTO product_slots VALUES(56,179); +INSERT INTO product_slots VALUES(56,180); +INSERT INTO product_slots VALUES(56,181); +INSERT INTO product_slots VALUES(56,182); +INSERT INTO product_slots VALUES(56,183); +INSERT INTO product_slots VALUES(56,184); +INSERT INTO product_slots VALUES(56,185); +INSERT INTO product_slots VALUES(56,186); +INSERT INTO product_slots VALUES(56,187); +INSERT INTO product_slots VALUES(56,188); +INSERT INTO product_slots VALUES(56,189); +INSERT INTO product_slots VALUES(56,190); +INSERT INTO product_slots VALUES(56,191); +INSERT INTO product_slots VALUES(56,192); +INSERT INTO product_slots VALUES(56,193); +INSERT INTO product_slots VALUES(56,194); +INSERT INTO product_slots VALUES(56,195); +INSERT INTO product_slots VALUES(56,196); +INSERT INTO product_slots VALUES(56,197); +INSERT INTO product_slots VALUES(56,198); +INSERT INTO product_slots VALUES(56,199); +INSERT INTO product_slots VALUES(56,200); +INSERT INTO product_slots VALUES(56,201); +INSERT INTO product_slots VALUES(56,202); +INSERT INTO product_slots VALUES(56,203); +INSERT INTO product_slots VALUES(56,204); +INSERT INTO product_slots VALUES(56,205); +INSERT INTO product_slots VALUES(56,206); +INSERT INTO product_slots VALUES(56,207); +INSERT INTO product_slots VALUES(56,208); +INSERT INTO product_slots VALUES(56,209); +INSERT INTO product_slots VALUES(56,210); +INSERT INTO product_slots VALUES(56,211); +INSERT INTO product_slots VALUES(56,212); +INSERT INTO product_slots VALUES(56,213); +INSERT INTO product_slots VALUES(56,214); +INSERT INTO product_slots VALUES(56,215); +INSERT INTO product_slots VALUES(56,216); +INSERT INTO product_slots VALUES(56,217); +INSERT INTO product_slots VALUES(56,218); +INSERT INTO product_slots VALUES(56,219); +INSERT INTO product_slots VALUES(56,220); +INSERT INTO product_slots VALUES(56,221); +INSERT INTO product_slots VALUES(56,222); +INSERT INTO product_slots VALUES(56,223); +INSERT INTO product_slots VALUES(56,224); +INSERT INTO product_slots VALUES(56,225); +INSERT INTO product_slots VALUES(56,226); +INSERT INTO product_slots VALUES(56,227); +INSERT INTO product_slots VALUES(56,228); +INSERT INTO product_slots VALUES(56,229); +INSERT INTO product_slots VALUES(56,230); +INSERT INTO product_slots VALUES(56,231); +INSERT INTO product_slots VALUES(56,232); +INSERT INTO product_slots VALUES(56,233); +INSERT INTO product_slots VALUES(56,234); +INSERT INTO product_slots VALUES(56,235); +INSERT INTO product_slots VALUES(56,236); +INSERT INTO product_slots VALUES(56,237); +INSERT INTO product_slots VALUES(56,238); +INSERT INTO product_slots VALUES(56,239); +INSERT INTO product_slots VALUES(56,240); +INSERT INTO product_slots VALUES(56,241); +INSERT INTO product_slots VALUES(56,242); +INSERT INTO product_slots VALUES(56,243); +INSERT INTO product_slots VALUES(56,244); +INSERT INTO product_slots VALUES(56,274); +INSERT INTO product_slots VALUES(56,275); +INSERT INTO product_slots VALUES(56,279); +INSERT INTO product_slots VALUES(56,280); +INSERT INTO product_slots VALUES(56,281); +INSERT INTO product_slots VALUES(56,282); +INSERT INTO product_slots VALUES(56,283); +INSERT INTO product_slots VALUES(56,284); +INSERT INTO product_slots VALUES(56,285); +INSERT INTO product_slots VALUES(56,286); +INSERT INTO product_slots VALUES(56,287); +INSERT INTO product_slots VALUES(57,39); +INSERT INTO product_slots VALUES(57,40); +INSERT INTO product_slots VALUES(57,43); +INSERT INTO product_slots VALUES(57,45); +INSERT INTO product_slots VALUES(57,46); +INSERT INTO product_slots VALUES(57,48); +INSERT INTO product_slots VALUES(57,49); +INSERT INTO product_slots VALUES(57,51); +INSERT INTO product_slots VALUES(57,52); +INSERT INTO product_slots VALUES(57,53); +INSERT INTO product_slots VALUES(57,54); +INSERT INTO product_slots VALUES(57,57); +INSERT INTO product_slots VALUES(57,58); +INSERT INTO product_slots VALUES(57,59); +INSERT INTO product_slots VALUES(57,60); +INSERT INTO product_slots VALUES(57,61); +INSERT INTO product_slots VALUES(57,62); +INSERT INTO product_slots VALUES(57,63); +INSERT INTO product_slots VALUES(57,64); +INSERT INTO product_slots VALUES(57,65); +INSERT INTO product_slots VALUES(57,66); +INSERT INTO product_slots VALUES(57,67); +INSERT INTO product_slots VALUES(57,68); +INSERT INTO product_slots VALUES(57,69); +INSERT INTO product_slots VALUES(57,70); +INSERT INTO product_slots VALUES(57,71); +INSERT INTO product_slots VALUES(57,72); +INSERT INTO product_slots VALUES(57,73); +INSERT INTO product_slots VALUES(57,74); +INSERT INTO product_slots VALUES(57,75); +INSERT INTO product_slots VALUES(57,76); +INSERT INTO product_slots VALUES(57,77); +INSERT INTO product_slots VALUES(57,78); +INSERT INTO product_slots VALUES(57,79); +INSERT INTO product_slots VALUES(57,80); +INSERT INTO product_slots VALUES(57,81); +INSERT INTO product_slots VALUES(57,82); +INSERT INTO product_slots VALUES(57,83); +INSERT INTO product_slots VALUES(57,84); +INSERT INTO product_slots VALUES(57,85); +INSERT INTO product_slots VALUES(57,86); +INSERT INTO product_slots VALUES(57,87); +INSERT INTO product_slots VALUES(57,88); +INSERT INTO product_slots VALUES(57,89); +INSERT INTO product_slots VALUES(57,90); +INSERT INTO product_slots VALUES(57,91); +INSERT INTO product_slots VALUES(57,92); +INSERT INTO product_slots VALUES(57,93); +INSERT INTO product_slots VALUES(57,94); +INSERT INTO product_slots VALUES(57,95); +INSERT INTO product_slots VALUES(57,96); +INSERT INTO product_slots VALUES(57,97); +INSERT INTO product_slots VALUES(57,98); +INSERT INTO product_slots VALUES(57,99); +INSERT INTO product_slots VALUES(57,100); +INSERT INTO product_slots VALUES(57,102); +INSERT INTO product_slots VALUES(57,103); +INSERT INTO product_slots VALUES(57,104); +INSERT INTO product_slots VALUES(57,105); +INSERT INTO product_slots VALUES(57,106); +INSERT INTO product_slots VALUES(57,107); +INSERT INTO product_slots VALUES(57,108); +INSERT INTO product_slots VALUES(57,109); +INSERT INTO product_slots VALUES(57,110); +INSERT INTO product_slots VALUES(57,111); +INSERT INTO product_slots VALUES(57,112); +INSERT INTO product_slots VALUES(57,113); +INSERT INTO product_slots VALUES(57,114); +INSERT INTO product_slots VALUES(57,115); +INSERT INTO product_slots VALUES(57,117); +INSERT INTO product_slots VALUES(57,118); +INSERT INTO product_slots VALUES(57,119); +INSERT INTO product_slots VALUES(57,120); +INSERT INTO product_slots VALUES(57,121); +INSERT INTO product_slots VALUES(57,122); +INSERT INTO product_slots VALUES(57,123); +INSERT INTO product_slots VALUES(57,124); +INSERT INTO product_slots VALUES(57,125); +INSERT INTO product_slots VALUES(57,126); +INSERT INTO product_slots VALUES(57,127); +INSERT INTO product_slots VALUES(57,128); +INSERT INTO product_slots VALUES(57,129); +INSERT INTO product_slots VALUES(57,130); +INSERT INTO product_slots VALUES(57,131); +INSERT INTO product_slots VALUES(57,132); +INSERT INTO product_slots VALUES(57,133); +INSERT INTO product_slots VALUES(57,134); +INSERT INTO product_slots VALUES(57,135); +INSERT INTO product_slots VALUES(57,136); +INSERT INTO product_slots VALUES(57,138); +INSERT INTO product_slots VALUES(57,139); +INSERT INTO product_slots VALUES(57,140); +INSERT INTO product_slots VALUES(57,141); +INSERT INTO product_slots VALUES(57,142); +INSERT INTO product_slots VALUES(57,143); +INSERT INTO product_slots VALUES(57,145); +INSERT INTO product_slots VALUES(57,146); +INSERT INTO product_slots VALUES(57,147); +INSERT INTO product_slots VALUES(57,148); +INSERT INTO product_slots VALUES(57,149); +INSERT INTO product_slots VALUES(57,150); +INSERT INTO product_slots VALUES(57,151); +INSERT INTO product_slots VALUES(57,152); +INSERT INTO product_slots VALUES(57,153); +INSERT INTO product_slots VALUES(57,154); +INSERT INTO product_slots VALUES(57,155); +INSERT INTO product_slots VALUES(57,156); +INSERT INTO product_slots VALUES(57,157); +INSERT INTO product_slots VALUES(57,158); +INSERT INTO product_slots VALUES(57,159); +INSERT INTO product_slots VALUES(57,160); +INSERT INTO product_slots VALUES(57,161); +INSERT INTO product_slots VALUES(57,162); +INSERT INTO product_slots VALUES(57,163); +INSERT INTO product_slots VALUES(57,164); +INSERT INTO product_slots VALUES(57,165); +INSERT INTO product_slots VALUES(57,166); +INSERT INTO product_slots VALUES(57,167); +INSERT INTO product_slots VALUES(57,168); +INSERT INTO product_slots VALUES(57,169); +INSERT INTO product_slots VALUES(57,170); +INSERT INTO product_slots VALUES(57,171); +INSERT INTO product_slots VALUES(57,172); +INSERT INTO product_slots VALUES(57,173); +INSERT INTO product_slots VALUES(57,174); +INSERT INTO product_slots VALUES(57,175); +INSERT INTO product_slots VALUES(57,176); +INSERT INTO product_slots VALUES(57,177); +INSERT INTO product_slots VALUES(57,178); +INSERT INTO product_slots VALUES(57,179); +INSERT INTO product_slots VALUES(57,180); +INSERT INTO product_slots VALUES(57,181); +INSERT INTO product_slots VALUES(57,182); +INSERT INTO product_slots VALUES(57,183); +INSERT INTO product_slots VALUES(57,184); +INSERT INTO product_slots VALUES(57,185); +INSERT INTO product_slots VALUES(57,186); +INSERT INTO product_slots VALUES(57,187); +INSERT INTO product_slots VALUES(57,188); +INSERT INTO product_slots VALUES(57,189); +INSERT INTO product_slots VALUES(57,190); +INSERT INTO product_slots VALUES(57,191); +INSERT INTO product_slots VALUES(57,192); +INSERT INTO product_slots VALUES(57,193); +INSERT INTO product_slots VALUES(57,194); +INSERT INTO product_slots VALUES(57,195); +INSERT INTO product_slots VALUES(57,196); +INSERT INTO product_slots VALUES(57,197); +INSERT INTO product_slots VALUES(57,198); +INSERT INTO product_slots VALUES(57,199); +INSERT INTO product_slots VALUES(57,200); +INSERT INTO product_slots VALUES(57,201); +INSERT INTO product_slots VALUES(57,202); +INSERT INTO product_slots VALUES(57,203); +INSERT INTO product_slots VALUES(57,204); +INSERT INTO product_slots VALUES(57,205); +INSERT INTO product_slots VALUES(57,206); +INSERT INTO product_slots VALUES(57,207); +INSERT INTO product_slots VALUES(57,208); +INSERT INTO product_slots VALUES(57,209); +INSERT INTO product_slots VALUES(57,210); +INSERT INTO product_slots VALUES(57,211); +INSERT INTO product_slots VALUES(57,212); +INSERT INTO product_slots VALUES(57,213); +INSERT INTO product_slots VALUES(57,214); +INSERT INTO product_slots VALUES(57,215); +INSERT INTO product_slots VALUES(57,216); +INSERT INTO product_slots VALUES(57,217); +INSERT INTO product_slots VALUES(57,218); +INSERT INTO product_slots VALUES(57,219); +INSERT INTO product_slots VALUES(57,220); +INSERT INTO product_slots VALUES(57,221); +INSERT INTO product_slots VALUES(57,222); +INSERT INTO product_slots VALUES(57,223); +INSERT INTO product_slots VALUES(57,224); +INSERT INTO product_slots VALUES(57,225); +INSERT INTO product_slots VALUES(57,226); +INSERT INTO product_slots VALUES(57,227); +INSERT INTO product_slots VALUES(57,228); +INSERT INTO product_slots VALUES(57,229); +INSERT INTO product_slots VALUES(57,230); +INSERT INTO product_slots VALUES(57,231); +INSERT INTO product_slots VALUES(57,232); +INSERT INTO product_slots VALUES(57,233); +INSERT INTO product_slots VALUES(57,234); +INSERT INTO product_slots VALUES(57,235); +INSERT INTO product_slots VALUES(57,236); +INSERT INTO product_slots VALUES(57,237); +INSERT INTO product_slots VALUES(57,238); +INSERT INTO product_slots VALUES(57,239); +INSERT INTO product_slots VALUES(57,240); +INSERT INTO product_slots VALUES(57,241); +INSERT INTO product_slots VALUES(57,242); +INSERT INTO product_slots VALUES(57,243); +INSERT INTO product_slots VALUES(57,244); +INSERT INTO product_slots VALUES(57,274); +INSERT INTO product_slots VALUES(57,275); +INSERT INTO product_slots VALUES(57,279); +INSERT INTO product_slots VALUES(57,280); +INSERT INTO product_slots VALUES(57,281); +INSERT INTO product_slots VALUES(57,282); +INSERT INTO product_slots VALUES(57,283); +INSERT INTO product_slots VALUES(57,284); +INSERT INTO product_slots VALUES(57,285); +INSERT INTO product_slots VALUES(57,286); +INSERT INTO product_slots VALUES(57,287); +INSERT INTO product_slots VALUES(58,39); +INSERT INTO product_slots VALUES(58,40); +INSERT INTO product_slots VALUES(58,43); +INSERT INTO product_slots VALUES(58,45); +INSERT INTO product_slots VALUES(58,46); +INSERT INTO product_slots VALUES(58,48); +INSERT INTO product_slots VALUES(58,49); +INSERT INTO product_slots VALUES(58,51); +INSERT INTO product_slots VALUES(58,52); +INSERT INTO product_slots VALUES(58,53); +INSERT INTO product_slots VALUES(58,54); +INSERT INTO product_slots VALUES(58,57); +INSERT INTO product_slots VALUES(58,58); +INSERT INTO product_slots VALUES(58,59); +INSERT INTO product_slots VALUES(58,60); +INSERT INTO product_slots VALUES(58,61); +INSERT INTO product_slots VALUES(58,62); +INSERT INTO product_slots VALUES(58,63); +INSERT INTO product_slots VALUES(58,64); +INSERT INTO product_slots VALUES(58,65); +INSERT INTO product_slots VALUES(58,66); +INSERT INTO product_slots VALUES(58,67); +INSERT INTO product_slots VALUES(58,68); +INSERT INTO product_slots VALUES(58,69); +INSERT INTO product_slots VALUES(58,70); +INSERT INTO product_slots VALUES(58,71); +INSERT INTO product_slots VALUES(58,72); +INSERT INTO product_slots VALUES(58,73); +INSERT INTO product_slots VALUES(58,74); +INSERT INTO product_slots VALUES(58,75); +INSERT INTO product_slots VALUES(58,76); +INSERT INTO product_slots VALUES(58,77); +INSERT INTO product_slots VALUES(58,78); +INSERT INTO product_slots VALUES(58,79); +INSERT INTO product_slots VALUES(58,80); +INSERT INTO product_slots VALUES(58,81); +INSERT INTO product_slots VALUES(58,82); +INSERT INTO product_slots VALUES(58,83); +INSERT INTO product_slots VALUES(58,84); +INSERT INTO product_slots VALUES(58,85); +INSERT INTO product_slots VALUES(58,86); +INSERT INTO product_slots VALUES(58,87); +INSERT INTO product_slots VALUES(58,88); +INSERT INTO product_slots VALUES(58,89); +INSERT INTO product_slots VALUES(58,90); +INSERT INTO product_slots VALUES(58,91); +INSERT INTO product_slots VALUES(58,92); +INSERT INTO product_slots VALUES(58,93); +INSERT INTO product_slots VALUES(58,94); +INSERT INTO product_slots VALUES(58,95); +INSERT INTO product_slots VALUES(58,96); +INSERT INTO product_slots VALUES(58,97); +INSERT INTO product_slots VALUES(58,98); +INSERT INTO product_slots VALUES(58,99); +INSERT INTO product_slots VALUES(58,100); +INSERT INTO product_slots VALUES(58,102); +INSERT INTO product_slots VALUES(58,103); +INSERT INTO product_slots VALUES(58,104); +INSERT INTO product_slots VALUES(58,105); +INSERT INTO product_slots VALUES(58,106); +INSERT INTO product_slots VALUES(58,107); +INSERT INTO product_slots VALUES(58,108); +INSERT INTO product_slots VALUES(58,109); +INSERT INTO product_slots VALUES(58,110); +INSERT INTO product_slots VALUES(58,111); +INSERT INTO product_slots VALUES(58,112); +INSERT INTO product_slots VALUES(58,113); +INSERT INTO product_slots VALUES(58,114); +INSERT INTO product_slots VALUES(58,115); +INSERT INTO product_slots VALUES(58,117); +INSERT INTO product_slots VALUES(58,118); +INSERT INTO product_slots VALUES(58,119); +INSERT INTO product_slots VALUES(58,120); +INSERT INTO product_slots VALUES(58,121); +INSERT INTO product_slots VALUES(58,122); +INSERT INTO product_slots VALUES(58,123); +INSERT INTO product_slots VALUES(58,124); +INSERT INTO product_slots VALUES(58,125); +INSERT INTO product_slots VALUES(58,126); +INSERT INTO product_slots VALUES(58,127); +INSERT INTO product_slots VALUES(58,128); +INSERT INTO product_slots VALUES(58,129); +INSERT INTO product_slots VALUES(58,130); +INSERT INTO product_slots VALUES(58,131); +INSERT INTO product_slots VALUES(58,132); +INSERT INTO product_slots VALUES(58,133); +INSERT INTO product_slots VALUES(58,134); +INSERT INTO product_slots VALUES(58,135); +INSERT INTO product_slots VALUES(58,136); +INSERT INTO product_slots VALUES(58,138); +INSERT INTO product_slots VALUES(58,139); +INSERT INTO product_slots VALUES(58,140); +INSERT INTO product_slots VALUES(58,141); +INSERT INTO product_slots VALUES(58,142); +INSERT INTO product_slots VALUES(58,143); +INSERT INTO product_slots VALUES(58,145); +INSERT INTO product_slots VALUES(58,146); +INSERT INTO product_slots VALUES(58,147); +INSERT INTO product_slots VALUES(58,148); +INSERT INTO product_slots VALUES(58,149); +INSERT INTO product_slots VALUES(58,150); +INSERT INTO product_slots VALUES(58,151); +INSERT INTO product_slots VALUES(58,152); +INSERT INTO product_slots VALUES(58,153); +INSERT INTO product_slots VALUES(58,154); +INSERT INTO product_slots VALUES(58,155); +INSERT INTO product_slots VALUES(58,156); +INSERT INTO product_slots VALUES(58,157); +INSERT INTO product_slots VALUES(58,158); +INSERT INTO product_slots VALUES(58,159); +INSERT INTO product_slots VALUES(58,160); +INSERT INTO product_slots VALUES(58,161); +INSERT INTO product_slots VALUES(58,162); +INSERT INTO product_slots VALUES(58,163); +INSERT INTO product_slots VALUES(58,164); +INSERT INTO product_slots VALUES(58,165); +INSERT INTO product_slots VALUES(58,166); +INSERT INTO product_slots VALUES(58,167); +INSERT INTO product_slots VALUES(58,168); +INSERT INTO product_slots VALUES(58,169); +INSERT INTO product_slots VALUES(58,170); +INSERT INTO product_slots VALUES(58,171); +INSERT INTO product_slots VALUES(58,172); +INSERT INTO product_slots VALUES(58,173); +INSERT INTO product_slots VALUES(58,174); +INSERT INTO product_slots VALUES(58,175); +INSERT INTO product_slots VALUES(58,176); +INSERT INTO product_slots VALUES(58,177); +INSERT INTO product_slots VALUES(58,178); +INSERT INTO product_slots VALUES(58,179); +INSERT INTO product_slots VALUES(58,180); +INSERT INTO product_slots VALUES(58,181); +INSERT INTO product_slots VALUES(58,182); +INSERT INTO product_slots VALUES(58,183); +INSERT INTO product_slots VALUES(58,184); +INSERT INTO product_slots VALUES(58,185); +INSERT INTO product_slots VALUES(58,186); +INSERT INTO product_slots VALUES(58,187); +INSERT INTO product_slots VALUES(58,188); +INSERT INTO product_slots VALUES(58,189); +INSERT INTO product_slots VALUES(58,190); +INSERT INTO product_slots VALUES(58,191); +INSERT INTO product_slots VALUES(58,192); +INSERT INTO product_slots VALUES(58,193); +INSERT INTO product_slots VALUES(58,194); +INSERT INTO product_slots VALUES(58,195); +INSERT INTO product_slots VALUES(58,196); +INSERT INTO product_slots VALUES(58,197); +INSERT INTO product_slots VALUES(58,198); +INSERT INTO product_slots VALUES(58,199); +INSERT INTO product_slots VALUES(58,200); +INSERT INTO product_slots VALUES(58,201); +INSERT INTO product_slots VALUES(58,202); +INSERT INTO product_slots VALUES(58,203); +INSERT INTO product_slots VALUES(58,204); +INSERT INTO product_slots VALUES(58,205); +INSERT INTO product_slots VALUES(58,206); +INSERT INTO product_slots VALUES(58,207); +INSERT INTO product_slots VALUES(58,208); +INSERT INTO product_slots VALUES(58,209); +INSERT INTO product_slots VALUES(58,210); +INSERT INTO product_slots VALUES(58,211); +INSERT INTO product_slots VALUES(58,212); +INSERT INTO product_slots VALUES(58,213); +INSERT INTO product_slots VALUES(58,214); +INSERT INTO product_slots VALUES(58,215); +INSERT INTO product_slots VALUES(58,216); +INSERT INTO product_slots VALUES(58,217); +INSERT INTO product_slots VALUES(58,218); +INSERT INTO product_slots VALUES(58,219); +INSERT INTO product_slots VALUES(58,220); +INSERT INTO product_slots VALUES(58,221); +INSERT INTO product_slots VALUES(58,222); +INSERT INTO product_slots VALUES(58,223); +INSERT INTO product_slots VALUES(58,224); +INSERT INTO product_slots VALUES(58,225); +INSERT INTO product_slots VALUES(58,226); +INSERT INTO product_slots VALUES(58,227); +INSERT INTO product_slots VALUES(58,228); +INSERT INTO product_slots VALUES(58,229); +INSERT INTO product_slots VALUES(58,230); +INSERT INTO product_slots VALUES(58,231); +INSERT INTO product_slots VALUES(58,232); +INSERT INTO product_slots VALUES(58,233); +INSERT INTO product_slots VALUES(58,234); +INSERT INTO product_slots VALUES(58,235); +INSERT INTO product_slots VALUES(58,236); +INSERT INTO product_slots VALUES(58,237); +INSERT INTO product_slots VALUES(58,238); +INSERT INTO product_slots VALUES(58,239); +INSERT INTO product_slots VALUES(58,240); +INSERT INTO product_slots VALUES(58,241); +INSERT INTO product_slots VALUES(58,242); +INSERT INTO product_slots VALUES(58,243); +INSERT INTO product_slots VALUES(58,244); +INSERT INTO product_slots VALUES(58,274); +INSERT INTO product_slots VALUES(58,275); +INSERT INTO product_slots VALUES(58,279); +INSERT INTO product_slots VALUES(58,280); +INSERT INTO product_slots VALUES(58,281); +INSERT INTO product_slots VALUES(58,282); +INSERT INTO product_slots VALUES(58,283); +INSERT INTO product_slots VALUES(58,284); +INSERT INTO product_slots VALUES(58,285); +INSERT INTO product_slots VALUES(58,286); +INSERT INTO product_slots VALUES(58,287); +INSERT INTO product_slots VALUES(59,39); +INSERT INTO product_slots VALUES(59,40); +INSERT INTO product_slots VALUES(59,43); +INSERT INTO product_slots VALUES(59,45); +INSERT INTO product_slots VALUES(59,46); +INSERT INTO product_slots VALUES(59,48); +INSERT INTO product_slots VALUES(59,49); +INSERT INTO product_slots VALUES(59,51); +INSERT INTO product_slots VALUES(59,52); +INSERT INTO product_slots VALUES(59,53); +INSERT INTO product_slots VALUES(59,54); +INSERT INTO product_slots VALUES(59,57); +INSERT INTO product_slots VALUES(59,58); +INSERT INTO product_slots VALUES(59,59); +INSERT INTO product_slots VALUES(59,60); +INSERT INTO product_slots VALUES(59,61); +INSERT INTO product_slots VALUES(59,62); +INSERT INTO product_slots VALUES(59,63); +INSERT INTO product_slots VALUES(59,64); +INSERT INTO product_slots VALUES(59,65); +INSERT INTO product_slots VALUES(59,66); +INSERT INTO product_slots VALUES(59,67); +INSERT INTO product_slots VALUES(59,68); +INSERT INTO product_slots VALUES(59,69); +INSERT INTO product_slots VALUES(59,70); +INSERT INTO product_slots VALUES(59,71); +INSERT INTO product_slots VALUES(59,72); +INSERT INTO product_slots VALUES(59,73); +INSERT INTO product_slots VALUES(59,74); +INSERT INTO product_slots VALUES(59,75); +INSERT INTO product_slots VALUES(59,76); +INSERT INTO product_slots VALUES(59,77); +INSERT INTO product_slots VALUES(59,78); +INSERT INTO product_slots VALUES(59,79); +INSERT INTO product_slots VALUES(59,80); +INSERT INTO product_slots VALUES(59,81); +INSERT INTO product_slots VALUES(59,82); +INSERT INTO product_slots VALUES(59,83); +INSERT INTO product_slots VALUES(59,84); +INSERT INTO product_slots VALUES(59,85); +INSERT INTO product_slots VALUES(59,86); +INSERT INTO product_slots VALUES(59,87); +INSERT INTO product_slots VALUES(59,88); +INSERT INTO product_slots VALUES(59,89); +INSERT INTO product_slots VALUES(59,90); +INSERT INTO product_slots VALUES(59,91); +INSERT INTO product_slots VALUES(59,92); +INSERT INTO product_slots VALUES(59,93); +INSERT INTO product_slots VALUES(59,94); +INSERT INTO product_slots VALUES(59,95); +INSERT INTO product_slots VALUES(59,96); +INSERT INTO product_slots VALUES(59,97); +INSERT INTO product_slots VALUES(59,98); +INSERT INTO product_slots VALUES(59,99); +INSERT INTO product_slots VALUES(59,100); +INSERT INTO product_slots VALUES(59,102); +INSERT INTO product_slots VALUES(59,103); +INSERT INTO product_slots VALUES(59,104); +INSERT INTO product_slots VALUES(59,105); +INSERT INTO product_slots VALUES(59,106); +INSERT INTO product_slots VALUES(59,107); +INSERT INTO product_slots VALUES(59,108); +INSERT INTO product_slots VALUES(59,109); +INSERT INTO product_slots VALUES(59,110); +INSERT INTO product_slots VALUES(59,111); +INSERT INTO product_slots VALUES(59,112); +INSERT INTO product_slots VALUES(59,113); +INSERT INTO product_slots VALUES(59,114); +INSERT INTO product_slots VALUES(59,115); +INSERT INTO product_slots VALUES(59,117); +INSERT INTO product_slots VALUES(59,118); +INSERT INTO product_slots VALUES(59,119); +INSERT INTO product_slots VALUES(59,120); +INSERT INTO product_slots VALUES(59,121); +INSERT INTO product_slots VALUES(59,122); +INSERT INTO product_slots VALUES(59,123); +INSERT INTO product_slots VALUES(59,124); +INSERT INTO product_slots VALUES(59,125); +INSERT INTO product_slots VALUES(59,126); +INSERT INTO product_slots VALUES(59,127); +INSERT INTO product_slots VALUES(59,128); +INSERT INTO product_slots VALUES(59,129); +INSERT INTO product_slots VALUES(59,130); +INSERT INTO product_slots VALUES(59,131); +INSERT INTO product_slots VALUES(59,132); +INSERT INTO product_slots VALUES(59,133); +INSERT INTO product_slots VALUES(59,134); +INSERT INTO product_slots VALUES(59,135); +INSERT INTO product_slots VALUES(59,136); +INSERT INTO product_slots VALUES(59,138); +INSERT INTO product_slots VALUES(59,139); +INSERT INTO product_slots VALUES(59,140); +INSERT INTO product_slots VALUES(59,141); +INSERT INTO product_slots VALUES(59,142); +INSERT INTO product_slots VALUES(59,143); +INSERT INTO product_slots VALUES(59,145); +INSERT INTO product_slots VALUES(59,146); +INSERT INTO product_slots VALUES(59,147); +INSERT INTO product_slots VALUES(59,148); +INSERT INTO product_slots VALUES(59,149); +INSERT INTO product_slots VALUES(59,150); +INSERT INTO product_slots VALUES(59,151); +INSERT INTO product_slots VALUES(59,152); +INSERT INTO product_slots VALUES(59,153); +INSERT INTO product_slots VALUES(59,154); +INSERT INTO product_slots VALUES(59,155); +INSERT INTO product_slots VALUES(59,156); +INSERT INTO product_slots VALUES(59,157); +INSERT INTO product_slots VALUES(59,158); +INSERT INTO product_slots VALUES(59,159); +INSERT INTO product_slots VALUES(59,160); +INSERT INTO product_slots VALUES(59,161); +INSERT INTO product_slots VALUES(59,162); +INSERT INTO product_slots VALUES(59,163); +INSERT INTO product_slots VALUES(59,164); +INSERT INTO product_slots VALUES(59,165); +INSERT INTO product_slots VALUES(59,166); +INSERT INTO product_slots VALUES(59,167); +INSERT INTO product_slots VALUES(59,168); +INSERT INTO product_slots VALUES(59,169); +INSERT INTO product_slots VALUES(59,170); +INSERT INTO product_slots VALUES(59,171); +INSERT INTO product_slots VALUES(59,172); +INSERT INTO product_slots VALUES(59,173); +INSERT INTO product_slots VALUES(59,174); +INSERT INTO product_slots VALUES(59,175); +INSERT INTO product_slots VALUES(59,176); +INSERT INTO product_slots VALUES(59,177); +INSERT INTO product_slots VALUES(59,178); +INSERT INTO product_slots VALUES(59,179); +INSERT INTO product_slots VALUES(59,180); +INSERT INTO product_slots VALUES(59,181); +INSERT INTO product_slots VALUES(59,182); +INSERT INTO product_slots VALUES(59,183); +INSERT INTO product_slots VALUES(59,184); +INSERT INTO product_slots VALUES(59,185); +INSERT INTO product_slots VALUES(59,186); +INSERT INTO product_slots VALUES(59,187); +INSERT INTO product_slots VALUES(59,188); +INSERT INTO product_slots VALUES(59,189); +INSERT INTO product_slots VALUES(59,190); +INSERT INTO product_slots VALUES(59,191); +INSERT INTO product_slots VALUES(59,192); +INSERT INTO product_slots VALUES(59,193); +INSERT INTO product_slots VALUES(59,194); +INSERT INTO product_slots VALUES(59,195); +INSERT INTO product_slots VALUES(59,196); +INSERT INTO product_slots VALUES(59,197); +INSERT INTO product_slots VALUES(59,198); +INSERT INTO product_slots VALUES(59,199); +INSERT INTO product_slots VALUES(59,200); +INSERT INTO product_slots VALUES(59,201); +INSERT INTO product_slots VALUES(59,202); +INSERT INTO product_slots VALUES(59,203); +INSERT INTO product_slots VALUES(59,204); +INSERT INTO product_slots VALUES(59,205); +INSERT INTO product_slots VALUES(59,206); +INSERT INTO product_slots VALUES(59,207); +INSERT INTO product_slots VALUES(59,208); +INSERT INTO product_slots VALUES(59,209); +INSERT INTO product_slots VALUES(59,210); +INSERT INTO product_slots VALUES(59,211); +INSERT INTO product_slots VALUES(59,212); +INSERT INTO product_slots VALUES(59,213); +INSERT INTO product_slots VALUES(59,214); +INSERT INTO product_slots VALUES(59,215); +INSERT INTO product_slots VALUES(59,216); +INSERT INTO product_slots VALUES(59,217); +INSERT INTO product_slots VALUES(59,218); +INSERT INTO product_slots VALUES(59,219); +INSERT INTO product_slots VALUES(59,220); +INSERT INTO product_slots VALUES(59,221); +INSERT INTO product_slots VALUES(59,222); +INSERT INTO product_slots VALUES(59,223); +INSERT INTO product_slots VALUES(59,224); +INSERT INTO product_slots VALUES(59,225); +INSERT INTO product_slots VALUES(59,226); +INSERT INTO product_slots VALUES(59,227); +INSERT INTO product_slots VALUES(59,228); +INSERT INTO product_slots VALUES(59,229); +INSERT INTO product_slots VALUES(59,230); +INSERT INTO product_slots VALUES(59,231); +INSERT INTO product_slots VALUES(59,232); +INSERT INTO product_slots VALUES(59,233); +INSERT INTO product_slots VALUES(59,234); +INSERT INTO product_slots VALUES(59,235); +INSERT INTO product_slots VALUES(59,236); +INSERT INTO product_slots VALUES(59,237); +INSERT INTO product_slots VALUES(59,238); +INSERT INTO product_slots VALUES(59,239); +INSERT INTO product_slots VALUES(59,240); +INSERT INTO product_slots VALUES(59,241); +INSERT INTO product_slots VALUES(59,242); +INSERT INTO product_slots VALUES(59,243); +INSERT INTO product_slots VALUES(59,244); +INSERT INTO product_slots VALUES(59,274); +INSERT INTO product_slots VALUES(59,275); +INSERT INTO product_slots VALUES(59,279); +INSERT INTO product_slots VALUES(59,280); +INSERT INTO product_slots VALUES(59,281); +INSERT INTO product_slots VALUES(59,282); +INSERT INTO product_slots VALUES(59,283); +INSERT INTO product_slots VALUES(59,284); +INSERT INTO product_slots VALUES(59,285); +INSERT INTO product_slots VALUES(59,286); +INSERT INTO product_slots VALUES(59,287); +INSERT INTO product_slots VALUES(60,39); +INSERT INTO product_slots VALUES(60,40); +INSERT INTO product_slots VALUES(60,43); +INSERT INTO product_slots VALUES(60,45); +INSERT INTO product_slots VALUES(60,46); +INSERT INTO product_slots VALUES(60,48); +INSERT INTO product_slots VALUES(60,49); +INSERT INTO product_slots VALUES(60,51); +INSERT INTO product_slots VALUES(60,52); +INSERT INTO product_slots VALUES(60,53); +INSERT INTO product_slots VALUES(60,54); +INSERT INTO product_slots VALUES(60,57); +INSERT INTO product_slots VALUES(60,58); +INSERT INTO product_slots VALUES(60,59); +INSERT INTO product_slots VALUES(60,60); +INSERT INTO product_slots VALUES(60,61); +INSERT INTO product_slots VALUES(60,62); +INSERT INTO product_slots VALUES(60,63); +INSERT INTO product_slots VALUES(60,64); +INSERT INTO product_slots VALUES(60,65); +INSERT INTO product_slots VALUES(60,66); +INSERT INTO product_slots VALUES(60,67); +INSERT INTO product_slots VALUES(60,68); +INSERT INTO product_slots VALUES(60,69); +INSERT INTO product_slots VALUES(60,70); +INSERT INTO product_slots VALUES(60,71); +INSERT INTO product_slots VALUES(60,72); +INSERT INTO product_slots VALUES(60,73); +INSERT INTO product_slots VALUES(60,74); +INSERT INTO product_slots VALUES(60,75); +INSERT INTO product_slots VALUES(60,76); +INSERT INTO product_slots VALUES(60,77); +INSERT INTO product_slots VALUES(60,78); +INSERT INTO product_slots VALUES(60,79); +INSERT INTO product_slots VALUES(60,80); +INSERT INTO product_slots VALUES(60,81); +INSERT INTO product_slots VALUES(60,82); +INSERT INTO product_slots VALUES(60,83); +INSERT INTO product_slots VALUES(60,84); +INSERT INTO product_slots VALUES(60,85); +INSERT INTO product_slots VALUES(60,86); +INSERT INTO product_slots VALUES(60,87); +INSERT INTO product_slots VALUES(60,88); +INSERT INTO product_slots VALUES(60,89); +INSERT INTO product_slots VALUES(60,90); +INSERT INTO product_slots VALUES(60,91); +INSERT INTO product_slots VALUES(60,92); +INSERT INTO product_slots VALUES(60,93); +INSERT INTO product_slots VALUES(60,94); +INSERT INTO product_slots VALUES(60,95); +INSERT INTO product_slots VALUES(60,96); +INSERT INTO product_slots VALUES(60,97); +INSERT INTO product_slots VALUES(60,98); +INSERT INTO product_slots VALUES(60,99); +INSERT INTO product_slots VALUES(60,100); +INSERT INTO product_slots VALUES(60,102); +INSERT INTO product_slots VALUES(60,103); +INSERT INTO product_slots VALUES(60,104); +INSERT INTO product_slots VALUES(60,105); +INSERT INTO product_slots VALUES(60,106); +INSERT INTO product_slots VALUES(60,107); +INSERT INTO product_slots VALUES(60,108); +INSERT INTO product_slots VALUES(60,109); +INSERT INTO product_slots VALUES(60,110); +INSERT INTO product_slots VALUES(60,111); +INSERT INTO product_slots VALUES(60,112); +INSERT INTO product_slots VALUES(60,113); +INSERT INTO product_slots VALUES(60,114); +INSERT INTO product_slots VALUES(60,115); +INSERT INTO product_slots VALUES(60,117); +INSERT INTO product_slots VALUES(60,118); +INSERT INTO product_slots VALUES(60,119); +INSERT INTO product_slots VALUES(60,120); +INSERT INTO product_slots VALUES(60,121); +INSERT INTO product_slots VALUES(60,122); +INSERT INTO product_slots VALUES(60,123); +INSERT INTO product_slots VALUES(60,124); +INSERT INTO product_slots VALUES(60,125); +INSERT INTO product_slots VALUES(60,126); +INSERT INTO product_slots VALUES(60,127); +INSERT INTO product_slots VALUES(60,128); +INSERT INTO product_slots VALUES(60,129); +INSERT INTO product_slots VALUES(60,130); +INSERT INTO product_slots VALUES(60,131); +INSERT INTO product_slots VALUES(60,132); +INSERT INTO product_slots VALUES(60,133); +INSERT INTO product_slots VALUES(60,134); +INSERT INTO product_slots VALUES(60,135); +INSERT INTO product_slots VALUES(60,136); +INSERT INTO product_slots VALUES(60,138); +INSERT INTO product_slots VALUES(60,139); +INSERT INTO product_slots VALUES(60,140); +INSERT INTO product_slots VALUES(60,141); +INSERT INTO product_slots VALUES(60,142); +INSERT INTO product_slots VALUES(60,143); +INSERT INTO product_slots VALUES(60,145); +INSERT INTO product_slots VALUES(60,146); +INSERT INTO product_slots VALUES(60,147); +INSERT INTO product_slots VALUES(60,148); +INSERT INTO product_slots VALUES(60,149); +INSERT INTO product_slots VALUES(60,150); +INSERT INTO product_slots VALUES(60,151); +INSERT INTO product_slots VALUES(60,152); +INSERT INTO product_slots VALUES(60,153); +INSERT INTO product_slots VALUES(60,154); +INSERT INTO product_slots VALUES(60,155); +INSERT INTO product_slots VALUES(60,156); +INSERT INTO product_slots VALUES(60,157); +INSERT INTO product_slots VALUES(60,158); +INSERT INTO product_slots VALUES(60,159); +INSERT INTO product_slots VALUES(60,160); +INSERT INTO product_slots VALUES(60,161); +INSERT INTO product_slots VALUES(60,162); +INSERT INTO product_slots VALUES(60,163); +INSERT INTO product_slots VALUES(60,164); +INSERT INTO product_slots VALUES(60,165); +INSERT INTO product_slots VALUES(60,166); +INSERT INTO product_slots VALUES(60,167); +INSERT INTO product_slots VALUES(60,168); +INSERT INTO product_slots VALUES(60,169); +INSERT INTO product_slots VALUES(60,170); +INSERT INTO product_slots VALUES(60,171); +INSERT INTO product_slots VALUES(60,172); +INSERT INTO product_slots VALUES(60,173); +INSERT INTO product_slots VALUES(60,174); +INSERT INTO product_slots VALUES(60,175); +INSERT INTO product_slots VALUES(60,176); +INSERT INTO product_slots VALUES(60,177); +INSERT INTO product_slots VALUES(60,178); +INSERT INTO product_slots VALUES(60,179); +INSERT INTO product_slots VALUES(60,180); +INSERT INTO product_slots VALUES(60,181); +INSERT INTO product_slots VALUES(60,182); +INSERT INTO product_slots VALUES(60,183); +INSERT INTO product_slots VALUES(60,184); +INSERT INTO product_slots VALUES(60,185); +INSERT INTO product_slots VALUES(60,186); +INSERT INTO product_slots VALUES(60,187); +INSERT INTO product_slots VALUES(60,188); +INSERT INTO product_slots VALUES(60,189); +INSERT INTO product_slots VALUES(60,190); +INSERT INTO product_slots VALUES(60,191); +INSERT INTO product_slots VALUES(60,192); +INSERT INTO product_slots VALUES(60,193); +INSERT INTO product_slots VALUES(60,194); +INSERT INTO product_slots VALUES(60,195); +INSERT INTO product_slots VALUES(60,196); +INSERT INTO product_slots VALUES(60,197); +INSERT INTO product_slots VALUES(60,198); +INSERT INTO product_slots VALUES(60,199); +INSERT INTO product_slots VALUES(60,200); +INSERT INTO product_slots VALUES(60,201); +INSERT INTO product_slots VALUES(60,202); +INSERT INTO product_slots VALUES(60,203); +INSERT INTO product_slots VALUES(60,204); +INSERT INTO product_slots VALUES(60,205); +INSERT INTO product_slots VALUES(60,206); +INSERT INTO product_slots VALUES(60,207); +INSERT INTO product_slots VALUES(60,208); +INSERT INTO product_slots VALUES(60,209); +INSERT INTO product_slots VALUES(60,210); +INSERT INTO product_slots VALUES(60,211); +INSERT INTO product_slots VALUES(60,212); +INSERT INTO product_slots VALUES(60,213); +INSERT INTO product_slots VALUES(60,214); +INSERT INTO product_slots VALUES(60,215); +INSERT INTO product_slots VALUES(60,216); +INSERT INTO product_slots VALUES(60,217); +INSERT INTO product_slots VALUES(60,218); +INSERT INTO product_slots VALUES(60,219); +INSERT INTO product_slots VALUES(60,220); +INSERT INTO product_slots VALUES(60,221); +INSERT INTO product_slots VALUES(60,222); +INSERT INTO product_slots VALUES(60,223); +INSERT INTO product_slots VALUES(60,224); +INSERT INTO product_slots VALUES(60,225); +INSERT INTO product_slots VALUES(60,226); +INSERT INTO product_slots VALUES(60,227); +INSERT INTO product_slots VALUES(60,228); +INSERT INTO product_slots VALUES(60,229); +INSERT INTO product_slots VALUES(60,230); +INSERT INTO product_slots VALUES(60,231); +INSERT INTO product_slots VALUES(60,232); +INSERT INTO product_slots VALUES(60,233); +INSERT INTO product_slots VALUES(60,234); +INSERT INTO product_slots VALUES(60,235); +INSERT INTO product_slots VALUES(60,236); +INSERT INTO product_slots VALUES(60,237); +INSERT INTO product_slots VALUES(60,238); +INSERT INTO product_slots VALUES(60,239); +INSERT INTO product_slots VALUES(60,240); +INSERT INTO product_slots VALUES(60,241); +INSERT INTO product_slots VALUES(60,242); +INSERT INTO product_slots VALUES(60,243); +INSERT INTO product_slots VALUES(60,244); +INSERT INTO product_slots VALUES(60,274); +INSERT INTO product_slots VALUES(60,275); +INSERT INTO product_slots VALUES(60,279); +INSERT INTO product_slots VALUES(60,280); +INSERT INTO product_slots VALUES(60,281); +INSERT INTO product_slots VALUES(60,282); +INSERT INTO product_slots VALUES(60,283); +INSERT INTO product_slots VALUES(60,284); +INSERT INTO product_slots VALUES(60,285); +INSERT INTO product_slots VALUES(60,286); +INSERT INTO product_slots VALUES(60,287); +INSERT INTO product_slots VALUES(61,39); +INSERT INTO product_slots VALUES(61,40); +INSERT INTO product_slots VALUES(61,43); +INSERT INTO product_slots VALUES(61,45); +INSERT INTO product_slots VALUES(61,46); +INSERT INTO product_slots VALUES(61,48); +INSERT INTO product_slots VALUES(61,49); +INSERT INTO product_slots VALUES(61,51); +INSERT INTO product_slots VALUES(61,52); +INSERT INTO product_slots VALUES(61,53); +INSERT INTO product_slots VALUES(61,54); +INSERT INTO product_slots VALUES(61,57); +INSERT INTO product_slots VALUES(61,58); +INSERT INTO product_slots VALUES(61,59); +INSERT INTO product_slots VALUES(61,60); +INSERT INTO product_slots VALUES(61,61); +INSERT INTO product_slots VALUES(61,62); +INSERT INTO product_slots VALUES(61,63); +INSERT INTO product_slots VALUES(61,64); +INSERT INTO product_slots VALUES(61,65); +INSERT INTO product_slots VALUES(61,66); +INSERT INTO product_slots VALUES(61,67); +INSERT INTO product_slots VALUES(61,68); +INSERT INTO product_slots VALUES(61,69); +INSERT INTO product_slots VALUES(61,70); +INSERT INTO product_slots VALUES(61,71); +INSERT INTO product_slots VALUES(61,72); +INSERT INTO product_slots VALUES(61,73); +INSERT INTO product_slots VALUES(61,74); +INSERT INTO product_slots VALUES(61,75); +INSERT INTO product_slots VALUES(61,76); +INSERT INTO product_slots VALUES(61,77); +INSERT INTO product_slots VALUES(61,78); +INSERT INTO product_slots VALUES(61,79); +INSERT INTO product_slots VALUES(61,80); +INSERT INTO product_slots VALUES(61,81); +INSERT INTO product_slots VALUES(61,82); +INSERT INTO product_slots VALUES(61,83); +INSERT INTO product_slots VALUES(61,84); +INSERT INTO product_slots VALUES(61,85); +INSERT INTO product_slots VALUES(61,86); +INSERT INTO product_slots VALUES(61,87); +INSERT INTO product_slots VALUES(61,88); +INSERT INTO product_slots VALUES(61,89); +INSERT INTO product_slots VALUES(61,90); +INSERT INTO product_slots VALUES(61,91); +INSERT INTO product_slots VALUES(61,92); +INSERT INTO product_slots VALUES(61,93); +INSERT INTO product_slots VALUES(61,94); +INSERT INTO product_slots VALUES(61,95); +INSERT INTO product_slots VALUES(61,96); +INSERT INTO product_slots VALUES(61,97); +INSERT INTO product_slots VALUES(61,98); +INSERT INTO product_slots VALUES(61,99); +INSERT INTO product_slots VALUES(61,100); +INSERT INTO product_slots VALUES(61,102); +INSERT INTO product_slots VALUES(61,103); +INSERT INTO product_slots VALUES(61,104); +INSERT INTO product_slots VALUES(61,105); +INSERT INTO product_slots VALUES(61,106); +INSERT INTO product_slots VALUES(61,107); +INSERT INTO product_slots VALUES(61,108); +INSERT INTO product_slots VALUES(61,109); +INSERT INTO product_slots VALUES(61,110); +INSERT INTO product_slots VALUES(61,111); +INSERT INTO product_slots VALUES(61,112); +INSERT INTO product_slots VALUES(61,113); +INSERT INTO product_slots VALUES(61,114); +INSERT INTO product_slots VALUES(61,115); +INSERT INTO product_slots VALUES(61,117); +INSERT INTO product_slots VALUES(61,118); +INSERT INTO product_slots VALUES(61,119); +INSERT INTO product_slots VALUES(61,120); +INSERT INTO product_slots VALUES(61,121); +INSERT INTO product_slots VALUES(61,122); +INSERT INTO product_slots VALUES(61,123); +INSERT INTO product_slots VALUES(61,124); +INSERT INTO product_slots VALUES(61,125); +INSERT INTO product_slots VALUES(61,126); +INSERT INTO product_slots VALUES(61,127); +INSERT INTO product_slots VALUES(61,128); +INSERT INTO product_slots VALUES(61,129); +INSERT INTO product_slots VALUES(61,130); +INSERT INTO product_slots VALUES(61,131); +INSERT INTO product_slots VALUES(61,132); +INSERT INTO product_slots VALUES(61,133); +INSERT INTO product_slots VALUES(61,134); +INSERT INTO product_slots VALUES(61,135); +INSERT INTO product_slots VALUES(61,136); +INSERT INTO product_slots VALUES(61,138); +INSERT INTO product_slots VALUES(61,139); +INSERT INTO product_slots VALUES(61,140); +INSERT INTO product_slots VALUES(61,141); +INSERT INTO product_slots VALUES(61,142); +INSERT INTO product_slots VALUES(61,143); +INSERT INTO product_slots VALUES(61,145); +INSERT INTO product_slots VALUES(61,146); +INSERT INTO product_slots VALUES(61,147); +INSERT INTO product_slots VALUES(61,148); +INSERT INTO product_slots VALUES(61,149); +INSERT INTO product_slots VALUES(61,150); +INSERT INTO product_slots VALUES(61,151); +INSERT INTO product_slots VALUES(61,152); +INSERT INTO product_slots VALUES(61,153); +INSERT INTO product_slots VALUES(61,154); +INSERT INTO product_slots VALUES(61,155); +INSERT INTO product_slots VALUES(61,156); +INSERT INTO product_slots VALUES(61,157); +INSERT INTO product_slots VALUES(61,158); +INSERT INTO product_slots VALUES(61,159); +INSERT INTO product_slots VALUES(61,160); +INSERT INTO product_slots VALUES(61,161); +INSERT INTO product_slots VALUES(61,162); +INSERT INTO product_slots VALUES(61,163); +INSERT INTO product_slots VALUES(61,164); +INSERT INTO product_slots VALUES(61,165); +INSERT INTO product_slots VALUES(61,166); +INSERT INTO product_slots VALUES(61,167); +INSERT INTO product_slots VALUES(61,168); +INSERT INTO product_slots VALUES(61,169); +INSERT INTO product_slots VALUES(61,170); +INSERT INTO product_slots VALUES(61,171); +INSERT INTO product_slots VALUES(61,172); +INSERT INTO product_slots VALUES(61,173); +INSERT INTO product_slots VALUES(61,174); +INSERT INTO product_slots VALUES(61,175); +INSERT INTO product_slots VALUES(61,176); +INSERT INTO product_slots VALUES(61,177); +INSERT INTO product_slots VALUES(61,178); +INSERT INTO product_slots VALUES(61,179); +INSERT INTO product_slots VALUES(61,180); +INSERT INTO product_slots VALUES(61,181); +INSERT INTO product_slots VALUES(61,182); +INSERT INTO product_slots VALUES(61,183); +INSERT INTO product_slots VALUES(61,184); +INSERT INTO product_slots VALUES(61,185); +INSERT INTO product_slots VALUES(61,186); +INSERT INTO product_slots VALUES(61,187); +INSERT INTO product_slots VALUES(61,188); +INSERT INTO product_slots VALUES(61,189); +INSERT INTO product_slots VALUES(61,190); +INSERT INTO product_slots VALUES(61,191); +INSERT INTO product_slots VALUES(61,192); +INSERT INTO product_slots VALUES(61,193); +INSERT INTO product_slots VALUES(61,194); +INSERT INTO product_slots VALUES(61,195); +INSERT INTO product_slots VALUES(61,196); +INSERT INTO product_slots VALUES(61,197); +INSERT INTO product_slots VALUES(61,198); +INSERT INTO product_slots VALUES(61,199); +INSERT INTO product_slots VALUES(61,200); +INSERT INTO product_slots VALUES(61,201); +INSERT INTO product_slots VALUES(61,202); +INSERT INTO product_slots VALUES(61,203); +INSERT INTO product_slots VALUES(61,204); +INSERT INTO product_slots VALUES(61,205); +INSERT INTO product_slots VALUES(61,206); +INSERT INTO product_slots VALUES(61,207); +INSERT INTO product_slots VALUES(61,208); +INSERT INTO product_slots VALUES(61,209); +INSERT INTO product_slots VALUES(61,210); +INSERT INTO product_slots VALUES(61,211); +INSERT INTO product_slots VALUES(61,212); +INSERT INTO product_slots VALUES(61,213); +INSERT INTO product_slots VALUES(61,214); +INSERT INTO product_slots VALUES(61,215); +INSERT INTO product_slots VALUES(61,216); +INSERT INTO product_slots VALUES(61,217); +INSERT INTO product_slots VALUES(61,218); +INSERT INTO product_slots VALUES(61,219); +INSERT INTO product_slots VALUES(61,220); +INSERT INTO product_slots VALUES(61,221); +INSERT INTO product_slots VALUES(61,222); +INSERT INTO product_slots VALUES(61,223); +INSERT INTO product_slots VALUES(61,224); +INSERT INTO product_slots VALUES(61,225); +INSERT INTO product_slots VALUES(61,226); +INSERT INTO product_slots VALUES(61,227); +INSERT INTO product_slots VALUES(61,228); +INSERT INTO product_slots VALUES(61,229); +INSERT INTO product_slots VALUES(61,230); +INSERT INTO product_slots VALUES(61,231); +INSERT INTO product_slots VALUES(61,232); +INSERT INTO product_slots VALUES(61,233); +INSERT INTO product_slots VALUES(61,234); +INSERT INTO product_slots VALUES(61,235); +INSERT INTO product_slots VALUES(61,236); +INSERT INTO product_slots VALUES(61,237); +INSERT INTO product_slots VALUES(61,238); +INSERT INTO product_slots VALUES(61,239); +INSERT INTO product_slots VALUES(61,240); +INSERT INTO product_slots VALUES(61,241); +INSERT INTO product_slots VALUES(61,242); +INSERT INTO product_slots VALUES(61,243); +INSERT INTO product_slots VALUES(61,244); +INSERT INTO product_slots VALUES(61,274); +INSERT INTO product_slots VALUES(61,275); +INSERT INTO product_slots VALUES(61,279); +INSERT INTO product_slots VALUES(61,280); +INSERT INTO product_slots VALUES(61,281); +INSERT INTO product_slots VALUES(61,282); +INSERT INTO product_slots VALUES(61,283); +INSERT INTO product_slots VALUES(61,284); +INSERT INTO product_slots VALUES(61,285); +INSERT INTO product_slots VALUES(61,286); +INSERT INTO product_slots VALUES(61,287); +INSERT INTO product_slots VALUES(62,39); +INSERT INTO product_slots VALUES(62,40); +INSERT INTO product_slots VALUES(62,43); +INSERT INTO product_slots VALUES(62,45); +INSERT INTO product_slots VALUES(62,46); +INSERT INTO product_slots VALUES(62,48); +INSERT INTO product_slots VALUES(62,49); +INSERT INTO product_slots VALUES(62,51); +INSERT INTO product_slots VALUES(62,52); +INSERT INTO product_slots VALUES(62,53); +INSERT INTO product_slots VALUES(62,54); +INSERT INTO product_slots VALUES(62,57); +INSERT INTO product_slots VALUES(62,58); +INSERT INTO product_slots VALUES(62,59); +INSERT INTO product_slots VALUES(62,60); +INSERT INTO product_slots VALUES(62,61); +INSERT INTO product_slots VALUES(62,62); +INSERT INTO product_slots VALUES(62,63); +INSERT INTO product_slots VALUES(62,64); +INSERT INTO product_slots VALUES(62,65); +INSERT INTO product_slots VALUES(62,66); +INSERT INTO product_slots VALUES(62,67); +INSERT INTO product_slots VALUES(62,68); +INSERT INTO product_slots VALUES(62,69); +INSERT INTO product_slots VALUES(62,70); +INSERT INTO product_slots VALUES(62,71); +INSERT INTO product_slots VALUES(62,72); +INSERT INTO product_slots VALUES(62,73); +INSERT INTO product_slots VALUES(62,74); +INSERT INTO product_slots VALUES(62,75); +INSERT INTO product_slots VALUES(62,76); +INSERT INTO product_slots VALUES(62,77); +INSERT INTO product_slots VALUES(62,78); +INSERT INTO product_slots VALUES(62,79); +INSERT INTO product_slots VALUES(62,80); +INSERT INTO product_slots VALUES(62,81); +INSERT INTO product_slots VALUES(62,82); +INSERT INTO product_slots VALUES(62,83); +INSERT INTO product_slots VALUES(62,84); +INSERT INTO product_slots VALUES(62,85); +INSERT INTO product_slots VALUES(62,86); +INSERT INTO product_slots VALUES(62,87); +INSERT INTO product_slots VALUES(62,88); +INSERT INTO product_slots VALUES(62,89); +INSERT INTO product_slots VALUES(62,90); +INSERT INTO product_slots VALUES(62,91); +INSERT INTO product_slots VALUES(62,92); +INSERT INTO product_slots VALUES(62,93); +INSERT INTO product_slots VALUES(62,94); +INSERT INTO product_slots VALUES(62,95); +INSERT INTO product_slots VALUES(62,96); +INSERT INTO product_slots VALUES(62,97); +INSERT INTO product_slots VALUES(62,98); +INSERT INTO product_slots VALUES(62,99); +INSERT INTO product_slots VALUES(62,100); +INSERT INTO product_slots VALUES(62,102); +INSERT INTO product_slots VALUES(62,103); +INSERT INTO product_slots VALUES(62,104); +INSERT INTO product_slots VALUES(62,105); +INSERT INTO product_slots VALUES(62,106); +INSERT INTO product_slots VALUES(62,107); +INSERT INTO product_slots VALUES(62,108); +INSERT INTO product_slots VALUES(62,109); +INSERT INTO product_slots VALUES(62,110); +INSERT INTO product_slots VALUES(62,111); +INSERT INTO product_slots VALUES(62,112); +INSERT INTO product_slots VALUES(62,113); +INSERT INTO product_slots VALUES(62,114); +INSERT INTO product_slots VALUES(62,115); +INSERT INTO product_slots VALUES(62,117); +INSERT INTO product_slots VALUES(62,118); +INSERT INTO product_slots VALUES(62,119); +INSERT INTO product_slots VALUES(62,120); +INSERT INTO product_slots VALUES(62,121); +INSERT INTO product_slots VALUES(62,122); +INSERT INTO product_slots VALUES(62,123); +INSERT INTO product_slots VALUES(62,124); +INSERT INTO product_slots VALUES(62,125); +INSERT INTO product_slots VALUES(62,126); +INSERT INTO product_slots VALUES(62,127); +INSERT INTO product_slots VALUES(62,128); +INSERT INTO product_slots VALUES(62,129); +INSERT INTO product_slots VALUES(62,130); +INSERT INTO product_slots VALUES(62,131); +INSERT INTO product_slots VALUES(62,132); +INSERT INTO product_slots VALUES(62,133); +INSERT INTO product_slots VALUES(62,134); +INSERT INTO product_slots VALUES(62,135); +INSERT INTO product_slots VALUES(62,136); +INSERT INTO product_slots VALUES(62,138); +INSERT INTO product_slots VALUES(62,139); +INSERT INTO product_slots VALUES(62,140); +INSERT INTO product_slots VALUES(62,141); +INSERT INTO product_slots VALUES(62,142); +INSERT INTO product_slots VALUES(62,143); +INSERT INTO product_slots VALUES(62,145); +INSERT INTO product_slots VALUES(62,146); +INSERT INTO product_slots VALUES(62,147); +INSERT INTO product_slots VALUES(62,148); +INSERT INTO product_slots VALUES(62,149); +INSERT INTO product_slots VALUES(62,150); +INSERT INTO product_slots VALUES(62,151); +INSERT INTO product_slots VALUES(62,152); +INSERT INTO product_slots VALUES(62,153); +INSERT INTO product_slots VALUES(62,154); +INSERT INTO product_slots VALUES(62,155); +INSERT INTO product_slots VALUES(62,156); +INSERT INTO product_slots VALUES(62,157); +INSERT INTO product_slots VALUES(62,158); +INSERT INTO product_slots VALUES(62,159); +INSERT INTO product_slots VALUES(62,160); +INSERT INTO product_slots VALUES(62,161); +INSERT INTO product_slots VALUES(62,162); +INSERT INTO product_slots VALUES(62,163); +INSERT INTO product_slots VALUES(62,164); +INSERT INTO product_slots VALUES(62,165); +INSERT INTO product_slots VALUES(62,166); +INSERT INTO product_slots VALUES(62,167); +INSERT INTO product_slots VALUES(62,168); +INSERT INTO product_slots VALUES(62,169); +INSERT INTO product_slots VALUES(62,170); +INSERT INTO product_slots VALUES(62,171); +INSERT INTO product_slots VALUES(62,172); +INSERT INTO product_slots VALUES(62,173); +INSERT INTO product_slots VALUES(62,174); +INSERT INTO product_slots VALUES(62,175); +INSERT INTO product_slots VALUES(62,176); +INSERT INTO product_slots VALUES(62,177); +INSERT INTO product_slots VALUES(62,178); +INSERT INTO product_slots VALUES(62,179); +INSERT INTO product_slots VALUES(62,180); +INSERT INTO product_slots VALUES(62,181); +INSERT INTO product_slots VALUES(62,182); +INSERT INTO product_slots VALUES(62,183); +INSERT INTO product_slots VALUES(62,184); +INSERT INTO product_slots VALUES(62,185); +INSERT INTO product_slots VALUES(62,186); +INSERT INTO product_slots VALUES(62,187); +INSERT INTO product_slots VALUES(62,188); +INSERT INTO product_slots VALUES(62,189); +INSERT INTO product_slots VALUES(62,190); +INSERT INTO product_slots VALUES(62,191); +INSERT INTO product_slots VALUES(62,192); +INSERT INTO product_slots VALUES(62,193); +INSERT INTO product_slots VALUES(62,194); +INSERT INTO product_slots VALUES(62,195); +INSERT INTO product_slots VALUES(62,196); +INSERT INTO product_slots VALUES(62,197); +INSERT INTO product_slots VALUES(62,198); +INSERT INTO product_slots VALUES(62,199); +INSERT INTO product_slots VALUES(62,200); +INSERT INTO product_slots VALUES(62,201); +INSERT INTO product_slots VALUES(62,202); +INSERT INTO product_slots VALUES(62,203); +INSERT INTO product_slots VALUES(62,204); +INSERT INTO product_slots VALUES(62,205); +INSERT INTO product_slots VALUES(62,206); +INSERT INTO product_slots VALUES(62,207); +INSERT INTO product_slots VALUES(62,208); +INSERT INTO product_slots VALUES(62,209); +INSERT INTO product_slots VALUES(62,210); +INSERT INTO product_slots VALUES(62,211); +INSERT INTO product_slots VALUES(62,212); +INSERT INTO product_slots VALUES(62,213); +INSERT INTO product_slots VALUES(62,214); +INSERT INTO product_slots VALUES(62,215); +INSERT INTO product_slots VALUES(62,216); +INSERT INTO product_slots VALUES(62,217); +INSERT INTO product_slots VALUES(62,218); +INSERT INTO product_slots VALUES(62,219); +INSERT INTO product_slots VALUES(62,220); +INSERT INTO product_slots VALUES(62,221); +INSERT INTO product_slots VALUES(62,222); +INSERT INTO product_slots VALUES(62,223); +INSERT INTO product_slots VALUES(62,224); +INSERT INTO product_slots VALUES(62,225); +INSERT INTO product_slots VALUES(62,226); +INSERT INTO product_slots VALUES(62,227); +INSERT INTO product_slots VALUES(62,228); +INSERT INTO product_slots VALUES(62,229); +INSERT INTO product_slots VALUES(62,230); +INSERT INTO product_slots VALUES(62,231); +INSERT INTO product_slots VALUES(62,232); +INSERT INTO product_slots VALUES(62,233); +INSERT INTO product_slots VALUES(62,234); +INSERT INTO product_slots VALUES(62,235); +INSERT INTO product_slots VALUES(62,236); +INSERT INTO product_slots VALUES(62,237); +INSERT INTO product_slots VALUES(62,238); +INSERT INTO product_slots VALUES(62,239); +INSERT INTO product_slots VALUES(62,240); +INSERT INTO product_slots VALUES(62,241); +INSERT INTO product_slots VALUES(62,242); +INSERT INTO product_slots VALUES(62,243); +INSERT INTO product_slots VALUES(62,244); +INSERT INTO product_slots VALUES(62,274); +INSERT INTO product_slots VALUES(62,275); +INSERT INTO product_slots VALUES(62,279); +INSERT INTO product_slots VALUES(62,280); +INSERT INTO product_slots VALUES(62,281); +INSERT INTO product_slots VALUES(62,282); +INSERT INTO product_slots VALUES(62,283); +INSERT INTO product_slots VALUES(62,284); +INSERT INTO product_slots VALUES(62,285); +INSERT INTO product_slots VALUES(62,286); +INSERT INTO product_slots VALUES(62,287); +INSERT INTO product_slots VALUES(63,40); +INSERT INTO product_slots VALUES(63,59); +INSERT INTO product_slots VALUES(63,64); +INSERT INTO product_slots VALUES(63,65); +INSERT INTO product_slots VALUES(63,66); +INSERT INTO product_slots VALUES(63,67); +INSERT INTO product_slots VALUES(63,68); +INSERT INTO product_slots VALUES(63,69); +INSERT INTO product_slots VALUES(63,70); +INSERT INTO product_slots VALUES(63,71); +INSERT INTO product_slots VALUES(63,72); +INSERT INTO product_slots VALUES(63,73); +INSERT INTO product_slots VALUES(63,74); +INSERT INTO product_slots VALUES(63,75); +INSERT INTO product_slots VALUES(63,76); +INSERT INTO product_slots VALUES(63,77); +INSERT INTO product_slots VALUES(63,78); +INSERT INTO product_slots VALUES(63,79); +INSERT INTO product_slots VALUES(63,80); +INSERT INTO product_slots VALUES(63,81); +INSERT INTO product_slots VALUES(63,82); +INSERT INTO product_slots VALUES(63,83); +INSERT INTO product_slots VALUES(63,84); +INSERT INTO product_slots VALUES(63,85); +INSERT INTO product_slots VALUES(63,86); +INSERT INTO product_slots VALUES(63,87); +INSERT INTO product_slots VALUES(63,88); +INSERT INTO product_slots VALUES(63,89); +INSERT INTO product_slots VALUES(63,90); +INSERT INTO product_slots VALUES(63,91); +INSERT INTO product_slots VALUES(63,92); +INSERT INTO product_slots VALUES(63,93); +INSERT INTO product_slots VALUES(63,94); +INSERT INTO product_slots VALUES(63,95); +INSERT INTO product_slots VALUES(63,96); +INSERT INTO product_slots VALUES(63,97); +INSERT INTO product_slots VALUES(63,98); +INSERT INTO product_slots VALUES(63,99); +INSERT INTO product_slots VALUES(63,100); +INSERT INTO product_slots VALUES(63,102); +INSERT INTO product_slots VALUES(63,103); +INSERT INTO product_slots VALUES(63,104); +INSERT INTO product_slots VALUES(63,105); +INSERT INTO product_slots VALUES(63,106); +INSERT INTO product_slots VALUES(63,107); +INSERT INTO product_slots VALUES(63,108); +INSERT INTO product_slots VALUES(63,109); +INSERT INTO product_slots VALUES(63,110); +INSERT INTO product_slots VALUES(63,111); +INSERT INTO product_slots VALUES(63,112); +INSERT INTO product_slots VALUES(63,113); +INSERT INTO product_slots VALUES(63,114); +INSERT INTO product_slots VALUES(63,115); +INSERT INTO product_slots VALUES(63,117); +INSERT INTO product_slots VALUES(63,118); +INSERT INTO product_slots VALUES(63,119); +INSERT INTO product_slots VALUES(63,120); +INSERT INTO product_slots VALUES(63,121); +INSERT INTO product_slots VALUES(63,122); +INSERT INTO product_slots VALUES(63,123); +INSERT INTO product_slots VALUES(63,124); +INSERT INTO product_slots VALUES(63,125); +INSERT INTO product_slots VALUES(63,126); +INSERT INTO product_slots VALUES(63,127); +INSERT INTO product_slots VALUES(63,128); +INSERT INTO product_slots VALUES(63,129); +INSERT INTO product_slots VALUES(63,130); +INSERT INTO product_slots VALUES(63,131); +INSERT INTO product_slots VALUES(63,132); +INSERT INTO product_slots VALUES(63,133); +INSERT INTO product_slots VALUES(63,134); +INSERT INTO product_slots VALUES(63,135); +INSERT INTO product_slots VALUES(63,136); +INSERT INTO product_slots VALUES(63,138); +INSERT INTO product_slots VALUES(63,139); +INSERT INTO product_slots VALUES(63,140); +INSERT INTO product_slots VALUES(63,141); +INSERT INTO product_slots VALUES(63,142); +INSERT INTO product_slots VALUES(63,143); +INSERT INTO product_slots VALUES(63,145); +INSERT INTO product_slots VALUES(63,146); +INSERT INTO product_slots VALUES(63,147); +INSERT INTO product_slots VALUES(63,148); +INSERT INTO product_slots VALUES(63,149); +INSERT INTO product_slots VALUES(63,150); +INSERT INTO product_slots VALUES(63,151); +INSERT INTO product_slots VALUES(63,152); +INSERT INTO product_slots VALUES(63,153); +INSERT INTO product_slots VALUES(63,154); +INSERT INTO product_slots VALUES(63,155); +INSERT INTO product_slots VALUES(63,156); +INSERT INTO product_slots VALUES(63,157); +INSERT INTO product_slots VALUES(63,158); +INSERT INTO product_slots VALUES(63,159); +INSERT INTO product_slots VALUES(63,160); +INSERT INTO product_slots VALUES(63,161); +INSERT INTO product_slots VALUES(63,162); +INSERT INTO product_slots VALUES(63,163); +INSERT INTO product_slots VALUES(63,164); +INSERT INTO product_slots VALUES(63,165); +INSERT INTO product_slots VALUES(63,166); +INSERT INTO product_slots VALUES(63,167); +INSERT INTO product_slots VALUES(63,168); +INSERT INTO product_slots VALUES(63,169); +INSERT INTO product_slots VALUES(63,170); +INSERT INTO product_slots VALUES(63,171); +INSERT INTO product_slots VALUES(63,172); +INSERT INTO product_slots VALUES(63,173); +INSERT INTO product_slots VALUES(63,174); +INSERT INTO product_slots VALUES(63,175); +INSERT INTO product_slots VALUES(63,176); +INSERT INTO product_slots VALUES(63,177); +INSERT INTO product_slots VALUES(63,178); +INSERT INTO product_slots VALUES(63,179); +INSERT INTO product_slots VALUES(63,180); +INSERT INTO product_slots VALUES(63,181); +INSERT INTO product_slots VALUES(63,182); +INSERT INTO product_slots VALUES(63,183); +INSERT INTO product_slots VALUES(63,184); +INSERT INTO product_slots VALUES(63,185); +INSERT INTO product_slots VALUES(63,186); +INSERT INTO product_slots VALUES(63,187); +INSERT INTO product_slots VALUES(63,188); +INSERT INTO product_slots VALUES(63,189); +INSERT INTO product_slots VALUES(63,190); +INSERT INTO product_slots VALUES(63,191); +INSERT INTO product_slots VALUES(63,192); +INSERT INTO product_slots VALUES(63,193); +INSERT INTO product_slots VALUES(63,194); +INSERT INTO product_slots VALUES(63,195); +INSERT INTO product_slots VALUES(63,196); +INSERT INTO product_slots VALUES(63,197); +INSERT INTO product_slots VALUES(63,198); +INSERT INTO product_slots VALUES(63,199); +INSERT INTO product_slots VALUES(63,200); +INSERT INTO product_slots VALUES(63,201); +INSERT INTO product_slots VALUES(63,202); +INSERT INTO product_slots VALUES(63,203); +INSERT INTO product_slots VALUES(63,204); +INSERT INTO product_slots VALUES(63,205); +INSERT INTO product_slots VALUES(63,206); +INSERT INTO product_slots VALUES(63,207); +INSERT INTO product_slots VALUES(63,208); +INSERT INTO product_slots VALUES(63,209); +INSERT INTO product_slots VALUES(63,210); +INSERT INTO product_slots VALUES(63,211); +INSERT INTO product_slots VALUES(63,212); +INSERT INTO product_slots VALUES(63,213); +INSERT INTO product_slots VALUES(63,214); +INSERT INTO product_slots VALUES(63,215); +INSERT INTO product_slots VALUES(63,216); +INSERT INTO product_slots VALUES(63,217); +INSERT INTO product_slots VALUES(63,218); +INSERT INTO product_slots VALUES(63,219); +INSERT INTO product_slots VALUES(63,220); +INSERT INTO product_slots VALUES(63,221); +INSERT INTO product_slots VALUES(63,222); +INSERT INTO product_slots VALUES(63,223); +INSERT INTO product_slots VALUES(63,224); +INSERT INTO product_slots VALUES(63,225); +INSERT INTO product_slots VALUES(63,226); +INSERT INTO product_slots VALUES(63,227); +INSERT INTO product_slots VALUES(63,228); +INSERT INTO product_slots VALUES(63,229); +INSERT INTO product_slots VALUES(63,230); +INSERT INTO product_slots VALUES(63,231); +INSERT INTO product_slots VALUES(63,232); +INSERT INTO product_slots VALUES(63,233); +INSERT INTO product_slots VALUES(63,234); +INSERT INTO product_slots VALUES(63,235); +INSERT INTO product_slots VALUES(63,236); +INSERT INTO product_slots VALUES(63,237); +INSERT INTO product_slots VALUES(63,238); +INSERT INTO product_slots VALUES(63,239); +INSERT INTO product_slots VALUES(63,240); +INSERT INTO product_slots VALUES(63,241); +INSERT INTO product_slots VALUES(63,242); +INSERT INTO product_slots VALUES(63,243); +INSERT INTO product_slots VALUES(63,244); +INSERT INTO product_slots VALUES(63,274); +INSERT INTO product_slots VALUES(63,275); +INSERT INTO product_slots VALUES(63,279); +INSERT INTO product_slots VALUES(63,280); +INSERT INTO product_slots VALUES(63,281); +INSERT INTO product_slots VALUES(63,282); +INSERT INTO product_slots VALUES(63,283); +INSERT INTO product_slots VALUES(63,284); +INSERT INTO product_slots VALUES(63,285); +INSERT INTO product_slots VALUES(63,286); +INSERT INTO product_slots VALUES(63,287); +INSERT INTO product_slots VALUES(64,39); +INSERT INTO product_slots VALUES(64,44); +INSERT INTO product_slots VALUES(64,46); +INSERT INTO product_slots VALUES(64,47); +INSERT INTO product_slots VALUES(64,48); +INSERT INTO product_slots VALUES(64,49); +INSERT INTO product_slots VALUES(64,50); +INSERT INTO product_slots VALUES(64,51); +INSERT INTO product_slots VALUES(64,52); +INSERT INTO product_slots VALUES(64,53); +INSERT INTO product_slots VALUES(64,54); +INSERT INTO product_slots VALUES(64,55); +INSERT INTO product_slots VALUES(64,56); +INSERT INTO product_slots VALUES(64,57); +INSERT INTO product_slots VALUES(64,58); +INSERT INTO product_slots VALUES(64,59); +INSERT INTO product_slots VALUES(64,60); +INSERT INTO product_slots VALUES(64,61); +INSERT INTO product_slots VALUES(64,62); +INSERT INTO product_slots VALUES(64,63); +INSERT INTO product_slots VALUES(64,64); +INSERT INTO product_slots VALUES(64,65); +INSERT INTO product_slots VALUES(64,66); +INSERT INTO product_slots VALUES(64,67); +INSERT INTO product_slots VALUES(64,68); +INSERT INTO product_slots VALUES(64,69); +INSERT INTO product_slots VALUES(64,70); +INSERT INTO product_slots VALUES(64,71); +INSERT INTO product_slots VALUES(64,72); +INSERT INTO product_slots VALUES(64,73); +INSERT INTO product_slots VALUES(64,74); +INSERT INTO product_slots VALUES(64,75); +INSERT INTO product_slots VALUES(64,76); +INSERT INTO product_slots VALUES(64,77); +INSERT INTO product_slots VALUES(64,78); +INSERT INTO product_slots VALUES(64,79); +INSERT INTO product_slots VALUES(64,80); +INSERT INTO product_slots VALUES(64,81); +INSERT INTO product_slots VALUES(64,82); +INSERT INTO product_slots VALUES(64,83); +INSERT INTO product_slots VALUES(64,84); +INSERT INTO product_slots VALUES(64,85); +INSERT INTO product_slots VALUES(64,86); +INSERT INTO product_slots VALUES(64,87); +INSERT INTO product_slots VALUES(64,88); +INSERT INTO product_slots VALUES(64,89); +INSERT INTO product_slots VALUES(64,90); +INSERT INTO product_slots VALUES(64,91); +INSERT INTO product_slots VALUES(64,92); +INSERT INTO product_slots VALUES(64,93); +INSERT INTO product_slots VALUES(64,94); +INSERT INTO product_slots VALUES(64,95); +INSERT INTO product_slots VALUES(64,96); +INSERT INTO product_slots VALUES(64,97); +INSERT INTO product_slots VALUES(64,98); +INSERT INTO product_slots VALUES(64,99); +INSERT INTO product_slots VALUES(64,100); +INSERT INTO product_slots VALUES(64,101); +INSERT INTO product_slots VALUES(64,102); +INSERT INTO product_slots VALUES(64,103); +INSERT INTO product_slots VALUES(64,104); +INSERT INTO product_slots VALUES(64,105); +INSERT INTO product_slots VALUES(64,106); +INSERT INTO product_slots VALUES(64,107); +INSERT INTO product_slots VALUES(64,108); +INSERT INTO product_slots VALUES(64,109); +INSERT INTO product_slots VALUES(64,110); +INSERT INTO product_slots VALUES(64,111); +INSERT INTO product_slots VALUES(64,112); +INSERT INTO product_slots VALUES(64,113); +INSERT INTO product_slots VALUES(64,114); +INSERT INTO product_slots VALUES(64,115); +INSERT INTO product_slots VALUES(64,116); +INSERT INTO product_slots VALUES(64,117); +INSERT INTO product_slots VALUES(64,118); +INSERT INTO product_slots VALUES(64,119); +INSERT INTO product_slots VALUES(64,120); +INSERT INTO product_slots VALUES(64,121); +INSERT INTO product_slots VALUES(64,122); +INSERT INTO product_slots VALUES(64,123); +INSERT INTO product_slots VALUES(64,124); +INSERT INTO product_slots VALUES(64,125); +INSERT INTO product_slots VALUES(64,126); +INSERT INTO product_slots VALUES(64,127); +INSERT INTO product_slots VALUES(64,128); +INSERT INTO product_slots VALUES(64,129); +INSERT INTO product_slots VALUES(64,130); +INSERT INTO product_slots VALUES(64,131); +INSERT INTO product_slots VALUES(64,132); +INSERT INTO product_slots VALUES(64,133); +INSERT INTO product_slots VALUES(64,134); +INSERT INTO product_slots VALUES(64,135); +INSERT INTO product_slots VALUES(64,136); +INSERT INTO product_slots VALUES(64,137); +INSERT INTO product_slots VALUES(64,138); +INSERT INTO product_slots VALUES(64,139); +INSERT INTO product_slots VALUES(64,140); +INSERT INTO product_slots VALUES(64,141); +INSERT INTO product_slots VALUES(64,142); +INSERT INTO product_slots VALUES(64,143); +INSERT INTO product_slots VALUES(64,144); +INSERT INTO product_slots VALUES(64,145); +INSERT INTO product_slots VALUES(64,146); +INSERT INTO product_slots VALUES(64,147); +INSERT INTO product_slots VALUES(64,148); +INSERT INTO product_slots VALUES(64,149); +INSERT INTO product_slots VALUES(64,150); +INSERT INTO product_slots VALUES(64,151); +INSERT INTO product_slots VALUES(64,152); +INSERT INTO product_slots VALUES(64,153); +INSERT INTO product_slots VALUES(64,154); +INSERT INTO product_slots VALUES(64,155); +INSERT INTO product_slots VALUES(64,156); +INSERT INTO product_slots VALUES(64,157); +INSERT INTO product_slots VALUES(64,158); +INSERT INTO product_slots VALUES(64,159); +INSERT INTO product_slots VALUES(64,160); +INSERT INTO product_slots VALUES(64,161); +INSERT INTO product_slots VALUES(64,162); +INSERT INTO product_slots VALUES(64,163); +INSERT INTO product_slots VALUES(64,164); +INSERT INTO product_slots VALUES(64,165); +INSERT INTO product_slots VALUES(64,166); +INSERT INTO product_slots VALUES(64,167); +INSERT INTO product_slots VALUES(64,168); +INSERT INTO product_slots VALUES(64,169); +INSERT INTO product_slots VALUES(64,170); +INSERT INTO product_slots VALUES(64,171); +INSERT INTO product_slots VALUES(64,172); +INSERT INTO product_slots VALUES(64,173); +INSERT INTO product_slots VALUES(64,174); +INSERT INTO product_slots VALUES(64,175); +INSERT INTO product_slots VALUES(64,176); +INSERT INTO product_slots VALUES(64,177); +INSERT INTO product_slots VALUES(64,178); +INSERT INTO product_slots VALUES(64,179); +INSERT INTO product_slots VALUES(64,180); +INSERT INTO product_slots VALUES(64,181); +INSERT INTO product_slots VALUES(64,182); +INSERT INTO product_slots VALUES(64,183); +INSERT INTO product_slots VALUES(64,184); +INSERT INTO product_slots VALUES(64,185); +INSERT INTO product_slots VALUES(64,186); +INSERT INTO product_slots VALUES(64,187); +INSERT INTO product_slots VALUES(64,188); +INSERT INTO product_slots VALUES(64,189); +INSERT INTO product_slots VALUES(64,190); +INSERT INTO product_slots VALUES(64,191); +INSERT INTO product_slots VALUES(64,192); +INSERT INTO product_slots VALUES(64,193); +INSERT INTO product_slots VALUES(64,194); +INSERT INTO product_slots VALUES(64,195); +INSERT INTO product_slots VALUES(64,196); +INSERT INTO product_slots VALUES(64,197); +INSERT INTO product_slots VALUES(64,198); +INSERT INTO product_slots VALUES(64,199); +INSERT INTO product_slots VALUES(64,200); +INSERT INTO product_slots VALUES(64,201); +INSERT INTO product_slots VALUES(64,202); +INSERT INTO product_slots VALUES(64,203); +INSERT INTO product_slots VALUES(64,204); +INSERT INTO product_slots VALUES(64,205); +INSERT INTO product_slots VALUES(64,206); +INSERT INTO product_slots VALUES(64,207); +INSERT INTO product_slots VALUES(64,208); +INSERT INTO product_slots VALUES(64,209); +INSERT INTO product_slots VALUES(64,210); +INSERT INTO product_slots VALUES(64,211); +INSERT INTO product_slots VALUES(64,212); +INSERT INTO product_slots VALUES(64,213); +INSERT INTO product_slots VALUES(64,214); +INSERT INTO product_slots VALUES(64,215); +INSERT INTO product_slots VALUES(64,216); +INSERT INTO product_slots VALUES(64,217); +INSERT INTO product_slots VALUES(64,218); +INSERT INTO product_slots VALUES(64,219); +INSERT INTO product_slots VALUES(64,220); +INSERT INTO product_slots VALUES(64,221); +INSERT INTO product_slots VALUES(64,222); +INSERT INTO product_slots VALUES(64,223); +INSERT INTO product_slots VALUES(64,224); +INSERT INTO product_slots VALUES(64,225); +INSERT INTO product_slots VALUES(64,226); +INSERT INTO product_slots VALUES(64,227); +INSERT INTO product_slots VALUES(64,228); +INSERT INTO product_slots VALUES(64,229); +INSERT INTO product_slots VALUES(64,230); +INSERT INTO product_slots VALUES(64,231); +INSERT INTO product_slots VALUES(64,232); +INSERT INTO product_slots VALUES(64,233); +INSERT INTO product_slots VALUES(64,234); +INSERT INTO product_slots VALUES(64,235); +INSERT INTO product_slots VALUES(64,236); +INSERT INTO product_slots VALUES(64,237); +INSERT INTO product_slots VALUES(64,238); +INSERT INTO product_slots VALUES(64,239); +INSERT INTO product_slots VALUES(64,240); +INSERT INTO product_slots VALUES(64,241); +INSERT INTO product_slots VALUES(64,242); +INSERT INTO product_slots VALUES(64,243); +INSERT INTO product_slots VALUES(64,244); +INSERT INTO product_slots VALUES(64,274); +INSERT INTO product_slots VALUES(64,275); +INSERT INTO product_slots VALUES(64,279); +INSERT INTO product_slots VALUES(64,280); +INSERT INTO product_slots VALUES(64,281); +INSERT INTO product_slots VALUES(64,282); +INSERT INTO product_slots VALUES(64,283); +INSERT INTO product_slots VALUES(64,284); +INSERT INTO product_slots VALUES(64,285); +INSERT INTO product_slots VALUES(64,286); +INSERT INTO product_slots VALUES(64,287); +INSERT INTO product_slots VALUES(65,39); +INSERT INTO product_slots VALUES(65,41); +INSERT INTO product_slots VALUES(65,43); +INSERT INTO product_slots VALUES(65,44); +INSERT INTO product_slots VALUES(65,45); +INSERT INTO product_slots VALUES(65,46); +INSERT INTO product_slots VALUES(65,47); +INSERT INTO product_slots VALUES(65,48); +INSERT INTO product_slots VALUES(65,49); +INSERT INTO product_slots VALUES(65,50); +INSERT INTO product_slots VALUES(65,51); +INSERT INTO product_slots VALUES(65,52); +INSERT INTO product_slots VALUES(65,53); +INSERT INTO product_slots VALUES(65,54); +INSERT INTO product_slots VALUES(65,55); +INSERT INTO product_slots VALUES(65,56); +INSERT INTO product_slots VALUES(65,57); +INSERT INTO product_slots VALUES(65,58); +INSERT INTO product_slots VALUES(65,59); +INSERT INTO product_slots VALUES(65,60); +INSERT INTO product_slots VALUES(65,61); +INSERT INTO product_slots VALUES(65,62); +INSERT INTO product_slots VALUES(65,63); +INSERT INTO product_slots VALUES(65,64); +INSERT INTO product_slots VALUES(65,65); +INSERT INTO product_slots VALUES(65,66); +INSERT INTO product_slots VALUES(65,67); +INSERT INTO product_slots VALUES(65,68); +INSERT INTO product_slots VALUES(65,69); +INSERT INTO product_slots VALUES(65,70); +INSERT INTO product_slots VALUES(65,71); +INSERT INTO product_slots VALUES(65,72); +INSERT INTO product_slots VALUES(65,73); +INSERT INTO product_slots VALUES(65,74); +INSERT INTO product_slots VALUES(65,75); +INSERT INTO product_slots VALUES(65,76); +INSERT INTO product_slots VALUES(65,77); +INSERT INTO product_slots VALUES(65,78); +INSERT INTO product_slots VALUES(65,79); +INSERT INTO product_slots VALUES(65,80); +INSERT INTO product_slots VALUES(65,81); +INSERT INTO product_slots VALUES(65,82); +INSERT INTO product_slots VALUES(65,83); +INSERT INTO product_slots VALUES(65,84); +INSERT INTO product_slots VALUES(65,85); +INSERT INTO product_slots VALUES(65,86); +INSERT INTO product_slots VALUES(65,87); +INSERT INTO product_slots VALUES(65,88); +INSERT INTO product_slots VALUES(65,89); +INSERT INTO product_slots VALUES(65,90); +INSERT INTO product_slots VALUES(65,91); +INSERT INTO product_slots VALUES(65,92); +INSERT INTO product_slots VALUES(65,93); +INSERT INTO product_slots VALUES(65,94); +INSERT INTO product_slots VALUES(65,95); +INSERT INTO product_slots VALUES(65,96); +INSERT INTO product_slots VALUES(65,97); +INSERT INTO product_slots VALUES(65,98); +INSERT INTO product_slots VALUES(65,99); +INSERT INTO product_slots VALUES(65,100); +INSERT INTO product_slots VALUES(65,101); +INSERT INTO product_slots VALUES(65,102); +INSERT INTO product_slots VALUES(65,103); +INSERT INTO product_slots VALUES(65,104); +INSERT INTO product_slots VALUES(65,105); +INSERT INTO product_slots VALUES(65,106); +INSERT INTO product_slots VALUES(65,107); +INSERT INTO product_slots VALUES(65,108); +INSERT INTO product_slots VALUES(65,109); +INSERT INTO product_slots VALUES(65,110); +INSERT INTO product_slots VALUES(65,111); +INSERT INTO product_slots VALUES(65,112); +INSERT INTO product_slots VALUES(65,113); +INSERT INTO product_slots VALUES(65,114); +INSERT INTO product_slots VALUES(65,115); +INSERT INTO product_slots VALUES(65,116); +INSERT INTO product_slots VALUES(65,117); +INSERT INTO product_slots VALUES(65,118); +INSERT INTO product_slots VALUES(65,119); +INSERT INTO product_slots VALUES(65,120); +INSERT INTO product_slots VALUES(65,121); +INSERT INTO product_slots VALUES(65,122); +INSERT INTO product_slots VALUES(65,123); +INSERT INTO product_slots VALUES(65,124); +INSERT INTO product_slots VALUES(65,125); +INSERT INTO product_slots VALUES(65,126); +INSERT INTO product_slots VALUES(65,127); +INSERT INTO product_slots VALUES(65,128); +INSERT INTO product_slots VALUES(65,129); +INSERT INTO product_slots VALUES(65,130); +INSERT INTO product_slots VALUES(65,131); +INSERT INTO product_slots VALUES(65,132); +INSERT INTO product_slots VALUES(65,133); +INSERT INTO product_slots VALUES(65,134); +INSERT INTO product_slots VALUES(65,135); +INSERT INTO product_slots VALUES(65,136); +INSERT INTO product_slots VALUES(65,137); +INSERT INTO product_slots VALUES(65,138); +INSERT INTO product_slots VALUES(65,139); +INSERT INTO product_slots VALUES(65,140); +INSERT INTO product_slots VALUES(65,141); +INSERT INTO product_slots VALUES(65,142); +INSERT INTO product_slots VALUES(65,143); +INSERT INTO product_slots VALUES(65,144); +INSERT INTO product_slots VALUES(65,145); +INSERT INTO product_slots VALUES(65,146); +INSERT INTO product_slots VALUES(65,147); +INSERT INTO product_slots VALUES(65,148); +INSERT INTO product_slots VALUES(65,149); +INSERT INTO product_slots VALUES(65,150); +INSERT INTO product_slots VALUES(65,151); +INSERT INTO product_slots VALUES(65,152); +INSERT INTO product_slots VALUES(65,153); +INSERT INTO product_slots VALUES(65,154); +INSERT INTO product_slots VALUES(65,155); +INSERT INTO product_slots VALUES(65,156); +INSERT INTO product_slots VALUES(65,157); +INSERT INTO product_slots VALUES(65,158); +INSERT INTO product_slots VALUES(65,159); +INSERT INTO product_slots VALUES(65,160); +INSERT INTO product_slots VALUES(65,161); +INSERT INTO product_slots VALUES(65,162); +INSERT INTO product_slots VALUES(65,163); +INSERT INTO product_slots VALUES(65,164); +INSERT INTO product_slots VALUES(65,165); +INSERT INTO product_slots VALUES(65,166); +INSERT INTO product_slots VALUES(65,167); +INSERT INTO product_slots VALUES(65,168); +INSERT INTO product_slots VALUES(65,169); +INSERT INTO product_slots VALUES(65,170); +INSERT INTO product_slots VALUES(65,171); +INSERT INTO product_slots VALUES(65,172); +INSERT INTO product_slots VALUES(65,173); +INSERT INTO product_slots VALUES(65,174); +INSERT INTO product_slots VALUES(65,175); +INSERT INTO product_slots VALUES(65,176); +INSERT INTO product_slots VALUES(65,177); +INSERT INTO product_slots VALUES(65,178); +INSERT INTO product_slots VALUES(65,179); +INSERT INTO product_slots VALUES(65,180); +INSERT INTO product_slots VALUES(65,181); +INSERT INTO product_slots VALUES(65,182); +INSERT INTO product_slots VALUES(65,183); +INSERT INTO product_slots VALUES(65,184); +INSERT INTO product_slots VALUES(65,185); +INSERT INTO product_slots VALUES(65,186); +INSERT INTO product_slots VALUES(65,187); +INSERT INTO product_slots VALUES(65,188); +INSERT INTO product_slots VALUES(65,189); +INSERT INTO product_slots VALUES(65,190); +INSERT INTO product_slots VALUES(65,191); +INSERT INTO product_slots VALUES(65,192); +INSERT INTO product_slots VALUES(65,193); +INSERT INTO product_slots VALUES(65,194); +INSERT INTO product_slots VALUES(65,195); +INSERT INTO product_slots VALUES(65,196); +INSERT INTO product_slots VALUES(65,197); +INSERT INTO product_slots VALUES(65,198); +INSERT INTO product_slots VALUES(65,199); +INSERT INTO product_slots VALUES(65,200); +INSERT INTO product_slots VALUES(65,201); +INSERT INTO product_slots VALUES(65,202); +INSERT INTO product_slots VALUES(65,203); +INSERT INTO product_slots VALUES(65,204); +INSERT INTO product_slots VALUES(65,205); +INSERT INTO product_slots VALUES(65,206); +INSERT INTO product_slots VALUES(65,207); +INSERT INTO product_slots VALUES(65,208); +INSERT INTO product_slots VALUES(65,209); +INSERT INTO product_slots VALUES(65,210); +INSERT INTO product_slots VALUES(65,211); +INSERT INTO product_slots VALUES(65,212); +INSERT INTO product_slots VALUES(65,213); +INSERT INTO product_slots VALUES(65,214); +INSERT INTO product_slots VALUES(65,215); +INSERT INTO product_slots VALUES(65,216); +INSERT INTO product_slots VALUES(65,217); +INSERT INTO product_slots VALUES(65,218); +INSERT INTO product_slots VALUES(65,219); +INSERT INTO product_slots VALUES(65,220); +INSERT INTO product_slots VALUES(65,221); +INSERT INTO product_slots VALUES(65,222); +INSERT INTO product_slots VALUES(65,223); +INSERT INTO product_slots VALUES(65,224); +INSERT INTO product_slots VALUES(65,225); +INSERT INTO product_slots VALUES(65,226); +INSERT INTO product_slots VALUES(65,227); +INSERT INTO product_slots VALUES(65,228); +INSERT INTO product_slots VALUES(65,229); +INSERT INTO product_slots VALUES(65,230); +INSERT INTO product_slots VALUES(65,231); +INSERT INTO product_slots VALUES(65,232); +INSERT INTO product_slots VALUES(65,233); +INSERT INTO product_slots VALUES(65,234); +INSERT INTO product_slots VALUES(65,235); +INSERT INTO product_slots VALUES(65,236); +INSERT INTO product_slots VALUES(65,237); +INSERT INTO product_slots VALUES(65,238); +INSERT INTO product_slots VALUES(65,239); +INSERT INTO product_slots VALUES(65,240); +INSERT INTO product_slots VALUES(65,241); +INSERT INTO product_slots VALUES(65,242); +INSERT INTO product_slots VALUES(65,243); +INSERT INTO product_slots VALUES(65,244); +INSERT INTO product_slots VALUES(65,274); +INSERT INTO product_slots VALUES(65,275); +INSERT INTO product_slots VALUES(65,279); +INSERT INTO product_slots VALUES(65,280); +INSERT INTO product_slots VALUES(65,281); +INSERT INTO product_slots VALUES(65,282); +INSERT INTO product_slots VALUES(65,283); +INSERT INTO product_slots VALUES(65,284); +INSERT INTO product_slots VALUES(65,285); +INSERT INTO product_slots VALUES(65,286); +INSERT INTO product_slots VALUES(65,287); +INSERT INTO product_slots VALUES(66,39); +INSERT INTO product_slots VALUES(66,41); +INSERT INTO product_slots VALUES(66,43); +INSERT INTO product_slots VALUES(66,44); +INSERT INTO product_slots VALUES(66,45); +INSERT INTO product_slots VALUES(66,46); +INSERT INTO product_slots VALUES(66,47); +INSERT INTO product_slots VALUES(66,48); +INSERT INTO product_slots VALUES(66,49); +INSERT INTO product_slots VALUES(66,50); +INSERT INTO product_slots VALUES(66,51); +INSERT INTO product_slots VALUES(66,52); +INSERT INTO product_slots VALUES(66,53); +INSERT INTO product_slots VALUES(66,54); +INSERT INTO product_slots VALUES(66,55); +INSERT INTO product_slots VALUES(66,56); +INSERT INTO product_slots VALUES(66,57); +INSERT INTO product_slots VALUES(66,58); +INSERT INTO product_slots VALUES(66,59); +INSERT INTO product_slots VALUES(66,60); +INSERT INTO product_slots VALUES(66,61); +INSERT INTO product_slots VALUES(66,62); +INSERT INTO product_slots VALUES(66,63); +INSERT INTO product_slots VALUES(66,64); +INSERT INTO product_slots VALUES(66,65); +INSERT INTO product_slots VALUES(66,66); +INSERT INTO product_slots VALUES(66,67); +INSERT INTO product_slots VALUES(66,68); +INSERT INTO product_slots VALUES(66,69); +INSERT INTO product_slots VALUES(66,70); +INSERT INTO product_slots VALUES(66,71); +INSERT INTO product_slots VALUES(66,72); +INSERT INTO product_slots VALUES(66,73); +INSERT INTO product_slots VALUES(66,74); +INSERT INTO product_slots VALUES(66,75); +INSERT INTO product_slots VALUES(66,76); +INSERT INTO product_slots VALUES(66,77); +INSERT INTO product_slots VALUES(66,78); +INSERT INTO product_slots VALUES(66,79); +INSERT INTO product_slots VALUES(66,80); +INSERT INTO product_slots VALUES(66,81); +INSERT INTO product_slots VALUES(66,82); +INSERT INTO product_slots VALUES(66,83); +INSERT INTO product_slots VALUES(66,84); +INSERT INTO product_slots VALUES(66,85); +INSERT INTO product_slots VALUES(66,86); +INSERT INTO product_slots VALUES(66,87); +INSERT INTO product_slots VALUES(66,88); +INSERT INTO product_slots VALUES(66,89); +INSERT INTO product_slots VALUES(66,90); +INSERT INTO product_slots VALUES(66,91); +INSERT INTO product_slots VALUES(66,92); +INSERT INTO product_slots VALUES(66,93); +INSERT INTO product_slots VALUES(66,94); +INSERT INTO product_slots VALUES(66,95); +INSERT INTO product_slots VALUES(66,96); +INSERT INTO product_slots VALUES(66,97); +INSERT INTO product_slots VALUES(66,98); +INSERT INTO product_slots VALUES(66,99); +INSERT INTO product_slots VALUES(66,100); +INSERT INTO product_slots VALUES(66,101); +INSERT INTO product_slots VALUES(66,102); +INSERT INTO product_slots VALUES(66,103); +INSERT INTO product_slots VALUES(66,104); +INSERT INTO product_slots VALUES(66,105); +INSERT INTO product_slots VALUES(66,106); +INSERT INTO product_slots VALUES(66,107); +INSERT INTO product_slots VALUES(66,108); +INSERT INTO product_slots VALUES(66,109); +INSERT INTO product_slots VALUES(66,110); +INSERT INTO product_slots VALUES(66,111); +INSERT INTO product_slots VALUES(66,112); +INSERT INTO product_slots VALUES(66,113); +INSERT INTO product_slots VALUES(66,114); +INSERT INTO product_slots VALUES(66,115); +INSERT INTO product_slots VALUES(66,116); +INSERT INTO product_slots VALUES(66,117); +INSERT INTO product_slots VALUES(66,118); +INSERT INTO product_slots VALUES(66,119); +INSERT INTO product_slots VALUES(66,120); +INSERT INTO product_slots VALUES(66,121); +INSERT INTO product_slots VALUES(66,122); +INSERT INTO product_slots VALUES(66,123); +INSERT INTO product_slots VALUES(66,124); +INSERT INTO product_slots VALUES(66,125); +INSERT INTO product_slots VALUES(66,126); +INSERT INTO product_slots VALUES(66,127); +INSERT INTO product_slots VALUES(66,128); +INSERT INTO product_slots VALUES(66,129); +INSERT INTO product_slots VALUES(66,130); +INSERT INTO product_slots VALUES(66,131); +INSERT INTO product_slots VALUES(66,132); +INSERT INTO product_slots VALUES(66,133); +INSERT INTO product_slots VALUES(66,134); +INSERT INTO product_slots VALUES(66,135); +INSERT INTO product_slots VALUES(66,136); +INSERT INTO product_slots VALUES(66,137); +INSERT INTO product_slots VALUES(66,138); +INSERT INTO product_slots VALUES(66,139); +INSERT INTO product_slots VALUES(66,140); +INSERT INTO product_slots VALUES(66,141); +INSERT INTO product_slots VALUES(66,142); +INSERT INTO product_slots VALUES(66,143); +INSERT INTO product_slots VALUES(66,144); +INSERT INTO product_slots VALUES(66,145); +INSERT INTO product_slots VALUES(66,146); +INSERT INTO product_slots VALUES(66,147); +INSERT INTO product_slots VALUES(66,148); +INSERT INTO product_slots VALUES(66,149); +INSERT INTO product_slots VALUES(66,150); +INSERT INTO product_slots VALUES(66,151); +INSERT INTO product_slots VALUES(66,152); +INSERT INTO product_slots VALUES(66,153); +INSERT INTO product_slots VALUES(66,154); +INSERT INTO product_slots VALUES(66,155); +INSERT INTO product_slots VALUES(66,156); +INSERT INTO product_slots VALUES(66,157); +INSERT INTO product_slots VALUES(66,158); +INSERT INTO product_slots VALUES(66,159); +INSERT INTO product_slots VALUES(66,160); +INSERT INTO product_slots VALUES(66,161); +INSERT INTO product_slots VALUES(66,162); +INSERT INTO product_slots VALUES(66,163); +INSERT INTO product_slots VALUES(66,164); +INSERT INTO product_slots VALUES(66,165); +INSERT INTO product_slots VALUES(66,166); +INSERT INTO product_slots VALUES(66,167); +INSERT INTO product_slots VALUES(66,168); +INSERT INTO product_slots VALUES(66,169); +INSERT INTO product_slots VALUES(66,170); +INSERT INTO product_slots VALUES(66,171); +INSERT INTO product_slots VALUES(66,172); +INSERT INTO product_slots VALUES(66,173); +INSERT INTO product_slots VALUES(66,174); +INSERT INTO product_slots VALUES(66,175); +INSERT INTO product_slots VALUES(66,176); +INSERT INTO product_slots VALUES(66,177); +INSERT INTO product_slots VALUES(66,178); +INSERT INTO product_slots VALUES(66,179); +INSERT INTO product_slots VALUES(66,180); +INSERT INTO product_slots VALUES(66,181); +INSERT INTO product_slots VALUES(66,182); +INSERT INTO product_slots VALUES(66,183); +INSERT INTO product_slots VALUES(66,184); +INSERT INTO product_slots VALUES(66,185); +INSERT INTO product_slots VALUES(66,186); +INSERT INTO product_slots VALUES(66,187); +INSERT INTO product_slots VALUES(66,188); +INSERT INTO product_slots VALUES(66,189); +INSERT INTO product_slots VALUES(66,190); +INSERT INTO product_slots VALUES(66,191); +INSERT INTO product_slots VALUES(66,192); +INSERT INTO product_slots VALUES(66,193); +INSERT INTO product_slots VALUES(66,194); +INSERT INTO product_slots VALUES(66,195); +INSERT INTO product_slots VALUES(66,196); +INSERT INTO product_slots VALUES(66,197); +INSERT INTO product_slots VALUES(66,198); +INSERT INTO product_slots VALUES(66,199); +INSERT INTO product_slots VALUES(66,200); +INSERT INTO product_slots VALUES(66,201); +INSERT INTO product_slots VALUES(66,202); +INSERT INTO product_slots VALUES(66,203); +INSERT INTO product_slots VALUES(66,204); +INSERT INTO product_slots VALUES(66,205); +INSERT INTO product_slots VALUES(66,206); +INSERT INTO product_slots VALUES(66,207); +INSERT INTO product_slots VALUES(66,208); +INSERT INTO product_slots VALUES(66,209); +INSERT INTO product_slots VALUES(66,210); +INSERT INTO product_slots VALUES(66,211); +INSERT INTO product_slots VALUES(66,212); +INSERT INTO product_slots VALUES(66,213); +INSERT INTO product_slots VALUES(66,214); +INSERT INTO product_slots VALUES(66,215); +INSERT INTO product_slots VALUES(66,216); +INSERT INTO product_slots VALUES(66,217); +INSERT INTO product_slots VALUES(66,218); +INSERT INTO product_slots VALUES(66,219); +INSERT INTO product_slots VALUES(66,220); +INSERT INTO product_slots VALUES(66,221); +INSERT INTO product_slots VALUES(66,222); +INSERT INTO product_slots VALUES(66,223); +INSERT INTO product_slots VALUES(66,224); +INSERT INTO product_slots VALUES(66,225); +INSERT INTO product_slots VALUES(66,226); +INSERT INTO product_slots VALUES(66,227); +INSERT INTO product_slots VALUES(66,228); +INSERT INTO product_slots VALUES(66,229); +INSERT INTO product_slots VALUES(66,230); +INSERT INTO product_slots VALUES(66,231); +INSERT INTO product_slots VALUES(66,232); +INSERT INTO product_slots VALUES(66,233); +INSERT INTO product_slots VALUES(66,234); +INSERT INTO product_slots VALUES(66,235); +INSERT INTO product_slots VALUES(66,236); +INSERT INTO product_slots VALUES(66,237); +INSERT INTO product_slots VALUES(66,238); +INSERT INTO product_slots VALUES(66,239); +INSERT INTO product_slots VALUES(66,240); +INSERT INTO product_slots VALUES(66,241); +INSERT INTO product_slots VALUES(66,242); +INSERT INTO product_slots VALUES(66,243); +INSERT INTO product_slots VALUES(66,244); +INSERT INTO product_slots VALUES(66,274); +INSERT INTO product_slots VALUES(66,275); +INSERT INTO product_slots VALUES(66,279); +INSERT INTO product_slots VALUES(66,280); +INSERT INTO product_slots VALUES(66,281); +INSERT INTO product_slots VALUES(66,282); +INSERT INTO product_slots VALUES(66,283); +INSERT INTO product_slots VALUES(66,284); +INSERT INTO product_slots VALUES(66,285); +INSERT INTO product_slots VALUES(66,286); +INSERT INTO product_slots VALUES(66,287); +INSERT INTO product_slots VALUES(67,39); +INSERT INTO product_slots VALUES(67,41); +INSERT INTO product_slots VALUES(67,43); +INSERT INTO product_slots VALUES(67,44); +INSERT INTO product_slots VALUES(67,45); +INSERT INTO product_slots VALUES(67,46); +INSERT INTO product_slots VALUES(67,47); +INSERT INTO product_slots VALUES(67,48); +INSERT INTO product_slots VALUES(67,49); +INSERT INTO product_slots VALUES(67,50); +INSERT INTO product_slots VALUES(67,51); +INSERT INTO product_slots VALUES(67,52); +INSERT INTO product_slots VALUES(67,53); +INSERT INTO product_slots VALUES(67,54); +INSERT INTO product_slots VALUES(67,55); +INSERT INTO product_slots VALUES(67,56); +INSERT INTO product_slots VALUES(67,57); +INSERT INTO product_slots VALUES(67,58); +INSERT INTO product_slots VALUES(67,59); +INSERT INTO product_slots VALUES(67,60); +INSERT INTO product_slots VALUES(67,61); +INSERT INTO product_slots VALUES(67,62); +INSERT INTO product_slots VALUES(67,63); +INSERT INTO product_slots VALUES(67,64); +INSERT INTO product_slots VALUES(67,65); +INSERT INTO product_slots VALUES(67,66); +INSERT INTO product_slots VALUES(67,67); +INSERT INTO product_slots VALUES(67,68); +INSERT INTO product_slots VALUES(67,69); +INSERT INTO product_slots VALUES(67,70); +INSERT INTO product_slots VALUES(67,71); +INSERT INTO product_slots VALUES(67,72); +INSERT INTO product_slots VALUES(67,73); +INSERT INTO product_slots VALUES(67,74); +INSERT INTO product_slots VALUES(67,75); +INSERT INTO product_slots VALUES(67,76); +INSERT INTO product_slots VALUES(67,77); +INSERT INTO product_slots VALUES(67,78); +INSERT INTO product_slots VALUES(67,79); +INSERT INTO product_slots VALUES(67,80); +INSERT INTO product_slots VALUES(67,81); +INSERT INTO product_slots VALUES(67,82); +INSERT INTO product_slots VALUES(67,83); +INSERT INTO product_slots VALUES(67,84); +INSERT INTO product_slots VALUES(67,85); +INSERT INTO product_slots VALUES(67,86); +INSERT INTO product_slots VALUES(67,87); +INSERT INTO product_slots VALUES(67,88); +INSERT INTO product_slots VALUES(67,89); +INSERT INTO product_slots VALUES(67,90); +INSERT INTO product_slots VALUES(67,91); +INSERT INTO product_slots VALUES(67,92); +INSERT INTO product_slots VALUES(67,93); +INSERT INTO product_slots VALUES(67,94); +INSERT INTO product_slots VALUES(67,95); +INSERT INTO product_slots VALUES(67,96); +INSERT INTO product_slots VALUES(67,97); +INSERT INTO product_slots VALUES(67,98); +INSERT INTO product_slots VALUES(67,99); +INSERT INTO product_slots VALUES(67,100); +INSERT INTO product_slots VALUES(67,101); +INSERT INTO product_slots VALUES(67,102); +INSERT INTO product_slots VALUES(67,103); +INSERT INTO product_slots VALUES(67,104); +INSERT INTO product_slots VALUES(67,105); +INSERT INTO product_slots VALUES(67,106); +INSERT INTO product_slots VALUES(67,107); +INSERT INTO product_slots VALUES(67,108); +INSERT INTO product_slots VALUES(67,109); +INSERT INTO product_slots VALUES(67,110); +INSERT INTO product_slots VALUES(67,111); +INSERT INTO product_slots VALUES(67,112); +INSERT INTO product_slots VALUES(67,113); +INSERT INTO product_slots VALUES(67,114); +INSERT INTO product_slots VALUES(67,115); +INSERT INTO product_slots VALUES(67,116); +INSERT INTO product_slots VALUES(67,117); +INSERT INTO product_slots VALUES(67,118); +INSERT INTO product_slots VALUES(67,119); +INSERT INTO product_slots VALUES(67,120); +INSERT INTO product_slots VALUES(67,121); +INSERT INTO product_slots VALUES(67,122); +INSERT INTO product_slots VALUES(67,123); +INSERT INTO product_slots VALUES(67,124); +INSERT INTO product_slots VALUES(67,125); +INSERT INTO product_slots VALUES(67,126); +INSERT INTO product_slots VALUES(67,127); +INSERT INTO product_slots VALUES(67,128); +INSERT INTO product_slots VALUES(67,129); +INSERT INTO product_slots VALUES(67,130); +INSERT INTO product_slots VALUES(67,131); +INSERT INTO product_slots VALUES(67,132); +INSERT INTO product_slots VALUES(67,133); +INSERT INTO product_slots VALUES(67,134); +INSERT INTO product_slots VALUES(67,135); +INSERT INTO product_slots VALUES(67,136); +INSERT INTO product_slots VALUES(67,137); +INSERT INTO product_slots VALUES(67,138); +INSERT INTO product_slots VALUES(67,139); +INSERT INTO product_slots VALUES(67,140); +INSERT INTO product_slots VALUES(67,141); +INSERT INTO product_slots VALUES(67,142); +INSERT INTO product_slots VALUES(67,143); +INSERT INTO product_slots VALUES(67,144); +INSERT INTO product_slots VALUES(67,145); +INSERT INTO product_slots VALUES(67,146); +INSERT INTO product_slots VALUES(67,147); +INSERT INTO product_slots VALUES(67,148); +INSERT INTO product_slots VALUES(67,149); +INSERT INTO product_slots VALUES(67,150); +INSERT INTO product_slots VALUES(67,151); +INSERT INTO product_slots VALUES(67,152); +INSERT INTO product_slots VALUES(67,153); +INSERT INTO product_slots VALUES(67,154); +INSERT INTO product_slots VALUES(67,155); +INSERT INTO product_slots VALUES(67,156); +INSERT INTO product_slots VALUES(67,157); +INSERT INTO product_slots VALUES(67,158); +INSERT INTO product_slots VALUES(67,159); +INSERT INTO product_slots VALUES(67,160); +INSERT INTO product_slots VALUES(67,161); +INSERT INTO product_slots VALUES(67,162); +INSERT INTO product_slots VALUES(67,163); +INSERT INTO product_slots VALUES(67,164); +INSERT INTO product_slots VALUES(67,165); +INSERT INTO product_slots VALUES(67,166); +INSERT INTO product_slots VALUES(67,167); +INSERT INTO product_slots VALUES(67,168); +INSERT INTO product_slots VALUES(67,169); +INSERT INTO product_slots VALUES(67,170); +INSERT INTO product_slots VALUES(67,171); +INSERT INTO product_slots VALUES(67,172); +INSERT INTO product_slots VALUES(67,173); +INSERT INTO product_slots VALUES(67,174); +INSERT INTO product_slots VALUES(67,175); +INSERT INTO product_slots VALUES(67,176); +INSERT INTO product_slots VALUES(67,177); +INSERT INTO product_slots VALUES(67,178); +INSERT INTO product_slots VALUES(67,179); +INSERT INTO product_slots VALUES(67,180); +INSERT INTO product_slots VALUES(67,181); +INSERT INTO product_slots VALUES(67,182); +INSERT INTO product_slots VALUES(67,183); +INSERT INTO product_slots VALUES(67,184); +INSERT INTO product_slots VALUES(67,185); +INSERT INTO product_slots VALUES(67,186); +INSERT INTO product_slots VALUES(67,187); +INSERT INTO product_slots VALUES(67,188); +INSERT INTO product_slots VALUES(67,189); +INSERT INTO product_slots VALUES(67,190); +INSERT INTO product_slots VALUES(67,191); +INSERT INTO product_slots VALUES(67,192); +INSERT INTO product_slots VALUES(67,193); +INSERT INTO product_slots VALUES(67,194); +INSERT INTO product_slots VALUES(67,195); +INSERT INTO product_slots VALUES(67,196); +INSERT INTO product_slots VALUES(67,197); +INSERT INTO product_slots VALUES(67,198); +INSERT INTO product_slots VALUES(67,199); +INSERT INTO product_slots VALUES(67,200); +INSERT INTO product_slots VALUES(67,201); +INSERT INTO product_slots VALUES(67,202); +INSERT INTO product_slots VALUES(67,203); +INSERT INTO product_slots VALUES(67,204); +INSERT INTO product_slots VALUES(67,205); +INSERT INTO product_slots VALUES(67,206); +INSERT INTO product_slots VALUES(67,207); +INSERT INTO product_slots VALUES(67,208); +INSERT INTO product_slots VALUES(67,209); +INSERT INTO product_slots VALUES(67,210); +INSERT INTO product_slots VALUES(67,211); +INSERT INTO product_slots VALUES(67,212); +INSERT INTO product_slots VALUES(67,213); +INSERT INTO product_slots VALUES(67,214); +INSERT INTO product_slots VALUES(67,215); +INSERT INTO product_slots VALUES(67,216); +INSERT INTO product_slots VALUES(67,217); +INSERT INTO product_slots VALUES(67,218); +INSERT INTO product_slots VALUES(67,219); +INSERT INTO product_slots VALUES(67,220); +INSERT INTO product_slots VALUES(67,221); +INSERT INTO product_slots VALUES(67,222); +INSERT INTO product_slots VALUES(67,223); +INSERT INTO product_slots VALUES(67,224); +INSERT INTO product_slots VALUES(67,225); +INSERT INTO product_slots VALUES(67,226); +INSERT INTO product_slots VALUES(67,227); +INSERT INTO product_slots VALUES(67,228); +INSERT INTO product_slots VALUES(67,229); +INSERT INTO product_slots VALUES(67,230); +INSERT INTO product_slots VALUES(67,231); +INSERT INTO product_slots VALUES(67,232); +INSERT INTO product_slots VALUES(67,233); +INSERT INTO product_slots VALUES(67,234); +INSERT INTO product_slots VALUES(67,235); +INSERT INTO product_slots VALUES(67,236); +INSERT INTO product_slots VALUES(67,237); +INSERT INTO product_slots VALUES(67,238); +INSERT INTO product_slots VALUES(67,239); +INSERT INTO product_slots VALUES(67,240); +INSERT INTO product_slots VALUES(67,241); +INSERT INTO product_slots VALUES(67,242); +INSERT INTO product_slots VALUES(67,243); +INSERT INTO product_slots VALUES(67,244); +INSERT INTO product_slots VALUES(67,274); +INSERT INTO product_slots VALUES(67,275); +INSERT INTO product_slots VALUES(67,279); +INSERT INTO product_slots VALUES(67,280); +INSERT INTO product_slots VALUES(67,281); +INSERT INTO product_slots VALUES(67,282); +INSERT INTO product_slots VALUES(67,283); +INSERT INTO product_slots VALUES(67,284); +INSERT INTO product_slots VALUES(67,285); +INSERT INTO product_slots VALUES(67,286); +INSERT INTO product_slots VALUES(67,287); +INSERT INTO product_slots VALUES(68,39); +INSERT INTO product_slots VALUES(68,41); +INSERT INTO product_slots VALUES(68,43); +INSERT INTO product_slots VALUES(68,44); +INSERT INTO product_slots VALUES(68,45); +INSERT INTO product_slots VALUES(68,46); +INSERT INTO product_slots VALUES(68,47); +INSERT INTO product_slots VALUES(68,48); +INSERT INTO product_slots VALUES(68,49); +INSERT INTO product_slots VALUES(68,50); +INSERT INTO product_slots VALUES(68,51); +INSERT INTO product_slots VALUES(68,52); +INSERT INTO product_slots VALUES(68,53); +INSERT INTO product_slots VALUES(68,54); +INSERT INTO product_slots VALUES(68,55); +INSERT INTO product_slots VALUES(68,56); +INSERT INTO product_slots VALUES(68,57); +INSERT INTO product_slots VALUES(68,58); +INSERT INTO product_slots VALUES(68,59); +INSERT INTO product_slots VALUES(68,60); +INSERT INTO product_slots VALUES(68,61); +INSERT INTO product_slots VALUES(68,62); +INSERT INTO product_slots VALUES(68,63); +INSERT INTO product_slots VALUES(68,64); +INSERT INTO product_slots VALUES(68,65); +INSERT INTO product_slots VALUES(68,66); +INSERT INTO product_slots VALUES(68,67); +INSERT INTO product_slots VALUES(68,68); +INSERT INTO product_slots VALUES(68,69); +INSERT INTO product_slots VALUES(68,70); +INSERT INTO product_slots VALUES(68,71); +INSERT INTO product_slots VALUES(68,72); +INSERT INTO product_slots VALUES(68,73); +INSERT INTO product_slots VALUES(68,74); +INSERT INTO product_slots VALUES(68,75); +INSERT INTO product_slots VALUES(68,76); +INSERT INTO product_slots VALUES(68,77); +INSERT INTO product_slots VALUES(68,78); +INSERT INTO product_slots VALUES(68,79); +INSERT INTO product_slots VALUES(68,80); +INSERT INTO product_slots VALUES(68,81); +INSERT INTO product_slots VALUES(68,82); +INSERT INTO product_slots VALUES(68,83); +INSERT INTO product_slots VALUES(68,84); +INSERT INTO product_slots VALUES(68,85); +INSERT INTO product_slots VALUES(68,86); +INSERT INTO product_slots VALUES(68,87); +INSERT INTO product_slots VALUES(68,88); +INSERT INTO product_slots VALUES(68,89); +INSERT INTO product_slots VALUES(68,90); +INSERT INTO product_slots VALUES(68,91); +INSERT INTO product_slots VALUES(68,92); +INSERT INTO product_slots VALUES(68,93); +INSERT INTO product_slots VALUES(68,94); +INSERT INTO product_slots VALUES(68,95); +INSERT INTO product_slots VALUES(68,96); +INSERT INTO product_slots VALUES(68,97); +INSERT INTO product_slots VALUES(68,98); +INSERT INTO product_slots VALUES(68,99); +INSERT INTO product_slots VALUES(68,100); +INSERT INTO product_slots VALUES(68,101); +INSERT INTO product_slots VALUES(68,102); +INSERT INTO product_slots VALUES(68,103); +INSERT INTO product_slots VALUES(68,104); +INSERT INTO product_slots VALUES(68,105); +INSERT INTO product_slots VALUES(68,106); +INSERT INTO product_slots VALUES(68,107); +INSERT INTO product_slots VALUES(68,108); +INSERT INTO product_slots VALUES(68,109); +INSERT INTO product_slots VALUES(68,110); +INSERT INTO product_slots VALUES(68,111); +INSERT INTO product_slots VALUES(68,112); +INSERT INTO product_slots VALUES(68,113); +INSERT INTO product_slots VALUES(68,114); +INSERT INTO product_slots VALUES(68,115); +INSERT INTO product_slots VALUES(68,116); +INSERT INTO product_slots VALUES(68,117); +INSERT INTO product_slots VALUES(68,118); +INSERT INTO product_slots VALUES(68,119); +INSERT INTO product_slots VALUES(68,120); +INSERT INTO product_slots VALUES(68,121); +INSERT INTO product_slots VALUES(68,122); +INSERT INTO product_slots VALUES(68,123); +INSERT INTO product_slots VALUES(68,124); +INSERT INTO product_slots VALUES(68,125); +INSERT INTO product_slots VALUES(68,126); +INSERT INTO product_slots VALUES(68,127); +INSERT INTO product_slots VALUES(68,128); +INSERT INTO product_slots VALUES(68,129); +INSERT INTO product_slots VALUES(68,130); +INSERT INTO product_slots VALUES(68,131); +INSERT INTO product_slots VALUES(68,132); +INSERT INTO product_slots VALUES(68,133); +INSERT INTO product_slots VALUES(68,134); +INSERT INTO product_slots VALUES(68,135); +INSERT INTO product_slots VALUES(68,136); +INSERT INTO product_slots VALUES(68,137); +INSERT INTO product_slots VALUES(68,138); +INSERT INTO product_slots VALUES(68,139); +INSERT INTO product_slots VALUES(68,140); +INSERT INTO product_slots VALUES(68,141); +INSERT INTO product_slots VALUES(68,142); +INSERT INTO product_slots VALUES(68,143); +INSERT INTO product_slots VALUES(68,144); +INSERT INTO product_slots VALUES(68,145); +INSERT INTO product_slots VALUES(68,146); +INSERT INTO product_slots VALUES(68,147); +INSERT INTO product_slots VALUES(68,148); +INSERT INTO product_slots VALUES(68,149); +INSERT INTO product_slots VALUES(68,150); +INSERT INTO product_slots VALUES(68,151); +INSERT INTO product_slots VALUES(68,152); +INSERT INTO product_slots VALUES(68,153); +INSERT INTO product_slots VALUES(68,154); +INSERT INTO product_slots VALUES(68,155); +INSERT INTO product_slots VALUES(68,156); +INSERT INTO product_slots VALUES(68,157); +INSERT INTO product_slots VALUES(68,158); +INSERT INTO product_slots VALUES(68,159); +INSERT INTO product_slots VALUES(68,160); +INSERT INTO product_slots VALUES(68,161); +INSERT INTO product_slots VALUES(68,162); +INSERT INTO product_slots VALUES(68,163); +INSERT INTO product_slots VALUES(68,164); +INSERT INTO product_slots VALUES(68,165); +INSERT INTO product_slots VALUES(68,166); +INSERT INTO product_slots VALUES(68,167); +INSERT INTO product_slots VALUES(68,168); +INSERT INTO product_slots VALUES(68,169); +INSERT INTO product_slots VALUES(68,170); +INSERT INTO product_slots VALUES(68,171); +INSERT INTO product_slots VALUES(68,172); +INSERT INTO product_slots VALUES(68,173); +INSERT INTO product_slots VALUES(68,174); +INSERT INTO product_slots VALUES(68,175); +INSERT INTO product_slots VALUES(68,176); +INSERT INTO product_slots VALUES(68,177); +INSERT INTO product_slots VALUES(68,178); +INSERT INTO product_slots VALUES(68,179); +INSERT INTO product_slots VALUES(68,180); +INSERT INTO product_slots VALUES(68,181); +INSERT INTO product_slots VALUES(68,182); +INSERT INTO product_slots VALUES(68,183); +INSERT INTO product_slots VALUES(68,184); +INSERT INTO product_slots VALUES(68,185); +INSERT INTO product_slots VALUES(68,186); +INSERT INTO product_slots VALUES(68,187); +INSERT INTO product_slots VALUES(68,188); +INSERT INTO product_slots VALUES(68,189); +INSERT INTO product_slots VALUES(68,190); +INSERT INTO product_slots VALUES(68,191); +INSERT INTO product_slots VALUES(68,192); +INSERT INTO product_slots VALUES(68,193); +INSERT INTO product_slots VALUES(68,194); +INSERT INTO product_slots VALUES(68,195); +INSERT INTO product_slots VALUES(68,196); +INSERT INTO product_slots VALUES(68,197); +INSERT INTO product_slots VALUES(68,198); +INSERT INTO product_slots VALUES(68,199); +INSERT INTO product_slots VALUES(68,200); +INSERT INTO product_slots VALUES(68,201); +INSERT INTO product_slots VALUES(68,202); +INSERT INTO product_slots VALUES(68,203); +INSERT INTO product_slots VALUES(68,204); +INSERT INTO product_slots VALUES(68,205); +INSERT INTO product_slots VALUES(68,206); +INSERT INTO product_slots VALUES(68,207); +INSERT INTO product_slots VALUES(68,208); +INSERT INTO product_slots VALUES(68,209); +INSERT INTO product_slots VALUES(68,210); +INSERT INTO product_slots VALUES(68,211); +INSERT INTO product_slots VALUES(68,212); +INSERT INTO product_slots VALUES(68,213); +INSERT INTO product_slots VALUES(68,214); +INSERT INTO product_slots VALUES(68,215); +INSERT INTO product_slots VALUES(68,216); +INSERT INTO product_slots VALUES(68,217); +INSERT INTO product_slots VALUES(68,218); +INSERT INTO product_slots VALUES(68,219); +INSERT INTO product_slots VALUES(68,220); +INSERT INTO product_slots VALUES(68,221); +INSERT INTO product_slots VALUES(68,222); +INSERT INTO product_slots VALUES(68,223); +INSERT INTO product_slots VALUES(68,224); +INSERT INTO product_slots VALUES(68,225); +INSERT INTO product_slots VALUES(68,226); +INSERT INTO product_slots VALUES(68,227); +INSERT INTO product_slots VALUES(68,228); +INSERT INTO product_slots VALUES(68,229); +INSERT INTO product_slots VALUES(68,230); +INSERT INTO product_slots VALUES(68,231); +INSERT INTO product_slots VALUES(68,232); +INSERT INTO product_slots VALUES(68,233); +INSERT INTO product_slots VALUES(68,234); +INSERT INTO product_slots VALUES(68,235); +INSERT INTO product_slots VALUES(68,236); +INSERT INTO product_slots VALUES(68,237); +INSERT INTO product_slots VALUES(68,238); +INSERT INTO product_slots VALUES(68,239); +INSERT INTO product_slots VALUES(68,240); +INSERT INTO product_slots VALUES(68,241); +INSERT INTO product_slots VALUES(68,242); +INSERT INTO product_slots VALUES(68,243); +INSERT INTO product_slots VALUES(68,244); +INSERT INTO product_slots VALUES(68,274); +INSERT INTO product_slots VALUES(68,275); +INSERT INTO product_slots VALUES(68,279); +INSERT INTO product_slots VALUES(68,280); +INSERT INTO product_slots VALUES(68,281); +INSERT INTO product_slots VALUES(68,282); +INSERT INTO product_slots VALUES(68,283); +INSERT INTO product_slots VALUES(68,284); +INSERT INTO product_slots VALUES(68,285); +INSERT INTO product_slots VALUES(68,286); +INSERT INTO product_slots VALUES(68,287); +INSERT INTO product_slots VALUES(69,39); +INSERT INTO product_slots VALUES(69,41); +INSERT INTO product_slots VALUES(69,43); +INSERT INTO product_slots VALUES(69,44); +INSERT INTO product_slots VALUES(69,45); +INSERT INTO product_slots VALUES(69,46); +INSERT INTO product_slots VALUES(69,47); +INSERT INTO product_slots VALUES(69,48); +INSERT INTO product_slots VALUES(69,49); +INSERT INTO product_slots VALUES(69,50); +INSERT INTO product_slots VALUES(69,51); +INSERT INTO product_slots VALUES(69,52); +INSERT INTO product_slots VALUES(69,53); +INSERT INTO product_slots VALUES(69,54); +INSERT INTO product_slots VALUES(69,55); +INSERT INTO product_slots VALUES(69,56); +INSERT INTO product_slots VALUES(69,57); +INSERT INTO product_slots VALUES(69,58); +INSERT INTO product_slots VALUES(69,59); +INSERT INTO product_slots VALUES(69,60); +INSERT INTO product_slots VALUES(69,61); +INSERT INTO product_slots VALUES(69,62); +INSERT INTO product_slots VALUES(69,63); +INSERT INTO product_slots VALUES(69,64); +INSERT INTO product_slots VALUES(69,65); +INSERT INTO product_slots VALUES(69,66); +INSERT INTO product_slots VALUES(69,67); +INSERT INTO product_slots VALUES(69,68); +INSERT INTO product_slots VALUES(69,69); +INSERT INTO product_slots VALUES(69,70); +INSERT INTO product_slots VALUES(69,71); +INSERT INTO product_slots VALUES(69,72); +INSERT INTO product_slots VALUES(69,73); +INSERT INTO product_slots VALUES(69,74); +INSERT INTO product_slots VALUES(69,75); +INSERT INTO product_slots VALUES(69,76); +INSERT INTO product_slots VALUES(69,77); +INSERT INTO product_slots VALUES(69,78); +INSERT INTO product_slots VALUES(69,79); +INSERT INTO product_slots VALUES(69,80); +INSERT INTO product_slots VALUES(69,81); +INSERT INTO product_slots VALUES(69,82); +INSERT INTO product_slots VALUES(69,83); +INSERT INTO product_slots VALUES(69,84); +INSERT INTO product_slots VALUES(69,85); +INSERT INTO product_slots VALUES(69,86); +INSERT INTO product_slots VALUES(69,87); +INSERT INTO product_slots VALUES(69,88); +INSERT INTO product_slots VALUES(69,89); +INSERT INTO product_slots VALUES(69,90); +INSERT INTO product_slots VALUES(69,91); +INSERT INTO product_slots VALUES(69,92); +INSERT INTO product_slots VALUES(69,93); +INSERT INTO product_slots VALUES(69,94); +INSERT INTO product_slots VALUES(69,95); +INSERT INTO product_slots VALUES(69,96); +INSERT INTO product_slots VALUES(69,97); +INSERT INTO product_slots VALUES(69,98); +INSERT INTO product_slots VALUES(69,99); +INSERT INTO product_slots VALUES(69,100); +INSERT INTO product_slots VALUES(69,101); +INSERT INTO product_slots VALUES(69,102); +INSERT INTO product_slots VALUES(69,103); +INSERT INTO product_slots VALUES(69,104); +INSERT INTO product_slots VALUES(69,105); +INSERT INTO product_slots VALUES(69,106); +INSERT INTO product_slots VALUES(69,107); +INSERT INTO product_slots VALUES(69,108); +INSERT INTO product_slots VALUES(69,109); +INSERT INTO product_slots VALUES(69,110); +INSERT INTO product_slots VALUES(69,111); +INSERT INTO product_slots VALUES(69,112); +INSERT INTO product_slots VALUES(69,113); +INSERT INTO product_slots VALUES(69,114); +INSERT INTO product_slots VALUES(69,115); +INSERT INTO product_slots VALUES(69,116); +INSERT INTO product_slots VALUES(69,117); +INSERT INTO product_slots VALUES(69,118); +INSERT INTO product_slots VALUES(69,119); +INSERT INTO product_slots VALUES(69,120); +INSERT INTO product_slots VALUES(69,121); +INSERT INTO product_slots VALUES(69,122); +INSERT INTO product_slots VALUES(69,123); +INSERT INTO product_slots VALUES(69,124); +INSERT INTO product_slots VALUES(69,125); +INSERT INTO product_slots VALUES(69,126); +INSERT INTO product_slots VALUES(69,127); +INSERT INTO product_slots VALUES(69,128); +INSERT INTO product_slots VALUES(69,129); +INSERT INTO product_slots VALUES(69,130); +INSERT INTO product_slots VALUES(69,131); +INSERT INTO product_slots VALUES(69,132); +INSERT INTO product_slots VALUES(69,133); +INSERT INTO product_slots VALUES(69,134); +INSERT INTO product_slots VALUES(69,135); +INSERT INTO product_slots VALUES(69,136); +INSERT INTO product_slots VALUES(69,137); +INSERT INTO product_slots VALUES(69,138); +INSERT INTO product_slots VALUES(69,139); +INSERT INTO product_slots VALUES(69,140); +INSERT INTO product_slots VALUES(69,141); +INSERT INTO product_slots VALUES(69,142); +INSERT INTO product_slots VALUES(69,143); +INSERT INTO product_slots VALUES(69,144); +INSERT INTO product_slots VALUES(69,145); +INSERT INTO product_slots VALUES(69,146); +INSERT INTO product_slots VALUES(69,147); +INSERT INTO product_slots VALUES(69,148); +INSERT INTO product_slots VALUES(69,149); +INSERT INTO product_slots VALUES(69,150); +INSERT INTO product_slots VALUES(69,151); +INSERT INTO product_slots VALUES(69,152); +INSERT INTO product_slots VALUES(69,153); +INSERT INTO product_slots VALUES(69,154); +INSERT INTO product_slots VALUES(69,155); +INSERT INTO product_slots VALUES(69,156); +INSERT INTO product_slots VALUES(69,157); +INSERT INTO product_slots VALUES(69,158); +INSERT INTO product_slots VALUES(69,159); +INSERT INTO product_slots VALUES(69,160); +INSERT INTO product_slots VALUES(69,161); +INSERT INTO product_slots VALUES(69,162); +INSERT INTO product_slots VALUES(69,163); +INSERT INTO product_slots VALUES(69,164); +INSERT INTO product_slots VALUES(69,165); +INSERT INTO product_slots VALUES(69,166); +INSERT INTO product_slots VALUES(69,167); +INSERT INTO product_slots VALUES(69,168); +INSERT INTO product_slots VALUES(69,169); +INSERT INTO product_slots VALUES(69,170); +INSERT INTO product_slots VALUES(69,171); +INSERT INTO product_slots VALUES(69,172); +INSERT INTO product_slots VALUES(69,173); +INSERT INTO product_slots VALUES(69,174); +INSERT INTO product_slots VALUES(69,175); +INSERT INTO product_slots VALUES(69,176); +INSERT INTO product_slots VALUES(69,177); +INSERT INTO product_slots VALUES(69,178); +INSERT INTO product_slots VALUES(69,179); +INSERT INTO product_slots VALUES(69,180); +INSERT INTO product_slots VALUES(69,181); +INSERT INTO product_slots VALUES(69,182); +INSERT INTO product_slots VALUES(69,183); +INSERT INTO product_slots VALUES(69,184); +INSERT INTO product_slots VALUES(69,185); +INSERT INTO product_slots VALUES(69,186); +INSERT INTO product_slots VALUES(69,187); +INSERT INTO product_slots VALUES(69,188); +INSERT INTO product_slots VALUES(69,189); +INSERT INTO product_slots VALUES(69,190); +INSERT INTO product_slots VALUES(69,191); +INSERT INTO product_slots VALUES(69,192); +INSERT INTO product_slots VALUES(69,193); +INSERT INTO product_slots VALUES(69,194); +INSERT INTO product_slots VALUES(69,195); +INSERT INTO product_slots VALUES(69,196); +INSERT INTO product_slots VALUES(69,197); +INSERT INTO product_slots VALUES(69,198); +INSERT INTO product_slots VALUES(69,199); +INSERT INTO product_slots VALUES(69,200); +INSERT INTO product_slots VALUES(69,201); +INSERT INTO product_slots VALUES(69,202); +INSERT INTO product_slots VALUES(69,203); +INSERT INTO product_slots VALUES(69,204); +INSERT INTO product_slots VALUES(69,205); +INSERT INTO product_slots VALUES(69,206); +INSERT INTO product_slots VALUES(69,207); +INSERT INTO product_slots VALUES(69,208); +INSERT INTO product_slots VALUES(69,209); +INSERT INTO product_slots VALUES(69,210); +INSERT INTO product_slots VALUES(69,211); +INSERT INTO product_slots VALUES(69,212); +INSERT INTO product_slots VALUES(69,213); +INSERT INTO product_slots VALUES(69,214); +INSERT INTO product_slots VALUES(69,215); +INSERT INTO product_slots VALUES(69,216); +INSERT INTO product_slots VALUES(69,217); +INSERT INTO product_slots VALUES(69,218); +INSERT INTO product_slots VALUES(69,219); +INSERT INTO product_slots VALUES(69,220); +INSERT INTO product_slots VALUES(69,221); +INSERT INTO product_slots VALUES(69,222); +INSERT INTO product_slots VALUES(69,223); +INSERT INTO product_slots VALUES(69,224); +INSERT INTO product_slots VALUES(69,225); +INSERT INTO product_slots VALUES(69,226); +INSERT INTO product_slots VALUES(69,227); +INSERT INTO product_slots VALUES(69,228); +INSERT INTO product_slots VALUES(69,229); +INSERT INTO product_slots VALUES(69,230); +INSERT INTO product_slots VALUES(69,231); +INSERT INTO product_slots VALUES(69,232); +INSERT INTO product_slots VALUES(69,233); +INSERT INTO product_slots VALUES(69,234); +INSERT INTO product_slots VALUES(69,235); +INSERT INTO product_slots VALUES(69,236); +INSERT INTO product_slots VALUES(69,237); +INSERT INTO product_slots VALUES(69,238); +INSERT INTO product_slots VALUES(69,239); +INSERT INTO product_slots VALUES(69,240); +INSERT INTO product_slots VALUES(69,241); +INSERT INTO product_slots VALUES(69,242); +INSERT INTO product_slots VALUES(69,243); +INSERT INTO product_slots VALUES(69,244); +INSERT INTO product_slots VALUES(69,274); +INSERT INTO product_slots VALUES(69,275); +INSERT INTO product_slots VALUES(69,279); +INSERT INTO product_slots VALUES(69,280); +INSERT INTO product_slots VALUES(69,281); +INSERT INTO product_slots VALUES(69,282); +INSERT INTO product_slots VALUES(69,283); +INSERT INTO product_slots VALUES(69,284); +INSERT INTO product_slots VALUES(69,285); +INSERT INTO product_slots VALUES(69,286); +INSERT INTO product_slots VALUES(69,287); +INSERT INTO product_slots VALUES(70,39); +INSERT INTO product_slots VALUES(70,44); +INSERT INTO product_slots VALUES(70,46); +INSERT INTO product_slots VALUES(70,47); +INSERT INTO product_slots VALUES(70,48); +INSERT INTO product_slots VALUES(70,49); +INSERT INTO product_slots VALUES(70,50); +INSERT INTO product_slots VALUES(70,51); +INSERT INTO product_slots VALUES(70,52); +INSERT INTO product_slots VALUES(70,53); +INSERT INTO product_slots VALUES(70,54); +INSERT INTO product_slots VALUES(70,55); +INSERT INTO product_slots VALUES(70,56); +INSERT INTO product_slots VALUES(70,57); +INSERT INTO product_slots VALUES(70,58); +INSERT INTO product_slots VALUES(70,59); +INSERT INTO product_slots VALUES(70,60); +INSERT INTO product_slots VALUES(70,61); +INSERT INTO product_slots VALUES(70,62); +INSERT INTO product_slots VALUES(70,63); +INSERT INTO product_slots VALUES(70,64); +INSERT INTO product_slots VALUES(70,65); +INSERT INTO product_slots VALUES(70,66); +INSERT INTO product_slots VALUES(70,67); +INSERT INTO product_slots VALUES(70,68); +INSERT INTO product_slots VALUES(70,69); +INSERT INTO product_slots VALUES(70,70); +INSERT INTO product_slots VALUES(70,71); +INSERT INTO product_slots VALUES(70,72); +INSERT INTO product_slots VALUES(70,73); +INSERT INTO product_slots VALUES(70,74); +INSERT INTO product_slots VALUES(70,75); +INSERT INTO product_slots VALUES(70,76); +INSERT INTO product_slots VALUES(70,77); +INSERT INTO product_slots VALUES(70,78); +INSERT INTO product_slots VALUES(70,79); +INSERT INTO product_slots VALUES(70,80); +INSERT INTO product_slots VALUES(70,81); +INSERT INTO product_slots VALUES(70,82); +INSERT INTO product_slots VALUES(70,83); +INSERT INTO product_slots VALUES(70,84); +INSERT INTO product_slots VALUES(70,85); +INSERT INTO product_slots VALUES(70,86); +INSERT INTO product_slots VALUES(70,87); +INSERT INTO product_slots VALUES(70,88); +INSERT INTO product_slots VALUES(70,89); +INSERT INTO product_slots VALUES(70,90); +INSERT INTO product_slots VALUES(70,91); +INSERT INTO product_slots VALUES(70,92); +INSERT INTO product_slots VALUES(70,93); +INSERT INTO product_slots VALUES(70,94); +INSERT INTO product_slots VALUES(70,95); +INSERT INTO product_slots VALUES(70,96); +INSERT INTO product_slots VALUES(70,97); +INSERT INTO product_slots VALUES(70,98); +INSERT INTO product_slots VALUES(70,99); +INSERT INTO product_slots VALUES(70,100); +INSERT INTO product_slots VALUES(70,101); +INSERT INTO product_slots VALUES(70,102); +INSERT INTO product_slots VALUES(70,103); +INSERT INTO product_slots VALUES(70,104); +INSERT INTO product_slots VALUES(70,105); +INSERT INTO product_slots VALUES(70,106); +INSERT INTO product_slots VALUES(70,107); +INSERT INTO product_slots VALUES(70,108); +INSERT INTO product_slots VALUES(70,109); +INSERT INTO product_slots VALUES(70,110); +INSERT INTO product_slots VALUES(70,111); +INSERT INTO product_slots VALUES(70,112); +INSERT INTO product_slots VALUES(70,113); +INSERT INTO product_slots VALUES(70,114); +INSERT INTO product_slots VALUES(70,115); +INSERT INTO product_slots VALUES(70,116); +INSERT INTO product_slots VALUES(70,117); +INSERT INTO product_slots VALUES(70,118); +INSERT INTO product_slots VALUES(70,119); +INSERT INTO product_slots VALUES(70,120); +INSERT INTO product_slots VALUES(70,121); +INSERT INTO product_slots VALUES(70,122); +INSERT INTO product_slots VALUES(70,123); +INSERT INTO product_slots VALUES(70,124); +INSERT INTO product_slots VALUES(70,125); +INSERT INTO product_slots VALUES(70,126); +INSERT INTO product_slots VALUES(70,127); +INSERT INTO product_slots VALUES(70,128); +INSERT INTO product_slots VALUES(70,129); +INSERT INTO product_slots VALUES(70,130); +INSERT INTO product_slots VALUES(70,131); +INSERT INTO product_slots VALUES(70,132); +INSERT INTO product_slots VALUES(70,133); +INSERT INTO product_slots VALUES(70,134); +INSERT INTO product_slots VALUES(70,135); +INSERT INTO product_slots VALUES(70,136); +INSERT INTO product_slots VALUES(70,137); +INSERT INTO product_slots VALUES(70,138); +INSERT INTO product_slots VALUES(70,139); +INSERT INTO product_slots VALUES(70,140); +INSERT INTO product_slots VALUES(70,141); +INSERT INTO product_slots VALUES(70,142); +INSERT INTO product_slots VALUES(70,143); +INSERT INTO product_slots VALUES(70,144); +INSERT INTO product_slots VALUES(70,145); +INSERT INTO product_slots VALUES(70,146); +INSERT INTO product_slots VALUES(70,147); +INSERT INTO product_slots VALUES(70,148); +INSERT INTO product_slots VALUES(70,149); +INSERT INTO product_slots VALUES(70,150); +INSERT INTO product_slots VALUES(70,151); +INSERT INTO product_slots VALUES(70,152); +INSERT INTO product_slots VALUES(70,153); +INSERT INTO product_slots VALUES(70,154); +INSERT INTO product_slots VALUES(70,155); +INSERT INTO product_slots VALUES(70,156); +INSERT INTO product_slots VALUES(70,157); +INSERT INTO product_slots VALUES(70,158); +INSERT INTO product_slots VALUES(70,159); +INSERT INTO product_slots VALUES(70,160); +INSERT INTO product_slots VALUES(70,161); +INSERT INTO product_slots VALUES(70,162); +INSERT INTO product_slots VALUES(70,163); +INSERT INTO product_slots VALUES(70,164); +INSERT INTO product_slots VALUES(70,165); +INSERT INTO product_slots VALUES(70,166); +INSERT INTO product_slots VALUES(70,167); +INSERT INTO product_slots VALUES(70,168); +INSERT INTO product_slots VALUES(70,169); +INSERT INTO product_slots VALUES(70,170); +INSERT INTO product_slots VALUES(70,171); +INSERT INTO product_slots VALUES(70,172); +INSERT INTO product_slots VALUES(70,173); +INSERT INTO product_slots VALUES(70,174); +INSERT INTO product_slots VALUES(70,175); +INSERT INTO product_slots VALUES(70,176); +INSERT INTO product_slots VALUES(70,177); +INSERT INTO product_slots VALUES(70,178); +INSERT INTO product_slots VALUES(70,179); +INSERT INTO product_slots VALUES(70,180); +INSERT INTO product_slots VALUES(70,181); +INSERT INTO product_slots VALUES(70,182); +INSERT INTO product_slots VALUES(70,183); +INSERT INTO product_slots VALUES(70,184); +INSERT INTO product_slots VALUES(70,185); +INSERT INTO product_slots VALUES(70,186); +INSERT INTO product_slots VALUES(70,187); +INSERT INTO product_slots VALUES(70,188); +INSERT INTO product_slots VALUES(70,189); +INSERT INTO product_slots VALUES(70,190); +INSERT INTO product_slots VALUES(70,191); +INSERT INTO product_slots VALUES(70,192); +INSERT INTO product_slots VALUES(70,193); +INSERT INTO product_slots VALUES(70,194); +INSERT INTO product_slots VALUES(70,195); +INSERT INTO product_slots VALUES(70,196); +INSERT INTO product_slots VALUES(70,197); +INSERT INTO product_slots VALUES(70,198); +INSERT INTO product_slots VALUES(70,199); +INSERT INTO product_slots VALUES(70,200); +INSERT INTO product_slots VALUES(70,201); +INSERT INTO product_slots VALUES(70,202); +INSERT INTO product_slots VALUES(70,203); +INSERT INTO product_slots VALUES(70,204); +INSERT INTO product_slots VALUES(70,205); +INSERT INTO product_slots VALUES(70,206); +INSERT INTO product_slots VALUES(70,207); +INSERT INTO product_slots VALUES(70,208); +INSERT INTO product_slots VALUES(70,209); +INSERT INTO product_slots VALUES(70,210); +INSERT INTO product_slots VALUES(70,211); +INSERT INTO product_slots VALUES(70,212); +INSERT INTO product_slots VALUES(70,213); +INSERT INTO product_slots VALUES(70,214); +INSERT INTO product_slots VALUES(70,215); +INSERT INTO product_slots VALUES(70,216); +INSERT INTO product_slots VALUES(70,217); +INSERT INTO product_slots VALUES(70,218); +INSERT INTO product_slots VALUES(70,219); +INSERT INTO product_slots VALUES(70,220); +INSERT INTO product_slots VALUES(70,221); +INSERT INTO product_slots VALUES(70,222); +INSERT INTO product_slots VALUES(70,223); +INSERT INTO product_slots VALUES(70,224); +INSERT INTO product_slots VALUES(70,225); +INSERT INTO product_slots VALUES(70,226); +INSERT INTO product_slots VALUES(70,227); +INSERT INTO product_slots VALUES(70,228); +INSERT INTO product_slots VALUES(70,229); +INSERT INTO product_slots VALUES(70,230); +INSERT INTO product_slots VALUES(70,231); +INSERT INTO product_slots VALUES(70,232); +INSERT INTO product_slots VALUES(70,233); +INSERT INTO product_slots VALUES(70,234); +INSERT INTO product_slots VALUES(70,235); +INSERT INTO product_slots VALUES(70,236); +INSERT INTO product_slots VALUES(70,237); +INSERT INTO product_slots VALUES(70,238); +INSERT INTO product_slots VALUES(70,239); +INSERT INTO product_slots VALUES(70,240); +INSERT INTO product_slots VALUES(70,241); +INSERT INTO product_slots VALUES(70,242); +INSERT INTO product_slots VALUES(70,243); +INSERT INTO product_slots VALUES(70,244); +INSERT INTO product_slots VALUES(70,274); +INSERT INTO product_slots VALUES(70,275); +INSERT INTO product_slots VALUES(70,279); +INSERT INTO product_slots VALUES(70,280); +INSERT INTO product_slots VALUES(70,281); +INSERT INTO product_slots VALUES(70,282); +INSERT INTO product_slots VALUES(70,283); +INSERT INTO product_slots VALUES(70,284); +INSERT INTO product_slots VALUES(70,285); +INSERT INTO product_slots VALUES(70,286); +INSERT INTO product_slots VALUES(70,287); +INSERT INTO product_slots VALUES(71,39); +INSERT INTO product_slots VALUES(71,41); +INSERT INTO product_slots VALUES(71,43); +INSERT INTO product_slots VALUES(71,44); +INSERT INTO product_slots VALUES(71,45); +INSERT INTO product_slots VALUES(71,46); +INSERT INTO product_slots VALUES(71,47); +INSERT INTO product_slots VALUES(71,48); +INSERT INTO product_slots VALUES(71,49); +INSERT INTO product_slots VALUES(71,50); +INSERT INTO product_slots VALUES(71,51); +INSERT INTO product_slots VALUES(71,52); +INSERT INTO product_slots VALUES(71,53); +INSERT INTO product_slots VALUES(71,54); +INSERT INTO product_slots VALUES(71,55); +INSERT INTO product_slots VALUES(71,56); +INSERT INTO product_slots VALUES(71,57); +INSERT INTO product_slots VALUES(71,58); +INSERT INTO product_slots VALUES(71,59); +INSERT INTO product_slots VALUES(71,60); +INSERT INTO product_slots VALUES(71,61); +INSERT INTO product_slots VALUES(71,62); +INSERT INTO product_slots VALUES(71,63); +INSERT INTO product_slots VALUES(71,64); +INSERT INTO product_slots VALUES(71,65); +INSERT INTO product_slots VALUES(71,66); +INSERT INTO product_slots VALUES(71,67); +INSERT INTO product_slots VALUES(71,68); +INSERT INTO product_slots VALUES(71,69); +INSERT INTO product_slots VALUES(71,70); +INSERT INTO product_slots VALUES(71,71); +INSERT INTO product_slots VALUES(71,72); +INSERT INTO product_slots VALUES(71,73); +INSERT INTO product_slots VALUES(71,74); +INSERT INTO product_slots VALUES(71,75); +INSERT INTO product_slots VALUES(71,76); +INSERT INTO product_slots VALUES(71,77); +INSERT INTO product_slots VALUES(71,78); +INSERT INTO product_slots VALUES(71,79); +INSERT INTO product_slots VALUES(71,80); +INSERT INTO product_slots VALUES(71,81); +INSERT INTO product_slots VALUES(71,82); +INSERT INTO product_slots VALUES(71,83); +INSERT INTO product_slots VALUES(71,84); +INSERT INTO product_slots VALUES(71,85); +INSERT INTO product_slots VALUES(71,86); +INSERT INTO product_slots VALUES(71,87); +INSERT INTO product_slots VALUES(71,88); +INSERT INTO product_slots VALUES(71,89); +INSERT INTO product_slots VALUES(71,90); +INSERT INTO product_slots VALUES(71,91); +INSERT INTO product_slots VALUES(71,92); +INSERT INTO product_slots VALUES(71,93); +INSERT INTO product_slots VALUES(71,94); +INSERT INTO product_slots VALUES(71,95); +INSERT INTO product_slots VALUES(71,96); +INSERT INTO product_slots VALUES(71,97); +INSERT INTO product_slots VALUES(71,98); +INSERT INTO product_slots VALUES(71,99); +INSERT INTO product_slots VALUES(71,100); +INSERT INTO product_slots VALUES(71,101); +INSERT INTO product_slots VALUES(71,102); +INSERT INTO product_slots VALUES(71,103); +INSERT INTO product_slots VALUES(71,104); +INSERT INTO product_slots VALUES(71,105); +INSERT INTO product_slots VALUES(71,106); +INSERT INTO product_slots VALUES(71,107); +INSERT INTO product_slots VALUES(71,108); +INSERT INTO product_slots VALUES(71,109); +INSERT INTO product_slots VALUES(71,110); +INSERT INTO product_slots VALUES(71,111); +INSERT INTO product_slots VALUES(71,112); +INSERT INTO product_slots VALUES(71,113); +INSERT INTO product_slots VALUES(71,114); +INSERT INTO product_slots VALUES(71,115); +INSERT INTO product_slots VALUES(71,116); +INSERT INTO product_slots VALUES(71,117); +INSERT INTO product_slots VALUES(71,118); +INSERT INTO product_slots VALUES(71,119); +INSERT INTO product_slots VALUES(71,120); +INSERT INTO product_slots VALUES(71,121); +INSERT INTO product_slots VALUES(71,122); +INSERT INTO product_slots VALUES(71,123); +INSERT INTO product_slots VALUES(71,124); +INSERT INTO product_slots VALUES(71,125); +INSERT INTO product_slots VALUES(71,126); +INSERT INTO product_slots VALUES(71,127); +INSERT INTO product_slots VALUES(71,128); +INSERT INTO product_slots VALUES(71,129); +INSERT INTO product_slots VALUES(71,130); +INSERT INTO product_slots VALUES(71,131); +INSERT INTO product_slots VALUES(71,132); +INSERT INTO product_slots VALUES(71,133); +INSERT INTO product_slots VALUES(71,134); +INSERT INTO product_slots VALUES(71,135); +INSERT INTO product_slots VALUES(71,136); +INSERT INTO product_slots VALUES(71,137); +INSERT INTO product_slots VALUES(71,138); +INSERT INTO product_slots VALUES(71,139); +INSERT INTO product_slots VALUES(71,140); +INSERT INTO product_slots VALUES(71,141); +INSERT INTO product_slots VALUES(71,142); +INSERT INTO product_slots VALUES(71,143); +INSERT INTO product_slots VALUES(71,144); +INSERT INTO product_slots VALUES(71,145); +INSERT INTO product_slots VALUES(71,146); +INSERT INTO product_slots VALUES(71,147); +INSERT INTO product_slots VALUES(71,148); +INSERT INTO product_slots VALUES(71,149); +INSERT INTO product_slots VALUES(71,150); +INSERT INTO product_slots VALUES(71,151); +INSERT INTO product_slots VALUES(71,152); +INSERT INTO product_slots VALUES(71,153); +INSERT INTO product_slots VALUES(71,154); +INSERT INTO product_slots VALUES(71,155); +INSERT INTO product_slots VALUES(71,156); +INSERT INTO product_slots VALUES(71,157); +INSERT INTO product_slots VALUES(71,158); +INSERT INTO product_slots VALUES(71,159); +INSERT INTO product_slots VALUES(71,160); +INSERT INTO product_slots VALUES(71,161); +INSERT INTO product_slots VALUES(71,162); +INSERT INTO product_slots VALUES(71,163); +INSERT INTO product_slots VALUES(71,164); +INSERT INTO product_slots VALUES(71,165); +INSERT INTO product_slots VALUES(71,166); +INSERT INTO product_slots VALUES(71,167); +INSERT INTO product_slots VALUES(71,168); +INSERT INTO product_slots VALUES(71,169); +INSERT INTO product_slots VALUES(71,170); +INSERT INTO product_slots VALUES(71,171); +INSERT INTO product_slots VALUES(71,172); +INSERT INTO product_slots VALUES(71,173); +INSERT INTO product_slots VALUES(71,174); +INSERT INTO product_slots VALUES(71,175); +INSERT INTO product_slots VALUES(71,176); +INSERT INTO product_slots VALUES(71,177); +INSERT INTO product_slots VALUES(71,178); +INSERT INTO product_slots VALUES(71,179); +INSERT INTO product_slots VALUES(71,180); +INSERT INTO product_slots VALUES(71,181); +INSERT INTO product_slots VALUES(71,182); +INSERT INTO product_slots VALUES(71,183); +INSERT INTO product_slots VALUES(71,184); +INSERT INTO product_slots VALUES(71,185); +INSERT INTO product_slots VALUES(71,186); +INSERT INTO product_slots VALUES(71,187); +INSERT INTO product_slots VALUES(71,188); +INSERT INTO product_slots VALUES(71,189); +INSERT INTO product_slots VALUES(71,190); +INSERT INTO product_slots VALUES(71,191); +INSERT INTO product_slots VALUES(71,192); +INSERT INTO product_slots VALUES(71,193); +INSERT INTO product_slots VALUES(71,194); +INSERT INTO product_slots VALUES(71,195); +INSERT INTO product_slots VALUES(71,196); +INSERT INTO product_slots VALUES(71,197); +INSERT INTO product_slots VALUES(71,198); +INSERT INTO product_slots VALUES(71,199); +INSERT INTO product_slots VALUES(71,200); +INSERT INTO product_slots VALUES(71,201); +INSERT INTO product_slots VALUES(71,202); +INSERT INTO product_slots VALUES(71,203); +INSERT INTO product_slots VALUES(71,204); +INSERT INTO product_slots VALUES(71,205); +INSERT INTO product_slots VALUES(71,206); +INSERT INTO product_slots VALUES(71,207); +INSERT INTO product_slots VALUES(71,208); +INSERT INTO product_slots VALUES(71,209); +INSERT INTO product_slots VALUES(71,210); +INSERT INTO product_slots VALUES(71,211); +INSERT INTO product_slots VALUES(71,212); +INSERT INTO product_slots VALUES(71,213); +INSERT INTO product_slots VALUES(71,214); +INSERT INTO product_slots VALUES(71,215); +INSERT INTO product_slots VALUES(71,216); +INSERT INTO product_slots VALUES(71,217); +INSERT INTO product_slots VALUES(71,218); +INSERT INTO product_slots VALUES(71,219); +INSERT INTO product_slots VALUES(71,220); +INSERT INTO product_slots VALUES(71,221); +INSERT INTO product_slots VALUES(71,222); +INSERT INTO product_slots VALUES(71,223); +INSERT INTO product_slots VALUES(71,224); +INSERT INTO product_slots VALUES(71,225); +INSERT INTO product_slots VALUES(71,226); +INSERT INTO product_slots VALUES(71,227); +INSERT INTO product_slots VALUES(71,228); +INSERT INTO product_slots VALUES(71,229); +INSERT INTO product_slots VALUES(71,230); +INSERT INTO product_slots VALUES(71,231); +INSERT INTO product_slots VALUES(71,232); +INSERT INTO product_slots VALUES(71,233); +INSERT INTO product_slots VALUES(71,234); +INSERT INTO product_slots VALUES(71,235); +INSERT INTO product_slots VALUES(71,236); +INSERT INTO product_slots VALUES(71,237); +INSERT INTO product_slots VALUES(71,238); +INSERT INTO product_slots VALUES(71,239); +INSERT INTO product_slots VALUES(71,240); +INSERT INTO product_slots VALUES(71,241); +INSERT INTO product_slots VALUES(71,242); +INSERT INTO product_slots VALUES(71,243); +INSERT INTO product_slots VALUES(71,244); +INSERT INTO product_slots VALUES(71,274); +INSERT INTO product_slots VALUES(71,275); +INSERT INTO product_slots VALUES(71,279); +INSERT INTO product_slots VALUES(71,280); +INSERT INTO product_slots VALUES(71,281); +INSERT INTO product_slots VALUES(71,282); +INSERT INTO product_slots VALUES(71,283); +INSERT INTO product_slots VALUES(71,284); +INSERT INTO product_slots VALUES(71,285); +INSERT INTO product_slots VALUES(71,286); +INSERT INTO product_slots VALUES(71,287); +INSERT INTO product_slots VALUES(72,39); +INSERT INTO product_slots VALUES(72,41); +INSERT INTO product_slots VALUES(72,43); +INSERT INTO product_slots VALUES(72,44); +INSERT INTO product_slots VALUES(72,45); +INSERT INTO product_slots VALUES(72,46); +INSERT INTO product_slots VALUES(72,47); +INSERT INTO product_slots VALUES(72,48); +INSERT INTO product_slots VALUES(72,49); +INSERT INTO product_slots VALUES(72,50); +INSERT INTO product_slots VALUES(72,51); +INSERT INTO product_slots VALUES(72,52); +INSERT INTO product_slots VALUES(72,53); +INSERT INTO product_slots VALUES(72,54); +INSERT INTO product_slots VALUES(72,55); +INSERT INTO product_slots VALUES(72,56); +INSERT INTO product_slots VALUES(72,57); +INSERT INTO product_slots VALUES(72,58); +INSERT INTO product_slots VALUES(72,59); +INSERT INTO product_slots VALUES(72,60); +INSERT INTO product_slots VALUES(72,61); +INSERT INTO product_slots VALUES(72,62); +INSERT INTO product_slots VALUES(72,63); +INSERT INTO product_slots VALUES(72,64); +INSERT INTO product_slots VALUES(72,65); +INSERT INTO product_slots VALUES(72,66); +INSERT INTO product_slots VALUES(72,67); +INSERT INTO product_slots VALUES(72,68); +INSERT INTO product_slots VALUES(72,69); +INSERT INTO product_slots VALUES(72,70); +INSERT INTO product_slots VALUES(72,71); +INSERT INTO product_slots VALUES(72,72); +INSERT INTO product_slots VALUES(72,73); +INSERT INTO product_slots VALUES(72,74); +INSERT INTO product_slots VALUES(72,75); +INSERT INTO product_slots VALUES(72,76); +INSERT INTO product_slots VALUES(72,77); +INSERT INTO product_slots VALUES(72,78); +INSERT INTO product_slots VALUES(72,79); +INSERT INTO product_slots VALUES(72,80); +INSERT INTO product_slots VALUES(72,81); +INSERT INTO product_slots VALUES(72,82); +INSERT INTO product_slots VALUES(72,83); +INSERT INTO product_slots VALUES(72,84); +INSERT INTO product_slots VALUES(72,85); +INSERT INTO product_slots VALUES(72,86); +INSERT INTO product_slots VALUES(72,87); +INSERT INTO product_slots VALUES(72,88); +INSERT INTO product_slots VALUES(72,89); +INSERT INTO product_slots VALUES(72,90); +INSERT INTO product_slots VALUES(72,91); +INSERT INTO product_slots VALUES(72,92); +INSERT INTO product_slots VALUES(72,93); +INSERT INTO product_slots VALUES(72,94); +INSERT INTO product_slots VALUES(72,95); +INSERT INTO product_slots VALUES(72,96); +INSERT INTO product_slots VALUES(72,97); +INSERT INTO product_slots VALUES(72,98); +INSERT INTO product_slots VALUES(72,99); +INSERT INTO product_slots VALUES(72,100); +INSERT INTO product_slots VALUES(72,101); +INSERT INTO product_slots VALUES(72,102); +INSERT INTO product_slots VALUES(72,103); +INSERT INTO product_slots VALUES(72,104); +INSERT INTO product_slots VALUES(72,105); +INSERT INTO product_slots VALUES(72,106); +INSERT INTO product_slots VALUES(72,107); +INSERT INTO product_slots VALUES(72,108); +INSERT INTO product_slots VALUES(72,109); +INSERT INTO product_slots VALUES(72,110); +INSERT INTO product_slots VALUES(72,111); +INSERT INTO product_slots VALUES(72,112); +INSERT INTO product_slots VALUES(72,113); +INSERT INTO product_slots VALUES(72,114); +INSERT INTO product_slots VALUES(72,115); +INSERT INTO product_slots VALUES(72,116); +INSERT INTO product_slots VALUES(72,117); +INSERT INTO product_slots VALUES(72,118); +INSERT INTO product_slots VALUES(72,119); +INSERT INTO product_slots VALUES(72,120); +INSERT INTO product_slots VALUES(72,121); +INSERT INTO product_slots VALUES(72,122); +INSERT INTO product_slots VALUES(72,123); +INSERT INTO product_slots VALUES(72,124); +INSERT INTO product_slots VALUES(72,125); +INSERT INTO product_slots VALUES(72,126); +INSERT INTO product_slots VALUES(72,127); +INSERT INTO product_slots VALUES(72,128); +INSERT INTO product_slots VALUES(72,129); +INSERT INTO product_slots VALUES(72,130); +INSERT INTO product_slots VALUES(72,131); +INSERT INTO product_slots VALUES(72,132); +INSERT INTO product_slots VALUES(72,133); +INSERT INTO product_slots VALUES(72,134); +INSERT INTO product_slots VALUES(72,135); +INSERT INTO product_slots VALUES(72,136); +INSERT INTO product_slots VALUES(72,137); +INSERT INTO product_slots VALUES(72,138); +INSERT INTO product_slots VALUES(72,139); +INSERT INTO product_slots VALUES(72,140); +INSERT INTO product_slots VALUES(72,141); +INSERT INTO product_slots VALUES(72,142); +INSERT INTO product_slots VALUES(72,143); +INSERT INTO product_slots VALUES(72,144); +INSERT INTO product_slots VALUES(72,145); +INSERT INTO product_slots VALUES(72,146); +INSERT INTO product_slots VALUES(72,147); +INSERT INTO product_slots VALUES(72,148); +INSERT INTO product_slots VALUES(72,149); +INSERT INTO product_slots VALUES(72,150); +INSERT INTO product_slots VALUES(72,151); +INSERT INTO product_slots VALUES(72,152); +INSERT INTO product_slots VALUES(72,153); +INSERT INTO product_slots VALUES(72,154); +INSERT INTO product_slots VALUES(72,155); +INSERT INTO product_slots VALUES(72,156); +INSERT INTO product_slots VALUES(72,157); +INSERT INTO product_slots VALUES(72,158); +INSERT INTO product_slots VALUES(72,159); +INSERT INTO product_slots VALUES(72,160); +INSERT INTO product_slots VALUES(72,161); +INSERT INTO product_slots VALUES(72,162); +INSERT INTO product_slots VALUES(72,163); +INSERT INTO product_slots VALUES(72,164); +INSERT INTO product_slots VALUES(72,165); +INSERT INTO product_slots VALUES(72,166); +INSERT INTO product_slots VALUES(72,167); +INSERT INTO product_slots VALUES(72,168); +INSERT INTO product_slots VALUES(72,169); +INSERT INTO product_slots VALUES(72,170); +INSERT INTO product_slots VALUES(72,171); +INSERT INTO product_slots VALUES(72,172); +INSERT INTO product_slots VALUES(72,173); +INSERT INTO product_slots VALUES(72,174); +INSERT INTO product_slots VALUES(72,175); +INSERT INTO product_slots VALUES(72,176); +INSERT INTO product_slots VALUES(72,177); +INSERT INTO product_slots VALUES(72,178); +INSERT INTO product_slots VALUES(72,179); +INSERT INTO product_slots VALUES(72,180); +INSERT INTO product_slots VALUES(72,181); +INSERT INTO product_slots VALUES(72,182); +INSERT INTO product_slots VALUES(72,183); +INSERT INTO product_slots VALUES(72,184); +INSERT INTO product_slots VALUES(72,185); +INSERT INTO product_slots VALUES(72,186); +INSERT INTO product_slots VALUES(72,187); +INSERT INTO product_slots VALUES(72,188); +INSERT INTO product_slots VALUES(72,189); +INSERT INTO product_slots VALUES(72,190); +INSERT INTO product_slots VALUES(72,191); +INSERT INTO product_slots VALUES(72,192); +INSERT INTO product_slots VALUES(72,193); +INSERT INTO product_slots VALUES(72,194); +INSERT INTO product_slots VALUES(72,195); +INSERT INTO product_slots VALUES(72,196); +INSERT INTO product_slots VALUES(72,197); +INSERT INTO product_slots VALUES(72,198); +INSERT INTO product_slots VALUES(72,199); +INSERT INTO product_slots VALUES(72,200); +INSERT INTO product_slots VALUES(72,201); +INSERT INTO product_slots VALUES(72,202); +INSERT INTO product_slots VALUES(72,203); +INSERT INTO product_slots VALUES(72,204); +INSERT INTO product_slots VALUES(72,205); +INSERT INTO product_slots VALUES(72,206); +INSERT INTO product_slots VALUES(72,207); +INSERT INTO product_slots VALUES(72,208); +INSERT INTO product_slots VALUES(72,209); +INSERT INTO product_slots VALUES(72,210); +INSERT INTO product_slots VALUES(72,211); +INSERT INTO product_slots VALUES(72,212); +INSERT INTO product_slots VALUES(72,213); +INSERT INTO product_slots VALUES(72,214); +INSERT INTO product_slots VALUES(72,215); +INSERT INTO product_slots VALUES(72,216); +INSERT INTO product_slots VALUES(72,217); +INSERT INTO product_slots VALUES(72,218); +INSERT INTO product_slots VALUES(72,219); +INSERT INTO product_slots VALUES(72,220); +INSERT INTO product_slots VALUES(72,221); +INSERT INTO product_slots VALUES(72,222); +INSERT INTO product_slots VALUES(72,223); +INSERT INTO product_slots VALUES(72,224); +INSERT INTO product_slots VALUES(72,225); +INSERT INTO product_slots VALUES(72,226); +INSERT INTO product_slots VALUES(72,227); +INSERT INTO product_slots VALUES(72,228); +INSERT INTO product_slots VALUES(72,229); +INSERT INTO product_slots VALUES(72,230); +INSERT INTO product_slots VALUES(72,231); +INSERT INTO product_slots VALUES(72,232); +INSERT INTO product_slots VALUES(72,233); +INSERT INTO product_slots VALUES(72,234); +INSERT INTO product_slots VALUES(72,235); +INSERT INTO product_slots VALUES(72,236); +INSERT INTO product_slots VALUES(72,237); +INSERT INTO product_slots VALUES(72,238); +INSERT INTO product_slots VALUES(72,239); +INSERT INTO product_slots VALUES(72,240); +INSERT INTO product_slots VALUES(72,241); +INSERT INTO product_slots VALUES(72,242); +INSERT INTO product_slots VALUES(72,243); +INSERT INTO product_slots VALUES(72,244); +INSERT INTO product_slots VALUES(72,274); +INSERT INTO product_slots VALUES(72,275); +INSERT INTO product_slots VALUES(72,279); +INSERT INTO product_slots VALUES(72,280); +INSERT INTO product_slots VALUES(72,281); +INSERT INTO product_slots VALUES(72,282); +INSERT INTO product_slots VALUES(72,283); +INSERT INTO product_slots VALUES(72,284); +INSERT INTO product_slots VALUES(72,285); +INSERT INTO product_slots VALUES(72,286); +INSERT INTO product_slots VALUES(72,287); +INSERT INTO product_slots VALUES(73,40); +INSERT INTO product_slots VALUES(73,64); +INSERT INTO product_slots VALUES(73,65); +INSERT INTO product_slots VALUES(73,66); +INSERT INTO product_slots VALUES(73,67); +INSERT INTO product_slots VALUES(73,68); +INSERT INTO product_slots VALUES(73,69); +INSERT INTO product_slots VALUES(73,70); +INSERT INTO product_slots VALUES(73,71); +INSERT INTO product_slots VALUES(73,72); +INSERT INTO product_slots VALUES(73,73); +INSERT INTO product_slots VALUES(73,74); +INSERT INTO product_slots VALUES(73,75); +INSERT INTO product_slots VALUES(73,76); +INSERT INTO product_slots VALUES(73,77); +INSERT INTO product_slots VALUES(73,78); +INSERT INTO product_slots VALUES(73,79); +INSERT INTO product_slots VALUES(73,80); +INSERT INTO product_slots VALUES(73,81); +INSERT INTO product_slots VALUES(73,82); +INSERT INTO product_slots VALUES(73,83); +INSERT INTO product_slots VALUES(73,84); +INSERT INTO product_slots VALUES(73,85); +INSERT INTO product_slots VALUES(73,86); +INSERT INTO product_slots VALUES(73,87); +INSERT INTO product_slots VALUES(73,88); +INSERT INTO product_slots VALUES(73,89); +INSERT INTO product_slots VALUES(73,90); +INSERT INTO product_slots VALUES(73,91); +INSERT INTO product_slots VALUES(73,92); +INSERT INTO product_slots VALUES(73,93); +INSERT INTO product_slots VALUES(73,94); +INSERT INTO product_slots VALUES(73,95); +INSERT INTO product_slots VALUES(73,96); +INSERT INTO product_slots VALUES(73,97); +INSERT INTO product_slots VALUES(73,98); +INSERT INTO product_slots VALUES(73,99); +INSERT INTO product_slots VALUES(73,100); +INSERT INTO product_slots VALUES(73,102); +INSERT INTO product_slots VALUES(73,103); +INSERT INTO product_slots VALUES(73,104); +INSERT INTO product_slots VALUES(73,105); +INSERT INTO product_slots VALUES(73,106); +INSERT INTO product_slots VALUES(73,107); +INSERT INTO product_slots VALUES(73,108); +INSERT INTO product_slots VALUES(73,109); +INSERT INTO product_slots VALUES(73,110); +INSERT INTO product_slots VALUES(73,111); +INSERT INTO product_slots VALUES(73,112); +INSERT INTO product_slots VALUES(73,113); +INSERT INTO product_slots VALUES(73,114); +INSERT INTO product_slots VALUES(73,115); +INSERT INTO product_slots VALUES(73,117); +INSERT INTO product_slots VALUES(73,118); +INSERT INTO product_slots VALUES(73,119); +INSERT INTO product_slots VALUES(73,120); +INSERT INTO product_slots VALUES(73,121); +INSERT INTO product_slots VALUES(73,122); +INSERT INTO product_slots VALUES(73,123); +INSERT INTO product_slots VALUES(73,124); +INSERT INTO product_slots VALUES(73,125); +INSERT INTO product_slots VALUES(73,126); +INSERT INTO product_slots VALUES(73,127); +INSERT INTO product_slots VALUES(73,128); +INSERT INTO product_slots VALUES(73,129); +INSERT INTO product_slots VALUES(73,130); +INSERT INTO product_slots VALUES(73,131); +INSERT INTO product_slots VALUES(73,132); +INSERT INTO product_slots VALUES(73,133); +INSERT INTO product_slots VALUES(73,134); +INSERT INTO product_slots VALUES(73,135); +INSERT INTO product_slots VALUES(73,136); +INSERT INTO product_slots VALUES(73,138); +INSERT INTO product_slots VALUES(73,139); +INSERT INTO product_slots VALUES(73,140); +INSERT INTO product_slots VALUES(73,141); +INSERT INTO product_slots VALUES(73,142); +INSERT INTO product_slots VALUES(73,143); +INSERT INTO product_slots VALUES(73,145); +INSERT INTO product_slots VALUES(73,146); +INSERT INTO product_slots VALUES(73,147); +INSERT INTO product_slots VALUES(73,148); +INSERT INTO product_slots VALUES(73,149); +INSERT INTO product_slots VALUES(73,150); +INSERT INTO product_slots VALUES(73,151); +INSERT INTO product_slots VALUES(73,152); +INSERT INTO product_slots VALUES(73,153); +INSERT INTO product_slots VALUES(73,154); +INSERT INTO product_slots VALUES(73,155); +INSERT INTO product_slots VALUES(73,156); +INSERT INTO product_slots VALUES(73,157); +INSERT INTO product_slots VALUES(73,158); +INSERT INTO product_slots VALUES(73,159); +INSERT INTO product_slots VALUES(73,160); +INSERT INTO product_slots VALUES(73,161); +INSERT INTO product_slots VALUES(73,162); +INSERT INTO product_slots VALUES(73,163); +INSERT INTO product_slots VALUES(73,164); +INSERT INTO product_slots VALUES(73,165); +INSERT INTO product_slots VALUES(73,166); +INSERT INTO product_slots VALUES(73,167); +INSERT INTO product_slots VALUES(73,168); +INSERT INTO product_slots VALUES(73,169); +INSERT INTO product_slots VALUES(73,170); +INSERT INTO product_slots VALUES(73,171); +INSERT INTO product_slots VALUES(73,172); +INSERT INTO product_slots VALUES(73,173); +INSERT INTO product_slots VALUES(73,174); +INSERT INTO product_slots VALUES(73,175); +INSERT INTO product_slots VALUES(73,176); +INSERT INTO product_slots VALUES(73,177); +INSERT INTO product_slots VALUES(73,178); +INSERT INTO product_slots VALUES(73,179); +INSERT INTO product_slots VALUES(73,180); +INSERT INTO product_slots VALUES(73,181); +INSERT INTO product_slots VALUES(73,182); +INSERT INTO product_slots VALUES(73,183); +INSERT INTO product_slots VALUES(73,184); +INSERT INTO product_slots VALUES(73,185); +INSERT INTO product_slots VALUES(73,186); +INSERT INTO product_slots VALUES(73,187); +INSERT INTO product_slots VALUES(73,188); +INSERT INTO product_slots VALUES(73,189); +INSERT INTO product_slots VALUES(73,190); +INSERT INTO product_slots VALUES(73,191); +INSERT INTO product_slots VALUES(73,192); +INSERT INTO product_slots VALUES(73,193); +INSERT INTO product_slots VALUES(73,194); +INSERT INTO product_slots VALUES(73,195); +INSERT INTO product_slots VALUES(73,196); +INSERT INTO product_slots VALUES(73,197); +INSERT INTO product_slots VALUES(73,198); +INSERT INTO product_slots VALUES(73,199); +INSERT INTO product_slots VALUES(73,200); +INSERT INTO product_slots VALUES(73,201); +INSERT INTO product_slots VALUES(73,202); +INSERT INTO product_slots VALUES(73,203); +INSERT INTO product_slots VALUES(73,204); +INSERT INTO product_slots VALUES(73,205); +INSERT INTO product_slots VALUES(73,206); +INSERT INTO product_slots VALUES(73,207); +INSERT INTO product_slots VALUES(73,208); +INSERT INTO product_slots VALUES(73,209); +INSERT INTO product_slots VALUES(73,210); +INSERT INTO product_slots VALUES(73,211); +INSERT INTO product_slots VALUES(73,212); +INSERT INTO product_slots VALUES(73,213); +INSERT INTO product_slots VALUES(73,214); +INSERT INTO product_slots VALUES(73,215); +INSERT INTO product_slots VALUES(73,216); +INSERT INTO product_slots VALUES(73,217); +INSERT INTO product_slots VALUES(73,218); +INSERT INTO product_slots VALUES(73,219); +INSERT INTO product_slots VALUES(73,220); +INSERT INTO product_slots VALUES(73,221); +INSERT INTO product_slots VALUES(73,222); +INSERT INTO product_slots VALUES(73,223); +INSERT INTO product_slots VALUES(73,224); +INSERT INTO product_slots VALUES(73,225); +INSERT INTO product_slots VALUES(73,226); +INSERT INTO product_slots VALUES(73,227); +INSERT INTO product_slots VALUES(73,228); +INSERT INTO product_slots VALUES(73,229); +INSERT INTO product_slots VALUES(73,230); +INSERT INTO product_slots VALUES(73,231); +INSERT INTO product_slots VALUES(73,232); +INSERT INTO product_slots VALUES(73,233); +INSERT INTO product_slots VALUES(73,234); +INSERT INTO product_slots VALUES(73,235); +INSERT INTO product_slots VALUES(73,236); +INSERT INTO product_slots VALUES(73,237); +INSERT INTO product_slots VALUES(73,238); +INSERT INTO product_slots VALUES(73,239); +INSERT INTO product_slots VALUES(73,240); +INSERT INTO product_slots VALUES(73,241); +INSERT INTO product_slots VALUES(73,242); +INSERT INTO product_slots VALUES(73,243); +INSERT INTO product_slots VALUES(73,244); +INSERT INTO product_slots VALUES(73,274); +INSERT INTO product_slots VALUES(73,275); +INSERT INTO product_slots VALUES(73,279); +INSERT INTO product_slots VALUES(73,280); +INSERT INTO product_slots VALUES(73,281); +INSERT INTO product_slots VALUES(73,282); +INSERT INTO product_slots VALUES(73,283); +INSERT INTO product_slots VALUES(73,284); +INSERT INTO product_slots VALUES(73,285); +INSERT INTO product_slots VALUES(73,286); +INSERT INTO product_slots VALUES(73,287); +INSERT INTO product_slots VALUES(74,39); +INSERT INTO product_slots VALUES(74,44); +INSERT INTO product_slots VALUES(74,46); +INSERT INTO product_slots VALUES(74,47); +INSERT INTO product_slots VALUES(74,48); +INSERT INTO product_slots VALUES(74,49); +INSERT INTO product_slots VALUES(74,50); +INSERT INTO product_slots VALUES(74,51); +INSERT INTO product_slots VALUES(74,52); +INSERT INTO product_slots VALUES(74,53); +INSERT INTO product_slots VALUES(74,54); +INSERT INTO product_slots VALUES(74,55); +INSERT INTO product_slots VALUES(74,56); +INSERT INTO product_slots VALUES(74,57); +INSERT INTO product_slots VALUES(74,58); +INSERT INTO product_slots VALUES(74,59); +INSERT INTO product_slots VALUES(74,60); +INSERT INTO product_slots VALUES(74,61); +INSERT INTO product_slots VALUES(74,62); +INSERT INTO product_slots VALUES(74,63); +INSERT INTO product_slots VALUES(74,64); +INSERT INTO product_slots VALUES(74,65); +INSERT INTO product_slots VALUES(74,66); +INSERT INTO product_slots VALUES(74,67); +INSERT INTO product_slots VALUES(74,68); +INSERT INTO product_slots VALUES(74,69); +INSERT INTO product_slots VALUES(74,70); +INSERT INTO product_slots VALUES(74,71); +INSERT INTO product_slots VALUES(74,72); +INSERT INTO product_slots VALUES(74,73); +INSERT INTO product_slots VALUES(74,74); +INSERT INTO product_slots VALUES(74,75); +INSERT INTO product_slots VALUES(74,76); +INSERT INTO product_slots VALUES(74,77); +INSERT INTO product_slots VALUES(74,78); +INSERT INTO product_slots VALUES(74,79); +INSERT INTO product_slots VALUES(74,80); +INSERT INTO product_slots VALUES(74,81); +INSERT INTO product_slots VALUES(74,82); +INSERT INTO product_slots VALUES(74,83); +INSERT INTO product_slots VALUES(74,84); +INSERT INTO product_slots VALUES(74,85); +INSERT INTO product_slots VALUES(74,86); +INSERT INTO product_slots VALUES(74,87); +INSERT INTO product_slots VALUES(74,88); +INSERT INTO product_slots VALUES(74,89); +INSERT INTO product_slots VALUES(74,90); +INSERT INTO product_slots VALUES(74,91); +INSERT INTO product_slots VALUES(74,92); +INSERT INTO product_slots VALUES(74,93); +INSERT INTO product_slots VALUES(74,94); +INSERT INTO product_slots VALUES(74,95); +INSERT INTO product_slots VALUES(74,96); +INSERT INTO product_slots VALUES(74,97); +INSERT INTO product_slots VALUES(74,98); +INSERT INTO product_slots VALUES(74,99); +INSERT INTO product_slots VALUES(74,100); +INSERT INTO product_slots VALUES(74,101); +INSERT INTO product_slots VALUES(74,102); +INSERT INTO product_slots VALUES(74,103); +INSERT INTO product_slots VALUES(74,104); +INSERT INTO product_slots VALUES(74,105); +INSERT INTO product_slots VALUES(74,106); +INSERT INTO product_slots VALUES(74,107); +INSERT INTO product_slots VALUES(74,108); +INSERT INTO product_slots VALUES(74,109); +INSERT INTO product_slots VALUES(74,110); +INSERT INTO product_slots VALUES(74,111); +INSERT INTO product_slots VALUES(74,112); +INSERT INTO product_slots VALUES(74,113); +INSERT INTO product_slots VALUES(74,114); +INSERT INTO product_slots VALUES(74,115); +INSERT INTO product_slots VALUES(74,116); +INSERT INTO product_slots VALUES(74,117); +INSERT INTO product_slots VALUES(74,118); +INSERT INTO product_slots VALUES(74,119); +INSERT INTO product_slots VALUES(74,120); +INSERT INTO product_slots VALUES(74,121); +INSERT INTO product_slots VALUES(74,122); +INSERT INTO product_slots VALUES(74,123); +INSERT INTO product_slots VALUES(74,124); +INSERT INTO product_slots VALUES(74,125); +INSERT INTO product_slots VALUES(74,126); +INSERT INTO product_slots VALUES(74,127); +INSERT INTO product_slots VALUES(74,128); +INSERT INTO product_slots VALUES(74,129); +INSERT INTO product_slots VALUES(74,130); +INSERT INTO product_slots VALUES(74,131); +INSERT INTO product_slots VALUES(74,132); +INSERT INTO product_slots VALUES(74,133); +INSERT INTO product_slots VALUES(74,134); +INSERT INTO product_slots VALUES(74,135); +INSERT INTO product_slots VALUES(74,136); +INSERT INTO product_slots VALUES(74,137); +INSERT INTO product_slots VALUES(74,138); +INSERT INTO product_slots VALUES(74,139); +INSERT INTO product_slots VALUES(74,140); +INSERT INTO product_slots VALUES(74,141); +INSERT INTO product_slots VALUES(74,142); +INSERT INTO product_slots VALUES(74,143); +INSERT INTO product_slots VALUES(74,144); +INSERT INTO product_slots VALUES(74,145); +INSERT INTO product_slots VALUES(74,146); +INSERT INTO product_slots VALUES(74,147); +INSERT INTO product_slots VALUES(74,148); +INSERT INTO product_slots VALUES(74,149); +INSERT INTO product_slots VALUES(74,150); +INSERT INTO product_slots VALUES(74,151); +INSERT INTO product_slots VALUES(74,152); +INSERT INTO product_slots VALUES(74,153); +INSERT INTO product_slots VALUES(74,154); +INSERT INTO product_slots VALUES(74,155); +INSERT INTO product_slots VALUES(74,156); +INSERT INTO product_slots VALUES(74,157); +INSERT INTO product_slots VALUES(74,158); +INSERT INTO product_slots VALUES(74,159); +INSERT INTO product_slots VALUES(74,160); +INSERT INTO product_slots VALUES(74,161); +INSERT INTO product_slots VALUES(74,162); +INSERT INTO product_slots VALUES(74,163); +INSERT INTO product_slots VALUES(74,164); +INSERT INTO product_slots VALUES(74,165); +INSERT INTO product_slots VALUES(74,166); +INSERT INTO product_slots VALUES(74,167); +INSERT INTO product_slots VALUES(74,168); +INSERT INTO product_slots VALUES(74,169); +INSERT INTO product_slots VALUES(74,170); +INSERT INTO product_slots VALUES(74,171); +INSERT INTO product_slots VALUES(74,172); +INSERT INTO product_slots VALUES(74,173); +INSERT INTO product_slots VALUES(74,174); +INSERT INTO product_slots VALUES(74,175); +INSERT INTO product_slots VALUES(74,176); +INSERT INTO product_slots VALUES(74,177); +INSERT INTO product_slots VALUES(74,178); +INSERT INTO product_slots VALUES(74,179); +INSERT INTO product_slots VALUES(74,180); +INSERT INTO product_slots VALUES(74,181); +INSERT INTO product_slots VALUES(74,182); +INSERT INTO product_slots VALUES(74,183); +INSERT INTO product_slots VALUES(74,184); +INSERT INTO product_slots VALUES(74,185); +INSERT INTO product_slots VALUES(74,186); +INSERT INTO product_slots VALUES(74,187); +INSERT INTO product_slots VALUES(74,188); +INSERT INTO product_slots VALUES(74,189); +INSERT INTO product_slots VALUES(74,190); +INSERT INTO product_slots VALUES(74,191); +INSERT INTO product_slots VALUES(74,192); +INSERT INTO product_slots VALUES(74,193); +INSERT INTO product_slots VALUES(74,194); +INSERT INTO product_slots VALUES(74,195); +INSERT INTO product_slots VALUES(74,196); +INSERT INTO product_slots VALUES(74,197); +INSERT INTO product_slots VALUES(74,198); +INSERT INTO product_slots VALUES(74,199); +INSERT INTO product_slots VALUES(74,200); +INSERT INTO product_slots VALUES(74,201); +INSERT INTO product_slots VALUES(74,202); +INSERT INTO product_slots VALUES(74,203); +INSERT INTO product_slots VALUES(74,204); +INSERT INTO product_slots VALUES(74,205); +INSERT INTO product_slots VALUES(74,206); +INSERT INTO product_slots VALUES(74,207); +INSERT INTO product_slots VALUES(74,208); +INSERT INTO product_slots VALUES(74,209); +INSERT INTO product_slots VALUES(74,210); +INSERT INTO product_slots VALUES(74,211); +INSERT INTO product_slots VALUES(74,212); +INSERT INTO product_slots VALUES(74,213); +INSERT INTO product_slots VALUES(74,214); +INSERT INTO product_slots VALUES(74,215); +INSERT INTO product_slots VALUES(74,216); +INSERT INTO product_slots VALUES(74,217); +INSERT INTO product_slots VALUES(74,218); +INSERT INTO product_slots VALUES(74,219); +INSERT INTO product_slots VALUES(74,220); +INSERT INTO product_slots VALUES(74,221); +INSERT INTO product_slots VALUES(74,222); +INSERT INTO product_slots VALUES(74,223); +INSERT INTO product_slots VALUES(74,224); +INSERT INTO product_slots VALUES(74,225); +INSERT INTO product_slots VALUES(74,226); +INSERT INTO product_slots VALUES(74,227); +INSERT INTO product_slots VALUES(74,228); +INSERT INTO product_slots VALUES(74,229); +INSERT INTO product_slots VALUES(74,230); +INSERT INTO product_slots VALUES(74,231); +INSERT INTO product_slots VALUES(74,232); +INSERT INTO product_slots VALUES(74,233); +INSERT INTO product_slots VALUES(74,234); +INSERT INTO product_slots VALUES(74,235); +INSERT INTO product_slots VALUES(74,236); +INSERT INTO product_slots VALUES(74,237); +INSERT INTO product_slots VALUES(74,238); +INSERT INTO product_slots VALUES(74,239); +INSERT INTO product_slots VALUES(74,240); +INSERT INTO product_slots VALUES(74,241); +INSERT INTO product_slots VALUES(74,242); +INSERT INTO product_slots VALUES(74,243); +INSERT INTO product_slots VALUES(74,244); +INSERT INTO product_slots VALUES(74,274); +INSERT INTO product_slots VALUES(74,275); +INSERT INTO product_slots VALUES(74,279); +INSERT INTO product_slots VALUES(74,280); +INSERT INTO product_slots VALUES(74,281); +INSERT INTO product_slots VALUES(74,282); +INSERT INTO product_slots VALUES(74,283); +INSERT INTO product_slots VALUES(74,284); +INSERT INTO product_slots VALUES(74,285); +INSERT INTO product_slots VALUES(74,286); +INSERT INTO product_slots VALUES(74,287); +INSERT INTO product_slots VALUES(75,39); +INSERT INTO product_slots VALUES(75,43); +INSERT INTO product_slots VALUES(75,45); +INSERT INTO product_slots VALUES(75,48); +INSERT INTO product_slots VALUES(75,49); +INSERT INTO product_slots VALUES(75,51); +INSERT INTO product_slots VALUES(75,52); +INSERT INTO product_slots VALUES(75,57); +INSERT INTO product_slots VALUES(75,58); +INSERT INTO product_slots VALUES(75,59); +INSERT INTO product_slots VALUES(75,62); +INSERT INTO product_slots VALUES(75,63); +INSERT INTO product_slots VALUES(75,64); +INSERT INTO product_slots VALUES(75,65); +INSERT INTO product_slots VALUES(75,66); +INSERT INTO product_slots VALUES(75,67); +INSERT INTO product_slots VALUES(75,69); +INSERT INTO product_slots VALUES(75,70); +INSERT INTO product_slots VALUES(75,71); +INSERT INTO product_slots VALUES(75,72); +INSERT INTO product_slots VALUES(75,73); +INSERT INTO product_slots VALUES(75,75); +INSERT INTO product_slots VALUES(75,82); +INSERT INTO product_slots VALUES(75,83); +INSERT INTO product_slots VALUES(75,84); +INSERT INTO product_slots VALUES(75,90); +INSERT INTO product_slots VALUES(75,91); +INSERT INTO product_slots VALUES(75,97); +INSERT INTO product_slots VALUES(75,98); +INSERT INTO product_slots VALUES(75,102); +INSERT INTO product_slots VALUES(75,103); +INSERT INTO product_slots VALUES(75,104); +INSERT INTO product_slots VALUES(75,110); +INSERT INTO product_slots VALUES(75,111); +INSERT INTO product_slots VALUES(75,112); +INSERT INTO product_slots VALUES(75,116); +INSERT INTO product_slots VALUES(75,117); +INSERT INTO product_slots VALUES(75,118); +INSERT INTO product_slots VALUES(75,119); +INSERT INTO product_slots VALUES(75,120); +INSERT INTO product_slots VALUES(75,121); +INSERT INTO product_slots VALUES(75,122); +INSERT INTO product_slots VALUES(75,123); +INSERT INTO product_slots VALUES(75,124); +INSERT INTO product_slots VALUES(75,125); +INSERT INTO product_slots VALUES(75,126); +INSERT INTO product_slots VALUES(75,127); +INSERT INTO product_slots VALUES(75,128); +INSERT INTO product_slots VALUES(75,129); +INSERT INTO product_slots VALUES(75,130); +INSERT INTO product_slots VALUES(75,131); +INSERT INTO product_slots VALUES(75,132); +INSERT INTO product_slots VALUES(75,133); +INSERT INTO product_slots VALUES(75,134); +INSERT INTO product_slots VALUES(75,135); +INSERT INTO product_slots VALUES(75,136); +INSERT INTO product_slots VALUES(75,137); +INSERT INTO product_slots VALUES(75,138); +INSERT INTO product_slots VALUES(75,139); +INSERT INTO product_slots VALUES(75,140); +INSERT INTO product_slots VALUES(75,141); +INSERT INTO product_slots VALUES(75,142); +INSERT INTO product_slots VALUES(75,143); +INSERT INTO product_slots VALUES(75,144); +INSERT INTO product_slots VALUES(75,145); +INSERT INTO product_slots VALUES(75,146); +INSERT INTO product_slots VALUES(75,147); +INSERT INTO product_slots VALUES(75,148); +INSERT INTO product_slots VALUES(75,149); +INSERT INTO product_slots VALUES(75,150); +INSERT INTO product_slots VALUES(75,151); +INSERT INTO product_slots VALUES(75,152); +INSERT INTO product_slots VALUES(75,153); +INSERT INTO product_slots VALUES(75,154); +INSERT INTO product_slots VALUES(75,155); +INSERT INTO product_slots VALUES(75,156); +INSERT INTO product_slots VALUES(75,157); +INSERT INTO product_slots VALUES(75,158); +INSERT INTO product_slots VALUES(75,159); +INSERT INTO product_slots VALUES(75,160); +INSERT INTO product_slots VALUES(75,161); +INSERT INTO product_slots VALUES(75,162); +INSERT INTO product_slots VALUES(75,163); +INSERT INTO product_slots VALUES(75,164); +INSERT INTO product_slots VALUES(75,165); +INSERT INTO product_slots VALUES(75,166); +INSERT INTO product_slots VALUES(75,167); +INSERT INTO product_slots VALUES(75,168); +INSERT INTO product_slots VALUES(75,169); +INSERT INTO product_slots VALUES(75,170); +INSERT INTO product_slots VALUES(75,171); +INSERT INTO product_slots VALUES(75,172); +INSERT INTO product_slots VALUES(75,173); +INSERT INTO product_slots VALUES(75,174); +INSERT INTO product_slots VALUES(75,175); +INSERT INTO product_slots VALUES(75,176); +INSERT INTO product_slots VALUES(75,177); +INSERT INTO product_slots VALUES(75,178); +INSERT INTO product_slots VALUES(75,179); +INSERT INTO product_slots VALUES(75,180); +INSERT INTO product_slots VALUES(75,181); +INSERT INTO product_slots VALUES(75,182); +INSERT INTO product_slots VALUES(75,183); +INSERT INTO product_slots VALUES(75,184); +INSERT INTO product_slots VALUES(75,185); +INSERT INTO product_slots VALUES(75,186); +INSERT INTO product_slots VALUES(75,187); +INSERT INTO product_slots VALUES(75,188); +INSERT INTO product_slots VALUES(75,189); +INSERT INTO product_slots VALUES(75,190); +INSERT INTO product_slots VALUES(75,191); +INSERT INTO product_slots VALUES(75,192); +INSERT INTO product_slots VALUES(75,193); +INSERT INTO product_slots VALUES(75,194); +INSERT INTO product_slots VALUES(75,195); +INSERT INTO product_slots VALUES(75,196); +INSERT INTO product_slots VALUES(75,197); +INSERT INTO product_slots VALUES(75,198); +INSERT INTO product_slots VALUES(75,199); +INSERT INTO product_slots VALUES(75,200); +INSERT INTO product_slots VALUES(75,201); +INSERT INTO product_slots VALUES(75,202); +INSERT INTO product_slots VALUES(75,203); +INSERT INTO product_slots VALUES(75,204); +INSERT INTO product_slots VALUES(75,205); +INSERT INTO product_slots VALUES(75,206); +INSERT INTO product_slots VALUES(75,207); +INSERT INTO product_slots VALUES(75,208); +INSERT INTO product_slots VALUES(75,209); +INSERT INTO product_slots VALUES(75,210); +INSERT INTO product_slots VALUES(75,211); +INSERT INTO product_slots VALUES(75,212); +INSERT INTO product_slots VALUES(75,213); +INSERT INTO product_slots VALUES(75,214); +INSERT INTO product_slots VALUES(75,215); +INSERT INTO product_slots VALUES(75,216); +INSERT INTO product_slots VALUES(75,217); +INSERT INTO product_slots VALUES(75,218); +INSERT INTO product_slots VALUES(75,219); +INSERT INTO product_slots VALUES(75,220); +INSERT INTO product_slots VALUES(75,221); +INSERT INTO product_slots VALUES(75,222); +INSERT INTO product_slots VALUES(75,223); +INSERT INTO product_slots VALUES(75,224); +INSERT INTO product_slots VALUES(75,225); +INSERT INTO product_slots VALUES(75,226); +INSERT INTO product_slots VALUES(75,227); +INSERT INTO product_slots VALUES(75,228); +INSERT INTO product_slots VALUES(75,229); +INSERT INTO product_slots VALUES(75,230); +INSERT INTO product_slots VALUES(75,231); +INSERT INTO product_slots VALUES(75,232); +INSERT INTO product_slots VALUES(75,233); +INSERT INTO product_slots VALUES(75,234); +INSERT INTO product_slots VALUES(75,235); +INSERT INTO product_slots VALUES(75,236); +INSERT INTO product_slots VALUES(75,237); +INSERT INTO product_slots VALUES(75,238); +INSERT INTO product_slots VALUES(75,239); +INSERT INTO product_slots VALUES(75,240); +INSERT INTO product_slots VALUES(75,241); +INSERT INTO product_slots VALUES(75,242); +INSERT INTO product_slots VALUES(75,243); +INSERT INTO product_slots VALUES(75,244); +INSERT INTO product_slots VALUES(75,274); +INSERT INTO product_slots VALUES(75,275); +INSERT INTO product_slots VALUES(75,279); +INSERT INTO product_slots VALUES(75,280); +INSERT INTO product_slots VALUES(75,281); +INSERT INTO product_slots VALUES(75,282); +INSERT INTO product_slots VALUES(75,283); +INSERT INTO product_slots VALUES(75,284); +INSERT INTO product_slots VALUES(75,285); +INSERT INTO product_slots VALUES(75,286); +INSERT INTO product_slots VALUES(75,287); +INSERT INTO product_slots VALUES(76,39); +INSERT INTO product_slots VALUES(76,41); +INSERT INTO product_slots VALUES(76,43); +INSERT INTO product_slots VALUES(76,44); +INSERT INTO product_slots VALUES(76,45); +INSERT INTO product_slots VALUES(76,46); +INSERT INTO product_slots VALUES(76,47); +INSERT INTO product_slots VALUES(76,48); +INSERT INTO product_slots VALUES(76,49); +INSERT INTO product_slots VALUES(76,50); +INSERT INTO product_slots VALUES(76,51); +INSERT INTO product_slots VALUES(76,52); +INSERT INTO product_slots VALUES(76,53); +INSERT INTO product_slots VALUES(76,54); +INSERT INTO product_slots VALUES(76,55); +INSERT INTO product_slots VALUES(76,56); +INSERT INTO product_slots VALUES(76,57); +INSERT INTO product_slots VALUES(76,58); +INSERT INTO product_slots VALUES(76,59); +INSERT INTO product_slots VALUES(76,60); +INSERT INTO product_slots VALUES(76,61); +INSERT INTO product_slots VALUES(76,62); +INSERT INTO product_slots VALUES(76,63); +INSERT INTO product_slots VALUES(76,64); +INSERT INTO product_slots VALUES(76,65); +INSERT INTO product_slots VALUES(76,66); +INSERT INTO product_slots VALUES(76,67); +INSERT INTO product_slots VALUES(76,68); +INSERT INTO product_slots VALUES(76,69); +INSERT INTO product_slots VALUES(76,70); +INSERT INTO product_slots VALUES(76,71); +INSERT INTO product_slots VALUES(76,72); +INSERT INTO product_slots VALUES(76,73); +INSERT INTO product_slots VALUES(76,74); +INSERT INTO product_slots VALUES(76,75); +INSERT INTO product_slots VALUES(76,76); +INSERT INTO product_slots VALUES(76,77); +INSERT INTO product_slots VALUES(76,78); +INSERT INTO product_slots VALUES(76,79); +INSERT INTO product_slots VALUES(76,80); +INSERT INTO product_slots VALUES(76,81); +INSERT INTO product_slots VALUES(76,82); +INSERT INTO product_slots VALUES(76,83); +INSERT INTO product_slots VALUES(76,84); +INSERT INTO product_slots VALUES(76,85); +INSERT INTO product_slots VALUES(76,86); +INSERT INTO product_slots VALUES(76,87); +INSERT INTO product_slots VALUES(76,88); +INSERT INTO product_slots VALUES(76,89); +INSERT INTO product_slots VALUES(76,90); +INSERT INTO product_slots VALUES(76,91); +INSERT INTO product_slots VALUES(76,92); +INSERT INTO product_slots VALUES(76,93); +INSERT INTO product_slots VALUES(76,94); +INSERT INTO product_slots VALUES(76,95); +INSERT INTO product_slots VALUES(76,96); +INSERT INTO product_slots VALUES(76,97); +INSERT INTO product_slots VALUES(76,98); +INSERT INTO product_slots VALUES(76,99); +INSERT INTO product_slots VALUES(76,100); +INSERT INTO product_slots VALUES(76,101); +INSERT INTO product_slots VALUES(76,102); +INSERT INTO product_slots VALUES(76,103); +INSERT INTO product_slots VALUES(76,104); +INSERT INTO product_slots VALUES(76,105); +INSERT INTO product_slots VALUES(76,106); +INSERT INTO product_slots VALUES(76,107); +INSERT INTO product_slots VALUES(76,108); +INSERT INTO product_slots VALUES(76,109); +INSERT INTO product_slots VALUES(76,110); +INSERT INTO product_slots VALUES(76,111); +INSERT INTO product_slots VALUES(76,112); +INSERT INTO product_slots VALUES(76,113); +INSERT INTO product_slots VALUES(76,114); +INSERT INTO product_slots VALUES(76,115); +INSERT INTO product_slots VALUES(76,116); +INSERT INTO product_slots VALUES(76,117); +INSERT INTO product_slots VALUES(76,118); +INSERT INTO product_slots VALUES(76,119); +INSERT INTO product_slots VALUES(76,120); +INSERT INTO product_slots VALUES(76,121); +INSERT INTO product_slots VALUES(76,122); +INSERT INTO product_slots VALUES(76,123); +INSERT INTO product_slots VALUES(76,124); +INSERT INTO product_slots VALUES(76,125); +INSERT INTO product_slots VALUES(76,126); +INSERT INTO product_slots VALUES(76,127); +INSERT INTO product_slots VALUES(76,128); +INSERT INTO product_slots VALUES(76,129); +INSERT INTO product_slots VALUES(76,130); +INSERT INTO product_slots VALUES(76,131); +INSERT INTO product_slots VALUES(76,132); +INSERT INTO product_slots VALUES(76,133); +INSERT INTO product_slots VALUES(76,134); +INSERT INTO product_slots VALUES(76,135); +INSERT INTO product_slots VALUES(76,136); +INSERT INTO product_slots VALUES(76,137); +INSERT INTO product_slots VALUES(76,138); +INSERT INTO product_slots VALUES(76,139); +INSERT INTO product_slots VALUES(76,140); +INSERT INTO product_slots VALUES(76,141); +INSERT INTO product_slots VALUES(76,142); +INSERT INTO product_slots VALUES(76,143); +INSERT INTO product_slots VALUES(76,144); +INSERT INTO product_slots VALUES(76,145); +INSERT INTO product_slots VALUES(76,146); +INSERT INTO product_slots VALUES(76,147); +INSERT INTO product_slots VALUES(76,148); +INSERT INTO product_slots VALUES(76,149); +INSERT INTO product_slots VALUES(76,150); +INSERT INTO product_slots VALUES(76,151); +INSERT INTO product_slots VALUES(76,152); +INSERT INTO product_slots VALUES(76,153); +INSERT INTO product_slots VALUES(76,154); +INSERT INTO product_slots VALUES(76,155); +INSERT INTO product_slots VALUES(76,156); +INSERT INTO product_slots VALUES(76,157); +INSERT INTO product_slots VALUES(76,158); +INSERT INTO product_slots VALUES(76,159); +INSERT INTO product_slots VALUES(76,160); +INSERT INTO product_slots VALUES(76,161); +INSERT INTO product_slots VALUES(76,162); +INSERT INTO product_slots VALUES(76,163); +INSERT INTO product_slots VALUES(76,164); +INSERT INTO product_slots VALUES(76,165); +INSERT INTO product_slots VALUES(76,166); +INSERT INTO product_slots VALUES(76,167); +INSERT INTO product_slots VALUES(76,168); +INSERT INTO product_slots VALUES(76,169); +INSERT INTO product_slots VALUES(76,170); +INSERT INTO product_slots VALUES(76,171); +INSERT INTO product_slots VALUES(76,172); +INSERT INTO product_slots VALUES(76,173); +INSERT INTO product_slots VALUES(76,174); +INSERT INTO product_slots VALUES(76,175); +INSERT INTO product_slots VALUES(76,176); +INSERT INTO product_slots VALUES(76,177); +INSERT INTO product_slots VALUES(76,178); +INSERT INTO product_slots VALUES(76,179); +INSERT INTO product_slots VALUES(76,180); +INSERT INTO product_slots VALUES(76,181); +INSERT INTO product_slots VALUES(76,182); +INSERT INTO product_slots VALUES(76,183); +INSERT INTO product_slots VALUES(76,184); +INSERT INTO product_slots VALUES(76,185); +INSERT INTO product_slots VALUES(76,186); +INSERT INTO product_slots VALUES(76,187); +INSERT INTO product_slots VALUES(76,188); +INSERT INTO product_slots VALUES(76,189); +INSERT INTO product_slots VALUES(76,190); +INSERT INTO product_slots VALUES(76,191); +INSERT INTO product_slots VALUES(76,192); +INSERT INTO product_slots VALUES(76,193); +INSERT INTO product_slots VALUES(76,194); +INSERT INTO product_slots VALUES(76,195); +INSERT INTO product_slots VALUES(76,196); +INSERT INTO product_slots VALUES(76,197); +INSERT INTO product_slots VALUES(76,198); +INSERT INTO product_slots VALUES(76,199); +INSERT INTO product_slots VALUES(76,200); +INSERT INTO product_slots VALUES(76,201); +INSERT INTO product_slots VALUES(76,202); +INSERT INTO product_slots VALUES(76,203); +INSERT INTO product_slots VALUES(76,204); +INSERT INTO product_slots VALUES(76,205); +INSERT INTO product_slots VALUES(76,206); +INSERT INTO product_slots VALUES(76,207); +INSERT INTO product_slots VALUES(76,208); +INSERT INTO product_slots VALUES(76,209); +INSERT INTO product_slots VALUES(76,210); +INSERT INTO product_slots VALUES(76,211); +INSERT INTO product_slots VALUES(76,212); +INSERT INTO product_slots VALUES(76,213); +INSERT INTO product_slots VALUES(76,214); +INSERT INTO product_slots VALUES(76,215); +INSERT INTO product_slots VALUES(76,216); +INSERT INTO product_slots VALUES(76,217); +INSERT INTO product_slots VALUES(76,218); +INSERT INTO product_slots VALUES(76,219); +INSERT INTO product_slots VALUES(76,220); +INSERT INTO product_slots VALUES(76,221); +INSERT INTO product_slots VALUES(76,222); +INSERT INTO product_slots VALUES(76,223); +INSERT INTO product_slots VALUES(76,224); +INSERT INTO product_slots VALUES(76,225); +INSERT INTO product_slots VALUES(76,226); +INSERT INTO product_slots VALUES(76,227); +INSERT INTO product_slots VALUES(76,228); +INSERT INTO product_slots VALUES(76,229); +INSERT INTO product_slots VALUES(76,230); +INSERT INTO product_slots VALUES(76,231); +INSERT INTO product_slots VALUES(76,232); +INSERT INTO product_slots VALUES(76,233); +INSERT INTO product_slots VALUES(76,234); +INSERT INTO product_slots VALUES(76,235); +INSERT INTO product_slots VALUES(76,236); +INSERT INTO product_slots VALUES(76,237); +INSERT INTO product_slots VALUES(76,238); +INSERT INTO product_slots VALUES(76,239); +INSERT INTO product_slots VALUES(76,240); +INSERT INTO product_slots VALUES(76,241); +INSERT INTO product_slots VALUES(76,242); +INSERT INTO product_slots VALUES(76,243); +INSERT INTO product_slots VALUES(76,244); +INSERT INTO product_slots VALUES(76,274); +INSERT INTO product_slots VALUES(76,275); +INSERT INTO product_slots VALUES(76,279); +INSERT INTO product_slots VALUES(76,280); +INSERT INTO product_slots VALUES(76,281); +INSERT INTO product_slots VALUES(76,282); +INSERT INTO product_slots VALUES(76,283); +INSERT INTO product_slots VALUES(76,284); +INSERT INTO product_slots VALUES(76,285); +INSERT INTO product_slots VALUES(76,286); +INSERT INTO product_slots VALUES(76,287); +INSERT INTO product_slots VALUES(77,39); +INSERT INTO product_slots VALUES(77,44); +INSERT INTO product_slots VALUES(77,46); +INSERT INTO product_slots VALUES(77,47); +INSERT INTO product_slots VALUES(77,48); +INSERT INTO product_slots VALUES(77,49); +INSERT INTO product_slots VALUES(77,50); +INSERT INTO product_slots VALUES(77,51); +INSERT INTO product_slots VALUES(77,52); +INSERT INTO product_slots VALUES(77,53); +INSERT INTO product_slots VALUES(77,54); +INSERT INTO product_slots VALUES(77,55); +INSERT INTO product_slots VALUES(77,56); +INSERT INTO product_slots VALUES(77,57); +INSERT INTO product_slots VALUES(77,58); +INSERT INTO product_slots VALUES(77,59); +INSERT INTO product_slots VALUES(77,60); +INSERT INTO product_slots VALUES(77,61); +INSERT INTO product_slots VALUES(77,62); +INSERT INTO product_slots VALUES(77,63); +INSERT INTO product_slots VALUES(77,64); +INSERT INTO product_slots VALUES(77,65); +INSERT INTO product_slots VALUES(77,66); +INSERT INTO product_slots VALUES(77,67); +INSERT INTO product_slots VALUES(77,68); +INSERT INTO product_slots VALUES(77,69); +INSERT INTO product_slots VALUES(77,70); +INSERT INTO product_slots VALUES(77,71); +INSERT INTO product_slots VALUES(77,72); +INSERT INTO product_slots VALUES(77,73); +INSERT INTO product_slots VALUES(77,74); +INSERT INTO product_slots VALUES(77,75); +INSERT INTO product_slots VALUES(77,76); +INSERT INTO product_slots VALUES(77,77); +INSERT INTO product_slots VALUES(77,78); +INSERT INTO product_slots VALUES(77,79); +INSERT INTO product_slots VALUES(77,80); +INSERT INTO product_slots VALUES(77,81); +INSERT INTO product_slots VALUES(77,82); +INSERT INTO product_slots VALUES(77,83); +INSERT INTO product_slots VALUES(77,84); +INSERT INTO product_slots VALUES(77,85); +INSERT INTO product_slots VALUES(77,86); +INSERT INTO product_slots VALUES(77,87); +INSERT INTO product_slots VALUES(77,88); +INSERT INTO product_slots VALUES(77,89); +INSERT INTO product_slots VALUES(77,90); +INSERT INTO product_slots VALUES(77,91); +INSERT INTO product_slots VALUES(77,92); +INSERT INTO product_slots VALUES(77,93); +INSERT INTO product_slots VALUES(77,94); +INSERT INTO product_slots VALUES(77,95); +INSERT INTO product_slots VALUES(77,96); +INSERT INTO product_slots VALUES(77,97); +INSERT INTO product_slots VALUES(77,98); +INSERT INTO product_slots VALUES(77,99); +INSERT INTO product_slots VALUES(77,100); +INSERT INTO product_slots VALUES(77,101); +INSERT INTO product_slots VALUES(77,102); +INSERT INTO product_slots VALUES(77,103); +INSERT INTO product_slots VALUES(77,104); +INSERT INTO product_slots VALUES(77,105); +INSERT INTO product_slots VALUES(77,106); +INSERT INTO product_slots VALUES(77,107); +INSERT INTO product_slots VALUES(77,108); +INSERT INTO product_slots VALUES(77,109); +INSERT INTO product_slots VALUES(77,110); +INSERT INTO product_slots VALUES(77,111); +INSERT INTO product_slots VALUES(77,112); +INSERT INTO product_slots VALUES(77,113); +INSERT INTO product_slots VALUES(77,114); +INSERT INTO product_slots VALUES(77,115); +INSERT INTO product_slots VALUES(77,116); +INSERT INTO product_slots VALUES(77,117); +INSERT INTO product_slots VALUES(77,118); +INSERT INTO product_slots VALUES(77,119); +INSERT INTO product_slots VALUES(77,120); +INSERT INTO product_slots VALUES(77,121); +INSERT INTO product_slots VALUES(77,122); +INSERT INTO product_slots VALUES(77,123); +INSERT INTO product_slots VALUES(77,124); +INSERT INTO product_slots VALUES(77,125); +INSERT INTO product_slots VALUES(77,126); +INSERT INTO product_slots VALUES(77,127); +INSERT INTO product_slots VALUES(77,128); +INSERT INTO product_slots VALUES(77,129); +INSERT INTO product_slots VALUES(77,130); +INSERT INTO product_slots VALUES(77,131); +INSERT INTO product_slots VALUES(77,132); +INSERT INTO product_slots VALUES(77,133); +INSERT INTO product_slots VALUES(77,134); +INSERT INTO product_slots VALUES(77,135); +INSERT INTO product_slots VALUES(77,136); +INSERT INTO product_slots VALUES(77,137); +INSERT INTO product_slots VALUES(77,138); +INSERT INTO product_slots VALUES(77,139); +INSERT INTO product_slots VALUES(77,140); +INSERT INTO product_slots VALUES(77,141); +INSERT INTO product_slots VALUES(77,142); +INSERT INTO product_slots VALUES(77,143); +INSERT INTO product_slots VALUES(77,144); +INSERT INTO product_slots VALUES(77,145); +INSERT INTO product_slots VALUES(77,146); +INSERT INTO product_slots VALUES(77,147); +INSERT INTO product_slots VALUES(77,148); +INSERT INTO product_slots VALUES(77,149); +INSERT INTO product_slots VALUES(77,150); +INSERT INTO product_slots VALUES(77,151); +INSERT INTO product_slots VALUES(77,152); +INSERT INTO product_slots VALUES(77,153); +INSERT INTO product_slots VALUES(77,154); +INSERT INTO product_slots VALUES(77,155); +INSERT INTO product_slots VALUES(77,156); +INSERT INTO product_slots VALUES(77,157); +INSERT INTO product_slots VALUES(77,158); +INSERT INTO product_slots VALUES(77,159); +INSERT INTO product_slots VALUES(77,160); +INSERT INTO product_slots VALUES(77,161); +INSERT INTO product_slots VALUES(77,162); +INSERT INTO product_slots VALUES(77,163); +INSERT INTO product_slots VALUES(77,164); +INSERT INTO product_slots VALUES(77,165); +INSERT INTO product_slots VALUES(77,166); +INSERT INTO product_slots VALUES(77,167); +INSERT INTO product_slots VALUES(77,168); +INSERT INTO product_slots VALUES(77,169); +INSERT INTO product_slots VALUES(77,170); +INSERT INTO product_slots VALUES(77,171); +INSERT INTO product_slots VALUES(77,172); +INSERT INTO product_slots VALUES(77,173); +INSERT INTO product_slots VALUES(77,174); +INSERT INTO product_slots VALUES(77,175); +INSERT INTO product_slots VALUES(77,176); +INSERT INTO product_slots VALUES(77,177); +INSERT INTO product_slots VALUES(77,178); +INSERT INTO product_slots VALUES(77,179); +INSERT INTO product_slots VALUES(77,180); +INSERT INTO product_slots VALUES(77,181); +INSERT INTO product_slots VALUES(77,182); +INSERT INTO product_slots VALUES(77,183); +INSERT INTO product_slots VALUES(77,184); +INSERT INTO product_slots VALUES(77,185); +INSERT INTO product_slots VALUES(77,186); +INSERT INTO product_slots VALUES(77,187); +INSERT INTO product_slots VALUES(77,188); +INSERT INTO product_slots VALUES(77,189); +INSERT INTO product_slots VALUES(77,190); +INSERT INTO product_slots VALUES(77,191); +INSERT INTO product_slots VALUES(77,192); +INSERT INTO product_slots VALUES(77,193); +INSERT INTO product_slots VALUES(77,194); +INSERT INTO product_slots VALUES(77,195); +INSERT INTO product_slots VALUES(77,196); +INSERT INTO product_slots VALUES(77,197); +INSERT INTO product_slots VALUES(77,198); +INSERT INTO product_slots VALUES(77,199); +INSERT INTO product_slots VALUES(77,200); +INSERT INTO product_slots VALUES(77,201); +INSERT INTO product_slots VALUES(77,202); +INSERT INTO product_slots VALUES(77,203); +INSERT INTO product_slots VALUES(77,204); +INSERT INTO product_slots VALUES(77,205); +INSERT INTO product_slots VALUES(77,206); +INSERT INTO product_slots VALUES(77,207); +INSERT INTO product_slots VALUES(77,208); +INSERT INTO product_slots VALUES(77,209); +INSERT INTO product_slots VALUES(77,210); +INSERT INTO product_slots VALUES(77,211); +INSERT INTO product_slots VALUES(77,212); +INSERT INTO product_slots VALUES(77,213); +INSERT INTO product_slots VALUES(77,214); +INSERT INTO product_slots VALUES(77,215); +INSERT INTO product_slots VALUES(77,216); +INSERT INTO product_slots VALUES(77,217); +INSERT INTO product_slots VALUES(77,218); +INSERT INTO product_slots VALUES(77,219); +INSERT INTO product_slots VALUES(77,220); +INSERT INTO product_slots VALUES(77,221); +INSERT INTO product_slots VALUES(77,222); +INSERT INTO product_slots VALUES(77,223); +INSERT INTO product_slots VALUES(77,224); +INSERT INTO product_slots VALUES(77,225); +INSERT INTO product_slots VALUES(77,226); +INSERT INTO product_slots VALUES(77,227); +INSERT INTO product_slots VALUES(77,228); +INSERT INTO product_slots VALUES(77,229); +INSERT INTO product_slots VALUES(77,230); +INSERT INTO product_slots VALUES(77,231); +INSERT INTO product_slots VALUES(77,232); +INSERT INTO product_slots VALUES(77,233); +INSERT INTO product_slots VALUES(77,234); +INSERT INTO product_slots VALUES(77,235); +INSERT INTO product_slots VALUES(77,236); +INSERT INTO product_slots VALUES(77,237); +INSERT INTO product_slots VALUES(77,238); +INSERT INTO product_slots VALUES(77,239); +INSERT INTO product_slots VALUES(77,240); +INSERT INTO product_slots VALUES(77,241); +INSERT INTO product_slots VALUES(77,242); +INSERT INTO product_slots VALUES(77,243); +INSERT INTO product_slots VALUES(77,244); +INSERT INTO product_slots VALUES(77,274); +INSERT INTO product_slots VALUES(77,275); +INSERT INTO product_slots VALUES(77,279); +INSERT INTO product_slots VALUES(77,280); +INSERT INTO product_slots VALUES(77,281); +INSERT INTO product_slots VALUES(77,282); +INSERT INTO product_slots VALUES(77,283); +INSERT INTO product_slots VALUES(77,284); +INSERT INTO product_slots VALUES(77,285); +INSERT INTO product_slots VALUES(77,286); +INSERT INTO product_slots VALUES(77,287); +INSERT INTO product_slots VALUES(78,39); +INSERT INTO product_slots VALUES(78,41); +INSERT INTO product_slots VALUES(78,43); +INSERT INTO product_slots VALUES(78,44); +INSERT INTO product_slots VALUES(78,45); +INSERT INTO product_slots VALUES(78,46); +INSERT INTO product_slots VALUES(78,47); +INSERT INTO product_slots VALUES(78,48); +INSERT INTO product_slots VALUES(78,49); +INSERT INTO product_slots VALUES(78,50); +INSERT INTO product_slots VALUES(78,51); +INSERT INTO product_slots VALUES(78,52); +INSERT INTO product_slots VALUES(78,53); +INSERT INTO product_slots VALUES(78,54); +INSERT INTO product_slots VALUES(78,55); +INSERT INTO product_slots VALUES(78,56); +INSERT INTO product_slots VALUES(78,57); +INSERT INTO product_slots VALUES(78,58); +INSERT INTO product_slots VALUES(78,59); +INSERT INTO product_slots VALUES(78,60); +INSERT INTO product_slots VALUES(78,61); +INSERT INTO product_slots VALUES(78,62); +INSERT INTO product_slots VALUES(78,63); +INSERT INTO product_slots VALUES(78,64); +INSERT INTO product_slots VALUES(78,65); +INSERT INTO product_slots VALUES(78,66); +INSERT INTO product_slots VALUES(78,67); +INSERT INTO product_slots VALUES(78,68); +INSERT INTO product_slots VALUES(78,69); +INSERT INTO product_slots VALUES(78,70); +INSERT INTO product_slots VALUES(78,71); +INSERT INTO product_slots VALUES(78,72); +INSERT INTO product_slots VALUES(78,73); +INSERT INTO product_slots VALUES(78,74); +INSERT INTO product_slots VALUES(78,75); +INSERT INTO product_slots VALUES(78,76); +INSERT INTO product_slots VALUES(78,77); +INSERT INTO product_slots VALUES(78,78); +INSERT INTO product_slots VALUES(78,79); +INSERT INTO product_slots VALUES(78,80); +INSERT INTO product_slots VALUES(78,81); +INSERT INTO product_slots VALUES(78,82); +INSERT INTO product_slots VALUES(78,83); +INSERT INTO product_slots VALUES(78,84); +INSERT INTO product_slots VALUES(78,85); +INSERT INTO product_slots VALUES(78,86); +INSERT INTO product_slots VALUES(78,87); +INSERT INTO product_slots VALUES(78,88); +INSERT INTO product_slots VALUES(78,89); +INSERT INTO product_slots VALUES(78,90); +INSERT INTO product_slots VALUES(78,91); +INSERT INTO product_slots VALUES(78,92); +INSERT INTO product_slots VALUES(78,93); +INSERT INTO product_slots VALUES(78,94); +INSERT INTO product_slots VALUES(78,95); +INSERT INTO product_slots VALUES(78,96); +INSERT INTO product_slots VALUES(78,97); +INSERT INTO product_slots VALUES(78,98); +INSERT INTO product_slots VALUES(78,99); +INSERT INTO product_slots VALUES(78,100); +INSERT INTO product_slots VALUES(78,101); +INSERT INTO product_slots VALUES(78,102); +INSERT INTO product_slots VALUES(78,103); +INSERT INTO product_slots VALUES(78,104); +INSERT INTO product_slots VALUES(78,105); +INSERT INTO product_slots VALUES(78,106); +INSERT INTO product_slots VALUES(78,107); +INSERT INTO product_slots VALUES(78,108); +INSERT INTO product_slots VALUES(78,109); +INSERT INTO product_slots VALUES(78,110); +INSERT INTO product_slots VALUES(78,111); +INSERT INTO product_slots VALUES(78,112); +INSERT INTO product_slots VALUES(78,113); +INSERT INTO product_slots VALUES(78,114); +INSERT INTO product_slots VALUES(78,115); +INSERT INTO product_slots VALUES(78,116); +INSERT INTO product_slots VALUES(78,117); +INSERT INTO product_slots VALUES(78,118); +INSERT INTO product_slots VALUES(78,119); +INSERT INTO product_slots VALUES(78,120); +INSERT INTO product_slots VALUES(78,121); +INSERT INTO product_slots VALUES(78,122); +INSERT INTO product_slots VALUES(78,123); +INSERT INTO product_slots VALUES(78,124); +INSERT INTO product_slots VALUES(78,125); +INSERT INTO product_slots VALUES(78,126); +INSERT INTO product_slots VALUES(78,127); +INSERT INTO product_slots VALUES(78,128); +INSERT INTO product_slots VALUES(78,129); +INSERT INTO product_slots VALUES(78,130); +INSERT INTO product_slots VALUES(78,131); +INSERT INTO product_slots VALUES(78,132); +INSERT INTO product_slots VALUES(78,133); +INSERT INTO product_slots VALUES(78,134); +INSERT INTO product_slots VALUES(78,135); +INSERT INTO product_slots VALUES(78,136); +INSERT INTO product_slots VALUES(78,137); +INSERT INTO product_slots VALUES(78,138); +INSERT INTO product_slots VALUES(78,139); +INSERT INTO product_slots VALUES(78,140); +INSERT INTO product_slots VALUES(78,141); +INSERT INTO product_slots VALUES(78,142); +INSERT INTO product_slots VALUES(78,143); +INSERT INTO product_slots VALUES(78,144); +INSERT INTO product_slots VALUES(78,145); +INSERT INTO product_slots VALUES(78,146); +INSERT INTO product_slots VALUES(78,147); +INSERT INTO product_slots VALUES(78,148); +INSERT INTO product_slots VALUES(78,149); +INSERT INTO product_slots VALUES(78,150); +INSERT INTO product_slots VALUES(78,151); +INSERT INTO product_slots VALUES(78,152); +INSERT INTO product_slots VALUES(78,153); +INSERT INTO product_slots VALUES(78,154); +INSERT INTO product_slots VALUES(78,155); +INSERT INTO product_slots VALUES(78,156); +INSERT INTO product_slots VALUES(78,157); +INSERT INTO product_slots VALUES(78,158); +INSERT INTO product_slots VALUES(78,159); +INSERT INTO product_slots VALUES(78,160); +INSERT INTO product_slots VALUES(78,161); +INSERT INTO product_slots VALUES(78,162); +INSERT INTO product_slots VALUES(78,163); +INSERT INTO product_slots VALUES(78,164); +INSERT INTO product_slots VALUES(78,165); +INSERT INTO product_slots VALUES(78,166); +INSERT INTO product_slots VALUES(78,167); +INSERT INTO product_slots VALUES(78,168); +INSERT INTO product_slots VALUES(78,169); +INSERT INTO product_slots VALUES(78,170); +INSERT INTO product_slots VALUES(78,171); +INSERT INTO product_slots VALUES(78,172); +INSERT INTO product_slots VALUES(78,173); +INSERT INTO product_slots VALUES(78,174); +INSERT INTO product_slots VALUES(78,175); +INSERT INTO product_slots VALUES(78,176); +INSERT INTO product_slots VALUES(78,177); +INSERT INTO product_slots VALUES(78,178); +INSERT INTO product_slots VALUES(78,179); +INSERT INTO product_slots VALUES(78,180); +INSERT INTO product_slots VALUES(78,181); +INSERT INTO product_slots VALUES(78,182); +INSERT INTO product_slots VALUES(78,183); +INSERT INTO product_slots VALUES(78,184); +INSERT INTO product_slots VALUES(78,185); +INSERT INTO product_slots VALUES(78,186); +INSERT INTO product_slots VALUES(78,187); +INSERT INTO product_slots VALUES(78,188); +INSERT INTO product_slots VALUES(78,189); +INSERT INTO product_slots VALUES(78,190); +INSERT INTO product_slots VALUES(78,191); +INSERT INTO product_slots VALUES(78,192); +INSERT INTO product_slots VALUES(78,193); +INSERT INTO product_slots VALUES(78,194); +INSERT INTO product_slots VALUES(78,195); +INSERT INTO product_slots VALUES(78,196); +INSERT INTO product_slots VALUES(78,197); +INSERT INTO product_slots VALUES(78,198); +INSERT INTO product_slots VALUES(78,199); +INSERT INTO product_slots VALUES(78,200); +INSERT INTO product_slots VALUES(78,201); +INSERT INTO product_slots VALUES(78,202); +INSERT INTO product_slots VALUES(78,203); +INSERT INTO product_slots VALUES(78,204); +INSERT INTO product_slots VALUES(78,205); +INSERT INTO product_slots VALUES(78,206); +INSERT INTO product_slots VALUES(78,207); +INSERT INTO product_slots VALUES(78,208); +INSERT INTO product_slots VALUES(78,209); +INSERT INTO product_slots VALUES(78,210); +INSERT INTO product_slots VALUES(78,211); +INSERT INTO product_slots VALUES(78,212); +INSERT INTO product_slots VALUES(78,213); +INSERT INTO product_slots VALUES(78,214); +INSERT INTO product_slots VALUES(78,215); +INSERT INTO product_slots VALUES(78,216); +INSERT INTO product_slots VALUES(78,217); +INSERT INTO product_slots VALUES(78,218); +INSERT INTO product_slots VALUES(78,219); +INSERT INTO product_slots VALUES(78,220); +INSERT INTO product_slots VALUES(78,221); +INSERT INTO product_slots VALUES(78,222); +INSERT INTO product_slots VALUES(78,223); +INSERT INTO product_slots VALUES(78,224); +INSERT INTO product_slots VALUES(78,225); +INSERT INTO product_slots VALUES(78,226); +INSERT INTO product_slots VALUES(78,227); +INSERT INTO product_slots VALUES(78,228); +INSERT INTO product_slots VALUES(78,229); +INSERT INTO product_slots VALUES(78,230); +INSERT INTO product_slots VALUES(78,231); +INSERT INTO product_slots VALUES(78,232); +INSERT INTO product_slots VALUES(78,233); +INSERT INTO product_slots VALUES(78,234); +INSERT INTO product_slots VALUES(78,235); +INSERT INTO product_slots VALUES(78,236); +INSERT INTO product_slots VALUES(78,237); +INSERT INTO product_slots VALUES(78,238); +INSERT INTO product_slots VALUES(78,239); +INSERT INTO product_slots VALUES(78,240); +INSERT INTO product_slots VALUES(78,241); +INSERT INTO product_slots VALUES(78,242); +INSERT INTO product_slots VALUES(78,243); +INSERT INTO product_slots VALUES(78,244); +INSERT INTO product_slots VALUES(78,274); +INSERT INTO product_slots VALUES(78,275); +INSERT INTO product_slots VALUES(78,279); +INSERT INTO product_slots VALUES(78,280); +INSERT INTO product_slots VALUES(78,281); +INSERT INTO product_slots VALUES(78,282); +INSERT INTO product_slots VALUES(78,283); +INSERT INTO product_slots VALUES(78,284); +INSERT INTO product_slots VALUES(78,285); +INSERT INTO product_slots VALUES(78,286); +INSERT INTO product_slots VALUES(78,287); +INSERT INTO product_slots VALUES(79,39); +INSERT INTO product_slots VALUES(79,41); +INSERT INTO product_slots VALUES(79,43); +INSERT INTO product_slots VALUES(79,44); +INSERT INTO product_slots VALUES(79,45); +INSERT INTO product_slots VALUES(79,46); +INSERT INTO product_slots VALUES(79,47); +INSERT INTO product_slots VALUES(79,48); +INSERT INTO product_slots VALUES(79,49); +INSERT INTO product_slots VALUES(79,50); +INSERT INTO product_slots VALUES(79,51); +INSERT INTO product_slots VALUES(79,52); +INSERT INTO product_slots VALUES(79,53); +INSERT INTO product_slots VALUES(79,54); +INSERT INTO product_slots VALUES(79,55); +INSERT INTO product_slots VALUES(79,56); +INSERT INTO product_slots VALUES(79,57); +INSERT INTO product_slots VALUES(79,58); +INSERT INTO product_slots VALUES(79,59); +INSERT INTO product_slots VALUES(79,60); +INSERT INTO product_slots VALUES(79,61); +INSERT INTO product_slots VALUES(79,62); +INSERT INTO product_slots VALUES(79,63); +INSERT INTO product_slots VALUES(79,64); +INSERT INTO product_slots VALUES(79,65); +INSERT INTO product_slots VALUES(79,66); +INSERT INTO product_slots VALUES(79,67); +INSERT INTO product_slots VALUES(79,68); +INSERT INTO product_slots VALUES(79,69); +INSERT INTO product_slots VALUES(79,70); +INSERT INTO product_slots VALUES(79,71); +INSERT INTO product_slots VALUES(79,72); +INSERT INTO product_slots VALUES(79,73); +INSERT INTO product_slots VALUES(79,74); +INSERT INTO product_slots VALUES(79,75); +INSERT INTO product_slots VALUES(79,76); +INSERT INTO product_slots VALUES(79,77); +INSERT INTO product_slots VALUES(79,78); +INSERT INTO product_slots VALUES(79,79); +INSERT INTO product_slots VALUES(79,80); +INSERT INTO product_slots VALUES(79,81); +INSERT INTO product_slots VALUES(79,82); +INSERT INTO product_slots VALUES(79,83); +INSERT INTO product_slots VALUES(79,84); +INSERT INTO product_slots VALUES(79,85); +INSERT INTO product_slots VALUES(79,86); +INSERT INTO product_slots VALUES(79,87); +INSERT INTO product_slots VALUES(79,88); +INSERT INTO product_slots VALUES(79,89); +INSERT INTO product_slots VALUES(79,90); +INSERT INTO product_slots VALUES(79,91); +INSERT INTO product_slots VALUES(79,92); +INSERT INTO product_slots VALUES(79,93); +INSERT INTO product_slots VALUES(79,94); +INSERT INTO product_slots VALUES(79,95); +INSERT INTO product_slots VALUES(79,96); +INSERT INTO product_slots VALUES(79,97); +INSERT INTO product_slots VALUES(79,98); +INSERT INTO product_slots VALUES(79,99); +INSERT INTO product_slots VALUES(79,100); +INSERT INTO product_slots VALUES(79,101); +INSERT INTO product_slots VALUES(79,102); +INSERT INTO product_slots VALUES(79,103); +INSERT INTO product_slots VALUES(79,104); +INSERT INTO product_slots VALUES(79,105); +INSERT INTO product_slots VALUES(79,106); +INSERT INTO product_slots VALUES(79,107); +INSERT INTO product_slots VALUES(79,108); +INSERT INTO product_slots VALUES(79,109); +INSERT INTO product_slots VALUES(79,110); +INSERT INTO product_slots VALUES(79,111); +INSERT INTO product_slots VALUES(79,112); +INSERT INTO product_slots VALUES(79,113); +INSERT INTO product_slots VALUES(79,114); +INSERT INTO product_slots VALUES(79,115); +INSERT INTO product_slots VALUES(79,116); +INSERT INTO product_slots VALUES(79,117); +INSERT INTO product_slots VALUES(79,118); +INSERT INTO product_slots VALUES(79,119); +INSERT INTO product_slots VALUES(79,120); +INSERT INTO product_slots VALUES(79,121); +INSERT INTO product_slots VALUES(79,122); +INSERT INTO product_slots VALUES(79,123); +INSERT INTO product_slots VALUES(79,124); +INSERT INTO product_slots VALUES(79,125); +INSERT INTO product_slots VALUES(79,126); +INSERT INTO product_slots VALUES(79,127); +INSERT INTO product_slots VALUES(79,128); +INSERT INTO product_slots VALUES(79,129); +INSERT INTO product_slots VALUES(79,130); +INSERT INTO product_slots VALUES(79,131); +INSERT INTO product_slots VALUES(79,132); +INSERT INTO product_slots VALUES(79,133); +INSERT INTO product_slots VALUES(79,134); +INSERT INTO product_slots VALUES(79,135); +INSERT INTO product_slots VALUES(79,136); +INSERT INTO product_slots VALUES(79,137); +INSERT INTO product_slots VALUES(79,138); +INSERT INTO product_slots VALUES(79,139); +INSERT INTO product_slots VALUES(79,140); +INSERT INTO product_slots VALUES(79,141); +INSERT INTO product_slots VALUES(79,142); +INSERT INTO product_slots VALUES(79,143); +INSERT INTO product_slots VALUES(79,144); +INSERT INTO product_slots VALUES(79,145); +INSERT INTO product_slots VALUES(79,146); +INSERT INTO product_slots VALUES(79,147); +INSERT INTO product_slots VALUES(79,148); +INSERT INTO product_slots VALUES(79,149); +INSERT INTO product_slots VALUES(79,150); +INSERT INTO product_slots VALUES(79,151); +INSERT INTO product_slots VALUES(79,152); +INSERT INTO product_slots VALUES(79,153); +INSERT INTO product_slots VALUES(79,154); +INSERT INTO product_slots VALUES(79,155); +INSERT INTO product_slots VALUES(79,156); +INSERT INTO product_slots VALUES(79,157); +INSERT INTO product_slots VALUES(79,158); +INSERT INTO product_slots VALUES(79,159); +INSERT INTO product_slots VALUES(79,160); +INSERT INTO product_slots VALUES(79,161); +INSERT INTO product_slots VALUES(79,162); +INSERT INTO product_slots VALUES(79,163); +INSERT INTO product_slots VALUES(79,164); +INSERT INTO product_slots VALUES(79,165); +INSERT INTO product_slots VALUES(79,166); +INSERT INTO product_slots VALUES(79,167); +INSERT INTO product_slots VALUES(79,168); +INSERT INTO product_slots VALUES(79,169); +INSERT INTO product_slots VALUES(79,170); +INSERT INTO product_slots VALUES(79,171); +INSERT INTO product_slots VALUES(79,172); +INSERT INTO product_slots VALUES(79,173); +INSERT INTO product_slots VALUES(79,174); +INSERT INTO product_slots VALUES(79,175); +INSERT INTO product_slots VALUES(79,176); +INSERT INTO product_slots VALUES(79,177); +INSERT INTO product_slots VALUES(79,178); +INSERT INTO product_slots VALUES(79,179); +INSERT INTO product_slots VALUES(79,180); +INSERT INTO product_slots VALUES(79,181); +INSERT INTO product_slots VALUES(79,182); +INSERT INTO product_slots VALUES(79,183); +INSERT INTO product_slots VALUES(79,184); +INSERT INTO product_slots VALUES(79,185); +INSERT INTO product_slots VALUES(79,186); +INSERT INTO product_slots VALUES(79,187); +INSERT INTO product_slots VALUES(79,188); +INSERT INTO product_slots VALUES(79,189); +INSERT INTO product_slots VALUES(79,190); +INSERT INTO product_slots VALUES(79,191); +INSERT INTO product_slots VALUES(79,192); +INSERT INTO product_slots VALUES(79,193); +INSERT INTO product_slots VALUES(79,194); +INSERT INTO product_slots VALUES(79,195); +INSERT INTO product_slots VALUES(79,196); +INSERT INTO product_slots VALUES(79,197); +INSERT INTO product_slots VALUES(79,198); +INSERT INTO product_slots VALUES(79,199); +INSERT INTO product_slots VALUES(79,200); +INSERT INTO product_slots VALUES(79,201); +INSERT INTO product_slots VALUES(79,202); +INSERT INTO product_slots VALUES(79,203); +INSERT INTO product_slots VALUES(79,204); +INSERT INTO product_slots VALUES(79,205); +INSERT INTO product_slots VALUES(79,206); +INSERT INTO product_slots VALUES(79,207); +INSERT INTO product_slots VALUES(79,208); +INSERT INTO product_slots VALUES(79,209); +INSERT INTO product_slots VALUES(79,210); +INSERT INTO product_slots VALUES(79,211); +INSERT INTO product_slots VALUES(79,212); +INSERT INTO product_slots VALUES(79,213); +INSERT INTO product_slots VALUES(79,214); +INSERT INTO product_slots VALUES(79,215); +INSERT INTO product_slots VALUES(79,216); +INSERT INTO product_slots VALUES(79,217); +INSERT INTO product_slots VALUES(79,218); +INSERT INTO product_slots VALUES(79,219); +INSERT INTO product_slots VALUES(79,220); +INSERT INTO product_slots VALUES(79,221); +INSERT INTO product_slots VALUES(79,222); +INSERT INTO product_slots VALUES(79,223); +INSERT INTO product_slots VALUES(79,224); +INSERT INTO product_slots VALUES(79,225); +INSERT INTO product_slots VALUES(79,226); +INSERT INTO product_slots VALUES(79,227); +INSERT INTO product_slots VALUES(79,228); +INSERT INTO product_slots VALUES(79,229); +INSERT INTO product_slots VALUES(79,230); +INSERT INTO product_slots VALUES(79,231); +INSERT INTO product_slots VALUES(79,232); +INSERT INTO product_slots VALUES(79,233); +INSERT INTO product_slots VALUES(79,234); +INSERT INTO product_slots VALUES(79,235); +INSERT INTO product_slots VALUES(79,236); +INSERT INTO product_slots VALUES(79,237); +INSERT INTO product_slots VALUES(79,238); +INSERT INTO product_slots VALUES(79,239); +INSERT INTO product_slots VALUES(79,240); +INSERT INTO product_slots VALUES(79,241); +INSERT INTO product_slots VALUES(79,242); +INSERT INTO product_slots VALUES(79,243); +INSERT INTO product_slots VALUES(79,244); +INSERT INTO product_slots VALUES(79,274); +INSERT INTO product_slots VALUES(79,275); +INSERT INTO product_slots VALUES(79,279); +INSERT INTO product_slots VALUES(79,280); +INSERT INTO product_slots VALUES(79,281); +INSERT INTO product_slots VALUES(79,282); +INSERT INTO product_slots VALUES(79,283); +INSERT INTO product_slots VALUES(79,284); +INSERT INTO product_slots VALUES(79,285); +INSERT INTO product_slots VALUES(79,286); +INSERT INTO product_slots VALUES(79,287); +INSERT INTO product_slots VALUES(80,39); +INSERT INTO product_slots VALUES(80,41); +INSERT INTO product_slots VALUES(80,43); +INSERT INTO product_slots VALUES(80,45); +INSERT INTO product_slots VALUES(80,46); +INSERT INTO product_slots VALUES(80,47); +INSERT INTO product_slots VALUES(80,48); +INSERT INTO product_slots VALUES(80,49); +INSERT INTO product_slots VALUES(80,50); +INSERT INTO product_slots VALUES(80,51); +INSERT INTO product_slots VALUES(80,52); +INSERT INTO product_slots VALUES(80,53); +INSERT INTO product_slots VALUES(80,54); +INSERT INTO product_slots VALUES(80,55); +INSERT INTO product_slots VALUES(80,56); +INSERT INTO product_slots VALUES(80,57); +INSERT INTO product_slots VALUES(80,58); +INSERT INTO product_slots VALUES(80,59); +INSERT INTO product_slots VALUES(80,60); +INSERT INTO product_slots VALUES(80,61); +INSERT INTO product_slots VALUES(80,64); +INSERT INTO product_slots VALUES(80,65); +INSERT INTO product_slots VALUES(80,66); +INSERT INTO product_slots VALUES(80,67); +INSERT INTO product_slots VALUES(80,68); +INSERT INTO product_slots VALUES(80,69); +INSERT INTO product_slots VALUES(80,70); +INSERT INTO product_slots VALUES(80,71); +INSERT INTO product_slots VALUES(80,72); +INSERT INTO product_slots VALUES(80,73); +INSERT INTO product_slots VALUES(80,74); +INSERT INTO product_slots VALUES(80,75); +INSERT INTO product_slots VALUES(80,76); +INSERT INTO product_slots VALUES(80,77); +INSERT INTO product_slots VALUES(80,78); +INSERT INTO product_slots VALUES(80,79); +INSERT INTO product_slots VALUES(80,80); +INSERT INTO product_slots VALUES(80,81); +INSERT INTO product_slots VALUES(80,82); +INSERT INTO product_slots VALUES(80,83); +INSERT INTO product_slots VALUES(80,84); +INSERT INTO product_slots VALUES(80,85); +INSERT INTO product_slots VALUES(80,86); +INSERT INTO product_slots VALUES(80,87); +INSERT INTO product_slots VALUES(80,88); +INSERT INTO product_slots VALUES(80,89); +INSERT INTO product_slots VALUES(80,90); +INSERT INTO product_slots VALUES(80,91); +INSERT INTO product_slots VALUES(80,92); +INSERT INTO product_slots VALUES(80,93); +INSERT INTO product_slots VALUES(80,94); +INSERT INTO product_slots VALUES(80,95); +INSERT INTO product_slots VALUES(80,96); +INSERT INTO product_slots VALUES(80,97); +INSERT INTO product_slots VALUES(80,98); +INSERT INTO product_slots VALUES(80,99); +INSERT INTO product_slots VALUES(80,100); +INSERT INTO product_slots VALUES(80,101); +INSERT INTO product_slots VALUES(80,102); +INSERT INTO product_slots VALUES(80,103); +INSERT INTO product_slots VALUES(80,104); +INSERT INTO product_slots VALUES(80,105); +INSERT INTO product_slots VALUES(80,106); +INSERT INTO product_slots VALUES(80,107); +INSERT INTO product_slots VALUES(80,108); +INSERT INTO product_slots VALUES(80,109); +INSERT INTO product_slots VALUES(80,110); +INSERT INTO product_slots VALUES(80,111); +INSERT INTO product_slots VALUES(80,112); +INSERT INTO product_slots VALUES(80,113); +INSERT INTO product_slots VALUES(80,114); +INSERT INTO product_slots VALUES(80,115); +INSERT INTO product_slots VALUES(80,116); +INSERT INTO product_slots VALUES(80,117); +INSERT INTO product_slots VALUES(80,118); +INSERT INTO product_slots VALUES(80,119); +INSERT INTO product_slots VALUES(80,120); +INSERT INTO product_slots VALUES(80,121); +INSERT INTO product_slots VALUES(80,122); +INSERT INTO product_slots VALUES(80,123); +INSERT INTO product_slots VALUES(80,124); +INSERT INTO product_slots VALUES(80,125); +INSERT INTO product_slots VALUES(80,126); +INSERT INTO product_slots VALUES(80,127); +INSERT INTO product_slots VALUES(80,128); +INSERT INTO product_slots VALUES(80,129); +INSERT INTO product_slots VALUES(80,130); +INSERT INTO product_slots VALUES(80,131); +INSERT INTO product_slots VALUES(80,132); +INSERT INTO product_slots VALUES(80,133); +INSERT INTO product_slots VALUES(80,134); +INSERT INTO product_slots VALUES(80,135); +INSERT INTO product_slots VALUES(80,136); +INSERT INTO product_slots VALUES(80,137); +INSERT INTO product_slots VALUES(80,138); +INSERT INTO product_slots VALUES(80,139); +INSERT INTO product_slots VALUES(80,140); +INSERT INTO product_slots VALUES(80,141); +INSERT INTO product_slots VALUES(80,142); +INSERT INTO product_slots VALUES(80,143); +INSERT INTO product_slots VALUES(80,144); +INSERT INTO product_slots VALUES(80,145); +INSERT INTO product_slots VALUES(80,146); +INSERT INTO product_slots VALUES(80,147); +INSERT INTO product_slots VALUES(80,148); +INSERT INTO product_slots VALUES(80,149); +INSERT INTO product_slots VALUES(80,150); +INSERT INTO product_slots VALUES(80,151); +INSERT INTO product_slots VALUES(80,152); +INSERT INTO product_slots VALUES(80,153); +INSERT INTO product_slots VALUES(80,154); +INSERT INTO product_slots VALUES(80,155); +INSERT INTO product_slots VALUES(80,156); +INSERT INTO product_slots VALUES(80,157); +INSERT INTO product_slots VALUES(80,158); +INSERT INTO product_slots VALUES(80,159); +INSERT INTO product_slots VALUES(80,160); +INSERT INTO product_slots VALUES(80,161); +INSERT INTO product_slots VALUES(80,162); +INSERT INTO product_slots VALUES(80,163); +INSERT INTO product_slots VALUES(80,164); +INSERT INTO product_slots VALUES(80,165); +INSERT INTO product_slots VALUES(80,166); +INSERT INTO product_slots VALUES(80,167); +INSERT INTO product_slots VALUES(80,168); +INSERT INTO product_slots VALUES(80,169); +INSERT INTO product_slots VALUES(80,170); +INSERT INTO product_slots VALUES(80,171); +INSERT INTO product_slots VALUES(80,172); +INSERT INTO product_slots VALUES(80,173); +INSERT INTO product_slots VALUES(80,174); +INSERT INTO product_slots VALUES(80,175); +INSERT INTO product_slots VALUES(80,176); +INSERT INTO product_slots VALUES(80,177); +INSERT INTO product_slots VALUES(80,178); +INSERT INTO product_slots VALUES(80,179); +INSERT INTO product_slots VALUES(80,180); +INSERT INTO product_slots VALUES(80,181); +INSERT INTO product_slots VALUES(80,182); +INSERT INTO product_slots VALUES(80,183); +INSERT INTO product_slots VALUES(80,184); +INSERT INTO product_slots VALUES(80,185); +INSERT INTO product_slots VALUES(80,186); +INSERT INTO product_slots VALUES(80,187); +INSERT INTO product_slots VALUES(80,188); +INSERT INTO product_slots VALUES(80,189); +INSERT INTO product_slots VALUES(80,190); +INSERT INTO product_slots VALUES(80,191); +INSERT INTO product_slots VALUES(80,192); +INSERT INTO product_slots VALUES(80,193); +INSERT INTO product_slots VALUES(80,194); +INSERT INTO product_slots VALUES(80,195); +INSERT INTO product_slots VALUES(80,196); +INSERT INTO product_slots VALUES(80,197); +INSERT INTO product_slots VALUES(80,198); +INSERT INTO product_slots VALUES(80,199); +INSERT INTO product_slots VALUES(80,200); +INSERT INTO product_slots VALUES(80,201); +INSERT INTO product_slots VALUES(80,202); +INSERT INTO product_slots VALUES(80,203); +INSERT INTO product_slots VALUES(80,204); +INSERT INTO product_slots VALUES(80,205); +INSERT INTO product_slots VALUES(80,206); +INSERT INTO product_slots VALUES(80,207); +INSERT INTO product_slots VALUES(80,208); +INSERT INTO product_slots VALUES(80,209); +INSERT INTO product_slots VALUES(80,210); +INSERT INTO product_slots VALUES(80,211); +INSERT INTO product_slots VALUES(80,212); +INSERT INTO product_slots VALUES(80,213); +INSERT INTO product_slots VALUES(80,214); +INSERT INTO product_slots VALUES(80,215); +INSERT INTO product_slots VALUES(80,216); +INSERT INTO product_slots VALUES(80,217); +INSERT INTO product_slots VALUES(80,218); +INSERT INTO product_slots VALUES(80,219); +INSERT INTO product_slots VALUES(80,220); +INSERT INTO product_slots VALUES(80,221); +INSERT INTO product_slots VALUES(80,222); +INSERT INTO product_slots VALUES(80,223); +INSERT INTO product_slots VALUES(80,224); +INSERT INTO product_slots VALUES(80,225); +INSERT INTO product_slots VALUES(80,226); +INSERT INTO product_slots VALUES(80,227); +INSERT INTO product_slots VALUES(80,228); +INSERT INTO product_slots VALUES(80,229); +INSERT INTO product_slots VALUES(80,230); +INSERT INTO product_slots VALUES(80,231); +INSERT INTO product_slots VALUES(80,232); +INSERT INTO product_slots VALUES(80,233); +INSERT INTO product_slots VALUES(80,234); +INSERT INTO product_slots VALUES(80,235); +INSERT INTO product_slots VALUES(80,236); +INSERT INTO product_slots VALUES(80,237); +INSERT INTO product_slots VALUES(80,238); +INSERT INTO product_slots VALUES(80,239); +INSERT INTO product_slots VALUES(80,240); +INSERT INTO product_slots VALUES(80,241); +INSERT INTO product_slots VALUES(80,242); +INSERT INTO product_slots VALUES(80,243); +INSERT INTO product_slots VALUES(80,244); +INSERT INTO product_slots VALUES(80,274); +INSERT INTO product_slots VALUES(80,275); +INSERT INTO product_slots VALUES(80,279); +INSERT INTO product_slots VALUES(80,280); +INSERT INTO product_slots VALUES(80,281); +INSERT INTO product_slots VALUES(80,282); +INSERT INTO product_slots VALUES(81,39); +INSERT INTO product_slots VALUES(81,43); +INSERT INTO product_slots VALUES(81,45); +INSERT INTO product_slots VALUES(81,48); +INSERT INTO product_slots VALUES(81,49); +INSERT INTO product_slots VALUES(81,51); +INSERT INTO product_slots VALUES(81,52); +INSERT INTO product_slots VALUES(81,57); +INSERT INTO product_slots VALUES(81,58); +INSERT INTO product_slots VALUES(81,59); +INSERT INTO product_slots VALUES(81,62); +INSERT INTO product_slots VALUES(81,63); +INSERT INTO product_slots VALUES(81,64); +INSERT INTO product_slots VALUES(81,65); +INSERT INTO product_slots VALUES(81,66); +INSERT INTO product_slots VALUES(81,67); +INSERT INTO product_slots VALUES(81,69); +INSERT INTO product_slots VALUES(81,70); +INSERT INTO product_slots VALUES(81,71); +INSERT INTO product_slots VALUES(81,72); +INSERT INTO product_slots VALUES(81,73); +INSERT INTO product_slots VALUES(81,75); +INSERT INTO product_slots VALUES(81,82); +INSERT INTO product_slots VALUES(81,83); +INSERT INTO product_slots VALUES(81,84); +INSERT INTO product_slots VALUES(81,90); +INSERT INTO product_slots VALUES(81,91); +INSERT INTO product_slots VALUES(81,97); +INSERT INTO product_slots VALUES(81,98); +INSERT INTO product_slots VALUES(81,102); +INSERT INTO product_slots VALUES(81,103); +INSERT INTO product_slots VALUES(81,104); +INSERT INTO product_slots VALUES(81,110); +INSERT INTO product_slots VALUES(81,111); +INSERT INTO product_slots VALUES(81,112); +INSERT INTO product_slots VALUES(81,116); +INSERT INTO product_slots VALUES(81,117); +INSERT INTO product_slots VALUES(81,118); +INSERT INTO product_slots VALUES(81,119); +INSERT INTO product_slots VALUES(81,120); +INSERT INTO product_slots VALUES(81,121); +INSERT INTO product_slots VALUES(81,122); +INSERT INTO product_slots VALUES(81,123); +INSERT INTO product_slots VALUES(81,124); +INSERT INTO product_slots VALUES(81,125); +INSERT INTO product_slots VALUES(81,126); +INSERT INTO product_slots VALUES(81,127); +INSERT INTO product_slots VALUES(81,128); +INSERT INTO product_slots VALUES(81,129); +INSERT INTO product_slots VALUES(81,130); +INSERT INTO product_slots VALUES(81,131); +INSERT INTO product_slots VALUES(81,132); +INSERT INTO product_slots VALUES(81,133); +INSERT INTO product_slots VALUES(81,134); +INSERT INTO product_slots VALUES(81,135); +INSERT INTO product_slots VALUES(81,136); +INSERT INTO product_slots VALUES(81,137); +INSERT INTO product_slots VALUES(81,138); +INSERT INTO product_slots VALUES(81,139); +INSERT INTO product_slots VALUES(81,140); +INSERT INTO product_slots VALUES(81,141); +INSERT INTO product_slots VALUES(81,142); +INSERT INTO product_slots VALUES(81,143); +INSERT INTO product_slots VALUES(81,144); +INSERT INTO product_slots VALUES(81,145); +INSERT INTO product_slots VALUES(81,146); +INSERT INTO product_slots VALUES(81,147); +INSERT INTO product_slots VALUES(81,148); +INSERT INTO product_slots VALUES(81,149); +INSERT INTO product_slots VALUES(81,150); +INSERT INTO product_slots VALUES(81,151); +INSERT INTO product_slots VALUES(81,152); +INSERT INTO product_slots VALUES(81,153); +INSERT INTO product_slots VALUES(81,154); +INSERT INTO product_slots VALUES(81,155); +INSERT INTO product_slots VALUES(81,156); +INSERT INTO product_slots VALUES(81,157); +INSERT INTO product_slots VALUES(81,158); +INSERT INTO product_slots VALUES(81,159); +INSERT INTO product_slots VALUES(81,160); +INSERT INTO product_slots VALUES(81,161); +INSERT INTO product_slots VALUES(81,162); +INSERT INTO product_slots VALUES(81,163); +INSERT INTO product_slots VALUES(81,164); +INSERT INTO product_slots VALUES(81,165); +INSERT INTO product_slots VALUES(81,166); +INSERT INTO product_slots VALUES(81,167); +INSERT INTO product_slots VALUES(81,168); +INSERT INTO product_slots VALUES(81,169); +INSERT INTO product_slots VALUES(81,170); +INSERT INTO product_slots VALUES(81,171); +INSERT INTO product_slots VALUES(81,172); +INSERT INTO product_slots VALUES(81,173); +INSERT INTO product_slots VALUES(81,174); +INSERT INTO product_slots VALUES(81,175); +INSERT INTO product_slots VALUES(81,176); +INSERT INTO product_slots VALUES(81,177); +INSERT INTO product_slots VALUES(81,178); +INSERT INTO product_slots VALUES(81,179); +INSERT INTO product_slots VALUES(81,180); +INSERT INTO product_slots VALUES(81,181); +INSERT INTO product_slots VALUES(81,182); +INSERT INTO product_slots VALUES(81,183); +INSERT INTO product_slots VALUES(81,184); +INSERT INTO product_slots VALUES(81,185); +INSERT INTO product_slots VALUES(81,186); +INSERT INTO product_slots VALUES(81,187); +INSERT INTO product_slots VALUES(81,188); +INSERT INTO product_slots VALUES(81,189); +INSERT INTO product_slots VALUES(81,190); +INSERT INTO product_slots VALUES(81,191); +INSERT INTO product_slots VALUES(81,192); +INSERT INTO product_slots VALUES(81,193); +INSERT INTO product_slots VALUES(81,194); +INSERT INTO product_slots VALUES(81,195); +INSERT INTO product_slots VALUES(81,196); +INSERT INTO product_slots VALUES(81,197); +INSERT INTO product_slots VALUES(81,198); +INSERT INTO product_slots VALUES(81,199); +INSERT INTO product_slots VALUES(81,200); +INSERT INTO product_slots VALUES(81,201); +INSERT INTO product_slots VALUES(81,202); +INSERT INTO product_slots VALUES(81,203); +INSERT INTO product_slots VALUES(81,204); +INSERT INTO product_slots VALUES(81,205); +INSERT INTO product_slots VALUES(81,206); +INSERT INTO product_slots VALUES(81,207); +INSERT INTO product_slots VALUES(81,208); +INSERT INTO product_slots VALUES(81,209); +INSERT INTO product_slots VALUES(81,210); +INSERT INTO product_slots VALUES(81,211); +INSERT INTO product_slots VALUES(81,212); +INSERT INTO product_slots VALUES(81,213); +INSERT INTO product_slots VALUES(81,214); +INSERT INTO product_slots VALUES(81,215); +INSERT INTO product_slots VALUES(81,216); +INSERT INTO product_slots VALUES(81,217); +INSERT INTO product_slots VALUES(81,218); +INSERT INTO product_slots VALUES(81,219); +INSERT INTO product_slots VALUES(81,220); +INSERT INTO product_slots VALUES(81,221); +INSERT INTO product_slots VALUES(81,222); +INSERT INTO product_slots VALUES(81,223); +INSERT INTO product_slots VALUES(81,224); +INSERT INTO product_slots VALUES(81,225); +INSERT INTO product_slots VALUES(81,226); +INSERT INTO product_slots VALUES(81,227); +INSERT INTO product_slots VALUES(81,228); +INSERT INTO product_slots VALUES(81,229); +INSERT INTO product_slots VALUES(81,230); +INSERT INTO product_slots VALUES(81,231); +INSERT INTO product_slots VALUES(81,232); +INSERT INTO product_slots VALUES(81,233); +INSERT INTO product_slots VALUES(81,234); +INSERT INTO product_slots VALUES(81,235); +INSERT INTO product_slots VALUES(81,236); +INSERT INTO product_slots VALUES(81,237); +INSERT INTO product_slots VALUES(81,238); +INSERT INTO product_slots VALUES(81,239); +INSERT INTO product_slots VALUES(81,240); +INSERT INTO product_slots VALUES(81,241); +INSERT INTO product_slots VALUES(81,242); +INSERT INTO product_slots VALUES(81,243); +INSERT INTO product_slots VALUES(81,244); +INSERT INTO product_slots VALUES(81,274); +INSERT INTO product_slots VALUES(81,275); +INSERT INTO product_slots VALUES(81,279); +INSERT INTO product_slots VALUES(81,280); +INSERT INTO product_slots VALUES(81,281); +INSERT INTO product_slots VALUES(81,282); +INSERT INTO product_slots VALUES(81,283); +INSERT INTO product_slots VALUES(81,284); +INSERT INTO product_slots VALUES(81,285); +INSERT INTO product_slots VALUES(81,286); +INSERT INTO product_slots VALUES(81,287); +INSERT INTO product_slots VALUES(82,39); +INSERT INTO product_slots VALUES(82,43); +INSERT INTO product_slots VALUES(82,45); +INSERT INTO product_slots VALUES(82,48); +INSERT INTO product_slots VALUES(82,49); +INSERT INTO product_slots VALUES(82,51); +INSERT INTO product_slots VALUES(82,52); +INSERT INTO product_slots VALUES(82,57); +INSERT INTO product_slots VALUES(82,58); +INSERT INTO product_slots VALUES(82,59); +INSERT INTO product_slots VALUES(82,62); +INSERT INTO product_slots VALUES(82,63); +INSERT INTO product_slots VALUES(82,64); +INSERT INTO product_slots VALUES(82,65); +INSERT INTO product_slots VALUES(82,66); +INSERT INTO product_slots VALUES(82,67); +INSERT INTO product_slots VALUES(82,69); +INSERT INTO product_slots VALUES(82,70); +INSERT INTO product_slots VALUES(82,71); +INSERT INTO product_slots VALUES(82,72); +INSERT INTO product_slots VALUES(82,73); +INSERT INTO product_slots VALUES(82,75); +INSERT INTO product_slots VALUES(82,82); +INSERT INTO product_slots VALUES(82,83); +INSERT INTO product_slots VALUES(82,84); +INSERT INTO product_slots VALUES(82,90); +INSERT INTO product_slots VALUES(82,91); +INSERT INTO product_slots VALUES(82,92); +INSERT INTO product_slots VALUES(82,93); +INSERT INTO product_slots VALUES(82,94); +INSERT INTO product_slots VALUES(82,97); +INSERT INTO product_slots VALUES(82,98); +INSERT INTO product_slots VALUES(82,99); +INSERT INTO product_slots VALUES(82,100); +INSERT INTO product_slots VALUES(82,102); +INSERT INTO product_slots VALUES(82,103); +INSERT INTO product_slots VALUES(82,104); +INSERT INTO product_slots VALUES(82,110); +INSERT INTO product_slots VALUES(82,111); +INSERT INTO product_slots VALUES(82,112); +INSERT INTO product_slots VALUES(82,116); +INSERT INTO product_slots VALUES(82,117); +INSERT INTO product_slots VALUES(82,118); +INSERT INTO product_slots VALUES(82,119); +INSERT INTO product_slots VALUES(82,120); +INSERT INTO product_slots VALUES(82,121); +INSERT INTO product_slots VALUES(82,122); +INSERT INTO product_slots VALUES(82,123); +INSERT INTO product_slots VALUES(82,124); +INSERT INTO product_slots VALUES(82,125); +INSERT INTO product_slots VALUES(82,126); +INSERT INTO product_slots VALUES(82,127); +INSERT INTO product_slots VALUES(82,128); +INSERT INTO product_slots VALUES(82,129); +INSERT INTO product_slots VALUES(82,130); +INSERT INTO product_slots VALUES(82,131); +INSERT INTO product_slots VALUES(82,132); +INSERT INTO product_slots VALUES(82,133); +INSERT INTO product_slots VALUES(82,134); +INSERT INTO product_slots VALUES(82,135); +INSERT INTO product_slots VALUES(82,136); +INSERT INTO product_slots VALUES(82,137); +INSERT INTO product_slots VALUES(82,138); +INSERT INTO product_slots VALUES(82,139); +INSERT INTO product_slots VALUES(82,140); +INSERT INTO product_slots VALUES(82,141); +INSERT INTO product_slots VALUES(82,142); +INSERT INTO product_slots VALUES(82,143); +INSERT INTO product_slots VALUES(82,144); +INSERT INTO product_slots VALUES(82,145); +INSERT INTO product_slots VALUES(82,146); +INSERT INTO product_slots VALUES(82,147); +INSERT INTO product_slots VALUES(82,148); +INSERT INTO product_slots VALUES(82,149); +INSERT INTO product_slots VALUES(82,150); +INSERT INTO product_slots VALUES(82,151); +INSERT INTO product_slots VALUES(82,152); +INSERT INTO product_slots VALUES(82,153); +INSERT INTO product_slots VALUES(82,154); +INSERT INTO product_slots VALUES(82,155); +INSERT INTO product_slots VALUES(82,156); +INSERT INTO product_slots VALUES(82,157); +INSERT INTO product_slots VALUES(82,158); +INSERT INTO product_slots VALUES(82,159); +INSERT INTO product_slots VALUES(82,160); +INSERT INTO product_slots VALUES(82,161); +INSERT INTO product_slots VALUES(82,162); +INSERT INTO product_slots VALUES(82,163); +INSERT INTO product_slots VALUES(82,164); +INSERT INTO product_slots VALUES(82,165); +INSERT INTO product_slots VALUES(82,166); +INSERT INTO product_slots VALUES(82,167); +INSERT INTO product_slots VALUES(82,168); +INSERT INTO product_slots VALUES(82,169); +INSERT INTO product_slots VALUES(82,170); +INSERT INTO product_slots VALUES(82,171); +INSERT INTO product_slots VALUES(82,172); +INSERT INTO product_slots VALUES(82,173); +INSERT INTO product_slots VALUES(82,174); +INSERT INTO product_slots VALUES(82,175); +INSERT INTO product_slots VALUES(82,176); +INSERT INTO product_slots VALUES(82,177); +INSERT INTO product_slots VALUES(82,178); +INSERT INTO product_slots VALUES(82,179); +INSERT INTO product_slots VALUES(82,180); +INSERT INTO product_slots VALUES(82,181); +INSERT INTO product_slots VALUES(82,182); +INSERT INTO product_slots VALUES(82,183); +INSERT INTO product_slots VALUES(82,184); +INSERT INTO product_slots VALUES(82,185); +INSERT INTO product_slots VALUES(82,186); +INSERT INTO product_slots VALUES(82,187); +INSERT INTO product_slots VALUES(82,188); +INSERT INTO product_slots VALUES(82,189); +INSERT INTO product_slots VALUES(82,190); +INSERT INTO product_slots VALUES(82,191); +INSERT INTO product_slots VALUES(82,192); +INSERT INTO product_slots VALUES(82,193); +INSERT INTO product_slots VALUES(82,194); +INSERT INTO product_slots VALUES(82,195); +INSERT INTO product_slots VALUES(82,196); +INSERT INTO product_slots VALUES(82,197); +INSERT INTO product_slots VALUES(82,198); +INSERT INTO product_slots VALUES(82,199); +INSERT INTO product_slots VALUES(82,200); +INSERT INTO product_slots VALUES(82,201); +INSERT INTO product_slots VALUES(82,202); +INSERT INTO product_slots VALUES(82,203); +INSERT INTO product_slots VALUES(82,204); +INSERT INTO product_slots VALUES(82,205); +INSERT INTO product_slots VALUES(82,206); +INSERT INTO product_slots VALUES(82,207); +INSERT INTO product_slots VALUES(82,208); +INSERT INTO product_slots VALUES(82,209); +INSERT INTO product_slots VALUES(82,210); +INSERT INTO product_slots VALUES(82,211); +INSERT INTO product_slots VALUES(82,212); +INSERT INTO product_slots VALUES(82,213); +INSERT INTO product_slots VALUES(82,214); +INSERT INTO product_slots VALUES(82,215); +INSERT INTO product_slots VALUES(82,216); +INSERT INTO product_slots VALUES(82,217); +INSERT INTO product_slots VALUES(82,218); +INSERT INTO product_slots VALUES(82,219); +INSERT INTO product_slots VALUES(82,220); +INSERT INTO product_slots VALUES(82,221); +INSERT INTO product_slots VALUES(82,222); +INSERT INTO product_slots VALUES(82,223); +INSERT INTO product_slots VALUES(82,224); +INSERT INTO product_slots VALUES(82,225); +INSERT INTO product_slots VALUES(82,226); +INSERT INTO product_slots VALUES(82,227); +INSERT INTO product_slots VALUES(82,228); +INSERT INTO product_slots VALUES(82,229); +INSERT INTO product_slots VALUES(82,230); +INSERT INTO product_slots VALUES(82,231); +INSERT INTO product_slots VALUES(82,232); +INSERT INTO product_slots VALUES(82,233); +INSERT INTO product_slots VALUES(82,234); +INSERT INTO product_slots VALUES(82,235); +INSERT INTO product_slots VALUES(82,236); +INSERT INTO product_slots VALUES(82,237); +INSERT INTO product_slots VALUES(82,238); +INSERT INTO product_slots VALUES(82,239); +INSERT INTO product_slots VALUES(82,240); +INSERT INTO product_slots VALUES(82,241); +INSERT INTO product_slots VALUES(82,242); +INSERT INTO product_slots VALUES(82,243); +INSERT INTO product_slots VALUES(82,244); +INSERT INTO product_slots VALUES(82,274); +INSERT INTO product_slots VALUES(82,275); +INSERT INTO product_slots VALUES(82,279); +INSERT INTO product_slots VALUES(82,280); +INSERT INTO product_slots VALUES(82,281); +INSERT INTO product_slots VALUES(82,282); +INSERT INTO product_slots VALUES(82,283); +INSERT INTO product_slots VALUES(82,284); +INSERT INTO product_slots VALUES(82,285); +INSERT INTO product_slots VALUES(82,286); +INSERT INTO product_slots VALUES(82,287); +INSERT INTO product_slots VALUES(83,39); +INSERT INTO product_slots VALUES(83,43); +INSERT INTO product_slots VALUES(83,45); +INSERT INTO product_slots VALUES(83,48); +INSERT INTO product_slots VALUES(83,49); +INSERT INTO product_slots VALUES(83,51); +INSERT INTO product_slots VALUES(83,52); +INSERT INTO product_slots VALUES(83,57); +INSERT INTO product_slots VALUES(83,58); +INSERT INTO product_slots VALUES(83,59); +INSERT INTO product_slots VALUES(83,62); +INSERT INTO product_slots VALUES(83,63); +INSERT INTO product_slots VALUES(83,64); +INSERT INTO product_slots VALUES(83,65); +INSERT INTO product_slots VALUES(83,66); +INSERT INTO product_slots VALUES(83,67); +INSERT INTO product_slots VALUES(83,69); +INSERT INTO product_slots VALUES(83,70); +INSERT INTO product_slots VALUES(83,71); +INSERT INTO product_slots VALUES(83,72); +INSERT INTO product_slots VALUES(83,73); +INSERT INTO product_slots VALUES(83,75); +INSERT INTO product_slots VALUES(83,82); +INSERT INTO product_slots VALUES(83,83); +INSERT INTO product_slots VALUES(83,84); +INSERT INTO product_slots VALUES(83,90); +INSERT INTO product_slots VALUES(83,91); +INSERT INTO product_slots VALUES(83,97); +INSERT INTO product_slots VALUES(83,98); +INSERT INTO product_slots VALUES(83,102); +INSERT INTO product_slots VALUES(83,103); +INSERT INTO product_slots VALUES(83,104); +INSERT INTO product_slots VALUES(83,110); +INSERT INTO product_slots VALUES(83,111); +INSERT INTO product_slots VALUES(83,112); +INSERT INTO product_slots VALUES(83,116); +INSERT INTO product_slots VALUES(83,117); +INSERT INTO product_slots VALUES(83,118); +INSERT INTO product_slots VALUES(83,119); +INSERT INTO product_slots VALUES(83,120); +INSERT INTO product_slots VALUES(83,121); +INSERT INTO product_slots VALUES(83,122); +INSERT INTO product_slots VALUES(83,123); +INSERT INTO product_slots VALUES(83,124); +INSERT INTO product_slots VALUES(83,125); +INSERT INTO product_slots VALUES(83,126); +INSERT INTO product_slots VALUES(83,127); +INSERT INTO product_slots VALUES(83,128); +INSERT INTO product_slots VALUES(83,129); +INSERT INTO product_slots VALUES(83,130); +INSERT INTO product_slots VALUES(83,131); +INSERT INTO product_slots VALUES(83,132); +INSERT INTO product_slots VALUES(83,133); +INSERT INTO product_slots VALUES(83,134); +INSERT INTO product_slots VALUES(83,135); +INSERT INTO product_slots VALUES(83,136); +INSERT INTO product_slots VALUES(83,137); +INSERT INTO product_slots VALUES(83,138); +INSERT INTO product_slots VALUES(83,139); +INSERT INTO product_slots VALUES(83,140); +INSERT INTO product_slots VALUES(83,141); +INSERT INTO product_slots VALUES(83,142); +INSERT INTO product_slots VALUES(83,143); +INSERT INTO product_slots VALUES(83,144); +INSERT INTO product_slots VALUES(83,145); +INSERT INTO product_slots VALUES(83,146); +INSERT INTO product_slots VALUES(83,147); +INSERT INTO product_slots VALUES(83,148); +INSERT INTO product_slots VALUES(83,149); +INSERT INTO product_slots VALUES(83,150); +INSERT INTO product_slots VALUES(83,151); +INSERT INTO product_slots VALUES(83,152); +INSERT INTO product_slots VALUES(83,153); +INSERT INTO product_slots VALUES(83,154); +INSERT INTO product_slots VALUES(83,155); +INSERT INTO product_slots VALUES(83,156); +INSERT INTO product_slots VALUES(83,157); +INSERT INTO product_slots VALUES(83,158); +INSERT INTO product_slots VALUES(83,159); +INSERT INTO product_slots VALUES(83,160); +INSERT INTO product_slots VALUES(83,161); +INSERT INTO product_slots VALUES(83,162); +INSERT INTO product_slots VALUES(83,163); +INSERT INTO product_slots VALUES(83,164); +INSERT INTO product_slots VALUES(83,165); +INSERT INTO product_slots VALUES(83,166); +INSERT INTO product_slots VALUES(83,167); +INSERT INTO product_slots VALUES(83,168); +INSERT INTO product_slots VALUES(83,169); +INSERT INTO product_slots VALUES(83,170); +INSERT INTO product_slots VALUES(83,171); +INSERT INTO product_slots VALUES(83,172); +INSERT INTO product_slots VALUES(83,173); +INSERT INTO product_slots VALUES(83,174); +INSERT INTO product_slots VALUES(83,175); +INSERT INTO product_slots VALUES(83,176); +INSERT INTO product_slots VALUES(83,177); +INSERT INTO product_slots VALUES(83,178); +INSERT INTO product_slots VALUES(83,179); +INSERT INTO product_slots VALUES(83,180); +INSERT INTO product_slots VALUES(83,181); +INSERT INTO product_slots VALUES(83,182); +INSERT INTO product_slots VALUES(83,183); +INSERT INTO product_slots VALUES(83,184); +INSERT INTO product_slots VALUES(83,185); +INSERT INTO product_slots VALUES(83,186); +INSERT INTO product_slots VALUES(83,187); +INSERT INTO product_slots VALUES(83,188); +INSERT INTO product_slots VALUES(83,189); +INSERT INTO product_slots VALUES(83,190); +INSERT INTO product_slots VALUES(83,191); +INSERT INTO product_slots VALUES(83,192); +INSERT INTO product_slots VALUES(83,193); +INSERT INTO product_slots VALUES(83,194); +INSERT INTO product_slots VALUES(83,195); +INSERT INTO product_slots VALUES(83,196); +INSERT INTO product_slots VALUES(83,197); +INSERT INTO product_slots VALUES(83,198); +INSERT INTO product_slots VALUES(83,199); +INSERT INTO product_slots VALUES(83,200); +INSERT INTO product_slots VALUES(83,201); +INSERT INTO product_slots VALUES(83,202); +INSERT INTO product_slots VALUES(83,203); +INSERT INTO product_slots VALUES(83,204); +INSERT INTO product_slots VALUES(83,205); +INSERT INTO product_slots VALUES(83,206); +INSERT INTO product_slots VALUES(83,207); +INSERT INTO product_slots VALUES(83,208); +INSERT INTO product_slots VALUES(83,209); +INSERT INTO product_slots VALUES(83,210); +INSERT INTO product_slots VALUES(83,211); +INSERT INTO product_slots VALUES(83,212); +INSERT INTO product_slots VALUES(83,213); +INSERT INTO product_slots VALUES(83,214); +INSERT INTO product_slots VALUES(83,215); +INSERT INTO product_slots VALUES(83,216); +INSERT INTO product_slots VALUES(83,217); +INSERT INTO product_slots VALUES(83,218); +INSERT INTO product_slots VALUES(83,219); +INSERT INTO product_slots VALUES(83,220); +INSERT INTO product_slots VALUES(83,221); +INSERT INTO product_slots VALUES(83,222); +INSERT INTO product_slots VALUES(83,223); +INSERT INTO product_slots VALUES(83,224); +INSERT INTO product_slots VALUES(83,225); +INSERT INTO product_slots VALUES(83,226); +INSERT INTO product_slots VALUES(83,227); +INSERT INTO product_slots VALUES(83,228); +INSERT INTO product_slots VALUES(83,229); +INSERT INTO product_slots VALUES(83,230); +INSERT INTO product_slots VALUES(83,231); +INSERT INTO product_slots VALUES(83,232); +INSERT INTO product_slots VALUES(83,233); +INSERT INTO product_slots VALUES(83,234); +INSERT INTO product_slots VALUES(83,235); +INSERT INTO product_slots VALUES(83,236); +INSERT INTO product_slots VALUES(83,237); +INSERT INTO product_slots VALUES(83,238); +INSERT INTO product_slots VALUES(83,239); +INSERT INTO product_slots VALUES(83,240); +INSERT INTO product_slots VALUES(83,241); +INSERT INTO product_slots VALUES(83,242); +INSERT INTO product_slots VALUES(83,243); +INSERT INTO product_slots VALUES(83,244); +INSERT INTO product_slots VALUES(83,274); +INSERT INTO product_slots VALUES(83,275); +INSERT INTO product_slots VALUES(83,279); +INSERT INTO product_slots VALUES(83,280); +INSERT INTO product_slots VALUES(83,281); +INSERT INTO product_slots VALUES(83,282); +INSERT INTO product_slots VALUES(83,283); +INSERT INTO product_slots VALUES(83,284); +INSERT INTO product_slots VALUES(83,285); +INSERT INTO product_slots VALUES(83,286); +INSERT INTO product_slots VALUES(83,287); +INSERT INTO product_slots VALUES(85,81); +INSERT INTO product_slots VALUES(85,82); +INSERT INTO product_slots VALUES(85,83); +INSERT INTO product_slots VALUES(85,91); +INSERT INTO product_slots VALUES(85,92); +INSERT INTO product_slots VALUES(85,93); +INSERT INTO product_slots VALUES(85,94); +INSERT INTO product_slots VALUES(85,98); +INSERT INTO product_slots VALUES(85,99); +INSERT INTO product_slots VALUES(85,100); +INSERT INTO product_slots VALUES(85,105); +INSERT INTO product_slots VALUES(85,106); +INSERT INTO product_slots VALUES(85,107); +INSERT INTO product_slots VALUES(85,108); +INSERT INTO product_slots VALUES(85,109); +INSERT INTO product_slots VALUES(85,110); +INSERT INTO product_slots VALUES(85,111); +INSERT INTO product_slots VALUES(85,112); +INSERT INTO product_slots VALUES(85,113); +INSERT INTO product_slots VALUES(85,114); +INSERT INTO product_slots VALUES(85,115); +INSERT INTO product_slots VALUES(85,120); +INSERT INTO product_slots VALUES(85,134); +INSERT INTO product_slots VALUES(85,135); +INSERT INTO product_slots VALUES(85,136); +INSERT INTO product_slots VALUES(85,187); +INSERT INTO product_slots VALUES(86,39); +INSERT INTO product_slots VALUES(86,41); +INSERT INTO product_slots VALUES(86,43); +INSERT INTO product_slots VALUES(86,45); +INSERT INTO product_slots VALUES(86,46); +INSERT INTO product_slots VALUES(86,47); +INSERT INTO product_slots VALUES(86,48); +INSERT INTO product_slots VALUES(86,49); +INSERT INTO product_slots VALUES(86,50); +INSERT INTO product_slots VALUES(86,51); +INSERT INTO product_slots VALUES(86,52); +INSERT INTO product_slots VALUES(86,53); +INSERT INTO product_slots VALUES(86,54); +INSERT INTO product_slots VALUES(86,55); +INSERT INTO product_slots VALUES(86,56); +INSERT INTO product_slots VALUES(86,57); +INSERT INTO product_slots VALUES(86,58); +INSERT INTO product_slots VALUES(86,59); +INSERT INTO product_slots VALUES(86,60); +INSERT INTO product_slots VALUES(86,61); +INSERT INTO product_slots VALUES(86,62); +INSERT INTO product_slots VALUES(86,63); +INSERT INTO product_slots VALUES(86,64); +INSERT INTO product_slots VALUES(86,65); +INSERT INTO product_slots VALUES(86,66); +INSERT INTO product_slots VALUES(86,67); +INSERT INTO product_slots VALUES(86,68); +INSERT INTO product_slots VALUES(86,69); +INSERT INTO product_slots VALUES(86,70); +INSERT INTO product_slots VALUES(86,71); +INSERT INTO product_slots VALUES(86,74); +INSERT INTO product_slots VALUES(86,75); +INSERT INTO product_slots VALUES(86,76); +INSERT INTO product_slots VALUES(86,77); +INSERT INTO product_slots VALUES(86,78); +INSERT INTO product_slots VALUES(86,81); +INSERT INTO product_slots VALUES(86,82); +INSERT INTO product_slots VALUES(86,83); +INSERT INTO product_slots VALUES(86,84); +INSERT INTO product_slots VALUES(86,87); +INSERT INTO product_slots VALUES(86,88); +INSERT INTO product_slots VALUES(86,90); +INSERT INTO product_slots VALUES(86,91); +INSERT INTO product_slots VALUES(86,95); +INSERT INTO product_slots VALUES(86,97); +INSERT INTO product_slots VALUES(86,98); +INSERT INTO product_slots VALUES(86,101); +INSERT INTO product_slots VALUES(86,102); +INSERT INTO product_slots VALUES(86,103); +INSERT INTO product_slots VALUES(86,104); +INSERT INTO product_slots VALUES(86,109); +INSERT INTO product_slots VALUES(86,110); +INSERT INTO product_slots VALUES(86,111); +INSERT INTO product_slots VALUES(86,112); +INSERT INTO product_slots VALUES(86,116); +INSERT INTO product_slots VALUES(86,117); +INSERT INTO product_slots VALUES(86,118); +INSERT INTO product_slots VALUES(86,119); +INSERT INTO product_slots VALUES(86,120); +INSERT INTO product_slots VALUES(86,123); +INSERT INTO product_slots VALUES(86,124); +INSERT INTO product_slots VALUES(86,125); +INSERT INTO product_slots VALUES(86,126); +INSERT INTO product_slots VALUES(86,130); +INSERT INTO product_slots VALUES(86,131); +INSERT INTO product_slots VALUES(86,132); +INSERT INTO product_slots VALUES(86,133); +INSERT INTO product_slots VALUES(86,137); +INSERT INTO product_slots VALUES(86,138); +INSERT INTO product_slots VALUES(86,139); +INSERT INTO product_slots VALUES(86,140); +INSERT INTO product_slots VALUES(86,144); +INSERT INTO product_slots VALUES(86,145); +INSERT INTO product_slots VALUES(86,146); +INSERT INTO product_slots VALUES(86,147); +INSERT INTO product_slots VALUES(86,148); +INSERT INTO product_slots VALUES(86,149); +INSERT INTO product_slots VALUES(86,150); +INSERT INTO product_slots VALUES(86,151); +INSERT INTO product_slots VALUES(86,155); +INSERT INTO product_slots VALUES(86,156); +INSERT INTO product_slots VALUES(86,157); +INSERT INTO product_slots VALUES(86,158); +INSERT INTO product_slots VALUES(86,162); +INSERT INTO product_slots VALUES(86,163); +INSERT INTO product_slots VALUES(86,164); +INSERT INTO product_slots VALUES(86,165); +INSERT INTO product_slots VALUES(86,166); +INSERT INTO product_slots VALUES(86,169); +INSERT INTO product_slots VALUES(86,170); +INSERT INTO product_slots VALUES(86,171); +INSERT INTO product_slots VALUES(86,172); +INSERT INTO product_slots VALUES(86,176); +INSERT INTO product_slots VALUES(86,177); +INSERT INTO product_slots VALUES(86,178); +INSERT INTO product_slots VALUES(86,179); +INSERT INTO product_slots VALUES(86,183); +INSERT INTO product_slots VALUES(86,184); +INSERT INTO product_slots VALUES(86,185); +INSERT INTO product_slots VALUES(86,186); +INSERT INTO product_slots VALUES(86,187); +INSERT INTO product_slots VALUES(86,188); +INSERT INTO product_slots VALUES(86,189); +INSERT INTO product_slots VALUES(86,190); +INSERT INTO product_slots VALUES(86,191); +INSERT INTO product_slots VALUES(86,192); +INSERT INTO product_slots VALUES(86,193); +INSERT INTO product_slots VALUES(86,194); +INSERT INTO product_slots VALUES(86,198); +INSERT INTO product_slots VALUES(86,199); +INSERT INTO product_slots VALUES(86,200); +INSERT INTO product_slots VALUES(86,201); +INSERT INTO product_slots VALUES(86,202); +INSERT INTO product_slots VALUES(86,203); +INSERT INTO product_slots VALUES(86,205); +INSERT INTO product_slots VALUES(86,208); +INSERT INTO product_slots VALUES(86,209); +INSERT INTO product_slots VALUES(86,210); +INSERT INTO product_slots VALUES(86,211); +INSERT INTO product_slots VALUES(86,216); +INSERT INTO product_slots VALUES(86,217); +INSERT INTO product_slots VALUES(86,218); +INSERT INTO product_slots VALUES(86,219); +INSERT INTO product_slots VALUES(86,220); +INSERT INTO product_slots VALUES(86,223); +INSERT INTO product_slots VALUES(86,224); +INSERT INTO product_slots VALUES(86,225); +INSERT INTO product_slots VALUES(86,226); +INSERT INTO product_slots VALUES(86,230); +INSERT INTO product_slots VALUES(86,231); +INSERT INTO product_slots VALUES(86,232); +INSERT INTO product_slots VALUES(86,234); +INSERT INTO product_slots VALUES(86,237); +INSERT INTO product_slots VALUES(86,238); +INSERT INTO product_slots VALUES(86,239); +INSERT INTO product_slots VALUES(86,240); +INSERT INTO product_slots VALUES(86,274); +INSERT INTO product_slots VALUES(86,275); +INSERT INTO product_slots VALUES(86,277); +INSERT INTO product_slots VALUES(86,278); +INSERT INTO product_slots VALUES(86,279); +INSERT INTO product_slots VALUES(88,39); +INSERT INTO product_slots VALUES(88,44); +INSERT INTO product_slots VALUES(88,46); +INSERT INTO product_slots VALUES(88,47); +INSERT INTO product_slots VALUES(88,48); +INSERT INTO product_slots VALUES(88,49); +INSERT INTO product_slots VALUES(88,50); +INSERT INTO product_slots VALUES(88,51); +INSERT INTO product_slots VALUES(88,52); +INSERT INTO product_slots VALUES(88,53); +INSERT INTO product_slots VALUES(88,54); +INSERT INTO product_slots VALUES(88,55); +INSERT INTO product_slots VALUES(88,56); +INSERT INTO product_slots VALUES(88,57); +INSERT INTO product_slots VALUES(88,58); +INSERT INTO product_slots VALUES(88,59); +INSERT INTO product_slots VALUES(88,60); +INSERT INTO product_slots VALUES(88,61); +INSERT INTO product_slots VALUES(88,62); +INSERT INTO product_slots VALUES(88,63); +INSERT INTO product_slots VALUES(88,64); +INSERT INTO product_slots VALUES(88,65); +INSERT INTO product_slots VALUES(88,66); +INSERT INTO product_slots VALUES(88,67); +INSERT INTO product_slots VALUES(88,68); +INSERT INTO product_slots VALUES(88,69); +INSERT INTO product_slots VALUES(88,70); +INSERT INTO product_slots VALUES(88,71); +INSERT INTO product_slots VALUES(88,72); +INSERT INTO product_slots VALUES(88,73); +INSERT INTO product_slots VALUES(88,74); +INSERT INTO product_slots VALUES(88,75); +INSERT INTO product_slots VALUES(88,76); +INSERT INTO product_slots VALUES(88,77); +INSERT INTO product_slots VALUES(88,78); +INSERT INTO product_slots VALUES(88,79); +INSERT INTO product_slots VALUES(88,80); +INSERT INTO product_slots VALUES(88,87); +INSERT INTO product_slots VALUES(88,88); +INSERT INTO product_slots VALUES(88,95); +INSERT INTO product_slots VALUES(88,101); +INSERT INTO product_slots VALUES(88,102); +INSERT INTO product_slots VALUES(88,103); +INSERT INTO product_slots VALUES(88,104); +INSERT INTO product_slots VALUES(88,105); +INSERT INTO product_slots VALUES(88,106); +INSERT INTO product_slots VALUES(88,107); +INSERT INTO product_slots VALUES(88,108); +INSERT INTO product_slots VALUES(88,109); +INSERT INTO product_slots VALUES(88,110); +INSERT INTO product_slots VALUES(88,111); +INSERT INTO product_slots VALUES(88,112); +INSERT INTO product_slots VALUES(88,113); +INSERT INTO product_slots VALUES(88,114); +INSERT INTO product_slots VALUES(88,115); +INSERT INTO product_slots VALUES(88,116); +INSERT INTO product_slots VALUES(88,117); +INSERT INTO product_slots VALUES(88,118); +INSERT INTO product_slots VALUES(88,119); +INSERT INTO product_slots VALUES(88,120); +INSERT INTO product_slots VALUES(88,121); +INSERT INTO product_slots VALUES(88,122); +INSERT INTO product_slots VALUES(88,123); +INSERT INTO product_slots VALUES(88,124); +INSERT INTO product_slots VALUES(88,125); +INSERT INTO product_slots VALUES(88,126); +INSERT INTO product_slots VALUES(88,127); +INSERT INTO product_slots VALUES(88,128); +INSERT INTO product_slots VALUES(88,129); +INSERT INTO product_slots VALUES(88,130); +INSERT INTO product_slots VALUES(88,131); +INSERT INTO product_slots VALUES(88,132); +INSERT INTO product_slots VALUES(88,133); +INSERT INTO product_slots VALUES(88,137); +INSERT INTO product_slots VALUES(88,138); +INSERT INTO product_slots VALUES(88,139); +INSERT INTO product_slots VALUES(88,141); +INSERT INTO product_slots VALUES(88,144); +INSERT INTO product_slots VALUES(88,156); +INSERT INTO product_slots VALUES(88,164); +INSERT INTO product_slots VALUES(88,165); +INSERT INTO product_slots VALUES(88,166); +INSERT INTO product_slots VALUES(88,167); +INSERT INTO product_slots VALUES(88,169); +INSERT INTO product_slots VALUES(88,176); +INSERT INTO product_slots VALUES(88,187); +INSERT INTO product_slots VALUES(88,203); +INSERT INTO product_slots VALUES(88,204); +INSERT INTO product_slots VALUES(88,205); +INSERT INTO product_slots VALUES(88,206); +INSERT INTO product_slots VALUES(88,207); +INSERT INTO product_slots VALUES(88,208); +INSERT INTO product_slots VALUES(88,209); +INSERT INTO product_slots VALUES(88,210); +INSERT INTO product_slots VALUES(88,211); +INSERT INTO product_slots VALUES(88,212); +INSERT INTO product_slots VALUES(88,213); +INSERT INTO product_slots VALUES(88,214); +INSERT INTO product_slots VALUES(88,215); +INSERT INTO product_slots VALUES(88,216); +INSERT INTO product_slots VALUES(88,217); +INSERT INTO product_slots VALUES(88,218); +INSERT INTO product_slots VALUES(88,219); +INSERT INTO product_slots VALUES(88,220); +INSERT INTO product_slots VALUES(88,221); +INSERT INTO product_slots VALUES(88,222); +INSERT INTO product_slots VALUES(88,223); +INSERT INTO product_slots VALUES(88,224); +INSERT INTO product_slots VALUES(88,225); +INSERT INTO product_slots VALUES(88,226); +INSERT INTO product_slots VALUES(88,227); +INSERT INTO product_slots VALUES(88,228); +INSERT INTO product_slots VALUES(88,229); +INSERT INTO product_slots VALUES(88,230); +INSERT INTO product_slots VALUES(88,231); +INSERT INTO product_slots VALUES(88,232); +INSERT INTO product_slots VALUES(88,233); +INSERT INTO product_slots VALUES(88,234); +INSERT INTO product_slots VALUES(88,235); +INSERT INTO product_slots VALUES(88,236); +INSERT INTO product_slots VALUES(88,237); +INSERT INTO product_slots VALUES(88,238); +INSERT INTO product_slots VALUES(88,239); +INSERT INTO product_slots VALUES(88,240); +INSERT INTO product_slots VALUES(88,241); +INSERT INTO product_slots VALUES(88,242); +INSERT INTO product_slots VALUES(88,243); +INSERT INTO product_slots VALUES(88,244); +INSERT INTO product_slots VALUES(88,274); +INSERT INTO product_slots VALUES(88,275); +INSERT INTO product_slots VALUES(88,279); +INSERT INTO product_slots VALUES(88,280); +INSERT INTO product_slots VALUES(88,281); +INSERT INTO product_slots VALUES(88,282); +INSERT INTO product_slots VALUES(88,283); +INSERT INTO product_slots VALUES(88,284); +INSERT INTO product_slots VALUES(88,285); +INSERT INTO product_slots VALUES(88,286); +INSERT INTO product_slots VALUES(88,287); +INSERT INTO product_slots VALUES(89,39); +INSERT INTO product_slots VALUES(89,44); +INSERT INTO product_slots VALUES(89,46); +INSERT INTO product_slots VALUES(89,47); +INSERT INTO product_slots VALUES(89,48); +INSERT INTO product_slots VALUES(89,49); +INSERT INTO product_slots VALUES(89,50); +INSERT INTO product_slots VALUES(89,51); +INSERT INTO product_slots VALUES(89,52); +INSERT INTO product_slots VALUES(89,53); +INSERT INTO product_slots VALUES(89,54); +INSERT INTO product_slots VALUES(89,55); +INSERT INTO product_slots VALUES(89,56); +INSERT INTO product_slots VALUES(89,57); +INSERT INTO product_slots VALUES(89,58); +INSERT INTO product_slots VALUES(89,59); +INSERT INTO product_slots VALUES(89,60); +INSERT INTO product_slots VALUES(89,61); +INSERT INTO product_slots VALUES(89,62); +INSERT INTO product_slots VALUES(89,63); +INSERT INTO product_slots VALUES(89,64); +INSERT INTO product_slots VALUES(89,65); +INSERT INTO product_slots VALUES(89,66); +INSERT INTO product_slots VALUES(89,67); +INSERT INTO product_slots VALUES(89,68); +INSERT INTO product_slots VALUES(89,69); +INSERT INTO product_slots VALUES(89,70); +INSERT INTO product_slots VALUES(89,71); +INSERT INTO product_slots VALUES(89,72); +INSERT INTO product_slots VALUES(89,73); +INSERT INTO product_slots VALUES(89,74); +INSERT INTO product_slots VALUES(89,75); +INSERT INTO product_slots VALUES(89,76); +INSERT INTO product_slots VALUES(89,77); +INSERT INTO product_slots VALUES(89,78); +INSERT INTO product_slots VALUES(89,79); +INSERT INTO product_slots VALUES(89,80); +INSERT INTO product_slots VALUES(89,81); +INSERT INTO product_slots VALUES(89,82); +INSERT INTO product_slots VALUES(89,83); +INSERT INTO product_slots VALUES(89,84); +INSERT INTO product_slots VALUES(89,85); +INSERT INTO product_slots VALUES(89,86); +INSERT INTO product_slots VALUES(89,87); +INSERT INTO product_slots VALUES(89,88); +INSERT INTO product_slots VALUES(89,89); +INSERT INTO product_slots VALUES(89,90); +INSERT INTO product_slots VALUES(89,91); +INSERT INTO product_slots VALUES(89,92); +INSERT INTO product_slots VALUES(89,93); +INSERT INTO product_slots VALUES(89,94); +INSERT INTO product_slots VALUES(89,95); +INSERT INTO product_slots VALUES(89,96); +INSERT INTO product_slots VALUES(89,97); +INSERT INTO product_slots VALUES(89,98); +INSERT INTO product_slots VALUES(89,99); +INSERT INTO product_slots VALUES(89,100); +INSERT INTO product_slots VALUES(89,101); +INSERT INTO product_slots VALUES(89,102); +INSERT INTO product_slots VALUES(89,103); +INSERT INTO product_slots VALUES(89,104); +INSERT INTO product_slots VALUES(89,105); +INSERT INTO product_slots VALUES(89,106); +INSERT INTO product_slots VALUES(89,107); +INSERT INTO product_slots VALUES(89,108); +INSERT INTO product_slots VALUES(89,109); +INSERT INTO product_slots VALUES(89,110); +INSERT INTO product_slots VALUES(89,111); +INSERT INTO product_slots VALUES(89,112); +INSERT INTO product_slots VALUES(89,113); +INSERT INTO product_slots VALUES(89,114); +INSERT INTO product_slots VALUES(89,115); +INSERT INTO product_slots VALUES(89,116); +INSERT INTO product_slots VALUES(89,117); +INSERT INTO product_slots VALUES(89,118); +INSERT INTO product_slots VALUES(89,119); +INSERT INTO product_slots VALUES(89,120); +INSERT INTO product_slots VALUES(89,121); +INSERT INTO product_slots VALUES(89,122); +INSERT INTO product_slots VALUES(89,123); +INSERT INTO product_slots VALUES(89,124); +INSERT INTO product_slots VALUES(89,125); +INSERT INTO product_slots VALUES(89,126); +INSERT INTO product_slots VALUES(89,127); +INSERT INTO product_slots VALUES(89,128); +INSERT INTO product_slots VALUES(89,129); +INSERT INTO product_slots VALUES(89,130); +INSERT INTO product_slots VALUES(89,131); +INSERT INTO product_slots VALUES(89,132); +INSERT INTO product_slots VALUES(89,133); +INSERT INTO product_slots VALUES(89,134); +INSERT INTO product_slots VALUES(89,135); +INSERT INTO product_slots VALUES(89,136); +INSERT INTO product_slots VALUES(89,137); +INSERT INTO product_slots VALUES(89,138); +INSERT INTO product_slots VALUES(89,139); +INSERT INTO product_slots VALUES(89,140); +INSERT INTO product_slots VALUES(89,141); +INSERT INTO product_slots VALUES(89,142); +INSERT INTO product_slots VALUES(89,143); +INSERT INTO product_slots VALUES(89,144); +INSERT INTO product_slots VALUES(89,145); +INSERT INTO product_slots VALUES(89,146); +INSERT INTO product_slots VALUES(89,147); +INSERT INTO product_slots VALUES(89,148); +INSERT INTO product_slots VALUES(89,149); +INSERT INTO product_slots VALUES(89,150); +INSERT INTO product_slots VALUES(89,151); +INSERT INTO product_slots VALUES(89,152); +INSERT INTO product_slots VALUES(89,153); +INSERT INTO product_slots VALUES(89,154); +INSERT INTO product_slots VALUES(89,155); +INSERT INTO product_slots VALUES(89,156); +INSERT INTO product_slots VALUES(89,157); +INSERT INTO product_slots VALUES(89,158); +INSERT INTO product_slots VALUES(89,159); +INSERT INTO product_slots VALUES(89,160); +INSERT INTO product_slots VALUES(89,161); +INSERT INTO product_slots VALUES(89,162); +INSERT INTO product_slots VALUES(89,163); +INSERT INTO product_slots VALUES(89,164); +INSERT INTO product_slots VALUES(89,165); +INSERT INTO product_slots VALUES(89,166); +INSERT INTO product_slots VALUES(89,167); +INSERT INTO product_slots VALUES(89,168); +INSERT INTO product_slots VALUES(89,169); +INSERT INTO product_slots VALUES(89,170); +INSERT INTO product_slots VALUES(89,171); +INSERT INTO product_slots VALUES(89,172); +INSERT INTO product_slots VALUES(89,173); +INSERT INTO product_slots VALUES(89,174); +INSERT INTO product_slots VALUES(89,175); +INSERT INTO product_slots VALUES(89,176); +INSERT INTO product_slots VALUES(89,177); +INSERT INTO product_slots VALUES(89,178); +INSERT INTO product_slots VALUES(89,179); +INSERT INTO product_slots VALUES(89,180); +INSERT INTO product_slots VALUES(89,181); +INSERT INTO product_slots VALUES(89,182); +INSERT INTO product_slots VALUES(89,183); +INSERT INTO product_slots VALUES(89,184); +INSERT INTO product_slots VALUES(89,185); +INSERT INTO product_slots VALUES(89,186); +INSERT INTO product_slots VALUES(89,187); +INSERT INTO product_slots VALUES(89,188); +INSERT INTO product_slots VALUES(89,189); +INSERT INTO product_slots VALUES(89,190); +INSERT INTO product_slots VALUES(89,191); +INSERT INTO product_slots VALUES(89,192); +INSERT INTO product_slots VALUES(89,193); +INSERT INTO product_slots VALUES(89,194); +INSERT INTO product_slots VALUES(89,195); +INSERT INTO product_slots VALUES(89,196); +INSERT INTO product_slots VALUES(89,197); +INSERT INTO product_slots VALUES(89,198); +INSERT INTO product_slots VALUES(89,199); +INSERT INTO product_slots VALUES(89,200); +INSERT INTO product_slots VALUES(89,201); +INSERT INTO product_slots VALUES(89,202); +INSERT INTO product_slots VALUES(89,203); +INSERT INTO product_slots VALUES(89,204); +INSERT INTO product_slots VALUES(89,205); +INSERT INTO product_slots VALUES(89,206); +INSERT INTO product_slots VALUES(89,207); +INSERT INTO product_slots VALUES(89,208); +INSERT INTO product_slots VALUES(89,209); +INSERT INTO product_slots VALUES(89,210); +INSERT INTO product_slots VALUES(89,211); +INSERT INTO product_slots VALUES(89,212); +INSERT INTO product_slots VALUES(89,213); +INSERT INTO product_slots VALUES(89,214); +INSERT INTO product_slots VALUES(89,215); +INSERT INTO product_slots VALUES(89,216); +INSERT INTO product_slots VALUES(89,217); +INSERT INTO product_slots VALUES(89,218); +INSERT INTO product_slots VALUES(89,219); +INSERT INTO product_slots VALUES(89,220); +INSERT INTO product_slots VALUES(89,221); +INSERT INTO product_slots VALUES(89,222); +INSERT INTO product_slots VALUES(89,223); +INSERT INTO product_slots VALUES(89,224); +INSERT INTO product_slots VALUES(89,225); +INSERT INTO product_slots VALUES(89,226); +INSERT INTO product_slots VALUES(89,227); +INSERT INTO product_slots VALUES(89,228); +INSERT INTO product_slots VALUES(89,229); +INSERT INTO product_slots VALUES(89,230); +INSERT INTO product_slots VALUES(89,231); +INSERT INTO product_slots VALUES(89,232); +INSERT INTO product_slots VALUES(89,233); +INSERT INTO product_slots VALUES(89,234); +INSERT INTO product_slots VALUES(89,235); +INSERT INTO product_slots VALUES(89,236); +INSERT INTO product_slots VALUES(89,237); +INSERT INTO product_slots VALUES(89,238); +INSERT INTO product_slots VALUES(89,239); +INSERT INTO product_slots VALUES(89,240); +INSERT INTO product_slots VALUES(89,241); +INSERT INTO product_slots VALUES(89,242); +INSERT INTO product_slots VALUES(89,243); +INSERT INTO product_slots VALUES(89,244); +INSERT INTO product_slots VALUES(89,274); +INSERT INTO product_slots VALUES(89,275); +INSERT INTO product_slots VALUES(89,279); +INSERT INTO product_slots VALUES(89,280); +INSERT INTO product_slots VALUES(89,281); +INSERT INTO product_slots VALUES(89,282); +INSERT INTO product_slots VALUES(89,283); +INSERT INTO product_slots VALUES(89,284); +INSERT INTO product_slots VALUES(89,285); +INSERT INTO product_slots VALUES(89,286); +INSERT INTO product_slots VALUES(89,287); +INSERT INTO product_slots VALUES(90,39); +INSERT INTO product_slots VALUES(90,44); +INSERT INTO product_slots VALUES(90,46); +INSERT INTO product_slots VALUES(90,47); +INSERT INTO product_slots VALUES(90,48); +INSERT INTO product_slots VALUES(90,49); +INSERT INTO product_slots VALUES(90,50); +INSERT INTO product_slots VALUES(90,51); +INSERT INTO product_slots VALUES(90,52); +INSERT INTO product_slots VALUES(90,53); +INSERT INTO product_slots VALUES(90,54); +INSERT INTO product_slots VALUES(90,55); +INSERT INTO product_slots VALUES(90,56); +INSERT INTO product_slots VALUES(90,57); +INSERT INTO product_slots VALUES(90,58); +INSERT INTO product_slots VALUES(90,59); +INSERT INTO product_slots VALUES(90,60); +INSERT INTO product_slots VALUES(90,61); +INSERT INTO product_slots VALUES(90,62); +INSERT INTO product_slots VALUES(90,63); +INSERT INTO product_slots VALUES(90,64); +INSERT INTO product_slots VALUES(90,65); +INSERT INTO product_slots VALUES(90,66); +INSERT INTO product_slots VALUES(90,67); +INSERT INTO product_slots VALUES(90,68); +INSERT INTO product_slots VALUES(90,69); +INSERT INTO product_slots VALUES(90,70); +INSERT INTO product_slots VALUES(90,71); +INSERT INTO product_slots VALUES(90,72); +INSERT INTO product_slots VALUES(90,73); +INSERT INTO product_slots VALUES(90,74); +INSERT INTO product_slots VALUES(90,75); +INSERT INTO product_slots VALUES(90,76); +INSERT INTO product_slots VALUES(90,77); +INSERT INTO product_slots VALUES(90,78); +INSERT INTO product_slots VALUES(90,79); +INSERT INTO product_slots VALUES(90,80); +INSERT INTO product_slots VALUES(90,81); +INSERT INTO product_slots VALUES(90,82); +INSERT INTO product_slots VALUES(90,83); +INSERT INTO product_slots VALUES(90,84); +INSERT INTO product_slots VALUES(90,85); +INSERT INTO product_slots VALUES(90,86); +INSERT INTO product_slots VALUES(90,87); +INSERT INTO product_slots VALUES(90,88); +INSERT INTO product_slots VALUES(90,89); +INSERT INTO product_slots VALUES(90,90); +INSERT INTO product_slots VALUES(90,91); +INSERT INTO product_slots VALUES(90,92); +INSERT INTO product_slots VALUES(90,93); +INSERT INTO product_slots VALUES(90,94); +INSERT INTO product_slots VALUES(90,95); +INSERT INTO product_slots VALUES(90,96); +INSERT INTO product_slots VALUES(90,97); +INSERT INTO product_slots VALUES(90,98); +INSERT INTO product_slots VALUES(90,99); +INSERT INTO product_slots VALUES(90,100); +INSERT INTO product_slots VALUES(90,101); +INSERT INTO product_slots VALUES(90,102); +INSERT INTO product_slots VALUES(90,103); +INSERT INTO product_slots VALUES(90,104); +INSERT INTO product_slots VALUES(90,105); +INSERT INTO product_slots VALUES(90,106); +INSERT INTO product_slots VALUES(90,107); +INSERT INTO product_slots VALUES(90,108); +INSERT INTO product_slots VALUES(90,109); +INSERT INTO product_slots VALUES(90,110); +INSERT INTO product_slots VALUES(90,111); +INSERT INTO product_slots VALUES(90,112); +INSERT INTO product_slots VALUES(90,113); +INSERT INTO product_slots VALUES(90,114); +INSERT INTO product_slots VALUES(90,115); +INSERT INTO product_slots VALUES(90,116); +INSERT INTO product_slots VALUES(90,117); +INSERT INTO product_slots VALUES(90,118); +INSERT INTO product_slots VALUES(90,119); +INSERT INTO product_slots VALUES(90,120); +INSERT INTO product_slots VALUES(90,121); +INSERT INTO product_slots VALUES(90,122); +INSERT INTO product_slots VALUES(90,123); +INSERT INTO product_slots VALUES(90,124); +INSERT INTO product_slots VALUES(90,125); +INSERT INTO product_slots VALUES(90,126); +INSERT INTO product_slots VALUES(90,127); +INSERT INTO product_slots VALUES(90,128); +INSERT INTO product_slots VALUES(90,129); +INSERT INTO product_slots VALUES(90,130); +INSERT INTO product_slots VALUES(90,131); +INSERT INTO product_slots VALUES(90,132); +INSERT INTO product_slots VALUES(90,133); +INSERT INTO product_slots VALUES(90,134); +INSERT INTO product_slots VALUES(90,135); +INSERT INTO product_slots VALUES(90,136); +INSERT INTO product_slots VALUES(90,137); +INSERT INTO product_slots VALUES(90,138); +INSERT INTO product_slots VALUES(90,139); +INSERT INTO product_slots VALUES(90,140); +INSERT INTO product_slots VALUES(90,141); +INSERT INTO product_slots VALUES(90,142); +INSERT INTO product_slots VALUES(90,143); +INSERT INTO product_slots VALUES(90,144); +INSERT INTO product_slots VALUES(90,145); +INSERT INTO product_slots VALUES(90,146); +INSERT INTO product_slots VALUES(90,147); +INSERT INTO product_slots VALUES(90,148); +INSERT INTO product_slots VALUES(90,149); +INSERT INTO product_slots VALUES(90,150); +INSERT INTO product_slots VALUES(90,151); +INSERT INTO product_slots VALUES(90,152); +INSERT INTO product_slots VALUES(90,153); +INSERT INTO product_slots VALUES(90,154); +INSERT INTO product_slots VALUES(90,155); +INSERT INTO product_slots VALUES(90,156); +INSERT INTO product_slots VALUES(90,157); +INSERT INTO product_slots VALUES(90,158); +INSERT INTO product_slots VALUES(90,159); +INSERT INTO product_slots VALUES(90,160); +INSERT INTO product_slots VALUES(90,161); +INSERT INTO product_slots VALUES(90,162); +INSERT INTO product_slots VALUES(90,163); +INSERT INTO product_slots VALUES(90,164); +INSERT INTO product_slots VALUES(90,165); +INSERT INTO product_slots VALUES(90,166); +INSERT INTO product_slots VALUES(90,167); +INSERT INTO product_slots VALUES(90,168); +INSERT INTO product_slots VALUES(90,169); +INSERT INTO product_slots VALUES(90,170); +INSERT INTO product_slots VALUES(90,171); +INSERT INTO product_slots VALUES(90,172); +INSERT INTO product_slots VALUES(90,173); +INSERT INTO product_slots VALUES(90,174); +INSERT INTO product_slots VALUES(90,175); +INSERT INTO product_slots VALUES(90,176); +INSERT INTO product_slots VALUES(90,177); +INSERT INTO product_slots VALUES(90,178); +INSERT INTO product_slots VALUES(90,179); +INSERT INTO product_slots VALUES(90,180); +INSERT INTO product_slots VALUES(90,181); +INSERT INTO product_slots VALUES(90,182); +INSERT INTO product_slots VALUES(90,183); +INSERT INTO product_slots VALUES(90,184); +INSERT INTO product_slots VALUES(90,185); +INSERT INTO product_slots VALUES(90,186); +INSERT INTO product_slots VALUES(90,187); +INSERT INTO product_slots VALUES(90,188); +INSERT INTO product_slots VALUES(90,189); +INSERT INTO product_slots VALUES(90,190); +INSERT INTO product_slots VALUES(90,191); +INSERT INTO product_slots VALUES(90,192); +INSERT INTO product_slots VALUES(90,193); +INSERT INTO product_slots VALUES(90,194); +INSERT INTO product_slots VALUES(90,195); +INSERT INTO product_slots VALUES(90,196); +INSERT INTO product_slots VALUES(90,197); +INSERT INTO product_slots VALUES(90,198); +INSERT INTO product_slots VALUES(90,199); +INSERT INTO product_slots VALUES(90,200); +INSERT INTO product_slots VALUES(90,201); +INSERT INTO product_slots VALUES(90,202); +INSERT INTO product_slots VALUES(90,203); +INSERT INTO product_slots VALUES(90,204); +INSERT INTO product_slots VALUES(90,205); +INSERT INTO product_slots VALUES(90,206); +INSERT INTO product_slots VALUES(90,207); +INSERT INTO product_slots VALUES(90,208); +INSERT INTO product_slots VALUES(90,209); +INSERT INTO product_slots VALUES(90,210); +INSERT INTO product_slots VALUES(90,211); +INSERT INTO product_slots VALUES(90,212); +INSERT INTO product_slots VALUES(90,213); +INSERT INTO product_slots VALUES(90,214); +INSERT INTO product_slots VALUES(90,215); +INSERT INTO product_slots VALUES(90,216); +INSERT INTO product_slots VALUES(90,217); +INSERT INTO product_slots VALUES(90,218); +INSERT INTO product_slots VALUES(90,219); +INSERT INTO product_slots VALUES(90,220); +INSERT INTO product_slots VALUES(90,221); +INSERT INTO product_slots VALUES(90,222); +INSERT INTO product_slots VALUES(90,223); +INSERT INTO product_slots VALUES(90,224); +INSERT INTO product_slots VALUES(90,225); +INSERT INTO product_slots VALUES(90,226); +INSERT INTO product_slots VALUES(90,227); +INSERT INTO product_slots VALUES(90,228); +INSERT INTO product_slots VALUES(90,229); +INSERT INTO product_slots VALUES(90,230); +INSERT INTO product_slots VALUES(90,231); +INSERT INTO product_slots VALUES(90,232); +INSERT INTO product_slots VALUES(90,233); +INSERT INTO product_slots VALUES(90,234); +INSERT INTO product_slots VALUES(90,235); +INSERT INTO product_slots VALUES(90,236); +INSERT INTO product_slots VALUES(90,237); +INSERT INTO product_slots VALUES(90,238); +INSERT INTO product_slots VALUES(90,239); +INSERT INTO product_slots VALUES(90,240); +INSERT INTO product_slots VALUES(90,241); +INSERT INTO product_slots VALUES(90,242); +INSERT INTO product_slots VALUES(90,243); +INSERT INTO product_slots VALUES(90,244); +INSERT INTO product_slots VALUES(90,274); +INSERT INTO product_slots VALUES(90,275); +INSERT INTO product_slots VALUES(90,279); +INSERT INTO product_slots VALUES(90,280); +INSERT INTO product_slots VALUES(90,281); +INSERT INTO product_slots VALUES(90,282); +INSERT INTO product_slots VALUES(90,283); +INSERT INTO product_slots VALUES(90,284); +INSERT INTO product_slots VALUES(90,285); +INSERT INTO product_slots VALUES(90,286); +INSERT INTO product_slots VALUES(90,287); +INSERT INTO product_slots VALUES(91,39); +INSERT INTO product_slots VALUES(91,44); +INSERT INTO product_slots VALUES(91,46); +INSERT INTO product_slots VALUES(91,47); +INSERT INTO product_slots VALUES(91,48); +INSERT INTO product_slots VALUES(91,49); +INSERT INTO product_slots VALUES(91,50); +INSERT INTO product_slots VALUES(91,51); +INSERT INTO product_slots VALUES(91,52); +INSERT INTO product_slots VALUES(91,53); +INSERT INTO product_slots VALUES(91,54); +INSERT INTO product_slots VALUES(91,55); +INSERT INTO product_slots VALUES(91,56); +INSERT INTO product_slots VALUES(91,57); +INSERT INTO product_slots VALUES(91,58); +INSERT INTO product_slots VALUES(91,59); +INSERT INTO product_slots VALUES(91,60); +INSERT INTO product_slots VALUES(91,61); +INSERT INTO product_slots VALUES(91,62); +INSERT INTO product_slots VALUES(91,63); +INSERT INTO product_slots VALUES(91,64); +INSERT INTO product_slots VALUES(91,65); +INSERT INTO product_slots VALUES(91,66); +INSERT INTO product_slots VALUES(91,67); +INSERT INTO product_slots VALUES(91,68); +INSERT INTO product_slots VALUES(91,69); +INSERT INTO product_slots VALUES(91,70); +INSERT INTO product_slots VALUES(91,71); +INSERT INTO product_slots VALUES(91,72); +INSERT INTO product_slots VALUES(91,73); +INSERT INTO product_slots VALUES(91,74); +INSERT INTO product_slots VALUES(91,75); +INSERT INTO product_slots VALUES(91,76); +INSERT INTO product_slots VALUES(91,77); +INSERT INTO product_slots VALUES(91,78); +INSERT INTO product_slots VALUES(91,79); +INSERT INTO product_slots VALUES(91,80); +INSERT INTO product_slots VALUES(91,81); +INSERT INTO product_slots VALUES(91,82); +INSERT INTO product_slots VALUES(91,83); +INSERT INTO product_slots VALUES(91,84); +INSERT INTO product_slots VALUES(91,85); +INSERT INTO product_slots VALUES(91,86); +INSERT INTO product_slots VALUES(91,87); +INSERT INTO product_slots VALUES(91,88); +INSERT INTO product_slots VALUES(91,89); +INSERT INTO product_slots VALUES(91,90); +INSERT INTO product_slots VALUES(91,91); +INSERT INTO product_slots VALUES(91,92); +INSERT INTO product_slots VALUES(91,93); +INSERT INTO product_slots VALUES(91,94); +INSERT INTO product_slots VALUES(91,95); +INSERT INTO product_slots VALUES(91,96); +INSERT INTO product_slots VALUES(91,97); +INSERT INTO product_slots VALUES(91,98); +INSERT INTO product_slots VALUES(91,99); +INSERT INTO product_slots VALUES(91,100); +INSERT INTO product_slots VALUES(91,101); +INSERT INTO product_slots VALUES(91,102); +INSERT INTO product_slots VALUES(91,103); +INSERT INTO product_slots VALUES(91,104); +INSERT INTO product_slots VALUES(91,105); +INSERT INTO product_slots VALUES(91,106); +INSERT INTO product_slots VALUES(91,107); +INSERT INTO product_slots VALUES(91,108); +INSERT INTO product_slots VALUES(91,109); +INSERT INTO product_slots VALUES(91,110); +INSERT INTO product_slots VALUES(91,111); +INSERT INTO product_slots VALUES(91,112); +INSERT INTO product_slots VALUES(91,113); +INSERT INTO product_slots VALUES(91,114); +INSERT INTO product_slots VALUES(91,115); +INSERT INTO product_slots VALUES(91,116); +INSERT INTO product_slots VALUES(91,117); +INSERT INTO product_slots VALUES(91,118); +INSERT INTO product_slots VALUES(91,119); +INSERT INTO product_slots VALUES(91,120); +INSERT INTO product_slots VALUES(91,121); +INSERT INTO product_slots VALUES(91,122); +INSERT INTO product_slots VALUES(91,123); +INSERT INTO product_slots VALUES(91,124); +INSERT INTO product_slots VALUES(91,125); +INSERT INTO product_slots VALUES(91,126); +INSERT INTO product_slots VALUES(91,127); +INSERT INTO product_slots VALUES(91,128); +INSERT INTO product_slots VALUES(91,129); +INSERT INTO product_slots VALUES(91,130); +INSERT INTO product_slots VALUES(91,131); +INSERT INTO product_slots VALUES(91,132); +INSERT INTO product_slots VALUES(91,133); +INSERT INTO product_slots VALUES(91,134); +INSERT INTO product_slots VALUES(91,135); +INSERT INTO product_slots VALUES(91,136); +INSERT INTO product_slots VALUES(91,137); +INSERT INTO product_slots VALUES(91,138); +INSERT INTO product_slots VALUES(91,139); +INSERT INTO product_slots VALUES(91,140); +INSERT INTO product_slots VALUES(91,141); +INSERT INTO product_slots VALUES(91,142); +INSERT INTO product_slots VALUES(91,143); +INSERT INTO product_slots VALUES(91,144); +INSERT INTO product_slots VALUES(91,145); +INSERT INTO product_slots VALUES(91,146); +INSERT INTO product_slots VALUES(91,147); +INSERT INTO product_slots VALUES(91,148); +INSERT INTO product_slots VALUES(91,149); +INSERT INTO product_slots VALUES(91,150); +INSERT INTO product_slots VALUES(91,151); +INSERT INTO product_slots VALUES(91,152); +INSERT INTO product_slots VALUES(91,153); +INSERT INTO product_slots VALUES(91,154); +INSERT INTO product_slots VALUES(91,155); +INSERT INTO product_slots VALUES(91,156); +INSERT INTO product_slots VALUES(91,157); +INSERT INTO product_slots VALUES(91,158); +INSERT INTO product_slots VALUES(91,159); +INSERT INTO product_slots VALUES(91,160); +INSERT INTO product_slots VALUES(91,161); +INSERT INTO product_slots VALUES(91,162); +INSERT INTO product_slots VALUES(91,163); +INSERT INTO product_slots VALUES(91,164); +INSERT INTO product_slots VALUES(91,165); +INSERT INTO product_slots VALUES(91,166); +INSERT INTO product_slots VALUES(91,167); +INSERT INTO product_slots VALUES(91,168); +INSERT INTO product_slots VALUES(91,169); +INSERT INTO product_slots VALUES(91,170); +INSERT INTO product_slots VALUES(91,171); +INSERT INTO product_slots VALUES(91,172); +INSERT INTO product_slots VALUES(91,173); +INSERT INTO product_slots VALUES(91,174); +INSERT INTO product_slots VALUES(91,175); +INSERT INTO product_slots VALUES(91,176); +INSERT INTO product_slots VALUES(91,177); +INSERT INTO product_slots VALUES(91,178); +INSERT INTO product_slots VALUES(91,179); +INSERT INTO product_slots VALUES(91,180); +INSERT INTO product_slots VALUES(91,181); +INSERT INTO product_slots VALUES(91,182); +INSERT INTO product_slots VALUES(91,183); +INSERT INTO product_slots VALUES(91,184); +INSERT INTO product_slots VALUES(91,185); +INSERT INTO product_slots VALUES(91,186); +INSERT INTO product_slots VALUES(91,187); +INSERT INTO product_slots VALUES(91,188); +INSERT INTO product_slots VALUES(91,189); +INSERT INTO product_slots VALUES(91,190); +INSERT INTO product_slots VALUES(91,191); +INSERT INTO product_slots VALUES(91,192); +INSERT INTO product_slots VALUES(91,193); +INSERT INTO product_slots VALUES(91,194); +INSERT INTO product_slots VALUES(91,195); +INSERT INTO product_slots VALUES(91,196); +INSERT INTO product_slots VALUES(91,197); +INSERT INTO product_slots VALUES(91,198); +INSERT INTO product_slots VALUES(91,199); +INSERT INTO product_slots VALUES(91,200); +INSERT INTO product_slots VALUES(91,201); +INSERT INTO product_slots VALUES(91,202); +INSERT INTO product_slots VALUES(91,203); +INSERT INTO product_slots VALUES(91,204); +INSERT INTO product_slots VALUES(91,205); +INSERT INTO product_slots VALUES(91,206); +INSERT INTO product_slots VALUES(91,207); +INSERT INTO product_slots VALUES(91,208); +INSERT INTO product_slots VALUES(91,209); +INSERT INTO product_slots VALUES(91,210); +INSERT INTO product_slots VALUES(91,211); +INSERT INTO product_slots VALUES(91,212); +INSERT INTO product_slots VALUES(91,213); +INSERT INTO product_slots VALUES(91,214); +INSERT INTO product_slots VALUES(91,215); +INSERT INTO product_slots VALUES(91,216); +INSERT INTO product_slots VALUES(91,217); +INSERT INTO product_slots VALUES(91,218); +INSERT INTO product_slots VALUES(91,219); +INSERT INTO product_slots VALUES(91,220); +INSERT INTO product_slots VALUES(91,221); +INSERT INTO product_slots VALUES(91,222); +INSERT INTO product_slots VALUES(91,223); +INSERT INTO product_slots VALUES(91,224); +INSERT INTO product_slots VALUES(91,225); +INSERT INTO product_slots VALUES(91,226); +INSERT INTO product_slots VALUES(91,227); +INSERT INTO product_slots VALUES(91,228); +INSERT INTO product_slots VALUES(91,229); +INSERT INTO product_slots VALUES(91,230); +INSERT INTO product_slots VALUES(91,231); +INSERT INTO product_slots VALUES(91,232); +INSERT INTO product_slots VALUES(91,233); +INSERT INTO product_slots VALUES(91,234); +INSERT INTO product_slots VALUES(91,235); +INSERT INTO product_slots VALUES(91,236); +INSERT INTO product_slots VALUES(91,237); +INSERT INTO product_slots VALUES(91,238); +INSERT INTO product_slots VALUES(91,239); +INSERT INTO product_slots VALUES(91,240); +INSERT INTO product_slots VALUES(91,241); +INSERT INTO product_slots VALUES(91,242); +INSERT INTO product_slots VALUES(91,243); +INSERT INTO product_slots VALUES(91,244); +INSERT INTO product_slots VALUES(91,274); +INSERT INTO product_slots VALUES(91,275); +INSERT INTO product_slots VALUES(91,279); +INSERT INTO product_slots VALUES(91,280); +INSERT INTO product_slots VALUES(91,281); +INSERT INTO product_slots VALUES(91,282); +INSERT INTO product_slots VALUES(91,283); +INSERT INTO product_slots VALUES(91,284); +INSERT INTO product_slots VALUES(91,285); +INSERT INTO product_slots VALUES(91,286); +INSERT INTO product_slots VALUES(91,287); +INSERT INTO product_slots VALUES(92,39); +INSERT INTO product_slots VALUES(92,44); +INSERT INTO product_slots VALUES(92,46); +INSERT INTO product_slots VALUES(92,47); +INSERT INTO product_slots VALUES(92,48); +INSERT INTO product_slots VALUES(92,49); +INSERT INTO product_slots VALUES(92,50); +INSERT INTO product_slots VALUES(92,51); +INSERT INTO product_slots VALUES(92,52); +INSERT INTO product_slots VALUES(92,53); +INSERT INTO product_slots VALUES(92,54); +INSERT INTO product_slots VALUES(92,55); +INSERT INTO product_slots VALUES(92,56); +INSERT INTO product_slots VALUES(92,57); +INSERT INTO product_slots VALUES(92,58); +INSERT INTO product_slots VALUES(92,59); +INSERT INTO product_slots VALUES(92,60); +INSERT INTO product_slots VALUES(92,61); +INSERT INTO product_slots VALUES(92,62); +INSERT INTO product_slots VALUES(92,63); +INSERT INTO product_slots VALUES(92,64); +INSERT INTO product_slots VALUES(92,65); +INSERT INTO product_slots VALUES(92,66); +INSERT INTO product_slots VALUES(92,67); +INSERT INTO product_slots VALUES(92,68); +INSERT INTO product_slots VALUES(92,69); +INSERT INTO product_slots VALUES(92,70); +INSERT INTO product_slots VALUES(92,71); +INSERT INTO product_slots VALUES(92,72); +INSERT INTO product_slots VALUES(92,73); +INSERT INTO product_slots VALUES(92,74); +INSERT INTO product_slots VALUES(92,75); +INSERT INTO product_slots VALUES(92,76); +INSERT INTO product_slots VALUES(92,77); +INSERT INTO product_slots VALUES(92,78); +INSERT INTO product_slots VALUES(92,79); +INSERT INTO product_slots VALUES(92,80); +INSERT INTO product_slots VALUES(92,81); +INSERT INTO product_slots VALUES(92,82); +INSERT INTO product_slots VALUES(92,83); +INSERT INTO product_slots VALUES(92,84); +INSERT INTO product_slots VALUES(92,85); +INSERT INTO product_slots VALUES(92,86); +INSERT INTO product_slots VALUES(92,87); +INSERT INTO product_slots VALUES(92,88); +INSERT INTO product_slots VALUES(92,89); +INSERT INTO product_slots VALUES(92,90); +INSERT INTO product_slots VALUES(92,91); +INSERT INTO product_slots VALUES(92,92); +INSERT INTO product_slots VALUES(92,93); +INSERT INTO product_slots VALUES(92,94); +INSERT INTO product_slots VALUES(92,95); +INSERT INTO product_slots VALUES(92,96); +INSERT INTO product_slots VALUES(92,97); +INSERT INTO product_slots VALUES(92,98); +INSERT INTO product_slots VALUES(92,99); +INSERT INTO product_slots VALUES(92,100); +INSERT INTO product_slots VALUES(92,101); +INSERT INTO product_slots VALUES(92,102); +INSERT INTO product_slots VALUES(92,103); +INSERT INTO product_slots VALUES(92,104); +INSERT INTO product_slots VALUES(92,105); +INSERT INTO product_slots VALUES(92,106); +INSERT INTO product_slots VALUES(92,107); +INSERT INTO product_slots VALUES(92,108); +INSERT INTO product_slots VALUES(92,109); +INSERT INTO product_slots VALUES(92,110); +INSERT INTO product_slots VALUES(92,111); +INSERT INTO product_slots VALUES(92,112); +INSERT INTO product_slots VALUES(92,113); +INSERT INTO product_slots VALUES(92,114); +INSERT INTO product_slots VALUES(92,115); +INSERT INTO product_slots VALUES(92,116); +INSERT INTO product_slots VALUES(92,117); +INSERT INTO product_slots VALUES(92,118); +INSERT INTO product_slots VALUES(92,119); +INSERT INTO product_slots VALUES(92,120); +INSERT INTO product_slots VALUES(92,121); +INSERT INTO product_slots VALUES(92,122); +INSERT INTO product_slots VALUES(92,123); +INSERT INTO product_slots VALUES(92,124); +INSERT INTO product_slots VALUES(92,125); +INSERT INTO product_slots VALUES(92,126); +INSERT INTO product_slots VALUES(92,127); +INSERT INTO product_slots VALUES(92,128); +INSERT INTO product_slots VALUES(92,129); +INSERT INTO product_slots VALUES(92,130); +INSERT INTO product_slots VALUES(92,131); +INSERT INTO product_slots VALUES(92,132); +INSERT INTO product_slots VALUES(92,133); +INSERT INTO product_slots VALUES(92,134); +INSERT INTO product_slots VALUES(92,135); +INSERT INTO product_slots VALUES(92,136); +INSERT INTO product_slots VALUES(92,137); +INSERT INTO product_slots VALUES(92,138); +INSERT INTO product_slots VALUES(92,139); +INSERT INTO product_slots VALUES(92,140); +INSERT INTO product_slots VALUES(92,141); +INSERT INTO product_slots VALUES(92,142); +INSERT INTO product_slots VALUES(92,143); +INSERT INTO product_slots VALUES(92,144); +INSERT INTO product_slots VALUES(92,145); +INSERT INTO product_slots VALUES(92,146); +INSERT INTO product_slots VALUES(92,147); +INSERT INTO product_slots VALUES(92,148); +INSERT INTO product_slots VALUES(92,149); +INSERT INTO product_slots VALUES(92,150); +INSERT INTO product_slots VALUES(92,151); +INSERT INTO product_slots VALUES(92,152); +INSERT INTO product_slots VALUES(92,153); +INSERT INTO product_slots VALUES(92,154); +INSERT INTO product_slots VALUES(92,155); +INSERT INTO product_slots VALUES(92,156); +INSERT INTO product_slots VALUES(92,157); +INSERT INTO product_slots VALUES(92,158); +INSERT INTO product_slots VALUES(92,159); +INSERT INTO product_slots VALUES(92,160); +INSERT INTO product_slots VALUES(92,161); +INSERT INTO product_slots VALUES(92,162); +INSERT INTO product_slots VALUES(92,163); +INSERT INTO product_slots VALUES(92,164); +INSERT INTO product_slots VALUES(92,165); +INSERT INTO product_slots VALUES(92,166); +INSERT INTO product_slots VALUES(92,167); +INSERT INTO product_slots VALUES(92,168); +INSERT INTO product_slots VALUES(92,169); +INSERT INTO product_slots VALUES(92,170); +INSERT INTO product_slots VALUES(92,171); +INSERT INTO product_slots VALUES(92,172); +INSERT INTO product_slots VALUES(92,173); +INSERT INTO product_slots VALUES(92,174); +INSERT INTO product_slots VALUES(92,175); +INSERT INTO product_slots VALUES(92,176); +INSERT INTO product_slots VALUES(92,177); +INSERT INTO product_slots VALUES(92,178); +INSERT INTO product_slots VALUES(92,179); +INSERT INTO product_slots VALUES(92,180); +INSERT INTO product_slots VALUES(92,181); +INSERT INTO product_slots VALUES(92,182); +INSERT INTO product_slots VALUES(92,183); +INSERT INTO product_slots VALUES(92,184); +INSERT INTO product_slots VALUES(92,185); +INSERT INTO product_slots VALUES(92,186); +INSERT INTO product_slots VALUES(92,187); +INSERT INTO product_slots VALUES(92,188); +INSERT INTO product_slots VALUES(92,189); +INSERT INTO product_slots VALUES(92,190); +INSERT INTO product_slots VALUES(92,191); +INSERT INTO product_slots VALUES(92,192); +INSERT INTO product_slots VALUES(92,193); +INSERT INTO product_slots VALUES(92,194); +INSERT INTO product_slots VALUES(92,195); +INSERT INTO product_slots VALUES(92,196); +INSERT INTO product_slots VALUES(92,197); +INSERT INTO product_slots VALUES(92,198); +INSERT INTO product_slots VALUES(92,199); +INSERT INTO product_slots VALUES(92,200); +INSERT INTO product_slots VALUES(92,201); +INSERT INTO product_slots VALUES(92,202); +INSERT INTO product_slots VALUES(92,203); +INSERT INTO product_slots VALUES(92,204); +INSERT INTO product_slots VALUES(92,205); +INSERT INTO product_slots VALUES(92,206); +INSERT INTO product_slots VALUES(92,207); +INSERT INTO product_slots VALUES(92,208); +INSERT INTO product_slots VALUES(92,209); +INSERT INTO product_slots VALUES(92,210); +INSERT INTO product_slots VALUES(92,211); +INSERT INTO product_slots VALUES(92,212); +INSERT INTO product_slots VALUES(92,213); +INSERT INTO product_slots VALUES(92,214); +INSERT INTO product_slots VALUES(92,215); +INSERT INTO product_slots VALUES(92,216); +INSERT INTO product_slots VALUES(92,217); +INSERT INTO product_slots VALUES(92,218); +INSERT INTO product_slots VALUES(92,219); +INSERT INTO product_slots VALUES(92,220); +INSERT INTO product_slots VALUES(92,221); +INSERT INTO product_slots VALUES(92,222); +INSERT INTO product_slots VALUES(92,223); +INSERT INTO product_slots VALUES(92,224); +INSERT INTO product_slots VALUES(92,225); +INSERT INTO product_slots VALUES(92,226); +INSERT INTO product_slots VALUES(92,227); +INSERT INTO product_slots VALUES(92,228); +INSERT INTO product_slots VALUES(92,229); +INSERT INTO product_slots VALUES(92,230); +INSERT INTO product_slots VALUES(92,231); +INSERT INTO product_slots VALUES(92,232); +INSERT INTO product_slots VALUES(92,233); +INSERT INTO product_slots VALUES(92,234); +INSERT INTO product_slots VALUES(92,235); +INSERT INTO product_slots VALUES(92,236); +INSERT INTO product_slots VALUES(92,237); +INSERT INTO product_slots VALUES(92,238); +INSERT INTO product_slots VALUES(92,239); +INSERT INTO product_slots VALUES(92,240); +INSERT INTO product_slots VALUES(92,241); +INSERT INTO product_slots VALUES(92,242); +INSERT INTO product_slots VALUES(92,243); +INSERT INTO product_slots VALUES(92,244); +INSERT INTO product_slots VALUES(92,274); +INSERT INTO product_slots VALUES(92,275); +INSERT INTO product_slots VALUES(92,279); +INSERT INTO product_slots VALUES(92,280); +INSERT INTO product_slots VALUES(92,281); +INSERT INTO product_slots VALUES(92,282); +INSERT INTO product_slots VALUES(92,283); +INSERT INTO product_slots VALUES(92,284); +INSERT INTO product_slots VALUES(92,285); +INSERT INTO product_slots VALUES(92,286); +INSERT INTO product_slots VALUES(92,287); +INSERT INTO product_slots VALUES(93,59); +INSERT INTO product_slots VALUES(93,62); +INSERT INTO product_slots VALUES(93,63); +INSERT INTO product_slots VALUES(93,64); +INSERT INTO product_slots VALUES(93,65); +INSERT INTO product_slots VALUES(93,66); +INSERT INTO product_slots VALUES(93,67); +INSERT INTO product_slots VALUES(94,39); +INSERT INTO product_slots VALUES(94,62); +INSERT INTO product_slots VALUES(94,63); +INSERT INTO product_slots VALUES(94,64); +INSERT INTO product_slots VALUES(94,65); +INSERT INTO product_slots VALUES(94,66); +INSERT INTO product_slots VALUES(94,67); +INSERT INTO product_slots VALUES(94,68); +INSERT INTO product_slots VALUES(94,69); +INSERT INTO product_slots VALUES(94,70); +INSERT INTO product_slots VALUES(94,71); +INSERT INTO product_slots VALUES(94,72); +INSERT INTO product_slots VALUES(94,73); +INSERT INTO product_slots VALUES(94,74); +INSERT INTO product_slots VALUES(94,75); +INSERT INTO product_slots VALUES(94,76); +INSERT INTO product_slots VALUES(94,77); +INSERT INTO product_slots VALUES(94,78); +INSERT INTO product_slots VALUES(94,79); +INSERT INTO product_slots VALUES(94,80); +INSERT INTO product_slots VALUES(94,81); +INSERT INTO product_slots VALUES(94,82); +INSERT INTO product_slots VALUES(94,83); +INSERT INTO product_slots VALUES(94,84); +INSERT INTO product_slots VALUES(94,85); +INSERT INTO product_slots VALUES(94,86); +INSERT INTO product_slots VALUES(94,87); +INSERT INTO product_slots VALUES(94,88); +INSERT INTO product_slots VALUES(94,89); +INSERT INTO product_slots VALUES(94,90); +INSERT INTO product_slots VALUES(94,91); +INSERT INTO product_slots VALUES(94,92); +INSERT INTO product_slots VALUES(94,93); +INSERT INTO product_slots VALUES(94,94); +INSERT INTO product_slots VALUES(94,95); +INSERT INTO product_slots VALUES(94,96); +INSERT INTO product_slots VALUES(94,97); +INSERT INTO product_slots VALUES(94,98); +INSERT INTO product_slots VALUES(94,99); +INSERT INTO product_slots VALUES(94,100); +INSERT INTO product_slots VALUES(94,101); +INSERT INTO product_slots VALUES(94,102); +INSERT INTO product_slots VALUES(94,103); +INSERT INTO product_slots VALUES(94,104); +INSERT INTO product_slots VALUES(94,105); +INSERT INTO product_slots VALUES(94,106); +INSERT INTO product_slots VALUES(94,107); +INSERT INTO product_slots VALUES(94,108); +INSERT INTO product_slots VALUES(94,109); +INSERT INTO product_slots VALUES(94,110); +INSERT INTO product_slots VALUES(94,111); +INSERT INTO product_slots VALUES(94,112); +INSERT INTO product_slots VALUES(94,113); +INSERT INTO product_slots VALUES(94,114); +INSERT INTO product_slots VALUES(94,115); +INSERT INTO product_slots VALUES(94,116); +INSERT INTO product_slots VALUES(94,117); +INSERT INTO product_slots VALUES(94,118); +INSERT INTO product_slots VALUES(94,119); +INSERT INTO product_slots VALUES(94,120); +INSERT INTO product_slots VALUES(94,121); +INSERT INTO product_slots VALUES(94,122); +INSERT INTO product_slots VALUES(94,123); +INSERT INTO product_slots VALUES(94,124); +INSERT INTO product_slots VALUES(94,125); +INSERT INTO product_slots VALUES(94,126); +INSERT INTO product_slots VALUES(94,127); +INSERT INTO product_slots VALUES(94,128); +INSERT INTO product_slots VALUES(94,129); +INSERT INTO product_slots VALUES(94,130); +INSERT INTO product_slots VALUES(94,131); +INSERT INTO product_slots VALUES(94,132); +INSERT INTO product_slots VALUES(94,133); +INSERT INTO product_slots VALUES(94,134); +INSERT INTO product_slots VALUES(94,135); +INSERT INTO product_slots VALUES(94,136); +INSERT INTO product_slots VALUES(94,137); +INSERT INTO product_slots VALUES(94,138); +INSERT INTO product_slots VALUES(94,139); +INSERT INTO product_slots VALUES(94,140); +INSERT INTO product_slots VALUES(94,141); +INSERT INTO product_slots VALUES(94,142); +INSERT INTO product_slots VALUES(94,143); +INSERT INTO product_slots VALUES(94,144); +INSERT INTO product_slots VALUES(94,145); +INSERT INTO product_slots VALUES(94,146); +INSERT INTO product_slots VALUES(94,147); +INSERT INTO product_slots VALUES(94,148); +INSERT INTO product_slots VALUES(94,149); +INSERT INTO product_slots VALUES(94,150); +INSERT INTO product_slots VALUES(94,151); +INSERT INTO product_slots VALUES(94,152); +INSERT INTO product_slots VALUES(94,153); +INSERT INTO product_slots VALUES(94,154); +INSERT INTO product_slots VALUES(94,155); +INSERT INTO product_slots VALUES(94,156); +INSERT INTO product_slots VALUES(94,157); +INSERT INTO product_slots VALUES(94,158); +INSERT INTO product_slots VALUES(94,159); +INSERT INTO product_slots VALUES(94,160); +INSERT INTO product_slots VALUES(94,161); +INSERT INTO product_slots VALUES(94,162); +INSERT INTO product_slots VALUES(94,163); +INSERT INTO product_slots VALUES(94,164); +INSERT INTO product_slots VALUES(94,165); +INSERT INTO product_slots VALUES(94,166); +INSERT INTO product_slots VALUES(94,167); +INSERT INTO product_slots VALUES(94,168); +INSERT INTO product_slots VALUES(94,169); +INSERT INTO product_slots VALUES(94,170); +INSERT INTO product_slots VALUES(94,171); +INSERT INTO product_slots VALUES(94,172); +INSERT INTO product_slots VALUES(94,173); +INSERT INTO product_slots VALUES(94,174); +INSERT INTO product_slots VALUES(94,175); +INSERT INTO product_slots VALUES(94,176); +INSERT INTO product_slots VALUES(94,177); +INSERT INTO product_slots VALUES(94,178); +INSERT INTO product_slots VALUES(94,179); +INSERT INTO product_slots VALUES(94,180); +INSERT INTO product_slots VALUES(94,181); +INSERT INTO product_slots VALUES(94,182); +INSERT INTO product_slots VALUES(94,183); +INSERT INTO product_slots VALUES(94,184); +INSERT INTO product_slots VALUES(94,185); +INSERT INTO product_slots VALUES(94,186); +INSERT INTO product_slots VALUES(94,187); +INSERT INTO product_slots VALUES(94,188); +INSERT INTO product_slots VALUES(94,189); +INSERT INTO product_slots VALUES(94,190); +INSERT INTO product_slots VALUES(94,191); +INSERT INTO product_slots VALUES(94,192); +INSERT INTO product_slots VALUES(94,193); +INSERT INTO product_slots VALUES(94,194); +INSERT INTO product_slots VALUES(94,195); +INSERT INTO product_slots VALUES(94,196); +INSERT INTO product_slots VALUES(94,197); +INSERT INTO product_slots VALUES(94,198); +INSERT INTO product_slots VALUES(94,199); +INSERT INTO product_slots VALUES(94,200); +INSERT INTO product_slots VALUES(94,201); +INSERT INTO product_slots VALUES(94,202); +INSERT INTO product_slots VALUES(94,203); +INSERT INTO product_slots VALUES(94,204); +INSERT INTO product_slots VALUES(94,205); +INSERT INTO product_slots VALUES(94,206); +INSERT INTO product_slots VALUES(94,207); +INSERT INTO product_slots VALUES(94,208); +INSERT INTO product_slots VALUES(94,209); +INSERT INTO product_slots VALUES(94,210); +INSERT INTO product_slots VALUES(94,211); +INSERT INTO product_slots VALUES(94,212); +INSERT INTO product_slots VALUES(94,213); +INSERT INTO product_slots VALUES(94,214); +INSERT INTO product_slots VALUES(94,215); +INSERT INTO product_slots VALUES(94,216); +INSERT INTO product_slots VALUES(94,217); +INSERT INTO product_slots VALUES(94,218); +INSERT INTO product_slots VALUES(94,219); +INSERT INTO product_slots VALUES(94,220); +INSERT INTO product_slots VALUES(94,221); +INSERT INTO product_slots VALUES(94,222); +INSERT INTO product_slots VALUES(94,223); +INSERT INTO product_slots VALUES(94,224); +INSERT INTO product_slots VALUES(94,225); +INSERT INTO product_slots VALUES(94,226); +INSERT INTO product_slots VALUES(94,227); +INSERT INTO product_slots VALUES(94,228); +INSERT INTO product_slots VALUES(94,229); +INSERT INTO product_slots VALUES(94,230); +INSERT INTO product_slots VALUES(94,231); +INSERT INTO product_slots VALUES(94,232); +INSERT INTO product_slots VALUES(94,233); +INSERT INTO product_slots VALUES(94,234); +INSERT INTO product_slots VALUES(94,235); +INSERT INTO product_slots VALUES(94,236); +INSERT INTO product_slots VALUES(94,237); +INSERT INTO product_slots VALUES(94,238); +INSERT INTO product_slots VALUES(94,239); +INSERT INTO product_slots VALUES(94,240); +INSERT INTO product_slots VALUES(94,241); +INSERT INTO product_slots VALUES(94,242); +INSERT INTO product_slots VALUES(94,243); +INSERT INTO product_slots VALUES(94,244); +INSERT INTO product_slots VALUES(94,274); +INSERT INTO product_slots VALUES(94,275); +INSERT INTO product_slots VALUES(94,279); +INSERT INTO product_slots VALUES(94,280); +INSERT INTO product_slots VALUES(94,281); +INSERT INTO product_slots VALUES(94,282); +INSERT INTO product_slots VALUES(94,283); +INSERT INTO product_slots VALUES(94,284); +INSERT INTO product_slots VALUES(94,285); +INSERT INTO product_slots VALUES(94,286); +INSERT INTO product_slots VALUES(94,287); +INSERT INTO product_slots VALUES(95,39); +INSERT INTO product_slots VALUES(95,55); +INSERT INTO product_slots VALUES(95,59); +INSERT INTO product_slots VALUES(95,62); +INSERT INTO product_slots VALUES(95,63); +INSERT INTO product_slots VALUES(95,64); +INSERT INTO product_slots VALUES(95,65); +INSERT INTO product_slots VALUES(95,66); +INSERT INTO product_slots VALUES(95,67); +INSERT INTO product_slots VALUES(95,68); +INSERT INTO product_slots VALUES(95,69); +INSERT INTO product_slots VALUES(95,70); +INSERT INTO product_slots VALUES(95,71); +INSERT INTO product_slots VALUES(95,72); +INSERT INTO product_slots VALUES(95,73); +INSERT INTO product_slots VALUES(95,74); +INSERT INTO product_slots VALUES(95,75); +INSERT INTO product_slots VALUES(95,76); +INSERT INTO product_slots VALUES(95,77); +INSERT INTO product_slots VALUES(95,78); +INSERT INTO product_slots VALUES(95,79); +INSERT INTO product_slots VALUES(95,80); +INSERT INTO product_slots VALUES(95,81); +INSERT INTO product_slots VALUES(95,82); +INSERT INTO product_slots VALUES(95,83); +INSERT INTO product_slots VALUES(95,84); +INSERT INTO product_slots VALUES(95,85); +INSERT INTO product_slots VALUES(95,86); +INSERT INTO product_slots VALUES(95,87); +INSERT INTO product_slots VALUES(95,88); +INSERT INTO product_slots VALUES(95,89); +INSERT INTO product_slots VALUES(95,90); +INSERT INTO product_slots VALUES(95,91); +INSERT INTO product_slots VALUES(95,92); +INSERT INTO product_slots VALUES(95,93); +INSERT INTO product_slots VALUES(95,94); +INSERT INTO product_slots VALUES(95,95); +INSERT INTO product_slots VALUES(95,96); +INSERT INTO product_slots VALUES(95,97); +INSERT INTO product_slots VALUES(95,98); +INSERT INTO product_slots VALUES(95,99); +INSERT INTO product_slots VALUES(95,100); +INSERT INTO product_slots VALUES(95,101); +INSERT INTO product_slots VALUES(95,102); +INSERT INTO product_slots VALUES(95,103); +INSERT INTO product_slots VALUES(95,104); +INSERT INTO product_slots VALUES(95,105); +INSERT INTO product_slots VALUES(95,106); +INSERT INTO product_slots VALUES(95,107); +INSERT INTO product_slots VALUES(95,108); +INSERT INTO product_slots VALUES(95,109); +INSERT INTO product_slots VALUES(95,110); +INSERT INTO product_slots VALUES(95,111); +INSERT INTO product_slots VALUES(95,112); +INSERT INTO product_slots VALUES(95,113); +INSERT INTO product_slots VALUES(95,114); +INSERT INTO product_slots VALUES(95,115); +INSERT INTO product_slots VALUES(95,116); +INSERT INTO product_slots VALUES(95,117); +INSERT INTO product_slots VALUES(95,118); +INSERT INTO product_slots VALUES(95,119); +INSERT INTO product_slots VALUES(95,120); +INSERT INTO product_slots VALUES(95,121); +INSERT INTO product_slots VALUES(95,122); +INSERT INTO product_slots VALUES(95,123); +INSERT INTO product_slots VALUES(95,124); +INSERT INTO product_slots VALUES(95,125); +INSERT INTO product_slots VALUES(95,126); +INSERT INTO product_slots VALUES(95,127); +INSERT INTO product_slots VALUES(95,128); +INSERT INTO product_slots VALUES(95,129); +INSERT INTO product_slots VALUES(95,130); +INSERT INTO product_slots VALUES(95,131); +INSERT INTO product_slots VALUES(95,132); +INSERT INTO product_slots VALUES(95,133); +INSERT INTO product_slots VALUES(95,134); +INSERT INTO product_slots VALUES(95,135); +INSERT INTO product_slots VALUES(95,136); +INSERT INTO product_slots VALUES(95,137); +INSERT INTO product_slots VALUES(95,138); +INSERT INTO product_slots VALUES(95,139); +INSERT INTO product_slots VALUES(95,140); +INSERT INTO product_slots VALUES(95,141); +INSERT INTO product_slots VALUES(95,142); +INSERT INTO product_slots VALUES(95,143); +INSERT INTO product_slots VALUES(95,144); +INSERT INTO product_slots VALUES(95,145); +INSERT INTO product_slots VALUES(95,146); +INSERT INTO product_slots VALUES(95,147); +INSERT INTO product_slots VALUES(95,148); +INSERT INTO product_slots VALUES(95,149); +INSERT INTO product_slots VALUES(95,150); +INSERT INTO product_slots VALUES(95,151); +INSERT INTO product_slots VALUES(95,152); +INSERT INTO product_slots VALUES(95,153); +INSERT INTO product_slots VALUES(95,154); +INSERT INTO product_slots VALUES(95,155); +INSERT INTO product_slots VALUES(95,156); +INSERT INTO product_slots VALUES(95,157); +INSERT INTO product_slots VALUES(95,158); +INSERT INTO product_slots VALUES(95,159); +INSERT INTO product_slots VALUES(95,160); +INSERT INTO product_slots VALUES(95,161); +INSERT INTO product_slots VALUES(95,162); +INSERT INTO product_slots VALUES(95,163); +INSERT INTO product_slots VALUES(95,164); +INSERT INTO product_slots VALUES(95,165); +INSERT INTO product_slots VALUES(95,166); +INSERT INTO product_slots VALUES(95,167); +INSERT INTO product_slots VALUES(95,168); +INSERT INTO product_slots VALUES(95,169); +INSERT INTO product_slots VALUES(95,170); +INSERT INTO product_slots VALUES(95,171); +INSERT INTO product_slots VALUES(95,172); +INSERT INTO product_slots VALUES(95,173); +INSERT INTO product_slots VALUES(95,174); +INSERT INTO product_slots VALUES(95,175); +INSERT INTO product_slots VALUES(95,176); +INSERT INTO product_slots VALUES(95,177); +INSERT INTO product_slots VALUES(95,178); +INSERT INTO product_slots VALUES(95,179); +INSERT INTO product_slots VALUES(95,180); +INSERT INTO product_slots VALUES(95,181); +INSERT INTO product_slots VALUES(95,182); +INSERT INTO product_slots VALUES(95,183); +INSERT INTO product_slots VALUES(95,184); +INSERT INTO product_slots VALUES(95,185); +INSERT INTO product_slots VALUES(95,186); +INSERT INTO product_slots VALUES(95,187); +INSERT INTO product_slots VALUES(95,188); +INSERT INTO product_slots VALUES(95,189); +INSERT INTO product_slots VALUES(95,190); +INSERT INTO product_slots VALUES(95,191); +INSERT INTO product_slots VALUES(95,192); +INSERT INTO product_slots VALUES(95,193); +INSERT INTO product_slots VALUES(95,194); +INSERT INTO product_slots VALUES(95,195); +INSERT INTO product_slots VALUES(95,196); +INSERT INTO product_slots VALUES(95,197); +INSERT INTO product_slots VALUES(95,198); +INSERT INTO product_slots VALUES(95,199); +INSERT INTO product_slots VALUES(95,200); +INSERT INTO product_slots VALUES(95,201); +INSERT INTO product_slots VALUES(95,202); +INSERT INTO product_slots VALUES(95,203); +INSERT INTO product_slots VALUES(95,204); +INSERT INTO product_slots VALUES(95,205); +INSERT INTO product_slots VALUES(95,206); +INSERT INTO product_slots VALUES(95,207); +INSERT INTO product_slots VALUES(95,208); +INSERT INTO product_slots VALUES(95,209); +INSERT INTO product_slots VALUES(95,210); +INSERT INTO product_slots VALUES(95,211); +INSERT INTO product_slots VALUES(95,212); +INSERT INTO product_slots VALUES(95,213); +INSERT INTO product_slots VALUES(95,214); +INSERT INTO product_slots VALUES(95,215); +INSERT INTO product_slots VALUES(95,216); +INSERT INTO product_slots VALUES(95,217); +INSERT INTO product_slots VALUES(95,218); +INSERT INTO product_slots VALUES(95,219); +INSERT INTO product_slots VALUES(95,220); +INSERT INTO product_slots VALUES(95,221); +INSERT INTO product_slots VALUES(95,222); +INSERT INTO product_slots VALUES(95,223); +INSERT INTO product_slots VALUES(95,224); +INSERT INTO product_slots VALUES(95,225); +INSERT INTO product_slots VALUES(95,226); +INSERT INTO product_slots VALUES(95,227); +INSERT INTO product_slots VALUES(95,228); +INSERT INTO product_slots VALUES(95,229); +INSERT INTO product_slots VALUES(95,230); +INSERT INTO product_slots VALUES(95,231); +INSERT INTO product_slots VALUES(95,232); +INSERT INTO product_slots VALUES(95,233); +INSERT INTO product_slots VALUES(95,234); +INSERT INTO product_slots VALUES(95,235); +INSERT INTO product_slots VALUES(95,236); +INSERT INTO product_slots VALUES(95,237); +INSERT INTO product_slots VALUES(95,238); +INSERT INTO product_slots VALUES(95,239); +INSERT INTO product_slots VALUES(95,240); +INSERT INTO product_slots VALUES(95,241); +INSERT INTO product_slots VALUES(95,242); +INSERT INTO product_slots VALUES(95,243); +INSERT INTO product_slots VALUES(95,244); +INSERT INTO product_slots VALUES(95,274); +INSERT INTO product_slots VALUES(95,275); +INSERT INTO product_slots VALUES(95,279); +INSERT INTO product_slots VALUES(95,280); +INSERT INTO product_slots VALUES(95,281); +INSERT INTO product_slots VALUES(95,282); +INSERT INTO product_slots VALUES(95,283); +INSERT INTO product_slots VALUES(95,284); +INSERT INTO product_slots VALUES(95,285); +INSERT INTO product_slots VALUES(95,286); +INSERT INTO product_slots VALUES(95,287); +INSERT INTO product_slots VALUES(96,59); +INSERT INTO product_slots VALUES(96,62); +INSERT INTO product_slots VALUES(96,63); +INSERT INTO product_slots VALUES(96,64); +INSERT INTO product_slots VALUES(96,65); +INSERT INTO product_slots VALUES(96,66); +INSERT INTO product_slots VALUES(96,67); +INSERT INTO product_slots VALUES(96,68); +INSERT INTO product_slots VALUES(96,69); +INSERT INTO product_slots VALUES(96,70); +INSERT INTO product_slots VALUES(96,71); +INSERT INTO product_slots VALUES(96,72); +INSERT INTO product_slots VALUES(96,73); +INSERT INTO product_slots VALUES(96,74); +INSERT INTO product_slots VALUES(96,75); +INSERT INTO product_slots VALUES(96,76); +INSERT INTO product_slots VALUES(96,77); +INSERT INTO product_slots VALUES(96,78); +INSERT INTO product_slots VALUES(96,79); +INSERT INTO product_slots VALUES(96,80); +INSERT INTO product_slots VALUES(96,81); +INSERT INTO product_slots VALUES(96,82); +INSERT INTO product_slots VALUES(96,83); +INSERT INTO product_slots VALUES(96,84); +INSERT INTO product_slots VALUES(96,85); +INSERT INTO product_slots VALUES(96,86); +INSERT INTO product_slots VALUES(96,87); +INSERT INTO product_slots VALUES(96,88); +INSERT INTO product_slots VALUES(96,89); +INSERT INTO product_slots VALUES(96,90); +INSERT INTO product_slots VALUES(96,91); +INSERT INTO product_slots VALUES(96,92); +INSERT INTO product_slots VALUES(96,93); +INSERT INTO product_slots VALUES(96,94); +INSERT INTO product_slots VALUES(96,95); +INSERT INTO product_slots VALUES(96,96); +INSERT INTO product_slots VALUES(96,97); +INSERT INTO product_slots VALUES(96,98); +INSERT INTO product_slots VALUES(96,99); +INSERT INTO product_slots VALUES(96,100); +INSERT INTO product_slots VALUES(96,102); +INSERT INTO product_slots VALUES(96,103); +INSERT INTO product_slots VALUES(96,104); +INSERT INTO product_slots VALUES(96,105); +INSERT INTO product_slots VALUES(96,106); +INSERT INTO product_slots VALUES(96,107); +INSERT INTO product_slots VALUES(96,108); +INSERT INTO product_slots VALUES(96,109); +INSERT INTO product_slots VALUES(96,110); +INSERT INTO product_slots VALUES(96,111); +INSERT INTO product_slots VALUES(96,112); +INSERT INTO product_slots VALUES(96,113); +INSERT INTO product_slots VALUES(96,114); +INSERT INTO product_slots VALUES(96,115); +INSERT INTO product_slots VALUES(96,117); +INSERT INTO product_slots VALUES(96,118); +INSERT INTO product_slots VALUES(96,119); +INSERT INTO product_slots VALUES(96,120); +INSERT INTO product_slots VALUES(96,121); +INSERT INTO product_slots VALUES(96,122); +INSERT INTO product_slots VALUES(96,124); +INSERT INTO product_slots VALUES(96,125); +INSERT INTO product_slots VALUES(96,126); +INSERT INTO product_slots VALUES(96,127); +INSERT INTO product_slots VALUES(96,128); +INSERT INTO product_slots VALUES(96,129); +INSERT INTO product_slots VALUES(96,130); +INSERT INTO product_slots VALUES(96,131); +INSERT INTO product_slots VALUES(96,132); +INSERT INTO product_slots VALUES(96,133); +INSERT INTO product_slots VALUES(96,134); +INSERT INTO product_slots VALUES(96,135); +INSERT INTO product_slots VALUES(96,136); +INSERT INTO product_slots VALUES(96,138); +INSERT INTO product_slots VALUES(96,139); +INSERT INTO product_slots VALUES(96,140); +INSERT INTO product_slots VALUES(96,141); +INSERT INTO product_slots VALUES(96,142); +INSERT INTO product_slots VALUES(96,143); +INSERT INTO product_slots VALUES(96,145); +INSERT INTO product_slots VALUES(96,146); +INSERT INTO product_slots VALUES(96,147); +INSERT INTO product_slots VALUES(96,148); +INSERT INTO product_slots VALUES(96,149); +INSERT INTO product_slots VALUES(96,150); +INSERT INTO product_slots VALUES(96,151); +INSERT INTO product_slots VALUES(96,152); +INSERT INTO product_slots VALUES(96,153); +INSERT INTO product_slots VALUES(96,154); +INSERT INTO product_slots VALUES(96,155); +INSERT INTO product_slots VALUES(96,156); +INSERT INTO product_slots VALUES(96,157); +INSERT INTO product_slots VALUES(96,158); +INSERT INTO product_slots VALUES(96,159); +INSERT INTO product_slots VALUES(96,160); +INSERT INTO product_slots VALUES(96,161); +INSERT INTO product_slots VALUES(96,162); +INSERT INTO product_slots VALUES(96,163); +INSERT INTO product_slots VALUES(96,164); +INSERT INTO product_slots VALUES(96,165); +INSERT INTO product_slots VALUES(96,166); +INSERT INTO product_slots VALUES(96,167); +INSERT INTO product_slots VALUES(96,168); +INSERT INTO product_slots VALUES(96,169); +INSERT INTO product_slots VALUES(96,170); +INSERT INTO product_slots VALUES(96,171); +INSERT INTO product_slots VALUES(96,172); +INSERT INTO product_slots VALUES(96,173); +INSERT INTO product_slots VALUES(96,174); +INSERT INTO product_slots VALUES(96,175); +INSERT INTO product_slots VALUES(96,176); +INSERT INTO product_slots VALUES(96,177); +INSERT INTO product_slots VALUES(96,178); +INSERT INTO product_slots VALUES(96,179); +INSERT INTO product_slots VALUES(96,180); +INSERT INTO product_slots VALUES(96,181); +INSERT INTO product_slots VALUES(96,182); +INSERT INTO product_slots VALUES(96,183); +INSERT INTO product_slots VALUES(96,184); +INSERT INTO product_slots VALUES(96,185); +INSERT INTO product_slots VALUES(96,186); +INSERT INTO product_slots VALUES(96,187); +INSERT INTO product_slots VALUES(96,188); +INSERT INTO product_slots VALUES(96,189); +INSERT INTO product_slots VALUES(96,190); +INSERT INTO product_slots VALUES(96,191); +INSERT INTO product_slots VALUES(96,192); +INSERT INTO product_slots VALUES(96,193); +INSERT INTO product_slots VALUES(96,194); +INSERT INTO product_slots VALUES(96,195); +INSERT INTO product_slots VALUES(96,196); +INSERT INTO product_slots VALUES(96,197); +INSERT INTO product_slots VALUES(96,198); +INSERT INTO product_slots VALUES(96,199); +INSERT INTO product_slots VALUES(96,200); +INSERT INTO product_slots VALUES(96,201); +INSERT INTO product_slots VALUES(96,202); +INSERT INTO product_slots VALUES(96,203); +INSERT INTO product_slots VALUES(96,204); +INSERT INTO product_slots VALUES(96,205); +INSERT INTO product_slots VALUES(96,206); +INSERT INTO product_slots VALUES(96,207); +INSERT INTO product_slots VALUES(96,208); +INSERT INTO product_slots VALUES(96,209); +INSERT INTO product_slots VALUES(96,210); +INSERT INTO product_slots VALUES(96,211); +INSERT INTO product_slots VALUES(96,212); +INSERT INTO product_slots VALUES(96,213); +INSERT INTO product_slots VALUES(96,214); +INSERT INTO product_slots VALUES(96,215); +INSERT INTO product_slots VALUES(96,216); +INSERT INTO product_slots VALUES(96,217); +INSERT INTO product_slots VALUES(96,218); +INSERT INTO product_slots VALUES(96,219); +INSERT INTO product_slots VALUES(96,220); +INSERT INTO product_slots VALUES(96,221); +INSERT INTO product_slots VALUES(96,222); +INSERT INTO product_slots VALUES(96,223); +INSERT INTO product_slots VALUES(96,224); +INSERT INTO product_slots VALUES(96,225); +INSERT INTO product_slots VALUES(96,226); +INSERT INTO product_slots VALUES(96,227); +INSERT INTO product_slots VALUES(96,228); +INSERT INTO product_slots VALUES(96,229); +INSERT INTO product_slots VALUES(96,230); +INSERT INTO product_slots VALUES(96,231); +INSERT INTO product_slots VALUES(96,232); +INSERT INTO product_slots VALUES(96,233); +INSERT INTO product_slots VALUES(96,234); +INSERT INTO product_slots VALUES(96,235); +INSERT INTO product_slots VALUES(96,236); +INSERT INTO product_slots VALUES(96,237); +INSERT INTO product_slots VALUES(96,238); +INSERT INTO product_slots VALUES(96,239); +INSERT INTO product_slots VALUES(96,240); +INSERT INTO product_slots VALUES(96,241); +INSERT INTO product_slots VALUES(96,242); +INSERT INTO product_slots VALUES(96,243); +INSERT INTO product_slots VALUES(96,244); +INSERT INTO product_slots VALUES(96,274); +INSERT INTO product_slots VALUES(96,275); +INSERT INTO product_slots VALUES(96,279); +INSERT INTO product_slots VALUES(96,280); +INSERT INTO product_slots VALUES(96,281); +INSERT INTO product_slots VALUES(96,282); +INSERT INTO product_slots VALUES(96,283); +INSERT INTO product_slots VALUES(96,284); +INSERT INTO product_slots VALUES(96,285); +INSERT INTO product_slots VALUES(96,286); +INSERT INTO product_slots VALUES(96,287); +INSERT INTO product_slots VALUES(97,39); +INSERT INTO product_slots VALUES(97,55); +INSERT INTO product_slots VALUES(97,59); +INSERT INTO product_slots VALUES(97,62); +INSERT INTO product_slots VALUES(97,63); +INSERT INTO product_slots VALUES(97,64); +INSERT INTO product_slots VALUES(97,65); +INSERT INTO product_slots VALUES(97,66); +INSERT INTO product_slots VALUES(97,67); +INSERT INTO product_slots VALUES(97,68); +INSERT INTO product_slots VALUES(97,69); +INSERT INTO product_slots VALUES(97,70); +INSERT INTO product_slots VALUES(97,71); +INSERT INTO product_slots VALUES(97,72); +INSERT INTO product_slots VALUES(97,73); +INSERT INTO product_slots VALUES(97,74); +INSERT INTO product_slots VALUES(97,75); +INSERT INTO product_slots VALUES(97,76); +INSERT INTO product_slots VALUES(97,77); +INSERT INTO product_slots VALUES(97,78); +INSERT INTO product_slots VALUES(97,79); +INSERT INTO product_slots VALUES(97,80); +INSERT INTO product_slots VALUES(97,81); +INSERT INTO product_slots VALUES(97,82); +INSERT INTO product_slots VALUES(97,83); +INSERT INTO product_slots VALUES(97,84); +INSERT INTO product_slots VALUES(97,85); +INSERT INTO product_slots VALUES(97,86); +INSERT INTO product_slots VALUES(97,87); +INSERT INTO product_slots VALUES(97,88); +INSERT INTO product_slots VALUES(97,89); +INSERT INTO product_slots VALUES(97,90); +INSERT INTO product_slots VALUES(97,91); +INSERT INTO product_slots VALUES(97,92); +INSERT INTO product_slots VALUES(97,93); +INSERT INTO product_slots VALUES(97,94); +INSERT INTO product_slots VALUES(97,95); +INSERT INTO product_slots VALUES(97,96); +INSERT INTO product_slots VALUES(97,97); +INSERT INTO product_slots VALUES(97,98); +INSERT INTO product_slots VALUES(97,99); +INSERT INTO product_slots VALUES(97,100); +INSERT INTO product_slots VALUES(97,101); +INSERT INTO product_slots VALUES(97,102); +INSERT INTO product_slots VALUES(97,103); +INSERT INTO product_slots VALUES(97,104); +INSERT INTO product_slots VALUES(97,105); +INSERT INTO product_slots VALUES(97,106); +INSERT INTO product_slots VALUES(97,107); +INSERT INTO product_slots VALUES(97,108); +INSERT INTO product_slots VALUES(97,109); +INSERT INTO product_slots VALUES(97,110); +INSERT INTO product_slots VALUES(97,111); +INSERT INTO product_slots VALUES(97,112); +INSERT INTO product_slots VALUES(97,113); +INSERT INTO product_slots VALUES(97,114); +INSERT INTO product_slots VALUES(97,115); +INSERT INTO product_slots VALUES(97,116); +INSERT INTO product_slots VALUES(97,117); +INSERT INTO product_slots VALUES(97,118); +INSERT INTO product_slots VALUES(97,119); +INSERT INTO product_slots VALUES(97,120); +INSERT INTO product_slots VALUES(97,121); +INSERT INTO product_slots VALUES(97,122); +INSERT INTO product_slots VALUES(97,123); +INSERT INTO product_slots VALUES(97,124); +INSERT INTO product_slots VALUES(97,125); +INSERT INTO product_slots VALUES(97,126); +INSERT INTO product_slots VALUES(97,127); +INSERT INTO product_slots VALUES(97,128); +INSERT INTO product_slots VALUES(97,129); +INSERT INTO product_slots VALUES(97,130); +INSERT INTO product_slots VALUES(97,131); +INSERT INTO product_slots VALUES(97,132); +INSERT INTO product_slots VALUES(97,133); +INSERT INTO product_slots VALUES(97,134); +INSERT INTO product_slots VALUES(97,135); +INSERT INTO product_slots VALUES(97,136); +INSERT INTO product_slots VALUES(97,137); +INSERT INTO product_slots VALUES(97,138); +INSERT INTO product_slots VALUES(97,139); +INSERT INTO product_slots VALUES(97,140); +INSERT INTO product_slots VALUES(97,141); +INSERT INTO product_slots VALUES(97,142); +INSERT INTO product_slots VALUES(97,143); +INSERT INTO product_slots VALUES(97,144); +INSERT INTO product_slots VALUES(97,145); +INSERT INTO product_slots VALUES(97,146); +INSERT INTO product_slots VALUES(97,147); +INSERT INTO product_slots VALUES(97,148); +INSERT INTO product_slots VALUES(97,149); +INSERT INTO product_slots VALUES(97,150); +INSERT INTO product_slots VALUES(97,151); +INSERT INTO product_slots VALUES(97,152); +INSERT INTO product_slots VALUES(97,153); +INSERT INTO product_slots VALUES(97,154); +INSERT INTO product_slots VALUES(97,155); +INSERT INTO product_slots VALUES(97,156); +INSERT INTO product_slots VALUES(97,157); +INSERT INTO product_slots VALUES(97,158); +INSERT INTO product_slots VALUES(97,159); +INSERT INTO product_slots VALUES(97,160); +INSERT INTO product_slots VALUES(97,161); +INSERT INTO product_slots VALUES(97,162); +INSERT INTO product_slots VALUES(97,163); +INSERT INTO product_slots VALUES(97,164); +INSERT INTO product_slots VALUES(97,165); +INSERT INTO product_slots VALUES(97,166); +INSERT INTO product_slots VALUES(97,167); +INSERT INTO product_slots VALUES(97,168); +INSERT INTO product_slots VALUES(97,169); +INSERT INTO product_slots VALUES(97,170); +INSERT INTO product_slots VALUES(97,171); +INSERT INTO product_slots VALUES(97,172); +INSERT INTO product_slots VALUES(97,173); +INSERT INTO product_slots VALUES(97,174); +INSERT INTO product_slots VALUES(97,175); +INSERT INTO product_slots VALUES(97,176); +INSERT INTO product_slots VALUES(97,177); +INSERT INTO product_slots VALUES(97,178); +INSERT INTO product_slots VALUES(97,179); +INSERT INTO product_slots VALUES(97,180); +INSERT INTO product_slots VALUES(97,181); +INSERT INTO product_slots VALUES(97,182); +INSERT INTO product_slots VALUES(97,183); +INSERT INTO product_slots VALUES(97,184); +INSERT INTO product_slots VALUES(97,185); +INSERT INTO product_slots VALUES(97,186); +INSERT INTO product_slots VALUES(97,187); +INSERT INTO product_slots VALUES(97,188); +INSERT INTO product_slots VALUES(97,189); +INSERT INTO product_slots VALUES(97,190); +INSERT INTO product_slots VALUES(97,191); +INSERT INTO product_slots VALUES(97,192); +INSERT INTO product_slots VALUES(97,193); +INSERT INTO product_slots VALUES(97,194); +INSERT INTO product_slots VALUES(97,195); +INSERT INTO product_slots VALUES(97,196); +INSERT INTO product_slots VALUES(97,197); +INSERT INTO product_slots VALUES(97,198); +INSERT INTO product_slots VALUES(97,199); +INSERT INTO product_slots VALUES(97,200); +INSERT INTO product_slots VALUES(97,201); +INSERT INTO product_slots VALUES(97,202); +INSERT INTO product_slots VALUES(97,203); +INSERT INTO product_slots VALUES(97,204); +INSERT INTO product_slots VALUES(97,205); +INSERT INTO product_slots VALUES(97,206); +INSERT INTO product_slots VALUES(97,207); +INSERT INTO product_slots VALUES(97,208); +INSERT INTO product_slots VALUES(97,209); +INSERT INTO product_slots VALUES(97,210); +INSERT INTO product_slots VALUES(97,211); +INSERT INTO product_slots VALUES(97,212); +INSERT INTO product_slots VALUES(97,213); +INSERT INTO product_slots VALUES(97,214); +INSERT INTO product_slots VALUES(97,215); +INSERT INTO product_slots VALUES(97,216); +INSERT INTO product_slots VALUES(97,217); +INSERT INTO product_slots VALUES(97,218); +INSERT INTO product_slots VALUES(97,219); +INSERT INTO product_slots VALUES(97,220); +INSERT INTO product_slots VALUES(97,221); +INSERT INTO product_slots VALUES(97,222); +INSERT INTO product_slots VALUES(97,223); +INSERT INTO product_slots VALUES(97,224); +INSERT INTO product_slots VALUES(97,225); +INSERT INTO product_slots VALUES(97,226); +INSERT INTO product_slots VALUES(97,227); +INSERT INTO product_slots VALUES(97,228); +INSERT INTO product_slots VALUES(97,229); +INSERT INTO product_slots VALUES(97,230); +INSERT INTO product_slots VALUES(97,231); +INSERT INTO product_slots VALUES(97,232); +INSERT INTO product_slots VALUES(97,233); +INSERT INTO product_slots VALUES(97,234); +INSERT INTO product_slots VALUES(97,235); +INSERT INTO product_slots VALUES(97,236); +INSERT INTO product_slots VALUES(97,237); +INSERT INTO product_slots VALUES(97,238); +INSERT INTO product_slots VALUES(97,239); +INSERT INTO product_slots VALUES(97,240); +INSERT INTO product_slots VALUES(97,241); +INSERT INTO product_slots VALUES(97,242); +INSERT INTO product_slots VALUES(97,243); +INSERT INTO product_slots VALUES(97,244); +INSERT INTO product_slots VALUES(97,274); +INSERT INTO product_slots VALUES(97,275); +INSERT INTO product_slots VALUES(97,279); +INSERT INTO product_slots VALUES(97,280); +INSERT INTO product_slots VALUES(97,281); +INSERT INTO product_slots VALUES(97,282); +INSERT INTO product_slots VALUES(97,283); +INSERT INTO product_slots VALUES(97,284); +INSERT INTO product_slots VALUES(97,285); +INSERT INTO product_slots VALUES(97,286); +INSERT INTO product_slots VALUES(97,287); +INSERT INTO product_slots VALUES(98,81); +INSERT INTO product_slots VALUES(98,82); +INSERT INTO product_slots VALUES(98,83); +INSERT INTO product_slots VALUES(98,87); +INSERT INTO product_slots VALUES(98,89); +INSERT INTO product_slots VALUES(98,90); +INSERT INTO product_slots VALUES(98,91); +INSERT INTO product_slots VALUES(98,92); +INSERT INTO product_slots VALUES(98,93); +INSERT INTO product_slots VALUES(98,94); +INSERT INTO product_slots VALUES(98,96); +INSERT INTO product_slots VALUES(98,97); +INSERT INTO product_slots VALUES(98,98); +INSERT INTO product_slots VALUES(98,99); +INSERT INTO product_slots VALUES(98,100); +INSERT INTO product_slots VALUES(98,102); +INSERT INTO product_slots VALUES(98,103); +INSERT INTO product_slots VALUES(98,104); +INSERT INTO product_slots VALUES(98,105); +INSERT INTO product_slots VALUES(98,106); +INSERT INTO product_slots VALUES(98,107); +INSERT INTO product_slots VALUES(98,108); +INSERT INTO product_slots VALUES(98,109); +INSERT INTO product_slots VALUES(98,110); +INSERT INTO product_slots VALUES(98,111); +INSERT INTO product_slots VALUES(98,112); +INSERT INTO product_slots VALUES(98,113); +INSERT INTO product_slots VALUES(98,114); +INSERT INTO product_slots VALUES(98,115); +INSERT INTO product_slots VALUES(98,117); +INSERT INTO product_slots VALUES(98,118); +INSERT INTO product_slots VALUES(98,119); +INSERT INTO product_slots VALUES(98,120); +INSERT INTO product_slots VALUES(98,123); +INSERT INTO product_slots VALUES(98,124); +INSERT INTO product_slots VALUES(98,125); +INSERT INTO product_slots VALUES(98,126); +INSERT INTO product_slots VALUES(98,130); +INSERT INTO product_slots VALUES(98,131); +INSERT INTO product_slots VALUES(98,132); +INSERT INTO product_slots VALUES(98,133); +INSERT INTO product_slots VALUES(98,137); +INSERT INTO product_slots VALUES(98,138); +INSERT INTO product_slots VALUES(98,139); +INSERT INTO product_slots VALUES(98,140); +INSERT INTO product_slots VALUES(98,144); +INSERT INTO product_slots VALUES(98,145); +INSERT INTO product_slots VALUES(98,146); +INSERT INTO product_slots VALUES(98,147); +INSERT INTO product_slots VALUES(98,148); +INSERT INTO product_slots VALUES(98,149); +INSERT INTO product_slots VALUES(98,150); +INSERT INTO product_slots VALUES(98,151); +INSERT INTO product_slots VALUES(98,155); +INSERT INTO product_slots VALUES(98,156); +INSERT INTO product_slots VALUES(98,157); +INSERT INTO product_slots VALUES(98,158); +INSERT INTO product_slots VALUES(98,162); +INSERT INTO product_slots VALUES(98,163); +INSERT INTO product_slots VALUES(98,164); +INSERT INTO product_slots VALUES(98,165); +INSERT INTO product_slots VALUES(98,166); +INSERT INTO product_slots VALUES(98,169); +INSERT INTO product_slots VALUES(98,170); +INSERT INTO product_slots VALUES(98,171); +INSERT INTO product_slots VALUES(98,172); +INSERT INTO product_slots VALUES(98,173); +INSERT INTO product_slots VALUES(98,176); +INSERT INTO product_slots VALUES(98,177); +INSERT INTO product_slots VALUES(98,178); +INSERT INTO product_slots VALUES(98,179); +INSERT INTO product_slots VALUES(98,180); +INSERT INTO product_slots VALUES(98,181); +INSERT INTO product_slots VALUES(98,182); +INSERT INTO product_slots VALUES(98,183); +INSERT INTO product_slots VALUES(98,184); +INSERT INTO product_slots VALUES(98,185); +INSERT INTO product_slots VALUES(98,186); +INSERT INTO product_slots VALUES(98,187); +INSERT INTO product_slots VALUES(98,188); +INSERT INTO product_slots VALUES(98,189); +INSERT INTO product_slots VALUES(98,190); +INSERT INTO product_slots VALUES(98,191); +INSERT INTO product_slots VALUES(98,192); +INSERT INTO product_slots VALUES(98,193); +INSERT INTO product_slots VALUES(98,194); +INSERT INTO product_slots VALUES(98,198); +INSERT INTO product_slots VALUES(98,199); +INSERT INTO product_slots VALUES(98,200); +INSERT INTO product_slots VALUES(98,201); +INSERT INTO product_slots VALUES(98,202); +INSERT INTO product_slots VALUES(98,203); +INSERT INTO product_slots VALUES(98,205); +INSERT INTO product_slots VALUES(98,208); +INSERT INTO product_slots VALUES(98,209); +INSERT INTO product_slots VALUES(98,210); +INSERT INTO product_slots VALUES(98,211); +INSERT INTO product_slots VALUES(98,216); +INSERT INTO product_slots VALUES(98,217); +INSERT INTO product_slots VALUES(98,218); +INSERT INTO product_slots VALUES(98,219); +INSERT INTO product_slots VALUES(98,220); +INSERT INTO product_slots VALUES(98,223); +INSERT INTO product_slots VALUES(98,224); +INSERT INTO product_slots VALUES(98,225); +INSERT INTO product_slots VALUES(98,226); +INSERT INTO product_slots VALUES(98,230); +INSERT INTO product_slots VALUES(98,231); +INSERT INTO product_slots VALUES(98,232); +INSERT INTO product_slots VALUES(98,234); +INSERT INTO product_slots VALUES(98,237); +INSERT INTO product_slots VALUES(98,238); +INSERT INTO product_slots VALUES(98,239); +INSERT INTO product_slots VALUES(98,240); +INSERT INTO product_slots VALUES(98,274); +INSERT INTO product_slots VALUES(98,275); +INSERT INTO product_slots VALUES(98,277); +INSERT INTO product_slots VALUES(98,278); +INSERT INTO product_slots VALUES(98,279); +INSERT INTO product_slots VALUES(99,81); +INSERT INTO product_slots VALUES(99,82); +INSERT INTO product_slots VALUES(99,83); +INSERT INTO product_slots VALUES(99,87); +INSERT INTO product_slots VALUES(99,89); +INSERT INTO product_slots VALUES(99,90); +INSERT INTO product_slots VALUES(99,91); +INSERT INTO product_slots VALUES(99,92); +INSERT INTO product_slots VALUES(99,93); +INSERT INTO product_slots VALUES(99,94); +INSERT INTO product_slots VALUES(99,96); +INSERT INTO product_slots VALUES(99,97); +INSERT INTO product_slots VALUES(99,98); +INSERT INTO product_slots VALUES(99,99); +INSERT INTO product_slots VALUES(99,100); +INSERT INTO product_slots VALUES(99,102); +INSERT INTO product_slots VALUES(99,103); +INSERT INTO product_slots VALUES(99,104); +INSERT INTO product_slots VALUES(99,105); +INSERT INTO product_slots VALUES(99,106); +INSERT INTO product_slots VALUES(99,107); +INSERT INTO product_slots VALUES(99,108); +INSERT INTO product_slots VALUES(99,109); +INSERT INTO product_slots VALUES(99,110); +INSERT INTO product_slots VALUES(99,111); +INSERT INTO product_slots VALUES(99,112); +INSERT INTO product_slots VALUES(99,113); +INSERT INTO product_slots VALUES(99,114); +INSERT INTO product_slots VALUES(99,115); +INSERT INTO product_slots VALUES(99,118); +INSERT INTO product_slots VALUES(99,119); +INSERT INTO product_slots VALUES(99,120); +INSERT INTO product_slots VALUES(99,123); +INSERT INTO product_slots VALUES(99,124); +INSERT INTO product_slots VALUES(99,125); +INSERT INTO product_slots VALUES(99,126); +INSERT INTO product_slots VALUES(99,130); +INSERT INTO product_slots VALUES(99,131); +INSERT INTO product_slots VALUES(99,132); +INSERT INTO product_slots VALUES(99,133); +INSERT INTO product_slots VALUES(99,137); +INSERT INTO product_slots VALUES(99,138); +INSERT INTO product_slots VALUES(99,139); +INSERT INTO product_slots VALUES(99,140); +INSERT INTO product_slots VALUES(99,144); +INSERT INTO product_slots VALUES(99,145); +INSERT INTO product_slots VALUES(99,146); +INSERT INTO product_slots VALUES(99,147); +INSERT INTO product_slots VALUES(99,148); +INSERT INTO product_slots VALUES(99,149); +INSERT INTO product_slots VALUES(99,150); +INSERT INTO product_slots VALUES(99,151); +INSERT INTO product_slots VALUES(99,155); +INSERT INTO product_slots VALUES(99,156); +INSERT INTO product_slots VALUES(99,157); +INSERT INTO product_slots VALUES(99,158); +INSERT INTO product_slots VALUES(99,162); +INSERT INTO product_slots VALUES(99,163); +INSERT INTO product_slots VALUES(99,164); +INSERT INTO product_slots VALUES(99,165); +INSERT INTO product_slots VALUES(99,166); +INSERT INTO product_slots VALUES(99,169); +INSERT INTO product_slots VALUES(99,170); +INSERT INTO product_slots VALUES(99,171); +INSERT INTO product_slots VALUES(99,172); +INSERT INTO product_slots VALUES(99,173); +INSERT INTO product_slots VALUES(99,176); +INSERT INTO product_slots VALUES(99,177); +INSERT INTO product_slots VALUES(99,178); +INSERT INTO product_slots VALUES(99,179); +INSERT INTO product_slots VALUES(99,180); +INSERT INTO product_slots VALUES(99,181); +INSERT INTO product_slots VALUES(99,182); +INSERT INTO product_slots VALUES(99,183); +INSERT INTO product_slots VALUES(99,184); +INSERT INTO product_slots VALUES(99,185); +INSERT INTO product_slots VALUES(99,186); +INSERT INTO product_slots VALUES(99,187); +INSERT INTO product_slots VALUES(99,188); +INSERT INTO product_slots VALUES(99,189); +INSERT INTO product_slots VALUES(99,190); +INSERT INTO product_slots VALUES(99,191); +INSERT INTO product_slots VALUES(99,192); +INSERT INTO product_slots VALUES(99,193); +INSERT INTO product_slots VALUES(99,194); +INSERT INTO product_slots VALUES(99,198); +INSERT INTO product_slots VALUES(99,199); +INSERT INTO product_slots VALUES(99,200); +INSERT INTO product_slots VALUES(99,201); +INSERT INTO product_slots VALUES(99,202); +INSERT INTO product_slots VALUES(99,203); +INSERT INTO product_slots VALUES(99,205); +INSERT INTO product_slots VALUES(99,208); +INSERT INTO product_slots VALUES(99,209); +INSERT INTO product_slots VALUES(99,210); +INSERT INTO product_slots VALUES(99,211); +INSERT INTO product_slots VALUES(99,216); +INSERT INTO product_slots VALUES(99,217); +INSERT INTO product_slots VALUES(99,218); +INSERT INTO product_slots VALUES(99,219); +INSERT INTO product_slots VALUES(99,220); +INSERT INTO product_slots VALUES(99,223); +INSERT INTO product_slots VALUES(99,224); +INSERT INTO product_slots VALUES(99,225); +INSERT INTO product_slots VALUES(99,226); +INSERT INTO product_slots VALUES(99,230); +INSERT INTO product_slots VALUES(99,231); +INSERT INTO product_slots VALUES(99,232); +INSERT INTO product_slots VALUES(99,234); +INSERT INTO product_slots VALUES(99,237); +INSERT INTO product_slots VALUES(99,238); +INSERT INTO product_slots VALUES(99,239); +INSERT INTO product_slots VALUES(99,240); +INSERT INTO product_slots VALUES(99,274); +INSERT INTO product_slots VALUES(99,275); +INSERT INTO product_slots VALUES(99,277); +INSERT INTO product_slots VALUES(99,278); +INSERT INTO product_slots VALUES(99,279); +INSERT INTO product_slots VALUES(100,102); +INSERT INTO product_slots VALUES(100,103); +INSERT INTO product_slots VALUES(100,104); +INSERT INTO product_slots VALUES(100,105); +INSERT INTO product_slots VALUES(100,106); +INSERT INTO product_slots VALUES(100,107); +INSERT INTO product_slots VALUES(100,108); +INSERT INTO product_slots VALUES(100,109); +INSERT INTO product_slots VALUES(100,110); +INSERT INTO product_slots VALUES(100,111); +INSERT INTO product_slots VALUES(100,112); +INSERT INTO product_slots VALUES(100,113); +INSERT INTO product_slots VALUES(100,114); +INSERT INTO product_slots VALUES(100,115); +INSERT INTO product_slots VALUES(100,120); +INSERT INTO product_slots VALUES(100,121); +INSERT INTO product_slots VALUES(100,122); +INSERT INTO product_slots VALUES(100,134); +INSERT INTO product_slots VALUES(100,135); +INSERT INTO product_slots VALUES(100,136); +INSERT INTO product_slots VALUES(100,139); +INSERT INTO product_slots VALUES(100,140); +INSERT INTO product_slots VALUES(100,141); +INSERT INTO product_slots VALUES(100,142); +INSERT INTO product_slots VALUES(100,143); +INSERT INTO product_slots VALUES(100,145); +INSERT INTO product_slots VALUES(100,146); +INSERT INTO product_slots VALUES(100,147); +INSERT INTO product_slots VALUES(100,148); +INSERT INTO product_slots VALUES(100,149); +INSERT INTO product_slots VALUES(100,150); +INSERT INTO product_slots VALUES(100,151); +INSERT INTO product_slots VALUES(100,152); +INSERT INTO product_slots VALUES(100,153); +INSERT INTO product_slots VALUES(100,154); +INSERT INTO product_slots VALUES(100,155); +INSERT INTO product_slots VALUES(100,157); +INSERT INTO product_slots VALUES(100,158); +INSERT INTO product_slots VALUES(100,159); +INSERT INTO product_slots VALUES(100,160); +INSERT INTO product_slots VALUES(100,161); +INSERT INTO product_slots VALUES(100,162); +INSERT INTO product_slots VALUES(100,163); +INSERT INTO product_slots VALUES(100,168); +INSERT INTO product_slots VALUES(100,170); +INSERT INTO product_slots VALUES(100,171); +INSERT INTO product_slots VALUES(100,172); +INSERT INTO product_slots VALUES(100,173); +INSERT INTO product_slots VALUES(100,174); +INSERT INTO product_slots VALUES(100,175); +INSERT INTO product_slots VALUES(100,177); +INSERT INTO product_slots VALUES(100,178); +INSERT INTO product_slots VALUES(100,179); +INSERT INTO product_slots VALUES(100,180); +INSERT INTO product_slots VALUES(100,181); +INSERT INTO product_slots VALUES(100,182); +INSERT INTO product_slots VALUES(100,183); +INSERT INTO product_slots VALUES(100,184); +INSERT INTO product_slots VALUES(100,185); +INSERT INTO product_slots VALUES(100,186); +INSERT INTO product_slots VALUES(100,187); +INSERT INTO product_slots VALUES(100,188); +INSERT INTO product_slots VALUES(100,189); +INSERT INTO product_slots VALUES(100,190); +INSERT INTO product_slots VALUES(100,191); +INSERT INTO product_slots VALUES(100,192); +INSERT INTO product_slots VALUES(100,193); +INSERT INTO product_slots VALUES(100,194); +INSERT INTO product_slots VALUES(100,195); +INSERT INTO product_slots VALUES(100,196); +INSERT INTO product_slots VALUES(100,197); +INSERT INTO product_slots VALUES(100,198); +INSERT INTO product_slots VALUES(100,199); +INSERT INTO product_slots VALUES(100,200); +INSERT INTO product_slots VALUES(100,201); +INSERT INTO product_slots VALUES(100,202); +INSERT INTO product_slots VALUES(100,203); +INSERT INTO product_slots VALUES(100,204); +INSERT INTO product_slots VALUES(100,205); +INSERT INTO product_slots VALUES(100,206); +INSERT INTO product_slots VALUES(100,207); +INSERT INTO product_slots VALUES(100,208); +INSERT INTO product_slots VALUES(100,209); +INSERT INTO product_slots VALUES(100,210); +INSERT INTO product_slots VALUES(100,211); +INSERT INTO product_slots VALUES(100,212); +INSERT INTO product_slots VALUES(100,213); +INSERT INTO product_slots VALUES(100,214); +INSERT INTO product_slots VALUES(100,215); +INSERT INTO product_slots VALUES(100,216); +INSERT INTO product_slots VALUES(100,217); +INSERT INTO product_slots VALUES(100,218); +INSERT INTO product_slots VALUES(100,219); +INSERT INTO product_slots VALUES(100,220); +INSERT INTO product_slots VALUES(100,221); +INSERT INTO product_slots VALUES(100,222); +INSERT INTO product_slots VALUES(100,223); +INSERT INTO product_slots VALUES(100,224); +INSERT INTO product_slots VALUES(100,225); +INSERT INTO product_slots VALUES(100,226); +INSERT INTO product_slots VALUES(100,227); +INSERT INTO product_slots VALUES(100,228); +INSERT INTO product_slots VALUES(100,229); +INSERT INTO product_slots VALUES(100,230); +INSERT INTO product_slots VALUES(100,231); +INSERT INTO product_slots VALUES(100,232); +INSERT INTO product_slots VALUES(100,233); +INSERT INTO product_slots VALUES(100,234); +INSERT INTO product_slots VALUES(100,235); +INSERT INTO product_slots VALUES(100,236); +INSERT INTO product_slots VALUES(100,237); +INSERT INTO product_slots VALUES(100,238); +INSERT INTO product_slots VALUES(100,239); +INSERT INTO product_slots VALUES(100,240); +INSERT INTO product_slots VALUES(100,241); +INSERT INTO product_slots VALUES(100,242); +INSERT INTO product_slots VALUES(100,243); +INSERT INTO product_slots VALUES(100,244); +INSERT INTO product_slots VALUES(100,274); +INSERT INTO product_slots VALUES(100,275); +INSERT INTO product_slots VALUES(100,279); +INSERT INTO product_slots VALUES(100,280); +INSERT INTO product_slots VALUES(100,281); +INSERT INTO product_slots VALUES(100,282); +INSERT INTO product_slots VALUES(100,283); +INSERT INTO product_slots VALUES(100,284); +INSERT INTO product_slots VALUES(100,285); +INSERT INTO product_slots VALUES(100,286); +INSERT INTO product_slots VALUES(100,287); +INSERT INTO product_slots VALUES(101,211); +INSERT INTO product_slots VALUES(101,230); +INSERT INTO product_slots VALUES(101,231); +INSERT INTO product_slots VALUES(101,232); +INSERT INTO product_slots VALUES(101,233); +INSERT INTO product_slots VALUES(101,234); +INSERT INTO product_slots VALUES(101,235); +INSERT INTO product_slots VALUES(101,236); +INSERT INTO product_slots VALUES(101,237); +INSERT INTO product_slots VALUES(101,238); +INSERT INTO product_slots VALUES(101,239); +INSERT INTO product_slots VALUES(101,240); +INSERT INTO product_slots VALUES(101,241); +INSERT INTO product_slots VALUES(101,242); +INSERT INTO product_slots VALUES(101,243); +INSERT INTO product_slots VALUES(101,244); +INSERT INTO product_slots VALUES(101,274); +INSERT INTO product_slots VALUES(101,275); +INSERT INTO product_slots VALUES(101,279); +INSERT INTO product_slots VALUES(101,280); +INSERT INTO product_slots VALUES(101,281); +INSERT INTO product_slots VALUES(101,282); +INSERT INTO product_slots VALUES(101,283); +INSERT INTO product_slots VALUES(101,284); +INSERT INTO product_slots VALUES(101,285); +INSERT INTO product_slots VALUES(101,286); +INSERT INTO product_slots VALUES(101,287); +INSERT INTO product_slots VALUES(102,188); +INSERT INTO product_slots VALUES(102,189); +INSERT INTO product_slots VALUES(102,203); +INSERT INTO product_slots VALUES(102,204); +INSERT INTO product_slots VALUES(102,205); +INSERT INTO product_slots VALUES(102,206); +INSERT INTO product_slots VALUES(102,207); +INSERT INTO product_slots VALUES(102,208); +INSERT INTO product_slots VALUES(102,209); +INSERT INTO product_slots VALUES(102,210); +INSERT INTO product_slots VALUES(102,211); +INSERT INTO product_slots VALUES(102,212); +INSERT INTO product_slots VALUES(102,213); +INSERT INTO product_slots VALUES(102,214); +INSERT INTO product_slots VALUES(102,215); +INSERT INTO product_slots VALUES(102,216); +INSERT INTO product_slots VALUES(102,217); +INSERT INTO product_slots VALUES(102,218); +INSERT INTO product_slots VALUES(102,219); +INSERT INTO product_slots VALUES(102,220); +INSERT INTO product_slots VALUES(102,221); +INSERT INTO product_slots VALUES(102,222); +INSERT INTO product_slots VALUES(102,223); +INSERT INTO product_slots VALUES(102,224); +INSERT INTO product_slots VALUES(102,225); +INSERT INTO product_slots VALUES(102,226); +INSERT INTO product_slots VALUES(102,227); +INSERT INTO product_slots VALUES(102,228); +INSERT INTO product_slots VALUES(102,229); +INSERT INTO product_slots VALUES(102,230); +INSERT INTO product_slots VALUES(102,231); +INSERT INTO product_slots VALUES(102,232); +INSERT INTO product_slots VALUES(102,233); +INSERT INTO product_slots VALUES(102,234); +INSERT INTO product_slots VALUES(102,235); +INSERT INTO product_slots VALUES(102,236); +INSERT INTO product_slots VALUES(102,237); +INSERT INTO product_slots VALUES(102,238); +INSERT INTO product_slots VALUES(102,239); +INSERT INTO product_slots VALUES(102,240); +INSERT INTO product_slots VALUES(102,241); +INSERT INTO product_slots VALUES(102,242); +INSERT INTO product_slots VALUES(102,243); +INSERT INTO product_slots VALUES(102,244); +INSERT INTO product_slots VALUES(102,274); +INSERT INTO product_slots VALUES(102,275); +INSERT INTO product_slots VALUES(102,279); +INSERT INTO product_slots VALUES(102,280); +INSERT INTO product_slots VALUES(102,281); +INSERT INTO product_slots VALUES(102,282); +INSERT INTO product_slots VALUES(102,283); +INSERT INTO product_slots VALUES(102,284); +INSERT INTO product_slots VALUES(102,285); +INSERT INTO product_slots VALUES(102,286); +INSERT INTO product_slots VALUES(102,287); +INSERT INTO product_slots VALUES(103,210); +INSERT INTO product_slots VALUES(103,211); +INSERT INTO product_slots VALUES(103,212); +INSERT INTO product_slots VALUES(103,213); +INSERT INTO product_slots VALUES(103,214); +INSERT INTO product_slots VALUES(103,215); +INSERT INTO product_slots VALUES(103,227); +INSERT INTO product_slots VALUES(103,228); +INSERT INTO product_slots VALUES(103,229); +INSERT INTO product_slots VALUES(103,230); +INSERT INTO product_slots VALUES(103,231); +INSERT INTO product_slots VALUES(103,232); +INSERT INTO product_slots VALUES(103,233); +INSERT INTO product_slots VALUES(103,234); +INSERT INTO product_slots VALUES(103,235); +INSERT INTO product_slots VALUES(103,236); +INSERT INTO product_slots VALUES(103,237); +INSERT INTO product_slots VALUES(103,238); +INSERT INTO product_slots VALUES(103,239); +INSERT INTO product_slots VALUES(103,240); +INSERT INTO product_slots VALUES(103,241); +INSERT INTO product_slots VALUES(103,242); +INSERT INTO product_slots VALUES(103,243); +INSERT INTO product_slots VALUES(103,244); +INSERT INTO product_slots VALUES(103,274); +INSERT INTO product_slots VALUES(103,275); +INSERT INTO product_slots VALUES(103,279); +INSERT INTO product_slots VALUES(103,280); +INSERT INTO product_slots VALUES(103,281); +INSERT INTO product_slots VALUES(103,282); +INSERT INTO product_slots VALUES(103,283); +INSERT INTO product_slots VALUES(103,284); +INSERT INTO product_slots VALUES(103,285); +INSERT INTO product_slots VALUES(103,286); +INSERT INTO product_slots VALUES(103,287); +CREATE TABLE IF NOT EXISTS "product_tag_info" ("id" INTEGER PRIMARY KEY, "tag_name" TEXT NOT NULL, "tag_description" TEXT, "image_url" TEXT, "is_dashboard_tag" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "related_stores" TEXT); +INSERT INTO product_tag_info VALUES(1,'Chicken','Chicken related items','tags/1770321659633-1763869265110-e22b6d94-dac9-499f-babb-1e944d90b01a.jpeg%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3D8fab47503efb9547b50e4fb317e35cc7%252F20260205%252Fapac%252Fs3%252Faws4_request%26X-Amz-Date%3D20260205T195535Z%26X-Amz-Expires%3D259200%26X-Amz-Signature%3D917db15bcc60cab7ac5cd5e49d85d13a960fe77b4a5e327dd449048870494cf9%26X-Amz-SignedHeaders%3Dhost%26x-amz-checksum-mode%3DENABLED%26x-id%3DGetObject',1,'2025-11-22T02:00:14.678Z','[1]'); +INSERT INTO product_tag_info VALUES(2,'Meat','Meat Products','tags/1763835253683-c9c3e293-0bef-4c58-a976-dd49c050cd36.jpeg',1,'2025-11-22T12:44:15.930Z',NULL); +INSERT INTO product_tag_info VALUES(3,'Fruits','Delicious fresh fruits','tags/1763835293899-43b3fbe1-9b5b-441c-b4d4-d1691c3f02f3.webp',1,'2025-11-22T12:44:55.491Z',NULL); +INSERT INTO product_tag_info VALUES(4,'Fish','Types ','tags/1770323410499-1763869436182-bf82f7b4-a1f3-4113-985b-96311b7a910e.jpeg%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3D8fab47503efb9547b50e4fb317e35cc7%252F20260205%252Fapac%252Fs3%252Faws4_request%26X-Amz-Date%3D20260205T202804Z%26X-Amz-Expires%3D259200%26X-Amz-Signature%3Dea436390b277935d843cae6b5cfa62aeed5799cb4a962ab31a0be4b132ca4b30%26X-Amz-SignedHeaders%3Dhost%26x-amz-checksum-mode%3DENABLED%26x-id%3DGetObject',1,'2025-11-22T22:13:03.039Z','[1]'); +INSERT INTO product_tag_info VALUES(5,'Vegetables',NULL,'tags/1768709725124-ebf421c5-ad52-49a9-b65c-1de008110b8a.png',1,'2026-01-17T22:45:25.461Z',NULL); +INSERT INTO product_tag_info VALUES(6,'Mutton','Mutton Products','tags/1770323560823-fd0ec463-bed0-474e-aa14-dc6480ce36af.jpeg',1,'2026-02-05T15:02:41.070Z','[1]'); +INSERT INTO product_tag_info VALUES(39,'DemoTag','Demo prod tag','product-images/1774116266063.jpg',0,'2026-03-21T12:20:34.282Z','[2,1]'); +CREATE TABLE IF NOT EXISTS "product_tags" ("id" INTEGER PRIMARY KEY, "product_id" INTEGER NOT NULL, "tag_id" INTEGER NOT NULL, "assigned_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO product_tags VALUES(114,2,1,'2026-01-15T06:49:23.323Z'); +INSERT INTO product_tags VALUES(115,2,2,'2026-01-15T06:49:23.323Z'); +INSERT INTO product_tags VALUES(130,42,1,'2026-01-17T02:37:49.548Z'); +INSERT INTO product_tags VALUES(131,42,2,'2026-01-17T02:37:49.548Z'); +INSERT INTO product_tags VALUES(132,7,3,'2026-01-17T03:23:29.890Z'); +INSERT INTO product_tags VALUES(133,21,1,'2026-01-17T03:28:21.647Z'); +INSERT INTO product_tags VALUES(134,21,2,'2026-01-17T03:28:21.647Z'); +INSERT INTO product_tags VALUES(136,26,3,'2026-01-17T03:34:05.740Z'); +INSERT INTO product_tags VALUES(143,39,3,'2026-01-17T06:11:21.465Z'); +INSERT INTO product_tags VALUES(164,3,1,'2026-01-18T01:05:33.690Z'); +INSERT INTO product_tags VALUES(165,3,2,'2026-01-18T01:05:33.690Z'); +INSERT INTO product_tags VALUES(168,49,3,'2026-01-18T11:28:56.144Z'); +INSERT INTO product_tags VALUES(202,9,4,'2026-01-25T08:36:25.210Z'); +INSERT INTO product_tags VALUES(203,75,4,'2026-01-25T08:38:25.840Z'); +INSERT INTO product_tags VALUES(215,11,3,'2026-01-25T11:09:47.389Z'); +INSERT INTO product_tags VALUES(222,8,3,'2026-01-25T11:49:56.733Z'); +INSERT INTO product_tags VALUES(223,25,3,'2026-01-25T11:50:46.177Z'); +INSERT INTO product_tags VALUES(226,48,3,'2026-01-25T11:55:18.601Z'); +INSERT INTO product_tags VALUES(230,24,2,'2026-01-25T12:17:02.952Z'); +INSERT INTO product_tags VALUES(231,24,1,'2026-01-25T12:17:02.952Z'); +INSERT INTO product_tags VALUES(234,15,1,'2026-01-25T12:19:07.538Z'); +INSERT INTO product_tags VALUES(235,15,2,'2026-01-25T12:19:07.538Z'); +INSERT INTO product_tags VALUES(238,36,1,'2026-01-25T12:20:23.324Z'); +INSERT INTO product_tags VALUES(242,55,3,'2026-01-25T12:36:14.976Z'); +INSERT INTO product_tags VALUES(243,82,4,'2026-01-25T12:49:15.711Z'); +INSERT INTO product_tags VALUES(244,81,2,'2026-01-25T12:55:33.320Z'); +INSERT INTO product_tags VALUES(245,81,4,'2026-01-25T12:55:33.320Z'); +INSERT INTO product_tags VALUES(246,83,4,'2026-01-25T12:56:28.787Z'); +INSERT INTO product_tags VALUES(251,64,5,'2026-01-25T22:42:34.137Z'); +INSERT INTO product_tags VALUES(253,33,5,'2026-01-25T22:44:37.101Z'); +INSERT INTO product_tags VALUES(254,16,5,'2026-01-25T22:45:58.208Z'); +INSERT INTO product_tags VALUES(263,53,3,'2026-01-25T22:53:41.199Z'); +INSERT INTO product_tags VALUES(274,1,1,'2026-01-25T23:19:00.304Z'); +INSERT INTO product_tags VALUES(278,62,3,'2026-01-27T11:51:39.242Z'); +INSERT INTO product_tags VALUES(279,60,3,'2026-01-27T11:52:45.990Z'); +INSERT INTO product_tags VALUES(280,61,3,'2026-01-27T11:57:45.345Z'); +INSERT INTO product_tags VALUES(282,44,3,'2026-01-27T11:59:15.067Z'); +INSERT INTO product_tags VALUES(283,13,3,'2026-01-27T20:24:25.976Z'); +INSERT INTO product_tags VALUES(290,41,1,'2026-01-27T21:12:14.665Z'); +INSERT INTO product_tags VALUES(291,41,2,'2026-01-27T21:12:14.665Z'); +INSERT INTO product_tags VALUES(293,6,3,'2026-01-27T21:13:55.115Z'); +INSERT INTO product_tags VALUES(294,72,5,'2026-01-27T21:17:12.977Z'); +INSERT INTO product_tags VALUES(295,29,5,'2026-01-27T21:20:37.640Z'); +INSERT INTO product_tags VALUES(298,19,5,'2026-01-27T21:30:53.298Z'); +INSERT INTO product_tags VALUES(299,18,5,'2026-01-27T21:32:17.814Z'); +INSERT INTO product_tags VALUES(301,30,5,'2026-01-27T21:35:38.807Z'); +INSERT INTO product_tags VALUES(303,27,5,'2026-01-27T21:38:48.593Z'); +INSERT INTO product_tags VALUES(304,89,5,'2026-01-27T21:39:06.159Z'); +INSERT INTO product_tags VALUES(306,70,5,'2026-01-27T21:42:26.477Z'); +INSERT INTO product_tags VALUES(307,80,1,'2026-01-27T21:43:10.425Z'); +INSERT INTO product_tags VALUES(308,5,5,'2026-01-27T21:43:12.449Z'); +INSERT INTO product_tags VALUES(309,76,5,'2026-01-27T21:44:10.836Z'); +INSERT INTO product_tags VALUES(310,78,5,'2026-01-27T21:50:37.216Z'); +INSERT INTO product_tags VALUES(312,45,5,'2026-01-27T23:02:05.789Z'); +INSERT INTO product_tags VALUES(313,31,5,'2026-01-27T23:03:13.073Z'); +INSERT INTO product_tags VALUES(314,77,5,'2026-01-28T02:36:29.616Z'); +INSERT INTO product_tags VALUES(315,47,3,'2026-01-28T02:37:53.143Z'); +INSERT INTO product_tags VALUES(316,96,3,'2026-01-28T02:40:33.400Z'); +INSERT INTO product_tags VALUES(318,59,3,'2026-01-30T01:08:49.461Z'); +INSERT INTO product_tags VALUES(319,10,1,'2026-02-01T02:29:06.966Z'); +INSERT INTO product_tags VALUES(320,10,2,'2026-02-01T02:29:06.966Z'); +INSERT INTO product_tags VALUES(322,34,2,'2026-02-02T21:48:40.200Z'); +INSERT INTO product_tags VALUES(323,38,3,'2026-02-03T04:50:39.627Z'); +INSERT INTO product_tags VALUES(324,46,3,'2026-02-03T13:09:46.365Z'); +INSERT INTO product_tags VALUES(325,12,2,'2026-02-05T21:38:15.915Z'); +INSERT INTO product_tags VALUES(326,4,2,'2026-02-05T21:38:30.229Z'); +INSERT INTO product_tags VALUES(327,4,6,'2026-02-05T21:38:30.229Z'); +INSERT INTO product_tags VALUES(330,28,2,'2026-02-05T21:39:03.379Z'); +INSERT INTO product_tags VALUES(331,28,6,'2026-02-05T21:39:03.379Z'); +INSERT INTO product_tags VALUES(332,14,2,'2026-02-05T21:39:17.766Z'); +INSERT INTO product_tags VALUES(333,14,6,'2026-02-05T21:39:17.766Z'); +INSERT INTO product_tags VALUES(334,84,2,'2026-02-05T21:39:32.746Z'); +INSERT INTO product_tags VALUES(335,84,6,'2026-02-05T21:39:32.746Z'); +INSERT INTO product_tags VALUES(336,86,2,'2026-02-05T21:39:41.075Z'); +INSERT INTO product_tags VALUES(337,86,6,'2026-02-05T21:39:41.075Z'); +INSERT INTO product_tags VALUES(338,98,6,'2026-02-05T21:39:49.218Z'); +INSERT INTO product_tags VALUES(339,98,2,'2026-02-05T21:39:49.218Z'); +INSERT INTO product_tags VALUES(340,99,2,'2026-02-05T21:40:00.488Z'); +INSERT INTO product_tags VALUES(341,99,6,'2026-02-05T21:40:00.488Z'); +INSERT INTO product_tags VALUES(342,20,2,'2026-02-05T21:40:13.041Z'); +INSERT INTO product_tags VALUES(343,20,6,'2026-02-05T21:40:13.041Z'); +INSERT INTO product_tags VALUES(344,35,2,'2026-02-05T21:40:21.153Z'); +INSERT INTO product_tags VALUES(345,35,6,'2026-02-05T21:40:21.153Z'); +INSERT INTO product_tags VALUES(346,85,6,'2026-02-05T21:40:31.451Z'); +INSERT INTO product_tags VALUES(347,85,2,'2026-02-05T21:40:31.451Z'); +INSERT INTO product_tags VALUES(348,87,2,'2026-02-05T21:40:40.483Z'); +INSERT INTO product_tags VALUES(349,87,6,'2026-02-05T21:40:40.483Z'); +INSERT INTO product_tags VALUES(350,67,5,'2026-02-06T03:28:46.803Z'); +INSERT INTO product_tags VALUES(353,17,5,'2026-02-20T05:05:15.691Z'); +INSERT INTO product_tags VALUES(354,32,5,'2026-02-21T23:13:56.993Z'); +INSERT INTO product_tags VALUES(355,37,5,'2026-02-23T03:02:49.047Z'); +INSERT INTO product_tags VALUES(388,23,2,'2026-03-12T09:45:05.232Z'); +INSERT INTO product_tags VALUES(389,23,1,'2026-03-12T09:45:05.232Z'); +INSERT INTO product_tags VALUES(391,50,3,'2026-03-14T05:54:04.645Z'); +INSERT INTO product_tags VALUES(394,140,1,'2026-03-26T06:15:15.135Z'); +INSERT INTO product_tags VALUES(395,140,4,'2026-03-26T06:15:15.135Z'); +CREATE TABLE IF NOT EXISTS "refunds" ("id" INTEGER PRIMARY KEY, "order_id" INTEGER NOT NULL, "refund_amount" REAL, "refund_status" TEXT DEFAULT 'none', "merchant_refund_id" TEXT, "refund_processed_at" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO refunds VALUES(1,14,73.499999999999996447,'success','rfnd_Rithb3BCPvwCVZ','2025-11-22T13:45:42.202Z','2025-11-19T12:47:41.044Z'); +INSERT INTO refunds VALUES(2,16,NULL,'none',NULL,NULL,'2025-11-23T06:11:45.422Z'); +INSERT INTO refunds VALUES(3,21,250.0,'success','rfnd_RjAobSg6UT2mvE','2025-11-23T06:29:45.582Z','2025-11-23T06:20:11.343Z'); +INSERT INTO refunds VALUES(4,17,NULL,'na',NULL,NULL,'2025-11-22T13:42:48.103Z'); +INSERT INTO refunds VALUES(5,22,NULL,'none',NULL,NULL,'2025-11-24T06:03:51.483Z'); +INSERT INTO refunds VALUES(6,23,220.0,'success','rfnd_RjZ0NnNrz80osd','2025-11-24T06:10:00.791Z','2025-11-24T06:03:20.864Z'); +INSERT INTO refunds VALUES(7,25,250.0,'success','rfnd_RjwqkDB4wfwBuY','2025-11-25T05:30:00.813Z','2025-11-25T05:25:53.609Z'); +INSERT INTO refunds VALUES(8,12,NULL,'pending',NULL,NULL,'2025-11-28T22:12:39.527Z'); +INSERT INTO refunds VALUES(9,31,NULL,'pending',NULL,NULL,'2025-11-28T22:33:24.299Z'); +INSERT INTO refunds VALUES(10,35,NULL,'pending',NULL,NULL,'2025-11-28T23:15:19.165Z'); +INSERT INTO refunds VALUES(11,50,NULL,'pending',NULL,NULL,'2025-11-29T01:16:21.186Z'); +INSERT INTO refunds VALUES(12,51,NULL,'pending',NULL,NULL,'2025-11-29T01:42:14.433Z'); +INSERT INTO refunds VALUES(13,52,NULL,'pending',NULL,NULL,'2025-11-29T01:52:21.830Z'); +INSERT INTO refunds VALUES(14,53,320.0,'success','rfnd_RlTSoRRkSliydO','2025-11-29T02:07:29.105Z','2025-11-29T01:58:56.303Z'); +INSERT INTO refunds VALUES(15,54,2850.0,'success','rfnd_RlcXX2g7K7jDCh','2025-11-29T11:00:00.772Z','2025-11-29T10:54:08.554Z'); +INSERT INTO refunds VALUES(16,64,NULL,'pending',NULL,NULL,'2025-12-19T04:15:02.346Z'); +INSERT INTO refunds VALUES(17,74,NULL,'na',NULL,NULL,'2025-12-19T11:38:55.276Z'); +INSERT INTO refunds VALUES(18,68,NULL,'na',NULL,NULL,'2025-12-19T21:20:54.339Z'); +INSERT INTO refunds VALUES(19,89,NULL,'na',NULL,NULL,'2025-12-20T15:09:31.699Z'); +INSERT INTO refunds VALUES(20,88,NULL,'na',NULL,NULL,'2025-12-20T21:37:32.151Z'); +INSERT INTO refunds VALUES(21,93,NULL,'na',NULL,NULL,'2025-12-22T08:15:45.531Z'); +INSERT INTO refunds VALUES(22,96,NULL,'na',NULL,NULL,'2025-12-22T09:07:24.665Z'); +INSERT INTO refunds VALUES(23,101,NULL,'na',NULL,NULL,'2025-12-23T11:46:55.138Z'); +INSERT INTO refunds VALUES(24,102,NULL,'na',NULL,NULL,'2025-12-27T01:40:37.790Z'); +INSERT INTO refunds VALUES(25,148,NULL,'na',NULL,NULL,'2026-01-17T23:01:50.064Z'); +INSERT INTO refunds VALUES(26,159,NULL,'na',NULL,NULL,'2026-01-18T10:06:56.160Z'); +INSERT INTO refunds VALUES(27,171,NULL,'na',NULL,NULL,'2026-01-27T22:25:10.936Z'); +INSERT INTO refunds VALUES(28,167,NULL,'na',NULL,NULL,'2026-01-27T22:26:35.510Z'); +INSERT INTO refunds VALUES(29,168,NULL,'na',NULL,NULL,'2026-01-27T22:27:15.817Z'); +INSERT INTO refunds VALUES(30,169,NULL,'na',NULL,NULL,'2026-01-27T22:27:32.421Z'); +INSERT INTO refunds VALUES(31,156,NULL,'na',NULL,NULL,'2026-01-27T22:30:19.302Z'); +INSERT INTO refunds VALUES(32,146,NULL,'na',NULL,NULL,'2026-01-28T00:39:48.320Z'); +INSERT INTO refunds VALUES(33,178,NULL,'na',NULL,NULL,'2026-01-28T10:02:31.195Z'); +INSERT INTO refunds VALUES(34,145,NULL,'na',NULL,NULL,'2026-01-28T12:53:28.911Z'); +INSERT INTO refunds VALUES(35,144,NULL,'na',NULL,NULL,'2026-01-28T13:29:22.470Z'); +INSERT INTO refunds VALUES(36,143,NULL,'na',NULL,NULL,'2026-01-28T13:30:04.792Z'); +INSERT INTO refunds VALUES(37,141,NULL,'na',NULL,NULL,'2026-01-28T13:30:36.001Z'); +INSERT INTO refunds VALUES(38,140,NULL,'na',NULL,NULL,'2026-01-28T13:31:05.250Z'); +INSERT INTO refunds VALUES(39,183,NULL,'na',NULL,NULL,'2026-01-30T02:09:22.273Z'); +INSERT INTO refunds VALUES(40,188,NULL,'na',NULL,NULL,'2026-01-31T05:26:43.840Z'); +INSERT INTO refunds VALUES(41,186,NULL,'na',NULL,NULL,'2026-01-31T07:35:41.324Z'); +INSERT INTO refunds VALUES(42,185,NULL,'na',NULL,NULL,'2026-01-31T07:36:00.966Z'); +INSERT INTO refunds VALUES(43,190,NULL,'na',NULL,NULL,'2026-01-31T22:05:43.606Z'); +INSERT INTO refunds VALUES(44,190,NULL,'na',NULL,NULL,'2026-01-31T23:03:59.073Z'); +INSERT INTO refunds VALUES(45,196,NULL,'na',NULL,NULL,'2026-02-01T04:42:48.106Z'); +INSERT INTO refunds VALUES(46,204,NULL,'na',NULL,NULL,'2026-02-02T06:48:48.035Z'); +INSERT INTO refunds VALUES(47,166,NULL,'na',NULL,NULL,'2026-02-02T10:47:37.685Z'); +INSERT INTO refunds VALUES(48,207,NULL,'na',NULL,NULL,'2026-02-02T11:22:59.955Z'); +INSERT INTO refunds VALUES(49,213,NULL,'na',NULL,NULL,'2026-02-03T07:34:17.723Z'); +INSERT INTO refunds VALUES(50,214,NULL,'na',NULL,NULL,'2026-02-03T08:41:50.996Z'); +INSERT INTO refunds VALUES(51,216,NULL,'na',NULL,NULL,'2026-02-03T23:34:45.350Z'); +INSERT INTO refunds VALUES(52,228,NULL,'na',NULL,NULL,'2026-02-06T16:17:39.262Z'); +INSERT INTO refunds VALUES(53,225,NULL,'na',NULL,NULL,'2026-02-06T23:20:32.417Z'); +INSERT INTO refunds VALUES(54,230,NULL,'na',NULL,NULL,'2026-02-06T23:34:36.400Z'); +INSERT INTO refunds VALUES(55,233,NULL,'na',NULL,NULL,'2026-02-07T07:25:04.081Z'); +INSERT INTO refunds VALUES(56,232,NULL,'na',NULL,NULL,'2026-02-07T07:26:35.768Z'); +INSERT INTO refunds VALUES(57,238,NULL,'na',NULL,NULL,'2026-02-08T00:55:38.297Z'); +INSERT INTO refunds VALUES(58,239,NULL,'na',NULL,NULL,'2026-02-08T00:59:58.539Z'); +INSERT INTO refunds VALUES(59,246,NULL,'na',NULL,NULL,'2026-02-08T23:17:27.385Z'); +INSERT INTO refunds VALUES(60,247,NULL,'na',NULL,NULL,'2026-02-09T02:04:46.141Z'); +INSERT INTO refunds VALUES(61,250,NULL,'na',NULL,NULL,'2026-02-10T22:00:06.670Z'); +INSERT INTO refunds VALUES(62,256,NULL,'na',NULL,NULL,'2026-02-16T01:22:51.309Z'); +INSERT INTO refunds VALUES(63,269,NULL,'na',NULL,NULL,'2026-02-18T04:17:30.087Z'); +INSERT INTO refunds VALUES(64,273,NULL,'na',NULL,NULL,'2026-02-18T05:16:11.655Z'); +INSERT INTO refunds VALUES(65,260,NULL,'na',NULL,NULL,'2026-02-18T06:14:42.228Z'); +INSERT INTO refunds VALUES(66,288,NULL,'na',NULL,NULL,'2026-02-19T04:37:45.086Z'); +INSERT INTO refunds VALUES(67,287,NULL,'na',NULL,NULL,'2026-02-19T04:40:17.239Z'); +INSERT INTO refunds VALUES(68,282,NULL,'na',NULL,NULL,'2026-02-19T05:33:59.169Z'); +INSERT INTO refunds VALUES(69,281,NULL,'na',NULL,NULL,'2026-02-19T05:34:11.079Z'); +INSERT INTO refunds VALUES(70,285,NULL,'na',NULL,NULL,'2026-02-19T05:37:22.327Z'); +INSERT INTO refunds VALUES(71,293,NULL,'na',NULL,NULL,'2026-02-19T07:22:21.525Z'); +INSERT INTO refunds VALUES(72,292,NULL,'na',NULL,NULL,'2026-02-19T07:22:49.181Z'); +INSERT INTO refunds VALUES(73,296,NULL,'na',NULL,NULL,'2026-02-19T12:49:30.261Z'); +INSERT INTO refunds VALUES(74,315,NULL,'na',NULL,NULL,'2026-02-21T04:45:00.816Z'); +INSERT INTO refunds VALUES(75,317,NULL,'na',NULL,NULL,'2026-02-21T06:26:57.626Z'); +INSERT INTO refunds VALUES(76,321,NULL,'na',NULL,NULL,'2026-02-21T22:47:12.386Z'); +INSERT INTO refunds VALUES(77,335,NULL,'na',NULL,NULL,'2026-02-23T04:42:18.550Z'); +INSERT INTO refunds VALUES(78,20,NULL,'na',NULL,NULL,'2026-02-25T02:13:38.575Z'); +CREATE TABLE IF NOT EXISTS "reserved_coupons" ("id" INTEGER PRIMARY KEY, "secret_code" TEXT NOT NULL, "coupon_code" TEXT NOT NULL, "discount_percent" REAL, "flat_discount" REAL, "min_order" REAL, "product_ids" TEXT, "max_value" REAL, "valid_till" TEXT, "max_limit_for_user" INTEGER, "exclusive_apply" INTEGER NOT NULL DEFAULT false, "is_redeemed" INTEGER NOT NULL DEFAULT false, "redeemed_by" INTEGER, "redeemed_at" TEXT, "created_by" INTEGER NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO reserved_coupons VALUES(1,'RESERVE_TEST34','RESERVE_TEST34',25.0,NULL,1000.0,NULL,250.0,'2026-01-30T07:46:00.000Z',2,0,1,1,'2026-01-12T03:28:20.468Z',1,'2026-01-07T07:46:53.387Z'); +CREATE TABLE IF NOT EXISTS "special_deals" ("id" INTEGER PRIMARY KEY, "product_id" INTEGER NOT NULL, "quantity" REAL NOT NULL, "price" REAL NOT NULL, "valid_till" TEXT NOT NULL); +INSERT INTO special_deals VALUES(12,9,2.0,500.0,'2025-12-08T18:30:00.000Z'); +CREATE TABLE IF NOT EXISTS "staff_permissions" ("id" INTEGER PRIMARY KEY, "permission_name" TEXT NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO staff_permissions VALUES(1,'crud_product','2026-01-12T13:13:14.537Z'); +INSERT INTO staff_permissions VALUES(2,'make_coupon','2026-01-12T13:13:14.650Z'); +INSERT INTO staff_permissions VALUES(3,'crud_staff_users','2026-01-12T13:13:14.759Z'); +CREATE TABLE IF NOT EXISTS "staff_role_permissions" ("id" INTEGER PRIMARY KEY, "staff_role_id" INTEGER NOT NULL, "staff_permission_id" INTEGER NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO staff_role_permissions VALUES(1,1,1,'2026-01-12T13:13:14.815Z'); +INSERT INTO staff_role_permissions VALUES(2,1,2,'2026-01-12T13:13:14.815Z'); +INSERT INTO staff_role_permissions VALUES(3,1,3,'2026-01-12T13:13:14.815Z'); +INSERT INTO staff_role_permissions VALUES(4,2,1,'2026-01-12T13:13:14.815Z'); +INSERT INTO staff_role_permissions VALUES(5,2,2,'2026-01-12T13:13:14.815Z'); +INSERT INTO staff_role_permissions VALUES(6,3,2,'2026-01-12T13:13:14.815Z'); +CREATE TABLE IF NOT EXISTS "staff_roles" ("id" INTEGER PRIMARY KEY, "role_name" TEXT NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO staff_roles VALUES(1,'super_admin','2026-01-12T13:13:14.097Z'); +INSERT INTO staff_roles VALUES(2,'admin','2026-01-12T13:13:14.208Z'); +INSERT INTO staff_roles VALUES(3,'marketer','2026-01-12T13:13:14.318Z'); +INSERT INTO staff_roles VALUES(4,'delivery_staff','2026-01-12T13:13:14.427Z'); +CREATE TABLE IF NOT EXISTS "staff_users" ("id" INTEGER PRIMARY KEY, "name" TEXT NOT NULL, "password" TEXT NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "staff_role_id" INTEGER); +INSERT INTO staff_users VALUES(1,'admin1','$2a$12$VEQHLJpr0l7Z0A.pZrQCk.Yjnf2M4k.RR82f0TlJ2zZU66pMH2Nh.','2025-11-17T03:24:02.349Z',NULL); +INSERT INTO staff_users VALUES(2,'admin2','$2a$12$VEQHLJpr0l7Z0A.pZrQCk.Yjnf2M4k.RR82f0TlJ2zZU66pMH2Nh.','2025-11-17T03:24:12.054Z',NULL); +INSERT INTO staff_users VALUES(3,'admin3','$2a$12$VEQHLJpr0l7Z0A.pZrQCk.Yjnf2M4k.RR82f0TlJ2zZU66pMH2Nh.','2025-11-17T03:24:12.054Z',NULL); +CREATE TABLE IF NOT EXISTS "store_info" ("id" INTEGER PRIMARY KEY, "name" TEXT NOT NULL, "description" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "owner" INTEGER NOT NULL, "image_url" TEXT); +INSERT INTO store_info VALUES(1,'Fresh meat','"Fresh, high-quality meat sourced from trusted suppliers and hygienically processed. Cut fresh, packed safely, and delivered to your doorstep."','2025-11-16T21:59:24.030Z',1,'store-images/1766052073748.png'); +INSERT INTO store_info VALUES(2,'The Fruit Store','"Fresh, juicy fruits handpicked for quality and taste. Naturally ripened, carefully packed, and delivered fresh to your home."','2025-11-18T09:01:21.914Z',1,'store-images/1766053828604.png'); +INSERT INTO store_info VALUES(4,'Vegetables','Fresh, handpicked vegetables delivered straight from trusted farms to your home. Enjoy clean, high-quality sabzi every day-healthy, natural, and full of freshness.','2025-12-18T04:23:40.707Z',1,'store-images/1766051618139.png'); +INSERT INTO store_info VALUES(8,'Demo2','Demo2 ','2026-03-21T09:35:33.855Z',1,'store-images/1774105532235.jpg'); +INSERT INTO store_info VALUES(9,'Test3','Test3','2026-03-21T23:18:44.202Z',1,'store-images/1774524652442.jpg'); +CREATE TABLE IF NOT EXISTS "units" ("id" INTEGER PRIMARY KEY, "short_notation" TEXT NOT NULL, "full_name" TEXT NOT NULL); +INSERT INTO units VALUES(1,'Kg','Kilogram'); +INSERT INTO units VALUES(2,'L','Litre'); +INSERT INTO units VALUES(3,'Dz','Dozen'); +INSERT INTO units VALUES(4,'Pc','Unit Piece'); +CREATE TABLE IF NOT EXISTS "unlogged_user_tokens" ("id" INTEGER PRIMARY KEY, "token" TEXT NOT NULL, "added_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "last_verified" TEXT); +INSERT INTO unlogged_user_tokens VALUES(2,'ExponentPushToken[5NlYMFDaJDm9RH7N14zUrA]','2026-03-20T02:00:07.752Z','2026-03-20T02:00:07.748Z'); +INSERT INTO unlogged_user_tokens VALUES(3,'ExponentPushToken[QjoZ9xGsqPYMF2CJC_pv7e]','2026-03-20T02:11:22.747Z','2026-03-20T02:11:22.746Z'); +INSERT INTO unlogged_user_tokens VALUES(4,'ExponentPushToken[IAt9_oGP63t5X2AKTm-Z_r]','2026-03-20T03:32:58.675Z','2026-03-21T01:23:00.017Z'); +CREATE TABLE IF NOT EXISTS "upload_url_status" ("id" INTEGER PRIMARY KEY, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "key" TEXT NOT NULL, "status" TEXT NOT NULL DEFAULT 'pending'); +INSERT INTO upload_url_status VALUES(35,'2025-12-07T03:28:13.136Z','review-images/1765097892914.jpg','pending'); +INSERT INTO upload_url_status VALUES(36,'2025-12-07T03:28:13.347Z','review-images/1765097893129.png','pending'); +INSERT INTO upload_url_status VALUES(37,'2025-12-07T03:33:04.090Z','review-images/1765098183876.jpg','pending'); +INSERT INTO upload_url_status VALUES(38,'2025-12-07T03:36:01.524Z','review-images/1765098361309.jpg','pending'); +INSERT INTO upload_url_status VALUES(39,'2025-12-07T03:38:00.499Z','review-images/1765098480284.jpg','pending'); +INSERT INTO upload_url_status VALUES(40,'2025-12-07T03:40:38.378Z','review-images/1765098638162.jpg','pending'); +INSERT INTO upload_url_status VALUES(41,'2025-12-07T03:44:45.828Z','review-images/1765098885608.jpg','pending'); +INSERT INTO upload_url_status VALUES(42,'2025-12-07T03:44:46.024Z','review-images/1765098885808.png','pending'); +INSERT INTO upload_url_status VALUES(43,'2025-12-07T03:45:55.598Z','review-images/1765098955365.jpg','pending'); +INSERT INTO upload_url_status VALUES(44,'2025-12-07T03:48:02.893Z','review-images/1765099082661.jpg','pending'); +INSERT INTO upload_url_status VALUES(45,'2025-12-07T03:54:36.343Z','review-images/1765099476101.jpg','pending'); +INSERT INTO upload_url_status VALUES(46,'2025-12-07T03:54:36.534Z','review-images/1765099476297.png','pending'); +INSERT INTO upload_url_status VALUES(47,'2025-12-07T04:21:35.194Z','review-images/1765101095057.jpg','pending'); +INSERT INTO upload_url_status VALUES(48,'2025-12-07T04:21:35.389Z','review-images/1765101095257.png','pending'); +INSERT INTO upload_url_status VALUES(49,'2025-12-07T04:21:43.722Z','review-images/1765101103591.jpg','pending'); +INSERT INTO upload_url_status VALUES(50,'2025-12-07T04:21:43.890Z','review-images/1765101103758.png','pending'); +INSERT INTO upload_url_status VALUES(51,'2025-12-07T04:24:01.353Z','review-images/1765101241219.jpg','pending'); +INSERT INTO upload_url_status VALUES(52,'2025-12-07T05:37:42.847Z','review-images/1765105662736.jpg','pending'); +INSERT INTO upload_url_status VALUES(53,'2025-12-07T05:40:19.798Z','review-images/1765105819687.jpg','pending'); +INSERT INTO upload_url_status VALUES(54,'2025-12-07T05:43:50.973Z','review-images/1765106030866.jpg','pending'); +INSERT INTO upload_url_status VALUES(55,'2025-12-07T05:48:27.294Z','review-images/1765106307190.jpg','pending'); +INSERT INTO upload_url_status VALUES(56,'2025-12-07T05:49:52.911Z','review-images/1765106392806.jpg','claimed'); +INSERT INTO upload_url_status VALUES(57,'2025-12-07T06:28:47.323Z','review-images/1765108727182.jpg','claimed'); +INSERT INTO upload_url_status VALUES(58,'2025-12-07T06:30:52.243Z','review-images/1765108852104.jpg','claimed'); +INSERT INTO upload_url_status VALUES(59,'2025-12-07T09:35:32.784Z','review-images/1765119932782.jpg','claimed'); +INSERT INTO upload_url_status VALUES(60,'2025-12-07T09:35:32.803Z','review-images/1765119932802.jpg','claimed'); +INSERT INTO upload_url_status VALUES(61,'2025-12-07T09:35:35.171Z','review-images/1765119935171.jpg','claimed'); +INSERT INTO upload_url_status VALUES(62,'2025-12-07T09:35:35.175Z','review-images/1765119935174.jpg','claimed'); +INSERT INTO upload_url_status VALUES(63,'2025-12-08T12:07:24.062Z','store-images/1765215443815.jpg','pending'); +INSERT INTO upload_url_status VALUES(64,'2025-12-08T12:19:22.136Z','store-images/1765216161855.jpg','pending'); +INSERT INTO upload_url_status VALUES(65,'2025-12-08T12:19:50.299Z','store-images/1765216190015.jpg','pending'); +INSERT INTO upload_url_status VALUES(66,'2025-12-08T12:22:27.708Z','store-images/1765216347423.jpg','pending'); +INSERT INTO upload_url_status VALUES(67,'2025-12-08T12:23:17.627Z','store-images/1765216397341.jpg','pending'); +INSERT INTO upload_url_status VALUES(68,'2025-12-08T12:23:50.898Z','store-images/1765216430679.jpg','pending'); +INSERT INTO upload_url_status VALUES(69,'2025-12-08T12:26:57.233Z','store-images/1765216617009.jpg','pending'); +INSERT INTO upload_url_status VALUES(70,'2025-12-08T12:35:30.092Z','store-images/1765217129859.jpg','pending'); +INSERT INTO upload_url_status VALUES(71,'2025-12-08T13:04:22.371Z','store-images/1765218862137.jpg','pending'); +INSERT INTO upload_url_status VALUES(72,'2025-12-08T13:14:47.858Z','store-images/1765219487659.jpg','pending'); +INSERT INTO upload_url_status VALUES(73,'2025-12-08T13:17:53.380Z','store-images/1765219673182.jpg','pending'); +INSERT INTO upload_url_status VALUES(74,'2025-12-08T13:18:59.825Z','store-images/1765219739627.jpg','pending'); +INSERT INTO upload_url_status VALUES(75,'2025-12-08T13:19:11.635Z','store-images/1765219751441.png','pending'); +INSERT INTO upload_url_status VALUES(76,'2025-12-08T13:26:24.852Z','store-images/1765220184655.jpg','pending'); +INSERT INTO upload_url_status VALUES(77,'2025-12-18T04:23:38.142Z','store-images/1766051618139.png','pending'); +INSERT INTO upload_url_status VALUES(78,'2025-12-18T04:29:00.775Z','store-images/1766051940774.png','pending'); +INSERT INTO upload_url_status VALUES(79,'2025-12-18T04:31:13.748Z','store-images/1766052073748.png','pending'); +INSERT INTO upload_url_status VALUES(80,'2025-12-18T05:00:28.605Z','store-images/1766053828604.png','pending'); +INSERT INTO upload_url_status VALUES(81,'2025-12-19T02:24:01.803Z','store-images/1766130841801.png','pending'); +INSERT INTO upload_url_status VALUES(82,'2025-12-19T03:21:37.362Z','store-images/1766134297361.png','pending'); +INSERT INTO upload_url_status VALUES(83,'2025-12-19T09:36:54.727Z','store-images/1766156814725.jpg','pending'); +INSERT INTO upload_url_status VALUES(84,'2025-12-19T09:37:23.364Z','store-images/1766156843363.jpg','pending'); +INSERT INTO upload_url_status VALUES(85,'2025-12-19T09:48:15.263Z','review-images/1766157495262.jpg','claimed'); +INSERT INTO upload_url_status VALUES(86,'2025-12-19T09:48:16.653Z','review-images/1766157496653.jpg','claimed'); +INSERT INTO upload_url_status VALUES(87,'2025-12-22T11:38:49.581Z','review-images/1766423329579.jpg','claimed'); +INSERT INTO upload_url_status VALUES(88,'2025-12-24T05:08:16.926Z','review-images/1766572696924.jpg','pending'); +INSERT INTO upload_url_status VALUES(89,'2025-12-24T05:08:19.865Z','review-images/1766572699864.jpg','pending'); +INSERT INTO upload_url_status VALUES(90,'2025-12-24T05:08:20.373Z','review-images/1766572700372.jpg','pending'); +INSERT INTO upload_url_status VALUES(91,'2025-12-24T05:08:20.544Z','review-images/1766572700543.jpg','claimed'); +INSERT INTO upload_url_status VALUES(92,'2025-12-24T05:08:20.718Z','review-images/1766572700718.jpg','pending'); +INSERT INTO upload_url_status VALUES(93,'2025-12-24T05:08:20.880Z','review-images/1766572700880.jpg','claimed'); +INSERT INTO upload_url_status VALUES(94,'2025-12-24T05:08:21.138Z','review-images/1766572701138.jpg','claimed'); +INSERT INTO upload_url_status VALUES(95,'2025-12-24T05:08:21.266Z','review-images/1766572701266.jpg','claimed'); +INSERT INTO upload_url_status VALUES(96,'2025-12-24T05:08:21.491Z','review-images/1766572701490.jpg','claimed'); +INSERT INTO upload_url_status VALUES(97,'2025-12-31T01:38:50.807Z','store-images/1767164930805.jpg','pending'); +INSERT INTO upload_url_status VALUES(98,'2025-12-31T01:47:30.381Z','store-images/1767165450380.jpg','pending'); +INSERT INTO upload_url_status VALUES(99,'2025-12-31T03:50:22.326Z','store-images/1767172822325.jpg','pending'); +INSERT INTO upload_url_status VALUES(100,'2025-12-31T03:51:09.711Z','store-images/1767172869656.jpg','pending'); +INSERT INTO upload_url_status VALUES(101,'2025-12-31T03:52:27.878Z','store-images/1767172947808.jpg','pending'); +INSERT INTO upload_url_status VALUES(102,'2025-12-31T03:56:02.505Z','store-images/1767173162428.jpg','pending'); +INSERT INTO upload_url_status VALUES(103,'2025-12-31T03:57:38.564Z','store-images/1767173258487.jpg','pending'); +INSERT INTO upload_url_status VALUES(104,'2025-12-31T03:58:37.526Z','store-images/1767173317447.jpg','pending'); +INSERT INTO upload_url_status VALUES(105,'2025-12-31T03:59:01.794Z','store-images/1767173341715.jpg','pending'); +INSERT INTO upload_url_status VALUES(106,'2025-12-31T04:00:21.099Z','store-images/1767173421020.jpg','pending'); +INSERT INTO upload_url_status VALUES(107,'2025-12-31T04:02:13.724Z','store-images/1767173533644.jpg','pending'); +INSERT INTO upload_url_status VALUES(108,'2025-12-31T04:22:07.810Z','store-images/1767174727704.png','pending'); +INSERT INTO upload_url_status VALUES(109,'2025-12-31T04:23:31.985Z','store-images/1767174811880.png','pending'); +INSERT INTO upload_url_status VALUES(110,'2025-12-31T06:24:23.209Z','store-images/1767182063206.jpg','pending'); +INSERT INTO upload_url_status VALUES(111,'2026-01-01T05:10:51.927Z','store-images/1767264051926.png','pending'); +INSERT INTO upload_url_status VALUES(112,'2026-01-01T05:10:53.379Z','store-images/1767264053378.png','pending'); +INSERT INTO upload_url_status VALUES(113,'2026-01-03T04:36:07.083Z','store-images/1767434767082.png','pending'); +INSERT INTO upload_url_status VALUES(114,'2026-01-18T21:44:01.277Z','review-images/1768792441275.jpg','claimed'); +INSERT INTO upload_url_status VALUES(115,'2026-01-18T21:44:01.748Z','review-images/1768792441748.jpg','claimed'); +INSERT INTO upload_url_status VALUES(116,'2026-01-24T02:31:51.676Z','store-images/1769241711675.png','pending'); +INSERT INTO upload_url_status VALUES(117,'2026-02-05T03:14:05.023Z','store-images/1770281045021.jpg','pending'); +INSERT INTO upload_url_status VALUES(118,'2026-02-05T03:14:06.298Z','store-images/1770281046297.jpg','pending'); +INSERT INTO upload_url_status VALUES(119,'2026-02-06T20:13:56.019Z','store-images/1770428636017.png','pending'); +INSERT INTO upload_url_status VALUES(120,'2026-02-06T20:29:53.456Z','store-images/1770429593455.jpg','pending'); +INSERT INTO upload_url_status VALUES(121,'2026-02-08T09:05:45.256Z','notification-images/1770561345196.jpg','pending'); +INSERT INTO upload_url_status VALUES(122,'2026-02-08T09:10:44.302Z','notification-images/1770561644251.jpg','pending'); +INSERT INTO upload_url_status VALUES(123,'2026-02-08T09:12:48.344Z','notification-images/1770561768293.jpg','pending'); +INSERT INTO upload_url_status VALUES(124,'2026-02-08T09:16:02.798Z','notification-images/1770561962747.jpg','pending'); +INSERT INTO upload_url_status VALUES(125,'2026-02-08T09:18:25.414Z','notification-images/1770562105363.jpg','pending'); +INSERT INTO upload_url_status VALUES(126,'2026-02-08T09:20:51.168Z','notification-images/1770562251117.jpg','pending'); +INSERT INTO upload_url_status VALUES(127,'2026-02-08T09:25:03.084Z','notification-images/1770562502985.jpg','pending'); +INSERT INTO upload_url_status VALUES(128,'2026-02-08T09:28:10.135Z','notification-images/1770562690047.jpg','pending'); +INSERT INTO upload_url_status VALUES(129,'2026-02-08T09:29:29.284Z','notification-images/1770562769196.jpg','pending'); +INSERT INTO upload_url_status VALUES(130,'2026-02-08T09:30:26.055Z','notification-images/1770562825967.jpg','pending'); +INSERT INTO upload_url_status VALUES(131,'2026-02-08T09:38:15.554Z','notification-images/1770563295459.jpg','pending'); +INSERT INTO upload_url_status VALUES(132,'2026-02-08T10:10:16.618Z','notification-images/1770565216512.jpg','pending'); +INSERT INTO upload_url_status VALUES(133,'2026-02-08T10:11:54.181Z','notification-images/1770565314077.jpg','pending'); +INSERT INTO upload_url_status VALUES(134,'2026-02-08T10:15:57.611Z','notification-images/1770565557504.jpg','pending'); +INSERT INTO upload_url_status VALUES(135,'2026-02-08T10:20:10.883Z','notification-images/1770565810774.jpg','pending'); +INSERT INTO upload_url_status VALUES(136,'2026-02-08T10:21:46.053Z','notification-images/1770565905943.jpg','pending'); +INSERT INTO upload_url_status VALUES(137,'2026-02-08T13:20:07.705Z','notification-images/1770576607704.jpg','pending'); +INSERT INTO upload_url_status VALUES(170,'2026-03-20T09:16:34.603Z','store-images/1774017994443.jpg','pending'); +INSERT INTO upload_url_status VALUES(171,'2026-03-20T09:17:04.596Z','store-images/1774018024432.jpg','pending'); +INSERT INTO upload_url_status VALUES(172,'2026-03-20T09:20:04.863Z','store-images/1774018204689.jpg','pending'); +INSERT INTO upload_url_status VALUES(173,'2026-03-20T09:20:57.508Z','store-images/1774018257330.jpg','pending'); +INSERT INTO upload_url_status VALUES(174,'2026-03-20T09:22:44.445Z','store-images/1774018364266.jpg','pending'); +INSERT INTO upload_url_status VALUES(175,'2026-03-21T09:24:15.290Z','store-images/1774104855151.jpg','pending'); +INSERT INTO upload_url_status VALUES(176,'2026-03-21T09:34:11.705Z','store-images/1774105451535.jpg','pending'); +INSERT INTO upload_url_status VALUES(177,'2026-03-21T09:35:32.404Z','store-images/1774105532235.jpg','pending'); +INSERT INTO upload_url_status VALUES(178,'2026-03-21T10:37:23.303Z','product-images/1774109243042.jpg','pending'); +INSERT INTO upload_url_status VALUES(179,'2026-03-21T10:37:23.532Z','product-images/1774109243274.jpg','pending'); +INSERT INTO upload_url_status VALUES(180,'2026-03-21T10:39:51.342Z','product-images/1774109391069.jpg','pending'); +INSERT INTO upload_url_status VALUES(181,'2026-03-21T10:39:51.668Z','product-images/1774109391409.jpg','pending'); +INSERT INTO upload_url_status VALUES(182,'2026-03-21T10:44:02.249Z','product-images/1774109641982.jpg','pending'); +INSERT INTO upload_url_status VALUES(183,'2026-03-21T10:44:02.477Z','product-images/1774109642211.jpg','pending'); +INSERT INTO upload_url_status VALUES(184,'2026-03-21T10:47:55.364Z','product-images/1774109875092.jpg','claimed'); +INSERT INTO upload_url_status VALUES(185,'2026-03-21T10:47:55.552Z','product-images/1774109875283.jpg','claimed'); +INSERT INTO upload_url_status VALUES(186,'2026-03-21T10:53:34.410Z','product-images/1774110214128.jpg','claimed'); +INSERT INTO upload_url_status VALUES(187,'2026-03-21T11:05:02.699Z','product-images/1774110902472.jpg','claimed'); +INSERT INTO upload_url_status VALUES(188,'2026-03-21T11:05:46.485Z','product-images/1774110946273.jpg','claimed'); +INSERT INTO upload_url_status VALUES(189,'2026-03-21T11:05:46.696Z','product-images/1774110946486.jpg','claimed'); +INSERT INTO upload_url_status VALUES(190,'2026-03-21T11:06:37.135Z','product-images/1774110996916.jpg','claimed'); +INSERT INTO upload_url_status VALUES(191,'2026-03-21T11:21:57.523Z','product-images/1774111917349.jpg','claimed'); +INSERT INTO upload_url_status VALUES(192,'2026-03-21T11:21:57.776Z','product-images/1774111917606.jpg','claimed'); +INSERT INTO upload_url_status VALUES(193,'2026-03-21T11:22:57.142Z','product-images/1774111976967.jpg','claimed'); +INSERT INTO upload_url_status VALUES(194,'2026-03-21T11:22:57.326Z','product-images/1774111977156.jpg','claimed'); +INSERT INTO upload_url_status VALUES(195,'2026-03-21T12:20:31.649Z','product-images/1774115431487.jpg','claimed'); +INSERT INTO upload_url_status VALUES(196,'2026-03-21T12:34:26.218Z','product-images/1774116266063.jpg','claimed'); +INSERT INTO upload_url_status VALUES(197,'2026-03-21T23:15:45.311Z','store-images/1774154745204.jpg','pending'); +INSERT INTO upload_url_status VALUES(198,'2026-03-21T23:18:41.659Z','store-images/1774154921529.jpg','pending'); +INSERT INTO upload_url_status VALUES(199,'2026-03-21T23:18:53.275Z','store-images/1774154933114.jpg','pending'); +INSERT INTO upload_url_status VALUES(200,'2026-03-22T00:28:59.866Z','profile-images/1774159139649.jpg','claimed'); +INSERT INTO upload_url_status VALUES(201,'2026-03-22T00:40:45.910Z','profile-images/1774159845659.jpg','claimed'); +INSERT INTO upload_url_status VALUES(202,'2026-03-22T04:45:38.531Z','complaint-images/1774174538370.jpg','claimed'); +INSERT INTO upload_url_status VALUES(203,'2026-03-22T04:57:50.211Z','complaint-images/1774175270043.jpg','claimed'); +INSERT INTO upload_url_status VALUES(204,'2026-03-22T05:06:00.920Z','complaint-images/1774175760765.jpg','claimed'); +INSERT INTO upload_url_status VALUES(205,'2026-03-22T05:08:54.126Z','complaint-images/1774175933889.jpg','claimed'); +INSERT INTO upload_url_status VALUES(206,'2026-03-22T05:10:03.192Z','complaint-images/1774176003038.jpg','claimed'); +INSERT INTO upload_url_status VALUES(207,'2026-03-22T05:10:03.381Z','complaint-images/1774176003229.jpg','claimed'); +INSERT INTO upload_url_status VALUES(208,'2026-03-22T05:10:03.567Z','complaint-images/1774176003414.jpg','claimed'); +INSERT INTO upload_url_status VALUES(209,'2026-03-24T09:49:20.825Z','store-images/1774365560714.jpg','pending'); +INSERT INTO upload_url_status VALUES(210,'2026-03-26T05:56:41.671Z','profile-images/1774524401549.jpg','pending'); +INSERT INTO upload_url_status VALUES(211,'2026-03-26T05:58:44.761Z','product-images/1774524524649.jpg','claimed'); +INSERT INTO upload_url_status VALUES(212,'2026-03-26T05:58:44.957Z','product-images/1774524524845.jpg','claimed'); +INSERT INTO upload_url_status VALUES(213,'2026-03-26T05:58:45.145Z','product-images/1774524525034.jpg','claimed'); +INSERT INTO upload_url_status VALUES(214,'2026-03-26T05:58:45.334Z','product-images/1774524525222.jpg','claimed'); +INSERT INTO upload_url_status VALUES(215,'2026-03-26T06:00:52.552Z','store-images/1774524652442.jpg','pending'); +INSERT INTO upload_url_status VALUES(216,'2026-03-26T06:15:11.287Z','product-images/1774525511146.jpg','claimed'); +CREATE TABLE IF NOT EXISTS "user_creds" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "user_password" TEXT NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO user_creds VALUES(2,1,'$2b$10$aJacFZFCniKqXOewMIlznOsEKcTJa/ji7xBU2dhHsioxTC0mR9BvK','2025-11-19T12:00:25.180Z'); +INSERT INTO user_creds VALUES(3,17,'$2b$10$mn/CpXmKq.dKgeH2gHtKk.IvlgQyahG2tCpD8k42mPOEysWoO3pti','2025-12-19T03:44:09.761Z'); +CREATE TABLE IF NOT EXISTS "user_details" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "bio" TEXT, "date_of_birth" TEXT, "gender" TEXT, "occupation" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "profile_image" TEXT, "is_suspended" INTEGER NOT NULL DEFAULT false); +INSERT INTO user_details VALUES(1,1,NULL,NULL,NULL,NULL,'2025-11-18T10:56:21.130Z','2026-03-26T05:56:44.292Z','profile-images/1774524401549.jpg',0); +INSERT INTO user_details VALUES(2,2,NULL,NULL,NULL,NULL,'2025-11-28T14:47:57.109Z','2025-11-28T14:47:57.109Z',NULL,0); +INSERT INTO user_details VALUES(6,4,NULL,NULL,NULL,NULL,'2025-12-02T09:58:27.226Z','2025-12-02T10:02:29.066Z','profile-images/1764689548097-1000159418.jpg',0); +INSERT INTO user_details VALUES(7,16,NULL,NULL,NULL,NULL,'2025-12-19T01:45:00.531Z','2025-12-19T01:45:00.530Z',NULL,0); +INSERT INTO user_details VALUES(8,17,NULL,NULL,NULL,NULL,'2025-12-19T03:43:18.108Z','2025-12-20T05:54:43.942Z','profile-images/1766229878891-1000167980.jpg',0); +INSERT INTO user_details VALUES(9,22,NULL,NULL,NULL,NULL,'2026-01-18T01:00:42.356Z','2026-01-18T01:00:42.355Z',NULL,0); +INSERT INTO user_details VALUES(10,54,NULL,NULL,NULL,NULL,'2026-01-26T06:43:25.929Z','2026-01-26T06:43:25.928Z',NULL,0); +INSERT INTO user_details VALUES(11,61,NULL,NULL,NULL,NULL,'2026-01-26T23:34:37.576Z','2026-01-26T23:34:37.575Z',NULL,0); +INSERT INTO user_details VALUES(12,62,NULL,NULL,NULL,NULL,'2026-01-27T00:04:43.010Z','2026-01-27T00:04:43.009Z',NULL,0); +INSERT INTO user_details VALUES(13,107,NULL,NULL,NULL,NULL,'2026-02-06T02:46:48.046Z','2026-02-06T02:46:48.045Z',NULL,0); +INSERT INTO user_details VALUES(14,91,NULL,NULL,NULL,NULL,'2026-02-07T04:18:52.616Z','2026-02-07T04:18:52.615Z',NULL,0); +INSERT INTO user_details VALUES(15,121,NULL,NULL,NULL,NULL,'2026-02-08T10:09:19.571Z','2026-02-08T10:09:19.571Z',NULL,1); +INSERT INTO user_details VALUES(16,12,NULL,NULL,NULL,NULL,'2026-02-08T10:09:58.357Z','2026-02-08T10:09:58.357Z',NULL,0); +INSERT INTO user_details VALUES(17,145,NULL,NULL,NULL,NULL,'2026-02-18T03:41:32.333Z','2026-02-18T03:41:32.332Z',NULL,0); +INSERT INTO user_details VALUES(18,159,NULL,NULL,NULL,NULL,'2026-02-19T04:08:47.047Z','2026-02-19T04:08:47.046Z',NULL,0); +INSERT INTO user_details VALUES(19,151,NULL,NULL,NULL,NULL,'2026-02-19T06:13:14.187Z','2026-02-19T06:13:14.186Z',NULL,0); +INSERT INTO user_details VALUES(20,140,NULL,NULL,NULL,NULL,'2026-02-20T03:30:19.023Z','2026-02-20T03:30:19.022Z',NULL,0); +INSERT INTO user_details VALUES(21,172,NULL,NULL,NULL,NULL,'2026-02-20T04:04:44.392Z','2026-02-20T04:04:44.391Z',NULL,0); +INSERT INTO user_details VALUES(22,184,NULL,NULL,NULL,NULL,'2026-02-22T00:49:25.502Z','2026-02-22T00:51:54.175Z','profile-images/1771741313402-1000001181.jpg',0); +INSERT INTO user_details VALUES(23,99,NULL,NULL,NULL,NULL,'2026-02-22T04:52:08.552Z','2026-02-22T04:52:08.551Z',NULL,0); +INSERT INTO user_details VALUES(56,265,NULL,NULL,NULL,NULL,'2026-03-22T00:29:01.903Z','2026-03-22T00:29:01.903Z','profile-images/1774159845659.jpg',0); +CREATE TABLE IF NOT EXISTS "user_incidents" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "order_id" INTEGER, "date_added" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "admin_comment" TEXT, "added_by" INTEGER, "negativity_score" INTEGER); +INSERT INTO user_incidents VALUES(1,1,384,'2026-03-04T10:40:45.532Z','Not Paying Money',1,2); +CREATE TABLE IF NOT EXISTS "user_notifications" ("id" INTEGER PRIMARY KEY, "image_url" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "body" TEXT NOT NULL, "applicable_users" TEXT, "title" TEXT NOT NULL); +INSERT INTO user_notifications VALUES(21,NULL,'2026-02-08T23:51:32.312Z',replace(replace('Van Winkle liked hunting, too. He liked going to the mountains to shoot squirrels. \r\nHe also liked sitting in the mountains and watching the world below—the','\r',char(13)),'\n',char(10)),'[1]','Hii'); +INSERT INTO user_notifications VALUES(22,NULL,'2026-02-09T03:28:19.744Z','Test Notification','[65]','Hello'); +INSERT INTO user_notifications VALUES(23,NULL,'2026-02-09T03:29:52.024Z','Hello','[1,65]','Hello'); +INSERT INTO user_notifications VALUES(24,NULL,'2026-02-20T07:52:30.399Z','Freshyo','[2]','Qusham'); +INSERT INTO user_notifications VALUES(25,NULL,'2026-02-23T02:20:51.468Z','Buy fresh, juicy and titillating fruits. Order Now!','[2,3,6,7,4,9,12,21,24,26,1,38,39,22,50,64,65,66,74,82,98,102,107,113,115,118,91,119,120,121,122,123,124,125,127,128,129,131,132,133,134,135,136,137,138,139,141,142,143,144,145,146,147,148,149,150,152,153,154,155,156,157,158,160,159,161,162,151,163,164,166,165,167,140,169,170,172,173,174,175,176,177,178,179,180,181,182,183,185,186,188,189,191,190,194,184,221,220,219,217,216,215,214,213,212,210,99,209,208,207,206,205,204,203,202,201,200,199,198,197,196,195]','Mesmerizing Fruits'); +CREATE TABLE IF NOT EXISTS "users" ("id" INTEGER PRIMARY KEY, "name" TEXT, "email" TEXT, "mobile" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO users VALUES(1,'Mohammed Shafiuddin','mohammedshafiuddin54@gmail.com','9676651496','2025-11-18T08:35:55.801Z'); +INSERT INTO users VALUES(2,NULL,NULL,'8688182552','2025-11-19T06:34:47.086Z'); +INSERT INTO users VALUES(3,NULL,NULL,'9000190484','2025-11-19T07:06:09.284Z'); +INSERT INTO users VALUES(4,'Saniya','saniya123@gmail.com','8688326100','2025-11-20T11:58:13.296Z'); +INSERT INTO users VALUES(5,NULL,NULL,'7093212611','2025-11-22T05:35:41.069Z'); +INSERT INTO users VALUES(6,NULL,NULL,'9346436140','2025-11-22T09:02:42.569Z'); +INSERT INTO users VALUES(7,NULL,NULL,'7386623412','2025-11-28T22:18:57.177Z'); +INSERT INTO users VALUES(8,NULL,NULL,'7675084307','2025-11-29T08:33:35.481Z'); +INSERT INTO users VALUES(9,NULL,NULL,'8985081850','2025-12-07T21:58:30.768Z'); +INSERT INTO users VALUES(10,NULL,NULL,'8121258519','2025-12-07T23:16:29.228Z'); +INSERT INTO users VALUES(11,NULL,NULL,'8639236092','2025-12-14T07:50:29.893Z'); +INSERT INTO users VALUES(12,NULL,NULL,'6302478945','2025-12-18T05:03:06.218Z'); +INSERT INTO users VALUES(13,NULL,NULL,'7095705186','2025-12-19T00:31:43.745Z'); +INSERT INTO users VALUES(14,NULL,NULL,'9390567030','2025-12-19T00:52:18.278Z'); +INSERT INTO users VALUES(15,NULL,NULL,'9866116948','2025-12-19T00:58:58.593Z'); +INSERT INTO users VALUES(16,'pradeep','pradeepdeep484@gmail.com','7799420184','2025-12-19T01:44:25.069Z'); +INSERT INTO users VALUES(17,'Bha','sbhavanikumar2016@gmail.com','7013167289','2025-12-19T03:01:17.931Z'); +INSERT INTO users VALUES(18,NULL,NULL,'9381316634','2025-12-19T04:51:00.938Z'); +INSERT INTO users VALUES(19,NULL,NULL,'9398972993','2025-12-19T08:55:04.116Z'); +INSERT INTO users VALUES(20,NULL,NULL,'9676010763','2025-12-22T09:03:04.773Z'); +INSERT INTO users VALUES(21,NULL,NULL,'9701690010','2025-12-22T12:29:08.147Z'); +INSERT INTO users VALUES(22,'Nawaz','afunawaz@gmail.com','8885456295','2025-12-23T21:05:27.523Z'); +INSERT INTO users VALUES(23,NULL,NULL,'9247242246','2025-12-25T13:27:14.313Z'); +INSERT INTO users VALUES(24,NULL,NULL,'9948350118','2025-12-27T12:57:43.504Z'); +INSERT INTO users VALUES(25,NULL,NULL,'9848296296','2025-12-31T14:49:04.015Z'); +INSERT INTO users VALUES(26,NULL,NULL,'9652180398','2026-01-03T02:42:08.528Z'); +INSERT INTO users VALUES(27,NULL,NULL,'8074020144','2026-01-05T04:44:15.312Z'); +INSERT INTO users VALUES(28,NULL,NULL,'7382343977','2026-01-05T09:08:25.774Z'); +INSERT INTO users VALUES(29,NULL,NULL,'6302300646','2026-01-06T04:28:48.967Z'); +INSERT INTO users VALUES(30,NULL,NULL,'8341217812','2026-01-06T07:44:49.015Z'); +INSERT INTO users VALUES(31,NULL,NULL,'7601003021','2026-01-12T02:18:41.456Z'); +INSERT INTO users VALUES(32,NULL,NULL,'8919304169','2026-01-12T02:56:48.668Z'); +INSERT INTO users VALUES(33,NULL,NULL,'9059529741','2026-01-13T09:20:02.174Z'); +INSERT INTO users VALUES(34,NULL,NULL,'9985254508','2026-01-13T09:25:27.981Z'); +INSERT INTO users VALUES(35,NULL,NULL,'6304804044','2026-01-13T09:29:31.683Z'); +INSERT INTO users VALUES(36,NULL,NULL,'6281222530','2026-01-13T16:42:02.068Z'); +INSERT INTO users VALUES(37,NULL,NULL,'8555038131','2026-01-14T09:28:43.382Z'); +INSERT INTO users VALUES(38,NULL,NULL,'9492230173','2026-01-15T03:25:50.547Z'); +INSERT INTO users VALUES(39,NULL,NULL,'6281768720','2026-01-16T06:33:17.501Z'); +INSERT INTO users VALUES(40,NULL,NULL,'8790196183','2026-01-18T11:31:13.136Z'); +INSERT INTO users VALUES(41,NULL,NULL,'9618451678','2026-01-20T04:07:45.096Z'); +INSERT INTO users VALUES(42,NULL,NULL,'8019548522','2026-01-21T00:01:02.852Z'); +INSERT INTO users VALUES(43,NULL,NULL,'9985751104','2026-01-22T06:40:13.655Z'); +INSERT INTO users VALUES(44,NULL,NULL,'6302138817','2026-01-22T06:55:55.593Z'); +INSERT INTO users VALUES(45,NULL,NULL,'7989242921','2026-01-22T06:57:29.593Z'); +INSERT INTO users VALUES(46,NULL,NULL,'9392266793','2026-01-22T07:00:03.023Z'); +INSERT INTO users VALUES(47,NULL,NULL,'7013843505','2026-01-22T07:16:37.997Z'); +INSERT INTO users VALUES(48,NULL,NULL,'9642200622','2026-01-23T07:57:20.233Z'); +INSERT INTO users VALUES(49,NULL,NULL,'9182043867','2026-01-23T13:48:07.569Z'); +INSERT INTO users VALUES(50,NULL,NULL,'9390338662','2026-01-23T13:57:09.989Z'); +INSERT INTO users VALUES(51,NULL,NULL,'8686465444','2026-01-23T22:48:49.770Z'); +INSERT INTO users VALUES(52,NULL,NULL,'8121807322','2026-01-26T00:53:18.325Z'); +INSERT INTO users VALUES(53,NULL,NULL,'8886868702','2026-01-26T02:32:51.301Z'); +INSERT INTO users VALUES(54,'Abdul ahad','umizazarieshzarish@gmail.com','9849759289','2026-01-26T06:39:06.569Z'); +INSERT INTO users VALUES(55,NULL,NULL,'7780659850','2026-01-26T09:29:28.984Z'); +INSERT INTO users VALUES(56,NULL,NULL,'7396924154','2026-01-26T09:46:27.950Z'); +INSERT INTO users VALUES(57,NULL,NULL,'9515837506','2026-01-26T10:09:05.694Z'); +INSERT INTO users VALUES(58,NULL,NULL,'9603333080','2026-01-26T11:52:06.161Z'); +INSERT INTO users VALUES(59,NULL,NULL,'9490585051','2026-01-26T13:07:07.742Z'); +INSERT INTO users VALUES(60,NULL,NULL,'8331989727','2026-01-26T22:19:45.345Z'); +INSERT INTO users VALUES(61,'Mohd Zubair khan','mohdzubair772@gmail.com','7729916250','2026-01-26T23:32:23.837Z'); +INSERT INTO users VALUES(62,'Aftab Ur Rahman','aftabaffu333@gmail.com','7671939155','2026-01-27T00:04:08.085Z'); +INSERT INTO users VALUES(63,NULL,NULL,'8328161112','2026-01-27T04:36:03.156Z'); +INSERT INTO users VALUES(64,NULL,NULL,'9985383270','2026-01-27T06:41:11.387Z'); +INSERT INTO users VALUES(65,NULL,NULL,'9381637374','2026-01-27T11:27:44.071Z'); +INSERT INTO users VALUES(66,NULL,NULL,'9618791714','2026-01-28T01:24:44.881Z'); +INSERT INTO users VALUES(67,NULL,NULL,'8297666911','2026-01-28T01:57:03.995Z'); +INSERT INTO users VALUES(68,NULL,NULL,'9441204280','2026-01-29T10:32:41.779Z'); +INSERT INTO users VALUES(69,NULL,NULL,'9949548015','2026-01-29T22:47:42.263Z'); +INSERT INTO users VALUES(70,NULL,NULL,'7842638264','2026-01-30T01:44:38.667Z'); +INSERT INTO users VALUES(71,NULL,NULL,'9110314975','2026-01-30T03:46:01.334Z'); +INSERT INTO users VALUES(72,NULL,NULL,'8686544418','2026-01-30T06:32:47.754Z'); +INSERT INTO users VALUES(73,NULL,NULL,'9652801308','2026-01-30T08:47:09.826Z'); +INSERT INTO users VALUES(74,NULL,NULL,'8639145664','2026-01-30T08:49:55.471Z'); +INSERT INTO users VALUES(75,NULL,NULL,'9966786521','2026-01-30T09:36:21.649Z'); +INSERT INTO users VALUES(76,NULL,NULL,'6300352629','2026-01-30T09:48:12.235Z'); +INSERT INTO users VALUES(77,NULL,NULL,'7287952112','2026-01-30T14:04:00.794Z'); +INSERT INTO users VALUES(78,NULL,NULL,'9059201201','2026-01-31T04:21:03.872Z'); +INSERT INTO users VALUES(79,NULL,NULL,'9701896405','2026-01-31T05:02:06.385Z'); +INSERT INTO users VALUES(80,NULL,NULL,'8897763408','2026-01-31T09:04:31.842Z'); +INSERT INTO users VALUES(81,NULL,NULL,'9652338446','2026-01-31T11:30:05.039Z'); +INSERT INTO users VALUES(82,NULL,NULL,'7981337554','2026-02-01T01:01:39.061Z'); +INSERT INTO users VALUES(83,NULL,NULL,'9441740551','2026-02-01T02:09:00.953Z'); +INSERT INTO users VALUES(84,NULL,NULL,'8639762655','2026-02-01T04:27:54.485Z'); +INSERT INTO users VALUES(85,NULL,NULL,'8897076204','2026-02-01T04:28:15.894Z'); +INSERT INTO users VALUES(86,NULL,NULL,'9121585783','2026-02-01T05:43:59.004Z'); +INSERT INTO users VALUES(87,NULL,NULL,'6301552539','2026-02-01T07:09:19.500Z'); +INSERT INTO users VALUES(88,NULL,NULL,'9398199100','2026-02-01T10:05:52.738Z'); +INSERT INTO users VALUES(89,NULL,NULL,'8919308867','2026-02-01T23:24:10.239Z'); +INSERT INTO users VALUES(90,NULL,NULL,'8688629245','2026-02-02T03:47:50.938Z'); +INSERT INTO users VALUES(91,'P Praveen Goud','ppraveengoud95@gmail.com','9347168525','2026-02-02T04:24:13.149Z'); +INSERT INTO users VALUES(92,NULL,NULL,'6305442889','2026-02-02T04:51:19.029Z'); +INSERT INTO users VALUES(93,NULL,NULL,'9705107988','2026-02-02T04:55:39.662Z'); +INSERT INTO users VALUES(94,NULL,NULL,'9392974026','2026-02-02T05:57:56.245Z'); +INSERT INTO users VALUES(95,NULL,NULL,'6301612623','2026-02-02T06:38:42.733Z'); +INSERT INTO users VALUES(96,NULL,NULL,'9848466280','2026-02-02T08:27:54.916Z'); +INSERT INTO users VALUES(97,NULL,NULL,'8522862163','2026-02-02T23:55:27.426Z'); +INSERT INTO users VALUES(98,NULL,NULL,'9381165946','2026-02-03T00:25:04.574Z'); +INSERT INTO users VALUES(99,'Saniya Shafeen','shafeensaniya45@gmail.com','7893499520','2026-02-03T04:39:25.892Z'); +INSERT INTO users VALUES(100,NULL,NULL,'6304650114','2026-02-03T09:18:43.200Z'); +INSERT INTO users VALUES(101,NULL,NULL,'9502114234','2026-02-04T00:14:08.656Z'); +INSERT INTO users VALUES(102,NULL,NULL,'9985202474','2026-02-04T08:47:28.278Z'); +INSERT INTO users VALUES(103,NULL,NULL,'6302119072','2026-02-05T03:14:11.453Z'); +INSERT INTO users VALUES(104,NULL,NULL,'7981006980','2026-02-05T03:16:32.728Z'); +INSERT INTO users VALUES(105,NULL,NULL,'9063857682','2026-02-05T22:57:15.947Z'); +INSERT INTO users VALUES(106,NULL,NULL,'9701261238','2026-02-06T02:43:06.599Z'); +INSERT INTO users VALUES(107,'Saad bin shafi','saadhindustanigamer@gmail.com','9573989830','2026-02-06T02:46:25.903Z'); +INSERT INTO users VALUES(108,NULL,NULL,'9949035807','2026-02-06T03:09:58.138Z'); +INSERT INTO users VALUES(109,NULL,NULL,'9063508083','2026-02-06T03:12:31.689Z'); +INSERT INTO users VALUES(110,NULL,NULL,'9985261902','2026-02-06T03:15:56.628Z'); +INSERT INTO users VALUES(111,NULL,NULL,'8106483142','2026-02-06T04:10:51.372Z'); +INSERT INTO users VALUES(112,NULL,NULL,'9542134959','2026-02-06T04:26:57.486Z'); +INSERT INTO users VALUES(113,NULL,NULL,'9052741123','2026-02-06T04:59:13.973Z'); +INSERT INTO users VALUES(114,NULL,NULL,'9052323490','2026-02-06T05:37:18.707Z'); +INSERT INTO users VALUES(115,NULL,NULL,'9949055660','2026-02-06T10:09:32.042Z'); +INSERT INTO users VALUES(116,NULL,NULL,'9885525123','2026-02-06T11:09:45.755Z'); +INSERT INTO users VALUES(117,NULL,NULL,'7013765027','2026-02-06T15:19:32.458Z'); +INSERT INTO users VALUES(118,NULL,NULL,'9966022031','2026-02-06T22:54:18.273Z'); +INSERT INTO users VALUES(119,NULL,NULL,'9059318255','2026-02-07T07:04:29.373Z'); +INSERT INTO users VALUES(120,NULL,NULL,'7013641457','2026-02-07T23:09:49.039Z'); +INSERT INTO users VALUES(121,NULL,NULL,'8639958133','2026-02-08T00:39:50.553Z'); +INSERT INTO users VALUES(122,NULL,NULL,'9642339427','2026-02-08T04:30:06.375Z'); +INSERT INTO users VALUES(123,NULL,NULL,'6305184261','2026-02-09T05:48:49.256Z'); +INSERT INTO users VALUES(124,NULL,NULL,'7993504221','2026-02-09T06:32:24.848Z'); +INSERT INTO users VALUES(125,NULL,NULL,'8341078342','2026-02-09T07:54:10.686Z'); +INSERT INTO users VALUES(126,NULL,NULL,'6305464103','2026-02-09T12:28:45.736Z'); +INSERT INTO users VALUES(127,NULL,NULL,'7989653339','2026-02-10T05:33:41.303Z'); +INSERT INTO users VALUES(128,NULL,NULL,'7032235482','2026-02-12T03:16:41.897Z'); +INSERT INTO users VALUES(129,NULL,NULL,'9581686892','2026-02-12T07:57:59.947Z'); +INSERT INTO users VALUES(130,NULL,NULL,'9912951895','2026-02-14T02:35:40.864Z'); +INSERT INTO users VALUES(131,NULL,NULL,'9966710280','2026-02-14T04:55:40.255Z'); +INSERT INTO users VALUES(132,NULL,NULL,'9110526651','2026-02-14T23:05:21.765Z'); +INSERT INTO users VALUES(133,NULL,NULL,'9398533610','2026-02-15T01:15:30.327Z'); +INSERT INTO users VALUES(134,NULL,NULL,'9133621540','2026-02-16T04:00:23.915Z'); +INSERT INTO users VALUES(135,NULL,NULL,'8660801043','2026-02-17T03:29:12.461Z'); +INSERT INTO users VALUES(136,NULL,NULL,'9390785046','2026-02-17T07:26:31.443Z'); +INSERT INTO users VALUES(137,NULL,NULL,'8555938403','2026-02-17T08:52:01.136Z'); +INSERT INTO users VALUES(138,NULL,NULL,'8328369823','2026-02-17T09:06:40.132Z'); +INSERT INTO users VALUES(139,NULL,NULL,'8143905611','2026-02-17T09:20:24.409Z'); +INSERT INTO users VALUES(140,'Sara','iiamsara554@gmail.com','9848738554','2026-02-17T13:47:07.407Z'); +INSERT INTO users VALUES(141,NULL,NULL,'8919042963','2026-02-17T19:44:41.712Z'); +INSERT INTO users VALUES(142,NULL,NULL,'9490020005','2026-02-17T22:23:19.414Z'); +INSERT INTO users VALUES(143,NULL,NULL,'7286888001','2026-02-17T22:54:09.153Z'); +INSERT INTO users VALUES(144,NULL,NULL,'7981140388','2026-02-18T03:32:55.242Z'); +INSERT INTO users VALUES(145,'Naheed','mohammednaheed007@gmail.com','8179264991','2026-02-18T03:39:58.246Z'); +INSERT INTO users VALUES(146,NULL,NULL,'9392457825','2026-02-18T04:29:38.244Z'); +INSERT INTO users VALUES(147,NULL,NULL,'9885579134','2026-02-18T05:14:12.703Z'); +INSERT INTO users VALUES(148,NULL,NULL,'9100529645','2026-02-18T07:29:50.622Z'); +INSERT INTO users VALUES(149,NULL,NULL,'8519862344','2026-02-18T09:09:16.387Z'); +INSERT INTO users VALUES(150,NULL,NULL,'9700630611','2026-02-18T09:11:40.075Z'); +INSERT INTO users VALUES(151,'Anjum','anjuman2504@gmail.com','9346508676','2026-02-18T09:21:02.267Z'); +INSERT INTO users VALUES(152,NULL,NULL,'6300961220','2026-02-18T10:43:20.416Z'); +INSERT INTO users VALUES(153,NULL,NULL,'9618363653','2026-02-18T13:29:45.209Z'); +INSERT INTO users VALUES(154,NULL,NULL,'7981078600','2026-02-18T23:28:16.145Z'); +INSERT INTO users VALUES(155,NULL,NULL,'9010023867','2026-02-18T23:41:27.596Z'); +INSERT INTO users VALUES(156,NULL,NULL,'9381371156','2026-02-18T23:57:31.708Z'); +INSERT INTO users VALUES(157,NULL,NULL,'6300072507','2026-02-19T01:25:16.627Z'); +INSERT INTO users VALUES(158,NULL,NULL,'9381289050','2026-02-19T01:44:34.090Z'); +INSERT INTO users VALUES(159,'Mohd.Mujahid','mujahidmohd953@gmail.com','9182114853','2026-02-19T03:38:52.038Z'); +INSERT INTO users VALUES(160,NULL,NULL,'9642417025','2026-02-19T03:46:24.011Z'); +INSERT INTO users VALUES(161,NULL,NULL,'8008981838','2026-02-19T04:25:22.873Z'); +INSERT INTO users VALUES(162,NULL,NULL,'6302798105','2026-02-19T05:06:14.768Z'); +INSERT INTO users VALUES(163,NULL,NULL,'7032026589','2026-02-19T06:46:48.871Z'); +INSERT INTO users VALUES(164,NULL,NULL,'7989819435','2026-02-19T07:01:00.060Z'); +INSERT INTO users VALUES(165,NULL,NULL,'6281349676','2026-02-19T10:26:45.515Z'); +INSERT INTO users VALUES(166,NULL,NULL,'7013950981','2026-02-19T12:05:05.705Z'); +INSERT INTO users VALUES(167,NULL,NULL,'9550936995','2026-02-20T03:19:18.911Z'); +INSERT INTO users VALUES(168,NULL,NULL,'8498937807','2026-02-20T03:28:19.863Z'); +INSERT INTO users VALUES(169,NULL,NULL,'7799420422','2026-02-20T03:35:55.512Z'); +INSERT INTO users VALUES(170,NULL,NULL,'9901294914','2026-02-20T03:53:54.048Z'); +INSERT INTO users VALUES(171,NULL,NULL,'6281738569','2026-02-20T03:55:41.510Z'); +INSERT INTO users VALUES(172,'Irfan','md.irfan.s@gmail.com','6300758922','2026-02-20T04:00:52.359Z'); +INSERT INTO users VALUES(173,NULL,NULL,'8978932551','2026-02-20T04:08:12.465Z'); +INSERT INTO users VALUES(174,NULL,NULL,'9642275691','2026-02-20T05:28:56.025Z'); +INSERT INTO users VALUES(175,NULL,NULL,'8179512068','2026-02-20T05:49:56.484Z'); +INSERT INTO users VALUES(176,NULL,NULL,'9885578647','2026-02-20T05:59:41.714Z'); +INSERT INTO users VALUES(177,NULL,NULL,'8519977988','2026-02-20T06:50:34.128Z'); +INSERT INTO users VALUES(178,NULL,NULL,'7799492001','2026-02-20T08:36:19.907Z'); +INSERT INTO users VALUES(179,NULL,NULL,'7995930618','2026-02-20T10:08:20.176Z'); +INSERT INTO users VALUES(180,NULL,NULL,'8328255182','2026-02-20T10:57:02.738Z'); +INSERT INTO users VALUES(181,NULL,NULL,'9885252564','2026-02-20T13:32:49.791Z'); +INSERT INTO users VALUES(182,NULL,NULL,'8790821267','2026-02-20T17:13:22.843Z'); +INSERT INTO users VALUES(183,NULL,NULL,'9885734956','2026-02-20T18:20:16.708Z'); +INSERT INTO users VALUES(184,'Muhammad Hussain','hussainmuhammad85@gmail.com','9160481161','2026-02-20T22:45:28.449Z'); +INSERT INTO users VALUES(185,NULL,NULL,'9966621818','2026-02-21T02:47:52.969Z'); +INSERT INTO users VALUES(186,NULL,NULL,'9550541366','2026-02-21T03:35:01.487Z'); +INSERT INTO users VALUES(187,NULL,NULL,'9703691566','2026-02-21T05:38:35.653Z'); +INSERT INTO users VALUES(188,NULL,NULL,'9014920842','2026-02-21T07:16:31.153Z'); +INSERT INTO users VALUES(189,NULL,NULL,'8019231723','2026-02-21T13:01:22.359Z'); +INSERT INTO users VALUES(190,NULL,NULL,'9912119864','2026-02-21T13:29:01.921Z'); +INSERT INTO users VALUES(191,NULL,NULL,'7097321320','2026-02-21T17:55:26.140Z'); +INSERT INTO users VALUES(192,NULL,NULL,'9160475130','2026-02-21T18:43:27.474Z'); +INSERT INTO users VALUES(193,NULL,NULL,'7207490881','2026-02-21T22:51:12.696Z'); +INSERT INTO users VALUES(194,NULL,NULL,'6302774527','2026-02-22T00:12:34.868Z'); +INSERT INTO users VALUES(195,NULL,NULL,'6301375032','2026-02-22T00:57:17.585Z'); +INSERT INTO users VALUES(196,NULL,NULL,'9666209134','2026-02-22T00:58:27.611Z'); +INSERT INTO users VALUES(197,NULL,NULL,'7842321671','2026-02-22T01:05:28.299Z'); +INSERT INTO users VALUES(198,NULL,NULL,'7799311559','2026-02-22T01:07:16.081Z'); +INSERT INTO users VALUES(199,NULL,NULL,'6301857893','2026-02-22T01:14:22.337Z'); +INSERT INTO users VALUES(200,NULL,NULL,'8328216403','2026-02-22T02:01:34.549Z'); +INSERT INTO users VALUES(201,NULL,NULL,'9121477995','2026-02-22T02:01:43.802Z'); +INSERT INTO users VALUES(202,NULL,NULL,'9347152305','2026-02-22T02:17:36.033Z'); +INSERT INTO users VALUES(203,NULL,NULL,'7989814618','2026-02-22T03:02:36.782Z'); +INSERT INTO users VALUES(204,NULL,NULL,'8919712147','2026-02-22T03:19:54.195Z'); +INSERT INTO users VALUES(205,NULL,NULL,'9177629869','2026-02-22T03:22:45.416Z'); +INSERT INTO users VALUES(206,NULL,NULL,'9000452637','2026-02-22T04:20:17.471Z'); +INSERT INTO users VALUES(207,NULL,NULL,'6301318598','2026-02-22T04:24:09.076Z'); +INSERT INTO users VALUES(208,NULL,NULL,'9618770682','2026-02-22T04:36:58.705Z'); +INSERT INTO users VALUES(209,NULL,NULL,'7993744243','2026-02-22T04:43:48.074Z'); +INSERT INTO users VALUES(210,NULL,NULL,'7989131798','2026-02-22T05:14:34.275Z'); +INSERT INTO users VALUES(211,NULL,NULL,'9398417118','2026-02-22T05:15:20.227Z'); +INSERT INTO users VALUES(212,NULL,NULL,'7670818331','2026-02-22T06:00:11.447Z'); +INSERT INTO users VALUES(213,NULL,NULL,'9392816978','2026-02-22T06:29:48.269Z'); +INSERT INTO users VALUES(214,NULL,NULL,'9110505256','2026-02-22T06:33:52.862Z'); +INSERT INTO users VALUES(215,NULL,NULL,'9573018203','2026-02-22T06:59:09.861Z'); +INSERT INTO users VALUES(216,NULL,NULL,'9542208012','2026-02-22T07:13:11.645Z'); +INSERT INTO users VALUES(217,NULL,NULL,'7285920951','2026-02-22T07:30:19.201Z'); +INSERT INTO users VALUES(218,NULL,NULL,'8886029909','2026-02-22T12:03:42.001Z'); +INSERT INTO users VALUES(219,NULL,NULL,'7569573638','2026-02-23T00:50:15.659Z'); +INSERT INTO users VALUES(220,NULL,NULL,'7993421951','2026-02-23T01:39:32.592Z'); +INSERT INTO users VALUES(221,NULL,NULL,'6301475500','2026-02-23T02:13:14.075Z'); +INSERT INTO users VALUES(222,NULL,NULL,'9951260514','2026-02-23T03:24:02.953Z'); +INSERT INTO users VALUES(223,NULL,NULL,'9398876512','2026-02-23T03:46:04.808Z'); +INSERT INTO users VALUES(224,NULL,NULL,'8374782337','2026-02-23T04:36:49.085Z'); +INSERT INTO users VALUES(225,NULL,NULL,'9666426396','2026-02-23T06:41:13.767Z'); +INSERT INTO users VALUES(226,NULL,NULL,'9391479179','2026-02-23T08:30:31.544Z'); +INSERT INTO users VALUES(227,NULL,NULL,'8688806599','2026-02-23T11:25:23.839Z'); +INSERT INTO users VALUES(228,NULL,NULL,'9966138248','2026-02-23T22:38:46.818Z'); +INSERT INTO users VALUES(229,NULL,NULL,'9885575791','2026-02-24T01:40:31.078Z'); +INSERT INTO users VALUES(230,NULL,NULL,'9398645142','2026-02-24T01:40:35.864Z'); +INSERT INTO users VALUES(231,NULL,NULL,'9949237303','2026-02-24T12:27:35.380Z'); +INSERT INTO users VALUES(232,NULL,NULL,'9059525115','2026-02-24T14:49:55.020Z'); +INSERT INTO users VALUES(265,'John Wick','john@email.com','9676651499','2026-03-22T00:28:18.510Z'); +CREATE TABLE IF NOT EXISTS "vendor_snippets" ("id" INTEGER PRIMARY KEY, "snippet_code" TEXT NOT NULL, "slot_id" INTEGER, "product_ids" TEXT NOT NULL, "valid_till" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "is_permanent" INTEGER NOT NULL DEFAULT false); +INSERT INTO vendor_snippets VALUES(55,'Allvegetables1',NULL,'[88,66,70,64,91,19,71,27,79,32,5,65,45,77,74,17,16,72,33,13,89,29,78,30,69,31,76,90,18,68]','2027-01-27T12:26:00.000Z','2026-01-27T12:33:18.974Z',1); +INSERT INTO vendor_snippets VALUES(56,'AllMuttonitems',NULL,'[34,85,14,87,35,84,28,86,4,12]','2027-03-30T21:21:00.000Z','2026-01-27T21:22:14.560Z',1); +INSERT INTO vendor_snippets VALUES(57,'AllChickenitems',NULL,'[3,10,15,1,24,40,42,80,23,41,21,2,36]','2027-04-21T21:24:00.000Z','2026-01-27T21:25:03.144Z',1); +INSERT INTO vendor_snippets VALUES(58,'AllFruitsitem',NULL,'[7,47,49,56,39,62,38,59,57,53,11,48,63,6,43,13,50,54,52,46,51,26,60,55,44,73,61,25,58]','2027-04-28T21:27:00.000Z','2026-01-27T21:28:06.746Z',1); +COMMIT; diff --git a/apps/backend/migrated_nofk.sql b/apps/backend/migrated_nofk.sql new file mode 100644 index 0000000..599265a --- /dev/null +++ b/apps/backend/migrated_nofk.sql @@ -0,0 +1,21840 @@ +PRAGMA foreign_keys=OFF; +BEGIN TRANSACTION; +CREATE TABLE IF NOT EXISTS "address_areas" ("id" INTEGER PRIMARY KEY, "place_name" TEXT NOT NULL, "zone_id" INTEGER, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO address_areas VALUES(1,'Housing Board',1,'2025-12-10T14:30:58.912Z'); +INSERT INTO address_areas VALUES(2,'Mettugadda',2,'2025-12-10T14:31:22.451Z'); +CREATE TABLE IF NOT EXISTS "address_zones" ("id" INTEGER PRIMARY KEY, "zone_name" TEXT NOT NULL, "added_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO address_zones VALUES(1,'zone 1','2025-12-10T14:30:40.126Z'); +INSERT INTO address_zones VALUES(2,'Zone 2','2025-12-10T14:31:12.245Z'); +CREATE TABLE IF NOT EXISTS "addresses" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "is_default" INTEGER NOT NULL DEFAULT false, "name" TEXT NOT NULL, "phone" TEXT NOT NULL, "address_line1" TEXT NOT NULL, "address_line2" TEXT, "city" TEXT NOT NULL, "state" TEXT NOT NULL, "pincode" TEXT NOT NULL, "latitude" REAL, "longitude" REAL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "zone_id" INTEGER, "admin_latitude" REAL, "admin_longitude" REAL, "google_maps_url" TEXT); +INSERT INTO addresses VALUES(1,3,0,'Bushra ','9000190484','Mahabubnagar ','Noor nagar','Mahabubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:13:54.439Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(2,3,0,'Bushra ','9000190484','Mahabubnagar ','Noor nagar','Mahabubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:13:56.852Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(3,3,0,'Bushra ','9000190484','Mahabubnagar ','Noor nagar','Mahabubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:13:59.752Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(4,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:15:59.602Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(5,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:09.066Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(6,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:10.587Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(7,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:13.227Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(8,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:14.410Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(9,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:15.341Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(10,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:16.029Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(11,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:16.818Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(12,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:17.605Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(13,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:18.595Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(14,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:20.593Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(15,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:25.042Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(16,3,1,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:26.343Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(17,1,1,'Mohammed Shafiuddin','9676651496','Hno: 1-9-25/25, Noor Nagar','Nawabpet Road','Mahabubnagar','Telangana','509001',16.73764400000000041,78.00380999999999787,'2025-11-19T07:36:43.907Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(18,1,0,'Mohammed Rafiuddin','9676651496','H No: 1-9-25/25, Noor Nagar','Nawabpet Road','Mahabubnagar','Telangana','509001',37.785834999999998728,-122.40641999999999356,'2025-11-19T07:40:54.902Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(19,1,0,'Khamar Jahan','8297666911','H no: 1-9-25/25, Noor Nagar','Nawabpet Road','Mahabubnagar','Telangana','509001',37.785834999999998728,-122.40641999999999356,'2025-11-19T07:49:04.462Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(20,2,1,'Qusham ','8688182552','5-7-30/L/9','','Mahabubnagar','Telangana','509001',16.741472000000001685,78.011600000000003163,'2025-11-21T08:45:46.550Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(21,4,0,'Shafi ','8688326100','1-4-6/9/12','Noor nagar','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-02T09:55:46.194Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(22,4,0,'Saniya','8688326100','1-4/25/L','Mothinagar','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-02T09:57:32.847Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(23,14,0,'Saqib Mujtaba','9390567030','S s guyta','','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-19T00:53:31.858Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(24,15,0,'Arif uddin','9866116948','Noor nagar','Noor nagar ','Mahabubnagar','Telangana','509001',16.741569999999999396,78.011669999999995184,'2025-12-19T01:00:27.678Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(25,15,0,'Arif uddin','9866116948','Noor nagar','Nawapet road','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-19T01:02:03.968Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(26,17,1,'Bbavani','7013167289','Market','','Mahabubnagar','Telangana','509001',16.760310000000000485,77.99338000000000548,'2025-12-19T03:01:51.649Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(28,17,0,'H','6666666666','Hh','H','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-19T03:42:49.915Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(29,17,0,'Bhavaniiiiiii kumar SEDAMKAR iii','6666666666','Hh','H','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-19T10:11:23.603Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(30,20,0,'Md waseed','9676010763','Mothi nagar','Mothi nagar','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-22T09:04:00.235Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(31,22,0,'Myhome','8885456295','1-10','11','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-23T21:09:01.181Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(32,16,1,'Pradeep kumar ','7799420184','Near the sub Post office, OLD PALAMOOR ','MAHABUBNAGAR ','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-26T19:30:44.314Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(33,12,0,'Marlu','6302478945','Yogi tiffin ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-27T23:56:10.399Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(34,26,1,'Faiz ','9652180398','Gol masjid ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-03T02:42:42.263Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(35,21,0,'Sailesh','9701690010','Sailesh Nilayam, Sagara colony','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-04T13:19:25.837Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(36,30,1,'Tirmaldev gate ','8341217812','T.d gutta ','Kosgi road','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-06T07:45:37.451Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(37,22,0,'My brother''s home','8885456295','Hjuu','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-07T10:24:39.504Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(38,34,1,'Habeeb','1218182456','Shah ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-13T09:26:06.610Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(39,36,1,'Rimsha','9985785747','near bharath talkies road,beside punjab bakery','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-14T03:26:36.657Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(40,22,1,'Address name afroz','8862958999','Address line 1','Address line 2 optional','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-18T10:23:28.923Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(41,42,1,'Inzamam ','8019548522','Goal masjid near sr graden','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-21T00:01:32.400Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(42,39,0,'Shabana begum ','6281768720','6-5-50/1, Habeeb nagar,menaka theatre ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T10:23:54.676Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(43,25,1,'Mohsin Dk','9848296296','TD GUTTA ','AL MADINA CHICKEN CENTRE','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T10:37:26.594Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(44,49,0,'Akram hashmi ','9182043867','Rb function hall ','Talab katta ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T13:49:40.718Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(45,50,0,'Shaista ','9390338662','A S chicken center Bhageerata colony road ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T13:58:33.695Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(46,51,1,'Santhosh Guptha','8606465444','Kamakshi Smart City Block A-101 ','Venkateshwara Colony ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T23:00:16.057Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(47,1,0,'Mohammed Rafiuddin','7330875929','Noor Nagar, Nawabpet Road','Mahabubnagar','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T23:08:31.533Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(48,1,0,'Mohammed Fasiuddin','9441740551','Noor Nagar, Nawabpet Road','Mahabubnagar','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T23:10:52.880Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(50,22,0,'7-38 BK reddy colony ','8885456295','Near masjid e Umar Farooq ','','Mahabubnagar','Telangana','509001',16.740442000000001598,78.007355000000000444,'2026-01-24T20:43:47.162Z',NULL,16.732927000000000106,77.993509999999997006,NULL); +INSERT INTO addresses VALUES(51,29,1,'Zahed Habeeb ','6302300646','5-7-30/L/9 gaolnl masjid','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-25T23:35:14.565Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(52,55,1,'rahman junaid','7780659850','Bk reddy colony road no.1','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-26T09:30:35.593Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(53,59,0,'Mohammed yahiya khan ','9490585051','House no 1-1-77/b/3','Opp golbanglaw beside royal cement n steel','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-26T13:08:50.114Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(54,60,1,'Srinivasulu ','8331989727','Koilkonda X Road','TD GUTTA','Mahabubnagar','Telangana','509001',16.760335999999997902,77.993645000000002553,'2026-01-26T22:21:40.119Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(55,64,1,'Sayeed Pasha','9985383270','Goal masjid ','5-7-30/L/9','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-27T06:43:54.588Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(56,65,1,'Mahesh','9381637374','Beside Dl Narayana tuitions','Panchowrastha','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-27T11:28:27.599Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(57,54,0,'Abdul ahad ','9849759289','Veernapet shareef calony ','Fz water plant patel masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-27T11:43:53.572Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(58,66,1,'Faizan ','9618791714','Near farooq masjid ','Bk reddy colony ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-28T01:30:42.348Z',NULL,16.760255999999998266,77.993515000000002146,NULL); +INSERT INTO addresses VALUES(59,6,1,'TANVEER ','9346436140','BN REDDY COLONY ','BESIDE PASULA KISTA REDDY FUNCTION HALL ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-28T06:33:17.478Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(60,58,0,'Mohd Bilal','9603333080','Edira road before masjid-e-soulath','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-28T10:39:59.776Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(63,1,0,'Saniya Shaik','9676651496','Noor Nagar, Nawabpet Road','Near FCI Godown','Mahabubnagar','Telangana','509001',37.785834999999998728,-122.40641999999999356,'2026-01-29T14:11:38.999Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(65,1,0,'John Wick','9676651496','Noor Nagar','Mahabubnagar','Mahabubnagar','Telangana','509001',16.731055999999999706,78.011049999999997339,'2026-01-29T14:54:04.995Z',NULL,NULL,NULL,'https://maps.app.goo.gl/B3X3kkkgXdp6YbGW9'); +INSERT INTO addresses VALUES(66,38,0,'Inzamam Innu','9492230173','Ar talent school','Sr garden habeeb nagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-29T22:40:44.484Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(67,77,0,'Tauheed Ahmed ','7287952112','B.k reddy Omer Farooq masjid road','','Mahabubnagar','Telangana','509001',16.739729000000000525,78.006410000000006021,'2026-01-30T14:07:03.540Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(69,54,1,'Abdul ahad ','9849759289','3-11-137/A/11Veernapet shareef calony ','Fz water plant patel masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-31T02:30:19.844Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(70,78,1,'Vidya sagar','9059201201','65/a brundavana gardens','Svs dental hospital behind ashok leyland showroom','Mahabubnagar','Telangana','509001',16.759952999999998546,78.052940000000008424,'2026-01-31T04:25:12.551Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(71,7,1,'Umair ','7386623412','Brundavan colony near MG show room ','','Mahabubnagar','Telangana','509001',16.755016000000000353,78.052220000000005484,'2026-02-01T00:27:45.058Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(72,82,0,'Noushin','7981337554','Habib nagar','Near kirshima kirna','Mahabubnagar','Telangana','509001',16.733945999999999543,77.989480000000002135,'2026-02-01T01:03:36.263Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(73,74,1,'Mohd ','8639145664','Mahabubnagar habeeb nagar near karishma kirna','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T01:31:41.702Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(74,83,0,'Mohd Fasiuddin ','9441740551','H. No. 1-9-25/B/1/A.Nawab pet road','Noor. Nagar Mahabub Nagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T02:12:41.964Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(79,1,0,'Ethan Hunt','9676651496','Noor Nagar','Nawabpet Road','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T02:51:47.852Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(80,1,0,'Ethan Hunt','9676651496','NN','NN','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T02:58:10.268Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(81,84,1,'H.No. 8-1-72/B','8639762655','Road No. 4, Teacher''s Colony','Near Ramalayam','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T04:29:57.712Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(82,86,0,'heena begum','9121585783','hanumanpura ','jamaulamma nagar temple road ','Mahabubnagar','Telangana','509001',16.728843999999998715,77.987433999999993261,'2026-02-01T05:44:57.399Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(83,88,1,'Hani','9398199100','Goal masjid 5-7-30/L/9','Mahabubnagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T10:07:03.325Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(84,89,1,'Khaja mujeebuddin','8919308867','Srinivas colony','Beside geetam school taj residency','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T23:25:14.868Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(85,91,1,'H No 14-5-208/13/A','9347168525','2A Road, Krishna Nagar Colony,','Bhageeratha Colony Road','Mahabubnagar','Telangana','509001',16.735164999999998514,78.002075000000008486,'2026-02-02T04:29:24.308Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(86,92,0,'Asif','6305442889','Balaji convention hall','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-02T04:52:59.786Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(87,93,1,'md ghouse moin uddin','9705107988','rayeesa masjid trasfaram mbnr','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-02T04:57:17.798Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(88,95,1,'Mohammed arham','6301612623','Madina masjid','Karachi bakery back side','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-02T06:39:17.730Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(89,73,0,'Ameen ','9652801308','Bharath takies opp mm poly clinic','Madina masjid','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-02T20:23:12.850Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(90,97,1,'K Krishnaiah','9441565235','Hno 10-6-ye0033, srinivasa colony','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-02T23:57:41.024Z',NULL,NULL,NULL,'https://maps.app.goo.gl/7PsHmbWYvzbdkMHm8'); +INSERT INTO addresses VALUES(91,98,1,'Abdul ahad ','9381165946','3-11-137/A/11','Fz water plant veernapet patel masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-03T00:26:41.356Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(92,24,0,'Tausif ali','9948350118','14-8-87/4 iqbal manzil marlu','Iqbal manzil marlu','Mahabubnagar','Telangana','509001',16.741389999999998217,78.011604000000005498,'2026-02-03T03:06:18.057Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(93,46,0,'Sidra','9392266793','Gol masjid Sr garden ','Sr garden 1 flore','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-03T07:32:53.282Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(94,81,0,'SYED','9652338446','H.no 14-8-121','Near, Masjid e Mustafa ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-03T10:16:08.941Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(95,96,0,'Arif hussain','9848466280','Near mvs college, christianpally, opposite true value showroom','Bhavani nagar colony 2-96/2','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-04T01:34:16.516Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(96,103,0,'Zaid','6302119072','Opposite of Malabar gold and diamonds ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-05T03:15:46.045Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(98,105,1,'Ayesha mahmeen','9063857682','Ramaiah bowli; one town; mahabubanagar','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-05T22:58:26.450Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(99,107,0,'Saad','9573989830','Road no 6d ','Bhageritha colony ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T02:47:54.809Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(100,108,0,'SADIYA TAZEEN','9949035807','RB palace function hall ','RB palace function hall ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T03:10:35.120Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(101,109,0,'Aman','9063508083','1-8-17/10 T.d gutta fire station, Nalbowli Durdkhna.','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T03:14:49.128Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(102,113,0,'Kamal','9052741123','Marlu ','Brundavan colony','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T05:00:45.506Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(103,114,0,'Md.khizar Ahmed','9052323490','RB palace functionhall','RB palace functionhall ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T05:49:47.686Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(104,71,1,'Karthik ','9110314975','Line 7 balajinagar ','','Mahabubnagar','Telangana','509001',16.728182000000000329,77.997190000000005127,'2026-02-06T06:25:28.389Z',NULL,NULL,NULL,'PXHW+7WQ, Lane No. 7, BalajiNagar Colony, Mahbubnagar, Telangana 509001'); +INSERT INTO addresses VALUES(105,115,0,'Nadera','9985232643','H.no.1-10-19/3/6/a','Opp two taps','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T10:26:24.248Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(106,118,0,'Nida','9966022031','Shiva Shakti nagar ','Shiva Shakti nagar kaman','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T22:55:26.874Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(107,119,0,'Mohd Mujahed ','9059318255','Madina masjid old hospital ','Madina masjid kumarvadi','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-07T07:06:08.579Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(108,120,0,'Raza','7013641457','Hno5-7-30/n/6 habeebnagar Mahabubnagar ','Near zamzam kiranam habeebnagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-07T23:10:58.038Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(109,121,1,'Ram reddy','5457545442','Ganesh Nagar ','','Mahabubnagar','Telangana','509001',16.736355000000000536,77.986789999999999167,'2026-02-08T00:48:19.094Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(110,122,1,'MD SULTAN','9642339427','Hno 5-7-30/n/6 habeebnagar mahbubnagar','','Mahabubnagar','Telangana','509001',16.731957999999997888,77.989800000000002455,'2026-02-08T04:33:41.585Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(111,123,0,'Tahera begum','6305184261','Hn function hall veerana pet Mahabubnagar','Hn function hall veerana pet Mahabubnagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-09T05:50:43.617Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(112,125,0,'Ayesha','8341078342','Opp redbucket biryani lane','Padmavati colony ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-09T07:56:36.555Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(113,127,1,'khaja aleem uddin','7989653339','7-133/4 sun city colony sha sahab gutta','razzak masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-10T05:41:41.020Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(114,114,0,'Zunera','9052333490','Rb palace','Kitchen side','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-14T01:01:09.499Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(115,131,1,'Fathima ','9966710280','Seshadri nagar colony street 0/7','bk reddy colony, beside bc hostel ','Mahabubnagar','Telangana','509001',16.739141000000000047,78.004074000000001021,'2026-02-15T00:33:30.890Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(116,134,1,'Kaleem','9133621540','Shah shah gutta','Beside ss gutta masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-16T04:02:17.458Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(117,136,0,'Arman ','9390785046','Employees colony ','Road no 3','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-17T07:30:03.424Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(118,137,1,'Abdul Gaffar','8555938403','6-107/5','Sheshadri Nagar Road no 1 ','Mahabubnagar','Telangana','509001',16.74219099999999738,78.006219999999997227,'2026-02-17T08:53:09.780Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(119,140,0,'Sara','9848738554','Golmasjid mahaboobnagar ','Zam zam opposite ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-17T13:48:37.631Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(120,141,0,'Inzamam','8919042963','Sr garden back side gate','Gol masjid','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-17T19:47:20.768Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(121,143,0,'Samir','7286888001','Employees colony ','Road 3','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-17T22:56:28.656Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(122,130,1,'Rahiman','9912951895','Flat no 202,Aayra manzil Beside veeresh kiranam near Ibrahim Masjid','Street no:6/B,Sheshadri Nagar','Mahabubnagar','Telangana','509001',16.738883999999998763,78.004279999999992512,'2026-02-17T23:27:21.024Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(123,132,1,'Muzammil ','9110526651','5-7-30/L/2/C ,opp ghousiya kiranam gol masjid ','','Mahabubnagar','Telangana','509001',16.732962000000000557,77.990610000000000212,'2026-02-18T00:28:03.816Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(124,145,0,'Naheed','8179264991','5-7-30/L/7/H Habeeb Nagar Near Rayeesa Masjid','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-18T03:46:16.471Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(125,138,0,'Mahek','8328369823','B k ready colony ','Near omer Farooq masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-18T05:15:32.019Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(126,147,1,'Mohammad ','9885579134','H.no.5-7-30/L/10/C','Opp rayeesa masjid line','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-18T05:15:47.126Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(127,148,0,'Abdul razeek ','9100529645','Shavia shakti nagar ','','Mahabubnagar','Telangana','509001',16.735370000000000523,77.995819999999991267,'2026-02-18T07:31:27.609Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(128,150,1,'Khaleel Ahmed','9700630611','B.k Reddy Colony near Umar Farooq masjid ,Aziz kiranam opposite lane','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-18T09:13:27.828Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(129,144,1,'Asad','7981140388','Yenugonda Opp Masjid','','Mahabubnagar','Telangana','509001',16.754571999999998688,78.036539999999998684,'2026-02-18T10:09:17.009Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(130,149,1,'Moulali ','8519862344','Rayeesa masjid ','Habeeb Nagar ','Mahabubnagar','Telangana','509001',16.730108000000001311,77.99151600000000073,'2026-02-18T22:18:46.343Z',NULL,16.731068000000000495,77.990629999999994126,NULL); +INSERT INTO addresses VALUES(131,156,0,'Arshed','9381371156','H.no4-2, beside wisdom school ','Ramaiah Bowli ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-18T23:58:56.880Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(132,99,1,'Saniya','7893499520','H.No: 4-2-7/2a Tayyabnagar Ramaiyah bowli ','Near Almas function hall opp lane ','Mahabubnagar','Telangana','509001',16.740355999999998459,77.991410000000005453,'2026-02-19T01:03:59.675Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(133,159,0,'Mohd.Mujahid','9182114853','14-107/2,suncity colony','Sheshadrinagar,near masjid e razzaq ','Mahabubnagar','Telangana','509001',16.742678000000001503,78.006249999999992539,'2026-02-19T03:40:34.252Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(134,160,1,'Mohmmed pro','9642417025','50','Ibadur raheman masjed opposite road Shiva Shakti road iron shop opposite ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-19T03:49:45.149Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(135,151,0,'Anjum','9346508676','H۔No:6-5-57/10 Habeeb nagar ','Beside Hanan masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-19T04:09:11.514Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(136,4,0,'Saniya','8688326100','Marlu , near Ali tower ','','Mahabubnagar','Telangana','509001',16.741472000000001685,78.011610000000004561,'2026-02-19T04:16:33.494Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(137,162,0,'Shaik Hussain','6302798105','Zehra School Noori Nagar','Masjid a noore Ilahi','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-19T05:08:26.454Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(138,32,1,'Md kaif','8919304169','14_6_13/9/a2','Pasula kistta reddy colony','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-19T06:14:03.397Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(139,163,0,'farhana begum','7032026589','Marlu , employes colony','Road no. 3','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-19T06:49:20.611Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(140,165,0,'Rumana ','6281349676','Govt hospital back side mahabubnagr ','Tawakal bekry mahabubnagr 8-1-39/1','Mahabubnagar','Telangana','509001',16.749452999999999036,78.00876999999999839,'2026-02-19T10:27:50.727Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(141,168,0,'Aladdin','8498937807','S.s gutta mahabubnagar bhagat Singh colony ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-20T03:29:56.135Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(142,169,1,'Ahmed Ali','7799420422','Near Mustafa masjid','Marlu','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-20T03:37:22.057Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(143,171,1,'Mohammed Mudassir','6281738569','H.No:5-7-30/N/9, Old Palamoor Location, Near Rayeesa Masjid','First Right turn after S.M.Tent House','Mahabubnagar','Telangana','509001',16.73113299999999981,77.990329999999996601,'2026-02-20T03:57:59.497Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(144,170,0,'Raheel','9901294914','1-10-79/B, ShahSaheb Gutta','Vasavi college lane.','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-20T03:59:16.614Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(145,176,0,'Arshad Ali','9885578647','14-8-120 Near Masjid e Mustafa','Marlu','Mahabubnagar','Telangana','509001',16.743597000000001173,78.010283999999998627,'2026-02-20T06:01:46.916Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(146,163,0,'farhana begum','7032026589','Marlu , employes colony mbnr','Road no. 3','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-20T07:20:46.386Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(147,181,1,'Khaled ','9885252564','1-10-87/3/A','1-10-87/3/A','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-20T13:34:13.988Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(148,184,1,'Shazia ','9160481161','Near puchamma temple bk reddy colony ','Near puchamma temple bk reddy colony ','Mahabubnagar','Telangana','509001',16.742122999999999422,78.0064849999999943,'2026-02-20T22:47:32.316Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(149,186,0,'Faiz ul Rahman ','9550541366','Masdoos Nagar ','','Mahabubnagar','Telangana','509001',16.732306999999999597,77.990759999999994533,'2026-02-21T03:45:12.460Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(150,187,0,'Mohd Fasi','9703691566','Habeebnagar ','Near Narmada Honda Showroom ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-21T05:40:59.163Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(151,189,0,'Chintu','8019231723','Road no 6B','BHAGEERATHA colony ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-21T13:02:30.211Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(152,178,0,'Abdul khadar ','7799492001','Nakha Pride apartment,door no 304','Near district court, telangana chowrasta ','Mahabubnagar','Telangana','509001',16.751510000000000566,77.992390000000000327,'2026-02-21T20:56:08.971Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(153,193,0,'Raza','7207490881','5-7-30/n/6 habeebnagar mbnr','Near zamzam kiranam','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-21T22:53:08.954Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(154,194,1,'Syed Aijaz','6302774527','Al noor school straight shashabgutta','Alkouser madarsa backnside','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T00:16:09.557Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(155,195,0,'Aditya','6301375032','Old palamoor','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T00:58:09.170Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(156,196,0,'Rani','8978874860','Vinayak Nagar, housing board colony ','Near edira Bypass X Road','Mahabubnagar','Telangana','509001',16.747900000000002229,78.04578999999999489,'2026-02-22T00:59:40.685Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(157,197,0,'Habeeb Hasham','7842321671','14-6-14/6','Beside masjid e ibrahim back road','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T01:07:34.153Z',NULL,NULL,NULL,'https://maps.app.goo.gl/P5sxjAGjgjELdnh37?g_st=ic'); +INSERT INTO addresses VALUES(158,198,0,'Atiya sikandar','7799311559','3-2-3, afzal manzil, beside hamdard clinic makka masjid road verrannapet','','Mahabubnagar','Telangana','509001',16.744990000000001373,77.98212399999999711,'2026-02-22T01:08:33.396Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(159,200,1,'Srinath','8328216406','Manyamkonda ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T02:02:31.789Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(160,201,0,'Imaduddin ','9121477995','Near Mothinagar government High school ','Near SV godam','Mahabubnagar','Telangana','509001',16.759189999999999365,77.997765000000001123,'2026-02-22T02:03:54.841Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(161,205,1,'nasir','9177629869','Hanuman pura masjid e jabbar','mahabubngar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T03:45:47.686Z',NULL,16.730706999999997997,77.988939999999997709,NULL); +INSERT INTO addresses VALUES(162,206,0,'M.A MALIK','9000452637','14-7-91/2/1/C','Marlu Jr palace','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T04:21:36.419Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(163,208,0,'Amer','9618770682','H no 6-3-44/D/10/2/1, hanuman pura,Imran kiranam','9059566856','Mahabubnagar','Telangana','509001',16.729278999999999122,77.989990000000002368,'2026-02-22T04:39:03.925Z',NULL,16.729820000000000135,77.990039999999991593,NULL); +INSERT INTO addresses VALUES(164,209,0,'Shakeel','7993744243','Shiva shakthi nagar','telugu geri','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T04:45:09.965Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(165,212,0,'Salma ','7670818331','5-5-11 dist jail khana riyaz ul Jannah masjid old palamoor mahabubnagar ','Riyaz ul Jannah masjid mahabubnagar telengana 509001','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T06:04:13.075Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(166,213,1,'Ahmed ','9392816978','Habeeb nagar ','Zam Zam kiranam ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T08:01:50.655Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(167,50,0,'Shaista','9390338662','Santosh Nagar colony beside maheshwari theatre ','','Mahabubnagar','Telangana','509001',16.750419999999999198,78.033630000000000492,'2026-02-22T14:05:23.161Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(168,223,0,'Syed','9398876512','S.S gutta 2 nal galli ','Tipu sultan chowk ','Mahabubnagar','Telangana','509001',16.746738000000000567,78.00908999999999871,'2026-02-23T03:47:19.976Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(169,224,1,'Saud Amodi ','8374782337','Shah Sahab gutta','Shah Sahab Gupta A1 chicken center Gali ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-23T04:40:34.997Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(170,225,0,'Akheel ','9666426396','3-3-48','Nagar mahabubnagar Telangana ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-23T06:45:56.079Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(171,226,0,'Anas Affuaf ','9391479179','Near Taiba masjid Ramaiah bowli ','Mahabubnagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-23T08:32:01.241Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(172,228,1,'Abdur rahman','9966138248','Plot 22 Opp children''s park last lane z and z colony ','1 town back side alis mart colony','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-23T22:39:52.264Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(173,229,1,'Abdul kaleem','9885575791','5-4-85/f/14/2','Opposite Amena masjid tayyab nagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-24T01:41:59.722Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(174,230,0,'Mehreen','9398645142','Opposite to bright school, marlu','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-24T01:44:03.723Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(175,219,1,'Naseer','7569573638','5-3-71/2/C masdoos nagar near gouds colony','','Mahabubnagar','Telangana','509001',16.735652999999999224,77.989829999999997767,'2026-02-24T02:55:23.438Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(176,158,0,'Shabana ','9381289050','Wisdom school near','Ramaiah bowli','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-24T04:02:06.921Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(177,232,1,'Sultan bahiyal','9059525115','Adjcent to laxmi tiffin centre, old hospital road, madina masjid ','','Mahabubnagar','Telangana','509001',16.74373200000000228,77.985489999999995092,'2026-02-24T14:51:10.955Z',NULL,NULL,NULL,NULL); +CREATE TABLE IF NOT EXISTS "cart_items" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "product_id" INTEGER NOT NULL, "quantity" REAL NOT NULL, "added_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO cart_items VALUES(32,3,3,1.0,'2025-11-24T06:25:02.963Z'); +INSERT INTO cart_items VALUES(48,3,9,2.0,'2025-11-28T09:43:04.203Z'); +INSERT INTO cart_items VALUES(49,7,11,1.0,'2025-11-28T22:20:23.104Z'); +INSERT INTO cart_items VALUES(99,4,11,1.0,'2025-11-29T11:36:06.140Z'); +INSERT INTO cart_items VALUES(100,4,12,1.0,'2025-12-02T09:50:53.817Z'); +INSERT INTO cart_items VALUES(102,4,3,2.0,'2025-12-02T09:53:19.217Z'); +INSERT INTO cart_items VALUES(108,6,11,1.0,'2025-12-06T01:58:02.112Z'); +INSERT INTO cart_items VALUES(109,6,3,1.0,'2025-12-06T02:02:59.975Z'); +INSERT INTO cart_items VALUES(112,10,1,1.0,'2025-12-07T23:18:24.863Z'); +INSERT INTO cart_items VALUES(114,2,12,2.0,'2025-12-09T06:57:51.258Z'); +INSERT INTO cart_items VALUES(128,11,1,1.0,'2025-12-14T07:52:10.000Z'); +CREATE TABLE IF NOT EXISTS "complaints" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "order_id" INTEGER, "complaint_body" TEXT NOT NULL, "is_resolved" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "response" TEXT, "images" TEXT); +INSERT INTO complaints VALUES(1,3,1,'Some eggs are broken',1,'2025-11-19T11:01:59.549Z','We sent you the apples not eggs 😁',NULL); +INSERT INTO complaints VALUES(2,1,54,'This item is not good at all. You guys should stop this immediately',1,'2025-11-29T11:53:25.720Z','Okk',NULL); +INSERT INTO complaints VALUES(3,1,NULL,'Test Complaint',1,'2025-11-29T23:22:44.507Z','Hi','["complaint-images/1764478363144-0"]'); +INSERT INTO complaints VALUES(4,17,NULL,'Hello',1,'2025-12-19T03:04:32.924Z','Hi',NULL); +INSERT INTO complaints VALUES(5,17,NULL,'Hello',1,'2025-12-19T04:02:59.187Z','','["complaint-images/1766136777180-0"]'); +INSERT INTO complaints VALUES(6,15,NULL,'THIS ITEM IS NOT GOOD REMOVE THIS ITEM 🚫',1,'2025-12-19T07:17:34.114Z','Ok',NULL); +INSERT INTO complaints VALUES(7,17,NULL,'Gg',1,'2025-12-20T21:38:30.627Z','Okk',NULL); +INSERT INTO complaints VALUES(8,17,NULL,'Hh',1,'2025-12-23T11:48:56.053Z','Bla',NULL); +INSERT INTO complaints VALUES(9,1,NULL,'Funny comparing',1,'2026-01-15T13:22:10.666Z','Resolving as test ','["complaint-images/1768503130322-0"]'); +INSERT INTO complaints VALUES(10,22,NULL,'Raise a complaint scenario when order is placed and at shipping status',1,'2026-01-18T09:59:59.381Z','Okk',NULL); +INSERT INTO complaints VALUES(11,22,NULL,'Hi product quality is not good can you please do a replacement for this.',1,'2026-01-18T21:59:20.647Z','No',NULL); +INSERT INTO complaints VALUES(12,22,66,'Bad quality nai paki papai aur',1,'2026-01-28T10:42:13.347Z','"From next time, we''ll take care.','["complaint-images/1769616732515-0","complaint-images/1769616732516-1"]'); +INSERT INTO complaints VALUES(13,54,81,'I needed it quickly',1,'2026-01-31T02:03:32.243Z','Not answered call',NULL); +INSERT INTO complaints VALUES(14,46,137,'Yes',1,'2026-02-03T07:34:35.816Z','Resolvedd',NULL); +INSERT INTO complaints VALUES(15,81,143,replace('Is someone looking at complaints :) \n\nTest','\n',char(10)),1,'2026-02-03T10:20:23.832Z','Yeah... Complaints are being actively monitored. We welcome feedback and criticism',NULL); +INSERT INTO complaints VALUES(16,121,NULL,'We by its sorry please cancel it',1,'2026-02-08T00:56:29.295Z','',NULL); +INSERT INTO complaints VALUES(17,121,NULL,'It is only 50 right why RS 60 showing',1,'2026-02-08T04:33:16.782Z','It''s the authentic rate',NULL); +INSERT INTO complaints VALUES(18,119,NULL,'I need the order early',1,'2026-02-18T01:58:37.530Z','',NULL); +INSERT INTO complaints VALUES(19,82,NULL,'Where order',1,'2026-02-19T05:01:41.560Z','',NULL); +INSERT INTO complaints VALUES(20,162,NULL,'Ky time hota oder aana',1,'2026-02-19T05:11:21.737Z','',NULL); +INSERT INTO complaints VALUES(21,82,NULL,'Its late',1,'2026-02-19T05:30:11.017Z','Sorry. Will take care from next time',NULL); +INSERT INTO complaints VALUES(22,160,NULL,'Bohot Acha items good and fresh hai sab chez think u freshyo',1,'2026-02-19T06:42:28.833Z','Thank you...our service will improve further. ',NULL); +INSERT INTO complaints VALUES(23,225,NULL,'Akheel',1,'2026-02-23T06:55:20.175Z','Complaint not clear',NULL); +INSERT INTO complaints VALUES(24,225,NULL,'Cash',1,'2026-02-23T06:56:45.780Z','Complaint not clear',NULL); +INSERT INTO complaints VALUES(25,225,NULL,'Cash',1,'2026-02-23T07:00:17.914Z','Complaint not clear',NULL); +INSERT INTO complaints VALUES(58,1,385,'No order',0,'2026-03-22T04:45:39.793Z',NULL,'["complaint-images/1774174538370.jpg"]'); +INSERT INTO complaints VALUES(59,1,385,'Hii',0,'2026-03-22T04:57:51.234Z',NULL,'["complaint-images/1774175270043.jpg"]'); +INSERT INTO complaints VALUES(60,1,385,'Another fest',0,'2026-03-22T05:06:02.150Z',NULL,'["complaint-images/1774175760765.jpg"]'); +INSERT INTO complaints VALUES(61,1,384,'Testing again',0,'2026-03-22T05:08:55.745Z',NULL,'["complaint-images/1774175933889.jpg"]'); +INSERT INTO complaints VALUES(62,1,383,'Last test',1,'2026-03-22T05:10:05.820Z','Doneee','["complaint-images/1774176003038.jpg","complaint-images/1774176003229.jpg","complaint-images/1774176003414.jpg"]'); +CREATE TABLE IF NOT EXISTS "coupon_applicable_products" ("id" INTEGER PRIMARY KEY, "coupon_id" INTEGER NOT NULL, "product_id" INTEGER NOT NULL); +INSERT INTO coupon_applicable_products VALUES(1,8,25); +CREATE TABLE IF NOT EXISTS "coupon_applicable_users" ("id" INTEGER PRIMARY KEY, "coupon_id" INTEGER NOT NULL, "user_id" INTEGER NOT NULL); +INSERT INTO coupon_applicable_users VALUES(1,11,1); +INSERT INTO coupon_applicable_users VALUES(2,11,4); +INSERT INTO coupon_applicable_users VALUES(3,13,1); +INSERT INTO coupon_applicable_users VALUES(4,14,1); +INSERT INTO coupon_applicable_users VALUES(5,15,1); +INSERT INTO coupon_applicable_users VALUES(6,18,145); +CREATE TABLE IF NOT EXISTS "coupon_usage" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "coupon_id" INTEGER NOT NULL, "used_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "order_id" INTEGER, "order_item_id" INTEGER); +INSERT INTO coupon_usage VALUES(1,2,4,'2025-11-25T00:59:10.947Z',NULL,NULL); +INSERT INTO coupon_usage VALUES(2,1,4,'2025-11-25T05:22:34.453Z',NULL,NULL); +INSERT INTO coupon_usage VALUES(3,1,4,'2025-11-27T06:03:27.515Z',NULL,NULL); +INSERT INTO coupon_usage VALUES(4,1,3,'2025-11-28T05:42:31.979Z',27,NULL); +INSERT INTO coupon_usage VALUES(5,1,4,'2025-11-28T05:42:31.979Z',27,NULL); +INSERT INTO coupon_usage VALUES(6,1,5,'2025-11-28T05:42:31.979Z',27,NULL); +INSERT INTO coupon_usage VALUES(7,1,4,'2025-11-28T08:13:29.610Z',28,39); +INSERT INTO coupon_usage VALUES(8,1,4,'2025-11-28T08:13:29.610Z',28,40); +INSERT INTO coupon_usage VALUES(9,1,4,'2025-11-28T22:34:42.745Z',32,48); +INSERT INTO coupon_usage VALUES(10,1,4,'2025-11-28T22:34:42.745Z',32,49); +INSERT INTO coupon_usage VALUES(11,1,4,'2025-11-28T22:34:42.745Z',32,50); +INSERT INTO coupon_usage VALUES(12,1,4,'2025-11-28T22:36:51.615Z',33,51); +INSERT INTO coupon_usage VALUES(13,1,4,'2025-11-28T22:52:17.337Z',34,52); +INSERT INTO coupon_usage VALUES(14,1,4,'2025-11-28T22:52:17.337Z',34,53); +INSERT INTO coupon_usage VALUES(15,1,4,'2025-11-28T22:52:17.337Z',34,54); +INSERT INTO coupon_usage VALUES(16,1,4,'2025-11-28T22:58:19.949Z',35,55); +INSERT INTO coupon_usage VALUES(17,1,4,'2025-11-28T23:17:00.736Z',39,64); +INSERT INTO coupon_usage VALUES(18,1,4,'2025-11-28T23:17:00.736Z',39,65); +INSERT INTO coupon_usage VALUES(19,1,4,'2025-11-28T23:17:56.567Z',40,66); +INSERT INTO coupon_usage VALUES(20,1,4,'2025-11-28T23:17:56.567Z',40,67); +INSERT INTO coupon_usage VALUES(21,1,4,'2025-11-28T23:22:24.357Z',41,68); +INSERT INTO coupon_usage VALUES(22,1,4,'2025-11-28T23:22:24.357Z',41,69); +INSERT INTO coupon_usage VALUES(23,1,4,'2025-11-28T23:23:26.876Z',42,70); +INSERT INTO coupon_usage VALUES(24,1,4,'2025-11-28T23:23:26.876Z',42,71); +INSERT INTO coupon_usage VALUES(25,1,4,'2025-11-28T23:31:56.572Z',43,72); +INSERT INTO coupon_usage VALUES(26,1,4,'2025-11-28T23:31:56.572Z',43,73); +INSERT INTO coupon_usage VALUES(27,1,4,'2025-11-28T23:31:56.572Z',43,74); +INSERT INTO coupon_usage VALUES(28,1,4,'2025-11-28T23:33:28.518Z',44,75); +INSERT INTO coupon_usage VALUES(29,1,4,'2025-11-28T23:33:28.518Z',44,76); +INSERT INTO coupon_usage VALUES(30,1,4,'2025-11-28T23:33:28.518Z',44,77); +INSERT INTO coupon_usage VALUES(31,1,4,'2025-11-28T23:35:19.817Z',45,78); +INSERT INTO coupon_usage VALUES(32,1,4,'2025-11-28T23:35:19.817Z',45,79); +INSERT INTO coupon_usage VALUES(33,1,4,'2025-11-28T23:35:19.817Z',45,80); +INSERT INTO coupon_usage VALUES(34,1,4,'2025-11-28T23:42:35.845Z',46,81); +INSERT INTO coupon_usage VALUES(35,1,4,'2025-11-28T23:42:35.845Z',46,82); +INSERT INTO coupon_usage VALUES(36,1,4,'2025-11-28T23:42:35.845Z',46,83); +INSERT INTO coupon_usage VALUES(37,1,4,'2025-11-29T00:35:34.926Z',47,84); +INSERT INTO coupon_usage VALUES(38,1,4,'2025-11-29T00:35:34.926Z',47,85); +INSERT INTO coupon_usage VALUES(39,1,3,'2025-11-29T00:47:38.510Z',48,86); +INSERT INTO coupon_usage VALUES(40,1,3,'2025-11-29T00:47:38.510Z',48,87); +INSERT INTO coupon_usage VALUES(41,1,3,'2025-11-29T00:47:38.510Z',48,88); +INSERT INTO coupon_usage VALUES(42,1,4,'2025-11-29T00:47:38.510Z',48,86); +INSERT INTO coupon_usage VALUES(43,1,4,'2025-11-29T00:47:38.510Z',48,87); +INSERT INTO coupon_usage VALUES(44,1,4,'2025-11-29T00:47:38.510Z',48,88); +INSERT INTO coupon_usage VALUES(45,1,3,'2025-11-29T00:51:58.214Z',49,89); +INSERT INTO coupon_usage VALUES(46,1,3,'2025-11-29T00:51:58.214Z',49,90); +INSERT INTO coupon_usage VALUES(47,1,3,'2025-11-29T00:51:58.214Z',49,91); +INSERT INTO coupon_usage VALUES(48,1,3,'2025-11-29T00:51:58.214Z',49,92); +INSERT INTO coupon_usage VALUES(49,1,4,'2025-11-29T00:51:58.214Z',49,89); +INSERT INTO coupon_usage VALUES(50,1,4,'2025-11-29T00:51:58.214Z',49,90); +INSERT INTO coupon_usage VALUES(51,1,4,'2025-11-29T00:51:58.214Z',49,91); +INSERT INTO coupon_usage VALUES(52,1,4,'2025-11-29T00:51:58.214Z',49,92); +INSERT INTO coupon_usage VALUES(53,1,3,'2025-11-29T01:06:19.496Z',50,NULL); +INSERT INTO coupon_usage VALUES(54,1,4,'2025-11-29T01:06:19.496Z',50,NULL); +INSERT INTO coupon_usage VALUES(55,1,4,'2025-11-29T01:57:48.593Z',53,NULL); +INSERT INTO coupon_usage VALUES(56,2,5,'2025-12-04T23:32:41.260Z',55,NULL); +INSERT INTO coupon_usage VALUES(57,17,5,'2025-12-19T03:46:32.077Z',74,NULL); +INSERT INTO coupon_usage VALUES(58,17,7,'2025-12-19T11:01:02.235Z',85,NULL); +INSERT INTO coupon_usage VALUES(59,2,8,'2025-12-27T12:09:01.970Z',117,NULL); +INSERT INTO coupon_usage VALUES(60,2,8,'2025-12-28T08:41:24.922Z',121,NULL); +INSERT INTO coupon_usage VALUES(61,2,10,'2026-01-01T03:14:07.880Z',125,NULL); +INSERT INTO coupon_usage VALUES(62,2,12,'2026-01-01T06:40:15.200Z',127,NULL); +INSERT INTO coupon_usage VALUES(63,1,13,'2026-01-06T07:21:22.063Z',132,NULL); +INSERT INTO coupon_usage VALUES(64,21,5,'2026-01-06T11:13:08.886Z',134,NULL); +INSERT INTO coupon_usage VALUES(65,2,16,'2026-01-15T10:38:51.425Z',149,NULL); +INSERT INTO coupon_usage VALUES(66,2,16,'2026-01-16T07:20:20.484Z',151,NULL); +INSERT INTO coupon_usage VALUES(67,2,16,'2026-01-16T07:20:39.331Z',152,NULL); +INSERT INTO coupon_usage VALUES(68,2,16,'2026-01-16T07:21:00.372Z',153,NULL); +INSERT INTO coupon_usage VALUES(69,2,16,'2026-01-16T07:21:27.067Z',154,NULL); +INSERT INTO coupon_usage VALUES(70,2,16,'2026-01-16T07:22:32.774Z',155,NULL); +INSERT INTO coupon_usage VALUES(71,7,17,'2026-02-01T00:28:05.860Z',191,NULL); +INSERT INTO coupon_usage VALUES(72,38,17,'2026-02-01T02:19:04.935Z',194,NULL); +INSERT INTO coupon_usage VALUES(77,7,17,'2026-02-02T08:27:54.169Z',206,NULL); +INSERT INTO coupon_usage VALUES(78,1,17,'2026-02-02T12:53:25.042Z',208,NULL); +INSERT INTO coupon_usage VALUES(79,38,17,'2026-02-02T22:40:01.684Z',209,NULL); +INSERT INTO coupon_usage VALUES(80,38,17,'2026-02-03T08:43:00.805Z',215,NULL); +INSERT INTO coupon_usage VALUES(81,96,17,'2026-02-04T01:36:25.150Z',217,NULL); +INSERT INTO coupon_usage VALUES(82,81,17,'2026-02-04T02:41:07.529Z',218,NULL); +INSERT INTO coupon_usage VALUES(83,24,17,'2026-02-05T04:00:30.760Z',221,NULL); +INSERT INTO coupon_usage VALUES(84,115,17,'2026-02-06T10:26:39.549Z',226,NULL); +INSERT INTO coupon_usage VALUES(85,103,17,'2026-02-06T23:28:37.564Z',230,NULL); +INSERT INTO coupon_usage VALUES(86,103,17,'2026-02-06T23:36:55.440Z',231,NULL); +INSERT INTO coupon_usage VALUES(87,120,17,'2026-02-07T23:11:07.314Z',235,NULL); +INSERT INTO coupon_usage VALUES(88,2,17,'2026-02-10T21:59:33.775Z',250,NULL); +INSERT INTO coupon_usage VALUES(89,2,17,'2026-02-16T01:21:48.065Z',256,NULL); +INSERT INTO coupon_usage VALUES(90,134,17,'2026-02-16T04:14:55.536Z',257,NULL); +INSERT INTO coupon_usage VALUES(91,120,17,'2026-02-17T00:44:27.989Z',259,NULL); +INSERT INTO coupon_usage VALUES(92,145,17,'2026-02-18T03:46:31.310Z',271,NULL); +INSERT INTO coupon_usage VALUES(93,81,17,'2026-02-21T03:19:33.184Z',312,NULL); +INSERT INTO coupon_usage VALUES(94,7,17,'2026-02-21T12:32:34.322Z',318,NULL); +INSERT INTO coupon_usage VALUES(95,141,17,'2026-02-21T19:42:40.636Z',319,NULL); +INSERT INTO coupon_usage VALUES(96,120,17,'2026-02-21T22:34:37.455Z',321,NULL); +INSERT INTO coupon_usage VALUES(97,193,17,'2026-02-21T22:53:17.777Z',322,NULL); +INSERT INTO coupon_usage VALUES(98,130,17,'2026-02-21T23:38:18.551Z',324,NULL); +INSERT INTO coupon_usage VALUES(99,223,17,'2026-02-23T03:47:30.752Z',334,NULL); +CREATE TABLE IF NOT EXISTS "coupons" ("id" INTEGER PRIMARY KEY, "is_user_based" INTEGER NOT NULL DEFAULT false, "discount_percent" REAL, "flat_discount" REAL, "min_order" REAL, "created_by" INTEGER, "max_value" REAL, "is_invalidated" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "is_apply_for_all" INTEGER NOT NULL DEFAULT false, "valid_till" TEXT, "max_limit_for_user" INTEGER, "coupon_code" TEXT NOT NULL, "product_ids" INTEGER, "exclusive_apply" INTEGER NOT NULL DEFAULT false); +INSERT INTO coupons VALUES(1,0,20.0,NULL,500.0,1,NULL,1,'2025-11-21T08:44:20.264Z',1,'2025-11-29T18:30:00.000Z',NULL,'BIG50',NULL,0); +INSERT INTO coupons VALUES(2,0,50.0,NULL,1000.0,1,500.0,1,'2025-11-22T03:29:29.904Z',1,'2026-01-06T18:30:00.000Z',1,'SAVEMORE',NULL,0); +INSERT INTO coupons VALUES(3,0,20.0,NULL,5000.0,1,NULL,0,'2025-11-24T06:11:19.047Z',1,'2025-12-24T18:30:00.000Z',NULL,'BIG100',NULL,0); +INSERT INTO coupons VALUES(4,0,20.0,NULL,500.0,1,NULL,0,'2025-11-24T06:13:06.090Z',1,'2025-11-29T18:30:00.000Z',NULL,'BIG150',NULL,0); +INSERT INTO coupons VALUES(5,0,NULL,150.0,700.0,1,150.0,0,'2025-11-26T14:20:29.369Z',1,'2026-01-29T14:20:00.000Z',1,'FIRST150',NULL,0); +INSERT INTO coupons VALUES(6,1,NULL,4686.0,0.0,1,4686.0,0,'2025-11-29T01:35:51.215Z',0,'2025-12-29T01:35:51.214Z',1,'MOHORD050',NULL,0); +INSERT INTO coupons VALUES(7,1,NULL,22.0,22.0,1,22.0,0,'2025-12-19T10:00:13.297Z',0,'2026-01-18T10:00:13.297Z',1,'BHA82',NULL,0); +INSERT INTO coupons VALUES(8,0,10.0,20.0,200.0,1,20.0,1,'2025-12-22T05:20:27.988Z',1,'2025-12-29T18:30:00.000Z',6,'135',NULL,0); +INSERT INTO coupons VALUES(9,1,NULL,236.0,236.0,1,236.0,0,'2025-12-27T12:04:22.196Z',0,'2026-01-26T12:04:22.195Z',1,'MOH115',NULL,0); +INSERT INTO coupons VALUES(10,1,NULL,128.41999999999997861,128.41999999999997861,1,128.41999999999997861,0,'2025-12-27T19:11:57.259Z',0,'2026-01-26T19:11:57.259Z',1,'868117',NULL,0); +INSERT INTO coupons VALUES(11,1,20.0,NULL,500.0,1,250.0,0,'2026-01-01T04:39:53.608Z',0,'2026-01-30T04:39:00.000Z',3,'SHAFITEST2',NULL,0); +INSERT INTO coupons VALUES(12,0,10.0,NULL,500.0,1,50.0,0,'2026-01-01T06:39:22.230Z',1,'2026-01-07T06:37:00.000Z',1,'SAVEMORE0',NULL,0); +INSERT INTO coupons VALUES(13,1,30.0,NULL,2000.0,1,850.0,0,'2026-01-06T07:19:44.069Z',0,'2026-01-30T07:19:00.000Z',5,'TESTDISCOUNT',NULL,0); +INSERT INTO coupons VALUES(14,1,20.0,NULL,1200.0,1,600.0,0,'2026-01-06T13:10:01.161Z',0,'2026-02-27T13:09:00.000Z',4,'TESTCOUPON3',NULL,0); +INSERT INTO coupons VALUES(15,1,25.0,NULL,1000.0,1,250.0,0,'2026-01-12T03:28:20.356Z',0,'2026-01-30T07:46:00.000Z',2,'RESERVE_TEST34',NULL,0); +INSERT INTO coupons VALUES(16,0,10.0,NULL,500.0,1,50.0,0,'2026-01-15T10:27:07.302Z',1,'2026-01-19T18:30:00.000Z',2,'SAVEOFF10U',NULL,0); +INSERT INTO coupons VALUES(17,0,10.0,NULL,359.0,1,50.0,0,'2026-01-25T13:00:26.545Z',1,'2026-03-30T18:30:00.000Z',3,'START10',NULL,0); +INSERT INTO coupons VALUES(18,1,10.0,NULL,100.0,1,50.0,0,'2026-02-18T03:44:14.005Z',0,'2026-02-28T03:44:00.000Z',2,'NAHEED10',NULL,0); +CREATE TABLE IF NOT EXISTS "delivery_slot_info" ("id" INTEGER PRIMARY KEY, "delivery_time" TEXT NOT NULL, "freeze_time" TEXT NOT NULL, "is_active" INTEGER NOT NULL DEFAULT true, "delivery_sequence" TEXT, "is_flash" INTEGER NOT NULL DEFAULT false, "group_ids" TEXT, "is_capacity_full" INTEGER NOT NULL DEFAULT false); +INSERT INTO delivery_slot_info VALUES(1,'2025-11-25T20:00:00.000Z','2025-11-21T18:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(2,'2025-11-30T01:39:00.000Z','2025-11-29T01:40:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(3,'2025-11-22T19:01:00.000Z','2025-11-23T19:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(4,'2025-11-29T19:30:00.000Z','2025-11-29T17:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(5,'2025-12-10T00:00:00.000Z','2025-12-06T19:50:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(6,'2025-12-10T18:59:00.000Z','2025-12-10T18:59:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(7,'2025-12-15T03:00:00.000Z','2025-12-15T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(8,'2025-12-24T14:00:00.000Z','2025-12-25T00:00:00.000Z',1,'{"1":[72,71,67],"2":[70],"3":[69,73,74,76,75]}',0,NULL,0); +INSERT INTO delivery_slot_info VALUES(9,'2025-12-24T23:00:00.000Z','2025-12-24T21:00:00.000Z',1,'{"1":[62,60]}',0,NULL,0); +INSERT INTO delivery_slot_info VALUES(10,'2025-12-25T05:20:00.000Z','2025-12-24T18:25:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(11,'2025-12-20T16:00:00.000Z','2025-12-19T07:46:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(12,'2025-12-22T16:00:00.000Z','2025-12-23T17:51:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(13,'2025-12-19T09:52:00.000Z','2025-12-19T10:52:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(14,'2025-12-19T10:05:00.000Z','2025-12-19T12:05:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(15,'2025-12-19T10:08:00.000Z','2025-12-18T14:08:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(16,'2025-12-29T21:00:00.000Z','2025-12-29T19:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(17,'2025-12-30T15:10:00.000Z','2025-12-30T19:37:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(18,'2025-12-30T08:00:00.000Z','2025-12-29T18:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(19,'2025-12-28T19:00:00.000Z','2025-12-28T19:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(20,'2026-01-04T21:00:00.000Z','2026-01-04T19:00:00.000Z',1,'{"1":[123,124]}',0,NULL,0); +INSERT INTO delivery_slot_info VALUES(21,'2026-01-05T22:00:00.000Z','2026-01-05T21:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(22,'2026-01-09T22:00:00.000Z','2026-01-09T21:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(23,'2026-01-22T03:00:00.000Z','2026-01-20T03:00:00.000Z',1,'{"1":[149,151,139,142,148]}',0,NULL,0); +INSERT INTO delivery_slot_info VALUES(24,'2026-01-13T04:27:08.055Z','2026-01-13T04:27:08.055Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(25,'2026-01-13T04:46:11.387Z','2026-01-13T04:46:11.387Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(26,'2026-01-14T13:38:58.391Z','2026-01-14T13:38:58.391Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(27,'2026-01-14T13:53:52.798Z','2026-01-14T13:53:52.798Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(28,'2026-01-14T13:54:46.003Z','2026-01-14T13:54:46.003Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(29,'2026-01-14T13:59:46.565Z','2026-01-14T13:59:46.565Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(30,'2026-01-14T14:07:19.783Z','2026-01-14T14:07:19.783Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(31,'2026-01-15T20:00:00.000Z','2026-01-15T20:00:00.000Z',1,'{"1":[150]}',0,NULL,0); +INSERT INTO delivery_slot_info VALUES(32,'2026-01-16T21:00:00.000Z','2026-01-16T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(33,'2026-01-17T00:16:00.000Z','2026-01-17T00:16:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(34,'2026-01-21T03:00:00.000Z','2026-01-20T23:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(35,'2026-01-23T20:00:00.000Z','2026-01-23T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(37,'2026-01-24T00:00:00.000Z','2026-01-23T23:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(38,'2026-01-24T01:00:00.000Z','2026-01-24T00:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(39,'2026-01-29T08:00:00.000Z','2026-01-29T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(40,'2026-01-23T08:00:00.000Z','2026-01-23T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(41,'2026-01-25T20:00:00.000Z','2026-01-25T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(43,'2026-01-25T21:00:00.000Z','2026-01-25T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(44,'2026-01-26T00:00:00.000Z','2026-01-26T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(45,'2026-01-26T01:00:00.000Z','2026-01-26T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(46,'2026-01-26T07:00:00.000Z','2026-01-26T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(47,'2026-01-26T20:00:00.000Z','2026-01-26T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(48,'2026-01-26T21:00:00.000Z','2026-01-26T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(49,'2026-01-27T00:00:00.000Z','2026-01-27T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(50,'2026-01-27T20:00:00.000Z','2026-01-27T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(51,'2026-01-27T21:00:00.000Z','2026-01-27T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(52,'2026-01-28T00:00:00.000Z','2026-01-28T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(53,'2026-01-28T01:00:00.000Z','2026-01-28T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(54,'2026-01-28T07:00:00.000Z','2026-01-28T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(55,'2026-01-28T20:00:00.000Z','2026-01-28T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(56,'2026-01-29T20:00:00.000Z','2026-01-29T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(57,'2026-01-29T21:00:00.000Z','2026-01-29T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(58,'2026-01-30T00:00:00.000Z','2026-01-30T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(59,'2026-01-30T01:00:00.000Z','2026-01-30T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(60,'2026-01-30T07:00:00.000Z','2026-01-30T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(61,'2026-01-30T08:00:00.000Z','2026-01-30T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(62,'2026-01-30T20:00:00.000Z','2026-01-30T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(63,'2026-01-30T21:00:00.000Z','2026-01-30T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(64,'2026-01-31T00:00:00.000Z','2026-01-31T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(65,'2026-01-31T01:00:00.000Z','2026-01-31T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(66,'2026-01-31T07:00:00.000Z','2026-01-31T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(67,'2026-01-31T08:00:00.000Z','2026-01-31T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(68,'2026-01-31T20:00:00.000Z','2026-01-31T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(69,'2026-01-31T21:00:00.000Z','2026-01-31T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(70,'2026-02-01T00:00:00.000Z','2026-02-01T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(71,'2026-02-01T04:00:00.000Z','2026-02-01T03:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(72,'2026-02-01T07:00:00.000Z','2026-02-01T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(73,'2026-02-01T08:00:00.000Z','2026-02-01T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(74,'2026-02-01T20:00:00.000Z','2026-02-01T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(75,'2026-02-01T21:00:00.000Z','2026-02-01T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(76,'2026-02-02T00:00:00.000Z','2026-02-02T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(77,'2026-02-02T01:00:00.000Z','2026-02-02T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(78,'2026-02-02T04:00:00.000Z','2026-02-02T04:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(79,'2026-02-02T07:00:00.000Z','2026-02-02T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(80,'2026-02-02T08:00:00.000Z','2026-02-02T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(81,'2026-02-02T20:00:00.000Z','2026-02-02T20:00:00.000Z',1,NULL,0,'[5,7,8,10]',0); +INSERT INTO delivery_slot_info VALUES(82,'2026-02-02T21:00:00.000Z','2026-02-02T21:00:00.000Z',1,NULL,0,'[5,7,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(83,'2026-02-03T00:00:00.000Z','2026-02-03T00:00:00.000Z',1,NULL,0,'[5,7,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(84,'2026-02-03T01:00:00.000Z','2026-02-03T01:00:00.000Z',1,NULL,0,'[8,7,5,10,9]',0); +INSERT INTO delivery_slot_info VALUES(85,'2026-02-03T07:00:00.000Z','2026-02-03T07:00:00.000Z',1,NULL,0,'[8,5,10]',0); +INSERT INTO delivery_slot_info VALUES(86,'2026-02-03T08:00:00.000Z','2026-02-03T08:00:00.000Z',1,NULL,0,'[8,5,10]',0); +INSERT INTO delivery_slot_info VALUES(87,'2026-02-03T04:00:00.000Z','2026-02-03T04:00:00.000Z',1,NULL,0,'[5,7,8,10]',0); +INSERT INTO delivery_slot_info VALUES(88,'2026-02-03T20:00:00.000Z','2026-02-03T20:00:00.000Z',1,NULL,0,'[10,8,5,7]',0); +INSERT INTO delivery_slot_info VALUES(89,'2026-02-03T21:00:00.000Z','2026-02-03T21:00:00.000Z',1,NULL,0,'[8,5,10]',0); +INSERT INTO delivery_slot_info VALUES(90,'2026-02-04T00:00:00.000Z','2026-02-04T00:00:00.000Z',1,NULL,0,'[8,5,10,7,9]',0); +INSERT INTO delivery_slot_info VALUES(91,'2026-02-04T01:00:00.000Z','2026-02-04T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5]',0); +INSERT INTO delivery_slot_info VALUES(92,'2026-02-04T04:00:00.000Z','2026-02-04T04:00:00.000Z',1,NULL,0,'[5,8,10]',0); +INSERT INTO delivery_slot_info VALUES(93,'2026-02-04T07:00:00.000Z','2026-02-04T07:00:00.000Z',1,NULL,0,'[10,8,5]',0); +INSERT INTO delivery_slot_info VALUES(94,'2026-02-04T08:00:00.000Z','2026-02-04T08:00:00.000Z',1,NULL,0,'[10,8,5]',0); +INSERT INTO delivery_slot_info VALUES(95,'2026-02-04T20:00:00.000Z','2026-02-04T19:45:00.000Z',1,NULL,0,'[10,8,5,7]',0); +INSERT INTO delivery_slot_info VALUES(96,'2026-02-04T21:00:00.000Z','2026-02-04T20:45:00.000Z',1,NULL,0,'[8,5,10]',0); +INSERT INTO delivery_slot_info VALUES(97,'2026-02-05T00:00:00.000Z','2026-02-04T23:45:00.000Z',1,NULL,0,'[8,5,10,7,9]',0); +INSERT INTO delivery_slot_info VALUES(98,'2026-02-05T01:00:00.000Z','2026-02-05T00:45:00.000Z',1,NULL,0,'[10,9,8,7,5]',0); +INSERT INTO delivery_slot_info VALUES(99,'2026-02-05T04:00:00.000Z','2026-02-05T03:45:00.000Z',1,NULL,0,'[5,8,10]',0); +INSERT INTO delivery_slot_info VALUES(100,'2026-02-05T07:00:00.000Z','2026-02-05T06:45:00.000Z',1,NULL,0,'[10,8,5]',0); +INSERT INTO delivery_slot_info VALUES(101,'2026-02-05T20:00:00.000Z','2026-02-05T20:00:00.000Z',1,NULL,0,'[8,7,5]',0); +INSERT INTO delivery_slot_info VALUES(102,'2026-02-05T21:00:00.000Z','2026-02-05T21:00:00.000Z',1,NULL,0,'[8,7,5,9,10,3]',0); +INSERT INTO delivery_slot_info VALUES(103,'2026-02-06T00:00:00.000Z','2026-02-06T00:00:00.000Z',1,NULL,0,'[8,7,5,9,10,3]',0); +INSERT INTO delivery_slot_info VALUES(104,'2026-02-06T01:00:00.000Z','2026-02-06T01:00:00.000Z',1,NULL,0,'[8,7,5,9,10,3]',0); +INSERT INTO delivery_slot_info VALUES(105,'2026-02-06T04:00:00.000Z','2026-02-06T04:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(106,'2026-02-06T07:00:00.000Z','2026-02-06T07:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(107,'2026-02-05T20:00:00.000Z','2026-02-05T20:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(108,'2026-02-06T08:00:00.000Z','2026-02-06T08:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(109,'2026-02-06T20:00:00.000Z','2026-02-06T20:00:00.000Z',1,NULL,0,'[8,5,10,3,7]',0); +INSERT INTO delivery_slot_info VALUES(110,'2026-02-06T21:00:00.000Z','2026-02-06T21:00:00.000Z',1,NULL,0,'[8,5,10,3,7,9]',0); +INSERT INTO delivery_slot_info VALUES(111,'2026-02-07T00:00:00.000Z','2026-02-07T00:00:00.000Z',1,NULL,0,'[8,5,10,3,7,9]',0); +INSERT INTO delivery_slot_info VALUES(112,'2026-02-07T01:00:00.000Z','2026-02-07T01:00:00.000Z',1,NULL,0,'[8,5,10,3,7,9]',0); +INSERT INTO delivery_slot_info VALUES(113,'2026-02-07T04:00:00.000Z','2026-02-07T04:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(114,'2026-02-07T07:00:00.000Z','2026-02-07T07:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(115,'2026-02-07T08:00:00.000Z','2026-02-07T08:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(116,'2026-02-07T20:00:00.000Z','2026-02-07T20:00:00.000Z',1,NULL,0,'[9,8,7,5]',0); +INSERT INTO delivery_slot_info VALUES(117,'2026-02-07T21:00:00.000Z','2026-02-07T21:00:00.000Z',1,NULL,0,'[3,5,7,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(118,'2026-02-08T00:00:00.000Z','2026-02-08T00:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(119,'2026-02-08T01:00:00.000Z','2026-02-08T01:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(120,'2026-02-08T04:00:00.000Z','2026-02-08T04:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(121,'2026-02-08T07:00:00.000Z','2026-02-08T07:00:00.000Z',1,NULL,0,'[10,8,5,3,9]',0); +INSERT INTO delivery_slot_info VALUES(122,'2026-02-08T08:00:00.000Z','2026-02-08T08:00:00.000Z',1,NULL,0,'[10,8,5,3,9]',0); +INSERT INTO delivery_slot_info VALUES(123,'2026-02-08T20:00:00.000Z','2026-02-08T20:00:00.000Z',1,NULL,0,'[9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(124,'2026-02-08T21:00:00.000Z','2026-02-08T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(125,'2026-02-09T00:00:00.000Z','2026-02-09T00:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(126,'2026-02-09T01:00:00.000Z','2026-02-09T01:00:00.000Z',1,NULL,0,'[9,8,7,5,3,10]',0); +INSERT INTO delivery_slot_info VALUES(127,'2026-02-09T04:00:00.000Z','2026-02-09T04:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(128,'2026-02-09T07:00:00.000Z','2026-02-09T07:00:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(129,'2026-02-09T08:00:00.000Z','2026-02-09T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(130,'2026-02-09T20:00:00.000Z','2026-02-09T20:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(131,'2026-02-09T21:00:00.000Z','2026-02-09T21:00:00.000Z',1,NULL,0,'[10,9,8,5,3,7]',0); +INSERT INTO delivery_slot_info VALUES(132,'2026-02-10T00:00:00.000Z','2026-02-10T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(133,'2026-02-10T01:00:00.000Z','2026-02-10T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(134,'2026-02-10T04:00:00.000Z','2026-02-10T04:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(135,'2026-02-10T07:00:00.000Z','2026-02-10T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(136,'2026-02-10T08:00:00.000Z','2026-02-10T08:00:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(137,'2026-02-10T20:00:00.000Z','2026-02-10T20:00:00.000Z',1,NULL,0,'[9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(138,'2026-02-10T21:00:00.000Z','2026-02-10T21:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(139,'2026-02-11T00:00:00.000Z','2026-02-11T00:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(140,'2026-02-11T01:00:00.000Z','2026-02-11T01:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(141,'2026-02-11T04:00:00.000Z','2026-02-11T04:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(142,'2026-02-11T07:00:00.000Z','2026-02-11T07:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(143,'2026-02-11T08:00:00.000Z','2026-02-11T08:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(144,'2026-02-11T20:00:00.000Z','2026-02-11T20:00:00.000Z',1,NULL,0,'[9,8,7,5]',0); +INSERT INTO delivery_slot_info VALUES(145,'2026-02-11T21:00:00.000Z','2026-02-11T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(146,'2026-02-12T00:00:00.000Z','2026-02-12T00:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(147,'2026-02-12T01:00:00.000Z','2026-02-12T00:45:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(148,'2026-02-12T20:00:00.000Z','2026-02-12T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(149,'2026-02-12T21:00:00.000Z','2026-02-12T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(150,'2026-02-13T00:00:00.000Z','2026-02-13T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(151,'2026-02-13T01:00:00.000Z','2026-02-13T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(152,'2026-02-13T04:00:00.000Z','2026-02-13T04:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(153,'2026-02-13T07:00:00.000Z','2026-02-13T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(154,'2026-02-13T08:00:00.000Z','2026-02-13T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(155,'2026-02-13T20:00:00.000Z','2026-02-13T20:00:00.000Z',1,NULL,0,'[10,9,8,5,3,7]',0); +INSERT INTO delivery_slot_info VALUES(156,'2026-02-13T21:00:00.000Z','2026-02-13T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(157,'2026-02-14T00:00:00.000Z','2026-02-14T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(158,'2026-02-14T01:00:00.000Z','2026-02-14T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(159,'2026-02-14T04:00:00.000Z','2026-02-14T04:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(160,'2026-02-14T07:00:00.000Z','2026-02-14T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(161,'2026-02-14T08:00:00.000Z','2026-02-14T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(162,'2026-02-14T20:00:00.000Z','2026-02-14T20:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(163,'2026-02-14T21:00:00.000Z','2026-02-14T21:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(164,'2026-02-15T00:00:00.000Z','2026-02-15T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(165,'2026-02-15T01:00:00.000Z','2026-02-15T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(166,'2026-02-15T04:00:00.000Z','2026-02-15T04:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(167,'2026-02-15T07:00:00.000Z','2026-02-15T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(168,'2026-02-15T08:00:00.000Z','2026-02-15T08:00:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(169,'2026-02-15T20:00:00.000Z','2026-02-15T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(170,'2026-02-15T21:00:00.000Z','2026-02-15T21:00:00.000Z',1,NULL,0,'[10,8,9,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(171,'2026-02-16T00:00:00.000Z','2026-02-16T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(172,'2026-02-16T01:00:00.000Z','2026-02-16T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(173,'2026-02-16T04:30:00.000Z','2026-02-16T04:30:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(174,'2026-02-16T07:00:00.000Z','2026-02-16T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(175,'2026-02-16T08:00:00.000Z','2026-02-16T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(176,'2026-02-16T20:00:00.000Z','2026-02-16T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(177,'2026-02-16T21:00:00.000Z','2026-02-16T20:45:00.000Z',1,NULL,0,'[10,8,9,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(178,'2026-02-17T00:00:00.000Z','2026-02-16T23:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(179,'2026-02-17T01:00:00.000Z','2026-02-17T00:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(180,'2026-02-17T04:30:00.000Z','2026-02-17T04:15:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(181,'2026-02-17T07:00:00.000Z','2026-02-17T07:00:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(182,'2026-02-17T08:00:00.000Z','2026-02-17T08:00:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(183,'2026-02-17T20:00:00.000Z','2026-02-17T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(184,'2026-02-17T21:00:00.000Z','2026-02-17T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(185,'2026-02-18T00:00:00.000Z','2026-02-18T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(186,'2026-02-18T01:00:00.000Z','2026-02-18T01:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(187,'2026-02-18T04:00:00.000Z','2026-02-18T04:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(188,'2026-02-18T07:00:00.000Z','2026-02-18T07:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(189,'2026-02-18T08:00:00.000Z','2026-02-18T08:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(190,'2026-02-18T20:00:00.000Z','2026-02-18T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(191,'2026-02-18T21:00:00.000Z','2026-02-18T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(192,'2026-02-19T00:00:00.000Z','2026-02-19T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(193,'2026-02-19T21:00:00.000Z','2026-02-19T21:00:00.000Z',1,NULL,0,'[3,5,8,7,9,10]',0); +INSERT INTO delivery_slot_info VALUES(194,'2026-02-19T04:00:00.000Z','2026-02-19T04:00:00.000Z',1,NULL,0,'[3,5,8,7,9,10]',0); +INSERT INTO delivery_slot_info VALUES(195,'2026-02-19T07:00:00.000Z','2026-02-19T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(196,'2026-02-19T08:00:00.000Z','2026-02-19T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(197,'2026-02-19T06:00:00.000Z','2026-02-19T06:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(198,'2026-02-18T20:00:00.000Z','2026-02-18T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(199,'2026-02-18T21:00:00.000Z','2026-02-18T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(200,'2026-02-19T20:00:00.000Z','2026-02-19T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(201,'2026-02-19T21:00:00.000Z','2026-02-19T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(202,'2026-02-20T00:00:00.000Z','2026-02-20T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(203,'2026-02-20T01:00:00.000Z','2026-02-20T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(204,'2026-02-20T04:00:00.000Z','2026-02-20T04:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(205,'2026-02-19T20:00:00.000Z','2026-02-19T20:00:00.000Z',1,NULL,0,'[3,5,8,7,9,10]',0); +INSERT INTO delivery_slot_info VALUES(206,'2026-02-20T08:00:00.000Z','2026-02-20T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(207,'2026-02-20T05:00:00.000Z','2026-02-20T05:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(208,'2026-02-20T20:00:00.000Z','2026-02-20T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(209,'2026-02-20T21:00:00.000Z','2026-02-20T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(210,'2026-02-21T00:00:00.000Z','2026-02-21T00:00:00.000Z',1,NULL,0,'[3,5,8,7,9,10]',0); +INSERT INTO delivery_slot_info VALUES(211,'2026-02-21T01:00:00.000Z','2026-02-21T00:45:00.000Z',1,NULL,0,'[3,5,8,7,9,10]',0); +INSERT INTO delivery_slot_info VALUES(212,'2026-02-21T04:00:00.000Z','2026-02-21T03:45:00.000Z',1,NULL,0,'[3,5,8,9,10]',0); +INSERT INTO delivery_slot_info VALUES(213,'2026-02-21T05:00:00.000Z','2026-02-21T04:45:00.000Z',1,NULL,0,'[3,5,8,9,10]',0); +INSERT INTO delivery_slot_info VALUES(214,'2026-02-21T08:00:00.000Z','2026-02-21T07:45:00.000Z',1,NULL,0,'[3,5,8,9,10]',0); +INSERT INTO delivery_slot_info VALUES(215,'2026-02-21T06:30:00.000Z','2026-02-21T06:30:00.000Z',1,NULL,0,'[3,5,8,9,10]',0); +INSERT INTO delivery_slot_info VALUES(216,'2026-02-21T20:00:00.000Z','2026-02-21T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(217,'2026-02-21T21:00:00.000Z','2026-02-21T20:45:00.000Z',1,NULL,0,'[10,9,8,5,7,3]',0); +INSERT INTO delivery_slot_info VALUES(218,'2026-02-22T00:00:00.000Z','2026-02-21T23:44:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(219,'2026-02-22T01:00:00.000Z','2026-02-22T00:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(220,'2026-02-22T04:00:00.000Z','2026-02-22T03:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(221,'2026-02-22T05:00:00.000Z','2026-02-22T04:45:00.000Z',1,NULL,0,'[3,5,8,9,10]',0); +INSERT INTO delivery_slot_info VALUES(222,'2026-02-22T08:00:00.000Z','2026-02-22T07:45:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(223,'2026-02-22T20:00:00.000Z','2026-02-22T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(224,'2026-02-22T21:00:00.000Z','2026-02-22T20:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(225,'2026-02-23T00:00:00.000Z','2026-02-22T23:44:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(226,'2026-02-23T01:00:00.000Z','2026-02-23T00:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(227,'2026-02-23T04:00:00.000Z','2026-02-23T03:45:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(228,'2026-02-23T05:00:00.000Z','2026-02-23T04:45:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(229,'2026-02-23T08:00:00.000Z','2026-02-23T07:45:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(230,'2026-02-23T20:00:00.000Z','2026-02-23T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(231,'2026-02-23T21:00:00.000Z','2026-02-23T20:45:00.000Z',1,NULL,0,'[5,7,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(232,'2026-02-24T00:00:00.000Z','2026-02-23T23:50:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(233,'2026-02-24T05:00:00.000Z','2026-02-24T04:50:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(234,'2026-02-24T01:00:00.000Z','2026-02-24T00:50:00.000Z',1,NULL,0,'[10,8,9,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(235,'2026-02-24T04:00:00.000Z','2026-02-24T03:50:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(236,'2026-02-24T08:00:00.000Z','2026-02-24T07:50:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(237,'2026-02-24T20:00:00.000Z','2026-02-24T19:50:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(238,'2026-02-24T21:00:00.000Z','2026-02-25T08:50:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(239,'2026-02-25T00:00:00.000Z','2026-02-25T00:50:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(240,'2026-02-25T01:00:00.000Z','2026-02-25T00:50:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(241,'2026-02-25T04:00:00.000Z','2026-02-25T03:50:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(242,'2026-02-25T05:00:00.000Z','2026-02-25T04:50:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(243,'2026-02-25T08:00:00.000Z','2026-02-25T07:50:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(244,'2026-02-24T05:00:00.000Z','2026-02-24T04:50:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(274,'2026-03-04T20:00:00.000Z','2026-03-04T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(275,'2026-03-08T02:04:00.000Z','2026-03-08T02:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(276,'2026-03-08T04:59:17.000Z','2026-03-08T04:44:17.000Z',1,NULL,0,'[]',0); +INSERT INTO delivery_slot_info VALUES(277,'2026-03-08T05:27:40.000Z','2026-03-08T05:12:40.000Z',1,NULL,0,'[7]',0); +INSERT INTO delivery_slot_info VALUES(278,'2026-03-08T06:38:16.000Z','2026-03-08T06:23:16.000Z',1,NULL,0,'[7]',0); +INSERT INTO delivery_slot_info VALUES(279,'2026-03-10T10:00:00.000Z','2026-03-10T08:00:00.000Z',1,NULL,0,'[7,8,9,10,5,3,2,1]',0); +INSERT INTO delivery_slot_info VALUES(280,'2026-03-13T09:00:00.000Z','2026-03-13T08:30:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(281,'2026-03-15T08:00:00.000Z','2026-03-15T07:30:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(282,'2026-03-15T21:00:00.000Z','2026-03-15T20:50:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(283,'2026-03-20T20:00:00.000Z','2026-03-20T19:50:00.000Z',1,NULL,0,'[9,10,8]',0); +INSERT INTO delivery_slot_info VALUES(284,'2026-03-22T08:00:00.000Z','2026-03-22T07:45:00.000Z',1,NULL,0,'[9,10,8]',0); +INSERT INTO delivery_slot_info VALUES(285,'2026-03-23T07:00:00.000Z','2026-03-23T06:28:00.000Z',1,NULL,0,'[9,10,8]',0); +INSERT INTO delivery_slot_info VALUES(286,'2026-03-27T01:00:00.000Z','2026-03-27T00:04:00.000Z',1,NULL,0,'[9,10,8]',0); +INSERT INTO delivery_slot_info VALUES(287,'2026-03-27T06:02:00.000Z','2026-03-27T05:54:00.000Z',1,NULL,0,'[9,10,8]',0); +CREATE TABLE IF NOT EXISTS "home_banners" ("id" INTEGER PRIMARY KEY, "name" TEXT NOT NULL, "image_url" TEXT NOT NULL, "description" TEXT, "redirect_url" TEXT, "serial_num" INTEGER, "is_active" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "last_updated" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "product_ids" TEXT); +INSERT INTO home_banners VALUES(9,'10%off ','store-images/1770281046297.jpg',NULL,NULL,1,0,'2026-02-05T03:14:06.996Z','2026-02-05T03:14:40.930Z','[]'); +INSERT INTO home_banners VALUES(11,'Daily veggies ','store-images/1770429593455.jpg','Under 19 ',NULL,2,0,'2026-02-06T20:29:57.566Z','2026-02-06T20:30:39.410Z','[45,72,76,97,70,32,74,77,33]'); +INSERT INTO home_banners VALUES(44,'Demo2','store-images/1774018257330.jpg','Demo to test image upload',NULL,999,0,'2026-03-20T09:20:59.008Z','2026-03-20T09:20:59.008Z','[33]'); +INSERT INTO home_banners VALUES(45,'Demo4','store-images/1774104855151.jpg','Ferocious',NULL,999,0,'2026-03-21T09:24:17.745Z','2026-03-21T09:24:17.745Z','[]'); +INSERT INTO home_banners VALUES(46,'Tests banner','store-images/1774365560714.jpg','Testing things again',NULL,999,0,'2026-03-24T09:49:25.241Z','2026-03-24T09:49:25.241Z','[]'); +CREATE TABLE IF NOT EXISTS "key_val_store" ("key" TEXT, "value" TEXT); +INSERT INTO key_val_store VALUES('allItemsOrder','[10,57,99,75,33,90,51,27,6,35,67,97,58,29,65,77,79,5,19,20,14,82,25,56,66,16,83,91,64,36,22,11,1,76,43,94,93,17,47,87,81,50,2,44,59,45,38,85,42,13,55,95,37,34,31,28,18,60,9,84,61,80,7,68,49,69,23,53,4,52,98,63,73,21,78,24,8,74,46,89,40,88,100,72,96,41,86,70,92,26,54,71,48,15,32,62,39,12,3,30]'); +INSERT INTO key_val_store VALUES('androidVersion','1.2.0'); +INSERT INTO key_val_store VALUES('appStoreUrl','https://info.freshyo.in/qr-based-download'); +INSERT INTO key_val_store VALUES('deliveryCharge','12.0'); +INSERT INTO key_val_store VALUES('flashDeliveryCharge','45.0'); +INSERT INTO key_val_store VALUES('flashFreeDeliveryThreshold','500.0'); +INSERT INTO key_val_store VALUES('freeDeliveryThreshold','180.0'); +INSERT INTO key_val_store VALUES('iosVersion','1.2.0'); +INSERT INTO key_val_store VALUES('isFlashDeliveryEnabled','1.0'); +INSERT INTO key_val_store VALUES('minRegularOrderValue','180.0'); +INSERT INTO key_val_store VALUES('playStoreUrl','https://info.freshyo.in/qr-based-download'); +INSERT INTO key_val_store VALUES('popularItems','[23,9,75,98,6,24,59]'); +INSERT INTO key_val_store VALUES('readableOrderId','160.0'); +INSERT INTO key_val_store VALUES('supportEmail','qushammohd@gmail.com'); +INSERT INTO key_val_store VALUES('supportMobile','9000885620.0'); +INSERT INTO key_val_store VALUES('tester','value41'); +INSERT INTO key_val_store VALUES('versionNum','1.2.0'); +CREATE TABLE IF NOT EXISTS "notif_creds" ("id" INTEGER PRIMARY KEY, "token" TEXT NOT NULL, "added_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "user_id" INTEGER NOT NULL, "last_verified" TEXT); +INSERT INTO notif_creds VALUES(3,'ExponentPushToken[iv6POIJTUIiGpkElL84fG7]','2026-02-07T11:16:24.831Z',7,'2026-02-24T00:15:43.239Z'); +INSERT INTO notif_creds VALUES(5,'ExponentPushToken[HnHTZNKG8TO0uuxIEus-PG]','2026-02-07T22:03:08.347Z',91,'2026-02-07T22:03:13.416Z'); +INSERT INTO notif_creds VALUES(6,'ExponentPushToken[UHMotrBnf-vEcprdmbwgIZ]','2026-02-07T23:41:11.318Z',98,'2026-02-08T00:48:44.187Z'); +INSERT INTO notif_creds VALUES(7,'ExponentPushToken[5lelv4B74He5Nhvhsar6bz]','2026-02-08T00:39:52.317Z',121,'2026-02-08T00:42:39.299Z'); +INSERT INTO notif_creds VALUES(8,'ExponentPushToken[v9sccYJj1ubyT6IIQxbvnI]','2026-02-08T01:20:56.512Z',121,'2026-02-08T04:34:48.600Z'); +INSERT INTO notif_creds VALUES(9,'ExponentPushToken[Gzd1aWPU7x-2s4MHC66HgW]','2026-02-08T02:59:16.517Z',21,'2026-02-09T02:55:46.044Z'); +INSERT INTO notif_creds VALUES(10,'ExponentPushToken[qDmbx7D1wEHMyxdeTQj70d]','2026-02-08T04:32:21.955Z',122,'2026-02-08T04:32:21.954Z'); +INSERT INTO notif_creds VALUES(11,'ExponentPushToken[Tsdy4SCnFIXCEU3c2rWW2f]','2026-02-08T04:50:08.729Z',12,'2026-02-14T00:57:01.965Z'); +INSERT INTO notif_creds VALUES(12,'ExponentPushToken[TEbTuZC7F2E9OJTzFHNeoa]','2026-02-08T08:30:08.387Z',2,'2026-02-10T09:45:05.213Z'); +INSERT INTO notif_creds VALUES(14,'ExponentPushToken[RZKHsOC-WpryYm3Q50I86K]','2026-02-08T11:35:05.556Z',39,'2026-02-15T01:04:02.876Z'); +INSERT INTO notif_creds VALUES(15,'ExponentPushToken[VISDPrNjHVUy58fOF4jDWM]','2026-02-08T13:18:22.587Z',1,'2026-02-25T03:03:24.766Z'); +INSERT INTO notif_creds VALUES(16,'ExponentPushToken[w4KTsLKnnp8SbURdl5-Q6x]','2026-02-08T23:42:12.594Z',22,'2026-02-08T23:42:15.073Z'); +INSERT INTO notif_creds VALUES(17,'ExponentPushToken[CvSnNAF6ZN9qCVAsEH21kv]','2026-02-09T03:27:37.036Z',65,'2026-02-16T09:52:41.038Z'); +INSERT INTO notif_creds VALUES(18,'ExponentPushToken[qjCI58EqTOeyVk5yLFHGRq]','2026-02-09T05:48:51.370Z',123,'2026-02-09T05:48:51.369Z'); +INSERT INTO notif_creds VALUES(19,'ExponentPushToken[mZo3TECtB4tDVgxkDOwev6]','2026-02-09T06:32:26.730Z',124,'2026-02-15T05:21:29.871Z'); +INSERT INTO notif_creds VALUES(20,'ExponentPushToken[l527a0C4KT5Ez8aJL7K76l]','2026-02-09T06:40:39.831Z',107,'2026-02-09T06:40:43.875Z'); +INSERT INTO notif_creds VALUES(21,'ExponentPushToken[WxQDABD09Hd7JBURDocB67]','2026-02-09T07:54:12.209Z',125,'2026-02-11T13:07:59.678Z'); +INSERT INTO notif_creds VALUES(22,'ExponentPushToken[81Io9TG3Qg0s3N0V8L86T-]','2026-02-09T08:42:50.649Z',4,'2026-02-23T03:15:48.191Z'); +INSERT INTO notif_creds VALUES(23,'ExponentPushToken[buJyUUCfCpMmsiXqb1--T4]','2026-02-09T10:27:32.198Z',38,'2026-02-25T00:37:28.465Z'); +INSERT INTO notif_creds VALUES(24,'ExponentPushToken[B2zWnHNaumIgbeFFKO-15D]','2026-02-09T14:23:37.594Z',113,'2026-02-10T02:13:48.632Z'); +INSERT INTO notif_creds VALUES(25,'ExponentPushToken[wIhrdlAmwj0Eytvz3W3TTZ]','2026-02-10T05:39:24.848Z',127,'2026-02-11T10:41:39.340Z'); +INSERT INTO notif_creds VALUES(26,'ExponentPushToken[hFUlPFOKMdAUgtDP7EtSzM]','2026-02-10T06:03:43.821Z',3,'2026-02-24T05:46:46.799Z'); +INSERT INTO notif_creds VALUES(27,'ExponentPushToken[NymZTEED3G7YCyDg7ihgBA]','2026-02-10T21:46:04.540Z',2,'2026-02-25T02:12:27.021Z'); +INSERT INTO notif_creds VALUES(28,'ExponentPushToken[ARCT4KD7CJ_pFF_GkywepP]','2026-02-11T06:04:32.238Z',115,'2026-02-22T11:49:39.347Z'); +INSERT INTO notif_creds VALUES(29,'ExponentPushToken[NN4v16BFslBX8ryVXDwQIg]','2026-02-12T03:16:42.421Z',128,'2026-02-17T13:34:12.936Z'); +INSERT INTO notif_creds VALUES(30,'ExponentPushToken[qbteKBC1wbLMCe1ltpul7u]','2026-02-12T07:58:00.376Z',129,'2026-02-12T07:58:00.375Z'); +INSERT INTO notif_creds VALUES(31,'ExponentPushToken[PfjMc_CTRvSvOWtSNmaHhL]','2026-02-14T04:55:41.451Z',131,'2026-02-21T01:58:28.454Z'); +INSERT INTO notif_creds VALUES(32,'ExponentPushToken[dugZtvNyRBevvIcQED783-]','2026-02-14T13:12:44.549Z',120,'2026-02-21T22:33:17.004Z'); +INSERT INTO notif_creds VALUES(33,'ExponentPushToken[5AOIo1AxGkk5zpoVANRRxq]','2026-02-14T23:05:26.237Z',132,'2026-02-25T02:45:27.434Z'); +INSERT INTO notif_creds VALUES(34,'ExponentPushToken[1ZJ_ubPRINgtgfF4JcRz7Q]','2026-02-15T01:15:32.122Z',133,'2026-02-15T01:15:32.121Z'); +INSERT INTO notif_creds VALUES(35,'ExponentPushToken[pIQ2waNDjjSHjQYJbXKD8m]','2026-02-15T01:44:10.912Z',9,'2026-02-15T01:44:10.910Z'); +INSERT INTO notif_creds VALUES(36,'ExponentPushToken[93-_2gEHMwejR3miLX0RGU]','2026-02-15T22:24:33.307Z',1,'2026-03-26T05:56:10.685Z'); +INSERT INTO notif_creds VALUES(37,'ExponentPushToken[kq0I8ADfcQ4VcsZ0yK0Mlc]','2026-02-15T22:31:56.375Z',102,'2026-02-15T22:31:56.374Z'); +INSERT INTO notif_creds VALUES(38,'ExponentPushToken[8wH85rFtQRMk7ciFszmirX]','2026-02-16T04:00:32.930Z',134,'2026-02-22T01:32:06.467Z'); +INSERT INTO notif_creds VALUES(39,'ExponentPushToken[YJRSQmMUEUbaI2VCZLaoN_]','2026-02-16T04:19:56.439Z',6,'2026-02-22T05:05:18.294Z'); +INSERT INTO notif_creds VALUES(40,'ExponentPushToken[QoWbURL2N8-3jRhQwfnRP_]','2026-02-17T03:29:14.561Z',135,'2026-02-17T03:29:14.561Z'); +INSERT INTO notif_creds VALUES(41,'ExponentPushToken[sz_g75Il_CNAG6KpEAxYUH]','2026-02-17T07:26:33.589Z',136,'2026-02-21T03:12:45.220Z'); +INSERT INTO notif_creds VALUES(42,'ExponentPushToken[JMEvkUHKT0n34hcs-MiJAJ]','2026-02-17T08:52:02.805Z',137,'2026-02-17T13:05:14.821Z'); +INSERT INTO notif_creds VALUES(43,'ExponentPushToken[1msqBjJghAi4y8iYwJU-mS]','2026-02-17T09:06:43.131Z',138,'2026-02-23T02:25:49.796Z'); +INSERT INTO notif_creds VALUES(44,'ExponentPushToken[Wvc-xZKA5atNZTuIldtSIw]','2026-02-17T09:22:56.267Z',139,'2026-02-22T03:54:47.956Z'); +INSERT INTO notif_creds VALUES(45,'ExponentPushToken[cZOImkGKtoAxHQZgVtqP2K]','2026-02-17T13:47:10.364Z',140,'2026-02-20T04:17:44.482Z'); +INSERT INTO notif_creds VALUES(46,'ExponentPushToken[Z9RdieHVKXjshIx5Fde2N_]','2026-02-17T19:44:42.642Z',141,'2026-02-23T22:43:32.802Z'); +INSERT INTO notif_creds VALUES(47,'ExponentPushToken[y_gztJB3YIgxaTIe90h081]','2026-02-17T21:39:14.285Z',26,'2026-02-21T01:15:53.015Z'); +INSERT INTO notif_creds VALUES(48,'ExponentPushToken[PwdA7uENlBKK9zfX0IUQHX]','2026-02-17T22:23:25.609Z',142,'2026-02-17T22:28:05.274Z'); +INSERT INTO notif_creds VALUES(49,'ExponentPushToken[I9t84QIYuJ2wkBXTQCrWiO]','2026-02-17T22:54:14.079Z',143,'2026-02-20T01:53:38.305Z'); +INSERT INTO notif_creds VALUES(50,'ExponentPushToken[q6CpdyAjzrLcX5h-XyT2qd]','2026-02-18T00:19:05.701Z',119,'2026-02-18T01:54:00.101Z'); +INSERT INTO notif_creds VALUES(51,'ExponentPushToken[t9-luuLjLIZy__1AFGQne9]','2026-02-18T03:32:56.669Z',144,'2026-02-18T10:07:23.052Z'); +INSERT INTO notif_creds VALUES(52,'ExponentPushToken[LMwZ9hA618rm1SBbnSpLka]','2026-02-18T03:39:58.906Z',145,'2026-02-18T04:47:29.431Z'); +INSERT INTO notif_creds VALUES(53,'ExponentPushToken[Gb4KieGJIaPnwHmzTYtcMv]','2026-02-18T04:29:40.489Z',146,'2026-02-25T01:51:55.372Z'); +INSERT INTO notif_creds VALUES(54,'ExponentPushToken[B74UidJrvnrP8wBb_rHdAC]','2026-02-18T05:14:13.691Z',147,'2026-02-23T03:08:19.771Z'); +INSERT INTO notif_creds VALUES(55,'ExponentPushToken[x2VSb-OGOkn6ivVxpzk6tX]','2026-02-18T06:52:43.429Z',24,'2026-02-23T02:24:07.334Z'); +INSERT INTO notif_creds VALUES(56,'ExponentPushToken[qh6APjAuydb_LnlN4DqYsO]','2026-02-18T07:16:15.407Z',82,'2026-02-22T17:42:52.899Z'); +INSERT INTO notif_creds VALUES(57,'ExponentPushToken[2o572RMsmVSFjUamLuEcoU]','2026-02-18T07:29:53.266Z',148,'2026-02-20T06:08:25.014Z'); +INSERT INTO notif_creds VALUES(58,'ExponentPushToken[3kQdCMDTdTPoDMGP05IITB]','2026-02-18T09:09:16.947Z',149,'2026-02-24T07:04:44.462Z'); +INSERT INTO notif_creds VALUES(59,'ExponentPushToken[oHNDFzFcWPaMrr6UuCUaUd]','2026-02-18T09:11:42.373Z',150,'2026-02-19T04:45:17.727Z'); +INSERT INTO notif_creds VALUES(60,'ExponentPushToken[yjbwNxNUlwI3Gg2xmg_zEL]','2026-02-18T09:21:04.075Z',151,'2026-02-23T03:16:34.760Z'); +INSERT INTO notif_creds VALUES(61,'ExponentPushToken[WoLNBzF_Z7S79-otdUf4hA]','2026-02-18T10:43:23.031Z',152,'2026-02-18T10:47:26.759Z'); +INSERT INTO notif_creds VALUES(62,'ExponentPushToken[VBwbhYESzYkrYBaJNOr_Cd]','2026-02-18T13:29:45.807Z',153,'2026-02-24T13:08:44.803Z'); +INSERT INTO notif_creds VALUES(63,'ExponentPushToken[efBUNsNPuI9UiZMSyisyrS]','2026-02-18T23:28:22.392Z',154,'2026-02-18T23:28:55.761Z'); +INSERT INTO notif_creds VALUES(64,'ExponentPushToken[yoRlFwEZScYynd7F-b0EbZ]','2026-02-18T23:41:30.251Z',155,'2026-02-23T09:36:00.904Z'); +INSERT INTO notif_creds VALUES(65,'ExponentPushToken[QYu6kOP5XdkvJoa8BrF94D]','2026-02-18T23:57:33.153Z',156,'2026-02-23T06:19:11.964Z'); +INSERT INTO notif_creds VALUES(66,'ExponentPushToken[XB2QNBIw79ZsuLKMvoC75T]','2026-02-19T01:01:38.648Z',99,'2026-02-24T08:37:14.569Z'); +INSERT INTO notif_creds VALUES(67,'ExponentPushToken[JR8jlxCcjA6zSt1sIsEaFs]','2026-02-19T01:25:18.880Z',157,'2026-02-19T01:28:03.367Z'); +INSERT INTO notif_creds VALUES(68,'ExponentPushToken[yF2OgLNRsS-YpjLTkltwb7]','2026-02-19T01:44:36.670Z',158,'2026-02-24T05:24:44.962Z'); +INSERT INTO notif_creds VALUES(69,'ExponentPushToken[x4igFdIV9grI1HW3WI-4pI]','2026-02-19T02:15:42.349Z',66,'2026-02-25T02:57:31.607Z'); +INSERT INTO notif_creds VALUES(70,'ExponentPushToken[UrQXC8Eln55JuaZPjM9Ui-]','2026-02-19T02:26:27.728Z',118,'2026-02-19T02:26:27.727Z'); +INSERT INTO notif_creds VALUES(71,'ExponentPushToken[V3hUgLCihO9nsDNBx0uPA6]','2026-02-19T03:38:53.530Z',159,'2026-02-19T05:45:13.240Z'); +INSERT INTO notif_creds VALUES(72,'ExponentPushToken[ivyzcdINsQ3zwCkjlvbAv6]','2026-02-19T03:46:26.528Z',160,'2026-02-23T00:16:28.336Z'); +INSERT INTO notif_creds VALUES(73,'ExponentPushToken[UBKsoGEwMZLkm4B3wUtx5S]','2026-02-19T03:53:26.723Z',64,'2026-02-21T02:22:49.103Z'); +INSERT INTO notif_creds VALUES(74,'ExponentPushToken[8DeRubBDyrcnTSLEd0eYje]','2026-02-19T04:25:24.491Z',161,'2026-02-22T04:34:09.916Z'); +INSERT INTO notif_creds VALUES(76,'ExponentPushToken[AYJ8CwAMYzVS9VIFLdgWZw]','2026-02-19T05:06:22.547Z',162,'2026-02-19T05:09:49.327Z'); +INSERT INTO notif_creds VALUES(77,'ExponentPushToken[tgDCJ1Ht7X4xhJgvosny0I]','2026-02-19T06:46:50.611Z',163,'2026-02-23T01:08:20.953Z'); +INSERT INTO notif_creds VALUES(78,'ExponentPushToken[3ytgOdB6DwYeWZEbsYrcPT]','2026-02-19T07:01:01.329Z',164,'2026-02-19T07:01:01.328Z'); +INSERT INTO notif_creds VALUES(79,'ExponentPushToken[jYpwSQIh9pvCLtSH0WYq5F]','2026-02-19T10:26:49.976Z',165,'2026-02-22T04:41:48.209Z'); +INSERT INTO notif_creds VALUES(80,'ExponentPushToken[dcm7FmItp3TsKicDlHnkc2]','2026-02-19T12:05:06.988Z',166,'2026-02-19T12:05:06.987Z'); +INSERT INTO notif_creds VALUES(83,'ExponentPushToken[4AaCLjFOFe00dA_VppqThU]','2026-02-20T03:19:35.125Z',167,'2026-02-23T07:58:42.730Z'); +INSERT INTO notif_creds VALUES(84,'ExponentPushToken[58ID1kBjfcym3CJINcQD1b]','2026-02-20T03:35:57.056Z',169,'2026-02-20T11:05:08.705Z'); +INSERT INTO notif_creds VALUES(85,'ExponentPushToken[1BrdooOKzJj_P5fDkR3VWJ]','2026-02-20T03:53:54.652Z',170,'2026-02-24T04:56:33.324Z'); +INSERT INTO notif_creds VALUES(86,'ExponentPushToken[j1wJcqI6zGjw3c5oI-Dx9x]','2026-02-20T04:00:53.707Z',172,'2026-02-20T05:14:51.085Z'); +INSERT INTO notif_creds VALUES(89,'ExponentPushToken[6y3qNeJGgyakoSunKhEJT-]','2026-02-20T04:08:13.997Z',173,'2026-02-21T02:20:17.087Z'); +INSERT INTO notif_creds VALUES(93,'ExponentPushToken[T7gjPaDVOJQtJ5anemtNYZ]','2026-02-20T05:29:10.123Z',174,'2026-02-21T11:21:22.446Z'); +INSERT INTO notif_creds VALUES(94,'ExponentPushToken[bSn2s-AWE2bPZFmNbR3wBr]','2026-02-20T05:49:58.947Z',175,'2026-02-23T11:23:09.680Z'); +INSERT INTO notif_creds VALUES(95,'ExponentPushToken[nP7cTjChjAdo68V5rXbjX2]','2026-02-20T05:59:42.482Z',176,'2026-02-20T08:05:40.295Z'); +INSERT INTO notif_creds VALUES(96,'ExponentPushToken[7mwTBgFGWCsZ5bQW2Xn-8j]','2026-02-20T06:50:35.197Z',177,'2026-02-20T09:32:51.775Z'); +INSERT INTO notif_creds VALUES(97,'ExponentPushToken[Y1nFTyC4zbqVCw38UPwEh1]','2026-02-20T07:20:34.337Z',74,'2026-02-21T08:16:21.124Z'); +INSERT INTO notif_creds VALUES(98,'ExponentPushToken[SiFDTqAbkzt6Gqhy7CDvup]','2026-02-20T08:36:23.058Z',178,'2026-02-21T20:53:16.045Z'); +INSERT INTO notif_creds VALUES(99,'ExponentPushToken[a140_7HNF0K2YvX7h4ARWx]','2026-02-20T10:08:25.067Z',179,'2026-02-20T10:08:25.066Z'); +INSERT INTO notif_creds VALUES(100,'ExponentPushToken[2ZZr7mF_h2lch2VVqcFCLs]','2026-02-20T10:57:04.669Z',180,'2026-02-20T10:57:18.409Z'); +INSERT INTO notif_creds VALUES(101,'ExponentPushToken[6l-WlJL-dUG2BixclCkzSa]','2026-02-20T13:32:52.357Z',181,'2026-02-21T10:23:21.219Z'); +INSERT INTO notif_creds VALUES(102,'ExponentPushToken[GWm8_aOevnr5ec38AN858s]','2026-02-20T17:13:24.944Z',182,'2026-02-20T17:13:24.942Z'); +INSERT INTO notif_creds VALUES(103,'ExponentPushToken[IfWmkbPqhvki2Ddpx20WN5]','2026-02-20T18:20:19.602Z',183,'2026-02-20T18:20:19.601Z'); +INSERT INTO notif_creds VALUES(106,'ExponentPushToken[DPeHKsBNbTJ74b4C69d_1e]','2026-02-20T22:45:31.155Z',184,'2026-02-24T05:12:12.438Z'); +INSERT INTO notif_creds VALUES(107,'ExponentPushToken[4mdT-7ILy1RkxkKGHVeFih]','2026-02-21T02:47:55.879Z',185,'2026-02-21T02:48:55.139Z'); +INSERT INTO notif_creds VALUES(108,'ExponentPushToken[OYJNU2Hl_BHC8vNmnh5nIa]','2026-02-21T03:35:03.666Z',186,'2026-02-21T18:26:53.165Z'); +INSERT INTO notif_creds VALUES(110,'ExponentPushToken[2KeIQoIW7_xfYnmYKLjIxX]','2026-02-21T07:16:33.392Z',188,'2026-02-21T07:16:33.391Z'); +INSERT INTO notif_creds VALUES(112,'ExponentPushToken[-o5CHgOgd7yq4gBoUKQdhA]','2026-02-21T13:01:23.842Z',189,'2026-02-21T13:04:47.429Z'); +INSERT INTO notif_creds VALUES(113,'ExponentPushToken[QC4khLHZvU0B2xDfMuLxrr]','2026-02-21T13:29:03.311Z',190,'2026-02-24T07:23:45.452Z'); +INSERT INTO notif_creds VALUES(115,'ExponentPushToken[7xOFPzKtSr9Q3QjuGP_1RY]','2026-02-21T17:55:28.063Z',191,'2026-02-23T05:05:54.186Z'); +INSERT INTO notif_creds VALUES(117,'ExponentPushToken[FQkh_ZP1lkQyiNnxXEqr4E]','2026-02-22T00:12:36.263Z',194,'2026-02-25T02:28:06.068Z'); +INSERT INTO notif_creds VALUES(118,'ExponentPushToken[FCF4nPGQZlVobJpYtPMA1V]','2026-02-22T00:57:19.376Z',195,'2026-02-22T00:57:19.375Z'); +INSERT INTO notif_creds VALUES(119,'ExponentPushToken[IwM94nPyLTuoLgc-dgwPTq]','2026-02-22T00:58:28.876Z',196,'2026-02-22T01:49:01.069Z'); +INSERT INTO notif_creds VALUES(120,'ExponentPushToken[jIY_4pLTlau3wASP_0TYDq]','2026-02-22T01:05:29.613Z',197,'2026-02-22T02:22:29.991Z'); +INSERT INTO notif_creds VALUES(121,'ExponentPushToken[HaF3clPj70n8AdWkidFnJY]','2026-02-22T01:07:17.891Z',198,'2026-02-22T04:30:02.306Z'); +INSERT INTO notif_creds VALUES(122,'ExponentPushToken[dqK4JpEi2SUuPBPRqDHGTE]','2026-02-22T01:14:27.496Z',199,'2026-02-24T23:33:42.767Z'); +INSERT INTO notif_creds VALUES(123,'ExponentPushToken[gJFheJE7Ie9y42gYqTz0cv]','2026-02-22T02:01:38.770Z',200,'2026-02-22T02:01:38.769Z'); +INSERT INTO notif_creds VALUES(124,'ExponentPushToken[Z07jHhEkYiW820OA8-mYma]','2026-02-22T02:01:45.615Z',201,'2026-02-22T02:01:45.614Z'); +INSERT INTO notif_creds VALUES(125,'ExponentPushToken[I4TLMrA8fhjU4YDnC9ssrj]','2026-02-22T02:17:38.253Z',202,'2026-02-22T02:17:38.252Z'); +INSERT INTO notif_creds VALUES(126,'ExponentPushToken[zOk8M4FBYHztnQIxr7ZhzY]','2026-02-22T03:02:38.558Z',203,'2026-02-22T03:02:38.558Z'); +INSERT INTO notif_creds VALUES(127,'ExponentPushToken[H94IyWDEhTwZiV_PsomZ86]','2026-02-22T03:19:56.829Z',204,'2026-02-22T07:59:51.430Z'); +INSERT INTO notif_creds VALUES(128,'ExponentPushToken[700fYUMqIA-ft5HcmU1tmR]','2026-02-22T03:22:47.498Z',205,'2026-02-22T03:53:07.395Z'); +INSERT INTO notif_creds VALUES(129,'ExponentPushToken[1Mq1TLEfmyCHBvCoTdYzlA]','2026-02-22T04:20:20.012Z',206,'2026-02-22T05:05:52.419Z'); +INSERT INTO notif_creds VALUES(130,'ExponentPushToken[_4SQFkNreSaKN8HJCwkO0d]','2026-02-22T04:24:10.912Z',207,'2026-02-22T04:24:10.911Z'); +INSERT INTO notif_creds VALUES(131,'ExponentPushToken[nMmoPDNa2B-FzS0tTKUVJq]','2026-02-22T04:37:00.262Z',208,'2026-02-25T03:26:36.919Z'); +INSERT INTO notif_creds VALUES(132,'ExponentPushToken[_KlKvdPBjid4uWtGl9oj1w]','2026-02-22T04:43:50.020Z',209,'2026-02-22T04:43:50.019Z'); +INSERT INTO notif_creds VALUES(133,'ExponentPushToken[lUQnqhGJAN_4YY4wQ9AsxU]','2026-02-22T05:14:35.973Z',210,'2026-02-22T05:14:35.972Z'); +INSERT INTO notif_creds VALUES(134,'ExponentPushToken[9MdSNKGJEuTvO7e_pUGutQ]','2026-02-22T06:00:13.290Z',212,'2026-02-23T00:39:33.185Z'); +INSERT INTO notif_creds VALUES(135,'ExponentPushToken[O8hwqtKbEc8aWG_xDyiTng]','2026-02-22T06:29:49.199Z',213,'2026-02-25T01:01:33.072Z'); +INSERT INTO notif_creds VALUES(136,'ExponentPushToken[8C19GxE0u9UAVhJurTSUCD]','2026-02-22T06:33:55.924Z',214,'2026-02-22T06:33:55.924Z'); +INSERT INTO notif_creds VALUES(137,'ExponentPushToken[O-HudjMpRjEPPtOY7P8xNf]','2026-02-22T06:59:10.922Z',215,'2026-02-22T06:59:10.921Z'); +INSERT INTO notif_creds VALUES(138,'ExponentPushToken[3vLy4aIVVz6JhDs28edZ7A]','2026-02-22T07:13:12.618Z',216,'2026-02-22T07:13:12.618Z'); +INSERT INTO notif_creds VALUES(139,'ExponentPushToken[gd9P-IJzX8mPS8WIQ4L_aO]','2026-02-22T07:30:21.756Z',217,'2026-02-24T03:15:03.767Z'); +INSERT INTO notif_creds VALUES(140,'ExponentPushToken[Lyp_JhEp-mzptQkxT2gV5j]','2026-02-22T14:03:46.271Z',50,'2026-02-24T23:40:50.787Z'); +INSERT INTO notif_creds VALUES(141,'ExponentPushToken[bKljnNAKOQhNtEuFH61wdv]','2026-02-23T00:50:17.502Z',219,'2026-02-24T02:54:24.861Z'); +INSERT INTO notif_creds VALUES(143,'ExponentPushToken[4MaEIUHLXJTeIUk5Tw2Bre]','2026-02-23T01:39:34.734Z',220,'2026-02-23T01:39:34.734Z'); +INSERT INTO notif_creds VALUES(144,'ExponentPushToken[WFqHJnGXt5zJQgezyZMT-F]','2026-02-23T02:13:14.745Z',221,'2026-02-23T02:13:14.744Z'); +INSERT INTO notif_creds VALUES(146,'ExponentPushToken[_w34c8IpadSoTyzQIgfiRf]','2026-02-23T03:24:04.981Z',222,'2026-02-23T07:32:10.879Z'); +INSERT INTO notif_creds VALUES(147,'ExponentPushToken[BAMOz8A3uZ98l8lIIF5cvC]','2026-02-23T03:32:38.907Z',218,'2026-02-24T23:29:49.706Z'); +INSERT INTO notif_creds VALUES(148,'ExponentPushToken[PnJS6KN--CeuepgdgEOUKz]','2026-02-23T03:46:06.431Z',223,'2026-02-23T06:35:54.102Z'); +INSERT INTO notif_creds VALUES(149,'ExponentPushToken[q6LVtfMMHCmI-CVuzkjete]','2026-02-23T04:36:52.684Z',224,'2026-02-24T03:00:47.885Z'); +INSERT INTO notif_creds VALUES(151,'ExponentPushToken[qFtLZVFHGA-08finEVoLvk]','2026-02-23T06:41:17.865Z',225,'2026-02-23T11:53:56.553Z'); +INSERT INTO notif_creds VALUES(152,'ExponentPushToken[f8BfgiIMzCgsrT8D0GrcbC]','2026-02-23T08:30:40.686Z',226,'2026-02-24T01:31:30.979Z'); +INSERT INTO notif_creds VALUES(153,'ExponentPushToken[Tlj0Y5ENGMH1gqQMOE4Vet]','2026-02-23T22:38:49.132Z',228,'2026-02-23T22:38:49.131Z'); +INSERT INTO notif_creds VALUES(154,'ExponentPushToken[xpA3OSLWnk2-oUz2J_jq9V]','2026-02-24T07:52:52.533Z',15,'2026-02-24T07:52:52.532Z'); +INSERT INTO notif_creds VALUES(155,'ExponentPushToken[LkHZ5lKBW9CMi6UWZ1jZvJ]','2026-02-24T12:27:39.430Z',231,'2026-02-24T12:27:39.429Z'); +INSERT INTO notif_creds VALUES(156,'ExponentPushToken[HpS7v_O9a0YX-ctUWczWc9]','2026-02-24T14:49:55.883Z',232,'2026-02-24T14:49:55.882Z'); +CREATE TABLE IF NOT EXISTS "notifications" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "title" TEXT NOT NULL, "body" TEXT NOT NULL, "type" TEXT, "is_read" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +CREATE TABLE IF NOT EXISTS "order_items" ("id" INTEGER PRIMARY KEY, "order_id" INTEGER NOT NULL, "product_id" INTEGER NOT NULL, "quantity" TEXT NOT NULL, "price" REAL NOT NULL, "discounted_price" REAL, "is_packaged" INTEGER NOT NULL DEFAULT false, "is_package_verified" INTEGER NOT NULL DEFAULT false); +INSERT INTO order_items VALUES(1,1,6,'2',22.0,NULL,0,0); +INSERT INTO order_items VALUES(2,2,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(3,3,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(4,4,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(5,4,1,'1',210.0,NULL,0,0); +INSERT INTO order_items VALUES(6,5,4,'1',700.0,NULL,0,0); +INSERT INTO order_items VALUES(7,6,6,'1',22.0,NULL,0,0); +INSERT INTO order_items VALUES(8,7,6,'1',22.0,NULL,0,0); +INSERT INTO order_items VALUES(9,8,6,'1',22.0,NULL,0,0); +INSERT INTO order_items VALUES(10,9,3,'2',250.0,NULL,0,0); +INSERT INTO order_items VALUES(11,10,3,'2',250.0,NULL,0,0); +INSERT INTO order_items VALUES(12,11,6,'2',22.0,NULL,0,0); +INSERT INTO order_items VALUES(13,12,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(14,13,6,'1',22.0,NULL,0,0); +INSERT INTO order_items VALUES(15,14,1,'1',210.0,NULL,0,0); +INSERT INTO order_items VALUES(16,15,4,'1',700.0,NULL,0,0); +INSERT INTO order_items VALUES(17,16,4,'1',700.0,NULL,0,0); +INSERT INTO order_items VALUES(18,17,1,'1',210.0,NULL,0,0); +INSERT INTO order_items VALUES(19,18,1,'4',210.0,NULL,0,0); +INSERT INTO order_items VALUES(20,19,3,'1',250.0,NULL,0,0); +INSERT INTO order_items VALUES(21,19,9,'1',280.0,NULL,0,0); +INSERT INTO order_items VALUES(22,20,3,'1',250.0,NULL,0,0); +INSERT INTO order_items VALUES(23,20,9,'1',280.0,NULL,0,0); +INSERT INTO order_items VALUES(24,21,4,'1',700.0,NULL,0,0); +INSERT INTO order_items VALUES(25,21,6,'1',22.0,NULL,0,0); +INSERT INTO order_items VALUES(26,22,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(27,23,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(28,24,3,'3',250.0,NULL,0,0); +INSERT INTO order_items VALUES(29,25,2,'25',220.0,NULL,0,0); +INSERT INTO order_items VALUES(30,25,7,'4',50.0,NULL,0,0); +INSERT INTO order_items VALUES(31,26,5,'4',72.0,NULL,0,0); +INSERT INTO order_items VALUES(32,26,1,'3',210.0,NULL,0,0); +INSERT INTO order_items VALUES(33,26,4,'3',700.0,NULL,0,0); +INSERT INTO order_items VALUES(34,26,10,'3',210.0,NULL,0,0); +INSERT INTO order_items VALUES(35,26,8,'4',20.0,NULL,0,0); +INSERT INTO order_items VALUES(36,26,11,'6',1400.0,NULL,0,0); +INSERT INTO order_items VALUES(37,27,11,'9',1400.0,NULL,0,0); +INSERT INTO order_items VALUES(38,27,3,'13',250.0,NULL,0,0); +INSERT INTO order_items VALUES(39,28,10,'5',210.0,168.0,0,0); +INSERT INTO order_items VALUES(40,28,6,'6',22.0,17.600000000000002309,0,0); +INSERT INTO order_items VALUES(41,29,4,'2',700.0,700.0,0,0); +INSERT INTO order_items VALUES(42,30,2,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(43,30,11,'5',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(44,30,3,'2',250.0,250.0,0,0); +INSERT INTO order_items VALUES(45,31,2,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(46,31,11,'5',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(47,31,3,'2',250.0,250.0,0,0); +INSERT INTO order_items VALUES(48,32,2,'1',220.0,176.0,0,0); +INSERT INTO order_items VALUES(49,32,11,'5',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(50,32,3,'1',250.0,200.0,0,0); +INSERT INTO order_items VALUES(51,33,4,'3',700.0,560.0,0,0); +INSERT INTO order_items VALUES(52,34,2,'1',220.0,176.0,0,0); +INSERT INTO order_items VALUES(53,34,11,'1',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(54,34,3,'1',250.0,200.0,0,0); +INSERT INTO order_items VALUES(55,35,11,'2',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(56,36,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(57,36,4,'1',700.0,700.0,0,0); +INSERT INTO order_items VALUES(58,36,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(59,37,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(60,37,4,'1',700.0,700.0,0,0); +INSERT INTO order_items VALUES(61,37,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(62,38,2,'1',220.0,220.0,0,0); +INSERT INTO order_items VALUES(63,38,11,'2',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(64,39,3,'1',250.0,200.0,0,0); +INSERT INTO order_items VALUES(65,39,11,'2',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(66,40,11,'3',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(67,40,3,'4',250.0,200.0,0,0); +INSERT INTO order_items VALUES(68,41,11,'2',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(69,41,3,'2',250.0,200.0,0,0); +INSERT INTO order_items VALUES(70,42,2,'4',220.0,176.0,0,0); +INSERT INTO order_items VALUES(71,42,3,'4',250.0,200.0,0,0); +INSERT INTO order_items VALUES(72,43,11,'1',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(73,43,2,'5',220.0,176.0,0,0); +INSERT INTO order_items VALUES(74,43,10,'3',210.0,168.0,0,0); +INSERT INTO order_items VALUES(75,44,11,'1',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(76,44,2,'5',220.0,176.0,0,0); +INSERT INTO order_items VALUES(77,44,10,'3',210.0,168.0,0,0); +INSERT INTO order_items VALUES(78,45,11,'3',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(79,45,2,'5',220.0,176.0,0,0); +INSERT INTO order_items VALUES(80,45,3,'3',250.0,200.0,0,0); +INSERT INTO order_items VALUES(81,46,11,'5',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(82,46,3,'4',250.0,200.0,0,0); +INSERT INTO order_items VALUES(83,46,10,'3',210.0,168.0,0,0); +INSERT INTO order_items VALUES(84,47,3,'2',250.0,250.0,0,0); +INSERT INTO order_items VALUES(85,47,2,'2',220.0,220.0,0,0); +INSERT INTO order_items VALUES(86,48,3,'5',250.0,150.0,0,0); +INSERT INTO order_items VALUES(87,48,11,'3',1400.0,840.0,0,0); +INSERT INTO order_items VALUES(88,48,2,'3',220.0,132.0,0,0); +INSERT INTO order_items VALUES(89,49,10,'5',210.0,210.0,0,0); +INSERT INTO order_items VALUES(90,49,2,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(91,49,11,'2',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(92,49,3,'3',250.0,250.0,0,0); +INSERT INTO order_items VALUES(93,50,4,'3',700.0,700.0,0,0); +INSERT INTO order_items VALUES(94,50,10,'3',210.0,210.0,0,0); +INSERT INTO order_items VALUES(95,50,2,'4',220.0,220.0,0,0); +INSERT INTO order_items VALUES(96,50,11,'3',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(97,51,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(98,52,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(99,53,3,'2',250.0,250.0,0,0); +INSERT INTO order_items VALUES(100,54,4,'3',700.0,700.0,0,0); +INSERT INTO order_items VALUES(101,54,3,'3',250.0,250.0,0,0); +INSERT INTO order_items VALUES(102,55,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(103,55,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(104,55,1,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(105,56,8,'1',20.0,20.0,0,0); +INSERT INTO order_items VALUES(106,56,6,'2',22.0,22.0,0,0); +INSERT INTO order_items VALUES(107,57,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(108,58,1,'28',210.0,210.0,0,0); +INSERT INTO order_items VALUES(109,58,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(110,58,3,'3',250.0,250.0,0,0); +INSERT INTO order_items VALUES(111,58,2,'1',220.0,220.0,0,0); +INSERT INTO order_items VALUES(112,59,1,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(113,60,12,'1',350.0,350.0,0,0); +INSERT INTO order_items VALUES(114,61,1,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(115,62,12,'2',350.0,350.0,0,0); +INSERT INTO order_items VALUES(116,63,1,'2',210.0,210.0,0,0); +INSERT INTO order_items VALUES(117,63,12,'2',350.0,350.0,0,0); +INSERT INTO order_items VALUES(118,64,1,'2',210.0,210.0,0,0); +INSERT INTO order_items VALUES(119,65,12,'2',350.0,350.0,0,0); +INSERT INTO order_items VALUES(120,66,12,'1',350.0,350.0,0,0); +INSERT INTO order_items VALUES(121,66,1,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(122,67,15,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(123,68,15,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(124,69,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(125,70,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(126,71,11,'1',1400.0,1400.0,1,0); +INSERT INTO order_items VALUES(127,71,15,'1',220.0,220.0,1,0); +INSERT INTO order_items VALUES(128,71,6,'1',22.0,22.0,1,0); +INSERT INTO order_items VALUES(129,72,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(130,73,5,'3',72.0,72.0,0,0); +INSERT INTO order_items VALUES(131,74,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(132,74,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(133,75,11,'15',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(134,76,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(135,77,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(136,78,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(137,79,25,'3',100.0,100.0,0,0); +INSERT INTO order_items VALUES(138,80,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(139,81,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(140,82,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(141,83,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(142,84,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(143,85,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(144,86,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(145,87,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(146,88,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(147,89,15,'1',140.0,140.0,0,0); +INSERT INTO order_items VALUES(148,89,11,'2',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(149,90,6,'2',22.0,22.0,0,0); +INSERT INTO order_items VALUES(150,91,19,'1',40.0,40.0,0,0); +INSERT INTO order_items VALUES(151,92,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(152,93,25,'2',100.0,100.0,0,0); +INSERT INTO order_items VALUES(153,94,26,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(154,95,6,'6',22.0,22.0,0,0); +INSERT INTO order_items VALUES(155,96,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(156,97,25,'2',100.0,100.0,0,0); +INSERT INTO order_items VALUES(157,98,6,'2',22.0,22.0,0,0); +INSERT INTO order_items VALUES(158,99,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(159,100,16,'10',100.0,100.0,0,0); +INSERT INTO order_items VALUES(160,101,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(161,102,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(162,103,16,'1',100.0,100.0,0,0); +INSERT INTO order_items VALUES(163,104,5,'5',72.0,72.0,0,0); +INSERT INTO order_items VALUES(164,104,6,'108',22.0,22.0,0,0); +INSERT INTO order_items VALUES(165,105,12,'22',350.0,350.0,0,0); +INSERT INTO order_items VALUES(166,106,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(167,106,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(168,107,8,'1',20.0,20.0,1,0); +INSERT INTO order_items VALUES(169,107,26,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(170,108,25,'1',100.0,100.0,0,0); +INSERT INTO order_items VALUES(171,109,13,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(172,110,6,'2',22.0,22.0,0,0); +INSERT INTO order_items VALUES(173,111,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(174,111,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(175,111,12,'1',350.0,350.0,0,0); +INSERT INTO order_items VALUES(176,112,8,'1',20.0,20.0,0,0); +INSERT INTO order_items VALUES(177,113,12,'1',350.0,350.0,0,0); +INSERT INTO order_items VALUES(178,114,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(179,115,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(180,115,6,'2',22.0,22.0,0,0); +INSERT INTO order_items VALUES(181,115,16,'1',100.0,100.0,0,0); +INSERT INTO order_items VALUES(182,116,15,'4',140.0,140.0,0,0); +INSERT INTO order_items VALUES(183,117,6,'2',22.0,22.0,1,0); +INSERT INTO order_items VALUES(184,117,5,'1',72.0,72.0,1,0); +INSERT INTO order_items VALUES(185,118,13,'1',120.0,120.0,0,1); +INSERT INTO order_items VALUES(186,119,8,'1',20.0,20.0,0,0); +INSERT INTO order_items VALUES(187,119,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(188,120,21,'1',380.0,380.0,0,0); +INSERT INTO order_items VALUES(189,120,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(190,121,10,'1',210.0,210.0,1,1); +INSERT INTO order_items VALUES(191,121,24,'1',230.0,230.0,1,1); +INSERT INTO order_items VALUES(192,122,5,'1',72.0,72.0,1,1); +INSERT INTO order_items VALUES(193,122,11,'1',1400.0,1400.0,1,1); +INSERT INTO order_items VALUES(194,122,13,'1',120.0,120.0,1,1); +INSERT INTO order_items VALUES(195,122,6,'1',22.0,22.0,1,1); +INSERT INTO order_items VALUES(196,123,35,'1',485.0,485.0,0,0); +INSERT INTO order_items VALUES(197,124,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(198,125,22,'1',680.0,680.0,0,0); +INSERT INTO order_items VALUES(199,126,10,'1',210.0,210.0,1,1); +INSERT INTO order_items VALUES(200,126,6,'1',22.0,22.0,1,1); +INSERT INTO order_items VALUES(201,127,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(202,127,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(203,127,24,'1',230.0,230.0,0,0); +INSERT INTO order_items VALUES(204,127,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(205,127,20,'1',340.0,340.0,0,0); +INSERT INTO order_items VALUES(206,128,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(207,128,15,'1',140.0,140.0,0,0); +INSERT INTO order_items VALUES(208,129,24,'1',230.0,230.0,0,0); +INSERT INTO order_items VALUES(209,129,4,'1',780.0,780.0,0,0); +INSERT INTO order_items VALUES(210,129,21,'1',380.0,380.0,0,0); +INSERT INTO order_items VALUES(211,130,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(212,131,20,'1',340.0,340.0,0,0); +INSERT INTO order_items VALUES(213,132,10,'1',240.0,240.0,1,0); +INSERT INTO order_items VALUES(214,132,23,'2',300.0,300.0,1,0); +INSERT INTO order_items VALUES(215,132,11,'2',1400.0,1400.0,1,0); +INSERT INTO order_items VALUES(216,133,4,'1',780.0,780.0,0,0); +INSERT INTO order_items VALUES(217,134,6,'1',24.0,24.0,0,0); +INSERT INTO order_items VALUES(218,134,13,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(219,134,8,'1',20.0,20.0,0,0); +INSERT INTO order_items VALUES(220,134,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(221,134,25,'1',100.0,100.0,0,0); +INSERT INTO order_items VALUES(222,134,26,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(223,134,38,'1',100.0,100.0,0,0); +INSERT INTO order_items VALUES(224,134,39,'1',150.0,150.0,0,0); +INSERT INTO order_items VALUES(225,134,20,'1',340.0,340.0,0,0); +INSERT INTO order_items VALUES(226,134,14,'1',180.0,180.0,0,0); +INSERT INTO order_items VALUES(227,134,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(228,134,10,'1',240.0,240.0,0,0); +INSERT INTO order_items VALUES(229,134,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(230,134,23,'1',300.0,300.0,0,0); +INSERT INTO order_items VALUES(231,134,22,'1',680.0,680.0,0,0); +INSERT INTO order_items VALUES(232,135,20,'5',340.0,340.0,0,0); +INSERT INTO order_items VALUES(233,136,20,'3',340.0,340.0,0,0); +INSERT INTO order_items VALUES(234,137,13,'5',120.0,120.0,0,0); +INSERT INTO order_items VALUES(235,138,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(236,138,21,'1',380.0,380.0,0,0); +INSERT INTO order_items VALUES(237,139,4,'1',780.0,780.0,0,0); +INSERT INTO order_items VALUES(238,140,14,'3',180.0,180.0,0,0); +INSERT INTO order_items VALUES(239,141,14,'3',180.0,180.0,0,0); +INSERT INTO order_items VALUES(240,142,6,'1',24.0,24.0,0,0); +INSERT INTO order_items VALUES(241,143,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(242,143,14,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(243,144,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(244,144,14,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(245,145,1,'2',120.0,120.0,0,0); +INSERT INTO order_items VALUES(246,145,14,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(247,146,1,'2',120.0,120.0,0,0); +INSERT INTO order_items VALUES(248,146,14,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(249,147,1,'3',120.0,120.0,1,0); +INSERT INTO order_items VALUES(250,147,14,'3',220.0,220.0,1,0); +INSERT INTO order_items VALUES(251,148,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(252,148,35,'2',499.0,499.0,0,0); +INSERT INTO order_items VALUES(253,149,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(254,150,1,'1',120.0,120.0,1,0); +INSERT INTO order_items VALUES(255,150,3,'1',250.0,250.0,1,0); +INSERT INTO order_items VALUES(256,151,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(257,151,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(258,151,10,'1',240.0,240.0,0,0); +INSERT INTO order_items VALUES(259,152,21,'1',489.0,489.0,0,0); +INSERT INTO order_items VALUES(260,152,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(261,153,22,'1',680.0,680.0,0,0); +INSERT INTO order_items VALUES(262,154,23,'1',300.0,300.0,0,0); +INSERT INTO order_items VALUES(263,154,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(264,155,21,'1',489.0,489.0,0,0); +INSERT INTO order_items VALUES(265,155,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(266,156,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(267,156,14,'1',220.0,220.0,0,0); +INSERT INTO order_items VALUES(268,157,75,'3',25.0,25.0,1,0); +INSERT INTO order_items VALUES(269,158,21,'1',559.0,559.0,0,0); +INSERT INTO order_items VALUES(270,158,3,'1',76.0,76.0,0,0); +INSERT INTO order_items VALUES(271,158,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(272,158,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(273,158,35,'1',499.0,499.0,0,0); +INSERT INTO order_items VALUES(274,159,77,'56',22.0,22.0,0,0); +INSERT INTO order_items VALUES(275,160,77,'6',22.0,22.0,0,0); +INSERT INTO order_items VALUES(276,161,77,'14',22.0,22.0,0,0); +INSERT INTO order_items VALUES(277,162,77,'8',22.0,22.0,1,0); +INSERT INTO order_items VALUES(278,163,24,'7',249.0,249.0,0,0); +INSERT INTO order_items VALUES(279,164,3,'4',76.0,76.0,0,0); +INSERT INTO order_items VALUES(280,165,4,'1',820.0,820.0,0,0); +INSERT INTO order_items VALUES(281,166,7,'1',49.0,49.0,0,0); +INSERT INTO order_items VALUES(282,167,10,'1',240.0,240.0,0,0); +INSERT INTO order_items VALUES(283,167,6,'1',154.0,154.0,0,0); +INSERT INTO order_items VALUES(284,167,24,'1',249.0,249.0,0,0); +INSERT INTO order_items VALUES(285,168,35,'2',410.0,410.0,0,0); +INSERT INTO order_items VALUES(286,168,3,'2',76.0,76.0,0,0); +INSERT INTO order_items VALUES(287,168,4,'2',820.0,820.0,0,0); +INSERT INTO order_items VALUES(288,169,37,'3',29.0,29.0,0,0); +INSERT INTO order_items VALUES(289,170,23,'1',146.0,146.0,1,0); +INSERT INTO order_items VALUES(290,171,35,'1',429.0,429.0,1,1); +INSERT INTO order_items VALUES(291,172,13,'1',35.0,35.0,1,1); +INSERT INTO order_items VALUES(292,172,5,'1',17.0,17.0,1,1); +INSERT INTO order_items VALUES(293,172,68,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(294,173,56,'1',44.0,44.0,1,1); +INSERT INTO order_items VALUES(295,174,47,'1',109.0,109.0,1,1); +INSERT INTO order_items VALUES(296,174,38,'1',69.0,69.0,1,1); +INSERT INTO order_items VALUES(297,175,19,'1',27.0,27.0,1,1); +INSERT INTO order_items VALUES(298,176,56,'1',67.0,67.0,1,1); +INSERT INTO order_items VALUES(299,176,23,'1',146.0,146.0,1,1); +INSERT INTO order_items VALUES(300,177,58,'2',79.0,79.0,1,1); +INSERT INTO order_items VALUES(301,178,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(302,179,23,'1',146.0,146.0,1,0); +INSERT INTO order_items VALUES(303,180,13,'2',47.0,47.0,1,0); +INSERT INTO order_items VALUES(304,181,71,'1',17.0,17.0,1,0); +INSERT INTO order_items VALUES(305,182,59,'1',39.0,39.0,1,0); +INSERT INTO order_items VALUES(306,183,66,'1',32.0,32.0,0,0); +INSERT INTO order_items VALUES(307,184,41,'1',179.0,179.0,1,1); +INSERT INTO order_items VALUES(308,185,76,'1',25.0,25.0,0,0); +INSERT INTO order_items VALUES(309,185,32,'1',23.0,23.0,0,0); +INSERT INTO order_items VALUES(310,185,97,'1',19.0,19.0,0,0); +INSERT INTO order_items VALUES(311,186,24,'1',218.0,218.0,0,0); +INSERT INTO order_items VALUES(312,186,1,'1',89.0,89.0,0,0); +INSERT INTO order_items VALUES(313,187,67,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(314,187,45,'1',25.0,25.0,1,1); +INSERT INTO order_items VALUES(315,188,9,'1',296.0,296.0,0,0); +INSERT INTO order_items VALUES(316,189,23,'2',146.0,146.0,1,1); +INSERT INTO order_items VALUES(317,190,71,'1',17.0,17.0,0,0); +INSERT INTO order_items VALUES(318,191,23,'2',135.0,135.0,1,1); +INSERT INTO order_items VALUES(319,192,24,'2',210.0,210.0,1,1); +INSERT INTO order_items VALUES(320,193,10,'1',269.0,269.0,1,1); +INSERT INTO order_items VALUES(321,194,41,'1',179.0,179.0,1,1); +INSERT INTO order_items VALUES(322,194,4,'1',820.0,820.0,1,1); +INSERT INTO order_items VALUES(323,195,96,'1',109.0,109.0,1,1); +INSERT INTO order_items VALUES(324,196,41,'1',179.0,179.0,0,0); +INSERT INTO order_items VALUES(325,197,41,'1',179.0,179.0,1,1); +INSERT INTO order_items VALUES(326,197,10,'1',269.0,269.0,1,1); +INSERT INTO order_items VALUES(332,202,40,'1',135.0,135.0,1,0); +INSERT INTO order_items VALUES(333,203,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(334,204,51,'1',79.0,79.0,0,0); +INSERT INTO order_items VALUES(335,205,51,'1',79.0,79.0,1,1); +INSERT INTO order_items VALUES(336,206,4,'1',820.0,820.0,0,0); +INSERT INTO order_items VALUES(337,207,14,'1',369.0,369.0,0,0); +INSERT INTO order_items VALUES(338,208,98,'1',420.0,420.0,1,0); +INSERT INTO order_items VALUES(339,209,40,'2',135.0,135.0,1,1); +INSERT INTO order_items VALUES(340,209,38,'1',69.0,69.0,1,1); +INSERT INTO order_items VALUES(341,209,8,'1',119.0,119.0,1,1); +INSERT INTO order_items VALUES(342,210,24,'1',210.0,210.0,1,0); +INSERT INTO order_items VALUES(343,211,76,'1',25.0,25.0,1,1); +INSERT INTO order_items VALUES(344,211,19,'1',27.0,27.0,1,1); +INSERT INTO order_items VALUES(345,211,32,'1',23.0,23.0,1,1); +INSERT INTO order_items VALUES(346,211,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(347,212,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(348,213,18,'2',44.0,44.0,0,0); +INSERT INTO order_items VALUES(349,214,13,'2',49.0,49.0,0,0); +INSERT INTO order_items VALUES(350,215,13,'4',69.0,69.0,1,1); +INSERT INTO order_items VALUES(351,216,7,'1',49.0,49.0,0,0); +INSERT INTO order_items VALUES(352,216,8,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(353,216,46,'1',109.0,109.0,0,0); +INSERT INTO order_items VALUES(354,216,6,'1',109.0,109.0,0,0); +INSERT INTO order_items VALUES(355,217,38,'1',76.0,76.0,1,0); +INSERT INTO order_items VALUES(356,217,85,'1',259.0,259.0,1,0); +INSERT INTO order_items VALUES(357,218,6,'2',109.0,109.0,1,1); +INSERT INTO order_items VALUES(358,218,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(359,218,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(360,218,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(361,218,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(362,219,96,'1',109.0,109.0,0,0); +INSERT INTO order_items VALUES(363,220,6,'1',109.0,109.0,1,0); +INSERT INTO order_items VALUES(364,220,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(365,221,6,'1',109.0,109.0,1,1); +INSERT INTO order_items VALUES(366,221,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(367,221,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(368,222,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(369,222,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(370,222,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(371,223,7,'1',49.0,49.0,0,0); +INSERT INTO order_items VALUES(372,223,78,'1',29.0,29.0,0,0); +INSERT INTO order_items VALUES(373,223,45,'1',19.0,19.0,0,0); +INSERT INTO order_items VALUES(374,224,42,'1',149.0,149.0,1,0); +INSERT INTO order_items VALUES(375,225,59,'1',98.0,98.0,0,0); +INSERT INTO order_items VALUES(376,226,91,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(377,226,45,'2',19.0,19.0,1,1); +INSERT INTO order_items VALUES(378,226,71,'1',17.0,17.0,1,1); +INSERT INTO order_items VALUES(379,226,95,'1',39.0,39.0,1,1); +INSERT INTO order_items VALUES(380,227,14,'1',379.0,379.0,1,0); +INSERT INTO order_items VALUES(381,228,16,'1',28.0,28.0,0,0); +INSERT INTO order_items VALUES(382,228,91,'2',29.0,29.0,0,0); +INSERT INTO order_items VALUES(383,228,45,'2',19.0,19.0,0,0); +INSERT INTO order_items VALUES(384,228,71,'1',17.0,17.0,0,0); +INSERT INTO order_items VALUES(385,228,95,'1',39.0,39.0,0,0); +INSERT INTO order_items VALUES(386,229,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(387,229,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(388,229,77,'1',18.0,18.0,1,1); +INSERT INTO order_items VALUES(389,229,29,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(390,229,68,'1',32.0,32.0,1,1); +INSERT INTO order_items VALUES(391,230,45,'1',19.0,19.0,0,0); +INSERT INTO order_items VALUES(392,230,31,'2',29.0,29.0,0,0); +INSERT INTO order_items VALUES(393,230,6,'1',109.0,109.0,0,0); +INSERT INTO order_items VALUES(394,231,6,'2',109.0,109.0,1,1); +INSERT INTO order_items VALUES(395,231,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(396,232,2,'1',219.0,219.0,0,0); +INSERT INTO order_items VALUES(397,233,24,'1',219.0,219.0,0,0); +INSERT INTO order_items VALUES(398,234,24,'1',219.0,219.0,1,1); +INSERT INTO order_items VALUES(399,235,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(400,236,23,'1',139.0,139.0,1,0); +INSERT INTO order_items VALUES(401,237,13,'2',69.0,69.0,1,0); +INSERT INTO order_items VALUES(402,238,67,'4',24.0,24.0,0,0); +INSERT INTO order_items VALUES(403,239,67,'4',24.0,24.0,0,0); +INSERT INTO order_items VALUES(404,240,40,'1',160.0,160.0,0,0); +INSERT INTO order_items VALUES(405,241,40,'1',160.0,160.0,0,0); +INSERT INTO order_items VALUES(406,242,66,'1',27.0,27.0,0,0); +INSERT INTO order_items VALUES(407,243,19,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(408,244,82,'1',389.0,389.0,0,0); +INSERT INTO order_items VALUES(409,245,59,'10',98.0,98.0,0,0); +INSERT INTO order_items VALUES(410,246,23,'1',139.0,139.0,0,0); +INSERT INTO order_items VALUES(411,247,42,'1',149.0,149.0,0,0); +INSERT INTO order_items VALUES(412,248,23,'1',139.0,139.0,1,0); +INSERT INTO order_items VALUES(413,248,7,'1',49.0,49.0,1,0); +INSERT INTO order_items VALUES(414,249,96,'1',109.0,109.0,1,1); +INSERT INTO order_items VALUES(415,250,98,'1',419.0,419.0,0,0); +INSERT INTO order_items VALUES(416,250,80,'1',849.0,849.0,0,0); +INSERT INTO order_items VALUES(417,250,58,'1',59.0,59.0,0,0); +INSERT INTO order_items VALUES(418,251,48,'2',55.0,55.0,1,0); +INSERT INTO order_items VALUES(419,252,78,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(420,252,91,'2',39.0,39.0,1,0); +INSERT INTO order_items VALUES(421,253,19,'2',27.0,27.0,1,0); +INSERT INTO order_items VALUES(422,253,72,'2',18.0,18.0,1,0); +INSERT INTO order_items VALUES(423,253,16,'1',28.0,28.0,1,0); +INSERT INTO order_items VALUES(424,254,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(425,254,19,'1',27.0,27.0,1,1); +INSERT INTO order_items VALUES(426,254,32,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(427,254,27,'1',24.0,24.0,1,1); +INSERT INTO order_items VALUES(428,254,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(429,254,74,'1',17.0,17.0,1,1); +INSERT INTO order_items VALUES(430,255,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(431,256,98,'1',419.0,419.0,0,0); +INSERT INTO order_items VALUES(432,257,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(433,258,58,'1',59.0,59.0,1,1); +INSERT INTO order_items VALUES(434,259,35,'1',459.0,459.0,1,1); +INSERT INTO order_items VALUES(435,260,40,'1',150.0,150.0,0,0); +INSERT INTO order_items VALUES(436,260,24,'1',230.0,230.0,0,0); +INSERT INTO order_items VALUES(437,261,73,'2',59.0,59.0,1,0); +INSERT INTO order_items VALUES(438,262,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(439,263,40,'1',150.0,150.0,0,0); +INSERT INTO order_items VALUES(440,264,24,'2',198.0,198.0,1,0); +INSERT INTO order_items VALUES(441,264,66,'1',27.0,27.0,1,0); +INSERT INTO order_items VALUES(442,265,73,'2',59.0,59.0,1,0); +INSERT INTO order_items VALUES(443,266,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(444,267,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(445,267,60,'1',78.0,78.0,1,0); +INSERT INTO order_items VALUES(446,267,8,'1',119.0,119.0,1,0); +INSERT INTO order_items VALUES(447,267,58,'1',59.0,59.0,1,0); +INSERT INTO order_items VALUES(448,268,35,'1',429.0,429.0,1,1); +INSERT INTO order_items VALUES(449,269,24,'2',198.0,198.0,0,0); +INSERT INTO order_items VALUES(450,270,2,'1',230.0,230.0,1,0); +INSERT INTO order_items VALUES(451,271,100,'1',99.0,99.0,1,0); +INSERT INTO order_items VALUES(452,271,69,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(453,271,9,'1',296.0,296.0,1,0); +INSERT INTO order_items VALUES(454,272,58,'1',59.0,59.0,0,0); +INSERT INTO order_items VALUES(455,273,58,'1',59.0,59.0,0,0); +INSERT INTO order_items VALUES(456,274,9,'1',296.0,296.0,1,1); +INSERT INTO order_items VALUES(457,274,85,'1',259.0,259.0,1,1); +INSERT INTO order_items VALUES(458,275,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(459,275,23,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(460,276,45,'2',19.0,19.0,1,1); +INSERT INTO order_items VALUES(461,276,91,'1',39.0,39.0,1,1); +INSERT INTO order_items VALUES(462,276,35,'1',429.0,429.0,1,1); +INSERT INTO order_items VALUES(463,277,97,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(464,277,95,'1',39.0,39.0,1,1); +INSERT INTO order_items VALUES(465,277,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(466,277,90,'1',27.0,27.0,1,0); +INSERT INTO order_items VALUES(467,277,19,'1',23.0,23.0,1,1); +INSERT INTO order_items VALUES(468,277,27,'1',24.0,24.0,1,1); +INSERT INTO order_items VALUES(469,277,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(470,277,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(471,277,29,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(472,277,45,'2',19.0,19.0,1,0); +INSERT INTO order_items VALUES(473,277,67,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(474,277,66,'1',27.0,27.0,1,1); +INSERT INTO order_items VALUES(475,277,65,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(476,277,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(477,278,24,'2',198.0,198.0,1,0); +INSERT INTO order_items VALUES(478,279,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(479,280,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(480,280,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(481,280,72,'1',14.0,14.0,1,1); +INSERT INTO order_items VALUES(482,280,92,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(483,280,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(484,280,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(485,280,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(486,281,91,'1',39.0,39.0,1,1); +INSERT INTO order_items VALUES(487,281,19,'2',23.0,23.0,1,1); +INSERT INTO order_items VALUES(488,281,10,'2',249.0,249.0,1,0); +INSERT INTO order_items VALUES(489,282,59,'1',98.0,98.0,0,0); +INSERT INTO order_items VALUES(490,283,73,'2',59.0,59.0,1,0); +INSERT INTO order_items VALUES(491,283,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(492,284,7,'1',49.0,49.0,1,0); +INSERT INTO order_items VALUES(493,284,48,'1',55.0,55.0,1,0); +INSERT INTO order_items VALUES(494,284,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(495,285,38,'1',76.0,76.0,0,0); +INSERT INTO order_items VALUES(496,285,56,'1',67.0,67.0,0,0); +INSERT INTO order_items VALUES(497,285,96,'1',109.0,109.0,0,0); +INSERT INTO order_items VALUES(498,285,47,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(499,286,27,'1',24.0,24.0,1,0); +INSERT INTO order_items VALUES(500,286,5,'1',26.0,26.0,1,0); +INSERT INTO order_items VALUES(501,286,32,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(502,286,16,'1',28.0,28.0,1,0); +INSERT INTO order_items VALUES(503,286,33,'1',15.0,15.0,1,0); +INSERT INTO order_items VALUES(504,286,89,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(505,286,58,'1',59.0,59.0,1,0); +INSERT INTO order_items VALUES(506,286,48,'1',55.0,55.0,1,0); +INSERT INTO order_items VALUES(507,287,97,'6',19.0,19.0,0,0); +INSERT INTO order_items VALUES(508,288,38,'1',76.0,76.0,0,0); +INSERT INTO order_items VALUES(509,289,31,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(510,290,24,'1',198.0,198.0,1,1); +INSERT INTO order_items VALUES(511,290,41,'1',189.0,189.0,1,0); +INSERT INTO order_items VALUES(512,291,21,'1',559.0,559.0,1,1); +INSERT INTO order_items VALUES(513,292,59,'1',98.0,98.0,0,0); +INSERT INTO order_items VALUES(514,293,59,'1',98.0,98.0,0,0); +INSERT INTO order_items VALUES(515,294,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(516,295,73,'4',59.0,59.0,1,0); +INSERT INTO order_items VALUES(517,296,4,'1',819.0,819.0,0,0); +INSERT INTO order_items VALUES(518,297,23,'2',125.0,125.0,1,1); +INSERT INTO order_items VALUES(519,297,76,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(520,297,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(521,297,32,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(522,298,33,'1',15.0,15.0,1,0); +INSERT INTO order_items VALUES(523,298,89,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(524,298,32,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(525,299,48,'1',55.0,55.0,1,0); +INSERT INTO order_items VALUES(526,299,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(527,300,44,'2',119.0,119.0,1,1); +INSERT INTO order_items VALUES(528,301,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(529,301,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(530,301,100,'1',99.0,99.0,1,1); +INSERT INTO order_items VALUES(531,301,83,'1',159.0,159.0,1,1); +INSERT INTO order_items VALUES(532,301,40,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(533,301,23,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(534,301,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(535,301,29,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(536,301,72,'3',14.0,14.0,1,0); +INSERT INTO order_items VALUES(537,301,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(538,301,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(539,301,92,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(540,301,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(541,301,19,'2',23.0,23.0,1,1); +INSERT INTO order_items VALUES(542,301,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(543,301,77,'3',16.0,16.0,1,1); +INSERT INTO order_items VALUES(544,301,33,'1',15.0,15.0,1,0); +INSERT INTO order_items VALUES(545,301,95,'1',39.0,39.0,1,0); +INSERT INTO order_items VALUES(546,301,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(547,301,79,'1',33.0,33.0,1,0); +INSERT INTO order_items VALUES(548,301,76,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(549,302,41,'1',189.0,189.0,1,0); +INSERT INTO order_items VALUES(550,303,61,'1',99.0,99.0,1,0); +INSERT INTO order_items VALUES(551,303,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(552,304,9,'1',296.0,296.0,1,1); +INSERT INTO order_items VALUES(553,304,24,'1',198.0,198.0,1,1); +INSERT INTO order_items VALUES(554,305,73,'5',59.0,59.0,1,0); +INSERT INTO order_items VALUES(555,306,23,'2',125.0,125.0,1,1); +INSERT INTO order_items VALUES(556,306,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(557,306,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(558,307,73,'4',59.0,59.0,1,1); +INSERT INTO order_items VALUES(559,308,35,'1',429.0,429.0,1,0); +INSERT INTO order_items VALUES(560,309,40,'1',150.0,150.0,1,1); +INSERT INTO order_items VALUES(561,309,23,'1',149.0,149.0,1,1); +INSERT INTO order_items VALUES(562,309,19,'2',50.0,50.0,1,1); +INSERT INTO order_items VALUES(563,309,45,'3',19.0,19.0,1,1); +INSERT INTO order_items VALUES(564,309,29,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(565,309,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(566,309,76,'2',19.0,19.0,1,1); +INSERT INTO order_items VALUES(567,309,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(568,309,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(569,309,27,'1',24.0,24.0,1,1); +INSERT INTO order_items VALUES(570,310,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(571,311,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(572,311,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(573,311,56,'1',67.0,67.0,1,1); +INSERT INTO order_items VALUES(574,311,65,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(575,311,58,'1',59.0,59.0,1,1); +INSERT INTO order_items VALUES(576,311,100,'1',99.0,99.0,1,1); +INSERT INTO order_items VALUES(577,311,79,'1',33.0,33.0,1,1); +INSERT INTO order_items VALUES(578,312,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(579,312,58,'1',59.0,59.0,1,1); +INSERT INTO order_items VALUES(580,312,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(581,312,46,'1',109.0,109.0,1,1); +INSERT INTO order_items VALUES(582,312,100,'1',99.0,99.0,1,1); +INSERT INTO order_items VALUES(583,312,56,'1',67.0,67.0,1,1); +INSERT INTO order_items VALUES(584,312,8,'1',119.0,119.0,1,1); +INSERT INTO order_items VALUES(585,313,23,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(586,313,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(587,314,40,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(588,315,76,'1',19.0,19.0,0,0); +INSERT INTO order_items VALUES(589,315,19,'1',23.0,23.0,0,0); +INSERT INTO order_items VALUES(590,315,48,'1',55.0,55.0,0,0); +INSERT INTO order_items VALUES(591,316,19,'1',23.0,23.0,1,1); +INSERT INTO order_items VALUES(592,316,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(593,316,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(594,316,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(595,317,23,'1',149.0,149.0,0,0); +INSERT INTO order_items VALUES(596,318,14,'2',389.0,389.0,1,1); +INSERT INTO order_items VALUES(597,318,98,'2',419.0,419.0,1,1); +INSERT INTO order_items VALUES(598,319,11,'1',119.0,119.0,1,0); +INSERT INTO order_items VALUES(599,319,79,'2',33.0,33.0,1,0); +INSERT INTO order_items VALUES(600,320,38,'1',76.0,76.0,1,1); +INSERT INTO order_items VALUES(601,320,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(602,320,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(603,320,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(604,320,33,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(605,320,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(606,321,98,'1',419.0,419.0,0,0); +INSERT INTO order_items VALUES(607,322,35,'1',429.0,429.0,1,0); +INSERT INTO order_items VALUES(608,323,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(609,323,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(610,323,37,'1',139.0,139.0,1,1); +INSERT INTO order_items VALUES(611,323,76,'4',19.0,19.0,1,1); +INSERT INTO order_items VALUES(612,323,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(613,323,72,'1',14.0,14.0,1,1); +INSERT INTO order_items VALUES(614,323,92,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(615,323,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(616,323,97,'2',19.0,19.0,1,1); +INSERT INTO order_items VALUES(617,323,24,'1',198.0,198.0,1,1); +INSERT INTO order_items VALUES(618,324,8,'1',119.0,119.0,1,1); +INSERT INTO order_items VALUES(619,324,51,'1',169.0,169.0,1,0); +INSERT INTO order_items VALUES(620,324,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(621,324,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(622,324,100,'1',99.0,99.0,1,1); +INSERT INTO order_items VALUES(623,325,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(624,325,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(625,325,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(626,325,19,'1',23.0,23.0,1,1); +INSERT INTO order_items VALUES(627,325,23,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(628,326,2,'1',198.0,198.0,1,1); +INSERT INTO order_items VALUES(629,326,23,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(630,327,58,'1',59.0,59.0,1,0); +INSERT INTO order_items VALUES(631,327,38,'1',76.0,76.0,1,0); +INSERT INTO order_items VALUES(632,327,79,'2',33.0,33.0,1,0); +INSERT INTO order_items VALUES(633,328,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(634,329,13,'1',69.0,69.0,1,1); +INSERT INTO order_items VALUES(635,329,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(636,329,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(637,329,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(638,329,50,'1',119.0,119.0,1,1); +INSERT INTO order_items VALUES(639,330,72,'2',14.0,14.0,1,1); +INSERT INTO order_items VALUES(640,331,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(641,331,37,'1',139.0,139.0,1,0); +INSERT INTO order_items VALUES(642,332,38,'1',76.0,76.0,1,0); +INSERT INTO order_items VALUES(643,332,53,'1',239.0,239.0,1,1); +INSERT INTO order_items VALUES(644,333,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(645,333,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(646,333,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(647,333,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(648,333,19,'1',23.0,23.0,1,1); +INSERT INTO order_items VALUES(649,333,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(650,334,45,'2',19.0,19.0,1,1); +INSERT INTO order_items VALUES(651,334,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(652,334,94,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(653,334,33,'2',15.0,15.0,1,1); +INSERT INTO order_items VALUES(654,334,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(655,334,72,'2',14.0,14.0,1,1); +INSERT INTO order_items VALUES(656,334,19,'2',23.0,23.0,1,1); +INSERT INTO order_items VALUES(657,334,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(658,334,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(659,334,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(660,334,5,'1',26.0,26.0,1,0); +INSERT INTO order_items VALUES(661,334,65,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(662,334,13,'1',69.0,69.0,1,1); +INSERT INTO order_items VALUES(663,335,59,'2',98.0,98.0,0,0); +INSERT INTO order_items VALUES(664,335,60,'2',78.0,78.0,0,0); +INSERT INTO order_items VALUES(665,335,8,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(666,336,8,'1',119.0,119.0,1,1); +INSERT INTO order_items VALUES(667,336,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(668,336,60,'1',78.0,78.0,1,1); +INSERT INTO order_items VALUES(669,337,76,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(670,337,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(671,337,97,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(672,338,23,'2',125.0,125.0,1,1); +INSERT INTO order_items VALUES(673,339,65,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(674,339,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(675,339,13,'1',69.0,69.0,1,1); +INSERT INTO order_items VALUES(676,340,58,'1',59.0,59.0,1,0); +INSERT INTO order_items VALUES(677,340,7,'1',49.0,49.0,1,0); +INSERT INTO order_items VALUES(678,340,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(679,340,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(680,341,23,'2',125.0,125.0,1,0); +INSERT INTO order_items VALUES(681,342,9,'1',296.0,296.0,1,0); +INSERT INTO order_items VALUES(682,342,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(683,342,19,'2',50.0,50.0,1,0); +INSERT INTO order_items VALUES(684,342,60,'1',78.0,78.0,1,0); +INSERT INTO order_items VALUES(685,342,48,'3',55.0,55.0,1,0); +INSERT INTO order_items VALUES(686,343,58,'1',59.0,59.0,1,0); +INSERT INTO order_items VALUES(687,343,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(688,344,40,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(689,344,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(690,345,7,'1',49.0,49.0,1,0); +INSERT INTO order_items VALUES(691,345,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(692,345,44,'1',119.0,119.0,1,0); +INSERT INTO order_items VALUES(693,345,60,'1',78.0,78.0,1,0); +INSERT INTO order_items VALUES(694,345,48,'1',55.0,55.0,1,0); +INSERT INTO order_items VALUES(695,346,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(696,346,67,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(697,346,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(698,346,91,'1',39.0,39.0,1,1); +INSERT INTO order_items VALUES(699,346,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(700,346,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(701,346,74,'1',18.0,18.0,1,1); +INSERT INTO order_items VALUES(702,346,72,'1',14.0,14.0,1,1); +INSERT INTO order_items VALUES(703,347,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(704,347,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(705,347,65,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(706,347,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(707,347,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(708,347,29,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(709,347,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(710,347,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(711,347,72,'1',14.0,14.0,1,1); +INSERT INTO order_items VALUES(712,347,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(713,347,33,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(714,347,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(715,348,35,'1',429.0,429.0,0,0); +INSERT INTO order_items VALUES(748,381,1,'1',99.0,99.0,0,0); +INSERT INTO order_items VALUES(749,381,9,'1',296.0,296.0,0,0); +INSERT INTO order_items VALUES(750,382,91,'1',39.0,39.0,0,0); +INSERT INTO order_items VALUES(751,382,25,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(752,382,31,'1',29.0,29.0,0,0); +INSERT INTO order_items VALUES(753,383,25,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(754,384,84,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(755,384,36,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(756,385,79,'2',39.0,39.0,0,0); +INSERT INTO order_items VALUES(757,385,23,'2',133.0,133.0,0,0); +INSERT INTO order_items VALUES(758,386,91,'1',39.0,39.0,0,0); +CREATE TABLE IF NOT EXISTS "order_status" ("id" INTEGER PRIMARY KEY, "order_time" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "user_id" INTEGER NOT NULL, "order_id" INTEGER NOT NULL, "is_packaged" INTEGER NOT NULL DEFAULT false, "is_delivered" INTEGER NOT NULL DEFAULT false, "is_cancelled" INTEGER NOT NULL DEFAULT false, "cancel_reason" TEXT, "payment_state" TEXT NOT NULL DEFAULT 'pending', "cancellation_user_notes" TEXT, "cancellation_admin_notes" TEXT, "cancellation_reviewed" INTEGER NOT NULL DEFAULT false, "cancellation_reviewed_at" TEXT, "refund_coupon_id" INTEGER, "is_cancelled_by_admin" INTEGER); +INSERT INTO order_status VALUES(1,'2025-11-19T09:21:36.005Z',3,1,1,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(2,'2025-11-19T09:38:30.002Z',1,2,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(3,'2025-11-19T11:46:20.300Z',1,3,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(4,'2025-11-19T11:47:33.139Z',1,4,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(5,'2025-11-19T11:57:48.269Z',1,5,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(6,'2025-11-19T12:13:52.466Z',1,6,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(7,'2025-11-19T12:15:06.264Z',1,7,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(8,'2025-11-19T12:18:02.760Z',1,8,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(9,'2025-11-19T12:23:19.913Z',1,9,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(10,'2025-11-19T12:24:04.853Z',1,10,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(11,'2025-11-19T12:32:19.093Z',1,11,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(12,'2025-11-19T12:34:24.892Z',1,12,0,0,1,'Simply','success','Simply',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(13,'2025-11-19T12:36:42.741Z',1,13,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(14,'2025-11-19T12:39:28.501Z',1,14,0,0,1,'Simply','success','Simply',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(15,'2025-11-20T13:57:28.656Z',1,15,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(16,'2025-11-20T13:58:25.443Z',1,16,0,0,1,'Just for fun','pending','Just for fun',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(17,'2025-11-20T13:59:33.401Z',1,17,0,0,1,'Simply','pending','Simply',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(18,'2025-11-22T06:22:17.202Z',1,18,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(19,'2025-11-22T22:47:06.288Z',2,19,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(20,'2025-11-22T22:47:51.311Z',2,20,0,0,1,'Demo ','cod','Demo ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(21,'2025-11-23T06:17:57.049Z',1,21,1,1,1,'Having some fun','success','Having some fun',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(22,'2025-11-24T05:57:28.143Z',3,22,1,1,1,'On more need','cod','On more need',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(23,'2025-11-24T05:57:47.787Z',3,23,1,1,1,'No more need','success','No more need',NULL,1,'2025-11-24T06:07:29.145Z',NULL,NULL); +INSERT INTO order_status VALUES(24,'2025-11-25T00:59:10.926Z',2,24,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(25,'2025-11-25T05:22:32.946Z',1,25,0,0,1,'Will order again. ','success','Will order again. ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(26,'2025-11-27T06:03:25.875Z',1,26,0,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(27,'2025-11-28T05:42:30.513Z',1,27,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(28,'2025-11-28T08:13:28.023Z',1,28,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(29,'2025-11-28T13:35:07.141Z',1,29,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(30,'2025-11-28T22:21:06.630Z',1,30,0,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(31,'2025-11-28T22:24:57.085Z',1,31,0,0,1,'Not paid for','pending','Not paid for',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(32,'2025-11-28T22:34:41.736Z',1,32,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(33,'2025-11-28T22:36:50.767Z',1,33,0,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(34,'2025-11-28T22:52:17.319Z',1,34,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(35,'2025-11-28T22:58:18.465Z',1,35,0,0,1,'Payment failed','pending','Payment failed',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(36,'2025-11-28T23:08:27.789Z',1,36,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(37,'2025-11-28T23:09:42.893Z',1,37,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(38,'2025-11-28T23:11:19.776Z',1,38,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(39,'2025-11-28T23:17:00.716Z',1,39,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(40,'2025-11-28T23:17:55.763Z',1,40,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(41,'2025-11-28T23:22:23.472Z',1,41,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(42,'2025-11-28T23:23:26.081Z',1,42,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(43,'2025-11-28T23:31:53.995Z',1,43,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(44,'2025-11-28T23:33:25.999Z',1,44,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(45,'2025-11-28T23:35:17.386Z',1,45,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(46,'2025-11-28T23:42:33.188Z',1,46,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(47,'2025-11-29T00:35:31.578Z',1,47,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(48,'2025-11-29T00:47:37.657Z',1,48,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(49,'2025-11-29T00:51:57.402Z',1,49,0,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(50,'2025-11-29T01:06:18.087Z',1,50,0,0,1,'Testing cancellation functionality','success','Testing cancellation functionality',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(51,'2025-11-29T01:40:22.677Z',1,51,0,0,1,'Testingg','success','Testingg',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(52,'2025-11-29T01:51:02.498Z',1,52,0,0,1,'Testing','success','Testing',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(53,'2025-11-29T01:57:47.891Z',1,53,0,0,1,'Testing 3','success','Testing 3',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(54,'2025-11-29T03:01:07.992Z',1,54,1,1,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(55,'2025-12-04T23:32:41.242Z',2,55,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(56,'2025-12-10T10:02:38.859Z',4,56,0,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(57,'2025-12-10T10:04:32.211Z',4,57,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(58,'2025-12-13T11:19:59.242Z',1,58,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(59,'2025-12-13T11:23:12.720Z',1,59,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(60,'2025-12-13T11:23:12.720Z',1,60,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(61,'2025-12-13T11:24:58.073Z',1,61,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(62,'2025-12-13T11:24:58.073Z',1,62,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(63,'2025-12-13T11:30:04.358Z',1,63,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(64,'2025-12-13T11:31:12.284Z',1,64,0,0,1,'just for fun','pending','just for fun',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(65,'2025-12-13T11:31:12.284Z',1,65,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(66,'2025-12-15T09:42:52.294Z',1,66,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(67,'2025-12-15T09:46:00.443Z',1,67,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(68,'2025-12-15T09:57:50.680Z',1,68,0,0,1,'funnn','cod','funnn',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(69,'2025-12-18T04:55:00.617Z',2,69,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(70,'2025-12-19T01:02:15.969Z',15,70,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(71,'2025-12-19T03:02:11.838Z',17,71,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(72,'2025-12-19T03:07:12.056Z',17,72,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(73,'2025-12-19T03:40:04.180Z',17,73,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(74,'2025-12-19T03:46:32.062Z',17,74,0,0,1,'Xdf','cod','Xdf',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(75,'2025-12-19T03:55:08.427Z',17,75,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(76,'2025-12-19T03:57:05.639Z',17,76,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(77,'2025-12-19T04:02:06.098Z',17,77,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(78,'2025-12-19T07:02:11.424Z',15,78,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(79,'2025-12-19T07:53:09.910Z',15,79,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(80,'2025-12-19T09:10:25.557Z',17,80,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(81,'2025-12-19T09:49:01.904Z',17,81,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(82,'2025-12-19T09:55:53.524Z',17,82,1,1,0,NULL,'cod',NULL,NULL,0,NULL,7,NULL); +INSERT INTO order_status VALUES(83,'2025-12-19T10:37:21.739Z',17,83,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(84,'2025-12-19T10:46:56.208Z',17,84,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(85,'2025-12-19T11:01:02.225Z',17,85,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(86,'2025-12-19T11:26:56.607Z',17,86,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(87,'2025-12-19T11:38:46.198Z',17,87,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(88,'2025-12-20T05:46:31.197Z',17,88,0,0,1,'Hh','cod','Hh',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(89,'2025-12-20T15:09:16.076Z',1,89,0,0,1,'Simply','cod','Simply',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(90,'2025-12-20T21:38:45.891Z',17,90,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(91,'2025-12-20T21:39:35.232Z',17,91,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(92,'2025-12-22T05:12:52.301Z',15,92,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(93,'2025-12-22T05:22:59.518Z',15,93,0,0,1,replace('Plz cancle this order \nIt''s mistake to order ','\n',char(10)),'cod',replace('Plz cancle this order \nIt''s mistake to order ','\n',char(10)),NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(94,'2025-12-22T08:12:49.911Z',15,94,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(95,'2025-12-22T08:40:14.765Z',15,95,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(96,'2025-12-22T09:05:51.054Z',20,96,0,0,1,'Sorry by mistake ordered ','cod','Sorry by mistake ordered ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(97,'2025-12-23T00:47:34.830Z',2,97,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(98,'2025-12-23T00:47:34.830Z',2,98,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(99,'2025-12-23T00:50:21.885Z',2,99,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(100,'2025-12-23T08:23:28.094Z',15,100,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(101,'2025-12-23T11:45:50.591Z',17,101,0,0,1,'Hh','cod','Hh',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(102,'2025-12-23T11:49:14.841Z',17,102,0,0,1,'Gg','cod','Gg',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(103,'2025-12-23T21:09:04.114Z',22,103,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(104,'2025-12-23T21:20:33.284Z',22,104,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(105,'2025-12-23T21:20:33.284Z',22,105,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(106,'2025-12-24T05:02:01.957Z',15,106,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(107,'2025-12-24T05:02:01.957Z',15,107,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(108,'2025-12-24T05:02:01.957Z',15,108,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(109,'2025-12-24T05:02:01.957Z',15,109,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(110,'2025-12-25T07:48:48.478Z',1,110,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(111,'2025-12-25T10:06:02.108Z',1,111,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(112,'2025-12-25T10:06:02.108Z',1,112,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(113,'2025-12-25T10:32:45.526Z',1,113,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(114,'2025-12-26T19:38:17.686Z',16,114,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(115,'2025-12-26T23:02:15.299Z',1,115,0,0,0,NULL,'cod',NULL,NULL,0,NULL,9,NULL); +INSERT INTO order_status VALUES(116,'2025-12-26T23:02:15.299Z',1,116,1,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(117,'2025-12-27T12:09:01.944Z',2,117,1,1,0,NULL,'cod',NULL,NULL,0,NULL,10,NULL); +INSERT INTO order_status VALUES(118,'2025-12-27T12:09:01.944Z',2,118,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(119,'2025-12-27T12:09:01.944Z',2,119,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(120,'2025-12-28T08:37:33.787Z',2,120,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(121,'2025-12-28T08:41:24.904Z',2,121,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(122,'2025-12-28T22:17:14.213Z',1,122,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(123,'2026-01-01T03:08:22.110Z',2,123,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(124,'2026-01-01T03:09:11.420Z',2,124,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(125,'2026-01-01T03:14:07.865Z',2,125,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(126,'2026-01-01T05:09:15.780Z',2,126,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(127,'2026-01-01T06:40:15.182Z',2,127,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(128,'2026-01-03T02:42:48.013Z',26,128,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(129,'2026-01-04T07:35:41.022Z',2,129,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(130,'2026-01-04T07:37:44.994Z',12,130,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(131,'2026-01-04T13:20:00.136Z',21,131,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(132,'2026-01-06T07:21:22.047Z',1,132,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(133,'2026-01-06T07:45:52.275Z',30,133,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(134,'2026-01-06T11:13:08.862Z',21,134,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(135,'2026-01-07T09:32:56.404Z',22,135,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(136,'2026-01-07T10:17:55.795Z',22,136,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(137,'2026-01-07T10:22:37.964Z',22,137,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(138,'2026-01-07T18:03:50.419Z',2,138,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(139,'2026-01-12T08:37:09.285Z',2,139,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(140,'2026-01-13T03:57:08.501Z',1,140,0,0,1,'Cancell','cod','Cancell',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(141,'2026-01-13T04:16:11.800Z',1,141,0,0,1,'Cancell','cod','Cancell',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(142,'2026-01-13T09:26:55.340Z',34,142,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(143,'2026-01-14T13:37:20.272Z',1,143,0,0,1,'Cancell','cod','Cancell',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(144,'2026-01-14T13:40:52.673Z',1,144,0,0,1,'Cancelll','cod','Cancelll',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(145,'2026-01-14T13:43:51.004Z',1,145,0,0,1,'Cabcell','cod','Cabcell',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(146,'2026-01-14T13:46:29.183Z',1,146,0,0,1,'Cancel','cod',NULL,'Cancel',1,'2026-01-28T00:39:48.321Z',NULL,1); +INSERT INTO order_status VALUES(147,'2026-01-14T13:48:47.459Z',1,147,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(148,'2026-01-14T14:18:23.106Z',1,148,0,0,1,'Area Not Serviced yet','cod',NULL,'Area Not Serviced yet',1,'2026-01-17T23:01:50.046Z',NULL,1); +INSERT INTO order_status VALUES(149,'2026-01-15T10:38:51.399Z',2,149,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(150,'2026-01-15T10:38:51.399Z',2,150,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(151,'2026-01-16T07:20:20.462Z',2,151,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(152,'2026-01-16T07:20:39.316Z',2,152,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(153,'2026-01-16T07:21:00.354Z',2,153,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(154,'2026-01-16T07:21:27.051Z',2,154,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(155,'2026-01-16T07:22:32.758Z',2,155,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(156,'2026-01-16T23:21:39.925Z',2,156,0,0,1,'Cancel ','cod',NULL,'Cancel ',1,'2026-01-27T22:30:19.302Z',NULL,1); +INSERT INTO order_status VALUES(157,'2026-01-18T00:56:50.633Z',22,157,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(158,'2026-01-18T03:02:03.729Z',2,158,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(159,'2026-01-18T09:53:08.648Z',22,159,0,0,1,'Reason for cancellation ','cod','Reason for cancellation ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(160,'2026-01-18T10:14:06.341Z',22,160,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(161,'2026-01-18T10:20:14.848Z',22,161,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(162,'2026-01-18T10:24:09.003Z',22,162,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(163,'2026-01-18T21:46:46.398Z',22,163,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(164,'2026-01-19T14:17:52.639Z',1,164,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(165,'2026-01-23T03:22:03.840Z',2,165,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(166,'2026-01-23T10:37:42.952Z',25,166,0,0,1,'I''ll order later','cod','I''ll order later',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(167,'2026-01-24T02:56:06.720Z',2,167,0,0,1,'Unnecessary order','cod',NULL,'Unnecessary order',1,'2026-01-27T22:26:35.510Z',NULL,1); +INSERT INTO order_status VALUES(168,'2026-01-24T14:56:52.645Z',1,168,0,0,1,'Cancel ','cod',NULL,'Cancel ',1,'2026-01-27T22:27:15.817Z',NULL,1); +INSERT INTO order_status VALUES(169,'2026-01-24T20:44:03.566Z',22,169,0,0,1,'Cancel ','cod',NULL,'Cancel ',1,'2026-01-27T22:27:32.422Z',NULL,1); +INSERT INTO order_status VALUES(170,'2026-01-25T23:35:31.364Z',29,170,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(171,'2026-01-27T06:44:08.218Z',64,171,0,0,1,'Unnecessary','cod',NULL,'Unnecessary',1,'2026-01-27T22:25:10.943Z',NULL,1); +INSERT INTO order_status VALUES(172,'2026-01-27T11:29:12.321Z',65,172,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(173,'2026-01-27T11:29:12.321Z',65,173,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(174,'2026-01-28T00:03:00.256Z',60,174,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(175,'2026-01-28T00:38:05.827Z',1,175,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(176,'2026-01-28T00:38:05.827Z',1,176,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(177,'2026-01-28T01:51:10.288Z',22,177,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(178,'2026-01-28T01:51:10.288Z',22,178,1,1,1,'Cancel ','cod',NULL,'Cancel ',1,'2026-01-28T10:02:31.195Z',NULL,1); +INSERT INTO order_status VALUES(179,'2026-01-28T10:40:36.187Z',58,179,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(180,'2026-01-29T22:42:25.446Z',38,180,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(181,'2026-01-30T00:31:02.610Z',1,181,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(182,'2026-01-30T00:46:59.261Z',38,182,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(183,'2026-01-30T01:42:25.118Z',1,183,0,0,1,'Not a serious order','cod',NULL,'Not a serious order',1,'2026-01-30T02:09:22.274Z',NULL,1); +INSERT INTO order_status VALUES(184,'2026-01-30T03:13:07.360Z',38,184,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(185,'2026-01-31T01:44:10.735Z',54,185,0,0,1,'No response from customer ','cod',NULL,'No response from customer ',1,'2026-01-31T07:36:00.972Z',NULL,1); +INSERT INTO order_status VALUES(186,'2026-01-31T01:44:48.105Z',54,186,0,0,1,'No response from customer','cod',NULL,'No response from customer',1,'2026-01-31T07:35:41.324Z',NULL,1); +INSERT INTO order_status VALUES(187,'2026-01-31T04:25:19.495Z',78,187,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(188,'2026-01-31T05:26:01.981Z',1,188,0,0,1,'Cancel','cod','Cancel',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(189,'2026-01-31T06:32:04.589Z',1,189,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(190,'2026-01-31T22:04:46.197Z',1,190,0,0,1,'Yes’s cancel','cod','Yes’s cancel',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(191,'2026-02-01T00:28:05.843Z',7,191,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(192,'2026-02-01T01:31:50.642Z',74,192,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(193,'2026-02-01T01:56:14.147Z',74,193,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(194,'2026-02-01T02:19:04.918Z',38,194,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(195,'2026-02-01T03:22:19.400Z',22,195,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(196,'2026-02-01T04:41:15.161Z',82,196,0,0,1,'Zdyt','cod','Zdyt',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(197,'2026-02-01T04:46:41.872Z',82,197,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(202,'2026-02-01T10:07:16.233Z',88,202,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(203,'2026-02-02T04:53:54.970Z',92,203,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(204,'2026-02-02T06:48:31.456Z',38,204,0,0,1,'Mistake ','cod','Mistake ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(205,'2026-02-02T06:50:24.727Z',38,205,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(206,'2026-02-02T08:27:54.149Z',7,206,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(207,'2026-02-02T09:01:16.193Z',1,207,0,0,1,'Will order Mutton','cod','Will order Mutton',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(208,'2026-02-02T12:53:25.021Z',1,208,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(209,'2026-02-02T22:40:01.666Z',38,209,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(210,'2026-02-03T00:26:45.500Z',98,210,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(211,'2026-02-03T00:28:30.230Z',98,211,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(212,'2026-02-03T03:11:48.475Z',24,212,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(213,'2026-02-03T07:33:13.302Z',46,213,0,0,1,'Yes','cod','Yes',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(214,'2026-02-03T08:40:49.538Z',38,214,0,0,1,'I want to change shedule ','cod','I want to change shedule ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(215,'2026-02-03T08:43:00.789Z',38,215,1,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(216,'2026-02-03T10:16:16.915Z',81,216,0,0,1,'No response from customer','cod',NULL,'No response from customer',1,'2026-02-03T23:34:45.350Z',NULL,1); +INSERT INTO order_status VALUES(217,'2026-02-04T01:36:25.133Z',96,217,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(218,'2026-02-04T02:41:07.508Z',81,218,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(219,'2026-02-04T07:47:53.067Z',1,219,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(220,'2026-02-05T03:15:53.554Z',103,220,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(221,'2026-02-05T04:00:30.739Z',24,221,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(222,'2026-02-06T05:49:57.315Z',114,222,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(223,'2026-02-06T06:21:43.659Z',1,223,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(224,'2026-02-06T06:25:36.038Z',71,224,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(225,'2026-02-06T08:53:10.229Z',1,225,0,0,1,'Testing cancel Telegram Notification ','cod',NULL,'Testing cancel Telegram Notification ',1,'2026-02-06T23:20:32.419Z',NULL,1); +INSERT INTO order_status VALUES(226,'2026-02-06T10:26:39.531Z',115,226,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(227,'2026-02-06T10:26:39.531Z',115,227,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(228,'2026-02-06T16:16:47.346Z',115,228,0,0,1,'Ordered by mistake','cod','Ordered by mistake',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(229,'2026-02-06T23:01:13.646Z',109,229,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(230,'2026-02-06T23:28:37.545Z',103,230,0,0,1,'Wrong address ','cod','Wrong address ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(231,'2026-02-06T23:36:55.424Z',103,231,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(232,'2026-02-07T07:06:17.096Z',119,232,0,0,1,'The order is still pending ','cod','The order is still pending ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(233,'2026-02-07T07:24:42.810Z',38,233,0,0,1,'Change shedule ','cod','Change shedule ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(234,'2026-02-07T07:25:52.698Z',38,234,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(235,'2026-02-07T23:11:07.297Z',120,235,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(236,'2026-02-07T23:43:00.160Z',98,236,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(237,'2026-02-07T23:58:12.863Z',38,237,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(238,'2026-02-08T00:48:23.089Z',121,238,0,0,1,'We buy','cod','We buy',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(239,'2026-02-08T00:55:15.154Z',121,239,0,0,1,'Sorry that is cost is more expensive then market price','cod','Sorry that is cost is more expensive then market price',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(240,'2026-02-08T04:28:56.405Z',121,240,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(241,'2026-02-08T04:29:20.307Z',121,241,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(242,'2026-02-08T04:29:55.364Z',121,242,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(243,'2026-02-08T04:30:37.777Z',121,243,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(244,'2026-02-08T04:32:20.374Z',121,244,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(245,'2026-02-08T04:33:59.746Z',121,245,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(246,'2026-02-08T05:09:24.720Z',12,246,0,0,1,'J','cod',NULL,'J',1,'2026-02-08T23:17:27.385Z',NULL,1); +INSERT INTO order_status VALUES(247,'2026-02-09T01:52:55.524Z',2,247,0,0,1,'Demo for correct location ','cod','Demo for correct location ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(248,'2026-02-09T07:56:42.048Z',125,248,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(249,'2026-02-10T06:04:04.471Z',3,249,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(250,'2026-02-10T21:59:33.763Z',2,250,0,0,1,'Demo','cod',NULL,'Demo',1,'2026-02-10T22:00:06.670Z',NULL,1); +INSERT INTO order_status VALUES(251,'2026-02-11T16:13:20.142Z',115,251,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(252,'2026-02-11T16:13:20.142Z',115,252,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(253,'2026-02-11T16:13:20.142Z',115,253,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(254,'2026-02-14T01:01:13.769Z',114,254,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(255,'2026-02-15T00:00:53.358Z',120,255,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(256,'2026-02-16T01:21:48.050Z',2,256,0,0,1,'Demo','cod',NULL,'Demo',1,'2026-02-16T01:22:51.309Z',NULL,1); +INSERT INTO order_status VALUES(257,'2026-02-16T04:14:55.522Z',134,257,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(258,'2026-02-16T04:22:00.592Z',134,258,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(259,'2026-02-17T00:44:27.971Z',120,259,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(260,'2026-02-17T07:16:27.421Z',1,260,0,0,1,'D','cod',NULL,'D',1,'2026-02-18T06:14:42.228Z',NULL,1); +INSERT INTO order_status VALUES(261,'2026-02-17T07:30:07.521Z',136,261,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(262,'2026-02-17T07:45:43.734Z',136,262,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(263,'2026-02-17T07:52:41.197Z',3,263,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(264,'2026-02-17T19:47:31.551Z',141,264,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(265,'2026-02-17T22:56:42.974Z',143,265,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(266,'2026-02-17T23:04:14.592Z',143,266,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(267,'2026-02-17T23:27:35.908Z',130,267,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(268,'2026-02-18T00:28:16.181Z',132,268,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(269,'2026-02-18T01:34:08.441Z',119,269,0,0,1,'No response from customer','cod',NULL,'No response from customer',1,'2026-02-18T04:17:30.092Z',NULL,1); +INSERT INTO order_status VALUES(270,'2026-02-18T02:04:32.495Z',119,270,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(271,'2026-02-18T03:46:31.297Z',145,271,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(272,'2026-02-18T05:15:38.160Z',138,272,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(273,'2026-02-18T05:15:38.161Z',138,273,0,0,1,'Cancel order ','cod','Cancel order ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(274,'2026-02-18T05:15:59.580Z',147,274,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(275,'2026-02-18T06:53:25.416Z',24,275,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(276,'2026-02-18T07:16:24.911Z',82,276,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(277,'2026-02-18T07:31:33.186Z',148,277,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(278,'2026-02-18T23:12:20.428Z',38,278,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(279,'2026-02-19T00:00:57.733Z',156,279,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(280,'2026-02-19T01:04:09.663Z',99,280,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(281,'2026-02-19T01:57:57.613Z',82,281,0,0,1,'Its late','cod','Its late',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(282,'2026-02-19T01:59:43.093Z',82,282,0,0,1,'Its late','cod','Its late',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(283,'2026-02-19T02:16:07.844Z',66,283,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(284,'2026-02-19T03:09:55.456Z',120,284,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(285,'2026-02-19T03:40:51.549Z',159,285,0,0,1,'So late and slow service ','cod','So late and slow service ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(286,'2026-02-19T03:49:55.745Z',160,286,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(287,'2026-02-19T03:54:05.397Z',64,287,0,0,1,'N','cod',NULL,'N',1,'2026-02-19T04:40:17.239Z',NULL,1); +INSERT INTO order_status VALUES(288,'2026-02-19T03:54:05.397Z',64,288,0,0,1,'D','cod',NULL,'D',1,'2026-02-19T04:37:45.087Z',NULL,1); +INSERT INTO order_status VALUES(289,'2026-02-19T04:00:41.001Z',160,289,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(290,'2026-02-19T04:09:35.859Z',151,290,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(291,'2026-02-19T04:16:50.189Z',4,291,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(292,'2026-02-19T05:08:36.439Z',162,292,0,0,1,'No response from customer ','cod',NULL,'No response from customer ',1,'2026-02-19T07:22:49.182Z',NULL,1); +INSERT INTO order_status VALUES(293,'2026-02-19T05:08:36.736Z',162,293,0,0,1,'No response from customer ','cod',NULL,'No response from customer ',1,'2026-02-19T07:22:21.525Z',NULL,1); +INSERT INTO order_status VALUES(294,'2026-02-19T06:14:11.047Z',32,294,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(295,'2026-02-19T06:49:34.891Z',163,295,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(296,'2026-02-19T12:38:24.984Z',38,296,0,0,1,'I don''t walt this because I will buy on Sunday ','cod','I don''t walt this because I will buy on Sunday ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(297,'2026-02-19T15:48:55.517Z',82,297,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(298,'2026-02-20T01:39:04.912Z',66,298,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(299,'2026-02-20T02:41:56.608Z',66,299,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(300,'2026-02-20T03:24:43.556Z',140,300,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(301,'2026-02-20T03:37:43.245Z',169,301,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(302,'2026-02-20T03:59:51.171Z',170,302,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(303,'2026-02-20T04:04:04.909Z',170,303,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(304,'2026-02-20T04:47:12.538Z',132,304,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(305,'2026-02-20T06:02:01.579Z',176,305,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(306,'2026-02-20T06:41:12.043Z',99,306,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(307,'2026-02-20T07:21:21.906Z',163,307,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(308,'2026-02-20T07:41:37.350Z',74,308,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(309,'2026-02-20T09:08:15.335Z',115,309,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(310,'2026-02-20T13:06:33.249Z',38,310,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(311,'2026-02-20T22:50:10.927Z',184,311,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(312,'2026-02-21T03:19:33.169Z',81,312,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(313,'2026-02-21T03:33:25.012Z',24,313,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(314,'2026-02-21T03:45:19.764Z',186,314,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(315,'2026-02-21T04:36:43.124Z',160,315,0,0,1,'Double order','cod',NULL,'Double order',1,'2026-02-21T04:45:00.817Z',NULL,1); +INSERT INTO order_status VALUES(316,'2026-02-21T04:40:27.736Z',160,316,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(317,'2026-02-21T06:23:19.310Z',32,317,0,0,1,'I want to change my order','cod','I want to change my order',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(318,'2026-02-21T12:32:34.307Z',7,318,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(319,'2026-02-21T19:42:40.619Z',141,319,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(320,'2026-02-21T19:42:40.619Z',141,320,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(321,'2026-02-21T22:34:37.439Z',120,321,0,0,1,replace('Kheema\n','\n',char(10)),'cod',replace('Kheema\n','\n',char(10)),NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(322,'2026-02-21T22:53:17.760Z',193,322,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(323,'2026-02-21T23:09:55.795Z',132,323,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(324,'2026-02-21T23:38:18.540Z',130,324,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(325,'2026-02-22T00:16:21.567Z',194,325,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(326,'2026-02-22T01:08:52.833Z',198,326,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(327,'2026-02-22T01:13:15.958Z',184,327,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(328,'2026-02-22T01:13:15.958Z',184,328,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(329,'2026-02-22T03:46:06.235Z',205,329,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(330,'2026-02-22T04:21:41.707Z',206,330,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(331,'2026-02-22T04:39:37.484Z',208,331,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(332,'2026-02-22T14:05:39.863Z',50,332,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(333,'2026-02-23T03:21:16.555Z',151,333,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(334,'2026-02-23T03:47:30.738Z',223,334,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(335,'2026-02-23T04:40:46.728Z',224,335,0,0,1,'By mistake ','cod','By mistake ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(336,'2026-02-23T04:44:00.644Z',224,336,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(337,'2026-02-23T04:45:56.017Z',224,337,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(338,'2026-02-23T05:51:07.943Z',38,338,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(339,'2026-02-23T06:46:04.203Z',225,339,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(340,'2026-02-23T22:40:33.438Z',228,340,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(341,'2026-02-24T01:44:30.406Z',230,341,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(342,'2026-02-24T01:46:05.872Z',229,342,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(343,'2026-02-24T02:52:22.431Z',224,343,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(344,'2026-02-24T04:15:41.683Z',158,344,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(345,'2026-02-24T05:47:59.572Z',3,345,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(346,'2026-02-24T07:17:54.419Z',149,346,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(347,'2026-02-24T12:55:21.432Z',50,347,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(348,'2026-02-25T02:47:44.024Z',132,348,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(381,'2026-02-26T11:24:06.998Z',1,381,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(382,'2026-02-26T11:30:33.419Z',1,382,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(383,'2026-02-26T11:34:03.543Z',1,383,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(384,'2026-02-26T11:36:20.560Z',1,384,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(385,'2026-03-09T10:16:59.219Z',1,385,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(386,'2026-03-26T01:19:29.108Z',1,386,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +CREATE TABLE IF NOT EXISTS "orders" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "address_id" INTEGER NOT NULL, "slot_id" INTEGER, "total_amount" REAL NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "is_cod" INTEGER NOT NULL DEFAULT false, "is_online_payment" INTEGER NOT NULL DEFAULT false, "payment_info_id" INTEGER, "readable_id" INTEGER NOT NULL, "admin_notes" TEXT, "user_notes" TEXT, "delivery_charge" REAL NOT NULL DEFAULT '0', "order_group_id" TEXT, "order_group_proportion" REAL, "is_flash_delivery" INTEGER NOT NULL DEFAULT false); +INSERT INTO orders VALUES(1,3,1,1,44.0,'2025-11-19T09:21:36.005Z',0,1,1,1,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(2,1,17,1,220.0,'2025-11-19T09:38:30.002Z',0,1,2,2,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(3,1,17,1,220.0,'2025-11-19T11:46:20.300Z',0,1,3,3,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(4,1,17,1,430.0,'2025-11-19T11:47:33.139Z',0,1,4,4,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(5,1,17,1,700.0,'2025-11-19T11:57:48.269Z',0,1,5,5,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(6,1,17,1,22.0,'2025-11-19T12:13:52.466Z',0,1,6,6,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(7,1,17,1,22.0,'2025-11-19T12:15:06.264Z',0,1,7,7,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(8,1,17,1,22.0,'2025-11-19T12:18:02.760Z',0,1,8,8,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(9,1,17,1,500.0,'2025-11-19T12:23:19.913Z',0,1,9,9,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(10,1,17,1,500.0,'2025-11-19T12:24:04.853Z',1,0,NULL,10,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(11,1,17,1,44.0,'2025-11-19T12:32:19.093Z',0,1,10,11,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(12,1,19,1,220.0,'2025-11-19T12:34:24.892Z',0,1,11,12,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(13,1,17,1,22.0,'2025-11-19T12:36:42.741Z',0,1,12,13,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(14,1,19,1,210.0,'2025-11-19T12:39:28.501Z',0,1,13,14,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(15,1,19,1,700.0,'2025-11-20T13:57:28.656Z',0,1,14,15,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(16,1,17,1,700.0,'2025-11-20T13:58:25.443Z',0,1,15,16,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(17,1,17,1,210.0,'2025-11-20T13:59:33.401Z',0,1,16,17,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(18,1,17,2,840.0,'2025-11-22T06:22:17.202Z',1,0,NULL,18,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(19,2,20,3,530.0,'2025-11-22T22:47:06.288Z',0,1,17,19,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(20,2,20,3,530.0,'2025-11-22T22:47:51.311Z',1,0,NULL,20,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(21,1,17,2,722.0,'2025-11-23T06:17:57.049Z',0,1,18,21,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(22,3,1,2,220.0,'2025-11-24T05:57:28.143Z',1,0,NULL,22,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(23,3,1,2,220.0,'2025-11-24T05:57:47.787Z',0,1,19,23,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(24,2,20,2,600.0,'2025-11-25T00:59:10.926Z',1,0,NULL,24,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(25,1,17,2,4560.0,'2025-11-25T05:22:32.946Z',0,1,20,25,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(26,1,19,4,9702.3999999999990251,'2025-11-27T06:03:25.875Z',0,1,21,26,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(27,1,19,4,9360.0,'2025-11-28T05:42:30.513Z',1,0,NULL,27,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(28,1,17,4,185.59999999999998721,'2025-11-28T08:13:28.023Z',1,0,NULL,28,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(29,1,17,2,700.0,'2025-11-28T13:35:07.141Z',1,0,NULL,29,NULL,'Fresh and no wastage ',0.0,NULL,NULL,0); +INSERT INTO orders VALUES(30,1,19,4,1870.0,'2025-11-28T22:21:06.630Z',0,1,22,30,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(31,1,19,4,1870.0,'2025-11-28T22:24:57.085Z',0,1,23,31,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(32,1,19,4,1496.0,'2025-11-28T22:34:41.736Z',0,1,24,32,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(33,1,19,4,560.0,'2025-11-28T22:36:50.767Z',0,1,25,33,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(34,1,19,4,1496.0,'2025-11-28T22:52:17.319Z',1,0,NULL,34,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(35,1,19,4,1120.0,'2025-11-28T22:58:18.465Z',0,1,26,35,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(36,1,19,4,2310.0,'2025-11-28T23:08:27.789Z',1,0,NULL,36,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(37,1,19,4,2310.0,'2025-11-28T23:09:42.893Z',0,1,27,37,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(38,1,19,4,1620.0,'2025-11-28T23:11:19.776Z',0,1,28,38,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(39,1,19,4,1320.0,'2025-11-28T23:17:00.716Z',1,0,NULL,39,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(40,1,19,4,1320.0,'2025-11-28T23:17:55.763Z',0,1,29,40,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(41,1,19,4,1320.0,'2025-11-28T23:22:23.472Z',0,1,30,41,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(42,1,19,4,376.0,'2025-11-28T23:23:26.081Z',0,1,31,42,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(43,1,19,4,1464.0,'2025-11-28T23:31:53.995Z',0,1,32,43,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(44,1,19,4,1464.0,'2025-11-28T23:33:25.999Z',0,1,33,44,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(45,1,19,4,1496.0,'2025-11-28T23:35:17.386Z',0,1,34,45,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(46,1,19,4,6904.0,'2025-11-28T23:42:33.188Z',0,1,35,46,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(47,1,19,4,752.0,'2025-11-29T00:35:31.578Z',0,1,36,47,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(48,1,19,4,1122.0,'2025-11-29T00:47:37.657Z',0,1,37,48,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(49,1,19,4,3156.0,'2025-11-29T00:51:57.402Z',0,1,38,49,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(50,1,19,4,4686.0,'2025-11-29T01:06:18.087Z',0,1,39,50,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(51,1,17,4,250.0,'2025-11-29T01:40:22.677Z',0,1,40,51,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(52,1,17,4,250.0,'2025-11-29T01:51:02.498Z',0,1,41,52,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(53,1,17,4,400.0,'2025-11-29T01:57:47.891Z',0,1,42,53,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(54,1,19,4,2850.0,'2025-11-29T03:01:07.992Z',0,1,43,54,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(55,2,20,5,1710.0,'2025-12-04T23:32:41.242Z',1,0,NULL,55,NULL,'Good packaging',0.0,NULL,NULL,0); +INSERT INTO orders VALUES(56,4,21,6,64.0,'2025-12-10T10:02:38.859Z',0,1,44,56,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(57,4,22,6,72.0,'2025-12-10T10:04:32.211Z',0,1,45,57,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(58,1,19,7,6900.0,'2025-12-13T11:19:59.242Z',1,0,NULL,58,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(59,1,19,7,210.0,'2025-12-13T11:23:12.720Z',1,0,NULL,60,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(60,1,19,9,350.0,'2025-12-13T11:23:12.720Z',1,0,NULL,61,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(61,1,19,7,210.0,'2025-12-13T11:24:58.073Z',1,0,NULL,63,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(62,1,19,9,700.0,'2025-12-13T11:24:58.073Z',1,0,NULL,64,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(63,1,19,7,1120.0,'2025-12-13T11:30:04.358Z',0,1,46,66,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(64,1,19,7,420.0,'2025-12-13T11:31:12.284Z',0,1,47,68,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(65,1,19,9,700.0,'2025-12-13T11:31:12.284Z',0,1,47,69,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(66,1,17,9,560.0,'2025-12-15T09:42:52.294Z',1,0,NULL,71,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(67,1,17,8,660.0,'2025-12-15T09:46:00.443Z',1,0,NULL,73,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(68,1,17,9,660.0,'2025-12-15T09:57:50.680Z',1,0,NULL,75,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(69,2,20,8,1400.0,'2025-12-18T04:55:00.617Z',1,0,NULL,77,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(70,15,25,8,50.0,'2025-12-19T01:02:15.969Z',1,0,NULL,79,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(71,17,26,8,1642.0,'2025-12-19T03:02:11.838Z',1,0,NULL,81,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(72,17,26,8,50.0,'2025-12-19T03:07:12.056Z',1,0,NULL,83,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(73,17,26,8,216.0,'2025-12-19T03:40:04.180Z',1,0,NULL,85,NULL,'Hello',0.0,NULL,NULL,0); +INSERT INTO orders VALUES(74,17,28,8,1500.0,'2025-12-19T03:46:32.062Z',1,0,NULL,87,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(75,17,28,8,21000.0,'2025-12-19T03:55:08.427Z',1,0,NULL,89,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(76,17,28,8,250.0,'2025-12-19T03:57:05.639Z',1,0,NULL,91,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(77,17,28,8,22.0,'2025-12-19T04:02:06.098Z',1,0,NULL,93,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(78,15,25,8,1400.0,'2025-12-19T07:02:11.424Z',1,0,NULL,95,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(79,15,24,12,300.0,'2025-12-19T07:53:09.910Z',1,0,NULL,97,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(80,17,28,8,1400.0,'2025-12-19T09:10:25.557Z',1,0,NULL,99,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(81,17,28,8,72.0,'2025-12-19T09:49:01.904Z',1,0,NULL,101,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(82,17,28,13,22.0,'2025-12-19T09:55:53.524Z',1,0,NULL,103,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(83,17,26,8,72.0,'2025-12-19T10:37:21.739Z',1,0,NULL,105,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(84,17,26,8,72.0,'2025-12-19T10:46:56.208Z',1,0,NULL,107,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(85,17,26,8,50.0,'2025-12-19T11:01:02.225Z',1,0,NULL,109,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(86,17,26,9,120.0,'2025-12-19T11:26:56.607Z',1,0,NULL,111,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(87,17,26,8,72.0,'2025-12-19T11:38:46.198Z',1,0,NULL,113,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(88,17,26,8,22.0,'2025-12-20T05:46:31.197Z',1,0,NULL,115,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(89,1,17,8,2940.0,'2025-12-20T15:09:16.076Z',1,0,NULL,117,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(90,17,26,8,64.0,'2025-12-20T21:38:45.891Z',1,0,NULL,119,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(91,17,26,10,60.0,'2025-12-20T21:39:35.232Z',1,0,NULL,121,NULL,'Fff',20.0,NULL,NULL,0); +INSERT INTO orders VALUES(92,15,25,8,42.0,'2025-12-22T05:12:52.301Z',1,0,NULL,123,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(93,15,25,12,220.0,'2025-12-22T05:22:59.518Z',1,0,NULL,125,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(94,15,25,17,140.0,'2025-12-22T08:12:49.911Z',1,0,NULL,127,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(95,15,25,8,152.0,'2025-12-22T08:40:14.765Z',1,0,NULL,129,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(96,20,30,8,70.0,'2025-12-22T09:05:51.054Z',1,0,NULL,131,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(97,2,20,10,220.0,'2025-12-23T00:47:34.830Z',1,0,NULL,133,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(98,2,20,8,44.0,'2025-12-23T00:47:34.830Z',1,0,NULL,134,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(99,2,20,8,1400.0,'2025-12-23T00:50:21.885Z',1,0,NULL,136,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(100,15,24,16,1000.0,'2025-12-23T08:23:28.094Z',1,0,NULL,138,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(101,17,26,8,42.0,'2025-12-23T11:45:50.591Z',1,0,NULL,140,NULL,'Hello',20.0,NULL,NULL,0); +INSERT INTO orders VALUES(102,17,26,8,92.0,'2025-12-23T11:49:14.841Z',1,0,NULL,142,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(103,22,31,16,120.0,'2025-12-23T21:09:04.114Z',1,0,NULL,144,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(104,22,31,8,2736.0,'2025-12-23T21:20:33.284Z',1,0,NULL,146,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(105,22,31,9,7700.0,'2025-12-23T21:20:33.284Z',1,0,NULL,147,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(106,15,24,8,92.0,'2025-12-24T05:02:01.957Z',1,0,NULL,149,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(107,15,24,17,140.0,'2025-12-24T05:02:01.957Z',1,0,NULL,150,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(108,15,24,10,100.0,'2025-12-24T05:02:01.957Z',1,0,NULL,151,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(109,15,24,16,120.0,'2025-12-24T05:02:01.957Z',1,0,NULL,152,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(110,1,17,16,64.0,'2025-12-25T07:48:48.478Z',1,0,NULL,154,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(111,1,17,16,444.0,'2025-12-25T10:06:02.108Z',1,0,NULL,156,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(112,1,17,18,20.0,'2025-12-25T10:06:02.108Z',1,0,NULL,157,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(113,1,17,16,350.0,'2025-12-25T10:32:45.526Z',1,0,NULL,159,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(114,16,32,16,92.0,'2025-12-26T19:38:17.686Z',1,0,NULL,161,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(115,1,17,16,236.0,'2025-12-26T23:02:15.299Z',1,0,NULL,163,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(116,1,17,18,560.0,'2025-12-26T23:02:15.299Z',1,0,NULL,164,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(117,2,20,16,128.41999999999997861,'2025-12-27T12:09:01.944Z',1,0,NULL,166,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(118,2,20,18,112.15999999999999303,'2025-12-27T12:09:01.944Z',1,0,NULL,167,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(119,2,20,17,65.419999999999998152,'2025-12-27T12:09:01.944Z',1,0,NULL,168,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(120,2,20,19,590.0,'2025-12-28T08:37:33.787Z',1,0,NULL,170,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(121,2,20,19,420.0,'2025-12-28T08:41:24.904Z',1,0,NULL,172,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(122,1,17,16,1614.0,'2025-12-28T22:17:14.213Z',1,0,NULL,174,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(123,2,20,20,485.0,'2026-01-01T03:08:22.110Z',1,0,NULL,176,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(124,2,20,20,230.0,'2026-01-01T03:09:11.420Z',1,0,NULL,178,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(125,2,20,21,551.58000000000004803,'2026-01-01T03:14:07.865Z',1,0,NULL,180,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(126,2,20,20,252.0,'2026-01-01T05:09:15.780Z',1,0,NULL,182,'Beside RR downtown in Yenugonda. around 1km away from the main road. ',NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(127,2,20,20,1130.0,'2026-01-01T06:40:15.182Z',1,0,NULL,184,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(128,26,34,20,420.0,'2026-01-03T02:42:48.013Z',1,0,NULL,186,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(129,2,20,20,1390.0,'2026-01-04T07:35:41.022Z',1,0,NULL,188,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(130,12,33,20,230.0,'2026-01-04T07:37:44.994Z',1,0,NULL,190,NULL,'Beside alo tower',20.0,NULL,NULL,0); +INSERT INTO orders VALUES(131,21,35,20,340.0,'2026-01-04T13:20:00.136Z',1,0,NULL,192,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(132,1,17,22,2790.0,'2026-01-06T07:21:22.047Z',1,0,NULL,194,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(133,30,36,22,780.0,'2026-01-06T07:45:52.275Z',1,0,NULL,196,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(134,21,35,22,2644.0,'2026-01-06T11:13:08.862Z',1,0,NULL,198,NULL,NULL,0.0,'1767717788828-21',1.0,0); +INSERT INTO orders VALUES(135,22,31,22,1700.0,'2026-01-07T09:32:56.404Z',1,0,NULL,200,NULL,NULL,0.0,'1767798176399-22',1.0,0); +INSERT INTO orders VALUES(136,22,31,22,1020.0,'2026-01-07T10:17:55.795Z',1,0,NULL,202,NULL,NULL,0.0,'1767800875792-22',1.0,0); +INSERT INTO orders VALUES(137,22,31,22,600.0,'2026-01-07T10:22:37.964Z',1,0,NULL,204,NULL,replace('Please call to my brother after reaching home.\nNumber is abcd8688y777','\n',char(10)),0.0,'1767801157960-22',1.0,0); +INSERT INTO orders VALUES(138,2,20,22,660.0,'2026-01-07T18:03:50.419Z',1,0,NULL,206,NULL,NULL,0.0,'1767828830413-2',1.0,0); +INSERT INTO orders VALUES(139,2,20,23,780.0,'2026-01-12T08:37:09.285Z',1,0,NULL,208,NULL,NULL,0.0,'1768226829276-2',1.0,0); +INSERT INTO orders VALUES(140,1,17,NULL,660.0,'2026-01-13T03:57:08.501Z',1,0,NULL,210,NULL,NULL,0.0,'1768296428205-1',1.0,1); +INSERT INTO orders VALUES(141,1,17,NULL,660.0,'2026-01-13T04:16:11.800Z',1,0,NULL,212,NULL,NULL,0.0,'1768297571530-1',1.0,1); +INSERT INTO orders VALUES(142,34,38,23,24.0,'2026-01-13T09:26:55.340Z',1,0,NULL,214,NULL,NULL,20.0,'1768316215336-34',1.0,0); +INSERT INTO orders VALUES(143,1,17,NULL,780.0,'2026-01-14T13:37:20.272Z',1,0,NULL,1,NULL,NULL,0.0,'1768417639897-1',1.0,1); +INSERT INTO orders VALUES(144,1,17,NULL,780.0,'2026-01-14T13:40:52.673Z',1,0,NULL,3,NULL,NULL,0.0,'1768417852308-1',1.0,1); +INSERT INTO orders VALUES(145,1,17,NULL,900.0,'2026-01-14T13:43:51.004Z',1,0,NULL,5,NULL,NULL,0.0,'1768418030542-1',1.0,1); +INSERT INTO orders VALUES(146,1,17,NULL,900.0,'2026-01-14T13:46:29.183Z',1,0,NULL,7,NULL,NULL,0.0,'1768418188748-1',1.0,1); +INSERT INTO orders VALUES(147,1,17,NULL,1020.0,'2026-01-14T13:48:47.459Z',1,0,NULL,9,NULL,NULL,0.0,'1768418327051-1',1.0,1); +INSERT INTO orders VALUES(148,1,17,23,2398.0,'2026-01-14T14:18:23.106Z',1,0,NULL,11,NULL,NULL,0.0,'1768420102803-1',1.0,0); +INSERT INTO orders VALUES(149,2,20,23,258.46000000000000085,'2026-01-15T10:38:51.399Z',1,0,NULL,13,NULL,NULL,0.0,'1768493331389-2',0.43079999999999998294,0); +INSERT INTO orders VALUES(150,2,20,31,341.53999999999999914,'2026-01-15T10:38:51.399Z',1,0,NULL,14,NULL,NULL,0.0,'1768493331389-2',0.56920000000000001705,0); +INSERT INTO orders VALUES(151,2,20,23,590.0,'2026-01-16T07:20:20.462Z',1,0,NULL,16,NULL,NULL,0.0,'1768567820452-2',1.0,0); +INSERT INTO orders VALUES(152,2,20,23,689.0,'2026-01-16T07:20:39.316Z',1,0,NULL,18,NULL,NULL,0.0,'1768567839309-2',1.0,0); +INSERT INTO orders VALUES(153,2,20,23,630.0,'2026-01-16T07:21:00.354Z',1,0,NULL,20,NULL,NULL,0.0,'1768567860348-2',1.0,0); +INSERT INTO orders VALUES(154,2,20,23,500.0,'2026-01-16T07:21:27.051Z',1,0,NULL,22,NULL,NULL,0.0,'1768567887044-2',1.0,0); +INSERT INTO orders VALUES(155,2,20,23,689.0,'2026-01-16T07:22:32.758Z',1,0,NULL,24,NULL,NULL,0.0,'1768567952750-2',1.0,0); +INSERT INTO orders VALUES(156,2,20,NULL,500.0,'2026-01-16T23:21:39.925Z',1,0,NULL,26,NULL,NULL,0.0,'1768625499917-2',1.0,1); +INSERT INTO orders VALUES(157,22,31,23,75.0,'2026-01-18T00:56:50.633Z',1,0,NULL,28,NULL,NULL,20.0,'1768717610629-22',1.0,0); +INSERT INTO orders VALUES(158,2,20,23,1534.0,'2026-01-18T03:02:03.729Z',1,0,NULL,30,NULL,NULL,0.0,'1768725123718-2',1.0,0); +INSERT INTO orders VALUES(159,22,37,23,1232.0,'2026-01-18T09:53:08.648Z',1,0,NULL,32,'Nothing just getting',NULL,0.0,'1768749788638-22',1.0,0); +INSERT INTO orders VALUES(160,22,31,23,132.0,'2026-01-18T10:14:06.341Z',1,0,NULL,34,'Testing admin notes','Call on 9199osisbushn',20.0,'1768751046336-22',1.0,0); +INSERT INTO orders VALUES(161,22,31,23,308.0,'2026-01-18T10:20:14.848Z',1,0,NULL,36,NULL,NULL,0.0,'1768751414843-22',1.0,0); +INSERT INTO orders VALUES(162,22,40,23,176.0,'2026-01-18T10:24:09.003Z',1,0,NULL,38,NULL,replace('Instructions no limit max limit low limit ui ux \nInstructions no limit max limit low limit ui ux \n\nInstructions no limit max limit low limit ui ux ','\n',char(10)),20.0,'1768751648997-22',1.0,0); +INSERT INTO orders VALUES(163,22,37,23,1743.0,'2026-01-18T21:46:46.398Z',1,0,NULL,40,NULL,NULL,0.0,'1768792606394-22',1.0,0); +INSERT INTO orders VALUES(164,1,17,23,304.0,'2026-01-19T14:17:52.639Z',1,0,NULL,42,NULL,NULL,0.0,'1768852072633-1',1.0,0); +INSERT INTO orders VALUES(165,2,20,40,820.0,'2026-01-23T03:22:03.840Z',1,0,NULL,44,NULL,NULL,0.0,'1769158323836-2',1.0,0); +INSERT INTO orders VALUES(166,25,43,35,49.0,'2026-01-23T10:37:42.952Z',1,0,NULL,46,NULL,NULL,20.0,'1769184462944-25',1.0,0); +INSERT INTO orders VALUES(167,2,20,39,643.0,'2026-01-24T02:56:06.720Z',1,0,NULL,48,NULL,NULL,0.0,'1769243166713-2',1.0,0); +INSERT INTO orders VALUES(168,1,17,39,2612.0,'2026-01-24T14:56:52.645Z',1,0,NULL,50,NULL,NULL,0.0,'1769286412630-1',1.0,0); +INSERT INTO orders VALUES(169,22,40,39,87.0,'2026-01-24T20:44:03.566Z',1,0,NULL,52,NULL,NULL,20.0,'1769307243555-22',1.0,0); +INSERT INTO orders VALUES(170,29,51,45,146.0,'2026-01-25T23:35:31.364Z',1,0,NULL,54,NULL,NULL,20.0,'1769403931353-29',1.0,0); +INSERT INTO orders VALUES(171,64,55,39,429.0,'2026-01-27T06:44:08.218Z',1,0,NULL,56,NULL,NULL,0.0,'1769516048207-64',1.0,0); +INSERT INTO orders VALUES(172,65,56,50,81.0,'2026-01-27T11:29:12.321Z',1,0,NULL,58,NULL,NULL,20.0,'1769533152305-65',0.64800000000000004263,0); +INSERT INTO orders VALUES(173,65,56,51,44.0,'2026-01-27T11:29:12.321Z',1,0,NULL,59,NULL,NULL,0.0,'1769533152305-65',0.35199999999999995736,0); +INSERT INTO orders VALUES(174,60,54,53,178.0,'2026-01-28T00:03:00.256Z',1,0,NULL,61,NULL,NULL,20.0,'1769578380246-60',1.0,0); +INSERT INTO orders VALUES(175,1,17,54,27.0,'2026-01-28T00:38:05.827Z',1,0,NULL,63,NULL,NULL,20.0,'1769580485819-1',0.1125,0); +INSERT INTO orders VALUES(176,1,17,53,213.0,'2026-01-28T00:38:05.827Z',1,0,NULL,64,NULL,NULL,0.0,'1769580485819-1',0.8875,0); +INSERT INTO orders VALUES(177,22,40,54,158.0,'2026-01-28T01:51:10.288Z',1,0,NULL,66,NULL,NULL,20.0,'1769584870283-22',0.76330000000000000071,0); +INSERT INTO orders VALUES(178,22,40,39,49.0,'2026-01-28T01:51:10.288Z',1,0,NULL,67,NULL,NULL,0.0,'1769584870283-22',0.23669999999999999928,0); +INSERT INTO orders VALUES(179,58,60,39,146.0,'2026-01-28T10:40:36.187Z',1,0,NULL,69,NULL,NULL,20.0,'1769616636177-58',1.0,0); +INSERT INTO orders VALUES(180,38,66,58,104.0,'2026-01-29T22:42:25.446Z',1,0,NULL,71,NULL,'Hi I''m inzamam come slowly ',20.0,'1769746345431-38',1.0,0); +INSERT INTO orders VALUES(181,1,17,59,17.0,'2026-01-30T00:31:02.610Z',1,0,NULL,73,NULL,NULL,10.0,'1769752862605-1',1.0,0); +INSERT INTO orders VALUES(182,38,66,59,49.0,'2026-01-30T00:46:59.261Z',1,0,NULL,75,NULL,NULL,10.0,'1769753819256-38',1.0,0); +INSERT INTO orders VALUES(183,1,17,60,42.0,'2026-01-30T01:42:25.118Z',1,0,NULL,77,NULL,NULL,10.0,'1769757144875-1',1.0,0); +INSERT INTO orders VALUES(184,38,66,60,179.0,'2026-01-30T03:13:07.360Z',1,0,NULL,79,NULL,NULL,0.0,'1769762587355-38',1.0,0); +INSERT INTO orders VALUES(185,54,57,66,77.0,'2026-01-31T01:44:10.735Z',1,0,NULL,81,NULL,'I needed it quickly',10.0,'1769843650726-54',1.0,0); +INSERT INTO orders VALUES(186,54,57,66,307.0,'2026-01-31T01:44:48.105Z',1,0,NULL,83,NULL,NULL,0.0,'1769843688098-54',1.0,0); +INSERT INTO orders VALUES(187,78,70,66,64.0,'2026-01-31T04:25:19.495Z',1,0,NULL,85,NULL,NULL,10.0,'1769853319488-78',1.0,0); +INSERT INTO orders VALUES(188,1,17,66,296.0,'2026-01-31T05:26:01.981Z',1,0,NULL,87,NULL,NULL,0.0,'1769856961704-1',1.0,0); +INSERT INTO orders VALUES(189,1,17,66,292.0,'2026-01-31T06:32:04.589Z',1,0,NULL,89,NULL,NULL,0.0,'1769860924583-1',1.0,0); +INSERT INTO orders VALUES(190,1,17,70,27.0,'2026-01-31T22:04:46.197Z',1,0,NULL,91,NULL,NULL,10.0,'1769916886192-1',1.0,0); +INSERT INTO orders VALUES(191,7,71,72,243.0,'2026-02-01T00:28:05.843Z',1,0,NULL,93,NULL,replace(' Half chest and half leg \n Pura chest piece ich mat lao bhai ....','\n',char(10)),0.0,'1769925485827-7',1.0,0); +INSERT INTO orders VALUES(192,74,73,72,420.0,'2026-02-01T01:31:50.642Z',1,0,NULL,95,NULL,NULL,0.0,'1769929310636-74',1.0,0); +INSERT INTO orders VALUES(193,74,73,72,269.0,'2026-02-01T01:56:14.147Z',1,0,NULL,97,NULL,NULL,0.0,'1769930774143-74',1.0,0); +INSERT INTO orders VALUES(194,38,66,71,999.0,'2026-02-01T02:19:04.918Z',1,0,NULL,99,NULL,NULL,0.0,'1769932144902-38',1.0,0); +INSERT INTO orders VALUES(195,22,50,71,119.0,'2026-02-01T03:22:19.400Z',1,0,NULL,101,NULL,NULL,10.0,'1769935939395-22',1.0,0); +INSERT INTO orders VALUES(196,82,72,72,179.0,'2026-02-01T04:41:15.161Z',1,0,NULL,103,NULL,NULL,0.0,'1769940675157-82',1.0,0); +INSERT INTO orders VALUES(197,82,72,72,448.0,'2026-02-01T04:46:41.872Z',1,0,NULL,105,NULL,NULL,0.0,'1769941001866-82',1.0,0); +INSERT INTO orders VALUES(202,88,83,76,135.0,'2026-02-01T10:07:16.233Z',1,0,NULL,115,NULL,NULL,0.0,'1769960236219-88',1.0,0); +INSERT INTO orders VALUES(203,92,86,79,49.0,'2026-02-02T04:53:54.970Z',1,0,NULL,117,NULL,NULL,10.0,'1770027834964-92',1.0,0); +INSERT INTO orders VALUES(204,38,66,79,79.0,'2026-02-02T06:48:31.456Z',1,0,NULL,119,NULL,NULL,10.0,'1770034711451-38',1.0,0); +INSERT INTO orders VALUES(205,38,66,79,79.0,'2026-02-02T06:50:24.727Z',1,0,NULL,121,NULL,NULL,10.0,'1770034824717-38',1.0,0); +INSERT INTO orders VALUES(206,7,71,83,770.0,'2026-02-02T08:27:54.149Z',1,0,NULL,123,NULL,NULL,0.0,'1770040674142-7',1.0,0); +INSERT INTO orders VALUES(207,1,17,81,369.0,'2026-02-02T09:01:16.193Z',1,0,NULL,125,NULL,NULL,0.0,'1770042676188-1',1.0,0); +INSERT INTO orders VALUES(208,1,17,81,378.0,'2026-02-02T12:53:25.021Z',1,0,NULL,127,NULL,NULL,0.0,'1770056605014-1',1.0,0); +INSERT INTO orders VALUES(209,38,66,83,412.19999999999998863,'2026-02-02T22:40:01.666Z',1,0,NULL,129,NULL,NULL,0.0,'1770091801642-38',1.0,0); +INSERT INTO orders VALUES(210,98,91,84,210.0,'2026-02-03T00:26:45.500Z',1,0,NULL,131,NULL,NULL,0.0,'1770098205495-98',1.0,0); +INSERT INTO orders VALUES(211,98,91,84,94.0,'2026-02-03T00:28:30.230Z',1,0,NULL,133,NULL,NULL,10.0,'1770098310221-98',1.0,0); +INSERT INTO orders VALUES(212,24,92,87,419.0,'2026-02-03T03:11:48.475Z',1,0,NULL,135,NULL,NULL,0.0,'1770108108470-24',1.0,0); +INSERT INTO orders VALUES(213,46,93,86,88.0,'2026-02-03T07:33:13.302Z',1,0,NULL,137,NULL,replace('Gol masjid Sr garden \n1flore\n','\n',char(10)),10.0,'1770123793291-46',1.0,0); +INSERT INTO orders VALUES(214,38,66,88,98.0,'2026-02-03T08:40:49.538Z',1,0,NULL,139,NULL,NULL,10.0,'1770127849534-38',1.0,0); +INSERT INTO orders VALUES(215,38,66,89,248.39999999999999857,'2026-02-03T08:43:00.789Z',1,0,NULL,141,NULL,NULL,0.0,'1770127980775-38',1.0,0); +INSERT INTO orders VALUES(216,81,94,88,386.0,'2026-02-03T10:16:16.915Z',1,0,NULL,143,NULL,NULL,0.0,'1770133576898-81',1.0,0); +INSERT INTO orders VALUES(217,96,95,92,301.50000000000001243,'2026-02-04T01:36:25.133Z',1,0,NULL,145,NULL,NULL,0.0,'1770188785117-96',1.0,0); +INSERT INTO orders VALUES(218,81,94,92,401.39999999999993463,'2026-02-04T02:41:07.508Z',1,0,NULL,147,NULL,NULL,0.0,'1770192667485-81',1.0,0); +INSERT INTO orders VALUES(219,1,17,94,109.0,'2026-02-04T07:47:53.067Z',1,0,NULL,149,NULL,NULL,10.0,'1770211073063-1',1.0,0); +INSERT INTO orders VALUES(220,103,96,99,158.0,'2026-02-05T03:15:53.554Z',1,0,NULL,151,NULL,NULL,0.0,'1770281153546-103',1.0,0); +INSERT INTO orders VALUES(221,24,92,100,235.80000000000000959,'2026-02-05T04:00:30.739Z',1,0,NULL,153,NULL,NULL,0.0,'1770283830726-24',1.0,0); +INSERT INTO orders VALUES(222,114,103,106,97.0,'2026-02-06T05:49:57.315Z',1,0,NULL,155,NULL,NULL,10.0,'1770376797308-114',1.0,0); +INSERT INTO orders VALUES(223,1,17,106,97.0,'2026-02-06T06:21:43.659Z',1,0,NULL,157,NULL,NULL,10.0,'1770378703652-1',1.0,0); +INSERT INTO orders VALUES(224,71,104,106,149.0,'2026-02-06T06:25:36.038Z',1,0,NULL,159,NULL,NULL,0.0,'1770378936033-71',1.0,0); +INSERT INTO orders VALUES(225,1,17,111,108.0,'2026-02-06T08:53:10.229Z',1,0,NULL,-1,NULL,NULL,10.0,'1770387790223-1',1.0,0); +INSERT INTO orders VALUES(226,115,105,113,110.74999999999999289,'2026-02-06T10:26:39.531Z',1,0,NULL,-1,NULL,NULL,0.0,'1770393399507-115',0.24500000000000001776,0); +INSERT INTO orders VALUES(227,115,105,112,341.25000000000000888,'2026-02-06T10:26:39.531Z',1,0,NULL,-1,NULL,NULL,0.0,'1770393399507-115',0.75499999999999998223,0); +INSERT INTO orders VALUES(228,115,105,113,180.0,'2026-02-06T16:16:47.346Z',1,0,NULL,-1,NULL,NULL,0.0,'1770414407330-115',1.0,0); +INSERT INTO orders VALUES(229,109,101,111,127.0,'2026-02-06T23:01:13.646Z',1,0,NULL,-1,NULL,NULL,0.0,'1770438673632-109',1.0,0); +INSERT INTO orders VALUES(230,103,96,111,167.40000000000001989,'2026-02-06T23:28:37.545Z',1,0,NULL,-1,NULL,NULL,0.0,'1770440317529-103',1.0,0); +INSERT INTO orders VALUES(231,103,96,111,213.30000000000000071,'2026-02-06T23:36:55.424Z',1,0,NULL,-1,NULL,NULL,0.0,'1770440815414-103',1.0,0); +INSERT INTO orders VALUES(232,119,107,115,219.0,'2026-02-07T07:06:17.096Z',1,0,NULL,-1,NULL,NULL,0.0,'1770467777091-119',1.0,0); +INSERT INTO orders VALUES(233,38,66,115,219.0,'2026-02-07T07:24:42.810Z',1,0,NULL,-1,NULL,NULL,0.0,'1770468882806-38',1.0,0); +INSERT INTO orders VALUES(234,38,66,115,219.0,'2026-02-07T07:25:52.698Z',1,0,NULL,-1,NULL,NULL,0.0,'1770468952694-38',1.0,0); +INSERT INTO orders VALUES(235,120,108,118,377.10000000000003517,'2026-02-07T23:11:07.297Z',1,0,NULL,-1,NULL,NULL,0.0,'1770525667289-120',1.0,0); +INSERT INTO orders VALUES(236,98,91,118,149.0,'2026-02-07T23:43:00.160Z',1,0,NULL,-1,NULL,NULL,10.0,'1770527580152-98',1.0,0); +INSERT INTO orders VALUES(237,38,66,118,148.0,'2026-02-07T23:58:12.863Z',1,0,NULL,-1,NULL,NULL,10.0,'1770528492859-38',1.0,0); +INSERT INTO orders VALUES(238,121,109,119,106.0,'2026-02-08T00:48:23.089Z',1,0,NULL,-1,NULL,NULL,10.0,'1770531503085-121',1.0,0); +INSERT INTO orders VALUES(239,121,109,119,106.0,'2026-02-08T00:55:15.154Z',1,0,NULL,-1,NULL,NULL,10.0,'1770531915149-121',1.0,0); +INSERT INTO orders VALUES(240,121,109,NULL,170.0,'2026-02-08T04:28:56.405Z',1,0,NULL,-1,NULL,NULL,10.0,'1770544736398-121',1.0,1); +INSERT INTO orders VALUES(241,121,109,NULL,170.0,'2026-02-08T04:29:20.307Z',1,0,NULL,-1,NULL,NULL,10.0,'1770544760296-121',1.0,1); +INSERT INTO orders VALUES(242,121,109,121,37.0,'2026-02-08T04:29:55.364Z',1,0,NULL,-1,NULL,NULL,10.0,'1770544795359-121',1.0,0); +INSERT INTO orders VALUES(243,121,109,NULL,60.0,'2026-02-08T04:30:37.777Z',1,0,NULL,-1,NULL,NULL,10.0,'1770544837770-121',1.0,1); +INSERT INTO orders VALUES(244,121,109,121,389.0,'2026-02-08T04:32:20.374Z',1,0,NULL,-1,NULL,NULL,0.0,'1770544940368-121',1.0,0); +INSERT INTO orders VALUES(245,121,109,121,980.0,'2026-02-08T04:33:59.746Z',1,0,NULL,-1,NULL,NULL,0.0,'1770545039741-121',1.0,0); +INSERT INTO orders VALUES(246,12,33,121,149.0,'2026-02-08T05:09:24.720Z',1,0,NULL,-1,NULL,NULL,10.0,'1770547164704-12',1.0,0); +INSERT INTO orders VALUES(247,2,20,127,159.0,'2026-02-09T01:52:55.524Z',1,0,NULL,-1,NULL,NULL,10.0,'1770621775517-2',1.0,0); +INSERT INTO orders VALUES(248,125,112,129,188.0,'2026-02-09T07:56:42.048Z',1,0,NULL,-1,NULL,NULL,0.0,'1770643602042-125',1.0,0); +INSERT INTO orders VALUES(249,3,16,135,119.0,'2026-02-10T06:04:04.471Z',1,0,NULL,-1,NULL,NULL,10.0,'1770723244466-3',1.0,0); +INSERT INTO orders VALUES(250,2,20,139,1277.0,'2026-02-10T21:59:33.763Z',1,0,NULL,-1,NULL,NULL,0.0,'1770780573747-2',1.0,0); +INSERT INTO orders VALUES(251,115,105,145,110.0,'2026-02-11T16:13:20.142Z',1,0,NULL,-1,NULL,NULL,0.0,'1770846200125-115',0.32840000000000002522,0); +INSERT INTO orders VALUES(252,115,105,144,107.0,'2026-02-11T16:13:20.142Z',1,0,NULL,-1,NULL,NULL,0.0,'1770846200125-115',0.31939999999999999502,0); +INSERT INTO orders VALUES(253,115,105,147,118.0,'2026-02-11T16:13:20.142Z',1,0,NULL,-1,NULL,NULL,0.0,'1770846200125-115',0.35220000000000002415,0); +INSERT INTO orders VALUES(254,114,114,158,145.0,'2026-02-14T01:01:13.769Z',1,0,NULL,-1,NULL,replace('Rb palace \n','\n',char(10)),10.0,'1771050673757-114',1.0,0); +INSERT INTO orders VALUES(255,120,108,165,419.0,'2026-02-15T00:00:53.358Z',1,0,NULL,-1,NULL,'Can you deliver it now pls its urgent',0.0,'1771133453347-120',1.0,0); +INSERT INTO orders VALUES(256,2,20,173,377.10000000000003517,'2026-02-16T01:21:48.050Z',1,0,NULL,-1,NULL,NULL,0.0,'1771224708041-2',1.0,0); +INSERT INTO orders VALUES(257,134,116,173,377.10000000000003517,'2026-02-16T04:14:55.522Z',1,0,NULL,-1,NULL,'Come faster ',0.0,'1771235095508-134',1.0,0); +INSERT INTO orders VALUES(258,134,116,174,74.0,'2026-02-16T04:22:00.592Z',1,0,NULL,-1,NULL,NULL,15.0,'1771235520588-134',1.0,0); +INSERT INTO orders VALUES(259,120,108,179,413.10000000000002273,'2026-02-17T00:44:27.971Z',1,0,NULL,-1,NULL,NULL,0.0,'1771308867959-120',1.0,0); +INSERT INTO orders VALUES(260,1,17,NULL,380.0,'2026-02-17T07:16:27.421Z',1,0,NULL,-1,NULL,NULL,0.0,'1771332387411-1',1.0,1); +INSERT INTO orders VALUES(261,136,117,182,130.0,'2026-02-17T07:30:07.521Z',1,0,NULL,-1,NULL,NULL,12.0,'1771333207516-136',1.0,0); +INSERT INTO orders VALUES(262,136,117,182,67.0,'2026-02-17T07:45:43.734Z',1,0,NULL,-1,NULL,NULL,12.0,'1771334143729-136',1.0,0); +INSERT INTO orders VALUES(263,3,16,NULL,162.0,'2026-02-17T07:52:41.197Z',1,0,NULL,-1,NULL,NULL,12.0,'1771334561185-3',1.0,1); +INSERT INTO orders VALUES(264,141,120,184,423.0,'2026-02-17T19:47:31.551Z',1,0,NULL,-1,NULL,NULL,0.0,'1771377451545-141',1.0,0); +INSERT INTO orders VALUES(265,143,121,185,130.0,'2026-02-17T22:56:42.974Z',1,0,NULL,-1,NULL,'Employees colony colony ',12.0,'1771388802969-143',1.0,0); +INSERT INTO orders VALUES(266,143,121,185,110.0,'2026-02-17T23:04:14.592Z',1,0,NULL,-1,NULL,NULL,12.0,'1771389254586-143',1.0,0); +INSERT INTO orders VALUES(267,130,122,186,305.0,'2026-02-17T23:27:35.908Z',1,0,NULL,-1,NULL,NULL,0.0,'1771390655900-130',1.0,0); +INSERT INTO orders VALUES(268,132,123,186,429.0,'2026-02-18T00:28:16.181Z',1,0,NULL,-1,NULL,NULL,0.0,'1771394296177-132',1.0,0); +INSERT INTO orders VALUES(269,119,107,187,396.0,'2026-02-18T01:34:08.441Z',1,0,NULL,-1,NULL,NULL,0.0,'1771398248436-119',1.0,0); +INSERT INTO orders VALUES(270,119,107,NULL,230.0,'2026-02-18T02:04:32.495Z',1,0,NULL,-1,NULL,NULL,0.0,'1771400072481-119',1.0,1); +INSERT INTO orders VALUES(271,145,124,187,381.60000000000003694,'2026-02-18T03:46:31.297Z',1,0,NULL,-1,NULL,NULL,0.0,'1771406191279-145',1.0,0); +INSERT INTO orders VALUES(272,138,125,188,71.0,'2026-02-18T05:15:38.160Z',1,0,NULL,-1,NULL,NULL,12.0,'1771411538154-138',1.0,0); +INSERT INTO orders VALUES(273,138,125,188,71.0,'2026-02-18T05:15:38.161Z',1,0,NULL,-1,NULL,NULL,12.0,'1771411538155-138',1.0,0); +INSERT INTO orders VALUES(274,147,126,NULL,555.0,'2026-02-18T05:15:59.580Z',1,0,NULL,-1,NULL,NULL,0.0,'1771411559572-147',1.0,1); +INSERT INTO orders VALUES(275,24,92,188,223.0,'2026-02-18T06:53:25.416Z',1,0,NULL,-1,NULL,NULL,0.0,'1771417405404-24',1.0,0); +INSERT INTO orders VALUES(276,82,72,189,506.0,'2026-02-18T07:16:24.911Z',1,0,NULL,-1,NULL,NULL,0.0,'1771418784904-82',1.0,0); +INSERT INTO orders VALUES(277,148,127,189,388.0,'2026-02-18T07:31:33.186Z',1,0,NULL,-1,NULL,NULL,0.0,'1771419693158-148',1.0,0); +INSERT INTO orders VALUES(278,38,66,192,396.0,'2026-02-18T23:12:20.428Z',1,0,NULL,-1,NULL,'Come slowly and drive slowly ',0.0,'1771476140424-38',1.0,0); +INSERT INTO orders VALUES(279,156,131,192,419.0,'2026-02-19T00:00:57.733Z',1,0,NULL,-1,NULL,NULL,0.0,'1771479057729-156',1.0,0); +INSERT INTO orders VALUES(280,99,132,194,170.0,'2026-02-19T01:04:09.663Z',1,0,NULL,-1,NULL,NULL,12.0,'1771482849644-99',1.0,0); +INSERT INTO orders VALUES(281,82,72,194,583.0,'2026-02-19T01:57:57.613Z',1,0,NULL,-1,NULL,NULL,0.0,'1771486077606-82',1.0,0); +INSERT INTO orders VALUES(282,82,72,194,110.0,'2026-02-19T01:59:43.093Z',1,0,NULL,-1,NULL,NULL,12.0,'1771486183088-82',1.0,0); +INSERT INTO orders VALUES(283,66,58,194,216.0,'2026-02-19T02:16:07.844Z',1,0,NULL,-1,NULL,NULL,0.0,'1771487167839-66',1.0,0); +INSERT INTO orders VALUES(284,120,108,194,202.0,'2026-02-19T03:09:55.456Z',1,0,NULL,-1,NULL,NULL,0.0,'1771490395448-120',1.0,0); +INSERT INTO orders VALUES(285,159,133,194,371.0,'2026-02-19T03:40:51.549Z',1,0,NULL,-1,NULL,NULL,0.0,'1771492251530-159',1.0,0); +INSERT INTO orders VALUES(286,160,134,194,255.0,'2026-02-19T03:49:55.745Z',1,0,NULL,-1,NULL,NULL,0.0,'1771492795724-160',1.0,0); +INSERT INTO orders VALUES(287,64,55,194,114.0,'2026-02-19T03:54:05.397Z',1,0,NULL,-1,NULL,NULL,0.0,'1771493045384-64',0.6,0); +INSERT INTO orders VALUES(288,64,55,196,76.0,'2026-02-19T03:54:05.397Z',1,0,NULL,-1,NULL,NULL,0.0,'1771493045384-64',0.4,0); +INSERT INTO orders VALUES(289,160,134,197,41.0,'2026-02-19T04:00:41.001Z',1,0,NULL,-1,NULL,NULL,12.0,'1771493440990-160',1.0,0); +INSERT INTO orders VALUES(290,151,135,197,387.0,'2026-02-19T04:09:35.859Z',1,0,NULL,-1,NULL,NULL,0.0,'1771493975853-151',1.0,0); +INSERT INTO orders VALUES(291,4,136,195,559.0,'2026-02-19T04:16:50.189Z',1,0,NULL,-1,NULL,NULL,0.0,'1771494410183-4',1.0,0); +INSERT INTO orders VALUES(292,162,137,197,110.0,'2026-02-19T05:08:36.439Z',1,0,NULL,-1,NULL,NULL,12.0,'1771497516435-162',1.0,0); +INSERT INTO orders VALUES(293,162,137,197,110.0,'2026-02-19T05:08:36.736Z',1,0,NULL,-1,NULL,NULL,12.0,'1771497516732-162',1.0,0); +INSERT INTO orders VALUES(294,32,138,195,110.0,'2026-02-19T06:14:11.047Z',1,0,NULL,-1,NULL,NULL,12.0,'1771501451044-32',1.0,0); +INSERT INTO orders VALUES(295,163,139,195,236.0,'2026-02-19T06:49:34.891Z',1,0,NULL,-1,NULL,NULL,0.0,'1771503574888-163',1.0,0); +INSERT INTO orders VALUES(296,38,66,200,819.0,'2026-02-19T12:38:24.984Z',1,0,NULL,-1,NULL,NULL,0.0,'1771524504980-38',1.0,0); +INSERT INTO orders VALUES(297,82,72,201,307.0,'2026-02-19T15:48:55.517Z',1,0,NULL,-1,NULL,NULL,0.0,'1771535935502-82',1.0,0); +INSERT INTO orders VALUES(298,66,58,204,85.0,'2026-02-20T01:39:04.912Z',1,0,NULL,-1,NULL,replace('Employee''s colony road no 3 \nmahabubnagar 9618791714','\n',char(10)),12.0,'1771571344901-66',1.0,0); +INSERT INTO orders VALUES(299,66,58,204,165.0,'2026-02-20T02:41:56.608Z',1,0,NULL,-1,NULL,NULL,12.0,'1771575116599-66',1.0,0); +INSERT INTO orders VALUES(300,140,119,204,238.0,'2026-02-20T03:24:43.556Z',1,0,NULL,-1,NULL,NULL,0.0,'1771577683547-140',1.0,0); +INSERT INTO orders VALUES(301,169,142,204,1116.0,'2026-02-20T03:37:43.245Z',1,0,NULL,-1,NULL,NULL,0.0,'1771578463205-169',1.0,0); +INSERT INTO orders VALUES(302,170,144,204,189.0,'2026-02-20T03:59:51.171Z',1,0,NULL,-1,NULL,NULL,0.0,'1771579791166-170',1.0,0); +INSERT INTO orders VALUES(303,170,144,207,197.0,'2026-02-20T04:04:04.909Z',1,0,NULL,-1,NULL,NULL,0.0,'1771580044903-170',1.0,0); +INSERT INTO orders VALUES(304,132,123,207,494.0,'2026-02-20T04:47:12.538Z',1,0,NULL,-1,NULL,NULL,0.0,'1771582632531-132',1.0,0); +INSERT INTO orders VALUES(305,176,145,206,295.0,'2026-02-20T06:02:01.579Z',1,0,NULL,-1,NULL,NULL,0.0,'1771587121570-176',1.0,0); +INSERT INTO orders VALUES(306,99,132,206,294.0,'2026-02-20T06:41:12.043Z',1,0,NULL,-1,NULL,NULL,0.0,'1771589472035-99',1.0,0); +INSERT INTO orders VALUES(307,163,146,NULL,236.0,'2026-02-20T07:21:21.906Z',1,0,NULL,-1,NULL,NULL,0.0,'1771591881894-163',1.0,1); +INSERT INTO orders VALUES(308,74,73,208,429.0,'2026-02-20T07:41:37.350Z',1,0,NULL,-1,NULL,NULL,0.0,'1771593097346-74',1.0,0); +INSERT INTO orders VALUES(309,115,105,NULL,624.0,'2026-02-20T09:08:15.335Z',1,0,NULL,-1,NULL,NULL,0.0,'1771598295290-115',1.0,1); +INSERT INTO orders VALUES(310,38,66,208,419.0,'2026-02-20T13:06:33.249Z',1,0,NULL,-1,NULL,'Bheje lalo bhaiya 3',0.0,'1771612593245-38',1.0,0); +INSERT INTO orders VALUES(311,184,148,211,364.0,'2026-02-20T22:50:10.927Z',1,0,NULL,-1,NULL,NULL,0.0,'1771647610908-184',1.0,0); +INSERT INTO orders VALUES(312,81,94,212,550.0,'2026-02-21T03:19:33.169Z',1,0,NULL,-1,NULL,NULL,0.0,'1771663773148-81',1.0,0); +INSERT INTO orders VALUES(313,24,92,212,223.0,'2026-02-21T03:33:25.012Z',1,0,NULL,-1,NULL,NULL,0.0,'1771664605006-24',1.0,0); +INSERT INTO orders VALUES(314,186,149,214,137.0,'2026-02-21T03:45:19.764Z',1,0,NULL,-1,NULL,NULL,12.0,'1771665319759-186',1.0,0); +INSERT INTO orders VALUES(315,160,134,213,109.0,'2026-02-21T04:36:43.124Z',1,0,NULL,-1,NULL,NULL,12.0,'1771668403117-160',1.0,0); +INSERT INTO orders VALUES(316,160,134,213,138.0,'2026-02-21T04:40:27.736Z',1,0,NULL,-1,NULL,NULL,12.0,'1771668627722-160',1.0,0); +INSERT INTO orders VALUES(317,32,138,NULL,161.0,'2026-02-21T06:23:19.310Z',1,0,NULL,-1,NULL,NULL,12.0,'1771674799304-32',1.0,1); +INSERT INTO orders VALUES(318,7,71,217,1566.0,'2026-02-21T12:32:34.307Z',1,0,NULL,-1,NULL,replace('Boti me chikna kam karo \nBoti ke pooray parts rehna dekho bhai \nExcept tilli\n\nMutton zara acha lalo \nBone quantity kam kar ke ','\n',char(10)),0.0,'1771696954291-7',1.0,0); +INSERT INTO orders VALUES(319,141,120,219,166.50000000000000355,'2026-02-21T19:42:40.619Z',1,0,NULL,-1,NULL,NULL,0.0,'1771722760597-141',0.5027000000000000135,0); +INSERT INTO orders VALUES(320,141,120,218,164.69999999999997974,'2026-02-21T19:42:40.619Z',1,0,NULL,-1,NULL,NULL,0.0,'1771722760597-141',0.49729999999999998649,0); +INSERT INTO orders VALUES(321,120,108,218,377.10000000000003517,'2026-02-21T22:34:37.439Z',1,0,NULL,-1,NULL,NULL,0.0,'1771733077431-120',1.0,0); +INSERT INTO orders VALUES(322,193,153,218,386.10000000000002984,'2026-02-21T22:53:17.760Z',1,0,NULL,-1,NULL,NULL,0.0,'1771734197748-193',1.0,0); +INSERT INTO orders VALUES(323,132,123,218,583.0,'2026-02-21T23:09:55.795Z',1,0,NULL,-1,NULL,NULL,0.0,'1771735195777-132',1.0,0); +INSERT INTO orders VALUES(324,130,122,218,490.0,'2026-02-21T23:38:18.540Z',1,0,NULL,-1,NULL,NULL,0.0,'1771736898523-130',1.0,0); +INSERT INTO orders VALUES(325,194,154,219,232.0,'2026-02-22T00:16:21.567Z',1,0,NULL,-1,NULL,NULL,0.0,'1771739181558-194',1.0,0); +INSERT INTO orders VALUES(326,198,158,220,323.0,'2026-02-22T01:08:52.833Z',1,0,NULL,-1,NULL,NULL,0.0,'1771742332826-198',1.0,0); +INSERT INTO orders VALUES(327,184,148,221,201.0,'2026-02-22T01:13:15.958Z',1,0,NULL,-1,NULL,NULL,0.0,'1771742595948-184',0.80400000000000009237,0); +INSERT INTO orders VALUES(328,184,148,220,49.0,'2026-02-22T01:13:15.958Z',1,0,NULL,-1,NULL,NULL,0.0,'1771742595948-184',0.19599999999999999644,0); +INSERT INTO orders VALUES(329,205,161,222,272.0,'2026-02-22T03:46:06.235Z',1,0,NULL,-1,NULL,NULL,0.0,'1771751766217-205',1.0,0); +INSERT INTO orders VALUES(330,206,162,221,40.0,'2026-02-22T04:21:41.707Z',1,0,NULL,-1,NULL,NULL,12.0,'1771753901703-206',1.0,0); +INSERT INTO orders VALUES(331,208,163,221,166.0,'2026-02-22T04:39:37.484Z',1,0,NULL,-1,NULL,NULL,12.0,'1771754977472-208',1.0,0); +INSERT INTO orders VALUES(332,50,167,224,315.0,'2026-02-22T14:05:39.863Z',1,0,NULL,-1,NULL,NULL,0.0,'1771788939856-50',1.0,0); +INSERT INTO orders VALUES(333,151,135,227,136.0,'2026-02-23T03:21:16.555Z',1,0,NULL,-1,NULL,NULL,12.0,'1771836676538-151',1.0,0); +INSERT INTO orders VALUES(334,223,168,227,373.49999999999998756,'2026-02-23T03:47:30.738Z',1,0,NULL,-1,NULL,NULL,0.0,'1771838250710-223',1.0,0); +INSERT INTO orders VALUES(335,224,169,228,471.0,'2026-02-23T04:40:46.728Z',1,0,NULL,-1,NULL,NULL,0.0,'1771841446722-224',1.0,0); +INSERT INTO orders VALUES(336,224,169,228,295.0,'2026-02-23T04:44:00.644Z',1,0,NULL,-1,NULL,NULL,0.0,'1771841640635-224',1.0,0); +INSERT INTO orders VALUES(337,224,169,227,69.0,'2026-02-23T04:45:56.017Z',1,0,NULL,-1,NULL,NULL,12.0,'1771841756009-224',1.0,0); +INSERT INTO orders VALUES(338,38,66,229,250.0,'2026-02-23T05:51:07.943Z',1,0,NULL,-1,NULL,'Plz bring fast please jaldi lalo thoda',0.0,'1771845667938-38',1.0,0); +INSERT INTO orders VALUES(339,225,170,229,138.0,'2026-02-23T06:46:04.203Z',1,0,NULL,-1,NULL,NULL,12.0,'1771848964196-225',1.0,0); +INSERT INTO orders VALUES(340,228,172,232,261.0,'2026-02-23T22:40:33.438Z',1,0,NULL,-1,NULL,'Back side alis mart beside lane last lane ,opp children''s park ground floor house ',0.0,'1771906233428-228',1.0,0); +INSERT INTO orders VALUES(341,230,174,235,250.0,'2026-02-24T01:44:30.406Z',1,0,NULL,-1,NULL,NULL,0.0,'1771917270395-230',1.0,0); +INSERT INTO orders VALUES(342,229,173,NULL,737.0,'2026-02-24T01:46:05.872Z',1,0,NULL,-1,NULL,NULL,0.0,'1771917365846-229',1.0,1); +INSERT INTO orders VALUES(343,224,169,227,169.0,'2026-02-24T02:52:22.431Z',1,0,NULL,-1,NULL,NULL,12.0,'1771921342425-224',1.0,0); +INSERT INTO orders VALUES(344,158,176,236,186.0,'2026-02-24T04:15:41.683Z',1,0,NULL,-1,NULL,NULL,12.0,'1771926341678-158',1.0,0); +INSERT INTO orders VALUES(345,3,16,NULL,399.0,'2026-02-24T05:47:59.572Z',1,0,NULL,-1,NULL,NULL,0.0,'1771931879550-3',1.0,1); +INSERT INTO orders VALUES(346,149,130,236,181.0,'2026-02-24T07:17:54.419Z',1,0,NULL,-1,NULL,NULL,0.0,'1771937274400-149',1.0,0); +INSERT INTO orders VALUES(347,50,45,238,281.0,'2026-02-24T12:55:21.432Z',1,0,NULL,-1,NULL,'If I don''t attend the call please call to this number 86888065996',0.0,'1771957521407-50',1.0,0); +INSERT INTO orders VALUES(348,132,123,242,429.0,'2026-02-25T02:47:44.024Z',1,0,NULL,-1,NULL,NULL,0.0,'1772007464014-132',1.0,0); +INSERT INTO orders VALUES(381,1,17,NULL,395.0,'2026-02-26T11:24:06.998Z',1,0,NULL,-1,NULL,NULL,0.0,'1772124844672-1',1.0,1); +INSERT INTO orders VALUES(382,1,17,NULL,187.0,'2026-02-26T11:30:33.419Z',1,0,NULL,-1,NULL,NULL,0.0,'1772125229922-1',1.0,1); +INSERT INTO orders VALUES(383,1,17,NULL,164.0,'2026-02-26T11:34:03.543Z',1,0,NULL,-1,NULL,NULL,45.0,'1772125441817-1',1.0,1); +INSERT INTO orders VALUES(384,1,17,NULL,444.0,'2026-02-26T11:36:20.560Z',1,0,NULL,-1,NULL,NULL,45.0,'1772125578199-1',1.0,1); +INSERT INTO orders VALUES(385,1,17,279,344.0,'2026-03-09T10:16:59.219Z',1,0,NULL,-1,NULL,NULL,0.0,'1773071219214-1',1.0,0); +INSERT INTO orders VALUES(386,1,17,286,51.0,'2026-03-26T01:19:29.108Z',1,0,NULL,-1,NULL,NULL,12.0,'1774507768653-1',1.0,0); +CREATE TABLE IF NOT EXISTS "payment_info" ("id" INTEGER PRIMARY KEY, "status" TEXT NOT NULL, "gateway" TEXT NOT NULL, "order_id" TEXT, "token" TEXT, "merchant_order_id" TEXT NOT NULL, "payload" TEXT); +INSERT INTO payment_info VALUES(1,'pending','phonepe',NULL,NULL,'order_1763563896010',NULL); +INSERT INTO payment_info VALUES(2,'pending','phonepe',NULL,NULL,'order_1763564910006',NULL); +INSERT INTO payment_info VALUES(3,'pending','phonepe',NULL,NULL,'order_1763572580304',NULL); +INSERT INTO payment_info VALUES(4,'pending','phonepe',NULL,NULL,'order_1763572653144',NULL); +INSERT INTO payment_info VALUES(5,'pending','phonepe',NULL,NULL,'order_1763573268603',NULL); +INSERT INTO payment_info VALUES(6,'pending','phonepe',NULL,NULL,'order_1763574232471',NULL); +INSERT INTO payment_info VALUES(7,'pending','phonepe',NULL,NULL,'order_1763574306269',NULL); +INSERT INTO payment_info VALUES(8,'pending','phonepe',NULL,NULL,'order_1763574482764',NULL); +INSERT INTO payment_info VALUES(9,'pending','phonepe',NULL,NULL,'order_1763574799918',NULL); +INSERT INTO payment_info VALUES(10,'pending','phonepe',NULL,NULL,'order_1763575339097',NULL); +INSERT INTO payment_info VALUES(11,'pending','phonepe',NULL,NULL,'order_1763575464896',NULL); +INSERT INTO payment_info VALUES(12,'pending','phonepe',NULL,NULL,'order_1763575602750',NULL); +INSERT INTO payment_info VALUES(13,'pending','phonepe',NULL,NULL,'order_1763575768505',NULL); +INSERT INTO payment_info VALUES(14,'pending','phonepe',NULL,NULL,'order_1763666849104',NULL); +INSERT INTO payment_info VALUES(15,'pending','phonepe',NULL,NULL,'order_1763666905893',NULL); +INSERT INTO payment_info VALUES(16,'pending','phonepe',NULL,NULL,'order_1763666973849',NULL); +INSERT INTO payment_info VALUES(17,'pending','phonepe',NULL,NULL,'order_1763871426295',NULL); +INSERT INTO payment_info VALUES(18,'pending','phonepe',NULL,NULL,'order_1763898477055',NULL); +INSERT INTO payment_info VALUES(19,'pending','phonepe',NULL,NULL,'order_1763983667789',NULL); +INSERT INTO payment_info VALUES(20,'pending','phonepe',NULL,NULL,'order_1764067952957',NULL); +INSERT INTO payment_info VALUES(21,'pending','phonepe',NULL,NULL,'order_1764243205881',NULL); +INSERT INTO payment_info VALUES(22,'pending','phonepe',NULL,NULL,'order_1764388266634',NULL); +INSERT INTO payment_info VALUES(23,'pending','phonepe',NULL,NULL,'order_1764388497092',NULL); +INSERT INTO payment_info VALUES(24,'pending','phonepe',NULL,NULL,'order_1764389081742',NULL); +INSERT INTO payment_info VALUES(25,'pending','phonepe',NULL,NULL,'order_1764389210771',NULL); +INSERT INTO payment_info VALUES(26,'pending','phonepe',NULL,NULL,'order_1764390498471',NULL); +INSERT INTO payment_info VALUES(27,'pending','phonepe',NULL,NULL,'order_1764391183329',NULL); +INSERT INTO payment_info VALUES(28,'pending','phonepe',NULL,NULL,'order_1764391279780',NULL); +INSERT INTO payment_info VALUES(29,'pending','phonepe',NULL,NULL,'order_1764391675769',NULL); +INSERT INTO payment_info VALUES(30,'pending','phonepe',NULL,NULL,'order_1764391943478',NULL); +INSERT INTO payment_info VALUES(31,'pending','phonepe',NULL,NULL,'order_1764392006085',NULL); +INSERT INTO payment_info VALUES(32,'pending','razorpay',NULL,NULL,'order_1764392514440',NULL); +INSERT INTO payment_info VALUES(33,'pending','razorpay',NULL,NULL,'order_1764392606452',NULL); +INSERT INTO payment_info VALUES(34,'pending','razorpay',NULL,NULL,'order_1764392717827',NULL); +INSERT INTO payment_info VALUES(35,'pending','razorpay',NULL,NULL,'order_1764393153653',NULL); +INSERT INTO payment_info VALUES(36,'pending','razorpay',NULL,NULL,'order_1764396332043',NULL); +INSERT INTO payment_info VALUES(37,'pending','phonepe',NULL,NULL,'order_1764397057662',NULL); +INSERT INTO payment_info VALUES(38,'pending','razorpay',NULL,NULL,'order_1764397317408',NULL); +INSERT INTO payment_info VALUES(39,'pending','razorpay',NULL,NULL,'order_1764398178092',NULL); +INSERT INTO payment_info VALUES(40,'pending','razorpay',NULL,NULL,'order_1764400222682',NULL); +INSERT INTO payment_info VALUES(41,'pending','razorpay',NULL,NULL,'order_1764400862503',NULL); +INSERT INTO payment_info VALUES(42,'pending','razorpay',NULL,NULL,'order_1764401267896',NULL); +INSERT INTO payment_info VALUES(43,'pending','razorpay',NULL,NULL,'order_1764405067997',NULL); +INSERT INTO payment_info VALUES(44,'pending','razorpay',NULL,NULL,'order_1765380758868',NULL); +INSERT INTO payment_info VALUES(45,'pending','razorpay',NULL,NULL,'order_1765380872212',NULL); +INSERT INTO payment_info VALUES(46,'pending','razorpay',NULL,NULL,'multi_order_1765645204515',NULL); +INSERT INTO payment_info VALUES(47,'pending','razorpay',NULL,NULL,'multi_order_1765645272415',NULL); +CREATE TABLE IF NOT EXISTS "payments" ("id" INTEGER PRIMARY KEY, "order_id" INTEGER NOT NULL, "status" TEXT NOT NULL, "gateway" TEXT NOT NULL, "token" TEXT, "merchant_order_id" TEXT NOT NULL, "payload" TEXT); +INSERT INTO payments VALUES(1,1,'success','razorpay','1','order_RhdccfyUTkxlH4','{"id":"order_RhdccfyUTkxlH4","notes":{"customerOrderId":"1"},"amount":4400,"entity":"order","status":"created","receipt":"order_1","attempts":0,"currency":"INR","offer_id":null,"signature":"b767a4fdda78476999d21bb7e1cfa72a938e21d592870bd6873ea1bc33336da5","amount_due":4400,"created_at":1763563898,"payment_id":"pay_RheSGc35HYPRPH","amount_paid":0}'); +INSERT INTO payments VALUES(2,2,'pending','razorpay','2','order_RhduSaAJIuFBzZ','{"id":"order_RhduSaAJIuFBzZ","notes":{"customerOrderId":"2"},"amount":22000,"entity":"order","status":"created","receipt":"order_2","attempts":0,"currency":"INR","offer_id":null,"amount_due":22000,"created_at":1763564911,"amount_paid":0}'); +INSERT INTO payments VALUES(3,3,'pending','razorpay','3','order_Rhg5W23p2znoMY','{"id":"order_Rhg5W23p2znoMY","notes":{"customerOrderId":"3"},"amount":22000,"entity":"order","status":"created","receipt":"order_3","attempts":0,"currency":"INR","offer_id":null,"amount_due":22000,"created_at":1763572582,"amount_paid":0}'); +INSERT INTO payments VALUES(4,4,'pending','razorpay','4','order_Rhg6mh3BUvamRb','{"id":"order_Rhg6mh3BUvamRb","notes":{"customerOrderId":"4"},"amount":43000,"entity":"order","status":"created","receipt":"order_4","attempts":0,"currency":"INR","offer_id":null,"amount_due":43000,"created_at":1763572654,"amount_paid":0}'); +INSERT INTO payments VALUES(5,5,'failed','razorpay','5','order_RhgHdO0tN2ze09','{"id":"order_RhgHdO0tN2ze09","notes":{"customerOrderId":"5"},"amount":70000,"entity":"order","status":"created","receipt":"order_5","attempts":0,"currency":"INR","offer_id":null,"amount_due":70000,"created_at":1763573270,"amount_paid":0}'); +INSERT INTO payments VALUES(6,6,'pending','razorpay','6','order_RhgYaSCauk0Q2K','{"id":"order_RhgYaSCauk0Q2K","notes":{"customerOrderId":"6"},"amount":2200,"entity":"order","status":"created","receipt":"order_6","attempts":0,"currency":"INR","offer_id":null,"amount_due":2200,"created_at":1763574233,"amount_paid":0}'); +INSERT INTO payments VALUES(7,7,'pending','razorpay','7','order_RhgZsq1zxjncFX','{"id":"order_RhgZsq1zxjncFX","notes":{"customerOrderId":"7"},"amount":2200,"entity":"order","status":"created","receipt":"order_7","attempts":0,"currency":"INR","offer_id":null,"amount_due":2200,"created_at":1763574307,"amount_paid":0}'); +INSERT INTO payments VALUES(8,8,'pending','razorpay','8','order_Rhgczd7LM2RlaP','{"id":"order_Rhgczd7LM2RlaP","notes":{"customerOrderId":"8"},"amount":2200,"entity":"order","status":"created","receipt":"order_8","attempts":0,"currency":"INR","offer_id":null,"amount_due":2200,"created_at":1763574483,"amount_paid":0}'); +INSERT INTO payments VALUES(9,9,'pending','razorpay','9','order_RhgiZalLiVPuH8','{"id":"order_RhgiZalLiVPuH8","notes":{"customerOrderId":"9"},"amount":50000,"entity":"order","status":"created","receipt":"order_9","attempts":0,"currency":"INR","offer_id":null,"amount_due":50000,"created_at":1763574800,"amount_paid":0}'); +INSERT INTO payments VALUES(10,11,'pending','razorpay','11','order_Rhgs4FOJ0LP3Ey','{"id":"order_Rhgs4FOJ0LP3Ey","notes":{"customerOrderId":"11"},"amount":4400,"entity":"order","status":"created","receipt":"order_11","attempts":0,"currency":"INR","offer_id":null,"amount_due":4400,"created_at":1763575340,"amount_paid":0}'); +INSERT INTO payments VALUES(11,12,'failed','razorpay','12','order_RhguHTMNkOdUwp','{"id":"order_RhguHTMNkOdUwp","notes":{"customerOrderId":"12"},"amount":22000,"entity":"order","status":"created","receipt":"order_12","attempts":0,"currency":"INR","offer_id":null,"amount_due":22000,"created_at":1763575465,"amount_paid":0}'); +INSERT INTO payments VALUES(12,13,'pending','razorpay','13','order_RhgwhwZZdjweOR','{"id":"order_RhgwhwZZdjweOR","notes":{"customerOrderId":"13"},"amount":2200,"entity":"order","status":"created","receipt":"order_13","attempts":0,"currency":"INR","offer_id":null,"amount_due":2200,"created_at":1763575603,"amount_paid":0}'); +INSERT INTO payments VALUES(13,14,'failed','razorpay','14','order_RhgzcqerOQNs98','{"id":"order_RhgzcqerOQNs98","notes":{"customerOrderId":"14"},"amount":21000,"entity":"order","status":"created","receipt":"order_14","attempts":0,"currency":"INR","offer_id":null,"amount_due":21000,"created_at":1763575769,"amount_paid":0}'); +INSERT INTO payments VALUES(14,14,'success','razorpay','14','order_Rhh00qJNdjUp8o','{"id":"order_Rhh00qJNdjUp8o","notes":{"retry":"true","customerOrderId":"14"},"amount":21000,"entity":"order","status":"created","receipt":"order_14_retry","attempts":0,"currency":"INR","offer_id":null,"signature":"6df20655021f1d6841340f2a2ef2ef9378cb3d43495ab09e85f08aea1a851583","amount_due":21000,"created_at":1763575791,"payment_id":"pay_Rhh15cLL28YM7j","amount_paid":0}'); +INSERT INTO payments VALUES(15,12,'success','razorpay','12','order_Rhh1R5ViTgI0Zs','{"id":"order_Rhh1R5ViTgI0Zs","notes":{"retry":"true","customerOrderId":"12"},"amount":22000,"entity":"order","status":"created","receipt":"order_12_retry","attempts":0,"currency":"INR","offer_id":null,"signature":"bef3958fa069c43b61801c1f16edf8372835a324e17bc2448f8ec6a28a8eb7f4","amount_due":22000,"created_at":1763575872,"payment_id":"pay_Rhh1qKLJknk3n4","amount_paid":0}'); +INSERT INTO payments VALUES(16,5,'pending','razorpay','5','order_Rhh2UWeTun3fju','{"id":"order_Rhh2UWeTun3fju","notes":{"retry":"true","customerOrderId":"5"},"amount":70000,"entity":"order","status":"created","receipt":"order_5_retry","attempts":0,"currency":"INR","offer_id":null,"amount_due":70000,"created_at":1763575932,"amount_paid":0}'); +INSERT INTO payments VALUES(17,15,'failed','razorpay','15','order_Ri6rB90w7pYBr9','{"id":"order_Ri6rB90w7pYBr9","notes":{"customerOrderId":"15"},"amount":70000,"entity":"order","status":"created","receipt":"order_15","attempts":0,"currency":"INR","offer_id":null,"amount_due":70000,"created_at":1763666851,"amount_paid":0}'); +INSERT INTO payments VALUES(18,16,'failed','razorpay','16','order_Ri6sAWser4nop7','{"id":"order_Ri6sAWser4nop7","notes":{"customerOrderId":"16"},"amount":70000,"entity":"order","status":"created","receipt":"order_16","attempts":0,"currency":"INR","offer_id":null,"amount_due":70000,"created_at":1763666907,"amount_paid":0}'); +INSERT INTO payments VALUES(19,17,'failed','razorpay','17','order_Ri6tMMIZdzeqis','{"id":"order_Ri6tMMIZdzeqis","notes":{"customerOrderId":"17"},"amount":21000,"entity":"order","status":"created","receipt":"order_17","attempts":0,"currency":"INR","offer_id":null,"amount_due":21000,"created_at":1763666975,"amount_paid":0}'); +INSERT INTO payments VALUES(20,17,'failed','razorpay','17','order_Ri6tQL1UNaANTQ','{"id":"order_Ri6tQL1UNaANTQ","notes":{"customerOrderId":"17"},"amount":21000,"entity":"order","status":"created","receipt":"order_17","attempts":0,"currency":"INR","offer_id":null,"amount_due":21000,"created_at":1763666979,"amount_paid":0}'); +INSERT INTO payments VALUES(21,17,'failed','razorpay','17','order_Ri6tVB8hDRO076','{"id":"order_Ri6tVB8hDRO076","notes":{"customerOrderId":"17"},"amount":21000,"entity":"order","status":"created","receipt":"order_17","attempts":0,"currency":"INR","offer_id":null,"amount_due":21000,"created_at":1763666983,"amount_paid":0}'); +INSERT INTO payments VALUES(22,19,'failed','razorpay','19','order_Rj2wr3MPXGMjHS','{"id":"order_Rj2wr3MPXGMjHS","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1763871427,"amount_paid":0}'); +INSERT INTO payments VALUES(23,21,'success','razorpay','21','order_RjAd65gFHGAF4g','{"id":"order_RjAd65gFHGAF4g","notes":{"customerOrderId":"21"},"amount":72200,"entity":"order","status":"created","receipt":"order_21","attempts":0,"currency":"INR","offer_id":null,"signature":"7f4ec6ff7361e0f2a5e0a27d409506fee107402f84d0c4ad86767d84fb6e75d0","amount_due":72200,"created_at":1763898478,"payment_id":"pay_RjAe9Zb7Si4j4o","amount_paid":0}'); +INSERT INTO payments VALUES(24,23,'success','razorpay','23','order_RjYovXkkXeehgQ','{"id":"order_RjYovXkkXeehgQ","notes":{"customerOrderId":"23"},"amount":22000,"entity":"order","status":"created","receipt":"order_23","attempts":0,"currency":"INR","offer_id":null,"signature":"099541f6002cc931b300141af765c194c016f07d89717c962667a743b8694c21","amount_due":22000,"created_at":1763983669,"payment_id":"pay_RjYtSlsBMHg07p","amount_paid":0}'); +INSERT INTO payments VALUES(25,25,'success','razorpay','25','order_Rjwkoef4xrIElJ','{"id":"order_Rjwkoef4xrIElJ","notes":{"customerOrderId":"25"},"amount":456000,"entity":"order","status":"created","receipt":"order_25","attempts":0,"currency":"INR","offer_id":null,"signature":"7c17e6edf771b124218cdc4ecaa4957bf4410c39a70d38e0c5610266e36aeb2c","amount_due":456000,"created_at":1764067954,"payment_id":"pay_RjwmIVh7dXngbZ","amount_paid":0}'); +INSERT INTO payments VALUES(26,26,'success','razorpay','26','order_RkkWFDKoRb26Wl','{"id":"order_RkkWFDKoRb26Wl","notes":{"customerOrderId":"26"},"amount":970240,"entity":"order","status":"created","receipt":"order_26","attempts":0,"currency":"INR","offer_id":null,"signature":"dfd2a9b63673d6fc1293c7206a14907a699d0da094c8e8a483cfaa75f76447fc","amount_due":970240,"created_at":1764243207,"payment_id":"pay_RkkWqcVVg01uW6","amount_paid":0}'); +INSERT INTO payments VALUES(27,30,'success','razorpay','30','order_RlPi7QaPW4b8Gw','{"id":"order_RlPi7QaPW4b8Gw","notes":{"customerOrderId":"30"},"amount":187000,"entity":"order","status":"created","receipt":"order_30","attempts":0,"currency":"INR","offer_id":null,"signature":"5e42cb3791ed3fb19b4d13f4c8a21f30de1f74ec5e0babf31510bb4249edd483","amount_due":187000,"created_at":1764388268,"payment_id":"pay_RlPjeb1hpjBIt6","amount_paid":0}'); +INSERT INTO payments VALUES(28,31,'failed','razorpay','31','order_RlPmA6xXh1YRDc','{"id":"order_RlPmA6xXh1YRDc","notes":{"customerOrderId":"31"},"amount":187000,"entity":"order","status":"created","receipt":"order_31","attempts":0,"currency":"INR","offer_id":null,"amount_due":187000,"created_at":1764388497,"amount_paid":0}'); +INSERT INTO payments VALUES(29,32,'failed','razorpay','32','order_RlPwSYB4XqfQB7','{"id":"order_RlPwSYB4XqfQB7","notes":{"customerOrderId":"32"},"amount":149600,"entity":"order","status":"created","receipt":"order_32","attempts":0,"currency":"INR","offer_id":null,"amount_due":149600,"created_at":1764389082,"amount_paid":0}'); +INSERT INTO payments VALUES(30,33,'success','razorpay','33','order_RlPyjETea6ty73','{"id":"order_RlPyjETea6ty73","notes":{"customerOrderId":"33"},"amount":56000,"entity":"order","status":"created","receipt":"order_33","attempts":0,"currency":"INR","offer_id":null,"signature":"e72f5ca9b95f1837861b5efc2f2289f9f556c908ba2a19cf85e1d545980eee7c","amount_due":56000,"created_at":1764389211,"payment_id":"pay_RlPzYBu93IT0Vi","amount_paid":0}'); +INSERT INTO payments VALUES(31,35,'failed','razorpay','35','order_RlQLPUSRDheMYA','{"id":"order_RlQLPUSRDheMYA","notes":{"customerOrderId":"35"},"amount":112000,"entity":"order","status":"created","receipt":"order_35","attempts":0,"currency":"INR","offer_id":null,"amount_due":112000,"created_at":1764390499,"amount_paid":0}'); +INSERT INTO payments VALUES(32,37,'failed','razorpay','37','order_RlQXT2rr7csMdO','{"id":"order_RlQXT2rr7csMdO","notes":{"customerOrderId":"37"},"amount":231000,"entity":"order","status":"created","receipt":"order_37","attempts":0,"currency":"INR","offer_id":null,"amount_due":231000,"created_at":1764391184,"amount_paid":0}'); +INSERT INTO payments VALUES(33,38,'failed','razorpay','38','order_RlQZ9Z4bHiEctz','{"id":"order_RlQZ9Z4bHiEctz","notes":{"customerOrderId":"38"},"amount":162000,"entity":"order","status":"created","receipt":"order_38","attempts":0,"currency":"INR","offer_id":null,"amount_due":162000,"created_at":1764391280,"amount_paid":0}'); +INSERT INTO payments VALUES(34,40,'failed','razorpay','40','order_RlQg7pdyZk07ev','{"id":"order_RlQg7pdyZk07ev","notes":{"customerOrderId":"40"},"amount":132000,"entity":"order","status":"created","receipt":"order_40","attempts":0,"currency":"INR","offer_id":null,"amount_due":132000,"created_at":1764391676,"amount_paid":0}'); +INSERT INTO payments VALUES(35,41,'pending','razorpay','41','order_RlQkq8lYf2blRm','{"id":"order_RlQkq8lYf2blRm","notes":{"customerOrderId":"41"},"amount":132000,"entity":"order","status":"created","receipt":"order_41","attempts":0,"currency":"INR","offer_id":null,"amount_due":132000,"created_at":1764391944,"amount_paid":0}'); +INSERT INTO payments VALUES(36,42,'pending','razorpay','42','order_RlQlwOKfGfD8Ew','{"id":"order_RlQlwOKfGfD8Ew","notes":{"customerOrderId":"42"},"amount":37600,"entity":"order","status":"created","receipt":"order_42","attempts":0,"currency":"INR","offer_id":null,"amount_due":37600,"created_at":1764392006,"amount_paid":0}'); +INSERT INTO payments VALUES(37,43,'pending','razorpay','43','order_RlQuu1EUfczKPN','{"id":"order_RlQuu1EUfczKPN","notes":{"customerOrderId":"43"},"amount":146400,"entity":"order","status":"created","receipt":"order_43","attempts":0,"currency":"INR","offer_id":null,"amount_due":146400,"created_at":1764392515,"amount_paid":0}'); +INSERT INTO payments VALUES(38,44,'pending','razorpay','44','order_RlQwWNsgADgxDz','{"id":"order_RlQwWNsgADgxDz","notes":{"customerOrderId":"44"},"amount":146400,"entity":"order","status":"created","receipt":"order_44","attempts":0,"currency":"INR","offer_id":null,"amount_due":146400,"created_at":1764392607,"amount_paid":0}'); +INSERT INTO payments VALUES(39,45,'pending','razorpay','45','order_RlQyTsabL2V16b','{"id":"order_RlQyTsabL2V16b","notes":{"customerOrderId":"45"},"amount":149600,"entity":"order","status":"created","receipt":"order_45","attempts":0,"currency":"INR","offer_id":null,"amount_due":149600,"created_at":1764392719,"amount_paid":0}'); +INSERT INTO payments VALUES(40,46,'pending','razorpay','46','order_RlR69lcxwqstb6','{"id":"order_RlR69lcxwqstb6","notes":{"customerOrderId":"46"},"amount":690400,"entity":"order","status":"created","receipt":"order_46","attempts":0,"currency":"INR","offer_id":null,"amount_due":690400,"created_at":1764393155,"amount_paid":0}'); +INSERT INTO payments VALUES(41,47,'pending','razorpay','47','order_RlS07mRZPryR3t','{"id":"order_RlS07mRZPryR3t","notes":{"customerOrderId":"47"},"amount":75200,"entity":"order","status":"created","receipt":"order_47","attempts":0,"currency":"INR","offer_id":null,"amount_due":75200,"created_at":1764396334,"amount_paid":0}'); +INSERT INTO payments VALUES(42,48,'failed','razorpay','48','order_RlSCsTHyNKuOhn','{"id":"order_RlSCsTHyNKuOhn","notes":{"customerOrderId":"48"},"amount":112200,"entity":"order","status":"created","receipt":"order_48","attempts":0,"currency":"INR","offer_id":null,"amount_due":112200,"created_at":1764397058,"amount_paid":0}'); +INSERT INTO payments VALUES(43,49,'success','razorpay','49','order_RlSHRuwHdMoUye','{"id":"order_RlSHRuwHdMoUye","notes":{"customerOrderId":"49"},"amount":315600,"entity":"order","status":"created","receipt":"order_49","attempts":0,"currency":"INR","offer_id":null,"signature":"7822497f6f5c8894b139e0565223a2d3c6fb5df298a4998f9979efbe474d24e6","amount_due":315600,"created_at":1764397318,"payment_id":"pay_RlSHwidHn91jay","amount_paid":0}'); +INSERT INTO payments VALUES(44,50,'success','razorpay','50','order_RlSWc4NJJ69f7V','{"id":"order_RlSWc4NJJ69f7V","notes":{"customerOrderId":"50"},"amount":468600,"entity":"order","status":"created","receipt":"order_50","attempts":0,"currency":"INR","offer_id":null,"signature":"839a9f6ccf1306ca400587567b80ef8865972855657e228126dfabecd65866e7","amount_due":468600,"created_at":1764398179,"payment_id":"pay_RlSX31RGtluYVh","amount_paid":0}'); +INSERT INTO payments VALUES(45,51,'success','razorpay','51','order_RlT6bwRhArlEkf','{"id":"order_RlT6bwRhArlEkf","notes":{"customerOrderId":"51"},"amount":25000,"entity":"order","status":"created","receipt":"order_51","attempts":0,"currency":"INR","offer_id":null,"signature":"59150ddcdd04d841a95e7e3a7d3f209b267e46ecfe2cf91b85c96eb977f9b026","amount_due":25000,"created_at":1764400224,"payment_id":"pay_RlT7JjVCrxXRHC","amount_paid":0}'); +INSERT INTO payments VALUES(46,52,'success','razorpay','52','order_RlTHrPLnw2EujN','{"id":"order_RlTHrPLnw2EujN","notes":{"customerOrderId":"52"},"amount":25000,"entity":"order","status":"created","receipt":"order_52","attempts":0,"currency":"INR","offer_id":null,"signature":"45d931069bf90287f48010decf24a9eba589909069ecb184f0bc8311105cb673","amount_due":25000,"created_at":1764400863,"payment_id":"pay_RlTIbvllphqQnW","amount_paid":0}'); +INSERT INTO payments VALUES(47,53,'success','razorpay','53','order_RlTOzxz8DaDOwf','{"id":"order_RlTOzxz8DaDOwf","notes":{"customerOrderId":"53"},"amount":40000,"entity":"order","status":"created","receipt":"order_53","attempts":0,"currency":"INR","offer_id":null,"signature":"5452ac1b6535e0348ff7f91eee9d597856cf32a9ec64dfc467e7d2b53e8fef95","amount_due":40000,"created_at":1764401268,"payment_id":"pay_RlTPeKJPkdLz7Z","amount_paid":0}'); +INSERT INTO payments VALUES(48,54,'success','razorpay','54','order_RlUTuqAZzfNeUv','{"id":"order_RlUTuqAZzfNeUv","notes":{"customerOrderId":"54"},"amount":285000,"entity":"order","status":"created","receipt":"order_54","attempts":0,"currency":"INR","offer_id":null,"signature":"724b5c2ca061a38dd2a8d21c43a2f7caf246936d628961d9739bbea1edffc4bd","amount_due":285000,"created_at":1764405069,"payment_id":"pay_RlUUaZfFUQu0bw","amount_paid":0}'); +INSERT INTO payments VALUES(49,19,'pending','razorpay','19','order_RpVxTzSti5nJlk','{"id":"order_RpVxTzSti5nJlk","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1765283630,"amount_paid":0}'); +INSERT INTO payments VALUES(50,19,'pending','razorpay','19','order_RpVxUPtLxk2htm','{"id":"order_RpVxUPtLxk2htm","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1765283631,"amount_paid":0}'); +INSERT INTO payments VALUES(51,56,'success','razorpay','56','order_RpxXVYjAZ9hKRs','{"id":"order_RpxXVYjAZ9hKRs","notes":{"customerOrderId":"56"},"amount":6400,"entity":"order","status":"created","receipt":"order_56","attempts":0,"currency":"INR","offer_id":null,"signature":"a0bf4ed36bfc2f29c3744374450dcfc516f7d59493102959fc2acb03d1bf09ab","amount_due":6400,"created_at":1765380760,"payment_id":"pay_RpxYgEbuw15e12","amount_paid":0}'); +INSERT INTO payments VALUES(52,57,'failed','razorpay','57','order_RpxZTOWJFF0sor','{"id":"order_RpxZTOWJFF0sor","notes":{"customerOrderId":"57"},"amount":7200,"entity":"order","status":"created","receipt":"order_57","attempts":0,"currency":"INR","offer_id":null,"amount_due":7200,"created_at":1765380872,"amount_paid":0}'); +INSERT INTO payments VALUES(53,57,'pending','razorpay','57','order_RpxaFYaBBoE3xA','{"id":"order_RpxaFYaBBoE3xA","notes":{"customerOrderId":"57"},"amount":7200,"entity":"order","status":"created","receipt":"order_57","attempts":0,"currency":"INR","offer_id":null,"amount_due":7200,"created_at":1765380916,"amount_paid":0}'); +INSERT INTO payments VALUES(54,46,'pending','razorpay','46','order_RrAdEPX05BXXGH','{"id":"order_RrAdEPX05BXXGH","notes":{"customerOrderId":"46"},"amount":112000,"entity":"order","status":"created","receipt":"order_46","attempts":0,"currency":"INR","offer_id":null,"amount_due":112000,"created_at":1765645206,"amount_paid":0}'); +INSERT INTO payments VALUES(55,63,'failed','razorpay','63','order_RrAdG1zzVqBNBX','{"id":"order_RrAdG1zzVqBNBX","notes":{"customerOrderId":"63"},"amount":112000,"entity":"order","status":"created","receipt":"order_63","attempts":0,"currency":"INR","offer_id":null,"amount_due":112000,"created_at":1765645208,"amount_paid":0}'); +INSERT INTO payments VALUES(56,47,'pending','razorpay','47','order_RrAePs61Rzlajz','{"id":"order_RrAePs61Rzlajz","notes":{"customerOrderId":"47"},"amount":112000,"entity":"order","status":"created","receipt":"order_47","attempts":0,"currency":"INR","offer_id":null,"amount_due":112000,"created_at":1765645274,"amount_paid":0}'); +INSERT INTO payments VALUES(57,64,'failed','razorpay','64','order_RrAeRKPcgCqCH5','{"id":"order_RrAeRKPcgCqCH5","notes":{"customerOrderId":"64"},"amount":42000,"entity":"order","status":"created","receipt":"order_64","attempts":0,"currency":"INR","offer_id":null,"amount_due":42000,"created_at":1765645275,"amount_paid":0}'); +INSERT INTO payments VALUES(58,64,'failed','razorpay','64','order_RrAeVlINAOaLMi','{"id":"order_RrAeVlINAOaLMi","notes":{"customerOrderId":"64"},"amount":42000,"entity":"order","status":"created","receipt":"order_64","attempts":0,"currency":"INR","offer_id":null,"amount_due":42000,"created_at":1765645279,"amount_paid":0}'); +INSERT INTO payments VALUES(59,19,'pending','razorpay','19','order_Rx3m1bvIbeGnQy','{"id":"order_Rx3m1bvIbeGnQy","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1766931095,"amount_paid":0}'); +INSERT INTO payments VALUES(60,19,'pending','razorpay','19','order_Rx3m23b4jndeAR','{"id":"order_Rx3m23b4jndeAR","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1766931096,"amount_paid":0}'); +INSERT INTO payments VALUES(61,19,'pending','razorpay','19','order_Rx3m2DF1gpeu8L','{"id":"order_Rx3m2DF1gpeu8L","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1766931096,"amount_paid":0}'); +CREATE TABLE IF NOT EXISTS "product_availability_schedules" ("id" INTEGER PRIMARY KEY, "time" TEXT NOT NULL, "schedule_name" TEXT NOT NULL, "action" TEXT NOT NULL, "product_ids" TEXT NOT NULL DEFAULT '[]', "group_ids" TEXT NOT NULL DEFAULT '[]', "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "last_updated" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO product_availability_schedules VALUES(1,'22:00','Demo schedule','in','[9,83,81,75,82,22,102,6,14,35,86,4,99,98]','[9,7]','2026-03-19T08:25:27.311Z','2026-03-19T08:25:27.311Z'); +INSERT INTO product_availability_schedules VALUES(3,'00:22','Test4','in','[50]','[]','2026-03-19T13:20:01.972Z','2026-03-19T13:20:01.972Z'); +INSERT INTO product_availability_schedules VALUES(4,'12:00','Mutton off','out','[6,14,35,86,4,99,98]','[7]','2026-03-20T11:27:20.629Z','2026-03-20T11:27:20.629Z'); +CREATE TABLE IF NOT EXISTS "product_categories" ("id" INTEGER PRIMARY KEY, "name" TEXT NOT NULL, "description" TEXT); +CREATE TABLE IF NOT EXISTS "product_group_info" ("id" INTEGER PRIMARY KEY, "group_name" TEXT NOT NULL, "description" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO product_group_info VALUES(1,'Vegetables','All Market Vegetables','2025-12-31T22:12:45.110Z'); +INSERT INTO product_group_info VALUES(2,'Chicken Items','All Chicken Items','2025-12-31T22:13:41.539Z'); +INSERT INTO product_group_info VALUES(3,'Fruits','All Fruits','2025-12-31T22:15:13.138Z'); +INSERT INTO product_group_info VALUES(5,'All Chicken items ','All chicken items only ','2026-01-25T08:24:51.769Z'); +INSERT INTO product_group_info VALUES(7,'All mutton items','All mutton items ','2026-01-25T08:32:15.938Z'); +INSERT INTO product_group_info VALUES(8,'All vegetables items ','All vegetables items ','2026-01-25T08:35:03.380Z'); +INSERT INTO product_group_info VALUES(9,'All fish ','All fish ','2026-01-25T08:57:31.702Z'); +INSERT INTO product_group_info VALUES(10,'All fruits items ','','2026-01-30T09:39:13.561Z'); +CREATE TABLE IF NOT EXISTS "product_group_membership" ("product_id" INTEGER NOT NULL, "group_id" INTEGER NOT NULL, "added_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO product_group_membership VALUES(1,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(2,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(2,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(3,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(3,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(4,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(5,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(6,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(6,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(6,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(6,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(7,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(7,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(8,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(8,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(9,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(10,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(10,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(11,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(11,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(13,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(13,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(13,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(14,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(15,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(16,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(17,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(17,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(18,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(18,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(19,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(19,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(21,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(21,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(22,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(23,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(23,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(24,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(24,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(25,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(25,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(26,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(26,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(27,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(27,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(28,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(28,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(29,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(29,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(30,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(30,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(31,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(31,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(32,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(32,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(33,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(33,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(34,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(35,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(36,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(36,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(37,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(37,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(38,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(38,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(39,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(39,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(40,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(41,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(42,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(43,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(43,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(44,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(44,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(45,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(46,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(46,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(47,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(47,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(48,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(49,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(49,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(50,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(50,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(51,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(51,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(52,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(52,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(53,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(53,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(54,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(54,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(55,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(55,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(56,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(56,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(57,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(57,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(58,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(58,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(59,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(59,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(60,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(60,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(61,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(61,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(62,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(62,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(63,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(63,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(64,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(65,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(66,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(67,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(68,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(69,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(70,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(71,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(72,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(73,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(73,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(74,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(75,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(76,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(77,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(78,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(79,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(80,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(81,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(82,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(83,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(86,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(88,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(89,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(90,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(91,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(92,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(94,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(95,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(96,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(96,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(97,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(98,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(99,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(100,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(100,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(101,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(102,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(103,8,'2026-02-23T03:23:13.305Z'); +CREATE TABLE IF NOT EXISTS "product_info" ("id" INTEGER PRIMARY KEY, "name" TEXT NOT NULL, "short_description" TEXT, "long_description" TEXT, "unit_id" INTEGER NOT NULL, "price" REAL NOT NULL, "images" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "is_out_of_stock" INTEGER NOT NULL DEFAULT false, "market_price" REAL, "store_id" INTEGER, "is_suspended" INTEGER NOT NULL DEFAULT false, "increment_step" REAL NOT NULL DEFAULT 1, "is_flash_available" INTEGER NOT NULL DEFAULT false, "flash_price" REAL, "product_quantity" REAL NOT NULL DEFAULT 1, "scheduled_availability" INTEGER NOT NULL DEFAULT true); +INSERT INTO product_info VALUES(1,'Chicken Liver','Liver sourced from the farm hens.',replace('Bring home the deep, hearty taste of fresh Chicken Liver, sourced from healthy, farm-raised chickens. Each piece is carefully cleaned and handled with care to retain its natural richness, smooth texture, and vibrant color.\n\nPerfect for making creamy pâtés, spicy fry dishes, gravies, or traditional home-style recipes, our chicken liver delivers authentic flavor and exceptional freshness in every bite.','\n',char(10)),1,99.0,'["product-images/1768478127128-0","product-images/1768478472220-0"]','2025-11-18T08:06:27.505Z',0,110.0,1,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(2,'Chicken Breast 500 g','Farm Chicken Breast uncut and solid.',replace('Experience the rich taste of fresh, premium-quality chicken sourced directly from trusted farms. Each bird is carefully cleaned, processed hygienically, and delivered chilled to preserve its natural flavor, tenderness, and juiciness.\n\nWhether you''re preparing a hearty curry, roasting for a family meal, or grilling for a weekend cookout, our whole chicken offers consistent texture, rich aroma, and superior taste in every bite.','\n',char(10)),1,198.0,'["product-images/1768397780093-0","product-images/1768479562478-0"]','2025-11-18T08:32:49.003Z',0,220.0,1,0,1.0,1,230.0,0.5,1); +INSERT INTO product_info VALUES(3,'Chicken Lollipops','Chicken cut for lollipop starter dish',replace('Turn any meal into a celebration with our premium Chicken Lollipop Cuts, expertly carved from fresh chicken drumettes and wings. Each piece is shaped cleanly into the classic “lollipop” form—perfect for frying, grilling, or tossing in your favorite tangy sauces.\n\nEnjoy the ideal balance of meatiness, tenderness, and crunch potential, making it a must-have for home chefs, party hosts, and spice lovers alike.','\n',char(10)),1,76.0,'["product-images/1768475599800-0"]','2025-11-18T08:56:07.106Z',1,89.0,1,0,1.0,0,120.0,0.25,1); +INSERT INTO product_info VALUES(4,'Mutton','Fresh, tender mutton cut from quality goat meat, cleaned and prepared hygienically for rich taste and authentic curries.',replace('Our mutton is sourced from healthy, quality goats and cut fresh to ensure natural flavor and tenderness. Each piece is carefully cleaned and processed under hygienic conditions to retain its juiciness and traditional taste. Known for its deep, rich flavor, this mutton is ideal for curries, biryanis, gravies, roasts, and slow-cooked dishes. No chemicals, no preservatives—just pure mutton that cooks well, absorbs spices properly, and delivers the taste people actually expect from good meat.\n','\n',char(10)),1,819.0,'["product-images/1767636171845-0"]','2025-11-18T08:57:53.779Z',1,860.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(5,'Cucumber(Kheera)','High water content, helps hydration, and keeps the body cool.',replace('\nThis fresh cucumber is crisp, juicy, and mild in taste, making it perfect for everyday use. Carefully selected for firmness and freshness, it’s ideal for salads, raita, juices, and garnishing. With high water content and a clean, refreshing bite, cucumber is best enjoyed fresh and chilled.','\n',char(10)),1,26.0,'["product-images/1768710099841-0"]','2025-11-18T08:59:53.556Z',0,33.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(6,'Apple ( pack of 3) ','Kashmiri Apples',replace('These apples are fresh, firm, and crisp with a clean, naturally sweet flavor. Handpicked for quality and freshness, they’re ideal for everyday snacking, salads, or cooking. Simple, reliable fruit that fits easily into daily meals.\n','\n',char(10)),4,109.0,'["product-images/1768640936747-0"]','2025-11-18T09:02:29.167Z',1,120.0,2,0,1.0,1,NULL,3.0,1); +INSERT INTO product_info VALUES(7,'Banana','Fresh bananas with a naturally sweet taste and soft, creamy texture.','Bananas supporting heart health through potassium, improving digestion with fiber, and providing an energy boost from carbohydrates. ',3,49.0,'["product-images/1768640009078-0"]','2025-11-22T01:37:58.613Z',0,60.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(8,'Kiwi','Fresh kiwis with sweet-tart flavor, juicy green flesh, and edible seeds.','Kiwi is rich in Vitamin C, which boosts immunity and keeps the body strong. It also has fiber that helps in digestion and keeps the stomach healthy. Eating kiwi improves skin glow and supports heart health.',4,119.0,'["product-images/1768647119198-0"]','2025-11-22T01:49:17.573Z',0,130.0,2,0,1.0,1,NULL,4.0,1); +INSERT INTO product_info VALUES(9,'Apollo Fish',replace('Boneless\nFresh tuna fish, high in protein and omega-3, ideal for curries, grilling, and pan-fry.','\n',char(10)),'Fresh sea-caught tuna fish with firm texture and rich flavor. Widely used for curries, steaks, grilling, and shallow frying. Naturally high in protein and omega-3 fatty acids, supporting muscle health and heart health. Cleaned and cut hygienically to retain freshness and taste.',1,296.0,'["product-images/1768832690994-0"]','2025-11-22T22:17:08.582Z',0,340.0,1,0,1.0,0,355.0,0.7,1); +INSERT INTO product_info VALUES(10,'Chicken leg piece ','6 pieces ','Fresh, meaty leg pieces with rich flavor and soft texture. Ideal for tandoori, BBQ, and home-style recipes.',4,249.0,'["product-images/1768390245969-0"]','2025-11-22T22:28:25.741Z',0,269.0,1,0,1.0,1,270.0,6.0,1); +INSERT INTO product_info VALUES(11,'Nagpur orange (pack 5)','Fresh oranges with juicy, sweet-tangy flesh and a refreshing citrus taste.','These oranges have a naturally juicy interior with a balanced sweet and tangy flavor. Though green on the outside, the flesh inside is bright, fresh, and full of citrus goodness. Ideal for everyday eating, fresh juice, or adding a refreshing twist to meals.',4,119.0,'["product-images/1768641635898-0"]','2025-11-22T22:30:28.878Z',0,150.0,2,0,1.0,1,150.0,5.0,1); +INSERT INTO product_info VALUES(12,'Lamb Mutton','','"Indulge in the rich, savory experience of our premium mutton. Sourced from the finest cuts, our muttons offers unparalleled tenderness and flavor. Whether you''re grilling a juicy steak, slow-cooking a tender roast, or creating a hearty stew, our mutton is the perfect choice for any culinary creation. Experience the difference quality makes – savor every delicious bite."',1,850.0,'["product-images/1764500702143-0","product-images/1764500702144-1"]','2025-11-30T05:35:04.520Z',1,870.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(13,'Amla (Gooseberry)','Fresh amla with a tangy, slightly sour taste and firm texture.','These fresh amlas are firm, tangy, and packed with natural goodness. Carefully selected for size and freshness, they’re perfect for eating raw, making juice, pickles, or adding to traditional recipes. A healthy fruit full of Vitamin C, with a natural bite and authentic flavor.',1,69.0,'["product-images/1768641988607-0"]','2025-11-30T05:46:29.900Z',0,79.0,2,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(14,'Mutton Boti (Goat Intestines)','Fresh mutton boti, rich in protein and iron, ideal for traditional curries and spicy dishes.','Freshly cleaned mutton boti sourced from healthy goats. Carefully washed and prepared for cooking traditional recipes like boti curry and spicy gravies. Rich in protein and iron, commonly used in regional cuisines. Cleaned hygienically and packed fresh.',1,389.0,'["product-images/1768834170995-0"]','2025-12-04T22:10:55.354Z',1,400.0,1,0,1.0,0,420.0,1.0,1); +INSERT INTO product_info VALUES(15,'Chicken Gizard','Fresh, cleaned chicken gizzards with a rich, meaty texture-ideal for curries, fry recipes, and traditional dishes.','Chicken gizzard is a flavorful and nutrient-rich cut known for its firm texture and deep taste. Carefully cleaned and hygienically packed, our gizzards are sourced fresh to ensure quality and freshness. Perfect for slow-cooked curries, spicy fries, stir-fries, and regional delicacies, chicken gizzard absorbs spices beautifully and delivers a hearty bite in every dish.',1,210.0,'["product-images/1768477813647-0","product-images/1768477813648-1"]','2025-12-06T12:35:43.241Z',1,250.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(16,'Arvi (Arbi) – Colocasia Root','Fresh arvi with soft texture when cooked, ideal for curries, fries, and dry sabzi.','Arvi, also known as colocasia or taro root, is a popular root vegetable used in many Indian dishes. When cooked properly, it becomes soft and creamy with a mildly nutty flavour. Arvi is commonly used in dry sabzis, gravies, and fried preparations. It absorbs spices well and pairs perfectly with both mild and spicy masalas. Naturally rich in dietary fiber and essential nutrients, arvi supports digestion and provides long-lasting energy. Freshly sourced and cleaned to ensure quality and taste. Must be washed and cooked thoroughly before consumption.',1,28.0,'["product-images/1769397372526-0"]','2025-12-12T03:09:59.286Z',0,33.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(17,'Tomato ','Healthy, tasty, and fresh tomatoes','Fresh, red, and juicy tomatoes to make your meals healthier and tastier.',1,28.0,'["product-images/1768640233068-0"]','2025-12-18T02:22:23.436Z',1,35.0,4,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(18,'Onions ','Fresh and flavorful onions for everyday cooking.','Healthy, fresh onions at the best quality and price',1,44.0,'["product-images/1769351976737-0"]','2025-12-18T03:37:08.849Z',0,48.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(19,'Potato','Fresh, healthy potatoes perfect for every dish.','A versatile vegetable every kitchen needs.',1,23.0,'["product-images/1768639707515-0"]','2025-12-18T03:40:28.496Z',0,29.0,4,0,1.0,1,50.0,0.5,1); +INSERT INTO product_info VALUES(20,'Mutton Head','Fresh mutton head rich in protein and collagen, ideal for traditional curries and soups.','Freshly sourced goat head, commonly used in traditional dishes and slow-cooked recipes. Contains head meat (sira) and bones that release rich flavor and collagen when cooked slowly. Popular in regional cuisines for its taste and nourishment. Cleaned thoroughly and packed hygienically.',4,379.0,'["product-images/1769353802270-0"]','2025-12-19T03:42:31.946Z',0,400.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(21,'Whole chicken - fresh cut','Fresh, tender whole chicken cleaned and cut hygienically for rich taste and high protein meals.','Our Whole Chicken is farm-fresh, carefully cleaned, and hygienically processed to lock in natural tenderness and flavor. Rich in protein and essential nutrients, it''s perfect for curries, roasting, grilling, or slow cooking. Delivered fresh to your doorstep, ensuring quality, taste, and nutrition in every bite.',1,559.0,'["product-images/1768539930897-0","product-images/1768539930899-1"]','2025-12-19T03:45:54.143Z',0,620.0,1,0,1.0,0,NULL,2.0,1); +INSERT INTO product_info VALUES(22,'Tuna Fish boneless ','Fresh tuna fish, high in protein and omega-3, ideal for curries, grilling, and pan-fry.',replace('Fresh sea-caught tuna with firm texture and rich flavor. Suitable for curry preparations, steaks, grilling, and shallow frying. Naturally high in protein and omega-3 fatty acids, supporting muscle and heart health. Cleaned and cut hygienically to retain freshness.\nBrutal truth','\n',char(10)),1,469.0,'["product-images/1768834996932-0"]','2025-12-19T03:53:12.867Z',0,529.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(23,'Chicken ( regular cut )- Small pieces ','Fresh, bone-in chicken pieces ideal for making rich and flavorful curries.','Freshly cut, bone-in chicken pieces perfect for rich, flavorful curries. Cleaned and hygienically packed to lock in tenderness and taste for a delicious home-style meal every time.',1,140.0,'["product-images/1767635527063-0"]','2025-12-19T03:53:53.748Z',1,160.0,1,0,1.0,1,149.0,0.5,1); +INSERT INTO product_info VALUES(24,'Chicken boneless','Fresh, tender boneless chicken pieces, perfectly trimmed for quick cooking. Ideal for curries, stir-fries, grills, and biryanis.','Fresh, tender boneless chicken pieces, perfectly trimmed for quick cooking. Ideal for curries, stir-fries, grills, and biryanis.',1,198.0,'["product-images/1768484106870-0"]','2025-12-19T03:59:46.418Z',0,220.0,1,0,1.0,1,230.0,0.5,1); +INSERT INTO product_info VALUES(25,'White Dragon Fruit','Fresh white dragon fruit with mild sweetness and soft, juicy flesh.','This white dragon fruit is fresh, mildly sweet, and refreshing with soft white flesh and tiny edible seeds. Carefully selected for size and freshness, it’s ideal for eating fresh, adding to fruit bowls, or blending into smoothies. Light on taste, easy to digest, and perfect for everyday healthy eating.',4,119.0,'["product-images/1768649838027-0"]','2025-12-19T07:39:11.874Z',0,130.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(26,'Fig (Anjeer)','Fresh fig with a soft flesh and mild, naturally sweet flavor.','These fresh figs are soft, juicy, and mildly sweet with a delicate texture. Carefully selected to avoid overripeness, they’re best enjoyed fresh or paired with desserts and salads. A premium fruit meant to be eaten gently and enjoyed slowly.',1,78.0,'["product-images/1768640645444-0"]','2025-12-22T05:34:50.001Z',1,94.0,2,0,1.0,0,NULL,0.25,1); +INSERT INTO product_info VALUES(27,'Brinjal ','Fresh medium-sized brinjal, rich in fiber, low in calories, and ideal for everyday curries and fries.','Freshly harvested brinjal with smooth skin and tender flesh. Mild in taste and versatile in cooking, it is commonly used in curries, stir-fries, bharta, and gravies. Naturally rich in fiber and antioxidants, making it suitable for regular home cooking. Washed and packed hygienically.',1,24.0,'["product-images/1768639645423-0"]','2025-12-22T06:01:30.466Z',0,30.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(28,'Mutton Boneless ','Tender boneless mutton rich in protein, ideal for quick curries, fry, and kebabs.','Freshly cut boneless mutton pieces with minimal fat and strong natural flavour. Suitable for fast-cooking dishes such as gravies, stir-fries, kebabs, and biryani. High in protein and essential minerals, supporting strength and energy. Cleaned and packed hygienically to ensure freshness and quality.',1,855.0,'["product-images/1769356702593-0"]','2025-12-22T06:14:24.499Z',1,879.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(29,' Bottle Gourd (Lauki)','Fresh medium-sized bottle gourd, low in calories, high in water content, easy to digest, and ideal for healthy everyday cooking.','Fresh bottle gourd with smooth green skin and soft, tender flesh. Light in taste and easy to digest, it is widely used in Indian home cooking for curries, dals, soups, and juices. Naturally low in calories and rich in water content, making it suitable for daily meals. Handpicked for freshness and packed hygienically.',4,29.0,'["product-images/1768823985921-0"]','2025-12-22T06:15:31.316Z',0,32.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(30,' Bitter Gourd (Karela)','Fresh bitter gourd, known to help control blood sugar and support digestion.','Fresh bitter gourd with firm texture and deep green color. Widely used in Indian cooking for stir-fries, curries, and juices. Naturally low in calories and rich in fiber, vitamins, and antioxidants. Commonly consumed for its potential benefits in blood sugar management and digestion. Wash thoroughly before use.',1,34.0,'["product-images/1768726783083-0"]','2025-12-22T06:16:16.981Z',0,42.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(31,'Lady Finger (Okra / Bhindi)','Fresh tender lady finger, soft and non-fibrous, ideal for fries and curries.','Lady finger, also known as okra or bhindi, is a popular vegetable used in everyday Indian cooking. Tender lady finger has a soft texture and mild flavour, making it perfect for fries, stir-fries, curries, and gravies. When fresh, it cooks evenly without becoming too sticky. Rich in dietary fiber, vitamins, and antioxidants, it supports digestion and overall health. Carefully sourced and packed to maintain freshness and tenderness. Wash well and trim the ends before cooking.',1,29.0,'["product-images/1769574792720-0"]','2025-12-22T06:17:07.804Z',0,34.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(32,'Lemons ','Farm-fresh lemons with high juice content and natural tangy flavor. Perfect for daily cooking, juices, and salads.','Fresh, handpicked lemons known for their strong aroma, thin skin, and high juice yield. Ideal for nimbu pani, curries, marinades, chutneys, and garnishing. Carefully selected to ensure firmness, freshness, and bright yellow color. Stored and delivered with proper care to maintain natural taste and quality.',4,29.0,'["product-images/1766406273176-0","product-images/1766406273178-1"]','2025-12-22T06:54:35.209Z',0,36.0,4,0,1.0,1,NULL,6.0,1); +INSERT INTO product_info VALUES(33,'Small Methi / Baby Fenugreek Leaves','Fresh small methi leaves with a mild bitterness, perfect for everyday cooking and quick stir-fries.','Small methi, also known as baby fenugreek leaves, is a tender and flavorful leafy vegetable widely used in Indian kitchens. Compared to regular methi, these leaves are smaller, softer, and less bitter, making them ideal for curries, dal, parathas, and simple stir-fries. They cook quickly and blend well with spices without overpowering the dish. Small methi is naturally rich in fiber, iron, and essential nutrients that support digestion and overall health. Carefully cleaned and freshly sourced, these leaves bring authentic taste and freshness to your daily meals.',4,15.0,'["product-images/1769396046557-0"]','2025-12-22T06:55:49.838Z',0,20.0,4,0,1.0,0,NULL,8.0,1); +INSERT INTO product_info VALUES(34,' Mutton Boneless – Mini Pack','Tender boneless mutton, high in protein, easy to cook, ideal for quick curries and fry.','Freshly cut boneless mutton pieces with minimal fat, perfect for quick cooking dishes like stir-fries, gravies, and kebabs. High in protein and rich in flavor, this mini pack is ideal for small families or single meals. Cleaned and packed hygienically to ensure freshness.',1,465.0,'["product-images/1769356039418-0"]','2025-12-22T06:56:25.537Z',1,489.0,1,0,1.0,0,NULL,0.25,1); +INSERT INTO product_info VALUES(35,'Mutton kheema','Freshly minced premium mutton, finely ground for rich flavor and juicy texture—perfect for kebabs, keema curry, cutlets, and stuffing.','Our mutton mince is prepared from carefully selected fresh cuts, hygienically cleaned and finely minced to deliver bold, authentic flavor in every bite. It has the ideal fat balance to stay juicy while cooking, making it suitable for keema curry, seekh kebabs, koftas, samosas, and stuffed parathas. No additives, no preservatives—just pure, high-quality mutton processed under strict hygiene standards for consistent taste, texture, and freshness.',1,429.0,'["product-images/1767636561867-0"]','2025-12-24T22:43:30.811Z',1,450.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(36,'Chicken Leg With Thigh Pack of 3','Fresh chicken leg with thigh, cut from tender, juicy chicken. Rich in flavor, naturally succulent, and ideal for frying, roasting, grilling, and curries.',replace('Chicken leg with thigh is a flavorful cut taken from the lower and upper leg portion of the chicken, known for its juicy texture and rich taste. This cut retains moisture during cooking, making it perfect for deep frying, tandoori, grilling, roasting, and slow-cooked curries. Hygienically cleaned and neatly cut to ensure freshness and quality. High in protein and full of natural flavor, it delivers a satisfying, tender bite in every dish.\nIf this is for a premium app, we can refine the tone.\nIf it’s for mass-market, this is already more than enough.\nStop being unclear—next time, say where it will be used.','\n',char(10)),1,266.0,'["product-images/1768413754684-0"]','2025-12-24T22:44:23.272Z',0,280.0,1,0,1.0,1,280.0,1.0,1); +INSERT INTO product_info VALUES(37,'Drum sticks ','Rich in fiber, vitamins, supports digestion.','Fresh, tender moringa pods used in sambar, curries, and stir-fries.',4,79.0,'["product-images/1766636589779-0"]','2025-12-24T22:53:10.791Z',0,89.0,4,0,1.0,0,NULL,6.0,1); +INSERT INTO product_info VALUES(38,'Sapota (Chikoo)','Fresh sapota with a soft texture and naturally sweet, malty flavor.','This sapota is fresh, ripe, and naturally sweet with a soft, grainy texture. Selected for good ripeness and flavor, it’s perfect for eating as it is or adding to desserts and milkshakes. A classic fruit with a rich taste and satisfying bite.',1,76.0,'["product-images/1768640403001-0"]','2025-12-24T22:53:56.874Z',1,85.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(39,'Mango','Fresh seasonal mangoes with juicy flesh and natural sweetness.','These mangoes are fresh, ripe, and full of natural sweetness with juicy, flavorful flesh. Carefully selected for ripeness and quality, they’re perfect for eating fresh, making juices, smoothies, or desserts. A seasonal favorite that brings rich taste and aroma to every bite.',1,149.0,'["product-images/1768650081183-0"]','2025-12-24T22:55:16.935Z',1,169.0,2,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(40,'Chicken (regular cut) Large pieces ','Fresh chicken curry cut with large pieces, high in protein and ideal for rich gravies and slow cooking.','Fresh broiler chicken cut into large curry-sized pieces for hearty home-style cooking. Ideal for slow-cooked curries, biryanis, and gravies where bigger pieces retain juiciness and flavor. High in protein and prepared hygienically to ensure freshness and quality.',1,133.0,'["product-images/1767637606890-0"]','2026-01-05T12:56:48.180Z',0,145.0,1,0,1.0,1,150.0,0.5,1); +INSERT INTO product_info VALUES(41,'Chicken mince/kheema 500 g','Fresh, lean chicken mince made from premium chicken meat. Finely ground, high in protein, low in fat—perfect for kebabs, cutlets, burgers, curries, and wraps.',replace('Our chicken mince is prepared from carefully selected, fresh chicken meat and finely ground to achieve a smooth, consistent texture. It is naturally lean, rich in high-quality protein, and free from added preservatives, fillers, or artificial colors.\nThis mince cooks quickly and absorbs spices exceptionally well, making it ideal for a wide range of dishes—from juicy kebabs, patties, and meatballs to flavorful curries, stuffed parathas, and wraps. Every batch is hygienically processed and packed to retain freshness, flavor, and nutritional value.\nIf you’re serious about clean eating, muscle-friendly meals, or simply better taste, this chicken mince does the job without compromises.','\n',char(10)),1,189.0,'["product-images/1768307047191-0"]','2026-01-13T06:54:08.959Z',0,200.0,1,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(42,'Chicken Breast Boneless - Mini Pack','Fresh boneless chicken breast mini pack. Lean, tender, and high in protein—perfect for quick meals, salads, grilling, and stir-fries.','Our boneless chicken breast mini pack is made from premium, skinless chicken breast, carefully trimmed and hygienically processed. This cut is lean, low in fat, and rich in protein, making it ideal for healthy cooking. The mini pack size is perfect for small households or single meals, ensuring minimal waste and maximum freshness. Suitable for grilling, pan-frying, boiling, salads, wraps, and meal prep recipes. Free from added preservatives and artificial colors.',1,139.0,'["product-images/1768393778962-0"]','2026-01-14T06:59:39.928Z',0,150.0,1,0,1.0,1,160.0,0.25,1); +INSERT INTO product_info VALUES(43,'Strawberry ','Fresh, juicy strawberries with a natural sweetness and soft bite. Handpicked for vibrant color, rich aroma, and everyday freshness.','Bright red, naturally sweet, and bursting with juice — these strawberries are selected at peak ripeness for their bold flavor and smooth texture. Perfect for desserts, smoothies, or eating straight from the box.',1,135.0,'["product-images/1768638795991-0"]','2026-01-17T03:03:16.953Z',1,160.0,2,0,1.0,0,NULL,0.2,1); +INSERT INTO product_info VALUES(44,'Kinu Oranges (pack of 5)','Fresh, juicy oranges with a natural balance of sweetness and tang. Perfect for snacking or fresh juice.','These oranges are naturally juicy, refreshing, and full of real citrus flavor. Grown and picked at the right time, they have a firm peel, bright color, and a sweet-tangy taste inside. Ideal for everyday eating, fresh juice, or adding a fresh citrus touch to your meals.',4,119.0,'["product-images/1768639090932-0"]','2026-01-17T03:08:11.731Z',0,130.0,2,0,1.0,1,NULL,5.0,1); +INSERT INTO product_info VALUES(45,replace('Tomato\n','\n',char(10)),replace('Indian Tomato\n\nJuicy, tangy & ideal for all Indian curries\n500 g','\n',char(10)),'',1,19.0,'["product-images/1768639292540-0"]','2026-01-17T03:11:32.838Z',0,25.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(46,'Pomegranate ','Fresh pomegranate with deep red seeds and a naturally sweet-tangy taste.','This pomegranate is fresh, juicy, and full of vibrant red seeds with a balanced sweet and slightly tangy flavor. Carefully selected for firmness and freshness, it’s perfect for eating on its own, adding to salads, or using in fresh juice. No artificial shine — just real fruit with real taste.',4,109.0,'["product-images/1768639705530-0"]','2026-01-17T03:18:26.329Z',0,130.0,2,0,1.0,1,NULL,3.0,1); +INSERT INTO product_info VALUES(47,'Green Apple (pack 2) ','Crisp green apples with a tangy-sweet taste and firm, juicy texture.','These green apples are fresh, firm, and naturally crisp with a tangy-sweet flavor. Handpicked for quality and freshness, they’re perfect for snacking, making salads, or juicing. A refreshing fruit that adds a burst of natural flavor to any meal or snack.',4,119.0,'["product-images/1768642455479-0"]','2026-01-17T04:04:16.269Z',0,130.0,2,0,1.0,1,NULL,2.0,1); +INSERT INTO product_info VALUES(48,'Guava (Jama Kaya)','Fresh guavas with a sweet-tangy flavor and crisp, juicy texture.','These guavas are fresh, firm, and packed with natural sweetness and tang. Carefully selected for ripeness and flavor, they’re perfect for eating raw, adding to salads, or making juice. A nutritious fruit that’s rich in vitamins and refreshing in every bite.',1,55.0,'["product-images/1768642724520-0"]','2026-01-17T04:08:44.824Z',0,68.0,2,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(49,'Pear','Fresh pears with soft, juicy texture and a naturally sweet flavor.','These fresh pears are firm yet tender, naturally juicy, and mildly sweet. Handpicked for quality and ripeness, they’re perfect for eating as-is, adding to fruit salads, or using in desserts. A refreshing fruit that balances sweetness and softness in every bite.',4,119.0,'["product-images/1768643138910-0"]','2026-01-17T04:15:39.802Z',1,159.0,2,0,1.0,1,NULL,4.0,1); +INSERT INTO product_info VALUES(50,'Alu Bukhara (Plum / Prunes)','Fresh plums (Alu Bukhara) with a juicy, sweet‑tart flavor, perfect for snacking or making chutneys and juices.','Alu Bukhara refers to ripe plums with rich, juicy flesh and a natural sweet‑tart taste. These plums are refreshing and flavorful, great for eating fresh or using in chutneys, jams, and traditional dishes. When dried, they’re also known as prunes — a nutritious, fiber‑rich snack with long shelf life. Packed with vitamins and antioxidants, they’re a wholesome addition to your fruit selection. ',4,119.0,'["product-images/1768643354251-0"]','2026-01-17T04:19:14.555Z',0,128.0,2,0,1.0,0,NULL,4.0,1); +INSERT INTO product_info VALUES(51,'Shahtoot (Mulberry)','Fresh mulberries with a naturally sweet flavor and juicy, soft texture.','These fresh mulberries are ripe, juicy, and naturally sweet with a delicate texture. Perfect for snacking, smoothies, desserts, or topping cereals and salads. Carefully selected for freshness and flavor, mulberries are also packed with vitamins and antioxidants, making them a healthy and delicious choice.',1,169.0,'["product-images/1768646295695-0"]','2026-01-17T05:08:16.491Z',1,180.0,2,0,1.0,0,NULL,0.25,1); +INSERT INTO product_info VALUES(52,'Sugarcane','Fresh sugarcane stalks with natural sweetness, juicy and perfect for chewing or juice extraction.','These sugarcane stalks are fresh, juicy, and naturally sweet. Perfect for chewing directly or extracting fresh sugarcane juice at home. Carefully selected for quality and ripeness, sugarcane provides a refreshing, natural source of energy and flavor.',4,29.0,'["product-images/1768646744949-0"]','2026-01-17T05:15:45.254Z',1,40.0,2,0,1.0,0,NULL,2.0,1); +INSERT INTO product_info VALUES(53,'Hass Avocado','Creamy Hass avocados with rich, buttery texture and mild, nutty flavor.','Hass avocados are known for their distinct creamy texture and mild, nutty flavor. With thick, bumpy skin that darkens as it ripens, these avocados offer smooth, rich green flesh perfect for salads, smoothies, sandwiches, or spreads like guacamole. Packed with healthy fats, fiber, and essential vitamins, they’re a nutritious addition to any diet. Treat them gently and ripen at room temperature for best taste and texture.',4,239.0,'["product-images/1768646932088-0"]','2026-01-17T05:18:52.342Z',0,250.0,2,0,1.0,0,NULL,2.0,1); +INSERT INTO product_info VALUES(54,'Blueberry','Fresh blueberries with a sweet-tart flavor, juicy texture, and rich purple color.','These fresh blueberries are plump, juicy, and naturally sweet-tart with deep purple color. Perfect for snacking, adding to cereals, desserts, or smoothies. Packed with antioxidants, vitamins, and flavor, blueberries are a nutritious and premium fruit choice. Handle carefully as they’re delicate and perishable.',1,280.0,'["product-images/1768649454994-0"]','2026-01-17T06:00:55.308Z',0,310.0,2,0,1.0,0,NULL,0.15,1); +INSERT INTO product_info VALUES(55,'Muscat Grapes','Fresh seasonal mangoes with juicy flesh and natural sweetness.','These mangoes are fresh, ripe, and full of natural sweetness with juicy, flavorful flesh. Carefully selected for ripeness and quality, they’re perfect for eating fresh, making juices, smoothies, or desserts. A seasonal favorite that brings rich taste and aroma to every bite.',1,69.0,'["product-images/1768650709484-0"]','2026-01-17T06:21:49.844Z',1,80.0,2,0,1.0,0,NULL,0.25,1); +INSERT INTO product_info VALUES(56,'Muskmelon (Kharbuja)','For bigger-sized muskmelon, choose the 1 kg option.','This fresh muskmelon (kharbuja) has a naturally sweet aroma and soft, juicy orange flesh. Carefully selected for ripeness, it’s refreshing, hydrating, and perfect for eating fresh, fruit salads, or summer juices. Best enjoyed chilled for maximum sweetness and flavor.',1,67.0,'["product-images/1768651334320-0"]','2026-01-17T06:32:14.675Z',0,72.0,2,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(57,'Pineapple','Note: This is a medium-size pineapple.','This fresh pineapple is naturally juicy with a sweet and slightly tangy flavor. Selected for ripeness and freshness, it’s perfect for eating fresh, juices, salads, and desserts. Best enjoyed chilled for maximum taste.',4,59.0,'["product-images/1768651774899-0"]','2026-01-17T06:39:35.228Z',1,69.0,2,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(58,'Papaya','Note: This is a medium-size papaya.','This fresh papaya is naturally soft, mildly sweet, and easy to digest. Carefully selected for ripeness, it’s ideal for eating fresh, fruit bowls, smoothies, or breakfast plates. Best consumed ripe for smooth texture and better taste.',4,59.0,'["product-images/1768652061701-0"]','2026-01-17T06:44:22.034Z',0,75.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(59,'Watermelon','Add 1kg if you want watermelon in big size','This fresh watermelon has bright red, juicy flesh with natural sweetness and high water content. Perfect for summer refreshment, fruit salads, juices, or eating chilled. Carefully selected for freshness and firmness.',1,98.0,'["product-images/1768653009851-0"]','2026-01-17T07:00:10.168Z',0,110.0,2,0,1.0,1,NULL,2.5,1); +INSERT INTO product_info VALUES(60,'Green Grapes','Supports immunity, provides natural energy, and is rich in antioxidants.','These fresh green grapes are handpicked for firm texture and sweet, juicy flavor. Perfect for snacking, fruit salads, juices, or desserts, they’re packed with vitamins and antioxidants. Carefully stored to maintain freshness from farm to table.',1,78.0,'["product-images/1768653997561-0"]','2026-01-17T07:16:37.967Z',0,90.0,2,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(61,'Red Globe Grapes','High in antioxidants, supports immunity, and provides natural energy. Seeded','These Red Globe grapes are large, plump, and naturally sweet with firm, juicy flesh. Carefully selected for size and freshness, they’re perfect for snacking, fruit salads, desserts, or making fresh juice. Packed with vitamins and antioxidants, Red Globe grapes are a healthy and premium choice for everyday consumption.',1,99.0,'["product-images/1768654475850-0"]','2026-01-17T07:24:36.247Z',0,119.0,2,0,1.0,1,NULL,0.25,1); +INSERT INTO product_info VALUES(62,'Black Grapes','Supports immunity, rich in antioxidants, and provides natural energy.','These black grapes are handpicked for firm texture, juiciness, and natural sweetness. Perfect for snacking, fruit salads, desserts, or making fresh juice. Rich in vitamins and antioxidants, they’re a healthy and refreshing fruit for everyday consumption.',1,78.0,'["product-images/1768654740988-0"]','2026-01-17T07:29:01.488Z',0,91.0,2,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(63,'Pink Dragon Fruit','Boosts immunity, rich in antioxidants, supports digestion, and provides natural energy.','This pink dragon fruit is fresh, juicy, and mildly sweet with soft flesh and tiny edible seeds. Carefully selected for ripeness and quality, it’s perfect for eating fresh, adding to fruit bowls, smoothies, or desserts. Exotic in appearance, nutritious, and rich in antioxidants.',4,269.0,'["product-images/1768658094891-0"]','2026-01-17T08:24:55.423Z',1,289.0,2,0,1.0,1,NULL,2.0,1); +INSERT INTO product_info VALUES(64,'Broccoli',replace('Note: This is a medium-size broccoli.\nRich in fiber and vitamins, supports digestion and overall nutrition.','\n',char(10)),'This fresh broccoli is crisp, green, and carefully selected for firmness and freshness. Ideal for stir-fries, salads, soups, or steaming. Mild in taste and versatile in cooking, it’s best used fresh for good texture and flavor.',1,59.0,'["product-images/1768709567040-0"]','2026-01-17T22:42:48.248Z',1,69.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(65,'Beetroot','Supports blood health, rich in fiber, and helps maintain energy levels.','This fresh beetroot is firm, clean, and naturally rich in color. Carefully selected for freshness, it’s ideal for cooking, salads, juices, and curries. Mildly sweet when cooked and earthy in flavor, beetroot is a versatile vegetable used in everyday meals.',1,28.0,'["product-images/1768710434326-0"]','2026-01-17T22:57:14.620Z',0,35.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(66,'Cabbage(Patta Gobhi)',replace('Note: This is a medium-size cabbage.\nRich in fiber, supports digestion, and low in calories.','\n',char(10)),'This fresh green cabbage is medium-sized, firm, and tightly packed with pale green leaves. It has a mild flavor and crunchy texture, making it ideal for curries, stir-fries, salads, soups, and fried snacks. Carefully selected for freshness and cleanliness, this cabbage is suitable for everyday cooking.',4,27.0,'["product-images/1768710760133-0"]','2026-01-17T23:02:40.448Z',0,35.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(67,'Cauliflower(Phool Gobhi)',replace('Note: This is a medium-size cauliflower.\nHigh in fiber and vitamin C, supports digestion and immunity.','\n',char(10)),'This fresh medium-sized cauliflower has compact, creamy-white florets and crisp green leaves. Carefully selected for firmness and freshness, it is ideal for curries, stir-fries, fried snacks, soups, and biryani-style dishes. Clean and naturally grown, suitable for daily home cooking.',4,28.0,'["product-images/1768711261174-0"]','2026-01-17T23:11:02.227Z',0,32.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(68,'Sweet Potato','High in fiber, supports digestion, and provides natural energy.','These medium-sized red sweet potatoes have smooth skin and pale, creamy flesh with a mildly sweet taste. Ideal for boiling, roasting, frying, and traditional Indian dishes, they cook evenly and remain soft inside. Carefully selected for freshness and quality, suitable for daily home cooking.',1,32.0,'["product-images/1768711919135-0"]','2026-01-17T23:21:59.416Z',0,34.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(69,'Carrot','Rich in vitamin A, supports eye health and immunity.','These fresh medium-sized carrots are firm, smooth-skinned, and bright in color. They have a crisp texture and mildly sweet taste, making them perfect for salads, curries, stir-fries, juices, and snacks. Carefully selected for freshness and quality, suitable for everyday cooking.',1,29.0,'["product-images/1768712093829-0"]','2026-01-17T23:24:54.154Z',0,35.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(70,'White Radish(Mooli)','Aids digestion, rich in fibre, supports gut health.','Fresh white radish (mullangi) is crisp, juicy, and naturally pungent with a refreshing bite. Ideal for sambar, curries, stir-fries, salads, and chutneys. Carefully sourced to ensure firmness, clean skin, and freshness for daily home cooking.',4,19.0,'["product-images/1768712490280-0"]','2026-01-17T23:31:30.647Z',0,25.0,4,0,1.0,0,NULL,2.0,1); +INSERT INTO product_info VALUES(71,replace('Curry Leaves(Karivepak)\n','\n',char(10)),replace('1 bunch\nAdds aroma, supports digestion, and enhances flavour in cooking.','\n',char(10)),'These fresh curry leaves are aromatic, clean, and deep green in colour. Carefully selected to enhance flavour, they are essential for tempering and everyday South Indian cooking. Best used fresh for maximum aroma and taste.',4,15.0,'["product-images/1768713206145-0"]','2026-01-17T23:43:26.487Z',0,22.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(72,'Spinach (Palak)','Rich in iron, supports blood health, and boosts immunity.','Fresh spinach (palak) leaves are medium-sized, crisp, and bright green. Carefully selected for freshness, they are ideal for curries, soups, smoothies, salads, and dals. Best consumed fresh to retain nutrients, flavor, and texture.',4,14.0,'["product-images/1768713537512-0"]','2026-01-17T23:48:57.829Z',0,19.0,4,0,1.0,1,NULL,7.0,1); +INSERT INTO product_info VALUES(73,'Coconut','Rich in natural electrolytes, supports hydration, and provides energy.','This fresh medium-sized coconut is carefully selected for quality and freshness. Ideal for drinking tender coconut water, making coconut milk, chutneys, desserts, or cooking. Naturally nutritious and rich in flavor, it’s perfect for daily home use.',4,59.0,'["product-images/1768718685357-0"]','2026-01-17T23:51:54.586Z',0,79.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(74,'Fenugreek Leaves(Methi)','Rich in vitamins, supports digestion, and enhances flavor in cooking.','These fresh fenugreek leaves (methi) are medium-sized, aromatic, and vibrant green. Carefully selected for freshness, they are ideal for curries, parathas, dals, and seasoning. Best used fresh to retain aroma, flavor, and nutritional value.',4,18.0,'["product-images/1768713886512-0"]','2026-01-17T23:54:47.138Z',0,25.0,4,0,1.0,0,NULL,10.0,1); +INSERT INTO product_info VALUES(75,'Murrel / Korameenu / కోరమీను - Live','Fresh murrel fish, high in protein, known for aiding recovery and boosting strength.',' Fresh freshwater murrel fish (snakehead) known for its firm flesh and rich taste. Highly valued in Indian households for its nutritional benefits, especially during recovery and post-illness diets. Rich in protein and essential nutrients. Ideal for curries and traditional preparations. Cleaned and packed hygienically to retain freshness.',1,489.0,'["product-images/1768817786453-0","product-images/1768817786455-1"]','2026-01-18T00:08:16.173Z',0,580.0,1,0,1.0,1,600.0,1.0,1); +INSERT INTO product_info VALUES(76,'Coriander Leaves (Kothimeer)','Fresh coriander leaves with a strong aroma, perfect for garnishing and cooking.','Freshly harvested coriander leaves with tender stems and vibrant green color. Widely used in Indian cooking for garnishing curries, chutneys, salads, and rice dishes. Adds a refreshing flavor and aroma to everyday meals. Wash thoroughly before use.',4,19.0,'["product-images/1768727264220-0"]','2026-01-18T03:37:45.047Z',0,25.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(77,'Gongura (Sorrel Leaves)','Fresh gongura leaves with a natural tangy taste, perfect for traditional Andhra dishes and chutneys.','Gongura, also known as sorrel leaves, is a popular leafy vegetable widely used in Andhra and Telangana cuisine. Known for its unique sour and refreshing flavour, gongura adds a distinctive taste to dals, curries, chutneys, and pickles. The leaves are tender and aromatic, making them ideal for both cooking and grinding. Naturally rich in iron, antioxidants, and essential vitamins, gongura supports digestion and overall health. Freshly sourced and carefully cleaned to retain its natural taste and quality. Wash thoroughly before use and cook fresh for the best flavour.',4,16.0,'["product-images/1769396724595-0"]','2026-01-18T08:56:30.867Z',0,19.0,4,0,1.0,0,NULL,6.0,1); +INSERT INTO product_info VALUES(78,'Green Chillies','Fresh green chillies rich in vitamin C, add heat and flavor to everyday cooking.',' Fresh green chillies with bright green color and firm texture. Commonly used in Indian cooking to add spice and aroma to curries, stir-fries, chutneys, and snacks. Naturally rich in vitamin C and antioxidants. Wash thoroughly before use. Packed fresh for daily kitchen needs.',1,29.0,'["product-images/1769241234003-0"]','2026-01-18T09:03:36.108Z',0,32.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(79,'Red Carrot ','Big-sized red carrots with natural sweetness, ideal for salads, juices, and cooking.','Fresh big-sized red carrots with deep red color and firm texture. Naturally sweet and juicy, these carrots are rich in beta-carotene, fiber, and antioxidants. Perfect for raw salads, juices, halwa, soups, and everyday cooking. Carefully selected for size and freshness, cleaned and packed hygienically.',1,39.0,'["product-images/1768822893380-0"]','2026-01-19T06:11:34.210Z',0,47.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(80,'Country Chicken (Desi / Natu Kodi)','Fresh country chicken, high in protein and rich in natural flavor, ideal for traditional slow-cooked dishes.','Freshly sourced country chicken known for its firm texture and strong taste. Preferred for traditional curries, soups, and slow-cooked recipes. Naturally high in protein and considered more nutritious than broiler chicken. Cleaned and cut hygienically for safe cooking.',1,849.0,'["product-images/1769063336125-0"]','2026-01-22T00:58:57.053Z',0,920.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(81,'Tigers prawns large ','Premium tiger prawns rich in protein and omega-3, ideal for grilling, frying, and special dishes.','Fresh premium tiger prawns known for their large size, firm texture, and rich taste. Perfect for grilling, frying, curries, and restaurant-style recipes. High in protein and omega-3 fatty acids, supporting muscle and heart health. Available cleaned or uncleaned and packed hygienically to maintain freshness.',1,669.0,'["product-images/1769063467386-0"]','2026-01-22T01:01:08.364Z',0,700.0,1,0,1.0,0,NULL,0.65,1); +INSERT INTO product_info VALUES(82,'Fresh Prawns – Medium (Cleaned & Deveined)','High in protein and omega-3, supports muscle growth and heart health.','Fresh prawns with firm texture and natural sweetness. Ideal for curries, fry, grills, and Asian-style dishes. Rich in protein and omega-3 fatty acids, supporting muscle and heart health. Available cleaned or uncleaned and packed hygienically to maintain freshness.',1,389.0,'["product-images/1769063660493-0"]','2026-01-22T01:04:21.712Z',0,419.0,1,0,1.0,0,NULL,0.65,1); +INSERT INTO product_info VALUES(83,'Rohu- రోహు live ','Fresh rohu fish rich in protein and omega-3, ideal for everyday curries and home cooking.','Freshwater rohu fish with soft texture and mild flavor, widely used in Indian households for daily meals. Suitable for curry preparations and light frying. Naturally rich in protein and omega-3 fatty acids, supporting muscle health and balanced nutrition. Cleaned and cut hygienically to ensure freshness and quality.',1,159.0,'["product-images/1769149204037-0"]','2026-01-23T00:50:05.311Z',0,180.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(84,'Mutton Brain (Bheja). మటన్ బ్రెయిన్ (భేజా)','Fresh mutton brain, rich in healthy fats and protein, ideal for traditional bheja fry and curries.','Freshly sourced mutton brain (bheja) from healthy goats. Known for its soft texture and rich taste, it is commonly used in traditional dishes like bheja fry and masala. Rich in healthy fats and nutrients. Cleaned carefully and packed hygienically to maintain freshness.',4,119.0,'["product-images/1769149707440-0"]','2026-01-23T00:56:40.140Z',0,130.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(85,'Mutton Paya (Goat Trotters)','Fresh mutton paya rich in collagen and minerals, ideal for nourishing paya soup.','Freshly cleaned mutton paya (goat trotters) commonly used to prepare traditional paya soup. When slow-cooked, paya releases natural collagen and minerals, making the soup rich, flavorful, and nourishing. Popular for strength recovery and home-style remedies. Cleaned thoroughly and packed hygienically for freshness.',4,259.0,'["product-images/1769150471654-0","product-images/1769150471655-1"]','2026-01-23T01:11:12.693Z',0,270.0,1,0,1.0,0,NULL,4.0,1); +INSERT INTO product_info VALUES(86,'Mutton Chops - మటన్ చాప్స్','Fresh mutton chops, rich in protein and iron, ideal for curries and slow cooking.','Fresh mutton chops cut from tender sections with bone, known for rich flavor and juiciness. Perfect for slow-cooked curries, gravies, and traditional dishes where bone enhances taste. High in protein and iron, supporting strength and energy. Cleaned and cut hygienically for freshness.',1,419.0,'["product-images/1769151216776-0"]','2026-01-23T01:23:37.665Z',1,440.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(87,'Mutton Soup Bones -మటన్ సూప్ ఎముకలు','Fresh mutton soup bones rich in collagen and minerals, ideal for nourishing soups and broths.',' Fresh mutton soup bones cut from healthy goat meat, perfect for preparing rich and flavorful soups and bone broths. Slowly cooked bones release natural collagen, minerals, and nutrients, making them ideal for strength recovery and traditional home remedies. Cleaned hygienically and packed fresh for daily cooking.',1,149.0,'["product-images/1769151844424-0"]','2026-01-23T01:34:05.440Z',0,179.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(88,'Purple Cabbage (Red Cabbage)',replace('Medium-sized purple cabbage\nFresh purple cabbage rich in antioxidants and fiber, supports digestion and immunity.','\n',char(10)),'Fresh purple (red) cabbage with crisp texture and vibrant color. Commonly used in salads, stir-fries, slaws, and garnishing. Naturally rich in antioxidants, fiber, and vitamin C, helping support digestion and overall health. Wash thoroughly before use. Packed fresh for daily cooking.',4,99.0,'["product-images/1769394457296-0"]','2026-01-25T20:57:37.763Z',0,110.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(89,'Light Purple Brinjal','Fresh light purple brinjal rich in fiber and antioxidants, ideal for curries and fries.','Fresh light purple brinjal with smooth skin and tender flesh, handpicked for everyday cooking. This variety cooks quickly and absorbs spices well, making it perfect for curries, fries, bharta, and stir-fried dishes. Mild in taste and easy to digest, it is a regular choice in Indian kitchens. Rich in fiber and antioxidants, it supports digestion and overall health. Wash thoroughly before use. Best used fresh for maximum taste and texture.',1,29.0,'["product-images/1769395184980-0"]','2026-01-25T21:09:46.227Z',0,40.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(90,'Indian Yellow Cucumber (Madras / Dosakai)','Fresh Indian yellow cucumber, also known as Madras cucumber, mild and crisp, perfect for salads, pickles, and cooking.','Indian yellow cucumber, also called Madras cucumber, is a rare and vibrant variety with tender yellow skin and crisp, juicy flesh. Favored in Indian kitchens, it is perfect for fresh salads, traditional pickles, or lightly cooked curries. Naturally rich in fiber, vitamins, and antioxidants, it promotes digestion and overall wellness. Carefully harvested and packed to retain freshness, this cucumber delivers mild sweetness and a refreshing crunch to everyday meals. Wash thoroughly before use and consume fresh for maximum taste.',1,27.0,'["product-images/1769398103853-0"]','2026-01-25T21:58:24.668Z',0,29.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(91,'Green Peas','Fresh green peas with natural sweetness, ideal for curries, pulao, and snacks.','Fresh green peas, carefully harvested for their sweetness, tenderness, and bright green color. Perfect for adding to Indian curries, pulao, stir-fries, soups, and snacks. Rich in protein, fiber, vitamins, and minerals, green peas support digestion and overall health. Available fresh or shelled for convenience, these peas are packed to retain their crisp texture and natural flavor. Wash thoroughly before use and cook fresh for the best taste.',1,39.0,'["product-images/1769398710713-0"]','2026-01-25T22:08:31.554Z',0,44.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(92,'French Beans (Chikkudukaya)','Fresh Benis with crisp texture, ideal for stir-fries, curries, and salads.','Fresh Benis, also known as French beans or cluster beans, are tender and crisp vegetables widely used in Indian cooking. Perfect for stir-fries, curries, and salads, these beans cook quickly and absorb spices well. Naturally rich in fiber, vitamins, and minerals, Benis supports digestion and overall wellness. Carefully handpicked and packed to retain freshness, these beans bring color, crunch, and nutrition to your daily meals. Wash thoroughly before cooking.',1,29.0,'["product-images/1769399617573-0"]','2026-01-25T22:23:38.391Z',0,32.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(93,'Red & Yellow Capsicum (Bell Peppers)','Fresh red and yellow capsicum with crisp texture and mild sweetness, perfect for cooking and salads.','Red and yellow capsicum, also known as bell peppers, are vibrant, crunchy vegetables with a naturally mild and slightly sweet flavour. Commonly used in stir-fries, curries, salads, and continental dishes, these capsicums add colour and nutrition to meals. Rich in vitamin C, antioxidants, and dietary fiber, they help support immunity and overall health. Carefully selected and packed to maintain freshness, firmness, and bright colour. Wash thoroughly and cut as required before use.',1,89.0,'["product-images/1769571126092-0"]','2026-01-27T22:02:07.050Z',0,96.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(94,'Gawar Beans (Cluster Beans)','Fresh tender gawar beans, ideal for stir-fries, curries, and traditional dishes.','Gawar beans, also known as cluster beans, are a traditional vegetable widely used in Indian cooking. These tender green pods have a slightly earthy flavour and firm texture, making them perfect for stir-fries, dry sabzis, curries, and dals. Rich in dietary fiber, vitamins, and minerals, gawar beans support digestion and help maintain blood sugar balance. Carefully sourced and packed to retain freshness, tenderness, and natural colour. Wash thoroughly, trim ends, and cook well before consumption.',1,29.0,'["product-images/1769571810861-0"]','2026-01-27T22:13:31.656Z',0,35.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(95,'Dondakaya (Ivy Gourd)','Fresh tender ivy gourd, ideal for fries, stir-fries, and curries.',replace('Long Description (human-written, not robotic)\nIvy gourd, commonly known as tindora or dondakaya, is a popular vegetable used in daily Indian cooking. These small green gourds have a mild taste and firm texture that works perfectly for shallow frying, stir-fries, and traditional curries. Tender ivy gourd cooks quickly and absorbs spices well without turning mushy. It is naturally low in calories and rich in fiber, making it suitable for light and healthy meals. Carefully selected to ensure freshness, uniform size, and good cooking quality.','\n',char(10)),1,39.0,'["product-images/1769571978680-0"]','2026-01-27T22:16:18.992Z',0,50.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(96,'Pineapple – Large','Large-sized fresh pineapple with juicy, sweet-tangy flesh.','This large pineapple is carefully selected for size and ripeness, offering juicy golden flesh with a naturally sweet and mildly tangy taste. Perfect for fresh juices, fruit salads, desserts, and cooking, it delivers more pulp and better value. Ideal for families or recipes that need a generous quantity of fresh pineapple.',4,109.0,'["product-images/1769576743718-0"]','2026-01-27T23:35:44.520Z',0,120.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(97,'Pudina (Mint Leaves)','Fresh aromatic mint leaves, ideal for chutneys, curries, and drinks.','Pudina, also known as mint leaves, is a fragrant herb widely used in Indian cooking. Its refreshing aroma and cooling taste make it perfect for chutneys, raitas, biryani, curries, and beverages like mint water and mojito. Carefully selected for freshness, these tender green leaves add both flavor and aroma to everyday dishes and are best used fresh.',4,19.0,'["product-images/1769577010969-0"]','2026-01-27T23:40:11.263Z',0,25.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(98,'Mutton Curry Cut (Regular)– 500 g','Fresh mutton curry cut with bone, suitable for everyday curries.','Mutton curry cut (regular) includes a balanced mix of bone and meat, making it ideal for everyday home-style curries and gravies. Cut from fresh goat meat, these pieces cook well in slow and pressure-cooked dishes, releasing rich flavour into the gravy. Cleaned and cut hygienically, this pack is suitable for regular family meals.',1,419.0,'["product-images/1770051810386-0"]','2026-02-02T11:33:31.411Z',1,459.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(99,'Mutton Curry Cut (Regular) – 750 g','Fresh mutton curry cut with bone, ideal for family-sized curries.','Mutton curry cut (regular) – 750 g includes a well-balanced mix of bone and meat, perfect for preparing rich and flavorful curries. Cut from fresh goat meat, these pieces are suitable for slow cooking and pressure cooking, allowing the meat to turn tender while enhancing the taste of the gravy. Cleaned and cut hygienically, this pack is ideal for medium to large family meals.',1,635.0,'["product-images/1770051959669-0"]','2026-02-02T11:36:00.205Z',1,660.0,1,0,1.0,0,NULL,0.75,1); +INSERT INTO product_info VALUES(100,'Irani Apple. Pack of (4)','Fresh Irani apples with crisp texture and mildly sweet taste.','Irani apples, also known as Iranian apples, are known for their firm texture, long shelf life, and mildly sweet flavor. These apples are crisp and juicy, making them suitable for fresh consumption, fruit salads, and juicing. Carefully selected for quality and freshness, Irani apples are a popular everyday fruit choice due to their balanced taste and good keeping quality. Wash thoroughly before consumption.',4,99.0,'["product-images/1770212631435-0"]','2026-02-04T08:13:52.295Z',0,119.0,2,0,1.0,1,NULL,4.0,1); +INSERT INTO product_info VALUES(101,'Coriander Leaves (Kothimeer) small 1 ','','',4,12.0,'["product-images/1771249922306-0"]','2026-02-16T08:22:03.573Z',0,15.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(102,' Basa Fish Fillets','','',1,499.0,'["product-images/1771411526889-0"]','2026-02-18T05:15:27.907Z',0,550.0,1,0,1.0,0,NULL,0.8,1); +INSERT INTO product_info VALUES(103,'Ridge Gourd (Turai) ..(Beerkaya)','','',1,29.0,'["product-images/1771647812442-0"]','2026-02-20T22:53:33.321Z',0,35.0,4,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(136,'Demo product','Demo product demo','Demo Product and just for fun description',1,222.0,'[]','2026-03-21T10:37:26.835Z',0,233.0,8,0,1.0,1,233.0,1.0,1); +INSERT INTO product_info VALUES(137,'Demo3','Demo3','Demo3',1,233.0,'["product-images/1774110996916.jpg","product-images/1774111917349.jpg","product-images/1774111977156.jpg"]','2026-03-21T10:39:54.216Z',0,233.0,1,0,1.0,1,233.0,1.0,1); +INSERT INTO product_info VALUES(138,'Demo4','Demo4','Demo4',1,233.0,'["product-images/1774109641982.jpg","product-images/1774109642211.jpg"]','2026-03-21T10:44:05.635Z',0,233.0,8,0,1.0,1,233.0,1.0,1); +INSERT INTO product_info VALUES(139,'Demo5','Demo5','Demo5 ',1,233.0,'["product-images/1774109875092.jpg","product-images/1774109875283.jpg"]','2026-03-21T10:47:58.585Z',0,235.0,1,0,1.0,1,235.0,1.0,1); +INSERT INTO product_info VALUES(140,'Demo Productsz','Demooo','Demoooo',1,250.0,'["product-images/1774524524649.jpg","product-images/1774524524845.jpg","product-images/1774524525034.jpg","product-images/1774525511146.jpg"]','2026-03-26T05:58:47.322Z',0,285.0,1,0,1.0,1,300.0,1.0,1); +CREATE TABLE IF NOT EXISTS "product_reviews" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "product_id" INTEGER NOT NULL, "review_body" TEXT NOT NULL, "image_urls" TEXT, "review_time" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "ratings" REAL NOT NULL, "admin_response" TEXT, "admin_response_images" TEXT); +INSERT INTO product_reviews VALUES(1,1,9,'Nice','["review-images/1765087473110.jpg","review-images/1765087473110.jpg"]','2025-12-07T00:35:23.088Z',4.0,'Thank Youu','["review-images/1765108852104.jpg"]'); +INSERT INTO product_reviews VALUES(2,1,9,'Nice','["review-images/1765093365201.jpg"]','2025-12-07T02:12:47.173Z',4.0,'','["review-images/1765106307190.jpg"]'); +INSERT INTO product_reviews VALUES(3,1,14,'Not Good','["review-images/1765096663203.jpg","review-images/1765096663403.jpg","review-images/1765096663575.png"]','2025-12-07T03:07:47.450Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(4,1,14,'Another test review this is.','["review-images/1765097892914.jpg","review-images/1765097893129.png"]','2025-12-07T03:28:13.977Z',3.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(5,1,14,'test again','["review-images/1765098183876.jpg"]','2025-12-07T03:33:04.648Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(6,1,14,'review 4','["review-images/1765098361309.jpg"]','2025-12-07T03:36:02.126Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(7,1,14,'another review','["review-images/1765098480284.jpg"]','2025-12-07T03:38:01.100Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(8,1,14,'5 star review','["review-images/1765098638162.jpg"]','2025-12-07T03:40:40.683Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(9,1,14,'another testing round','["review-images/1765098885608.jpg","review-images/1765098885808.png"]','2025-12-07T03:44:49.071Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(10,1,14,'testing again','["review-images/1765098955365.jpg"]','2025-12-07T03:45:56.837Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(11,1,14,'test review','["review-images/1765099082661.jpg"]','2025-12-07T03:48:04.218Z',3.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(12,1,14,'testing continues','["review-images/1765099476101.jpg","review-images/1765099476297.png"]','2025-12-07T03:54:39.689Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(13,1,14,'It should work now','["review-images/1765101095057.jpg","review-images/1765101095257.png"]','2025-12-07T04:21:44.960Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(14,1,14,'It should work now','["review-images/1765101103591.jpg","review-images/1765101103758.png"]','2025-12-07T04:21:46.666Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(15,1,1,'Very nutritious','["review-images/1765101241219.jpg"]','2025-12-07T04:24:02.615Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(16,1,1,'Item was fresh and juicy','["review-images/1765119932782.jpg","review-images/1765119932802.jpg"]','2025-12-07T09:35:37.267Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(17,1,1,'Item was fresh and juicy','["review-images/1765119935171.jpg","review-images/1765119935174.jpg"]','2025-12-07T09:35:40.420Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(18,17,5,'R','[]','2025-12-19T09:47:47.194Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(19,17,5,'G','["review-images/1766157495262.jpg"]','2025-12-19T09:48:17.365Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(20,17,5,'G','["review-images/1766157496653.jpg"]','2025-12-19T09:48:18.989Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(21,17,5,'R','[]','2025-12-19T09:48:42.279Z',3.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(22,17,23,'Ff','[]','2025-12-19T10:02:56.865Z',1.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(23,17,17,'Aa','[]','2025-12-19T10:48:05.094Z',1.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(24,17,16,'Dd','[]','2025-12-20T05:52:01.527Z',2.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(25,1,6,'Nice Item','["review-images/1766423329579.jpg"]','2025-12-22T11:38:51.838Z',3.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(26,17,22,'Bb','[]','2025-12-23T11:55:36.314Z',3.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(27,15,6,replace('Excellent \n👍👍','\n',char(10)),'["review-images/1766572700543.jpg"]','2025-12-24T05:08:21.515Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(28,15,6,replace('Excellent \n👍👍','\n',char(10)),'["review-images/1766572700880.jpg"]','2025-12-24T05:08:22.057Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(29,15,6,replace('Excellent \n👍👍','\n',char(10)),'["review-images/1766572701138.jpg"]','2025-12-24T05:08:22.587Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(30,15,6,replace('Excellent \n👍👍','\n',char(10)),'["review-images/1766572701266.jpg"]','2025-12-24T05:08:23.203Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(31,15,6,replace('Excellent \n👍👍','\n',char(10)),'["review-images/1766572701490.jpg"]','2025-12-24T05:08:25.076Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(32,2,6,replace('Good \n','\n',char(10)),'[]','2026-01-01T06:04:48.298Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(33,2,3,'That''s a great cut of meat and a good quantity','[]','2026-01-03T05:21:46.903Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(34,2,3,'That''s a great cut of meat and a good quantity','[]','2026-01-03T05:21:47.197Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(35,22,24,'Test review ','["review-images/1768792441275.jpg"]','2026-01-18T21:44:02.726Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(36,22,24,'Test review ','["review-images/1768792441748.jpg"]','2026-01-18T21:44:03.075Z',5.0,NULL,'[]'); +CREATE TABLE IF NOT EXISTS "product_slots" ("product_id" INTEGER NOT NULL, "slot_id" INTEGER NOT NULL); +INSERT INTO product_slots VALUES(1,1); +INSERT INTO product_slots VALUES(1,2); +INSERT INTO product_slots VALUES(1,3); +INSERT INTO product_slots VALUES(1,4); +INSERT INTO product_slots VALUES(1,5); +INSERT INTO product_slots VALUES(1,6); +INSERT INTO product_slots VALUES(1,7); +INSERT INTO product_slots VALUES(1,9); +INSERT INTO product_slots VALUES(1,12); +INSERT INTO product_slots VALUES(1,18); +INSERT INTO product_slots VALUES(1,19); +INSERT INTO product_slots VALUES(1,20); +INSERT INTO product_slots VALUES(1,21); +INSERT INTO product_slots VALUES(1,22); +INSERT INTO product_slots VALUES(1,23); +INSERT INTO product_slots VALUES(1,31); +INSERT INTO product_slots VALUES(1,33); +INSERT INTO product_slots VALUES(1,35); +INSERT INTO product_slots VALUES(1,37); +INSERT INTO product_slots VALUES(1,38); +INSERT INTO product_slots VALUES(1,39); +INSERT INTO product_slots VALUES(1,40); +INSERT INTO product_slots VALUES(1,59); +INSERT INTO product_slots VALUES(1,63); +INSERT INTO product_slots VALUES(1,64); +INSERT INTO product_slots VALUES(1,65); +INSERT INTO product_slots VALUES(1,66); +INSERT INTO product_slots VALUES(1,67); +INSERT INTO product_slots VALUES(1,72); +INSERT INTO product_slots VALUES(1,73); +INSERT INTO product_slots VALUES(1,74); +INSERT INTO product_slots VALUES(1,279); +INSERT INTO product_slots VALUES(2,1); +INSERT INTO product_slots VALUES(2,2); +INSERT INTO product_slots VALUES(2,3); +INSERT INTO product_slots VALUES(2,4); +INSERT INTO product_slots VALUES(2,5); +INSERT INTO product_slots VALUES(2,6); +INSERT INTO product_slots VALUES(2,7); +INSERT INTO product_slots VALUES(2,18); +INSERT INTO product_slots VALUES(2,19); +INSERT INTO product_slots VALUES(2,20); +INSERT INTO product_slots VALUES(2,21); +INSERT INTO product_slots VALUES(2,22); +INSERT INTO product_slots VALUES(2,23); +INSERT INTO product_slots VALUES(2,31); +INSERT INTO product_slots VALUES(2,33); +INSERT INTO product_slots VALUES(2,35); +INSERT INTO product_slots VALUES(2,37); +INSERT INTO product_slots VALUES(2,38); +INSERT INTO product_slots VALUES(2,39); +INSERT INTO product_slots VALUES(2,40); +INSERT INTO product_slots VALUES(2,41); +INSERT INTO product_slots VALUES(2,43); +INSERT INTO product_slots VALUES(2,45); +INSERT INTO product_slots VALUES(2,46); +INSERT INTO product_slots VALUES(2,47); +INSERT INTO product_slots VALUES(2,48); +INSERT INTO product_slots VALUES(2,49); +INSERT INTO product_slots VALUES(2,50); +INSERT INTO product_slots VALUES(2,51); +INSERT INTO product_slots VALUES(2,52); +INSERT INTO product_slots VALUES(2,53); +INSERT INTO product_slots VALUES(2,54); +INSERT INTO product_slots VALUES(2,55); +INSERT INTO product_slots VALUES(2,56); +INSERT INTO product_slots VALUES(2,57); +INSERT INTO product_slots VALUES(2,58); +INSERT INTO product_slots VALUES(2,59); +INSERT INTO product_slots VALUES(2,60); +INSERT INTO product_slots VALUES(2,61); +INSERT INTO product_slots VALUES(2,62); +INSERT INTO product_slots VALUES(2,63); +INSERT INTO product_slots VALUES(2,64); +INSERT INTO product_slots VALUES(2,65); +INSERT INTO product_slots VALUES(2,66); +INSERT INTO product_slots VALUES(2,67); +INSERT INTO product_slots VALUES(2,68); +INSERT INTO product_slots VALUES(2,69); +INSERT INTO product_slots VALUES(2,70); +INSERT INTO product_slots VALUES(2,71); +INSERT INTO product_slots VALUES(2,72); +INSERT INTO product_slots VALUES(2,73); +INSERT INTO product_slots VALUES(2,74); +INSERT INTO product_slots VALUES(2,75); +INSERT INTO product_slots VALUES(2,76); +INSERT INTO product_slots VALUES(2,77); +INSERT INTO product_slots VALUES(2,78); +INSERT INTO product_slots VALUES(2,79); +INSERT INTO product_slots VALUES(2,80); +INSERT INTO product_slots VALUES(2,81); +INSERT INTO product_slots VALUES(2,82); +INSERT INTO product_slots VALUES(2,83); +INSERT INTO product_slots VALUES(2,84); +INSERT INTO product_slots VALUES(2,85); +INSERT INTO product_slots VALUES(2,86); +INSERT INTO product_slots VALUES(2,87); +INSERT INTO product_slots VALUES(2,88); +INSERT INTO product_slots VALUES(2,89); +INSERT INTO product_slots VALUES(2,90); +INSERT INTO product_slots VALUES(2,91); +INSERT INTO product_slots VALUES(2,92); +INSERT INTO product_slots VALUES(2,93); +INSERT INTO product_slots VALUES(2,94); +INSERT INTO product_slots VALUES(2,95); +INSERT INTO product_slots VALUES(2,96); +INSERT INTO product_slots VALUES(2,97); +INSERT INTO product_slots VALUES(2,98); +INSERT INTO product_slots VALUES(2,99); +INSERT INTO product_slots VALUES(2,100); +INSERT INTO product_slots VALUES(2,101); +INSERT INTO product_slots VALUES(2,102); +INSERT INTO product_slots VALUES(2,103); +INSERT INTO product_slots VALUES(2,104); +INSERT INTO product_slots VALUES(2,105); +INSERT INTO product_slots VALUES(2,106); +INSERT INTO product_slots VALUES(2,107); +INSERT INTO product_slots VALUES(2,108); +INSERT INTO product_slots VALUES(2,109); +INSERT INTO product_slots VALUES(2,110); +INSERT INTO product_slots VALUES(2,111); +INSERT INTO product_slots VALUES(2,112); +INSERT INTO product_slots VALUES(2,113); +INSERT INTO product_slots VALUES(2,114); +INSERT INTO product_slots VALUES(2,115); +INSERT INTO product_slots VALUES(2,116); +INSERT INTO product_slots VALUES(2,117); +INSERT INTO product_slots VALUES(2,118); +INSERT INTO product_slots VALUES(2,119); +INSERT INTO product_slots VALUES(2,120); +INSERT INTO product_slots VALUES(2,121); +INSERT INTO product_slots VALUES(2,122); +INSERT INTO product_slots VALUES(2,123); +INSERT INTO product_slots VALUES(2,124); +INSERT INTO product_slots VALUES(2,125); +INSERT INTO product_slots VALUES(2,126); +INSERT INTO product_slots VALUES(2,127); +INSERT INTO product_slots VALUES(2,128); +INSERT INTO product_slots VALUES(2,129); +INSERT INTO product_slots VALUES(2,130); +INSERT INTO product_slots VALUES(2,131); +INSERT INTO product_slots VALUES(2,132); +INSERT INTO product_slots VALUES(2,133); +INSERT INTO product_slots VALUES(2,134); +INSERT INTO product_slots VALUES(2,135); +INSERT INTO product_slots VALUES(2,136); +INSERT INTO product_slots VALUES(2,137); +INSERT INTO product_slots VALUES(2,138); +INSERT INTO product_slots VALUES(2,139); +INSERT INTO product_slots VALUES(2,140); +INSERT INTO product_slots VALUES(2,141); +INSERT INTO product_slots VALUES(2,142); +INSERT INTO product_slots VALUES(2,143); +INSERT INTO product_slots VALUES(2,144); +INSERT INTO product_slots VALUES(2,145); +INSERT INTO product_slots VALUES(2,146); +INSERT INTO product_slots VALUES(2,147); +INSERT INTO product_slots VALUES(2,148); +INSERT INTO product_slots VALUES(2,149); +INSERT INTO product_slots VALUES(2,150); +INSERT INTO product_slots VALUES(2,151); +INSERT INTO product_slots VALUES(2,152); +INSERT INTO product_slots VALUES(2,153); +INSERT INTO product_slots VALUES(2,154); +INSERT INTO product_slots VALUES(2,155); +INSERT INTO product_slots VALUES(2,156); +INSERT INTO product_slots VALUES(2,157); +INSERT INTO product_slots VALUES(2,158); +INSERT INTO product_slots VALUES(2,159); +INSERT INTO product_slots VALUES(2,160); +INSERT INTO product_slots VALUES(2,161); +INSERT INTO product_slots VALUES(2,162); +INSERT INTO product_slots VALUES(2,163); +INSERT INTO product_slots VALUES(2,164); +INSERT INTO product_slots VALUES(2,165); +INSERT INTO product_slots VALUES(2,166); +INSERT INTO product_slots VALUES(2,167); +INSERT INTO product_slots VALUES(2,168); +INSERT INTO product_slots VALUES(2,169); +INSERT INTO product_slots VALUES(2,170); +INSERT INTO product_slots VALUES(2,171); +INSERT INTO product_slots VALUES(2,172); +INSERT INTO product_slots VALUES(2,173); +INSERT INTO product_slots VALUES(2,174); +INSERT INTO product_slots VALUES(2,175); +INSERT INTO product_slots VALUES(2,176); +INSERT INTO product_slots VALUES(2,177); +INSERT INTO product_slots VALUES(2,178); +INSERT INTO product_slots VALUES(2,179); +INSERT INTO product_slots VALUES(2,180); +INSERT INTO product_slots VALUES(2,181); +INSERT INTO product_slots VALUES(2,182); +INSERT INTO product_slots VALUES(2,183); +INSERT INTO product_slots VALUES(2,184); +INSERT INTO product_slots VALUES(2,185); +INSERT INTO product_slots VALUES(2,186); +INSERT INTO product_slots VALUES(2,187); +INSERT INTO product_slots VALUES(2,188); +INSERT INTO product_slots VALUES(2,189); +INSERT INTO product_slots VALUES(2,190); +INSERT INTO product_slots VALUES(2,191); +INSERT INTO product_slots VALUES(2,192); +INSERT INTO product_slots VALUES(2,193); +INSERT INTO product_slots VALUES(2,194); +INSERT INTO product_slots VALUES(2,195); +INSERT INTO product_slots VALUES(2,196); +INSERT INTO product_slots VALUES(2,197); +INSERT INTO product_slots VALUES(2,198); +INSERT INTO product_slots VALUES(2,199); +INSERT INTO product_slots VALUES(2,200); +INSERT INTO product_slots VALUES(2,201); +INSERT INTO product_slots VALUES(2,202); +INSERT INTO product_slots VALUES(2,203); +INSERT INTO product_slots VALUES(2,204); +INSERT INTO product_slots VALUES(2,205); +INSERT INTO product_slots VALUES(2,206); +INSERT INTO product_slots VALUES(2,207); +INSERT INTO product_slots VALUES(2,208); +INSERT INTO product_slots VALUES(2,209); +INSERT INTO product_slots VALUES(2,210); +INSERT INTO product_slots VALUES(2,211); +INSERT INTO product_slots VALUES(2,212); +INSERT INTO product_slots VALUES(2,213); +INSERT INTO product_slots VALUES(2,214); +INSERT INTO product_slots VALUES(2,215); +INSERT INTO product_slots VALUES(2,216); +INSERT INTO product_slots VALUES(2,217); +INSERT INTO product_slots VALUES(2,218); +INSERT INTO product_slots VALUES(2,219); +INSERT INTO product_slots VALUES(2,220); +INSERT INTO product_slots VALUES(2,221); +INSERT INTO product_slots VALUES(2,222); +INSERT INTO product_slots VALUES(2,223); +INSERT INTO product_slots VALUES(2,224); +INSERT INTO product_slots VALUES(2,225); +INSERT INTO product_slots VALUES(2,226); +INSERT INTO product_slots VALUES(2,227); +INSERT INTO product_slots VALUES(2,228); +INSERT INTO product_slots VALUES(2,229); +INSERT INTO product_slots VALUES(2,230); +INSERT INTO product_slots VALUES(2,231); +INSERT INTO product_slots VALUES(2,232); +INSERT INTO product_slots VALUES(2,234); +INSERT INTO product_slots VALUES(2,235); +INSERT INTO product_slots VALUES(2,236); +INSERT INTO product_slots VALUES(2,237); +INSERT INTO product_slots VALUES(2,238); +INSERT INTO product_slots VALUES(2,239); +INSERT INTO product_slots VALUES(2,240); +INSERT INTO product_slots VALUES(2,241); +INSERT INTO product_slots VALUES(2,242); +INSERT INTO product_slots VALUES(2,243); +INSERT INTO product_slots VALUES(2,244); +INSERT INTO product_slots VALUES(2,274); +INSERT INTO product_slots VALUES(2,275); +INSERT INTO product_slots VALUES(2,279); +INSERT INTO product_slots VALUES(2,280); +INSERT INTO product_slots VALUES(2,281); +INSERT INTO product_slots VALUES(2,282); +INSERT INTO product_slots VALUES(3,1); +INSERT INTO product_slots VALUES(3,2); +INSERT INTO product_slots VALUES(3,3); +INSERT INTO product_slots VALUES(3,4); +INSERT INTO product_slots VALUES(3,5); +INSERT INTO product_slots VALUES(3,6); +INSERT INTO product_slots VALUES(3,7); +INSERT INTO product_slots VALUES(3,8); +INSERT INTO product_slots VALUES(3,12); +INSERT INTO product_slots VALUES(3,18); +INSERT INTO product_slots VALUES(3,19); +INSERT INTO product_slots VALUES(3,20); +INSERT INTO product_slots VALUES(3,21); +INSERT INTO product_slots VALUES(3,22); +INSERT INTO product_slots VALUES(3,23); +INSERT INTO product_slots VALUES(3,31); +INSERT INTO product_slots VALUES(3,33); +INSERT INTO product_slots VALUES(3,35); +INSERT INTO product_slots VALUES(3,37); +INSERT INTO product_slots VALUES(3,38); +INSERT INTO product_slots VALUES(3,39); +INSERT INTO product_slots VALUES(3,40); +INSERT INTO product_slots VALUES(3,41); +INSERT INTO product_slots VALUES(3,43); +INSERT INTO product_slots VALUES(3,45); +INSERT INTO product_slots VALUES(3,46); +INSERT INTO product_slots VALUES(3,47); +INSERT INTO product_slots VALUES(3,48); +INSERT INTO product_slots VALUES(3,49); +INSERT INTO product_slots VALUES(3,50); +INSERT INTO product_slots VALUES(3,51); +INSERT INTO product_slots VALUES(3,52); +INSERT INTO product_slots VALUES(3,53); +INSERT INTO product_slots VALUES(3,54); +INSERT INTO product_slots VALUES(3,55); +INSERT INTO product_slots VALUES(3,56); +INSERT INTO product_slots VALUES(3,57); +INSERT INTO product_slots VALUES(3,58); +INSERT INTO product_slots VALUES(3,59); +INSERT INTO product_slots VALUES(3,60); +INSERT INTO product_slots VALUES(3,61); +INSERT INTO product_slots VALUES(3,62); +INSERT INTO product_slots VALUES(3,63); +INSERT INTO product_slots VALUES(3,64); +INSERT INTO product_slots VALUES(3,65); +INSERT INTO product_slots VALUES(3,66); +INSERT INTO product_slots VALUES(3,67); +INSERT INTO product_slots VALUES(3,68); +INSERT INTO product_slots VALUES(3,69); +INSERT INTO product_slots VALUES(3,70); +INSERT INTO product_slots VALUES(3,71); +INSERT INTO product_slots VALUES(3,72); +INSERT INTO product_slots VALUES(3,73); +INSERT INTO product_slots VALUES(3,74); +INSERT INTO product_slots VALUES(3,75); +INSERT INTO product_slots VALUES(3,76); +INSERT INTO product_slots VALUES(3,77); +INSERT INTO product_slots VALUES(3,78); +INSERT INTO product_slots VALUES(3,79); +INSERT INTO product_slots VALUES(3,80); +INSERT INTO product_slots VALUES(3,81); +INSERT INTO product_slots VALUES(3,82); +INSERT INTO product_slots VALUES(3,83); +INSERT INTO product_slots VALUES(3,84); +INSERT INTO product_slots VALUES(3,85); +INSERT INTO product_slots VALUES(3,86); +INSERT INTO product_slots VALUES(3,87); +INSERT INTO product_slots VALUES(3,88); +INSERT INTO product_slots VALUES(3,89); +INSERT INTO product_slots VALUES(3,90); +INSERT INTO product_slots VALUES(3,91); +INSERT INTO product_slots VALUES(3,92); +INSERT INTO product_slots VALUES(3,93); +INSERT INTO product_slots VALUES(3,94); +INSERT INTO product_slots VALUES(3,95); +INSERT INTO product_slots VALUES(3,96); +INSERT INTO product_slots VALUES(3,97); +INSERT INTO product_slots VALUES(3,98); +INSERT INTO product_slots VALUES(3,99); +INSERT INTO product_slots VALUES(3,100); +INSERT INTO product_slots VALUES(3,101); +INSERT INTO product_slots VALUES(3,102); +INSERT INTO product_slots VALUES(3,103); +INSERT INTO product_slots VALUES(3,104); +INSERT INTO product_slots VALUES(3,105); +INSERT INTO product_slots VALUES(3,106); +INSERT INTO product_slots VALUES(3,107); +INSERT INTO product_slots VALUES(3,108); +INSERT INTO product_slots VALUES(3,109); +INSERT INTO product_slots VALUES(3,110); +INSERT INTO product_slots VALUES(3,111); +INSERT INTO product_slots VALUES(3,112); +INSERT INTO product_slots VALUES(3,113); +INSERT INTO product_slots VALUES(3,114); +INSERT INTO product_slots VALUES(3,115); +INSERT INTO product_slots VALUES(3,116); +INSERT INTO product_slots VALUES(3,117); +INSERT INTO product_slots VALUES(3,118); +INSERT INTO product_slots VALUES(3,119); +INSERT INTO product_slots VALUES(3,120); +INSERT INTO product_slots VALUES(3,121); +INSERT INTO product_slots VALUES(3,122); +INSERT INTO product_slots VALUES(3,123); +INSERT INTO product_slots VALUES(3,124); +INSERT INTO product_slots VALUES(3,125); +INSERT INTO product_slots VALUES(3,126); +INSERT INTO product_slots VALUES(3,127); +INSERT INTO product_slots VALUES(3,128); +INSERT INTO product_slots VALUES(3,129); +INSERT INTO product_slots VALUES(3,130); +INSERT INTO product_slots VALUES(3,131); +INSERT INTO product_slots VALUES(3,132); +INSERT INTO product_slots VALUES(3,133); +INSERT INTO product_slots VALUES(3,134); +INSERT INTO product_slots VALUES(3,135); +INSERT INTO product_slots VALUES(3,136); +INSERT INTO product_slots VALUES(3,137); +INSERT INTO product_slots VALUES(3,138); +INSERT INTO product_slots VALUES(3,139); +INSERT INTO product_slots VALUES(3,140); +INSERT INTO product_slots VALUES(3,141); +INSERT INTO product_slots VALUES(3,142); +INSERT INTO product_slots VALUES(3,143); +INSERT INTO product_slots VALUES(3,144); +INSERT INTO product_slots VALUES(3,145); +INSERT INTO product_slots VALUES(3,146); +INSERT INTO product_slots VALUES(3,147); +INSERT INTO product_slots VALUES(3,148); +INSERT INTO product_slots VALUES(3,149); +INSERT INTO product_slots VALUES(3,150); +INSERT INTO product_slots VALUES(3,151); +INSERT INTO product_slots VALUES(3,152); +INSERT INTO product_slots VALUES(3,153); +INSERT INTO product_slots VALUES(3,154); +INSERT INTO product_slots VALUES(3,155); +INSERT INTO product_slots VALUES(3,156); +INSERT INTO product_slots VALUES(3,157); +INSERT INTO product_slots VALUES(3,158); +INSERT INTO product_slots VALUES(3,159); +INSERT INTO product_slots VALUES(3,160); +INSERT INTO product_slots VALUES(3,161); +INSERT INTO product_slots VALUES(3,162); +INSERT INTO product_slots VALUES(3,163); +INSERT INTO product_slots VALUES(3,164); +INSERT INTO product_slots VALUES(3,165); +INSERT INTO product_slots VALUES(3,166); +INSERT INTO product_slots VALUES(3,167); +INSERT INTO product_slots VALUES(3,168); +INSERT INTO product_slots VALUES(3,169); +INSERT INTO product_slots VALUES(3,170); +INSERT INTO product_slots VALUES(3,171); +INSERT INTO product_slots VALUES(3,172); +INSERT INTO product_slots VALUES(3,173); +INSERT INTO product_slots VALUES(3,174); +INSERT INTO product_slots VALUES(3,175); +INSERT INTO product_slots VALUES(3,176); +INSERT INTO product_slots VALUES(3,177); +INSERT INTO product_slots VALUES(3,178); +INSERT INTO product_slots VALUES(3,179); +INSERT INTO product_slots VALUES(3,180); +INSERT INTO product_slots VALUES(3,181); +INSERT INTO product_slots VALUES(3,182); +INSERT INTO product_slots VALUES(3,183); +INSERT INTO product_slots VALUES(3,184); +INSERT INTO product_slots VALUES(3,185); +INSERT INTO product_slots VALUES(3,186); +INSERT INTO product_slots VALUES(3,187); +INSERT INTO product_slots VALUES(3,188); +INSERT INTO product_slots VALUES(3,189); +INSERT INTO product_slots VALUES(3,190); +INSERT INTO product_slots VALUES(3,191); +INSERT INTO product_slots VALUES(3,192); +INSERT INTO product_slots VALUES(3,193); +INSERT INTO product_slots VALUES(3,194); +INSERT INTO product_slots VALUES(3,195); +INSERT INTO product_slots VALUES(3,196); +INSERT INTO product_slots VALUES(3,197); +INSERT INTO product_slots VALUES(3,198); +INSERT INTO product_slots VALUES(3,199); +INSERT INTO product_slots VALUES(3,200); +INSERT INTO product_slots VALUES(3,201); +INSERT INTO product_slots VALUES(3,202); +INSERT INTO product_slots VALUES(3,203); +INSERT INTO product_slots VALUES(3,204); +INSERT INTO product_slots VALUES(3,205); +INSERT INTO product_slots VALUES(3,206); +INSERT INTO product_slots VALUES(3,207); +INSERT INTO product_slots VALUES(3,208); +INSERT INTO product_slots VALUES(3,209); +INSERT INTO product_slots VALUES(3,210); +INSERT INTO product_slots VALUES(3,211); +INSERT INTO product_slots VALUES(3,212); +INSERT INTO product_slots VALUES(3,213); +INSERT INTO product_slots VALUES(3,214); +INSERT INTO product_slots VALUES(3,215); +INSERT INTO product_slots VALUES(3,216); +INSERT INTO product_slots VALUES(3,217); +INSERT INTO product_slots VALUES(3,218); +INSERT INTO product_slots VALUES(3,219); +INSERT INTO product_slots VALUES(3,220); +INSERT INTO product_slots VALUES(3,221); +INSERT INTO product_slots VALUES(3,222); +INSERT INTO product_slots VALUES(3,223); +INSERT INTO product_slots VALUES(3,224); +INSERT INTO product_slots VALUES(3,225); +INSERT INTO product_slots VALUES(3,226); +INSERT INTO product_slots VALUES(3,227); +INSERT INTO product_slots VALUES(3,228); +INSERT INTO product_slots VALUES(3,229); +INSERT INTO product_slots VALUES(3,230); +INSERT INTO product_slots VALUES(3,231); +INSERT INTO product_slots VALUES(3,232); +INSERT INTO product_slots VALUES(3,234); +INSERT INTO product_slots VALUES(3,235); +INSERT INTO product_slots VALUES(3,236); +INSERT INTO product_slots VALUES(3,237); +INSERT INTO product_slots VALUES(3,238); +INSERT INTO product_slots VALUES(3,239); +INSERT INTO product_slots VALUES(3,240); +INSERT INTO product_slots VALUES(3,241); +INSERT INTO product_slots VALUES(3,242); +INSERT INTO product_slots VALUES(3,243); +INSERT INTO product_slots VALUES(3,244); +INSERT INTO product_slots VALUES(3,274); +INSERT INTO product_slots VALUES(3,275); +INSERT INTO product_slots VALUES(3,279); +INSERT INTO product_slots VALUES(3,280); +INSERT INTO product_slots VALUES(3,281); +INSERT INTO product_slots VALUES(3,282); +INSERT INTO product_slots VALUES(4,1); +INSERT INTO product_slots VALUES(4,2); +INSERT INTO product_slots VALUES(4,3); +INSERT INTO product_slots VALUES(4,4); +INSERT INTO product_slots VALUES(4,5); +INSERT INTO product_slots VALUES(4,6); +INSERT INTO product_slots VALUES(4,7); +INSERT INTO product_slots VALUES(4,18); +INSERT INTO product_slots VALUES(4,19); +INSERT INTO product_slots VALUES(4,20); +INSERT INTO product_slots VALUES(4,21); +INSERT INTO product_slots VALUES(4,22); +INSERT INTO product_slots VALUES(4,33); +INSERT INTO product_slots VALUES(4,35); +INSERT INTO product_slots VALUES(4,37); +INSERT INTO product_slots VALUES(4,38); +INSERT INTO product_slots VALUES(4,39); +INSERT INTO product_slots VALUES(4,40); +INSERT INTO product_slots VALUES(4,41); +INSERT INTO product_slots VALUES(4,43); +INSERT INTO product_slots VALUES(4,45); +INSERT INTO product_slots VALUES(4,46); +INSERT INTO product_slots VALUES(4,47); +INSERT INTO product_slots VALUES(4,48); +INSERT INTO product_slots VALUES(4,49); +INSERT INTO product_slots VALUES(4,50); +INSERT INTO product_slots VALUES(4,51); +INSERT INTO product_slots VALUES(4,52); +INSERT INTO product_slots VALUES(4,53); +INSERT INTO product_slots VALUES(4,54); +INSERT INTO product_slots VALUES(4,55); +INSERT INTO product_slots VALUES(4,56); +INSERT INTO product_slots VALUES(4,57); +INSERT INTO product_slots VALUES(4,58); +INSERT INTO product_slots VALUES(4,59); +INSERT INTO product_slots VALUES(4,60); +INSERT INTO product_slots VALUES(4,61); +INSERT INTO product_slots VALUES(4,62); +INSERT INTO product_slots VALUES(4,63); +INSERT INTO product_slots VALUES(4,64); +INSERT INTO product_slots VALUES(4,65); +INSERT INTO product_slots VALUES(4,66); +INSERT INTO product_slots VALUES(4,67); +INSERT INTO product_slots VALUES(4,68); +INSERT INTO product_slots VALUES(4,69); +INSERT INTO product_slots VALUES(4,70); +INSERT INTO product_slots VALUES(4,71); +INSERT INTO product_slots VALUES(4,74); +INSERT INTO product_slots VALUES(4,75); +INSERT INTO product_slots VALUES(4,76); +INSERT INTO product_slots VALUES(4,77); +INSERT INTO product_slots VALUES(4,78); +INSERT INTO product_slots VALUES(4,81); +INSERT INTO product_slots VALUES(4,82); +INSERT INTO product_slots VALUES(4,83); +INSERT INTO product_slots VALUES(4,84); +INSERT INTO product_slots VALUES(4,87); +INSERT INTO product_slots VALUES(4,88); +INSERT INTO product_slots VALUES(4,89); +INSERT INTO product_slots VALUES(4,90); +INSERT INTO product_slots VALUES(4,91); +INSERT INTO product_slots VALUES(4,95); +INSERT INTO product_slots VALUES(4,96); +INSERT INTO product_slots VALUES(4,97); +INSERT INTO product_slots VALUES(4,98); +INSERT INTO product_slots VALUES(4,101); +INSERT INTO product_slots VALUES(4,102); +INSERT INTO product_slots VALUES(4,103); +INSERT INTO product_slots VALUES(4,104); +INSERT INTO product_slots VALUES(4,109); +INSERT INTO product_slots VALUES(4,110); +INSERT INTO product_slots VALUES(4,111); +INSERT INTO product_slots VALUES(4,112); +INSERT INTO product_slots VALUES(4,116); +INSERT INTO product_slots VALUES(4,117); +INSERT INTO product_slots VALUES(4,118); +INSERT INTO product_slots VALUES(4,119); +INSERT INTO product_slots VALUES(4,120); +INSERT INTO product_slots VALUES(4,123); +INSERT INTO product_slots VALUES(4,124); +INSERT INTO product_slots VALUES(4,125); +INSERT INTO product_slots VALUES(4,126); +INSERT INTO product_slots VALUES(4,130); +INSERT INTO product_slots VALUES(4,131); +INSERT INTO product_slots VALUES(4,132); +INSERT INTO product_slots VALUES(4,133); +INSERT INTO product_slots VALUES(4,137); +INSERT INTO product_slots VALUES(4,138); +INSERT INTO product_slots VALUES(4,139); +INSERT INTO product_slots VALUES(4,140); +INSERT INTO product_slots VALUES(4,144); +INSERT INTO product_slots VALUES(4,145); +INSERT INTO product_slots VALUES(4,146); +INSERT INTO product_slots VALUES(4,147); +INSERT INTO product_slots VALUES(4,148); +INSERT INTO product_slots VALUES(4,149); +INSERT INTO product_slots VALUES(4,150); +INSERT INTO product_slots VALUES(4,151); +INSERT INTO product_slots VALUES(4,155); +INSERT INTO product_slots VALUES(4,156); +INSERT INTO product_slots VALUES(4,157); +INSERT INTO product_slots VALUES(4,158); +INSERT INTO product_slots VALUES(4,162); +INSERT INTO product_slots VALUES(4,163); +INSERT INTO product_slots VALUES(4,164); +INSERT INTO product_slots VALUES(4,165); +INSERT INTO product_slots VALUES(4,166); +INSERT INTO product_slots VALUES(4,169); +INSERT INTO product_slots VALUES(4,170); +INSERT INTO product_slots VALUES(4,171); +INSERT INTO product_slots VALUES(4,172); +INSERT INTO product_slots VALUES(4,173); +INSERT INTO product_slots VALUES(4,176); +INSERT INTO product_slots VALUES(4,177); +INSERT INTO product_slots VALUES(4,178); +INSERT INTO product_slots VALUES(4,179); +INSERT INTO product_slots VALUES(4,180); +INSERT INTO product_slots VALUES(4,181); +INSERT INTO product_slots VALUES(4,182); +INSERT INTO product_slots VALUES(4,183); +INSERT INTO product_slots VALUES(4,184); +INSERT INTO product_slots VALUES(4,185); +INSERT INTO product_slots VALUES(4,186); +INSERT INTO product_slots VALUES(4,187); +INSERT INTO product_slots VALUES(4,188); +INSERT INTO product_slots VALUES(4,189); +INSERT INTO product_slots VALUES(4,190); +INSERT INTO product_slots VALUES(4,191); +INSERT INTO product_slots VALUES(4,192); +INSERT INTO product_slots VALUES(4,193); +INSERT INTO product_slots VALUES(4,194); +INSERT INTO product_slots VALUES(4,198); +INSERT INTO product_slots VALUES(4,199); +INSERT INTO product_slots VALUES(4,200); +INSERT INTO product_slots VALUES(4,201); +INSERT INTO product_slots VALUES(4,202); +INSERT INTO product_slots VALUES(4,203); +INSERT INTO product_slots VALUES(4,205); +INSERT INTO product_slots VALUES(4,208); +INSERT INTO product_slots VALUES(4,209); +INSERT INTO product_slots VALUES(4,210); +INSERT INTO product_slots VALUES(4,211); +INSERT INTO product_slots VALUES(4,216); +INSERT INTO product_slots VALUES(4,217); +INSERT INTO product_slots VALUES(4,218); +INSERT INTO product_slots VALUES(4,219); +INSERT INTO product_slots VALUES(4,220); +INSERT INTO product_slots VALUES(4,223); +INSERT INTO product_slots VALUES(4,224); +INSERT INTO product_slots VALUES(4,225); +INSERT INTO product_slots VALUES(4,226); +INSERT INTO product_slots VALUES(4,230); +INSERT INTO product_slots VALUES(4,231); +INSERT INTO product_slots VALUES(4,232); +INSERT INTO product_slots VALUES(4,234); +INSERT INTO product_slots VALUES(4,237); +INSERT INTO product_slots VALUES(4,238); +INSERT INTO product_slots VALUES(4,239); +INSERT INTO product_slots VALUES(4,240); +INSERT INTO product_slots VALUES(4,274); +INSERT INTO product_slots VALUES(4,275); +INSERT INTO product_slots VALUES(4,277); +INSERT INTO product_slots VALUES(4,278); +INSERT INTO product_slots VALUES(4,279); +INSERT INTO product_slots VALUES(5,1); +INSERT INTO product_slots VALUES(5,3); +INSERT INTO product_slots VALUES(5,4); +INSERT INTO product_slots VALUES(5,5); +INSERT INTO product_slots VALUES(5,6); +INSERT INTO product_slots VALUES(5,7); +INSERT INTO product_slots VALUES(5,8); +INSERT INTO product_slots VALUES(5,16); +INSERT INTO product_slots VALUES(5,18); +INSERT INTO product_slots VALUES(5,20); +INSERT INTO product_slots VALUES(5,21); +INSERT INTO product_slots VALUES(5,22); +INSERT INTO product_slots VALUES(5,33); +INSERT INTO product_slots VALUES(5,35); +INSERT INTO product_slots VALUES(5,37); +INSERT INTO product_slots VALUES(5,38); +INSERT INTO product_slots VALUES(5,39); +INSERT INTO product_slots VALUES(5,40); +INSERT INTO product_slots VALUES(5,41); +INSERT INTO product_slots VALUES(5,43); +INSERT INTO product_slots VALUES(5,44); +INSERT INTO product_slots VALUES(5,45); +INSERT INTO product_slots VALUES(5,46); +INSERT INTO product_slots VALUES(5,47); +INSERT INTO product_slots VALUES(5,48); +INSERT INTO product_slots VALUES(5,49); +INSERT INTO product_slots VALUES(5,50); +INSERT INTO product_slots VALUES(5,51); +INSERT INTO product_slots VALUES(5,52); +INSERT INTO product_slots VALUES(5,53); +INSERT INTO product_slots VALUES(5,54); +INSERT INTO product_slots VALUES(5,55); +INSERT INTO product_slots VALUES(5,56); +INSERT INTO product_slots VALUES(5,57); +INSERT INTO product_slots VALUES(5,58); +INSERT INTO product_slots VALUES(5,59); +INSERT INTO product_slots VALUES(5,60); +INSERT INTO product_slots VALUES(5,61); +INSERT INTO product_slots VALUES(5,62); +INSERT INTO product_slots VALUES(5,63); +INSERT INTO product_slots VALUES(5,64); +INSERT INTO product_slots VALUES(5,65); +INSERT INTO product_slots VALUES(5,66); +INSERT INTO product_slots VALUES(5,67); +INSERT INTO product_slots VALUES(5,68); +INSERT INTO product_slots VALUES(5,69); +INSERT INTO product_slots VALUES(5,70); +INSERT INTO product_slots VALUES(5,71); +INSERT INTO product_slots VALUES(5,72); +INSERT INTO product_slots VALUES(5,73); +INSERT INTO product_slots VALUES(5,74); +INSERT INTO product_slots VALUES(5,75); +INSERT INTO product_slots VALUES(5,76); +INSERT INTO product_slots VALUES(5,77); +INSERT INTO product_slots VALUES(5,78); +INSERT INTO product_slots VALUES(5,79); +INSERT INTO product_slots VALUES(5,80); +INSERT INTO product_slots VALUES(5,81); +INSERT INTO product_slots VALUES(5,82); +INSERT INTO product_slots VALUES(5,83); +INSERT INTO product_slots VALUES(5,84); +INSERT INTO product_slots VALUES(5,85); +INSERT INTO product_slots VALUES(5,86); +INSERT INTO product_slots VALUES(5,87); +INSERT INTO product_slots VALUES(5,88); +INSERT INTO product_slots VALUES(5,89); +INSERT INTO product_slots VALUES(5,90); +INSERT INTO product_slots VALUES(5,91); +INSERT INTO product_slots VALUES(5,92); +INSERT INTO product_slots VALUES(5,93); +INSERT INTO product_slots VALUES(5,94); +INSERT INTO product_slots VALUES(5,95); +INSERT INTO product_slots VALUES(5,96); +INSERT INTO product_slots VALUES(5,97); +INSERT INTO product_slots VALUES(5,98); +INSERT INTO product_slots VALUES(5,99); +INSERT INTO product_slots VALUES(5,100); +INSERT INTO product_slots VALUES(5,101); +INSERT INTO product_slots VALUES(5,102); +INSERT INTO product_slots VALUES(5,103); +INSERT INTO product_slots VALUES(5,104); +INSERT INTO product_slots VALUES(5,105); +INSERT INTO product_slots VALUES(5,106); +INSERT INTO product_slots VALUES(5,107); +INSERT INTO product_slots VALUES(5,108); +INSERT INTO product_slots VALUES(5,109); +INSERT INTO product_slots VALUES(5,110); +INSERT INTO product_slots VALUES(5,111); +INSERT INTO product_slots VALUES(5,112); +INSERT INTO product_slots VALUES(5,113); +INSERT INTO product_slots VALUES(5,114); +INSERT INTO product_slots VALUES(5,115); +INSERT INTO product_slots VALUES(5,116); +INSERT INTO product_slots VALUES(5,117); +INSERT INTO product_slots VALUES(5,118); +INSERT INTO product_slots VALUES(5,119); +INSERT INTO product_slots VALUES(5,120); +INSERT INTO product_slots VALUES(5,121); +INSERT INTO product_slots VALUES(5,122); +INSERT INTO product_slots VALUES(5,123); +INSERT INTO product_slots VALUES(5,124); +INSERT INTO product_slots VALUES(5,125); +INSERT INTO product_slots VALUES(5,126); +INSERT INTO product_slots VALUES(5,127); +INSERT INTO product_slots VALUES(5,128); +INSERT INTO product_slots VALUES(5,129); +INSERT INTO product_slots VALUES(5,130); +INSERT INTO product_slots VALUES(5,131); +INSERT INTO product_slots VALUES(5,132); +INSERT INTO product_slots VALUES(5,133); +INSERT INTO product_slots VALUES(5,134); +INSERT INTO product_slots VALUES(5,135); +INSERT INTO product_slots VALUES(5,136); +INSERT INTO product_slots VALUES(5,137); +INSERT INTO product_slots VALUES(5,138); +INSERT INTO product_slots VALUES(5,139); +INSERT INTO product_slots VALUES(5,140); +INSERT INTO product_slots VALUES(5,141); +INSERT INTO product_slots VALUES(5,142); +INSERT INTO product_slots VALUES(5,143); +INSERT INTO product_slots VALUES(5,144); +INSERT INTO product_slots VALUES(5,145); +INSERT INTO product_slots VALUES(5,146); +INSERT INTO product_slots VALUES(5,147); +INSERT INTO product_slots VALUES(5,148); +INSERT INTO product_slots VALUES(5,149); +INSERT INTO product_slots VALUES(5,150); +INSERT INTO product_slots VALUES(5,151); +INSERT INTO product_slots VALUES(5,152); +INSERT INTO product_slots VALUES(5,153); +INSERT INTO product_slots VALUES(5,154); +INSERT INTO product_slots VALUES(5,155); +INSERT INTO product_slots VALUES(5,156); +INSERT INTO product_slots VALUES(5,157); +INSERT INTO product_slots VALUES(5,158); +INSERT INTO product_slots VALUES(5,159); +INSERT INTO product_slots VALUES(5,160); +INSERT INTO product_slots VALUES(5,161); +INSERT INTO product_slots VALUES(5,162); +INSERT INTO product_slots VALUES(5,163); +INSERT INTO product_slots VALUES(5,164); +INSERT INTO product_slots VALUES(5,165); +INSERT INTO product_slots VALUES(5,166); +INSERT INTO product_slots VALUES(5,167); +INSERT INTO product_slots VALUES(5,168); +INSERT INTO product_slots VALUES(5,169); +INSERT INTO product_slots VALUES(5,170); +INSERT INTO product_slots VALUES(5,171); +INSERT INTO product_slots VALUES(5,172); +INSERT INTO product_slots VALUES(5,173); +INSERT INTO product_slots VALUES(5,174); +INSERT INTO product_slots VALUES(5,175); +INSERT INTO product_slots VALUES(5,176); +INSERT INTO product_slots VALUES(5,177); +INSERT INTO product_slots VALUES(5,178); +INSERT INTO product_slots VALUES(5,179); +INSERT INTO product_slots VALUES(5,180); +INSERT INTO product_slots VALUES(5,181); +INSERT INTO product_slots VALUES(5,182); +INSERT INTO product_slots VALUES(5,183); +INSERT INTO product_slots VALUES(5,184); +INSERT INTO product_slots VALUES(5,185); +INSERT INTO product_slots VALUES(5,186); +INSERT INTO product_slots VALUES(5,187); +INSERT INTO product_slots VALUES(5,188); +INSERT INTO product_slots VALUES(5,189); +INSERT INTO product_slots VALUES(5,190); +INSERT INTO product_slots VALUES(5,191); +INSERT INTO product_slots VALUES(5,192); +INSERT INTO product_slots VALUES(5,193); +INSERT INTO product_slots VALUES(5,194); +INSERT INTO product_slots VALUES(5,195); +INSERT INTO product_slots VALUES(5,196); +INSERT INTO product_slots VALUES(5,197); +INSERT INTO product_slots VALUES(5,198); +INSERT INTO product_slots VALUES(5,199); +INSERT INTO product_slots VALUES(5,200); +INSERT INTO product_slots VALUES(5,201); +INSERT INTO product_slots VALUES(5,202); +INSERT INTO product_slots VALUES(5,203); +INSERT INTO product_slots VALUES(5,204); +INSERT INTO product_slots VALUES(5,205); +INSERT INTO product_slots VALUES(5,206); +INSERT INTO product_slots VALUES(5,207); +INSERT INTO product_slots VALUES(5,208); +INSERT INTO product_slots VALUES(5,209); +INSERT INTO product_slots VALUES(5,210); +INSERT INTO product_slots VALUES(5,211); +INSERT INTO product_slots VALUES(5,212); +INSERT INTO product_slots VALUES(5,213); +INSERT INTO product_slots VALUES(5,214); +INSERT INTO product_slots VALUES(5,215); +INSERT INTO product_slots VALUES(5,216); +INSERT INTO product_slots VALUES(5,217); +INSERT INTO product_slots VALUES(5,218); +INSERT INTO product_slots VALUES(5,219); +INSERT INTO product_slots VALUES(5,220); +INSERT INTO product_slots VALUES(5,221); +INSERT INTO product_slots VALUES(5,222); +INSERT INTO product_slots VALUES(5,223); +INSERT INTO product_slots VALUES(5,224); +INSERT INTO product_slots VALUES(5,225); +INSERT INTO product_slots VALUES(5,226); +INSERT INTO product_slots VALUES(5,227); +INSERT INTO product_slots VALUES(5,228); +INSERT INTO product_slots VALUES(5,229); +INSERT INTO product_slots VALUES(5,230); +INSERT INTO product_slots VALUES(5,231); +INSERT INTO product_slots VALUES(5,232); +INSERT INTO product_slots VALUES(5,233); +INSERT INTO product_slots VALUES(5,234); +INSERT INTO product_slots VALUES(5,235); +INSERT INTO product_slots VALUES(5,236); +INSERT INTO product_slots VALUES(5,237); +INSERT INTO product_slots VALUES(5,238); +INSERT INTO product_slots VALUES(5,239); +INSERT INTO product_slots VALUES(5,240); +INSERT INTO product_slots VALUES(5,241); +INSERT INTO product_slots VALUES(5,242); +INSERT INTO product_slots VALUES(5,243); +INSERT INTO product_slots VALUES(5,244); +INSERT INTO product_slots VALUES(5,274); +INSERT INTO product_slots VALUES(5,275); +INSERT INTO product_slots VALUES(5,279); +INSERT INTO product_slots VALUES(5,280); +INSERT INTO product_slots VALUES(5,281); +INSERT INTO product_slots VALUES(5,282); +INSERT INTO product_slots VALUES(5,283); +INSERT INTO product_slots VALUES(5,284); +INSERT INTO product_slots VALUES(5,285); +INSERT INTO product_slots VALUES(5,286); +INSERT INTO product_slots VALUES(5,287); +INSERT INTO product_slots VALUES(6,1); +INSERT INTO product_slots VALUES(6,2); +INSERT INTO product_slots VALUES(6,3); +INSERT INTO product_slots VALUES(6,4); +INSERT INTO product_slots VALUES(6,5); +INSERT INTO product_slots VALUES(6,6); +INSERT INTO product_slots VALUES(6,7); +INSERT INTO product_slots VALUES(6,8); +INSERT INTO product_slots VALUES(6,13); +INSERT INTO product_slots VALUES(6,14); +INSERT INTO product_slots VALUES(6,16); +INSERT INTO product_slots VALUES(6,17); +INSERT INTO product_slots VALUES(6,18); +INSERT INTO product_slots VALUES(6,20); +INSERT INTO product_slots VALUES(6,21); +INSERT INTO product_slots VALUES(6,22); +INSERT INTO product_slots VALUES(6,33); +INSERT INTO product_slots VALUES(6,35); +INSERT INTO product_slots VALUES(6,37); +INSERT INTO product_slots VALUES(6,38); +INSERT INTO product_slots VALUES(6,39); +INSERT INTO product_slots VALUES(6,40); +INSERT INTO product_slots VALUES(6,41); +INSERT INTO product_slots VALUES(6,43); +INSERT INTO product_slots VALUES(6,44); +INSERT INTO product_slots VALUES(6,45); +INSERT INTO product_slots VALUES(6,46); +INSERT INTO product_slots VALUES(6,47); +INSERT INTO product_slots VALUES(6,48); +INSERT INTO product_slots VALUES(6,49); +INSERT INTO product_slots VALUES(6,50); +INSERT INTO product_slots VALUES(6,51); +INSERT INTO product_slots VALUES(6,52); +INSERT INTO product_slots VALUES(6,53); +INSERT INTO product_slots VALUES(6,54); +INSERT INTO product_slots VALUES(6,55); +INSERT INTO product_slots VALUES(6,56); +INSERT INTO product_slots VALUES(6,57); +INSERT INTO product_slots VALUES(6,58); +INSERT INTO product_slots VALUES(6,59); +INSERT INTO product_slots VALUES(6,60); +INSERT INTO product_slots VALUES(6,61); +INSERT INTO product_slots VALUES(6,62); +INSERT INTO product_slots VALUES(6,63); +INSERT INTO product_slots VALUES(6,64); +INSERT INTO product_slots VALUES(6,65); +INSERT INTO product_slots VALUES(6,66); +INSERT INTO product_slots VALUES(6,67); +INSERT INTO product_slots VALUES(6,68); +INSERT INTO product_slots VALUES(6,69); +INSERT INTO product_slots VALUES(6,70); +INSERT INTO product_slots VALUES(6,71); +INSERT INTO product_slots VALUES(6,72); +INSERT INTO product_slots VALUES(6,73); +INSERT INTO product_slots VALUES(6,74); +INSERT INTO product_slots VALUES(6,75); +INSERT INTO product_slots VALUES(6,76); +INSERT INTO product_slots VALUES(6,77); +INSERT INTO product_slots VALUES(6,78); +INSERT INTO product_slots VALUES(6,79); +INSERT INTO product_slots VALUES(6,80); +INSERT INTO product_slots VALUES(6,81); +INSERT INTO product_slots VALUES(6,82); +INSERT INTO product_slots VALUES(6,83); +INSERT INTO product_slots VALUES(6,84); +INSERT INTO product_slots VALUES(6,87); +INSERT INTO product_slots VALUES(6,88); +INSERT INTO product_slots VALUES(6,89); +INSERT INTO product_slots VALUES(6,90); +INSERT INTO product_slots VALUES(6,91); +INSERT INTO product_slots VALUES(6,92); +INSERT INTO product_slots VALUES(6,93); +INSERT INTO product_slots VALUES(6,94); +INSERT INTO product_slots VALUES(6,95); +INSERT INTO product_slots VALUES(6,96); +INSERT INTO product_slots VALUES(6,97); +INSERT INTO product_slots VALUES(6,98); +INSERT INTO product_slots VALUES(6,99); +INSERT INTO product_slots VALUES(6,100); +INSERT INTO product_slots VALUES(6,102); +INSERT INTO product_slots VALUES(6,103); +INSERT INTO product_slots VALUES(6,104); +INSERT INTO product_slots VALUES(6,109); +INSERT INTO product_slots VALUES(6,110); +INSERT INTO product_slots VALUES(6,111); +INSERT INTO product_slots VALUES(6,112); +INSERT INTO product_slots VALUES(6,117); +INSERT INTO product_slots VALUES(6,118); +INSERT INTO product_slots VALUES(6,119); +INSERT INTO product_slots VALUES(6,120); +INSERT INTO product_slots VALUES(6,121); +INSERT INTO product_slots VALUES(6,122); +INSERT INTO product_slots VALUES(6,123); +INSERT INTO product_slots VALUES(6,124); +INSERT INTO product_slots VALUES(6,125); +INSERT INTO product_slots VALUES(6,126); +INSERT INTO product_slots VALUES(6,127); +INSERT INTO product_slots VALUES(6,128); +INSERT INTO product_slots VALUES(6,129); +INSERT INTO product_slots VALUES(6,130); +INSERT INTO product_slots VALUES(6,131); +INSERT INTO product_slots VALUES(6,132); +INSERT INTO product_slots VALUES(6,133); +INSERT INTO product_slots VALUES(6,134); +INSERT INTO product_slots VALUES(6,135); +INSERT INTO product_slots VALUES(6,136); +INSERT INTO product_slots VALUES(6,138); +INSERT INTO product_slots VALUES(6,139); +INSERT INTO product_slots VALUES(6,140); +INSERT INTO product_slots VALUES(6,141); +INSERT INTO product_slots VALUES(6,142); +INSERT INTO product_slots VALUES(6,143); +INSERT INTO product_slots VALUES(6,145); +INSERT INTO product_slots VALUES(6,146); +INSERT INTO product_slots VALUES(6,147); +INSERT INTO product_slots VALUES(6,148); +INSERT INTO product_slots VALUES(6,149); +INSERT INTO product_slots VALUES(6,150); +INSERT INTO product_slots VALUES(6,151); +INSERT INTO product_slots VALUES(6,152); +INSERT INTO product_slots VALUES(6,153); +INSERT INTO product_slots VALUES(6,154); +INSERT INTO product_slots VALUES(6,155); +INSERT INTO product_slots VALUES(6,156); +INSERT INTO product_slots VALUES(6,157); +INSERT INTO product_slots VALUES(6,158); +INSERT INTO product_slots VALUES(6,159); +INSERT INTO product_slots VALUES(6,160); +INSERT INTO product_slots VALUES(6,161); +INSERT INTO product_slots VALUES(6,162); +INSERT INTO product_slots VALUES(6,163); +INSERT INTO product_slots VALUES(6,164); +INSERT INTO product_slots VALUES(6,165); +INSERT INTO product_slots VALUES(6,166); +INSERT INTO product_slots VALUES(6,169); +INSERT INTO product_slots VALUES(6,170); +INSERT INTO product_slots VALUES(6,171); +INSERT INTO product_slots VALUES(6,172); +INSERT INTO product_slots VALUES(6,173); +INSERT INTO product_slots VALUES(6,174); +INSERT INTO product_slots VALUES(6,175); +INSERT INTO product_slots VALUES(6,176); +INSERT INTO product_slots VALUES(6,177); +INSERT INTO product_slots VALUES(6,178); +INSERT INTO product_slots VALUES(6,179); +INSERT INTO product_slots VALUES(6,180); +INSERT INTO product_slots VALUES(6,181); +INSERT INTO product_slots VALUES(6,182); +INSERT INTO product_slots VALUES(6,183); +INSERT INTO product_slots VALUES(6,184); +INSERT INTO product_slots VALUES(6,185); +INSERT INTO product_slots VALUES(6,186); +INSERT INTO product_slots VALUES(6,187); +INSERT INTO product_slots VALUES(6,188); +INSERT INTO product_slots VALUES(6,189); +INSERT INTO product_slots VALUES(6,190); +INSERT INTO product_slots VALUES(6,191); +INSERT INTO product_slots VALUES(6,192); +INSERT INTO product_slots VALUES(6,193); +INSERT INTO product_slots VALUES(6,194); +INSERT INTO product_slots VALUES(6,198); +INSERT INTO product_slots VALUES(6,199); +INSERT INTO product_slots VALUES(6,200); +INSERT INTO product_slots VALUES(6,201); +INSERT INTO product_slots VALUES(6,202); +INSERT INTO product_slots VALUES(6,203); +INSERT INTO product_slots VALUES(6,204); +INSERT INTO product_slots VALUES(6,205); +INSERT INTO product_slots VALUES(6,206); +INSERT INTO product_slots VALUES(6,207); +INSERT INTO product_slots VALUES(6,208); +INSERT INTO product_slots VALUES(6,209); +INSERT INTO product_slots VALUES(6,210); +INSERT INTO product_slots VALUES(6,211); +INSERT INTO product_slots VALUES(6,212); +INSERT INTO product_slots VALUES(6,213); +INSERT INTO product_slots VALUES(6,214); +INSERT INTO product_slots VALUES(6,215); +INSERT INTO product_slots VALUES(6,216); +INSERT INTO product_slots VALUES(6,217); +INSERT INTO product_slots VALUES(6,218); +INSERT INTO product_slots VALUES(6,219); +INSERT INTO product_slots VALUES(6,220); +INSERT INTO product_slots VALUES(6,222); +INSERT INTO product_slots VALUES(6,223); +INSERT INTO product_slots VALUES(6,224); +INSERT INTO product_slots VALUES(6,225); +INSERT INTO product_slots VALUES(6,226); +INSERT INTO product_slots VALUES(6,227); +INSERT INTO product_slots VALUES(6,228); +INSERT INTO product_slots VALUES(6,229); +INSERT INTO product_slots VALUES(6,230); +INSERT INTO product_slots VALUES(6,231); +INSERT INTO product_slots VALUES(6,232); +INSERT INTO product_slots VALUES(6,234); +INSERT INTO product_slots VALUES(6,235); +INSERT INTO product_slots VALUES(6,236); +INSERT INTO product_slots VALUES(6,237); +INSERT INTO product_slots VALUES(6,238); +INSERT INTO product_slots VALUES(6,239); +INSERT INTO product_slots VALUES(6,240); +INSERT INTO product_slots VALUES(6,244); +INSERT INTO product_slots VALUES(6,274); +INSERT INTO product_slots VALUES(6,275); +INSERT INTO product_slots VALUES(6,277); +INSERT INTO product_slots VALUES(6,278); +INSERT INTO product_slots VALUES(6,279); +INSERT INTO product_slots VALUES(6,283); +INSERT INTO product_slots VALUES(6,284); +INSERT INTO product_slots VALUES(6,285); +INSERT INTO product_slots VALUES(6,286); +INSERT INTO product_slots VALUES(6,287); +INSERT INTO product_slots VALUES(7,1); +INSERT INTO product_slots VALUES(7,2); +INSERT INTO product_slots VALUES(7,3); +INSERT INTO product_slots VALUES(7,4); +INSERT INTO product_slots VALUES(7,5); +INSERT INTO product_slots VALUES(7,6); +INSERT INTO product_slots VALUES(7,7); +INSERT INTO product_slots VALUES(7,8); +INSERT INTO product_slots VALUES(7,9); +INSERT INTO product_slots VALUES(7,17); +INSERT INTO product_slots VALUES(7,18); +INSERT INTO product_slots VALUES(7,20); +INSERT INTO product_slots VALUES(7,21); +INSERT INTO product_slots VALUES(7,22); +INSERT INTO product_slots VALUES(7,33); +INSERT INTO product_slots VALUES(7,35); +INSERT INTO product_slots VALUES(7,37); +INSERT INTO product_slots VALUES(7,38); +INSERT INTO product_slots VALUES(7,39); +INSERT INTO product_slots VALUES(7,40); +INSERT INTO product_slots VALUES(7,43); +INSERT INTO product_slots VALUES(7,45); +INSERT INTO product_slots VALUES(7,46); +INSERT INTO product_slots VALUES(7,48); +INSERT INTO product_slots VALUES(7,49); +INSERT INTO product_slots VALUES(7,51); +INSERT INTO product_slots VALUES(7,52); +INSERT INTO product_slots VALUES(7,53); +INSERT INTO product_slots VALUES(7,54); +INSERT INTO product_slots VALUES(7,57); +INSERT INTO product_slots VALUES(7,58); +INSERT INTO product_slots VALUES(7,59); +INSERT INTO product_slots VALUES(7,60); +INSERT INTO product_slots VALUES(7,61); +INSERT INTO product_slots VALUES(7,62); +INSERT INTO product_slots VALUES(7,63); +INSERT INTO product_slots VALUES(7,64); +INSERT INTO product_slots VALUES(7,65); +INSERT INTO product_slots VALUES(7,66); +INSERT INTO product_slots VALUES(7,67); +INSERT INTO product_slots VALUES(7,68); +INSERT INTO product_slots VALUES(7,69); +INSERT INTO product_slots VALUES(7,70); +INSERT INTO product_slots VALUES(7,71); +INSERT INTO product_slots VALUES(7,72); +INSERT INTO product_slots VALUES(7,73); +INSERT INTO product_slots VALUES(7,74); +INSERT INTO product_slots VALUES(7,75); +INSERT INTO product_slots VALUES(7,76); +INSERT INTO product_slots VALUES(7,77); +INSERT INTO product_slots VALUES(7,78); +INSERT INTO product_slots VALUES(7,79); +INSERT INTO product_slots VALUES(7,80); +INSERT INTO product_slots VALUES(7,81); +INSERT INTO product_slots VALUES(7,82); +INSERT INTO product_slots VALUES(7,83); +INSERT INTO product_slots VALUES(7,84); +INSERT INTO product_slots VALUES(7,85); +INSERT INTO product_slots VALUES(7,86); +INSERT INTO product_slots VALUES(7,87); +INSERT INTO product_slots VALUES(7,88); +INSERT INTO product_slots VALUES(7,89); +INSERT INTO product_slots VALUES(7,90); +INSERT INTO product_slots VALUES(7,91); +INSERT INTO product_slots VALUES(7,92); +INSERT INTO product_slots VALUES(7,93); +INSERT INTO product_slots VALUES(7,94); +INSERT INTO product_slots VALUES(7,95); +INSERT INTO product_slots VALUES(7,96); +INSERT INTO product_slots VALUES(7,97); +INSERT INTO product_slots VALUES(7,98); +INSERT INTO product_slots VALUES(7,99); +INSERT INTO product_slots VALUES(7,100); +INSERT INTO product_slots VALUES(7,102); +INSERT INTO product_slots VALUES(7,103); +INSERT INTO product_slots VALUES(7,104); +INSERT INTO product_slots VALUES(7,105); +INSERT INTO product_slots VALUES(7,106); +INSERT INTO product_slots VALUES(7,107); +INSERT INTO product_slots VALUES(7,108); +INSERT INTO product_slots VALUES(7,109); +INSERT INTO product_slots VALUES(7,110); +INSERT INTO product_slots VALUES(7,111); +INSERT INTO product_slots VALUES(7,112); +INSERT INTO product_slots VALUES(7,113); +INSERT INTO product_slots VALUES(7,114); +INSERT INTO product_slots VALUES(7,115); +INSERT INTO product_slots VALUES(7,117); +INSERT INTO product_slots VALUES(7,118); +INSERT INTO product_slots VALUES(7,119); +INSERT INTO product_slots VALUES(7,120); +INSERT INTO product_slots VALUES(7,121); +INSERT INTO product_slots VALUES(7,122); +INSERT INTO product_slots VALUES(7,123); +INSERT INTO product_slots VALUES(7,124); +INSERT INTO product_slots VALUES(7,125); +INSERT INTO product_slots VALUES(7,126); +INSERT INTO product_slots VALUES(7,127); +INSERT INTO product_slots VALUES(7,128); +INSERT INTO product_slots VALUES(7,129); +INSERT INTO product_slots VALUES(7,130); +INSERT INTO product_slots VALUES(7,131); +INSERT INTO product_slots VALUES(7,132); +INSERT INTO product_slots VALUES(7,133); +INSERT INTO product_slots VALUES(7,134); +INSERT INTO product_slots VALUES(7,135); +INSERT INTO product_slots VALUES(7,136); +INSERT INTO product_slots VALUES(7,138); +INSERT INTO product_slots VALUES(7,139); +INSERT INTO product_slots VALUES(7,140); +INSERT INTO product_slots VALUES(7,141); +INSERT INTO product_slots VALUES(7,142); +INSERT INTO product_slots VALUES(7,143); +INSERT INTO product_slots VALUES(7,145); +INSERT INTO product_slots VALUES(7,146); +INSERT INTO product_slots VALUES(7,147); +INSERT INTO product_slots VALUES(7,148); +INSERT INTO product_slots VALUES(7,149); +INSERT INTO product_slots VALUES(7,150); +INSERT INTO product_slots VALUES(7,151); +INSERT INTO product_slots VALUES(7,152); +INSERT INTO product_slots VALUES(7,153); +INSERT INTO product_slots VALUES(7,154); +INSERT INTO product_slots VALUES(7,155); +INSERT INTO product_slots VALUES(7,156); +INSERT INTO product_slots VALUES(7,157); +INSERT INTO product_slots VALUES(7,158); +INSERT INTO product_slots VALUES(7,159); +INSERT INTO product_slots VALUES(7,160); +INSERT INTO product_slots VALUES(7,161); +INSERT INTO product_slots VALUES(7,162); +INSERT INTO product_slots VALUES(7,163); +INSERT INTO product_slots VALUES(7,164); +INSERT INTO product_slots VALUES(7,165); +INSERT INTO product_slots VALUES(7,166); +INSERT INTO product_slots VALUES(7,167); +INSERT INTO product_slots VALUES(7,168); +INSERT INTO product_slots VALUES(7,169); +INSERT INTO product_slots VALUES(7,170); +INSERT INTO product_slots VALUES(7,171); +INSERT INTO product_slots VALUES(7,172); +INSERT INTO product_slots VALUES(7,173); +INSERT INTO product_slots VALUES(7,174); +INSERT INTO product_slots VALUES(7,175); +INSERT INTO product_slots VALUES(7,176); +INSERT INTO product_slots VALUES(7,177); +INSERT INTO product_slots VALUES(7,178); +INSERT INTO product_slots VALUES(7,179); +INSERT INTO product_slots VALUES(7,180); +INSERT INTO product_slots VALUES(7,181); +INSERT INTO product_slots VALUES(7,182); +INSERT INTO product_slots VALUES(7,183); +INSERT INTO product_slots VALUES(7,184); +INSERT INTO product_slots VALUES(7,185); +INSERT INTO product_slots VALUES(7,186); +INSERT INTO product_slots VALUES(7,187); +INSERT INTO product_slots VALUES(7,188); +INSERT INTO product_slots VALUES(7,189); +INSERT INTO product_slots VALUES(7,190); +INSERT INTO product_slots VALUES(7,191); +INSERT INTO product_slots VALUES(7,192); +INSERT INTO product_slots VALUES(7,193); +INSERT INTO product_slots VALUES(7,194); +INSERT INTO product_slots VALUES(7,195); +INSERT INTO product_slots VALUES(7,196); +INSERT INTO product_slots VALUES(7,197); +INSERT INTO product_slots VALUES(7,198); +INSERT INTO product_slots VALUES(7,199); +INSERT INTO product_slots VALUES(7,200); +INSERT INTO product_slots VALUES(7,201); +INSERT INTO product_slots VALUES(7,202); +INSERT INTO product_slots VALUES(7,203); +INSERT INTO product_slots VALUES(7,204); +INSERT INTO product_slots VALUES(7,205); +INSERT INTO product_slots VALUES(7,206); +INSERT INTO product_slots VALUES(7,207); +INSERT INTO product_slots VALUES(7,208); +INSERT INTO product_slots VALUES(7,209); +INSERT INTO product_slots VALUES(7,210); +INSERT INTO product_slots VALUES(7,211); +INSERT INTO product_slots VALUES(7,212); +INSERT INTO product_slots VALUES(7,213); +INSERT INTO product_slots VALUES(7,214); +INSERT INTO product_slots VALUES(7,215); +INSERT INTO product_slots VALUES(7,216); +INSERT INTO product_slots VALUES(7,217); +INSERT INTO product_slots VALUES(7,218); +INSERT INTO product_slots VALUES(7,219); +INSERT INTO product_slots VALUES(7,220); +INSERT INTO product_slots VALUES(7,221); +INSERT INTO product_slots VALUES(7,222); +INSERT INTO product_slots VALUES(7,223); +INSERT INTO product_slots VALUES(7,224); +INSERT INTO product_slots VALUES(7,225); +INSERT INTO product_slots VALUES(7,226); +INSERT INTO product_slots VALUES(7,227); +INSERT INTO product_slots VALUES(7,228); +INSERT INTO product_slots VALUES(7,229); +INSERT INTO product_slots VALUES(7,230); +INSERT INTO product_slots VALUES(7,231); +INSERT INTO product_slots VALUES(7,232); +INSERT INTO product_slots VALUES(7,233); +INSERT INTO product_slots VALUES(7,234); +INSERT INTO product_slots VALUES(7,235); +INSERT INTO product_slots VALUES(7,236); +INSERT INTO product_slots VALUES(7,237); +INSERT INTO product_slots VALUES(7,238); +INSERT INTO product_slots VALUES(7,239); +INSERT INTO product_slots VALUES(7,240); +INSERT INTO product_slots VALUES(7,241); +INSERT INTO product_slots VALUES(7,242); +INSERT INTO product_slots VALUES(7,243); +INSERT INTO product_slots VALUES(7,244); +INSERT INTO product_slots VALUES(7,274); +INSERT INTO product_slots VALUES(7,275); +INSERT INTO product_slots VALUES(7,279); +INSERT INTO product_slots VALUES(7,280); +INSERT INTO product_slots VALUES(7,281); +INSERT INTO product_slots VALUES(7,282); +INSERT INTO product_slots VALUES(7,283); +INSERT INTO product_slots VALUES(7,284); +INSERT INTO product_slots VALUES(7,285); +INSERT INTO product_slots VALUES(7,286); +INSERT INTO product_slots VALUES(7,287); +INSERT INTO product_slots VALUES(8,1); +INSERT INTO product_slots VALUES(8,2); +INSERT INTO product_slots VALUES(8,3); +INSERT INTO product_slots VALUES(8,4); +INSERT INTO product_slots VALUES(8,5); +INSERT INTO product_slots VALUES(8,6); +INSERT INTO product_slots VALUES(8,7); +INSERT INTO product_slots VALUES(8,12); +INSERT INTO product_slots VALUES(8,17); +INSERT INTO product_slots VALUES(8,18); +INSERT INTO product_slots VALUES(8,20); +INSERT INTO product_slots VALUES(8,21); +INSERT INTO product_slots VALUES(8,22); +INSERT INTO product_slots VALUES(8,33); +INSERT INTO product_slots VALUES(8,35); +INSERT INTO product_slots VALUES(8,37); +INSERT INTO product_slots VALUES(8,38); +INSERT INTO product_slots VALUES(8,39); +INSERT INTO product_slots VALUES(8,40); +INSERT INTO product_slots VALUES(8,43); +INSERT INTO product_slots VALUES(8,45); +INSERT INTO product_slots VALUES(8,46); +INSERT INTO product_slots VALUES(8,48); +INSERT INTO product_slots VALUES(8,49); +INSERT INTO product_slots VALUES(8,51); +INSERT INTO product_slots VALUES(8,52); +INSERT INTO product_slots VALUES(8,53); +INSERT INTO product_slots VALUES(8,54); +INSERT INTO product_slots VALUES(8,57); +INSERT INTO product_slots VALUES(8,58); +INSERT INTO product_slots VALUES(8,59); +INSERT INTO product_slots VALUES(8,60); +INSERT INTO product_slots VALUES(8,61); +INSERT INTO product_slots VALUES(8,62); +INSERT INTO product_slots VALUES(8,63); +INSERT INTO product_slots VALUES(8,64); +INSERT INTO product_slots VALUES(8,65); +INSERT INTO product_slots VALUES(8,66); +INSERT INTO product_slots VALUES(8,67); +INSERT INTO product_slots VALUES(8,68); +INSERT INTO product_slots VALUES(8,69); +INSERT INTO product_slots VALUES(8,70); +INSERT INTO product_slots VALUES(8,71); +INSERT INTO product_slots VALUES(8,72); +INSERT INTO product_slots VALUES(8,73); +INSERT INTO product_slots VALUES(8,74); +INSERT INTO product_slots VALUES(8,75); +INSERT INTO product_slots VALUES(8,76); +INSERT INTO product_slots VALUES(8,77); +INSERT INTO product_slots VALUES(8,78); +INSERT INTO product_slots VALUES(8,79); +INSERT INTO product_slots VALUES(8,80); +INSERT INTO product_slots VALUES(8,81); +INSERT INTO product_slots VALUES(8,82); +INSERT INTO product_slots VALUES(8,83); +INSERT INTO product_slots VALUES(8,84); +INSERT INTO product_slots VALUES(8,85); +INSERT INTO product_slots VALUES(8,86); +INSERT INTO product_slots VALUES(8,87); +INSERT INTO product_slots VALUES(8,88); +INSERT INTO product_slots VALUES(8,89); +INSERT INTO product_slots VALUES(8,90); +INSERT INTO product_slots VALUES(8,91); +INSERT INTO product_slots VALUES(8,92); +INSERT INTO product_slots VALUES(8,93); +INSERT INTO product_slots VALUES(8,94); +INSERT INTO product_slots VALUES(8,95); +INSERT INTO product_slots VALUES(8,96); +INSERT INTO product_slots VALUES(8,97); +INSERT INTO product_slots VALUES(8,98); +INSERT INTO product_slots VALUES(8,99); +INSERT INTO product_slots VALUES(8,100); +INSERT INTO product_slots VALUES(8,102); +INSERT INTO product_slots VALUES(8,103); +INSERT INTO product_slots VALUES(8,104); +INSERT INTO product_slots VALUES(8,105); +INSERT INTO product_slots VALUES(8,106); +INSERT INTO product_slots VALUES(8,107); +INSERT INTO product_slots VALUES(8,108); +INSERT INTO product_slots VALUES(8,109); +INSERT INTO product_slots VALUES(8,110); +INSERT INTO product_slots VALUES(8,111); +INSERT INTO product_slots VALUES(8,112); +INSERT INTO product_slots VALUES(8,113); +INSERT INTO product_slots VALUES(8,114); +INSERT INTO product_slots VALUES(8,115); +INSERT INTO product_slots VALUES(8,117); +INSERT INTO product_slots VALUES(8,118); +INSERT INTO product_slots VALUES(8,119); +INSERT INTO product_slots VALUES(8,120); +INSERT INTO product_slots VALUES(8,121); +INSERT INTO product_slots VALUES(8,122); +INSERT INTO product_slots VALUES(8,123); +INSERT INTO product_slots VALUES(8,124); +INSERT INTO product_slots VALUES(8,125); +INSERT INTO product_slots VALUES(8,126); +INSERT INTO product_slots VALUES(8,127); +INSERT INTO product_slots VALUES(8,128); +INSERT INTO product_slots VALUES(8,129); +INSERT INTO product_slots VALUES(8,130); +INSERT INTO product_slots VALUES(8,131); +INSERT INTO product_slots VALUES(8,132); +INSERT INTO product_slots VALUES(8,133); +INSERT INTO product_slots VALUES(8,134); +INSERT INTO product_slots VALUES(8,135); +INSERT INTO product_slots VALUES(8,136); +INSERT INTO product_slots VALUES(8,138); +INSERT INTO product_slots VALUES(8,139); +INSERT INTO product_slots VALUES(8,140); +INSERT INTO product_slots VALUES(8,141); +INSERT INTO product_slots VALUES(8,142); +INSERT INTO product_slots VALUES(8,143); +INSERT INTO product_slots VALUES(8,145); +INSERT INTO product_slots VALUES(8,146); +INSERT INTO product_slots VALUES(8,147); +INSERT INTO product_slots VALUES(8,148); +INSERT INTO product_slots VALUES(8,149); +INSERT INTO product_slots VALUES(8,150); +INSERT INTO product_slots VALUES(8,151); +INSERT INTO product_slots VALUES(8,152); +INSERT INTO product_slots VALUES(8,153); +INSERT INTO product_slots VALUES(8,154); +INSERT INTO product_slots VALUES(8,155); +INSERT INTO product_slots VALUES(8,156); +INSERT INTO product_slots VALUES(8,157); +INSERT INTO product_slots VALUES(8,158); +INSERT INTO product_slots VALUES(8,159); +INSERT INTO product_slots VALUES(8,160); +INSERT INTO product_slots VALUES(8,161); +INSERT INTO product_slots VALUES(8,162); +INSERT INTO product_slots VALUES(8,163); +INSERT INTO product_slots VALUES(8,164); +INSERT INTO product_slots VALUES(8,165); +INSERT INTO product_slots VALUES(8,166); +INSERT INTO product_slots VALUES(8,167); +INSERT INTO product_slots VALUES(8,168); +INSERT INTO product_slots VALUES(8,169); +INSERT INTO product_slots VALUES(8,170); +INSERT INTO product_slots VALUES(8,171); +INSERT INTO product_slots VALUES(8,172); +INSERT INTO product_slots VALUES(8,173); +INSERT INTO product_slots VALUES(8,174); +INSERT INTO product_slots VALUES(8,175); +INSERT INTO product_slots VALUES(8,176); +INSERT INTO product_slots VALUES(8,177); +INSERT INTO product_slots VALUES(8,178); +INSERT INTO product_slots VALUES(8,179); +INSERT INTO product_slots VALUES(8,180); +INSERT INTO product_slots VALUES(8,181); +INSERT INTO product_slots VALUES(8,182); +INSERT INTO product_slots VALUES(8,183); +INSERT INTO product_slots VALUES(8,184); +INSERT INTO product_slots VALUES(8,185); +INSERT INTO product_slots VALUES(8,186); +INSERT INTO product_slots VALUES(8,187); +INSERT INTO product_slots VALUES(8,188); +INSERT INTO product_slots VALUES(8,189); +INSERT INTO product_slots VALUES(8,190); +INSERT INTO product_slots VALUES(8,191); +INSERT INTO product_slots VALUES(8,192); +INSERT INTO product_slots VALUES(8,193); +INSERT INTO product_slots VALUES(8,194); +INSERT INTO product_slots VALUES(8,195); +INSERT INTO product_slots VALUES(8,196); +INSERT INTO product_slots VALUES(8,197); +INSERT INTO product_slots VALUES(8,198); +INSERT INTO product_slots VALUES(8,199); +INSERT INTO product_slots VALUES(8,200); +INSERT INTO product_slots VALUES(8,201); +INSERT INTO product_slots VALUES(8,202); +INSERT INTO product_slots VALUES(8,203); +INSERT INTO product_slots VALUES(8,204); +INSERT INTO product_slots VALUES(8,205); +INSERT INTO product_slots VALUES(8,206); +INSERT INTO product_slots VALUES(8,207); +INSERT INTO product_slots VALUES(8,208); +INSERT INTO product_slots VALUES(8,209); +INSERT INTO product_slots VALUES(8,210); +INSERT INTO product_slots VALUES(8,211); +INSERT INTO product_slots VALUES(8,212); +INSERT INTO product_slots VALUES(8,213); +INSERT INTO product_slots VALUES(8,214); +INSERT INTO product_slots VALUES(8,215); +INSERT INTO product_slots VALUES(8,216); +INSERT INTO product_slots VALUES(8,217); +INSERT INTO product_slots VALUES(8,218); +INSERT INTO product_slots VALUES(8,219); +INSERT INTO product_slots VALUES(8,220); +INSERT INTO product_slots VALUES(8,221); +INSERT INTO product_slots VALUES(8,222); +INSERT INTO product_slots VALUES(8,223); +INSERT INTO product_slots VALUES(8,224); +INSERT INTO product_slots VALUES(8,225); +INSERT INTO product_slots VALUES(8,226); +INSERT INTO product_slots VALUES(8,227); +INSERT INTO product_slots VALUES(8,228); +INSERT INTO product_slots VALUES(8,229); +INSERT INTO product_slots VALUES(8,230); +INSERT INTO product_slots VALUES(8,231); +INSERT INTO product_slots VALUES(8,232); +INSERT INTO product_slots VALUES(8,233); +INSERT INTO product_slots VALUES(8,234); +INSERT INTO product_slots VALUES(8,235); +INSERT INTO product_slots VALUES(8,236); +INSERT INTO product_slots VALUES(8,237); +INSERT INTO product_slots VALUES(8,238); +INSERT INTO product_slots VALUES(8,239); +INSERT INTO product_slots VALUES(8,240); +INSERT INTO product_slots VALUES(8,241); +INSERT INTO product_slots VALUES(8,242); +INSERT INTO product_slots VALUES(8,243); +INSERT INTO product_slots VALUES(8,244); +INSERT INTO product_slots VALUES(8,274); +INSERT INTO product_slots VALUES(8,275); +INSERT INTO product_slots VALUES(8,279); +INSERT INTO product_slots VALUES(8,280); +INSERT INTO product_slots VALUES(8,281); +INSERT INTO product_slots VALUES(8,282); +INSERT INTO product_slots VALUES(8,283); +INSERT INTO product_slots VALUES(8,284); +INSERT INTO product_slots VALUES(8,285); +INSERT INTO product_slots VALUES(8,286); +INSERT INTO product_slots VALUES(8,287); +INSERT INTO product_slots VALUES(9,1); +INSERT INTO product_slots VALUES(9,2); +INSERT INTO product_slots VALUES(9,3); +INSERT INTO product_slots VALUES(9,4); +INSERT INTO product_slots VALUES(9,5); +INSERT INTO product_slots VALUES(9,6); +INSERT INTO product_slots VALUES(9,7); +INSERT INTO product_slots VALUES(9,12); +INSERT INTO product_slots VALUES(9,18); +INSERT INTO product_slots VALUES(9,19); +INSERT INTO product_slots VALUES(9,20); +INSERT INTO product_slots VALUES(9,21); +INSERT INTO product_slots VALUES(9,22); +INSERT INTO product_slots VALUES(9,33); +INSERT INTO product_slots VALUES(9,35); +INSERT INTO product_slots VALUES(9,37); +INSERT INTO product_slots VALUES(9,38); +INSERT INTO product_slots VALUES(9,39); +INSERT INTO product_slots VALUES(9,40); +INSERT INTO product_slots VALUES(9,43); +INSERT INTO product_slots VALUES(9,45); +INSERT INTO product_slots VALUES(9,48); +INSERT INTO product_slots VALUES(9,49); +INSERT INTO product_slots VALUES(9,51); +INSERT INTO product_slots VALUES(9,52); +INSERT INTO product_slots VALUES(9,57); +INSERT INTO product_slots VALUES(9,58); +INSERT INTO product_slots VALUES(9,59); +INSERT INTO product_slots VALUES(9,62); +INSERT INTO product_slots VALUES(9,63); +INSERT INTO product_slots VALUES(9,64); +INSERT INTO product_slots VALUES(9,65); +INSERT INTO product_slots VALUES(9,66); +INSERT INTO product_slots VALUES(9,67); +INSERT INTO product_slots VALUES(9,69); +INSERT INTO product_slots VALUES(9,70); +INSERT INTO product_slots VALUES(9,71); +INSERT INTO product_slots VALUES(9,72); +INSERT INTO product_slots VALUES(9,73); +INSERT INTO product_slots VALUES(9,75); +INSERT INTO product_slots VALUES(9,82); +INSERT INTO product_slots VALUES(9,83); +INSERT INTO product_slots VALUES(9,84); +INSERT INTO product_slots VALUES(9,90); +INSERT INTO product_slots VALUES(9,91); +INSERT INTO product_slots VALUES(9,92); +INSERT INTO product_slots VALUES(9,93); +INSERT INTO product_slots VALUES(9,94); +INSERT INTO product_slots VALUES(9,97); +INSERT INTO product_slots VALUES(9,98); +INSERT INTO product_slots VALUES(9,99); +INSERT INTO product_slots VALUES(9,100); +INSERT INTO product_slots VALUES(9,102); +INSERT INTO product_slots VALUES(9,103); +INSERT INTO product_slots VALUES(9,104); +INSERT INTO product_slots VALUES(9,110); +INSERT INTO product_slots VALUES(9,111); +INSERT INTO product_slots VALUES(9,112); +INSERT INTO product_slots VALUES(9,116); +INSERT INTO product_slots VALUES(9,117); +INSERT INTO product_slots VALUES(9,118); +INSERT INTO product_slots VALUES(9,119); +INSERT INTO product_slots VALUES(9,120); +INSERT INTO product_slots VALUES(9,121); +INSERT INTO product_slots VALUES(9,122); +INSERT INTO product_slots VALUES(9,123); +INSERT INTO product_slots VALUES(9,124); +INSERT INTO product_slots VALUES(9,125); +INSERT INTO product_slots VALUES(9,126); +INSERT INTO product_slots VALUES(9,127); +INSERT INTO product_slots VALUES(9,128); +INSERT INTO product_slots VALUES(9,129); +INSERT INTO product_slots VALUES(9,130); +INSERT INTO product_slots VALUES(9,131); +INSERT INTO product_slots VALUES(9,132); +INSERT INTO product_slots VALUES(9,133); +INSERT INTO product_slots VALUES(9,134); +INSERT INTO product_slots VALUES(9,135); +INSERT INTO product_slots VALUES(9,136); +INSERT INTO product_slots VALUES(9,137); +INSERT INTO product_slots VALUES(9,138); +INSERT INTO product_slots VALUES(9,139); +INSERT INTO product_slots VALUES(9,140); +INSERT INTO product_slots VALUES(9,141); +INSERT INTO product_slots VALUES(9,142); +INSERT INTO product_slots VALUES(9,143); +INSERT INTO product_slots VALUES(9,144); +INSERT INTO product_slots VALUES(9,145); +INSERT INTO product_slots VALUES(9,146); +INSERT INTO product_slots VALUES(9,147); +INSERT INTO product_slots VALUES(9,148); +INSERT INTO product_slots VALUES(9,149); +INSERT INTO product_slots VALUES(9,150); +INSERT INTO product_slots VALUES(9,151); +INSERT INTO product_slots VALUES(9,152); +INSERT INTO product_slots VALUES(9,153); +INSERT INTO product_slots VALUES(9,154); +INSERT INTO product_slots VALUES(9,155); +INSERT INTO product_slots VALUES(9,156); +INSERT INTO product_slots VALUES(9,157); +INSERT INTO product_slots VALUES(9,158); +INSERT INTO product_slots VALUES(9,159); +INSERT INTO product_slots VALUES(9,160); +INSERT INTO product_slots VALUES(9,161); +INSERT INTO product_slots VALUES(9,162); +INSERT INTO product_slots VALUES(9,163); +INSERT INTO product_slots VALUES(9,164); +INSERT INTO product_slots VALUES(9,165); +INSERT INTO product_slots VALUES(9,166); +INSERT INTO product_slots VALUES(9,167); +INSERT INTO product_slots VALUES(9,168); +INSERT INTO product_slots VALUES(9,169); +INSERT INTO product_slots VALUES(9,170); +INSERT INTO product_slots VALUES(9,171); +INSERT INTO product_slots VALUES(9,172); +INSERT INTO product_slots VALUES(9,173); +INSERT INTO product_slots VALUES(9,174); +INSERT INTO product_slots VALUES(9,175); +INSERT INTO product_slots VALUES(9,176); +INSERT INTO product_slots VALUES(9,177); +INSERT INTO product_slots VALUES(9,178); +INSERT INTO product_slots VALUES(9,179); +INSERT INTO product_slots VALUES(9,180); +INSERT INTO product_slots VALUES(9,181); +INSERT INTO product_slots VALUES(9,182); +INSERT INTO product_slots VALUES(9,183); +INSERT INTO product_slots VALUES(9,184); +INSERT INTO product_slots VALUES(9,185); +INSERT INTO product_slots VALUES(9,186); +INSERT INTO product_slots VALUES(9,187); +INSERT INTO product_slots VALUES(9,188); +INSERT INTO product_slots VALUES(9,189); +INSERT INTO product_slots VALUES(9,190); +INSERT INTO product_slots VALUES(9,191); +INSERT INTO product_slots VALUES(9,192); +INSERT INTO product_slots VALUES(9,193); +INSERT INTO product_slots VALUES(9,194); +INSERT INTO product_slots VALUES(9,195); +INSERT INTO product_slots VALUES(9,196); +INSERT INTO product_slots VALUES(9,197); +INSERT INTO product_slots VALUES(9,198); +INSERT INTO product_slots VALUES(9,199); +INSERT INTO product_slots VALUES(9,200); +INSERT INTO product_slots VALUES(9,201); +INSERT INTO product_slots VALUES(9,202); +INSERT INTO product_slots VALUES(9,203); +INSERT INTO product_slots VALUES(9,204); +INSERT INTO product_slots VALUES(9,205); +INSERT INTO product_slots VALUES(9,206); +INSERT INTO product_slots VALUES(9,207); +INSERT INTO product_slots VALUES(9,208); +INSERT INTO product_slots VALUES(9,209); +INSERT INTO product_slots VALUES(9,210); +INSERT INTO product_slots VALUES(9,211); +INSERT INTO product_slots VALUES(9,212); +INSERT INTO product_slots VALUES(9,213); +INSERT INTO product_slots VALUES(9,214); +INSERT INTO product_slots VALUES(9,215); +INSERT INTO product_slots VALUES(9,216); +INSERT INTO product_slots VALUES(9,217); +INSERT INTO product_slots VALUES(9,218); +INSERT INTO product_slots VALUES(9,219); +INSERT INTO product_slots VALUES(9,220); +INSERT INTO product_slots VALUES(9,221); +INSERT INTO product_slots VALUES(9,222); +INSERT INTO product_slots VALUES(9,223); +INSERT INTO product_slots VALUES(9,224); +INSERT INTO product_slots VALUES(9,225); +INSERT INTO product_slots VALUES(9,226); +INSERT INTO product_slots VALUES(9,227); +INSERT INTO product_slots VALUES(9,228); +INSERT INTO product_slots VALUES(9,229); +INSERT INTO product_slots VALUES(9,230); +INSERT INTO product_slots VALUES(9,231); +INSERT INTO product_slots VALUES(9,232); +INSERT INTO product_slots VALUES(9,233); +INSERT INTO product_slots VALUES(9,234); +INSERT INTO product_slots VALUES(9,235); +INSERT INTO product_slots VALUES(9,236); +INSERT INTO product_slots VALUES(9,237); +INSERT INTO product_slots VALUES(9,238); +INSERT INTO product_slots VALUES(9,239); +INSERT INTO product_slots VALUES(9,240); +INSERT INTO product_slots VALUES(9,241); +INSERT INTO product_slots VALUES(9,242); +INSERT INTO product_slots VALUES(9,243); +INSERT INTO product_slots VALUES(9,244); +INSERT INTO product_slots VALUES(9,274); +INSERT INTO product_slots VALUES(9,275); +INSERT INTO product_slots VALUES(9,279); +INSERT INTO product_slots VALUES(9,280); +INSERT INTO product_slots VALUES(9,281); +INSERT INTO product_slots VALUES(9,282); +INSERT INTO product_slots VALUES(9,283); +INSERT INTO product_slots VALUES(9,284); +INSERT INTO product_slots VALUES(9,285); +INSERT INTO product_slots VALUES(9,286); +INSERT INTO product_slots VALUES(9,287); +INSERT INTO product_slots VALUES(10,1); +INSERT INTO product_slots VALUES(10,3); +INSERT INTO product_slots VALUES(10,4); +INSERT INTO product_slots VALUES(10,5); +INSERT INTO product_slots VALUES(10,6); +INSERT INTO product_slots VALUES(10,7); +INSERT INTO product_slots VALUES(10,12); +INSERT INTO product_slots VALUES(10,18); +INSERT INTO product_slots VALUES(10,19); +INSERT INTO product_slots VALUES(10,20); +INSERT INTO product_slots VALUES(10,21); +INSERT INTO product_slots VALUES(10,22); +INSERT INTO product_slots VALUES(10,23); +INSERT INTO product_slots VALUES(10,31); +INSERT INTO product_slots VALUES(10,33); +INSERT INTO product_slots VALUES(10,35); +INSERT INTO product_slots VALUES(10,37); +INSERT INTO product_slots VALUES(10,38); +INSERT INTO product_slots VALUES(10,39); +INSERT INTO product_slots VALUES(10,40); +INSERT INTO product_slots VALUES(10,41); +INSERT INTO product_slots VALUES(10,43); +INSERT INTO product_slots VALUES(10,45); +INSERT INTO product_slots VALUES(10,46); +INSERT INTO product_slots VALUES(10,47); +INSERT INTO product_slots VALUES(10,48); +INSERT INTO product_slots VALUES(10,49); +INSERT INTO product_slots VALUES(10,50); +INSERT INTO product_slots VALUES(10,51); +INSERT INTO product_slots VALUES(10,52); +INSERT INTO product_slots VALUES(10,53); +INSERT INTO product_slots VALUES(10,54); +INSERT INTO product_slots VALUES(10,55); +INSERT INTO product_slots VALUES(10,56); +INSERT INTO product_slots VALUES(10,57); +INSERT INTO product_slots VALUES(10,58); +INSERT INTO product_slots VALUES(10,59); +INSERT INTO product_slots VALUES(10,60); +INSERT INTO product_slots VALUES(10,61); +INSERT INTO product_slots VALUES(10,62); +INSERT INTO product_slots VALUES(10,63); +INSERT INTO product_slots VALUES(10,64); +INSERT INTO product_slots VALUES(10,65); +INSERT INTO product_slots VALUES(10,66); +INSERT INTO product_slots VALUES(10,67); +INSERT INTO product_slots VALUES(10,68); +INSERT INTO product_slots VALUES(10,69); +INSERT INTO product_slots VALUES(10,70); +INSERT INTO product_slots VALUES(10,71); +INSERT INTO product_slots VALUES(10,72); +INSERT INTO product_slots VALUES(10,73); +INSERT INTO product_slots VALUES(10,74); +INSERT INTO product_slots VALUES(10,75); +INSERT INTO product_slots VALUES(10,76); +INSERT INTO product_slots VALUES(10,77); +INSERT INTO product_slots VALUES(10,78); +INSERT INTO product_slots VALUES(10,79); +INSERT INTO product_slots VALUES(10,80); +INSERT INTO product_slots VALUES(10,81); +INSERT INTO product_slots VALUES(10,82); +INSERT INTO product_slots VALUES(10,83); +INSERT INTO product_slots VALUES(10,84); +INSERT INTO product_slots VALUES(10,85); +INSERT INTO product_slots VALUES(10,86); +INSERT INTO product_slots VALUES(10,87); +INSERT INTO product_slots VALUES(10,88); +INSERT INTO product_slots VALUES(10,89); +INSERT INTO product_slots VALUES(10,90); +INSERT INTO product_slots VALUES(10,91); +INSERT INTO product_slots VALUES(10,92); +INSERT INTO product_slots VALUES(10,93); +INSERT INTO product_slots VALUES(10,94); +INSERT INTO product_slots VALUES(10,95); +INSERT INTO product_slots VALUES(10,96); +INSERT INTO product_slots VALUES(10,97); +INSERT INTO product_slots VALUES(10,98); +INSERT INTO product_slots VALUES(10,99); +INSERT INTO product_slots VALUES(10,100); +INSERT INTO product_slots VALUES(10,101); +INSERT INTO product_slots VALUES(10,102); +INSERT INTO product_slots VALUES(10,103); +INSERT INTO product_slots VALUES(10,104); +INSERT INTO product_slots VALUES(10,105); +INSERT INTO product_slots VALUES(10,106); +INSERT INTO product_slots VALUES(10,107); +INSERT INTO product_slots VALUES(10,108); +INSERT INTO product_slots VALUES(10,109); +INSERT INTO product_slots VALUES(10,110); +INSERT INTO product_slots VALUES(10,111); +INSERT INTO product_slots VALUES(10,112); +INSERT INTO product_slots VALUES(10,113); +INSERT INTO product_slots VALUES(10,114); +INSERT INTO product_slots VALUES(10,115); +INSERT INTO product_slots VALUES(10,116); +INSERT INTO product_slots VALUES(10,117); +INSERT INTO product_slots VALUES(10,118); +INSERT INTO product_slots VALUES(10,119); +INSERT INTO product_slots VALUES(10,120); +INSERT INTO product_slots VALUES(10,121); +INSERT INTO product_slots VALUES(10,122); +INSERT INTO product_slots VALUES(10,123); +INSERT INTO product_slots VALUES(10,124); +INSERT INTO product_slots VALUES(10,125); +INSERT INTO product_slots VALUES(10,126); +INSERT INTO product_slots VALUES(10,127); +INSERT INTO product_slots VALUES(10,128); +INSERT INTO product_slots VALUES(10,129); +INSERT INTO product_slots VALUES(10,130); +INSERT INTO product_slots VALUES(10,131); +INSERT INTO product_slots VALUES(10,132); +INSERT INTO product_slots VALUES(10,133); +INSERT INTO product_slots VALUES(10,134); +INSERT INTO product_slots VALUES(10,135); +INSERT INTO product_slots VALUES(10,136); +INSERT INTO product_slots VALUES(10,137); +INSERT INTO product_slots VALUES(10,138); +INSERT INTO product_slots VALUES(10,139); +INSERT INTO product_slots VALUES(10,140); +INSERT INTO product_slots VALUES(10,141); +INSERT INTO product_slots VALUES(10,142); +INSERT INTO product_slots VALUES(10,143); +INSERT INTO product_slots VALUES(10,144); +INSERT INTO product_slots VALUES(10,145); +INSERT INTO product_slots VALUES(10,146); +INSERT INTO product_slots VALUES(10,147); +INSERT INTO product_slots VALUES(10,148); +INSERT INTO product_slots VALUES(10,149); +INSERT INTO product_slots VALUES(10,150); +INSERT INTO product_slots VALUES(10,151); +INSERT INTO product_slots VALUES(10,152); +INSERT INTO product_slots VALUES(10,153); +INSERT INTO product_slots VALUES(10,154); +INSERT INTO product_slots VALUES(10,155); +INSERT INTO product_slots VALUES(10,156); +INSERT INTO product_slots VALUES(10,157); +INSERT INTO product_slots VALUES(10,158); +INSERT INTO product_slots VALUES(10,159); +INSERT INTO product_slots VALUES(10,160); +INSERT INTO product_slots VALUES(10,161); +INSERT INTO product_slots VALUES(10,162); +INSERT INTO product_slots VALUES(10,163); +INSERT INTO product_slots VALUES(10,164); +INSERT INTO product_slots VALUES(10,165); +INSERT INTO product_slots VALUES(10,166); +INSERT INTO product_slots VALUES(10,167); +INSERT INTO product_slots VALUES(10,168); +INSERT INTO product_slots VALUES(10,169); +INSERT INTO product_slots VALUES(10,170); +INSERT INTO product_slots VALUES(10,171); +INSERT INTO product_slots VALUES(10,172); +INSERT INTO product_slots VALUES(10,173); +INSERT INTO product_slots VALUES(10,174); +INSERT INTO product_slots VALUES(10,175); +INSERT INTO product_slots VALUES(10,176); +INSERT INTO product_slots VALUES(10,177); +INSERT INTO product_slots VALUES(10,178); +INSERT INTO product_slots VALUES(10,179); +INSERT INTO product_slots VALUES(10,180); +INSERT INTO product_slots VALUES(10,181); +INSERT INTO product_slots VALUES(10,182); +INSERT INTO product_slots VALUES(10,183); +INSERT INTO product_slots VALUES(10,184); +INSERT INTO product_slots VALUES(10,185); +INSERT INTO product_slots VALUES(10,186); +INSERT INTO product_slots VALUES(10,187); +INSERT INTO product_slots VALUES(10,188); +INSERT INTO product_slots VALUES(10,189); +INSERT INTO product_slots VALUES(10,190); +INSERT INTO product_slots VALUES(10,191); +INSERT INTO product_slots VALUES(10,192); +INSERT INTO product_slots VALUES(10,193); +INSERT INTO product_slots VALUES(10,194); +INSERT INTO product_slots VALUES(10,195); +INSERT INTO product_slots VALUES(10,196); +INSERT INTO product_slots VALUES(10,197); +INSERT INTO product_slots VALUES(10,198); +INSERT INTO product_slots VALUES(10,199); +INSERT INTO product_slots VALUES(10,200); +INSERT INTO product_slots VALUES(10,201); +INSERT INTO product_slots VALUES(10,202); +INSERT INTO product_slots VALUES(10,203); +INSERT INTO product_slots VALUES(10,204); +INSERT INTO product_slots VALUES(10,205); +INSERT INTO product_slots VALUES(10,206); +INSERT INTO product_slots VALUES(10,207); +INSERT INTO product_slots VALUES(10,208); +INSERT INTO product_slots VALUES(10,209); +INSERT INTO product_slots VALUES(10,210); +INSERT INTO product_slots VALUES(10,211); +INSERT INTO product_slots VALUES(10,212); +INSERT INTO product_slots VALUES(10,213); +INSERT INTO product_slots VALUES(10,214); +INSERT INTO product_slots VALUES(10,215); +INSERT INTO product_slots VALUES(10,216); +INSERT INTO product_slots VALUES(10,217); +INSERT INTO product_slots VALUES(10,218); +INSERT INTO product_slots VALUES(10,219); +INSERT INTO product_slots VALUES(10,220); +INSERT INTO product_slots VALUES(10,221); +INSERT INTO product_slots VALUES(10,222); +INSERT INTO product_slots VALUES(10,223); +INSERT INTO product_slots VALUES(10,224); +INSERT INTO product_slots VALUES(10,225); +INSERT INTO product_slots VALUES(10,226); +INSERT INTO product_slots VALUES(10,227); +INSERT INTO product_slots VALUES(10,228); +INSERT INTO product_slots VALUES(10,229); +INSERT INTO product_slots VALUES(10,230); +INSERT INTO product_slots VALUES(10,231); +INSERT INTO product_slots VALUES(10,232); +INSERT INTO product_slots VALUES(10,234); +INSERT INTO product_slots VALUES(10,235); +INSERT INTO product_slots VALUES(10,236); +INSERT INTO product_slots VALUES(10,237); +INSERT INTO product_slots VALUES(10,238); +INSERT INTO product_slots VALUES(10,239); +INSERT INTO product_slots VALUES(10,240); +INSERT INTO product_slots VALUES(10,241); +INSERT INTO product_slots VALUES(10,242); +INSERT INTO product_slots VALUES(10,243); +INSERT INTO product_slots VALUES(10,244); +INSERT INTO product_slots VALUES(10,274); +INSERT INTO product_slots VALUES(10,275); +INSERT INTO product_slots VALUES(10,279); +INSERT INTO product_slots VALUES(10,280); +INSERT INTO product_slots VALUES(10,281); +INSERT INTO product_slots VALUES(10,282); +INSERT INTO product_slots VALUES(11,1); +INSERT INTO product_slots VALUES(11,3); +INSERT INTO product_slots VALUES(11,4); +INSERT INTO product_slots VALUES(11,5); +INSERT INTO product_slots VALUES(11,6); +INSERT INTO product_slots VALUES(11,7); +INSERT INTO product_slots VALUES(11,8); +INSERT INTO product_slots VALUES(11,9); +INSERT INTO product_slots VALUES(11,12); +INSERT INTO product_slots VALUES(11,16); +INSERT INTO product_slots VALUES(11,18); +INSERT INTO product_slots VALUES(11,20); +INSERT INTO product_slots VALUES(11,21); +INSERT INTO product_slots VALUES(11,22); +INSERT INTO product_slots VALUES(11,33); +INSERT INTO product_slots VALUES(11,35); +INSERT INTO product_slots VALUES(11,37); +INSERT INTO product_slots VALUES(11,38); +INSERT INTO product_slots VALUES(11,40); +INSERT INTO product_slots VALUES(11,59); +INSERT INTO product_slots VALUES(11,62); +INSERT INTO product_slots VALUES(11,63); +INSERT INTO product_slots VALUES(11,64); +INSERT INTO product_slots VALUES(11,65); +INSERT INTO product_slots VALUES(11,66); +INSERT INTO product_slots VALUES(11,67); +INSERT INTO product_slots VALUES(11,68); +INSERT INTO product_slots VALUES(11,69); +INSERT INTO product_slots VALUES(11,70); +INSERT INTO product_slots VALUES(11,71); +INSERT INTO product_slots VALUES(11,72); +INSERT INTO product_slots VALUES(11,73); +INSERT INTO product_slots VALUES(11,74); +INSERT INTO product_slots VALUES(11,75); +INSERT INTO product_slots VALUES(11,76); +INSERT INTO product_slots VALUES(11,77); +INSERT INTO product_slots VALUES(11,78); +INSERT INTO product_slots VALUES(11,79); +INSERT INTO product_slots VALUES(11,80); +INSERT INTO product_slots VALUES(11,81); +INSERT INTO product_slots VALUES(11,82); +INSERT INTO product_slots VALUES(11,83); +INSERT INTO product_slots VALUES(11,84); +INSERT INTO product_slots VALUES(11,85); +INSERT INTO product_slots VALUES(11,86); +INSERT INTO product_slots VALUES(11,87); +INSERT INTO product_slots VALUES(11,88); +INSERT INTO product_slots VALUES(11,89); +INSERT INTO product_slots VALUES(11,90); +INSERT INTO product_slots VALUES(11,91); +INSERT INTO product_slots VALUES(11,92); +INSERT INTO product_slots VALUES(11,93); +INSERT INTO product_slots VALUES(11,94); +INSERT INTO product_slots VALUES(11,95); +INSERT INTO product_slots VALUES(11,96); +INSERT INTO product_slots VALUES(11,97); +INSERT INTO product_slots VALUES(11,98); +INSERT INTO product_slots VALUES(11,99); +INSERT INTO product_slots VALUES(11,100); +INSERT INTO product_slots VALUES(11,102); +INSERT INTO product_slots VALUES(11,103); +INSERT INTO product_slots VALUES(11,104); +INSERT INTO product_slots VALUES(11,105); +INSERT INTO product_slots VALUES(11,106); +INSERT INTO product_slots VALUES(11,107); +INSERT INTO product_slots VALUES(11,108); +INSERT INTO product_slots VALUES(11,109); +INSERT INTO product_slots VALUES(11,110); +INSERT INTO product_slots VALUES(11,111); +INSERT INTO product_slots VALUES(11,112); +INSERT INTO product_slots VALUES(11,113); +INSERT INTO product_slots VALUES(11,114); +INSERT INTO product_slots VALUES(11,115); +INSERT INTO product_slots VALUES(11,117); +INSERT INTO product_slots VALUES(11,118); +INSERT INTO product_slots VALUES(11,119); +INSERT INTO product_slots VALUES(11,120); +INSERT INTO product_slots VALUES(11,121); +INSERT INTO product_slots VALUES(11,122); +INSERT INTO product_slots VALUES(11,123); +INSERT INTO product_slots VALUES(11,124); +INSERT INTO product_slots VALUES(11,125); +INSERT INTO product_slots VALUES(11,126); +INSERT INTO product_slots VALUES(11,127); +INSERT INTO product_slots VALUES(11,128); +INSERT INTO product_slots VALUES(11,129); +INSERT INTO product_slots VALUES(11,130); +INSERT INTO product_slots VALUES(11,131); +INSERT INTO product_slots VALUES(11,132); +INSERT INTO product_slots VALUES(11,133); +INSERT INTO product_slots VALUES(11,134); +INSERT INTO product_slots VALUES(11,135); +INSERT INTO product_slots VALUES(11,136); +INSERT INTO product_slots VALUES(11,138); +INSERT INTO product_slots VALUES(11,139); +INSERT INTO product_slots VALUES(11,140); +INSERT INTO product_slots VALUES(11,141); +INSERT INTO product_slots VALUES(11,142); +INSERT INTO product_slots VALUES(11,143); +INSERT INTO product_slots VALUES(11,145); +INSERT INTO product_slots VALUES(11,146); +INSERT INTO product_slots VALUES(11,147); +INSERT INTO product_slots VALUES(11,148); +INSERT INTO product_slots VALUES(11,149); +INSERT INTO product_slots VALUES(11,150); +INSERT INTO product_slots VALUES(11,151); +INSERT INTO product_slots VALUES(11,152); +INSERT INTO product_slots VALUES(11,153); +INSERT INTO product_slots VALUES(11,154); +INSERT INTO product_slots VALUES(11,155); +INSERT INTO product_slots VALUES(11,156); +INSERT INTO product_slots VALUES(11,157); +INSERT INTO product_slots VALUES(11,158); +INSERT INTO product_slots VALUES(11,159); +INSERT INTO product_slots VALUES(11,160); +INSERT INTO product_slots VALUES(11,161); +INSERT INTO product_slots VALUES(11,162); +INSERT INTO product_slots VALUES(11,163); +INSERT INTO product_slots VALUES(11,164); +INSERT INTO product_slots VALUES(11,165); +INSERT INTO product_slots VALUES(11,166); +INSERT INTO product_slots VALUES(11,167); +INSERT INTO product_slots VALUES(11,168); +INSERT INTO product_slots VALUES(11,169); +INSERT INTO product_slots VALUES(11,170); +INSERT INTO product_slots VALUES(11,171); +INSERT INTO product_slots VALUES(11,172); +INSERT INTO product_slots VALUES(11,173); +INSERT INTO product_slots VALUES(11,174); +INSERT INTO product_slots VALUES(11,175); +INSERT INTO product_slots VALUES(11,176); +INSERT INTO product_slots VALUES(11,177); +INSERT INTO product_slots VALUES(11,178); +INSERT INTO product_slots VALUES(11,179); +INSERT INTO product_slots VALUES(11,180); +INSERT INTO product_slots VALUES(11,181); +INSERT INTO product_slots VALUES(11,182); +INSERT INTO product_slots VALUES(11,183); +INSERT INTO product_slots VALUES(11,184); +INSERT INTO product_slots VALUES(11,185); +INSERT INTO product_slots VALUES(11,186); +INSERT INTO product_slots VALUES(11,187); +INSERT INTO product_slots VALUES(11,188); +INSERT INTO product_slots VALUES(11,189); +INSERT INTO product_slots VALUES(11,190); +INSERT INTO product_slots VALUES(11,191); +INSERT INTO product_slots VALUES(11,192); +INSERT INTO product_slots VALUES(11,193); +INSERT INTO product_slots VALUES(11,194); +INSERT INTO product_slots VALUES(11,195); +INSERT INTO product_slots VALUES(11,196); +INSERT INTO product_slots VALUES(11,197); +INSERT INTO product_slots VALUES(11,198); +INSERT INTO product_slots VALUES(11,199); +INSERT INTO product_slots VALUES(11,200); +INSERT INTO product_slots VALUES(11,201); +INSERT INTO product_slots VALUES(11,202); +INSERT INTO product_slots VALUES(11,203); +INSERT INTO product_slots VALUES(11,204); +INSERT INTO product_slots VALUES(11,205); +INSERT INTO product_slots VALUES(11,206); +INSERT INTO product_slots VALUES(11,207); +INSERT INTO product_slots VALUES(11,208); +INSERT INTO product_slots VALUES(11,209); +INSERT INTO product_slots VALUES(11,210); +INSERT INTO product_slots VALUES(11,211); +INSERT INTO product_slots VALUES(11,212); +INSERT INTO product_slots VALUES(11,213); +INSERT INTO product_slots VALUES(11,214); +INSERT INTO product_slots VALUES(11,215); +INSERT INTO product_slots VALUES(11,216); +INSERT INTO product_slots VALUES(11,217); +INSERT INTO product_slots VALUES(11,218); +INSERT INTO product_slots VALUES(11,219); +INSERT INTO product_slots VALUES(11,220); +INSERT INTO product_slots VALUES(11,221); +INSERT INTO product_slots VALUES(11,222); +INSERT INTO product_slots VALUES(11,223); +INSERT INTO product_slots VALUES(11,224); +INSERT INTO product_slots VALUES(11,225); +INSERT INTO product_slots VALUES(11,226); +INSERT INTO product_slots VALUES(11,227); +INSERT INTO product_slots VALUES(11,228); +INSERT INTO product_slots VALUES(11,229); +INSERT INTO product_slots VALUES(11,230); +INSERT INTO product_slots VALUES(11,231); +INSERT INTO product_slots VALUES(11,232); +INSERT INTO product_slots VALUES(11,233); +INSERT INTO product_slots VALUES(11,234); +INSERT INTO product_slots VALUES(11,235); +INSERT INTO product_slots VALUES(11,236); +INSERT INTO product_slots VALUES(11,237); +INSERT INTO product_slots VALUES(11,238); +INSERT INTO product_slots VALUES(11,239); +INSERT INTO product_slots VALUES(11,240); +INSERT INTO product_slots VALUES(11,241); +INSERT INTO product_slots VALUES(11,242); +INSERT INTO product_slots VALUES(11,243); +INSERT INTO product_slots VALUES(11,244); +INSERT INTO product_slots VALUES(11,274); +INSERT INTO product_slots VALUES(11,275); +INSERT INTO product_slots VALUES(11,279); +INSERT INTO product_slots VALUES(11,280); +INSERT INTO product_slots VALUES(11,281); +INSERT INTO product_slots VALUES(11,282); +INSERT INTO product_slots VALUES(11,283); +INSERT INTO product_slots VALUES(11,284); +INSERT INTO product_slots VALUES(11,285); +INSERT INTO product_slots VALUES(11,286); +INSERT INTO product_slots VALUES(11,287); +INSERT INTO product_slots VALUES(12,5); +INSERT INTO product_slots VALUES(12,6); +INSERT INTO product_slots VALUES(12,7); +INSERT INTO product_slots VALUES(12,9); +INSERT INTO product_slots VALUES(12,16); +INSERT INTO product_slots VALUES(12,18); +INSERT INTO product_slots VALUES(12,20); +INSERT INTO product_slots VALUES(12,21); +INSERT INTO product_slots VALUES(12,22); +INSERT INTO product_slots VALUES(12,33); +INSERT INTO product_slots VALUES(12,35); +INSERT INTO product_slots VALUES(12,37); +INSERT INTO product_slots VALUES(12,38); +INSERT INTO product_slots VALUES(12,40); +INSERT INTO product_slots VALUES(13,5); +INSERT INTO product_slots VALUES(13,6); +INSERT INTO product_slots VALUES(13,7); +INSERT INTO product_slots VALUES(13,15); +INSERT INTO product_slots VALUES(13,16); +INSERT INTO product_slots VALUES(13,17); +INSERT INTO product_slots VALUES(13,18); +INSERT INTO product_slots VALUES(13,20); +INSERT INTO product_slots VALUES(13,21); +INSERT INTO product_slots VALUES(13,22); +INSERT INTO product_slots VALUES(13,33); +INSERT INTO product_slots VALUES(13,35); +INSERT INTO product_slots VALUES(13,37); +INSERT INTO product_slots VALUES(13,38); +INSERT INTO product_slots VALUES(13,39); +INSERT INTO product_slots VALUES(13,40); +INSERT INTO product_slots VALUES(13,43); +INSERT INTO product_slots VALUES(13,44); +INSERT INTO product_slots VALUES(13,45); +INSERT INTO product_slots VALUES(13,46); +INSERT INTO product_slots VALUES(13,47); +INSERT INTO product_slots VALUES(13,48); +INSERT INTO product_slots VALUES(13,49); +INSERT INTO product_slots VALUES(13,50); +INSERT INTO product_slots VALUES(13,51); +INSERT INTO product_slots VALUES(13,52); +INSERT INTO product_slots VALUES(13,53); +INSERT INTO product_slots VALUES(13,54); +INSERT INTO product_slots VALUES(13,55); +INSERT INTO product_slots VALUES(13,56); +INSERT INTO product_slots VALUES(13,57); +INSERT INTO product_slots VALUES(13,58); +INSERT INTO product_slots VALUES(13,59); +INSERT INTO product_slots VALUES(13,60); +INSERT INTO product_slots VALUES(13,61); +INSERT INTO product_slots VALUES(13,62); +INSERT INTO product_slots VALUES(13,63); +INSERT INTO product_slots VALUES(13,64); +INSERT INTO product_slots VALUES(13,65); +INSERT INTO product_slots VALUES(13,66); +INSERT INTO product_slots VALUES(13,67); +INSERT INTO product_slots VALUES(13,68); +INSERT INTO product_slots VALUES(13,69); +INSERT INTO product_slots VALUES(13,70); +INSERT INTO product_slots VALUES(13,71); +INSERT INTO product_slots VALUES(13,72); +INSERT INTO product_slots VALUES(13,73); +INSERT INTO product_slots VALUES(13,74); +INSERT INTO product_slots VALUES(13,75); +INSERT INTO product_slots VALUES(13,76); +INSERT INTO product_slots VALUES(13,77); +INSERT INTO product_slots VALUES(13,78); +INSERT INTO product_slots VALUES(13,79); +INSERT INTO product_slots VALUES(13,80); +INSERT INTO product_slots VALUES(13,81); +INSERT INTO product_slots VALUES(13,82); +INSERT INTO product_slots VALUES(13,83); +INSERT INTO product_slots VALUES(13,84); +INSERT INTO product_slots VALUES(13,85); +INSERT INTO product_slots VALUES(13,86); +INSERT INTO product_slots VALUES(13,87); +INSERT INTO product_slots VALUES(13,88); +INSERT INTO product_slots VALUES(13,89); +INSERT INTO product_slots VALUES(13,90); +INSERT INTO product_slots VALUES(13,91); +INSERT INTO product_slots VALUES(13,92); +INSERT INTO product_slots VALUES(13,93); +INSERT INTO product_slots VALUES(13,94); +INSERT INTO product_slots VALUES(13,95); +INSERT INTO product_slots VALUES(13,96); +INSERT INTO product_slots VALUES(13,97); +INSERT INTO product_slots VALUES(13,98); +INSERT INTO product_slots VALUES(13,99); +INSERT INTO product_slots VALUES(13,100); +INSERT INTO product_slots VALUES(13,102); +INSERT INTO product_slots VALUES(13,103); +INSERT INTO product_slots VALUES(13,104); +INSERT INTO product_slots VALUES(13,105); +INSERT INTO product_slots VALUES(13,106); +INSERT INTO product_slots VALUES(13,107); +INSERT INTO product_slots VALUES(13,108); +INSERT INTO product_slots VALUES(13,109); +INSERT INTO product_slots VALUES(13,110); +INSERT INTO product_slots VALUES(13,111); +INSERT INTO product_slots VALUES(13,112); +INSERT INTO product_slots VALUES(13,113); +INSERT INTO product_slots VALUES(13,114); +INSERT INTO product_slots VALUES(13,115); +INSERT INTO product_slots VALUES(13,117); +INSERT INTO product_slots VALUES(13,118); +INSERT INTO product_slots VALUES(13,119); +INSERT INTO product_slots VALUES(13,120); +INSERT INTO product_slots VALUES(13,121); +INSERT INTO product_slots VALUES(13,122); +INSERT INTO product_slots VALUES(13,123); +INSERT INTO product_slots VALUES(13,124); +INSERT INTO product_slots VALUES(13,125); +INSERT INTO product_slots VALUES(13,126); +INSERT INTO product_slots VALUES(13,127); +INSERT INTO product_slots VALUES(13,128); +INSERT INTO product_slots VALUES(13,129); +INSERT INTO product_slots VALUES(13,130); +INSERT INTO product_slots VALUES(13,131); +INSERT INTO product_slots VALUES(13,132); +INSERT INTO product_slots VALUES(13,133); +INSERT INTO product_slots VALUES(13,134); +INSERT INTO product_slots VALUES(13,135); +INSERT INTO product_slots VALUES(13,136); +INSERT INTO product_slots VALUES(13,138); +INSERT INTO product_slots VALUES(13,139); +INSERT INTO product_slots VALUES(13,140); +INSERT INTO product_slots VALUES(13,141); +INSERT INTO product_slots VALUES(13,142); +INSERT INTO product_slots VALUES(13,143); +INSERT INTO product_slots VALUES(13,145); +INSERT INTO product_slots VALUES(13,146); +INSERT INTO product_slots VALUES(13,147); +INSERT INTO product_slots VALUES(13,148); +INSERT INTO product_slots VALUES(13,149); +INSERT INTO product_slots VALUES(13,150); +INSERT INTO product_slots VALUES(13,151); +INSERT INTO product_slots VALUES(13,152); +INSERT INTO product_slots VALUES(13,153); +INSERT INTO product_slots VALUES(13,154); +INSERT INTO product_slots VALUES(13,155); +INSERT INTO product_slots VALUES(13,156); +INSERT INTO product_slots VALUES(13,157); +INSERT INTO product_slots VALUES(13,158); +INSERT INTO product_slots VALUES(13,159); +INSERT INTO product_slots VALUES(13,160); +INSERT INTO product_slots VALUES(13,161); +INSERT INTO product_slots VALUES(13,162); +INSERT INTO product_slots VALUES(13,163); +INSERT INTO product_slots VALUES(13,164); +INSERT INTO product_slots VALUES(13,165); +INSERT INTO product_slots VALUES(13,166); +INSERT INTO product_slots VALUES(13,167); +INSERT INTO product_slots VALUES(13,168); +INSERT INTO product_slots VALUES(13,169); +INSERT INTO product_slots VALUES(13,170); +INSERT INTO product_slots VALUES(13,171); +INSERT INTO product_slots VALUES(13,172); +INSERT INTO product_slots VALUES(13,173); +INSERT INTO product_slots VALUES(13,174); +INSERT INTO product_slots VALUES(13,175); +INSERT INTO product_slots VALUES(13,176); +INSERT INTO product_slots VALUES(13,177); +INSERT INTO product_slots VALUES(13,178); +INSERT INTO product_slots VALUES(13,179); +INSERT INTO product_slots VALUES(13,180); +INSERT INTO product_slots VALUES(13,181); +INSERT INTO product_slots VALUES(13,182); +INSERT INTO product_slots VALUES(13,183); +INSERT INTO product_slots VALUES(13,184); +INSERT INTO product_slots VALUES(13,185); +INSERT INTO product_slots VALUES(13,186); +INSERT INTO product_slots VALUES(13,187); +INSERT INTO product_slots VALUES(13,188); +INSERT INTO product_slots VALUES(13,189); +INSERT INTO product_slots VALUES(13,190); +INSERT INTO product_slots VALUES(13,191); +INSERT INTO product_slots VALUES(13,192); +INSERT INTO product_slots VALUES(13,193); +INSERT INTO product_slots VALUES(13,194); +INSERT INTO product_slots VALUES(13,195); +INSERT INTO product_slots VALUES(13,196); +INSERT INTO product_slots VALUES(13,197); +INSERT INTO product_slots VALUES(13,198); +INSERT INTO product_slots VALUES(13,199); +INSERT INTO product_slots VALUES(13,200); +INSERT INTO product_slots VALUES(13,201); +INSERT INTO product_slots VALUES(13,202); +INSERT INTO product_slots VALUES(13,203); +INSERT INTO product_slots VALUES(13,204); +INSERT INTO product_slots VALUES(13,205); +INSERT INTO product_slots VALUES(13,206); +INSERT INTO product_slots VALUES(13,207); +INSERT INTO product_slots VALUES(13,208); +INSERT INTO product_slots VALUES(13,209); +INSERT INTO product_slots VALUES(13,210); +INSERT INTO product_slots VALUES(13,211); +INSERT INTO product_slots VALUES(13,212); +INSERT INTO product_slots VALUES(13,213); +INSERT INTO product_slots VALUES(13,214); +INSERT INTO product_slots VALUES(13,215); +INSERT INTO product_slots VALUES(13,216); +INSERT INTO product_slots VALUES(13,217); +INSERT INTO product_slots VALUES(13,218); +INSERT INTO product_slots VALUES(13,219); +INSERT INTO product_slots VALUES(13,220); +INSERT INTO product_slots VALUES(13,221); +INSERT INTO product_slots VALUES(13,222); +INSERT INTO product_slots VALUES(13,223); +INSERT INTO product_slots VALUES(13,224); +INSERT INTO product_slots VALUES(13,225); +INSERT INTO product_slots VALUES(13,226); +INSERT INTO product_slots VALUES(13,227); +INSERT INTO product_slots VALUES(13,228); +INSERT INTO product_slots VALUES(13,229); +INSERT INTO product_slots VALUES(13,230); +INSERT INTO product_slots VALUES(13,231); +INSERT INTO product_slots VALUES(13,232); +INSERT INTO product_slots VALUES(13,233); +INSERT INTO product_slots VALUES(13,234); +INSERT INTO product_slots VALUES(13,235); +INSERT INTO product_slots VALUES(13,236); +INSERT INTO product_slots VALUES(13,237); +INSERT INTO product_slots VALUES(13,238); +INSERT INTO product_slots VALUES(13,239); +INSERT INTO product_slots VALUES(13,240); +INSERT INTO product_slots VALUES(13,241); +INSERT INTO product_slots VALUES(13,242); +INSERT INTO product_slots VALUES(13,243); +INSERT INTO product_slots VALUES(13,244); +INSERT INTO product_slots VALUES(13,274); +INSERT INTO product_slots VALUES(13,275); +INSERT INTO product_slots VALUES(13,279); +INSERT INTO product_slots VALUES(13,280); +INSERT INTO product_slots VALUES(13,281); +INSERT INTO product_slots VALUES(13,282); +INSERT INTO product_slots VALUES(13,283); +INSERT INTO product_slots VALUES(13,284); +INSERT INTO product_slots VALUES(13,285); +INSERT INTO product_slots VALUES(13,286); +INSERT INTO product_slots VALUES(13,287); +INSERT INTO product_slots VALUES(14,5); +INSERT INTO product_slots VALUES(14,6); +INSERT INTO product_slots VALUES(14,7); +INSERT INTO product_slots VALUES(14,12); +INSERT INTO product_slots VALUES(14,18); +INSERT INTO product_slots VALUES(14,20); +INSERT INTO product_slots VALUES(14,21); +INSERT INTO product_slots VALUES(14,22); +INSERT INTO product_slots VALUES(14,33); +INSERT INTO product_slots VALUES(14,35); +INSERT INTO product_slots VALUES(14,37); +INSERT INTO product_slots VALUES(14,38); +INSERT INTO product_slots VALUES(14,39); +INSERT INTO product_slots VALUES(14,40); +INSERT INTO product_slots VALUES(14,41); +INSERT INTO product_slots VALUES(14,43); +INSERT INTO product_slots VALUES(14,45); +INSERT INTO product_slots VALUES(14,46); +INSERT INTO product_slots VALUES(14,47); +INSERT INTO product_slots VALUES(14,48); +INSERT INTO product_slots VALUES(14,49); +INSERT INTO product_slots VALUES(14,50); +INSERT INTO product_slots VALUES(14,51); +INSERT INTO product_slots VALUES(14,52); +INSERT INTO product_slots VALUES(14,53); +INSERT INTO product_slots VALUES(14,54); +INSERT INTO product_slots VALUES(14,55); +INSERT INTO product_slots VALUES(14,56); +INSERT INTO product_slots VALUES(14,57); +INSERT INTO product_slots VALUES(14,58); +INSERT INTO product_slots VALUES(14,59); +INSERT INTO product_slots VALUES(14,60); +INSERT INTO product_slots VALUES(14,61); +INSERT INTO product_slots VALUES(14,62); +INSERT INTO product_slots VALUES(14,63); +INSERT INTO product_slots VALUES(14,64); +INSERT INTO product_slots VALUES(14,65); +INSERT INTO product_slots VALUES(14,66); +INSERT INTO product_slots VALUES(14,67); +INSERT INTO product_slots VALUES(14,68); +INSERT INTO product_slots VALUES(14,69); +INSERT INTO product_slots VALUES(14,70); +INSERT INTO product_slots VALUES(14,71); +INSERT INTO product_slots VALUES(14,74); +INSERT INTO product_slots VALUES(14,75); +INSERT INTO product_slots VALUES(14,76); +INSERT INTO product_slots VALUES(14,77); +INSERT INTO product_slots VALUES(14,78); +INSERT INTO product_slots VALUES(14,81); +INSERT INTO product_slots VALUES(14,82); +INSERT INTO product_slots VALUES(14,83); +INSERT INTO product_slots VALUES(14,84); +INSERT INTO product_slots VALUES(14,87); +INSERT INTO product_slots VALUES(14,88); +INSERT INTO product_slots VALUES(14,89); +INSERT INTO product_slots VALUES(14,90); +INSERT INTO product_slots VALUES(14,91); +INSERT INTO product_slots VALUES(14,95); +INSERT INTO product_slots VALUES(14,96); +INSERT INTO product_slots VALUES(14,97); +INSERT INTO product_slots VALUES(14,98); +INSERT INTO product_slots VALUES(14,101); +INSERT INTO product_slots VALUES(14,102); +INSERT INTO product_slots VALUES(14,103); +INSERT INTO product_slots VALUES(14,104); +INSERT INTO product_slots VALUES(14,109); +INSERT INTO product_slots VALUES(14,110); +INSERT INTO product_slots VALUES(14,111); +INSERT INTO product_slots VALUES(14,112); +INSERT INTO product_slots VALUES(14,116); +INSERT INTO product_slots VALUES(14,117); +INSERT INTO product_slots VALUES(14,118); +INSERT INTO product_slots VALUES(14,119); +INSERT INTO product_slots VALUES(14,120); +INSERT INTO product_slots VALUES(14,123); +INSERT INTO product_slots VALUES(14,124); +INSERT INTO product_slots VALUES(14,125); +INSERT INTO product_slots VALUES(14,126); +INSERT INTO product_slots VALUES(14,130); +INSERT INTO product_slots VALUES(14,131); +INSERT INTO product_slots VALUES(14,132); +INSERT INTO product_slots VALUES(14,133); +INSERT INTO product_slots VALUES(14,137); +INSERT INTO product_slots VALUES(14,138); +INSERT INTO product_slots VALUES(14,139); +INSERT INTO product_slots VALUES(14,140); +INSERT INTO product_slots VALUES(14,144); +INSERT INTO product_slots VALUES(14,145); +INSERT INTO product_slots VALUES(14,146); +INSERT INTO product_slots VALUES(14,147); +INSERT INTO product_slots VALUES(14,148); +INSERT INTO product_slots VALUES(14,149); +INSERT INTO product_slots VALUES(14,150); +INSERT INTO product_slots VALUES(14,151); +INSERT INTO product_slots VALUES(14,155); +INSERT INTO product_slots VALUES(14,156); +INSERT INTO product_slots VALUES(14,157); +INSERT INTO product_slots VALUES(14,158); +INSERT INTO product_slots VALUES(14,162); +INSERT INTO product_slots VALUES(14,163); +INSERT INTO product_slots VALUES(14,164); +INSERT INTO product_slots VALUES(14,165); +INSERT INTO product_slots VALUES(14,166); +INSERT INTO product_slots VALUES(14,169); +INSERT INTO product_slots VALUES(14,170); +INSERT INTO product_slots VALUES(14,171); +INSERT INTO product_slots VALUES(14,172); +INSERT INTO product_slots VALUES(14,176); +INSERT INTO product_slots VALUES(14,177); +INSERT INTO product_slots VALUES(14,178); +INSERT INTO product_slots VALUES(14,179); +INSERT INTO product_slots VALUES(14,183); +INSERT INTO product_slots VALUES(14,184); +INSERT INTO product_slots VALUES(14,185); +INSERT INTO product_slots VALUES(14,186); +INSERT INTO product_slots VALUES(14,187); +INSERT INTO product_slots VALUES(14,188); +INSERT INTO product_slots VALUES(14,189); +INSERT INTO product_slots VALUES(14,190); +INSERT INTO product_slots VALUES(14,191); +INSERT INTO product_slots VALUES(14,192); +INSERT INTO product_slots VALUES(14,193); +INSERT INTO product_slots VALUES(14,194); +INSERT INTO product_slots VALUES(14,198); +INSERT INTO product_slots VALUES(14,199); +INSERT INTO product_slots VALUES(14,200); +INSERT INTO product_slots VALUES(14,201); +INSERT INTO product_slots VALUES(14,202); +INSERT INTO product_slots VALUES(14,203); +INSERT INTO product_slots VALUES(14,205); +INSERT INTO product_slots VALUES(14,208); +INSERT INTO product_slots VALUES(14,209); +INSERT INTO product_slots VALUES(14,210); +INSERT INTO product_slots VALUES(14,211); +INSERT INTO product_slots VALUES(14,216); +INSERT INTO product_slots VALUES(14,217); +INSERT INTO product_slots VALUES(14,218); +INSERT INTO product_slots VALUES(14,219); +INSERT INTO product_slots VALUES(14,220); +INSERT INTO product_slots VALUES(14,223); +INSERT INTO product_slots VALUES(14,224); +INSERT INTO product_slots VALUES(14,225); +INSERT INTO product_slots VALUES(14,226); +INSERT INTO product_slots VALUES(14,230); +INSERT INTO product_slots VALUES(14,231); +INSERT INTO product_slots VALUES(14,232); +INSERT INTO product_slots VALUES(14,234); +INSERT INTO product_slots VALUES(14,237); +INSERT INTO product_slots VALUES(14,238); +INSERT INTO product_slots VALUES(14,239); +INSERT INTO product_slots VALUES(14,240); +INSERT INTO product_slots VALUES(14,274); +INSERT INTO product_slots VALUES(14,275); +INSERT INTO product_slots VALUES(14,277); +INSERT INTO product_slots VALUES(14,278); +INSERT INTO product_slots VALUES(14,279); +INSERT INTO product_slots VALUES(15,5); +INSERT INTO product_slots VALUES(15,6); +INSERT INTO product_slots VALUES(15,7); +INSERT INTO product_slots VALUES(15,8); +INSERT INTO product_slots VALUES(15,9); +INSERT INTO product_slots VALUES(15,12); +INSERT INTO product_slots VALUES(15,18); +INSERT INTO product_slots VALUES(15,19); +INSERT INTO product_slots VALUES(15,20); +INSERT INTO product_slots VALUES(15,21); +INSERT INTO product_slots VALUES(15,22); +INSERT INTO product_slots VALUES(15,23); +INSERT INTO product_slots VALUES(15,31); +INSERT INTO product_slots VALUES(15,33); +INSERT INTO product_slots VALUES(15,35); +INSERT INTO product_slots VALUES(15,37); +INSERT INTO product_slots VALUES(15,38); +INSERT INTO product_slots VALUES(15,39); +INSERT INTO product_slots VALUES(15,40); +INSERT INTO product_slots VALUES(15,59); +INSERT INTO product_slots VALUES(15,62); +INSERT INTO product_slots VALUES(15,63); +INSERT INTO product_slots VALUES(15,64); +INSERT INTO product_slots VALUES(15,65); +INSERT INTO product_slots VALUES(15,66); +INSERT INTO product_slots VALUES(15,67); +INSERT INTO product_slots VALUES(15,72); +INSERT INTO product_slots VALUES(15,73); +INSERT INTO product_slots VALUES(15,279); +INSERT INTO product_slots VALUES(16,16); +INSERT INTO product_slots VALUES(16,18); +INSERT INTO product_slots VALUES(16,20); +INSERT INTO product_slots VALUES(16,39); +INSERT INTO product_slots VALUES(16,44); +INSERT INTO product_slots VALUES(16,46); +INSERT INTO product_slots VALUES(16,47); +INSERT INTO product_slots VALUES(16,48); +INSERT INTO product_slots VALUES(16,49); +INSERT INTO product_slots VALUES(16,50); +INSERT INTO product_slots VALUES(16,51); +INSERT INTO product_slots VALUES(16,52); +INSERT INTO product_slots VALUES(16,53); +INSERT INTO product_slots VALUES(16,54); +INSERT INTO product_slots VALUES(16,55); +INSERT INTO product_slots VALUES(16,56); +INSERT INTO product_slots VALUES(16,57); +INSERT INTO product_slots VALUES(16,58); +INSERT INTO product_slots VALUES(16,59); +INSERT INTO product_slots VALUES(16,60); +INSERT INTO product_slots VALUES(16,61); +INSERT INTO product_slots VALUES(16,62); +INSERT INTO product_slots VALUES(16,63); +INSERT INTO product_slots VALUES(16,64); +INSERT INTO product_slots VALUES(16,65); +INSERT INTO product_slots VALUES(16,66); +INSERT INTO product_slots VALUES(16,67); +INSERT INTO product_slots VALUES(16,68); +INSERT INTO product_slots VALUES(16,69); +INSERT INTO product_slots VALUES(16,70); +INSERT INTO product_slots VALUES(16,71); +INSERT INTO product_slots VALUES(16,72); +INSERT INTO product_slots VALUES(16,73); +INSERT INTO product_slots VALUES(16,74); +INSERT INTO product_slots VALUES(16,75); +INSERT INTO product_slots VALUES(16,76); +INSERT INTO product_slots VALUES(16,77); +INSERT INTO product_slots VALUES(16,78); +INSERT INTO product_slots VALUES(16,79); +INSERT INTO product_slots VALUES(16,80); +INSERT INTO product_slots VALUES(16,81); +INSERT INTO product_slots VALUES(16,82); +INSERT INTO product_slots VALUES(16,83); +INSERT INTO product_slots VALUES(16,84); +INSERT INTO product_slots VALUES(16,85); +INSERT INTO product_slots VALUES(16,86); +INSERT INTO product_slots VALUES(16,87); +INSERT INTO product_slots VALUES(16,88); +INSERT INTO product_slots VALUES(16,89); +INSERT INTO product_slots VALUES(16,90); +INSERT INTO product_slots VALUES(16,91); +INSERT INTO product_slots VALUES(16,92); +INSERT INTO product_slots VALUES(16,93); +INSERT INTO product_slots VALUES(16,94); +INSERT INTO product_slots VALUES(16,95); +INSERT INTO product_slots VALUES(16,96); +INSERT INTO product_slots VALUES(16,97); +INSERT INTO product_slots VALUES(16,98); +INSERT INTO product_slots VALUES(16,99); +INSERT INTO product_slots VALUES(16,100); +INSERT INTO product_slots VALUES(16,101); +INSERT INTO product_slots VALUES(16,102); +INSERT INTO product_slots VALUES(16,103); +INSERT INTO product_slots VALUES(16,104); +INSERT INTO product_slots VALUES(16,105); +INSERT INTO product_slots VALUES(16,106); +INSERT INTO product_slots VALUES(16,107); +INSERT INTO product_slots VALUES(16,108); +INSERT INTO product_slots VALUES(16,109); +INSERT INTO product_slots VALUES(16,110); +INSERT INTO product_slots VALUES(16,111); +INSERT INTO product_slots VALUES(16,112); +INSERT INTO product_slots VALUES(16,113); +INSERT INTO product_slots VALUES(16,114); +INSERT INTO product_slots VALUES(16,115); +INSERT INTO product_slots VALUES(16,116); +INSERT INTO product_slots VALUES(16,117); +INSERT INTO product_slots VALUES(16,118); +INSERT INTO product_slots VALUES(16,119); +INSERT INTO product_slots VALUES(16,120); +INSERT INTO product_slots VALUES(16,121); +INSERT INTO product_slots VALUES(16,122); +INSERT INTO product_slots VALUES(16,123); +INSERT INTO product_slots VALUES(16,124); +INSERT INTO product_slots VALUES(16,125); +INSERT INTO product_slots VALUES(16,126); +INSERT INTO product_slots VALUES(16,127); +INSERT INTO product_slots VALUES(16,128); +INSERT INTO product_slots VALUES(16,129); +INSERT INTO product_slots VALUES(16,130); +INSERT INTO product_slots VALUES(16,131); +INSERT INTO product_slots VALUES(16,132); +INSERT INTO product_slots VALUES(16,133); +INSERT INTO product_slots VALUES(16,134); +INSERT INTO product_slots VALUES(16,135); +INSERT INTO product_slots VALUES(16,136); +INSERT INTO product_slots VALUES(16,137); +INSERT INTO product_slots VALUES(16,138); +INSERT INTO product_slots VALUES(16,139); +INSERT INTO product_slots VALUES(16,140); +INSERT INTO product_slots VALUES(16,141); +INSERT INTO product_slots VALUES(16,142); +INSERT INTO product_slots VALUES(16,143); +INSERT INTO product_slots VALUES(16,144); +INSERT INTO product_slots VALUES(16,145); +INSERT INTO product_slots VALUES(16,146); +INSERT INTO product_slots VALUES(16,147); +INSERT INTO product_slots VALUES(16,148); +INSERT INTO product_slots VALUES(16,149); +INSERT INTO product_slots VALUES(16,150); +INSERT INTO product_slots VALUES(16,151); +INSERT INTO product_slots VALUES(16,152); +INSERT INTO product_slots VALUES(16,153); +INSERT INTO product_slots VALUES(16,154); +INSERT INTO product_slots VALUES(16,155); +INSERT INTO product_slots VALUES(16,156); +INSERT INTO product_slots VALUES(16,157); +INSERT INTO product_slots VALUES(16,158); +INSERT INTO product_slots VALUES(16,159); +INSERT INTO product_slots VALUES(16,160); +INSERT INTO product_slots VALUES(16,161); +INSERT INTO product_slots VALUES(16,162); +INSERT INTO product_slots VALUES(16,163); +INSERT INTO product_slots VALUES(16,164); +INSERT INTO product_slots VALUES(16,165); +INSERT INTO product_slots VALUES(16,166); +INSERT INTO product_slots VALUES(16,167); +INSERT INTO product_slots VALUES(16,168); +INSERT INTO product_slots VALUES(16,169); +INSERT INTO product_slots VALUES(16,170); +INSERT INTO product_slots VALUES(16,171); +INSERT INTO product_slots VALUES(16,172); +INSERT INTO product_slots VALUES(16,173); +INSERT INTO product_slots VALUES(16,174); +INSERT INTO product_slots VALUES(16,175); +INSERT INTO product_slots VALUES(16,176); +INSERT INTO product_slots VALUES(16,177); +INSERT INTO product_slots VALUES(16,178); +INSERT INTO product_slots VALUES(16,179); +INSERT INTO product_slots VALUES(16,180); +INSERT INTO product_slots VALUES(16,181); +INSERT INTO product_slots VALUES(16,182); +INSERT INTO product_slots VALUES(16,183); +INSERT INTO product_slots VALUES(16,184); +INSERT INTO product_slots VALUES(16,185); +INSERT INTO product_slots VALUES(16,186); +INSERT INTO product_slots VALUES(16,187); +INSERT INTO product_slots VALUES(16,188); +INSERT INTO product_slots VALUES(16,189); +INSERT INTO product_slots VALUES(16,190); +INSERT INTO product_slots VALUES(16,191); +INSERT INTO product_slots VALUES(16,192); +INSERT INTO product_slots VALUES(16,193); +INSERT INTO product_slots VALUES(16,194); +INSERT INTO product_slots VALUES(16,195); +INSERT INTO product_slots VALUES(16,196); +INSERT INTO product_slots VALUES(16,197); +INSERT INTO product_slots VALUES(16,198); +INSERT INTO product_slots VALUES(16,199); +INSERT INTO product_slots VALUES(16,200); +INSERT INTO product_slots VALUES(16,201); +INSERT INTO product_slots VALUES(16,202); +INSERT INTO product_slots VALUES(16,203); +INSERT INTO product_slots VALUES(16,204); +INSERT INTO product_slots VALUES(16,205); +INSERT INTO product_slots VALUES(16,206); +INSERT INTO product_slots VALUES(16,207); +INSERT INTO product_slots VALUES(16,208); +INSERT INTO product_slots VALUES(16,209); +INSERT INTO product_slots VALUES(16,210); +INSERT INTO product_slots VALUES(16,211); +INSERT INTO product_slots VALUES(16,212); +INSERT INTO product_slots VALUES(16,213); +INSERT INTO product_slots VALUES(16,214); +INSERT INTO product_slots VALUES(16,215); +INSERT INTO product_slots VALUES(16,216); +INSERT INTO product_slots VALUES(16,217); +INSERT INTO product_slots VALUES(16,218); +INSERT INTO product_slots VALUES(16,219); +INSERT INTO product_slots VALUES(16,220); +INSERT INTO product_slots VALUES(16,221); +INSERT INTO product_slots VALUES(16,222); +INSERT INTO product_slots VALUES(16,223); +INSERT INTO product_slots VALUES(16,224); +INSERT INTO product_slots VALUES(16,225); +INSERT INTO product_slots VALUES(16,226); +INSERT INTO product_slots VALUES(16,227); +INSERT INTO product_slots VALUES(16,228); +INSERT INTO product_slots VALUES(16,229); +INSERT INTO product_slots VALUES(16,230); +INSERT INTO product_slots VALUES(16,231); +INSERT INTO product_slots VALUES(16,232); +INSERT INTO product_slots VALUES(16,233); +INSERT INTO product_slots VALUES(16,234); +INSERT INTO product_slots VALUES(16,235); +INSERT INTO product_slots VALUES(16,236); +INSERT INTO product_slots VALUES(16,237); +INSERT INTO product_slots VALUES(16,238); +INSERT INTO product_slots VALUES(16,239); +INSERT INTO product_slots VALUES(16,240); +INSERT INTO product_slots VALUES(16,241); +INSERT INTO product_slots VALUES(16,242); +INSERT INTO product_slots VALUES(16,243); +INSERT INTO product_slots VALUES(16,244); +INSERT INTO product_slots VALUES(16,274); +INSERT INTO product_slots VALUES(16,275); +INSERT INTO product_slots VALUES(16,279); +INSERT INTO product_slots VALUES(16,280); +INSERT INTO product_slots VALUES(16,281); +INSERT INTO product_slots VALUES(16,282); +INSERT INTO product_slots VALUES(16,283); +INSERT INTO product_slots VALUES(16,284); +INSERT INTO product_slots VALUES(16,285); +INSERT INTO product_slots VALUES(16,286); +INSERT INTO product_slots VALUES(16,287); +INSERT INTO product_slots VALUES(17,12); +INSERT INTO product_slots VALUES(17,18); +INSERT INTO product_slots VALUES(17,20); +INSERT INTO product_slots VALUES(17,21); +INSERT INTO product_slots VALUES(17,33); +INSERT INTO product_slots VALUES(17,35); +INSERT INTO product_slots VALUES(17,37); +INSERT INTO product_slots VALUES(17,38); +INSERT INTO product_slots VALUES(17,39); +INSERT INTO product_slots VALUES(17,40); +INSERT INTO product_slots VALUES(17,41); +INSERT INTO product_slots VALUES(17,43); +INSERT INTO product_slots VALUES(17,44); +INSERT INTO product_slots VALUES(17,45); +INSERT INTO product_slots VALUES(17,46); +INSERT INTO product_slots VALUES(17,47); +INSERT INTO product_slots VALUES(17,48); +INSERT INTO product_slots VALUES(17,49); +INSERT INTO product_slots VALUES(17,50); +INSERT INTO product_slots VALUES(17,51); +INSERT INTO product_slots VALUES(17,52); +INSERT INTO product_slots VALUES(17,53); +INSERT INTO product_slots VALUES(17,54); +INSERT INTO product_slots VALUES(17,55); +INSERT INTO product_slots VALUES(17,56); +INSERT INTO product_slots VALUES(17,57); +INSERT INTO product_slots VALUES(17,58); +INSERT INTO product_slots VALUES(17,59); +INSERT INTO product_slots VALUES(17,60); +INSERT INTO product_slots VALUES(17,61); +INSERT INTO product_slots VALUES(17,62); +INSERT INTO product_slots VALUES(17,63); +INSERT INTO product_slots VALUES(17,64); +INSERT INTO product_slots VALUES(17,65); +INSERT INTO product_slots VALUES(17,66); +INSERT INTO product_slots VALUES(17,67); +INSERT INTO product_slots VALUES(17,68); +INSERT INTO product_slots VALUES(17,69); +INSERT INTO product_slots VALUES(17,70); +INSERT INTO product_slots VALUES(17,71); +INSERT INTO product_slots VALUES(17,72); +INSERT INTO product_slots VALUES(17,73); +INSERT INTO product_slots VALUES(17,74); +INSERT INTO product_slots VALUES(17,75); +INSERT INTO product_slots VALUES(17,76); +INSERT INTO product_slots VALUES(17,77); +INSERT INTO product_slots VALUES(17,78); +INSERT INTO product_slots VALUES(17,79); +INSERT INTO product_slots VALUES(17,80); +INSERT INTO product_slots VALUES(17,81); +INSERT INTO product_slots VALUES(17,82); +INSERT INTO product_slots VALUES(17,83); +INSERT INTO product_slots VALUES(17,84); +INSERT INTO product_slots VALUES(17,85); +INSERT INTO product_slots VALUES(17,86); +INSERT INTO product_slots VALUES(17,87); +INSERT INTO product_slots VALUES(17,88); +INSERT INTO product_slots VALUES(17,89); +INSERT INTO product_slots VALUES(17,90); +INSERT INTO product_slots VALUES(17,91); +INSERT INTO product_slots VALUES(17,92); +INSERT INTO product_slots VALUES(17,93); +INSERT INTO product_slots VALUES(17,94); +INSERT INTO product_slots VALUES(17,95); +INSERT INTO product_slots VALUES(17,96); +INSERT INTO product_slots VALUES(17,97); +INSERT INTO product_slots VALUES(17,98); +INSERT INTO product_slots VALUES(17,99); +INSERT INTO product_slots VALUES(17,100); +INSERT INTO product_slots VALUES(17,101); +INSERT INTO product_slots VALUES(17,102); +INSERT INTO product_slots VALUES(17,103); +INSERT INTO product_slots VALUES(17,104); +INSERT INTO product_slots VALUES(17,105); +INSERT INTO product_slots VALUES(17,106); +INSERT INTO product_slots VALUES(17,107); +INSERT INTO product_slots VALUES(17,108); +INSERT INTO product_slots VALUES(17,109); +INSERT INTO product_slots VALUES(17,110); +INSERT INTO product_slots VALUES(17,111); +INSERT INTO product_slots VALUES(17,112); +INSERT INTO product_slots VALUES(17,113); +INSERT INTO product_slots VALUES(17,114); +INSERT INTO product_slots VALUES(17,115); +INSERT INTO product_slots VALUES(17,116); +INSERT INTO product_slots VALUES(17,117); +INSERT INTO product_slots VALUES(17,118); +INSERT INTO product_slots VALUES(17,119); +INSERT INTO product_slots VALUES(17,120); +INSERT INTO product_slots VALUES(17,121); +INSERT INTO product_slots VALUES(17,122); +INSERT INTO product_slots VALUES(17,123); +INSERT INTO product_slots VALUES(17,124); +INSERT INTO product_slots VALUES(17,125); +INSERT INTO product_slots VALUES(17,126); +INSERT INTO product_slots VALUES(17,127); +INSERT INTO product_slots VALUES(17,128); +INSERT INTO product_slots VALUES(17,129); +INSERT INTO product_slots VALUES(17,130); +INSERT INTO product_slots VALUES(17,131); +INSERT INTO product_slots VALUES(17,132); +INSERT INTO product_slots VALUES(17,133); +INSERT INTO product_slots VALUES(17,134); +INSERT INTO product_slots VALUES(17,135); +INSERT INTO product_slots VALUES(17,136); +INSERT INTO product_slots VALUES(17,137); +INSERT INTO product_slots VALUES(17,138); +INSERT INTO product_slots VALUES(17,139); +INSERT INTO product_slots VALUES(17,140); +INSERT INTO product_slots VALUES(17,141); +INSERT INTO product_slots VALUES(17,142); +INSERT INTO product_slots VALUES(17,143); +INSERT INTO product_slots VALUES(17,144); +INSERT INTO product_slots VALUES(17,145); +INSERT INTO product_slots VALUES(17,146); +INSERT INTO product_slots VALUES(17,147); +INSERT INTO product_slots VALUES(17,148); +INSERT INTO product_slots VALUES(17,149); +INSERT INTO product_slots VALUES(17,150); +INSERT INTO product_slots VALUES(17,151); +INSERT INTO product_slots VALUES(17,152); +INSERT INTO product_slots VALUES(17,153); +INSERT INTO product_slots VALUES(17,154); +INSERT INTO product_slots VALUES(17,155); +INSERT INTO product_slots VALUES(17,156); +INSERT INTO product_slots VALUES(17,157); +INSERT INTO product_slots VALUES(17,158); +INSERT INTO product_slots VALUES(17,159); +INSERT INTO product_slots VALUES(17,160); +INSERT INTO product_slots VALUES(17,161); +INSERT INTO product_slots VALUES(17,162); +INSERT INTO product_slots VALUES(17,163); +INSERT INTO product_slots VALUES(17,164); +INSERT INTO product_slots VALUES(17,165); +INSERT INTO product_slots VALUES(17,166); +INSERT INTO product_slots VALUES(17,167); +INSERT INTO product_slots VALUES(17,168); +INSERT INTO product_slots VALUES(17,169); +INSERT INTO product_slots VALUES(17,170); +INSERT INTO product_slots VALUES(17,171); +INSERT INTO product_slots VALUES(17,172); +INSERT INTO product_slots VALUES(17,173); +INSERT INTO product_slots VALUES(17,174); +INSERT INTO product_slots VALUES(17,175); +INSERT INTO product_slots VALUES(17,176); +INSERT INTO product_slots VALUES(17,177); +INSERT INTO product_slots VALUES(17,178); +INSERT INTO product_slots VALUES(17,179); +INSERT INTO product_slots VALUES(17,180); +INSERT INTO product_slots VALUES(17,181); +INSERT INTO product_slots VALUES(17,182); +INSERT INTO product_slots VALUES(17,183); +INSERT INTO product_slots VALUES(17,184); +INSERT INTO product_slots VALUES(17,185); +INSERT INTO product_slots VALUES(17,186); +INSERT INTO product_slots VALUES(17,187); +INSERT INTO product_slots VALUES(17,188); +INSERT INTO product_slots VALUES(17,189); +INSERT INTO product_slots VALUES(17,190); +INSERT INTO product_slots VALUES(17,191); +INSERT INTO product_slots VALUES(17,192); +INSERT INTO product_slots VALUES(17,193); +INSERT INTO product_slots VALUES(17,194); +INSERT INTO product_slots VALUES(17,195); +INSERT INTO product_slots VALUES(17,196); +INSERT INTO product_slots VALUES(17,197); +INSERT INTO product_slots VALUES(17,198); +INSERT INTO product_slots VALUES(17,199); +INSERT INTO product_slots VALUES(17,200); +INSERT INTO product_slots VALUES(17,201); +INSERT INTO product_slots VALUES(17,202); +INSERT INTO product_slots VALUES(17,203); +INSERT INTO product_slots VALUES(17,204); +INSERT INTO product_slots VALUES(17,205); +INSERT INTO product_slots VALUES(17,206); +INSERT INTO product_slots VALUES(17,207); +INSERT INTO product_slots VALUES(17,208); +INSERT INTO product_slots VALUES(17,209); +INSERT INTO product_slots VALUES(17,210); +INSERT INTO product_slots VALUES(17,211); +INSERT INTO product_slots VALUES(17,212); +INSERT INTO product_slots VALUES(17,213); +INSERT INTO product_slots VALUES(17,214); +INSERT INTO product_slots VALUES(17,215); +INSERT INTO product_slots VALUES(17,216); +INSERT INTO product_slots VALUES(17,217); +INSERT INTO product_slots VALUES(17,218); +INSERT INTO product_slots VALUES(17,219); +INSERT INTO product_slots VALUES(17,220); +INSERT INTO product_slots VALUES(17,221); +INSERT INTO product_slots VALUES(17,222); +INSERT INTO product_slots VALUES(17,223); +INSERT INTO product_slots VALUES(17,224); +INSERT INTO product_slots VALUES(17,225); +INSERT INTO product_slots VALUES(17,226); +INSERT INTO product_slots VALUES(17,227); +INSERT INTO product_slots VALUES(17,228); +INSERT INTO product_slots VALUES(17,229); +INSERT INTO product_slots VALUES(17,230); +INSERT INTO product_slots VALUES(17,231); +INSERT INTO product_slots VALUES(17,232); +INSERT INTO product_slots VALUES(17,233); +INSERT INTO product_slots VALUES(17,234); +INSERT INTO product_slots VALUES(17,235); +INSERT INTO product_slots VALUES(17,236); +INSERT INTO product_slots VALUES(17,237); +INSERT INTO product_slots VALUES(17,238); +INSERT INTO product_slots VALUES(17,239); +INSERT INTO product_slots VALUES(17,240); +INSERT INTO product_slots VALUES(17,241); +INSERT INTO product_slots VALUES(17,242); +INSERT INTO product_slots VALUES(17,243); +INSERT INTO product_slots VALUES(17,244); +INSERT INTO product_slots VALUES(17,274); +INSERT INTO product_slots VALUES(17,275); +INSERT INTO product_slots VALUES(17,279); +INSERT INTO product_slots VALUES(17,280); +INSERT INTO product_slots VALUES(17,281); +INSERT INTO product_slots VALUES(17,282); +INSERT INTO product_slots VALUES(17,283); +INSERT INTO product_slots VALUES(17,284); +INSERT INTO product_slots VALUES(17,285); +INSERT INTO product_slots VALUES(17,286); +INSERT INTO product_slots VALUES(17,287); +INSERT INTO product_slots VALUES(18,12); +INSERT INTO product_slots VALUES(18,18); +INSERT INTO product_slots VALUES(18,20); +INSERT INTO product_slots VALUES(18,21); +INSERT INTO product_slots VALUES(18,33); +INSERT INTO product_slots VALUES(18,35); +INSERT INTO product_slots VALUES(18,37); +INSERT INTO product_slots VALUES(18,38); +INSERT INTO product_slots VALUES(18,39); +INSERT INTO product_slots VALUES(18,40); +INSERT INTO product_slots VALUES(18,44); +INSERT INTO product_slots VALUES(18,46); +INSERT INTO product_slots VALUES(18,47); +INSERT INTO product_slots VALUES(18,48); +INSERT INTO product_slots VALUES(18,49); +INSERT INTO product_slots VALUES(18,50); +INSERT INTO product_slots VALUES(18,51); +INSERT INTO product_slots VALUES(18,52); +INSERT INTO product_slots VALUES(18,53); +INSERT INTO product_slots VALUES(18,54); +INSERT INTO product_slots VALUES(18,55); +INSERT INTO product_slots VALUES(18,56); +INSERT INTO product_slots VALUES(18,57); +INSERT INTO product_slots VALUES(18,58); +INSERT INTO product_slots VALUES(18,59); +INSERT INTO product_slots VALUES(18,60); +INSERT INTO product_slots VALUES(18,61); +INSERT INTO product_slots VALUES(18,62); +INSERT INTO product_slots VALUES(18,63); +INSERT INTO product_slots VALUES(18,64); +INSERT INTO product_slots VALUES(18,65); +INSERT INTO product_slots VALUES(18,66); +INSERT INTO product_slots VALUES(18,67); +INSERT INTO product_slots VALUES(18,68); +INSERT INTO product_slots VALUES(18,69); +INSERT INTO product_slots VALUES(18,70); +INSERT INTO product_slots VALUES(18,71); +INSERT INTO product_slots VALUES(18,72); +INSERT INTO product_slots VALUES(18,73); +INSERT INTO product_slots VALUES(18,74); +INSERT INTO product_slots VALUES(18,75); +INSERT INTO product_slots VALUES(18,76); +INSERT INTO product_slots VALUES(18,77); +INSERT INTO product_slots VALUES(18,78); +INSERT INTO product_slots VALUES(18,79); +INSERT INTO product_slots VALUES(18,80); +INSERT INTO product_slots VALUES(18,81); +INSERT INTO product_slots VALUES(18,82); +INSERT INTO product_slots VALUES(18,83); +INSERT INTO product_slots VALUES(18,84); +INSERT INTO product_slots VALUES(18,85); +INSERT INTO product_slots VALUES(18,86); +INSERT INTO product_slots VALUES(18,87); +INSERT INTO product_slots VALUES(18,88); +INSERT INTO product_slots VALUES(18,89); +INSERT INTO product_slots VALUES(18,90); +INSERT INTO product_slots VALUES(18,91); +INSERT INTO product_slots VALUES(18,92); +INSERT INTO product_slots VALUES(18,93); +INSERT INTO product_slots VALUES(18,94); +INSERT INTO product_slots VALUES(18,95); +INSERT INTO product_slots VALUES(18,96); +INSERT INTO product_slots VALUES(18,97); +INSERT INTO product_slots VALUES(18,98); +INSERT INTO product_slots VALUES(18,99); +INSERT INTO product_slots VALUES(18,100); +INSERT INTO product_slots VALUES(18,101); +INSERT INTO product_slots VALUES(18,102); +INSERT INTO product_slots VALUES(18,103); +INSERT INTO product_slots VALUES(18,104); +INSERT INTO product_slots VALUES(18,105); +INSERT INTO product_slots VALUES(18,106); +INSERT INTO product_slots VALUES(18,107); +INSERT INTO product_slots VALUES(18,108); +INSERT INTO product_slots VALUES(18,109); +INSERT INTO product_slots VALUES(18,110); +INSERT INTO product_slots VALUES(18,111); +INSERT INTO product_slots VALUES(18,112); +INSERT INTO product_slots VALUES(18,113); +INSERT INTO product_slots VALUES(18,114); +INSERT INTO product_slots VALUES(18,115); +INSERT INTO product_slots VALUES(18,116); +INSERT INTO product_slots VALUES(18,117); +INSERT INTO product_slots VALUES(18,118); +INSERT INTO product_slots VALUES(18,119); +INSERT INTO product_slots VALUES(18,120); +INSERT INTO product_slots VALUES(18,121); +INSERT INTO product_slots VALUES(18,122); +INSERT INTO product_slots VALUES(18,123); +INSERT INTO product_slots VALUES(18,124); +INSERT INTO product_slots VALUES(18,125); +INSERT INTO product_slots VALUES(18,126); +INSERT INTO product_slots VALUES(18,127); +INSERT INTO product_slots VALUES(18,128); +INSERT INTO product_slots VALUES(18,129); +INSERT INTO product_slots VALUES(18,130); +INSERT INTO product_slots VALUES(18,131); +INSERT INTO product_slots VALUES(18,132); +INSERT INTO product_slots VALUES(18,133); +INSERT INTO product_slots VALUES(18,134); +INSERT INTO product_slots VALUES(18,135); +INSERT INTO product_slots VALUES(18,136); +INSERT INTO product_slots VALUES(18,137); +INSERT INTO product_slots VALUES(18,138); +INSERT INTO product_slots VALUES(18,139); +INSERT INTO product_slots VALUES(18,140); +INSERT INTO product_slots VALUES(18,141); +INSERT INTO product_slots VALUES(18,142); +INSERT INTO product_slots VALUES(18,143); +INSERT INTO product_slots VALUES(18,144); +INSERT INTO product_slots VALUES(18,145); +INSERT INTO product_slots VALUES(18,146); +INSERT INTO product_slots VALUES(18,147); +INSERT INTO product_slots VALUES(18,148); +INSERT INTO product_slots VALUES(18,149); +INSERT INTO product_slots VALUES(18,150); +INSERT INTO product_slots VALUES(18,151); +INSERT INTO product_slots VALUES(18,152); +INSERT INTO product_slots VALUES(18,153); +INSERT INTO product_slots VALUES(18,154); +INSERT INTO product_slots VALUES(18,155); +INSERT INTO product_slots VALUES(18,156); +INSERT INTO product_slots VALUES(18,157); +INSERT INTO product_slots VALUES(18,158); +INSERT INTO product_slots VALUES(18,159); +INSERT INTO product_slots VALUES(18,160); +INSERT INTO product_slots VALUES(18,161); +INSERT INTO product_slots VALUES(18,162); +INSERT INTO product_slots VALUES(18,163); +INSERT INTO product_slots VALUES(18,164); +INSERT INTO product_slots VALUES(18,165); +INSERT INTO product_slots VALUES(18,166); +INSERT INTO product_slots VALUES(18,167); +INSERT INTO product_slots VALUES(18,168); +INSERT INTO product_slots VALUES(18,169); +INSERT INTO product_slots VALUES(18,170); +INSERT INTO product_slots VALUES(18,171); +INSERT INTO product_slots VALUES(18,172); +INSERT INTO product_slots VALUES(18,173); +INSERT INTO product_slots VALUES(18,174); +INSERT INTO product_slots VALUES(18,175); +INSERT INTO product_slots VALUES(18,176); +INSERT INTO product_slots VALUES(18,177); +INSERT INTO product_slots VALUES(18,178); +INSERT INTO product_slots VALUES(18,179); +INSERT INTO product_slots VALUES(18,180); +INSERT INTO product_slots VALUES(18,181); +INSERT INTO product_slots VALUES(18,182); +INSERT INTO product_slots VALUES(18,183); +INSERT INTO product_slots VALUES(18,184); +INSERT INTO product_slots VALUES(18,185); +INSERT INTO product_slots VALUES(18,186); +INSERT INTO product_slots VALUES(18,187); +INSERT INTO product_slots VALUES(18,188); +INSERT INTO product_slots VALUES(18,189); +INSERT INTO product_slots VALUES(18,190); +INSERT INTO product_slots VALUES(18,191); +INSERT INTO product_slots VALUES(18,192); +INSERT INTO product_slots VALUES(18,193); +INSERT INTO product_slots VALUES(18,194); +INSERT INTO product_slots VALUES(18,195); +INSERT INTO product_slots VALUES(18,196); +INSERT INTO product_slots VALUES(18,197); +INSERT INTO product_slots VALUES(18,198); +INSERT INTO product_slots VALUES(18,199); +INSERT INTO product_slots VALUES(18,200); +INSERT INTO product_slots VALUES(18,201); +INSERT INTO product_slots VALUES(18,202); +INSERT INTO product_slots VALUES(18,203); +INSERT INTO product_slots VALUES(18,204); +INSERT INTO product_slots VALUES(18,205); +INSERT INTO product_slots VALUES(18,206); +INSERT INTO product_slots VALUES(18,207); +INSERT INTO product_slots VALUES(18,208); +INSERT INTO product_slots VALUES(18,209); +INSERT INTO product_slots VALUES(18,210); +INSERT INTO product_slots VALUES(18,211); +INSERT INTO product_slots VALUES(18,212); +INSERT INTO product_slots VALUES(18,213); +INSERT INTO product_slots VALUES(18,214); +INSERT INTO product_slots VALUES(18,215); +INSERT INTO product_slots VALUES(18,216); +INSERT INTO product_slots VALUES(18,217); +INSERT INTO product_slots VALUES(18,218); +INSERT INTO product_slots VALUES(18,219); +INSERT INTO product_slots VALUES(18,220); +INSERT INTO product_slots VALUES(18,221); +INSERT INTO product_slots VALUES(18,222); +INSERT INTO product_slots VALUES(18,223); +INSERT INTO product_slots VALUES(18,224); +INSERT INTO product_slots VALUES(18,225); +INSERT INTO product_slots VALUES(18,226); +INSERT INTO product_slots VALUES(18,227); +INSERT INTO product_slots VALUES(18,228); +INSERT INTO product_slots VALUES(18,229); +INSERT INTO product_slots VALUES(18,230); +INSERT INTO product_slots VALUES(18,231); +INSERT INTO product_slots VALUES(18,232); +INSERT INTO product_slots VALUES(18,233); +INSERT INTO product_slots VALUES(18,234); +INSERT INTO product_slots VALUES(18,235); +INSERT INTO product_slots VALUES(18,236); +INSERT INTO product_slots VALUES(18,237); +INSERT INTO product_slots VALUES(18,238); +INSERT INTO product_slots VALUES(18,239); +INSERT INTO product_slots VALUES(18,240); +INSERT INTO product_slots VALUES(18,241); +INSERT INTO product_slots VALUES(18,242); +INSERT INTO product_slots VALUES(18,243); +INSERT INTO product_slots VALUES(18,244); +INSERT INTO product_slots VALUES(18,274); +INSERT INTO product_slots VALUES(18,275); +INSERT INTO product_slots VALUES(18,279); +INSERT INTO product_slots VALUES(18,280); +INSERT INTO product_slots VALUES(18,281); +INSERT INTO product_slots VALUES(18,282); +INSERT INTO product_slots VALUES(18,283); +INSERT INTO product_slots VALUES(18,284); +INSERT INTO product_slots VALUES(18,285); +INSERT INTO product_slots VALUES(18,286); +INSERT INTO product_slots VALUES(18,287); +INSERT INTO product_slots VALUES(19,10); +INSERT INTO product_slots VALUES(19,12); +INSERT INTO product_slots VALUES(19,18); +INSERT INTO product_slots VALUES(19,20); +INSERT INTO product_slots VALUES(19,21); +INSERT INTO product_slots VALUES(19,33); +INSERT INTO product_slots VALUES(19,35); +INSERT INTO product_slots VALUES(19,37); +INSERT INTO product_slots VALUES(19,38); +INSERT INTO product_slots VALUES(19,39); +INSERT INTO product_slots VALUES(19,40); +INSERT INTO product_slots VALUES(19,41); +INSERT INTO product_slots VALUES(19,43); +INSERT INTO product_slots VALUES(19,44); +INSERT INTO product_slots VALUES(19,45); +INSERT INTO product_slots VALUES(19,46); +INSERT INTO product_slots VALUES(19,47); +INSERT INTO product_slots VALUES(19,48); +INSERT INTO product_slots VALUES(19,49); +INSERT INTO product_slots VALUES(19,50); +INSERT INTO product_slots VALUES(19,51); +INSERT INTO product_slots VALUES(19,52); +INSERT INTO product_slots VALUES(19,53); +INSERT INTO product_slots VALUES(19,54); +INSERT INTO product_slots VALUES(19,55); +INSERT INTO product_slots VALUES(19,56); +INSERT INTO product_slots VALUES(19,57); +INSERT INTO product_slots VALUES(19,58); +INSERT INTO product_slots VALUES(19,59); +INSERT INTO product_slots VALUES(19,60); +INSERT INTO product_slots VALUES(19,61); +INSERT INTO product_slots VALUES(19,62); +INSERT INTO product_slots VALUES(19,63); +INSERT INTO product_slots VALUES(19,64); +INSERT INTO product_slots VALUES(19,65); +INSERT INTO product_slots VALUES(19,66); +INSERT INTO product_slots VALUES(19,67); +INSERT INTO product_slots VALUES(19,68); +INSERT INTO product_slots VALUES(19,69); +INSERT INTO product_slots VALUES(19,70); +INSERT INTO product_slots VALUES(19,71); +INSERT INTO product_slots VALUES(19,72); +INSERT INTO product_slots VALUES(19,73); +INSERT INTO product_slots VALUES(19,74); +INSERT INTO product_slots VALUES(19,75); +INSERT INTO product_slots VALUES(19,76); +INSERT INTO product_slots VALUES(19,77); +INSERT INTO product_slots VALUES(19,78); +INSERT INTO product_slots VALUES(19,79); +INSERT INTO product_slots VALUES(19,80); +INSERT INTO product_slots VALUES(19,81); +INSERT INTO product_slots VALUES(19,82); +INSERT INTO product_slots VALUES(19,83); +INSERT INTO product_slots VALUES(19,84); +INSERT INTO product_slots VALUES(19,85); +INSERT INTO product_slots VALUES(19,86); +INSERT INTO product_slots VALUES(19,87); +INSERT INTO product_slots VALUES(19,88); +INSERT INTO product_slots VALUES(19,89); +INSERT INTO product_slots VALUES(19,90); +INSERT INTO product_slots VALUES(19,91); +INSERT INTO product_slots VALUES(19,92); +INSERT INTO product_slots VALUES(19,93); +INSERT INTO product_slots VALUES(19,94); +INSERT INTO product_slots VALUES(19,95); +INSERT INTO product_slots VALUES(19,96); +INSERT INTO product_slots VALUES(19,97); +INSERT INTO product_slots VALUES(19,98); +INSERT INTO product_slots VALUES(19,99); +INSERT INTO product_slots VALUES(19,100); +INSERT INTO product_slots VALUES(19,101); +INSERT INTO product_slots VALUES(19,102); +INSERT INTO product_slots VALUES(19,103); +INSERT INTO product_slots VALUES(19,104); +INSERT INTO product_slots VALUES(19,105); +INSERT INTO product_slots VALUES(19,106); +INSERT INTO product_slots VALUES(19,107); +INSERT INTO product_slots VALUES(19,108); +INSERT INTO product_slots VALUES(19,109); +INSERT INTO product_slots VALUES(19,110); +INSERT INTO product_slots VALUES(19,111); +INSERT INTO product_slots VALUES(19,112); +INSERT INTO product_slots VALUES(19,113); +INSERT INTO product_slots VALUES(19,114); +INSERT INTO product_slots VALUES(19,115); +INSERT INTO product_slots VALUES(19,116); +INSERT INTO product_slots VALUES(19,117); +INSERT INTO product_slots VALUES(19,118); +INSERT INTO product_slots VALUES(19,119); +INSERT INTO product_slots VALUES(19,120); +INSERT INTO product_slots VALUES(19,121); +INSERT INTO product_slots VALUES(19,122); +INSERT INTO product_slots VALUES(19,123); +INSERT INTO product_slots VALUES(19,124); +INSERT INTO product_slots VALUES(19,125); +INSERT INTO product_slots VALUES(19,126); +INSERT INTO product_slots VALUES(19,127); +INSERT INTO product_slots VALUES(19,128); +INSERT INTO product_slots VALUES(19,129); +INSERT INTO product_slots VALUES(19,130); +INSERT INTO product_slots VALUES(19,131); +INSERT INTO product_slots VALUES(19,132); +INSERT INTO product_slots VALUES(19,133); +INSERT INTO product_slots VALUES(19,134); +INSERT INTO product_slots VALUES(19,135); +INSERT INTO product_slots VALUES(19,136); +INSERT INTO product_slots VALUES(19,137); +INSERT INTO product_slots VALUES(19,138); +INSERT INTO product_slots VALUES(19,139); +INSERT INTO product_slots VALUES(19,140); +INSERT INTO product_slots VALUES(19,141); +INSERT INTO product_slots VALUES(19,142); +INSERT INTO product_slots VALUES(19,143); +INSERT INTO product_slots VALUES(19,144); +INSERT INTO product_slots VALUES(19,145); +INSERT INTO product_slots VALUES(19,146); +INSERT INTO product_slots VALUES(19,147); +INSERT INTO product_slots VALUES(19,148); +INSERT INTO product_slots VALUES(19,149); +INSERT INTO product_slots VALUES(19,150); +INSERT INTO product_slots VALUES(19,151); +INSERT INTO product_slots VALUES(19,152); +INSERT INTO product_slots VALUES(19,153); +INSERT INTO product_slots VALUES(19,154); +INSERT INTO product_slots VALUES(19,155); +INSERT INTO product_slots VALUES(19,156); +INSERT INTO product_slots VALUES(19,157); +INSERT INTO product_slots VALUES(19,158); +INSERT INTO product_slots VALUES(19,159); +INSERT INTO product_slots VALUES(19,160); +INSERT INTO product_slots VALUES(19,161); +INSERT INTO product_slots VALUES(19,162); +INSERT INTO product_slots VALUES(19,163); +INSERT INTO product_slots VALUES(19,164); +INSERT INTO product_slots VALUES(19,165); +INSERT INTO product_slots VALUES(19,166); +INSERT INTO product_slots VALUES(19,167); +INSERT INTO product_slots VALUES(19,168); +INSERT INTO product_slots VALUES(19,169); +INSERT INTO product_slots VALUES(19,170); +INSERT INTO product_slots VALUES(19,171); +INSERT INTO product_slots VALUES(19,172); +INSERT INTO product_slots VALUES(19,173); +INSERT INTO product_slots VALUES(19,174); +INSERT INTO product_slots VALUES(19,175); +INSERT INTO product_slots VALUES(19,176); +INSERT INTO product_slots VALUES(19,177); +INSERT INTO product_slots VALUES(19,178); +INSERT INTO product_slots VALUES(19,179); +INSERT INTO product_slots VALUES(19,180); +INSERT INTO product_slots VALUES(19,181); +INSERT INTO product_slots VALUES(19,182); +INSERT INTO product_slots VALUES(19,183); +INSERT INTO product_slots VALUES(19,184); +INSERT INTO product_slots VALUES(19,185); +INSERT INTO product_slots VALUES(19,186); +INSERT INTO product_slots VALUES(19,187); +INSERT INTO product_slots VALUES(19,188); +INSERT INTO product_slots VALUES(19,189); +INSERT INTO product_slots VALUES(19,190); +INSERT INTO product_slots VALUES(19,191); +INSERT INTO product_slots VALUES(19,192); +INSERT INTO product_slots VALUES(19,193); +INSERT INTO product_slots VALUES(19,194); +INSERT INTO product_slots VALUES(19,195); +INSERT INTO product_slots VALUES(19,196); +INSERT INTO product_slots VALUES(19,197); +INSERT INTO product_slots VALUES(19,198); +INSERT INTO product_slots VALUES(19,199); +INSERT INTO product_slots VALUES(19,200); +INSERT INTO product_slots VALUES(19,201); +INSERT INTO product_slots VALUES(19,202); +INSERT INTO product_slots VALUES(19,203); +INSERT INTO product_slots VALUES(19,204); +INSERT INTO product_slots VALUES(19,205); +INSERT INTO product_slots VALUES(19,206); +INSERT INTO product_slots VALUES(19,207); +INSERT INTO product_slots VALUES(19,208); +INSERT INTO product_slots VALUES(19,209); +INSERT INTO product_slots VALUES(19,210); +INSERT INTO product_slots VALUES(19,211); +INSERT INTO product_slots VALUES(19,212); +INSERT INTO product_slots VALUES(19,213); +INSERT INTO product_slots VALUES(19,214); +INSERT INTO product_slots VALUES(19,215); +INSERT INTO product_slots VALUES(19,216); +INSERT INTO product_slots VALUES(19,217); +INSERT INTO product_slots VALUES(19,218); +INSERT INTO product_slots VALUES(19,219); +INSERT INTO product_slots VALUES(19,220); +INSERT INTO product_slots VALUES(19,221); +INSERT INTO product_slots VALUES(19,222); +INSERT INTO product_slots VALUES(19,223); +INSERT INTO product_slots VALUES(19,224); +INSERT INTO product_slots VALUES(19,225); +INSERT INTO product_slots VALUES(19,226); +INSERT INTO product_slots VALUES(19,227); +INSERT INTO product_slots VALUES(19,228); +INSERT INTO product_slots VALUES(19,229); +INSERT INTO product_slots VALUES(19,230); +INSERT INTO product_slots VALUES(19,231); +INSERT INTO product_slots VALUES(19,232); +INSERT INTO product_slots VALUES(19,233); +INSERT INTO product_slots VALUES(19,234); +INSERT INTO product_slots VALUES(19,235); +INSERT INTO product_slots VALUES(19,236); +INSERT INTO product_slots VALUES(19,237); +INSERT INTO product_slots VALUES(19,238); +INSERT INTO product_slots VALUES(19,239); +INSERT INTO product_slots VALUES(19,240); +INSERT INTO product_slots VALUES(19,241); +INSERT INTO product_slots VALUES(19,242); +INSERT INTO product_slots VALUES(19,243); +INSERT INTO product_slots VALUES(19,244); +INSERT INTO product_slots VALUES(19,274); +INSERT INTO product_slots VALUES(19,275); +INSERT INTO product_slots VALUES(19,279); +INSERT INTO product_slots VALUES(19,280); +INSERT INTO product_slots VALUES(19,281); +INSERT INTO product_slots VALUES(19,282); +INSERT INTO product_slots VALUES(19,283); +INSERT INTO product_slots VALUES(19,284); +INSERT INTO product_slots VALUES(19,285); +INSERT INTO product_slots VALUES(19,286); +INSERT INTO product_slots VALUES(19,287); +INSERT INTO product_slots VALUES(20,12); +INSERT INTO product_slots VALUES(20,18); +INSERT INTO product_slots VALUES(20,20); +INSERT INTO product_slots VALUES(20,21); +INSERT INTO product_slots VALUES(20,22); +INSERT INTO product_slots VALUES(20,33); +INSERT INTO product_slots VALUES(20,35); +INSERT INTO product_slots VALUES(20,37); +INSERT INTO product_slots VALUES(20,38); +INSERT INTO product_slots VALUES(20,40); +INSERT INTO product_slots VALUES(20,59); +INSERT INTO product_slots VALUES(20,81); +INSERT INTO product_slots VALUES(20,82); +INSERT INTO product_slots VALUES(20,83); +INSERT INTO product_slots VALUES(20,105); +INSERT INTO product_slots VALUES(20,106); +INSERT INTO product_slots VALUES(20,107); +INSERT INTO product_slots VALUES(20,108); +INSERT INTO product_slots VALUES(20,109); +INSERT INTO product_slots VALUES(20,110); +INSERT INTO product_slots VALUES(20,111); +INSERT INTO product_slots VALUES(20,112); +INSERT INTO product_slots VALUES(20,113); +INSERT INTO product_slots VALUES(20,114); +INSERT INTO product_slots VALUES(20,115); +INSERT INTO product_slots VALUES(20,120); +INSERT INTO product_slots VALUES(20,134); +INSERT INTO product_slots VALUES(20,135); +INSERT INTO product_slots VALUES(20,136); +INSERT INTO product_slots VALUES(20,187); +INSERT INTO product_slots VALUES(21,12); +INSERT INTO product_slots VALUES(21,18); +INSERT INTO product_slots VALUES(21,19); +INSERT INTO product_slots VALUES(21,20); +INSERT INTO product_slots VALUES(21,21); +INSERT INTO product_slots VALUES(21,22); +INSERT INTO product_slots VALUES(21,23); +INSERT INTO product_slots VALUES(21,31); +INSERT INTO product_slots VALUES(21,33); +INSERT INTO product_slots VALUES(21,35); +INSERT INTO product_slots VALUES(21,37); +INSERT INTO product_slots VALUES(21,38); +INSERT INTO product_slots VALUES(21,39); +INSERT INTO product_slots VALUES(21,40); +INSERT INTO product_slots VALUES(21,41); +INSERT INTO product_slots VALUES(21,43); +INSERT INTO product_slots VALUES(21,45); +INSERT INTO product_slots VALUES(21,46); +INSERT INTO product_slots VALUES(21,47); +INSERT INTO product_slots VALUES(21,48); +INSERT INTO product_slots VALUES(21,49); +INSERT INTO product_slots VALUES(21,50); +INSERT INTO product_slots VALUES(21,51); +INSERT INTO product_slots VALUES(21,52); +INSERT INTO product_slots VALUES(21,53); +INSERT INTO product_slots VALUES(21,54); +INSERT INTO product_slots VALUES(21,55); +INSERT INTO product_slots VALUES(21,56); +INSERT INTO product_slots VALUES(21,57); +INSERT INTO product_slots VALUES(21,58); +INSERT INTO product_slots VALUES(21,59); +INSERT INTO product_slots VALUES(21,60); +INSERT INTO product_slots VALUES(21,61); +INSERT INTO product_slots VALUES(21,62); +INSERT INTO product_slots VALUES(21,63); +INSERT INTO product_slots VALUES(21,64); +INSERT INTO product_slots VALUES(21,65); +INSERT INTO product_slots VALUES(21,66); +INSERT INTO product_slots VALUES(21,67); +INSERT INTO product_slots VALUES(21,68); +INSERT INTO product_slots VALUES(21,69); +INSERT INTO product_slots VALUES(21,70); +INSERT INTO product_slots VALUES(21,71); +INSERT INTO product_slots VALUES(21,72); +INSERT INTO product_slots VALUES(21,73); +INSERT INTO product_slots VALUES(21,74); +INSERT INTO product_slots VALUES(21,75); +INSERT INTO product_slots VALUES(21,76); +INSERT INTO product_slots VALUES(21,77); +INSERT INTO product_slots VALUES(21,78); +INSERT INTO product_slots VALUES(21,79); +INSERT INTO product_slots VALUES(21,80); +INSERT INTO product_slots VALUES(21,81); +INSERT INTO product_slots VALUES(21,82); +INSERT INTO product_slots VALUES(21,83); +INSERT INTO product_slots VALUES(21,84); +INSERT INTO product_slots VALUES(21,85); +INSERT INTO product_slots VALUES(21,86); +INSERT INTO product_slots VALUES(21,87); +INSERT INTO product_slots VALUES(21,88); +INSERT INTO product_slots VALUES(21,89); +INSERT INTO product_slots VALUES(21,90); +INSERT INTO product_slots VALUES(21,91); +INSERT INTO product_slots VALUES(21,92); +INSERT INTO product_slots VALUES(21,93); +INSERT INTO product_slots VALUES(21,94); +INSERT INTO product_slots VALUES(21,95); +INSERT INTO product_slots VALUES(21,96); +INSERT INTO product_slots VALUES(21,97); +INSERT INTO product_slots VALUES(21,98); +INSERT INTO product_slots VALUES(21,99); +INSERT INTO product_slots VALUES(21,100); +INSERT INTO product_slots VALUES(21,101); +INSERT INTO product_slots VALUES(21,102); +INSERT INTO product_slots VALUES(21,103); +INSERT INTO product_slots VALUES(21,104); +INSERT INTO product_slots VALUES(21,105); +INSERT INTO product_slots VALUES(21,106); +INSERT INTO product_slots VALUES(21,107); +INSERT INTO product_slots VALUES(21,108); +INSERT INTO product_slots VALUES(21,109); +INSERT INTO product_slots VALUES(21,110); +INSERT INTO product_slots VALUES(21,111); +INSERT INTO product_slots VALUES(21,112); +INSERT INTO product_slots VALUES(21,113); +INSERT INTO product_slots VALUES(21,114); +INSERT INTO product_slots VALUES(21,115); +INSERT INTO product_slots VALUES(21,116); +INSERT INTO product_slots VALUES(21,117); +INSERT INTO product_slots VALUES(21,118); +INSERT INTO product_slots VALUES(21,119); +INSERT INTO product_slots VALUES(21,120); +INSERT INTO product_slots VALUES(21,121); +INSERT INTO product_slots VALUES(21,122); +INSERT INTO product_slots VALUES(21,123); +INSERT INTO product_slots VALUES(21,124); +INSERT INTO product_slots VALUES(21,125); +INSERT INTO product_slots VALUES(21,126); +INSERT INTO product_slots VALUES(21,127); +INSERT INTO product_slots VALUES(21,128); +INSERT INTO product_slots VALUES(21,129); +INSERT INTO product_slots VALUES(21,130); +INSERT INTO product_slots VALUES(21,131); +INSERT INTO product_slots VALUES(21,132); +INSERT INTO product_slots VALUES(21,133); +INSERT INTO product_slots VALUES(21,134); +INSERT INTO product_slots VALUES(21,135); +INSERT INTO product_slots VALUES(21,136); +INSERT INTO product_slots VALUES(21,137); +INSERT INTO product_slots VALUES(21,138); +INSERT INTO product_slots VALUES(21,139); +INSERT INTO product_slots VALUES(21,140); +INSERT INTO product_slots VALUES(21,141); +INSERT INTO product_slots VALUES(21,142); +INSERT INTO product_slots VALUES(21,143); +INSERT INTO product_slots VALUES(21,144); +INSERT INTO product_slots VALUES(21,145); +INSERT INTO product_slots VALUES(21,146); +INSERT INTO product_slots VALUES(21,147); +INSERT INTO product_slots VALUES(21,148); +INSERT INTO product_slots VALUES(21,149); +INSERT INTO product_slots VALUES(21,150); +INSERT INTO product_slots VALUES(21,151); +INSERT INTO product_slots VALUES(21,152); +INSERT INTO product_slots VALUES(21,153); +INSERT INTO product_slots VALUES(21,154); +INSERT INTO product_slots VALUES(21,155); +INSERT INTO product_slots VALUES(21,156); +INSERT INTO product_slots VALUES(21,157); +INSERT INTO product_slots VALUES(21,158); +INSERT INTO product_slots VALUES(21,159); +INSERT INTO product_slots VALUES(21,160); +INSERT INTO product_slots VALUES(21,161); +INSERT INTO product_slots VALUES(21,162); +INSERT INTO product_slots VALUES(21,163); +INSERT INTO product_slots VALUES(21,164); +INSERT INTO product_slots VALUES(21,165); +INSERT INTO product_slots VALUES(21,166); +INSERT INTO product_slots VALUES(21,167); +INSERT INTO product_slots VALUES(21,168); +INSERT INTO product_slots VALUES(21,169); +INSERT INTO product_slots VALUES(21,170); +INSERT INTO product_slots VALUES(21,171); +INSERT INTO product_slots VALUES(21,172); +INSERT INTO product_slots VALUES(21,173); +INSERT INTO product_slots VALUES(21,174); +INSERT INTO product_slots VALUES(21,175); +INSERT INTO product_slots VALUES(21,176); +INSERT INTO product_slots VALUES(21,177); +INSERT INTO product_slots VALUES(21,178); +INSERT INTO product_slots VALUES(21,179); +INSERT INTO product_slots VALUES(21,180); +INSERT INTO product_slots VALUES(21,181); +INSERT INTO product_slots VALUES(21,182); +INSERT INTO product_slots VALUES(21,183); +INSERT INTO product_slots VALUES(21,184); +INSERT INTO product_slots VALUES(21,185); +INSERT INTO product_slots VALUES(21,186); +INSERT INTO product_slots VALUES(21,187); +INSERT INTO product_slots VALUES(21,188); +INSERT INTO product_slots VALUES(21,189); +INSERT INTO product_slots VALUES(21,190); +INSERT INTO product_slots VALUES(21,191); +INSERT INTO product_slots VALUES(21,192); +INSERT INTO product_slots VALUES(21,193); +INSERT INTO product_slots VALUES(21,194); +INSERT INTO product_slots VALUES(21,195); +INSERT INTO product_slots VALUES(21,196); +INSERT INTO product_slots VALUES(21,197); +INSERT INTO product_slots VALUES(21,198); +INSERT INTO product_slots VALUES(21,199); +INSERT INTO product_slots VALUES(21,200); +INSERT INTO product_slots VALUES(21,201); +INSERT INTO product_slots VALUES(21,202); +INSERT INTO product_slots VALUES(21,203); +INSERT INTO product_slots VALUES(21,204); +INSERT INTO product_slots VALUES(21,205); +INSERT INTO product_slots VALUES(21,206); +INSERT INTO product_slots VALUES(21,207); +INSERT INTO product_slots VALUES(21,208); +INSERT INTO product_slots VALUES(21,209); +INSERT INTO product_slots VALUES(21,210); +INSERT INTO product_slots VALUES(21,211); +INSERT INTO product_slots VALUES(21,212); +INSERT INTO product_slots VALUES(21,213); +INSERT INTO product_slots VALUES(21,214); +INSERT INTO product_slots VALUES(21,215); +INSERT INTO product_slots VALUES(21,216); +INSERT INTO product_slots VALUES(21,217); +INSERT INTO product_slots VALUES(21,218); +INSERT INTO product_slots VALUES(21,219); +INSERT INTO product_slots VALUES(21,220); +INSERT INTO product_slots VALUES(21,221); +INSERT INTO product_slots VALUES(21,222); +INSERT INTO product_slots VALUES(21,223); +INSERT INTO product_slots VALUES(21,224); +INSERT INTO product_slots VALUES(21,225); +INSERT INTO product_slots VALUES(21,226); +INSERT INTO product_slots VALUES(21,227); +INSERT INTO product_slots VALUES(21,228); +INSERT INTO product_slots VALUES(21,229); +INSERT INTO product_slots VALUES(21,230); +INSERT INTO product_slots VALUES(21,231); +INSERT INTO product_slots VALUES(21,232); +INSERT INTO product_slots VALUES(21,234); +INSERT INTO product_slots VALUES(21,235); +INSERT INTO product_slots VALUES(21,236); +INSERT INTO product_slots VALUES(21,237); +INSERT INTO product_slots VALUES(21,238); +INSERT INTO product_slots VALUES(21,239); +INSERT INTO product_slots VALUES(21,240); +INSERT INTO product_slots VALUES(21,241); +INSERT INTO product_slots VALUES(21,242); +INSERT INTO product_slots VALUES(21,243); +INSERT INTO product_slots VALUES(21,244); +INSERT INTO product_slots VALUES(21,274); +INSERT INTO product_slots VALUES(21,275); +INSERT INTO product_slots VALUES(21,279); +INSERT INTO product_slots VALUES(21,280); +INSERT INTO product_slots VALUES(21,281); +INSERT INTO product_slots VALUES(21,282); +INSERT INTO product_slots VALUES(22,12); +INSERT INTO product_slots VALUES(22,18); +INSERT INTO product_slots VALUES(22,20); +INSERT INTO product_slots VALUES(22,21); +INSERT INTO product_slots VALUES(22,22); +INSERT INTO product_slots VALUES(22,33); +INSERT INTO product_slots VALUES(22,35); +INSERT INTO product_slots VALUES(22,37); +INSERT INTO product_slots VALUES(22,38); +INSERT INTO product_slots VALUES(22,40); +INSERT INTO product_slots VALUES(22,203); +INSERT INTO product_slots VALUES(22,204); +INSERT INTO product_slots VALUES(22,205); +INSERT INTO product_slots VALUES(22,206); +INSERT INTO product_slots VALUES(22,207); +INSERT INTO product_slots VALUES(22,208); +INSERT INTO product_slots VALUES(22,209); +INSERT INTO product_slots VALUES(22,210); +INSERT INTO product_slots VALUES(22,211); +INSERT INTO product_slots VALUES(22,212); +INSERT INTO product_slots VALUES(22,213); +INSERT INTO product_slots VALUES(22,214); +INSERT INTO product_slots VALUES(22,215); +INSERT INTO product_slots VALUES(22,216); +INSERT INTO product_slots VALUES(22,217); +INSERT INTO product_slots VALUES(22,218); +INSERT INTO product_slots VALUES(22,219); +INSERT INTO product_slots VALUES(22,220); +INSERT INTO product_slots VALUES(22,221); +INSERT INTO product_slots VALUES(22,222); +INSERT INTO product_slots VALUES(22,223); +INSERT INTO product_slots VALUES(22,224); +INSERT INTO product_slots VALUES(22,225); +INSERT INTO product_slots VALUES(22,226); +INSERT INTO product_slots VALUES(22,227); +INSERT INTO product_slots VALUES(22,228); +INSERT INTO product_slots VALUES(22,229); +INSERT INTO product_slots VALUES(22,230); +INSERT INTO product_slots VALUES(22,231); +INSERT INTO product_slots VALUES(22,232); +INSERT INTO product_slots VALUES(22,233); +INSERT INTO product_slots VALUES(22,234); +INSERT INTO product_slots VALUES(22,235); +INSERT INTO product_slots VALUES(22,236); +INSERT INTO product_slots VALUES(22,237); +INSERT INTO product_slots VALUES(22,238); +INSERT INTO product_slots VALUES(22,239); +INSERT INTO product_slots VALUES(22,240); +INSERT INTO product_slots VALUES(22,241); +INSERT INTO product_slots VALUES(22,242); +INSERT INTO product_slots VALUES(22,243); +INSERT INTO product_slots VALUES(22,244); +INSERT INTO product_slots VALUES(22,274); +INSERT INTO product_slots VALUES(22,275); +INSERT INTO product_slots VALUES(22,279); +INSERT INTO product_slots VALUES(22,280); +INSERT INTO product_slots VALUES(22,281); +INSERT INTO product_slots VALUES(22,282); +INSERT INTO product_slots VALUES(22,283); +INSERT INTO product_slots VALUES(22,284); +INSERT INTO product_slots VALUES(22,285); +INSERT INTO product_slots VALUES(22,286); +INSERT INTO product_slots VALUES(22,287); +INSERT INTO product_slots VALUES(23,12); +INSERT INTO product_slots VALUES(23,18); +INSERT INTO product_slots VALUES(23,19); +INSERT INTO product_slots VALUES(23,20); +INSERT INTO product_slots VALUES(23,21); +INSERT INTO product_slots VALUES(23,22); +INSERT INTO product_slots VALUES(23,23); +INSERT INTO product_slots VALUES(23,31); +INSERT INTO product_slots VALUES(23,33); +INSERT INTO product_slots VALUES(23,35); +INSERT INTO product_slots VALUES(23,37); +INSERT INTO product_slots VALUES(23,38); +INSERT INTO product_slots VALUES(23,39); +INSERT INTO product_slots VALUES(23,40); +INSERT INTO product_slots VALUES(23,41); +INSERT INTO product_slots VALUES(23,43); +INSERT INTO product_slots VALUES(23,45); +INSERT INTO product_slots VALUES(23,46); +INSERT INTO product_slots VALUES(23,47); +INSERT INTO product_slots VALUES(23,48); +INSERT INTO product_slots VALUES(23,49); +INSERT INTO product_slots VALUES(23,50); +INSERT INTO product_slots VALUES(23,51); +INSERT INTO product_slots VALUES(23,52); +INSERT INTO product_slots VALUES(23,53); +INSERT INTO product_slots VALUES(23,54); +INSERT INTO product_slots VALUES(23,55); +INSERT INTO product_slots VALUES(23,56); +INSERT INTO product_slots VALUES(23,57); +INSERT INTO product_slots VALUES(23,58); +INSERT INTO product_slots VALUES(23,59); +INSERT INTO product_slots VALUES(23,60); +INSERT INTO product_slots VALUES(23,61); +INSERT INTO product_slots VALUES(23,62); +INSERT INTO product_slots VALUES(23,63); +INSERT INTO product_slots VALUES(23,64); +INSERT INTO product_slots VALUES(23,65); +INSERT INTO product_slots VALUES(23,66); +INSERT INTO product_slots VALUES(23,67); +INSERT INTO product_slots VALUES(23,68); +INSERT INTO product_slots VALUES(23,69); +INSERT INTO product_slots VALUES(23,70); +INSERT INTO product_slots VALUES(23,71); +INSERT INTO product_slots VALUES(23,72); +INSERT INTO product_slots VALUES(23,73); +INSERT INTO product_slots VALUES(23,74); +INSERT INTO product_slots VALUES(23,75); +INSERT INTO product_slots VALUES(23,76); +INSERT INTO product_slots VALUES(23,77); +INSERT INTO product_slots VALUES(23,78); +INSERT INTO product_slots VALUES(23,79); +INSERT INTO product_slots VALUES(23,80); +INSERT INTO product_slots VALUES(23,81); +INSERT INTO product_slots VALUES(23,82); +INSERT INTO product_slots VALUES(23,83); +INSERT INTO product_slots VALUES(23,84); +INSERT INTO product_slots VALUES(23,85); +INSERT INTO product_slots VALUES(23,86); +INSERT INTO product_slots VALUES(23,87); +INSERT INTO product_slots VALUES(23,88); +INSERT INTO product_slots VALUES(23,89); +INSERT INTO product_slots VALUES(23,90); +INSERT INTO product_slots VALUES(23,91); +INSERT INTO product_slots VALUES(23,92); +INSERT INTO product_slots VALUES(23,93); +INSERT INTO product_slots VALUES(23,94); +INSERT INTO product_slots VALUES(23,95); +INSERT INTO product_slots VALUES(23,96); +INSERT INTO product_slots VALUES(23,97); +INSERT INTO product_slots VALUES(23,98); +INSERT INTO product_slots VALUES(23,99); +INSERT INTO product_slots VALUES(23,100); +INSERT INTO product_slots VALUES(23,101); +INSERT INTO product_slots VALUES(23,102); +INSERT INTO product_slots VALUES(23,103); +INSERT INTO product_slots VALUES(23,104); +INSERT INTO product_slots VALUES(23,105); +INSERT INTO product_slots VALUES(23,106); +INSERT INTO product_slots VALUES(23,107); +INSERT INTO product_slots VALUES(23,108); +INSERT INTO product_slots VALUES(23,109); +INSERT INTO product_slots VALUES(23,110); +INSERT INTO product_slots VALUES(23,111); +INSERT INTO product_slots VALUES(23,112); +INSERT INTO product_slots VALUES(23,113); +INSERT INTO product_slots VALUES(23,114); +INSERT INTO product_slots VALUES(23,115); +INSERT INTO product_slots VALUES(23,116); +INSERT INTO product_slots VALUES(23,117); +INSERT INTO product_slots VALUES(23,118); +INSERT INTO product_slots VALUES(23,119); +INSERT INTO product_slots VALUES(23,120); +INSERT INTO product_slots VALUES(23,121); +INSERT INTO product_slots VALUES(23,122); +INSERT INTO product_slots VALUES(23,123); +INSERT INTO product_slots VALUES(23,124); +INSERT INTO product_slots VALUES(23,125); +INSERT INTO product_slots VALUES(23,126); +INSERT INTO product_slots VALUES(23,127); +INSERT INTO product_slots VALUES(23,128); +INSERT INTO product_slots VALUES(23,129); +INSERT INTO product_slots VALUES(23,130); +INSERT INTO product_slots VALUES(23,131); +INSERT INTO product_slots VALUES(23,132); +INSERT INTO product_slots VALUES(23,133); +INSERT INTO product_slots VALUES(23,134); +INSERT INTO product_slots VALUES(23,135); +INSERT INTO product_slots VALUES(23,136); +INSERT INTO product_slots VALUES(23,137); +INSERT INTO product_slots VALUES(23,138); +INSERT INTO product_slots VALUES(23,139); +INSERT INTO product_slots VALUES(23,140); +INSERT INTO product_slots VALUES(23,141); +INSERT INTO product_slots VALUES(23,142); +INSERT INTO product_slots VALUES(23,143); +INSERT INTO product_slots VALUES(23,144); +INSERT INTO product_slots VALUES(23,145); +INSERT INTO product_slots VALUES(23,146); +INSERT INTO product_slots VALUES(23,147); +INSERT INTO product_slots VALUES(23,148); +INSERT INTO product_slots VALUES(23,149); +INSERT INTO product_slots VALUES(23,150); +INSERT INTO product_slots VALUES(23,151); +INSERT INTO product_slots VALUES(23,152); +INSERT INTO product_slots VALUES(23,153); +INSERT INTO product_slots VALUES(23,154); +INSERT INTO product_slots VALUES(23,155); +INSERT INTO product_slots VALUES(23,156); +INSERT INTO product_slots VALUES(23,157); +INSERT INTO product_slots VALUES(23,158); +INSERT INTO product_slots VALUES(23,159); +INSERT INTO product_slots VALUES(23,160); +INSERT INTO product_slots VALUES(23,161); +INSERT INTO product_slots VALUES(23,162); +INSERT INTO product_slots VALUES(23,163); +INSERT INTO product_slots VALUES(23,164); +INSERT INTO product_slots VALUES(23,165); +INSERT INTO product_slots VALUES(23,166); +INSERT INTO product_slots VALUES(23,167); +INSERT INTO product_slots VALUES(23,168); +INSERT INTO product_slots VALUES(23,169); +INSERT INTO product_slots VALUES(23,170); +INSERT INTO product_slots VALUES(23,171); +INSERT INTO product_slots VALUES(23,172); +INSERT INTO product_slots VALUES(23,173); +INSERT INTO product_slots VALUES(23,174); +INSERT INTO product_slots VALUES(23,175); +INSERT INTO product_slots VALUES(23,176); +INSERT INTO product_slots VALUES(23,177); +INSERT INTO product_slots VALUES(23,178); +INSERT INTO product_slots VALUES(23,179); +INSERT INTO product_slots VALUES(23,180); +INSERT INTO product_slots VALUES(23,181); +INSERT INTO product_slots VALUES(23,182); +INSERT INTO product_slots VALUES(23,183); +INSERT INTO product_slots VALUES(23,184); +INSERT INTO product_slots VALUES(23,185); +INSERT INTO product_slots VALUES(23,186); +INSERT INTO product_slots VALUES(23,187); +INSERT INTO product_slots VALUES(23,188); +INSERT INTO product_slots VALUES(23,189); +INSERT INTO product_slots VALUES(23,190); +INSERT INTO product_slots VALUES(23,191); +INSERT INTO product_slots VALUES(23,192); +INSERT INTO product_slots VALUES(23,193); +INSERT INTO product_slots VALUES(23,194); +INSERT INTO product_slots VALUES(23,195); +INSERT INTO product_slots VALUES(23,196); +INSERT INTO product_slots VALUES(23,197); +INSERT INTO product_slots VALUES(23,198); +INSERT INTO product_slots VALUES(23,199); +INSERT INTO product_slots VALUES(23,200); +INSERT INTO product_slots VALUES(23,201); +INSERT INTO product_slots VALUES(23,202); +INSERT INTO product_slots VALUES(23,203); +INSERT INTO product_slots VALUES(23,204); +INSERT INTO product_slots VALUES(23,205); +INSERT INTO product_slots VALUES(23,206); +INSERT INTO product_slots VALUES(23,207); +INSERT INTO product_slots VALUES(23,208); +INSERT INTO product_slots VALUES(23,209); +INSERT INTO product_slots VALUES(23,210); +INSERT INTO product_slots VALUES(23,211); +INSERT INTO product_slots VALUES(23,212); +INSERT INTO product_slots VALUES(23,213); +INSERT INTO product_slots VALUES(23,214); +INSERT INTO product_slots VALUES(23,215); +INSERT INTO product_slots VALUES(23,216); +INSERT INTO product_slots VALUES(23,217); +INSERT INTO product_slots VALUES(23,218); +INSERT INTO product_slots VALUES(23,219); +INSERT INTO product_slots VALUES(23,220); +INSERT INTO product_slots VALUES(23,221); +INSERT INTO product_slots VALUES(23,222); +INSERT INTO product_slots VALUES(23,223); +INSERT INTO product_slots VALUES(23,224); +INSERT INTO product_slots VALUES(23,225); +INSERT INTO product_slots VALUES(23,226); +INSERT INTO product_slots VALUES(23,227); +INSERT INTO product_slots VALUES(23,228); +INSERT INTO product_slots VALUES(23,229); +INSERT INTO product_slots VALUES(23,230); +INSERT INTO product_slots VALUES(23,231); +INSERT INTO product_slots VALUES(23,232); +INSERT INTO product_slots VALUES(23,234); +INSERT INTO product_slots VALUES(23,235); +INSERT INTO product_slots VALUES(23,236); +INSERT INTO product_slots VALUES(23,237); +INSERT INTO product_slots VALUES(23,238); +INSERT INTO product_slots VALUES(23,239); +INSERT INTO product_slots VALUES(23,240); +INSERT INTO product_slots VALUES(23,241); +INSERT INTO product_slots VALUES(23,242); +INSERT INTO product_slots VALUES(23,243); +INSERT INTO product_slots VALUES(23,244); +INSERT INTO product_slots VALUES(23,274); +INSERT INTO product_slots VALUES(23,275); +INSERT INTO product_slots VALUES(23,279); +INSERT INTO product_slots VALUES(23,280); +INSERT INTO product_slots VALUES(23,281); +INSERT INTO product_slots VALUES(23,282); +INSERT INTO product_slots VALUES(24,12); +INSERT INTO product_slots VALUES(24,18); +INSERT INTO product_slots VALUES(24,19); +INSERT INTO product_slots VALUES(24,20); +INSERT INTO product_slots VALUES(24,21); +INSERT INTO product_slots VALUES(24,22); +INSERT INTO product_slots VALUES(24,23); +INSERT INTO product_slots VALUES(24,31); +INSERT INTO product_slots VALUES(24,33); +INSERT INTO product_slots VALUES(24,35); +INSERT INTO product_slots VALUES(24,37); +INSERT INTO product_slots VALUES(24,38); +INSERT INTO product_slots VALUES(24,39); +INSERT INTO product_slots VALUES(24,40); +INSERT INTO product_slots VALUES(24,41); +INSERT INTO product_slots VALUES(24,43); +INSERT INTO product_slots VALUES(24,45); +INSERT INTO product_slots VALUES(24,46); +INSERT INTO product_slots VALUES(24,47); +INSERT INTO product_slots VALUES(24,48); +INSERT INTO product_slots VALUES(24,49); +INSERT INTO product_slots VALUES(24,50); +INSERT INTO product_slots VALUES(24,51); +INSERT INTO product_slots VALUES(24,52); +INSERT INTO product_slots VALUES(24,53); +INSERT INTO product_slots VALUES(24,54); +INSERT INTO product_slots VALUES(24,55); +INSERT INTO product_slots VALUES(24,56); +INSERT INTO product_slots VALUES(24,57); +INSERT INTO product_slots VALUES(24,58); +INSERT INTO product_slots VALUES(24,59); +INSERT INTO product_slots VALUES(24,60); +INSERT INTO product_slots VALUES(24,61); +INSERT INTO product_slots VALUES(24,62); +INSERT INTO product_slots VALUES(24,63); +INSERT INTO product_slots VALUES(24,64); +INSERT INTO product_slots VALUES(24,65); +INSERT INTO product_slots VALUES(24,66); +INSERT INTO product_slots VALUES(24,67); +INSERT INTO product_slots VALUES(24,68); +INSERT INTO product_slots VALUES(24,69); +INSERT INTO product_slots VALUES(24,70); +INSERT INTO product_slots VALUES(24,71); +INSERT INTO product_slots VALUES(24,72); +INSERT INTO product_slots VALUES(24,73); +INSERT INTO product_slots VALUES(24,74); +INSERT INTO product_slots VALUES(24,75); +INSERT INTO product_slots VALUES(24,76); +INSERT INTO product_slots VALUES(24,77); +INSERT INTO product_slots VALUES(24,78); +INSERT INTO product_slots VALUES(24,79); +INSERT INTO product_slots VALUES(24,80); +INSERT INTO product_slots VALUES(24,81); +INSERT INTO product_slots VALUES(24,82); +INSERT INTO product_slots VALUES(24,83); +INSERT INTO product_slots VALUES(24,84); +INSERT INTO product_slots VALUES(24,85); +INSERT INTO product_slots VALUES(24,86); +INSERT INTO product_slots VALUES(24,87); +INSERT INTO product_slots VALUES(24,88); +INSERT INTO product_slots VALUES(24,89); +INSERT INTO product_slots VALUES(24,90); +INSERT INTO product_slots VALUES(24,91); +INSERT INTO product_slots VALUES(24,92); +INSERT INTO product_slots VALUES(24,93); +INSERT INTO product_slots VALUES(24,94); +INSERT INTO product_slots VALUES(24,95); +INSERT INTO product_slots VALUES(24,96); +INSERT INTO product_slots VALUES(24,97); +INSERT INTO product_slots VALUES(24,98); +INSERT INTO product_slots VALUES(24,99); +INSERT INTO product_slots VALUES(24,100); +INSERT INTO product_slots VALUES(24,101); +INSERT INTO product_slots VALUES(24,102); +INSERT INTO product_slots VALUES(24,103); +INSERT INTO product_slots VALUES(24,104); +INSERT INTO product_slots VALUES(24,105); +INSERT INTO product_slots VALUES(24,106); +INSERT INTO product_slots VALUES(24,107); +INSERT INTO product_slots VALUES(24,108); +INSERT INTO product_slots VALUES(24,109); +INSERT INTO product_slots VALUES(24,110); +INSERT INTO product_slots VALUES(24,111); +INSERT INTO product_slots VALUES(24,112); +INSERT INTO product_slots VALUES(24,113); +INSERT INTO product_slots VALUES(24,114); +INSERT INTO product_slots VALUES(24,115); +INSERT INTO product_slots VALUES(24,116); +INSERT INTO product_slots VALUES(24,117); +INSERT INTO product_slots VALUES(24,118); +INSERT INTO product_slots VALUES(24,119); +INSERT INTO product_slots VALUES(24,120); +INSERT INTO product_slots VALUES(24,121); +INSERT INTO product_slots VALUES(24,122); +INSERT INTO product_slots VALUES(24,123); +INSERT INTO product_slots VALUES(24,124); +INSERT INTO product_slots VALUES(24,125); +INSERT INTO product_slots VALUES(24,126); +INSERT INTO product_slots VALUES(24,127); +INSERT INTO product_slots VALUES(24,128); +INSERT INTO product_slots VALUES(24,129); +INSERT INTO product_slots VALUES(24,130); +INSERT INTO product_slots VALUES(24,131); +INSERT INTO product_slots VALUES(24,132); +INSERT INTO product_slots VALUES(24,133); +INSERT INTO product_slots VALUES(24,134); +INSERT INTO product_slots VALUES(24,135); +INSERT INTO product_slots VALUES(24,136); +INSERT INTO product_slots VALUES(24,137); +INSERT INTO product_slots VALUES(24,138); +INSERT INTO product_slots VALUES(24,139); +INSERT INTO product_slots VALUES(24,140); +INSERT INTO product_slots VALUES(24,141); +INSERT INTO product_slots VALUES(24,142); +INSERT INTO product_slots VALUES(24,143); +INSERT INTO product_slots VALUES(24,144); +INSERT INTO product_slots VALUES(24,145); +INSERT INTO product_slots VALUES(24,146); +INSERT INTO product_slots VALUES(24,147); +INSERT INTO product_slots VALUES(24,148); +INSERT INTO product_slots VALUES(24,149); +INSERT INTO product_slots VALUES(24,150); +INSERT INTO product_slots VALUES(24,151); +INSERT INTO product_slots VALUES(24,152); +INSERT INTO product_slots VALUES(24,153); +INSERT INTO product_slots VALUES(24,154); +INSERT INTO product_slots VALUES(24,155); +INSERT INTO product_slots VALUES(24,156); +INSERT INTO product_slots VALUES(24,157); +INSERT INTO product_slots VALUES(24,158); +INSERT INTO product_slots VALUES(24,159); +INSERT INTO product_slots VALUES(24,160); +INSERT INTO product_slots VALUES(24,161); +INSERT INTO product_slots VALUES(24,162); +INSERT INTO product_slots VALUES(24,163); +INSERT INTO product_slots VALUES(24,164); +INSERT INTO product_slots VALUES(24,165); +INSERT INTO product_slots VALUES(24,166); +INSERT INTO product_slots VALUES(24,167); +INSERT INTO product_slots VALUES(24,168); +INSERT INTO product_slots VALUES(24,169); +INSERT INTO product_slots VALUES(24,170); +INSERT INTO product_slots VALUES(24,171); +INSERT INTO product_slots VALUES(24,172); +INSERT INTO product_slots VALUES(24,173); +INSERT INTO product_slots VALUES(24,174); +INSERT INTO product_slots VALUES(24,175); +INSERT INTO product_slots VALUES(24,176); +INSERT INTO product_slots VALUES(24,177); +INSERT INTO product_slots VALUES(24,178); +INSERT INTO product_slots VALUES(24,179); +INSERT INTO product_slots VALUES(24,180); +INSERT INTO product_slots VALUES(24,181); +INSERT INTO product_slots VALUES(24,182); +INSERT INTO product_slots VALUES(24,183); +INSERT INTO product_slots VALUES(24,184); +INSERT INTO product_slots VALUES(24,185); +INSERT INTO product_slots VALUES(24,186); +INSERT INTO product_slots VALUES(24,187); +INSERT INTO product_slots VALUES(24,188); +INSERT INTO product_slots VALUES(24,189); +INSERT INTO product_slots VALUES(24,190); +INSERT INTO product_slots VALUES(24,191); +INSERT INTO product_slots VALUES(24,192); +INSERT INTO product_slots VALUES(24,193); +INSERT INTO product_slots VALUES(24,194); +INSERT INTO product_slots VALUES(24,195); +INSERT INTO product_slots VALUES(24,196); +INSERT INTO product_slots VALUES(24,197); +INSERT INTO product_slots VALUES(24,198); +INSERT INTO product_slots VALUES(24,199); +INSERT INTO product_slots VALUES(24,200); +INSERT INTO product_slots VALUES(24,201); +INSERT INTO product_slots VALUES(24,202); +INSERT INTO product_slots VALUES(24,203); +INSERT INTO product_slots VALUES(24,204); +INSERT INTO product_slots VALUES(24,205); +INSERT INTO product_slots VALUES(24,206); +INSERT INTO product_slots VALUES(24,207); +INSERT INTO product_slots VALUES(24,208); +INSERT INTO product_slots VALUES(24,209); +INSERT INTO product_slots VALUES(24,210); +INSERT INTO product_slots VALUES(24,211); +INSERT INTO product_slots VALUES(24,212); +INSERT INTO product_slots VALUES(24,213); +INSERT INTO product_slots VALUES(24,214); +INSERT INTO product_slots VALUES(24,215); +INSERT INTO product_slots VALUES(24,216); +INSERT INTO product_slots VALUES(24,217); +INSERT INTO product_slots VALUES(24,218); +INSERT INTO product_slots VALUES(24,219); +INSERT INTO product_slots VALUES(24,220); +INSERT INTO product_slots VALUES(24,221); +INSERT INTO product_slots VALUES(24,222); +INSERT INTO product_slots VALUES(24,223); +INSERT INTO product_slots VALUES(24,224); +INSERT INTO product_slots VALUES(24,225); +INSERT INTO product_slots VALUES(24,226); +INSERT INTO product_slots VALUES(24,227); +INSERT INTO product_slots VALUES(24,228); +INSERT INTO product_slots VALUES(24,229); +INSERT INTO product_slots VALUES(24,230); +INSERT INTO product_slots VALUES(24,231); +INSERT INTO product_slots VALUES(24,232); +INSERT INTO product_slots VALUES(24,234); +INSERT INTO product_slots VALUES(24,235); +INSERT INTO product_slots VALUES(24,236); +INSERT INTO product_slots VALUES(24,237); +INSERT INTO product_slots VALUES(24,238); +INSERT INTO product_slots VALUES(24,239); +INSERT INTO product_slots VALUES(24,240); +INSERT INTO product_slots VALUES(24,241); +INSERT INTO product_slots VALUES(24,242); +INSERT INTO product_slots VALUES(24,243); +INSERT INTO product_slots VALUES(24,244); +INSERT INTO product_slots VALUES(24,274); +INSERT INTO product_slots VALUES(24,275); +INSERT INTO product_slots VALUES(24,279); +INSERT INTO product_slots VALUES(24,280); +INSERT INTO product_slots VALUES(24,281); +INSERT INTO product_slots VALUES(24,282); +INSERT INTO product_slots VALUES(25,10); +INSERT INTO product_slots VALUES(25,11); +INSERT INTO product_slots VALUES(25,12); +INSERT INTO product_slots VALUES(25,17); +INSERT INTO product_slots VALUES(25,18); +INSERT INTO product_slots VALUES(25,20); +INSERT INTO product_slots VALUES(25,21); +INSERT INTO product_slots VALUES(25,22); +INSERT INTO product_slots VALUES(25,33); +INSERT INTO product_slots VALUES(25,35); +INSERT INTO product_slots VALUES(25,37); +INSERT INTO product_slots VALUES(25,38); +INSERT INTO product_slots VALUES(25,39); +INSERT INTO product_slots VALUES(25,40); +INSERT INTO product_slots VALUES(25,43); +INSERT INTO product_slots VALUES(25,45); +INSERT INTO product_slots VALUES(25,46); +INSERT INTO product_slots VALUES(25,48); +INSERT INTO product_slots VALUES(25,49); +INSERT INTO product_slots VALUES(25,51); +INSERT INTO product_slots VALUES(25,52); +INSERT INTO product_slots VALUES(25,53); +INSERT INTO product_slots VALUES(25,54); +INSERT INTO product_slots VALUES(25,57); +INSERT INTO product_slots VALUES(25,58); +INSERT INTO product_slots VALUES(25,59); +INSERT INTO product_slots VALUES(25,60); +INSERT INTO product_slots VALUES(25,61); +INSERT INTO product_slots VALUES(25,62); +INSERT INTO product_slots VALUES(25,63); +INSERT INTO product_slots VALUES(25,64); +INSERT INTO product_slots VALUES(25,65); +INSERT INTO product_slots VALUES(25,66); +INSERT INTO product_slots VALUES(25,67); +INSERT INTO product_slots VALUES(25,68); +INSERT INTO product_slots VALUES(25,69); +INSERT INTO product_slots VALUES(25,70); +INSERT INTO product_slots VALUES(25,71); +INSERT INTO product_slots VALUES(25,72); +INSERT INTO product_slots VALUES(25,73); +INSERT INTO product_slots VALUES(25,74); +INSERT INTO product_slots VALUES(25,75); +INSERT INTO product_slots VALUES(25,76); +INSERT INTO product_slots VALUES(25,77); +INSERT INTO product_slots VALUES(25,78); +INSERT INTO product_slots VALUES(25,79); +INSERT INTO product_slots VALUES(25,80); +INSERT INTO product_slots VALUES(25,81); +INSERT INTO product_slots VALUES(25,82); +INSERT INTO product_slots VALUES(25,83); +INSERT INTO product_slots VALUES(25,84); +INSERT INTO product_slots VALUES(25,85); +INSERT INTO product_slots VALUES(25,86); +INSERT INTO product_slots VALUES(25,87); +INSERT INTO product_slots VALUES(25,88); +INSERT INTO product_slots VALUES(25,89); +INSERT INTO product_slots VALUES(25,90); +INSERT INTO product_slots VALUES(25,91); +INSERT INTO product_slots VALUES(25,92); +INSERT INTO product_slots VALUES(25,93); +INSERT INTO product_slots VALUES(25,94); +INSERT INTO product_slots VALUES(25,95); +INSERT INTO product_slots VALUES(25,96); +INSERT INTO product_slots VALUES(25,97); +INSERT INTO product_slots VALUES(25,98); +INSERT INTO product_slots VALUES(25,99); +INSERT INTO product_slots VALUES(25,100); +INSERT INTO product_slots VALUES(25,102); +INSERT INTO product_slots VALUES(25,103); +INSERT INTO product_slots VALUES(25,104); +INSERT INTO product_slots VALUES(25,105); +INSERT INTO product_slots VALUES(25,106); +INSERT INTO product_slots VALUES(25,107); +INSERT INTO product_slots VALUES(25,108); +INSERT INTO product_slots VALUES(25,109); +INSERT INTO product_slots VALUES(25,110); +INSERT INTO product_slots VALUES(25,111); +INSERT INTO product_slots VALUES(25,112); +INSERT INTO product_slots VALUES(25,113); +INSERT INTO product_slots VALUES(25,114); +INSERT INTO product_slots VALUES(25,115); +INSERT INTO product_slots VALUES(25,117); +INSERT INTO product_slots VALUES(25,118); +INSERT INTO product_slots VALUES(25,119); +INSERT INTO product_slots VALUES(25,120); +INSERT INTO product_slots VALUES(25,121); +INSERT INTO product_slots VALUES(25,122); +INSERT INTO product_slots VALUES(25,123); +INSERT INTO product_slots VALUES(25,124); +INSERT INTO product_slots VALUES(25,125); +INSERT INTO product_slots VALUES(25,126); +INSERT INTO product_slots VALUES(25,127); +INSERT INTO product_slots VALUES(25,128); +INSERT INTO product_slots VALUES(25,129); +INSERT INTO product_slots VALUES(25,130); +INSERT INTO product_slots VALUES(25,131); +INSERT INTO product_slots VALUES(25,132); +INSERT INTO product_slots VALUES(25,133); +INSERT INTO product_slots VALUES(25,134); +INSERT INTO product_slots VALUES(25,135); +INSERT INTO product_slots VALUES(25,136); +INSERT INTO product_slots VALUES(25,138); +INSERT INTO product_slots VALUES(25,139); +INSERT INTO product_slots VALUES(25,140); +INSERT INTO product_slots VALUES(25,141); +INSERT INTO product_slots VALUES(25,142); +INSERT INTO product_slots VALUES(25,143); +INSERT INTO product_slots VALUES(25,145); +INSERT INTO product_slots VALUES(25,146); +INSERT INTO product_slots VALUES(25,147); +INSERT INTO product_slots VALUES(25,148); +INSERT INTO product_slots VALUES(25,149); +INSERT INTO product_slots VALUES(25,150); +INSERT INTO product_slots VALUES(25,151); +INSERT INTO product_slots VALUES(25,152); +INSERT INTO product_slots VALUES(25,153); +INSERT INTO product_slots VALUES(25,154); +INSERT INTO product_slots VALUES(25,155); +INSERT INTO product_slots VALUES(25,156); +INSERT INTO product_slots VALUES(25,157); +INSERT INTO product_slots VALUES(25,158); +INSERT INTO product_slots VALUES(25,159); +INSERT INTO product_slots VALUES(25,160); +INSERT INTO product_slots VALUES(25,161); +INSERT INTO product_slots VALUES(25,162); +INSERT INTO product_slots VALUES(25,163); +INSERT INTO product_slots VALUES(25,164); +INSERT INTO product_slots VALUES(25,165); +INSERT INTO product_slots VALUES(25,166); +INSERT INTO product_slots VALUES(25,167); +INSERT INTO product_slots VALUES(25,168); +INSERT INTO product_slots VALUES(25,169); +INSERT INTO product_slots VALUES(25,170); +INSERT INTO product_slots VALUES(25,171); +INSERT INTO product_slots VALUES(25,172); +INSERT INTO product_slots VALUES(25,173); +INSERT INTO product_slots VALUES(25,174); +INSERT INTO product_slots VALUES(25,175); +INSERT INTO product_slots VALUES(25,176); +INSERT INTO product_slots VALUES(25,177); +INSERT INTO product_slots VALUES(25,178); +INSERT INTO product_slots VALUES(25,179); +INSERT INTO product_slots VALUES(25,180); +INSERT INTO product_slots VALUES(25,181); +INSERT INTO product_slots VALUES(25,182); +INSERT INTO product_slots VALUES(25,183); +INSERT INTO product_slots VALUES(25,184); +INSERT INTO product_slots VALUES(25,185); +INSERT INTO product_slots VALUES(25,186); +INSERT INTO product_slots VALUES(25,187); +INSERT INTO product_slots VALUES(25,188); +INSERT INTO product_slots VALUES(25,189); +INSERT INTO product_slots VALUES(25,190); +INSERT INTO product_slots VALUES(25,191); +INSERT INTO product_slots VALUES(25,192); +INSERT INTO product_slots VALUES(25,193); +INSERT INTO product_slots VALUES(25,194); +INSERT INTO product_slots VALUES(25,195); +INSERT INTO product_slots VALUES(25,196); +INSERT INTO product_slots VALUES(25,197); +INSERT INTO product_slots VALUES(25,198); +INSERT INTO product_slots VALUES(25,199); +INSERT INTO product_slots VALUES(25,200); +INSERT INTO product_slots VALUES(25,201); +INSERT INTO product_slots VALUES(25,202); +INSERT INTO product_slots VALUES(25,203); +INSERT INTO product_slots VALUES(25,204); +INSERT INTO product_slots VALUES(25,205); +INSERT INTO product_slots VALUES(25,206); +INSERT INTO product_slots VALUES(25,207); +INSERT INTO product_slots VALUES(25,208); +INSERT INTO product_slots VALUES(25,209); +INSERT INTO product_slots VALUES(25,210); +INSERT INTO product_slots VALUES(25,211); +INSERT INTO product_slots VALUES(25,212); +INSERT INTO product_slots VALUES(25,213); +INSERT INTO product_slots VALUES(25,214); +INSERT INTO product_slots VALUES(25,215); +INSERT INTO product_slots VALUES(25,216); +INSERT INTO product_slots VALUES(25,217); +INSERT INTO product_slots VALUES(25,218); +INSERT INTO product_slots VALUES(25,219); +INSERT INTO product_slots VALUES(25,220); +INSERT INTO product_slots VALUES(25,221); +INSERT INTO product_slots VALUES(25,222); +INSERT INTO product_slots VALUES(25,223); +INSERT INTO product_slots VALUES(25,224); +INSERT INTO product_slots VALUES(25,225); +INSERT INTO product_slots VALUES(25,226); +INSERT INTO product_slots VALUES(25,227); +INSERT INTO product_slots VALUES(25,228); +INSERT INTO product_slots VALUES(25,229); +INSERT INTO product_slots VALUES(25,230); +INSERT INTO product_slots VALUES(25,231); +INSERT INTO product_slots VALUES(25,232); +INSERT INTO product_slots VALUES(25,233); +INSERT INTO product_slots VALUES(25,234); +INSERT INTO product_slots VALUES(25,235); +INSERT INTO product_slots VALUES(25,236); +INSERT INTO product_slots VALUES(25,237); +INSERT INTO product_slots VALUES(25,238); +INSERT INTO product_slots VALUES(25,239); +INSERT INTO product_slots VALUES(25,240); +INSERT INTO product_slots VALUES(25,241); +INSERT INTO product_slots VALUES(25,242); +INSERT INTO product_slots VALUES(25,243); +INSERT INTO product_slots VALUES(25,244); +INSERT INTO product_slots VALUES(25,274); +INSERT INTO product_slots VALUES(25,275); +INSERT INTO product_slots VALUES(25,279); +INSERT INTO product_slots VALUES(25,280); +INSERT INTO product_slots VALUES(25,281); +INSERT INTO product_slots VALUES(25,282); +INSERT INTO product_slots VALUES(25,283); +INSERT INTO product_slots VALUES(25,284); +INSERT INTO product_slots VALUES(25,285); +INSERT INTO product_slots VALUES(25,286); +INSERT INTO product_slots VALUES(25,287); +INSERT INTO product_slots VALUES(26,17); +INSERT INTO product_slots VALUES(26,18); +INSERT INTO product_slots VALUES(26,20); +INSERT INTO product_slots VALUES(26,21); +INSERT INTO product_slots VALUES(26,22); +INSERT INTO product_slots VALUES(26,33); +INSERT INTO product_slots VALUES(26,35); +INSERT INTO product_slots VALUES(26,37); +INSERT INTO product_slots VALUES(26,38); +INSERT INTO product_slots VALUES(26,40); +INSERT INTO product_slots VALUES(26,64); +INSERT INTO product_slots VALUES(26,65); +INSERT INTO product_slots VALUES(26,66); +INSERT INTO product_slots VALUES(26,67); +INSERT INTO product_slots VALUES(26,68); +INSERT INTO product_slots VALUES(26,69); +INSERT INTO product_slots VALUES(26,70); +INSERT INTO product_slots VALUES(26,71); +INSERT INTO product_slots VALUES(26,72); +INSERT INTO product_slots VALUES(26,73); +INSERT INTO product_slots VALUES(26,74); +INSERT INTO product_slots VALUES(26,75); +INSERT INTO product_slots VALUES(26,76); +INSERT INTO product_slots VALUES(26,77); +INSERT INTO product_slots VALUES(26,78); +INSERT INTO product_slots VALUES(26,79); +INSERT INTO product_slots VALUES(26,80); +INSERT INTO product_slots VALUES(26,81); +INSERT INTO product_slots VALUES(26,82); +INSERT INTO product_slots VALUES(26,83); +INSERT INTO product_slots VALUES(26,84); +INSERT INTO product_slots VALUES(26,85); +INSERT INTO product_slots VALUES(26,86); +INSERT INTO product_slots VALUES(26,87); +INSERT INTO product_slots VALUES(26,88); +INSERT INTO product_slots VALUES(26,89); +INSERT INTO product_slots VALUES(26,90); +INSERT INTO product_slots VALUES(26,91); +INSERT INTO product_slots VALUES(26,92); +INSERT INTO product_slots VALUES(26,93); +INSERT INTO product_slots VALUES(26,94); +INSERT INTO product_slots VALUES(26,95); +INSERT INTO product_slots VALUES(26,96); +INSERT INTO product_slots VALUES(26,97); +INSERT INTO product_slots VALUES(26,98); +INSERT INTO product_slots VALUES(26,99); +INSERT INTO product_slots VALUES(26,100); +INSERT INTO product_slots VALUES(26,102); +INSERT INTO product_slots VALUES(26,103); +INSERT INTO product_slots VALUES(26,104); +INSERT INTO product_slots VALUES(26,105); +INSERT INTO product_slots VALUES(26,106); +INSERT INTO product_slots VALUES(26,107); +INSERT INTO product_slots VALUES(26,108); +INSERT INTO product_slots VALUES(26,109); +INSERT INTO product_slots VALUES(26,110); +INSERT INTO product_slots VALUES(26,111); +INSERT INTO product_slots VALUES(26,112); +INSERT INTO product_slots VALUES(26,113); +INSERT INTO product_slots VALUES(26,114); +INSERT INTO product_slots VALUES(26,115); +INSERT INTO product_slots VALUES(26,117); +INSERT INTO product_slots VALUES(26,118); +INSERT INTO product_slots VALUES(26,119); +INSERT INTO product_slots VALUES(26,120); +INSERT INTO product_slots VALUES(26,121); +INSERT INTO product_slots VALUES(26,122); +INSERT INTO product_slots VALUES(26,123); +INSERT INTO product_slots VALUES(26,124); +INSERT INTO product_slots VALUES(26,125); +INSERT INTO product_slots VALUES(26,126); +INSERT INTO product_slots VALUES(26,127); +INSERT INTO product_slots VALUES(26,128); +INSERT INTO product_slots VALUES(26,129); +INSERT INTO product_slots VALUES(26,130); +INSERT INTO product_slots VALUES(26,131); +INSERT INTO product_slots VALUES(26,132); +INSERT INTO product_slots VALUES(26,133); +INSERT INTO product_slots VALUES(26,134); +INSERT INTO product_slots VALUES(26,135); +INSERT INTO product_slots VALUES(26,136); +INSERT INTO product_slots VALUES(26,138); +INSERT INTO product_slots VALUES(26,139); +INSERT INTO product_slots VALUES(26,140); +INSERT INTO product_slots VALUES(26,141); +INSERT INTO product_slots VALUES(26,142); +INSERT INTO product_slots VALUES(26,143); +INSERT INTO product_slots VALUES(26,145); +INSERT INTO product_slots VALUES(26,146); +INSERT INTO product_slots VALUES(26,147); +INSERT INTO product_slots VALUES(26,148); +INSERT INTO product_slots VALUES(26,149); +INSERT INTO product_slots VALUES(26,150); +INSERT INTO product_slots VALUES(26,151); +INSERT INTO product_slots VALUES(26,152); +INSERT INTO product_slots VALUES(26,153); +INSERT INTO product_slots VALUES(26,154); +INSERT INTO product_slots VALUES(26,155); +INSERT INTO product_slots VALUES(26,156); +INSERT INTO product_slots VALUES(26,157); +INSERT INTO product_slots VALUES(26,158); +INSERT INTO product_slots VALUES(26,159); +INSERT INTO product_slots VALUES(26,160); +INSERT INTO product_slots VALUES(26,161); +INSERT INTO product_slots VALUES(26,162); +INSERT INTO product_slots VALUES(26,163); +INSERT INTO product_slots VALUES(26,164); +INSERT INTO product_slots VALUES(26,165); +INSERT INTO product_slots VALUES(26,166); +INSERT INTO product_slots VALUES(26,167); +INSERT INTO product_slots VALUES(26,168); +INSERT INTO product_slots VALUES(26,169); +INSERT INTO product_slots VALUES(26,170); +INSERT INTO product_slots VALUES(26,171); +INSERT INTO product_slots VALUES(26,172); +INSERT INTO product_slots VALUES(26,173); +INSERT INTO product_slots VALUES(26,174); +INSERT INTO product_slots VALUES(26,175); +INSERT INTO product_slots VALUES(26,176); +INSERT INTO product_slots VALUES(26,177); +INSERT INTO product_slots VALUES(26,178); +INSERT INTO product_slots VALUES(26,179); +INSERT INTO product_slots VALUES(26,180); +INSERT INTO product_slots VALUES(26,181); +INSERT INTO product_slots VALUES(26,182); +INSERT INTO product_slots VALUES(26,183); +INSERT INTO product_slots VALUES(26,184); +INSERT INTO product_slots VALUES(26,185); +INSERT INTO product_slots VALUES(26,186); +INSERT INTO product_slots VALUES(26,187); +INSERT INTO product_slots VALUES(26,188); +INSERT INTO product_slots VALUES(26,189); +INSERT INTO product_slots VALUES(26,190); +INSERT INTO product_slots VALUES(26,191); +INSERT INTO product_slots VALUES(26,192); +INSERT INTO product_slots VALUES(26,193); +INSERT INTO product_slots VALUES(26,194); +INSERT INTO product_slots VALUES(26,195); +INSERT INTO product_slots VALUES(26,196); +INSERT INTO product_slots VALUES(26,197); +INSERT INTO product_slots VALUES(26,198); +INSERT INTO product_slots VALUES(26,199); +INSERT INTO product_slots VALUES(26,200); +INSERT INTO product_slots VALUES(26,201); +INSERT INTO product_slots VALUES(26,202); +INSERT INTO product_slots VALUES(26,203); +INSERT INTO product_slots VALUES(26,204); +INSERT INTO product_slots VALUES(26,205); +INSERT INTO product_slots VALUES(26,206); +INSERT INTO product_slots VALUES(26,207); +INSERT INTO product_slots VALUES(26,208); +INSERT INTO product_slots VALUES(26,209); +INSERT INTO product_slots VALUES(26,210); +INSERT INTO product_slots VALUES(26,211); +INSERT INTO product_slots VALUES(26,212); +INSERT INTO product_slots VALUES(26,213); +INSERT INTO product_slots VALUES(26,214); +INSERT INTO product_slots VALUES(26,215); +INSERT INTO product_slots VALUES(26,216); +INSERT INTO product_slots VALUES(26,217); +INSERT INTO product_slots VALUES(26,218); +INSERT INTO product_slots VALUES(26,219); +INSERT INTO product_slots VALUES(26,220); +INSERT INTO product_slots VALUES(26,221); +INSERT INTO product_slots VALUES(26,222); +INSERT INTO product_slots VALUES(26,223); +INSERT INTO product_slots VALUES(26,224); +INSERT INTO product_slots VALUES(26,225); +INSERT INTO product_slots VALUES(26,226); +INSERT INTO product_slots VALUES(26,227); +INSERT INTO product_slots VALUES(26,228); +INSERT INTO product_slots VALUES(26,229); +INSERT INTO product_slots VALUES(26,230); +INSERT INTO product_slots VALUES(26,231); +INSERT INTO product_slots VALUES(26,232); +INSERT INTO product_slots VALUES(26,233); +INSERT INTO product_slots VALUES(26,234); +INSERT INTO product_slots VALUES(26,235); +INSERT INTO product_slots VALUES(26,236); +INSERT INTO product_slots VALUES(26,237); +INSERT INTO product_slots VALUES(26,238); +INSERT INTO product_slots VALUES(26,239); +INSERT INTO product_slots VALUES(26,240); +INSERT INTO product_slots VALUES(26,241); +INSERT INTO product_slots VALUES(26,242); +INSERT INTO product_slots VALUES(26,243); +INSERT INTO product_slots VALUES(26,244); +INSERT INTO product_slots VALUES(26,274); +INSERT INTO product_slots VALUES(26,275); +INSERT INTO product_slots VALUES(26,279); +INSERT INTO product_slots VALUES(26,280); +INSERT INTO product_slots VALUES(26,281); +INSERT INTO product_slots VALUES(26,282); +INSERT INTO product_slots VALUES(26,283); +INSERT INTO product_slots VALUES(26,284); +INSERT INTO product_slots VALUES(26,285); +INSERT INTO product_slots VALUES(26,286); +INSERT INTO product_slots VALUES(26,287); +INSERT INTO product_slots VALUES(27,18); +INSERT INTO product_slots VALUES(27,20); +INSERT INTO product_slots VALUES(27,21); +INSERT INTO product_slots VALUES(27,33); +INSERT INTO product_slots VALUES(27,35); +INSERT INTO product_slots VALUES(27,37); +INSERT INTO product_slots VALUES(27,38); +INSERT INTO product_slots VALUES(27,39); +INSERT INTO product_slots VALUES(27,40); +INSERT INTO product_slots VALUES(27,41); +INSERT INTO product_slots VALUES(27,43); +INSERT INTO product_slots VALUES(27,44); +INSERT INTO product_slots VALUES(27,45); +INSERT INTO product_slots VALUES(27,46); +INSERT INTO product_slots VALUES(27,47); +INSERT INTO product_slots VALUES(27,48); +INSERT INTO product_slots VALUES(27,49); +INSERT INTO product_slots VALUES(27,50); +INSERT INTO product_slots VALUES(27,51); +INSERT INTO product_slots VALUES(27,52); +INSERT INTO product_slots VALUES(27,53); +INSERT INTO product_slots VALUES(27,54); +INSERT INTO product_slots VALUES(27,55); +INSERT INTO product_slots VALUES(27,56); +INSERT INTO product_slots VALUES(27,57); +INSERT INTO product_slots VALUES(27,58); +INSERT INTO product_slots VALUES(27,59); +INSERT INTO product_slots VALUES(27,60); +INSERT INTO product_slots VALUES(27,61); +INSERT INTO product_slots VALUES(27,62); +INSERT INTO product_slots VALUES(27,63); +INSERT INTO product_slots VALUES(27,64); +INSERT INTO product_slots VALUES(27,65); +INSERT INTO product_slots VALUES(27,66); +INSERT INTO product_slots VALUES(27,67); +INSERT INTO product_slots VALUES(27,68); +INSERT INTO product_slots VALUES(27,69); +INSERT INTO product_slots VALUES(27,70); +INSERT INTO product_slots VALUES(27,71); +INSERT INTO product_slots VALUES(27,72); +INSERT INTO product_slots VALUES(27,73); +INSERT INTO product_slots VALUES(27,74); +INSERT INTO product_slots VALUES(27,75); +INSERT INTO product_slots VALUES(27,76); +INSERT INTO product_slots VALUES(27,77); +INSERT INTO product_slots VALUES(27,78); +INSERT INTO product_slots VALUES(27,79); +INSERT INTO product_slots VALUES(27,80); +INSERT INTO product_slots VALUES(27,81); +INSERT INTO product_slots VALUES(27,82); +INSERT INTO product_slots VALUES(27,83); +INSERT INTO product_slots VALUES(27,84); +INSERT INTO product_slots VALUES(27,85); +INSERT INTO product_slots VALUES(27,86); +INSERT INTO product_slots VALUES(27,87); +INSERT INTO product_slots VALUES(27,88); +INSERT INTO product_slots VALUES(27,89); +INSERT INTO product_slots VALUES(27,90); +INSERT INTO product_slots VALUES(27,91); +INSERT INTO product_slots VALUES(27,92); +INSERT INTO product_slots VALUES(27,93); +INSERT INTO product_slots VALUES(27,94); +INSERT INTO product_slots VALUES(27,95); +INSERT INTO product_slots VALUES(27,96); +INSERT INTO product_slots VALUES(27,97); +INSERT INTO product_slots VALUES(27,98); +INSERT INTO product_slots VALUES(27,99); +INSERT INTO product_slots VALUES(27,100); +INSERT INTO product_slots VALUES(27,101); +INSERT INTO product_slots VALUES(27,102); +INSERT INTO product_slots VALUES(27,103); +INSERT INTO product_slots VALUES(27,104); +INSERT INTO product_slots VALUES(27,105); +INSERT INTO product_slots VALUES(27,106); +INSERT INTO product_slots VALUES(27,107); +INSERT INTO product_slots VALUES(27,108); +INSERT INTO product_slots VALUES(27,109); +INSERT INTO product_slots VALUES(27,110); +INSERT INTO product_slots VALUES(27,111); +INSERT INTO product_slots VALUES(27,112); +INSERT INTO product_slots VALUES(27,113); +INSERT INTO product_slots VALUES(27,114); +INSERT INTO product_slots VALUES(27,115); +INSERT INTO product_slots VALUES(27,116); +INSERT INTO product_slots VALUES(27,117); +INSERT INTO product_slots VALUES(27,118); +INSERT INTO product_slots VALUES(27,119); +INSERT INTO product_slots VALUES(27,120); +INSERT INTO product_slots VALUES(27,121); +INSERT INTO product_slots VALUES(27,122); +INSERT INTO product_slots VALUES(27,123); +INSERT INTO product_slots VALUES(27,124); +INSERT INTO product_slots VALUES(27,125); +INSERT INTO product_slots VALUES(27,126); +INSERT INTO product_slots VALUES(27,127); +INSERT INTO product_slots VALUES(27,128); +INSERT INTO product_slots VALUES(27,129); +INSERT INTO product_slots VALUES(27,130); +INSERT INTO product_slots VALUES(27,131); +INSERT INTO product_slots VALUES(27,132); +INSERT INTO product_slots VALUES(27,133); +INSERT INTO product_slots VALUES(27,134); +INSERT INTO product_slots VALUES(27,135); +INSERT INTO product_slots VALUES(27,136); +INSERT INTO product_slots VALUES(27,137); +INSERT INTO product_slots VALUES(27,138); +INSERT INTO product_slots VALUES(27,139); +INSERT INTO product_slots VALUES(27,140); +INSERT INTO product_slots VALUES(27,141); +INSERT INTO product_slots VALUES(27,142); +INSERT INTO product_slots VALUES(27,143); +INSERT INTO product_slots VALUES(27,144); +INSERT INTO product_slots VALUES(27,145); +INSERT INTO product_slots VALUES(27,146); +INSERT INTO product_slots VALUES(27,147); +INSERT INTO product_slots VALUES(27,148); +INSERT INTO product_slots VALUES(27,149); +INSERT INTO product_slots VALUES(27,150); +INSERT INTO product_slots VALUES(27,151); +INSERT INTO product_slots VALUES(27,152); +INSERT INTO product_slots VALUES(27,153); +INSERT INTO product_slots VALUES(27,154); +INSERT INTO product_slots VALUES(27,155); +INSERT INTO product_slots VALUES(27,156); +INSERT INTO product_slots VALUES(27,157); +INSERT INTO product_slots VALUES(27,158); +INSERT INTO product_slots VALUES(27,159); +INSERT INTO product_slots VALUES(27,160); +INSERT INTO product_slots VALUES(27,161); +INSERT INTO product_slots VALUES(27,162); +INSERT INTO product_slots VALUES(27,163); +INSERT INTO product_slots VALUES(27,164); +INSERT INTO product_slots VALUES(27,165); +INSERT INTO product_slots VALUES(27,166); +INSERT INTO product_slots VALUES(27,167); +INSERT INTO product_slots VALUES(27,168); +INSERT INTO product_slots VALUES(27,169); +INSERT INTO product_slots VALUES(27,170); +INSERT INTO product_slots VALUES(27,171); +INSERT INTO product_slots VALUES(27,172); +INSERT INTO product_slots VALUES(27,173); +INSERT INTO product_slots VALUES(27,174); +INSERT INTO product_slots VALUES(27,175); +INSERT INTO product_slots VALUES(27,176); +INSERT INTO product_slots VALUES(27,177); +INSERT INTO product_slots VALUES(27,178); +INSERT INTO product_slots VALUES(27,179); +INSERT INTO product_slots VALUES(27,180); +INSERT INTO product_slots VALUES(27,181); +INSERT INTO product_slots VALUES(27,182); +INSERT INTO product_slots VALUES(27,183); +INSERT INTO product_slots VALUES(27,184); +INSERT INTO product_slots VALUES(27,185); +INSERT INTO product_slots VALUES(27,186); +INSERT INTO product_slots VALUES(27,187); +INSERT INTO product_slots VALUES(27,188); +INSERT INTO product_slots VALUES(27,189); +INSERT INTO product_slots VALUES(27,190); +INSERT INTO product_slots VALUES(27,191); +INSERT INTO product_slots VALUES(27,192); +INSERT INTO product_slots VALUES(27,193); +INSERT INTO product_slots VALUES(27,194); +INSERT INTO product_slots VALUES(27,195); +INSERT INTO product_slots VALUES(27,196); +INSERT INTO product_slots VALUES(27,197); +INSERT INTO product_slots VALUES(27,198); +INSERT INTO product_slots VALUES(27,199); +INSERT INTO product_slots VALUES(27,200); +INSERT INTO product_slots VALUES(27,201); +INSERT INTO product_slots VALUES(27,202); +INSERT INTO product_slots VALUES(27,203); +INSERT INTO product_slots VALUES(27,204); +INSERT INTO product_slots VALUES(27,205); +INSERT INTO product_slots VALUES(27,206); +INSERT INTO product_slots VALUES(27,207); +INSERT INTO product_slots VALUES(27,208); +INSERT INTO product_slots VALUES(27,209); +INSERT INTO product_slots VALUES(27,210); +INSERT INTO product_slots VALUES(27,211); +INSERT INTO product_slots VALUES(27,212); +INSERT INTO product_slots VALUES(27,213); +INSERT INTO product_slots VALUES(27,214); +INSERT INTO product_slots VALUES(27,215); +INSERT INTO product_slots VALUES(27,216); +INSERT INTO product_slots VALUES(27,217); +INSERT INTO product_slots VALUES(27,218); +INSERT INTO product_slots VALUES(27,219); +INSERT INTO product_slots VALUES(27,220); +INSERT INTO product_slots VALUES(27,221); +INSERT INTO product_slots VALUES(27,222); +INSERT INTO product_slots VALUES(27,223); +INSERT INTO product_slots VALUES(27,224); +INSERT INTO product_slots VALUES(27,225); +INSERT INTO product_slots VALUES(27,226); +INSERT INTO product_slots VALUES(27,227); +INSERT INTO product_slots VALUES(27,228); +INSERT INTO product_slots VALUES(27,229); +INSERT INTO product_slots VALUES(27,230); +INSERT INTO product_slots VALUES(27,231); +INSERT INTO product_slots VALUES(27,232); +INSERT INTO product_slots VALUES(27,233); +INSERT INTO product_slots VALUES(27,234); +INSERT INTO product_slots VALUES(27,235); +INSERT INTO product_slots VALUES(27,236); +INSERT INTO product_slots VALUES(27,237); +INSERT INTO product_slots VALUES(27,238); +INSERT INTO product_slots VALUES(27,239); +INSERT INTO product_slots VALUES(27,240); +INSERT INTO product_slots VALUES(27,241); +INSERT INTO product_slots VALUES(27,242); +INSERT INTO product_slots VALUES(27,243); +INSERT INTO product_slots VALUES(27,244); +INSERT INTO product_slots VALUES(27,274); +INSERT INTO product_slots VALUES(27,275); +INSERT INTO product_slots VALUES(27,279); +INSERT INTO product_slots VALUES(27,280); +INSERT INTO product_slots VALUES(27,281); +INSERT INTO product_slots VALUES(27,282); +INSERT INTO product_slots VALUES(27,283); +INSERT INTO product_slots VALUES(27,284); +INSERT INTO product_slots VALUES(27,285); +INSERT INTO product_slots VALUES(27,286); +INSERT INTO product_slots VALUES(27,287); +INSERT INTO product_slots VALUES(28,18); +INSERT INTO product_slots VALUES(28,20); +INSERT INTO product_slots VALUES(28,21); +INSERT INTO product_slots VALUES(28,33); +INSERT INTO product_slots VALUES(28,35); +INSERT INTO product_slots VALUES(28,37); +INSERT INTO product_slots VALUES(28,38); +INSERT INTO product_slots VALUES(28,39); +INSERT INTO product_slots VALUES(28,40); +INSERT INTO product_slots VALUES(28,41); +INSERT INTO product_slots VALUES(28,43); +INSERT INTO product_slots VALUES(28,44); +INSERT INTO product_slots VALUES(28,45); +INSERT INTO product_slots VALUES(28,46); +INSERT INTO product_slots VALUES(28,47); +INSERT INTO product_slots VALUES(28,48); +INSERT INTO product_slots VALUES(28,49); +INSERT INTO product_slots VALUES(28,50); +INSERT INTO product_slots VALUES(28,51); +INSERT INTO product_slots VALUES(28,52); +INSERT INTO product_slots VALUES(28,53); +INSERT INTO product_slots VALUES(28,54); +INSERT INTO product_slots VALUES(28,55); +INSERT INTO product_slots VALUES(28,56); +INSERT INTO product_slots VALUES(28,57); +INSERT INTO product_slots VALUES(28,58); +INSERT INTO product_slots VALUES(28,59); +INSERT INTO product_slots VALUES(28,60); +INSERT INTO product_slots VALUES(28,61); +INSERT INTO product_slots VALUES(28,62); +INSERT INTO product_slots VALUES(28,63); +INSERT INTO product_slots VALUES(28,64); +INSERT INTO product_slots VALUES(28,65); +INSERT INTO product_slots VALUES(28,66); +INSERT INTO product_slots VALUES(28,67); +INSERT INTO product_slots VALUES(28,68); +INSERT INTO product_slots VALUES(28,69); +INSERT INTO product_slots VALUES(28,70); +INSERT INTO product_slots VALUES(28,71); +INSERT INTO product_slots VALUES(28,72); +INSERT INTO product_slots VALUES(28,73); +INSERT INTO product_slots VALUES(28,74); +INSERT INTO product_slots VALUES(28,75); +INSERT INTO product_slots VALUES(28,76); +INSERT INTO product_slots VALUES(28,77); +INSERT INTO product_slots VALUES(28,78); +INSERT INTO product_slots VALUES(28,79); +INSERT INTO product_slots VALUES(28,80); +INSERT INTO product_slots VALUES(28,81); +INSERT INTO product_slots VALUES(28,82); +INSERT INTO product_slots VALUES(28,83); +INSERT INTO product_slots VALUES(28,84); +INSERT INTO product_slots VALUES(28,85); +INSERT INTO product_slots VALUES(28,86); +INSERT INTO product_slots VALUES(28,87); +INSERT INTO product_slots VALUES(28,88); +INSERT INTO product_slots VALUES(28,89); +INSERT INTO product_slots VALUES(28,90); +INSERT INTO product_slots VALUES(28,91); +INSERT INTO product_slots VALUES(28,92); +INSERT INTO product_slots VALUES(28,93); +INSERT INTO product_slots VALUES(28,94); +INSERT INTO product_slots VALUES(28,95); +INSERT INTO product_slots VALUES(28,96); +INSERT INTO product_slots VALUES(28,97); +INSERT INTO product_slots VALUES(28,98); +INSERT INTO product_slots VALUES(28,99); +INSERT INTO product_slots VALUES(28,100); +INSERT INTO product_slots VALUES(28,101); +INSERT INTO product_slots VALUES(28,102); +INSERT INTO product_slots VALUES(28,103); +INSERT INTO product_slots VALUES(28,104); +INSERT INTO product_slots VALUES(28,105); +INSERT INTO product_slots VALUES(28,106); +INSERT INTO product_slots VALUES(28,107); +INSERT INTO product_slots VALUES(28,108); +INSERT INTO product_slots VALUES(28,109); +INSERT INTO product_slots VALUES(28,110); +INSERT INTO product_slots VALUES(28,111); +INSERT INTO product_slots VALUES(28,112); +INSERT INTO product_slots VALUES(28,113); +INSERT INTO product_slots VALUES(28,114); +INSERT INTO product_slots VALUES(28,115); +INSERT INTO product_slots VALUES(28,116); +INSERT INTO product_slots VALUES(28,117); +INSERT INTO product_slots VALUES(28,118); +INSERT INTO product_slots VALUES(28,119); +INSERT INTO product_slots VALUES(28,120); +INSERT INTO product_slots VALUES(28,121); +INSERT INTO product_slots VALUES(28,122); +INSERT INTO product_slots VALUES(28,123); +INSERT INTO product_slots VALUES(28,124); +INSERT INTO product_slots VALUES(28,125); +INSERT INTO product_slots VALUES(28,126); +INSERT INTO product_slots VALUES(28,127); +INSERT INTO product_slots VALUES(28,128); +INSERT INTO product_slots VALUES(28,129); +INSERT INTO product_slots VALUES(28,130); +INSERT INTO product_slots VALUES(28,131); +INSERT INTO product_slots VALUES(28,132); +INSERT INTO product_slots VALUES(28,133); +INSERT INTO product_slots VALUES(28,134); +INSERT INTO product_slots VALUES(28,135); +INSERT INTO product_slots VALUES(28,136); +INSERT INTO product_slots VALUES(28,137); +INSERT INTO product_slots VALUES(28,138); +INSERT INTO product_slots VALUES(28,139); +INSERT INTO product_slots VALUES(28,140); +INSERT INTO product_slots VALUES(28,144); +INSERT INTO product_slots VALUES(28,145); +INSERT INTO product_slots VALUES(28,146); +INSERT INTO product_slots VALUES(28,147); +INSERT INTO product_slots VALUES(28,148); +INSERT INTO product_slots VALUES(28,149); +INSERT INTO product_slots VALUES(28,150); +INSERT INTO product_slots VALUES(28,151); +INSERT INTO product_slots VALUES(28,152); +INSERT INTO product_slots VALUES(28,153); +INSERT INTO product_slots VALUES(28,154); +INSERT INTO product_slots VALUES(28,155); +INSERT INTO product_slots VALUES(28,156); +INSERT INTO product_slots VALUES(28,157); +INSERT INTO product_slots VALUES(28,158); +INSERT INTO product_slots VALUES(28,159); +INSERT INTO product_slots VALUES(28,160); +INSERT INTO product_slots VALUES(28,161); +INSERT INTO product_slots VALUES(28,162); +INSERT INTO product_slots VALUES(28,163); +INSERT INTO product_slots VALUES(28,164); +INSERT INTO product_slots VALUES(28,165); +INSERT INTO product_slots VALUES(28,166); +INSERT INTO product_slots VALUES(28,167); +INSERT INTO product_slots VALUES(28,169); +INSERT INTO product_slots VALUES(28,170); +INSERT INTO product_slots VALUES(28,171); +INSERT INTO product_slots VALUES(28,172); +INSERT INTO product_slots VALUES(28,173); +INSERT INTO product_slots VALUES(28,174); +INSERT INTO product_slots VALUES(28,175); +INSERT INTO product_slots VALUES(28,176); +INSERT INTO product_slots VALUES(28,177); +INSERT INTO product_slots VALUES(28,178); +INSERT INTO product_slots VALUES(28,179); +INSERT INTO product_slots VALUES(28,180); +INSERT INTO product_slots VALUES(28,181); +INSERT INTO product_slots VALUES(28,182); +INSERT INTO product_slots VALUES(28,183); +INSERT INTO product_slots VALUES(28,184); +INSERT INTO product_slots VALUES(28,185); +INSERT INTO product_slots VALUES(28,186); +INSERT INTO product_slots VALUES(28,187); +INSERT INTO product_slots VALUES(28,188); +INSERT INTO product_slots VALUES(28,189); +INSERT INTO product_slots VALUES(28,190); +INSERT INTO product_slots VALUES(28,191); +INSERT INTO product_slots VALUES(28,192); +INSERT INTO product_slots VALUES(28,193); +INSERT INTO product_slots VALUES(28,194); +INSERT INTO product_slots VALUES(28,195); +INSERT INTO product_slots VALUES(28,196); +INSERT INTO product_slots VALUES(28,197); +INSERT INTO product_slots VALUES(28,198); +INSERT INTO product_slots VALUES(28,199); +INSERT INTO product_slots VALUES(28,200); +INSERT INTO product_slots VALUES(28,201); +INSERT INTO product_slots VALUES(28,202); +INSERT INTO product_slots VALUES(28,203); +INSERT INTO product_slots VALUES(28,204); +INSERT INTO product_slots VALUES(28,205); +INSERT INTO product_slots VALUES(28,206); +INSERT INTO product_slots VALUES(28,207); +INSERT INTO product_slots VALUES(28,208); +INSERT INTO product_slots VALUES(28,209); +INSERT INTO product_slots VALUES(28,210); +INSERT INTO product_slots VALUES(28,211); +INSERT INTO product_slots VALUES(28,212); +INSERT INTO product_slots VALUES(28,213); +INSERT INTO product_slots VALUES(28,214); +INSERT INTO product_slots VALUES(28,215); +INSERT INTO product_slots VALUES(28,216); +INSERT INTO product_slots VALUES(28,217); +INSERT INTO product_slots VALUES(28,218); +INSERT INTO product_slots VALUES(28,219); +INSERT INTO product_slots VALUES(28,220); +INSERT INTO product_slots VALUES(28,221); +INSERT INTO product_slots VALUES(28,222); +INSERT INTO product_slots VALUES(28,223); +INSERT INTO product_slots VALUES(28,224); +INSERT INTO product_slots VALUES(28,225); +INSERT INTO product_slots VALUES(28,226); +INSERT INTO product_slots VALUES(28,227); +INSERT INTO product_slots VALUES(28,228); +INSERT INTO product_slots VALUES(28,229); +INSERT INTO product_slots VALUES(28,230); +INSERT INTO product_slots VALUES(28,231); +INSERT INTO product_slots VALUES(28,232); +INSERT INTO product_slots VALUES(28,233); +INSERT INTO product_slots VALUES(28,234); +INSERT INTO product_slots VALUES(28,235); +INSERT INTO product_slots VALUES(28,236); +INSERT INTO product_slots VALUES(28,237); +INSERT INTO product_slots VALUES(28,238); +INSERT INTO product_slots VALUES(28,239); +INSERT INTO product_slots VALUES(28,240); +INSERT INTO product_slots VALUES(28,241); +INSERT INTO product_slots VALUES(28,242); +INSERT INTO product_slots VALUES(28,243); +INSERT INTO product_slots VALUES(28,244); +INSERT INTO product_slots VALUES(28,274); +INSERT INTO product_slots VALUES(28,275); +INSERT INTO product_slots VALUES(28,279); +INSERT INTO product_slots VALUES(28,280); +INSERT INTO product_slots VALUES(28,281); +INSERT INTO product_slots VALUES(28,282); +INSERT INTO product_slots VALUES(28,283); +INSERT INTO product_slots VALUES(28,284); +INSERT INTO product_slots VALUES(28,285); +INSERT INTO product_slots VALUES(28,286); +INSERT INTO product_slots VALUES(28,287); +INSERT INTO product_slots VALUES(29,18); +INSERT INTO product_slots VALUES(29,20); +INSERT INTO product_slots VALUES(29,21); +INSERT INTO product_slots VALUES(29,33); +INSERT INTO product_slots VALUES(29,35); +INSERT INTO product_slots VALUES(29,37); +INSERT INTO product_slots VALUES(29,38); +INSERT INTO product_slots VALUES(29,39); +INSERT INTO product_slots VALUES(29,40); +INSERT INTO product_slots VALUES(29,41); +INSERT INTO product_slots VALUES(29,43); +INSERT INTO product_slots VALUES(29,44); +INSERT INTO product_slots VALUES(29,45); +INSERT INTO product_slots VALUES(29,46); +INSERT INTO product_slots VALUES(29,47); +INSERT INTO product_slots VALUES(29,48); +INSERT INTO product_slots VALUES(29,49); +INSERT INTO product_slots VALUES(29,50); +INSERT INTO product_slots VALUES(29,51); +INSERT INTO product_slots VALUES(29,52); +INSERT INTO product_slots VALUES(29,53); +INSERT INTO product_slots VALUES(29,54); +INSERT INTO product_slots VALUES(29,55); +INSERT INTO product_slots VALUES(29,56); +INSERT INTO product_slots VALUES(29,57); +INSERT INTO product_slots VALUES(29,58); +INSERT INTO product_slots VALUES(29,59); +INSERT INTO product_slots VALUES(29,60); +INSERT INTO product_slots VALUES(29,61); +INSERT INTO product_slots VALUES(29,62); +INSERT INTO product_slots VALUES(29,63); +INSERT INTO product_slots VALUES(29,64); +INSERT INTO product_slots VALUES(29,65); +INSERT INTO product_slots VALUES(29,66); +INSERT INTO product_slots VALUES(29,67); +INSERT INTO product_slots VALUES(29,68); +INSERT INTO product_slots VALUES(29,69); +INSERT INTO product_slots VALUES(29,70); +INSERT INTO product_slots VALUES(29,71); +INSERT INTO product_slots VALUES(29,72); +INSERT INTO product_slots VALUES(29,73); +INSERT INTO product_slots VALUES(29,74); +INSERT INTO product_slots VALUES(29,75); +INSERT INTO product_slots VALUES(29,76); +INSERT INTO product_slots VALUES(29,77); +INSERT INTO product_slots VALUES(29,78); +INSERT INTO product_slots VALUES(29,79); +INSERT INTO product_slots VALUES(29,80); +INSERT INTO product_slots VALUES(29,81); +INSERT INTO product_slots VALUES(29,82); +INSERT INTO product_slots VALUES(29,83); +INSERT INTO product_slots VALUES(29,84); +INSERT INTO product_slots VALUES(29,85); +INSERT INTO product_slots VALUES(29,86); +INSERT INTO product_slots VALUES(29,87); +INSERT INTO product_slots VALUES(29,88); +INSERT INTO product_slots VALUES(29,89); +INSERT INTO product_slots VALUES(29,90); +INSERT INTO product_slots VALUES(29,91); +INSERT INTO product_slots VALUES(29,92); +INSERT INTO product_slots VALUES(29,93); +INSERT INTO product_slots VALUES(29,94); +INSERT INTO product_slots VALUES(29,95); +INSERT INTO product_slots VALUES(29,96); +INSERT INTO product_slots VALUES(29,97); +INSERT INTO product_slots VALUES(29,98); +INSERT INTO product_slots VALUES(29,99); +INSERT INTO product_slots VALUES(29,100); +INSERT INTO product_slots VALUES(29,101); +INSERT INTO product_slots VALUES(29,102); +INSERT INTO product_slots VALUES(29,103); +INSERT INTO product_slots VALUES(29,104); +INSERT INTO product_slots VALUES(29,105); +INSERT INTO product_slots VALUES(29,106); +INSERT INTO product_slots VALUES(29,107); +INSERT INTO product_slots VALUES(29,108); +INSERT INTO product_slots VALUES(29,109); +INSERT INTO product_slots VALUES(29,110); +INSERT INTO product_slots VALUES(29,111); +INSERT INTO product_slots VALUES(29,112); +INSERT INTO product_slots VALUES(29,113); +INSERT INTO product_slots VALUES(29,114); +INSERT INTO product_slots VALUES(29,115); +INSERT INTO product_slots VALUES(29,116); +INSERT INTO product_slots VALUES(29,117); +INSERT INTO product_slots VALUES(29,118); +INSERT INTO product_slots VALUES(29,119); +INSERT INTO product_slots VALUES(29,120); +INSERT INTO product_slots VALUES(29,121); +INSERT INTO product_slots VALUES(29,122); +INSERT INTO product_slots VALUES(29,123); +INSERT INTO product_slots VALUES(29,124); +INSERT INTO product_slots VALUES(29,125); +INSERT INTO product_slots VALUES(29,126); +INSERT INTO product_slots VALUES(29,127); +INSERT INTO product_slots VALUES(29,128); +INSERT INTO product_slots VALUES(29,129); +INSERT INTO product_slots VALUES(29,130); +INSERT INTO product_slots VALUES(29,131); +INSERT INTO product_slots VALUES(29,132); +INSERT INTO product_slots VALUES(29,133); +INSERT INTO product_slots VALUES(29,134); +INSERT INTO product_slots VALUES(29,135); +INSERT INTO product_slots VALUES(29,136); +INSERT INTO product_slots VALUES(29,137); +INSERT INTO product_slots VALUES(29,138); +INSERT INTO product_slots VALUES(29,139); +INSERT INTO product_slots VALUES(29,140); +INSERT INTO product_slots VALUES(29,141); +INSERT INTO product_slots VALUES(29,142); +INSERT INTO product_slots VALUES(29,143); +INSERT INTO product_slots VALUES(29,144); +INSERT INTO product_slots VALUES(29,145); +INSERT INTO product_slots VALUES(29,146); +INSERT INTO product_slots VALUES(29,147); +INSERT INTO product_slots VALUES(29,148); +INSERT INTO product_slots VALUES(29,149); +INSERT INTO product_slots VALUES(29,150); +INSERT INTO product_slots VALUES(29,151); +INSERT INTO product_slots VALUES(29,152); +INSERT INTO product_slots VALUES(29,153); +INSERT INTO product_slots VALUES(29,154); +INSERT INTO product_slots VALUES(29,155); +INSERT INTO product_slots VALUES(29,156); +INSERT INTO product_slots VALUES(29,157); +INSERT INTO product_slots VALUES(29,158); +INSERT INTO product_slots VALUES(29,159); +INSERT INTO product_slots VALUES(29,160); +INSERT INTO product_slots VALUES(29,161); +INSERT INTO product_slots VALUES(29,162); +INSERT INTO product_slots VALUES(29,163); +INSERT INTO product_slots VALUES(29,164); +INSERT INTO product_slots VALUES(29,165); +INSERT INTO product_slots VALUES(29,166); +INSERT INTO product_slots VALUES(29,167); +INSERT INTO product_slots VALUES(29,168); +INSERT INTO product_slots VALUES(29,169); +INSERT INTO product_slots VALUES(29,170); +INSERT INTO product_slots VALUES(29,171); +INSERT INTO product_slots VALUES(29,172); +INSERT INTO product_slots VALUES(29,173); +INSERT INTO product_slots VALUES(29,174); +INSERT INTO product_slots VALUES(29,175); +INSERT INTO product_slots VALUES(29,176); +INSERT INTO product_slots VALUES(29,177); +INSERT INTO product_slots VALUES(29,178); +INSERT INTO product_slots VALUES(29,179); +INSERT INTO product_slots VALUES(29,180); +INSERT INTO product_slots VALUES(29,181); +INSERT INTO product_slots VALUES(29,182); +INSERT INTO product_slots VALUES(29,183); +INSERT INTO product_slots VALUES(29,184); +INSERT INTO product_slots VALUES(29,185); +INSERT INTO product_slots VALUES(29,186); +INSERT INTO product_slots VALUES(29,187); +INSERT INTO product_slots VALUES(29,188); +INSERT INTO product_slots VALUES(29,189); +INSERT INTO product_slots VALUES(29,190); +INSERT INTO product_slots VALUES(29,191); +INSERT INTO product_slots VALUES(29,192); +INSERT INTO product_slots VALUES(29,193); +INSERT INTO product_slots VALUES(29,194); +INSERT INTO product_slots VALUES(29,195); +INSERT INTO product_slots VALUES(29,196); +INSERT INTO product_slots VALUES(29,197); +INSERT INTO product_slots VALUES(29,198); +INSERT INTO product_slots VALUES(29,199); +INSERT INTO product_slots VALUES(29,200); +INSERT INTO product_slots VALUES(29,201); +INSERT INTO product_slots VALUES(29,202); +INSERT INTO product_slots VALUES(29,203); +INSERT INTO product_slots VALUES(29,204); +INSERT INTO product_slots VALUES(29,205); +INSERT INTO product_slots VALUES(29,206); +INSERT INTO product_slots VALUES(29,207); +INSERT INTO product_slots VALUES(29,208); +INSERT INTO product_slots VALUES(29,209); +INSERT INTO product_slots VALUES(29,210); +INSERT INTO product_slots VALUES(29,211); +INSERT INTO product_slots VALUES(29,212); +INSERT INTO product_slots VALUES(29,213); +INSERT INTO product_slots VALUES(29,214); +INSERT INTO product_slots VALUES(29,215); +INSERT INTO product_slots VALUES(29,216); +INSERT INTO product_slots VALUES(29,217); +INSERT INTO product_slots VALUES(29,218); +INSERT INTO product_slots VALUES(29,219); +INSERT INTO product_slots VALUES(29,220); +INSERT INTO product_slots VALUES(29,221); +INSERT INTO product_slots VALUES(29,222); +INSERT INTO product_slots VALUES(29,223); +INSERT INTO product_slots VALUES(29,224); +INSERT INTO product_slots VALUES(29,225); +INSERT INTO product_slots VALUES(29,226); +INSERT INTO product_slots VALUES(29,227); +INSERT INTO product_slots VALUES(29,228); +INSERT INTO product_slots VALUES(29,229); +INSERT INTO product_slots VALUES(29,230); +INSERT INTO product_slots VALUES(29,231); +INSERT INTO product_slots VALUES(29,232); +INSERT INTO product_slots VALUES(29,233); +INSERT INTO product_slots VALUES(29,234); +INSERT INTO product_slots VALUES(29,235); +INSERT INTO product_slots VALUES(29,236); +INSERT INTO product_slots VALUES(29,237); +INSERT INTO product_slots VALUES(29,238); +INSERT INTO product_slots VALUES(29,239); +INSERT INTO product_slots VALUES(29,240); +INSERT INTO product_slots VALUES(29,241); +INSERT INTO product_slots VALUES(29,242); +INSERT INTO product_slots VALUES(29,243); +INSERT INTO product_slots VALUES(29,244); +INSERT INTO product_slots VALUES(29,274); +INSERT INTO product_slots VALUES(29,275); +INSERT INTO product_slots VALUES(29,279); +INSERT INTO product_slots VALUES(29,280); +INSERT INTO product_slots VALUES(29,281); +INSERT INTO product_slots VALUES(29,282); +INSERT INTO product_slots VALUES(29,283); +INSERT INTO product_slots VALUES(29,284); +INSERT INTO product_slots VALUES(29,285); +INSERT INTO product_slots VALUES(29,286); +INSERT INTO product_slots VALUES(29,287); +INSERT INTO product_slots VALUES(30,18); +INSERT INTO product_slots VALUES(30,20); +INSERT INTO product_slots VALUES(30,21); +INSERT INTO product_slots VALUES(30,33); +INSERT INTO product_slots VALUES(30,35); +INSERT INTO product_slots VALUES(30,37); +INSERT INTO product_slots VALUES(30,38); +INSERT INTO product_slots VALUES(30,39); +INSERT INTO product_slots VALUES(30,40); +INSERT INTO product_slots VALUES(30,41); +INSERT INTO product_slots VALUES(30,43); +INSERT INTO product_slots VALUES(30,44); +INSERT INTO product_slots VALUES(30,45); +INSERT INTO product_slots VALUES(30,46); +INSERT INTO product_slots VALUES(30,47); +INSERT INTO product_slots VALUES(30,48); +INSERT INTO product_slots VALUES(30,49); +INSERT INTO product_slots VALUES(30,50); +INSERT INTO product_slots VALUES(30,51); +INSERT INTO product_slots VALUES(30,52); +INSERT INTO product_slots VALUES(30,53); +INSERT INTO product_slots VALUES(30,54); +INSERT INTO product_slots VALUES(30,55); +INSERT INTO product_slots VALUES(30,56); +INSERT INTO product_slots VALUES(30,57); +INSERT INTO product_slots VALUES(30,58); +INSERT INTO product_slots VALUES(30,59); +INSERT INTO product_slots VALUES(30,60); +INSERT INTO product_slots VALUES(30,61); +INSERT INTO product_slots VALUES(30,62); +INSERT INTO product_slots VALUES(30,63); +INSERT INTO product_slots VALUES(30,64); +INSERT INTO product_slots VALUES(30,65); +INSERT INTO product_slots VALUES(30,66); +INSERT INTO product_slots VALUES(30,67); +INSERT INTO product_slots VALUES(30,68); +INSERT INTO product_slots VALUES(30,69); +INSERT INTO product_slots VALUES(30,70); +INSERT INTO product_slots VALUES(30,71); +INSERT INTO product_slots VALUES(30,72); +INSERT INTO product_slots VALUES(30,73); +INSERT INTO product_slots VALUES(30,74); +INSERT INTO product_slots VALUES(30,75); +INSERT INTO product_slots VALUES(30,76); +INSERT INTO product_slots VALUES(30,77); +INSERT INTO product_slots VALUES(30,78); +INSERT INTO product_slots VALUES(30,79); +INSERT INTO product_slots VALUES(30,80); +INSERT INTO product_slots VALUES(30,81); +INSERT INTO product_slots VALUES(30,82); +INSERT INTO product_slots VALUES(30,83); +INSERT INTO product_slots VALUES(30,84); +INSERT INTO product_slots VALUES(30,85); +INSERT INTO product_slots VALUES(30,86); +INSERT INTO product_slots VALUES(30,87); +INSERT INTO product_slots VALUES(30,88); +INSERT INTO product_slots VALUES(30,89); +INSERT INTO product_slots VALUES(30,90); +INSERT INTO product_slots VALUES(30,91); +INSERT INTO product_slots VALUES(30,92); +INSERT INTO product_slots VALUES(30,93); +INSERT INTO product_slots VALUES(30,94); +INSERT INTO product_slots VALUES(30,95); +INSERT INTO product_slots VALUES(30,96); +INSERT INTO product_slots VALUES(30,97); +INSERT INTO product_slots VALUES(30,98); +INSERT INTO product_slots VALUES(30,99); +INSERT INTO product_slots VALUES(30,100); +INSERT INTO product_slots VALUES(30,101); +INSERT INTO product_slots VALUES(30,102); +INSERT INTO product_slots VALUES(30,103); +INSERT INTO product_slots VALUES(30,104); +INSERT INTO product_slots VALUES(30,105); +INSERT INTO product_slots VALUES(30,106); +INSERT INTO product_slots VALUES(30,107); +INSERT INTO product_slots VALUES(30,108); +INSERT INTO product_slots VALUES(30,109); +INSERT INTO product_slots VALUES(30,110); +INSERT INTO product_slots VALUES(30,111); +INSERT INTO product_slots VALUES(30,112); +INSERT INTO product_slots VALUES(30,113); +INSERT INTO product_slots VALUES(30,114); +INSERT INTO product_slots VALUES(30,115); +INSERT INTO product_slots VALUES(30,116); +INSERT INTO product_slots VALUES(30,117); +INSERT INTO product_slots VALUES(30,118); +INSERT INTO product_slots VALUES(30,119); +INSERT INTO product_slots VALUES(30,120); +INSERT INTO product_slots VALUES(30,121); +INSERT INTO product_slots VALUES(30,122); +INSERT INTO product_slots VALUES(30,123); +INSERT INTO product_slots VALUES(30,124); +INSERT INTO product_slots VALUES(30,125); +INSERT INTO product_slots VALUES(30,126); +INSERT INTO product_slots VALUES(30,127); +INSERT INTO product_slots VALUES(30,128); +INSERT INTO product_slots VALUES(30,129); +INSERT INTO product_slots VALUES(30,130); +INSERT INTO product_slots VALUES(30,131); +INSERT INTO product_slots VALUES(30,132); +INSERT INTO product_slots VALUES(30,133); +INSERT INTO product_slots VALUES(30,134); +INSERT INTO product_slots VALUES(30,135); +INSERT INTO product_slots VALUES(30,136); +INSERT INTO product_slots VALUES(30,137); +INSERT INTO product_slots VALUES(30,138); +INSERT INTO product_slots VALUES(30,139); +INSERT INTO product_slots VALUES(30,140); +INSERT INTO product_slots VALUES(30,141); +INSERT INTO product_slots VALUES(30,142); +INSERT INTO product_slots VALUES(30,143); +INSERT INTO product_slots VALUES(30,144); +INSERT INTO product_slots VALUES(30,145); +INSERT INTO product_slots VALUES(30,146); +INSERT INTO product_slots VALUES(30,147); +INSERT INTO product_slots VALUES(30,148); +INSERT INTO product_slots VALUES(30,149); +INSERT INTO product_slots VALUES(30,150); +INSERT INTO product_slots VALUES(30,151); +INSERT INTO product_slots VALUES(30,152); +INSERT INTO product_slots VALUES(30,153); +INSERT INTO product_slots VALUES(30,154); +INSERT INTO product_slots VALUES(30,155); +INSERT INTO product_slots VALUES(30,156); +INSERT INTO product_slots VALUES(30,157); +INSERT INTO product_slots VALUES(30,158); +INSERT INTO product_slots VALUES(30,159); +INSERT INTO product_slots VALUES(30,160); +INSERT INTO product_slots VALUES(30,161); +INSERT INTO product_slots VALUES(30,162); +INSERT INTO product_slots VALUES(30,163); +INSERT INTO product_slots VALUES(30,164); +INSERT INTO product_slots VALUES(30,165); +INSERT INTO product_slots VALUES(30,166); +INSERT INTO product_slots VALUES(30,167); +INSERT INTO product_slots VALUES(30,168); +INSERT INTO product_slots VALUES(30,169); +INSERT INTO product_slots VALUES(30,170); +INSERT INTO product_slots VALUES(30,171); +INSERT INTO product_slots VALUES(30,172); +INSERT INTO product_slots VALUES(30,173); +INSERT INTO product_slots VALUES(30,174); +INSERT INTO product_slots VALUES(30,175); +INSERT INTO product_slots VALUES(30,176); +INSERT INTO product_slots VALUES(30,177); +INSERT INTO product_slots VALUES(30,178); +INSERT INTO product_slots VALUES(30,179); +INSERT INTO product_slots VALUES(30,180); +INSERT INTO product_slots VALUES(30,181); +INSERT INTO product_slots VALUES(30,182); +INSERT INTO product_slots VALUES(30,183); +INSERT INTO product_slots VALUES(30,184); +INSERT INTO product_slots VALUES(30,185); +INSERT INTO product_slots VALUES(30,186); +INSERT INTO product_slots VALUES(30,187); +INSERT INTO product_slots VALUES(30,188); +INSERT INTO product_slots VALUES(30,189); +INSERT INTO product_slots VALUES(30,190); +INSERT INTO product_slots VALUES(30,191); +INSERT INTO product_slots VALUES(30,192); +INSERT INTO product_slots VALUES(30,193); +INSERT INTO product_slots VALUES(30,194); +INSERT INTO product_slots VALUES(30,195); +INSERT INTO product_slots VALUES(30,196); +INSERT INTO product_slots VALUES(30,197); +INSERT INTO product_slots VALUES(30,198); +INSERT INTO product_slots VALUES(30,199); +INSERT INTO product_slots VALUES(30,200); +INSERT INTO product_slots VALUES(30,201); +INSERT INTO product_slots VALUES(30,202); +INSERT INTO product_slots VALUES(30,203); +INSERT INTO product_slots VALUES(30,204); +INSERT INTO product_slots VALUES(30,205); +INSERT INTO product_slots VALUES(30,206); +INSERT INTO product_slots VALUES(30,207); +INSERT INTO product_slots VALUES(30,208); +INSERT INTO product_slots VALUES(30,209); +INSERT INTO product_slots VALUES(30,210); +INSERT INTO product_slots VALUES(30,211); +INSERT INTO product_slots VALUES(30,212); +INSERT INTO product_slots VALUES(30,213); +INSERT INTO product_slots VALUES(30,214); +INSERT INTO product_slots VALUES(30,215); +INSERT INTO product_slots VALUES(30,216); +INSERT INTO product_slots VALUES(30,217); +INSERT INTO product_slots VALUES(30,218); +INSERT INTO product_slots VALUES(30,219); +INSERT INTO product_slots VALUES(30,220); +INSERT INTO product_slots VALUES(30,221); +INSERT INTO product_slots VALUES(30,222); +INSERT INTO product_slots VALUES(30,223); +INSERT INTO product_slots VALUES(30,224); +INSERT INTO product_slots VALUES(30,225); +INSERT INTO product_slots VALUES(30,226); +INSERT INTO product_slots VALUES(30,227); +INSERT INTO product_slots VALUES(30,228); +INSERT INTO product_slots VALUES(30,229); +INSERT INTO product_slots VALUES(30,230); +INSERT INTO product_slots VALUES(30,231); +INSERT INTO product_slots VALUES(30,232); +INSERT INTO product_slots VALUES(30,233); +INSERT INTO product_slots VALUES(30,234); +INSERT INTO product_slots VALUES(30,235); +INSERT INTO product_slots VALUES(30,236); +INSERT INTO product_slots VALUES(30,237); +INSERT INTO product_slots VALUES(30,238); +INSERT INTO product_slots VALUES(30,239); +INSERT INTO product_slots VALUES(30,240); +INSERT INTO product_slots VALUES(30,241); +INSERT INTO product_slots VALUES(30,242); +INSERT INTO product_slots VALUES(30,243); +INSERT INTO product_slots VALUES(30,244); +INSERT INTO product_slots VALUES(30,274); +INSERT INTO product_slots VALUES(30,275); +INSERT INTO product_slots VALUES(30,279); +INSERT INTO product_slots VALUES(30,280); +INSERT INTO product_slots VALUES(30,281); +INSERT INTO product_slots VALUES(30,282); +INSERT INTO product_slots VALUES(30,283); +INSERT INTO product_slots VALUES(30,284); +INSERT INTO product_slots VALUES(30,285); +INSERT INTO product_slots VALUES(30,286); +INSERT INTO product_slots VALUES(30,287); +INSERT INTO product_slots VALUES(31,18); +INSERT INTO product_slots VALUES(31,20); +INSERT INTO product_slots VALUES(31,21); +INSERT INTO product_slots VALUES(31,33); +INSERT INTO product_slots VALUES(31,35); +INSERT INTO product_slots VALUES(31,37); +INSERT INTO product_slots VALUES(31,38); +INSERT INTO product_slots VALUES(31,39); +INSERT INTO product_slots VALUES(31,40); +INSERT INTO product_slots VALUES(31,44); +INSERT INTO product_slots VALUES(31,46); +INSERT INTO product_slots VALUES(31,47); +INSERT INTO product_slots VALUES(31,48); +INSERT INTO product_slots VALUES(31,49); +INSERT INTO product_slots VALUES(31,50); +INSERT INTO product_slots VALUES(31,51); +INSERT INTO product_slots VALUES(31,52); +INSERT INTO product_slots VALUES(31,53); +INSERT INTO product_slots VALUES(31,54); +INSERT INTO product_slots VALUES(31,55); +INSERT INTO product_slots VALUES(31,56); +INSERT INTO product_slots VALUES(31,57); +INSERT INTO product_slots VALUES(31,58); +INSERT INTO product_slots VALUES(31,59); +INSERT INTO product_slots VALUES(31,60); +INSERT INTO product_slots VALUES(31,61); +INSERT INTO product_slots VALUES(31,62); +INSERT INTO product_slots VALUES(31,63); +INSERT INTO product_slots VALUES(31,64); +INSERT INTO product_slots VALUES(31,65); +INSERT INTO product_slots VALUES(31,66); +INSERT INTO product_slots VALUES(31,67); +INSERT INTO product_slots VALUES(31,68); +INSERT INTO product_slots VALUES(31,69); +INSERT INTO product_slots VALUES(31,70); +INSERT INTO product_slots VALUES(31,71); +INSERT INTO product_slots VALUES(31,72); +INSERT INTO product_slots VALUES(31,73); +INSERT INTO product_slots VALUES(31,74); +INSERT INTO product_slots VALUES(31,75); +INSERT INTO product_slots VALUES(31,76); +INSERT INTO product_slots VALUES(31,77); +INSERT INTO product_slots VALUES(31,78); +INSERT INTO product_slots VALUES(31,79); +INSERT INTO product_slots VALUES(31,80); +INSERT INTO product_slots VALUES(31,81); +INSERT INTO product_slots VALUES(31,82); +INSERT INTO product_slots VALUES(31,83); +INSERT INTO product_slots VALUES(31,84); +INSERT INTO product_slots VALUES(31,85); +INSERT INTO product_slots VALUES(31,86); +INSERT INTO product_slots VALUES(31,87); +INSERT INTO product_slots VALUES(31,88); +INSERT INTO product_slots VALUES(31,89); +INSERT INTO product_slots VALUES(31,90); +INSERT INTO product_slots VALUES(31,91); +INSERT INTO product_slots VALUES(31,92); +INSERT INTO product_slots VALUES(31,93); +INSERT INTO product_slots VALUES(31,94); +INSERT INTO product_slots VALUES(31,95); +INSERT INTO product_slots VALUES(31,96); +INSERT INTO product_slots VALUES(31,97); +INSERT INTO product_slots VALUES(31,98); +INSERT INTO product_slots VALUES(31,99); +INSERT INTO product_slots VALUES(31,100); +INSERT INTO product_slots VALUES(31,101); +INSERT INTO product_slots VALUES(31,102); +INSERT INTO product_slots VALUES(31,103); +INSERT INTO product_slots VALUES(31,104); +INSERT INTO product_slots VALUES(31,105); +INSERT INTO product_slots VALUES(31,106); +INSERT INTO product_slots VALUES(31,107); +INSERT INTO product_slots VALUES(31,108); +INSERT INTO product_slots VALUES(31,109); +INSERT INTO product_slots VALUES(31,110); +INSERT INTO product_slots VALUES(31,111); +INSERT INTO product_slots VALUES(31,112); +INSERT INTO product_slots VALUES(31,113); +INSERT INTO product_slots VALUES(31,114); +INSERT INTO product_slots VALUES(31,115); +INSERT INTO product_slots VALUES(31,116); +INSERT INTO product_slots VALUES(31,117); +INSERT INTO product_slots VALUES(31,118); +INSERT INTO product_slots VALUES(31,119); +INSERT INTO product_slots VALUES(31,120); +INSERT INTO product_slots VALUES(31,121); +INSERT INTO product_slots VALUES(31,122); +INSERT INTO product_slots VALUES(31,123); +INSERT INTO product_slots VALUES(31,124); +INSERT INTO product_slots VALUES(31,125); +INSERT INTO product_slots VALUES(31,126); +INSERT INTO product_slots VALUES(31,127); +INSERT INTO product_slots VALUES(31,128); +INSERT INTO product_slots VALUES(31,129); +INSERT INTO product_slots VALUES(31,130); +INSERT INTO product_slots VALUES(31,131); +INSERT INTO product_slots VALUES(31,132); +INSERT INTO product_slots VALUES(31,133); +INSERT INTO product_slots VALUES(31,134); +INSERT INTO product_slots VALUES(31,135); +INSERT INTO product_slots VALUES(31,136); +INSERT INTO product_slots VALUES(31,137); +INSERT INTO product_slots VALUES(31,138); +INSERT INTO product_slots VALUES(31,139); +INSERT INTO product_slots VALUES(31,140); +INSERT INTO product_slots VALUES(31,141); +INSERT INTO product_slots VALUES(31,142); +INSERT INTO product_slots VALUES(31,143); +INSERT INTO product_slots VALUES(31,144); +INSERT INTO product_slots VALUES(31,145); +INSERT INTO product_slots VALUES(31,146); +INSERT INTO product_slots VALUES(31,147); +INSERT INTO product_slots VALUES(31,148); +INSERT INTO product_slots VALUES(31,149); +INSERT INTO product_slots VALUES(31,150); +INSERT INTO product_slots VALUES(31,151); +INSERT INTO product_slots VALUES(31,152); +INSERT INTO product_slots VALUES(31,153); +INSERT INTO product_slots VALUES(31,154); +INSERT INTO product_slots VALUES(31,155); +INSERT INTO product_slots VALUES(31,156); +INSERT INTO product_slots VALUES(31,157); +INSERT INTO product_slots VALUES(31,158); +INSERT INTO product_slots VALUES(31,159); +INSERT INTO product_slots VALUES(31,160); +INSERT INTO product_slots VALUES(31,161); +INSERT INTO product_slots VALUES(31,162); +INSERT INTO product_slots VALUES(31,163); +INSERT INTO product_slots VALUES(31,164); +INSERT INTO product_slots VALUES(31,165); +INSERT INTO product_slots VALUES(31,166); +INSERT INTO product_slots VALUES(31,167); +INSERT INTO product_slots VALUES(31,168); +INSERT INTO product_slots VALUES(31,169); +INSERT INTO product_slots VALUES(31,170); +INSERT INTO product_slots VALUES(31,171); +INSERT INTO product_slots VALUES(31,172); +INSERT INTO product_slots VALUES(31,173); +INSERT INTO product_slots VALUES(31,174); +INSERT INTO product_slots VALUES(31,175); +INSERT INTO product_slots VALUES(31,176); +INSERT INTO product_slots VALUES(31,177); +INSERT INTO product_slots VALUES(31,178); +INSERT INTO product_slots VALUES(31,179); +INSERT INTO product_slots VALUES(31,180); +INSERT INTO product_slots VALUES(31,181); +INSERT INTO product_slots VALUES(31,182); +INSERT INTO product_slots VALUES(31,183); +INSERT INTO product_slots VALUES(31,184); +INSERT INTO product_slots VALUES(31,185); +INSERT INTO product_slots VALUES(31,186); +INSERT INTO product_slots VALUES(31,187); +INSERT INTO product_slots VALUES(31,188); +INSERT INTO product_slots VALUES(31,189); +INSERT INTO product_slots VALUES(31,190); +INSERT INTO product_slots VALUES(31,191); +INSERT INTO product_slots VALUES(31,192); +INSERT INTO product_slots VALUES(31,193); +INSERT INTO product_slots VALUES(31,194); +INSERT INTO product_slots VALUES(31,195); +INSERT INTO product_slots VALUES(31,196); +INSERT INTO product_slots VALUES(31,197); +INSERT INTO product_slots VALUES(31,198); +INSERT INTO product_slots VALUES(31,199); +INSERT INTO product_slots VALUES(31,200); +INSERT INTO product_slots VALUES(31,201); +INSERT INTO product_slots VALUES(31,202); +INSERT INTO product_slots VALUES(31,203); +INSERT INTO product_slots VALUES(31,204); +INSERT INTO product_slots VALUES(31,205); +INSERT INTO product_slots VALUES(31,206); +INSERT INTO product_slots VALUES(31,207); +INSERT INTO product_slots VALUES(31,208); +INSERT INTO product_slots VALUES(31,209); +INSERT INTO product_slots VALUES(31,210); +INSERT INTO product_slots VALUES(31,211); +INSERT INTO product_slots VALUES(31,212); +INSERT INTO product_slots VALUES(31,213); +INSERT INTO product_slots VALUES(31,214); +INSERT INTO product_slots VALUES(31,215); +INSERT INTO product_slots VALUES(31,216); +INSERT INTO product_slots VALUES(31,217); +INSERT INTO product_slots VALUES(31,218); +INSERT INTO product_slots VALUES(31,219); +INSERT INTO product_slots VALUES(31,220); +INSERT INTO product_slots VALUES(31,221); +INSERT INTO product_slots VALUES(31,222); +INSERT INTO product_slots VALUES(31,223); +INSERT INTO product_slots VALUES(31,224); +INSERT INTO product_slots VALUES(31,225); +INSERT INTO product_slots VALUES(31,226); +INSERT INTO product_slots VALUES(31,227); +INSERT INTO product_slots VALUES(31,228); +INSERT INTO product_slots VALUES(31,229); +INSERT INTO product_slots VALUES(31,230); +INSERT INTO product_slots VALUES(31,231); +INSERT INTO product_slots VALUES(31,232); +INSERT INTO product_slots VALUES(31,233); +INSERT INTO product_slots VALUES(31,234); +INSERT INTO product_slots VALUES(31,235); +INSERT INTO product_slots VALUES(31,236); +INSERT INTO product_slots VALUES(31,237); +INSERT INTO product_slots VALUES(31,238); +INSERT INTO product_slots VALUES(31,239); +INSERT INTO product_slots VALUES(31,240); +INSERT INTO product_slots VALUES(31,241); +INSERT INTO product_slots VALUES(31,242); +INSERT INTO product_slots VALUES(31,243); +INSERT INTO product_slots VALUES(31,244); +INSERT INTO product_slots VALUES(31,274); +INSERT INTO product_slots VALUES(31,275); +INSERT INTO product_slots VALUES(31,279); +INSERT INTO product_slots VALUES(31,280); +INSERT INTO product_slots VALUES(31,281); +INSERT INTO product_slots VALUES(31,282); +INSERT INTO product_slots VALUES(31,283); +INSERT INTO product_slots VALUES(31,284); +INSERT INTO product_slots VALUES(31,285); +INSERT INTO product_slots VALUES(31,286); +INSERT INTO product_slots VALUES(31,287); +INSERT INTO product_slots VALUES(32,18); +INSERT INTO product_slots VALUES(32,20); +INSERT INTO product_slots VALUES(32,21); +INSERT INTO product_slots VALUES(32,33); +INSERT INTO product_slots VALUES(32,35); +INSERT INTO product_slots VALUES(32,37); +INSERT INTO product_slots VALUES(32,38); +INSERT INTO product_slots VALUES(32,39); +INSERT INTO product_slots VALUES(32,40); +INSERT INTO product_slots VALUES(32,41); +INSERT INTO product_slots VALUES(32,43); +INSERT INTO product_slots VALUES(32,44); +INSERT INTO product_slots VALUES(32,45); +INSERT INTO product_slots VALUES(32,46); +INSERT INTO product_slots VALUES(32,47); +INSERT INTO product_slots VALUES(32,48); +INSERT INTO product_slots VALUES(32,49); +INSERT INTO product_slots VALUES(32,50); +INSERT INTO product_slots VALUES(32,51); +INSERT INTO product_slots VALUES(32,52); +INSERT INTO product_slots VALUES(32,53); +INSERT INTO product_slots VALUES(32,54); +INSERT INTO product_slots VALUES(32,55); +INSERT INTO product_slots VALUES(32,56); +INSERT INTO product_slots VALUES(32,57); +INSERT INTO product_slots VALUES(32,58); +INSERT INTO product_slots VALUES(32,59); +INSERT INTO product_slots VALUES(32,60); +INSERT INTO product_slots VALUES(32,61); +INSERT INTO product_slots VALUES(32,62); +INSERT INTO product_slots VALUES(32,63); +INSERT INTO product_slots VALUES(32,64); +INSERT INTO product_slots VALUES(32,65); +INSERT INTO product_slots VALUES(32,66); +INSERT INTO product_slots VALUES(32,67); +INSERT INTO product_slots VALUES(32,68); +INSERT INTO product_slots VALUES(32,69); +INSERT INTO product_slots VALUES(32,70); +INSERT INTO product_slots VALUES(32,71); +INSERT INTO product_slots VALUES(32,72); +INSERT INTO product_slots VALUES(32,73); +INSERT INTO product_slots VALUES(32,74); +INSERT INTO product_slots VALUES(32,75); +INSERT INTO product_slots VALUES(32,76); +INSERT INTO product_slots VALUES(32,77); +INSERT INTO product_slots VALUES(32,78); +INSERT INTO product_slots VALUES(32,79); +INSERT INTO product_slots VALUES(32,80); +INSERT INTO product_slots VALUES(32,81); +INSERT INTO product_slots VALUES(32,82); +INSERT INTO product_slots VALUES(32,83); +INSERT INTO product_slots VALUES(32,84); +INSERT INTO product_slots VALUES(32,85); +INSERT INTO product_slots VALUES(32,86); +INSERT INTO product_slots VALUES(32,87); +INSERT INTO product_slots VALUES(32,88); +INSERT INTO product_slots VALUES(32,89); +INSERT INTO product_slots VALUES(32,90); +INSERT INTO product_slots VALUES(32,91); +INSERT INTO product_slots VALUES(32,92); +INSERT INTO product_slots VALUES(32,93); +INSERT INTO product_slots VALUES(32,94); +INSERT INTO product_slots VALUES(32,95); +INSERT INTO product_slots VALUES(32,96); +INSERT INTO product_slots VALUES(32,97); +INSERT INTO product_slots VALUES(32,98); +INSERT INTO product_slots VALUES(32,99); +INSERT INTO product_slots VALUES(32,100); +INSERT INTO product_slots VALUES(32,101); +INSERT INTO product_slots VALUES(32,102); +INSERT INTO product_slots VALUES(32,103); +INSERT INTO product_slots VALUES(32,104); +INSERT INTO product_slots VALUES(32,105); +INSERT INTO product_slots VALUES(32,106); +INSERT INTO product_slots VALUES(32,107); +INSERT INTO product_slots VALUES(32,108); +INSERT INTO product_slots VALUES(32,109); +INSERT INTO product_slots VALUES(32,110); +INSERT INTO product_slots VALUES(32,111); +INSERT INTO product_slots VALUES(32,112); +INSERT INTO product_slots VALUES(32,113); +INSERT INTO product_slots VALUES(32,114); +INSERT INTO product_slots VALUES(32,115); +INSERT INTO product_slots VALUES(32,116); +INSERT INTO product_slots VALUES(32,117); +INSERT INTO product_slots VALUES(32,118); +INSERT INTO product_slots VALUES(32,119); +INSERT INTO product_slots VALUES(32,120); +INSERT INTO product_slots VALUES(32,121); +INSERT INTO product_slots VALUES(32,122); +INSERT INTO product_slots VALUES(32,123); +INSERT INTO product_slots VALUES(32,124); +INSERT INTO product_slots VALUES(32,125); +INSERT INTO product_slots VALUES(32,126); +INSERT INTO product_slots VALUES(32,127); +INSERT INTO product_slots VALUES(32,128); +INSERT INTO product_slots VALUES(32,129); +INSERT INTO product_slots VALUES(32,130); +INSERT INTO product_slots VALUES(32,131); +INSERT INTO product_slots VALUES(32,132); +INSERT INTO product_slots VALUES(32,133); +INSERT INTO product_slots VALUES(32,134); +INSERT INTO product_slots VALUES(32,135); +INSERT INTO product_slots VALUES(32,136); +INSERT INTO product_slots VALUES(32,137); +INSERT INTO product_slots VALUES(32,138); +INSERT INTO product_slots VALUES(32,139); +INSERT INTO product_slots VALUES(32,140); +INSERT INTO product_slots VALUES(32,141); +INSERT INTO product_slots VALUES(32,142); +INSERT INTO product_slots VALUES(32,143); +INSERT INTO product_slots VALUES(32,144); +INSERT INTO product_slots VALUES(32,145); +INSERT INTO product_slots VALUES(32,146); +INSERT INTO product_slots VALUES(32,147); +INSERT INTO product_slots VALUES(32,148); +INSERT INTO product_slots VALUES(32,149); +INSERT INTO product_slots VALUES(32,150); +INSERT INTO product_slots VALUES(32,151); +INSERT INTO product_slots VALUES(32,152); +INSERT INTO product_slots VALUES(32,153); +INSERT INTO product_slots VALUES(32,154); +INSERT INTO product_slots VALUES(32,155); +INSERT INTO product_slots VALUES(32,156); +INSERT INTO product_slots VALUES(32,157); +INSERT INTO product_slots VALUES(32,158); +INSERT INTO product_slots VALUES(32,159); +INSERT INTO product_slots VALUES(32,160); +INSERT INTO product_slots VALUES(32,161); +INSERT INTO product_slots VALUES(32,162); +INSERT INTO product_slots VALUES(32,163); +INSERT INTO product_slots VALUES(32,164); +INSERT INTO product_slots VALUES(32,165); +INSERT INTO product_slots VALUES(32,166); +INSERT INTO product_slots VALUES(32,167); +INSERT INTO product_slots VALUES(32,168); +INSERT INTO product_slots VALUES(32,169); +INSERT INTO product_slots VALUES(32,170); +INSERT INTO product_slots VALUES(32,171); +INSERT INTO product_slots VALUES(32,172); +INSERT INTO product_slots VALUES(32,173); +INSERT INTO product_slots VALUES(32,174); +INSERT INTO product_slots VALUES(32,175); +INSERT INTO product_slots VALUES(32,176); +INSERT INTO product_slots VALUES(32,177); +INSERT INTO product_slots VALUES(32,178); +INSERT INTO product_slots VALUES(32,179); +INSERT INTO product_slots VALUES(32,180); +INSERT INTO product_slots VALUES(32,181); +INSERT INTO product_slots VALUES(32,182); +INSERT INTO product_slots VALUES(32,183); +INSERT INTO product_slots VALUES(32,184); +INSERT INTO product_slots VALUES(32,185); +INSERT INTO product_slots VALUES(32,186); +INSERT INTO product_slots VALUES(32,187); +INSERT INTO product_slots VALUES(32,188); +INSERT INTO product_slots VALUES(32,189); +INSERT INTO product_slots VALUES(32,190); +INSERT INTO product_slots VALUES(32,191); +INSERT INTO product_slots VALUES(32,192); +INSERT INTO product_slots VALUES(32,193); +INSERT INTO product_slots VALUES(32,194); +INSERT INTO product_slots VALUES(32,195); +INSERT INTO product_slots VALUES(32,196); +INSERT INTO product_slots VALUES(32,197); +INSERT INTO product_slots VALUES(32,198); +INSERT INTO product_slots VALUES(32,199); +INSERT INTO product_slots VALUES(32,200); +INSERT INTO product_slots VALUES(32,201); +INSERT INTO product_slots VALUES(32,202); +INSERT INTO product_slots VALUES(32,203); +INSERT INTO product_slots VALUES(32,204); +INSERT INTO product_slots VALUES(32,205); +INSERT INTO product_slots VALUES(32,206); +INSERT INTO product_slots VALUES(32,207); +INSERT INTO product_slots VALUES(32,208); +INSERT INTO product_slots VALUES(32,209); +INSERT INTO product_slots VALUES(32,210); +INSERT INTO product_slots VALUES(32,211); +INSERT INTO product_slots VALUES(32,212); +INSERT INTO product_slots VALUES(32,213); +INSERT INTO product_slots VALUES(32,214); +INSERT INTO product_slots VALUES(32,215); +INSERT INTO product_slots VALUES(32,216); +INSERT INTO product_slots VALUES(32,217); +INSERT INTO product_slots VALUES(32,218); +INSERT INTO product_slots VALUES(32,219); +INSERT INTO product_slots VALUES(32,220); +INSERT INTO product_slots VALUES(32,221); +INSERT INTO product_slots VALUES(32,222); +INSERT INTO product_slots VALUES(32,223); +INSERT INTO product_slots VALUES(32,224); +INSERT INTO product_slots VALUES(32,225); +INSERT INTO product_slots VALUES(32,226); +INSERT INTO product_slots VALUES(32,227); +INSERT INTO product_slots VALUES(32,228); +INSERT INTO product_slots VALUES(32,229); +INSERT INTO product_slots VALUES(32,230); +INSERT INTO product_slots VALUES(32,231); +INSERT INTO product_slots VALUES(32,232); +INSERT INTO product_slots VALUES(32,233); +INSERT INTO product_slots VALUES(32,234); +INSERT INTO product_slots VALUES(32,235); +INSERT INTO product_slots VALUES(32,236); +INSERT INTO product_slots VALUES(32,237); +INSERT INTO product_slots VALUES(32,238); +INSERT INTO product_slots VALUES(32,239); +INSERT INTO product_slots VALUES(32,240); +INSERT INTO product_slots VALUES(32,241); +INSERT INTO product_slots VALUES(32,242); +INSERT INTO product_slots VALUES(32,243); +INSERT INTO product_slots VALUES(32,244); +INSERT INTO product_slots VALUES(32,274); +INSERT INTO product_slots VALUES(32,275); +INSERT INTO product_slots VALUES(32,279); +INSERT INTO product_slots VALUES(32,280); +INSERT INTO product_slots VALUES(32,281); +INSERT INTO product_slots VALUES(32,282); +INSERT INTO product_slots VALUES(32,283); +INSERT INTO product_slots VALUES(32,284); +INSERT INTO product_slots VALUES(32,285); +INSERT INTO product_slots VALUES(32,286); +INSERT INTO product_slots VALUES(32,287); +INSERT INTO product_slots VALUES(33,18); +INSERT INTO product_slots VALUES(33,20); +INSERT INTO product_slots VALUES(33,21); +INSERT INTO product_slots VALUES(33,33); +INSERT INTO product_slots VALUES(33,35); +INSERT INTO product_slots VALUES(33,37); +INSERT INTO product_slots VALUES(33,38); +INSERT INTO product_slots VALUES(33,39); +INSERT INTO product_slots VALUES(33,40); +INSERT INTO product_slots VALUES(33,44); +INSERT INTO product_slots VALUES(33,46); +INSERT INTO product_slots VALUES(33,47); +INSERT INTO product_slots VALUES(33,48); +INSERT INTO product_slots VALUES(33,49); +INSERT INTO product_slots VALUES(33,50); +INSERT INTO product_slots VALUES(33,51); +INSERT INTO product_slots VALUES(33,52); +INSERT INTO product_slots VALUES(33,53); +INSERT INTO product_slots VALUES(33,54); +INSERT INTO product_slots VALUES(33,55); +INSERT INTO product_slots VALUES(33,56); +INSERT INTO product_slots VALUES(33,57); +INSERT INTO product_slots VALUES(33,58); +INSERT INTO product_slots VALUES(33,59); +INSERT INTO product_slots VALUES(33,60); +INSERT INTO product_slots VALUES(33,61); +INSERT INTO product_slots VALUES(33,62); +INSERT INTO product_slots VALUES(33,63); +INSERT INTO product_slots VALUES(33,64); +INSERT INTO product_slots VALUES(33,65); +INSERT INTO product_slots VALUES(33,66); +INSERT INTO product_slots VALUES(33,67); +INSERT INTO product_slots VALUES(33,68); +INSERT INTO product_slots VALUES(33,69); +INSERT INTO product_slots VALUES(33,70); +INSERT INTO product_slots VALUES(33,71); +INSERT INTO product_slots VALUES(33,72); +INSERT INTO product_slots VALUES(33,73); +INSERT INTO product_slots VALUES(33,74); +INSERT INTO product_slots VALUES(33,75); +INSERT INTO product_slots VALUES(33,76); +INSERT INTO product_slots VALUES(33,77); +INSERT INTO product_slots VALUES(33,78); +INSERT INTO product_slots VALUES(33,79); +INSERT INTO product_slots VALUES(33,80); +INSERT INTO product_slots VALUES(33,81); +INSERT INTO product_slots VALUES(33,82); +INSERT INTO product_slots VALUES(33,83); +INSERT INTO product_slots VALUES(33,84); +INSERT INTO product_slots VALUES(33,85); +INSERT INTO product_slots VALUES(33,86); +INSERT INTO product_slots VALUES(33,87); +INSERT INTO product_slots VALUES(33,88); +INSERT INTO product_slots VALUES(33,89); +INSERT INTO product_slots VALUES(33,90); +INSERT INTO product_slots VALUES(33,91); +INSERT INTO product_slots VALUES(33,92); +INSERT INTO product_slots VALUES(33,93); +INSERT INTO product_slots VALUES(33,94); +INSERT INTO product_slots VALUES(33,95); +INSERT INTO product_slots VALUES(33,96); +INSERT INTO product_slots VALUES(33,97); +INSERT INTO product_slots VALUES(33,98); +INSERT INTO product_slots VALUES(33,99); +INSERT INTO product_slots VALUES(33,100); +INSERT INTO product_slots VALUES(33,101); +INSERT INTO product_slots VALUES(33,102); +INSERT INTO product_slots VALUES(33,103); +INSERT INTO product_slots VALUES(33,104); +INSERT INTO product_slots VALUES(33,105); +INSERT INTO product_slots VALUES(33,106); +INSERT INTO product_slots VALUES(33,107); +INSERT INTO product_slots VALUES(33,108); +INSERT INTO product_slots VALUES(33,109); +INSERT INTO product_slots VALUES(33,110); +INSERT INTO product_slots VALUES(33,111); +INSERT INTO product_slots VALUES(33,112); +INSERT INTO product_slots VALUES(33,113); +INSERT INTO product_slots VALUES(33,114); +INSERT INTO product_slots VALUES(33,115); +INSERT INTO product_slots VALUES(33,116); +INSERT INTO product_slots VALUES(33,117); +INSERT INTO product_slots VALUES(33,118); +INSERT INTO product_slots VALUES(33,119); +INSERT INTO product_slots VALUES(33,120); +INSERT INTO product_slots VALUES(33,121); +INSERT INTO product_slots VALUES(33,122); +INSERT INTO product_slots VALUES(33,123); +INSERT INTO product_slots VALUES(33,124); +INSERT INTO product_slots VALUES(33,125); +INSERT INTO product_slots VALUES(33,126); +INSERT INTO product_slots VALUES(33,127); +INSERT INTO product_slots VALUES(33,128); +INSERT INTO product_slots VALUES(33,129); +INSERT INTO product_slots VALUES(33,130); +INSERT INTO product_slots VALUES(33,131); +INSERT INTO product_slots VALUES(33,132); +INSERT INTO product_slots VALUES(33,133); +INSERT INTO product_slots VALUES(33,134); +INSERT INTO product_slots VALUES(33,135); +INSERT INTO product_slots VALUES(33,136); +INSERT INTO product_slots VALUES(33,137); +INSERT INTO product_slots VALUES(33,138); +INSERT INTO product_slots VALUES(33,139); +INSERT INTO product_slots VALUES(33,140); +INSERT INTO product_slots VALUES(33,141); +INSERT INTO product_slots VALUES(33,142); +INSERT INTO product_slots VALUES(33,143); +INSERT INTO product_slots VALUES(33,144); +INSERT INTO product_slots VALUES(33,145); +INSERT INTO product_slots VALUES(33,146); +INSERT INTO product_slots VALUES(33,147); +INSERT INTO product_slots VALUES(33,148); +INSERT INTO product_slots VALUES(33,149); +INSERT INTO product_slots VALUES(33,150); +INSERT INTO product_slots VALUES(33,151); +INSERT INTO product_slots VALUES(33,152); +INSERT INTO product_slots VALUES(33,153); +INSERT INTO product_slots VALUES(33,154); +INSERT INTO product_slots VALUES(33,155); +INSERT INTO product_slots VALUES(33,156); +INSERT INTO product_slots VALUES(33,157); +INSERT INTO product_slots VALUES(33,158); +INSERT INTO product_slots VALUES(33,159); +INSERT INTO product_slots VALUES(33,160); +INSERT INTO product_slots VALUES(33,161); +INSERT INTO product_slots VALUES(33,162); +INSERT INTO product_slots VALUES(33,163); +INSERT INTO product_slots VALUES(33,164); +INSERT INTO product_slots VALUES(33,165); +INSERT INTO product_slots VALUES(33,166); +INSERT INTO product_slots VALUES(33,167); +INSERT INTO product_slots VALUES(33,168); +INSERT INTO product_slots VALUES(33,169); +INSERT INTO product_slots VALUES(33,170); +INSERT INTO product_slots VALUES(33,171); +INSERT INTO product_slots VALUES(33,172); +INSERT INTO product_slots VALUES(33,173); +INSERT INTO product_slots VALUES(33,174); +INSERT INTO product_slots VALUES(33,175); +INSERT INTO product_slots VALUES(33,176); +INSERT INTO product_slots VALUES(33,177); +INSERT INTO product_slots VALUES(33,178); +INSERT INTO product_slots VALUES(33,179); +INSERT INTO product_slots VALUES(33,180); +INSERT INTO product_slots VALUES(33,181); +INSERT INTO product_slots VALUES(33,182); +INSERT INTO product_slots VALUES(33,183); +INSERT INTO product_slots VALUES(33,184); +INSERT INTO product_slots VALUES(33,185); +INSERT INTO product_slots VALUES(33,186); +INSERT INTO product_slots VALUES(33,187); +INSERT INTO product_slots VALUES(33,188); +INSERT INTO product_slots VALUES(33,189); +INSERT INTO product_slots VALUES(33,190); +INSERT INTO product_slots VALUES(33,191); +INSERT INTO product_slots VALUES(33,192); +INSERT INTO product_slots VALUES(33,193); +INSERT INTO product_slots VALUES(33,194); +INSERT INTO product_slots VALUES(33,195); +INSERT INTO product_slots VALUES(33,196); +INSERT INTO product_slots VALUES(33,197); +INSERT INTO product_slots VALUES(33,198); +INSERT INTO product_slots VALUES(33,199); +INSERT INTO product_slots VALUES(33,200); +INSERT INTO product_slots VALUES(33,201); +INSERT INTO product_slots VALUES(33,202); +INSERT INTO product_slots VALUES(33,203); +INSERT INTO product_slots VALUES(33,204); +INSERT INTO product_slots VALUES(33,205); +INSERT INTO product_slots VALUES(33,206); +INSERT INTO product_slots VALUES(33,207); +INSERT INTO product_slots VALUES(33,208); +INSERT INTO product_slots VALUES(33,209); +INSERT INTO product_slots VALUES(33,210); +INSERT INTO product_slots VALUES(33,211); +INSERT INTO product_slots VALUES(33,212); +INSERT INTO product_slots VALUES(33,213); +INSERT INTO product_slots VALUES(33,214); +INSERT INTO product_slots VALUES(33,215); +INSERT INTO product_slots VALUES(33,216); +INSERT INTO product_slots VALUES(33,217); +INSERT INTO product_slots VALUES(33,218); +INSERT INTO product_slots VALUES(33,219); +INSERT INTO product_slots VALUES(33,220); +INSERT INTO product_slots VALUES(33,221); +INSERT INTO product_slots VALUES(33,222); +INSERT INTO product_slots VALUES(33,223); +INSERT INTO product_slots VALUES(33,224); +INSERT INTO product_slots VALUES(33,225); +INSERT INTO product_slots VALUES(33,226); +INSERT INTO product_slots VALUES(33,227); +INSERT INTO product_slots VALUES(33,228); +INSERT INTO product_slots VALUES(33,229); +INSERT INTO product_slots VALUES(33,230); +INSERT INTO product_slots VALUES(33,231); +INSERT INTO product_slots VALUES(33,232); +INSERT INTO product_slots VALUES(33,233); +INSERT INTO product_slots VALUES(33,234); +INSERT INTO product_slots VALUES(33,235); +INSERT INTO product_slots VALUES(33,236); +INSERT INTO product_slots VALUES(33,237); +INSERT INTO product_slots VALUES(33,238); +INSERT INTO product_slots VALUES(33,239); +INSERT INTO product_slots VALUES(33,240); +INSERT INTO product_slots VALUES(33,241); +INSERT INTO product_slots VALUES(33,242); +INSERT INTO product_slots VALUES(33,243); +INSERT INTO product_slots VALUES(33,244); +INSERT INTO product_slots VALUES(33,274); +INSERT INTO product_slots VALUES(33,275); +INSERT INTO product_slots VALUES(33,279); +INSERT INTO product_slots VALUES(33,280); +INSERT INTO product_slots VALUES(33,281); +INSERT INTO product_slots VALUES(33,282); +INSERT INTO product_slots VALUES(33,283); +INSERT INTO product_slots VALUES(33,284); +INSERT INTO product_slots VALUES(33,285); +INSERT INTO product_slots VALUES(33,286); +INSERT INTO product_slots VALUES(33,287); +INSERT INTO product_slots VALUES(34,18); +INSERT INTO product_slots VALUES(34,20); +INSERT INTO product_slots VALUES(34,21); +INSERT INTO product_slots VALUES(34,33); +INSERT INTO product_slots VALUES(34,35); +INSERT INTO product_slots VALUES(34,37); +INSERT INTO product_slots VALUES(34,38); +INSERT INTO product_slots VALUES(34,40); +INSERT INTO product_slots VALUES(34,82); +INSERT INTO product_slots VALUES(34,87); +INSERT INTO product_slots VALUES(34,279); +INSERT INTO product_slots VALUES(35,18); +INSERT INTO product_slots VALUES(35,19); +INSERT INTO product_slots VALUES(35,20); +INSERT INTO product_slots VALUES(35,21); +INSERT INTO product_slots VALUES(35,22); +INSERT INTO product_slots VALUES(35,33); +INSERT INTO product_slots VALUES(35,35); +INSERT INTO product_slots VALUES(35,37); +INSERT INTO product_slots VALUES(35,38); +INSERT INTO product_slots VALUES(35,39); +INSERT INTO product_slots VALUES(35,40); +INSERT INTO product_slots VALUES(35,41); +INSERT INTO product_slots VALUES(35,43); +INSERT INTO product_slots VALUES(35,45); +INSERT INTO product_slots VALUES(35,46); +INSERT INTO product_slots VALUES(35,47); +INSERT INTO product_slots VALUES(35,48); +INSERT INTO product_slots VALUES(35,49); +INSERT INTO product_slots VALUES(35,50); +INSERT INTO product_slots VALUES(35,51); +INSERT INTO product_slots VALUES(35,52); +INSERT INTO product_slots VALUES(35,53); +INSERT INTO product_slots VALUES(35,54); +INSERT INTO product_slots VALUES(35,55); +INSERT INTO product_slots VALUES(35,56); +INSERT INTO product_slots VALUES(35,57); +INSERT INTO product_slots VALUES(35,58); +INSERT INTO product_slots VALUES(35,59); +INSERT INTO product_slots VALUES(35,60); +INSERT INTO product_slots VALUES(35,61); +INSERT INTO product_slots VALUES(35,62); +INSERT INTO product_slots VALUES(35,63); +INSERT INTO product_slots VALUES(35,64); +INSERT INTO product_slots VALUES(35,65); +INSERT INTO product_slots VALUES(35,66); +INSERT INTO product_slots VALUES(35,67); +INSERT INTO product_slots VALUES(35,68); +INSERT INTO product_slots VALUES(35,69); +INSERT INTO product_slots VALUES(35,70); +INSERT INTO product_slots VALUES(35,71); +INSERT INTO product_slots VALUES(35,74); +INSERT INTO product_slots VALUES(35,75); +INSERT INTO product_slots VALUES(35,76); +INSERT INTO product_slots VALUES(35,77); +INSERT INTO product_slots VALUES(35,78); +INSERT INTO product_slots VALUES(35,81); +INSERT INTO product_slots VALUES(35,82); +INSERT INTO product_slots VALUES(35,83); +INSERT INTO product_slots VALUES(35,84); +INSERT INTO product_slots VALUES(35,87); +INSERT INTO product_slots VALUES(35,88); +INSERT INTO product_slots VALUES(35,89); +INSERT INTO product_slots VALUES(35,90); +INSERT INTO product_slots VALUES(35,91); +INSERT INTO product_slots VALUES(35,95); +INSERT INTO product_slots VALUES(35,96); +INSERT INTO product_slots VALUES(35,97); +INSERT INTO product_slots VALUES(35,98); +INSERT INTO product_slots VALUES(35,101); +INSERT INTO product_slots VALUES(35,102); +INSERT INTO product_slots VALUES(35,103); +INSERT INTO product_slots VALUES(35,104); +INSERT INTO product_slots VALUES(35,109); +INSERT INTO product_slots VALUES(35,110); +INSERT INTO product_slots VALUES(35,111); +INSERT INTO product_slots VALUES(35,112); +INSERT INTO product_slots VALUES(35,116); +INSERT INTO product_slots VALUES(35,117); +INSERT INTO product_slots VALUES(35,118); +INSERT INTO product_slots VALUES(35,119); +INSERT INTO product_slots VALUES(35,120); +INSERT INTO product_slots VALUES(35,123); +INSERT INTO product_slots VALUES(35,124); +INSERT INTO product_slots VALUES(35,125); +INSERT INTO product_slots VALUES(35,126); +INSERT INTO product_slots VALUES(35,130); +INSERT INTO product_slots VALUES(35,131); +INSERT INTO product_slots VALUES(35,132); +INSERT INTO product_slots VALUES(35,133); +INSERT INTO product_slots VALUES(35,137); +INSERT INTO product_slots VALUES(35,138); +INSERT INTO product_slots VALUES(35,139); +INSERT INTO product_slots VALUES(35,140); +INSERT INTO product_slots VALUES(35,144); +INSERT INTO product_slots VALUES(35,145); +INSERT INTO product_slots VALUES(35,146); +INSERT INTO product_slots VALUES(35,147); +INSERT INTO product_slots VALUES(35,148); +INSERT INTO product_slots VALUES(35,149); +INSERT INTO product_slots VALUES(35,150); +INSERT INTO product_slots VALUES(35,151); +INSERT INTO product_slots VALUES(35,155); +INSERT INTO product_slots VALUES(35,156); +INSERT INTO product_slots VALUES(35,157); +INSERT INTO product_slots VALUES(35,158); +INSERT INTO product_slots VALUES(35,162); +INSERT INTO product_slots VALUES(35,163); +INSERT INTO product_slots VALUES(35,164); +INSERT INTO product_slots VALUES(35,165); +INSERT INTO product_slots VALUES(35,166); +INSERT INTO product_slots VALUES(35,169); +INSERT INTO product_slots VALUES(35,170); +INSERT INTO product_slots VALUES(35,171); +INSERT INTO product_slots VALUES(35,172); +INSERT INTO product_slots VALUES(35,176); +INSERT INTO product_slots VALUES(35,177); +INSERT INTO product_slots VALUES(35,178); +INSERT INTO product_slots VALUES(35,179); +INSERT INTO product_slots VALUES(35,183); +INSERT INTO product_slots VALUES(35,184); +INSERT INTO product_slots VALUES(35,185); +INSERT INTO product_slots VALUES(35,186); +INSERT INTO product_slots VALUES(35,187); +INSERT INTO product_slots VALUES(35,188); +INSERT INTO product_slots VALUES(35,189); +INSERT INTO product_slots VALUES(35,190); +INSERT INTO product_slots VALUES(35,191); +INSERT INTO product_slots VALUES(35,192); +INSERT INTO product_slots VALUES(35,193); +INSERT INTO product_slots VALUES(35,194); +INSERT INTO product_slots VALUES(35,198); +INSERT INTO product_slots VALUES(35,199); +INSERT INTO product_slots VALUES(35,200); +INSERT INTO product_slots VALUES(35,201); +INSERT INTO product_slots VALUES(35,202); +INSERT INTO product_slots VALUES(35,203); +INSERT INTO product_slots VALUES(35,205); +INSERT INTO product_slots VALUES(35,208); +INSERT INTO product_slots VALUES(35,209); +INSERT INTO product_slots VALUES(35,210); +INSERT INTO product_slots VALUES(35,211); +INSERT INTO product_slots VALUES(35,216); +INSERT INTO product_slots VALUES(35,217); +INSERT INTO product_slots VALUES(35,218); +INSERT INTO product_slots VALUES(35,219); +INSERT INTO product_slots VALUES(35,220); +INSERT INTO product_slots VALUES(35,223); +INSERT INTO product_slots VALUES(35,224); +INSERT INTO product_slots VALUES(35,225); +INSERT INTO product_slots VALUES(35,226); +INSERT INTO product_slots VALUES(35,230); +INSERT INTO product_slots VALUES(35,231); +INSERT INTO product_slots VALUES(35,232); +INSERT INTO product_slots VALUES(35,234); +INSERT INTO product_slots VALUES(35,237); +INSERT INTO product_slots VALUES(35,238); +INSERT INTO product_slots VALUES(35,239); +INSERT INTO product_slots VALUES(35,240); +INSERT INTO product_slots VALUES(35,274); +INSERT INTO product_slots VALUES(35,275); +INSERT INTO product_slots VALUES(35,277); +INSERT INTO product_slots VALUES(35,278); +INSERT INTO product_slots VALUES(35,279); +INSERT INTO product_slots VALUES(36,18); +INSERT INTO product_slots VALUES(36,19); +INSERT INTO product_slots VALUES(36,20); +INSERT INTO product_slots VALUES(36,21); +INSERT INTO product_slots VALUES(36,22); +INSERT INTO product_slots VALUES(36,23); +INSERT INTO product_slots VALUES(36,31); +INSERT INTO product_slots VALUES(36,33); +INSERT INTO product_slots VALUES(36,35); +INSERT INTO product_slots VALUES(36,37); +INSERT INTO product_slots VALUES(36,38); +INSERT INTO product_slots VALUES(36,39); +INSERT INTO product_slots VALUES(36,40); +INSERT INTO product_slots VALUES(36,41); +INSERT INTO product_slots VALUES(36,43); +INSERT INTO product_slots VALUES(36,45); +INSERT INTO product_slots VALUES(36,46); +INSERT INTO product_slots VALUES(36,47); +INSERT INTO product_slots VALUES(36,48); +INSERT INTO product_slots VALUES(36,49); +INSERT INTO product_slots VALUES(36,50); +INSERT INTO product_slots VALUES(36,51); +INSERT INTO product_slots VALUES(36,52); +INSERT INTO product_slots VALUES(36,53); +INSERT INTO product_slots VALUES(36,54); +INSERT INTO product_slots VALUES(36,55); +INSERT INTO product_slots VALUES(36,56); +INSERT INTO product_slots VALUES(36,57); +INSERT INTO product_slots VALUES(36,58); +INSERT INTO product_slots VALUES(36,59); +INSERT INTO product_slots VALUES(36,60); +INSERT INTO product_slots VALUES(36,61); +INSERT INTO product_slots VALUES(36,62); +INSERT INTO product_slots VALUES(36,63); +INSERT INTO product_slots VALUES(36,64); +INSERT INTO product_slots VALUES(36,65); +INSERT INTO product_slots VALUES(36,66); +INSERT INTO product_slots VALUES(36,67); +INSERT INTO product_slots VALUES(36,68); +INSERT INTO product_slots VALUES(36,69); +INSERT INTO product_slots VALUES(36,70); +INSERT INTO product_slots VALUES(36,71); +INSERT INTO product_slots VALUES(36,72); +INSERT INTO product_slots VALUES(36,73); +INSERT INTO product_slots VALUES(36,74); +INSERT INTO product_slots VALUES(36,75); +INSERT INTO product_slots VALUES(36,76); +INSERT INTO product_slots VALUES(36,77); +INSERT INTO product_slots VALUES(36,78); +INSERT INTO product_slots VALUES(36,79); +INSERT INTO product_slots VALUES(36,80); +INSERT INTO product_slots VALUES(36,81); +INSERT INTO product_slots VALUES(36,82); +INSERT INTO product_slots VALUES(36,83); +INSERT INTO product_slots VALUES(36,84); +INSERT INTO product_slots VALUES(36,85); +INSERT INTO product_slots VALUES(36,86); +INSERT INTO product_slots VALUES(36,87); +INSERT INTO product_slots VALUES(36,88); +INSERT INTO product_slots VALUES(36,89); +INSERT INTO product_slots VALUES(36,90); +INSERT INTO product_slots VALUES(36,91); +INSERT INTO product_slots VALUES(36,92); +INSERT INTO product_slots VALUES(36,93); +INSERT INTO product_slots VALUES(36,94); +INSERT INTO product_slots VALUES(36,95); +INSERT INTO product_slots VALUES(36,96); +INSERT INTO product_slots VALUES(36,97); +INSERT INTO product_slots VALUES(36,98); +INSERT INTO product_slots VALUES(36,99); +INSERT INTO product_slots VALUES(36,100); +INSERT INTO product_slots VALUES(36,101); +INSERT INTO product_slots VALUES(36,102); +INSERT INTO product_slots VALUES(36,103); +INSERT INTO product_slots VALUES(36,104); +INSERT INTO product_slots VALUES(36,105); +INSERT INTO product_slots VALUES(36,106); +INSERT INTO product_slots VALUES(36,107); +INSERT INTO product_slots VALUES(36,108); +INSERT INTO product_slots VALUES(36,109); +INSERT INTO product_slots VALUES(36,110); +INSERT INTO product_slots VALUES(36,111); +INSERT INTO product_slots VALUES(36,112); +INSERT INTO product_slots VALUES(36,113); +INSERT INTO product_slots VALUES(36,114); +INSERT INTO product_slots VALUES(36,115); +INSERT INTO product_slots VALUES(36,116); +INSERT INTO product_slots VALUES(36,117); +INSERT INTO product_slots VALUES(36,118); +INSERT INTO product_slots VALUES(36,119); +INSERT INTO product_slots VALUES(36,120); +INSERT INTO product_slots VALUES(36,121); +INSERT INTO product_slots VALUES(36,122); +INSERT INTO product_slots VALUES(36,123); +INSERT INTO product_slots VALUES(36,124); +INSERT INTO product_slots VALUES(36,125); +INSERT INTO product_slots VALUES(36,126); +INSERT INTO product_slots VALUES(36,127); +INSERT INTO product_slots VALUES(36,128); +INSERT INTO product_slots VALUES(36,129); +INSERT INTO product_slots VALUES(36,130); +INSERT INTO product_slots VALUES(36,131); +INSERT INTO product_slots VALUES(36,132); +INSERT INTO product_slots VALUES(36,133); +INSERT INTO product_slots VALUES(36,134); +INSERT INTO product_slots VALUES(36,135); +INSERT INTO product_slots VALUES(36,136); +INSERT INTO product_slots VALUES(36,137); +INSERT INTO product_slots VALUES(36,138); +INSERT INTO product_slots VALUES(36,139); +INSERT INTO product_slots VALUES(36,140); +INSERT INTO product_slots VALUES(36,141); +INSERT INTO product_slots VALUES(36,142); +INSERT INTO product_slots VALUES(36,143); +INSERT INTO product_slots VALUES(36,144); +INSERT INTO product_slots VALUES(36,145); +INSERT INTO product_slots VALUES(36,146); +INSERT INTO product_slots VALUES(36,147); +INSERT INTO product_slots VALUES(36,148); +INSERT INTO product_slots VALUES(36,149); +INSERT INTO product_slots VALUES(36,150); +INSERT INTO product_slots VALUES(36,151); +INSERT INTO product_slots VALUES(36,152); +INSERT INTO product_slots VALUES(36,153); +INSERT INTO product_slots VALUES(36,154); +INSERT INTO product_slots VALUES(36,155); +INSERT INTO product_slots VALUES(36,156); +INSERT INTO product_slots VALUES(36,157); +INSERT INTO product_slots VALUES(36,158); +INSERT INTO product_slots VALUES(36,159); +INSERT INTO product_slots VALUES(36,160); +INSERT INTO product_slots VALUES(36,161); +INSERT INTO product_slots VALUES(36,162); +INSERT INTO product_slots VALUES(36,163); +INSERT INTO product_slots VALUES(36,164); +INSERT INTO product_slots VALUES(36,165); +INSERT INTO product_slots VALUES(36,166); +INSERT INTO product_slots VALUES(36,167); +INSERT INTO product_slots VALUES(36,168); +INSERT INTO product_slots VALUES(36,169); +INSERT INTO product_slots VALUES(36,170); +INSERT INTO product_slots VALUES(36,171); +INSERT INTO product_slots VALUES(36,172); +INSERT INTO product_slots VALUES(36,173); +INSERT INTO product_slots VALUES(36,174); +INSERT INTO product_slots VALUES(36,175); +INSERT INTO product_slots VALUES(36,176); +INSERT INTO product_slots VALUES(36,177); +INSERT INTO product_slots VALUES(36,178); +INSERT INTO product_slots VALUES(36,179); +INSERT INTO product_slots VALUES(36,180); +INSERT INTO product_slots VALUES(36,181); +INSERT INTO product_slots VALUES(36,182); +INSERT INTO product_slots VALUES(36,183); +INSERT INTO product_slots VALUES(36,184); +INSERT INTO product_slots VALUES(36,185); +INSERT INTO product_slots VALUES(36,186); +INSERT INTO product_slots VALUES(36,187); +INSERT INTO product_slots VALUES(36,188); +INSERT INTO product_slots VALUES(36,189); +INSERT INTO product_slots VALUES(36,190); +INSERT INTO product_slots VALUES(36,191); +INSERT INTO product_slots VALUES(36,192); +INSERT INTO product_slots VALUES(36,193); +INSERT INTO product_slots VALUES(36,194); +INSERT INTO product_slots VALUES(36,195); +INSERT INTO product_slots VALUES(36,196); +INSERT INTO product_slots VALUES(36,197); +INSERT INTO product_slots VALUES(36,198); +INSERT INTO product_slots VALUES(36,199); +INSERT INTO product_slots VALUES(36,200); +INSERT INTO product_slots VALUES(36,201); +INSERT INTO product_slots VALUES(36,202); +INSERT INTO product_slots VALUES(36,203); +INSERT INTO product_slots VALUES(36,204); +INSERT INTO product_slots VALUES(36,205); +INSERT INTO product_slots VALUES(36,206); +INSERT INTO product_slots VALUES(36,207); +INSERT INTO product_slots VALUES(36,208); +INSERT INTO product_slots VALUES(36,209); +INSERT INTO product_slots VALUES(36,210); +INSERT INTO product_slots VALUES(36,211); +INSERT INTO product_slots VALUES(36,212); +INSERT INTO product_slots VALUES(36,213); +INSERT INTO product_slots VALUES(36,214); +INSERT INTO product_slots VALUES(36,215); +INSERT INTO product_slots VALUES(36,216); +INSERT INTO product_slots VALUES(36,217); +INSERT INTO product_slots VALUES(36,218); +INSERT INTO product_slots VALUES(36,219); +INSERT INTO product_slots VALUES(36,220); +INSERT INTO product_slots VALUES(36,221); +INSERT INTO product_slots VALUES(36,222); +INSERT INTO product_slots VALUES(36,223); +INSERT INTO product_slots VALUES(36,224); +INSERT INTO product_slots VALUES(36,225); +INSERT INTO product_slots VALUES(36,226); +INSERT INTO product_slots VALUES(36,227); +INSERT INTO product_slots VALUES(36,228); +INSERT INTO product_slots VALUES(36,229); +INSERT INTO product_slots VALUES(36,230); +INSERT INTO product_slots VALUES(36,231); +INSERT INTO product_slots VALUES(36,232); +INSERT INTO product_slots VALUES(36,234); +INSERT INTO product_slots VALUES(36,235); +INSERT INTO product_slots VALUES(36,236); +INSERT INTO product_slots VALUES(36,237); +INSERT INTO product_slots VALUES(36,238); +INSERT INTO product_slots VALUES(36,239); +INSERT INTO product_slots VALUES(36,240); +INSERT INTO product_slots VALUES(36,241); +INSERT INTO product_slots VALUES(36,242); +INSERT INTO product_slots VALUES(36,243); +INSERT INTO product_slots VALUES(36,244); +INSERT INTO product_slots VALUES(36,274); +INSERT INTO product_slots VALUES(36,275); +INSERT INTO product_slots VALUES(36,279); +INSERT INTO product_slots VALUES(36,280); +INSERT INTO product_slots VALUES(36,281); +INSERT INTO product_slots VALUES(36,282); +INSERT INTO product_slots VALUES(37,18); +INSERT INTO product_slots VALUES(37,20); +INSERT INTO product_slots VALUES(37,21); +INSERT INTO product_slots VALUES(37,33); +INSERT INTO product_slots VALUES(37,35); +INSERT INTO product_slots VALUES(37,37); +INSERT INTO product_slots VALUES(37,38); +INSERT INTO product_slots VALUES(37,39); +INSERT INTO product_slots VALUES(37,40); +INSERT INTO product_slots VALUES(37,41); +INSERT INTO product_slots VALUES(37,43); +INSERT INTO product_slots VALUES(37,44); +INSERT INTO product_slots VALUES(37,45); +INSERT INTO product_slots VALUES(37,46); +INSERT INTO product_slots VALUES(37,47); +INSERT INTO product_slots VALUES(37,48); +INSERT INTO product_slots VALUES(37,49); +INSERT INTO product_slots VALUES(37,50); +INSERT INTO product_slots VALUES(37,51); +INSERT INTO product_slots VALUES(37,52); +INSERT INTO product_slots VALUES(37,53); +INSERT INTO product_slots VALUES(37,54); +INSERT INTO product_slots VALUES(37,55); +INSERT INTO product_slots VALUES(37,56); +INSERT INTO product_slots VALUES(37,57); +INSERT INTO product_slots VALUES(37,58); +INSERT INTO product_slots VALUES(37,59); +INSERT INTO product_slots VALUES(37,60); +INSERT INTO product_slots VALUES(37,61); +INSERT INTO product_slots VALUES(37,62); +INSERT INTO product_slots VALUES(37,63); +INSERT INTO product_slots VALUES(37,64); +INSERT INTO product_slots VALUES(37,65); +INSERT INTO product_slots VALUES(37,66); +INSERT INTO product_slots VALUES(37,67); +INSERT INTO product_slots VALUES(37,68); +INSERT INTO product_slots VALUES(37,69); +INSERT INTO product_slots VALUES(37,70); +INSERT INTO product_slots VALUES(37,71); +INSERT INTO product_slots VALUES(37,72); +INSERT INTO product_slots VALUES(37,73); +INSERT INTO product_slots VALUES(37,74); +INSERT INTO product_slots VALUES(37,75); +INSERT INTO product_slots VALUES(37,76); +INSERT INTO product_slots VALUES(37,77); +INSERT INTO product_slots VALUES(37,78); +INSERT INTO product_slots VALUES(37,79); +INSERT INTO product_slots VALUES(37,80); +INSERT INTO product_slots VALUES(37,81); +INSERT INTO product_slots VALUES(37,82); +INSERT INTO product_slots VALUES(37,83); +INSERT INTO product_slots VALUES(37,84); +INSERT INTO product_slots VALUES(37,85); +INSERT INTO product_slots VALUES(37,86); +INSERT INTO product_slots VALUES(37,87); +INSERT INTO product_slots VALUES(37,88); +INSERT INTO product_slots VALUES(37,89); +INSERT INTO product_slots VALUES(37,90); +INSERT INTO product_slots VALUES(37,91); +INSERT INTO product_slots VALUES(37,92); +INSERT INTO product_slots VALUES(37,93); +INSERT INTO product_slots VALUES(37,94); +INSERT INTO product_slots VALUES(37,95); +INSERT INTO product_slots VALUES(37,96); +INSERT INTO product_slots VALUES(37,97); +INSERT INTO product_slots VALUES(37,98); +INSERT INTO product_slots VALUES(37,99); +INSERT INTO product_slots VALUES(37,100); +INSERT INTO product_slots VALUES(37,101); +INSERT INTO product_slots VALUES(37,102); +INSERT INTO product_slots VALUES(37,103); +INSERT INTO product_slots VALUES(37,104); +INSERT INTO product_slots VALUES(37,105); +INSERT INTO product_slots VALUES(37,106); +INSERT INTO product_slots VALUES(37,107); +INSERT INTO product_slots VALUES(37,108); +INSERT INTO product_slots VALUES(37,109); +INSERT INTO product_slots VALUES(37,110); +INSERT INTO product_slots VALUES(37,111); +INSERT INTO product_slots VALUES(37,112); +INSERT INTO product_slots VALUES(37,113); +INSERT INTO product_slots VALUES(37,114); +INSERT INTO product_slots VALUES(37,115); +INSERT INTO product_slots VALUES(37,116); +INSERT INTO product_slots VALUES(37,117); +INSERT INTO product_slots VALUES(37,118); +INSERT INTO product_slots VALUES(37,119); +INSERT INTO product_slots VALUES(37,120); +INSERT INTO product_slots VALUES(37,121); +INSERT INTO product_slots VALUES(37,122); +INSERT INTO product_slots VALUES(37,123); +INSERT INTO product_slots VALUES(37,124); +INSERT INTO product_slots VALUES(37,125); +INSERT INTO product_slots VALUES(37,126); +INSERT INTO product_slots VALUES(37,127); +INSERT INTO product_slots VALUES(37,128); +INSERT INTO product_slots VALUES(37,129); +INSERT INTO product_slots VALUES(37,130); +INSERT INTO product_slots VALUES(37,131); +INSERT INTO product_slots VALUES(37,132); +INSERT INTO product_slots VALUES(37,133); +INSERT INTO product_slots VALUES(37,134); +INSERT INTO product_slots VALUES(37,135); +INSERT INTO product_slots VALUES(37,136); +INSERT INTO product_slots VALUES(37,137); +INSERT INTO product_slots VALUES(37,138); +INSERT INTO product_slots VALUES(37,139); +INSERT INTO product_slots VALUES(37,140); +INSERT INTO product_slots VALUES(37,141); +INSERT INTO product_slots VALUES(37,142); +INSERT INTO product_slots VALUES(37,143); +INSERT INTO product_slots VALUES(37,144); +INSERT INTO product_slots VALUES(37,145); +INSERT INTO product_slots VALUES(37,146); +INSERT INTO product_slots VALUES(37,147); +INSERT INTO product_slots VALUES(37,148); +INSERT INTO product_slots VALUES(37,149); +INSERT INTO product_slots VALUES(37,150); +INSERT INTO product_slots VALUES(37,151); +INSERT INTO product_slots VALUES(37,152); +INSERT INTO product_slots VALUES(37,153); +INSERT INTO product_slots VALUES(37,154); +INSERT INTO product_slots VALUES(37,155); +INSERT INTO product_slots VALUES(37,156); +INSERT INTO product_slots VALUES(37,157); +INSERT INTO product_slots VALUES(37,158); +INSERT INTO product_slots VALUES(37,159); +INSERT INTO product_slots VALUES(37,160); +INSERT INTO product_slots VALUES(37,161); +INSERT INTO product_slots VALUES(37,162); +INSERT INTO product_slots VALUES(37,163); +INSERT INTO product_slots VALUES(37,164); +INSERT INTO product_slots VALUES(37,165); +INSERT INTO product_slots VALUES(37,166); +INSERT INTO product_slots VALUES(37,167); +INSERT INTO product_slots VALUES(37,168); +INSERT INTO product_slots VALUES(37,169); +INSERT INTO product_slots VALUES(37,170); +INSERT INTO product_slots VALUES(37,171); +INSERT INTO product_slots VALUES(37,172); +INSERT INTO product_slots VALUES(37,173); +INSERT INTO product_slots VALUES(37,174); +INSERT INTO product_slots VALUES(37,175); +INSERT INTO product_slots VALUES(37,176); +INSERT INTO product_slots VALUES(37,177); +INSERT INTO product_slots VALUES(37,178); +INSERT INTO product_slots VALUES(37,179); +INSERT INTO product_slots VALUES(37,180); +INSERT INTO product_slots VALUES(37,181); +INSERT INTO product_slots VALUES(37,182); +INSERT INTO product_slots VALUES(37,183); +INSERT INTO product_slots VALUES(37,184); +INSERT INTO product_slots VALUES(37,185); +INSERT INTO product_slots VALUES(37,186); +INSERT INTO product_slots VALUES(37,187); +INSERT INTO product_slots VALUES(37,188); +INSERT INTO product_slots VALUES(37,189); +INSERT INTO product_slots VALUES(37,190); +INSERT INTO product_slots VALUES(37,191); +INSERT INTO product_slots VALUES(37,192); +INSERT INTO product_slots VALUES(37,193); +INSERT INTO product_slots VALUES(37,194); +INSERT INTO product_slots VALUES(37,195); +INSERT INTO product_slots VALUES(37,196); +INSERT INTO product_slots VALUES(37,197); +INSERT INTO product_slots VALUES(37,198); +INSERT INTO product_slots VALUES(37,199); +INSERT INTO product_slots VALUES(37,200); +INSERT INTO product_slots VALUES(37,201); +INSERT INTO product_slots VALUES(37,202); +INSERT INTO product_slots VALUES(37,203); +INSERT INTO product_slots VALUES(37,204); +INSERT INTO product_slots VALUES(37,205); +INSERT INTO product_slots VALUES(37,206); +INSERT INTO product_slots VALUES(37,207); +INSERT INTO product_slots VALUES(37,208); +INSERT INTO product_slots VALUES(37,209); +INSERT INTO product_slots VALUES(37,210); +INSERT INTO product_slots VALUES(37,211); +INSERT INTO product_slots VALUES(37,212); +INSERT INTO product_slots VALUES(37,213); +INSERT INTO product_slots VALUES(37,214); +INSERT INTO product_slots VALUES(37,215); +INSERT INTO product_slots VALUES(37,216); +INSERT INTO product_slots VALUES(37,217); +INSERT INTO product_slots VALUES(37,218); +INSERT INTO product_slots VALUES(37,219); +INSERT INTO product_slots VALUES(37,220); +INSERT INTO product_slots VALUES(37,221); +INSERT INTO product_slots VALUES(37,222); +INSERT INTO product_slots VALUES(37,223); +INSERT INTO product_slots VALUES(37,224); +INSERT INTO product_slots VALUES(37,225); +INSERT INTO product_slots VALUES(37,226); +INSERT INTO product_slots VALUES(37,227); +INSERT INTO product_slots VALUES(37,228); +INSERT INTO product_slots VALUES(37,229); +INSERT INTO product_slots VALUES(37,230); +INSERT INTO product_slots VALUES(37,231); +INSERT INTO product_slots VALUES(37,232); +INSERT INTO product_slots VALUES(37,233); +INSERT INTO product_slots VALUES(37,234); +INSERT INTO product_slots VALUES(37,235); +INSERT INTO product_slots VALUES(37,236); +INSERT INTO product_slots VALUES(37,237); +INSERT INTO product_slots VALUES(37,238); +INSERT INTO product_slots VALUES(37,239); +INSERT INTO product_slots VALUES(37,240); +INSERT INTO product_slots VALUES(37,241); +INSERT INTO product_slots VALUES(37,242); +INSERT INTO product_slots VALUES(37,243); +INSERT INTO product_slots VALUES(37,244); +INSERT INTO product_slots VALUES(37,274); +INSERT INTO product_slots VALUES(37,275); +INSERT INTO product_slots VALUES(37,279); +INSERT INTO product_slots VALUES(37,280); +INSERT INTO product_slots VALUES(37,281); +INSERT INTO product_slots VALUES(37,282); +INSERT INTO product_slots VALUES(37,283); +INSERT INTO product_slots VALUES(37,284); +INSERT INTO product_slots VALUES(37,285); +INSERT INTO product_slots VALUES(37,286); +INSERT INTO product_slots VALUES(37,287); +INSERT INTO product_slots VALUES(38,18); +INSERT INTO product_slots VALUES(38,20); +INSERT INTO product_slots VALUES(38,21); +INSERT INTO product_slots VALUES(38,22); +INSERT INTO product_slots VALUES(38,33); +INSERT INTO product_slots VALUES(38,35); +INSERT INTO product_slots VALUES(38,37); +INSERT INTO product_slots VALUES(38,38); +INSERT INTO product_slots VALUES(38,39); +INSERT INTO product_slots VALUES(38,40); +INSERT INTO product_slots VALUES(38,43); +INSERT INTO product_slots VALUES(38,45); +INSERT INTO product_slots VALUES(38,46); +INSERT INTO product_slots VALUES(38,48); +INSERT INTO product_slots VALUES(38,49); +INSERT INTO product_slots VALUES(38,51); +INSERT INTO product_slots VALUES(38,52); +INSERT INTO product_slots VALUES(38,53); +INSERT INTO product_slots VALUES(38,54); +INSERT INTO product_slots VALUES(38,57); +INSERT INTO product_slots VALUES(38,58); +INSERT INTO product_slots VALUES(38,59); +INSERT INTO product_slots VALUES(38,60); +INSERT INTO product_slots VALUES(38,61); +INSERT INTO product_slots VALUES(38,62); +INSERT INTO product_slots VALUES(38,63); +INSERT INTO product_slots VALUES(38,64); +INSERT INTO product_slots VALUES(38,65); +INSERT INTO product_slots VALUES(38,66); +INSERT INTO product_slots VALUES(38,67); +INSERT INTO product_slots VALUES(38,68); +INSERT INTO product_slots VALUES(38,69); +INSERT INTO product_slots VALUES(38,70); +INSERT INTO product_slots VALUES(38,71); +INSERT INTO product_slots VALUES(38,72); +INSERT INTO product_slots VALUES(38,73); +INSERT INTO product_slots VALUES(38,74); +INSERT INTO product_slots VALUES(38,75); +INSERT INTO product_slots VALUES(38,76); +INSERT INTO product_slots VALUES(38,77); +INSERT INTO product_slots VALUES(38,78); +INSERT INTO product_slots VALUES(38,79); +INSERT INTO product_slots VALUES(38,80); +INSERT INTO product_slots VALUES(38,81); +INSERT INTO product_slots VALUES(38,82); +INSERT INTO product_slots VALUES(38,83); +INSERT INTO product_slots VALUES(38,84); +INSERT INTO product_slots VALUES(38,85); +INSERT INTO product_slots VALUES(38,86); +INSERT INTO product_slots VALUES(38,87); +INSERT INTO product_slots VALUES(38,88); +INSERT INTO product_slots VALUES(38,89); +INSERT INTO product_slots VALUES(38,90); +INSERT INTO product_slots VALUES(38,91); +INSERT INTO product_slots VALUES(38,92); +INSERT INTO product_slots VALUES(38,93); +INSERT INTO product_slots VALUES(38,94); +INSERT INTO product_slots VALUES(38,95); +INSERT INTO product_slots VALUES(38,96); +INSERT INTO product_slots VALUES(38,97); +INSERT INTO product_slots VALUES(38,98); +INSERT INTO product_slots VALUES(38,99); +INSERT INTO product_slots VALUES(38,100); +INSERT INTO product_slots VALUES(38,102); +INSERT INTO product_slots VALUES(38,103); +INSERT INTO product_slots VALUES(38,104); +INSERT INTO product_slots VALUES(38,105); +INSERT INTO product_slots VALUES(38,106); +INSERT INTO product_slots VALUES(38,107); +INSERT INTO product_slots VALUES(38,108); +INSERT INTO product_slots VALUES(38,109); +INSERT INTO product_slots VALUES(38,110); +INSERT INTO product_slots VALUES(38,111); +INSERT INTO product_slots VALUES(38,112); +INSERT INTO product_slots VALUES(38,113); +INSERT INTO product_slots VALUES(38,114); +INSERT INTO product_slots VALUES(38,115); +INSERT INTO product_slots VALUES(38,117); +INSERT INTO product_slots VALUES(38,118); +INSERT INTO product_slots VALUES(38,119); +INSERT INTO product_slots VALUES(38,120); +INSERT INTO product_slots VALUES(38,121); +INSERT INTO product_slots VALUES(38,122); +INSERT INTO product_slots VALUES(38,123); +INSERT INTO product_slots VALUES(38,124); +INSERT INTO product_slots VALUES(38,125); +INSERT INTO product_slots VALUES(38,126); +INSERT INTO product_slots VALUES(38,127); +INSERT INTO product_slots VALUES(38,128); +INSERT INTO product_slots VALUES(38,129); +INSERT INTO product_slots VALUES(38,130); +INSERT INTO product_slots VALUES(38,131); +INSERT INTO product_slots VALUES(38,132); +INSERT INTO product_slots VALUES(38,133); +INSERT INTO product_slots VALUES(38,134); +INSERT INTO product_slots VALUES(38,135); +INSERT INTO product_slots VALUES(38,136); +INSERT INTO product_slots VALUES(38,138); +INSERT INTO product_slots VALUES(38,139); +INSERT INTO product_slots VALUES(38,140); +INSERT INTO product_slots VALUES(38,141); +INSERT INTO product_slots VALUES(38,142); +INSERT INTO product_slots VALUES(38,143); +INSERT INTO product_slots VALUES(38,145); +INSERT INTO product_slots VALUES(38,146); +INSERT INTO product_slots VALUES(38,147); +INSERT INTO product_slots VALUES(38,148); +INSERT INTO product_slots VALUES(38,149); +INSERT INTO product_slots VALUES(38,150); +INSERT INTO product_slots VALUES(38,151); +INSERT INTO product_slots VALUES(38,152); +INSERT INTO product_slots VALUES(38,153); +INSERT INTO product_slots VALUES(38,154); +INSERT INTO product_slots VALUES(38,155); +INSERT INTO product_slots VALUES(38,156); +INSERT INTO product_slots VALUES(38,157); +INSERT INTO product_slots VALUES(38,158); +INSERT INTO product_slots VALUES(38,159); +INSERT INTO product_slots VALUES(38,160); +INSERT INTO product_slots VALUES(38,161); +INSERT INTO product_slots VALUES(38,162); +INSERT INTO product_slots VALUES(38,163); +INSERT INTO product_slots VALUES(38,164); +INSERT INTO product_slots VALUES(38,165); +INSERT INTO product_slots VALUES(38,166); +INSERT INTO product_slots VALUES(38,167); +INSERT INTO product_slots VALUES(38,168); +INSERT INTO product_slots VALUES(38,169); +INSERT INTO product_slots VALUES(38,170); +INSERT INTO product_slots VALUES(38,171); +INSERT INTO product_slots VALUES(38,172); +INSERT INTO product_slots VALUES(38,173); +INSERT INTO product_slots VALUES(38,174); +INSERT INTO product_slots VALUES(38,175); +INSERT INTO product_slots VALUES(38,176); +INSERT INTO product_slots VALUES(38,177); +INSERT INTO product_slots VALUES(38,178); +INSERT INTO product_slots VALUES(38,179); +INSERT INTO product_slots VALUES(38,180); +INSERT INTO product_slots VALUES(38,181); +INSERT INTO product_slots VALUES(38,182); +INSERT INTO product_slots VALUES(38,183); +INSERT INTO product_slots VALUES(38,184); +INSERT INTO product_slots VALUES(38,185); +INSERT INTO product_slots VALUES(38,186); +INSERT INTO product_slots VALUES(38,187); +INSERT INTO product_slots VALUES(38,188); +INSERT INTO product_slots VALUES(38,189); +INSERT INTO product_slots VALUES(38,190); +INSERT INTO product_slots VALUES(38,191); +INSERT INTO product_slots VALUES(38,192); +INSERT INTO product_slots VALUES(38,193); +INSERT INTO product_slots VALUES(38,194); +INSERT INTO product_slots VALUES(38,195); +INSERT INTO product_slots VALUES(38,196); +INSERT INTO product_slots VALUES(38,197); +INSERT INTO product_slots VALUES(38,198); +INSERT INTO product_slots VALUES(38,199); +INSERT INTO product_slots VALUES(38,200); +INSERT INTO product_slots VALUES(38,201); +INSERT INTO product_slots VALUES(38,202); +INSERT INTO product_slots VALUES(38,203); +INSERT INTO product_slots VALUES(38,204); +INSERT INTO product_slots VALUES(38,205); +INSERT INTO product_slots VALUES(38,206); +INSERT INTO product_slots VALUES(38,207); +INSERT INTO product_slots VALUES(38,208); +INSERT INTO product_slots VALUES(38,209); +INSERT INTO product_slots VALUES(38,210); +INSERT INTO product_slots VALUES(38,211); +INSERT INTO product_slots VALUES(38,212); +INSERT INTO product_slots VALUES(38,213); +INSERT INTO product_slots VALUES(38,214); +INSERT INTO product_slots VALUES(38,215); +INSERT INTO product_slots VALUES(38,216); +INSERT INTO product_slots VALUES(38,217); +INSERT INTO product_slots VALUES(38,218); +INSERT INTO product_slots VALUES(38,219); +INSERT INTO product_slots VALUES(38,220); +INSERT INTO product_slots VALUES(38,221); +INSERT INTO product_slots VALUES(38,222); +INSERT INTO product_slots VALUES(38,223); +INSERT INTO product_slots VALUES(38,224); +INSERT INTO product_slots VALUES(38,225); +INSERT INTO product_slots VALUES(38,226); +INSERT INTO product_slots VALUES(38,227); +INSERT INTO product_slots VALUES(38,228); +INSERT INTO product_slots VALUES(38,229); +INSERT INTO product_slots VALUES(38,230); +INSERT INTO product_slots VALUES(38,231); +INSERT INTO product_slots VALUES(38,232); +INSERT INTO product_slots VALUES(38,233); +INSERT INTO product_slots VALUES(38,234); +INSERT INTO product_slots VALUES(38,235); +INSERT INTO product_slots VALUES(38,236); +INSERT INTO product_slots VALUES(38,237); +INSERT INTO product_slots VALUES(38,238); +INSERT INTO product_slots VALUES(38,239); +INSERT INTO product_slots VALUES(38,240); +INSERT INTO product_slots VALUES(38,241); +INSERT INTO product_slots VALUES(38,242); +INSERT INTO product_slots VALUES(38,243); +INSERT INTO product_slots VALUES(38,244); +INSERT INTO product_slots VALUES(38,274); +INSERT INTO product_slots VALUES(38,275); +INSERT INTO product_slots VALUES(38,279); +INSERT INTO product_slots VALUES(38,280); +INSERT INTO product_slots VALUES(38,281); +INSERT INTO product_slots VALUES(38,282); +INSERT INTO product_slots VALUES(38,283); +INSERT INTO product_slots VALUES(38,284); +INSERT INTO product_slots VALUES(38,285); +INSERT INTO product_slots VALUES(38,286); +INSERT INTO product_slots VALUES(38,287); +INSERT INTO product_slots VALUES(39,18); +INSERT INTO product_slots VALUES(39,20); +INSERT INTO product_slots VALUES(39,21); +INSERT INTO product_slots VALUES(39,22); +INSERT INTO product_slots VALUES(39,33); +INSERT INTO product_slots VALUES(39,35); +INSERT INTO product_slots VALUES(39,37); +INSERT INTO product_slots VALUES(39,38); +INSERT INTO product_slots VALUES(39,40); +INSERT INTO product_slots VALUES(39,64); +INSERT INTO product_slots VALUES(39,65); +INSERT INTO product_slots VALUES(39,66); +INSERT INTO product_slots VALUES(39,67); +INSERT INTO product_slots VALUES(39,68); +INSERT INTO product_slots VALUES(39,69); +INSERT INTO product_slots VALUES(39,70); +INSERT INTO product_slots VALUES(39,71); +INSERT INTO product_slots VALUES(39,72); +INSERT INTO product_slots VALUES(39,73); +INSERT INTO product_slots VALUES(39,74); +INSERT INTO product_slots VALUES(39,75); +INSERT INTO product_slots VALUES(39,76); +INSERT INTO product_slots VALUES(39,77); +INSERT INTO product_slots VALUES(39,78); +INSERT INTO product_slots VALUES(39,79); +INSERT INTO product_slots VALUES(39,80); +INSERT INTO product_slots VALUES(39,81); +INSERT INTO product_slots VALUES(39,82); +INSERT INTO product_slots VALUES(39,83); +INSERT INTO product_slots VALUES(39,84); +INSERT INTO product_slots VALUES(39,85); +INSERT INTO product_slots VALUES(39,86); +INSERT INTO product_slots VALUES(39,87); +INSERT INTO product_slots VALUES(39,88); +INSERT INTO product_slots VALUES(39,89); +INSERT INTO product_slots VALUES(39,90); +INSERT INTO product_slots VALUES(39,91); +INSERT INTO product_slots VALUES(39,92); +INSERT INTO product_slots VALUES(39,93); +INSERT INTO product_slots VALUES(39,94); +INSERT INTO product_slots VALUES(39,95); +INSERT INTO product_slots VALUES(39,96); +INSERT INTO product_slots VALUES(39,97); +INSERT INTO product_slots VALUES(39,98); +INSERT INTO product_slots VALUES(39,99); +INSERT INTO product_slots VALUES(39,100); +INSERT INTO product_slots VALUES(39,102); +INSERT INTO product_slots VALUES(39,103); +INSERT INTO product_slots VALUES(39,104); +INSERT INTO product_slots VALUES(39,105); +INSERT INTO product_slots VALUES(39,106); +INSERT INTO product_slots VALUES(39,107); +INSERT INTO product_slots VALUES(39,108); +INSERT INTO product_slots VALUES(39,109); +INSERT INTO product_slots VALUES(39,110); +INSERT INTO product_slots VALUES(39,111); +INSERT INTO product_slots VALUES(39,112); +INSERT INTO product_slots VALUES(39,113); +INSERT INTO product_slots VALUES(39,114); +INSERT INTO product_slots VALUES(39,115); +INSERT INTO product_slots VALUES(39,117); +INSERT INTO product_slots VALUES(39,118); +INSERT INTO product_slots VALUES(39,119); +INSERT INTO product_slots VALUES(39,120); +INSERT INTO product_slots VALUES(39,121); +INSERT INTO product_slots VALUES(39,122); +INSERT INTO product_slots VALUES(39,123); +INSERT INTO product_slots VALUES(39,124); +INSERT INTO product_slots VALUES(39,125); +INSERT INTO product_slots VALUES(39,126); +INSERT INTO product_slots VALUES(39,127); +INSERT INTO product_slots VALUES(39,128); +INSERT INTO product_slots VALUES(39,129); +INSERT INTO product_slots VALUES(39,130); +INSERT INTO product_slots VALUES(39,131); +INSERT INTO product_slots VALUES(39,132); +INSERT INTO product_slots VALUES(39,133); +INSERT INTO product_slots VALUES(39,134); +INSERT INTO product_slots VALUES(39,135); +INSERT INTO product_slots VALUES(39,136); +INSERT INTO product_slots VALUES(39,138); +INSERT INTO product_slots VALUES(39,139); +INSERT INTO product_slots VALUES(39,140); +INSERT INTO product_slots VALUES(39,141); +INSERT INTO product_slots VALUES(39,142); +INSERT INTO product_slots VALUES(39,143); +INSERT INTO product_slots VALUES(39,145); +INSERT INTO product_slots VALUES(39,146); +INSERT INTO product_slots VALUES(39,147); +INSERT INTO product_slots VALUES(39,148); +INSERT INTO product_slots VALUES(39,149); +INSERT INTO product_slots VALUES(39,150); +INSERT INTO product_slots VALUES(39,151); +INSERT INTO product_slots VALUES(39,152); +INSERT INTO product_slots VALUES(39,153); +INSERT INTO product_slots VALUES(39,154); +INSERT INTO product_slots VALUES(39,155); +INSERT INTO product_slots VALUES(39,156); +INSERT INTO product_slots VALUES(39,157); +INSERT INTO product_slots VALUES(39,158); +INSERT INTO product_slots VALUES(39,159); +INSERT INTO product_slots VALUES(39,160); +INSERT INTO product_slots VALUES(39,161); +INSERT INTO product_slots VALUES(39,162); +INSERT INTO product_slots VALUES(39,163); +INSERT INTO product_slots VALUES(39,164); +INSERT INTO product_slots VALUES(39,165); +INSERT INTO product_slots VALUES(39,166); +INSERT INTO product_slots VALUES(39,167); +INSERT INTO product_slots VALUES(39,168); +INSERT INTO product_slots VALUES(39,169); +INSERT INTO product_slots VALUES(39,170); +INSERT INTO product_slots VALUES(39,171); +INSERT INTO product_slots VALUES(39,172); +INSERT INTO product_slots VALUES(39,173); +INSERT INTO product_slots VALUES(39,174); +INSERT INTO product_slots VALUES(39,175); +INSERT INTO product_slots VALUES(39,176); +INSERT INTO product_slots VALUES(39,177); +INSERT INTO product_slots VALUES(39,178); +INSERT INTO product_slots VALUES(39,179); +INSERT INTO product_slots VALUES(39,180); +INSERT INTO product_slots VALUES(39,181); +INSERT INTO product_slots VALUES(39,182); +INSERT INTO product_slots VALUES(39,183); +INSERT INTO product_slots VALUES(39,184); +INSERT INTO product_slots VALUES(39,185); +INSERT INTO product_slots VALUES(39,186); +INSERT INTO product_slots VALUES(39,187); +INSERT INTO product_slots VALUES(39,188); +INSERT INTO product_slots VALUES(39,189); +INSERT INTO product_slots VALUES(39,190); +INSERT INTO product_slots VALUES(39,191); +INSERT INTO product_slots VALUES(39,192); +INSERT INTO product_slots VALUES(39,193); +INSERT INTO product_slots VALUES(39,194); +INSERT INTO product_slots VALUES(39,195); +INSERT INTO product_slots VALUES(39,196); +INSERT INTO product_slots VALUES(39,197); +INSERT INTO product_slots VALUES(39,198); +INSERT INTO product_slots VALUES(39,199); +INSERT INTO product_slots VALUES(39,200); +INSERT INTO product_slots VALUES(39,201); +INSERT INTO product_slots VALUES(39,202); +INSERT INTO product_slots VALUES(39,203); +INSERT INTO product_slots VALUES(39,204); +INSERT INTO product_slots VALUES(39,205); +INSERT INTO product_slots VALUES(39,206); +INSERT INTO product_slots VALUES(39,207); +INSERT INTO product_slots VALUES(39,208); +INSERT INTO product_slots VALUES(39,209); +INSERT INTO product_slots VALUES(39,210); +INSERT INTO product_slots VALUES(39,211); +INSERT INTO product_slots VALUES(39,212); +INSERT INTO product_slots VALUES(39,213); +INSERT INTO product_slots VALUES(39,214); +INSERT INTO product_slots VALUES(39,215); +INSERT INTO product_slots VALUES(39,216); +INSERT INTO product_slots VALUES(39,217); +INSERT INTO product_slots VALUES(39,218); +INSERT INTO product_slots VALUES(39,219); +INSERT INTO product_slots VALUES(39,220); +INSERT INTO product_slots VALUES(39,221); +INSERT INTO product_slots VALUES(39,222); +INSERT INTO product_slots VALUES(39,223); +INSERT INTO product_slots VALUES(39,224); +INSERT INTO product_slots VALUES(39,225); +INSERT INTO product_slots VALUES(39,226); +INSERT INTO product_slots VALUES(39,227); +INSERT INTO product_slots VALUES(39,228); +INSERT INTO product_slots VALUES(39,229); +INSERT INTO product_slots VALUES(39,230); +INSERT INTO product_slots VALUES(39,231); +INSERT INTO product_slots VALUES(39,232); +INSERT INTO product_slots VALUES(39,233); +INSERT INTO product_slots VALUES(39,234); +INSERT INTO product_slots VALUES(39,235); +INSERT INTO product_slots VALUES(39,236); +INSERT INTO product_slots VALUES(39,237); +INSERT INTO product_slots VALUES(39,238); +INSERT INTO product_slots VALUES(39,239); +INSERT INTO product_slots VALUES(39,240); +INSERT INTO product_slots VALUES(39,241); +INSERT INTO product_slots VALUES(39,242); +INSERT INTO product_slots VALUES(39,243); +INSERT INTO product_slots VALUES(39,244); +INSERT INTO product_slots VALUES(39,274); +INSERT INTO product_slots VALUES(39,275); +INSERT INTO product_slots VALUES(39,279); +INSERT INTO product_slots VALUES(39,280); +INSERT INTO product_slots VALUES(39,281); +INSERT INTO product_slots VALUES(39,282); +INSERT INTO product_slots VALUES(39,283); +INSERT INTO product_slots VALUES(39,284); +INSERT INTO product_slots VALUES(39,285); +INSERT INTO product_slots VALUES(39,286); +INSERT INTO product_slots VALUES(39,287); +INSERT INTO product_slots VALUES(40,31); +INSERT INTO product_slots VALUES(40,39); +INSERT INTO product_slots VALUES(40,41); +INSERT INTO product_slots VALUES(40,43); +INSERT INTO product_slots VALUES(40,45); +INSERT INTO product_slots VALUES(40,46); +INSERT INTO product_slots VALUES(40,47); +INSERT INTO product_slots VALUES(40,48); +INSERT INTO product_slots VALUES(40,49); +INSERT INTO product_slots VALUES(40,50); +INSERT INTO product_slots VALUES(40,51); +INSERT INTO product_slots VALUES(40,52); +INSERT INTO product_slots VALUES(40,53); +INSERT INTO product_slots VALUES(40,54); +INSERT INTO product_slots VALUES(40,55); +INSERT INTO product_slots VALUES(40,56); +INSERT INTO product_slots VALUES(40,57); +INSERT INTO product_slots VALUES(40,58); +INSERT INTO product_slots VALUES(40,59); +INSERT INTO product_slots VALUES(40,60); +INSERT INTO product_slots VALUES(40,61); +INSERT INTO product_slots VALUES(40,62); +INSERT INTO product_slots VALUES(40,63); +INSERT INTO product_slots VALUES(40,64); +INSERT INTO product_slots VALUES(40,65); +INSERT INTO product_slots VALUES(40,66); +INSERT INTO product_slots VALUES(40,67); +INSERT INTO product_slots VALUES(40,68); +INSERT INTO product_slots VALUES(40,69); +INSERT INTO product_slots VALUES(40,70); +INSERT INTO product_slots VALUES(40,71); +INSERT INTO product_slots VALUES(40,72); +INSERT INTO product_slots VALUES(40,73); +INSERT INTO product_slots VALUES(40,74); +INSERT INTO product_slots VALUES(40,75); +INSERT INTO product_slots VALUES(40,76); +INSERT INTO product_slots VALUES(40,77); +INSERT INTO product_slots VALUES(40,78); +INSERT INTO product_slots VALUES(40,79); +INSERT INTO product_slots VALUES(40,80); +INSERT INTO product_slots VALUES(40,81); +INSERT INTO product_slots VALUES(40,82); +INSERT INTO product_slots VALUES(40,83); +INSERT INTO product_slots VALUES(40,84); +INSERT INTO product_slots VALUES(40,85); +INSERT INTO product_slots VALUES(40,86); +INSERT INTO product_slots VALUES(40,87); +INSERT INTO product_slots VALUES(40,88); +INSERT INTO product_slots VALUES(40,89); +INSERT INTO product_slots VALUES(40,90); +INSERT INTO product_slots VALUES(40,91); +INSERT INTO product_slots VALUES(40,92); +INSERT INTO product_slots VALUES(40,93); +INSERT INTO product_slots VALUES(40,94); +INSERT INTO product_slots VALUES(40,95); +INSERT INTO product_slots VALUES(40,96); +INSERT INTO product_slots VALUES(40,97); +INSERT INTO product_slots VALUES(40,98); +INSERT INTO product_slots VALUES(40,99); +INSERT INTO product_slots VALUES(40,100); +INSERT INTO product_slots VALUES(40,101); +INSERT INTO product_slots VALUES(40,102); +INSERT INTO product_slots VALUES(40,103); +INSERT INTO product_slots VALUES(40,104); +INSERT INTO product_slots VALUES(40,105); +INSERT INTO product_slots VALUES(40,106); +INSERT INTO product_slots VALUES(40,107); +INSERT INTO product_slots VALUES(40,108); +INSERT INTO product_slots VALUES(40,109); +INSERT INTO product_slots VALUES(40,110); +INSERT INTO product_slots VALUES(40,111); +INSERT INTO product_slots VALUES(40,112); +INSERT INTO product_slots VALUES(40,113); +INSERT INTO product_slots VALUES(40,114); +INSERT INTO product_slots VALUES(40,115); +INSERT INTO product_slots VALUES(40,116); +INSERT INTO product_slots VALUES(40,117); +INSERT INTO product_slots VALUES(40,118); +INSERT INTO product_slots VALUES(40,119); +INSERT INTO product_slots VALUES(40,120); +INSERT INTO product_slots VALUES(40,121); +INSERT INTO product_slots VALUES(40,122); +INSERT INTO product_slots VALUES(40,123); +INSERT INTO product_slots VALUES(40,124); +INSERT INTO product_slots VALUES(40,125); +INSERT INTO product_slots VALUES(40,126); +INSERT INTO product_slots VALUES(40,127); +INSERT INTO product_slots VALUES(40,128); +INSERT INTO product_slots VALUES(40,129); +INSERT INTO product_slots VALUES(40,130); +INSERT INTO product_slots VALUES(40,131); +INSERT INTO product_slots VALUES(40,132); +INSERT INTO product_slots VALUES(40,133); +INSERT INTO product_slots VALUES(40,134); +INSERT INTO product_slots VALUES(40,135); +INSERT INTO product_slots VALUES(40,136); +INSERT INTO product_slots VALUES(40,137); +INSERT INTO product_slots VALUES(40,138); +INSERT INTO product_slots VALUES(40,139); +INSERT INTO product_slots VALUES(40,140); +INSERT INTO product_slots VALUES(40,141); +INSERT INTO product_slots VALUES(40,142); +INSERT INTO product_slots VALUES(40,143); +INSERT INTO product_slots VALUES(40,144); +INSERT INTO product_slots VALUES(40,145); +INSERT INTO product_slots VALUES(40,146); +INSERT INTO product_slots VALUES(40,147); +INSERT INTO product_slots VALUES(40,148); +INSERT INTO product_slots VALUES(40,149); +INSERT INTO product_slots VALUES(40,150); +INSERT INTO product_slots VALUES(40,151); +INSERT INTO product_slots VALUES(40,152); +INSERT INTO product_slots VALUES(40,153); +INSERT INTO product_slots VALUES(40,154); +INSERT INTO product_slots VALUES(40,155); +INSERT INTO product_slots VALUES(40,156); +INSERT INTO product_slots VALUES(40,157); +INSERT INTO product_slots VALUES(40,158); +INSERT INTO product_slots VALUES(40,159); +INSERT INTO product_slots VALUES(40,160); +INSERT INTO product_slots VALUES(40,161); +INSERT INTO product_slots VALUES(40,162); +INSERT INTO product_slots VALUES(40,163); +INSERT INTO product_slots VALUES(40,164); +INSERT INTO product_slots VALUES(40,165); +INSERT INTO product_slots VALUES(40,166); +INSERT INTO product_slots VALUES(40,167); +INSERT INTO product_slots VALUES(40,168); +INSERT INTO product_slots VALUES(40,169); +INSERT INTO product_slots VALUES(40,170); +INSERT INTO product_slots VALUES(40,171); +INSERT INTO product_slots VALUES(40,172); +INSERT INTO product_slots VALUES(40,173); +INSERT INTO product_slots VALUES(40,174); +INSERT INTO product_slots VALUES(40,175); +INSERT INTO product_slots VALUES(40,176); +INSERT INTO product_slots VALUES(40,177); +INSERT INTO product_slots VALUES(40,178); +INSERT INTO product_slots VALUES(40,179); +INSERT INTO product_slots VALUES(40,180); +INSERT INTO product_slots VALUES(40,181); +INSERT INTO product_slots VALUES(40,182); +INSERT INTO product_slots VALUES(40,183); +INSERT INTO product_slots VALUES(40,184); +INSERT INTO product_slots VALUES(40,185); +INSERT INTO product_slots VALUES(40,186); +INSERT INTO product_slots VALUES(40,187); +INSERT INTO product_slots VALUES(40,188); +INSERT INTO product_slots VALUES(40,189); +INSERT INTO product_slots VALUES(40,190); +INSERT INTO product_slots VALUES(40,191); +INSERT INTO product_slots VALUES(40,192); +INSERT INTO product_slots VALUES(40,193); +INSERT INTO product_slots VALUES(40,194); +INSERT INTO product_slots VALUES(40,195); +INSERT INTO product_slots VALUES(40,196); +INSERT INTO product_slots VALUES(40,197); +INSERT INTO product_slots VALUES(40,198); +INSERT INTO product_slots VALUES(40,199); +INSERT INTO product_slots VALUES(40,200); +INSERT INTO product_slots VALUES(40,201); +INSERT INTO product_slots VALUES(40,202); +INSERT INTO product_slots VALUES(40,203); +INSERT INTO product_slots VALUES(40,204); +INSERT INTO product_slots VALUES(40,205); +INSERT INTO product_slots VALUES(40,206); +INSERT INTO product_slots VALUES(40,207); +INSERT INTO product_slots VALUES(40,208); +INSERT INTO product_slots VALUES(40,209); +INSERT INTO product_slots VALUES(40,210); +INSERT INTO product_slots VALUES(40,211); +INSERT INTO product_slots VALUES(40,212); +INSERT INTO product_slots VALUES(40,213); +INSERT INTO product_slots VALUES(40,214); +INSERT INTO product_slots VALUES(40,215); +INSERT INTO product_slots VALUES(40,216); +INSERT INTO product_slots VALUES(40,217); +INSERT INTO product_slots VALUES(40,218); +INSERT INTO product_slots VALUES(40,219); +INSERT INTO product_slots VALUES(40,220); +INSERT INTO product_slots VALUES(40,221); +INSERT INTO product_slots VALUES(40,222); +INSERT INTO product_slots VALUES(40,223); +INSERT INTO product_slots VALUES(40,224); +INSERT INTO product_slots VALUES(40,225); +INSERT INTO product_slots VALUES(40,226); +INSERT INTO product_slots VALUES(40,227); +INSERT INTO product_slots VALUES(40,228); +INSERT INTO product_slots VALUES(40,229); +INSERT INTO product_slots VALUES(40,230); +INSERT INTO product_slots VALUES(40,231); +INSERT INTO product_slots VALUES(40,232); +INSERT INTO product_slots VALUES(40,233); +INSERT INTO product_slots VALUES(40,234); +INSERT INTO product_slots VALUES(40,235); +INSERT INTO product_slots VALUES(40,236); +INSERT INTO product_slots VALUES(40,237); +INSERT INTO product_slots VALUES(40,238); +INSERT INTO product_slots VALUES(40,239); +INSERT INTO product_slots VALUES(40,240); +INSERT INTO product_slots VALUES(40,241); +INSERT INTO product_slots VALUES(40,242); +INSERT INTO product_slots VALUES(40,243); +INSERT INTO product_slots VALUES(40,244); +INSERT INTO product_slots VALUES(40,274); +INSERT INTO product_slots VALUES(40,275); +INSERT INTO product_slots VALUES(40,279); +INSERT INTO product_slots VALUES(40,280); +INSERT INTO product_slots VALUES(40,281); +INSERT INTO product_slots VALUES(40,282); +INSERT INTO product_slots VALUES(41,31); +INSERT INTO product_slots VALUES(41,39); +INSERT INTO product_slots VALUES(41,41); +INSERT INTO product_slots VALUES(41,43); +INSERT INTO product_slots VALUES(41,45); +INSERT INTO product_slots VALUES(41,46); +INSERT INTO product_slots VALUES(41,47); +INSERT INTO product_slots VALUES(41,48); +INSERT INTO product_slots VALUES(41,49); +INSERT INTO product_slots VALUES(41,50); +INSERT INTO product_slots VALUES(41,51); +INSERT INTO product_slots VALUES(41,52); +INSERT INTO product_slots VALUES(41,53); +INSERT INTO product_slots VALUES(41,54); +INSERT INTO product_slots VALUES(41,55); +INSERT INTO product_slots VALUES(41,56); +INSERT INTO product_slots VALUES(41,57); +INSERT INTO product_slots VALUES(41,58); +INSERT INTO product_slots VALUES(41,59); +INSERT INTO product_slots VALUES(41,60); +INSERT INTO product_slots VALUES(41,61); +INSERT INTO product_slots VALUES(41,62); +INSERT INTO product_slots VALUES(41,63); +INSERT INTO product_slots VALUES(41,64); +INSERT INTO product_slots VALUES(41,65); +INSERT INTO product_slots VALUES(41,66); +INSERT INTO product_slots VALUES(41,67); +INSERT INTO product_slots VALUES(41,68); +INSERT INTO product_slots VALUES(41,69); +INSERT INTO product_slots VALUES(41,70); +INSERT INTO product_slots VALUES(41,71); +INSERT INTO product_slots VALUES(41,72); +INSERT INTO product_slots VALUES(41,73); +INSERT INTO product_slots VALUES(41,74); +INSERT INTO product_slots VALUES(41,75); +INSERT INTO product_slots VALUES(41,76); +INSERT INTO product_slots VALUES(41,77); +INSERT INTO product_slots VALUES(41,78); +INSERT INTO product_slots VALUES(41,79); +INSERT INTO product_slots VALUES(41,80); +INSERT INTO product_slots VALUES(41,81); +INSERT INTO product_slots VALUES(41,82); +INSERT INTO product_slots VALUES(41,83); +INSERT INTO product_slots VALUES(41,84); +INSERT INTO product_slots VALUES(41,85); +INSERT INTO product_slots VALUES(41,86); +INSERT INTO product_slots VALUES(41,87); +INSERT INTO product_slots VALUES(41,88); +INSERT INTO product_slots VALUES(41,89); +INSERT INTO product_slots VALUES(41,90); +INSERT INTO product_slots VALUES(41,91); +INSERT INTO product_slots VALUES(41,92); +INSERT INTO product_slots VALUES(41,93); +INSERT INTO product_slots VALUES(41,94); +INSERT INTO product_slots VALUES(41,95); +INSERT INTO product_slots VALUES(41,96); +INSERT INTO product_slots VALUES(41,97); +INSERT INTO product_slots VALUES(41,98); +INSERT INTO product_slots VALUES(41,99); +INSERT INTO product_slots VALUES(41,100); +INSERT INTO product_slots VALUES(41,101); +INSERT INTO product_slots VALUES(41,102); +INSERT INTO product_slots VALUES(41,103); +INSERT INTO product_slots VALUES(41,104); +INSERT INTO product_slots VALUES(41,105); +INSERT INTO product_slots VALUES(41,106); +INSERT INTO product_slots VALUES(41,107); +INSERT INTO product_slots VALUES(41,108); +INSERT INTO product_slots VALUES(41,109); +INSERT INTO product_slots VALUES(41,110); +INSERT INTO product_slots VALUES(41,111); +INSERT INTO product_slots VALUES(41,112); +INSERT INTO product_slots VALUES(41,113); +INSERT INTO product_slots VALUES(41,114); +INSERT INTO product_slots VALUES(41,115); +INSERT INTO product_slots VALUES(41,116); +INSERT INTO product_slots VALUES(41,117); +INSERT INTO product_slots VALUES(41,118); +INSERT INTO product_slots VALUES(41,119); +INSERT INTO product_slots VALUES(41,120); +INSERT INTO product_slots VALUES(41,121); +INSERT INTO product_slots VALUES(41,122); +INSERT INTO product_slots VALUES(41,123); +INSERT INTO product_slots VALUES(41,124); +INSERT INTO product_slots VALUES(41,125); +INSERT INTO product_slots VALUES(41,126); +INSERT INTO product_slots VALUES(41,127); +INSERT INTO product_slots VALUES(41,128); +INSERT INTO product_slots VALUES(41,129); +INSERT INTO product_slots VALUES(41,130); +INSERT INTO product_slots VALUES(41,131); +INSERT INTO product_slots VALUES(41,132); +INSERT INTO product_slots VALUES(41,133); +INSERT INTO product_slots VALUES(41,134); +INSERT INTO product_slots VALUES(41,135); +INSERT INTO product_slots VALUES(41,136); +INSERT INTO product_slots VALUES(41,137); +INSERT INTO product_slots VALUES(41,138); +INSERT INTO product_slots VALUES(41,139); +INSERT INTO product_slots VALUES(41,140); +INSERT INTO product_slots VALUES(41,141); +INSERT INTO product_slots VALUES(41,142); +INSERT INTO product_slots VALUES(41,143); +INSERT INTO product_slots VALUES(41,144); +INSERT INTO product_slots VALUES(41,145); +INSERT INTO product_slots VALUES(41,146); +INSERT INTO product_slots VALUES(41,147); +INSERT INTO product_slots VALUES(41,148); +INSERT INTO product_slots VALUES(41,149); +INSERT INTO product_slots VALUES(41,150); +INSERT INTO product_slots VALUES(41,151); +INSERT INTO product_slots VALUES(41,152); +INSERT INTO product_slots VALUES(41,153); +INSERT INTO product_slots VALUES(41,154); +INSERT INTO product_slots VALUES(41,155); +INSERT INTO product_slots VALUES(41,156); +INSERT INTO product_slots VALUES(41,157); +INSERT INTO product_slots VALUES(41,158); +INSERT INTO product_slots VALUES(41,159); +INSERT INTO product_slots VALUES(41,160); +INSERT INTO product_slots VALUES(41,161); +INSERT INTO product_slots VALUES(41,162); +INSERT INTO product_slots VALUES(41,163); +INSERT INTO product_slots VALUES(41,164); +INSERT INTO product_slots VALUES(41,165); +INSERT INTO product_slots VALUES(41,166); +INSERT INTO product_slots VALUES(41,167); +INSERT INTO product_slots VALUES(41,168); +INSERT INTO product_slots VALUES(41,169); +INSERT INTO product_slots VALUES(41,170); +INSERT INTO product_slots VALUES(41,171); +INSERT INTO product_slots VALUES(41,172); +INSERT INTO product_slots VALUES(41,173); +INSERT INTO product_slots VALUES(41,174); +INSERT INTO product_slots VALUES(41,175); +INSERT INTO product_slots VALUES(41,176); +INSERT INTO product_slots VALUES(41,177); +INSERT INTO product_slots VALUES(41,178); +INSERT INTO product_slots VALUES(41,179); +INSERT INTO product_slots VALUES(41,180); +INSERT INTO product_slots VALUES(41,181); +INSERT INTO product_slots VALUES(41,182); +INSERT INTO product_slots VALUES(41,183); +INSERT INTO product_slots VALUES(41,184); +INSERT INTO product_slots VALUES(41,185); +INSERT INTO product_slots VALUES(41,186); +INSERT INTO product_slots VALUES(41,187); +INSERT INTO product_slots VALUES(41,188); +INSERT INTO product_slots VALUES(41,189); +INSERT INTO product_slots VALUES(41,190); +INSERT INTO product_slots VALUES(41,191); +INSERT INTO product_slots VALUES(41,192); +INSERT INTO product_slots VALUES(41,193); +INSERT INTO product_slots VALUES(41,194); +INSERT INTO product_slots VALUES(41,195); +INSERT INTO product_slots VALUES(41,196); +INSERT INTO product_slots VALUES(41,197); +INSERT INTO product_slots VALUES(41,198); +INSERT INTO product_slots VALUES(41,199); +INSERT INTO product_slots VALUES(41,200); +INSERT INTO product_slots VALUES(41,201); +INSERT INTO product_slots VALUES(41,202); +INSERT INTO product_slots VALUES(41,203); +INSERT INTO product_slots VALUES(41,204); +INSERT INTO product_slots VALUES(41,205); +INSERT INTO product_slots VALUES(41,206); +INSERT INTO product_slots VALUES(41,207); +INSERT INTO product_slots VALUES(41,208); +INSERT INTO product_slots VALUES(41,209); +INSERT INTO product_slots VALUES(41,210); +INSERT INTO product_slots VALUES(41,211); +INSERT INTO product_slots VALUES(41,212); +INSERT INTO product_slots VALUES(41,213); +INSERT INTO product_slots VALUES(41,214); +INSERT INTO product_slots VALUES(41,215); +INSERT INTO product_slots VALUES(41,216); +INSERT INTO product_slots VALUES(41,217); +INSERT INTO product_slots VALUES(41,218); +INSERT INTO product_slots VALUES(41,219); +INSERT INTO product_slots VALUES(41,220); +INSERT INTO product_slots VALUES(41,221); +INSERT INTO product_slots VALUES(41,222); +INSERT INTO product_slots VALUES(41,223); +INSERT INTO product_slots VALUES(41,224); +INSERT INTO product_slots VALUES(41,225); +INSERT INTO product_slots VALUES(41,226); +INSERT INTO product_slots VALUES(41,227); +INSERT INTO product_slots VALUES(41,228); +INSERT INTO product_slots VALUES(41,229); +INSERT INTO product_slots VALUES(41,230); +INSERT INTO product_slots VALUES(41,231); +INSERT INTO product_slots VALUES(41,232); +INSERT INTO product_slots VALUES(41,233); +INSERT INTO product_slots VALUES(41,234); +INSERT INTO product_slots VALUES(41,235); +INSERT INTO product_slots VALUES(41,236); +INSERT INTO product_slots VALUES(41,237); +INSERT INTO product_slots VALUES(41,238); +INSERT INTO product_slots VALUES(41,239); +INSERT INTO product_slots VALUES(41,240); +INSERT INTO product_slots VALUES(41,241); +INSERT INTO product_slots VALUES(41,242); +INSERT INTO product_slots VALUES(41,243); +INSERT INTO product_slots VALUES(41,244); +INSERT INTO product_slots VALUES(41,274); +INSERT INTO product_slots VALUES(41,275); +INSERT INTO product_slots VALUES(41,279); +INSERT INTO product_slots VALUES(41,280); +INSERT INTO product_slots VALUES(41,281); +INSERT INTO product_slots VALUES(41,282); +INSERT INTO product_slots VALUES(42,31); +INSERT INTO product_slots VALUES(42,39); +INSERT INTO product_slots VALUES(42,41); +INSERT INTO product_slots VALUES(42,43); +INSERT INTO product_slots VALUES(42,45); +INSERT INTO product_slots VALUES(42,46); +INSERT INTO product_slots VALUES(42,47); +INSERT INTO product_slots VALUES(42,48); +INSERT INTO product_slots VALUES(42,49); +INSERT INTO product_slots VALUES(42,50); +INSERT INTO product_slots VALUES(42,51); +INSERT INTO product_slots VALUES(42,52); +INSERT INTO product_slots VALUES(42,53); +INSERT INTO product_slots VALUES(42,54); +INSERT INTO product_slots VALUES(42,55); +INSERT INTO product_slots VALUES(42,56); +INSERT INTO product_slots VALUES(42,57); +INSERT INTO product_slots VALUES(42,58); +INSERT INTO product_slots VALUES(42,59); +INSERT INTO product_slots VALUES(42,60); +INSERT INTO product_slots VALUES(42,61); +INSERT INTO product_slots VALUES(42,62); +INSERT INTO product_slots VALUES(42,63); +INSERT INTO product_slots VALUES(42,64); +INSERT INTO product_slots VALUES(42,65); +INSERT INTO product_slots VALUES(42,66); +INSERT INTO product_slots VALUES(42,67); +INSERT INTO product_slots VALUES(42,68); +INSERT INTO product_slots VALUES(42,69); +INSERT INTO product_slots VALUES(42,70); +INSERT INTO product_slots VALUES(42,71); +INSERT INTO product_slots VALUES(42,72); +INSERT INTO product_slots VALUES(42,73); +INSERT INTO product_slots VALUES(42,74); +INSERT INTO product_slots VALUES(42,75); +INSERT INTO product_slots VALUES(42,76); +INSERT INTO product_slots VALUES(42,77); +INSERT INTO product_slots VALUES(42,78); +INSERT INTO product_slots VALUES(42,79); +INSERT INTO product_slots VALUES(42,80); +INSERT INTO product_slots VALUES(42,81); +INSERT INTO product_slots VALUES(42,82); +INSERT INTO product_slots VALUES(42,83); +INSERT INTO product_slots VALUES(42,84); +INSERT INTO product_slots VALUES(42,85); +INSERT INTO product_slots VALUES(42,86); +INSERT INTO product_slots VALUES(42,87); +INSERT INTO product_slots VALUES(42,88); +INSERT INTO product_slots VALUES(42,89); +INSERT INTO product_slots VALUES(42,90); +INSERT INTO product_slots VALUES(42,91); +INSERT INTO product_slots VALUES(42,92); +INSERT INTO product_slots VALUES(42,93); +INSERT INTO product_slots VALUES(42,94); +INSERT INTO product_slots VALUES(42,95); +INSERT INTO product_slots VALUES(42,96); +INSERT INTO product_slots VALUES(42,97); +INSERT INTO product_slots VALUES(42,98); +INSERT INTO product_slots VALUES(42,99); +INSERT INTO product_slots VALUES(42,100); +INSERT INTO product_slots VALUES(42,101); +INSERT INTO product_slots VALUES(42,102); +INSERT INTO product_slots VALUES(42,103); +INSERT INTO product_slots VALUES(42,104); +INSERT INTO product_slots VALUES(42,105); +INSERT INTO product_slots VALUES(42,106); +INSERT INTO product_slots VALUES(42,107); +INSERT INTO product_slots VALUES(42,108); +INSERT INTO product_slots VALUES(42,109); +INSERT INTO product_slots VALUES(42,110); +INSERT INTO product_slots VALUES(42,111); +INSERT INTO product_slots VALUES(42,112); +INSERT INTO product_slots VALUES(42,113); +INSERT INTO product_slots VALUES(42,114); +INSERT INTO product_slots VALUES(42,115); +INSERT INTO product_slots VALUES(42,116); +INSERT INTO product_slots VALUES(42,117); +INSERT INTO product_slots VALUES(42,118); +INSERT INTO product_slots VALUES(42,119); +INSERT INTO product_slots VALUES(42,120); +INSERT INTO product_slots VALUES(42,121); +INSERT INTO product_slots VALUES(42,122); +INSERT INTO product_slots VALUES(42,123); +INSERT INTO product_slots VALUES(42,124); +INSERT INTO product_slots VALUES(42,125); +INSERT INTO product_slots VALUES(42,126); +INSERT INTO product_slots VALUES(42,127); +INSERT INTO product_slots VALUES(42,128); +INSERT INTO product_slots VALUES(42,129); +INSERT INTO product_slots VALUES(42,130); +INSERT INTO product_slots VALUES(42,131); +INSERT INTO product_slots VALUES(42,132); +INSERT INTO product_slots VALUES(42,133); +INSERT INTO product_slots VALUES(42,134); +INSERT INTO product_slots VALUES(42,135); +INSERT INTO product_slots VALUES(42,136); +INSERT INTO product_slots VALUES(42,137); +INSERT INTO product_slots VALUES(42,138); +INSERT INTO product_slots VALUES(42,139); +INSERT INTO product_slots VALUES(42,140); +INSERT INTO product_slots VALUES(42,141); +INSERT INTO product_slots VALUES(42,142); +INSERT INTO product_slots VALUES(42,143); +INSERT INTO product_slots VALUES(42,144); +INSERT INTO product_slots VALUES(42,145); +INSERT INTO product_slots VALUES(42,146); +INSERT INTO product_slots VALUES(42,147); +INSERT INTO product_slots VALUES(42,148); +INSERT INTO product_slots VALUES(42,149); +INSERT INTO product_slots VALUES(42,150); +INSERT INTO product_slots VALUES(42,151); +INSERT INTO product_slots VALUES(42,152); +INSERT INTO product_slots VALUES(42,153); +INSERT INTO product_slots VALUES(42,154); +INSERT INTO product_slots VALUES(42,155); +INSERT INTO product_slots VALUES(42,156); +INSERT INTO product_slots VALUES(42,157); +INSERT INTO product_slots VALUES(42,158); +INSERT INTO product_slots VALUES(42,159); +INSERT INTO product_slots VALUES(42,160); +INSERT INTO product_slots VALUES(42,161); +INSERT INTO product_slots VALUES(42,162); +INSERT INTO product_slots VALUES(42,163); +INSERT INTO product_slots VALUES(42,164); +INSERT INTO product_slots VALUES(42,165); +INSERT INTO product_slots VALUES(42,166); +INSERT INTO product_slots VALUES(42,167); +INSERT INTO product_slots VALUES(42,168); +INSERT INTO product_slots VALUES(42,169); +INSERT INTO product_slots VALUES(42,170); +INSERT INTO product_slots VALUES(42,171); +INSERT INTO product_slots VALUES(42,172); +INSERT INTO product_slots VALUES(42,173); +INSERT INTO product_slots VALUES(42,174); +INSERT INTO product_slots VALUES(42,175); +INSERT INTO product_slots VALUES(42,176); +INSERT INTO product_slots VALUES(42,177); +INSERT INTO product_slots VALUES(42,178); +INSERT INTO product_slots VALUES(42,179); +INSERT INTO product_slots VALUES(42,180); +INSERT INTO product_slots VALUES(42,181); +INSERT INTO product_slots VALUES(42,182); +INSERT INTO product_slots VALUES(42,183); +INSERT INTO product_slots VALUES(42,184); +INSERT INTO product_slots VALUES(42,185); +INSERT INTO product_slots VALUES(42,186); +INSERT INTO product_slots VALUES(42,187); +INSERT INTO product_slots VALUES(42,188); +INSERT INTO product_slots VALUES(42,189); +INSERT INTO product_slots VALUES(42,190); +INSERT INTO product_slots VALUES(42,191); +INSERT INTO product_slots VALUES(42,192); +INSERT INTO product_slots VALUES(42,193); +INSERT INTO product_slots VALUES(42,194); +INSERT INTO product_slots VALUES(42,195); +INSERT INTO product_slots VALUES(42,196); +INSERT INTO product_slots VALUES(42,197); +INSERT INTO product_slots VALUES(42,198); +INSERT INTO product_slots VALUES(42,199); +INSERT INTO product_slots VALUES(42,200); +INSERT INTO product_slots VALUES(42,201); +INSERT INTO product_slots VALUES(42,202); +INSERT INTO product_slots VALUES(42,203); +INSERT INTO product_slots VALUES(42,204); +INSERT INTO product_slots VALUES(42,205); +INSERT INTO product_slots VALUES(42,206); +INSERT INTO product_slots VALUES(42,207); +INSERT INTO product_slots VALUES(42,208); +INSERT INTO product_slots VALUES(42,209); +INSERT INTO product_slots VALUES(42,210); +INSERT INTO product_slots VALUES(42,211); +INSERT INTO product_slots VALUES(42,212); +INSERT INTO product_slots VALUES(42,213); +INSERT INTO product_slots VALUES(42,214); +INSERT INTO product_slots VALUES(42,215); +INSERT INTO product_slots VALUES(42,216); +INSERT INTO product_slots VALUES(42,217); +INSERT INTO product_slots VALUES(42,218); +INSERT INTO product_slots VALUES(42,219); +INSERT INTO product_slots VALUES(42,220); +INSERT INTO product_slots VALUES(42,221); +INSERT INTO product_slots VALUES(42,222); +INSERT INTO product_slots VALUES(42,223); +INSERT INTO product_slots VALUES(42,224); +INSERT INTO product_slots VALUES(42,225); +INSERT INTO product_slots VALUES(42,226); +INSERT INTO product_slots VALUES(42,227); +INSERT INTO product_slots VALUES(42,228); +INSERT INTO product_slots VALUES(42,229); +INSERT INTO product_slots VALUES(42,230); +INSERT INTO product_slots VALUES(42,231); +INSERT INTO product_slots VALUES(42,232); +INSERT INTO product_slots VALUES(42,233); +INSERT INTO product_slots VALUES(42,234); +INSERT INTO product_slots VALUES(42,235); +INSERT INTO product_slots VALUES(42,236); +INSERT INTO product_slots VALUES(42,237); +INSERT INTO product_slots VALUES(42,238); +INSERT INTO product_slots VALUES(42,239); +INSERT INTO product_slots VALUES(42,240); +INSERT INTO product_slots VALUES(42,241); +INSERT INTO product_slots VALUES(42,242); +INSERT INTO product_slots VALUES(42,243); +INSERT INTO product_slots VALUES(42,244); +INSERT INTO product_slots VALUES(42,274); +INSERT INTO product_slots VALUES(42,275); +INSERT INTO product_slots VALUES(42,279); +INSERT INTO product_slots VALUES(42,280); +INSERT INTO product_slots VALUES(42,281); +INSERT INTO product_slots VALUES(42,282); +INSERT INTO product_slots VALUES(43,39); +INSERT INTO product_slots VALUES(43,40); +INSERT INTO product_slots VALUES(43,43); +INSERT INTO product_slots VALUES(43,45); +INSERT INTO product_slots VALUES(43,46); +INSERT INTO product_slots VALUES(43,48); +INSERT INTO product_slots VALUES(43,49); +INSERT INTO product_slots VALUES(43,51); +INSERT INTO product_slots VALUES(43,52); +INSERT INTO product_slots VALUES(43,53); +INSERT INTO product_slots VALUES(43,54); +INSERT INTO product_slots VALUES(43,57); +INSERT INTO product_slots VALUES(43,58); +INSERT INTO product_slots VALUES(43,59); +INSERT INTO product_slots VALUES(43,60); +INSERT INTO product_slots VALUES(43,61); +INSERT INTO product_slots VALUES(43,62); +INSERT INTO product_slots VALUES(43,63); +INSERT INTO product_slots VALUES(43,64); +INSERT INTO product_slots VALUES(43,65); +INSERT INTO product_slots VALUES(43,66); +INSERT INTO product_slots VALUES(43,67); +INSERT INTO product_slots VALUES(43,68); +INSERT INTO product_slots VALUES(43,69); +INSERT INTO product_slots VALUES(43,70); +INSERT INTO product_slots VALUES(43,71); +INSERT INTO product_slots VALUES(43,72); +INSERT INTO product_slots VALUES(43,73); +INSERT INTO product_slots VALUES(43,74); +INSERT INTO product_slots VALUES(43,75); +INSERT INTO product_slots VALUES(43,76); +INSERT INTO product_slots VALUES(43,77); +INSERT INTO product_slots VALUES(43,78); +INSERT INTO product_slots VALUES(43,79); +INSERT INTO product_slots VALUES(43,80); +INSERT INTO product_slots VALUES(43,81); +INSERT INTO product_slots VALUES(43,82); +INSERT INTO product_slots VALUES(43,83); +INSERT INTO product_slots VALUES(43,84); +INSERT INTO product_slots VALUES(43,85); +INSERT INTO product_slots VALUES(43,86); +INSERT INTO product_slots VALUES(43,87); +INSERT INTO product_slots VALUES(43,88); +INSERT INTO product_slots VALUES(43,89); +INSERT INTO product_slots VALUES(43,90); +INSERT INTO product_slots VALUES(43,91); +INSERT INTO product_slots VALUES(43,92); +INSERT INTO product_slots VALUES(43,93); +INSERT INTO product_slots VALUES(43,94); +INSERT INTO product_slots VALUES(43,95); +INSERT INTO product_slots VALUES(43,96); +INSERT INTO product_slots VALUES(43,97); +INSERT INTO product_slots VALUES(43,98); +INSERT INTO product_slots VALUES(43,99); +INSERT INTO product_slots VALUES(43,100); +INSERT INTO product_slots VALUES(43,102); +INSERT INTO product_slots VALUES(43,103); +INSERT INTO product_slots VALUES(43,104); +INSERT INTO product_slots VALUES(43,105); +INSERT INTO product_slots VALUES(43,106); +INSERT INTO product_slots VALUES(43,107); +INSERT INTO product_slots VALUES(43,108); +INSERT INTO product_slots VALUES(43,109); +INSERT INTO product_slots VALUES(43,110); +INSERT INTO product_slots VALUES(43,111); +INSERT INTO product_slots VALUES(43,112); +INSERT INTO product_slots VALUES(43,113); +INSERT INTO product_slots VALUES(43,114); +INSERT INTO product_slots VALUES(43,115); +INSERT INTO product_slots VALUES(43,117); +INSERT INTO product_slots VALUES(43,118); +INSERT INTO product_slots VALUES(43,119); +INSERT INTO product_slots VALUES(43,120); +INSERT INTO product_slots VALUES(43,121); +INSERT INTO product_slots VALUES(43,122); +INSERT INTO product_slots VALUES(43,123); +INSERT INTO product_slots VALUES(43,124); +INSERT INTO product_slots VALUES(43,125); +INSERT INTO product_slots VALUES(43,126); +INSERT INTO product_slots VALUES(43,127); +INSERT INTO product_slots VALUES(43,128); +INSERT INTO product_slots VALUES(43,129); +INSERT INTO product_slots VALUES(43,130); +INSERT INTO product_slots VALUES(43,131); +INSERT INTO product_slots VALUES(43,132); +INSERT INTO product_slots VALUES(43,133); +INSERT INTO product_slots VALUES(43,134); +INSERT INTO product_slots VALUES(43,135); +INSERT INTO product_slots VALUES(43,136); +INSERT INTO product_slots VALUES(43,138); +INSERT INTO product_slots VALUES(43,139); +INSERT INTO product_slots VALUES(43,140); +INSERT INTO product_slots VALUES(43,141); +INSERT INTO product_slots VALUES(43,142); +INSERT INTO product_slots VALUES(43,143); +INSERT INTO product_slots VALUES(43,145); +INSERT INTO product_slots VALUES(43,146); +INSERT INTO product_slots VALUES(43,147); +INSERT INTO product_slots VALUES(43,148); +INSERT INTO product_slots VALUES(43,149); +INSERT INTO product_slots VALUES(43,150); +INSERT INTO product_slots VALUES(43,151); +INSERT INTO product_slots VALUES(43,152); +INSERT INTO product_slots VALUES(43,153); +INSERT INTO product_slots VALUES(43,154); +INSERT INTO product_slots VALUES(43,155); +INSERT INTO product_slots VALUES(43,156); +INSERT INTO product_slots VALUES(43,157); +INSERT INTO product_slots VALUES(43,158); +INSERT INTO product_slots VALUES(43,159); +INSERT INTO product_slots VALUES(43,160); +INSERT INTO product_slots VALUES(43,161); +INSERT INTO product_slots VALUES(43,162); +INSERT INTO product_slots VALUES(43,163); +INSERT INTO product_slots VALUES(43,164); +INSERT INTO product_slots VALUES(43,165); +INSERT INTO product_slots VALUES(43,166); +INSERT INTO product_slots VALUES(43,167); +INSERT INTO product_slots VALUES(43,168); +INSERT INTO product_slots VALUES(43,169); +INSERT INTO product_slots VALUES(43,170); +INSERT INTO product_slots VALUES(43,171); +INSERT INTO product_slots VALUES(43,172); +INSERT INTO product_slots VALUES(43,173); +INSERT INTO product_slots VALUES(43,174); +INSERT INTO product_slots VALUES(43,175); +INSERT INTO product_slots VALUES(43,176); +INSERT INTO product_slots VALUES(43,177); +INSERT INTO product_slots VALUES(43,178); +INSERT INTO product_slots VALUES(43,179); +INSERT INTO product_slots VALUES(43,180); +INSERT INTO product_slots VALUES(43,181); +INSERT INTO product_slots VALUES(43,182); +INSERT INTO product_slots VALUES(43,183); +INSERT INTO product_slots VALUES(43,184); +INSERT INTO product_slots VALUES(43,185); +INSERT INTO product_slots VALUES(43,186); +INSERT INTO product_slots VALUES(43,187); +INSERT INTO product_slots VALUES(43,188); +INSERT INTO product_slots VALUES(43,189); +INSERT INTO product_slots VALUES(43,190); +INSERT INTO product_slots VALUES(43,191); +INSERT INTO product_slots VALUES(43,192); +INSERT INTO product_slots VALUES(43,193); +INSERT INTO product_slots VALUES(43,194); +INSERT INTO product_slots VALUES(43,195); +INSERT INTO product_slots VALUES(43,196); +INSERT INTO product_slots VALUES(43,197); +INSERT INTO product_slots VALUES(43,198); +INSERT INTO product_slots VALUES(43,199); +INSERT INTO product_slots VALUES(43,200); +INSERT INTO product_slots VALUES(43,201); +INSERT INTO product_slots VALUES(43,202); +INSERT INTO product_slots VALUES(43,203); +INSERT INTO product_slots VALUES(43,204); +INSERT INTO product_slots VALUES(43,205); +INSERT INTO product_slots VALUES(43,206); +INSERT INTO product_slots VALUES(43,207); +INSERT INTO product_slots VALUES(43,208); +INSERT INTO product_slots VALUES(43,209); +INSERT INTO product_slots VALUES(43,210); +INSERT INTO product_slots VALUES(43,211); +INSERT INTO product_slots VALUES(43,212); +INSERT INTO product_slots VALUES(43,213); +INSERT INTO product_slots VALUES(43,214); +INSERT INTO product_slots VALUES(43,215); +INSERT INTO product_slots VALUES(43,216); +INSERT INTO product_slots VALUES(43,217); +INSERT INTO product_slots VALUES(43,218); +INSERT INTO product_slots VALUES(43,219); +INSERT INTO product_slots VALUES(43,220); +INSERT INTO product_slots VALUES(43,221); +INSERT INTO product_slots VALUES(43,222); +INSERT INTO product_slots VALUES(43,223); +INSERT INTO product_slots VALUES(43,224); +INSERT INTO product_slots VALUES(43,225); +INSERT INTO product_slots VALUES(43,226); +INSERT INTO product_slots VALUES(43,227); +INSERT INTO product_slots VALUES(43,228); +INSERT INTO product_slots VALUES(43,229); +INSERT INTO product_slots VALUES(43,230); +INSERT INTO product_slots VALUES(43,231); +INSERT INTO product_slots VALUES(43,232); +INSERT INTO product_slots VALUES(43,233); +INSERT INTO product_slots VALUES(43,234); +INSERT INTO product_slots VALUES(43,235); +INSERT INTO product_slots VALUES(43,236); +INSERT INTO product_slots VALUES(43,237); +INSERT INTO product_slots VALUES(43,238); +INSERT INTO product_slots VALUES(43,239); +INSERT INTO product_slots VALUES(43,240); +INSERT INTO product_slots VALUES(43,241); +INSERT INTO product_slots VALUES(43,242); +INSERT INTO product_slots VALUES(43,243); +INSERT INTO product_slots VALUES(43,244); +INSERT INTO product_slots VALUES(43,274); +INSERT INTO product_slots VALUES(43,275); +INSERT INTO product_slots VALUES(43,279); +INSERT INTO product_slots VALUES(43,280); +INSERT INTO product_slots VALUES(43,281); +INSERT INTO product_slots VALUES(43,282); +INSERT INTO product_slots VALUES(43,283); +INSERT INTO product_slots VALUES(43,284); +INSERT INTO product_slots VALUES(43,285); +INSERT INTO product_slots VALUES(43,286); +INSERT INTO product_slots VALUES(43,287); +INSERT INTO product_slots VALUES(44,39); +INSERT INTO product_slots VALUES(44,40); +INSERT INTO product_slots VALUES(44,43); +INSERT INTO product_slots VALUES(44,45); +INSERT INTO product_slots VALUES(44,46); +INSERT INTO product_slots VALUES(44,48); +INSERT INTO product_slots VALUES(44,49); +INSERT INTO product_slots VALUES(44,51); +INSERT INTO product_slots VALUES(44,52); +INSERT INTO product_slots VALUES(44,53); +INSERT INTO product_slots VALUES(44,54); +INSERT INTO product_slots VALUES(44,57); +INSERT INTO product_slots VALUES(44,58); +INSERT INTO product_slots VALUES(44,59); +INSERT INTO product_slots VALUES(44,60); +INSERT INTO product_slots VALUES(44,61); +INSERT INTO product_slots VALUES(44,62); +INSERT INTO product_slots VALUES(44,63); +INSERT INTO product_slots VALUES(44,64); +INSERT INTO product_slots VALUES(44,65); +INSERT INTO product_slots VALUES(44,66); +INSERT INTO product_slots VALUES(44,67); +INSERT INTO product_slots VALUES(44,68); +INSERT INTO product_slots VALUES(44,69); +INSERT INTO product_slots VALUES(44,70); +INSERT INTO product_slots VALUES(44,71); +INSERT INTO product_slots VALUES(44,72); +INSERT INTO product_slots VALUES(44,73); +INSERT INTO product_slots VALUES(44,74); +INSERT INTO product_slots VALUES(44,75); +INSERT INTO product_slots VALUES(44,76); +INSERT INTO product_slots VALUES(44,77); +INSERT INTO product_slots VALUES(44,78); +INSERT INTO product_slots VALUES(44,79); +INSERT INTO product_slots VALUES(44,80); +INSERT INTO product_slots VALUES(44,81); +INSERT INTO product_slots VALUES(44,82); +INSERT INTO product_slots VALUES(44,83); +INSERT INTO product_slots VALUES(44,84); +INSERT INTO product_slots VALUES(44,85); +INSERT INTO product_slots VALUES(44,86); +INSERT INTO product_slots VALUES(44,87); +INSERT INTO product_slots VALUES(44,88); +INSERT INTO product_slots VALUES(44,89); +INSERT INTO product_slots VALUES(44,90); +INSERT INTO product_slots VALUES(44,91); +INSERT INTO product_slots VALUES(44,92); +INSERT INTO product_slots VALUES(44,93); +INSERT INTO product_slots VALUES(44,94); +INSERT INTO product_slots VALUES(44,95); +INSERT INTO product_slots VALUES(44,96); +INSERT INTO product_slots VALUES(44,97); +INSERT INTO product_slots VALUES(44,98); +INSERT INTO product_slots VALUES(44,99); +INSERT INTO product_slots VALUES(44,100); +INSERT INTO product_slots VALUES(44,102); +INSERT INTO product_slots VALUES(44,103); +INSERT INTO product_slots VALUES(44,104); +INSERT INTO product_slots VALUES(44,105); +INSERT INTO product_slots VALUES(44,106); +INSERT INTO product_slots VALUES(44,107); +INSERT INTO product_slots VALUES(44,108); +INSERT INTO product_slots VALUES(44,109); +INSERT INTO product_slots VALUES(44,110); +INSERT INTO product_slots VALUES(44,111); +INSERT INTO product_slots VALUES(44,112); +INSERT INTO product_slots VALUES(44,113); +INSERT INTO product_slots VALUES(44,114); +INSERT INTO product_slots VALUES(44,115); +INSERT INTO product_slots VALUES(44,117); +INSERT INTO product_slots VALUES(44,118); +INSERT INTO product_slots VALUES(44,119); +INSERT INTO product_slots VALUES(44,120); +INSERT INTO product_slots VALUES(44,121); +INSERT INTO product_slots VALUES(44,122); +INSERT INTO product_slots VALUES(44,123); +INSERT INTO product_slots VALUES(44,124); +INSERT INTO product_slots VALUES(44,125); +INSERT INTO product_slots VALUES(44,126); +INSERT INTO product_slots VALUES(44,127); +INSERT INTO product_slots VALUES(44,128); +INSERT INTO product_slots VALUES(44,129); +INSERT INTO product_slots VALUES(44,130); +INSERT INTO product_slots VALUES(44,131); +INSERT INTO product_slots VALUES(44,132); +INSERT INTO product_slots VALUES(44,133); +INSERT INTO product_slots VALUES(44,134); +INSERT INTO product_slots VALUES(44,135); +INSERT INTO product_slots VALUES(44,136); +INSERT INTO product_slots VALUES(44,138); +INSERT INTO product_slots VALUES(44,139); +INSERT INTO product_slots VALUES(44,140); +INSERT INTO product_slots VALUES(44,141); +INSERT INTO product_slots VALUES(44,142); +INSERT INTO product_slots VALUES(44,143); +INSERT INTO product_slots VALUES(44,145); +INSERT INTO product_slots VALUES(44,146); +INSERT INTO product_slots VALUES(44,147); +INSERT INTO product_slots VALUES(44,148); +INSERT INTO product_slots VALUES(44,149); +INSERT INTO product_slots VALUES(44,150); +INSERT INTO product_slots VALUES(44,151); +INSERT INTO product_slots VALUES(44,152); +INSERT INTO product_slots VALUES(44,153); +INSERT INTO product_slots VALUES(44,154); +INSERT INTO product_slots VALUES(44,155); +INSERT INTO product_slots VALUES(44,156); +INSERT INTO product_slots VALUES(44,157); +INSERT INTO product_slots VALUES(44,158); +INSERT INTO product_slots VALUES(44,159); +INSERT INTO product_slots VALUES(44,160); +INSERT INTO product_slots VALUES(44,161); +INSERT INTO product_slots VALUES(44,162); +INSERT INTO product_slots VALUES(44,163); +INSERT INTO product_slots VALUES(44,164); +INSERT INTO product_slots VALUES(44,165); +INSERT INTO product_slots VALUES(44,166); +INSERT INTO product_slots VALUES(44,167); +INSERT INTO product_slots VALUES(44,168); +INSERT INTO product_slots VALUES(44,169); +INSERT INTO product_slots VALUES(44,170); +INSERT INTO product_slots VALUES(44,171); +INSERT INTO product_slots VALUES(44,172); +INSERT INTO product_slots VALUES(44,173); +INSERT INTO product_slots VALUES(44,174); +INSERT INTO product_slots VALUES(44,175); +INSERT INTO product_slots VALUES(44,176); +INSERT INTO product_slots VALUES(44,177); +INSERT INTO product_slots VALUES(44,178); +INSERT INTO product_slots VALUES(44,179); +INSERT INTO product_slots VALUES(44,180); +INSERT INTO product_slots VALUES(44,181); +INSERT INTO product_slots VALUES(44,182); +INSERT INTO product_slots VALUES(44,183); +INSERT INTO product_slots VALUES(44,184); +INSERT INTO product_slots VALUES(44,185); +INSERT INTO product_slots VALUES(44,186); +INSERT INTO product_slots VALUES(44,187); +INSERT INTO product_slots VALUES(44,188); +INSERT INTO product_slots VALUES(44,189); +INSERT INTO product_slots VALUES(44,190); +INSERT INTO product_slots VALUES(44,191); +INSERT INTO product_slots VALUES(44,192); +INSERT INTO product_slots VALUES(44,193); +INSERT INTO product_slots VALUES(44,194); +INSERT INTO product_slots VALUES(44,195); +INSERT INTO product_slots VALUES(44,196); +INSERT INTO product_slots VALUES(44,197); +INSERT INTO product_slots VALUES(44,198); +INSERT INTO product_slots VALUES(44,199); +INSERT INTO product_slots VALUES(44,200); +INSERT INTO product_slots VALUES(44,201); +INSERT INTO product_slots VALUES(44,202); +INSERT INTO product_slots VALUES(44,203); +INSERT INTO product_slots VALUES(44,204); +INSERT INTO product_slots VALUES(44,205); +INSERT INTO product_slots VALUES(44,206); +INSERT INTO product_slots VALUES(44,207); +INSERT INTO product_slots VALUES(44,208); +INSERT INTO product_slots VALUES(44,209); +INSERT INTO product_slots VALUES(44,210); +INSERT INTO product_slots VALUES(44,211); +INSERT INTO product_slots VALUES(44,212); +INSERT INTO product_slots VALUES(44,213); +INSERT INTO product_slots VALUES(44,214); +INSERT INTO product_slots VALUES(44,215); +INSERT INTO product_slots VALUES(44,216); +INSERT INTO product_slots VALUES(44,217); +INSERT INTO product_slots VALUES(44,218); +INSERT INTO product_slots VALUES(44,219); +INSERT INTO product_slots VALUES(44,220); +INSERT INTO product_slots VALUES(44,221); +INSERT INTO product_slots VALUES(44,222); +INSERT INTO product_slots VALUES(44,223); +INSERT INTO product_slots VALUES(44,224); +INSERT INTO product_slots VALUES(44,225); +INSERT INTO product_slots VALUES(44,226); +INSERT INTO product_slots VALUES(44,227); +INSERT INTO product_slots VALUES(44,228); +INSERT INTO product_slots VALUES(44,229); +INSERT INTO product_slots VALUES(44,230); +INSERT INTO product_slots VALUES(44,231); +INSERT INTO product_slots VALUES(44,232); +INSERT INTO product_slots VALUES(44,233); +INSERT INTO product_slots VALUES(44,234); +INSERT INTO product_slots VALUES(44,235); +INSERT INTO product_slots VALUES(44,236); +INSERT INTO product_slots VALUES(44,237); +INSERT INTO product_slots VALUES(44,238); +INSERT INTO product_slots VALUES(44,239); +INSERT INTO product_slots VALUES(44,240); +INSERT INTO product_slots VALUES(44,241); +INSERT INTO product_slots VALUES(44,242); +INSERT INTO product_slots VALUES(44,243); +INSERT INTO product_slots VALUES(44,244); +INSERT INTO product_slots VALUES(44,274); +INSERT INTO product_slots VALUES(44,275); +INSERT INTO product_slots VALUES(44,279); +INSERT INTO product_slots VALUES(44,280); +INSERT INTO product_slots VALUES(44,281); +INSERT INTO product_slots VALUES(44,282); +INSERT INTO product_slots VALUES(44,283); +INSERT INTO product_slots VALUES(44,284); +INSERT INTO product_slots VALUES(44,285); +INSERT INTO product_slots VALUES(44,286); +INSERT INTO product_slots VALUES(44,287); +INSERT INTO product_slots VALUES(45,39); +INSERT INTO product_slots VALUES(45,41); +INSERT INTO product_slots VALUES(45,43); +INSERT INTO product_slots VALUES(45,44); +INSERT INTO product_slots VALUES(45,45); +INSERT INTO product_slots VALUES(45,46); +INSERT INTO product_slots VALUES(45,47); +INSERT INTO product_slots VALUES(45,48); +INSERT INTO product_slots VALUES(45,49); +INSERT INTO product_slots VALUES(45,50); +INSERT INTO product_slots VALUES(45,51); +INSERT INTO product_slots VALUES(45,52); +INSERT INTO product_slots VALUES(45,53); +INSERT INTO product_slots VALUES(45,54); +INSERT INTO product_slots VALUES(45,55); +INSERT INTO product_slots VALUES(45,56); +INSERT INTO product_slots VALUES(45,57); +INSERT INTO product_slots VALUES(45,58); +INSERT INTO product_slots VALUES(45,59); +INSERT INTO product_slots VALUES(45,60); +INSERT INTO product_slots VALUES(45,61); +INSERT INTO product_slots VALUES(45,62); +INSERT INTO product_slots VALUES(45,63); +INSERT INTO product_slots VALUES(45,64); +INSERT INTO product_slots VALUES(45,65); +INSERT INTO product_slots VALUES(45,66); +INSERT INTO product_slots VALUES(45,67); +INSERT INTO product_slots VALUES(45,68); +INSERT INTO product_slots VALUES(45,69); +INSERT INTO product_slots VALUES(45,70); +INSERT INTO product_slots VALUES(45,71); +INSERT INTO product_slots VALUES(45,72); +INSERT INTO product_slots VALUES(45,73); +INSERT INTO product_slots VALUES(45,74); +INSERT INTO product_slots VALUES(45,75); +INSERT INTO product_slots VALUES(45,76); +INSERT INTO product_slots VALUES(45,77); +INSERT INTO product_slots VALUES(45,78); +INSERT INTO product_slots VALUES(45,79); +INSERT INTO product_slots VALUES(45,80); +INSERT INTO product_slots VALUES(45,81); +INSERT INTO product_slots VALUES(45,82); +INSERT INTO product_slots VALUES(45,83); +INSERT INTO product_slots VALUES(45,84); +INSERT INTO product_slots VALUES(45,85); +INSERT INTO product_slots VALUES(45,86); +INSERT INTO product_slots VALUES(45,87); +INSERT INTO product_slots VALUES(45,88); +INSERT INTO product_slots VALUES(45,89); +INSERT INTO product_slots VALUES(45,90); +INSERT INTO product_slots VALUES(45,91); +INSERT INTO product_slots VALUES(45,92); +INSERT INTO product_slots VALUES(45,93); +INSERT INTO product_slots VALUES(45,94); +INSERT INTO product_slots VALUES(45,95); +INSERT INTO product_slots VALUES(45,96); +INSERT INTO product_slots VALUES(45,97); +INSERT INTO product_slots VALUES(45,98); +INSERT INTO product_slots VALUES(45,99); +INSERT INTO product_slots VALUES(45,100); +INSERT INTO product_slots VALUES(45,101); +INSERT INTO product_slots VALUES(45,102); +INSERT INTO product_slots VALUES(45,103); +INSERT INTO product_slots VALUES(45,104); +INSERT INTO product_slots VALUES(45,105); +INSERT INTO product_slots VALUES(45,106); +INSERT INTO product_slots VALUES(45,107); +INSERT INTO product_slots VALUES(45,108); +INSERT INTO product_slots VALUES(45,109); +INSERT INTO product_slots VALUES(45,110); +INSERT INTO product_slots VALUES(45,111); +INSERT INTO product_slots VALUES(45,112); +INSERT INTO product_slots VALUES(45,113); +INSERT INTO product_slots VALUES(45,114); +INSERT INTO product_slots VALUES(45,115); +INSERT INTO product_slots VALUES(45,116); +INSERT INTO product_slots VALUES(45,117); +INSERT INTO product_slots VALUES(45,118); +INSERT INTO product_slots VALUES(45,119); +INSERT INTO product_slots VALUES(45,120); +INSERT INTO product_slots VALUES(45,121); +INSERT INTO product_slots VALUES(45,122); +INSERT INTO product_slots VALUES(45,123); +INSERT INTO product_slots VALUES(45,124); +INSERT INTO product_slots VALUES(45,125); +INSERT INTO product_slots VALUES(45,126); +INSERT INTO product_slots VALUES(45,127); +INSERT INTO product_slots VALUES(45,128); +INSERT INTO product_slots VALUES(45,129); +INSERT INTO product_slots VALUES(45,130); +INSERT INTO product_slots VALUES(45,131); +INSERT INTO product_slots VALUES(45,132); +INSERT INTO product_slots VALUES(45,133); +INSERT INTO product_slots VALUES(45,134); +INSERT INTO product_slots VALUES(45,135); +INSERT INTO product_slots VALUES(45,136); +INSERT INTO product_slots VALUES(45,137); +INSERT INTO product_slots VALUES(45,138); +INSERT INTO product_slots VALUES(45,139); +INSERT INTO product_slots VALUES(45,140); +INSERT INTO product_slots VALUES(45,141); +INSERT INTO product_slots VALUES(45,142); +INSERT INTO product_slots VALUES(45,143); +INSERT INTO product_slots VALUES(45,144); +INSERT INTO product_slots VALUES(45,145); +INSERT INTO product_slots VALUES(45,146); +INSERT INTO product_slots VALUES(45,147); +INSERT INTO product_slots VALUES(45,148); +INSERT INTO product_slots VALUES(45,149); +INSERT INTO product_slots VALUES(45,150); +INSERT INTO product_slots VALUES(45,151); +INSERT INTO product_slots VALUES(45,152); +INSERT INTO product_slots VALUES(45,153); +INSERT INTO product_slots VALUES(45,154); +INSERT INTO product_slots VALUES(45,155); +INSERT INTO product_slots VALUES(45,156); +INSERT INTO product_slots VALUES(45,157); +INSERT INTO product_slots VALUES(45,158); +INSERT INTO product_slots VALUES(45,159); +INSERT INTO product_slots VALUES(45,160); +INSERT INTO product_slots VALUES(45,161); +INSERT INTO product_slots VALUES(45,162); +INSERT INTO product_slots VALUES(45,163); +INSERT INTO product_slots VALUES(45,164); +INSERT INTO product_slots VALUES(45,165); +INSERT INTO product_slots VALUES(45,166); +INSERT INTO product_slots VALUES(45,167); +INSERT INTO product_slots VALUES(45,168); +INSERT INTO product_slots VALUES(45,169); +INSERT INTO product_slots VALUES(45,170); +INSERT INTO product_slots VALUES(45,171); +INSERT INTO product_slots VALUES(45,172); +INSERT INTO product_slots VALUES(45,173); +INSERT INTO product_slots VALUES(45,174); +INSERT INTO product_slots VALUES(45,175); +INSERT INTO product_slots VALUES(45,176); +INSERT INTO product_slots VALUES(45,177); +INSERT INTO product_slots VALUES(45,178); +INSERT INTO product_slots VALUES(45,179); +INSERT INTO product_slots VALUES(45,180); +INSERT INTO product_slots VALUES(45,181); +INSERT INTO product_slots VALUES(45,182); +INSERT INTO product_slots VALUES(45,183); +INSERT INTO product_slots VALUES(45,184); +INSERT INTO product_slots VALUES(45,185); +INSERT INTO product_slots VALUES(45,186); +INSERT INTO product_slots VALUES(45,187); +INSERT INTO product_slots VALUES(45,188); +INSERT INTO product_slots VALUES(45,189); +INSERT INTO product_slots VALUES(45,190); +INSERT INTO product_slots VALUES(45,191); +INSERT INTO product_slots VALUES(45,192); +INSERT INTO product_slots VALUES(45,193); +INSERT INTO product_slots VALUES(45,194); +INSERT INTO product_slots VALUES(45,195); +INSERT INTO product_slots VALUES(45,196); +INSERT INTO product_slots VALUES(45,197); +INSERT INTO product_slots VALUES(45,198); +INSERT INTO product_slots VALUES(45,199); +INSERT INTO product_slots VALUES(45,200); +INSERT INTO product_slots VALUES(45,201); +INSERT INTO product_slots VALUES(45,202); +INSERT INTO product_slots VALUES(45,203); +INSERT INTO product_slots VALUES(45,204); +INSERT INTO product_slots VALUES(45,205); +INSERT INTO product_slots VALUES(45,206); +INSERT INTO product_slots VALUES(45,207); +INSERT INTO product_slots VALUES(45,208); +INSERT INTO product_slots VALUES(45,209); +INSERT INTO product_slots VALUES(45,210); +INSERT INTO product_slots VALUES(45,211); +INSERT INTO product_slots VALUES(45,212); +INSERT INTO product_slots VALUES(45,213); +INSERT INTO product_slots VALUES(45,214); +INSERT INTO product_slots VALUES(45,215); +INSERT INTO product_slots VALUES(45,216); +INSERT INTO product_slots VALUES(45,217); +INSERT INTO product_slots VALUES(45,218); +INSERT INTO product_slots VALUES(45,219); +INSERT INTO product_slots VALUES(45,220); +INSERT INTO product_slots VALUES(45,221); +INSERT INTO product_slots VALUES(45,222); +INSERT INTO product_slots VALUES(45,223); +INSERT INTO product_slots VALUES(45,224); +INSERT INTO product_slots VALUES(45,225); +INSERT INTO product_slots VALUES(45,226); +INSERT INTO product_slots VALUES(45,227); +INSERT INTO product_slots VALUES(45,228); +INSERT INTO product_slots VALUES(45,229); +INSERT INTO product_slots VALUES(45,230); +INSERT INTO product_slots VALUES(45,231); +INSERT INTO product_slots VALUES(45,232); +INSERT INTO product_slots VALUES(45,233); +INSERT INTO product_slots VALUES(45,234); +INSERT INTO product_slots VALUES(45,235); +INSERT INTO product_slots VALUES(45,236); +INSERT INTO product_slots VALUES(45,237); +INSERT INTO product_slots VALUES(45,238); +INSERT INTO product_slots VALUES(45,239); +INSERT INTO product_slots VALUES(45,240); +INSERT INTO product_slots VALUES(45,241); +INSERT INTO product_slots VALUES(45,242); +INSERT INTO product_slots VALUES(45,243); +INSERT INTO product_slots VALUES(45,244); +INSERT INTO product_slots VALUES(45,274); +INSERT INTO product_slots VALUES(45,275); +INSERT INTO product_slots VALUES(45,279); +INSERT INTO product_slots VALUES(45,280); +INSERT INTO product_slots VALUES(45,281); +INSERT INTO product_slots VALUES(45,282); +INSERT INTO product_slots VALUES(45,283); +INSERT INTO product_slots VALUES(45,284); +INSERT INTO product_slots VALUES(45,285); +INSERT INTO product_slots VALUES(45,286); +INSERT INTO product_slots VALUES(45,287); +INSERT INTO product_slots VALUES(46,39); +INSERT INTO product_slots VALUES(46,40); +INSERT INTO product_slots VALUES(46,43); +INSERT INTO product_slots VALUES(46,45); +INSERT INTO product_slots VALUES(46,46); +INSERT INTO product_slots VALUES(46,48); +INSERT INTO product_slots VALUES(46,49); +INSERT INTO product_slots VALUES(46,51); +INSERT INTO product_slots VALUES(46,52); +INSERT INTO product_slots VALUES(46,53); +INSERT INTO product_slots VALUES(46,54); +INSERT INTO product_slots VALUES(46,57); +INSERT INTO product_slots VALUES(46,58); +INSERT INTO product_slots VALUES(46,59); +INSERT INTO product_slots VALUES(46,60); +INSERT INTO product_slots VALUES(46,61); +INSERT INTO product_slots VALUES(46,62); +INSERT INTO product_slots VALUES(46,63); +INSERT INTO product_slots VALUES(46,64); +INSERT INTO product_slots VALUES(46,65); +INSERT INTO product_slots VALUES(46,66); +INSERT INTO product_slots VALUES(46,67); +INSERT INTO product_slots VALUES(46,68); +INSERT INTO product_slots VALUES(46,69); +INSERT INTO product_slots VALUES(46,70); +INSERT INTO product_slots VALUES(46,71); +INSERT INTO product_slots VALUES(46,72); +INSERT INTO product_slots VALUES(46,73); +INSERT INTO product_slots VALUES(46,74); +INSERT INTO product_slots VALUES(46,75); +INSERT INTO product_slots VALUES(46,76); +INSERT INTO product_slots VALUES(46,77); +INSERT INTO product_slots VALUES(46,78); +INSERT INTO product_slots VALUES(46,79); +INSERT INTO product_slots VALUES(46,80); +INSERT INTO product_slots VALUES(46,81); +INSERT INTO product_slots VALUES(46,82); +INSERT INTO product_slots VALUES(46,83); +INSERT INTO product_slots VALUES(46,84); +INSERT INTO product_slots VALUES(46,85); +INSERT INTO product_slots VALUES(46,86); +INSERT INTO product_slots VALUES(46,87); +INSERT INTO product_slots VALUES(46,88); +INSERT INTO product_slots VALUES(46,89); +INSERT INTO product_slots VALUES(46,90); +INSERT INTO product_slots VALUES(46,91); +INSERT INTO product_slots VALUES(46,92); +INSERT INTO product_slots VALUES(46,93); +INSERT INTO product_slots VALUES(46,94); +INSERT INTO product_slots VALUES(46,95); +INSERT INTO product_slots VALUES(46,96); +INSERT INTO product_slots VALUES(46,97); +INSERT INTO product_slots VALUES(46,98); +INSERT INTO product_slots VALUES(46,99); +INSERT INTO product_slots VALUES(46,100); +INSERT INTO product_slots VALUES(46,102); +INSERT INTO product_slots VALUES(46,103); +INSERT INTO product_slots VALUES(46,104); +INSERT INTO product_slots VALUES(46,105); +INSERT INTO product_slots VALUES(46,106); +INSERT INTO product_slots VALUES(46,107); +INSERT INTO product_slots VALUES(46,108); +INSERT INTO product_slots VALUES(46,109); +INSERT INTO product_slots VALUES(46,110); +INSERT INTO product_slots VALUES(46,111); +INSERT INTO product_slots VALUES(46,112); +INSERT INTO product_slots VALUES(46,113); +INSERT INTO product_slots VALUES(46,114); +INSERT INTO product_slots VALUES(46,115); +INSERT INTO product_slots VALUES(46,117); +INSERT INTO product_slots VALUES(46,118); +INSERT INTO product_slots VALUES(46,119); +INSERT INTO product_slots VALUES(46,120); +INSERT INTO product_slots VALUES(46,121); +INSERT INTO product_slots VALUES(46,122); +INSERT INTO product_slots VALUES(46,123); +INSERT INTO product_slots VALUES(46,124); +INSERT INTO product_slots VALUES(46,125); +INSERT INTO product_slots VALUES(46,126); +INSERT INTO product_slots VALUES(46,127); +INSERT INTO product_slots VALUES(46,128); +INSERT INTO product_slots VALUES(46,129); +INSERT INTO product_slots VALUES(46,130); +INSERT INTO product_slots VALUES(46,131); +INSERT INTO product_slots VALUES(46,132); +INSERT INTO product_slots VALUES(46,133); +INSERT INTO product_slots VALUES(46,134); +INSERT INTO product_slots VALUES(46,135); +INSERT INTO product_slots VALUES(46,136); +INSERT INTO product_slots VALUES(46,138); +INSERT INTO product_slots VALUES(46,139); +INSERT INTO product_slots VALUES(46,140); +INSERT INTO product_slots VALUES(46,141); +INSERT INTO product_slots VALUES(46,142); +INSERT INTO product_slots VALUES(46,143); +INSERT INTO product_slots VALUES(46,145); +INSERT INTO product_slots VALUES(46,146); +INSERT INTO product_slots VALUES(46,147); +INSERT INTO product_slots VALUES(46,148); +INSERT INTO product_slots VALUES(46,149); +INSERT INTO product_slots VALUES(46,150); +INSERT INTO product_slots VALUES(46,151); +INSERT INTO product_slots VALUES(46,152); +INSERT INTO product_slots VALUES(46,153); +INSERT INTO product_slots VALUES(46,154); +INSERT INTO product_slots VALUES(46,155); +INSERT INTO product_slots VALUES(46,156); +INSERT INTO product_slots VALUES(46,157); +INSERT INTO product_slots VALUES(46,158); +INSERT INTO product_slots VALUES(46,159); +INSERT INTO product_slots VALUES(46,160); +INSERT INTO product_slots VALUES(46,161); +INSERT INTO product_slots VALUES(46,162); +INSERT INTO product_slots VALUES(46,163); +INSERT INTO product_slots VALUES(46,164); +INSERT INTO product_slots VALUES(46,165); +INSERT INTO product_slots VALUES(46,166); +INSERT INTO product_slots VALUES(46,167); +INSERT INTO product_slots VALUES(46,168); +INSERT INTO product_slots VALUES(46,169); +INSERT INTO product_slots VALUES(46,170); +INSERT INTO product_slots VALUES(46,171); +INSERT INTO product_slots VALUES(46,172); +INSERT INTO product_slots VALUES(46,173); +INSERT INTO product_slots VALUES(46,174); +INSERT INTO product_slots VALUES(46,175); +INSERT INTO product_slots VALUES(46,176); +INSERT INTO product_slots VALUES(46,177); +INSERT INTO product_slots VALUES(46,178); +INSERT INTO product_slots VALUES(46,179); +INSERT INTO product_slots VALUES(46,180); +INSERT INTO product_slots VALUES(46,181); +INSERT INTO product_slots VALUES(46,182); +INSERT INTO product_slots VALUES(46,183); +INSERT INTO product_slots VALUES(46,184); +INSERT INTO product_slots VALUES(46,185); +INSERT INTO product_slots VALUES(46,186); +INSERT INTO product_slots VALUES(46,187); +INSERT INTO product_slots VALUES(46,188); +INSERT INTO product_slots VALUES(46,189); +INSERT INTO product_slots VALUES(46,190); +INSERT INTO product_slots VALUES(46,191); +INSERT INTO product_slots VALUES(46,192); +INSERT INTO product_slots VALUES(46,193); +INSERT INTO product_slots VALUES(46,194); +INSERT INTO product_slots VALUES(46,195); +INSERT INTO product_slots VALUES(46,196); +INSERT INTO product_slots VALUES(46,197); +INSERT INTO product_slots VALUES(46,198); +INSERT INTO product_slots VALUES(46,199); +INSERT INTO product_slots VALUES(46,200); +INSERT INTO product_slots VALUES(46,201); +INSERT INTO product_slots VALUES(46,202); +INSERT INTO product_slots VALUES(46,203); +INSERT INTO product_slots VALUES(46,204); +INSERT INTO product_slots VALUES(46,205); +INSERT INTO product_slots VALUES(46,206); +INSERT INTO product_slots VALUES(46,207); +INSERT INTO product_slots VALUES(46,208); +INSERT INTO product_slots VALUES(46,209); +INSERT INTO product_slots VALUES(46,210); +INSERT INTO product_slots VALUES(46,211); +INSERT INTO product_slots VALUES(46,212); +INSERT INTO product_slots VALUES(46,213); +INSERT INTO product_slots VALUES(46,214); +INSERT INTO product_slots VALUES(46,215); +INSERT INTO product_slots VALUES(46,216); +INSERT INTO product_slots VALUES(46,217); +INSERT INTO product_slots VALUES(46,218); +INSERT INTO product_slots VALUES(46,219); +INSERT INTO product_slots VALUES(46,220); +INSERT INTO product_slots VALUES(46,221); +INSERT INTO product_slots VALUES(46,222); +INSERT INTO product_slots VALUES(46,223); +INSERT INTO product_slots VALUES(46,224); +INSERT INTO product_slots VALUES(46,225); +INSERT INTO product_slots VALUES(46,226); +INSERT INTO product_slots VALUES(46,227); +INSERT INTO product_slots VALUES(46,228); +INSERT INTO product_slots VALUES(46,229); +INSERT INTO product_slots VALUES(46,230); +INSERT INTO product_slots VALUES(46,231); +INSERT INTO product_slots VALUES(46,232); +INSERT INTO product_slots VALUES(46,233); +INSERT INTO product_slots VALUES(46,234); +INSERT INTO product_slots VALUES(46,235); +INSERT INTO product_slots VALUES(46,236); +INSERT INTO product_slots VALUES(46,237); +INSERT INTO product_slots VALUES(46,238); +INSERT INTO product_slots VALUES(46,239); +INSERT INTO product_slots VALUES(46,240); +INSERT INTO product_slots VALUES(46,241); +INSERT INTO product_slots VALUES(46,242); +INSERT INTO product_slots VALUES(46,243); +INSERT INTO product_slots VALUES(46,244); +INSERT INTO product_slots VALUES(46,274); +INSERT INTO product_slots VALUES(46,275); +INSERT INTO product_slots VALUES(46,279); +INSERT INTO product_slots VALUES(46,280); +INSERT INTO product_slots VALUES(46,281); +INSERT INTO product_slots VALUES(46,282); +INSERT INTO product_slots VALUES(46,283); +INSERT INTO product_slots VALUES(46,284); +INSERT INTO product_slots VALUES(46,285); +INSERT INTO product_slots VALUES(46,286); +INSERT INTO product_slots VALUES(46,287); +INSERT INTO product_slots VALUES(47,39); +INSERT INTO product_slots VALUES(47,40); +INSERT INTO product_slots VALUES(47,43); +INSERT INTO product_slots VALUES(47,45); +INSERT INTO product_slots VALUES(47,46); +INSERT INTO product_slots VALUES(47,48); +INSERT INTO product_slots VALUES(47,49); +INSERT INTO product_slots VALUES(47,51); +INSERT INTO product_slots VALUES(47,52); +INSERT INTO product_slots VALUES(47,53); +INSERT INTO product_slots VALUES(47,54); +INSERT INTO product_slots VALUES(47,57); +INSERT INTO product_slots VALUES(47,58); +INSERT INTO product_slots VALUES(47,59); +INSERT INTO product_slots VALUES(47,60); +INSERT INTO product_slots VALUES(47,61); +INSERT INTO product_slots VALUES(47,62); +INSERT INTO product_slots VALUES(47,63); +INSERT INTO product_slots VALUES(47,64); +INSERT INTO product_slots VALUES(47,65); +INSERT INTO product_slots VALUES(47,66); +INSERT INTO product_slots VALUES(47,67); +INSERT INTO product_slots VALUES(47,68); +INSERT INTO product_slots VALUES(47,69); +INSERT INTO product_slots VALUES(47,70); +INSERT INTO product_slots VALUES(47,71); +INSERT INTO product_slots VALUES(47,72); +INSERT INTO product_slots VALUES(47,73); +INSERT INTO product_slots VALUES(47,74); +INSERT INTO product_slots VALUES(47,75); +INSERT INTO product_slots VALUES(47,76); +INSERT INTO product_slots VALUES(47,77); +INSERT INTO product_slots VALUES(47,78); +INSERT INTO product_slots VALUES(47,79); +INSERT INTO product_slots VALUES(47,80); +INSERT INTO product_slots VALUES(47,81); +INSERT INTO product_slots VALUES(47,82); +INSERT INTO product_slots VALUES(47,83); +INSERT INTO product_slots VALUES(47,84); +INSERT INTO product_slots VALUES(47,85); +INSERT INTO product_slots VALUES(47,86); +INSERT INTO product_slots VALUES(47,87); +INSERT INTO product_slots VALUES(47,88); +INSERT INTO product_slots VALUES(47,89); +INSERT INTO product_slots VALUES(47,90); +INSERT INTO product_slots VALUES(47,91); +INSERT INTO product_slots VALUES(47,92); +INSERT INTO product_slots VALUES(47,93); +INSERT INTO product_slots VALUES(47,94); +INSERT INTO product_slots VALUES(47,95); +INSERT INTO product_slots VALUES(47,96); +INSERT INTO product_slots VALUES(47,97); +INSERT INTO product_slots VALUES(47,98); +INSERT INTO product_slots VALUES(47,99); +INSERT INTO product_slots VALUES(47,100); +INSERT INTO product_slots VALUES(47,102); +INSERT INTO product_slots VALUES(47,103); +INSERT INTO product_slots VALUES(47,104); +INSERT INTO product_slots VALUES(47,105); +INSERT INTO product_slots VALUES(47,106); +INSERT INTO product_slots VALUES(47,107); +INSERT INTO product_slots VALUES(47,108); +INSERT INTO product_slots VALUES(47,109); +INSERT INTO product_slots VALUES(47,110); +INSERT INTO product_slots VALUES(47,111); +INSERT INTO product_slots VALUES(47,112); +INSERT INTO product_slots VALUES(47,113); +INSERT INTO product_slots VALUES(47,114); +INSERT INTO product_slots VALUES(47,115); +INSERT INTO product_slots VALUES(47,117); +INSERT INTO product_slots VALUES(47,118); +INSERT INTO product_slots VALUES(47,119); +INSERT INTO product_slots VALUES(47,120); +INSERT INTO product_slots VALUES(47,121); +INSERT INTO product_slots VALUES(47,122); +INSERT INTO product_slots VALUES(47,123); +INSERT INTO product_slots VALUES(47,124); +INSERT INTO product_slots VALUES(47,125); +INSERT INTO product_slots VALUES(47,126); +INSERT INTO product_slots VALUES(47,127); +INSERT INTO product_slots VALUES(47,128); +INSERT INTO product_slots VALUES(47,129); +INSERT INTO product_slots VALUES(47,130); +INSERT INTO product_slots VALUES(47,131); +INSERT INTO product_slots VALUES(47,132); +INSERT INTO product_slots VALUES(47,133); +INSERT INTO product_slots VALUES(47,134); +INSERT INTO product_slots VALUES(47,135); +INSERT INTO product_slots VALUES(47,136); +INSERT INTO product_slots VALUES(47,138); +INSERT INTO product_slots VALUES(47,139); +INSERT INTO product_slots VALUES(47,140); +INSERT INTO product_slots VALUES(47,141); +INSERT INTO product_slots VALUES(47,142); +INSERT INTO product_slots VALUES(47,143); +INSERT INTO product_slots VALUES(47,145); +INSERT INTO product_slots VALUES(47,146); +INSERT INTO product_slots VALUES(47,147); +INSERT INTO product_slots VALUES(47,148); +INSERT INTO product_slots VALUES(47,149); +INSERT INTO product_slots VALUES(47,150); +INSERT INTO product_slots VALUES(47,151); +INSERT INTO product_slots VALUES(47,152); +INSERT INTO product_slots VALUES(47,153); +INSERT INTO product_slots VALUES(47,154); +INSERT INTO product_slots VALUES(47,155); +INSERT INTO product_slots VALUES(47,156); +INSERT INTO product_slots VALUES(47,157); +INSERT INTO product_slots VALUES(47,158); +INSERT INTO product_slots VALUES(47,159); +INSERT INTO product_slots VALUES(47,160); +INSERT INTO product_slots VALUES(47,161); +INSERT INTO product_slots VALUES(47,162); +INSERT INTO product_slots VALUES(47,163); +INSERT INTO product_slots VALUES(47,164); +INSERT INTO product_slots VALUES(47,165); +INSERT INTO product_slots VALUES(47,166); +INSERT INTO product_slots VALUES(47,167); +INSERT INTO product_slots VALUES(47,168); +INSERT INTO product_slots VALUES(47,169); +INSERT INTO product_slots VALUES(47,170); +INSERT INTO product_slots VALUES(47,171); +INSERT INTO product_slots VALUES(47,172); +INSERT INTO product_slots VALUES(47,173); +INSERT INTO product_slots VALUES(47,174); +INSERT INTO product_slots VALUES(47,175); +INSERT INTO product_slots VALUES(47,176); +INSERT INTO product_slots VALUES(47,177); +INSERT INTO product_slots VALUES(47,178); +INSERT INTO product_slots VALUES(47,179); +INSERT INTO product_slots VALUES(47,180); +INSERT INTO product_slots VALUES(47,181); +INSERT INTO product_slots VALUES(47,182); +INSERT INTO product_slots VALUES(47,183); +INSERT INTO product_slots VALUES(47,184); +INSERT INTO product_slots VALUES(47,185); +INSERT INTO product_slots VALUES(47,186); +INSERT INTO product_slots VALUES(47,187); +INSERT INTO product_slots VALUES(47,188); +INSERT INTO product_slots VALUES(47,189); +INSERT INTO product_slots VALUES(47,190); +INSERT INTO product_slots VALUES(47,191); +INSERT INTO product_slots VALUES(47,192); +INSERT INTO product_slots VALUES(47,193); +INSERT INTO product_slots VALUES(47,194); +INSERT INTO product_slots VALUES(47,195); +INSERT INTO product_slots VALUES(47,196); +INSERT INTO product_slots VALUES(47,197); +INSERT INTO product_slots VALUES(47,198); +INSERT INTO product_slots VALUES(47,199); +INSERT INTO product_slots VALUES(47,200); +INSERT INTO product_slots VALUES(47,201); +INSERT INTO product_slots VALUES(47,202); +INSERT INTO product_slots VALUES(47,203); +INSERT INTO product_slots VALUES(47,204); +INSERT INTO product_slots VALUES(47,205); +INSERT INTO product_slots VALUES(47,206); +INSERT INTO product_slots VALUES(47,207); +INSERT INTO product_slots VALUES(47,208); +INSERT INTO product_slots VALUES(47,209); +INSERT INTO product_slots VALUES(47,210); +INSERT INTO product_slots VALUES(47,211); +INSERT INTO product_slots VALUES(47,212); +INSERT INTO product_slots VALUES(47,213); +INSERT INTO product_slots VALUES(47,214); +INSERT INTO product_slots VALUES(47,215); +INSERT INTO product_slots VALUES(47,216); +INSERT INTO product_slots VALUES(47,217); +INSERT INTO product_slots VALUES(47,218); +INSERT INTO product_slots VALUES(47,219); +INSERT INTO product_slots VALUES(47,220); +INSERT INTO product_slots VALUES(47,221); +INSERT INTO product_slots VALUES(47,222); +INSERT INTO product_slots VALUES(47,223); +INSERT INTO product_slots VALUES(47,224); +INSERT INTO product_slots VALUES(47,225); +INSERT INTO product_slots VALUES(47,226); +INSERT INTO product_slots VALUES(47,227); +INSERT INTO product_slots VALUES(47,228); +INSERT INTO product_slots VALUES(47,229); +INSERT INTO product_slots VALUES(47,230); +INSERT INTO product_slots VALUES(47,231); +INSERT INTO product_slots VALUES(47,232); +INSERT INTO product_slots VALUES(47,233); +INSERT INTO product_slots VALUES(47,234); +INSERT INTO product_slots VALUES(47,235); +INSERT INTO product_slots VALUES(47,236); +INSERT INTO product_slots VALUES(47,237); +INSERT INTO product_slots VALUES(47,238); +INSERT INTO product_slots VALUES(47,239); +INSERT INTO product_slots VALUES(47,240); +INSERT INTO product_slots VALUES(47,241); +INSERT INTO product_slots VALUES(47,242); +INSERT INTO product_slots VALUES(47,243); +INSERT INTO product_slots VALUES(47,244); +INSERT INTO product_slots VALUES(47,274); +INSERT INTO product_slots VALUES(47,275); +INSERT INTO product_slots VALUES(47,279); +INSERT INTO product_slots VALUES(47,280); +INSERT INTO product_slots VALUES(47,281); +INSERT INTO product_slots VALUES(47,282); +INSERT INTO product_slots VALUES(47,283); +INSERT INTO product_slots VALUES(47,284); +INSERT INTO product_slots VALUES(47,285); +INSERT INTO product_slots VALUES(47,286); +INSERT INTO product_slots VALUES(47,287); +INSERT INTO product_slots VALUES(48,39); +INSERT INTO product_slots VALUES(48,43); +INSERT INTO product_slots VALUES(48,45); +INSERT INTO product_slots VALUES(48,46); +INSERT INTO product_slots VALUES(48,48); +INSERT INTO product_slots VALUES(48,49); +INSERT INTO product_slots VALUES(48,51); +INSERT INTO product_slots VALUES(48,52); +INSERT INTO product_slots VALUES(48,53); +INSERT INTO product_slots VALUES(48,54); +INSERT INTO product_slots VALUES(48,57); +INSERT INTO product_slots VALUES(48,58); +INSERT INTO product_slots VALUES(48,59); +INSERT INTO product_slots VALUES(48,60); +INSERT INTO product_slots VALUES(48,61); +INSERT INTO product_slots VALUES(48,62); +INSERT INTO product_slots VALUES(48,63); +INSERT INTO product_slots VALUES(48,64); +INSERT INTO product_slots VALUES(48,65); +INSERT INTO product_slots VALUES(48,66); +INSERT INTO product_slots VALUES(48,67); +INSERT INTO product_slots VALUES(48,68); +INSERT INTO product_slots VALUES(48,69); +INSERT INTO product_slots VALUES(48,70); +INSERT INTO product_slots VALUES(48,71); +INSERT INTO product_slots VALUES(48,72); +INSERT INTO product_slots VALUES(48,73); +INSERT INTO product_slots VALUES(48,74); +INSERT INTO product_slots VALUES(48,75); +INSERT INTO product_slots VALUES(48,76); +INSERT INTO product_slots VALUES(48,77); +INSERT INTO product_slots VALUES(48,78); +INSERT INTO product_slots VALUES(48,79); +INSERT INTO product_slots VALUES(48,80); +INSERT INTO product_slots VALUES(48,81); +INSERT INTO product_slots VALUES(48,82); +INSERT INTO product_slots VALUES(48,83); +INSERT INTO product_slots VALUES(48,84); +INSERT INTO product_slots VALUES(48,85); +INSERT INTO product_slots VALUES(48,86); +INSERT INTO product_slots VALUES(48,87); +INSERT INTO product_slots VALUES(48,88); +INSERT INTO product_slots VALUES(48,89); +INSERT INTO product_slots VALUES(48,90); +INSERT INTO product_slots VALUES(48,91); +INSERT INTO product_slots VALUES(48,92); +INSERT INTO product_slots VALUES(48,93); +INSERT INTO product_slots VALUES(48,94); +INSERT INTO product_slots VALUES(48,95); +INSERT INTO product_slots VALUES(48,96); +INSERT INTO product_slots VALUES(48,97); +INSERT INTO product_slots VALUES(48,98); +INSERT INTO product_slots VALUES(48,99); +INSERT INTO product_slots VALUES(48,100); +INSERT INTO product_slots VALUES(48,102); +INSERT INTO product_slots VALUES(48,103); +INSERT INTO product_slots VALUES(48,104); +INSERT INTO product_slots VALUES(48,105); +INSERT INTO product_slots VALUES(48,106); +INSERT INTO product_slots VALUES(48,107); +INSERT INTO product_slots VALUES(48,108); +INSERT INTO product_slots VALUES(48,109); +INSERT INTO product_slots VALUES(48,110); +INSERT INTO product_slots VALUES(48,111); +INSERT INTO product_slots VALUES(48,112); +INSERT INTO product_slots VALUES(48,113); +INSERT INTO product_slots VALUES(48,114); +INSERT INTO product_slots VALUES(48,115); +INSERT INTO product_slots VALUES(48,117); +INSERT INTO product_slots VALUES(48,118); +INSERT INTO product_slots VALUES(48,119); +INSERT INTO product_slots VALUES(48,120); +INSERT INTO product_slots VALUES(48,121); +INSERT INTO product_slots VALUES(48,122); +INSERT INTO product_slots VALUES(48,124); +INSERT INTO product_slots VALUES(48,125); +INSERT INTO product_slots VALUES(48,126); +INSERT INTO product_slots VALUES(48,127); +INSERT INTO product_slots VALUES(48,128); +INSERT INTO product_slots VALUES(48,129); +INSERT INTO product_slots VALUES(48,130); +INSERT INTO product_slots VALUES(48,131); +INSERT INTO product_slots VALUES(48,132); +INSERT INTO product_slots VALUES(48,133); +INSERT INTO product_slots VALUES(48,134); +INSERT INTO product_slots VALUES(48,135); +INSERT INTO product_slots VALUES(48,136); +INSERT INTO product_slots VALUES(48,138); +INSERT INTO product_slots VALUES(48,139); +INSERT INTO product_slots VALUES(48,140); +INSERT INTO product_slots VALUES(48,141); +INSERT INTO product_slots VALUES(48,142); +INSERT INTO product_slots VALUES(48,143); +INSERT INTO product_slots VALUES(48,145); +INSERT INTO product_slots VALUES(48,146); +INSERT INTO product_slots VALUES(48,147); +INSERT INTO product_slots VALUES(48,148); +INSERT INTO product_slots VALUES(48,149); +INSERT INTO product_slots VALUES(48,150); +INSERT INTO product_slots VALUES(48,151); +INSERT INTO product_slots VALUES(48,152); +INSERT INTO product_slots VALUES(48,153); +INSERT INTO product_slots VALUES(48,154); +INSERT INTO product_slots VALUES(48,155); +INSERT INTO product_slots VALUES(48,156); +INSERT INTO product_slots VALUES(48,157); +INSERT INTO product_slots VALUES(48,158); +INSERT INTO product_slots VALUES(48,159); +INSERT INTO product_slots VALUES(48,160); +INSERT INTO product_slots VALUES(48,161); +INSERT INTO product_slots VALUES(48,162); +INSERT INTO product_slots VALUES(48,163); +INSERT INTO product_slots VALUES(48,164); +INSERT INTO product_slots VALUES(48,165); +INSERT INTO product_slots VALUES(48,166); +INSERT INTO product_slots VALUES(48,167); +INSERT INTO product_slots VALUES(48,168); +INSERT INTO product_slots VALUES(48,169); +INSERT INTO product_slots VALUES(48,170); +INSERT INTO product_slots VALUES(48,171); +INSERT INTO product_slots VALUES(48,172); +INSERT INTO product_slots VALUES(48,173); +INSERT INTO product_slots VALUES(48,174); +INSERT INTO product_slots VALUES(48,175); +INSERT INTO product_slots VALUES(48,176); +INSERT INTO product_slots VALUES(48,177); +INSERT INTO product_slots VALUES(48,178); +INSERT INTO product_slots VALUES(48,179); +INSERT INTO product_slots VALUES(48,180); +INSERT INTO product_slots VALUES(48,181); +INSERT INTO product_slots VALUES(48,182); +INSERT INTO product_slots VALUES(48,183); +INSERT INTO product_slots VALUES(48,184); +INSERT INTO product_slots VALUES(48,185); +INSERT INTO product_slots VALUES(48,186); +INSERT INTO product_slots VALUES(48,187); +INSERT INTO product_slots VALUES(48,188); +INSERT INTO product_slots VALUES(48,189); +INSERT INTO product_slots VALUES(48,190); +INSERT INTO product_slots VALUES(48,191); +INSERT INTO product_slots VALUES(48,192); +INSERT INTO product_slots VALUES(48,193); +INSERT INTO product_slots VALUES(48,194); +INSERT INTO product_slots VALUES(48,195); +INSERT INTO product_slots VALUES(48,196); +INSERT INTO product_slots VALUES(48,197); +INSERT INTO product_slots VALUES(48,198); +INSERT INTO product_slots VALUES(48,199); +INSERT INTO product_slots VALUES(48,200); +INSERT INTO product_slots VALUES(48,201); +INSERT INTO product_slots VALUES(48,202); +INSERT INTO product_slots VALUES(48,203); +INSERT INTO product_slots VALUES(48,204); +INSERT INTO product_slots VALUES(48,205); +INSERT INTO product_slots VALUES(48,206); +INSERT INTO product_slots VALUES(48,207); +INSERT INTO product_slots VALUES(48,208); +INSERT INTO product_slots VALUES(48,209); +INSERT INTO product_slots VALUES(48,210); +INSERT INTO product_slots VALUES(48,211); +INSERT INTO product_slots VALUES(48,212); +INSERT INTO product_slots VALUES(48,213); +INSERT INTO product_slots VALUES(48,214); +INSERT INTO product_slots VALUES(48,215); +INSERT INTO product_slots VALUES(48,216); +INSERT INTO product_slots VALUES(48,217); +INSERT INTO product_slots VALUES(48,218); +INSERT INTO product_slots VALUES(48,219); +INSERT INTO product_slots VALUES(48,220); +INSERT INTO product_slots VALUES(48,221); +INSERT INTO product_slots VALUES(48,222); +INSERT INTO product_slots VALUES(48,223); +INSERT INTO product_slots VALUES(48,224); +INSERT INTO product_slots VALUES(48,225); +INSERT INTO product_slots VALUES(48,226); +INSERT INTO product_slots VALUES(48,227); +INSERT INTO product_slots VALUES(48,228); +INSERT INTO product_slots VALUES(48,229); +INSERT INTO product_slots VALUES(48,230); +INSERT INTO product_slots VALUES(48,231); +INSERT INTO product_slots VALUES(48,232); +INSERT INTO product_slots VALUES(48,233); +INSERT INTO product_slots VALUES(48,234); +INSERT INTO product_slots VALUES(48,235); +INSERT INTO product_slots VALUES(48,236); +INSERT INTO product_slots VALUES(48,237); +INSERT INTO product_slots VALUES(48,238); +INSERT INTO product_slots VALUES(48,239); +INSERT INTO product_slots VALUES(48,240); +INSERT INTO product_slots VALUES(48,241); +INSERT INTO product_slots VALUES(48,242); +INSERT INTO product_slots VALUES(48,243); +INSERT INTO product_slots VALUES(48,244); +INSERT INTO product_slots VALUES(48,274); +INSERT INTO product_slots VALUES(48,275); +INSERT INTO product_slots VALUES(48,279); +INSERT INTO product_slots VALUES(48,280); +INSERT INTO product_slots VALUES(48,281); +INSERT INTO product_slots VALUES(48,282); +INSERT INTO product_slots VALUES(48,283); +INSERT INTO product_slots VALUES(48,284); +INSERT INTO product_slots VALUES(48,285); +INSERT INTO product_slots VALUES(48,286); +INSERT INTO product_slots VALUES(48,287); +INSERT INTO product_slots VALUES(49,40); +INSERT INTO product_slots VALUES(49,74); +INSERT INTO product_slots VALUES(49,75); +INSERT INTO product_slots VALUES(49,76); +INSERT INTO product_slots VALUES(49,77); +INSERT INTO product_slots VALUES(49,78); +INSERT INTO product_slots VALUES(49,79); +INSERT INTO product_slots VALUES(49,80); +INSERT INTO product_slots VALUES(49,102); +INSERT INTO product_slots VALUES(49,103); +INSERT INTO product_slots VALUES(49,104); +INSERT INTO product_slots VALUES(49,105); +INSERT INTO product_slots VALUES(49,106); +INSERT INTO product_slots VALUES(49,107); +INSERT INTO product_slots VALUES(49,108); +INSERT INTO product_slots VALUES(49,109); +INSERT INTO product_slots VALUES(49,110); +INSERT INTO product_slots VALUES(49,111); +INSERT INTO product_slots VALUES(49,112); +INSERT INTO product_slots VALUES(49,113); +INSERT INTO product_slots VALUES(49,114); +INSERT INTO product_slots VALUES(49,115); +INSERT INTO product_slots VALUES(49,117); +INSERT INTO product_slots VALUES(49,118); +INSERT INTO product_slots VALUES(49,119); +INSERT INTO product_slots VALUES(49,120); +INSERT INTO product_slots VALUES(49,121); +INSERT INTO product_slots VALUES(49,122); +INSERT INTO product_slots VALUES(49,123); +INSERT INTO product_slots VALUES(49,124); +INSERT INTO product_slots VALUES(49,125); +INSERT INTO product_slots VALUES(49,126); +INSERT INTO product_slots VALUES(49,127); +INSERT INTO product_slots VALUES(49,128); +INSERT INTO product_slots VALUES(49,129); +INSERT INTO product_slots VALUES(49,130); +INSERT INTO product_slots VALUES(49,131); +INSERT INTO product_slots VALUES(49,132); +INSERT INTO product_slots VALUES(49,133); +INSERT INTO product_slots VALUES(49,134); +INSERT INTO product_slots VALUES(49,135); +INSERT INTO product_slots VALUES(49,136); +INSERT INTO product_slots VALUES(49,137); +INSERT INTO product_slots VALUES(49,138); +INSERT INTO product_slots VALUES(49,139); +INSERT INTO product_slots VALUES(49,140); +INSERT INTO product_slots VALUES(49,141); +INSERT INTO product_slots VALUES(49,142); +INSERT INTO product_slots VALUES(49,143); +INSERT INTO product_slots VALUES(49,145); +INSERT INTO product_slots VALUES(49,146); +INSERT INTO product_slots VALUES(49,147); +INSERT INTO product_slots VALUES(49,148); +INSERT INTO product_slots VALUES(49,149); +INSERT INTO product_slots VALUES(49,150); +INSERT INTO product_slots VALUES(49,151); +INSERT INTO product_slots VALUES(49,152); +INSERT INTO product_slots VALUES(49,153); +INSERT INTO product_slots VALUES(49,154); +INSERT INTO product_slots VALUES(49,155); +INSERT INTO product_slots VALUES(49,156); +INSERT INTO product_slots VALUES(49,157); +INSERT INTO product_slots VALUES(49,158); +INSERT INTO product_slots VALUES(49,159); +INSERT INTO product_slots VALUES(49,160); +INSERT INTO product_slots VALUES(49,161); +INSERT INTO product_slots VALUES(49,162); +INSERT INTO product_slots VALUES(49,163); +INSERT INTO product_slots VALUES(49,164); +INSERT INTO product_slots VALUES(49,165); +INSERT INTO product_slots VALUES(49,166); +INSERT INTO product_slots VALUES(49,167); +INSERT INTO product_slots VALUES(49,168); +INSERT INTO product_slots VALUES(49,169); +INSERT INTO product_slots VALUES(49,170); +INSERT INTO product_slots VALUES(49,171); +INSERT INTO product_slots VALUES(49,172); +INSERT INTO product_slots VALUES(49,173); +INSERT INTO product_slots VALUES(49,174); +INSERT INTO product_slots VALUES(49,175); +INSERT INTO product_slots VALUES(49,176); +INSERT INTO product_slots VALUES(49,177); +INSERT INTO product_slots VALUES(49,178); +INSERT INTO product_slots VALUES(49,179); +INSERT INTO product_slots VALUES(49,180); +INSERT INTO product_slots VALUES(49,181); +INSERT INTO product_slots VALUES(49,182); +INSERT INTO product_slots VALUES(49,183); +INSERT INTO product_slots VALUES(49,184); +INSERT INTO product_slots VALUES(49,185); +INSERT INTO product_slots VALUES(49,186); +INSERT INTO product_slots VALUES(49,187); +INSERT INTO product_slots VALUES(49,188); +INSERT INTO product_slots VALUES(49,189); +INSERT INTO product_slots VALUES(49,190); +INSERT INTO product_slots VALUES(49,191); +INSERT INTO product_slots VALUES(49,192); +INSERT INTO product_slots VALUES(49,193); +INSERT INTO product_slots VALUES(49,194); +INSERT INTO product_slots VALUES(49,195); +INSERT INTO product_slots VALUES(49,196); +INSERT INTO product_slots VALUES(49,197); +INSERT INTO product_slots VALUES(49,198); +INSERT INTO product_slots VALUES(49,199); +INSERT INTO product_slots VALUES(49,200); +INSERT INTO product_slots VALUES(49,201); +INSERT INTO product_slots VALUES(49,202); +INSERT INTO product_slots VALUES(49,203); +INSERT INTO product_slots VALUES(49,204); +INSERT INTO product_slots VALUES(49,205); +INSERT INTO product_slots VALUES(49,206); +INSERT INTO product_slots VALUES(49,207); +INSERT INTO product_slots VALUES(49,208); +INSERT INTO product_slots VALUES(49,209); +INSERT INTO product_slots VALUES(49,210); +INSERT INTO product_slots VALUES(49,211); +INSERT INTO product_slots VALUES(49,212); +INSERT INTO product_slots VALUES(49,213); +INSERT INTO product_slots VALUES(49,214); +INSERT INTO product_slots VALUES(49,215); +INSERT INTO product_slots VALUES(49,216); +INSERT INTO product_slots VALUES(49,217); +INSERT INTO product_slots VALUES(49,218); +INSERT INTO product_slots VALUES(49,219); +INSERT INTO product_slots VALUES(49,220); +INSERT INTO product_slots VALUES(49,221); +INSERT INTO product_slots VALUES(49,222); +INSERT INTO product_slots VALUES(49,223); +INSERT INTO product_slots VALUES(49,224); +INSERT INTO product_slots VALUES(49,225); +INSERT INTO product_slots VALUES(49,226); +INSERT INTO product_slots VALUES(49,227); +INSERT INTO product_slots VALUES(49,228); +INSERT INTO product_slots VALUES(49,229); +INSERT INTO product_slots VALUES(49,230); +INSERT INTO product_slots VALUES(49,231); +INSERT INTO product_slots VALUES(49,232); +INSERT INTO product_slots VALUES(49,233); +INSERT INTO product_slots VALUES(49,234); +INSERT INTO product_slots VALUES(49,235); +INSERT INTO product_slots VALUES(49,236); +INSERT INTO product_slots VALUES(49,237); +INSERT INTO product_slots VALUES(49,238); +INSERT INTO product_slots VALUES(49,239); +INSERT INTO product_slots VALUES(49,240); +INSERT INTO product_slots VALUES(49,241); +INSERT INTO product_slots VALUES(49,242); +INSERT INTO product_slots VALUES(49,243); +INSERT INTO product_slots VALUES(49,244); +INSERT INTO product_slots VALUES(49,274); +INSERT INTO product_slots VALUES(49,275); +INSERT INTO product_slots VALUES(49,279); +INSERT INTO product_slots VALUES(49,280); +INSERT INTO product_slots VALUES(49,281); +INSERT INTO product_slots VALUES(49,282); +INSERT INTO product_slots VALUES(49,283); +INSERT INTO product_slots VALUES(49,284); +INSERT INTO product_slots VALUES(49,285); +INSERT INTO product_slots VALUES(49,286); +INSERT INTO product_slots VALUES(49,287); +INSERT INTO product_slots VALUES(50,39); +INSERT INTO product_slots VALUES(50,40); +INSERT INTO product_slots VALUES(50,43); +INSERT INTO product_slots VALUES(50,45); +INSERT INTO product_slots VALUES(50,46); +INSERT INTO product_slots VALUES(50,48); +INSERT INTO product_slots VALUES(50,49); +INSERT INTO product_slots VALUES(50,51); +INSERT INTO product_slots VALUES(50,52); +INSERT INTO product_slots VALUES(50,53); +INSERT INTO product_slots VALUES(50,54); +INSERT INTO product_slots VALUES(50,57); +INSERT INTO product_slots VALUES(50,58); +INSERT INTO product_slots VALUES(50,59); +INSERT INTO product_slots VALUES(50,60); +INSERT INTO product_slots VALUES(50,61); +INSERT INTO product_slots VALUES(50,62); +INSERT INTO product_slots VALUES(50,63); +INSERT INTO product_slots VALUES(50,64); +INSERT INTO product_slots VALUES(50,65); +INSERT INTO product_slots VALUES(50,66); +INSERT INTO product_slots VALUES(50,67); +INSERT INTO product_slots VALUES(50,68); +INSERT INTO product_slots VALUES(50,69); +INSERT INTO product_slots VALUES(50,70); +INSERT INTO product_slots VALUES(50,71); +INSERT INTO product_slots VALUES(50,72); +INSERT INTO product_slots VALUES(50,73); +INSERT INTO product_slots VALUES(50,74); +INSERT INTO product_slots VALUES(50,75); +INSERT INTO product_slots VALUES(50,76); +INSERT INTO product_slots VALUES(50,77); +INSERT INTO product_slots VALUES(50,78); +INSERT INTO product_slots VALUES(50,79); +INSERT INTO product_slots VALUES(50,80); +INSERT INTO product_slots VALUES(50,81); +INSERT INTO product_slots VALUES(50,82); +INSERT INTO product_slots VALUES(50,83); +INSERT INTO product_slots VALUES(50,84); +INSERT INTO product_slots VALUES(50,85); +INSERT INTO product_slots VALUES(50,86); +INSERT INTO product_slots VALUES(50,87); +INSERT INTO product_slots VALUES(50,88); +INSERT INTO product_slots VALUES(50,89); +INSERT INTO product_slots VALUES(50,90); +INSERT INTO product_slots VALUES(50,91); +INSERT INTO product_slots VALUES(50,92); +INSERT INTO product_slots VALUES(50,93); +INSERT INTO product_slots VALUES(50,94); +INSERT INTO product_slots VALUES(50,95); +INSERT INTO product_slots VALUES(50,96); +INSERT INTO product_slots VALUES(50,97); +INSERT INTO product_slots VALUES(50,98); +INSERT INTO product_slots VALUES(50,99); +INSERT INTO product_slots VALUES(50,100); +INSERT INTO product_slots VALUES(50,102); +INSERT INTO product_slots VALUES(50,103); +INSERT INTO product_slots VALUES(50,104); +INSERT INTO product_slots VALUES(50,105); +INSERT INTO product_slots VALUES(50,106); +INSERT INTO product_slots VALUES(50,107); +INSERT INTO product_slots VALUES(50,108); +INSERT INTO product_slots VALUES(50,109); +INSERT INTO product_slots VALUES(50,110); +INSERT INTO product_slots VALUES(50,111); +INSERT INTO product_slots VALUES(50,112); +INSERT INTO product_slots VALUES(50,113); +INSERT INTO product_slots VALUES(50,114); +INSERT INTO product_slots VALUES(50,115); +INSERT INTO product_slots VALUES(50,117); +INSERT INTO product_slots VALUES(50,118); +INSERT INTO product_slots VALUES(50,119); +INSERT INTO product_slots VALUES(50,120); +INSERT INTO product_slots VALUES(50,121); +INSERT INTO product_slots VALUES(50,122); +INSERT INTO product_slots VALUES(50,123); +INSERT INTO product_slots VALUES(50,124); +INSERT INTO product_slots VALUES(50,125); +INSERT INTO product_slots VALUES(50,126); +INSERT INTO product_slots VALUES(50,127); +INSERT INTO product_slots VALUES(50,128); +INSERT INTO product_slots VALUES(50,129); +INSERT INTO product_slots VALUES(50,130); +INSERT INTO product_slots VALUES(50,131); +INSERT INTO product_slots VALUES(50,132); +INSERT INTO product_slots VALUES(50,133); +INSERT INTO product_slots VALUES(50,134); +INSERT INTO product_slots VALUES(50,135); +INSERT INTO product_slots VALUES(50,136); +INSERT INTO product_slots VALUES(50,138); +INSERT INTO product_slots VALUES(50,139); +INSERT INTO product_slots VALUES(50,140); +INSERT INTO product_slots VALUES(50,141); +INSERT INTO product_slots VALUES(50,142); +INSERT INTO product_slots VALUES(50,143); +INSERT INTO product_slots VALUES(50,145); +INSERT INTO product_slots VALUES(50,146); +INSERT INTO product_slots VALUES(50,147); +INSERT INTO product_slots VALUES(50,148); +INSERT INTO product_slots VALUES(50,149); +INSERT INTO product_slots VALUES(50,150); +INSERT INTO product_slots VALUES(50,151); +INSERT INTO product_slots VALUES(50,152); +INSERT INTO product_slots VALUES(50,153); +INSERT INTO product_slots VALUES(50,154); +INSERT INTO product_slots VALUES(50,155); +INSERT INTO product_slots VALUES(50,156); +INSERT INTO product_slots VALUES(50,157); +INSERT INTO product_slots VALUES(50,158); +INSERT INTO product_slots VALUES(50,159); +INSERT INTO product_slots VALUES(50,160); +INSERT INTO product_slots VALUES(50,161); +INSERT INTO product_slots VALUES(50,162); +INSERT INTO product_slots VALUES(50,163); +INSERT INTO product_slots VALUES(50,164); +INSERT INTO product_slots VALUES(50,165); +INSERT INTO product_slots VALUES(50,166); +INSERT INTO product_slots VALUES(50,167); +INSERT INTO product_slots VALUES(50,168); +INSERT INTO product_slots VALUES(50,169); +INSERT INTO product_slots VALUES(50,170); +INSERT INTO product_slots VALUES(50,171); +INSERT INTO product_slots VALUES(50,172); +INSERT INTO product_slots VALUES(50,173); +INSERT INTO product_slots VALUES(50,174); +INSERT INTO product_slots VALUES(50,175); +INSERT INTO product_slots VALUES(50,176); +INSERT INTO product_slots VALUES(50,177); +INSERT INTO product_slots VALUES(50,178); +INSERT INTO product_slots VALUES(50,179); +INSERT INTO product_slots VALUES(50,180); +INSERT INTO product_slots VALUES(50,181); +INSERT INTO product_slots VALUES(50,182); +INSERT INTO product_slots VALUES(50,183); +INSERT INTO product_slots VALUES(50,184); +INSERT INTO product_slots VALUES(50,185); +INSERT INTO product_slots VALUES(50,186); +INSERT INTO product_slots VALUES(50,187); +INSERT INTO product_slots VALUES(50,188); +INSERT INTO product_slots VALUES(50,189); +INSERT INTO product_slots VALUES(50,190); +INSERT INTO product_slots VALUES(50,191); +INSERT INTO product_slots VALUES(50,192); +INSERT INTO product_slots VALUES(50,193); +INSERT INTO product_slots VALUES(50,194); +INSERT INTO product_slots VALUES(50,195); +INSERT INTO product_slots VALUES(50,196); +INSERT INTO product_slots VALUES(50,197); +INSERT INTO product_slots VALUES(50,198); +INSERT INTO product_slots VALUES(50,199); +INSERT INTO product_slots VALUES(50,200); +INSERT INTO product_slots VALUES(50,201); +INSERT INTO product_slots VALUES(50,202); +INSERT INTO product_slots VALUES(50,203); +INSERT INTO product_slots VALUES(50,204); +INSERT INTO product_slots VALUES(50,205); +INSERT INTO product_slots VALUES(50,206); +INSERT INTO product_slots VALUES(50,207); +INSERT INTO product_slots VALUES(50,208); +INSERT INTO product_slots VALUES(50,209); +INSERT INTO product_slots VALUES(50,210); +INSERT INTO product_slots VALUES(50,211); +INSERT INTO product_slots VALUES(50,212); +INSERT INTO product_slots VALUES(50,213); +INSERT INTO product_slots VALUES(50,214); +INSERT INTO product_slots VALUES(50,215); +INSERT INTO product_slots VALUES(50,216); +INSERT INTO product_slots VALUES(50,217); +INSERT INTO product_slots VALUES(50,218); +INSERT INTO product_slots VALUES(50,219); +INSERT INTO product_slots VALUES(50,220); +INSERT INTO product_slots VALUES(50,221); +INSERT INTO product_slots VALUES(50,222); +INSERT INTO product_slots VALUES(50,223); +INSERT INTO product_slots VALUES(50,224); +INSERT INTO product_slots VALUES(50,225); +INSERT INTO product_slots VALUES(50,226); +INSERT INTO product_slots VALUES(50,227); +INSERT INTO product_slots VALUES(50,228); +INSERT INTO product_slots VALUES(50,229); +INSERT INTO product_slots VALUES(50,230); +INSERT INTO product_slots VALUES(50,231); +INSERT INTO product_slots VALUES(50,232); +INSERT INTO product_slots VALUES(50,233); +INSERT INTO product_slots VALUES(50,234); +INSERT INTO product_slots VALUES(50,235); +INSERT INTO product_slots VALUES(50,236); +INSERT INTO product_slots VALUES(50,237); +INSERT INTO product_slots VALUES(50,238); +INSERT INTO product_slots VALUES(50,239); +INSERT INTO product_slots VALUES(50,240); +INSERT INTO product_slots VALUES(50,241); +INSERT INTO product_slots VALUES(50,242); +INSERT INTO product_slots VALUES(50,243); +INSERT INTO product_slots VALUES(50,244); +INSERT INTO product_slots VALUES(50,274); +INSERT INTO product_slots VALUES(50,275); +INSERT INTO product_slots VALUES(50,279); +INSERT INTO product_slots VALUES(50,280); +INSERT INTO product_slots VALUES(50,281); +INSERT INTO product_slots VALUES(50,282); +INSERT INTO product_slots VALUES(50,283); +INSERT INTO product_slots VALUES(50,284); +INSERT INTO product_slots VALUES(50,285); +INSERT INTO product_slots VALUES(50,286); +INSERT INTO product_slots VALUES(50,287); +INSERT INTO product_slots VALUES(51,40); +INSERT INTO product_slots VALUES(51,64); +INSERT INTO product_slots VALUES(51,65); +INSERT INTO product_slots VALUES(51,66); +INSERT INTO product_slots VALUES(51,67); +INSERT INTO product_slots VALUES(51,68); +INSERT INTO product_slots VALUES(51,69); +INSERT INTO product_slots VALUES(51,70); +INSERT INTO product_slots VALUES(51,71); +INSERT INTO product_slots VALUES(51,72); +INSERT INTO product_slots VALUES(51,73); +INSERT INTO product_slots VALUES(51,74); +INSERT INTO product_slots VALUES(51,75); +INSERT INTO product_slots VALUES(51,76); +INSERT INTO product_slots VALUES(51,77); +INSERT INTO product_slots VALUES(51,78); +INSERT INTO product_slots VALUES(51,79); +INSERT INTO product_slots VALUES(51,80); +INSERT INTO product_slots VALUES(51,81); +INSERT INTO product_slots VALUES(51,82); +INSERT INTO product_slots VALUES(51,83); +INSERT INTO product_slots VALUES(51,84); +INSERT INTO product_slots VALUES(51,85); +INSERT INTO product_slots VALUES(51,86); +INSERT INTO product_slots VALUES(51,87); +INSERT INTO product_slots VALUES(51,88); +INSERT INTO product_slots VALUES(51,89); +INSERT INTO product_slots VALUES(51,90); +INSERT INTO product_slots VALUES(51,91); +INSERT INTO product_slots VALUES(51,92); +INSERT INTO product_slots VALUES(51,93); +INSERT INTO product_slots VALUES(51,94); +INSERT INTO product_slots VALUES(51,95); +INSERT INTO product_slots VALUES(51,96); +INSERT INTO product_slots VALUES(51,97); +INSERT INTO product_slots VALUES(51,98); +INSERT INTO product_slots VALUES(51,99); +INSERT INTO product_slots VALUES(51,100); +INSERT INTO product_slots VALUES(51,102); +INSERT INTO product_slots VALUES(51,103); +INSERT INTO product_slots VALUES(51,104); +INSERT INTO product_slots VALUES(51,105); +INSERT INTO product_slots VALUES(51,106); +INSERT INTO product_slots VALUES(51,107); +INSERT INTO product_slots VALUES(51,108); +INSERT INTO product_slots VALUES(51,109); +INSERT INTO product_slots VALUES(51,110); +INSERT INTO product_slots VALUES(51,111); +INSERT INTO product_slots VALUES(51,112); +INSERT INTO product_slots VALUES(51,113); +INSERT INTO product_slots VALUES(51,114); +INSERT INTO product_slots VALUES(51,115); +INSERT INTO product_slots VALUES(51,117); +INSERT INTO product_slots VALUES(51,118); +INSERT INTO product_slots VALUES(51,119); +INSERT INTO product_slots VALUES(51,120); +INSERT INTO product_slots VALUES(51,121); +INSERT INTO product_slots VALUES(51,122); +INSERT INTO product_slots VALUES(51,123); +INSERT INTO product_slots VALUES(51,124); +INSERT INTO product_slots VALUES(51,125); +INSERT INTO product_slots VALUES(51,126); +INSERT INTO product_slots VALUES(51,127); +INSERT INTO product_slots VALUES(51,128); +INSERT INTO product_slots VALUES(51,129); +INSERT INTO product_slots VALUES(51,130); +INSERT INTO product_slots VALUES(51,131); +INSERT INTO product_slots VALUES(51,132); +INSERT INTO product_slots VALUES(51,133); +INSERT INTO product_slots VALUES(51,134); +INSERT INTO product_slots VALUES(51,135); +INSERT INTO product_slots VALUES(51,136); +INSERT INTO product_slots VALUES(51,138); +INSERT INTO product_slots VALUES(51,139); +INSERT INTO product_slots VALUES(51,140); +INSERT INTO product_slots VALUES(51,141); +INSERT INTO product_slots VALUES(51,142); +INSERT INTO product_slots VALUES(51,143); +INSERT INTO product_slots VALUES(51,145); +INSERT INTO product_slots VALUES(51,146); +INSERT INTO product_slots VALUES(51,147); +INSERT INTO product_slots VALUES(51,148); +INSERT INTO product_slots VALUES(51,149); +INSERT INTO product_slots VALUES(51,150); +INSERT INTO product_slots VALUES(51,151); +INSERT INTO product_slots VALUES(51,152); +INSERT INTO product_slots VALUES(51,153); +INSERT INTO product_slots VALUES(51,154); +INSERT INTO product_slots VALUES(51,155); +INSERT INTO product_slots VALUES(51,156); +INSERT INTO product_slots VALUES(51,157); +INSERT INTO product_slots VALUES(51,158); +INSERT INTO product_slots VALUES(51,159); +INSERT INTO product_slots VALUES(51,160); +INSERT INTO product_slots VALUES(51,161); +INSERT INTO product_slots VALUES(51,162); +INSERT INTO product_slots VALUES(51,163); +INSERT INTO product_slots VALUES(51,164); +INSERT INTO product_slots VALUES(51,165); +INSERT INTO product_slots VALUES(51,166); +INSERT INTO product_slots VALUES(51,167); +INSERT INTO product_slots VALUES(51,168); +INSERT INTO product_slots VALUES(51,169); +INSERT INTO product_slots VALUES(51,170); +INSERT INTO product_slots VALUES(51,171); +INSERT INTO product_slots VALUES(51,172); +INSERT INTO product_slots VALUES(51,173); +INSERT INTO product_slots VALUES(51,174); +INSERT INTO product_slots VALUES(51,175); +INSERT INTO product_slots VALUES(51,176); +INSERT INTO product_slots VALUES(51,177); +INSERT INTO product_slots VALUES(51,178); +INSERT INTO product_slots VALUES(51,179); +INSERT INTO product_slots VALUES(51,180); +INSERT INTO product_slots VALUES(51,181); +INSERT INTO product_slots VALUES(51,182); +INSERT INTO product_slots VALUES(51,183); +INSERT INTO product_slots VALUES(51,184); +INSERT INTO product_slots VALUES(51,185); +INSERT INTO product_slots VALUES(51,186); +INSERT INTO product_slots VALUES(51,187); +INSERT INTO product_slots VALUES(51,188); +INSERT INTO product_slots VALUES(51,189); +INSERT INTO product_slots VALUES(51,190); +INSERT INTO product_slots VALUES(51,191); +INSERT INTO product_slots VALUES(51,192); +INSERT INTO product_slots VALUES(51,193); +INSERT INTO product_slots VALUES(51,194); +INSERT INTO product_slots VALUES(51,195); +INSERT INTO product_slots VALUES(51,196); +INSERT INTO product_slots VALUES(51,197); +INSERT INTO product_slots VALUES(51,198); +INSERT INTO product_slots VALUES(51,199); +INSERT INTO product_slots VALUES(51,200); +INSERT INTO product_slots VALUES(51,201); +INSERT INTO product_slots VALUES(51,202); +INSERT INTO product_slots VALUES(51,203); +INSERT INTO product_slots VALUES(51,204); +INSERT INTO product_slots VALUES(51,205); +INSERT INTO product_slots VALUES(51,206); +INSERT INTO product_slots VALUES(51,207); +INSERT INTO product_slots VALUES(51,208); +INSERT INTO product_slots VALUES(51,209); +INSERT INTO product_slots VALUES(51,210); +INSERT INTO product_slots VALUES(51,211); +INSERT INTO product_slots VALUES(51,212); +INSERT INTO product_slots VALUES(51,213); +INSERT INTO product_slots VALUES(51,214); +INSERT INTO product_slots VALUES(51,215); +INSERT INTO product_slots VALUES(51,216); +INSERT INTO product_slots VALUES(51,217); +INSERT INTO product_slots VALUES(51,218); +INSERT INTO product_slots VALUES(51,219); +INSERT INTO product_slots VALUES(51,220); +INSERT INTO product_slots VALUES(51,221); +INSERT INTO product_slots VALUES(51,222); +INSERT INTO product_slots VALUES(51,223); +INSERT INTO product_slots VALUES(51,224); +INSERT INTO product_slots VALUES(51,225); +INSERT INTO product_slots VALUES(51,226); +INSERT INTO product_slots VALUES(51,227); +INSERT INTO product_slots VALUES(51,228); +INSERT INTO product_slots VALUES(51,229); +INSERT INTO product_slots VALUES(51,230); +INSERT INTO product_slots VALUES(51,231); +INSERT INTO product_slots VALUES(51,232); +INSERT INTO product_slots VALUES(51,233); +INSERT INTO product_slots VALUES(51,234); +INSERT INTO product_slots VALUES(51,235); +INSERT INTO product_slots VALUES(51,236); +INSERT INTO product_slots VALUES(51,237); +INSERT INTO product_slots VALUES(51,238); +INSERT INTO product_slots VALUES(51,239); +INSERT INTO product_slots VALUES(51,240); +INSERT INTO product_slots VALUES(51,241); +INSERT INTO product_slots VALUES(51,242); +INSERT INTO product_slots VALUES(51,243); +INSERT INTO product_slots VALUES(51,244); +INSERT INTO product_slots VALUES(51,274); +INSERT INTO product_slots VALUES(51,275); +INSERT INTO product_slots VALUES(51,279); +INSERT INTO product_slots VALUES(51,280); +INSERT INTO product_slots VALUES(51,281); +INSERT INTO product_slots VALUES(51,282); +INSERT INTO product_slots VALUES(51,283); +INSERT INTO product_slots VALUES(51,284); +INSERT INTO product_slots VALUES(51,285); +INSERT INTO product_slots VALUES(51,286); +INSERT INTO product_slots VALUES(51,287); +INSERT INTO product_slots VALUES(52,40); +INSERT INTO product_slots VALUES(52,64); +INSERT INTO product_slots VALUES(52,65); +INSERT INTO product_slots VALUES(52,66); +INSERT INTO product_slots VALUES(52,67); +INSERT INTO product_slots VALUES(52,68); +INSERT INTO product_slots VALUES(52,69); +INSERT INTO product_slots VALUES(52,70); +INSERT INTO product_slots VALUES(52,71); +INSERT INTO product_slots VALUES(52,72); +INSERT INTO product_slots VALUES(52,73); +INSERT INTO product_slots VALUES(52,74); +INSERT INTO product_slots VALUES(52,75); +INSERT INTO product_slots VALUES(52,76); +INSERT INTO product_slots VALUES(52,77); +INSERT INTO product_slots VALUES(52,78); +INSERT INTO product_slots VALUES(52,79); +INSERT INTO product_slots VALUES(52,80); +INSERT INTO product_slots VALUES(52,81); +INSERT INTO product_slots VALUES(52,82); +INSERT INTO product_slots VALUES(52,83); +INSERT INTO product_slots VALUES(52,84); +INSERT INTO product_slots VALUES(52,85); +INSERT INTO product_slots VALUES(52,86); +INSERT INTO product_slots VALUES(52,87); +INSERT INTO product_slots VALUES(52,88); +INSERT INTO product_slots VALUES(52,89); +INSERT INTO product_slots VALUES(52,90); +INSERT INTO product_slots VALUES(52,91); +INSERT INTO product_slots VALUES(52,92); +INSERT INTO product_slots VALUES(52,93); +INSERT INTO product_slots VALUES(52,94); +INSERT INTO product_slots VALUES(52,95); +INSERT INTO product_slots VALUES(52,96); +INSERT INTO product_slots VALUES(52,97); +INSERT INTO product_slots VALUES(52,98); +INSERT INTO product_slots VALUES(52,99); +INSERT INTO product_slots VALUES(52,100); +INSERT INTO product_slots VALUES(52,102); +INSERT INTO product_slots VALUES(52,103); +INSERT INTO product_slots VALUES(52,104); +INSERT INTO product_slots VALUES(52,105); +INSERT INTO product_slots VALUES(52,106); +INSERT INTO product_slots VALUES(52,107); +INSERT INTO product_slots VALUES(52,108); +INSERT INTO product_slots VALUES(52,109); +INSERT INTO product_slots VALUES(52,110); +INSERT INTO product_slots VALUES(52,111); +INSERT INTO product_slots VALUES(52,112); +INSERT INTO product_slots VALUES(52,113); +INSERT INTO product_slots VALUES(52,114); +INSERT INTO product_slots VALUES(52,115); +INSERT INTO product_slots VALUES(52,117); +INSERT INTO product_slots VALUES(52,118); +INSERT INTO product_slots VALUES(52,119); +INSERT INTO product_slots VALUES(52,120); +INSERT INTO product_slots VALUES(52,121); +INSERT INTO product_slots VALUES(52,122); +INSERT INTO product_slots VALUES(52,123); +INSERT INTO product_slots VALUES(52,124); +INSERT INTO product_slots VALUES(52,125); +INSERT INTO product_slots VALUES(52,126); +INSERT INTO product_slots VALUES(52,127); +INSERT INTO product_slots VALUES(52,128); +INSERT INTO product_slots VALUES(52,129); +INSERT INTO product_slots VALUES(52,130); +INSERT INTO product_slots VALUES(52,131); +INSERT INTO product_slots VALUES(52,132); +INSERT INTO product_slots VALUES(52,133); +INSERT INTO product_slots VALUES(52,134); +INSERT INTO product_slots VALUES(52,135); +INSERT INTO product_slots VALUES(52,136); +INSERT INTO product_slots VALUES(52,138); +INSERT INTO product_slots VALUES(52,139); +INSERT INTO product_slots VALUES(52,140); +INSERT INTO product_slots VALUES(52,141); +INSERT INTO product_slots VALUES(52,142); +INSERT INTO product_slots VALUES(52,143); +INSERT INTO product_slots VALUES(52,145); +INSERT INTO product_slots VALUES(52,146); +INSERT INTO product_slots VALUES(52,147); +INSERT INTO product_slots VALUES(52,148); +INSERT INTO product_slots VALUES(52,149); +INSERT INTO product_slots VALUES(52,150); +INSERT INTO product_slots VALUES(52,151); +INSERT INTO product_slots VALUES(52,152); +INSERT INTO product_slots VALUES(52,153); +INSERT INTO product_slots VALUES(52,154); +INSERT INTO product_slots VALUES(52,155); +INSERT INTO product_slots VALUES(52,156); +INSERT INTO product_slots VALUES(52,157); +INSERT INTO product_slots VALUES(52,158); +INSERT INTO product_slots VALUES(52,159); +INSERT INTO product_slots VALUES(52,160); +INSERT INTO product_slots VALUES(52,161); +INSERT INTO product_slots VALUES(52,162); +INSERT INTO product_slots VALUES(52,163); +INSERT INTO product_slots VALUES(52,164); +INSERT INTO product_slots VALUES(52,165); +INSERT INTO product_slots VALUES(52,166); +INSERT INTO product_slots VALUES(52,167); +INSERT INTO product_slots VALUES(52,168); +INSERT INTO product_slots VALUES(52,169); +INSERT INTO product_slots VALUES(52,170); +INSERT INTO product_slots VALUES(52,171); +INSERT INTO product_slots VALUES(52,172); +INSERT INTO product_slots VALUES(52,173); +INSERT INTO product_slots VALUES(52,174); +INSERT INTO product_slots VALUES(52,175); +INSERT INTO product_slots VALUES(52,176); +INSERT INTO product_slots VALUES(52,177); +INSERT INTO product_slots VALUES(52,178); +INSERT INTO product_slots VALUES(52,179); +INSERT INTO product_slots VALUES(52,180); +INSERT INTO product_slots VALUES(52,181); +INSERT INTO product_slots VALUES(52,182); +INSERT INTO product_slots VALUES(52,183); +INSERT INTO product_slots VALUES(52,184); +INSERT INTO product_slots VALUES(52,185); +INSERT INTO product_slots VALUES(52,186); +INSERT INTO product_slots VALUES(52,187); +INSERT INTO product_slots VALUES(52,188); +INSERT INTO product_slots VALUES(52,189); +INSERT INTO product_slots VALUES(52,190); +INSERT INTO product_slots VALUES(52,191); +INSERT INTO product_slots VALUES(52,192); +INSERT INTO product_slots VALUES(52,193); +INSERT INTO product_slots VALUES(52,194); +INSERT INTO product_slots VALUES(52,195); +INSERT INTO product_slots VALUES(52,196); +INSERT INTO product_slots VALUES(52,197); +INSERT INTO product_slots VALUES(52,198); +INSERT INTO product_slots VALUES(52,199); +INSERT INTO product_slots VALUES(52,200); +INSERT INTO product_slots VALUES(52,201); +INSERT INTO product_slots VALUES(52,202); +INSERT INTO product_slots VALUES(52,203); +INSERT INTO product_slots VALUES(52,204); +INSERT INTO product_slots VALUES(52,205); +INSERT INTO product_slots VALUES(52,206); +INSERT INTO product_slots VALUES(52,207); +INSERT INTO product_slots VALUES(52,208); +INSERT INTO product_slots VALUES(52,209); +INSERT INTO product_slots VALUES(52,210); +INSERT INTO product_slots VALUES(52,211); +INSERT INTO product_slots VALUES(52,212); +INSERT INTO product_slots VALUES(52,213); +INSERT INTO product_slots VALUES(52,214); +INSERT INTO product_slots VALUES(52,215); +INSERT INTO product_slots VALUES(52,216); +INSERT INTO product_slots VALUES(52,217); +INSERT INTO product_slots VALUES(52,218); +INSERT INTO product_slots VALUES(52,219); +INSERT INTO product_slots VALUES(52,220); +INSERT INTO product_slots VALUES(52,221); +INSERT INTO product_slots VALUES(52,222); +INSERT INTO product_slots VALUES(52,223); +INSERT INTO product_slots VALUES(52,224); +INSERT INTO product_slots VALUES(52,225); +INSERT INTO product_slots VALUES(52,226); +INSERT INTO product_slots VALUES(52,227); +INSERT INTO product_slots VALUES(52,228); +INSERT INTO product_slots VALUES(52,229); +INSERT INTO product_slots VALUES(52,230); +INSERT INTO product_slots VALUES(52,231); +INSERT INTO product_slots VALUES(52,232); +INSERT INTO product_slots VALUES(52,233); +INSERT INTO product_slots VALUES(52,234); +INSERT INTO product_slots VALUES(52,235); +INSERT INTO product_slots VALUES(52,236); +INSERT INTO product_slots VALUES(52,237); +INSERT INTO product_slots VALUES(52,238); +INSERT INTO product_slots VALUES(52,239); +INSERT INTO product_slots VALUES(52,240); +INSERT INTO product_slots VALUES(52,241); +INSERT INTO product_slots VALUES(52,242); +INSERT INTO product_slots VALUES(52,243); +INSERT INTO product_slots VALUES(52,244); +INSERT INTO product_slots VALUES(52,274); +INSERT INTO product_slots VALUES(52,275); +INSERT INTO product_slots VALUES(52,279); +INSERT INTO product_slots VALUES(52,280); +INSERT INTO product_slots VALUES(52,281); +INSERT INTO product_slots VALUES(52,282); +INSERT INTO product_slots VALUES(52,283); +INSERT INTO product_slots VALUES(52,284); +INSERT INTO product_slots VALUES(52,285); +INSERT INTO product_slots VALUES(52,286); +INSERT INTO product_slots VALUES(52,287); +INSERT INTO product_slots VALUES(53,39); +INSERT INTO product_slots VALUES(53,40); +INSERT INTO product_slots VALUES(53,43); +INSERT INTO product_slots VALUES(53,45); +INSERT INTO product_slots VALUES(53,46); +INSERT INTO product_slots VALUES(53,48); +INSERT INTO product_slots VALUES(53,49); +INSERT INTO product_slots VALUES(53,51); +INSERT INTO product_slots VALUES(53,52); +INSERT INTO product_slots VALUES(53,53); +INSERT INTO product_slots VALUES(53,54); +INSERT INTO product_slots VALUES(53,57); +INSERT INTO product_slots VALUES(53,58); +INSERT INTO product_slots VALUES(53,59); +INSERT INTO product_slots VALUES(53,60); +INSERT INTO product_slots VALUES(53,61); +INSERT INTO product_slots VALUES(53,62); +INSERT INTO product_slots VALUES(53,63); +INSERT INTO product_slots VALUES(53,64); +INSERT INTO product_slots VALUES(53,65); +INSERT INTO product_slots VALUES(53,66); +INSERT INTO product_slots VALUES(53,67); +INSERT INTO product_slots VALUES(53,68); +INSERT INTO product_slots VALUES(53,69); +INSERT INTO product_slots VALUES(53,70); +INSERT INTO product_slots VALUES(53,71); +INSERT INTO product_slots VALUES(53,72); +INSERT INTO product_slots VALUES(53,73); +INSERT INTO product_slots VALUES(53,74); +INSERT INTO product_slots VALUES(53,75); +INSERT INTO product_slots VALUES(53,76); +INSERT INTO product_slots VALUES(53,77); +INSERT INTO product_slots VALUES(53,78); +INSERT INTO product_slots VALUES(53,79); +INSERT INTO product_slots VALUES(53,80); +INSERT INTO product_slots VALUES(53,81); +INSERT INTO product_slots VALUES(53,82); +INSERT INTO product_slots VALUES(53,83); +INSERT INTO product_slots VALUES(53,84); +INSERT INTO product_slots VALUES(53,85); +INSERT INTO product_slots VALUES(53,86); +INSERT INTO product_slots VALUES(53,87); +INSERT INTO product_slots VALUES(53,88); +INSERT INTO product_slots VALUES(53,89); +INSERT INTO product_slots VALUES(53,90); +INSERT INTO product_slots VALUES(53,91); +INSERT INTO product_slots VALUES(53,92); +INSERT INTO product_slots VALUES(53,93); +INSERT INTO product_slots VALUES(53,94); +INSERT INTO product_slots VALUES(53,95); +INSERT INTO product_slots VALUES(53,96); +INSERT INTO product_slots VALUES(53,97); +INSERT INTO product_slots VALUES(53,98); +INSERT INTO product_slots VALUES(53,99); +INSERT INTO product_slots VALUES(53,100); +INSERT INTO product_slots VALUES(53,102); +INSERT INTO product_slots VALUES(53,103); +INSERT INTO product_slots VALUES(53,104); +INSERT INTO product_slots VALUES(53,105); +INSERT INTO product_slots VALUES(53,106); +INSERT INTO product_slots VALUES(53,107); +INSERT INTO product_slots VALUES(53,108); +INSERT INTO product_slots VALUES(53,109); +INSERT INTO product_slots VALUES(53,110); +INSERT INTO product_slots VALUES(53,111); +INSERT INTO product_slots VALUES(53,112); +INSERT INTO product_slots VALUES(53,113); +INSERT INTO product_slots VALUES(53,114); +INSERT INTO product_slots VALUES(53,115); +INSERT INTO product_slots VALUES(53,117); +INSERT INTO product_slots VALUES(53,118); +INSERT INTO product_slots VALUES(53,119); +INSERT INTO product_slots VALUES(53,120); +INSERT INTO product_slots VALUES(53,121); +INSERT INTO product_slots VALUES(53,122); +INSERT INTO product_slots VALUES(53,123); +INSERT INTO product_slots VALUES(53,124); +INSERT INTO product_slots VALUES(53,125); +INSERT INTO product_slots VALUES(53,126); +INSERT INTO product_slots VALUES(53,127); +INSERT INTO product_slots VALUES(53,128); +INSERT INTO product_slots VALUES(53,129); +INSERT INTO product_slots VALUES(53,130); +INSERT INTO product_slots VALUES(53,131); +INSERT INTO product_slots VALUES(53,132); +INSERT INTO product_slots VALUES(53,133); +INSERT INTO product_slots VALUES(53,134); +INSERT INTO product_slots VALUES(53,135); +INSERT INTO product_slots VALUES(53,136); +INSERT INTO product_slots VALUES(53,138); +INSERT INTO product_slots VALUES(53,139); +INSERT INTO product_slots VALUES(53,140); +INSERT INTO product_slots VALUES(53,141); +INSERT INTO product_slots VALUES(53,142); +INSERT INTO product_slots VALUES(53,143); +INSERT INTO product_slots VALUES(53,145); +INSERT INTO product_slots VALUES(53,146); +INSERT INTO product_slots VALUES(53,147); +INSERT INTO product_slots VALUES(53,148); +INSERT INTO product_slots VALUES(53,149); +INSERT INTO product_slots VALUES(53,150); +INSERT INTO product_slots VALUES(53,151); +INSERT INTO product_slots VALUES(53,152); +INSERT INTO product_slots VALUES(53,153); +INSERT INTO product_slots VALUES(53,154); +INSERT INTO product_slots VALUES(53,155); +INSERT INTO product_slots VALUES(53,156); +INSERT INTO product_slots VALUES(53,157); +INSERT INTO product_slots VALUES(53,158); +INSERT INTO product_slots VALUES(53,159); +INSERT INTO product_slots VALUES(53,160); +INSERT INTO product_slots VALUES(53,161); +INSERT INTO product_slots VALUES(53,162); +INSERT INTO product_slots VALUES(53,163); +INSERT INTO product_slots VALUES(53,164); +INSERT INTO product_slots VALUES(53,165); +INSERT INTO product_slots VALUES(53,166); +INSERT INTO product_slots VALUES(53,167); +INSERT INTO product_slots VALUES(53,168); +INSERT INTO product_slots VALUES(53,169); +INSERT INTO product_slots VALUES(53,170); +INSERT INTO product_slots VALUES(53,171); +INSERT INTO product_slots VALUES(53,172); +INSERT INTO product_slots VALUES(53,173); +INSERT INTO product_slots VALUES(53,174); +INSERT INTO product_slots VALUES(53,175); +INSERT INTO product_slots VALUES(53,176); +INSERT INTO product_slots VALUES(53,177); +INSERT INTO product_slots VALUES(53,178); +INSERT INTO product_slots VALUES(53,179); +INSERT INTO product_slots VALUES(53,180); +INSERT INTO product_slots VALUES(53,181); +INSERT INTO product_slots VALUES(53,182); +INSERT INTO product_slots VALUES(53,183); +INSERT INTO product_slots VALUES(53,184); +INSERT INTO product_slots VALUES(53,185); +INSERT INTO product_slots VALUES(53,186); +INSERT INTO product_slots VALUES(53,187); +INSERT INTO product_slots VALUES(53,188); +INSERT INTO product_slots VALUES(53,189); +INSERT INTO product_slots VALUES(53,190); +INSERT INTO product_slots VALUES(53,191); +INSERT INTO product_slots VALUES(53,192); +INSERT INTO product_slots VALUES(53,193); +INSERT INTO product_slots VALUES(53,194); +INSERT INTO product_slots VALUES(53,195); +INSERT INTO product_slots VALUES(53,196); +INSERT INTO product_slots VALUES(53,197); +INSERT INTO product_slots VALUES(53,198); +INSERT INTO product_slots VALUES(53,199); +INSERT INTO product_slots VALUES(53,200); +INSERT INTO product_slots VALUES(53,201); +INSERT INTO product_slots VALUES(53,202); +INSERT INTO product_slots VALUES(53,203); +INSERT INTO product_slots VALUES(53,204); +INSERT INTO product_slots VALUES(53,205); +INSERT INTO product_slots VALUES(53,206); +INSERT INTO product_slots VALUES(53,207); +INSERT INTO product_slots VALUES(53,208); +INSERT INTO product_slots VALUES(53,209); +INSERT INTO product_slots VALUES(53,210); +INSERT INTO product_slots VALUES(53,211); +INSERT INTO product_slots VALUES(53,212); +INSERT INTO product_slots VALUES(53,213); +INSERT INTO product_slots VALUES(53,214); +INSERT INTO product_slots VALUES(53,215); +INSERT INTO product_slots VALUES(53,216); +INSERT INTO product_slots VALUES(53,217); +INSERT INTO product_slots VALUES(53,218); +INSERT INTO product_slots VALUES(53,219); +INSERT INTO product_slots VALUES(53,220); +INSERT INTO product_slots VALUES(53,221); +INSERT INTO product_slots VALUES(53,222); +INSERT INTO product_slots VALUES(53,223); +INSERT INTO product_slots VALUES(53,224); +INSERT INTO product_slots VALUES(53,225); +INSERT INTO product_slots VALUES(53,226); +INSERT INTO product_slots VALUES(53,227); +INSERT INTO product_slots VALUES(53,228); +INSERT INTO product_slots VALUES(53,229); +INSERT INTO product_slots VALUES(53,230); +INSERT INTO product_slots VALUES(53,231); +INSERT INTO product_slots VALUES(53,232); +INSERT INTO product_slots VALUES(53,233); +INSERT INTO product_slots VALUES(53,234); +INSERT INTO product_slots VALUES(53,235); +INSERT INTO product_slots VALUES(53,236); +INSERT INTO product_slots VALUES(53,237); +INSERT INTO product_slots VALUES(53,238); +INSERT INTO product_slots VALUES(53,239); +INSERT INTO product_slots VALUES(53,240); +INSERT INTO product_slots VALUES(53,241); +INSERT INTO product_slots VALUES(53,242); +INSERT INTO product_slots VALUES(53,243); +INSERT INTO product_slots VALUES(53,244); +INSERT INTO product_slots VALUES(53,274); +INSERT INTO product_slots VALUES(53,275); +INSERT INTO product_slots VALUES(53,279); +INSERT INTO product_slots VALUES(53,280); +INSERT INTO product_slots VALUES(53,281); +INSERT INTO product_slots VALUES(53,282); +INSERT INTO product_slots VALUES(53,283); +INSERT INTO product_slots VALUES(53,284); +INSERT INTO product_slots VALUES(53,285); +INSERT INTO product_slots VALUES(53,286); +INSERT INTO product_slots VALUES(53,287); +INSERT INTO product_slots VALUES(54,40); +INSERT INTO product_slots VALUES(54,62); +INSERT INTO product_slots VALUES(54,63); +INSERT INTO product_slots VALUES(54,64); +INSERT INTO product_slots VALUES(54,65); +INSERT INTO product_slots VALUES(54,66); +INSERT INTO product_slots VALUES(54,67); +INSERT INTO product_slots VALUES(54,68); +INSERT INTO product_slots VALUES(54,69); +INSERT INTO product_slots VALUES(54,70); +INSERT INTO product_slots VALUES(54,71); +INSERT INTO product_slots VALUES(54,72); +INSERT INTO product_slots VALUES(54,73); +INSERT INTO product_slots VALUES(54,74); +INSERT INTO product_slots VALUES(54,75); +INSERT INTO product_slots VALUES(54,76); +INSERT INTO product_slots VALUES(54,77); +INSERT INTO product_slots VALUES(54,78); +INSERT INTO product_slots VALUES(54,79); +INSERT INTO product_slots VALUES(54,80); +INSERT INTO product_slots VALUES(54,81); +INSERT INTO product_slots VALUES(54,82); +INSERT INTO product_slots VALUES(54,83); +INSERT INTO product_slots VALUES(54,84); +INSERT INTO product_slots VALUES(54,85); +INSERT INTO product_slots VALUES(54,86); +INSERT INTO product_slots VALUES(54,87); +INSERT INTO product_slots VALUES(54,88); +INSERT INTO product_slots VALUES(54,89); +INSERT INTO product_slots VALUES(54,90); +INSERT INTO product_slots VALUES(54,91); +INSERT INTO product_slots VALUES(54,92); +INSERT INTO product_slots VALUES(54,93); +INSERT INTO product_slots VALUES(54,94); +INSERT INTO product_slots VALUES(54,95); +INSERT INTO product_slots VALUES(54,96); +INSERT INTO product_slots VALUES(54,97); +INSERT INTO product_slots VALUES(54,98); +INSERT INTO product_slots VALUES(54,99); +INSERT INTO product_slots VALUES(54,100); +INSERT INTO product_slots VALUES(54,102); +INSERT INTO product_slots VALUES(54,103); +INSERT INTO product_slots VALUES(54,104); +INSERT INTO product_slots VALUES(54,105); +INSERT INTO product_slots VALUES(54,106); +INSERT INTO product_slots VALUES(54,107); +INSERT INTO product_slots VALUES(54,108); +INSERT INTO product_slots VALUES(54,109); +INSERT INTO product_slots VALUES(54,110); +INSERT INTO product_slots VALUES(54,111); +INSERT INTO product_slots VALUES(54,112); +INSERT INTO product_slots VALUES(54,113); +INSERT INTO product_slots VALUES(54,114); +INSERT INTO product_slots VALUES(54,115); +INSERT INTO product_slots VALUES(54,117); +INSERT INTO product_slots VALUES(54,118); +INSERT INTO product_slots VALUES(54,119); +INSERT INTO product_slots VALUES(54,120); +INSERT INTO product_slots VALUES(54,121); +INSERT INTO product_slots VALUES(54,122); +INSERT INTO product_slots VALUES(54,123); +INSERT INTO product_slots VALUES(54,124); +INSERT INTO product_slots VALUES(54,125); +INSERT INTO product_slots VALUES(54,126); +INSERT INTO product_slots VALUES(54,127); +INSERT INTO product_slots VALUES(54,128); +INSERT INTO product_slots VALUES(54,129); +INSERT INTO product_slots VALUES(54,130); +INSERT INTO product_slots VALUES(54,131); +INSERT INTO product_slots VALUES(54,132); +INSERT INTO product_slots VALUES(54,133); +INSERT INTO product_slots VALUES(54,134); +INSERT INTO product_slots VALUES(54,135); +INSERT INTO product_slots VALUES(54,136); +INSERT INTO product_slots VALUES(54,138); +INSERT INTO product_slots VALUES(54,139); +INSERT INTO product_slots VALUES(54,140); +INSERT INTO product_slots VALUES(54,141); +INSERT INTO product_slots VALUES(54,142); +INSERT INTO product_slots VALUES(54,143); +INSERT INTO product_slots VALUES(54,145); +INSERT INTO product_slots VALUES(54,146); +INSERT INTO product_slots VALUES(54,147); +INSERT INTO product_slots VALUES(54,148); +INSERT INTO product_slots VALUES(54,149); +INSERT INTO product_slots VALUES(54,150); +INSERT INTO product_slots VALUES(54,151); +INSERT INTO product_slots VALUES(54,152); +INSERT INTO product_slots VALUES(54,153); +INSERT INTO product_slots VALUES(54,154); +INSERT INTO product_slots VALUES(54,155); +INSERT INTO product_slots VALUES(54,156); +INSERT INTO product_slots VALUES(54,157); +INSERT INTO product_slots VALUES(54,158); +INSERT INTO product_slots VALUES(54,159); +INSERT INTO product_slots VALUES(54,160); +INSERT INTO product_slots VALUES(54,161); +INSERT INTO product_slots VALUES(54,162); +INSERT INTO product_slots VALUES(54,163); +INSERT INTO product_slots VALUES(54,164); +INSERT INTO product_slots VALUES(54,165); +INSERT INTO product_slots VALUES(54,166); +INSERT INTO product_slots VALUES(54,167); +INSERT INTO product_slots VALUES(54,168); +INSERT INTO product_slots VALUES(54,169); +INSERT INTO product_slots VALUES(54,170); +INSERT INTO product_slots VALUES(54,171); +INSERT INTO product_slots VALUES(54,172); +INSERT INTO product_slots VALUES(54,173); +INSERT INTO product_slots VALUES(54,174); +INSERT INTO product_slots VALUES(54,175); +INSERT INTO product_slots VALUES(54,176); +INSERT INTO product_slots VALUES(54,177); +INSERT INTO product_slots VALUES(54,178); +INSERT INTO product_slots VALUES(54,179); +INSERT INTO product_slots VALUES(54,180); +INSERT INTO product_slots VALUES(54,181); +INSERT INTO product_slots VALUES(54,182); +INSERT INTO product_slots VALUES(54,183); +INSERT INTO product_slots VALUES(54,184); +INSERT INTO product_slots VALUES(54,185); +INSERT INTO product_slots VALUES(54,186); +INSERT INTO product_slots VALUES(54,187); +INSERT INTO product_slots VALUES(54,188); +INSERT INTO product_slots VALUES(54,189); +INSERT INTO product_slots VALUES(54,190); +INSERT INTO product_slots VALUES(54,191); +INSERT INTO product_slots VALUES(54,192); +INSERT INTO product_slots VALUES(54,193); +INSERT INTO product_slots VALUES(54,194); +INSERT INTO product_slots VALUES(54,195); +INSERT INTO product_slots VALUES(54,196); +INSERT INTO product_slots VALUES(54,197); +INSERT INTO product_slots VALUES(54,198); +INSERT INTO product_slots VALUES(54,199); +INSERT INTO product_slots VALUES(54,200); +INSERT INTO product_slots VALUES(54,201); +INSERT INTO product_slots VALUES(54,202); +INSERT INTO product_slots VALUES(54,203); +INSERT INTO product_slots VALUES(54,204); +INSERT INTO product_slots VALUES(54,205); +INSERT INTO product_slots VALUES(54,206); +INSERT INTO product_slots VALUES(54,207); +INSERT INTO product_slots VALUES(54,208); +INSERT INTO product_slots VALUES(54,209); +INSERT INTO product_slots VALUES(54,210); +INSERT INTO product_slots VALUES(54,211); +INSERT INTO product_slots VALUES(54,212); +INSERT INTO product_slots VALUES(54,213); +INSERT INTO product_slots VALUES(54,214); +INSERT INTO product_slots VALUES(54,215); +INSERT INTO product_slots VALUES(54,216); +INSERT INTO product_slots VALUES(54,217); +INSERT INTO product_slots VALUES(54,218); +INSERT INTO product_slots VALUES(54,219); +INSERT INTO product_slots VALUES(54,220); +INSERT INTO product_slots VALUES(54,221); +INSERT INTO product_slots VALUES(54,222); +INSERT INTO product_slots VALUES(54,223); +INSERT INTO product_slots VALUES(54,224); +INSERT INTO product_slots VALUES(54,225); +INSERT INTO product_slots VALUES(54,226); +INSERT INTO product_slots VALUES(54,227); +INSERT INTO product_slots VALUES(54,228); +INSERT INTO product_slots VALUES(54,229); +INSERT INTO product_slots VALUES(54,230); +INSERT INTO product_slots VALUES(54,231); +INSERT INTO product_slots VALUES(54,232); +INSERT INTO product_slots VALUES(54,233); +INSERT INTO product_slots VALUES(54,234); +INSERT INTO product_slots VALUES(54,235); +INSERT INTO product_slots VALUES(54,236); +INSERT INTO product_slots VALUES(54,237); +INSERT INTO product_slots VALUES(54,238); +INSERT INTO product_slots VALUES(54,239); +INSERT INTO product_slots VALUES(54,240); +INSERT INTO product_slots VALUES(54,241); +INSERT INTO product_slots VALUES(54,242); +INSERT INTO product_slots VALUES(54,243); +INSERT INTO product_slots VALUES(54,244); +INSERT INTO product_slots VALUES(54,274); +INSERT INTO product_slots VALUES(54,275); +INSERT INTO product_slots VALUES(54,279); +INSERT INTO product_slots VALUES(54,280); +INSERT INTO product_slots VALUES(54,281); +INSERT INTO product_slots VALUES(54,282); +INSERT INTO product_slots VALUES(54,283); +INSERT INTO product_slots VALUES(54,284); +INSERT INTO product_slots VALUES(54,285); +INSERT INTO product_slots VALUES(54,286); +INSERT INTO product_slots VALUES(54,287); +INSERT INTO product_slots VALUES(55,40); +INSERT INTO product_slots VALUES(55,59); +INSERT INTO product_slots VALUES(55,62); +INSERT INTO product_slots VALUES(55,63); +INSERT INTO product_slots VALUES(55,64); +INSERT INTO product_slots VALUES(55,65); +INSERT INTO product_slots VALUES(55,66); +INSERT INTO product_slots VALUES(55,67); +INSERT INTO product_slots VALUES(55,68); +INSERT INTO product_slots VALUES(55,69); +INSERT INTO product_slots VALUES(55,70); +INSERT INTO product_slots VALUES(55,71); +INSERT INTO product_slots VALUES(55,72); +INSERT INTO product_slots VALUES(55,73); +INSERT INTO product_slots VALUES(55,74); +INSERT INTO product_slots VALUES(55,75); +INSERT INTO product_slots VALUES(55,76); +INSERT INTO product_slots VALUES(55,77); +INSERT INTO product_slots VALUES(55,78); +INSERT INTO product_slots VALUES(55,79); +INSERT INTO product_slots VALUES(55,80); +INSERT INTO product_slots VALUES(55,81); +INSERT INTO product_slots VALUES(55,82); +INSERT INTO product_slots VALUES(55,83); +INSERT INTO product_slots VALUES(55,84); +INSERT INTO product_slots VALUES(55,85); +INSERT INTO product_slots VALUES(55,86); +INSERT INTO product_slots VALUES(55,87); +INSERT INTO product_slots VALUES(55,88); +INSERT INTO product_slots VALUES(55,89); +INSERT INTO product_slots VALUES(55,90); +INSERT INTO product_slots VALUES(55,91); +INSERT INTO product_slots VALUES(55,92); +INSERT INTO product_slots VALUES(55,93); +INSERT INTO product_slots VALUES(55,94); +INSERT INTO product_slots VALUES(55,95); +INSERT INTO product_slots VALUES(55,96); +INSERT INTO product_slots VALUES(55,97); +INSERT INTO product_slots VALUES(55,98); +INSERT INTO product_slots VALUES(55,99); +INSERT INTO product_slots VALUES(55,100); +INSERT INTO product_slots VALUES(55,102); +INSERT INTO product_slots VALUES(55,103); +INSERT INTO product_slots VALUES(55,104); +INSERT INTO product_slots VALUES(55,105); +INSERT INTO product_slots VALUES(55,106); +INSERT INTO product_slots VALUES(55,107); +INSERT INTO product_slots VALUES(55,108); +INSERT INTO product_slots VALUES(55,109); +INSERT INTO product_slots VALUES(55,110); +INSERT INTO product_slots VALUES(55,111); +INSERT INTO product_slots VALUES(55,112); +INSERT INTO product_slots VALUES(55,113); +INSERT INTO product_slots VALUES(55,114); +INSERT INTO product_slots VALUES(55,115); +INSERT INTO product_slots VALUES(55,117); +INSERT INTO product_slots VALUES(55,118); +INSERT INTO product_slots VALUES(55,119); +INSERT INTO product_slots VALUES(55,120); +INSERT INTO product_slots VALUES(55,121); +INSERT INTO product_slots VALUES(55,122); +INSERT INTO product_slots VALUES(55,123); +INSERT INTO product_slots VALUES(55,124); +INSERT INTO product_slots VALUES(55,125); +INSERT INTO product_slots VALUES(55,126); +INSERT INTO product_slots VALUES(55,127); +INSERT INTO product_slots VALUES(55,128); +INSERT INTO product_slots VALUES(55,129); +INSERT INTO product_slots VALUES(55,130); +INSERT INTO product_slots VALUES(55,131); +INSERT INTO product_slots VALUES(55,132); +INSERT INTO product_slots VALUES(55,133); +INSERT INTO product_slots VALUES(55,134); +INSERT INTO product_slots VALUES(55,135); +INSERT INTO product_slots VALUES(55,136); +INSERT INTO product_slots VALUES(55,138); +INSERT INTO product_slots VALUES(55,139); +INSERT INTO product_slots VALUES(55,140); +INSERT INTO product_slots VALUES(55,141); +INSERT INTO product_slots VALUES(55,142); +INSERT INTO product_slots VALUES(55,143); +INSERT INTO product_slots VALUES(55,145); +INSERT INTO product_slots VALUES(55,146); +INSERT INTO product_slots VALUES(55,147); +INSERT INTO product_slots VALUES(55,148); +INSERT INTO product_slots VALUES(55,149); +INSERT INTO product_slots VALUES(55,150); +INSERT INTO product_slots VALUES(55,151); +INSERT INTO product_slots VALUES(55,152); +INSERT INTO product_slots VALUES(55,153); +INSERT INTO product_slots VALUES(55,154); +INSERT INTO product_slots VALUES(55,155); +INSERT INTO product_slots VALUES(55,156); +INSERT INTO product_slots VALUES(55,157); +INSERT INTO product_slots VALUES(55,158); +INSERT INTO product_slots VALUES(55,159); +INSERT INTO product_slots VALUES(55,160); +INSERT INTO product_slots VALUES(55,161); +INSERT INTO product_slots VALUES(55,162); +INSERT INTO product_slots VALUES(55,163); +INSERT INTO product_slots VALUES(55,164); +INSERT INTO product_slots VALUES(55,165); +INSERT INTO product_slots VALUES(55,166); +INSERT INTO product_slots VALUES(55,167); +INSERT INTO product_slots VALUES(55,168); +INSERT INTO product_slots VALUES(55,169); +INSERT INTO product_slots VALUES(55,170); +INSERT INTO product_slots VALUES(55,171); +INSERT INTO product_slots VALUES(55,172); +INSERT INTO product_slots VALUES(55,173); +INSERT INTO product_slots VALUES(55,174); +INSERT INTO product_slots VALUES(55,175); +INSERT INTO product_slots VALUES(55,176); +INSERT INTO product_slots VALUES(55,177); +INSERT INTO product_slots VALUES(55,178); +INSERT INTO product_slots VALUES(55,179); +INSERT INTO product_slots VALUES(55,180); +INSERT INTO product_slots VALUES(55,181); +INSERT INTO product_slots VALUES(55,182); +INSERT INTO product_slots VALUES(55,183); +INSERT INTO product_slots VALUES(55,184); +INSERT INTO product_slots VALUES(55,185); +INSERT INTO product_slots VALUES(55,186); +INSERT INTO product_slots VALUES(55,187); +INSERT INTO product_slots VALUES(55,188); +INSERT INTO product_slots VALUES(55,189); +INSERT INTO product_slots VALUES(55,190); +INSERT INTO product_slots VALUES(55,191); +INSERT INTO product_slots VALUES(55,192); +INSERT INTO product_slots VALUES(55,193); +INSERT INTO product_slots VALUES(55,194); +INSERT INTO product_slots VALUES(55,195); +INSERT INTO product_slots VALUES(55,196); +INSERT INTO product_slots VALUES(55,197); +INSERT INTO product_slots VALUES(55,198); +INSERT INTO product_slots VALUES(55,199); +INSERT INTO product_slots VALUES(55,200); +INSERT INTO product_slots VALUES(55,201); +INSERT INTO product_slots VALUES(55,202); +INSERT INTO product_slots VALUES(55,203); +INSERT INTO product_slots VALUES(55,204); +INSERT INTO product_slots VALUES(55,205); +INSERT INTO product_slots VALUES(55,206); +INSERT INTO product_slots VALUES(55,207); +INSERT INTO product_slots VALUES(55,208); +INSERT INTO product_slots VALUES(55,209); +INSERT INTO product_slots VALUES(55,210); +INSERT INTO product_slots VALUES(55,211); +INSERT INTO product_slots VALUES(55,212); +INSERT INTO product_slots VALUES(55,213); +INSERT INTO product_slots VALUES(55,214); +INSERT INTO product_slots VALUES(55,215); +INSERT INTO product_slots VALUES(55,216); +INSERT INTO product_slots VALUES(55,217); +INSERT INTO product_slots VALUES(55,218); +INSERT INTO product_slots VALUES(55,219); +INSERT INTO product_slots VALUES(55,220); +INSERT INTO product_slots VALUES(55,221); +INSERT INTO product_slots VALUES(55,222); +INSERT INTO product_slots VALUES(55,223); +INSERT INTO product_slots VALUES(55,224); +INSERT INTO product_slots VALUES(55,225); +INSERT INTO product_slots VALUES(55,226); +INSERT INTO product_slots VALUES(55,227); +INSERT INTO product_slots VALUES(55,228); +INSERT INTO product_slots VALUES(55,229); +INSERT INTO product_slots VALUES(55,230); +INSERT INTO product_slots VALUES(55,231); +INSERT INTO product_slots VALUES(55,232); +INSERT INTO product_slots VALUES(55,233); +INSERT INTO product_slots VALUES(55,234); +INSERT INTO product_slots VALUES(55,235); +INSERT INTO product_slots VALUES(55,236); +INSERT INTO product_slots VALUES(55,237); +INSERT INTO product_slots VALUES(55,238); +INSERT INTO product_slots VALUES(55,239); +INSERT INTO product_slots VALUES(55,240); +INSERT INTO product_slots VALUES(55,241); +INSERT INTO product_slots VALUES(55,242); +INSERT INTO product_slots VALUES(55,243); +INSERT INTO product_slots VALUES(55,244); +INSERT INTO product_slots VALUES(55,274); +INSERT INTO product_slots VALUES(55,275); +INSERT INTO product_slots VALUES(55,279); +INSERT INTO product_slots VALUES(55,280); +INSERT INTO product_slots VALUES(55,281); +INSERT INTO product_slots VALUES(55,282); +INSERT INTO product_slots VALUES(55,283); +INSERT INTO product_slots VALUES(55,284); +INSERT INTO product_slots VALUES(55,285); +INSERT INTO product_slots VALUES(55,286); +INSERT INTO product_slots VALUES(55,287); +INSERT INTO product_slots VALUES(56,39); +INSERT INTO product_slots VALUES(56,40); +INSERT INTO product_slots VALUES(56,43); +INSERT INTO product_slots VALUES(56,45); +INSERT INTO product_slots VALUES(56,46); +INSERT INTO product_slots VALUES(56,48); +INSERT INTO product_slots VALUES(56,49); +INSERT INTO product_slots VALUES(56,51); +INSERT INTO product_slots VALUES(56,52); +INSERT INTO product_slots VALUES(56,53); +INSERT INTO product_slots VALUES(56,54); +INSERT INTO product_slots VALUES(56,57); +INSERT INTO product_slots VALUES(56,58); +INSERT INTO product_slots VALUES(56,59); +INSERT INTO product_slots VALUES(56,60); +INSERT INTO product_slots VALUES(56,61); +INSERT INTO product_slots VALUES(56,62); +INSERT INTO product_slots VALUES(56,63); +INSERT INTO product_slots VALUES(56,64); +INSERT INTO product_slots VALUES(56,65); +INSERT INTO product_slots VALUES(56,66); +INSERT INTO product_slots VALUES(56,67); +INSERT INTO product_slots VALUES(56,68); +INSERT INTO product_slots VALUES(56,69); +INSERT INTO product_slots VALUES(56,70); +INSERT INTO product_slots VALUES(56,71); +INSERT INTO product_slots VALUES(56,72); +INSERT INTO product_slots VALUES(56,73); +INSERT INTO product_slots VALUES(56,74); +INSERT INTO product_slots VALUES(56,75); +INSERT INTO product_slots VALUES(56,76); +INSERT INTO product_slots VALUES(56,77); +INSERT INTO product_slots VALUES(56,78); +INSERT INTO product_slots VALUES(56,79); +INSERT INTO product_slots VALUES(56,80); +INSERT INTO product_slots VALUES(56,81); +INSERT INTO product_slots VALUES(56,82); +INSERT INTO product_slots VALUES(56,83); +INSERT INTO product_slots VALUES(56,84); +INSERT INTO product_slots VALUES(56,85); +INSERT INTO product_slots VALUES(56,86); +INSERT INTO product_slots VALUES(56,87); +INSERT INTO product_slots VALUES(56,88); +INSERT INTO product_slots VALUES(56,89); +INSERT INTO product_slots VALUES(56,90); +INSERT INTO product_slots VALUES(56,91); +INSERT INTO product_slots VALUES(56,92); +INSERT INTO product_slots VALUES(56,93); +INSERT INTO product_slots VALUES(56,94); +INSERT INTO product_slots VALUES(56,95); +INSERT INTO product_slots VALUES(56,96); +INSERT INTO product_slots VALUES(56,97); +INSERT INTO product_slots VALUES(56,98); +INSERT INTO product_slots VALUES(56,99); +INSERT INTO product_slots VALUES(56,100); +INSERT INTO product_slots VALUES(56,102); +INSERT INTO product_slots VALUES(56,103); +INSERT INTO product_slots VALUES(56,104); +INSERT INTO product_slots VALUES(56,105); +INSERT INTO product_slots VALUES(56,106); +INSERT INTO product_slots VALUES(56,107); +INSERT INTO product_slots VALUES(56,108); +INSERT INTO product_slots VALUES(56,109); +INSERT INTO product_slots VALUES(56,110); +INSERT INTO product_slots VALUES(56,111); +INSERT INTO product_slots VALUES(56,112); +INSERT INTO product_slots VALUES(56,113); +INSERT INTO product_slots VALUES(56,114); +INSERT INTO product_slots VALUES(56,115); +INSERT INTO product_slots VALUES(56,117); +INSERT INTO product_slots VALUES(56,118); +INSERT INTO product_slots VALUES(56,119); +INSERT INTO product_slots VALUES(56,120); +INSERT INTO product_slots VALUES(56,121); +INSERT INTO product_slots VALUES(56,122); +INSERT INTO product_slots VALUES(56,123); +INSERT INTO product_slots VALUES(56,124); +INSERT INTO product_slots VALUES(56,125); +INSERT INTO product_slots VALUES(56,126); +INSERT INTO product_slots VALUES(56,127); +INSERT INTO product_slots VALUES(56,128); +INSERT INTO product_slots VALUES(56,129); +INSERT INTO product_slots VALUES(56,130); +INSERT INTO product_slots VALUES(56,131); +INSERT INTO product_slots VALUES(56,132); +INSERT INTO product_slots VALUES(56,133); +INSERT INTO product_slots VALUES(56,134); +INSERT INTO product_slots VALUES(56,135); +INSERT INTO product_slots VALUES(56,136); +INSERT INTO product_slots VALUES(56,138); +INSERT INTO product_slots VALUES(56,139); +INSERT INTO product_slots VALUES(56,140); +INSERT INTO product_slots VALUES(56,141); +INSERT INTO product_slots VALUES(56,142); +INSERT INTO product_slots VALUES(56,143); +INSERT INTO product_slots VALUES(56,145); +INSERT INTO product_slots VALUES(56,146); +INSERT INTO product_slots VALUES(56,147); +INSERT INTO product_slots VALUES(56,148); +INSERT INTO product_slots VALUES(56,149); +INSERT INTO product_slots VALUES(56,150); +INSERT INTO product_slots VALUES(56,151); +INSERT INTO product_slots VALUES(56,152); +INSERT INTO product_slots VALUES(56,153); +INSERT INTO product_slots VALUES(56,154); +INSERT INTO product_slots VALUES(56,155); +INSERT INTO product_slots VALUES(56,156); +INSERT INTO product_slots VALUES(56,157); +INSERT INTO product_slots VALUES(56,158); +INSERT INTO product_slots VALUES(56,159); +INSERT INTO product_slots VALUES(56,160); +INSERT INTO product_slots VALUES(56,161); +INSERT INTO product_slots VALUES(56,162); +INSERT INTO product_slots VALUES(56,163); +INSERT INTO product_slots VALUES(56,164); +INSERT INTO product_slots VALUES(56,165); +INSERT INTO product_slots VALUES(56,166); +INSERT INTO product_slots VALUES(56,167); +INSERT INTO product_slots VALUES(56,168); +INSERT INTO product_slots VALUES(56,169); +INSERT INTO product_slots VALUES(56,170); +INSERT INTO product_slots VALUES(56,171); +INSERT INTO product_slots VALUES(56,172); +INSERT INTO product_slots VALUES(56,173); +INSERT INTO product_slots VALUES(56,174); +INSERT INTO product_slots VALUES(56,175); +INSERT INTO product_slots VALUES(56,176); +INSERT INTO product_slots VALUES(56,177); +INSERT INTO product_slots VALUES(56,178); +INSERT INTO product_slots VALUES(56,179); +INSERT INTO product_slots VALUES(56,180); +INSERT INTO product_slots VALUES(56,181); +INSERT INTO product_slots VALUES(56,182); +INSERT INTO product_slots VALUES(56,183); +INSERT INTO product_slots VALUES(56,184); +INSERT INTO product_slots VALUES(56,185); +INSERT INTO product_slots VALUES(56,186); +INSERT INTO product_slots VALUES(56,187); +INSERT INTO product_slots VALUES(56,188); +INSERT INTO product_slots VALUES(56,189); +INSERT INTO product_slots VALUES(56,190); +INSERT INTO product_slots VALUES(56,191); +INSERT INTO product_slots VALUES(56,192); +INSERT INTO product_slots VALUES(56,193); +INSERT INTO product_slots VALUES(56,194); +INSERT INTO product_slots VALUES(56,195); +INSERT INTO product_slots VALUES(56,196); +INSERT INTO product_slots VALUES(56,197); +INSERT INTO product_slots VALUES(56,198); +INSERT INTO product_slots VALUES(56,199); +INSERT INTO product_slots VALUES(56,200); +INSERT INTO product_slots VALUES(56,201); +INSERT INTO product_slots VALUES(56,202); +INSERT INTO product_slots VALUES(56,203); +INSERT INTO product_slots VALUES(56,204); +INSERT INTO product_slots VALUES(56,205); +INSERT INTO product_slots VALUES(56,206); +INSERT INTO product_slots VALUES(56,207); +INSERT INTO product_slots VALUES(56,208); +INSERT INTO product_slots VALUES(56,209); +INSERT INTO product_slots VALUES(56,210); +INSERT INTO product_slots VALUES(56,211); +INSERT INTO product_slots VALUES(56,212); +INSERT INTO product_slots VALUES(56,213); +INSERT INTO product_slots VALUES(56,214); +INSERT INTO product_slots VALUES(56,215); +INSERT INTO product_slots VALUES(56,216); +INSERT INTO product_slots VALUES(56,217); +INSERT INTO product_slots VALUES(56,218); +INSERT INTO product_slots VALUES(56,219); +INSERT INTO product_slots VALUES(56,220); +INSERT INTO product_slots VALUES(56,221); +INSERT INTO product_slots VALUES(56,222); +INSERT INTO product_slots VALUES(56,223); +INSERT INTO product_slots VALUES(56,224); +INSERT INTO product_slots VALUES(56,225); +INSERT INTO product_slots VALUES(56,226); +INSERT INTO product_slots VALUES(56,227); +INSERT INTO product_slots VALUES(56,228); +INSERT INTO product_slots VALUES(56,229); +INSERT INTO product_slots VALUES(56,230); +INSERT INTO product_slots VALUES(56,231); +INSERT INTO product_slots VALUES(56,232); +INSERT INTO product_slots VALUES(56,233); +INSERT INTO product_slots VALUES(56,234); +INSERT INTO product_slots VALUES(56,235); +INSERT INTO product_slots VALUES(56,236); +INSERT INTO product_slots VALUES(56,237); +INSERT INTO product_slots VALUES(56,238); +INSERT INTO product_slots VALUES(56,239); +INSERT INTO product_slots VALUES(56,240); +INSERT INTO product_slots VALUES(56,241); +INSERT INTO product_slots VALUES(56,242); +INSERT INTO product_slots VALUES(56,243); +INSERT INTO product_slots VALUES(56,244); +INSERT INTO product_slots VALUES(56,274); +INSERT INTO product_slots VALUES(56,275); +INSERT INTO product_slots VALUES(56,279); +INSERT INTO product_slots VALUES(56,280); +INSERT INTO product_slots VALUES(56,281); +INSERT INTO product_slots VALUES(56,282); +INSERT INTO product_slots VALUES(56,283); +INSERT INTO product_slots VALUES(56,284); +INSERT INTO product_slots VALUES(56,285); +INSERT INTO product_slots VALUES(56,286); +INSERT INTO product_slots VALUES(56,287); +INSERT INTO product_slots VALUES(57,39); +INSERT INTO product_slots VALUES(57,40); +INSERT INTO product_slots VALUES(57,43); +INSERT INTO product_slots VALUES(57,45); +INSERT INTO product_slots VALUES(57,46); +INSERT INTO product_slots VALUES(57,48); +INSERT INTO product_slots VALUES(57,49); +INSERT INTO product_slots VALUES(57,51); +INSERT INTO product_slots VALUES(57,52); +INSERT INTO product_slots VALUES(57,53); +INSERT INTO product_slots VALUES(57,54); +INSERT INTO product_slots VALUES(57,57); +INSERT INTO product_slots VALUES(57,58); +INSERT INTO product_slots VALUES(57,59); +INSERT INTO product_slots VALUES(57,60); +INSERT INTO product_slots VALUES(57,61); +INSERT INTO product_slots VALUES(57,62); +INSERT INTO product_slots VALUES(57,63); +INSERT INTO product_slots VALUES(57,64); +INSERT INTO product_slots VALUES(57,65); +INSERT INTO product_slots VALUES(57,66); +INSERT INTO product_slots VALUES(57,67); +INSERT INTO product_slots VALUES(57,68); +INSERT INTO product_slots VALUES(57,69); +INSERT INTO product_slots VALUES(57,70); +INSERT INTO product_slots VALUES(57,71); +INSERT INTO product_slots VALUES(57,72); +INSERT INTO product_slots VALUES(57,73); +INSERT INTO product_slots VALUES(57,74); +INSERT INTO product_slots VALUES(57,75); +INSERT INTO product_slots VALUES(57,76); +INSERT INTO product_slots VALUES(57,77); +INSERT INTO product_slots VALUES(57,78); +INSERT INTO product_slots VALUES(57,79); +INSERT INTO product_slots VALUES(57,80); +INSERT INTO product_slots VALUES(57,81); +INSERT INTO product_slots VALUES(57,82); +INSERT INTO product_slots VALUES(57,83); +INSERT INTO product_slots VALUES(57,84); +INSERT INTO product_slots VALUES(57,85); +INSERT INTO product_slots VALUES(57,86); +INSERT INTO product_slots VALUES(57,87); +INSERT INTO product_slots VALUES(57,88); +INSERT INTO product_slots VALUES(57,89); +INSERT INTO product_slots VALUES(57,90); +INSERT INTO product_slots VALUES(57,91); +INSERT INTO product_slots VALUES(57,92); +INSERT INTO product_slots VALUES(57,93); +INSERT INTO product_slots VALUES(57,94); +INSERT INTO product_slots VALUES(57,95); +INSERT INTO product_slots VALUES(57,96); +INSERT INTO product_slots VALUES(57,97); +INSERT INTO product_slots VALUES(57,98); +INSERT INTO product_slots VALUES(57,99); +INSERT INTO product_slots VALUES(57,100); +INSERT INTO product_slots VALUES(57,102); +INSERT INTO product_slots VALUES(57,103); +INSERT INTO product_slots VALUES(57,104); +INSERT INTO product_slots VALUES(57,105); +INSERT INTO product_slots VALUES(57,106); +INSERT INTO product_slots VALUES(57,107); +INSERT INTO product_slots VALUES(57,108); +INSERT INTO product_slots VALUES(57,109); +INSERT INTO product_slots VALUES(57,110); +INSERT INTO product_slots VALUES(57,111); +INSERT INTO product_slots VALUES(57,112); +INSERT INTO product_slots VALUES(57,113); +INSERT INTO product_slots VALUES(57,114); +INSERT INTO product_slots VALUES(57,115); +INSERT INTO product_slots VALUES(57,117); +INSERT INTO product_slots VALUES(57,118); +INSERT INTO product_slots VALUES(57,119); +INSERT INTO product_slots VALUES(57,120); +INSERT INTO product_slots VALUES(57,121); +INSERT INTO product_slots VALUES(57,122); +INSERT INTO product_slots VALUES(57,123); +INSERT INTO product_slots VALUES(57,124); +INSERT INTO product_slots VALUES(57,125); +INSERT INTO product_slots VALUES(57,126); +INSERT INTO product_slots VALUES(57,127); +INSERT INTO product_slots VALUES(57,128); +INSERT INTO product_slots VALUES(57,129); +INSERT INTO product_slots VALUES(57,130); +INSERT INTO product_slots VALUES(57,131); +INSERT INTO product_slots VALUES(57,132); +INSERT INTO product_slots VALUES(57,133); +INSERT INTO product_slots VALUES(57,134); +INSERT INTO product_slots VALUES(57,135); +INSERT INTO product_slots VALUES(57,136); +INSERT INTO product_slots VALUES(57,138); +INSERT INTO product_slots VALUES(57,139); +INSERT INTO product_slots VALUES(57,140); +INSERT INTO product_slots VALUES(57,141); +INSERT INTO product_slots VALUES(57,142); +INSERT INTO product_slots VALUES(57,143); +INSERT INTO product_slots VALUES(57,145); +INSERT INTO product_slots VALUES(57,146); +INSERT INTO product_slots VALUES(57,147); +INSERT INTO product_slots VALUES(57,148); +INSERT INTO product_slots VALUES(57,149); +INSERT INTO product_slots VALUES(57,150); +INSERT INTO product_slots VALUES(57,151); +INSERT INTO product_slots VALUES(57,152); +INSERT INTO product_slots VALUES(57,153); +INSERT INTO product_slots VALUES(57,154); +INSERT INTO product_slots VALUES(57,155); +INSERT INTO product_slots VALUES(57,156); +INSERT INTO product_slots VALUES(57,157); +INSERT INTO product_slots VALUES(57,158); +INSERT INTO product_slots VALUES(57,159); +INSERT INTO product_slots VALUES(57,160); +INSERT INTO product_slots VALUES(57,161); +INSERT INTO product_slots VALUES(57,162); +INSERT INTO product_slots VALUES(57,163); +INSERT INTO product_slots VALUES(57,164); +INSERT INTO product_slots VALUES(57,165); +INSERT INTO product_slots VALUES(57,166); +INSERT INTO product_slots VALUES(57,167); +INSERT INTO product_slots VALUES(57,168); +INSERT INTO product_slots VALUES(57,169); +INSERT INTO product_slots VALUES(57,170); +INSERT INTO product_slots VALUES(57,171); +INSERT INTO product_slots VALUES(57,172); +INSERT INTO product_slots VALUES(57,173); +INSERT INTO product_slots VALUES(57,174); +INSERT INTO product_slots VALUES(57,175); +INSERT INTO product_slots VALUES(57,176); +INSERT INTO product_slots VALUES(57,177); +INSERT INTO product_slots VALUES(57,178); +INSERT INTO product_slots VALUES(57,179); +INSERT INTO product_slots VALUES(57,180); +INSERT INTO product_slots VALUES(57,181); +INSERT INTO product_slots VALUES(57,182); +INSERT INTO product_slots VALUES(57,183); +INSERT INTO product_slots VALUES(57,184); +INSERT INTO product_slots VALUES(57,185); +INSERT INTO product_slots VALUES(57,186); +INSERT INTO product_slots VALUES(57,187); +INSERT INTO product_slots VALUES(57,188); +INSERT INTO product_slots VALUES(57,189); +INSERT INTO product_slots VALUES(57,190); +INSERT INTO product_slots VALUES(57,191); +INSERT INTO product_slots VALUES(57,192); +INSERT INTO product_slots VALUES(57,193); +INSERT INTO product_slots VALUES(57,194); +INSERT INTO product_slots VALUES(57,195); +INSERT INTO product_slots VALUES(57,196); +INSERT INTO product_slots VALUES(57,197); +INSERT INTO product_slots VALUES(57,198); +INSERT INTO product_slots VALUES(57,199); +INSERT INTO product_slots VALUES(57,200); +INSERT INTO product_slots VALUES(57,201); +INSERT INTO product_slots VALUES(57,202); +INSERT INTO product_slots VALUES(57,203); +INSERT INTO product_slots VALUES(57,204); +INSERT INTO product_slots VALUES(57,205); +INSERT INTO product_slots VALUES(57,206); +INSERT INTO product_slots VALUES(57,207); +INSERT INTO product_slots VALUES(57,208); +INSERT INTO product_slots VALUES(57,209); +INSERT INTO product_slots VALUES(57,210); +INSERT INTO product_slots VALUES(57,211); +INSERT INTO product_slots VALUES(57,212); +INSERT INTO product_slots VALUES(57,213); +INSERT INTO product_slots VALUES(57,214); +INSERT INTO product_slots VALUES(57,215); +INSERT INTO product_slots VALUES(57,216); +INSERT INTO product_slots VALUES(57,217); +INSERT INTO product_slots VALUES(57,218); +INSERT INTO product_slots VALUES(57,219); +INSERT INTO product_slots VALUES(57,220); +INSERT INTO product_slots VALUES(57,221); +INSERT INTO product_slots VALUES(57,222); +INSERT INTO product_slots VALUES(57,223); +INSERT INTO product_slots VALUES(57,224); +INSERT INTO product_slots VALUES(57,225); +INSERT INTO product_slots VALUES(57,226); +INSERT INTO product_slots VALUES(57,227); +INSERT INTO product_slots VALUES(57,228); +INSERT INTO product_slots VALUES(57,229); +INSERT INTO product_slots VALUES(57,230); +INSERT INTO product_slots VALUES(57,231); +INSERT INTO product_slots VALUES(57,232); +INSERT INTO product_slots VALUES(57,233); +INSERT INTO product_slots VALUES(57,234); +INSERT INTO product_slots VALUES(57,235); +INSERT INTO product_slots VALUES(57,236); +INSERT INTO product_slots VALUES(57,237); +INSERT INTO product_slots VALUES(57,238); +INSERT INTO product_slots VALUES(57,239); +INSERT INTO product_slots VALUES(57,240); +INSERT INTO product_slots VALUES(57,241); +INSERT INTO product_slots VALUES(57,242); +INSERT INTO product_slots VALUES(57,243); +INSERT INTO product_slots VALUES(57,244); +INSERT INTO product_slots VALUES(57,274); +INSERT INTO product_slots VALUES(57,275); +INSERT INTO product_slots VALUES(57,279); +INSERT INTO product_slots VALUES(57,280); +INSERT INTO product_slots VALUES(57,281); +INSERT INTO product_slots VALUES(57,282); +INSERT INTO product_slots VALUES(57,283); +INSERT INTO product_slots VALUES(57,284); +INSERT INTO product_slots VALUES(57,285); +INSERT INTO product_slots VALUES(57,286); +INSERT INTO product_slots VALUES(57,287); +INSERT INTO product_slots VALUES(58,39); +INSERT INTO product_slots VALUES(58,40); +INSERT INTO product_slots VALUES(58,43); +INSERT INTO product_slots VALUES(58,45); +INSERT INTO product_slots VALUES(58,46); +INSERT INTO product_slots VALUES(58,48); +INSERT INTO product_slots VALUES(58,49); +INSERT INTO product_slots VALUES(58,51); +INSERT INTO product_slots VALUES(58,52); +INSERT INTO product_slots VALUES(58,53); +INSERT INTO product_slots VALUES(58,54); +INSERT INTO product_slots VALUES(58,57); +INSERT INTO product_slots VALUES(58,58); +INSERT INTO product_slots VALUES(58,59); +INSERT INTO product_slots VALUES(58,60); +INSERT INTO product_slots VALUES(58,61); +INSERT INTO product_slots VALUES(58,62); +INSERT INTO product_slots VALUES(58,63); +INSERT INTO product_slots VALUES(58,64); +INSERT INTO product_slots VALUES(58,65); +INSERT INTO product_slots VALUES(58,66); +INSERT INTO product_slots VALUES(58,67); +INSERT INTO product_slots VALUES(58,68); +INSERT INTO product_slots VALUES(58,69); +INSERT INTO product_slots VALUES(58,70); +INSERT INTO product_slots VALUES(58,71); +INSERT INTO product_slots VALUES(58,72); +INSERT INTO product_slots VALUES(58,73); +INSERT INTO product_slots VALUES(58,74); +INSERT INTO product_slots VALUES(58,75); +INSERT INTO product_slots VALUES(58,76); +INSERT INTO product_slots VALUES(58,77); +INSERT INTO product_slots VALUES(58,78); +INSERT INTO product_slots VALUES(58,79); +INSERT INTO product_slots VALUES(58,80); +INSERT INTO product_slots VALUES(58,81); +INSERT INTO product_slots VALUES(58,82); +INSERT INTO product_slots VALUES(58,83); +INSERT INTO product_slots VALUES(58,84); +INSERT INTO product_slots VALUES(58,85); +INSERT INTO product_slots VALUES(58,86); +INSERT INTO product_slots VALUES(58,87); +INSERT INTO product_slots VALUES(58,88); +INSERT INTO product_slots VALUES(58,89); +INSERT INTO product_slots VALUES(58,90); +INSERT INTO product_slots VALUES(58,91); +INSERT INTO product_slots VALUES(58,92); +INSERT INTO product_slots VALUES(58,93); +INSERT INTO product_slots VALUES(58,94); +INSERT INTO product_slots VALUES(58,95); +INSERT INTO product_slots VALUES(58,96); +INSERT INTO product_slots VALUES(58,97); +INSERT INTO product_slots VALUES(58,98); +INSERT INTO product_slots VALUES(58,99); +INSERT INTO product_slots VALUES(58,100); +INSERT INTO product_slots VALUES(58,102); +INSERT INTO product_slots VALUES(58,103); +INSERT INTO product_slots VALUES(58,104); +INSERT INTO product_slots VALUES(58,105); +INSERT INTO product_slots VALUES(58,106); +INSERT INTO product_slots VALUES(58,107); +INSERT INTO product_slots VALUES(58,108); +INSERT INTO product_slots VALUES(58,109); +INSERT INTO product_slots VALUES(58,110); +INSERT INTO product_slots VALUES(58,111); +INSERT INTO product_slots VALUES(58,112); +INSERT INTO product_slots VALUES(58,113); +INSERT INTO product_slots VALUES(58,114); +INSERT INTO product_slots VALUES(58,115); +INSERT INTO product_slots VALUES(58,117); +INSERT INTO product_slots VALUES(58,118); +INSERT INTO product_slots VALUES(58,119); +INSERT INTO product_slots VALUES(58,120); +INSERT INTO product_slots VALUES(58,121); +INSERT INTO product_slots VALUES(58,122); +INSERT INTO product_slots VALUES(58,123); +INSERT INTO product_slots VALUES(58,124); +INSERT INTO product_slots VALUES(58,125); +INSERT INTO product_slots VALUES(58,126); +INSERT INTO product_slots VALUES(58,127); +INSERT INTO product_slots VALUES(58,128); +INSERT INTO product_slots VALUES(58,129); +INSERT INTO product_slots VALUES(58,130); +INSERT INTO product_slots VALUES(58,131); +INSERT INTO product_slots VALUES(58,132); +INSERT INTO product_slots VALUES(58,133); +INSERT INTO product_slots VALUES(58,134); +INSERT INTO product_slots VALUES(58,135); +INSERT INTO product_slots VALUES(58,136); +INSERT INTO product_slots VALUES(58,138); +INSERT INTO product_slots VALUES(58,139); +INSERT INTO product_slots VALUES(58,140); +INSERT INTO product_slots VALUES(58,141); +INSERT INTO product_slots VALUES(58,142); +INSERT INTO product_slots VALUES(58,143); +INSERT INTO product_slots VALUES(58,145); +INSERT INTO product_slots VALUES(58,146); +INSERT INTO product_slots VALUES(58,147); +INSERT INTO product_slots VALUES(58,148); +INSERT INTO product_slots VALUES(58,149); +INSERT INTO product_slots VALUES(58,150); +INSERT INTO product_slots VALUES(58,151); +INSERT INTO product_slots VALUES(58,152); +INSERT INTO product_slots VALUES(58,153); +INSERT INTO product_slots VALUES(58,154); +INSERT INTO product_slots VALUES(58,155); +INSERT INTO product_slots VALUES(58,156); +INSERT INTO product_slots VALUES(58,157); +INSERT INTO product_slots VALUES(58,158); +INSERT INTO product_slots VALUES(58,159); +INSERT INTO product_slots VALUES(58,160); +INSERT INTO product_slots VALUES(58,161); +INSERT INTO product_slots VALUES(58,162); +INSERT INTO product_slots VALUES(58,163); +INSERT INTO product_slots VALUES(58,164); +INSERT INTO product_slots VALUES(58,165); +INSERT INTO product_slots VALUES(58,166); +INSERT INTO product_slots VALUES(58,167); +INSERT INTO product_slots VALUES(58,168); +INSERT INTO product_slots VALUES(58,169); +INSERT INTO product_slots VALUES(58,170); +INSERT INTO product_slots VALUES(58,171); +INSERT INTO product_slots VALUES(58,172); +INSERT INTO product_slots VALUES(58,173); +INSERT INTO product_slots VALUES(58,174); +INSERT INTO product_slots VALUES(58,175); +INSERT INTO product_slots VALUES(58,176); +INSERT INTO product_slots VALUES(58,177); +INSERT INTO product_slots VALUES(58,178); +INSERT INTO product_slots VALUES(58,179); +INSERT INTO product_slots VALUES(58,180); +INSERT INTO product_slots VALUES(58,181); +INSERT INTO product_slots VALUES(58,182); +INSERT INTO product_slots VALUES(58,183); +INSERT INTO product_slots VALUES(58,184); +INSERT INTO product_slots VALUES(58,185); +INSERT INTO product_slots VALUES(58,186); +INSERT INTO product_slots VALUES(58,187); +INSERT INTO product_slots VALUES(58,188); +INSERT INTO product_slots VALUES(58,189); +INSERT INTO product_slots VALUES(58,190); +INSERT INTO product_slots VALUES(58,191); +INSERT INTO product_slots VALUES(58,192); +INSERT INTO product_slots VALUES(58,193); +INSERT INTO product_slots VALUES(58,194); +INSERT INTO product_slots VALUES(58,195); +INSERT INTO product_slots VALUES(58,196); +INSERT INTO product_slots VALUES(58,197); +INSERT INTO product_slots VALUES(58,198); +INSERT INTO product_slots VALUES(58,199); +INSERT INTO product_slots VALUES(58,200); +INSERT INTO product_slots VALUES(58,201); +INSERT INTO product_slots VALUES(58,202); +INSERT INTO product_slots VALUES(58,203); +INSERT INTO product_slots VALUES(58,204); +INSERT INTO product_slots VALUES(58,205); +INSERT INTO product_slots VALUES(58,206); +INSERT INTO product_slots VALUES(58,207); +INSERT INTO product_slots VALUES(58,208); +INSERT INTO product_slots VALUES(58,209); +INSERT INTO product_slots VALUES(58,210); +INSERT INTO product_slots VALUES(58,211); +INSERT INTO product_slots VALUES(58,212); +INSERT INTO product_slots VALUES(58,213); +INSERT INTO product_slots VALUES(58,214); +INSERT INTO product_slots VALUES(58,215); +INSERT INTO product_slots VALUES(58,216); +INSERT INTO product_slots VALUES(58,217); +INSERT INTO product_slots VALUES(58,218); +INSERT INTO product_slots VALUES(58,219); +INSERT INTO product_slots VALUES(58,220); +INSERT INTO product_slots VALUES(58,221); +INSERT INTO product_slots VALUES(58,222); +INSERT INTO product_slots VALUES(58,223); +INSERT INTO product_slots VALUES(58,224); +INSERT INTO product_slots VALUES(58,225); +INSERT INTO product_slots VALUES(58,226); +INSERT INTO product_slots VALUES(58,227); +INSERT INTO product_slots VALUES(58,228); +INSERT INTO product_slots VALUES(58,229); +INSERT INTO product_slots VALUES(58,230); +INSERT INTO product_slots VALUES(58,231); +INSERT INTO product_slots VALUES(58,232); +INSERT INTO product_slots VALUES(58,233); +INSERT INTO product_slots VALUES(58,234); +INSERT INTO product_slots VALUES(58,235); +INSERT INTO product_slots VALUES(58,236); +INSERT INTO product_slots VALUES(58,237); +INSERT INTO product_slots VALUES(58,238); +INSERT INTO product_slots VALUES(58,239); +INSERT INTO product_slots VALUES(58,240); +INSERT INTO product_slots VALUES(58,241); +INSERT INTO product_slots VALUES(58,242); +INSERT INTO product_slots VALUES(58,243); +INSERT INTO product_slots VALUES(58,244); +INSERT INTO product_slots VALUES(58,274); +INSERT INTO product_slots VALUES(58,275); +INSERT INTO product_slots VALUES(58,279); +INSERT INTO product_slots VALUES(58,280); +INSERT INTO product_slots VALUES(58,281); +INSERT INTO product_slots VALUES(58,282); +INSERT INTO product_slots VALUES(58,283); +INSERT INTO product_slots VALUES(58,284); +INSERT INTO product_slots VALUES(58,285); +INSERT INTO product_slots VALUES(58,286); +INSERT INTO product_slots VALUES(58,287); +INSERT INTO product_slots VALUES(59,39); +INSERT INTO product_slots VALUES(59,40); +INSERT INTO product_slots VALUES(59,43); +INSERT INTO product_slots VALUES(59,45); +INSERT INTO product_slots VALUES(59,46); +INSERT INTO product_slots VALUES(59,48); +INSERT INTO product_slots VALUES(59,49); +INSERT INTO product_slots VALUES(59,51); +INSERT INTO product_slots VALUES(59,52); +INSERT INTO product_slots VALUES(59,53); +INSERT INTO product_slots VALUES(59,54); +INSERT INTO product_slots VALUES(59,57); +INSERT INTO product_slots VALUES(59,58); +INSERT INTO product_slots VALUES(59,59); +INSERT INTO product_slots VALUES(59,60); +INSERT INTO product_slots VALUES(59,61); +INSERT INTO product_slots VALUES(59,62); +INSERT INTO product_slots VALUES(59,63); +INSERT INTO product_slots VALUES(59,64); +INSERT INTO product_slots VALUES(59,65); +INSERT INTO product_slots VALUES(59,66); +INSERT INTO product_slots VALUES(59,67); +INSERT INTO product_slots VALUES(59,68); +INSERT INTO product_slots VALUES(59,69); +INSERT INTO product_slots VALUES(59,70); +INSERT INTO product_slots VALUES(59,71); +INSERT INTO product_slots VALUES(59,72); +INSERT INTO product_slots VALUES(59,73); +INSERT INTO product_slots VALUES(59,74); +INSERT INTO product_slots VALUES(59,75); +INSERT INTO product_slots VALUES(59,76); +INSERT INTO product_slots VALUES(59,77); +INSERT INTO product_slots VALUES(59,78); +INSERT INTO product_slots VALUES(59,79); +INSERT INTO product_slots VALUES(59,80); +INSERT INTO product_slots VALUES(59,81); +INSERT INTO product_slots VALUES(59,82); +INSERT INTO product_slots VALUES(59,83); +INSERT INTO product_slots VALUES(59,84); +INSERT INTO product_slots VALUES(59,85); +INSERT INTO product_slots VALUES(59,86); +INSERT INTO product_slots VALUES(59,87); +INSERT INTO product_slots VALUES(59,88); +INSERT INTO product_slots VALUES(59,89); +INSERT INTO product_slots VALUES(59,90); +INSERT INTO product_slots VALUES(59,91); +INSERT INTO product_slots VALUES(59,92); +INSERT INTO product_slots VALUES(59,93); +INSERT INTO product_slots VALUES(59,94); +INSERT INTO product_slots VALUES(59,95); +INSERT INTO product_slots VALUES(59,96); +INSERT INTO product_slots VALUES(59,97); +INSERT INTO product_slots VALUES(59,98); +INSERT INTO product_slots VALUES(59,99); +INSERT INTO product_slots VALUES(59,100); +INSERT INTO product_slots VALUES(59,102); +INSERT INTO product_slots VALUES(59,103); +INSERT INTO product_slots VALUES(59,104); +INSERT INTO product_slots VALUES(59,105); +INSERT INTO product_slots VALUES(59,106); +INSERT INTO product_slots VALUES(59,107); +INSERT INTO product_slots VALUES(59,108); +INSERT INTO product_slots VALUES(59,109); +INSERT INTO product_slots VALUES(59,110); +INSERT INTO product_slots VALUES(59,111); +INSERT INTO product_slots VALUES(59,112); +INSERT INTO product_slots VALUES(59,113); +INSERT INTO product_slots VALUES(59,114); +INSERT INTO product_slots VALUES(59,115); +INSERT INTO product_slots VALUES(59,117); +INSERT INTO product_slots VALUES(59,118); +INSERT INTO product_slots VALUES(59,119); +INSERT INTO product_slots VALUES(59,120); +INSERT INTO product_slots VALUES(59,121); +INSERT INTO product_slots VALUES(59,122); +INSERT INTO product_slots VALUES(59,123); +INSERT INTO product_slots VALUES(59,124); +INSERT INTO product_slots VALUES(59,125); +INSERT INTO product_slots VALUES(59,126); +INSERT INTO product_slots VALUES(59,127); +INSERT INTO product_slots VALUES(59,128); +INSERT INTO product_slots VALUES(59,129); +INSERT INTO product_slots VALUES(59,130); +INSERT INTO product_slots VALUES(59,131); +INSERT INTO product_slots VALUES(59,132); +INSERT INTO product_slots VALUES(59,133); +INSERT INTO product_slots VALUES(59,134); +INSERT INTO product_slots VALUES(59,135); +INSERT INTO product_slots VALUES(59,136); +INSERT INTO product_slots VALUES(59,138); +INSERT INTO product_slots VALUES(59,139); +INSERT INTO product_slots VALUES(59,140); +INSERT INTO product_slots VALUES(59,141); +INSERT INTO product_slots VALUES(59,142); +INSERT INTO product_slots VALUES(59,143); +INSERT INTO product_slots VALUES(59,145); +INSERT INTO product_slots VALUES(59,146); +INSERT INTO product_slots VALUES(59,147); +INSERT INTO product_slots VALUES(59,148); +INSERT INTO product_slots VALUES(59,149); +INSERT INTO product_slots VALUES(59,150); +INSERT INTO product_slots VALUES(59,151); +INSERT INTO product_slots VALUES(59,152); +INSERT INTO product_slots VALUES(59,153); +INSERT INTO product_slots VALUES(59,154); +INSERT INTO product_slots VALUES(59,155); +INSERT INTO product_slots VALUES(59,156); +INSERT INTO product_slots VALUES(59,157); +INSERT INTO product_slots VALUES(59,158); +INSERT INTO product_slots VALUES(59,159); +INSERT INTO product_slots VALUES(59,160); +INSERT INTO product_slots VALUES(59,161); +INSERT INTO product_slots VALUES(59,162); +INSERT INTO product_slots VALUES(59,163); +INSERT INTO product_slots VALUES(59,164); +INSERT INTO product_slots VALUES(59,165); +INSERT INTO product_slots VALUES(59,166); +INSERT INTO product_slots VALUES(59,167); +INSERT INTO product_slots VALUES(59,168); +INSERT INTO product_slots VALUES(59,169); +INSERT INTO product_slots VALUES(59,170); +INSERT INTO product_slots VALUES(59,171); +INSERT INTO product_slots VALUES(59,172); +INSERT INTO product_slots VALUES(59,173); +INSERT INTO product_slots VALUES(59,174); +INSERT INTO product_slots VALUES(59,175); +INSERT INTO product_slots VALUES(59,176); +INSERT INTO product_slots VALUES(59,177); +INSERT INTO product_slots VALUES(59,178); +INSERT INTO product_slots VALUES(59,179); +INSERT INTO product_slots VALUES(59,180); +INSERT INTO product_slots VALUES(59,181); +INSERT INTO product_slots VALUES(59,182); +INSERT INTO product_slots VALUES(59,183); +INSERT INTO product_slots VALUES(59,184); +INSERT INTO product_slots VALUES(59,185); +INSERT INTO product_slots VALUES(59,186); +INSERT INTO product_slots VALUES(59,187); +INSERT INTO product_slots VALUES(59,188); +INSERT INTO product_slots VALUES(59,189); +INSERT INTO product_slots VALUES(59,190); +INSERT INTO product_slots VALUES(59,191); +INSERT INTO product_slots VALUES(59,192); +INSERT INTO product_slots VALUES(59,193); +INSERT INTO product_slots VALUES(59,194); +INSERT INTO product_slots VALUES(59,195); +INSERT INTO product_slots VALUES(59,196); +INSERT INTO product_slots VALUES(59,197); +INSERT INTO product_slots VALUES(59,198); +INSERT INTO product_slots VALUES(59,199); +INSERT INTO product_slots VALUES(59,200); +INSERT INTO product_slots VALUES(59,201); +INSERT INTO product_slots VALUES(59,202); +INSERT INTO product_slots VALUES(59,203); +INSERT INTO product_slots VALUES(59,204); +INSERT INTO product_slots VALUES(59,205); +INSERT INTO product_slots VALUES(59,206); +INSERT INTO product_slots VALUES(59,207); +INSERT INTO product_slots VALUES(59,208); +INSERT INTO product_slots VALUES(59,209); +INSERT INTO product_slots VALUES(59,210); +INSERT INTO product_slots VALUES(59,211); +INSERT INTO product_slots VALUES(59,212); +INSERT INTO product_slots VALUES(59,213); +INSERT INTO product_slots VALUES(59,214); +INSERT INTO product_slots VALUES(59,215); +INSERT INTO product_slots VALUES(59,216); +INSERT INTO product_slots VALUES(59,217); +INSERT INTO product_slots VALUES(59,218); +INSERT INTO product_slots VALUES(59,219); +INSERT INTO product_slots VALUES(59,220); +INSERT INTO product_slots VALUES(59,221); +INSERT INTO product_slots VALUES(59,222); +INSERT INTO product_slots VALUES(59,223); +INSERT INTO product_slots VALUES(59,224); +INSERT INTO product_slots VALUES(59,225); +INSERT INTO product_slots VALUES(59,226); +INSERT INTO product_slots VALUES(59,227); +INSERT INTO product_slots VALUES(59,228); +INSERT INTO product_slots VALUES(59,229); +INSERT INTO product_slots VALUES(59,230); +INSERT INTO product_slots VALUES(59,231); +INSERT INTO product_slots VALUES(59,232); +INSERT INTO product_slots VALUES(59,233); +INSERT INTO product_slots VALUES(59,234); +INSERT INTO product_slots VALUES(59,235); +INSERT INTO product_slots VALUES(59,236); +INSERT INTO product_slots VALUES(59,237); +INSERT INTO product_slots VALUES(59,238); +INSERT INTO product_slots VALUES(59,239); +INSERT INTO product_slots VALUES(59,240); +INSERT INTO product_slots VALUES(59,241); +INSERT INTO product_slots VALUES(59,242); +INSERT INTO product_slots VALUES(59,243); +INSERT INTO product_slots VALUES(59,244); +INSERT INTO product_slots VALUES(59,274); +INSERT INTO product_slots VALUES(59,275); +INSERT INTO product_slots VALUES(59,279); +INSERT INTO product_slots VALUES(59,280); +INSERT INTO product_slots VALUES(59,281); +INSERT INTO product_slots VALUES(59,282); +INSERT INTO product_slots VALUES(59,283); +INSERT INTO product_slots VALUES(59,284); +INSERT INTO product_slots VALUES(59,285); +INSERT INTO product_slots VALUES(59,286); +INSERT INTO product_slots VALUES(59,287); +INSERT INTO product_slots VALUES(60,39); +INSERT INTO product_slots VALUES(60,40); +INSERT INTO product_slots VALUES(60,43); +INSERT INTO product_slots VALUES(60,45); +INSERT INTO product_slots VALUES(60,46); +INSERT INTO product_slots VALUES(60,48); +INSERT INTO product_slots VALUES(60,49); +INSERT INTO product_slots VALUES(60,51); +INSERT INTO product_slots VALUES(60,52); +INSERT INTO product_slots VALUES(60,53); +INSERT INTO product_slots VALUES(60,54); +INSERT INTO product_slots VALUES(60,57); +INSERT INTO product_slots VALUES(60,58); +INSERT INTO product_slots VALUES(60,59); +INSERT INTO product_slots VALUES(60,60); +INSERT INTO product_slots VALUES(60,61); +INSERT INTO product_slots VALUES(60,62); +INSERT INTO product_slots VALUES(60,63); +INSERT INTO product_slots VALUES(60,64); +INSERT INTO product_slots VALUES(60,65); +INSERT INTO product_slots VALUES(60,66); +INSERT INTO product_slots VALUES(60,67); +INSERT INTO product_slots VALUES(60,68); +INSERT INTO product_slots VALUES(60,69); +INSERT INTO product_slots VALUES(60,70); +INSERT INTO product_slots VALUES(60,71); +INSERT INTO product_slots VALUES(60,72); +INSERT INTO product_slots VALUES(60,73); +INSERT INTO product_slots VALUES(60,74); +INSERT INTO product_slots VALUES(60,75); +INSERT INTO product_slots VALUES(60,76); +INSERT INTO product_slots VALUES(60,77); +INSERT INTO product_slots VALUES(60,78); +INSERT INTO product_slots VALUES(60,79); +INSERT INTO product_slots VALUES(60,80); +INSERT INTO product_slots VALUES(60,81); +INSERT INTO product_slots VALUES(60,82); +INSERT INTO product_slots VALUES(60,83); +INSERT INTO product_slots VALUES(60,84); +INSERT INTO product_slots VALUES(60,85); +INSERT INTO product_slots VALUES(60,86); +INSERT INTO product_slots VALUES(60,87); +INSERT INTO product_slots VALUES(60,88); +INSERT INTO product_slots VALUES(60,89); +INSERT INTO product_slots VALUES(60,90); +INSERT INTO product_slots VALUES(60,91); +INSERT INTO product_slots VALUES(60,92); +INSERT INTO product_slots VALUES(60,93); +INSERT INTO product_slots VALUES(60,94); +INSERT INTO product_slots VALUES(60,95); +INSERT INTO product_slots VALUES(60,96); +INSERT INTO product_slots VALUES(60,97); +INSERT INTO product_slots VALUES(60,98); +INSERT INTO product_slots VALUES(60,99); +INSERT INTO product_slots VALUES(60,100); +INSERT INTO product_slots VALUES(60,102); +INSERT INTO product_slots VALUES(60,103); +INSERT INTO product_slots VALUES(60,104); +INSERT INTO product_slots VALUES(60,105); +INSERT INTO product_slots VALUES(60,106); +INSERT INTO product_slots VALUES(60,107); +INSERT INTO product_slots VALUES(60,108); +INSERT INTO product_slots VALUES(60,109); +INSERT INTO product_slots VALUES(60,110); +INSERT INTO product_slots VALUES(60,111); +INSERT INTO product_slots VALUES(60,112); +INSERT INTO product_slots VALUES(60,113); +INSERT INTO product_slots VALUES(60,114); +INSERT INTO product_slots VALUES(60,115); +INSERT INTO product_slots VALUES(60,117); +INSERT INTO product_slots VALUES(60,118); +INSERT INTO product_slots VALUES(60,119); +INSERT INTO product_slots VALUES(60,120); +INSERT INTO product_slots VALUES(60,121); +INSERT INTO product_slots VALUES(60,122); +INSERT INTO product_slots VALUES(60,123); +INSERT INTO product_slots VALUES(60,124); +INSERT INTO product_slots VALUES(60,125); +INSERT INTO product_slots VALUES(60,126); +INSERT INTO product_slots VALUES(60,127); +INSERT INTO product_slots VALUES(60,128); +INSERT INTO product_slots VALUES(60,129); +INSERT INTO product_slots VALUES(60,130); +INSERT INTO product_slots VALUES(60,131); +INSERT INTO product_slots VALUES(60,132); +INSERT INTO product_slots VALUES(60,133); +INSERT INTO product_slots VALUES(60,134); +INSERT INTO product_slots VALUES(60,135); +INSERT INTO product_slots VALUES(60,136); +INSERT INTO product_slots VALUES(60,138); +INSERT INTO product_slots VALUES(60,139); +INSERT INTO product_slots VALUES(60,140); +INSERT INTO product_slots VALUES(60,141); +INSERT INTO product_slots VALUES(60,142); +INSERT INTO product_slots VALUES(60,143); +INSERT INTO product_slots VALUES(60,145); +INSERT INTO product_slots VALUES(60,146); +INSERT INTO product_slots VALUES(60,147); +INSERT INTO product_slots VALUES(60,148); +INSERT INTO product_slots VALUES(60,149); +INSERT INTO product_slots VALUES(60,150); +INSERT INTO product_slots VALUES(60,151); +INSERT INTO product_slots VALUES(60,152); +INSERT INTO product_slots VALUES(60,153); +INSERT INTO product_slots VALUES(60,154); +INSERT INTO product_slots VALUES(60,155); +INSERT INTO product_slots VALUES(60,156); +INSERT INTO product_slots VALUES(60,157); +INSERT INTO product_slots VALUES(60,158); +INSERT INTO product_slots VALUES(60,159); +INSERT INTO product_slots VALUES(60,160); +INSERT INTO product_slots VALUES(60,161); +INSERT INTO product_slots VALUES(60,162); +INSERT INTO product_slots VALUES(60,163); +INSERT INTO product_slots VALUES(60,164); +INSERT INTO product_slots VALUES(60,165); +INSERT INTO product_slots VALUES(60,166); +INSERT INTO product_slots VALUES(60,167); +INSERT INTO product_slots VALUES(60,168); +INSERT INTO product_slots VALUES(60,169); +INSERT INTO product_slots VALUES(60,170); +INSERT INTO product_slots VALUES(60,171); +INSERT INTO product_slots VALUES(60,172); +INSERT INTO product_slots VALUES(60,173); +INSERT INTO product_slots VALUES(60,174); +INSERT INTO product_slots VALUES(60,175); +INSERT INTO product_slots VALUES(60,176); +INSERT INTO product_slots VALUES(60,177); +INSERT INTO product_slots VALUES(60,178); +INSERT INTO product_slots VALUES(60,179); +INSERT INTO product_slots VALUES(60,180); +INSERT INTO product_slots VALUES(60,181); +INSERT INTO product_slots VALUES(60,182); +INSERT INTO product_slots VALUES(60,183); +INSERT INTO product_slots VALUES(60,184); +INSERT INTO product_slots VALUES(60,185); +INSERT INTO product_slots VALUES(60,186); +INSERT INTO product_slots VALUES(60,187); +INSERT INTO product_slots VALUES(60,188); +INSERT INTO product_slots VALUES(60,189); +INSERT INTO product_slots VALUES(60,190); +INSERT INTO product_slots VALUES(60,191); +INSERT INTO product_slots VALUES(60,192); +INSERT INTO product_slots VALUES(60,193); +INSERT INTO product_slots VALUES(60,194); +INSERT INTO product_slots VALUES(60,195); +INSERT INTO product_slots VALUES(60,196); +INSERT INTO product_slots VALUES(60,197); +INSERT INTO product_slots VALUES(60,198); +INSERT INTO product_slots VALUES(60,199); +INSERT INTO product_slots VALUES(60,200); +INSERT INTO product_slots VALUES(60,201); +INSERT INTO product_slots VALUES(60,202); +INSERT INTO product_slots VALUES(60,203); +INSERT INTO product_slots VALUES(60,204); +INSERT INTO product_slots VALUES(60,205); +INSERT INTO product_slots VALUES(60,206); +INSERT INTO product_slots VALUES(60,207); +INSERT INTO product_slots VALUES(60,208); +INSERT INTO product_slots VALUES(60,209); +INSERT INTO product_slots VALUES(60,210); +INSERT INTO product_slots VALUES(60,211); +INSERT INTO product_slots VALUES(60,212); +INSERT INTO product_slots VALUES(60,213); +INSERT INTO product_slots VALUES(60,214); +INSERT INTO product_slots VALUES(60,215); +INSERT INTO product_slots VALUES(60,216); +INSERT INTO product_slots VALUES(60,217); +INSERT INTO product_slots VALUES(60,218); +INSERT INTO product_slots VALUES(60,219); +INSERT INTO product_slots VALUES(60,220); +INSERT INTO product_slots VALUES(60,221); +INSERT INTO product_slots VALUES(60,222); +INSERT INTO product_slots VALUES(60,223); +INSERT INTO product_slots VALUES(60,224); +INSERT INTO product_slots VALUES(60,225); +INSERT INTO product_slots VALUES(60,226); +INSERT INTO product_slots VALUES(60,227); +INSERT INTO product_slots VALUES(60,228); +INSERT INTO product_slots VALUES(60,229); +INSERT INTO product_slots VALUES(60,230); +INSERT INTO product_slots VALUES(60,231); +INSERT INTO product_slots VALUES(60,232); +INSERT INTO product_slots VALUES(60,233); +INSERT INTO product_slots VALUES(60,234); +INSERT INTO product_slots VALUES(60,235); +INSERT INTO product_slots VALUES(60,236); +INSERT INTO product_slots VALUES(60,237); +INSERT INTO product_slots VALUES(60,238); +INSERT INTO product_slots VALUES(60,239); +INSERT INTO product_slots VALUES(60,240); +INSERT INTO product_slots VALUES(60,241); +INSERT INTO product_slots VALUES(60,242); +INSERT INTO product_slots VALUES(60,243); +INSERT INTO product_slots VALUES(60,244); +INSERT INTO product_slots VALUES(60,274); +INSERT INTO product_slots VALUES(60,275); +INSERT INTO product_slots VALUES(60,279); +INSERT INTO product_slots VALUES(60,280); +INSERT INTO product_slots VALUES(60,281); +INSERT INTO product_slots VALUES(60,282); +INSERT INTO product_slots VALUES(60,283); +INSERT INTO product_slots VALUES(60,284); +INSERT INTO product_slots VALUES(60,285); +INSERT INTO product_slots VALUES(60,286); +INSERT INTO product_slots VALUES(60,287); +INSERT INTO product_slots VALUES(61,39); +INSERT INTO product_slots VALUES(61,40); +INSERT INTO product_slots VALUES(61,43); +INSERT INTO product_slots VALUES(61,45); +INSERT INTO product_slots VALUES(61,46); +INSERT INTO product_slots VALUES(61,48); +INSERT INTO product_slots VALUES(61,49); +INSERT INTO product_slots VALUES(61,51); +INSERT INTO product_slots VALUES(61,52); +INSERT INTO product_slots VALUES(61,53); +INSERT INTO product_slots VALUES(61,54); +INSERT INTO product_slots VALUES(61,57); +INSERT INTO product_slots VALUES(61,58); +INSERT INTO product_slots VALUES(61,59); +INSERT INTO product_slots VALUES(61,60); +INSERT INTO product_slots VALUES(61,61); +INSERT INTO product_slots VALUES(61,62); +INSERT INTO product_slots VALUES(61,63); +INSERT INTO product_slots VALUES(61,64); +INSERT INTO product_slots VALUES(61,65); +INSERT INTO product_slots VALUES(61,66); +INSERT INTO product_slots VALUES(61,67); +INSERT INTO product_slots VALUES(61,68); +INSERT INTO product_slots VALUES(61,69); +INSERT INTO product_slots VALUES(61,70); +INSERT INTO product_slots VALUES(61,71); +INSERT INTO product_slots VALUES(61,72); +INSERT INTO product_slots VALUES(61,73); +INSERT INTO product_slots VALUES(61,74); +INSERT INTO product_slots VALUES(61,75); +INSERT INTO product_slots VALUES(61,76); +INSERT INTO product_slots VALUES(61,77); +INSERT INTO product_slots VALUES(61,78); +INSERT INTO product_slots VALUES(61,79); +INSERT INTO product_slots VALUES(61,80); +INSERT INTO product_slots VALUES(61,81); +INSERT INTO product_slots VALUES(61,82); +INSERT INTO product_slots VALUES(61,83); +INSERT INTO product_slots VALUES(61,84); +INSERT INTO product_slots VALUES(61,85); +INSERT INTO product_slots VALUES(61,86); +INSERT INTO product_slots VALUES(61,87); +INSERT INTO product_slots VALUES(61,88); +INSERT INTO product_slots VALUES(61,89); +INSERT INTO product_slots VALUES(61,90); +INSERT INTO product_slots VALUES(61,91); +INSERT INTO product_slots VALUES(61,92); +INSERT INTO product_slots VALUES(61,93); +INSERT INTO product_slots VALUES(61,94); +INSERT INTO product_slots VALUES(61,95); +INSERT INTO product_slots VALUES(61,96); +INSERT INTO product_slots VALUES(61,97); +INSERT INTO product_slots VALUES(61,98); +INSERT INTO product_slots VALUES(61,99); +INSERT INTO product_slots VALUES(61,100); +INSERT INTO product_slots VALUES(61,102); +INSERT INTO product_slots VALUES(61,103); +INSERT INTO product_slots VALUES(61,104); +INSERT INTO product_slots VALUES(61,105); +INSERT INTO product_slots VALUES(61,106); +INSERT INTO product_slots VALUES(61,107); +INSERT INTO product_slots VALUES(61,108); +INSERT INTO product_slots VALUES(61,109); +INSERT INTO product_slots VALUES(61,110); +INSERT INTO product_slots VALUES(61,111); +INSERT INTO product_slots VALUES(61,112); +INSERT INTO product_slots VALUES(61,113); +INSERT INTO product_slots VALUES(61,114); +INSERT INTO product_slots VALUES(61,115); +INSERT INTO product_slots VALUES(61,117); +INSERT INTO product_slots VALUES(61,118); +INSERT INTO product_slots VALUES(61,119); +INSERT INTO product_slots VALUES(61,120); +INSERT INTO product_slots VALUES(61,121); +INSERT INTO product_slots VALUES(61,122); +INSERT INTO product_slots VALUES(61,123); +INSERT INTO product_slots VALUES(61,124); +INSERT INTO product_slots VALUES(61,125); +INSERT INTO product_slots VALUES(61,126); +INSERT INTO product_slots VALUES(61,127); +INSERT INTO product_slots VALUES(61,128); +INSERT INTO product_slots VALUES(61,129); +INSERT INTO product_slots VALUES(61,130); +INSERT INTO product_slots VALUES(61,131); +INSERT INTO product_slots VALUES(61,132); +INSERT INTO product_slots VALUES(61,133); +INSERT INTO product_slots VALUES(61,134); +INSERT INTO product_slots VALUES(61,135); +INSERT INTO product_slots VALUES(61,136); +INSERT INTO product_slots VALUES(61,138); +INSERT INTO product_slots VALUES(61,139); +INSERT INTO product_slots VALUES(61,140); +INSERT INTO product_slots VALUES(61,141); +INSERT INTO product_slots VALUES(61,142); +INSERT INTO product_slots VALUES(61,143); +INSERT INTO product_slots VALUES(61,145); +INSERT INTO product_slots VALUES(61,146); +INSERT INTO product_slots VALUES(61,147); +INSERT INTO product_slots VALUES(61,148); +INSERT INTO product_slots VALUES(61,149); +INSERT INTO product_slots VALUES(61,150); +INSERT INTO product_slots VALUES(61,151); +INSERT INTO product_slots VALUES(61,152); +INSERT INTO product_slots VALUES(61,153); +INSERT INTO product_slots VALUES(61,154); +INSERT INTO product_slots VALUES(61,155); +INSERT INTO product_slots VALUES(61,156); +INSERT INTO product_slots VALUES(61,157); +INSERT INTO product_slots VALUES(61,158); +INSERT INTO product_slots VALUES(61,159); +INSERT INTO product_slots VALUES(61,160); +INSERT INTO product_slots VALUES(61,161); +INSERT INTO product_slots VALUES(61,162); +INSERT INTO product_slots VALUES(61,163); +INSERT INTO product_slots VALUES(61,164); +INSERT INTO product_slots VALUES(61,165); +INSERT INTO product_slots VALUES(61,166); +INSERT INTO product_slots VALUES(61,167); +INSERT INTO product_slots VALUES(61,168); +INSERT INTO product_slots VALUES(61,169); +INSERT INTO product_slots VALUES(61,170); +INSERT INTO product_slots VALUES(61,171); +INSERT INTO product_slots VALUES(61,172); +INSERT INTO product_slots VALUES(61,173); +INSERT INTO product_slots VALUES(61,174); +INSERT INTO product_slots VALUES(61,175); +INSERT INTO product_slots VALUES(61,176); +INSERT INTO product_slots VALUES(61,177); +INSERT INTO product_slots VALUES(61,178); +INSERT INTO product_slots VALUES(61,179); +INSERT INTO product_slots VALUES(61,180); +INSERT INTO product_slots VALUES(61,181); +INSERT INTO product_slots VALUES(61,182); +INSERT INTO product_slots VALUES(61,183); +INSERT INTO product_slots VALUES(61,184); +INSERT INTO product_slots VALUES(61,185); +INSERT INTO product_slots VALUES(61,186); +INSERT INTO product_slots VALUES(61,187); +INSERT INTO product_slots VALUES(61,188); +INSERT INTO product_slots VALUES(61,189); +INSERT INTO product_slots VALUES(61,190); +INSERT INTO product_slots VALUES(61,191); +INSERT INTO product_slots VALUES(61,192); +INSERT INTO product_slots VALUES(61,193); +INSERT INTO product_slots VALUES(61,194); +INSERT INTO product_slots VALUES(61,195); +INSERT INTO product_slots VALUES(61,196); +INSERT INTO product_slots VALUES(61,197); +INSERT INTO product_slots VALUES(61,198); +INSERT INTO product_slots VALUES(61,199); +INSERT INTO product_slots VALUES(61,200); +INSERT INTO product_slots VALUES(61,201); +INSERT INTO product_slots VALUES(61,202); +INSERT INTO product_slots VALUES(61,203); +INSERT INTO product_slots VALUES(61,204); +INSERT INTO product_slots VALUES(61,205); +INSERT INTO product_slots VALUES(61,206); +INSERT INTO product_slots VALUES(61,207); +INSERT INTO product_slots VALUES(61,208); +INSERT INTO product_slots VALUES(61,209); +INSERT INTO product_slots VALUES(61,210); +INSERT INTO product_slots VALUES(61,211); +INSERT INTO product_slots VALUES(61,212); +INSERT INTO product_slots VALUES(61,213); +INSERT INTO product_slots VALUES(61,214); +INSERT INTO product_slots VALUES(61,215); +INSERT INTO product_slots VALUES(61,216); +INSERT INTO product_slots VALUES(61,217); +INSERT INTO product_slots VALUES(61,218); +INSERT INTO product_slots VALUES(61,219); +INSERT INTO product_slots VALUES(61,220); +INSERT INTO product_slots VALUES(61,221); +INSERT INTO product_slots VALUES(61,222); +INSERT INTO product_slots VALUES(61,223); +INSERT INTO product_slots VALUES(61,224); +INSERT INTO product_slots VALUES(61,225); +INSERT INTO product_slots VALUES(61,226); +INSERT INTO product_slots VALUES(61,227); +INSERT INTO product_slots VALUES(61,228); +INSERT INTO product_slots VALUES(61,229); +INSERT INTO product_slots VALUES(61,230); +INSERT INTO product_slots VALUES(61,231); +INSERT INTO product_slots VALUES(61,232); +INSERT INTO product_slots VALUES(61,233); +INSERT INTO product_slots VALUES(61,234); +INSERT INTO product_slots VALUES(61,235); +INSERT INTO product_slots VALUES(61,236); +INSERT INTO product_slots VALUES(61,237); +INSERT INTO product_slots VALUES(61,238); +INSERT INTO product_slots VALUES(61,239); +INSERT INTO product_slots VALUES(61,240); +INSERT INTO product_slots VALUES(61,241); +INSERT INTO product_slots VALUES(61,242); +INSERT INTO product_slots VALUES(61,243); +INSERT INTO product_slots VALUES(61,244); +INSERT INTO product_slots VALUES(61,274); +INSERT INTO product_slots VALUES(61,275); +INSERT INTO product_slots VALUES(61,279); +INSERT INTO product_slots VALUES(61,280); +INSERT INTO product_slots VALUES(61,281); +INSERT INTO product_slots VALUES(61,282); +INSERT INTO product_slots VALUES(61,283); +INSERT INTO product_slots VALUES(61,284); +INSERT INTO product_slots VALUES(61,285); +INSERT INTO product_slots VALUES(61,286); +INSERT INTO product_slots VALUES(61,287); +INSERT INTO product_slots VALUES(62,39); +INSERT INTO product_slots VALUES(62,40); +INSERT INTO product_slots VALUES(62,43); +INSERT INTO product_slots VALUES(62,45); +INSERT INTO product_slots VALUES(62,46); +INSERT INTO product_slots VALUES(62,48); +INSERT INTO product_slots VALUES(62,49); +INSERT INTO product_slots VALUES(62,51); +INSERT INTO product_slots VALUES(62,52); +INSERT INTO product_slots VALUES(62,53); +INSERT INTO product_slots VALUES(62,54); +INSERT INTO product_slots VALUES(62,57); +INSERT INTO product_slots VALUES(62,58); +INSERT INTO product_slots VALUES(62,59); +INSERT INTO product_slots VALUES(62,60); +INSERT INTO product_slots VALUES(62,61); +INSERT INTO product_slots VALUES(62,62); +INSERT INTO product_slots VALUES(62,63); +INSERT INTO product_slots VALUES(62,64); +INSERT INTO product_slots VALUES(62,65); +INSERT INTO product_slots VALUES(62,66); +INSERT INTO product_slots VALUES(62,67); +INSERT INTO product_slots VALUES(62,68); +INSERT INTO product_slots VALUES(62,69); +INSERT INTO product_slots VALUES(62,70); +INSERT INTO product_slots VALUES(62,71); +INSERT INTO product_slots VALUES(62,72); +INSERT INTO product_slots VALUES(62,73); +INSERT INTO product_slots VALUES(62,74); +INSERT INTO product_slots VALUES(62,75); +INSERT INTO product_slots VALUES(62,76); +INSERT INTO product_slots VALUES(62,77); +INSERT INTO product_slots VALUES(62,78); +INSERT INTO product_slots VALUES(62,79); +INSERT INTO product_slots VALUES(62,80); +INSERT INTO product_slots VALUES(62,81); +INSERT INTO product_slots VALUES(62,82); +INSERT INTO product_slots VALUES(62,83); +INSERT INTO product_slots VALUES(62,84); +INSERT INTO product_slots VALUES(62,85); +INSERT INTO product_slots VALUES(62,86); +INSERT INTO product_slots VALUES(62,87); +INSERT INTO product_slots VALUES(62,88); +INSERT INTO product_slots VALUES(62,89); +INSERT INTO product_slots VALUES(62,90); +INSERT INTO product_slots VALUES(62,91); +INSERT INTO product_slots VALUES(62,92); +INSERT INTO product_slots VALUES(62,93); +INSERT INTO product_slots VALUES(62,94); +INSERT INTO product_slots VALUES(62,95); +INSERT INTO product_slots VALUES(62,96); +INSERT INTO product_slots VALUES(62,97); +INSERT INTO product_slots VALUES(62,98); +INSERT INTO product_slots VALUES(62,99); +INSERT INTO product_slots VALUES(62,100); +INSERT INTO product_slots VALUES(62,102); +INSERT INTO product_slots VALUES(62,103); +INSERT INTO product_slots VALUES(62,104); +INSERT INTO product_slots VALUES(62,105); +INSERT INTO product_slots VALUES(62,106); +INSERT INTO product_slots VALUES(62,107); +INSERT INTO product_slots VALUES(62,108); +INSERT INTO product_slots VALUES(62,109); +INSERT INTO product_slots VALUES(62,110); +INSERT INTO product_slots VALUES(62,111); +INSERT INTO product_slots VALUES(62,112); +INSERT INTO product_slots VALUES(62,113); +INSERT INTO product_slots VALUES(62,114); +INSERT INTO product_slots VALUES(62,115); +INSERT INTO product_slots VALUES(62,117); +INSERT INTO product_slots VALUES(62,118); +INSERT INTO product_slots VALUES(62,119); +INSERT INTO product_slots VALUES(62,120); +INSERT INTO product_slots VALUES(62,121); +INSERT INTO product_slots VALUES(62,122); +INSERT INTO product_slots VALUES(62,123); +INSERT INTO product_slots VALUES(62,124); +INSERT INTO product_slots VALUES(62,125); +INSERT INTO product_slots VALUES(62,126); +INSERT INTO product_slots VALUES(62,127); +INSERT INTO product_slots VALUES(62,128); +INSERT INTO product_slots VALUES(62,129); +INSERT INTO product_slots VALUES(62,130); +INSERT INTO product_slots VALUES(62,131); +INSERT INTO product_slots VALUES(62,132); +INSERT INTO product_slots VALUES(62,133); +INSERT INTO product_slots VALUES(62,134); +INSERT INTO product_slots VALUES(62,135); +INSERT INTO product_slots VALUES(62,136); +INSERT INTO product_slots VALUES(62,138); +INSERT INTO product_slots VALUES(62,139); +INSERT INTO product_slots VALUES(62,140); +INSERT INTO product_slots VALUES(62,141); +INSERT INTO product_slots VALUES(62,142); +INSERT INTO product_slots VALUES(62,143); +INSERT INTO product_slots VALUES(62,145); +INSERT INTO product_slots VALUES(62,146); +INSERT INTO product_slots VALUES(62,147); +INSERT INTO product_slots VALUES(62,148); +INSERT INTO product_slots VALUES(62,149); +INSERT INTO product_slots VALUES(62,150); +INSERT INTO product_slots VALUES(62,151); +INSERT INTO product_slots VALUES(62,152); +INSERT INTO product_slots VALUES(62,153); +INSERT INTO product_slots VALUES(62,154); +INSERT INTO product_slots VALUES(62,155); +INSERT INTO product_slots VALUES(62,156); +INSERT INTO product_slots VALUES(62,157); +INSERT INTO product_slots VALUES(62,158); +INSERT INTO product_slots VALUES(62,159); +INSERT INTO product_slots VALUES(62,160); +INSERT INTO product_slots VALUES(62,161); +INSERT INTO product_slots VALUES(62,162); +INSERT INTO product_slots VALUES(62,163); +INSERT INTO product_slots VALUES(62,164); +INSERT INTO product_slots VALUES(62,165); +INSERT INTO product_slots VALUES(62,166); +INSERT INTO product_slots VALUES(62,167); +INSERT INTO product_slots VALUES(62,168); +INSERT INTO product_slots VALUES(62,169); +INSERT INTO product_slots VALUES(62,170); +INSERT INTO product_slots VALUES(62,171); +INSERT INTO product_slots VALUES(62,172); +INSERT INTO product_slots VALUES(62,173); +INSERT INTO product_slots VALUES(62,174); +INSERT INTO product_slots VALUES(62,175); +INSERT INTO product_slots VALUES(62,176); +INSERT INTO product_slots VALUES(62,177); +INSERT INTO product_slots VALUES(62,178); +INSERT INTO product_slots VALUES(62,179); +INSERT INTO product_slots VALUES(62,180); +INSERT INTO product_slots VALUES(62,181); +INSERT INTO product_slots VALUES(62,182); +INSERT INTO product_slots VALUES(62,183); +INSERT INTO product_slots VALUES(62,184); +INSERT INTO product_slots VALUES(62,185); +INSERT INTO product_slots VALUES(62,186); +INSERT INTO product_slots VALUES(62,187); +INSERT INTO product_slots VALUES(62,188); +INSERT INTO product_slots VALUES(62,189); +INSERT INTO product_slots VALUES(62,190); +INSERT INTO product_slots VALUES(62,191); +INSERT INTO product_slots VALUES(62,192); +INSERT INTO product_slots VALUES(62,193); +INSERT INTO product_slots VALUES(62,194); +INSERT INTO product_slots VALUES(62,195); +INSERT INTO product_slots VALUES(62,196); +INSERT INTO product_slots VALUES(62,197); +INSERT INTO product_slots VALUES(62,198); +INSERT INTO product_slots VALUES(62,199); +INSERT INTO product_slots VALUES(62,200); +INSERT INTO product_slots VALUES(62,201); +INSERT INTO product_slots VALUES(62,202); +INSERT INTO product_slots VALUES(62,203); +INSERT INTO product_slots VALUES(62,204); +INSERT INTO product_slots VALUES(62,205); +INSERT INTO product_slots VALUES(62,206); +INSERT INTO product_slots VALUES(62,207); +INSERT INTO product_slots VALUES(62,208); +INSERT INTO product_slots VALUES(62,209); +INSERT INTO product_slots VALUES(62,210); +INSERT INTO product_slots VALUES(62,211); +INSERT INTO product_slots VALUES(62,212); +INSERT INTO product_slots VALUES(62,213); +INSERT INTO product_slots VALUES(62,214); +INSERT INTO product_slots VALUES(62,215); +INSERT INTO product_slots VALUES(62,216); +INSERT INTO product_slots VALUES(62,217); +INSERT INTO product_slots VALUES(62,218); +INSERT INTO product_slots VALUES(62,219); +INSERT INTO product_slots VALUES(62,220); +INSERT INTO product_slots VALUES(62,221); +INSERT INTO product_slots VALUES(62,222); +INSERT INTO product_slots VALUES(62,223); +INSERT INTO product_slots VALUES(62,224); +INSERT INTO product_slots VALUES(62,225); +INSERT INTO product_slots VALUES(62,226); +INSERT INTO product_slots VALUES(62,227); +INSERT INTO product_slots VALUES(62,228); +INSERT INTO product_slots VALUES(62,229); +INSERT INTO product_slots VALUES(62,230); +INSERT INTO product_slots VALUES(62,231); +INSERT INTO product_slots VALUES(62,232); +INSERT INTO product_slots VALUES(62,233); +INSERT INTO product_slots VALUES(62,234); +INSERT INTO product_slots VALUES(62,235); +INSERT INTO product_slots VALUES(62,236); +INSERT INTO product_slots VALUES(62,237); +INSERT INTO product_slots VALUES(62,238); +INSERT INTO product_slots VALUES(62,239); +INSERT INTO product_slots VALUES(62,240); +INSERT INTO product_slots VALUES(62,241); +INSERT INTO product_slots VALUES(62,242); +INSERT INTO product_slots VALUES(62,243); +INSERT INTO product_slots VALUES(62,244); +INSERT INTO product_slots VALUES(62,274); +INSERT INTO product_slots VALUES(62,275); +INSERT INTO product_slots VALUES(62,279); +INSERT INTO product_slots VALUES(62,280); +INSERT INTO product_slots VALUES(62,281); +INSERT INTO product_slots VALUES(62,282); +INSERT INTO product_slots VALUES(62,283); +INSERT INTO product_slots VALUES(62,284); +INSERT INTO product_slots VALUES(62,285); +INSERT INTO product_slots VALUES(62,286); +INSERT INTO product_slots VALUES(62,287); +INSERT INTO product_slots VALUES(63,40); +INSERT INTO product_slots VALUES(63,59); +INSERT INTO product_slots VALUES(63,64); +INSERT INTO product_slots VALUES(63,65); +INSERT INTO product_slots VALUES(63,66); +INSERT INTO product_slots VALUES(63,67); +INSERT INTO product_slots VALUES(63,68); +INSERT INTO product_slots VALUES(63,69); +INSERT INTO product_slots VALUES(63,70); +INSERT INTO product_slots VALUES(63,71); +INSERT INTO product_slots VALUES(63,72); +INSERT INTO product_slots VALUES(63,73); +INSERT INTO product_slots VALUES(63,74); +INSERT INTO product_slots VALUES(63,75); +INSERT INTO product_slots VALUES(63,76); +INSERT INTO product_slots VALUES(63,77); +INSERT INTO product_slots VALUES(63,78); +INSERT INTO product_slots VALUES(63,79); +INSERT INTO product_slots VALUES(63,80); +INSERT INTO product_slots VALUES(63,81); +INSERT INTO product_slots VALUES(63,82); +INSERT INTO product_slots VALUES(63,83); +INSERT INTO product_slots VALUES(63,84); +INSERT INTO product_slots VALUES(63,85); +INSERT INTO product_slots VALUES(63,86); +INSERT INTO product_slots VALUES(63,87); +INSERT INTO product_slots VALUES(63,88); +INSERT INTO product_slots VALUES(63,89); +INSERT INTO product_slots VALUES(63,90); +INSERT INTO product_slots VALUES(63,91); +INSERT INTO product_slots VALUES(63,92); +INSERT INTO product_slots VALUES(63,93); +INSERT INTO product_slots VALUES(63,94); +INSERT INTO product_slots VALUES(63,95); +INSERT INTO product_slots VALUES(63,96); +INSERT INTO product_slots VALUES(63,97); +INSERT INTO product_slots VALUES(63,98); +INSERT INTO product_slots VALUES(63,99); +INSERT INTO product_slots VALUES(63,100); +INSERT INTO product_slots VALUES(63,102); +INSERT INTO product_slots VALUES(63,103); +INSERT INTO product_slots VALUES(63,104); +INSERT INTO product_slots VALUES(63,105); +INSERT INTO product_slots VALUES(63,106); +INSERT INTO product_slots VALUES(63,107); +INSERT INTO product_slots VALUES(63,108); +INSERT INTO product_slots VALUES(63,109); +INSERT INTO product_slots VALUES(63,110); +INSERT INTO product_slots VALUES(63,111); +INSERT INTO product_slots VALUES(63,112); +INSERT INTO product_slots VALUES(63,113); +INSERT INTO product_slots VALUES(63,114); +INSERT INTO product_slots VALUES(63,115); +INSERT INTO product_slots VALUES(63,117); +INSERT INTO product_slots VALUES(63,118); +INSERT INTO product_slots VALUES(63,119); +INSERT INTO product_slots VALUES(63,120); +INSERT INTO product_slots VALUES(63,121); +INSERT INTO product_slots VALUES(63,122); +INSERT INTO product_slots VALUES(63,123); +INSERT INTO product_slots VALUES(63,124); +INSERT INTO product_slots VALUES(63,125); +INSERT INTO product_slots VALUES(63,126); +INSERT INTO product_slots VALUES(63,127); +INSERT INTO product_slots VALUES(63,128); +INSERT INTO product_slots VALUES(63,129); +INSERT INTO product_slots VALUES(63,130); +INSERT INTO product_slots VALUES(63,131); +INSERT INTO product_slots VALUES(63,132); +INSERT INTO product_slots VALUES(63,133); +INSERT INTO product_slots VALUES(63,134); +INSERT INTO product_slots VALUES(63,135); +INSERT INTO product_slots VALUES(63,136); +INSERT INTO product_slots VALUES(63,138); +INSERT INTO product_slots VALUES(63,139); +INSERT INTO product_slots VALUES(63,140); +INSERT INTO product_slots VALUES(63,141); +INSERT INTO product_slots VALUES(63,142); +INSERT INTO product_slots VALUES(63,143); +INSERT INTO product_slots VALUES(63,145); +INSERT INTO product_slots VALUES(63,146); +INSERT INTO product_slots VALUES(63,147); +INSERT INTO product_slots VALUES(63,148); +INSERT INTO product_slots VALUES(63,149); +INSERT INTO product_slots VALUES(63,150); +INSERT INTO product_slots VALUES(63,151); +INSERT INTO product_slots VALUES(63,152); +INSERT INTO product_slots VALUES(63,153); +INSERT INTO product_slots VALUES(63,154); +INSERT INTO product_slots VALUES(63,155); +INSERT INTO product_slots VALUES(63,156); +INSERT INTO product_slots VALUES(63,157); +INSERT INTO product_slots VALUES(63,158); +INSERT INTO product_slots VALUES(63,159); +INSERT INTO product_slots VALUES(63,160); +INSERT INTO product_slots VALUES(63,161); +INSERT INTO product_slots VALUES(63,162); +INSERT INTO product_slots VALUES(63,163); +INSERT INTO product_slots VALUES(63,164); +INSERT INTO product_slots VALUES(63,165); +INSERT INTO product_slots VALUES(63,166); +INSERT INTO product_slots VALUES(63,167); +INSERT INTO product_slots VALUES(63,168); +INSERT INTO product_slots VALUES(63,169); +INSERT INTO product_slots VALUES(63,170); +INSERT INTO product_slots VALUES(63,171); +INSERT INTO product_slots VALUES(63,172); +INSERT INTO product_slots VALUES(63,173); +INSERT INTO product_slots VALUES(63,174); +INSERT INTO product_slots VALUES(63,175); +INSERT INTO product_slots VALUES(63,176); +INSERT INTO product_slots VALUES(63,177); +INSERT INTO product_slots VALUES(63,178); +INSERT INTO product_slots VALUES(63,179); +INSERT INTO product_slots VALUES(63,180); +INSERT INTO product_slots VALUES(63,181); +INSERT INTO product_slots VALUES(63,182); +INSERT INTO product_slots VALUES(63,183); +INSERT INTO product_slots VALUES(63,184); +INSERT INTO product_slots VALUES(63,185); +INSERT INTO product_slots VALUES(63,186); +INSERT INTO product_slots VALUES(63,187); +INSERT INTO product_slots VALUES(63,188); +INSERT INTO product_slots VALUES(63,189); +INSERT INTO product_slots VALUES(63,190); +INSERT INTO product_slots VALUES(63,191); +INSERT INTO product_slots VALUES(63,192); +INSERT INTO product_slots VALUES(63,193); +INSERT INTO product_slots VALUES(63,194); +INSERT INTO product_slots VALUES(63,195); +INSERT INTO product_slots VALUES(63,196); +INSERT INTO product_slots VALUES(63,197); +INSERT INTO product_slots VALUES(63,198); +INSERT INTO product_slots VALUES(63,199); +INSERT INTO product_slots VALUES(63,200); +INSERT INTO product_slots VALUES(63,201); +INSERT INTO product_slots VALUES(63,202); +INSERT INTO product_slots VALUES(63,203); +INSERT INTO product_slots VALUES(63,204); +INSERT INTO product_slots VALUES(63,205); +INSERT INTO product_slots VALUES(63,206); +INSERT INTO product_slots VALUES(63,207); +INSERT INTO product_slots VALUES(63,208); +INSERT INTO product_slots VALUES(63,209); +INSERT INTO product_slots VALUES(63,210); +INSERT INTO product_slots VALUES(63,211); +INSERT INTO product_slots VALUES(63,212); +INSERT INTO product_slots VALUES(63,213); +INSERT INTO product_slots VALUES(63,214); +INSERT INTO product_slots VALUES(63,215); +INSERT INTO product_slots VALUES(63,216); +INSERT INTO product_slots VALUES(63,217); +INSERT INTO product_slots VALUES(63,218); +INSERT INTO product_slots VALUES(63,219); +INSERT INTO product_slots VALUES(63,220); +INSERT INTO product_slots VALUES(63,221); +INSERT INTO product_slots VALUES(63,222); +INSERT INTO product_slots VALUES(63,223); +INSERT INTO product_slots VALUES(63,224); +INSERT INTO product_slots VALUES(63,225); +INSERT INTO product_slots VALUES(63,226); +INSERT INTO product_slots VALUES(63,227); +INSERT INTO product_slots VALUES(63,228); +INSERT INTO product_slots VALUES(63,229); +INSERT INTO product_slots VALUES(63,230); +INSERT INTO product_slots VALUES(63,231); +INSERT INTO product_slots VALUES(63,232); +INSERT INTO product_slots VALUES(63,233); +INSERT INTO product_slots VALUES(63,234); +INSERT INTO product_slots VALUES(63,235); +INSERT INTO product_slots VALUES(63,236); +INSERT INTO product_slots VALUES(63,237); +INSERT INTO product_slots VALUES(63,238); +INSERT INTO product_slots VALUES(63,239); +INSERT INTO product_slots VALUES(63,240); +INSERT INTO product_slots VALUES(63,241); +INSERT INTO product_slots VALUES(63,242); +INSERT INTO product_slots VALUES(63,243); +INSERT INTO product_slots VALUES(63,244); +INSERT INTO product_slots VALUES(63,274); +INSERT INTO product_slots VALUES(63,275); +INSERT INTO product_slots VALUES(63,279); +INSERT INTO product_slots VALUES(63,280); +INSERT INTO product_slots VALUES(63,281); +INSERT INTO product_slots VALUES(63,282); +INSERT INTO product_slots VALUES(63,283); +INSERT INTO product_slots VALUES(63,284); +INSERT INTO product_slots VALUES(63,285); +INSERT INTO product_slots VALUES(63,286); +INSERT INTO product_slots VALUES(63,287); +INSERT INTO product_slots VALUES(64,39); +INSERT INTO product_slots VALUES(64,44); +INSERT INTO product_slots VALUES(64,46); +INSERT INTO product_slots VALUES(64,47); +INSERT INTO product_slots VALUES(64,48); +INSERT INTO product_slots VALUES(64,49); +INSERT INTO product_slots VALUES(64,50); +INSERT INTO product_slots VALUES(64,51); +INSERT INTO product_slots VALUES(64,52); +INSERT INTO product_slots VALUES(64,53); +INSERT INTO product_slots VALUES(64,54); +INSERT INTO product_slots VALUES(64,55); +INSERT INTO product_slots VALUES(64,56); +INSERT INTO product_slots VALUES(64,57); +INSERT INTO product_slots VALUES(64,58); +INSERT INTO product_slots VALUES(64,59); +INSERT INTO product_slots VALUES(64,60); +INSERT INTO product_slots VALUES(64,61); +INSERT INTO product_slots VALUES(64,62); +INSERT INTO product_slots VALUES(64,63); +INSERT INTO product_slots VALUES(64,64); +INSERT INTO product_slots VALUES(64,65); +INSERT INTO product_slots VALUES(64,66); +INSERT INTO product_slots VALUES(64,67); +INSERT INTO product_slots VALUES(64,68); +INSERT INTO product_slots VALUES(64,69); +INSERT INTO product_slots VALUES(64,70); +INSERT INTO product_slots VALUES(64,71); +INSERT INTO product_slots VALUES(64,72); +INSERT INTO product_slots VALUES(64,73); +INSERT INTO product_slots VALUES(64,74); +INSERT INTO product_slots VALUES(64,75); +INSERT INTO product_slots VALUES(64,76); +INSERT INTO product_slots VALUES(64,77); +INSERT INTO product_slots VALUES(64,78); +INSERT INTO product_slots VALUES(64,79); +INSERT INTO product_slots VALUES(64,80); +INSERT INTO product_slots VALUES(64,81); +INSERT INTO product_slots VALUES(64,82); +INSERT INTO product_slots VALUES(64,83); +INSERT INTO product_slots VALUES(64,84); +INSERT INTO product_slots VALUES(64,85); +INSERT INTO product_slots VALUES(64,86); +INSERT INTO product_slots VALUES(64,87); +INSERT INTO product_slots VALUES(64,88); +INSERT INTO product_slots VALUES(64,89); +INSERT INTO product_slots VALUES(64,90); +INSERT INTO product_slots VALUES(64,91); +INSERT INTO product_slots VALUES(64,92); +INSERT INTO product_slots VALUES(64,93); +INSERT INTO product_slots VALUES(64,94); +INSERT INTO product_slots VALUES(64,95); +INSERT INTO product_slots VALUES(64,96); +INSERT INTO product_slots VALUES(64,97); +INSERT INTO product_slots VALUES(64,98); +INSERT INTO product_slots VALUES(64,99); +INSERT INTO product_slots VALUES(64,100); +INSERT INTO product_slots VALUES(64,101); +INSERT INTO product_slots VALUES(64,102); +INSERT INTO product_slots VALUES(64,103); +INSERT INTO product_slots VALUES(64,104); +INSERT INTO product_slots VALUES(64,105); +INSERT INTO product_slots VALUES(64,106); +INSERT INTO product_slots VALUES(64,107); +INSERT INTO product_slots VALUES(64,108); +INSERT INTO product_slots VALUES(64,109); +INSERT INTO product_slots VALUES(64,110); +INSERT INTO product_slots VALUES(64,111); +INSERT INTO product_slots VALUES(64,112); +INSERT INTO product_slots VALUES(64,113); +INSERT INTO product_slots VALUES(64,114); +INSERT INTO product_slots VALUES(64,115); +INSERT INTO product_slots VALUES(64,116); +INSERT INTO product_slots VALUES(64,117); +INSERT INTO product_slots VALUES(64,118); +INSERT INTO product_slots VALUES(64,119); +INSERT INTO product_slots VALUES(64,120); +INSERT INTO product_slots VALUES(64,121); +INSERT INTO product_slots VALUES(64,122); +INSERT INTO product_slots VALUES(64,123); +INSERT INTO product_slots VALUES(64,124); +INSERT INTO product_slots VALUES(64,125); +INSERT INTO product_slots VALUES(64,126); +INSERT INTO product_slots VALUES(64,127); +INSERT INTO product_slots VALUES(64,128); +INSERT INTO product_slots VALUES(64,129); +INSERT INTO product_slots VALUES(64,130); +INSERT INTO product_slots VALUES(64,131); +INSERT INTO product_slots VALUES(64,132); +INSERT INTO product_slots VALUES(64,133); +INSERT INTO product_slots VALUES(64,134); +INSERT INTO product_slots VALUES(64,135); +INSERT INTO product_slots VALUES(64,136); +INSERT INTO product_slots VALUES(64,137); +INSERT INTO product_slots VALUES(64,138); +INSERT INTO product_slots VALUES(64,139); +INSERT INTO product_slots VALUES(64,140); +INSERT INTO product_slots VALUES(64,141); +INSERT INTO product_slots VALUES(64,142); +INSERT INTO product_slots VALUES(64,143); +INSERT INTO product_slots VALUES(64,144); +INSERT INTO product_slots VALUES(64,145); +INSERT INTO product_slots VALUES(64,146); +INSERT INTO product_slots VALUES(64,147); +INSERT INTO product_slots VALUES(64,148); +INSERT INTO product_slots VALUES(64,149); +INSERT INTO product_slots VALUES(64,150); +INSERT INTO product_slots VALUES(64,151); +INSERT INTO product_slots VALUES(64,152); +INSERT INTO product_slots VALUES(64,153); +INSERT INTO product_slots VALUES(64,154); +INSERT INTO product_slots VALUES(64,155); +INSERT INTO product_slots VALUES(64,156); +INSERT INTO product_slots VALUES(64,157); +INSERT INTO product_slots VALUES(64,158); +INSERT INTO product_slots VALUES(64,159); +INSERT INTO product_slots VALUES(64,160); +INSERT INTO product_slots VALUES(64,161); +INSERT INTO product_slots VALUES(64,162); +INSERT INTO product_slots VALUES(64,163); +INSERT INTO product_slots VALUES(64,164); +INSERT INTO product_slots VALUES(64,165); +INSERT INTO product_slots VALUES(64,166); +INSERT INTO product_slots VALUES(64,167); +INSERT INTO product_slots VALUES(64,168); +INSERT INTO product_slots VALUES(64,169); +INSERT INTO product_slots VALUES(64,170); +INSERT INTO product_slots VALUES(64,171); +INSERT INTO product_slots VALUES(64,172); +INSERT INTO product_slots VALUES(64,173); +INSERT INTO product_slots VALUES(64,174); +INSERT INTO product_slots VALUES(64,175); +INSERT INTO product_slots VALUES(64,176); +INSERT INTO product_slots VALUES(64,177); +INSERT INTO product_slots VALUES(64,178); +INSERT INTO product_slots VALUES(64,179); +INSERT INTO product_slots VALUES(64,180); +INSERT INTO product_slots VALUES(64,181); +INSERT INTO product_slots VALUES(64,182); +INSERT INTO product_slots VALUES(64,183); +INSERT INTO product_slots VALUES(64,184); +INSERT INTO product_slots VALUES(64,185); +INSERT INTO product_slots VALUES(64,186); +INSERT INTO product_slots VALUES(64,187); +INSERT INTO product_slots VALUES(64,188); +INSERT INTO product_slots VALUES(64,189); +INSERT INTO product_slots VALUES(64,190); +INSERT INTO product_slots VALUES(64,191); +INSERT INTO product_slots VALUES(64,192); +INSERT INTO product_slots VALUES(64,193); +INSERT INTO product_slots VALUES(64,194); +INSERT INTO product_slots VALUES(64,195); +INSERT INTO product_slots VALUES(64,196); +INSERT INTO product_slots VALUES(64,197); +INSERT INTO product_slots VALUES(64,198); +INSERT INTO product_slots VALUES(64,199); +INSERT INTO product_slots VALUES(64,200); +INSERT INTO product_slots VALUES(64,201); +INSERT INTO product_slots VALUES(64,202); +INSERT INTO product_slots VALUES(64,203); +INSERT INTO product_slots VALUES(64,204); +INSERT INTO product_slots VALUES(64,205); +INSERT INTO product_slots VALUES(64,206); +INSERT INTO product_slots VALUES(64,207); +INSERT INTO product_slots VALUES(64,208); +INSERT INTO product_slots VALUES(64,209); +INSERT INTO product_slots VALUES(64,210); +INSERT INTO product_slots VALUES(64,211); +INSERT INTO product_slots VALUES(64,212); +INSERT INTO product_slots VALUES(64,213); +INSERT INTO product_slots VALUES(64,214); +INSERT INTO product_slots VALUES(64,215); +INSERT INTO product_slots VALUES(64,216); +INSERT INTO product_slots VALUES(64,217); +INSERT INTO product_slots VALUES(64,218); +INSERT INTO product_slots VALUES(64,219); +INSERT INTO product_slots VALUES(64,220); +INSERT INTO product_slots VALUES(64,221); +INSERT INTO product_slots VALUES(64,222); +INSERT INTO product_slots VALUES(64,223); +INSERT INTO product_slots VALUES(64,224); +INSERT INTO product_slots VALUES(64,225); +INSERT INTO product_slots VALUES(64,226); +INSERT INTO product_slots VALUES(64,227); +INSERT INTO product_slots VALUES(64,228); +INSERT INTO product_slots VALUES(64,229); +INSERT INTO product_slots VALUES(64,230); +INSERT INTO product_slots VALUES(64,231); +INSERT INTO product_slots VALUES(64,232); +INSERT INTO product_slots VALUES(64,233); +INSERT INTO product_slots VALUES(64,234); +INSERT INTO product_slots VALUES(64,235); +INSERT INTO product_slots VALUES(64,236); +INSERT INTO product_slots VALUES(64,237); +INSERT INTO product_slots VALUES(64,238); +INSERT INTO product_slots VALUES(64,239); +INSERT INTO product_slots VALUES(64,240); +INSERT INTO product_slots VALUES(64,241); +INSERT INTO product_slots VALUES(64,242); +INSERT INTO product_slots VALUES(64,243); +INSERT INTO product_slots VALUES(64,244); +INSERT INTO product_slots VALUES(64,274); +INSERT INTO product_slots VALUES(64,275); +INSERT INTO product_slots VALUES(64,279); +INSERT INTO product_slots VALUES(64,280); +INSERT INTO product_slots VALUES(64,281); +INSERT INTO product_slots VALUES(64,282); +INSERT INTO product_slots VALUES(64,283); +INSERT INTO product_slots VALUES(64,284); +INSERT INTO product_slots VALUES(64,285); +INSERT INTO product_slots VALUES(64,286); +INSERT INTO product_slots VALUES(64,287); +INSERT INTO product_slots VALUES(65,39); +INSERT INTO product_slots VALUES(65,41); +INSERT INTO product_slots VALUES(65,43); +INSERT INTO product_slots VALUES(65,44); +INSERT INTO product_slots VALUES(65,45); +INSERT INTO product_slots VALUES(65,46); +INSERT INTO product_slots VALUES(65,47); +INSERT INTO product_slots VALUES(65,48); +INSERT INTO product_slots VALUES(65,49); +INSERT INTO product_slots VALUES(65,50); +INSERT INTO product_slots VALUES(65,51); +INSERT INTO product_slots VALUES(65,52); +INSERT INTO product_slots VALUES(65,53); +INSERT INTO product_slots VALUES(65,54); +INSERT INTO product_slots VALUES(65,55); +INSERT INTO product_slots VALUES(65,56); +INSERT INTO product_slots VALUES(65,57); +INSERT INTO product_slots VALUES(65,58); +INSERT INTO product_slots VALUES(65,59); +INSERT INTO product_slots VALUES(65,60); +INSERT INTO product_slots VALUES(65,61); +INSERT INTO product_slots VALUES(65,62); +INSERT INTO product_slots VALUES(65,63); +INSERT INTO product_slots VALUES(65,64); +INSERT INTO product_slots VALUES(65,65); +INSERT INTO product_slots VALUES(65,66); +INSERT INTO product_slots VALUES(65,67); +INSERT INTO product_slots VALUES(65,68); +INSERT INTO product_slots VALUES(65,69); +INSERT INTO product_slots VALUES(65,70); +INSERT INTO product_slots VALUES(65,71); +INSERT INTO product_slots VALUES(65,72); +INSERT INTO product_slots VALUES(65,73); +INSERT INTO product_slots VALUES(65,74); +INSERT INTO product_slots VALUES(65,75); +INSERT INTO product_slots VALUES(65,76); +INSERT INTO product_slots VALUES(65,77); +INSERT INTO product_slots VALUES(65,78); +INSERT INTO product_slots VALUES(65,79); +INSERT INTO product_slots VALUES(65,80); +INSERT INTO product_slots VALUES(65,81); +INSERT INTO product_slots VALUES(65,82); +INSERT INTO product_slots VALUES(65,83); +INSERT INTO product_slots VALUES(65,84); +INSERT INTO product_slots VALUES(65,85); +INSERT INTO product_slots VALUES(65,86); +INSERT INTO product_slots VALUES(65,87); +INSERT INTO product_slots VALUES(65,88); +INSERT INTO product_slots VALUES(65,89); +INSERT INTO product_slots VALUES(65,90); +INSERT INTO product_slots VALUES(65,91); +INSERT INTO product_slots VALUES(65,92); +INSERT INTO product_slots VALUES(65,93); +INSERT INTO product_slots VALUES(65,94); +INSERT INTO product_slots VALUES(65,95); +INSERT INTO product_slots VALUES(65,96); +INSERT INTO product_slots VALUES(65,97); +INSERT INTO product_slots VALUES(65,98); +INSERT INTO product_slots VALUES(65,99); +INSERT INTO product_slots VALUES(65,100); +INSERT INTO product_slots VALUES(65,101); +INSERT INTO product_slots VALUES(65,102); +INSERT INTO product_slots VALUES(65,103); +INSERT INTO product_slots VALUES(65,104); +INSERT INTO product_slots VALUES(65,105); +INSERT INTO product_slots VALUES(65,106); +INSERT INTO product_slots VALUES(65,107); +INSERT INTO product_slots VALUES(65,108); +INSERT INTO product_slots VALUES(65,109); +INSERT INTO product_slots VALUES(65,110); +INSERT INTO product_slots VALUES(65,111); +INSERT INTO product_slots VALUES(65,112); +INSERT INTO product_slots VALUES(65,113); +INSERT INTO product_slots VALUES(65,114); +INSERT INTO product_slots VALUES(65,115); +INSERT INTO product_slots VALUES(65,116); +INSERT INTO product_slots VALUES(65,117); +INSERT INTO product_slots VALUES(65,118); +INSERT INTO product_slots VALUES(65,119); +INSERT INTO product_slots VALUES(65,120); +INSERT INTO product_slots VALUES(65,121); +INSERT INTO product_slots VALUES(65,122); +INSERT INTO product_slots VALUES(65,123); +INSERT INTO product_slots VALUES(65,124); +INSERT INTO product_slots VALUES(65,125); +INSERT INTO product_slots VALUES(65,126); +INSERT INTO product_slots VALUES(65,127); +INSERT INTO product_slots VALUES(65,128); +INSERT INTO product_slots VALUES(65,129); +INSERT INTO product_slots VALUES(65,130); +INSERT INTO product_slots VALUES(65,131); +INSERT INTO product_slots VALUES(65,132); +INSERT INTO product_slots VALUES(65,133); +INSERT INTO product_slots VALUES(65,134); +INSERT INTO product_slots VALUES(65,135); +INSERT INTO product_slots VALUES(65,136); +INSERT INTO product_slots VALUES(65,137); +INSERT INTO product_slots VALUES(65,138); +INSERT INTO product_slots VALUES(65,139); +INSERT INTO product_slots VALUES(65,140); +INSERT INTO product_slots VALUES(65,141); +INSERT INTO product_slots VALUES(65,142); +INSERT INTO product_slots VALUES(65,143); +INSERT INTO product_slots VALUES(65,144); +INSERT INTO product_slots VALUES(65,145); +INSERT INTO product_slots VALUES(65,146); +INSERT INTO product_slots VALUES(65,147); +INSERT INTO product_slots VALUES(65,148); +INSERT INTO product_slots VALUES(65,149); +INSERT INTO product_slots VALUES(65,150); +INSERT INTO product_slots VALUES(65,151); +INSERT INTO product_slots VALUES(65,152); +INSERT INTO product_slots VALUES(65,153); +INSERT INTO product_slots VALUES(65,154); +INSERT INTO product_slots VALUES(65,155); +INSERT INTO product_slots VALUES(65,156); +INSERT INTO product_slots VALUES(65,157); +INSERT INTO product_slots VALUES(65,158); +INSERT INTO product_slots VALUES(65,159); +INSERT INTO product_slots VALUES(65,160); +INSERT INTO product_slots VALUES(65,161); +INSERT INTO product_slots VALUES(65,162); +INSERT INTO product_slots VALUES(65,163); +INSERT INTO product_slots VALUES(65,164); +INSERT INTO product_slots VALUES(65,165); +INSERT INTO product_slots VALUES(65,166); +INSERT INTO product_slots VALUES(65,167); +INSERT INTO product_slots VALUES(65,168); +INSERT INTO product_slots VALUES(65,169); +INSERT INTO product_slots VALUES(65,170); +INSERT INTO product_slots VALUES(65,171); +INSERT INTO product_slots VALUES(65,172); +INSERT INTO product_slots VALUES(65,173); +INSERT INTO product_slots VALUES(65,174); +INSERT INTO product_slots VALUES(65,175); +INSERT INTO product_slots VALUES(65,176); +INSERT INTO product_slots VALUES(65,177); +INSERT INTO product_slots VALUES(65,178); +INSERT INTO product_slots VALUES(65,179); +INSERT INTO product_slots VALUES(65,180); +INSERT INTO product_slots VALUES(65,181); +INSERT INTO product_slots VALUES(65,182); +INSERT INTO product_slots VALUES(65,183); +INSERT INTO product_slots VALUES(65,184); +INSERT INTO product_slots VALUES(65,185); +INSERT INTO product_slots VALUES(65,186); +INSERT INTO product_slots VALUES(65,187); +INSERT INTO product_slots VALUES(65,188); +INSERT INTO product_slots VALUES(65,189); +INSERT INTO product_slots VALUES(65,190); +INSERT INTO product_slots VALUES(65,191); +INSERT INTO product_slots VALUES(65,192); +INSERT INTO product_slots VALUES(65,193); +INSERT INTO product_slots VALUES(65,194); +INSERT INTO product_slots VALUES(65,195); +INSERT INTO product_slots VALUES(65,196); +INSERT INTO product_slots VALUES(65,197); +INSERT INTO product_slots VALUES(65,198); +INSERT INTO product_slots VALUES(65,199); +INSERT INTO product_slots VALUES(65,200); +INSERT INTO product_slots VALUES(65,201); +INSERT INTO product_slots VALUES(65,202); +INSERT INTO product_slots VALUES(65,203); +INSERT INTO product_slots VALUES(65,204); +INSERT INTO product_slots VALUES(65,205); +INSERT INTO product_slots VALUES(65,206); +INSERT INTO product_slots VALUES(65,207); +INSERT INTO product_slots VALUES(65,208); +INSERT INTO product_slots VALUES(65,209); +INSERT INTO product_slots VALUES(65,210); +INSERT INTO product_slots VALUES(65,211); +INSERT INTO product_slots VALUES(65,212); +INSERT INTO product_slots VALUES(65,213); +INSERT INTO product_slots VALUES(65,214); +INSERT INTO product_slots VALUES(65,215); +INSERT INTO product_slots VALUES(65,216); +INSERT INTO product_slots VALUES(65,217); +INSERT INTO product_slots VALUES(65,218); +INSERT INTO product_slots VALUES(65,219); +INSERT INTO product_slots VALUES(65,220); +INSERT INTO product_slots VALUES(65,221); +INSERT INTO product_slots VALUES(65,222); +INSERT INTO product_slots VALUES(65,223); +INSERT INTO product_slots VALUES(65,224); +INSERT INTO product_slots VALUES(65,225); +INSERT INTO product_slots VALUES(65,226); +INSERT INTO product_slots VALUES(65,227); +INSERT INTO product_slots VALUES(65,228); +INSERT INTO product_slots VALUES(65,229); +INSERT INTO product_slots VALUES(65,230); +INSERT INTO product_slots VALUES(65,231); +INSERT INTO product_slots VALUES(65,232); +INSERT INTO product_slots VALUES(65,233); +INSERT INTO product_slots VALUES(65,234); +INSERT INTO product_slots VALUES(65,235); +INSERT INTO product_slots VALUES(65,236); +INSERT INTO product_slots VALUES(65,237); +INSERT INTO product_slots VALUES(65,238); +INSERT INTO product_slots VALUES(65,239); +INSERT INTO product_slots VALUES(65,240); +INSERT INTO product_slots VALUES(65,241); +INSERT INTO product_slots VALUES(65,242); +INSERT INTO product_slots VALUES(65,243); +INSERT INTO product_slots VALUES(65,244); +INSERT INTO product_slots VALUES(65,274); +INSERT INTO product_slots VALUES(65,275); +INSERT INTO product_slots VALUES(65,279); +INSERT INTO product_slots VALUES(65,280); +INSERT INTO product_slots VALUES(65,281); +INSERT INTO product_slots VALUES(65,282); +INSERT INTO product_slots VALUES(65,283); +INSERT INTO product_slots VALUES(65,284); +INSERT INTO product_slots VALUES(65,285); +INSERT INTO product_slots VALUES(65,286); +INSERT INTO product_slots VALUES(65,287); +INSERT INTO product_slots VALUES(66,39); +INSERT INTO product_slots VALUES(66,41); +INSERT INTO product_slots VALUES(66,43); +INSERT INTO product_slots VALUES(66,44); +INSERT INTO product_slots VALUES(66,45); +INSERT INTO product_slots VALUES(66,46); +INSERT INTO product_slots VALUES(66,47); +INSERT INTO product_slots VALUES(66,48); +INSERT INTO product_slots VALUES(66,49); +INSERT INTO product_slots VALUES(66,50); +INSERT INTO product_slots VALUES(66,51); +INSERT INTO product_slots VALUES(66,52); +INSERT INTO product_slots VALUES(66,53); +INSERT INTO product_slots VALUES(66,54); +INSERT INTO product_slots VALUES(66,55); +INSERT INTO product_slots VALUES(66,56); +INSERT INTO product_slots VALUES(66,57); +INSERT INTO product_slots VALUES(66,58); +INSERT INTO product_slots VALUES(66,59); +INSERT INTO product_slots VALUES(66,60); +INSERT INTO product_slots VALUES(66,61); +INSERT INTO product_slots VALUES(66,62); +INSERT INTO product_slots VALUES(66,63); +INSERT INTO product_slots VALUES(66,64); +INSERT INTO product_slots VALUES(66,65); +INSERT INTO product_slots VALUES(66,66); +INSERT INTO product_slots VALUES(66,67); +INSERT INTO product_slots VALUES(66,68); +INSERT INTO product_slots VALUES(66,69); +INSERT INTO product_slots VALUES(66,70); +INSERT INTO product_slots VALUES(66,71); +INSERT INTO product_slots VALUES(66,72); +INSERT INTO product_slots VALUES(66,73); +INSERT INTO product_slots VALUES(66,74); +INSERT INTO product_slots VALUES(66,75); +INSERT INTO product_slots VALUES(66,76); +INSERT INTO product_slots VALUES(66,77); +INSERT INTO product_slots VALUES(66,78); +INSERT INTO product_slots VALUES(66,79); +INSERT INTO product_slots VALUES(66,80); +INSERT INTO product_slots VALUES(66,81); +INSERT INTO product_slots VALUES(66,82); +INSERT INTO product_slots VALUES(66,83); +INSERT INTO product_slots VALUES(66,84); +INSERT INTO product_slots VALUES(66,85); +INSERT INTO product_slots VALUES(66,86); +INSERT INTO product_slots VALUES(66,87); +INSERT INTO product_slots VALUES(66,88); +INSERT INTO product_slots VALUES(66,89); +INSERT INTO product_slots VALUES(66,90); +INSERT INTO product_slots VALUES(66,91); +INSERT INTO product_slots VALUES(66,92); +INSERT INTO product_slots VALUES(66,93); +INSERT INTO product_slots VALUES(66,94); +INSERT INTO product_slots VALUES(66,95); +INSERT INTO product_slots VALUES(66,96); +INSERT INTO product_slots VALUES(66,97); +INSERT INTO product_slots VALUES(66,98); +INSERT INTO product_slots VALUES(66,99); +INSERT INTO product_slots VALUES(66,100); +INSERT INTO product_slots VALUES(66,101); +INSERT INTO product_slots VALUES(66,102); +INSERT INTO product_slots VALUES(66,103); +INSERT INTO product_slots VALUES(66,104); +INSERT INTO product_slots VALUES(66,105); +INSERT INTO product_slots VALUES(66,106); +INSERT INTO product_slots VALUES(66,107); +INSERT INTO product_slots VALUES(66,108); +INSERT INTO product_slots VALUES(66,109); +INSERT INTO product_slots VALUES(66,110); +INSERT INTO product_slots VALUES(66,111); +INSERT INTO product_slots VALUES(66,112); +INSERT INTO product_slots VALUES(66,113); +INSERT INTO product_slots VALUES(66,114); +INSERT INTO product_slots VALUES(66,115); +INSERT INTO product_slots VALUES(66,116); +INSERT INTO product_slots VALUES(66,117); +INSERT INTO product_slots VALUES(66,118); +INSERT INTO product_slots VALUES(66,119); +INSERT INTO product_slots VALUES(66,120); +INSERT INTO product_slots VALUES(66,121); +INSERT INTO product_slots VALUES(66,122); +INSERT INTO product_slots VALUES(66,123); +INSERT INTO product_slots VALUES(66,124); +INSERT INTO product_slots VALUES(66,125); +INSERT INTO product_slots VALUES(66,126); +INSERT INTO product_slots VALUES(66,127); +INSERT INTO product_slots VALUES(66,128); +INSERT INTO product_slots VALUES(66,129); +INSERT INTO product_slots VALUES(66,130); +INSERT INTO product_slots VALUES(66,131); +INSERT INTO product_slots VALUES(66,132); +INSERT INTO product_slots VALUES(66,133); +INSERT INTO product_slots VALUES(66,134); +INSERT INTO product_slots VALUES(66,135); +INSERT INTO product_slots VALUES(66,136); +INSERT INTO product_slots VALUES(66,137); +INSERT INTO product_slots VALUES(66,138); +INSERT INTO product_slots VALUES(66,139); +INSERT INTO product_slots VALUES(66,140); +INSERT INTO product_slots VALUES(66,141); +INSERT INTO product_slots VALUES(66,142); +INSERT INTO product_slots VALUES(66,143); +INSERT INTO product_slots VALUES(66,144); +INSERT INTO product_slots VALUES(66,145); +INSERT INTO product_slots VALUES(66,146); +INSERT INTO product_slots VALUES(66,147); +INSERT INTO product_slots VALUES(66,148); +INSERT INTO product_slots VALUES(66,149); +INSERT INTO product_slots VALUES(66,150); +INSERT INTO product_slots VALUES(66,151); +INSERT INTO product_slots VALUES(66,152); +INSERT INTO product_slots VALUES(66,153); +INSERT INTO product_slots VALUES(66,154); +INSERT INTO product_slots VALUES(66,155); +INSERT INTO product_slots VALUES(66,156); +INSERT INTO product_slots VALUES(66,157); +INSERT INTO product_slots VALUES(66,158); +INSERT INTO product_slots VALUES(66,159); +INSERT INTO product_slots VALUES(66,160); +INSERT INTO product_slots VALUES(66,161); +INSERT INTO product_slots VALUES(66,162); +INSERT INTO product_slots VALUES(66,163); +INSERT INTO product_slots VALUES(66,164); +INSERT INTO product_slots VALUES(66,165); +INSERT INTO product_slots VALUES(66,166); +INSERT INTO product_slots VALUES(66,167); +INSERT INTO product_slots VALUES(66,168); +INSERT INTO product_slots VALUES(66,169); +INSERT INTO product_slots VALUES(66,170); +INSERT INTO product_slots VALUES(66,171); +INSERT INTO product_slots VALUES(66,172); +INSERT INTO product_slots VALUES(66,173); +INSERT INTO product_slots VALUES(66,174); +INSERT INTO product_slots VALUES(66,175); +INSERT INTO product_slots VALUES(66,176); +INSERT INTO product_slots VALUES(66,177); +INSERT INTO product_slots VALUES(66,178); +INSERT INTO product_slots VALUES(66,179); +INSERT INTO product_slots VALUES(66,180); +INSERT INTO product_slots VALUES(66,181); +INSERT INTO product_slots VALUES(66,182); +INSERT INTO product_slots VALUES(66,183); +INSERT INTO product_slots VALUES(66,184); +INSERT INTO product_slots VALUES(66,185); +INSERT INTO product_slots VALUES(66,186); +INSERT INTO product_slots VALUES(66,187); +INSERT INTO product_slots VALUES(66,188); +INSERT INTO product_slots VALUES(66,189); +INSERT INTO product_slots VALUES(66,190); +INSERT INTO product_slots VALUES(66,191); +INSERT INTO product_slots VALUES(66,192); +INSERT INTO product_slots VALUES(66,193); +INSERT INTO product_slots VALUES(66,194); +INSERT INTO product_slots VALUES(66,195); +INSERT INTO product_slots VALUES(66,196); +INSERT INTO product_slots VALUES(66,197); +INSERT INTO product_slots VALUES(66,198); +INSERT INTO product_slots VALUES(66,199); +INSERT INTO product_slots VALUES(66,200); +INSERT INTO product_slots VALUES(66,201); +INSERT INTO product_slots VALUES(66,202); +INSERT INTO product_slots VALUES(66,203); +INSERT INTO product_slots VALUES(66,204); +INSERT INTO product_slots VALUES(66,205); +INSERT INTO product_slots VALUES(66,206); +INSERT INTO product_slots VALUES(66,207); +INSERT INTO product_slots VALUES(66,208); +INSERT INTO product_slots VALUES(66,209); +INSERT INTO product_slots VALUES(66,210); +INSERT INTO product_slots VALUES(66,211); +INSERT INTO product_slots VALUES(66,212); +INSERT INTO product_slots VALUES(66,213); +INSERT INTO product_slots VALUES(66,214); +INSERT INTO product_slots VALUES(66,215); +INSERT INTO product_slots VALUES(66,216); +INSERT INTO product_slots VALUES(66,217); +INSERT INTO product_slots VALUES(66,218); +INSERT INTO product_slots VALUES(66,219); +INSERT INTO product_slots VALUES(66,220); +INSERT INTO product_slots VALUES(66,221); +INSERT INTO product_slots VALUES(66,222); +INSERT INTO product_slots VALUES(66,223); +INSERT INTO product_slots VALUES(66,224); +INSERT INTO product_slots VALUES(66,225); +INSERT INTO product_slots VALUES(66,226); +INSERT INTO product_slots VALUES(66,227); +INSERT INTO product_slots VALUES(66,228); +INSERT INTO product_slots VALUES(66,229); +INSERT INTO product_slots VALUES(66,230); +INSERT INTO product_slots VALUES(66,231); +INSERT INTO product_slots VALUES(66,232); +INSERT INTO product_slots VALUES(66,233); +INSERT INTO product_slots VALUES(66,234); +INSERT INTO product_slots VALUES(66,235); +INSERT INTO product_slots VALUES(66,236); +INSERT INTO product_slots VALUES(66,237); +INSERT INTO product_slots VALUES(66,238); +INSERT INTO product_slots VALUES(66,239); +INSERT INTO product_slots VALUES(66,240); +INSERT INTO product_slots VALUES(66,241); +INSERT INTO product_slots VALUES(66,242); +INSERT INTO product_slots VALUES(66,243); +INSERT INTO product_slots VALUES(66,244); +INSERT INTO product_slots VALUES(66,274); +INSERT INTO product_slots VALUES(66,275); +INSERT INTO product_slots VALUES(66,279); +INSERT INTO product_slots VALUES(66,280); +INSERT INTO product_slots VALUES(66,281); +INSERT INTO product_slots VALUES(66,282); +INSERT INTO product_slots VALUES(66,283); +INSERT INTO product_slots VALUES(66,284); +INSERT INTO product_slots VALUES(66,285); +INSERT INTO product_slots VALUES(66,286); +INSERT INTO product_slots VALUES(66,287); +INSERT INTO product_slots VALUES(67,39); +INSERT INTO product_slots VALUES(67,41); +INSERT INTO product_slots VALUES(67,43); +INSERT INTO product_slots VALUES(67,44); +INSERT INTO product_slots VALUES(67,45); +INSERT INTO product_slots VALUES(67,46); +INSERT INTO product_slots VALUES(67,47); +INSERT INTO product_slots VALUES(67,48); +INSERT INTO product_slots VALUES(67,49); +INSERT INTO product_slots VALUES(67,50); +INSERT INTO product_slots VALUES(67,51); +INSERT INTO product_slots VALUES(67,52); +INSERT INTO product_slots VALUES(67,53); +INSERT INTO product_slots VALUES(67,54); +INSERT INTO product_slots VALUES(67,55); +INSERT INTO product_slots VALUES(67,56); +INSERT INTO product_slots VALUES(67,57); +INSERT INTO product_slots VALUES(67,58); +INSERT INTO product_slots VALUES(67,59); +INSERT INTO product_slots VALUES(67,60); +INSERT INTO product_slots VALUES(67,61); +INSERT INTO product_slots VALUES(67,62); +INSERT INTO product_slots VALUES(67,63); +INSERT INTO product_slots VALUES(67,64); +INSERT INTO product_slots VALUES(67,65); +INSERT INTO product_slots VALUES(67,66); +INSERT INTO product_slots VALUES(67,67); +INSERT INTO product_slots VALUES(67,68); +INSERT INTO product_slots VALUES(67,69); +INSERT INTO product_slots VALUES(67,70); +INSERT INTO product_slots VALUES(67,71); +INSERT INTO product_slots VALUES(67,72); +INSERT INTO product_slots VALUES(67,73); +INSERT INTO product_slots VALUES(67,74); +INSERT INTO product_slots VALUES(67,75); +INSERT INTO product_slots VALUES(67,76); +INSERT INTO product_slots VALUES(67,77); +INSERT INTO product_slots VALUES(67,78); +INSERT INTO product_slots VALUES(67,79); +INSERT INTO product_slots VALUES(67,80); +INSERT INTO product_slots VALUES(67,81); +INSERT INTO product_slots VALUES(67,82); +INSERT INTO product_slots VALUES(67,83); +INSERT INTO product_slots VALUES(67,84); +INSERT INTO product_slots VALUES(67,85); +INSERT INTO product_slots VALUES(67,86); +INSERT INTO product_slots VALUES(67,87); +INSERT INTO product_slots VALUES(67,88); +INSERT INTO product_slots VALUES(67,89); +INSERT INTO product_slots VALUES(67,90); +INSERT INTO product_slots VALUES(67,91); +INSERT INTO product_slots VALUES(67,92); +INSERT INTO product_slots VALUES(67,93); +INSERT INTO product_slots VALUES(67,94); +INSERT INTO product_slots VALUES(67,95); +INSERT INTO product_slots VALUES(67,96); +INSERT INTO product_slots VALUES(67,97); +INSERT INTO product_slots VALUES(67,98); +INSERT INTO product_slots VALUES(67,99); +INSERT INTO product_slots VALUES(67,100); +INSERT INTO product_slots VALUES(67,101); +INSERT INTO product_slots VALUES(67,102); +INSERT INTO product_slots VALUES(67,103); +INSERT INTO product_slots VALUES(67,104); +INSERT INTO product_slots VALUES(67,105); +INSERT INTO product_slots VALUES(67,106); +INSERT INTO product_slots VALUES(67,107); +INSERT INTO product_slots VALUES(67,108); +INSERT INTO product_slots VALUES(67,109); +INSERT INTO product_slots VALUES(67,110); +INSERT INTO product_slots VALUES(67,111); +INSERT INTO product_slots VALUES(67,112); +INSERT INTO product_slots VALUES(67,113); +INSERT INTO product_slots VALUES(67,114); +INSERT INTO product_slots VALUES(67,115); +INSERT INTO product_slots VALUES(67,116); +INSERT INTO product_slots VALUES(67,117); +INSERT INTO product_slots VALUES(67,118); +INSERT INTO product_slots VALUES(67,119); +INSERT INTO product_slots VALUES(67,120); +INSERT INTO product_slots VALUES(67,121); +INSERT INTO product_slots VALUES(67,122); +INSERT INTO product_slots VALUES(67,123); +INSERT INTO product_slots VALUES(67,124); +INSERT INTO product_slots VALUES(67,125); +INSERT INTO product_slots VALUES(67,126); +INSERT INTO product_slots VALUES(67,127); +INSERT INTO product_slots VALUES(67,128); +INSERT INTO product_slots VALUES(67,129); +INSERT INTO product_slots VALUES(67,130); +INSERT INTO product_slots VALUES(67,131); +INSERT INTO product_slots VALUES(67,132); +INSERT INTO product_slots VALUES(67,133); +INSERT INTO product_slots VALUES(67,134); +INSERT INTO product_slots VALUES(67,135); +INSERT INTO product_slots VALUES(67,136); +INSERT INTO product_slots VALUES(67,137); +INSERT INTO product_slots VALUES(67,138); +INSERT INTO product_slots VALUES(67,139); +INSERT INTO product_slots VALUES(67,140); +INSERT INTO product_slots VALUES(67,141); +INSERT INTO product_slots VALUES(67,142); +INSERT INTO product_slots VALUES(67,143); +INSERT INTO product_slots VALUES(67,144); +INSERT INTO product_slots VALUES(67,145); +INSERT INTO product_slots VALUES(67,146); +INSERT INTO product_slots VALUES(67,147); +INSERT INTO product_slots VALUES(67,148); +INSERT INTO product_slots VALUES(67,149); +INSERT INTO product_slots VALUES(67,150); +INSERT INTO product_slots VALUES(67,151); +INSERT INTO product_slots VALUES(67,152); +INSERT INTO product_slots VALUES(67,153); +INSERT INTO product_slots VALUES(67,154); +INSERT INTO product_slots VALUES(67,155); +INSERT INTO product_slots VALUES(67,156); +INSERT INTO product_slots VALUES(67,157); +INSERT INTO product_slots VALUES(67,158); +INSERT INTO product_slots VALUES(67,159); +INSERT INTO product_slots VALUES(67,160); +INSERT INTO product_slots VALUES(67,161); +INSERT INTO product_slots VALUES(67,162); +INSERT INTO product_slots VALUES(67,163); +INSERT INTO product_slots VALUES(67,164); +INSERT INTO product_slots VALUES(67,165); +INSERT INTO product_slots VALUES(67,166); +INSERT INTO product_slots VALUES(67,167); +INSERT INTO product_slots VALUES(67,168); +INSERT INTO product_slots VALUES(67,169); +INSERT INTO product_slots VALUES(67,170); +INSERT INTO product_slots VALUES(67,171); +INSERT INTO product_slots VALUES(67,172); +INSERT INTO product_slots VALUES(67,173); +INSERT INTO product_slots VALUES(67,174); +INSERT INTO product_slots VALUES(67,175); +INSERT INTO product_slots VALUES(67,176); +INSERT INTO product_slots VALUES(67,177); +INSERT INTO product_slots VALUES(67,178); +INSERT INTO product_slots VALUES(67,179); +INSERT INTO product_slots VALUES(67,180); +INSERT INTO product_slots VALUES(67,181); +INSERT INTO product_slots VALUES(67,182); +INSERT INTO product_slots VALUES(67,183); +INSERT INTO product_slots VALUES(67,184); +INSERT INTO product_slots VALUES(67,185); +INSERT INTO product_slots VALUES(67,186); +INSERT INTO product_slots VALUES(67,187); +INSERT INTO product_slots VALUES(67,188); +INSERT INTO product_slots VALUES(67,189); +INSERT INTO product_slots VALUES(67,190); +INSERT INTO product_slots VALUES(67,191); +INSERT INTO product_slots VALUES(67,192); +INSERT INTO product_slots VALUES(67,193); +INSERT INTO product_slots VALUES(67,194); +INSERT INTO product_slots VALUES(67,195); +INSERT INTO product_slots VALUES(67,196); +INSERT INTO product_slots VALUES(67,197); +INSERT INTO product_slots VALUES(67,198); +INSERT INTO product_slots VALUES(67,199); +INSERT INTO product_slots VALUES(67,200); +INSERT INTO product_slots VALUES(67,201); +INSERT INTO product_slots VALUES(67,202); +INSERT INTO product_slots VALUES(67,203); +INSERT INTO product_slots VALUES(67,204); +INSERT INTO product_slots VALUES(67,205); +INSERT INTO product_slots VALUES(67,206); +INSERT INTO product_slots VALUES(67,207); +INSERT INTO product_slots VALUES(67,208); +INSERT INTO product_slots VALUES(67,209); +INSERT INTO product_slots VALUES(67,210); +INSERT INTO product_slots VALUES(67,211); +INSERT INTO product_slots VALUES(67,212); +INSERT INTO product_slots VALUES(67,213); +INSERT INTO product_slots VALUES(67,214); +INSERT INTO product_slots VALUES(67,215); +INSERT INTO product_slots VALUES(67,216); +INSERT INTO product_slots VALUES(67,217); +INSERT INTO product_slots VALUES(67,218); +INSERT INTO product_slots VALUES(67,219); +INSERT INTO product_slots VALUES(67,220); +INSERT INTO product_slots VALUES(67,221); +INSERT INTO product_slots VALUES(67,222); +INSERT INTO product_slots VALUES(67,223); +INSERT INTO product_slots VALUES(67,224); +INSERT INTO product_slots VALUES(67,225); +INSERT INTO product_slots VALUES(67,226); +INSERT INTO product_slots VALUES(67,227); +INSERT INTO product_slots VALUES(67,228); +INSERT INTO product_slots VALUES(67,229); +INSERT INTO product_slots VALUES(67,230); +INSERT INTO product_slots VALUES(67,231); +INSERT INTO product_slots VALUES(67,232); +INSERT INTO product_slots VALUES(67,233); +INSERT INTO product_slots VALUES(67,234); +INSERT INTO product_slots VALUES(67,235); +INSERT INTO product_slots VALUES(67,236); +INSERT INTO product_slots VALUES(67,237); +INSERT INTO product_slots VALUES(67,238); +INSERT INTO product_slots VALUES(67,239); +INSERT INTO product_slots VALUES(67,240); +INSERT INTO product_slots VALUES(67,241); +INSERT INTO product_slots VALUES(67,242); +INSERT INTO product_slots VALUES(67,243); +INSERT INTO product_slots VALUES(67,244); +INSERT INTO product_slots VALUES(67,274); +INSERT INTO product_slots VALUES(67,275); +INSERT INTO product_slots VALUES(67,279); +INSERT INTO product_slots VALUES(67,280); +INSERT INTO product_slots VALUES(67,281); +INSERT INTO product_slots VALUES(67,282); +INSERT INTO product_slots VALUES(67,283); +INSERT INTO product_slots VALUES(67,284); +INSERT INTO product_slots VALUES(67,285); +INSERT INTO product_slots VALUES(67,286); +INSERT INTO product_slots VALUES(67,287); +INSERT INTO product_slots VALUES(68,39); +INSERT INTO product_slots VALUES(68,41); +INSERT INTO product_slots VALUES(68,43); +INSERT INTO product_slots VALUES(68,44); +INSERT INTO product_slots VALUES(68,45); +INSERT INTO product_slots VALUES(68,46); +INSERT INTO product_slots VALUES(68,47); +INSERT INTO product_slots VALUES(68,48); +INSERT INTO product_slots VALUES(68,49); +INSERT INTO product_slots VALUES(68,50); +INSERT INTO product_slots VALUES(68,51); +INSERT INTO product_slots VALUES(68,52); +INSERT INTO product_slots VALUES(68,53); +INSERT INTO product_slots VALUES(68,54); +INSERT INTO product_slots VALUES(68,55); +INSERT INTO product_slots VALUES(68,56); +INSERT INTO product_slots VALUES(68,57); +INSERT INTO product_slots VALUES(68,58); +INSERT INTO product_slots VALUES(68,59); +INSERT INTO product_slots VALUES(68,60); +INSERT INTO product_slots VALUES(68,61); +INSERT INTO product_slots VALUES(68,62); +INSERT INTO product_slots VALUES(68,63); +INSERT INTO product_slots VALUES(68,64); +INSERT INTO product_slots VALUES(68,65); +INSERT INTO product_slots VALUES(68,66); +INSERT INTO product_slots VALUES(68,67); +INSERT INTO product_slots VALUES(68,68); +INSERT INTO product_slots VALUES(68,69); +INSERT INTO product_slots VALUES(68,70); +INSERT INTO product_slots VALUES(68,71); +INSERT INTO product_slots VALUES(68,72); +INSERT INTO product_slots VALUES(68,73); +INSERT INTO product_slots VALUES(68,74); +INSERT INTO product_slots VALUES(68,75); +INSERT INTO product_slots VALUES(68,76); +INSERT INTO product_slots VALUES(68,77); +INSERT INTO product_slots VALUES(68,78); +INSERT INTO product_slots VALUES(68,79); +INSERT INTO product_slots VALUES(68,80); +INSERT INTO product_slots VALUES(68,81); +INSERT INTO product_slots VALUES(68,82); +INSERT INTO product_slots VALUES(68,83); +INSERT INTO product_slots VALUES(68,84); +INSERT INTO product_slots VALUES(68,85); +INSERT INTO product_slots VALUES(68,86); +INSERT INTO product_slots VALUES(68,87); +INSERT INTO product_slots VALUES(68,88); +INSERT INTO product_slots VALUES(68,89); +INSERT INTO product_slots VALUES(68,90); +INSERT INTO product_slots VALUES(68,91); +INSERT INTO product_slots VALUES(68,92); +INSERT INTO product_slots VALUES(68,93); +INSERT INTO product_slots VALUES(68,94); +INSERT INTO product_slots VALUES(68,95); +INSERT INTO product_slots VALUES(68,96); +INSERT INTO product_slots VALUES(68,97); +INSERT INTO product_slots VALUES(68,98); +INSERT INTO product_slots VALUES(68,99); +INSERT INTO product_slots VALUES(68,100); +INSERT INTO product_slots VALUES(68,101); +INSERT INTO product_slots VALUES(68,102); +INSERT INTO product_slots VALUES(68,103); +INSERT INTO product_slots VALUES(68,104); +INSERT INTO product_slots VALUES(68,105); +INSERT INTO product_slots VALUES(68,106); +INSERT INTO product_slots VALUES(68,107); +INSERT INTO product_slots VALUES(68,108); +INSERT INTO product_slots VALUES(68,109); +INSERT INTO product_slots VALUES(68,110); +INSERT INTO product_slots VALUES(68,111); +INSERT INTO product_slots VALUES(68,112); +INSERT INTO product_slots VALUES(68,113); +INSERT INTO product_slots VALUES(68,114); +INSERT INTO product_slots VALUES(68,115); +INSERT INTO product_slots VALUES(68,116); +INSERT INTO product_slots VALUES(68,117); +INSERT INTO product_slots VALUES(68,118); +INSERT INTO product_slots VALUES(68,119); +INSERT INTO product_slots VALUES(68,120); +INSERT INTO product_slots VALUES(68,121); +INSERT INTO product_slots VALUES(68,122); +INSERT INTO product_slots VALUES(68,123); +INSERT INTO product_slots VALUES(68,124); +INSERT INTO product_slots VALUES(68,125); +INSERT INTO product_slots VALUES(68,126); +INSERT INTO product_slots VALUES(68,127); +INSERT INTO product_slots VALUES(68,128); +INSERT INTO product_slots VALUES(68,129); +INSERT INTO product_slots VALUES(68,130); +INSERT INTO product_slots VALUES(68,131); +INSERT INTO product_slots VALUES(68,132); +INSERT INTO product_slots VALUES(68,133); +INSERT INTO product_slots VALUES(68,134); +INSERT INTO product_slots VALUES(68,135); +INSERT INTO product_slots VALUES(68,136); +INSERT INTO product_slots VALUES(68,137); +INSERT INTO product_slots VALUES(68,138); +INSERT INTO product_slots VALUES(68,139); +INSERT INTO product_slots VALUES(68,140); +INSERT INTO product_slots VALUES(68,141); +INSERT INTO product_slots VALUES(68,142); +INSERT INTO product_slots VALUES(68,143); +INSERT INTO product_slots VALUES(68,144); +INSERT INTO product_slots VALUES(68,145); +INSERT INTO product_slots VALUES(68,146); +INSERT INTO product_slots VALUES(68,147); +INSERT INTO product_slots VALUES(68,148); +INSERT INTO product_slots VALUES(68,149); +INSERT INTO product_slots VALUES(68,150); +INSERT INTO product_slots VALUES(68,151); +INSERT INTO product_slots VALUES(68,152); +INSERT INTO product_slots VALUES(68,153); +INSERT INTO product_slots VALUES(68,154); +INSERT INTO product_slots VALUES(68,155); +INSERT INTO product_slots VALUES(68,156); +INSERT INTO product_slots VALUES(68,157); +INSERT INTO product_slots VALUES(68,158); +INSERT INTO product_slots VALUES(68,159); +INSERT INTO product_slots VALUES(68,160); +INSERT INTO product_slots VALUES(68,161); +INSERT INTO product_slots VALUES(68,162); +INSERT INTO product_slots VALUES(68,163); +INSERT INTO product_slots VALUES(68,164); +INSERT INTO product_slots VALUES(68,165); +INSERT INTO product_slots VALUES(68,166); +INSERT INTO product_slots VALUES(68,167); +INSERT INTO product_slots VALUES(68,168); +INSERT INTO product_slots VALUES(68,169); +INSERT INTO product_slots VALUES(68,170); +INSERT INTO product_slots VALUES(68,171); +INSERT INTO product_slots VALUES(68,172); +INSERT INTO product_slots VALUES(68,173); +INSERT INTO product_slots VALUES(68,174); +INSERT INTO product_slots VALUES(68,175); +INSERT INTO product_slots VALUES(68,176); +INSERT INTO product_slots VALUES(68,177); +INSERT INTO product_slots VALUES(68,178); +INSERT INTO product_slots VALUES(68,179); +INSERT INTO product_slots VALUES(68,180); +INSERT INTO product_slots VALUES(68,181); +INSERT INTO product_slots VALUES(68,182); +INSERT INTO product_slots VALUES(68,183); +INSERT INTO product_slots VALUES(68,184); +INSERT INTO product_slots VALUES(68,185); +INSERT INTO product_slots VALUES(68,186); +INSERT INTO product_slots VALUES(68,187); +INSERT INTO product_slots VALUES(68,188); +INSERT INTO product_slots VALUES(68,189); +INSERT INTO product_slots VALUES(68,190); +INSERT INTO product_slots VALUES(68,191); +INSERT INTO product_slots VALUES(68,192); +INSERT INTO product_slots VALUES(68,193); +INSERT INTO product_slots VALUES(68,194); +INSERT INTO product_slots VALUES(68,195); +INSERT INTO product_slots VALUES(68,196); +INSERT INTO product_slots VALUES(68,197); +INSERT INTO product_slots VALUES(68,198); +INSERT INTO product_slots VALUES(68,199); +INSERT INTO product_slots VALUES(68,200); +INSERT INTO product_slots VALUES(68,201); +INSERT INTO product_slots VALUES(68,202); +INSERT INTO product_slots VALUES(68,203); +INSERT INTO product_slots VALUES(68,204); +INSERT INTO product_slots VALUES(68,205); +INSERT INTO product_slots VALUES(68,206); +INSERT INTO product_slots VALUES(68,207); +INSERT INTO product_slots VALUES(68,208); +INSERT INTO product_slots VALUES(68,209); +INSERT INTO product_slots VALUES(68,210); +INSERT INTO product_slots VALUES(68,211); +INSERT INTO product_slots VALUES(68,212); +INSERT INTO product_slots VALUES(68,213); +INSERT INTO product_slots VALUES(68,214); +INSERT INTO product_slots VALUES(68,215); +INSERT INTO product_slots VALUES(68,216); +INSERT INTO product_slots VALUES(68,217); +INSERT INTO product_slots VALUES(68,218); +INSERT INTO product_slots VALUES(68,219); +INSERT INTO product_slots VALUES(68,220); +INSERT INTO product_slots VALUES(68,221); +INSERT INTO product_slots VALUES(68,222); +INSERT INTO product_slots VALUES(68,223); +INSERT INTO product_slots VALUES(68,224); +INSERT INTO product_slots VALUES(68,225); +INSERT INTO product_slots VALUES(68,226); +INSERT INTO product_slots VALUES(68,227); +INSERT INTO product_slots VALUES(68,228); +INSERT INTO product_slots VALUES(68,229); +INSERT INTO product_slots VALUES(68,230); +INSERT INTO product_slots VALUES(68,231); +INSERT INTO product_slots VALUES(68,232); +INSERT INTO product_slots VALUES(68,233); +INSERT INTO product_slots VALUES(68,234); +INSERT INTO product_slots VALUES(68,235); +INSERT INTO product_slots VALUES(68,236); +INSERT INTO product_slots VALUES(68,237); +INSERT INTO product_slots VALUES(68,238); +INSERT INTO product_slots VALUES(68,239); +INSERT INTO product_slots VALUES(68,240); +INSERT INTO product_slots VALUES(68,241); +INSERT INTO product_slots VALUES(68,242); +INSERT INTO product_slots VALUES(68,243); +INSERT INTO product_slots VALUES(68,244); +INSERT INTO product_slots VALUES(68,274); +INSERT INTO product_slots VALUES(68,275); +INSERT INTO product_slots VALUES(68,279); +INSERT INTO product_slots VALUES(68,280); +INSERT INTO product_slots VALUES(68,281); +INSERT INTO product_slots VALUES(68,282); +INSERT INTO product_slots VALUES(68,283); +INSERT INTO product_slots VALUES(68,284); +INSERT INTO product_slots VALUES(68,285); +INSERT INTO product_slots VALUES(68,286); +INSERT INTO product_slots VALUES(68,287); +INSERT INTO product_slots VALUES(69,39); +INSERT INTO product_slots VALUES(69,41); +INSERT INTO product_slots VALUES(69,43); +INSERT INTO product_slots VALUES(69,44); +INSERT INTO product_slots VALUES(69,45); +INSERT INTO product_slots VALUES(69,46); +INSERT INTO product_slots VALUES(69,47); +INSERT INTO product_slots VALUES(69,48); +INSERT INTO product_slots VALUES(69,49); +INSERT INTO product_slots VALUES(69,50); +INSERT INTO product_slots VALUES(69,51); +INSERT INTO product_slots VALUES(69,52); +INSERT INTO product_slots VALUES(69,53); +INSERT INTO product_slots VALUES(69,54); +INSERT INTO product_slots VALUES(69,55); +INSERT INTO product_slots VALUES(69,56); +INSERT INTO product_slots VALUES(69,57); +INSERT INTO product_slots VALUES(69,58); +INSERT INTO product_slots VALUES(69,59); +INSERT INTO product_slots VALUES(69,60); +INSERT INTO product_slots VALUES(69,61); +INSERT INTO product_slots VALUES(69,62); +INSERT INTO product_slots VALUES(69,63); +INSERT INTO product_slots VALUES(69,64); +INSERT INTO product_slots VALUES(69,65); +INSERT INTO product_slots VALUES(69,66); +INSERT INTO product_slots VALUES(69,67); +INSERT INTO product_slots VALUES(69,68); +INSERT INTO product_slots VALUES(69,69); +INSERT INTO product_slots VALUES(69,70); +INSERT INTO product_slots VALUES(69,71); +INSERT INTO product_slots VALUES(69,72); +INSERT INTO product_slots VALUES(69,73); +INSERT INTO product_slots VALUES(69,74); +INSERT INTO product_slots VALUES(69,75); +INSERT INTO product_slots VALUES(69,76); +INSERT INTO product_slots VALUES(69,77); +INSERT INTO product_slots VALUES(69,78); +INSERT INTO product_slots VALUES(69,79); +INSERT INTO product_slots VALUES(69,80); +INSERT INTO product_slots VALUES(69,81); +INSERT INTO product_slots VALUES(69,82); +INSERT INTO product_slots VALUES(69,83); +INSERT INTO product_slots VALUES(69,84); +INSERT INTO product_slots VALUES(69,85); +INSERT INTO product_slots VALUES(69,86); +INSERT INTO product_slots VALUES(69,87); +INSERT INTO product_slots VALUES(69,88); +INSERT INTO product_slots VALUES(69,89); +INSERT INTO product_slots VALUES(69,90); +INSERT INTO product_slots VALUES(69,91); +INSERT INTO product_slots VALUES(69,92); +INSERT INTO product_slots VALUES(69,93); +INSERT INTO product_slots VALUES(69,94); +INSERT INTO product_slots VALUES(69,95); +INSERT INTO product_slots VALUES(69,96); +INSERT INTO product_slots VALUES(69,97); +INSERT INTO product_slots VALUES(69,98); +INSERT INTO product_slots VALUES(69,99); +INSERT INTO product_slots VALUES(69,100); +INSERT INTO product_slots VALUES(69,101); +INSERT INTO product_slots VALUES(69,102); +INSERT INTO product_slots VALUES(69,103); +INSERT INTO product_slots VALUES(69,104); +INSERT INTO product_slots VALUES(69,105); +INSERT INTO product_slots VALUES(69,106); +INSERT INTO product_slots VALUES(69,107); +INSERT INTO product_slots VALUES(69,108); +INSERT INTO product_slots VALUES(69,109); +INSERT INTO product_slots VALUES(69,110); +INSERT INTO product_slots VALUES(69,111); +INSERT INTO product_slots VALUES(69,112); +INSERT INTO product_slots VALUES(69,113); +INSERT INTO product_slots VALUES(69,114); +INSERT INTO product_slots VALUES(69,115); +INSERT INTO product_slots VALUES(69,116); +INSERT INTO product_slots VALUES(69,117); +INSERT INTO product_slots VALUES(69,118); +INSERT INTO product_slots VALUES(69,119); +INSERT INTO product_slots VALUES(69,120); +INSERT INTO product_slots VALUES(69,121); +INSERT INTO product_slots VALUES(69,122); +INSERT INTO product_slots VALUES(69,123); +INSERT INTO product_slots VALUES(69,124); +INSERT INTO product_slots VALUES(69,125); +INSERT INTO product_slots VALUES(69,126); +INSERT INTO product_slots VALUES(69,127); +INSERT INTO product_slots VALUES(69,128); +INSERT INTO product_slots VALUES(69,129); +INSERT INTO product_slots VALUES(69,130); +INSERT INTO product_slots VALUES(69,131); +INSERT INTO product_slots VALUES(69,132); +INSERT INTO product_slots VALUES(69,133); +INSERT INTO product_slots VALUES(69,134); +INSERT INTO product_slots VALUES(69,135); +INSERT INTO product_slots VALUES(69,136); +INSERT INTO product_slots VALUES(69,137); +INSERT INTO product_slots VALUES(69,138); +INSERT INTO product_slots VALUES(69,139); +INSERT INTO product_slots VALUES(69,140); +INSERT INTO product_slots VALUES(69,141); +INSERT INTO product_slots VALUES(69,142); +INSERT INTO product_slots VALUES(69,143); +INSERT INTO product_slots VALUES(69,144); +INSERT INTO product_slots VALUES(69,145); +INSERT INTO product_slots VALUES(69,146); +INSERT INTO product_slots VALUES(69,147); +INSERT INTO product_slots VALUES(69,148); +INSERT INTO product_slots VALUES(69,149); +INSERT INTO product_slots VALUES(69,150); +INSERT INTO product_slots VALUES(69,151); +INSERT INTO product_slots VALUES(69,152); +INSERT INTO product_slots VALUES(69,153); +INSERT INTO product_slots VALUES(69,154); +INSERT INTO product_slots VALUES(69,155); +INSERT INTO product_slots VALUES(69,156); +INSERT INTO product_slots VALUES(69,157); +INSERT INTO product_slots VALUES(69,158); +INSERT INTO product_slots VALUES(69,159); +INSERT INTO product_slots VALUES(69,160); +INSERT INTO product_slots VALUES(69,161); +INSERT INTO product_slots VALUES(69,162); +INSERT INTO product_slots VALUES(69,163); +INSERT INTO product_slots VALUES(69,164); +INSERT INTO product_slots VALUES(69,165); +INSERT INTO product_slots VALUES(69,166); +INSERT INTO product_slots VALUES(69,167); +INSERT INTO product_slots VALUES(69,168); +INSERT INTO product_slots VALUES(69,169); +INSERT INTO product_slots VALUES(69,170); +INSERT INTO product_slots VALUES(69,171); +INSERT INTO product_slots VALUES(69,172); +INSERT INTO product_slots VALUES(69,173); +INSERT INTO product_slots VALUES(69,174); +INSERT INTO product_slots VALUES(69,175); +INSERT INTO product_slots VALUES(69,176); +INSERT INTO product_slots VALUES(69,177); +INSERT INTO product_slots VALUES(69,178); +INSERT INTO product_slots VALUES(69,179); +INSERT INTO product_slots VALUES(69,180); +INSERT INTO product_slots VALUES(69,181); +INSERT INTO product_slots VALUES(69,182); +INSERT INTO product_slots VALUES(69,183); +INSERT INTO product_slots VALUES(69,184); +INSERT INTO product_slots VALUES(69,185); +INSERT INTO product_slots VALUES(69,186); +INSERT INTO product_slots VALUES(69,187); +INSERT INTO product_slots VALUES(69,188); +INSERT INTO product_slots VALUES(69,189); +INSERT INTO product_slots VALUES(69,190); +INSERT INTO product_slots VALUES(69,191); +INSERT INTO product_slots VALUES(69,192); +INSERT INTO product_slots VALUES(69,193); +INSERT INTO product_slots VALUES(69,194); +INSERT INTO product_slots VALUES(69,195); +INSERT INTO product_slots VALUES(69,196); +INSERT INTO product_slots VALUES(69,197); +INSERT INTO product_slots VALUES(69,198); +INSERT INTO product_slots VALUES(69,199); +INSERT INTO product_slots VALUES(69,200); +INSERT INTO product_slots VALUES(69,201); +INSERT INTO product_slots VALUES(69,202); +INSERT INTO product_slots VALUES(69,203); +INSERT INTO product_slots VALUES(69,204); +INSERT INTO product_slots VALUES(69,205); +INSERT INTO product_slots VALUES(69,206); +INSERT INTO product_slots VALUES(69,207); +INSERT INTO product_slots VALUES(69,208); +INSERT INTO product_slots VALUES(69,209); +INSERT INTO product_slots VALUES(69,210); +INSERT INTO product_slots VALUES(69,211); +INSERT INTO product_slots VALUES(69,212); +INSERT INTO product_slots VALUES(69,213); +INSERT INTO product_slots VALUES(69,214); +INSERT INTO product_slots VALUES(69,215); +INSERT INTO product_slots VALUES(69,216); +INSERT INTO product_slots VALUES(69,217); +INSERT INTO product_slots VALUES(69,218); +INSERT INTO product_slots VALUES(69,219); +INSERT INTO product_slots VALUES(69,220); +INSERT INTO product_slots VALUES(69,221); +INSERT INTO product_slots VALUES(69,222); +INSERT INTO product_slots VALUES(69,223); +INSERT INTO product_slots VALUES(69,224); +INSERT INTO product_slots VALUES(69,225); +INSERT INTO product_slots VALUES(69,226); +INSERT INTO product_slots VALUES(69,227); +INSERT INTO product_slots VALUES(69,228); +INSERT INTO product_slots VALUES(69,229); +INSERT INTO product_slots VALUES(69,230); +INSERT INTO product_slots VALUES(69,231); +INSERT INTO product_slots VALUES(69,232); +INSERT INTO product_slots VALUES(69,233); +INSERT INTO product_slots VALUES(69,234); +INSERT INTO product_slots VALUES(69,235); +INSERT INTO product_slots VALUES(69,236); +INSERT INTO product_slots VALUES(69,237); +INSERT INTO product_slots VALUES(69,238); +INSERT INTO product_slots VALUES(69,239); +INSERT INTO product_slots VALUES(69,240); +INSERT INTO product_slots VALUES(69,241); +INSERT INTO product_slots VALUES(69,242); +INSERT INTO product_slots VALUES(69,243); +INSERT INTO product_slots VALUES(69,244); +INSERT INTO product_slots VALUES(69,274); +INSERT INTO product_slots VALUES(69,275); +INSERT INTO product_slots VALUES(69,279); +INSERT INTO product_slots VALUES(69,280); +INSERT INTO product_slots VALUES(69,281); +INSERT INTO product_slots VALUES(69,282); +INSERT INTO product_slots VALUES(69,283); +INSERT INTO product_slots VALUES(69,284); +INSERT INTO product_slots VALUES(69,285); +INSERT INTO product_slots VALUES(69,286); +INSERT INTO product_slots VALUES(69,287); +INSERT INTO product_slots VALUES(70,39); +INSERT INTO product_slots VALUES(70,44); +INSERT INTO product_slots VALUES(70,46); +INSERT INTO product_slots VALUES(70,47); +INSERT INTO product_slots VALUES(70,48); +INSERT INTO product_slots VALUES(70,49); +INSERT INTO product_slots VALUES(70,50); +INSERT INTO product_slots VALUES(70,51); +INSERT INTO product_slots VALUES(70,52); +INSERT INTO product_slots VALUES(70,53); +INSERT INTO product_slots VALUES(70,54); +INSERT INTO product_slots VALUES(70,55); +INSERT INTO product_slots VALUES(70,56); +INSERT INTO product_slots VALUES(70,57); +INSERT INTO product_slots VALUES(70,58); +INSERT INTO product_slots VALUES(70,59); +INSERT INTO product_slots VALUES(70,60); +INSERT INTO product_slots VALUES(70,61); +INSERT INTO product_slots VALUES(70,62); +INSERT INTO product_slots VALUES(70,63); +INSERT INTO product_slots VALUES(70,64); +INSERT INTO product_slots VALUES(70,65); +INSERT INTO product_slots VALUES(70,66); +INSERT INTO product_slots VALUES(70,67); +INSERT INTO product_slots VALUES(70,68); +INSERT INTO product_slots VALUES(70,69); +INSERT INTO product_slots VALUES(70,70); +INSERT INTO product_slots VALUES(70,71); +INSERT INTO product_slots VALUES(70,72); +INSERT INTO product_slots VALUES(70,73); +INSERT INTO product_slots VALUES(70,74); +INSERT INTO product_slots VALUES(70,75); +INSERT INTO product_slots VALUES(70,76); +INSERT INTO product_slots VALUES(70,77); +INSERT INTO product_slots VALUES(70,78); +INSERT INTO product_slots VALUES(70,79); +INSERT INTO product_slots VALUES(70,80); +INSERT INTO product_slots VALUES(70,81); +INSERT INTO product_slots VALUES(70,82); +INSERT INTO product_slots VALUES(70,83); +INSERT INTO product_slots VALUES(70,84); +INSERT INTO product_slots VALUES(70,85); +INSERT INTO product_slots VALUES(70,86); +INSERT INTO product_slots VALUES(70,87); +INSERT INTO product_slots VALUES(70,88); +INSERT INTO product_slots VALUES(70,89); +INSERT INTO product_slots VALUES(70,90); +INSERT INTO product_slots VALUES(70,91); +INSERT INTO product_slots VALUES(70,92); +INSERT INTO product_slots VALUES(70,93); +INSERT INTO product_slots VALUES(70,94); +INSERT INTO product_slots VALUES(70,95); +INSERT INTO product_slots VALUES(70,96); +INSERT INTO product_slots VALUES(70,97); +INSERT INTO product_slots VALUES(70,98); +INSERT INTO product_slots VALUES(70,99); +INSERT INTO product_slots VALUES(70,100); +INSERT INTO product_slots VALUES(70,101); +INSERT INTO product_slots VALUES(70,102); +INSERT INTO product_slots VALUES(70,103); +INSERT INTO product_slots VALUES(70,104); +INSERT INTO product_slots VALUES(70,105); +INSERT INTO product_slots VALUES(70,106); +INSERT INTO product_slots VALUES(70,107); +INSERT INTO product_slots VALUES(70,108); +INSERT INTO product_slots VALUES(70,109); +INSERT INTO product_slots VALUES(70,110); +INSERT INTO product_slots VALUES(70,111); +INSERT INTO product_slots VALUES(70,112); +INSERT INTO product_slots VALUES(70,113); +INSERT INTO product_slots VALUES(70,114); +INSERT INTO product_slots VALUES(70,115); +INSERT INTO product_slots VALUES(70,116); +INSERT INTO product_slots VALUES(70,117); +INSERT INTO product_slots VALUES(70,118); +INSERT INTO product_slots VALUES(70,119); +INSERT INTO product_slots VALUES(70,120); +INSERT INTO product_slots VALUES(70,121); +INSERT INTO product_slots VALUES(70,122); +INSERT INTO product_slots VALUES(70,123); +INSERT INTO product_slots VALUES(70,124); +INSERT INTO product_slots VALUES(70,125); +INSERT INTO product_slots VALUES(70,126); +INSERT INTO product_slots VALUES(70,127); +INSERT INTO product_slots VALUES(70,128); +INSERT INTO product_slots VALUES(70,129); +INSERT INTO product_slots VALUES(70,130); +INSERT INTO product_slots VALUES(70,131); +INSERT INTO product_slots VALUES(70,132); +INSERT INTO product_slots VALUES(70,133); +INSERT INTO product_slots VALUES(70,134); +INSERT INTO product_slots VALUES(70,135); +INSERT INTO product_slots VALUES(70,136); +INSERT INTO product_slots VALUES(70,137); +INSERT INTO product_slots VALUES(70,138); +INSERT INTO product_slots VALUES(70,139); +INSERT INTO product_slots VALUES(70,140); +INSERT INTO product_slots VALUES(70,141); +INSERT INTO product_slots VALUES(70,142); +INSERT INTO product_slots VALUES(70,143); +INSERT INTO product_slots VALUES(70,144); +INSERT INTO product_slots VALUES(70,145); +INSERT INTO product_slots VALUES(70,146); +INSERT INTO product_slots VALUES(70,147); +INSERT INTO product_slots VALUES(70,148); +INSERT INTO product_slots VALUES(70,149); +INSERT INTO product_slots VALUES(70,150); +INSERT INTO product_slots VALUES(70,151); +INSERT INTO product_slots VALUES(70,152); +INSERT INTO product_slots VALUES(70,153); +INSERT INTO product_slots VALUES(70,154); +INSERT INTO product_slots VALUES(70,155); +INSERT INTO product_slots VALUES(70,156); +INSERT INTO product_slots VALUES(70,157); +INSERT INTO product_slots VALUES(70,158); +INSERT INTO product_slots VALUES(70,159); +INSERT INTO product_slots VALUES(70,160); +INSERT INTO product_slots VALUES(70,161); +INSERT INTO product_slots VALUES(70,162); +INSERT INTO product_slots VALUES(70,163); +INSERT INTO product_slots VALUES(70,164); +INSERT INTO product_slots VALUES(70,165); +INSERT INTO product_slots VALUES(70,166); +INSERT INTO product_slots VALUES(70,167); +INSERT INTO product_slots VALUES(70,168); +INSERT INTO product_slots VALUES(70,169); +INSERT INTO product_slots VALUES(70,170); +INSERT INTO product_slots VALUES(70,171); +INSERT INTO product_slots VALUES(70,172); +INSERT INTO product_slots VALUES(70,173); +INSERT INTO product_slots VALUES(70,174); +INSERT INTO product_slots VALUES(70,175); +INSERT INTO product_slots VALUES(70,176); +INSERT INTO product_slots VALUES(70,177); +INSERT INTO product_slots VALUES(70,178); +INSERT INTO product_slots VALUES(70,179); +INSERT INTO product_slots VALUES(70,180); +INSERT INTO product_slots VALUES(70,181); +INSERT INTO product_slots VALUES(70,182); +INSERT INTO product_slots VALUES(70,183); +INSERT INTO product_slots VALUES(70,184); +INSERT INTO product_slots VALUES(70,185); +INSERT INTO product_slots VALUES(70,186); +INSERT INTO product_slots VALUES(70,187); +INSERT INTO product_slots VALUES(70,188); +INSERT INTO product_slots VALUES(70,189); +INSERT INTO product_slots VALUES(70,190); +INSERT INTO product_slots VALUES(70,191); +INSERT INTO product_slots VALUES(70,192); +INSERT INTO product_slots VALUES(70,193); +INSERT INTO product_slots VALUES(70,194); +INSERT INTO product_slots VALUES(70,195); +INSERT INTO product_slots VALUES(70,196); +INSERT INTO product_slots VALUES(70,197); +INSERT INTO product_slots VALUES(70,198); +INSERT INTO product_slots VALUES(70,199); +INSERT INTO product_slots VALUES(70,200); +INSERT INTO product_slots VALUES(70,201); +INSERT INTO product_slots VALUES(70,202); +INSERT INTO product_slots VALUES(70,203); +INSERT INTO product_slots VALUES(70,204); +INSERT INTO product_slots VALUES(70,205); +INSERT INTO product_slots VALUES(70,206); +INSERT INTO product_slots VALUES(70,207); +INSERT INTO product_slots VALUES(70,208); +INSERT INTO product_slots VALUES(70,209); +INSERT INTO product_slots VALUES(70,210); +INSERT INTO product_slots VALUES(70,211); +INSERT INTO product_slots VALUES(70,212); +INSERT INTO product_slots VALUES(70,213); +INSERT INTO product_slots VALUES(70,214); +INSERT INTO product_slots VALUES(70,215); +INSERT INTO product_slots VALUES(70,216); +INSERT INTO product_slots VALUES(70,217); +INSERT INTO product_slots VALUES(70,218); +INSERT INTO product_slots VALUES(70,219); +INSERT INTO product_slots VALUES(70,220); +INSERT INTO product_slots VALUES(70,221); +INSERT INTO product_slots VALUES(70,222); +INSERT INTO product_slots VALUES(70,223); +INSERT INTO product_slots VALUES(70,224); +INSERT INTO product_slots VALUES(70,225); +INSERT INTO product_slots VALUES(70,226); +INSERT INTO product_slots VALUES(70,227); +INSERT INTO product_slots VALUES(70,228); +INSERT INTO product_slots VALUES(70,229); +INSERT INTO product_slots VALUES(70,230); +INSERT INTO product_slots VALUES(70,231); +INSERT INTO product_slots VALUES(70,232); +INSERT INTO product_slots VALUES(70,233); +INSERT INTO product_slots VALUES(70,234); +INSERT INTO product_slots VALUES(70,235); +INSERT INTO product_slots VALUES(70,236); +INSERT INTO product_slots VALUES(70,237); +INSERT INTO product_slots VALUES(70,238); +INSERT INTO product_slots VALUES(70,239); +INSERT INTO product_slots VALUES(70,240); +INSERT INTO product_slots VALUES(70,241); +INSERT INTO product_slots VALUES(70,242); +INSERT INTO product_slots VALUES(70,243); +INSERT INTO product_slots VALUES(70,244); +INSERT INTO product_slots VALUES(70,274); +INSERT INTO product_slots VALUES(70,275); +INSERT INTO product_slots VALUES(70,279); +INSERT INTO product_slots VALUES(70,280); +INSERT INTO product_slots VALUES(70,281); +INSERT INTO product_slots VALUES(70,282); +INSERT INTO product_slots VALUES(70,283); +INSERT INTO product_slots VALUES(70,284); +INSERT INTO product_slots VALUES(70,285); +INSERT INTO product_slots VALUES(70,286); +INSERT INTO product_slots VALUES(70,287); +INSERT INTO product_slots VALUES(71,39); +INSERT INTO product_slots VALUES(71,41); +INSERT INTO product_slots VALUES(71,43); +INSERT INTO product_slots VALUES(71,44); +INSERT INTO product_slots VALUES(71,45); +INSERT INTO product_slots VALUES(71,46); +INSERT INTO product_slots VALUES(71,47); +INSERT INTO product_slots VALUES(71,48); +INSERT INTO product_slots VALUES(71,49); +INSERT INTO product_slots VALUES(71,50); +INSERT INTO product_slots VALUES(71,51); +INSERT INTO product_slots VALUES(71,52); +INSERT INTO product_slots VALUES(71,53); +INSERT INTO product_slots VALUES(71,54); +INSERT INTO product_slots VALUES(71,55); +INSERT INTO product_slots VALUES(71,56); +INSERT INTO product_slots VALUES(71,57); +INSERT INTO product_slots VALUES(71,58); +INSERT INTO product_slots VALUES(71,59); +INSERT INTO product_slots VALUES(71,60); +INSERT INTO product_slots VALUES(71,61); +INSERT INTO product_slots VALUES(71,62); +INSERT INTO product_slots VALUES(71,63); +INSERT INTO product_slots VALUES(71,64); +INSERT INTO product_slots VALUES(71,65); +INSERT INTO product_slots VALUES(71,66); +INSERT INTO product_slots VALUES(71,67); +INSERT INTO product_slots VALUES(71,68); +INSERT INTO product_slots VALUES(71,69); +INSERT INTO product_slots VALUES(71,70); +INSERT INTO product_slots VALUES(71,71); +INSERT INTO product_slots VALUES(71,72); +INSERT INTO product_slots VALUES(71,73); +INSERT INTO product_slots VALUES(71,74); +INSERT INTO product_slots VALUES(71,75); +INSERT INTO product_slots VALUES(71,76); +INSERT INTO product_slots VALUES(71,77); +INSERT INTO product_slots VALUES(71,78); +INSERT INTO product_slots VALUES(71,79); +INSERT INTO product_slots VALUES(71,80); +INSERT INTO product_slots VALUES(71,81); +INSERT INTO product_slots VALUES(71,82); +INSERT INTO product_slots VALUES(71,83); +INSERT INTO product_slots VALUES(71,84); +INSERT INTO product_slots VALUES(71,85); +INSERT INTO product_slots VALUES(71,86); +INSERT INTO product_slots VALUES(71,87); +INSERT INTO product_slots VALUES(71,88); +INSERT INTO product_slots VALUES(71,89); +INSERT INTO product_slots VALUES(71,90); +INSERT INTO product_slots VALUES(71,91); +INSERT INTO product_slots VALUES(71,92); +INSERT INTO product_slots VALUES(71,93); +INSERT INTO product_slots VALUES(71,94); +INSERT INTO product_slots VALUES(71,95); +INSERT INTO product_slots VALUES(71,96); +INSERT INTO product_slots VALUES(71,97); +INSERT INTO product_slots VALUES(71,98); +INSERT INTO product_slots VALUES(71,99); +INSERT INTO product_slots VALUES(71,100); +INSERT INTO product_slots VALUES(71,101); +INSERT INTO product_slots VALUES(71,102); +INSERT INTO product_slots VALUES(71,103); +INSERT INTO product_slots VALUES(71,104); +INSERT INTO product_slots VALUES(71,105); +INSERT INTO product_slots VALUES(71,106); +INSERT INTO product_slots VALUES(71,107); +INSERT INTO product_slots VALUES(71,108); +INSERT INTO product_slots VALUES(71,109); +INSERT INTO product_slots VALUES(71,110); +INSERT INTO product_slots VALUES(71,111); +INSERT INTO product_slots VALUES(71,112); +INSERT INTO product_slots VALUES(71,113); +INSERT INTO product_slots VALUES(71,114); +INSERT INTO product_slots VALUES(71,115); +INSERT INTO product_slots VALUES(71,116); +INSERT INTO product_slots VALUES(71,117); +INSERT INTO product_slots VALUES(71,118); +INSERT INTO product_slots VALUES(71,119); +INSERT INTO product_slots VALUES(71,120); +INSERT INTO product_slots VALUES(71,121); +INSERT INTO product_slots VALUES(71,122); +INSERT INTO product_slots VALUES(71,123); +INSERT INTO product_slots VALUES(71,124); +INSERT INTO product_slots VALUES(71,125); +INSERT INTO product_slots VALUES(71,126); +INSERT INTO product_slots VALUES(71,127); +INSERT INTO product_slots VALUES(71,128); +INSERT INTO product_slots VALUES(71,129); +INSERT INTO product_slots VALUES(71,130); +INSERT INTO product_slots VALUES(71,131); +INSERT INTO product_slots VALUES(71,132); +INSERT INTO product_slots VALUES(71,133); +INSERT INTO product_slots VALUES(71,134); +INSERT INTO product_slots VALUES(71,135); +INSERT INTO product_slots VALUES(71,136); +INSERT INTO product_slots VALUES(71,137); +INSERT INTO product_slots VALUES(71,138); +INSERT INTO product_slots VALUES(71,139); +INSERT INTO product_slots VALUES(71,140); +INSERT INTO product_slots VALUES(71,141); +INSERT INTO product_slots VALUES(71,142); +INSERT INTO product_slots VALUES(71,143); +INSERT INTO product_slots VALUES(71,144); +INSERT INTO product_slots VALUES(71,145); +INSERT INTO product_slots VALUES(71,146); +INSERT INTO product_slots VALUES(71,147); +INSERT INTO product_slots VALUES(71,148); +INSERT INTO product_slots VALUES(71,149); +INSERT INTO product_slots VALUES(71,150); +INSERT INTO product_slots VALUES(71,151); +INSERT INTO product_slots VALUES(71,152); +INSERT INTO product_slots VALUES(71,153); +INSERT INTO product_slots VALUES(71,154); +INSERT INTO product_slots VALUES(71,155); +INSERT INTO product_slots VALUES(71,156); +INSERT INTO product_slots VALUES(71,157); +INSERT INTO product_slots VALUES(71,158); +INSERT INTO product_slots VALUES(71,159); +INSERT INTO product_slots VALUES(71,160); +INSERT INTO product_slots VALUES(71,161); +INSERT INTO product_slots VALUES(71,162); +INSERT INTO product_slots VALUES(71,163); +INSERT INTO product_slots VALUES(71,164); +INSERT INTO product_slots VALUES(71,165); +INSERT INTO product_slots VALUES(71,166); +INSERT INTO product_slots VALUES(71,167); +INSERT INTO product_slots VALUES(71,168); +INSERT INTO product_slots VALUES(71,169); +INSERT INTO product_slots VALUES(71,170); +INSERT INTO product_slots VALUES(71,171); +INSERT INTO product_slots VALUES(71,172); +INSERT INTO product_slots VALUES(71,173); +INSERT INTO product_slots VALUES(71,174); +INSERT INTO product_slots VALUES(71,175); +INSERT INTO product_slots VALUES(71,176); +INSERT INTO product_slots VALUES(71,177); +INSERT INTO product_slots VALUES(71,178); +INSERT INTO product_slots VALUES(71,179); +INSERT INTO product_slots VALUES(71,180); +INSERT INTO product_slots VALUES(71,181); +INSERT INTO product_slots VALUES(71,182); +INSERT INTO product_slots VALUES(71,183); +INSERT INTO product_slots VALUES(71,184); +INSERT INTO product_slots VALUES(71,185); +INSERT INTO product_slots VALUES(71,186); +INSERT INTO product_slots VALUES(71,187); +INSERT INTO product_slots VALUES(71,188); +INSERT INTO product_slots VALUES(71,189); +INSERT INTO product_slots VALUES(71,190); +INSERT INTO product_slots VALUES(71,191); +INSERT INTO product_slots VALUES(71,192); +INSERT INTO product_slots VALUES(71,193); +INSERT INTO product_slots VALUES(71,194); +INSERT INTO product_slots VALUES(71,195); +INSERT INTO product_slots VALUES(71,196); +INSERT INTO product_slots VALUES(71,197); +INSERT INTO product_slots VALUES(71,198); +INSERT INTO product_slots VALUES(71,199); +INSERT INTO product_slots VALUES(71,200); +INSERT INTO product_slots VALUES(71,201); +INSERT INTO product_slots VALUES(71,202); +INSERT INTO product_slots VALUES(71,203); +INSERT INTO product_slots VALUES(71,204); +INSERT INTO product_slots VALUES(71,205); +INSERT INTO product_slots VALUES(71,206); +INSERT INTO product_slots VALUES(71,207); +INSERT INTO product_slots VALUES(71,208); +INSERT INTO product_slots VALUES(71,209); +INSERT INTO product_slots VALUES(71,210); +INSERT INTO product_slots VALUES(71,211); +INSERT INTO product_slots VALUES(71,212); +INSERT INTO product_slots VALUES(71,213); +INSERT INTO product_slots VALUES(71,214); +INSERT INTO product_slots VALUES(71,215); +INSERT INTO product_slots VALUES(71,216); +INSERT INTO product_slots VALUES(71,217); +INSERT INTO product_slots VALUES(71,218); +INSERT INTO product_slots VALUES(71,219); +INSERT INTO product_slots VALUES(71,220); +INSERT INTO product_slots VALUES(71,221); +INSERT INTO product_slots VALUES(71,222); +INSERT INTO product_slots VALUES(71,223); +INSERT INTO product_slots VALUES(71,224); +INSERT INTO product_slots VALUES(71,225); +INSERT INTO product_slots VALUES(71,226); +INSERT INTO product_slots VALUES(71,227); +INSERT INTO product_slots VALUES(71,228); +INSERT INTO product_slots VALUES(71,229); +INSERT INTO product_slots VALUES(71,230); +INSERT INTO product_slots VALUES(71,231); +INSERT INTO product_slots VALUES(71,232); +INSERT INTO product_slots VALUES(71,233); +INSERT INTO product_slots VALUES(71,234); +INSERT INTO product_slots VALUES(71,235); +INSERT INTO product_slots VALUES(71,236); +INSERT INTO product_slots VALUES(71,237); +INSERT INTO product_slots VALUES(71,238); +INSERT INTO product_slots VALUES(71,239); +INSERT INTO product_slots VALUES(71,240); +INSERT INTO product_slots VALUES(71,241); +INSERT INTO product_slots VALUES(71,242); +INSERT INTO product_slots VALUES(71,243); +INSERT INTO product_slots VALUES(71,244); +INSERT INTO product_slots VALUES(71,274); +INSERT INTO product_slots VALUES(71,275); +INSERT INTO product_slots VALUES(71,279); +INSERT INTO product_slots VALUES(71,280); +INSERT INTO product_slots VALUES(71,281); +INSERT INTO product_slots VALUES(71,282); +INSERT INTO product_slots VALUES(71,283); +INSERT INTO product_slots VALUES(71,284); +INSERT INTO product_slots VALUES(71,285); +INSERT INTO product_slots VALUES(71,286); +INSERT INTO product_slots VALUES(71,287); +INSERT INTO product_slots VALUES(72,39); +INSERT INTO product_slots VALUES(72,41); +INSERT INTO product_slots VALUES(72,43); +INSERT INTO product_slots VALUES(72,44); +INSERT INTO product_slots VALUES(72,45); +INSERT INTO product_slots VALUES(72,46); +INSERT INTO product_slots VALUES(72,47); +INSERT INTO product_slots VALUES(72,48); +INSERT INTO product_slots VALUES(72,49); +INSERT INTO product_slots VALUES(72,50); +INSERT INTO product_slots VALUES(72,51); +INSERT INTO product_slots VALUES(72,52); +INSERT INTO product_slots VALUES(72,53); +INSERT INTO product_slots VALUES(72,54); +INSERT INTO product_slots VALUES(72,55); +INSERT INTO product_slots VALUES(72,56); +INSERT INTO product_slots VALUES(72,57); +INSERT INTO product_slots VALUES(72,58); +INSERT INTO product_slots VALUES(72,59); +INSERT INTO product_slots VALUES(72,60); +INSERT INTO product_slots VALUES(72,61); +INSERT INTO product_slots VALUES(72,62); +INSERT INTO product_slots VALUES(72,63); +INSERT INTO product_slots VALUES(72,64); +INSERT INTO product_slots VALUES(72,65); +INSERT INTO product_slots VALUES(72,66); +INSERT INTO product_slots VALUES(72,67); +INSERT INTO product_slots VALUES(72,68); +INSERT INTO product_slots VALUES(72,69); +INSERT INTO product_slots VALUES(72,70); +INSERT INTO product_slots VALUES(72,71); +INSERT INTO product_slots VALUES(72,72); +INSERT INTO product_slots VALUES(72,73); +INSERT INTO product_slots VALUES(72,74); +INSERT INTO product_slots VALUES(72,75); +INSERT INTO product_slots VALUES(72,76); +INSERT INTO product_slots VALUES(72,77); +INSERT INTO product_slots VALUES(72,78); +INSERT INTO product_slots VALUES(72,79); +INSERT INTO product_slots VALUES(72,80); +INSERT INTO product_slots VALUES(72,81); +INSERT INTO product_slots VALUES(72,82); +INSERT INTO product_slots VALUES(72,83); +INSERT INTO product_slots VALUES(72,84); +INSERT INTO product_slots VALUES(72,85); +INSERT INTO product_slots VALUES(72,86); +INSERT INTO product_slots VALUES(72,87); +INSERT INTO product_slots VALUES(72,88); +INSERT INTO product_slots VALUES(72,89); +INSERT INTO product_slots VALUES(72,90); +INSERT INTO product_slots VALUES(72,91); +INSERT INTO product_slots VALUES(72,92); +INSERT INTO product_slots VALUES(72,93); +INSERT INTO product_slots VALUES(72,94); +INSERT INTO product_slots VALUES(72,95); +INSERT INTO product_slots VALUES(72,96); +INSERT INTO product_slots VALUES(72,97); +INSERT INTO product_slots VALUES(72,98); +INSERT INTO product_slots VALUES(72,99); +INSERT INTO product_slots VALUES(72,100); +INSERT INTO product_slots VALUES(72,101); +INSERT INTO product_slots VALUES(72,102); +INSERT INTO product_slots VALUES(72,103); +INSERT INTO product_slots VALUES(72,104); +INSERT INTO product_slots VALUES(72,105); +INSERT INTO product_slots VALUES(72,106); +INSERT INTO product_slots VALUES(72,107); +INSERT INTO product_slots VALUES(72,108); +INSERT INTO product_slots VALUES(72,109); +INSERT INTO product_slots VALUES(72,110); +INSERT INTO product_slots VALUES(72,111); +INSERT INTO product_slots VALUES(72,112); +INSERT INTO product_slots VALUES(72,113); +INSERT INTO product_slots VALUES(72,114); +INSERT INTO product_slots VALUES(72,115); +INSERT INTO product_slots VALUES(72,116); +INSERT INTO product_slots VALUES(72,117); +INSERT INTO product_slots VALUES(72,118); +INSERT INTO product_slots VALUES(72,119); +INSERT INTO product_slots VALUES(72,120); +INSERT INTO product_slots VALUES(72,121); +INSERT INTO product_slots VALUES(72,122); +INSERT INTO product_slots VALUES(72,123); +INSERT INTO product_slots VALUES(72,124); +INSERT INTO product_slots VALUES(72,125); +INSERT INTO product_slots VALUES(72,126); +INSERT INTO product_slots VALUES(72,127); +INSERT INTO product_slots VALUES(72,128); +INSERT INTO product_slots VALUES(72,129); +INSERT INTO product_slots VALUES(72,130); +INSERT INTO product_slots VALUES(72,131); +INSERT INTO product_slots VALUES(72,132); +INSERT INTO product_slots VALUES(72,133); +INSERT INTO product_slots VALUES(72,134); +INSERT INTO product_slots VALUES(72,135); +INSERT INTO product_slots VALUES(72,136); +INSERT INTO product_slots VALUES(72,137); +INSERT INTO product_slots VALUES(72,138); +INSERT INTO product_slots VALUES(72,139); +INSERT INTO product_slots VALUES(72,140); +INSERT INTO product_slots VALUES(72,141); +INSERT INTO product_slots VALUES(72,142); +INSERT INTO product_slots VALUES(72,143); +INSERT INTO product_slots VALUES(72,144); +INSERT INTO product_slots VALUES(72,145); +INSERT INTO product_slots VALUES(72,146); +INSERT INTO product_slots VALUES(72,147); +INSERT INTO product_slots VALUES(72,148); +INSERT INTO product_slots VALUES(72,149); +INSERT INTO product_slots VALUES(72,150); +INSERT INTO product_slots VALUES(72,151); +INSERT INTO product_slots VALUES(72,152); +INSERT INTO product_slots VALUES(72,153); +INSERT INTO product_slots VALUES(72,154); +INSERT INTO product_slots VALUES(72,155); +INSERT INTO product_slots VALUES(72,156); +INSERT INTO product_slots VALUES(72,157); +INSERT INTO product_slots VALUES(72,158); +INSERT INTO product_slots VALUES(72,159); +INSERT INTO product_slots VALUES(72,160); +INSERT INTO product_slots VALUES(72,161); +INSERT INTO product_slots VALUES(72,162); +INSERT INTO product_slots VALUES(72,163); +INSERT INTO product_slots VALUES(72,164); +INSERT INTO product_slots VALUES(72,165); +INSERT INTO product_slots VALUES(72,166); +INSERT INTO product_slots VALUES(72,167); +INSERT INTO product_slots VALUES(72,168); +INSERT INTO product_slots VALUES(72,169); +INSERT INTO product_slots VALUES(72,170); +INSERT INTO product_slots VALUES(72,171); +INSERT INTO product_slots VALUES(72,172); +INSERT INTO product_slots VALUES(72,173); +INSERT INTO product_slots VALUES(72,174); +INSERT INTO product_slots VALUES(72,175); +INSERT INTO product_slots VALUES(72,176); +INSERT INTO product_slots VALUES(72,177); +INSERT INTO product_slots VALUES(72,178); +INSERT INTO product_slots VALUES(72,179); +INSERT INTO product_slots VALUES(72,180); +INSERT INTO product_slots VALUES(72,181); +INSERT INTO product_slots VALUES(72,182); +INSERT INTO product_slots VALUES(72,183); +INSERT INTO product_slots VALUES(72,184); +INSERT INTO product_slots VALUES(72,185); +INSERT INTO product_slots VALUES(72,186); +INSERT INTO product_slots VALUES(72,187); +INSERT INTO product_slots VALUES(72,188); +INSERT INTO product_slots VALUES(72,189); +INSERT INTO product_slots VALUES(72,190); +INSERT INTO product_slots VALUES(72,191); +INSERT INTO product_slots VALUES(72,192); +INSERT INTO product_slots VALUES(72,193); +INSERT INTO product_slots VALUES(72,194); +INSERT INTO product_slots VALUES(72,195); +INSERT INTO product_slots VALUES(72,196); +INSERT INTO product_slots VALUES(72,197); +INSERT INTO product_slots VALUES(72,198); +INSERT INTO product_slots VALUES(72,199); +INSERT INTO product_slots VALUES(72,200); +INSERT INTO product_slots VALUES(72,201); +INSERT INTO product_slots VALUES(72,202); +INSERT INTO product_slots VALUES(72,203); +INSERT INTO product_slots VALUES(72,204); +INSERT INTO product_slots VALUES(72,205); +INSERT INTO product_slots VALUES(72,206); +INSERT INTO product_slots VALUES(72,207); +INSERT INTO product_slots VALUES(72,208); +INSERT INTO product_slots VALUES(72,209); +INSERT INTO product_slots VALUES(72,210); +INSERT INTO product_slots VALUES(72,211); +INSERT INTO product_slots VALUES(72,212); +INSERT INTO product_slots VALUES(72,213); +INSERT INTO product_slots VALUES(72,214); +INSERT INTO product_slots VALUES(72,215); +INSERT INTO product_slots VALUES(72,216); +INSERT INTO product_slots VALUES(72,217); +INSERT INTO product_slots VALUES(72,218); +INSERT INTO product_slots VALUES(72,219); +INSERT INTO product_slots VALUES(72,220); +INSERT INTO product_slots VALUES(72,221); +INSERT INTO product_slots VALUES(72,222); +INSERT INTO product_slots VALUES(72,223); +INSERT INTO product_slots VALUES(72,224); +INSERT INTO product_slots VALUES(72,225); +INSERT INTO product_slots VALUES(72,226); +INSERT INTO product_slots VALUES(72,227); +INSERT INTO product_slots VALUES(72,228); +INSERT INTO product_slots VALUES(72,229); +INSERT INTO product_slots VALUES(72,230); +INSERT INTO product_slots VALUES(72,231); +INSERT INTO product_slots VALUES(72,232); +INSERT INTO product_slots VALUES(72,233); +INSERT INTO product_slots VALUES(72,234); +INSERT INTO product_slots VALUES(72,235); +INSERT INTO product_slots VALUES(72,236); +INSERT INTO product_slots VALUES(72,237); +INSERT INTO product_slots VALUES(72,238); +INSERT INTO product_slots VALUES(72,239); +INSERT INTO product_slots VALUES(72,240); +INSERT INTO product_slots VALUES(72,241); +INSERT INTO product_slots VALUES(72,242); +INSERT INTO product_slots VALUES(72,243); +INSERT INTO product_slots VALUES(72,244); +INSERT INTO product_slots VALUES(72,274); +INSERT INTO product_slots VALUES(72,275); +INSERT INTO product_slots VALUES(72,279); +INSERT INTO product_slots VALUES(72,280); +INSERT INTO product_slots VALUES(72,281); +INSERT INTO product_slots VALUES(72,282); +INSERT INTO product_slots VALUES(72,283); +INSERT INTO product_slots VALUES(72,284); +INSERT INTO product_slots VALUES(72,285); +INSERT INTO product_slots VALUES(72,286); +INSERT INTO product_slots VALUES(72,287); +INSERT INTO product_slots VALUES(73,40); +INSERT INTO product_slots VALUES(73,64); +INSERT INTO product_slots VALUES(73,65); +INSERT INTO product_slots VALUES(73,66); +INSERT INTO product_slots VALUES(73,67); +INSERT INTO product_slots VALUES(73,68); +INSERT INTO product_slots VALUES(73,69); +INSERT INTO product_slots VALUES(73,70); +INSERT INTO product_slots VALUES(73,71); +INSERT INTO product_slots VALUES(73,72); +INSERT INTO product_slots VALUES(73,73); +INSERT INTO product_slots VALUES(73,74); +INSERT INTO product_slots VALUES(73,75); +INSERT INTO product_slots VALUES(73,76); +INSERT INTO product_slots VALUES(73,77); +INSERT INTO product_slots VALUES(73,78); +INSERT INTO product_slots VALUES(73,79); +INSERT INTO product_slots VALUES(73,80); +INSERT INTO product_slots VALUES(73,81); +INSERT INTO product_slots VALUES(73,82); +INSERT INTO product_slots VALUES(73,83); +INSERT INTO product_slots VALUES(73,84); +INSERT INTO product_slots VALUES(73,85); +INSERT INTO product_slots VALUES(73,86); +INSERT INTO product_slots VALUES(73,87); +INSERT INTO product_slots VALUES(73,88); +INSERT INTO product_slots VALUES(73,89); +INSERT INTO product_slots VALUES(73,90); +INSERT INTO product_slots VALUES(73,91); +INSERT INTO product_slots VALUES(73,92); +INSERT INTO product_slots VALUES(73,93); +INSERT INTO product_slots VALUES(73,94); +INSERT INTO product_slots VALUES(73,95); +INSERT INTO product_slots VALUES(73,96); +INSERT INTO product_slots VALUES(73,97); +INSERT INTO product_slots VALUES(73,98); +INSERT INTO product_slots VALUES(73,99); +INSERT INTO product_slots VALUES(73,100); +INSERT INTO product_slots VALUES(73,102); +INSERT INTO product_slots VALUES(73,103); +INSERT INTO product_slots VALUES(73,104); +INSERT INTO product_slots VALUES(73,105); +INSERT INTO product_slots VALUES(73,106); +INSERT INTO product_slots VALUES(73,107); +INSERT INTO product_slots VALUES(73,108); +INSERT INTO product_slots VALUES(73,109); +INSERT INTO product_slots VALUES(73,110); +INSERT INTO product_slots VALUES(73,111); +INSERT INTO product_slots VALUES(73,112); +INSERT INTO product_slots VALUES(73,113); +INSERT INTO product_slots VALUES(73,114); +INSERT INTO product_slots VALUES(73,115); +INSERT INTO product_slots VALUES(73,117); +INSERT INTO product_slots VALUES(73,118); +INSERT INTO product_slots VALUES(73,119); +INSERT INTO product_slots VALUES(73,120); +INSERT INTO product_slots VALUES(73,121); +INSERT INTO product_slots VALUES(73,122); +INSERT INTO product_slots VALUES(73,123); +INSERT INTO product_slots VALUES(73,124); +INSERT INTO product_slots VALUES(73,125); +INSERT INTO product_slots VALUES(73,126); +INSERT INTO product_slots VALUES(73,127); +INSERT INTO product_slots VALUES(73,128); +INSERT INTO product_slots VALUES(73,129); +INSERT INTO product_slots VALUES(73,130); +INSERT INTO product_slots VALUES(73,131); +INSERT INTO product_slots VALUES(73,132); +INSERT INTO product_slots VALUES(73,133); +INSERT INTO product_slots VALUES(73,134); +INSERT INTO product_slots VALUES(73,135); +INSERT INTO product_slots VALUES(73,136); +INSERT INTO product_slots VALUES(73,138); +INSERT INTO product_slots VALUES(73,139); +INSERT INTO product_slots VALUES(73,140); +INSERT INTO product_slots VALUES(73,141); +INSERT INTO product_slots VALUES(73,142); +INSERT INTO product_slots VALUES(73,143); +INSERT INTO product_slots VALUES(73,145); +INSERT INTO product_slots VALUES(73,146); +INSERT INTO product_slots VALUES(73,147); +INSERT INTO product_slots VALUES(73,148); +INSERT INTO product_slots VALUES(73,149); +INSERT INTO product_slots VALUES(73,150); +INSERT INTO product_slots VALUES(73,151); +INSERT INTO product_slots VALUES(73,152); +INSERT INTO product_slots VALUES(73,153); +INSERT INTO product_slots VALUES(73,154); +INSERT INTO product_slots VALUES(73,155); +INSERT INTO product_slots VALUES(73,156); +INSERT INTO product_slots VALUES(73,157); +INSERT INTO product_slots VALUES(73,158); +INSERT INTO product_slots VALUES(73,159); +INSERT INTO product_slots VALUES(73,160); +INSERT INTO product_slots VALUES(73,161); +INSERT INTO product_slots VALUES(73,162); +INSERT INTO product_slots VALUES(73,163); +INSERT INTO product_slots VALUES(73,164); +INSERT INTO product_slots VALUES(73,165); +INSERT INTO product_slots VALUES(73,166); +INSERT INTO product_slots VALUES(73,167); +INSERT INTO product_slots VALUES(73,168); +INSERT INTO product_slots VALUES(73,169); +INSERT INTO product_slots VALUES(73,170); +INSERT INTO product_slots VALUES(73,171); +INSERT INTO product_slots VALUES(73,172); +INSERT INTO product_slots VALUES(73,173); +INSERT INTO product_slots VALUES(73,174); +INSERT INTO product_slots VALUES(73,175); +INSERT INTO product_slots VALUES(73,176); +INSERT INTO product_slots VALUES(73,177); +INSERT INTO product_slots VALUES(73,178); +INSERT INTO product_slots VALUES(73,179); +INSERT INTO product_slots VALUES(73,180); +INSERT INTO product_slots VALUES(73,181); +INSERT INTO product_slots VALUES(73,182); +INSERT INTO product_slots VALUES(73,183); +INSERT INTO product_slots VALUES(73,184); +INSERT INTO product_slots VALUES(73,185); +INSERT INTO product_slots VALUES(73,186); +INSERT INTO product_slots VALUES(73,187); +INSERT INTO product_slots VALUES(73,188); +INSERT INTO product_slots VALUES(73,189); +INSERT INTO product_slots VALUES(73,190); +INSERT INTO product_slots VALUES(73,191); +INSERT INTO product_slots VALUES(73,192); +INSERT INTO product_slots VALUES(73,193); +INSERT INTO product_slots VALUES(73,194); +INSERT INTO product_slots VALUES(73,195); +INSERT INTO product_slots VALUES(73,196); +INSERT INTO product_slots VALUES(73,197); +INSERT INTO product_slots VALUES(73,198); +INSERT INTO product_slots VALUES(73,199); +INSERT INTO product_slots VALUES(73,200); +INSERT INTO product_slots VALUES(73,201); +INSERT INTO product_slots VALUES(73,202); +INSERT INTO product_slots VALUES(73,203); +INSERT INTO product_slots VALUES(73,204); +INSERT INTO product_slots VALUES(73,205); +INSERT INTO product_slots VALUES(73,206); +INSERT INTO product_slots VALUES(73,207); +INSERT INTO product_slots VALUES(73,208); +INSERT INTO product_slots VALUES(73,209); +INSERT INTO product_slots VALUES(73,210); +INSERT INTO product_slots VALUES(73,211); +INSERT INTO product_slots VALUES(73,212); +INSERT INTO product_slots VALUES(73,213); +INSERT INTO product_slots VALUES(73,214); +INSERT INTO product_slots VALUES(73,215); +INSERT INTO product_slots VALUES(73,216); +INSERT INTO product_slots VALUES(73,217); +INSERT INTO product_slots VALUES(73,218); +INSERT INTO product_slots VALUES(73,219); +INSERT INTO product_slots VALUES(73,220); +INSERT INTO product_slots VALUES(73,221); +INSERT INTO product_slots VALUES(73,222); +INSERT INTO product_slots VALUES(73,223); +INSERT INTO product_slots VALUES(73,224); +INSERT INTO product_slots VALUES(73,225); +INSERT INTO product_slots VALUES(73,226); +INSERT INTO product_slots VALUES(73,227); +INSERT INTO product_slots VALUES(73,228); +INSERT INTO product_slots VALUES(73,229); +INSERT INTO product_slots VALUES(73,230); +INSERT INTO product_slots VALUES(73,231); +INSERT INTO product_slots VALUES(73,232); +INSERT INTO product_slots VALUES(73,233); +INSERT INTO product_slots VALUES(73,234); +INSERT INTO product_slots VALUES(73,235); +INSERT INTO product_slots VALUES(73,236); +INSERT INTO product_slots VALUES(73,237); +INSERT INTO product_slots VALUES(73,238); +INSERT INTO product_slots VALUES(73,239); +INSERT INTO product_slots VALUES(73,240); +INSERT INTO product_slots VALUES(73,241); +INSERT INTO product_slots VALUES(73,242); +INSERT INTO product_slots VALUES(73,243); +INSERT INTO product_slots VALUES(73,244); +INSERT INTO product_slots VALUES(73,274); +INSERT INTO product_slots VALUES(73,275); +INSERT INTO product_slots VALUES(73,279); +INSERT INTO product_slots VALUES(73,280); +INSERT INTO product_slots VALUES(73,281); +INSERT INTO product_slots VALUES(73,282); +INSERT INTO product_slots VALUES(73,283); +INSERT INTO product_slots VALUES(73,284); +INSERT INTO product_slots VALUES(73,285); +INSERT INTO product_slots VALUES(73,286); +INSERT INTO product_slots VALUES(73,287); +INSERT INTO product_slots VALUES(74,39); +INSERT INTO product_slots VALUES(74,44); +INSERT INTO product_slots VALUES(74,46); +INSERT INTO product_slots VALUES(74,47); +INSERT INTO product_slots VALUES(74,48); +INSERT INTO product_slots VALUES(74,49); +INSERT INTO product_slots VALUES(74,50); +INSERT INTO product_slots VALUES(74,51); +INSERT INTO product_slots VALUES(74,52); +INSERT INTO product_slots VALUES(74,53); +INSERT INTO product_slots VALUES(74,54); +INSERT INTO product_slots VALUES(74,55); +INSERT INTO product_slots VALUES(74,56); +INSERT INTO product_slots VALUES(74,57); +INSERT INTO product_slots VALUES(74,58); +INSERT INTO product_slots VALUES(74,59); +INSERT INTO product_slots VALUES(74,60); +INSERT INTO product_slots VALUES(74,61); +INSERT INTO product_slots VALUES(74,62); +INSERT INTO product_slots VALUES(74,63); +INSERT INTO product_slots VALUES(74,64); +INSERT INTO product_slots VALUES(74,65); +INSERT INTO product_slots VALUES(74,66); +INSERT INTO product_slots VALUES(74,67); +INSERT INTO product_slots VALUES(74,68); +INSERT INTO product_slots VALUES(74,69); +INSERT INTO product_slots VALUES(74,70); +INSERT INTO product_slots VALUES(74,71); +INSERT INTO product_slots VALUES(74,72); +INSERT INTO product_slots VALUES(74,73); +INSERT INTO product_slots VALUES(74,74); +INSERT INTO product_slots VALUES(74,75); +INSERT INTO product_slots VALUES(74,76); +INSERT INTO product_slots VALUES(74,77); +INSERT INTO product_slots VALUES(74,78); +INSERT INTO product_slots VALUES(74,79); +INSERT INTO product_slots VALUES(74,80); +INSERT INTO product_slots VALUES(74,81); +INSERT INTO product_slots VALUES(74,82); +INSERT INTO product_slots VALUES(74,83); +INSERT INTO product_slots VALUES(74,84); +INSERT INTO product_slots VALUES(74,85); +INSERT INTO product_slots VALUES(74,86); +INSERT INTO product_slots VALUES(74,87); +INSERT INTO product_slots VALUES(74,88); +INSERT INTO product_slots VALUES(74,89); +INSERT INTO product_slots VALUES(74,90); +INSERT INTO product_slots VALUES(74,91); +INSERT INTO product_slots VALUES(74,92); +INSERT INTO product_slots VALUES(74,93); +INSERT INTO product_slots VALUES(74,94); +INSERT INTO product_slots VALUES(74,95); +INSERT INTO product_slots VALUES(74,96); +INSERT INTO product_slots VALUES(74,97); +INSERT INTO product_slots VALUES(74,98); +INSERT INTO product_slots VALUES(74,99); +INSERT INTO product_slots VALUES(74,100); +INSERT INTO product_slots VALUES(74,101); +INSERT INTO product_slots VALUES(74,102); +INSERT INTO product_slots VALUES(74,103); +INSERT INTO product_slots VALUES(74,104); +INSERT INTO product_slots VALUES(74,105); +INSERT INTO product_slots VALUES(74,106); +INSERT INTO product_slots VALUES(74,107); +INSERT INTO product_slots VALUES(74,108); +INSERT INTO product_slots VALUES(74,109); +INSERT INTO product_slots VALUES(74,110); +INSERT INTO product_slots VALUES(74,111); +INSERT INTO product_slots VALUES(74,112); +INSERT INTO product_slots VALUES(74,113); +INSERT INTO product_slots VALUES(74,114); +INSERT INTO product_slots VALUES(74,115); +INSERT INTO product_slots VALUES(74,116); +INSERT INTO product_slots VALUES(74,117); +INSERT INTO product_slots VALUES(74,118); +INSERT INTO product_slots VALUES(74,119); +INSERT INTO product_slots VALUES(74,120); +INSERT INTO product_slots VALUES(74,121); +INSERT INTO product_slots VALUES(74,122); +INSERT INTO product_slots VALUES(74,123); +INSERT INTO product_slots VALUES(74,124); +INSERT INTO product_slots VALUES(74,125); +INSERT INTO product_slots VALUES(74,126); +INSERT INTO product_slots VALUES(74,127); +INSERT INTO product_slots VALUES(74,128); +INSERT INTO product_slots VALUES(74,129); +INSERT INTO product_slots VALUES(74,130); +INSERT INTO product_slots VALUES(74,131); +INSERT INTO product_slots VALUES(74,132); +INSERT INTO product_slots VALUES(74,133); +INSERT INTO product_slots VALUES(74,134); +INSERT INTO product_slots VALUES(74,135); +INSERT INTO product_slots VALUES(74,136); +INSERT INTO product_slots VALUES(74,137); +INSERT INTO product_slots VALUES(74,138); +INSERT INTO product_slots VALUES(74,139); +INSERT INTO product_slots VALUES(74,140); +INSERT INTO product_slots VALUES(74,141); +INSERT INTO product_slots VALUES(74,142); +INSERT INTO product_slots VALUES(74,143); +INSERT INTO product_slots VALUES(74,144); +INSERT INTO product_slots VALUES(74,145); +INSERT INTO product_slots VALUES(74,146); +INSERT INTO product_slots VALUES(74,147); +INSERT INTO product_slots VALUES(74,148); +INSERT INTO product_slots VALUES(74,149); +INSERT INTO product_slots VALUES(74,150); +INSERT INTO product_slots VALUES(74,151); +INSERT INTO product_slots VALUES(74,152); +INSERT INTO product_slots VALUES(74,153); +INSERT INTO product_slots VALUES(74,154); +INSERT INTO product_slots VALUES(74,155); +INSERT INTO product_slots VALUES(74,156); +INSERT INTO product_slots VALUES(74,157); +INSERT INTO product_slots VALUES(74,158); +INSERT INTO product_slots VALUES(74,159); +INSERT INTO product_slots VALUES(74,160); +INSERT INTO product_slots VALUES(74,161); +INSERT INTO product_slots VALUES(74,162); +INSERT INTO product_slots VALUES(74,163); +INSERT INTO product_slots VALUES(74,164); +INSERT INTO product_slots VALUES(74,165); +INSERT INTO product_slots VALUES(74,166); +INSERT INTO product_slots VALUES(74,167); +INSERT INTO product_slots VALUES(74,168); +INSERT INTO product_slots VALUES(74,169); +INSERT INTO product_slots VALUES(74,170); +INSERT INTO product_slots VALUES(74,171); +INSERT INTO product_slots VALUES(74,172); +INSERT INTO product_slots VALUES(74,173); +INSERT INTO product_slots VALUES(74,174); +INSERT INTO product_slots VALUES(74,175); +INSERT INTO product_slots VALUES(74,176); +INSERT INTO product_slots VALUES(74,177); +INSERT INTO product_slots VALUES(74,178); +INSERT INTO product_slots VALUES(74,179); +INSERT INTO product_slots VALUES(74,180); +INSERT INTO product_slots VALUES(74,181); +INSERT INTO product_slots VALUES(74,182); +INSERT INTO product_slots VALUES(74,183); +INSERT INTO product_slots VALUES(74,184); +INSERT INTO product_slots VALUES(74,185); +INSERT INTO product_slots VALUES(74,186); +INSERT INTO product_slots VALUES(74,187); +INSERT INTO product_slots VALUES(74,188); +INSERT INTO product_slots VALUES(74,189); +INSERT INTO product_slots VALUES(74,190); +INSERT INTO product_slots VALUES(74,191); +INSERT INTO product_slots VALUES(74,192); +INSERT INTO product_slots VALUES(74,193); +INSERT INTO product_slots VALUES(74,194); +INSERT INTO product_slots VALUES(74,195); +INSERT INTO product_slots VALUES(74,196); +INSERT INTO product_slots VALUES(74,197); +INSERT INTO product_slots VALUES(74,198); +INSERT INTO product_slots VALUES(74,199); +INSERT INTO product_slots VALUES(74,200); +INSERT INTO product_slots VALUES(74,201); +INSERT INTO product_slots VALUES(74,202); +INSERT INTO product_slots VALUES(74,203); +INSERT INTO product_slots VALUES(74,204); +INSERT INTO product_slots VALUES(74,205); +INSERT INTO product_slots VALUES(74,206); +INSERT INTO product_slots VALUES(74,207); +INSERT INTO product_slots VALUES(74,208); +INSERT INTO product_slots VALUES(74,209); +INSERT INTO product_slots VALUES(74,210); +INSERT INTO product_slots VALUES(74,211); +INSERT INTO product_slots VALUES(74,212); +INSERT INTO product_slots VALUES(74,213); +INSERT INTO product_slots VALUES(74,214); +INSERT INTO product_slots VALUES(74,215); +INSERT INTO product_slots VALUES(74,216); +INSERT INTO product_slots VALUES(74,217); +INSERT INTO product_slots VALUES(74,218); +INSERT INTO product_slots VALUES(74,219); +INSERT INTO product_slots VALUES(74,220); +INSERT INTO product_slots VALUES(74,221); +INSERT INTO product_slots VALUES(74,222); +INSERT INTO product_slots VALUES(74,223); +INSERT INTO product_slots VALUES(74,224); +INSERT INTO product_slots VALUES(74,225); +INSERT INTO product_slots VALUES(74,226); +INSERT INTO product_slots VALUES(74,227); +INSERT INTO product_slots VALUES(74,228); +INSERT INTO product_slots VALUES(74,229); +INSERT INTO product_slots VALUES(74,230); +INSERT INTO product_slots VALUES(74,231); +INSERT INTO product_slots VALUES(74,232); +INSERT INTO product_slots VALUES(74,233); +INSERT INTO product_slots VALUES(74,234); +INSERT INTO product_slots VALUES(74,235); +INSERT INTO product_slots VALUES(74,236); +INSERT INTO product_slots VALUES(74,237); +INSERT INTO product_slots VALUES(74,238); +INSERT INTO product_slots VALUES(74,239); +INSERT INTO product_slots VALUES(74,240); +INSERT INTO product_slots VALUES(74,241); +INSERT INTO product_slots VALUES(74,242); +INSERT INTO product_slots VALUES(74,243); +INSERT INTO product_slots VALUES(74,244); +INSERT INTO product_slots VALUES(74,274); +INSERT INTO product_slots VALUES(74,275); +INSERT INTO product_slots VALUES(74,279); +INSERT INTO product_slots VALUES(74,280); +INSERT INTO product_slots VALUES(74,281); +INSERT INTO product_slots VALUES(74,282); +INSERT INTO product_slots VALUES(74,283); +INSERT INTO product_slots VALUES(74,284); +INSERT INTO product_slots VALUES(74,285); +INSERT INTO product_slots VALUES(74,286); +INSERT INTO product_slots VALUES(74,287); +INSERT INTO product_slots VALUES(75,39); +INSERT INTO product_slots VALUES(75,43); +INSERT INTO product_slots VALUES(75,45); +INSERT INTO product_slots VALUES(75,48); +INSERT INTO product_slots VALUES(75,49); +INSERT INTO product_slots VALUES(75,51); +INSERT INTO product_slots VALUES(75,52); +INSERT INTO product_slots VALUES(75,57); +INSERT INTO product_slots VALUES(75,58); +INSERT INTO product_slots VALUES(75,59); +INSERT INTO product_slots VALUES(75,62); +INSERT INTO product_slots VALUES(75,63); +INSERT INTO product_slots VALUES(75,64); +INSERT INTO product_slots VALUES(75,65); +INSERT INTO product_slots VALUES(75,66); +INSERT INTO product_slots VALUES(75,67); +INSERT INTO product_slots VALUES(75,69); +INSERT INTO product_slots VALUES(75,70); +INSERT INTO product_slots VALUES(75,71); +INSERT INTO product_slots VALUES(75,72); +INSERT INTO product_slots VALUES(75,73); +INSERT INTO product_slots VALUES(75,75); +INSERT INTO product_slots VALUES(75,82); +INSERT INTO product_slots VALUES(75,83); +INSERT INTO product_slots VALUES(75,84); +INSERT INTO product_slots VALUES(75,90); +INSERT INTO product_slots VALUES(75,91); +INSERT INTO product_slots VALUES(75,97); +INSERT INTO product_slots VALUES(75,98); +INSERT INTO product_slots VALUES(75,102); +INSERT INTO product_slots VALUES(75,103); +INSERT INTO product_slots VALUES(75,104); +INSERT INTO product_slots VALUES(75,110); +INSERT INTO product_slots VALUES(75,111); +INSERT INTO product_slots VALUES(75,112); +INSERT INTO product_slots VALUES(75,116); +INSERT INTO product_slots VALUES(75,117); +INSERT INTO product_slots VALUES(75,118); +INSERT INTO product_slots VALUES(75,119); +INSERT INTO product_slots VALUES(75,120); +INSERT INTO product_slots VALUES(75,121); +INSERT INTO product_slots VALUES(75,122); +INSERT INTO product_slots VALUES(75,123); +INSERT INTO product_slots VALUES(75,124); +INSERT INTO product_slots VALUES(75,125); +INSERT INTO product_slots VALUES(75,126); +INSERT INTO product_slots VALUES(75,127); +INSERT INTO product_slots VALUES(75,128); +INSERT INTO product_slots VALUES(75,129); +INSERT INTO product_slots VALUES(75,130); +INSERT INTO product_slots VALUES(75,131); +INSERT INTO product_slots VALUES(75,132); +INSERT INTO product_slots VALUES(75,133); +INSERT INTO product_slots VALUES(75,134); +INSERT INTO product_slots VALUES(75,135); +INSERT INTO product_slots VALUES(75,136); +INSERT INTO product_slots VALUES(75,137); +INSERT INTO product_slots VALUES(75,138); +INSERT INTO product_slots VALUES(75,139); +INSERT INTO product_slots VALUES(75,140); +INSERT INTO product_slots VALUES(75,141); +INSERT INTO product_slots VALUES(75,142); +INSERT INTO product_slots VALUES(75,143); +INSERT INTO product_slots VALUES(75,144); +INSERT INTO product_slots VALUES(75,145); +INSERT INTO product_slots VALUES(75,146); +INSERT INTO product_slots VALUES(75,147); +INSERT INTO product_slots VALUES(75,148); +INSERT INTO product_slots VALUES(75,149); +INSERT INTO product_slots VALUES(75,150); +INSERT INTO product_slots VALUES(75,151); +INSERT INTO product_slots VALUES(75,152); +INSERT INTO product_slots VALUES(75,153); +INSERT INTO product_slots VALUES(75,154); +INSERT INTO product_slots VALUES(75,155); +INSERT INTO product_slots VALUES(75,156); +INSERT INTO product_slots VALUES(75,157); +INSERT INTO product_slots VALUES(75,158); +INSERT INTO product_slots VALUES(75,159); +INSERT INTO product_slots VALUES(75,160); +INSERT INTO product_slots VALUES(75,161); +INSERT INTO product_slots VALUES(75,162); +INSERT INTO product_slots VALUES(75,163); +INSERT INTO product_slots VALUES(75,164); +INSERT INTO product_slots VALUES(75,165); +INSERT INTO product_slots VALUES(75,166); +INSERT INTO product_slots VALUES(75,167); +INSERT INTO product_slots VALUES(75,168); +INSERT INTO product_slots VALUES(75,169); +INSERT INTO product_slots VALUES(75,170); +INSERT INTO product_slots VALUES(75,171); +INSERT INTO product_slots VALUES(75,172); +INSERT INTO product_slots VALUES(75,173); +INSERT INTO product_slots VALUES(75,174); +INSERT INTO product_slots VALUES(75,175); +INSERT INTO product_slots VALUES(75,176); +INSERT INTO product_slots VALUES(75,177); +INSERT INTO product_slots VALUES(75,178); +INSERT INTO product_slots VALUES(75,179); +INSERT INTO product_slots VALUES(75,180); +INSERT INTO product_slots VALUES(75,181); +INSERT INTO product_slots VALUES(75,182); +INSERT INTO product_slots VALUES(75,183); +INSERT INTO product_slots VALUES(75,184); +INSERT INTO product_slots VALUES(75,185); +INSERT INTO product_slots VALUES(75,186); +INSERT INTO product_slots VALUES(75,187); +INSERT INTO product_slots VALUES(75,188); +INSERT INTO product_slots VALUES(75,189); +INSERT INTO product_slots VALUES(75,190); +INSERT INTO product_slots VALUES(75,191); +INSERT INTO product_slots VALUES(75,192); +INSERT INTO product_slots VALUES(75,193); +INSERT INTO product_slots VALUES(75,194); +INSERT INTO product_slots VALUES(75,195); +INSERT INTO product_slots VALUES(75,196); +INSERT INTO product_slots VALUES(75,197); +INSERT INTO product_slots VALUES(75,198); +INSERT INTO product_slots VALUES(75,199); +INSERT INTO product_slots VALUES(75,200); +INSERT INTO product_slots VALUES(75,201); +INSERT INTO product_slots VALUES(75,202); +INSERT INTO product_slots VALUES(75,203); +INSERT INTO product_slots VALUES(75,204); +INSERT INTO product_slots VALUES(75,205); +INSERT INTO product_slots VALUES(75,206); +INSERT INTO product_slots VALUES(75,207); +INSERT INTO product_slots VALUES(75,208); +INSERT INTO product_slots VALUES(75,209); +INSERT INTO product_slots VALUES(75,210); +INSERT INTO product_slots VALUES(75,211); +INSERT INTO product_slots VALUES(75,212); +INSERT INTO product_slots VALUES(75,213); +INSERT INTO product_slots VALUES(75,214); +INSERT INTO product_slots VALUES(75,215); +INSERT INTO product_slots VALUES(75,216); +INSERT INTO product_slots VALUES(75,217); +INSERT INTO product_slots VALUES(75,218); +INSERT INTO product_slots VALUES(75,219); +INSERT INTO product_slots VALUES(75,220); +INSERT INTO product_slots VALUES(75,221); +INSERT INTO product_slots VALUES(75,222); +INSERT INTO product_slots VALUES(75,223); +INSERT INTO product_slots VALUES(75,224); +INSERT INTO product_slots VALUES(75,225); +INSERT INTO product_slots VALUES(75,226); +INSERT INTO product_slots VALUES(75,227); +INSERT INTO product_slots VALUES(75,228); +INSERT INTO product_slots VALUES(75,229); +INSERT INTO product_slots VALUES(75,230); +INSERT INTO product_slots VALUES(75,231); +INSERT INTO product_slots VALUES(75,232); +INSERT INTO product_slots VALUES(75,233); +INSERT INTO product_slots VALUES(75,234); +INSERT INTO product_slots VALUES(75,235); +INSERT INTO product_slots VALUES(75,236); +INSERT INTO product_slots VALUES(75,237); +INSERT INTO product_slots VALUES(75,238); +INSERT INTO product_slots VALUES(75,239); +INSERT INTO product_slots VALUES(75,240); +INSERT INTO product_slots VALUES(75,241); +INSERT INTO product_slots VALUES(75,242); +INSERT INTO product_slots VALUES(75,243); +INSERT INTO product_slots VALUES(75,244); +INSERT INTO product_slots VALUES(75,274); +INSERT INTO product_slots VALUES(75,275); +INSERT INTO product_slots VALUES(75,279); +INSERT INTO product_slots VALUES(75,280); +INSERT INTO product_slots VALUES(75,281); +INSERT INTO product_slots VALUES(75,282); +INSERT INTO product_slots VALUES(75,283); +INSERT INTO product_slots VALUES(75,284); +INSERT INTO product_slots VALUES(75,285); +INSERT INTO product_slots VALUES(75,286); +INSERT INTO product_slots VALUES(75,287); +INSERT INTO product_slots VALUES(76,39); +INSERT INTO product_slots VALUES(76,41); +INSERT INTO product_slots VALUES(76,43); +INSERT INTO product_slots VALUES(76,44); +INSERT INTO product_slots VALUES(76,45); +INSERT INTO product_slots VALUES(76,46); +INSERT INTO product_slots VALUES(76,47); +INSERT INTO product_slots VALUES(76,48); +INSERT INTO product_slots VALUES(76,49); +INSERT INTO product_slots VALUES(76,50); +INSERT INTO product_slots VALUES(76,51); +INSERT INTO product_slots VALUES(76,52); +INSERT INTO product_slots VALUES(76,53); +INSERT INTO product_slots VALUES(76,54); +INSERT INTO product_slots VALUES(76,55); +INSERT INTO product_slots VALUES(76,56); +INSERT INTO product_slots VALUES(76,57); +INSERT INTO product_slots VALUES(76,58); +INSERT INTO product_slots VALUES(76,59); +INSERT INTO product_slots VALUES(76,60); +INSERT INTO product_slots VALUES(76,61); +INSERT INTO product_slots VALUES(76,62); +INSERT INTO product_slots VALUES(76,63); +INSERT INTO product_slots VALUES(76,64); +INSERT INTO product_slots VALUES(76,65); +INSERT INTO product_slots VALUES(76,66); +INSERT INTO product_slots VALUES(76,67); +INSERT INTO product_slots VALUES(76,68); +INSERT INTO product_slots VALUES(76,69); +INSERT INTO product_slots VALUES(76,70); +INSERT INTO product_slots VALUES(76,71); +INSERT INTO product_slots VALUES(76,72); +INSERT INTO product_slots VALUES(76,73); +INSERT INTO product_slots VALUES(76,74); +INSERT INTO product_slots VALUES(76,75); +INSERT INTO product_slots VALUES(76,76); +INSERT INTO product_slots VALUES(76,77); +INSERT INTO product_slots VALUES(76,78); +INSERT INTO product_slots VALUES(76,79); +INSERT INTO product_slots VALUES(76,80); +INSERT INTO product_slots VALUES(76,81); +INSERT INTO product_slots VALUES(76,82); +INSERT INTO product_slots VALUES(76,83); +INSERT INTO product_slots VALUES(76,84); +INSERT INTO product_slots VALUES(76,85); +INSERT INTO product_slots VALUES(76,86); +INSERT INTO product_slots VALUES(76,87); +INSERT INTO product_slots VALUES(76,88); +INSERT INTO product_slots VALUES(76,89); +INSERT INTO product_slots VALUES(76,90); +INSERT INTO product_slots VALUES(76,91); +INSERT INTO product_slots VALUES(76,92); +INSERT INTO product_slots VALUES(76,93); +INSERT INTO product_slots VALUES(76,94); +INSERT INTO product_slots VALUES(76,95); +INSERT INTO product_slots VALUES(76,96); +INSERT INTO product_slots VALUES(76,97); +INSERT INTO product_slots VALUES(76,98); +INSERT INTO product_slots VALUES(76,99); +INSERT INTO product_slots VALUES(76,100); +INSERT INTO product_slots VALUES(76,101); +INSERT INTO product_slots VALUES(76,102); +INSERT INTO product_slots VALUES(76,103); +INSERT INTO product_slots VALUES(76,104); +INSERT INTO product_slots VALUES(76,105); +INSERT INTO product_slots VALUES(76,106); +INSERT INTO product_slots VALUES(76,107); +INSERT INTO product_slots VALUES(76,108); +INSERT INTO product_slots VALUES(76,109); +INSERT INTO product_slots VALUES(76,110); +INSERT INTO product_slots VALUES(76,111); +INSERT INTO product_slots VALUES(76,112); +INSERT INTO product_slots VALUES(76,113); +INSERT INTO product_slots VALUES(76,114); +INSERT INTO product_slots VALUES(76,115); +INSERT INTO product_slots VALUES(76,116); +INSERT INTO product_slots VALUES(76,117); +INSERT INTO product_slots VALUES(76,118); +INSERT INTO product_slots VALUES(76,119); +INSERT INTO product_slots VALUES(76,120); +INSERT INTO product_slots VALUES(76,121); +INSERT INTO product_slots VALUES(76,122); +INSERT INTO product_slots VALUES(76,123); +INSERT INTO product_slots VALUES(76,124); +INSERT INTO product_slots VALUES(76,125); +INSERT INTO product_slots VALUES(76,126); +INSERT INTO product_slots VALUES(76,127); +INSERT INTO product_slots VALUES(76,128); +INSERT INTO product_slots VALUES(76,129); +INSERT INTO product_slots VALUES(76,130); +INSERT INTO product_slots VALUES(76,131); +INSERT INTO product_slots VALUES(76,132); +INSERT INTO product_slots VALUES(76,133); +INSERT INTO product_slots VALUES(76,134); +INSERT INTO product_slots VALUES(76,135); +INSERT INTO product_slots VALUES(76,136); +INSERT INTO product_slots VALUES(76,137); +INSERT INTO product_slots VALUES(76,138); +INSERT INTO product_slots VALUES(76,139); +INSERT INTO product_slots VALUES(76,140); +INSERT INTO product_slots VALUES(76,141); +INSERT INTO product_slots VALUES(76,142); +INSERT INTO product_slots VALUES(76,143); +INSERT INTO product_slots VALUES(76,144); +INSERT INTO product_slots VALUES(76,145); +INSERT INTO product_slots VALUES(76,146); +INSERT INTO product_slots VALUES(76,147); +INSERT INTO product_slots VALUES(76,148); +INSERT INTO product_slots VALUES(76,149); +INSERT INTO product_slots VALUES(76,150); +INSERT INTO product_slots VALUES(76,151); +INSERT INTO product_slots VALUES(76,152); +INSERT INTO product_slots VALUES(76,153); +INSERT INTO product_slots VALUES(76,154); +INSERT INTO product_slots VALUES(76,155); +INSERT INTO product_slots VALUES(76,156); +INSERT INTO product_slots VALUES(76,157); +INSERT INTO product_slots VALUES(76,158); +INSERT INTO product_slots VALUES(76,159); +INSERT INTO product_slots VALUES(76,160); +INSERT INTO product_slots VALUES(76,161); +INSERT INTO product_slots VALUES(76,162); +INSERT INTO product_slots VALUES(76,163); +INSERT INTO product_slots VALUES(76,164); +INSERT INTO product_slots VALUES(76,165); +INSERT INTO product_slots VALUES(76,166); +INSERT INTO product_slots VALUES(76,167); +INSERT INTO product_slots VALUES(76,168); +INSERT INTO product_slots VALUES(76,169); +INSERT INTO product_slots VALUES(76,170); +INSERT INTO product_slots VALUES(76,171); +INSERT INTO product_slots VALUES(76,172); +INSERT INTO product_slots VALUES(76,173); +INSERT INTO product_slots VALUES(76,174); +INSERT INTO product_slots VALUES(76,175); +INSERT INTO product_slots VALUES(76,176); +INSERT INTO product_slots VALUES(76,177); +INSERT INTO product_slots VALUES(76,178); +INSERT INTO product_slots VALUES(76,179); +INSERT INTO product_slots VALUES(76,180); +INSERT INTO product_slots VALUES(76,181); +INSERT INTO product_slots VALUES(76,182); +INSERT INTO product_slots VALUES(76,183); +INSERT INTO product_slots VALUES(76,184); +INSERT INTO product_slots VALUES(76,185); +INSERT INTO product_slots VALUES(76,186); +INSERT INTO product_slots VALUES(76,187); +INSERT INTO product_slots VALUES(76,188); +INSERT INTO product_slots VALUES(76,189); +INSERT INTO product_slots VALUES(76,190); +INSERT INTO product_slots VALUES(76,191); +INSERT INTO product_slots VALUES(76,192); +INSERT INTO product_slots VALUES(76,193); +INSERT INTO product_slots VALUES(76,194); +INSERT INTO product_slots VALUES(76,195); +INSERT INTO product_slots VALUES(76,196); +INSERT INTO product_slots VALUES(76,197); +INSERT INTO product_slots VALUES(76,198); +INSERT INTO product_slots VALUES(76,199); +INSERT INTO product_slots VALUES(76,200); +INSERT INTO product_slots VALUES(76,201); +INSERT INTO product_slots VALUES(76,202); +INSERT INTO product_slots VALUES(76,203); +INSERT INTO product_slots VALUES(76,204); +INSERT INTO product_slots VALUES(76,205); +INSERT INTO product_slots VALUES(76,206); +INSERT INTO product_slots VALUES(76,207); +INSERT INTO product_slots VALUES(76,208); +INSERT INTO product_slots VALUES(76,209); +INSERT INTO product_slots VALUES(76,210); +INSERT INTO product_slots VALUES(76,211); +INSERT INTO product_slots VALUES(76,212); +INSERT INTO product_slots VALUES(76,213); +INSERT INTO product_slots VALUES(76,214); +INSERT INTO product_slots VALUES(76,215); +INSERT INTO product_slots VALUES(76,216); +INSERT INTO product_slots VALUES(76,217); +INSERT INTO product_slots VALUES(76,218); +INSERT INTO product_slots VALUES(76,219); +INSERT INTO product_slots VALUES(76,220); +INSERT INTO product_slots VALUES(76,221); +INSERT INTO product_slots VALUES(76,222); +INSERT INTO product_slots VALUES(76,223); +INSERT INTO product_slots VALUES(76,224); +INSERT INTO product_slots VALUES(76,225); +INSERT INTO product_slots VALUES(76,226); +INSERT INTO product_slots VALUES(76,227); +INSERT INTO product_slots VALUES(76,228); +INSERT INTO product_slots VALUES(76,229); +INSERT INTO product_slots VALUES(76,230); +INSERT INTO product_slots VALUES(76,231); +INSERT INTO product_slots VALUES(76,232); +INSERT INTO product_slots VALUES(76,233); +INSERT INTO product_slots VALUES(76,234); +INSERT INTO product_slots VALUES(76,235); +INSERT INTO product_slots VALUES(76,236); +INSERT INTO product_slots VALUES(76,237); +INSERT INTO product_slots VALUES(76,238); +INSERT INTO product_slots VALUES(76,239); +INSERT INTO product_slots VALUES(76,240); +INSERT INTO product_slots VALUES(76,241); +INSERT INTO product_slots VALUES(76,242); +INSERT INTO product_slots VALUES(76,243); +INSERT INTO product_slots VALUES(76,244); +INSERT INTO product_slots VALUES(76,274); +INSERT INTO product_slots VALUES(76,275); +INSERT INTO product_slots VALUES(76,279); +INSERT INTO product_slots VALUES(76,280); +INSERT INTO product_slots VALUES(76,281); +INSERT INTO product_slots VALUES(76,282); +INSERT INTO product_slots VALUES(76,283); +INSERT INTO product_slots VALUES(76,284); +INSERT INTO product_slots VALUES(76,285); +INSERT INTO product_slots VALUES(76,286); +INSERT INTO product_slots VALUES(76,287); +INSERT INTO product_slots VALUES(77,39); +INSERT INTO product_slots VALUES(77,44); +INSERT INTO product_slots VALUES(77,46); +INSERT INTO product_slots VALUES(77,47); +INSERT INTO product_slots VALUES(77,48); +INSERT INTO product_slots VALUES(77,49); +INSERT INTO product_slots VALUES(77,50); +INSERT INTO product_slots VALUES(77,51); +INSERT INTO product_slots VALUES(77,52); +INSERT INTO product_slots VALUES(77,53); +INSERT INTO product_slots VALUES(77,54); +INSERT INTO product_slots VALUES(77,55); +INSERT INTO product_slots VALUES(77,56); +INSERT INTO product_slots VALUES(77,57); +INSERT INTO product_slots VALUES(77,58); +INSERT INTO product_slots VALUES(77,59); +INSERT INTO product_slots VALUES(77,60); +INSERT INTO product_slots VALUES(77,61); +INSERT INTO product_slots VALUES(77,62); +INSERT INTO product_slots VALUES(77,63); +INSERT INTO product_slots VALUES(77,64); +INSERT INTO product_slots VALUES(77,65); +INSERT INTO product_slots VALUES(77,66); +INSERT INTO product_slots VALUES(77,67); +INSERT INTO product_slots VALUES(77,68); +INSERT INTO product_slots VALUES(77,69); +INSERT INTO product_slots VALUES(77,70); +INSERT INTO product_slots VALUES(77,71); +INSERT INTO product_slots VALUES(77,72); +INSERT INTO product_slots VALUES(77,73); +INSERT INTO product_slots VALUES(77,74); +INSERT INTO product_slots VALUES(77,75); +INSERT INTO product_slots VALUES(77,76); +INSERT INTO product_slots VALUES(77,77); +INSERT INTO product_slots VALUES(77,78); +INSERT INTO product_slots VALUES(77,79); +INSERT INTO product_slots VALUES(77,80); +INSERT INTO product_slots VALUES(77,81); +INSERT INTO product_slots VALUES(77,82); +INSERT INTO product_slots VALUES(77,83); +INSERT INTO product_slots VALUES(77,84); +INSERT INTO product_slots VALUES(77,85); +INSERT INTO product_slots VALUES(77,86); +INSERT INTO product_slots VALUES(77,87); +INSERT INTO product_slots VALUES(77,88); +INSERT INTO product_slots VALUES(77,89); +INSERT INTO product_slots VALUES(77,90); +INSERT INTO product_slots VALUES(77,91); +INSERT INTO product_slots VALUES(77,92); +INSERT INTO product_slots VALUES(77,93); +INSERT INTO product_slots VALUES(77,94); +INSERT INTO product_slots VALUES(77,95); +INSERT INTO product_slots VALUES(77,96); +INSERT INTO product_slots VALUES(77,97); +INSERT INTO product_slots VALUES(77,98); +INSERT INTO product_slots VALUES(77,99); +INSERT INTO product_slots VALUES(77,100); +INSERT INTO product_slots VALUES(77,101); +INSERT INTO product_slots VALUES(77,102); +INSERT INTO product_slots VALUES(77,103); +INSERT INTO product_slots VALUES(77,104); +INSERT INTO product_slots VALUES(77,105); +INSERT INTO product_slots VALUES(77,106); +INSERT INTO product_slots VALUES(77,107); +INSERT INTO product_slots VALUES(77,108); +INSERT INTO product_slots VALUES(77,109); +INSERT INTO product_slots VALUES(77,110); +INSERT INTO product_slots VALUES(77,111); +INSERT INTO product_slots VALUES(77,112); +INSERT INTO product_slots VALUES(77,113); +INSERT INTO product_slots VALUES(77,114); +INSERT INTO product_slots VALUES(77,115); +INSERT INTO product_slots VALUES(77,116); +INSERT INTO product_slots VALUES(77,117); +INSERT INTO product_slots VALUES(77,118); +INSERT INTO product_slots VALUES(77,119); +INSERT INTO product_slots VALUES(77,120); +INSERT INTO product_slots VALUES(77,121); +INSERT INTO product_slots VALUES(77,122); +INSERT INTO product_slots VALUES(77,123); +INSERT INTO product_slots VALUES(77,124); +INSERT INTO product_slots VALUES(77,125); +INSERT INTO product_slots VALUES(77,126); +INSERT INTO product_slots VALUES(77,127); +INSERT INTO product_slots VALUES(77,128); +INSERT INTO product_slots VALUES(77,129); +INSERT INTO product_slots VALUES(77,130); +INSERT INTO product_slots VALUES(77,131); +INSERT INTO product_slots VALUES(77,132); +INSERT INTO product_slots VALUES(77,133); +INSERT INTO product_slots VALUES(77,134); +INSERT INTO product_slots VALUES(77,135); +INSERT INTO product_slots VALUES(77,136); +INSERT INTO product_slots VALUES(77,137); +INSERT INTO product_slots VALUES(77,138); +INSERT INTO product_slots VALUES(77,139); +INSERT INTO product_slots VALUES(77,140); +INSERT INTO product_slots VALUES(77,141); +INSERT INTO product_slots VALUES(77,142); +INSERT INTO product_slots VALUES(77,143); +INSERT INTO product_slots VALUES(77,144); +INSERT INTO product_slots VALUES(77,145); +INSERT INTO product_slots VALUES(77,146); +INSERT INTO product_slots VALUES(77,147); +INSERT INTO product_slots VALUES(77,148); +INSERT INTO product_slots VALUES(77,149); +INSERT INTO product_slots VALUES(77,150); +INSERT INTO product_slots VALUES(77,151); +INSERT INTO product_slots VALUES(77,152); +INSERT INTO product_slots VALUES(77,153); +INSERT INTO product_slots VALUES(77,154); +INSERT INTO product_slots VALUES(77,155); +INSERT INTO product_slots VALUES(77,156); +INSERT INTO product_slots VALUES(77,157); +INSERT INTO product_slots VALUES(77,158); +INSERT INTO product_slots VALUES(77,159); +INSERT INTO product_slots VALUES(77,160); +INSERT INTO product_slots VALUES(77,161); +INSERT INTO product_slots VALUES(77,162); +INSERT INTO product_slots VALUES(77,163); +INSERT INTO product_slots VALUES(77,164); +INSERT INTO product_slots VALUES(77,165); +INSERT INTO product_slots VALUES(77,166); +INSERT INTO product_slots VALUES(77,167); +INSERT INTO product_slots VALUES(77,168); +INSERT INTO product_slots VALUES(77,169); +INSERT INTO product_slots VALUES(77,170); +INSERT INTO product_slots VALUES(77,171); +INSERT INTO product_slots VALUES(77,172); +INSERT INTO product_slots VALUES(77,173); +INSERT INTO product_slots VALUES(77,174); +INSERT INTO product_slots VALUES(77,175); +INSERT INTO product_slots VALUES(77,176); +INSERT INTO product_slots VALUES(77,177); +INSERT INTO product_slots VALUES(77,178); +INSERT INTO product_slots VALUES(77,179); +INSERT INTO product_slots VALUES(77,180); +INSERT INTO product_slots VALUES(77,181); +INSERT INTO product_slots VALUES(77,182); +INSERT INTO product_slots VALUES(77,183); +INSERT INTO product_slots VALUES(77,184); +INSERT INTO product_slots VALUES(77,185); +INSERT INTO product_slots VALUES(77,186); +INSERT INTO product_slots VALUES(77,187); +INSERT INTO product_slots VALUES(77,188); +INSERT INTO product_slots VALUES(77,189); +INSERT INTO product_slots VALUES(77,190); +INSERT INTO product_slots VALUES(77,191); +INSERT INTO product_slots VALUES(77,192); +INSERT INTO product_slots VALUES(77,193); +INSERT INTO product_slots VALUES(77,194); +INSERT INTO product_slots VALUES(77,195); +INSERT INTO product_slots VALUES(77,196); +INSERT INTO product_slots VALUES(77,197); +INSERT INTO product_slots VALUES(77,198); +INSERT INTO product_slots VALUES(77,199); +INSERT INTO product_slots VALUES(77,200); +INSERT INTO product_slots VALUES(77,201); +INSERT INTO product_slots VALUES(77,202); +INSERT INTO product_slots VALUES(77,203); +INSERT INTO product_slots VALUES(77,204); +INSERT INTO product_slots VALUES(77,205); +INSERT INTO product_slots VALUES(77,206); +INSERT INTO product_slots VALUES(77,207); +INSERT INTO product_slots VALUES(77,208); +INSERT INTO product_slots VALUES(77,209); +INSERT INTO product_slots VALUES(77,210); +INSERT INTO product_slots VALUES(77,211); +INSERT INTO product_slots VALUES(77,212); +INSERT INTO product_slots VALUES(77,213); +INSERT INTO product_slots VALUES(77,214); +INSERT INTO product_slots VALUES(77,215); +INSERT INTO product_slots VALUES(77,216); +INSERT INTO product_slots VALUES(77,217); +INSERT INTO product_slots VALUES(77,218); +INSERT INTO product_slots VALUES(77,219); +INSERT INTO product_slots VALUES(77,220); +INSERT INTO product_slots VALUES(77,221); +INSERT INTO product_slots VALUES(77,222); +INSERT INTO product_slots VALUES(77,223); +INSERT INTO product_slots VALUES(77,224); +INSERT INTO product_slots VALUES(77,225); +INSERT INTO product_slots VALUES(77,226); +INSERT INTO product_slots VALUES(77,227); +INSERT INTO product_slots VALUES(77,228); +INSERT INTO product_slots VALUES(77,229); +INSERT INTO product_slots VALUES(77,230); +INSERT INTO product_slots VALUES(77,231); +INSERT INTO product_slots VALUES(77,232); +INSERT INTO product_slots VALUES(77,233); +INSERT INTO product_slots VALUES(77,234); +INSERT INTO product_slots VALUES(77,235); +INSERT INTO product_slots VALUES(77,236); +INSERT INTO product_slots VALUES(77,237); +INSERT INTO product_slots VALUES(77,238); +INSERT INTO product_slots VALUES(77,239); +INSERT INTO product_slots VALUES(77,240); +INSERT INTO product_slots VALUES(77,241); +INSERT INTO product_slots VALUES(77,242); +INSERT INTO product_slots VALUES(77,243); +INSERT INTO product_slots VALUES(77,244); +INSERT INTO product_slots VALUES(77,274); +INSERT INTO product_slots VALUES(77,275); +INSERT INTO product_slots VALUES(77,279); +INSERT INTO product_slots VALUES(77,280); +INSERT INTO product_slots VALUES(77,281); +INSERT INTO product_slots VALUES(77,282); +INSERT INTO product_slots VALUES(77,283); +INSERT INTO product_slots VALUES(77,284); +INSERT INTO product_slots VALUES(77,285); +INSERT INTO product_slots VALUES(77,286); +INSERT INTO product_slots VALUES(77,287); +INSERT INTO product_slots VALUES(78,39); +INSERT INTO product_slots VALUES(78,41); +INSERT INTO product_slots VALUES(78,43); +INSERT INTO product_slots VALUES(78,44); +INSERT INTO product_slots VALUES(78,45); +INSERT INTO product_slots VALUES(78,46); +INSERT INTO product_slots VALUES(78,47); +INSERT INTO product_slots VALUES(78,48); +INSERT INTO product_slots VALUES(78,49); +INSERT INTO product_slots VALUES(78,50); +INSERT INTO product_slots VALUES(78,51); +INSERT INTO product_slots VALUES(78,52); +INSERT INTO product_slots VALUES(78,53); +INSERT INTO product_slots VALUES(78,54); +INSERT INTO product_slots VALUES(78,55); +INSERT INTO product_slots VALUES(78,56); +INSERT INTO product_slots VALUES(78,57); +INSERT INTO product_slots VALUES(78,58); +INSERT INTO product_slots VALUES(78,59); +INSERT INTO product_slots VALUES(78,60); +INSERT INTO product_slots VALUES(78,61); +INSERT INTO product_slots VALUES(78,62); +INSERT INTO product_slots VALUES(78,63); +INSERT INTO product_slots VALUES(78,64); +INSERT INTO product_slots VALUES(78,65); +INSERT INTO product_slots VALUES(78,66); +INSERT INTO product_slots VALUES(78,67); +INSERT INTO product_slots VALUES(78,68); +INSERT INTO product_slots VALUES(78,69); +INSERT INTO product_slots VALUES(78,70); +INSERT INTO product_slots VALUES(78,71); +INSERT INTO product_slots VALUES(78,72); +INSERT INTO product_slots VALUES(78,73); +INSERT INTO product_slots VALUES(78,74); +INSERT INTO product_slots VALUES(78,75); +INSERT INTO product_slots VALUES(78,76); +INSERT INTO product_slots VALUES(78,77); +INSERT INTO product_slots VALUES(78,78); +INSERT INTO product_slots VALUES(78,79); +INSERT INTO product_slots VALUES(78,80); +INSERT INTO product_slots VALUES(78,81); +INSERT INTO product_slots VALUES(78,82); +INSERT INTO product_slots VALUES(78,83); +INSERT INTO product_slots VALUES(78,84); +INSERT INTO product_slots VALUES(78,85); +INSERT INTO product_slots VALUES(78,86); +INSERT INTO product_slots VALUES(78,87); +INSERT INTO product_slots VALUES(78,88); +INSERT INTO product_slots VALUES(78,89); +INSERT INTO product_slots VALUES(78,90); +INSERT INTO product_slots VALUES(78,91); +INSERT INTO product_slots VALUES(78,92); +INSERT INTO product_slots VALUES(78,93); +INSERT INTO product_slots VALUES(78,94); +INSERT INTO product_slots VALUES(78,95); +INSERT INTO product_slots VALUES(78,96); +INSERT INTO product_slots VALUES(78,97); +INSERT INTO product_slots VALUES(78,98); +INSERT INTO product_slots VALUES(78,99); +INSERT INTO product_slots VALUES(78,100); +INSERT INTO product_slots VALUES(78,101); +INSERT INTO product_slots VALUES(78,102); +INSERT INTO product_slots VALUES(78,103); +INSERT INTO product_slots VALUES(78,104); +INSERT INTO product_slots VALUES(78,105); +INSERT INTO product_slots VALUES(78,106); +INSERT INTO product_slots VALUES(78,107); +INSERT INTO product_slots VALUES(78,108); +INSERT INTO product_slots VALUES(78,109); +INSERT INTO product_slots VALUES(78,110); +INSERT INTO product_slots VALUES(78,111); +INSERT INTO product_slots VALUES(78,112); +INSERT INTO product_slots VALUES(78,113); +INSERT INTO product_slots VALUES(78,114); +INSERT INTO product_slots VALUES(78,115); +INSERT INTO product_slots VALUES(78,116); +INSERT INTO product_slots VALUES(78,117); +INSERT INTO product_slots VALUES(78,118); +INSERT INTO product_slots VALUES(78,119); +INSERT INTO product_slots VALUES(78,120); +INSERT INTO product_slots VALUES(78,121); +INSERT INTO product_slots VALUES(78,122); +INSERT INTO product_slots VALUES(78,123); +INSERT INTO product_slots VALUES(78,124); +INSERT INTO product_slots VALUES(78,125); +INSERT INTO product_slots VALUES(78,126); +INSERT INTO product_slots VALUES(78,127); +INSERT INTO product_slots VALUES(78,128); +INSERT INTO product_slots VALUES(78,129); +INSERT INTO product_slots VALUES(78,130); +INSERT INTO product_slots VALUES(78,131); +INSERT INTO product_slots VALUES(78,132); +INSERT INTO product_slots VALUES(78,133); +INSERT INTO product_slots VALUES(78,134); +INSERT INTO product_slots VALUES(78,135); +INSERT INTO product_slots VALUES(78,136); +INSERT INTO product_slots VALUES(78,137); +INSERT INTO product_slots VALUES(78,138); +INSERT INTO product_slots VALUES(78,139); +INSERT INTO product_slots VALUES(78,140); +INSERT INTO product_slots VALUES(78,141); +INSERT INTO product_slots VALUES(78,142); +INSERT INTO product_slots VALUES(78,143); +INSERT INTO product_slots VALUES(78,144); +INSERT INTO product_slots VALUES(78,145); +INSERT INTO product_slots VALUES(78,146); +INSERT INTO product_slots VALUES(78,147); +INSERT INTO product_slots VALUES(78,148); +INSERT INTO product_slots VALUES(78,149); +INSERT INTO product_slots VALUES(78,150); +INSERT INTO product_slots VALUES(78,151); +INSERT INTO product_slots VALUES(78,152); +INSERT INTO product_slots VALUES(78,153); +INSERT INTO product_slots VALUES(78,154); +INSERT INTO product_slots VALUES(78,155); +INSERT INTO product_slots VALUES(78,156); +INSERT INTO product_slots VALUES(78,157); +INSERT INTO product_slots VALUES(78,158); +INSERT INTO product_slots VALUES(78,159); +INSERT INTO product_slots VALUES(78,160); +INSERT INTO product_slots VALUES(78,161); +INSERT INTO product_slots VALUES(78,162); +INSERT INTO product_slots VALUES(78,163); +INSERT INTO product_slots VALUES(78,164); +INSERT INTO product_slots VALUES(78,165); +INSERT INTO product_slots VALUES(78,166); +INSERT INTO product_slots VALUES(78,167); +INSERT INTO product_slots VALUES(78,168); +INSERT INTO product_slots VALUES(78,169); +INSERT INTO product_slots VALUES(78,170); +INSERT INTO product_slots VALUES(78,171); +INSERT INTO product_slots VALUES(78,172); +INSERT INTO product_slots VALUES(78,173); +INSERT INTO product_slots VALUES(78,174); +INSERT INTO product_slots VALUES(78,175); +INSERT INTO product_slots VALUES(78,176); +INSERT INTO product_slots VALUES(78,177); +INSERT INTO product_slots VALUES(78,178); +INSERT INTO product_slots VALUES(78,179); +INSERT INTO product_slots VALUES(78,180); +INSERT INTO product_slots VALUES(78,181); +INSERT INTO product_slots VALUES(78,182); +INSERT INTO product_slots VALUES(78,183); +INSERT INTO product_slots VALUES(78,184); +INSERT INTO product_slots VALUES(78,185); +INSERT INTO product_slots VALUES(78,186); +INSERT INTO product_slots VALUES(78,187); +INSERT INTO product_slots VALUES(78,188); +INSERT INTO product_slots VALUES(78,189); +INSERT INTO product_slots VALUES(78,190); +INSERT INTO product_slots VALUES(78,191); +INSERT INTO product_slots VALUES(78,192); +INSERT INTO product_slots VALUES(78,193); +INSERT INTO product_slots VALUES(78,194); +INSERT INTO product_slots VALUES(78,195); +INSERT INTO product_slots VALUES(78,196); +INSERT INTO product_slots VALUES(78,197); +INSERT INTO product_slots VALUES(78,198); +INSERT INTO product_slots VALUES(78,199); +INSERT INTO product_slots VALUES(78,200); +INSERT INTO product_slots VALUES(78,201); +INSERT INTO product_slots VALUES(78,202); +INSERT INTO product_slots VALUES(78,203); +INSERT INTO product_slots VALUES(78,204); +INSERT INTO product_slots VALUES(78,205); +INSERT INTO product_slots VALUES(78,206); +INSERT INTO product_slots VALUES(78,207); +INSERT INTO product_slots VALUES(78,208); +INSERT INTO product_slots VALUES(78,209); +INSERT INTO product_slots VALUES(78,210); +INSERT INTO product_slots VALUES(78,211); +INSERT INTO product_slots VALUES(78,212); +INSERT INTO product_slots VALUES(78,213); +INSERT INTO product_slots VALUES(78,214); +INSERT INTO product_slots VALUES(78,215); +INSERT INTO product_slots VALUES(78,216); +INSERT INTO product_slots VALUES(78,217); +INSERT INTO product_slots VALUES(78,218); +INSERT INTO product_slots VALUES(78,219); +INSERT INTO product_slots VALUES(78,220); +INSERT INTO product_slots VALUES(78,221); +INSERT INTO product_slots VALUES(78,222); +INSERT INTO product_slots VALUES(78,223); +INSERT INTO product_slots VALUES(78,224); +INSERT INTO product_slots VALUES(78,225); +INSERT INTO product_slots VALUES(78,226); +INSERT INTO product_slots VALUES(78,227); +INSERT INTO product_slots VALUES(78,228); +INSERT INTO product_slots VALUES(78,229); +INSERT INTO product_slots VALUES(78,230); +INSERT INTO product_slots VALUES(78,231); +INSERT INTO product_slots VALUES(78,232); +INSERT INTO product_slots VALUES(78,233); +INSERT INTO product_slots VALUES(78,234); +INSERT INTO product_slots VALUES(78,235); +INSERT INTO product_slots VALUES(78,236); +INSERT INTO product_slots VALUES(78,237); +INSERT INTO product_slots VALUES(78,238); +INSERT INTO product_slots VALUES(78,239); +INSERT INTO product_slots VALUES(78,240); +INSERT INTO product_slots VALUES(78,241); +INSERT INTO product_slots VALUES(78,242); +INSERT INTO product_slots VALUES(78,243); +INSERT INTO product_slots VALUES(78,244); +INSERT INTO product_slots VALUES(78,274); +INSERT INTO product_slots VALUES(78,275); +INSERT INTO product_slots VALUES(78,279); +INSERT INTO product_slots VALUES(78,280); +INSERT INTO product_slots VALUES(78,281); +INSERT INTO product_slots VALUES(78,282); +INSERT INTO product_slots VALUES(78,283); +INSERT INTO product_slots VALUES(78,284); +INSERT INTO product_slots VALUES(78,285); +INSERT INTO product_slots VALUES(78,286); +INSERT INTO product_slots VALUES(78,287); +INSERT INTO product_slots VALUES(79,39); +INSERT INTO product_slots VALUES(79,41); +INSERT INTO product_slots VALUES(79,43); +INSERT INTO product_slots VALUES(79,44); +INSERT INTO product_slots VALUES(79,45); +INSERT INTO product_slots VALUES(79,46); +INSERT INTO product_slots VALUES(79,47); +INSERT INTO product_slots VALUES(79,48); +INSERT INTO product_slots VALUES(79,49); +INSERT INTO product_slots VALUES(79,50); +INSERT INTO product_slots VALUES(79,51); +INSERT INTO product_slots VALUES(79,52); +INSERT INTO product_slots VALUES(79,53); +INSERT INTO product_slots VALUES(79,54); +INSERT INTO product_slots VALUES(79,55); +INSERT INTO product_slots VALUES(79,56); +INSERT INTO product_slots VALUES(79,57); +INSERT INTO product_slots VALUES(79,58); +INSERT INTO product_slots VALUES(79,59); +INSERT INTO product_slots VALUES(79,60); +INSERT INTO product_slots VALUES(79,61); +INSERT INTO product_slots VALUES(79,62); +INSERT INTO product_slots VALUES(79,63); +INSERT INTO product_slots VALUES(79,64); +INSERT INTO product_slots VALUES(79,65); +INSERT INTO product_slots VALUES(79,66); +INSERT INTO product_slots VALUES(79,67); +INSERT INTO product_slots VALUES(79,68); +INSERT INTO product_slots VALUES(79,69); +INSERT INTO product_slots VALUES(79,70); +INSERT INTO product_slots VALUES(79,71); +INSERT INTO product_slots VALUES(79,72); +INSERT INTO product_slots VALUES(79,73); +INSERT INTO product_slots VALUES(79,74); +INSERT INTO product_slots VALUES(79,75); +INSERT INTO product_slots VALUES(79,76); +INSERT INTO product_slots VALUES(79,77); +INSERT INTO product_slots VALUES(79,78); +INSERT INTO product_slots VALUES(79,79); +INSERT INTO product_slots VALUES(79,80); +INSERT INTO product_slots VALUES(79,81); +INSERT INTO product_slots VALUES(79,82); +INSERT INTO product_slots VALUES(79,83); +INSERT INTO product_slots VALUES(79,84); +INSERT INTO product_slots VALUES(79,85); +INSERT INTO product_slots VALUES(79,86); +INSERT INTO product_slots VALUES(79,87); +INSERT INTO product_slots VALUES(79,88); +INSERT INTO product_slots VALUES(79,89); +INSERT INTO product_slots VALUES(79,90); +INSERT INTO product_slots VALUES(79,91); +INSERT INTO product_slots VALUES(79,92); +INSERT INTO product_slots VALUES(79,93); +INSERT INTO product_slots VALUES(79,94); +INSERT INTO product_slots VALUES(79,95); +INSERT INTO product_slots VALUES(79,96); +INSERT INTO product_slots VALUES(79,97); +INSERT INTO product_slots VALUES(79,98); +INSERT INTO product_slots VALUES(79,99); +INSERT INTO product_slots VALUES(79,100); +INSERT INTO product_slots VALUES(79,101); +INSERT INTO product_slots VALUES(79,102); +INSERT INTO product_slots VALUES(79,103); +INSERT INTO product_slots VALUES(79,104); +INSERT INTO product_slots VALUES(79,105); +INSERT INTO product_slots VALUES(79,106); +INSERT INTO product_slots VALUES(79,107); +INSERT INTO product_slots VALUES(79,108); +INSERT INTO product_slots VALUES(79,109); +INSERT INTO product_slots VALUES(79,110); +INSERT INTO product_slots VALUES(79,111); +INSERT INTO product_slots VALUES(79,112); +INSERT INTO product_slots VALUES(79,113); +INSERT INTO product_slots VALUES(79,114); +INSERT INTO product_slots VALUES(79,115); +INSERT INTO product_slots VALUES(79,116); +INSERT INTO product_slots VALUES(79,117); +INSERT INTO product_slots VALUES(79,118); +INSERT INTO product_slots VALUES(79,119); +INSERT INTO product_slots VALUES(79,120); +INSERT INTO product_slots VALUES(79,121); +INSERT INTO product_slots VALUES(79,122); +INSERT INTO product_slots VALUES(79,123); +INSERT INTO product_slots VALUES(79,124); +INSERT INTO product_slots VALUES(79,125); +INSERT INTO product_slots VALUES(79,126); +INSERT INTO product_slots VALUES(79,127); +INSERT INTO product_slots VALUES(79,128); +INSERT INTO product_slots VALUES(79,129); +INSERT INTO product_slots VALUES(79,130); +INSERT INTO product_slots VALUES(79,131); +INSERT INTO product_slots VALUES(79,132); +INSERT INTO product_slots VALUES(79,133); +INSERT INTO product_slots VALUES(79,134); +INSERT INTO product_slots VALUES(79,135); +INSERT INTO product_slots VALUES(79,136); +INSERT INTO product_slots VALUES(79,137); +INSERT INTO product_slots VALUES(79,138); +INSERT INTO product_slots VALUES(79,139); +INSERT INTO product_slots VALUES(79,140); +INSERT INTO product_slots VALUES(79,141); +INSERT INTO product_slots VALUES(79,142); +INSERT INTO product_slots VALUES(79,143); +INSERT INTO product_slots VALUES(79,144); +INSERT INTO product_slots VALUES(79,145); +INSERT INTO product_slots VALUES(79,146); +INSERT INTO product_slots VALUES(79,147); +INSERT INTO product_slots VALUES(79,148); +INSERT INTO product_slots VALUES(79,149); +INSERT INTO product_slots VALUES(79,150); +INSERT INTO product_slots VALUES(79,151); +INSERT INTO product_slots VALUES(79,152); +INSERT INTO product_slots VALUES(79,153); +INSERT INTO product_slots VALUES(79,154); +INSERT INTO product_slots VALUES(79,155); +INSERT INTO product_slots VALUES(79,156); +INSERT INTO product_slots VALUES(79,157); +INSERT INTO product_slots VALUES(79,158); +INSERT INTO product_slots VALUES(79,159); +INSERT INTO product_slots VALUES(79,160); +INSERT INTO product_slots VALUES(79,161); +INSERT INTO product_slots VALUES(79,162); +INSERT INTO product_slots VALUES(79,163); +INSERT INTO product_slots VALUES(79,164); +INSERT INTO product_slots VALUES(79,165); +INSERT INTO product_slots VALUES(79,166); +INSERT INTO product_slots VALUES(79,167); +INSERT INTO product_slots VALUES(79,168); +INSERT INTO product_slots VALUES(79,169); +INSERT INTO product_slots VALUES(79,170); +INSERT INTO product_slots VALUES(79,171); +INSERT INTO product_slots VALUES(79,172); +INSERT INTO product_slots VALUES(79,173); +INSERT INTO product_slots VALUES(79,174); +INSERT INTO product_slots VALUES(79,175); +INSERT INTO product_slots VALUES(79,176); +INSERT INTO product_slots VALUES(79,177); +INSERT INTO product_slots VALUES(79,178); +INSERT INTO product_slots VALUES(79,179); +INSERT INTO product_slots VALUES(79,180); +INSERT INTO product_slots VALUES(79,181); +INSERT INTO product_slots VALUES(79,182); +INSERT INTO product_slots VALUES(79,183); +INSERT INTO product_slots VALUES(79,184); +INSERT INTO product_slots VALUES(79,185); +INSERT INTO product_slots VALUES(79,186); +INSERT INTO product_slots VALUES(79,187); +INSERT INTO product_slots VALUES(79,188); +INSERT INTO product_slots VALUES(79,189); +INSERT INTO product_slots VALUES(79,190); +INSERT INTO product_slots VALUES(79,191); +INSERT INTO product_slots VALUES(79,192); +INSERT INTO product_slots VALUES(79,193); +INSERT INTO product_slots VALUES(79,194); +INSERT INTO product_slots VALUES(79,195); +INSERT INTO product_slots VALUES(79,196); +INSERT INTO product_slots VALUES(79,197); +INSERT INTO product_slots VALUES(79,198); +INSERT INTO product_slots VALUES(79,199); +INSERT INTO product_slots VALUES(79,200); +INSERT INTO product_slots VALUES(79,201); +INSERT INTO product_slots VALUES(79,202); +INSERT INTO product_slots VALUES(79,203); +INSERT INTO product_slots VALUES(79,204); +INSERT INTO product_slots VALUES(79,205); +INSERT INTO product_slots VALUES(79,206); +INSERT INTO product_slots VALUES(79,207); +INSERT INTO product_slots VALUES(79,208); +INSERT INTO product_slots VALUES(79,209); +INSERT INTO product_slots VALUES(79,210); +INSERT INTO product_slots VALUES(79,211); +INSERT INTO product_slots VALUES(79,212); +INSERT INTO product_slots VALUES(79,213); +INSERT INTO product_slots VALUES(79,214); +INSERT INTO product_slots VALUES(79,215); +INSERT INTO product_slots VALUES(79,216); +INSERT INTO product_slots VALUES(79,217); +INSERT INTO product_slots VALUES(79,218); +INSERT INTO product_slots VALUES(79,219); +INSERT INTO product_slots VALUES(79,220); +INSERT INTO product_slots VALUES(79,221); +INSERT INTO product_slots VALUES(79,222); +INSERT INTO product_slots VALUES(79,223); +INSERT INTO product_slots VALUES(79,224); +INSERT INTO product_slots VALUES(79,225); +INSERT INTO product_slots VALUES(79,226); +INSERT INTO product_slots VALUES(79,227); +INSERT INTO product_slots VALUES(79,228); +INSERT INTO product_slots VALUES(79,229); +INSERT INTO product_slots VALUES(79,230); +INSERT INTO product_slots VALUES(79,231); +INSERT INTO product_slots VALUES(79,232); +INSERT INTO product_slots VALUES(79,233); +INSERT INTO product_slots VALUES(79,234); +INSERT INTO product_slots VALUES(79,235); +INSERT INTO product_slots VALUES(79,236); +INSERT INTO product_slots VALUES(79,237); +INSERT INTO product_slots VALUES(79,238); +INSERT INTO product_slots VALUES(79,239); +INSERT INTO product_slots VALUES(79,240); +INSERT INTO product_slots VALUES(79,241); +INSERT INTO product_slots VALUES(79,242); +INSERT INTO product_slots VALUES(79,243); +INSERT INTO product_slots VALUES(79,244); +INSERT INTO product_slots VALUES(79,274); +INSERT INTO product_slots VALUES(79,275); +INSERT INTO product_slots VALUES(79,279); +INSERT INTO product_slots VALUES(79,280); +INSERT INTO product_slots VALUES(79,281); +INSERT INTO product_slots VALUES(79,282); +INSERT INTO product_slots VALUES(79,283); +INSERT INTO product_slots VALUES(79,284); +INSERT INTO product_slots VALUES(79,285); +INSERT INTO product_slots VALUES(79,286); +INSERT INTO product_slots VALUES(79,287); +INSERT INTO product_slots VALUES(80,39); +INSERT INTO product_slots VALUES(80,41); +INSERT INTO product_slots VALUES(80,43); +INSERT INTO product_slots VALUES(80,45); +INSERT INTO product_slots VALUES(80,46); +INSERT INTO product_slots VALUES(80,47); +INSERT INTO product_slots VALUES(80,48); +INSERT INTO product_slots VALUES(80,49); +INSERT INTO product_slots VALUES(80,50); +INSERT INTO product_slots VALUES(80,51); +INSERT INTO product_slots VALUES(80,52); +INSERT INTO product_slots VALUES(80,53); +INSERT INTO product_slots VALUES(80,54); +INSERT INTO product_slots VALUES(80,55); +INSERT INTO product_slots VALUES(80,56); +INSERT INTO product_slots VALUES(80,57); +INSERT INTO product_slots VALUES(80,58); +INSERT INTO product_slots VALUES(80,59); +INSERT INTO product_slots VALUES(80,60); +INSERT INTO product_slots VALUES(80,61); +INSERT INTO product_slots VALUES(80,64); +INSERT INTO product_slots VALUES(80,65); +INSERT INTO product_slots VALUES(80,66); +INSERT INTO product_slots VALUES(80,67); +INSERT INTO product_slots VALUES(80,68); +INSERT INTO product_slots VALUES(80,69); +INSERT INTO product_slots VALUES(80,70); +INSERT INTO product_slots VALUES(80,71); +INSERT INTO product_slots VALUES(80,72); +INSERT INTO product_slots VALUES(80,73); +INSERT INTO product_slots VALUES(80,74); +INSERT INTO product_slots VALUES(80,75); +INSERT INTO product_slots VALUES(80,76); +INSERT INTO product_slots VALUES(80,77); +INSERT INTO product_slots VALUES(80,78); +INSERT INTO product_slots VALUES(80,79); +INSERT INTO product_slots VALUES(80,80); +INSERT INTO product_slots VALUES(80,81); +INSERT INTO product_slots VALUES(80,82); +INSERT INTO product_slots VALUES(80,83); +INSERT INTO product_slots VALUES(80,84); +INSERT INTO product_slots VALUES(80,85); +INSERT INTO product_slots VALUES(80,86); +INSERT INTO product_slots VALUES(80,87); +INSERT INTO product_slots VALUES(80,88); +INSERT INTO product_slots VALUES(80,89); +INSERT INTO product_slots VALUES(80,90); +INSERT INTO product_slots VALUES(80,91); +INSERT INTO product_slots VALUES(80,92); +INSERT INTO product_slots VALUES(80,93); +INSERT INTO product_slots VALUES(80,94); +INSERT INTO product_slots VALUES(80,95); +INSERT INTO product_slots VALUES(80,96); +INSERT INTO product_slots VALUES(80,97); +INSERT INTO product_slots VALUES(80,98); +INSERT INTO product_slots VALUES(80,99); +INSERT INTO product_slots VALUES(80,100); +INSERT INTO product_slots VALUES(80,101); +INSERT INTO product_slots VALUES(80,102); +INSERT INTO product_slots VALUES(80,103); +INSERT INTO product_slots VALUES(80,104); +INSERT INTO product_slots VALUES(80,105); +INSERT INTO product_slots VALUES(80,106); +INSERT INTO product_slots VALUES(80,107); +INSERT INTO product_slots VALUES(80,108); +INSERT INTO product_slots VALUES(80,109); +INSERT INTO product_slots VALUES(80,110); +INSERT INTO product_slots VALUES(80,111); +INSERT INTO product_slots VALUES(80,112); +INSERT INTO product_slots VALUES(80,113); +INSERT INTO product_slots VALUES(80,114); +INSERT INTO product_slots VALUES(80,115); +INSERT INTO product_slots VALUES(80,116); +INSERT INTO product_slots VALUES(80,117); +INSERT INTO product_slots VALUES(80,118); +INSERT INTO product_slots VALUES(80,119); +INSERT INTO product_slots VALUES(80,120); +INSERT INTO product_slots VALUES(80,121); +INSERT INTO product_slots VALUES(80,122); +INSERT INTO product_slots VALUES(80,123); +INSERT INTO product_slots VALUES(80,124); +INSERT INTO product_slots VALUES(80,125); +INSERT INTO product_slots VALUES(80,126); +INSERT INTO product_slots VALUES(80,127); +INSERT INTO product_slots VALUES(80,128); +INSERT INTO product_slots VALUES(80,129); +INSERT INTO product_slots VALUES(80,130); +INSERT INTO product_slots VALUES(80,131); +INSERT INTO product_slots VALUES(80,132); +INSERT INTO product_slots VALUES(80,133); +INSERT INTO product_slots VALUES(80,134); +INSERT INTO product_slots VALUES(80,135); +INSERT INTO product_slots VALUES(80,136); +INSERT INTO product_slots VALUES(80,137); +INSERT INTO product_slots VALUES(80,138); +INSERT INTO product_slots VALUES(80,139); +INSERT INTO product_slots VALUES(80,140); +INSERT INTO product_slots VALUES(80,141); +INSERT INTO product_slots VALUES(80,142); +INSERT INTO product_slots VALUES(80,143); +INSERT INTO product_slots VALUES(80,144); +INSERT INTO product_slots VALUES(80,145); +INSERT INTO product_slots VALUES(80,146); +INSERT INTO product_slots VALUES(80,147); +INSERT INTO product_slots VALUES(80,148); +INSERT INTO product_slots VALUES(80,149); +INSERT INTO product_slots VALUES(80,150); +INSERT INTO product_slots VALUES(80,151); +INSERT INTO product_slots VALUES(80,152); +INSERT INTO product_slots VALUES(80,153); +INSERT INTO product_slots VALUES(80,154); +INSERT INTO product_slots VALUES(80,155); +INSERT INTO product_slots VALUES(80,156); +INSERT INTO product_slots VALUES(80,157); +INSERT INTO product_slots VALUES(80,158); +INSERT INTO product_slots VALUES(80,159); +INSERT INTO product_slots VALUES(80,160); +INSERT INTO product_slots VALUES(80,161); +INSERT INTO product_slots VALUES(80,162); +INSERT INTO product_slots VALUES(80,163); +INSERT INTO product_slots VALUES(80,164); +INSERT INTO product_slots VALUES(80,165); +INSERT INTO product_slots VALUES(80,166); +INSERT INTO product_slots VALUES(80,167); +INSERT INTO product_slots VALUES(80,168); +INSERT INTO product_slots VALUES(80,169); +INSERT INTO product_slots VALUES(80,170); +INSERT INTO product_slots VALUES(80,171); +INSERT INTO product_slots VALUES(80,172); +INSERT INTO product_slots VALUES(80,173); +INSERT INTO product_slots VALUES(80,174); +INSERT INTO product_slots VALUES(80,175); +INSERT INTO product_slots VALUES(80,176); +INSERT INTO product_slots VALUES(80,177); +INSERT INTO product_slots VALUES(80,178); +INSERT INTO product_slots VALUES(80,179); +INSERT INTO product_slots VALUES(80,180); +INSERT INTO product_slots VALUES(80,181); +INSERT INTO product_slots VALUES(80,182); +INSERT INTO product_slots VALUES(80,183); +INSERT INTO product_slots VALUES(80,184); +INSERT INTO product_slots VALUES(80,185); +INSERT INTO product_slots VALUES(80,186); +INSERT INTO product_slots VALUES(80,187); +INSERT INTO product_slots VALUES(80,188); +INSERT INTO product_slots VALUES(80,189); +INSERT INTO product_slots VALUES(80,190); +INSERT INTO product_slots VALUES(80,191); +INSERT INTO product_slots VALUES(80,192); +INSERT INTO product_slots VALUES(80,193); +INSERT INTO product_slots VALUES(80,194); +INSERT INTO product_slots VALUES(80,195); +INSERT INTO product_slots VALUES(80,196); +INSERT INTO product_slots VALUES(80,197); +INSERT INTO product_slots VALUES(80,198); +INSERT INTO product_slots VALUES(80,199); +INSERT INTO product_slots VALUES(80,200); +INSERT INTO product_slots VALUES(80,201); +INSERT INTO product_slots VALUES(80,202); +INSERT INTO product_slots VALUES(80,203); +INSERT INTO product_slots VALUES(80,204); +INSERT INTO product_slots VALUES(80,205); +INSERT INTO product_slots VALUES(80,206); +INSERT INTO product_slots VALUES(80,207); +INSERT INTO product_slots VALUES(80,208); +INSERT INTO product_slots VALUES(80,209); +INSERT INTO product_slots VALUES(80,210); +INSERT INTO product_slots VALUES(80,211); +INSERT INTO product_slots VALUES(80,212); +INSERT INTO product_slots VALUES(80,213); +INSERT INTO product_slots VALUES(80,214); +INSERT INTO product_slots VALUES(80,215); +INSERT INTO product_slots VALUES(80,216); +INSERT INTO product_slots VALUES(80,217); +INSERT INTO product_slots VALUES(80,218); +INSERT INTO product_slots VALUES(80,219); +INSERT INTO product_slots VALUES(80,220); +INSERT INTO product_slots VALUES(80,221); +INSERT INTO product_slots VALUES(80,222); +INSERT INTO product_slots VALUES(80,223); +INSERT INTO product_slots VALUES(80,224); +INSERT INTO product_slots VALUES(80,225); +INSERT INTO product_slots VALUES(80,226); +INSERT INTO product_slots VALUES(80,227); +INSERT INTO product_slots VALUES(80,228); +INSERT INTO product_slots VALUES(80,229); +INSERT INTO product_slots VALUES(80,230); +INSERT INTO product_slots VALUES(80,231); +INSERT INTO product_slots VALUES(80,232); +INSERT INTO product_slots VALUES(80,233); +INSERT INTO product_slots VALUES(80,234); +INSERT INTO product_slots VALUES(80,235); +INSERT INTO product_slots VALUES(80,236); +INSERT INTO product_slots VALUES(80,237); +INSERT INTO product_slots VALUES(80,238); +INSERT INTO product_slots VALUES(80,239); +INSERT INTO product_slots VALUES(80,240); +INSERT INTO product_slots VALUES(80,241); +INSERT INTO product_slots VALUES(80,242); +INSERT INTO product_slots VALUES(80,243); +INSERT INTO product_slots VALUES(80,244); +INSERT INTO product_slots VALUES(80,274); +INSERT INTO product_slots VALUES(80,275); +INSERT INTO product_slots VALUES(80,279); +INSERT INTO product_slots VALUES(80,280); +INSERT INTO product_slots VALUES(80,281); +INSERT INTO product_slots VALUES(80,282); +INSERT INTO product_slots VALUES(81,39); +INSERT INTO product_slots VALUES(81,43); +INSERT INTO product_slots VALUES(81,45); +INSERT INTO product_slots VALUES(81,48); +INSERT INTO product_slots VALUES(81,49); +INSERT INTO product_slots VALUES(81,51); +INSERT INTO product_slots VALUES(81,52); +INSERT INTO product_slots VALUES(81,57); +INSERT INTO product_slots VALUES(81,58); +INSERT INTO product_slots VALUES(81,59); +INSERT INTO product_slots VALUES(81,62); +INSERT INTO product_slots VALUES(81,63); +INSERT INTO product_slots VALUES(81,64); +INSERT INTO product_slots VALUES(81,65); +INSERT INTO product_slots VALUES(81,66); +INSERT INTO product_slots VALUES(81,67); +INSERT INTO product_slots VALUES(81,69); +INSERT INTO product_slots VALUES(81,70); +INSERT INTO product_slots VALUES(81,71); +INSERT INTO product_slots VALUES(81,72); +INSERT INTO product_slots VALUES(81,73); +INSERT INTO product_slots VALUES(81,75); +INSERT INTO product_slots VALUES(81,82); +INSERT INTO product_slots VALUES(81,83); +INSERT INTO product_slots VALUES(81,84); +INSERT INTO product_slots VALUES(81,90); +INSERT INTO product_slots VALUES(81,91); +INSERT INTO product_slots VALUES(81,97); +INSERT INTO product_slots VALUES(81,98); +INSERT INTO product_slots VALUES(81,102); +INSERT INTO product_slots VALUES(81,103); +INSERT INTO product_slots VALUES(81,104); +INSERT INTO product_slots VALUES(81,110); +INSERT INTO product_slots VALUES(81,111); +INSERT INTO product_slots VALUES(81,112); +INSERT INTO product_slots VALUES(81,116); +INSERT INTO product_slots VALUES(81,117); +INSERT INTO product_slots VALUES(81,118); +INSERT INTO product_slots VALUES(81,119); +INSERT INTO product_slots VALUES(81,120); +INSERT INTO product_slots VALUES(81,121); +INSERT INTO product_slots VALUES(81,122); +INSERT INTO product_slots VALUES(81,123); +INSERT INTO product_slots VALUES(81,124); +INSERT INTO product_slots VALUES(81,125); +INSERT INTO product_slots VALUES(81,126); +INSERT INTO product_slots VALUES(81,127); +INSERT INTO product_slots VALUES(81,128); +INSERT INTO product_slots VALUES(81,129); +INSERT INTO product_slots VALUES(81,130); +INSERT INTO product_slots VALUES(81,131); +INSERT INTO product_slots VALUES(81,132); +INSERT INTO product_slots VALUES(81,133); +INSERT INTO product_slots VALUES(81,134); +INSERT INTO product_slots VALUES(81,135); +INSERT INTO product_slots VALUES(81,136); +INSERT INTO product_slots VALUES(81,137); +INSERT INTO product_slots VALUES(81,138); +INSERT INTO product_slots VALUES(81,139); +INSERT INTO product_slots VALUES(81,140); +INSERT INTO product_slots VALUES(81,141); +INSERT INTO product_slots VALUES(81,142); +INSERT INTO product_slots VALUES(81,143); +INSERT INTO product_slots VALUES(81,144); +INSERT INTO product_slots VALUES(81,145); +INSERT INTO product_slots VALUES(81,146); +INSERT INTO product_slots VALUES(81,147); +INSERT INTO product_slots VALUES(81,148); +INSERT INTO product_slots VALUES(81,149); +INSERT INTO product_slots VALUES(81,150); +INSERT INTO product_slots VALUES(81,151); +INSERT INTO product_slots VALUES(81,152); +INSERT INTO product_slots VALUES(81,153); +INSERT INTO product_slots VALUES(81,154); +INSERT INTO product_slots VALUES(81,155); +INSERT INTO product_slots VALUES(81,156); +INSERT INTO product_slots VALUES(81,157); +INSERT INTO product_slots VALUES(81,158); +INSERT INTO product_slots VALUES(81,159); +INSERT INTO product_slots VALUES(81,160); +INSERT INTO product_slots VALUES(81,161); +INSERT INTO product_slots VALUES(81,162); +INSERT INTO product_slots VALUES(81,163); +INSERT INTO product_slots VALUES(81,164); +INSERT INTO product_slots VALUES(81,165); +INSERT INTO product_slots VALUES(81,166); +INSERT INTO product_slots VALUES(81,167); +INSERT INTO product_slots VALUES(81,168); +INSERT INTO product_slots VALUES(81,169); +INSERT INTO product_slots VALUES(81,170); +INSERT INTO product_slots VALUES(81,171); +INSERT INTO product_slots VALUES(81,172); +INSERT INTO product_slots VALUES(81,173); +INSERT INTO product_slots VALUES(81,174); +INSERT INTO product_slots VALUES(81,175); +INSERT INTO product_slots VALUES(81,176); +INSERT INTO product_slots VALUES(81,177); +INSERT INTO product_slots VALUES(81,178); +INSERT INTO product_slots VALUES(81,179); +INSERT INTO product_slots VALUES(81,180); +INSERT INTO product_slots VALUES(81,181); +INSERT INTO product_slots VALUES(81,182); +INSERT INTO product_slots VALUES(81,183); +INSERT INTO product_slots VALUES(81,184); +INSERT INTO product_slots VALUES(81,185); +INSERT INTO product_slots VALUES(81,186); +INSERT INTO product_slots VALUES(81,187); +INSERT INTO product_slots VALUES(81,188); +INSERT INTO product_slots VALUES(81,189); +INSERT INTO product_slots VALUES(81,190); +INSERT INTO product_slots VALUES(81,191); +INSERT INTO product_slots VALUES(81,192); +INSERT INTO product_slots VALUES(81,193); +INSERT INTO product_slots VALUES(81,194); +INSERT INTO product_slots VALUES(81,195); +INSERT INTO product_slots VALUES(81,196); +INSERT INTO product_slots VALUES(81,197); +INSERT INTO product_slots VALUES(81,198); +INSERT INTO product_slots VALUES(81,199); +INSERT INTO product_slots VALUES(81,200); +INSERT INTO product_slots VALUES(81,201); +INSERT INTO product_slots VALUES(81,202); +INSERT INTO product_slots VALUES(81,203); +INSERT INTO product_slots VALUES(81,204); +INSERT INTO product_slots VALUES(81,205); +INSERT INTO product_slots VALUES(81,206); +INSERT INTO product_slots VALUES(81,207); +INSERT INTO product_slots VALUES(81,208); +INSERT INTO product_slots VALUES(81,209); +INSERT INTO product_slots VALUES(81,210); +INSERT INTO product_slots VALUES(81,211); +INSERT INTO product_slots VALUES(81,212); +INSERT INTO product_slots VALUES(81,213); +INSERT INTO product_slots VALUES(81,214); +INSERT INTO product_slots VALUES(81,215); +INSERT INTO product_slots VALUES(81,216); +INSERT INTO product_slots VALUES(81,217); +INSERT INTO product_slots VALUES(81,218); +INSERT INTO product_slots VALUES(81,219); +INSERT INTO product_slots VALUES(81,220); +INSERT INTO product_slots VALUES(81,221); +INSERT INTO product_slots VALUES(81,222); +INSERT INTO product_slots VALUES(81,223); +INSERT INTO product_slots VALUES(81,224); +INSERT INTO product_slots VALUES(81,225); +INSERT INTO product_slots VALUES(81,226); +INSERT INTO product_slots VALUES(81,227); +INSERT INTO product_slots VALUES(81,228); +INSERT INTO product_slots VALUES(81,229); +INSERT INTO product_slots VALUES(81,230); +INSERT INTO product_slots VALUES(81,231); +INSERT INTO product_slots VALUES(81,232); +INSERT INTO product_slots VALUES(81,233); +INSERT INTO product_slots VALUES(81,234); +INSERT INTO product_slots VALUES(81,235); +INSERT INTO product_slots VALUES(81,236); +INSERT INTO product_slots VALUES(81,237); +INSERT INTO product_slots VALUES(81,238); +INSERT INTO product_slots VALUES(81,239); +INSERT INTO product_slots VALUES(81,240); +INSERT INTO product_slots VALUES(81,241); +INSERT INTO product_slots VALUES(81,242); +INSERT INTO product_slots VALUES(81,243); +INSERT INTO product_slots VALUES(81,244); +INSERT INTO product_slots VALUES(81,274); +INSERT INTO product_slots VALUES(81,275); +INSERT INTO product_slots VALUES(81,279); +INSERT INTO product_slots VALUES(81,280); +INSERT INTO product_slots VALUES(81,281); +INSERT INTO product_slots VALUES(81,282); +INSERT INTO product_slots VALUES(81,283); +INSERT INTO product_slots VALUES(81,284); +INSERT INTO product_slots VALUES(81,285); +INSERT INTO product_slots VALUES(81,286); +INSERT INTO product_slots VALUES(81,287); +INSERT INTO product_slots VALUES(82,39); +INSERT INTO product_slots VALUES(82,43); +INSERT INTO product_slots VALUES(82,45); +INSERT INTO product_slots VALUES(82,48); +INSERT INTO product_slots VALUES(82,49); +INSERT INTO product_slots VALUES(82,51); +INSERT INTO product_slots VALUES(82,52); +INSERT INTO product_slots VALUES(82,57); +INSERT INTO product_slots VALUES(82,58); +INSERT INTO product_slots VALUES(82,59); +INSERT INTO product_slots VALUES(82,62); +INSERT INTO product_slots VALUES(82,63); +INSERT INTO product_slots VALUES(82,64); +INSERT INTO product_slots VALUES(82,65); +INSERT INTO product_slots VALUES(82,66); +INSERT INTO product_slots VALUES(82,67); +INSERT INTO product_slots VALUES(82,69); +INSERT INTO product_slots VALUES(82,70); +INSERT INTO product_slots VALUES(82,71); +INSERT INTO product_slots VALUES(82,72); +INSERT INTO product_slots VALUES(82,73); +INSERT INTO product_slots VALUES(82,75); +INSERT INTO product_slots VALUES(82,82); +INSERT INTO product_slots VALUES(82,83); +INSERT INTO product_slots VALUES(82,84); +INSERT INTO product_slots VALUES(82,90); +INSERT INTO product_slots VALUES(82,91); +INSERT INTO product_slots VALUES(82,92); +INSERT INTO product_slots VALUES(82,93); +INSERT INTO product_slots VALUES(82,94); +INSERT INTO product_slots VALUES(82,97); +INSERT INTO product_slots VALUES(82,98); +INSERT INTO product_slots VALUES(82,99); +INSERT INTO product_slots VALUES(82,100); +INSERT INTO product_slots VALUES(82,102); +INSERT INTO product_slots VALUES(82,103); +INSERT INTO product_slots VALUES(82,104); +INSERT INTO product_slots VALUES(82,110); +INSERT INTO product_slots VALUES(82,111); +INSERT INTO product_slots VALUES(82,112); +INSERT INTO product_slots VALUES(82,116); +INSERT INTO product_slots VALUES(82,117); +INSERT INTO product_slots VALUES(82,118); +INSERT INTO product_slots VALUES(82,119); +INSERT INTO product_slots VALUES(82,120); +INSERT INTO product_slots VALUES(82,121); +INSERT INTO product_slots VALUES(82,122); +INSERT INTO product_slots VALUES(82,123); +INSERT INTO product_slots VALUES(82,124); +INSERT INTO product_slots VALUES(82,125); +INSERT INTO product_slots VALUES(82,126); +INSERT INTO product_slots VALUES(82,127); +INSERT INTO product_slots VALUES(82,128); +INSERT INTO product_slots VALUES(82,129); +INSERT INTO product_slots VALUES(82,130); +INSERT INTO product_slots VALUES(82,131); +INSERT INTO product_slots VALUES(82,132); +INSERT INTO product_slots VALUES(82,133); +INSERT INTO product_slots VALUES(82,134); +INSERT INTO product_slots VALUES(82,135); +INSERT INTO product_slots VALUES(82,136); +INSERT INTO product_slots VALUES(82,137); +INSERT INTO product_slots VALUES(82,138); +INSERT INTO product_slots VALUES(82,139); +INSERT INTO product_slots VALUES(82,140); +INSERT INTO product_slots VALUES(82,141); +INSERT INTO product_slots VALUES(82,142); +INSERT INTO product_slots VALUES(82,143); +INSERT INTO product_slots VALUES(82,144); +INSERT INTO product_slots VALUES(82,145); +INSERT INTO product_slots VALUES(82,146); +INSERT INTO product_slots VALUES(82,147); +INSERT INTO product_slots VALUES(82,148); +INSERT INTO product_slots VALUES(82,149); +INSERT INTO product_slots VALUES(82,150); +INSERT INTO product_slots VALUES(82,151); +INSERT INTO product_slots VALUES(82,152); +INSERT INTO product_slots VALUES(82,153); +INSERT INTO product_slots VALUES(82,154); +INSERT INTO product_slots VALUES(82,155); +INSERT INTO product_slots VALUES(82,156); +INSERT INTO product_slots VALUES(82,157); +INSERT INTO product_slots VALUES(82,158); +INSERT INTO product_slots VALUES(82,159); +INSERT INTO product_slots VALUES(82,160); +INSERT INTO product_slots VALUES(82,161); +INSERT INTO product_slots VALUES(82,162); +INSERT INTO product_slots VALUES(82,163); +INSERT INTO product_slots VALUES(82,164); +INSERT INTO product_slots VALUES(82,165); +INSERT INTO product_slots VALUES(82,166); +INSERT INTO product_slots VALUES(82,167); +INSERT INTO product_slots VALUES(82,168); +INSERT INTO product_slots VALUES(82,169); +INSERT INTO product_slots VALUES(82,170); +INSERT INTO product_slots VALUES(82,171); +INSERT INTO product_slots VALUES(82,172); +INSERT INTO product_slots VALUES(82,173); +INSERT INTO product_slots VALUES(82,174); +INSERT INTO product_slots VALUES(82,175); +INSERT INTO product_slots VALUES(82,176); +INSERT INTO product_slots VALUES(82,177); +INSERT INTO product_slots VALUES(82,178); +INSERT INTO product_slots VALUES(82,179); +INSERT INTO product_slots VALUES(82,180); +INSERT INTO product_slots VALUES(82,181); +INSERT INTO product_slots VALUES(82,182); +INSERT INTO product_slots VALUES(82,183); +INSERT INTO product_slots VALUES(82,184); +INSERT INTO product_slots VALUES(82,185); +INSERT INTO product_slots VALUES(82,186); +INSERT INTO product_slots VALUES(82,187); +INSERT INTO product_slots VALUES(82,188); +INSERT INTO product_slots VALUES(82,189); +INSERT INTO product_slots VALUES(82,190); +INSERT INTO product_slots VALUES(82,191); +INSERT INTO product_slots VALUES(82,192); +INSERT INTO product_slots VALUES(82,193); +INSERT INTO product_slots VALUES(82,194); +INSERT INTO product_slots VALUES(82,195); +INSERT INTO product_slots VALUES(82,196); +INSERT INTO product_slots VALUES(82,197); +INSERT INTO product_slots VALUES(82,198); +INSERT INTO product_slots VALUES(82,199); +INSERT INTO product_slots VALUES(82,200); +INSERT INTO product_slots VALUES(82,201); +INSERT INTO product_slots VALUES(82,202); +INSERT INTO product_slots VALUES(82,203); +INSERT INTO product_slots VALUES(82,204); +INSERT INTO product_slots VALUES(82,205); +INSERT INTO product_slots VALUES(82,206); +INSERT INTO product_slots VALUES(82,207); +INSERT INTO product_slots VALUES(82,208); +INSERT INTO product_slots VALUES(82,209); +INSERT INTO product_slots VALUES(82,210); +INSERT INTO product_slots VALUES(82,211); +INSERT INTO product_slots VALUES(82,212); +INSERT INTO product_slots VALUES(82,213); +INSERT INTO product_slots VALUES(82,214); +INSERT INTO product_slots VALUES(82,215); +INSERT INTO product_slots VALUES(82,216); +INSERT INTO product_slots VALUES(82,217); +INSERT INTO product_slots VALUES(82,218); +INSERT INTO product_slots VALUES(82,219); +INSERT INTO product_slots VALUES(82,220); +INSERT INTO product_slots VALUES(82,221); +INSERT INTO product_slots VALUES(82,222); +INSERT INTO product_slots VALUES(82,223); +INSERT INTO product_slots VALUES(82,224); +INSERT INTO product_slots VALUES(82,225); +INSERT INTO product_slots VALUES(82,226); +INSERT INTO product_slots VALUES(82,227); +INSERT INTO product_slots VALUES(82,228); +INSERT INTO product_slots VALUES(82,229); +INSERT INTO product_slots VALUES(82,230); +INSERT INTO product_slots VALUES(82,231); +INSERT INTO product_slots VALUES(82,232); +INSERT INTO product_slots VALUES(82,233); +INSERT INTO product_slots VALUES(82,234); +INSERT INTO product_slots VALUES(82,235); +INSERT INTO product_slots VALUES(82,236); +INSERT INTO product_slots VALUES(82,237); +INSERT INTO product_slots VALUES(82,238); +INSERT INTO product_slots VALUES(82,239); +INSERT INTO product_slots VALUES(82,240); +INSERT INTO product_slots VALUES(82,241); +INSERT INTO product_slots VALUES(82,242); +INSERT INTO product_slots VALUES(82,243); +INSERT INTO product_slots VALUES(82,244); +INSERT INTO product_slots VALUES(82,274); +INSERT INTO product_slots VALUES(82,275); +INSERT INTO product_slots VALUES(82,279); +INSERT INTO product_slots VALUES(82,280); +INSERT INTO product_slots VALUES(82,281); +INSERT INTO product_slots VALUES(82,282); +INSERT INTO product_slots VALUES(82,283); +INSERT INTO product_slots VALUES(82,284); +INSERT INTO product_slots VALUES(82,285); +INSERT INTO product_slots VALUES(82,286); +INSERT INTO product_slots VALUES(82,287); +INSERT INTO product_slots VALUES(83,39); +INSERT INTO product_slots VALUES(83,43); +INSERT INTO product_slots VALUES(83,45); +INSERT INTO product_slots VALUES(83,48); +INSERT INTO product_slots VALUES(83,49); +INSERT INTO product_slots VALUES(83,51); +INSERT INTO product_slots VALUES(83,52); +INSERT INTO product_slots VALUES(83,57); +INSERT INTO product_slots VALUES(83,58); +INSERT INTO product_slots VALUES(83,59); +INSERT INTO product_slots VALUES(83,62); +INSERT INTO product_slots VALUES(83,63); +INSERT INTO product_slots VALUES(83,64); +INSERT INTO product_slots VALUES(83,65); +INSERT INTO product_slots VALUES(83,66); +INSERT INTO product_slots VALUES(83,67); +INSERT INTO product_slots VALUES(83,69); +INSERT INTO product_slots VALUES(83,70); +INSERT INTO product_slots VALUES(83,71); +INSERT INTO product_slots VALUES(83,72); +INSERT INTO product_slots VALUES(83,73); +INSERT INTO product_slots VALUES(83,75); +INSERT INTO product_slots VALUES(83,82); +INSERT INTO product_slots VALUES(83,83); +INSERT INTO product_slots VALUES(83,84); +INSERT INTO product_slots VALUES(83,90); +INSERT INTO product_slots VALUES(83,91); +INSERT INTO product_slots VALUES(83,97); +INSERT INTO product_slots VALUES(83,98); +INSERT INTO product_slots VALUES(83,102); +INSERT INTO product_slots VALUES(83,103); +INSERT INTO product_slots VALUES(83,104); +INSERT INTO product_slots VALUES(83,110); +INSERT INTO product_slots VALUES(83,111); +INSERT INTO product_slots VALUES(83,112); +INSERT INTO product_slots VALUES(83,116); +INSERT INTO product_slots VALUES(83,117); +INSERT INTO product_slots VALUES(83,118); +INSERT INTO product_slots VALUES(83,119); +INSERT INTO product_slots VALUES(83,120); +INSERT INTO product_slots VALUES(83,121); +INSERT INTO product_slots VALUES(83,122); +INSERT INTO product_slots VALUES(83,123); +INSERT INTO product_slots VALUES(83,124); +INSERT INTO product_slots VALUES(83,125); +INSERT INTO product_slots VALUES(83,126); +INSERT INTO product_slots VALUES(83,127); +INSERT INTO product_slots VALUES(83,128); +INSERT INTO product_slots VALUES(83,129); +INSERT INTO product_slots VALUES(83,130); +INSERT INTO product_slots VALUES(83,131); +INSERT INTO product_slots VALUES(83,132); +INSERT INTO product_slots VALUES(83,133); +INSERT INTO product_slots VALUES(83,134); +INSERT INTO product_slots VALUES(83,135); +INSERT INTO product_slots VALUES(83,136); +INSERT INTO product_slots VALUES(83,137); +INSERT INTO product_slots VALUES(83,138); +INSERT INTO product_slots VALUES(83,139); +INSERT INTO product_slots VALUES(83,140); +INSERT INTO product_slots VALUES(83,141); +INSERT INTO product_slots VALUES(83,142); +INSERT INTO product_slots VALUES(83,143); +INSERT INTO product_slots VALUES(83,144); +INSERT INTO product_slots VALUES(83,145); +INSERT INTO product_slots VALUES(83,146); +INSERT INTO product_slots VALUES(83,147); +INSERT INTO product_slots VALUES(83,148); +INSERT INTO product_slots VALUES(83,149); +INSERT INTO product_slots VALUES(83,150); +INSERT INTO product_slots VALUES(83,151); +INSERT INTO product_slots VALUES(83,152); +INSERT INTO product_slots VALUES(83,153); +INSERT INTO product_slots VALUES(83,154); +INSERT INTO product_slots VALUES(83,155); +INSERT INTO product_slots VALUES(83,156); +INSERT INTO product_slots VALUES(83,157); +INSERT INTO product_slots VALUES(83,158); +INSERT INTO product_slots VALUES(83,159); +INSERT INTO product_slots VALUES(83,160); +INSERT INTO product_slots VALUES(83,161); +INSERT INTO product_slots VALUES(83,162); +INSERT INTO product_slots VALUES(83,163); +INSERT INTO product_slots VALUES(83,164); +INSERT INTO product_slots VALUES(83,165); +INSERT INTO product_slots VALUES(83,166); +INSERT INTO product_slots VALUES(83,167); +INSERT INTO product_slots VALUES(83,168); +INSERT INTO product_slots VALUES(83,169); +INSERT INTO product_slots VALUES(83,170); +INSERT INTO product_slots VALUES(83,171); +INSERT INTO product_slots VALUES(83,172); +INSERT INTO product_slots VALUES(83,173); +INSERT INTO product_slots VALUES(83,174); +INSERT INTO product_slots VALUES(83,175); +INSERT INTO product_slots VALUES(83,176); +INSERT INTO product_slots VALUES(83,177); +INSERT INTO product_slots VALUES(83,178); +INSERT INTO product_slots VALUES(83,179); +INSERT INTO product_slots VALUES(83,180); +INSERT INTO product_slots VALUES(83,181); +INSERT INTO product_slots VALUES(83,182); +INSERT INTO product_slots VALUES(83,183); +INSERT INTO product_slots VALUES(83,184); +INSERT INTO product_slots VALUES(83,185); +INSERT INTO product_slots VALUES(83,186); +INSERT INTO product_slots VALUES(83,187); +INSERT INTO product_slots VALUES(83,188); +INSERT INTO product_slots VALUES(83,189); +INSERT INTO product_slots VALUES(83,190); +INSERT INTO product_slots VALUES(83,191); +INSERT INTO product_slots VALUES(83,192); +INSERT INTO product_slots VALUES(83,193); +INSERT INTO product_slots VALUES(83,194); +INSERT INTO product_slots VALUES(83,195); +INSERT INTO product_slots VALUES(83,196); +INSERT INTO product_slots VALUES(83,197); +INSERT INTO product_slots VALUES(83,198); +INSERT INTO product_slots VALUES(83,199); +INSERT INTO product_slots VALUES(83,200); +INSERT INTO product_slots VALUES(83,201); +INSERT INTO product_slots VALUES(83,202); +INSERT INTO product_slots VALUES(83,203); +INSERT INTO product_slots VALUES(83,204); +INSERT INTO product_slots VALUES(83,205); +INSERT INTO product_slots VALUES(83,206); +INSERT INTO product_slots VALUES(83,207); +INSERT INTO product_slots VALUES(83,208); +INSERT INTO product_slots VALUES(83,209); +INSERT INTO product_slots VALUES(83,210); +INSERT INTO product_slots VALUES(83,211); +INSERT INTO product_slots VALUES(83,212); +INSERT INTO product_slots VALUES(83,213); +INSERT INTO product_slots VALUES(83,214); +INSERT INTO product_slots VALUES(83,215); +INSERT INTO product_slots VALUES(83,216); +INSERT INTO product_slots VALUES(83,217); +INSERT INTO product_slots VALUES(83,218); +INSERT INTO product_slots VALUES(83,219); +INSERT INTO product_slots VALUES(83,220); +INSERT INTO product_slots VALUES(83,221); +INSERT INTO product_slots VALUES(83,222); +INSERT INTO product_slots VALUES(83,223); +INSERT INTO product_slots VALUES(83,224); +INSERT INTO product_slots VALUES(83,225); +INSERT INTO product_slots VALUES(83,226); +INSERT INTO product_slots VALUES(83,227); +INSERT INTO product_slots VALUES(83,228); +INSERT INTO product_slots VALUES(83,229); +INSERT INTO product_slots VALUES(83,230); +INSERT INTO product_slots VALUES(83,231); +INSERT INTO product_slots VALUES(83,232); +INSERT INTO product_slots VALUES(83,233); +INSERT INTO product_slots VALUES(83,234); +INSERT INTO product_slots VALUES(83,235); +INSERT INTO product_slots VALUES(83,236); +INSERT INTO product_slots VALUES(83,237); +INSERT INTO product_slots VALUES(83,238); +INSERT INTO product_slots VALUES(83,239); +INSERT INTO product_slots VALUES(83,240); +INSERT INTO product_slots VALUES(83,241); +INSERT INTO product_slots VALUES(83,242); +INSERT INTO product_slots VALUES(83,243); +INSERT INTO product_slots VALUES(83,244); +INSERT INTO product_slots VALUES(83,274); +INSERT INTO product_slots VALUES(83,275); +INSERT INTO product_slots VALUES(83,279); +INSERT INTO product_slots VALUES(83,280); +INSERT INTO product_slots VALUES(83,281); +INSERT INTO product_slots VALUES(83,282); +INSERT INTO product_slots VALUES(83,283); +INSERT INTO product_slots VALUES(83,284); +INSERT INTO product_slots VALUES(83,285); +INSERT INTO product_slots VALUES(83,286); +INSERT INTO product_slots VALUES(83,287); +INSERT INTO product_slots VALUES(85,81); +INSERT INTO product_slots VALUES(85,82); +INSERT INTO product_slots VALUES(85,83); +INSERT INTO product_slots VALUES(85,91); +INSERT INTO product_slots VALUES(85,92); +INSERT INTO product_slots VALUES(85,93); +INSERT INTO product_slots VALUES(85,94); +INSERT INTO product_slots VALUES(85,98); +INSERT INTO product_slots VALUES(85,99); +INSERT INTO product_slots VALUES(85,100); +INSERT INTO product_slots VALUES(85,105); +INSERT INTO product_slots VALUES(85,106); +INSERT INTO product_slots VALUES(85,107); +INSERT INTO product_slots VALUES(85,108); +INSERT INTO product_slots VALUES(85,109); +INSERT INTO product_slots VALUES(85,110); +INSERT INTO product_slots VALUES(85,111); +INSERT INTO product_slots VALUES(85,112); +INSERT INTO product_slots VALUES(85,113); +INSERT INTO product_slots VALUES(85,114); +INSERT INTO product_slots VALUES(85,115); +INSERT INTO product_slots VALUES(85,120); +INSERT INTO product_slots VALUES(85,134); +INSERT INTO product_slots VALUES(85,135); +INSERT INTO product_slots VALUES(85,136); +INSERT INTO product_slots VALUES(85,187); +INSERT INTO product_slots VALUES(86,39); +INSERT INTO product_slots VALUES(86,41); +INSERT INTO product_slots VALUES(86,43); +INSERT INTO product_slots VALUES(86,45); +INSERT INTO product_slots VALUES(86,46); +INSERT INTO product_slots VALUES(86,47); +INSERT INTO product_slots VALUES(86,48); +INSERT INTO product_slots VALUES(86,49); +INSERT INTO product_slots VALUES(86,50); +INSERT INTO product_slots VALUES(86,51); +INSERT INTO product_slots VALUES(86,52); +INSERT INTO product_slots VALUES(86,53); +INSERT INTO product_slots VALUES(86,54); +INSERT INTO product_slots VALUES(86,55); +INSERT INTO product_slots VALUES(86,56); +INSERT INTO product_slots VALUES(86,57); +INSERT INTO product_slots VALUES(86,58); +INSERT INTO product_slots VALUES(86,59); +INSERT INTO product_slots VALUES(86,60); +INSERT INTO product_slots VALUES(86,61); +INSERT INTO product_slots VALUES(86,62); +INSERT INTO product_slots VALUES(86,63); +INSERT INTO product_slots VALUES(86,64); +INSERT INTO product_slots VALUES(86,65); +INSERT INTO product_slots VALUES(86,66); +INSERT INTO product_slots VALUES(86,67); +INSERT INTO product_slots VALUES(86,68); +INSERT INTO product_slots VALUES(86,69); +INSERT INTO product_slots VALUES(86,70); +INSERT INTO product_slots VALUES(86,71); +INSERT INTO product_slots VALUES(86,74); +INSERT INTO product_slots VALUES(86,75); +INSERT INTO product_slots VALUES(86,76); +INSERT INTO product_slots VALUES(86,77); +INSERT INTO product_slots VALUES(86,78); +INSERT INTO product_slots VALUES(86,81); +INSERT INTO product_slots VALUES(86,82); +INSERT INTO product_slots VALUES(86,83); +INSERT INTO product_slots VALUES(86,84); +INSERT INTO product_slots VALUES(86,87); +INSERT INTO product_slots VALUES(86,88); +INSERT INTO product_slots VALUES(86,90); +INSERT INTO product_slots VALUES(86,91); +INSERT INTO product_slots VALUES(86,95); +INSERT INTO product_slots VALUES(86,97); +INSERT INTO product_slots VALUES(86,98); +INSERT INTO product_slots VALUES(86,101); +INSERT INTO product_slots VALUES(86,102); +INSERT INTO product_slots VALUES(86,103); +INSERT INTO product_slots VALUES(86,104); +INSERT INTO product_slots VALUES(86,109); +INSERT INTO product_slots VALUES(86,110); +INSERT INTO product_slots VALUES(86,111); +INSERT INTO product_slots VALUES(86,112); +INSERT INTO product_slots VALUES(86,116); +INSERT INTO product_slots VALUES(86,117); +INSERT INTO product_slots VALUES(86,118); +INSERT INTO product_slots VALUES(86,119); +INSERT INTO product_slots VALUES(86,120); +INSERT INTO product_slots VALUES(86,123); +INSERT INTO product_slots VALUES(86,124); +INSERT INTO product_slots VALUES(86,125); +INSERT INTO product_slots VALUES(86,126); +INSERT INTO product_slots VALUES(86,130); +INSERT INTO product_slots VALUES(86,131); +INSERT INTO product_slots VALUES(86,132); +INSERT INTO product_slots VALUES(86,133); +INSERT INTO product_slots VALUES(86,137); +INSERT INTO product_slots VALUES(86,138); +INSERT INTO product_slots VALUES(86,139); +INSERT INTO product_slots VALUES(86,140); +INSERT INTO product_slots VALUES(86,144); +INSERT INTO product_slots VALUES(86,145); +INSERT INTO product_slots VALUES(86,146); +INSERT INTO product_slots VALUES(86,147); +INSERT INTO product_slots VALUES(86,148); +INSERT INTO product_slots VALUES(86,149); +INSERT INTO product_slots VALUES(86,150); +INSERT INTO product_slots VALUES(86,151); +INSERT INTO product_slots VALUES(86,155); +INSERT INTO product_slots VALUES(86,156); +INSERT INTO product_slots VALUES(86,157); +INSERT INTO product_slots VALUES(86,158); +INSERT INTO product_slots VALUES(86,162); +INSERT INTO product_slots VALUES(86,163); +INSERT INTO product_slots VALUES(86,164); +INSERT INTO product_slots VALUES(86,165); +INSERT INTO product_slots VALUES(86,166); +INSERT INTO product_slots VALUES(86,169); +INSERT INTO product_slots VALUES(86,170); +INSERT INTO product_slots VALUES(86,171); +INSERT INTO product_slots VALUES(86,172); +INSERT INTO product_slots VALUES(86,176); +INSERT INTO product_slots VALUES(86,177); +INSERT INTO product_slots VALUES(86,178); +INSERT INTO product_slots VALUES(86,179); +INSERT INTO product_slots VALUES(86,183); +INSERT INTO product_slots VALUES(86,184); +INSERT INTO product_slots VALUES(86,185); +INSERT INTO product_slots VALUES(86,186); +INSERT INTO product_slots VALUES(86,187); +INSERT INTO product_slots VALUES(86,188); +INSERT INTO product_slots VALUES(86,189); +INSERT INTO product_slots VALUES(86,190); +INSERT INTO product_slots VALUES(86,191); +INSERT INTO product_slots VALUES(86,192); +INSERT INTO product_slots VALUES(86,193); +INSERT INTO product_slots VALUES(86,194); +INSERT INTO product_slots VALUES(86,198); +INSERT INTO product_slots VALUES(86,199); +INSERT INTO product_slots VALUES(86,200); +INSERT INTO product_slots VALUES(86,201); +INSERT INTO product_slots VALUES(86,202); +INSERT INTO product_slots VALUES(86,203); +INSERT INTO product_slots VALUES(86,205); +INSERT INTO product_slots VALUES(86,208); +INSERT INTO product_slots VALUES(86,209); +INSERT INTO product_slots VALUES(86,210); +INSERT INTO product_slots VALUES(86,211); +INSERT INTO product_slots VALUES(86,216); +INSERT INTO product_slots VALUES(86,217); +INSERT INTO product_slots VALUES(86,218); +INSERT INTO product_slots VALUES(86,219); +INSERT INTO product_slots VALUES(86,220); +INSERT INTO product_slots VALUES(86,223); +INSERT INTO product_slots VALUES(86,224); +INSERT INTO product_slots VALUES(86,225); +INSERT INTO product_slots VALUES(86,226); +INSERT INTO product_slots VALUES(86,230); +INSERT INTO product_slots VALUES(86,231); +INSERT INTO product_slots VALUES(86,232); +INSERT INTO product_slots VALUES(86,234); +INSERT INTO product_slots VALUES(86,237); +INSERT INTO product_slots VALUES(86,238); +INSERT INTO product_slots VALUES(86,239); +INSERT INTO product_slots VALUES(86,240); +INSERT INTO product_slots VALUES(86,274); +INSERT INTO product_slots VALUES(86,275); +INSERT INTO product_slots VALUES(86,277); +INSERT INTO product_slots VALUES(86,278); +INSERT INTO product_slots VALUES(86,279); +INSERT INTO product_slots VALUES(88,39); +INSERT INTO product_slots VALUES(88,44); +INSERT INTO product_slots VALUES(88,46); +INSERT INTO product_slots VALUES(88,47); +INSERT INTO product_slots VALUES(88,48); +INSERT INTO product_slots VALUES(88,49); +INSERT INTO product_slots VALUES(88,50); +INSERT INTO product_slots VALUES(88,51); +INSERT INTO product_slots VALUES(88,52); +INSERT INTO product_slots VALUES(88,53); +INSERT INTO product_slots VALUES(88,54); +INSERT INTO product_slots VALUES(88,55); +INSERT INTO product_slots VALUES(88,56); +INSERT INTO product_slots VALUES(88,57); +INSERT INTO product_slots VALUES(88,58); +INSERT INTO product_slots VALUES(88,59); +INSERT INTO product_slots VALUES(88,60); +INSERT INTO product_slots VALUES(88,61); +INSERT INTO product_slots VALUES(88,62); +INSERT INTO product_slots VALUES(88,63); +INSERT INTO product_slots VALUES(88,64); +INSERT INTO product_slots VALUES(88,65); +INSERT INTO product_slots VALUES(88,66); +INSERT INTO product_slots VALUES(88,67); +INSERT INTO product_slots VALUES(88,68); +INSERT INTO product_slots VALUES(88,69); +INSERT INTO product_slots VALUES(88,70); +INSERT INTO product_slots VALUES(88,71); +INSERT INTO product_slots VALUES(88,72); +INSERT INTO product_slots VALUES(88,73); +INSERT INTO product_slots VALUES(88,74); +INSERT INTO product_slots VALUES(88,75); +INSERT INTO product_slots VALUES(88,76); +INSERT INTO product_slots VALUES(88,77); +INSERT INTO product_slots VALUES(88,78); +INSERT INTO product_slots VALUES(88,79); +INSERT INTO product_slots VALUES(88,80); +INSERT INTO product_slots VALUES(88,87); +INSERT INTO product_slots VALUES(88,88); +INSERT INTO product_slots VALUES(88,95); +INSERT INTO product_slots VALUES(88,101); +INSERT INTO product_slots VALUES(88,102); +INSERT INTO product_slots VALUES(88,103); +INSERT INTO product_slots VALUES(88,104); +INSERT INTO product_slots VALUES(88,105); +INSERT INTO product_slots VALUES(88,106); +INSERT INTO product_slots VALUES(88,107); +INSERT INTO product_slots VALUES(88,108); +INSERT INTO product_slots VALUES(88,109); +INSERT INTO product_slots VALUES(88,110); +INSERT INTO product_slots VALUES(88,111); +INSERT INTO product_slots VALUES(88,112); +INSERT INTO product_slots VALUES(88,113); +INSERT INTO product_slots VALUES(88,114); +INSERT INTO product_slots VALUES(88,115); +INSERT INTO product_slots VALUES(88,116); +INSERT INTO product_slots VALUES(88,117); +INSERT INTO product_slots VALUES(88,118); +INSERT INTO product_slots VALUES(88,119); +INSERT INTO product_slots VALUES(88,120); +INSERT INTO product_slots VALUES(88,121); +INSERT INTO product_slots VALUES(88,122); +INSERT INTO product_slots VALUES(88,123); +INSERT INTO product_slots VALUES(88,124); +INSERT INTO product_slots VALUES(88,125); +INSERT INTO product_slots VALUES(88,126); +INSERT INTO product_slots VALUES(88,127); +INSERT INTO product_slots VALUES(88,128); +INSERT INTO product_slots VALUES(88,129); +INSERT INTO product_slots VALUES(88,130); +INSERT INTO product_slots VALUES(88,131); +INSERT INTO product_slots VALUES(88,132); +INSERT INTO product_slots VALUES(88,133); +INSERT INTO product_slots VALUES(88,137); +INSERT INTO product_slots VALUES(88,138); +INSERT INTO product_slots VALUES(88,139); +INSERT INTO product_slots VALUES(88,141); +INSERT INTO product_slots VALUES(88,144); +INSERT INTO product_slots VALUES(88,156); +INSERT INTO product_slots VALUES(88,164); +INSERT INTO product_slots VALUES(88,165); +INSERT INTO product_slots VALUES(88,166); +INSERT INTO product_slots VALUES(88,167); +INSERT INTO product_slots VALUES(88,169); +INSERT INTO product_slots VALUES(88,176); +INSERT INTO product_slots VALUES(88,187); +INSERT INTO product_slots VALUES(88,203); +INSERT INTO product_slots VALUES(88,204); +INSERT INTO product_slots VALUES(88,205); +INSERT INTO product_slots VALUES(88,206); +INSERT INTO product_slots VALUES(88,207); +INSERT INTO product_slots VALUES(88,208); +INSERT INTO product_slots VALUES(88,209); +INSERT INTO product_slots VALUES(88,210); +INSERT INTO product_slots VALUES(88,211); +INSERT INTO product_slots VALUES(88,212); +INSERT INTO product_slots VALUES(88,213); +INSERT INTO product_slots VALUES(88,214); +INSERT INTO product_slots VALUES(88,215); +INSERT INTO product_slots VALUES(88,216); +INSERT INTO product_slots VALUES(88,217); +INSERT INTO product_slots VALUES(88,218); +INSERT INTO product_slots VALUES(88,219); +INSERT INTO product_slots VALUES(88,220); +INSERT INTO product_slots VALUES(88,221); +INSERT INTO product_slots VALUES(88,222); +INSERT INTO product_slots VALUES(88,223); +INSERT INTO product_slots VALUES(88,224); +INSERT INTO product_slots VALUES(88,225); +INSERT INTO product_slots VALUES(88,226); +INSERT INTO product_slots VALUES(88,227); +INSERT INTO product_slots VALUES(88,228); +INSERT INTO product_slots VALUES(88,229); +INSERT INTO product_slots VALUES(88,230); +INSERT INTO product_slots VALUES(88,231); +INSERT INTO product_slots VALUES(88,232); +INSERT INTO product_slots VALUES(88,233); +INSERT INTO product_slots VALUES(88,234); +INSERT INTO product_slots VALUES(88,235); +INSERT INTO product_slots VALUES(88,236); +INSERT INTO product_slots VALUES(88,237); +INSERT INTO product_slots VALUES(88,238); +INSERT INTO product_slots VALUES(88,239); +INSERT INTO product_slots VALUES(88,240); +INSERT INTO product_slots VALUES(88,241); +INSERT INTO product_slots VALUES(88,242); +INSERT INTO product_slots VALUES(88,243); +INSERT INTO product_slots VALUES(88,244); +INSERT INTO product_slots VALUES(88,274); +INSERT INTO product_slots VALUES(88,275); +INSERT INTO product_slots VALUES(88,279); +INSERT INTO product_slots VALUES(88,280); +INSERT INTO product_slots VALUES(88,281); +INSERT INTO product_slots VALUES(88,282); +INSERT INTO product_slots VALUES(88,283); +INSERT INTO product_slots VALUES(88,284); +INSERT INTO product_slots VALUES(88,285); +INSERT INTO product_slots VALUES(88,286); +INSERT INTO product_slots VALUES(88,287); +INSERT INTO product_slots VALUES(89,39); +INSERT INTO product_slots VALUES(89,44); +INSERT INTO product_slots VALUES(89,46); +INSERT INTO product_slots VALUES(89,47); +INSERT INTO product_slots VALUES(89,48); +INSERT INTO product_slots VALUES(89,49); +INSERT INTO product_slots VALUES(89,50); +INSERT INTO product_slots VALUES(89,51); +INSERT INTO product_slots VALUES(89,52); +INSERT INTO product_slots VALUES(89,53); +INSERT INTO product_slots VALUES(89,54); +INSERT INTO product_slots VALUES(89,55); +INSERT INTO product_slots VALUES(89,56); +INSERT INTO product_slots VALUES(89,57); +INSERT INTO product_slots VALUES(89,58); +INSERT INTO product_slots VALUES(89,59); +INSERT INTO product_slots VALUES(89,60); +INSERT INTO product_slots VALUES(89,61); +INSERT INTO product_slots VALUES(89,62); +INSERT INTO product_slots VALUES(89,63); +INSERT INTO product_slots VALUES(89,64); +INSERT INTO product_slots VALUES(89,65); +INSERT INTO product_slots VALUES(89,66); +INSERT INTO product_slots VALUES(89,67); +INSERT INTO product_slots VALUES(89,68); +INSERT INTO product_slots VALUES(89,69); +INSERT INTO product_slots VALUES(89,70); +INSERT INTO product_slots VALUES(89,71); +INSERT INTO product_slots VALUES(89,72); +INSERT INTO product_slots VALUES(89,73); +INSERT INTO product_slots VALUES(89,74); +INSERT INTO product_slots VALUES(89,75); +INSERT INTO product_slots VALUES(89,76); +INSERT INTO product_slots VALUES(89,77); +INSERT INTO product_slots VALUES(89,78); +INSERT INTO product_slots VALUES(89,79); +INSERT INTO product_slots VALUES(89,80); +INSERT INTO product_slots VALUES(89,81); +INSERT INTO product_slots VALUES(89,82); +INSERT INTO product_slots VALUES(89,83); +INSERT INTO product_slots VALUES(89,84); +INSERT INTO product_slots VALUES(89,85); +INSERT INTO product_slots VALUES(89,86); +INSERT INTO product_slots VALUES(89,87); +INSERT INTO product_slots VALUES(89,88); +INSERT INTO product_slots VALUES(89,89); +INSERT INTO product_slots VALUES(89,90); +INSERT INTO product_slots VALUES(89,91); +INSERT INTO product_slots VALUES(89,92); +INSERT INTO product_slots VALUES(89,93); +INSERT INTO product_slots VALUES(89,94); +INSERT INTO product_slots VALUES(89,95); +INSERT INTO product_slots VALUES(89,96); +INSERT INTO product_slots VALUES(89,97); +INSERT INTO product_slots VALUES(89,98); +INSERT INTO product_slots VALUES(89,99); +INSERT INTO product_slots VALUES(89,100); +INSERT INTO product_slots VALUES(89,101); +INSERT INTO product_slots VALUES(89,102); +INSERT INTO product_slots VALUES(89,103); +INSERT INTO product_slots VALUES(89,104); +INSERT INTO product_slots VALUES(89,105); +INSERT INTO product_slots VALUES(89,106); +INSERT INTO product_slots VALUES(89,107); +INSERT INTO product_slots VALUES(89,108); +INSERT INTO product_slots VALUES(89,109); +INSERT INTO product_slots VALUES(89,110); +INSERT INTO product_slots VALUES(89,111); +INSERT INTO product_slots VALUES(89,112); +INSERT INTO product_slots VALUES(89,113); +INSERT INTO product_slots VALUES(89,114); +INSERT INTO product_slots VALUES(89,115); +INSERT INTO product_slots VALUES(89,116); +INSERT INTO product_slots VALUES(89,117); +INSERT INTO product_slots VALUES(89,118); +INSERT INTO product_slots VALUES(89,119); +INSERT INTO product_slots VALUES(89,120); +INSERT INTO product_slots VALUES(89,121); +INSERT INTO product_slots VALUES(89,122); +INSERT INTO product_slots VALUES(89,123); +INSERT INTO product_slots VALUES(89,124); +INSERT INTO product_slots VALUES(89,125); +INSERT INTO product_slots VALUES(89,126); +INSERT INTO product_slots VALUES(89,127); +INSERT INTO product_slots VALUES(89,128); +INSERT INTO product_slots VALUES(89,129); +INSERT INTO product_slots VALUES(89,130); +INSERT INTO product_slots VALUES(89,131); +INSERT INTO product_slots VALUES(89,132); +INSERT INTO product_slots VALUES(89,133); +INSERT INTO product_slots VALUES(89,134); +INSERT INTO product_slots VALUES(89,135); +INSERT INTO product_slots VALUES(89,136); +INSERT INTO product_slots VALUES(89,137); +INSERT INTO product_slots VALUES(89,138); +INSERT INTO product_slots VALUES(89,139); +INSERT INTO product_slots VALUES(89,140); +INSERT INTO product_slots VALUES(89,141); +INSERT INTO product_slots VALUES(89,142); +INSERT INTO product_slots VALUES(89,143); +INSERT INTO product_slots VALUES(89,144); +INSERT INTO product_slots VALUES(89,145); +INSERT INTO product_slots VALUES(89,146); +INSERT INTO product_slots VALUES(89,147); +INSERT INTO product_slots VALUES(89,148); +INSERT INTO product_slots VALUES(89,149); +INSERT INTO product_slots VALUES(89,150); +INSERT INTO product_slots VALUES(89,151); +INSERT INTO product_slots VALUES(89,152); +INSERT INTO product_slots VALUES(89,153); +INSERT INTO product_slots VALUES(89,154); +INSERT INTO product_slots VALUES(89,155); +INSERT INTO product_slots VALUES(89,156); +INSERT INTO product_slots VALUES(89,157); +INSERT INTO product_slots VALUES(89,158); +INSERT INTO product_slots VALUES(89,159); +INSERT INTO product_slots VALUES(89,160); +INSERT INTO product_slots VALUES(89,161); +INSERT INTO product_slots VALUES(89,162); +INSERT INTO product_slots VALUES(89,163); +INSERT INTO product_slots VALUES(89,164); +INSERT INTO product_slots VALUES(89,165); +INSERT INTO product_slots VALUES(89,166); +INSERT INTO product_slots VALUES(89,167); +INSERT INTO product_slots VALUES(89,168); +INSERT INTO product_slots VALUES(89,169); +INSERT INTO product_slots VALUES(89,170); +INSERT INTO product_slots VALUES(89,171); +INSERT INTO product_slots VALUES(89,172); +INSERT INTO product_slots VALUES(89,173); +INSERT INTO product_slots VALUES(89,174); +INSERT INTO product_slots VALUES(89,175); +INSERT INTO product_slots VALUES(89,176); +INSERT INTO product_slots VALUES(89,177); +INSERT INTO product_slots VALUES(89,178); +INSERT INTO product_slots VALUES(89,179); +INSERT INTO product_slots VALUES(89,180); +INSERT INTO product_slots VALUES(89,181); +INSERT INTO product_slots VALUES(89,182); +INSERT INTO product_slots VALUES(89,183); +INSERT INTO product_slots VALUES(89,184); +INSERT INTO product_slots VALUES(89,185); +INSERT INTO product_slots VALUES(89,186); +INSERT INTO product_slots VALUES(89,187); +INSERT INTO product_slots VALUES(89,188); +INSERT INTO product_slots VALUES(89,189); +INSERT INTO product_slots VALUES(89,190); +INSERT INTO product_slots VALUES(89,191); +INSERT INTO product_slots VALUES(89,192); +INSERT INTO product_slots VALUES(89,193); +INSERT INTO product_slots VALUES(89,194); +INSERT INTO product_slots VALUES(89,195); +INSERT INTO product_slots VALUES(89,196); +INSERT INTO product_slots VALUES(89,197); +INSERT INTO product_slots VALUES(89,198); +INSERT INTO product_slots VALUES(89,199); +INSERT INTO product_slots VALUES(89,200); +INSERT INTO product_slots VALUES(89,201); +INSERT INTO product_slots VALUES(89,202); +INSERT INTO product_slots VALUES(89,203); +INSERT INTO product_slots VALUES(89,204); +INSERT INTO product_slots VALUES(89,205); +INSERT INTO product_slots VALUES(89,206); +INSERT INTO product_slots VALUES(89,207); +INSERT INTO product_slots VALUES(89,208); +INSERT INTO product_slots VALUES(89,209); +INSERT INTO product_slots VALUES(89,210); +INSERT INTO product_slots VALUES(89,211); +INSERT INTO product_slots VALUES(89,212); +INSERT INTO product_slots VALUES(89,213); +INSERT INTO product_slots VALUES(89,214); +INSERT INTO product_slots VALUES(89,215); +INSERT INTO product_slots VALUES(89,216); +INSERT INTO product_slots VALUES(89,217); +INSERT INTO product_slots VALUES(89,218); +INSERT INTO product_slots VALUES(89,219); +INSERT INTO product_slots VALUES(89,220); +INSERT INTO product_slots VALUES(89,221); +INSERT INTO product_slots VALUES(89,222); +INSERT INTO product_slots VALUES(89,223); +INSERT INTO product_slots VALUES(89,224); +INSERT INTO product_slots VALUES(89,225); +INSERT INTO product_slots VALUES(89,226); +INSERT INTO product_slots VALUES(89,227); +INSERT INTO product_slots VALUES(89,228); +INSERT INTO product_slots VALUES(89,229); +INSERT INTO product_slots VALUES(89,230); +INSERT INTO product_slots VALUES(89,231); +INSERT INTO product_slots VALUES(89,232); +INSERT INTO product_slots VALUES(89,233); +INSERT INTO product_slots VALUES(89,234); +INSERT INTO product_slots VALUES(89,235); +INSERT INTO product_slots VALUES(89,236); +INSERT INTO product_slots VALUES(89,237); +INSERT INTO product_slots VALUES(89,238); +INSERT INTO product_slots VALUES(89,239); +INSERT INTO product_slots VALUES(89,240); +INSERT INTO product_slots VALUES(89,241); +INSERT INTO product_slots VALUES(89,242); +INSERT INTO product_slots VALUES(89,243); +INSERT INTO product_slots VALUES(89,244); +INSERT INTO product_slots VALUES(89,274); +INSERT INTO product_slots VALUES(89,275); +INSERT INTO product_slots VALUES(89,279); +INSERT INTO product_slots VALUES(89,280); +INSERT INTO product_slots VALUES(89,281); +INSERT INTO product_slots VALUES(89,282); +INSERT INTO product_slots VALUES(89,283); +INSERT INTO product_slots VALUES(89,284); +INSERT INTO product_slots VALUES(89,285); +INSERT INTO product_slots VALUES(89,286); +INSERT INTO product_slots VALUES(89,287); +INSERT INTO product_slots VALUES(90,39); +INSERT INTO product_slots VALUES(90,44); +INSERT INTO product_slots VALUES(90,46); +INSERT INTO product_slots VALUES(90,47); +INSERT INTO product_slots VALUES(90,48); +INSERT INTO product_slots VALUES(90,49); +INSERT INTO product_slots VALUES(90,50); +INSERT INTO product_slots VALUES(90,51); +INSERT INTO product_slots VALUES(90,52); +INSERT INTO product_slots VALUES(90,53); +INSERT INTO product_slots VALUES(90,54); +INSERT INTO product_slots VALUES(90,55); +INSERT INTO product_slots VALUES(90,56); +INSERT INTO product_slots VALUES(90,57); +INSERT INTO product_slots VALUES(90,58); +INSERT INTO product_slots VALUES(90,59); +INSERT INTO product_slots VALUES(90,60); +INSERT INTO product_slots VALUES(90,61); +INSERT INTO product_slots VALUES(90,62); +INSERT INTO product_slots VALUES(90,63); +INSERT INTO product_slots VALUES(90,64); +INSERT INTO product_slots VALUES(90,65); +INSERT INTO product_slots VALUES(90,66); +INSERT INTO product_slots VALUES(90,67); +INSERT INTO product_slots VALUES(90,68); +INSERT INTO product_slots VALUES(90,69); +INSERT INTO product_slots VALUES(90,70); +INSERT INTO product_slots VALUES(90,71); +INSERT INTO product_slots VALUES(90,72); +INSERT INTO product_slots VALUES(90,73); +INSERT INTO product_slots VALUES(90,74); +INSERT INTO product_slots VALUES(90,75); +INSERT INTO product_slots VALUES(90,76); +INSERT INTO product_slots VALUES(90,77); +INSERT INTO product_slots VALUES(90,78); +INSERT INTO product_slots VALUES(90,79); +INSERT INTO product_slots VALUES(90,80); +INSERT INTO product_slots VALUES(90,81); +INSERT INTO product_slots VALUES(90,82); +INSERT INTO product_slots VALUES(90,83); +INSERT INTO product_slots VALUES(90,84); +INSERT INTO product_slots VALUES(90,85); +INSERT INTO product_slots VALUES(90,86); +INSERT INTO product_slots VALUES(90,87); +INSERT INTO product_slots VALUES(90,88); +INSERT INTO product_slots VALUES(90,89); +INSERT INTO product_slots VALUES(90,90); +INSERT INTO product_slots VALUES(90,91); +INSERT INTO product_slots VALUES(90,92); +INSERT INTO product_slots VALUES(90,93); +INSERT INTO product_slots VALUES(90,94); +INSERT INTO product_slots VALUES(90,95); +INSERT INTO product_slots VALUES(90,96); +INSERT INTO product_slots VALUES(90,97); +INSERT INTO product_slots VALUES(90,98); +INSERT INTO product_slots VALUES(90,99); +INSERT INTO product_slots VALUES(90,100); +INSERT INTO product_slots VALUES(90,101); +INSERT INTO product_slots VALUES(90,102); +INSERT INTO product_slots VALUES(90,103); +INSERT INTO product_slots VALUES(90,104); +INSERT INTO product_slots VALUES(90,105); +INSERT INTO product_slots VALUES(90,106); +INSERT INTO product_slots VALUES(90,107); +INSERT INTO product_slots VALUES(90,108); +INSERT INTO product_slots VALUES(90,109); +INSERT INTO product_slots VALUES(90,110); +INSERT INTO product_slots VALUES(90,111); +INSERT INTO product_slots VALUES(90,112); +INSERT INTO product_slots VALUES(90,113); +INSERT INTO product_slots VALUES(90,114); +INSERT INTO product_slots VALUES(90,115); +INSERT INTO product_slots VALUES(90,116); +INSERT INTO product_slots VALUES(90,117); +INSERT INTO product_slots VALUES(90,118); +INSERT INTO product_slots VALUES(90,119); +INSERT INTO product_slots VALUES(90,120); +INSERT INTO product_slots VALUES(90,121); +INSERT INTO product_slots VALUES(90,122); +INSERT INTO product_slots VALUES(90,123); +INSERT INTO product_slots VALUES(90,124); +INSERT INTO product_slots VALUES(90,125); +INSERT INTO product_slots VALUES(90,126); +INSERT INTO product_slots VALUES(90,127); +INSERT INTO product_slots VALUES(90,128); +INSERT INTO product_slots VALUES(90,129); +INSERT INTO product_slots VALUES(90,130); +INSERT INTO product_slots VALUES(90,131); +INSERT INTO product_slots VALUES(90,132); +INSERT INTO product_slots VALUES(90,133); +INSERT INTO product_slots VALUES(90,134); +INSERT INTO product_slots VALUES(90,135); +INSERT INTO product_slots VALUES(90,136); +INSERT INTO product_slots VALUES(90,137); +INSERT INTO product_slots VALUES(90,138); +INSERT INTO product_slots VALUES(90,139); +INSERT INTO product_slots VALUES(90,140); +INSERT INTO product_slots VALUES(90,141); +INSERT INTO product_slots VALUES(90,142); +INSERT INTO product_slots VALUES(90,143); +INSERT INTO product_slots VALUES(90,144); +INSERT INTO product_slots VALUES(90,145); +INSERT INTO product_slots VALUES(90,146); +INSERT INTO product_slots VALUES(90,147); +INSERT INTO product_slots VALUES(90,148); +INSERT INTO product_slots VALUES(90,149); +INSERT INTO product_slots VALUES(90,150); +INSERT INTO product_slots VALUES(90,151); +INSERT INTO product_slots VALUES(90,152); +INSERT INTO product_slots VALUES(90,153); +INSERT INTO product_slots VALUES(90,154); +INSERT INTO product_slots VALUES(90,155); +INSERT INTO product_slots VALUES(90,156); +INSERT INTO product_slots VALUES(90,157); +INSERT INTO product_slots VALUES(90,158); +INSERT INTO product_slots VALUES(90,159); +INSERT INTO product_slots VALUES(90,160); +INSERT INTO product_slots VALUES(90,161); +INSERT INTO product_slots VALUES(90,162); +INSERT INTO product_slots VALUES(90,163); +INSERT INTO product_slots VALUES(90,164); +INSERT INTO product_slots VALUES(90,165); +INSERT INTO product_slots VALUES(90,166); +INSERT INTO product_slots VALUES(90,167); +INSERT INTO product_slots VALUES(90,168); +INSERT INTO product_slots VALUES(90,169); +INSERT INTO product_slots VALUES(90,170); +INSERT INTO product_slots VALUES(90,171); +INSERT INTO product_slots VALUES(90,172); +INSERT INTO product_slots VALUES(90,173); +INSERT INTO product_slots VALUES(90,174); +INSERT INTO product_slots VALUES(90,175); +INSERT INTO product_slots VALUES(90,176); +INSERT INTO product_slots VALUES(90,177); +INSERT INTO product_slots VALUES(90,178); +INSERT INTO product_slots VALUES(90,179); +INSERT INTO product_slots VALUES(90,180); +INSERT INTO product_slots VALUES(90,181); +INSERT INTO product_slots VALUES(90,182); +INSERT INTO product_slots VALUES(90,183); +INSERT INTO product_slots VALUES(90,184); +INSERT INTO product_slots VALUES(90,185); +INSERT INTO product_slots VALUES(90,186); +INSERT INTO product_slots VALUES(90,187); +INSERT INTO product_slots VALUES(90,188); +INSERT INTO product_slots VALUES(90,189); +INSERT INTO product_slots VALUES(90,190); +INSERT INTO product_slots VALUES(90,191); +INSERT INTO product_slots VALUES(90,192); +INSERT INTO product_slots VALUES(90,193); +INSERT INTO product_slots VALUES(90,194); +INSERT INTO product_slots VALUES(90,195); +INSERT INTO product_slots VALUES(90,196); +INSERT INTO product_slots VALUES(90,197); +INSERT INTO product_slots VALUES(90,198); +INSERT INTO product_slots VALUES(90,199); +INSERT INTO product_slots VALUES(90,200); +INSERT INTO product_slots VALUES(90,201); +INSERT INTO product_slots VALUES(90,202); +INSERT INTO product_slots VALUES(90,203); +INSERT INTO product_slots VALUES(90,204); +INSERT INTO product_slots VALUES(90,205); +INSERT INTO product_slots VALUES(90,206); +INSERT INTO product_slots VALUES(90,207); +INSERT INTO product_slots VALUES(90,208); +INSERT INTO product_slots VALUES(90,209); +INSERT INTO product_slots VALUES(90,210); +INSERT INTO product_slots VALUES(90,211); +INSERT INTO product_slots VALUES(90,212); +INSERT INTO product_slots VALUES(90,213); +INSERT INTO product_slots VALUES(90,214); +INSERT INTO product_slots VALUES(90,215); +INSERT INTO product_slots VALUES(90,216); +INSERT INTO product_slots VALUES(90,217); +INSERT INTO product_slots VALUES(90,218); +INSERT INTO product_slots VALUES(90,219); +INSERT INTO product_slots VALUES(90,220); +INSERT INTO product_slots VALUES(90,221); +INSERT INTO product_slots VALUES(90,222); +INSERT INTO product_slots VALUES(90,223); +INSERT INTO product_slots VALUES(90,224); +INSERT INTO product_slots VALUES(90,225); +INSERT INTO product_slots VALUES(90,226); +INSERT INTO product_slots VALUES(90,227); +INSERT INTO product_slots VALUES(90,228); +INSERT INTO product_slots VALUES(90,229); +INSERT INTO product_slots VALUES(90,230); +INSERT INTO product_slots VALUES(90,231); +INSERT INTO product_slots VALUES(90,232); +INSERT INTO product_slots VALUES(90,233); +INSERT INTO product_slots VALUES(90,234); +INSERT INTO product_slots VALUES(90,235); +INSERT INTO product_slots VALUES(90,236); +INSERT INTO product_slots VALUES(90,237); +INSERT INTO product_slots VALUES(90,238); +INSERT INTO product_slots VALUES(90,239); +INSERT INTO product_slots VALUES(90,240); +INSERT INTO product_slots VALUES(90,241); +INSERT INTO product_slots VALUES(90,242); +INSERT INTO product_slots VALUES(90,243); +INSERT INTO product_slots VALUES(90,244); +INSERT INTO product_slots VALUES(90,274); +INSERT INTO product_slots VALUES(90,275); +INSERT INTO product_slots VALUES(90,279); +INSERT INTO product_slots VALUES(90,280); +INSERT INTO product_slots VALUES(90,281); +INSERT INTO product_slots VALUES(90,282); +INSERT INTO product_slots VALUES(90,283); +INSERT INTO product_slots VALUES(90,284); +INSERT INTO product_slots VALUES(90,285); +INSERT INTO product_slots VALUES(90,286); +INSERT INTO product_slots VALUES(90,287); +INSERT INTO product_slots VALUES(91,39); +INSERT INTO product_slots VALUES(91,44); +INSERT INTO product_slots VALUES(91,46); +INSERT INTO product_slots VALUES(91,47); +INSERT INTO product_slots VALUES(91,48); +INSERT INTO product_slots VALUES(91,49); +INSERT INTO product_slots VALUES(91,50); +INSERT INTO product_slots VALUES(91,51); +INSERT INTO product_slots VALUES(91,52); +INSERT INTO product_slots VALUES(91,53); +INSERT INTO product_slots VALUES(91,54); +INSERT INTO product_slots VALUES(91,55); +INSERT INTO product_slots VALUES(91,56); +INSERT INTO product_slots VALUES(91,57); +INSERT INTO product_slots VALUES(91,58); +INSERT INTO product_slots VALUES(91,59); +INSERT INTO product_slots VALUES(91,60); +INSERT INTO product_slots VALUES(91,61); +INSERT INTO product_slots VALUES(91,62); +INSERT INTO product_slots VALUES(91,63); +INSERT INTO product_slots VALUES(91,64); +INSERT INTO product_slots VALUES(91,65); +INSERT INTO product_slots VALUES(91,66); +INSERT INTO product_slots VALUES(91,67); +INSERT INTO product_slots VALUES(91,68); +INSERT INTO product_slots VALUES(91,69); +INSERT INTO product_slots VALUES(91,70); +INSERT INTO product_slots VALUES(91,71); +INSERT INTO product_slots VALUES(91,72); +INSERT INTO product_slots VALUES(91,73); +INSERT INTO product_slots VALUES(91,74); +INSERT INTO product_slots VALUES(91,75); +INSERT INTO product_slots VALUES(91,76); +INSERT INTO product_slots VALUES(91,77); +INSERT INTO product_slots VALUES(91,78); +INSERT INTO product_slots VALUES(91,79); +INSERT INTO product_slots VALUES(91,80); +INSERT INTO product_slots VALUES(91,81); +INSERT INTO product_slots VALUES(91,82); +INSERT INTO product_slots VALUES(91,83); +INSERT INTO product_slots VALUES(91,84); +INSERT INTO product_slots VALUES(91,85); +INSERT INTO product_slots VALUES(91,86); +INSERT INTO product_slots VALUES(91,87); +INSERT INTO product_slots VALUES(91,88); +INSERT INTO product_slots VALUES(91,89); +INSERT INTO product_slots VALUES(91,90); +INSERT INTO product_slots VALUES(91,91); +INSERT INTO product_slots VALUES(91,92); +INSERT INTO product_slots VALUES(91,93); +INSERT INTO product_slots VALUES(91,94); +INSERT INTO product_slots VALUES(91,95); +INSERT INTO product_slots VALUES(91,96); +INSERT INTO product_slots VALUES(91,97); +INSERT INTO product_slots VALUES(91,98); +INSERT INTO product_slots VALUES(91,99); +INSERT INTO product_slots VALUES(91,100); +INSERT INTO product_slots VALUES(91,101); +INSERT INTO product_slots VALUES(91,102); +INSERT INTO product_slots VALUES(91,103); +INSERT INTO product_slots VALUES(91,104); +INSERT INTO product_slots VALUES(91,105); +INSERT INTO product_slots VALUES(91,106); +INSERT INTO product_slots VALUES(91,107); +INSERT INTO product_slots VALUES(91,108); +INSERT INTO product_slots VALUES(91,109); +INSERT INTO product_slots VALUES(91,110); +INSERT INTO product_slots VALUES(91,111); +INSERT INTO product_slots VALUES(91,112); +INSERT INTO product_slots VALUES(91,113); +INSERT INTO product_slots VALUES(91,114); +INSERT INTO product_slots VALUES(91,115); +INSERT INTO product_slots VALUES(91,116); +INSERT INTO product_slots VALUES(91,117); +INSERT INTO product_slots VALUES(91,118); +INSERT INTO product_slots VALUES(91,119); +INSERT INTO product_slots VALUES(91,120); +INSERT INTO product_slots VALUES(91,121); +INSERT INTO product_slots VALUES(91,122); +INSERT INTO product_slots VALUES(91,123); +INSERT INTO product_slots VALUES(91,124); +INSERT INTO product_slots VALUES(91,125); +INSERT INTO product_slots VALUES(91,126); +INSERT INTO product_slots VALUES(91,127); +INSERT INTO product_slots VALUES(91,128); +INSERT INTO product_slots VALUES(91,129); +INSERT INTO product_slots VALUES(91,130); +INSERT INTO product_slots VALUES(91,131); +INSERT INTO product_slots VALUES(91,132); +INSERT INTO product_slots VALUES(91,133); +INSERT INTO product_slots VALUES(91,134); +INSERT INTO product_slots VALUES(91,135); +INSERT INTO product_slots VALUES(91,136); +INSERT INTO product_slots VALUES(91,137); +INSERT INTO product_slots VALUES(91,138); +INSERT INTO product_slots VALUES(91,139); +INSERT INTO product_slots VALUES(91,140); +INSERT INTO product_slots VALUES(91,141); +INSERT INTO product_slots VALUES(91,142); +INSERT INTO product_slots VALUES(91,143); +INSERT INTO product_slots VALUES(91,144); +INSERT INTO product_slots VALUES(91,145); +INSERT INTO product_slots VALUES(91,146); +INSERT INTO product_slots VALUES(91,147); +INSERT INTO product_slots VALUES(91,148); +INSERT INTO product_slots VALUES(91,149); +INSERT INTO product_slots VALUES(91,150); +INSERT INTO product_slots VALUES(91,151); +INSERT INTO product_slots VALUES(91,152); +INSERT INTO product_slots VALUES(91,153); +INSERT INTO product_slots VALUES(91,154); +INSERT INTO product_slots VALUES(91,155); +INSERT INTO product_slots VALUES(91,156); +INSERT INTO product_slots VALUES(91,157); +INSERT INTO product_slots VALUES(91,158); +INSERT INTO product_slots VALUES(91,159); +INSERT INTO product_slots VALUES(91,160); +INSERT INTO product_slots VALUES(91,161); +INSERT INTO product_slots VALUES(91,162); +INSERT INTO product_slots VALUES(91,163); +INSERT INTO product_slots VALUES(91,164); +INSERT INTO product_slots VALUES(91,165); +INSERT INTO product_slots VALUES(91,166); +INSERT INTO product_slots VALUES(91,167); +INSERT INTO product_slots VALUES(91,168); +INSERT INTO product_slots VALUES(91,169); +INSERT INTO product_slots VALUES(91,170); +INSERT INTO product_slots VALUES(91,171); +INSERT INTO product_slots VALUES(91,172); +INSERT INTO product_slots VALUES(91,173); +INSERT INTO product_slots VALUES(91,174); +INSERT INTO product_slots VALUES(91,175); +INSERT INTO product_slots VALUES(91,176); +INSERT INTO product_slots VALUES(91,177); +INSERT INTO product_slots VALUES(91,178); +INSERT INTO product_slots VALUES(91,179); +INSERT INTO product_slots VALUES(91,180); +INSERT INTO product_slots VALUES(91,181); +INSERT INTO product_slots VALUES(91,182); +INSERT INTO product_slots VALUES(91,183); +INSERT INTO product_slots VALUES(91,184); +INSERT INTO product_slots VALUES(91,185); +INSERT INTO product_slots VALUES(91,186); +INSERT INTO product_slots VALUES(91,187); +INSERT INTO product_slots VALUES(91,188); +INSERT INTO product_slots VALUES(91,189); +INSERT INTO product_slots VALUES(91,190); +INSERT INTO product_slots VALUES(91,191); +INSERT INTO product_slots VALUES(91,192); +INSERT INTO product_slots VALUES(91,193); +INSERT INTO product_slots VALUES(91,194); +INSERT INTO product_slots VALUES(91,195); +INSERT INTO product_slots VALUES(91,196); +INSERT INTO product_slots VALUES(91,197); +INSERT INTO product_slots VALUES(91,198); +INSERT INTO product_slots VALUES(91,199); +INSERT INTO product_slots VALUES(91,200); +INSERT INTO product_slots VALUES(91,201); +INSERT INTO product_slots VALUES(91,202); +INSERT INTO product_slots VALUES(91,203); +INSERT INTO product_slots VALUES(91,204); +INSERT INTO product_slots VALUES(91,205); +INSERT INTO product_slots VALUES(91,206); +INSERT INTO product_slots VALUES(91,207); +INSERT INTO product_slots VALUES(91,208); +INSERT INTO product_slots VALUES(91,209); +INSERT INTO product_slots VALUES(91,210); +INSERT INTO product_slots VALUES(91,211); +INSERT INTO product_slots VALUES(91,212); +INSERT INTO product_slots VALUES(91,213); +INSERT INTO product_slots VALUES(91,214); +INSERT INTO product_slots VALUES(91,215); +INSERT INTO product_slots VALUES(91,216); +INSERT INTO product_slots VALUES(91,217); +INSERT INTO product_slots VALUES(91,218); +INSERT INTO product_slots VALUES(91,219); +INSERT INTO product_slots VALUES(91,220); +INSERT INTO product_slots VALUES(91,221); +INSERT INTO product_slots VALUES(91,222); +INSERT INTO product_slots VALUES(91,223); +INSERT INTO product_slots VALUES(91,224); +INSERT INTO product_slots VALUES(91,225); +INSERT INTO product_slots VALUES(91,226); +INSERT INTO product_slots VALUES(91,227); +INSERT INTO product_slots VALUES(91,228); +INSERT INTO product_slots VALUES(91,229); +INSERT INTO product_slots VALUES(91,230); +INSERT INTO product_slots VALUES(91,231); +INSERT INTO product_slots VALUES(91,232); +INSERT INTO product_slots VALUES(91,233); +INSERT INTO product_slots VALUES(91,234); +INSERT INTO product_slots VALUES(91,235); +INSERT INTO product_slots VALUES(91,236); +INSERT INTO product_slots VALUES(91,237); +INSERT INTO product_slots VALUES(91,238); +INSERT INTO product_slots VALUES(91,239); +INSERT INTO product_slots VALUES(91,240); +INSERT INTO product_slots VALUES(91,241); +INSERT INTO product_slots VALUES(91,242); +INSERT INTO product_slots VALUES(91,243); +INSERT INTO product_slots VALUES(91,244); +INSERT INTO product_slots VALUES(91,274); +INSERT INTO product_slots VALUES(91,275); +INSERT INTO product_slots VALUES(91,279); +INSERT INTO product_slots VALUES(91,280); +INSERT INTO product_slots VALUES(91,281); +INSERT INTO product_slots VALUES(91,282); +INSERT INTO product_slots VALUES(91,283); +INSERT INTO product_slots VALUES(91,284); +INSERT INTO product_slots VALUES(91,285); +INSERT INTO product_slots VALUES(91,286); +INSERT INTO product_slots VALUES(91,287); +INSERT INTO product_slots VALUES(92,39); +INSERT INTO product_slots VALUES(92,44); +INSERT INTO product_slots VALUES(92,46); +INSERT INTO product_slots VALUES(92,47); +INSERT INTO product_slots VALUES(92,48); +INSERT INTO product_slots VALUES(92,49); +INSERT INTO product_slots VALUES(92,50); +INSERT INTO product_slots VALUES(92,51); +INSERT INTO product_slots VALUES(92,52); +INSERT INTO product_slots VALUES(92,53); +INSERT INTO product_slots VALUES(92,54); +INSERT INTO product_slots VALUES(92,55); +INSERT INTO product_slots VALUES(92,56); +INSERT INTO product_slots VALUES(92,57); +INSERT INTO product_slots VALUES(92,58); +INSERT INTO product_slots VALUES(92,59); +INSERT INTO product_slots VALUES(92,60); +INSERT INTO product_slots VALUES(92,61); +INSERT INTO product_slots VALUES(92,62); +INSERT INTO product_slots VALUES(92,63); +INSERT INTO product_slots VALUES(92,64); +INSERT INTO product_slots VALUES(92,65); +INSERT INTO product_slots VALUES(92,66); +INSERT INTO product_slots VALUES(92,67); +INSERT INTO product_slots VALUES(92,68); +INSERT INTO product_slots VALUES(92,69); +INSERT INTO product_slots VALUES(92,70); +INSERT INTO product_slots VALUES(92,71); +INSERT INTO product_slots VALUES(92,72); +INSERT INTO product_slots VALUES(92,73); +INSERT INTO product_slots VALUES(92,74); +INSERT INTO product_slots VALUES(92,75); +INSERT INTO product_slots VALUES(92,76); +INSERT INTO product_slots VALUES(92,77); +INSERT INTO product_slots VALUES(92,78); +INSERT INTO product_slots VALUES(92,79); +INSERT INTO product_slots VALUES(92,80); +INSERT INTO product_slots VALUES(92,81); +INSERT INTO product_slots VALUES(92,82); +INSERT INTO product_slots VALUES(92,83); +INSERT INTO product_slots VALUES(92,84); +INSERT INTO product_slots VALUES(92,85); +INSERT INTO product_slots VALUES(92,86); +INSERT INTO product_slots VALUES(92,87); +INSERT INTO product_slots VALUES(92,88); +INSERT INTO product_slots VALUES(92,89); +INSERT INTO product_slots VALUES(92,90); +INSERT INTO product_slots VALUES(92,91); +INSERT INTO product_slots VALUES(92,92); +INSERT INTO product_slots VALUES(92,93); +INSERT INTO product_slots VALUES(92,94); +INSERT INTO product_slots VALUES(92,95); +INSERT INTO product_slots VALUES(92,96); +INSERT INTO product_slots VALUES(92,97); +INSERT INTO product_slots VALUES(92,98); +INSERT INTO product_slots VALUES(92,99); +INSERT INTO product_slots VALUES(92,100); +INSERT INTO product_slots VALUES(92,101); +INSERT INTO product_slots VALUES(92,102); +INSERT INTO product_slots VALUES(92,103); +INSERT INTO product_slots VALUES(92,104); +INSERT INTO product_slots VALUES(92,105); +INSERT INTO product_slots VALUES(92,106); +INSERT INTO product_slots VALUES(92,107); +INSERT INTO product_slots VALUES(92,108); +INSERT INTO product_slots VALUES(92,109); +INSERT INTO product_slots VALUES(92,110); +INSERT INTO product_slots VALUES(92,111); +INSERT INTO product_slots VALUES(92,112); +INSERT INTO product_slots VALUES(92,113); +INSERT INTO product_slots VALUES(92,114); +INSERT INTO product_slots VALUES(92,115); +INSERT INTO product_slots VALUES(92,116); +INSERT INTO product_slots VALUES(92,117); +INSERT INTO product_slots VALUES(92,118); +INSERT INTO product_slots VALUES(92,119); +INSERT INTO product_slots VALUES(92,120); +INSERT INTO product_slots VALUES(92,121); +INSERT INTO product_slots VALUES(92,122); +INSERT INTO product_slots VALUES(92,123); +INSERT INTO product_slots VALUES(92,124); +INSERT INTO product_slots VALUES(92,125); +INSERT INTO product_slots VALUES(92,126); +INSERT INTO product_slots VALUES(92,127); +INSERT INTO product_slots VALUES(92,128); +INSERT INTO product_slots VALUES(92,129); +INSERT INTO product_slots VALUES(92,130); +INSERT INTO product_slots VALUES(92,131); +INSERT INTO product_slots VALUES(92,132); +INSERT INTO product_slots VALUES(92,133); +INSERT INTO product_slots VALUES(92,134); +INSERT INTO product_slots VALUES(92,135); +INSERT INTO product_slots VALUES(92,136); +INSERT INTO product_slots VALUES(92,137); +INSERT INTO product_slots VALUES(92,138); +INSERT INTO product_slots VALUES(92,139); +INSERT INTO product_slots VALUES(92,140); +INSERT INTO product_slots VALUES(92,141); +INSERT INTO product_slots VALUES(92,142); +INSERT INTO product_slots VALUES(92,143); +INSERT INTO product_slots VALUES(92,144); +INSERT INTO product_slots VALUES(92,145); +INSERT INTO product_slots VALUES(92,146); +INSERT INTO product_slots VALUES(92,147); +INSERT INTO product_slots VALUES(92,148); +INSERT INTO product_slots VALUES(92,149); +INSERT INTO product_slots VALUES(92,150); +INSERT INTO product_slots VALUES(92,151); +INSERT INTO product_slots VALUES(92,152); +INSERT INTO product_slots VALUES(92,153); +INSERT INTO product_slots VALUES(92,154); +INSERT INTO product_slots VALUES(92,155); +INSERT INTO product_slots VALUES(92,156); +INSERT INTO product_slots VALUES(92,157); +INSERT INTO product_slots VALUES(92,158); +INSERT INTO product_slots VALUES(92,159); +INSERT INTO product_slots VALUES(92,160); +INSERT INTO product_slots VALUES(92,161); +INSERT INTO product_slots VALUES(92,162); +INSERT INTO product_slots VALUES(92,163); +INSERT INTO product_slots VALUES(92,164); +INSERT INTO product_slots VALUES(92,165); +INSERT INTO product_slots VALUES(92,166); +INSERT INTO product_slots VALUES(92,167); +INSERT INTO product_slots VALUES(92,168); +INSERT INTO product_slots VALUES(92,169); +INSERT INTO product_slots VALUES(92,170); +INSERT INTO product_slots VALUES(92,171); +INSERT INTO product_slots VALUES(92,172); +INSERT INTO product_slots VALUES(92,173); +INSERT INTO product_slots VALUES(92,174); +INSERT INTO product_slots VALUES(92,175); +INSERT INTO product_slots VALUES(92,176); +INSERT INTO product_slots VALUES(92,177); +INSERT INTO product_slots VALUES(92,178); +INSERT INTO product_slots VALUES(92,179); +INSERT INTO product_slots VALUES(92,180); +INSERT INTO product_slots VALUES(92,181); +INSERT INTO product_slots VALUES(92,182); +INSERT INTO product_slots VALUES(92,183); +INSERT INTO product_slots VALUES(92,184); +INSERT INTO product_slots VALUES(92,185); +INSERT INTO product_slots VALUES(92,186); +INSERT INTO product_slots VALUES(92,187); +INSERT INTO product_slots VALUES(92,188); +INSERT INTO product_slots VALUES(92,189); +INSERT INTO product_slots VALUES(92,190); +INSERT INTO product_slots VALUES(92,191); +INSERT INTO product_slots VALUES(92,192); +INSERT INTO product_slots VALUES(92,193); +INSERT INTO product_slots VALUES(92,194); +INSERT INTO product_slots VALUES(92,195); +INSERT INTO product_slots VALUES(92,196); +INSERT INTO product_slots VALUES(92,197); +INSERT INTO product_slots VALUES(92,198); +INSERT INTO product_slots VALUES(92,199); +INSERT INTO product_slots VALUES(92,200); +INSERT INTO product_slots VALUES(92,201); +INSERT INTO product_slots VALUES(92,202); +INSERT INTO product_slots VALUES(92,203); +INSERT INTO product_slots VALUES(92,204); +INSERT INTO product_slots VALUES(92,205); +INSERT INTO product_slots VALUES(92,206); +INSERT INTO product_slots VALUES(92,207); +INSERT INTO product_slots VALUES(92,208); +INSERT INTO product_slots VALUES(92,209); +INSERT INTO product_slots VALUES(92,210); +INSERT INTO product_slots VALUES(92,211); +INSERT INTO product_slots VALUES(92,212); +INSERT INTO product_slots VALUES(92,213); +INSERT INTO product_slots VALUES(92,214); +INSERT INTO product_slots VALUES(92,215); +INSERT INTO product_slots VALUES(92,216); +INSERT INTO product_slots VALUES(92,217); +INSERT INTO product_slots VALUES(92,218); +INSERT INTO product_slots VALUES(92,219); +INSERT INTO product_slots VALUES(92,220); +INSERT INTO product_slots VALUES(92,221); +INSERT INTO product_slots VALUES(92,222); +INSERT INTO product_slots VALUES(92,223); +INSERT INTO product_slots VALUES(92,224); +INSERT INTO product_slots VALUES(92,225); +INSERT INTO product_slots VALUES(92,226); +INSERT INTO product_slots VALUES(92,227); +INSERT INTO product_slots VALUES(92,228); +INSERT INTO product_slots VALUES(92,229); +INSERT INTO product_slots VALUES(92,230); +INSERT INTO product_slots VALUES(92,231); +INSERT INTO product_slots VALUES(92,232); +INSERT INTO product_slots VALUES(92,233); +INSERT INTO product_slots VALUES(92,234); +INSERT INTO product_slots VALUES(92,235); +INSERT INTO product_slots VALUES(92,236); +INSERT INTO product_slots VALUES(92,237); +INSERT INTO product_slots VALUES(92,238); +INSERT INTO product_slots VALUES(92,239); +INSERT INTO product_slots VALUES(92,240); +INSERT INTO product_slots VALUES(92,241); +INSERT INTO product_slots VALUES(92,242); +INSERT INTO product_slots VALUES(92,243); +INSERT INTO product_slots VALUES(92,244); +INSERT INTO product_slots VALUES(92,274); +INSERT INTO product_slots VALUES(92,275); +INSERT INTO product_slots VALUES(92,279); +INSERT INTO product_slots VALUES(92,280); +INSERT INTO product_slots VALUES(92,281); +INSERT INTO product_slots VALUES(92,282); +INSERT INTO product_slots VALUES(92,283); +INSERT INTO product_slots VALUES(92,284); +INSERT INTO product_slots VALUES(92,285); +INSERT INTO product_slots VALUES(92,286); +INSERT INTO product_slots VALUES(92,287); +INSERT INTO product_slots VALUES(93,59); +INSERT INTO product_slots VALUES(93,62); +INSERT INTO product_slots VALUES(93,63); +INSERT INTO product_slots VALUES(93,64); +INSERT INTO product_slots VALUES(93,65); +INSERT INTO product_slots VALUES(93,66); +INSERT INTO product_slots VALUES(93,67); +INSERT INTO product_slots VALUES(94,39); +INSERT INTO product_slots VALUES(94,62); +INSERT INTO product_slots VALUES(94,63); +INSERT INTO product_slots VALUES(94,64); +INSERT INTO product_slots VALUES(94,65); +INSERT INTO product_slots VALUES(94,66); +INSERT INTO product_slots VALUES(94,67); +INSERT INTO product_slots VALUES(94,68); +INSERT INTO product_slots VALUES(94,69); +INSERT INTO product_slots VALUES(94,70); +INSERT INTO product_slots VALUES(94,71); +INSERT INTO product_slots VALUES(94,72); +INSERT INTO product_slots VALUES(94,73); +INSERT INTO product_slots VALUES(94,74); +INSERT INTO product_slots VALUES(94,75); +INSERT INTO product_slots VALUES(94,76); +INSERT INTO product_slots VALUES(94,77); +INSERT INTO product_slots VALUES(94,78); +INSERT INTO product_slots VALUES(94,79); +INSERT INTO product_slots VALUES(94,80); +INSERT INTO product_slots VALUES(94,81); +INSERT INTO product_slots VALUES(94,82); +INSERT INTO product_slots VALUES(94,83); +INSERT INTO product_slots VALUES(94,84); +INSERT INTO product_slots VALUES(94,85); +INSERT INTO product_slots VALUES(94,86); +INSERT INTO product_slots VALUES(94,87); +INSERT INTO product_slots VALUES(94,88); +INSERT INTO product_slots VALUES(94,89); +INSERT INTO product_slots VALUES(94,90); +INSERT INTO product_slots VALUES(94,91); +INSERT INTO product_slots VALUES(94,92); +INSERT INTO product_slots VALUES(94,93); +INSERT INTO product_slots VALUES(94,94); +INSERT INTO product_slots VALUES(94,95); +INSERT INTO product_slots VALUES(94,96); +INSERT INTO product_slots VALUES(94,97); +INSERT INTO product_slots VALUES(94,98); +INSERT INTO product_slots VALUES(94,99); +INSERT INTO product_slots VALUES(94,100); +INSERT INTO product_slots VALUES(94,101); +INSERT INTO product_slots VALUES(94,102); +INSERT INTO product_slots VALUES(94,103); +INSERT INTO product_slots VALUES(94,104); +INSERT INTO product_slots VALUES(94,105); +INSERT INTO product_slots VALUES(94,106); +INSERT INTO product_slots VALUES(94,107); +INSERT INTO product_slots VALUES(94,108); +INSERT INTO product_slots VALUES(94,109); +INSERT INTO product_slots VALUES(94,110); +INSERT INTO product_slots VALUES(94,111); +INSERT INTO product_slots VALUES(94,112); +INSERT INTO product_slots VALUES(94,113); +INSERT INTO product_slots VALUES(94,114); +INSERT INTO product_slots VALUES(94,115); +INSERT INTO product_slots VALUES(94,116); +INSERT INTO product_slots VALUES(94,117); +INSERT INTO product_slots VALUES(94,118); +INSERT INTO product_slots VALUES(94,119); +INSERT INTO product_slots VALUES(94,120); +INSERT INTO product_slots VALUES(94,121); +INSERT INTO product_slots VALUES(94,122); +INSERT INTO product_slots VALUES(94,123); +INSERT INTO product_slots VALUES(94,124); +INSERT INTO product_slots VALUES(94,125); +INSERT INTO product_slots VALUES(94,126); +INSERT INTO product_slots VALUES(94,127); +INSERT INTO product_slots VALUES(94,128); +INSERT INTO product_slots VALUES(94,129); +INSERT INTO product_slots VALUES(94,130); +INSERT INTO product_slots VALUES(94,131); +INSERT INTO product_slots VALUES(94,132); +INSERT INTO product_slots VALUES(94,133); +INSERT INTO product_slots VALUES(94,134); +INSERT INTO product_slots VALUES(94,135); +INSERT INTO product_slots VALUES(94,136); +INSERT INTO product_slots VALUES(94,137); +INSERT INTO product_slots VALUES(94,138); +INSERT INTO product_slots VALUES(94,139); +INSERT INTO product_slots VALUES(94,140); +INSERT INTO product_slots VALUES(94,141); +INSERT INTO product_slots VALUES(94,142); +INSERT INTO product_slots VALUES(94,143); +INSERT INTO product_slots VALUES(94,144); +INSERT INTO product_slots VALUES(94,145); +INSERT INTO product_slots VALUES(94,146); +INSERT INTO product_slots VALUES(94,147); +INSERT INTO product_slots VALUES(94,148); +INSERT INTO product_slots VALUES(94,149); +INSERT INTO product_slots VALUES(94,150); +INSERT INTO product_slots VALUES(94,151); +INSERT INTO product_slots VALUES(94,152); +INSERT INTO product_slots VALUES(94,153); +INSERT INTO product_slots VALUES(94,154); +INSERT INTO product_slots VALUES(94,155); +INSERT INTO product_slots VALUES(94,156); +INSERT INTO product_slots VALUES(94,157); +INSERT INTO product_slots VALUES(94,158); +INSERT INTO product_slots VALUES(94,159); +INSERT INTO product_slots VALUES(94,160); +INSERT INTO product_slots VALUES(94,161); +INSERT INTO product_slots VALUES(94,162); +INSERT INTO product_slots VALUES(94,163); +INSERT INTO product_slots VALUES(94,164); +INSERT INTO product_slots VALUES(94,165); +INSERT INTO product_slots VALUES(94,166); +INSERT INTO product_slots VALUES(94,167); +INSERT INTO product_slots VALUES(94,168); +INSERT INTO product_slots VALUES(94,169); +INSERT INTO product_slots VALUES(94,170); +INSERT INTO product_slots VALUES(94,171); +INSERT INTO product_slots VALUES(94,172); +INSERT INTO product_slots VALUES(94,173); +INSERT INTO product_slots VALUES(94,174); +INSERT INTO product_slots VALUES(94,175); +INSERT INTO product_slots VALUES(94,176); +INSERT INTO product_slots VALUES(94,177); +INSERT INTO product_slots VALUES(94,178); +INSERT INTO product_slots VALUES(94,179); +INSERT INTO product_slots VALUES(94,180); +INSERT INTO product_slots VALUES(94,181); +INSERT INTO product_slots VALUES(94,182); +INSERT INTO product_slots VALUES(94,183); +INSERT INTO product_slots VALUES(94,184); +INSERT INTO product_slots VALUES(94,185); +INSERT INTO product_slots VALUES(94,186); +INSERT INTO product_slots VALUES(94,187); +INSERT INTO product_slots VALUES(94,188); +INSERT INTO product_slots VALUES(94,189); +INSERT INTO product_slots VALUES(94,190); +INSERT INTO product_slots VALUES(94,191); +INSERT INTO product_slots VALUES(94,192); +INSERT INTO product_slots VALUES(94,193); +INSERT INTO product_slots VALUES(94,194); +INSERT INTO product_slots VALUES(94,195); +INSERT INTO product_slots VALUES(94,196); +INSERT INTO product_slots VALUES(94,197); +INSERT INTO product_slots VALUES(94,198); +INSERT INTO product_slots VALUES(94,199); +INSERT INTO product_slots VALUES(94,200); +INSERT INTO product_slots VALUES(94,201); +INSERT INTO product_slots VALUES(94,202); +INSERT INTO product_slots VALUES(94,203); +INSERT INTO product_slots VALUES(94,204); +INSERT INTO product_slots VALUES(94,205); +INSERT INTO product_slots VALUES(94,206); +INSERT INTO product_slots VALUES(94,207); +INSERT INTO product_slots VALUES(94,208); +INSERT INTO product_slots VALUES(94,209); +INSERT INTO product_slots VALUES(94,210); +INSERT INTO product_slots VALUES(94,211); +INSERT INTO product_slots VALUES(94,212); +INSERT INTO product_slots VALUES(94,213); +INSERT INTO product_slots VALUES(94,214); +INSERT INTO product_slots VALUES(94,215); +INSERT INTO product_slots VALUES(94,216); +INSERT INTO product_slots VALUES(94,217); +INSERT INTO product_slots VALUES(94,218); +INSERT INTO product_slots VALUES(94,219); +INSERT INTO product_slots VALUES(94,220); +INSERT INTO product_slots VALUES(94,221); +INSERT INTO product_slots VALUES(94,222); +INSERT INTO product_slots VALUES(94,223); +INSERT INTO product_slots VALUES(94,224); +INSERT INTO product_slots VALUES(94,225); +INSERT INTO product_slots VALUES(94,226); +INSERT INTO product_slots VALUES(94,227); +INSERT INTO product_slots VALUES(94,228); +INSERT INTO product_slots VALUES(94,229); +INSERT INTO product_slots VALUES(94,230); +INSERT INTO product_slots VALUES(94,231); +INSERT INTO product_slots VALUES(94,232); +INSERT INTO product_slots VALUES(94,233); +INSERT INTO product_slots VALUES(94,234); +INSERT INTO product_slots VALUES(94,235); +INSERT INTO product_slots VALUES(94,236); +INSERT INTO product_slots VALUES(94,237); +INSERT INTO product_slots VALUES(94,238); +INSERT INTO product_slots VALUES(94,239); +INSERT INTO product_slots VALUES(94,240); +INSERT INTO product_slots VALUES(94,241); +INSERT INTO product_slots VALUES(94,242); +INSERT INTO product_slots VALUES(94,243); +INSERT INTO product_slots VALUES(94,244); +INSERT INTO product_slots VALUES(94,274); +INSERT INTO product_slots VALUES(94,275); +INSERT INTO product_slots VALUES(94,279); +INSERT INTO product_slots VALUES(94,280); +INSERT INTO product_slots VALUES(94,281); +INSERT INTO product_slots VALUES(94,282); +INSERT INTO product_slots VALUES(94,283); +INSERT INTO product_slots VALUES(94,284); +INSERT INTO product_slots VALUES(94,285); +INSERT INTO product_slots VALUES(94,286); +INSERT INTO product_slots VALUES(94,287); +INSERT INTO product_slots VALUES(95,39); +INSERT INTO product_slots VALUES(95,55); +INSERT INTO product_slots VALUES(95,59); +INSERT INTO product_slots VALUES(95,62); +INSERT INTO product_slots VALUES(95,63); +INSERT INTO product_slots VALUES(95,64); +INSERT INTO product_slots VALUES(95,65); +INSERT INTO product_slots VALUES(95,66); +INSERT INTO product_slots VALUES(95,67); +INSERT INTO product_slots VALUES(95,68); +INSERT INTO product_slots VALUES(95,69); +INSERT INTO product_slots VALUES(95,70); +INSERT INTO product_slots VALUES(95,71); +INSERT INTO product_slots VALUES(95,72); +INSERT INTO product_slots VALUES(95,73); +INSERT INTO product_slots VALUES(95,74); +INSERT INTO product_slots VALUES(95,75); +INSERT INTO product_slots VALUES(95,76); +INSERT INTO product_slots VALUES(95,77); +INSERT INTO product_slots VALUES(95,78); +INSERT INTO product_slots VALUES(95,79); +INSERT INTO product_slots VALUES(95,80); +INSERT INTO product_slots VALUES(95,81); +INSERT INTO product_slots VALUES(95,82); +INSERT INTO product_slots VALUES(95,83); +INSERT INTO product_slots VALUES(95,84); +INSERT INTO product_slots VALUES(95,85); +INSERT INTO product_slots VALUES(95,86); +INSERT INTO product_slots VALUES(95,87); +INSERT INTO product_slots VALUES(95,88); +INSERT INTO product_slots VALUES(95,89); +INSERT INTO product_slots VALUES(95,90); +INSERT INTO product_slots VALUES(95,91); +INSERT INTO product_slots VALUES(95,92); +INSERT INTO product_slots VALUES(95,93); +INSERT INTO product_slots VALUES(95,94); +INSERT INTO product_slots VALUES(95,95); +INSERT INTO product_slots VALUES(95,96); +INSERT INTO product_slots VALUES(95,97); +INSERT INTO product_slots VALUES(95,98); +INSERT INTO product_slots VALUES(95,99); +INSERT INTO product_slots VALUES(95,100); +INSERT INTO product_slots VALUES(95,101); +INSERT INTO product_slots VALUES(95,102); +INSERT INTO product_slots VALUES(95,103); +INSERT INTO product_slots VALUES(95,104); +INSERT INTO product_slots VALUES(95,105); +INSERT INTO product_slots VALUES(95,106); +INSERT INTO product_slots VALUES(95,107); +INSERT INTO product_slots VALUES(95,108); +INSERT INTO product_slots VALUES(95,109); +INSERT INTO product_slots VALUES(95,110); +INSERT INTO product_slots VALUES(95,111); +INSERT INTO product_slots VALUES(95,112); +INSERT INTO product_slots VALUES(95,113); +INSERT INTO product_slots VALUES(95,114); +INSERT INTO product_slots VALUES(95,115); +INSERT INTO product_slots VALUES(95,116); +INSERT INTO product_slots VALUES(95,117); +INSERT INTO product_slots VALUES(95,118); +INSERT INTO product_slots VALUES(95,119); +INSERT INTO product_slots VALUES(95,120); +INSERT INTO product_slots VALUES(95,121); +INSERT INTO product_slots VALUES(95,122); +INSERT INTO product_slots VALUES(95,123); +INSERT INTO product_slots VALUES(95,124); +INSERT INTO product_slots VALUES(95,125); +INSERT INTO product_slots VALUES(95,126); +INSERT INTO product_slots VALUES(95,127); +INSERT INTO product_slots VALUES(95,128); +INSERT INTO product_slots VALUES(95,129); +INSERT INTO product_slots VALUES(95,130); +INSERT INTO product_slots VALUES(95,131); +INSERT INTO product_slots VALUES(95,132); +INSERT INTO product_slots VALUES(95,133); +INSERT INTO product_slots VALUES(95,134); +INSERT INTO product_slots VALUES(95,135); +INSERT INTO product_slots VALUES(95,136); +INSERT INTO product_slots VALUES(95,137); +INSERT INTO product_slots VALUES(95,138); +INSERT INTO product_slots VALUES(95,139); +INSERT INTO product_slots VALUES(95,140); +INSERT INTO product_slots VALUES(95,141); +INSERT INTO product_slots VALUES(95,142); +INSERT INTO product_slots VALUES(95,143); +INSERT INTO product_slots VALUES(95,144); +INSERT INTO product_slots VALUES(95,145); +INSERT INTO product_slots VALUES(95,146); +INSERT INTO product_slots VALUES(95,147); +INSERT INTO product_slots VALUES(95,148); +INSERT INTO product_slots VALUES(95,149); +INSERT INTO product_slots VALUES(95,150); +INSERT INTO product_slots VALUES(95,151); +INSERT INTO product_slots VALUES(95,152); +INSERT INTO product_slots VALUES(95,153); +INSERT INTO product_slots VALUES(95,154); +INSERT INTO product_slots VALUES(95,155); +INSERT INTO product_slots VALUES(95,156); +INSERT INTO product_slots VALUES(95,157); +INSERT INTO product_slots VALUES(95,158); +INSERT INTO product_slots VALUES(95,159); +INSERT INTO product_slots VALUES(95,160); +INSERT INTO product_slots VALUES(95,161); +INSERT INTO product_slots VALUES(95,162); +INSERT INTO product_slots VALUES(95,163); +INSERT INTO product_slots VALUES(95,164); +INSERT INTO product_slots VALUES(95,165); +INSERT INTO product_slots VALUES(95,166); +INSERT INTO product_slots VALUES(95,167); +INSERT INTO product_slots VALUES(95,168); +INSERT INTO product_slots VALUES(95,169); +INSERT INTO product_slots VALUES(95,170); +INSERT INTO product_slots VALUES(95,171); +INSERT INTO product_slots VALUES(95,172); +INSERT INTO product_slots VALUES(95,173); +INSERT INTO product_slots VALUES(95,174); +INSERT INTO product_slots VALUES(95,175); +INSERT INTO product_slots VALUES(95,176); +INSERT INTO product_slots VALUES(95,177); +INSERT INTO product_slots VALUES(95,178); +INSERT INTO product_slots VALUES(95,179); +INSERT INTO product_slots VALUES(95,180); +INSERT INTO product_slots VALUES(95,181); +INSERT INTO product_slots VALUES(95,182); +INSERT INTO product_slots VALUES(95,183); +INSERT INTO product_slots VALUES(95,184); +INSERT INTO product_slots VALUES(95,185); +INSERT INTO product_slots VALUES(95,186); +INSERT INTO product_slots VALUES(95,187); +INSERT INTO product_slots VALUES(95,188); +INSERT INTO product_slots VALUES(95,189); +INSERT INTO product_slots VALUES(95,190); +INSERT INTO product_slots VALUES(95,191); +INSERT INTO product_slots VALUES(95,192); +INSERT INTO product_slots VALUES(95,193); +INSERT INTO product_slots VALUES(95,194); +INSERT INTO product_slots VALUES(95,195); +INSERT INTO product_slots VALUES(95,196); +INSERT INTO product_slots VALUES(95,197); +INSERT INTO product_slots VALUES(95,198); +INSERT INTO product_slots VALUES(95,199); +INSERT INTO product_slots VALUES(95,200); +INSERT INTO product_slots VALUES(95,201); +INSERT INTO product_slots VALUES(95,202); +INSERT INTO product_slots VALUES(95,203); +INSERT INTO product_slots VALUES(95,204); +INSERT INTO product_slots VALUES(95,205); +INSERT INTO product_slots VALUES(95,206); +INSERT INTO product_slots VALUES(95,207); +INSERT INTO product_slots VALUES(95,208); +INSERT INTO product_slots VALUES(95,209); +INSERT INTO product_slots VALUES(95,210); +INSERT INTO product_slots VALUES(95,211); +INSERT INTO product_slots VALUES(95,212); +INSERT INTO product_slots VALUES(95,213); +INSERT INTO product_slots VALUES(95,214); +INSERT INTO product_slots VALUES(95,215); +INSERT INTO product_slots VALUES(95,216); +INSERT INTO product_slots VALUES(95,217); +INSERT INTO product_slots VALUES(95,218); +INSERT INTO product_slots VALUES(95,219); +INSERT INTO product_slots VALUES(95,220); +INSERT INTO product_slots VALUES(95,221); +INSERT INTO product_slots VALUES(95,222); +INSERT INTO product_slots VALUES(95,223); +INSERT INTO product_slots VALUES(95,224); +INSERT INTO product_slots VALUES(95,225); +INSERT INTO product_slots VALUES(95,226); +INSERT INTO product_slots VALUES(95,227); +INSERT INTO product_slots VALUES(95,228); +INSERT INTO product_slots VALUES(95,229); +INSERT INTO product_slots VALUES(95,230); +INSERT INTO product_slots VALUES(95,231); +INSERT INTO product_slots VALUES(95,232); +INSERT INTO product_slots VALUES(95,233); +INSERT INTO product_slots VALUES(95,234); +INSERT INTO product_slots VALUES(95,235); +INSERT INTO product_slots VALUES(95,236); +INSERT INTO product_slots VALUES(95,237); +INSERT INTO product_slots VALUES(95,238); +INSERT INTO product_slots VALUES(95,239); +INSERT INTO product_slots VALUES(95,240); +INSERT INTO product_slots VALUES(95,241); +INSERT INTO product_slots VALUES(95,242); +INSERT INTO product_slots VALUES(95,243); +INSERT INTO product_slots VALUES(95,244); +INSERT INTO product_slots VALUES(95,274); +INSERT INTO product_slots VALUES(95,275); +INSERT INTO product_slots VALUES(95,279); +INSERT INTO product_slots VALUES(95,280); +INSERT INTO product_slots VALUES(95,281); +INSERT INTO product_slots VALUES(95,282); +INSERT INTO product_slots VALUES(95,283); +INSERT INTO product_slots VALUES(95,284); +INSERT INTO product_slots VALUES(95,285); +INSERT INTO product_slots VALUES(95,286); +INSERT INTO product_slots VALUES(95,287); +INSERT INTO product_slots VALUES(96,59); +INSERT INTO product_slots VALUES(96,62); +INSERT INTO product_slots VALUES(96,63); +INSERT INTO product_slots VALUES(96,64); +INSERT INTO product_slots VALUES(96,65); +INSERT INTO product_slots VALUES(96,66); +INSERT INTO product_slots VALUES(96,67); +INSERT INTO product_slots VALUES(96,68); +INSERT INTO product_slots VALUES(96,69); +INSERT INTO product_slots VALUES(96,70); +INSERT INTO product_slots VALUES(96,71); +INSERT INTO product_slots VALUES(96,72); +INSERT INTO product_slots VALUES(96,73); +INSERT INTO product_slots VALUES(96,74); +INSERT INTO product_slots VALUES(96,75); +INSERT INTO product_slots VALUES(96,76); +INSERT INTO product_slots VALUES(96,77); +INSERT INTO product_slots VALUES(96,78); +INSERT INTO product_slots VALUES(96,79); +INSERT INTO product_slots VALUES(96,80); +INSERT INTO product_slots VALUES(96,81); +INSERT INTO product_slots VALUES(96,82); +INSERT INTO product_slots VALUES(96,83); +INSERT INTO product_slots VALUES(96,84); +INSERT INTO product_slots VALUES(96,85); +INSERT INTO product_slots VALUES(96,86); +INSERT INTO product_slots VALUES(96,87); +INSERT INTO product_slots VALUES(96,88); +INSERT INTO product_slots VALUES(96,89); +INSERT INTO product_slots VALUES(96,90); +INSERT INTO product_slots VALUES(96,91); +INSERT INTO product_slots VALUES(96,92); +INSERT INTO product_slots VALUES(96,93); +INSERT INTO product_slots VALUES(96,94); +INSERT INTO product_slots VALUES(96,95); +INSERT INTO product_slots VALUES(96,96); +INSERT INTO product_slots VALUES(96,97); +INSERT INTO product_slots VALUES(96,98); +INSERT INTO product_slots VALUES(96,99); +INSERT INTO product_slots VALUES(96,100); +INSERT INTO product_slots VALUES(96,102); +INSERT INTO product_slots VALUES(96,103); +INSERT INTO product_slots VALUES(96,104); +INSERT INTO product_slots VALUES(96,105); +INSERT INTO product_slots VALUES(96,106); +INSERT INTO product_slots VALUES(96,107); +INSERT INTO product_slots VALUES(96,108); +INSERT INTO product_slots VALUES(96,109); +INSERT INTO product_slots VALUES(96,110); +INSERT INTO product_slots VALUES(96,111); +INSERT INTO product_slots VALUES(96,112); +INSERT INTO product_slots VALUES(96,113); +INSERT INTO product_slots VALUES(96,114); +INSERT INTO product_slots VALUES(96,115); +INSERT INTO product_slots VALUES(96,117); +INSERT INTO product_slots VALUES(96,118); +INSERT INTO product_slots VALUES(96,119); +INSERT INTO product_slots VALUES(96,120); +INSERT INTO product_slots VALUES(96,121); +INSERT INTO product_slots VALUES(96,122); +INSERT INTO product_slots VALUES(96,124); +INSERT INTO product_slots VALUES(96,125); +INSERT INTO product_slots VALUES(96,126); +INSERT INTO product_slots VALUES(96,127); +INSERT INTO product_slots VALUES(96,128); +INSERT INTO product_slots VALUES(96,129); +INSERT INTO product_slots VALUES(96,130); +INSERT INTO product_slots VALUES(96,131); +INSERT INTO product_slots VALUES(96,132); +INSERT INTO product_slots VALUES(96,133); +INSERT INTO product_slots VALUES(96,134); +INSERT INTO product_slots VALUES(96,135); +INSERT INTO product_slots VALUES(96,136); +INSERT INTO product_slots VALUES(96,138); +INSERT INTO product_slots VALUES(96,139); +INSERT INTO product_slots VALUES(96,140); +INSERT INTO product_slots VALUES(96,141); +INSERT INTO product_slots VALUES(96,142); +INSERT INTO product_slots VALUES(96,143); +INSERT INTO product_slots VALUES(96,145); +INSERT INTO product_slots VALUES(96,146); +INSERT INTO product_slots VALUES(96,147); +INSERT INTO product_slots VALUES(96,148); +INSERT INTO product_slots VALUES(96,149); +INSERT INTO product_slots VALUES(96,150); +INSERT INTO product_slots VALUES(96,151); +INSERT INTO product_slots VALUES(96,152); +INSERT INTO product_slots VALUES(96,153); +INSERT INTO product_slots VALUES(96,154); +INSERT INTO product_slots VALUES(96,155); +INSERT INTO product_slots VALUES(96,156); +INSERT INTO product_slots VALUES(96,157); +INSERT INTO product_slots VALUES(96,158); +INSERT INTO product_slots VALUES(96,159); +INSERT INTO product_slots VALUES(96,160); +INSERT INTO product_slots VALUES(96,161); +INSERT INTO product_slots VALUES(96,162); +INSERT INTO product_slots VALUES(96,163); +INSERT INTO product_slots VALUES(96,164); +INSERT INTO product_slots VALUES(96,165); +INSERT INTO product_slots VALUES(96,166); +INSERT INTO product_slots VALUES(96,167); +INSERT INTO product_slots VALUES(96,168); +INSERT INTO product_slots VALUES(96,169); +INSERT INTO product_slots VALUES(96,170); +INSERT INTO product_slots VALUES(96,171); +INSERT INTO product_slots VALUES(96,172); +INSERT INTO product_slots VALUES(96,173); +INSERT INTO product_slots VALUES(96,174); +INSERT INTO product_slots VALUES(96,175); +INSERT INTO product_slots VALUES(96,176); +INSERT INTO product_slots VALUES(96,177); +INSERT INTO product_slots VALUES(96,178); +INSERT INTO product_slots VALUES(96,179); +INSERT INTO product_slots VALUES(96,180); +INSERT INTO product_slots VALUES(96,181); +INSERT INTO product_slots VALUES(96,182); +INSERT INTO product_slots VALUES(96,183); +INSERT INTO product_slots VALUES(96,184); +INSERT INTO product_slots VALUES(96,185); +INSERT INTO product_slots VALUES(96,186); +INSERT INTO product_slots VALUES(96,187); +INSERT INTO product_slots VALUES(96,188); +INSERT INTO product_slots VALUES(96,189); +INSERT INTO product_slots VALUES(96,190); +INSERT INTO product_slots VALUES(96,191); +INSERT INTO product_slots VALUES(96,192); +INSERT INTO product_slots VALUES(96,193); +INSERT INTO product_slots VALUES(96,194); +INSERT INTO product_slots VALUES(96,195); +INSERT INTO product_slots VALUES(96,196); +INSERT INTO product_slots VALUES(96,197); +INSERT INTO product_slots VALUES(96,198); +INSERT INTO product_slots VALUES(96,199); +INSERT INTO product_slots VALUES(96,200); +INSERT INTO product_slots VALUES(96,201); +INSERT INTO product_slots VALUES(96,202); +INSERT INTO product_slots VALUES(96,203); +INSERT INTO product_slots VALUES(96,204); +INSERT INTO product_slots VALUES(96,205); +INSERT INTO product_slots VALUES(96,206); +INSERT INTO product_slots VALUES(96,207); +INSERT INTO product_slots VALUES(96,208); +INSERT INTO product_slots VALUES(96,209); +INSERT INTO product_slots VALUES(96,210); +INSERT INTO product_slots VALUES(96,211); +INSERT INTO product_slots VALUES(96,212); +INSERT INTO product_slots VALUES(96,213); +INSERT INTO product_slots VALUES(96,214); +INSERT INTO product_slots VALUES(96,215); +INSERT INTO product_slots VALUES(96,216); +INSERT INTO product_slots VALUES(96,217); +INSERT INTO product_slots VALUES(96,218); +INSERT INTO product_slots VALUES(96,219); +INSERT INTO product_slots VALUES(96,220); +INSERT INTO product_slots VALUES(96,221); +INSERT INTO product_slots VALUES(96,222); +INSERT INTO product_slots VALUES(96,223); +INSERT INTO product_slots VALUES(96,224); +INSERT INTO product_slots VALUES(96,225); +INSERT INTO product_slots VALUES(96,226); +INSERT INTO product_slots VALUES(96,227); +INSERT INTO product_slots VALUES(96,228); +INSERT INTO product_slots VALUES(96,229); +INSERT INTO product_slots VALUES(96,230); +INSERT INTO product_slots VALUES(96,231); +INSERT INTO product_slots VALUES(96,232); +INSERT INTO product_slots VALUES(96,233); +INSERT INTO product_slots VALUES(96,234); +INSERT INTO product_slots VALUES(96,235); +INSERT INTO product_slots VALUES(96,236); +INSERT INTO product_slots VALUES(96,237); +INSERT INTO product_slots VALUES(96,238); +INSERT INTO product_slots VALUES(96,239); +INSERT INTO product_slots VALUES(96,240); +INSERT INTO product_slots VALUES(96,241); +INSERT INTO product_slots VALUES(96,242); +INSERT INTO product_slots VALUES(96,243); +INSERT INTO product_slots VALUES(96,244); +INSERT INTO product_slots VALUES(96,274); +INSERT INTO product_slots VALUES(96,275); +INSERT INTO product_slots VALUES(96,279); +INSERT INTO product_slots VALUES(96,280); +INSERT INTO product_slots VALUES(96,281); +INSERT INTO product_slots VALUES(96,282); +INSERT INTO product_slots VALUES(96,283); +INSERT INTO product_slots VALUES(96,284); +INSERT INTO product_slots VALUES(96,285); +INSERT INTO product_slots VALUES(96,286); +INSERT INTO product_slots VALUES(96,287); +INSERT INTO product_slots VALUES(97,39); +INSERT INTO product_slots VALUES(97,55); +INSERT INTO product_slots VALUES(97,59); +INSERT INTO product_slots VALUES(97,62); +INSERT INTO product_slots VALUES(97,63); +INSERT INTO product_slots VALUES(97,64); +INSERT INTO product_slots VALUES(97,65); +INSERT INTO product_slots VALUES(97,66); +INSERT INTO product_slots VALUES(97,67); +INSERT INTO product_slots VALUES(97,68); +INSERT INTO product_slots VALUES(97,69); +INSERT INTO product_slots VALUES(97,70); +INSERT INTO product_slots VALUES(97,71); +INSERT INTO product_slots VALUES(97,72); +INSERT INTO product_slots VALUES(97,73); +INSERT INTO product_slots VALUES(97,74); +INSERT INTO product_slots VALUES(97,75); +INSERT INTO product_slots VALUES(97,76); +INSERT INTO product_slots VALUES(97,77); +INSERT INTO product_slots VALUES(97,78); +INSERT INTO product_slots VALUES(97,79); +INSERT INTO product_slots VALUES(97,80); +INSERT INTO product_slots VALUES(97,81); +INSERT INTO product_slots VALUES(97,82); +INSERT INTO product_slots VALUES(97,83); +INSERT INTO product_slots VALUES(97,84); +INSERT INTO product_slots VALUES(97,85); +INSERT INTO product_slots VALUES(97,86); +INSERT INTO product_slots VALUES(97,87); +INSERT INTO product_slots VALUES(97,88); +INSERT INTO product_slots VALUES(97,89); +INSERT INTO product_slots VALUES(97,90); +INSERT INTO product_slots VALUES(97,91); +INSERT INTO product_slots VALUES(97,92); +INSERT INTO product_slots VALUES(97,93); +INSERT INTO product_slots VALUES(97,94); +INSERT INTO product_slots VALUES(97,95); +INSERT INTO product_slots VALUES(97,96); +INSERT INTO product_slots VALUES(97,97); +INSERT INTO product_slots VALUES(97,98); +INSERT INTO product_slots VALUES(97,99); +INSERT INTO product_slots VALUES(97,100); +INSERT INTO product_slots VALUES(97,101); +INSERT INTO product_slots VALUES(97,102); +INSERT INTO product_slots VALUES(97,103); +INSERT INTO product_slots VALUES(97,104); +INSERT INTO product_slots VALUES(97,105); +INSERT INTO product_slots VALUES(97,106); +INSERT INTO product_slots VALUES(97,107); +INSERT INTO product_slots VALUES(97,108); +INSERT INTO product_slots VALUES(97,109); +INSERT INTO product_slots VALUES(97,110); +INSERT INTO product_slots VALUES(97,111); +INSERT INTO product_slots VALUES(97,112); +INSERT INTO product_slots VALUES(97,113); +INSERT INTO product_slots VALUES(97,114); +INSERT INTO product_slots VALUES(97,115); +INSERT INTO product_slots VALUES(97,116); +INSERT INTO product_slots VALUES(97,117); +INSERT INTO product_slots VALUES(97,118); +INSERT INTO product_slots VALUES(97,119); +INSERT INTO product_slots VALUES(97,120); +INSERT INTO product_slots VALUES(97,121); +INSERT INTO product_slots VALUES(97,122); +INSERT INTO product_slots VALUES(97,123); +INSERT INTO product_slots VALUES(97,124); +INSERT INTO product_slots VALUES(97,125); +INSERT INTO product_slots VALUES(97,126); +INSERT INTO product_slots VALUES(97,127); +INSERT INTO product_slots VALUES(97,128); +INSERT INTO product_slots VALUES(97,129); +INSERT INTO product_slots VALUES(97,130); +INSERT INTO product_slots VALUES(97,131); +INSERT INTO product_slots VALUES(97,132); +INSERT INTO product_slots VALUES(97,133); +INSERT INTO product_slots VALUES(97,134); +INSERT INTO product_slots VALUES(97,135); +INSERT INTO product_slots VALUES(97,136); +INSERT INTO product_slots VALUES(97,137); +INSERT INTO product_slots VALUES(97,138); +INSERT INTO product_slots VALUES(97,139); +INSERT INTO product_slots VALUES(97,140); +INSERT INTO product_slots VALUES(97,141); +INSERT INTO product_slots VALUES(97,142); +INSERT INTO product_slots VALUES(97,143); +INSERT INTO product_slots VALUES(97,144); +INSERT INTO product_slots VALUES(97,145); +INSERT INTO product_slots VALUES(97,146); +INSERT INTO product_slots VALUES(97,147); +INSERT INTO product_slots VALUES(97,148); +INSERT INTO product_slots VALUES(97,149); +INSERT INTO product_slots VALUES(97,150); +INSERT INTO product_slots VALUES(97,151); +INSERT INTO product_slots VALUES(97,152); +INSERT INTO product_slots VALUES(97,153); +INSERT INTO product_slots VALUES(97,154); +INSERT INTO product_slots VALUES(97,155); +INSERT INTO product_slots VALUES(97,156); +INSERT INTO product_slots VALUES(97,157); +INSERT INTO product_slots VALUES(97,158); +INSERT INTO product_slots VALUES(97,159); +INSERT INTO product_slots VALUES(97,160); +INSERT INTO product_slots VALUES(97,161); +INSERT INTO product_slots VALUES(97,162); +INSERT INTO product_slots VALUES(97,163); +INSERT INTO product_slots VALUES(97,164); +INSERT INTO product_slots VALUES(97,165); +INSERT INTO product_slots VALUES(97,166); +INSERT INTO product_slots VALUES(97,167); +INSERT INTO product_slots VALUES(97,168); +INSERT INTO product_slots VALUES(97,169); +INSERT INTO product_slots VALUES(97,170); +INSERT INTO product_slots VALUES(97,171); +INSERT INTO product_slots VALUES(97,172); +INSERT INTO product_slots VALUES(97,173); +INSERT INTO product_slots VALUES(97,174); +INSERT INTO product_slots VALUES(97,175); +INSERT INTO product_slots VALUES(97,176); +INSERT INTO product_slots VALUES(97,177); +INSERT INTO product_slots VALUES(97,178); +INSERT INTO product_slots VALUES(97,179); +INSERT INTO product_slots VALUES(97,180); +INSERT INTO product_slots VALUES(97,181); +INSERT INTO product_slots VALUES(97,182); +INSERT INTO product_slots VALUES(97,183); +INSERT INTO product_slots VALUES(97,184); +INSERT INTO product_slots VALUES(97,185); +INSERT INTO product_slots VALUES(97,186); +INSERT INTO product_slots VALUES(97,187); +INSERT INTO product_slots VALUES(97,188); +INSERT INTO product_slots VALUES(97,189); +INSERT INTO product_slots VALUES(97,190); +INSERT INTO product_slots VALUES(97,191); +INSERT INTO product_slots VALUES(97,192); +INSERT INTO product_slots VALUES(97,193); +INSERT INTO product_slots VALUES(97,194); +INSERT INTO product_slots VALUES(97,195); +INSERT INTO product_slots VALUES(97,196); +INSERT INTO product_slots VALUES(97,197); +INSERT INTO product_slots VALUES(97,198); +INSERT INTO product_slots VALUES(97,199); +INSERT INTO product_slots VALUES(97,200); +INSERT INTO product_slots VALUES(97,201); +INSERT INTO product_slots VALUES(97,202); +INSERT INTO product_slots VALUES(97,203); +INSERT INTO product_slots VALUES(97,204); +INSERT INTO product_slots VALUES(97,205); +INSERT INTO product_slots VALUES(97,206); +INSERT INTO product_slots VALUES(97,207); +INSERT INTO product_slots VALUES(97,208); +INSERT INTO product_slots VALUES(97,209); +INSERT INTO product_slots VALUES(97,210); +INSERT INTO product_slots VALUES(97,211); +INSERT INTO product_slots VALUES(97,212); +INSERT INTO product_slots VALUES(97,213); +INSERT INTO product_slots VALUES(97,214); +INSERT INTO product_slots VALUES(97,215); +INSERT INTO product_slots VALUES(97,216); +INSERT INTO product_slots VALUES(97,217); +INSERT INTO product_slots VALUES(97,218); +INSERT INTO product_slots VALUES(97,219); +INSERT INTO product_slots VALUES(97,220); +INSERT INTO product_slots VALUES(97,221); +INSERT INTO product_slots VALUES(97,222); +INSERT INTO product_slots VALUES(97,223); +INSERT INTO product_slots VALUES(97,224); +INSERT INTO product_slots VALUES(97,225); +INSERT INTO product_slots VALUES(97,226); +INSERT INTO product_slots VALUES(97,227); +INSERT INTO product_slots VALUES(97,228); +INSERT INTO product_slots VALUES(97,229); +INSERT INTO product_slots VALUES(97,230); +INSERT INTO product_slots VALUES(97,231); +INSERT INTO product_slots VALUES(97,232); +INSERT INTO product_slots VALUES(97,233); +INSERT INTO product_slots VALUES(97,234); +INSERT INTO product_slots VALUES(97,235); +INSERT INTO product_slots VALUES(97,236); +INSERT INTO product_slots VALUES(97,237); +INSERT INTO product_slots VALUES(97,238); +INSERT INTO product_slots VALUES(97,239); +INSERT INTO product_slots VALUES(97,240); +INSERT INTO product_slots VALUES(97,241); +INSERT INTO product_slots VALUES(97,242); +INSERT INTO product_slots VALUES(97,243); +INSERT INTO product_slots VALUES(97,244); +INSERT INTO product_slots VALUES(97,274); +INSERT INTO product_slots VALUES(97,275); +INSERT INTO product_slots VALUES(97,279); +INSERT INTO product_slots VALUES(97,280); +INSERT INTO product_slots VALUES(97,281); +INSERT INTO product_slots VALUES(97,282); +INSERT INTO product_slots VALUES(97,283); +INSERT INTO product_slots VALUES(97,284); +INSERT INTO product_slots VALUES(97,285); +INSERT INTO product_slots VALUES(97,286); +INSERT INTO product_slots VALUES(97,287); +INSERT INTO product_slots VALUES(98,81); +INSERT INTO product_slots VALUES(98,82); +INSERT INTO product_slots VALUES(98,83); +INSERT INTO product_slots VALUES(98,87); +INSERT INTO product_slots VALUES(98,89); +INSERT INTO product_slots VALUES(98,90); +INSERT INTO product_slots VALUES(98,91); +INSERT INTO product_slots VALUES(98,92); +INSERT INTO product_slots VALUES(98,93); +INSERT INTO product_slots VALUES(98,94); +INSERT INTO product_slots VALUES(98,96); +INSERT INTO product_slots VALUES(98,97); +INSERT INTO product_slots VALUES(98,98); +INSERT INTO product_slots VALUES(98,99); +INSERT INTO product_slots VALUES(98,100); +INSERT INTO product_slots VALUES(98,102); +INSERT INTO product_slots VALUES(98,103); +INSERT INTO product_slots VALUES(98,104); +INSERT INTO product_slots VALUES(98,105); +INSERT INTO product_slots VALUES(98,106); +INSERT INTO product_slots VALUES(98,107); +INSERT INTO product_slots VALUES(98,108); +INSERT INTO product_slots VALUES(98,109); +INSERT INTO product_slots VALUES(98,110); +INSERT INTO product_slots VALUES(98,111); +INSERT INTO product_slots VALUES(98,112); +INSERT INTO product_slots VALUES(98,113); +INSERT INTO product_slots VALUES(98,114); +INSERT INTO product_slots VALUES(98,115); +INSERT INTO product_slots VALUES(98,117); +INSERT INTO product_slots VALUES(98,118); +INSERT INTO product_slots VALUES(98,119); +INSERT INTO product_slots VALUES(98,120); +INSERT INTO product_slots VALUES(98,123); +INSERT INTO product_slots VALUES(98,124); +INSERT INTO product_slots VALUES(98,125); +INSERT INTO product_slots VALUES(98,126); +INSERT INTO product_slots VALUES(98,130); +INSERT INTO product_slots VALUES(98,131); +INSERT INTO product_slots VALUES(98,132); +INSERT INTO product_slots VALUES(98,133); +INSERT INTO product_slots VALUES(98,137); +INSERT INTO product_slots VALUES(98,138); +INSERT INTO product_slots VALUES(98,139); +INSERT INTO product_slots VALUES(98,140); +INSERT INTO product_slots VALUES(98,144); +INSERT INTO product_slots VALUES(98,145); +INSERT INTO product_slots VALUES(98,146); +INSERT INTO product_slots VALUES(98,147); +INSERT INTO product_slots VALUES(98,148); +INSERT INTO product_slots VALUES(98,149); +INSERT INTO product_slots VALUES(98,150); +INSERT INTO product_slots VALUES(98,151); +INSERT INTO product_slots VALUES(98,155); +INSERT INTO product_slots VALUES(98,156); +INSERT INTO product_slots VALUES(98,157); +INSERT INTO product_slots VALUES(98,158); +INSERT INTO product_slots VALUES(98,162); +INSERT INTO product_slots VALUES(98,163); +INSERT INTO product_slots VALUES(98,164); +INSERT INTO product_slots VALUES(98,165); +INSERT INTO product_slots VALUES(98,166); +INSERT INTO product_slots VALUES(98,169); +INSERT INTO product_slots VALUES(98,170); +INSERT INTO product_slots VALUES(98,171); +INSERT INTO product_slots VALUES(98,172); +INSERT INTO product_slots VALUES(98,173); +INSERT INTO product_slots VALUES(98,176); +INSERT INTO product_slots VALUES(98,177); +INSERT INTO product_slots VALUES(98,178); +INSERT INTO product_slots VALUES(98,179); +INSERT INTO product_slots VALUES(98,180); +INSERT INTO product_slots VALUES(98,181); +INSERT INTO product_slots VALUES(98,182); +INSERT INTO product_slots VALUES(98,183); +INSERT INTO product_slots VALUES(98,184); +INSERT INTO product_slots VALUES(98,185); +INSERT INTO product_slots VALUES(98,186); +INSERT INTO product_slots VALUES(98,187); +INSERT INTO product_slots VALUES(98,188); +INSERT INTO product_slots VALUES(98,189); +INSERT INTO product_slots VALUES(98,190); +INSERT INTO product_slots VALUES(98,191); +INSERT INTO product_slots VALUES(98,192); +INSERT INTO product_slots VALUES(98,193); +INSERT INTO product_slots VALUES(98,194); +INSERT INTO product_slots VALUES(98,198); +INSERT INTO product_slots VALUES(98,199); +INSERT INTO product_slots VALUES(98,200); +INSERT INTO product_slots VALUES(98,201); +INSERT INTO product_slots VALUES(98,202); +INSERT INTO product_slots VALUES(98,203); +INSERT INTO product_slots VALUES(98,205); +INSERT INTO product_slots VALUES(98,208); +INSERT INTO product_slots VALUES(98,209); +INSERT INTO product_slots VALUES(98,210); +INSERT INTO product_slots VALUES(98,211); +INSERT INTO product_slots VALUES(98,216); +INSERT INTO product_slots VALUES(98,217); +INSERT INTO product_slots VALUES(98,218); +INSERT INTO product_slots VALUES(98,219); +INSERT INTO product_slots VALUES(98,220); +INSERT INTO product_slots VALUES(98,223); +INSERT INTO product_slots VALUES(98,224); +INSERT INTO product_slots VALUES(98,225); +INSERT INTO product_slots VALUES(98,226); +INSERT INTO product_slots VALUES(98,230); +INSERT INTO product_slots VALUES(98,231); +INSERT INTO product_slots VALUES(98,232); +INSERT INTO product_slots VALUES(98,234); +INSERT INTO product_slots VALUES(98,237); +INSERT INTO product_slots VALUES(98,238); +INSERT INTO product_slots VALUES(98,239); +INSERT INTO product_slots VALUES(98,240); +INSERT INTO product_slots VALUES(98,274); +INSERT INTO product_slots VALUES(98,275); +INSERT INTO product_slots VALUES(98,277); +INSERT INTO product_slots VALUES(98,278); +INSERT INTO product_slots VALUES(98,279); +INSERT INTO product_slots VALUES(99,81); +INSERT INTO product_slots VALUES(99,82); +INSERT INTO product_slots VALUES(99,83); +INSERT INTO product_slots VALUES(99,87); +INSERT INTO product_slots VALUES(99,89); +INSERT INTO product_slots VALUES(99,90); +INSERT INTO product_slots VALUES(99,91); +INSERT INTO product_slots VALUES(99,92); +INSERT INTO product_slots VALUES(99,93); +INSERT INTO product_slots VALUES(99,94); +INSERT INTO product_slots VALUES(99,96); +INSERT INTO product_slots VALUES(99,97); +INSERT INTO product_slots VALUES(99,98); +INSERT INTO product_slots VALUES(99,99); +INSERT INTO product_slots VALUES(99,100); +INSERT INTO product_slots VALUES(99,102); +INSERT INTO product_slots VALUES(99,103); +INSERT INTO product_slots VALUES(99,104); +INSERT INTO product_slots VALUES(99,105); +INSERT INTO product_slots VALUES(99,106); +INSERT INTO product_slots VALUES(99,107); +INSERT INTO product_slots VALUES(99,108); +INSERT INTO product_slots VALUES(99,109); +INSERT INTO product_slots VALUES(99,110); +INSERT INTO product_slots VALUES(99,111); +INSERT INTO product_slots VALUES(99,112); +INSERT INTO product_slots VALUES(99,113); +INSERT INTO product_slots VALUES(99,114); +INSERT INTO product_slots VALUES(99,115); +INSERT INTO product_slots VALUES(99,118); +INSERT INTO product_slots VALUES(99,119); +INSERT INTO product_slots VALUES(99,120); +INSERT INTO product_slots VALUES(99,123); +INSERT INTO product_slots VALUES(99,124); +INSERT INTO product_slots VALUES(99,125); +INSERT INTO product_slots VALUES(99,126); +INSERT INTO product_slots VALUES(99,130); +INSERT INTO product_slots VALUES(99,131); +INSERT INTO product_slots VALUES(99,132); +INSERT INTO product_slots VALUES(99,133); +INSERT INTO product_slots VALUES(99,137); +INSERT INTO product_slots VALUES(99,138); +INSERT INTO product_slots VALUES(99,139); +INSERT INTO product_slots VALUES(99,140); +INSERT INTO product_slots VALUES(99,144); +INSERT INTO product_slots VALUES(99,145); +INSERT INTO product_slots VALUES(99,146); +INSERT INTO product_slots VALUES(99,147); +INSERT INTO product_slots VALUES(99,148); +INSERT INTO product_slots VALUES(99,149); +INSERT INTO product_slots VALUES(99,150); +INSERT INTO product_slots VALUES(99,151); +INSERT INTO product_slots VALUES(99,155); +INSERT INTO product_slots VALUES(99,156); +INSERT INTO product_slots VALUES(99,157); +INSERT INTO product_slots VALUES(99,158); +INSERT INTO product_slots VALUES(99,162); +INSERT INTO product_slots VALUES(99,163); +INSERT INTO product_slots VALUES(99,164); +INSERT INTO product_slots VALUES(99,165); +INSERT INTO product_slots VALUES(99,166); +INSERT INTO product_slots VALUES(99,169); +INSERT INTO product_slots VALUES(99,170); +INSERT INTO product_slots VALUES(99,171); +INSERT INTO product_slots VALUES(99,172); +INSERT INTO product_slots VALUES(99,173); +INSERT INTO product_slots VALUES(99,176); +INSERT INTO product_slots VALUES(99,177); +INSERT INTO product_slots VALUES(99,178); +INSERT INTO product_slots VALUES(99,179); +INSERT INTO product_slots VALUES(99,180); +INSERT INTO product_slots VALUES(99,181); +INSERT INTO product_slots VALUES(99,182); +INSERT INTO product_slots VALUES(99,183); +INSERT INTO product_slots VALUES(99,184); +INSERT INTO product_slots VALUES(99,185); +INSERT INTO product_slots VALUES(99,186); +INSERT INTO product_slots VALUES(99,187); +INSERT INTO product_slots VALUES(99,188); +INSERT INTO product_slots VALUES(99,189); +INSERT INTO product_slots VALUES(99,190); +INSERT INTO product_slots VALUES(99,191); +INSERT INTO product_slots VALUES(99,192); +INSERT INTO product_slots VALUES(99,193); +INSERT INTO product_slots VALUES(99,194); +INSERT INTO product_slots VALUES(99,198); +INSERT INTO product_slots VALUES(99,199); +INSERT INTO product_slots VALUES(99,200); +INSERT INTO product_slots VALUES(99,201); +INSERT INTO product_slots VALUES(99,202); +INSERT INTO product_slots VALUES(99,203); +INSERT INTO product_slots VALUES(99,205); +INSERT INTO product_slots VALUES(99,208); +INSERT INTO product_slots VALUES(99,209); +INSERT INTO product_slots VALUES(99,210); +INSERT INTO product_slots VALUES(99,211); +INSERT INTO product_slots VALUES(99,216); +INSERT INTO product_slots VALUES(99,217); +INSERT INTO product_slots VALUES(99,218); +INSERT INTO product_slots VALUES(99,219); +INSERT INTO product_slots VALUES(99,220); +INSERT INTO product_slots VALUES(99,223); +INSERT INTO product_slots VALUES(99,224); +INSERT INTO product_slots VALUES(99,225); +INSERT INTO product_slots VALUES(99,226); +INSERT INTO product_slots VALUES(99,230); +INSERT INTO product_slots VALUES(99,231); +INSERT INTO product_slots VALUES(99,232); +INSERT INTO product_slots VALUES(99,234); +INSERT INTO product_slots VALUES(99,237); +INSERT INTO product_slots VALUES(99,238); +INSERT INTO product_slots VALUES(99,239); +INSERT INTO product_slots VALUES(99,240); +INSERT INTO product_slots VALUES(99,274); +INSERT INTO product_slots VALUES(99,275); +INSERT INTO product_slots VALUES(99,277); +INSERT INTO product_slots VALUES(99,278); +INSERT INTO product_slots VALUES(99,279); +INSERT INTO product_slots VALUES(100,102); +INSERT INTO product_slots VALUES(100,103); +INSERT INTO product_slots VALUES(100,104); +INSERT INTO product_slots VALUES(100,105); +INSERT INTO product_slots VALUES(100,106); +INSERT INTO product_slots VALUES(100,107); +INSERT INTO product_slots VALUES(100,108); +INSERT INTO product_slots VALUES(100,109); +INSERT INTO product_slots VALUES(100,110); +INSERT INTO product_slots VALUES(100,111); +INSERT INTO product_slots VALUES(100,112); +INSERT INTO product_slots VALUES(100,113); +INSERT INTO product_slots VALUES(100,114); +INSERT INTO product_slots VALUES(100,115); +INSERT INTO product_slots VALUES(100,120); +INSERT INTO product_slots VALUES(100,121); +INSERT INTO product_slots VALUES(100,122); +INSERT INTO product_slots VALUES(100,134); +INSERT INTO product_slots VALUES(100,135); +INSERT INTO product_slots VALUES(100,136); +INSERT INTO product_slots VALUES(100,139); +INSERT INTO product_slots VALUES(100,140); +INSERT INTO product_slots VALUES(100,141); +INSERT INTO product_slots VALUES(100,142); +INSERT INTO product_slots VALUES(100,143); +INSERT INTO product_slots VALUES(100,145); +INSERT INTO product_slots VALUES(100,146); +INSERT INTO product_slots VALUES(100,147); +INSERT INTO product_slots VALUES(100,148); +INSERT INTO product_slots VALUES(100,149); +INSERT INTO product_slots VALUES(100,150); +INSERT INTO product_slots VALUES(100,151); +INSERT INTO product_slots VALUES(100,152); +INSERT INTO product_slots VALUES(100,153); +INSERT INTO product_slots VALUES(100,154); +INSERT INTO product_slots VALUES(100,155); +INSERT INTO product_slots VALUES(100,157); +INSERT INTO product_slots VALUES(100,158); +INSERT INTO product_slots VALUES(100,159); +INSERT INTO product_slots VALUES(100,160); +INSERT INTO product_slots VALUES(100,161); +INSERT INTO product_slots VALUES(100,162); +INSERT INTO product_slots VALUES(100,163); +INSERT INTO product_slots VALUES(100,168); +INSERT INTO product_slots VALUES(100,170); +INSERT INTO product_slots VALUES(100,171); +INSERT INTO product_slots VALUES(100,172); +INSERT INTO product_slots VALUES(100,173); +INSERT INTO product_slots VALUES(100,174); +INSERT INTO product_slots VALUES(100,175); +INSERT INTO product_slots VALUES(100,177); +INSERT INTO product_slots VALUES(100,178); +INSERT INTO product_slots VALUES(100,179); +INSERT INTO product_slots VALUES(100,180); +INSERT INTO product_slots VALUES(100,181); +INSERT INTO product_slots VALUES(100,182); +INSERT INTO product_slots VALUES(100,183); +INSERT INTO product_slots VALUES(100,184); +INSERT INTO product_slots VALUES(100,185); +INSERT INTO product_slots VALUES(100,186); +INSERT INTO product_slots VALUES(100,187); +INSERT INTO product_slots VALUES(100,188); +INSERT INTO product_slots VALUES(100,189); +INSERT INTO product_slots VALUES(100,190); +INSERT INTO product_slots VALUES(100,191); +INSERT INTO product_slots VALUES(100,192); +INSERT INTO product_slots VALUES(100,193); +INSERT INTO product_slots VALUES(100,194); +INSERT INTO product_slots VALUES(100,195); +INSERT INTO product_slots VALUES(100,196); +INSERT INTO product_slots VALUES(100,197); +INSERT INTO product_slots VALUES(100,198); +INSERT INTO product_slots VALUES(100,199); +INSERT INTO product_slots VALUES(100,200); +INSERT INTO product_slots VALUES(100,201); +INSERT INTO product_slots VALUES(100,202); +INSERT INTO product_slots VALUES(100,203); +INSERT INTO product_slots VALUES(100,204); +INSERT INTO product_slots VALUES(100,205); +INSERT INTO product_slots VALUES(100,206); +INSERT INTO product_slots VALUES(100,207); +INSERT INTO product_slots VALUES(100,208); +INSERT INTO product_slots VALUES(100,209); +INSERT INTO product_slots VALUES(100,210); +INSERT INTO product_slots VALUES(100,211); +INSERT INTO product_slots VALUES(100,212); +INSERT INTO product_slots VALUES(100,213); +INSERT INTO product_slots VALUES(100,214); +INSERT INTO product_slots VALUES(100,215); +INSERT INTO product_slots VALUES(100,216); +INSERT INTO product_slots VALUES(100,217); +INSERT INTO product_slots VALUES(100,218); +INSERT INTO product_slots VALUES(100,219); +INSERT INTO product_slots VALUES(100,220); +INSERT INTO product_slots VALUES(100,221); +INSERT INTO product_slots VALUES(100,222); +INSERT INTO product_slots VALUES(100,223); +INSERT INTO product_slots VALUES(100,224); +INSERT INTO product_slots VALUES(100,225); +INSERT INTO product_slots VALUES(100,226); +INSERT INTO product_slots VALUES(100,227); +INSERT INTO product_slots VALUES(100,228); +INSERT INTO product_slots VALUES(100,229); +INSERT INTO product_slots VALUES(100,230); +INSERT INTO product_slots VALUES(100,231); +INSERT INTO product_slots VALUES(100,232); +INSERT INTO product_slots VALUES(100,233); +INSERT INTO product_slots VALUES(100,234); +INSERT INTO product_slots VALUES(100,235); +INSERT INTO product_slots VALUES(100,236); +INSERT INTO product_slots VALUES(100,237); +INSERT INTO product_slots VALUES(100,238); +INSERT INTO product_slots VALUES(100,239); +INSERT INTO product_slots VALUES(100,240); +INSERT INTO product_slots VALUES(100,241); +INSERT INTO product_slots VALUES(100,242); +INSERT INTO product_slots VALUES(100,243); +INSERT INTO product_slots VALUES(100,244); +INSERT INTO product_slots VALUES(100,274); +INSERT INTO product_slots VALUES(100,275); +INSERT INTO product_slots VALUES(100,279); +INSERT INTO product_slots VALUES(100,280); +INSERT INTO product_slots VALUES(100,281); +INSERT INTO product_slots VALUES(100,282); +INSERT INTO product_slots VALUES(100,283); +INSERT INTO product_slots VALUES(100,284); +INSERT INTO product_slots VALUES(100,285); +INSERT INTO product_slots VALUES(100,286); +INSERT INTO product_slots VALUES(100,287); +INSERT INTO product_slots VALUES(101,211); +INSERT INTO product_slots VALUES(101,230); +INSERT INTO product_slots VALUES(101,231); +INSERT INTO product_slots VALUES(101,232); +INSERT INTO product_slots VALUES(101,233); +INSERT INTO product_slots VALUES(101,234); +INSERT INTO product_slots VALUES(101,235); +INSERT INTO product_slots VALUES(101,236); +INSERT INTO product_slots VALUES(101,237); +INSERT INTO product_slots VALUES(101,238); +INSERT INTO product_slots VALUES(101,239); +INSERT INTO product_slots VALUES(101,240); +INSERT INTO product_slots VALUES(101,241); +INSERT INTO product_slots VALUES(101,242); +INSERT INTO product_slots VALUES(101,243); +INSERT INTO product_slots VALUES(101,244); +INSERT INTO product_slots VALUES(101,274); +INSERT INTO product_slots VALUES(101,275); +INSERT INTO product_slots VALUES(101,279); +INSERT INTO product_slots VALUES(101,280); +INSERT INTO product_slots VALUES(101,281); +INSERT INTO product_slots VALUES(101,282); +INSERT INTO product_slots VALUES(101,283); +INSERT INTO product_slots VALUES(101,284); +INSERT INTO product_slots VALUES(101,285); +INSERT INTO product_slots VALUES(101,286); +INSERT INTO product_slots VALUES(101,287); +INSERT INTO product_slots VALUES(102,188); +INSERT INTO product_slots VALUES(102,189); +INSERT INTO product_slots VALUES(102,203); +INSERT INTO product_slots VALUES(102,204); +INSERT INTO product_slots VALUES(102,205); +INSERT INTO product_slots VALUES(102,206); +INSERT INTO product_slots VALUES(102,207); +INSERT INTO product_slots VALUES(102,208); +INSERT INTO product_slots VALUES(102,209); +INSERT INTO product_slots VALUES(102,210); +INSERT INTO product_slots VALUES(102,211); +INSERT INTO product_slots VALUES(102,212); +INSERT INTO product_slots VALUES(102,213); +INSERT INTO product_slots VALUES(102,214); +INSERT INTO product_slots VALUES(102,215); +INSERT INTO product_slots VALUES(102,216); +INSERT INTO product_slots VALUES(102,217); +INSERT INTO product_slots VALUES(102,218); +INSERT INTO product_slots VALUES(102,219); +INSERT INTO product_slots VALUES(102,220); +INSERT INTO product_slots VALUES(102,221); +INSERT INTO product_slots VALUES(102,222); +INSERT INTO product_slots VALUES(102,223); +INSERT INTO product_slots VALUES(102,224); +INSERT INTO product_slots VALUES(102,225); +INSERT INTO product_slots VALUES(102,226); +INSERT INTO product_slots VALUES(102,227); +INSERT INTO product_slots VALUES(102,228); +INSERT INTO product_slots VALUES(102,229); +INSERT INTO product_slots VALUES(102,230); +INSERT INTO product_slots VALUES(102,231); +INSERT INTO product_slots VALUES(102,232); +INSERT INTO product_slots VALUES(102,233); +INSERT INTO product_slots VALUES(102,234); +INSERT INTO product_slots VALUES(102,235); +INSERT INTO product_slots VALUES(102,236); +INSERT INTO product_slots VALUES(102,237); +INSERT INTO product_slots VALUES(102,238); +INSERT INTO product_slots VALUES(102,239); +INSERT INTO product_slots VALUES(102,240); +INSERT INTO product_slots VALUES(102,241); +INSERT INTO product_slots VALUES(102,242); +INSERT INTO product_slots VALUES(102,243); +INSERT INTO product_slots VALUES(102,244); +INSERT INTO product_slots VALUES(102,274); +INSERT INTO product_slots VALUES(102,275); +INSERT INTO product_slots VALUES(102,279); +INSERT INTO product_slots VALUES(102,280); +INSERT INTO product_slots VALUES(102,281); +INSERT INTO product_slots VALUES(102,282); +INSERT INTO product_slots VALUES(102,283); +INSERT INTO product_slots VALUES(102,284); +INSERT INTO product_slots VALUES(102,285); +INSERT INTO product_slots VALUES(102,286); +INSERT INTO product_slots VALUES(102,287); +INSERT INTO product_slots VALUES(103,210); +INSERT INTO product_slots VALUES(103,211); +INSERT INTO product_slots VALUES(103,212); +INSERT INTO product_slots VALUES(103,213); +INSERT INTO product_slots VALUES(103,214); +INSERT INTO product_slots VALUES(103,215); +INSERT INTO product_slots VALUES(103,227); +INSERT INTO product_slots VALUES(103,228); +INSERT INTO product_slots VALUES(103,229); +INSERT INTO product_slots VALUES(103,230); +INSERT INTO product_slots VALUES(103,231); +INSERT INTO product_slots VALUES(103,232); +INSERT INTO product_slots VALUES(103,233); +INSERT INTO product_slots VALUES(103,234); +INSERT INTO product_slots VALUES(103,235); +INSERT INTO product_slots VALUES(103,236); +INSERT INTO product_slots VALUES(103,237); +INSERT INTO product_slots VALUES(103,238); +INSERT INTO product_slots VALUES(103,239); +INSERT INTO product_slots VALUES(103,240); +INSERT INTO product_slots VALUES(103,241); +INSERT INTO product_slots VALUES(103,242); +INSERT INTO product_slots VALUES(103,243); +INSERT INTO product_slots VALUES(103,244); +INSERT INTO product_slots VALUES(103,274); +INSERT INTO product_slots VALUES(103,275); +INSERT INTO product_slots VALUES(103,279); +INSERT INTO product_slots VALUES(103,280); +INSERT INTO product_slots VALUES(103,281); +INSERT INTO product_slots VALUES(103,282); +INSERT INTO product_slots VALUES(103,283); +INSERT INTO product_slots VALUES(103,284); +INSERT INTO product_slots VALUES(103,285); +INSERT INTO product_slots VALUES(103,286); +INSERT INTO product_slots VALUES(103,287); +CREATE TABLE IF NOT EXISTS "product_tag_info" ("id" INTEGER PRIMARY KEY, "tag_name" TEXT NOT NULL, "tag_description" TEXT, "image_url" TEXT, "is_dashboard_tag" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "related_stores" TEXT); +INSERT INTO product_tag_info VALUES(1,'Chicken','Chicken related items','tags/1770321659633-1763869265110-e22b6d94-dac9-499f-babb-1e944d90b01a.jpeg%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3D8fab47503efb9547b50e4fb317e35cc7%252F20260205%252Fapac%252Fs3%252Faws4_request%26X-Amz-Date%3D20260205T195535Z%26X-Amz-Expires%3D259200%26X-Amz-Signature%3D917db15bcc60cab7ac5cd5e49d85d13a960fe77b4a5e327dd449048870494cf9%26X-Amz-SignedHeaders%3Dhost%26x-amz-checksum-mode%3DENABLED%26x-id%3DGetObject',1,'2025-11-22T02:00:14.678Z','[1]'); +INSERT INTO product_tag_info VALUES(2,'Meat','Meat Products','tags/1763835253683-c9c3e293-0bef-4c58-a976-dd49c050cd36.jpeg',1,'2025-11-22T12:44:15.930Z',NULL); +INSERT INTO product_tag_info VALUES(3,'Fruits','Delicious fresh fruits','tags/1763835293899-43b3fbe1-9b5b-441c-b4d4-d1691c3f02f3.webp',1,'2025-11-22T12:44:55.491Z',NULL); +INSERT INTO product_tag_info VALUES(4,'Fish','Types ','tags/1770323410499-1763869436182-bf82f7b4-a1f3-4113-985b-96311b7a910e.jpeg%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3D8fab47503efb9547b50e4fb317e35cc7%252F20260205%252Fapac%252Fs3%252Faws4_request%26X-Amz-Date%3D20260205T202804Z%26X-Amz-Expires%3D259200%26X-Amz-Signature%3Dea436390b277935d843cae6b5cfa62aeed5799cb4a962ab31a0be4b132ca4b30%26X-Amz-SignedHeaders%3Dhost%26x-amz-checksum-mode%3DENABLED%26x-id%3DGetObject',1,'2025-11-22T22:13:03.039Z','[1]'); +INSERT INTO product_tag_info VALUES(5,'Vegetables',NULL,'tags/1768709725124-ebf421c5-ad52-49a9-b65c-1de008110b8a.png',1,'2026-01-17T22:45:25.461Z',NULL); +INSERT INTO product_tag_info VALUES(6,'Mutton','Mutton Products','tags/1770323560823-fd0ec463-bed0-474e-aa14-dc6480ce36af.jpeg',1,'2026-02-05T15:02:41.070Z','[1]'); +INSERT INTO product_tag_info VALUES(39,'DemoTag','Demo prod tag','product-images/1774116266063.jpg',0,'2026-03-21T12:20:34.282Z','[2,1]'); +CREATE TABLE IF NOT EXISTS "product_tags" ("id" INTEGER PRIMARY KEY, "product_id" INTEGER NOT NULL, "tag_id" INTEGER NOT NULL, "assigned_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO product_tags VALUES(114,2,1,'2026-01-15T06:49:23.323Z'); +INSERT INTO product_tags VALUES(115,2,2,'2026-01-15T06:49:23.323Z'); +INSERT INTO product_tags VALUES(130,42,1,'2026-01-17T02:37:49.548Z'); +INSERT INTO product_tags VALUES(131,42,2,'2026-01-17T02:37:49.548Z'); +INSERT INTO product_tags VALUES(132,7,3,'2026-01-17T03:23:29.890Z'); +INSERT INTO product_tags VALUES(133,21,1,'2026-01-17T03:28:21.647Z'); +INSERT INTO product_tags VALUES(134,21,2,'2026-01-17T03:28:21.647Z'); +INSERT INTO product_tags VALUES(136,26,3,'2026-01-17T03:34:05.740Z'); +INSERT INTO product_tags VALUES(143,39,3,'2026-01-17T06:11:21.465Z'); +INSERT INTO product_tags VALUES(164,3,1,'2026-01-18T01:05:33.690Z'); +INSERT INTO product_tags VALUES(165,3,2,'2026-01-18T01:05:33.690Z'); +INSERT INTO product_tags VALUES(168,49,3,'2026-01-18T11:28:56.144Z'); +INSERT INTO product_tags VALUES(202,9,4,'2026-01-25T08:36:25.210Z'); +INSERT INTO product_tags VALUES(203,75,4,'2026-01-25T08:38:25.840Z'); +INSERT INTO product_tags VALUES(215,11,3,'2026-01-25T11:09:47.389Z'); +INSERT INTO product_tags VALUES(222,8,3,'2026-01-25T11:49:56.733Z'); +INSERT INTO product_tags VALUES(223,25,3,'2026-01-25T11:50:46.177Z'); +INSERT INTO product_tags VALUES(226,48,3,'2026-01-25T11:55:18.601Z'); +INSERT INTO product_tags VALUES(230,24,2,'2026-01-25T12:17:02.952Z'); +INSERT INTO product_tags VALUES(231,24,1,'2026-01-25T12:17:02.952Z'); +INSERT INTO product_tags VALUES(234,15,1,'2026-01-25T12:19:07.538Z'); +INSERT INTO product_tags VALUES(235,15,2,'2026-01-25T12:19:07.538Z'); +INSERT INTO product_tags VALUES(238,36,1,'2026-01-25T12:20:23.324Z'); +INSERT INTO product_tags VALUES(242,55,3,'2026-01-25T12:36:14.976Z'); +INSERT INTO product_tags VALUES(243,82,4,'2026-01-25T12:49:15.711Z'); +INSERT INTO product_tags VALUES(244,81,2,'2026-01-25T12:55:33.320Z'); +INSERT INTO product_tags VALUES(245,81,4,'2026-01-25T12:55:33.320Z'); +INSERT INTO product_tags VALUES(246,83,4,'2026-01-25T12:56:28.787Z'); +INSERT INTO product_tags VALUES(251,64,5,'2026-01-25T22:42:34.137Z'); +INSERT INTO product_tags VALUES(253,33,5,'2026-01-25T22:44:37.101Z'); +INSERT INTO product_tags VALUES(254,16,5,'2026-01-25T22:45:58.208Z'); +INSERT INTO product_tags VALUES(263,53,3,'2026-01-25T22:53:41.199Z'); +INSERT INTO product_tags VALUES(274,1,1,'2026-01-25T23:19:00.304Z'); +INSERT INTO product_tags VALUES(278,62,3,'2026-01-27T11:51:39.242Z'); +INSERT INTO product_tags VALUES(279,60,3,'2026-01-27T11:52:45.990Z'); +INSERT INTO product_tags VALUES(280,61,3,'2026-01-27T11:57:45.345Z'); +INSERT INTO product_tags VALUES(282,44,3,'2026-01-27T11:59:15.067Z'); +INSERT INTO product_tags VALUES(283,13,3,'2026-01-27T20:24:25.976Z'); +INSERT INTO product_tags VALUES(290,41,1,'2026-01-27T21:12:14.665Z'); +INSERT INTO product_tags VALUES(291,41,2,'2026-01-27T21:12:14.665Z'); +INSERT INTO product_tags VALUES(293,6,3,'2026-01-27T21:13:55.115Z'); +INSERT INTO product_tags VALUES(294,72,5,'2026-01-27T21:17:12.977Z'); +INSERT INTO product_tags VALUES(295,29,5,'2026-01-27T21:20:37.640Z'); +INSERT INTO product_tags VALUES(298,19,5,'2026-01-27T21:30:53.298Z'); +INSERT INTO product_tags VALUES(299,18,5,'2026-01-27T21:32:17.814Z'); +INSERT INTO product_tags VALUES(301,30,5,'2026-01-27T21:35:38.807Z'); +INSERT INTO product_tags VALUES(303,27,5,'2026-01-27T21:38:48.593Z'); +INSERT INTO product_tags VALUES(304,89,5,'2026-01-27T21:39:06.159Z'); +INSERT INTO product_tags VALUES(306,70,5,'2026-01-27T21:42:26.477Z'); +INSERT INTO product_tags VALUES(307,80,1,'2026-01-27T21:43:10.425Z'); +INSERT INTO product_tags VALUES(308,5,5,'2026-01-27T21:43:12.449Z'); +INSERT INTO product_tags VALUES(309,76,5,'2026-01-27T21:44:10.836Z'); +INSERT INTO product_tags VALUES(310,78,5,'2026-01-27T21:50:37.216Z'); +INSERT INTO product_tags VALUES(312,45,5,'2026-01-27T23:02:05.789Z'); +INSERT INTO product_tags VALUES(313,31,5,'2026-01-27T23:03:13.073Z'); +INSERT INTO product_tags VALUES(314,77,5,'2026-01-28T02:36:29.616Z'); +INSERT INTO product_tags VALUES(315,47,3,'2026-01-28T02:37:53.143Z'); +INSERT INTO product_tags VALUES(316,96,3,'2026-01-28T02:40:33.400Z'); +INSERT INTO product_tags VALUES(318,59,3,'2026-01-30T01:08:49.461Z'); +INSERT INTO product_tags VALUES(319,10,1,'2026-02-01T02:29:06.966Z'); +INSERT INTO product_tags VALUES(320,10,2,'2026-02-01T02:29:06.966Z'); +INSERT INTO product_tags VALUES(322,34,2,'2026-02-02T21:48:40.200Z'); +INSERT INTO product_tags VALUES(323,38,3,'2026-02-03T04:50:39.627Z'); +INSERT INTO product_tags VALUES(324,46,3,'2026-02-03T13:09:46.365Z'); +INSERT INTO product_tags VALUES(325,12,2,'2026-02-05T21:38:15.915Z'); +INSERT INTO product_tags VALUES(326,4,2,'2026-02-05T21:38:30.229Z'); +INSERT INTO product_tags VALUES(327,4,6,'2026-02-05T21:38:30.229Z'); +INSERT INTO product_tags VALUES(330,28,2,'2026-02-05T21:39:03.379Z'); +INSERT INTO product_tags VALUES(331,28,6,'2026-02-05T21:39:03.379Z'); +INSERT INTO product_tags VALUES(332,14,2,'2026-02-05T21:39:17.766Z'); +INSERT INTO product_tags VALUES(333,14,6,'2026-02-05T21:39:17.766Z'); +INSERT INTO product_tags VALUES(334,84,2,'2026-02-05T21:39:32.746Z'); +INSERT INTO product_tags VALUES(335,84,6,'2026-02-05T21:39:32.746Z'); +INSERT INTO product_tags VALUES(336,86,2,'2026-02-05T21:39:41.075Z'); +INSERT INTO product_tags VALUES(337,86,6,'2026-02-05T21:39:41.075Z'); +INSERT INTO product_tags VALUES(338,98,6,'2026-02-05T21:39:49.218Z'); +INSERT INTO product_tags VALUES(339,98,2,'2026-02-05T21:39:49.218Z'); +INSERT INTO product_tags VALUES(340,99,2,'2026-02-05T21:40:00.488Z'); +INSERT INTO product_tags VALUES(341,99,6,'2026-02-05T21:40:00.488Z'); +INSERT INTO product_tags VALUES(342,20,2,'2026-02-05T21:40:13.041Z'); +INSERT INTO product_tags VALUES(343,20,6,'2026-02-05T21:40:13.041Z'); +INSERT INTO product_tags VALUES(344,35,2,'2026-02-05T21:40:21.153Z'); +INSERT INTO product_tags VALUES(345,35,6,'2026-02-05T21:40:21.153Z'); +INSERT INTO product_tags VALUES(346,85,6,'2026-02-05T21:40:31.451Z'); +INSERT INTO product_tags VALUES(347,85,2,'2026-02-05T21:40:31.451Z'); +INSERT INTO product_tags VALUES(348,87,2,'2026-02-05T21:40:40.483Z'); +INSERT INTO product_tags VALUES(349,87,6,'2026-02-05T21:40:40.483Z'); +INSERT INTO product_tags VALUES(350,67,5,'2026-02-06T03:28:46.803Z'); +INSERT INTO product_tags VALUES(353,17,5,'2026-02-20T05:05:15.691Z'); +INSERT INTO product_tags VALUES(354,32,5,'2026-02-21T23:13:56.993Z'); +INSERT INTO product_tags VALUES(355,37,5,'2026-02-23T03:02:49.047Z'); +INSERT INTO product_tags VALUES(388,23,2,'2026-03-12T09:45:05.232Z'); +INSERT INTO product_tags VALUES(389,23,1,'2026-03-12T09:45:05.232Z'); +INSERT INTO product_tags VALUES(391,50,3,'2026-03-14T05:54:04.645Z'); +INSERT INTO product_tags VALUES(394,140,1,'2026-03-26T06:15:15.135Z'); +INSERT INTO product_tags VALUES(395,140,4,'2026-03-26T06:15:15.135Z'); +CREATE TABLE IF NOT EXISTS "refunds" ("id" INTEGER PRIMARY KEY, "order_id" INTEGER NOT NULL, "refund_amount" REAL, "refund_status" TEXT DEFAULT 'none', "merchant_refund_id" TEXT, "refund_processed_at" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO refunds VALUES(1,14,73.499999999999996447,'success','rfnd_Rithb3BCPvwCVZ','2025-11-22T13:45:42.202Z','2025-11-19T12:47:41.044Z'); +INSERT INTO refunds VALUES(2,16,NULL,'none',NULL,NULL,'2025-11-23T06:11:45.422Z'); +INSERT INTO refunds VALUES(3,21,250.0,'success','rfnd_RjAobSg6UT2mvE','2025-11-23T06:29:45.582Z','2025-11-23T06:20:11.343Z'); +INSERT INTO refunds VALUES(4,17,NULL,'na',NULL,NULL,'2025-11-22T13:42:48.103Z'); +INSERT INTO refunds VALUES(5,22,NULL,'none',NULL,NULL,'2025-11-24T06:03:51.483Z'); +INSERT INTO refunds VALUES(6,23,220.0,'success','rfnd_RjZ0NnNrz80osd','2025-11-24T06:10:00.791Z','2025-11-24T06:03:20.864Z'); +INSERT INTO refunds VALUES(7,25,250.0,'success','rfnd_RjwqkDB4wfwBuY','2025-11-25T05:30:00.813Z','2025-11-25T05:25:53.609Z'); +INSERT INTO refunds VALUES(8,12,NULL,'pending',NULL,NULL,'2025-11-28T22:12:39.527Z'); +INSERT INTO refunds VALUES(9,31,NULL,'pending',NULL,NULL,'2025-11-28T22:33:24.299Z'); +INSERT INTO refunds VALUES(10,35,NULL,'pending',NULL,NULL,'2025-11-28T23:15:19.165Z'); +INSERT INTO refunds VALUES(11,50,NULL,'pending',NULL,NULL,'2025-11-29T01:16:21.186Z'); +INSERT INTO refunds VALUES(12,51,NULL,'pending',NULL,NULL,'2025-11-29T01:42:14.433Z'); +INSERT INTO refunds VALUES(13,52,NULL,'pending',NULL,NULL,'2025-11-29T01:52:21.830Z'); +INSERT INTO refunds VALUES(14,53,320.0,'success','rfnd_RlTSoRRkSliydO','2025-11-29T02:07:29.105Z','2025-11-29T01:58:56.303Z'); +INSERT INTO refunds VALUES(15,54,2850.0,'success','rfnd_RlcXX2g7K7jDCh','2025-11-29T11:00:00.772Z','2025-11-29T10:54:08.554Z'); +INSERT INTO refunds VALUES(16,64,NULL,'pending',NULL,NULL,'2025-12-19T04:15:02.346Z'); +INSERT INTO refunds VALUES(17,74,NULL,'na',NULL,NULL,'2025-12-19T11:38:55.276Z'); +INSERT INTO refunds VALUES(18,68,NULL,'na',NULL,NULL,'2025-12-19T21:20:54.339Z'); +INSERT INTO refunds VALUES(19,89,NULL,'na',NULL,NULL,'2025-12-20T15:09:31.699Z'); +INSERT INTO refunds VALUES(20,88,NULL,'na',NULL,NULL,'2025-12-20T21:37:32.151Z'); +INSERT INTO refunds VALUES(21,93,NULL,'na',NULL,NULL,'2025-12-22T08:15:45.531Z'); +INSERT INTO refunds VALUES(22,96,NULL,'na',NULL,NULL,'2025-12-22T09:07:24.665Z'); +INSERT INTO refunds VALUES(23,101,NULL,'na',NULL,NULL,'2025-12-23T11:46:55.138Z'); +INSERT INTO refunds VALUES(24,102,NULL,'na',NULL,NULL,'2025-12-27T01:40:37.790Z'); +INSERT INTO refunds VALUES(25,148,NULL,'na',NULL,NULL,'2026-01-17T23:01:50.064Z'); +INSERT INTO refunds VALUES(26,159,NULL,'na',NULL,NULL,'2026-01-18T10:06:56.160Z'); +INSERT INTO refunds VALUES(27,171,NULL,'na',NULL,NULL,'2026-01-27T22:25:10.936Z'); +INSERT INTO refunds VALUES(28,167,NULL,'na',NULL,NULL,'2026-01-27T22:26:35.510Z'); +INSERT INTO refunds VALUES(29,168,NULL,'na',NULL,NULL,'2026-01-27T22:27:15.817Z'); +INSERT INTO refunds VALUES(30,169,NULL,'na',NULL,NULL,'2026-01-27T22:27:32.421Z'); +INSERT INTO refunds VALUES(31,156,NULL,'na',NULL,NULL,'2026-01-27T22:30:19.302Z'); +INSERT INTO refunds VALUES(32,146,NULL,'na',NULL,NULL,'2026-01-28T00:39:48.320Z'); +INSERT INTO refunds VALUES(33,178,NULL,'na',NULL,NULL,'2026-01-28T10:02:31.195Z'); +INSERT INTO refunds VALUES(34,145,NULL,'na',NULL,NULL,'2026-01-28T12:53:28.911Z'); +INSERT INTO refunds VALUES(35,144,NULL,'na',NULL,NULL,'2026-01-28T13:29:22.470Z'); +INSERT INTO refunds VALUES(36,143,NULL,'na',NULL,NULL,'2026-01-28T13:30:04.792Z'); +INSERT INTO refunds VALUES(37,141,NULL,'na',NULL,NULL,'2026-01-28T13:30:36.001Z'); +INSERT INTO refunds VALUES(38,140,NULL,'na',NULL,NULL,'2026-01-28T13:31:05.250Z'); +INSERT INTO refunds VALUES(39,183,NULL,'na',NULL,NULL,'2026-01-30T02:09:22.273Z'); +INSERT INTO refunds VALUES(40,188,NULL,'na',NULL,NULL,'2026-01-31T05:26:43.840Z'); +INSERT INTO refunds VALUES(41,186,NULL,'na',NULL,NULL,'2026-01-31T07:35:41.324Z'); +INSERT INTO refunds VALUES(42,185,NULL,'na',NULL,NULL,'2026-01-31T07:36:00.966Z'); +INSERT INTO refunds VALUES(43,190,NULL,'na',NULL,NULL,'2026-01-31T22:05:43.606Z'); +INSERT INTO refunds VALUES(44,190,NULL,'na',NULL,NULL,'2026-01-31T23:03:59.073Z'); +INSERT INTO refunds VALUES(45,196,NULL,'na',NULL,NULL,'2026-02-01T04:42:48.106Z'); +INSERT INTO refunds VALUES(46,204,NULL,'na',NULL,NULL,'2026-02-02T06:48:48.035Z'); +INSERT INTO refunds VALUES(47,166,NULL,'na',NULL,NULL,'2026-02-02T10:47:37.685Z'); +INSERT INTO refunds VALUES(48,207,NULL,'na',NULL,NULL,'2026-02-02T11:22:59.955Z'); +INSERT INTO refunds VALUES(49,213,NULL,'na',NULL,NULL,'2026-02-03T07:34:17.723Z'); +INSERT INTO refunds VALUES(50,214,NULL,'na',NULL,NULL,'2026-02-03T08:41:50.996Z'); +INSERT INTO refunds VALUES(51,216,NULL,'na',NULL,NULL,'2026-02-03T23:34:45.350Z'); +INSERT INTO refunds VALUES(52,228,NULL,'na',NULL,NULL,'2026-02-06T16:17:39.262Z'); +INSERT INTO refunds VALUES(53,225,NULL,'na',NULL,NULL,'2026-02-06T23:20:32.417Z'); +INSERT INTO refunds VALUES(54,230,NULL,'na',NULL,NULL,'2026-02-06T23:34:36.400Z'); +INSERT INTO refunds VALUES(55,233,NULL,'na',NULL,NULL,'2026-02-07T07:25:04.081Z'); +INSERT INTO refunds VALUES(56,232,NULL,'na',NULL,NULL,'2026-02-07T07:26:35.768Z'); +INSERT INTO refunds VALUES(57,238,NULL,'na',NULL,NULL,'2026-02-08T00:55:38.297Z'); +INSERT INTO refunds VALUES(58,239,NULL,'na',NULL,NULL,'2026-02-08T00:59:58.539Z'); +INSERT INTO refunds VALUES(59,246,NULL,'na',NULL,NULL,'2026-02-08T23:17:27.385Z'); +INSERT INTO refunds VALUES(60,247,NULL,'na',NULL,NULL,'2026-02-09T02:04:46.141Z'); +INSERT INTO refunds VALUES(61,250,NULL,'na',NULL,NULL,'2026-02-10T22:00:06.670Z'); +INSERT INTO refunds VALUES(62,256,NULL,'na',NULL,NULL,'2026-02-16T01:22:51.309Z'); +INSERT INTO refunds VALUES(63,269,NULL,'na',NULL,NULL,'2026-02-18T04:17:30.087Z'); +INSERT INTO refunds VALUES(64,273,NULL,'na',NULL,NULL,'2026-02-18T05:16:11.655Z'); +INSERT INTO refunds VALUES(65,260,NULL,'na',NULL,NULL,'2026-02-18T06:14:42.228Z'); +INSERT INTO refunds VALUES(66,288,NULL,'na',NULL,NULL,'2026-02-19T04:37:45.086Z'); +INSERT INTO refunds VALUES(67,287,NULL,'na',NULL,NULL,'2026-02-19T04:40:17.239Z'); +INSERT INTO refunds VALUES(68,282,NULL,'na',NULL,NULL,'2026-02-19T05:33:59.169Z'); +INSERT INTO refunds VALUES(69,281,NULL,'na',NULL,NULL,'2026-02-19T05:34:11.079Z'); +INSERT INTO refunds VALUES(70,285,NULL,'na',NULL,NULL,'2026-02-19T05:37:22.327Z'); +INSERT INTO refunds VALUES(71,293,NULL,'na',NULL,NULL,'2026-02-19T07:22:21.525Z'); +INSERT INTO refunds VALUES(72,292,NULL,'na',NULL,NULL,'2026-02-19T07:22:49.181Z'); +INSERT INTO refunds VALUES(73,296,NULL,'na',NULL,NULL,'2026-02-19T12:49:30.261Z'); +INSERT INTO refunds VALUES(74,315,NULL,'na',NULL,NULL,'2026-02-21T04:45:00.816Z'); +INSERT INTO refunds VALUES(75,317,NULL,'na',NULL,NULL,'2026-02-21T06:26:57.626Z'); +INSERT INTO refunds VALUES(76,321,NULL,'na',NULL,NULL,'2026-02-21T22:47:12.386Z'); +INSERT INTO refunds VALUES(77,335,NULL,'na',NULL,NULL,'2026-02-23T04:42:18.550Z'); +INSERT INTO refunds VALUES(78,20,NULL,'na',NULL,NULL,'2026-02-25T02:13:38.575Z'); +CREATE TABLE IF NOT EXISTS "reserved_coupons" ("id" INTEGER PRIMARY KEY, "secret_code" TEXT NOT NULL, "coupon_code" TEXT NOT NULL, "discount_percent" REAL, "flat_discount" REAL, "min_order" REAL, "product_ids" TEXT, "max_value" REAL, "valid_till" TEXT, "max_limit_for_user" INTEGER, "exclusive_apply" INTEGER NOT NULL DEFAULT false, "is_redeemed" INTEGER NOT NULL DEFAULT false, "redeemed_by" INTEGER, "redeemed_at" TEXT, "created_by" INTEGER NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO reserved_coupons VALUES(1,'RESERVE_TEST34','RESERVE_TEST34',25.0,NULL,1000.0,NULL,250.0,'2026-01-30T07:46:00.000Z',2,0,1,1,'2026-01-12T03:28:20.468Z',1,'2026-01-07T07:46:53.387Z'); +CREATE TABLE IF NOT EXISTS "special_deals" ("id" INTEGER PRIMARY KEY, "product_id" INTEGER NOT NULL, "quantity" REAL NOT NULL, "price" REAL NOT NULL, "valid_till" TEXT NOT NULL); +INSERT INTO special_deals VALUES(12,9,2.0,500.0,'2025-12-08T18:30:00.000Z'); +CREATE TABLE IF NOT EXISTS "staff_permissions" ("id" INTEGER PRIMARY KEY, "permission_name" TEXT NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO staff_permissions VALUES(1,'crud_product','2026-01-12T13:13:14.537Z'); +INSERT INTO staff_permissions VALUES(2,'make_coupon','2026-01-12T13:13:14.650Z'); +INSERT INTO staff_permissions VALUES(3,'crud_staff_users','2026-01-12T13:13:14.759Z'); +CREATE TABLE IF NOT EXISTS "staff_role_permissions" ("id" INTEGER PRIMARY KEY, "staff_role_id" INTEGER NOT NULL, "staff_permission_id" INTEGER NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO staff_role_permissions VALUES(1,1,1,'2026-01-12T13:13:14.815Z'); +INSERT INTO staff_role_permissions VALUES(2,1,2,'2026-01-12T13:13:14.815Z'); +INSERT INTO staff_role_permissions VALUES(3,1,3,'2026-01-12T13:13:14.815Z'); +INSERT INTO staff_role_permissions VALUES(4,2,1,'2026-01-12T13:13:14.815Z'); +INSERT INTO staff_role_permissions VALUES(5,2,2,'2026-01-12T13:13:14.815Z'); +INSERT INTO staff_role_permissions VALUES(6,3,2,'2026-01-12T13:13:14.815Z'); +CREATE TABLE IF NOT EXISTS "staff_roles" ("id" INTEGER PRIMARY KEY, "role_name" TEXT NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO staff_roles VALUES(1,'super_admin','2026-01-12T13:13:14.097Z'); +INSERT INTO staff_roles VALUES(2,'admin','2026-01-12T13:13:14.208Z'); +INSERT INTO staff_roles VALUES(3,'marketer','2026-01-12T13:13:14.318Z'); +INSERT INTO staff_roles VALUES(4,'delivery_staff','2026-01-12T13:13:14.427Z'); +CREATE TABLE IF NOT EXISTS "staff_users" ("id" INTEGER PRIMARY KEY, "name" TEXT NOT NULL, "password" TEXT NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "staff_role_id" INTEGER); +INSERT INTO staff_users VALUES(1,'admin1','$2a$12$VEQHLJpr0l7Z0A.pZrQCk.Yjnf2M4k.RR82f0TlJ2zZU66pMH2Nh.','2025-11-17T03:24:02.349Z',NULL); +INSERT INTO staff_users VALUES(2,'admin2','$2a$12$VEQHLJpr0l7Z0A.pZrQCk.Yjnf2M4k.RR82f0TlJ2zZU66pMH2Nh.','2025-11-17T03:24:12.054Z',NULL); +INSERT INTO staff_users VALUES(3,'admin3','$2a$12$VEQHLJpr0l7Z0A.pZrQCk.Yjnf2M4k.RR82f0TlJ2zZU66pMH2Nh.','2025-11-17T03:24:12.054Z',NULL); +CREATE TABLE IF NOT EXISTS "store_info" ("id" INTEGER PRIMARY KEY, "name" TEXT NOT NULL, "description" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "owner" INTEGER NOT NULL, "image_url" TEXT); +INSERT INTO store_info VALUES(1,'Fresh meat','"Fresh, high-quality meat sourced from trusted suppliers and hygienically processed. Cut fresh, packed safely, and delivered to your doorstep."','2025-11-16T21:59:24.030Z',1,'store-images/1766052073748.png'); +INSERT INTO store_info VALUES(2,'The Fruit Store','"Fresh, juicy fruits handpicked for quality and taste. Naturally ripened, carefully packed, and delivered fresh to your home."','2025-11-18T09:01:21.914Z',1,'store-images/1766053828604.png'); +INSERT INTO store_info VALUES(4,'Vegetables','Fresh, handpicked vegetables delivered straight from trusted farms to your home. Enjoy clean, high-quality sabzi every day-healthy, natural, and full of freshness.','2025-12-18T04:23:40.707Z',1,'store-images/1766051618139.png'); +INSERT INTO store_info VALUES(8,'Demo2','Demo2 ','2026-03-21T09:35:33.855Z',1,'store-images/1774105532235.jpg'); +INSERT INTO store_info VALUES(9,'Test3','Test3','2026-03-21T23:18:44.202Z',1,'store-images/1774524652442.jpg'); +CREATE TABLE IF NOT EXISTS "units" ("id" INTEGER PRIMARY KEY, "short_notation" TEXT NOT NULL, "full_name" TEXT NOT NULL); +INSERT INTO units VALUES(1,'Kg','Kilogram'); +INSERT INTO units VALUES(2,'L','Litre'); +INSERT INTO units VALUES(3,'Dz','Dozen'); +INSERT INTO units VALUES(4,'Pc','Unit Piece'); +CREATE TABLE IF NOT EXISTS "unlogged_user_tokens" ("id" INTEGER PRIMARY KEY, "token" TEXT NOT NULL, "added_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "last_verified" TEXT); +INSERT INTO unlogged_user_tokens VALUES(2,'ExponentPushToken[5NlYMFDaJDm9RH7N14zUrA]','2026-03-20T02:00:07.752Z','2026-03-20T02:00:07.748Z'); +INSERT INTO unlogged_user_tokens VALUES(3,'ExponentPushToken[QjoZ9xGsqPYMF2CJC_pv7e]','2026-03-20T02:11:22.747Z','2026-03-20T02:11:22.746Z'); +INSERT INTO unlogged_user_tokens VALUES(4,'ExponentPushToken[IAt9_oGP63t5X2AKTm-Z_r]','2026-03-20T03:32:58.675Z','2026-03-21T01:23:00.017Z'); +CREATE TABLE IF NOT EXISTS "upload_url_status" ("id" INTEGER PRIMARY KEY, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "key" TEXT NOT NULL, "status" TEXT NOT NULL DEFAULT 'pending'); +INSERT INTO upload_url_status VALUES(35,'2025-12-07T03:28:13.136Z','review-images/1765097892914.jpg','pending'); +INSERT INTO upload_url_status VALUES(36,'2025-12-07T03:28:13.347Z','review-images/1765097893129.png','pending'); +INSERT INTO upload_url_status VALUES(37,'2025-12-07T03:33:04.090Z','review-images/1765098183876.jpg','pending'); +INSERT INTO upload_url_status VALUES(38,'2025-12-07T03:36:01.524Z','review-images/1765098361309.jpg','pending'); +INSERT INTO upload_url_status VALUES(39,'2025-12-07T03:38:00.499Z','review-images/1765098480284.jpg','pending'); +INSERT INTO upload_url_status VALUES(40,'2025-12-07T03:40:38.378Z','review-images/1765098638162.jpg','pending'); +INSERT INTO upload_url_status VALUES(41,'2025-12-07T03:44:45.828Z','review-images/1765098885608.jpg','pending'); +INSERT INTO upload_url_status VALUES(42,'2025-12-07T03:44:46.024Z','review-images/1765098885808.png','pending'); +INSERT INTO upload_url_status VALUES(43,'2025-12-07T03:45:55.598Z','review-images/1765098955365.jpg','pending'); +INSERT INTO upload_url_status VALUES(44,'2025-12-07T03:48:02.893Z','review-images/1765099082661.jpg','pending'); +INSERT INTO upload_url_status VALUES(45,'2025-12-07T03:54:36.343Z','review-images/1765099476101.jpg','pending'); +INSERT INTO upload_url_status VALUES(46,'2025-12-07T03:54:36.534Z','review-images/1765099476297.png','pending'); +INSERT INTO upload_url_status VALUES(47,'2025-12-07T04:21:35.194Z','review-images/1765101095057.jpg','pending'); +INSERT INTO upload_url_status VALUES(48,'2025-12-07T04:21:35.389Z','review-images/1765101095257.png','pending'); +INSERT INTO upload_url_status VALUES(49,'2025-12-07T04:21:43.722Z','review-images/1765101103591.jpg','pending'); +INSERT INTO upload_url_status VALUES(50,'2025-12-07T04:21:43.890Z','review-images/1765101103758.png','pending'); +INSERT INTO upload_url_status VALUES(51,'2025-12-07T04:24:01.353Z','review-images/1765101241219.jpg','pending'); +INSERT INTO upload_url_status VALUES(52,'2025-12-07T05:37:42.847Z','review-images/1765105662736.jpg','pending'); +INSERT INTO upload_url_status VALUES(53,'2025-12-07T05:40:19.798Z','review-images/1765105819687.jpg','pending'); +INSERT INTO upload_url_status VALUES(54,'2025-12-07T05:43:50.973Z','review-images/1765106030866.jpg','pending'); +INSERT INTO upload_url_status VALUES(55,'2025-12-07T05:48:27.294Z','review-images/1765106307190.jpg','pending'); +INSERT INTO upload_url_status VALUES(56,'2025-12-07T05:49:52.911Z','review-images/1765106392806.jpg','claimed'); +INSERT INTO upload_url_status VALUES(57,'2025-12-07T06:28:47.323Z','review-images/1765108727182.jpg','claimed'); +INSERT INTO upload_url_status VALUES(58,'2025-12-07T06:30:52.243Z','review-images/1765108852104.jpg','claimed'); +INSERT INTO upload_url_status VALUES(59,'2025-12-07T09:35:32.784Z','review-images/1765119932782.jpg','claimed'); +INSERT INTO upload_url_status VALUES(60,'2025-12-07T09:35:32.803Z','review-images/1765119932802.jpg','claimed'); +INSERT INTO upload_url_status VALUES(61,'2025-12-07T09:35:35.171Z','review-images/1765119935171.jpg','claimed'); +INSERT INTO upload_url_status VALUES(62,'2025-12-07T09:35:35.175Z','review-images/1765119935174.jpg','claimed'); +INSERT INTO upload_url_status VALUES(63,'2025-12-08T12:07:24.062Z','store-images/1765215443815.jpg','pending'); +INSERT INTO upload_url_status VALUES(64,'2025-12-08T12:19:22.136Z','store-images/1765216161855.jpg','pending'); +INSERT INTO upload_url_status VALUES(65,'2025-12-08T12:19:50.299Z','store-images/1765216190015.jpg','pending'); +INSERT INTO upload_url_status VALUES(66,'2025-12-08T12:22:27.708Z','store-images/1765216347423.jpg','pending'); +INSERT INTO upload_url_status VALUES(67,'2025-12-08T12:23:17.627Z','store-images/1765216397341.jpg','pending'); +INSERT INTO upload_url_status VALUES(68,'2025-12-08T12:23:50.898Z','store-images/1765216430679.jpg','pending'); +INSERT INTO upload_url_status VALUES(69,'2025-12-08T12:26:57.233Z','store-images/1765216617009.jpg','pending'); +INSERT INTO upload_url_status VALUES(70,'2025-12-08T12:35:30.092Z','store-images/1765217129859.jpg','pending'); +INSERT INTO upload_url_status VALUES(71,'2025-12-08T13:04:22.371Z','store-images/1765218862137.jpg','pending'); +INSERT INTO upload_url_status VALUES(72,'2025-12-08T13:14:47.858Z','store-images/1765219487659.jpg','pending'); +INSERT INTO upload_url_status VALUES(73,'2025-12-08T13:17:53.380Z','store-images/1765219673182.jpg','pending'); +INSERT INTO upload_url_status VALUES(74,'2025-12-08T13:18:59.825Z','store-images/1765219739627.jpg','pending'); +INSERT INTO upload_url_status VALUES(75,'2025-12-08T13:19:11.635Z','store-images/1765219751441.png','pending'); +INSERT INTO upload_url_status VALUES(76,'2025-12-08T13:26:24.852Z','store-images/1765220184655.jpg','pending'); +INSERT INTO upload_url_status VALUES(77,'2025-12-18T04:23:38.142Z','store-images/1766051618139.png','pending'); +INSERT INTO upload_url_status VALUES(78,'2025-12-18T04:29:00.775Z','store-images/1766051940774.png','pending'); +INSERT INTO upload_url_status VALUES(79,'2025-12-18T04:31:13.748Z','store-images/1766052073748.png','pending'); +INSERT INTO upload_url_status VALUES(80,'2025-12-18T05:00:28.605Z','store-images/1766053828604.png','pending'); +INSERT INTO upload_url_status VALUES(81,'2025-12-19T02:24:01.803Z','store-images/1766130841801.png','pending'); +INSERT INTO upload_url_status VALUES(82,'2025-12-19T03:21:37.362Z','store-images/1766134297361.png','pending'); +INSERT INTO upload_url_status VALUES(83,'2025-12-19T09:36:54.727Z','store-images/1766156814725.jpg','pending'); +INSERT INTO upload_url_status VALUES(84,'2025-12-19T09:37:23.364Z','store-images/1766156843363.jpg','pending'); +INSERT INTO upload_url_status VALUES(85,'2025-12-19T09:48:15.263Z','review-images/1766157495262.jpg','claimed'); +INSERT INTO upload_url_status VALUES(86,'2025-12-19T09:48:16.653Z','review-images/1766157496653.jpg','claimed'); +INSERT INTO upload_url_status VALUES(87,'2025-12-22T11:38:49.581Z','review-images/1766423329579.jpg','claimed'); +INSERT INTO upload_url_status VALUES(88,'2025-12-24T05:08:16.926Z','review-images/1766572696924.jpg','pending'); +INSERT INTO upload_url_status VALUES(89,'2025-12-24T05:08:19.865Z','review-images/1766572699864.jpg','pending'); +INSERT INTO upload_url_status VALUES(90,'2025-12-24T05:08:20.373Z','review-images/1766572700372.jpg','pending'); +INSERT INTO upload_url_status VALUES(91,'2025-12-24T05:08:20.544Z','review-images/1766572700543.jpg','claimed'); +INSERT INTO upload_url_status VALUES(92,'2025-12-24T05:08:20.718Z','review-images/1766572700718.jpg','pending'); +INSERT INTO upload_url_status VALUES(93,'2025-12-24T05:08:20.880Z','review-images/1766572700880.jpg','claimed'); +INSERT INTO upload_url_status VALUES(94,'2025-12-24T05:08:21.138Z','review-images/1766572701138.jpg','claimed'); +INSERT INTO upload_url_status VALUES(95,'2025-12-24T05:08:21.266Z','review-images/1766572701266.jpg','claimed'); +INSERT INTO upload_url_status VALUES(96,'2025-12-24T05:08:21.491Z','review-images/1766572701490.jpg','claimed'); +INSERT INTO upload_url_status VALUES(97,'2025-12-31T01:38:50.807Z','store-images/1767164930805.jpg','pending'); +INSERT INTO upload_url_status VALUES(98,'2025-12-31T01:47:30.381Z','store-images/1767165450380.jpg','pending'); +INSERT INTO upload_url_status VALUES(99,'2025-12-31T03:50:22.326Z','store-images/1767172822325.jpg','pending'); +INSERT INTO upload_url_status VALUES(100,'2025-12-31T03:51:09.711Z','store-images/1767172869656.jpg','pending'); +INSERT INTO upload_url_status VALUES(101,'2025-12-31T03:52:27.878Z','store-images/1767172947808.jpg','pending'); +INSERT INTO upload_url_status VALUES(102,'2025-12-31T03:56:02.505Z','store-images/1767173162428.jpg','pending'); +INSERT INTO upload_url_status VALUES(103,'2025-12-31T03:57:38.564Z','store-images/1767173258487.jpg','pending'); +INSERT INTO upload_url_status VALUES(104,'2025-12-31T03:58:37.526Z','store-images/1767173317447.jpg','pending'); +INSERT INTO upload_url_status VALUES(105,'2025-12-31T03:59:01.794Z','store-images/1767173341715.jpg','pending'); +INSERT INTO upload_url_status VALUES(106,'2025-12-31T04:00:21.099Z','store-images/1767173421020.jpg','pending'); +INSERT INTO upload_url_status VALUES(107,'2025-12-31T04:02:13.724Z','store-images/1767173533644.jpg','pending'); +INSERT INTO upload_url_status VALUES(108,'2025-12-31T04:22:07.810Z','store-images/1767174727704.png','pending'); +INSERT INTO upload_url_status VALUES(109,'2025-12-31T04:23:31.985Z','store-images/1767174811880.png','pending'); +INSERT INTO upload_url_status VALUES(110,'2025-12-31T06:24:23.209Z','store-images/1767182063206.jpg','pending'); +INSERT INTO upload_url_status VALUES(111,'2026-01-01T05:10:51.927Z','store-images/1767264051926.png','pending'); +INSERT INTO upload_url_status VALUES(112,'2026-01-01T05:10:53.379Z','store-images/1767264053378.png','pending'); +INSERT INTO upload_url_status VALUES(113,'2026-01-03T04:36:07.083Z','store-images/1767434767082.png','pending'); +INSERT INTO upload_url_status VALUES(114,'2026-01-18T21:44:01.277Z','review-images/1768792441275.jpg','claimed'); +INSERT INTO upload_url_status VALUES(115,'2026-01-18T21:44:01.748Z','review-images/1768792441748.jpg','claimed'); +INSERT INTO upload_url_status VALUES(116,'2026-01-24T02:31:51.676Z','store-images/1769241711675.png','pending'); +INSERT INTO upload_url_status VALUES(117,'2026-02-05T03:14:05.023Z','store-images/1770281045021.jpg','pending'); +INSERT INTO upload_url_status VALUES(118,'2026-02-05T03:14:06.298Z','store-images/1770281046297.jpg','pending'); +INSERT INTO upload_url_status VALUES(119,'2026-02-06T20:13:56.019Z','store-images/1770428636017.png','pending'); +INSERT INTO upload_url_status VALUES(120,'2026-02-06T20:29:53.456Z','store-images/1770429593455.jpg','pending'); +INSERT INTO upload_url_status VALUES(121,'2026-02-08T09:05:45.256Z','notification-images/1770561345196.jpg','pending'); +INSERT INTO upload_url_status VALUES(122,'2026-02-08T09:10:44.302Z','notification-images/1770561644251.jpg','pending'); +INSERT INTO upload_url_status VALUES(123,'2026-02-08T09:12:48.344Z','notification-images/1770561768293.jpg','pending'); +INSERT INTO upload_url_status VALUES(124,'2026-02-08T09:16:02.798Z','notification-images/1770561962747.jpg','pending'); +INSERT INTO upload_url_status VALUES(125,'2026-02-08T09:18:25.414Z','notification-images/1770562105363.jpg','pending'); +INSERT INTO upload_url_status VALUES(126,'2026-02-08T09:20:51.168Z','notification-images/1770562251117.jpg','pending'); +INSERT INTO upload_url_status VALUES(127,'2026-02-08T09:25:03.084Z','notification-images/1770562502985.jpg','pending'); +INSERT INTO upload_url_status VALUES(128,'2026-02-08T09:28:10.135Z','notification-images/1770562690047.jpg','pending'); +INSERT INTO upload_url_status VALUES(129,'2026-02-08T09:29:29.284Z','notification-images/1770562769196.jpg','pending'); +INSERT INTO upload_url_status VALUES(130,'2026-02-08T09:30:26.055Z','notification-images/1770562825967.jpg','pending'); +INSERT INTO upload_url_status VALUES(131,'2026-02-08T09:38:15.554Z','notification-images/1770563295459.jpg','pending'); +INSERT INTO upload_url_status VALUES(132,'2026-02-08T10:10:16.618Z','notification-images/1770565216512.jpg','pending'); +INSERT INTO upload_url_status VALUES(133,'2026-02-08T10:11:54.181Z','notification-images/1770565314077.jpg','pending'); +INSERT INTO upload_url_status VALUES(134,'2026-02-08T10:15:57.611Z','notification-images/1770565557504.jpg','pending'); +INSERT INTO upload_url_status VALUES(135,'2026-02-08T10:20:10.883Z','notification-images/1770565810774.jpg','pending'); +INSERT INTO upload_url_status VALUES(136,'2026-02-08T10:21:46.053Z','notification-images/1770565905943.jpg','pending'); +INSERT INTO upload_url_status VALUES(137,'2026-02-08T13:20:07.705Z','notification-images/1770576607704.jpg','pending'); +INSERT INTO upload_url_status VALUES(170,'2026-03-20T09:16:34.603Z','store-images/1774017994443.jpg','pending'); +INSERT INTO upload_url_status VALUES(171,'2026-03-20T09:17:04.596Z','store-images/1774018024432.jpg','pending'); +INSERT INTO upload_url_status VALUES(172,'2026-03-20T09:20:04.863Z','store-images/1774018204689.jpg','pending'); +INSERT INTO upload_url_status VALUES(173,'2026-03-20T09:20:57.508Z','store-images/1774018257330.jpg','pending'); +INSERT INTO upload_url_status VALUES(174,'2026-03-20T09:22:44.445Z','store-images/1774018364266.jpg','pending'); +INSERT INTO upload_url_status VALUES(175,'2026-03-21T09:24:15.290Z','store-images/1774104855151.jpg','pending'); +INSERT INTO upload_url_status VALUES(176,'2026-03-21T09:34:11.705Z','store-images/1774105451535.jpg','pending'); +INSERT INTO upload_url_status VALUES(177,'2026-03-21T09:35:32.404Z','store-images/1774105532235.jpg','pending'); +INSERT INTO upload_url_status VALUES(178,'2026-03-21T10:37:23.303Z','product-images/1774109243042.jpg','pending'); +INSERT INTO upload_url_status VALUES(179,'2026-03-21T10:37:23.532Z','product-images/1774109243274.jpg','pending'); +INSERT INTO upload_url_status VALUES(180,'2026-03-21T10:39:51.342Z','product-images/1774109391069.jpg','pending'); +INSERT INTO upload_url_status VALUES(181,'2026-03-21T10:39:51.668Z','product-images/1774109391409.jpg','pending'); +INSERT INTO upload_url_status VALUES(182,'2026-03-21T10:44:02.249Z','product-images/1774109641982.jpg','pending'); +INSERT INTO upload_url_status VALUES(183,'2026-03-21T10:44:02.477Z','product-images/1774109642211.jpg','pending'); +INSERT INTO upload_url_status VALUES(184,'2026-03-21T10:47:55.364Z','product-images/1774109875092.jpg','claimed'); +INSERT INTO upload_url_status VALUES(185,'2026-03-21T10:47:55.552Z','product-images/1774109875283.jpg','claimed'); +INSERT INTO upload_url_status VALUES(186,'2026-03-21T10:53:34.410Z','product-images/1774110214128.jpg','claimed'); +INSERT INTO upload_url_status VALUES(187,'2026-03-21T11:05:02.699Z','product-images/1774110902472.jpg','claimed'); +INSERT INTO upload_url_status VALUES(188,'2026-03-21T11:05:46.485Z','product-images/1774110946273.jpg','claimed'); +INSERT INTO upload_url_status VALUES(189,'2026-03-21T11:05:46.696Z','product-images/1774110946486.jpg','claimed'); +INSERT INTO upload_url_status VALUES(190,'2026-03-21T11:06:37.135Z','product-images/1774110996916.jpg','claimed'); +INSERT INTO upload_url_status VALUES(191,'2026-03-21T11:21:57.523Z','product-images/1774111917349.jpg','claimed'); +INSERT INTO upload_url_status VALUES(192,'2026-03-21T11:21:57.776Z','product-images/1774111917606.jpg','claimed'); +INSERT INTO upload_url_status VALUES(193,'2026-03-21T11:22:57.142Z','product-images/1774111976967.jpg','claimed'); +INSERT INTO upload_url_status VALUES(194,'2026-03-21T11:22:57.326Z','product-images/1774111977156.jpg','claimed'); +INSERT INTO upload_url_status VALUES(195,'2026-03-21T12:20:31.649Z','product-images/1774115431487.jpg','claimed'); +INSERT INTO upload_url_status VALUES(196,'2026-03-21T12:34:26.218Z','product-images/1774116266063.jpg','claimed'); +INSERT INTO upload_url_status VALUES(197,'2026-03-21T23:15:45.311Z','store-images/1774154745204.jpg','pending'); +INSERT INTO upload_url_status VALUES(198,'2026-03-21T23:18:41.659Z','store-images/1774154921529.jpg','pending'); +INSERT INTO upload_url_status VALUES(199,'2026-03-21T23:18:53.275Z','store-images/1774154933114.jpg','pending'); +INSERT INTO upload_url_status VALUES(200,'2026-03-22T00:28:59.866Z','profile-images/1774159139649.jpg','claimed'); +INSERT INTO upload_url_status VALUES(201,'2026-03-22T00:40:45.910Z','profile-images/1774159845659.jpg','claimed'); +INSERT INTO upload_url_status VALUES(202,'2026-03-22T04:45:38.531Z','complaint-images/1774174538370.jpg','claimed'); +INSERT INTO upload_url_status VALUES(203,'2026-03-22T04:57:50.211Z','complaint-images/1774175270043.jpg','claimed'); +INSERT INTO upload_url_status VALUES(204,'2026-03-22T05:06:00.920Z','complaint-images/1774175760765.jpg','claimed'); +INSERT INTO upload_url_status VALUES(205,'2026-03-22T05:08:54.126Z','complaint-images/1774175933889.jpg','claimed'); +INSERT INTO upload_url_status VALUES(206,'2026-03-22T05:10:03.192Z','complaint-images/1774176003038.jpg','claimed'); +INSERT INTO upload_url_status VALUES(207,'2026-03-22T05:10:03.381Z','complaint-images/1774176003229.jpg','claimed'); +INSERT INTO upload_url_status VALUES(208,'2026-03-22T05:10:03.567Z','complaint-images/1774176003414.jpg','claimed'); +INSERT INTO upload_url_status VALUES(209,'2026-03-24T09:49:20.825Z','store-images/1774365560714.jpg','pending'); +INSERT INTO upload_url_status VALUES(210,'2026-03-26T05:56:41.671Z','profile-images/1774524401549.jpg','pending'); +INSERT INTO upload_url_status VALUES(211,'2026-03-26T05:58:44.761Z','product-images/1774524524649.jpg','claimed'); +INSERT INTO upload_url_status VALUES(212,'2026-03-26T05:58:44.957Z','product-images/1774524524845.jpg','claimed'); +INSERT INTO upload_url_status VALUES(213,'2026-03-26T05:58:45.145Z','product-images/1774524525034.jpg','claimed'); +INSERT INTO upload_url_status VALUES(214,'2026-03-26T05:58:45.334Z','product-images/1774524525222.jpg','claimed'); +INSERT INTO upload_url_status VALUES(215,'2026-03-26T06:00:52.552Z','store-images/1774524652442.jpg','pending'); +INSERT INTO upload_url_status VALUES(216,'2026-03-26T06:15:11.287Z','product-images/1774525511146.jpg','claimed'); +CREATE TABLE IF NOT EXISTS "user_creds" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "user_password" TEXT NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO user_creds VALUES(2,1,'$2b$10$aJacFZFCniKqXOewMIlznOsEKcTJa/ji7xBU2dhHsioxTC0mR9BvK','2025-11-19T12:00:25.180Z'); +INSERT INTO user_creds VALUES(3,17,'$2b$10$mn/CpXmKq.dKgeH2gHtKk.IvlgQyahG2tCpD8k42mPOEysWoO3pti','2025-12-19T03:44:09.761Z'); +CREATE TABLE IF NOT EXISTS "user_details" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "bio" TEXT, "date_of_birth" TEXT, "gender" TEXT, "occupation" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "profile_image" TEXT, "is_suspended" INTEGER NOT NULL DEFAULT false); +INSERT INTO user_details VALUES(1,1,NULL,NULL,NULL,NULL,'2025-11-18T10:56:21.130Z','2026-03-26T05:56:44.292Z','profile-images/1774524401549.jpg',0); +INSERT INTO user_details VALUES(2,2,NULL,NULL,NULL,NULL,'2025-11-28T14:47:57.109Z','2025-11-28T14:47:57.109Z',NULL,0); +INSERT INTO user_details VALUES(6,4,NULL,NULL,NULL,NULL,'2025-12-02T09:58:27.226Z','2025-12-02T10:02:29.066Z','profile-images/1764689548097-1000159418.jpg',0); +INSERT INTO user_details VALUES(7,16,NULL,NULL,NULL,NULL,'2025-12-19T01:45:00.531Z','2025-12-19T01:45:00.530Z',NULL,0); +INSERT INTO user_details VALUES(8,17,NULL,NULL,NULL,NULL,'2025-12-19T03:43:18.108Z','2025-12-20T05:54:43.942Z','profile-images/1766229878891-1000167980.jpg',0); +INSERT INTO user_details VALUES(9,22,NULL,NULL,NULL,NULL,'2026-01-18T01:00:42.356Z','2026-01-18T01:00:42.355Z',NULL,0); +INSERT INTO user_details VALUES(10,54,NULL,NULL,NULL,NULL,'2026-01-26T06:43:25.929Z','2026-01-26T06:43:25.928Z',NULL,0); +INSERT INTO user_details VALUES(11,61,NULL,NULL,NULL,NULL,'2026-01-26T23:34:37.576Z','2026-01-26T23:34:37.575Z',NULL,0); +INSERT INTO user_details VALUES(12,62,NULL,NULL,NULL,NULL,'2026-01-27T00:04:43.010Z','2026-01-27T00:04:43.009Z',NULL,0); +INSERT INTO user_details VALUES(13,107,NULL,NULL,NULL,NULL,'2026-02-06T02:46:48.046Z','2026-02-06T02:46:48.045Z',NULL,0); +INSERT INTO user_details VALUES(14,91,NULL,NULL,NULL,NULL,'2026-02-07T04:18:52.616Z','2026-02-07T04:18:52.615Z',NULL,0); +INSERT INTO user_details VALUES(15,121,NULL,NULL,NULL,NULL,'2026-02-08T10:09:19.571Z','2026-02-08T10:09:19.571Z',NULL,1); +INSERT INTO user_details VALUES(16,12,NULL,NULL,NULL,NULL,'2026-02-08T10:09:58.357Z','2026-02-08T10:09:58.357Z',NULL,0); +INSERT INTO user_details VALUES(17,145,NULL,NULL,NULL,NULL,'2026-02-18T03:41:32.333Z','2026-02-18T03:41:32.332Z',NULL,0); +INSERT INTO user_details VALUES(18,159,NULL,NULL,NULL,NULL,'2026-02-19T04:08:47.047Z','2026-02-19T04:08:47.046Z',NULL,0); +INSERT INTO user_details VALUES(19,151,NULL,NULL,NULL,NULL,'2026-02-19T06:13:14.187Z','2026-02-19T06:13:14.186Z',NULL,0); +INSERT INTO user_details VALUES(20,140,NULL,NULL,NULL,NULL,'2026-02-20T03:30:19.023Z','2026-02-20T03:30:19.022Z',NULL,0); +INSERT INTO user_details VALUES(21,172,NULL,NULL,NULL,NULL,'2026-02-20T04:04:44.392Z','2026-02-20T04:04:44.391Z',NULL,0); +INSERT INTO user_details VALUES(22,184,NULL,NULL,NULL,NULL,'2026-02-22T00:49:25.502Z','2026-02-22T00:51:54.175Z','profile-images/1771741313402-1000001181.jpg',0); +INSERT INTO user_details VALUES(23,99,NULL,NULL,NULL,NULL,'2026-02-22T04:52:08.552Z','2026-02-22T04:52:08.551Z',NULL,0); +INSERT INTO user_details VALUES(56,265,NULL,NULL,NULL,NULL,'2026-03-22T00:29:01.903Z','2026-03-22T00:29:01.903Z','profile-images/1774159845659.jpg',0); +CREATE TABLE IF NOT EXISTS "user_incidents" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "order_id" INTEGER, "date_added" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "admin_comment" TEXT, "added_by" INTEGER, "negativity_score" INTEGER); +INSERT INTO user_incidents VALUES(1,1,384,'2026-03-04T10:40:45.532Z','Not Paying Money',1,2); +CREATE TABLE IF NOT EXISTS "user_notifications" ("id" INTEGER PRIMARY KEY, "image_url" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "body" TEXT NOT NULL, "applicable_users" TEXT, "title" TEXT NOT NULL); +INSERT INTO user_notifications VALUES(21,NULL,'2026-02-08T23:51:32.312Z',replace(replace('Van Winkle liked hunting, too. He liked going to the mountains to shoot squirrels. \r\nHe also liked sitting in the mountains and watching the world below—the','\r',char(13)),'\n',char(10)),'[1]','Hii'); +INSERT INTO user_notifications VALUES(22,NULL,'2026-02-09T03:28:19.744Z','Test Notification','[65]','Hello'); +INSERT INTO user_notifications VALUES(23,NULL,'2026-02-09T03:29:52.024Z','Hello','[1,65]','Hello'); +INSERT INTO user_notifications VALUES(24,NULL,'2026-02-20T07:52:30.399Z','Freshyo','[2]','Qusham'); +INSERT INTO user_notifications VALUES(25,NULL,'2026-02-23T02:20:51.468Z','Buy fresh, juicy and titillating fruits. Order Now!','[2,3,6,7,4,9,12,21,24,26,1,38,39,22,50,64,65,66,74,82,98,102,107,113,115,118,91,119,120,121,122,123,124,125,127,128,129,131,132,133,134,135,136,137,138,139,141,142,143,144,145,146,147,148,149,150,152,153,154,155,156,157,158,160,159,161,162,151,163,164,166,165,167,140,169,170,172,173,174,175,176,177,178,179,180,181,182,183,185,186,188,189,191,190,194,184,221,220,219,217,216,215,214,213,212,210,99,209,208,207,206,205,204,203,202,201,200,199,198,197,196,195]','Mesmerizing Fruits'); +CREATE TABLE IF NOT EXISTS "users" ("id" INTEGER PRIMARY KEY, "name" TEXT, "email" TEXT, "mobile" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO users VALUES(1,'Mohammed Shafiuddin','mohammedshafiuddin54@gmail.com','9676651496','2025-11-18T08:35:55.801Z'); +INSERT INTO users VALUES(2,NULL,NULL,'8688182552','2025-11-19T06:34:47.086Z'); +INSERT INTO users VALUES(3,NULL,NULL,'9000190484','2025-11-19T07:06:09.284Z'); +INSERT INTO users VALUES(4,'Saniya','saniya123@gmail.com','8688326100','2025-11-20T11:58:13.296Z'); +INSERT INTO users VALUES(5,NULL,NULL,'7093212611','2025-11-22T05:35:41.069Z'); +INSERT INTO users VALUES(6,NULL,NULL,'9346436140','2025-11-22T09:02:42.569Z'); +INSERT INTO users VALUES(7,NULL,NULL,'7386623412','2025-11-28T22:18:57.177Z'); +INSERT INTO users VALUES(8,NULL,NULL,'7675084307','2025-11-29T08:33:35.481Z'); +INSERT INTO users VALUES(9,NULL,NULL,'8985081850','2025-12-07T21:58:30.768Z'); +INSERT INTO users VALUES(10,NULL,NULL,'8121258519','2025-12-07T23:16:29.228Z'); +INSERT INTO users VALUES(11,NULL,NULL,'8639236092','2025-12-14T07:50:29.893Z'); +INSERT INTO users VALUES(12,NULL,NULL,'6302478945','2025-12-18T05:03:06.218Z'); +INSERT INTO users VALUES(13,NULL,NULL,'7095705186','2025-12-19T00:31:43.745Z'); +INSERT INTO users VALUES(14,NULL,NULL,'9390567030','2025-12-19T00:52:18.278Z'); +INSERT INTO users VALUES(15,NULL,NULL,'9866116948','2025-12-19T00:58:58.593Z'); +INSERT INTO users VALUES(16,'pradeep','pradeepdeep484@gmail.com','7799420184','2025-12-19T01:44:25.069Z'); +INSERT INTO users VALUES(17,'Bha','sbhavanikumar2016@gmail.com','7013167289','2025-12-19T03:01:17.931Z'); +INSERT INTO users VALUES(18,NULL,NULL,'9381316634','2025-12-19T04:51:00.938Z'); +INSERT INTO users VALUES(19,NULL,NULL,'9398972993','2025-12-19T08:55:04.116Z'); +INSERT INTO users VALUES(20,NULL,NULL,'9676010763','2025-12-22T09:03:04.773Z'); +INSERT INTO users VALUES(21,NULL,NULL,'9701690010','2025-12-22T12:29:08.147Z'); +INSERT INTO users VALUES(22,'Nawaz','afunawaz@gmail.com','8885456295','2025-12-23T21:05:27.523Z'); +INSERT INTO users VALUES(23,NULL,NULL,'9247242246','2025-12-25T13:27:14.313Z'); +INSERT INTO users VALUES(24,NULL,NULL,'9948350118','2025-12-27T12:57:43.504Z'); +INSERT INTO users VALUES(25,NULL,NULL,'9848296296','2025-12-31T14:49:04.015Z'); +INSERT INTO users VALUES(26,NULL,NULL,'9652180398','2026-01-03T02:42:08.528Z'); +INSERT INTO users VALUES(27,NULL,NULL,'8074020144','2026-01-05T04:44:15.312Z'); +INSERT INTO users VALUES(28,NULL,NULL,'7382343977','2026-01-05T09:08:25.774Z'); +INSERT INTO users VALUES(29,NULL,NULL,'6302300646','2026-01-06T04:28:48.967Z'); +INSERT INTO users VALUES(30,NULL,NULL,'8341217812','2026-01-06T07:44:49.015Z'); +INSERT INTO users VALUES(31,NULL,NULL,'7601003021','2026-01-12T02:18:41.456Z'); +INSERT INTO users VALUES(32,NULL,NULL,'8919304169','2026-01-12T02:56:48.668Z'); +INSERT INTO users VALUES(33,NULL,NULL,'9059529741','2026-01-13T09:20:02.174Z'); +INSERT INTO users VALUES(34,NULL,NULL,'9985254508','2026-01-13T09:25:27.981Z'); +INSERT INTO users VALUES(35,NULL,NULL,'6304804044','2026-01-13T09:29:31.683Z'); +INSERT INTO users VALUES(36,NULL,NULL,'6281222530','2026-01-13T16:42:02.068Z'); +INSERT INTO users VALUES(37,NULL,NULL,'8555038131','2026-01-14T09:28:43.382Z'); +INSERT INTO users VALUES(38,NULL,NULL,'9492230173','2026-01-15T03:25:50.547Z'); +INSERT INTO users VALUES(39,NULL,NULL,'6281768720','2026-01-16T06:33:17.501Z'); +INSERT INTO users VALUES(40,NULL,NULL,'8790196183','2026-01-18T11:31:13.136Z'); +INSERT INTO users VALUES(41,NULL,NULL,'9618451678','2026-01-20T04:07:45.096Z'); +INSERT INTO users VALUES(42,NULL,NULL,'8019548522','2026-01-21T00:01:02.852Z'); +INSERT INTO users VALUES(43,NULL,NULL,'9985751104','2026-01-22T06:40:13.655Z'); +INSERT INTO users VALUES(44,NULL,NULL,'6302138817','2026-01-22T06:55:55.593Z'); +INSERT INTO users VALUES(45,NULL,NULL,'7989242921','2026-01-22T06:57:29.593Z'); +INSERT INTO users VALUES(46,NULL,NULL,'9392266793','2026-01-22T07:00:03.023Z'); +INSERT INTO users VALUES(47,NULL,NULL,'7013843505','2026-01-22T07:16:37.997Z'); +INSERT INTO users VALUES(48,NULL,NULL,'9642200622','2026-01-23T07:57:20.233Z'); +INSERT INTO users VALUES(49,NULL,NULL,'9182043867','2026-01-23T13:48:07.569Z'); +INSERT INTO users VALUES(50,NULL,NULL,'9390338662','2026-01-23T13:57:09.989Z'); +INSERT INTO users VALUES(51,NULL,NULL,'8686465444','2026-01-23T22:48:49.770Z'); +INSERT INTO users VALUES(52,NULL,NULL,'8121807322','2026-01-26T00:53:18.325Z'); +INSERT INTO users VALUES(53,NULL,NULL,'8886868702','2026-01-26T02:32:51.301Z'); +INSERT INTO users VALUES(54,'Abdul ahad','umizazarieshzarish@gmail.com','9849759289','2026-01-26T06:39:06.569Z'); +INSERT INTO users VALUES(55,NULL,NULL,'7780659850','2026-01-26T09:29:28.984Z'); +INSERT INTO users VALUES(56,NULL,NULL,'7396924154','2026-01-26T09:46:27.950Z'); +INSERT INTO users VALUES(57,NULL,NULL,'9515837506','2026-01-26T10:09:05.694Z'); +INSERT INTO users VALUES(58,NULL,NULL,'9603333080','2026-01-26T11:52:06.161Z'); +INSERT INTO users VALUES(59,NULL,NULL,'9490585051','2026-01-26T13:07:07.742Z'); +INSERT INTO users VALUES(60,NULL,NULL,'8331989727','2026-01-26T22:19:45.345Z'); +INSERT INTO users VALUES(61,'Mohd Zubair khan','mohdzubair772@gmail.com','7729916250','2026-01-26T23:32:23.837Z'); +INSERT INTO users VALUES(62,'Aftab Ur Rahman','aftabaffu333@gmail.com','7671939155','2026-01-27T00:04:08.085Z'); +INSERT INTO users VALUES(63,NULL,NULL,'8328161112','2026-01-27T04:36:03.156Z'); +INSERT INTO users VALUES(64,NULL,NULL,'9985383270','2026-01-27T06:41:11.387Z'); +INSERT INTO users VALUES(65,NULL,NULL,'9381637374','2026-01-27T11:27:44.071Z'); +INSERT INTO users VALUES(66,NULL,NULL,'9618791714','2026-01-28T01:24:44.881Z'); +INSERT INTO users VALUES(67,NULL,NULL,'8297666911','2026-01-28T01:57:03.995Z'); +INSERT INTO users VALUES(68,NULL,NULL,'9441204280','2026-01-29T10:32:41.779Z'); +INSERT INTO users VALUES(69,NULL,NULL,'9949548015','2026-01-29T22:47:42.263Z'); +INSERT INTO users VALUES(70,NULL,NULL,'7842638264','2026-01-30T01:44:38.667Z'); +INSERT INTO users VALUES(71,NULL,NULL,'9110314975','2026-01-30T03:46:01.334Z'); +INSERT INTO users VALUES(72,NULL,NULL,'8686544418','2026-01-30T06:32:47.754Z'); +INSERT INTO users VALUES(73,NULL,NULL,'9652801308','2026-01-30T08:47:09.826Z'); +INSERT INTO users VALUES(74,NULL,NULL,'8639145664','2026-01-30T08:49:55.471Z'); +INSERT INTO users VALUES(75,NULL,NULL,'9966786521','2026-01-30T09:36:21.649Z'); +INSERT INTO users VALUES(76,NULL,NULL,'6300352629','2026-01-30T09:48:12.235Z'); +INSERT INTO users VALUES(77,NULL,NULL,'7287952112','2026-01-30T14:04:00.794Z'); +INSERT INTO users VALUES(78,NULL,NULL,'9059201201','2026-01-31T04:21:03.872Z'); +INSERT INTO users VALUES(79,NULL,NULL,'9701896405','2026-01-31T05:02:06.385Z'); +INSERT INTO users VALUES(80,NULL,NULL,'8897763408','2026-01-31T09:04:31.842Z'); +INSERT INTO users VALUES(81,NULL,NULL,'9652338446','2026-01-31T11:30:05.039Z'); +INSERT INTO users VALUES(82,NULL,NULL,'7981337554','2026-02-01T01:01:39.061Z'); +INSERT INTO users VALUES(83,NULL,NULL,'9441740551','2026-02-01T02:09:00.953Z'); +INSERT INTO users VALUES(84,NULL,NULL,'8639762655','2026-02-01T04:27:54.485Z'); +INSERT INTO users VALUES(85,NULL,NULL,'8897076204','2026-02-01T04:28:15.894Z'); +INSERT INTO users VALUES(86,NULL,NULL,'9121585783','2026-02-01T05:43:59.004Z'); +INSERT INTO users VALUES(87,NULL,NULL,'6301552539','2026-02-01T07:09:19.500Z'); +INSERT INTO users VALUES(88,NULL,NULL,'9398199100','2026-02-01T10:05:52.738Z'); +INSERT INTO users VALUES(89,NULL,NULL,'8919308867','2026-02-01T23:24:10.239Z'); +INSERT INTO users VALUES(90,NULL,NULL,'8688629245','2026-02-02T03:47:50.938Z'); +INSERT INTO users VALUES(91,'P Praveen Goud','ppraveengoud95@gmail.com','9347168525','2026-02-02T04:24:13.149Z'); +INSERT INTO users VALUES(92,NULL,NULL,'6305442889','2026-02-02T04:51:19.029Z'); +INSERT INTO users VALUES(93,NULL,NULL,'9705107988','2026-02-02T04:55:39.662Z'); +INSERT INTO users VALUES(94,NULL,NULL,'9392974026','2026-02-02T05:57:56.245Z'); +INSERT INTO users VALUES(95,NULL,NULL,'6301612623','2026-02-02T06:38:42.733Z'); +INSERT INTO users VALUES(96,NULL,NULL,'9848466280','2026-02-02T08:27:54.916Z'); +INSERT INTO users VALUES(97,NULL,NULL,'8522862163','2026-02-02T23:55:27.426Z'); +INSERT INTO users VALUES(98,NULL,NULL,'9381165946','2026-02-03T00:25:04.574Z'); +INSERT INTO users VALUES(99,'Saniya Shafeen','shafeensaniya45@gmail.com','7893499520','2026-02-03T04:39:25.892Z'); +INSERT INTO users VALUES(100,NULL,NULL,'6304650114','2026-02-03T09:18:43.200Z'); +INSERT INTO users VALUES(101,NULL,NULL,'9502114234','2026-02-04T00:14:08.656Z'); +INSERT INTO users VALUES(102,NULL,NULL,'9985202474','2026-02-04T08:47:28.278Z'); +INSERT INTO users VALUES(103,NULL,NULL,'6302119072','2026-02-05T03:14:11.453Z'); +INSERT INTO users VALUES(104,NULL,NULL,'7981006980','2026-02-05T03:16:32.728Z'); +INSERT INTO users VALUES(105,NULL,NULL,'9063857682','2026-02-05T22:57:15.947Z'); +INSERT INTO users VALUES(106,NULL,NULL,'9701261238','2026-02-06T02:43:06.599Z'); +INSERT INTO users VALUES(107,'Saad bin shafi','saadhindustanigamer@gmail.com','9573989830','2026-02-06T02:46:25.903Z'); +INSERT INTO users VALUES(108,NULL,NULL,'9949035807','2026-02-06T03:09:58.138Z'); +INSERT INTO users VALUES(109,NULL,NULL,'9063508083','2026-02-06T03:12:31.689Z'); +INSERT INTO users VALUES(110,NULL,NULL,'9985261902','2026-02-06T03:15:56.628Z'); +INSERT INTO users VALUES(111,NULL,NULL,'8106483142','2026-02-06T04:10:51.372Z'); +INSERT INTO users VALUES(112,NULL,NULL,'9542134959','2026-02-06T04:26:57.486Z'); +INSERT INTO users VALUES(113,NULL,NULL,'9052741123','2026-02-06T04:59:13.973Z'); +INSERT INTO users VALUES(114,NULL,NULL,'9052323490','2026-02-06T05:37:18.707Z'); +INSERT INTO users VALUES(115,NULL,NULL,'9949055660','2026-02-06T10:09:32.042Z'); +INSERT INTO users VALUES(116,NULL,NULL,'9885525123','2026-02-06T11:09:45.755Z'); +INSERT INTO users VALUES(117,NULL,NULL,'7013765027','2026-02-06T15:19:32.458Z'); +INSERT INTO users VALUES(118,NULL,NULL,'9966022031','2026-02-06T22:54:18.273Z'); +INSERT INTO users VALUES(119,NULL,NULL,'9059318255','2026-02-07T07:04:29.373Z'); +INSERT INTO users VALUES(120,NULL,NULL,'7013641457','2026-02-07T23:09:49.039Z'); +INSERT INTO users VALUES(121,NULL,NULL,'8639958133','2026-02-08T00:39:50.553Z'); +INSERT INTO users VALUES(122,NULL,NULL,'9642339427','2026-02-08T04:30:06.375Z'); +INSERT INTO users VALUES(123,NULL,NULL,'6305184261','2026-02-09T05:48:49.256Z'); +INSERT INTO users VALUES(124,NULL,NULL,'7993504221','2026-02-09T06:32:24.848Z'); +INSERT INTO users VALUES(125,NULL,NULL,'8341078342','2026-02-09T07:54:10.686Z'); +INSERT INTO users VALUES(126,NULL,NULL,'6305464103','2026-02-09T12:28:45.736Z'); +INSERT INTO users VALUES(127,NULL,NULL,'7989653339','2026-02-10T05:33:41.303Z'); +INSERT INTO users VALUES(128,NULL,NULL,'7032235482','2026-02-12T03:16:41.897Z'); +INSERT INTO users VALUES(129,NULL,NULL,'9581686892','2026-02-12T07:57:59.947Z'); +INSERT INTO users VALUES(130,NULL,NULL,'9912951895','2026-02-14T02:35:40.864Z'); +INSERT INTO users VALUES(131,NULL,NULL,'9966710280','2026-02-14T04:55:40.255Z'); +INSERT INTO users VALUES(132,NULL,NULL,'9110526651','2026-02-14T23:05:21.765Z'); +INSERT INTO users VALUES(133,NULL,NULL,'9398533610','2026-02-15T01:15:30.327Z'); +INSERT INTO users VALUES(134,NULL,NULL,'9133621540','2026-02-16T04:00:23.915Z'); +INSERT INTO users VALUES(135,NULL,NULL,'8660801043','2026-02-17T03:29:12.461Z'); +INSERT INTO users VALUES(136,NULL,NULL,'9390785046','2026-02-17T07:26:31.443Z'); +INSERT INTO users VALUES(137,NULL,NULL,'8555938403','2026-02-17T08:52:01.136Z'); +INSERT INTO users VALUES(138,NULL,NULL,'8328369823','2026-02-17T09:06:40.132Z'); +INSERT INTO users VALUES(139,NULL,NULL,'8143905611','2026-02-17T09:20:24.409Z'); +INSERT INTO users VALUES(140,'Sara','iiamsara554@gmail.com','9848738554','2026-02-17T13:47:07.407Z'); +INSERT INTO users VALUES(141,NULL,NULL,'8919042963','2026-02-17T19:44:41.712Z'); +INSERT INTO users VALUES(142,NULL,NULL,'9490020005','2026-02-17T22:23:19.414Z'); +INSERT INTO users VALUES(143,NULL,NULL,'7286888001','2026-02-17T22:54:09.153Z'); +INSERT INTO users VALUES(144,NULL,NULL,'7981140388','2026-02-18T03:32:55.242Z'); +INSERT INTO users VALUES(145,'Naheed','mohammednaheed007@gmail.com','8179264991','2026-02-18T03:39:58.246Z'); +INSERT INTO users VALUES(146,NULL,NULL,'9392457825','2026-02-18T04:29:38.244Z'); +INSERT INTO users VALUES(147,NULL,NULL,'9885579134','2026-02-18T05:14:12.703Z'); +INSERT INTO users VALUES(148,NULL,NULL,'9100529645','2026-02-18T07:29:50.622Z'); +INSERT INTO users VALUES(149,NULL,NULL,'8519862344','2026-02-18T09:09:16.387Z'); +INSERT INTO users VALUES(150,NULL,NULL,'9700630611','2026-02-18T09:11:40.075Z'); +INSERT INTO users VALUES(151,'Anjum','anjuman2504@gmail.com','9346508676','2026-02-18T09:21:02.267Z'); +INSERT INTO users VALUES(152,NULL,NULL,'6300961220','2026-02-18T10:43:20.416Z'); +INSERT INTO users VALUES(153,NULL,NULL,'9618363653','2026-02-18T13:29:45.209Z'); +INSERT INTO users VALUES(154,NULL,NULL,'7981078600','2026-02-18T23:28:16.145Z'); +INSERT INTO users VALUES(155,NULL,NULL,'9010023867','2026-02-18T23:41:27.596Z'); +INSERT INTO users VALUES(156,NULL,NULL,'9381371156','2026-02-18T23:57:31.708Z'); +INSERT INTO users VALUES(157,NULL,NULL,'6300072507','2026-02-19T01:25:16.627Z'); +INSERT INTO users VALUES(158,NULL,NULL,'9381289050','2026-02-19T01:44:34.090Z'); +INSERT INTO users VALUES(159,'Mohd.Mujahid','mujahidmohd953@gmail.com','9182114853','2026-02-19T03:38:52.038Z'); +INSERT INTO users VALUES(160,NULL,NULL,'9642417025','2026-02-19T03:46:24.011Z'); +INSERT INTO users VALUES(161,NULL,NULL,'8008981838','2026-02-19T04:25:22.873Z'); +INSERT INTO users VALUES(162,NULL,NULL,'6302798105','2026-02-19T05:06:14.768Z'); +INSERT INTO users VALUES(163,NULL,NULL,'7032026589','2026-02-19T06:46:48.871Z'); +INSERT INTO users VALUES(164,NULL,NULL,'7989819435','2026-02-19T07:01:00.060Z'); +INSERT INTO users VALUES(165,NULL,NULL,'6281349676','2026-02-19T10:26:45.515Z'); +INSERT INTO users VALUES(166,NULL,NULL,'7013950981','2026-02-19T12:05:05.705Z'); +INSERT INTO users VALUES(167,NULL,NULL,'9550936995','2026-02-20T03:19:18.911Z'); +INSERT INTO users VALUES(168,NULL,NULL,'8498937807','2026-02-20T03:28:19.863Z'); +INSERT INTO users VALUES(169,NULL,NULL,'7799420422','2026-02-20T03:35:55.512Z'); +INSERT INTO users VALUES(170,NULL,NULL,'9901294914','2026-02-20T03:53:54.048Z'); +INSERT INTO users VALUES(171,NULL,NULL,'6281738569','2026-02-20T03:55:41.510Z'); +INSERT INTO users VALUES(172,'Irfan','md.irfan.s@gmail.com','6300758922','2026-02-20T04:00:52.359Z'); +INSERT INTO users VALUES(173,NULL,NULL,'8978932551','2026-02-20T04:08:12.465Z'); +INSERT INTO users VALUES(174,NULL,NULL,'9642275691','2026-02-20T05:28:56.025Z'); +INSERT INTO users VALUES(175,NULL,NULL,'8179512068','2026-02-20T05:49:56.484Z'); +INSERT INTO users VALUES(176,NULL,NULL,'9885578647','2026-02-20T05:59:41.714Z'); +INSERT INTO users VALUES(177,NULL,NULL,'8519977988','2026-02-20T06:50:34.128Z'); +INSERT INTO users VALUES(178,NULL,NULL,'7799492001','2026-02-20T08:36:19.907Z'); +INSERT INTO users VALUES(179,NULL,NULL,'7995930618','2026-02-20T10:08:20.176Z'); +INSERT INTO users VALUES(180,NULL,NULL,'8328255182','2026-02-20T10:57:02.738Z'); +INSERT INTO users VALUES(181,NULL,NULL,'9885252564','2026-02-20T13:32:49.791Z'); +INSERT INTO users VALUES(182,NULL,NULL,'8790821267','2026-02-20T17:13:22.843Z'); +INSERT INTO users VALUES(183,NULL,NULL,'9885734956','2026-02-20T18:20:16.708Z'); +INSERT INTO users VALUES(184,'Muhammad Hussain','hussainmuhammad85@gmail.com','9160481161','2026-02-20T22:45:28.449Z'); +INSERT INTO users VALUES(185,NULL,NULL,'9966621818','2026-02-21T02:47:52.969Z'); +INSERT INTO users VALUES(186,NULL,NULL,'9550541366','2026-02-21T03:35:01.487Z'); +INSERT INTO users VALUES(187,NULL,NULL,'9703691566','2026-02-21T05:38:35.653Z'); +INSERT INTO users VALUES(188,NULL,NULL,'9014920842','2026-02-21T07:16:31.153Z'); +INSERT INTO users VALUES(189,NULL,NULL,'8019231723','2026-02-21T13:01:22.359Z'); +INSERT INTO users VALUES(190,NULL,NULL,'9912119864','2026-02-21T13:29:01.921Z'); +INSERT INTO users VALUES(191,NULL,NULL,'7097321320','2026-02-21T17:55:26.140Z'); +INSERT INTO users VALUES(192,NULL,NULL,'9160475130','2026-02-21T18:43:27.474Z'); +INSERT INTO users VALUES(193,NULL,NULL,'7207490881','2026-02-21T22:51:12.696Z'); +INSERT INTO users VALUES(194,NULL,NULL,'6302774527','2026-02-22T00:12:34.868Z'); +INSERT INTO users VALUES(195,NULL,NULL,'6301375032','2026-02-22T00:57:17.585Z'); +INSERT INTO users VALUES(196,NULL,NULL,'9666209134','2026-02-22T00:58:27.611Z'); +INSERT INTO users VALUES(197,NULL,NULL,'7842321671','2026-02-22T01:05:28.299Z'); +INSERT INTO users VALUES(198,NULL,NULL,'7799311559','2026-02-22T01:07:16.081Z'); +INSERT INTO users VALUES(199,NULL,NULL,'6301857893','2026-02-22T01:14:22.337Z'); +INSERT INTO users VALUES(200,NULL,NULL,'8328216403','2026-02-22T02:01:34.549Z'); +INSERT INTO users VALUES(201,NULL,NULL,'9121477995','2026-02-22T02:01:43.802Z'); +INSERT INTO users VALUES(202,NULL,NULL,'9347152305','2026-02-22T02:17:36.033Z'); +INSERT INTO users VALUES(203,NULL,NULL,'7989814618','2026-02-22T03:02:36.782Z'); +INSERT INTO users VALUES(204,NULL,NULL,'8919712147','2026-02-22T03:19:54.195Z'); +INSERT INTO users VALUES(205,NULL,NULL,'9177629869','2026-02-22T03:22:45.416Z'); +INSERT INTO users VALUES(206,NULL,NULL,'9000452637','2026-02-22T04:20:17.471Z'); +INSERT INTO users VALUES(207,NULL,NULL,'6301318598','2026-02-22T04:24:09.076Z'); +INSERT INTO users VALUES(208,NULL,NULL,'9618770682','2026-02-22T04:36:58.705Z'); +INSERT INTO users VALUES(209,NULL,NULL,'7993744243','2026-02-22T04:43:48.074Z'); +INSERT INTO users VALUES(210,NULL,NULL,'7989131798','2026-02-22T05:14:34.275Z'); +INSERT INTO users VALUES(211,NULL,NULL,'9398417118','2026-02-22T05:15:20.227Z'); +INSERT INTO users VALUES(212,NULL,NULL,'7670818331','2026-02-22T06:00:11.447Z'); +INSERT INTO users VALUES(213,NULL,NULL,'9392816978','2026-02-22T06:29:48.269Z'); +INSERT INTO users VALUES(214,NULL,NULL,'9110505256','2026-02-22T06:33:52.862Z'); +INSERT INTO users VALUES(215,NULL,NULL,'9573018203','2026-02-22T06:59:09.861Z'); +INSERT INTO users VALUES(216,NULL,NULL,'9542208012','2026-02-22T07:13:11.645Z'); +INSERT INTO users VALUES(217,NULL,NULL,'7285920951','2026-02-22T07:30:19.201Z'); +INSERT INTO users VALUES(218,NULL,NULL,'8886029909','2026-02-22T12:03:42.001Z'); +INSERT INTO users VALUES(219,NULL,NULL,'7569573638','2026-02-23T00:50:15.659Z'); +INSERT INTO users VALUES(220,NULL,NULL,'7993421951','2026-02-23T01:39:32.592Z'); +INSERT INTO users VALUES(221,NULL,NULL,'6301475500','2026-02-23T02:13:14.075Z'); +INSERT INTO users VALUES(222,NULL,NULL,'9951260514','2026-02-23T03:24:02.953Z'); +INSERT INTO users VALUES(223,NULL,NULL,'9398876512','2026-02-23T03:46:04.808Z'); +INSERT INTO users VALUES(224,NULL,NULL,'8374782337','2026-02-23T04:36:49.085Z'); +INSERT INTO users VALUES(225,NULL,NULL,'9666426396','2026-02-23T06:41:13.767Z'); +INSERT INTO users VALUES(226,NULL,NULL,'9391479179','2026-02-23T08:30:31.544Z'); +INSERT INTO users VALUES(227,NULL,NULL,'8688806599','2026-02-23T11:25:23.839Z'); +INSERT INTO users VALUES(228,NULL,NULL,'9966138248','2026-02-23T22:38:46.818Z'); +INSERT INTO users VALUES(229,NULL,NULL,'9885575791','2026-02-24T01:40:31.078Z'); +INSERT INTO users VALUES(230,NULL,NULL,'9398645142','2026-02-24T01:40:35.864Z'); +INSERT INTO users VALUES(231,NULL,NULL,'9949237303','2026-02-24T12:27:35.380Z'); +INSERT INTO users VALUES(232,NULL,NULL,'9059525115','2026-02-24T14:49:55.020Z'); +INSERT INTO users VALUES(265,'John Wick','john@email.com','9676651499','2026-03-22T00:28:18.510Z'); +CREATE TABLE IF NOT EXISTS "vendor_snippets" ("id" INTEGER PRIMARY KEY, "snippet_code" TEXT NOT NULL, "slot_id" INTEGER, "product_ids" TEXT NOT NULL, "valid_till" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "is_permanent" INTEGER NOT NULL DEFAULT false); +INSERT INTO vendor_snippets VALUES(55,'Allvegetables1',NULL,'[88,66,70,64,91,19,71,27,79,32,5,65,45,77,74,17,16,72,33,13,89,29,78,30,69,31,76,90,18,68]','2027-01-27T12:26:00.000Z','2026-01-27T12:33:18.974Z',1); +INSERT INTO vendor_snippets VALUES(56,'AllMuttonitems',NULL,'[34,85,14,87,35,84,28,86,4,12]','2027-03-30T21:21:00.000Z','2026-01-27T21:22:14.560Z',1); +INSERT INTO vendor_snippets VALUES(57,'AllChickenitems',NULL,'[3,10,15,1,24,40,42,80,23,41,21,2,36]','2027-04-21T21:24:00.000Z','2026-01-27T21:25:03.144Z',1); +INSERT INTO vendor_snippets VALUES(58,'AllFruitsitem',NULL,'[7,47,49,56,39,62,38,59,57,53,11,48,63,6,43,13,50,54,52,46,51,26,60,55,44,73,61,25,58]','2027-04-28T21:27:00.000Z','2026-01-27T21:28:06.746Z',1); +COMMIT; diff --git a/apps/backend/src/app.ts b/apps/backend/src/app.ts index c4eb7ca..3a254db 100644 --- a/apps/backend/src/app.ts +++ b/apps/backend/src/app.ts @@ -7,7 +7,7 @@ import mainRouter from '@/src/main-router' import { appRouter } from '@/src/trpc/router' import { TRPCError } from '@trpc/server' import { jwtVerify } from 'jose' -import { encodedJwtSecret } from '@/src/lib/env-exporter' +import { getEncodedJwtSecret } from '@/src/lib/env-exporter' export const createApp = () => { const app = new Hono() @@ -24,7 +24,7 @@ export const createApp = () => { app.use(logger()) // tRPC middleware - app.use('/api/trpc', trpcServer({ + app.use('/api/trpc/*', trpcServer({ router: appRouter, createContext: async ({ req }) => { let user = null @@ -34,7 +34,7 @@ export const createApp = () => { if (authHeader?.startsWith('Bearer ')) { const token = authHeader.substring(7) try { - const { payload } = await jwtVerify(token, encodedJwtSecret) + const { payload } = await jwtVerify(token, getEncodedJwtSecret()) const decoded = payload as any // Check if this is a staff token (has staffId) diff --git a/apps/backend/src/dbService.ts b/apps/backend/src/dbService.ts index 7217f8d..46aeed8 100644 --- a/apps/backend/src/dbService.ts +++ b/apps/backend/src/dbService.ts @@ -3,13 +3,15 @@ import type { AdminOrderDetails } from '@packages/shared' // import { getOrderDetails } from '@/src/postgresImporter' -import { getOrderDetails } from '@/src/sqliteImporter' +import { getOrderDetails, initDb } from '@/src/sqliteImporter' // Re-export everything from postgresImporter // export * from '@/src/postgresImporter' export * from '@/src/sqliteImporter' +export { initDb } + // Re-export getOrderDetails with the correct signature export async function getOrderDetailsWrapper(orderId: number): Promise { return getOrderDetails(orderId) diff --git a/apps/backend/src/lib/api-error.ts b/apps/backend/src/lib/api-error.ts index 03373f3..1c1313a 100755 --- a/apps/backend/src/lib/api-error.ts +++ b/apps/backend/src/lib/api-error.ts @@ -9,6 +9,6 @@ export class ApiError extends Error { this.name = 'ApiError'; this.statusCode = statusCode; this.details = details; - Error.captureStackTrace?.(this, ApiError); + // Error.captureStackTrace?.(this, ApiError); } -} \ No newline at end of file +} diff --git a/apps/backend/src/lib/env-exporter.ts b/apps/backend/src/lib/env-exporter.ts index 2cbecb7..1bc60a0 100755 --- a/apps/backend/src/lib/env-exporter.ts +++ b/apps/backend/src/lib/env-exporter.ts @@ -57,7 +57,9 @@ // // export const isDevMode = (process.env.ENV_MODE as string) === 'dev'; -const runtimeEnv = (globalThis as any).ENV || (globalThis as any).process?.env || {} +const getRuntimeEnv = () => (globalThis as any).ENV || (globalThis as any).process?.env || {} + +const runtimeEnv = getRuntimeEnv() export const appUrl = runtimeEnv.APP_URL as string @@ -65,7 +67,11 @@ export const jwtSecret: string = runtimeEnv.JWT_SECRET as string export const defaultRoleName = 'gen_user'; -export const encodedJwtSecret = new TextEncoder().encode(jwtSecret) +export const getEncodedJwtSecret = () => { + const env = getRuntimeEnv() + const secret = (env.JWT_SECRET as string) || '' + return new TextEncoder().encode(secret) +} export const s3AccessKeyId = runtimeEnv.S3_ACCESS_KEY_ID as string diff --git a/apps/backend/src/lib/notif-job.ts b/apps/backend/src/lib/notif-job.ts index 31f984c..c6ef072 100644 --- a/apps/backend/src/lib/notif-job.ts +++ b/apps/backend/src/lib/notif-job.ts @@ -1,4 +1,4 @@ -import { Queue, Worker } from 'bullmq'; +// import { Queue, Worker } from 'bullmq'; import { Expo } from 'expo-server-sdk'; import { redisUrl } from '@/src/lib/env-exporter' // import { db } from '@/src/db/db_index' @@ -14,31 +14,35 @@ import { REFUND_INITIATED_MESSAGE } from '@/src/lib/const-strings'; -export const notificationQueue = new Queue(NOTIFS_QUEUE, { - connection: { url: redisUrl }, - defaultJobOptions: { - removeOnComplete: true, - removeOnFail: 10, - attempts: 3, - }, -}); -export const notificationWorker = new Worker(NOTIFS_QUEUE, async (job) => { - if (!job) return; - - const { name, data } = job; - console.log(`Processing notification job ${job.id} - ${name}`); - - if (name === 'send-admin-notification') { - await sendAdminNotification(data); - } else if (name === 'send-notification') { - // Handle legacy notification type - console.log('Legacy notification job - not implemented yet'); - } -}, { - connection: { url: redisUrl }, - concurrency: 5, -}); +export const notificationQueue:any = {}; + +// export const notificationQueue = new Queue(NOTIFS_QUEUE, { +// connection: { url: redisUrl }, +// defaultJobOptions: { +// removeOnComplete: true, +// removeOnFail: 10, +// attempts: 3, +// }, +// }); + +export const notificationWorker:any = {}; +// export const notificationWorker = new Worker(NOTIFS_QUEUE, async (job) => { +// if (!job) return; +// +// const { name, data } = job; +// console.log(`Processing notification job ${job.id} - ${name}`); +// +// if (name === 'send-admin-notification') { +// await sendAdminNotification(data); +// } else if (name === 'send-notification') { +// // Handle legacy notification type +// console.log('Legacy notification job - not implemented yet'); +// } +// }, { +// connection: { url: redisUrl }, +// concurrency: 5, +// }); async function sendAdminNotification(data: { token: string; @@ -84,12 +88,12 @@ async function sendAdminNotification(data: { } } -notificationWorker.on('completed', (job) => { - if (job) console.log(`Notification job ${job.id} completed`); -}); -notificationWorker.on('failed', (job, err) => { - if (job) console.error(`Notification job ${job.id} failed:`, err); -}); +// notificationWorker.on('completed', (job) => { +// if (job) console.log(`Notification job ${job.id} completed`); +// }); +// notificationWorker.on('failed', (job, err) => { +// if (job) console.error(`Notification job ${job.id} failed:`, err); +// }); export async function scheduleNotification(userId: number, payload: any, options?: { delay?: number; priority?: number }) { const jobData = { userId, ...payload }; @@ -159,8 +163,8 @@ export async function sendRefundInitiatedNotification(userId: number, orderId?: orderId }); } - -process.on('SIGTERM', async () => { - await notificationQueue.close(); - await notificationWorker.close(); -}); +// +// process.on('SIGTERM', async () => { +// await notificationQueue.close(); +// await notificationWorker.close(); +// }); diff --git a/apps/backend/src/lib/redis-client.ts b/apps/backend/src/lib/redis-client.ts index d43a9cc..7166c91 100644 --- a/apps/backend/src/lib/redis-client.ts +++ b/apps/backend/src/lib/redis-client.ts @@ -21,23 +21,23 @@ class RedisClient { // console.error('Redis Client Error:', err); // }); // - this.client.on('connect', () => { - console.log('Redis Client Connected'); - this.isConnected = true; - }); - - this.client.on('disconnect', () => { - console.log('Redis Client Disconnected'); - this.isConnected = false; - }); - - this.client.on('ready', () => { - console.log('Redis Client Ready'); - }); - - this.client.on('reconnecting', () => { - console.log('Redis Client Reconnecting'); - }); + // this.client.on('connect', () => { + // console.log('Redis Client Connected'); + // this.isConnected = true; + // }); + // + // this.client.on('disconnect', () => { + // console.log('Redis Client Disconnected'); + // this.isConnected = false; + // }); + // + // this.client.on('ready', () => { + // console.log('Redis Client Ready'); + // }); + // + // this.client.on('reconnecting', () => { + // console.log('Redis Client Reconnecting'); + // }); // Connect immediately (fire and forget) // this.client.connect().catch((err) => { diff --git a/apps/backend/src/middleware/auth.middleware.ts b/apps/backend/src/middleware/auth.middleware.ts index f01a988..71af065 100644 --- a/apps/backend/src/middleware/auth.middleware.ts +++ b/apps/backend/src/middleware/auth.middleware.ts @@ -2,7 +2,7 @@ import { Context, Next } from 'hono'; import { jwtVerify } from 'jose'; import { getStaffUserById, isUserSuspended } from '@/src/dbService'; import { ApiError } from '@/src/lib/api-error'; -import { encodedJwtSecret } from '@/src/lib/env-exporter'; +import { getEncodedJwtSecret } from '@/src/lib/env-exporter'; interface UserContext { userId: number; @@ -27,7 +27,7 @@ export const authenticateUser = async (c: Context, next: Next) => { const token = authHeader.substring(7); console.log(c.req.header) - const { payload } = await jwtVerify(token, encodedJwtSecret); + const { payload } = await jwtVerify(token, getEncodedJwtSecret()); const decoded = payload as any; // Check if this is a staff token (has staffId) diff --git a/apps/backend/src/middleware/auth.ts b/apps/backend/src/middleware/auth.ts index d059b06..d34c035 100755 --- a/apps/backend/src/middleware/auth.ts +++ b/apps/backend/src/middleware/auth.ts @@ -1,7 +1,7 @@ import { Context, Next } from 'hono'; import { jwtVerify, errors } from 'jose'; import { ApiError } from '@/src/lib/api-error' -import { encodedJwtSecret } from '@/src/lib/env-exporter'; +import { getEncodedJwtSecret } from '@/src/lib/env-exporter'; export const verifyToken = async (c: Context, next: Next) => { try { @@ -20,7 +20,7 @@ export const verifyToken = async (c: Context, next: Next) => { } // Verify token - const { payload } = await jwtVerify(token, encodedJwtSecret); + const { payload } = await jwtVerify(token, getEncodedJwtSecret()); // Add user info to context diff --git a/apps/backend/src/middleware/staff-auth.ts b/apps/backend/src/middleware/staff-auth.ts index 17ccb27..8db50ed 100644 --- a/apps/backend/src/middleware/staff-auth.ts +++ b/apps/backend/src/middleware/staff-auth.ts @@ -2,14 +2,14 @@ import { Context, Next } from 'hono'; import { jwtVerify } from 'jose'; import { getStaffUserById } from '@/src/dbService'; import { ApiError } from '@/src/lib/api-error'; -import { encodedJwtSecret } from '@/src/lib/env-exporter'; +import { getEncodedJwtSecret } from '@/src/lib/env-exporter'; /** * Verify JWT token and extract payload */ const verifyStaffToken = async (token: string) => { try { - const { payload } = await jwtVerify(token, encodedJwtSecret); + const { payload } = await jwtVerify(token, getEncodedJwtSecret()); return payload; } catch (error) { throw new ApiError('Access denied. Invalid auth credentials', 401); diff --git a/apps/backend/src/trpc/apis/admin-apis/apis/staff-user.ts b/apps/backend/src/trpc/apis/admin-apis/apis/staff-user.ts index 52454c7..cac8a9b 100644 --- a/apps/backend/src/trpc/apis/admin-apis/apis/staff-user.ts +++ b/apps/backend/src/trpc/apis/admin-apis/apis/staff-user.ts @@ -2,7 +2,7 @@ import { router, publicProcedure, protectedProcedure } from '@/src/trpc/trpc-ind import { z } from 'zod'; import bcrypt from 'bcryptjs'; import { SignJWT } from 'jose'; -import { encodedJwtSecret } from '@/src/lib/env-exporter'; +import { getEncodedJwtSecret } from '@/src/lib/env-exporter'; import { ApiError } from '@/src/lib/api-error' import { getStaffUserByName, @@ -44,7 +44,7 @@ export const staffUserRouter = router({ const token = await new SignJWT({ staffId: staff.id, name: staff.name }) .setProtectedHeader({ alg: 'HS256' }) .setExpirationTime('30d') - .sign(encodedJwtSecret); + .sign(getEncodedJwtSecret()); return { message: 'Login successful', diff --git a/apps/backend/src/trpc/apis/user-apis/apis/auth.ts b/apps/backend/src/trpc/apis/user-apis/apis/auth.ts index c54a49d..5e4f8e4 100644 --- a/apps/backend/src/trpc/apis/user-apis/apis/auth.ts +++ b/apps/backend/src/trpc/apis/user-apis/apis/auth.ts @@ -4,7 +4,7 @@ import bcrypt from 'bcryptjs' import { SignJWT } from 'jose'; import { generateSignedUrlFromS3Url } from '@/src/lib/s3-client' import { ApiError } from '@/src/lib/api-error' -import { encodedJwtSecret } from '@/src/lib/env-exporter' +import { getEncodedJwtSecret } from '@/src/lib/env-exporter' import { sendOtp, verifyOtpUtil, getOtpCreds } from '@/src/lib/otp-utils' import { getUserAuthByEmail as getUserAuthByEmailInDb, @@ -45,7 +45,7 @@ const generateToken = async (userId: number): Promise => { return await new SignJWT({ userId }) .setProtectedHeader({ alg: 'HS256' }) .setExpirationTime('7d') - .sign(encodedJwtSecret); + .sign(getEncodedJwtSecret()); }; diff --git a/apps/backend/src/trpc/apis/user-apis/apis/user.ts b/apps/backend/src/trpc/apis/user-apis/apis/user.ts index 841fb74..2f92cbe 100644 --- a/apps/backend/src/trpc/apis/user-apis/apis/user.ts +++ b/apps/backend/src/trpc/apis/user-apis/apis/user.ts @@ -2,7 +2,7 @@ import { router, protectedProcedure, publicProcedure } from '@/src/trpc/trpc-ind import { SignJWT } from 'jose' import { z } from 'zod' import { ApiError } from '@/src/lib/api-error' -import { encodedJwtSecret } from '@/src/lib/env-exporter' +import { getEncodedJwtSecret } from '@/src/lib/env-exporter' import { generateSignedUrlFromS3Url } from '@/src/lib/s3-client' import { getUserProfileById as getUserProfileByIdInDb, @@ -23,7 +23,7 @@ const generateToken = async (userId: number): Promise => { return await new SignJWT({ userId }) .setProtectedHeader({ alg: 'HS256' }) .setExpirationTime('7d') - .sign(encodedJwtSecret); + .sign(getEncodedJwtSecret()); }; export const userRouter = router({ diff --git a/apps/backend/worker.ts b/apps/backend/worker.ts index 554f329..4e29b22 100644 --- a/apps/backend/worker.ts +++ b/apps/backend/worker.ts @@ -1,9 +1,17 @@ -import type { ExecutionContext } from '@cloudflare/workers-types' +import type { ExecutionContext, D1Database } from '@cloudflare/workers-types' export default { - async fetch(request: Request, env: Record, ctx: ExecutionContext) { + async fetch( + request: Request, + env: Record & { DB?: D1Database }, + ctx: ExecutionContext + ) { ;(globalThis as any).ENV = env const { createApp } = await import('./src/app') + const { initDb } = await import('./src/dbService') + if (env.DB) { + initDb(env.DB) + } const app = createApp() return app.fetch(request, env, ctx) }, diff --git a/apps/backend/wrangler.toml b/apps/backend/wrangler.toml index 55064df..1af6a38 100644 --- a/apps/backend/wrangler.toml +++ b/apps/backend/wrangler.toml @@ -3,30 +3,39 @@ main = "worker.ts" compatibility_date = "2024-12-01" compatibility_flags = ["nodejs_compat"] +[[d1_databases]] +binding = "DB" +database_name = "freshyo-dev" +database_id = "45e81d12-9043-45ad-a8ba-3b93127dc5ea" + [vars] +ENV_MODE = "PROD" +DATABASE_URL = "postgresql://postgres:meatfarmer_master_password@57.128.212.174:7447/meatfarmer" +PHONE_PE_BASE_URL = "https://api-preprod.phonepe.com/" +PHONE_PE_CLIENT_ID = "TEST-M23F2IGP34ZAR_25090" +PHONE_PE_CLIENT_VERSION = "1" +PHONE_PE_CLIENT_SECRET = "MTU1MmIzOTgtM2Q0Mi00N2M5LTkyMWUtNzBiMjdmYzVmZWUy" +PHONE_PE_MERCHANT_ID = "M23F2IGP34ZAR" +S3_REGION = "apac" +S3_ACCESS_KEY_ID = "8fab47503efb9547b50e4fb317e35cc7" +S3_SECRET_ACCESS_KEY = "47c2eb5636843cf568dda7ad0959a3e42071303f26dbdff94bd45a3c33dcd950" +S3_URL = "https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com" +S3_BUCKET_NAME = "meatfarmer-dev" +EXPO_ACCESS_TOKEN = "Asvpy8cByRh6T4ksnWScO6PLcio2n35-BwES5zK-" +JWT_SECRET = "my_meatfarmer_jwt_secret_key" +ASSETS_DOMAIN = "https://assets2.freshyo.in/" +API_CACHE_KEY = "api-cache-dev" +CLOUDFLARE_API_TOKEN = "N7jAg5X-RUj_fVfMW6zbfJ8qIYc81TSIKKlbZ6oh" +CLOUDFLARE_ZONE_ID = "edefbf750bfc3ff26ccd11e8e28dc8d7" +REDIS_URL = "redis://default:redis_shafi_password@57.128.212.174:6379" APP_URL = "http://localhost:4000" -JWT_SECRET = "your-jwt-secret" -S3_ACCESS_KEY_ID = "" -S3_SECRET_ACCESS_KEY = "" -S3_BUCKET_NAME = "" -S3_REGION = "" -ASSETS_DOMAIN = "" -API_CACHE_KEY = "" -CLOUDFLARE_API_TOKEN = "" -CLOUDFLARE_ZONE_ID = "" -S3_URL = "" -REDIS_URL = "" -EXPO_ACCESS_TOKEN = "" -PHONE_PE_BASE_URL = "" -PHONE_PE_CLIENT_ID = "" -PHONE_PE_CLIENT_VERSION = "" -PHONE_PE_CLIENT_SECRET = "" -PHONE_PE_MERCHANT_ID = "" -RAZORPAY_KEY = "" -RAZORPAY_SECRET = "" -OTP_SENDER_AUTH_TOKEN = "" -MIN_ORDER_VALUE = "" -DELIVERY_CHARGE = "" -TELEGRAM_BOT_TOKEN = "" -TELEGRAM_CHAT_IDS = "" -ENV_MODE = "dev" +RAZORPAY_KEY = "rzp_test_RdCBBUJ56NLaJK" +RAZORPAY_SECRET = "namEwKBE1ypWxH0QDVg6fWOe" +OTP_SENDER_AUTH_TOKEN = "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJDLTM5OENEMkJDRTM0MjQ4OCIsImlhdCI6MTc0Nzg0MTEwMywiZXhwIjoxOTA1NTIxMTAzfQ.IV64ofVKjcwveIanxu_P2XlACtPeA9sJQ74uM53osDeyUXsFv0rwkCl6NNBIX93s_wnh4MKITLbcF_ClwmFQ0A" +MIN_ORDER_VALUE = "300" +DELIVERY_CHARGE = "20" +TELEGRAM_BOT_TOKEN = "8410461852:AAGXQCwRPFbndqwTgLJh8kYxST4Z0vgh72U" +TELEGRAM_CHAT_IDS = "5147760058" + +[build] +upload_source_maps = true diff --git a/apps/user-ui/src/hooks/prominent-api-hooks.ts b/apps/user-ui/src/hooks/prominent-api-hooks.ts index fab59e8..b6e46c0 100644 --- a/apps/user-ui/src/hooks/prominent-api-hooks.ts +++ b/apps/user-ui/src/hooks/prominent-api-hooks.ts @@ -21,6 +21,7 @@ type StoreWithProductsResponse = StoreWithProductsApiType; function useCacheUrl(filename: string): string | null { const { data: essentialConsts } = useGetEssentialConsts() + console.log(essentialConsts) const assetsDomain = essentialConsts?.assetsDomain const apiCacheKey = essentialConsts?.apiCacheKey diff --git a/bun.lock b/bun.lock index a32205e..f36afc0 100644 --- a/bun.lock +++ b/bun.lock @@ -129,12 +129,14 @@ "zod": "^4.1.12", }, "devDependencies": { + "@cloudflare/workers-types": "^4.20260304.0", "@types/node": "^24.5.2", "rimraf": "^6.1.2", "ts-node-dev": "^2.0.0", "tsc-alias": "^1.8.16", "tsx": "^4.20.5", "typescript": "^5.9.2", + "wrangler": "^3.114.0", }, }, "apps/fallback-ui": { @@ -651,6 +653,20 @@ "@callstack/react-theme-provider": ["@callstack/react-theme-provider@3.0.9", "", { "dependencies": { "deepmerge": "^3.2.0", "hoist-non-react-statics": "^3.3.0" }, "peerDependencies": { "react": ">=16.3.0" } }, "sha512-tTQ0uDSCL0ypeMa8T/E9wAZRGKWj8kXP7+6RYgPTfOPs9N07C9xM8P02GJ3feETap4Ux5S69D9nteq9mEj86NA=="], + "@cloudflare/kv-asset-handler": ["@cloudflare/kv-asset-handler@0.3.4", "", { "dependencies": { "mime": "^3.0.0" } }, "sha512-YLPHc8yASwjNkmcDMQMY35yiWjoKAKnhUbPRszBRS0YgH+IXtsMp61j+yTcnCE3oO2DgP0U3iejLC8FTtKDC8Q=="], + + "@cloudflare/unenv-preset": ["@cloudflare/unenv-preset@2.0.2", "", { "peerDependencies": { "unenv": "2.0.0-rc.14", "workerd": "^1.20250124.0" }, "optionalPeers": ["workerd"] }, "sha512-nyzYnlZjjV5xT3LizahG1Iu6mnrCaxglJ04rZLpDwlDVDZ7v46lNsfxhV3A/xtfgQuSHmLnc6SVI+KwBpc3Lwg=="], + + "@cloudflare/workerd-darwin-64": ["@cloudflare/workerd-darwin-64@1.20250718.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-FHf4t7zbVN8yyXgQ/r/GqLPaYZSGUVzeR7RnL28Mwj2djyw2ZergvytVc7fdGcczl6PQh+VKGfZCfUqpJlbi9g=="], + + "@cloudflare/workerd-darwin-arm64": ["@cloudflare/workerd-darwin-arm64@1.20250718.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-fUiyUJYyqqp4NqJ0YgGtp4WJh/II/YZsUnEb6vVy5Oeas8lUOxnN+ZOJ8N/6/5LQCVAtYCChRiIrBbfhTn5Z8Q=="], + + "@cloudflare/workerd-linux-64": ["@cloudflare/workerd-linux-64@1.20250718.0", "", { "os": "linux", "cpu": "x64" }, "sha512-5+eb3rtJMiEwp08Kryqzzu8d1rUcK+gdE442auo5eniMpT170Dz0QxBrqkg2Z48SFUPYbj+6uknuA5tzdRSUSg=="], + + "@cloudflare/workerd-linux-arm64": ["@cloudflare/workerd-linux-arm64@1.20250718.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-Aa2M/DVBEBQDdATMbn217zCSFKE+ud/teS+fFS+OQqKABLn0azO2qq6ANAHYOIE6Q3Sq4CxDIQr8lGdaJHwUog=="], + + "@cloudflare/workerd-windows-64": ["@cloudflare/workerd-windows-64@1.20250718.0", "", { "os": "win32", "cpu": "x64" }, "sha512-dY16RXKffmugnc67LTbyjdDHZn5NoTF1yHEf2fN4+OaOnoGSp3N1x77QubTDwqZ9zECWxgQfDLjddcH8dWeFhg=="], + "@cloudflare/workers-types": ["@cloudflare/workers-types@4.20260317.1", "", {}, "sha512-+G4eVwyCpm8Au1ex8vQBCuA9wnwqetz4tPNRoB/53qvktERWBRMQnrtvC1k584yRE3emMThtuY0gWshvSJ++PQ=="], "@cspotcode/source-map-support": ["@cspotcode/source-map-support@0.8.1", "", { "dependencies": { "@jridgewell/trace-mapping": "0.3.9" } }, "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw=="], @@ -671,6 +687,10 @@ "@esbuild-kit/esm-loader": ["@esbuild-kit/esm-loader@2.6.5", "", { "dependencies": { "@esbuild-kit/core-utils": "^3.3.2", "get-tsconfig": "^4.7.0" } }, "sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA=="], + "@esbuild-plugins/node-globals-polyfill": ["@esbuild-plugins/node-globals-polyfill@0.2.3", "", { "peerDependencies": { "esbuild": "*" } }, "sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw=="], + + "@esbuild-plugins/node-modules-polyfill": ["@esbuild-plugins/node-modules-polyfill@0.2.2", "", { "dependencies": { "escape-string-regexp": "^4.0.0", "rollup-plugin-node-polyfills": "^0.2.1" }, "peerDependencies": { "esbuild": "*" } }, "sha512-LXV7QsWJxRuMYvKbiznh+U1ilIop3g2TeKRzUxOG5X3YITc8JyyTa90BmLwqqv0YnX4v32CSlG+vsziZp9dMvA=="], + "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.25.12", "", { "os": "aix", "cpu": "ppc64" }, "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA=="], "@esbuild/android-arm": ["@esbuild/android-arm@0.25.12", "", { "os": "android", "cpu": "arm" }, "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg=="], @@ -789,6 +809,8 @@ "@expo/xcpretty": ["@expo/xcpretty@4.4.1", "", { "dependencies": { "@babel/code-frame": "^7.20.0", "chalk": "^4.1.0", "js-yaml": "^4.1.0" }, "bin": { "excpretty": "build/cli.js" } }, "sha512-KZNxZvnGCtiM2aYYZ6Wz0Ix5r47dAvpNLApFtZWnSoERzAdOMzVBOPysBoM0JlF6FKWZ8GPqgn6qt3dV/8Zlpg=="], + "@fastify/busboy": ["@fastify/busboy@2.1.1", "", {}, "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA=="], + "@hono/node-server": ["@hono/node-server@1.19.11", "", { "peerDependencies": { "hono": "^4" } }, "sha512-dr8/3zEaB+p0D2n/IUrlPF1HZm586qgJNXK1a9fhg/PzdtkK7Ksd5l312tJX2yBuALqDYBlG20QEbayqPyxn+g=="], "@hono/trpc-server": ["@hono/trpc-server@0.4.2", "", { "peerDependencies": { "@trpc/server": "^10.10.0 || >11.0.0-rc", "hono": ">=4.0.0" } }, "sha512-3TDrc42CZLgcTFkXQba+y7JlRWRiyw1AqhLqztWyNS2IFT+3bHld0lxKdGBttCtGKHYx0505dM67RMazjhdZqw=="], @@ -803,6 +825,44 @@ "@ide/backoff": ["@ide/backoff@1.0.0", "", {}, "sha512-F0YfUDjvT+Mtt/R4xdl2X0EYCHMMiJqNLdxHD++jDT5ydEFIyqbCHh51Qx2E211dgZprPKhV7sHmnXKpLuvc5g=="], + "@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.0.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ=="], + + "@img/sharp-darwin-x64": ["@img/sharp-darwin-x64@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.0.4" }, "os": "darwin", "cpu": "x64" }, "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q=="], + + "@img/sharp-libvips-darwin-arm64": ["@img/sharp-libvips-darwin-arm64@1.0.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg=="], + + "@img/sharp-libvips-darwin-x64": ["@img/sharp-libvips-darwin-x64@1.0.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ=="], + + "@img/sharp-libvips-linux-arm": ["@img/sharp-libvips-linux-arm@1.0.5", "", { "os": "linux", "cpu": "arm" }, "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g=="], + + "@img/sharp-libvips-linux-arm64": ["@img/sharp-libvips-linux-arm64@1.0.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA=="], + + "@img/sharp-libvips-linux-s390x": ["@img/sharp-libvips-linux-s390x@1.0.4", "", { "os": "linux", "cpu": "s390x" }, "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA=="], + + "@img/sharp-libvips-linux-x64": ["@img/sharp-libvips-linux-x64@1.0.4", "", { "os": "linux", "cpu": "x64" }, "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw=="], + + "@img/sharp-libvips-linuxmusl-arm64": ["@img/sharp-libvips-linuxmusl-arm64@1.0.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA=="], + + "@img/sharp-libvips-linuxmusl-x64": ["@img/sharp-libvips-linuxmusl-x64@1.0.4", "", { "os": "linux", "cpu": "x64" }, "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw=="], + + "@img/sharp-linux-arm": ["@img/sharp-linux-arm@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.0.5" }, "os": "linux", "cpu": "arm" }, "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ=="], + + "@img/sharp-linux-arm64": ["@img/sharp-linux-arm64@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.0.4" }, "os": "linux", "cpu": "arm64" }, "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA=="], + + "@img/sharp-linux-s390x": ["@img/sharp-linux-s390x@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.0.4" }, "os": "linux", "cpu": "s390x" }, "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q=="], + + "@img/sharp-linux-x64": ["@img/sharp-linux-x64@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.0.4" }, "os": "linux", "cpu": "x64" }, "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA=="], + + "@img/sharp-linuxmusl-arm64": ["@img/sharp-linuxmusl-arm64@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" }, "os": "linux", "cpu": "arm64" }, "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g=="], + + "@img/sharp-linuxmusl-x64": ["@img/sharp-linuxmusl-x64@0.33.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.0.4" }, "os": "linux", "cpu": "x64" }, "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw=="], + + "@img/sharp-wasm32": ["@img/sharp-wasm32@0.33.5", "", { "dependencies": { "@emnapi/runtime": "^1.2.0" }, "cpu": "none" }, "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg=="], + + "@img/sharp-win32-ia32": ["@img/sharp-win32-ia32@0.33.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ=="], + + "@img/sharp-win32-x64": ["@img/sharp-win32-x64@0.33.5", "", { "os": "win32", "cpu": "x64" }, "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg=="], + "@isaacs/cliui": ["@isaacs/cliui@8.0.2", "", { "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", "strip-ansi": "^7.0.1", "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", "wrap-ansi": "^8.1.0", "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" } }, "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA=="], "@isaacs/fs-minipass": ["@isaacs/fs-minipass@4.0.1", "", { "dependencies": { "minipass": "^7.0.4" } }, "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w=="], @@ -1593,6 +1653,8 @@ "arraybuffer.prototype.slice": ["arraybuffer.prototype.slice@1.0.4", "", { "dependencies": { "array-buffer-byte-length": "^1.0.1", "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-abstract": "^1.23.5", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", "is-array-buffer": "^3.0.4" } }, "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ=="], + "as-table": ["as-table@1.0.55", "", { "dependencies": { "printable-characters": "^1.0.42" } }, "sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ=="], + "asap": ["asap@2.0.6", "", {}, "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA=="], "assert": ["assert@2.1.0", "", { "dependencies": { "call-bind": "^1.0.2", "is-nan": "^1.3.2", "object-is": "^1.1.5", "object.assign": "^4.1.4", "util": "^0.12.5" } }, "sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw=="], @@ -1665,6 +1727,8 @@ "bl": ["bl@4.1.0", "", { "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", "readable-stream": "^3.4.0" } }, "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w=="], + "blake3-wasm": ["blake3-wasm@2.1.5", "", {}, "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g=="], + "body-parser": ["body-parser@1.20.4", "", { "dependencies": { "bytes": "~3.1.2", "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "~1.2.0", "http-errors": "~2.0.1", "iconv-lite": "~0.4.24", "on-finished": "~2.4.1", "qs": "~6.14.0", "raw-body": "~2.5.3", "type-is": "~1.6.18", "unpipe": "~1.0.0" } }, "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA=="], "boolbase": ["boolbase@1.0.0", "", {}, "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="], @@ -1811,6 +1875,8 @@ "d3-voronoi": ["d3-voronoi@1.1.2", "", {}, "sha512-RhGS1u2vavcO7ay7ZNAPo4xeDh/VYeGof3x5ZLJBQgYhLegxr3s5IykvWmJ94FTU6mcbtp4sloqZ54mP6R4Utw=="], + "data-uri-to-buffer": ["data-uri-to-buffer@2.0.2", "", {}, "sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA=="], + "data-view-buffer": ["data-view-buffer@1.0.2", "", { "dependencies": { "call-bound": "^1.0.3", "es-errors": "^1.3.0", "is-data-view": "^1.0.2" } }, "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ=="], "data-view-byte-length": ["data-view-byte-length@1.0.2", "", { "dependencies": { "call-bound": "^1.0.3", "es-errors": "^1.3.0", "is-data-view": "^1.0.2" } }, "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ=="], @@ -1841,6 +1907,8 @@ "define-properties": ["define-properties@1.2.1", "", { "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" } }, "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg=="], + "defu": ["defu@6.1.4", "", {}, "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg=="], + "delayed-stream": ["delayed-stream@1.0.0", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="], "depd": ["depd@2.0.0", "", {}, "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="], @@ -1969,12 +2037,16 @@ "estraverse": ["estraverse@5.3.0", "", {}, "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA=="], + "estree-walker": ["estree-walker@0.6.1", "", {}, "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w=="], + "esutils": ["esutils@2.0.3", "", {}, "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="], "etag": ["etag@1.8.1", "", {}, "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="], "event-target-shim": ["event-target-shim@5.0.1", "", {}, "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="], + "exit-hook": ["exit-hook@2.2.1", "", {}, "sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw=="], + "expand-template": ["expand-template@2.0.3", "", {}, "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg=="], "expo": ["expo@53.0.27", "", { "dependencies": { "@babel/runtime": "^7.20.0", "@expo/cli": "0.24.24", "@expo/config": "~11.0.13", "@expo/config-plugins": "~10.1.2", "@expo/fingerprint": "0.13.4", "@expo/metro-config": "0.20.18", "@expo/vector-icons": "^14.0.0", "babel-preset-expo": "~13.2.5", "expo-asset": "~11.1.7", "expo-constants": "~17.1.8", "expo-file-system": "~18.1.11", "expo-font": "~13.3.2", "expo-keep-awake": "~14.1.4", "expo-modules-autolinking": "2.1.15", "expo-modules-core": "2.5.0", "react-native-edge-to-edge": "1.6.0", "whatwg-url-without-unicode": "8.0.0-3" }, "peerDependencies": { "@expo/dom-webview": "*", "@expo/metro-runtime": "*", "react": "*", "react-native": "*", "react-native-webview": "*" }, "optionalPeers": ["@expo/dom-webview", "@expo/metro-runtime", "react-native-webview"], "bin": { "expo": "bin/cli", "fingerprint": "bin/fingerprint", "expo-modules-autolinking": "bin/autolinking" } }, "sha512-iQwe2uWLb88opUY4vBYEW1d2GUq3lsa43gsMBEdDV+6pw0Oek93l/4nDLe0ODDdrBRjIJm/rdhKqJC/ehHCUqw=="], @@ -2061,6 +2133,8 @@ "express": ["express@4.22.1", "", { "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", "body-parser": "~1.20.3", "content-disposition": "~0.5.4", "content-type": "~1.0.4", "cookie": "~0.7.1", "cookie-signature": "~1.0.6", "debug": "2.6.9", "depd": "2.0.0", "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", "finalhandler": "~1.3.1", "fresh": "~0.5.2", "http-errors": "~2.0.0", "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "~2.4.1", "parseurl": "~1.3.3", "path-to-regexp": "~0.1.12", "proxy-addr": "~2.0.7", "qs": "~6.14.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", "send": "~0.19.0", "serve-static": "~1.16.2", "setprototypeof": "1.2.0", "statuses": "~2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" } }, "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g=="], + "exsolve": ["exsolve@1.0.8", "", {}, "sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA=="], + "fallback-ui": ["fallback-ui@workspace:apps/fallback-ui"], "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], @@ -2159,6 +2233,8 @@ "get-proto": ["get-proto@1.0.1", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" } }, "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g=="], + "get-source": ["get-source@2.0.12", "", { "dependencies": { "data-uri-to-buffer": "^2.0.0", "source-map": "^0.6.1" } }, "sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w=="], + "get-stream": ["get-stream@6.0.1", "", {}, "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="], "get-symbol-description": ["get-symbol-description@1.1.0", "", { "dependencies": { "call-bound": "^1.0.3", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6" } }, "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg=="], @@ -2175,6 +2251,8 @@ "glob-parent": ["glob-parent@6.0.2", "", { "dependencies": { "is-glob": "^4.0.3" } }, "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A=="], + "glob-to-regexp": ["glob-to-regexp@0.4.1", "", {}, "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw=="], + "global-prefix": ["global-prefix@4.0.0", "", { "dependencies": { "ini": "^4.1.3", "kind-of": "^6.0.3", "which": "^4.0.0" } }, "sha512-w0Uf9Y9/nyHinEk5vMJKRie+wa4kR5hmDbEhGGds/kG1PwGLLHKRoNMeJOyCQjjBkANlnScqgzcFwGHgmgLkVA=="], "globals": ["globals@16.5.0", "", {}, "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ=="], @@ -2459,6 +2537,8 @@ "maath": ["maath@0.10.8", "", { "peerDependencies": { "@types/three": ">=0.134.0", "three": ">=0.134.0" } }, "sha512-tRvbDF0Pgqz+9XUa4jjfgAQ8/aPKmQdWXilFu2tMy4GWj4NOsx99HlULO4IeREfbO3a0sA145DZYyvXPkybm0g=="], + "magic-string": ["magic-string@0.25.9", "", { "dependencies": { "sourcemap-codec": "^1.4.8" } }, "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ=="], + "make-error": ["make-error@1.3.6", "", {}, "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw=="], "makeerror": ["makeerror@1.0.12", "", { "dependencies": { "tmpl": "1.0.5" } }, "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg=="], @@ -2517,7 +2597,7 @@ "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], - "mime": ["mime@1.6.0", "", { "bin": { "mime": "cli.js" } }, "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="], + "mime": ["mime@3.0.0", "", { "bin": { "mime": "cli.js" } }, "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A=="], "mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="], @@ -2527,6 +2607,8 @@ "mimic-response": ["mimic-response@3.1.0", "", {}, "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ=="], + "miniflare": ["miniflare@3.20250718.3", "", { "dependencies": { "@cspotcode/source-map-support": "0.8.1", "acorn": "8.14.0", "acorn-walk": "8.3.2", "exit-hook": "2.2.1", "glob-to-regexp": "0.4.1", "stoppable": "1.1.0", "undici": "^5.28.5", "workerd": "1.20250718.0", "ws": "8.18.0", "youch": "3.3.4", "zod": "3.22.3" }, "bin": { "miniflare": "bootstrap.js" } }, "sha512-JuPrDJhwLrNLEJiNLWO7ZzJrv/Vv9kZuwMYCfv0LskQDM6Eonw4OvywO3CH/wCGjgHzha/qyjUh8JQ068TjDgQ=="], + "minimatch": ["minimatch@3.1.5", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w=="], "minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="], @@ -2543,6 +2625,8 @@ "murmurhash-js": ["murmurhash-js@1.0.0", "", {}, "sha512-TvmkNhkv8yct0SVBSy+o8wYzXjE4Zz3PCesbfs8HiCXXdcTuocApFv11UWlNFWKYsP2okqrhb7JNlSm9InBhIw=="], + "mustache": ["mustache@4.2.0", "", { "bin": { "mustache": "bin/mustache" } }, "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ=="], + "mylas": ["mylas@2.1.14", "", {}, "sha512-BzQguy9W9NJgoVn2mRWzbFrFWWztGCcng2QI9+41frfk+Athwgx3qhqhvStz7ExeUUu7Kzw427sNzHpEZNINog=="], "mz": ["mz@2.7.0", "", { "dependencies": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", "thenify-all": "^1.0.0" } }, "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q=="], @@ -2603,6 +2687,8 @@ "object.values": ["object.values@1.2.1", "", { "dependencies": { "call-bind": "^1.0.8", "call-bound": "^1.0.3", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" } }, "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA=="], + "ohash": ["ohash@2.0.11", "", {}, "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ=="], + "on-finished": ["on-finished@2.4.1", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg=="], "on-headers": ["on-headers@1.1.0", "", {}, "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A=="], @@ -2647,10 +2733,12 @@ "path-scurry": ["path-scurry@1.11.1", "", { "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" } }, "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA=="], - "path-to-regexp": ["path-to-regexp@0.1.12", "", {}, "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ=="], + "path-to-regexp": ["path-to-regexp@6.3.0", "", {}, "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ=="], "path-type": ["path-type@4.0.0", "", {}, "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="], + "pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="], + "pbf": ["pbf@3.3.0", "", { "dependencies": { "ieee754": "^1.1.12", "resolve-protobuf-schema": "^2.1.0" }, "bin": { "pbf": "bin/pbf" } }, "sha512-XDF38WCH3z5OV/OVa8GKUNtLAyneuzbCisx7QUCF8Q6Nutx0WnJrQe5O+kOtBlLfRNUws98Y58Lblp+NJG5T4Q=="], "pg": ["pg@8.20.0", "", { "dependencies": { "pg-connection-string": "^2.12.0", "pg-pool": "^3.13.0", "pg-protocol": "^1.13.0", "pg-types": "2.2.0", "pgpass": "1.0.5" }, "optionalDependencies": { "pg-cloudflare": "^1.3.0" }, "peerDependencies": { "pg-native": ">=3.0.1" }, "optionalPeers": ["pg-native"] }, "sha512-ldhMxz2r8fl/6QkXnBD3CR9/xg694oT6DZQ2s6c/RI28OjtSOpxnPrUCGOBJ46RCUxcWdx3p6kw/xnDHjKvaRA=="], @@ -2723,6 +2811,8 @@ "pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], + "printable-characters": ["printable-characters@1.0.42", "", {}, "sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ=="], + "proc-log": ["proc-log@4.2.0", "", {}, "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA=="], "progress": ["progress@2.0.3", "", {}, "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="], @@ -2909,6 +2999,12 @@ "rollup": ["rollup@4.59.0", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.59.0", "@rollup/rollup-android-arm64": "4.59.0", "@rollup/rollup-darwin-arm64": "4.59.0", "@rollup/rollup-darwin-x64": "4.59.0", "@rollup/rollup-freebsd-arm64": "4.59.0", "@rollup/rollup-freebsd-x64": "4.59.0", "@rollup/rollup-linux-arm-gnueabihf": "4.59.0", "@rollup/rollup-linux-arm-musleabihf": "4.59.0", "@rollup/rollup-linux-arm64-gnu": "4.59.0", "@rollup/rollup-linux-arm64-musl": "4.59.0", "@rollup/rollup-linux-loong64-gnu": "4.59.0", "@rollup/rollup-linux-loong64-musl": "4.59.0", "@rollup/rollup-linux-ppc64-gnu": "4.59.0", "@rollup/rollup-linux-ppc64-musl": "4.59.0", "@rollup/rollup-linux-riscv64-gnu": "4.59.0", "@rollup/rollup-linux-riscv64-musl": "4.59.0", "@rollup/rollup-linux-s390x-gnu": "4.59.0", "@rollup/rollup-linux-x64-gnu": "4.59.0", "@rollup/rollup-linux-x64-musl": "4.59.0", "@rollup/rollup-openbsd-x64": "4.59.0", "@rollup/rollup-openharmony-arm64": "4.59.0", "@rollup/rollup-win32-arm64-msvc": "4.59.0", "@rollup/rollup-win32-ia32-msvc": "4.59.0", "@rollup/rollup-win32-x64-gnu": "4.59.0", "@rollup/rollup-win32-x64-msvc": "4.59.0", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg=="], + "rollup-plugin-inject": ["rollup-plugin-inject@3.0.2", "", { "dependencies": { "estree-walker": "^0.6.1", "magic-string": "^0.25.3", "rollup-pluginutils": "^2.8.1" } }, "sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w=="], + + "rollup-plugin-node-polyfills": ["rollup-plugin-node-polyfills@0.2.1", "", { "dependencies": { "rollup-plugin-inject": "^3.0.0" } }, "sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA=="], + + "rollup-pluginutils": ["rollup-pluginutils@2.8.2", "", { "dependencies": { "estree-walker": "^0.6.1" } }, "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ=="], + "run-parallel": ["run-parallel@1.2.0", "", { "dependencies": { "queue-microtask": "^1.2.2" } }, "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA=="], "rw": ["rw@1.3.3", "", {}, "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ=="], @@ -2955,6 +3051,8 @@ "shallowequal": ["shallowequal@1.1.0", "", {}, "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ=="], + "sharp": ["sharp@0.33.5", "", { "dependencies": { "color": "^4.2.3", "detect-libc": "^2.0.3", "semver": "^7.6.3" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.33.5", "@img/sharp-darwin-x64": "0.33.5", "@img/sharp-libvips-darwin-arm64": "1.0.4", "@img/sharp-libvips-darwin-x64": "1.0.4", "@img/sharp-libvips-linux-arm": "1.0.5", "@img/sharp-libvips-linux-arm64": "1.0.4", "@img/sharp-libvips-linux-s390x": "1.0.4", "@img/sharp-libvips-linux-x64": "1.0.4", "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", "@img/sharp-libvips-linuxmusl-x64": "1.0.4", "@img/sharp-linux-arm": "0.33.5", "@img/sharp-linux-arm64": "0.33.5", "@img/sharp-linux-s390x": "0.33.5", "@img/sharp-linux-x64": "0.33.5", "@img/sharp-linuxmusl-arm64": "0.33.5", "@img/sharp-linuxmusl-x64": "0.33.5", "@img/sharp-wasm32": "0.33.5", "@img/sharp-win32-ia32": "0.33.5", "@img/sharp-win32-x64": "0.33.5" } }, "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw=="], + "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], "shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="], @@ -2993,6 +3091,8 @@ "source-map-support": ["source-map-support@0.5.21", "", { "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w=="], + "sourcemap-codec": ["sourcemap-codec@1.4.8", "", {}, "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA=="], + "splaytree-ts": ["splaytree-ts@1.0.2", "", {}, "sha512-0kGecIZNIReCSiznK3uheYB8sbstLjCZLiwcQwbmLhgHJj2gz6OnSPkVzJQCMnmEz1BQ4gPK59ylhBoEWOhGNA=="], "split-on-first": ["split-on-first@1.1.0", "", {}, "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw=="], @@ -3009,6 +3109,8 @@ "stacktrace-parser": ["stacktrace-parser@0.1.11", "", { "dependencies": { "type-fest": "^0.7.1" } }, "sha512-WjlahMgHmCJpqzU8bIBy4qtsZdU9lRlcZE3Lvyej6t4tuOuv1vk57OW3MBrj6hXBFx/nNoC9MPMTcr5YA7NQbg=="], + "stacktracey": ["stacktracey@2.2.0", "", { "dependencies": { "as-table": "^1.0.36", "get-source": "^2.0.12" } }, "sha512-ETyQEz+CzXiLjEbyJqpbp+/T79RQD/6wqFucRBIlVNZfYq2Ay7wbretD4cxpbymZlaPWx58aIhPEY1Cr8DlVvg=="], + "stats-gl": ["stats-gl@2.4.2", "", { "dependencies": { "@types/three": "*", "three": "^0.170.0" } }, "sha512-g5O9B0hm9CvnM36+v7SFl39T7hmAlv541tU81ME8YeSb3i1CIP5/QdDeSB3A0la0bKNHpxpwxOVRo2wFTYEosQ=="], "stats.js": ["stats.js@0.17.0", "", {}, "sha512-hNKz8phvYLPEcRkeG1rsGmV5ChMjKDAWU7/OJJdDErPBNChQXxCo3WZurGpnWc6gZhAzEPFad1aVgyOANH1sMw=="], @@ -3017,6 +3119,8 @@ "stop-iteration-iterator": ["stop-iteration-iterator@1.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "internal-slot": "^1.1.0" } }, "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ=="], + "stoppable": ["stoppable@1.1.0", "", {}, "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw=="], + "stream-buffers": ["stream-buffers@2.2.0", "", {}, "sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg=="], "strict-uri-encode": ["strict-uri-encode@2.0.0", "", {}, "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ=="], @@ -3193,12 +3297,16 @@ "ua-parser-js": ["ua-parser-js@0.7.41", "", { "bin": { "ua-parser-js": "script/cli.js" } }, "sha512-O3oYyCMPYgNNHuO7Jjk3uacJWZF8loBgwrfd/5LE/HyZ3lUIOdniQ7DNXJcIgZbwioZxk0fLfI4EVnetdiX5jg=="], + "ufo": ["ufo@1.6.3", "", {}, "sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q=="], + "unbox-primitive": ["unbox-primitive@1.1.0", "", { "dependencies": { "call-bound": "^1.0.3", "has-bigints": "^1.0.2", "has-symbols": "^1.1.0", "which-boxed-primitive": "^1.1.1" } }, "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw=="], "undici": ["undici@7.24.4", "", {}, "sha512-BM/JzwwaRXxrLdElV2Uo6cTLEjhSb3WXboncJamZ15NgUURmvlXvxa6xkwIOILIjPNo9i8ku136ZvWV0Uly8+w=="], "undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="], + "unenv": ["unenv@2.0.0-rc.14", "", { "dependencies": { "defu": "^6.1.4", "exsolve": "^1.0.1", "ohash": "^2.0.10", "pathe": "^2.0.3", "ufo": "^1.5.4" } }, "sha512-od496pShMen7nOy5VmVJCnq8rptd45vh6Nx/r2iPbrba6pa6p+tS2ywuIHRZ/OBvSbQZB0kWvpO9XBNVFXHD3Q=="], + "unicode-canonical-property-names-ecmascript": ["unicode-canonical-property-names-ecmascript@2.0.1", "", {}, "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg=="], "unicode-match-property-ecmascript": ["unicode-match-property-ecmascript@2.0.0", "", { "dependencies": { "unicode-canonical-property-names-ecmascript": "^2.0.0", "unicode-property-aliases-ecmascript": "^2.0.0" } }, "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q=="], @@ -3281,6 +3389,10 @@ "word-wrap": ["word-wrap@1.2.5", "", {}, "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA=="], + "workerd": ["workerd@1.20250718.0", "", { "optionalDependencies": { "@cloudflare/workerd-darwin-64": "1.20250718.0", "@cloudflare/workerd-darwin-arm64": "1.20250718.0", "@cloudflare/workerd-linux-64": "1.20250718.0", "@cloudflare/workerd-linux-arm64": "1.20250718.0", "@cloudflare/workerd-windows-64": "1.20250718.0" }, "bin": { "workerd": "bin/workerd" } }, "sha512-kqkIJP/eOfDlUyBzU7joBg+tl8aB25gEAGqDap+nFWb+WHhnooxjGHgxPBy3ipw2hnShPFNOQt5lFRxbwALirg=="], + + "wrangler": ["wrangler@3.114.17", "", { "dependencies": { "@cloudflare/kv-asset-handler": "0.3.4", "@cloudflare/unenv-preset": "2.0.2", "@esbuild-plugins/node-globals-polyfill": "0.2.3", "@esbuild-plugins/node-modules-polyfill": "0.2.2", "blake3-wasm": "2.1.5", "esbuild": "0.17.19", "miniflare": "3.20250718.3", "path-to-regexp": "6.3.0", "unenv": "2.0.0-rc.14", "workerd": "1.20250718.0" }, "optionalDependencies": { "fsevents": "~2.3.2", "sharp": "^0.33.5" }, "peerDependencies": { "@cloudflare/workers-types": "^4.20250408.0" }, "optionalPeers": ["@cloudflare/workers-types"], "bin": { "wrangler": "bin/wrangler.js", "wrangler2": "bin/wrangler.js" } }, "sha512-tAvf7ly+tB+zwwrmjsCyJ2pJnnc7SZhbnNwXbH+OIdVas3zTSmjcZOjmLKcGGptssAA3RyTKhcF9BvKZzMUycA=="], + "wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], "wrap-ansi-cjs": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], @@ -3311,6 +3423,8 @@ "yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="], + "youch": ["youch@3.3.4", "", { "dependencies": { "cookie": "^0.7.1", "mustache": "^4.2.0", "stacktracey": "^2.1.8" } }, "sha512-UeVBXie8cA35DS6+nBkls68xaBBXCye0CNznrhszZjTbRVnJKQuNsyLKBTTL4ln1o1rh2PKtv35twV7irj5SEg=="], + "yup": ["yup@1.7.1", "", { "dependencies": { "property-expr": "^2.0.5", "tiny-case": "^1.0.3", "toposort": "^2.0.2", "type-fest": "^2.19.0" } }, "sha512-GKHFX2nXul2/4Dtfxhozv701jLQHdf6J34YDh2cEkpqoo8le5Mg6/LrdseVLrFarmFygZTlfIhHx/QKfb/QWXw=="], "zod": ["zod@4.3.6", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="], @@ -3505,6 +3619,8 @@ "express/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], + "express/path-to-regexp": ["path-to-regexp@0.1.12", "", {}, "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ=="], + "fallback-ui/@types/node": ["@types/node@20.19.37", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-8kzdPJ3FsNsVIurqBs7oodNnCEVbni9yUEkaHbgptDACOPW04jimGagZ51E6+lXUwJjgnBw+hyko/lkFWCldqw=="], "fallback-ui/zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="], @@ -3523,6 +3639,8 @@ "geokdbush/tinyqueue": ["tinyqueue@2.0.3", "", {}, "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA=="], + "get-source/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], + "global-prefix/which": ["which@4.0.0", "", { "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" } }, "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg=="], "hoist-non-react-statics/react-is": ["react-is@16.13.1", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="], @@ -3557,6 +3675,16 @@ "micromatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + "miniflare/acorn": ["acorn@8.14.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA=="], + + "miniflare/acorn-walk": ["acorn-walk@8.3.2", "", {}, "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A=="], + + "miniflare/undici": ["undici@5.29.0", "", { "dependencies": { "@fastify/busboy": "^2.0.0" } }, "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg=="], + + "miniflare/ws": ["ws@8.18.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw=="], + + "miniflare/zod": ["zod@3.22.3", "", {}, "sha512-EjIevzuJRiRPbVH4mGc8nApb/lVLKVpmUhAaR5R5doKGfAnGJ6Gr3CViAVjP+4FWSxCsybeWQdcgCtbX+7oZug=="], + "node-abi/semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="], "npm-package-arg/semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="], @@ -3603,6 +3731,10 @@ "send/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], + "send/mime": ["mime@1.6.0", "", { "bin": { "mime": "cli.js" } }, "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="], + + "sharp/semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="], + "simple-plist/bplist-parser": ["bplist-parser@0.3.1", "", { "dependencies": { "big-integer": "1.6.x" } }, "sha512-PyJxiNtA5T2PlLIeBot4lbp7rj4OadzjnMZD/G5zuBNt8ei/yCU7+wW0h2bag9vr8c+/WuRWmSxbqAl9hL1rBA=="], "source-map-support/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], @@ -3659,6 +3791,8 @@ "whatwg-url-without-unicode/buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="], + "wrangler/esbuild": ["esbuild@0.17.19", "", { "optionalDependencies": { "@esbuild/android-arm": "0.17.19", "@esbuild/android-arm64": "0.17.19", "@esbuild/android-x64": "0.17.19", "@esbuild/darwin-arm64": "0.17.19", "@esbuild/darwin-x64": "0.17.19", "@esbuild/freebsd-arm64": "0.17.19", "@esbuild/freebsd-x64": "0.17.19", "@esbuild/linux-arm": "0.17.19", "@esbuild/linux-arm64": "0.17.19", "@esbuild/linux-ia32": "0.17.19", "@esbuild/linux-loong64": "0.17.19", "@esbuild/linux-mips64el": "0.17.19", "@esbuild/linux-ppc64": "0.17.19", "@esbuild/linux-riscv64": "0.17.19", "@esbuild/linux-s390x": "0.17.19", "@esbuild/linux-x64": "0.17.19", "@esbuild/netbsd-x64": "0.17.19", "@esbuild/openbsd-x64": "0.17.19", "@esbuild/sunos-x64": "0.17.19", "@esbuild/win32-arm64": "0.17.19", "@esbuild/win32-ia32": "0.17.19", "@esbuild/win32-x64": "0.17.19" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw=="], + "wrap-ansi/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], "wrap-ansi-cjs/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], @@ -3861,6 +3995,50 @@ "tsx/esbuild/@esbuild/win32-x64": ["@esbuild/win32-x64@0.27.4", "", { "os": "win32", "cpu": "x64" }, "sha512-+knoa0BDoeXgkNvvV1vvbZX4+hizelrkwmGJBdT17t8FNPwG2lKemmuMZlmaNQ3ws3DKKCxpb4zRZEIp3UxFCg=="], + "wrangler/esbuild/@esbuild/android-arm": ["@esbuild/android-arm@0.17.19", "", { "os": "android", "cpu": "arm" }, "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A=="], + + "wrangler/esbuild/@esbuild/android-arm64": ["@esbuild/android-arm64@0.17.19", "", { "os": "android", "cpu": "arm64" }, "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA=="], + + "wrangler/esbuild/@esbuild/android-x64": ["@esbuild/android-x64@0.17.19", "", { "os": "android", "cpu": "x64" }, "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww=="], + + "wrangler/esbuild/@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.17.19", "", { "os": "darwin", "cpu": "arm64" }, "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg=="], + + "wrangler/esbuild/@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.17.19", "", { "os": "darwin", "cpu": "x64" }, "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw=="], + + "wrangler/esbuild/@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.17.19", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ=="], + + "wrangler/esbuild/@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.17.19", "", { "os": "freebsd", "cpu": "x64" }, "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ=="], + + "wrangler/esbuild/@esbuild/linux-arm": ["@esbuild/linux-arm@0.17.19", "", { "os": "linux", "cpu": "arm" }, "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA=="], + + "wrangler/esbuild/@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.17.19", "", { "os": "linux", "cpu": "arm64" }, "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg=="], + + "wrangler/esbuild/@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.17.19", "", { "os": "linux", "cpu": "ia32" }, "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ=="], + + "wrangler/esbuild/@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.17.19", "", { "os": "linux", "cpu": "none" }, "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ=="], + + "wrangler/esbuild/@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.17.19", "", { "os": "linux", "cpu": "none" }, "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A=="], + + "wrangler/esbuild/@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.17.19", "", { "os": "linux", "cpu": "ppc64" }, "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg=="], + + "wrangler/esbuild/@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.17.19", "", { "os": "linux", "cpu": "none" }, "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA=="], + + "wrangler/esbuild/@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.17.19", "", { "os": "linux", "cpu": "s390x" }, "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q=="], + + "wrangler/esbuild/@esbuild/linux-x64": ["@esbuild/linux-x64@0.17.19", "", { "os": "linux", "cpu": "x64" }, "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw=="], + + "wrangler/esbuild/@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.17.19", "", { "os": "none", "cpu": "x64" }, "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q=="], + + "wrangler/esbuild/@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.17.19", "", { "os": "openbsd", "cpu": "x64" }, "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g=="], + + "wrangler/esbuild/@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.17.19", "", { "os": "sunos", "cpu": "x64" }, "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg=="], + + "wrangler/esbuild/@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.17.19", "", { "os": "win32", "cpu": "arm64" }, "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag=="], + + "wrangler/esbuild/@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.17.19", "", { "os": "win32", "cpu": "ia32" }, "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw=="], + + "wrangler/esbuild/@esbuild/win32-x64": ["@esbuild/win32-x64@0.17.19", "", { "os": "win32", "cpu": "x64" }, "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA=="], + "@aws-crypto/sha1-browser/@smithy/util-utf8/@smithy/util-buffer-from/@smithy/is-array-buffer": ["@smithy/is-array-buffer@2.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA=="], "@aws-crypto/sha256-browser/@smithy/util-utf8/@smithy/util-buffer-from/@smithy/is-array-buffer": ["@smithy/is-array-buffer@2.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA=="], diff --git a/packages/db_helper_sqlite/drizzle/0000_nifty_sauron.sql b/packages/db_helper_sqlite/drizzle/0000_nifty_sauron.sql new file mode 100644 index 0000000..80fbf07 --- /dev/null +++ b/packages/db_helper_sqlite/drizzle/0000_nifty_sauron.sql @@ -0,0 +1,501 @@ +CREATE TABLE `address_areas` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `place_name` text NOT NULL, + `zone_id` integer, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + FOREIGN KEY (`zone_id`) REFERENCES `address_zones`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `address_zones` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `zone_name` text NOT NULL, + `added_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL +); +--> statement-breakpoint +CREATE TABLE `addresses` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `user_id` integer NOT NULL, + `name` text NOT NULL, + `phone` text NOT NULL, + `address_line1` text NOT NULL, + `address_line2` text, + `city` text NOT NULL, + `state` text NOT NULL, + `pincode` text NOT NULL, + `is_default` integer DEFAULT false NOT NULL, + `latitude` real, + `longitude` real, + `google_maps_url` text, + `admin_latitude` real, + `admin_longitude` real, + `zone_id` integer, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`zone_id`) REFERENCES `address_zones`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `cart_items` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `user_id` integer NOT NULL, + `product_id` integer NOT NULL, + `quantity` text NOT NULL, + `added_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`product_id`) REFERENCES `product_info`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `unique_user_product` ON `cart_items` (`user_id`,`product_id`);--> statement-breakpoint +CREATE TABLE `complaints` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `user_id` integer NOT NULL, + `order_id` integer, + `complaint_body` text NOT NULL, + `images` text, + `response` text, + `is_resolved` integer DEFAULT false NOT NULL, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`order_id`) REFERENCES `orders`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `coupon_applicable_products` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `coupon_id` integer NOT NULL, + `product_id` integer NOT NULL, + FOREIGN KEY (`coupon_id`) REFERENCES `coupons`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`product_id`) REFERENCES `product_info`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `unique_coupon_product` ON `coupon_applicable_products` (`coupon_id`,`product_id`);--> statement-breakpoint +CREATE TABLE `coupon_applicable_users` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `coupon_id` integer NOT NULL, + `user_id` integer NOT NULL, + FOREIGN KEY (`coupon_id`) REFERENCES `coupons`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `unique_coupon_user` ON `coupon_applicable_users` (`coupon_id`,`user_id`);--> statement-breakpoint +CREATE TABLE `coupon_usage` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `user_id` integer NOT NULL, + `coupon_id` integer NOT NULL, + `order_id` integer, + `order_item_id` integer, + `used_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`coupon_id`) REFERENCES `coupons`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`order_id`) REFERENCES `orders`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`order_item_id`) REFERENCES `order_items`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `coupons` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `coupon_code` text NOT NULL, + `is_user_based` integer DEFAULT false NOT NULL, + `discount_percent` text, + `flat_discount` text, + `min_order` text, + `product_ids` text, + `created_by` integer NOT NULL, + `max_value` text, + `is_apply_for_all` integer DEFAULT false NOT NULL, + `valid_till` integer, + `max_limit_for_user` integer, + `is_invalidated` integer DEFAULT false NOT NULL, + `exclusive_apply` integer DEFAULT false NOT NULL, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + FOREIGN KEY (`created_by`) REFERENCES `staff_users`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `coupons_coupon_code_unique` ON `coupons` (`coupon_code`);--> statement-breakpoint +CREATE TABLE `delivery_slot_info` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `delivery_time` integer NOT NULL, + `freeze_time` integer NOT NULL, + `is_active` integer DEFAULT true NOT NULL, + `is_flash` integer DEFAULT false NOT NULL, + `is_capacity_full` integer DEFAULT false NOT NULL, + `delivery_sequence` text, + `group_ids` text +); +--> statement-breakpoint +CREATE TABLE `home_banners` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `name` text NOT NULL, + `image_url` text NOT NULL, + `description` text, + `product_ids` text, + `redirect_url` text, + `serial_num` integer, + `is_active` integer DEFAULT false NOT NULL, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + `last_updated` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL +); +--> statement-breakpoint +CREATE TABLE `key_val_store` ( + `key` text PRIMARY KEY NOT NULL, + `value` text +); +--> statement-breakpoint +CREATE TABLE `notif_creds` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `token` text NOT NULL, + `added_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + `user_id` integer NOT NULL, + `last_verified` integer, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `notif_creds_token_unique` ON `notif_creds` (`token`);--> statement-breakpoint +CREATE TABLE `notifications` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `user_id` integer NOT NULL, + `title` text NOT NULL, + `body` text NOT NULL, + `type` text, + `is_read` integer DEFAULT false NOT NULL, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `order_items` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `order_id` integer NOT NULL, + `product_id` integer NOT NULL, + `quantity` text NOT NULL, + `price` text NOT NULL, + `discounted_price` text, + `is_packaged` integer DEFAULT false NOT NULL, + `is_package_verified` integer DEFAULT false NOT NULL, + FOREIGN KEY (`order_id`) REFERENCES `orders`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`product_id`) REFERENCES `product_info`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `order_status` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `order_time` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + `user_id` integer NOT NULL, + `order_id` integer NOT NULL, + `is_packaged` integer DEFAULT false NOT NULL, + `is_delivered` integer DEFAULT false NOT NULL, + `is_cancelled` integer DEFAULT false NOT NULL, + `cancel_reason` text, + `is_cancelled_by_admin` integer, + `payment_state` text DEFAULT 'pending' NOT NULL, + `cancellation_user_notes` text, + `cancellation_admin_notes` text, + `cancellation_reviewed` integer DEFAULT false NOT NULL, + `cancellation_reviewed_at` integer, + `refund_coupon_id` integer, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`order_id`) REFERENCES `orders`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`refund_coupon_id`) REFERENCES `coupons`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `orders` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `user_id` integer NOT NULL, + `address_id` integer NOT NULL, + `slot_id` integer, + `is_cod` integer DEFAULT false NOT NULL, + `is_online_payment` integer DEFAULT false NOT NULL, + `payment_info_id` integer, + `total_amount` text NOT NULL, + `delivery_charge` text DEFAULT '0' NOT NULL, + `readable_id` integer NOT NULL, + `admin_notes` text, + `user_notes` text, + `order_group_id` text, + `order_group_proportion` text, + `is_flash_delivery` integer DEFAULT false NOT NULL, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`address_id`) REFERENCES `addresses`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`slot_id`) REFERENCES `delivery_slot_info`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`payment_info_id`) REFERENCES `payment_info`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `payment_info` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `status` text NOT NULL, + `gateway` text NOT NULL, + `order_id` text, + `token` text, + `merchant_order_id` text NOT NULL, + `payload` text +); +--> statement-breakpoint +CREATE UNIQUE INDEX `payment_info_merchant_order_id_unique` ON `payment_info` (`merchant_order_id`);--> statement-breakpoint +CREATE TABLE `payments` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `status` text NOT NULL, + `gateway` text NOT NULL, + `order_id` integer NOT NULL, + `token` text, + `merchant_order_id` text NOT NULL, + `payload` text, + FOREIGN KEY (`order_id`) REFERENCES `orders`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `payments_merchant_order_id_unique` ON `payments` (`merchant_order_id`);--> statement-breakpoint +CREATE TABLE `product_categories` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `name` text NOT NULL, + `description` text +); +--> statement-breakpoint +CREATE TABLE `product_group_info` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `group_name` text NOT NULL, + `description` text, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL +); +--> statement-breakpoint +CREATE TABLE `product_group_membership` ( + `product_id` integer NOT NULL, + `group_id` integer NOT NULL, + `added_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + PRIMARY KEY(`product_id`, `group_id`), + FOREIGN KEY (`product_id`) REFERENCES `product_info`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`group_id`) REFERENCES `product_group_info`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `product_info` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `name` text NOT NULL, + `short_description` text, + `long_description` text, + `unit_id` integer NOT NULL, + `price` text NOT NULL, + `market_price` text, + `images` text, + `is_out_of_stock` integer DEFAULT false NOT NULL, + `is_suspended` integer DEFAULT false NOT NULL, + `is_flash_available` integer DEFAULT false NOT NULL, + `flash_price` text, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + `increment_step` real DEFAULT 1 NOT NULL, + `product_quantity` real DEFAULT 1 NOT NULL, + `store_id` integer, + FOREIGN KEY (`unit_id`) REFERENCES `units`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`store_id`) REFERENCES `store_info`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `product_reviews` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `user_id` integer NOT NULL, + `product_id` integer NOT NULL, + `review_body` text NOT NULL, + `image_urls` text, + `review_time` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + `ratings` real NOT NULL, + `admin_response` text, + `admin_response_images` text, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`product_id`) REFERENCES `product_info`(`id`) ON UPDATE no action ON DELETE no action, + CONSTRAINT "rating_check" CHECK("product_reviews"."ratings" >= 1 AND "product_reviews"."ratings" <= 5) +); +--> statement-breakpoint +CREATE TABLE `product_slots` ( + `product_id` integer NOT NULL, + `slot_id` integer NOT NULL, + PRIMARY KEY(`product_id`, `slot_id`), + FOREIGN KEY (`product_id`) REFERENCES `product_info`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`slot_id`) REFERENCES `delivery_slot_info`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `product_tag_info` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `tag_name` text NOT NULL, + `tag_description` text, + `image_url` text, + `is_dashboard_tag` integer DEFAULT false NOT NULL, + `related_stores` text, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL +); +--> statement-breakpoint +CREATE UNIQUE INDEX `product_tag_info_tag_name_unique` ON `product_tag_info` (`tag_name`);--> statement-breakpoint +CREATE TABLE `product_tags` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `product_id` integer NOT NULL, + `tag_id` integer NOT NULL, + `assigned_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + FOREIGN KEY (`product_id`) REFERENCES `product_info`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`tag_id`) REFERENCES `product_tag_info`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `unique_product_tag` ON `product_tags` (`product_id`,`tag_id`);--> statement-breakpoint +CREATE TABLE `refunds` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `order_id` integer NOT NULL, + `refund_amount` text, + `refund_status` text DEFAULT 'none', + `merchant_refund_id` text, + `refund_processed_at` integer, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + FOREIGN KEY (`order_id`) REFERENCES `orders`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `reserved_coupons` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `secret_code` text NOT NULL, + `coupon_code` text NOT NULL, + `discount_percent` text, + `flat_discount` text, + `min_order` text, + `product_ids` text, + `max_value` text, + `valid_till` integer, + `max_limit_for_user` integer, + `exclusive_apply` integer DEFAULT false NOT NULL, + `is_redeemed` integer DEFAULT false NOT NULL, + `redeemed_by` integer, + `redeemed_at` integer, + `created_by` integer NOT NULL, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + FOREIGN KEY (`redeemed_by`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`created_by`) REFERENCES `staff_users`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `reserved_coupons_secret_code_unique` ON `reserved_coupons` (`secret_code`);--> statement-breakpoint +CREATE TABLE `special_deals` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `product_id` integer NOT NULL, + `quantity` text NOT NULL, + `price` text NOT NULL, + `valid_till` integer NOT NULL, + FOREIGN KEY (`product_id`) REFERENCES `product_info`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `staff_permissions` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `permission_name` text NOT NULL, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL +); +--> statement-breakpoint +CREATE UNIQUE INDEX `unique_permission_name` ON `staff_permissions` (`permission_name`);--> statement-breakpoint +CREATE TABLE `staff_role_permissions` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `staff_role_id` integer NOT NULL, + `staff_permission_id` integer NOT NULL, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + FOREIGN KEY (`staff_role_id`) REFERENCES `staff_roles`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`staff_permission_id`) REFERENCES `staff_permissions`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `unique_role_permission` ON `staff_role_permissions` (`staff_role_id`,`staff_permission_id`);--> statement-breakpoint +CREATE TABLE `staff_roles` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `role_name` text NOT NULL, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL +); +--> statement-breakpoint +CREATE UNIQUE INDEX `unique_role_name` ON `staff_roles` (`role_name`);--> statement-breakpoint +CREATE TABLE `staff_users` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `name` text NOT NULL, + `password` text NOT NULL, + `staff_role_id` integer, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + FOREIGN KEY (`staff_role_id`) REFERENCES `staff_roles`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `store_info` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `name` text NOT NULL, + `description` text, + `image_url` text, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + `owner` integer NOT NULL, + FOREIGN KEY (`owner`) REFERENCES `staff_users`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `units` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `short_notation` text NOT NULL, + `full_name` text NOT NULL +); +--> statement-breakpoint +CREATE UNIQUE INDEX `unique_short_notation` ON `units` (`short_notation`);--> statement-breakpoint +CREATE TABLE `unlogged_user_tokens` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `token` text NOT NULL, + `added_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + `last_verified` integer +); +--> statement-breakpoint +CREATE UNIQUE INDEX `unlogged_user_tokens_token_unique` ON `unlogged_user_tokens` (`token`);--> statement-breakpoint +CREATE TABLE `upload_url_status` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + `key` text NOT NULL, + `status` text DEFAULT 'pending' NOT NULL +); +--> statement-breakpoint +CREATE TABLE `user_creds` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `user_id` integer NOT NULL, + `user_password` text NOT NULL, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `user_details` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `user_id` integer NOT NULL, + `bio` text, + `date_of_birth` integer, + `gender` text, + `occupation` text, + `profile_image` text, + `is_suspended` integer DEFAULT false NOT NULL, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + `updated_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `user_details_user_id_unique` ON `user_details` (`user_id`);--> statement-breakpoint +CREATE TABLE `user_incidents` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `user_id` integer NOT NULL, + `order_id` integer, + `date_added` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + `admin_comment` text, + `added_by` integer, + `negativity_score` integer, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`order_id`) REFERENCES `orders`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`added_by`) REFERENCES `staff_users`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `user_notifications` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `title` text NOT NULL, + `image_url` text, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + `body` text NOT NULL, + `applicable_users` text +); +--> statement-breakpoint +CREATE TABLE `users` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `name` text, + `email` text, + `mobile` text, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL +); +--> statement-breakpoint +CREATE UNIQUE INDEX `unique_email` ON `users` (`email`);--> statement-breakpoint +CREATE TABLE `vendor_snippets` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `snippet_code` text NOT NULL, + `slot_id` integer, + `is_permanent` integer DEFAULT false NOT NULL, + `product_ids` text NOT NULL, + `valid_till` integer, + `created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL, + FOREIGN KEY (`slot_id`) REFERENCES `delivery_slot_info`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `vendor_snippets_snippet_code_unique` ON `vendor_snippets` (`snippet_code`); \ No newline at end of file diff --git a/packages/db_helper_sqlite/drizzle/meta/0000_snapshot.json b/packages/db_helper_sqlite/drizzle/meta/0000_snapshot.json new file mode 100644 index 0000000..c485baf --- /dev/null +++ b/packages/db_helper_sqlite/drizzle/meta/0000_snapshot.json @@ -0,0 +1,3474 @@ +{ + "version": "6", + "dialect": "sqlite", + "id": "8b667990-7cbb-4115-89ee-b28da799ca9d", + "prevId": "00000000-0000-0000-0000-000000000000", + "tables": { + "address_areas": { + "name": "address_areas", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "place_name": { + "name": "place_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "zone_id": { + "name": "zone_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": {}, + "foreignKeys": { + "address_areas_zone_id_address_zones_id_fk": { + "name": "address_areas_zone_id_address_zones_id_fk", + "tableFrom": "address_areas", + "tableTo": "address_zones", + "columnsFrom": [ + "zone_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "address_zones": { + "name": "address_zones", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "zone_name": { + "name": "zone_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "added_at": { + "name": "added_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "addresses": { + "name": "addresses", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "phone": { + "name": "phone", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "address_line1": { + "name": "address_line1", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "address_line2": { + "name": "address_line2", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "city": { + "name": "city", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "state": { + "name": "state", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "pincode": { + "name": "pincode", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "is_default": { + "name": "is_default", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "latitude": { + "name": "latitude", + "type": "real", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "longitude": { + "name": "longitude", + "type": "real", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "google_maps_url": { + "name": "google_maps_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "admin_latitude": { + "name": "admin_latitude", + "type": "real", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "admin_longitude": { + "name": "admin_longitude", + "type": "real", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "zone_id": { + "name": "zone_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": {}, + "foreignKeys": { + "addresses_user_id_users_id_fk": { + "name": "addresses_user_id_users_id_fk", + "tableFrom": "addresses", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "addresses_zone_id_address_zones_id_fk": { + "name": "addresses_zone_id_address_zones_id_fk", + "tableFrom": "addresses", + "tableTo": "address_zones", + "columnsFrom": [ + "zone_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "cart_items": { + "name": "cart_items", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "product_id": { + "name": "product_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "quantity": { + "name": "quantity", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "added_at": { + "name": "added_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": { + "unique_user_product": { + "name": "unique_user_product", + "columns": [ + "user_id", + "product_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "cart_items_user_id_users_id_fk": { + "name": "cart_items_user_id_users_id_fk", + "tableFrom": "cart_items", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "cart_items_product_id_product_info_id_fk": { + "name": "cart_items_product_id_product_info_id_fk", + "tableFrom": "cart_items", + "tableTo": "product_info", + "columnsFrom": [ + "product_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "complaints": { + "name": "complaints", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "order_id": { + "name": "order_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "complaint_body": { + "name": "complaint_body", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "images": { + "name": "images", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "response": { + "name": "response", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_resolved": { + "name": "is_resolved", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": {}, + "foreignKeys": { + "complaints_user_id_users_id_fk": { + "name": "complaints_user_id_users_id_fk", + "tableFrom": "complaints", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "complaints_order_id_orders_id_fk": { + "name": "complaints_order_id_orders_id_fk", + "tableFrom": "complaints", + "tableTo": "orders", + "columnsFrom": [ + "order_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "coupon_applicable_products": { + "name": "coupon_applicable_products", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "coupon_id": { + "name": "coupon_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "product_id": { + "name": "product_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "unique_coupon_product": { + "name": "unique_coupon_product", + "columns": [ + "coupon_id", + "product_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "coupon_applicable_products_coupon_id_coupons_id_fk": { + "name": "coupon_applicable_products_coupon_id_coupons_id_fk", + "tableFrom": "coupon_applicable_products", + "tableTo": "coupons", + "columnsFrom": [ + "coupon_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "coupon_applicable_products_product_id_product_info_id_fk": { + "name": "coupon_applicable_products_product_id_product_info_id_fk", + "tableFrom": "coupon_applicable_products", + "tableTo": "product_info", + "columnsFrom": [ + "product_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "coupon_applicable_users": { + "name": "coupon_applicable_users", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "coupon_id": { + "name": "coupon_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "unique_coupon_user": { + "name": "unique_coupon_user", + "columns": [ + "coupon_id", + "user_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "coupon_applicable_users_coupon_id_coupons_id_fk": { + "name": "coupon_applicable_users_coupon_id_coupons_id_fk", + "tableFrom": "coupon_applicable_users", + "tableTo": "coupons", + "columnsFrom": [ + "coupon_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "coupon_applicable_users_user_id_users_id_fk": { + "name": "coupon_applicable_users_user_id_users_id_fk", + "tableFrom": "coupon_applicable_users", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "coupon_usage": { + "name": "coupon_usage", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "coupon_id": { + "name": "coupon_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "order_id": { + "name": "order_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "order_item_id": { + "name": "order_item_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "used_at": { + "name": "used_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": {}, + "foreignKeys": { + "coupon_usage_user_id_users_id_fk": { + "name": "coupon_usage_user_id_users_id_fk", + "tableFrom": "coupon_usage", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "coupon_usage_coupon_id_coupons_id_fk": { + "name": "coupon_usage_coupon_id_coupons_id_fk", + "tableFrom": "coupon_usage", + "tableTo": "coupons", + "columnsFrom": [ + "coupon_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "coupon_usage_order_id_orders_id_fk": { + "name": "coupon_usage_order_id_orders_id_fk", + "tableFrom": "coupon_usage", + "tableTo": "orders", + "columnsFrom": [ + "order_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "coupon_usage_order_item_id_order_items_id_fk": { + "name": "coupon_usage_order_item_id_order_items_id_fk", + "tableFrom": "coupon_usage", + "tableTo": "order_items", + "columnsFrom": [ + "order_item_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "coupons": { + "name": "coupons", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "coupon_code": { + "name": "coupon_code", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "is_user_based": { + "name": "is_user_based", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "discount_percent": { + "name": "discount_percent", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "flat_discount": { + "name": "flat_discount", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "min_order": { + "name": "min_order", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "product_ids": { + "name": "product_ids", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_by": { + "name": "created_by", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "max_value": { + "name": "max_value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_apply_for_all": { + "name": "is_apply_for_all", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "valid_till": { + "name": "valid_till", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "max_limit_for_user": { + "name": "max_limit_for_user", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_invalidated": { + "name": "is_invalidated", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "exclusive_apply": { + "name": "exclusive_apply", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": { + "coupons_coupon_code_unique": { + "name": "coupons_coupon_code_unique", + "columns": [ + "coupon_code" + ], + "isUnique": true + } + }, + "foreignKeys": { + "coupons_created_by_staff_users_id_fk": { + "name": "coupons_created_by_staff_users_id_fk", + "tableFrom": "coupons", + "tableTo": "staff_users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "delivery_slot_info": { + "name": "delivery_slot_info", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "delivery_time": { + "name": "delivery_time", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "freeze_time": { + "name": "freeze_time", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "is_active": { + "name": "is_active", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "is_flash": { + "name": "is_flash", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "is_capacity_full": { + "name": "is_capacity_full", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "delivery_sequence": { + "name": "delivery_sequence", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "group_ids": { + "name": "group_ids", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "home_banners": { + "name": "home_banners", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "image_url": { + "name": "image_url", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "product_ids": { + "name": "product_ids", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "redirect_url": { + "name": "redirect_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "serial_num": { + "name": "serial_num", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_active": { + "name": "is_active", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + }, + "last_updated": { + "name": "last_updated", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "key_val_store": { + "name": "key_val_store", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "notif_creds": { + "name": "notif_creds", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "added_at": { + "name": "added_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "last_verified": { + "name": "last_verified", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "notif_creds_token_unique": { + "name": "notif_creds_token_unique", + "columns": [ + "token" + ], + "isUnique": true + } + }, + "foreignKeys": { + "notif_creds_user_id_users_id_fk": { + "name": "notif_creds_user_id_users_id_fk", + "tableFrom": "notif_creds", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "notifications": { + "name": "notifications", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_read": { + "name": "is_read", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": {}, + "foreignKeys": { + "notifications_user_id_users_id_fk": { + "name": "notifications_user_id_users_id_fk", + "tableFrom": "notifications", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "order_items": { + "name": "order_items", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "order_id": { + "name": "order_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "product_id": { + "name": "product_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "quantity": { + "name": "quantity", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "price": { + "name": "price", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "discounted_price": { + "name": "discounted_price", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_packaged": { + "name": "is_packaged", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "is_package_verified": { + "name": "is_package_verified", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + } + }, + "indexes": {}, + "foreignKeys": { + "order_items_order_id_orders_id_fk": { + "name": "order_items_order_id_orders_id_fk", + "tableFrom": "order_items", + "tableTo": "orders", + "columnsFrom": [ + "order_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "order_items_product_id_product_info_id_fk": { + "name": "order_items_product_id_product_info_id_fk", + "tableFrom": "order_items", + "tableTo": "product_info", + "columnsFrom": [ + "product_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "order_status": { + "name": "order_status", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "order_time": { + "name": "order_time", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "order_id": { + "name": "order_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "is_packaged": { + "name": "is_packaged", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "is_delivered": { + "name": "is_delivered", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "is_cancelled": { + "name": "is_cancelled", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "cancel_reason": { + "name": "cancel_reason", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_cancelled_by_admin": { + "name": "is_cancelled_by_admin", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "payment_state": { + "name": "payment_state", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'pending'" + }, + "cancellation_user_notes": { + "name": "cancellation_user_notes", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "cancellation_admin_notes": { + "name": "cancellation_admin_notes", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "cancellation_reviewed": { + "name": "cancellation_reviewed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "cancellation_reviewed_at": { + "name": "cancellation_reviewed_at", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "refund_coupon_id": { + "name": "refund_coupon_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "order_status_user_id_users_id_fk": { + "name": "order_status_user_id_users_id_fk", + "tableFrom": "order_status", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "order_status_order_id_orders_id_fk": { + "name": "order_status_order_id_orders_id_fk", + "tableFrom": "order_status", + "tableTo": "orders", + "columnsFrom": [ + "order_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "order_status_refund_coupon_id_coupons_id_fk": { + "name": "order_status_refund_coupon_id_coupons_id_fk", + "tableFrom": "order_status", + "tableTo": "coupons", + "columnsFrom": [ + "refund_coupon_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "orders": { + "name": "orders", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "address_id": { + "name": "address_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "slot_id": { + "name": "slot_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_cod": { + "name": "is_cod", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "is_online_payment": { + "name": "is_online_payment", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "payment_info_id": { + "name": "payment_info_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "total_amount": { + "name": "total_amount", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "delivery_charge": { + "name": "delivery_charge", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'0'" + }, + "readable_id": { + "name": "readable_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "admin_notes": { + "name": "admin_notes", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "user_notes": { + "name": "user_notes", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "order_group_id": { + "name": "order_group_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "order_group_proportion": { + "name": "order_group_proportion", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_flash_delivery": { + "name": "is_flash_delivery", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": {}, + "foreignKeys": { + "orders_user_id_users_id_fk": { + "name": "orders_user_id_users_id_fk", + "tableFrom": "orders", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "orders_address_id_addresses_id_fk": { + "name": "orders_address_id_addresses_id_fk", + "tableFrom": "orders", + "tableTo": "addresses", + "columnsFrom": [ + "address_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "orders_slot_id_delivery_slot_info_id_fk": { + "name": "orders_slot_id_delivery_slot_info_id_fk", + "tableFrom": "orders", + "tableTo": "delivery_slot_info", + "columnsFrom": [ + "slot_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "orders_payment_info_id_payment_info_id_fk": { + "name": "orders_payment_info_id_payment_info_id_fk", + "tableFrom": "orders", + "tableTo": "payment_info", + "columnsFrom": [ + "payment_info_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "payment_info": { + "name": "payment_info", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "gateway": { + "name": "gateway", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "order_id": { + "name": "order_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "merchant_order_id": { + "name": "merchant_order_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "payload": { + "name": "payload", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "payment_info_merchant_order_id_unique": { + "name": "payment_info_merchant_order_id_unique", + "columns": [ + "merchant_order_id" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "payments": { + "name": "payments", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "gateway": { + "name": "gateway", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "order_id": { + "name": "order_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "merchant_order_id": { + "name": "merchant_order_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "payload": { + "name": "payload", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "payments_merchant_order_id_unique": { + "name": "payments_merchant_order_id_unique", + "columns": [ + "merchant_order_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "payments_order_id_orders_id_fk": { + "name": "payments_order_id_orders_id_fk", + "tableFrom": "payments", + "tableTo": "orders", + "columnsFrom": [ + "order_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "product_categories": { + "name": "product_categories", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "product_group_info": { + "name": "product_group_info", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "group_name": { + "name": "group_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "product_group_membership": { + "name": "product_group_membership", + "columns": { + "product_id": { + "name": "product_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "group_id": { + "name": "group_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "added_at": { + "name": "added_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": {}, + "foreignKeys": { + "product_group_membership_product_id_product_info_id_fk": { + "name": "product_group_membership_product_id_product_info_id_fk", + "tableFrom": "product_group_membership", + "tableTo": "product_info", + "columnsFrom": [ + "product_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "product_group_membership_group_id_product_group_info_id_fk": { + "name": "product_group_membership_group_id_product_group_info_id_fk", + "tableFrom": "product_group_membership", + "tableTo": "product_group_info", + "columnsFrom": [ + "group_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "product_group_membership_pk": { + "columns": [ + "product_id", + "group_id" + ], + "name": "product_group_membership_pk" + } + }, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "product_info": { + "name": "product_info", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "short_description": { + "name": "short_description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "long_description": { + "name": "long_description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "unit_id": { + "name": "unit_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "price": { + "name": "price", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "market_price": { + "name": "market_price", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "images": { + "name": "images", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_out_of_stock": { + "name": "is_out_of_stock", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "is_suspended": { + "name": "is_suspended", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "is_flash_available": { + "name": "is_flash_available", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "flash_price": { + "name": "flash_price", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + }, + "increment_step": { + "name": "increment_step", + "type": "real", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 1 + }, + "product_quantity": { + "name": "product_quantity", + "type": "real", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 1 + }, + "store_id": { + "name": "store_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "product_info_unit_id_units_id_fk": { + "name": "product_info_unit_id_units_id_fk", + "tableFrom": "product_info", + "tableTo": "units", + "columnsFrom": [ + "unit_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "product_info_store_id_store_info_id_fk": { + "name": "product_info_store_id_store_info_id_fk", + "tableFrom": "product_info", + "tableTo": "store_info", + "columnsFrom": [ + "store_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "product_reviews": { + "name": "product_reviews", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "product_id": { + "name": "product_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "review_body": { + "name": "review_body", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "image_urls": { + "name": "image_urls", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "review_time": { + "name": "review_time", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + }, + "ratings": { + "name": "ratings", + "type": "real", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "admin_response": { + "name": "admin_response", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "admin_response_images": { + "name": "admin_response_images", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "product_reviews_user_id_users_id_fk": { + "name": "product_reviews_user_id_users_id_fk", + "tableFrom": "product_reviews", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "product_reviews_product_id_product_info_id_fk": { + "name": "product_reviews_product_id_product_info_id_fk", + "tableFrom": "product_reviews", + "tableTo": "product_info", + "columnsFrom": [ + "product_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": { + "rating_check": { + "name": "rating_check", + "value": "\"product_reviews\".\"ratings\" >= 1 AND \"product_reviews\".\"ratings\" <= 5" + } + } + }, + "product_slots": { + "name": "product_slots", + "columns": { + "product_id": { + "name": "product_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "slot_id": { + "name": "slot_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "product_slots_product_id_product_info_id_fk": { + "name": "product_slots_product_id_product_info_id_fk", + "tableFrom": "product_slots", + "tableTo": "product_info", + "columnsFrom": [ + "product_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "product_slots_slot_id_delivery_slot_info_id_fk": { + "name": "product_slots_slot_id_delivery_slot_info_id_fk", + "tableFrom": "product_slots", + "tableTo": "delivery_slot_info", + "columnsFrom": [ + "slot_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "product_slot_pk": { + "columns": [ + "product_id", + "slot_id" + ], + "name": "product_slot_pk" + } + }, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "product_tag_info": { + "name": "product_tag_info", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "tag_name": { + "name": "tag_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tag_description": { + "name": "tag_description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "image_url": { + "name": "image_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_dashboard_tag": { + "name": "is_dashboard_tag", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "related_stores": { + "name": "related_stores", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": { + "product_tag_info_tag_name_unique": { + "name": "product_tag_info_tag_name_unique", + "columns": [ + "tag_name" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "product_tags": { + "name": "product_tags", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "product_id": { + "name": "product_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tag_id": { + "name": "tag_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "assigned_at": { + "name": "assigned_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": { + "unique_product_tag": { + "name": "unique_product_tag", + "columns": [ + "product_id", + "tag_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "product_tags_product_id_product_info_id_fk": { + "name": "product_tags_product_id_product_info_id_fk", + "tableFrom": "product_tags", + "tableTo": "product_info", + "columnsFrom": [ + "product_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "product_tags_tag_id_product_tag_info_id_fk": { + "name": "product_tags_tag_id_product_tag_info_id_fk", + "tableFrom": "product_tags", + "tableTo": "product_tag_info", + "columnsFrom": [ + "tag_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "refunds": { + "name": "refunds", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "order_id": { + "name": "order_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "refund_amount": { + "name": "refund_amount", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "refund_status": { + "name": "refund_status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'none'" + }, + "merchant_refund_id": { + "name": "merchant_refund_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "refund_processed_at": { + "name": "refund_processed_at", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": {}, + "foreignKeys": { + "refunds_order_id_orders_id_fk": { + "name": "refunds_order_id_orders_id_fk", + "tableFrom": "refunds", + "tableTo": "orders", + "columnsFrom": [ + "order_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "reserved_coupons": { + "name": "reserved_coupons", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "secret_code": { + "name": "secret_code", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "coupon_code": { + "name": "coupon_code", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "discount_percent": { + "name": "discount_percent", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "flat_discount": { + "name": "flat_discount", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "min_order": { + "name": "min_order", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "product_ids": { + "name": "product_ids", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "max_value": { + "name": "max_value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "valid_till": { + "name": "valid_till", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "max_limit_for_user": { + "name": "max_limit_for_user", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "exclusive_apply": { + "name": "exclusive_apply", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "is_redeemed": { + "name": "is_redeemed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "redeemed_by": { + "name": "redeemed_by", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "redeemed_at": { + "name": "redeemed_at", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_by": { + "name": "created_by", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": { + "reserved_coupons_secret_code_unique": { + "name": "reserved_coupons_secret_code_unique", + "columns": [ + "secret_code" + ], + "isUnique": true + } + }, + "foreignKeys": { + "reserved_coupons_redeemed_by_users_id_fk": { + "name": "reserved_coupons_redeemed_by_users_id_fk", + "tableFrom": "reserved_coupons", + "tableTo": "users", + "columnsFrom": [ + "redeemed_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "reserved_coupons_created_by_staff_users_id_fk": { + "name": "reserved_coupons_created_by_staff_users_id_fk", + "tableFrom": "reserved_coupons", + "tableTo": "staff_users", + "columnsFrom": [ + "created_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "special_deals": { + "name": "special_deals", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "product_id": { + "name": "product_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "quantity": { + "name": "quantity", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "price": { + "name": "price", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "valid_till": { + "name": "valid_till", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "special_deals_product_id_product_info_id_fk": { + "name": "special_deals_product_id_product_info_id_fk", + "tableFrom": "special_deals", + "tableTo": "product_info", + "columnsFrom": [ + "product_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "staff_permissions": { + "name": "staff_permissions", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "permission_name": { + "name": "permission_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": { + "unique_permission_name": { + "name": "unique_permission_name", + "columns": [ + "permission_name" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "staff_role_permissions": { + "name": "staff_role_permissions", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "staff_role_id": { + "name": "staff_role_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "staff_permission_id": { + "name": "staff_permission_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": { + "unique_role_permission": { + "name": "unique_role_permission", + "columns": [ + "staff_role_id", + "staff_permission_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "staff_role_permissions_staff_role_id_staff_roles_id_fk": { + "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", + "tableFrom": "staff_role_permissions", + "tableTo": "staff_roles", + "columnsFrom": [ + "staff_role_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { + "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", + "tableFrom": "staff_role_permissions", + "tableTo": "staff_permissions", + "columnsFrom": [ + "staff_permission_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "staff_roles": { + "name": "staff_roles", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "role_name": { + "name": "role_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": { + "unique_role_name": { + "name": "unique_role_name", + "columns": [ + "role_name" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "staff_users": { + "name": "staff_users", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "staff_role_id": { + "name": "staff_role_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": {}, + "foreignKeys": { + "staff_users_staff_role_id_staff_roles_id_fk": { + "name": "staff_users_staff_role_id_staff_roles_id_fk", + "tableFrom": "staff_users", + "tableTo": "staff_roles", + "columnsFrom": [ + "staff_role_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "store_info": { + "name": "store_info", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "image_url": { + "name": "image_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + }, + "owner": { + "name": "owner", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "store_info_owner_staff_users_id_fk": { + "name": "store_info_owner_staff_users_id_fk", + "tableFrom": "store_info", + "tableTo": "staff_users", + "columnsFrom": [ + "owner" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "units": { + "name": "units", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "short_notation": { + "name": "short_notation", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "full_name": { + "name": "full_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "unique_short_notation": { + "name": "unique_short_notation", + "columns": [ + "short_notation" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "unlogged_user_tokens": { + "name": "unlogged_user_tokens", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "added_at": { + "name": "added_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + }, + "last_verified": { + "name": "last_verified", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "unlogged_user_tokens_token_unique": { + "name": "unlogged_user_tokens_token_unique", + "columns": [ + "token" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "upload_url_status": { + "name": "upload_url_status", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'pending'" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "user_creds": { + "name": "user_creds", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_password": { + "name": "user_password", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": {}, + "foreignKeys": { + "user_creds_user_id_users_id_fk": { + "name": "user_creds_user_id_users_id_fk", + "tableFrom": "user_creds", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "user_details": { + "name": "user_details", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "bio": { + "name": "bio", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "date_of_birth": { + "name": "date_of_birth", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "gender": { + "name": "gender", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "occupation": { + "name": "occupation", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "profile_image": { + "name": "profile_image", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_suspended": { + "name": "is_suspended", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + }, + "updated_at": { + "name": "updated_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": { + "user_details_user_id_unique": { + "name": "user_details_user_id_unique", + "columns": [ + "user_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "user_details_user_id_users_id_fk": { + "name": "user_details_user_id_users_id_fk", + "tableFrom": "user_details", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "user_incidents": { + "name": "user_incidents", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "order_id": { + "name": "order_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "date_added": { + "name": "date_added", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + }, + "admin_comment": { + "name": "admin_comment", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "added_by": { + "name": "added_by", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "negativity_score": { + "name": "negativity_score", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "user_incidents_user_id_users_id_fk": { + "name": "user_incidents_user_id_users_id_fk", + "tableFrom": "user_incidents", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "user_incidents_order_id_orders_id_fk": { + "name": "user_incidents_order_id_orders_id_fk", + "tableFrom": "user_incidents", + "tableTo": "orders", + "columnsFrom": [ + "order_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "user_incidents_added_by_staff_users_id_fk": { + "name": "user_incidents_added_by_staff_users_id_fk", + "tableFrom": "user_incidents", + "tableTo": "staff_users", + "columnsFrom": [ + "added_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "user_notifications": { + "name": "user_notifications", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "image_url": { + "name": "image_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + }, + "body": { + "name": "body", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "applicable_users": { + "name": "applicable_users", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "users": { + "name": "users", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "mobile": { + "name": "mobile", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": { + "unique_email": { + "name": "unique_email", + "columns": [ + "email" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "vendor_snippets": { + "name": "vendor_snippets", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "snippet_code": { + "name": "snippet_code", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "slot_id": { + "name": "slot_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_permanent": { + "name": "is_permanent", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "product_ids": { + "name": "product_ids", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "valid_till": { + "name": "valid_till", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))" + } + }, + "indexes": { + "vendor_snippets_snippet_code_unique": { + "name": "vendor_snippets_snippet_code_unique", + "columns": [ + "snippet_code" + ], + "isUnique": true + } + }, + "foreignKeys": { + "vendor_snippets_slot_id_delivery_slot_info_id_fk": { + "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk", + "tableFrom": "vendor_snippets", + "tableTo": "delivery_slot_info", + "columnsFrom": [ + "slot_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + } + }, + "views": {}, + "enums": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "internal": { + "indexes": {} + } +} \ No newline at end of file diff --git a/packages/db_helper_sqlite/drizzle/meta/_journal.json b/packages/db_helper_sqlite/drizzle/meta/_journal.json new file mode 100644 index 0000000..b4636c1 --- /dev/null +++ b/packages/db_helper_sqlite/drizzle/meta/_journal.json @@ -0,0 +1,13 @@ +{ + "version": "7", + "dialect": "sqlite", + "entries": [ + { + "idx": 0, + "version": "6", + "when": 1774588140474, + "tag": "0000_nifty_sauron", + "breakpoints": true + } + ] +} \ No newline at end of file diff --git a/packages/db_helper_sqlite/index.ts b/packages/db_helper_sqlite/index.ts index 9a1c3b1..203f2d9 100644 --- a/packages/db_helper_sqlite/index.ts +++ b/packages/db_helper_sqlite/index.ts @@ -3,7 +3,6 @@ // Re-export database connection export { db, initDb } from './src/db/db_index' - // Re-export schema export * from './src/db/schema' diff --git a/packages/db_helper_sqlite/src/admin-apis/banner.ts b/packages/db_helper_sqlite/src/admin-apis/banner.ts index 5f0e797..76cdd32 100644 --- a/packages/db_helper_sqlite/src/admin-apis/banner.ts +++ b/packages/db_helper_sqlite/src/admin-apis/banner.ts @@ -1,7 +1,8 @@ import { db } from '../db/db_index' -import { homeBanners } from '../db/schema' +import { homeBanners, staffUsers } from '../db/schema' import { eq, desc } from 'drizzle-orm' + export interface Banner { id: number name: string diff --git a/packages/db_helper_sqlite/src/lib/date.ts b/packages/db_helper_sqlite/src/lib/date.ts new file mode 100644 index 0000000..eac491d --- /dev/null +++ b/packages/db_helper_sqlite/src/lib/date.ts @@ -0,0 +1,29 @@ +export function coerceDate(value: unknown): Date | null { + if (value instanceof Date) { + return Number.isNaN(value.getTime()) ? null : value + } + + if (value === null || value === undefined) { + return null + } + + if (typeof value === 'number') { + const date = new Date(value) + return Number.isNaN(date.getTime()) ? null : date + } + + if (typeof value === 'string') { + const parsed = Date.parse(value) + if (!Number.isNaN(parsed)) { + return new Date(parsed) + } + + const asNumber = Number(value) + if (!Number.isNaN(asNumber)) { + const date = new Date(asNumber) + return Number.isNaN(date.getTime()) ? null : date + } + } + + return null +} diff --git a/packages/db_helper_sqlite/src/user-apis/order.ts b/packages/db_helper_sqlite/src/user-apis/order.ts index 6e54317..2288651 100644 --- a/packages/db_helper_sqlite/src/user-apis/order.ts +++ b/packages/db_helper_sqlite/src/user-apis/order.ts @@ -20,6 +20,7 @@ import type { UserOrderDetail, UserRecentProduct, } from '@packages/shared' +import { coerceDate } from '../lib/date' export interface OrderItemInput { productId: number @@ -366,7 +367,7 @@ export async function getOrdersWithRelations( offset: number, pageSize: number ): Promise { - return db.query.orders.findMany({ + const ordersWithRelations = await db.query.orders.findMany({ where: eq(orders.userId, userId), with: { orderItems: { @@ -410,7 +411,23 @@ export async function getOrdersWithRelations( orderBy: [desc(orders.createdAt)], limit: pageSize, offset: offset, - }) as Promise + }) + + return ordersWithRelations.map((order) => { + const createdAt = coerceDate(order.createdAt) ?? new Date(0) + const slot = order.slot + ? { + ...order.slot, + deliveryTime: coerceDate(order.slot.deliveryTime) ?? new Date(0), + } + : null + + return { + ...order, + createdAt, + slot, + } + }) as OrderWithRelations[] } export async function getOrderCount(userId: number): Promise { @@ -477,7 +494,23 @@ export async function getOrderByIdWithRelations( }, }) - return order as OrderDetailWithRelations | null + if (!order) { + return null + } + + const createdAt = coerceDate(order.createdAt) ?? new Date(0) + const slot = order.slot + ? { + ...order.slot, + deliveryTime: coerceDate(order.slot.deliveryTime) ?? new Date(0), + } + : null + + return { + ...order, + createdAt, + slot, + } as OrderDetailWithRelations } export async function getCouponUsageForOrder( diff --git a/packages/migrated.db b/packages/migrated.db index dac3838..e69de29 100644 Binary files a/packages/migrated.db and b/packages/migrated.db differ diff --git a/packages/migrator/README.md b/packages/migrator/README.md index 6ceb8bd..7ec353d 100644 --- a/packages/migrator/README.md +++ b/packages/migrator/README.md @@ -18,6 +18,7 @@ Edit `src/config.ts` directly to configure database settings: export const postgresConfig = { connectionString: 'postgresql://postgres:postgres@localhost:5432/freshyo', ssl: false, + schema: 'public', }; // SQLite Configuration diff --git a/packages/migrator/data/migrated.db b/packages/migrator/data/migrated.db index dac3838..26cac24 100644 Binary files a/packages/migrator/data/migrated.db and b/packages/migrator/data/migrated.db differ diff --git a/packages/migrator/data/migrated.sql b/packages/migrator/data/migrated.sql new file mode 100644 index 0000000..d9fe8f9 --- /dev/null +++ b/packages/migrator/data/migrated.sql @@ -0,0 +1,21840 @@ +PRAGMA foreign_keys=OFF; +BEGIN TRANSACTION; +CREATE TABLE IF NOT EXISTS "address_areas" ("id" INTEGER NOT NULL, "place_name" TEXT NOT NULL, "zone_id" INTEGER, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO address_areas VALUES(1,'Housing Board',1,'2025-12-10T14:30:58.912Z'); +INSERT INTO address_areas VALUES(2,'Mettugadda',2,'2025-12-10T14:31:22.451Z'); +CREATE TABLE IF NOT EXISTS "address_zones" ("id" INTEGER NOT NULL, "zone_name" TEXT NOT NULL, "added_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO address_zones VALUES(1,'zone 1','2025-12-10T14:30:40.126Z'); +INSERT INTO address_zones VALUES(2,'Zone 2','2025-12-10T14:31:12.245Z'); +CREATE TABLE IF NOT EXISTS "addresses" ("id" INTEGER NOT NULL, "user_id" INTEGER NOT NULL, "is_default" INTEGER NOT NULL DEFAULT false, "name" TEXT NOT NULL, "phone" TEXT NOT NULL, "address_line1" TEXT NOT NULL, "address_line2" TEXT, "city" TEXT NOT NULL, "state" TEXT NOT NULL, "pincode" TEXT NOT NULL, "latitude" REAL, "longitude" REAL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "zone_id" INTEGER, "admin_latitude" REAL, "admin_longitude" REAL, "google_maps_url" TEXT); +INSERT INTO addresses VALUES(1,3,0,'Bushra ','9000190484','Mahabubnagar ','Noor nagar','Mahabubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:13:54.439Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(2,3,0,'Bushra ','9000190484','Mahabubnagar ','Noor nagar','Mahabubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:13:56.852Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(3,3,0,'Bushra ','9000190484','Mahabubnagar ','Noor nagar','Mahabubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:13:59.752Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(4,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:15:59.602Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(5,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:09.066Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(6,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:10.587Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(7,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:13.227Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(8,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:14.410Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(9,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:15.341Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(10,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:16.029Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(11,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:16.818Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(12,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:17.605Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(13,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:18.595Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(14,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:20.593Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(15,3,0,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:25.042Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(16,3,1,'Bhsj','9000190484','Mahbubnagar ','Fcd gown motinagar ','Mahbubnagar ','Telangana ','509001',NULL,NULL,'2025-11-19T07:16:26.343Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(17,1,1,'Mohammed Shafiuddin','9676651496','Hno: 1-9-25/25, Noor Nagar','Nawabpet Road','Mahabubnagar','Telangana','509001',16.73764400000000041,78.00380999999999787,'2025-11-19T07:36:43.907Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(18,1,0,'Mohammed Rafiuddin','9676651496','H No: 1-9-25/25, Noor Nagar','Nawabpet Road','Mahabubnagar','Telangana','509001',37.785834999999998728,-122.40641999999999356,'2025-11-19T07:40:54.902Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(19,1,0,'Khamar Jahan','8297666911','H no: 1-9-25/25, Noor Nagar','Nawabpet Road','Mahabubnagar','Telangana','509001',37.785834999999998728,-122.40641999999999356,'2025-11-19T07:49:04.462Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(20,2,1,'Qusham ','8688182552','5-7-30/L/9','','Mahabubnagar','Telangana','509001',16.741472000000001685,78.011600000000003163,'2025-11-21T08:45:46.550Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(21,4,0,'Shafi ','8688326100','1-4-6/9/12','Noor nagar','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-02T09:55:46.194Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(22,4,0,'Saniya','8688326100','1-4/25/L','Mothinagar','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-02T09:57:32.847Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(23,14,0,'Saqib Mujtaba','9390567030','S s guyta','','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-19T00:53:31.858Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(24,15,0,'Arif uddin','9866116948','Noor nagar','Noor nagar ','Mahabubnagar','Telangana','509001',16.741569999999999396,78.011669999999995184,'2025-12-19T01:00:27.678Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(25,15,0,'Arif uddin','9866116948','Noor nagar','Nawapet road','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-19T01:02:03.968Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(26,17,1,'Bbavani','7013167289','Market','','Mahabubnagar','Telangana','509001',16.760310000000000485,77.99338000000000548,'2025-12-19T03:01:51.649Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(28,17,0,'H','6666666666','Hh','H','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-19T03:42:49.915Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(29,17,0,'Bhavaniiiiiii kumar SEDAMKAR iii','6666666666','Hh','H','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-19T10:11:23.603Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(30,20,0,'Md waseed','9676010763','Mothi nagar','Mothi nagar','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-22T09:04:00.235Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(31,22,0,'Myhome','8885456295','1-10','11','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-23T21:09:01.181Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(32,16,1,'Pradeep kumar ','7799420184','Near the sub Post office, OLD PALAMOOR ','MAHABUBNAGAR ','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-26T19:30:44.314Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(33,12,0,'Marlu','6302478945','Yogi tiffin ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2025-12-27T23:56:10.399Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(34,26,1,'Faiz ','9652180398','Gol masjid ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-03T02:42:42.263Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(35,21,0,'Sailesh','9701690010','Sailesh Nilayam, Sagara colony','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-04T13:19:25.837Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(36,30,1,'Tirmaldev gate ','8341217812','T.d gutta ','Kosgi road','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-06T07:45:37.451Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(37,22,0,'My brother''s home','8885456295','Hjuu','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-07T10:24:39.504Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(38,34,1,'Habeeb','1218182456','Shah ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-13T09:26:06.610Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(39,36,1,'Rimsha','9985785747','near bharath talkies road,beside punjab bakery','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-14T03:26:36.657Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(40,22,1,'Address name afroz','8862958999','Address line 1','Address line 2 optional','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-18T10:23:28.923Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(41,42,1,'Inzamam ','8019548522','Goal masjid near sr graden','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-21T00:01:32.400Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(42,39,0,'Shabana begum ','6281768720','6-5-50/1, Habeeb nagar,menaka theatre ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T10:23:54.676Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(43,25,1,'Mohsin Dk','9848296296','TD GUTTA ','AL MADINA CHICKEN CENTRE','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T10:37:26.594Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(44,49,0,'Akram hashmi ','9182043867','Rb function hall ','Talab katta ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T13:49:40.718Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(45,50,0,'Shaista ','9390338662','A S chicken center Bhageerata colony road ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T13:58:33.695Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(46,51,1,'Santhosh Guptha','8606465444','Kamakshi Smart City Block A-101 ','Venkateshwara Colony ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T23:00:16.057Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(47,1,0,'Mohammed Rafiuddin','7330875929','Noor Nagar, Nawabpet Road','Mahabubnagar','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T23:08:31.533Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(48,1,0,'Mohammed Fasiuddin','9441740551','Noor Nagar, Nawabpet Road','Mahabubnagar','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-23T23:10:52.880Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(50,22,0,'7-38 BK reddy colony ','8885456295','Near masjid e Umar Farooq ','','Mahabubnagar','Telangana','509001',16.740442000000001598,78.007355000000000444,'2026-01-24T20:43:47.162Z',NULL,16.732927000000000106,77.993509999999997006,NULL); +INSERT INTO addresses VALUES(51,29,1,'Zahed Habeeb ','6302300646','5-7-30/L/9 gaolnl masjid','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-25T23:35:14.565Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(52,55,1,'rahman junaid','7780659850','Bk reddy colony road no.1','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-26T09:30:35.593Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(53,59,0,'Mohammed yahiya khan ','9490585051','House no 1-1-77/b/3','Opp golbanglaw beside royal cement n steel','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-26T13:08:50.114Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(54,60,1,'Srinivasulu ','8331989727','Koilkonda X Road','TD GUTTA','Mahabubnagar','Telangana','509001',16.760335999999997902,77.993645000000002553,'2026-01-26T22:21:40.119Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(55,64,1,'Sayeed Pasha','9985383270','Goal masjid ','5-7-30/L/9','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-27T06:43:54.588Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(56,65,1,'Mahesh','9381637374','Beside Dl Narayana tuitions','Panchowrastha','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-27T11:28:27.599Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(57,54,0,'Abdul ahad ','9849759289','Veernapet shareef calony ','Fz water plant patel masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-27T11:43:53.572Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(58,66,1,'Faizan ','9618791714','Near farooq masjid ','Bk reddy colony ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-28T01:30:42.348Z',NULL,16.760255999999998266,77.993515000000002146,NULL); +INSERT INTO addresses VALUES(59,6,1,'TANVEER ','9346436140','BN REDDY COLONY ','BESIDE PASULA KISTA REDDY FUNCTION HALL ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-28T06:33:17.478Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(60,58,0,'Mohd Bilal','9603333080','Edira road before masjid-e-soulath','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-28T10:39:59.776Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(63,1,0,'Saniya Shaik','9676651496','Noor Nagar, Nawabpet Road','Near FCI Godown','Mahabubnagar','Telangana','509001',37.785834999999998728,-122.40641999999999356,'2026-01-29T14:11:38.999Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(65,1,0,'John Wick','9676651496','Noor Nagar','Mahabubnagar','Mahabubnagar','Telangana','509001',16.731055999999999706,78.011049999999997339,'2026-01-29T14:54:04.995Z',NULL,NULL,NULL,'https://maps.app.goo.gl/B3X3kkkgXdp6YbGW9'); +INSERT INTO addresses VALUES(66,38,0,'Inzamam Innu','9492230173','Ar talent school','Sr garden habeeb nagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-29T22:40:44.484Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(67,77,0,'Tauheed Ahmed ','7287952112','B.k reddy Omer Farooq masjid road','','Mahabubnagar','Telangana','509001',16.739729000000000525,78.006410000000006021,'2026-01-30T14:07:03.540Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(69,54,1,'Abdul ahad ','9849759289','3-11-137/A/11Veernapet shareef calony ','Fz water plant patel masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-01-31T02:30:19.844Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(70,78,1,'Vidya sagar','9059201201','65/a brundavana gardens','Svs dental hospital behind ashok leyland showroom','Mahabubnagar','Telangana','509001',16.759952999999998546,78.052940000000008424,'2026-01-31T04:25:12.551Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(71,7,1,'Umair ','7386623412','Brundavan colony near MG show room ','','Mahabubnagar','Telangana','509001',16.755016000000000353,78.052220000000005484,'2026-02-01T00:27:45.058Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(72,82,0,'Noushin','7981337554','Habib nagar','Near kirshima kirna','Mahabubnagar','Telangana','509001',16.733945999999999543,77.989480000000002135,'2026-02-01T01:03:36.263Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(73,74,1,'Mohd ','8639145664','Mahabubnagar habeeb nagar near karishma kirna','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T01:31:41.702Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(74,83,0,'Mohd Fasiuddin ','9441740551','H. No. 1-9-25/B/1/A.Nawab pet road','Noor. Nagar Mahabub Nagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T02:12:41.964Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(79,1,0,'Ethan Hunt','9676651496','Noor Nagar','Nawabpet Road','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T02:51:47.852Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(80,1,0,'Ethan Hunt','9676651496','NN','NN','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T02:58:10.268Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(81,84,1,'H.No. 8-1-72/B','8639762655','Road No. 4, Teacher''s Colony','Near Ramalayam','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T04:29:57.712Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(82,86,0,'heena begum','9121585783','hanumanpura ','jamaulamma nagar temple road ','Mahabubnagar','Telangana','509001',16.728843999999998715,77.987433999999993261,'2026-02-01T05:44:57.399Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(83,88,1,'Hani','9398199100','Goal masjid 5-7-30/L/9','Mahabubnagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T10:07:03.325Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(84,89,1,'Khaja mujeebuddin','8919308867','Srinivas colony','Beside geetam school taj residency','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-01T23:25:14.868Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(85,91,1,'H No 14-5-208/13/A','9347168525','2A Road, Krishna Nagar Colony,','Bhageeratha Colony Road','Mahabubnagar','Telangana','509001',16.735164999999998514,78.002075000000008486,'2026-02-02T04:29:24.308Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(86,92,0,'Asif','6305442889','Balaji convention hall','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-02T04:52:59.786Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(87,93,1,'md ghouse moin uddin','9705107988','rayeesa masjid trasfaram mbnr','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-02T04:57:17.798Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(88,95,1,'Mohammed arham','6301612623','Madina masjid','Karachi bakery back side','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-02T06:39:17.730Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(89,73,0,'Ameen ','9652801308','Bharath takies opp mm poly clinic','Madina masjid','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-02T20:23:12.850Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(90,97,1,'K Krishnaiah','9441565235','Hno 10-6-ye0033, srinivasa colony','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-02T23:57:41.024Z',NULL,NULL,NULL,'https://maps.app.goo.gl/7PsHmbWYvzbdkMHm8'); +INSERT INTO addresses VALUES(91,98,1,'Abdul ahad ','9381165946','3-11-137/A/11','Fz water plant veernapet patel masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-03T00:26:41.356Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(92,24,0,'Tausif ali','9948350118','14-8-87/4 iqbal manzil marlu','Iqbal manzil marlu','Mahabubnagar','Telangana','509001',16.741389999999998217,78.011604000000005498,'2026-02-03T03:06:18.057Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(93,46,0,'Sidra','9392266793','Gol masjid Sr garden ','Sr garden 1 flore','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-03T07:32:53.282Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(94,81,0,'SYED','9652338446','H.no 14-8-121','Near, Masjid e Mustafa ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-03T10:16:08.941Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(95,96,0,'Arif hussain','9848466280','Near mvs college, christianpally, opposite true value showroom','Bhavani nagar colony 2-96/2','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-04T01:34:16.516Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(96,103,0,'Zaid','6302119072','Opposite of Malabar gold and diamonds ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-05T03:15:46.045Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(98,105,1,'Ayesha mahmeen','9063857682','Ramaiah bowli; one town; mahabubanagar','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-05T22:58:26.450Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(99,107,0,'Saad','9573989830','Road no 6d ','Bhageritha colony ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T02:47:54.809Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(100,108,0,'SADIYA TAZEEN','9949035807','RB palace function hall ','RB palace function hall ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T03:10:35.120Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(101,109,0,'Aman','9063508083','1-8-17/10 T.d gutta fire station, Nalbowli Durdkhna.','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T03:14:49.128Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(102,113,0,'Kamal','9052741123','Marlu ','Brundavan colony','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T05:00:45.506Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(103,114,0,'Md.khizar Ahmed','9052323490','RB palace functionhall','RB palace functionhall ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T05:49:47.686Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(104,71,1,'Karthik ','9110314975','Line 7 balajinagar ','','Mahabubnagar','Telangana','509001',16.728182000000000329,77.997190000000005127,'2026-02-06T06:25:28.389Z',NULL,NULL,NULL,'PXHW+7WQ, Lane No. 7, BalajiNagar Colony, Mahbubnagar, Telangana 509001'); +INSERT INTO addresses VALUES(105,115,0,'Nadera','9985232643','H.no.1-10-19/3/6/a','Opp two taps','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T10:26:24.248Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(106,118,0,'Nida','9966022031','Shiva Shakti nagar ','Shiva Shakti nagar kaman','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-06T22:55:26.874Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(107,119,0,'Mohd Mujahed ','9059318255','Madina masjid old hospital ','Madina masjid kumarvadi','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-07T07:06:08.579Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(108,120,0,'Raza','7013641457','Hno5-7-30/n/6 habeebnagar Mahabubnagar ','Near zamzam kiranam habeebnagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-07T23:10:58.038Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(109,121,1,'Ram reddy','5457545442','Ganesh Nagar ','','Mahabubnagar','Telangana','509001',16.736355000000000536,77.986789999999999167,'2026-02-08T00:48:19.094Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(110,122,1,'MD SULTAN','9642339427','Hno 5-7-30/n/6 habeebnagar mahbubnagar','','Mahabubnagar','Telangana','509001',16.731957999999997888,77.989800000000002455,'2026-02-08T04:33:41.585Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(111,123,0,'Tahera begum','6305184261','Hn function hall veerana pet Mahabubnagar','Hn function hall veerana pet Mahabubnagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-09T05:50:43.617Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(112,125,0,'Ayesha','8341078342','Opp redbucket biryani lane','Padmavati colony ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-09T07:56:36.555Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(113,127,1,'khaja aleem uddin','7989653339','7-133/4 sun city colony sha sahab gutta','razzak masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-10T05:41:41.020Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(114,114,0,'Zunera','9052333490','Rb palace','Kitchen side','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-14T01:01:09.499Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(115,131,1,'Fathima ','9966710280','Seshadri nagar colony street 0/7','bk reddy colony, beside bc hostel ','Mahabubnagar','Telangana','509001',16.739141000000000047,78.004074000000001021,'2026-02-15T00:33:30.890Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(116,134,1,'Kaleem','9133621540','Shah shah gutta','Beside ss gutta masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-16T04:02:17.458Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(117,136,0,'Arman ','9390785046','Employees colony ','Road no 3','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-17T07:30:03.424Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(118,137,1,'Abdul Gaffar','8555938403','6-107/5','Sheshadri Nagar Road no 1 ','Mahabubnagar','Telangana','509001',16.74219099999999738,78.006219999999997227,'2026-02-17T08:53:09.780Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(119,140,0,'Sara','9848738554','Golmasjid mahaboobnagar ','Zam zam opposite ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-17T13:48:37.631Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(120,141,0,'Inzamam','8919042963','Sr garden back side gate','Gol masjid','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-17T19:47:20.768Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(121,143,0,'Samir','7286888001','Employees colony ','Road 3','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-17T22:56:28.656Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(122,130,1,'Rahiman','9912951895','Flat no 202,Aayra manzil Beside veeresh kiranam near Ibrahim Masjid','Street no:6/B,Sheshadri Nagar','Mahabubnagar','Telangana','509001',16.738883999999998763,78.004279999999992512,'2026-02-17T23:27:21.024Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(123,132,1,'Muzammil ','9110526651','5-7-30/L/2/C ,opp ghousiya kiranam gol masjid ','','Mahabubnagar','Telangana','509001',16.732962000000000557,77.990610000000000212,'2026-02-18T00:28:03.816Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(124,145,0,'Naheed','8179264991','5-7-30/L/7/H Habeeb Nagar Near Rayeesa Masjid','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-18T03:46:16.471Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(125,138,0,'Mahek','8328369823','B k ready colony ','Near omer Farooq masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-18T05:15:32.019Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(126,147,1,'Mohammad ','9885579134','H.no.5-7-30/L/10/C','Opp rayeesa masjid line','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-18T05:15:47.126Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(127,148,0,'Abdul razeek ','9100529645','Shavia shakti nagar ','','Mahabubnagar','Telangana','509001',16.735370000000000523,77.995819999999991267,'2026-02-18T07:31:27.609Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(128,150,1,'Khaleel Ahmed','9700630611','B.k Reddy Colony near Umar Farooq masjid ,Aziz kiranam opposite lane','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-18T09:13:27.828Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(129,144,1,'Asad','7981140388','Yenugonda Opp Masjid','','Mahabubnagar','Telangana','509001',16.754571999999998688,78.036539999999998684,'2026-02-18T10:09:17.009Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(130,149,1,'Moulali ','8519862344','Rayeesa masjid ','Habeeb Nagar ','Mahabubnagar','Telangana','509001',16.730108000000001311,77.99151600000000073,'2026-02-18T22:18:46.343Z',NULL,16.731068000000000495,77.990629999999994126,NULL); +INSERT INTO addresses VALUES(131,156,0,'Arshed','9381371156','H.no4-2, beside wisdom school ','Ramaiah Bowli ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-18T23:58:56.880Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(132,99,1,'Saniya','7893499520','H.No: 4-2-7/2a Tayyabnagar Ramaiyah bowli ','Near Almas function hall opp lane ','Mahabubnagar','Telangana','509001',16.740355999999998459,77.991410000000005453,'2026-02-19T01:03:59.675Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(133,159,0,'Mohd.Mujahid','9182114853','14-107/2,suncity colony','Sheshadrinagar,near masjid e razzaq ','Mahabubnagar','Telangana','509001',16.742678000000001503,78.006249999999992539,'2026-02-19T03:40:34.252Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(134,160,1,'Mohmmed pro','9642417025','50','Ibadur raheman masjed opposite road Shiva Shakti road iron shop opposite ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-19T03:49:45.149Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(135,151,0,'Anjum','9346508676','H۔No:6-5-57/10 Habeeb nagar ','Beside Hanan masjid ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-19T04:09:11.514Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(136,4,0,'Saniya','8688326100','Marlu , near Ali tower ','','Mahabubnagar','Telangana','509001',16.741472000000001685,78.011610000000004561,'2026-02-19T04:16:33.494Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(137,162,0,'Shaik Hussain','6302798105','Zehra School Noori Nagar','Masjid a noore Ilahi','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-19T05:08:26.454Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(138,32,1,'Md kaif','8919304169','14_6_13/9/a2','Pasula kistta reddy colony','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-19T06:14:03.397Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(139,163,0,'farhana begum','7032026589','Marlu , employes colony','Road no. 3','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-19T06:49:20.611Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(140,165,0,'Rumana ','6281349676','Govt hospital back side mahabubnagr ','Tawakal bekry mahabubnagr 8-1-39/1','Mahabubnagar','Telangana','509001',16.749452999999999036,78.00876999999999839,'2026-02-19T10:27:50.727Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(141,168,0,'Aladdin','8498937807','S.s gutta mahabubnagar bhagat Singh colony ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-20T03:29:56.135Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(142,169,1,'Ahmed Ali','7799420422','Near Mustafa masjid','Marlu','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-20T03:37:22.057Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(143,171,1,'Mohammed Mudassir','6281738569','H.No:5-7-30/N/9, Old Palamoor Location, Near Rayeesa Masjid','First Right turn after S.M.Tent House','Mahabubnagar','Telangana','509001',16.73113299999999981,77.990329999999996601,'2026-02-20T03:57:59.497Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(144,170,0,'Raheel','9901294914','1-10-79/B, ShahSaheb Gutta','Vasavi college lane.','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-20T03:59:16.614Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(145,176,0,'Arshad Ali','9885578647','14-8-120 Near Masjid e Mustafa','Marlu','Mahabubnagar','Telangana','509001',16.743597000000001173,78.010283999999998627,'2026-02-20T06:01:46.916Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(146,163,0,'farhana begum','7032026589','Marlu , employes colony mbnr','Road no. 3','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-20T07:20:46.386Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(147,181,1,'Khaled ','9885252564','1-10-87/3/A','1-10-87/3/A','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-20T13:34:13.988Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(148,184,1,'Shazia ','9160481161','Near puchamma temple bk reddy colony ','Near puchamma temple bk reddy colony ','Mahabubnagar','Telangana','509001',16.742122999999999422,78.0064849999999943,'2026-02-20T22:47:32.316Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(149,186,0,'Faiz ul Rahman ','9550541366','Masdoos Nagar ','','Mahabubnagar','Telangana','509001',16.732306999999999597,77.990759999999994533,'2026-02-21T03:45:12.460Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(150,187,0,'Mohd Fasi','9703691566','Habeebnagar ','Near Narmada Honda Showroom ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-21T05:40:59.163Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(151,189,0,'Chintu','8019231723','Road no 6B','BHAGEERATHA colony ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-21T13:02:30.211Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(152,178,0,'Abdul khadar ','7799492001','Nakha Pride apartment,door no 304','Near district court, telangana chowrasta ','Mahabubnagar','Telangana','509001',16.751510000000000566,77.992390000000000327,'2026-02-21T20:56:08.971Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(153,193,0,'Raza','7207490881','5-7-30/n/6 habeebnagar mbnr','Near zamzam kiranam','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-21T22:53:08.954Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(154,194,1,'Syed Aijaz','6302774527','Al noor school straight shashabgutta','Alkouser madarsa backnside','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T00:16:09.557Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(155,195,0,'Aditya','6301375032','Old palamoor','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T00:58:09.170Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(156,196,0,'Rani','8978874860','Vinayak Nagar, housing board colony ','Near edira Bypass X Road','Mahabubnagar','Telangana','509001',16.747900000000002229,78.04578999999999489,'2026-02-22T00:59:40.685Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(157,197,0,'Habeeb Hasham','7842321671','14-6-14/6','Beside masjid e ibrahim back road','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T01:07:34.153Z',NULL,NULL,NULL,'https://maps.app.goo.gl/P5sxjAGjgjELdnh37?g_st=ic'); +INSERT INTO addresses VALUES(158,198,0,'Atiya sikandar','7799311559','3-2-3, afzal manzil, beside hamdard clinic makka masjid road verrannapet','','Mahabubnagar','Telangana','509001',16.744990000000001373,77.98212399999999711,'2026-02-22T01:08:33.396Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(159,200,1,'Srinath','8328216406','Manyamkonda ','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T02:02:31.789Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(160,201,0,'Imaduddin ','9121477995','Near Mothinagar government High school ','Near SV godam','Mahabubnagar','Telangana','509001',16.759189999999999365,77.997765000000001123,'2026-02-22T02:03:54.841Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(161,205,1,'nasir','9177629869','Hanuman pura masjid e jabbar','mahabubngar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T03:45:47.686Z',NULL,16.730706999999997997,77.988939999999997709,NULL); +INSERT INTO addresses VALUES(162,206,0,'M.A MALIK','9000452637','14-7-91/2/1/C','Marlu Jr palace','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T04:21:36.419Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(163,208,0,'Amer','9618770682','H no 6-3-44/D/10/2/1, hanuman pura,Imran kiranam','9059566856','Mahabubnagar','Telangana','509001',16.729278999999999122,77.989990000000002368,'2026-02-22T04:39:03.925Z',NULL,16.729820000000000135,77.990039999999991593,NULL); +INSERT INTO addresses VALUES(164,209,0,'Shakeel','7993744243','Shiva shakthi nagar','telugu geri','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T04:45:09.965Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(165,212,0,'Salma ','7670818331','5-5-11 dist jail khana riyaz ul Jannah masjid old palamoor mahabubnagar ','Riyaz ul Jannah masjid mahabubnagar telengana 509001','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T06:04:13.075Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(166,213,1,'Ahmed ','9392816978','Habeeb nagar ','Zam Zam kiranam ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-22T08:01:50.655Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(167,50,0,'Shaista','9390338662','Santosh Nagar colony beside maheshwari theatre ','','Mahabubnagar','Telangana','509001',16.750419999999999198,78.033630000000000492,'2026-02-22T14:05:23.161Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(168,223,0,'Syed','9398876512','S.S gutta 2 nal galli ','Tipu sultan chowk ','Mahabubnagar','Telangana','509001',16.746738000000000567,78.00908999999999871,'2026-02-23T03:47:19.976Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(169,224,1,'Saud Amodi ','8374782337','Shah Sahab gutta','Shah Sahab Gupta A1 chicken center Gali ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-23T04:40:34.997Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(170,225,0,'Akheel ','9666426396','3-3-48','Nagar mahabubnagar Telangana ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-23T06:45:56.079Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(171,226,0,'Anas Affuaf ','9391479179','Near Taiba masjid Ramaiah bowli ','Mahabubnagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-23T08:32:01.241Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(172,228,1,'Abdur rahman','9966138248','Plot 22 Opp children''s park last lane z and z colony ','1 town back side alis mart colony','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-23T22:39:52.264Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(173,229,1,'Abdul kaleem','9885575791','5-4-85/f/14/2','Opposite Amena masjid tayyab nagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-24T01:41:59.722Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(174,230,0,'Mehreen','9398645142','Opposite to bright school, marlu','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-24T01:44:03.723Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(175,219,1,'Naseer','7569573638','5-3-71/2/C masdoos nagar near gouds colony','','Mahabubnagar','Telangana','509001',16.735652999999999224,77.989829999999997767,'2026-02-24T02:55:23.438Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(176,158,0,'Shabana ','9381289050','Wisdom school near','Ramaiah bowli','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-02-24T04:02:06.921Z',NULL,NULL,NULL,NULL); +INSERT INTO addresses VALUES(177,232,1,'Sultan bahiyal','9059525115','Adjcent to laxmi tiffin centre, old hospital road, madina masjid ','','Mahabubnagar','Telangana','509001',16.74373200000000228,77.985489999999995092,'2026-02-24T14:51:10.955Z',NULL,NULL,NULL,NULL); +CREATE TABLE IF NOT EXISTS "cart_items" ("id" INTEGER NOT NULL, "user_id" INTEGER NOT NULL, "product_id" INTEGER NOT NULL, "quantity" REAL NOT NULL, "added_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO cart_items VALUES(32,3,3,1.0,'2025-11-24T06:25:02.963Z'); +INSERT INTO cart_items VALUES(48,3,9,2.0,'2025-11-28T09:43:04.203Z'); +INSERT INTO cart_items VALUES(49,7,11,1.0,'2025-11-28T22:20:23.104Z'); +INSERT INTO cart_items VALUES(99,4,11,1.0,'2025-11-29T11:36:06.140Z'); +INSERT INTO cart_items VALUES(100,4,12,1.0,'2025-12-02T09:50:53.817Z'); +INSERT INTO cart_items VALUES(102,4,3,2.0,'2025-12-02T09:53:19.217Z'); +INSERT INTO cart_items VALUES(108,6,11,1.0,'2025-12-06T01:58:02.112Z'); +INSERT INTO cart_items VALUES(109,6,3,1.0,'2025-12-06T02:02:59.975Z'); +INSERT INTO cart_items VALUES(112,10,1,1.0,'2025-12-07T23:18:24.863Z'); +INSERT INTO cart_items VALUES(114,2,12,2.0,'2025-12-09T06:57:51.258Z'); +INSERT INTO cart_items VALUES(128,11,1,1.0,'2025-12-14T07:52:10.000Z'); +CREATE TABLE IF NOT EXISTS "complaints" ("id" INTEGER NOT NULL, "user_id" INTEGER NOT NULL, "order_id" INTEGER, "complaint_body" TEXT NOT NULL, "is_resolved" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "response" TEXT, "images" TEXT); +INSERT INTO complaints VALUES(1,3,1,'Some eggs are broken',1,'2025-11-19T11:01:59.549Z','We sent you the apples not eggs 😁',NULL); +INSERT INTO complaints VALUES(2,1,54,'This item is not good at all. You guys should stop this immediately',1,'2025-11-29T11:53:25.720Z','Okk',NULL); +INSERT INTO complaints VALUES(3,1,NULL,'Test Complaint',1,'2025-11-29T23:22:44.507Z','Hi','["complaint-images/1764478363144-0"]'); +INSERT INTO complaints VALUES(4,17,NULL,'Hello',1,'2025-12-19T03:04:32.924Z','Hi',NULL); +INSERT INTO complaints VALUES(5,17,NULL,'Hello',1,'2025-12-19T04:02:59.187Z','','["complaint-images/1766136777180-0"]'); +INSERT INTO complaints VALUES(6,15,NULL,'THIS ITEM IS NOT GOOD REMOVE THIS ITEM 🚫',1,'2025-12-19T07:17:34.114Z','Ok',NULL); +INSERT INTO complaints VALUES(7,17,NULL,'Gg',1,'2025-12-20T21:38:30.627Z','Okk',NULL); +INSERT INTO complaints VALUES(8,17,NULL,'Hh',1,'2025-12-23T11:48:56.053Z','Bla',NULL); +INSERT INTO complaints VALUES(9,1,NULL,'Funny comparing',1,'2026-01-15T13:22:10.666Z','Resolving as test ','["complaint-images/1768503130322-0"]'); +INSERT INTO complaints VALUES(10,22,NULL,'Raise a complaint scenario when order is placed and at shipping status',1,'2026-01-18T09:59:59.381Z','Okk',NULL); +INSERT INTO complaints VALUES(11,22,NULL,'Hi product quality is not good can you please do a replacement for this.',1,'2026-01-18T21:59:20.647Z','No',NULL); +INSERT INTO complaints VALUES(12,22,66,'Bad quality nai paki papai aur',1,'2026-01-28T10:42:13.347Z','"From next time, we''ll take care.','["complaint-images/1769616732515-0","complaint-images/1769616732516-1"]'); +INSERT INTO complaints VALUES(13,54,81,'I needed it quickly',1,'2026-01-31T02:03:32.243Z','Not answered call',NULL); +INSERT INTO complaints VALUES(14,46,137,'Yes',1,'2026-02-03T07:34:35.816Z','Resolvedd',NULL); +INSERT INTO complaints VALUES(15,81,143,replace('Is someone looking at complaints :) \n\nTest','\n',char(10)),1,'2026-02-03T10:20:23.832Z','Yeah... Complaints are being actively monitored. We welcome feedback and criticism',NULL); +INSERT INTO complaints VALUES(16,121,NULL,'We by its sorry please cancel it',1,'2026-02-08T00:56:29.295Z','',NULL); +INSERT INTO complaints VALUES(17,121,NULL,'It is only 50 right why RS 60 showing',1,'2026-02-08T04:33:16.782Z','It''s the authentic rate',NULL); +INSERT INTO complaints VALUES(18,119,NULL,'I need the order early',1,'2026-02-18T01:58:37.530Z','',NULL); +INSERT INTO complaints VALUES(19,82,NULL,'Where order',1,'2026-02-19T05:01:41.560Z','',NULL); +INSERT INTO complaints VALUES(20,162,NULL,'Ky time hota oder aana',1,'2026-02-19T05:11:21.737Z','',NULL); +INSERT INTO complaints VALUES(21,82,NULL,'Its late',1,'2026-02-19T05:30:11.017Z','Sorry. Will take care from next time',NULL); +INSERT INTO complaints VALUES(22,160,NULL,'Bohot Acha items good and fresh hai sab chez think u freshyo',1,'2026-02-19T06:42:28.833Z','Thank you...our service will improve further. ',NULL); +INSERT INTO complaints VALUES(23,225,NULL,'Akheel',1,'2026-02-23T06:55:20.175Z','Complaint not clear',NULL); +INSERT INTO complaints VALUES(24,225,NULL,'Cash',1,'2026-02-23T06:56:45.780Z','Complaint not clear',NULL); +INSERT INTO complaints VALUES(25,225,NULL,'Cash',1,'2026-02-23T07:00:17.914Z','Complaint not clear',NULL); +INSERT INTO complaints VALUES(58,1,385,'No order',0,'2026-03-22T04:45:39.793Z',NULL,'["complaint-images/1774174538370.jpg"]'); +INSERT INTO complaints VALUES(59,1,385,'Hii',0,'2026-03-22T04:57:51.234Z',NULL,'["complaint-images/1774175270043.jpg"]'); +INSERT INTO complaints VALUES(60,1,385,'Another fest',0,'2026-03-22T05:06:02.150Z',NULL,'["complaint-images/1774175760765.jpg"]'); +INSERT INTO complaints VALUES(61,1,384,'Testing again',0,'2026-03-22T05:08:55.745Z',NULL,'["complaint-images/1774175933889.jpg"]'); +INSERT INTO complaints VALUES(62,1,383,'Last test',1,'2026-03-22T05:10:05.820Z','Doneee','["complaint-images/1774176003038.jpg","complaint-images/1774176003229.jpg","complaint-images/1774176003414.jpg"]'); +CREATE TABLE IF NOT EXISTS "coupon_applicable_products" ("id" INTEGER NOT NULL, "coupon_id" INTEGER NOT NULL, "product_id" INTEGER NOT NULL); +INSERT INTO coupon_applicable_products VALUES(1,8,25); +CREATE TABLE IF NOT EXISTS "coupon_applicable_users" ("id" INTEGER NOT NULL, "coupon_id" INTEGER NOT NULL, "user_id" INTEGER NOT NULL); +INSERT INTO coupon_applicable_users VALUES(1,11,1); +INSERT INTO coupon_applicable_users VALUES(2,11,4); +INSERT INTO coupon_applicable_users VALUES(3,13,1); +INSERT INTO coupon_applicable_users VALUES(4,14,1); +INSERT INTO coupon_applicable_users VALUES(5,15,1); +INSERT INTO coupon_applicable_users VALUES(6,18,145); +CREATE TABLE IF NOT EXISTS "coupon_usage" ("id" INTEGER NOT NULL, "user_id" INTEGER NOT NULL, "coupon_id" INTEGER NOT NULL, "used_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "order_id" INTEGER, "order_item_id" INTEGER); +INSERT INTO coupon_usage VALUES(1,2,4,'2025-11-25T00:59:10.947Z',NULL,NULL); +INSERT INTO coupon_usage VALUES(2,1,4,'2025-11-25T05:22:34.453Z',NULL,NULL); +INSERT INTO coupon_usage VALUES(3,1,4,'2025-11-27T06:03:27.515Z',NULL,NULL); +INSERT INTO coupon_usage VALUES(4,1,3,'2025-11-28T05:42:31.979Z',27,NULL); +INSERT INTO coupon_usage VALUES(5,1,4,'2025-11-28T05:42:31.979Z',27,NULL); +INSERT INTO coupon_usage VALUES(6,1,5,'2025-11-28T05:42:31.979Z',27,NULL); +INSERT INTO coupon_usage VALUES(7,1,4,'2025-11-28T08:13:29.610Z',28,39); +INSERT INTO coupon_usage VALUES(8,1,4,'2025-11-28T08:13:29.610Z',28,40); +INSERT INTO coupon_usage VALUES(9,1,4,'2025-11-28T22:34:42.745Z',32,48); +INSERT INTO coupon_usage VALUES(10,1,4,'2025-11-28T22:34:42.745Z',32,49); +INSERT INTO coupon_usage VALUES(11,1,4,'2025-11-28T22:34:42.745Z',32,50); +INSERT INTO coupon_usage VALUES(12,1,4,'2025-11-28T22:36:51.615Z',33,51); +INSERT INTO coupon_usage VALUES(13,1,4,'2025-11-28T22:52:17.337Z',34,52); +INSERT INTO coupon_usage VALUES(14,1,4,'2025-11-28T22:52:17.337Z',34,53); +INSERT INTO coupon_usage VALUES(15,1,4,'2025-11-28T22:52:17.337Z',34,54); +INSERT INTO coupon_usage VALUES(16,1,4,'2025-11-28T22:58:19.949Z',35,55); +INSERT INTO coupon_usage VALUES(17,1,4,'2025-11-28T23:17:00.736Z',39,64); +INSERT INTO coupon_usage VALUES(18,1,4,'2025-11-28T23:17:00.736Z',39,65); +INSERT INTO coupon_usage VALUES(19,1,4,'2025-11-28T23:17:56.567Z',40,66); +INSERT INTO coupon_usage VALUES(20,1,4,'2025-11-28T23:17:56.567Z',40,67); +INSERT INTO coupon_usage VALUES(21,1,4,'2025-11-28T23:22:24.357Z',41,68); +INSERT INTO coupon_usage VALUES(22,1,4,'2025-11-28T23:22:24.357Z',41,69); +INSERT INTO coupon_usage VALUES(23,1,4,'2025-11-28T23:23:26.876Z',42,70); +INSERT INTO coupon_usage VALUES(24,1,4,'2025-11-28T23:23:26.876Z',42,71); +INSERT INTO coupon_usage VALUES(25,1,4,'2025-11-28T23:31:56.572Z',43,72); +INSERT INTO coupon_usage VALUES(26,1,4,'2025-11-28T23:31:56.572Z',43,73); +INSERT INTO coupon_usage VALUES(27,1,4,'2025-11-28T23:31:56.572Z',43,74); +INSERT INTO coupon_usage VALUES(28,1,4,'2025-11-28T23:33:28.518Z',44,75); +INSERT INTO coupon_usage VALUES(29,1,4,'2025-11-28T23:33:28.518Z',44,76); +INSERT INTO coupon_usage VALUES(30,1,4,'2025-11-28T23:33:28.518Z',44,77); +INSERT INTO coupon_usage VALUES(31,1,4,'2025-11-28T23:35:19.817Z',45,78); +INSERT INTO coupon_usage VALUES(32,1,4,'2025-11-28T23:35:19.817Z',45,79); +INSERT INTO coupon_usage VALUES(33,1,4,'2025-11-28T23:35:19.817Z',45,80); +INSERT INTO coupon_usage VALUES(34,1,4,'2025-11-28T23:42:35.845Z',46,81); +INSERT INTO coupon_usage VALUES(35,1,4,'2025-11-28T23:42:35.845Z',46,82); +INSERT INTO coupon_usage VALUES(36,1,4,'2025-11-28T23:42:35.845Z',46,83); +INSERT INTO coupon_usage VALUES(37,1,4,'2025-11-29T00:35:34.926Z',47,84); +INSERT INTO coupon_usage VALUES(38,1,4,'2025-11-29T00:35:34.926Z',47,85); +INSERT INTO coupon_usage VALUES(39,1,3,'2025-11-29T00:47:38.510Z',48,86); +INSERT INTO coupon_usage VALUES(40,1,3,'2025-11-29T00:47:38.510Z',48,87); +INSERT INTO coupon_usage VALUES(41,1,3,'2025-11-29T00:47:38.510Z',48,88); +INSERT INTO coupon_usage VALUES(42,1,4,'2025-11-29T00:47:38.510Z',48,86); +INSERT INTO coupon_usage VALUES(43,1,4,'2025-11-29T00:47:38.510Z',48,87); +INSERT INTO coupon_usage VALUES(44,1,4,'2025-11-29T00:47:38.510Z',48,88); +INSERT INTO coupon_usage VALUES(45,1,3,'2025-11-29T00:51:58.214Z',49,89); +INSERT INTO coupon_usage VALUES(46,1,3,'2025-11-29T00:51:58.214Z',49,90); +INSERT INTO coupon_usage VALUES(47,1,3,'2025-11-29T00:51:58.214Z',49,91); +INSERT INTO coupon_usage VALUES(48,1,3,'2025-11-29T00:51:58.214Z',49,92); +INSERT INTO coupon_usage VALUES(49,1,4,'2025-11-29T00:51:58.214Z',49,89); +INSERT INTO coupon_usage VALUES(50,1,4,'2025-11-29T00:51:58.214Z',49,90); +INSERT INTO coupon_usage VALUES(51,1,4,'2025-11-29T00:51:58.214Z',49,91); +INSERT INTO coupon_usage VALUES(52,1,4,'2025-11-29T00:51:58.214Z',49,92); +INSERT INTO coupon_usage VALUES(53,1,3,'2025-11-29T01:06:19.496Z',50,NULL); +INSERT INTO coupon_usage VALUES(54,1,4,'2025-11-29T01:06:19.496Z',50,NULL); +INSERT INTO coupon_usage VALUES(55,1,4,'2025-11-29T01:57:48.593Z',53,NULL); +INSERT INTO coupon_usage VALUES(56,2,5,'2025-12-04T23:32:41.260Z',55,NULL); +INSERT INTO coupon_usage VALUES(57,17,5,'2025-12-19T03:46:32.077Z',74,NULL); +INSERT INTO coupon_usage VALUES(58,17,7,'2025-12-19T11:01:02.235Z',85,NULL); +INSERT INTO coupon_usage VALUES(59,2,8,'2025-12-27T12:09:01.970Z',117,NULL); +INSERT INTO coupon_usage VALUES(60,2,8,'2025-12-28T08:41:24.922Z',121,NULL); +INSERT INTO coupon_usage VALUES(61,2,10,'2026-01-01T03:14:07.880Z',125,NULL); +INSERT INTO coupon_usage VALUES(62,2,12,'2026-01-01T06:40:15.200Z',127,NULL); +INSERT INTO coupon_usage VALUES(63,1,13,'2026-01-06T07:21:22.063Z',132,NULL); +INSERT INTO coupon_usage VALUES(64,21,5,'2026-01-06T11:13:08.886Z',134,NULL); +INSERT INTO coupon_usage VALUES(65,2,16,'2026-01-15T10:38:51.425Z',149,NULL); +INSERT INTO coupon_usage VALUES(66,2,16,'2026-01-16T07:20:20.484Z',151,NULL); +INSERT INTO coupon_usage VALUES(67,2,16,'2026-01-16T07:20:39.331Z',152,NULL); +INSERT INTO coupon_usage VALUES(68,2,16,'2026-01-16T07:21:00.372Z',153,NULL); +INSERT INTO coupon_usage VALUES(69,2,16,'2026-01-16T07:21:27.067Z',154,NULL); +INSERT INTO coupon_usage VALUES(70,2,16,'2026-01-16T07:22:32.774Z',155,NULL); +INSERT INTO coupon_usage VALUES(71,7,17,'2026-02-01T00:28:05.860Z',191,NULL); +INSERT INTO coupon_usage VALUES(72,38,17,'2026-02-01T02:19:04.935Z',194,NULL); +INSERT INTO coupon_usage VALUES(77,7,17,'2026-02-02T08:27:54.169Z',206,NULL); +INSERT INTO coupon_usage VALUES(78,1,17,'2026-02-02T12:53:25.042Z',208,NULL); +INSERT INTO coupon_usage VALUES(79,38,17,'2026-02-02T22:40:01.684Z',209,NULL); +INSERT INTO coupon_usage VALUES(80,38,17,'2026-02-03T08:43:00.805Z',215,NULL); +INSERT INTO coupon_usage VALUES(81,96,17,'2026-02-04T01:36:25.150Z',217,NULL); +INSERT INTO coupon_usage VALUES(82,81,17,'2026-02-04T02:41:07.529Z',218,NULL); +INSERT INTO coupon_usage VALUES(83,24,17,'2026-02-05T04:00:30.760Z',221,NULL); +INSERT INTO coupon_usage VALUES(84,115,17,'2026-02-06T10:26:39.549Z',226,NULL); +INSERT INTO coupon_usage VALUES(85,103,17,'2026-02-06T23:28:37.564Z',230,NULL); +INSERT INTO coupon_usage VALUES(86,103,17,'2026-02-06T23:36:55.440Z',231,NULL); +INSERT INTO coupon_usage VALUES(87,120,17,'2026-02-07T23:11:07.314Z',235,NULL); +INSERT INTO coupon_usage VALUES(88,2,17,'2026-02-10T21:59:33.775Z',250,NULL); +INSERT INTO coupon_usage VALUES(89,2,17,'2026-02-16T01:21:48.065Z',256,NULL); +INSERT INTO coupon_usage VALUES(90,134,17,'2026-02-16T04:14:55.536Z',257,NULL); +INSERT INTO coupon_usage VALUES(91,120,17,'2026-02-17T00:44:27.989Z',259,NULL); +INSERT INTO coupon_usage VALUES(92,145,17,'2026-02-18T03:46:31.310Z',271,NULL); +INSERT INTO coupon_usage VALUES(93,81,17,'2026-02-21T03:19:33.184Z',312,NULL); +INSERT INTO coupon_usage VALUES(94,7,17,'2026-02-21T12:32:34.322Z',318,NULL); +INSERT INTO coupon_usage VALUES(95,141,17,'2026-02-21T19:42:40.636Z',319,NULL); +INSERT INTO coupon_usage VALUES(96,120,17,'2026-02-21T22:34:37.455Z',321,NULL); +INSERT INTO coupon_usage VALUES(97,193,17,'2026-02-21T22:53:17.777Z',322,NULL); +INSERT INTO coupon_usage VALUES(98,130,17,'2026-02-21T23:38:18.551Z',324,NULL); +INSERT INTO coupon_usage VALUES(99,223,17,'2026-02-23T03:47:30.752Z',334,NULL); +CREATE TABLE IF NOT EXISTS "coupons" ("id" INTEGER NOT NULL, "is_user_based" INTEGER NOT NULL DEFAULT false, "discount_percent" REAL, "flat_discount" REAL, "min_order" REAL, "created_by" INTEGER, "max_value" REAL, "is_invalidated" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "is_apply_for_all" INTEGER NOT NULL DEFAULT false, "valid_till" TEXT, "max_limit_for_user" INTEGER, "coupon_code" TEXT NOT NULL, "product_ids" INTEGER, "exclusive_apply" INTEGER NOT NULL DEFAULT false); +INSERT INTO coupons VALUES(1,0,20.0,NULL,500.0,1,NULL,1,'2025-11-21T08:44:20.264Z',1,'2025-11-29T18:30:00.000Z',NULL,'BIG50',NULL,0); +INSERT INTO coupons VALUES(2,0,50.0,NULL,1000.0,1,500.0,1,'2025-11-22T03:29:29.904Z',1,'2026-01-06T18:30:00.000Z',1,'SAVEMORE',NULL,0); +INSERT INTO coupons VALUES(3,0,20.0,NULL,5000.0,1,NULL,0,'2025-11-24T06:11:19.047Z',1,'2025-12-24T18:30:00.000Z',NULL,'BIG100',NULL,0); +INSERT INTO coupons VALUES(4,0,20.0,NULL,500.0,1,NULL,0,'2025-11-24T06:13:06.090Z',1,'2025-11-29T18:30:00.000Z',NULL,'BIG150',NULL,0); +INSERT INTO coupons VALUES(5,0,NULL,150.0,700.0,1,150.0,0,'2025-11-26T14:20:29.369Z',1,'2026-01-29T14:20:00.000Z',1,'FIRST150',NULL,0); +INSERT INTO coupons VALUES(6,1,NULL,4686.0,0.0,1,4686.0,0,'2025-11-29T01:35:51.215Z',0,'2025-12-29T01:35:51.214Z',1,'MOHORD050',NULL,0); +INSERT INTO coupons VALUES(7,1,NULL,22.0,22.0,1,22.0,0,'2025-12-19T10:00:13.297Z',0,'2026-01-18T10:00:13.297Z',1,'BHA82',NULL,0); +INSERT INTO coupons VALUES(8,0,10.0,20.0,200.0,1,20.0,1,'2025-12-22T05:20:27.988Z',1,'2025-12-29T18:30:00.000Z',6,'135',NULL,0); +INSERT INTO coupons VALUES(9,1,NULL,236.0,236.0,1,236.0,0,'2025-12-27T12:04:22.196Z',0,'2026-01-26T12:04:22.195Z',1,'MOH115',NULL,0); +INSERT INTO coupons VALUES(10,1,NULL,128.41999999999997861,128.41999999999997861,1,128.41999999999997861,0,'2025-12-27T19:11:57.259Z',0,'2026-01-26T19:11:57.259Z',1,'868117',NULL,0); +INSERT INTO coupons VALUES(11,1,20.0,NULL,500.0,1,250.0,0,'2026-01-01T04:39:53.608Z',0,'2026-01-30T04:39:00.000Z',3,'SHAFITEST2',NULL,0); +INSERT INTO coupons VALUES(12,0,10.0,NULL,500.0,1,50.0,0,'2026-01-01T06:39:22.230Z',1,'2026-01-07T06:37:00.000Z',1,'SAVEMORE0',NULL,0); +INSERT INTO coupons VALUES(13,1,30.0,NULL,2000.0,1,850.0,0,'2026-01-06T07:19:44.069Z',0,'2026-01-30T07:19:00.000Z',5,'TESTDISCOUNT',NULL,0); +INSERT INTO coupons VALUES(14,1,20.0,NULL,1200.0,1,600.0,0,'2026-01-06T13:10:01.161Z',0,'2026-02-27T13:09:00.000Z',4,'TESTCOUPON3',NULL,0); +INSERT INTO coupons VALUES(15,1,25.0,NULL,1000.0,1,250.0,0,'2026-01-12T03:28:20.356Z',0,'2026-01-30T07:46:00.000Z',2,'RESERVE_TEST34',NULL,0); +INSERT INTO coupons VALUES(16,0,10.0,NULL,500.0,1,50.0,0,'2026-01-15T10:27:07.302Z',1,'2026-01-19T18:30:00.000Z',2,'SAVEOFF10U',NULL,0); +INSERT INTO coupons VALUES(17,0,10.0,NULL,359.0,1,50.0,0,'2026-01-25T13:00:26.545Z',1,'2026-03-30T18:30:00.000Z',3,'START10',NULL,0); +INSERT INTO coupons VALUES(18,1,10.0,NULL,100.0,1,50.0,0,'2026-02-18T03:44:14.005Z',0,'2026-02-28T03:44:00.000Z',2,'NAHEED10',NULL,0); +CREATE TABLE IF NOT EXISTS "delivery_slot_info" ("id" INTEGER NOT NULL, "delivery_time" TEXT NOT NULL, "freeze_time" TEXT NOT NULL, "is_active" INTEGER NOT NULL DEFAULT true, "delivery_sequence" TEXT, "is_flash" INTEGER NOT NULL DEFAULT false, "group_ids" TEXT, "is_capacity_full" INTEGER NOT NULL DEFAULT false); +INSERT INTO delivery_slot_info VALUES(1,'2025-11-25T20:00:00.000Z','2025-11-21T18:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(2,'2025-11-30T01:39:00.000Z','2025-11-29T01:40:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(3,'2025-11-22T19:01:00.000Z','2025-11-23T19:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(4,'2025-11-29T19:30:00.000Z','2025-11-29T17:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(5,'2025-12-10T00:00:00.000Z','2025-12-06T19:50:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(6,'2025-12-10T18:59:00.000Z','2025-12-10T18:59:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(7,'2025-12-15T03:00:00.000Z','2025-12-15T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(8,'2025-12-24T14:00:00.000Z','2025-12-25T00:00:00.000Z',1,'{"1":[72,71,67],"2":[70],"3":[69,73,74,76,75]}',0,NULL,0); +INSERT INTO delivery_slot_info VALUES(9,'2025-12-24T23:00:00.000Z','2025-12-24T21:00:00.000Z',1,'{"1":[62,60]}',0,NULL,0); +INSERT INTO delivery_slot_info VALUES(10,'2025-12-25T05:20:00.000Z','2025-12-24T18:25:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(11,'2025-12-20T16:00:00.000Z','2025-12-19T07:46:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(12,'2025-12-22T16:00:00.000Z','2025-12-23T17:51:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(13,'2025-12-19T09:52:00.000Z','2025-12-19T10:52:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(14,'2025-12-19T10:05:00.000Z','2025-12-19T12:05:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(15,'2025-12-19T10:08:00.000Z','2025-12-18T14:08:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(16,'2025-12-29T21:00:00.000Z','2025-12-29T19:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(17,'2025-12-30T15:10:00.000Z','2025-12-30T19:37:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(18,'2025-12-30T08:00:00.000Z','2025-12-29T18:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(19,'2025-12-28T19:00:00.000Z','2025-12-28T19:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(20,'2026-01-04T21:00:00.000Z','2026-01-04T19:00:00.000Z',1,'{"1":[123,124]}',0,NULL,0); +INSERT INTO delivery_slot_info VALUES(21,'2026-01-05T22:00:00.000Z','2026-01-05T21:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(22,'2026-01-09T22:00:00.000Z','2026-01-09T21:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(23,'2026-01-22T03:00:00.000Z','2026-01-20T03:00:00.000Z',1,'{"1":[149,151,139,142,148]}',0,NULL,0); +INSERT INTO delivery_slot_info VALUES(24,'2026-01-13T04:27:08.055Z','2026-01-13T04:27:08.055Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(25,'2026-01-13T04:46:11.387Z','2026-01-13T04:46:11.387Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(26,'2026-01-14T13:38:58.391Z','2026-01-14T13:38:58.391Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(27,'2026-01-14T13:53:52.798Z','2026-01-14T13:53:52.798Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(28,'2026-01-14T13:54:46.003Z','2026-01-14T13:54:46.003Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(29,'2026-01-14T13:59:46.565Z','2026-01-14T13:59:46.565Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(30,'2026-01-14T14:07:19.783Z','2026-01-14T14:07:19.783Z',1,NULL,1,NULL,0); +INSERT INTO delivery_slot_info VALUES(31,'2026-01-15T20:00:00.000Z','2026-01-15T20:00:00.000Z',1,'{"1":[150]}',0,NULL,0); +INSERT INTO delivery_slot_info VALUES(32,'2026-01-16T21:00:00.000Z','2026-01-16T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(33,'2026-01-17T00:16:00.000Z','2026-01-17T00:16:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(34,'2026-01-21T03:00:00.000Z','2026-01-20T23:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(35,'2026-01-23T20:00:00.000Z','2026-01-23T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(37,'2026-01-24T00:00:00.000Z','2026-01-23T23:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(38,'2026-01-24T01:00:00.000Z','2026-01-24T00:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(39,'2026-01-29T08:00:00.000Z','2026-01-29T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(40,'2026-01-23T08:00:00.000Z','2026-01-23T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(41,'2026-01-25T20:00:00.000Z','2026-01-25T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(43,'2026-01-25T21:00:00.000Z','2026-01-25T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(44,'2026-01-26T00:00:00.000Z','2026-01-26T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(45,'2026-01-26T01:00:00.000Z','2026-01-26T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(46,'2026-01-26T07:00:00.000Z','2026-01-26T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(47,'2026-01-26T20:00:00.000Z','2026-01-26T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(48,'2026-01-26T21:00:00.000Z','2026-01-26T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(49,'2026-01-27T00:00:00.000Z','2026-01-27T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(50,'2026-01-27T20:00:00.000Z','2026-01-27T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(51,'2026-01-27T21:00:00.000Z','2026-01-27T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(52,'2026-01-28T00:00:00.000Z','2026-01-28T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(53,'2026-01-28T01:00:00.000Z','2026-01-28T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(54,'2026-01-28T07:00:00.000Z','2026-01-28T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(55,'2026-01-28T20:00:00.000Z','2026-01-28T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(56,'2026-01-29T20:00:00.000Z','2026-01-29T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(57,'2026-01-29T21:00:00.000Z','2026-01-29T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(58,'2026-01-30T00:00:00.000Z','2026-01-30T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(59,'2026-01-30T01:00:00.000Z','2026-01-30T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(60,'2026-01-30T07:00:00.000Z','2026-01-30T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(61,'2026-01-30T08:00:00.000Z','2026-01-30T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(62,'2026-01-30T20:00:00.000Z','2026-01-30T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(63,'2026-01-30T21:00:00.000Z','2026-01-30T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(64,'2026-01-31T00:00:00.000Z','2026-01-31T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(65,'2026-01-31T01:00:00.000Z','2026-01-31T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(66,'2026-01-31T07:00:00.000Z','2026-01-31T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(67,'2026-01-31T08:00:00.000Z','2026-01-31T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(68,'2026-01-31T20:00:00.000Z','2026-01-31T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(69,'2026-01-31T21:00:00.000Z','2026-01-31T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(70,'2026-02-01T00:00:00.000Z','2026-02-01T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(71,'2026-02-01T04:00:00.000Z','2026-02-01T03:30:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(72,'2026-02-01T07:00:00.000Z','2026-02-01T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(73,'2026-02-01T08:00:00.000Z','2026-02-01T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(74,'2026-02-01T20:00:00.000Z','2026-02-01T20:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(75,'2026-02-01T21:00:00.000Z','2026-02-01T21:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(76,'2026-02-02T00:00:00.000Z','2026-02-02T00:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(77,'2026-02-02T01:00:00.000Z','2026-02-02T01:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(78,'2026-02-02T04:00:00.000Z','2026-02-02T04:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(79,'2026-02-02T07:00:00.000Z','2026-02-02T07:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(80,'2026-02-02T08:00:00.000Z','2026-02-02T08:00:00.000Z',1,NULL,0,NULL,0); +INSERT INTO delivery_slot_info VALUES(81,'2026-02-02T20:00:00.000Z','2026-02-02T20:00:00.000Z',1,NULL,0,'[5,7,8,10]',0); +INSERT INTO delivery_slot_info VALUES(82,'2026-02-02T21:00:00.000Z','2026-02-02T21:00:00.000Z',1,NULL,0,'[5,7,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(83,'2026-02-03T00:00:00.000Z','2026-02-03T00:00:00.000Z',1,NULL,0,'[5,7,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(84,'2026-02-03T01:00:00.000Z','2026-02-03T01:00:00.000Z',1,NULL,0,'[8,7,5,10,9]',0); +INSERT INTO delivery_slot_info VALUES(85,'2026-02-03T07:00:00.000Z','2026-02-03T07:00:00.000Z',1,NULL,0,'[8,5,10]',0); +INSERT INTO delivery_slot_info VALUES(86,'2026-02-03T08:00:00.000Z','2026-02-03T08:00:00.000Z',1,NULL,0,'[8,5,10]',0); +INSERT INTO delivery_slot_info VALUES(87,'2026-02-03T04:00:00.000Z','2026-02-03T04:00:00.000Z',1,NULL,0,'[5,7,8,10]',0); +INSERT INTO delivery_slot_info VALUES(88,'2026-02-03T20:00:00.000Z','2026-02-03T20:00:00.000Z',1,NULL,0,'[10,8,5,7]',0); +INSERT INTO delivery_slot_info VALUES(89,'2026-02-03T21:00:00.000Z','2026-02-03T21:00:00.000Z',1,NULL,0,'[8,5,10]',0); +INSERT INTO delivery_slot_info VALUES(90,'2026-02-04T00:00:00.000Z','2026-02-04T00:00:00.000Z',1,NULL,0,'[8,5,10,7,9]',0); +INSERT INTO delivery_slot_info VALUES(91,'2026-02-04T01:00:00.000Z','2026-02-04T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5]',0); +INSERT INTO delivery_slot_info VALUES(92,'2026-02-04T04:00:00.000Z','2026-02-04T04:00:00.000Z',1,NULL,0,'[5,8,10]',0); +INSERT INTO delivery_slot_info VALUES(93,'2026-02-04T07:00:00.000Z','2026-02-04T07:00:00.000Z',1,NULL,0,'[10,8,5]',0); +INSERT INTO delivery_slot_info VALUES(94,'2026-02-04T08:00:00.000Z','2026-02-04T08:00:00.000Z',1,NULL,0,'[10,8,5]',0); +INSERT INTO delivery_slot_info VALUES(95,'2026-02-04T20:00:00.000Z','2026-02-04T19:45:00.000Z',1,NULL,0,'[10,8,5,7]',0); +INSERT INTO delivery_slot_info VALUES(96,'2026-02-04T21:00:00.000Z','2026-02-04T20:45:00.000Z',1,NULL,0,'[8,5,10]',0); +INSERT INTO delivery_slot_info VALUES(97,'2026-02-05T00:00:00.000Z','2026-02-04T23:45:00.000Z',1,NULL,0,'[8,5,10,7,9]',0); +INSERT INTO delivery_slot_info VALUES(98,'2026-02-05T01:00:00.000Z','2026-02-05T00:45:00.000Z',1,NULL,0,'[10,9,8,7,5]',0); +INSERT INTO delivery_slot_info VALUES(99,'2026-02-05T04:00:00.000Z','2026-02-05T03:45:00.000Z',1,NULL,0,'[5,8,10]',0); +INSERT INTO delivery_slot_info VALUES(100,'2026-02-05T07:00:00.000Z','2026-02-05T06:45:00.000Z',1,NULL,0,'[10,8,5]',0); +INSERT INTO delivery_slot_info VALUES(101,'2026-02-05T20:00:00.000Z','2026-02-05T20:00:00.000Z',1,NULL,0,'[8,7,5]',0); +INSERT INTO delivery_slot_info VALUES(102,'2026-02-05T21:00:00.000Z','2026-02-05T21:00:00.000Z',1,NULL,0,'[8,7,5,9,10,3]',0); +INSERT INTO delivery_slot_info VALUES(103,'2026-02-06T00:00:00.000Z','2026-02-06T00:00:00.000Z',1,NULL,0,'[8,7,5,9,10,3]',0); +INSERT INTO delivery_slot_info VALUES(104,'2026-02-06T01:00:00.000Z','2026-02-06T01:00:00.000Z',1,NULL,0,'[8,7,5,9,10,3]',0); +INSERT INTO delivery_slot_info VALUES(105,'2026-02-06T04:00:00.000Z','2026-02-06T04:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(106,'2026-02-06T07:00:00.000Z','2026-02-06T07:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(107,'2026-02-05T20:00:00.000Z','2026-02-05T20:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(108,'2026-02-06T08:00:00.000Z','2026-02-06T08:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(109,'2026-02-06T20:00:00.000Z','2026-02-06T20:00:00.000Z',1,NULL,0,'[8,5,10,3,7]',0); +INSERT INTO delivery_slot_info VALUES(110,'2026-02-06T21:00:00.000Z','2026-02-06T21:00:00.000Z',1,NULL,0,'[8,5,10,3,7,9]',0); +INSERT INTO delivery_slot_info VALUES(111,'2026-02-07T00:00:00.000Z','2026-02-07T00:00:00.000Z',1,NULL,0,'[8,5,10,3,7,9]',0); +INSERT INTO delivery_slot_info VALUES(112,'2026-02-07T01:00:00.000Z','2026-02-07T01:00:00.000Z',1,NULL,0,'[8,5,10,3,7,9]',0); +INSERT INTO delivery_slot_info VALUES(113,'2026-02-07T04:00:00.000Z','2026-02-07T04:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(114,'2026-02-07T07:00:00.000Z','2026-02-07T07:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(115,'2026-02-07T08:00:00.000Z','2026-02-07T08:00:00.000Z',1,NULL,0,'[8,5,10,3]',0); +INSERT INTO delivery_slot_info VALUES(116,'2026-02-07T20:00:00.000Z','2026-02-07T20:00:00.000Z',1,NULL,0,'[9,8,7,5]',0); +INSERT INTO delivery_slot_info VALUES(117,'2026-02-07T21:00:00.000Z','2026-02-07T21:00:00.000Z',1,NULL,0,'[3,5,7,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(118,'2026-02-08T00:00:00.000Z','2026-02-08T00:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(119,'2026-02-08T01:00:00.000Z','2026-02-08T01:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(120,'2026-02-08T04:00:00.000Z','2026-02-08T04:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(121,'2026-02-08T07:00:00.000Z','2026-02-08T07:00:00.000Z',1,NULL,0,'[10,8,5,3,9]',0); +INSERT INTO delivery_slot_info VALUES(122,'2026-02-08T08:00:00.000Z','2026-02-08T08:00:00.000Z',1,NULL,0,'[10,8,5,3,9]',0); +INSERT INTO delivery_slot_info VALUES(123,'2026-02-08T20:00:00.000Z','2026-02-08T20:00:00.000Z',1,NULL,0,'[9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(124,'2026-02-08T21:00:00.000Z','2026-02-08T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(125,'2026-02-09T00:00:00.000Z','2026-02-09T00:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(126,'2026-02-09T01:00:00.000Z','2026-02-09T01:00:00.000Z',1,NULL,0,'[9,8,7,5,3,10]',0); +INSERT INTO delivery_slot_info VALUES(127,'2026-02-09T04:00:00.000Z','2026-02-09T04:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(128,'2026-02-09T07:00:00.000Z','2026-02-09T07:00:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(129,'2026-02-09T08:00:00.000Z','2026-02-09T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(130,'2026-02-09T20:00:00.000Z','2026-02-09T20:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(131,'2026-02-09T21:00:00.000Z','2026-02-09T21:00:00.000Z',1,NULL,0,'[10,9,8,5,3,7]',0); +INSERT INTO delivery_slot_info VALUES(132,'2026-02-10T00:00:00.000Z','2026-02-10T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(133,'2026-02-10T01:00:00.000Z','2026-02-10T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(134,'2026-02-10T04:00:00.000Z','2026-02-10T04:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(135,'2026-02-10T07:00:00.000Z','2026-02-10T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(136,'2026-02-10T08:00:00.000Z','2026-02-10T08:00:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(137,'2026-02-10T20:00:00.000Z','2026-02-10T20:00:00.000Z',1,NULL,0,'[9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(138,'2026-02-10T21:00:00.000Z','2026-02-10T21:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(139,'2026-02-11T00:00:00.000Z','2026-02-11T00:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(140,'2026-02-11T01:00:00.000Z','2026-02-11T01:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(141,'2026-02-11T04:00:00.000Z','2026-02-11T04:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(142,'2026-02-11T07:00:00.000Z','2026-02-11T07:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(143,'2026-02-11T08:00:00.000Z','2026-02-11T08:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(144,'2026-02-11T20:00:00.000Z','2026-02-11T20:00:00.000Z',1,NULL,0,'[9,8,7,5]',0); +INSERT INTO delivery_slot_info VALUES(145,'2026-02-11T21:00:00.000Z','2026-02-11T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(146,'2026-02-12T00:00:00.000Z','2026-02-12T00:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(147,'2026-02-12T01:00:00.000Z','2026-02-12T00:45:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(148,'2026-02-12T20:00:00.000Z','2026-02-12T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(149,'2026-02-12T21:00:00.000Z','2026-02-12T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(150,'2026-02-13T00:00:00.000Z','2026-02-13T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(151,'2026-02-13T01:00:00.000Z','2026-02-13T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(152,'2026-02-13T04:00:00.000Z','2026-02-13T04:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(153,'2026-02-13T07:00:00.000Z','2026-02-13T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(154,'2026-02-13T08:00:00.000Z','2026-02-13T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(155,'2026-02-13T20:00:00.000Z','2026-02-13T20:00:00.000Z',1,NULL,0,'[10,9,8,5,3,7]',0); +INSERT INTO delivery_slot_info VALUES(156,'2026-02-13T21:00:00.000Z','2026-02-13T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(157,'2026-02-14T00:00:00.000Z','2026-02-14T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(158,'2026-02-14T01:00:00.000Z','2026-02-14T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(159,'2026-02-14T04:00:00.000Z','2026-02-14T04:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(160,'2026-02-14T07:00:00.000Z','2026-02-14T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(161,'2026-02-14T08:00:00.000Z','2026-02-14T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(162,'2026-02-14T20:00:00.000Z','2026-02-14T20:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(163,'2026-02-14T21:00:00.000Z','2026-02-14T21:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(164,'2026-02-15T00:00:00.000Z','2026-02-15T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(165,'2026-02-15T01:00:00.000Z','2026-02-15T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(166,'2026-02-15T04:00:00.000Z','2026-02-15T04:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(167,'2026-02-15T07:00:00.000Z','2026-02-15T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(168,'2026-02-15T08:00:00.000Z','2026-02-15T08:00:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(169,'2026-02-15T20:00:00.000Z','2026-02-15T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(170,'2026-02-15T21:00:00.000Z','2026-02-15T21:00:00.000Z',1,NULL,0,'[10,8,9,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(171,'2026-02-16T00:00:00.000Z','2026-02-16T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(172,'2026-02-16T01:00:00.000Z','2026-02-16T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(173,'2026-02-16T04:30:00.000Z','2026-02-16T04:30:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(174,'2026-02-16T07:00:00.000Z','2026-02-16T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(175,'2026-02-16T08:00:00.000Z','2026-02-16T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(176,'2026-02-16T20:00:00.000Z','2026-02-16T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(177,'2026-02-16T21:00:00.000Z','2026-02-16T20:45:00.000Z',1,NULL,0,'[10,8,9,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(178,'2026-02-17T00:00:00.000Z','2026-02-16T23:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(179,'2026-02-17T01:00:00.000Z','2026-02-17T00:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(180,'2026-02-17T04:30:00.000Z','2026-02-17T04:15:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(181,'2026-02-17T07:00:00.000Z','2026-02-17T07:00:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(182,'2026-02-17T08:00:00.000Z','2026-02-17T08:00:00.000Z',1,NULL,0,'[3,5,9,8,10]',0); +INSERT INTO delivery_slot_info VALUES(183,'2026-02-17T20:00:00.000Z','2026-02-17T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(184,'2026-02-17T21:00:00.000Z','2026-02-17T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(185,'2026-02-18T00:00:00.000Z','2026-02-18T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(186,'2026-02-18T01:00:00.000Z','2026-02-18T01:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(187,'2026-02-18T04:00:00.000Z','2026-02-18T04:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(188,'2026-02-18T07:00:00.000Z','2026-02-18T07:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(189,'2026-02-18T08:00:00.000Z','2026-02-18T08:00:00.000Z',1,NULL,0,'[3,5,9,8,10,7]',0); +INSERT INTO delivery_slot_info VALUES(190,'2026-02-18T20:00:00.000Z','2026-02-18T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(191,'2026-02-18T21:00:00.000Z','2026-02-18T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(192,'2026-02-19T00:00:00.000Z','2026-02-19T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(193,'2026-02-19T21:00:00.000Z','2026-02-19T21:00:00.000Z',1,NULL,0,'[3,5,8,7,9,10]',0); +INSERT INTO delivery_slot_info VALUES(194,'2026-02-19T04:00:00.000Z','2026-02-19T04:00:00.000Z',1,NULL,0,'[3,5,8,7,9,10]',0); +INSERT INTO delivery_slot_info VALUES(195,'2026-02-19T07:00:00.000Z','2026-02-19T07:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(196,'2026-02-19T08:00:00.000Z','2026-02-19T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(197,'2026-02-19T06:00:00.000Z','2026-02-19T06:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(198,'2026-02-18T20:00:00.000Z','2026-02-18T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(199,'2026-02-18T21:00:00.000Z','2026-02-18T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(200,'2026-02-19T20:00:00.000Z','2026-02-19T20:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(201,'2026-02-19T21:00:00.000Z','2026-02-19T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(202,'2026-02-20T00:00:00.000Z','2026-02-20T00:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(203,'2026-02-20T01:00:00.000Z','2026-02-20T01:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(204,'2026-02-20T04:00:00.000Z','2026-02-20T04:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(205,'2026-02-19T20:00:00.000Z','2026-02-19T20:00:00.000Z',1,NULL,0,'[3,5,8,7,9,10]',0); +INSERT INTO delivery_slot_info VALUES(206,'2026-02-20T08:00:00.000Z','2026-02-20T08:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(207,'2026-02-20T05:00:00.000Z','2026-02-20T05:00:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(208,'2026-02-20T20:00:00.000Z','2026-02-20T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(209,'2026-02-20T21:00:00.000Z','2026-02-20T21:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(210,'2026-02-21T00:00:00.000Z','2026-02-21T00:00:00.000Z',1,NULL,0,'[3,5,8,7,9,10]',0); +INSERT INTO delivery_slot_info VALUES(211,'2026-02-21T01:00:00.000Z','2026-02-21T00:45:00.000Z',1,NULL,0,'[3,5,8,7,9,10]',0); +INSERT INTO delivery_slot_info VALUES(212,'2026-02-21T04:00:00.000Z','2026-02-21T03:45:00.000Z',1,NULL,0,'[3,5,8,9,10]',0); +INSERT INTO delivery_slot_info VALUES(213,'2026-02-21T05:00:00.000Z','2026-02-21T04:45:00.000Z',1,NULL,0,'[3,5,8,9,10]',0); +INSERT INTO delivery_slot_info VALUES(214,'2026-02-21T08:00:00.000Z','2026-02-21T07:45:00.000Z',1,NULL,0,'[3,5,8,9,10]',0); +INSERT INTO delivery_slot_info VALUES(215,'2026-02-21T06:30:00.000Z','2026-02-21T06:30:00.000Z',1,NULL,0,'[3,5,8,9,10]',0); +INSERT INTO delivery_slot_info VALUES(216,'2026-02-21T20:00:00.000Z','2026-02-21T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(217,'2026-02-21T21:00:00.000Z','2026-02-21T20:45:00.000Z',1,NULL,0,'[10,9,8,5,7,3]',0); +INSERT INTO delivery_slot_info VALUES(218,'2026-02-22T00:00:00.000Z','2026-02-21T23:44:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(219,'2026-02-22T01:00:00.000Z','2026-02-22T00:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(220,'2026-02-22T04:00:00.000Z','2026-02-22T03:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(221,'2026-02-22T05:00:00.000Z','2026-02-22T04:45:00.000Z',1,NULL,0,'[3,5,8,9,10]',0); +INSERT INTO delivery_slot_info VALUES(222,'2026-02-22T08:00:00.000Z','2026-02-22T07:45:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(223,'2026-02-22T20:00:00.000Z','2026-02-22T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(224,'2026-02-22T21:00:00.000Z','2026-02-22T20:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(225,'2026-02-23T00:00:00.000Z','2026-02-22T23:44:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(226,'2026-02-23T01:00:00.000Z','2026-02-23T00:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(227,'2026-02-23T04:00:00.000Z','2026-02-23T03:45:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(228,'2026-02-23T05:00:00.000Z','2026-02-23T04:45:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(229,'2026-02-23T08:00:00.000Z','2026-02-23T07:45:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(230,'2026-02-23T20:00:00.000Z','2026-02-23T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(231,'2026-02-23T21:00:00.000Z','2026-02-23T20:45:00.000Z',1,NULL,0,'[5,7,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(232,'2026-02-24T00:00:00.000Z','2026-02-23T23:50:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(233,'2026-02-24T05:00:00.000Z','2026-02-24T04:50:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(234,'2026-02-24T01:00:00.000Z','2026-02-24T00:50:00.000Z',1,NULL,0,'[10,8,9,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(235,'2026-02-24T04:00:00.000Z','2026-02-24T03:50:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(236,'2026-02-24T08:00:00.000Z','2026-02-24T07:50:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(237,'2026-02-24T20:00:00.000Z','2026-02-24T19:50:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(238,'2026-02-24T21:00:00.000Z','2026-02-25T08:50:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(239,'2026-02-25T00:00:00.000Z','2026-02-25T00:50:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(240,'2026-02-25T01:00:00.000Z','2026-02-25T00:50:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(241,'2026-02-25T04:00:00.000Z','2026-02-25T03:50:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(242,'2026-02-25T05:00:00.000Z','2026-02-25T04:50:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(243,'2026-02-25T08:00:00.000Z','2026-02-25T07:50:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(244,'2026-02-24T05:00:00.000Z','2026-02-24T04:50:00.000Z',1,NULL,0,'[10,9,8,5,3]',0); +INSERT INTO delivery_slot_info VALUES(274,'2026-03-04T20:00:00.000Z','2026-03-04T19:45:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(275,'2026-03-08T02:04:00.000Z','2026-03-08T02:00:00.000Z',1,NULL,0,'[10,9,8,7,5,3]',0); +INSERT INTO delivery_slot_info VALUES(276,'2026-03-08T04:59:17.000Z','2026-03-08T04:44:17.000Z',1,NULL,0,'[]',0); +INSERT INTO delivery_slot_info VALUES(277,'2026-03-08T05:27:40.000Z','2026-03-08T05:12:40.000Z',1,NULL,0,'[7]',0); +INSERT INTO delivery_slot_info VALUES(278,'2026-03-08T06:38:16.000Z','2026-03-08T06:23:16.000Z',1,NULL,0,'[7]',0); +INSERT INTO delivery_slot_info VALUES(279,'2026-03-10T10:00:00.000Z','2026-03-10T08:00:00.000Z',1,NULL,0,'[7,8,9,10,5,3,2,1]',0); +INSERT INTO delivery_slot_info VALUES(280,'2026-03-13T09:00:00.000Z','2026-03-13T08:30:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(281,'2026-03-15T08:00:00.000Z','2026-03-15T07:30:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(282,'2026-03-15T21:00:00.000Z','2026-03-15T20:50:00.000Z',1,NULL,0,'[5,9,10,8,3]',0); +INSERT INTO delivery_slot_info VALUES(283,'2026-03-20T20:00:00.000Z','2026-03-20T19:50:00.000Z',1,NULL,0,'[9,10,8]',0); +INSERT INTO delivery_slot_info VALUES(284,'2026-03-22T08:00:00.000Z','2026-03-22T07:45:00.000Z',1,NULL,0,'[9,10,8]',0); +INSERT INTO delivery_slot_info VALUES(285,'2026-03-23T07:00:00.000Z','2026-03-23T06:28:00.000Z',1,NULL,0,'[9,10,8]',0); +INSERT INTO delivery_slot_info VALUES(286,'2026-03-27T01:00:00.000Z','2026-03-27T00:04:00.000Z',1,NULL,0,'[9,10,8]',0); +INSERT INTO delivery_slot_info VALUES(287,'2026-03-27T06:02:00.000Z','2026-03-27T05:54:00.000Z',1,NULL,0,'[9,10,8]',0); +CREATE TABLE IF NOT EXISTS "home_banners" ("id" INTEGER NOT NULL, "name" TEXT NOT NULL, "image_url" TEXT NOT NULL, "description" TEXT, "redirect_url" TEXT, "serial_num" INTEGER, "is_active" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "last_updated" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "product_ids" TEXT); +INSERT INTO home_banners VALUES(9,'10%off ','store-images/1770281046297.jpg',NULL,NULL,1,0,'2026-02-05T03:14:06.996Z','2026-02-05T03:14:40.930Z','[]'); +INSERT INTO home_banners VALUES(11,'Daily veggies ','store-images/1770429593455.jpg','Under 19 ',NULL,2,0,'2026-02-06T20:29:57.566Z','2026-02-06T20:30:39.410Z','[45,72,76,97,70,32,74,77,33]'); +INSERT INTO home_banners VALUES(44,'Demo2','store-images/1774018257330.jpg','Demo to test image upload',NULL,999,0,'2026-03-20T09:20:59.008Z','2026-03-20T09:20:59.008Z','[33]'); +INSERT INTO home_banners VALUES(45,'Demo4','store-images/1774104855151.jpg','Ferocious',NULL,999,0,'2026-03-21T09:24:17.745Z','2026-03-21T09:24:17.745Z','[]'); +INSERT INTO home_banners VALUES(46,'Tests banner','store-images/1774365560714.jpg','Testing things again',NULL,999,0,'2026-03-24T09:49:25.241Z','2026-03-24T09:49:25.241Z','[]'); +CREATE TABLE IF NOT EXISTS "key_val_store" ("key" TEXT NOT NULL, "value" TEXT); +INSERT INTO key_val_store VALUES('allItemsOrder','[10,57,99,75,33,90,51,27,6,35,67,97,58,29,65,77,79,5,19,20,14,82,25,56,66,16,83,91,64,36,22,11,1,76,43,94,93,17,47,87,81,50,2,44,59,45,38,85,42,13,55,95,37,34,31,28,18,60,9,84,61,80,7,68,49,69,23,53,4,52,98,63,73,21,78,24,8,74,46,89,40,88,100,72,96,41,86,70,92,26,54,71,48,15,32,62,39,12,3,30]'); +INSERT INTO key_val_store VALUES('androidVersion','1.2.0'); +INSERT INTO key_val_store VALUES('appStoreUrl','https://info.freshyo.in/qr-based-download'); +INSERT INTO key_val_store VALUES('deliveryCharge','12.0'); +INSERT INTO key_val_store VALUES('flashDeliveryCharge','45.0'); +INSERT INTO key_val_store VALUES('flashFreeDeliveryThreshold','500.0'); +INSERT INTO key_val_store VALUES('freeDeliveryThreshold','180.0'); +INSERT INTO key_val_store VALUES('iosVersion','1.2.0'); +INSERT INTO key_val_store VALUES('isFlashDeliveryEnabled','1.0'); +INSERT INTO key_val_store VALUES('minRegularOrderValue','180.0'); +INSERT INTO key_val_store VALUES('playStoreUrl','https://info.freshyo.in/qr-based-download'); +INSERT INTO key_val_store VALUES('popularItems','[23,9,75,98,6,24,59]'); +INSERT INTO key_val_store VALUES('readableOrderId','160.0'); +INSERT INTO key_val_store VALUES('supportEmail','qushammohd@gmail.com'); +INSERT INTO key_val_store VALUES('supportMobile','9000885620.0'); +INSERT INTO key_val_store VALUES('tester','value41'); +INSERT INTO key_val_store VALUES('versionNum','1.2.0'); +CREATE TABLE IF NOT EXISTS "notif_creds" ("id" INTEGER NOT NULL, "token" TEXT NOT NULL, "added_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "user_id" INTEGER NOT NULL, "last_verified" TEXT); +INSERT INTO notif_creds VALUES(3,'ExponentPushToken[iv6POIJTUIiGpkElL84fG7]','2026-02-07T11:16:24.831Z',7,'2026-02-24T00:15:43.239Z'); +INSERT INTO notif_creds VALUES(5,'ExponentPushToken[HnHTZNKG8TO0uuxIEus-PG]','2026-02-07T22:03:08.347Z',91,'2026-02-07T22:03:13.416Z'); +INSERT INTO notif_creds VALUES(6,'ExponentPushToken[UHMotrBnf-vEcprdmbwgIZ]','2026-02-07T23:41:11.318Z',98,'2026-02-08T00:48:44.187Z'); +INSERT INTO notif_creds VALUES(7,'ExponentPushToken[5lelv4B74He5Nhvhsar6bz]','2026-02-08T00:39:52.317Z',121,'2026-02-08T00:42:39.299Z'); +INSERT INTO notif_creds VALUES(8,'ExponentPushToken[v9sccYJj1ubyT6IIQxbvnI]','2026-02-08T01:20:56.512Z',121,'2026-02-08T04:34:48.600Z'); +INSERT INTO notif_creds VALUES(9,'ExponentPushToken[Gzd1aWPU7x-2s4MHC66HgW]','2026-02-08T02:59:16.517Z',21,'2026-02-09T02:55:46.044Z'); +INSERT INTO notif_creds VALUES(10,'ExponentPushToken[qDmbx7D1wEHMyxdeTQj70d]','2026-02-08T04:32:21.955Z',122,'2026-02-08T04:32:21.954Z'); +INSERT INTO notif_creds VALUES(11,'ExponentPushToken[Tsdy4SCnFIXCEU3c2rWW2f]','2026-02-08T04:50:08.729Z',12,'2026-02-14T00:57:01.965Z'); +INSERT INTO notif_creds VALUES(12,'ExponentPushToken[TEbTuZC7F2E9OJTzFHNeoa]','2026-02-08T08:30:08.387Z',2,'2026-02-10T09:45:05.213Z'); +INSERT INTO notif_creds VALUES(14,'ExponentPushToken[RZKHsOC-WpryYm3Q50I86K]','2026-02-08T11:35:05.556Z',39,'2026-02-15T01:04:02.876Z'); +INSERT INTO notif_creds VALUES(15,'ExponentPushToken[VISDPrNjHVUy58fOF4jDWM]','2026-02-08T13:18:22.587Z',1,'2026-02-25T03:03:24.766Z'); +INSERT INTO notif_creds VALUES(16,'ExponentPushToken[w4KTsLKnnp8SbURdl5-Q6x]','2026-02-08T23:42:12.594Z',22,'2026-02-08T23:42:15.073Z'); +INSERT INTO notif_creds VALUES(17,'ExponentPushToken[CvSnNAF6ZN9qCVAsEH21kv]','2026-02-09T03:27:37.036Z',65,'2026-02-16T09:52:41.038Z'); +INSERT INTO notif_creds VALUES(18,'ExponentPushToken[qjCI58EqTOeyVk5yLFHGRq]','2026-02-09T05:48:51.370Z',123,'2026-02-09T05:48:51.369Z'); +INSERT INTO notif_creds VALUES(19,'ExponentPushToken[mZo3TECtB4tDVgxkDOwev6]','2026-02-09T06:32:26.730Z',124,'2026-02-15T05:21:29.871Z'); +INSERT INTO notif_creds VALUES(20,'ExponentPushToken[l527a0C4KT5Ez8aJL7K76l]','2026-02-09T06:40:39.831Z',107,'2026-02-09T06:40:43.875Z'); +INSERT INTO notif_creds VALUES(21,'ExponentPushToken[WxQDABD09Hd7JBURDocB67]','2026-02-09T07:54:12.209Z',125,'2026-02-11T13:07:59.678Z'); +INSERT INTO notif_creds VALUES(22,'ExponentPushToken[81Io9TG3Qg0s3N0V8L86T-]','2026-02-09T08:42:50.649Z',4,'2026-02-23T03:15:48.191Z'); +INSERT INTO notif_creds VALUES(23,'ExponentPushToken[buJyUUCfCpMmsiXqb1--T4]','2026-02-09T10:27:32.198Z',38,'2026-02-25T00:37:28.465Z'); +INSERT INTO notif_creds VALUES(24,'ExponentPushToken[B2zWnHNaumIgbeFFKO-15D]','2026-02-09T14:23:37.594Z',113,'2026-02-10T02:13:48.632Z'); +INSERT INTO notif_creds VALUES(25,'ExponentPushToken[wIhrdlAmwj0Eytvz3W3TTZ]','2026-02-10T05:39:24.848Z',127,'2026-02-11T10:41:39.340Z'); +INSERT INTO notif_creds VALUES(26,'ExponentPushToken[hFUlPFOKMdAUgtDP7EtSzM]','2026-02-10T06:03:43.821Z',3,'2026-02-24T05:46:46.799Z'); +INSERT INTO notif_creds VALUES(27,'ExponentPushToken[NymZTEED3G7YCyDg7ihgBA]','2026-02-10T21:46:04.540Z',2,'2026-02-25T02:12:27.021Z'); +INSERT INTO notif_creds VALUES(28,'ExponentPushToken[ARCT4KD7CJ_pFF_GkywepP]','2026-02-11T06:04:32.238Z',115,'2026-02-22T11:49:39.347Z'); +INSERT INTO notif_creds VALUES(29,'ExponentPushToken[NN4v16BFslBX8ryVXDwQIg]','2026-02-12T03:16:42.421Z',128,'2026-02-17T13:34:12.936Z'); +INSERT INTO notif_creds VALUES(30,'ExponentPushToken[qbteKBC1wbLMCe1ltpul7u]','2026-02-12T07:58:00.376Z',129,'2026-02-12T07:58:00.375Z'); +INSERT INTO notif_creds VALUES(31,'ExponentPushToken[PfjMc_CTRvSvOWtSNmaHhL]','2026-02-14T04:55:41.451Z',131,'2026-02-21T01:58:28.454Z'); +INSERT INTO notif_creds VALUES(32,'ExponentPushToken[dugZtvNyRBevvIcQED783-]','2026-02-14T13:12:44.549Z',120,'2026-02-21T22:33:17.004Z'); +INSERT INTO notif_creds VALUES(33,'ExponentPushToken[5AOIo1AxGkk5zpoVANRRxq]','2026-02-14T23:05:26.237Z',132,'2026-02-25T02:45:27.434Z'); +INSERT INTO notif_creds VALUES(34,'ExponentPushToken[1ZJ_ubPRINgtgfF4JcRz7Q]','2026-02-15T01:15:32.122Z',133,'2026-02-15T01:15:32.121Z'); +INSERT INTO notif_creds VALUES(35,'ExponentPushToken[pIQ2waNDjjSHjQYJbXKD8m]','2026-02-15T01:44:10.912Z',9,'2026-02-15T01:44:10.910Z'); +INSERT INTO notif_creds VALUES(36,'ExponentPushToken[93-_2gEHMwejR3miLX0RGU]','2026-02-15T22:24:33.307Z',1,'2026-03-26T05:56:10.685Z'); +INSERT INTO notif_creds VALUES(37,'ExponentPushToken[kq0I8ADfcQ4VcsZ0yK0Mlc]','2026-02-15T22:31:56.375Z',102,'2026-02-15T22:31:56.374Z'); +INSERT INTO notif_creds VALUES(38,'ExponentPushToken[8wH85rFtQRMk7ciFszmirX]','2026-02-16T04:00:32.930Z',134,'2026-02-22T01:32:06.467Z'); +INSERT INTO notif_creds VALUES(39,'ExponentPushToken[YJRSQmMUEUbaI2VCZLaoN_]','2026-02-16T04:19:56.439Z',6,'2026-02-22T05:05:18.294Z'); +INSERT INTO notif_creds VALUES(40,'ExponentPushToken[QoWbURL2N8-3jRhQwfnRP_]','2026-02-17T03:29:14.561Z',135,'2026-02-17T03:29:14.561Z'); +INSERT INTO notif_creds VALUES(41,'ExponentPushToken[sz_g75Il_CNAG6KpEAxYUH]','2026-02-17T07:26:33.589Z',136,'2026-02-21T03:12:45.220Z'); +INSERT INTO notif_creds VALUES(42,'ExponentPushToken[JMEvkUHKT0n34hcs-MiJAJ]','2026-02-17T08:52:02.805Z',137,'2026-02-17T13:05:14.821Z'); +INSERT INTO notif_creds VALUES(43,'ExponentPushToken[1msqBjJghAi4y8iYwJU-mS]','2026-02-17T09:06:43.131Z',138,'2026-02-23T02:25:49.796Z'); +INSERT INTO notif_creds VALUES(44,'ExponentPushToken[Wvc-xZKA5atNZTuIldtSIw]','2026-02-17T09:22:56.267Z',139,'2026-02-22T03:54:47.956Z'); +INSERT INTO notif_creds VALUES(45,'ExponentPushToken[cZOImkGKtoAxHQZgVtqP2K]','2026-02-17T13:47:10.364Z',140,'2026-02-20T04:17:44.482Z'); +INSERT INTO notif_creds VALUES(46,'ExponentPushToken[Z9RdieHVKXjshIx5Fde2N_]','2026-02-17T19:44:42.642Z',141,'2026-02-23T22:43:32.802Z'); +INSERT INTO notif_creds VALUES(47,'ExponentPushToken[y_gztJB3YIgxaTIe90h081]','2026-02-17T21:39:14.285Z',26,'2026-02-21T01:15:53.015Z'); +INSERT INTO notif_creds VALUES(48,'ExponentPushToken[PwdA7uENlBKK9zfX0IUQHX]','2026-02-17T22:23:25.609Z',142,'2026-02-17T22:28:05.274Z'); +INSERT INTO notif_creds VALUES(49,'ExponentPushToken[I9t84QIYuJ2wkBXTQCrWiO]','2026-02-17T22:54:14.079Z',143,'2026-02-20T01:53:38.305Z'); +INSERT INTO notif_creds VALUES(50,'ExponentPushToken[q6CpdyAjzrLcX5h-XyT2qd]','2026-02-18T00:19:05.701Z',119,'2026-02-18T01:54:00.101Z'); +INSERT INTO notif_creds VALUES(51,'ExponentPushToken[t9-luuLjLIZy__1AFGQne9]','2026-02-18T03:32:56.669Z',144,'2026-02-18T10:07:23.052Z'); +INSERT INTO notif_creds VALUES(52,'ExponentPushToken[LMwZ9hA618rm1SBbnSpLka]','2026-02-18T03:39:58.906Z',145,'2026-02-18T04:47:29.431Z'); +INSERT INTO notif_creds VALUES(53,'ExponentPushToken[Gb4KieGJIaPnwHmzTYtcMv]','2026-02-18T04:29:40.489Z',146,'2026-02-25T01:51:55.372Z'); +INSERT INTO notif_creds VALUES(54,'ExponentPushToken[B74UidJrvnrP8wBb_rHdAC]','2026-02-18T05:14:13.691Z',147,'2026-02-23T03:08:19.771Z'); +INSERT INTO notif_creds VALUES(55,'ExponentPushToken[x2VSb-OGOkn6ivVxpzk6tX]','2026-02-18T06:52:43.429Z',24,'2026-02-23T02:24:07.334Z'); +INSERT INTO notif_creds VALUES(56,'ExponentPushToken[qh6APjAuydb_LnlN4DqYsO]','2026-02-18T07:16:15.407Z',82,'2026-02-22T17:42:52.899Z'); +INSERT INTO notif_creds VALUES(57,'ExponentPushToken[2o572RMsmVSFjUamLuEcoU]','2026-02-18T07:29:53.266Z',148,'2026-02-20T06:08:25.014Z'); +INSERT INTO notif_creds VALUES(58,'ExponentPushToken[3kQdCMDTdTPoDMGP05IITB]','2026-02-18T09:09:16.947Z',149,'2026-02-24T07:04:44.462Z'); +INSERT INTO notif_creds VALUES(59,'ExponentPushToken[oHNDFzFcWPaMrr6UuCUaUd]','2026-02-18T09:11:42.373Z',150,'2026-02-19T04:45:17.727Z'); +INSERT INTO notif_creds VALUES(60,'ExponentPushToken[yjbwNxNUlwI3Gg2xmg_zEL]','2026-02-18T09:21:04.075Z',151,'2026-02-23T03:16:34.760Z'); +INSERT INTO notif_creds VALUES(61,'ExponentPushToken[WoLNBzF_Z7S79-otdUf4hA]','2026-02-18T10:43:23.031Z',152,'2026-02-18T10:47:26.759Z'); +INSERT INTO notif_creds VALUES(62,'ExponentPushToken[VBwbhYESzYkrYBaJNOr_Cd]','2026-02-18T13:29:45.807Z',153,'2026-02-24T13:08:44.803Z'); +INSERT INTO notif_creds VALUES(63,'ExponentPushToken[efBUNsNPuI9UiZMSyisyrS]','2026-02-18T23:28:22.392Z',154,'2026-02-18T23:28:55.761Z'); +INSERT INTO notif_creds VALUES(64,'ExponentPushToken[yoRlFwEZScYynd7F-b0EbZ]','2026-02-18T23:41:30.251Z',155,'2026-02-23T09:36:00.904Z'); +INSERT INTO notif_creds VALUES(65,'ExponentPushToken[QYu6kOP5XdkvJoa8BrF94D]','2026-02-18T23:57:33.153Z',156,'2026-02-23T06:19:11.964Z'); +INSERT INTO notif_creds VALUES(66,'ExponentPushToken[XB2QNBIw79ZsuLKMvoC75T]','2026-02-19T01:01:38.648Z',99,'2026-02-24T08:37:14.569Z'); +INSERT INTO notif_creds VALUES(67,'ExponentPushToken[JR8jlxCcjA6zSt1sIsEaFs]','2026-02-19T01:25:18.880Z',157,'2026-02-19T01:28:03.367Z'); +INSERT INTO notif_creds VALUES(68,'ExponentPushToken[yF2OgLNRsS-YpjLTkltwb7]','2026-02-19T01:44:36.670Z',158,'2026-02-24T05:24:44.962Z'); +INSERT INTO notif_creds VALUES(69,'ExponentPushToken[x4igFdIV9grI1HW3WI-4pI]','2026-02-19T02:15:42.349Z',66,'2026-02-25T02:57:31.607Z'); +INSERT INTO notif_creds VALUES(70,'ExponentPushToken[UrQXC8Eln55JuaZPjM9Ui-]','2026-02-19T02:26:27.728Z',118,'2026-02-19T02:26:27.727Z'); +INSERT INTO notif_creds VALUES(71,'ExponentPushToken[V3hUgLCihO9nsDNBx0uPA6]','2026-02-19T03:38:53.530Z',159,'2026-02-19T05:45:13.240Z'); +INSERT INTO notif_creds VALUES(72,'ExponentPushToken[ivyzcdINsQ3zwCkjlvbAv6]','2026-02-19T03:46:26.528Z',160,'2026-02-23T00:16:28.336Z'); +INSERT INTO notif_creds VALUES(73,'ExponentPushToken[UBKsoGEwMZLkm4B3wUtx5S]','2026-02-19T03:53:26.723Z',64,'2026-02-21T02:22:49.103Z'); +INSERT INTO notif_creds VALUES(74,'ExponentPushToken[8DeRubBDyrcnTSLEd0eYje]','2026-02-19T04:25:24.491Z',161,'2026-02-22T04:34:09.916Z'); +INSERT INTO notif_creds VALUES(76,'ExponentPushToken[AYJ8CwAMYzVS9VIFLdgWZw]','2026-02-19T05:06:22.547Z',162,'2026-02-19T05:09:49.327Z'); +INSERT INTO notif_creds VALUES(77,'ExponentPushToken[tgDCJ1Ht7X4xhJgvosny0I]','2026-02-19T06:46:50.611Z',163,'2026-02-23T01:08:20.953Z'); +INSERT INTO notif_creds VALUES(78,'ExponentPushToken[3ytgOdB6DwYeWZEbsYrcPT]','2026-02-19T07:01:01.329Z',164,'2026-02-19T07:01:01.328Z'); +INSERT INTO notif_creds VALUES(79,'ExponentPushToken[jYpwSQIh9pvCLtSH0WYq5F]','2026-02-19T10:26:49.976Z',165,'2026-02-22T04:41:48.209Z'); +INSERT INTO notif_creds VALUES(80,'ExponentPushToken[dcm7FmItp3TsKicDlHnkc2]','2026-02-19T12:05:06.988Z',166,'2026-02-19T12:05:06.987Z'); +INSERT INTO notif_creds VALUES(83,'ExponentPushToken[4AaCLjFOFe00dA_VppqThU]','2026-02-20T03:19:35.125Z',167,'2026-02-23T07:58:42.730Z'); +INSERT INTO notif_creds VALUES(84,'ExponentPushToken[58ID1kBjfcym3CJINcQD1b]','2026-02-20T03:35:57.056Z',169,'2026-02-20T11:05:08.705Z'); +INSERT INTO notif_creds VALUES(85,'ExponentPushToken[1BrdooOKzJj_P5fDkR3VWJ]','2026-02-20T03:53:54.652Z',170,'2026-02-24T04:56:33.324Z'); +INSERT INTO notif_creds VALUES(86,'ExponentPushToken[j1wJcqI6zGjw3c5oI-Dx9x]','2026-02-20T04:00:53.707Z',172,'2026-02-20T05:14:51.085Z'); +INSERT INTO notif_creds VALUES(89,'ExponentPushToken[6y3qNeJGgyakoSunKhEJT-]','2026-02-20T04:08:13.997Z',173,'2026-02-21T02:20:17.087Z'); +INSERT INTO notif_creds VALUES(93,'ExponentPushToken[T7gjPaDVOJQtJ5anemtNYZ]','2026-02-20T05:29:10.123Z',174,'2026-02-21T11:21:22.446Z'); +INSERT INTO notif_creds VALUES(94,'ExponentPushToken[bSn2s-AWE2bPZFmNbR3wBr]','2026-02-20T05:49:58.947Z',175,'2026-02-23T11:23:09.680Z'); +INSERT INTO notif_creds VALUES(95,'ExponentPushToken[nP7cTjChjAdo68V5rXbjX2]','2026-02-20T05:59:42.482Z',176,'2026-02-20T08:05:40.295Z'); +INSERT INTO notif_creds VALUES(96,'ExponentPushToken[7mwTBgFGWCsZ5bQW2Xn-8j]','2026-02-20T06:50:35.197Z',177,'2026-02-20T09:32:51.775Z'); +INSERT INTO notif_creds VALUES(97,'ExponentPushToken[Y1nFTyC4zbqVCw38UPwEh1]','2026-02-20T07:20:34.337Z',74,'2026-02-21T08:16:21.124Z'); +INSERT INTO notif_creds VALUES(98,'ExponentPushToken[SiFDTqAbkzt6Gqhy7CDvup]','2026-02-20T08:36:23.058Z',178,'2026-02-21T20:53:16.045Z'); +INSERT INTO notif_creds VALUES(99,'ExponentPushToken[a140_7HNF0K2YvX7h4ARWx]','2026-02-20T10:08:25.067Z',179,'2026-02-20T10:08:25.066Z'); +INSERT INTO notif_creds VALUES(100,'ExponentPushToken[2ZZr7mF_h2lch2VVqcFCLs]','2026-02-20T10:57:04.669Z',180,'2026-02-20T10:57:18.409Z'); +INSERT INTO notif_creds VALUES(101,'ExponentPushToken[6l-WlJL-dUG2BixclCkzSa]','2026-02-20T13:32:52.357Z',181,'2026-02-21T10:23:21.219Z'); +INSERT INTO notif_creds VALUES(102,'ExponentPushToken[GWm8_aOevnr5ec38AN858s]','2026-02-20T17:13:24.944Z',182,'2026-02-20T17:13:24.942Z'); +INSERT INTO notif_creds VALUES(103,'ExponentPushToken[IfWmkbPqhvki2Ddpx20WN5]','2026-02-20T18:20:19.602Z',183,'2026-02-20T18:20:19.601Z'); +INSERT INTO notif_creds VALUES(106,'ExponentPushToken[DPeHKsBNbTJ74b4C69d_1e]','2026-02-20T22:45:31.155Z',184,'2026-02-24T05:12:12.438Z'); +INSERT INTO notif_creds VALUES(107,'ExponentPushToken[4mdT-7ILy1RkxkKGHVeFih]','2026-02-21T02:47:55.879Z',185,'2026-02-21T02:48:55.139Z'); +INSERT INTO notif_creds VALUES(108,'ExponentPushToken[OYJNU2Hl_BHC8vNmnh5nIa]','2026-02-21T03:35:03.666Z',186,'2026-02-21T18:26:53.165Z'); +INSERT INTO notif_creds VALUES(110,'ExponentPushToken[2KeIQoIW7_xfYnmYKLjIxX]','2026-02-21T07:16:33.392Z',188,'2026-02-21T07:16:33.391Z'); +INSERT INTO notif_creds VALUES(112,'ExponentPushToken[-o5CHgOgd7yq4gBoUKQdhA]','2026-02-21T13:01:23.842Z',189,'2026-02-21T13:04:47.429Z'); +INSERT INTO notif_creds VALUES(113,'ExponentPushToken[QC4khLHZvU0B2xDfMuLxrr]','2026-02-21T13:29:03.311Z',190,'2026-02-24T07:23:45.452Z'); +INSERT INTO notif_creds VALUES(115,'ExponentPushToken[7xOFPzKtSr9Q3QjuGP_1RY]','2026-02-21T17:55:28.063Z',191,'2026-02-23T05:05:54.186Z'); +INSERT INTO notif_creds VALUES(117,'ExponentPushToken[FQkh_ZP1lkQyiNnxXEqr4E]','2026-02-22T00:12:36.263Z',194,'2026-02-25T02:28:06.068Z'); +INSERT INTO notif_creds VALUES(118,'ExponentPushToken[FCF4nPGQZlVobJpYtPMA1V]','2026-02-22T00:57:19.376Z',195,'2026-02-22T00:57:19.375Z'); +INSERT INTO notif_creds VALUES(119,'ExponentPushToken[IwM94nPyLTuoLgc-dgwPTq]','2026-02-22T00:58:28.876Z',196,'2026-02-22T01:49:01.069Z'); +INSERT INTO notif_creds VALUES(120,'ExponentPushToken[jIY_4pLTlau3wASP_0TYDq]','2026-02-22T01:05:29.613Z',197,'2026-02-22T02:22:29.991Z'); +INSERT INTO notif_creds VALUES(121,'ExponentPushToken[HaF3clPj70n8AdWkidFnJY]','2026-02-22T01:07:17.891Z',198,'2026-02-22T04:30:02.306Z'); +INSERT INTO notif_creds VALUES(122,'ExponentPushToken[dqK4JpEi2SUuPBPRqDHGTE]','2026-02-22T01:14:27.496Z',199,'2026-02-24T23:33:42.767Z'); +INSERT INTO notif_creds VALUES(123,'ExponentPushToken[gJFheJE7Ie9y42gYqTz0cv]','2026-02-22T02:01:38.770Z',200,'2026-02-22T02:01:38.769Z'); +INSERT INTO notif_creds VALUES(124,'ExponentPushToken[Z07jHhEkYiW820OA8-mYma]','2026-02-22T02:01:45.615Z',201,'2026-02-22T02:01:45.614Z'); +INSERT INTO notif_creds VALUES(125,'ExponentPushToken[I4TLMrA8fhjU4YDnC9ssrj]','2026-02-22T02:17:38.253Z',202,'2026-02-22T02:17:38.252Z'); +INSERT INTO notif_creds VALUES(126,'ExponentPushToken[zOk8M4FBYHztnQIxr7ZhzY]','2026-02-22T03:02:38.558Z',203,'2026-02-22T03:02:38.558Z'); +INSERT INTO notif_creds VALUES(127,'ExponentPushToken[H94IyWDEhTwZiV_PsomZ86]','2026-02-22T03:19:56.829Z',204,'2026-02-22T07:59:51.430Z'); +INSERT INTO notif_creds VALUES(128,'ExponentPushToken[700fYUMqIA-ft5HcmU1tmR]','2026-02-22T03:22:47.498Z',205,'2026-02-22T03:53:07.395Z'); +INSERT INTO notif_creds VALUES(129,'ExponentPushToken[1Mq1TLEfmyCHBvCoTdYzlA]','2026-02-22T04:20:20.012Z',206,'2026-02-22T05:05:52.419Z'); +INSERT INTO notif_creds VALUES(130,'ExponentPushToken[_4SQFkNreSaKN8HJCwkO0d]','2026-02-22T04:24:10.912Z',207,'2026-02-22T04:24:10.911Z'); +INSERT INTO notif_creds VALUES(131,'ExponentPushToken[nMmoPDNa2B-FzS0tTKUVJq]','2026-02-22T04:37:00.262Z',208,'2026-02-25T03:26:36.919Z'); +INSERT INTO notif_creds VALUES(132,'ExponentPushToken[_KlKvdPBjid4uWtGl9oj1w]','2026-02-22T04:43:50.020Z',209,'2026-02-22T04:43:50.019Z'); +INSERT INTO notif_creds VALUES(133,'ExponentPushToken[lUQnqhGJAN_4YY4wQ9AsxU]','2026-02-22T05:14:35.973Z',210,'2026-02-22T05:14:35.972Z'); +INSERT INTO notif_creds VALUES(134,'ExponentPushToken[9MdSNKGJEuTvO7e_pUGutQ]','2026-02-22T06:00:13.290Z',212,'2026-02-23T00:39:33.185Z'); +INSERT INTO notif_creds VALUES(135,'ExponentPushToken[O8hwqtKbEc8aWG_xDyiTng]','2026-02-22T06:29:49.199Z',213,'2026-02-25T01:01:33.072Z'); +INSERT INTO notif_creds VALUES(136,'ExponentPushToken[8C19GxE0u9UAVhJurTSUCD]','2026-02-22T06:33:55.924Z',214,'2026-02-22T06:33:55.924Z'); +INSERT INTO notif_creds VALUES(137,'ExponentPushToken[O-HudjMpRjEPPtOY7P8xNf]','2026-02-22T06:59:10.922Z',215,'2026-02-22T06:59:10.921Z'); +INSERT INTO notif_creds VALUES(138,'ExponentPushToken[3vLy4aIVVz6JhDs28edZ7A]','2026-02-22T07:13:12.618Z',216,'2026-02-22T07:13:12.618Z'); +INSERT INTO notif_creds VALUES(139,'ExponentPushToken[gd9P-IJzX8mPS8WIQ4L_aO]','2026-02-22T07:30:21.756Z',217,'2026-02-24T03:15:03.767Z'); +INSERT INTO notif_creds VALUES(140,'ExponentPushToken[Lyp_JhEp-mzptQkxT2gV5j]','2026-02-22T14:03:46.271Z',50,'2026-02-24T23:40:50.787Z'); +INSERT INTO notif_creds VALUES(141,'ExponentPushToken[bKljnNAKOQhNtEuFH61wdv]','2026-02-23T00:50:17.502Z',219,'2026-02-24T02:54:24.861Z'); +INSERT INTO notif_creds VALUES(143,'ExponentPushToken[4MaEIUHLXJTeIUk5Tw2Bre]','2026-02-23T01:39:34.734Z',220,'2026-02-23T01:39:34.734Z'); +INSERT INTO notif_creds VALUES(144,'ExponentPushToken[WFqHJnGXt5zJQgezyZMT-F]','2026-02-23T02:13:14.745Z',221,'2026-02-23T02:13:14.744Z'); +INSERT INTO notif_creds VALUES(146,'ExponentPushToken[_w34c8IpadSoTyzQIgfiRf]','2026-02-23T03:24:04.981Z',222,'2026-02-23T07:32:10.879Z'); +INSERT INTO notif_creds VALUES(147,'ExponentPushToken[BAMOz8A3uZ98l8lIIF5cvC]','2026-02-23T03:32:38.907Z',218,'2026-02-24T23:29:49.706Z'); +INSERT INTO notif_creds VALUES(148,'ExponentPushToken[PnJS6KN--CeuepgdgEOUKz]','2026-02-23T03:46:06.431Z',223,'2026-02-23T06:35:54.102Z'); +INSERT INTO notif_creds VALUES(149,'ExponentPushToken[q6LVtfMMHCmI-CVuzkjete]','2026-02-23T04:36:52.684Z',224,'2026-02-24T03:00:47.885Z'); +INSERT INTO notif_creds VALUES(151,'ExponentPushToken[qFtLZVFHGA-08finEVoLvk]','2026-02-23T06:41:17.865Z',225,'2026-02-23T11:53:56.553Z'); +INSERT INTO notif_creds VALUES(152,'ExponentPushToken[f8BfgiIMzCgsrT8D0GrcbC]','2026-02-23T08:30:40.686Z',226,'2026-02-24T01:31:30.979Z'); +INSERT INTO notif_creds VALUES(153,'ExponentPushToken[Tlj0Y5ENGMH1gqQMOE4Vet]','2026-02-23T22:38:49.132Z',228,'2026-02-23T22:38:49.131Z'); +INSERT INTO notif_creds VALUES(154,'ExponentPushToken[xpA3OSLWnk2-oUz2J_jq9V]','2026-02-24T07:52:52.533Z',15,'2026-02-24T07:52:52.532Z'); +INSERT INTO notif_creds VALUES(155,'ExponentPushToken[LkHZ5lKBW9CMi6UWZ1jZvJ]','2026-02-24T12:27:39.430Z',231,'2026-02-24T12:27:39.429Z'); +INSERT INTO notif_creds VALUES(156,'ExponentPushToken[HpS7v_O9a0YX-ctUWczWc9]','2026-02-24T14:49:55.883Z',232,'2026-02-24T14:49:55.882Z'); +CREATE TABLE IF NOT EXISTS "notifications" ("id" INTEGER NOT NULL, "user_id" INTEGER NOT NULL, "title" TEXT NOT NULL, "body" TEXT NOT NULL, "type" TEXT, "is_read" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +CREATE TABLE IF NOT EXISTS "order_items" ("id" INTEGER NOT NULL, "order_id" INTEGER NOT NULL, "product_id" INTEGER NOT NULL, "quantity" TEXT NOT NULL, "price" REAL NOT NULL, "discounted_price" REAL, "is_packaged" INTEGER NOT NULL DEFAULT false, "is_package_verified" INTEGER NOT NULL DEFAULT false); +INSERT INTO order_items VALUES(1,1,6,'2',22.0,NULL,0,0); +INSERT INTO order_items VALUES(2,2,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(3,3,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(4,4,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(5,4,1,'1',210.0,NULL,0,0); +INSERT INTO order_items VALUES(6,5,4,'1',700.0,NULL,0,0); +INSERT INTO order_items VALUES(7,6,6,'1',22.0,NULL,0,0); +INSERT INTO order_items VALUES(8,7,6,'1',22.0,NULL,0,0); +INSERT INTO order_items VALUES(9,8,6,'1',22.0,NULL,0,0); +INSERT INTO order_items VALUES(10,9,3,'2',250.0,NULL,0,0); +INSERT INTO order_items VALUES(11,10,3,'2',250.0,NULL,0,0); +INSERT INTO order_items VALUES(12,11,6,'2',22.0,NULL,0,0); +INSERT INTO order_items VALUES(13,12,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(14,13,6,'1',22.0,NULL,0,0); +INSERT INTO order_items VALUES(15,14,1,'1',210.0,NULL,0,0); +INSERT INTO order_items VALUES(16,15,4,'1',700.0,NULL,0,0); +INSERT INTO order_items VALUES(17,16,4,'1',700.0,NULL,0,0); +INSERT INTO order_items VALUES(18,17,1,'1',210.0,NULL,0,0); +INSERT INTO order_items VALUES(19,18,1,'4',210.0,NULL,0,0); +INSERT INTO order_items VALUES(20,19,3,'1',250.0,NULL,0,0); +INSERT INTO order_items VALUES(21,19,9,'1',280.0,NULL,0,0); +INSERT INTO order_items VALUES(22,20,3,'1',250.0,NULL,0,0); +INSERT INTO order_items VALUES(23,20,9,'1',280.0,NULL,0,0); +INSERT INTO order_items VALUES(24,21,4,'1',700.0,NULL,0,0); +INSERT INTO order_items VALUES(25,21,6,'1',22.0,NULL,0,0); +INSERT INTO order_items VALUES(26,22,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(27,23,2,'1',220.0,NULL,0,0); +INSERT INTO order_items VALUES(28,24,3,'3',250.0,NULL,0,0); +INSERT INTO order_items VALUES(29,25,2,'25',220.0,NULL,0,0); +INSERT INTO order_items VALUES(30,25,7,'4',50.0,NULL,0,0); +INSERT INTO order_items VALUES(31,26,5,'4',72.0,NULL,0,0); +INSERT INTO order_items VALUES(32,26,1,'3',210.0,NULL,0,0); +INSERT INTO order_items VALUES(33,26,4,'3',700.0,NULL,0,0); +INSERT INTO order_items VALUES(34,26,10,'3',210.0,NULL,0,0); +INSERT INTO order_items VALUES(35,26,8,'4',20.0,NULL,0,0); +INSERT INTO order_items VALUES(36,26,11,'6',1400.0,NULL,0,0); +INSERT INTO order_items VALUES(37,27,11,'9',1400.0,NULL,0,0); +INSERT INTO order_items VALUES(38,27,3,'13',250.0,NULL,0,0); +INSERT INTO order_items VALUES(39,28,10,'5',210.0,168.0,0,0); +INSERT INTO order_items VALUES(40,28,6,'6',22.0,17.600000000000002309,0,0); +INSERT INTO order_items VALUES(41,29,4,'2',700.0,700.0,0,0); +INSERT INTO order_items VALUES(42,30,2,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(43,30,11,'5',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(44,30,3,'2',250.0,250.0,0,0); +INSERT INTO order_items VALUES(45,31,2,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(46,31,11,'5',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(47,31,3,'2',250.0,250.0,0,0); +INSERT INTO order_items VALUES(48,32,2,'1',220.0,176.0,0,0); +INSERT INTO order_items VALUES(49,32,11,'5',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(50,32,3,'1',250.0,200.0,0,0); +INSERT INTO order_items VALUES(51,33,4,'3',700.0,560.0,0,0); +INSERT INTO order_items VALUES(52,34,2,'1',220.0,176.0,0,0); +INSERT INTO order_items VALUES(53,34,11,'1',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(54,34,3,'1',250.0,200.0,0,0); +INSERT INTO order_items VALUES(55,35,11,'2',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(56,36,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(57,36,4,'1',700.0,700.0,0,0); +INSERT INTO order_items VALUES(58,36,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(59,37,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(60,37,4,'1',700.0,700.0,0,0); +INSERT INTO order_items VALUES(61,37,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(62,38,2,'1',220.0,220.0,0,0); +INSERT INTO order_items VALUES(63,38,11,'2',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(64,39,3,'1',250.0,200.0,0,0); +INSERT INTO order_items VALUES(65,39,11,'2',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(66,40,11,'3',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(67,40,3,'4',250.0,200.0,0,0); +INSERT INTO order_items VALUES(68,41,11,'2',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(69,41,3,'2',250.0,200.0,0,0); +INSERT INTO order_items VALUES(70,42,2,'4',220.0,176.0,0,0); +INSERT INTO order_items VALUES(71,42,3,'4',250.0,200.0,0,0); +INSERT INTO order_items VALUES(72,43,11,'1',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(73,43,2,'5',220.0,176.0,0,0); +INSERT INTO order_items VALUES(74,43,10,'3',210.0,168.0,0,0); +INSERT INTO order_items VALUES(75,44,11,'1',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(76,44,2,'5',220.0,176.0,0,0); +INSERT INTO order_items VALUES(77,44,10,'3',210.0,168.0,0,0); +INSERT INTO order_items VALUES(78,45,11,'3',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(79,45,2,'5',220.0,176.0,0,0); +INSERT INTO order_items VALUES(80,45,3,'3',250.0,200.0,0,0); +INSERT INTO order_items VALUES(81,46,11,'5',1400.0,1120.0,0,0); +INSERT INTO order_items VALUES(82,46,3,'4',250.0,200.0,0,0); +INSERT INTO order_items VALUES(83,46,10,'3',210.0,168.0,0,0); +INSERT INTO order_items VALUES(84,47,3,'2',250.0,250.0,0,0); +INSERT INTO order_items VALUES(85,47,2,'2',220.0,220.0,0,0); +INSERT INTO order_items VALUES(86,48,3,'5',250.0,150.0,0,0); +INSERT INTO order_items VALUES(87,48,11,'3',1400.0,840.0,0,0); +INSERT INTO order_items VALUES(88,48,2,'3',220.0,132.0,0,0); +INSERT INTO order_items VALUES(89,49,10,'5',210.0,210.0,0,0); +INSERT INTO order_items VALUES(90,49,2,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(91,49,11,'2',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(92,49,3,'3',250.0,250.0,0,0); +INSERT INTO order_items VALUES(93,50,4,'3',700.0,700.0,0,0); +INSERT INTO order_items VALUES(94,50,10,'3',210.0,210.0,0,0); +INSERT INTO order_items VALUES(95,50,2,'4',220.0,220.0,0,0); +INSERT INTO order_items VALUES(96,50,11,'3',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(97,51,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(98,52,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(99,53,3,'2',250.0,250.0,0,0); +INSERT INTO order_items VALUES(100,54,4,'3',700.0,700.0,0,0); +INSERT INTO order_items VALUES(101,54,3,'3',250.0,250.0,0,0); +INSERT INTO order_items VALUES(102,55,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(103,55,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(104,55,1,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(105,56,8,'1',20.0,20.0,0,0); +INSERT INTO order_items VALUES(106,56,6,'2',22.0,22.0,0,0); +INSERT INTO order_items VALUES(107,57,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(108,58,1,'28',210.0,210.0,0,0); +INSERT INTO order_items VALUES(109,58,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(110,58,3,'3',250.0,250.0,0,0); +INSERT INTO order_items VALUES(111,58,2,'1',220.0,220.0,0,0); +INSERT INTO order_items VALUES(112,59,1,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(113,60,12,'1',350.0,350.0,0,0); +INSERT INTO order_items VALUES(114,61,1,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(115,62,12,'2',350.0,350.0,0,0); +INSERT INTO order_items VALUES(116,63,1,'2',210.0,210.0,0,0); +INSERT INTO order_items VALUES(117,63,12,'2',350.0,350.0,0,0); +INSERT INTO order_items VALUES(118,64,1,'2',210.0,210.0,0,0); +INSERT INTO order_items VALUES(119,65,12,'2',350.0,350.0,0,0); +INSERT INTO order_items VALUES(120,66,12,'1',350.0,350.0,0,0); +INSERT INTO order_items VALUES(121,66,1,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(122,67,15,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(123,68,15,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(124,69,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(125,70,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(126,71,11,'1',1400.0,1400.0,1,0); +INSERT INTO order_items VALUES(127,71,15,'1',220.0,220.0,1,0); +INSERT INTO order_items VALUES(128,71,6,'1',22.0,22.0,1,0); +INSERT INTO order_items VALUES(129,72,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(130,73,5,'3',72.0,72.0,0,0); +INSERT INTO order_items VALUES(131,74,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(132,74,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(133,75,11,'15',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(134,76,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(135,77,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(136,78,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(137,79,25,'3',100.0,100.0,0,0); +INSERT INTO order_items VALUES(138,80,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(139,81,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(140,82,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(141,83,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(142,84,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(143,85,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(144,86,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(145,87,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(146,88,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(147,89,15,'1',140.0,140.0,0,0); +INSERT INTO order_items VALUES(148,89,11,'2',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(149,90,6,'2',22.0,22.0,0,0); +INSERT INTO order_items VALUES(150,91,19,'1',40.0,40.0,0,0); +INSERT INTO order_items VALUES(151,92,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(152,93,25,'2',100.0,100.0,0,0); +INSERT INTO order_items VALUES(153,94,26,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(154,95,6,'6',22.0,22.0,0,0); +INSERT INTO order_items VALUES(155,96,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(156,97,25,'2',100.0,100.0,0,0); +INSERT INTO order_items VALUES(157,98,6,'2',22.0,22.0,0,0); +INSERT INTO order_items VALUES(158,99,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(159,100,16,'10',100.0,100.0,0,0); +INSERT INTO order_items VALUES(160,101,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(161,102,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(162,103,16,'1',100.0,100.0,0,0); +INSERT INTO order_items VALUES(163,104,5,'5',72.0,72.0,0,0); +INSERT INTO order_items VALUES(164,104,6,'108',22.0,22.0,0,0); +INSERT INTO order_items VALUES(165,105,12,'22',350.0,350.0,0,0); +INSERT INTO order_items VALUES(166,106,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(167,106,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(168,107,8,'1',20.0,20.0,1,0); +INSERT INTO order_items VALUES(169,107,26,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(170,108,25,'1',100.0,100.0,0,0); +INSERT INTO order_items VALUES(171,109,13,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(172,110,6,'2',22.0,22.0,0,0); +INSERT INTO order_items VALUES(173,111,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(174,111,6,'1',22.0,22.0,0,0); +INSERT INTO order_items VALUES(175,111,12,'1',350.0,350.0,0,0); +INSERT INTO order_items VALUES(176,112,8,'1',20.0,20.0,0,0); +INSERT INTO order_items VALUES(177,113,12,'1',350.0,350.0,0,0); +INSERT INTO order_items VALUES(178,114,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(179,115,5,'1',72.0,72.0,0,0); +INSERT INTO order_items VALUES(180,115,6,'2',22.0,22.0,0,0); +INSERT INTO order_items VALUES(181,115,16,'1',100.0,100.0,0,0); +INSERT INTO order_items VALUES(182,116,15,'4',140.0,140.0,0,0); +INSERT INTO order_items VALUES(183,117,6,'2',22.0,22.0,1,0); +INSERT INTO order_items VALUES(184,117,5,'1',72.0,72.0,1,0); +INSERT INTO order_items VALUES(185,118,13,'1',120.0,120.0,0,1); +INSERT INTO order_items VALUES(186,119,8,'1',20.0,20.0,0,0); +INSERT INTO order_items VALUES(187,119,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(188,120,21,'1',380.0,380.0,0,0); +INSERT INTO order_items VALUES(189,120,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(190,121,10,'1',210.0,210.0,1,1); +INSERT INTO order_items VALUES(191,121,24,'1',230.0,230.0,1,1); +INSERT INTO order_items VALUES(192,122,5,'1',72.0,72.0,1,1); +INSERT INTO order_items VALUES(193,122,11,'1',1400.0,1400.0,1,1); +INSERT INTO order_items VALUES(194,122,13,'1',120.0,120.0,1,1); +INSERT INTO order_items VALUES(195,122,6,'1',22.0,22.0,1,1); +INSERT INTO order_items VALUES(196,123,35,'1',485.0,485.0,0,0); +INSERT INTO order_items VALUES(197,124,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(198,125,22,'1',680.0,680.0,0,0); +INSERT INTO order_items VALUES(199,126,10,'1',210.0,210.0,1,1); +INSERT INTO order_items VALUES(200,126,6,'1',22.0,22.0,1,1); +INSERT INTO order_items VALUES(201,127,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(202,127,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(203,127,24,'1',230.0,230.0,0,0); +INSERT INTO order_items VALUES(204,127,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(205,127,20,'1',340.0,340.0,0,0); +INSERT INTO order_items VALUES(206,128,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(207,128,15,'1',140.0,140.0,0,0); +INSERT INTO order_items VALUES(208,129,24,'1',230.0,230.0,0,0); +INSERT INTO order_items VALUES(209,129,4,'1',780.0,780.0,0,0); +INSERT INTO order_items VALUES(210,129,21,'1',380.0,380.0,0,0); +INSERT INTO order_items VALUES(211,130,10,'1',210.0,210.0,0,0); +INSERT INTO order_items VALUES(212,131,20,'1',340.0,340.0,0,0); +INSERT INTO order_items VALUES(213,132,10,'1',240.0,240.0,1,0); +INSERT INTO order_items VALUES(214,132,23,'2',300.0,300.0,1,0); +INSERT INTO order_items VALUES(215,132,11,'2',1400.0,1400.0,1,0); +INSERT INTO order_items VALUES(216,133,4,'1',780.0,780.0,0,0); +INSERT INTO order_items VALUES(217,134,6,'1',24.0,24.0,0,0); +INSERT INTO order_items VALUES(218,134,13,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(219,134,8,'1',20.0,20.0,0,0); +INSERT INTO order_items VALUES(220,134,7,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(221,134,25,'1',100.0,100.0,0,0); +INSERT INTO order_items VALUES(222,134,26,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(223,134,38,'1',100.0,100.0,0,0); +INSERT INTO order_items VALUES(224,134,39,'1',150.0,150.0,0,0); +INSERT INTO order_items VALUES(225,134,20,'1',340.0,340.0,0,0); +INSERT INTO order_items VALUES(226,134,14,'1',180.0,180.0,0,0); +INSERT INTO order_items VALUES(227,134,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(228,134,10,'1',240.0,240.0,0,0); +INSERT INTO order_items VALUES(229,134,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(230,134,23,'1',300.0,300.0,0,0); +INSERT INTO order_items VALUES(231,134,22,'1',680.0,680.0,0,0); +INSERT INTO order_items VALUES(232,135,20,'5',340.0,340.0,0,0); +INSERT INTO order_items VALUES(233,136,20,'3',340.0,340.0,0,0); +INSERT INTO order_items VALUES(234,137,13,'5',120.0,120.0,0,0); +INSERT INTO order_items VALUES(235,138,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(236,138,21,'1',380.0,380.0,0,0); +INSERT INTO order_items VALUES(237,139,4,'1',780.0,780.0,0,0); +INSERT INTO order_items VALUES(238,140,14,'3',180.0,180.0,0,0); +INSERT INTO order_items VALUES(239,141,14,'3',180.0,180.0,0,0); +INSERT INTO order_items VALUES(240,142,6,'1',24.0,24.0,0,0); +INSERT INTO order_items VALUES(241,143,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(242,143,14,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(243,144,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(244,144,14,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(245,145,1,'2',120.0,120.0,0,0); +INSERT INTO order_items VALUES(246,145,14,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(247,146,1,'2',120.0,120.0,0,0); +INSERT INTO order_items VALUES(248,146,14,'3',220.0,220.0,0,0); +INSERT INTO order_items VALUES(249,147,1,'3',120.0,120.0,1,0); +INSERT INTO order_items VALUES(250,147,14,'3',220.0,220.0,1,0); +INSERT INTO order_items VALUES(251,148,11,'1',1400.0,1400.0,0,0); +INSERT INTO order_items VALUES(252,148,35,'2',499.0,499.0,0,0); +INSERT INTO order_items VALUES(253,149,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(254,150,1,'1',120.0,120.0,1,0); +INSERT INTO order_items VALUES(255,150,3,'1',250.0,250.0,1,0); +INSERT INTO order_items VALUES(256,151,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(257,151,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(258,151,10,'1',240.0,240.0,0,0); +INSERT INTO order_items VALUES(259,152,21,'1',489.0,489.0,0,0); +INSERT INTO order_items VALUES(260,152,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(261,153,22,'1',680.0,680.0,0,0); +INSERT INTO order_items VALUES(262,154,23,'1',300.0,300.0,0,0); +INSERT INTO order_items VALUES(263,154,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(264,155,21,'1',489.0,489.0,0,0); +INSERT INTO order_items VALUES(265,155,3,'1',250.0,250.0,0,0); +INSERT INTO order_items VALUES(266,156,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(267,156,14,'1',220.0,220.0,0,0); +INSERT INTO order_items VALUES(268,157,75,'3',25.0,25.0,1,0); +INSERT INTO order_items VALUES(269,158,21,'1',559.0,559.0,0,0); +INSERT INTO order_items VALUES(270,158,3,'1',76.0,76.0,0,0); +INSERT INTO order_items VALUES(271,158,1,'1',120.0,120.0,0,0); +INSERT INTO order_items VALUES(272,158,9,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(273,158,35,'1',499.0,499.0,0,0); +INSERT INTO order_items VALUES(274,159,77,'56',22.0,22.0,0,0); +INSERT INTO order_items VALUES(275,160,77,'6',22.0,22.0,0,0); +INSERT INTO order_items VALUES(276,161,77,'14',22.0,22.0,0,0); +INSERT INTO order_items VALUES(277,162,77,'8',22.0,22.0,1,0); +INSERT INTO order_items VALUES(278,163,24,'7',249.0,249.0,0,0); +INSERT INTO order_items VALUES(279,164,3,'4',76.0,76.0,0,0); +INSERT INTO order_items VALUES(280,165,4,'1',820.0,820.0,0,0); +INSERT INTO order_items VALUES(281,166,7,'1',49.0,49.0,0,0); +INSERT INTO order_items VALUES(282,167,10,'1',240.0,240.0,0,0); +INSERT INTO order_items VALUES(283,167,6,'1',154.0,154.0,0,0); +INSERT INTO order_items VALUES(284,167,24,'1',249.0,249.0,0,0); +INSERT INTO order_items VALUES(285,168,35,'2',410.0,410.0,0,0); +INSERT INTO order_items VALUES(286,168,3,'2',76.0,76.0,0,0); +INSERT INTO order_items VALUES(287,168,4,'2',820.0,820.0,0,0); +INSERT INTO order_items VALUES(288,169,37,'3',29.0,29.0,0,0); +INSERT INTO order_items VALUES(289,170,23,'1',146.0,146.0,1,0); +INSERT INTO order_items VALUES(290,171,35,'1',429.0,429.0,1,1); +INSERT INTO order_items VALUES(291,172,13,'1',35.0,35.0,1,1); +INSERT INTO order_items VALUES(292,172,5,'1',17.0,17.0,1,1); +INSERT INTO order_items VALUES(293,172,68,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(294,173,56,'1',44.0,44.0,1,1); +INSERT INTO order_items VALUES(295,174,47,'1',109.0,109.0,1,1); +INSERT INTO order_items VALUES(296,174,38,'1',69.0,69.0,1,1); +INSERT INTO order_items VALUES(297,175,19,'1',27.0,27.0,1,1); +INSERT INTO order_items VALUES(298,176,56,'1',67.0,67.0,1,1); +INSERT INTO order_items VALUES(299,176,23,'1',146.0,146.0,1,1); +INSERT INTO order_items VALUES(300,177,58,'2',79.0,79.0,1,1); +INSERT INTO order_items VALUES(301,178,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(302,179,23,'1',146.0,146.0,1,0); +INSERT INTO order_items VALUES(303,180,13,'2',47.0,47.0,1,0); +INSERT INTO order_items VALUES(304,181,71,'1',17.0,17.0,1,0); +INSERT INTO order_items VALUES(305,182,59,'1',39.0,39.0,1,0); +INSERT INTO order_items VALUES(306,183,66,'1',32.0,32.0,0,0); +INSERT INTO order_items VALUES(307,184,41,'1',179.0,179.0,1,1); +INSERT INTO order_items VALUES(308,185,76,'1',25.0,25.0,0,0); +INSERT INTO order_items VALUES(309,185,32,'1',23.0,23.0,0,0); +INSERT INTO order_items VALUES(310,185,97,'1',19.0,19.0,0,0); +INSERT INTO order_items VALUES(311,186,24,'1',218.0,218.0,0,0); +INSERT INTO order_items VALUES(312,186,1,'1',89.0,89.0,0,0); +INSERT INTO order_items VALUES(313,187,67,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(314,187,45,'1',25.0,25.0,1,1); +INSERT INTO order_items VALUES(315,188,9,'1',296.0,296.0,0,0); +INSERT INTO order_items VALUES(316,189,23,'2',146.0,146.0,1,1); +INSERT INTO order_items VALUES(317,190,71,'1',17.0,17.0,0,0); +INSERT INTO order_items VALUES(318,191,23,'2',135.0,135.0,1,1); +INSERT INTO order_items VALUES(319,192,24,'2',210.0,210.0,1,1); +INSERT INTO order_items VALUES(320,193,10,'1',269.0,269.0,1,1); +INSERT INTO order_items VALUES(321,194,41,'1',179.0,179.0,1,1); +INSERT INTO order_items VALUES(322,194,4,'1',820.0,820.0,1,1); +INSERT INTO order_items VALUES(323,195,96,'1',109.0,109.0,1,1); +INSERT INTO order_items VALUES(324,196,41,'1',179.0,179.0,0,0); +INSERT INTO order_items VALUES(325,197,41,'1',179.0,179.0,1,1); +INSERT INTO order_items VALUES(326,197,10,'1',269.0,269.0,1,1); +INSERT INTO order_items VALUES(332,202,40,'1',135.0,135.0,1,0); +INSERT INTO order_items VALUES(333,203,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(334,204,51,'1',79.0,79.0,0,0); +INSERT INTO order_items VALUES(335,205,51,'1',79.0,79.0,1,1); +INSERT INTO order_items VALUES(336,206,4,'1',820.0,820.0,0,0); +INSERT INTO order_items VALUES(337,207,14,'1',369.0,369.0,0,0); +INSERT INTO order_items VALUES(338,208,98,'1',420.0,420.0,1,0); +INSERT INTO order_items VALUES(339,209,40,'2',135.0,135.0,1,1); +INSERT INTO order_items VALUES(340,209,38,'1',69.0,69.0,1,1); +INSERT INTO order_items VALUES(341,209,8,'1',119.0,119.0,1,1); +INSERT INTO order_items VALUES(342,210,24,'1',210.0,210.0,1,0); +INSERT INTO order_items VALUES(343,211,76,'1',25.0,25.0,1,1); +INSERT INTO order_items VALUES(344,211,19,'1',27.0,27.0,1,1); +INSERT INTO order_items VALUES(345,211,32,'1',23.0,23.0,1,1); +INSERT INTO order_items VALUES(346,211,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(347,212,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(348,213,18,'2',44.0,44.0,0,0); +INSERT INTO order_items VALUES(349,214,13,'2',49.0,49.0,0,0); +INSERT INTO order_items VALUES(350,215,13,'4',69.0,69.0,1,1); +INSERT INTO order_items VALUES(351,216,7,'1',49.0,49.0,0,0); +INSERT INTO order_items VALUES(352,216,8,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(353,216,46,'1',109.0,109.0,0,0); +INSERT INTO order_items VALUES(354,216,6,'1',109.0,109.0,0,0); +INSERT INTO order_items VALUES(355,217,38,'1',76.0,76.0,1,0); +INSERT INTO order_items VALUES(356,217,85,'1',259.0,259.0,1,0); +INSERT INTO order_items VALUES(357,218,6,'2',109.0,109.0,1,1); +INSERT INTO order_items VALUES(358,218,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(359,218,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(360,218,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(361,218,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(362,219,96,'1',109.0,109.0,0,0); +INSERT INTO order_items VALUES(363,220,6,'1',109.0,109.0,1,0); +INSERT INTO order_items VALUES(364,220,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(365,221,6,'1',109.0,109.0,1,1); +INSERT INTO order_items VALUES(366,221,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(367,221,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(368,222,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(369,222,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(370,222,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(371,223,7,'1',49.0,49.0,0,0); +INSERT INTO order_items VALUES(372,223,78,'1',29.0,29.0,0,0); +INSERT INTO order_items VALUES(373,223,45,'1',19.0,19.0,0,0); +INSERT INTO order_items VALUES(374,224,42,'1',149.0,149.0,1,0); +INSERT INTO order_items VALUES(375,225,59,'1',98.0,98.0,0,0); +INSERT INTO order_items VALUES(376,226,91,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(377,226,45,'2',19.0,19.0,1,1); +INSERT INTO order_items VALUES(378,226,71,'1',17.0,17.0,1,1); +INSERT INTO order_items VALUES(379,226,95,'1',39.0,39.0,1,1); +INSERT INTO order_items VALUES(380,227,14,'1',379.0,379.0,1,0); +INSERT INTO order_items VALUES(381,228,16,'1',28.0,28.0,0,0); +INSERT INTO order_items VALUES(382,228,91,'2',29.0,29.0,0,0); +INSERT INTO order_items VALUES(383,228,45,'2',19.0,19.0,0,0); +INSERT INTO order_items VALUES(384,228,71,'1',17.0,17.0,0,0); +INSERT INTO order_items VALUES(385,228,95,'1',39.0,39.0,0,0); +INSERT INTO order_items VALUES(386,229,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(387,229,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(388,229,77,'1',18.0,18.0,1,1); +INSERT INTO order_items VALUES(389,229,29,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(390,229,68,'1',32.0,32.0,1,1); +INSERT INTO order_items VALUES(391,230,45,'1',19.0,19.0,0,0); +INSERT INTO order_items VALUES(392,230,31,'2',29.0,29.0,0,0); +INSERT INTO order_items VALUES(393,230,6,'1',109.0,109.0,0,0); +INSERT INTO order_items VALUES(394,231,6,'2',109.0,109.0,1,1); +INSERT INTO order_items VALUES(395,231,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(396,232,2,'1',219.0,219.0,0,0); +INSERT INTO order_items VALUES(397,233,24,'1',219.0,219.0,0,0); +INSERT INTO order_items VALUES(398,234,24,'1',219.0,219.0,1,1); +INSERT INTO order_items VALUES(399,235,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(400,236,23,'1',139.0,139.0,1,0); +INSERT INTO order_items VALUES(401,237,13,'2',69.0,69.0,1,0); +INSERT INTO order_items VALUES(402,238,67,'4',24.0,24.0,0,0); +INSERT INTO order_items VALUES(403,239,67,'4',24.0,24.0,0,0); +INSERT INTO order_items VALUES(404,240,40,'1',160.0,160.0,0,0); +INSERT INTO order_items VALUES(405,241,40,'1',160.0,160.0,0,0); +INSERT INTO order_items VALUES(406,242,66,'1',27.0,27.0,0,0); +INSERT INTO order_items VALUES(407,243,19,'1',50.0,50.0,0,0); +INSERT INTO order_items VALUES(408,244,82,'1',389.0,389.0,0,0); +INSERT INTO order_items VALUES(409,245,59,'10',98.0,98.0,0,0); +INSERT INTO order_items VALUES(410,246,23,'1',139.0,139.0,0,0); +INSERT INTO order_items VALUES(411,247,42,'1',149.0,149.0,0,0); +INSERT INTO order_items VALUES(412,248,23,'1',139.0,139.0,1,0); +INSERT INTO order_items VALUES(413,248,7,'1',49.0,49.0,1,0); +INSERT INTO order_items VALUES(414,249,96,'1',109.0,109.0,1,1); +INSERT INTO order_items VALUES(415,250,98,'1',419.0,419.0,0,0); +INSERT INTO order_items VALUES(416,250,80,'1',849.0,849.0,0,0); +INSERT INTO order_items VALUES(417,250,58,'1',59.0,59.0,0,0); +INSERT INTO order_items VALUES(418,251,48,'2',55.0,55.0,1,0); +INSERT INTO order_items VALUES(419,252,78,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(420,252,91,'2',39.0,39.0,1,0); +INSERT INTO order_items VALUES(421,253,19,'2',27.0,27.0,1,0); +INSERT INTO order_items VALUES(422,253,72,'2',18.0,18.0,1,0); +INSERT INTO order_items VALUES(423,253,16,'1',28.0,28.0,1,0); +INSERT INTO order_items VALUES(424,254,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(425,254,19,'1',27.0,27.0,1,1); +INSERT INTO order_items VALUES(426,254,32,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(427,254,27,'1',24.0,24.0,1,1); +INSERT INTO order_items VALUES(428,254,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(429,254,74,'1',17.0,17.0,1,1); +INSERT INTO order_items VALUES(430,255,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(431,256,98,'1',419.0,419.0,0,0); +INSERT INTO order_items VALUES(432,257,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(433,258,58,'1',59.0,59.0,1,1); +INSERT INTO order_items VALUES(434,259,35,'1',459.0,459.0,1,1); +INSERT INTO order_items VALUES(435,260,40,'1',150.0,150.0,0,0); +INSERT INTO order_items VALUES(436,260,24,'1',230.0,230.0,0,0); +INSERT INTO order_items VALUES(437,261,73,'2',59.0,59.0,1,0); +INSERT INTO order_items VALUES(438,262,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(439,263,40,'1',150.0,150.0,0,0); +INSERT INTO order_items VALUES(440,264,24,'2',198.0,198.0,1,0); +INSERT INTO order_items VALUES(441,264,66,'1',27.0,27.0,1,0); +INSERT INTO order_items VALUES(442,265,73,'2',59.0,59.0,1,0); +INSERT INTO order_items VALUES(443,266,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(444,267,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(445,267,60,'1',78.0,78.0,1,0); +INSERT INTO order_items VALUES(446,267,8,'1',119.0,119.0,1,0); +INSERT INTO order_items VALUES(447,267,58,'1',59.0,59.0,1,0); +INSERT INTO order_items VALUES(448,268,35,'1',429.0,429.0,1,1); +INSERT INTO order_items VALUES(449,269,24,'2',198.0,198.0,0,0); +INSERT INTO order_items VALUES(450,270,2,'1',230.0,230.0,1,0); +INSERT INTO order_items VALUES(451,271,100,'1',99.0,99.0,1,0); +INSERT INTO order_items VALUES(452,271,69,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(453,271,9,'1',296.0,296.0,1,0); +INSERT INTO order_items VALUES(454,272,58,'1',59.0,59.0,0,0); +INSERT INTO order_items VALUES(455,273,58,'1',59.0,59.0,0,0); +INSERT INTO order_items VALUES(456,274,9,'1',296.0,296.0,1,1); +INSERT INTO order_items VALUES(457,274,85,'1',259.0,259.0,1,1); +INSERT INTO order_items VALUES(458,275,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(459,275,23,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(460,276,45,'2',19.0,19.0,1,1); +INSERT INTO order_items VALUES(461,276,91,'1',39.0,39.0,1,1); +INSERT INTO order_items VALUES(462,276,35,'1',429.0,429.0,1,1); +INSERT INTO order_items VALUES(463,277,97,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(464,277,95,'1',39.0,39.0,1,1); +INSERT INTO order_items VALUES(465,277,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(466,277,90,'1',27.0,27.0,1,0); +INSERT INTO order_items VALUES(467,277,19,'1',23.0,23.0,1,1); +INSERT INTO order_items VALUES(468,277,27,'1',24.0,24.0,1,1); +INSERT INTO order_items VALUES(469,277,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(470,277,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(471,277,29,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(472,277,45,'2',19.0,19.0,1,0); +INSERT INTO order_items VALUES(473,277,67,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(474,277,66,'1',27.0,27.0,1,1); +INSERT INTO order_items VALUES(475,277,65,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(476,277,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(477,278,24,'2',198.0,198.0,1,0); +INSERT INTO order_items VALUES(478,279,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(479,280,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(480,280,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(481,280,72,'1',14.0,14.0,1,1); +INSERT INTO order_items VALUES(482,280,92,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(483,280,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(484,280,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(485,280,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(486,281,91,'1',39.0,39.0,1,1); +INSERT INTO order_items VALUES(487,281,19,'2',23.0,23.0,1,1); +INSERT INTO order_items VALUES(488,281,10,'2',249.0,249.0,1,0); +INSERT INTO order_items VALUES(489,282,59,'1',98.0,98.0,0,0); +INSERT INTO order_items VALUES(490,283,73,'2',59.0,59.0,1,0); +INSERT INTO order_items VALUES(491,283,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(492,284,7,'1',49.0,49.0,1,0); +INSERT INTO order_items VALUES(493,284,48,'1',55.0,55.0,1,0); +INSERT INTO order_items VALUES(494,284,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(495,285,38,'1',76.0,76.0,0,0); +INSERT INTO order_items VALUES(496,285,56,'1',67.0,67.0,0,0); +INSERT INTO order_items VALUES(497,285,96,'1',109.0,109.0,0,0); +INSERT INTO order_items VALUES(498,285,47,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(499,286,27,'1',24.0,24.0,1,0); +INSERT INTO order_items VALUES(500,286,5,'1',26.0,26.0,1,0); +INSERT INTO order_items VALUES(501,286,32,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(502,286,16,'1',28.0,28.0,1,0); +INSERT INTO order_items VALUES(503,286,33,'1',15.0,15.0,1,0); +INSERT INTO order_items VALUES(504,286,89,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(505,286,58,'1',59.0,59.0,1,0); +INSERT INTO order_items VALUES(506,286,48,'1',55.0,55.0,1,0); +INSERT INTO order_items VALUES(507,287,97,'6',19.0,19.0,0,0); +INSERT INTO order_items VALUES(508,288,38,'1',76.0,76.0,0,0); +INSERT INTO order_items VALUES(509,289,31,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(510,290,24,'1',198.0,198.0,1,1); +INSERT INTO order_items VALUES(511,290,41,'1',189.0,189.0,1,0); +INSERT INTO order_items VALUES(512,291,21,'1',559.0,559.0,1,1); +INSERT INTO order_items VALUES(513,292,59,'1',98.0,98.0,0,0); +INSERT INTO order_items VALUES(514,293,59,'1',98.0,98.0,0,0); +INSERT INTO order_items VALUES(515,294,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(516,295,73,'4',59.0,59.0,1,0); +INSERT INTO order_items VALUES(517,296,4,'1',819.0,819.0,0,0); +INSERT INTO order_items VALUES(518,297,23,'2',125.0,125.0,1,1); +INSERT INTO order_items VALUES(519,297,76,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(520,297,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(521,297,32,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(522,298,33,'1',15.0,15.0,1,0); +INSERT INTO order_items VALUES(523,298,89,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(524,298,32,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(525,299,48,'1',55.0,55.0,1,0); +INSERT INTO order_items VALUES(526,299,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(527,300,44,'2',119.0,119.0,1,1); +INSERT INTO order_items VALUES(528,301,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(529,301,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(530,301,100,'1',99.0,99.0,1,1); +INSERT INTO order_items VALUES(531,301,83,'1',159.0,159.0,1,1); +INSERT INTO order_items VALUES(532,301,40,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(533,301,23,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(534,301,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(535,301,29,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(536,301,72,'3',14.0,14.0,1,0); +INSERT INTO order_items VALUES(537,301,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(538,301,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(539,301,92,'1',29.0,29.0,1,0); +INSERT INTO order_items VALUES(540,301,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(541,301,19,'2',23.0,23.0,1,1); +INSERT INTO order_items VALUES(542,301,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(543,301,77,'3',16.0,16.0,1,1); +INSERT INTO order_items VALUES(544,301,33,'1',15.0,15.0,1,0); +INSERT INTO order_items VALUES(545,301,95,'1',39.0,39.0,1,0); +INSERT INTO order_items VALUES(546,301,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(547,301,79,'1',33.0,33.0,1,0); +INSERT INTO order_items VALUES(548,301,76,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(549,302,41,'1',189.0,189.0,1,0); +INSERT INTO order_items VALUES(550,303,61,'1',99.0,99.0,1,0); +INSERT INTO order_items VALUES(551,303,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(552,304,9,'1',296.0,296.0,1,1); +INSERT INTO order_items VALUES(553,304,24,'1',198.0,198.0,1,1); +INSERT INTO order_items VALUES(554,305,73,'5',59.0,59.0,1,0); +INSERT INTO order_items VALUES(555,306,23,'2',125.0,125.0,1,1); +INSERT INTO order_items VALUES(556,306,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(557,306,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(558,307,73,'4',59.0,59.0,1,1); +INSERT INTO order_items VALUES(559,308,35,'1',429.0,429.0,1,0); +INSERT INTO order_items VALUES(560,309,40,'1',150.0,150.0,1,1); +INSERT INTO order_items VALUES(561,309,23,'1',149.0,149.0,1,1); +INSERT INTO order_items VALUES(562,309,19,'2',50.0,50.0,1,1); +INSERT INTO order_items VALUES(563,309,45,'3',19.0,19.0,1,1); +INSERT INTO order_items VALUES(564,309,29,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(565,309,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(566,309,76,'2',19.0,19.0,1,1); +INSERT INTO order_items VALUES(567,309,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(568,309,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(569,309,27,'1',24.0,24.0,1,1); +INSERT INTO order_items VALUES(570,310,98,'1',419.0,419.0,1,0); +INSERT INTO order_items VALUES(571,311,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(572,311,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(573,311,56,'1',67.0,67.0,1,1); +INSERT INTO order_items VALUES(574,311,65,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(575,311,58,'1',59.0,59.0,1,1); +INSERT INTO order_items VALUES(576,311,100,'1',99.0,99.0,1,1); +INSERT INTO order_items VALUES(577,311,79,'1',33.0,33.0,1,1); +INSERT INTO order_items VALUES(578,312,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(579,312,58,'1',59.0,59.0,1,1); +INSERT INTO order_items VALUES(580,312,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(581,312,46,'1',109.0,109.0,1,1); +INSERT INTO order_items VALUES(582,312,100,'1',99.0,99.0,1,1); +INSERT INTO order_items VALUES(583,312,56,'1',67.0,67.0,1,1); +INSERT INTO order_items VALUES(584,312,8,'1',119.0,119.0,1,1); +INSERT INTO order_items VALUES(585,313,23,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(586,313,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(587,314,40,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(588,315,76,'1',19.0,19.0,0,0); +INSERT INTO order_items VALUES(589,315,19,'1',23.0,23.0,0,0); +INSERT INTO order_items VALUES(590,315,48,'1',55.0,55.0,0,0); +INSERT INTO order_items VALUES(591,316,19,'1',23.0,23.0,1,1); +INSERT INTO order_items VALUES(592,316,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(593,316,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(594,316,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(595,317,23,'1',149.0,149.0,0,0); +INSERT INTO order_items VALUES(596,318,14,'2',389.0,389.0,1,1); +INSERT INTO order_items VALUES(597,318,98,'2',419.0,419.0,1,1); +INSERT INTO order_items VALUES(598,319,11,'1',119.0,119.0,1,0); +INSERT INTO order_items VALUES(599,319,79,'2',33.0,33.0,1,0); +INSERT INTO order_items VALUES(600,320,38,'1',76.0,76.0,1,1); +INSERT INTO order_items VALUES(601,320,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(602,320,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(603,320,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(604,320,33,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(605,320,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(606,321,98,'1',419.0,419.0,0,0); +INSERT INTO order_items VALUES(607,322,35,'1',429.0,429.0,1,0); +INSERT INTO order_items VALUES(608,323,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(609,323,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(610,323,37,'1',139.0,139.0,1,1); +INSERT INTO order_items VALUES(611,323,76,'4',19.0,19.0,1,1); +INSERT INTO order_items VALUES(612,323,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(613,323,72,'1',14.0,14.0,1,1); +INSERT INTO order_items VALUES(614,323,92,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(615,323,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(616,323,97,'2',19.0,19.0,1,1); +INSERT INTO order_items VALUES(617,323,24,'1',198.0,198.0,1,1); +INSERT INTO order_items VALUES(618,324,8,'1',119.0,119.0,1,1); +INSERT INTO order_items VALUES(619,324,51,'1',169.0,169.0,1,0); +INSERT INTO order_items VALUES(620,324,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(621,324,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(622,324,100,'1',99.0,99.0,1,1); +INSERT INTO order_items VALUES(623,325,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(624,325,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(625,325,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(626,325,19,'1',23.0,23.0,1,1); +INSERT INTO order_items VALUES(627,325,23,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(628,326,2,'1',198.0,198.0,1,1); +INSERT INTO order_items VALUES(629,326,23,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(630,327,58,'1',59.0,59.0,1,0); +INSERT INTO order_items VALUES(631,327,38,'1',76.0,76.0,1,0); +INSERT INTO order_items VALUES(632,327,79,'2',33.0,33.0,1,0); +INSERT INTO order_items VALUES(633,328,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(634,329,13,'1',69.0,69.0,1,1); +INSERT INTO order_items VALUES(635,329,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(636,329,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(637,329,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(638,329,50,'1',119.0,119.0,1,1); +INSERT INTO order_items VALUES(639,330,72,'2',14.0,14.0,1,1); +INSERT INTO order_items VALUES(640,331,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(641,331,37,'1',139.0,139.0,1,0); +INSERT INTO order_items VALUES(642,332,38,'1',76.0,76.0,1,0); +INSERT INTO order_items VALUES(643,332,53,'1',239.0,239.0,1,1); +INSERT INTO order_items VALUES(644,333,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(645,333,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(646,333,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(647,333,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(648,333,19,'1',23.0,23.0,1,1); +INSERT INTO order_items VALUES(649,333,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(650,334,45,'2',19.0,19.0,1,1); +INSERT INTO order_items VALUES(651,334,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(652,334,94,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(653,334,33,'2',15.0,15.0,1,1); +INSERT INTO order_items VALUES(654,334,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(655,334,72,'2',14.0,14.0,1,1); +INSERT INTO order_items VALUES(656,334,19,'2',23.0,23.0,1,1); +INSERT INTO order_items VALUES(657,334,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(658,334,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(659,334,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(660,334,5,'1',26.0,26.0,1,0); +INSERT INTO order_items VALUES(661,334,65,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(662,334,13,'1',69.0,69.0,1,1); +INSERT INTO order_items VALUES(663,335,59,'2',98.0,98.0,0,0); +INSERT INTO order_items VALUES(664,335,60,'2',78.0,78.0,0,0); +INSERT INTO order_items VALUES(665,335,8,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(666,336,8,'1',119.0,119.0,1,1); +INSERT INTO order_items VALUES(667,336,59,'1',98.0,98.0,1,1); +INSERT INTO order_items VALUES(668,336,60,'1',78.0,78.0,1,1); +INSERT INTO order_items VALUES(669,337,76,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(670,337,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(671,337,97,'1',19.0,19.0,1,0); +INSERT INTO order_items VALUES(672,338,23,'2',125.0,125.0,1,1); +INSERT INTO order_items VALUES(673,339,65,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(674,339,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(675,339,13,'1',69.0,69.0,1,1); +INSERT INTO order_items VALUES(676,340,58,'1',59.0,59.0,1,0); +INSERT INTO order_items VALUES(677,340,7,'1',49.0,49.0,1,0); +INSERT INTO order_items VALUES(678,340,48,'1',55.0,55.0,1,1); +INSERT INTO order_items VALUES(679,340,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(680,341,23,'2',125.0,125.0,1,0); +INSERT INTO order_items VALUES(681,342,9,'1',296.0,296.0,1,0); +INSERT INTO order_items VALUES(682,342,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(683,342,19,'2',50.0,50.0,1,0); +INSERT INTO order_items VALUES(684,342,60,'1',78.0,78.0,1,0); +INSERT INTO order_items VALUES(685,342,48,'3',55.0,55.0,1,0); +INSERT INTO order_items VALUES(686,343,58,'1',59.0,59.0,1,0); +INSERT INTO order_items VALUES(687,343,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(688,344,40,'1',125.0,125.0,1,1); +INSERT INTO order_items VALUES(689,344,7,'1',49.0,49.0,1,1); +INSERT INTO order_items VALUES(690,345,7,'1',49.0,49.0,1,0); +INSERT INTO order_items VALUES(691,345,59,'1',98.0,98.0,1,0); +INSERT INTO order_items VALUES(692,345,44,'1',119.0,119.0,1,0); +INSERT INTO order_items VALUES(693,345,60,'1',78.0,78.0,1,0); +INSERT INTO order_items VALUES(694,345,48,'1',55.0,55.0,1,0); +INSERT INTO order_items VALUES(695,346,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(696,346,67,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(697,346,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(698,346,91,'1',39.0,39.0,1,1); +INSERT INTO order_items VALUES(699,346,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(700,346,97,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(701,346,74,'1',18.0,18.0,1,1); +INSERT INTO order_items VALUES(702,346,72,'1',14.0,14.0,1,1); +INSERT INTO order_items VALUES(703,347,69,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(704,347,5,'1',26.0,26.0,1,1); +INSERT INTO order_items VALUES(705,347,65,'1',28.0,28.0,1,1); +INSERT INTO order_items VALUES(706,347,71,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(707,347,31,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(708,347,29,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(709,347,76,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(710,347,45,'1',19.0,19.0,1,1); +INSERT INTO order_items VALUES(711,347,72,'1',14.0,14.0,1,1); +INSERT INTO order_items VALUES(712,347,32,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(713,347,33,'1',15.0,15.0,1,1); +INSERT INTO order_items VALUES(714,347,78,'1',29.0,29.0,1,1); +INSERT INTO order_items VALUES(715,348,35,'1',429.0,429.0,0,0); +INSERT INTO order_items VALUES(748,381,1,'1',99.0,99.0,0,0); +INSERT INTO order_items VALUES(749,381,9,'1',296.0,296.0,0,0); +INSERT INTO order_items VALUES(750,382,91,'1',39.0,39.0,0,0); +INSERT INTO order_items VALUES(751,382,25,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(752,382,31,'1',29.0,29.0,0,0); +INSERT INTO order_items VALUES(753,383,25,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(754,384,84,'1',119.0,119.0,0,0); +INSERT INTO order_items VALUES(755,384,36,'1',280.0,280.0,0,0); +INSERT INTO order_items VALUES(756,385,79,'2',39.0,39.0,0,0); +INSERT INTO order_items VALUES(757,385,23,'2',133.0,133.0,0,0); +INSERT INTO order_items VALUES(758,386,91,'1',39.0,39.0,0,0); +CREATE TABLE IF NOT EXISTS "order_status" ("id" INTEGER NOT NULL, "order_time" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "user_id" INTEGER NOT NULL, "order_id" INTEGER NOT NULL, "is_packaged" INTEGER NOT NULL DEFAULT false, "is_delivered" INTEGER NOT NULL DEFAULT false, "is_cancelled" INTEGER NOT NULL DEFAULT false, "cancel_reason" TEXT, "payment_state" TEXT NOT NULL DEFAULT 'pending', "cancellation_user_notes" TEXT, "cancellation_admin_notes" TEXT, "cancellation_reviewed" INTEGER NOT NULL DEFAULT false, "cancellation_reviewed_at" TEXT, "refund_coupon_id" INTEGER, "is_cancelled_by_admin" INTEGER); +INSERT INTO order_status VALUES(1,'2025-11-19T09:21:36.005Z',3,1,1,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(2,'2025-11-19T09:38:30.002Z',1,2,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(3,'2025-11-19T11:46:20.300Z',1,3,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(4,'2025-11-19T11:47:33.139Z',1,4,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(5,'2025-11-19T11:57:48.269Z',1,5,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(6,'2025-11-19T12:13:52.466Z',1,6,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(7,'2025-11-19T12:15:06.264Z',1,7,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(8,'2025-11-19T12:18:02.760Z',1,8,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(9,'2025-11-19T12:23:19.913Z',1,9,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(10,'2025-11-19T12:24:04.853Z',1,10,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(11,'2025-11-19T12:32:19.093Z',1,11,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(12,'2025-11-19T12:34:24.892Z',1,12,0,0,1,'Simply','success','Simply',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(13,'2025-11-19T12:36:42.741Z',1,13,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(14,'2025-11-19T12:39:28.501Z',1,14,0,0,1,'Simply','success','Simply',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(15,'2025-11-20T13:57:28.656Z',1,15,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(16,'2025-11-20T13:58:25.443Z',1,16,0,0,1,'Just for fun','pending','Just for fun',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(17,'2025-11-20T13:59:33.401Z',1,17,0,0,1,'Simply','pending','Simply',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(18,'2025-11-22T06:22:17.202Z',1,18,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(19,'2025-11-22T22:47:06.288Z',2,19,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(20,'2025-11-22T22:47:51.311Z',2,20,0,0,1,'Demo ','cod','Demo ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(21,'2025-11-23T06:17:57.049Z',1,21,1,1,1,'Having some fun','success','Having some fun',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(22,'2025-11-24T05:57:28.143Z',3,22,1,1,1,'On more need','cod','On more need',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(23,'2025-11-24T05:57:47.787Z',3,23,1,1,1,'No more need','success','No more need',NULL,1,'2025-11-24T06:07:29.145Z',NULL,NULL); +INSERT INTO order_status VALUES(24,'2025-11-25T00:59:10.926Z',2,24,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(25,'2025-11-25T05:22:32.946Z',1,25,0,0,1,'Will order again. ','success','Will order again. ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(26,'2025-11-27T06:03:25.875Z',1,26,0,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(27,'2025-11-28T05:42:30.513Z',1,27,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(28,'2025-11-28T08:13:28.023Z',1,28,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(29,'2025-11-28T13:35:07.141Z',1,29,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(30,'2025-11-28T22:21:06.630Z',1,30,0,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(31,'2025-11-28T22:24:57.085Z',1,31,0,0,1,'Not paid for','pending','Not paid for',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(32,'2025-11-28T22:34:41.736Z',1,32,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(33,'2025-11-28T22:36:50.767Z',1,33,0,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(34,'2025-11-28T22:52:17.319Z',1,34,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(35,'2025-11-28T22:58:18.465Z',1,35,0,0,1,'Payment failed','pending','Payment failed',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(36,'2025-11-28T23:08:27.789Z',1,36,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(37,'2025-11-28T23:09:42.893Z',1,37,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(38,'2025-11-28T23:11:19.776Z',1,38,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(39,'2025-11-28T23:17:00.716Z',1,39,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(40,'2025-11-28T23:17:55.763Z',1,40,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(41,'2025-11-28T23:22:23.472Z',1,41,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(42,'2025-11-28T23:23:26.081Z',1,42,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(43,'2025-11-28T23:31:53.995Z',1,43,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(44,'2025-11-28T23:33:25.999Z',1,44,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(45,'2025-11-28T23:35:17.386Z',1,45,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(46,'2025-11-28T23:42:33.188Z',1,46,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(47,'2025-11-29T00:35:31.578Z',1,47,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(48,'2025-11-29T00:47:37.657Z',1,48,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(49,'2025-11-29T00:51:57.402Z',1,49,0,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(50,'2025-11-29T01:06:18.087Z',1,50,0,0,1,'Testing cancellation functionality','success','Testing cancellation functionality',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(51,'2025-11-29T01:40:22.677Z',1,51,0,0,1,'Testingg','success','Testingg',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(52,'2025-11-29T01:51:02.498Z',1,52,0,0,1,'Testing','success','Testing',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(53,'2025-11-29T01:57:47.891Z',1,53,0,0,1,'Testing 3','success','Testing 3',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(54,'2025-11-29T03:01:07.992Z',1,54,1,1,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(55,'2025-12-04T23:32:41.242Z',2,55,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(56,'2025-12-10T10:02:38.859Z',4,56,0,0,0,NULL,'success',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(57,'2025-12-10T10:04:32.211Z',4,57,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(58,'2025-12-13T11:19:59.242Z',1,58,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(59,'2025-12-13T11:23:12.720Z',1,59,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(60,'2025-12-13T11:23:12.720Z',1,60,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(61,'2025-12-13T11:24:58.073Z',1,61,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(62,'2025-12-13T11:24:58.073Z',1,62,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(63,'2025-12-13T11:30:04.358Z',1,63,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(64,'2025-12-13T11:31:12.284Z',1,64,0,0,1,'just for fun','pending','just for fun',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(65,'2025-12-13T11:31:12.284Z',1,65,0,0,0,NULL,'pending',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(66,'2025-12-15T09:42:52.294Z',1,66,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(67,'2025-12-15T09:46:00.443Z',1,67,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(68,'2025-12-15T09:57:50.680Z',1,68,0,0,1,'funnn','cod','funnn',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(69,'2025-12-18T04:55:00.617Z',2,69,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(70,'2025-12-19T01:02:15.969Z',15,70,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(71,'2025-12-19T03:02:11.838Z',17,71,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(72,'2025-12-19T03:07:12.056Z',17,72,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(73,'2025-12-19T03:40:04.180Z',17,73,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(74,'2025-12-19T03:46:32.062Z',17,74,0,0,1,'Xdf','cod','Xdf',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(75,'2025-12-19T03:55:08.427Z',17,75,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(76,'2025-12-19T03:57:05.639Z',17,76,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(77,'2025-12-19T04:02:06.098Z',17,77,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(78,'2025-12-19T07:02:11.424Z',15,78,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(79,'2025-12-19T07:53:09.910Z',15,79,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(80,'2025-12-19T09:10:25.557Z',17,80,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(81,'2025-12-19T09:49:01.904Z',17,81,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(82,'2025-12-19T09:55:53.524Z',17,82,1,1,0,NULL,'cod',NULL,NULL,0,NULL,7,NULL); +INSERT INTO order_status VALUES(83,'2025-12-19T10:37:21.739Z',17,83,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(84,'2025-12-19T10:46:56.208Z',17,84,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(85,'2025-12-19T11:01:02.225Z',17,85,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(86,'2025-12-19T11:26:56.607Z',17,86,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(87,'2025-12-19T11:38:46.198Z',17,87,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(88,'2025-12-20T05:46:31.197Z',17,88,0,0,1,'Hh','cod','Hh',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(89,'2025-12-20T15:09:16.076Z',1,89,0,0,1,'Simply','cod','Simply',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(90,'2025-12-20T21:38:45.891Z',17,90,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(91,'2025-12-20T21:39:35.232Z',17,91,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(92,'2025-12-22T05:12:52.301Z',15,92,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(93,'2025-12-22T05:22:59.518Z',15,93,0,0,1,replace('Plz cancle this order \nIt''s mistake to order ','\n',char(10)),'cod',replace('Plz cancle this order \nIt''s mistake to order ','\n',char(10)),NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(94,'2025-12-22T08:12:49.911Z',15,94,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(95,'2025-12-22T08:40:14.765Z',15,95,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(96,'2025-12-22T09:05:51.054Z',20,96,0,0,1,'Sorry by mistake ordered ','cod','Sorry by mistake ordered ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(97,'2025-12-23T00:47:34.830Z',2,97,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(98,'2025-12-23T00:47:34.830Z',2,98,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(99,'2025-12-23T00:50:21.885Z',2,99,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(100,'2025-12-23T08:23:28.094Z',15,100,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(101,'2025-12-23T11:45:50.591Z',17,101,0,0,1,'Hh','cod','Hh',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(102,'2025-12-23T11:49:14.841Z',17,102,0,0,1,'Gg','cod','Gg',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(103,'2025-12-23T21:09:04.114Z',22,103,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(104,'2025-12-23T21:20:33.284Z',22,104,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(105,'2025-12-23T21:20:33.284Z',22,105,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(106,'2025-12-24T05:02:01.957Z',15,106,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(107,'2025-12-24T05:02:01.957Z',15,107,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(108,'2025-12-24T05:02:01.957Z',15,108,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(109,'2025-12-24T05:02:01.957Z',15,109,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(110,'2025-12-25T07:48:48.478Z',1,110,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(111,'2025-12-25T10:06:02.108Z',1,111,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(112,'2025-12-25T10:06:02.108Z',1,112,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(113,'2025-12-25T10:32:45.526Z',1,113,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(114,'2025-12-26T19:38:17.686Z',16,114,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(115,'2025-12-26T23:02:15.299Z',1,115,0,0,0,NULL,'cod',NULL,NULL,0,NULL,9,NULL); +INSERT INTO order_status VALUES(116,'2025-12-26T23:02:15.299Z',1,116,1,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(117,'2025-12-27T12:09:01.944Z',2,117,1,1,0,NULL,'cod',NULL,NULL,0,NULL,10,NULL); +INSERT INTO order_status VALUES(118,'2025-12-27T12:09:01.944Z',2,118,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(119,'2025-12-27T12:09:01.944Z',2,119,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(120,'2025-12-28T08:37:33.787Z',2,120,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(121,'2025-12-28T08:41:24.904Z',2,121,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(122,'2025-12-28T22:17:14.213Z',1,122,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(123,'2026-01-01T03:08:22.110Z',2,123,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(124,'2026-01-01T03:09:11.420Z',2,124,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(125,'2026-01-01T03:14:07.865Z',2,125,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(126,'2026-01-01T05:09:15.780Z',2,126,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(127,'2026-01-01T06:40:15.182Z',2,127,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(128,'2026-01-03T02:42:48.013Z',26,128,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(129,'2026-01-04T07:35:41.022Z',2,129,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(130,'2026-01-04T07:37:44.994Z',12,130,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(131,'2026-01-04T13:20:00.136Z',21,131,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(132,'2026-01-06T07:21:22.047Z',1,132,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(133,'2026-01-06T07:45:52.275Z',30,133,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(134,'2026-01-06T11:13:08.862Z',21,134,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(135,'2026-01-07T09:32:56.404Z',22,135,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(136,'2026-01-07T10:17:55.795Z',22,136,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(137,'2026-01-07T10:22:37.964Z',22,137,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(138,'2026-01-07T18:03:50.419Z',2,138,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(139,'2026-01-12T08:37:09.285Z',2,139,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(140,'2026-01-13T03:57:08.501Z',1,140,0,0,1,'Cancell','cod','Cancell',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(141,'2026-01-13T04:16:11.800Z',1,141,0,0,1,'Cancell','cod','Cancell',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(142,'2026-01-13T09:26:55.340Z',34,142,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(143,'2026-01-14T13:37:20.272Z',1,143,0,0,1,'Cancell','cod','Cancell',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(144,'2026-01-14T13:40:52.673Z',1,144,0,0,1,'Cancelll','cod','Cancelll',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(145,'2026-01-14T13:43:51.004Z',1,145,0,0,1,'Cabcell','cod','Cabcell',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(146,'2026-01-14T13:46:29.183Z',1,146,0,0,1,'Cancel','cod',NULL,'Cancel',1,'2026-01-28T00:39:48.321Z',NULL,1); +INSERT INTO order_status VALUES(147,'2026-01-14T13:48:47.459Z',1,147,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(148,'2026-01-14T14:18:23.106Z',1,148,0,0,1,'Area Not Serviced yet','cod',NULL,'Area Not Serviced yet',1,'2026-01-17T23:01:50.046Z',NULL,1); +INSERT INTO order_status VALUES(149,'2026-01-15T10:38:51.399Z',2,149,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(150,'2026-01-15T10:38:51.399Z',2,150,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(151,'2026-01-16T07:20:20.462Z',2,151,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(152,'2026-01-16T07:20:39.316Z',2,152,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(153,'2026-01-16T07:21:00.354Z',2,153,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(154,'2026-01-16T07:21:27.051Z',2,154,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(155,'2026-01-16T07:22:32.758Z',2,155,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(156,'2026-01-16T23:21:39.925Z',2,156,0,0,1,'Cancel ','cod',NULL,'Cancel ',1,'2026-01-27T22:30:19.302Z',NULL,1); +INSERT INTO order_status VALUES(157,'2026-01-18T00:56:50.633Z',22,157,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(158,'2026-01-18T03:02:03.729Z',2,158,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(159,'2026-01-18T09:53:08.648Z',22,159,0,0,1,'Reason for cancellation ','cod','Reason for cancellation ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(160,'2026-01-18T10:14:06.341Z',22,160,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(161,'2026-01-18T10:20:14.848Z',22,161,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(162,'2026-01-18T10:24:09.003Z',22,162,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(163,'2026-01-18T21:46:46.398Z',22,163,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(164,'2026-01-19T14:17:52.639Z',1,164,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(165,'2026-01-23T03:22:03.840Z',2,165,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(166,'2026-01-23T10:37:42.952Z',25,166,0,0,1,'I''ll order later','cod','I''ll order later',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(167,'2026-01-24T02:56:06.720Z',2,167,0,0,1,'Unnecessary order','cod',NULL,'Unnecessary order',1,'2026-01-27T22:26:35.510Z',NULL,1); +INSERT INTO order_status VALUES(168,'2026-01-24T14:56:52.645Z',1,168,0,0,1,'Cancel ','cod',NULL,'Cancel ',1,'2026-01-27T22:27:15.817Z',NULL,1); +INSERT INTO order_status VALUES(169,'2026-01-24T20:44:03.566Z',22,169,0,0,1,'Cancel ','cod',NULL,'Cancel ',1,'2026-01-27T22:27:32.422Z',NULL,1); +INSERT INTO order_status VALUES(170,'2026-01-25T23:35:31.364Z',29,170,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(171,'2026-01-27T06:44:08.218Z',64,171,0,0,1,'Unnecessary','cod',NULL,'Unnecessary',1,'2026-01-27T22:25:10.943Z',NULL,1); +INSERT INTO order_status VALUES(172,'2026-01-27T11:29:12.321Z',65,172,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(173,'2026-01-27T11:29:12.321Z',65,173,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(174,'2026-01-28T00:03:00.256Z',60,174,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(175,'2026-01-28T00:38:05.827Z',1,175,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(176,'2026-01-28T00:38:05.827Z',1,176,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(177,'2026-01-28T01:51:10.288Z',22,177,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(178,'2026-01-28T01:51:10.288Z',22,178,1,1,1,'Cancel ','cod',NULL,'Cancel ',1,'2026-01-28T10:02:31.195Z',NULL,1); +INSERT INTO order_status VALUES(179,'2026-01-28T10:40:36.187Z',58,179,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(180,'2026-01-29T22:42:25.446Z',38,180,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(181,'2026-01-30T00:31:02.610Z',1,181,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(182,'2026-01-30T00:46:59.261Z',38,182,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(183,'2026-01-30T01:42:25.118Z',1,183,0,0,1,'Not a serious order','cod',NULL,'Not a serious order',1,'2026-01-30T02:09:22.274Z',NULL,1); +INSERT INTO order_status VALUES(184,'2026-01-30T03:13:07.360Z',38,184,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(185,'2026-01-31T01:44:10.735Z',54,185,0,0,1,'No response from customer ','cod',NULL,'No response from customer ',1,'2026-01-31T07:36:00.972Z',NULL,1); +INSERT INTO order_status VALUES(186,'2026-01-31T01:44:48.105Z',54,186,0,0,1,'No response from customer','cod',NULL,'No response from customer',1,'2026-01-31T07:35:41.324Z',NULL,1); +INSERT INTO order_status VALUES(187,'2026-01-31T04:25:19.495Z',78,187,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(188,'2026-01-31T05:26:01.981Z',1,188,0,0,1,'Cancel','cod','Cancel',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(189,'2026-01-31T06:32:04.589Z',1,189,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(190,'2026-01-31T22:04:46.197Z',1,190,0,0,1,'Yes’s cancel','cod','Yes’s cancel',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(191,'2026-02-01T00:28:05.843Z',7,191,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(192,'2026-02-01T01:31:50.642Z',74,192,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(193,'2026-02-01T01:56:14.147Z',74,193,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(194,'2026-02-01T02:19:04.918Z',38,194,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(195,'2026-02-01T03:22:19.400Z',22,195,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(196,'2026-02-01T04:41:15.161Z',82,196,0,0,1,'Zdyt','cod','Zdyt',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(197,'2026-02-01T04:46:41.872Z',82,197,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(202,'2026-02-01T10:07:16.233Z',88,202,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(203,'2026-02-02T04:53:54.970Z',92,203,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(204,'2026-02-02T06:48:31.456Z',38,204,0,0,1,'Mistake ','cod','Mistake ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(205,'2026-02-02T06:50:24.727Z',38,205,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(206,'2026-02-02T08:27:54.149Z',7,206,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(207,'2026-02-02T09:01:16.193Z',1,207,0,0,1,'Will order Mutton','cod','Will order Mutton',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(208,'2026-02-02T12:53:25.021Z',1,208,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(209,'2026-02-02T22:40:01.666Z',38,209,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(210,'2026-02-03T00:26:45.500Z',98,210,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(211,'2026-02-03T00:28:30.230Z',98,211,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(212,'2026-02-03T03:11:48.475Z',24,212,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(213,'2026-02-03T07:33:13.302Z',46,213,0,0,1,'Yes','cod','Yes',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(214,'2026-02-03T08:40:49.538Z',38,214,0,0,1,'I want to change shedule ','cod','I want to change shedule ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(215,'2026-02-03T08:43:00.789Z',38,215,1,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(216,'2026-02-03T10:16:16.915Z',81,216,0,0,1,'No response from customer','cod',NULL,'No response from customer',1,'2026-02-03T23:34:45.350Z',NULL,1); +INSERT INTO order_status VALUES(217,'2026-02-04T01:36:25.133Z',96,217,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(218,'2026-02-04T02:41:07.508Z',81,218,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(219,'2026-02-04T07:47:53.067Z',1,219,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(220,'2026-02-05T03:15:53.554Z',103,220,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(221,'2026-02-05T04:00:30.739Z',24,221,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(222,'2026-02-06T05:49:57.315Z',114,222,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(223,'2026-02-06T06:21:43.659Z',1,223,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(224,'2026-02-06T06:25:36.038Z',71,224,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(225,'2026-02-06T08:53:10.229Z',1,225,0,0,1,'Testing cancel Telegram Notification ','cod',NULL,'Testing cancel Telegram Notification ',1,'2026-02-06T23:20:32.419Z',NULL,1); +INSERT INTO order_status VALUES(226,'2026-02-06T10:26:39.531Z',115,226,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(227,'2026-02-06T10:26:39.531Z',115,227,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(228,'2026-02-06T16:16:47.346Z',115,228,0,0,1,'Ordered by mistake','cod','Ordered by mistake',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(229,'2026-02-06T23:01:13.646Z',109,229,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(230,'2026-02-06T23:28:37.545Z',103,230,0,0,1,'Wrong address ','cod','Wrong address ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(231,'2026-02-06T23:36:55.424Z',103,231,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(232,'2026-02-07T07:06:17.096Z',119,232,0,0,1,'The order is still pending ','cod','The order is still pending ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(233,'2026-02-07T07:24:42.810Z',38,233,0,0,1,'Change shedule ','cod','Change shedule ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(234,'2026-02-07T07:25:52.698Z',38,234,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(235,'2026-02-07T23:11:07.297Z',120,235,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(236,'2026-02-07T23:43:00.160Z',98,236,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(237,'2026-02-07T23:58:12.863Z',38,237,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(238,'2026-02-08T00:48:23.089Z',121,238,0,0,1,'We buy','cod','We buy',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(239,'2026-02-08T00:55:15.154Z',121,239,0,0,1,'Sorry that is cost is more expensive then market price','cod','Sorry that is cost is more expensive then market price',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(240,'2026-02-08T04:28:56.405Z',121,240,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(241,'2026-02-08T04:29:20.307Z',121,241,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(242,'2026-02-08T04:29:55.364Z',121,242,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(243,'2026-02-08T04:30:37.777Z',121,243,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(244,'2026-02-08T04:32:20.374Z',121,244,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(245,'2026-02-08T04:33:59.746Z',121,245,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(246,'2026-02-08T05:09:24.720Z',12,246,0,0,1,'J','cod',NULL,'J',1,'2026-02-08T23:17:27.385Z',NULL,1); +INSERT INTO order_status VALUES(247,'2026-02-09T01:52:55.524Z',2,247,0,0,1,'Demo for correct location ','cod','Demo for correct location ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(248,'2026-02-09T07:56:42.048Z',125,248,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(249,'2026-02-10T06:04:04.471Z',3,249,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(250,'2026-02-10T21:59:33.763Z',2,250,0,0,1,'Demo','cod',NULL,'Demo',1,'2026-02-10T22:00:06.670Z',NULL,1); +INSERT INTO order_status VALUES(251,'2026-02-11T16:13:20.142Z',115,251,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(252,'2026-02-11T16:13:20.142Z',115,252,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(253,'2026-02-11T16:13:20.142Z',115,253,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(254,'2026-02-14T01:01:13.769Z',114,254,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(255,'2026-02-15T00:00:53.358Z',120,255,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(256,'2026-02-16T01:21:48.050Z',2,256,0,0,1,'Demo','cod',NULL,'Demo',1,'2026-02-16T01:22:51.309Z',NULL,1); +INSERT INTO order_status VALUES(257,'2026-02-16T04:14:55.522Z',134,257,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(258,'2026-02-16T04:22:00.592Z',134,258,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(259,'2026-02-17T00:44:27.971Z',120,259,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(260,'2026-02-17T07:16:27.421Z',1,260,0,0,1,'D','cod',NULL,'D',1,'2026-02-18T06:14:42.228Z',NULL,1); +INSERT INTO order_status VALUES(261,'2026-02-17T07:30:07.521Z',136,261,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(262,'2026-02-17T07:45:43.734Z',136,262,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(263,'2026-02-17T07:52:41.197Z',3,263,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(264,'2026-02-17T19:47:31.551Z',141,264,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(265,'2026-02-17T22:56:42.974Z',143,265,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(266,'2026-02-17T23:04:14.592Z',143,266,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(267,'2026-02-17T23:27:35.908Z',130,267,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(268,'2026-02-18T00:28:16.181Z',132,268,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(269,'2026-02-18T01:34:08.441Z',119,269,0,0,1,'No response from customer','cod',NULL,'No response from customer',1,'2026-02-18T04:17:30.092Z',NULL,1); +INSERT INTO order_status VALUES(270,'2026-02-18T02:04:32.495Z',119,270,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(271,'2026-02-18T03:46:31.297Z',145,271,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(272,'2026-02-18T05:15:38.160Z',138,272,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(273,'2026-02-18T05:15:38.161Z',138,273,0,0,1,'Cancel order ','cod','Cancel order ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(274,'2026-02-18T05:15:59.580Z',147,274,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(275,'2026-02-18T06:53:25.416Z',24,275,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(276,'2026-02-18T07:16:24.911Z',82,276,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(277,'2026-02-18T07:31:33.186Z',148,277,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(278,'2026-02-18T23:12:20.428Z',38,278,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(279,'2026-02-19T00:00:57.733Z',156,279,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(280,'2026-02-19T01:04:09.663Z',99,280,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(281,'2026-02-19T01:57:57.613Z',82,281,0,0,1,'Its late','cod','Its late',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(282,'2026-02-19T01:59:43.093Z',82,282,0,0,1,'Its late','cod','Its late',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(283,'2026-02-19T02:16:07.844Z',66,283,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(284,'2026-02-19T03:09:55.456Z',120,284,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(285,'2026-02-19T03:40:51.549Z',159,285,0,0,1,'So late and slow service ','cod','So late and slow service ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(286,'2026-02-19T03:49:55.745Z',160,286,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(287,'2026-02-19T03:54:05.397Z',64,287,0,0,1,'N','cod',NULL,'N',1,'2026-02-19T04:40:17.239Z',NULL,1); +INSERT INTO order_status VALUES(288,'2026-02-19T03:54:05.397Z',64,288,0,0,1,'D','cod',NULL,'D',1,'2026-02-19T04:37:45.087Z',NULL,1); +INSERT INTO order_status VALUES(289,'2026-02-19T04:00:41.001Z',160,289,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(290,'2026-02-19T04:09:35.859Z',151,290,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(291,'2026-02-19T04:16:50.189Z',4,291,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(292,'2026-02-19T05:08:36.439Z',162,292,0,0,1,'No response from customer ','cod',NULL,'No response from customer ',1,'2026-02-19T07:22:49.182Z',NULL,1); +INSERT INTO order_status VALUES(293,'2026-02-19T05:08:36.736Z',162,293,0,0,1,'No response from customer ','cod',NULL,'No response from customer ',1,'2026-02-19T07:22:21.525Z',NULL,1); +INSERT INTO order_status VALUES(294,'2026-02-19T06:14:11.047Z',32,294,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(295,'2026-02-19T06:49:34.891Z',163,295,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(296,'2026-02-19T12:38:24.984Z',38,296,0,0,1,'I don''t walt this because I will buy on Sunday ','cod','I don''t walt this because I will buy on Sunday ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(297,'2026-02-19T15:48:55.517Z',82,297,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(298,'2026-02-20T01:39:04.912Z',66,298,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(299,'2026-02-20T02:41:56.608Z',66,299,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(300,'2026-02-20T03:24:43.556Z',140,300,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(301,'2026-02-20T03:37:43.245Z',169,301,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(302,'2026-02-20T03:59:51.171Z',170,302,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(303,'2026-02-20T04:04:04.909Z',170,303,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(304,'2026-02-20T04:47:12.538Z',132,304,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(305,'2026-02-20T06:02:01.579Z',176,305,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(306,'2026-02-20T06:41:12.043Z',99,306,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(307,'2026-02-20T07:21:21.906Z',163,307,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(308,'2026-02-20T07:41:37.350Z',74,308,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(309,'2026-02-20T09:08:15.335Z',115,309,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(310,'2026-02-20T13:06:33.249Z',38,310,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(311,'2026-02-20T22:50:10.927Z',184,311,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(312,'2026-02-21T03:19:33.169Z',81,312,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(313,'2026-02-21T03:33:25.012Z',24,313,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(314,'2026-02-21T03:45:19.764Z',186,314,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(315,'2026-02-21T04:36:43.124Z',160,315,0,0,1,'Double order','cod',NULL,'Double order',1,'2026-02-21T04:45:00.817Z',NULL,1); +INSERT INTO order_status VALUES(316,'2026-02-21T04:40:27.736Z',160,316,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(317,'2026-02-21T06:23:19.310Z',32,317,0,0,1,'I want to change my order','cod','I want to change my order',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(318,'2026-02-21T12:32:34.307Z',7,318,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(319,'2026-02-21T19:42:40.619Z',141,319,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(320,'2026-02-21T19:42:40.619Z',141,320,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(321,'2026-02-21T22:34:37.439Z',120,321,0,0,1,replace('Kheema\n','\n',char(10)),'cod',replace('Kheema\n','\n',char(10)),NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(322,'2026-02-21T22:53:17.760Z',193,322,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(323,'2026-02-21T23:09:55.795Z',132,323,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(324,'2026-02-21T23:38:18.540Z',130,324,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(325,'2026-02-22T00:16:21.567Z',194,325,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(326,'2026-02-22T01:08:52.833Z',198,326,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(327,'2026-02-22T01:13:15.958Z',184,327,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(328,'2026-02-22T01:13:15.958Z',184,328,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(329,'2026-02-22T03:46:06.235Z',205,329,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(330,'2026-02-22T04:21:41.707Z',206,330,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(331,'2026-02-22T04:39:37.484Z',208,331,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(332,'2026-02-22T14:05:39.863Z',50,332,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(333,'2026-02-23T03:21:16.555Z',151,333,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(334,'2026-02-23T03:47:30.738Z',223,334,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(335,'2026-02-23T04:40:46.728Z',224,335,0,0,1,'By mistake ','cod','By mistake ',NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(336,'2026-02-23T04:44:00.644Z',224,336,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(337,'2026-02-23T04:45:56.017Z',224,337,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(338,'2026-02-23T05:51:07.943Z',38,338,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(339,'2026-02-23T06:46:04.203Z',225,339,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(340,'2026-02-23T22:40:33.438Z',228,340,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(341,'2026-02-24T01:44:30.406Z',230,341,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(342,'2026-02-24T01:46:05.872Z',229,342,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(343,'2026-02-24T02:52:22.431Z',224,343,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(344,'2026-02-24T04:15:41.683Z',158,344,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(345,'2026-02-24T05:47:59.572Z',3,345,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(346,'2026-02-24T07:17:54.419Z',149,346,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(347,'2026-02-24T12:55:21.432Z',50,347,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(348,'2026-02-25T02:47:44.024Z',132,348,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(381,'2026-02-26T11:24:06.998Z',1,381,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(382,'2026-02-26T11:30:33.419Z',1,382,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(383,'2026-02-26T11:34:03.543Z',1,383,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(384,'2026-02-26T11:36:20.560Z',1,384,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(385,'2026-03-09T10:16:59.219Z',1,385,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO order_status VALUES(386,'2026-03-26T01:19:29.108Z',1,386,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +CREATE TABLE IF NOT EXISTS "orders" ("id" INTEGER NOT NULL, "user_id" INTEGER NOT NULL, "address_id" INTEGER NOT NULL, "slot_id" INTEGER, "total_amount" REAL NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "is_cod" INTEGER NOT NULL DEFAULT false, "is_online_payment" INTEGER NOT NULL DEFAULT false, "payment_info_id" INTEGER, "readable_id" INTEGER NOT NULL, "admin_notes" TEXT, "user_notes" TEXT, "delivery_charge" REAL NOT NULL DEFAULT '0', "order_group_id" TEXT, "order_group_proportion" REAL, "is_flash_delivery" INTEGER NOT NULL DEFAULT false); +INSERT INTO orders VALUES(1,3,1,1,44.0,'2025-11-19T09:21:36.005Z',0,1,1,1,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(2,1,17,1,220.0,'2025-11-19T09:38:30.002Z',0,1,2,2,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(3,1,17,1,220.0,'2025-11-19T11:46:20.300Z',0,1,3,3,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(4,1,17,1,430.0,'2025-11-19T11:47:33.139Z',0,1,4,4,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(5,1,17,1,700.0,'2025-11-19T11:57:48.269Z',0,1,5,5,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(6,1,17,1,22.0,'2025-11-19T12:13:52.466Z',0,1,6,6,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(7,1,17,1,22.0,'2025-11-19T12:15:06.264Z',0,1,7,7,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(8,1,17,1,22.0,'2025-11-19T12:18:02.760Z',0,1,8,8,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(9,1,17,1,500.0,'2025-11-19T12:23:19.913Z',0,1,9,9,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(10,1,17,1,500.0,'2025-11-19T12:24:04.853Z',1,0,NULL,10,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(11,1,17,1,44.0,'2025-11-19T12:32:19.093Z',0,1,10,11,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(12,1,19,1,220.0,'2025-11-19T12:34:24.892Z',0,1,11,12,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(13,1,17,1,22.0,'2025-11-19T12:36:42.741Z',0,1,12,13,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(14,1,19,1,210.0,'2025-11-19T12:39:28.501Z',0,1,13,14,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(15,1,19,1,700.0,'2025-11-20T13:57:28.656Z',0,1,14,15,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(16,1,17,1,700.0,'2025-11-20T13:58:25.443Z',0,1,15,16,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(17,1,17,1,210.0,'2025-11-20T13:59:33.401Z',0,1,16,17,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(18,1,17,2,840.0,'2025-11-22T06:22:17.202Z',1,0,NULL,18,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(19,2,20,3,530.0,'2025-11-22T22:47:06.288Z',0,1,17,19,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(20,2,20,3,530.0,'2025-11-22T22:47:51.311Z',1,0,NULL,20,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(21,1,17,2,722.0,'2025-11-23T06:17:57.049Z',0,1,18,21,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(22,3,1,2,220.0,'2025-11-24T05:57:28.143Z',1,0,NULL,22,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(23,3,1,2,220.0,'2025-11-24T05:57:47.787Z',0,1,19,23,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(24,2,20,2,600.0,'2025-11-25T00:59:10.926Z',1,0,NULL,24,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(25,1,17,2,4560.0,'2025-11-25T05:22:32.946Z',0,1,20,25,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(26,1,19,4,9702.3999999999990251,'2025-11-27T06:03:25.875Z',0,1,21,26,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(27,1,19,4,9360.0,'2025-11-28T05:42:30.513Z',1,0,NULL,27,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(28,1,17,4,185.59999999999998721,'2025-11-28T08:13:28.023Z',1,0,NULL,28,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(29,1,17,2,700.0,'2025-11-28T13:35:07.141Z',1,0,NULL,29,NULL,'Fresh and no wastage ',0.0,NULL,NULL,0); +INSERT INTO orders VALUES(30,1,19,4,1870.0,'2025-11-28T22:21:06.630Z',0,1,22,30,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(31,1,19,4,1870.0,'2025-11-28T22:24:57.085Z',0,1,23,31,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(32,1,19,4,1496.0,'2025-11-28T22:34:41.736Z',0,1,24,32,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(33,1,19,4,560.0,'2025-11-28T22:36:50.767Z',0,1,25,33,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(34,1,19,4,1496.0,'2025-11-28T22:52:17.319Z',1,0,NULL,34,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(35,1,19,4,1120.0,'2025-11-28T22:58:18.465Z',0,1,26,35,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(36,1,19,4,2310.0,'2025-11-28T23:08:27.789Z',1,0,NULL,36,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(37,1,19,4,2310.0,'2025-11-28T23:09:42.893Z',0,1,27,37,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(38,1,19,4,1620.0,'2025-11-28T23:11:19.776Z',0,1,28,38,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(39,1,19,4,1320.0,'2025-11-28T23:17:00.716Z',1,0,NULL,39,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(40,1,19,4,1320.0,'2025-11-28T23:17:55.763Z',0,1,29,40,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(41,1,19,4,1320.0,'2025-11-28T23:22:23.472Z',0,1,30,41,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(42,1,19,4,376.0,'2025-11-28T23:23:26.081Z',0,1,31,42,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(43,1,19,4,1464.0,'2025-11-28T23:31:53.995Z',0,1,32,43,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(44,1,19,4,1464.0,'2025-11-28T23:33:25.999Z',0,1,33,44,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(45,1,19,4,1496.0,'2025-11-28T23:35:17.386Z',0,1,34,45,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(46,1,19,4,6904.0,'2025-11-28T23:42:33.188Z',0,1,35,46,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(47,1,19,4,752.0,'2025-11-29T00:35:31.578Z',0,1,36,47,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(48,1,19,4,1122.0,'2025-11-29T00:47:37.657Z',0,1,37,48,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(49,1,19,4,3156.0,'2025-11-29T00:51:57.402Z',0,1,38,49,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(50,1,19,4,4686.0,'2025-11-29T01:06:18.087Z',0,1,39,50,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(51,1,17,4,250.0,'2025-11-29T01:40:22.677Z',0,1,40,51,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(52,1,17,4,250.0,'2025-11-29T01:51:02.498Z',0,1,41,52,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(53,1,17,4,400.0,'2025-11-29T01:57:47.891Z',0,1,42,53,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(54,1,19,4,2850.0,'2025-11-29T03:01:07.992Z',0,1,43,54,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(55,2,20,5,1710.0,'2025-12-04T23:32:41.242Z',1,0,NULL,55,NULL,'Good packaging',0.0,NULL,NULL,0); +INSERT INTO orders VALUES(56,4,21,6,64.0,'2025-12-10T10:02:38.859Z',0,1,44,56,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(57,4,22,6,72.0,'2025-12-10T10:04:32.211Z',0,1,45,57,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(58,1,19,7,6900.0,'2025-12-13T11:19:59.242Z',1,0,NULL,58,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(59,1,19,7,210.0,'2025-12-13T11:23:12.720Z',1,0,NULL,60,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(60,1,19,9,350.0,'2025-12-13T11:23:12.720Z',1,0,NULL,61,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(61,1,19,7,210.0,'2025-12-13T11:24:58.073Z',1,0,NULL,63,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(62,1,19,9,700.0,'2025-12-13T11:24:58.073Z',1,0,NULL,64,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(63,1,19,7,1120.0,'2025-12-13T11:30:04.358Z',0,1,46,66,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(64,1,19,7,420.0,'2025-12-13T11:31:12.284Z',0,1,47,68,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(65,1,19,9,700.0,'2025-12-13T11:31:12.284Z',0,1,47,69,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(66,1,17,9,560.0,'2025-12-15T09:42:52.294Z',1,0,NULL,71,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(67,1,17,8,660.0,'2025-12-15T09:46:00.443Z',1,0,NULL,73,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(68,1,17,9,660.0,'2025-12-15T09:57:50.680Z',1,0,NULL,75,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(69,2,20,8,1400.0,'2025-12-18T04:55:00.617Z',1,0,NULL,77,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(70,15,25,8,50.0,'2025-12-19T01:02:15.969Z',1,0,NULL,79,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(71,17,26,8,1642.0,'2025-12-19T03:02:11.838Z',1,0,NULL,81,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(72,17,26,8,50.0,'2025-12-19T03:07:12.056Z',1,0,NULL,83,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(73,17,26,8,216.0,'2025-12-19T03:40:04.180Z',1,0,NULL,85,NULL,'Hello',0.0,NULL,NULL,0); +INSERT INTO orders VALUES(74,17,28,8,1500.0,'2025-12-19T03:46:32.062Z',1,0,NULL,87,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(75,17,28,8,21000.0,'2025-12-19T03:55:08.427Z',1,0,NULL,89,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(76,17,28,8,250.0,'2025-12-19T03:57:05.639Z',1,0,NULL,91,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(77,17,28,8,22.0,'2025-12-19T04:02:06.098Z',1,0,NULL,93,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(78,15,25,8,1400.0,'2025-12-19T07:02:11.424Z',1,0,NULL,95,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(79,15,24,12,300.0,'2025-12-19T07:53:09.910Z',1,0,NULL,97,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(80,17,28,8,1400.0,'2025-12-19T09:10:25.557Z',1,0,NULL,99,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(81,17,28,8,72.0,'2025-12-19T09:49:01.904Z',1,0,NULL,101,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(82,17,28,13,22.0,'2025-12-19T09:55:53.524Z',1,0,NULL,103,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(83,17,26,8,72.0,'2025-12-19T10:37:21.739Z',1,0,NULL,105,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(84,17,26,8,72.0,'2025-12-19T10:46:56.208Z',1,0,NULL,107,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(85,17,26,8,50.0,'2025-12-19T11:01:02.225Z',1,0,NULL,109,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(86,17,26,9,120.0,'2025-12-19T11:26:56.607Z',1,0,NULL,111,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(87,17,26,8,72.0,'2025-12-19T11:38:46.198Z',1,0,NULL,113,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(88,17,26,8,22.0,'2025-12-20T05:46:31.197Z',1,0,NULL,115,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(89,1,17,8,2940.0,'2025-12-20T15:09:16.076Z',1,0,NULL,117,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(90,17,26,8,64.0,'2025-12-20T21:38:45.891Z',1,0,NULL,119,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(91,17,26,10,60.0,'2025-12-20T21:39:35.232Z',1,0,NULL,121,NULL,'Fff',20.0,NULL,NULL,0); +INSERT INTO orders VALUES(92,15,25,8,42.0,'2025-12-22T05:12:52.301Z',1,0,NULL,123,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(93,15,25,12,220.0,'2025-12-22T05:22:59.518Z',1,0,NULL,125,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(94,15,25,17,140.0,'2025-12-22T08:12:49.911Z',1,0,NULL,127,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(95,15,25,8,152.0,'2025-12-22T08:40:14.765Z',1,0,NULL,129,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(96,20,30,8,70.0,'2025-12-22T09:05:51.054Z',1,0,NULL,131,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(97,2,20,10,220.0,'2025-12-23T00:47:34.830Z',1,0,NULL,133,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(98,2,20,8,44.0,'2025-12-23T00:47:34.830Z',1,0,NULL,134,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(99,2,20,8,1400.0,'2025-12-23T00:50:21.885Z',1,0,NULL,136,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(100,15,24,16,1000.0,'2025-12-23T08:23:28.094Z',1,0,NULL,138,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(101,17,26,8,42.0,'2025-12-23T11:45:50.591Z',1,0,NULL,140,NULL,'Hello',20.0,NULL,NULL,0); +INSERT INTO orders VALUES(102,17,26,8,92.0,'2025-12-23T11:49:14.841Z',1,0,NULL,142,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(103,22,31,16,120.0,'2025-12-23T21:09:04.114Z',1,0,NULL,144,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(104,22,31,8,2736.0,'2025-12-23T21:20:33.284Z',1,0,NULL,146,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(105,22,31,9,7700.0,'2025-12-23T21:20:33.284Z',1,0,NULL,147,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(106,15,24,8,92.0,'2025-12-24T05:02:01.957Z',1,0,NULL,149,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(107,15,24,17,140.0,'2025-12-24T05:02:01.957Z',1,0,NULL,150,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(108,15,24,10,100.0,'2025-12-24T05:02:01.957Z',1,0,NULL,151,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(109,15,24,16,120.0,'2025-12-24T05:02:01.957Z',1,0,NULL,152,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(110,1,17,16,64.0,'2025-12-25T07:48:48.478Z',1,0,NULL,154,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(111,1,17,16,444.0,'2025-12-25T10:06:02.108Z',1,0,NULL,156,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(112,1,17,18,20.0,'2025-12-25T10:06:02.108Z',1,0,NULL,157,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(113,1,17,16,350.0,'2025-12-25T10:32:45.526Z',1,0,NULL,159,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(114,16,32,16,92.0,'2025-12-26T19:38:17.686Z',1,0,NULL,161,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(115,1,17,16,236.0,'2025-12-26T23:02:15.299Z',1,0,NULL,163,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(116,1,17,18,560.0,'2025-12-26T23:02:15.299Z',1,0,NULL,164,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(117,2,20,16,128.41999999999997861,'2025-12-27T12:09:01.944Z',1,0,NULL,166,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(118,2,20,18,112.15999999999999303,'2025-12-27T12:09:01.944Z',1,0,NULL,167,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(119,2,20,17,65.419999999999998152,'2025-12-27T12:09:01.944Z',1,0,NULL,168,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(120,2,20,19,590.0,'2025-12-28T08:37:33.787Z',1,0,NULL,170,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(121,2,20,19,420.0,'2025-12-28T08:41:24.904Z',1,0,NULL,172,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(122,1,17,16,1614.0,'2025-12-28T22:17:14.213Z',1,0,NULL,174,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(123,2,20,20,485.0,'2026-01-01T03:08:22.110Z',1,0,NULL,176,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(124,2,20,20,230.0,'2026-01-01T03:09:11.420Z',1,0,NULL,178,NULL,NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(125,2,20,21,551.58000000000004803,'2026-01-01T03:14:07.865Z',1,0,NULL,180,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(126,2,20,20,252.0,'2026-01-01T05:09:15.780Z',1,0,NULL,182,'Beside RR downtown in Yenugonda. around 1km away from the main road. ',NULL,20.0,NULL,NULL,0); +INSERT INTO orders VALUES(127,2,20,20,1130.0,'2026-01-01T06:40:15.182Z',1,0,NULL,184,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(128,26,34,20,420.0,'2026-01-03T02:42:48.013Z',1,0,NULL,186,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(129,2,20,20,1390.0,'2026-01-04T07:35:41.022Z',1,0,NULL,188,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(130,12,33,20,230.0,'2026-01-04T07:37:44.994Z',1,0,NULL,190,NULL,'Beside alo tower',20.0,NULL,NULL,0); +INSERT INTO orders VALUES(131,21,35,20,340.0,'2026-01-04T13:20:00.136Z',1,0,NULL,192,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(132,1,17,22,2790.0,'2026-01-06T07:21:22.047Z',1,0,NULL,194,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(133,30,36,22,780.0,'2026-01-06T07:45:52.275Z',1,0,NULL,196,NULL,NULL,0.0,NULL,NULL,0); +INSERT INTO orders VALUES(134,21,35,22,2644.0,'2026-01-06T11:13:08.862Z',1,0,NULL,198,NULL,NULL,0.0,'1767717788828-21',1.0,0); +INSERT INTO orders VALUES(135,22,31,22,1700.0,'2026-01-07T09:32:56.404Z',1,0,NULL,200,NULL,NULL,0.0,'1767798176399-22',1.0,0); +INSERT INTO orders VALUES(136,22,31,22,1020.0,'2026-01-07T10:17:55.795Z',1,0,NULL,202,NULL,NULL,0.0,'1767800875792-22',1.0,0); +INSERT INTO orders VALUES(137,22,31,22,600.0,'2026-01-07T10:22:37.964Z',1,0,NULL,204,NULL,replace('Please call to my brother after reaching home.\nNumber is abcd8688y777','\n',char(10)),0.0,'1767801157960-22',1.0,0); +INSERT INTO orders VALUES(138,2,20,22,660.0,'2026-01-07T18:03:50.419Z',1,0,NULL,206,NULL,NULL,0.0,'1767828830413-2',1.0,0); +INSERT INTO orders VALUES(139,2,20,23,780.0,'2026-01-12T08:37:09.285Z',1,0,NULL,208,NULL,NULL,0.0,'1768226829276-2',1.0,0); +INSERT INTO orders VALUES(140,1,17,NULL,660.0,'2026-01-13T03:57:08.501Z',1,0,NULL,210,NULL,NULL,0.0,'1768296428205-1',1.0,1); +INSERT INTO orders VALUES(141,1,17,NULL,660.0,'2026-01-13T04:16:11.800Z',1,0,NULL,212,NULL,NULL,0.0,'1768297571530-1',1.0,1); +INSERT INTO orders VALUES(142,34,38,23,24.0,'2026-01-13T09:26:55.340Z',1,0,NULL,214,NULL,NULL,20.0,'1768316215336-34',1.0,0); +INSERT INTO orders VALUES(143,1,17,NULL,780.0,'2026-01-14T13:37:20.272Z',1,0,NULL,1,NULL,NULL,0.0,'1768417639897-1',1.0,1); +INSERT INTO orders VALUES(144,1,17,NULL,780.0,'2026-01-14T13:40:52.673Z',1,0,NULL,3,NULL,NULL,0.0,'1768417852308-1',1.0,1); +INSERT INTO orders VALUES(145,1,17,NULL,900.0,'2026-01-14T13:43:51.004Z',1,0,NULL,5,NULL,NULL,0.0,'1768418030542-1',1.0,1); +INSERT INTO orders VALUES(146,1,17,NULL,900.0,'2026-01-14T13:46:29.183Z',1,0,NULL,7,NULL,NULL,0.0,'1768418188748-1',1.0,1); +INSERT INTO orders VALUES(147,1,17,NULL,1020.0,'2026-01-14T13:48:47.459Z',1,0,NULL,9,NULL,NULL,0.0,'1768418327051-1',1.0,1); +INSERT INTO orders VALUES(148,1,17,23,2398.0,'2026-01-14T14:18:23.106Z',1,0,NULL,11,NULL,NULL,0.0,'1768420102803-1',1.0,0); +INSERT INTO orders VALUES(149,2,20,23,258.46000000000000085,'2026-01-15T10:38:51.399Z',1,0,NULL,13,NULL,NULL,0.0,'1768493331389-2',0.43079999999999998294,0); +INSERT INTO orders VALUES(150,2,20,31,341.53999999999999914,'2026-01-15T10:38:51.399Z',1,0,NULL,14,NULL,NULL,0.0,'1768493331389-2',0.56920000000000001705,0); +INSERT INTO orders VALUES(151,2,20,23,590.0,'2026-01-16T07:20:20.462Z',1,0,NULL,16,NULL,NULL,0.0,'1768567820452-2',1.0,0); +INSERT INTO orders VALUES(152,2,20,23,689.0,'2026-01-16T07:20:39.316Z',1,0,NULL,18,NULL,NULL,0.0,'1768567839309-2',1.0,0); +INSERT INTO orders VALUES(153,2,20,23,630.0,'2026-01-16T07:21:00.354Z',1,0,NULL,20,NULL,NULL,0.0,'1768567860348-2',1.0,0); +INSERT INTO orders VALUES(154,2,20,23,500.0,'2026-01-16T07:21:27.051Z',1,0,NULL,22,NULL,NULL,0.0,'1768567887044-2',1.0,0); +INSERT INTO orders VALUES(155,2,20,23,689.0,'2026-01-16T07:22:32.758Z',1,0,NULL,24,NULL,NULL,0.0,'1768567952750-2',1.0,0); +INSERT INTO orders VALUES(156,2,20,NULL,500.0,'2026-01-16T23:21:39.925Z',1,0,NULL,26,NULL,NULL,0.0,'1768625499917-2',1.0,1); +INSERT INTO orders VALUES(157,22,31,23,75.0,'2026-01-18T00:56:50.633Z',1,0,NULL,28,NULL,NULL,20.0,'1768717610629-22',1.0,0); +INSERT INTO orders VALUES(158,2,20,23,1534.0,'2026-01-18T03:02:03.729Z',1,0,NULL,30,NULL,NULL,0.0,'1768725123718-2',1.0,0); +INSERT INTO orders VALUES(159,22,37,23,1232.0,'2026-01-18T09:53:08.648Z',1,0,NULL,32,'Nothing just getting',NULL,0.0,'1768749788638-22',1.0,0); +INSERT INTO orders VALUES(160,22,31,23,132.0,'2026-01-18T10:14:06.341Z',1,0,NULL,34,'Testing admin notes','Call on 9199osisbushn',20.0,'1768751046336-22',1.0,0); +INSERT INTO orders VALUES(161,22,31,23,308.0,'2026-01-18T10:20:14.848Z',1,0,NULL,36,NULL,NULL,0.0,'1768751414843-22',1.0,0); +INSERT INTO orders VALUES(162,22,40,23,176.0,'2026-01-18T10:24:09.003Z',1,0,NULL,38,NULL,replace('Instructions no limit max limit low limit ui ux \nInstructions no limit max limit low limit ui ux \n\nInstructions no limit max limit low limit ui ux ','\n',char(10)),20.0,'1768751648997-22',1.0,0); +INSERT INTO orders VALUES(163,22,37,23,1743.0,'2026-01-18T21:46:46.398Z',1,0,NULL,40,NULL,NULL,0.0,'1768792606394-22',1.0,0); +INSERT INTO orders VALUES(164,1,17,23,304.0,'2026-01-19T14:17:52.639Z',1,0,NULL,42,NULL,NULL,0.0,'1768852072633-1',1.0,0); +INSERT INTO orders VALUES(165,2,20,40,820.0,'2026-01-23T03:22:03.840Z',1,0,NULL,44,NULL,NULL,0.0,'1769158323836-2',1.0,0); +INSERT INTO orders VALUES(166,25,43,35,49.0,'2026-01-23T10:37:42.952Z',1,0,NULL,46,NULL,NULL,20.0,'1769184462944-25',1.0,0); +INSERT INTO orders VALUES(167,2,20,39,643.0,'2026-01-24T02:56:06.720Z',1,0,NULL,48,NULL,NULL,0.0,'1769243166713-2',1.0,0); +INSERT INTO orders VALUES(168,1,17,39,2612.0,'2026-01-24T14:56:52.645Z',1,0,NULL,50,NULL,NULL,0.0,'1769286412630-1',1.0,0); +INSERT INTO orders VALUES(169,22,40,39,87.0,'2026-01-24T20:44:03.566Z',1,0,NULL,52,NULL,NULL,20.0,'1769307243555-22',1.0,0); +INSERT INTO orders VALUES(170,29,51,45,146.0,'2026-01-25T23:35:31.364Z',1,0,NULL,54,NULL,NULL,20.0,'1769403931353-29',1.0,0); +INSERT INTO orders VALUES(171,64,55,39,429.0,'2026-01-27T06:44:08.218Z',1,0,NULL,56,NULL,NULL,0.0,'1769516048207-64',1.0,0); +INSERT INTO orders VALUES(172,65,56,50,81.0,'2026-01-27T11:29:12.321Z',1,0,NULL,58,NULL,NULL,20.0,'1769533152305-65',0.64800000000000004263,0); +INSERT INTO orders VALUES(173,65,56,51,44.0,'2026-01-27T11:29:12.321Z',1,0,NULL,59,NULL,NULL,0.0,'1769533152305-65',0.35199999999999995736,0); +INSERT INTO orders VALUES(174,60,54,53,178.0,'2026-01-28T00:03:00.256Z',1,0,NULL,61,NULL,NULL,20.0,'1769578380246-60',1.0,0); +INSERT INTO orders VALUES(175,1,17,54,27.0,'2026-01-28T00:38:05.827Z',1,0,NULL,63,NULL,NULL,20.0,'1769580485819-1',0.1125,0); +INSERT INTO orders VALUES(176,1,17,53,213.0,'2026-01-28T00:38:05.827Z',1,0,NULL,64,NULL,NULL,0.0,'1769580485819-1',0.8875,0); +INSERT INTO orders VALUES(177,22,40,54,158.0,'2026-01-28T01:51:10.288Z',1,0,NULL,66,NULL,NULL,20.0,'1769584870283-22',0.76330000000000000071,0); +INSERT INTO orders VALUES(178,22,40,39,49.0,'2026-01-28T01:51:10.288Z',1,0,NULL,67,NULL,NULL,0.0,'1769584870283-22',0.23669999999999999928,0); +INSERT INTO orders VALUES(179,58,60,39,146.0,'2026-01-28T10:40:36.187Z',1,0,NULL,69,NULL,NULL,20.0,'1769616636177-58',1.0,0); +INSERT INTO orders VALUES(180,38,66,58,104.0,'2026-01-29T22:42:25.446Z',1,0,NULL,71,NULL,'Hi I''m inzamam come slowly ',20.0,'1769746345431-38',1.0,0); +INSERT INTO orders VALUES(181,1,17,59,17.0,'2026-01-30T00:31:02.610Z',1,0,NULL,73,NULL,NULL,10.0,'1769752862605-1',1.0,0); +INSERT INTO orders VALUES(182,38,66,59,49.0,'2026-01-30T00:46:59.261Z',1,0,NULL,75,NULL,NULL,10.0,'1769753819256-38',1.0,0); +INSERT INTO orders VALUES(183,1,17,60,42.0,'2026-01-30T01:42:25.118Z',1,0,NULL,77,NULL,NULL,10.0,'1769757144875-1',1.0,0); +INSERT INTO orders VALUES(184,38,66,60,179.0,'2026-01-30T03:13:07.360Z',1,0,NULL,79,NULL,NULL,0.0,'1769762587355-38',1.0,0); +INSERT INTO orders VALUES(185,54,57,66,77.0,'2026-01-31T01:44:10.735Z',1,0,NULL,81,NULL,'I needed it quickly',10.0,'1769843650726-54',1.0,0); +INSERT INTO orders VALUES(186,54,57,66,307.0,'2026-01-31T01:44:48.105Z',1,0,NULL,83,NULL,NULL,0.0,'1769843688098-54',1.0,0); +INSERT INTO orders VALUES(187,78,70,66,64.0,'2026-01-31T04:25:19.495Z',1,0,NULL,85,NULL,NULL,10.0,'1769853319488-78',1.0,0); +INSERT INTO orders VALUES(188,1,17,66,296.0,'2026-01-31T05:26:01.981Z',1,0,NULL,87,NULL,NULL,0.0,'1769856961704-1',1.0,0); +INSERT INTO orders VALUES(189,1,17,66,292.0,'2026-01-31T06:32:04.589Z',1,0,NULL,89,NULL,NULL,0.0,'1769860924583-1',1.0,0); +INSERT INTO orders VALUES(190,1,17,70,27.0,'2026-01-31T22:04:46.197Z',1,0,NULL,91,NULL,NULL,10.0,'1769916886192-1',1.0,0); +INSERT INTO orders VALUES(191,7,71,72,243.0,'2026-02-01T00:28:05.843Z',1,0,NULL,93,NULL,replace(' Half chest and half leg \n Pura chest piece ich mat lao bhai ....','\n',char(10)),0.0,'1769925485827-7',1.0,0); +INSERT INTO orders VALUES(192,74,73,72,420.0,'2026-02-01T01:31:50.642Z',1,0,NULL,95,NULL,NULL,0.0,'1769929310636-74',1.0,0); +INSERT INTO orders VALUES(193,74,73,72,269.0,'2026-02-01T01:56:14.147Z',1,0,NULL,97,NULL,NULL,0.0,'1769930774143-74',1.0,0); +INSERT INTO orders VALUES(194,38,66,71,999.0,'2026-02-01T02:19:04.918Z',1,0,NULL,99,NULL,NULL,0.0,'1769932144902-38',1.0,0); +INSERT INTO orders VALUES(195,22,50,71,119.0,'2026-02-01T03:22:19.400Z',1,0,NULL,101,NULL,NULL,10.0,'1769935939395-22',1.0,0); +INSERT INTO orders VALUES(196,82,72,72,179.0,'2026-02-01T04:41:15.161Z',1,0,NULL,103,NULL,NULL,0.0,'1769940675157-82',1.0,0); +INSERT INTO orders VALUES(197,82,72,72,448.0,'2026-02-01T04:46:41.872Z',1,0,NULL,105,NULL,NULL,0.0,'1769941001866-82',1.0,0); +INSERT INTO orders VALUES(202,88,83,76,135.0,'2026-02-01T10:07:16.233Z',1,0,NULL,115,NULL,NULL,0.0,'1769960236219-88',1.0,0); +INSERT INTO orders VALUES(203,92,86,79,49.0,'2026-02-02T04:53:54.970Z',1,0,NULL,117,NULL,NULL,10.0,'1770027834964-92',1.0,0); +INSERT INTO orders VALUES(204,38,66,79,79.0,'2026-02-02T06:48:31.456Z',1,0,NULL,119,NULL,NULL,10.0,'1770034711451-38',1.0,0); +INSERT INTO orders VALUES(205,38,66,79,79.0,'2026-02-02T06:50:24.727Z',1,0,NULL,121,NULL,NULL,10.0,'1770034824717-38',1.0,0); +INSERT INTO orders VALUES(206,7,71,83,770.0,'2026-02-02T08:27:54.149Z',1,0,NULL,123,NULL,NULL,0.0,'1770040674142-7',1.0,0); +INSERT INTO orders VALUES(207,1,17,81,369.0,'2026-02-02T09:01:16.193Z',1,0,NULL,125,NULL,NULL,0.0,'1770042676188-1',1.0,0); +INSERT INTO orders VALUES(208,1,17,81,378.0,'2026-02-02T12:53:25.021Z',1,0,NULL,127,NULL,NULL,0.0,'1770056605014-1',1.0,0); +INSERT INTO orders VALUES(209,38,66,83,412.19999999999998863,'2026-02-02T22:40:01.666Z',1,0,NULL,129,NULL,NULL,0.0,'1770091801642-38',1.0,0); +INSERT INTO orders VALUES(210,98,91,84,210.0,'2026-02-03T00:26:45.500Z',1,0,NULL,131,NULL,NULL,0.0,'1770098205495-98',1.0,0); +INSERT INTO orders VALUES(211,98,91,84,94.0,'2026-02-03T00:28:30.230Z',1,0,NULL,133,NULL,NULL,10.0,'1770098310221-98',1.0,0); +INSERT INTO orders VALUES(212,24,92,87,419.0,'2026-02-03T03:11:48.475Z',1,0,NULL,135,NULL,NULL,0.0,'1770108108470-24',1.0,0); +INSERT INTO orders VALUES(213,46,93,86,88.0,'2026-02-03T07:33:13.302Z',1,0,NULL,137,NULL,replace('Gol masjid Sr garden \n1flore\n','\n',char(10)),10.0,'1770123793291-46',1.0,0); +INSERT INTO orders VALUES(214,38,66,88,98.0,'2026-02-03T08:40:49.538Z',1,0,NULL,139,NULL,NULL,10.0,'1770127849534-38',1.0,0); +INSERT INTO orders VALUES(215,38,66,89,248.39999999999999857,'2026-02-03T08:43:00.789Z',1,0,NULL,141,NULL,NULL,0.0,'1770127980775-38',1.0,0); +INSERT INTO orders VALUES(216,81,94,88,386.0,'2026-02-03T10:16:16.915Z',1,0,NULL,143,NULL,NULL,0.0,'1770133576898-81',1.0,0); +INSERT INTO orders VALUES(217,96,95,92,301.50000000000001243,'2026-02-04T01:36:25.133Z',1,0,NULL,145,NULL,NULL,0.0,'1770188785117-96',1.0,0); +INSERT INTO orders VALUES(218,81,94,92,401.39999999999993463,'2026-02-04T02:41:07.508Z',1,0,NULL,147,NULL,NULL,0.0,'1770192667485-81',1.0,0); +INSERT INTO orders VALUES(219,1,17,94,109.0,'2026-02-04T07:47:53.067Z',1,0,NULL,149,NULL,NULL,10.0,'1770211073063-1',1.0,0); +INSERT INTO orders VALUES(220,103,96,99,158.0,'2026-02-05T03:15:53.554Z',1,0,NULL,151,NULL,NULL,0.0,'1770281153546-103',1.0,0); +INSERT INTO orders VALUES(221,24,92,100,235.80000000000000959,'2026-02-05T04:00:30.739Z',1,0,NULL,153,NULL,NULL,0.0,'1770283830726-24',1.0,0); +INSERT INTO orders VALUES(222,114,103,106,97.0,'2026-02-06T05:49:57.315Z',1,0,NULL,155,NULL,NULL,10.0,'1770376797308-114',1.0,0); +INSERT INTO orders VALUES(223,1,17,106,97.0,'2026-02-06T06:21:43.659Z',1,0,NULL,157,NULL,NULL,10.0,'1770378703652-1',1.0,0); +INSERT INTO orders VALUES(224,71,104,106,149.0,'2026-02-06T06:25:36.038Z',1,0,NULL,159,NULL,NULL,0.0,'1770378936033-71',1.0,0); +INSERT INTO orders VALUES(225,1,17,111,108.0,'2026-02-06T08:53:10.229Z',1,0,NULL,-1,NULL,NULL,10.0,'1770387790223-1',1.0,0); +INSERT INTO orders VALUES(226,115,105,113,110.74999999999999289,'2026-02-06T10:26:39.531Z',1,0,NULL,-1,NULL,NULL,0.0,'1770393399507-115',0.24500000000000001776,0); +INSERT INTO orders VALUES(227,115,105,112,341.25000000000000888,'2026-02-06T10:26:39.531Z',1,0,NULL,-1,NULL,NULL,0.0,'1770393399507-115',0.75499999999999998223,0); +INSERT INTO orders VALUES(228,115,105,113,180.0,'2026-02-06T16:16:47.346Z',1,0,NULL,-1,NULL,NULL,0.0,'1770414407330-115',1.0,0); +INSERT INTO orders VALUES(229,109,101,111,127.0,'2026-02-06T23:01:13.646Z',1,0,NULL,-1,NULL,NULL,0.0,'1770438673632-109',1.0,0); +INSERT INTO orders VALUES(230,103,96,111,167.40000000000001989,'2026-02-06T23:28:37.545Z',1,0,NULL,-1,NULL,NULL,0.0,'1770440317529-103',1.0,0); +INSERT INTO orders VALUES(231,103,96,111,213.30000000000000071,'2026-02-06T23:36:55.424Z',1,0,NULL,-1,NULL,NULL,0.0,'1770440815414-103',1.0,0); +INSERT INTO orders VALUES(232,119,107,115,219.0,'2026-02-07T07:06:17.096Z',1,0,NULL,-1,NULL,NULL,0.0,'1770467777091-119',1.0,0); +INSERT INTO orders VALUES(233,38,66,115,219.0,'2026-02-07T07:24:42.810Z',1,0,NULL,-1,NULL,NULL,0.0,'1770468882806-38',1.0,0); +INSERT INTO orders VALUES(234,38,66,115,219.0,'2026-02-07T07:25:52.698Z',1,0,NULL,-1,NULL,NULL,0.0,'1770468952694-38',1.0,0); +INSERT INTO orders VALUES(235,120,108,118,377.10000000000003517,'2026-02-07T23:11:07.297Z',1,0,NULL,-1,NULL,NULL,0.0,'1770525667289-120',1.0,0); +INSERT INTO orders VALUES(236,98,91,118,149.0,'2026-02-07T23:43:00.160Z',1,0,NULL,-1,NULL,NULL,10.0,'1770527580152-98',1.0,0); +INSERT INTO orders VALUES(237,38,66,118,148.0,'2026-02-07T23:58:12.863Z',1,0,NULL,-1,NULL,NULL,10.0,'1770528492859-38',1.0,0); +INSERT INTO orders VALUES(238,121,109,119,106.0,'2026-02-08T00:48:23.089Z',1,0,NULL,-1,NULL,NULL,10.0,'1770531503085-121',1.0,0); +INSERT INTO orders VALUES(239,121,109,119,106.0,'2026-02-08T00:55:15.154Z',1,0,NULL,-1,NULL,NULL,10.0,'1770531915149-121',1.0,0); +INSERT INTO orders VALUES(240,121,109,NULL,170.0,'2026-02-08T04:28:56.405Z',1,0,NULL,-1,NULL,NULL,10.0,'1770544736398-121',1.0,1); +INSERT INTO orders VALUES(241,121,109,NULL,170.0,'2026-02-08T04:29:20.307Z',1,0,NULL,-1,NULL,NULL,10.0,'1770544760296-121',1.0,1); +INSERT INTO orders VALUES(242,121,109,121,37.0,'2026-02-08T04:29:55.364Z',1,0,NULL,-1,NULL,NULL,10.0,'1770544795359-121',1.0,0); +INSERT INTO orders VALUES(243,121,109,NULL,60.0,'2026-02-08T04:30:37.777Z',1,0,NULL,-1,NULL,NULL,10.0,'1770544837770-121',1.0,1); +INSERT INTO orders VALUES(244,121,109,121,389.0,'2026-02-08T04:32:20.374Z',1,0,NULL,-1,NULL,NULL,0.0,'1770544940368-121',1.0,0); +INSERT INTO orders VALUES(245,121,109,121,980.0,'2026-02-08T04:33:59.746Z',1,0,NULL,-1,NULL,NULL,0.0,'1770545039741-121',1.0,0); +INSERT INTO orders VALUES(246,12,33,121,149.0,'2026-02-08T05:09:24.720Z',1,0,NULL,-1,NULL,NULL,10.0,'1770547164704-12',1.0,0); +INSERT INTO orders VALUES(247,2,20,127,159.0,'2026-02-09T01:52:55.524Z',1,0,NULL,-1,NULL,NULL,10.0,'1770621775517-2',1.0,0); +INSERT INTO orders VALUES(248,125,112,129,188.0,'2026-02-09T07:56:42.048Z',1,0,NULL,-1,NULL,NULL,0.0,'1770643602042-125',1.0,0); +INSERT INTO orders VALUES(249,3,16,135,119.0,'2026-02-10T06:04:04.471Z',1,0,NULL,-1,NULL,NULL,10.0,'1770723244466-3',1.0,0); +INSERT INTO orders VALUES(250,2,20,139,1277.0,'2026-02-10T21:59:33.763Z',1,0,NULL,-1,NULL,NULL,0.0,'1770780573747-2',1.0,0); +INSERT INTO orders VALUES(251,115,105,145,110.0,'2026-02-11T16:13:20.142Z',1,0,NULL,-1,NULL,NULL,0.0,'1770846200125-115',0.32840000000000002522,0); +INSERT INTO orders VALUES(252,115,105,144,107.0,'2026-02-11T16:13:20.142Z',1,0,NULL,-1,NULL,NULL,0.0,'1770846200125-115',0.31939999999999999502,0); +INSERT INTO orders VALUES(253,115,105,147,118.0,'2026-02-11T16:13:20.142Z',1,0,NULL,-1,NULL,NULL,0.0,'1770846200125-115',0.35220000000000002415,0); +INSERT INTO orders VALUES(254,114,114,158,145.0,'2026-02-14T01:01:13.769Z',1,0,NULL,-1,NULL,replace('Rb palace \n','\n',char(10)),10.0,'1771050673757-114',1.0,0); +INSERT INTO orders VALUES(255,120,108,165,419.0,'2026-02-15T00:00:53.358Z',1,0,NULL,-1,NULL,'Can you deliver it now pls its urgent',0.0,'1771133453347-120',1.0,0); +INSERT INTO orders VALUES(256,2,20,173,377.10000000000003517,'2026-02-16T01:21:48.050Z',1,0,NULL,-1,NULL,NULL,0.0,'1771224708041-2',1.0,0); +INSERT INTO orders VALUES(257,134,116,173,377.10000000000003517,'2026-02-16T04:14:55.522Z',1,0,NULL,-1,NULL,'Come faster ',0.0,'1771235095508-134',1.0,0); +INSERT INTO orders VALUES(258,134,116,174,74.0,'2026-02-16T04:22:00.592Z',1,0,NULL,-1,NULL,NULL,15.0,'1771235520588-134',1.0,0); +INSERT INTO orders VALUES(259,120,108,179,413.10000000000002273,'2026-02-17T00:44:27.971Z',1,0,NULL,-1,NULL,NULL,0.0,'1771308867959-120',1.0,0); +INSERT INTO orders VALUES(260,1,17,NULL,380.0,'2026-02-17T07:16:27.421Z',1,0,NULL,-1,NULL,NULL,0.0,'1771332387411-1',1.0,1); +INSERT INTO orders VALUES(261,136,117,182,130.0,'2026-02-17T07:30:07.521Z',1,0,NULL,-1,NULL,NULL,12.0,'1771333207516-136',1.0,0); +INSERT INTO orders VALUES(262,136,117,182,67.0,'2026-02-17T07:45:43.734Z',1,0,NULL,-1,NULL,NULL,12.0,'1771334143729-136',1.0,0); +INSERT INTO orders VALUES(263,3,16,NULL,162.0,'2026-02-17T07:52:41.197Z',1,0,NULL,-1,NULL,NULL,12.0,'1771334561185-3',1.0,1); +INSERT INTO orders VALUES(264,141,120,184,423.0,'2026-02-17T19:47:31.551Z',1,0,NULL,-1,NULL,NULL,0.0,'1771377451545-141',1.0,0); +INSERT INTO orders VALUES(265,143,121,185,130.0,'2026-02-17T22:56:42.974Z',1,0,NULL,-1,NULL,'Employees colony colony ',12.0,'1771388802969-143',1.0,0); +INSERT INTO orders VALUES(266,143,121,185,110.0,'2026-02-17T23:04:14.592Z',1,0,NULL,-1,NULL,NULL,12.0,'1771389254586-143',1.0,0); +INSERT INTO orders VALUES(267,130,122,186,305.0,'2026-02-17T23:27:35.908Z',1,0,NULL,-1,NULL,NULL,0.0,'1771390655900-130',1.0,0); +INSERT INTO orders VALUES(268,132,123,186,429.0,'2026-02-18T00:28:16.181Z',1,0,NULL,-1,NULL,NULL,0.0,'1771394296177-132',1.0,0); +INSERT INTO orders VALUES(269,119,107,187,396.0,'2026-02-18T01:34:08.441Z',1,0,NULL,-1,NULL,NULL,0.0,'1771398248436-119',1.0,0); +INSERT INTO orders VALUES(270,119,107,NULL,230.0,'2026-02-18T02:04:32.495Z',1,0,NULL,-1,NULL,NULL,0.0,'1771400072481-119',1.0,1); +INSERT INTO orders VALUES(271,145,124,187,381.60000000000003694,'2026-02-18T03:46:31.297Z',1,0,NULL,-1,NULL,NULL,0.0,'1771406191279-145',1.0,0); +INSERT INTO orders VALUES(272,138,125,188,71.0,'2026-02-18T05:15:38.160Z',1,0,NULL,-1,NULL,NULL,12.0,'1771411538154-138',1.0,0); +INSERT INTO orders VALUES(273,138,125,188,71.0,'2026-02-18T05:15:38.161Z',1,0,NULL,-1,NULL,NULL,12.0,'1771411538155-138',1.0,0); +INSERT INTO orders VALUES(274,147,126,NULL,555.0,'2026-02-18T05:15:59.580Z',1,0,NULL,-1,NULL,NULL,0.0,'1771411559572-147',1.0,1); +INSERT INTO orders VALUES(275,24,92,188,223.0,'2026-02-18T06:53:25.416Z',1,0,NULL,-1,NULL,NULL,0.0,'1771417405404-24',1.0,0); +INSERT INTO orders VALUES(276,82,72,189,506.0,'2026-02-18T07:16:24.911Z',1,0,NULL,-1,NULL,NULL,0.0,'1771418784904-82',1.0,0); +INSERT INTO orders VALUES(277,148,127,189,388.0,'2026-02-18T07:31:33.186Z',1,0,NULL,-1,NULL,NULL,0.0,'1771419693158-148',1.0,0); +INSERT INTO orders VALUES(278,38,66,192,396.0,'2026-02-18T23:12:20.428Z',1,0,NULL,-1,NULL,'Come slowly and drive slowly ',0.0,'1771476140424-38',1.0,0); +INSERT INTO orders VALUES(279,156,131,192,419.0,'2026-02-19T00:00:57.733Z',1,0,NULL,-1,NULL,NULL,0.0,'1771479057729-156',1.0,0); +INSERT INTO orders VALUES(280,99,132,194,170.0,'2026-02-19T01:04:09.663Z',1,0,NULL,-1,NULL,NULL,12.0,'1771482849644-99',1.0,0); +INSERT INTO orders VALUES(281,82,72,194,583.0,'2026-02-19T01:57:57.613Z',1,0,NULL,-1,NULL,NULL,0.0,'1771486077606-82',1.0,0); +INSERT INTO orders VALUES(282,82,72,194,110.0,'2026-02-19T01:59:43.093Z',1,0,NULL,-1,NULL,NULL,12.0,'1771486183088-82',1.0,0); +INSERT INTO orders VALUES(283,66,58,194,216.0,'2026-02-19T02:16:07.844Z',1,0,NULL,-1,NULL,NULL,0.0,'1771487167839-66',1.0,0); +INSERT INTO orders VALUES(284,120,108,194,202.0,'2026-02-19T03:09:55.456Z',1,0,NULL,-1,NULL,NULL,0.0,'1771490395448-120',1.0,0); +INSERT INTO orders VALUES(285,159,133,194,371.0,'2026-02-19T03:40:51.549Z',1,0,NULL,-1,NULL,NULL,0.0,'1771492251530-159',1.0,0); +INSERT INTO orders VALUES(286,160,134,194,255.0,'2026-02-19T03:49:55.745Z',1,0,NULL,-1,NULL,NULL,0.0,'1771492795724-160',1.0,0); +INSERT INTO orders VALUES(287,64,55,194,114.0,'2026-02-19T03:54:05.397Z',1,0,NULL,-1,NULL,NULL,0.0,'1771493045384-64',0.6,0); +INSERT INTO orders VALUES(288,64,55,196,76.0,'2026-02-19T03:54:05.397Z',1,0,NULL,-1,NULL,NULL,0.0,'1771493045384-64',0.4,0); +INSERT INTO orders VALUES(289,160,134,197,41.0,'2026-02-19T04:00:41.001Z',1,0,NULL,-1,NULL,NULL,12.0,'1771493440990-160',1.0,0); +INSERT INTO orders VALUES(290,151,135,197,387.0,'2026-02-19T04:09:35.859Z',1,0,NULL,-1,NULL,NULL,0.0,'1771493975853-151',1.0,0); +INSERT INTO orders VALUES(291,4,136,195,559.0,'2026-02-19T04:16:50.189Z',1,0,NULL,-1,NULL,NULL,0.0,'1771494410183-4',1.0,0); +INSERT INTO orders VALUES(292,162,137,197,110.0,'2026-02-19T05:08:36.439Z',1,0,NULL,-1,NULL,NULL,12.0,'1771497516435-162',1.0,0); +INSERT INTO orders VALUES(293,162,137,197,110.0,'2026-02-19T05:08:36.736Z',1,0,NULL,-1,NULL,NULL,12.0,'1771497516732-162',1.0,0); +INSERT INTO orders VALUES(294,32,138,195,110.0,'2026-02-19T06:14:11.047Z',1,0,NULL,-1,NULL,NULL,12.0,'1771501451044-32',1.0,0); +INSERT INTO orders VALUES(295,163,139,195,236.0,'2026-02-19T06:49:34.891Z',1,0,NULL,-1,NULL,NULL,0.0,'1771503574888-163',1.0,0); +INSERT INTO orders VALUES(296,38,66,200,819.0,'2026-02-19T12:38:24.984Z',1,0,NULL,-1,NULL,NULL,0.0,'1771524504980-38',1.0,0); +INSERT INTO orders VALUES(297,82,72,201,307.0,'2026-02-19T15:48:55.517Z',1,0,NULL,-1,NULL,NULL,0.0,'1771535935502-82',1.0,0); +INSERT INTO orders VALUES(298,66,58,204,85.0,'2026-02-20T01:39:04.912Z',1,0,NULL,-1,NULL,replace('Employee''s colony road no 3 \nmahabubnagar 9618791714','\n',char(10)),12.0,'1771571344901-66',1.0,0); +INSERT INTO orders VALUES(299,66,58,204,165.0,'2026-02-20T02:41:56.608Z',1,0,NULL,-1,NULL,NULL,12.0,'1771575116599-66',1.0,0); +INSERT INTO orders VALUES(300,140,119,204,238.0,'2026-02-20T03:24:43.556Z',1,0,NULL,-1,NULL,NULL,0.0,'1771577683547-140',1.0,0); +INSERT INTO orders VALUES(301,169,142,204,1116.0,'2026-02-20T03:37:43.245Z',1,0,NULL,-1,NULL,NULL,0.0,'1771578463205-169',1.0,0); +INSERT INTO orders VALUES(302,170,144,204,189.0,'2026-02-20T03:59:51.171Z',1,0,NULL,-1,NULL,NULL,0.0,'1771579791166-170',1.0,0); +INSERT INTO orders VALUES(303,170,144,207,197.0,'2026-02-20T04:04:04.909Z',1,0,NULL,-1,NULL,NULL,0.0,'1771580044903-170',1.0,0); +INSERT INTO orders VALUES(304,132,123,207,494.0,'2026-02-20T04:47:12.538Z',1,0,NULL,-1,NULL,NULL,0.0,'1771582632531-132',1.0,0); +INSERT INTO orders VALUES(305,176,145,206,295.0,'2026-02-20T06:02:01.579Z',1,0,NULL,-1,NULL,NULL,0.0,'1771587121570-176',1.0,0); +INSERT INTO orders VALUES(306,99,132,206,294.0,'2026-02-20T06:41:12.043Z',1,0,NULL,-1,NULL,NULL,0.0,'1771589472035-99',1.0,0); +INSERT INTO orders VALUES(307,163,146,NULL,236.0,'2026-02-20T07:21:21.906Z',1,0,NULL,-1,NULL,NULL,0.0,'1771591881894-163',1.0,1); +INSERT INTO orders VALUES(308,74,73,208,429.0,'2026-02-20T07:41:37.350Z',1,0,NULL,-1,NULL,NULL,0.0,'1771593097346-74',1.0,0); +INSERT INTO orders VALUES(309,115,105,NULL,624.0,'2026-02-20T09:08:15.335Z',1,0,NULL,-1,NULL,NULL,0.0,'1771598295290-115',1.0,1); +INSERT INTO orders VALUES(310,38,66,208,419.0,'2026-02-20T13:06:33.249Z',1,0,NULL,-1,NULL,'Bheje lalo bhaiya 3',0.0,'1771612593245-38',1.0,0); +INSERT INTO orders VALUES(311,184,148,211,364.0,'2026-02-20T22:50:10.927Z',1,0,NULL,-1,NULL,NULL,0.0,'1771647610908-184',1.0,0); +INSERT INTO orders VALUES(312,81,94,212,550.0,'2026-02-21T03:19:33.169Z',1,0,NULL,-1,NULL,NULL,0.0,'1771663773148-81',1.0,0); +INSERT INTO orders VALUES(313,24,92,212,223.0,'2026-02-21T03:33:25.012Z',1,0,NULL,-1,NULL,NULL,0.0,'1771664605006-24',1.0,0); +INSERT INTO orders VALUES(314,186,149,214,137.0,'2026-02-21T03:45:19.764Z',1,0,NULL,-1,NULL,NULL,12.0,'1771665319759-186',1.0,0); +INSERT INTO orders VALUES(315,160,134,213,109.0,'2026-02-21T04:36:43.124Z',1,0,NULL,-1,NULL,NULL,12.0,'1771668403117-160',1.0,0); +INSERT INTO orders VALUES(316,160,134,213,138.0,'2026-02-21T04:40:27.736Z',1,0,NULL,-1,NULL,NULL,12.0,'1771668627722-160',1.0,0); +INSERT INTO orders VALUES(317,32,138,NULL,161.0,'2026-02-21T06:23:19.310Z',1,0,NULL,-1,NULL,NULL,12.0,'1771674799304-32',1.0,1); +INSERT INTO orders VALUES(318,7,71,217,1566.0,'2026-02-21T12:32:34.307Z',1,0,NULL,-1,NULL,replace('Boti me chikna kam karo \nBoti ke pooray parts rehna dekho bhai \nExcept tilli\n\nMutton zara acha lalo \nBone quantity kam kar ke ','\n',char(10)),0.0,'1771696954291-7',1.0,0); +INSERT INTO orders VALUES(319,141,120,219,166.50000000000000355,'2026-02-21T19:42:40.619Z',1,0,NULL,-1,NULL,NULL,0.0,'1771722760597-141',0.5027000000000000135,0); +INSERT INTO orders VALUES(320,141,120,218,164.69999999999997974,'2026-02-21T19:42:40.619Z',1,0,NULL,-1,NULL,NULL,0.0,'1771722760597-141',0.49729999999999998649,0); +INSERT INTO orders VALUES(321,120,108,218,377.10000000000003517,'2026-02-21T22:34:37.439Z',1,0,NULL,-1,NULL,NULL,0.0,'1771733077431-120',1.0,0); +INSERT INTO orders VALUES(322,193,153,218,386.10000000000002984,'2026-02-21T22:53:17.760Z',1,0,NULL,-1,NULL,NULL,0.0,'1771734197748-193',1.0,0); +INSERT INTO orders VALUES(323,132,123,218,583.0,'2026-02-21T23:09:55.795Z',1,0,NULL,-1,NULL,NULL,0.0,'1771735195777-132',1.0,0); +INSERT INTO orders VALUES(324,130,122,218,490.0,'2026-02-21T23:38:18.540Z',1,0,NULL,-1,NULL,NULL,0.0,'1771736898523-130',1.0,0); +INSERT INTO orders VALUES(325,194,154,219,232.0,'2026-02-22T00:16:21.567Z',1,0,NULL,-1,NULL,NULL,0.0,'1771739181558-194',1.0,0); +INSERT INTO orders VALUES(326,198,158,220,323.0,'2026-02-22T01:08:52.833Z',1,0,NULL,-1,NULL,NULL,0.0,'1771742332826-198',1.0,0); +INSERT INTO orders VALUES(327,184,148,221,201.0,'2026-02-22T01:13:15.958Z',1,0,NULL,-1,NULL,NULL,0.0,'1771742595948-184',0.80400000000000009237,0); +INSERT INTO orders VALUES(328,184,148,220,49.0,'2026-02-22T01:13:15.958Z',1,0,NULL,-1,NULL,NULL,0.0,'1771742595948-184',0.19599999999999999644,0); +INSERT INTO orders VALUES(329,205,161,222,272.0,'2026-02-22T03:46:06.235Z',1,0,NULL,-1,NULL,NULL,0.0,'1771751766217-205',1.0,0); +INSERT INTO orders VALUES(330,206,162,221,40.0,'2026-02-22T04:21:41.707Z',1,0,NULL,-1,NULL,NULL,12.0,'1771753901703-206',1.0,0); +INSERT INTO orders VALUES(331,208,163,221,166.0,'2026-02-22T04:39:37.484Z',1,0,NULL,-1,NULL,NULL,12.0,'1771754977472-208',1.0,0); +INSERT INTO orders VALUES(332,50,167,224,315.0,'2026-02-22T14:05:39.863Z',1,0,NULL,-1,NULL,NULL,0.0,'1771788939856-50',1.0,0); +INSERT INTO orders VALUES(333,151,135,227,136.0,'2026-02-23T03:21:16.555Z',1,0,NULL,-1,NULL,NULL,12.0,'1771836676538-151',1.0,0); +INSERT INTO orders VALUES(334,223,168,227,373.49999999999998756,'2026-02-23T03:47:30.738Z',1,0,NULL,-1,NULL,NULL,0.0,'1771838250710-223',1.0,0); +INSERT INTO orders VALUES(335,224,169,228,471.0,'2026-02-23T04:40:46.728Z',1,0,NULL,-1,NULL,NULL,0.0,'1771841446722-224',1.0,0); +INSERT INTO orders VALUES(336,224,169,228,295.0,'2026-02-23T04:44:00.644Z',1,0,NULL,-1,NULL,NULL,0.0,'1771841640635-224',1.0,0); +INSERT INTO orders VALUES(337,224,169,227,69.0,'2026-02-23T04:45:56.017Z',1,0,NULL,-1,NULL,NULL,12.0,'1771841756009-224',1.0,0); +INSERT INTO orders VALUES(338,38,66,229,250.0,'2026-02-23T05:51:07.943Z',1,0,NULL,-1,NULL,'Plz bring fast please jaldi lalo thoda',0.0,'1771845667938-38',1.0,0); +INSERT INTO orders VALUES(339,225,170,229,138.0,'2026-02-23T06:46:04.203Z',1,0,NULL,-1,NULL,NULL,12.0,'1771848964196-225',1.0,0); +INSERT INTO orders VALUES(340,228,172,232,261.0,'2026-02-23T22:40:33.438Z',1,0,NULL,-1,NULL,'Back side alis mart beside lane last lane ,opp children''s park ground floor house ',0.0,'1771906233428-228',1.0,0); +INSERT INTO orders VALUES(341,230,174,235,250.0,'2026-02-24T01:44:30.406Z',1,0,NULL,-1,NULL,NULL,0.0,'1771917270395-230',1.0,0); +INSERT INTO orders VALUES(342,229,173,NULL,737.0,'2026-02-24T01:46:05.872Z',1,0,NULL,-1,NULL,NULL,0.0,'1771917365846-229',1.0,1); +INSERT INTO orders VALUES(343,224,169,227,169.0,'2026-02-24T02:52:22.431Z',1,0,NULL,-1,NULL,NULL,12.0,'1771921342425-224',1.0,0); +INSERT INTO orders VALUES(344,158,176,236,186.0,'2026-02-24T04:15:41.683Z',1,0,NULL,-1,NULL,NULL,12.0,'1771926341678-158',1.0,0); +INSERT INTO orders VALUES(345,3,16,NULL,399.0,'2026-02-24T05:47:59.572Z',1,0,NULL,-1,NULL,NULL,0.0,'1771931879550-3',1.0,1); +INSERT INTO orders VALUES(346,149,130,236,181.0,'2026-02-24T07:17:54.419Z',1,0,NULL,-1,NULL,NULL,0.0,'1771937274400-149',1.0,0); +INSERT INTO orders VALUES(347,50,45,238,281.0,'2026-02-24T12:55:21.432Z',1,0,NULL,-1,NULL,'If I don''t attend the call please call to this number 86888065996',0.0,'1771957521407-50',1.0,0); +INSERT INTO orders VALUES(348,132,123,242,429.0,'2026-02-25T02:47:44.024Z',1,0,NULL,-1,NULL,NULL,0.0,'1772007464014-132',1.0,0); +INSERT INTO orders VALUES(381,1,17,NULL,395.0,'2026-02-26T11:24:06.998Z',1,0,NULL,-1,NULL,NULL,0.0,'1772124844672-1',1.0,1); +INSERT INTO orders VALUES(382,1,17,NULL,187.0,'2026-02-26T11:30:33.419Z',1,0,NULL,-1,NULL,NULL,0.0,'1772125229922-1',1.0,1); +INSERT INTO orders VALUES(383,1,17,NULL,164.0,'2026-02-26T11:34:03.543Z',1,0,NULL,-1,NULL,NULL,45.0,'1772125441817-1',1.0,1); +INSERT INTO orders VALUES(384,1,17,NULL,444.0,'2026-02-26T11:36:20.560Z',1,0,NULL,-1,NULL,NULL,45.0,'1772125578199-1',1.0,1); +INSERT INTO orders VALUES(385,1,17,279,344.0,'2026-03-09T10:16:59.219Z',1,0,NULL,-1,NULL,NULL,0.0,'1773071219214-1',1.0,0); +INSERT INTO orders VALUES(386,1,17,286,51.0,'2026-03-26T01:19:29.108Z',1,0,NULL,-1,NULL,NULL,12.0,'1774507768653-1',1.0,0); +CREATE TABLE IF NOT EXISTS "payment_info" ("id" INTEGER NOT NULL, "status" TEXT NOT NULL, "gateway" TEXT NOT NULL, "order_id" TEXT, "token" TEXT, "merchant_order_id" TEXT NOT NULL, "payload" TEXT); +INSERT INTO payment_info VALUES(1,'pending','phonepe',NULL,NULL,'order_1763563896010',NULL); +INSERT INTO payment_info VALUES(2,'pending','phonepe',NULL,NULL,'order_1763564910006',NULL); +INSERT INTO payment_info VALUES(3,'pending','phonepe',NULL,NULL,'order_1763572580304',NULL); +INSERT INTO payment_info VALUES(4,'pending','phonepe',NULL,NULL,'order_1763572653144',NULL); +INSERT INTO payment_info VALUES(5,'pending','phonepe',NULL,NULL,'order_1763573268603',NULL); +INSERT INTO payment_info VALUES(6,'pending','phonepe',NULL,NULL,'order_1763574232471',NULL); +INSERT INTO payment_info VALUES(7,'pending','phonepe',NULL,NULL,'order_1763574306269',NULL); +INSERT INTO payment_info VALUES(8,'pending','phonepe',NULL,NULL,'order_1763574482764',NULL); +INSERT INTO payment_info VALUES(9,'pending','phonepe',NULL,NULL,'order_1763574799918',NULL); +INSERT INTO payment_info VALUES(10,'pending','phonepe',NULL,NULL,'order_1763575339097',NULL); +INSERT INTO payment_info VALUES(11,'pending','phonepe',NULL,NULL,'order_1763575464896',NULL); +INSERT INTO payment_info VALUES(12,'pending','phonepe',NULL,NULL,'order_1763575602750',NULL); +INSERT INTO payment_info VALUES(13,'pending','phonepe',NULL,NULL,'order_1763575768505',NULL); +INSERT INTO payment_info VALUES(14,'pending','phonepe',NULL,NULL,'order_1763666849104',NULL); +INSERT INTO payment_info VALUES(15,'pending','phonepe',NULL,NULL,'order_1763666905893',NULL); +INSERT INTO payment_info VALUES(16,'pending','phonepe',NULL,NULL,'order_1763666973849',NULL); +INSERT INTO payment_info VALUES(17,'pending','phonepe',NULL,NULL,'order_1763871426295',NULL); +INSERT INTO payment_info VALUES(18,'pending','phonepe',NULL,NULL,'order_1763898477055',NULL); +INSERT INTO payment_info VALUES(19,'pending','phonepe',NULL,NULL,'order_1763983667789',NULL); +INSERT INTO payment_info VALUES(20,'pending','phonepe',NULL,NULL,'order_1764067952957',NULL); +INSERT INTO payment_info VALUES(21,'pending','phonepe',NULL,NULL,'order_1764243205881',NULL); +INSERT INTO payment_info VALUES(22,'pending','phonepe',NULL,NULL,'order_1764388266634',NULL); +INSERT INTO payment_info VALUES(23,'pending','phonepe',NULL,NULL,'order_1764388497092',NULL); +INSERT INTO payment_info VALUES(24,'pending','phonepe',NULL,NULL,'order_1764389081742',NULL); +INSERT INTO payment_info VALUES(25,'pending','phonepe',NULL,NULL,'order_1764389210771',NULL); +INSERT INTO payment_info VALUES(26,'pending','phonepe',NULL,NULL,'order_1764390498471',NULL); +INSERT INTO payment_info VALUES(27,'pending','phonepe',NULL,NULL,'order_1764391183329',NULL); +INSERT INTO payment_info VALUES(28,'pending','phonepe',NULL,NULL,'order_1764391279780',NULL); +INSERT INTO payment_info VALUES(29,'pending','phonepe',NULL,NULL,'order_1764391675769',NULL); +INSERT INTO payment_info VALUES(30,'pending','phonepe',NULL,NULL,'order_1764391943478',NULL); +INSERT INTO payment_info VALUES(31,'pending','phonepe',NULL,NULL,'order_1764392006085',NULL); +INSERT INTO payment_info VALUES(32,'pending','razorpay',NULL,NULL,'order_1764392514440',NULL); +INSERT INTO payment_info VALUES(33,'pending','razorpay',NULL,NULL,'order_1764392606452',NULL); +INSERT INTO payment_info VALUES(34,'pending','razorpay',NULL,NULL,'order_1764392717827',NULL); +INSERT INTO payment_info VALUES(35,'pending','razorpay',NULL,NULL,'order_1764393153653',NULL); +INSERT INTO payment_info VALUES(36,'pending','razorpay',NULL,NULL,'order_1764396332043',NULL); +INSERT INTO payment_info VALUES(37,'pending','phonepe',NULL,NULL,'order_1764397057662',NULL); +INSERT INTO payment_info VALUES(38,'pending','razorpay',NULL,NULL,'order_1764397317408',NULL); +INSERT INTO payment_info VALUES(39,'pending','razorpay',NULL,NULL,'order_1764398178092',NULL); +INSERT INTO payment_info VALUES(40,'pending','razorpay',NULL,NULL,'order_1764400222682',NULL); +INSERT INTO payment_info VALUES(41,'pending','razorpay',NULL,NULL,'order_1764400862503',NULL); +INSERT INTO payment_info VALUES(42,'pending','razorpay',NULL,NULL,'order_1764401267896',NULL); +INSERT INTO payment_info VALUES(43,'pending','razorpay',NULL,NULL,'order_1764405067997',NULL); +INSERT INTO payment_info VALUES(44,'pending','razorpay',NULL,NULL,'order_1765380758868',NULL); +INSERT INTO payment_info VALUES(45,'pending','razorpay',NULL,NULL,'order_1765380872212',NULL); +INSERT INTO payment_info VALUES(46,'pending','razorpay',NULL,NULL,'multi_order_1765645204515',NULL); +INSERT INTO payment_info VALUES(47,'pending','razorpay',NULL,NULL,'multi_order_1765645272415',NULL); +CREATE TABLE IF NOT EXISTS "payments" ("id" INTEGER NOT NULL, "order_id" INTEGER NOT NULL, "status" TEXT NOT NULL, "gateway" TEXT NOT NULL, "token" TEXT, "merchant_order_id" TEXT NOT NULL, "payload" TEXT); +INSERT INTO payments VALUES(1,1,'success','razorpay','1','order_RhdccfyUTkxlH4','{"id":"order_RhdccfyUTkxlH4","notes":{"customerOrderId":"1"},"amount":4400,"entity":"order","status":"created","receipt":"order_1","attempts":0,"currency":"INR","offer_id":null,"signature":"b767a4fdda78476999d21bb7e1cfa72a938e21d592870bd6873ea1bc33336da5","amount_due":4400,"created_at":1763563898,"payment_id":"pay_RheSGc35HYPRPH","amount_paid":0}'); +INSERT INTO payments VALUES(2,2,'pending','razorpay','2','order_RhduSaAJIuFBzZ','{"id":"order_RhduSaAJIuFBzZ","notes":{"customerOrderId":"2"},"amount":22000,"entity":"order","status":"created","receipt":"order_2","attempts":0,"currency":"INR","offer_id":null,"amount_due":22000,"created_at":1763564911,"amount_paid":0}'); +INSERT INTO payments VALUES(3,3,'pending','razorpay','3','order_Rhg5W23p2znoMY','{"id":"order_Rhg5W23p2znoMY","notes":{"customerOrderId":"3"},"amount":22000,"entity":"order","status":"created","receipt":"order_3","attempts":0,"currency":"INR","offer_id":null,"amount_due":22000,"created_at":1763572582,"amount_paid":0}'); +INSERT INTO payments VALUES(4,4,'pending','razorpay','4','order_Rhg6mh3BUvamRb','{"id":"order_Rhg6mh3BUvamRb","notes":{"customerOrderId":"4"},"amount":43000,"entity":"order","status":"created","receipt":"order_4","attempts":0,"currency":"INR","offer_id":null,"amount_due":43000,"created_at":1763572654,"amount_paid":0}'); +INSERT INTO payments VALUES(5,5,'failed','razorpay','5','order_RhgHdO0tN2ze09','{"id":"order_RhgHdO0tN2ze09","notes":{"customerOrderId":"5"},"amount":70000,"entity":"order","status":"created","receipt":"order_5","attempts":0,"currency":"INR","offer_id":null,"amount_due":70000,"created_at":1763573270,"amount_paid":0}'); +INSERT INTO payments VALUES(6,6,'pending','razorpay','6','order_RhgYaSCauk0Q2K','{"id":"order_RhgYaSCauk0Q2K","notes":{"customerOrderId":"6"},"amount":2200,"entity":"order","status":"created","receipt":"order_6","attempts":0,"currency":"INR","offer_id":null,"amount_due":2200,"created_at":1763574233,"amount_paid":0}'); +INSERT INTO payments VALUES(7,7,'pending','razorpay','7','order_RhgZsq1zxjncFX','{"id":"order_RhgZsq1zxjncFX","notes":{"customerOrderId":"7"},"amount":2200,"entity":"order","status":"created","receipt":"order_7","attempts":0,"currency":"INR","offer_id":null,"amount_due":2200,"created_at":1763574307,"amount_paid":0}'); +INSERT INTO payments VALUES(8,8,'pending','razorpay','8','order_Rhgczd7LM2RlaP','{"id":"order_Rhgczd7LM2RlaP","notes":{"customerOrderId":"8"},"amount":2200,"entity":"order","status":"created","receipt":"order_8","attempts":0,"currency":"INR","offer_id":null,"amount_due":2200,"created_at":1763574483,"amount_paid":0}'); +INSERT INTO payments VALUES(9,9,'pending','razorpay','9','order_RhgiZalLiVPuH8','{"id":"order_RhgiZalLiVPuH8","notes":{"customerOrderId":"9"},"amount":50000,"entity":"order","status":"created","receipt":"order_9","attempts":0,"currency":"INR","offer_id":null,"amount_due":50000,"created_at":1763574800,"amount_paid":0}'); +INSERT INTO payments VALUES(10,11,'pending','razorpay','11','order_Rhgs4FOJ0LP3Ey','{"id":"order_Rhgs4FOJ0LP3Ey","notes":{"customerOrderId":"11"},"amount":4400,"entity":"order","status":"created","receipt":"order_11","attempts":0,"currency":"INR","offer_id":null,"amount_due":4400,"created_at":1763575340,"amount_paid":0}'); +INSERT INTO payments VALUES(11,12,'failed','razorpay','12','order_RhguHTMNkOdUwp','{"id":"order_RhguHTMNkOdUwp","notes":{"customerOrderId":"12"},"amount":22000,"entity":"order","status":"created","receipt":"order_12","attempts":0,"currency":"INR","offer_id":null,"amount_due":22000,"created_at":1763575465,"amount_paid":0}'); +INSERT INTO payments VALUES(12,13,'pending','razorpay','13','order_RhgwhwZZdjweOR','{"id":"order_RhgwhwZZdjweOR","notes":{"customerOrderId":"13"},"amount":2200,"entity":"order","status":"created","receipt":"order_13","attempts":0,"currency":"INR","offer_id":null,"amount_due":2200,"created_at":1763575603,"amount_paid":0}'); +INSERT INTO payments VALUES(13,14,'failed','razorpay','14','order_RhgzcqerOQNs98','{"id":"order_RhgzcqerOQNs98","notes":{"customerOrderId":"14"},"amount":21000,"entity":"order","status":"created","receipt":"order_14","attempts":0,"currency":"INR","offer_id":null,"amount_due":21000,"created_at":1763575769,"amount_paid":0}'); +INSERT INTO payments VALUES(14,14,'success','razorpay','14','order_Rhh00qJNdjUp8o','{"id":"order_Rhh00qJNdjUp8o","notes":{"retry":"true","customerOrderId":"14"},"amount":21000,"entity":"order","status":"created","receipt":"order_14_retry","attempts":0,"currency":"INR","offer_id":null,"signature":"6df20655021f1d6841340f2a2ef2ef9378cb3d43495ab09e85f08aea1a851583","amount_due":21000,"created_at":1763575791,"payment_id":"pay_Rhh15cLL28YM7j","amount_paid":0}'); +INSERT INTO payments VALUES(15,12,'success','razorpay','12','order_Rhh1R5ViTgI0Zs','{"id":"order_Rhh1R5ViTgI0Zs","notes":{"retry":"true","customerOrderId":"12"},"amount":22000,"entity":"order","status":"created","receipt":"order_12_retry","attempts":0,"currency":"INR","offer_id":null,"signature":"bef3958fa069c43b61801c1f16edf8372835a324e17bc2448f8ec6a28a8eb7f4","amount_due":22000,"created_at":1763575872,"payment_id":"pay_Rhh1qKLJknk3n4","amount_paid":0}'); +INSERT INTO payments VALUES(16,5,'pending','razorpay','5','order_Rhh2UWeTun3fju','{"id":"order_Rhh2UWeTun3fju","notes":{"retry":"true","customerOrderId":"5"},"amount":70000,"entity":"order","status":"created","receipt":"order_5_retry","attempts":0,"currency":"INR","offer_id":null,"amount_due":70000,"created_at":1763575932,"amount_paid":0}'); +INSERT INTO payments VALUES(17,15,'failed','razorpay','15','order_Ri6rB90w7pYBr9','{"id":"order_Ri6rB90w7pYBr9","notes":{"customerOrderId":"15"},"amount":70000,"entity":"order","status":"created","receipt":"order_15","attempts":0,"currency":"INR","offer_id":null,"amount_due":70000,"created_at":1763666851,"amount_paid":0}'); +INSERT INTO payments VALUES(18,16,'failed','razorpay','16','order_Ri6sAWser4nop7','{"id":"order_Ri6sAWser4nop7","notes":{"customerOrderId":"16"},"amount":70000,"entity":"order","status":"created","receipt":"order_16","attempts":0,"currency":"INR","offer_id":null,"amount_due":70000,"created_at":1763666907,"amount_paid":0}'); +INSERT INTO payments VALUES(19,17,'failed','razorpay','17','order_Ri6tMMIZdzeqis','{"id":"order_Ri6tMMIZdzeqis","notes":{"customerOrderId":"17"},"amount":21000,"entity":"order","status":"created","receipt":"order_17","attempts":0,"currency":"INR","offer_id":null,"amount_due":21000,"created_at":1763666975,"amount_paid":0}'); +INSERT INTO payments VALUES(20,17,'failed','razorpay','17','order_Ri6tQL1UNaANTQ','{"id":"order_Ri6tQL1UNaANTQ","notes":{"customerOrderId":"17"},"amount":21000,"entity":"order","status":"created","receipt":"order_17","attempts":0,"currency":"INR","offer_id":null,"amount_due":21000,"created_at":1763666979,"amount_paid":0}'); +INSERT INTO payments VALUES(21,17,'failed','razorpay','17','order_Ri6tVB8hDRO076','{"id":"order_Ri6tVB8hDRO076","notes":{"customerOrderId":"17"},"amount":21000,"entity":"order","status":"created","receipt":"order_17","attempts":0,"currency":"INR","offer_id":null,"amount_due":21000,"created_at":1763666983,"amount_paid":0}'); +INSERT INTO payments VALUES(22,19,'failed','razorpay','19','order_Rj2wr3MPXGMjHS','{"id":"order_Rj2wr3MPXGMjHS","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1763871427,"amount_paid":0}'); +INSERT INTO payments VALUES(23,21,'success','razorpay','21','order_RjAd65gFHGAF4g','{"id":"order_RjAd65gFHGAF4g","notes":{"customerOrderId":"21"},"amount":72200,"entity":"order","status":"created","receipt":"order_21","attempts":0,"currency":"INR","offer_id":null,"signature":"7f4ec6ff7361e0f2a5e0a27d409506fee107402f84d0c4ad86767d84fb6e75d0","amount_due":72200,"created_at":1763898478,"payment_id":"pay_RjAe9Zb7Si4j4o","amount_paid":0}'); +INSERT INTO payments VALUES(24,23,'success','razorpay','23','order_RjYovXkkXeehgQ','{"id":"order_RjYovXkkXeehgQ","notes":{"customerOrderId":"23"},"amount":22000,"entity":"order","status":"created","receipt":"order_23","attempts":0,"currency":"INR","offer_id":null,"signature":"099541f6002cc931b300141af765c194c016f07d89717c962667a743b8694c21","amount_due":22000,"created_at":1763983669,"payment_id":"pay_RjYtSlsBMHg07p","amount_paid":0}'); +INSERT INTO payments VALUES(25,25,'success','razorpay','25','order_Rjwkoef4xrIElJ','{"id":"order_Rjwkoef4xrIElJ","notes":{"customerOrderId":"25"},"amount":456000,"entity":"order","status":"created","receipt":"order_25","attempts":0,"currency":"INR","offer_id":null,"signature":"7c17e6edf771b124218cdc4ecaa4957bf4410c39a70d38e0c5610266e36aeb2c","amount_due":456000,"created_at":1764067954,"payment_id":"pay_RjwmIVh7dXngbZ","amount_paid":0}'); +INSERT INTO payments VALUES(26,26,'success','razorpay','26','order_RkkWFDKoRb26Wl','{"id":"order_RkkWFDKoRb26Wl","notes":{"customerOrderId":"26"},"amount":970240,"entity":"order","status":"created","receipt":"order_26","attempts":0,"currency":"INR","offer_id":null,"signature":"dfd2a9b63673d6fc1293c7206a14907a699d0da094c8e8a483cfaa75f76447fc","amount_due":970240,"created_at":1764243207,"payment_id":"pay_RkkWqcVVg01uW6","amount_paid":0}'); +INSERT INTO payments VALUES(27,30,'success','razorpay','30','order_RlPi7QaPW4b8Gw','{"id":"order_RlPi7QaPW4b8Gw","notes":{"customerOrderId":"30"},"amount":187000,"entity":"order","status":"created","receipt":"order_30","attempts":0,"currency":"INR","offer_id":null,"signature":"5e42cb3791ed3fb19b4d13f4c8a21f30de1f74ec5e0babf31510bb4249edd483","amount_due":187000,"created_at":1764388268,"payment_id":"pay_RlPjeb1hpjBIt6","amount_paid":0}'); +INSERT INTO payments VALUES(28,31,'failed','razorpay','31','order_RlPmA6xXh1YRDc','{"id":"order_RlPmA6xXh1YRDc","notes":{"customerOrderId":"31"},"amount":187000,"entity":"order","status":"created","receipt":"order_31","attempts":0,"currency":"INR","offer_id":null,"amount_due":187000,"created_at":1764388497,"amount_paid":0}'); +INSERT INTO payments VALUES(29,32,'failed','razorpay','32','order_RlPwSYB4XqfQB7','{"id":"order_RlPwSYB4XqfQB7","notes":{"customerOrderId":"32"},"amount":149600,"entity":"order","status":"created","receipt":"order_32","attempts":0,"currency":"INR","offer_id":null,"amount_due":149600,"created_at":1764389082,"amount_paid":0}'); +INSERT INTO payments VALUES(30,33,'success','razorpay','33','order_RlPyjETea6ty73','{"id":"order_RlPyjETea6ty73","notes":{"customerOrderId":"33"},"amount":56000,"entity":"order","status":"created","receipt":"order_33","attempts":0,"currency":"INR","offer_id":null,"signature":"e72f5ca9b95f1837861b5efc2f2289f9f556c908ba2a19cf85e1d545980eee7c","amount_due":56000,"created_at":1764389211,"payment_id":"pay_RlPzYBu93IT0Vi","amount_paid":0}'); +INSERT INTO payments VALUES(31,35,'failed','razorpay','35','order_RlQLPUSRDheMYA','{"id":"order_RlQLPUSRDheMYA","notes":{"customerOrderId":"35"},"amount":112000,"entity":"order","status":"created","receipt":"order_35","attempts":0,"currency":"INR","offer_id":null,"amount_due":112000,"created_at":1764390499,"amount_paid":0}'); +INSERT INTO payments VALUES(32,37,'failed','razorpay','37','order_RlQXT2rr7csMdO','{"id":"order_RlQXT2rr7csMdO","notes":{"customerOrderId":"37"},"amount":231000,"entity":"order","status":"created","receipt":"order_37","attempts":0,"currency":"INR","offer_id":null,"amount_due":231000,"created_at":1764391184,"amount_paid":0}'); +INSERT INTO payments VALUES(33,38,'failed','razorpay','38','order_RlQZ9Z4bHiEctz','{"id":"order_RlQZ9Z4bHiEctz","notes":{"customerOrderId":"38"},"amount":162000,"entity":"order","status":"created","receipt":"order_38","attempts":0,"currency":"INR","offer_id":null,"amount_due":162000,"created_at":1764391280,"amount_paid":0}'); +INSERT INTO payments VALUES(34,40,'failed','razorpay','40','order_RlQg7pdyZk07ev','{"id":"order_RlQg7pdyZk07ev","notes":{"customerOrderId":"40"},"amount":132000,"entity":"order","status":"created","receipt":"order_40","attempts":0,"currency":"INR","offer_id":null,"amount_due":132000,"created_at":1764391676,"amount_paid":0}'); +INSERT INTO payments VALUES(35,41,'pending','razorpay','41','order_RlQkq8lYf2blRm','{"id":"order_RlQkq8lYf2blRm","notes":{"customerOrderId":"41"},"amount":132000,"entity":"order","status":"created","receipt":"order_41","attempts":0,"currency":"INR","offer_id":null,"amount_due":132000,"created_at":1764391944,"amount_paid":0}'); +INSERT INTO payments VALUES(36,42,'pending','razorpay','42','order_RlQlwOKfGfD8Ew','{"id":"order_RlQlwOKfGfD8Ew","notes":{"customerOrderId":"42"},"amount":37600,"entity":"order","status":"created","receipt":"order_42","attempts":0,"currency":"INR","offer_id":null,"amount_due":37600,"created_at":1764392006,"amount_paid":0}'); +INSERT INTO payments VALUES(37,43,'pending','razorpay','43','order_RlQuu1EUfczKPN','{"id":"order_RlQuu1EUfczKPN","notes":{"customerOrderId":"43"},"amount":146400,"entity":"order","status":"created","receipt":"order_43","attempts":0,"currency":"INR","offer_id":null,"amount_due":146400,"created_at":1764392515,"amount_paid":0}'); +INSERT INTO payments VALUES(38,44,'pending','razorpay','44','order_RlQwWNsgADgxDz','{"id":"order_RlQwWNsgADgxDz","notes":{"customerOrderId":"44"},"amount":146400,"entity":"order","status":"created","receipt":"order_44","attempts":0,"currency":"INR","offer_id":null,"amount_due":146400,"created_at":1764392607,"amount_paid":0}'); +INSERT INTO payments VALUES(39,45,'pending','razorpay','45','order_RlQyTsabL2V16b','{"id":"order_RlQyTsabL2V16b","notes":{"customerOrderId":"45"},"amount":149600,"entity":"order","status":"created","receipt":"order_45","attempts":0,"currency":"INR","offer_id":null,"amount_due":149600,"created_at":1764392719,"amount_paid":0}'); +INSERT INTO payments VALUES(40,46,'pending','razorpay','46','order_RlR69lcxwqstb6','{"id":"order_RlR69lcxwqstb6","notes":{"customerOrderId":"46"},"amount":690400,"entity":"order","status":"created","receipt":"order_46","attempts":0,"currency":"INR","offer_id":null,"amount_due":690400,"created_at":1764393155,"amount_paid":0}'); +INSERT INTO payments VALUES(41,47,'pending','razorpay','47','order_RlS07mRZPryR3t','{"id":"order_RlS07mRZPryR3t","notes":{"customerOrderId":"47"},"amount":75200,"entity":"order","status":"created","receipt":"order_47","attempts":0,"currency":"INR","offer_id":null,"amount_due":75200,"created_at":1764396334,"amount_paid":0}'); +INSERT INTO payments VALUES(42,48,'failed','razorpay','48','order_RlSCsTHyNKuOhn','{"id":"order_RlSCsTHyNKuOhn","notes":{"customerOrderId":"48"},"amount":112200,"entity":"order","status":"created","receipt":"order_48","attempts":0,"currency":"INR","offer_id":null,"amount_due":112200,"created_at":1764397058,"amount_paid":0}'); +INSERT INTO payments VALUES(43,49,'success','razorpay','49','order_RlSHRuwHdMoUye','{"id":"order_RlSHRuwHdMoUye","notes":{"customerOrderId":"49"},"amount":315600,"entity":"order","status":"created","receipt":"order_49","attempts":0,"currency":"INR","offer_id":null,"signature":"7822497f6f5c8894b139e0565223a2d3c6fb5df298a4998f9979efbe474d24e6","amount_due":315600,"created_at":1764397318,"payment_id":"pay_RlSHwidHn91jay","amount_paid":0}'); +INSERT INTO payments VALUES(44,50,'success','razorpay','50','order_RlSWc4NJJ69f7V','{"id":"order_RlSWc4NJJ69f7V","notes":{"customerOrderId":"50"},"amount":468600,"entity":"order","status":"created","receipt":"order_50","attempts":0,"currency":"INR","offer_id":null,"signature":"839a9f6ccf1306ca400587567b80ef8865972855657e228126dfabecd65866e7","amount_due":468600,"created_at":1764398179,"payment_id":"pay_RlSX31RGtluYVh","amount_paid":0}'); +INSERT INTO payments VALUES(45,51,'success','razorpay','51','order_RlT6bwRhArlEkf','{"id":"order_RlT6bwRhArlEkf","notes":{"customerOrderId":"51"},"amount":25000,"entity":"order","status":"created","receipt":"order_51","attempts":0,"currency":"INR","offer_id":null,"signature":"59150ddcdd04d841a95e7e3a7d3f209b267e46ecfe2cf91b85c96eb977f9b026","amount_due":25000,"created_at":1764400224,"payment_id":"pay_RlT7JjVCrxXRHC","amount_paid":0}'); +INSERT INTO payments VALUES(46,52,'success','razorpay','52','order_RlTHrPLnw2EujN','{"id":"order_RlTHrPLnw2EujN","notes":{"customerOrderId":"52"},"amount":25000,"entity":"order","status":"created","receipt":"order_52","attempts":0,"currency":"INR","offer_id":null,"signature":"45d931069bf90287f48010decf24a9eba589909069ecb184f0bc8311105cb673","amount_due":25000,"created_at":1764400863,"payment_id":"pay_RlTIbvllphqQnW","amount_paid":0}'); +INSERT INTO payments VALUES(47,53,'success','razorpay','53','order_RlTOzxz8DaDOwf','{"id":"order_RlTOzxz8DaDOwf","notes":{"customerOrderId":"53"},"amount":40000,"entity":"order","status":"created","receipt":"order_53","attempts":0,"currency":"INR","offer_id":null,"signature":"5452ac1b6535e0348ff7f91eee9d597856cf32a9ec64dfc467e7d2b53e8fef95","amount_due":40000,"created_at":1764401268,"payment_id":"pay_RlTPeKJPkdLz7Z","amount_paid":0}'); +INSERT INTO payments VALUES(48,54,'success','razorpay','54','order_RlUTuqAZzfNeUv','{"id":"order_RlUTuqAZzfNeUv","notes":{"customerOrderId":"54"},"amount":285000,"entity":"order","status":"created","receipt":"order_54","attempts":0,"currency":"INR","offer_id":null,"signature":"724b5c2ca061a38dd2a8d21c43a2f7caf246936d628961d9739bbea1edffc4bd","amount_due":285000,"created_at":1764405069,"payment_id":"pay_RlUUaZfFUQu0bw","amount_paid":0}'); +INSERT INTO payments VALUES(49,19,'pending','razorpay','19','order_RpVxTzSti5nJlk','{"id":"order_RpVxTzSti5nJlk","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1765283630,"amount_paid":0}'); +INSERT INTO payments VALUES(50,19,'pending','razorpay','19','order_RpVxUPtLxk2htm','{"id":"order_RpVxUPtLxk2htm","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1765283631,"amount_paid":0}'); +INSERT INTO payments VALUES(51,56,'success','razorpay','56','order_RpxXVYjAZ9hKRs','{"id":"order_RpxXVYjAZ9hKRs","notes":{"customerOrderId":"56"},"amount":6400,"entity":"order","status":"created","receipt":"order_56","attempts":0,"currency":"INR","offer_id":null,"signature":"a0bf4ed36bfc2f29c3744374450dcfc516f7d59493102959fc2acb03d1bf09ab","amount_due":6400,"created_at":1765380760,"payment_id":"pay_RpxYgEbuw15e12","amount_paid":0}'); +INSERT INTO payments VALUES(52,57,'failed','razorpay','57','order_RpxZTOWJFF0sor','{"id":"order_RpxZTOWJFF0sor","notes":{"customerOrderId":"57"},"amount":7200,"entity":"order","status":"created","receipt":"order_57","attempts":0,"currency":"INR","offer_id":null,"amount_due":7200,"created_at":1765380872,"amount_paid":0}'); +INSERT INTO payments VALUES(53,57,'pending','razorpay','57','order_RpxaFYaBBoE3xA','{"id":"order_RpxaFYaBBoE3xA","notes":{"customerOrderId":"57"},"amount":7200,"entity":"order","status":"created","receipt":"order_57","attempts":0,"currency":"INR","offer_id":null,"amount_due":7200,"created_at":1765380916,"amount_paid":0}'); +INSERT INTO payments VALUES(54,46,'pending','razorpay','46','order_RrAdEPX05BXXGH','{"id":"order_RrAdEPX05BXXGH","notes":{"customerOrderId":"46"},"amount":112000,"entity":"order","status":"created","receipt":"order_46","attempts":0,"currency":"INR","offer_id":null,"amount_due":112000,"created_at":1765645206,"amount_paid":0}'); +INSERT INTO payments VALUES(55,63,'failed','razorpay','63','order_RrAdG1zzVqBNBX','{"id":"order_RrAdG1zzVqBNBX","notes":{"customerOrderId":"63"},"amount":112000,"entity":"order","status":"created","receipt":"order_63","attempts":0,"currency":"INR","offer_id":null,"amount_due":112000,"created_at":1765645208,"amount_paid":0}'); +INSERT INTO payments VALUES(56,47,'pending','razorpay','47','order_RrAePs61Rzlajz','{"id":"order_RrAePs61Rzlajz","notes":{"customerOrderId":"47"},"amount":112000,"entity":"order","status":"created","receipt":"order_47","attempts":0,"currency":"INR","offer_id":null,"amount_due":112000,"created_at":1765645274,"amount_paid":0}'); +INSERT INTO payments VALUES(57,64,'failed','razorpay','64','order_RrAeRKPcgCqCH5','{"id":"order_RrAeRKPcgCqCH5","notes":{"customerOrderId":"64"},"amount":42000,"entity":"order","status":"created","receipt":"order_64","attempts":0,"currency":"INR","offer_id":null,"amount_due":42000,"created_at":1765645275,"amount_paid":0}'); +INSERT INTO payments VALUES(58,64,'failed','razorpay','64','order_RrAeVlINAOaLMi','{"id":"order_RrAeVlINAOaLMi","notes":{"customerOrderId":"64"},"amount":42000,"entity":"order","status":"created","receipt":"order_64","attempts":0,"currency":"INR","offer_id":null,"amount_due":42000,"created_at":1765645279,"amount_paid":0}'); +INSERT INTO payments VALUES(59,19,'pending','razorpay','19','order_Rx3m1bvIbeGnQy','{"id":"order_Rx3m1bvIbeGnQy","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1766931095,"amount_paid":0}'); +INSERT INTO payments VALUES(60,19,'pending','razorpay','19','order_Rx3m23b4jndeAR','{"id":"order_Rx3m23b4jndeAR","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1766931096,"amount_paid":0}'); +INSERT INTO payments VALUES(61,19,'pending','razorpay','19','order_Rx3m2DF1gpeu8L','{"id":"order_Rx3m2DF1gpeu8L","notes":{"customerOrderId":"19"},"amount":53000,"entity":"order","status":"created","receipt":"order_19","attempts":0,"currency":"INR","offer_id":null,"amount_due":53000,"created_at":1766931096,"amount_paid":0}'); +CREATE TABLE IF NOT EXISTS "product_availability_schedules" ("id" INTEGER NOT NULL, "time" TEXT NOT NULL, "schedule_name" TEXT NOT NULL, "action" TEXT NOT NULL, "product_ids" TEXT NOT NULL DEFAULT '[]', "group_ids" TEXT NOT NULL DEFAULT '[]', "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "last_updated" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO product_availability_schedules VALUES(1,'22:00','Demo schedule','in','[9,83,81,75,82,22,102,6,14,35,86,4,99,98]','[9,7]','2026-03-19T08:25:27.311Z','2026-03-19T08:25:27.311Z'); +INSERT INTO product_availability_schedules VALUES(3,'00:22','Test4','in','[50]','[]','2026-03-19T13:20:01.972Z','2026-03-19T13:20:01.972Z'); +INSERT INTO product_availability_schedules VALUES(4,'12:00','Mutton off','out','[6,14,35,86,4,99,98]','[7]','2026-03-20T11:27:20.629Z','2026-03-20T11:27:20.629Z'); +CREATE TABLE IF NOT EXISTS "product_categories" ("id" INTEGER NOT NULL, "name" TEXT NOT NULL, "description" TEXT); +CREATE TABLE IF NOT EXISTS "product_group_info" ("id" INTEGER NOT NULL, "group_name" TEXT NOT NULL, "description" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO product_group_info VALUES(1,'Vegetables','All Market Vegetables','2025-12-31T22:12:45.110Z'); +INSERT INTO product_group_info VALUES(2,'Chicken Items','All Chicken Items','2025-12-31T22:13:41.539Z'); +INSERT INTO product_group_info VALUES(3,'Fruits','All Fruits','2025-12-31T22:15:13.138Z'); +INSERT INTO product_group_info VALUES(5,'All Chicken items ','All chicken items only ','2026-01-25T08:24:51.769Z'); +INSERT INTO product_group_info VALUES(7,'All mutton items','All mutton items ','2026-01-25T08:32:15.938Z'); +INSERT INTO product_group_info VALUES(8,'All vegetables items ','All vegetables items ','2026-01-25T08:35:03.380Z'); +INSERT INTO product_group_info VALUES(9,'All fish ','All fish ','2026-01-25T08:57:31.702Z'); +INSERT INTO product_group_info VALUES(10,'All fruits items ','','2026-01-30T09:39:13.561Z'); +CREATE TABLE IF NOT EXISTS "product_group_membership" ("product_id" INTEGER NOT NULL, "group_id" INTEGER NOT NULL, "added_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO product_group_membership VALUES(1,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(2,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(2,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(3,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(3,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(4,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(5,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(6,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(6,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(6,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(6,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(7,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(7,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(8,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(8,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(9,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(10,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(10,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(11,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(11,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(13,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(13,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(13,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(14,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(15,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(16,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(17,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(17,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(18,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(18,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(19,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(19,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(21,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(21,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(22,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(23,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(23,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(24,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(24,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(25,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(25,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(26,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(26,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(27,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(27,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(28,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(28,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(29,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(29,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(30,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(30,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(31,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(31,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(32,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(32,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(33,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(33,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(34,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(35,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(36,2,'2025-12-31T22:13:41.542Z'); +INSERT INTO product_group_membership VALUES(36,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(37,1,'2025-12-31T22:12:45.118Z'); +INSERT INTO product_group_membership VALUES(37,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(38,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(38,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(39,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(39,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(40,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(41,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(42,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(43,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(43,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(44,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(44,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(45,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(46,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(46,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(47,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(47,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(48,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(49,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(49,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(50,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(50,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(51,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(51,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(52,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(52,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(53,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(53,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(54,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(54,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(55,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(55,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(56,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(56,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(57,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(57,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(58,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(58,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(59,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(59,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(60,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(60,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(61,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(61,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(62,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(62,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(63,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(63,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(64,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(65,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(66,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(67,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(68,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(69,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(70,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(71,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(72,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(73,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(73,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(74,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(75,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(76,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(77,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(78,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(79,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(80,5,'2026-01-25T08:24:51.778Z'); +INSERT INTO product_group_membership VALUES(81,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(82,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(83,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(86,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(88,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(89,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(90,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(91,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(92,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(94,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(95,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(96,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(96,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(97,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(98,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(99,7,'2026-02-07T22:17:04.063Z'); +INSERT INTO product_group_membership VALUES(100,10,'2026-02-18T12:21:50.395Z'); +INSERT INTO product_group_membership VALUES(100,3,'2026-02-23T03:23:47.142Z'); +INSERT INTO product_group_membership VALUES(101,8,'2026-02-23T03:23:13.305Z'); +INSERT INTO product_group_membership VALUES(102,9,'2026-02-18T12:20:51.332Z'); +INSERT INTO product_group_membership VALUES(103,8,'2026-02-23T03:23:13.305Z'); +CREATE TABLE IF NOT EXISTS "product_info" ("id" INTEGER NOT NULL, "name" TEXT NOT NULL, "short_description" TEXT, "long_description" TEXT, "unit_id" INTEGER NOT NULL, "price" REAL NOT NULL, "images" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "is_out_of_stock" INTEGER NOT NULL DEFAULT false, "market_price" REAL, "store_id" INTEGER, "is_suspended" INTEGER NOT NULL DEFAULT false, "increment_step" REAL NOT NULL DEFAULT 1, "is_flash_available" INTEGER NOT NULL DEFAULT false, "flash_price" REAL, "product_quantity" REAL NOT NULL DEFAULT 1, "scheduled_availability" INTEGER NOT NULL DEFAULT true); +INSERT INTO product_info VALUES(1,'Chicken Liver','Liver sourced from the farm hens.',replace('Bring home the deep, hearty taste of fresh Chicken Liver, sourced from healthy, farm-raised chickens. Each piece is carefully cleaned and handled with care to retain its natural richness, smooth texture, and vibrant color.\n\nPerfect for making creamy pâtés, spicy fry dishes, gravies, or traditional home-style recipes, our chicken liver delivers authentic flavor and exceptional freshness in every bite.','\n',char(10)),1,99.0,'["product-images/1768478127128-0","product-images/1768478472220-0"]','2025-11-18T08:06:27.505Z',0,110.0,1,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(2,'Chicken Breast 500 g','Farm Chicken Breast uncut and solid.',replace('Experience the rich taste of fresh, premium-quality chicken sourced directly from trusted farms. Each bird is carefully cleaned, processed hygienically, and delivered chilled to preserve its natural flavor, tenderness, and juiciness.\n\nWhether you''re preparing a hearty curry, roasting for a family meal, or grilling for a weekend cookout, our whole chicken offers consistent texture, rich aroma, and superior taste in every bite.','\n',char(10)),1,198.0,'["product-images/1768397780093-0","product-images/1768479562478-0"]','2025-11-18T08:32:49.003Z',0,220.0,1,0,1.0,1,230.0,0.5,1); +INSERT INTO product_info VALUES(3,'Chicken Lollipops','Chicken cut for lollipop starter dish',replace('Turn any meal into a celebration with our premium Chicken Lollipop Cuts, expertly carved from fresh chicken drumettes and wings. Each piece is shaped cleanly into the classic “lollipop” form—perfect for frying, grilling, or tossing in your favorite tangy sauces.\n\nEnjoy the ideal balance of meatiness, tenderness, and crunch potential, making it a must-have for home chefs, party hosts, and spice lovers alike.','\n',char(10)),1,76.0,'["product-images/1768475599800-0"]','2025-11-18T08:56:07.106Z',1,89.0,1,0,1.0,0,120.0,0.25,1); +INSERT INTO product_info VALUES(4,'Mutton','Fresh, tender mutton cut from quality goat meat, cleaned and prepared hygienically for rich taste and authentic curries.',replace('Our mutton is sourced from healthy, quality goats and cut fresh to ensure natural flavor and tenderness. Each piece is carefully cleaned and processed under hygienic conditions to retain its juiciness and traditional taste. Known for its deep, rich flavor, this mutton is ideal for curries, biryanis, gravies, roasts, and slow-cooked dishes. No chemicals, no preservatives—just pure mutton that cooks well, absorbs spices properly, and delivers the taste people actually expect from good meat.\n','\n',char(10)),1,819.0,'["product-images/1767636171845-0"]','2025-11-18T08:57:53.779Z',1,860.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(5,'Cucumber(Kheera)','High water content, helps hydration, and keeps the body cool.',replace('\nThis fresh cucumber is crisp, juicy, and mild in taste, making it perfect for everyday use. Carefully selected for firmness and freshness, it’s ideal for salads, raita, juices, and garnishing. With high water content and a clean, refreshing bite, cucumber is best enjoyed fresh and chilled.','\n',char(10)),1,26.0,'["product-images/1768710099841-0"]','2025-11-18T08:59:53.556Z',0,33.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(6,'Apple ( pack of 3) ','Kashmiri Apples',replace('These apples are fresh, firm, and crisp with a clean, naturally sweet flavor. Handpicked for quality and freshness, they’re ideal for everyday snacking, salads, or cooking. Simple, reliable fruit that fits easily into daily meals.\n','\n',char(10)),4,109.0,'["product-images/1768640936747-0"]','2025-11-18T09:02:29.167Z',1,120.0,2,0,1.0,1,NULL,3.0,1); +INSERT INTO product_info VALUES(7,'Banana','Fresh bananas with a naturally sweet taste and soft, creamy texture.','Bananas supporting heart health through potassium, improving digestion with fiber, and providing an energy boost from carbohydrates. ',3,49.0,'["product-images/1768640009078-0"]','2025-11-22T01:37:58.613Z',0,60.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(8,'Kiwi','Fresh kiwis with sweet-tart flavor, juicy green flesh, and edible seeds.','Kiwi is rich in Vitamin C, which boosts immunity and keeps the body strong. It also has fiber that helps in digestion and keeps the stomach healthy. Eating kiwi improves skin glow and supports heart health.',4,119.0,'["product-images/1768647119198-0"]','2025-11-22T01:49:17.573Z',0,130.0,2,0,1.0,1,NULL,4.0,1); +INSERT INTO product_info VALUES(9,'Apollo Fish',replace('Boneless\nFresh tuna fish, high in protein and omega-3, ideal for curries, grilling, and pan-fry.','\n',char(10)),'Fresh sea-caught tuna fish with firm texture and rich flavor. Widely used for curries, steaks, grilling, and shallow frying. Naturally high in protein and omega-3 fatty acids, supporting muscle health and heart health. Cleaned and cut hygienically to retain freshness and taste.',1,296.0,'["product-images/1768832690994-0"]','2025-11-22T22:17:08.582Z',0,340.0,1,0,1.0,0,355.0,0.7,1); +INSERT INTO product_info VALUES(10,'Chicken leg piece ','6 pieces ','Fresh, meaty leg pieces with rich flavor and soft texture. Ideal for tandoori, BBQ, and home-style recipes.',4,249.0,'["product-images/1768390245969-0"]','2025-11-22T22:28:25.741Z',0,269.0,1,0,1.0,1,270.0,6.0,1); +INSERT INTO product_info VALUES(11,'Nagpur orange (pack 5)','Fresh oranges with juicy, sweet-tangy flesh and a refreshing citrus taste.','These oranges have a naturally juicy interior with a balanced sweet and tangy flavor. Though green on the outside, the flesh inside is bright, fresh, and full of citrus goodness. Ideal for everyday eating, fresh juice, or adding a refreshing twist to meals.',4,119.0,'["product-images/1768641635898-0"]','2025-11-22T22:30:28.878Z',0,150.0,2,0,1.0,1,150.0,5.0,1); +INSERT INTO product_info VALUES(12,'Lamb Mutton','','"Indulge in the rich, savory experience of our premium mutton. Sourced from the finest cuts, our muttons offers unparalleled tenderness and flavor. Whether you''re grilling a juicy steak, slow-cooking a tender roast, or creating a hearty stew, our mutton is the perfect choice for any culinary creation. Experience the difference quality makes – savor every delicious bite."',1,850.0,'["product-images/1764500702143-0","product-images/1764500702144-1"]','2025-11-30T05:35:04.520Z',1,870.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(13,'Amla (Gooseberry)','Fresh amla with a tangy, slightly sour taste and firm texture.','These fresh amlas are firm, tangy, and packed with natural goodness. Carefully selected for size and freshness, they’re perfect for eating raw, making juice, pickles, or adding to traditional recipes. A healthy fruit full of Vitamin C, with a natural bite and authentic flavor.',1,69.0,'["product-images/1768641988607-0"]','2025-11-30T05:46:29.900Z',0,79.0,2,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(14,'Mutton Boti (Goat Intestines)','Fresh mutton boti, rich in protein and iron, ideal for traditional curries and spicy dishes.','Freshly cleaned mutton boti sourced from healthy goats. Carefully washed and prepared for cooking traditional recipes like boti curry and spicy gravies. Rich in protein and iron, commonly used in regional cuisines. Cleaned hygienically and packed fresh.',1,389.0,'["product-images/1768834170995-0"]','2025-12-04T22:10:55.354Z',1,400.0,1,0,1.0,0,420.0,1.0,1); +INSERT INTO product_info VALUES(15,'Chicken Gizard','Fresh, cleaned chicken gizzards with a rich, meaty texture-ideal for curries, fry recipes, and traditional dishes.','Chicken gizzard is a flavorful and nutrient-rich cut known for its firm texture and deep taste. Carefully cleaned and hygienically packed, our gizzards are sourced fresh to ensure quality and freshness. Perfect for slow-cooked curries, spicy fries, stir-fries, and regional delicacies, chicken gizzard absorbs spices beautifully and delivers a hearty bite in every dish.',1,210.0,'["product-images/1768477813647-0","product-images/1768477813648-1"]','2025-12-06T12:35:43.241Z',1,250.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(16,'Arvi (Arbi) – Colocasia Root','Fresh arvi with soft texture when cooked, ideal for curries, fries, and dry sabzi.','Arvi, also known as colocasia or taro root, is a popular root vegetable used in many Indian dishes. When cooked properly, it becomes soft and creamy with a mildly nutty flavour. Arvi is commonly used in dry sabzis, gravies, and fried preparations. It absorbs spices well and pairs perfectly with both mild and spicy masalas. Naturally rich in dietary fiber and essential nutrients, arvi supports digestion and provides long-lasting energy. Freshly sourced and cleaned to ensure quality and taste. Must be washed and cooked thoroughly before consumption.',1,28.0,'["product-images/1769397372526-0"]','2025-12-12T03:09:59.286Z',0,33.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(17,'Tomato ','Healthy, tasty, and fresh tomatoes','Fresh, red, and juicy tomatoes to make your meals healthier and tastier.',1,28.0,'["product-images/1768640233068-0"]','2025-12-18T02:22:23.436Z',1,35.0,4,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(18,'Onions ','Fresh and flavorful onions for everyday cooking.','Healthy, fresh onions at the best quality and price',1,44.0,'["product-images/1769351976737-0"]','2025-12-18T03:37:08.849Z',0,48.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(19,'Potato','Fresh, healthy potatoes perfect for every dish.','A versatile vegetable every kitchen needs.',1,23.0,'["product-images/1768639707515-0"]','2025-12-18T03:40:28.496Z',0,29.0,4,0,1.0,1,50.0,0.5,1); +INSERT INTO product_info VALUES(20,'Mutton Head','Fresh mutton head rich in protein and collagen, ideal for traditional curries and soups.','Freshly sourced goat head, commonly used in traditional dishes and slow-cooked recipes. Contains head meat (sira) and bones that release rich flavor and collagen when cooked slowly. Popular in regional cuisines for its taste and nourishment. Cleaned thoroughly and packed hygienically.',4,379.0,'["product-images/1769353802270-0"]','2025-12-19T03:42:31.946Z',0,400.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(21,'Whole chicken - fresh cut','Fresh, tender whole chicken cleaned and cut hygienically for rich taste and high protein meals.','Our Whole Chicken is farm-fresh, carefully cleaned, and hygienically processed to lock in natural tenderness and flavor. Rich in protein and essential nutrients, it''s perfect for curries, roasting, grilling, or slow cooking. Delivered fresh to your doorstep, ensuring quality, taste, and nutrition in every bite.',1,559.0,'["product-images/1768539930897-0","product-images/1768539930899-1"]','2025-12-19T03:45:54.143Z',0,620.0,1,0,1.0,0,NULL,2.0,1); +INSERT INTO product_info VALUES(22,'Tuna Fish boneless ','Fresh tuna fish, high in protein and omega-3, ideal for curries, grilling, and pan-fry.',replace('Fresh sea-caught tuna with firm texture and rich flavor. Suitable for curry preparations, steaks, grilling, and shallow frying. Naturally high in protein and omega-3 fatty acids, supporting muscle and heart health. Cleaned and cut hygienically to retain freshness.\nBrutal truth','\n',char(10)),1,469.0,'["product-images/1768834996932-0"]','2025-12-19T03:53:12.867Z',0,529.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(23,'Chicken ( regular cut )- Small pieces ','Fresh, bone-in chicken pieces ideal for making rich and flavorful curries.','Freshly cut, bone-in chicken pieces perfect for rich, flavorful curries. Cleaned and hygienically packed to lock in tenderness and taste for a delicious home-style meal every time.',1,140.0,'["product-images/1767635527063-0"]','2025-12-19T03:53:53.748Z',1,160.0,1,0,1.0,1,149.0,0.5,1); +INSERT INTO product_info VALUES(24,'Chicken boneless','Fresh, tender boneless chicken pieces, perfectly trimmed for quick cooking. Ideal for curries, stir-fries, grills, and biryanis.','Fresh, tender boneless chicken pieces, perfectly trimmed for quick cooking. Ideal for curries, stir-fries, grills, and biryanis.',1,198.0,'["product-images/1768484106870-0"]','2025-12-19T03:59:46.418Z',0,220.0,1,0,1.0,1,230.0,0.5,1); +INSERT INTO product_info VALUES(25,'White Dragon Fruit','Fresh white dragon fruit with mild sweetness and soft, juicy flesh.','This white dragon fruit is fresh, mildly sweet, and refreshing with soft white flesh and tiny edible seeds. Carefully selected for size and freshness, it’s ideal for eating fresh, adding to fruit bowls, or blending into smoothies. Light on taste, easy to digest, and perfect for everyday healthy eating.',4,119.0,'["product-images/1768649838027-0"]','2025-12-19T07:39:11.874Z',0,130.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(26,'Fig (Anjeer)','Fresh fig with a soft flesh and mild, naturally sweet flavor.','These fresh figs are soft, juicy, and mildly sweet with a delicate texture. Carefully selected to avoid overripeness, they’re best enjoyed fresh or paired with desserts and salads. A premium fruit meant to be eaten gently and enjoyed slowly.',1,78.0,'["product-images/1768640645444-0"]','2025-12-22T05:34:50.001Z',1,94.0,2,0,1.0,0,NULL,0.25,1); +INSERT INTO product_info VALUES(27,'Brinjal ','Fresh medium-sized brinjal, rich in fiber, low in calories, and ideal for everyday curries and fries.','Freshly harvested brinjal with smooth skin and tender flesh. Mild in taste and versatile in cooking, it is commonly used in curries, stir-fries, bharta, and gravies. Naturally rich in fiber and antioxidants, making it suitable for regular home cooking. Washed and packed hygienically.',1,24.0,'["product-images/1768639645423-0"]','2025-12-22T06:01:30.466Z',0,30.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(28,'Mutton Boneless ','Tender boneless mutton rich in protein, ideal for quick curries, fry, and kebabs.','Freshly cut boneless mutton pieces with minimal fat and strong natural flavour. Suitable for fast-cooking dishes such as gravies, stir-fries, kebabs, and biryani. High in protein and essential minerals, supporting strength and energy. Cleaned and packed hygienically to ensure freshness and quality.',1,855.0,'["product-images/1769356702593-0"]','2025-12-22T06:14:24.499Z',1,879.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(29,' Bottle Gourd (Lauki)','Fresh medium-sized bottle gourd, low in calories, high in water content, easy to digest, and ideal for healthy everyday cooking.','Fresh bottle gourd with smooth green skin and soft, tender flesh. Light in taste and easy to digest, it is widely used in Indian home cooking for curries, dals, soups, and juices. Naturally low in calories and rich in water content, making it suitable for daily meals. Handpicked for freshness and packed hygienically.',4,29.0,'["product-images/1768823985921-0"]','2025-12-22T06:15:31.316Z',0,32.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(30,' Bitter Gourd (Karela)','Fresh bitter gourd, known to help control blood sugar and support digestion.','Fresh bitter gourd with firm texture and deep green color. Widely used in Indian cooking for stir-fries, curries, and juices. Naturally low in calories and rich in fiber, vitamins, and antioxidants. Commonly consumed for its potential benefits in blood sugar management and digestion. Wash thoroughly before use.',1,34.0,'["product-images/1768726783083-0"]','2025-12-22T06:16:16.981Z',0,42.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(31,'Lady Finger (Okra / Bhindi)','Fresh tender lady finger, soft and non-fibrous, ideal for fries and curries.','Lady finger, also known as okra or bhindi, is a popular vegetable used in everyday Indian cooking. Tender lady finger has a soft texture and mild flavour, making it perfect for fries, stir-fries, curries, and gravies. When fresh, it cooks evenly without becoming too sticky. Rich in dietary fiber, vitamins, and antioxidants, it supports digestion and overall health. Carefully sourced and packed to maintain freshness and tenderness. Wash well and trim the ends before cooking.',1,29.0,'["product-images/1769574792720-0"]','2025-12-22T06:17:07.804Z',0,34.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(32,'Lemons ','Farm-fresh lemons with high juice content and natural tangy flavor. Perfect for daily cooking, juices, and salads.','Fresh, handpicked lemons known for their strong aroma, thin skin, and high juice yield. Ideal for nimbu pani, curries, marinades, chutneys, and garnishing. Carefully selected to ensure firmness, freshness, and bright yellow color. Stored and delivered with proper care to maintain natural taste and quality.',4,29.0,'["product-images/1766406273176-0","product-images/1766406273178-1"]','2025-12-22T06:54:35.209Z',0,36.0,4,0,1.0,1,NULL,6.0,1); +INSERT INTO product_info VALUES(33,'Small Methi / Baby Fenugreek Leaves','Fresh small methi leaves with a mild bitterness, perfect for everyday cooking and quick stir-fries.','Small methi, also known as baby fenugreek leaves, is a tender and flavorful leafy vegetable widely used in Indian kitchens. Compared to regular methi, these leaves are smaller, softer, and less bitter, making them ideal for curries, dal, parathas, and simple stir-fries. They cook quickly and blend well with spices without overpowering the dish. Small methi is naturally rich in fiber, iron, and essential nutrients that support digestion and overall health. Carefully cleaned and freshly sourced, these leaves bring authentic taste and freshness to your daily meals.',4,15.0,'["product-images/1769396046557-0"]','2025-12-22T06:55:49.838Z',0,20.0,4,0,1.0,0,NULL,8.0,1); +INSERT INTO product_info VALUES(34,' Mutton Boneless – Mini Pack','Tender boneless mutton, high in protein, easy to cook, ideal for quick curries and fry.','Freshly cut boneless mutton pieces with minimal fat, perfect for quick cooking dishes like stir-fries, gravies, and kebabs. High in protein and rich in flavor, this mini pack is ideal for small families or single meals. Cleaned and packed hygienically to ensure freshness.',1,465.0,'["product-images/1769356039418-0"]','2025-12-22T06:56:25.537Z',1,489.0,1,0,1.0,0,NULL,0.25,1); +INSERT INTO product_info VALUES(35,'Mutton kheema','Freshly minced premium mutton, finely ground for rich flavor and juicy texture—perfect for kebabs, keema curry, cutlets, and stuffing.','Our mutton mince is prepared from carefully selected fresh cuts, hygienically cleaned and finely minced to deliver bold, authentic flavor in every bite. It has the ideal fat balance to stay juicy while cooking, making it suitable for keema curry, seekh kebabs, koftas, samosas, and stuffed parathas. No additives, no preservatives—just pure, high-quality mutton processed under strict hygiene standards for consistent taste, texture, and freshness.',1,429.0,'["product-images/1767636561867-0"]','2025-12-24T22:43:30.811Z',1,450.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(36,'Chicken Leg With Thigh Pack of 3','Fresh chicken leg with thigh, cut from tender, juicy chicken. Rich in flavor, naturally succulent, and ideal for frying, roasting, grilling, and curries.',replace('Chicken leg with thigh is a flavorful cut taken from the lower and upper leg portion of the chicken, known for its juicy texture and rich taste. This cut retains moisture during cooking, making it perfect for deep frying, tandoori, grilling, roasting, and slow-cooked curries. Hygienically cleaned and neatly cut to ensure freshness and quality. High in protein and full of natural flavor, it delivers a satisfying, tender bite in every dish.\nIf this is for a premium app, we can refine the tone.\nIf it’s for mass-market, this is already more than enough.\nStop being unclear—next time, say where it will be used.','\n',char(10)),1,266.0,'["product-images/1768413754684-0"]','2025-12-24T22:44:23.272Z',0,280.0,1,0,1.0,1,280.0,1.0,1); +INSERT INTO product_info VALUES(37,'Drum sticks ','Rich in fiber, vitamins, supports digestion.','Fresh, tender moringa pods used in sambar, curries, and stir-fries.',4,79.0,'["product-images/1766636589779-0"]','2025-12-24T22:53:10.791Z',0,89.0,4,0,1.0,0,NULL,6.0,1); +INSERT INTO product_info VALUES(38,'Sapota (Chikoo)','Fresh sapota with a soft texture and naturally sweet, malty flavor.','This sapota is fresh, ripe, and naturally sweet with a soft, grainy texture. Selected for good ripeness and flavor, it’s perfect for eating as it is or adding to desserts and milkshakes. A classic fruit with a rich taste and satisfying bite.',1,76.0,'["product-images/1768640403001-0"]','2025-12-24T22:53:56.874Z',1,85.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(39,'Mango','Fresh seasonal mangoes with juicy flesh and natural sweetness.','These mangoes are fresh, ripe, and full of natural sweetness with juicy, flavorful flesh. Carefully selected for ripeness and quality, they’re perfect for eating fresh, making juices, smoothies, or desserts. A seasonal favorite that brings rich taste and aroma to every bite.',1,149.0,'["product-images/1768650081183-0"]','2025-12-24T22:55:16.935Z',1,169.0,2,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(40,'Chicken (regular cut) Large pieces ','Fresh chicken curry cut with large pieces, high in protein and ideal for rich gravies and slow cooking.','Fresh broiler chicken cut into large curry-sized pieces for hearty home-style cooking. Ideal for slow-cooked curries, biryanis, and gravies where bigger pieces retain juiciness and flavor. High in protein and prepared hygienically to ensure freshness and quality.',1,133.0,'["product-images/1767637606890-0"]','2026-01-05T12:56:48.180Z',0,145.0,1,0,1.0,1,150.0,0.5,1); +INSERT INTO product_info VALUES(41,'Chicken mince/kheema 500 g','Fresh, lean chicken mince made from premium chicken meat. Finely ground, high in protein, low in fat—perfect for kebabs, cutlets, burgers, curries, and wraps.',replace('Our chicken mince is prepared from carefully selected, fresh chicken meat and finely ground to achieve a smooth, consistent texture. It is naturally lean, rich in high-quality protein, and free from added preservatives, fillers, or artificial colors.\nThis mince cooks quickly and absorbs spices exceptionally well, making it ideal for a wide range of dishes—from juicy kebabs, patties, and meatballs to flavorful curries, stuffed parathas, and wraps. Every batch is hygienically processed and packed to retain freshness, flavor, and nutritional value.\nIf you’re serious about clean eating, muscle-friendly meals, or simply better taste, this chicken mince does the job without compromises.','\n',char(10)),1,189.0,'["product-images/1768307047191-0"]','2026-01-13T06:54:08.959Z',0,200.0,1,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(42,'Chicken Breast Boneless - Mini Pack','Fresh boneless chicken breast mini pack. Lean, tender, and high in protein—perfect for quick meals, salads, grilling, and stir-fries.','Our boneless chicken breast mini pack is made from premium, skinless chicken breast, carefully trimmed and hygienically processed. This cut is lean, low in fat, and rich in protein, making it ideal for healthy cooking. The mini pack size is perfect for small households or single meals, ensuring minimal waste and maximum freshness. Suitable for grilling, pan-frying, boiling, salads, wraps, and meal prep recipes. Free from added preservatives and artificial colors.',1,139.0,'["product-images/1768393778962-0"]','2026-01-14T06:59:39.928Z',0,150.0,1,0,1.0,1,160.0,0.25,1); +INSERT INTO product_info VALUES(43,'Strawberry ','Fresh, juicy strawberries with a natural sweetness and soft bite. Handpicked for vibrant color, rich aroma, and everyday freshness.','Bright red, naturally sweet, and bursting with juice — these strawberries are selected at peak ripeness for their bold flavor and smooth texture. Perfect for desserts, smoothies, or eating straight from the box.',1,135.0,'["product-images/1768638795991-0"]','2026-01-17T03:03:16.953Z',1,160.0,2,0,1.0,0,NULL,0.2,1); +INSERT INTO product_info VALUES(44,'Kinu Oranges (pack of 5)','Fresh, juicy oranges with a natural balance of sweetness and tang. Perfect for snacking or fresh juice.','These oranges are naturally juicy, refreshing, and full of real citrus flavor. Grown and picked at the right time, they have a firm peel, bright color, and a sweet-tangy taste inside. Ideal for everyday eating, fresh juice, or adding a fresh citrus touch to your meals.',4,119.0,'["product-images/1768639090932-0"]','2026-01-17T03:08:11.731Z',0,130.0,2,0,1.0,1,NULL,5.0,1); +INSERT INTO product_info VALUES(45,replace('Tomato\n','\n',char(10)),replace('Indian Tomato\n\nJuicy, tangy & ideal for all Indian curries\n500 g','\n',char(10)),'',1,19.0,'["product-images/1768639292540-0"]','2026-01-17T03:11:32.838Z',0,25.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(46,'Pomegranate ','Fresh pomegranate with deep red seeds and a naturally sweet-tangy taste.','This pomegranate is fresh, juicy, and full of vibrant red seeds with a balanced sweet and slightly tangy flavor. Carefully selected for firmness and freshness, it’s perfect for eating on its own, adding to salads, or using in fresh juice. No artificial shine — just real fruit with real taste.',4,109.0,'["product-images/1768639705530-0"]','2026-01-17T03:18:26.329Z',0,130.0,2,0,1.0,1,NULL,3.0,1); +INSERT INTO product_info VALUES(47,'Green Apple (pack 2) ','Crisp green apples with a tangy-sweet taste and firm, juicy texture.','These green apples are fresh, firm, and naturally crisp with a tangy-sweet flavor. Handpicked for quality and freshness, they’re perfect for snacking, making salads, or juicing. A refreshing fruit that adds a burst of natural flavor to any meal or snack.',4,119.0,'["product-images/1768642455479-0"]','2026-01-17T04:04:16.269Z',0,130.0,2,0,1.0,1,NULL,2.0,1); +INSERT INTO product_info VALUES(48,'Guava (Jama Kaya)','Fresh guavas with a sweet-tangy flavor and crisp, juicy texture.','These guavas are fresh, firm, and packed with natural sweetness and tang. Carefully selected for ripeness and flavor, they’re perfect for eating raw, adding to salads, or making juice. A nutritious fruit that’s rich in vitamins and refreshing in every bite.',1,55.0,'["product-images/1768642724520-0"]','2026-01-17T04:08:44.824Z',0,68.0,2,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(49,'Pear','Fresh pears with soft, juicy texture and a naturally sweet flavor.','These fresh pears are firm yet tender, naturally juicy, and mildly sweet. Handpicked for quality and ripeness, they’re perfect for eating as-is, adding to fruit salads, or using in desserts. A refreshing fruit that balances sweetness and softness in every bite.',4,119.0,'["product-images/1768643138910-0"]','2026-01-17T04:15:39.802Z',1,159.0,2,0,1.0,1,NULL,4.0,1); +INSERT INTO product_info VALUES(50,'Alu Bukhara (Plum / Prunes)','Fresh plums (Alu Bukhara) with a juicy, sweet‑tart flavor, perfect for snacking or making chutneys and juices.','Alu Bukhara refers to ripe plums with rich, juicy flesh and a natural sweet‑tart taste. These plums are refreshing and flavorful, great for eating fresh or using in chutneys, jams, and traditional dishes. When dried, they’re also known as prunes — a nutritious, fiber‑rich snack with long shelf life. Packed with vitamins and antioxidants, they’re a wholesome addition to your fruit selection. ',4,119.0,'["product-images/1768643354251-0"]','2026-01-17T04:19:14.555Z',0,128.0,2,0,1.0,0,NULL,4.0,1); +INSERT INTO product_info VALUES(51,'Shahtoot (Mulberry)','Fresh mulberries with a naturally sweet flavor and juicy, soft texture.','These fresh mulberries are ripe, juicy, and naturally sweet with a delicate texture. Perfect for snacking, smoothies, desserts, or topping cereals and salads. Carefully selected for freshness and flavor, mulberries are also packed with vitamins and antioxidants, making them a healthy and delicious choice.',1,169.0,'["product-images/1768646295695-0"]','2026-01-17T05:08:16.491Z',1,180.0,2,0,1.0,0,NULL,0.25,1); +INSERT INTO product_info VALUES(52,'Sugarcane','Fresh sugarcane stalks with natural sweetness, juicy and perfect for chewing or juice extraction.','These sugarcane stalks are fresh, juicy, and naturally sweet. Perfect for chewing directly or extracting fresh sugarcane juice at home. Carefully selected for quality and ripeness, sugarcane provides a refreshing, natural source of energy and flavor.',4,29.0,'["product-images/1768646744949-0"]','2026-01-17T05:15:45.254Z',1,40.0,2,0,1.0,0,NULL,2.0,1); +INSERT INTO product_info VALUES(53,'Hass Avocado','Creamy Hass avocados with rich, buttery texture and mild, nutty flavor.','Hass avocados are known for their distinct creamy texture and mild, nutty flavor. With thick, bumpy skin that darkens as it ripens, these avocados offer smooth, rich green flesh perfect for salads, smoothies, sandwiches, or spreads like guacamole. Packed with healthy fats, fiber, and essential vitamins, they’re a nutritious addition to any diet. Treat them gently and ripen at room temperature for best taste and texture.',4,239.0,'["product-images/1768646932088-0"]','2026-01-17T05:18:52.342Z',0,250.0,2,0,1.0,0,NULL,2.0,1); +INSERT INTO product_info VALUES(54,'Blueberry','Fresh blueberries with a sweet-tart flavor, juicy texture, and rich purple color.','These fresh blueberries are plump, juicy, and naturally sweet-tart with deep purple color. Perfect for snacking, adding to cereals, desserts, or smoothies. Packed with antioxidants, vitamins, and flavor, blueberries are a nutritious and premium fruit choice. Handle carefully as they’re delicate and perishable.',1,280.0,'["product-images/1768649454994-0"]','2026-01-17T06:00:55.308Z',0,310.0,2,0,1.0,0,NULL,0.15,1); +INSERT INTO product_info VALUES(55,'Muscat Grapes','Fresh seasonal mangoes with juicy flesh and natural sweetness.','These mangoes are fresh, ripe, and full of natural sweetness with juicy, flavorful flesh. Carefully selected for ripeness and quality, they’re perfect for eating fresh, making juices, smoothies, or desserts. A seasonal favorite that brings rich taste and aroma to every bite.',1,69.0,'["product-images/1768650709484-0"]','2026-01-17T06:21:49.844Z',1,80.0,2,0,1.0,0,NULL,0.25,1); +INSERT INTO product_info VALUES(56,'Muskmelon (Kharbuja)','For bigger-sized muskmelon, choose the 1 kg option.','This fresh muskmelon (kharbuja) has a naturally sweet aroma and soft, juicy orange flesh. Carefully selected for ripeness, it’s refreshing, hydrating, and perfect for eating fresh, fruit salads, or summer juices. Best enjoyed chilled for maximum sweetness and flavor.',1,67.0,'["product-images/1768651334320-0"]','2026-01-17T06:32:14.675Z',0,72.0,2,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(57,'Pineapple','Note: This is a medium-size pineapple.','This fresh pineapple is naturally juicy with a sweet and slightly tangy flavor. Selected for ripeness and freshness, it’s perfect for eating fresh, juices, salads, and desserts. Best enjoyed chilled for maximum taste.',4,59.0,'["product-images/1768651774899-0"]','2026-01-17T06:39:35.228Z',1,69.0,2,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(58,'Papaya','Note: This is a medium-size papaya.','This fresh papaya is naturally soft, mildly sweet, and easy to digest. Carefully selected for ripeness, it’s ideal for eating fresh, fruit bowls, smoothies, or breakfast plates. Best consumed ripe for smooth texture and better taste.',4,59.0,'["product-images/1768652061701-0"]','2026-01-17T06:44:22.034Z',0,75.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(59,'Watermelon','Add 1kg if you want watermelon in big size','This fresh watermelon has bright red, juicy flesh with natural sweetness and high water content. Perfect for summer refreshment, fruit salads, juices, or eating chilled. Carefully selected for freshness and firmness.',1,98.0,'["product-images/1768653009851-0"]','2026-01-17T07:00:10.168Z',0,110.0,2,0,1.0,1,NULL,2.5,1); +INSERT INTO product_info VALUES(60,'Green Grapes','Supports immunity, provides natural energy, and is rich in antioxidants.','These fresh green grapes are handpicked for firm texture and sweet, juicy flavor. Perfect for snacking, fruit salads, juices, or desserts, they’re packed with vitamins and antioxidants. Carefully stored to maintain freshness from farm to table.',1,78.0,'["product-images/1768653997561-0"]','2026-01-17T07:16:37.967Z',0,90.0,2,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(61,'Red Globe Grapes','High in antioxidants, supports immunity, and provides natural energy. Seeded','These Red Globe grapes are large, plump, and naturally sweet with firm, juicy flesh. Carefully selected for size and freshness, they’re perfect for snacking, fruit salads, desserts, or making fresh juice. Packed with vitamins and antioxidants, Red Globe grapes are a healthy and premium choice for everyday consumption.',1,99.0,'["product-images/1768654475850-0"]','2026-01-17T07:24:36.247Z',0,119.0,2,0,1.0,1,NULL,0.25,1); +INSERT INTO product_info VALUES(62,'Black Grapes','Supports immunity, rich in antioxidants, and provides natural energy.','These black grapes are handpicked for firm texture, juiciness, and natural sweetness. Perfect for snacking, fruit salads, desserts, or making fresh juice. Rich in vitamins and antioxidants, they’re a healthy and refreshing fruit for everyday consumption.',1,78.0,'["product-images/1768654740988-0"]','2026-01-17T07:29:01.488Z',0,91.0,2,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(63,'Pink Dragon Fruit','Boosts immunity, rich in antioxidants, supports digestion, and provides natural energy.','This pink dragon fruit is fresh, juicy, and mildly sweet with soft flesh and tiny edible seeds. Carefully selected for ripeness and quality, it’s perfect for eating fresh, adding to fruit bowls, smoothies, or desserts. Exotic in appearance, nutritious, and rich in antioxidants.',4,269.0,'["product-images/1768658094891-0"]','2026-01-17T08:24:55.423Z',1,289.0,2,0,1.0,1,NULL,2.0,1); +INSERT INTO product_info VALUES(64,'Broccoli',replace('Note: This is a medium-size broccoli.\nRich in fiber and vitamins, supports digestion and overall nutrition.','\n',char(10)),'This fresh broccoli is crisp, green, and carefully selected for firmness and freshness. Ideal for stir-fries, salads, soups, or steaming. Mild in taste and versatile in cooking, it’s best used fresh for good texture and flavor.',1,59.0,'["product-images/1768709567040-0"]','2026-01-17T22:42:48.248Z',1,69.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(65,'Beetroot','Supports blood health, rich in fiber, and helps maintain energy levels.','This fresh beetroot is firm, clean, and naturally rich in color. Carefully selected for freshness, it’s ideal for cooking, salads, juices, and curries. Mildly sweet when cooked and earthy in flavor, beetroot is a versatile vegetable used in everyday meals.',1,28.0,'["product-images/1768710434326-0"]','2026-01-17T22:57:14.620Z',0,35.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(66,'Cabbage(Patta Gobhi)',replace('Note: This is a medium-size cabbage.\nRich in fiber, supports digestion, and low in calories.','\n',char(10)),'This fresh green cabbage is medium-sized, firm, and tightly packed with pale green leaves. It has a mild flavor and crunchy texture, making it ideal for curries, stir-fries, salads, soups, and fried snacks. Carefully selected for freshness and cleanliness, this cabbage is suitable for everyday cooking.',4,27.0,'["product-images/1768710760133-0"]','2026-01-17T23:02:40.448Z',0,35.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(67,'Cauliflower(Phool Gobhi)',replace('Note: This is a medium-size cauliflower.\nHigh in fiber and vitamin C, supports digestion and immunity.','\n',char(10)),'This fresh medium-sized cauliflower has compact, creamy-white florets and crisp green leaves. Carefully selected for firmness and freshness, it is ideal for curries, stir-fries, fried snacks, soups, and biryani-style dishes. Clean and naturally grown, suitable for daily home cooking.',4,28.0,'["product-images/1768711261174-0"]','2026-01-17T23:11:02.227Z',0,32.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(68,'Sweet Potato','High in fiber, supports digestion, and provides natural energy.','These medium-sized red sweet potatoes have smooth skin and pale, creamy flesh with a mildly sweet taste. Ideal for boiling, roasting, frying, and traditional Indian dishes, they cook evenly and remain soft inside. Carefully selected for freshness and quality, suitable for daily home cooking.',1,32.0,'["product-images/1768711919135-0"]','2026-01-17T23:21:59.416Z',0,34.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(69,'Carrot','Rich in vitamin A, supports eye health and immunity.','These fresh medium-sized carrots are firm, smooth-skinned, and bright in color. They have a crisp texture and mildly sweet taste, making them perfect for salads, curries, stir-fries, juices, and snacks. Carefully selected for freshness and quality, suitable for everyday cooking.',1,29.0,'["product-images/1768712093829-0"]','2026-01-17T23:24:54.154Z',0,35.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(70,'White Radish(Mooli)','Aids digestion, rich in fibre, supports gut health.','Fresh white radish (mullangi) is crisp, juicy, and naturally pungent with a refreshing bite. Ideal for sambar, curries, stir-fries, salads, and chutneys. Carefully sourced to ensure firmness, clean skin, and freshness for daily home cooking.',4,19.0,'["product-images/1768712490280-0"]','2026-01-17T23:31:30.647Z',0,25.0,4,0,1.0,0,NULL,2.0,1); +INSERT INTO product_info VALUES(71,replace('Curry Leaves(Karivepak)\n','\n',char(10)),replace('1 bunch\nAdds aroma, supports digestion, and enhances flavour in cooking.','\n',char(10)),'These fresh curry leaves are aromatic, clean, and deep green in colour. Carefully selected to enhance flavour, they are essential for tempering and everyday South Indian cooking. Best used fresh for maximum aroma and taste.',4,15.0,'["product-images/1768713206145-0"]','2026-01-17T23:43:26.487Z',0,22.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(72,'Spinach (Palak)','Rich in iron, supports blood health, and boosts immunity.','Fresh spinach (palak) leaves are medium-sized, crisp, and bright green. Carefully selected for freshness, they are ideal for curries, soups, smoothies, salads, and dals. Best consumed fresh to retain nutrients, flavor, and texture.',4,14.0,'["product-images/1768713537512-0"]','2026-01-17T23:48:57.829Z',0,19.0,4,0,1.0,1,NULL,7.0,1); +INSERT INTO product_info VALUES(73,'Coconut','Rich in natural electrolytes, supports hydration, and provides energy.','This fresh medium-sized coconut is carefully selected for quality and freshness. Ideal for drinking tender coconut water, making coconut milk, chutneys, desserts, or cooking. Naturally nutritious and rich in flavor, it’s perfect for daily home use.',4,59.0,'["product-images/1768718685357-0"]','2026-01-17T23:51:54.586Z',0,79.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(74,'Fenugreek Leaves(Methi)','Rich in vitamins, supports digestion, and enhances flavor in cooking.','These fresh fenugreek leaves (methi) are medium-sized, aromatic, and vibrant green. Carefully selected for freshness, they are ideal for curries, parathas, dals, and seasoning. Best used fresh to retain aroma, flavor, and nutritional value.',4,18.0,'["product-images/1768713886512-0"]','2026-01-17T23:54:47.138Z',0,25.0,4,0,1.0,0,NULL,10.0,1); +INSERT INTO product_info VALUES(75,'Murrel / Korameenu / కోరమీను - Live','Fresh murrel fish, high in protein, known for aiding recovery and boosting strength.',' Fresh freshwater murrel fish (snakehead) known for its firm flesh and rich taste. Highly valued in Indian households for its nutritional benefits, especially during recovery and post-illness diets. Rich in protein and essential nutrients. Ideal for curries and traditional preparations. Cleaned and packed hygienically to retain freshness.',1,489.0,'["product-images/1768817786453-0","product-images/1768817786455-1"]','2026-01-18T00:08:16.173Z',0,580.0,1,0,1.0,1,600.0,1.0,1); +INSERT INTO product_info VALUES(76,'Coriander Leaves (Kothimeer)','Fresh coriander leaves with a strong aroma, perfect for garnishing and cooking.','Freshly harvested coriander leaves with tender stems and vibrant green color. Widely used in Indian cooking for garnishing curries, chutneys, salads, and rice dishes. Adds a refreshing flavor and aroma to everyday meals. Wash thoroughly before use.',4,19.0,'["product-images/1768727264220-0"]','2026-01-18T03:37:45.047Z',0,25.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(77,'Gongura (Sorrel Leaves)','Fresh gongura leaves with a natural tangy taste, perfect for traditional Andhra dishes and chutneys.','Gongura, also known as sorrel leaves, is a popular leafy vegetable widely used in Andhra and Telangana cuisine. Known for its unique sour and refreshing flavour, gongura adds a distinctive taste to dals, curries, chutneys, and pickles. The leaves are tender and aromatic, making them ideal for both cooking and grinding. Naturally rich in iron, antioxidants, and essential vitamins, gongura supports digestion and overall health. Freshly sourced and carefully cleaned to retain its natural taste and quality. Wash thoroughly before use and cook fresh for the best flavour.',4,16.0,'["product-images/1769396724595-0"]','2026-01-18T08:56:30.867Z',0,19.0,4,0,1.0,0,NULL,6.0,1); +INSERT INTO product_info VALUES(78,'Green Chillies','Fresh green chillies rich in vitamin C, add heat and flavor to everyday cooking.',' Fresh green chillies with bright green color and firm texture. Commonly used in Indian cooking to add spice and aroma to curries, stir-fries, chutneys, and snacks. Naturally rich in vitamin C and antioxidants. Wash thoroughly before use. Packed fresh for daily kitchen needs.',1,29.0,'["product-images/1769241234003-0"]','2026-01-18T09:03:36.108Z',0,32.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(79,'Red Carrot ','Big-sized red carrots with natural sweetness, ideal for salads, juices, and cooking.','Fresh big-sized red carrots with deep red color and firm texture. Naturally sweet and juicy, these carrots are rich in beta-carotene, fiber, and antioxidants. Perfect for raw salads, juices, halwa, soups, and everyday cooking. Carefully selected for size and freshness, cleaned and packed hygienically.',1,39.0,'["product-images/1768822893380-0"]','2026-01-19T06:11:34.210Z',0,47.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(80,'Country Chicken (Desi / Natu Kodi)','Fresh country chicken, high in protein and rich in natural flavor, ideal for traditional slow-cooked dishes.','Freshly sourced country chicken known for its firm texture and strong taste. Preferred for traditional curries, soups, and slow-cooked recipes. Naturally high in protein and considered more nutritious than broiler chicken. Cleaned and cut hygienically for safe cooking.',1,849.0,'["product-images/1769063336125-0"]','2026-01-22T00:58:57.053Z',0,920.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(81,'Tigers prawns large ','Premium tiger prawns rich in protein and omega-3, ideal for grilling, frying, and special dishes.','Fresh premium tiger prawns known for their large size, firm texture, and rich taste. Perfect for grilling, frying, curries, and restaurant-style recipes. High in protein and omega-3 fatty acids, supporting muscle and heart health. Available cleaned or uncleaned and packed hygienically to maintain freshness.',1,669.0,'["product-images/1769063467386-0"]','2026-01-22T01:01:08.364Z',0,700.0,1,0,1.0,0,NULL,0.65,1); +INSERT INTO product_info VALUES(82,'Fresh Prawns – Medium (Cleaned & Deveined)','High in protein and omega-3, supports muscle growth and heart health.','Fresh prawns with firm texture and natural sweetness. Ideal for curries, fry, grills, and Asian-style dishes. Rich in protein and omega-3 fatty acids, supporting muscle and heart health. Available cleaned or uncleaned and packed hygienically to maintain freshness.',1,389.0,'["product-images/1769063660493-0"]','2026-01-22T01:04:21.712Z',0,419.0,1,0,1.0,0,NULL,0.65,1); +INSERT INTO product_info VALUES(83,'Rohu- రోహు live ','Fresh rohu fish rich in protein and omega-3, ideal for everyday curries and home cooking.','Freshwater rohu fish with soft texture and mild flavor, widely used in Indian households for daily meals. Suitable for curry preparations and light frying. Naturally rich in protein and omega-3 fatty acids, supporting muscle health and balanced nutrition. Cleaned and cut hygienically to ensure freshness and quality.',1,159.0,'["product-images/1769149204037-0"]','2026-01-23T00:50:05.311Z',0,180.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(84,'Mutton Brain (Bheja). మటన్ బ్రెయిన్ (భేజా)','Fresh mutton brain, rich in healthy fats and protein, ideal for traditional bheja fry and curries.','Freshly sourced mutton brain (bheja) from healthy goats. Known for its soft texture and rich taste, it is commonly used in traditional dishes like bheja fry and masala. Rich in healthy fats and nutrients. Cleaned carefully and packed hygienically to maintain freshness.',4,119.0,'["product-images/1769149707440-0"]','2026-01-23T00:56:40.140Z',0,130.0,1,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(85,'Mutton Paya (Goat Trotters)','Fresh mutton paya rich in collagen and minerals, ideal for nourishing paya soup.','Freshly cleaned mutton paya (goat trotters) commonly used to prepare traditional paya soup. When slow-cooked, paya releases natural collagen and minerals, making the soup rich, flavorful, and nourishing. Popular for strength recovery and home-style remedies. Cleaned thoroughly and packed hygienically for freshness.',4,259.0,'["product-images/1769150471654-0","product-images/1769150471655-1"]','2026-01-23T01:11:12.693Z',0,270.0,1,0,1.0,0,NULL,4.0,1); +INSERT INTO product_info VALUES(86,'Mutton Chops - మటన్ చాప్స్','Fresh mutton chops, rich in protein and iron, ideal for curries and slow cooking.','Fresh mutton chops cut from tender sections with bone, known for rich flavor and juiciness. Perfect for slow-cooked curries, gravies, and traditional dishes where bone enhances taste. High in protein and iron, supporting strength and energy. Cleaned and cut hygienically for freshness.',1,419.0,'["product-images/1769151216776-0"]','2026-01-23T01:23:37.665Z',1,440.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(87,'Mutton Soup Bones -మటన్ సూప్ ఎముకలు','Fresh mutton soup bones rich in collagen and minerals, ideal for nourishing soups and broths.',' Fresh mutton soup bones cut from healthy goat meat, perfect for preparing rich and flavorful soups and bone broths. Slowly cooked bones release natural collagen, minerals, and nutrients, making them ideal for strength recovery and traditional home remedies. Cleaned hygienically and packed fresh for daily cooking.',1,149.0,'["product-images/1769151844424-0"]','2026-01-23T01:34:05.440Z',0,179.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(88,'Purple Cabbage (Red Cabbage)',replace('Medium-sized purple cabbage\nFresh purple cabbage rich in antioxidants and fiber, supports digestion and immunity.','\n',char(10)),'Fresh purple (red) cabbage with crisp texture and vibrant color. Commonly used in salads, stir-fries, slaws, and garnishing. Naturally rich in antioxidants, fiber, and vitamin C, helping support digestion and overall health. Wash thoroughly before use. Packed fresh for daily cooking.',4,99.0,'["product-images/1769394457296-0"]','2026-01-25T20:57:37.763Z',0,110.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(89,'Light Purple Brinjal','Fresh light purple brinjal rich in fiber and antioxidants, ideal for curries and fries.','Fresh light purple brinjal with smooth skin and tender flesh, handpicked for everyday cooking. This variety cooks quickly and absorbs spices well, making it perfect for curries, fries, bharta, and stir-fried dishes. Mild in taste and easy to digest, it is a regular choice in Indian kitchens. Rich in fiber and antioxidants, it supports digestion and overall health. Wash thoroughly before use. Best used fresh for maximum taste and texture.',1,29.0,'["product-images/1769395184980-0"]','2026-01-25T21:09:46.227Z',0,40.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(90,'Indian Yellow Cucumber (Madras / Dosakai)','Fresh Indian yellow cucumber, also known as Madras cucumber, mild and crisp, perfect for salads, pickles, and cooking.','Indian yellow cucumber, also called Madras cucumber, is a rare and vibrant variety with tender yellow skin and crisp, juicy flesh. Favored in Indian kitchens, it is perfect for fresh salads, traditional pickles, or lightly cooked curries. Naturally rich in fiber, vitamins, and antioxidants, it promotes digestion and overall wellness. Carefully harvested and packed to retain freshness, this cucumber delivers mild sweetness and a refreshing crunch to everyday meals. Wash thoroughly before use and consume fresh for maximum taste.',1,27.0,'["product-images/1769398103853-0"]','2026-01-25T21:58:24.668Z',0,29.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(91,'Green Peas','Fresh green peas with natural sweetness, ideal for curries, pulao, and snacks.','Fresh green peas, carefully harvested for their sweetness, tenderness, and bright green color. Perfect for adding to Indian curries, pulao, stir-fries, soups, and snacks. Rich in protein, fiber, vitamins, and minerals, green peas support digestion and overall health. Available fresh or shelled for convenience, these peas are packed to retain their crisp texture and natural flavor. Wash thoroughly before use and cook fresh for the best taste.',1,39.0,'["product-images/1769398710713-0"]','2026-01-25T22:08:31.554Z',0,44.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(92,'French Beans (Chikkudukaya)','Fresh Benis with crisp texture, ideal for stir-fries, curries, and salads.','Fresh Benis, also known as French beans or cluster beans, are tender and crisp vegetables widely used in Indian cooking. Perfect for stir-fries, curries, and salads, these beans cook quickly and absorb spices well. Naturally rich in fiber, vitamins, and minerals, Benis supports digestion and overall wellness. Carefully handpicked and packed to retain freshness, these beans bring color, crunch, and nutrition to your daily meals. Wash thoroughly before cooking.',1,29.0,'["product-images/1769399617573-0"]','2026-01-25T22:23:38.391Z',0,32.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(93,'Red & Yellow Capsicum (Bell Peppers)','Fresh red and yellow capsicum with crisp texture and mild sweetness, perfect for cooking and salads.','Red and yellow capsicum, also known as bell peppers, are vibrant, crunchy vegetables with a naturally mild and slightly sweet flavour. Commonly used in stir-fries, curries, salads, and continental dishes, these capsicums add colour and nutrition to meals. Rich in vitamin C, antioxidants, and dietary fiber, they help support immunity and overall health. Carefully selected and packed to maintain freshness, firmness, and bright colour. Wash thoroughly and cut as required before use.',1,89.0,'["product-images/1769571126092-0"]','2026-01-27T22:02:07.050Z',0,96.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(94,'Gawar Beans (Cluster Beans)','Fresh tender gawar beans, ideal for stir-fries, curries, and traditional dishes.','Gawar beans, also known as cluster beans, are a traditional vegetable widely used in Indian cooking. These tender green pods have a slightly earthy flavour and firm texture, making them perfect for stir-fries, dry sabzis, curries, and dals. Rich in dietary fiber, vitamins, and minerals, gawar beans support digestion and help maintain blood sugar balance. Carefully sourced and packed to retain freshness, tenderness, and natural colour. Wash thoroughly, trim ends, and cook well before consumption.',1,29.0,'["product-images/1769571810861-0"]','2026-01-27T22:13:31.656Z',0,35.0,4,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(95,'Dondakaya (Ivy Gourd)','Fresh tender ivy gourd, ideal for fries, stir-fries, and curries.',replace('Long Description (human-written, not robotic)\nIvy gourd, commonly known as tindora or dondakaya, is a popular vegetable used in daily Indian cooking. These small green gourds have a mild taste and firm texture that works perfectly for shallow frying, stir-fries, and traditional curries. Tender ivy gourd cooks quickly and absorbs spices well without turning mushy. It is naturally low in calories and rich in fiber, making it suitable for light and healthy meals. Carefully selected to ensure freshness, uniform size, and good cooking quality.','\n',char(10)),1,39.0,'["product-images/1769571978680-0"]','2026-01-27T22:16:18.992Z',0,50.0,4,0,1.0,1,NULL,0.5,1); +INSERT INTO product_info VALUES(96,'Pineapple – Large','Large-sized fresh pineapple with juicy, sweet-tangy flesh.','This large pineapple is carefully selected for size and ripeness, offering juicy golden flesh with a naturally sweet and mildly tangy taste. Perfect for fresh juices, fruit salads, desserts, and cooking, it delivers more pulp and better value. Ideal for families or recipes that need a generous quantity of fresh pineapple.',4,109.0,'["product-images/1769576743718-0"]','2026-01-27T23:35:44.520Z',0,120.0,2,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(97,'Pudina (Mint Leaves)','Fresh aromatic mint leaves, ideal for chutneys, curries, and drinks.','Pudina, also known as mint leaves, is a fragrant herb widely used in Indian cooking. Its refreshing aroma and cooling taste make it perfect for chutneys, raitas, biryani, curries, and beverages like mint water and mojito. Carefully selected for freshness, these tender green leaves add both flavor and aroma to everyday dishes and are best used fresh.',4,19.0,'["product-images/1769577010969-0"]','2026-01-27T23:40:11.263Z',0,25.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(98,'Mutton Curry Cut (Regular)– 500 g','Fresh mutton curry cut with bone, suitable for everyday curries.','Mutton curry cut (regular) includes a balanced mix of bone and meat, making it ideal for everyday home-style curries and gravies. Cut from fresh goat meat, these pieces cook well in slow and pressure-cooked dishes, releasing rich flavour into the gravy. Cleaned and cut hygienically, this pack is suitable for regular family meals.',1,419.0,'["product-images/1770051810386-0"]','2026-02-02T11:33:31.411Z',1,459.0,1,0,1.0,0,NULL,0.5,1); +INSERT INTO product_info VALUES(99,'Mutton Curry Cut (Regular) – 750 g','Fresh mutton curry cut with bone, ideal for family-sized curries.','Mutton curry cut (regular) – 750 g includes a well-balanced mix of bone and meat, perfect for preparing rich and flavorful curries. Cut from fresh goat meat, these pieces are suitable for slow cooking and pressure cooking, allowing the meat to turn tender while enhancing the taste of the gravy. Cleaned and cut hygienically, this pack is ideal for medium to large family meals.',1,635.0,'["product-images/1770051959669-0"]','2026-02-02T11:36:00.205Z',1,660.0,1,0,1.0,0,NULL,0.75,1); +INSERT INTO product_info VALUES(100,'Irani Apple. Pack of (4)','Fresh Irani apples with crisp texture and mildly sweet taste.','Irani apples, also known as Iranian apples, are known for their firm texture, long shelf life, and mildly sweet flavor. These apples are crisp and juicy, making them suitable for fresh consumption, fruit salads, and juicing. Carefully selected for quality and freshness, Irani apples are a popular everyday fruit choice due to their balanced taste and good keeping quality. Wash thoroughly before consumption.',4,99.0,'["product-images/1770212631435-0"]','2026-02-04T08:13:52.295Z',0,119.0,2,0,1.0,1,NULL,4.0,1); +INSERT INTO product_info VALUES(101,'Coriander Leaves (Kothimeer) small 1 ','','',4,12.0,'["product-images/1771249922306-0"]','2026-02-16T08:22:03.573Z',0,15.0,4,0,1.0,1,NULL,1.0,1); +INSERT INTO product_info VALUES(102,' Basa Fish Fillets','','',1,499.0,'["product-images/1771411526889-0"]','2026-02-18T05:15:27.907Z',0,550.0,1,0,1.0,0,NULL,0.8,1); +INSERT INTO product_info VALUES(103,'Ridge Gourd (Turai) ..(Beerkaya)','','',1,29.0,'["product-images/1771647812442-0"]','2026-02-20T22:53:33.321Z',0,35.0,4,0,1.0,0,NULL,1.0,1); +INSERT INTO product_info VALUES(136,'Demo product','Demo product demo','Demo Product and just for fun description',1,222.0,'[]','2026-03-21T10:37:26.835Z',0,233.0,8,0,1.0,1,233.0,1.0,1); +INSERT INTO product_info VALUES(137,'Demo3','Demo3','Demo3',1,233.0,'["product-images/1774110996916.jpg","product-images/1774111917349.jpg","product-images/1774111977156.jpg"]','2026-03-21T10:39:54.216Z',0,233.0,1,0,1.0,1,233.0,1.0,1); +INSERT INTO product_info VALUES(138,'Demo4','Demo4','Demo4',1,233.0,'["product-images/1774109641982.jpg","product-images/1774109642211.jpg"]','2026-03-21T10:44:05.635Z',0,233.0,8,0,1.0,1,233.0,1.0,1); +INSERT INTO product_info VALUES(139,'Demo5','Demo5','Demo5 ',1,233.0,'["product-images/1774109875092.jpg","product-images/1774109875283.jpg"]','2026-03-21T10:47:58.585Z',0,235.0,1,0,1.0,1,235.0,1.0,1); +INSERT INTO product_info VALUES(140,'Demo Productsz','Demooo','Demoooo',1,250.0,'["product-images/1774524524649.jpg","product-images/1774524524845.jpg","product-images/1774524525034.jpg","product-images/1774525511146.jpg"]','2026-03-26T05:58:47.322Z',0,285.0,1,0,1.0,1,300.0,1.0,1); +CREATE TABLE IF NOT EXISTS "product_reviews" ("id" INTEGER NOT NULL, "user_id" INTEGER NOT NULL, "product_id" INTEGER NOT NULL, "review_body" TEXT NOT NULL, "image_urls" TEXT, "review_time" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "ratings" REAL NOT NULL, "admin_response" TEXT, "admin_response_images" TEXT); +INSERT INTO product_reviews VALUES(1,1,9,'Nice','["review-images/1765087473110.jpg","review-images/1765087473110.jpg"]','2025-12-07T00:35:23.088Z',4.0,'Thank Youu','["review-images/1765108852104.jpg"]'); +INSERT INTO product_reviews VALUES(2,1,9,'Nice','["review-images/1765093365201.jpg"]','2025-12-07T02:12:47.173Z',4.0,'','["review-images/1765106307190.jpg"]'); +INSERT INTO product_reviews VALUES(3,1,14,'Not Good','["review-images/1765096663203.jpg","review-images/1765096663403.jpg","review-images/1765096663575.png"]','2025-12-07T03:07:47.450Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(4,1,14,'Another test review this is.','["review-images/1765097892914.jpg","review-images/1765097893129.png"]','2025-12-07T03:28:13.977Z',3.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(5,1,14,'test again','["review-images/1765098183876.jpg"]','2025-12-07T03:33:04.648Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(6,1,14,'review 4','["review-images/1765098361309.jpg"]','2025-12-07T03:36:02.126Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(7,1,14,'another review','["review-images/1765098480284.jpg"]','2025-12-07T03:38:01.100Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(8,1,14,'5 star review','["review-images/1765098638162.jpg"]','2025-12-07T03:40:40.683Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(9,1,14,'another testing round','["review-images/1765098885608.jpg","review-images/1765098885808.png"]','2025-12-07T03:44:49.071Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(10,1,14,'testing again','["review-images/1765098955365.jpg"]','2025-12-07T03:45:56.837Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(11,1,14,'test review','["review-images/1765099082661.jpg"]','2025-12-07T03:48:04.218Z',3.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(12,1,14,'testing continues','["review-images/1765099476101.jpg","review-images/1765099476297.png"]','2025-12-07T03:54:39.689Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(13,1,14,'It should work now','["review-images/1765101095057.jpg","review-images/1765101095257.png"]','2025-12-07T04:21:44.960Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(14,1,14,'It should work now','["review-images/1765101103591.jpg","review-images/1765101103758.png"]','2025-12-07T04:21:46.666Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(15,1,1,'Very nutritious','["review-images/1765101241219.jpg"]','2025-12-07T04:24:02.615Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(16,1,1,'Item was fresh and juicy','["review-images/1765119932782.jpg","review-images/1765119932802.jpg"]','2025-12-07T09:35:37.267Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(17,1,1,'Item was fresh and juicy','["review-images/1765119935171.jpg","review-images/1765119935174.jpg"]','2025-12-07T09:35:40.420Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(18,17,5,'R','[]','2025-12-19T09:47:47.194Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(19,17,5,'G','["review-images/1766157495262.jpg"]','2025-12-19T09:48:17.365Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(20,17,5,'G','["review-images/1766157496653.jpg"]','2025-12-19T09:48:18.989Z',4.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(21,17,5,'R','[]','2025-12-19T09:48:42.279Z',3.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(22,17,23,'Ff','[]','2025-12-19T10:02:56.865Z',1.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(23,17,17,'Aa','[]','2025-12-19T10:48:05.094Z',1.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(24,17,16,'Dd','[]','2025-12-20T05:52:01.527Z',2.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(25,1,6,'Nice Item','["review-images/1766423329579.jpg"]','2025-12-22T11:38:51.838Z',3.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(26,17,22,'Bb','[]','2025-12-23T11:55:36.314Z',3.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(27,15,6,replace('Excellent \n👍👍','\n',char(10)),'["review-images/1766572700543.jpg"]','2025-12-24T05:08:21.515Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(28,15,6,replace('Excellent \n👍👍','\n',char(10)),'["review-images/1766572700880.jpg"]','2025-12-24T05:08:22.057Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(29,15,6,replace('Excellent \n👍👍','\n',char(10)),'["review-images/1766572701138.jpg"]','2025-12-24T05:08:22.587Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(30,15,6,replace('Excellent \n👍👍','\n',char(10)),'["review-images/1766572701266.jpg"]','2025-12-24T05:08:23.203Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(31,15,6,replace('Excellent \n👍👍','\n',char(10)),'["review-images/1766572701490.jpg"]','2025-12-24T05:08:25.076Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(32,2,6,replace('Good \n','\n',char(10)),'[]','2026-01-01T06:04:48.298Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(33,2,3,'That''s a great cut of meat and a good quantity','[]','2026-01-03T05:21:46.903Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(34,2,3,'That''s a great cut of meat and a good quantity','[]','2026-01-03T05:21:47.197Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(35,22,24,'Test review ','["review-images/1768792441275.jpg"]','2026-01-18T21:44:02.726Z',5.0,NULL,'[]'); +INSERT INTO product_reviews VALUES(36,22,24,'Test review ','["review-images/1768792441748.jpg"]','2026-01-18T21:44:03.075Z',5.0,NULL,'[]'); +CREATE TABLE IF NOT EXISTS "product_slots" ("product_id" INTEGER NOT NULL, "slot_id" INTEGER NOT NULL); +INSERT INTO product_slots VALUES(1,1); +INSERT INTO product_slots VALUES(1,2); +INSERT INTO product_slots VALUES(1,3); +INSERT INTO product_slots VALUES(1,4); +INSERT INTO product_slots VALUES(1,5); +INSERT INTO product_slots VALUES(1,6); +INSERT INTO product_slots VALUES(1,7); +INSERT INTO product_slots VALUES(1,9); +INSERT INTO product_slots VALUES(1,12); +INSERT INTO product_slots VALUES(1,18); +INSERT INTO product_slots VALUES(1,19); +INSERT INTO product_slots VALUES(1,20); +INSERT INTO product_slots VALUES(1,21); +INSERT INTO product_slots VALUES(1,22); +INSERT INTO product_slots VALUES(1,23); +INSERT INTO product_slots VALUES(1,31); +INSERT INTO product_slots VALUES(1,33); +INSERT INTO product_slots VALUES(1,35); +INSERT INTO product_slots VALUES(1,37); +INSERT INTO product_slots VALUES(1,38); +INSERT INTO product_slots VALUES(1,39); +INSERT INTO product_slots VALUES(1,40); +INSERT INTO product_slots VALUES(1,59); +INSERT INTO product_slots VALUES(1,63); +INSERT INTO product_slots VALUES(1,64); +INSERT INTO product_slots VALUES(1,65); +INSERT INTO product_slots VALUES(1,66); +INSERT INTO product_slots VALUES(1,67); +INSERT INTO product_slots VALUES(1,72); +INSERT INTO product_slots VALUES(1,73); +INSERT INTO product_slots VALUES(1,74); +INSERT INTO product_slots VALUES(1,279); +INSERT INTO product_slots VALUES(2,1); +INSERT INTO product_slots VALUES(2,2); +INSERT INTO product_slots VALUES(2,3); +INSERT INTO product_slots VALUES(2,4); +INSERT INTO product_slots VALUES(2,5); +INSERT INTO product_slots VALUES(2,6); +INSERT INTO product_slots VALUES(2,7); +INSERT INTO product_slots VALUES(2,18); +INSERT INTO product_slots VALUES(2,19); +INSERT INTO product_slots VALUES(2,20); +INSERT INTO product_slots VALUES(2,21); +INSERT INTO product_slots VALUES(2,22); +INSERT INTO product_slots VALUES(2,23); +INSERT INTO product_slots VALUES(2,31); +INSERT INTO product_slots VALUES(2,33); +INSERT INTO product_slots VALUES(2,35); +INSERT INTO product_slots VALUES(2,37); +INSERT INTO product_slots VALUES(2,38); +INSERT INTO product_slots VALUES(2,39); +INSERT INTO product_slots VALUES(2,40); +INSERT INTO product_slots VALUES(2,41); +INSERT INTO product_slots VALUES(2,43); +INSERT INTO product_slots VALUES(2,45); +INSERT INTO product_slots VALUES(2,46); +INSERT INTO product_slots VALUES(2,47); +INSERT INTO product_slots VALUES(2,48); +INSERT INTO product_slots VALUES(2,49); +INSERT INTO product_slots VALUES(2,50); +INSERT INTO product_slots VALUES(2,51); +INSERT INTO product_slots VALUES(2,52); +INSERT INTO product_slots VALUES(2,53); +INSERT INTO product_slots VALUES(2,54); +INSERT INTO product_slots VALUES(2,55); +INSERT INTO product_slots VALUES(2,56); +INSERT INTO product_slots VALUES(2,57); +INSERT INTO product_slots VALUES(2,58); +INSERT INTO product_slots VALUES(2,59); +INSERT INTO product_slots VALUES(2,60); +INSERT INTO product_slots VALUES(2,61); +INSERT INTO product_slots VALUES(2,62); +INSERT INTO product_slots VALUES(2,63); +INSERT INTO product_slots VALUES(2,64); +INSERT INTO product_slots VALUES(2,65); +INSERT INTO product_slots VALUES(2,66); +INSERT INTO product_slots VALUES(2,67); +INSERT INTO product_slots VALUES(2,68); +INSERT INTO product_slots VALUES(2,69); +INSERT INTO product_slots VALUES(2,70); +INSERT INTO product_slots VALUES(2,71); +INSERT INTO product_slots VALUES(2,72); +INSERT INTO product_slots VALUES(2,73); +INSERT INTO product_slots VALUES(2,74); +INSERT INTO product_slots VALUES(2,75); +INSERT INTO product_slots VALUES(2,76); +INSERT INTO product_slots VALUES(2,77); +INSERT INTO product_slots VALUES(2,78); +INSERT INTO product_slots VALUES(2,79); +INSERT INTO product_slots VALUES(2,80); +INSERT INTO product_slots VALUES(2,81); +INSERT INTO product_slots VALUES(2,82); +INSERT INTO product_slots VALUES(2,83); +INSERT INTO product_slots VALUES(2,84); +INSERT INTO product_slots VALUES(2,85); +INSERT INTO product_slots VALUES(2,86); +INSERT INTO product_slots VALUES(2,87); +INSERT INTO product_slots VALUES(2,88); +INSERT INTO product_slots VALUES(2,89); +INSERT INTO product_slots VALUES(2,90); +INSERT INTO product_slots VALUES(2,91); +INSERT INTO product_slots VALUES(2,92); +INSERT INTO product_slots VALUES(2,93); +INSERT INTO product_slots VALUES(2,94); +INSERT INTO product_slots VALUES(2,95); +INSERT INTO product_slots VALUES(2,96); +INSERT INTO product_slots VALUES(2,97); +INSERT INTO product_slots VALUES(2,98); +INSERT INTO product_slots VALUES(2,99); +INSERT INTO product_slots VALUES(2,100); +INSERT INTO product_slots VALUES(2,101); +INSERT INTO product_slots VALUES(2,102); +INSERT INTO product_slots VALUES(2,103); +INSERT INTO product_slots VALUES(2,104); +INSERT INTO product_slots VALUES(2,105); +INSERT INTO product_slots VALUES(2,106); +INSERT INTO product_slots VALUES(2,107); +INSERT INTO product_slots VALUES(2,108); +INSERT INTO product_slots VALUES(2,109); +INSERT INTO product_slots VALUES(2,110); +INSERT INTO product_slots VALUES(2,111); +INSERT INTO product_slots VALUES(2,112); +INSERT INTO product_slots VALUES(2,113); +INSERT INTO product_slots VALUES(2,114); +INSERT INTO product_slots VALUES(2,115); +INSERT INTO product_slots VALUES(2,116); +INSERT INTO product_slots VALUES(2,117); +INSERT INTO product_slots VALUES(2,118); +INSERT INTO product_slots VALUES(2,119); +INSERT INTO product_slots VALUES(2,120); +INSERT INTO product_slots VALUES(2,121); +INSERT INTO product_slots VALUES(2,122); +INSERT INTO product_slots VALUES(2,123); +INSERT INTO product_slots VALUES(2,124); +INSERT INTO product_slots VALUES(2,125); +INSERT INTO product_slots VALUES(2,126); +INSERT INTO product_slots VALUES(2,127); +INSERT INTO product_slots VALUES(2,128); +INSERT INTO product_slots VALUES(2,129); +INSERT INTO product_slots VALUES(2,130); +INSERT INTO product_slots VALUES(2,131); +INSERT INTO product_slots VALUES(2,132); +INSERT INTO product_slots VALUES(2,133); +INSERT INTO product_slots VALUES(2,134); +INSERT INTO product_slots VALUES(2,135); +INSERT INTO product_slots VALUES(2,136); +INSERT INTO product_slots VALUES(2,137); +INSERT INTO product_slots VALUES(2,138); +INSERT INTO product_slots VALUES(2,139); +INSERT INTO product_slots VALUES(2,140); +INSERT INTO product_slots VALUES(2,141); +INSERT INTO product_slots VALUES(2,142); +INSERT INTO product_slots VALUES(2,143); +INSERT INTO product_slots VALUES(2,144); +INSERT INTO product_slots VALUES(2,145); +INSERT INTO product_slots VALUES(2,146); +INSERT INTO product_slots VALUES(2,147); +INSERT INTO product_slots VALUES(2,148); +INSERT INTO product_slots VALUES(2,149); +INSERT INTO product_slots VALUES(2,150); +INSERT INTO product_slots VALUES(2,151); +INSERT INTO product_slots VALUES(2,152); +INSERT INTO product_slots VALUES(2,153); +INSERT INTO product_slots VALUES(2,154); +INSERT INTO product_slots VALUES(2,155); +INSERT INTO product_slots VALUES(2,156); +INSERT INTO product_slots VALUES(2,157); +INSERT INTO product_slots VALUES(2,158); +INSERT INTO product_slots VALUES(2,159); +INSERT INTO product_slots VALUES(2,160); +INSERT INTO product_slots VALUES(2,161); +INSERT INTO product_slots VALUES(2,162); +INSERT INTO product_slots VALUES(2,163); +INSERT INTO product_slots VALUES(2,164); +INSERT INTO product_slots VALUES(2,165); +INSERT INTO product_slots VALUES(2,166); +INSERT INTO product_slots VALUES(2,167); +INSERT INTO product_slots VALUES(2,168); +INSERT INTO product_slots VALUES(2,169); +INSERT INTO product_slots VALUES(2,170); +INSERT INTO product_slots VALUES(2,171); +INSERT INTO product_slots VALUES(2,172); +INSERT INTO product_slots VALUES(2,173); +INSERT INTO product_slots VALUES(2,174); +INSERT INTO product_slots VALUES(2,175); +INSERT INTO product_slots VALUES(2,176); +INSERT INTO product_slots VALUES(2,177); +INSERT INTO product_slots VALUES(2,178); +INSERT INTO product_slots VALUES(2,179); +INSERT INTO product_slots VALUES(2,180); +INSERT INTO product_slots VALUES(2,181); +INSERT INTO product_slots VALUES(2,182); +INSERT INTO product_slots VALUES(2,183); +INSERT INTO product_slots VALUES(2,184); +INSERT INTO product_slots VALUES(2,185); +INSERT INTO product_slots VALUES(2,186); +INSERT INTO product_slots VALUES(2,187); +INSERT INTO product_slots VALUES(2,188); +INSERT INTO product_slots VALUES(2,189); +INSERT INTO product_slots VALUES(2,190); +INSERT INTO product_slots VALUES(2,191); +INSERT INTO product_slots VALUES(2,192); +INSERT INTO product_slots VALUES(2,193); +INSERT INTO product_slots VALUES(2,194); +INSERT INTO product_slots VALUES(2,195); +INSERT INTO product_slots VALUES(2,196); +INSERT INTO product_slots VALUES(2,197); +INSERT INTO product_slots VALUES(2,198); +INSERT INTO product_slots VALUES(2,199); +INSERT INTO product_slots VALUES(2,200); +INSERT INTO product_slots VALUES(2,201); +INSERT INTO product_slots VALUES(2,202); +INSERT INTO product_slots VALUES(2,203); +INSERT INTO product_slots VALUES(2,204); +INSERT INTO product_slots VALUES(2,205); +INSERT INTO product_slots VALUES(2,206); +INSERT INTO product_slots VALUES(2,207); +INSERT INTO product_slots VALUES(2,208); +INSERT INTO product_slots VALUES(2,209); +INSERT INTO product_slots VALUES(2,210); +INSERT INTO product_slots VALUES(2,211); +INSERT INTO product_slots VALUES(2,212); +INSERT INTO product_slots VALUES(2,213); +INSERT INTO product_slots VALUES(2,214); +INSERT INTO product_slots VALUES(2,215); +INSERT INTO product_slots VALUES(2,216); +INSERT INTO product_slots VALUES(2,217); +INSERT INTO product_slots VALUES(2,218); +INSERT INTO product_slots VALUES(2,219); +INSERT INTO product_slots VALUES(2,220); +INSERT INTO product_slots VALUES(2,221); +INSERT INTO product_slots VALUES(2,222); +INSERT INTO product_slots VALUES(2,223); +INSERT INTO product_slots VALUES(2,224); +INSERT INTO product_slots VALUES(2,225); +INSERT INTO product_slots VALUES(2,226); +INSERT INTO product_slots VALUES(2,227); +INSERT INTO product_slots VALUES(2,228); +INSERT INTO product_slots VALUES(2,229); +INSERT INTO product_slots VALUES(2,230); +INSERT INTO product_slots VALUES(2,231); +INSERT INTO product_slots VALUES(2,232); +INSERT INTO product_slots VALUES(2,234); +INSERT INTO product_slots VALUES(2,235); +INSERT INTO product_slots VALUES(2,236); +INSERT INTO product_slots VALUES(2,237); +INSERT INTO product_slots VALUES(2,238); +INSERT INTO product_slots VALUES(2,239); +INSERT INTO product_slots VALUES(2,240); +INSERT INTO product_slots VALUES(2,241); +INSERT INTO product_slots VALUES(2,242); +INSERT INTO product_slots VALUES(2,243); +INSERT INTO product_slots VALUES(2,244); +INSERT INTO product_slots VALUES(2,274); +INSERT INTO product_slots VALUES(2,275); +INSERT INTO product_slots VALUES(2,279); +INSERT INTO product_slots VALUES(2,280); +INSERT INTO product_slots VALUES(2,281); +INSERT INTO product_slots VALUES(2,282); +INSERT INTO product_slots VALUES(3,1); +INSERT INTO product_slots VALUES(3,2); +INSERT INTO product_slots VALUES(3,3); +INSERT INTO product_slots VALUES(3,4); +INSERT INTO product_slots VALUES(3,5); +INSERT INTO product_slots VALUES(3,6); +INSERT INTO product_slots VALUES(3,7); +INSERT INTO product_slots VALUES(3,8); +INSERT INTO product_slots VALUES(3,12); +INSERT INTO product_slots VALUES(3,18); +INSERT INTO product_slots VALUES(3,19); +INSERT INTO product_slots VALUES(3,20); +INSERT INTO product_slots VALUES(3,21); +INSERT INTO product_slots VALUES(3,22); +INSERT INTO product_slots VALUES(3,23); +INSERT INTO product_slots VALUES(3,31); +INSERT INTO product_slots VALUES(3,33); +INSERT INTO product_slots VALUES(3,35); +INSERT INTO product_slots VALUES(3,37); +INSERT INTO product_slots VALUES(3,38); +INSERT INTO product_slots VALUES(3,39); +INSERT INTO product_slots VALUES(3,40); +INSERT INTO product_slots VALUES(3,41); +INSERT INTO product_slots VALUES(3,43); +INSERT INTO product_slots VALUES(3,45); +INSERT INTO product_slots VALUES(3,46); +INSERT INTO product_slots VALUES(3,47); +INSERT INTO product_slots VALUES(3,48); +INSERT INTO product_slots VALUES(3,49); +INSERT INTO product_slots VALUES(3,50); +INSERT INTO product_slots VALUES(3,51); +INSERT INTO product_slots VALUES(3,52); +INSERT INTO product_slots VALUES(3,53); +INSERT INTO product_slots VALUES(3,54); +INSERT INTO product_slots VALUES(3,55); +INSERT INTO product_slots VALUES(3,56); +INSERT INTO product_slots VALUES(3,57); +INSERT INTO product_slots VALUES(3,58); +INSERT INTO product_slots VALUES(3,59); +INSERT INTO product_slots VALUES(3,60); +INSERT INTO product_slots VALUES(3,61); +INSERT INTO product_slots VALUES(3,62); +INSERT INTO product_slots VALUES(3,63); +INSERT INTO product_slots VALUES(3,64); +INSERT INTO product_slots VALUES(3,65); +INSERT INTO product_slots VALUES(3,66); +INSERT INTO product_slots VALUES(3,67); +INSERT INTO product_slots VALUES(3,68); +INSERT INTO product_slots VALUES(3,69); +INSERT INTO product_slots VALUES(3,70); +INSERT INTO product_slots VALUES(3,71); +INSERT INTO product_slots VALUES(3,72); +INSERT INTO product_slots VALUES(3,73); +INSERT INTO product_slots VALUES(3,74); +INSERT INTO product_slots VALUES(3,75); +INSERT INTO product_slots VALUES(3,76); +INSERT INTO product_slots VALUES(3,77); +INSERT INTO product_slots VALUES(3,78); +INSERT INTO product_slots VALUES(3,79); +INSERT INTO product_slots VALUES(3,80); +INSERT INTO product_slots VALUES(3,81); +INSERT INTO product_slots VALUES(3,82); +INSERT INTO product_slots VALUES(3,83); +INSERT INTO product_slots VALUES(3,84); +INSERT INTO product_slots VALUES(3,85); +INSERT INTO product_slots VALUES(3,86); +INSERT INTO product_slots VALUES(3,87); +INSERT INTO product_slots VALUES(3,88); +INSERT INTO product_slots VALUES(3,89); +INSERT INTO product_slots VALUES(3,90); +INSERT INTO product_slots VALUES(3,91); +INSERT INTO product_slots VALUES(3,92); +INSERT INTO product_slots VALUES(3,93); +INSERT INTO product_slots VALUES(3,94); +INSERT INTO product_slots VALUES(3,95); +INSERT INTO product_slots VALUES(3,96); +INSERT INTO product_slots VALUES(3,97); +INSERT INTO product_slots VALUES(3,98); +INSERT INTO product_slots VALUES(3,99); +INSERT INTO product_slots VALUES(3,100); +INSERT INTO product_slots VALUES(3,101); +INSERT INTO product_slots VALUES(3,102); +INSERT INTO product_slots VALUES(3,103); +INSERT INTO product_slots VALUES(3,104); +INSERT INTO product_slots VALUES(3,105); +INSERT INTO product_slots VALUES(3,106); +INSERT INTO product_slots VALUES(3,107); +INSERT INTO product_slots VALUES(3,108); +INSERT INTO product_slots VALUES(3,109); +INSERT INTO product_slots VALUES(3,110); +INSERT INTO product_slots VALUES(3,111); +INSERT INTO product_slots VALUES(3,112); +INSERT INTO product_slots VALUES(3,113); +INSERT INTO product_slots VALUES(3,114); +INSERT INTO product_slots VALUES(3,115); +INSERT INTO product_slots VALUES(3,116); +INSERT INTO product_slots VALUES(3,117); +INSERT INTO product_slots VALUES(3,118); +INSERT INTO product_slots VALUES(3,119); +INSERT INTO product_slots VALUES(3,120); +INSERT INTO product_slots VALUES(3,121); +INSERT INTO product_slots VALUES(3,122); +INSERT INTO product_slots VALUES(3,123); +INSERT INTO product_slots VALUES(3,124); +INSERT INTO product_slots VALUES(3,125); +INSERT INTO product_slots VALUES(3,126); +INSERT INTO product_slots VALUES(3,127); +INSERT INTO product_slots VALUES(3,128); +INSERT INTO product_slots VALUES(3,129); +INSERT INTO product_slots VALUES(3,130); +INSERT INTO product_slots VALUES(3,131); +INSERT INTO product_slots VALUES(3,132); +INSERT INTO product_slots VALUES(3,133); +INSERT INTO product_slots VALUES(3,134); +INSERT INTO product_slots VALUES(3,135); +INSERT INTO product_slots VALUES(3,136); +INSERT INTO product_slots VALUES(3,137); +INSERT INTO product_slots VALUES(3,138); +INSERT INTO product_slots VALUES(3,139); +INSERT INTO product_slots VALUES(3,140); +INSERT INTO product_slots VALUES(3,141); +INSERT INTO product_slots VALUES(3,142); +INSERT INTO product_slots VALUES(3,143); +INSERT INTO product_slots VALUES(3,144); +INSERT INTO product_slots VALUES(3,145); +INSERT INTO product_slots VALUES(3,146); +INSERT INTO product_slots VALUES(3,147); +INSERT INTO product_slots VALUES(3,148); +INSERT INTO product_slots VALUES(3,149); +INSERT INTO product_slots VALUES(3,150); +INSERT INTO product_slots VALUES(3,151); +INSERT INTO product_slots VALUES(3,152); +INSERT INTO product_slots VALUES(3,153); +INSERT INTO product_slots VALUES(3,154); +INSERT INTO product_slots VALUES(3,155); +INSERT INTO product_slots VALUES(3,156); +INSERT INTO product_slots VALUES(3,157); +INSERT INTO product_slots VALUES(3,158); +INSERT INTO product_slots VALUES(3,159); +INSERT INTO product_slots VALUES(3,160); +INSERT INTO product_slots VALUES(3,161); +INSERT INTO product_slots VALUES(3,162); +INSERT INTO product_slots VALUES(3,163); +INSERT INTO product_slots VALUES(3,164); +INSERT INTO product_slots VALUES(3,165); +INSERT INTO product_slots VALUES(3,166); +INSERT INTO product_slots VALUES(3,167); +INSERT INTO product_slots VALUES(3,168); +INSERT INTO product_slots VALUES(3,169); +INSERT INTO product_slots VALUES(3,170); +INSERT INTO product_slots VALUES(3,171); +INSERT INTO product_slots VALUES(3,172); +INSERT INTO product_slots VALUES(3,173); +INSERT INTO product_slots VALUES(3,174); +INSERT INTO product_slots VALUES(3,175); +INSERT INTO product_slots VALUES(3,176); +INSERT INTO product_slots VALUES(3,177); +INSERT INTO product_slots VALUES(3,178); +INSERT INTO product_slots VALUES(3,179); +INSERT INTO product_slots VALUES(3,180); +INSERT INTO product_slots VALUES(3,181); +INSERT INTO product_slots VALUES(3,182); +INSERT INTO product_slots VALUES(3,183); +INSERT INTO product_slots VALUES(3,184); +INSERT INTO product_slots VALUES(3,185); +INSERT INTO product_slots VALUES(3,186); +INSERT INTO product_slots VALUES(3,187); +INSERT INTO product_slots VALUES(3,188); +INSERT INTO product_slots VALUES(3,189); +INSERT INTO product_slots VALUES(3,190); +INSERT INTO product_slots VALUES(3,191); +INSERT INTO product_slots VALUES(3,192); +INSERT INTO product_slots VALUES(3,193); +INSERT INTO product_slots VALUES(3,194); +INSERT INTO product_slots VALUES(3,195); +INSERT INTO product_slots VALUES(3,196); +INSERT INTO product_slots VALUES(3,197); +INSERT INTO product_slots VALUES(3,198); +INSERT INTO product_slots VALUES(3,199); +INSERT INTO product_slots VALUES(3,200); +INSERT INTO product_slots VALUES(3,201); +INSERT INTO product_slots VALUES(3,202); +INSERT INTO product_slots VALUES(3,203); +INSERT INTO product_slots VALUES(3,204); +INSERT INTO product_slots VALUES(3,205); +INSERT INTO product_slots VALUES(3,206); +INSERT INTO product_slots VALUES(3,207); +INSERT INTO product_slots VALUES(3,208); +INSERT INTO product_slots VALUES(3,209); +INSERT INTO product_slots VALUES(3,210); +INSERT INTO product_slots VALUES(3,211); +INSERT INTO product_slots VALUES(3,212); +INSERT INTO product_slots VALUES(3,213); +INSERT INTO product_slots VALUES(3,214); +INSERT INTO product_slots VALUES(3,215); +INSERT INTO product_slots VALUES(3,216); +INSERT INTO product_slots VALUES(3,217); +INSERT INTO product_slots VALUES(3,218); +INSERT INTO product_slots VALUES(3,219); +INSERT INTO product_slots VALUES(3,220); +INSERT INTO product_slots VALUES(3,221); +INSERT INTO product_slots VALUES(3,222); +INSERT INTO product_slots VALUES(3,223); +INSERT INTO product_slots VALUES(3,224); +INSERT INTO product_slots VALUES(3,225); +INSERT INTO product_slots VALUES(3,226); +INSERT INTO product_slots VALUES(3,227); +INSERT INTO product_slots VALUES(3,228); +INSERT INTO product_slots VALUES(3,229); +INSERT INTO product_slots VALUES(3,230); +INSERT INTO product_slots VALUES(3,231); +INSERT INTO product_slots VALUES(3,232); +INSERT INTO product_slots VALUES(3,234); +INSERT INTO product_slots VALUES(3,235); +INSERT INTO product_slots VALUES(3,236); +INSERT INTO product_slots VALUES(3,237); +INSERT INTO product_slots VALUES(3,238); +INSERT INTO product_slots VALUES(3,239); +INSERT INTO product_slots VALUES(3,240); +INSERT INTO product_slots VALUES(3,241); +INSERT INTO product_slots VALUES(3,242); +INSERT INTO product_slots VALUES(3,243); +INSERT INTO product_slots VALUES(3,244); +INSERT INTO product_slots VALUES(3,274); +INSERT INTO product_slots VALUES(3,275); +INSERT INTO product_slots VALUES(3,279); +INSERT INTO product_slots VALUES(3,280); +INSERT INTO product_slots VALUES(3,281); +INSERT INTO product_slots VALUES(3,282); +INSERT INTO product_slots VALUES(4,1); +INSERT INTO product_slots VALUES(4,2); +INSERT INTO product_slots VALUES(4,3); +INSERT INTO product_slots VALUES(4,4); +INSERT INTO product_slots VALUES(4,5); +INSERT INTO product_slots VALUES(4,6); +INSERT INTO product_slots VALUES(4,7); +INSERT INTO product_slots VALUES(4,18); +INSERT INTO product_slots VALUES(4,19); +INSERT INTO product_slots VALUES(4,20); +INSERT INTO product_slots VALUES(4,21); +INSERT INTO product_slots VALUES(4,22); +INSERT INTO product_slots VALUES(4,33); +INSERT INTO product_slots VALUES(4,35); +INSERT INTO product_slots VALUES(4,37); +INSERT INTO product_slots VALUES(4,38); +INSERT INTO product_slots VALUES(4,39); +INSERT INTO product_slots VALUES(4,40); +INSERT INTO product_slots VALUES(4,41); +INSERT INTO product_slots VALUES(4,43); +INSERT INTO product_slots VALUES(4,45); +INSERT INTO product_slots VALUES(4,46); +INSERT INTO product_slots VALUES(4,47); +INSERT INTO product_slots VALUES(4,48); +INSERT INTO product_slots VALUES(4,49); +INSERT INTO product_slots VALUES(4,50); +INSERT INTO product_slots VALUES(4,51); +INSERT INTO product_slots VALUES(4,52); +INSERT INTO product_slots VALUES(4,53); +INSERT INTO product_slots VALUES(4,54); +INSERT INTO product_slots VALUES(4,55); +INSERT INTO product_slots VALUES(4,56); +INSERT INTO product_slots VALUES(4,57); +INSERT INTO product_slots VALUES(4,58); +INSERT INTO product_slots VALUES(4,59); +INSERT INTO product_slots VALUES(4,60); +INSERT INTO product_slots VALUES(4,61); +INSERT INTO product_slots VALUES(4,62); +INSERT INTO product_slots VALUES(4,63); +INSERT INTO product_slots VALUES(4,64); +INSERT INTO product_slots VALUES(4,65); +INSERT INTO product_slots VALUES(4,66); +INSERT INTO product_slots VALUES(4,67); +INSERT INTO product_slots VALUES(4,68); +INSERT INTO product_slots VALUES(4,69); +INSERT INTO product_slots VALUES(4,70); +INSERT INTO product_slots VALUES(4,71); +INSERT INTO product_slots VALUES(4,74); +INSERT INTO product_slots VALUES(4,75); +INSERT INTO product_slots VALUES(4,76); +INSERT INTO product_slots VALUES(4,77); +INSERT INTO product_slots VALUES(4,78); +INSERT INTO product_slots VALUES(4,81); +INSERT INTO product_slots VALUES(4,82); +INSERT INTO product_slots VALUES(4,83); +INSERT INTO product_slots VALUES(4,84); +INSERT INTO product_slots VALUES(4,87); +INSERT INTO product_slots VALUES(4,88); +INSERT INTO product_slots VALUES(4,89); +INSERT INTO product_slots VALUES(4,90); +INSERT INTO product_slots VALUES(4,91); +INSERT INTO product_slots VALUES(4,95); +INSERT INTO product_slots VALUES(4,96); +INSERT INTO product_slots VALUES(4,97); +INSERT INTO product_slots VALUES(4,98); +INSERT INTO product_slots VALUES(4,101); +INSERT INTO product_slots VALUES(4,102); +INSERT INTO product_slots VALUES(4,103); +INSERT INTO product_slots VALUES(4,104); +INSERT INTO product_slots VALUES(4,109); +INSERT INTO product_slots VALUES(4,110); +INSERT INTO product_slots VALUES(4,111); +INSERT INTO product_slots VALUES(4,112); +INSERT INTO product_slots VALUES(4,116); +INSERT INTO product_slots VALUES(4,117); +INSERT INTO product_slots VALUES(4,118); +INSERT INTO product_slots VALUES(4,119); +INSERT INTO product_slots VALUES(4,120); +INSERT INTO product_slots VALUES(4,123); +INSERT INTO product_slots VALUES(4,124); +INSERT INTO product_slots VALUES(4,125); +INSERT INTO product_slots VALUES(4,126); +INSERT INTO product_slots VALUES(4,130); +INSERT INTO product_slots VALUES(4,131); +INSERT INTO product_slots VALUES(4,132); +INSERT INTO product_slots VALUES(4,133); +INSERT INTO product_slots VALUES(4,137); +INSERT INTO product_slots VALUES(4,138); +INSERT INTO product_slots VALUES(4,139); +INSERT INTO product_slots VALUES(4,140); +INSERT INTO product_slots VALUES(4,144); +INSERT INTO product_slots VALUES(4,145); +INSERT INTO product_slots VALUES(4,146); +INSERT INTO product_slots VALUES(4,147); +INSERT INTO product_slots VALUES(4,148); +INSERT INTO product_slots VALUES(4,149); +INSERT INTO product_slots VALUES(4,150); +INSERT INTO product_slots VALUES(4,151); +INSERT INTO product_slots VALUES(4,155); +INSERT INTO product_slots VALUES(4,156); +INSERT INTO product_slots VALUES(4,157); +INSERT INTO product_slots VALUES(4,158); +INSERT INTO product_slots VALUES(4,162); +INSERT INTO product_slots VALUES(4,163); +INSERT INTO product_slots VALUES(4,164); +INSERT INTO product_slots VALUES(4,165); +INSERT INTO product_slots VALUES(4,166); +INSERT INTO product_slots VALUES(4,169); +INSERT INTO product_slots VALUES(4,170); +INSERT INTO product_slots VALUES(4,171); +INSERT INTO product_slots VALUES(4,172); +INSERT INTO product_slots VALUES(4,173); +INSERT INTO product_slots VALUES(4,176); +INSERT INTO product_slots VALUES(4,177); +INSERT INTO product_slots VALUES(4,178); +INSERT INTO product_slots VALUES(4,179); +INSERT INTO product_slots VALUES(4,180); +INSERT INTO product_slots VALUES(4,181); +INSERT INTO product_slots VALUES(4,182); +INSERT INTO product_slots VALUES(4,183); +INSERT INTO product_slots VALUES(4,184); +INSERT INTO product_slots VALUES(4,185); +INSERT INTO product_slots VALUES(4,186); +INSERT INTO product_slots VALUES(4,187); +INSERT INTO product_slots VALUES(4,188); +INSERT INTO product_slots VALUES(4,189); +INSERT INTO product_slots VALUES(4,190); +INSERT INTO product_slots VALUES(4,191); +INSERT INTO product_slots VALUES(4,192); +INSERT INTO product_slots VALUES(4,193); +INSERT INTO product_slots VALUES(4,194); +INSERT INTO product_slots VALUES(4,198); +INSERT INTO product_slots VALUES(4,199); +INSERT INTO product_slots VALUES(4,200); +INSERT INTO product_slots VALUES(4,201); +INSERT INTO product_slots VALUES(4,202); +INSERT INTO product_slots VALUES(4,203); +INSERT INTO product_slots VALUES(4,205); +INSERT INTO product_slots VALUES(4,208); +INSERT INTO product_slots VALUES(4,209); +INSERT INTO product_slots VALUES(4,210); +INSERT INTO product_slots VALUES(4,211); +INSERT INTO product_slots VALUES(4,216); +INSERT INTO product_slots VALUES(4,217); +INSERT INTO product_slots VALUES(4,218); +INSERT INTO product_slots VALUES(4,219); +INSERT INTO product_slots VALUES(4,220); +INSERT INTO product_slots VALUES(4,223); +INSERT INTO product_slots VALUES(4,224); +INSERT INTO product_slots VALUES(4,225); +INSERT INTO product_slots VALUES(4,226); +INSERT INTO product_slots VALUES(4,230); +INSERT INTO product_slots VALUES(4,231); +INSERT INTO product_slots VALUES(4,232); +INSERT INTO product_slots VALUES(4,234); +INSERT INTO product_slots VALUES(4,237); +INSERT INTO product_slots VALUES(4,238); +INSERT INTO product_slots VALUES(4,239); +INSERT INTO product_slots VALUES(4,240); +INSERT INTO product_slots VALUES(4,274); +INSERT INTO product_slots VALUES(4,275); +INSERT INTO product_slots VALUES(4,277); +INSERT INTO product_slots VALUES(4,278); +INSERT INTO product_slots VALUES(4,279); +INSERT INTO product_slots VALUES(5,1); +INSERT INTO product_slots VALUES(5,3); +INSERT INTO product_slots VALUES(5,4); +INSERT INTO product_slots VALUES(5,5); +INSERT INTO product_slots VALUES(5,6); +INSERT INTO product_slots VALUES(5,7); +INSERT INTO product_slots VALUES(5,8); +INSERT INTO product_slots VALUES(5,16); +INSERT INTO product_slots VALUES(5,18); +INSERT INTO product_slots VALUES(5,20); +INSERT INTO product_slots VALUES(5,21); +INSERT INTO product_slots VALUES(5,22); +INSERT INTO product_slots VALUES(5,33); +INSERT INTO product_slots VALUES(5,35); +INSERT INTO product_slots VALUES(5,37); +INSERT INTO product_slots VALUES(5,38); +INSERT INTO product_slots VALUES(5,39); +INSERT INTO product_slots VALUES(5,40); +INSERT INTO product_slots VALUES(5,41); +INSERT INTO product_slots VALUES(5,43); +INSERT INTO product_slots VALUES(5,44); +INSERT INTO product_slots VALUES(5,45); +INSERT INTO product_slots VALUES(5,46); +INSERT INTO product_slots VALUES(5,47); +INSERT INTO product_slots VALUES(5,48); +INSERT INTO product_slots VALUES(5,49); +INSERT INTO product_slots VALUES(5,50); +INSERT INTO product_slots VALUES(5,51); +INSERT INTO product_slots VALUES(5,52); +INSERT INTO product_slots VALUES(5,53); +INSERT INTO product_slots VALUES(5,54); +INSERT INTO product_slots VALUES(5,55); +INSERT INTO product_slots VALUES(5,56); +INSERT INTO product_slots VALUES(5,57); +INSERT INTO product_slots VALUES(5,58); +INSERT INTO product_slots VALUES(5,59); +INSERT INTO product_slots VALUES(5,60); +INSERT INTO product_slots VALUES(5,61); +INSERT INTO product_slots VALUES(5,62); +INSERT INTO product_slots VALUES(5,63); +INSERT INTO product_slots VALUES(5,64); +INSERT INTO product_slots VALUES(5,65); +INSERT INTO product_slots VALUES(5,66); +INSERT INTO product_slots VALUES(5,67); +INSERT INTO product_slots VALUES(5,68); +INSERT INTO product_slots VALUES(5,69); +INSERT INTO product_slots VALUES(5,70); +INSERT INTO product_slots VALUES(5,71); +INSERT INTO product_slots VALUES(5,72); +INSERT INTO product_slots VALUES(5,73); +INSERT INTO product_slots VALUES(5,74); +INSERT INTO product_slots VALUES(5,75); +INSERT INTO product_slots VALUES(5,76); +INSERT INTO product_slots VALUES(5,77); +INSERT INTO product_slots VALUES(5,78); +INSERT INTO product_slots VALUES(5,79); +INSERT INTO product_slots VALUES(5,80); +INSERT INTO product_slots VALUES(5,81); +INSERT INTO product_slots VALUES(5,82); +INSERT INTO product_slots VALUES(5,83); +INSERT INTO product_slots VALUES(5,84); +INSERT INTO product_slots VALUES(5,85); +INSERT INTO product_slots VALUES(5,86); +INSERT INTO product_slots VALUES(5,87); +INSERT INTO product_slots VALUES(5,88); +INSERT INTO product_slots VALUES(5,89); +INSERT INTO product_slots VALUES(5,90); +INSERT INTO product_slots VALUES(5,91); +INSERT INTO product_slots VALUES(5,92); +INSERT INTO product_slots VALUES(5,93); +INSERT INTO product_slots VALUES(5,94); +INSERT INTO product_slots VALUES(5,95); +INSERT INTO product_slots VALUES(5,96); +INSERT INTO product_slots VALUES(5,97); +INSERT INTO product_slots VALUES(5,98); +INSERT INTO product_slots VALUES(5,99); +INSERT INTO product_slots VALUES(5,100); +INSERT INTO product_slots VALUES(5,101); +INSERT INTO product_slots VALUES(5,102); +INSERT INTO product_slots VALUES(5,103); +INSERT INTO product_slots VALUES(5,104); +INSERT INTO product_slots VALUES(5,105); +INSERT INTO product_slots VALUES(5,106); +INSERT INTO product_slots VALUES(5,107); +INSERT INTO product_slots VALUES(5,108); +INSERT INTO product_slots VALUES(5,109); +INSERT INTO product_slots VALUES(5,110); +INSERT INTO product_slots VALUES(5,111); +INSERT INTO product_slots VALUES(5,112); +INSERT INTO product_slots VALUES(5,113); +INSERT INTO product_slots VALUES(5,114); +INSERT INTO product_slots VALUES(5,115); +INSERT INTO product_slots VALUES(5,116); +INSERT INTO product_slots VALUES(5,117); +INSERT INTO product_slots VALUES(5,118); +INSERT INTO product_slots VALUES(5,119); +INSERT INTO product_slots VALUES(5,120); +INSERT INTO product_slots VALUES(5,121); +INSERT INTO product_slots VALUES(5,122); +INSERT INTO product_slots VALUES(5,123); +INSERT INTO product_slots VALUES(5,124); +INSERT INTO product_slots VALUES(5,125); +INSERT INTO product_slots VALUES(5,126); +INSERT INTO product_slots VALUES(5,127); +INSERT INTO product_slots VALUES(5,128); +INSERT INTO product_slots VALUES(5,129); +INSERT INTO product_slots VALUES(5,130); +INSERT INTO product_slots VALUES(5,131); +INSERT INTO product_slots VALUES(5,132); +INSERT INTO product_slots VALUES(5,133); +INSERT INTO product_slots VALUES(5,134); +INSERT INTO product_slots VALUES(5,135); +INSERT INTO product_slots VALUES(5,136); +INSERT INTO product_slots VALUES(5,137); +INSERT INTO product_slots VALUES(5,138); +INSERT INTO product_slots VALUES(5,139); +INSERT INTO product_slots VALUES(5,140); +INSERT INTO product_slots VALUES(5,141); +INSERT INTO product_slots VALUES(5,142); +INSERT INTO product_slots VALUES(5,143); +INSERT INTO product_slots VALUES(5,144); +INSERT INTO product_slots VALUES(5,145); +INSERT INTO product_slots VALUES(5,146); +INSERT INTO product_slots VALUES(5,147); +INSERT INTO product_slots VALUES(5,148); +INSERT INTO product_slots VALUES(5,149); +INSERT INTO product_slots VALUES(5,150); +INSERT INTO product_slots VALUES(5,151); +INSERT INTO product_slots VALUES(5,152); +INSERT INTO product_slots VALUES(5,153); +INSERT INTO product_slots VALUES(5,154); +INSERT INTO product_slots VALUES(5,155); +INSERT INTO product_slots VALUES(5,156); +INSERT INTO product_slots VALUES(5,157); +INSERT INTO product_slots VALUES(5,158); +INSERT INTO product_slots VALUES(5,159); +INSERT INTO product_slots VALUES(5,160); +INSERT INTO product_slots VALUES(5,161); +INSERT INTO product_slots VALUES(5,162); +INSERT INTO product_slots VALUES(5,163); +INSERT INTO product_slots VALUES(5,164); +INSERT INTO product_slots VALUES(5,165); +INSERT INTO product_slots VALUES(5,166); +INSERT INTO product_slots VALUES(5,167); +INSERT INTO product_slots VALUES(5,168); +INSERT INTO product_slots VALUES(5,169); +INSERT INTO product_slots VALUES(5,170); +INSERT INTO product_slots VALUES(5,171); +INSERT INTO product_slots VALUES(5,172); +INSERT INTO product_slots VALUES(5,173); +INSERT INTO product_slots VALUES(5,174); +INSERT INTO product_slots VALUES(5,175); +INSERT INTO product_slots VALUES(5,176); +INSERT INTO product_slots VALUES(5,177); +INSERT INTO product_slots VALUES(5,178); +INSERT INTO product_slots VALUES(5,179); +INSERT INTO product_slots VALUES(5,180); +INSERT INTO product_slots VALUES(5,181); +INSERT INTO product_slots VALUES(5,182); +INSERT INTO product_slots VALUES(5,183); +INSERT INTO product_slots VALUES(5,184); +INSERT INTO product_slots VALUES(5,185); +INSERT INTO product_slots VALUES(5,186); +INSERT INTO product_slots VALUES(5,187); +INSERT INTO product_slots VALUES(5,188); +INSERT INTO product_slots VALUES(5,189); +INSERT INTO product_slots VALUES(5,190); +INSERT INTO product_slots VALUES(5,191); +INSERT INTO product_slots VALUES(5,192); +INSERT INTO product_slots VALUES(5,193); +INSERT INTO product_slots VALUES(5,194); +INSERT INTO product_slots VALUES(5,195); +INSERT INTO product_slots VALUES(5,196); +INSERT INTO product_slots VALUES(5,197); +INSERT INTO product_slots VALUES(5,198); +INSERT INTO product_slots VALUES(5,199); +INSERT INTO product_slots VALUES(5,200); +INSERT INTO product_slots VALUES(5,201); +INSERT INTO product_slots VALUES(5,202); +INSERT INTO product_slots VALUES(5,203); +INSERT INTO product_slots VALUES(5,204); +INSERT INTO product_slots VALUES(5,205); +INSERT INTO product_slots VALUES(5,206); +INSERT INTO product_slots VALUES(5,207); +INSERT INTO product_slots VALUES(5,208); +INSERT INTO product_slots VALUES(5,209); +INSERT INTO product_slots VALUES(5,210); +INSERT INTO product_slots VALUES(5,211); +INSERT INTO product_slots VALUES(5,212); +INSERT INTO product_slots VALUES(5,213); +INSERT INTO product_slots VALUES(5,214); +INSERT INTO product_slots VALUES(5,215); +INSERT INTO product_slots VALUES(5,216); +INSERT INTO product_slots VALUES(5,217); +INSERT INTO product_slots VALUES(5,218); +INSERT INTO product_slots VALUES(5,219); +INSERT INTO product_slots VALUES(5,220); +INSERT INTO product_slots VALUES(5,221); +INSERT INTO product_slots VALUES(5,222); +INSERT INTO product_slots VALUES(5,223); +INSERT INTO product_slots VALUES(5,224); +INSERT INTO product_slots VALUES(5,225); +INSERT INTO product_slots VALUES(5,226); +INSERT INTO product_slots VALUES(5,227); +INSERT INTO product_slots VALUES(5,228); +INSERT INTO product_slots VALUES(5,229); +INSERT INTO product_slots VALUES(5,230); +INSERT INTO product_slots VALUES(5,231); +INSERT INTO product_slots VALUES(5,232); +INSERT INTO product_slots VALUES(5,233); +INSERT INTO product_slots VALUES(5,234); +INSERT INTO product_slots VALUES(5,235); +INSERT INTO product_slots VALUES(5,236); +INSERT INTO product_slots VALUES(5,237); +INSERT INTO product_slots VALUES(5,238); +INSERT INTO product_slots VALUES(5,239); +INSERT INTO product_slots VALUES(5,240); +INSERT INTO product_slots VALUES(5,241); +INSERT INTO product_slots VALUES(5,242); +INSERT INTO product_slots VALUES(5,243); +INSERT INTO product_slots VALUES(5,244); +INSERT INTO product_slots VALUES(5,274); +INSERT INTO product_slots VALUES(5,275); +INSERT INTO product_slots VALUES(5,279); +INSERT INTO product_slots VALUES(5,280); +INSERT INTO product_slots VALUES(5,281); +INSERT INTO product_slots VALUES(5,282); +INSERT INTO product_slots VALUES(5,283); +INSERT INTO product_slots VALUES(5,284); +INSERT INTO product_slots VALUES(5,285); +INSERT INTO product_slots VALUES(5,286); +INSERT INTO product_slots VALUES(5,287); +INSERT INTO product_slots VALUES(6,1); +INSERT INTO product_slots VALUES(6,2); +INSERT INTO product_slots VALUES(6,3); +INSERT INTO product_slots VALUES(6,4); +INSERT INTO product_slots VALUES(6,5); +INSERT INTO product_slots VALUES(6,6); +INSERT INTO product_slots VALUES(6,7); +INSERT INTO product_slots VALUES(6,8); +INSERT INTO product_slots VALUES(6,13); +INSERT INTO product_slots VALUES(6,14); +INSERT INTO product_slots VALUES(6,16); +INSERT INTO product_slots VALUES(6,17); +INSERT INTO product_slots VALUES(6,18); +INSERT INTO product_slots VALUES(6,20); +INSERT INTO product_slots VALUES(6,21); +INSERT INTO product_slots VALUES(6,22); +INSERT INTO product_slots VALUES(6,33); +INSERT INTO product_slots VALUES(6,35); +INSERT INTO product_slots VALUES(6,37); +INSERT INTO product_slots VALUES(6,38); +INSERT INTO product_slots VALUES(6,39); +INSERT INTO product_slots VALUES(6,40); +INSERT INTO product_slots VALUES(6,41); +INSERT INTO product_slots VALUES(6,43); +INSERT INTO product_slots VALUES(6,44); +INSERT INTO product_slots VALUES(6,45); +INSERT INTO product_slots VALUES(6,46); +INSERT INTO product_slots VALUES(6,47); +INSERT INTO product_slots VALUES(6,48); +INSERT INTO product_slots VALUES(6,49); +INSERT INTO product_slots VALUES(6,50); +INSERT INTO product_slots VALUES(6,51); +INSERT INTO product_slots VALUES(6,52); +INSERT INTO product_slots VALUES(6,53); +INSERT INTO product_slots VALUES(6,54); +INSERT INTO product_slots VALUES(6,55); +INSERT INTO product_slots VALUES(6,56); +INSERT INTO product_slots VALUES(6,57); +INSERT INTO product_slots VALUES(6,58); +INSERT INTO product_slots VALUES(6,59); +INSERT INTO product_slots VALUES(6,60); +INSERT INTO product_slots VALUES(6,61); +INSERT INTO product_slots VALUES(6,62); +INSERT INTO product_slots VALUES(6,63); +INSERT INTO product_slots VALUES(6,64); +INSERT INTO product_slots VALUES(6,65); +INSERT INTO product_slots VALUES(6,66); +INSERT INTO product_slots VALUES(6,67); +INSERT INTO product_slots VALUES(6,68); +INSERT INTO product_slots VALUES(6,69); +INSERT INTO product_slots VALUES(6,70); +INSERT INTO product_slots VALUES(6,71); +INSERT INTO product_slots VALUES(6,72); +INSERT INTO product_slots VALUES(6,73); +INSERT INTO product_slots VALUES(6,74); +INSERT INTO product_slots VALUES(6,75); +INSERT INTO product_slots VALUES(6,76); +INSERT INTO product_slots VALUES(6,77); +INSERT INTO product_slots VALUES(6,78); +INSERT INTO product_slots VALUES(6,79); +INSERT INTO product_slots VALUES(6,80); +INSERT INTO product_slots VALUES(6,81); +INSERT INTO product_slots VALUES(6,82); +INSERT INTO product_slots VALUES(6,83); +INSERT INTO product_slots VALUES(6,84); +INSERT INTO product_slots VALUES(6,87); +INSERT INTO product_slots VALUES(6,88); +INSERT INTO product_slots VALUES(6,89); +INSERT INTO product_slots VALUES(6,90); +INSERT INTO product_slots VALUES(6,91); +INSERT INTO product_slots VALUES(6,92); +INSERT INTO product_slots VALUES(6,93); +INSERT INTO product_slots VALUES(6,94); +INSERT INTO product_slots VALUES(6,95); +INSERT INTO product_slots VALUES(6,96); +INSERT INTO product_slots VALUES(6,97); +INSERT INTO product_slots VALUES(6,98); +INSERT INTO product_slots VALUES(6,99); +INSERT INTO product_slots VALUES(6,100); +INSERT INTO product_slots VALUES(6,102); +INSERT INTO product_slots VALUES(6,103); +INSERT INTO product_slots VALUES(6,104); +INSERT INTO product_slots VALUES(6,109); +INSERT INTO product_slots VALUES(6,110); +INSERT INTO product_slots VALUES(6,111); +INSERT INTO product_slots VALUES(6,112); +INSERT INTO product_slots VALUES(6,117); +INSERT INTO product_slots VALUES(6,118); +INSERT INTO product_slots VALUES(6,119); +INSERT INTO product_slots VALUES(6,120); +INSERT INTO product_slots VALUES(6,121); +INSERT INTO product_slots VALUES(6,122); +INSERT INTO product_slots VALUES(6,123); +INSERT INTO product_slots VALUES(6,124); +INSERT INTO product_slots VALUES(6,125); +INSERT INTO product_slots VALUES(6,126); +INSERT INTO product_slots VALUES(6,127); +INSERT INTO product_slots VALUES(6,128); +INSERT INTO product_slots VALUES(6,129); +INSERT INTO product_slots VALUES(6,130); +INSERT INTO product_slots VALUES(6,131); +INSERT INTO product_slots VALUES(6,132); +INSERT INTO product_slots VALUES(6,133); +INSERT INTO product_slots VALUES(6,134); +INSERT INTO product_slots VALUES(6,135); +INSERT INTO product_slots VALUES(6,136); +INSERT INTO product_slots VALUES(6,138); +INSERT INTO product_slots VALUES(6,139); +INSERT INTO product_slots VALUES(6,140); +INSERT INTO product_slots VALUES(6,141); +INSERT INTO product_slots VALUES(6,142); +INSERT INTO product_slots VALUES(6,143); +INSERT INTO product_slots VALUES(6,145); +INSERT INTO product_slots VALUES(6,146); +INSERT INTO product_slots VALUES(6,147); +INSERT INTO product_slots VALUES(6,148); +INSERT INTO product_slots VALUES(6,149); +INSERT INTO product_slots VALUES(6,150); +INSERT INTO product_slots VALUES(6,151); +INSERT INTO product_slots VALUES(6,152); +INSERT INTO product_slots VALUES(6,153); +INSERT INTO product_slots VALUES(6,154); +INSERT INTO product_slots VALUES(6,155); +INSERT INTO product_slots VALUES(6,156); +INSERT INTO product_slots VALUES(6,157); +INSERT INTO product_slots VALUES(6,158); +INSERT INTO product_slots VALUES(6,159); +INSERT INTO product_slots VALUES(6,160); +INSERT INTO product_slots VALUES(6,161); +INSERT INTO product_slots VALUES(6,162); +INSERT INTO product_slots VALUES(6,163); +INSERT INTO product_slots VALUES(6,164); +INSERT INTO product_slots VALUES(6,165); +INSERT INTO product_slots VALUES(6,166); +INSERT INTO product_slots VALUES(6,169); +INSERT INTO product_slots VALUES(6,170); +INSERT INTO product_slots VALUES(6,171); +INSERT INTO product_slots VALUES(6,172); +INSERT INTO product_slots VALUES(6,173); +INSERT INTO product_slots VALUES(6,174); +INSERT INTO product_slots VALUES(6,175); +INSERT INTO product_slots VALUES(6,176); +INSERT INTO product_slots VALUES(6,177); +INSERT INTO product_slots VALUES(6,178); +INSERT INTO product_slots VALUES(6,179); +INSERT INTO product_slots VALUES(6,180); +INSERT INTO product_slots VALUES(6,181); +INSERT INTO product_slots VALUES(6,182); +INSERT INTO product_slots VALUES(6,183); +INSERT INTO product_slots VALUES(6,184); +INSERT INTO product_slots VALUES(6,185); +INSERT INTO product_slots VALUES(6,186); +INSERT INTO product_slots VALUES(6,187); +INSERT INTO product_slots VALUES(6,188); +INSERT INTO product_slots VALUES(6,189); +INSERT INTO product_slots VALUES(6,190); +INSERT INTO product_slots VALUES(6,191); +INSERT INTO product_slots VALUES(6,192); +INSERT INTO product_slots VALUES(6,193); +INSERT INTO product_slots VALUES(6,194); +INSERT INTO product_slots VALUES(6,198); +INSERT INTO product_slots VALUES(6,199); +INSERT INTO product_slots VALUES(6,200); +INSERT INTO product_slots VALUES(6,201); +INSERT INTO product_slots VALUES(6,202); +INSERT INTO product_slots VALUES(6,203); +INSERT INTO product_slots VALUES(6,204); +INSERT INTO product_slots VALUES(6,205); +INSERT INTO product_slots VALUES(6,206); +INSERT INTO product_slots VALUES(6,207); +INSERT INTO product_slots VALUES(6,208); +INSERT INTO product_slots VALUES(6,209); +INSERT INTO product_slots VALUES(6,210); +INSERT INTO product_slots VALUES(6,211); +INSERT INTO product_slots VALUES(6,212); +INSERT INTO product_slots VALUES(6,213); +INSERT INTO product_slots VALUES(6,214); +INSERT INTO product_slots VALUES(6,215); +INSERT INTO product_slots VALUES(6,216); +INSERT INTO product_slots VALUES(6,217); +INSERT INTO product_slots VALUES(6,218); +INSERT INTO product_slots VALUES(6,219); +INSERT INTO product_slots VALUES(6,220); +INSERT INTO product_slots VALUES(6,222); +INSERT INTO product_slots VALUES(6,223); +INSERT INTO product_slots VALUES(6,224); +INSERT INTO product_slots VALUES(6,225); +INSERT INTO product_slots VALUES(6,226); +INSERT INTO product_slots VALUES(6,227); +INSERT INTO product_slots VALUES(6,228); +INSERT INTO product_slots VALUES(6,229); +INSERT INTO product_slots VALUES(6,230); +INSERT INTO product_slots VALUES(6,231); +INSERT INTO product_slots VALUES(6,232); +INSERT INTO product_slots VALUES(6,234); +INSERT INTO product_slots VALUES(6,235); +INSERT INTO product_slots VALUES(6,236); +INSERT INTO product_slots VALUES(6,237); +INSERT INTO product_slots VALUES(6,238); +INSERT INTO product_slots VALUES(6,239); +INSERT INTO product_slots VALUES(6,240); +INSERT INTO product_slots VALUES(6,244); +INSERT INTO product_slots VALUES(6,274); +INSERT INTO product_slots VALUES(6,275); +INSERT INTO product_slots VALUES(6,277); +INSERT INTO product_slots VALUES(6,278); +INSERT INTO product_slots VALUES(6,279); +INSERT INTO product_slots VALUES(6,283); +INSERT INTO product_slots VALUES(6,284); +INSERT INTO product_slots VALUES(6,285); +INSERT INTO product_slots VALUES(6,286); +INSERT INTO product_slots VALUES(6,287); +INSERT INTO product_slots VALUES(7,1); +INSERT INTO product_slots VALUES(7,2); +INSERT INTO product_slots VALUES(7,3); +INSERT INTO product_slots VALUES(7,4); +INSERT INTO product_slots VALUES(7,5); +INSERT INTO product_slots VALUES(7,6); +INSERT INTO product_slots VALUES(7,7); +INSERT INTO product_slots VALUES(7,8); +INSERT INTO product_slots VALUES(7,9); +INSERT INTO product_slots VALUES(7,17); +INSERT INTO product_slots VALUES(7,18); +INSERT INTO product_slots VALUES(7,20); +INSERT INTO product_slots VALUES(7,21); +INSERT INTO product_slots VALUES(7,22); +INSERT INTO product_slots VALUES(7,33); +INSERT INTO product_slots VALUES(7,35); +INSERT INTO product_slots VALUES(7,37); +INSERT INTO product_slots VALUES(7,38); +INSERT INTO product_slots VALUES(7,39); +INSERT INTO product_slots VALUES(7,40); +INSERT INTO product_slots VALUES(7,43); +INSERT INTO product_slots VALUES(7,45); +INSERT INTO product_slots VALUES(7,46); +INSERT INTO product_slots VALUES(7,48); +INSERT INTO product_slots VALUES(7,49); +INSERT INTO product_slots VALUES(7,51); +INSERT INTO product_slots VALUES(7,52); +INSERT INTO product_slots VALUES(7,53); +INSERT INTO product_slots VALUES(7,54); +INSERT INTO product_slots VALUES(7,57); +INSERT INTO product_slots VALUES(7,58); +INSERT INTO product_slots VALUES(7,59); +INSERT INTO product_slots VALUES(7,60); +INSERT INTO product_slots VALUES(7,61); +INSERT INTO product_slots VALUES(7,62); +INSERT INTO product_slots VALUES(7,63); +INSERT INTO product_slots VALUES(7,64); +INSERT INTO product_slots VALUES(7,65); +INSERT INTO product_slots VALUES(7,66); +INSERT INTO product_slots VALUES(7,67); +INSERT INTO product_slots VALUES(7,68); +INSERT INTO product_slots VALUES(7,69); +INSERT INTO product_slots VALUES(7,70); +INSERT INTO product_slots VALUES(7,71); +INSERT INTO product_slots VALUES(7,72); +INSERT INTO product_slots VALUES(7,73); +INSERT INTO product_slots VALUES(7,74); +INSERT INTO product_slots VALUES(7,75); +INSERT INTO product_slots VALUES(7,76); +INSERT INTO product_slots VALUES(7,77); +INSERT INTO product_slots VALUES(7,78); +INSERT INTO product_slots VALUES(7,79); +INSERT INTO product_slots VALUES(7,80); +INSERT INTO product_slots VALUES(7,81); +INSERT INTO product_slots VALUES(7,82); +INSERT INTO product_slots VALUES(7,83); +INSERT INTO product_slots VALUES(7,84); +INSERT INTO product_slots VALUES(7,85); +INSERT INTO product_slots VALUES(7,86); +INSERT INTO product_slots VALUES(7,87); +INSERT INTO product_slots VALUES(7,88); +INSERT INTO product_slots VALUES(7,89); +INSERT INTO product_slots VALUES(7,90); +INSERT INTO product_slots VALUES(7,91); +INSERT INTO product_slots VALUES(7,92); +INSERT INTO product_slots VALUES(7,93); +INSERT INTO product_slots VALUES(7,94); +INSERT INTO product_slots VALUES(7,95); +INSERT INTO product_slots VALUES(7,96); +INSERT INTO product_slots VALUES(7,97); +INSERT INTO product_slots VALUES(7,98); +INSERT INTO product_slots VALUES(7,99); +INSERT INTO product_slots VALUES(7,100); +INSERT INTO product_slots VALUES(7,102); +INSERT INTO product_slots VALUES(7,103); +INSERT INTO product_slots VALUES(7,104); +INSERT INTO product_slots VALUES(7,105); +INSERT INTO product_slots VALUES(7,106); +INSERT INTO product_slots VALUES(7,107); +INSERT INTO product_slots VALUES(7,108); +INSERT INTO product_slots VALUES(7,109); +INSERT INTO product_slots VALUES(7,110); +INSERT INTO product_slots VALUES(7,111); +INSERT INTO product_slots VALUES(7,112); +INSERT INTO product_slots VALUES(7,113); +INSERT INTO product_slots VALUES(7,114); +INSERT INTO product_slots VALUES(7,115); +INSERT INTO product_slots VALUES(7,117); +INSERT INTO product_slots VALUES(7,118); +INSERT INTO product_slots VALUES(7,119); +INSERT INTO product_slots VALUES(7,120); +INSERT INTO product_slots VALUES(7,121); +INSERT INTO product_slots VALUES(7,122); +INSERT INTO product_slots VALUES(7,123); +INSERT INTO product_slots VALUES(7,124); +INSERT INTO product_slots VALUES(7,125); +INSERT INTO product_slots VALUES(7,126); +INSERT INTO product_slots VALUES(7,127); +INSERT INTO product_slots VALUES(7,128); +INSERT INTO product_slots VALUES(7,129); +INSERT INTO product_slots VALUES(7,130); +INSERT INTO product_slots VALUES(7,131); +INSERT INTO product_slots VALUES(7,132); +INSERT INTO product_slots VALUES(7,133); +INSERT INTO product_slots VALUES(7,134); +INSERT INTO product_slots VALUES(7,135); +INSERT INTO product_slots VALUES(7,136); +INSERT INTO product_slots VALUES(7,138); +INSERT INTO product_slots VALUES(7,139); +INSERT INTO product_slots VALUES(7,140); +INSERT INTO product_slots VALUES(7,141); +INSERT INTO product_slots VALUES(7,142); +INSERT INTO product_slots VALUES(7,143); +INSERT INTO product_slots VALUES(7,145); +INSERT INTO product_slots VALUES(7,146); +INSERT INTO product_slots VALUES(7,147); +INSERT INTO product_slots VALUES(7,148); +INSERT INTO product_slots VALUES(7,149); +INSERT INTO product_slots VALUES(7,150); +INSERT INTO product_slots VALUES(7,151); +INSERT INTO product_slots VALUES(7,152); +INSERT INTO product_slots VALUES(7,153); +INSERT INTO product_slots VALUES(7,154); +INSERT INTO product_slots VALUES(7,155); +INSERT INTO product_slots VALUES(7,156); +INSERT INTO product_slots VALUES(7,157); +INSERT INTO product_slots VALUES(7,158); +INSERT INTO product_slots VALUES(7,159); +INSERT INTO product_slots VALUES(7,160); +INSERT INTO product_slots VALUES(7,161); +INSERT INTO product_slots VALUES(7,162); +INSERT INTO product_slots VALUES(7,163); +INSERT INTO product_slots VALUES(7,164); +INSERT INTO product_slots VALUES(7,165); +INSERT INTO product_slots VALUES(7,166); +INSERT INTO product_slots VALUES(7,167); +INSERT INTO product_slots VALUES(7,168); +INSERT INTO product_slots VALUES(7,169); +INSERT INTO product_slots VALUES(7,170); +INSERT INTO product_slots VALUES(7,171); +INSERT INTO product_slots VALUES(7,172); +INSERT INTO product_slots VALUES(7,173); +INSERT INTO product_slots VALUES(7,174); +INSERT INTO product_slots VALUES(7,175); +INSERT INTO product_slots VALUES(7,176); +INSERT INTO product_slots VALUES(7,177); +INSERT INTO product_slots VALUES(7,178); +INSERT INTO product_slots VALUES(7,179); +INSERT INTO product_slots VALUES(7,180); +INSERT INTO product_slots VALUES(7,181); +INSERT INTO product_slots VALUES(7,182); +INSERT INTO product_slots VALUES(7,183); +INSERT INTO product_slots VALUES(7,184); +INSERT INTO product_slots VALUES(7,185); +INSERT INTO product_slots VALUES(7,186); +INSERT INTO product_slots VALUES(7,187); +INSERT INTO product_slots VALUES(7,188); +INSERT INTO product_slots VALUES(7,189); +INSERT INTO product_slots VALUES(7,190); +INSERT INTO product_slots VALUES(7,191); +INSERT INTO product_slots VALUES(7,192); +INSERT INTO product_slots VALUES(7,193); +INSERT INTO product_slots VALUES(7,194); +INSERT INTO product_slots VALUES(7,195); +INSERT INTO product_slots VALUES(7,196); +INSERT INTO product_slots VALUES(7,197); +INSERT INTO product_slots VALUES(7,198); +INSERT INTO product_slots VALUES(7,199); +INSERT INTO product_slots VALUES(7,200); +INSERT INTO product_slots VALUES(7,201); +INSERT INTO product_slots VALUES(7,202); +INSERT INTO product_slots VALUES(7,203); +INSERT INTO product_slots VALUES(7,204); +INSERT INTO product_slots VALUES(7,205); +INSERT INTO product_slots VALUES(7,206); +INSERT INTO product_slots VALUES(7,207); +INSERT INTO product_slots VALUES(7,208); +INSERT INTO product_slots VALUES(7,209); +INSERT INTO product_slots VALUES(7,210); +INSERT INTO product_slots VALUES(7,211); +INSERT INTO product_slots VALUES(7,212); +INSERT INTO product_slots VALUES(7,213); +INSERT INTO product_slots VALUES(7,214); +INSERT INTO product_slots VALUES(7,215); +INSERT INTO product_slots VALUES(7,216); +INSERT INTO product_slots VALUES(7,217); +INSERT INTO product_slots VALUES(7,218); +INSERT INTO product_slots VALUES(7,219); +INSERT INTO product_slots VALUES(7,220); +INSERT INTO product_slots VALUES(7,221); +INSERT INTO product_slots VALUES(7,222); +INSERT INTO product_slots VALUES(7,223); +INSERT INTO product_slots VALUES(7,224); +INSERT INTO product_slots VALUES(7,225); +INSERT INTO product_slots VALUES(7,226); +INSERT INTO product_slots VALUES(7,227); +INSERT INTO product_slots VALUES(7,228); +INSERT INTO product_slots VALUES(7,229); +INSERT INTO product_slots VALUES(7,230); +INSERT INTO product_slots VALUES(7,231); +INSERT INTO product_slots VALUES(7,232); +INSERT INTO product_slots VALUES(7,233); +INSERT INTO product_slots VALUES(7,234); +INSERT INTO product_slots VALUES(7,235); +INSERT INTO product_slots VALUES(7,236); +INSERT INTO product_slots VALUES(7,237); +INSERT INTO product_slots VALUES(7,238); +INSERT INTO product_slots VALUES(7,239); +INSERT INTO product_slots VALUES(7,240); +INSERT INTO product_slots VALUES(7,241); +INSERT INTO product_slots VALUES(7,242); +INSERT INTO product_slots VALUES(7,243); +INSERT INTO product_slots VALUES(7,244); +INSERT INTO product_slots VALUES(7,274); +INSERT INTO product_slots VALUES(7,275); +INSERT INTO product_slots VALUES(7,279); +INSERT INTO product_slots VALUES(7,280); +INSERT INTO product_slots VALUES(7,281); +INSERT INTO product_slots VALUES(7,282); +INSERT INTO product_slots VALUES(7,283); +INSERT INTO product_slots VALUES(7,284); +INSERT INTO product_slots VALUES(7,285); +INSERT INTO product_slots VALUES(7,286); +INSERT INTO product_slots VALUES(7,287); +INSERT INTO product_slots VALUES(8,1); +INSERT INTO product_slots VALUES(8,2); +INSERT INTO product_slots VALUES(8,3); +INSERT INTO product_slots VALUES(8,4); +INSERT INTO product_slots VALUES(8,5); +INSERT INTO product_slots VALUES(8,6); +INSERT INTO product_slots VALUES(8,7); +INSERT INTO product_slots VALUES(8,12); +INSERT INTO product_slots VALUES(8,17); +INSERT INTO product_slots VALUES(8,18); +INSERT INTO product_slots VALUES(8,20); +INSERT INTO product_slots VALUES(8,21); +INSERT INTO product_slots VALUES(8,22); +INSERT INTO product_slots VALUES(8,33); +INSERT INTO product_slots VALUES(8,35); +INSERT INTO product_slots VALUES(8,37); +INSERT INTO product_slots VALUES(8,38); +INSERT INTO product_slots VALUES(8,39); +INSERT INTO product_slots VALUES(8,40); +INSERT INTO product_slots VALUES(8,43); +INSERT INTO product_slots VALUES(8,45); +INSERT INTO product_slots VALUES(8,46); +INSERT INTO product_slots VALUES(8,48); +INSERT INTO product_slots VALUES(8,49); +INSERT INTO product_slots VALUES(8,51); +INSERT INTO product_slots VALUES(8,52); +INSERT INTO product_slots VALUES(8,53); +INSERT INTO product_slots VALUES(8,54); +INSERT INTO product_slots VALUES(8,57); +INSERT INTO product_slots VALUES(8,58); +INSERT INTO product_slots VALUES(8,59); +INSERT INTO product_slots VALUES(8,60); +INSERT INTO product_slots VALUES(8,61); +INSERT INTO product_slots VALUES(8,62); +INSERT INTO product_slots VALUES(8,63); +INSERT INTO product_slots VALUES(8,64); +INSERT INTO product_slots VALUES(8,65); +INSERT INTO product_slots VALUES(8,66); +INSERT INTO product_slots VALUES(8,67); +INSERT INTO product_slots VALUES(8,68); +INSERT INTO product_slots VALUES(8,69); +INSERT INTO product_slots VALUES(8,70); +INSERT INTO product_slots VALUES(8,71); +INSERT INTO product_slots VALUES(8,72); +INSERT INTO product_slots VALUES(8,73); +INSERT INTO product_slots VALUES(8,74); +INSERT INTO product_slots VALUES(8,75); +INSERT INTO product_slots VALUES(8,76); +INSERT INTO product_slots VALUES(8,77); +INSERT INTO product_slots VALUES(8,78); +INSERT INTO product_slots VALUES(8,79); +INSERT INTO product_slots VALUES(8,80); +INSERT INTO product_slots VALUES(8,81); +INSERT INTO product_slots VALUES(8,82); +INSERT INTO product_slots VALUES(8,83); +INSERT INTO product_slots VALUES(8,84); +INSERT INTO product_slots VALUES(8,85); +INSERT INTO product_slots VALUES(8,86); +INSERT INTO product_slots VALUES(8,87); +INSERT INTO product_slots VALUES(8,88); +INSERT INTO product_slots VALUES(8,89); +INSERT INTO product_slots VALUES(8,90); +INSERT INTO product_slots VALUES(8,91); +INSERT INTO product_slots VALUES(8,92); +INSERT INTO product_slots VALUES(8,93); +INSERT INTO product_slots VALUES(8,94); +INSERT INTO product_slots VALUES(8,95); +INSERT INTO product_slots VALUES(8,96); +INSERT INTO product_slots VALUES(8,97); +INSERT INTO product_slots VALUES(8,98); +INSERT INTO product_slots VALUES(8,99); +INSERT INTO product_slots VALUES(8,100); +INSERT INTO product_slots VALUES(8,102); +INSERT INTO product_slots VALUES(8,103); +INSERT INTO product_slots VALUES(8,104); +INSERT INTO product_slots VALUES(8,105); +INSERT INTO product_slots VALUES(8,106); +INSERT INTO product_slots VALUES(8,107); +INSERT INTO product_slots VALUES(8,108); +INSERT INTO product_slots VALUES(8,109); +INSERT INTO product_slots VALUES(8,110); +INSERT INTO product_slots VALUES(8,111); +INSERT INTO product_slots VALUES(8,112); +INSERT INTO product_slots VALUES(8,113); +INSERT INTO product_slots VALUES(8,114); +INSERT INTO product_slots VALUES(8,115); +INSERT INTO product_slots VALUES(8,117); +INSERT INTO product_slots VALUES(8,118); +INSERT INTO product_slots VALUES(8,119); +INSERT INTO product_slots VALUES(8,120); +INSERT INTO product_slots VALUES(8,121); +INSERT INTO product_slots VALUES(8,122); +INSERT INTO product_slots VALUES(8,123); +INSERT INTO product_slots VALUES(8,124); +INSERT INTO product_slots VALUES(8,125); +INSERT INTO product_slots VALUES(8,126); +INSERT INTO product_slots VALUES(8,127); +INSERT INTO product_slots VALUES(8,128); +INSERT INTO product_slots VALUES(8,129); +INSERT INTO product_slots VALUES(8,130); +INSERT INTO product_slots VALUES(8,131); +INSERT INTO product_slots VALUES(8,132); +INSERT INTO product_slots VALUES(8,133); +INSERT INTO product_slots VALUES(8,134); +INSERT INTO product_slots VALUES(8,135); +INSERT INTO product_slots VALUES(8,136); +INSERT INTO product_slots VALUES(8,138); +INSERT INTO product_slots VALUES(8,139); +INSERT INTO product_slots VALUES(8,140); +INSERT INTO product_slots VALUES(8,141); +INSERT INTO product_slots VALUES(8,142); +INSERT INTO product_slots VALUES(8,143); +INSERT INTO product_slots VALUES(8,145); +INSERT INTO product_slots VALUES(8,146); +INSERT INTO product_slots VALUES(8,147); +INSERT INTO product_slots VALUES(8,148); +INSERT INTO product_slots VALUES(8,149); +INSERT INTO product_slots VALUES(8,150); +INSERT INTO product_slots VALUES(8,151); +INSERT INTO product_slots VALUES(8,152); +INSERT INTO product_slots VALUES(8,153); +INSERT INTO product_slots VALUES(8,154); +INSERT INTO product_slots VALUES(8,155); +INSERT INTO product_slots VALUES(8,156); +INSERT INTO product_slots VALUES(8,157); +INSERT INTO product_slots VALUES(8,158); +INSERT INTO product_slots VALUES(8,159); +INSERT INTO product_slots VALUES(8,160); +INSERT INTO product_slots VALUES(8,161); +INSERT INTO product_slots VALUES(8,162); +INSERT INTO product_slots VALUES(8,163); +INSERT INTO product_slots VALUES(8,164); +INSERT INTO product_slots VALUES(8,165); +INSERT INTO product_slots VALUES(8,166); +INSERT INTO product_slots VALUES(8,167); +INSERT INTO product_slots VALUES(8,168); +INSERT INTO product_slots VALUES(8,169); +INSERT INTO product_slots VALUES(8,170); +INSERT INTO product_slots VALUES(8,171); +INSERT INTO product_slots VALUES(8,172); +INSERT INTO product_slots VALUES(8,173); +INSERT INTO product_slots VALUES(8,174); +INSERT INTO product_slots VALUES(8,175); +INSERT INTO product_slots VALUES(8,176); +INSERT INTO product_slots VALUES(8,177); +INSERT INTO product_slots VALUES(8,178); +INSERT INTO product_slots VALUES(8,179); +INSERT INTO product_slots VALUES(8,180); +INSERT INTO product_slots VALUES(8,181); +INSERT INTO product_slots VALUES(8,182); +INSERT INTO product_slots VALUES(8,183); +INSERT INTO product_slots VALUES(8,184); +INSERT INTO product_slots VALUES(8,185); +INSERT INTO product_slots VALUES(8,186); +INSERT INTO product_slots VALUES(8,187); +INSERT INTO product_slots VALUES(8,188); +INSERT INTO product_slots VALUES(8,189); +INSERT INTO product_slots VALUES(8,190); +INSERT INTO product_slots VALUES(8,191); +INSERT INTO product_slots VALUES(8,192); +INSERT INTO product_slots VALUES(8,193); +INSERT INTO product_slots VALUES(8,194); +INSERT INTO product_slots VALUES(8,195); +INSERT INTO product_slots VALUES(8,196); +INSERT INTO product_slots VALUES(8,197); +INSERT INTO product_slots VALUES(8,198); +INSERT INTO product_slots VALUES(8,199); +INSERT INTO product_slots VALUES(8,200); +INSERT INTO product_slots VALUES(8,201); +INSERT INTO product_slots VALUES(8,202); +INSERT INTO product_slots VALUES(8,203); +INSERT INTO product_slots VALUES(8,204); +INSERT INTO product_slots VALUES(8,205); +INSERT INTO product_slots VALUES(8,206); +INSERT INTO product_slots VALUES(8,207); +INSERT INTO product_slots VALUES(8,208); +INSERT INTO product_slots VALUES(8,209); +INSERT INTO product_slots VALUES(8,210); +INSERT INTO product_slots VALUES(8,211); +INSERT INTO product_slots VALUES(8,212); +INSERT INTO product_slots VALUES(8,213); +INSERT INTO product_slots VALUES(8,214); +INSERT INTO product_slots VALUES(8,215); +INSERT INTO product_slots VALUES(8,216); +INSERT INTO product_slots VALUES(8,217); +INSERT INTO product_slots VALUES(8,218); +INSERT INTO product_slots VALUES(8,219); +INSERT INTO product_slots VALUES(8,220); +INSERT INTO product_slots VALUES(8,221); +INSERT INTO product_slots VALUES(8,222); +INSERT INTO product_slots VALUES(8,223); +INSERT INTO product_slots VALUES(8,224); +INSERT INTO product_slots VALUES(8,225); +INSERT INTO product_slots VALUES(8,226); +INSERT INTO product_slots VALUES(8,227); +INSERT INTO product_slots VALUES(8,228); +INSERT INTO product_slots VALUES(8,229); +INSERT INTO product_slots VALUES(8,230); +INSERT INTO product_slots VALUES(8,231); +INSERT INTO product_slots VALUES(8,232); +INSERT INTO product_slots VALUES(8,233); +INSERT INTO product_slots VALUES(8,234); +INSERT INTO product_slots VALUES(8,235); +INSERT INTO product_slots VALUES(8,236); +INSERT INTO product_slots VALUES(8,237); +INSERT INTO product_slots VALUES(8,238); +INSERT INTO product_slots VALUES(8,239); +INSERT INTO product_slots VALUES(8,240); +INSERT INTO product_slots VALUES(8,241); +INSERT INTO product_slots VALUES(8,242); +INSERT INTO product_slots VALUES(8,243); +INSERT INTO product_slots VALUES(8,244); +INSERT INTO product_slots VALUES(8,274); +INSERT INTO product_slots VALUES(8,275); +INSERT INTO product_slots VALUES(8,279); +INSERT INTO product_slots VALUES(8,280); +INSERT INTO product_slots VALUES(8,281); +INSERT INTO product_slots VALUES(8,282); +INSERT INTO product_slots VALUES(8,283); +INSERT INTO product_slots VALUES(8,284); +INSERT INTO product_slots VALUES(8,285); +INSERT INTO product_slots VALUES(8,286); +INSERT INTO product_slots VALUES(8,287); +INSERT INTO product_slots VALUES(9,1); +INSERT INTO product_slots VALUES(9,2); +INSERT INTO product_slots VALUES(9,3); +INSERT INTO product_slots VALUES(9,4); +INSERT INTO product_slots VALUES(9,5); +INSERT INTO product_slots VALUES(9,6); +INSERT INTO product_slots VALUES(9,7); +INSERT INTO product_slots VALUES(9,12); +INSERT INTO product_slots VALUES(9,18); +INSERT INTO product_slots VALUES(9,19); +INSERT INTO product_slots VALUES(9,20); +INSERT INTO product_slots VALUES(9,21); +INSERT INTO product_slots VALUES(9,22); +INSERT INTO product_slots VALUES(9,33); +INSERT INTO product_slots VALUES(9,35); +INSERT INTO product_slots VALUES(9,37); +INSERT INTO product_slots VALUES(9,38); +INSERT INTO product_slots VALUES(9,39); +INSERT INTO product_slots VALUES(9,40); +INSERT INTO product_slots VALUES(9,43); +INSERT INTO product_slots VALUES(9,45); +INSERT INTO product_slots VALUES(9,48); +INSERT INTO product_slots VALUES(9,49); +INSERT INTO product_slots VALUES(9,51); +INSERT INTO product_slots VALUES(9,52); +INSERT INTO product_slots VALUES(9,57); +INSERT INTO product_slots VALUES(9,58); +INSERT INTO product_slots VALUES(9,59); +INSERT INTO product_slots VALUES(9,62); +INSERT INTO product_slots VALUES(9,63); +INSERT INTO product_slots VALUES(9,64); +INSERT INTO product_slots VALUES(9,65); +INSERT INTO product_slots VALUES(9,66); +INSERT INTO product_slots VALUES(9,67); +INSERT INTO product_slots VALUES(9,69); +INSERT INTO product_slots VALUES(9,70); +INSERT INTO product_slots VALUES(9,71); +INSERT INTO product_slots VALUES(9,72); +INSERT INTO product_slots VALUES(9,73); +INSERT INTO product_slots VALUES(9,75); +INSERT INTO product_slots VALUES(9,82); +INSERT INTO product_slots VALUES(9,83); +INSERT INTO product_slots VALUES(9,84); +INSERT INTO product_slots VALUES(9,90); +INSERT INTO product_slots VALUES(9,91); +INSERT INTO product_slots VALUES(9,92); +INSERT INTO product_slots VALUES(9,93); +INSERT INTO product_slots VALUES(9,94); +INSERT INTO product_slots VALUES(9,97); +INSERT INTO product_slots VALUES(9,98); +INSERT INTO product_slots VALUES(9,99); +INSERT INTO product_slots VALUES(9,100); +INSERT INTO product_slots VALUES(9,102); +INSERT INTO product_slots VALUES(9,103); +INSERT INTO product_slots VALUES(9,104); +INSERT INTO product_slots VALUES(9,110); +INSERT INTO product_slots VALUES(9,111); +INSERT INTO product_slots VALUES(9,112); +INSERT INTO product_slots VALUES(9,116); +INSERT INTO product_slots VALUES(9,117); +INSERT INTO product_slots VALUES(9,118); +INSERT INTO product_slots VALUES(9,119); +INSERT INTO product_slots VALUES(9,120); +INSERT INTO product_slots VALUES(9,121); +INSERT INTO product_slots VALUES(9,122); +INSERT INTO product_slots VALUES(9,123); +INSERT INTO product_slots VALUES(9,124); +INSERT INTO product_slots VALUES(9,125); +INSERT INTO product_slots VALUES(9,126); +INSERT INTO product_slots VALUES(9,127); +INSERT INTO product_slots VALUES(9,128); +INSERT INTO product_slots VALUES(9,129); +INSERT INTO product_slots VALUES(9,130); +INSERT INTO product_slots VALUES(9,131); +INSERT INTO product_slots VALUES(9,132); +INSERT INTO product_slots VALUES(9,133); +INSERT INTO product_slots VALUES(9,134); +INSERT INTO product_slots VALUES(9,135); +INSERT INTO product_slots VALUES(9,136); +INSERT INTO product_slots VALUES(9,137); +INSERT INTO product_slots VALUES(9,138); +INSERT INTO product_slots VALUES(9,139); +INSERT INTO product_slots VALUES(9,140); +INSERT INTO product_slots VALUES(9,141); +INSERT INTO product_slots VALUES(9,142); +INSERT INTO product_slots VALUES(9,143); +INSERT INTO product_slots VALUES(9,144); +INSERT INTO product_slots VALUES(9,145); +INSERT INTO product_slots VALUES(9,146); +INSERT INTO product_slots VALUES(9,147); +INSERT INTO product_slots VALUES(9,148); +INSERT INTO product_slots VALUES(9,149); +INSERT INTO product_slots VALUES(9,150); +INSERT INTO product_slots VALUES(9,151); +INSERT INTO product_slots VALUES(9,152); +INSERT INTO product_slots VALUES(9,153); +INSERT INTO product_slots VALUES(9,154); +INSERT INTO product_slots VALUES(9,155); +INSERT INTO product_slots VALUES(9,156); +INSERT INTO product_slots VALUES(9,157); +INSERT INTO product_slots VALUES(9,158); +INSERT INTO product_slots VALUES(9,159); +INSERT INTO product_slots VALUES(9,160); +INSERT INTO product_slots VALUES(9,161); +INSERT INTO product_slots VALUES(9,162); +INSERT INTO product_slots VALUES(9,163); +INSERT INTO product_slots VALUES(9,164); +INSERT INTO product_slots VALUES(9,165); +INSERT INTO product_slots VALUES(9,166); +INSERT INTO product_slots VALUES(9,167); +INSERT INTO product_slots VALUES(9,168); +INSERT INTO product_slots VALUES(9,169); +INSERT INTO product_slots VALUES(9,170); +INSERT INTO product_slots VALUES(9,171); +INSERT INTO product_slots VALUES(9,172); +INSERT INTO product_slots VALUES(9,173); +INSERT INTO product_slots VALUES(9,174); +INSERT INTO product_slots VALUES(9,175); +INSERT INTO product_slots VALUES(9,176); +INSERT INTO product_slots VALUES(9,177); +INSERT INTO product_slots VALUES(9,178); +INSERT INTO product_slots VALUES(9,179); +INSERT INTO product_slots VALUES(9,180); +INSERT INTO product_slots VALUES(9,181); +INSERT INTO product_slots VALUES(9,182); +INSERT INTO product_slots VALUES(9,183); +INSERT INTO product_slots VALUES(9,184); +INSERT INTO product_slots VALUES(9,185); +INSERT INTO product_slots VALUES(9,186); +INSERT INTO product_slots VALUES(9,187); +INSERT INTO product_slots VALUES(9,188); +INSERT INTO product_slots VALUES(9,189); +INSERT INTO product_slots VALUES(9,190); +INSERT INTO product_slots VALUES(9,191); +INSERT INTO product_slots VALUES(9,192); +INSERT INTO product_slots VALUES(9,193); +INSERT INTO product_slots VALUES(9,194); +INSERT INTO product_slots VALUES(9,195); +INSERT INTO product_slots VALUES(9,196); +INSERT INTO product_slots VALUES(9,197); +INSERT INTO product_slots VALUES(9,198); +INSERT INTO product_slots VALUES(9,199); +INSERT INTO product_slots VALUES(9,200); +INSERT INTO product_slots VALUES(9,201); +INSERT INTO product_slots VALUES(9,202); +INSERT INTO product_slots VALUES(9,203); +INSERT INTO product_slots VALUES(9,204); +INSERT INTO product_slots VALUES(9,205); +INSERT INTO product_slots VALUES(9,206); +INSERT INTO product_slots VALUES(9,207); +INSERT INTO product_slots VALUES(9,208); +INSERT INTO product_slots VALUES(9,209); +INSERT INTO product_slots VALUES(9,210); +INSERT INTO product_slots VALUES(9,211); +INSERT INTO product_slots VALUES(9,212); +INSERT INTO product_slots VALUES(9,213); +INSERT INTO product_slots VALUES(9,214); +INSERT INTO product_slots VALUES(9,215); +INSERT INTO product_slots VALUES(9,216); +INSERT INTO product_slots VALUES(9,217); +INSERT INTO product_slots VALUES(9,218); +INSERT INTO product_slots VALUES(9,219); +INSERT INTO product_slots VALUES(9,220); +INSERT INTO product_slots VALUES(9,221); +INSERT INTO product_slots VALUES(9,222); +INSERT INTO product_slots VALUES(9,223); +INSERT INTO product_slots VALUES(9,224); +INSERT INTO product_slots VALUES(9,225); +INSERT INTO product_slots VALUES(9,226); +INSERT INTO product_slots VALUES(9,227); +INSERT INTO product_slots VALUES(9,228); +INSERT INTO product_slots VALUES(9,229); +INSERT INTO product_slots VALUES(9,230); +INSERT INTO product_slots VALUES(9,231); +INSERT INTO product_slots VALUES(9,232); +INSERT INTO product_slots VALUES(9,233); +INSERT INTO product_slots VALUES(9,234); +INSERT INTO product_slots VALUES(9,235); +INSERT INTO product_slots VALUES(9,236); +INSERT INTO product_slots VALUES(9,237); +INSERT INTO product_slots VALUES(9,238); +INSERT INTO product_slots VALUES(9,239); +INSERT INTO product_slots VALUES(9,240); +INSERT INTO product_slots VALUES(9,241); +INSERT INTO product_slots VALUES(9,242); +INSERT INTO product_slots VALUES(9,243); +INSERT INTO product_slots VALUES(9,244); +INSERT INTO product_slots VALUES(9,274); +INSERT INTO product_slots VALUES(9,275); +INSERT INTO product_slots VALUES(9,279); +INSERT INTO product_slots VALUES(9,280); +INSERT INTO product_slots VALUES(9,281); +INSERT INTO product_slots VALUES(9,282); +INSERT INTO product_slots VALUES(9,283); +INSERT INTO product_slots VALUES(9,284); +INSERT INTO product_slots VALUES(9,285); +INSERT INTO product_slots VALUES(9,286); +INSERT INTO product_slots VALUES(9,287); +INSERT INTO product_slots VALUES(10,1); +INSERT INTO product_slots VALUES(10,3); +INSERT INTO product_slots VALUES(10,4); +INSERT INTO product_slots VALUES(10,5); +INSERT INTO product_slots VALUES(10,6); +INSERT INTO product_slots VALUES(10,7); +INSERT INTO product_slots VALUES(10,12); +INSERT INTO product_slots VALUES(10,18); +INSERT INTO product_slots VALUES(10,19); +INSERT INTO product_slots VALUES(10,20); +INSERT INTO product_slots VALUES(10,21); +INSERT INTO product_slots VALUES(10,22); +INSERT INTO product_slots VALUES(10,23); +INSERT INTO product_slots VALUES(10,31); +INSERT INTO product_slots VALUES(10,33); +INSERT INTO product_slots VALUES(10,35); +INSERT INTO product_slots VALUES(10,37); +INSERT INTO product_slots VALUES(10,38); +INSERT INTO product_slots VALUES(10,39); +INSERT INTO product_slots VALUES(10,40); +INSERT INTO product_slots VALUES(10,41); +INSERT INTO product_slots VALUES(10,43); +INSERT INTO product_slots VALUES(10,45); +INSERT INTO product_slots VALUES(10,46); +INSERT INTO product_slots VALUES(10,47); +INSERT INTO product_slots VALUES(10,48); +INSERT INTO product_slots VALUES(10,49); +INSERT INTO product_slots VALUES(10,50); +INSERT INTO product_slots VALUES(10,51); +INSERT INTO product_slots VALUES(10,52); +INSERT INTO product_slots VALUES(10,53); +INSERT INTO product_slots VALUES(10,54); +INSERT INTO product_slots VALUES(10,55); +INSERT INTO product_slots VALUES(10,56); +INSERT INTO product_slots VALUES(10,57); +INSERT INTO product_slots VALUES(10,58); +INSERT INTO product_slots VALUES(10,59); +INSERT INTO product_slots VALUES(10,60); +INSERT INTO product_slots VALUES(10,61); +INSERT INTO product_slots VALUES(10,62); +INSERT INTO product_slots VALUES(10,63); +INSERT INTO product_slots VALUES(10,64); +INSERT INTO product_slots VALUES(10,65); +INSERT INTO product_slots VALUES(10,66); +INSERT INTO product_slots VALUES(10,67); +INSERT INTO product_slots VALUES(10,68); +INSERT INTO product_slots VALUES(10,69); +INSERT INTO product_slots VALUES(10,70); +INSERT INTO product_slots VALUES(10,71); +INSERT INTO product_slots VALUES(10,72); +INSERT INTO product_slots VALUES(10,73); +INSERT INTO product_slots VALUES(10,74); +INSERT INTO product_slots VALUES(10,75); +INSERT INTO product_slots VALUES(10,76); +INSERT INTO product_slots VALUES(10,77); +INSERT INTO product_slots VALUES(10,78); +INSERT INTO product_slots VALUES(10,79); +INSERT INTO product_slots VALUES(10,80); +INSERT INTO product_slots VALUES(10,81); +INSERT INTO product_slots VALUES(10,82); +INSERT INTO product_slots VALUES(10,83); +INSERT INTO product_slots VALUES(10,84); +INSERT INTO product_slots VALUES(10,85); +INSERT INTO product_slots VALUES(10,86); +INSERT INTO product_slots VALUES(10,87); +INSERT INTO product_slots VALUES(10,88); +INSERT INTO product_slots VALUES(10,89); +INSERT INTO product_slots VALUES(10,90); +INSERT INTO product_slots VALUES(10,91); +INSERT INTO product_slots VALUES(10,92); +INSERT INTO product_slots VALUES(10,93); +INSERT INTO product_slots VALUES(10,94); +INSERT INTO product_slots VALUES(10,95); +INSERT INTO product_slots VALUES(10,96); +INSERT INTO product_slots VALUES(10,97); +INSERT INTO product_slots VALUES(10,98); +INSERT INTO product_slots VALUES(10,99); +INSERT INTO product_slots VALUES(10,100); +INSERT INTO product_slots VALUES(10,101); +INSERT INTO product_slots VALUES(10,102); +INSERT INTO product_slots VALUES(10,103); +INSERT INTO product_slots VALUES(10,104); +INSERT INTO product_slots VALUES(10,105); +INSERT INTO product_slots VALUES(10,106); +INSERT INTO product_slots VALUES(10,107); +INSERT INTO product_slots VALUES(10,108); +INSERT INTO product_slots VALUES(10,109); +INSERT INTO product_slots VALUES(10,110); +INSERT INTO product_slots VALUES(10,111); +INSERT INTO product_slots VALUES(10,112); +INSERT INTO product_slots VALUES(10,113); +INSERT INTO product_slots VALUES(10,114); +INSERT INTO product_slots VALUES(10,115); +INSERT INTO product_slots VALUES(10,116); +INSERT INTO product_slots VALUES(10,117); +INSERT INTO product_slots VALUES(10,118); +INSERT INTO product_slots VALUES(10,119); +INSERT INTO product_slots VALUES(10,120); +INSERT INTO product_slots VALUES(10,121); +INSERT INTO product_slots VALUES(10,122); +INSERT INTO product_slots VALUES(10,123); +INSERT INTO product_slots VALUES(10,124); +INSERT INTO product_slots VALUES(10,125); +INSERT INTO product_slots VALUES(10,126); +INSERT INTO product_slots VALUES(10,127); +INSERT INTO product_slots VALUES(10,128); +INSERT INTO product_slots VALUES(10,129); +INSERT INTO product_slots VALUES(10,130); +INSERT INTO product_slots VALUES(10,131); +INSERT INTO product_slots VALUES(10,132); +INSERT INTO product_slots VALUES(10,133); +INSERT INTO product_slots VALUES(10,134); +INSERT INTO product_slots VALUES(10,135); +INSERT INTO product_slots VALUES(10,136); +INSERT INTO product_slots VALUES(10,137); +INSERT INTO product_slots VALUES(10,138); +INSERT INTO product_slots VALUES(10,139); +INSERT INTO product_slots VALUES(10,140); +INSERT INTO product_slots VALUES(10,141); +INSERT INTO product_slots VALUES(10,142); +INSERT INTO product_slots VALUES(10,143); +INSERT INTO product_slots VALUES(10,144); +INSERT INTO product_slots VALUES(10,145); +INSERT INTO product_slots VALUES(10,146); +INSERT INTO product_slots VALUES(10,147); +INSERT INTO product_slots VALUES(10,148); +INSERT INTO product_slots VALUES(10,149); +INSERT INTO product_slots VALUES(10,150); +INSERT INTO product_slots VALUES(10,151); +INSERT INTO product_slots VALUES(10,152); +INSERT INTO product_slots VALUES(10,153); +INSERT INTO product_slots VALUES(10,154); +INSERT INTO product_slots VALUES(10,155); +INSERT INTO product_slots VALUES(10,156); +INSERT INTO product_slots VALUES(10,157); +INSERT INTO product_slots VALUES(10,158); +INSERT INTO product_slots VALUES(10,159); +INSERT INTO product_slots VALUES(10,160); +INSERT INTO product_slots VALUES(10,161); +INSERT INTO product_slots VALUES(10,162); +INSERT INTO product_slots VALUES(10,163); +INSERT INTO product_slots VALUES(10,164); +INSERT INTO product_slots VALUES(10,165); +INSERT INTO product_slots VALUES(10,166); +INSERT INTO product_slots VALUES(10,167); +INSERT INTO product_slots VALUES(10,168); +INSERT INTO product_slots VALUES(10,169); +INSERT INTO product_slots VALUES(10,170); +INSERT INTO product_slots VALUES(10,171); +INSERT INTO product_slots VALUES(10,172); +INSERT INTO product_slots VALUES(10,173); +INSERT INTO product_slots VALUES(10,174); +INSERT INTO product_slots VALUES(10,175); +INSERT INTO product_slots VALUES(10,176); +INSERT INTO product_slots VALUES(10,177); +INSERT INTO product_slots VALUES(10,178); +INSERT INTO product_slots VALUES(10,179); +INSERT INTO product_slots VALUES(10,180); +INSERT INTO product_slots VALUES(10,181); +INSERT INTO product_slots VALUES(10,182); +INSERT INTO product_slots VALUES(10,183); +INSERT INTO product_slots VALUES(10,184); +INSERT INTO product_slots VALUES(10,185); +INSERT INTO product_slots VALUES(10,186); +INSERT INTO product_slots VALUES(10,187); +INSERT INTO product_slots VALUES(10,188); +INSERT INTO product_slots VALUES(10,189); +INSERT INTO product_slots VALUES(10,190); +INSERT INTO product_slots VALUES(10,191); +INSERT INTO product_slots VALUES(10,192); +INSERT INTO product_slots VALUES(10,193); +INSERT INTO product_slots VALUES(10,194); +INSERT INTO product_slots VALUES(10,195); +INSERT INTO product_slots VALUES(10,196); +INSERT INTO product_slots VALUES(10,197); +INSERT INTO product_slots VALUES(10,198); +INSERT INTO product_slots VALUES(10,199); +INSERT INTO product_slots VALUES(10,200); +INSERT INTO product_slots VALUES(10,201); +INSERT INTO product_slots VALUES(10,202); +INSERT INTO product_slots VALUES(10,203); +INSERT INTO product_slots VALUES(10,204); +INSERT INTO product_slots VALUES(10,205); +INSERT INTO product_slots VALUES(10,206); +INSERT INTO product_slots VALUES(10,207); +INSERT INTO product_slots VALUES(10,208); +INSERT INTO product_slots VALUES(10,209); +INSERT INTO product_slots VALUES(10,210); +INSERT INTO product_slots VALUES(10,211); +INSERT INTO product_slots VALUES(10,212); +INSERT INTO product_slots VALUES(10,213); +INSERT INTO product_slots VALUES(10,214); +INSERT INTO product_slots VALUES(10,215); +INSERT INTO product_slots VALUES(10,216); +INSERT INTO product_slots VALUES(10,217); +INSERT INTO product_slots VALUES(10,218); +INSERT INTO product_slots VALUES(10,219); +INSERT INTO product_slots VALUES(10,220); +INSERT INTO product_slots VALUES(10,221); +INSERT INTO product_slots VALUES(10,222); +INSERT INTO product_slots VALUES(10,223); +INSERT INTO product_slots VALUES(10,224); +INSERT INTO product_slots VALUES(10,225); +INSERT INTO product_slots VALUES(10,226); +INSERT INTO product_slots VALUES(10,227); +INSERT INTO product_slots VALUES(10,228); +INSERT INTO product_slots VALUES(10,229); +INSERT INTO product_slots VALUES(10,230); +INSERT INTO product_slots VALUES(10,231); +INSERT INTO product_slots VALUES(10,232); +INSERT INTO product_slots VALUES(10,234); +INSERT INTO product_slots VALUES(10,235); +INSERT INTO product_slots VALUES(10,236); +INSERT INTO product_slots VALUES(10,237); +INSERT INTO product_slots VALUES(10,238); +INSERT INTO product_slots VALUES(10,239); +INSERT INTO product_slots VALUES(10,240); +INSERT INTO product_slots VALUES(10,241); +INSERT INTO product_slots VALUES(10,242); +INSERT INTO product_slots VALUES(10,243); +INSERT INTO product_slots VALUES(10,244); +INSERT INTO product_slots VALUES(10,274); +INSERT INTO product_slots VALUES(10,275); +INSERT INTO product_slots VALUES(10,279); +INSERT INTO product_slots VALUES(10,280); +INSERT INTO product_slots VALUES(10,281); +INSERT INTO product_slots VALUES(10,282); +INSERT INTO product_slots VALUES(11,1); +INSERT INTO product_slots VALUES(11,3); +INSERT INTO product_slots VALUES(11,4); +INSERT INTO product_slots VALUES(11,5); +INSERT INTO product_slots VALUES(11,6); +INSERT INTO product_slots VALUES(11,7); +INSERT INTO product_slots VALUES(11,8); +INSERT INTO product_slots VALUES(11,9); +INSERT INTO product_slots VALUES(11,12); +INSERT INTO product_slots VALUES(11,16); +INSERT INTO product_slots VALUES(11,18); +INSERT INTO product_slots VALUES(11,20); +INSERT INTO product_slots VALUES(11,21); +INSERT INTO product_slots VALUES(11,22); +INSERT INTO product_slots VALUES(11,33); +INSERT INTO product_slots VALUES(11,35); +INSERT INTO product_slots VALUES(11,37); +INSERT INTO product_slots VALUES(11,38); +INSERT INTO product_slots VALUES(11,40); +INSERT INTO product_slots VALUES(11,59); +INSERT INTO product_slots VALUES(11,62); +INSERT INTO product_slots VALUES(11,63); +INSERT INTO product_slots VALUES(11,64); +INSERT INTO product_slots VALUES(11,65); +INSERT INTO product_slots VALUES(11,66); +INSERT INTO product_slots VALUES(11,67); +INSERT INTO product_slots VALUES(11,68); +INSERT INTO product_slots VALUES(11,69); +INSERT INTO product_slots VALUES(11,70); +INSERT INTO product_slots VALUES(11,71); +INSERT INTO product_slots VALUES(11,72); +INSERT INTO product_slots VALUES(11,73); +INSERT INTO product_slots VALUES(11,74); +INSERT INTO product_slots VALUES(11,75); +INSERT INTO product_slots VALUES(11,76); +INSERT INTO product_slots VALUES(11,77); +INSERT INTO product_slots VALUES(11,78); +INSERT INTO product_slots VALUES(11,79); +INSERT INTO product_slots VALUES(11,80); +INSERT INTO product_slots VALUES(11,81); +INSERT INTO product_slots VALUES(11,82); +INSERT INTO product_slots VALUES(11,83); +INSERT INTO product_slots VALUES(11,84); +INSERT INTO product_slots VALUES(11,85); +INSERT INTO product_slots VALUES(11,86); +INSERT INTO product_slots VALUES(11,87); +INSERT INTO product_slots VALUES(11,88); +INSERT INTO product_slots VALUES(11,89); +INSERT INTO product_slots VALUES(11,90); +INSERT INTO product_slots VALUES(11,91); +INSERT INTO product_slots VALUES(11,92); +INSERT INTO product_slots VALUES(11,93); +INSERT INTO product_slots VALUES(11,94); +INSERT INTO product_slots VALUES(11,95); +INSERT INTO product_slots VALUES(11,96); +INSERT INTO product_slots VALUES(11,97); +INSERT INTO product_slots VALUES(11,98); +INSERT INTO product_slots VALUES(11,99); +INSERT INTO product_slots VALUES(11,100); +INSERT INTO product_slots VALUES(11,102); +INSERT INTO product_slots VALUES(11,103); +INSERT INTO product_slots VALUES(11,104); +INSERT INTO product_slots VALUES(11,105); +INSERT INTO product_slots VALUES(11,106); +INSERT INTO product_slots VALUES(11,107); +INSERT INTO product_slots VALUES(11,108); +INSERT INTO product_slots VALUES(11,109); +INSERT INTO product_slots VALUES(11,110); +INSERT INTO product_slots VALUES(11,111); +INSERT INTO product_slots VALUES(11,112); +INSERT INTO product_slots VALUES(11,113); +INSERT INTO product_slots VALUES(11,114); +INSERT INTO product_slots VALUES(11,115); +INSERT INTO product_slots VALUES(11,117); +INSERT INTO product_slots VALUES(11,118); +INSERT INTO product_slots VALUES(11,119); +INSERT INTO product_slots VALUES(11,120); +INSERT INTO product_slots VALUES(11,121); +INSERT INTO product_slots VALUES(11,122); +INSERT INTO product_slots VALUES(11,123); +INSERT INTO product_slots VALUES(11,124); +INSERT INTO product_slots VALUES(11,125); +INSERT INTO product_slots VALUES(11,126); +INSERT INTO product_slots VALUES(11,127); +INSERT INTO product_slots VALUES(11,128); +INSERT INTO product_slots VALUES(11,129); +INSERT INTO product_slots VALUES(11,130); +INSERT INTO product_slots VALUES(11,131); +INSERT INTO product_slots VALUES(11,132); +INSERT INTO product_slots VALUES(11,133); +INSERT INTO product_slots VALUES(11,134); +INSERT INTO product_slots VALUES(11,135); +INSERT INTO product_slots VALUES(11,136); +INSERT INTO product_slots VALUES(11,138); +INSERT INTO product_slots VALUES(11,139); +INSERT INTO product_slots VALUES(11,140); +INSERT INTO product_slots VALUES(11,141); +INSERT INTO product_slots VALUES(11,142); +INSERT INTO product_slots VALUES(11,143); +INSERT INTO product_slots VALUES(11,145); +INSERT INTO product_slots VALUES(11,146); +INSERT INTO product_slots VALUES(11,147); +INSERT INTO product_slots VALUES(11,148); +INSERT INTO product_slots VALUES(11,149); +INSERT INTO product_slots VALUES(11,150); +INSERT INTO product_slots VALUES(11,151); +INSERT INTO product_slots VALUES(11,152); +INSERT INTO product_slots VALUES(11,153); +INSERT INTO product_slots VALUES(11,154); +INSERT INTO product_slots VALUES(11,155); +INSERT INTO product_slots VALUES(11,156); +INSERT INTO product_slots VALUES(11,157); +INSERT INTO product_slots VALUES(11,158); +INSERT INTO product_slots VALUES(11,159); +INSERT INTO product_slots VALUES(11,160); +INSERT INTO product_slots VALUES(11,161); +INSERT INTO product_slots VALUES(11,162); +INSERT INTO product_slots VALUES(11,163); +INSERT INTO product_slots VALUES(11,164); +INSERT INTO product_slots VALUES(11,165); +INSERT INTO product_slots VALUES(11,166); +INSERT INTO product_slots VALUES(11,167); +INSERT INTO product_slots VALUES(11,168); +INSERT INTO product_slots VALUES(11,169); +INSERT INTO product_slots VALUES(11,170); +INSERT INTO product_slots VALUES(11,171); +INSERT INTO product_slots VALUES(11,172); +INSERT INTO product_slots VALUES(11,173); +INSERT INTO product_slots VALUES(11,174); +INSERT INTO product_slots VALUES(11,175); +INSERT INTO product_slots VALUES(11,176); +INSERT INTO product_slots VALUES(11,177); +INSERT INTO product_slots VALUES(11,178); +INSERT INTO product_slots VALUES(11,179); +INSERT INTO product_slots VALUES(11,180); +INSERT INTO product_slots VALUES(11,181); +INSERT INTO product_slots VALUES(11,182); +INSERT INTO product_slots VALUES(11,183); +INSERT INTO product_slots VALUES(11,184); +INSERT INTO product_slots VALUES(11,185); +INSERT INTO product_slots VALUES(11,186); +INSERT INTO product_slots VALUES(11,187); +INSERT INTO product_slots VALUES(11,188); +INSERT INTO product_slots VALUES(11,189); +INSERT INTO product_slots VALUES(11,190); +INSERT INTO product_slots VALUES(11,191); +INSERT INTO product_slots VALUES(11,192); +INSERT INTO product_slots VALUES(11,193); +INSERT INTO product_slots VALUES(11,194); +INSERT INTO product_slots VALUES(11,195); +INSERT INTO product_slots VALUES(11,196); +INSERT INTO product_slots VALUES(11,197); +INSERT INTO product_slots VALUES(11,198); +INSERT INTO product_slots VALUES(11,199); +INSERT INTO product_slots VALUES(11,200); +INSERT INTO product_slots VALUES(11,201); +INSERT INTO product_slots VALUES(11,202); +INSERT INTO product_slots VALUES(11,203); +INSERT INTO product_slots VALUES(11,204); +INSERT INTO product_slots VALUES(11,205); +INSERT INTO product_slots VALUES(11,206); +INSERT INTO product_slots VALUES(11,207); +INSERT INTO product_slots VALUES(11,208); +INSERT INTO product_slots VALUES(11,209); +INSERT INTO product_slots VALUES(11,210); +INSERT INTO product_slots VALUES(11,211); +INSERT INTO product_slots VALUES(11,212); +INSERT INTO product_slots VALUES(11,213); +INSERT INTO product_slots VALUES(11,214); +INSERT INTO product_slots VALUES(11,215); +INSERT INTO product_slots VALUES(11,216); +INSERT INTO product_slots VALUES(11,217); +INSERT INTO product_slots VALUES(11,218); +INSERT INTO product_slots VALUES(11,219); +INSERT INTO product_slots VALUES(11,220); +INSERT INTO product_slots VALUES(11,221); +INSERT INTO product_slots VALUES(11,222); +INSERT INTO product_slots VALUES(11,223); +INSERT INTO product_slots VALUES(11,224); +INSERT INTO product_slots VALUES(11,225); +INSERT INTO product_slots VALUES(11,226); +INSERT INTO product_slots VALUES(11,227); +INSERT INTO product_slots VALUES(11,228); +INSERT INTO product_slots VALUES(11,229); +INSERT INTO product_slots VALUES(11,230); +INSERT INTO product_slots VALUES(11,231); +INSERT INTO product_slots VALUES(11,232); +INSERT INTO product_slots VALUES(11,233); +INSERT INTO product_slots VALUES(11,234); +INSERT INTO product_slots VALUES(11,235); +INSERT INTO product_slots VALUES(11,236); +INSERT INTO product_slots VALUES(11,237); +INSERT INTO product_slots VALUES(11,238); +INSERT INTO product_slots VALUES(11,239); +INSERT INTO product_slots VALUES(11,240); +INSERT INTO product_slots VALUES(11,241); +INSERT INTO product_slots VALUES(11,242); +INSERT INTO product_slots VALUES(11,243); +INSERT INTO product_slots VALUES(11,244); +INSERT INTO product_slots VALUES(11,274); +INSERT INTO product_slots VALUES(11,275); +INSERT INTO product_slots VALUES(11,279); +INSERT INTO product_slots VALUES(11,280); +INSERT INTO product_slots VALUES(11,281); +INSERT INTO product_slots VALUES(11,282); +INSERT INTO product_slots VALUES(11,283); +INSERT INTO product_slots VALUES(11,284); +INSERT INTO product_slots VALUES(11,285); +INSERT INTO product_slots VALUES(11,286); +INSERT INTO product_slots VALUES(11,287); +INSERT INTO product_slots VALUES(12,5); +INSERT INTO product_slots VALUES(12,6); +INSERT INTO product_slots VALUES(12,7); +INSERT INTO product_slots VALUES(12,9); +INSERT INTO product_slots VALUES(12,16); +INSERT INTO product_slots VALUES(12,18); +INSERT INTO product_slots VALUES(12,20); +INSERT INTO product_slots VALUES(12,21); +INSERT INTO product_slots VALUES(12,22); +INSERT INTO product_slots VALUES(12,33); +INSERT INTO product_slots VALUES(12,35); +INSERT INTO product_slots VALUES(12,37); +INSERT INTO product_slots VALUES(12,38); +INSERT INTO product_slots VALUES(12,40); +INSERT INTO product_slots VALUES(13,5); +INSERT INTO product_slots VALUES(13,6); +INSERT INTO product_slots VALUES(13,7); +INSERT INTO product_slots VALUES(13,15); +INSERT INTO product_slots VALUES(13,16); +INSERT INTO product_slots VALUES(13,17); +INSERT INTO product_slots VALUES(13,18); +INSERT INTO product_slots VALUES(13,20); +INSERT INTO product_slots VALUES(13,21); +INSERT INTO product_slots VALUES(13,22); +INSERT INTO product_slots VALUES(13,33); +INSERT INTO product_slots VALUES(13,35); +INSERT INTO product_slots VALUES(13,37); +INSERT INTO product_slots VALUES(13,38); +INSERT INTO product_slots VALUES(13,39); +INSERT INTO product_slots VALUES(13,40); +INSERT INTO product_slots VALUES(13,43); +INSERT INTO product_slots VALUES(13,44); +INSERT INTO product_slots VALUES(13,45); +INSERT INTO product_slots VALUES(13,46); +INSERT INTO product_slots VALUES(13,47); +INSERT INTO product_slots VALUES(13,48); +INSERT INTO product_slots VALUES(13,49); +INSERT INTO product_slots VALUES(13,50); +INSERT INTO product_slots VALUES(13,51); +INSERT INTO product_slots VALUES(13,52); +INSERT INTO product_slots VALUES(13,53); +INSERT INTO product_slots VALUES(13,54); +INSERT INTO product_slots VALUES(13,55); +INSERT INTO product_slots VALUES(13,56); +INSERT INTO product_slots VALUES(13,57); +INSERT INTO product_slots VALUES(13,58); +INSERT INTO product_slots VALUES(13,59); +INSERT INTO product_slots VALUES(13,60); +INSERT INTO product_slots VALUES(13,61); +INSERT INTO product_slots VALUES(13,62); +INSERT INTO product_slots VALUES(13,63); +INSERT INTO product_slots VALUES(13,64); +INSERT INTO product_slots VALUES(13,65); +INSERT INTO product_slots VALUES(13,66); +INSERT INTO product_slots VALUES(13,67); +INSERT INTO product_slots VALUES(13,68); +INSERT INTO product_slots VALUES(13,69); +INSERT INTO product_slots VALUES(13,70); +INSERT INTO product_slots VALUES(13,71); +INSERT INTO product_slots VALUES(13,72); +INSERT INTO product_slots VALUES(13,73); +INSERT INTO product_slots VALUES(13,74); +INSERT INTO product_slots VALUES(13,75); +INSERT INTO product_slots VALUES(13,76); +INSERT INTO product_slots VALUES(13,77); +INSERT INTO product_slots VALUES(13,78); +INSERT INTO product_slots VALUES(13,79); +INSERT INTO product_slots VALUES(13,80); +INSERT INTO product_slots VALUES(13,81); +INSERT INTO product_slots VALUES(13,82); +INSERT INTO product_slots VALUES(13,83); +INSERT INTO product_slots VALUES(13,84); +INSERT INTO product_slots VALUES(13,85); +INSERT INTO product_slots VALUES(13,86); +INSERT INTO product_slots VALUES(13,87); +INSERT INTO product_slots VALUES(13,88); +INSERT INTO product_slots VALUES(13,89); +INSERT INTO product_slots VALUES(13,90); +INSERT INTO product_slots VALUES(13,91); +INSERT INTO product_slots VALUES(13,92); +INSERT INTO product_slots VALUES(13,93); +INSERT INTO product_slots VALUES(13,94); +INSERT INTO product_slots VALUES(13,95); +INSERT INTO product_slots VALUES(13,96); +INSERT INTO product_slots VALUES(13,97); +INSERT INTO product_slots VALUES(13,98); +INSERT INTO product_slots VALUES(13,99); +INSERT INTO product_slots VALUES(13,100); +INSERT INTO product_slots VALUES(13,102); +INSERT INTO product_slots VALUES(13,103); +INSERT INTO product_slots VALUES(13,104); +INSERT INTO product_slots VALUES(13,105); +INSERT INTO product_slots VALUES(13,106); +INSERT INTO product_slots VALUES(13,107); +INSERT INTO product_slots VALUES(13,108); +INSERT INTO product_slots VALUES(13,109); +INSERT INTO product_slots VALUES(13,110); +INSERT INTO product_slots VALUES(13,111); +INSERT INTO product_slots VALUES(13,112); +INSERT INTO product_slots VALUES(13,113); +INSERT INTO product_slots VALUES(13,114); +INSERT INTO product_slots VALUES(13,115); +INSERT INTO product_slots VALUES(13,117); +INSERT INTO product_slots VALUES(13,118); +INSERT INTO product_slots VALUES(13,119); +INSERT INTO product_slots VALUES(13,120); +INSERT INTO product_slots VALUES(13,121); +INSERT INTO product_slots VALUES(13,122); +INSERT INTO product_slots VALUES(13,123); +INSERT INTO product_slots VALUES(13,124); +INSERT INTO product_slots VALUES(13,125); +INSERT INTO product_slots VALUES(13,126); +INSERT INTO product_slots VALUES(13,127); +INSERT INTO product_slots VALUES(13,128); +INSERT INTO product_slots VALUES(13,129); +INSERT INTO product_slots VALUES(13,130); +INSERT INTO product_slots VALUES(13,131); +INSERT INTO product_slots VALUES(13,132); +INSERT INTO product_slots VALUES(13,133); +INSERT INTO product_slots VALUES(13,134); +INSERT INTO product_slots VALUES(13,135); +INSERT INTO product_slots VALUES(13,136); +INSERT INTO product_slots VALUES(13,138); +INSERT INTO product_slots VALUES(13,139); +INSERT INTO product_slots VALUES(13,140); +INSERT INTO product_slots VALUES(13,141); +INSERT INTO product_slots VALUES(13,142); +INSERT INTO product_slots VALUES(13,143); +INSERT INTO product_slots VALUES(13,145); +INSERT INTO product_slots VALUES(13,146); +INSERT INTO product_slots VALUES(13,147); +INSERT INTO product_slots VALUES(13,148); +INSERT INTO product_slots VALUES(13,149); +INSERT INTO product_slots VALUES(13,150); +INSERT INTO product_slots VALUES(13,151); +INSERT INTO product_slots VALUES(13,152); +INSERT INTO product_slots VALUES(13,153); +INSERT INTO product_slots VALUES(13,154); +INSERT INTO product_slots VALUES(13,155); +INSERT INTO product_slots VALUES(13,156); +INSERT INTO product_slots VALUES(13,157); +INSERT INTO product_slots VALUES(13,158); +INSERT INTO product_slots VALUES(13,159); +INSERT INTO product_slots VALUES(13,160); +INSERT INTO product_slots VALUES(13,161); +INSERT INTO product_slots VALUES(13,162); +INSERT INTO product_slots VALUES(13,163); +INSERT INTO product_slots VALUES(13,164); +INSERT INTO product_slots VALUES(13,165); +INSERT INTO product_slots VALUES(13,166); +INSERT INTO product_slots VALUES(13,167); +INSERT INTO product_slots VALUES(13,168); +INSERT INTO product_slots VALUES(13,169); +INSERT INTO product_slots VALUES(13,170); +INSERT INTO product_slots VALUES(13,171); +INSERT INTO product_slots VALUES(13,172); +INSERT INTO product_slots VALUES(13,173); +INSERT INTO product_slots VALUES(13,174); +INSERT INTO product_slots VALUES(13,175); +INSERT INTO product_slots VALUES(13,176); +INSERT INTO product_slots VALUES(13,177); +INSERT INTO product_slots VALUES(13,178); +INSERT INTO product_slots VALUES(13,179); +INSERT INTO product_slots VALUES(13,180); +INSERT INTO product_slots VALUES(13,181); +INSERT INTO product_slots VALUES(13,182); +INSERT INTO product_slots VALUES(13,183); +INSERT INTO product_slots VALUES(13,184); +INSERT INTO product_slots VALUES(13,185); +INSERT INTO product_slots VALUES(13,186); +INSERT INTO product_slots VALUES(13,187); +INSERT INTO product_slots VALUES(13,188); +INSERT INTO product_slots VALUES(13,189); +INSERT INTO product_slots VALUES(13,190); +INSERT INTO product_slots VALUES(13,191); +INSERT INTO product_slots VALUES(13,192); +INSERT INTO product_slots VALUES(13,193); +INSERT INTO product_slots VALUES(13,194); +INSERT INTO product_slots VALUES(13,195); +INSERT INTO product_slots VALUES(13,196); +INSERT INTO product_slots VALUES(13,197); +INSERT INTO product_slots VALUES(13,198); +INSERT INTO product_slots VALUES(13,199); +INSERT INTO product_slots VALUES(13,200); +INSERT INTO product_slots VALUES(13,201); +INSERT INTO product_slots VALUES(13,202); +INSERT INTO product_slots VALUES(13,203); +INSERT INTO product_slots VALUES(13,204); +INSERT INTO product_slots VALUES(13,205); +INSERT INTO product_slots VALUES(13,206); +INSERT INTO product_slots VALUES(13,207); +INSERT INTO product_slots VALUES(13,208); +INSERT INTO product_slots VALUES(13,209); +INSERT INTO product_slots VALUES(13,210); +INSERT INTO product_slots VALUES(13,211); +INSERT INTO product_slots VALUES(13,212); +INSERT INTO product_slots VALUES(13,213); +INSERT INTO product_slots VALUES(13,214); +INSERT INTO product_slots VALUES(13,215); +INSERT INTO product_slots VALUES(13,216); +INSERT INTO product_slots VALUES(13,217); +INSERT INTO product_slots VALUES(13,218); +INSERT INTO product_slots VALUES(13,219); +INSERT INTO product_slots VALUES(13,220); +INSERT INTO product_slots VALUES(13,221); +INSERT INTO product_slots VALUES(13,222); +INSERT INTO product_slots VALUES(13,223); +INSERT INTO product_slots VALUES(13,224); +INSERT INTO product_slots VALUES(13,225); +INSERT INTO product_slots VALUES(13,226); +INSERT INTO product_slots VALUES(13,227); +INSERT INTO product_slots VALUES(13,228); +INSERT INTO product_slots VALUES(13,229); +INSERT INTO product_slots VALUES(13,230); +INSERT INTO product_slots VALUES(13,231); +INSERT INTO product_slots VALUES(13,232); +INSERT INTO product_slots VALUES(13,233); +INSERT INTO product_slots VALUES(13,234); +INSERT INTO product_slots VALUES(13,235); +INSERT INTO product_slots VALUES(13,236); +INSERT INTO product_slots VALUES(13,237); +INSERT INTO product_slots VALUES(13,238); +INSERT INTO product_slots VALUES(13,239); +INSERT INTO product_slots VALUES(13,240); +INSERT INTO product_slots VALUES(13,241); +INSERT INTO product_slots VALUES(13,242); +INSERT INTO product_slots VALUES(13,243); +INSERT INTO product_slots VALUES(13,244); +INSERT INTO product_slots VALUES(13,274); +INSERT INTO product_slots VALUES(13,275); +INSERT INTO product_slots VALUES(13,279); +INSERT INTO product_slots VALUES(13,280); +INSERT INTO product_slots VALUES(13,281); +INSERT INTO product_slots VALUES(13,282); +INSERT INTO product_slots VALUES(13,283); +INSERT INTO product_slots VALUES(13,284); +INSERT INTO product_slots VALUES(13,285); +INSERT INTO product_slots VALUES(13,286); +INSERT INTO product_slots VALUES(13,287); +INSERT INTO product_slots VALUES(14,5); +INSERT INTO product_slots VALUES(14,6); +INSERT INTO product_slots VALUES(14,7); +INSERT INTO product_slots VALUES(14,12); +INSERT INTO product_slots VALUES(14,18); +INSERT INTO product_slots VALUES(14,20); +INSERT INTO product_slots VALUES(14,21); +INSERT INTO product_slots VALUES(14,22); +INSERT INTO product_slots VALUES(14,33); +INSERT INTO product_slots VALUES(14,35); +INSERT INTO product_slots VALUES(14,37); +INSERT INTO product_slots VALUES(14,38); +INSERT INTO product_slots VALUES(14,39); +INSERT INTO product_slots VALUES(14,40); +INSERT INTO product_slots VALUES(14,41); +INSERT INTO product_slots VALUES(14,43); +INSERT INTO product_slots VALUES(14,45); +INSERT INTO product_slots VALUES(14,46); +INSERT INTO product_slots VALUES(14,47); +INSERT INTO product_slots VALUES(14,48); +INSERT INTO product_slots VALUES(14,49); +INSERT INTO product_slots VALUES(14,50); +INSERT INTO product_slots VALUES(14,51); +INSERT INTO product_slots VALUES(14,52); +INSERT INTO product_slots VALUES(14,53); +INSERT INTO product_slots VALUES(14,54); +INSERT INTO product_slots VALUES(14,55); +INSERT INTO product_slots VALUES(14,56); +INSERT INTO product_slots VALUES(14,57); +INSERT INTO product_slots VALUES(14,58); +INSERT INTO product_slots VALUES(14,59); +INSERT INTO product_slots VALUES(14,60); +INSERT INTO product_slots VALUES(14,61); +INSERT INTO product_slots VALUES(14,62); +INSERT INTO product_slots VALUES(14,63); +INSERT INTO product_slots VALUES(14,64); +INSERT INTO product_slots VALUES(14,65); +INSERT INTO product_slots VALUES(14,66); +INSERT INTO product_slots VALUES(14,67); +INSERT INTO product_slots VALUES(14,68); +INSERT INTO product_slots VALUES(14,69); +INSERT INTO product_slots VALUES(14,70); +INSERT INTO product_slots VALUES(14,71); +INSERT INTO product_slots VALUES(14,74); +INSERT INTO product_slots VALUES(14,75); +INSERT INTO product_slots VALUES(14,76); +INSERT INTO product_slots VALUES(14,77); +INSERT INTO product_slots VALUES(14,78); +INSERT INTO product_slots VALUES(14,81); +INSERT INTO product_slots VALUES(14,82); +INSERT INTO product_slots VALUES(14,83); +INSERT INTO product_slots VALUES(14,84); +INSERT INTO product_slots VALUES(14,87); +INSERT INTO product_slots VALUES(14,88); +INSERT INTO product_slots VALUES(14,89); +INSERT INTO product_slots VALUES(14,90); +INSERT INTO product_slots VALUES(14,91); +INSERT INTO product_slots VALUES(14,95); +INSERT INTO product_slots VALUES(14,96); +INSERT INTO product_slots VALUES(14,97); +INSERT INTO product_slots VALUES(14,98); +INSERT INTO product_slots VALUES(14,101); +INSERT INTO product_slots VALUES(14,102); +INSERT INTO product_slots VALUES(14,103); +INSERT INTO product_slots VALUES(14,104); +INSERT INTO product_slots VALUES(14,109); +INSERT INTO product_slots VALUES(14,110); +INSERT INTO product_slots VALUES(14,111); +INSERT INTO product_slots VALUES(14,112); +INSERT INTO product_slots VALUES(14,116); +INSERT INTO product_slots VALUES(14,117); +INSERT INTO product_slots VALUES(14,118); +INSERT INTO product_slots VALUES(14,119); +INSERT INTO product_slots VALUES(14,120); +INSERT INTO product_slots VALUES(14,123); +INSERT INTO product_slots VALUES(14,124); +INSERT INTO product_slots VALUES(14,125); +INSERT INTO product_slots VALUES(14,126); +INSERT INTO product_slots VALUES(14,130); +INSERT INTO product_slots VALUES(14,131); +INSERT INTO product_slots VALUES(14,132); +INSERT INTO product_slots VALUES(14,133); +INSERT INTO product_slots VALUES(14,137); +INSERT INTO product_slots VALUES(14,138); +INSERT INTO product_slots VALUES(14,139); +INSERT INTO product_slots VALUES(14,140); +INSERT INTO product_slots VALUES(14,144); +INSERT INTO product_slots VALUES(14,145); +INSERT INTO product_slots VALUES(14,146); +INSERT INTO product_slots VALUES(14,147); +INSERT INTO product_slots VALUES(14,148); +INSERT INTO product_slots VALUES(14,149); +INSERT INTO product_slots VALUES(14,150); +INSERT INTO product_slots VALUES(14,151); +INSERT INTO product_slots VALUES(14,155); +INSERT INTO product_slots VALUES(14,156); +INSERT INTO product_slots VALUES(14,157); +INSERT INTO product_slots VALUES(14,158); +INSERT INTO product_slots VALUES(14,162); +INSERT INTO product_slots VALUES(14,163); +INSERT INTO product_slots VALUES(14,164); +INSERT INTO product_slots VALUES(14,165); +INSERT INTO product_slots VALUES(14,166); +INSERT INTO product_slots VALUES(14,169); +INSERT INTO product_slots VALUES(14,170); +INSERT INTO product_slots VALUES(14,171); +INSERT INTO product_slots VALUES(14,172); +INSERT INTO product_slots VALUES(14,176); +INSERT INTO product_slots VALUES(14,177); +INSERT INTO product_slots VALUES(14,178); +INSERT INTO product_slots VALUES(14,179); +INSERT INTO product_slots VALUES(14,183); +INSERT INTO product_slots VALUES(14,184); +INSERT INTO product_slots VALUES(14,185); +INSERT INTO product_slots VALUES(14,186); +INSERT INTO product_slots VALUES(14,187); +INSERT INTO product_slots VALUES(14,188); +INSERT INTO product_slots VALUES(14,189); +INSERT INTO product_slots VALUES(14,190); +INSERT INTO product_slots VALUES(14,191); +INSERT INTO product_slots VALUES(14,192); +INSERT INTO product_slots VALUES(14,193); +INSERT INTO product_slots VALUES(14,194); +INSERT INTO product_slots VALUES(14,198); +INSERT INTO product_slots VALUES(14,199); +INSERT INTO product_slots VALUES(14,200); +INSERT INTO product_slots VALUES(14,201); +INSERT INTO product_slots VALUES(14,202); +INSERT INTO product_slots VALUES(14,203); +INSERT INTO product_slots VALUES(14,205); +INSERT INTO product_slots VALUES(14,208); +INSERT INTO product_slots VALUES(14,209); +INSERT INTO product_slots VALUES(14,210); +INSERT INTO product_slots VALUES(14,211); +INSERT INTO product_slots VALUES(14,216); +INSERT INTO product_slots VALUES(14,217); +INSERT INTO product_slots VALUES(14,218); +INSERT INTO product_slots VALUES(14,219); +INSERT INTO product_slots VALUES(14,220); +INSERT INTO product_slots VALUES(14,223); +INSERT INTO product_slots VALUES(14,224); +INSERT INTO product_slots VALUES(14,225); +INSERT INTO product_slots VALUES(14,226); +INSERT INTO product_slots VALUES(14,230); +INSERT INTO product_slots VALUES(14,231); +INSERT INTO product_slots VALUES(14,232); +INSERT INTO product_slots VALUES(14,234); +INSERT INTO product_slots VALUES(14,237); +INSERT INTO product_slots VALUES(14,238); +INSERT INTO product_slots VALUES(14,239); +INSERT INTO product_slots VALUES(14,240); +INSERT INTO product_slots VALUES(14,274); +INSERT INTO product_slots VALUES(14,275); +INSERT INTO product_slots VALUES(14,277); +INSERT INTO product_slots VALUES(14,278); +INSERT INTO product_slots VALUES(14,279); +INSERT INTO product_slots VALUES(15,5); +INSERT INTO product_slots VALUES(15,6); +INSERT INTO product_slots VALUES(15,7); +INSERT INTO product_slots VALUES(15,8); +INSERT INTO product_slots VALUES(15,9); +INSERT INTO product_slots VALUES(15,12); +INSERT INTO product_slots VALUES(15,18); +INSERT INTO product_slots VALUES(15,19); +INSERT INTO product_slots VALUES(15,20); +INSERT INTO product_slots VALUES(15,21); +INSERT INTO product_slots VALUES(15,22); +INSERT INTO product_slots VALUES(15,23); +INSERT INTO product_slots VALUES(15,31); +INSERT INTO product_slots VALUES(15,33); +INSERT INTO product_slots VALUES(15,35); +INSERT INTO product_slots VALUES(15,37); +INSERT INTO product_slots VALUES(15,38); +INSERT INTO product_slots VALUES(15,39); +INSERT INTO product_slots VALUES(15,40); +INSERT INTO product_slots VALUES(15,59); +INSERT INTO product_slots VALUES(15,62); +INSERT INTO product_slots VALUES(15,63); +INSERT INTO product_slots VALUES(15,64); +INSERT INTO product_slots VALUES(15,65); +INSERT INTO product_slots VALUES(15,66); +INSERT INTO product_slots VALUES(15,67); +INSERT INTO product_slots VALUES(15,72); +INSERT INTO product_slots VALUES(15,73); +INSERT INTO product_slots VALUES(15,279); +INSERT INTO product_slots VALUES(16,16); +INSERT INTO product_slots VALUES(16,18); +INSERT INTO product_slots VALUES(16,20); +INSERT INTO product_slots VALUES(16,39); +INSERT INTO product_slots VALUES(16,44); +INSERT INTO product_slots VALUES(16,46); +INSERT INTO product_slots VALUES(16,47); +INSERT INTO product_slots VALUES(16,48); +INSERT INTO product_slots VALUES(16,49); +INSERT INTO product_slots VALUES(16,50); +INSERT INTO product_slots VALUES(16,51); +INSERT INTO product_slots VALUES(16,52); +INSERT INTO product_slots VALUES(16,53); +INSERT INTO product_slots VALUES(16,54); +INSERT INTO product_slots VALUES(16,55); +INSERT INTO product_slots VALUES(16,56); +INSERT INTO product_slots VALUES(16,57); +INSERT INTO product_slots VALUES(16,58); +INSERT INTO product_slots VALUES(16,59); +INSERT INTO product_slots VALUES(16,60); +INSERT INTO product_slots VALUES(16,61); +INSERT INTO product_slots VALUES(16,62); +INSERT INTO product_slots VALUES(16,63); +INSERT INTO product_slots VALUES(16,64); +INSERT INTO product_slots VALUES(16,65); +INSERT INTO product_slots VALUES(16,66); +INSERT INTO product_slots VALUES(16,67); +INSERT INTO product_slots VALUES(16,68); +INSERT INTO product_slots VALUES(16,69); +INSERT INTO product_slots VALUES(16,70); +INSERT INTO product_slots VALUES(16,71); +INSERT INTO product_slots VALUES(16,72); +INSERT INTO product_slots VALUES(16,73); +INSERT INTO product_slots VALUES(16,74); +INSERT INTO product_slots VALUES(16,75); +INSERT INTO product_slots VALUES(16,76); +INSERT INTO product_slots VALUES(16,77); +INSERT INTO product_slots VALUES(16,78); +INSERT INTO product_slots VALUES(16,79); +INSERT INTO product_slots VALUES(16,80); +INSERT INTO product_slots VALUES(16,81); +INSERT INTO product_slots VALUES(16,82); +INSERT INTO product_slots VALUES(16,83); +INSERT INTO product_slots VALUES(16,84); +INSERT INTO product_slots VALUES(16,85); +INSERT INTO product_slots VALUES(16,86); +INSERT INTO product_slots VALUES(16,87); +INSERT INTO product_slots VALUES(16,88); +INSERT INTO product_slots VALUES(16,89); +INSERT INTO product_slots VALUES(16,90); +INSERT INTO product_slots VALUES(16,91); +INSERT INTO product_slots VALUES(16,92); +INSERT INTO product_slots VALUES(16,93); +INSERT INTO product_slots VALUES(16,94); +INSERT INTO product_slots VALUES(16,95); +INSERT INTO product_slots VALUES(16,96); +INSERT INTO product_slots VALUES(16,97); +INSERT INTO product_slots VALUES(16,98); +INSERT INTO product_slots VALUES(16,99); +INSERT INTO product_slots VALUES(16,100); +INSERT INTO product_slots VALUES(16,101); +INSERT INTO product_slots VALUES(16,102); +INSERT INTO product_slots VALUES(16,103); +INSERT INTO product_slots VALUES(16,104); +INSERT INTO product_slots VALUES(16,105); +INSERT INTO product_slots VALUES(16,106); +INSERT INTO product_slots VALUES(16,107); +INSERT INTO product_slots VALUES(16,108); +INSERT INTO product_slots VALUES(16,109); +INSERT INTO product_slots VALUES(16,110); +INSERT INTO product_slots VALUES(16,111); +INSERT INTO product_slots VALUES(16,112); +INSERT INTO product_slots VALUES(16,113); +INSERT INTO product_slots VALUES(16,114); +INSERT INTO product_slots VALUES(16,115); +INSERT INTO product_slots VALUES(16,116); +INSERT INTO product_slots VALUES(16,117); +INSERT INTO product_slots VALUES(16,118); +INSERT INTO product_slots VALUES(16,119); +INSERT INTO product_slots VALUES(16,120); +INSERT INTO product_slots VALUES(16,121); +INSERT INTO product_slots VALUES(16,122); +INSERT INTO product_slots VALUES(16,123); +INSERT INTO product_slots VALUES(16,124); +INSERT INTO product_slots VALUES(16,125); +INSERT INTO product_slots VALUES(16,126); +INSERT INTO product_slots VALUES(16,127); +INSERT INTO product_slots VALUES(16,128); +INSERT INTO product_slots VALUES(16,129); +INSERT INTO product_slots VALUES(16,130); +INSERT INTO product_slots VALUES(16,131); +INSERT INTO product_slots VALUES(16,132); +INSERT INTO product_slots VALUES(16,133); +INSERT INTO product_slots VALUES(16,134); +INSERT INTO product_slots VALUES(16,135); +INSERT INTO product_slots VALUES(16,136); +INSERT INTO product_slots VALUES(16,137); +INSERT INTO product_slots VALUES(16,138); +INSERT INTO product_slots VALUES(16,139); +INSERT INTO product_slots VALUES(16,140); +INSERT INTO product_slots VALUES(16,141); +INSERT INTO product_slots VALUES(16,142); +INSERT INTO product_slots VALUES(16,143); +INSERT INTO product_slots VALUES(16,144); +INSERT INTO product_slots VALUES(16,145); +INSERT INTO product_slots VALUES(16,146); +INSERT INTO product_slots VALUES(16,147); +INSERT INTO product_slots VALUES(16,148); +INSERT INTO product_slots VALUES(16,149); +INSERT INTO product_slots VALUES(16,150); +INSERT INTO product_slots VALUES(16,151); +INSERT INTO product_slots VALUES(16,152); +INSERT INTO product_slots VALUES(16,153); +INSERT INTO product_slots VALUES(16,154); +INSERT INTO product_slots VALUES(16,155); +INSERT INTO product_slots VALUES(16,156); +INSERT INTO product_slots VALUES(16,157); +INSERT INTO product_slots VALUES(16,158); +INSERT INTO product_slots VALUES(16,159); +INSERT INTO product_slots VALUES(16,160); +INSERT INTO product_slots VALUES(16,161); +INSERT INTO product_slots VALUES(16,162); +INSERT INTO product_slots VALUES(16,163); +INSERT INTO product_slots VALUES(16,164); +INSERT INTO product_slots VALUES(16,165); +INSERT INTO product_slots VALUES(16,166); +INSERT INTO product_slots VALUES(16,167); +INSERT INTO product_slots VALUES(16,168); +INSERT INTO product_slots VALUES(16,169); +INSERT INTO product_slots VALUES(16,170); +INSERT INTO product_slots VALUES(16,171); +INSERT INTO product_slots VALUES(16,172); +INSERT INTO product_slots VALUES(16,173); +INSERT INTO product_slots VALUES(16,174); +INSERT INTO product_slots VALUES(16,175); +INSERT INTO product_slots VALUES(16,176); +INSERT INTO product_slots VALUES(16,177); +INSERT INTO product_slots VALUES(16,178); +INSERT INTO product_slots VALUES(16,179); +INSERT INTO product_slots VALUES(16,180); +INSERT INTO product_slots VALUES(16,181); +INSERT INTO product_slots VALUES(16,182); +INSERT INTO product_slots VALUES(16,183); +INSERT INTO product_slots VALUES(16,184); +INSERT INTO product_slots VALUES(16,185); +INSERT INTO product_slots VALUES(16,186); +INSERT INTO product_slots VALUES(16,187); +INSERT INTO product_slots VALUES(16,188); +INSERT INTO product_slots VALUES(16,189); +INSERT INTO product_slots VALUES(16,190); +INSERT INTO product_slots VALUES(16,191); +INSERT INTO product_slots VALUES(16,192); +INSERT INTO product_slots VALUES(16,193); +INSERT INTO product_slots VALUES(16,194); +INSERT INTO product_slots VALUES(16,195); +INSERT INTO product_slots VALUES(16,196); +INSERT INTO product_slots VALUES(16,197); +INSERT INTO product_slots VALUES(16,198); +INSERT INTO product_slots VALUES(16,199); +INSERT INTO product_slots VALUES(16,200); +INSERT INTO product_slots VALUES(16,201); +INSERT INTO product_slots VALUES(16,202); +INSERT INTO product_slots VALUES(16,203); +INSERT INTO product_slots VALUES(16,204); +INSERT INTO product_slots VALUES(16,205); +INSERT INTO product_slots VALUES(16,206); +INSERT INTO product_slots VALUES(16,207); +INSERT INTO product_slots VALUES(16,208); +INSERT INTO product_slots VALUES(16,209); +INSERT INTO product_slots VALUES(16,210); +INSERT INTO product_slots VALUES(16,211); +INSERT INTO product_slots VALUES(16,212); +INSERT INTO product_slots VALUES(16,213); +INSERT INTO product_slots VALUES(16,214); +INSERT INTO product_slots VALUES(16,215); +INSERT INTO product_slots VALUES(16,216); +INSERT INTO product_slots VALUES(16,217); +INSERT INTO product_slots VALUES(16,218); +INSERT INTO product_slots VALUES(16,219); +INSERT INTO product_slots VALUES(16,220); +INSERT INTO product_slots VALUES(16,221); +INSERT INTO product_slots VALUES(16,222); +INSERT INTO product_slots VALUES(16,223); +INSERT INTO product_slots VALUES(16,224); +INSERT INTO product_slots VALUES(16,225); +INSERT INTO product_slots VALUES(16,226); +INSERT INTO product_slots VALUES(16,227); +INSERT INTO product_slots VALUES(16,228); +INSERT INTO product_slots VALUES(16,229); +INSERT INTO product_slots VALUES(16,230); +INSERT INTO product_slots VALUES(16,231); +INSERT INTO product_slots VALUES(16,232); +INSERT INTO product_slots VALUES(16,233); +INSERT INTO product_slots VALUES(16,234); +INSERT INTO product_slots VALUES(16,235); +INSERT INTO product_slots VALUES(16,236); +INSERT INTO product_slots VALUES(16,237); +INSERT INTO product_slots VALUES(16,238); +INSERT INTO product_slots VALUES(16,239); +INSERT INTO product_slots VALUES(16,240); +INSERT INTO product_slots VALUES(16,241); +INSERT INTO product_slots VALUES(16,242); +INSERT INTO product_slots VALUES(16,243); +INSERT INTO product_slots VALUES(16,244); +INSERT INTO product_slots VALUES(16,274); +INSERT INTO product_slots VALUES(16,275); +INSERT INTO product_slots VALUES(16,279); +INSERT INTO product_slots VALUES(16,280); +INSERT INTO product_slots VALUES(16,281); +INSERT INTO product_slots VALUES(16,282); +INSERT INTO product_slots VALUES(16,283); +INSERT INTO product_slots VALUES(16,284); +INSERT INTO product_slots VALUES(16,285); +INSERT INTO product_slots VALUES(16,286); +INSERT INTO product_slots VALUES(16,287); +INSERT INTO product_slots VALUES(17,12); +INSERT INTO product_slots VALUES(17,18); +INSERT INTO product_slots VALUES(17,20); +INSERT INTO product_slots VALUES(17,21); +INSERT INTO product_slots VALUES(17,33); +INSERT INTO product_slots VALUES(17,35); +INSERT INTO product_slots VALUES(17,37); +INSERT INTO product_slots VALUES(17,38); +INSERT INTO product_slots VALUES(17,39); +INSERT INTO product_slots VALUES(17,40); +INSERT INTO product_slots VALUES(17,41); +INSERT INTO product_slots VALUES(17,43); +INSERT INTO product_slots VALUES(17,44); +INSERT INTO product_slots VALUES(17,45); +INSERT INTO product_slots VALUES(17,46); +INSERT INTO product_slots VALUES(17,47); +INSERT INTO product_slots VALUES(17,48); +INSERT INTO product_slots VALUES(17,49); +INSERT INTO product_slots VALUES(17,50); +INSERT INTO product_slots VALUES(17,51); +INSERT INTO product_slots VALUES(17,52); +INSERT INTO product_slots VALUES(17,53); +INSERT INTO product_slots VALUES(17,54); +INSERT INTO product_slots VALUES(17,55); +INSERT INTO product_slots VALUES(17,56); +INSERT INTO product_slots VALUES(17,57); +INSERT INTO product_slots VALUES(17,58); +INSERT INTO product_slots VALUES(17,59); +INSERT INTO product_slots VALUES(17,60); +INSERT INTO product_slots VALUES(17,61); +INSERT INTO product_slots VALUES(17,62); +INSERT INTO product_slots VALUES(17,63); +INSERT INTO product_slots VALUES(17,64); +INSERT INTO product_slots VALUES(17,65); +INSERT INTO product_slots VALUES(17,66); +INSERT INTO product_slots VALUES(17,67); +INSERT INTO product_slots VALUES(17,68); +INSERT INTO product_slots VALUES(17,69); +INSERT INTO product_slots VALUES(17,70); +INSERT INTO product_slots VALUES(17,71); +INSERT INTO product_slots VALUES(17,72); +INSERT INTO product_slots VALUES(17,73); +INSERT INTO product_slots VALUES(17,74); +INSERT INTO product_slots VALUES(17,75); +INSERT INTO product_slots VALUES(17,76); +INSERT INTO product_slots VALUES(17,77); +INSERT INTO product_slots VALUES(17,78); +INSERT INTO product_slots VALUES(17,79); +INSERT INTO product_slots VALUES(17,80); +INSERT INTO product_slots VALUES(17,81); +INSERT INTO product_slots VALUES(17,82); +INSERT INTO product_slots VALUES(17,83); +INSERT INTO product_slots VALUES(17,84); +INSERT INTO product_slots VALUES(17,85); +INSERT INTO product_slots VALUES(17,86); +INSERT INTO product_slots VALUES(17,87); +INSERT INTO product_slots VALUES(17,88); +INSERT INTO product_slots VALUES(17,89); +INSERT INTO product_slots VALUES(17,90); +INSERT INTO product_slots VALUES(17,91); +INSERT INTO product_slots VALUES(17,92); +INSERT INTO product_slots VALUES(17,93); +INSERT INTO product_slots VALUES(17,94); +INSERT INTO product_slots VALUES(17,95); +INSERT INTO product_slots VALUES(17,96); +INSERT INTO product_slots VALUES(17,97); +INSERT INTO product_slots VALUES(17,98); +INSERT INTO product_slots VALUES(17,99); +INSERT INTO product_slots VALUES(17,100); +INSERT INTO product_slots VALUES(17,101); +INSERT INTO product_slots VALUES(17,102); +INSERT INTO product_slots VALUES(17,103); +INSERT INTO product_slots VALUES(17,104); +INSERT INTO product_slots VALUES(17,105); +INSERT INTO product_slots VALUES(17,106); +INSERT INTO product_slots VALUES(17,107); +INSERT INTO product_slots VALUES(17,108); +INSERT INTO product_slots VALUES(17,109); +INSERT INTO product_slots VALUES(17,110); +INSERT INTO product_slots VALUES(17,111); +INSERT INTO product_slots VALUES(17,112); +INSERT INTO product_slots VALUES(17,113); +INSERT INTO product_slots VALUES(17,114); +INSERT INTO product_slots VALUES(17,115); +INSERT INTO product_slots VALUES(17,116); +INSERT INTO product_slots VALUES(17,117); +INSERT INTO product_slots VALUES(17,118); +INSERT INTO product_slots VALUES(17,119); +INSERT INTO product_slots VALUES(17,120); +INSERT INTO product_slots VALUES(17,121); +INSERT INTO product_slots VALUES(17,122); +INSERT INTO product_slots VALUES(17,123); +INSERT INTO product_slots VALUES(17,124); +INSERT INTO product_slots VALUES(17,125); +INSERT INTO product_slots VALUES(17,126); +INSERT INTO product_slots VALUES(17,127); +INSERT INTO product_slots VALUES(17,128); +INSERT INTO product_slots VALUES(17,129); +INSERT INTO product_slots VALUES(17,130); +INSERT INTO product_slots VALUES(17,131); +INSERT INTO product_slots VALUES(17,132); +INSERT INTO product_slots VALUES(17,133); +INSERT INTO product_slots VALUES(17,134); +INSERT INTO product_slots VALUES(17,135); +INSERT INTO product_slots VALUES(17,136); +INSERT INTO product_slots VALUES(17,137); +INSERT INTO product_slots VALUES(17,138); +INSERT INTO product_slots VALUES(17,139); +INSERT INTO product_slots VALUES(17,140); +INSERT INTO product_slots VALUES(17,141); +INSERT INTO product_slots VALUES(17,142); +INSERT INTO product_slots VALUES(17,143); +INSERT INTO product_slots VALUES(17,144); +INSERT INTO product_slots VALUES(17,145); +INSERT INTO product_slots VALUES(17,146); +INSERT INTO product_slots VALUES(17,147); +INSERT INTO product_slots VALUES(17,148); +INSERT INTO product_slots VALUES(17,149); +INSERT INTO product_slots VALUES(17,150); +INSERT INTO product_slots VALUES(17,151); +INSERT INTO product_slots VALUES(17,152); +INSERT INTO product_slots VALUES(17,153); +INSERT INTO product_slots VALUES(17,154); +INSERT INTO product_slots VALUES(17,155); +INSERT INTO product_slots VALUES(17,156); +INSERT INTO product_slots VALUES(17,157); +INSERT INTO product_slots VALUES(17,158); +INSERT INTO product_slots VALUES(17,159); +INSERT INTO product_slots VALUES(17,160); +INSERT INTO product_slots VALUES(17,161); +INSERT INTO product_slots VALUES(17,162); +INSERT INTO product_slots VALUES(17,163); +INSERT INTO product_slots VALUES(17,164); +INSERT INTO product_slots VALUES(17,165); +INSERT INTO product_slots VALUES(17,166); +INSERT INTO product_slots VALUES(17,167); +INSERT INTO product_slots VALUES(17,168); +INSERT INTO product_slots VALUES(17,169); +INSERT INTO product_slots VALUES(17,170); +INSERT INTO product_slots VALUES(17,171); +INSERT INTO product_slots VALUES(17,172); +INSERT INTO product_slots VALUES(17,173); +INSERT INTO product_slots VALUES(17,174); +INSERT INTO product_slots VALUES(17,175); +INSERT INTO product_slots VALUES(17,176); +INSERT INTO product_slots VALUES(17,177); +INSERT INTO product_slots VALUES(17,178); +INSERT INTO product_slots VALUES(17,179); +INSERT INTO product_slots VALUES(17,180); +INSERT INTO product_slots VALUES(17,181); +INSERT INTO product_slots VALUES(17,182); +INSERT INTO product_slots VALUES(17,183); +INSERT INTO product_slots VALUES(17,184); +INSERT INTO product_slots VALUES(17,185); +INSERT INTO product_slots VALUES(17,186); +INSERT INTO product_slots VALUES(17,187); +INSERT INTO product_slots VALUES(17,188); +INSERT INTO product_slots VALUES(17,189); +INSERT INTO product_slots VALUES(17,190); +INSERT INTO product_slots VALUES(17,191); +INSERT INTO product_slots VALUES(17,192); +INSERT INTO product_slots VALUES(17,193); +INSERT INTO product_slots VALUES(17,194); +INSERT INTO product_slots VALUES(17,195); +INSERT INTO product_slots VALUES(17,196); +INSERT INTO product_slots VALUES(17,197); +INSERT INTO product_slots VALUES(17,198); +INSERT INTO product_slots VALUES(17,199); +INSERT INTO product_slots VALUES(17,200); +INSERT INTO product_slots VALUES(17,201); +INSERT INTO product_slots VALUES(17,202); +INSERT INTO product_slots VALUES(17,203); +INSERT INTO product_slots VALUES(17,204); +INSERT INTO product_slots VALUES(17,205); +INSERT INTO product_slots VALUES(17,206); +INSERT INTO product_slots VALUES(17,207); +INSERT INTO product_slots VALUES(17,208); +INSERT INTO product_slots VALUES(17,209); +INSERT INTO product_slots VALUES(17,210); +INSERT INTO product_slots VALUES(17,211); +INSERT INTO product_slots VALUES(17,212); +INSERT INTO product_slots VALUES(17,213); +INSERT INTO product_slots VALUES(17,214); +INSERT INTO product_slots VALUES(17,215); +INSERT INTO product_slots VALUES(17,216); +INSERT INTO product_slots VALUES(17,217); +INSERT INTO product_slots VALUES(17,218); +INSERT INTO product_slots VALUES(17,219); +INSERT INTO product_slots VALUES(17,220); +INSERT INTO product_slots VALUES(17,221); +INSERT INTO product_slots VALUES(17,222); +INSERT INTO product_slots VALUES(17,223); +INSERT INTO product_slots VALUES(17,224); +INSERT INTO product_slots VALUES(17,225); +INSERT INTO product_slots VALUES(17,226); +INSERT INTO product_slots VALUES(17,227); +INSERT INTO product_slots VALUES(17,228); +INSERT INTO product_slots VALUES(17,229); +INSERT INTO product_slots VALUES(17,230); +INSERT INTO product_slots VALUES(17,231); +INSERT INTO product_slots VALUES(17,232); +INSERT INTO product_slots VALUES(17,233); +INSERT INTO product_slots VALUES(17,234); +INSERT INTO product_slots VALUES(17,235); +INSERT INTO product_slots VALUES(17,236); +INSERT INTO product_slots VALUES(17,237); +INSERT INTO product_slots VALUES(17,238); +INSERT INTO product_slots VALUES(17,239); +INSERT INTO product_slots VALUES(17,240); +INSERT INTO product_slots VALUES(17,241); +INSERT INTO product_slots VALUES(17,242); +INSERT INTO product_slots VALUES(17,243); +INSERT INTO product_slots VALUES(17,244); +INSERT INTO product_slots VALUES(17,274); +INSERT INTO product_slots VALUES(17,275); +INSERT INTO product_slots VALUES(17,279); +INSERT INTO product_slots VALUES(17,280); +INSERT INTO product_slots VALUES(17,281); +INSERT INTO product_slots VALUES(17,282); +INSERT INTO product_slots VALUES(17,283); +INSERT INTO product_slots VALUES(17,284); +INSERT INTO product_slots VALUES(17,285); +INSERT INTO product_slots VALUES(17,286); +INSERT INTO product_slots VALUES(17,287); +INSERT INTO product_slots VALUES(18,12); +INSERT INTO product_slots VALUES(18,18); +INSERT INTO product_slots VALUES(18,20); +INSERT INTO product_slots VALUES(18,21); +INSERT INTO product_slots VALUES(18,33); +INSERT INTO product_slots VALUES(18,35); +INSERT INTO product_slots VALUES(18,37); +INSERT INTO product_slots VALUES(18,38); +INSERT INTO product_slots VALUES(18,39); +INSERT INTO product_slots VALUES(18,40); +INSERT INTO product_slots VALUES(18,44); +INSERT INTO product_slots VALUES(18,46); +INSERT INTO product_slots VALUES(18,47); +INSERT INTO product_slots VALUES(18,48); +INSERT INTO product_slots VALUES(18,49); +INSERT INTO product_slots VALUES(18,50); +INSERT INTO product_slots VALUES(18,51); +INSERT INTO product_slots VALUES(18,52); +INSERT INTO product_slots VALUES(18,53); +INSERT INTO product_slots VALUES(18,54); +INSERT INTO product_slots VALUES(18,55); +INSERT INTO product_slots VALUES(18,56); +INSERT INTO product_slots VALUES(18,57); +INSERT INTO product_slots VALUES(18,58); +INSERT INTO product_slots VALUES(18,59); +INSERT INTO product_slots VALUES(18,60); +INSERT INTO product_slots VALUES(18,61); +INSERT INTO product_slots VALUES(18,62); +INSERT INTO product_slots VALUES(18,63); +INSERT INTO product_slots VALUES(18,64); +INSERT INTO product_slots VALUES(18,65); +INSERT INTO product_slots VALUES(18,66); +INSERT INTO product_slots VALUES(18,67); +INSERT INTO product_slots VALUES(18,68); +INSERT INTO product_slots VALUES(18,69); +INSERT INTO product_slots VALUES(18,70); +INSERT INTO product_slots VALUES(18,71); +INSERT INTO product_slots VALUES(18,72); +INSERT INTO product_slots VALUES(18,73); +INSERT INTO product_slots VALUES(18,74); +INSERT INTO product_slots VALUES(18,75); +INSERT INTO product_slots VALUES(18,76); +INSERT INTO product_slots VALUES(18,77); +INSERT INTO product_slots VALUES(18,78); +INSERT INTO product_slots VALUES(18,79); +INSERT INTO product_slots VALUES(18,80); +INSERT INTO product_slots VALUES(18,81); +INSERT INTO product_slots VALUES(18,82); +INSERT INTO product_slots VALUES(18,83); +INSERT INTO product_slots VALUES(18,84); +INSERT INTO product_slots VALUES(18,85); +INSERT INTO product_slots VALUES(18,86); +INSERT INTO product_slots VALUES(18,87); +INSERT INTO product_slots VALUES(18,88); +INSERT INTO product_slots VALUES(18,89); +INSERT INTO product_slots VALUES(18,90); +INSERT INTO product_slots VALUES(18,91); +INSERT INTO product_slots VALUES(18,92); +INSERT INTO product_slots VALUES(18,93); +INSERT INTO product_slots VALUES(18,94); +INSERT INTO product_slots VALUES(18,95); +INSERT INTO product_slots VALUES(18,96); +INSERT INTO product_slots VALUES(18,97); +INSERT INTO product_slots VALUES(18,98); +INSERT INTO product_slots VALUES(18,99); +INSERT INTO product_slots VALUES(18,100); +INSERT INTO product_slots VALUES(18,101); +INSERT INTO product_slots VALUES(18,102); +INSERT INTO product_slots VALUES(18,103); +INSERT INTO product_slots VALUES(18,104); +INSERT INTO product_slots VALUES(18,105); +INSERT INTO product_slots VALUES(18,106); +INSERT INTO product_slots VALUES(18,107); +INSERT INTO product_slots VALUES(18,108); +INSERT INTO product_slots VALUES(18,109); +INSERT INTO product_slots VALUES(18,110); +INSERT INTO product_slots VALUES(18,111); +INSERT INTO product_slots VALUES(18,112); +INSERT INTO product_slots VALUES(18,113); +INSERT INTO product_slots VALUES(18,114); +INSERT INTO product_slots VALUES(18,115); +INSERT INTO product_slots VALUES(18,116); +INSERT INTO product_slots VALUES(18,117); +INSERT INTO product_slots VALUES(18,118); +INSERT INTO product_slots VALUES(18,119); +INSERT INTO product_slots VALUES(18,120); +INSERT INTO product_slots VALUES(18,121); +INSERT INTO product_slots VALUES(18,122); +INSERT INTO product_slots VALUES(18,123); +INSERT INTO product_slots VALUES(18,124); +INSERT INTO product_slots VALUES(18,125); +INSERT INTO product_slots VALUES(18,126); +INSERT INTO product_slots VALUES(18,127); +INSERT INTO product_slots VALUES(18,128); +INSERT INTO product_slots VALUES(18,129); +INSERT INTO product_slots VALUES(18,130); +INSERT INTO product_slots VALUES(18,131); +INSERT INTO product_slots VALUES(18,132); +INSERT INTO product_slots VALUES(18,133); +INSERT INTO product_slots VALUES(18,134); +INSERT INTO product_slots VALUES(18,135); +INSERT INTO product_slots VALUES(18,136); +INSERT INTO product_slots VALUES(18,137); +INSERT INTO product_slots VALUES(18,138); +INSERT INTO product_slots VALUES(18,139); +INSERT INTO product_slots VALUES(18,140); +INSERT INTO product_slots VALUES(18,141); +INSERT INTO product_slots VALUES(18,142); +INSERT INTO product_slots VALUES(18,143); +INSERT INTO product_slots VALUES(18,144); +INSERT INTO product_slots VALUES(18,145); +INSERT INTO product_slots VALUES(18,146); +INSERT INTO product_slots VALUES(18,147); +INSERT INTO product_slots VALUES(18,148); +INSERT INTO product_slots VALUES(18,149); +INSERT INTO product_slots VALUES(18,150); +INSERT INTO product_slots VALUES(18,151); +INSERT INTO product_slots VALUES(18,152); +INSERT INTO product_slots VALUES(18,153); +INSERT INTO product_slots VALUES(18,154); +INSERT INTO product_slots VALUES(18,155); +INSERT INTO product_slots VALUES(18,156); +INSERT INTO product_slots VALUES(18,157); +INSERT INTO product_slots VALUES(18,158); +INSERT INTO product_slots VALUES(18,159); +INSERT INTO product_slots VALUES(18,160); +INSERT INTO product_slots VALUES(18,161); +INSERT INTO product_slots VALUES(18,162); +INSERT INTO product_slots VALUES(18,163); +INSERT INTO product_slots VALUES(18,164); +INSERT INTO product_slots VALUES(18,165); +INSERT INTO product_slots VALUES(18,166); +INSERT INTO product_slots VALUES(18,167); +INSERT INTO product_slots VALUES(18,168); +INSERT INTO product_slots VALUES(18,169); +INSERT INTO product_slots VALUES(18,170); +INSERT INTO product_slots VALUES(18,171); +INSERT INTO product_slots VALUES(18,172); +INSERT INTO product_slots VALUES(18,173); +INSERT INTO product_slots VALUES(18,174); +INSERT INTO product_slots VALUES(18,175); +INSERT INTO product_slots VALUES(18,176); +INSERT INTO product_slots VALUES(18,177); +INSERT INTO product_slots VALUES(18,178); +INSERT INTO product_slots VALUES(18,179); +INSERT INTO product_slots VALUES(18,180); +INSERT INTO product_slots VALUES(18,181); +INSERT INTO product_slots VALUES(18,182); +INSERT INTO product_slots VALUES(18,183); +INSERT INTO product_slots VALUES(18,184); +INSERT INTO product_slots VALUES(18,185); +INSERT INTO product_slots VALUES(18,186); +INSERT INTO product_slots VALUES(18,187); +INSERT INTO product_slots VALUES(18,188); +INSERT INTO product_slots VALUES(18,189); +INSERT INTO product_slots VALUES(18,190); +INSERT INTO product_slots VALUES(18,191); +INSERT INTO product_slots VALUES(18,192); +INSERT INTO product_slots VALUES(18,193); +INSERT INTO product_slots VALUES(18,194); +INSERT INTO product_slots VALUES(18,195); +INSERT INTO product_slots VALUES(18,196); +INSERT INTO product_slots VALUES(18,197); +INSERT INTO product_slots VALUES(18,198); +INSERT INTO product_slots VALUES(18,199); +INSERT INTO product_slots VALUES(18,200); +INSERT INTO product_slots VALUES(18,201); +INSERT INTO product_slots VALUES(18,202); +INSERT INTO product_slots VALUES(18,203); +INSERT INTO product_slots VALUES(18,204); +INSERT INTO product_slots VALUES(18,205); +INSERT INTO product_slots VALUES(18,206); +INSERT INTO product_slots VALUES(18,207); +INSERT INTO product_slots VALUES(18,208); +INSERT INTO product_slots VALUES(18,209); +INSERT INTO product_slots VALUES(18,210); +INSERT INTO product_slots VALUES(18,211); +INSERT INTO product_slots VALUES(18,212); +INSERT INTO product_slots VALUES(18,213); +INSERT INTO product_slots VALUES(18,214); +INSERT INTO product_slots VALUES(18,215); +INSERT INTO product_slots VALUES(18,216); +INSERT INTO product_slots VALUES(18,217); +INSERT INTO product_slots VALUES(18,218); +INSERT INTO product_slots VALUES(18,219); +INSERT INTO product_slots VALUES(18,220); +INSERT INTO product_slots VALUES(18,221); +INSERT INTO product_slots VALUES(18,222); +INSERT INTO product_slots VALUES(18,223); +INSERT INTO product_slots VALUES(18,224); +INSERT INTO product_slots VALUES(18,225); +INSERT INTO product_slots VALUES(18,226); +INSERT INTO product_slots VALUES(18,227); +INSERT INTO product_slots VALUES(18,228); +INSERT INTO product_slots VALUES(18,229); +INSERT INTO product_slots VALUES(18,230); +INSERT INTO product_slots VALUES(18,231); +INSERT INTO product_slots VALUES(18,232); +INSERT INTO product_slots VALUES(18,233); +INSERT INTO product_slots VALUES(18,234); +INSERT INTO product_slots VALUES(18,235); +INSERT INTO product_slots VALUES(18,236); +INSERT INTO product_slots VALUES(18,237); +INSERT INTO product_slots VALUES(18,238); +INSERT INTO product_slots VALUES(18,239); +INSERT INTO product_slots VALUES(18,240); +INSERT INTO product_slots VALUES(18,241); +INSERT INTO product_slots VALUES(18,242); +INSERT INTO product_slots VALUES(18,243); +INSERT INTO product_slots VALUES(18,244); +INSERT INTO product_slots VALUES(18,274); +INSERT INTO product_slots VALUES(18,275); +INSERT INTO product_slots VALUES(18,279); +INSERT INTO product_slots VALUES(18,280); +INSERT INTO product_slots VALUES(18,281); +INSERT INTO product_slots VALUES(18,282); +INSERT INTO product_slots VALUES(18,283); +INSERT INTO product_slots VALUES(18,284); +INSERT INTO product_slots VALUES(18,285); +INSERT INTO product_slots VALUES(18,286); +INSERT INTO product_slots VALUES(18,287); +INSERT INTO product_slots VALUES(19,10); +INSERT INTO product_slots VALUES(19,12); +INSERT INTO product_slots VALUES(19,18); +INSERT INTO product_slots VALUES(19,20); +INSERT INTO product_slots VALUES(19,21); +INSERT INTO product_slots VALUES(19,33); +INSERT INTO product_slots VALUES(19,35); +INSERT INTO product_slots VALUES(19,37); +INSERT INTO product_slots VALUES(19,38); +INSERT INTO product_slots VALUES(19,39); +INSERT INTO product_slots VALUES(19,40); +INSERT INTO product_slots VALUES(19,41); +INSERT INTO product_slots VALUES(19,43); +INSERT INTO product_slots VALUES(19,44); +INSERT INTO product_slots VALUES(19,45); +INSERT INTO product_slots VALUES(19,46); +INSERT INTO product_slots VALUES(19,47); +INSERT INTO product_slots VALUES(19,48); +INSERT INTO product_slots VALUES(19,49); +INSERT INTO product_slots VALUES(19,50); +INSERT INTO product_slots VALUES(19,51); +INSERT INTO product_slots VALUES(19,52); +INSERT INTO product_slots VALUES(19,53); +INSERT INTO product_slots VALUES(19,54); +INSERT INTO product_slots VALUES(19,55); +INSERT INTO product_slots VALUES(19,56); +INSERT INTO product_slots VALUES(19,57); +INSERT INTO product_slots VALUES(19,58); +INSERT INTO product_slots VALUES(19,59); +INSERT INTO product_slots VALUES(19,60); +INSERT INTO product_slots VALUES(19,61); +INSERT INTO product_slots VALUES(19,62); +INSERT INTO product_slots VALUES(19,63); +INSERT INTO product_slots VALUES(19,64); +INSERT INTO product_slots VALUES(19,65); +INSERT INTO product_slots VALUES(19,66); +INSERT INTO product_slots VALUES(19,67); +INSERT INTO product_slots VALUES(19,68); +INSERT INTO product_slots VALUES(19,69); +INSERT INTO product_slots VALUES(19,70); +INSERT INTO product_slots VALUES(19,71); +INSERT INTO product_slots VALUES(19,72); +INSERT INTO product_slots VALUES(19,73); +INSERT INTO product_slots VALUES(19,74); +INSERT INTO product_slots VALUES(19,75); +INSERT INTO product_slots VALUES(19,76); +INSERT INTO product_slots VALUES(19,77); +INSERT INTO product_slots VALUES(19,78); +INSERT INTO product_slots VALUES(19,79); +INSERT INTO product_slots VALUES(19,80); +INSERT INTO product_slots VALUES(19,81); +INSERT INTO product_slots VALUES(19,82); +INSERT INTO product_slots VALUES(19,83); +INSERT INTO product_slots VALUES(19,84); +INSERT INTO product_slots VALUES(19,85); +INSERT INTO product_slots VALUES(19,86); +INSERT INTO product_slots VALUES(19,87); +INSERT INTO product_slots VALUES(19,88); +INSERT INTO product_slots VALUES(19,89); +INSERT INTO product_slots VALUES(19,90); +INSERT INTO product_slots VALUES(19,91); +INSERT INTO product_slots VALUES(19,92); +INSERT INTO product_slots VALUES(19,93); +INSERT INTO product_slots VALUES(19,94); +INSERT INTO product_slots VALUES(19,95); +INSERT INTO product_slots VALUES(19,96); +INSERT INTO product_slots VALUES(19,97); +INSERT INTO product_slots VALUES(19,98); +INSERT INTO product_slots VALUES(19,99); +INSERT INTO product_slots VALUES(19,100); +INSERT INTO product_slots VALUES(19,101); +INSERT INTO product_slots VALUES(19,102); +INSERT INTO product_slots VALUES(19,103); +INSERT INTO product_slots VALUES(19,104); +INSERT INTO product_slots VALUES(19,105); +INSERT INTO product_slots VALUES(19,106); +INSERT INTO product_slots VALUES(19,107); +INSERT INTO product_slots VALUES(19,108); +INSERT INTO product_slots VALUES(19,109); +INSERT INTO product_slots VALUES(19,110); +INSERT INTO product_slots VALUES(19,111); +INSERT INTO product_slots VALUES(19,112); +INSERT INTO product_slots VALUES(19,113); +INSERT INTO product_slots VALUES(19,114); +INSERT INTO product_slots VALUES(19,115); +INSERT INTO product_slots VALUES(19,116); +INSERT INTO product_slots VALUES(19,117); +INSERT INTO product_slots VALUES(19,118); +INSERT INTO product_slots VALUES(19,119); +INSERT INTO product_slots VALUES(19,120); +INSERT INTO product_slots VALUES(19,121); +INSERT INTO product_slots VALUES(19,122); +INSERT INTO product_slots VALUES(19,123); +INSERT INTO product_slots VALUES(19,124); +INSERT INTO product_slots VALUES(19,125); +INSERT INTO product_slots VALUES(19,126); +INSERT INTO product_slots VALUES(19,127); +INSERT INTO product_slots VALUES(19,128); +INSERT INTO product_slots VALUES(19,129); +INSERT INTO product_slots VALUES(19,130); +INSERT INTO product_slots VALUES(19,131); +INSERT INTO product_slots VALUES(19,132); +INSERT INTO product_slots VALUES(19,133); +INSERT INTO product_slots VALUES(19,134); +INSERT INTO product_slots VALUES(19,135); +INSERT INTO product_slots VALUES(19,136); +INSERT INTO product_slots VALUES(19,137); +INSERT INTO product_slots VALUES(19,138); +INSERT INTO product_slots VALUES(19,139); +INSERT INTO product_slots VALUES(19,140); +INSERT INTO product_slots VALUES(19,141); +INSERT INTO product_slots VALUES(19,142); +INSERT INTO product_slots VALUES(19,143); +INSERT INTO product_slots VALUES(19,144); +INSERT INTO product_slots VALUES(19,145); +INSERT INTO product_slots VALUES(19,146); +INSERT INTO product_slots VALUES(19,147); +INSERT INTO product_slots VALUES(19,148); +INSERT INTO product_slots VALUES(19,149); +INSERT INTO product_slots VALUES(19,150); +INSERT INTO product_slots VALUES(19,151); +INSERT INTO product_slots VALUES(19,152); +INSERT INTO product_slots VALUES(19,153); +INSERT INTO product_slots VALUES(19,154); +INSERT INTO product_slots VALUES(19,155); +INSERT INTO product_slots VALUES(19,156); +INSERT INTO product_slots VALUES(19,157); +INSERT INTO product_slots VALUES(19,158); +INSERT INTO product_slots VALUES(19,159); +INSERT INTO product_slots VALUES(19,160); +INSERT INTO product_slots VALUES(19,161); +INSERT INTO product_slots VALUES(19,162); +INSERT INTO product_slots VALUES(19,163); +INSERT INTO product_slots VALUES(19,164); +INSERT INTO product_slots VALUES(19,165); +INSERT INTO product_slots VALUES(19,166); +INSERT INTO product_slots VALUES(19,167); +INSERT INTO product_slots VALUES(19,168); +INSERT INTO product_slots VALUES(19,169); +INSERT INTO product_slots VALUES(19,170); +INSERT INTO product_slots VALUES(19,171); +INSERT INTO product_slots VALUES(19,172); +INSERT INTO product_slots VALUES(19,173); +INSERT INTO product_slots VALUES(19,174); +INSERT INTO product_slots VALUES(19,175); +INSERT INTO product_slots VALUES(19,176); +INSERT INTO product_slots VALUES(19,177); +INSERT INTO product_slots VALUES(19,178); +INSERT INTO product_slots VALUES(19,179); +INSERT INTO product_slots VALUES(19,180); +INSERT INTO product_slots VALUES(19,181); +INSERT INTO product_slots VALUES(19,182); +INSERT INTO product_slots VALUES(19,183); +INSERT INTO product_slots VALUES(19,184); +INSERT INTO product_slots VALUES(19,185); +INSERT INTO product_slots VALUES(19,186); +INSERT INTO product_slots VALUES(19,187); +INSERT INTO product_slots VALUES(19,188); +INSERT INTO product_slots VALUES(19,189); +INSERT INTO product_slots VALUES(19,190); +INSERT INTO product_slots VALUES(19,191); +INSERT INTO product_slots VALUES(19,192); +INSERT INTO product_slots VALUES(19,193); +INSERT INTO product_slots VALUES(19,194); +INSERT INTO product_slots VALUES(19,195); +INSERT INTO product_slots VALUES(19,196); +INSERT INTO product_slots VALUES(19,197); +INSERT INTO product_slots VALUES(19,198); +INSERT INTO product_slots VALUES(19,199); +INSERT INTO product_slots VALUES(19,200); +INSERT INTO product_slots VALUES(19,201); +INSERT INTO product_slots VALUES(19,202); +INSERT INTO product_slots VALUES(19,203); +INSERT INTO product_slots VALUES(19,204); +INSERT INTO product_slots VALUES(19,205); +INSERT INTO product_slots VALUES(19,206); +INSERT INTO product_slots VALUES(19,207); +INSERT INTO product_slots VALUES(19,208); +INSERT INTO product_slots VALUES(19,209); +INSERT INTO product_slots VALUES(19,210); +INSERT INTO product_slots VALUES(19,211); +INSERT INTO product_slots VALUES(19,212); +INSERT INTO product_slots VALUES(19,213); +INSERT INTO product_slots VALUES(19,214); +INSERT INTO product_slots VALUES(19,215); +INSERT INTO product_slots VALUES(19,216); +INSERT INTO product_slots VALUES(19,217); +INSERT INTO product_slots VALUES(19,218); +INSERT INTO product_slots VALUES(19,219); +INSERT INTO product_slots VALUES(19,220); +INSERT INTO product_slots VALUES(19,221); +INSERT INTO product_slots VALUES(19,222); +INSERT INTO product_slots VALUES(19,223); +INSERT INTO product_slots VALUES(19,224); +INSERT INTO product_slots VALUES(19,225); +INSERT INTO product_slots VALUES(19,226); +INSERT INTO product_slots VALUES(19,227); +INSERT INTO product_slots VALUES(19,228); +INSERT INTO product_slots VALUES(19,229); +INSERT INTO product_slots VALUES(19,230); +INSERT INTO product_slots VALUES(19,231); +INSERT INTO product_slots VALUES(19,232); +INSERT INTO product_slots VALUES(19,233); +INSERT INTO product_slots VALUES(19,234); +INSERT INTO product_slots VALUES(19,235); +INSERT INTO product_slots VALUES(19,236); +INSERT INTO product_slots VALUES(19,237); +INSERT INTO product_slots VALUES(19,238); +INSERT INTO product_slots VALUES(19,239); +INSERT INTO product_slots VALUES(19,240); +INSERT INTO product_slots VALUES(19,241); +INSERT INTO product_slots VALUES(19,242); +INSERT INTO product_slots VALUES(19,243); +INSERT INTO product_slots VALUES(19,244); +INSERT INTO product_slots VALUES(19,274); +INSERT INTO product_slots VALUES(19,275); +INSERT INTO product_slots VALUES(19,279); +INSERT INTO product_slots VALUES(19,280); +INSERT INTO product_slots VALUES(19,281); +INSERT INTO product_slots VALUES(19,282); +INSERT INTO product_slots VALUES(19,283); +INSERT INTO product_slots VALUES(19,284); +INSERT INTO product_slots VALUES(19,285); +INSERT INTO product_slots VALUES(19,286); +INSERT INTO product_slots VALUES(19,287); +INSERT INTO product_slots VALUES(20,12); +INSERT INTO product_slots VALUES(20,18); +INSERT INTO product_slots VALUES(20,20); +INSERT INTO product_slots VALUES(20,21); +INSERT INTO product_slots VALUES(20,22); +INSERT INTO product_slots VALUES(20,33); +INSERT INTO product_slots VALUES(20,35); +INSERT INTO product_slots VALUES(20,37); +INSERT INTO product_slots VALUES(20,38); +INSERT INTO product_slots VALUES(20,40); +INSERT INTO product_slots VALUES(20,59); +INSERT INTO product_slots VALUES(20,81); +INSERT INTO product_slots VALUES(20,82); +INSERT INTO product_slots VALUES(20,83); +INSERT INTO product_slots VALUES(20,105); +INSERT INTO product_slots VALUES(20,106); +INSERT INTO product_slots VALUES(20,107); +INSERT INTO product_slots VALUES(20,108); +INSERT INTO product_slots VALUES(20,109); +INSERT INTO product_slots VALUES(20,110); +INSERT INTO product_slots VALUES(20,111); +INSERT INTO product_slots VALUES(20,112); +INSERT INTO product_slots VALUES(20,113); +INSERT INTO product_slots VALUES(20,114); +INSERT INTO product_slots VALUES(20,115); +INSERT INTO product_slots VALUES(20,120); +INSERT INTO product_slots VALUES(20,134); +INSERT INTO product_slots VALUES(20,135); +INSERT INTO product_slots VALUES(20,136); +INSERT INTO product_slots VALUES(20,187); +INSERT INTO product_slots VALUES(21,12); +INSERT INTO product_slots VALUES(21,18); +INSERT INTO product_slots VALUES(21,19); +INSERT INTO product_slots VALUES(21,20); +INSERT INTO product_slots VALUES(21,21); +INSERT INTO product_slots VALUES(21,22); +INSERT INTO product_slots VALUES(21,23); +INSERT INTO product_slots VALUES(21,31); +INSERT INTO product_slots VALUES(21,33); +INSERT INTO product_slots VALUES(21,35); +INSERT INTO product_slots VALUES(21,37); +INSERT INTO product_slots VALUES(21,38); +INSERT INTO product_slots VALUES(21,39); +INSERT INTO product_slots VALUES(21,40); +INSERT INTO product_slots VALUES(21,41); +INSERT INTO product_slots VALUES(21,43); +INSERT INTO product_slots VALUES(21,45); +INSERT INTO product_slots VALUES(21,46); +INSERT INTO product_slots VALUES(21,47); +INSERT INTO product_slots VALUES(21,48); +INSERT INTO product_slots VALUES(21,49); +INSERT INTO product_slots VALUES(21,50); +INSERT INTO product_slots VALUES(21,51); +INSERT INTO product_slots VALUES(21,52); +INSERT INTO product_slots VALUES(21,53); +INSERT INTO product_slots VALUES(21,54); +INSERT INTO product_slots VALUES(21,55); +INSERT INTO product_slots VALUES(21,56); +INSERT INTO product_slots VALUES(21,57); +INSERT INTO product_slots VALUES(21,58); +INSERT INTO product_slots VALUES(21,59); +INSERT INTO product_slots VALUES(21,60); +INSERT INTO product_slots VALUES(21,61); +INSERT INTO product_slots VALUES(21,62); +INSERT INTO product_slots VALUES(21,63); +INSERT INTO product_slots VALUES(21,64); +INSERT INTO product_slots VALUES(21,65); +INSERT INTO product_slots VALUES(21,66); +INSERT INTO product_slots VALUES(21,67); +INSERT INTO product_slots VALUES(21,68); +INSERT INTO product_slots VALUES(21,69); +INSERT INTO product_slots VALUES(21,70); +INSERT INTO product_slots VALUES(21,71); +INSERT INTO product_slots VALUES(21,72); +INSERT INTO product_slots VALUES(21,73); +INSERT INTO product_slots VALUES(21,74); +INSERT INTO product_slots VALUES(21,75); +INSERT INTO product_slots VALUES(21,76); +INSERT INTO product_slots VALUES(21,77); +INSERT INTO product_slots VALUES(21,78); +INSERT INTO product_slots VALUES(21,79); +INSERT INTO product_slots VALUES(21,80); +INSERT INTO product_slots VALUES(21,81); +INSERT INTO product_slots VALUES(21,82); +INSERT INTO product_slots VALUES(21,83); +INSERT INTO product_slots VALUES(21,84); +INSERT INTO product_slots VALUES(21,85); +INSERT INTO product_slots VALUES(21,86); +INSERT INTO product_slots VALUES(21,87); +INSERT INTO product_slots VALUES(21,88); +INSERT INTO product_slots VALUES(21,89); +INSERT INTO product_slots VALUES(21,90); +INSERT INTO product_slots VALUES(21,91); +INSERT INTO product_slots VALUES(21,92); +INSERT INTO product_slots VALUES(21,93); +INSERT INTO product_slots VALUES(21,94); +INSERT INTO product_slots VALUES(21,95); +INSERT INTO product_slots VALUES(21,96); +INSERT INTO product_slots VALUES(21,97); +INSERT INTO product_slots VALUES(21,98); +INSERT INTO product_slots VALUES(21,99); +INSERT INTO product_slots VALUES(21,100); +INSERT INTO product_slots VALUES(21,101); +INSERT INTO product_slots VALUES(21,102); +INSERT INTO product_slots VALUES(21,103); +INSERT INTO product_slots VALUES(21,104); +INSERT INTO product_slots VALUES(21,105); +INSERT INTO product_slots VALUES(21,106); +INSERT INTO product_slots VALUES(21,107); +INSERT INTO product_slots VALUES(21,108); +INSERT INTO product_slots VALUES(21,109); +INSERT INTO product_slots VALUES(21,110); +INSERT INTO product_slots VALUES(21,111); +INSERT INTO product_slots VALUES(21,112); +INSERT INTO product_slots VALUES(21,113); +INSERT INTO product_slots VALUES(21,114); +INSERT INTO product_slots VALUES(21,115); +INSERT INTO product_slots VALUES(21,116); +INSERT INTO product_slots VALUES(21,117); +INSERT INTO product_slots VALUES(21,118); +INSERT INTO product_slots VALUES(21,119); +INSERT INTO product_slots VALUES(21,120); +INSERT INTO product_slots VALUES(21,121); +INSERT INTO product_slots VALUES(21,122); +INSERT INTO product_slots VALUES(21,123); +INSERT INTO product_slots VALUES(21,124); +INSERT INTO product_slots VALUES(21,125); +INSERT INTO product_slots VALUES(21,126); +INSERT INTO product_slots VALUES(21,127); +INSERT INTO product_slots VALUES(21,128); +INSERT INTO product_slots VALUES(21,129); +INSERT INTO product_slots VALUES(21,130); +INSERT INTO product_slots VALUES(21,131); +INSERT INTO product_slots VALUES(21,132); +INSERT INTO product_slots VALUES(21,133); +INSERT INTO product_slots VALUES(21,134); +INSERT INTO product_slots VALUES(21,135); +INSERT INTO product_slots VALUES(21,136); +INSERT INTO product_slots VALUES(21,137); +INSERT INTO product_slots VALUES(21,138); +INSERT INTO product_slots VALUES(21,139); +INSERT INTO product_slots VALUES(21,140); +INSERT INTO product_slots VALUES(21,141); +INSERT INTO product_slots VALUES(21,142); +INSERT INTO product_slots VALUES(21,143); +INSERT INTO product_slots VALUES(21,144); +INSERT INTO product_slots VALUES(21,145); +INSERT INTO product_slots VALUES(21,146); +INSERT INTO product_slots VALUES(21,147); +INSERT INTO product_slots VALUES(21,148); +INSERT INTO product_slots VALUES(21,149); +INSERT INTO product_slots VALUES(21,150); +INSERT INTO product_slots VALUES(21,151); +INSERT INTO product_slots VALUES(21,152); +INSERT INTO product_slots VALUES(21,153); +INSERT INTO product_slots VALUES(21,154); +INSERT INTO product_slots VALUES(21,155); +INSERT INTO product_slots VALUES(21,156); +INSERT INTO product_slots VALUES(21,157); +INSERT INTO product_slots VALUES(21,158); +INSERT INTO product_slots VALUES(21,159); +INSERT INTO product_slots VALUES(21,160); +INSERT INTO product_slots VALUES(21,161); +INSERT INTO product_slots VALUES(21,162); +INSERT INTO product_slots VALUES(21,163); +INSERT INTO product_slots VALUES(21,164); +INSERT INTO product_slots VALUES(21,165); +INSERT INTO product_slots VALUES(21,166); +INSERT INTO product_slots VALUES(21,167); +INSERT INTO product_slots VALUES(21,168); +INSERT INTO product_slots VALUES(21,169); +INSERT INTO product_slots VALUES(21,170); +INSERT INTO product_slots VALUES(21,171); +INSERT INTO product_slots VALUES(21,172); +INSERT INTO product_slots VALUES(21,173); +INSERT INTO product_slots VALUES(21,174); +INSERT INTO product_slots VALUES(21,175); +INSERT INTO product_slots VALUES(21,176); +INSERT INTO product_slots VALUES(21,177); +INSERT INTO product_slots VALUES(21,178); +INSERT INTO product_slots VALUES(21,179); +INSERT INTO product_slots VALUES(21,180); +INSERT INTO product_slots VALUES(21,181); +INSERT INTO product_slots VALUES(21,182); +INSERT INTO product_slots VALUES(21,183); +INSERT INTO product_slots VALUES(21,184); +INSERT INTO product_slots VALUES(21,185); +INSERT INTO product_slots VALUES(21,186); +INSERT INTO product_slots VALUES(21,187); +INSERT INTO product_slots VALUES(21,188); +INSERT INTO product_slots VALUES(21,189); +INSERT INTO product_slots VALUES(21,190); +INSERT INTO product_slots VALUES(21,191); +INSERT INTO product_slots VALUES(21,192); +INSERT INTO product_slots VALUES(21,193); +INSERT INTO product_slots VALUES(21,194); +INSERT INTO product_slots VALUES(21,195); +INSERT INTO product_slots VALUES(21,196); +INSERT INTO product_slots VALUES(21,197); +INSERT INTO product_slots VALUES(21,198); +INSERT INTO product_slots VALUES(21,199); +INSERT INTO product_slots VALUES(21,200); +INSERT INTO product_slots VALUES(21,201); +INSERT INTO product_slots VALUES(21,202); +INSERT INTO product_slots VALUES(21,203); +INSERT INTO product_slots VALUES(21,204); +INSERT INTO product_slots VALUES(21,205); +INSERT INTO product_slots VALUES(21,206); +INSERT INTO product_slots VALUES(21,207); +INSERT INTO product_slots VALUES(21,208); +INSERT INTO product_slots VALUES(21,209); +INSERT INTO product_slots VALUES(21,210); +INSERT INTO product_slots VALUES(21,211); +INSERT INTO product_slots VALUES(21,212); +INSERT INTO product_slots VALUES(21,213); +INSERT INTO product_slots VALUES(21,214); +INSERT INTO product_slots VALUES(21,215); +INSERT INTO product_slots VALUES(21,216); +INSERT INTO product_slots VALUES(21,217); +INSERT INTO product_slots VALUES(21,218); +INSERT INTO product_slots VALUES(21,219); +INSERT INTO product_slots VALUES(21,220); +INSERT INTO product_slots VALUES(21,221); +INSERT INTO product_slots VALUES(21,222); +INSERT INTO product_slots VALUES(21,223); +INSERT INTO product_slots VALUES(21,224); +INSERT INTO product_slots VALUES(21,225); +INSERT INTO product_slots VALUES(21,226); +INSERT INTO product_slots VALUES(21,227); +INSERT INTO product_slots VALUES(21,228); +INSERT INTO product_slots VALUES(21,229); +INSERT INTO product_slots VALUES(21,230); +INSERT INTO product_slots VALUES(21,231); +INSERT INTO product_slots VALUES(21,232); +INSERT INTO product_slots VALUES(21,234); +INSERT INTO product_slots VALUES(21,235); +INSERT INTO product_slots VALUES(21,236); +INSERT INTO product_slots VALUES(21,237); +INSERT INTO product_slots VALUES(21,238); +INSERT INTO product_slots VALUES(21,239); +INSERT INTO product_slots VALUES(21,240); +INSERT INTO product_slots VALUES(21,241); +INSERT INTO product_slots VALUES(21,242); +INSERT INTO product_slots VALUES(21,243); +INSERT INTO product_slots VALUES(21,244); +INSERT INTO product_slots VALUES(21,274); +INSERT INTO product_slots VALUES(21,275); +INSERT INTO product_slots VALUES(21,279); +INSERT INTO product_slots VALUES(21,280); +INSERT INTO product_slots VALUES(21,281); +INSERT INTO product_slots VALUES(21,282); +INSERT INTO product_slots VALUES(22,12); +INSERT INTO product_slots VALUES(22,18); +INSERT INTO product_slots VALUES(22,20); +INSERT INTO product_slots VALUES(22,21); +INSERT INTO product_slots VALUES(22,22); +INSERT INTO product_slots VALUES(22,33); +INSERT INTO product_slots VALUES(22,35); +INSERT INTO product_slots VALUES(22,37); +INSERT INTO product_slots VALUES(22,38); +INSERT INTO product_slots VALUES(22,40); +INSERT INTO product_slots VALUES(22,203); +INSERT INTO product_slots VALUES(22,204); +INSERT INTO product_slots VALUES(22,205); +INSERT INTO product_slots VALUES(22,206); +INSERT INTO product_slots VALUES(22,207); +INSERT INTO product_slots VALUES(22,208); +INSERT INTO product_slots VALUES(22,209); +INSERT INTO product_slots VALUES(22,210); +INSERT INTO product_slots VALUES(22,211); +INSERT INTO product_slots VALUES(22,212); +INSERT INTO product_slots VALUES(22,213); +INSERT INTO product_slots VALUES(22,214); +INSERT INTO product_slots VALUES(22,215); +INSERT INTO product_slots VALUES(22,216); +INSERT INTO product_slots VALUES(22,217); +INSERT INTO product_slots VALUES(22,218); +INSERT INTO product_slots VALUES(22,219); +INSERT INTO product_slots VALUES(22,220); +INSERT INTO product_slots VALUES(22,221); +INSERT INTO product_slots VALUES(22,222); +INSERT INTO product_slots VALUES(22,223); +INSERT INTO product_slots VALUES(22,224); +INSERT INTO product_slots VALUES(22,225); +INSERT INTO product_slots VALUES(22,226); +INSERT INTO product_slots VALUES(22,227); +INSERT INTO product_slots VALUES(22,228); +INSERT INTO product_slots VALUES(22,229); +INSERT INTO product_slots VALUES(22,230); +INSERT INTO product_slots VALUES(22,231); +INSERT INTO product_slots VALUES(22,232); +INSERT INTO product_slots VALUES(22,233); +INSERT INTO product_slots VALUES(22,234); +INSERT INTO product_slots VALUES(22,235); +INSERT INTO product_slots VALUES(22,236); +INSERT INTO product_slots VALUES(22,237); +INSERT INTO product_slots VALUES(22,238); +INSERT INTO product_slots VALUES(22,239); +INSERT INTO product_slots VALUES(22,240); +INSERT INTO product_slots VALUES(22,241); +INSERT INTO product_slots VALUES(22,242); +INSERT INTO product_slots VALUES(22,243); +INSERT INTO product_slots VALUES(22,244); +INSERT INTO product_slots VALUES(22,274); +INSERT INTO product_slots VALUES(22,275); +INSERT INTO product_slots VALUES(22,279); +INSERT INTO product_slots VALUES(22,280); +INSERT INTO product_slots VALUES(22,281); +INSERT INTO product_slots VALUES(22,282); +INSERT INTO product_slots VALUES(22,283); +INSERT INTO product_slots VALUES(22,284); +INSERT INTO product_slots VALUES(22,285); +INSERT INTO product_slots VALUES(22,286); +INSERT INTO product_slots VALUES(22,287); +INSERT INTO product_slots VALUES(23,12); +INSERT INTO product_slots VALUES(23,18); +INSERT INTO product_slots VALUES(23,19); +INSERT INTO product_slots VALUES(23,20); +INSERT INTO product_slots VALUES(23,21); +INSERT INTO product_slots VALUES(23,22); +INSERT INTO product_slots VALUES(23,23); +INSERT INTO product_slots VALUES(23,31); +INSERT INTO product_slots VALUES(23,33); +INSERT INTO product_slots VALUES(23,35); +INSERT INTO product_slots VALUES(23,37); +INSERT INTO product_slots VALUES(23,38); +INSERT INTO product_slots VALUES(23,39); +INSERT INTO product_slots VALUES(23,40); +INSERT INTO product_slots VALUES(23,41); +INSERT INTO product_slots VALUES(23,43); +INSERT INTO product_slots VALUES(23,45); +INSERT INTO product_slots VALUES(23,46); +INSERT INTO product_slots VALUES(23,47); +INSERT INTO product_slots VALUES(23,48); +INSERT INTO product_slots VALUES(23,49); +INSERT INTO product_slots VALUES(23,50); +INSERT INTO product_slots VALUES(23,51); +INSERT INTO product_slots VALUES(23,52); +INSERT INTO product_slots VALUES(23,53); +INSERT INTO product_slots VALUES(23,54); +INSERT INTO product_slots VALUES(23,55); +INSERT INTO product_slots VALUES(23,56); +INSERT INTO product_slots VALUES(23,57); +INSERT INTO product_slots VALUES(23,58); +INSERT INTO product_slots VALUES(23,59); +INSERT INTO product_slots VALUES(23,60); +INSERT INTO product_slots VALUES(23,61); +INSERT INTO product_slots VALUES(23,62); +INSERT INTO product_slots VALUES(23,63); +INSERT INTO product_slots VALUES(23,64); +INSERT INTO product_slots VALUES(23,65); +INSERT INTO product_slots VALUES(23,66); +INSERT INTO product_slots VALUES(23,67); +INSERT INTO product_slots VALUES(23,68); +INSERT INTO product_slots VALUES(23,69); +INSERT INTO product_slots VALUES(23,70); +INSERT INTO product_slots VALUES(23,71); +INSERT INTO product_slots VALUES(23,72); +INSERT INTO product_slots VALUES(23,73); +INSERT INTO product_slots VALUES(23,74); +INSERT INTO product_slots VALUES(23,75); +INSERT INTO product_slots VALUES(23,76); +INSERT INTO product_slots VALUES(23,77); +INSERT INTO product_slots VALUES(23,78); +INSERT INTO product_slots VALUES(23,79); +INSERT INTO product_slots VALUES(23,80); +INSERT INTO product_slots VALUES(23,81); +INSERT INTO product_slots VALUES(23,82); +INSERT INTO product_slots VALUES(23,83); +INSERT INTO product_slots VALUES(23,84); +INSERT INTO product_slots VALUES(23,85); +INSERT INTO product_slots VALUES(23,86); +INSERT INTO product_slots VALUES(23,87); +INSERT INTO product_slots VALUES(23,88); +INSERT INTO product_slots VALUES(23,89); +INSERT INTO product_slots VALUES(23,90); +INSERT INTO product_slots VALUES(23,91); +INSERT INTO product_slots VALUES(23,92); +INSERT INTO product_slots VALUES(23,93); +INSERT INTO product_slots VALUES(23,94); +INSERT INTO product_slots VALUES(23,95); +INSERT INTO product_slots VALUES(23,96); +INSERT INTO product_slots VALUES(23,97); +INSERT INTO product_slots VALUES(23,98); +INSERT INTO product_slots VALUES(23,99); +INSERT INTO product_slots VALUES(23,100); +INSERT INTO product_slots VALUES(23,101); +INSERT INTO product_slots VALUES(23,102); +INSERT INTO product_slots VALUES(23,103); +INSERT INTO product_slots VALUES(23,104); +INSERT INTO product_slots VALUES(23,105); +INSERT INTO product_slots VALUES(23,106); +INSERT INTO product_slots VALUES(23,107); +INSERT INTO product_slots VALUES(23,108); +INSERT INTO product_slots VALUES(23,109); +INSERT INTO product_slots VALUES(23,110); +INSERT INTO product_slots VALUES(23,111); +INSERT INTO product_slots VALUES(23,112); +INSERT INTO product_slots VALUES(23,113); +INSERT INTO product_slots VALUES(23,114); +INSERT INTO product_slots VALUES(23,115); +INSERT INTO product_slots VALUES(23,116); +INSERT INTO product_slots VALUES(23,117); +INSERT INTO product_slots VALUES(23,118); +INSERT INTO product_slots VALUES(23,119); +INSERT INTO product_slots VALUES(23,120); +INSERT INTO product_slots VALUES(23,121); +INSERT INTO product_slots VALUES(23,122); +INSERT INTO product_slots VALUES(23,123); +INSERT INTO product_slots VALUES(23,124); +INSERT INTO product_slots VALUES(23,125); +INSERT INTO product_slots VALUES(23,126); +INSERT INTO product_slots VALUES(23,127); +INSERT INTO product_slots VALUES(23,128); +INSERT INTO product_slots VALUES(23,129); +INSERT INTO product_slots VALUES(23,130); +INSERT INTO product_slots VALUES(23,131); +INSERT INTO product_slots VALUES(23,132); +INSERT INTO product_slots VALUES(23,133); +INSERT INTO product_slots VALUES(23,134); +INSERT INTO product_slots VALUES(23,135); +INSERT INTO product_slots VALUES(23,136); +INSERT INTO product_slots VALUES(23,137); +INSERT INTO product_slots VALUES(23,138); +INSERT INTO product_slots VALUES(23,139); +INSERT INTO product_slots VALUES(23,140); +INSERT INTO product_slots VALUES(23,141); +INSERT INTO product_slots VALUES(23,142); +INSERT INTO product_slots VALUES(23,143); +INSERT INTO product_slots VALUES(23,144); +INSERT INTO product_slots VALUES(23,145); +INSERT INTO product_slots VALUES(23,146); +INSERT INTO product_slots VALUES(23,147); +INSERT INTO product_slots VALUES(23,148); +INSERT INTO product_slots VALUES(23,149); +INSERT INTO product_slots VALUES(23,150); +INSERT INTO product_slots VALUES(23,151); +INSERT INTO product_slots VALUES(23,152); +INSERT INTO product_slots VALUES(23,153); +INSERT INTO product_slots VALUES(23,154); +INSERT INTO product_slots VALUES(23,155); +INSERT INTO product_slots VALUES(23,156); +INSERT INTO product_slots VALUES(23,157); +INSERT INTO product_slots VALUES(23,158); +INSERT INTO product_slots VALUES(23,159); +INSERT INTO product_slots VALUES(23,160); +INSERT INTO product_slots VALUES(23,161); +INSERT INTO product_slots VALUES(23,162); +INSERT INTO product_slots VALUES(23,163); +INSERT INTO product_slots VALUES(23,164); +INSERT INTO product_slots VALUES(23,165); +INSERT INTO product_slots VALUES(23,166); +INSERT INTO product_slots VALUES(23,167); +INSERT INTO product_slots VALUES(23,168); +INSERT INTO product_slots VALUES(23,169); +INSERT INTO product_slots VALUES(23,170); +INSERT INTO product_slots VALUES(23,171); +INSERT INTO product_slots VALUES(23,172); +INSERT INTO product_slots VALUES(23,173); +INSERT INTO product_slots VALUES(23,174); +INSERT INTO product_slots VALUES(23,175); +INSERT INTO product_slots VALUES(23,176); +INSERT INTO product_slots VALUES(23,177); +INSERT INTO product_slots VALUES(23,178); +INSERT INTO product_slots VALUES(23,179); +INSERT INTO product_slots VALUES(23,180); +INSERT INTO product_slots VALUES(23,181); +INSERT INTO product_slots VALUES(23,182); +INSERT INTO product_slots VALUES(23,183); +INSERT INTO product_slots VALUES(23,184); +INSERT INTO product_slots VALUES(23,185); +INSERT INTO product_slots VALUES(23,186); +INSERT INTO product_slots VALUES(23,187); +INSERT INTO product_slots VALUES(23,188); +INSERT INTO product_slots VALUES(23,189); +INSERT INTO product_slots VALUES(23,190); +INSERT INTO product_slots VALUES(23,191); +INSERT INTO product_slots VALUES(23,192); +INSERT INTO product_slots VALUES(23,193); +INSERT INTO product_slots VALUES(23,194); +INSERT INTO product_slots VALUES(23,195); +INSERT INTO product_slots VALUES(23,196); +INSERT INTO product_slots VALUES(23,197); +INSERT INTO product_slots VALUES(23,198); +INSERT INTO product_slots VALUES(23,199); +INSERT INTO product_slots VALUES(23,200); +INSERT INTO product_slots VALUES(23,201); +INSERT INTO product_slots VALUES(23,202); +INSERT INTO product_slots VALUES(23,203); +INSERT INTO product_slots VALUES(23,204); +INSERT INTO product_slots VALUES(23,205); +INSERT INTO product_slots VALUES(23,206); +INSERT INTO product_slots VALUES(23,207); +INSERT INTO product_slots VALUES(23,208); +INSERT INTO product_slots VALUES(23,209); +INSERT INTO product_slots VALUES(23,210); +INSERT INTO product_slots VALUES(23,211); +INSERT INTO product_slots VALUES(23,212); +INSERT INTO product_slots VALUES(23,213); +INSERT INTO product_slots VALUES(23,214); +INSERT INTO product_slots VALUES(23,215); +INSERT INTO product_slots VALUES(23,216); +INSERT INTO product_slots VALUES(23,217); +INSERT INTO product_slots VALUES(23,218); +INSERT INTO product_slots VALUES(23,219); +INSERT INTO product_slots VALUES(23,220); +INSERT INTO product_slots VALUES(23,221); +INSERT INTO product_slots VALUES(23,222); +INSERT INTO product_slots VALUES(23,223); +INSERT INTO product_slots VALUES(23,224); +INSERT INTO product_slots VALUES(23,225); +INSERT INTO product_slots VALUES(23,226); +INSERT INTO product_slots VALUES(23,227); +INSERT INTO product_slots VALUES(23,228); +INSERT INTO product_slots VALUES(23,229); +INSERT INTO product_slots VALUES(23,230); +INSERT INTO product_slots VALUES(23,231); +INSERT INTO product_slots VALUES(23,232); +INSERT INTO product_slots VALUES(23,234); +INSERT INTO product_slots VALUES(23,235); +INSERT INTO product_slots VALUES(23,236); +INSERT INTO product_slots VALUES(23,237); +INSERT INTO product_slots VALUES(23,238); +INSERT INTO product_slots VALUES(23,239); +INSERT INTO product_slots VALUES(23,240); +INSERT INTO product_slots VALUES(23,241); +INSERT INTO product_slots VALUES(23,242); +INSERT INTO product_slots VALUES(23,243); +INSERT INTO product_slots VALUES(23,244); +INSERT INTO product_slots VALUES(23,274); +INSERT INTO product_slots VALUES(23,275); +INSERT INTO product_slots VALUES(23,279); +INSERT INTO product_slots VALUES(23,280); +INSERT INTO product_slots VALUES(23,281); +INSERT INTO product_slots VALUES(23,282); +INSERT INTO product_slots VALUES(24,12); +INSERT INTO product_slots VALUES(24,18); +INSERT INTO product_slots VALUES(24,19); +INSERT INTO product_slots VALUES(24,20); +INSERT INTO product_slots VALUES(24,21); +INSERT INTO product_slots VALUES(24,22); +INSERT INTO product_slots VALUES(24,23); +INSERT INTO product_slots VALUES(24,31); +INSERT INTO product_slots VALUES(24,33); +INSERT INTO product_slots VALUES(24,35); +INSERT INTO product_slots VALUES(24,37); +INSERT INTO product_slots VALUES(24,38); +INSERT INTO product_slots VALUES(24,39); +INSERT INTO product_slots VALUES(24,40); +INSERT INTO product_slots VALUES(24,41); +INSERT INTO product_slots VALUES(24,43); +INSERT INTO product_slots VALUES(24,45); +INSERT INTO product_slots VALUES(24,46); +INSERT INTO product_slots VALUES(24,47); +INSERT INTO product_slots VALUES(24,48); +INSERT INTO product_slots VALUES(24,49); +INSERT INTO product_slots VALUES(24,50); +INSERT INTO product_slots VALUES(24,51); +INSERT INTO product_slots VALUES(24,52); +INSERT INTO product_slots VALUES(24,53); +INSERT INTO product_slots VALUES(24,54); +INSERT INTO product_slots VALUES(24,55); +INSERT INTO product_slots VALUES(24,56); +INSERT INTO product_slots VALUES(24,57); +INSERT INTO product_slots VALUES(24,58); +INSERT INTO product_slots VALUES(24,59); +INSERT INTO product_slots VALUES(24,60); +INSERT INTO product_slots VALUES(24,61); +INSERT INTO product_slots VALUES(24,62); +INSERT INTO product_slots VALUES(24,63); +INSERT INTO product_slots VALUES(24,64); +INSERT INTO product_slots VALUES(24,65); +INSERT INTO product_slots VALUES(24,66); +INSERT INTO product_slots VALUES(24,67); +INSERT INTO product_slots VALUES(24,68); +INSERT INTO product_slots VALUES(24,69); +INSERT INTO product_slots VALUES(24,70); +INSERT INTO product_slots VALUES(24,71); +INSERT INTO product_slots VALUES(24,72); +INSERT INTO product_slots VALUES(24,73); +INSERT INTO product_slots VALUES(24,74); +INSERT INTO product_slots VALUES(24,75); +INSERT INTO product_slots VALUES(24,76); +INSERT INTO product_slots VALUES(24,77); +INSERT INTO product_slots VALUES(24,78); +INSERT INTO product_slots VALUES(24,79); +INSERT INTO product_slots VALUES(24,80); +INSERT INTO product_slots VALUES(24,81); +INSERT INTO product_slots VALUES(24,82); +INSERT INTO product_slots VALUES(24,83); +INSERT INTO product_slots VALUES(24,84); +INSERT INTO product_slots VALUES(24,85); +INSERT INTO product_slots VALUES(24,86); +INSERT INTO product_slots VALUES(24,87); +INSERT INTO product_slots VALUES(24,88); +INSERT INTO product_slots VALUES(24,89); +INSERT INTO product_slots VALUES(24,90); +INSERT INTO product_slots VALUES(24,91); +INSERT INTO product_slots VALUES(24,92); +INSERT INTO product_slots VALUES(24,93); +INSERT INTO product_slots VALUES(24,94); +INSERT INTO product_slots VALUES(24,95); +INSERT INTO product_slots VALUES(24,96); +INSERT INTO product_slots VALUES(24,97); +INSERT INTO product_slots VALUES(24,98); +INSERT INTO product_slots VALUES(24,99); +INSERT INTO product_slots VALUES(24,100); +INSERT INTO product_slots VALUES(24,101); +INSERT INTO product_slots VALUES(24,102); +INSERT INTO product_slots VALUES(24,103); +INSERT INTO product_slots VALUES(24,104); +INSERT INTO product_slots VALUES(24,105); +INSERT INTO product_slots VALUES(24,106); +INSERT INTO product_slots VALUES(24,107); +INSERT INTO product_slots VALUES(24,108); +INSERT INTO product_slots VALUES(24,109); +INSERT INTO product_slots VALUES(24,110); +INSERT INTO product_slots VALUES(24,111); +INSERT INTO product_slots VALUES(24,112); +INSERT INTO product_slots VALUES(24,113); +INSERT INTO product_slots VALUES(24,114); +INSERT INTO product_slots VALUES(24,115); +INSERT INTO product_slots VALUES(24,116); +INSERT INTO product_slots VALUES(24,117); +INSERT INTO product_slots VALUES(24,118); +INSERT INTO product_slots VALUES(24,119); +INSERT INTO product_slots VALUES(24,120); +INSERT INTO product_slots VALUES(24,121); +INSERT INTO product_slots VALUES(24,122); +INSERT INTO product_slots VALUES(24,123); +INSERT INTO product_slots VALUES(24,124); +INSERT INTO product_slots VALUES(24,125); +INSERT INTO product_slots VALUES(24,126); +INSERT INTO product_slots VALUES(24,127); +INSERT INTO product_slots VALUES(24,128); +INSERT INTO product_slots VALUES(24,129); +INSERT INTO product_slots VALUES(24,130); +INSERT INTO product_slots VALUES(24,131); +INSERT INTO product_slots VALUES(24,132); +INSERT INTO product_slots VALUES(24,133); +INSERT INTO product_slots VALUES(24,134); +INSERT INTO product_slots VALUES(24,135); +INSERT INTO product_slots VALUES(24,136); +INSERT INTO product_slots VALUES(24,137); +INSERT INTO product_slots VALUES(24,138); +INSERT INTO product_slots VALUES(24,139); +INSERT INTO product_slots VALUES(24,140); +INSERT INTO product_slots VALUES(24,141); +INSERT INTO product_slots VALUES(24,142); +INSERT INTO product_slots VALUES(24,143); +INSERT INTO product_slots VALUES(24,144); +INSERT INTO product_slots VALUES(24,145); +INSERT INTO product_slots VALUES(24,146); +INSERT INTO product_slots VALUES(24,147); +INSERT INTO product_slots VALUES(24,148); +INSERT INTO product_slots VALUES(24,149); +INSERT INTO product_slots VALUES(24,150); +INSERT INTO product_slots VALUES(24,151); +INSERT INTO product_slots VALUES(24,152); +INSERT INTO product_slots VALUES(24,153); +INSERT INTO product_slots VALUES(24,154); +INSERT INTO product_slots VALUES(24,155); +INSERT INTO product_slots VALUES(24,156); +INSERT INTO product_slots VALUES(24,157); +INSERT INTO product_slots VALUES(24,158); +INSERT INTO product_slots VALUES(24,159); +INSERT INTO product_slots VALUES(24,160); +INSERT INTO product_slots VALUES(24,161); +INSERT INTO product_slots VALUES(24,162); +INSERT INTO product_slots VALUES(24,163); +INSERT INTO product_slots VALUES(24,164); +INSERT INTO product_slots VALUES(24,165); +INSERT INTO product_slots VALUES(24,166); +INSERT INTO product_slots VALUES(24,167); +INSERT INTO product_slots VALUES(24,168); +INSERT INTO product_slots VALUES(24,169); +INSERT INTO product_slots VALUES(24,170); +INSERT INTO product_slots VALUES(24,171); +INSERT INTO product_slots VALUES(24,172); +INSERT INTO product_slots VALUES(24,173); +INSERT INTO product_slots VALUES(24,174); +INSERT INTO product_slots VALUES(24,175); +INSERT INTO product_slots VALUES(24,176); +INSERT INTO product_slots VALUES(24,177); +INSERT INTO product_slots VALUES(24,178); +INSERT INTO product_slots VALUES(24,179); +INSERT INTO product_slots VALUES(24,180); +INSERT INTO product_slots VALUES(24,181); +INSERT INTO product_slots VALUES(24,182); +INSERT INTO product_slots VALUES(24,183); +INSERT INTO product_slots VALUES(24,184); +INSERT INTO product_slots VALUES(24,185); +INSERT INTO product_slots VALUES(24,186); +INSERT INTO product_slots VALUES(24,187); +INSERT INTO product_slots VALUES(24,188); +INSERT INTO product_slots VALUES(24,189); +INSERT INTO product_slots VALUES(24,190); +INSERT INTO product_slots VALUES(24,191); +INSERT INTO product_slots VALUES(24,192); +INSERT INTO product_slots VALUES(24,193); +INSERT INTO product_slots VALUES(24,194); +INSERT INTO product_slots VALUES(24,195); +INSERT INTO product_slots VALUES(24,196); +INSERT INTO product_slots VALUES(24,197); +INSERT INTO product_slots VALUES(24,198); +INSERT INTO product_slots VALUES(24,199); +INSERT INTO product_slots VALUES(24,200); +INSERT INTO product_slots VALUES(24,201); +INSERT INTO product_slots VALUES(24,202); +INSERT INTO product_slots VALUES(24,203); +INSERT INTO product_slots VALUES(24,204); +INSERT INTO product_slots VALUES(24,205); +INSERT INTO product_slots VALUES(24,206); +INSERT INTO product_slots VALUES(24,207); +INSERT INTO product_slots VALUES(24,208); +INSERT INTO product_slots VALUES(24,209); +INSERT INTO product_slots VALUES(24,210); +INSERT INTO product_slots VALUES(24,211); +INSERT INTO product_slots VALUES(24,212); +INSERT INTO product_slots VALUES(24,213); +INSERT INTO product_slots VALUES(24,214); +INSERT INTO product_slots VALUES(24,215); +INSERT INTO product_slots VALUES(24,216); +INSERT INTO product_slots VALUES(24,217); +INSERT INTO product_slots VALUES(24,218); +INSERT INTO product_slots VALUES(24,219); +INSERT INTO product_slots VALUES(24,220); +INSERT INTO product_slots VALUES(24,221); +INSERT INTO product_slots VALUES(24,222); +INSERT INTO product_slots VALUES(24,223); +INSERT INTO product_slots VALUES(24,224); +INSERT INTO product_slots VALUES(24,225); +INSERT INTO product_slots VALUES(24,226); +INSERT INTO product_slots VALUES(24,227); +INSERT INTO product_slots VALUES(24,228); +INSERT INTO product_slots VALUES(24,229); +INSERT INTO product_slots VALUES(24,230); +INSERT INTO product_slots VALUES(24,231); +INSERT INTO product_slots VALUES(24,232); +INSERT INTO product_slots VALUES(24,234); +INSERT INTO product_slots VALUES(24,235); +INSERT INTO product_slots VALUES(24,236); +INSERT INTO product_slots VALUES(24,237); +INSERT INTO product_slots VALUES(24,238); +INSERT INTO product_slots VALUES(24,239); +INSERT INTO product_slots VALUES(24,240); +INSERT INTO product_slots VALUES(24,241); +INSERT INTO product_slots VALUES(24,242); +INSERT INTO product_slots VALUES(24,243); +INSERT INTO product_slots VALUES(24,244); +INSERT INTO product_slots VALUES(24,274); +INSERT INTO product_slots VALUES(24,275); +INSERT INTO product_slots VALUES(24,279); +INSERT INTO product_slots VALUES(24,280); +INSERT INTO product_slots VALUES(24,281); +INSERT INTO product_slots VALUES(24,282); +INSERT INTO product_slots VALUES(25,10); +INSERT INTO product_slots VALUES(25,11); +INSERT INTO product_slots VALUES(25,12); +INSERT INTO product_slots VALUES(25,17); +INSERT INTO product_slots VALUES(25,18); +INSERT INTO product_slots VALUES(25,20); +INSERT INTO product_slots VALUES(25,21); +INSERT INTO product_slots VALUES(25,22); +INSERT INTO product_slots VALUES(25,33); +INSERT INTO product_slots VALUES(25,35); +INSERT INTO product_slots VALUES(25,37); +INSERT INTO product_slots VALUES(25,38); +INSERT INTO product_slots VALUES(25,39); +INSERT INTO product_slots VALUES(25,40); +INSERT INTO product_slots VALUES(25,43); +INSERT INTO product_slots VALUES(25,45); +INSERT INTO product_slots VALUES(25,46); +INSERT INTO product_slots VALUES(25,48); +INSERT INTO product_slots VALUES(25,49); +INSERT INTO product_slots VALUES(25,51); +INSERT INTO product_slots VALUES(25,52); +INSERT INTO product_slots VALUES(25,53); +INSERT INTO product_slots VALUES(25,54); +INSERT INTO product_slots VALUES(25,57); +INSERT INTO product_slots VALUES(25,58); +INSERT INTO product_slots VALUES(25,59); +INSERT INTO product_slots VALUES(25,60); +INSERT INTO product_slots VALUES(25,61); +INSERT INTO product_slots VALUES(25,62); +INSERT INTO product_slots VALUES(25,63); +INSERT INTO product_slots VALUES(25,64); +INSERT INTO product_slots VALUES(25,65); +INSERT INTO product_slots VALUES(25,66); +INSERT INTO product_slots VALUES(25,67); +INSERT INTO product_slots VALUES(25,68); +INSERT INTO product_slots VALUES(25,69); +INSERT INTO product_slots VALUES(25,70); +INSERT INTO product_slots VALUES(25,71); +INSERT INTO product_slots VALUES(25,72); +INSERT INTO product_slots VALUES(25,73); +INSERT INTO product_slots VALUES(25,74); +INSERT INTO product_slots VALUES(25,75); +INSERT INTO product_slots VALUES(25,76); +INSERT INTO product_slots VALUES(25,77); +INSERT INTO product_slots VALUES(25,78); +INSERT INTO product_slots VALUES(25,79); +INSERT INTO product_slots VALUES(25,80); +INSERT INTO product_slots VALUES(25,81); +INSERT INTO product_slots VALUES(25,82); +INSERT INTO product_slots VALUES(25,83); +INSERT INTO product_slots VALUES(25,84); +INSERT INTO product_slots VALUES(25,85); +INSERT INTO product_slots VALUES(25,86); +INSERT INTO product_slots VALUES(25,87); +INSERT INTO product_slots VALUES(25,88); +INSERT INTO product_slots VALUES(25,89); +INSERT INTO product_slots VALUES(25,90); +INSERT INTO product_slots VALUES(25,91); +INSERT INTO product_slots VALUES(25,92); +INSERT INTO product_slots VALUES(25,93); +INSERT INTO product_slots VALUES(25,94); +INSERT INTO product_slots VALUES(25,95); +INSERT INTO product_slots VALUES(25,96); +INSERT INTO product_slots VALUES(25,97); +INSERT INTO product_slots VALUES(25,98); +INSERT INTO product_slots VALUES(25,99); +INSERT INTO product_slots VALUES(25,100); +INSERT INTO product_slots VALUES(25,102); +INSERT INTO product_slots VALUES(25,103); +INSERT INTO product_slots VALUES(25,104); +INSERT INTO product_slots VALUES(25,105); +INSERT INTO product_slots VALUES(25,106); +INSERT INTO product_slots VALUES(25,107); +INSERT INTO product_slots VALUES(25,108); +INSERT INTO product_slots VALUES(25,109); +INSERT INTO product_slots VALUES(25,110); +INSERT INTO product_slots VALUES(25,111); +INSERT INTO product_slots VALUES(25,112); +INSERT INTO product_slots VALUES(25,113); +INSERT INTO product_slots VALUES(25,114); +INSERT INTO product_slots VALUES(25,115); +INSERT INTO product_slots VALUES(25,117); +INSERT INTO product_slots VALUES(25,118); +INSERT INTO product_slots VALUES(25,119); +INSERT INTO product_slots VALUES(25,120); +INSERT INTO product_slots VALUES(25,121); +INSERT INTO product_slots VALUES(25,122); +INSERT INTO product_slots VALUES(25,123); +INSERT INTO product_slots VALUES(25,124); +INSERT INTO product_slots VALUES(25,125); +INSERT INTO product_slots VALUES(25,126); +INSERT INTO product_slots VALUES(25,127); +INSERT INTO product_slots VALUES(25,128); +INSERT INTO product_slots VALUES(25,129); +INSERT INTO product_slots VALUES(25,130); +INSERT INTO product_slots VALUES(25,131); +INSERT INTO product_slots VALUES(25,132); +INSERT INTO product_slots VALUES(25,133); +INSERT INTO product_slots VALUES(25,134); +INSERT INTO product_slots VALUES(25,135); +INSERT INTO product_slots VALUES(25,136); +INSERT INTO product_slots VALUES(25,138); +INSERT INTO product_slots VALUES(25,139); +INSERT INTO product_slots VALUES(25,140); +INSERT INTO product_slots VALUES(25,141); +INSERT INTO product_slots VALUES(25,142); +INSERT INTO product_slots VALUES(25,143); +INSERT INTO product_slots VALUES(25,145); +INSERT INTO product_slots VALUES(25,146); +INSERT INTO product_slots VALUES(25,147); +INSERT INTO product_slots VALUES(25,148); +INSERT INTO product_slots VALUES(25,149); +INSERT INTO product_slots VALUES(25,150); +INSERT INTO product_slots VALUES(25,151); +INSERT INTO product_slots VALUES(25,152); +INSERT INTO product_slots VALUES(25,153); +INSERT INTO product_slots VALUES(25,154); +INSERT INTO product_slots VALUES(25,155); +INSERT INTO product_slots VALUES(25,156); +INSERT INTO product_slots VALUES(25,157); +INSERT INTO product_slots VALUES(25,158); +INSERT INTO product_slots VALUES(25,159); +INSERT INTO product_slots VALUES(25,160); +INSERT INTO product_slots VALUES(25,161); +INSERT INTO product_slots VALUES(25,162); +INSERT INTO product_slots VALUES(25,163); +INSERT INTO product_slots VALUES(25,164); +INSERT INTO product_slots VALUES(25,165); +INSERT INTO product_slots VALUES(25,166); +INSERT INTO product_slots VALUES(25,167); +INSERT INTO product_slots VALUES(25,168); +INSERT INTO product_slots VALUES(25,169); +INSERT INTO product_slots VALUES(25,170); +INSERT INTO product_slots VALUES(25,171); +INSERT INTO product_slots VALUES(25,172); +INSERT INTO product_slots VALUES(25,173); +INSERT INTO product_slots VALUES(25,174); +INSERT INTO product_slots VALUES(25,175); +INSERT INTO product_slots VALUES(25,176); +INSERT INTO product_slots VALUES(25,177); +INSERT INTO product_slots VALUES(25,178); +INSERT INTO product_slots VALUES(25,179); +INSERT INTO product_slots VALUES(25,180); +INSERT INTO product_slots VALUES(25,181); +INSERT INTO product_slots VALUES(25,182); +INSERT INTO product_slots VALUES(25,183); +INSERT INTO product_slots VALUES(25,184); +INSERT INTO product_slots VALUES(25,185); +INSERT INTO product_slots VALUES(25,186); +INSERT INTO product_slots VALUES(25,187); +INSERT INTO product_slots VALUES(25,188); +INSERT INTO product_slots VALUES(25,189); +INSERT INTO product_slots VALUES(25,190); +INSERT INTO product_slots VALUES(25,191); +INSERT INTO product_slots VALUES(25,192); +INSERT INTO product_slots VALUES(25,193); +INSERT INTO product_slots VALUES(25,194); +INSERT INTO product_slots VALUES(25,195); +INSERT INTO product_slots VALUES(25,196); +INSERT INTO product_slots VALUES(25,197); +INSERT INTO product_slots VALUES(25,198); +INSERT INTO product_slots VALUES(25,199); +INSERT INTO product_slots VALUES(25,200); +INSERT INTO product_slots VALUES(25,201); +INSERT INTO product_slots VALUES(25,202); +INSERT INTO product_slots VALUES(25,203); +INSERT INTO product_slots VALUES(25,204); +INSERT INTO product_slots VALUES(25,205); +INSERT INTO product_slots VALUES(25,206); +INSERT INTO product_slots VALUES(25,207); +INSERT INTO product_slots VALUES(25,208); +INSERT INTO product_slots VALUES(25,209); +INSERT INTO product_slots VALUES(25,210); +INSERT INTO product_slots VALUES(25,211); +INSERT INTO product_slots VALUES(25,212); +INSERT INTO product_slots VALUES(25,213); +INSERT INTO product_slots VALUES(25,214); +INSERT INTO product_slots VALUES(25,215); +INSERT INTO product_slots VALUES(25,216); +INSERT INTO product_slots VALUES(25,217); +INSERT INTO product_slots VALUES(25,218); +INSERT INTO product_slots VALUES(25,219); +INSERT INTO product_slots VALUES(25,220); +INSERT INTO product_slots VALUES(25,221); +INSERT INTO product_slots VALUES(25,222); +INSERT INTO product_slots VALUES(25,223); +INSERT INTO product_slots VALUES(25,224); +INSERT INTO product_slots VALUES(25,225); +INSERT INTO product_slots VALUES(25,226); +INSERT INTO product_slots VALUES(25,227); +INSERT INTO product_slots VALUES(25,228); +INSERT INTO product_slots VALUES(25,229); +INSERT INTO product_slots VALUES(25,230); +INSERT INTO product_slots VALUES(25,231); +INSERT INTO product_slots VALUES(25,232); +INSERT INTO product_slots VALUES(25,233); +INSERT INTO product_slots VALUES(25,234); +INSERT INTO product_slots VALUES(25,235); +INSERT INTO product_slots VALUES(25,236); +INSERT INTO product_slots VALUES(25,237); +INSERT INTO product_slots VALUES(25,238); +INSERT INTO product_slots VALUES(25,239); +INSERT INTO product_slots VALUES(25,240); +INSERT INTO product_slots VALUES(25,241); +INSERT INTO product_slots VALUES(25,242); +INSERT INTO product_slots VALUES(25,243); +INSERT INTO product_slots VALUES(25,244); +INSERT INTO product_slots VALUES(25,274); +INSERT INTO product_slots VALUES(25,275); +INSERT INTO product_slots VALUES(25,279); +INSERT INTO product_slots VALUES(25,280); +INSERT INTO product_slots VALUES(25,281); +INSERT INTO product_slots VALUES(25,282); +INSERT INTO product_slots VALUES(25,283); +INSERT INTO product_slots VALUES(25,284); +INSERT INTO product_slots VALUES(25,285); +INSERT INTO product_slots VALUES(25,286); +INSERT INTO product_slots VALUES(25,287); +INSERT INTO product_slots VALUES(26,17); +INSERT INTO product_slots VALUES(26,18); +INSERT INTO product_slots VALUES(26,20); +INSERT INTO product_slots VALUES(26,21); +INSERT INTO product_slots VALUES(26,22); +INSERT INTO product_slots VALUES(26,33); +INSERT INTO product_slots VALUES(26,35); +INSERT INTO product_slots VALUES(26,37); +INSERT INTO product_slots VALUES(26,38); +INSERT INTO product_slots VALUES(26,40); +INSERT INTO product_slots VALUES(26,64); +INSERT INTO product_slots VALUES(26,65); +INSERT INTO product_slots VALUES(26,66); +INSERT INTO product_slots VALUES(26,67); +INSERT INTO product_slots VALUES(26,68); +INSERT INTO product_slots VALUES(26,69); +INSERT INTO product_slots VALUES(26,70); +INSERT INTO product_slots VALUES(26,71); +INSERT INTO product_slots VALUES(26,72); +INSERT INTO product_slots VALUES(26,73); +INSERT INTO product_slots VALUES(26,74); +INSERT INTO product_slots VALUES(26,75); +INSERT INTO product_slots VALUES(26,76); +INSERT INTO product_slots VALUES(26,77); +INSERT INTO product_slots VALUES(26,78); +INSERT INTO product_slots VALUES(26,79); +INSERT INTO product_slots VALUES(26,80); +INSERT INTO product_slots VALUES(26,81); +INSERT INTO product_slots VALUES(26,82); +INSERT INTO product_slots VALUES(26,83); +INSERT INTO product_slots VALUES(26,84); +INSERT INTO product_slots VALUES(26,85); +INSERT INTO product_slots VALUES(26,86); +INSERT INTO product_slots VALUES(26,87); +INSERT INTO product_slots VALUES(26,88); +INSERT INTO product_slots VALUES(26,89); +INSERT INTO product_slots VALUES(26,90); +INSERT INTO product_slots VALUES(26,91); +INSERT INTO product_slots VALUES(26,92); +INSERT INTO product_slots VALUES(26,93); +INSERT INTO product_slots VALUES(26,94); +INSERT INTO product_slots VALUES(26,95); +INSERT INTO product_slots VALUES(26,96); +INSERT INTO product_slots VALUES(26,97); +INSERT INTO product_slots VALUES(26,98); +INSERT INTO product_slots VALUES(26,99); +INSERT INTO product_slots VALUES(26,100); +INSERT INTO product_slots VALUES(26,102); +INSERT INTO product_slots VALUES(26,103); +INSERT INTO product_slots VALUES(26,104); +INSERT INTO product_slots VALUES(26,105); +INSERT INTO product_slots VALUES(26,106); +INSERT INTO product_slots VALUES(26,107); +INSERT INTO product_slots VALUES(26,108); +INSERT INTO product_slots VALUES(26,109); +INSERT INTO product_slots VALUES(26,110); +INSERT INTO product_slots VALUES(26,111); +INSERT INTO product_slots VALUES(26,112); +INSERT INTO product_slots VALUES(26,113); +INSERT INTO product_slots VALUES(26,114); +INSERT INTO product_slots VALUES(26,115); +INSERT INTO product_slots VALUES(26,117); +INSERT INTO product_slots VALUES(26,118); +INSERT INTO product_slots VALUES(26,119); +INSERT INTO product_slots VALUES(26,120); +INSERT INTO product_slots VALUES(26,121); +INSERT INTO product_slots VALUES(26,122); +INSERT INTO product_slots VALUES(26,123); +INSERT INTO product_slots VALUES(26,124); +INSERT INTO product_slots VALUES(26,125); +INSERT INTO product_slots VALUES(26,126); +INSERT INTO product_slots VALUES(26,127); +INSERT INTO product_slots VALUES(26,128); +INSERT INTO product_slots VALUES(26,129); +INSERT INTO product_slots VALUES(26,130); +INSERT INTO product_slots VALUES(26,131); +INSERT INTO product_slots VALUES(26,132); +INSERT INTO product_slots VALUES(26,133); +INSERT INTO product_slots VALUES(26,134); +INSERT INTO product_slots VALUES(26,135); +INSERT INTO product_slots VALUES(26,136); +INSERT INTO product_slots VALUES(26,138); +INSERT INTO product_slots VALUES(26,139); +INSERT INTO product_slots VALUES(26,140); +INSERT INTO product_slots VALUES(26,141); +INSERT INTO product_slots VALUES(26,142); +INSERT INTO product_slots VALUES(26,143); +INSERT INTO product_slots VALUES(26,145); +INSERT INTO product_slots VALUES(26,146); +INSERT INTO product_slots VALUES(26,147); +INSERT INTO product_slots VALUES(26,148); +INSERT INTO product_slots VALUES(26,149); +INSERT INTO product_slots VALUES(26,150); +INSERT INTO product_slots VALUES(26,151); +INSERT INTO product_slots VALUES(26,152); +INSERT INTO product_slots VALUES(26,153); +INSERT INTO product_slots VALUES(26,154); +INSERT INTO product_slots VALUES(26,155); +INSERT INTO product_slots VALUES(26,156); +INSERT INTO product_slots VALUES(26,157); +INSERT INTO product_slots VALUES(26,158); +INSERT INTO product_slots VALUES(26,159); +INSERT INTO product_slots VALUES(26,160); +INSERT INTO product_slots VALUES(26,161); +INSERT INTO product_slots VALUES(26,162); +INSERT INTO product_slots VALUES(26,163); +INSERT INTO product_slots VALUES(26,164); +INSERT INTO product_slots VALUES(26,165); +INSERT INTO product_slots VALUES(26,166); +INSERT INTO product_slots VALUES(26,167); +INSERT INTO product_slots VALUES(26,168); +INSERT INTO product_slots VALUES(26,169); +INSERT INTO product_slots VALUES(26,170); +INSERT INTO product_slots VALUES(26,171); +INSERT INTO product_slots VALUES(26,172); +INSERT INTO product_slots VALUES(26,173); +INSERT INTO product_slots VALUES(26,174); +INSERT INTO product_slots VALUES(26,175); +INSERT INTO product_slots VALUES(26,176); +INSERT INTO product_slots VALUES(26,177); +INSERT INTO product_slots VALUES(26,178); +INSERT INTO product_slots VALUES(26,179); +INSERT INTO product_slots VALUES(26,180); +INSERT INTO product_slots VALUES(26,181); +INSERT INTO product_slots VALUES(26,182); +INSERT INTO product_slots VALUES(26,183); +INSERT INTO product_slots VALUES(26,184); +INSERT INTO product_slots VALUES(26,185); +INSERT INTO product_slots VALUES(26,186); +INSERT INTO product_slots VALUES(26,187); +INSERT INTO product_slots VALUES(26,188); +INSERT INTO product_slots VALUES(26,189); +INSERT INTO product_slots VALUES(26,190); +INSERT INTO product_slots VALUES(26,191); +INSERT INTO product_slots VALUES(26,192); +INSERT INTO product_slots VALUES(26,193); +INSERT INTO product_slots VALUES(26,194); +INSERT INTO product_slots VALUES(26,195); +INSERT INTO product_slots VALUES(26,196); +INSERT INTO product_slots VALUES(26,197); +INSERT INTO product_slots VALUES(26,198); +INSERT INTO product_slots VALUES(26,199); +INSERT INTO product_slots VALUES(26,200); +INSERT INTO product_slots VALUES(26,201); +INSERT INTO product_slots VALUES(26,202); +INSERT INTO product_slots VALUES(26,203); +INSERT INTO product_slots VALUES(26,204); +INSERT INTO product_slots VALUES(26,205); +INSERT INTO product_slots VALUES(26,206); +INSERT INTO product_slots VALUES(26,207); +INSERT INTO product_slots VALUES(26,208); +INSERT INTO product_slots VALUES(26,209); +INSERT INTO product_slots VALUES(26,210); +INSERT INTO product_slots VALUES(26,211); +INSERT INTO product_slots VALUES(26,212); +INSERT INTO product_slots VALUES(26,213); +INSERT INTO product_slots VALUES(26,214); +INSERT INTO product_slots VALUES(26,215); +INSERT INTO product_slots VALUES(26,216); +INSERT INTO product_slots VALUES(26,217); +INSERT INTO product_slots VALUES(26,218); +INSERT INTO product_slots VALUES(26,219); +INSERT INTO product_slots VALUES(26,220); +INSERT INTO product_slots VALUES(26,221); +INSERT INTO product_slots VALUES(26,222); +INSERT INTO product_slots VALUES(26,223); +INSERT INTO product_slots VALUES(26,224); +INSERT INTO product_slots VALUES(26,225); +INSERT INTO product_slots VALUES(26,226); +INSERT INTO product_slots VALUES(26,227); +INSERT INTO product_slots VALUES(26,228); +INSERT INTO product_slots VALUES(26,229); +INSERT INTO product_slots VALUES(26,230); +INSERT INTO product_slots VALUES(26,231); +INSERT INTO product_slots VALUES(26,232); +INSERT INTO product_slots VALUES(26,233); +INSERT INTO product_slots VALUES(26,234); +INSERT INTO product_slots VALUES(26,235); +INSERT INTO product_slots VALUES(26,236); +INSERT INTO product_slots VALUES(26,237); +INSERT INTO product_slots VALUES(26,238); +INSERT INTO product_slots VALUES(26,239); +INSERT INTO product_slots VALUES(26,240); +INSERT INTO product_slots VALUES(26,241); +INSERT INTO product_slots VALUES(26,242); +INSERT INTO product_slots VALUES(26,243); +INSERT INTO product_slots VALUES(26,244); +INSERT INTO product_slots VALUES(26,274); +INSERT INTO product_slots VALUES(26,275); +INSERT INTO product_slots VALUES(26,279); +INSERT INTO product_slots VALUES(26,280); +INSERT INTO product_slots VALUES(26,281); +INSERT INTO product_slots VALUES(26,282); +INSERT INTO product_slots VALUES(26,283); +INSERT INTO product_slots VALUES(26,284); +INSERT INTO product_slots VALUES(26,285); +INSERT INTO product_slots VALUES(26,286); +INSERT INTO product_slots VALUES(26,287); +INSERT INTO product_slots VALUES(27,18); +INSERT INTO product_slots VALUES(27,20); +INSERT INTO product_slots VALUES(27,21); +INSERT INTO product_slots VALUES(27,33); +INSERT INTO product_slots VALUES(27,35); +INSERT INTO product_slots VALUES(27,37); +INSERT INTO product_slots VALUES(27,38); +INSERT INTO product_slots VALUES(27,39); +INSERT INTO product_slots VALUES(27,40); +INSERT INTO product_slots VALUES(27,41); +INSERT INTO product_slots VALUES(27,43); +INSERT INTO product_slots VALUES(27,44); +INSERT INTO product_slots VALUES(27,45); +INSERT INTO product_slots VALUES(27,46); +INSERT INTO product_slots VALUES(27,47); +INSERT INTO product_slots VALUES(27,48); +INSERT INTO product_slots VALUES(27,49); +INSERT INTO product_slots VALUES(27,50); +INSERT INTO product_slots VALUES(27,51); +INSERT INTO product_slots VALUES(27,52); +INSERT INTO product_slots VALUES(27,53); +INSERT INTO product_slots VALUES(27,54); +INSERT INTO product_slots VALUES(27,55); +INSERT INTO product_slots VALUES(27,56); +INSERT INTO product_slots VALUES(27,57); +INSERT INTO product_slots VALUES(27,58); +INSERT INTO product_slots VALUES(27,59); +INSERT INTO product_slots VALUES(27,60); +INSERT INTO product_slots VALUES(27,61); +INSERT INTO product_slots VALUES(27,62); +INSERT INTO product_slots VALUES(27,63); +INSERT INTO product_slots VALUES(27,64); +INSERT INTO product_slots VALUES(27,65); +INSERT INTO product_slots VALUES(27,66); +INSERT INTO product_slots VALUES(27,67); +INSERT INTO product_slots VALUES(27,68); +INSERT INTO product_slots VALUES(27,69); +INSERT INTO product_slots VALUES(27,70); +INSERT INTO product_slots VALUES(27,71); +INSERT INTO product_slots VALUES(27,72); +INSERT INTO product_slots VALUES(27,73); +INSERT INTO product_slots VALUES(27,74); +INSERT INTO product_slots VALUES(27,75); +INSERT INTO product_slots VALUES(27,76); +INSERT INTO product_slots VALUES(27,77); +INSERT INTO product_slots VALUES(27,78); +INSERT INTO product_slots VALUES(27,79); +INSERT INTO product_slots VALUES(27,80); +INSERT INTO product_slots VALUES(27,81); +INSERT INTO product_slots VALUES(27,82); +INSERT INTO product_slots VALUES(27,83); +INSERT INTO product_slots VALUES(27,84); +INSERT INTO product_slots VALUES(27,85); +INSERT INTO product_slots VALUES(27,86); +INSERT INTO product_slots VALUES(27,87); +INSERT INTO product_slots VALUES(27,88); +INSERT INTO product_slots VALUES(27,89); +INSERT INTO product_slots VALUES(27,90); +INSERT INTO product_slots VALUES(27,91); +INSERT INTO product_slots VALUES(27,92); +INSERT INTO product_slots VALUES(27,93); +INSERT INTO product_slots VALUES(27,94); +INSERT INTO product_slots VALUES(27,95); +INSERT INTO product_slots VALUES(27,96); +INSERT INTO product_slots VALUES(27,97); +INSERT INTO product_slots VALUES(27,98); +INSERT INTO product_slots VALUES(27,99); +INSERT INTO product_slots VALUES(27,100); +INSERT INTO product_slots VALUES(27,101); +INSERT INTO product_slots VALUES(27,102); +INSERT INTO product_slots VALUES(27,103); +INSERT INTO product_slots VALUES(27,104); +INSERT INTO product_slots VALUES(27,105); +INSERT INTO product_slots VALUES(27,106); +INSERT INTO product_slots VALUES(27,107); +INSERT INTO product_slots VALUES(27,108); +INSERT INTO product_slots VALUES(27,109); +INSERT INTO product_slots VALUES(27,110); +INSERT INTO product_slots VALUES(27,111); +INSERT INTO product_slots VALUES(27,112); +INSERT INTO product_slots VALUES(27,113); +INSERT INTO product_slots VALUES(27,114); +INSERT INTO product_slots VALUES(27,115); +INSERT INTO product_slots VALUES(27,116); +INSERT INTO product_slots VALUES(27,117); +INSERT INTO product_slots VALUES(27,118); +INSERT INTO product_slots VALUES(27,119); +INSERT INTO product_slots VALUES(27,120); +INSERT INTO product_slots VALUES(27,121); +INSERT INTO product_slots VALUES(27,122); +INSERT INTO product_slots VALUES(27,123); +INSERT INTO product_slots VALUES(27,124); +INSERT INTO product_slots VALUES(27,125); +INSERT INTO product_slots VALUES(27,126); +INSERT INTO product_slots VALUES(27,127); +INSERT INTO product_slots VALUES(27,128); +INSERT INTO product_slots VALUES(27,129); +INSERT INTO product_slots VALUES(27,130); +INSERT INTO product_slots VALUES(27,131); +INSERT INTO product_slots VALUES(27,132); +INSERT INTO product_slots VALUES(27,133); +INSERT INTO product_slots VALUES(27,134); +INSERT INTO product_slots VALUES(27,135); +INSERT INTO product_slots VALUES(27,136); +INSERT INTO product_slots VALUES(27,137); +INSERT INTO product_slots VALUES(27,138); +INSERT INTO product_slots VALUES(27,139); +INSERT INTO product_slots VALUES(27,140); +INSERT INTO product_slots VALUES(27,141); +INSERT INTO product_slots VALUES(27,142); +INSERT INTO product_slots VALUES(27,143); +INSERT INTO product_slots VALUES(27,144); +INSERT INTO product_slots VALUES(27,145); +INSERT INTO product_slots VALUES(27,146); +INSERT INTO product_slots VALUES(27,147); +INSERT INTO product_slots VALUES(27,148); +INSERT INTO product_slots VALUES(27,149); +INSERT INTO product_slots VALUES(27,150); +INSERT INTO product_slots VALUES(27,151); +INSERT INTO product_slots VALUES(27,152); +INSERT INTO product_slots VALUES(27,153); +INSERT INTO product_slots VALUES(27,154); +INSERT INTO product_slots VALUES(27,155); +INSERT INTO product_slots VALUES(27,156); +INSERT INTO product_slots VALUES(27,157); +INSERT INTO product_slots VALUES(27,158); +INSERT INTO product_slots VALUES(27,159); +INSERT INTO product_slots VALUES(27,160); +INSERT INTO product_slots VALUES(27,161); +INSERT INTO product_slots VALUES(27,162); +INSERT INTO product_slots VALUES(27,163); +INSERT INTO product_slots VALUES(27,164); +INSERT INTO product_slots VALUES(27,165); +INSERT INTO product_slots VALUES(27,166); +INSERT INTO product_slots VALUES(27,167); +INSERT INTO product_slots VALUES(27,168); +INSERT INTO product_slots VALUES(27,169); +INSERT INTO product_slots VALUES(27,170); +INSERT INTO product_slots VALUES(27,171); +INSERT INTO product_slots VALUES(27,172); +INSERT INTO product_slots VALUES(27,173); +INSERT INTO product_slots VALUES(27,174); +INSERT INTO product_slots VALUES(27,175); +INSERT INTO product_slots VALUES(27,176); +INSERT INTO product_slots VALUES(27,177); +INSERT INTO product_slots VALUES(27,178); +INSERT INTO product_slots VALUES(27,179); +INSERT INTO product_slots VALUES(27,180); +INSERT INTO product_slots VALUES(27,181); +INSERT INTO product_slots VALUES(27,182); +INSERT INTO product_slots VALUES(27,183); +INSERT INTO product_slots VALUES(27,184); +INSERT INTO product_slots VALUES(27,185); +INSERT INTO product_slots VALUES(27,186); +INSERT INTO product_slots VALUES(27,187); +INSERT INTO product_slots VALUES(27,188); +INSERT INTO product_slots VALUES(27,189); +INSERT INTO product_slots VALUES(27,190); +INSERT INTO product_slots VALUES(27,191); +INSERT INTO product_slots VALUES(27,192); +INSERT INTO product_slots VALUES(27,193); +INSERT INTO product_slots VALUES(27,194); +INSERT INTO product_slots VALUES(27,195); +INSERT INTO product_slots VALUES(27,196); +INSERT INTO product_slots VALUES(27,197); +INSERT INTO product_slots VALUES(27,198); +INSERT INTO product_slots VALUES(27,199); +INSERT INTO product_slots VALUES(27,200); +INSERT INTO product_slots VALUES(27,201); +INSERT INTO product_slots VALUES(27,202); +INSERT INTO product_slots VALUES(27,203); +INSERT INTO product_slots VALUES(27,204); +INSERT INTO product_slots VALUES(27,205); +INSERT INTO product_slots VALUES(27,206); +INSERT INTO product_slots VALUES(27,207); +INSERT INTO product_slots VALUES(27,208); +INSERT INTO product_slots VALUES(27,209); +INSERT INTO product_slots VALUES(27,210); +INSERT INTO product_slots VALUES(27,211); +INSERT INTO product_slots VALUES(27,212); +INSERT INTO product_slots VALUES(27,213); +INSERT INTO product_slots VALUES(27,214); +INSERT INTO product_slots VALUES(27,215); +INSERT INTO product_slots VALUES(27,216); +INSERT INTO product_slots VALUES(27,217); +INSERT INTO product_slots VALUES(27,218); +INSERT INTO product_slots VALUES(27,219); +INSERT INTO product_slots VALUES(27,220); +INSERT INTO product_slots VALUES(27,221); +INSERT INTO product_slots VALUES(27,222); +INSERT INTO product_slots VALUES(27,223); +INSERT INTO product_slots VALUES(27,224); +INSERT INTO product_slots VALUES(27,225); +INSERT INTO product_slots VALUES(27,226); +INSERT INTO product_slots VALUES(27,227); +INSERT INTO product_slots VALUES(27,228); +INSERT INTO product_slots VALUES(27,229); +INSERT INTO product_slots VALUES(27,230); +INSERT INTO product_slots VALUES(27,231); +INSERT INTO product_slots VALUES(27,232); +INSERT INTO product_slots VALUES(27,233); +INSERT INTO product_slots VALUES(27,234); +INSERT INTO product_slots VALUES(27,235); +INSERT INTO product_slots VALUES(27,236); +INSERT INTO product_slots VALUES(27,237); +INSERT INTO product_slots VALUES(27,238); +INSERT INTO product_slots VALUES(27,239); +INSERT INTO product_slots VALUES(27,240); +INSERT INTO product_slots VALUES(27,241); +INSERT INTO product_slots VALUES(27,242); +INSERT INTO product_slots VALUES(27,243); +INSERT INTO product_slots VALUES(27,244); +INSERT INTO product_slots VALUES(27,274); +INSERT INTO product_slots VALUES(27,275); +INSERT INTO product_slots VALUES(27,279); +INSERT INTO product_slots VALUES(27,280); +INSERT INTO product_slots VALUES(27,281); +INSERT INTO product_slots VALUES(27,282); +INSERT INTO product_slots VALUES(27,283); +INSERT INTO product_slots VALUES(27,284); +INSERT INTO product_slots VALUES(27,285); +INSERT INTO product_slots VALUES(27,286); +INSERT INTO product_slots VALUES(27,287); +INSERT INTO product_slots VALUES(28,18); +INSERT INTO product_slots VALUES(28,20); +INSERT INTO product_slots VALUES(28,21); +INSERT INTO product_slots VALUES(28,33); +INSERT INTO product_slots VALUES(28,35); +INSERT INTO product_slots VALUES(28,37); +INSERT INTO product_slots VALUES(28,38); +INSERT INTO product_slots VALUES(28,39); +INSERT INTO product_slots VALUES(28,40); +INSERT INTO product_slots VALUES(28,41); +INSERT INTO product_slots VALUES(28,43); +INSERT INTO product_slots VALUES(28,44); +INSERT INTO product_slots VALUES(28,45); +INSERT INTO product_slots VALUES(28,46); +INSERT INTO product_slots VALUES(28,47); +INSERT INTO product_slots VALUES(28,48); +INSERT INTO product_slots VALUES(28,49); +INSERT INTO product_slots VALUES(28,50); +INSERT INTO product_slots VALUES(28,51); +INSERT INTO product_slots VALUES(28,52); +INSERT INTO product_slots VALUES(28,53); +INSERT INTO product_slots VALUES(28,54); +INSERT INTO product_slots VALUES(28,55); +INSERT INTO product_slots VALUES(28,56); +INSERT INTO product_slots VALUES(28,57); +INSERT INTO product_slots VALUES(28,58); +INSERT INTO product_slots VALUES(28,59); +INSERT INTO product_slots VALUES(28,60); +INSERT INTO product_slots VALUES(28,61); +INSERT INTO product_slots VALUES(28,62); +INSERT INTO product_slots VALUES(28,63); +INSERT INTO product_slots VALUES(28,64); +INSERT INTO product_slots VALUES(28,65); +INSERT INTO product_slots VALUES(28,66); +INSERT INTO product_slots VALUES(28,67); +INSERT INTO product_slots VALUES(28,68); +INSERT INTO product_slots VALUES(28,69); +INSERT INTO product_slots VALUES(28,70); +INSERT INTO product_slots VALUES(28,71); +INSERT INTO product_slots VALUES(28,72); +INSERT INTO product_slots VALUES(28,73); +INSERT INTO product_slots VALUES(28,74); +INSERT INTO product_slots VALUES(28,75); +INSERT INTO product_slots VALUES(28,76); +INSERT INTO product_slots VALUES(28,77); +INSERT INTO product_slots VALUES(28,78); +INSERT INTO product_slots VALUES(28,79); +INSERT INTO product_slots VALUES(28,80); +INSERT INTO product_slots VALUES(28,81); +INSERT INTO product_slots VALUES(28,82); +INSERT INTO product_slots VALUES(28,83); +INSERT INTO product_slots VALUES(28,84); +INSERT INTO product_slots VALUES(28,85); +INSERT INTO product_slots VALUES(28,86); +INSERT INTO product_slots VALUES(28,87); +INSERT INTO product_slots VALUES(28,88); +INSERT INTO product_slots VALUES(28,89); +INSERT INTO product_slots VALUES(28,90); +INSERT INTO product_slots VALUES(28,91); +INSERT INTO product_slots VALUES(28,92); +INSERT INTO product_slots VALUES(28,93); +INSERT INTO product_slots VALUES(28,94); +INSERT INTO product_slots VALUES(28,95); +INSERT INTO product_slots VALUES(28,96); +INSERT INTO product_slots VALUES(28,97); +INSERT INTO product_slots VALUES(28,98); +INSERT INTO product_slots VALUES(28,99); +INSERT INTO product_slots VALUES(28,100); +INSERT INTO product_slots VALUES(28,101); +INSERT INTO product_slots VALUES(28,102); +INSERT INTO product_slots VALUES(28,103); +INSERT INTO product_slots VALUES(28,104); +INSERT INTO product_slots VALUES(28,105); +INSERT INTO product_slots VALUES(28,106); +INSERT INTO product_slots VALUES(28,107); +INSERT INTO product_slots VALUES(28,108); +INSERT INTO product_slots VALUES(28,109); +INSERT INTO product_slots VALUES(28,110); +INSERT INTO product_slots VALUES(28,111); +INSERT INTO product_slots VALUES(28,112); +INSERT INTO product_slots VALUES(28,113); +INSERT INTO product_slots VALUES(28,114); +INSERT INTO product_slots VALUES(28,115); +INSERT INTO product_slots VALUES(28,116); +INSERT INTO product_slots VALUES(28,117); +INSERT INTO product_slots VALUES(28,118); +INSERT INTO product_slots VALUES(28,119); +INSERT INTO product_slots VALUES(28,120); +INSERT INTO product_slots VALUES(28,121); +INSERT INTO product_slots VALUES(28,122); +INSERT INTO product_slots VALUES(28,123); +INSERT INTO product_slots VALUES(28,124); +INSERT INTO product_slots VALUES(28,125); +INSERT INTO product_slots VALUES(28,126); +INSERT INTO product_slots VALUES(28,127); +INSERT INTO product_slots VALUES(28,128); +INSERT INTO product_slots VALUES(28,129); +INSERT INTO product_slots VALUES(28,130); +INSERT INTO product_slots VALUES(28,131); +INSERT INTO product_slots VALUES(28,132); +INSERT INTO product_slots VALUES(28,133); +INSERT INTO product_slots VALUES(28,134); +INSERT INTO product_slots VALUES(28,135); +INSERT INTO product_slots VALUES(28,136); +INSERT INTO product_slots VALUES(28,137); +INSERT INTO product_slots VALUES(28,138); +INSERT INTO product_slots VALUES(28,139); +INSERT INTO product_slots VALUES(28,140); +INSERT INTO product_slots VALUES(28,144); +INSERT INTO product_slots VALUES(28,145); +INSERT INTO product_slots VALUES(28,146); +INSERT INTO product_slots VALUES(28,147); +INSERT INTO product_slots VALUES(28,148); +INSERT INTO product_slots VALUES(28,149); +INSERT INTO product_slots VALUES(28,150); +INSERT INTO product_slots VALUES(28,151); +INSERT INTO product_slots VALUES(28,152); +INSERT INTO product_slots VALUES(28,153); +INSERT INTO product_slots VALUES(28,154); +INSERT INTO product_slots VALUES(28,155); +INSERT INTO product_slots VALUES(28,156); +INSERT INTO product_slots VALUES(28,157); +INSERT INTO product_slots VALUES(28,158); +INSERT INTO product_slots VALUES(28,159); +INSERT INTO product_slots VALUES(28,160); +INSERT INTO product_slots VALUES(28,161); +INSERT INTO product_slots VALUES(28,162); +INSERT INTO product_slots VALUES(28,163); +INSERT INTO product_slots VALUES(28,164); +INSERT INTO product_slots VALUES(28,165); +INSERT INTO product_slots VALUES(28,166); +INSERT INTO product_slots VALUES(28,167); +INSERT INTO product_slots VALUES(28,169); +INSERT INTO product_slots VALUES(28,170); +INSERT INTO product_slots VALUES(28,171); +INSERT INTO product_slots VALUES(28,172); +INSERT INTO product_slots VALUES(28,173); +INSERT INTO product_slots VALUES(28,174); +INSERT INTO product_slots VALUES(28,175); +INSERT INTO product_slots VALUES(28,176); +INSERT INTO product_slots VALUES(28,177); +INSERT INTO product_slots VALUES(28,178); +INSERT INTO product_slots VALUES(28,179); +INSERT INTO product_slots VALUES(28,180); +INSERT INTO product_slots VALUES(28,181); +INSERT INTO product_slots VALUES(28,182); +INSERT INTO product_slots VALUES(28,183); +INSERT INTO product_slots VALUES(28,184); +INSERT INTO product_slots VALUES(28,185); +INSERT INTO product_slots VALUES(28,186); +INSERT INTO product_slots VALUES(28,187); +INSERT INTO product_slots VALUES(28,188); +INSERT INTO product_slots VALUES(28,189); +INSERT INTO product_slots VALUES(28,190); +INSERT INTO product_slots VALUES(28,191); +INSERT INTO product_slots VALUES(28,192); +INSERT INTO product_slots VALUES(28,193); +INSERT INTO product_slots VALUES(28,194); +INSERT INTO product_slots VALUES(28,195); +INSERT INTO product_slots VALUES(28,196); +INSERT INTO product_slots VALUES(28,197); +INSERT INTO product_slots VALUES(28,198); +INSERT INTO product_slots VALUES(28,199); +INSERT INTO product_slots VALUES(28,200); +INSERT INTO product_slots VALUES(28,201); +INSERT INTO product_slots VALUES(28,202); +INSERT INTO product_slots VALUES(28,203); +INSERT INTO product_slots VALUES(28,204); +INSERT INTO product_slots VALUES(28,205); +INSERT INTO product_slots VALUES(28,206); +INSERT INTO product_slots VALUES(28,207); +INSERT INTO product_slots VALUES(28,208); +INSERT INTO product_slots VALUES(28,209); +INSERT INTO product_slots VALUES(28,210); +INSERT INTO product_slots VALUES(28,211); +INSERT INTO product_slots VALUES(28,212); +INSERT INTO product_slots VALUES(28,213); +INSERT INTO product_slots VALUES(28,214); +INSERT INTO product_slots VALUES(28,215); +INSERT INTO product_slots VALUES(28,216); +INSERT INTO product_slots VALUES(28,217); +INSERT INTO product_slots VALUES(28,218); +INSERT INTO product_slots VALUES(28,219); +INSERT INTO product_slots VALUES(28,220); +INSERT INTO product_slots VALUES(28,221); +INSERT INTO product_slots VALUES(28,222); +INSERT INTO product_slots VALUES(28,223); +INSERT INTO product_slots VALUES(28,224); +INSERT INTO product_slots VALUES(28,225); +INSERT INTO product_slots VALUES(28,226); +INSERT INTO product_slots VALUES(28,227); +INSERT INTO product_slots VALUES(28,228); +INSERT INTO product_slots VALUES(28,229); +INSERT INTO product_slots VALUES(28,230); +INSERT INTO product_slots VALUES(28,231); +INSERT INTO product_slots VALUES(28,232); +INSERT INTO product_slots VALUES(28,233); +INSERT INTO product_slots VALUES(28,234); +INSERT INTO product_slots VALUES(28,235); +INSERT INTO product_slots VALUES(28,236); +INSERT INTO product_slots VALUES(28,237); +INSERT INTO product_slots VALUES(28,238); +INSERT INTO product_slots VALUES(28,239); +INSERT INTO product_slots VALUES(28,240); +INSERT INTO product_slots VALUES(28,241); +INSERT INTO product_slots VALUES(28,242); +INSERT INTO product_slots VALUES(28,243); +INSERT INTO product_slots VALUES(28,244); +INSERT INTO product_slots VALUES(28,274); +INSERT INTO product_slots VALUES(28,275); +INSERT INTO product_slots VALUES(28,279); +INSERT INTO product_slots VALUES(28,280); +INSERT INTO product_slots VALUES(28,281); +INSERT INTO product_slots VALUES(28,282); +INSERT INTO product_slots VALUES(28,283); +INSERT INTO product_slots VALUES(28,284); +INSERT INTO product_slots VALUES(28,285); +INSERT INTO product_slots VALUES(28,286); +INSERT INTO product_slots VALUES(28,287); +INSERT INTO product_slots VALUES(29,18); +INSERT INTO product_slots VALUES(29,20); +INSERT INTO product_slots VALUES(29,21); +INSERT INTO product_slots VALUES(29,33); +INSERT INTO product_slots VALUES(29,35); +INSERT INTO product_slots VALUES(29,37); +INSERT INTO product_slots VALUES(29,38); +INSERT INTO product_slots VALUES(29,39); +INSERT INTO product_slots VALUES(29,40); +INSERT INTO product_slots VALUES(29,41); +INSERT INTO product_slots VALUES(29,43); +INSERT INTO product_slots VALUES(29,44); +INSERT INTO product_slots VALUES(29,45); +INSERT INTO product_slots VALUES(29,46); +INSERT INTO product_slots VALUES(29,47); +INSERT INTO product_slots VALUES(29,48); +INSERT INTO product_slots VALUES(29,49); +INSERT INTO product_slots VALUES(29,50); +INSERT INTO product_slots VALUES(29,51); +INSERT INTO product_slots VALUES(29,52); +INSERT INTO product_slots VALUES(29,53); +INSERT INTO product_slots VALUES(29,54); +INSERT INTO product_slots VALUES(29,55); +INSERT INTO product_slots VALUES(29,56); +INSERT INTO product_slots VALUES(29,57); +INSERT INTO product_slots VALUES(29,58); +INSERT INTO product_slots VALUES(29,59); +INSERT INTO product_slots VALUES(29,60); +INSERT INTO product_slots VALUES(29,61); +INSERT INTO product_slots VALUES(29,62); +INSERT INTO product_slots VALUES(29,63); +INSERT INTO product_slots VALUES(29,64); +INSERT INTO product_slots VALUES(29,65); +INSERT INTO product_slots VALUES(29,66); +INSERT INTO product_slots VALUES(29,67); +INSERT INTO product_slots VALUES(29,68); +INSERT INTO product_slots VALUES(29,69); +INSERT INTO product_slots VALUES(29,70); +INSERT INTO product_slots VALUES(29,71); +INSERT INTO product_slots VALUES(29,72); +INSERT INTO product_slots VALUES(29,73); +INSERT INTO product_slots VALUES(29,74); +INSERT INTO product_slots VALUES(29,75); +INSERT INTO product_slots VALUES(29,76); +INSERT INTO product_slots VALUES(29,77); +INSERT INTO product_slots VALUES(29,78); +INSERT INTO product_slots VALUES(29,79); +INSERT INTO product_slots VALUES(29,80); +INSERT INTO product_slots VALUES(29,81); +INSERT INTO product_slots VALUES(29,82); +INSERT INTO product_slots VALUES(29,83); +INSERT INTO product_slots VALUES(29,84); +INSERT INTO product_slots VALUES(29,85); +INSERT INTO product_slots VALUES(29,86); +INSERT INTO product_slots VALUES(29,87); +INSERT INTO product_slots VALUES(29,88); +INSERT INTO product_slots VALUES(29,89); +INSERT INTO product_slots VALUES(29,90); +INSERT INTO product_slots VALUES(29,91); +INSERT INTO product_slots VALUES(29,92); +INSERT INTO product_slots VALUES(29,93); +INSERT INTO product_slots VALUES(29,94); +INSERT INTO product_slots VALUES(29,95); +INSERT INTO product_slots VALUES(29,96); +INSERT INTO product_slots VALUES(29,97); +INSERT INTO product_slots VALUES(29,98); +INSERT INTO product_slots VALUES(29,99); +INSERT INTO product_slots VALUES(29,100); +INSERT INTO product_slots VALUES(29,101); +INSERT INTO product_slots VALUES(29,102); +INSERT INTO product_slots VALUES(29,103); +INSERT INTO product_slots VALUES(29,104); +INSERT INTO product_slots VALUES(29,105); +INSERT INTO product_slots VALUES(29,106); +INSERT INTO product_slots VALUES(29,107); +INSERT INTO product_slots VALUES(29,108); +INSERT INTO product_slots VALUES(29,109); +INSERT INTO product_slots VALUES(29,110); +INSERT INTO product_slots VALUES(29,111); +INSERT INTO product_slots VALUES(29,112); +INSERT INTO product_slots VALUES(29,113); +INSERT INTO product_slots VALUES(29,114); +INSERT INTO product_slots VALUES(29,115); +INSERT INTO product_slots VALUES(29,116); +INSERT INTO product_slots VALUES(29,117); +INSERT INTO product_slots VALUES(29,118); +INSERT INTO product_slots VALUES(29,119); +INSERT INTO product_slots VALUES(29,120); +INSERT INTO product_slots VALUES(29,121); +INSERT INTO product_slots VALUES(29,122); +INSERT INTO product_slots VALUES(29,123); +INSERT INTO product_slots VALUES(29,124); +INSERT INTO product_slots VALUES(29,125); +INSERT INTO product_slots VALUES(29,126); +INSERT INTO product_slots VALUES(29,127); +INSERT INTO product_slots VALUES(29,128); +INSERT INTO product_slots VALUES(29,129); +INSERT INTO product_slots VALUES(29,130); +INSERT INTO product_slots VALUES(29,131); +INSERT INTO product_slots VALUES(29,132); +INSERT INTO product_slots VALUES(29,133); +INSERT INTO product_slots VALUES(29,134); +INSERT INTO product_slots VALUES(29,135); +INSERT INTO product_slots VALUES(29,136); +INSERT INTO product_slots VALUES(29,137); +INSERT INTO product_slots VALUES(29,138); +INSERT INTO product_slots VALUES(29,139); +INSERT INTO product_slots VALUES(29,140); +INSERT INTO product_slots VALUES(29,141); +INSERT INTO product_slots VALUES(29,142); +INSERT INTO product_slots VALUES(29,143); +INSERT INTO product_slots VALUES(29,144); +INSERT INTO product_slots VALUES(29,145); +INSERT INTO product_slots VALUES(29,146); +INSERT INTO product_slots VALUES(29,147); +INSERT INTO product_slots VALUES(29,148); +INSERT INTO product_slots VALUES(29,149); +INSERT INTO product_slots VALUES(29,150); +INSERT INTO product_slots VALUES(29,151); +INSERT INTO product_slots VALUES(29,152); +INSERT INTO product_slots VALUES(29,153); +INSERT INTO product_slots VALUES(29,154); +INSERT INTO product_slots VALUES(29,155); +INSERT INTO product_slots VALUES(29,156); +INSERT INTO product_slots VALUES(29,157); +INSERT INTO product_slots VALUES(29,158); +INSERT INTO product_slots VALUES(29,159); +INSERT INTO product_slots VALUES(29,160); +INSERT INTO product_slots VALUES(29,161); +INSERT INTO product_slots VALUES(29,162); +INSERT INTO product_slots VALUES(29,163); +INSERT INTO product_slots VALUES(29,164); +INSERT INTO product_slots VALUES(29,165); +INSERT INTO product_slots VALUES(29,166); +INSERT INTO product_slots VALUES(29,167); +INSERT INTO product_slots VALUES(29,168); +INSERT INTO product_slots VALUES(29,169); +INSERT INTO product_slots VALUES(29,170); +INSERT INTO product_slots VALUES(29,171); +INSERT INTO product_slots VALUES(29,172); +INSERT INTO product_slots VALUES(29,173); +INSERT INTO product_slots VALUES(29,174); +INSERT INTO product_slots VALUES(29,175); +INSERT INTO product_slots VALUES(29,176); +INSERT INTO product_slots VALUES(29,177); +INSERT INTO product_slots VALUES(29,178); +INSERT INTO product_slots VALUES(29,179); +INSERT INTO product_slots VALUES(29,180); +INSERT INTO product_slots VALUES(29,181); +INSERT INTO product_slots VALUES(29,182); +INSERT INTO product_slots VALUES(29,183); +INSERT INTO product_slots VALUES(29,184); +INSERT INTO product_slots VALUES(29,185); +INSERT INTO product_slots VALUES(29,186); +INSERT INTO product_slots VALUES(29,187); +INSERT INTO product_slots VALUES(29,188); +INSERT INTO product_slots VALUES(29,189); +INSERT INTO product_slots VALUES(29,190); +INSERT INTO product_slots VALUES(29,191); +INSERT INTO product_slots VALUES(29,192); +INSERT INTO product_slots VALUES(29,193); +INSERT INTO product_slots VALUES(29,194); +INSERT INTO product_slots VALUES(29,195); +INSERT INTO product_slots VALUES(29,196); +INSERT INTO product_slots VALUES(29,197); +INSERT INTO product_slots VALUES(29,198); +INSERT INTO product_slots VALUES(29,199); +INSERT INTO product_slots VALUES(29,200); +INSERT INTO product_slots VALUES(29,201); +INSERT INTO product_slots VALUES(29,202); +INSERT INTO product_slots VALUES(29,203); +INSERT INTO product_slots VALUES(29,204); +INSERT INTO product_slots VALUES(29,205); +INSERT INTO product_slots VALUES(29,206); +INSERT INTO product_slots VALUES(29,207); +INSERT INTO product_slots VALUES(29,208); +INSERT INTO product_slots VALUES(29,209); +INSERT INTO product_slots VALUES(29,210); +INSERT INTO product_slots VALUES(29,211); +INSERT INTO product_slots VALUES(29,212); +INSERT INTO product_slots VALUES(29,213); +INSERT INTO product_slots VALUES(29,214); +INSERT INTO product_slots VALUES(29,215); +INSERT INTO product_slots VALUES(29,216); +INSERT INTO product_slots VALUES(29,217); +INSERT INTO product_slots VALUES(29,218); +INSERT INTO product_slots VALUES(29,219); +INSERT INTO product_slots VALUES(29,220); +INSERT INTO product_slots VALUES(29,221); +INSERT INTO product_slots VALUES(29,222); +INSERT INTO product_slots VALUES(29,223); +INSERT INTO product_slots VALUES(29,224); +INSERT INTO product_slots VALUES(29,225); +INSERT INTO product_slots VALUES(29,226); +INSERT INTO product_slots VALUES(29,227); +INSERT INTO product_slots VALUES(29,228); +INSERT INTO product_slots VALUES(29,229); +INSERT INTO product_slots VALUES(29,230); +INSERT INTO product_slots VALUES(29,231); +INSERT INTO product_slots VALUES(29,232); +INSERT INTO product_slots VALUES(29,233); +INSERT INTO product_slots VALUES(29,234); +INSERT INTO product_slots VALUES(29,235); +INSERT INTO product_slots VALUES(29,236); +INSERT INTO product_slots VALUES(29,237); +INSERT INTO product_slots VALUES(29,238); +INSERT INTO product_slots VALUES(29,239); +INSERT INTO product_slots VALUES(29,240); +INSERT INTO product_slots VALUES(29,241); +INSERT INTO product_slots VALUES(29,242); +INSERT INTO product_slots VALUES(29,243); +INSERT INTO product_slots VALUES(29,244); +INSERT INTO product_slots VALUES(29,274); +INSERT INTO product_slots VALUES(29,275); +INSERT INTO product_slots VALUES(29,279); +INSERT INTO product_slots VALUES(29,280); +INSERT INTO product_slots VALUES(29,281); +INSERT INTO product_slots VALUES(29,282); +INSERT INTO product_slots VALUES(29,283); +INSERT INTO product_slots VALUES(29,284); +INSERT INTO product_slots VALUES(29,285); +INSERT INTO product_slots VALUES(29,286); +INSERT INTO product_slots VALUES(29,287); +INSERT INTO product_slots VALUES(30,18); +INSERT INTO product_slots VALUES(30,20); +INSERT INTO product_slots VALUES(30,21); +INSERT INTO product_slots VALUES(30,33); +INSERT INTO product_slots VALUES(30,35); +INSERT INTO product_slots VALUES(30,37); +INSERT INTO product_slots VALUES(30,38); +INSERT INTO product_slots VALUES(30,39); +INSERT INTO product_slots VALUES(30,40); +INSERT INTO product_slots VALUES(30,41); +INSERT INTO product_slots VALUES(30,43); +INSERT INTO product_slots VALUES(30,44); +INSERT INTO product_slots VALUES(30,45); +INSERT INTO product_slots VALUES(30,46); +INSERT INTO product_slots VALUES(30,47); +INSERT INTO product_slots VALUES(30,48); +INSERT INTO product_slots VALUES(30,49); +INSERT INTO product_slots VALUES(30,50); +INSERT INTO product_slots VALUES(30,51); +INSERT INTO product_slots VALUES(30,52); +INSERT INTO product_slots VALUES(30,53); +INSERT INTO product_slots VALUES(30,54); +INSERT INTO product_slots VALUES(30,55); +INSERT INTO product_slots VALUES(30,56); +INSERT INTO product_slots VALUES(30,57); +INSERT INTO product_slots VALUES(30,58); +INSERT INTO product_slots VALUES(30,59); +INSERT INTO product_slots VALUES(30,60); +INSERT INTO product_slots VALUES(30,61); +INSERT INTO product_slots VALUES(30,62); +INSERT INTO product_slots VALUES(30,63); +INSERT INTO product_slots VALUES(30,64); +INSERT INTO product_slots VALUES(30,65); +INSERT INTO product_slots VALUES(30,66); +INSERT INTO product_slots VALUES(30,67); +INSERT INTO product_slots VALUES(30,68); +INSERT INTO product_slots VALUES(30,69); +INSERT INTO product_slots VALUES(30,70); +INSERT INTO product_slots VALUES(30,71); +INSERT INTO product_slots VALUES(30,72); +INSERT INTO product_slots VALUES(30,73); +INSERT INTO product_slots VALUES(30,74); +INSERT INTO product_slots VALUES(30,75); +INSERT INTO product_slots VALUES(30,76); +INSERT INTO product_slots VALUES(30,77); +INSERT INTO product_slots VALUES(30,78); +INSERT INTO product_slots VALUES(30,79); +INSERT INTO product_slots VALUES(30,80); +INSERT INTO product_slots VALUES(30,81); +INSERT INTO product_slots VALUES(30,82); +INSERT INTO product_slots VALUES(30,83); +INSERT INTO product_slots VALUES(30,84); +INSERT INTO product_slots VALUES(30,85); +INSERT INTO product_slots VALUES(30,86); +INSERT INTO product_slots VALUES(30,87); +INSERT INTO product_slots VALUES(30,88); +INSERT INTO product_slots VALUES(30,89); +INSERT INTO product_slots VALUES(30,90); +INSERT INTO product_slots VALUES(30,91); +INSERT INTO product_slots VALUES(30,92); +INSERT INTO product_slots VALUES(30,93); +INSERT INTO product_slots VALUES(30,94); +INSERT INTO product_slots VALUES(30,95); +INSERT INTO product_slots VALUES(30,96); +INSERT INTO product_slots VALUES(30,97); +INSERT INTO product_slots VALUES(30,98); +INSERT INTO product_slots VALUES(30,99); +INSERT INTO product_slots VALUES(30,100); +INSERT INTO product_slots VALUES(30,101); +INSERT INTO product_slots VALUES(30,102); +INSERT INTO product_slots VALUES(30,103); +INSERT INTO product_slots VALUES(30,104); +INSERT INTO product_slots VALUES(30,105); +INSERT INTO product_slots VALUES(30,106); +INSERT INTO product_slots VALUES(30,107); +INSERT INTO product_slots VALUES(30,108); +INSERT INTO product_slots VALUES(30,109); +INSERT INTO product_slots VALUES(30,110); +INSERT INTO product_slots VALUES(30,111); +INSERT INTO product_slots VALUES(30,112); +INSERT INTO product_slots VALUES(30,113); +INSERT INTO product_slots VALUES(30,114); +INSERT INTO product_slots VALUES(30,115); +INSERT INTO product_slots VALUES(30,116); +INSERT INTO product_slots VALUES(30,117); +INSERT INTO product_slots VALUES(30,118); +INSERT INTO product_slots VALUES(30,119); +INSERT INTO product_slots VALUES(30,120); +INSERT INTO product_slots VALUES(30,121); +INSERT INTO product_slots VALUES(30,122); +INSERT INTO product_slots VALUES(30,123); +INSERT INTO product_slots VALUES(30,124); +INSERT INTO product_slots VALUES(30,125); +INSERT INTO product_slots VALUES(30,126); +INSERT INTO product_slots VALUES(30,127); +INSERT INTO product_slots VALUES(30,128); +INSERT INTO product_slots VALUES(30,129); +INSERT INTO product_slots VALUES(30,130); +INSERT INTO product_slots VALUES(30,131); +INSERT INTO product_slots VALUES(30,132); +INSERT INTO product_slots VALUES(30,133); +INSERT INTO product_slots VALUES(30,134); +INSERT INTO product_slots VALUES(30,135); +INSERT INTO product_slots VALUES(30,136); +INSERT INTO product_slots VALUES(30,137); +INSERT INTO product_slots VALUES(30,138); +INSERT INTO product_slots VALUES(30,139); +INSERT INTO product_slots VALUES(30,140); +INSERT INTO product_slots VALUES(30,141); +INSERT INTO product_slots VALUES(30,142); +INSERT INTO product_slots VALUES(30,143); +INSERT INTO product_slots VALUES(30,144); +INSERT INTO product_slots VALUES(30,145); +INSERT INTO product_slots VALUES(30,146); +INSERT INTO product_slots VALUES(30,147); +INSERT INTO product_slots VALUES(30,148); +INSERT INTO product_slots VALUES(30,149); +INSERT INTO product_slots VALUES(30,150); +INSERT INTO product_slots VALUES(30,151); +INSERT INTO product_slots VALUES(30,152); +INSERT INTO product_slots VALUES(30,153); +INSERT INTO product_slots VALUES(30,154); +INSERT INTO product_slots VALUES(30,155); +INSERT INTO product_slots VALUES(30,156); +INSERT INTO product_slots VALUES(30,157); +INSERT INTO product_slots VALUES(30,158); +INSERT INTO product_slots VALUES(30,159); +INSERT INTO product_slots VALUES(30,160); +INSERT INTO product_slots VALUES(30,161); +INSERT INTO product_slots VALUES(30,162); +INSERT INTO product_slots VALUES(30,163); +INSERT INTO product_slots VALUES(30,164); +INSERT INTO product_slots VALUES(30,165); +INSERT INTO product_slots VALUES(30,166); +INSERT INTO product_slots VALUES(30,167); +INSERT INTO product_slots VALUES(30,168); +INSERT INTO product_slots VALUES(30,169); +INSERT INTO product_slots VALUES(30,170); +INSERT INTO product_slots VALUES(30,171); +INSERT INTO product_slots VALUES(30,172); +INSERT INTO product_slots VALUES(30,173); +INSERT INTO product_slots VALUES(30,174); +INSERT INTO product_slots VALUES(30,175); +INSERT INTO product_slots VALUES(30,176); +INSERT INTO product_slots VALUES(30,177); +INSERT INTO product_slots VALUES(30,178); +INSERT INTO product_slots VALUES(30,179); +INSERT INTO product_slots VALUES(30,180); +INSERT INTO product_slots VALUES(30,181); +INSERT INTO product_slots VALUES(30,182); +INSERT INTO product_slots VALUES(30,183); +INSERT INTO product_slots VALUES(30,184); +INSERT INTO product_slots VALUES(30,185); +INSERT INTO product_slots VALUES(30,186); +INSERT INTO product_slots VALUES(30,187); +INSERT INTO product_slots VALUES(30,188); +INSERT INTO product_slots VALUES(30,189); +INSERT INTO product_slots VALUES(30,190); +INSERT INTO product_slots VALUES(30,191); +INSERT INTO product_slots VALUES(30,192); +INSERT INTO product_slots VALUES(30,193); +INSERT INTO product_slots VALUES(30,194); +INSERT INTO product_slots VALUES(30,195); +INSERT INTO product_slots VALUES(30,196); +INSERT INTO product_slots VALUES(30,197); +INSERT INTO product_slots VALUES(30,198); +INSERT INTO product_slots VALUES(30,199); +INSERT INTO product_slots VALUES(30,200); +INSERT INTO product_slots VALUES(30,201); +INSERT INTO product_slots VALUES(30,202); +INSERT INTO product_slots VALUES(30,203); +INSERT INTO product_slots VALUES(30,204); +INSERT INTO product_slots VALUES(30,205); +INSERT INTO product_slots VALUES(30,206); +INSERT INTO product_slots VALUES(30,207); +INSERT INTO product_slots VALUES(30,208); +INSERT INTO product_slots VALUES(30,209); +INSERT INTO product_slots VALUES(30,210); +INSERT INTO product_slots VALUES(30,211); +INSERT INTO product_slots VALUES(30,212); +INSERT INTO product_slots VALUES(30,213); +INSERT INTO product_slots VALUES(30,214); +INSERT INTO product_slots VALUES(30,215); +INSERT INTO product_slots VALUES(30,216); +INSERT INTO product_slots VALUES(30,217); +INSERT INTO product_slots VALUES(30,218); +INSERT INTO product_slots VALUES(30,219); +INSERT INTO product_slots VALUES(30,220); +INSERT INTO product_slots VALUES(30,221); +INSERT INTO product_slots VALUES(30,222); +INSERT INTO product_slots VALUES(30,223); +INSERT INTO product_slots VALUES(30,224); +INSERT INTO product_slots VALUES(30,225); +INSERT INTO product_slots VALUES(30,226); +INSERT INTO product_slots VALUES(30,227); +INSERT INTO product_slots VALUES(30,228); +INSERT INTO product_slots VALUES(30,229); +INSERT INTO product_slots VALUES(30,230); +INSERT INTO product_slots VALUES(30,231); +INSERT INTO product_slots VALUES(30,232); +INSERT INTO product_slots VALUES(30,233); +INSERT INTO product_slots VALUES(30,234); +INSERT INTO product_slots VALUES(30,235); +INSERT INTO product_slots VALUES(30,236); +INSERT INTO product_slots VALUES(30,237); +INSERT INTO product_slots VALUES(30,238); +INSERT INTO product_slots VALUES(30,239); +INSERT INTO product_slots VALUES(30,240); +INSERT INTO product_slots VALUES(30,241); +INSERT INTO product_slots VALUES(30,242); +INSERT INTO product_slots VALUES(30,243); +INSERT INTO product_slots VALUES(30,244); +INSERT INTO product_slots VALUES(30,274); +INSERT INTO product_slots VALUES(30,275); +INSERT INTO product_slots VALUES(30,279); +INSERT INTO product_slots VALUES(30,280); +INSERT INTO product_slots VALUES(30,281); +INSERT INTO product_slots VALUES(30,282); +INSERT INTO product_slots VALUES(30,283); +INSERT INTO product_slots VALUES(30,284); +INSERT INTO product_slots VALUES(30,285); +INSERT INTO product_slots VALUES(30,286); +INSERT INTO product_slots VALUES(30,287); +INSERT INTO product_slots VALUES(31,18); +INSERT INTO product_slots VALUES(31,20); +INSERT INTO product_slots VALUES(31,21); +INSERT INTO product_slots VALUES(31,33); +INSERT INTO product_slots VALUES(31,35); +INSERT INTO product_slots VALUES(31,37); +INSERT INTO product_slots VALUES(31,38); +INSERT INTO product_slots VALUES(31,39); +INSERT INTO product_slots VALUES(31,40); +INSERT INTO product_slots VALUES(31,44); +INSERT INTO product_slots VALUES(31,46); +INSERT INTO product_slots VALUES(31,47); +INSERT INTO product_slots VALUES(31,48); +INSERT INTO product_slots VALUES(31,49); +INSERT INTO product_slots VALUES(31,50); +INSERT INTO product_slots VALUES(31,51); +INSERT INTO product_slots VALUES(31,52); +INSERT INTO product_slots VALUES(31,53); +INSERT INTO product_slots VALUES(31,54); +INSERT INTO product_slots VALUES(31,55); +INSERT INTO product_slots VALUES(31,56); +INSERT INTO product_slots VALUES(31,57); +INSERT INTO product_slots VALUES(31,58); +INSERT INTO product_slots VALUES(31,59); +INSERT INTO product_slots VALUES(31,60); +INSERT INTO product_slots VALUES(31,61); +INSERT INTO product_slots VALUES(31,62); +INSERT INTO product_slots VALUES(31,63); +INSERT INTO product_slots VALUES(31,64); +INSERT INTO product_slots VALUES(31,65); +INSERT INTO product_slots VALUES(31,66); +INSERT INTO product_slots VALUES(31,67); +INSERT INTO product_slots VALUES(31,68); +INSERT INTO product_slots VALUES(31,69); +INSERT INTO product_slots VALUES(31,70); +INSERT INTO product_slots VALUES(31,71); +INSERT INTO product_slots VALUES(31,72); +INSERT INTO product_slots VALUES(31,73); +INSERT INTO product_slots VALUES(31,74); +INSERT INTO product_slots VALUES(31,75); +INSERT INTO product_slots VALUES(31,76); +INSERT INTO product_slots VALUES(31,77); +INSERT INTO product_slots VALUES(31,78); +INSERT INTO product_slots VALUES(31,79); +INSERT INTO product_slots VALUES(31,80); +INSERT INTO product_slots VALUES(31,81); +INSERT INTO product_slots VALUES(31,82); +INSERT INTO product_slots VALUES(31,83); +INSERT INTO product_slots VALUES(31,84); +INSERT INTO product_slots VALUES(31,85); +INSERT INTO product_slots VALUES(31,86); +INSERT INTO product_slots VALUES(31,87); +INSERT INTO product_slots VALUES(31,88); +INSERT INTO product_slots VALUES(31,89); +INSERT INTO product_slots VALUES(31,90); +INSERT INTO product_slots VALUES(31,91); +INSERT INTO product_slots VALUES(31,92); +INSERT INTO product_slots VALUES(31,93); +INSERT INTO product_slots VALUES(31,94); +INSERT INTO product_slots VALUES(31,95); +INSERT INTO product_slots VALUES(31,96); +INSERT INTO product_slots VALUES(31,97); +INSERT INTO product_slots VALUES(31,98); +INSERT INTO product_slots VALUES(31,99); +INSERT INTO product_slots VALUES(31,100); +INSERT INTO product_slots VALUES(31,101); +INSERT INTO product_slots VALUES(31,102); +INSERT INTO product_slots VALUES(31,103); +INSERT INTO product_slots VALUES(31,104); +INSERT INTO product_slots VALUES(31,105); +INSERT INTO product_slots VALUES(31,106); +INSERT INTO product_slots VALUES(31,107); +INSERT INTO product_slots VALUES(31,108); +INSERT INTO product_slots VALUES(31,109); +INSERT INTO product_slots VALUES(31,110); +INSERT INTO product_slots VALUES(31,111); +INSERT INTO product_slots VALUES(31,112); +INSERT INTO product_slots VALUES(31,113); +INSERT INTO product_slots VALUES(31,114); +INSERT INTO product_slots VALUES(31,115); +INSERT INTO product_slots VALUES(31,116); +INSERT INTO product_slots VALUES(31,117); +INSERT INTO product_slots VALUES(31,118); +INSERT INTO product_slots VALUES(31,119); +INSERT INTO product_slots VALUES(31,120); +INSERT INTO product_slots VALUES(31,121); +INSERT INTO product_slots VALUES(31,122); +INSERT INTO product_slots VALUES(31,123); +INSERT INTO product_slots VALUES(31,124); +INSERT INTO product_slots VALUES(31,125); +INSERT INTO product_slots VALUES(31,126); +INSERT INTO product_slots VALUES(31,127); +INSERT INTO product_slots VALUES(31,128); +INSERT INTO product_slots VALUES(31,129); +INSERT INTO product_slots VALUES(31,130); +INSERT INTO product_slots VALUES(31,131); +INSERT INTO product_slots VALUES(31,132); +INSERT INTO product_slots VALUES(31,133); +INSERT INTO product_slots VALUES(31,134); +INSERT INTO product_slots VALUES(31,135); +INSERT INTO product_slots VALUES(31,136); +INSERT INTO product_slots VALUES(31,137); +INSERT INTO product_slots VALUES(31,138); +INSERT INTO product_slots VALUES(31,139); +INSERT INTO product_slots VALUES(31,140); +INSERT INTO product_slots VALUES(31,141); +INSERT INTO product_slots VALUES(31,142); +INSERT INTO product_slots VALUES(31,143); +INSERT INTO product_slots VALUES(31,144); +INSERT INTO product_slots VALUES(31,145); +INSERT INTO product_slots VALUES(31,146); +INSERT INTO product_slots VALUES(31,147); +INSERT INTO product_slots VALUES(31,148); +INSERT INTO product_slots VALUES(31,149); +INSERT INTO product_slots VALUES(31,150); +INSERT INTO product_slots VALUES(31,151); +INSERT INTO product_slots VALUES(31,152); +INSERT INTO product_slots VALUES(31,153); +INSERT INTO product_slots VALUES(31,154); +INSERT INTO product_slots VALUES(31,155); +INSERT INTO product_slots VALUES(31,156); +INSERT INTO product_slots VALUES(31,157); +INSERT INTO product_slots VALUES(31,158); +INSERT INTO product_slots VALUES(31,159); +INSERT INTO product_slots VALUES(31,160); +INSERT INTO product_slots VALUES(31,161); +INSERT INTO product_slots VALUES(31,162); +INSERT INTO product_slots VALUES(31,163); +INSERT INTO product_slots VALUES(31,164); +INSERT INTO product_slots VALUES(31,165); +INSERT INTO product_slots VALUES(31,166); +INSERT INTO product_slots VALUES(31,167); +INSERT INTO product_slots VALUES(31,168); +INSERT INTO product_slots VALUES(31,169); +INSERT INTO product_slots VALUES(31,170); +INSERT INTO product_slots VALUES(31,171); +INSERT INTO product_slots VALUES(31,172); +INSERT INTO product_slots VALUES(31,173); +INSERT INTO product_slots VALUES(31,174); +INSERT INTO product_slots VALUES(31,175); +INSERT INTO product_slots VALUES(31,176); +INSERT INTO product_slots VALUES(31,177); +INSERT INTO product_slots VALUES(31,178); +INSERT INTO product_slots VALUES(31,179); +INSERT INTO product_slots VALUES(31,180); +INSERT INTO product_slots VALUES(31,181); +INSERT INTO product_slots VALUES(31,182); +INSERT INTO product_slots VALUES(31,183); +INSERT INTO product_slots VALUES(31,184); +INSERT INTO product_slots VALUES(31,185); +INSERT INTO product_slots VALUES(31,186); +INSERT INTO product_slots VALUES(31,187); +INSERT INTO product_slots VALUES(31,188); +INSERT INTO product_slots VALUES(31,189); +INSERT INTO product_slots VALUES(31,190); +INSERT INTO product_slots VALUES(31,191); +INSERT INTO product_slots VALUES(31,192); +INSERT INTO product_slots VALUES(31,193); +INSERT INTO product_slots VALUES(31,194); +INSERT INTO product_slots VALUES(31,195); +INSERT INTO product_slots VALUES(31,196); +INSERT INTO product_slots VALUES(31,197); +INSERT INTO product_slots VALUES(31,198); +INSERT INTO product_slots VALUES(31,199); +INSERT INTO product_slots VALUES(31,200); +INSERT INTO product_slots VALUES(31,201); +INSERT INTO product_slots VALUES(31,202); +INSERT INTO product_slots VALUES(31,203); +INSERT INTO product_slots VALUES(31,204); +INSERT INTO product_slots VALUES(31,205); +INSERT INTO product_slots VALUES(31,206); +INSERT INTO product_slots VALUES(31,207); +INSERT INTO product_slots VALUES(31,208); +INSERT INTO product_slots VALUES(31,209); +INSERT INTO product_slots VALUES(31,210); +INSERT INTO product_slots VALUES(31,211); +INSERT INTO product_slots VALUES(31,212); +INSERT INTO product_slots VALUES(31,213); +INSERT INTO product_slots VALUES(31,214); +INSERT INTO product_slots VALUES(31,215); +INSERT INTO product_slots VALUES(31,216); +INSERT INTO product_slots VALUES(31,217); +INSERT INTO product_slots VALUES(31,218); +INSERT INTO product_slots VALUES(31,219); +INSERT INTO product_slots VALUES(31,220); +INSERT INTO product_slots VALUES(31,221); +INSERT INTO product_slots VALUES(31,222); +INSERT INTO product_slots VALUES(31,223); +INSERT INTO product_slots VALUES(31,224); +INSERT INTO product_slots VALUES(31,225); +INSERT INTO product_slots VALUES(31,226); +INSERT INTO product_slots VALUES(31,227); +INSERT INTO product_slots VALUES(31,228); +INSERT INTO product_slots VALUES(31,229); +INSERT INTO product_slots VALUES(31,230); +INSERT INTO product_slots VALUES(31,231); +INSERT INTO product_slots VALUES(31,232); +INSERT INTO product_slots VALUES(31,233); +INSERT INTO product_slots VALUES(31,234); +INSERT INTO product_slots VALUES(31,235); +INSERT INTO product_slots VALUES(31,236); +INSERT INTO product_slots VALUES(31,237); +INSERT INTO product_slots VALUES(31,238); +INSERT INTO product_slots VALUES(31,239); +INSERT INTO product_slots VALUES(31,240); +INSERT INTO product_slots VALUES(31,241); +INSERT INTO product_slots VALUES(31,242); +INSERT INTO product_slots VALUES(31,243); +INSERT INTO product_slots VALUES(31,244); +INSERT INTO product_slots VALUES(31,274); +INSERT INTO product_slots VALUES(31,275); +INSERT INTO product_slots VALUES(31,279); +INSERT INTO product_slots VALUES(31,280); +INSERT INTO product_slots VALUES(31,281); +INSERT INTO product_slots VALUES(31,282); +INSERT INTO product_slots VALUES(31,283); +INSERT INTO product_slots VALUES(31,284); +INSERT INTO product_slots VALUES(31,285); +INSERT INTO product_slots VALUES(31,286); +INSERT INTO product_slots VALUES(31,287); +INSERT INTO product_slots VALUES(32,18); +INSERT INTO product_slots VALUES(32,20); +INSERT INTO product_slots VALUES(32,21); +INSERT INTO product_slots VALUES(32,33); +INSERT INTO product_slots VALUES(32,35); +INSERT INTO product_slots VALUES(32,37); +INSERT INTO product_slots VALUES(32,38); +INSERT INTO product_slots VALUES(32,39); +INSERT INTO product_slots VALUES(32,40); +INSERT INTO product_slots VALUES(32,41); +INSERT INTO product_slots VALUES(32,43); +INSERT INTO product_slots VALUES(32,44); +INSERT INTO product_slots VALUES(32,45); +INSERT INTO product_slots VALUES(32,46); +INSERT INTO product_slots VALUES(32,47); +INSERT INTO product_slots VALUES(32,48); +INSERT INTO product_slots VALUES(32,49); +INSERT INTO product_slots VALUES(32,50); +INSERT INTO product_slots VALUES(32,51); +INSERT INTO product_slots VALUES(32,52); +INSERT INTO product_slots VALUES(32,53); +INSERT INTO product_slots VALUES(32,54); +INSERT INTO product_slots VALUES(32,55); +INSERT INTO product_slots VALUES(32,56); +INSERT INTO product_slots VALUES(32,57); +INSERT INTO product_slots VALUES(32,58); +INSERT INTO product_slots VALUES(32,59); +INSERT INTO product_slots VALUES(32,60); +INSERT INTO product_slots VALUES(32,61); +INSERT INTO product_slots VALUES(32,62); +INSERT INTO product_slots VALUES(32,63); +INSERT INTO product_slots VALUES(32,64); +INSERT INTO product_slots VALUES(32,65); +INSERT INTO product_slots VALUES(32,66); +INSERT INTO product_slots VALUES(32,67); +INSERT INTO product_slots VALUES(32,68); +INSERT INTO product_slots VALUES(32,69); +INSERT INTO product_slots VALUES(32,70); +INSERT INTO product_slots VALUES(32,71); +INSERT INTO product_slots VALUES(32,72); +INSERT INTO product_slots VALUES(32,73); +INSERT INTO product_slots VALUES(32,74); +INSERT INTO product_slots VALUES(32,75); +INSERT INTO product_slots VALUES(32,76); +INSERT INTO product_slots VALUES(32,77); +INSERT INTO product_slots VALUES(32,78); +INSERT INTO product_slots VALUES(32,79); +INSERT INTO product_slots VALUES(32,80); +INSERT INTO product_slots VALUES(32,81); +INSERT INTO product_slots VALUES(32,82); +INSERT INTO product_slots VALUES(32,83); +INSERT INTO product_slots VALUES(32,84); +INSERT INTO product_slots VALUES(32,85); +INSERT INTO product_slots VALUES(32,86); +INSERT INTO product_slots VALUES(32,87); +INSERT INTO product_slots VALUES(32,88); +INSERT INTO product_slots VALUES(32,89); +INSERT INTO product_slots VALUES(32,90); +INSERT INTO product_slots VALUES(32,91); +INSERT INTO product_slots VALUES(32,92); +INSERT INTO product_slots VALUES(32,93); +INSERT INTO product_slots VALUES(32,94); +INSERT INTO product_slots VALUES(32,95); +INSERT INTO product_slots VALUES(32,96); +INSERT INTO product_slots VALUES(32,97); +INSERT INTO product_slots VALUES(32,98); +INSERT INTO product_slots VALUES(32,99); +INSERT INTO product_slots VALUES(32,100); +INSERT INTO product_slots VALUES(32,101); +INSERT INTO product_slots VALUES(32,102); +INSERT INTO product_slots VALUES(32,103); +INSERT INTO product_slots VALUES(32,104); +INSERT INTO product_slots VALUES(32,105); +INSERT INTO product_slots VALUES(32,106); +INSERT INTO product_slots VALUES(32,107); +INSERT INTO product_slots VALUES(32,108); +INSERT INTO product_slots VALUES(32,109); +INSERT INTO product_slots VALUES(32,110); +INSERT INTO product_slots VALUES(32,111); +INSERT INTO product_slots VALUES(32,112); +INSERT INTO product_slots VALUES(32,113); +INSERT INTO product_slots VALUES(32,114); +INSERT INTO product_slots VALUES(32,115); +INSERT INTO product_slots VALUES(32,116); +INSERT INTO product_slots VALUES(32,117); +INSERT INTO product_slots VALUES(32,118); +INSERT INTO product_slots VALUES(32,119); +INSERT INTO product_slots VALUES(32,120); +INSERT INTO product_slots VALUES(32,121); +INSERT INTO product_slots VALUES(32,122); +INSERT INTO product_slots VALUES(32,123); +INSERT INTO product_slots VALUES(32,124); +INSERT INTO product_slots VALUES(32,125); +INSERT INTO product_slots VALUES(32,126); +INSERT INTO product_slots VALUES(32,127); +INSERT INTO product_slots VALUES(32,128); +INSERT INTO product_slots VALUES(32,129); +INSERT INTO product_slots VALUES(32,130); +INSERT INTO product_slots VALUES(32,131); +INSERT INTO product_slots VALUES(32,132); +INSERT INTO product_slots VALUES(32,133); +INSERT INTO product_slots VALUES(32,134); +INSERT INTO product_slots VALUES(32,135); +INSERT INTO product_slots VALUES(32,136); +INSERT INTO product_slots VALUES(32,137); +INSERT INTO product_slots VALUES(32,138); +INSERT INTO product_slots VALUES(32,139); +INSERT INTO product_slots VALUES(32,140); +INSERT INTO product_slots VALUES(32,141); +INSERT INTO product_slots VALUES(32,142); +INSERT INTO product_slots VALUES(32,143); +INSERT INTO product_slots VALUES(32,144); +INSERT INTO product_slots VALUES(32,145); +INSERT INTO product_slots VALUES(32,146); +INSERT INTO product_slots VALUES(32,147); +INSERT INTO product_slots VALUES(32,148); +INSERT INTO product_slots VALUES(32,149); +INSERT INTO product_slots VALUES(32,150); +INSERT INTO product_slots VALUES(32,151); +INSERT INTO product_slots VALUES(32,152); +INSERT INTO product_slots VALUES(32,153); +INSERT INTO product_slots VALUES(32,154); +INSERT INTO product_slots VALUES(32,155); +INSERT INTO product_slots VALUES(32,156); +INSERT INTO product_slots VALUES(32,157); +INSERT INTO product_slots VALUES(32,158); +INSERT INTO product_slots VALUES(32,159); +INSERT INTO product_slots VALUES(32,160); +INSERT INTO product_slots VALUES(32,161); +INSERT INTO product_slots VALUES(32,162); +INSERT INTO product_slots VALUES(32,163); +INSERT INTO product_slots VALUES(32,164); +INSERT INTO product_slots VALUES(32,165); +INSERT INTO product_slots VALUES(32,166); +INSERT INTO product_slots VALUES(32,167); +INSERT INTO product_slots VALUES(32,168); +INSERT INTO product_slots VALUES(32,169); +INSERT INTO product_slots VALUES(32,170); +INSERT INTO product_slots VALUES(32,171); +INSERT INTO product_slots VALUES(32,172); +INSERT INTO product_slots VALUES(32,173); +INSERT INTO product_slots VALUES(32,174); +INSERT INTO product_slots VALUES(32,175); +INSERT INTO product_slots VALUES(32,176); +INSERT INTO product_slots VALUES(32,177); +INSERT INTO product_slots VALUES(32,178); +INSERT INTO product_slots VALUES(32,179); +INSERT INTO product_slots VALUES(32,180); +INSERT INTO product_slots VALUES(32,181); +INSERT INTO product_slots VALUES(32,182); +INSERT INTO product_slots VALUES(32,183); +INSERT INTO product_slots VALUES(32,184); +INSERT INTO product_slots VALUES(32,185); +INSERT INTO product_slots VALUES(32,186); +INSERT INTO product_slots VALUES(32,187); +INSERT INTO product_slots VALUES(32,188); +INSERT INTO product_slots VALUES(32,189); +INSERT INTO product_slots VALUES(32,190); +INSERT INTO product_slots VALUES(32,191); +INSERT INTO product_slots VALUES(32,192); +INSERT INTO product_slots VALUES(32,193); +INSERT INTO product_slots VALUES(32,194); +INSERT INTO product_slots VALUES(32,195); +INSERT INTO product_slots VALUES(32,196); +INSERT INTO product_slots VALUES(32,197); +INSERT INTO product_slots VALUES(32,198); +INSERT INTO product_slots VALUES(32,199); +INSERT INTO product_slots VALUES(32,200); +INSERT INTO product_slots VALUES(32,201); +INSERT INTO product_slots VALUES(32,202); +INSERT INTO product_slots VALUES(32,203); +INSERT INTO product_slots VALUES(32,204); +INSERT INTO product_slots VALUES(32,205); +INSERT INTO product_slots VALUES(32,206); +INSERT INTO product_slots VALUES(32,207); +INSERT INTO product_slots VALUES(32,208); +INSERT INTO product_slots VALUES(32,209); +INSERT INTO product_slots VALUES(32,210); +INSERT INTO product_slots VALUES(32,211); +INSERT INTO product_slots VALUES(32,212); +INSERT INTO product_slots VALUES(32,213); +INSERT INTO product_slots VALUES(32,214); +INSERT INTO product_slots VALUES(32,215); +INSERT INTO product_slots VALUES(32,216); +INSERT INTO product_slots VALUES(32,217); +INSERT INTO product_slots VALUES(32,218); +INSERT INTO product_slots VALUES(32,219); +INSERT INTO product_slots VALUES(32,220); +INSERT INTO product_slots VALUES(32,221); +INSERT INTO product_slots VALUES(32,222); +INSERT INTO product_slots VALUES(32,223); +INSERT INTO product_slots VALUES(32,224); +INSERT INTO product_slots VALUES(32,225); +INSERT INTO product_slots VALUES(32,226); +INSERT INTO product_slots VALUES(32,227); +INSERT INTO product_slots VALUES(32,228); +INSERT INTO product_slots VALUES(32,229); +INSERT INTO product_slots VALUES(32,230); +INSERT INTO product_slots VALUES(32,231); +INSERT INTO product_slots VALUES(32,232); +INSERT INTO product_slots VALUES(32,233); +INSERT INTO product_slots VALUES(32,234); +INSERT INTO product_slots VALUES(32,235); +INSERT INTO product_slots VALUES(32,236); +INSERT INTO product_slots VALUES(32,237); +INSERT INTO product_slots VALUES(32,238); +INSERT INTO product_slots VALUES(32,239); +INSERT INTO product_slots VALUES(32,240); +INSERT INTO product_slots VALUES(32,241); +INSERT INTO product_slots VALUES(32,242); +INSERT INTO product_slots VALUES(32,243); +INSERT INTO product_slots VALUES(32,244); +INSERT INTO product_slots VALUES(32,274); +INSERT INTO product_slots VALUES(32,275); +INSERT INTO product_slots VALUES(32,279); +INSERT INTO product_slots VALUES(32,280); +INSERT INTO product_slots VALUES(32,281); +INSERT INTO product_slots VALUES(32,282); +INSERT INTO product_slots VALUES(32,283); +INSERT INTO product_slots VALUES(32,284); +INSERT INTO product_slots VALUES(32,285); +INSERT INTO product_slots VALUES(32,286); +INSERT INTO product_slots VALUES(32,287); +INSERT INTO product_slots VALUES(33,18); +INSERT INTO product_slots VALUES(33,20); +INSERT INTO product_slots VALUES(33,21); +INSERT INTO product_slots VALUES(33,33); +INSERT INTO product_slots VALUES(33,35); +INSERT INTO product_slots VALUES(33,37); +INSERT INTO product_slots VALUES(33,38); +INSERT INTO product_slots VALUES(33,39); +INSERT INTO product_slots VALUES(33,40); +INSERT INTO product_slots VALUES(33,44); +INSERT INTO product_slots VALUES(33,46); +INSERT INTO product_slots VALUES(33,47); +INSERT INTO product_slots VALUES(33,48); +INSERT INTO product_slots VALUES(33,49); +INSERT INTO product_slots VALUES(33,50); +INSERT INTO product_slots VALUES(33,51); +INSERT INTO product_slots VALUES(33,52); +INSERT INTO product_slots VALUES(33,53); +INSERT INTO product_slots VALUES(33,54); +INSERT INTO product_slots VALUES(33,55); +INSERT INTO product_slots VALUES(33,56); +INSERT INTO product_slots VALUES(33,57); +INSERT INTO product_slots VALUES(33,58); +INSERT INTO product_slots VALUES(33,59); +INSERT INTO product_slots VALUES(33,60); +INSERT INTO product_slots VALUES(33,61); +INSERT INTO product_slots VALUES(33,62); +INSERT INTO product_slots VALUES(33,63); +INSERT INTO product_slots VALUES(33,64); +INSERT INTO product_slots VALUES(33,65); +INSERT INTO product_slots VALUES(33,66); +INSERT INTO product_slots VALUES(33,67); +INSERT INTO product_slots VALUES(33,68); +INSERT INTO product_slots VALUES(33,69); +INSERT INTO product_slots VALUES(33,70); +INSERT INTO product_slots VALUES(33,71); +INSERT INTO product_slots VALUES(33,72); +INSERT INTO product_slots VALUES(33,73); +INSERT INTO product_slots VALUES(33,74); +INSERT INTO product_slots VALUES(33,75); +INSERT INTO product_slots VALUES(33,76); +INSERT INTO product_slots VALUES(33,77); +INSERT INTO product_slots VALUES(33,78); +INSERT INTO product_slots VALUES(33,79); +INSERT INTO product_slots VALUES(33,80); +INSERT INTO product_slots VALUES(33,81); +INSERT INTO product_slots VALUES(33,82); +INSERT INTO product_slots VALUES(33,83); +INSERT INTO product_slots VALUES(33,84); +INSERT INTO product_slots VALUES(33,85); +INSERT INTO product_slots VALUES(33,86); +INSERT INTO product_slots VALUES(33,87); +INSERT INTO product_slots VALUES(33,88); +INSERT INTO product_slots VALUES(33,89); +INSERT INTO product_slots VALUES(33,90); +INSERT INTO product_slots VALUES(33,91); +INSERT INTO product_slots VALUES(33,92); +INSERT INTO product_slots VALUES(33,93); +INSERT INTO product_slots VALUES(33,94); +INSERT INTO product_slots VALUES(33,95); +INSERT INTO product_slots VALUES(33,96); +INSERT INTO product_slots VALUES(33,97); +INSERT INTO product_slots VALUES(33,98); +INSERT INTO product_slots VALUES(33,99); +INSERT INTO product_slots VALUES(33,100); +INSERT INTO product_slots VALUES(33,101); +INSERT INTO product_slots VALUES(33,102); +INSERT INTO product_slots VALUES(33,103); +INSERT INTO product_slots VALUES(33,104); +INSERT INTO product_slots VALUES(33,105); +INSERT INTO product_slots VALUES(33,106); +INSERT INTO product_slots VALUES(33,107); +INSERT INTO product_slots VALUES(33,108); +INSERT INTO product_slots VALUES(33,109); +INSERT INTO product_slots VALUES(33,110); +INSERT INTO product_slots VALUES(33,111); +INSERT INTO product_slots VALUES(33,112); +INSERT INTO product_slots VALUES(33,113); +INSERT INTO product_slots VALUES(33,114); +INSERT INTO product_slots VALUES(33,115); +INSERT INTO product_slots VALUES(33,116); +INSERT INTO product_slots VALUES(33,117); +INSERT INTO product_slots VALUES(33,118); +INSERT INTO product_slots VALUES(33,119); +INSERT INTO product_slots VALUES(33,120); +INSERT INTO product_slots VALUES(33,121); +INSERT INTO product_slots VALUES(33,122); +INSERT INTO product_slots VALUES(33,123); +INSERT INTO product_slots VALUES(33,124); +INSERT INTO product_slots VALUES(33,125); +INSERT INTO product_slots VALUES(33,126); +INSERT INTO product_slots VALUES(33,127); +INSERT INTO product_slots VALUES(33,128); +INSERT INTO product_slots VALUES(33,129); +INSERT INTO product_slots VALUES(33,130); +INSERT INTO product_slots VALUES(33,131); +INSERT INTO product_slots VALUES(33,132); +INSERT INTO product_slots VALUES(33,133); +INSERT INTO product_slots VALUES(33,134); +INSERT INTO product_slots VALUES(33,135); +INSERT INTO product_slots VALUES(33,136); +INSERT INTO product_slots VALUES(33,137); +INSERT INTO product_slots VALUES(33,138); +INSERT INTO product_slots VALUES(33,139); +INSERT INTO product_slots VALUES(33,140); +INSERT INTO product_slots VALUES(33,141); +INSERT INTO product_slots VALUES(33,142); +INSERT INTO product_slots VALUES(33,143); +INSERT INTO product_slots VALUES(33,144); +INSERT INTO product_slots VALUES(33,145); +INSERT INTO product_slots VALUES(33,146); +INSERT INTO product_slots VALUES(33,147); +INSERT INTO product_slots VALUES(33,148); +INSERT INTO product_slots VALUES(33,149); +INSERT INTO product_slots VALUES(33,150); +INSERT INTO product_slots VALUES(33,151); +INSERT INTO product_slots VALUES(33,152); +INSERT INTO product_slots VALUES(33,153); +INSERT INTO product_slots VALUES(33,154); +INSERT INTO product_slots VALUES(33,155); +INSERT INTO product_slots VALUES(33,156); +INSERT INTO product_slots VALUES(33,157); +INSERT INTO product_slots VALUES(33,158); +INSERT INTO product_slots VALUES(33,159); +INSERT INTO product_slots VALUES(33,160); +INSERT INTO product_slots VALUES(33,161); +INSERT INTO product_slots VALUES(33,162); +INSERT INTO product_slots VALUES(33,163); +INSERT INTO product_slots VALUES(33,164); +INSERT INTO product_slots VALUES(33,165); +INSERT INTO product_slots VALUES(33,166); +INSERT INTO product_slots VALUES(33,167); +INSERT INTO product_slots VALUES(33,168); +INSERT INTO product_slots VALUES(33,169); +INSERT INTO product_slots VALUES(33,170); +INSERT INTO product_slots VALUES(33,171); +INSERT INTO product_slots VALUES(33,172); +INSERT INTO product_slots VALUES(33,173); +INSERT INTO product_slots VALUES(33,174); +INSERT INTO product_slots VALUES(33,175); +INSERT INTO product_slots VALUES(33,176); +INSERT INTO product_slots VALUES(33,177); +INSERT INTO product_slots VALUES(33,178); +INSERT INTO product_slots VALUES(33,179); +INSERT INTO product_slots VALUES(33,180); +INSERT INTO product_slots VALUES(33,181); +INSERT INTO product_slots VALUES(33,182); +INSERT INTO product_slots VALUES(33,183); +INSERT INTO product_slots VALUES(33,184); +INSERT INTO product_slots VALUES(33,185); +INSERT INTO product_slots VALUES(33,186); +INSERT INTO product_slots VALUES(33,187); +INSERT INTO product_slots VALUES(33,188); +INSERT INTO product_slots VALUES(33,189); +INSERT INTO product_slots VALUES(33,190); +INSERT INTO product_slots VALUES(33,191); +INSERT INTO product_slots VALUES(33,192); +INSERT INTO product_slots VALUES(33,193); +INSERT INTO product_slots VALUES(33,194); +INSERT INTO product_slots VALUES(33,195); +INSERT INTO product_slots VALUES(33,196); +INSERT INTO product_slots VALUES(33,197); +INSERT INTO product_slots VALUES(33,198); +INSERT INTO product_slots VALUES(33,199); +INSERT INTO product_slots VALUES(33,200); +INSERT INTO product_slots VALUES(33,201); +INSERT INTO product_slots VALUES(33,202); +INSERT INTO product_slots VALUES(33,203); +INSERT INTO product_slots VALUES(33,204); +INSERT INTO product_slots VALUES(33,205); +INSERT INTO product_slots VALUES(33,206); +INSERT INTO product_slots VALUES(33,207); +INSERT INTO product_slots VALUES(33,208); +INSERT INTO product_slots VALUES(33,209); +INSERT INTO product_slots VALUES(33,210); +INSERT INTO product_slots VALUES(33,211); +INSERT INTO product_slots VALUES(33,212); +INSERT INTO product_slots VALUES(33,213); +INSERT INTO product_slots VALUES(33,214); +INSERT INTO product_slots VALUES(33,215); +INSERT INTO product_slots VALUES(33,216); +INSERT INTO product_slots VALUES(33,217); +INSERT INTO product_slots VALUES(33,218); +INSERT INTO product_slots VALUES(33,219); +INSERT INTO product_slots VALUES(33,220); +INSERT INTO product_slots VALUES(33,221); +INSERT INTO product_slots VALUES(33,222); +INSERT INTO product_slots VALUES(33,223); +INSERT INTO product_slots VALUES(33,224); +INSERT INTO product_slots VALUES(33,225); +INSERT INTO product_slots VALUES(33,226); +INSERT INTO product_slots VALUES(33,227); +INSERT INTO product_slots VALUES(33,228); +INSERT INTO product_slots VALUES(33,229); +INSERT INTO product_slots VALUES(33,230); +INSERT INTO product_slots VALUES(33,231); +INSERT INTO product_slots VALUES(33,232); +INSERT INTO product_slots VALUES(33,233); +INSERT INTO product_slots VALUES(33,234); +INSERT INTO product_slots VALUES(33,235); +INSERT INTO product_slots VALUES(33,236); +INSERT INTO product_slots VALUES(33,237); +INSERT INTO product_slots VALUES(33,238); +INSERT INTO product_slots VALUES(33,239); +INSERT INTO product_slots VALUES(33,240); +INSERT INTO product_slots VALUES(33,241); +INSERT INTO product_slots VALUES(33,242); +INSERT INTO product_slots VALUES(33,243); +INSERT INTO product_slots VALUES(33,244); +INSERT INTO product_slots VALUES(33,274); +INSERT INTO product_slots VALUES(33,275); +INSERT INTO product_slots VALUES(33,279); +INSERT INTO product_slots VALUES(33,280); +INSERT INTO product_slots VALUES(33,281); +INSERT INTO product_slots VALUES(33,282); +INSERT INTO product_slots VALUES(33,283); +INSERT INTO product_slots VALUES(33,284); +INSERT INTO product_slots VALUES(33,285); +INSERT INTO product_slots VALUES(33,286); +INSERT INTO product_slots VALUES(33,287); +INSERT INTO product_slots VALUES(34,18); +INSERT INTO product_slots VALUES(34,20); +INSERT INTO product_slots VALUES(34,21); +INSERT INTO product_slots VALUES(34,33); +INSERT INTO product_slots VALUES(34,35); +INSERT INTO product_slots VALUES(34,37); +INSERT INTO product_slots VALUES(34,38); +INSERT INTO product_slots VALUES(34,40); +INSERT INTO product_slots VALUES(34,82); +INSERT INTO product_slots VALUES(34,87); +INSERT INTO product_slots VALUES(34,279); +INSERT INTO product_slots VALUES(35,18); +INSERT INTO product_slots VALUES(35,19); +INSERT INTO product_slots VALUES(35,20); +INSERT INTO product_slots VALUES(35,21); +INSERT INTO product_slots VALUES(35,22); +INSERT INTO product_slots VALUES(35,33); +INSERT INTO product_slots VALUES(35,35); +INSERT INTO product_slots VALUES(35,37); +INSERT INTO product_slots VALUES(35,38); +INSERT INTO product_slots VALUES(35,39); +INSERT INTO product_slots VALUES(35,40); +INSERT INTO product_slots VALUES(35,41); +INSERT INTO product_slots VALUES(35,43); +INSERT INTO product_slots VALUES(35,45); +INSERT INTO product_slots VALUES(35,46); +INSERT INTO product_slots VALUES(35,47); +INSERT INTO product_slots VALUES(35,48); +INSERT INTO product_slots VALUES(35,49); +INSERT INTO product_slots VALUES(35,50); +INSERT INTO product_slots VALUES(35,51); +INSERT INTO product_slots VALUES(35,52); +INSERT INTO product_slots VALUES(35,53); +INSERT INTO product_slots VALUES(35,54); +INSERT INTO product_slots VALUES(35,55); +INSERT INTO product_slots VALUES(35,56); +INSERT INTO product_slots VALUES(35,57); +INSERT INTO product_slots VALUES(35,58); +INSERT INTO product_slots VALUES(35,59); +INSERT INTO product_slots VALUES(35,60); +INSERT INTO product_slots VALUES(35,61); +INSERT INTO product_slots VALUES(35,62); +INSERT INTO product_slots VALUES(35,63); +INSERT INTO product_slots VALUES(35,64); +INSERT INTO product_slots VALUES(35,65); +INSERT INTO product_slots VALUES(35,66); +INSERT INTO product_slots VALUES(35,67); +INSERT INTO product_slots VALUES(35,68); +INSERT INTO product_slots VALUES(35,69); +INSERT INTO product_slots VALUES(35,70); +INSERT INTO product_slots VALUES(35,71); +INSERT INTO product_slots VALUES(35,74); +INSERT INTO product_slots VALUES(35,75); +INSERT INTO product_slots VALUES(35,76); +INSERT INTO product_slots VALUES(35,77); +INSERT INTO product_slots VALUES(35,78); +INSERT INTO product_slots VALUES(35,81); +INSERT INTO product_slots VALUES(35,82); +INSERT INTO product_slots VALUES(35,83); +INSERT INTO product_slots VALUES(35,84); +INSERT INTO product_slots VALUES(35,87); +INSERT INTO product_slots VALUES(35,88); +INSERT INTO product_slots VALUES(35,89); +INSERT INTO product_slots VALUES(35,90); +INSERT INTO product_slots VALUES(35,91); +INSERT INTO product_slots VALUES(35,95); +INSERT INTO product_slots VALUES(35,96); +INSERT INTO product_slots VALUES(35,97); +INSERT INTO product_slots VALUES(35,98); +INSERT INTO product_slots VALUES(35,101); +INSERT INTO product_slots VALUES(35,102); +INSERT INTO product_slots VALUES(35,103); +INSERT INTO product_slots VALUES(35,104); +INSERT INTO product_slots VALUES(35,109); +INSERT INTO product_slots VALUES(35,110); +INSERT INTO product_slots VALUES(35,111); +INSERT INTO product_slots VALUES(35,112); +INSERT INTO product_slots VALUES(35,116); +INSERT INTO product_slots VALUES(35,117); +INSERT INTO product_slots VALUES(35,118); +INSERT INTO product_slots VALUES(35,119); +INSERT INTO product_slots VALUES(35,120); +INSERT INTO product_slots VALUES(35,123); +INSERT INTO product_slots VALUES(35,124); +INSERT INTO product_slots VALUES(35,125); +INSERT INTO product_slots VALUES(35,126); +INSERT INTO product_slots VALUES(35,130); +INSERT INTO product_slots VALUES(35,131); +INSERT INTO product_slots VALUES(35,132); +INSERT INTO product_slots VALUES(35,133); +INSERT INTO product_slots VALUES(35,137); +INSERT INTO product_slots VALUES(35,138); +INSERT INTO product_slots VALUES(35,139); +INSERT INTO product_slots VALUES(35,140); +INSERT INTO product_slots VALUES(35,144); +INSERT INTO product_slots VALUES(35,145); +INSERT INTO product_slots VALUES(35,146); +INSERT INTO product_slots VALUES(35,147); +INSERT INTO product_slots VALUES(35,148); +INSERT INTO product_slots VALUES(35,149); +INSERT INTO product_slots VALUES(35,150); +INSERT INTO product_slots VALUES(35,151); +INSERT INTO product_slots VALUES(35,155); +INSERT INTO product_slots VALUES(35,156); +INSERT INTO product_slots VALUES(35,157); +INSERT INTO product_slots VALUES(35,158); +INSERT INTO product_slots VALUES(35,162); +INSERT INTO product_slots VALUES(35,163); +INSERT INTO product_slots VALUES(35,164); +INSERT INTO product_slots VALUES(35,165); +INSERT INTO product_slots VALUES(35,166); +INSERT INTO product_slots VALUES(35,169); +INSERT INTO product_slots VALUES(35,170); +INSERT INTO product_slots VALUES(35,171); +INSERT INTO product_slots VALUES(35,172); +INSERT INTO product_slots VALUES(35,176); +INSERT INTO product_slots VALUES(35,177); +INSERT INTO product_slots VALUES(35,178); +INSERT INTO product_slots VALUES(35,179); +INSERT INTO product_slots VALUES(35,183); +INSERT INTO product_slots VALUES(35,184); +INSERT INTO product_slots VALUES(35,185); +INSERT INTO product_slots VALUES(35,186); +INSERT INTO product_slots VALUES(35,187); +INSERT INTO product_slots VALUES(35,188); +INSERT INTO product_slots VALUES(35,189); +INSERT INTO product_slots VALUES(35,190); +INSERT INTO product_slots VALUES(35,191); +INSERT INTO product_slots VALUES(35,192); +INSERT INTO product_slots VALUES(35,193); +INSERT INTO product_slots VALUES(35,194); +INSERT INTO product_slots VALUES(35,198); +INSERT INTO product_slots VALUES(35,199); +INSERT INTO product_slots VALUES(35,200); +INSERT INTO product_slots VALUES(35,201); +INSERT INTO product_slots VALUES(35,202); +INSERT INTO product_slots VALUES(35,203); +INSERT INTO product_slots VALUES(35,205); +INSERT INTO product_slots VALUES(35,208); +INSERT INTO product_slots VALUES(35,209); +INSERT INTO product_slots VALUES(35,210); +INSERT INTO product_slots VALUES(35,211); +INSERT INTO product_slots VALUES(35,216); +INSERT INTO product_slots VALUES(35,217); +INSERT INTO product_slots VALUES(35,218); +INSERT INTO product_slots VALUES(35,219); +INSERT INTO product_slots VALUES(35,220); +INSERT INTO product_slots VALUES(35,223); +INSERT INTO product_slots VALUES(35,224); +INSERT INTO product_slots VALUES(35,225); +INSERT INTO product_slots VALUES(35,226); +INSERT INTO product_slots VALUES(35,230); +INSERT INTO product_slots VALUES(35,231); +INSERT INTO product_slots VALUES(35,232); +INSERT INTO product_slots VALUES(35,234); +INSERT INTO product_slots VALUES(35,237); +INSERT INTO product_slots VALUES(35,238); +INSERT INTO product_slots VALUES(35,239); +INSERT INTO product_slots VALUES(35,240); +INSERT INTO product_slots VALUES(35,274); +INSERT INTO product_slots VALUES(35,275); +INSERT INTO product_slots VALUES(35,277); +INSERT INTO product_slots VALUES(35,278); +INSERT INTO product_slots VALUES(35,279); +INSERT INTO product_slots VALUES(36,18); +INSERT INTO product_slots VALUES(36,19); +INSERT INTO product_slots VALUES(36,20); +INSERT INTO product_slots VALUES(36,21); +INSERT INTO product_slots VALUES(36,22); +INSERT INTO product_slots VALUES(36,23); +INSERT INTO product_slots VALUES(36,31); +INSERT INTO product_slots VALUES(36,33); +INSERT INTO product_slots VALUES(36,35); +INSERT INTO product_slots VALUES(36,37); +INSERT INTO product_slots VALUES(36,38); +INSERT INTO product_slots VALUES(36,39); +INSERT INTO product_slots VALUES(36,40); +INSERT INTO product_slots VALUES(36,41); +INSERT INTO product_slots VALUES(36,43); +INSERT INTO product_slots VALUES(36,45); +INSERT INTO product_slots VALUES(36,46); +INSERT INTO product_slots VALUES(36,47); +INSERT INTO product_slots VALUES(36,48); +INSERT INTO product_slots VALUES(36,49); +INSERT INTO product_slots VALUES(36,50); +INSERT INTO product_slots VALUES(36,51); +INSERT INTO product_slots VALUES(36,52); +INSERT INTO product_slots VALUES(36,53); +INSERT INTO product_slots VALUES(36,54); +INSERT INTO product_slots VALUES(36,55); +INSERT INTO product_slots VALUES(36,56); +INSERT INTO product_slots VALUES(36,57); +INSERT INTO product_slots VALUES(36,58); +INSERT INTO product_slots VALUES(36,59); +INSERT INTO product_slots VALUES(36,60); +INSERT INTO product_slots VALUES(36,61); +INSERT INTO product_slots VALUES(36,62); +INSERT INTO product_slots VALUES(36,63); +INSERT INTO product_slots VALUES(36,64); +INSERT INTO product_slots VALUES(36,65); +INSERT INTO product_slots VALUES(36,66); +INSERT INTO product_slots VALUES(36,67); +INSERT INTO product_slots VALUES(36,68); +INSERT INTO product_slots VALUES(36,69); +INSERT INTO product_slots VALUES(36,70); +INSERT INTO product_slots VALUES(36,71); +INSERT INTO product_slots VALUES(36,72); +INSERT INTO product_slots VALUES(36,73); +INSERT INTO product_slots VALUES(36,74); +INSERT INTO product_slots VALUES(36,75); +INSERT INTO product_slots VALUES(36,76); +INSERT INTO product_slots VALUES(36,77); +INSERT INTO product_slots VALUES(36,78); +INSERT INTO product_slots VALUES(36,79); +INSERT INTO product_slots VALUES(36,80); +INSERT INTO product_slots VALUES(36,81); +INSERT INTO product_slots VALUES(36,82); +INSERT INTO product_slots VALUES(36,83); +INSERT INTO product_slots VALUES(36,84); +INSERT INTO product_slots VALUES(36,85); +INSERT INTO product_slots VALUES(36,86); +INSERT INTO product_slots VALUES(36,87); +INSERT INTO product_slots VALUES(36,88); +INSERT INTO product_slots VALUES(36,89); +INSERT INTO product_slots VALUES(36,90); +INSERT INTO product_slots VALUES(36,91); +INSERT INTO product_slots VALUES(36,92); +INSERT INTO product_slots VALUES(36,93); +INSERT INTO product_slots VALUES(36,94); +INSERT INTO product_slots VALUES(36,95); +INSERT INTO product_slots VALUES(36,96); +INSERT INTO product_slots VALUES(36,97); +INSERT INTO product_slots VALUES(36,98); +INSERT INTO product_slots VALUES(36,99); +INSERT INTO product_slots VALUES(36,100); +INSERT INTO product_slots VALUES(36,101); +INSERT INTO product_slots VALUES(36,102); +INSERT INTO product_slots VALUES(36,103); +INSERT INTO product_slots VALUES(36,104); +INSERT INTO product_slots VALUES(36,105); +INSERT INTO product_slots VALUES(36,106); +INSERT INTO product_slots VALUES(36,107); +INSERT INTO product_slots VALUES(36,108); +INSERT INTO product_slots VALUES(36,109); +INSERT INTO product_slots VALUES(36,110); +INSERT INTO product_slots VALUES(36,111); +INSERT INTO product_slots VALUES(36,112); +INSERT INTO product_slots VALUES(36,113); +INSERT INTO product_slots VALUES(36,114); +INSERT INTO product_slots VALUES(36,115); +INSERT INTO product_slots VALUES(36,116); +INSERT INTO product_slots VALUES(36,117); +INSERT INTO product_slots VALUES(36,118); +INSERT INTO product_slots VALUES(36,119); +INSERT INTO product_slots VALUES(36,120); +INSERT INTO product_slots VALUES(36,121); +INSERT INTO product_slots VALUES(36,122); +INSERT INTO product_slots VALUES(36,123); +INSERT INTO product_slots VALUES(36,124); +INSERT INTO product_slots VALUES(36,125); +INSERT INTO product_slots VALUES(36,126); +INSERT INTO product_slots VALUES(36,127); +INSERT INTO product_slots VALUES(36,128); +INSERT INTO product_slots VALUES(36,129); +INSERT INTO product_slots VALUES(36,130); +INSERT INTO product_slots VALUES(36,131); +INSERT INTO product_slots VALUES(36,132); +INSERT INTO product_slots VALUES(36,133); +INSERT INTO product_slots VALUES(36,134); +INSERT INTO product_slots VALUES(36,135); +INSERT INTO product_slots VALUES(36,136); +INSERT INTO product_slots VALUES(36,137); +INSERT INTO product_slots VALUES(36,138); +INSERT INTO product_slots VALUES(36,139); +INSERT INTO product_slots VALUES(36,140); +INSERT INTO product_slots VALUES(36,141); +INSERT INTO product_slots VALUES(36,142); +INSERT INTO product_slots VALUES(36,143); +INSERT INTO product_slots VALUES(36,144); +INSERT INTO product_slots VALUES(36,145); +INSERT INTO product_slots VALUES(36,146); +INSERT INTO product_slots VALUES(36,147); +INSERT INTO product_slots VALUES(36,148); +INSERT INTO product_slots VALUES(36,149); +INSERT INTO product_slots VALUES(36,150); +INSERT INTO product_slots VALUES(36,151); +INSERT INTO product_slots VALUES(36,152); +INSERT INTO product_slots VALUES(36,153); +INSERT INTO product_slots VALUES(36,154); +INSERT INTO product_slots VALUES(36,155); +INSERT INTO product_slots VALUES(36,156); +INSERT INTO product_slots VALUES(36,157); +INSERT INTO product_slots VALUES(36,158); +INSERT INTO product_slots VALUES(36,159); +INSERT INTO product_slots VALUES(36,160); +INSERT INTO product_slots VALUES(36,161); +INSERT INTO product_slots VALUES(36,162); +INSERT INTO product_slots VALUES(36,163); +INSERT INTO product_slots VALUES(36,164); +INSERT INTO product_slots VALUES(36,165); +INSERT INTO product_slots VALUES(36,166); +INSERT INTO product_slots VALUES(36,167); +INSERT INTO product_slots VALUES(36,168); +INSERT INTO product_slots VALUES(36,169); +INSERT INTO product_slots VALUES(36,170); +INSERT INTO product_slots VALUES(36,171); +INSERT INTO product_slots VALUES(36,172); +INSERT INTO product_slots VALUES(36,173); +INSERT INTO product_slots VALUES(36,174); +INSERT INTO product_slots VALUES(36,175); +INSERT INTO product_slots VALUES(36,176); +INSERT INTO product_slots VALUES(36,177); +INSERT INTO product_slots VALUES(36,178); +INSERT INTO product_slots VALUES(36,179); +INSERT INTO product_slots VALUES(36,180); +INSERT INTO product_slots VALUES(36,181); +INSERT INTO product_slots VALUES(36,182); +INSERT INTO product_slots VALUES(36,183); +INSERT INTO product_slots VALUES(36,184); +INSERT INTO product_slots VALUES(36,185); +INSERT INTO product_slots VALUES(36,186); +INSERT INTO product_slots VALUES(36,187); +INSERT INTO product_slots VALUES(36,188); +INSERT INTO product_slots VALUES(36,189); +INSERT INTO product_slots VALUES(36,190); +INSERT INTO product_slots VALUES(36,191); +INSERT INTO product_slots VALUES(36,192); +INSERT INTO product_slots VALUES(36,193); +INSERT INTO product_slots VALUES(36,194); +INSERT INTO product_slots VALUES(36,195); +INSERT INTO product_slots VALUES(36,196); +INSERT INTO product_slots VALUES(36,197); +INSERT INTO product_slots VALUES(36,198); +INSERT INTO product_slots VALUES(36,199); +INSERT INTO product_slots VALUES(36,200); +INSERT INTO product_slots VALUES(36,201); +INSERT INTO product_slots VALUES(36,202); +INSERT INTO product_slots VALUES(36,203); +INSERT INTO product_slots VALUES(36,204); +INSERT INTO product_slots VALUES(36,205); +INSERT INTO product_slots VALUES(36,206); +INSERT INTO product_slots VALUES(36,207); +INSERT INTO product_slots VALUES(36,208); +INSERT INTO product_slots VALUES(36,209); +INSERT INTO product_slots VALUES(36,210); +INSERT INTO product_slots VALUES(36,211); +INSERT INTO product_slots VALUES(36,212); +INSERT INTO product_slots VALUES(36,213); +INSERT INTO product_slots VALUES(36,214); +INSERT INTO product_slots VALUES(36,215); +INSERT INTO product_slots VALUES(36,216); +INSERT INTO product_slots VALUES(36,217); +INSERT INTO product_slots VALUES(36,218); +INSERT INTO product_slots VALUES(36,219); +INSERT INTO product_slots VALUES(36,220); +INSERT INTO product_slots VALUES(36,221); +INSERT INTO product_slots VALUES(36,222); +INSERT INTO product_slots VALUES(36,223); +INSERT INTO product_slots VALUES(36,224); +INSERT INTO product_slots VALUES(36,225); +INSERT INTO product_slots VALUES(36,226); +INSERT INTO product_slots VALUES(36,227); +INSERT INTO product_slots VALUES(36,228); +INSERT INTO product_slots VALUES(36,229); +INSERT INTO product_slots VALUES(36,230); +INSERT INTO product_slots VALUES(36,231); +INSERT INTO product_slots VALUES(36,232); +INSERT INTO product_slots VALUES(36,234); +INSERT INTO product_slots VALUES(36,235); +INSERT INTO product_slots VALUES(36,236); +INSERT INTO product_slots VALUES(36,237); +INSERT INTO product_slots VALUES(36,238); +INSERT INTO product_slots VALUES(36,239); +INSERT INTO product_slots VALUES(36,240); +INSERT INTO product_slots VALUES(36,241); +INSERT INTO product_slots VALUES(36,242); +INSERT INTO product_slots VALUES(36,243); +INSERT INTO product_slots VALUES(36,244); +INSERT INTO product_slots VALUES(36,274); +INSERT INTO product_slots VALUES(36,275); +INSERT INTO product_slots VALUES(36,279); +INSERT INTO product_slots VALUES(36,280); +INSERT INTO product_slots VALUES(36,281); +INSERT INTO product_slots VALUES(36,282); +INSERT INTO product_slots VALUES(37,18); +INSERT INTO product_slots VALUES(37,20); +INSERT INTO product_slots VALUES(37,21); +INSERT INTO product_slots VALUES(37,33); +INSERT INTO product_slots VALUES(37,35); +INSERT INTO product_slots VALUES(37,37); +INSERT INTO product_slots VALUES(37,38); +INSERT INTO product_slots VALUES(37,39); +INSERT INTO product_slots VALUES(37,40); +INSERT INTO product_slots VALUES(37,41); +INSERT INTO product_slots VALUES(37,43); +INSERT INTO product_slots VALUES(37,44); +INSERT INTO product_slots VALUES(37,45); +INSERT INTO product_slots VALUES(37,46); +INSERT INTO product_slots VALUES(37,47); +INSERT INTO product_slots VALUES(37,48); +INSERT INTO product_slots VALUES(37,49); +INSERT INTO product_slots VALUES(37,50); +INSERT INTO product_slots VALUES(37,51); +INSERT INTO product_slots VALUES(37,52); +INSERT INTO product_slots VALUES(37,53); +INSERT INTO product_slots VALUES(37,54); +INSERT INTO product_slots VALUES(37,55); +INSERT INTO product_slots VALUES(37,56); +INSERT INTO product_slots VALUES(37,57); +INSERT INTO product_slots VALUES(37,58); +INSERT INTO product_slots VALUES(37,59); +INSERT INTO product_slots VALUES(37,60); +INSERT INTO product_slots VALUES(37,61); +INSERT INTO product_slots VALUES(37,62); +INSERT INTO product_slots VALUES(37,63); +INSERT INTO product_slots VALUES(37,64); +INSERT INTO product_slots VALUES(37,65); +INSERT INTO product_slots VALUES(37,66); +INSERT INTO product_slots VALUES(37,67); +INSERT INTO product_slots VALUES(37,68); +INSERT INTO product_slots VALUES(37,69); +INSERT INTO product_slots VALUES(37,70); +INSERT INTO product_slots VALUES(37,71); +INSERT INTO product_slots VALUES(37,72); +INSERT INTO product_slots VALUES(37,73); +INSERT INTO product_slots VALUES(37,74); +INSERT INTO product_slots VALUES(37,75); +INSERT INTO product_slots VALUES(37,76); +INSERT INTO product_slots VALUES(37,77); +INSERT INTO product_slots VALUES(37,78); +INSERT INTO product_slots VALUES(37,79); +INSERT INTO product_slots VALUES(37,80); +INSERT INTO product_slots VALUES(37,81); +INSERT INTO product_slots VALUES(37,82); +INSERT INTO product_slots VALUES(37,83); +INSERT INTO product_slots VALUES(37,84); +INSERT INTO product_slots VALUES(37,85); +INSERT INTO product_slots VALUES(37,86); +INSERT INTO product_slots VALUES(37,87); +INSERT INTO product_slots VALUES(37,88); +INSERT INTO product_slots VALUES(37,89); +INSERT INTO product_slots VALUES(37,90); +INSERT INTO product_slots VALUES(37,91); +INSERT INTO product_slots VALUES(37,92); +INSERT INTO product_slots VALUES(37,93); +INSERT INTO product_slots VALUES(37,94); +INSERT INTO product_slots VALUES(37,95); +INSERT INTO product_slots VALUES(37,96); +INSERT INTO product_slots VALUES(37,97); +INSERT INTO product_slots VALUES(37,98); +INSERT INTO product_slots VALUES(37,99); +INSERT INTO product_slots VALUES(37,100); +INSERT INTO product_slots VALUES(37,101); +INSERT INTO product_slots VALUES(37,102); +INSERT INTO product_slots VALUES(37,103); +INSERT INTO product_slots VALUES(37,104); +INSERT INTO product_slots VALUES(37,105); +INSERT INTO product_slots VALUES(37,106); +INSERT INTO product_slots VALUES(37,107); +INSERT INTO product_slots VALUES(37,108); +INSERT INTO product_slots VALUES(37,109); +INSERT INTO product_slots VALUES(37,110); +INSERT INTO product_slots VALUES(37,111); +INSERT INTO product_slots VALUES(37,112); +INSERT INTO product_slots VALUES(37,113); +INSERT INTO product_slots VALUES(37,114); +INSERT INTO product_slots VALUES(37,115); +INSERT INTO product_slots VALUES(37,116); +INSERT INTO product_slots VALUES(37,117); +INSERT INTO product_slots VALUES(37,118); +INSERT INTO product_slots VALUES(37,119); +INSERT INTO product_slots VALUES(37,120); +INSERT INTO product_slots VALUES(37,121); +INSERT INTO product_slots VALUES(37,122); +INSERT INTO product_slots VALUES(37,123); +INSERT INTO product_slots VALUES(37,124); +INSERT INTO product_slots VALUES(37,125); +INSERT INTO product_slots VALUES(37,126); +INSERT INTO product_slots VALUES(37,127); +INSERT INTO product_slots VALUES(37,128); +INSERT INTO product_slots VALUES(37,129); +INSERT INTO product_slots VALUES(37,130); +INSERT INTO product_slots VALUES(37,131); +INSERT INTO product_slots VALUES(37,132); +INSERT INTO product_slots VALUES(37,133); +INSERT INTO product_slots VALUES(37,134); +INSERT INTO product_slots VALUES(37,135); +INSERT INTO product_slots VALUES(37,136); +INSERT INTO product_slots VALUES(37,137); +INSERT INTO product_slots VALUES(37,138); +INSERT INTO product_slots VALUES(37,139); +INSERT INTO product_slots VALUES(37,140); +INSERT INTO product_slots VALUES(37,141); +INSERT INTO product_slots VALUES(37,142); +INSERT INTO product_slots VALUES(37,143); +INSERT INTO product_slots VALUES(37,144); +INSERT INTO product_slots VALUES(37,145); +INSERT INTO product_slots VALUES(37,146); +INSERT INTO product_slots VALUES(37,147); +INSERT INTO product_slots VALUES(37,148); +INSERT INTO product_slots VALUES(37,149); +INSERT INTO product_slots VALUES(37,150); +INSERT INTO product_slots VALUES(37,151); +INSERT INTO product_slots VALUES(37,152); +INSERT INTO product_slots VALUES(37,153); +INSERT INTO product_slots VALUES(37,154); +INSERT INTO product_slots VALUES(37,155); +INSERT INTO product_slots VALUES(37,156); +INSERT INTO product_slots VALUES(37,157); +INSERT INTO product_slots VALUES(37,158); +INSERT INTO product_slots VALUES(37,159); +INSERT INTO product_slots VALUES(37,160); +INSERT INTO product_slots VALUES(37,161); +INSERT INTO product_slots VALUES(37,162); +INSERT INTO product_slots VALUES(37,163); +INSERT INTO product_slots VALUES(37,164); +INSERT INTO product_slots VALUES(37,165); +INSERT INTO product_slots VALUES(37,166); +INSERT INTO product_slots VALUES(37,167); +INSERT INTO product_slots VALUES(37,168); +INSERT INTO product_slots VALUES(37,169); +INSERT INTO product_slots VALUES(37,170); +INSERT INTO product_slots VALUES(37,171); +INSERT INTO product_slots VALUES(37,172); +INSERT INTO product_slots VALUES(37,173); +INSERT INTO product_slots VALUES(37,174); +INSERT INTO product_slots VALUES(37,175); +INSERT INTO product_slots VALUES(37,176); +INSERT INTO product_slots VALUES(37,177); +INSERT INTO product_slots VALUES(37,178); +INSERT INTO product_slots VALUES(37,179); +INSERT INTO product_slots VALUES(37,180); +INSERT INTO product_slots VALUES(37,181); +INSERT INTO product_slots VALUES(37,182); +INSERT INTO product_slots VALUES(37,183); +INSERT INTO product_slots VALUES(37,184); +INSERT INTO product_slots VALUES(37,185); +INSERT INTO product_slots VALUES(37,186); +INSERT INTO product_slots VALUES(37,187); +INSERT INTO product_slots VALUES(37,188); +INSERT INTO product_slots VALUES(37,189); +INSERT INTO product_slots VALUES(37,190); +INSERT INTO product_slots VALUES(37,191); +INSERT INTO product_slots VALUES(37,192); +INSERT INTO product_slots VALUES(37,193); +INSERT INTO product_slots VALUES(37,194); +INSERT INTO product_slots VALUES(37,195); +INSERT INTO product_slots VALUES(37,196); +INSERT INTO product_slots VALUES(37,197); +INSERT INTO product_slots VALUES(37,198); +INSERT INTO product_slots VALUES(37,199); +INSERT INTO product_slots VALUES(37,200); +INSERT INTO product_slots VALUES(37,201); +INSERT INTO product_slots VALUES(37,202); +INSERT INTO product_slots VALUES(37,203); +INSERT INTO product_slots VALUES(37,204); +INSERT INTO product_slots VALUES(37,205); +INSERT INTO product_slots VALUES(37,206); +INSERT INTO product_slots VALUES(37,207); +INSERT INTO product_slots VALUES(37,208); +INSERT INTO product_slots VALUES(37,209); +INSERT INTO product_slots VALUES(37,210); +INSERT INTO product_slots VALUES(37,211); +INSERT INTO product_slots VALUES(37,212); +INSERT INTO product_slots VALUES(37,213); +INSERT INTO product_slots VALUES(37,214); +INSERT INTO product_slots VALUES(37,215); +INSERT INTO product_slots VALUES(37,216); +INSERT INTO product_slots VALUES(37,217); +INSERT INTO product_slots VALUES(37,218); +INSERT INTO product_slots VALUES(37,219); +INSERT INTO product_slots VALUES(37,220); +INSERT INTO product_slots VALUES(37,221); +INSERT INTO product_slots VALUES(37,222); +INSERT INTO product_slots VALUES(37,223); +INSERT INTO product_slots VALUES(37,224); +INSERT INTO product_slots VALUES(37,225); +INSERT INTO product_slots VALUES(37,226); +INSERT INTO product_slots VALUES(37,227); +INSERT INTO product_slots VALUES(37,228); +INSERT INTO product_slots VALUES(37,229); +INSERT INTO product_slots VALUES(37,230); +INSERT INTO product_slots VALUES(37,231); +INSERT INTO product_slots VALUES(37,232); +INSERT INTO product_slots VALUES(37,233); +INSERT INTO product_slots VALUES(37,234); +INSERT INTO product_slots VALUES(37,235); +INSERT INTO product_slots VALUES(37,236); +INSERT INTO product_slots VALUES(37,237); +INSERT INTO product_slots VALUES(37,238); +INSERT INTO product_slots VALUES(37,239); +INSERT INTO product_slots VALUES(37,240); +INSERT INTO product_slots VALUES(37,241); +INSERT INTO product_slots VALUES(37,242); +INSERT INTO product_slots VALUES(37,243); +INSERT INTO product_slots VALUES(37,244); +INSERT INTO product_slots VALUES(37,274); +INSERT INTO product_slots VALUES(37,275); +INSERT INTO product_slots VALUES(37,279); +INSERT INTO product_slots VALUES(37,280); +INSERT INTO product_slots VALUES(37,281); +INSERT INTO product_slots VALUES(37,282); +INSERT INTO product_slots VALUES(37,283); +INSERT INTO product_slots VALUES(37,284); +INSERT INTO product_slots VALUES(37,285); +INSERT INTO product_slots VALUES(37,286); +INSERT INTO product_slots VALUES(37,287); +INSERT INTO product_slots VALUES(38,18); +INSERT INTO product_slots VALUES(38,20); +INSERT INTO product_slots VALUES(38,21); +INSERT INTO product_slots VALUES(38,22); +INSERT INTO product_slots VALUES(38,33); +INSERT INTO product_slots VALUES(38,35); +INSERT INTO product_slots VALUES(38,37); +INSERT INTO product_slots VALUES(38,38); +INSERT INTO product_slots VALUES(38,39); +INSERT INTO product_slots VALUES(38,40); +INSERT INTO product_slots VALUES(38,43); +INSERT INTO product_slots VALUES(38,45); +INSERT INTO product_slots VALUES(38,46); +INSERT INTO product_slots VALUES(38,48); +INSERT INTO product_slots VALUES(38,49); +INSERT INTO product_slots VALUES(38,51); +INSERT INTO product_slots VALUES(38,52); +INSERT INTO product_slots VALUES(38,53); +INSERT INTO product_slots VALUES(38,54); +INSERT INTO product_slots VALUES(38,57); +INSERT INTO product_slots VALUES(38,58); +INSERT INTO product_slots VALUES(38,59); +INSERT INTO product_slots VALUES(38,60); +INSERT INTO product_slots VALUES(38,61); +INSERT INTO product_slots VALUES(38,62); +INSERT INTO product_slots VALUES(38,63); +INSERT INTO product_slots VALUES(38,64); +INSERT INTO product_slots VALUES(38,65); +INSERT INTO product_slots VALUES(38,66); +INSERT INTO product_slots VALUES(38,67); +INSERT INTO product_slots VALUES(38,68); +INSERT INTO product_slots VALUES(38,69); +INSERT INTO product_slots VALUES(38,70); +INSERT INTO product_slots VALUES(38,71); +INSERT INTO product_slots VALUES(38,72); +INSERT INTO product_slots VALUES(38,73); +INSERT INTO product_slots VALUES(38,74); +INSERT INTO product_slots VALUES(38,75); +INSERT INTO product_slots VALUES(38,76); +INSERT INTO product_slots VALUES(38,77); +INSERT INTO product_slots VALUES(38,78); +INSERT INTO product_slots VALUES(38,79); +INSERT INTO product_slots VALUES(38,80); +INSERT INTO product_slots VALUES(38,81); +INSERT INTO product_slots VALUES(38,82); +INSERT INTO product_slots VALUES(38,83); +INSERT INTO product_slots VALUES(38,84); +INSERT INTO product_slots VALUES(38,85); +INSERT INTO product_slots VALUES(38,86); +INSERT INTO product_slots VALUES(38,87); +INSERT INTO product_slots VALUES(38,88); +INSERT INTO product_slots VALUES(38,89); +INSERT INTO product_slots VALUES(38,90); +INSERT INTO product_slots VALUES(38,91); +INSERT INTO product_slots VALUES(38,92); +INSERT INTO product_slots VALUES(38,93); +INSERT INTO product_slots VALUES(38,94); +INSERT INTO product_slots VALUES(38,95); +INSERT INTO product_slots VALUES(38,96); +INSERT INTO product_slots VALUES(38,97); +INSERT INTO product_slots VALUES(38,98); +INSERT INTO product_slots VALUES(38,99); +INSERT INTO product_slots VALUES(38,100); +INSERT INTO product_slots VALUES(38,102); +INSERT INTO product_slots VALUES(38,103); +INSERT INTO product_slots VALUES(38,104); +INSERT INTO product_slots VALUES(38,105); +INSERT INTO product_slots VALUES(38,106); +INSERT INTO product_slots VALUES(38,107); +INSERT INTO product_slots VALUES(38,108); +INSERT INTO product_slots VALUES(38,109); +INSERT INTO product_slots VALUES(38,110); +INSERT INTO product_slots VALUES(38,111); +INSERT INTO product_slots VALUES(38,112); +INSERT INTO product_slots VALUES(38,113); +INSERT INTO product_slots VALUES(38,114); +INSERT INTO product_slots VALUES(38,115); +INSERT INTO product_slots VALUES(38,117); +INSERT INTO product_slots VALUES(38,118); +INSERT INTO product_slots VALUES(38,119); +INSERT INTO product_slots VALUES(38,120); +INSERT INTO product_slots VALUES(38,121); +INSERT INTO product_slots VALUES(38,122); +INSERT INTO product_slots VALUES(38,123); +INSERT INTO product_slots VALUES(38,124); +INSERT INTO product_slots VALUES(38,125); +INSERT INTO product_slots VALUES(38,126); +INSERT INTO product_slots VALUES(38,127); +INSERT INTO product_slots VALUES(38,128); +INSERT INTO product_slots VALUES(38,129); +INSERT INTO product_slots VALUES(38,130); +INSERT INTO product_slots VALUES(38,131); +INSERT INTO product_slots VALUES(38,132); +INSERT INTO product_slots VALUES(38,133); +INSERT INTO product_slots VALUES(38,134); +INSERT INTO product_slots VALUES(38,135); +INSERT INTO product_slots VALUES(38,136); +INSERT INTO product_slots VALUES(38,138); +INSERT INTO product_slots VALUES(38,139); +INSERT INTO product_slots VALUES(38,140); +INSERT INTO product_slots VALUES(38,141); +INSERT INTO product_slots VALUES(38,142); +INSERT INTO product_slots VALUES(38,143); +INSERT INTO product_slots VALUES(38,145); +INSERT INTO product_slots VALUES(38,146); +INSERT INTO product_slots VALUES(38,147); +INSERT INTO product_slots VALUES(38,148); +INSERT INTO product_slots VALUES(38,149); +INSERT INTO product_slots VALUES(38,150); +INSERT INTO product_slots VALUES(38,151); +INSERT INTO product_slots VALUES(38,152); +INSERT INTO product_slots VALUES(38,153); +INSERT INTO product_slots VALUES(38,154); +INSERT INTO product_slots VALUES(38,155); +INSERT INTO product_slots VALUES(38,156); +INSERT INTO product_slots VALUES(38,157); +INSERT INTO product_slots VALUES(38,158); +INSERT INTO product_slots VALUES(38,159); +INSERT INTO product_slots VALUES(38,160); +INSERT INTO product_slots VALUES(38,161); +INSERT INTO product_slots VALUES(38,162); +INSERT INTO product_slots VALUES(38,163); +INSERT INTO product_slots VALUES(38,164); +INSERT INTO product_slots VALUES(38,165); +INSERT INTO product_slots VALUES(38,166); +INSERT INTO product_slots VALUES(38,167); +INSERT INTO product_slots VALUES(38,168); +INSERT INTO product_slots VALUES(38,169); +INSERT INTO product_slots VALUES(38,170); +INSERT INTO product_slots VALUES(38,171); +INSERT INTO product_slots VALUES(38,172); +INSERT INTO product_slots VALUES(38,173); +INSERT INTO product_slots VALUES(38,174); +INSERT INTO product_slots VALUES(38,175); +INSERT INTO product_slots VALUES(38,176); +INSERT INTO product_slots VALUES(38,177); +INSERT INTO product_slots VALUES(38,178); +INSERT INTO product_slots VALUES(38,179); +INSERT INTO product_slots VALUES(38,180); +INSERT INTO product_slots VALUES(38,181); +INSERT INTO product_slots VALUES(38,182); +INSERT INTO product_slots VALUES(38,183); +INSERT INTO product_slots VALUES(38,184); +INSERT INTO product_slots VALUES(38,185); +INSERT INTO product_slots VALUES(38,186); +INSERT INTO product_slots VALUES(38,187); +INSERT INTO product_slots VALUES(38,188); +INSERT INTO product_slots VALUES(38,189); +INSERT INTO product_slots VALUES(38,190); +INSERT INTO product_slots VALUES(38,191); +INSERT INTO product_slots VALUES(38,192); +INSERT INTO product_slots VALUES(38,193); +INSERT INTO product_slots VALUES(38,194); +INSERT INTO product_slots VALUES(38,195); +INSERT INTO product_slots VALUES(38,196); +INSERT INTO product_slots VALUES(38,197); +INSERT INTO product_slots VALUES(38,198); +INSERT INTO product_slots VALUES(38,199); +INSERT INTO product_slots VALUES(38,200); +INSERT INTO product_slots VALUES(38,201); +INSERT INTO product_slots VALUES(38,202); +INSERT INTO product_slots VALUES(38,203); +INSERT INTO product_slots VALUES(38,204); +INSERT INTO product_slots VALUES(38,205); +INSERT INTO product_slots VALUES(38,206); +INSERT INTO product_slots VALUES(38,207); +INSERT INTO product_slots VALUES(38,208); +INSERT INTO product_slots VALUES(38,209); +INSERT INTO product_slots VALUES(38,210); +INSERT INTO product_slots VALUES(38,211); +INSERT INTO product_slots VALUES(38,212); +INSERT INTO product_slots VALUES(38,213); +INSERT INTO product_slots VALUES(38,214); +INSERT INTO product_slots VALUES(38,215); +INSERT INTO product_slots VALUES(38,216); +INSERT INTO product_slots VALUES(38,217); +INSERT INTO product_slots VALUES(38,218); +INSERT INTO product_slots VALUES(38,219); +INSERT INTO product_slots VALUES(38,220); +INSERT INTO product_slots VALUES(38,221); +INSERT INTO product_slots VALUES(38,222); +INSERT INTO product_slots VALUES(38,223); +INSERT INTO product_slots VALUES(38,224); +INSERT INTO product_slots VALUES(38,225); +INSERT INTO product_slots VALUES(38,226); +INSERT INTO product_slots VALUES(38,227); +INSERT INTO product_slots VALUES(38,228); +INSERT INTO product_slots VALUES(38,229); +INSERT INTO product_slots VALUES(38,230); +INSERT INTO product_slots VALUES(38,231); +INSERT INTO product_slots VALUES(38,232); +INSERT INTO product_slots VALUES(38,233); +INSERT INTO product_slots VALUES(38,234); +INSERT INTO product_slots VALUES(38,235); +INSERT INTO product_slots VALUES(38,236); +INSERT INTO product_slots VALUES(38,237); +INSERT INTO product_slots VALUES(38,238); +INSERT INTO product_slots VALUES(38,239); +INSERT INTO product_slots VALUES(38,240); +INSERT INTO product_slots VALUES(38,241); +INSERT INTO product_slots VALUES(38,242); +INSERT INTO product_slots VALUES(38,243); +INSERT INTO product_slots VALUES(38,244); +INSERT INTO product_slots VALUES(38,274); +INSERT INTO product_slots VALUES(38,275); +INSERT INTO product_slots VALUES(38,279); +INSERT INTO product_slots VALUES(38,280); +INSERT INTO product_slots VALUES(38,281); +INSERT INTO product_slots VALUES(38,282); +INSERT INTO product_slots VALUES(38,283); +INSERT INTO product_slots VALUES(38,284); +INSERT INTO product_slots VALUES(38,285); +INSERT INTO product_slots VALUES(38,286); +INSERT INTO product_slots VALUES(38,287); +INSERT INTO product_slots VALUES(39,18); +INSERT INTO product_slots VALUES(39,20); +INSERT INTO product_slots VALUES(39,21); +INSERT INTO product_slots VALUES(39,22); +INSERT INTO product_slots VALUES(39,33); +INSERT INTO product_slots VALUES(39,35); +INSERT INTO product_slots VALUES(39,37); +INSERT INTO product_slots VALUES(39,38); +INSERT INTO product_slots VALUES(39,40); +INSERT INTO product_slots VALUES(39,64); +INSERT INTO product_slots VALUES(39,65); +INSERT INTO product_slots VALUES(39,66); +INSERT INTO product_slots VALUES(39,67); +INSERT INTO product_slots VALUES(39,68); +INSERT INTO product_slots VALUES(39,69); +INSERT INTO product_slots VALUES(39,70); +INSERT INTO product_slots VALUES(39,71); +INSERT INTO product_slots VALUES(39,72); +INSERT INTO product_slots VALUES(39,73); +INSERT INTO product_slots VALUES(39,74); +INSERT INTO product_slots VALUES(39,75); +INSERT INTO product_slots VALUES(39,76); +INSERT INTO product_slots VALUES(39,77); +INSERT INTO product_slots VALUES(39,78); +INSERT INTO product_slots VALUES(39,79); +INSERT INTO product_slots VALUES(39,80); +INSERT INTO product_slots VALUES(39,81); +INSERT INTO product_slots VALUES(39,82); +INSERT INTO product_slots VALUES(39,83); +INSERT INTO product_slots VALUES(39,84); +INSERT INTO product_slots VALUES(39,85); +INSERT INTO product_slots VALUES(39,86); +INSERT INTO product_slots VALUES(39,87); +INSERT INTO product_slots VALUES(39,88); +INSERT INTO product_slots VALUES(39,89); +INSERT INTO product_slots VALUES(39,90); +INSERT INTO product_slots VALUES(39,91); +INSERT INTO product_slots VALUES(39,92); +INSERT INTO product_slots VALUES(39,93); +INSERT INTO product_slots VALUES(39,94); +INSERT INTO product_slots VALUES(39,95); +INSERT INTO product_slots VALUES(39,96); +INSERT INTO product_slots VALUES(39,97); +INSERT INTO product_slots VALUES(39,98); +INSERT INTO product_slots VALUES(39,99); +INSERT INTO product_slots VALUES(39,100); +INSERT INTO product_slots VALUES(39,102); +INSERT INTO product_slots VALUES(39,103); +INSERT INTO product_slots VALUES(39,104); +INSERT INTO product_slots VALUES(39,105); +INSERT INTO product_slots VALUES(39,106); +INSERT INTO product_slots VALUES(39,107); +INSERT INTO product_slots VALUES(39,108); +INSERT INTO product_slots VALUES(39,109); +INSERT INTO product_slots VALUES(39,110); +INSERT INTO product_slots VALUES(39,111); +INSERT INTO product_slots VALUES(39,112); +INSERT INTO product_slots VALUES(39,113); +INSERT INTO product_slots VALUES(39,114); +INSERT INTO product_slots VALUES(39,115); +INSERT INTO product_slots VALUES(39,117); +INSERT INTO product_slots VALUES(39,118); +INSERT INTO product_slots VALUES(39,119); +INSERT INTO product_slots VALUES(39,120); +INSERT INTO product_slots VALUES(39,121); +INSERT INTO product_slots VALUES(39,122); +INSERT INTO product_slots VALUES(39,123); +INSERT INTO product_slots VALUES(39,124); +INSERT INTO product_slots VALUES(39,125); +INSERT INTO product_slots VALUES(39,126); +INSERT INTO product_slots VALUES(39,127); +INSERT INTO product_slots VALUES(39,128); +INSERT INTO product_slots VALUES(39,129); +INSERT INTO product_slots VALUES(39,130); +INSERT INTO product_slots VALUES(39,131); +INSERT INTO product_slots VALUES(39,132); +INSERT INTO product_slots VALUES(39,133); +INSERT INTO product_slots VALUES(39,134); +INSERT INTO product_slots VALUES(39,135); +INSERT INTO product_slots VALUES(39,136); +INSERT INTO product_slots VALUES(39,138); +INSERT INTO product_slots VALUES(39,139); +INSERT INTO product_slots VALUES(39,140); +INSERT INTO product_slots VALUES(39,141); +INSERT INTO product_slots VALUES(39,142); +INSERT INTO product_slots VALUES(39,143); +INSERT INTO product_slots VALUES(39,145); +INSERT INTO product_slots VALUES(39,146); +INSERT INTO product_slots VALUES(39,147); +INSERT INTO product_slots VALUES(39,148); +INSERT INTO product_slots VALUES(39,149); +INSERT INTO product_slots VALUES(39,150); +INSERT INTO product_slots VALUES(39,151); +INSERT INTO product_slots VALUES(39,152); +INSERT INTO product_slots VALUES(39,153); +INSERT INTO product_slots VALUES(39,154); +INSERT INTO product_slots VALUES(39,155); +INSERT INTO product_slots VALUES(39,156); +INSERT INTO product_slots VALUES(39,157); +INSERT INTO product_slots VALUES(39,158); +INSERT INTO product_slots VALUES(39,159); +INSERT INTO product_slots VALUES(39,160); +INSERT INTO product_slots VALUES(39,161); +INSERT INTO product_slots VALUES(39,162); +INSERT INTO product_slots VALUES(39,163); +INSERT INTO product_slots VALUES(39,164); +INSERT INTO product_slots VALUES(39,165); +INSERT INTO product_slots VALUES(39,166); +INSERT INTO product_slots VALUES(39,167); +INSERT INTO product_slots VALUES(39,168); +INSERT INTO product_slots VALUES(39,169); +INSERT INTO product_slots VALUES(39,170); +INSERT INTO product_slots VALUES(39,171); +INSERT INTO product_slots VALUES(39,172); +INSERT INTO product_slots VALUES(39,173); +INSERT INTO product_slots VALUES(39,174); +INSERT INTO product_slots VALUES(39,175); +INSERT INTO product_slots VALUES(39,176); +INSERT INTO product_slots VALUES(39,177); +INSERT INTO product_slots VALUES(39,178); +INSERT INTO product_slots VALUES(39,179); +INSERT INTO product_slots VALUES(39,180); +INSERT INTO product_slots VALUES(39,181); +INSERT INTO product_slots VALUES(39,182); +INSERT INTO product_slots VALUES(39,183); +INSERT INTO product_slots VALUES(39,184); +INSERT INTO product_slots VALUES(39,185); +INSERT INTO product_slots VALUES(39,186); +INSERT INTO product_slots VALUES(39,187); +INSERT INTO product_slots VALUES(39,188); +INSERT INTO product_slots VALUES(39,189); +INSERT INTO product_slots VALUES(39,190); +INSERT INTO product_slots VALUES(39,191); +INSERT INTO product_slots VALUES(39,192); +INSERT INTO product_slots VALUES(39,193); +INSERT INTO product_slots VALUES(39,194); +INSERT INTO product_slots VALUES(39,195); +INSERT INTO product_slots VALUES(39,196); +INSERT INTO product_slots VALUES(39,197); +INSERT INTO product_slots VALUES(39,198); +INSERT INTO product_slots VALUES(39,199); +INSERT INTO product_slots VALUES(39,200); +INSERT INTO product_slots VALUES(39,201); +INSERT INTO product_slots VALUES(39,202); +INSERT INTO product_slots VALUES(39,203); +INSERT INTO product_slots VALUES(39,204); +INSERT INTO product_slots VALUES(39,205); +INSERT INTO product_slots VALUES(39,206); +INSERT INTO product_slots VALUES(39,207); +INSERT INTO product_slots VALUES(39,208); +INSERT INTO product_slots VALUES(39,209); +INSERT INTO product_slots VALUES(39,210); +INSERT INTO product_slots VALUES(39,211); +INSERT INTO product_slots VALUES(39,212); +INSERT INTO product_slots VALUES(39,213); +INSERT INTO product_slots VALUES(39,214); +INSERT INTO product_slots VALUES(39,215); +INSERT INTO product_slots VALUES(39,216); +INSERT INTO product_slots VALUES(39,217); +INSERT INTO product_slots VALUES(39,218); +INSERT INTO product_slots VALUES(39,219); +INSERT INTO product_slots VALUES(39,220); +INSERT INTO product_slots VALUES(39,221); +INSERT INTO product_slots VALUES(39,222); +INSERT INTO product_slots VALUES(39,223); +INSERT INTO product_slots VALUES(39,224); +INSERT INTO product_slots VALUES(39,225); +INSERT INTO product_slots VALUES(39,226); +INSERT INTO product_slots VALUES(39,227); +INSERT INTO product_slots VALUES(39,228); +INSERT INTO product_slots VALUES(39,229); +INSERT INTO product_slots VALUES(39,230); +INSERT INTO product_slots VALUES(39,231); +INSERT INTO product_slots VALUES(39,232); +INSERT INTO product_slots VALUES(39,233); +INSERT INTO product_slots VALUES(39,234); +INSERT INTO product_slots VALUES(39,235); +INSERT INTO product_slots VALUES(39,236); +INSERT INTO product_slots VALUES(39,237); +INSERT INTO product_slots VALUES(39,238); +INSERT INTO product_slots VALUES(39,239); +INSERT INTO product_slots VALUES(39,240); +INSERT INTO product_slots VALUES(39,241); +INSERT INTO product_slots VALUES(39,242); +INSERT INTO product_slots VALUES(39,243); +INSERT INTO product_slots VALUES(39,244); +INSERT INTO product_slots VALUES(39,274); +INSERT INTO product_slots VALUES(39,275); +INSERT INTO product_slots VALUES(39,279); +INSERT INTO product_slots VALUES(39,280); +INSERT INTO product_slots VALUES(39,281); +INSERT INTO product_slots VALUES(39,282); +INSERT INTO product_slots VALUES(39,283); +INSERT INTO product_slots VALUES(39,284); +INSERT INTO product_slots VALUES(39,285); +INSERT INTO product_slots VALUES(39,286); +INSERT INTO product_slots VALUES(39,287); +INSERT INTO product_slots VALUES(40,31); +INSERT INTO product_slots VALUES(40,39); +INSERT INTO product_slots VALUES(40,41); +INSERT INTO product_slots VALUES(40,43); +INSERT INTO product_slots VALUES(40,45); +INSERT INTO product_slots VALUES(40,46); +INSERT INTO product_slots VALUES(40,47); +INSERT INTO product_slots VALUES(40,48); +INSERT INTO product_slots VALUES(40,49); +INSERT INTO product_slots VALUES(40,50); +INSERT INTO product_slots VALUES(40,51); +INSERT INTO product_slots VALUES(40,52); +INSERT INTO product_slots VALUES(40,53); +INSERT INTO product_slots VALUES(40,54); +INSERT INTO product_slots VALUES(40,55); +INSERT INTO product_slots VALUES(40,56); +INSERT INTO product_slots VALUES(40,57); +INSERT INTO product_slots VALUES(40,58); +INSERT INTO product_slots VALUES(40,59); +INSERT INTO product_slots VALUES(40,60); +INSERT INTO product_slots VALUES(40,61); +INSERT INTO product_slots VALUES(40,62); +INSERT INTO product_slots VALUES(40,63); +INSERT INTO product_slots VALUES(40,64); +INSERT INTO product_slots VALUES(40,65); +INSERT INTO product_slots VALUES(40,66); +INSERT INTO product_slots VALUES(40,67); +INSERT INTO product_slots VALUES(40,68); +INSERT INTO product_slots VALUES(40,69); +INSERT INTO product_slots VALUES(40,70); +INSERT INTO product_slots VALUES(40,71); +INSERT INTO product_slots VALUES(40,72); +INSERT INTO product_slots VALUES(40,73); +INSERT INTO product_slots VALUES(40,74); +INSERT INTO product_slots VALUES(40,75); +INSERT INTO product_slots VALUES(40,76); +INSERT INTO product_slots VALUES(40,77); +INSERT INTO product_slots VALUES(40,78); +INSERT INTO product_slots VALUES(40,79); +INSERT INTO product_slots VALUES(40,80); +INSERT INTO product_slots VALUES(40,81); +INSERT INTO product_slots VALUES(40,82); +INSERT INTO product_slots VALUES(40,83); +INSERT INTO product_slots VALUES(40,84); +INSERT INTO product_slots VALUES(40,85); +INSERT INTO product_slots VALUES(40,86); +INSERT INTO product_slots VALUES(40,87); +INSERT INTO product_slots VALUES(40,88); +INSERT INTO product_slots VALUES(40,89); +INSERT INTO product_slots VALUES(40,90); +INSERT INTO product_slots VALUES(40,91); +INSERT INTO product_slots VALUES(40,92); +INSERT INTO product_slots VALUES(40,93); +INSERT INTO product_slots VALUES(40,94); +INSERT INTO product_slots VALUES(40,95); +INSERT INTO product_slots VALUES(40,96); +INSERT INTO product_slots VALUES(40,97); +INSERT INTO product_slots VALUES(40,98); +INSERT INTO product_slots VALUES(40,99); +INSERT INTO product_slots VALUES(40,100); +INSERT INTO product_slots VALUES(40,101); +INSERT INTO product_slots VALUES(40,102); +INSERT INTO product_slots VALUES(40,103); +INSERT INTO product_slots VALUES(40,104); +INSERT INTO product_slots VALUES(40,105); +INSERT INTO product_slots VALUES(40,106); +INSERT INTO product_slots VALUES(40,107); +INSERT INTO product_slots VALUES(40,108); +INSERT INTO product_slots VALUES(40,109); +INSERT INTO product_slots VALUES(40,110); +INSERT INTO product_slots VALUES(40,111); +INSERT INTO product_slots VALUES(40,112); +INSERT INTO product_slots VALUES(40,113); +INSERT INTO product_slots VALUES(40,114); +INSERT INTO product_slots VALUES(40,115); +INSERT INTO product_slots VALUES(40,116); +INSERT INTO product_slots VALUES(40,117); +INSERT INTO product_slots VALUES(40,118); +INSERT INTO product_slots VALUES(40,119); +INSERT INTO product_slots VALUES(40,120); +INSERT INTO product_slots VALUES(40,121); +INSERT INTO product_slots VALUES(40,122); +INSERT INTO product_slots VALUES(40,123); +INSERT INTO product_slots VALUES(40,124); +INSERT INTO product_slots VALUES(40,125); +INSERT INTO product_slots VALUES(40,126); +INSERT INTO product_slots VALUES(40,127); +INSERT INTO product_slots VALUES(40,128); +INSERT INTO product_slots VALUES(40,129); +INSERT INTO product_slots VALUES(40,130); +INSERT INTO product_slots VALUES(40,131); +INSERT INTO product_slots VALUES(40,132); +INSERT INTO product_slots VALUES(40,133); +INSERT INTO product_slots VALUES(40,134); +INSERT INTO product_slots VALUES(40,135); +INSERT INTO product_slots VALUES(40,136); +INSERT INTO product_slots VALUES(40,137); +INSERT INTO product_slots VALUES(40,138); +INSERT INTO product_slots VALUES(40,139); +INSERT INTO product_slots VALUES(40,140); +INSERT INTO product_slots VALUES(40,141); +INSERT INTO product_slots VALUES(40,142); +INSERT INTO product_slots VALUES(40,143); +INSERT INTO product_slots VALUES(40,144); +INSERT INTO product_slots VALUES(40,145); +INSERT INTO product_slots VALUES(40,146); +INSERT INTO product_slots VALUES(40,147); +INSERT INTO product_slots VALUES(40,148); +INSERT INTO product_slots VALUES(40,149); +INSERT INTO product_slots VALUES(40,150); +INSERT INTO product_slots VALUES(40,151); +INSERT INTO product_slots VALUES(40,152); +INSERT INTO product_slots VALUES(40,153); +INSERT INTO product_slots VALUES(40,154); +INSERT INTO product_slots VALUES(40,155); +INSERT INTO product_slots VALUES(40,156); +INSERT INTO product_slots VALUES(40,157); +INSERT INTO product_slots VALUES(40,158); +INSERT INTO product_slots VALUES(40,159); +INSERT INTO product_slots VALUES(40,160); +INSERT INTO product_slots VALUES(40,161); +INSERT INTO product_slots VALUES(40,162); +INSERT INTO product_slots VALUES(40,163); +INSERT INTO product_slots VALUES(40,164); +INSERT INTO product_slots VALUES(40,165); +INSERT INTO product_slots VALUES(40,166); +INSERT INTO product_slots VALUES(40,167); +INSERT INTO product_slots VALUES(40,168); +INSERT INTO product_slots VALUES(40,169); +INSERT INTO product_slots VALUES(40,170); +INSERT INTO product_slots VALUES(40,171); +INSERT INTO product_slots VALUES(40,172); +INSERT INTO product_slots VALUES(40,173); +INSERT INTO product_slots VALUES(40,174); +INSERT INTO product_slots VALUES(40,175); +INSERT INTO product_slots VALUES(40,176); +INSERT INTO product_slots VALUES(40,177); +INSERT INTO product_slots VALUES(40,178); +INSERT INTO product_slots VALUES(40,179); +INSERT INTO product_slots VALUES(40,180); +INSERT INTO product_slots VALUES(40,181); +INSERT INTO product_slots VALUES(40,182); +INSERT INTO product_slots VALUES(40,183); +INSERT INTO product_slots VALUES(40,184); +INSERT INTO product_slots VALUES(40,185); +INSERT INTO product_slots VALUES(40,186); +INSERT INTO product_slots VALUES(40,187); +INSERT INTO product_slots VALUES(40,188); +INSERT INTO product_slots VALUES(40,189); +INSERT INTO product_slots VALUES(40,190); +INSERT INTO product_slots VALUES(40,191); +INSERT INTO product_slots VALUES(40,192); +INSERT INTO product_slots VALUES(40,193); +INSERT INTO product_slots VALUES(40,194); +INSERT INTO product_slots VALUES(40,195); +INSERT INTO product_slots VALUES(40,196); +INSERT INTO product_slots VALUES(40,197); +INSERT INTO product_slots VALUES(40,198); +INSERT INTO product_slots VALUES(40,199); +INSERT INTO product_slots VALUES(40,200); +INSERT INTO product_slots VALUES(40,201); +INSERT INTO product_slots VALUES(40,202); +INSERT INTO product_slots VALUES(40,203); +INSERT INTO product_slots VALUES(40,204); +INSERT INTO product_slots VALUES(40,205); +INSERT INTO product_slots VALUES(40,206); +INSERT INTO product_slots VALUES(40,207); +INSERT INTO product_slots VALUES(40,208); +INSERT INTO product_slots VALUES(40,209); +INSERT INTO product_slots VALUES(40,210); +INSERT INTO product_slots VALUES(40,211); +INSERT INTO product_slots VALUES(40,212); +INSERT INTO product_slots VALUES(40,213); +INSERT INTO product_slots VALUES(40,214); +INSERT INTO product_slots VALUES(40,215); +INSERT INTO product_slots VALUES(40,216); +INSERT INTO product_slots VALUES(40,217); +INSERT INTO product_slots VALUES(40,218); +INSERT INTO product_slots VALUES(40,219); +INSERT INTO product_slots VALUES(40,220); +INSERT INTO product_slots VALUES(40,221); +INSERT INTO product_slots VALUES(40,222); +INSERT INTO product_slots VALUES(40,223); +INSERT INTO product_slots VALUES(40,224); +INSERT INTO product_slots VALUES(40,225); +INSERT INTO product_slots VALUES(40,226); +INSERT INTO product_slots VALUES(40,227); +INSERT INTO product_slots VALUES(40,228); +INSERT INTO product_slots VALUES(40,229); +INSERT INTO product_slots VALUES(40,230); +INSERT INTO product_slots VALUES(40,231); +INSERT INTO product_slots VALUES(40,232); +INSERT INTO product_slots VALUES(40,233); +INSERT INTO product_slots VALUES(40,234); +INSERT INTO product_slots VALUES(40,235); +INSERT INTO product_slots VALUES(40,236); +INSERT INTO product_slots VALUES(40,237); +INSERT INTO product_slots VALUES(40,238); +INSERT INTO product_slots VALUES(40,239); +INSERT INTO product_slots VALUES(40,240); +INSERT INTO product_slots VALUES(40,241); +INSERT INTO product_slots VALUES(40,242); +INSERT INTO product_slots VALUES(40,243); +INSERT INTO product_slots VALUES(40,244); +INSERT INTO product_slots VALUES(40,274); +INSERT INTO product_slots VALUES(40,275); +INSERT INTO product_slots VALUES(40,279); +INSERT INTO product_slots VALUES(40,280); +INSERT INTO product_slots VALUES(40,281); +INSERT INTO product_slots VALUES(40,282); +INSERT INTO product_slots VALUES(41,31); +INSERT INTO product_slots VALUES(41,39); +INSERT INTO product_slots VALUES(41,41); +INSERT INTO product_slots VALUES(41,43); +INSERT INTO product_slots VALUES(41,45); +INSERT INTO product_slots VALUES(41,46); +INSERT INTO product_slots VALUES(41,47); +INSERT INTO product_slots VALUES(41,48); +INSERT INTO product_slots VALUES(41,49); +INSERT INTO product_slots VALUES(41,50); +INSERT INTO product_slots VALUES(41,51); +INSERT INTO product_slots VALUES(41,52); +INSERT INTO product_slots VALUES(41,53); +INSERT INTO product_slots VALUES(41,54); +INSERT INTO product_slots VALUES(41,55); +INSERT INTO product_slots VALUES(41,56); +INSERT INTO product_slots VALUES(41,57); +INSERT INTO product_slots VALUES(41,58); +INSERT INTO product_slots VALUES(41,59); +INSERT INTO product_slots VALUES(41,60); +INSERT INTO product_slots VALUES(41,61); +INSERT INTO product_slots VALUES(41,62); +INSERT INTO product_slots VALUES(41,63); +INSERT INTO product_slots VALUES(41,64); +INSERT INTO product_slots VALUES(41,65); +INSERT INTO product_slots VALUES(41,66); +INSERT INTO product_slots VALUES(41,67); +INSERT INTO product_slots VALUES(41,68); +INSERT INTO product_slots VALUES(41,69); +INSERT INTO product_slots VALUES(41,70); +INSERT INTO product_slots VALUES(41,71); +INSERT INTO product_slots VALUES(41,72); +INSERT INTO product_slots VALUES(41,73); +INSERT INTO product_slots VALUES(41,74); +INSERT INTO product_slots VALUES(41,75); +INSERT INTO product_slots VALUES(41,76); +INSERT INTO product_slots VALUES(41,77); +INSERT INTO product_slots VALUES(41,78); +INSERT INTO product_slots VALUES(41,79); +INSERT INTO product_slots VALUES(41,80); +INSERT INTO product_slots VALUES(41,81); +INSERT INTO product_slots VALUES(41,82); +INSERT INTO product_slots VALUES(41,83); +INSERT INTO product_slots VALUES(41,84); +INSERT INTO product_slots VALUES(41,85); +INSERT INTO product_slots VALUES(41,86); +INSERT INTO product_slots VALUES(41,87); +INSERT INTO product_slots VALUES(41,88); +INSERT INTO product_slots VALUES(41,89); +INSERT INTO product_slots VALUES(41,90); +INSERT INTO product_slots VALUES(41,91); +INSERT INTO product_slots VALUES(41,92); +INSERT INTO product_slots VALUES(41,93); +INSERT INTO product_slots VALUES(41,94); +INSERT INTO product_slots VALUES(41,95); +INSERT INTO product_slots VALUES(41,96); +INSERT INTO product_slots VALUES(41,97); +INSERT INTO product_slots VALUES(41,98); +INSERT INTO product_slots VALUES(41,99); +INSERT INTO product_slots VALUES(41,100); +INSERT INTO product_slots VALUES(41,101); +INSERT INTO product_slots VALUES(41,102); +INSERT INTO product_slots VALUES(41,103); +INSERT INTO product_slots VALUES(41,104); +INSERT INTO product_slots VALUES(41,105); +INSERT INTO product_slots VALUES(41,106); +INSERT INTO product_slots VALUES(41,107); +INSERT INTO product_slots VALUES(41,108); +INSERT INTO product_slots VALUES(41,109); +INSERT INTO product_slots VALUES(41,110); +INSERT INTO product_slots VALUES(41,111); +INSERT INTO product_slots VALUES(41,112); +INSERT INTO product_slots VALUES(41,113); +INSERT INTO product_slots VALUES(41,114); +INSERT INTO product_slots VALUES(41,115); +INSERT INTO product_slots VALUES(41,116); +INSERT INTO product_slots VALUES(41,117); +INSERT INTO product_slots VALUES(41,118); +INSERT INTO product_slots VALUES(41,119); +INSERT INTO product_slots VALUES(41,120); +INSERT INTO product_slots VALUES(41,121); +INSERT INTO product_slots VALUES(41,122); +INSERT INTO product_slots VALUES(41,123); +INSERT INTO product_slots VALUES(41,124); +INSERT INTO product_slots VALUES(41,125); +INSERT INTO product_slots VALUES(41,126); +INSERT INTO product_slots VALUES(41,127); +INSERT INTO product_slots VALUES(41,128); +INSERT INTO product_slots VALUES(41,129); +INSERT INTO product_slots VALUES(41,130); +INSERT INTO product_slots VALUES(41,131); +INSERT INTO product_slots VALUES(41,132); +INSERT INTO product_slots VALUES(41,133); +INSERT INTO product_slots VALUES(41,134); +INSERT INTO product_slots VALUES(41,135); +INSERT INTO product_slots VALUES(41,136); +INSERT INTO product_slots VALUES(41,137); +INSERT INTO product_slots VALUES(41,138); +INSERT INTO product_slots VALUES(41,139); +INSERT INTO product_slots VALUES(41,140); +INSERT INTO product_slots VALUES(41,141); +INSERT INTO product_slots VALUES(41,142); +INSERT INTO product_slots VALUES(41,143); +INSERT INTO product_slots VALUES(41,144); +INSERT INTO product_slots VALUES(41,145); +INSERT INTO product_slots VALUES(41,146); +INSERT INTO product_slots VALUES(41,147); +INSERT INTO product_slots VALUES(41,148); +INSERT INTO product_slots VALUES(41,149); +INSERT INTO product_slots VALUES(41,150); +INSERT INTO product_slots VALUES(41,151); +INSERT INTO product_slots VALUES(41,152); +INSERT INTO product_slots VALUES(41,153); +INSERT INTO product_slots VALUES(41,154); +INSERT INTO product_slots VALUES(41,155); +INSERT INTO product_slots VALUES(41,156); +INSERT INTO product_slots VALUES(41,157); +INSERT INTO product_slots VALUES(41,158); +INSERT INTO product_slots VALUES(41,159); +INSERT INTO product_slots VALUES(41,160); +INSERT INTO product_slots VALUES(41,161); +INSERT INTO product_slots VALUES(41,162); +INSERT INTO product_slots VALUES(41,163); +INSERT INTO product_slots VALUES(41,164); +INSERT INTO product_slots VALUES(41,165); +INSERT INTO product_slots VALUES(41,166); +INSERT INTO product_slots VALUES(41,167); +INSERT INTO product_slots VALUES(41,168); +INSERT INTO product_slots VALUES(41,169); +INSERT INTO product_slots VALUES(41,170); +INSERT INTO product_slots VALUES(41,171); +INSERT INTO product_slots VALUES(41,172); +INSERT INTO product_slots VALUES(41,173); +INSERT INTO product_slots VALUES(41,174); +INSERT INTO product_slots VALUES(41,175); +INSERT INTO product_slots VALUES(41,176); +INSERT INTO product_slots VALUES(41,177); +INSERT INTO product_slots VALUES(41,178); +INSERT INTO product_slots VALUES(41,179); +INSERT INTO product_slots VALUES(41,180); +INSERT INTO product_slots VALUES(41,181); +INSERT INTO product_slots VALUES(41,182); +INSERT INTO product_slots VALUES(41,183); +INSERT INTO product_slots VALUES(41,184); +INSERT INTO product_slots VALUES(41,185); +INSERT INTO product_slots VALUES(41,186); +INSERT INTO product_slots VALUES(41,187); +INSERT INTO product_slots VALUES(41,188); +INSERT INTO product_slots VALUES(41,189); +INSERT INTO product_slots VALUES(41,190); +INSERT INTO product_slots VALUES(41,191); +INSERT INTO product_slots VALUES(41,192); +INSERT INTO product_slots VALUES(41,193); +INSERT INTO product_slots VALUES(41,194); +INSERT INTO product_slots VALUES(41,195); +INSERT INTO product_slots VALUES(41,196); +INSERT INTO product_slots VALUES(41,197); +INSERT INTO product_slots VALUES(41,198); +INSERT INTO product_slots VALUES(41,199); +INSERT INTO product_slots VALUES(41,200); +INSERT INTO product_slots VALUES(41,201); +INSERT INTO product_slots VALUES(41,202); +INSERT INTO product_slots VALUES(41,203); +INSERT INTO product_slots VALUES(41,204); +INSERT INTO product_slots VALUES(41,205); +INSERT INTO product_slots VALUES(41,206); +INSERT INTO product_slots VALUES(41,207); +INSERT INTO product_slots VALUES(41,208); +INSERT INTO product_slots VALUES(41,209); +INSERT INTO product_slots VALUES(41,210); +INSERT INTO product_slots VALUES(41,211); +INSERT INTO product_slots VALUES(41,212); +INSERT INTO product_slots VALUES(41,213); +INSERT INTO product_slots VALUES(41,214); +INSERT INTO product_slots VALUES(41,215); +INSERT INTO product_slots VALUES(41,216); +INSERT INTO product_slots VALUES(41,217); +INSERT INTO product_slots VALUES(41,218); +INSERT INTO product_slots VALUES(41,219); +INSERT INTO product_slots VALUES(41,220); +INSERT INTO product_slots VALUES(41,221); +INSERT INTO product_slots VALUES(41,222); +INSERT INTO product_slots VALUES(41,223); +INSERT INTO product_slots VALUES(41,224); +INSERT INTO product_slots VALUES(41,225); +INSERT INTO product_slots VALUES(41,226); +INSERT INTO product_slots VALUES(41,227); +INSERT INTO product_slots VALUES(41,228); +INSERT INTO product_slots VALUES(41,229); +INSERT INTO product_slots VALUES(41,230); +INSERT INTO product_slots VALUES(41,231); +INSERT INTO product_slots VALUES(41,232); +INSERT INTO product_slots VALUES(41,233); +INSERT INTO product_slots VALUES(41,234); +INSERT INTO product_slots VALUES(41,235); +INSERT INTO product_slots VALUES(41,236); +INSERT INTO product_slots VALUES(41,237); +INSERT INTO product_slots VALUES(41,238); +INSERT INTO product_slots VALUES(41,239); +INSERT INTO product_slots VALUES(41,240); +INSERT INTO product_slots VALUES(41,241); +INSERT INTO product_slots VALUES(41,242); +INSERT INTO product_slots VALUES(41,243); +INSERT INTO product_slots VALUES(41,244); +INSERT INTO product_slots VALUES(41,274); +INSERT INTO product_slots VALUES(41,275); +INSERT INTO product_slots VALUES(41,279); +INSERT INTO product_slots VALUES(41,280); +INSERT INTO product_slots VALUES(41,281); +INSERT INTO product_slots VALUES(41,282); +INSERT INTO product_slots VALUES(42,31); +INSERT INTO product_slots VALUES(42,39); +INSERT INTO product_slots VALUES(42,41); +INSERT INTO product_slots VALUES(42,43); +INSERT INTO product_slots VALUES(42,45); +INSERT INTO product_slots VALUES(42,46); +INSERT INTO product_slots VALUES(42,47); +INSERT INTO product_slots VALUES(42,48); +INSERT INTO product_slots VALUES(42,49); +INSERT INTO product_slots VALUES(42,50); +INSERT INTO product_slots VALUES(42,51); +INSERT INTO product_slots VALUES(42,52); +INSERT INTO product_slots VALUES(42,53); +INSERT INTO product_slots VALUES(42,54); +INSERT INTO product_slots VALUES(42,55); +INSERT INTO product_slots VALUES(42,56); +INSERT INTO product_slots VALUES(42,57); +INSERT INTO product_slots VALUES(42,58); +INSERT INTO product_slots VALUES(42,59); +INSERT INTO product_slots VALUES(42,60); +INSERT INTO product_slots VALUES(42,61); +INSERT INTO product_slots VALUES(42,62); +INSERT INTO product_slots VALUES(42,63); +INSERT INTO product_slots VALUES(42,64); +INSERT INTO product_slots VALUES(42,65); +INSERT INTO product_slots VALUES(42,66); +INSERT INTO product_slots VALUES(42,67); +INSERT INTO product_slots VALUES(42,68); +INSERT INTO product_slots VALUES(42,69); +INSERT INTO product_slots VALUES(42,70); +INSERT INTO product_slots VALUES(42,71); +INSERT INTO product_slots VALUES(42,72); +INSERT INTO product_slots VALUES(42,73); +INSERT INTO product_slots VALUES(42,74); +INSERT INTO product_slots VALUES(42,75); +INSERT INTO product_slots VALUES(42,76); +INSERT INTO product_slots VALUES(42,77); +INSERT INTO product_slots VALUES(42,78); +INSERT INTO product_slots VALUES(42,79); +INSERT INTO product_slots VALUES(42,80); +INSERT INTO product_slots VALUES(42,81); +INSERT INTO product_slots VALUES(42,82); +INSERT INTO product_slots VALUES(42,83); +INSERT INTO product_slots VALUES(42,84); +INSERT INTO product_slots VALUES(42,85); +INSERT INTO product_slots VALUES(42,86); +INSERT INTO product_slots VALUES(42,87); +INSERT INTO product_slots VALUES(42,88); +INSERT INTO product_slots VALUES(42,89); +INSERT INTO product_slots VALUES(42,90); +INSERT INTO product_slots VALUES(42,91); +INSERT INTO product_slots VALUES(42,92); +INSERT INTO product_slots VALUES(42,93); +INSERT INTO product_slots VALUES(42,94); +INSERT INTO product_slots VALUES(42,95); +INSERT INTO product_slots VALUES(42,96); +INSERT INTO product_slots VALUES(42,97); +INSERT INTO product_slots VALUES(42,98); +INSERT INTO product_slots VALUES(42,99); +INSERT INTO product_slots VALUES(42,100); +INSERT INTO product_slots VALUES(42,101); +INSERT INTO product_slots VALUES(42,102); +INSERT INTO product_slots VALUES(42,103); +INSERT INTO product_slots VALUES(42,104); +INSERT INTO product_slots VALUES(42,105); +INSERT INTO product_slots VALUES(42,106); +INSERT INTO product_slots VALUES(42,107); +INSERT INTO product_slots VALUES(42,108); +INSERT INTO product_slots VALUES(42,109); +INSERT INTO product_slots VALUES(42,110); +INSERT INTO product_slots VALUES(42,111); +INSERT INTO product_slots VALUES(42,112); +INSERT INTO product_slots VALUES(42,113); +INSERT INTO product_slots VALUES(42,114); +INSERT INTO product_slots VALUES(42,115); +INSERT INTO product_slots VALUES(42,116); +INSERT INTO product_slots VALUES(42,117); +INSERT INTO product_slots VALUES(42,118); +INSERT INTO product_slots VALUES(42,119); +INSERT INTO product_slots VALUES(42,120); +INSERT INTO product_slots VALUES(42,121); +INSERT INTO product_slots VALUES(42,122); +INSERT INTO product_slots VALUES(42,123); +INSERT INTO product_slots VALUES(42,124); +INSERT INTO product_slots VALUES(42,125); +INSERT INTO product_slots VALUES(42,126); +INSERT INTO product_slots VALUES(42,127); +INSERT INTO product_slots VALUES(42,128); +INSERT INTO product_slots VALUES(42,129); +INSERT INTO product_slots VALUES(42,130); +INSERT INTO product_slots VALUES(42,131); +INSERT INTO product_slots VALUES(42,132); +INSERT INTO product_slots VALUES(42,133); +INSERT INTO product_slots VALUES(42,134); +INSERT INTO product_slots VALUES(42,135); +INSERT INTO product_slots VALUES(42,136); +INSERT INTO product_slots VALUES(42,137); +INSERT INTO product_slots VALUES(42,138); +INSERT INTO product_slots VALUES(42,139); +INSERT INTO product_slots VALUES(42,140); +INSERT INTO product_slots VALUES(42,141); +INSERT INTO product_slots VALUES(42,142); +INSERT INTO product_slots VALUES(42,143); +INSERT INTO product_slots VALUES(42,144); +INSERT INTO product_slots VALUES(42,145); +INSERT INTO product_slots VALUES(42,146); +INSERT INTO product_slots VALUES(42,147); +INSERT INTO product_slots VALUES(42,148); +INSERT INTO product_slots VALUES(42,149); +INSERT INTO product_slots VALUES(42,150); +INSERT INTO product_slots VALUES(42,151); +INSERT INTO product_slots VALUES(42,152); +INSERT INTO product_slots VALUES(42,153); +INSERT INTO product_slots VALUES(42,154); +INSERT INTO product_slots VALUES(42,155); +INSERT INTO product_slots VALUES(42,156); +INSERT INTO product_slots VALUES(42,157); +INSERT INTO product_slots VALUES(42,158); +INSERT INTO product_slots VALUES(42,159); +INSERT INTO product_slots VALUES(42,160); +INSERT INTO product_slots VALUES(42,161); +INSERT INTO product_slots VALUES(42,162); +INSERT INTO product_slots VALUES(42,163); +INSERT INTO product_slots VALUES(42,164); +INSERT INTO product_slots VALUES(42,165); +INSERT INTO product_slots VALUES(42,166); +INSERT INTO product_slots VALUES(42,167); +INSERT INTO product_slots VALUES(42,168); +INSERT INTO product_slots VALUES(42,169); +INSERT INTO product_slots VALUES(42,170); +INSERT INTO product_slots VALUES(42,171); +INSERT INTO product_slots VALUES(42,172); +INSERT INTO product_slots VALUES(42,173); +INSERT INTO product_slots VALUES(42,174); +INSERT INTO product_slots VALUES(42,175); +INSERT INTO product_slots VALUES(42,176); +INSERT INTO product_slots VALUES(42,177); +INSERT INTO product_slots VALUES(42,178); +INSERT INTO product_slots VALUES(42,179); +INSERT INTO product_slots VALUES(42,180); +INSERT INTO product_slots VALUES(42,181); +INSERT INTO product_slots VALUES(42,182); +INSERT INTO product_slots VALUES(42,183); +INSERT INTO product_slots VALUES(42,184); +INSERT INTO product_slots VALUES(42,185); +INSERT INTO product_slots VALUES(42,186); +INSERT INTO product_slots VALUES(42,187); +INSERT INTO product_slots VALUES(42,188); +INSERT INTO product_slots VALUES(42,189); +INSERT INTO product_slots VALUES(42,190); +INSERT INTO product_slots VALUES(42,191); +INSERT INTO product_slots VALUES(42,192); +INSERT INTO product_slots VALUES(42,193); +INSERT INTO product_slots VALUES(42,194); +INSERT INTO product_slots VALUES(42,195); +INSERT INTO product_slots VALUES(42,196); +INSERT INTO product_slots VALUES(42,197); +INSERT INTO product_slots VALUES(42,198); +INSERT INTO product_slots VALUES(42,199); +INSERT INTO product_slots VALUES(42,200); +INSERT INTO product_slots VALUES(42,201); +INSERT INTO product_slots VALUES(42,202); +INSERT INTO product_slots VALUES(42,203); +INSERT INTO product_slots VALUES(42,204); +INSERT INTO product_slots VALUES(42,205); +INSERT INTO product_slots VALUES(42,206); +INSERT INTO product_slots VALUES(42,207); +INSERT INTO product_slots VALUES(42,208); +INSERT INTO product_slots VALUES(42,209); +INSERT INTO product_slots VALUES(42,210); +INSERT INTO product_slots VALUES(42,211); +INSERT INTO product_slots VALUES(42,212); +INSERT INTO product_slots VALUES(42,213); +INSERT INTO product_slots VALUES(42,214); +INSERT INTO product_slots VALUES(42,215); +INSERT INTO product_slots VALUES(42,216); +INSERT INTO product_slots VALUES(42,217); +INSERT INTO product_slots VALUES(42,218); +INSERT INTO product_slots VALUES(42,219); +INSERT INTO product_slots VALUES(42,220); +INSERT INTO product_slots VALUES(42,221); +INSERT INTO product_slots VALUES(42,222); +INSERT INTO product_slots VALUES(42,223); +INSERT INTO product_slots VALUES(42,224); +INSERT INTO product_slots VALUES(42,225); +INSERT INTO product_slots VALUES(42,226); +INSERT INTO product_slots VALUES(42,227); +INSERT INTO product_slots VALUES(42,228); +INSERT INTO product_slots VALUES(42,229); +INSERT INTO product_slots VALUES(42,230); +INSERT INTO product_slots VALUES(42,231); +INSERT INTO product_slots VALUES(42,232); +INSERT INTO product_slots VALUES(42,233); +INSERT INTO product_slots VALUES(42,234); +INSERT INTO product_slots VALUES(42,235); +INSERT INTO product_slots VALUES(42,236); +INSERT INTO product_slots VALUES(42,237); +INSERT INTO product_slots VALUES(42,238); +INSERT INTO product_slots VALUES(42,239); +INSERT INTO product_slots VALUES(42,240); +INSERT INTO product_slots VALUES(42,241); +INSERT INTO product_slots VALUES(42,242); +INSERT INTO product_slots VALUES(42,243); +INSERT INTO product_slots VALUES(42,244); +INSERT INTO product_slots VALUES(42,274); +INSERT INTO product_slots VALUES(42,275); +INSERT INTO product_slots VALUES(42,279); +INSERT INTO product_slots VALUES(42,280); +INSERT INTO product_slots VALUES(42,281); +INSERT INTO product_slots VALUES(42,282); +INSERT INTO product_slots VALUES(43,39); +INSERT INTO product_slots VALUES(43,40); +INSERT INTO product_slots VALUES(43,43); +INSERT INTO product_slots VALUES(43,45); +INSERT INTO product_slots VALUES(43,46); +INSERT INTO product_slots VALUES(43,48); +INSERT INTO product_slots VALUES(43,49); +INSERT INTO product_slots VALUES(43,51); +INSERT INTO product_slots VALUES(43,52); +INSERT INTO product_slots VALUES(43,53); +INSERT INTO product_slots VALUES(43,54); +INSERT INTO product_slots VALUES(43,57); +INSERT INTO product_slots VALUES(43,58); +INSERT INTO product_slots VALUES(43,59); +INSERT INTO product_slots VALUES(43,60); +INSERT INTO product_slots VALUES(43,61); +INSERT INTO product_slots VALUES(43,62); +INSERT INTO product_slots VALUES(43,63); +INSERT INTO product_slots VALUES(43,64); +INSERT INTO product_slots VALUES(43,65); +INSERT INTO product_slots VALUES(43,66); +INSERT INTO product_slots VALUES(43,67); +INSERT INTO product_slots VALUES(43,68); +INSERT INTO product_slots VALUES(43,69); +INSERT INTO product_slots VALUES(43,70); +INSERT INTO product_slots VALUES(43,71); +INSERT INTO product_slots VALUES(43,72); +INSERT INTO product_slots VALUES(43,73); +INSERT INTO product_slots VALUES(43,74); +INSERT INTO product_slots VALUES(43,75); +INSERT INTO product_slots VALUES(43,76); +INSERT INTO product_slots VALUES(43,77); +INSERT INTO product_slots VALUES(43,78); +INSERT INTO product_slots VALUES(43,79); +INSERT INTO product_slots VALUES(43,80); +INSERT INTO product_slots VALUES(43,81); +INSERT INTO product_slots VALUES(43,82); +INSERT INTO product_slots VALUES(43,83); +INSERT INTO product_slots VALUES(43,84); +INSERT INTO product_slots VALUES(43,85); +INSERT INTO product_slots VALUES(43,86); +INSERT INTO product_slots VALUES(43,87); +INSERT INTO product_slots VALUES(43,88); +INSERT INTO product_slots VALUES(43,89); +INSERT INTO product_slots VALUES(43,90); +INSERT INTO product_slots VALUES(43,91); +INSERT INTO product_slots VALUES(43,92); +INSERT INTO product_slots VALUES(43,93); +INSERT INTO product_slots VALUES(43,94); +INSERT INTO product_slots VALUES(43,95); +INSERT INTO product_slots VALUES(43,96); +INSERT INTO product_slots VALUES(43,97); +INSERT INTO product_slots VALUES(43,98); +INSERT INTO product_slots VALUES(43,99); +INSERT INTO product_slots VALUES(43,100); +INSERT INTO product_slots VALUES(43,102); +INSERT INTO product_slots VALUES(43,103); +INSERT INTO product_slots VALUES(43,104); +INSERT INTO product_slots VALUES(43,105); +INSERT INTO product_slots VALUES(43,106); +INSERT INTO product_slots VALUES(43,107); +INSERT INTO product_slots VALUES(43,108); +INSERT INTO product_slots VALUES(43,109); +INSERT INTO product_slots VALUES(43,110); +INSERT INTO product_slots VALUES(43,111); +INSERT INTO product_slots VALUES(43,112); +INSERT INTO product_slots VALUES(43,113); +INSERT INTO product_slots VALUES(43,114); +INSERT INTO product_slots VALUES(43,115); +INSERT INTO product_slots VALUES(43,117); +INSERT INTO product_slots VALUES(43,118); +INSERT INTO product_slots VALUES(43,119); +INSERT INTO product_slots VALUES(43,120); +INSERT INTO product_slots VALUES(43,121); +INSERT INTO product_slots VALUES(43,122); +INSERT INTO product_slots VALUES(43,123); +INSERT INTO product_slots VALUES(43,124); +INSERT INTO product_slots VALUES(43,125); +INSERT INTO product_slots VALUES(43,126); +INSERT INTO product_slots VALUES(43,127); +INSERT INTO product_slots VALUES(43,128); +INSERT INTO product_slots VALUES(43,129); +INSERT INTO product_slots VALUES(43,130); +INSERT INTO product_slots VALUES(43,131); +INSERT INTO product_slots VALUES(43,132); +INSERT INTO product_slots VALUES(43,133); +INSERT INTO product_slots VALUES(43,134); +INSERT INTO product_slots VALUES(43,135); +INSERT INTO product_slots VALUES(43,136); +INSERT INTO product_slots VALUES(43,138); +INSERT INTO product_slots VALUES(43,139); +INSERT INTO product_slots VALUES(43,140); +INSERT INTO product_slots VALUES(43,141); +INSERT INTO product_slots VALUES(43,142); +INSERT INTO product_slots VALUES(43,143); +INSERT INTO product_slots VALUES(43,145); +INSERT INTO product_slots VALUES(43,146); +INSERT INTO product_slots VALUES(43,147); +INSERT INTO product_slots VALUES(43,148); +INSERT INTO product_slots VALUES(43,149); +INSERT INTO product_slots VALUES(43,150); +INSERT INTO product_slots VALUES(43,151); +INSERT INTO product_slots VALUES(43,152); +INSERT INTO product_slots VALUES(43,153); +INSERT INTO product_slots VALUES(43,154); +INSERT INTO product_slots VALUES(43,155); +INSERT INTO product_slots VALUES(43,156); +INSERT INTO product_slots VALUES(43,157); +INSERT INTO product_slots VALUES(43,158); +INSERT INTO product_slots VALUES(43,159); +INSERT INTO product_slots VALUES(43,160); +INSERT INTO product_slots VALUES(43,161); +INSERT INTO product_slots VALUES(43,162); +INSERT INTO product_slots VALUES(43,163); +INSERT INTO product_slots VALUES(43,164); +INSERT INTO product_slots VALUES(43,165); +INSERT INTO product_slots VALUES(43,166); +INSERT INTO product_slots VALUES(43,167); +INSERT INTO product_slots VALUES(43,168); +INSERT INTO product_slots VALUES(43,169); +INSERT INTO product_slots VALUES(43,170); +INSERT INTO product_slots VALUES(43,171); +INSERT INTO product_slots VALUES(43,172); +INSERT INTO product_slots VALUES(43,173); +INSERT INTO product_slots VALUES(43,174); +INSERT INTO product_slots VALUES(43,175); +INSERT INTO product_slots VALUES(43,176); +INSERT INTO product_slots VALUES(43,177); +INSERT INTO product_slots VALUES(43,178); +INSERT INTO product_slots VALUES(43,179); +INSERT INTO product_slots VALUES(43,180); +INSERT INTO product_slots VALUES(43,181); +INSERT INTO product_slots VALUES(43,182); +INSERT INTO product_slots VALUES(43,183); +INSERT INTO product_slots VALUES(43,184); +INSERT INTO product_slots VALUES(43,185); +INSERT INTO product_slots VALUES(43,186); +INSERT INTO product_slots VALUES(43,187); +INSERT INTO product_slots VALUES(43,188); +INSERT INTO product_slots VALUES(43,189); +INSERT INTO product_slots VALUES(43,190); +INSERT INTO product_slots VALUES(43,191); +INSERT INTO product_slots VALUES(43,192); +INSERT INTO product_slots VALUES(43,193); +INSERT INTO product_slots VALUES(43,194); +INSERT INTO product_slots VALUES(43,195); +INSERT INTO product_slots VALUES(43,196); +INSERT INTO product_slots VALUES(43,197); +INSERT INTO product_slots VALUES(43,198); +INSERT INTO product_slots VALUES(43,199); +INSERT INTO product_slots VALUES(43,200); +INSERT INTO product_slots VALUES(43,201); +INSERT INTO product_slots VALUES(43,202); +INSERT INTO product_slots VALUES(43,203); +INSERT INTO product_slots VALUES(43,204); +INSERT INTO product_slots VALUES(43,205); +INSERT INTO product_slots VALUES(43,206); +INSERT INTO product_slots VALUES(43,207); +INSERT INTO product_slots VALUES(43,208); +INSERT INTO product_slots VALUES(43,209); +INSERT INTO product_slots VALUES(43,210); +INSERT INTO product_slots VALUES(43,211); +INSERT INTO product_slots VALUES(43,212); +INSERT INTO product_slots VALUES(43,213); +INSERT INTO product_slots VALUES(43,214); +INSERT INTO product_slots VALUES(43,215); +INSERT INTO product_slots VALUES(43,216); +INSERT INTO product_slots VALUES(43,217); +INSERT INTO product_slots VALUES(43,218); +INSERT INTO product_slots VALUES(43,219); +INSERT INTO product_slots VALUES(43,220); +INSERT INTO product_slots VALUES(43,221); +INSERT INTO product_slots VALUES(43,222); +INSERT INTO product_slots VALUES(43,223); +INSERT INTO product_slots VALUES(43,224); +INSERT INTO product_slots VALUES(43,225); +INSERT INTO product_slots VALUES(43,226); +INSERT INTO product_slots VALUES(43,227); +INSERT INTO product_slots VALUES(43,228); +INSERT INTO product_slots VALUES(43,229); +INSERT INTO product_slots VALUES(43,230); +INSERT INTO product_slots VALUES(43,231); +INSERT INTO product_slots VALUES(43,232); +INSERT INTO product_slots VALUES(43,233); +INSERT INTO product_slots VALUES(43,234); +INSERT INTO product_slots VALUES(43,235); +INSERT INTO product_slots VALUES(43,236); +INSERT INTO product_slots VALUES(43,237); +INSERT INTO product_slots VALUES(43,238); +INSERT INTO product_slots VALUES(43,239); +INSERT INTO product_slots VALUES(43,240); +INSERT INTO product_slots VALUES(43,241); +INSERT INTO product_slots VALUES(43,242); +INSERT INTO product_slots VALUES(43,243); +INSERT INTO product_slots VALUES(43,244); +INSERT INTO product_slots VALUES(43,274); +INSERT INTO product_slots VALUES(43,275); +INSERT INTO product_slots VALUES(43,279); +INSERT INTO product_slots VALUES(43,280); +INSERT INTO product_slots VALUES(43,281); +INSERT INTO product_slots VALUES(43,282); +INSERT INTO product_slots VALUES(43,283); +INSERT INTO product_slots VALUES(43,284); +INSERT INTO product_slots VALUES(43,285); +INSERT INTO product_slots VALUES(43,286); +INSERT INTO product_slots VALUES(43,287); +INSERT INTO product_slots VALUES(44,39); +INSERT INTO product_slots VALUES(44,40); +INSERT INTO product_slots VALUES(44,43); +INSERT INTO product_slots VALUES(44,45); +INSERT INTO product_slots VALUES(44,46); +INSERT INTO product_slots VALUES(44,48); +INSERT INTO product_slots VALUES(44,49); +INSERT INTO product_slots VALUES(44,51); +INSERT INTO product_slots VALUES(44,52); +INSERT INTO product_slots VALUES(44,53); +INSERT INTO product_slots VALUES(44,54); +INSERT INTO product_slots VALUES(44,57); +INSERT INTO product_slots VALUES(44,58); +INSERT INTO product_slots VALUES(44,59); +INSERT INTO product_slots VALUES(44,60); +INSERT INTO product_slots VALUES(44,61); +INSERT INTO product_slots VALUES(44,62); +INSERT INTO product_slots VALUES(44,63); +INSERT INTO product_slots VALUES(44,64); +INSERT INTO product_slots VALUES(44,65); +INSERT INTO product_slots VALUES(44,66); +INSERT INTO product_slots VALUES(44,67); +INSERT INTO product_slots VALUES(44,68); +INSERT INTO product_slots VALUES(44,69); +INSERT INTO product_slots VALUES(44,70); +INSERT INTO product_slots VALUES(44,71); +INSERT INTO product_slots VALUES(44,72); +INSERT INTO product_slots VALUES(44,73); +INSERT INTO product_slots VALUES(44,74); +INSERT INTO product_slots VALUES(44,75); +INSERT INTO product_slots VALUES(44,76); +INSERT INTO product_slots VALUES(44,77); +INSERT INTO product_slots VALUES(44,78); +INSERT INTO product_slots VALUES(44,79); +INSERT INTO product_slots VALUES(44,80); +INSERT INTO product_slots VALUES(44,81); +INSERT INTO product_slots VALUES(44,82); +INSERT INTO product_slots VALUES(44,83); +INSERT INTO product_slots VALUES(44,84); +INSERT INTO product_slots VALUES(44,85); +INSERT INTO product_slots VALUES(44,86); +INSERT INTO product_slots VALUES(44,87); +INSERT INTO product_slots VALUES(44,88); +INSERT INTO product_slots VALUES(44,89); +INSERT INTO product_slots VALUES(44,90); +INSERT INTO product_slots VALUES(44,91); +INSERT INTO product_slots VALUES(44,92); +INSERT INTO product_slots VALUES(44,93); +INSERT INTO product_slots VALUES(44,94); +INSERT INTO product_slots VALUES(44,95); +INSERT INTO product_slots VALUES(44,96); +INSERT INTO product_slots VALUES(44,97); +INSERT INTO product_slots VALUES(44,98); +INSERT INTO product_slots VALUES(44,99); +INSERT INTO product_slots VALUES(44,100); +INSERT INTO product_slots VALUES(44,102); +INSERT INTO product_slots VALUES(44,103); +INSERT INTO product_slots VALUES(44,104); +INSERT INTO product_slots VALUES(44,105); +INSERT INTO product_slots VALUES(44,106); +INSERT INTO product_slots VALUES(44,107); +INSERT INTO product_slots VALUES(44,108); +INSERT INTO product_slots VALUES(44,109); +INSERT INTO product_slots VALUES(44,110); +INSERT INTO product_slots VALUES(44,111); +INSERT INTO product_slots VALUES(44,112); +INSERT INTO product_slots VALUES(44,113); +INSERT INTO product_slots VALUES(44,114); +INSERT INTO product_slots VALUES(44,115); +INSERT INTO product_slots VALUES(44,117); +INSERT INTO product_slots VALUES(44,118); +INSERT INTO product_slots VALUES(44,119); +INSERT INTO product_slots VALUES(44,120); +INSERT INTO product_slots VALUES(44,121); +INSERT INTO product_slots VALUES(44,122); +INSERT INTO product_slots VALUES(44,123); +INSERT INTO product_slots VALUES(44,124); +INSERT INTO product_slots VALUES(44,125); +INSERT INTO product_slots VALUES(44,126); +INSERT INTO product_slots VALUES(44,127); +INSERT INTO product_slots VALUES(44,128); +INSERT INTO product_slots VALUES(44,129); +INSERT INTO product_slots VALUES(44,130); +INSERT INTO product_slots VALUES(44,131); +INSERT INTO product_slots VALUES(44,132); +INSERT INTO product_slots VALUES(44,133); +INSERT INTO product_slots VALUES(44,134); +INSERT INTO product_slots VALUES(44,135); +INSERT INTO product_slots VALUES(44,136); +INSERT INTO product_slots VALUES(44,138); +INSERT INTO product_slots VALUES(44,139); +INSERT INTO product_slots VALUES(44,140); +INSERT INTO product_slots VALUES(44,141); +INSERT INTO product_slots VALUES(44,142); +INSERT INTO product_slots VALUES(44,143); +INSERT INTO product_slots VALUES(44,145); +INSERT INTO product_slots VALUES(44,146); +INSERT INTO product_slots VALUES(44,147); +INSERT INTO product_slots VALUES(44,148); +INSERT INTO product_slots VALUES(44,149); +INSERT INTO product_slots VALUES(44,150); +INSERT INTO product_slots VALUES(44,151); +INSERT INTO product_slots VALUES(44,152); +INSERT INTO product_slots VALUES(44,153); +INSERT INTO product_slots VALUES(44,154); +INSERT INTO product_slots VALUES(44,155); +INSERT INTO product_slots VALUES(44,156); +INSERT INTO product_slots VALUES(44,157); +INSERT INTO product_slots VALUES(44,158); +INSERT INTO product_slots VALUES(44,159); +INSERT INTO product_slots VALUES(44,160); +INSERT INTO product_slots VALUES(44,161); +INSERT INTO product_slots VALUES(44,162); +INSERT INTO product_slots VALUES(44,163); +INSERT INTO product_slots VALUES(44,164); +INSERT INTO product_slots VALUES(44,165); +INSERT INTO product_slots VALUES(44,166); +INSERT INTO product_slots VALUES(44,167); +INSERT INTO product_slots VALUES(44,168); +INSERT INTO product_slots VALUES(44,169); +INSERT INTO product_slots VALUES(44,170); +INSERT INTO product_slots VALUES(44,171); +INSERT INTO product_slots VALUES(44,172); +INSERT INTO product_slots VALUES(44,173); +INSERT INTO product_slots VALUES(44,174); +INSERT INTO product_slots VALUES(44,175); +INSERT INTO product_slots VALUES(44,176); +INSERT INTO product_slots VALUES(44,177); +INSERT INTO product_slots VALUES(44,178); +INSERT INTO product_slots VALUES(44,179); +INSERT INTO product_slots VALUES(44,180); +INSERT INTO product_slots VALUES(44,181); +INSERT INTO product_slots VALUES(44,182); +INSERT INTO product_slots VALUES(44,183); +INSERT INTO product_slots VALUES(44,184); +INSERT INTO product_slots VALUES(44,185); +INSERT INTO product_slots VALUES(44,186); +INSERT INTO product_slots VALUES(44,187); +INSERT INTO product_slots VALUES(44,188); +INSERT INTO product_slots VALUES(44,189); +INSERT INTO product_slots VALUES(44,190); +INSERT INTO product_slots VALUES(44,191); +INSERT INTO product_slots VALUES(44,192); +INSERT INTO product_slots VALUES(44,193); +INSERT INTO product_slots VALUES(44,194); +INSERT INTO product_slots VALUES(44,195); +INSERT INTO product_slots VALUES(44,196); +INSERT INTO product_slots VALUES(44,197); +INSERT INTO product_slots VALUES(44,198); +INSERT INTO product_slots VALUES(44,199); +INSERT INTO product_slots VALUES(44,200); +INSERT INTO product_slots VALUES(44,201); +INSERT INTO product_slots VALUES(44,202); +INSERT INTO product_slots VALUES(44,203); +INSERT INTO product_slots VALUES(44,204); +INSERT INTO product_slots VALUES(44,205); +INSERT INTO product_slots VALUES(44,206); +INSERT INTO product_slots VALUES(44,207); +INSERT INTO product_slots VALUES(44,208); +INSERT INTO product_slots VALUES(44,209); +INSERT INTO product_slots VALUES(44,210); +INSERT INTO product_slots VALUES(44,211); +INSERT INTO product_slots VALUES(44,212); +INSERT INTO product_slots VALUES(44,213); +INSERT INTO product_slots VALUES(44,214); +INSERT INTO product_slots VALUES(44,215); +INSERT INTO product_slots VALUES(44,216); +INSERT INTO product_slots VALUES(44,217); +INSERT INTO product_slots VALUES(44,218); +INSERT INTO product_slots VALUES(44,219); +INSERT INTO product_slots VALUES(44,220); +INSERT INTO product_slots VALUES(44,221); +INSERT INTO product_slots VALUES(44,222); +INSERT INTO product_slots VALUES(44,223); +INSERT INTO product_slots VALUES(44,224); +INSERT INTO product_slots VALUES(44,225); +INSERT INTO product_slots VALUES(44,226); +INSERT INTO product_slots VALUES(44,227); +INSERT INTO product_slots VALUES(44,228); +INSERT INTO product_slots VALUES(44,229); +INSERT INTO product_slots VALUES(44,230); +INSERT INTO product_slots VALUES(44,231); +INSERT INTO product_slots VALUES(44,232); +INSERT INTO product_slots VALUES(44,233); +INSERT INTO product_slots VALUES(44,234); +INSERT INTO product_slots VALUES(44,235); +INSERT INTO product_slots VALUES(44,236); +INSERT INTO product_slots VALUES(44,237); +INSERT INTO product_slots VALUES(44,238); +INSERT INTO product_slots VALUES(44,239); +INSERT INTO product_slots VALUES(44,240); +INSERT INTO product_slots VALUES(44,241); +INSERT INTO product_slots VALUES(44,242); +INSERT INTO product_slots VALUES(44,243); +INSERT INTO product_slots VALUES(44,244); +INSERT INTO product_slots VALUES(44,274); +INSERT INTO product_slots VALUES(44,275); +INSERT INTO product_slots VALUES(44,279); +INSERT INTO product_slots VALUES(44,280); +INSERT INTO product_slots VALUES(44,281); +INSERT INTO product_slots VALUES(44,282); +INSERT INTO product_slots VALUES(44,283); +INSERT INTO product_slots VALUES(44,284); +INSERT INTO product_slots VALUES(44,285); +INSERT INTO product_slots VALUES(44,286); +INSERT INTO product_slots VALUES(44,287); +INSERT INTO product_slots VALUES(45,39); +INSERT INTO product_slots VALUES(45,41); +INSERT INTO product_slots VALUES(45,43); +INSERT INTO product_slots VALUES(45,44); +INSERT INTO product_slots VALUES(45,45); +INSERT INTO product_slots VALUES(45,46); +INSERT INTO product_slots VALUES(45,47); +INSERT INTO product_slots VALUES(45,48); +INSERT INTO product_slots VALUES(45,49); +INSERT INTO product_slots VALUES(45,50); +INSERT INTO product_slots VALUES(45,51); +INSERT INTO product_slots VALUES(45,52); +INSERT INTO product_slots VALUES(45,53); +INSERT INTO product_slots VALUES(45,54); +INSERT INTO product_slots VALUES(45,55); +INSERT INTO product_slots VALUES(45,56); +INSERT INTO product_slots VALUES(45,57); +INSERT INTO product_slots VALUES(45,58); +INSERT INTO product_slots VALUES(45,59); +INSERT INTO product_slots VALUES(45,60); +INSERT INTO product_slots VALUES(45,61); +INSERT INTO product_slots VALUES(45,62); +INSERT INTO product_slots VALUES(45,63); +INSERT INTO product_slots VALUES(45,64); +INSERT INTO product_slots VALUES(45,65); +INSERT INTO product_slots VALUES(45,66); +INSERT INTO product_slots VALUES(45,67); +INSERT INTO product_slots VALUES(45,68); +INSERT INTO product_slots VALUES(45,69); +INSERT INTO product_slots VALUES(45,70); +INSERT INTO product_slots VALUES(45,71); +INSERT INTO product_slots VALUES(45,72); +INSERT INTO product_slots VALUES(45,73); +INSERT INTO product_slots VALUES(45,74); +INSERT INTO product_slots VALUES(45,75); +INSERT INTO product_slots VALUES(45,76); +INSERT INTO product_slots VALUES(45,77); +INSERT INTO product_slots VALUES(45,78); +INSERT INTO product_slots VALUES(45,79); +INSERT INTO product_slots VALUES(45,80); +INSERT INTO product_slots VALUES(45,81); +INSERT INTO product_slots VALUES(45,82); +INSERT INTO product_slots VALUES(45,83); +INSERT INTO product_slots VALUES(45,84); +INSERT INTO product_slots VALUES(45,85); +INSERT INTO product_slots VALUES(45,86); +INSERT INTO product_slots VALUES(45,87); +INSERT INTO product_slots VALUES(45,88); +INSERT INTO product_slots VALUES(45,89); +INSERT INTO product_slots VALUES(45,90); +INSERT INTO product_slots VALUES(45,91); +INSERT INTO product_slots VALUES(45,92); +INSERT INTO product_slots VALUES(45,93); +INSERT INTO product_slots VALUES(45,94); +INSERT INTO product_slots VALUES(45,95); +INSERT INTO product_slots VALUES(45,96); +INSERT INTO product_slots VALUES(45,97); +INSERT INTO product_slots VALUES(45,98); +INSERT INTO product_slots VALUES(45,99); +INSERT INTO product_slots VALUES(45,100); +INSERT INTO product_slots VALUES(45,101); +INSERT INTO product_slots VALUES(45,102); +INSERT INTO product_slots VALUES(45,103); +INSERT INTO product_slots VALUES(45,104); +INSERT INTO product_slots VALUES(45,105); +INSERT INTO product_slots VALUES(45,106); +INSERT INTO product_slots VALUES(45,107); +INSERT INTO product_slots VALUES(45,108); +INSERT INTO product_slots VALUES(45,109); +INSERT INTO product_slots VALUES(45,110); +INSERT INTO product_slots VALUES(45,111); +INSERT INTO product_slots VALUES(45,112); +INSERT INTO product_slots VALUES(45,113); +INSERT INTO product_slots VALUES(45,114); +INSERT INTO product_slots VALUES(45,115); +INSERT INTO product_slots VALUES(45,116); +INSERT INTO product_slots VALUES(45,117); +INSERT INTO product_slots VALUES(45,118); +INSERT INTO product_slots VALUES(45,119); +INSERT INTO product_slots VALUES(45,120); +INSERT INTO product_slots VALUES(45,121); +INSERT INTO product_slots VALUES(45,122); +INSERT INTO product_slots VALUES(45,123); +INSERT INTO product_slots VALUES(45,124); +INSERT INTO product_slots VALUES(45,125); +INSERT INTO product_slots VALUES(45,126); +INSERT INTO product_slots VALUES(45,127); +INSERT INTO product_slots VALUES(45,128); +INSERT INTO product_slots VALUES(45,129); +INSERT INTO product_slots VALUES(45,130); +INSERT INTO product_slots VALUES(45,131); +INSERT INTO product_slots VALUES(45,132); +INSERT INTO product_slots VALUES(45,133); +INSERT INTO product_slots VALUES(45,134); +INSERT INTO product_slots VALUES(45,135); +INSERT INTO product_slots VALUES(45,136); +INSERT INTO product_slots VALUES(45,137); +INSERT INTO product_slots VALUES(45,138); +INSERT INTO product_slots VALUES(45,139); +INSERT INTO product_slots VALUES(45,140); +INSERT INTO product_slots VALUES(45,141); +INSERT INTO product_slots VALUES(45,142); +INSERT INTO product_slots VALUES(45,143); +INSERT INTO product_slots VALUES(45,144); +INSERT INTO product_slots VALUES(45,145); +INSERT INTO product_slots VALUES(45,146); +INSERT INTO product_slots VALUES(45,147); +INSERT INTO product_slots VALUES(45,148); +INSERT INTO product_slots VALUES(45,149); +INSERT INTO product_slots VALUES(45,150); +INSERT INTO product_slots VALUES(45,151); +INSERT INTO product_slots VALUES(45,152); +INSERT INTO product_slots VALUES(45,153); +INSERT INTO product_slots VALUES(45,154); +INSERT INTO product_slots VALUES(45,155); +INSERT INTO product_slots VALUES(45,156); +INSERT INTO product_slots VALUES(45,157); +INSERT INTO product_slots VALUES(45,158); +INSERT INTO product_slots VALUES(45,159); +INSERT INTO product_slots VALUES(45,160); +INSERT INTO product_slots VALUES(45,161); +INSERT INTO product_slots VALUES(45,162); +INSERT INTO product_slots VALUES(45,163); +INSERT INTO product_slots VALUES(45,164); +INSERT INTO product_slots VALUES(45,165); +INSERT INTO product_slots VALUES(45,166); +INSERT INTO product_slots VALUES(45,167); +INSERT INTO product_slots VALUES(45,168); +INSERT INTO product_slots VALUES(45,169); +INSERT INTO product_slots VALUES(45,170); +INSERT INTO product_slots VALUES(45,171); +INSERT INTO product_slots VALUES(45,172); +INSERT INTO product_slots VALUES(45,173); +INSERT INTO product_slots VALUES(45,174); +INSERT INTO product_slots VALUES(45,175); +INSERT INTO product_slots VALUES(45,176); +INSERT INTO product_slots VALUES(45,177); +INSERT INTO product_slots VALUES(45,178); +INSERT INTO product_slots VALUES(45,179); +INSERT INTO product_slots VALUES(45,180); +INSERT INTO product_slots VALUES(45,181); +INSERT INTO product_slots VALUES(45,182); +INSERT INTO product_slots VALUES(45,183); +INSERT INTO product_slots VALUES(45,184); +INSERT INTO product_slots VALUES(45,185); +INSERT INTO product_slots VALUES(45,186); +INSERT INTO product_slots VALUES(45,187); +INSERT INTO product_slots VALUES(45,188); +INSERT INTO product_slots VALUES(45,189); +INSERT INTO product_slots VALUES(45,190); +INSERT INTO product_slots VALUES(45,191); +INSERT INTO product_slots VALUES(45,192); +INSERT INTO product_slots VALUES(45,193); +INSERT INTO product_slots VALUES(45,194); +INSERT INTO product_slots VALUES(45,195); +INSERT INTO product_slots VALUES(45,196); +INSERT INTO product_slots VALUES(45,197); +INSERT INTO product_slots VALUES(45,198); +INSERT INTO product_slots VALUES(45,199); +INSERT INTO product_slots VALUES(45,200); +INSERT INTO product_slots VALUES(45,201); +INSERT INTO product_slots VALUES(45,202); +INSERT INTO product_slots VALUES(45,203); +INSERT INTO product_slots VALUES(45,204); +INSERT INTO product_slots VALUES(45,205); +INSERT INTO product_slots VALUES(45,206); +INSERT INTO product_slots VALUES(45,207); +INSERT INTO product_slots VALUES(45,208); +INSERT INTO product_slots VALUES(45,209); +INSERT INTO product_slots VALUES(45,210); +INSERT INTO product_slots VALUES(45,211); +INSERT INTO product_slots VALUES(45,212); +INSERT INTO product_slots VALUES(45,213); +INSERT INTO product_slots VALUES(45,214); +INSERT INTO product_slots VALUES(45,215); +INSERT INTO product_slots VALUES(45,216); +INSERT INTO product_slots VALUES(45,217); +INSERT INTO product_slots VALUES(45,218); +INSERT INTO product_slots VALUES(45,219); +INSERT INTO product_slots VALUES(45,220); +INSERT INTO product_slots VALUES(45,221); +INSERT INTO product_slots VALUES(45,222); +INSERT INTO product_slots VALUES(45,223); +INSERT INTO product_slots VALUES(45,224); +INSERT INTO product_slots VALUES(45,225); +INSERT INTO product_slots VALUES(45,226); +INSERT INTO product_slots VALUES(45,227); +INSERT INTO product_slots VALUES(45,228); +INSERT INTO product_slots VALUES(45,229); +INSERT INTO product_slots VALUES(45,230); +INSERT INTO product_slots VALUES(45,231); +INSERT INTO product_slots VALUES(45,232); +INSERT INTO product_slots VALUES(45,233); +INSERT INTO product_slots VALUES(45,234); +INSERT INTO product_slots VALUES(45,235); +INSERT INTO product_slots VALUES(45,236); +INSERT INTO product_slots VALUES(45,237); +INSERT INTO product_slots VALUES(45,238); +INSERT INTO product_slots VALUES(45,239); +INSERT INTO product_slots VALUES(45,240); +INSERT INTO product_slots VALUES(45,241); +INSERT INTO product_slots VALUES(45,242); +INSERT INTO product_slots VALUES(45,243); +INSERT INTO product_slots VALUES(45,244); +INSERT INTO product_slots VALUES(45,274); +INSERT INTO product_slots VALUES(45,275); +INSERT INTO product_slots VALUES(45,279); +INSERT INTO product_slots VALUES(45,280); +INSERT INTO product_slots VALUES(45,281); +INSERT INTO product_slots VALUES(45,282); +INSERT INTO product_slots VALUES(45,283); +INSERT INTO product_slots VALUES(45,284); +INSERT INTO product_slots VALUES(45,285); +INSERT INTO product_slots VALUES(45,286); +INSERT INTO product_slots VALUES(45,287); +INSERT INTO product_slots VALUES(46,39); +INSERT INTO product_slots VALUES(46,40); +INSERT INTO product_slots VALUES(46,43); +INSERT INTO product_slots VALUES(46,45); +INSERT INTO product_slots VALUES(46,46); +INSERT INTO product_slots VALUES(46,48); +INSERT INTO product_slots VALUES(46,49); +INSERT INTO product_slots VALUES(46,51); +INSERT INTO product_slots VALUES(46,52); +INSERT INTO product_slots VALUES(46,53); +INSERT INTO product_slots VALUES(46,54); +INSERT INTO product_slots VALUES(46,57); +INSERT INTO product_slots VALUES(46,58); +INSERT INTO product_slots VALUES(46,59); +INSERT INTO product_slots VALUES(46,60); +INSERT INTO product_slots VALUES(46,61); +INSERT INTO product_slots VALUES(46,62); +INSERT INTO product_slots VALUES(46,63); +INSERT INTO product_slots VALUES(46,64); +INSERT INTO product_slots VALUES(46,65); +INSERT INTO product_slots VALUES(46,66); +INSERT INTO product_slots VALUES(46,67); +INSERT INTO product_slots VALUES(46,68); +INSERT INTO product_slots VALUES(46,69); +INSERT INTO product_slots VALUES(46,70); +INSERT INTO product_slots VALUES(46,71); +INSERT INTO product_slots VALUES(46,72); +INSERT INTO product_slots VALUES(46,73); +INSERT INTO product_slots VALUES(46,74); +INSERT INTO product_slots VALUES(46,75); +INSERT INTO product_slots VALUES(46,76); +INSERT INTO product_slots VALUES(46,77); +INSERT INTO product_slots VALUES(46,78); +INSERT INTO product_slots VALUES(46,79); +INSERT INTO product_slots VALUES(46,80); +INSERT INTO product_slots VALUES(46,81); +INSERT INTO product_slots VALUES(46,82); +INSERT INTO product_slots VALUES(46,83); +INSERT INTO product_slots VALUES(46,84); +INSERT INTO product_slots VALUES(46,85); +INSERT INTO product_slots VALUES(46,86); +INSERT INTO product_slots VALUES(46,87); +INSERT INTO product_slots VALUES(46,88); +INSERT INTO product_slots VALUES(46,89); +INSERT INTO product_slots VALUES(46,90); +INSERT INTO product_slots VALUES(46,91); +INSERT INTO product_slots VALUES(46,92); +INSERT INTO product_slots VALUES(46,93); +INSERT INTO product_slots VALUES(46,94); +INSERT INTO product_slots VALUES(46,95); +INSERT INTO product_slots VALUES(46,96); +INSERT INTO product_slots VALUES(46,97); +INSERT INTO product_slots VALUES(46,98); +INSERT INTO product_slots VALUES(46,99); +INSERT INTO product_slots VALUES(46,100); +INSERT INTO product_slots VALUES(46,102); +INSERT INTO product_slots VALUES(46,103); +INSERT INTO product_slots VALUES(46,104); +INSERT INTO product_slots VALUES(46,105); +INSERT INTO product_slots VALUES(46,106); +INSERT INTO product_slots VALUES(46,107); +INSERT INTO product_slots VALUES(46,108); +INSERT INTO product_slots VALUES(46,109); +INSERT INTO product_slots VALUES(46,110); +INSERT INTO product_slots VALUES(46,111); +INSERT INTO product_slots VALUES(46,112); +INSERT INTO product_slots VALUES(46,113); +INSERT INTO product_slots VALUES(46,114); +INSERT INTO product_slots VALUES(46,115); +INSERT INTO product_slots VALUES(46,117); +INSERT INTO product_slots VALUES(46,118); +INSERT INTO product_slots VALUES(46,119); +INSERT INTO product_slots VALUES(46,120); +INSERT INTO product_slots VALUES(46,121); +INSERT INTO product_slots VALUES(46,122); +INSERT INTO product_slots VALUES(46,123); +INSERT INTO product_slots VALUES(46,124); +INSERT INTO product_slots VALUES(46,125); +INSERT INTO product_slots VALUES(46,126); +INSERT INTO product_slots VALUES(46,127); +INSERT INTO product_slots VALUES(46,128); +INSERT INTO product_slots VALUES(46,129); +INSERT INTO product_slots VALUES(46,130); +INSERT INTO product_slots VALUES(46,131); +INSERT INTO product_slots VALUES(46,132); +INSERT INTO product_slots VALUES(46,133); +INSERT INTO product_slots VALUES(46,134); +INSERT INTO product_slots VALUES(46,135); +INSERT INTO product_slots VALUES(46,136); +INSERT INTO product_slots VALUES(46,138); +INSERT INTO product_slots VALUES(46,139); +INSERT INTO product_slots VALUES(46,140); +INSERT INTO product_slots VALUES(46,141); +INSERT INTO product_slots VALUES(46,142); +INSERT INTO product_slots VALUES(46,143); +INSERT INTO product_slots VALUES(46,145); +INSERT INTO product_slots VALUES(46,146); +INSERT INTO product_slots VALUES(46,147); +INSERT INTO product_slots VALUES(46,148); +INSERT INTO product_slots VALUES(46,149); +INSERT INTO product_slots VALUES(46,150); +INSERT INTO product_slots VALUES(46,151); +INSERT INTO product_slots VALUES(46,152); +INSERT INTO product_slots VALUES(46,153); +INSERT INTO product_slots VALUES(46,154); +INSERT INTO product_slots VALUES(46,155); +INSERT INTO product_slots VALUES(46,156); +INSERT INTO product_slots VALUES(46,157); +INSERT INTO product_slots VALUES(46,158); +INSERT INTO product_slots VALUES(46,159); +INSERT INTO product_slots VALUES(46,160); +INSERT INTO product_slots VALUES(46,161); +INSERT INTO product_slots VALUES(46,162); +INSERT INTO product_slots VALUES(46,163); +INSERT INTO product_slots VALUES(46,164); +INSERT INTO product_slots VALUES(46,165); +INSERT INTO product_slots VALUES(46,166); +INSERT INTO product_slots VALUES(46,167); +INSERT INTO product_slots VALUES(46,168); +INSERT INTO product_slots VALUES(46,169); +INSERT INTO product_slots VALUES(46,170); +INSERT INTO product_slots VALUES(46,171); +INSERT INTO product_slots VALUES(46,172); +INSERT INTO product_slots VALUES(46,173); +INSERT INTO product_slots VALUES(46,174); +INSERT INTO product_slots VALUES(46,175); +INSERT INTO product_slots VALUES(46,176); +INSERT INTO product_slots VALUES(46,177); +INSERT INTO product_slots VALUES(46,178); +INSERT INTO product_slots VALUES(46,179); +INSERT INTO product_slots VALUES(46,180); +INSERT INTO product_slots VALUES(46,181); +INSERT INTO product_slots VALUES(46,182); +INSERT INTO product_slots VALUES(46,183); +INSERT INTO product_slots VALUES(46,184); +INSERT INTO product_slots VALUES(46,185); +INSERT INTO product_slots VALUES(46,186); +INSERT INTO product_slots VALUES(46,187); +INSERT INTO product_slots VALUES(46,188); +INSERT INTO product_slots VALUES(46,189); +INSERT INTO product_slots VALUES(46,190); +INSERT INTO product_slots VALUES(46,191); +INSERT INTO product_slots VALUES(46,192); +INSERT INTO product_slots VALUES(46,193); +INSERT INTO product_slots VALUES(46,194); +INSERT INTO product_slots VALUES(46,195); +INSERT INTO product_slots VALUES(46,196); +INSERT INTO product_slots VALUES(46,197); +INSERT INTO product_slots VALUES(46,198); +INSERT INTO product_slots VALUES(46,199); +INSERT INTO product_slots VALUES(46,200); +INSERT INTO product_slots VALUES(46,201); +INSERT INTO product_slots VALUES(46,202); +INSERT INTO product_slots VALUES(46,203); +INSERT INTO product_slots VALUES(46,204); +INSERT INTO product_slots VALUES(46,205); +INSERT INTO product_slots VALUES(46,206); +INSERT INTO product_slots VALUES(46,207); +INSERT INTO product_slots VALUES(46,208); +INSERT INTO product_slots VALUES(46,209); +INSERT INTO product_slots VALUES(46,210); +INSERT INTO product_slots VALUES(46,211); +INSERT INTO product_slots VALUES(46,212); +INSERT INTO product_slots VALUES(46,213); +INSERT INTO product_slots VALUES(46,214); +INSERT INTO product_slots VALUES(46,215); +INSERT INTO product_slots VALUES(46,216); +INSERT INTO product_slots VALUES(46,217); +INSERT INTO product_slots VALUES(46,218); +INSERT INTO product_slots VALUES(46,219); +INSERT INTO product_slots VALUES(46,220); +INSERT INTO product_slots VALUES(46,221); +INSERT INTO product_slots VALUES(46,222); +INSERT INTO product_slots VALUES(46,223); +INSERT INTO product_slots VALUES(46,224); +INSERT INTO product_slots VALUES(46,225); +INSERT INTO product_slots VALUES(46,226); +INSERT INTO product_slots VALUES(46,227); +INSERT INTO product_slots VALUES(46,228); +INSERT INTO product_slots VALUES(46,229); +INSERT INTO product_slots VALUES(46,230); +INSERT INTO product_slots VALUES(46,231); +INSERT INTO product_slots VALUES(46,232); +INSERT INTO product_slots VALUES(46,233); +INSERT INTO product_slots VALUES(46,234); +INSERT INTO product_slots VALUES(46,235); +INSERT INTO product_slots VALUES(46,236); +INSERT INTO product_slots VALUES(46,237); +INSERT INTO product_slots VALUES(46,238); +INSERT INTO product_slots VALUES(46,239); +INSERT INTO product_slots VALUES(46,240); +INSERT INTO product_slots VALUES(46,241); +INSERT INTO product_slots VALUES(46,242); +INSERT INTO product_slots VALUES(46,243); +INSERT INTO product_slots VALUES(46,244); +INSERT INTO product_slots VALUES(46,274); +INSERT INTO product_slots VALUES(46,275); +INSERT INTO product_slots VALUES(46,279); +INSERT INTO product_slots VALUES(46,280); +INSERT INTO product_slots VALUES(46,281); +INSERT INTO product_slots VALUES(46,282); +INSERT INTO product_slots VALUES(46,283); +INSERT INTO product_slots VALUES(46,284); +INSERT INTO product_slots VALUES(46,285); +INSERT INTO product_slots VALUES(46,286); +INSERT INTO product_slots VALUES(46,287); +INSERT INTO product_slots VALUES(47,39); +INSERT INTO product_slots VALUES(47,40); +INSERT INTO product_slots VALUES(47,43); +INSERT INTO product_slots VALUES(47,45); +INSERT INTO product_slots VALUES(47,46); +INSERT INTO product_slots VALUES(47,48); +INSERT INTO product_slots VALUES(47,49); +INSERT INTO product_slots VALUES(47,51); +INSERT INTO product_slots VALUES(47,52); +INSERT INTO product_slots VALUES(47,53); +INSERT INTO product_slots VALUES(47,54); +INSERT INTO product_slots VALUES(47,57); +INSERT INTO product_slots VALUES(47,58); +INSERT INTO product_slots VALUES(47,59); +INSERT INTO product_slots VALUES(47,60); +INSERT INTO product_slots VALUES(47,61); +INSERT INTO product_slots VALUES(47,62); +INSERT INTO product_slots VALUES(47,63); +INSERT INTO product_slots VALUES(47,64); +INSERT INTO product_slots VALUES(47,65); +INSERT INTO product_slots VALUES(47,66); +INSERT INTO product_slots VALUES(47,67); +INSERT INTO product_slots VALUES(47,68); +INSERT INTO product_slots VALUES(47,69); +INSERT INTO product_slots VALUES(47,70); +INSERT INTO product_slots VALUES(47,71); +INSERT INTO product_slots VALUES(47,72); +INSERT INTO product_slots VALUES(47,73); +INSERT INTO product_slots VALUES(47,74); +INSERT INTO product_slots VALUES(47,75); +INSERT INTO product_slots VALUES(47,76); +INSERT INTO product_slots VALUES(47,77); +INSERT INTO product_slots VALUES(47,78); +INSERT INTO product_slots VALUES(47,79); +INSERT INTO product_slots VALUES(47,80); +INSERT INTO product_slots VALUES(47,81); +INSERT INTO product_slots VALUES(47,82); +INSERT INTO product_slots VALUES(47,83); +INSERT INTO product_slots VALUES(47,84); +INSERT INTO product_slots VALUES(47,85); +INSERT INTO product_slots VALUES(47,86); +INSERT INTO product_slots VALUES(47,87); +INSERT INTO product_slots VALUES(47,88); +INSERT INTO product_slots VALUES(47,89); +INSERT INTO product_slots VALUES(47,90); +INSERT INTO product_slots VALUES(47,91); +INSERT INTO product_slots VALUES(47,92); +INSERT INTO product_slots VALUES(47,93); +INSERT INTO product_slots VALUES(47,94); +INSERT INTO product_slots VALUES(47,95); +INSERT INTO product_slots VALUES(47,96); +INSERT INTO product_slots VALUES(47,97); +INSERT INTO product_slots VALUES(47,98); +INSERT INTO product_slots VALUES(47,99); +INSERT INTO product_slots VALUES(47,100); +INSERT INTO product_slots VALUES(47,102); +INSERT INTO product_slots VALUES(47,103); +INSERT INTO product_slots VALUES(47,104); +INSERT INTO product_slots VALUES(47,105); +INSERT INTO product_slots VALUES(47,106); +INSERT INTO product_slots VALUES(47,107); +INSERT INTO product_slots VALUES(47,108); +INSERT INTO product_slots VALUES(47,109); +INSERT INTO product_slots VALUES(47,110); +INSERT INTO product_slots VALUES(47,111); +INSERT INTO product_slots VALUES(47,112); +INSERT INTO product_slots VALUES(47,113); +INSERT INTO product_slots VALUES(47,114); +INSERT INTO product_slots VALUES(47,115); +INSERT INTO product_slots VALUES(47,117); +INSERT INTO product_slots VALUES(47,118); +INSERT INTO product_slots VALUES(47,119); +INSERT INTO product_slots VALUES(47,120); +INSERT INTO product_slots VALUES(47,121); +INSERT INTO product_slots VALUES(47,122); +INSERT INTO product_slots VALUES(47,123); +INSERT INTO product_slots VALUES(47,124); +INSERT INTO product_slots VALUES(47,125); +INSERT INTO product_slots VALUES(47,126); +INSERT INTO product_slots VALUES(47,127); +INSERT INTO product_slots VALUES(47,128); +INSERT INTO product_slots VALUES(47,129); +INSERT INTO product_slots VALUES(47,130); +INSERT INTO product_slots VALUES(47,131); +INSERT INTO product_slots VALUES(47,132); +INSERT INTO product_slots VALUES(47,133); +INSERT INTO product_slots VALUES(47,134); +INSERT INTO product_slots VALUES(47,135); +INSERT INTO product_slots VALUES(47,136); +INSERT INTO product_slots VALUES(47,138); +INSERT INTO product_slots VALUES(47,139); +INSERT INTO product_slots VALUES(47,140); +INSERT INTO product_slots VALUES(47,141); +INSERT INTO product_slots VALUES(47,142); +INSERT INTO product_slots VALUES(47,143); +INSERT INTO product_slots VALUES(47,145); +INSERT INTO product_slots VALUES(47,146); +INSERT INTO product_slots VALUES(47,147); +INSERT INTO product_slots VALUES(47,148); +INSERT INTO product_slots VALUES(47,149); +INSERT INTO product_slots VALUES(47,150); +INSERT INTO product_slots VALUES(47,151); +INSERT INTO product_slots VALUES(47,152); +INSERT INTO product_slots VALUES(47,153); +INSERT INTO product_slots VALUES(47,154); +INSERT INTO product_slots VALUES(47,155); +INSERT INTO product_slots VALUES(47,156); +INSERT INTO product_slots VALUES(47,157); +INSERT INTO product_slots VALUES(47,158); +INSERT INTO product_slots VALUES(47,159); +INSERT INTO product_slots VALUES(47,160); +INSERT INTO product_slots VALUES(47,161); +INSERT INTO product_slots VALUES(47,162); +INSERT INTO product_slots VALUES(47,163); +INSERT INTO product_slots VALUES(47,164); +INSERT INTO product_slots VALUES(47,165); +INSERT INTO product_slots VALUES(47,166); +INSERT INTO product_slots VALUES(47,167); +INSERT INTO product_slots VALUES(47,168); +INSERT INTO product_slots VALUES(47,169); +INSERT INTO product_slots VALUES(47,170); +INSERT INTO product_slots VALUES(47,171); +INSERT INTO product_slots VALUES(47,172); +INSERT INTO product_slots VALUES(47,173); +INSERT INTO product_slots VALUES(47,174); +INSERT INTO product_slots VALUES(47,175); +INSERT INTO product_slots VALUES(47,176); +INSERT INTO product_slots VALUES(47,177); +INSERT INTO product_slots VALUES(47,178); +INSERT INTO product_slots VALUES(47,179); +INSERT INTO product_slots VALUES(47,180); +INSERT INTO product_slots VALUES(47,181); +INSERT INTO product_slots VALUES(47,182); +INSERT INTO product_slots VALUES(47,183); +INSERT INTO product_slots VALUES(47,184); +INSERT INTO product_slots VALUES(47,185); +INSERT INTO product_slots VALUES(47,186); +INSERT INTO product_slots VALUES(47,187); +INSERT INTO product_slots VALUES(47,188); +INSERT INTO product_slots VALUES(47,189); +INSERT INTO product_slots VALUES(47,190); +INSERT INTO product_slots VALUES(47,191); +INSERT INTO product_slots VALUES(47,192); +INSERT INTO product_slots VALUES(47,193); +INSERT INTO product_slots VALUES(47,194); +INSERT INTO product_slots VALUES(47,195); +INSERT INTO product_slots VALUES(47,196); +INSERT INTO product_slots VALUES(47,197); +INSERT INTO product_slots VALUES(47,198); +INSERT INTO product_slots VALUES(47,199); +INSERT INTO product_slots VALUES(47,200); +INSERT INTO product_slots VALUES(47,201); +INSERT INTO product_slots VALUES(47,202); +INSERT INTO product_slots VALUES(47,203); +INSERT INTO product_slots VALUES(47,204); +INSERT INTO product_slots VALUES(47,205); +INSERT INTO product_slots VALUES(47,206); +INSERT INTO product_slots VALUES(47,207); +INSERT INTO product_slots VALUES(47,208); +INSERT INTO product_slots VALUES(47,209); +INSERT INTO product_slots VALUES(47,210); +INSERT INTO product_slots VALUES(47,211); +INSERT INTO product_slots VALUES(47,212); +INSERT INTO product_slots VALUES(47,213); +INSERT INTO product_slots VALUES(47,214); +INSERT INTO product_slots VALUES(47,215); +INSERT INTO product_slots VALUES(47,216); +INSERT INTO product_slots VALUES(47,217); +INSERT INTO product_slots VALUES(47,218); +INSERT INTO product_slots VALUES(47,219); +INSERT INTO product_slots VALUES(47,220); +INSERT INTO product_slots VALUES(47,221); +INSERT INTO product_slots VALUES(47,222); +INSERT INTO product_slots VALUES(47,223); +INSERT INTO product_slots VALUES(47,224); +INSERT INTO product_slots VALUES(47,225); +INSERT INTO product_slots VALUES(47,226); +INSERT INTO product_slots VALUES(47,227); +INSERT INTO product_slots VALUES(47,228); +INSERT INTO product_slots VALUES(47,229); +INSERT INTO product_slots VALUES(47,230); +INSERT INTO product_slots VALUES(47,231); +INSERT INTO product_slots VALUES(47,232); +INSERT INTO product_slots VALUES(47,233); +INSERT INTO product_slots VALUES(47,234); +INSERT INTO product_slots VALUES(47,235); +INSERT INTO product_slots VALUES(47,236); +INSERT INTO product_slots VALUES(47,237); +INSERT INTO product_slots VALUES(47,238); +INSERT INTO product_slots VALUES(47,239); +INSERT INTO product_slots VALUES(47,240); +INSERT INTO product_slots VALUES(47,241); +INSERT INTO product_slots VALUES(47,242); +INSERT INTO product_slots VALUES(47,243); +INSERT INTO product_slots VALUES(47,244); +INSERT INTO product_slots VALUES(47,274); +INSERT INTO product_slots VALUES(47,275); +INSERT INTO product_slots VALUES(47,279); +INSERT INTO product_slots VALUES(47,280); +INSERT INTO product_slots VALUES(47,281); +INSERT INTO product_slots VALUES(47,282); +INSERT INTO product_slots VALUES(47,283); +INSERT INTO product_slots VALUES(47,284); +INSERT INTO product_slots VALUES(47,285); +INSERT INTO product_slots VALUES(47,286); +INSERT INTO product_slots VALUES(47,287); +INSERT INTO product_slots VALUES(48,39); +INSERT INTO product_slots VALUES(48,43); +INSERT INTO product_slots VALUES(48,45); +INSERT INTO product_slots VALUES(48,46); +INSERT INTO product_slots VALUES(48,48); +INSERT INTO product_slots VALUES(48,49); +INSERT INTO product_slots VALUES(48,51); +INSERT INTO product_slots VALUES(48,52); +INSERT INTO product_slots VALUES(48,53); +INSERT INTO product_slots VALUES(48,54); +INSERT INTO product_slots VALUES(48,57); +INSERT INTO product_slots VALUES(48,58); +INSERT INTO product_slots VALUES(48,59); +INSERT INTO product_slots VALUES(48,60); +INSERT INTO product_slots VALUES(48,61); +INSERT INTO product_slots VALUES(48,62); +INSERT INTO product_slots VALUES(48,63); +INSERT INTO product_slots VALUES(48,64); +INSERT INTO product_slots VALUES(48,65); +INSERT INTO product_slots VALUES(48,66); +INSERT INTO product_slots VALUES(48,67); +INSERT INTO product_slots VALUES(48,68); +INSERT INTO product_slots VALUES(48,69); +INSERT INTO product_slots VALUES(48,70); +INSERT INTO product_slots VALUES(48,71); +INSERT INTO product_slots VALUES(48,72); +INSERT INTO product_slots VALUES(48,73); +INSERT INTO product_slots VALUES(48,74); +INSERT INTO product_slots VALUES(48,75); +INSERT INTO product_slots VALUES(48,76); +INSERT INTO product_slots VALUES(48,77); +INSERT INTO product_slots VALUES(48,78); +INSERT INTO product_slots VALUES(48,79); +INSERT INTO product_slots VALUES(48,80); +INSERT INTO product_slots VALUES(48,81); +INSERT INTO product_slots VALUES(48,82); +INSERT INTO product_slots VALUES(48,83); +INSERT INTO product_slots VALUES(48,84); +INSERT INTO product_slots VALUES(48,85); +INSERT INTO product_slots VALUES(48,86); +INSERT INTO product_slots VALUES(48,87); +INSERT INTO product_slots VALUES(48,88); +INSERT INTO product_slots VALUES(48,89); +INSERT INTO product_slots VALUES(48,90); +INSERT INTO product_slots VALUES(48,91); +INSERT INTO product_slots VALUES(48,92); +INSERT INTO product_slots VALUES(48,93); +INSERT INTO product_slots VALUES(48,94); +INSERT INTO product_slots VALUES(48,95); +INSERT INTO product_slots VALUES(48,96); +INSERT INTO product_slots VALUES(48,97); +INSERT INTO product_slots VALUES(48,98); +INSERT INTO product_slots VALUES(48,99); +INSERT INTO product_slots VALUES(48,100); +INSERT INTO product_slots VALUES(48,102); +INSERT INTO product_slots VALUES(48,103); +INSERT INTO product_slots VALUES(48,104); +INSERT INTO product_slots VALUES(48,105); +INSERT INTO product_slots VALUES(48,106); +INSERT INTO product_slots VALUES(48,107); +INSERT INTO product_slots VALUES(48,108); +INSERT INTO product_slots VALUES(48,109); +INSERT INTO product_slots VALUES(48,110); +INSERT INTO product_slots VALUES(48,111); +INSERT INTO product_slots VALUES(48,112); +INSERT INTO product_slots VALUES(48,113); +INSERT INTO product_slots VALUES(48,114); +INSERT INTO product_slots VALUES(48,115); +INSERT INTO product_slots VALUES(48,117); +INSERT INTO product_slots VALUES(48,118); +INSERT INTO product_slots VALUES(48,119); +INSERT INTO product_slots VALUES(48,120); +INSERT INTO product_slots VALUES(48,121); +INSERT INTO product_slots VALUES(48,122); +INSERT INTO product_slots VALUES(48,124); +INSERT INTO product_slots VALUES(48,125); +INSERT INTO product_slots VALUES(48,126); +INSERT INTO product_slots VALUES(48,127); +INSERT INTO product_slots VALUES(48,128); +INSERT INTO product_slots VALUES(48,129); +INSERT INTO product_slots VALUES(48,130); +INSERT INTO product_slots VALUES(48,131); +INSERT INTO product_slots VALUES(48,132); +INSERT INTO product_slots VALUES(48,133); +INSERT INTO product_slots VALUES(48,134); +INSERT INTO product_slots VALUES(48,135); +INSERT INTO product_slots VALUES(48,136); +INSERT INTO product_slots VALUES(48,138); +INSERT INTO product_slots VALUES(48,139); +INSERT INTO product_slots VALUES(48,140); +INSERT INTO product_slots VALUES(48,141); +INSERT INTO product_slots VALUES(48,142); +INSERT INTO product_slots VALUES(48,143); +INSERT INTO product_slots VALUES(48,145); +INSERT INTO product_slots VALUES(48,146); +INSERT INTO product_slots VALUES(48,147); +INSERT INTO product_slots VALUES(48,148); +INSERT INTO product_slots VALUES(48,149); +INSERT INTO product_slots VALUES(48,150); +INSERT INTO product_slots VALUES(48,151); +INSERT INTO product_slots VALUES(48,152); +INSERT INTO product_slots VALUES(48,153); +INSERT INTO product_slots VALUES(48,154); +INSERT INTO product_slots VALUES(48,155); +INSERT INTO product_slots VALUES(48,156); +INSERT INTO product_slots VALUES(48,157); +INSERT INTO product_slots VALUES(48,158); +INSERT INTO product_slots VALUES(48,159); +INSERT INTO product_slots VALUES(48,160); +INSERT INTO product_slots VALUES(48,161); +INSERT INTO product_slots VALUES(48,162); +INSERT INTO product_slots VALUES(48,163); +INSERT INTO product_slots VALUES(48,164); +INSERT INTO product_slots VALUES(48,165); +INSERT INTO product_slots VALUES(48,166); +INSERT INTO product_slots VALUES(48,167); +INSERT INTO product_slots VALUES(48,168); +INSERT INTO product_slots VALUES(48,169); +INSERT INTO product_slots VALUES(48,170); +INSERT INTO product_slots VALUES(48,171); +INSERT INTO product_slots VALUES(48,172); +INSERT INTO product_slots VALUES(48,173); +INSERT INTO product_slots VALUES(48,174); +INSERT INTO product_slots VALUES(48,175); +INSERT INTO product_slots VALUES(48,176); +INSERT INTO product_slots VALUES(48,177); +INSERT INTO product_slots VALUES(48,178); +INSERT INTO product_slots VALUES(48,179); +INSERT INTO product_slots VALUES(48,180); +INSERT INTO product_slots VALUES(48,181); +INSERT INTO product_slots VALUES(48,182); +INSERT INTO product_slots VALUES(48,183); +INSERT INTO product_slots VALUES(48,184); +INSERT INTO product_slots VALUES(48,185); +INSERT INTO product_slots VALUES(48,186); +INSERT INTO product_slots VALUES(48,187); +INSERT INTO product_slots VALUES(48,188); +INSERT INTO product_slots VALUES(48,189); +INSERT INTO product_slots VALUES(48,190); +INSERT INTO product_slots VALUES(48,191); +INSERT INTO product_slots VALUES(48,192); +INSERT INTO product_slots VALUES(48,193); +INSERT INTO product_slots VALUES(48,194); +INSERT INTO product_slots VALUES(48,195); +INSERT INTO product_slots VALUES(48,196); +INSERT INTO product_slots VALUES(48,197); +INSERT INTO product_slots VALUES(48,198); +INSERT INTO product_slots VALUES(48,199); +INSERT INTO product_slots VALUES(48,200); +INSERT INTO product_slots VALUES(48,201); +INSERT INTO product_slots VALUES(48,202); +INSERT INTO product_slots VALUES(48,203); +INSERT INTO product_slots VALUES(48,204); +INSERT INTO product_slots VALUES(48,205); +INSERT INTO product_slots VALUES(48,206); +INSERT INTO product_slots VALUES(48,207); +INSERT INTO product_slots VALUES(48,208); +INSERT INTO product_slots VALUES(48,209); +INSERT INTO product_slots VALUES(48,210); +INSERT INTO product_slots VALUES(48,211); +INSERT INTO product_slots VALUES(48,212); +INSERT INTO product_slots VALUES(48,213); +INSERT INTO product_slots VALUES(48,214); +INSERT INTO product_slots VALUES(48,215); +INSERT INTO product_slots VALUES(48,216); +INSERT INTO product_slots VALUES(48,217); +INSERT INTO product_slots VALUES(48,218); +INSERT INTO product_slots VALUES(48,219); +INSERT INTO product_slots VALUES(48,220); +INSERT INTO product_slots VALUES(48,221); +INSERT INTO product_slots VALUES(48,222); +INSERT INTO product_slots VALUES(48,223); +INSERT INTO product_slots VALUES(48,224); +INSERT INTO product_slots VALUES(48,225); +INSERT INTO product_slots VALUES(48,226); +INSERT INTO product_slots VALUES(48,227); +INSERT INTO product_slots VALUES(48,228); +INSERT INTO product_slots VALUES(48,229); +INSERT INTO product_slots VALUES(48,230); +INSERT INTO product_slots VALUES(48,231); +INSERT INTO product_slots VALUES(48,232); +INSERT INTO product_slots VALUES(48,233); +INSERT INTO product_slots VALUES(48,234); +INSERT INTO product_slots VALUES(48,235); +INSERT INTO product_slots VALUES(48,236); +INSERT INTO product_slots VALUES(48,237); +INSERT INTO product_slots VALUES(48,238); +INSERT INTO product_slots VALUES(48,239); +INSERT INTO product_slots VALUES(48,240); +INSERT INTO product_slots VALUES(48,241); +INSERT INTO product_slots VALUES(48,242); +INSERT INTO product_slots VALUES(48,243); +INSERT INTO product_slots VALUES(48,244); +INSERT INTO product_slots VALUES(48,274); +INSERT INTO product_slots VALUES(48,275); +INSERT INTO product_slots VALUES(48,279); +INSERT INTO product_slots VALUES(48,280); +INSERT INTO product_slots VALUES(48,281); +INSERT INTO product_slots VALUES(48,282); +INSERT INTO product_slots VALUES(48,283); +INSERT INTO product_slots VALUES(48,284); +INSERT INTO product_slots VALUES(48,285); +INSERT INTO product_slots VALUES(48,286); +INSERT INTO product_slots VALUES(48,287); +INSERT INTO product_slots VALUES(49,40); +INSERT INTO product_slots VALUES(49,74); +INSERT INTO product_slots VALUES(49,75); +INSERT INTO product_slots VALUES(49,76); +INSERT INTO product_slots VALUES(49,77); +INSERT INTO product_slots VALUES(49,78); +INSERT INTO product_slots VALUES(49,79); +INSERT INTO product_slots VALUES(49,80); +INSERT INTO product_slots VALUES(49,102); +INSERT INTO product_slots VALUES(49,103); +INSERT INTO product_slots VALUES(49,104); +INSERT INTO product_slots VALUES(49,105); +INSERT INTO product_slots VALUES(49,106); +INSERT INTO product_slots VALUES(49,107); +INSERT INTO product_slots VALUES(49,108); +INSERT INTO product_slots VALUES(49,109); +INSERT INTO product_slots VALUES(49,110); +INSERT INTO product_slots VALUES(49,111); +INSERT INTO product_slots VALUES(49,112); +INSERT INTO product_slots VALUES(49,113); +INSERT INTO product_slots VALUES(49,114); +INSERT INTO product_slots VALUES(49,115); +INSERT INTO product_slots VALUES(49,117); +INSERT INTO product_slots VALUES(49,118); +INSERT INTO product_slots VALUES(49,119); +INSERT INTO product_slots VALUES(49,120); +INSERT INTO product_slots VALUES(49,121); +INSERT INTO product_slots VALUES(49,122); +INSERT INTO product_slots VALUES(49,123); +INSERT INTO product_slots VALUES(49,124); +INSERT INTO product_slots VALUES(49,125); +INSERT INTO product_slots VALUES(49,126); +INSERT INTO product_slots VALUES(49,127); +INSERT INTO product_slots VALUES(49,128); +INSERT INTO product_slots VALUES(49,129); +INSERT INTO product_slots VALUES(49,130); +INSERT INTO product_slots VALUES(49,131); +INSERT INTO product_slots VALUES(49,132); +INSERT INTO product_slots VALUES(49,133); +INSERT INTO product_slots VALUES(49,134); +INSERT INTO product_slots VALUES(49,135); +INSERT INTO product_slots VALUES(49,136); +INSERT INTO product_slots VALUES(49,137); +INSERT INTO product_slots VALUES(49,138); +INSERT INTO product_slots VALUES(49,139); +INSERT INTO product_slots VALUES(49,140); +INSERT INTO product_slots VALUES(49,141); +INSERT INTO product_slots VALUES(49,142); +INSERT INTO product_slots VALUES(49,143); +INSERT INTO product_slots VALUES(49,145); +INSERT INTO product_slots VALUES(49,146); +INSERT INTO product_slots VALUES(49,147); +INSERT INTO product_slots VALUES(49,148); +INSERT INTO product_slots VALUES(49,149); +INSERT INTO product_slots VALUES(49,150); +INSERT INTO product_slots VALUES(49,151); +INSERT INTO product_slots VALUES(49,152); +INSERT INTO product_slots VALUES(49,153); +INSERT INTO product_slots VALUES(49,154); +INSERT INTO product_slots VALUES(49,155); +INSERT INTO product_slots VALUES(49,156); +INSERT INTO product_slots VALUES(49,157); +INSERT INTO product_slots VALUES(49,158); +INSERT INTO product_slots VALUES(49,159); +INSERT INTO product_slots VALUES(49,160); +INSERT INTO product_slots VALUES(49,161); +INSERT INTO product_slots VALUES(49,162); +INSERT INTO product_slots VALUES(49,163); +INSERT INTO product_slots VALUES(49,164); +INSERT INTO product_slots VALUES(49,165); +INSERT INTO product_slots VALUES(49,166); +INSERT INTO product_slots VALUES(49,167); +INSERT INTO product_slots VALUES(49,168); +INSERT INTO product_slots VALUES(49,169); +INSERT INTO product_slots VALUES(49,170); +INSERT INTO product_slots VALUES(49,171); +INSERT INTO product_slots VALUES(49,172); +INSERT INTO product_slots VALUES(49,173); +INSERT INTO product_slots VALUES(49,174); +INSERT INTO product_slots VALUES(49,175); +INSERT INTO product_slots VALUES(49,176); +INSERT INTO product_slots VALUES(49,177); +INSERT INTO product_slots VALUES(49,178); +INSERT INTO product_slots VALUES(49,179); +INSERT INTO product_slots VALUES(49,180); +INSERT INTO product_slots VALUES(49,181); +INSERT INTO product_slots VALUES(49,182); +INSERT INTO product_slots VALUES(49,183); +INSERT INTO product_slots VALUES(49,184); +INSERT INTO product_slots VALUES(49,185); +INSERT INTO product_slots VALUES(49,186); +INSERT INTO product_slots VALUES(49,187); +INSERT INTO product_slots VALUES(49,188); +INSERT INTO product_slots VALUES(49,189); +INSERT INTO product_slots VALUES(49,190); +INSERT INTO product_slots VALUES(49,191); +INSERT INTO product_slots VALUES(49,192); +INSERT INTO product_slots VALUES(49,193); +INSERT INTO product_slots VALUES(49,194); +INSERT INTO product_slots VALUES(49,195); +INSERT INTO product_slots VALUES(49,196); +INSERT INTO product_slots VALUES(49,197); +INSERT INTO product_slots VALUES(49,198); +INSERT INTO product_slots VALUES(49,199); +INSERT INTO product_slots VALUES(49,200); +INSERT INTO product_slots VALUES(49,201); +INSERT INTO product_slots VALUES(49,202); +INSERT INTO product_slots VALUES(49,203); +INSERT INTO product_slots VALUES(49,204); +INSERT INTO product_slots VALUES(49,205); +INSERT INTO product_slots VALUES(49,206); +INSERT INTO product_slots VALUES(49,207); +INSERT INTO product_slots VALUES(49,208); +INSERT INTO product_slots VALUES(49,209); +INSERT INTO product_slots VALUES(49,210); +INSERT INTO product_slots VALUES(49,211); +INSERT INTO product_slots VALUES(49,212); +INSERT INTO product_slots VALUES(49,213); +INSERT INTO product_slots VALUES(49,214); +INSERT INTO product_slots VALUES(49,215); +INSERT INTO product_slots VALUES(49,216); +INSERT INTO product_slots VALUES(49,217); +INSERT INTO product_slots VALUES(49,218); +INSERT INTO product_slots VALUES(49,219); +INSERT INTO product_slots VALUES(49,220); +INSERT INTO product_slots VALUES(49,221); +INSERT INTO product_slots VALUES(49,222); +INSERT INTO product_slots VALUES(49,223); +INSERT INTO product_slots VALUES(49,224); +INSERT INTO product_slots VALUES(49,225); +INSERT INTO product_slots VALUES(49,226); +INSERT INTO product_slots VALUES(49,227); +INSERT INTO product_slots VALUES(49,228); +INSERT INTO product_slots VALUES(49,229); +INSERT INTO product_slots VALUES(49,230); +INSERT INTO product_slots VALUES(49,231); +INSERT INTO product_slots VALUES(49,232); +INSERT INTO product_slots VALUES(49,233); +INSERT INTO product_slots VALUES(49,234); +INSERT INTO product_slots VALUES(49,235); +INSERT INTO product_slots VALUES(49,236); +INSERT INTO product_slots VALUES(49,237); +INSERT INTO product_slots VALUES(49,238); +INSERT INTO product_slots VALUES(49,239); +INSERT INTO product_slots VALUES(49,240); +INSERT INTO product_slots VALUES(49,241); +INSERT INTO product_slots VALUES(49,242); +INSERT INTO product_slots VALUES(49,243); +INSERT INTO product_slots VALUES(49,244); +INSERT INTO product_slots VALUES(49,274); +INSERT INTO product_slots VALUES(49,275); +INSERT INTO product_slots VALUES(49,279); +INSERT INTO product_slots VALUES(49,280); +INSERT INTO product_slots VALUES(49,281); +INSERT INTO product_slots VALUES(49,282); +INSERT INTO product_slots VALUES(49,283); +INSERT INTO product_slots VALUES(49,284); +INSERT INTO product_slots VALUES(49,285); +INSERT INTO product_slots VALUES(49,286); +INSERT INTO product_slots VALUES(49,287); +INSERT INTO product_slots VALUES(50,39); +INSERT INTO product_slots VALUES(50,40); +INSERT INTO product_slots VALUES(50,43); +INSERT INTO product_slots VALUES(50,45); +INSERT INTO product_slots VALUES(50,46); +INSERT INTO product_slots VALUES(50,48); +INSERT INTO product_slots VALUES(50,49); +INSERT INTO product_slots VALUES(50,51); +INSERT INTO product_slots VALUES(50,52); +INSERT INTO product_slots VALUES(50,53); +INSERT INTO product_slots VALUES(50,54); +INSERT INTO product_slots VALUES(50,57); +INSERT INTO product_slots VALUES(50,58); +INSERT INTO product_slots VALUES(50,59); +INSERT INTO product_slots VALUES(50,60); +INSERT INTO product_slots VALUES(50,61); +INSERT INTO product_slots VALUES(50,62); +INSERT INTO product_slots VALUES(50,63); +INSERT INTO product_slots VALUES(50,64); +INSERT INTO product_slots VALUES(50,65); +INSERT INTO product_slots VALUES(50,66); +INSERT INTO product_slots VALUES(50,67); +INSERT INTO product_slots VALUES(50,68); +INSERT INTO product_slots VALUES(50,69); +INSERT INTO product_slots VALUES(50,70); +INSERT INTO product_slots VALUES(50,71); +INSERT INTO product_slots VALUES(50,72); +INSERT INTO product_slots VALUES(50,73); +INSERT INTO product_slots VALUES(50,74); +INSERT INTO product_slots VALUES(50,75); +INSERT INTO product_slots VALUES(50,76); +INSERT INTO product_slots VALUES(50,77); +INSERT INTO product_slots VALUES(50,78); +INSERT INTO product_slots VALUES(50,79); +INSERT INTO product_slots VALUES(50,80); +INSERT INTO product_slots VALUES(50,81); +INSERT INTO product_slots VALUES(50,82); +INSERT INTO product_slots VALUES(50,83); +INSERT INTO product_slots VALUES(50,84); +INSERT INTO product_slots VALUES(50,85); +INSERT INTO product_slots VALUES(50,86); +INSERT INTO product_slots VALUES(50,87); +INSERT INTO product_slots VALUES(50,88); +INSERT INTO product_slots VALUES(50,89); +INSERT INTO product_slots VALUES(50,90); +INSERT INTO product_slots VALUES(50,91); +INSERT INTO product_slots VALUES(50,92); +INSERT INTO product_slots VALUES(50,93); +INSERT INTO product_slots VALUES(50,94); +INSERT INTO product_slots VALUES(50,95); +INSERT INTO product_slots VALUES(50,96); +INSERT INTO product_slots VALUES(50,97); +INSERT INTO product_slots VALUES(50,98); +INSERT INTO product_slots VALUES(50,99); +INSERT INTO product_slots VALUES(50,100); +INSERT INTO product_slots VALUES(50,102); +INSERT INTO product_slots VALUES(50,103); +INSERT INTO product_slots VALUES(50,104); +INSERT INTO product_slots VALUES(50,105); +INSERT INTO product_slots VALUES(50,106); +INSERT INTO product_slots VALUES(50,107); +INSERT INTO product_slots VALUES(50,108); +INSERT INTO product_slots VALUES(50,109); +INSERT INTO product_slots VALUES(50,110); +INSERT INTO product_slots VALUES(50,111); +INSERT INTO product_slots VALUES(50,112); +INSERT INTO product_slots VALUES(50,113); +INSERT INTO product_slots VALUES(50,114); +INSERT INTO product_slots VALUES(50,115); +INSERT INTO product_slots VALUES(50,117); +INSERT INTO product_slots VALUES(50,118); +INSERT INTO product_slots VALUES(50,119); +INSERT INTO product_slots VALUES(50,120); +INSERT INTO product_slots VALUES(50,121); +INSERT INTO product_slots VALUES(50,122); +INSERT INTO product_slots VALUES(50,123); +INSERT INTO product_slots VALUES(50,124); +INSERT INTO product_slots VALUES(50,125); +INSERT INTO product_slots VALUES(50,126); +INSERT INTO product_slots VALUES(50,127); +INSERT INTO product_slots VALUES(50,128); +INSERT INTO product_slots VALUES(50,129); +INSERT INTO product_slots VALUES(50,130); +INSERT INTO product_slots VALUES(50,131); +INSERT INTO product_slots VALUES(50,132); +INSERT INTO product_slots VALUES(50,133); +INSERT INTO product_slots VALUES(50,134); +INSERT INTO product_slots VALUES(50,135); +INSERT INTO product_slots VALUES(50,136); +INSERT INTO product_slots VALUES(50,138); +INSERT INTO product_slots VALUES(50,139); +INSERT INTO product_slots VALUES(50,140); +INSERT INTO product_slots VALUES(50,141); +INSERT INTO product_slots VALUES(50,142); +INSERT INTO product_slots VALUES(50,143); +INSERT INTO product_slots VALUES(50,145); +INSERT INTO product_slots VALUES(50,146); +INSERT INTO product_slots VALUES(50,147); +INSERT INTO product_slots VALUES(50,148); +INSERT INTO product_slots VALUES(50,149); +INSERT INTO product_slots VALUES(50,150); +INSERT INTO product_slots VALUES(50,151); +INSERT INTO product_slots VALUES(50,152); +INSERT INTO product_slots VALUES(50,153); +INSERT INTO product_slots VALUES(50,154); +INSERT INTO product_slots VALUES(50,155); +INSERT INTO product_slots VALUES(50,156); +INSERT INTO product_slots VALUES(50,157); +INSERT INTO product_slots VALUES(50,158); +INSERT INTO product_slots VALUES(50,159); +INSERT INTO product_slots VALUES(50,160); +INSERT INTO product_slots VALUES(50,161); +INSERT INTO product_slots VALUES(50,162); +INSERT INTO product_slots VALUES(50,163); +INSERT INTO product_slots VALUES(50,164); +INSERT INTO product_slots VALUES(50,165); +INSERT INTO product_slots VALUES(50,166); +INSERT INTO product_slots VALUES(50,167); +INSERT INTO product_slots VALUES(50,168); +INSERT INTO product_slots VALUES(50,169); +INSERT INTO product_slots VALUES(50,170); +INSERT INTO product_slots VALUES(50,171); +INSERT INTO product_slots VALUES(50,172); +INSERT INTO product_slots VALUES(50,173); +INSERT INTO product_slots VALUES(50,174); +INSERT INTO product_slots VALUES(50,175); +INSERT INTO product_slots VALUES(50,176); +INSERT INTO product_slots VALUES(50,177); +INSERT INTO product_slots VALUES(50,178); +INSERT INTO product_slots VALUES(50,179); +INSERT INTO product_slots VALUES(50,180); +INSERT INTO product_slots VALUES(50,181); +INSERT INTO product_slots VALUES(50,182); +INSERT INTO product_slots VALUES(50,183); +INSERT INTO product_slots VALUES(50,184); +INSERT INTO product_slots VALUES(50,185); +INSERT INTO product_slots VALUES(50,186); +INSERT INTO product_slots VALUES(50,187); +INSERT INTO product_slots VALUES(50,188); +INSERT INTO product_slots VALUES(50,189); +INSERT INTO product_slots VALUES(50,190); +INSERT INTO product_slots VALUES(50,191); +INSERT INTO product_slots VALUES(50,192); +INSERT INTO product_slots VALUES(50,193); +INSERT INTO product_slots VALUES(50,194); +INSERT INTO product_slots VALUES(50,195); +INSERT INTO product_slots VALUES(50,196); +INSERT INTO product_slots VALUES(50,197); +INSERT INTO product_slots VALUES(50,198); +INSERT INTO product_slots VALUES(50,199); +INSERT INTO product_slots VALUES(50,200); +INSERT INTO product_slots VALUES(50,201); +INSERT INTO product_slots VALUES(50,202); +INSERT INTO product_slots VALUES(50,203); +INSERT INTO product_slots VALUES(50,204); +INSERT INTO product_slots VALUES(50,205); +INSERT INTO product_slots VALUES(50,206); +INSERT INTO product_slots VALUES(50,207); +INSERT INTO product_slots VALUES(50,208); +INSERT INTO product_slots VALUES(50,209); +INSERT INTO product_slots VALUES(50,210); +INSERT INTO product_slots VALUES(50,211); +INSERT INTO product_slots VALUES(50,212); +INSERT INTO product_slots VALUES(50,213); +INSERT INTO product_slots VALUES(50,214); +INSERT INTO product_slots VALUES(50,215); +INSERT INTO product_slots VALUES(50,216); +INSERT INTO product_slots VALUES(50,217); +INSERT INTO product_slots VALUES(50,218); +INSERT INTO product_slots VALUES(50,219); +INSERT INTO product_slots VALUES(50,220); +INSERT INTO product_slots VALUES(50,221); +INSERT INTO product_slots VALUES(50,222); +INSERT INTO product_slots VALUES(50,223); +INSERT INTO product_slots VALUES(50,224); +INSERT INTO product_slots VALUES(50,225); +INSERT INTO product_slots VALUES(50,226); +INSERT INTO product_slots VALUES(50,227); +INSERT INTO product_slots VALUES(50,228); +INSERT INTO product_slots VALUES(50,229); +INSERT INTO product_slots VALUES(50,230); +INSERT INTO product_slots VALUES(50,231); +INSERT INTO product_slots VALUES(50,232); +INSERT INTO product_slots VALUES(50,233); +INSERT INTO product_slots VALUES(50,234); +INSERT INTO product_slots VALUES(50,235); +INSERT INTO product_slots VALUES(50,236); +INSERT INTO product_slots VALUES(50,237); +INSERT INTO product_slots VALUES(50,238); +INSERT INTO product_slots VALUES(50,239); +INSERT INTO product_slots VALUES(50,240); +INSERT INTO product_slots VALUES(50,241); +INSERT INTO product_slots VALUES(50,242); +INSERT INTO product_slots VALUES(50,243); +INSERT INTO product_slots VALUES(50,244); +INSERT INTO product_slots VALUES(50,274); +INSERT INTO product_slots VALUES(50,275); +INSERT INTO product_slots VALUES(50,279); +INSERT INTO product_slots VALUES(50,280); +INSERT INTO product_slots VALUES(50,281); +INSERT INTO product_slots VALUES(50,282); +INSERT INTO product_slots VALUES(50,283); +INSERT INTO product_slots VALUES(50,284); +INSERT INTO product_slots VALUES(50,285); +INSERT INTO product_slots VALUES(50,286); +INSERT INTO product_slots VALUES(50,287); +INSERT INTO product_slots VALUES(51,40); +INSERT INTO product_slots VALUES(51,64); +INSERT INTO product_slots VALUES(51,65); +INSERT INTO product_slots VALUES(51,66); +INSERT INTO product_slots VALUES(51,67); +INSERT INTO product_slots VALUES(51,68); +INSERT INTO product_slots VALUES(51,69); +INSERT INTO product_slots VALUES(51,70); +INSERT INTO product_slots VALUES(51,71); +INSERT INTO product_slots VALUES(51,72); +INSERT INTO product_slots VALUES(51,73); +INSERT INTO product_slots VALUES(51,74); +INSERT INTO product_slots VALUES(51,75); +INSERT INTO product_slots VALUES(51,76); +INSERT INTO product_slots VALUES(51,77); +INSERT INTO product_slots VALUES(51,78); +INSERT INTO product_slots VALUES(51,79); +INSERT INTO product_slots VALUES(51,80); +INSERT INTO product_slots VALUES(51,81); +INSERT INTO product_slots VALUES(51,82); +INSERT INTO product_slots VALUES(51,83); +INSERT INTO product_slots VALUES(51,84); +INSERT INTO product_slots VALUES(51,85); +INSERT INTO product_slots VALUES(51,86); +INSERT INTO product_slots VALUES(51,87); +INSERT INTO product_slots VALUES(51,88); +INSERT INTO product_slots VALUES(51,89); +INSERT INTO product_slots VALUES(51,90); +INSERT INTO product_slots VALUES(51,91); +INSERT INTO product_slots VALUES(51,92); +INSERT INTO product_slots VALUES(51,93); +INSERT INTO product_slots VALUES(51,94); +INSERT INTO product_slots VALUES(51,95); +INSERT INTO product_slots VALUES(51,96); +INSERT INTO product_slots VALUES(51,97); +INSERT INTO product_slots VALUES(51,98); +INSERT INTO product_slots VALUES(51,99); +INSERT INTO product_slots VALUES(51,100); +INSERT INTO product_slots VALUES(51,102); +INSERT INTO product_slots VALUES(51,103); +INSERT INTO product_slots VALUES(51,104); +INSERT INTO product_slots VALUES(51,105); +INSERT INTO product_slots VALUES(51,106); +INSERT INTO product_slots VALUES(51,107); +INSERT INTO product_slots VALUES(51,108); +INSERT INTO product_slots VALUES(51,109); +INSERT INTO product_slots VALUES(51,110); +INSERT INTO product_slots VALUES(51,111); +INSERT INTO product_slots VALUES(51,112); +INSERT INTO product_slots VALUES(51,113); +INSERT INTO product_slots VALUES(51,114); +INSERT INTO product_slots VALUES(51,115); +INSERT INTO product_slots VALUES(51,117); +INSERT INTO product_slots VALUES(51,118); +INSERT INTO product_slots VALUES(51,119); +INSERT INTO product_slots VALUES(51,120); +INSERT INTO product_slots VALUES(51,121); +INSERT INTO product_slots VALUES(51,122); +INSERT INTO product_slots VALUES(51,123); +INSERT INTO product_slots VALUES(51,124); +INSERT INTO product_slots VALUES(51,125); +INSERT INTO product_slots VALUES(51,126); +INSERT INTO product_slots VALUES(51,127); +INSERT INTO product_slots VALUES(51,128); +INSERT INTO product_slots VALUES(51,129); +INSERT INTO product_slots VALUES(51,130); +INSERT INTO product_slots VALUES(51,131); +INSERT INTO product_slots VALUES(51,132); +INSERT INTO product_slots VALUES(51,133); +INSERT INTO product_slots VALUES(51,134); +INSERT INTO product_slots VALUES(51,135); +INSERT INTO product_slots VALUES(51,136); +INSERT INTO product_slots VALUES(51,138); +INSERT INTO product_slots VALUES(51,139); +INSERT INTO product_slots VALUES(51,140); +INSERT INTO product_slots VALUES(51,141); +INSERT INTO product_slots VALUES(51,142); +INSERT INTO product_slots VALUES(51,143); +INSERT INTO product_slots VALUES(51,145); +INSERT INTO product_slots VALUES(51,146); +INSERT INTO product_slots VALUES(51,147); +INSERT INTO product_slots VALUES(51,148); +INSERT INTO product_slots VALUES(51,149); +INSERT INTO product_slots VALUES(51,150); +INSERT INTO product_slots VALUES(51,151); +INSERT INTO product_slots VALUES(51,152); +INSERT INTO product_slots VALUES(51,153); +INSERT INTO product_slots VALUES(51,154); +INSERT INTO product_slots VALUES(51,155); +INSERT INTO product_slots VALUES(51,156); +INSERT INTO product_slots VALUES(51,157); +INSERT INTO product_slots VALUES(51,158); +INSERT INTO product_slots VALUES(51,159); +INSERT INTO product_slots VALUES(51,160); +INSERT INTO product_slots VALUES(51,161); +INSERT INTO product_slots VALUES(51,162); +INSERT INTO product_slots VALUES(51,163); +INSERT INTO product_slots VALUES(51,164); +INSERT INTO product_slots VALUES(51,165); +INSERT INTO product_slots VALUES(51,166); +INSERT INTO product_slots VALUES(51,167); +INSERT INTO product_slots VALUES(51,168); +INSERT INTO product_slots VALUES(51,169); +INSERT INTO product_slots VALUES(51,170); +INSERT INTO product_slots VALUES(51,171); +INSERT INTO product_slots VALUES(51,172); +INSERT INTO product_slots VALUES(51,173); +INSERT INTO product_slots VALUES(51,174); +INSERT INTO product_slots VALUES(51,175); +INSERT INTO product_slots VALUES(51,176); +INSERT INTO product_slots VALUES(51,177); +INSERT INTO product_slots VALUES(51,178); +INSERT INTO product_slots VALUES(51,179); +INSERT INTO product_slots VALUES(51,180); +INSERT INTO product_slots VALUES(51,181); +INSERT INTO product_slots VALUES(51,182); +INSERT INTO product_slots VALUES(51,183); +INSERT INTO product_slots VALUES(51,184); +INSERT INTO product_slots VALUES(51,185); +INSERT INTO product_slots VALUES(51,186); +INSERT INTO product_slots VALUES(51,187); +INSERT INTO product_slots VALUES(51,188); +INSERT INTO product_slots VALUES(51,189); +INSERT INTO product_slots VALUES(51,190); +INSERT INTO product_slots VALUES(51,191); +INSERT INTO product_slots VALUES(51,192); +INSERT INTO product_slots VALUES(51,193); +INSERT INTO product_slots VALUES(51,194); +INSERT INTO product_slots VALUES(51,195); +INSERT INTO product_slots VALUES(51,196); +INSERT INTO product_slots VALUES(51,197); +INSERT INTO product_slots VALUES(51,198); +INSERT INTO product_slots VALUES(51,199); +INSERT INTO product_slots VALUES(51,200); +INSERT INTO product_slots VALUES(51,201); +INSERT INTO product_slots VALUES(51,202); +INSERT INTO product_slots VALUES(51,203); +INSERT INTO product_slots VALUES(51,204); +INSERT INTO product_slots VALUES(51,205); +INSERT INTO product_slots VALUES(51,206); +INSERT INTO product_slots VALUES(51,207); +INSERT INTO product_slots VALUES(51,208); +INSERT INTO product_slots VALUES(51,209); +INSERT INTO product_slots VALUES(51,210); +INSERT INTO product_slots VALUES(51,211); +INSERT INTO product_slots VALUES(51,212); +INSERT INTO product_slots VALUES(51,213); +INSERT INTO product_slots VALUES(51,214); +INSERT INTO product_slots VALUES(51,215); +INSERT INTO product_slots VALUES(51,216); +INSERT INTO product_slots VALUES(51,217); +INSERT INTO product_slots VALUES(51,218); +INSERT INTO product_slots VALUES(51,219); +INSERT INTO product_slots VALUES(51,220); +INSERT INTO product_slots VALUES(51,221); +INSERT INTO product_slots VALUES(51,222); +INSERT INTO product_slots VALUES(51,223); +INSERT INTO product_slots VALUES(51,224); +INSERT INTO product_slots VALUES(51,225); +INSERT INTO product_slots VALUES(51,226); +INSERT INTO product_slots VALUES(51,227); +INSERT INTO product_slots VALUES(51,228); +INSERT INTO product_slots VALUES(51,229); +INSERT INTO product_slots VALUES(51,230); +INSERT INTO product_slots VALUES(51,231); +INSERT INTO product_slots VALUES(51,232); +INSERT INTO product_slots VALUES(51,233); +INSERT INTO product_slots VALUES(51,234); +INSERT INTO product_slots VALUES(51,235); +INSERT INTO product_slots VALUES(51,236); +INSERT INTO product_slots VALUES(51,237); +INSERT INTO product_slots VALUES(51,238); +INSERT INTO product_slots VALUES(51,239); +INSERT INTO product_slots VALUES(51,240); +INSERT INTO product_slots VALUES(51,241); +INSERT INTO product_slots VALUES(51,242); +INSERT INTO product_slots VALUES(51,243); +INSERT INTO product_slots VALUES(51,244); +INSERT INTO product_slots VALUES(51,274); +INSERT INTO product_slots VALUES(51,275); +INSERT INTO product_slots VALUES(51,279); +INSERT INTO product_slots VALUES(51,280); +INSERT INTO product_slots VALUES(51,281); +INSERT INTO product_slots VALUES(51,282); +INSERT INTO product_slots VALUES(51,283); +INSERT INTO product_slots VALUES(51,284); +INSERT INTO product_slots VALUES(51,285); +INSERT INTO product_slots VALUES(51,286); +INSERT INTO product_slots VALUES(51,287); +INSERT INTO product_slots VALUES(52,40); +INSERT INTO product_slots VALUES(52,64); +INSERT INTO product_slots VALUES(52,65); +INSERT INTO product_slots VALUES(52,66); +INSERT INTO product_slots VALUES(52,67); +INSERT INTO product_slots VALUES(52,68); +INSERT INTO product_slots VALUES(52,69); +INSERT INTO product_slots VALUES(52,70); +INSERT INTO product_slots VALUES(52,71); +INSERT INTO product_slots VALUES(52,72); +INSERT INTO product_slots VALUES(52,73); +INSERT INTO product_slots VALUES(52,74); +INSERT INTO product_slots VALUES(52,75); +INSERT INTO product_slots VALUES(52,76); +INSERT INTO product_slots VALUES(52,77); +INSERT INTO product_slots VALUES(52,78); +INSERT INTO product_slots VALUES(52,79); +INSERT INTO product_slots VALUES(52,80); +INSERT INTO product_slots VALUES(52,81); +INSERT INTO product_slots VALUES(52,82); +INSERT INTO product_slots VALUES(52,83); +INSERT INTO product_slots VALUES(52,84); +INSERT INTO product_slots VALUES(52,85); +INSERT INTO product_slots VALUES(52,86); +INSERT INTO product_slots VALUES(52,87); +INSERT INTO product_slots VALUES(52,88); +INSERT INTO product_slots VALUES(52,89); +INSERT INTO product_slots VALUES(52,90); +INSERT INTO product_slots VALUES(52,91); +INSERT INTO product_slots VALUES(52,92); +INSERT INTO product_slots VALUES(52,93); +INSERT INTO product_slots VALUES(52,94); +INSERT INTO product_slots VALUES(52,95); +INSERT INTO product_slots VALUES(52,96); +INSERT INTO product_slots VALUES(52,97); +INSERT INTO product_slots VALUES(52,98); +INSERT INTO product_slots VALUES(52,99); +INSERT INTO product_slots VALUES(52,100); +INSERT INTO product_slots VALUES(52,102); +INSERT INTO product_slots VALUES(52,103); +INSERT INTO product_slots VALUES(52,104); +INSERT INTO product_slots VALUES(52,105); +INSERT INTO product_slots VALUES(52,106); +INSERT INTO product_slots VALUES(52,107); +INSERT INTO product_slots VALUES(52,108); +INSERT INTO product_slots VALUES(52,109); +INSERT INTO product_slots VALUES(52,110); +INSERT INTO product_slots VALUES(52,111); +INSERT INTO product_slots VALUES(52,112); +INSERT INTO product_slots VALUES(52,113); +INSERT INTO product_slots VALUES(52,114); +INSERT INTO product_slots VALUES(52,115); +INSERT INTO product_slots VALUES(52,117); +INSERT INTO product_slots VALUES(52,118); +INSERT INTO product_slots VALUES(52,119); +INSERT INTO product_slots VALUES(52,120); +INSERT INTO product_slots VALUES(52,121); +INSERT INTO product_slots VALUES(52,122); +INSERT INTO product_slots VALUES(52,123); +INSERT INTO product_slots VALUES(52,124); +INSERT INTO product_slots VALUES(52,125); +INSERT INTO product_slots VALUES(52,126); +INSERT INTO product_slots VALUES(52,127); +INSERT INTO product_slots VALUES(52,128); +INSERT INTO product_slots VALUES(52,129); +INSERT INTO product_slots VALUES(52,130); +INSERT INTO product_slots VALUES(52,131); +INSERT INTO product_slots VALUES(52,132); +INSERT INTO product_slots VALUES(52,133); +INSERT INTO product_slots VALUES(52,134); +INSERT INTO product_slots VALUES(52,135); +INSERT INTO product_slots VALUES(52,136); +INSERT INTO product_slots VALUES(52,138); +INSERT INTO product_slots VALUES(52,139); +INSERT INTO product_slots VALUES(52,140); +INSERT INTO product_slots VALUES(52,141); +INSERT INTO product_slots VALUES(52,142); +INSERT INTO product_slots VALUES(52,143); +INSERT INTO product_slots VALUES(52,145); +INSERT INTO product_slots VALUES(52,146); +INSERT INTO product_slots VALUES(52,147); +INSERT INTO product_slots VALUES(52,148); +INSERT INTO product_slots VALUES(52,149); +INSERT INTO product_slots VALUES(52,150); +INSERT INTO product_slots VALUES(52,151); +INSERT INTO product_slots VALUES(52,152); +INSERT INTO product_slots VALUES(52,153); +INSERT INTO product_slots VALUES(52,154); +INSERT INTO product_slots VALUES(52,155); +INSERT INTO product_slots VALUES(52,156); +INSERT INTO product_slots VALUES(52,157); +INSERT INTO product_slots VALUES(52,158); +INSERT INTO product_slots VALUES(52,159); +INSERT INTO product_slots VALUES(52,160); +INSERT INTO product_slots VALUES(52,161); +INSERT INTO product_slots VALUES(52,162); +INSERT INTO product_slots VALUES(52,163); +INSERT INTO product_slots VALUES(52,164); +INSERT INTO product_slots VALUES(52,165); +INSERT INTO product_slots VALUES(52,166); +INSERT INTO product_slots VALUES(52,167); +INSERT INTO product_slots VALUES(52,168); +INSERT INTO product_slots VALUES(52,169); +INSERT INTO product_slots VALUES(52,170); +INSERT INTO product_slots VALUES(52,171); +INSERT INTO product_slots VALUES(52,172); +INSERT INTO product_slots VALUES(52,173); +INSERT INTO product_slots VALUES(52,174); +INSERT INTO product_slots VALUES(52,175); +INSERT INTO product_slots VALUES(52,176); +INSERT INTO product_slots VALUES(52,177); +INSERT INTO product_slots VALUES(52,178); +INSERT INTO product_slots VALUES(52,179); +INSERT INTO product_slots VALUES(52,180); +INSERT INTO product_slots VALUES(52,181); +INSERT INTO product_slots VALUES(52,182); +INSERT INTO product_slots VALUES(52,183); +INSERT INTO product_slots VALUES(52,184); +INSERT INTO product_slots VALUES(52,185); +INSERT INTO product_slots VALUES(52,186); +INSERT INTO product_slots VALUES(52,187); +INSERT INTO product_slots VALUES(52,188); +INSERT INTO product_slots VALUES(52,189); +INSERT INTO product_slots VALUES(52,190); +INSERT INTO product_slots VALUES(52,191); +INSERT INTO product_slots VALUES(52,192); +INSERT INTO product_slots VALUES(52,193); +INSERT INTO product_slots VALUES(52,194); +INSERT INTO product_slots VALUES(52,195); +INSERT INTO product_slots VALUES(52,196); +INSERT INTO product_slots VALUES(52,197); +INSERT INTO product_slots VALUES(52,198); +INSERT INTO product_slots VALUES(52,199); +INSERT INTO product_slots VALUES(52,200); +INSERT INTO product_slots VALUES(52,201); +INSERT INTO product_slots VALUES(52,202); +INSERT INTO product_slots VALUES(52,203); +INSERT INTO product_slots VALUES(52,204); +INSERT INTO product_slots VALUES(52,205); +INSERT INTO product_slots VALUES(52,206); +INSERT INTO product_slots VALUES(52,207); +INSERT INTO product_slots VALUES(52,208); +INSERT INTO product_slots VALUES(52,209); +INSERT INTO product_slots VALUES(52,210); +INSERT INTO product_slots VALUES(52,211); +INSERT INTO product_slots VALUES(52,212); +INSERT INTO product_slots VALUES(52,213); +INSERT INTO product_slots VALUES(52,214); +INSERT INTO product_slots VALUES(52,215); +INSERT INTO product_slots VALUES(52,216); +INSERT INTO product_slots VALUES(52,217); +INSERT INTO product_slots VALUES(52,218); +INSERT INTO product_slots VALUES(52,219); +INSERT INTO product_slots VALUES(52,220); +INSERT INTO product_slots VALUES(52,221); +INSERT INTO product_slots VALUES(52,222); +INSERT INTO product_slots VALUES(52,223); +INSERT INTO product_slots VALUES(52,224); +INSERT INTO product_slots VALUES(52,225); +INSERT INTO product_slots VALUES(52,226); +INSERT INTO product_slots VALUES(52,227); +INSERT INTO product_slots VALUES(52,228); +INSERT INTO product_slots VALUES(52,229); +INSERT INTO product_slots VALUES(52,230); +INSERT INTO product_slots VALUES(52,231); +INSERT INTO product_slots VALUES(52,232); +INSERT INTO product_slots VALUES(52,233); +INSERT INTO product_slots VALUES(52,234); +INSERT INTO product_slots VALUES(52,235); +INSERT INTO product_slots VALUES(52,236); +INSERT INTO product_slots VALUES(52,237); +INSERT INTO product_slots VALUES(52,238); +INSERT INTO product_slots VALUES(52,239); +INSERT INTO product_slots VALUES(52,240); +INSERT INTO product_slots VALUES(52,241); +INSERT INTO product_slots VALUES(52,242); +INSERT INTO product_slots VALUES(52,243); +INSERT INTO product_slots VALUES(52,244); +INSERT INTO product_slots VALUES(52,274); +INSERT INTO product_slots VALUES(52,275); +INSERT INTO product_slots VALUES(52,279); +INSERT INTO product_slots VALUES(52,280); +INSERT INTO product_slots VALUES(52,281); +INSERT INTO product_slots VALUES(52,282); +INSERT INTO product_slots VALUES(52,283); +INSERT INTO product_slots VALUES(52,284); +INSERT INTO product_slots VALUES(52,285); +INSERT INTO product_slots VALUES(52,286); +INSERT INTO product_slots VALUES(52,287); +INSERT INTO product_slots VALUES(53,39); +INSERT INTO product_slots VALUES(53,40); +INSERT INTO product_slots VALUES(53,43); +INSERT INTO product_slots VALUES(53,45); +INSERT INTO product_slots VALUES(53,46); +INSERT INTO product_slots VALUES(53,48); +INSERT INTO product_slots VALUES(53,49); +INSERT INTO product_slots VALUES(53,51); +INSERT INTO product_slots VALUES(53,52); +INSERT INTO product_slots VALUES(53,53); +INSERT INTO product_slots VALUES(53,54); +INSERT INTO product_slots VALUES(53,57); +INSERT INTO product_slots VALUES(53,58); +INSERT INTO product_slots VALUES(53,59); +INSERT INTO product_slots VALUES(53,60); +INSERT INTO product_slots VALUES(53,61); +INSERT INTO product_slots VALUES(53,62); +INSERT INTO product_slots VALUES(53,63); +INSERT INTO product_slots VALUES(53,64); +INSERT INTO product_slots VALUES(53,65); +INSERT INTO product_slots VALUES(53,66); +INSERT INTO product_slots VALUES(53,67); +INSERT INTO product_slots VALUES(53,68); +INSERT INTO product_slots VALUES(53,69); +INSERT INTO product_slots VALUES(53,70); +INSERT INTO product_slots VALUES(53,71); +INSERT INTO product_slots VALUES(53,72); +INSERT INTO product_slots VALUES(53,73); +INSERT INTO product_slots VALUES(53,74); +INSERT INTO product_slots VALUES(53,75); +INSERT INTO product_slots VALUES(53,76); +INSERT INTO product_slots VALUES(53,77); +INSERT INTO product_slots VALUES(53,78); +INSERT INTO product_slots VALUES(53,79); +INSERT INTO product_slots VALUES(53,80); +INSERT INTO product_slots VALUES(53,81); +INSERT INTO product_slots VALUES(53,82); +INSERT INTO product_slots VALUES(53,83); +INSERT INTO product_slots VALUES(53,84); +INSERT INTO product_slots VALUES(53,85); +INSERT INTO product_slots VALUES(53,86); +INSERT INTO product_slots VALUES(53,87); +INSERT INTO product_slots VALUES(53,88); +INSERT INTO product_slots VALUES(53,89); +INSERT INTO product_slots VALUES(53,90); +INSERT INTO product_slots VALUES(53,91); +INSERT INTO product_slots VALUES(53,92); +INSERT INTO product_slots VALUES(53,93); +INSERT INTO product_slots VALUES(53,94); +INSERT INTO product_slots VALUES(53,95); +INSERT INTO product_slots VALUES(53,96); +INSERT INTO product_slots VALUES(53,97); +INSERT INTO product_slots VALUES(53,98); +INSERT INTO product_slots VALUES(53,99); +INSERT INTO product_slots VALUES(53,100); +INSERT INTO product_slots VALUES(53,102); +INSERT INTO product_slots VALUES(53,103); +INSERT INTO product_slots VALUES(53,104); +INSERT INTO product_slots VALUES(53,105); +INSERT INTO product_slots VALUES(53,106); +INSERT INTO product_slots VALUES(53,107); +INSERT INTO product_slots VALUES(53,108); +INSERT INTO product_slots VALUES(53,109); +INSERT INTO product_slots VALUES(53,110); +INSERT INTO product_slots VALUES(53,111); +INSERT INTO product_slots VALUES(53,112); +INSERT INTO product_slots VALUES(53,113); +INSERT INTO product_slots VALUES(53,114); +INSERT INTO product_slots VALUES(53,115); +INSERT INTO product_slots VALUES(53,117); +INSERT INTO product_slots VALUES(53,118); +INSERT INTO product_slots VALUES(53,119); +INSERT INTO product_slots VALUES(53,120); +INSERT INTO product_slots VALUES(53,121); +INSERT INTO product_slots VALUES(53,122); +INSERT INTO product_slots VALUES(53,123); +INSERT INTO product_slots VALUES(53,124); +INSERT INTO product_slots VALUES(53,125); +INSERT INTO product_slots VALUES(53,126); +INSERT INTO product_slots VALUES(53,127); +INSERT INTO product_slots VALUES(53,128); +INSERT INTO product_slots VALUES(53,129); +INSERT INTO product_slots VALUES(53,130); +INSERT INTO product_slots VALUES(53,131); +INSERT INTO product_slots VALUES(53,132); +INSERT INTO product_slots VALUES(53,133); +INSERT INTO product_slots VALUES(53,134); +INSERT INTO product_slots VALUES(53,135); +INSERT INTO product_slots VALUES(53,136); +INSERT INTO product_slots VALUES(53,138); +INSERT INTO product_slots VALUES(53,139); +INSERT INTO product_slots VALUES(53,140); +INSERT INTO product_slots VALUES(53,141); +INSERT INTO product_slots VALUES(53,142); +INSERT INTO product_slots VALUES(53,143); +INSERT INTO product_slots VALUES(53,145); +INSERT INTO product_slots VALUES(53,146); +INSERT INTO product_slots VALUES(53,147); +INSERT INTO product_slots VALUES(53,148); +INSERT INTO product_slots VALUES(53,149); +INSERT INTO product_slots VALUES(53,150); +INSERT INTO product_slots VALUES(53,151); +INSERT INTO product_slots VALUES(53,152); +INSERT INTO product_slots VALUES(53,153); +INSERT INTO product_slots VALUES(53,154); +INSERT INTO product_slots VALUES(53,155); +INSERT INTO product_slots VALUES(53,156); +INSERT INTO product_slots VALUES(53,157); +INSERT INTO product_slots VALUES(53,158); +INSERT INTO product_slots VALUES(53,159); +INSERT INTO product_slots VALUES(53,160); +INSERT INTO product_slots VALUES(53,161); +INSERT INTO product_slots VALUES(53,162); +INSERT INTO product_slots VALUES(53,163); +INSERT INTO product_slots VALUES(53,164); +INSERT INTO product_slots VALUES(53,165); +INSERT INTO product_slots VALUES(53,166); +INSERT INTO product_slots VALUES(53,167); +INSERT INTO product_slots VALUES(53,168); +INSERT INTO product_slots VALUES(53,169); +INSERT INTO product_slots VALUES(53,170); +INSERT INTO product_slots VALUES(53,171); +INSERT INTO product_slots VALUES(53,172); +INSERT INTO product_slots VALUES(53,173); +INSERT INTO product_slots VALUES(53,174); +INSERT INTO product_slots VALUES(53,175); +INSERT INTO product_slots VALUES(53,176); +INSERT INTO product_slots VALUES(53,177); +INSERT INTO product_slots VALUES(53,178); +INSERT INTO product_slots VALUES(53,179); +INSERT INTO product_slots VALUES(53,180); +INSERT INTO product_slots VALUES(53,181); +INSERT INTO product_slots VALUES(53,182); +INSERT INTO product_slots VALUES(53,183); +INSERT INTO product_slots VALUES(53,184); +INSERT INTO product_slots VALUES(53,185); +INSERT INTO product_slots VALUES(53,186); +INSERT INTO product_slots VALUES(53,187); +INSERT INTO product_slots VALUES(53,188); +INSERT INTO product_slots VALUES(53,189); +INSERT INTO product_slots VALUES(53,190); +INSERT INTO product_slots VALUES(53,191); +INSERT INTO product_slots VALUES(53,192); +INSERT INTO product_slots VALUES(53,193); +INSERT INTO product_slots VALUES(53,194); +INSERT INTO product_slots VALUES(53,195); +INSERT INTO product_slots VALUES(53,196); +INSERT INTO product_slots VALUES(53,197); +INSERT INTO product_slots VALUES(53,198); +INSERT INTO product_slots VALUES(53,199); +INSERT INTO product_slots VALUES(53,200); +INSERT INTO product_slots VALUES(53,201); +INSERT INTO product_slots VALUES(53,202); +INSERT INTO product_slots VALUES(53,203); +INSERT INTO product_slots VALUES(53,204); +INSERT INTO product_slots VALUES(53,205); +INSERT INTO product_slots VALUES(53,206); +INSERT INTO product_slots VALUES(53,207); +INSERT INTO product_slots VALUES(53,208); +INSERT INTO product_slots VALUES(53,209); +INSERT INTO product_slots VALUES(53,210); +INSERT INTO product_slots VALUES(53,211); +INSERT INTO product_slots VALUES(53,212); +INSERT INTO product_slots VALUES(53,213); +INSERT INTO product_slots VALUES(53,214); +INSERT INTO product_slots VALUES(53,215); +INSERT INTO product_slots VALUES(53,216); +INSERT INTO product_slots VALUES(53,217); +INSERT INTO product_slots VALUES(53,218); +INSERT INTO product_slots VALUES(53,219); +INSERT INTO product_slots VALUES(53,220); +INSERT INTO product_slots VALUES(53,221); +INSERT INTO product_slots VALUES(53,222); +INSERT INTO product_slots VALUES(53,223); +INSERT INTO product_slots VALUES(53,224); +INSERT INTO product_slots VALUES(53,225); +INSERT INTO product_slots VALUES(53,226); +INSERT INTO product_slots VALUES(53,227); +INSERT INTO product_slots VALUES(53,228); +INSERT INTO product_slots VALUES(53,229); +INSERT INTO product_slots VALUES(53,230); +INSERT INTO product_slots VALUES(53,231); +INSERT INTO product_slots VALUES(53,232); +INSERT INTO product_slots VALUES(53,233); +INSERT INTO product_slots VALUES(53,234); +INSERT INTO product_slots VALUES(53,235); +INSERT INTO product_slots VALUES(53,236); +INSERT INTO product_slots VALUES(53,237); +INSERT INTO product_slots VALUES(53,238); +INSERT INTO product_slots VALUES(53,239); +INSERT INTO product_slots VALUES(53,240); +INSERT INTO product_slots VALUES(53,241); +INSERT INTO product_slots VALUES(53,242); +INSERT INTO product_slots VALUES(53,243); +INSERT INTO product_slots VALUES(53,244); +INSERT INTO product_slots VALUES(53,274); +INSERT INTO product_slots VALUES(53,275); +INSERT INTO product_slots VALUES(53,279); +INSERT INTO product_slots VALUES(53,280); +INSERT INTO product_slots VALUES(53,281); +INSERT INTO product_slots VALUES(53,282); +INSERT INTO product_slots VALUES(53,283); +INSERT INTO product_slots VALUES(53,284); +INSERT INTO product_slots VALUES(53,285); +INSERT INTO product_slots VALUES(53,286); +INSERT INTO product_slots VALUES(53,287); +INSERT INTO product_slots VALUES(54,40); +INSERT INTO product_slots VALUES(54,62); +INSERT INTO product_slots VALUES(54,63); +INSERT INTO product_slots VALUES(54,64); +INSERT INTO product_slots VALUES(54,65); +INSERT INTO product_slots VALUES(54,66); +INSERT INTO product_slots VALUES(54,67); +INSERT INTO product_slots VALUES(54,68); +INSERT INTO product_slots VALUES(54,69); +INSERT INTO product_slots VALUES(54,70); +INSERT INTO product_slots VALUES(54,71); +INSERT INTO product_slots VALUES(54,72); +INSERT INTO product_slots VALUES(54,73); +INSERT INTO product_slots VALUES(54,74); +INSERT INTO product_slots VALUES(54,75); +INSERT INTO product_slots VALUES(54,76); +INSERT INTO product_slots VALUES(54,77); +INSERT INTO product_slots VALUES(54,78); +INSERT INTO product_slots VALUES(54,79); +INSERT INTO product_slots VALUES(54,80); +INSERT INTO product_slots VALUES(54,81); +INSERT INTO product_slots VALUES(54,82); +INSERT INTO product_slots VALUES(54,83); +INSERT INTO product_slots VALUES(54,84); +INSERT INTO product_slots VALUES(54,85); +INSERT INTO product_slots VALUES(54,86); +INSERT INTO product_slots VALUES(54,87); +INSERT INTO product_slots VALUES(54,88); +INSERT INTO product_slots VALUES(54,89); +INSERT INTO product_slots VALUES(54,90); +INSERT INTO product_slots VALUES(54,91); +INSERT INTO product_slots VALUES(54,92); +INSERT INTO product_slots VALUES(54,93); +INSERT INTO product_slots VALUES(54,94); +INSERT INTO product_slots VALUES(54,95); +INSERT INTO product_slots VALUES(54,96); +INSERT INTO product_slots VALUES(54,97); +INSERT INTO product_slots VALUES(54,98); +INSERT INTO product_slots VALUES(54,99); +INSERT INTO product_slots VALUES(54,100); +INSERT INTO product_slots VALUES(54,102); +INSERT INTO product_slots VALUES(54,103); +INSERT INTO product_slots VALUES(54,104); +INSERT INTO product_slots VALUES(54,105); +INSERT INTO product_slots VALUES(54,106); +INSERT INTO product_slots VALUES(54,107); +INSERT INTO product_slots VALUES(54,108); +INSERT INTO product_slots VALUES(54,109); +INSERT INTO product_slots VALUES(54,110); +INSERT INTO product_slots VALUES(54,111); +INSERT INTO product_slots VALUES(54,112); +INSERT INTO product_slots VALUES(54,113); +INSERT INTO product_slots VALUES(54,114); +INSERT INTO product_slots VALUES(54,115); +INSERT INTO product_slots VALUES(54,117); +INSERT INTO product_slots VALUES(54,118); +INSERT INTO product_slots VALUES(54,119); +INSERT INTO product_slots VALUES(54,120); +INSERT INTO product_slots VALUES(54,121); +INSERT INTO product_slots VALUES(54,122); +INSERT INTO product_slots VALUES(54,123); +INSERT INTO product_slots VALUES(54,124); +INSERT INTO product_slots VALUES(54,125); +INSERT INTO product_slots VALUES(54,126); +INSERT INTO product_slots VALUES(54,127); +INSERT INTO product_slots VALUES(54,128); +INSERT INTO product_slots VALUES(54,129); +INSERT INTO product_slots VALUES(54,130); +INSERT INTO product_slots VALUES(54,131); +INSERT INTO product_slots VALUES(54,132); +INSERT INTO product_slots VALUES(54,133); +INSERT INTO product_slots VALUES(54,134); +INSERT INTO product_slots VALUES(54,135); +INSERT INTO product_slots VALUES(54,136); +INSERT INTO product_slots VALUES(54,138); +INSERT INTO product_slots VALUES(54,139); +INSERT INTO product_slots VALUES(54,140); +INSERT INTO product_slots VALUES(54,141); +INSERT INTO product_slots VALUES(54,142); +INSERT INTO product_slots VALUES(54,143); +INSERT INTO product_slots VALUES(54,145); +INSERT INTO product_slots VALUES(54,146); +INSERT INTO product_slots VALUES(54,147); +INSERT INTO product_slots VALUES(54,148); +INSERT INTO product_slots VALUES(54,149); +INSERT INTO product_slots VALUES(54,150); +INSERT INTO product_slots VALUES(54,151); +INSERT INTO product_slots VALUES(54,152); +INSERT INTO product_slots VALUES(54,153); +INSERT INTO product_slots VALUES(54,154); +INSERT INTO product_slots VALUES(54,155); +INSERT INTO product_slots VALUES(54,156); +INSERT INTO product_slots VALUES(54,157); +INSERT INTO product_slots VALUES(54,158); +INSERT INTO product_slots VALUES(54,159); +INSERT INTO product_slots VALUES(54,160); +INSERT INTO product_slots VALUES(54,161); +INSERT INTO product_slots VALUES(54,162); +INSERT INTO product_slots VALUES(54,163); +INSERT INTO product_slots VALUES(54,164); +INSERT INTO product_slots VALUES(54,165); +INSERT INTO product_slots VALUES(54,166); +INSERT INTO product_slots VALUES(54,167); +INSERT INTO product_slots VALUES(54,168); +INSERT INTO product_slots VALUES(54,169); +INSERT INTO product_slots VALUES(54,170); +INSERT INTO product_slots VALUES(54,171); +INSERT INTO product_slots VALUES(54,172); +INSERT INTO product_slots VALUES(54,173); +INSERT INTO product_slots VALUES(54,174); +INSERT INTO product_slots VALUES(54,175); +INSERT INTO product_slots VALUES(54,176); +INSERT INTO product_slots VALUES(54,177); +INSERT INTO product_slots VALUES(54,178); +INSERT INTO product_slots VALUES(54,179); +INSERT INTO product_slots VALUES(54,180); +INSERT INTO product_slots VALUES(54,181); +INSERT INTO product_slots VALUES(54,182); +INSERT INTO product_slots VALUES(54,183); +INSERT INTO product_slots VALUES(54,184); +INSERT INTO product_slots VALUES(54,185); +INSERT INTO product_slots VALUES(54,186); +INSERT INTO product_slots VALUES(54,187); +INSERT INTO product_slots VALUES(54,188); +INSERT INTO product_slots VALUES(54,189); +INSERT INTO product_slots VALUES(54,190); +INSERT INTO product_slots VALUES(54,191); +INSERT INTO product_slots VALUES(54,192); +INSERT INTO product_slots VALUES(54,193); +INSERT INTO product_slots VALUES(54,194); +INSERT INTO product_slots VALUES(54,195); +INSERT INTO product_slots VALUES(54,196); +INSERT INTO product_slots VALUES(54,197); +INSERT INTO product_slots VALUES(54,198); +INSERT INTO product_slots VALUES(54,199); +INSERT INTO product_slots VALUES(54,200); +INSERT INTO product_slots VALUES(54,201); +INSERT INTO product_slots VALUES(54,202); +INSERT INTO product_slots VALUES(54,203); +INSERT INTO product_slots VALUES(54,204); +INSERT INTO product_slots VALUES(54,205); +INSERT INTO product_slots VALUES(54,206); +INSERT INTO product_slots VALUES(54,207); +INSERT INTO product_slots VALUES(54,208); +INSERT INTO product_slots VALUES(54,209); +INSERT INTO product_slots VALUES(54,210); +INSERT INTO product_slots VALUES(54,211); +INSERT INTO product_slots VALUES(54,212); +INSERT INTO product_slots VALUES(54,213); +INSERT INTO product_slots VALUES(54,214); +INSERT INTO product_slots VALUES(54,215); +INSERT INTO product_slots VALUES(54,216); +INSERT INTO product_slots VALUES(54,217); +INSERT INTO product_slots VALUES(54,218); +INSERT INTO product_slots VALUES(54,219); +INSERT INTO product_slots VALUES(54,220); +INSERT INTO product_slots VALUES(54,221); +INSERT INTO product_slots VALUES(54,222); +INSERT INTO product_slots VALUES(54,223); +INSERT INTO product_slots VALUES(54,224); +INSERT INTO product_slots VALUES(54,225); +INSERT INTO product_slots VALUES(54,226); +INSERT INTO product_slots VALUES(54,227); +INSERT INTO product_slots VALUES(54,228); +INSERT INTO product_slots VALUES(54,229); +INSERT INTO product_slots VALUES(54,230); +INSERT INTO product_slots VALUES(54,231); +INSERT INTO product_slots VALUES(54,232); +INSERT INTO product_slots VALUES(54,233); +INSERT INTO product_slots VALUES(54,234); +INSERT INTO product_slots VALUES(54,235); +INSERT INTO product_slots VALUES(54,236); +INSERT INTO product_slots VALUES(54,237); +INSERT INTO product_slots VALUES(54,238); +INSERT INTO product_slots VALUES(54,239); +INSERT INTO product_slots VALUES(54,240); +INSERT INTO product_slots VALUES(54,241); +INSERT INTO product_slots VALUES(54,242); +INSERT INTO product_slots VALUES(54,243); +INSERT INTO product_slots VALUES(54,244); +INSERT INTO product_slots VALUES(54,274); +INSERT INTO product_slots VALUES(54,275); +INSERT INTO product_slots VALUES(54,279); +INSERT INTO product_slots VALUES(54,280); +INSERT INTO product_slots VALUES(54,281); +INSERT INTO product_slots VALUES(54,282); +INSERT INTO product_slots VALUES(54,283); +INSERT INTO product_slots VALUES(54,284); +INSERT INTO product_slots VALUES(54,285); +INSERT INTO product_slots VALUES(54,286); +INSERT INTO product_slots VALUES(54,287); +INSERT INTO product_slots VALUES(55,40); +INSERT INTO product_slots VALUES(55,59); +INSERT INTO product_slots VALUES(55,62); +INSERT INTO product_slots VALUES(55,63); +INSERT INTO product_slots VALUES(55,64); +INSERT INTO product_slots VALUES(55,65); +INSERT INTO product_slots VALUES(55,66); +INSERT INTO product_slots VALUES(55,67); +INSERT INTO product_slots VALUES(55,68); +INSERT INTO product_slots VALUES(55,69); +INSERT INTO product_slots VALUES(55,70); +INSERT INTO product_slots VALUES(55,71); +INSERT INTO product_slots VALUES(55,72); +INSERT INTO product_slots VALUES(55,73); +INSERT INTO product_slots VALUES(55,74); +INSERT INTO product_slots VALUES(55,75); +INSERT INTO product_slots VALUES(55,76); +INSERT INTO product_slots VALUES(55,77); +INSERT INTO product_slots VALUES(55,78); +INSERT INTO product_slots VALUES(55,79); +INSERT INTO product_slots VALUES(55,80); +INSERT INTO product_slots VALUES(55,81); +INSERT INTO product_slots VALUES(55,82); +INSERT INTO product_slots VALUES(55,83); +INSERT INTO product_slots VALUES(55,84); +INSERT INTO product_slots VALUES(55,85); +INSERT INTO product_slots VALUES(55,86); +INSERT INTO product_slots VALUES(55,87); +INSERT INTO product_slots VALUES(55,88); +INSERT INTO product_slots VALUES(55,89); +INSERT INTO product_slots VALUES(55,90); +INSERT INTO product_slots VALUES(55,91); +INSERT INTO product_slots VALUES(55,92); +INSERT INTO product_slots VALUES(55,93); +INSERT INTO product_slots VALUES(55,94); +INSERT INTO product_slots VALUES(55,95); +INSERT INTO product_slots VALUES(55,96); +INSERT INTO product_slots VALUES(55,97); +INSERT INTO product_slots VALUES(55,98); +INSERT INTO product_slots VALUES(55,99); +INSERT INTO product_slots VALUES(55,100); +INSERT INTO product_slots VALUES(55,102); +INSERT INTO product_slots VALUES(55,103); +INSERT INTO product_slots VALUES(55,104); +INSERT INTO product_slots VALUES(55,105); +INSERT INTO product_slots VALUES(55,106); +INSERT INTO product_slots VALUES(55,107); +INSERT INTO product_slots VALUES(55,108); +INSERT INTO product_slots VALUES(55,109); +INSERT INTO product_slots VALUES(55,110); +INSERT INTO product_slots VALUES(55,111); +INSERT INTO product_slots VALUES(55,112); +INSERT INTO product_slots VALUES(55,113); +INSERT INTO product_slots VALUES(55,114); +INSERT INTO product_slots VALUES(55,115); +INSERT INTO product_slots VALUES(55,117); +INSERT INTO product_slots VALUES(55,118); +INSERT INTO product_slots VALUES(55,119); +INSERT INTO product_slots VALUES(55,120); +INSERT INTO product_slots VALUES(55,121); +INSERT INTO product_slots VALUES(55,122); +INSERT INTO product_slots VALUES(55,123); +INSERT INTO product_slots VALUES(55,124); +INSERT INTO product_slots VALUES(55,125); +INSERT INTO product_slots VALUES(55,126); +INSERT INTO product_slots VALUES(55,127); +INSERT INTO product_slots VALUES(55,128); +INSERT INTO product_slots VALUES(55,129); +INSERT INTO product_slots VALUES(55,130); +INSERT INTO product_slots VALUES(55,131); +INSERT INTO product_slots VALUES(55,132); +INSERT INTO product_slots VALUES(55,133); +INSERT INTO product_slots VALUES(55,134); +INSERT INTO product_slots VALUES(55,135); +INSERT INTO product_slots VALUES(55,136); +INSERT INTO product_slots VALUES(55,138); +INSERT INTO product_slots VALUES(55,139); +INSERT INTO product_slots VALUES(55,140); +INSERT INTO product_slots VALUES(55,141); +INSERT INTO product_slots VALUES(55,142); +INSERT INTO product_slots VALUES(55,143); +INSERT INTO product_slots VALUES(55,145); +INSERT INTO product_slots VALUES(55,146); +INSERT INTO product_slots VALUES(55,147); +INSERT INTO product_slots VALUES(55,148); +INSERT INTO product_slots VALUES(55,149); +INSERT INTO product_slots VALUES(55,150); +INSERT INTO product_slots VALUES(55,151); +INSERT INTO product_slots VALUES(55,152); +INSERT INTO product_slots VALUES(55,153); +INSERT INTO product_slots VALUES(55,154); +INSERT INTO product_slots VALUES(55,155); +INSERT INTO product_slots VALUES(55,156); +INSERT INTO product_slots VALUES(55,157); +INSERT INTO product_slots VALUES(55,158); +INSERT INTO product_slots VALUES(55,159); +INSERT INTO product_slots VALUES(55,160); +INSERT INTO product_slots VALUES(55,161); +INSERT INTO product_slots VALUES(55,162); +INSERT INTO product_slots VALUES(55,163); +INSERT INTO product_slots VALUES(55,164); +INSERT INTO product_slots VALUES(55,165); +INSERT INTO product_slots VALUES(55,166); +INSERT INTO product_slots VALUES(55,167); +INSERT INTO product_slots VALUES(55,168); +INSERT INTO product_slots VALUES(55,169); +INSERT INTO product_slots VALUES(55,170); +INSERT INTO product_slots VALUES(55,171); +INSERT INTO product_slots VALUES(55,172); +INSERT INTO product_slots VALUES(55,173); +INSERT INTO product_slots VALUES(55,174); +INSERT INTO product_slots VALUES(55,175); +INSERT INTO product_slots VALUES(55,176); +INSERT INTO product_slots VALUES(55,177); +INSERT INTO product_slots VALUES(55,178); +INSERT INTO product_slots VALUES(55,179); +INSERT INTO product_slots VALUES(55,180); +INSERT INTO product_slots VALUES(55,181); +INSERT INTO product_slots VALUES(55,182); +INSERT INTO product_slots VALUES(55,183); +INSERT INTO product_slots VALUES(55,184); +INSERT INTO product_slots VALUES(55,185); +INSERT INTO product_slots VALUES(55,186); +INSERT INTO product_slots VALUES(55,187); +INSERT INTO product_slots VALUES(55,188); +INSERT INTO product_slots VALUES(55,189); +INSERT INTO product_slots VALUES(55,190); +INSERT INTO product_slots VALUES(55,191); +INSERT INTO product_slots VALUES(55,192); +INSERT INTO product_slots VALUES(55,193); +INSERT INTO product_slots VALUES(55,194); +INSERT INTO product_slots VALUES(55,195); +INSERT INTO product_slots VALUES(55,196); +INSERT INTO product_slots VALUES(55,197); +INSERT INTO product_slots VALUES(55,198); +INSERT INTO product_slots VALUES(55,199); +INSERT INTO product_slots VALUES(55,200); +INSERT INTO product_slots VALUES(55,201); +INSERT INTO product_slots VALUES(55,202); +INSERT INTO product_slots VALUES(55,203); +INSERT INTO product_slots VALUES(55,204); +INSERT INTO product_slots VALUES(55,205); +INSERT INTO product_slots VALUES(55,206); +INSERT INTO product_slots VALUES(55,207); +INSERT INTO product_slots VALUES(55,208); +INSERT INTO product_slots VALUES(55,209); +INSERT INTO product_slots VALUES(55,210); +INSERT INTO product_slots VALUES(55,211); +INSERT INTO product_slots VALUES(55,212); +INSERT INTO product_slots VALUES(55,213); +INSERT INTO product_slots VALUES(55,214); +INSERT INTO product_slots VALUES(55,215); +INSERT INTO product_slots VALUES(55,216); +INSERT INTO product_slots VALUES(55,217); +INSERT INTO product_slots VALUES(55,218); +INSERT INTO product_slots VALUES(55,219); +INSERT INTO product_slots VALUES(55,220); +INSERT INTO product_slots VALUES(55,221); +INSERT INTO product_slots VALUES(55,222); +INSERT INTO product_slots VALUES(55,223); +INSERT INTO product_slots VALUES(55,224); +INSERT INTO product_slots VALUES(55,225); +INSERT INTO product_slots VALUES(55,226); +INSERT INTO product_slots VALUES(55,227); +INSERT INTO product_slots VALUES(55,228); +INSERT INTO product_slots VALUES(55,229); +INSERT INTO product_slots VALUES(55,230); +INSERT INTO product_slots VALUES(55,231); +INSERT INTO product_slots VALUES(55,232); +INSERT INTO product_slots VALUES(55,233); +INSERT INTO product_slots VALUES(55,234); +INSERT INTO product_slots VALUES(55,235); +INSERT INTO product_slots VALUES(55,236); +INSERT INTO product_slots VALUES(55,237); +INSERT INTO product_slots VALUES(55,238); +INSERT INTO product_slots VALUES(55,239); +INSERT INTO product_slots VALUES(55,240); +INSERT INTO product_slots VALUES(55,241); +INSERT INTO product_slots VALUES(55,242); +INSERT INTO product_slots VALUES(55,243); +INSERT INTO product_slots VALUES(55,244); +INSERT INTO product_slots VALUES(55,274); +INSERT INTO product_slots VALUES(55,275); +INSERT INTO product_slots VALUES(55,279); +INSERT INTO product_slots VALUES(55,280); +INSERT INTO product_slots VALUES(55,281); +INSERT INTO product_slots VALUES(55,282); +INSERT INTO product_slots VALUES(55,283); +INSERT INTO product_slots VALUES(55,284); +INSERT INTO product_slots VALUES(55,285); +INSERT INTO product_slots VALUES(55,286); +INSERT INTO product_slots VALUES(55,287); +INSERT INTO product_slots VALUES(56,39); +INSERT INTO product_slots VALUES(56,40); +INSERT INTO product_slots VALUES(56,43); +INSERT INTO product_slots VALUES(56,45); +INSERT INTO product_slots VALUES(56,46); +INSERT INTO product_slots VALUES(56,48); +INSERT INTO product_slots VALUES(56,49); +INSERT INTO product_slots VALUES(56,51); +INSERT INTO product_slots VALUES(56,52); +INSERT INTO product_slots VALUES(56,53); +INSERT INTO product_slots VALUES(56,54); +INSERT INTO product_slots VALUES(56,57); +INSERT INTO product_slots VALUES(56,58); +INSERT INTO product_slots VALUES(56,59); +INSERT INTO product_slots VALUES(56,60); +INSERT INTO product_slots VALUES(56,61); +INSERT INTO product_slots VALUES(56,62); +INSERT INTO product_slots VALUES(56,63); +INSERT INTO product_slots VALUES(56,64); +INSERT INTO product_slots VALUES(56,65); +INSERT INTO product_slots VALUES(56,66); +INSERT INTO product_slots VALUES(56,67); +INSERT INTO product_slots VALUES(56,68); +INSERT INTO product_slots VALUES(56,69); +INSERT INTO product_slots VALUES(56,70); +INSERT INTO product_slots VALUES(56,71); +INSERT INTO product_slots VALUES(56,72); +INSERT INTO product_slots VALUES(56,73); +INSERT INTO product_slots VALUES(56,74); +INSERT INTO product_slots VALUES(56,75); +INSERT INTO product_slots VALUES(56,76); +INSERT INTO product_slots VALUES(56,77); +INSERT INTO product_slots VALUES(56,78); +INSERT INTO product_slots VALUES(56,79); +INSERT INTO product_slots VALUES(56,80); +INSERT INTO product_slots VALUES(56,81); +INSERT INTO product_slots VALUES(56,82); +INSERT INTO product_slots VALUES(56,83); +INSERT INTO product_slots VALUES(56,84); +INSERT INTO product_slots VALUES(56,85); +INSERT INTO product_slots VALUES(56,86); +INSERT INTO product_slots VALUES(56,87); +INSERT INTO product_slots VALUES(56,88); +INSERT INTO product_slots VALUES(56,89); +INSERT INTO product_slots VALUES(56,90); +INSERT INTO product_slots VALUES(56,91); +INSERT INTO product_slots VALUES(56,92); +INSERT INTO product_slots VALUES(56,93); +INSERT INTO product_slots VALUES(56,94); +INSERT INTO product_slots VALUES(56,95); +INSERT INTO product_slots VALUES(56,96); +INSERT INTO product_slots VALUES(56,97); +INSERT INTO product_slots VALUES(56,98); +INSERT INTO product_slots VALUES(56,99); +INSERT INTO product_slots VALUES(56,100); +INSERT INTO product_slots VALUES(56,102); +INSERT INTO product_slots VALUES(56,103); +INSERT INTO product_slots VALUES(56,104); +INSERT INTO product_slots VALUES(56,105); +INSERT INTO product_slots VALUES(56,106); +INSERT INTO product_slots VALUES(56,107); +INSERT INTO product_slots VALUES(56,108); +INSERT INTO product_slots VALUES(56,109); +INSERT INTO product_slots VALUES(56,110); +INSERT INTO product_slots VALUES(56,111); +INSERT INTO product_slots VALUES(56,112); +INSERT INTO product_slots VALUES(56,113); +INSERT INTO product_slots VALUES(56,114); +INSERT INTO product_slots VALUES(56,115); +INSERT INTO product_slots VALUES(56,117); +INSERT INTO product_slots VALUES(56,118); +INSERT INTO product_slots VALUES(56,119); +INSERT INTO product_slots VALUES(56,120); +INSERT INTO product_slots VALUES(56,121); +INSERT INTO product_slots VALUES(56,122); +INSERT INTO product_slots VALUES(56,123); +INSERT INTO product_slots VALUES(56,124); +INSERT INTO product_slots VALUES(56,125); +INSERT INTO product_slots VALUES(56,126); +INSERT INTO product_slots VALUES(56,127); +INSERT INTO product_slots VALUES(56,128); +INSERT INTO product_slots VALUES(56,129); +INSERT INTO product_slots VALUES(56,130); +INSERT INTO product_slots VALUES(56,131); +INSERT INTO product_slots VALUES(56,132); +INSERT INTO product_slots VALUES(56,133); +INSERT INTO product_slots VALUES(56,134); +INSERT INTO product_slots VALUES(56,135); +INSERT INTO product_slots VALUES(56,136); +INSERT INTO product_slots VALUES(56,138); +INSERT INTO product_slots VALUES(56,139); +INSERT INTO product_slots VALUES(56,140); +INSERT INTO product_slots VALUES(56,141); +INSERT INTO product_slots VALUES(56,142); +INSERT INTO product_slots VALUES(56,143); +INSERT INTO product_slots VALUES(56,145); +INSERT INTO product_slots VALUES(56,146); +INSERT INTO product_slots VALUES(56,147); +INSERT INTO product_slots VALUES(56,148); +INSERT INTO product_slots VALUES(56,149); +INSERT INTO product_slots VALUES(56,150); +INSERT INTO product_slots VALUES(56,151); +INSERT INTO product_slots VALUES(56,152); +INSERT INTO product_slots VALUES(56,153); +INSERT INTO product_slots VALUES(56,154); +INSERT INTO product_slots VALUES(56,155); +INSERT INTO product_slots VALUES(56,156); +INSERT INTO product_slots VALUES(56,157); +INSERT INTO product_slots VALUES(56,158); +INSERT INTO product_slots VALUES(56,159); +INSERT INTO product_slots VALUES(56,160); +INSERT INTO product_slots VALUES(56,161); +INSERT INTO product_slots VALUES(56,162); +INSERT INTO product_slots VALUES(56,163); +INSERT INTO product_slots VALUES(56,164); +INSERT INTO product_slots VALUES(56,165); +INSERT INTO product_slots VALUES(56,166); +INSERT INTO product_slots VALUES(56,167); +INSERT INTO product_slots VALUES(56,168); +INSERT INTO product_slots VALUES(56,169); +INSERT INTO product_slots VALUES(56,170); +INSERT INTO product_slots VALUES(56,171); +INSERT INTO product_slots VALUES(56,172); +INSERT INTO product_slots VALUES(56,173); +INSERT INTO product_slots VALUES(56,174); +INSERT INTO product_slots VALUES(56,175); +INSERT INTO product_slots VALUES(56,176); +INSERT INTO product_slots VALUES(56,177); +INSERT INTO product_slots VALUES(56,178); +INSERT INTO product_slots VALUES(56,179); +INSERT INTO product_slots VALUES(56,180); +INSERT INTO product_slots VALUES(56,181); +INSERT INTO product_slots VALUES(56,182); +INSERT INTO product_slots VALUES(56,183); +INSERT INTO product_slots VALUES(56,184); +INSERT INTO product_slots VALUES(56,185); +INSERT INTO product_slots VALUES(56,186); +INSERT INTO product_slots VALUES(56,187); +INSERT INTO product_slots VALUES(56,188); +INSERT INTO product_slots VALUES(56,189); +INSERT INTO product_slots VALUES(56,190); +INSERT INTO product_slots VALUES(56,191); +INSERT INTO product_slots VALUES(56,192); +INSERT INTO product_slots VALUES(56,193); +INSERT INTO product_slots VALUES(56,194); +INSERT INTO product_slots VALUES(56,195); +INSERT INTO product_slots VALUES(56,196); +INSERT INTO product_slots VALUES(56,197); +INSERT INTO product_slots VALUES(56,198); +INSERT INTO product_slots VALUES(56,199); +INSERT INTO product_slots VALUES(56,200); +INSERT INTO product_slots VALUES(56,201); +INSERT INTO product_slots VALUES(56,202); +INSERT INTO product_slots VALUES(56,203); +INSERT INTO product_slots VALUES(56,204); +INSERT INTO product_slots VALUES(56,205); +INSERT INTO product_slots VALUES(56,206); +INSERT INTO product_slots VALUES(56,207); +INSERT INTO product_slots VALUES(56,208); +INSERT INTO product_slots VALUES(56,209); +INSERT INTO product_slots VALUES(56,210); +INSERT INTO product_slots VALUES(56,211); +INSERT INTO product_slots VALUES(56,212); +INSERT INTO product_slots VALUES(56,213); +INSERT INTO product_slots VALUES(56,214); +INSERT INTO product_slots VALUES(56,215); +INSERT INTO product_slots VALUES(56,216); +INSERT INTO product_slots VALUES(56,217); +INSERT INTO product_slots VALUES(56,218); +INSERT INTO product_slots VALUES(56,219); +INSERT INTO product_slots VALUES(56,220); +INSERT INTO product_slots VALUES(56,221); +INSERT INTO product_slots VALUES(56,222); +INSERT INTO product_slots VALUES(56,223); +INSERT INTO product_slots VALUES(56,224); +INSERT INTO product_slots VALUES(56,225); +INSERT INTO product_slots VALUES(56,226); +INSERT INTO product_slots VALUES(56,227); +INSERT INTO product_slots VALUES(56,228); +INSERT INTO product_slots VALUES(56,229); +INSERT INTO product_slots VALUES(56,230); +INSERT INTO product_slots VALUES(56,231); +INSERT INTO product_slots VALUES(56,232); +INSERT INTO product_slots VALUES(56,233); +INSERT INTO product_slots VALUES(56,234); +INSERT INTO product_slots VALUES(56,235); +INSERT INTO product_slots VALUES(56,236); +INSERT INTO product_slots VALUES(56,237); +INSERT INTO product_slots VALUES(56,238); +INSERT INTO product_slots VALUES(56,239); +INSERT INTO product_slots VALUES(56,240); +INSERT INTO product_slots VALUES(56,241); +INSERT INTO product_slots VALUES(56,242); +INSERT INTO product_slots VALUES(56,243); +INSERT INTO product_slots VALUES(56,244); +INSERT INTO product_slots VALUES(56,274); +INSERT INTO product_slots VALUES(56,275); +INSERT INTO product_slots VALUES(56,279); +INSERT INTO product_slots VALUES(56,280); +INSERT INTO product_slots VALUES(56,281); +INSERT INTO product_slots VALUES(56,282); +INSERT INTO product_slots VALUES(56,283); +INSERT INTO product_slots VALUES(56,284); +INSERT INTO product_slots VALUES(56,285); +INSERT INTO product_slots VALUES(56,286); +INSERT INTO product_slots VALUES(56,287); +INSERT INTO product_slots VALUES(57,39); +INSERT INTO product_slots VALUES(57,40); +INSERT INTO product_slots VALUES(57,43); +INSERT INTO product_slots VALUES(57,45); +INSERT INTO product_slots VALUES(57,46); +INSERT INTO product_slots VALUES(57,48); +INSERT INTO product_slots VALUES(57,49); +INSERT INTO product_slots VALUES(57,51); +INSERT INTO product_slots VALUES(57,52); +INSERT INTO product_slots VALUES(57,53); +INSERT INTO product_slots VALUES(57,54); +INSERT INTO product_slots VALUES(57,57); +INSERT INTO product_slots VALUES(57,58); +INSERT INTO product_slots VALUES(57,59); +INSERT INTO product_slots VALUES(57,60); +INSERT INTO product_slots VALUES(57,61); +INSERT INTO product_slots VALUES(57,62); +INSERT INTO product_slots VALUES(57,63); +INSERT INTO product_slots VALUES(57,64); +INSERT INTO product_slots VALUES(57,65); +INSERT INTO product_slots VALUES(57,66); +INSERT INTO product_slots VALUES(57,67); +INSERT INTO product_slots VALUES(57,68); +INSERT INTO product_slots VALUES(57,69); +INSERT INTO product_slots VALUES(57,70); +INSERT INTO product_slots VALUES(57,71); +INSERT INTO product_slots VALUES(57,72); +INSERT INTO product_slots VALUES(57,73); +INSERT INTO product_slots VALUES(57,74); +INSERT INTO product_slots VALUES(57,75); +INSERT INTO product_slots VALUES(57,76); +INSERT INTO product_slots VALUES(57,77); +INSERT INTO product_slots VALUES(57,78); +INSERT INTO product_slots VALUES(57,79); +INSERT INTO product_slots VALUES(57,80); +INSERT INTO product_slots VALUES(57,81); +INSERT INTO product_slots VALUES(57,82); +INSERT INTO product_slots VALUES(57,83); +INSERT INTO product_slots VALUES(57,84); +INSERT INTO product_slots VALUES(57,85); +INSERT INTO product_slots VALUES(57,86); +INSERT INTO product_slots VALUES(57,87); +INSERT INTO product_slots VALUES(57,88); +INSERT INTO product_slots VALUES(57,89); +INSERT INTO product_slots VALUES(57,90); +INSERT INTO product_slots VALUES(57,91); +INSERT INTO product_slots VALUES(57,92); +INSERT INTO product_slots VALUES(57,93); +INSERT INTO product_slots VALUES(57,94); +INSERT INTO product_slots VALUES(57,95); +INSERT INTO product_slots VALUES(57,96); +INSERT INTO product_slots VALUES(57,97); +INSERT INTO product_slots VALUES(57,98); +INSERT INTO product_slots VALUES(57,99); +INSERT INTO product_slots VALUES(57,100); +INSERT INTO product_slots VALUES(57,102); +INSERT INTO product_slots VALUES(57,103); +INSERT INTO product_slots VALUES(57,104); +INSERT INTO product_slots VALUES(57,105); +INSERT INTO product_slots VALUES(57,106); +INSERT INTO product_slots VALUES(57,107); +INSERT INTO product_slots VALUES(57,108); +INSERT INTO product_slots VALUES(57,109); +INSERT INTO product_slots VALUES(57,110); +INSERT INTO product_slots VALUES(57,111); +INSERT INTO product_slots VALUES(57,112); +INSERT INTO product_slots VALUES(57,113); +INSERT INTO product_slots VALUES(57,114); +INSERT INTO product_slots VALUES(57,115); +INSERT INTO product_slots VALUES(57,117); +INSERT INTO product_slots VALUES(57,118); +INSERT INTO product_slots VALUES(57,119); +INSERT INTO product_slots VALUES(57,120); +INSERT INTO product_slots VALUES(57,121); +INSERT INTO product_slots VALUES(57,122); +INSERT INTO product_slots VALUES(57,123); +INSERT INTO product_slots VALUES(57,124); +INSERT INTO product_slots VALUES(57,125); +INSERT INTO product_slots VALUES(57,126); +INSERT INTO product_slots VALUES(57,127); +INSERT INTO product_slots VALUES(57,128); +INSERT INTO product_slots VALUES(57,129); +INSERT INTO product_slots VALUES(57,130); +INSERT INTO product_slots VALUES(57,131); +INSERT INTO product_slots VALUES(57,132); +INSERT INTO product_slots VALUES(57,133); +INSERT INTO product_slots VALUES(57,134); +INSERT INTO product_slots VALUES(57,135); +INSERT INTO product_slots VALUES(57,136); +INSERT INTO product_slots VALUES(57,138); +INSERT INTO product_slots VALUES(57,139); +INSERT INTO product_slots VALUES(57,140); +INSERT INTO product_slots VALUES(57,141); +INSERT INTO product_slots VALUES(57,142); +INSERT INTO product_slots VALUES(57,143); +INSERT INTO product_slots VALUES(57,145); +INSERT INTO product_slots VALUES(57,146); +INSERT INTO product_slots VALUES(57,147); +INSERT INTO product_slots VALUES(57,148); +INSERT INTO product_slots VALUES(57,149); +INSERT INTO product_slots VALUES(57,150); +INSERT INTO product_slots VALUES(57,151); +INSERT INTO product_slots VALUES(57,152); +INSERT INTO product_slots VALUES(57,153); +INSERT INTO product_slots VALUES(57,154); +INSERT INTO product_slots VALUES(57,155); +INSERT INTO product_slots VALUES(57,156); +INSERT INTO product_slots VALUES(57,157); +INSERT INTO product_slots VALUES(57,158); +INSERT INTO product_slots VALUES(57,159); +INSERT INTO product_slots VALUES(57,160); +INSERT INTO product_slots VALUES(57,161); +INSERT INTO product_slots VALUES(57,162); +INSERT INTO product_slots VALUES(57,163); +INSERT INTO product_slots VALUES(57,164); +INSERT INTO product_slots VALUES(57,165); +INSERT INTO product_slots VALUES(57,166); +INSERT INTO product_slots VALUES(57,167); +INSERT INTO product_slots VALUES(57,168); +INSERT INTO product_slots VALUES(57,169); +INSERT INTO product_slots VALUES(57,170); +INSERT INTO product_slots VALUES(57,171); +INSERT INTO product_slots VALUES(57,172); +INSERT INTO product_slots VALUES(57,173); +INSERT INTO product_slots VALUES(57,174); +INSERT INTO product_slots VALUES(57,175); +INSERT INTO product_slots VALUES(57,176); +INSERT INTO product_slots VALUES(57,177); +INSERT INTO product_slots VALUES(57,178); +INSERT INTO product_slots VALUES(57,179); +INSERT INTO product_slots VALUES(57,180); +INSERT INTO product_slots VALUES(57,181); +INSERT INTO product_slots VALUES(57,182); +INSERT INTO product_slots VALUES(57,183); +INSERT INTO product_slots VALUES(57,184); +INSERT INTO product_slots VALUES(57,185); +INSERT INTO product_slots VALUES(57,186); +INSERT INTO product_slots VALUES(57,187); +INSERT INTO product_slots VALUES(57,188); +INSERT INTO product_slots VALUES(57,189); +INSERT INTO product_slots VALUES(57,190); +INSERT INTO product_slots VALUES(57,191); +INSERT INTO product_slots VALUES(57,192); +INSERT INTO product_slots VALUES(57,193); +INSERT INTO product_slots VALUES(57,194); +INSERT INTO product_slots VALUES(57,195); +INSERT INTO product_slots VALUES(57,196); +INSERT INTO product_slots VALUES(57,197); +INSERT INTO product_slots VALUES(57,198); +INSERT INTO product_slots VALUES(57,199); +INSERT INTO product_slots VALUES(57,200); +INSERT INTO product_slots VALUES(57,201); +INSERT INTO product_slots VALUES(57,202); +INSERT INTO product_slots VALUES(57,203); +INSERT INTO product_slots VALUES(57,204); +INSERT INTO product_slots VALUES(57,205); +INSERT INTO product_slots VALUES(57,206); +INSERT INTO product_slots VALUES(57,207); +INSERT INTO product_slots VALUES(57,208); +INSERT INTO product_slots VALUES(57,209); +INSERT INTO product_slots VALUES(57,210); +INSERT INTO product_slots VALUES(57,211); +INSERT INTO product_slots VALUES(57,212); +INSERT INTO product_slots VALUES(57,213); +INSERT INTO product_slots VALUES(57,214); +INSERT INTO product_slots VALUES(57,215); +INSERT INTO product_slots VALUES(57,216); +INSERT INTO product_slots VALUES(57,217); +INSERT INTO product_slots VALUES(57,218); +INSERT INTO product_slots VALUES(57,219); +INSERT INTO product_slots VALUES(57,220); +INSERT INTO product_slots VALUES(57,221); +INSERT INTO product_slots VALUES(57,222); +INSERT INTO product_slots VALUES(57,223); +INSERT INTO product_slots VALUES(57,224); +INSERT INTO product_slots VALUES(57,225); +INSERT INTO product_slots VALUES(57,226); +INSERT INTO product_slots VALUES(57,227); +INSERT INTO product_slots VALUES(57,228); +INSERT INTO product_slots VALUES(57,229); +INSERT INTO product_slots VALUES(57,230); +INSERT INTO product_slots VALUES(57,231); +INSERT INTO product_slots VALUES(57,232); +INSERT INTO product_slots VALUES(57,233); +INSERT INTO product_slots VALUES(57,234); +INSERT INTO product_slots VALUES(57,235); +INSERT INTO product_slots VALUES(57,236); +INSERT INTO product_slots VALUES(57,237); +INSERT INTO product_slots VALUES(57,238); +INSERT INTO product_slots VALUES(57,239); +INSERT INTO product_slots VALUES(57,240); +INSERT INTO product_slots VALUES(57,241); +INSERT INTO product_slots VALUES(57,242); +INSERT INTO product_slots VALUES(57,243); +INSERT INTO product_slots VALUES(57,244); +INSERT INTO product_slots VALUES(57,274); +INSERT INTO product_slots VALUES(57,275); +INSERT INTO product_slots VALUES(57,279); +INSERT INTO product_slots VALUES(57,280); +INSERT INTO product_slots VALUES(57,281); +INSERT INTO product_slots VALUES(57,282); +INSERT INTO product_slots VALUES(57,283); +INSERT INTO product_slots VALUES(57,284); +INSERT INTO product_slots VALUES(57,285); +INSERT INTO product_slots VALUES(57,286); +INSERT INTO product_slots VALUES(57,287); +INSERT INTO product_slots VALUES(58,39); +INSERT INTO product_slots VALUES(58,40); +INSERT INTO product_slots VALUES(58,43); +INSERT INTO product_slots VALUES(58,45); +INSERT INTO product_slots VALUES(58,46); +INSERT INTO product_slots VALUES(58,48); +INSERT INTO product_slots VALUES(58,49); +INSERT INTO product_slots VALUES(58,51); +INSERT INTO product_slots VALUES(58,52); +INSERT INTO product_slots VALUES(58,53); +INSERT INTO product_slots VALUES(58,54); +INSERT INTO product_slots VALUES(58,57); +INSERT INTO product_slots VALUES(58,58); +INSERT INTO product_slots VALUES(58,59); +INSERT INTO product_slots VALUES(58,60); +INSERT INTO product_slots VALUES(58,61); +INSERT INTO product_slots VALUES(58,62); +INSERT INTO product_slots VALUES(58,63); +INSERT INTO product_slots VALUES(58,64); +INSERT INTO product_slots VALUES(58,65); +INSERT INTO product_slots VALUES(58,66); +INSERT INTO product_slots VALUES(58,67); +INSERT INTO product_slots VALUES(58,68); +INSERT INTO product_slots VALUES(58,69); +INSERT INTO product_slots VALUES(58,70); +INSERT INTO product_slots VALUES(58,71); +INSERT INTO product_slots VALUES(58,72); +INSERT INTO product_slots VALUES(58,73); +INSERT INTO product_slots VALUES(58,74); +INSERT INTO product_slots VALUES(58,75); +INSERT INTO product_slots VALUES(58,76); +INSERT INTO product_slots VALUES(58,77); +INSERT INTO product_slots VALUES(58,78); +INSERT INTO product_slots VALUES(58,79); +INSERT INTO product_slots VALUES(58,80); +INSERT INTO product_slots VALUES(58,81); +INSERT INTO product_slots VALUES(58,82); +INSERT INTO product_slots VALUES(58,83); +INSERT INTO product_slots VALUES(58,84); +INSERT INTO product_slots VALUES(58,85); +INSERT INTO product_slots VALUES(58,86); +INSERT INTO product_slots VALUES(58,87); +INSERT INTO product_slots VALUES(58,88); +INSERT INTO product_slots VALUES(58,89); +INSERT INTO product_slots VALUES(58,90); +INSERT INTO product_slots VALUES(58,91); +INSERT INTO product_slots VALUES(58,92); +INSERT INTO product_slots VALUES(58,93); +INSERT INTO product_slots VALUES(58,94); +INSERT INTO product_slots VALUES(58,95); +INSERT INTO product_slots VALUES(58,96); +INSERT INTO product_slots VALUES(58,97); +INSERT INTO product_slots VALUES(58,98); +INSERT INTO product_slots VALUES(58,99); +INSERT INTO product_slots VALUES(58,100); +INSERT INTO product_slots VALUES(58,102); +INSERT INTO product_slots VALUES(58,103); +INSERT INTO product_slots VALUES(58,104); +INSERT INTO product_slots VALUES(58,105); +INSERT INTO product_slots VALUES(58,106); +INSERT INTO product_slots VALUES(58,107); +INSERT INTO product_slots VALUES(58,108); +INSERT INTO product_slots VALUES(58,109); +INSERT INTO product_slots VALUES(58,110); +INSERT INTO product_slots VALUES(58,111); +INSERT INTO product_slots VALUES(58,112); +INSERT INTO product_slots VALUES(58,113); +INSERT INTO product_slots VALUES(58,114); +INSERT INTO product_slots VALUES(58,115); +INSERT INTO product_slots VALUES(58,117); +INSERT INTO product_slots VALUES(58,118); +INSERT INTO product_slots VALUES(58,119); +INSERT INTO product_slots VALUES(58,120); +INSERT INTO product_slots VALUES(58,121); +INSERT INTO product_slots VALUES(58,122); +INSERT INTO product_slots VALUES(58,123); +INSERT INTO product_slots VALUES(58,124); +INSERT INTO product_slots VALUES(58,125); +INSERT INTO product_slots VALUES(58,126); +INSERT INTO product_slots VALUES(58,127); +INSERT INTO product_slots VALUES(58,128); +INSERT INTO product_slots VALUES(58,129); +INSERT INTO product_slots VALUES(58,130); +INSERT INTO product_slots VALUES(58,131); +INSERT INTO product_slots VALUES(58,132); +INSERT INTO product_slots VALUES(58,133); +INSERT INTO product_slots VALUES(58,134); +INSERT INTO product_slots VALUES(58,135); +INSERT INTO product_slots VALUES(58,136); +INSERT INTO product_slots VALUES(58,138); +INSERT INTO product_slots VALUES(58,139); +INSERT INTO product_slots VALUES(58,140); +INSERT INTO product_slots VALUES(58,141); +INSERT INTO product_slots VALUES(58,142); +INSERT INTO product_slots VALUES(58,143); +INSERT INTO product_slots VALUES(58,145); +INSERT INTO product_slots VALUES(58,146); +INSERT INTO product_slots VALUES(58,147); +INSERT INTO product_slots VALUES(58,148); +INSERT INTO product_slots VALUES(58,149); +INSERT INTO product_slots VALUES(58,150); +INSERT INTO product_slots VALUES(58,151); +INSERT INTO product_slots VALUES(58,152); +INSERT INTO product_slots VALUES(58,153); +INSERT INTO product_slots VALUES(58,154); +INSERT INTO product_slots VALUES(58,155); +INSERT INTO product_slots VALUES(58,156); +INSERT INTO product_slots VALUES(58,157); +INSERT INTO product_slots VALUES(58,158); +INSERT INTO product_slots VALUES(58,159); +INSERT INTO product_slots VALUES(58,160); +INSERT INTO product_slots VALUES(58,161); +INSERT INTO product_slots VALUES(58,162); +INSERT INTO product_slots VALUES(58,163); +INSERT INTO product_slots VALUES(58,164); +INSERT INTO product_slots VALUES(58,165); +INSERT INTO product_slots VALUES(58,166); +INSERT INTO product_slots VALUES(58,167); +INSERT INTO product_slots VALUES(58,168); +INSERT INTO product_slots VALUES(58,169); +INSERT INTO product_slots VALUES(58,170); +INSERT INTO product_slots VALUES(58,171); +INSERT INTO product_slots VALUES(58,172); +INSERT INTO product_slots VALUES(58,173); +INSERT INTO product_slots VALUES(58,174); +INSERT INTO product_slots VALUES(58,175); +INSERT INTO product_slots VALUES(58,176); +INSERT INTO product_slots VALUES(58,177); +INSERT INTO product_slots VALUES(58,178); +INSERT INTO product_slots VALUES(58,179); +INSERT INTO product_slots VALUES(58,180); +INSERT INTO product_slots VALUES(58,181); +INSERT INTO product_slots VALUES(58,182); +INSERT INTO product_slots VALUES(58,183); +INSERT INTO product_slots VALUES(58,184); +INSERT INTO product_slots VALUES(58,185); +INSERT INTO product_slots VALUES(58,186); +INSERT INTO product_slots VALUES(58,187); +INSERT INTO product_slots VALUES(58,188); +INSERT INTO product_slots VALUES(58,189); +INSERT INTO product_slots VALUES(58,190); +INSERT INTO product_slots VALUES(58,191); +INSERT INTO product_slots VALUES(58,192); +INSERT INTO product_slots VALUES(58,193); +INSERT INTO product_slots VALUES(58,194); +INSERT INTO product_slots VALUES(58,195); +INSERT INTO product_slots VALUES(58,196); +INSERT INTO product_slots VALUES(58,197); +INSERT INTO product_slots VALUES(58,198); +INSERT INTO product_slots VALUES(58,199); +INSERT INTO product_slots VALUES(58,200); +INSERT INTO product_slots VALUES(58,201); +INSERT INTO product_slots VALUES(58,202); +INSERT INTO product_slots VALUES(58,203); +INSERT INTO product_slots VALUES(58,204); +INSERT INTO product_slots VALUES(58,205); +INSERT INTO product_slots VALUES(58,206); +INSERT INTO product_slots VALUES(58,207); +INSERT INTO product_slots VALUES(58,208); +INSERT INTO product_slots VALUES(58,209); +INSERT INTO product_slots VALUES(58,210); +INSERT INTO product_slots VALUES(58,211); +INSERT INTO product_slots VALUES(58,212); +INSERT INTO product_slots VALUES(58,213); +INSERT INTO product_slots VALUES(58,214); +INSERT INTO product_slots VALUES(58,215); +INSERT INTO product_slots VALUES(58,216); +INSERT INTO product_slots VALUES(58,217); +INSERT INTO product_slots VALUES(58,218); +INSERT INTO product_slots VALUES(58,219); +INSERT INTO product_slots VALUES(58,220); +INSERT INTO product_slots VALUES(58,221); +INSERT INTO product_slots VALUES(58,222); +INSERT INTO product_slots VALUES(58,223); +INSERT INTO product_slots VALUES(58,224); +INSERT INTO product_slots VALUES(58,225); +INSERT INTO product_slots VALUES(58,226); +INSERT INTO product_slots VALUES(58,227); +INSERT INTO product_slots VALUES(58,228); +INSERT INTO product_slots VALUES(58,229); +INSERT INTO product_slots VALUES(58,230); +INSERT INTO product_slots VALUES(58,231); +INSERT INTO product_slots VALUES(58,232); +INSERT INTO product_slots VALUES(58,233); +INSERT INTO product_slots VALUES(58,234); +INSERT INTO product_slots VALUES(58,235); +INSERT INTO product_slots VALUES(58,236); +INSERT INTO product_slots VALUES(58,237); +INSERT INTO product_slots VALUES(58,238); +INSERT INTO product_slots VALUES(58,239); +INSERT INTO product_slots VALUES(58,240); +INSERT INTO product_slots VALUES(58,241); +INSERT INTO product_slots VALUES(58,242); +INSERT INTO product_slots VALUES(58,243); +INSERT INTO product_slots VALUES(58,244); +INSERT INTO product_slots VALUES(58,274); +INSERT INTO product_slots VALUES(58,275); +INSERT INTO product_slots VALUES(58,279); +INSERT INTO product_slots VALUES(58,280); +INSERT INTO product_slots VALUES(58,281); +INSERT INTO product_slots VALUES(58,282); +INSERT INTO product_slots VALUES(58,283); +INSERT INTO product_slots VALUES(58,284); +INSERT INTO product_slots VALUES(58,285); +INSERT INTO product_slots VALUES(58,286); +INSERT INTO product_slots VALUES(58,287); +INSERT INTO product_slots VALUES(59,39); +INSERT INTO product_slots VALUES(59,40); +INSERT INTO product_slots VALUES(59,43); +INSERT INTO product_slots VALUES(59,45); +INSERT INTO product_slots VALUES(59,46); +INSERT INTO product_slots VALUES(59,48); +INSERT INTO product_slots VALUES(59,49); +INSERT INTO product_slots VALUES(59,51); +INSERT INTO product_slots VALUES(59,52); +INSERT INTO product_slots VALUES(59,53); +INSERT INTO product_slots VALUES(59,54); +INSERT INTO product_slots VALUES(59,57); +INSERT INTO product_slots VALUES(59,58); +INSERT INTO product_slots VALUES(59,59); +INSERT INTO product_slots VALUES(59,60); +INSERT INTO product_slots VALUES(59,61); +INSERT INTO product_slots VALUES(59,62); +INSERT INTO product_slots VALUES(59,63); +INSERT INTO product_slots VALUES(59,64); +INSERT INTO product_slots VALUES(59,65); +INSERT INTO product_slots VALUES(59,66); +INSERT INTO product_slots VALUES(59,67); +INSERT INTO product_slots VALUES(59,68); +INSERT INTO product_slots VALUES(59,69); +INSERT INTO product_slots VALUES(59,70); +INSERT INTO product_slots VALUES(59,71); +INSERT INTO product_slots VALUES(59,72); +INSERT INTO product_slots VALUES(59,73); +INSERT INTO product_slots VALUES(59,74); +INSERT INTO product_slots VALUES(59,75); +INSERT INTO product_slots VALUES(59,76); +INSERT INTO product_slots VALUES(59,77); +INSERT INTO product_slots VALUES(59,78); +INSERT INTO product_slots VALUES(59,79); +INSERT INTO product_slots VALUES(59,80); +INSERT INTO product_slots VALUES(59,81); +INSERT INTO product_slots VALUES(59,82); +INSERT INTO product_slots VALUES(59,83); +INSERT INTO product_slots VALUES(59,84); +INSERT INTO product_slots VALUES(59,85); +INSERT INTO product_slots VALUES(59,86); +INSERT INTO product_slots VALUES(59,87); +INSERT INTO product_slots VALUES(59,88); +INSERT INTO product_slots VALUES(59,89); +INSERT INTO product_slots VALUES(59,90); +INSERT INTO product_slots VALUES(59,91); +INSERT INTO product_slots VALUES(59,92); +INSERT INTO product_slots VALUES(59,93); +INSERT INTO product_slots VALUES(59,94); +INSERT INTO product_slots VALUES(59,95); +INSERT INTO product_slots VALUES(59,96); +INSERT INTO product_slots VALUES(59,97); +INSERT INTO product_slots VALUES(59,98); +INSERT INTO product_slots VALUES(59,99); +INSERT INTO product_slots VALUES(59,100); +INSERT INTO product_slots VALUES(59,102); +INSERT INTO product_slots VALUES(59,103); +INSERT INTO product_slots VALUES(59,104); +INSERT INTO product_slots VALUES(59,105); +INSERT INTO product_slots VALUES(59,106); +INSERT INTO product_slots VALUES(59,107); +INSERT INTO product_slots VALUES(59,108); +INSERT INTO product_slots VALUES(59,109); +INSERT INTO product_slots VALUES(59,110); +INSERT INTO product_slots VALUES(59,111); +INSERT INTO product_slots VALUES(59,112); +INSERT INTO product_slots VALUES(59,113); +INSERT INTO product_slots VALUES(59,114); +INSERT INTO product_slots VALUES(59,115); +INSERT INTO product_slots VALUES(59,117); +INSERT INTO product_slots VALUES(59,118); +INSERT INTO product_slots VALUES(59,119); +INSERT INTO product_slots VALUES(59,120); +INSERT INTO product_slots VALUES(59,121); +INSERT INTO product_slots VALUES(59,122); +INSERT INTO product_slots VALUES(59,123); +INSERT INTO product_slots VALUES(59,124); +INSERT INTO product_slots VALUES(59,125); +INSERT INTO product_slots VALUES(59,126); +INSERT INTO product_slots VALUES(59,127); +INSERT INTO product_slots VALUES(59,128); +INSERT INTO product_slots VALUES(59,129); +INSERT INTO product_slots VALUES(59,130); +INSERT INTO product_slots VALUES(59,131); +INSERT INTO product_slots VALUES(59,132); +INSERT INTO product_slots VALUES(59,133); +INSERT INTO product_slots VALUES(59,134); +INSERT INTO product_slots VALUES(59,135); +INSERT INTO product_slots VALUES(59,136); +INSERT INTO product_slots VALUES(59,138); +INSERT INTO product_slots VALUES(59,139); +INSERT INTO product_slots VALUES(59,140); +INSERT INTO product_slots VALUES(59,141); +INSERT INTO product_slots VALUES(59,142); +INSERT INTO product_slots VALUES(59,143); +INSERT INTO product_slots VALUES(59,145); +INSERT INTO product_slots VALUES(59,146); +INSERT INTO product_slots VALUES(59,147); +INSERT INTO product_slots VALUES(59,148); +INSERT INTO product_slots VALUES(59,149); +INSERT INTO product_slots VALUES(59,150); +INSERT INTO product_slots VALUES(59,151); +INSERT INTO product_slots VALUES(59,152); +INSERT INTO product_slots VALUES(59,153); +INSERT INTO product_slots VALUES(59,154); +INSERT INTO product_slots VALUES(59,155); +INSERT INTO product_slots VALUES(59,156); +INSERT INTO product_slots VALUES(59,157); +INSERT INTO product_slots VALUES(59,158); +INSERT INTO product_slots VALUES(59,159); +INSERT INTO product_slots VALUES(59,160); +INSERT INTO product_slots VALUES(59,161); +INSERT INTO product_slots VALUES(59,162); +INSERT INTO product_slots VALUES(59,163); +INSERT INTO product_slots VALUES(59,164); +INSERT INTO product_slots VALUES(59,165); +INSERT INTO product_slots VALUES(59,166); +INSERT INTO product_slots VALUES(59,167); +INSERT INTO product_slots VALUES(59,168); +INSERT INTO product_slots VALUES(59,169); +INSERT INTO product_slots VALUES(59,170); +INSERT INTO product_slots VALUES(59,171); +INSERT INTO product_slots VALUES(59,172); +INSERT INTO product_slots VALUES(59,173); +INSERT INTO product_slots VALUES(59,174); +INSERT INTO product_slots VALUES(59,175); +INSERT INTO product_slots VALUES(59,176); +INSERT INTO product_slots VALUES(59,177); +INSERT INTO product_slots VALUES(59,178); +INSERT INTO product_slots VALUES(59,179); +INSERT INTO product_slots VALUES(59,180); +INSERT INTO product_slots VALUES(59,181); +INSERT INTO product_slots VALUES(59,182); +INSERT INTO product_slots VALUES(59,183); +INSERT INTO product_slots VALUES(59,184); +INSERT INTO product_slots VALUES(59,185); +INSERT INTO product_slots VALUES(59,186); +INSERT INTO product_slots VALUES(59,187); +INSERT INTO product_slots VALUES(59,188); +INSERT INTO product_slots VALUES(59,189); +INSERT INTO product_slots VALUES(59,190); +INSERT INTO product_slots VALUES(59,191); +INSERT INTO product_slots VALUES(59,192); +INSERT INTO product_slots VALUES(59,193); +INSERT INTO product_slots VALUES(59,194); +INSERT INTO product_slots VALUES(59,195); +INSERT INTO product_slots VALUES(59,196); +INSERT INTO product_slots VALUES(59,197); +INSERT INTO product_slots VALUES(59,198); +INSERT INTO product_slots VALUES(59,199); +INSERT INTO product_slots VALUES(59,200); +INSERT INTO product_slots VALUES(59,201); +INSERT INTO product_slots VALUES(59,202); +INSERT INTO product_slots VALUES(59,203); +INSERT INTO product_slots VALUES(59,204); +INSERT INTO product_slots VALUES(59,205); +INSERT INTO product_slots VALUES(59,206); +INSERT INTO product_slots VALUES(59,207); +INSERT INTO product_slots VALUES(59,208); +INSERT INTO product_slots VALUES(59,209); +INSERT INTO product_slots VALUES(59,210); +INSERT INTO product_slots VALUES(59,211); +INSERT INTO product_slots VALUES(59,212); +INSERT INTO product_slots VALUES(59,213); +INSERT INTO product_slots VALUES(59,214); +INSERT INTO product_slots VALUES(59,215); +INSERT INTO product_slots VALUES(59,216); +INSERT INTO product_slots VALUES(59,217); +INSERT INTO product_slots VALUES(59,218); +INSERT INTO product_slots VALUES(59,219); +INSERT INTO product_slots VALUES(59,220); +INSERT INTO product_slots VALUES(59,221); +INSERT INTO product_slots VALUES(59,222); +INSERT INTO product_slots VALUES(59,223); +INSERT INTO product_slots VALUES(59,224); +INSERT INTO product_slots VALUES(59,225); +INSERT INTO product_slots VALUES(59,226); +INSERT INTO product_slots VALUES(59,227); +INSERT INTO product_slots VALUES(59,228); +INSERT INTO product_slots VALUES(59,229); +INSERT INTO product_slots VALUES(59,230); +INSERT INTO product_slots VALUES(59,231); +INSERT INTO product_slots VALUES(59,232); +INSERT INTO product_slots VALUES(59,233); +INSERT INTO product_slots VALUES(59,234); +INSERT INTO product_slots VALUES(59,235); +INSERT INTO product_slots VALUES(59,236); +INSERT INTO product_slots VALUES(59,237); +INSERT INTO product_slots VALUES(59,238); +INSERT INTO product_slots VALUES(59,239); +INSERT INTO product_slots VALUES(59,240); +INSERT INTO product_slots VALUES(59,241); +INSERT INTO product_slots VALUES(59,242); +INSERT INTO product_slots VALUES(59,243); +INSERT INTO product_slots VALUES(59,244); +INSERT INTO product_slots VALUES(59,274); +INSERT INTO product_slots VALUES(59,275); +INSERT INTO product_slots VALUES(59,279); +INSERT INTO product_slots VALUES(59,280); +INSERT INTO product_slots VALUES(59,281); +INSERT INTO product_slots VALUES(59,282); +INSERT INTO product_slots VALUES(59,283); +INSERT INTO product_slots VALUES(59,284); +INSERT INTO product_slots VALUES(59,285); +INSERT INTO product_slots VALUES(59,286); +INSERT INTO product_slots VALUES(59,287); +INSERT INTO product_slots VALUES(60,39); +INSERT INTO product_slots VALUES(60,40); +INSERT INTO product_slots VALUES(60,43); +INSERT INTO product_slots VALUES(60,45); +INSERT INTO product_slots VALUES(60,46); +INSERT INTO product_slots VALUES(60,48); +INSERT INTO product_slots VALUES(60,49); +INSERT INTO product_slots VALUES(60,51); +INSERT INTO product_slots VALUES(60,52); +INSERT INTO product_slots VALUES(60,53); +INSERT INTO product_slots VALUES(60,54); +INSERT INTO product_slots VALUES(60,57); +INSERT INTO product_slots VALUES(60,58); +INSERT INTO product_slots VALUES(60,59); +INSERT INTO product_slots VALUES(60,60); +INSERT INTO product_slots VALUES(60,61); +INSERT INTO product_slots VALUES(60,62); +INSERT INTO product_slots VALUES(60,63); +INSERT INTO product_slots VALUES(60,64); +INSERT INTO product_slots VALUES(60,65); +INSERT INTO product_slots VALUES(60,66); +INSERT INTO product_slots VALUES(60,67); +INSERT INTO product_slots VALUES(60,68); +INSERT INTO product_slots VALUES(60,69); +INSERT INTO product_slots VALUES(60,70); +INSERT INTO product_slots VALUES(60,71); +INSERT INTO product_slots VALUES(60,72); +INSERT INTO product_slots VALUES(60,73); +INSERT INTO product_slots VALUES(60,74); +INSERT INTO product_slots VALUES(60,75); +INSERT INTO product_slots VALUES(60,76); +INSERT INTO product_slots VALUES(60,77); +INSERT INTO product_slots VALUES(60,78); +INSERT INTO product_slots VALUES(60,79); +INSERT INTO product_slots VALUES(60,80); +INSERT INTO product_slots VALUES(60,81); +INSERT INTO product_slots VALUES(60,82); +INSERT INTO product_slots VALUES(60,83); +INSERT INTO product_slots VALUES(60,84); +INSERT INTO product_slots VALUES(60,85); +INSERT INTO product_slots VALUES(60,86); +INSERT INTO product_slots VALUES(60,87); +INSERT INTO product_slots VALUES(60,88); +INSERT INTO product_slots VALUES(60,89); +INSERT INTO product_slots VALUES(60,90); +INSERT INTO product_slots VALUES(60,91); +INSERT INTO product_slots VALUES(60,92); +INSERT INTO product_slots VALUES(60,93); +INSERT INTO product_slots VALUES(60,94); +INSERT INTO product_slots VALUES(60,95); +INSERT INTO product_slots VALUES(60,96); +INSERT INTO product_slots VALUES(60,97); +INSERT INTO product_slots VALUES(60,98); +INSERT INTO product_slots VALUES(60,99); +INSERT INTO product_slots VALUES(60,100); +INSERT INTO product_slots VALUES(60,102); +INSERT INTO product_slots VALUES(60,103); +INSERT INTO product_slots VALUES(60,104); +INSERT INTO product_slots VALUES(60,105); +INSERT INTO product_slots VALUES(60,106); +INSERT INTO product_slots VALUES(60,107); +INSERT INTO product_slots VALUES(60,108); +INSERT INTO product_slots VALUES(60,109); +INSERT INTO product_slots VALUES(60,110); +INSERT INTO product_slots VALUES(60,111); +INSERT INTO product_slots VALUES(60,112); +INSERT INTO product_slots VALUES(60,113); +INSERT INTO product_slots VALUES(60,114); +INSERT INTO product_slots VALUES(60,115); +INSERT INTO product_slots VALUES(60,117); +INSERT INTO product_slots VALUES(60,118); +INSERT INTO product_slots VALUES(60,119); +INSERT INTO product_slots VALUES(60,120); +INSERT INTO product_slots VALUES(60,121); +INSERT INTO product_slots VALUES(60,122); +INSERT INTO product_slots VALUES(60,123); +INSERT INTO product_slots VALUES(60,124); +INSERT INTO product_slots VALUES(60,125); +INSERT INTO product_slots VALUES(60,126); +INSERT INTO product_slots VALUES(60,127); +INSERT INTO product_slots VALUES(60,128); +INSERT INTO product_slots VALUES(60,129); +INSERT INTO product_slots VALUES(60,130); +INSERT INTO product_slots VALUES(60,131); +INSERT INTO product_slots VALUES(60,132); +INSERT INTO product_slots VALUES(60,133); +INSERT INTO product_slots VALUES(60,134); +INSERT INTO product_slots VALUES(60,135); +INSERT INTO product_slots VALUES(60,136); +INSERT INTO product_slots VALUES(60,138); +INSERT INTO product_slots VALUES(60,139); +INSERT INTO product_slots VALUES(60,140); +INSERT INTO product_slots VALUES(60,141); +INSERT INTO product_slots VALUES(60,142); +INSERT INTO product_slots VALUES(60,143); +INSERT INTO product_slots VALUES(60,145); +INSERT INTO product_slots VALUES(60,146); +INSERT INTO product_slots VALUES(60,147); +INSERT INTO product_slots VALUES(60,148); +INSERT INTO product_slots VALUES(60,149); +INSERT INTO product_slots VALUES(60,150); +INSERT INTO product_slots VALUES(60,151); +INSERT INTO product_slots VALUES(60,152); +INSERT INTO product_slots VALUES(60,153); +INSERT INTO product_slots VALUES(60,154); +INSERT INTO product_slots VALUES(60,155); +INSERT INTO product_slots VALUES(60,156); +INSERT INTO product_slots VALUES(60,157); +INSERT INTO product_slots VALUES(60,158); +INSERT INTO product_slots VALUES(60,159); +INSERT INTO product_slots VALUES(60,160); +INSERT INTO product_slots VALUES(60,161); +INSERT INTO product_slots VALUES(60,162); +INSERT INTO product_slots VALUES(60,163); +INSERT INTO product_slots VALUES(60,164); +INSERT INTO product_slots VALUES(60,165); +INSERT INTO product_slots VALUES(60,166); +INSERT INTO product_slots VALUES(60,167); +INSERT INTO product_slots VALUES(60,168); +INSERT INTO product_slots VALUES(60,169); +INSERT INTO product_slots VALUES(60,170); +INSERT INTO product_slots VALUES(60,171); +INSERT INTO product_slots VALUES(60,172); +INSERT INTO product_slots VALUES(60,173); +INSERT INTO product_slots VALUES(60,174); +INSERT INTO product_slots VALUES(60,175); +INSERT INTO product_slots VALUES(60,176); +INSERT INTO product_slots VALUES(60,177); +INSERT INTO product_slots VALUES(60,178); +INSERT INTO product_slots VALUES(60,179); +INSERT INTO product_slots VALUES(60,180); +INSERT INTO product_slots VALUES(60,181); +INSERT INTO product_slots VALUES(60,182); +INSERT INTO product_slots VALUES(60,183); +INSERT INTO product_slots VALUES(60,184); +INSERT INTO product_slots VALUES(60,185); +INSERT INTO product_slots VALUES(60,186); +INSERT INTO product_slots VALUES(60,187); +INSERT INTO product_slots VALUES(60,188); +INSERT INTO product_slots VALUES(60,189); +INSERT INTO product_slots VALUES(60,190); +INSERT INTO product_slots VALUES(60,191); +INSERT INTO product_slots VALUES(60,192); +INSERT INTO product_slots VALUES(60,193); +INSERT INTO product_slots VALUES(60,194); +INSERT INTO product_slots VALUES(60,195); +INSERT INTO product_slots VALUES(60,196); +INSERT INTO product_slots VALUES(60,197); +INSERT INTO product_slots VALUES(60,198); +INSERT INTO product_slots VALUES(60,199); +INSERT INTO product_slots VALUES(60,200); +INSERT INTO product_slots VALUES(60,201); +INSERT INTO product_slots VALUES(60,202); +INSERT INTO product_slots VALUES(60,203); +INSERT INTO product_slots VALUES(60,204); +INSERT INTO product_slots VALUES(60,205); +INSERT INTO product_slots VALUES(60,206); +INSERT INTO product_slots VALUES(60,207); +INSERT INTO product_slots VALUES(60,208); +INSERT INTO product_slots VALUES(60,209); +INSERT INTO product_slots VALUES(60,210); +INSERT INTO product_slots VALUES(60,211); +INSERT INTO product_slots VALUES(60,212); +INSERT INTO product_slots VALUES(60,213); +INSERT INTO product_slots VALUES(60,214); +INSERT INTO product_slots VALUES(60,215); +INSERT INTO product_slots VALUES(60,216); +INSERT INTO product_slots VALUES(60,217); +INSERT INTO product_slots VALUES(60,218); +INSERT INTO product_slots VALUES(60,219); +INSERT INTO product_slots VALUES(60,220); +INSERT INTO product_slots VALUES(60,221); +INSERT INTO product_slots VALUES(60,222); +INSERT INTO product_slots VALUES(60,223); +INSERT INTO product_slots VALUES(60,224); +INSERT INTO product_slots VALUES(60,225); +INSERT INTO product_slots VALUES(60,226); +INSERT INTO product_slots VALUES(60,227); +INSERT INTO product_slots VALUES(60,228); +INSERT INTO product_slots VALUES(60,229); +INSERT INTO product_slots VALUES(60,230); +INSERT INTO product_slots VALUES(60,231); +INSERT INTO product_slots VALUES(60,232); +INSERT INTO product_slots VALUES(60,233); +INSERT INTO product_slots VALUES(60,234); +INSERT INTO product_slots VALUES(60,235); +INSERT INTO product_slots VALUES(60,236); +INSERT INTO product_slots VALUES(60,237); +INSERT INTO product_slots VALUES(60,238); +INSERT INTO product_slots VALUES(60,239); +INSERT INTO product_slots VALUES(60,240); +INSERT INTO product_slots VALUES(60,241); +INSERT INTO product_slots VALUES(60,242); +INSERT INTO product_slots VALUES(60,243); +INSERT INTO product_slots VALUES(60,244); +INSERT INTO product_slots VALUES(60,274); +INSERT INTO product_slots VALUES(60,275); +INSERT INTO product_slots VALUES(60,279); +INSERT INTO product_slots VALUES(60,280); +INSERT INTO product_slots VALUES(60,281); +INSERT INTO product_slots VALUES(60,282); +INSERT INTO product_slots VALUES(60,283); +INSERT INTO product_slots VALUES(60,284); +INSERT INTO product_slots VALUES(60,285); +INSERT INTO product_slots VALUES(60,286); +INSERT INTO product_slots VALUES(60,287); +INSERT INTO product_slots VALUES(61,39); +INSERT INTO product_slots VALUES(61,40); +INSERT INTO product_slots VALUES(61,43); +INSERT INTO product_slots VALUES(61,45); +INSERT INTO product_slots VALUES(61,46); +INSERT INTO product_slots VALUES(61,48); +INSERT INTO product_slots VALUES(61,49); +INSERT INTO product_slots VALUES(61,51); +INSERT INTO product_slots VALUES(61,52); +INSERT INTO product_slots VALUES(61,53); +INSERT INTO product_slots VALUES(61,54); +INSERT INTO product_slots VALUES(61,57); +INSERT INTO product_slots VALUES(61,58); +INSERT INTO product_slots VALUES(61,59); +INSERT INTO product_slots VALUES(61,60); +INSERT INTO product_slots VALUES(61,61); +INSERT INTO product_slots VALUES(61,62); +INSERT INTO product_slots VALUES(61,63); +INSERT INTO product_slots VALUES(61,64); +INSERT INTO product_slots VALUES(61,65); +INSERT INTO product_slots VALUES(61,66); +INSERT INTO product_slots VALUES(61,67); +INSERT INTO product_slots VALUES(61,68); +INSERT INTO product_slots VALUES(61,69); +INSERT INTO product_slots VALUES(61,70); +INSERT INTO product_slots VALUES(61,71); +INSERT INTO product_slots VALUES(61,72); +INSERT INTO product_slots VALUES(61,73); +INSERT INTO product_slots VALUES(61,74); +INSERT INTO product_slots VALUES(61,75); +INSERT INTO product_slots VALUES(61,76); +INSERT INTO product_slots VALUES(61,77); +INSERT INTO product_slots VALUES(61,78); +INSERT INTO product_slots VALUES(61,79); +INSERT INTO product_slots VALUES(61,80); +INSERT INTO product_slots VALUES(61,81); +INSERT INTO product_slots VALUES(61,82); +INSERT INTO product_slots VALUES(61,83); +INSERT INTO product_slots VALUES(61,84); +INSERT INTO product_slots VALUES(61,85); +INSERT INTO product_slots VALUES(61,86); +INSERT INTO product_slots VALUES(61,87); +INSERT INTO product_slots VALUES(61,88); +INSERT INTO product_slots VALUES(61,89); +INSERT INTO product_slots VALUES(61,90); +INSERT INTO product_slots VALUES(61,91); +INSERT INTO product_slots VALUES(61,92); +INSERT INTO product_slots VALUES(61,93); +INSERT INTO product_slots VALUES(61,94); +INSERT INTO product_slots VALUES(61,95); +INSERT INTO product_slots VALUES(61,96); +INSERT INTO product_slots VALUES(61,97); +INSERT INTO product_slots VALUES(61,98); +INSERT INTO product_slots VALUES(61,99); +INSERT INTO product_slots VALUES(61,100); +INSERT INTO product_slots VALUES(61,102); +INSERT INTO product_slots VALUES(61,103); +INSERT INTO product_slots VALUES(61,104); +INSERT INTO product_slots VALUES(61,105); +INSERT INTO product_slots VALUES(61,106); +INSERT INTO product_slots VALUES(61,107); +INSERT INTO product_slots VALUES(61,108); +INSERT INTO product_slots VALUES(61,109); +INSERT INTO product_slots VALUES(61,110); +INSERT INTO product_slots VALUES(61,111); +INSERT INTO product_slots VALUES(61,112); +INSERT INTO product_slots VALUES(61,113); +INSERT INTO product_slots VALUES(61,114); +INSERT INTO product_slots VALUES(61,115); +INSERT INTO product_slots VALUES(61,117); +INSERT INTO product_slots VALUES(61,118); +INSERT INTO product_slots VALUES(61,119); +INSERT INTO product_slots VALUES(61,120); +INSERT INTO product_slots VALUES(61,121); +INSERT INTO product_slots VALUES(61,122); +INSERT INTO product_slots VALUES(61,123); +INSERT INTO product_slots VALUES(61,124); +INSERT INTO product_slots VALUES(61,125); +INSERT INTO product_slots VALUES(61,126); +INSERT INTO product_slots VALUES(61,127); +INSERT INTO product_slots VALUES(61,128); +INSERT INTO product_slots VALUES(61,129); +INSERT INTO product_slots VALUES(61,130); +INSERT INTO product_slots VALUES(61,131); +INSERT INTO product_slots VALUES(61,132); +INSERT INTO product_slots VALUES(61,133); +INSERT INTO product_slots VALUES(61,134); +INSERT INTO product_slots VALUES(61,135); +INSERT INTO product_slots VALUES(61,136); +INSERT INTO product_slots VALUES(61,138); +INSERT INTO product_slots VALUES(61,139); +INSERT INTO product_slots VALUES(61,140); +INSERT INTO product_slots VALUES(61,141); +INSERT INTO product_slots VALUES(61,142); +INSERT INTO product_slots VALUES(61,143); +INSERT INTO product_slots VALUES(61,145); +INSERT INTO product_slots VALUES(61,146); +INSERT INTO product_slots VALUES(61,147); +INSERT INTO product_slots VALUES(61,148); +INSERT INTO product_slots VALUES(61,149); +INSERT INTO product_slots VALUES(61,150); +INSERT INTO product_slots VALUES(61,151); +INSERT INTO product_slots VALUES(61,152); +INSERT INTO product_slots VALUES(61,153); +INSERT INTO product_slots VALUES(61,154); +INSERT INTO product_slots VALUES(61,155); +INSERT INTO product_slots VALUES(61,156); +INSERT INTO product_slots VALUES(61,157); +INSERT INTO product_slots VALUES(61,158); +INSERT INTO product_slots VALUES(61,159); +INSERT INTO product_slots VALUES(61,160); +INSERT INTO product_slots VALUES(61,161); +INSERT INTO product_slots VALUES(61,162); +INSERT INTO product_slots VALUES(61,163); +INSERT INTO product_slots VALUES(61,164); +INSERT INTO product_slots VALUES(61,165); +INSERT INTO product_slots VALUES(61,166); +INSERT INTO product_slots VALUES(61,167); +INSERT INTO product_slots VALUES(61,168); +INSERT INTO product_slots VALUES(61,169); +INSERT INTO product_slots VALUES(61,170); +INSERT INTO product_slots VALUES(61,171); +INSERT INTO product_slots VALUES(61,172); +INSERT INTO product_slots VALUES(61,173); +INSERT INTO product_slots VALUES(61,174); +INSERT INTO product_slots VALUES(61,175); +INSERT INTO product_slots VALUES(61,176); +INSERT INTO product_slots VALUES(61,177); +INSERT INTO product_slots VALUES(61,178); +INSERT INTO product_slots VALUES(61,179); +INSERT INTO product_slots VALUES(61,180); +INSERT INTO product_slots VALUES(61,181); +INSERT INTO product_slots VALUES(61,182); +INSERT INTO product_slots VALUES(61,183); +INSERT INTO product_slots VALUES(61,184); +INSERT INTO product_slots VALUES(61,185); +INSERT INTO product_slots VALUES(61,186); +INSERT INTO product_slots VALUES(61,187); +INSERT INTO product_slots VALUES(61,188); +INSERT INTO product_slots VALUES(61,189); +INSERT INTO product_slots VALUES(61,190); +INSERT INTO product_slots VALUES(61,191); +INSERT INTO product_slots VALUES(61,192); +INSERT INTO product_slots VALUES(61,193); +INSERT INTO product_slots VALUES(61,194); +INSERT INTO product_slots VALUES(61,195); +INSERT INTO product_slots VALUES(61,196); +INSERT INTO product_slots VALUES(61,197); +INSERT INTO product_slots VALUES(61,198); +INSERT INTO product_slots VALUES(61,199); +INSERT INTO product_slots VALUES(61,200); +INSERT INTO product_slots VALUES(61,201); +INSERT INTO product_slots VALUES(61,202); +INSERT INTO product_slots VALUES(61,203); +INSERT INTO product_slots VALUES(61,204); +INSERT INTO product_slots VALUES(61,205); +INSERT INTO product_slots VALUES(61,206); +INSERT INTO product_slots VALUES(61,207); +INSERT INTO product_slots VALUES(61,208); +INSERT INTO product_slots VALUES(61,209); +INSERT INTO product_slots VALUES(61,210); +INSERT INTO product_slots VALUES(61,211); +INSERT INTO product_slots VALUES(61,212); +INSERT INTO product_slots VALUES(61,213); +INSERT INTO product_slots VALUES(61,214); +INSERT INTO product_slots VALUES(61,215); +INSERT INTO product_slots VALUES(61,216); +INSERT INTO product_slots VALUES(61,217); +INSERT INTO product_slots VALUES(61,218); +INSERT INTO product_slots VALUES(61,219); +INSERT INTO product_slots VALUES(61,220); +INSERT INTO product_slots VALUES(61,221); +INSERT INTO product_slots VALUES(61,222); +INSERT INTO product_slots VALUES(61,223); +INSERT INTO product_slots VALUES(61,224); +INSERT INTO product_slots VALUES(61,225); +INSERT INTO product_slots VALUES(61,226); +INSERT INTO product_slots VALUES(61,227); +INSERT INTO product_slots VALUES(61,228); +INSERT INTO product_slots VALUES(61,229); +INSERT INTO product_slots VALUES(61,230); +INSERT INTO product_slots VALUES(61,231); +INSERT INTO product_slots VALUES(61,232); +INSERT INTO product_slots VALUES(61,233); +INSERT INTO product_slots VALUES(61,234); +INSERT INTO product_slots VALUES(61,235); +INSERT INTO product_slots VALUES(61,236); +INSERT INTO product_slots VALUES(61,237); +INSERT INTO product_slots VALUES(61,238); +INSERT INTO product_slots VALUES(61,239); +INSERT INTO product_slots VALUES(61,240); +INSERT INTO product_slots VALUES(61,241); +INSERT INTO product_slots VALUES(61,242); +INSERT INTO product_slots VALUES(61,243); +INSERT INTO product_slots VALUES(61,244); +INSERT INTO product_slots VALUES(61,274); +INSERT INTO product_slots VALUES(61,275); +INSERT INTO product_slots VALUES(61,279); +INSERT INTO product_slots VALUES(61,280); +INSERT INTO product_slots VALUES(61,281); +INSERT INTO product_slots VALUES(61,282); +INSERT INTO product_slots VALUES(61,283); +INSERT INTO product_slots VALUES(61,284); +INSERT INTO product_slots VALUES(61,285); +INSERT INTO product_slots VALUES(61,286); +INSERT INTO product_slots VALUES(61,287); +INSERT INTO product_slots VALUES(62,39); +INSERT INTO product_slots VALUES(62,40); +INSERT INTO product_slots VALUES(62,43); +INSERT INTO product_slots VALUES(62,45); +INSERT INTO product_slots VALUES(62,46); +INSERT INTO product_slots VALUES(62,48); +INSERT INTO product_slots VALUES(62,49); +INSERT INTO product_slots VALUES(62,51); +INSERT INTO product_slots VALUES(62,52); +INSERT INTO product_slots VALUES(62,53); +INSERT INTO product_slots VALUES(62,54); +INSERT INTO product_slots VALUES(62,57); +INSERT INTO product_slots VALUES(62,58); +INSERT INTO product_slots VALUES(62,59); +INSERT INTO product_slots VALUES(62,60); +INSERT INTO product_slots VALUES(62,61); +INSERT INTO product_slots VALUES(62,62); +INSERT INTO product_slots VALUES(62,63); +INSERT INTO product_slots VALUES(62,64); +INSERT INTO product_slots VALUES(62,65); +INSERT INTO product_slots VALUES(62,66); +INSERT INTO product_slots VALUES(62,67); +INSERT INTO product_slots VALUES(62,68); +INSERT INTO product_slots VALUES(62,69); +INSERT INTO product_slots VALUES(62,70); +INSERT INTO product_slots VALUES(62,71); +INSERT INTO product_slots VALUES(62,72); +INSERT INTO product_slots VALUES(62,73); +INSERT INTO product_slots VALUES(62,74); +INSERT INTO product_slots VALUES(62,75); +INSERT INTO product_slots VALUES(62,76); +INSERT INTO product_slots VALUES(62,77); +INSERT INTO product_slots VALUES(62,78); +INSERT INTO product_slots VALUES(62,79); +INSERT INTO product_slots VALUES(62,80); +INSERT INTO product_slots VALUES(62,81); +INSERT INTO product_slots VALUES(62,82); +INSERT INTO product_slots VALUES(62,83); +INSERT INTO product_slots VALUES(62,84); +INSERT INTO product_slots VALUES(62,85); +INSERT INTO product_slots VALUES(62,86); +INSERT INTO product_slots VALUES(62,87); +INSERT INTO product_slots VALUES(62,88); +INSERT INTO product_slots VALUES(62,89); +INSERT INTO product_slots VALUES(62,90); +INSERT INTO product_slots VALUES(62,91); +INSERT INTO product_slots VALUES(62,92); +INSERT INTO product_slots VALUES(62,93); +INSERT INTO product_slots VALUES(62,94); +INSERT INTO product_slots VALUES(62,95); +INSERT INTO product_slots VALUES(62,96); +INSERT INTO product_slots VALUES(62,97); +INSERT INTO product_slots VALUES(62,98); +INSERT INTO product_slots VALUES(62,99); +INSERT INTO product_slots VALUES(62,100); +INSERT INTO product_slots VALUES(62,102); +INSERT INTO product_slots VALUES(62,103); +INSERT INTO product_slots VALUES(62,104); +INSERT INTO product_slots VALUES(62,105); +INSERT INTO product_slots VALUES(62,106); +INSERT INTO product_slots VALUES(62,107); +INSERT INTO product_slots VALUES(62,108); +INSERT INTO product_slots VALUES(62,109); +INSERT INTO product_slots VALUES(62,110); +INSERT INTO product_slots VALUES(62,111); +INSERT INTO product_slots VALUES(62,112); +INSERT INTO product_slots VALUES(62,113); +INSERT INTO product_slots VALUES(62,114); +INSERT INTO product_slots VALUES(62,115); +INSERT INTO product_slots VALUES(62,117); +INSERT INTO product_slots VALUES(62,118); +INSERT INTO product_slots VALUES(62,119); +INSERT INTO product_slots VALUES(62,120); +INSERT INTO product_slots VALUES(62,121); +INSERT INTO product_slots VALUES(62,122); +INSERT INTO product_slots VALUES(62,123); +INSERT INTO product_slots VALUES(62,124); +INSERT INTO product_slots VALUES(62,125); +INSERT INTO product_slots VALUES(62,126); +INSERT INTO product_slots VALUES(62,127); +INSERT INTO product_slots VALUES(62,128); +INSERT INTO product_slots VALUES(62,129); +INSERT INTO product_slots VALUES(62,130); +INSERT INTO product_slots VALUES(62,131); +INSERT INTO product_slots VALUES(62,132); +INSERT INTO product_slots VALUES(62,133); +INSERT INTO product_slots VALUES(62,134); +INSERT INTO product_slots VALUES(62,135); +INSERT INTO product_slots VALUES(62,136); +INSERT INTO product_slots VALUES(62,138); +INSERT INTO product_slots VALUES(62,139); +INSERT INTO product_slots VALUES(62,140); +INSERT INTO product_slots VALUES(62,141); +INSERT INTO product_slots VALUES(62,142); +INSERT INTO product_slots VALUES(62,143); +INSERT INTO product_slots VALUES(62,145); +INSERT INTO product_slots VALUES(62,146); +INSERT INTO product_slots VALUES(62,147); +INSERT INTO product_slots VALUES(62,148); +INSERT INTO product_slots VALUES(62,149); +INSERT INTO product_slots VALUES(62,150); +INSERT INTO product_slots VALUES(62,151); +INSERT INTO product_slots VALUES(62,152); +INSERT INTO product_slots VALUES(62,153); +INSERT INTO product_slots VALUES(62,154); +INSERT INTO product_slots VALUES(62,155); +INSERT INTO product_slots VALUES(62,156); +INSERT INTO product_slots VALUES(62,157); +INSERT INTO product_slots VALUES(62,158); +INSERT INTO product_slots VALUES(62,159); +INSERT INTO product_slots VALUES(62,160); +INSERT INTO product_slots VALUES(62,161); +INSERT INTO product_slots VALUES(62,162); +INSERT INTO product_slots VALUES(62,163); +INSERT INTO product_slots VALUES(62,164); +INSERT INTO product_slots VALUES(62,165); +INSERT INTO product_slots VALUES(62,166); +INSERT INTO product_slots VALUES(62,167); +INSERT INTO product_slots VALUES(62,168); +INSERT INTO product_slots VALUES(62,169); +INSERT INTO product_slots VALUES(62,170); +INSERT INTO product_slots VALUES(62,171); +INSERT INTO product_slots VALUES(62,172); +INSERT INTO product_slots VALUES(62,173); +INSERT INTO product_slots VALUES(62,174); +INSERT INTO product_slots VALUES(62,175); +INSERT INTO product_slots VALUES(62,176); +INSERT INTO product_slots VALUES(62,177); +INSERT INTO product_slots VALUES(62,178); +INSERT INTO product_slots VALUES(62,179); +INSERT INTO product_slots VALUES(62,180); +INSERT INTO product_slots VALUES(62,181); +INSERT INTO product_slots VALUES(62,182); +INSERT INTO product_slots VALUES(62,183); +INSERT INTO product_slots VALUES(62,184); +INSERT INTO product_slots VALUES(62,185); +INSERT INTO product_slots VALUES(62,186); +INSERT INTO product_slots VALUES(62,187); +INSERT INTO product_slots VALUES(62,188); +INSERT INTO product_slots VALUES(62,189); +INSERT INTO product_slots VALUES(62,190); +INSERT INTO product_slots VALUES(62,191); +INSERT INTO product_slots VALUES(62,192); +INSERT INTO product_slots VALUES(62,193); +INSERT INTO product_slots VALUES(62,194); +INSERT INTO product_slots VALUES(62,195); +INSERT INTO product_slots VALUES(62,196); +INSERT INTO product_slots VALUES(62,197); +INSERT INTO product_slots VALUES(62,198); +INSERT INTO product_slots VALUES(62,199); +INSERT INTO product_slots VALUES(62,200); +INSERT INTO product_slots VALUES(62,201); +INSERT INTO product_slots VALUES(62,202); +INSERT INTO product_slots VALUES(62,203); +INSERT INTO product_slots VALUES(62,204); +INSERT INTO product_slots VALUES(62,205); +INSERT INTO product_slots VALUES(62,206); +INSERT INTO product_slots VALUES(62,207); +INSERT INTO product_slots VALUES(62,208); +INSERT INTO product_slots VALUES(62,209); +INSERT INTO product_slots VALUES(62,210); +INSERT INTO product_slots VALUES(62,211); +INSERT INTO product_slots VALUES(62,212); +INSERT INTO product_slots VALUES(62,213); +INSERT INTO product_slots VALUES(62,214); +INSERT INTO product_slots VALUES(62,215); +INSERT INTO product_slots VALUES(62,216); +INSERT INTO product_slots VALUES(62,217); +INSERT INTO product_slots VALUES(62,218); +INSERT INTO product_slots VALUES(62,219); +INSERT INTO product_slots VALUES(62,220); +INSERT INTO product_slots VALUES(62,221); +INSERT INTO product_slots VALUES(62,222); +INSERT INTO product_slots VALUES(62,223); +INSERT INTO product_slots VALUES(62,224); +INSERT INTO product_slots VALUES(62,225); +INSERT INTO product_slots VALUES(62,226); +INSERT INTO product_slots VALUES(62,227); +INSERT INTO product_slots VALUES(62,228); +INSERT INTO product_slots VALUES(62,229); +INSERT INTO product_slots VALUES(62,230); +INSERT INTO product_slots VALUES(62,231); +INSERT INTO product_slots VALUES(62,232); +INSERT INTO product_slots VALUES(62,233); +INSERT INTO product_slots VALUES(62,234); +INSERT INTO product_slots VALUES(62,235); +INSERT INTO product_slots VALUES(62,236); +INSERT INTO product_slots VALUES(62,237); +INSERT INTO product_slots VALUES(62,238); +INSERT INTO product_slots VALUES(62,239); +INSERT INTO product_slots VALUES(62,240); +INSERT INTO product_slots VALUES(62,241); +INSERT INTO product_slots VALUES(62,242); +INSERT INTO product_slots VALUES(62,243); +INSERT INTO product_slots VALUES(62,244); +INSERT INTO product_slots VALUES(62,274); +INSERT INTO product_slots VALUES(62,275); +INSERT INTO product_slots VALUES(62,279); +INSERT INTO product_slots VALUES(62,280); +INSERT INTO product_slots VALUES(62,281); +INSERT INTO product_slots VALUES(62,282); +INSERT INTO product_slots VALUES(62,283); +INSERT INTO product_slots VALUES(62,284); +INSERT INTO product_slots VALUES(62,285); +INSERT INTO product_slots VALUES(62,286); +INSERT INTO product_slots VALUES(62,287); +INSERT INTO product_slots VALUES(63,40); +INSERT INTO product_slots VALUES(63,59); +INSERT INTO product_slots VALUES(63,64); +INSERT INTO product_slots VALUES(63,65); +INSERT INTO product_slots VALUES(63,66); +INSERT INTO product_slots VALUES(63,67); +INSERT INTO product_slots VALUES(63,68); +INSERT INTO product_slots VALUES(63,69); +INSERT INTO product_slots VALUES(63,70); +INSERT INTO product_slots VALUES(63,71); +INSERT INTO product_slots VALUES(63,72); +INSERT INTO product_slots VALUES(63,73); +INSERT INTO product_slots VALUES(63,74); +INSERT INTO product_slots VALUES(63,75); +INSERT INTO product_slots VALUES(63,76); +INSERT INTO product_slots VALUES(63,77); +INSERT INTO product_slots VALUES(63,78); +INSERT INTO product_slots VALUES(63,79); +INSERT INTO product_slots VALUES(63,80); +INSERT INTO product_slots VALUES(63,81); +INSERT INTO product_slots VALUES(63,82); +INSERT INTO product_slots VALUES(63,83); +INSERT INTO product_slots VALUES(63,84); +INSERT INTO product_slots VALUES(63,85); +INSERT INTO product_slots VALUES(63,86); +INSERT INTO product_slots VALUES(63,87); +INSERT INTO product_slots VALUES(63,88); +INSERT INTO product_slots VALUES(63,89); +INSERT INTO product_slots VALUES(63,90); +INSERT INTO product_slots VALUES(63,91); +INSERT INTO product_slots VALUES(63,92); +INSERT INTO product_slots VALUES(63,93); +INSERT INTO product_slots VALUES(63,94); +INSERT INTO product_slots VALUES(63,95); +INSERT INTO product_slots VALUES(63,96); +INSERT INTO product_slots VALUES(63,97); +INSERT INTO product_slots VALUES(63,98); +INSERT INTO product_slots VALUES(63,99); +INSERT INTO product_slots VALUES(63,100); +INSERT INTO product_slots VALUES(63,102); +INSERT INTO product_slots VALUES(63,103); +INSERT INTO product_slots VALUES(63,104); +INSERT INTO product_slots VALUES(63,105); +INSERT INTO product_slots VALUES(63,106); +INSERT INTO product_slots VALUES(63,107); +INSERT INTO product_slots VALUES(63,108); +INSERT INTO product_slots VALUES(63,109); +INSERT INTO product_slots VALUES(63,110); +INSERT INTO product_slots VALUES(63,111); +INSERT INTO product_slots VALUES(63,112); +INSERT INTO product_slots VALUES(63,113); +INSERT INTO product_slots VALUES(63,114); +INSERT INTO product_slots VALUES(63,115); +INSERT INTO product_slots VALUES(63,117); +INSERT INTO product_slots VALUES(63,118); +INSERT INTO product_slots VALUES(63,119); +INSERT INTO product_slots VALUES(63,120); +INSERT INTO product_slots VALUES(63,121); +INSERT INTO product_slots VALUES(63,122); +INSERT INTO product_slots VALUES(63,123); +INSERT INTO product_slots VALUES(63,124); +INSERT INTO product_slots VALUES(63,125); +INSERT INTO product_slots VALUES(63,126); +INSERT INTO product_slots VALUES(63,127); +INSERT INTO product_slots VALUES(63,128); +INSERT INTO product_slots VALUES(63,129); +INSERT INTO product_slots VALUES(63,130); +INSERT INTO product_slots VALUES(63,131); +INSERT INTO product_slots VALUES(63,132); +INSERT INTO product_slots VALUES(63,133); +INSERT INTO product_slots VALUES(63,134); +INSERT INTO product_slots VALUES(63,135); +INSERT INTO product_slots VALUES(63,136); +INSERT INTO product_slots VALUES(63,138); +INSERT INTO product_slots VALUES(63,139); +INSERT INTO product_slots VALUES(63,140); +INSERT INTO product_slots VALUES(63,141); +INSERT INTO product_slots VALUES(63,142); +INSERT INTO product_slots VALUES(63,143); +INSERT INTO product_slots VALUES(63,145); +INSERT INTO product_slots VALUES(63,146); +INSERT INTO product_slots VALUES(63,147); +INSERT INTO product_slots VALUES(63,148); +INSERT INTO product_slots VALUES(63,149); +INSERT INTO product_slots VALUES(63,150); +INSERT INTO product_slots VALUES(63,151); +INSERT INTO product_slots VALUES(63,152); +INSERT INTO product_slots VALUES(63,153); +INSERT INTO product_slots VALUES(63,154); +INSERT INTO product_slots VALUES(63,155); +INSERT INTO product_slots VALUES(63,156); +INSERT INTO product_slots VALUES(63,157); +INSERT INTO product_slots VALUES(63,158); +INSERT INTO product_slots VALUES(63,159); +INSERT INTO product_slots VALUES(63,160); +INSERT INTO product_slots VALUES(63,161); +INSERT INTO product_slots VALUES(63,162); +INSERT INTO product_slots VALUES(63,163); +INSERT INTO product_slots VALUES(63,164); +INSERT INTO product_slots VALUES(63,165); +INSERT INTO product_slots VALUES(63,166); +INSERT INTO product_slots VALUES(63,167); +INSERT INTO product_slots VALUES(63,168); +INSERT INTO product_slots VALUES(63,169); +INSERT INTO product_slots VALUES(63,170); +INSERT INTO product_slots VALUES(63,171); +INSERT INTO product_slots VALUES(63,172); +INSERT INTO product_slots VALUES(63,173); +INSERT INTO product_slots VALUES(63,174); +INSERT INTO product_slots VALUES(63,175); +INSERT INTO product_slots VALUES(63,176); +INSERT INTO product_slots VALUES(63,177); +INSERT INTO product_slots VALUES(63,178); +INSERT INTO product_slots VALUES(63,179); +INSERT INTO product_slots VALUES(63,180); +INSERT INTO product_slots VALUES(63,181); +INSERT INTO product_slots VALUES(63,182); +INSERT INTO product_slots VALUES(63,183); +INSERT INTO product_slots VALUES(63,184); +INSERT INTO product_slots VALUES(63,185); +INSERT INTO product_slots VALUES(63,186); +INSERT INTO product_slots VALUES(63,187); +INSERT INTO product_slots VALUES(63,188); +INSERT INTO product_slots VALUES(63,189); +INSERT INTO product_slots VALUES(63,190); +INSERT INTO product_slots VALUES(63,191); +INSERT INTO product_slots VALUES(63,192); +INSERT INTO product_slots VALUES(63,193); +INSERT INTO product_slots VALUES(63,194); +INSERT INTO product_slots VALUES(63,195); +INSERT INTO product_slots VALUES(63,196); +INSERT INTO product_slots VALUES(63,197); +INSERT INTO product_slots VALUES(63,198); +INSERT INTO product_slots VALUES(63,199); +INSERT INTO product_slots VALUES(63,200); +INSERT INTO product_slots VALUES(63,201); +INSERT INTO product_slots VALUES(63,202); +INSERT INTO product_slots VALUES(63,203); +INSERT INTO product_slots VALUES(63,204); +INSERT INTO product_slots VALUES(63,205); +INSERT INTO product_slots VALUES(63,206); +INSERT INTO product_slots VALUES(63,207); +INSERT INTO product_slots VALUES(63,208); +INSERT INTO product_slots VALUES(63,209); +INSERT INTO product_slots VALUES(63,210); +INSERT INTO product_slots VALUES(63,211); +INSERT INTO product_slots VALUES(63,212); +INSERT INTO product_slots VALUES(63,213); +INSERT INTO product_slots VALUES(63,214); +INSERT INTO product_slots VALUES(63,215); +INSERT INTO product_slots VALUES(63,216); +INSERT INTO product_slots VALUES(63,217); +INSERT INTO product_slots VALUES(63,218); +INSERT INTO product_slots VALUES(63,219); +INSERT INTO product_slots VALUES(63,220); +INSERT INTO product_slots VALUES(63,221); +INSERT INTO product_slots VALUES(63,222); +INSERT INTO product_slots VALUES(63,223); +INSERT INTO product_slots VALUES(63,224); +INSERT INTO product_slots VALUES(63,225); +INSERT INTO product_slots VALUES(63,226); +INSERT INTO product_slots VALUES(63,227); +INSERT INTO product_slots VALUES(63,228); +INSERT INTO product_slots VALUES(63,229); +INSERT INTO product_slots VALUES(63,230); +INSERT INTO product_slots VALUES(63,231); +INSERT INTO product_slots VALUES(63,232); +INSERT INTO product_slots VALUES(63,233); +INSERT INTO product_slots VALUES(63,234); +INSERT INTO product_slots VALUES(63,235); +INSERT INTO product_slots VALUES(63,236); +INSERT INTO product_slots VALUES(63,237); +INSERT INTO product_slots VALUES(63,238); +INSERT INTO product_slots VALUES(63,239); +INSERT INTO product_slots VALUES(63,240); +INSERT INTO product_slots VALUES(63,241); +INSERT INTO product_slots VALUES(63,242); +INSERT INTO product_slots VALUES(63,243); +INSERT INTO product_slots VALUES(63,244); +INSERT INTO product_slots VALUES(63,274); +INSERT INTO product_slots VALUES(63,275); +INSERT INTO product_slots VALUES(63,279); +INSERT INTO product_slots VALUES(63,280); +INSERT INTO product_slots VALUES(63,281); +INSERT INTO product_slots VALUES(63,282); +INSERT INTO product_slots VALUES(63,283); +INSERT INTO product_slots VALUES(63,284); +INSERT INTO product_slots VALUES(63,285); +INSERT INTO product_slots VALUES(63,286); +INSERT INTO product_slots VALUES(63,287); +INSERT INTO product_slots VALUES(64,39); +INSERT INTO product_slots VALUES(64,44); +INSERT INTO product_slots VALUES(64,46); +INSERT INTO product_slots VALUES(64,47); +INSERT INTO product_slots VALUES(64,48); +INSERT INTO product_slots VALUES(64,49); +INSERT INTO product_slots VALUES(64,50); +INSERT INTO product_slots VALUES(64,51); +INSERT INTO product_slots VALUES(64,52); +INSERT INTO product_slots VALUES(64,53); +INSERT INTO product_slots VALUES(64,54); +INSERT INTO product_slots VALUES(64,55); +INSERT INTO product_slots VALUES(64,56); +INSERT INTO product_slots VALUES(64,57); +INSERT INTO product_slots VALUES(64,58); +INSERT INTO product_slots VALUES(64,59); +INSERT INTO product_slots VALUES(64,60); +INSERT INTO product_slots VALUES(64,61); +INSERT INTO product_slots VALUES(64,62); +INSERT INTO product_slots VALUES(64,63); +INSERT INTO product_slots VALUES(64,64); +INSERT INTO product_slots VALUES(64,65); +INSERT INTO product_slots VALUES(64,66); +INSERT INTO product_slots VALUES(64,67); +INSERT INTO product_slots VALUES(64,68); +INSERT INTO product_slots VALUES(64,69); +INSERT INTO product_slots VALUES(64,70); +INSERT INTO product_slots VALUES(64,71); +INSERT INTO product_slots VALUES(64,72); +INSERT INTO product_slots VALUES(64,73); +INSERT INTO product_slots VALUES(64,74); +INSERT INTO product_slots VALUES(64,75); +INSERT INTO product_slots VALUES(64,76); +INSERT INTO product_slots VALUES(64,77); +INSERT INTO product_slots VALUES(64,78); +INSERT INTO product_slots VALUES(64,79); +INSERT INTO product_slots VALUES(64,80); +INSERT INTO product_slots VALUES(64,81); +INSERT INTO product_slots VALUES(64,82); +INSERT INTO product_slots VALUES(64,83); +INSERT INTO product_slots VALUES(64,84); +INSERT INTO product_slots VALUES(64,85); +INSERT INTO product_slots VALUES(64,86); +INSERT INTO product_slots VALUES(64,87); +INSERT INTO product_slots VALUES(64,88); +INSERT INTO product_slots VALUES(64,89); +INSERT INTO product_slots VALUES(64,90); +INSERT INTO product_slots VALUES(64,91); +INSERT INTO product_slots VALUES(64,92); +INSERT INTO product_slots VALUES(64,93); +INSERT INTO product_slots VALUES(64,94); +INSERT INTO product_slots VALUES(64,95); +INSERT INTO product_slots VALUES(64,96); +INSERT INTO product_slots VALUES(64,97); +INSERT INTO product_slots VALUES(64,98); +INSERT INTO product_slots VALUES(64,99); +INSERT INTO product_slots VALUES(64,100); +INSERT INTO product_slots VALUES(64,101); +INSERT INTO product_slots VALUES(64,102); +INSERT INTO product_slots VALUES(64,103); +INSERT INTO product_slots VALUES(64,104); +INSERT INTO product_slots VALUES(64,105); +INSERT INTO product_slots VALUES(64,106); +INSERT INTO product_slots VALUES(64,107); +INSERT INTO product_slots VALUES(64,108); +INSERT INTO product_slots VALUES(64,109); +INSERT INTO product_slots VALUES(64,110); +INSERT INTO product_slots VALUES(64,111); +INSERT INTO product_slots VALUES(64,112); +INSERT INTO product_slots VALUES(64,113); +INSERT INTO product_slots VALUES(64,114); +INSERT INTO product_slots VALUES(64,115); +INSERT INTO product_slots VALUES(64,116); +INSERT INTO product_slots VALUES(64,117); +INSERT INTO product_slots VALUES(64,118); +INSERT INTO product_slots VALUES(64,119); +INSERT INTO product_slots VALUES(64,120); +INSERT INTO product_slots VALUES(64,121); +INSERT INTO product_slots VALUES(64,122); +INSERT INTO product_slots VALUES(64,123); +INSERT INTO product_slots VALUES(64,124); +INSERT INTO product_slots VALUES(64,125); +INSERT INTO product_slots VALUES(64,126); +INSERT INTO product_slots VALUES(64,127); +INSERT INTO product_slots VALUES(64,128); +INSERT INTO product_slots VALUES(64,129); +INSERT INTO product_slots VALUES(64,130); +INSERT INTO product_slots VALUES(64,131); +INSERT INTO product_slots VALUES(64,132); +INSERT INTO product_slots VALUES(64,133); +INSERT INTO product_slots VALUES(64,134); +INSERT INTO product_slots VALUES(64,135); +INSERT INTO product_slots VALUES(64,136); +INSERT INTO product_slots VALUES(64,137); +INSERT INTO product_slots VALUES(64,138); +INSERT INTO product_slots VALUES(64,139); +INSERT INTO product_slots VALUES(64,140); +INSERT INTO product_slots VALUES(64,141); +INSERT INTO product_slots VALUES(64,142); +INSERT INTO product_slots VALUES(64,143); +INSERT INTO product_slots VALUES(64,144); +INSERT INTO product_slots VALUES(64,145); +INSERT INTO product_slots VALUES(64,146); +INSERT INTO product_slots VALUES(64,147); +INSERT INTO product_slots VALUES(64,148); +INSERT INTO product_slots VALUES(64,149); +INSERT INTO product_slots VALUES(64,150); +INSERT INTO product_slots VALUES(64,151); +INSERT INTO product_slots VALUES(64,152); +INSERT INTO product_slots VALUES(64,153); +INSERT INTO product_slots VALUES(64,154); +INSERT INTO product_slots VALUES(64,155); +INSERT INTO product_slots VALUES(64,156); +INSERT INTO product_slots VALUES(64,157); +INSERT INTO product_slots VALUES(64,158); +INSERT INTO product_slots VALUES(64,159); +INSERT INTO product_slots VALUES(64,160); +INSERT INTO product_slots VALUES(64,161); +INSERT INTO product_slots VALUES(64,162); +INSERT INTO product_slots VALUES(64,163); +INSERT INTO product_slots VALUES(64,164); +INSERT INTO product_slots VALUES(64,165); +INSERT INTO product_slots VALUES(64,166); +INSERT INTO product_slots VALUES(64,167); +INSERT INTO product_slots VALUES(64,168); +INSERT INTO product_slots VALUES(64,169); +INSERT INTO product_slots VALUES(64,170); +INSERT INTO product_slots VALUES(64,171); +INSERT INTO product_slots VALUES(64,172); +INSERT INTO product_slots VALUES(64,173); +INSERT INTO product_slots VALUES(64,174); +INSERT INTO product_slots VALUES(64,175); +INSERT INTO product_slots VALUES(64,176); +INSERT INTO product_slots VALUES(64,177); +INSERT INTO product_slots VALUES(64,178); +INSERT INTO product_slots VALUES(64,179); +INSERT INTO product_slots VALUES(64,180); +INSERT INTO product_slots VALUES(64,181); +INSERT INTO product_slots VALUES(64,182); +INSERT INTO product_slots VALUES(64,183); +INSERT INTO product_slots VALUES(64,184); +INSERT INTO product_slots VALUES(64,185); +INSERT INTO product_slots VALUES(64,186); +INSERT INTO product_slots VALUES(64,187); +INSERT INTO product_slots VALUES(64,188); +INSERT INTO product_slots VALUES(64,189); +INSERT INTO product_slots VALUES(64,190); +INSERT INTO product_slots VALUES(64,191); +INSERT INTO product_slots VALUES(64,192); +INSERT INTO product_slots VALUES(64,193); +INSERT INTO product_slots VALUES(64,194); +INSERT INTO product_slots VALUES(64,195); +INSERT INTO product_slots VALUES(64,196); +INSERT INTO product_slots VALUES(64,197); +INSERT INTO product_slots VALUES(64,198); +INSERT INTO product_slots VALUES(64,199); +INSERT INTO product_slots VALUES(64,200); +INSERT INTO product_slots VALUES(64,201); +INSERT INTO product_slots VALUES(64,202); +INSERT INTO product_slots VALUES(64,203); +INSERT INTO product_slots VALUES(64,204); +INSERT INTO product_slots VALUES(64,205); +INSERT INTO product_slots VALUES(64,206); +INSERT INTO product_slots VALUES(64,207); +INSERT INTO product_slots VALUES(64,208); +INSERT INTO product_slots VALUES(64,209); +INSERT INTO product_slots VALUES(64,210); +INSERT INTO product_slots VALUES(64,211); +INSERT INTO product_slots VALUES(64,212); +INSERT INTO product_slots VALUES(64,213); +INSERT INTO product_slots VALUES(64,214); +INSERT INTO product_slots VALUES(64,215); +INSERT INTO product_slots VALUES(64,216); +INSERT INTO product_slots VALUES(64,217); +INSERT INTO product_slots VALUES(64,218); +INSERT INTO product_slots VALUES(64,219); +INSERT INTO product_slots VALUES(64,220); +INSERT INTO product_slots VALUES(64,221); +INSERT INTO product_slots VALUES(64,222); +INSERT INTO product_slots VALUES(64,223); +INSERT INTO product_slots VALUES(64,224); +INSERT INTO product_slots VALUES(64,225); +INSERT INTO product_slots VALUES(64,226); +INSERT INTO product_slots VALUES(64,227); +INSERT INTO product_slots VALUES(64,228); +INSERT INTO product_slots VALUES(64,229); +INSERT INTO product_slots VALUES(64,230); +INSERT INTO product_slots VALUES(64,231); +INSERT INTO product_slots VALUES(64,232); +INSERT INTO product_slots VALUES(64,233); +INSERT INTO product_slots VALUES(64,234); +INSERT INTO product_slots VALUES(64,235); +INSERT INTO product_slots VALUES(64,236); +INSERT INTO product_slots VALUES(64,237); +INSERT INTO product_slots VALUES(64,238); +INSERT INTO product_slots VALUES(64,239); +INSERT INTO product_slots VALUES(64,240); +INSERT INTO product_slots VALUES(64,241); +INSERT INTO product_slots VALUES(64,242); +INSERT INTO product_slots VALUES(64,243); +INSERT INTO product_slots VALUES(64,244); +INSERT INTO product_slots VALUES(64,274); +INSERT INTO product_slots VALUES(64,275); +INSERT INTO product_slots VALUES(64,279); +INSERT INTO product_slots VALUES(64,280); +INSERT INTO product_slots VALUES(64,281); +INSERT INTO product_slots VALUES(64,282); +INSERT INTO product_slots VALUES(64,283); +INSERT INTO product_slots VALUES(64,284); +INSERT INTO product_slots VALUES(64,285); +INSERT INTO product_slots VALUES(64,286); +INSERT INTO product_slots VALUES(64,287); +INSERT INTO product_slots VALUES(65,39); +INSERT INTO product_slots VALUES(65,41); +INSERT INTO product_slots VALUES(65,43); +INSERT INTO product_slots VALUES(65,44); +INSERT INTO product_slots VALUES(65,45); +INSERT INTO product_slots VALUES(65,46); +INSERT INTO product_slots VALUES(65,47); +INSERT INTO product_slots VALUES(65,48); +INSERT INTO product_slots VALUES(65,49); +INSERT INTO product_slots VALUES(65,50); +INSERT INTO product_slots VALUES(65,51); +INSERT INTO product_slots VALUES(65,52); +INSERT INTO product_slots VALUES(65,53); +INSERT INTO product_slots VALUES(65,54); +INSERT INTO product_slots VALUES(65,55); +INSERT INTO product_slots VALUES(65,56); +INSERT INTO product_slots VALUES(65,57); +INSERT INTO product_slots VALUES(65,58); +INSERT INTO product_slots VALUES(65,59); +INSERT INTO product_slots VALUES(65,60); +INSERT INTO product_slots VALUES(65,61); +INSERT INTO product_slots VALUES(65,62); +INSERT INTO product_slots VALUES(65,63); +INSERT INTO product_slots VALUES(65,64); +INSERT INTO product_slots VALUES(65,65); +INSERT INTO product_slots VALUES(65,66); +INSERT INTO product_slots VALUES(65,67); +INSERT INTO product_slots VALUES(65,68); +INSERT INTO product_slots VALUES(65,69); +INSERT INTO product_slots VALUES(65,70); +INSERT INTO product_slots VALUES(65,71); +INSERT INTO product_slots VALUES(65,72); +INSERT INTO product_slots VALUES(65,73); +INSERT INTO product_slots VALUES(65,74); +INSERT INTO product_slots VALUES(65,75); +INSERT INTO product_slots VALUES(65,76); +INSERT INTO product_slots VALUES(65,77); +INSERT INTO product_slots VALUES(65,78); +INSERT INTO product_slots VALUES(65,79); +INSERT INTO product_slots VALUES(65,80); +INSERT INTO product_slots VALUES(65,81); +INSERT INTO product_slots VALUES(65,82); +INSERT INTO product_slots VALUES(65,83); +INSERT INTO product_slots VALUES(65,84); +INSERT INTO product_slots VALUES(65,85); +INSERT INTO product_slots VALUES(65,86); +INSERT INTO product_slots VALUES(65,87); +INSERT INTO product_slots VALUES(65,88); +INSERT INTO product_slots VALUES(65,89); +INSERT INTO product_slots VALUES(65,90); +INSERT INTO product_slots VALUES(65,91); +INSERT INTO product_slots VALUES(65,92); +INSERT INTO product_slots VALUES(65,93); +INSERT INTO product_slots VALUES(65,94); +INSERT INTO product_slots VALUES(65,95); +INSERT INTO product_slots VALUES(65,96); +INSERT INTO product_slots VALUES(65,97); +INSERT INTO product_slots VALUES(65,98); +INSERT INTO product_slots VALUES(65,99); +INSERT INTO product_slots VALUES(65,100); +INSERT INTO product_slots VALUES(65,101); +INSERT INTO product_slots VALUES(65,102); +INSERT INTO product_slots VALUES(65,103); +INSERT INTO product_slots VALUES(65,104); +INSERT INTO product_slots VALUES(65,105); +INSERT INTO product_slots VALUES(65,106); +INSERT INTO product_slots VALUES(65,107); +INSERT INTO product_slots VALUES(65,108); +INSERT INTO product_slots VALUES(65,109); +INSERT INTO product_slots VALUES(65,110); +INSERT INTO product_slots VALUES(65,111); +INSERT INTO product_slots VALUES(65,112); +INSERT INTO product_slots VALUES(65,113); +INSERT INTO product_slots VALUES(65,114); +INSERT INTO product_slots VALUES(65,115); +INSERT INTO product_slots VALUES(65,116); +INSERT INTO product_slots VALUES(65,117); +INSERT INTO product_slots VALUES(65,118); +INSERT INTO product_slots VALUES(65,119); +INSERT INTO product_slots VALUES(65,120); +INSERT INTO product_slots VALUES(65,121); +INSERT INTO product_slots VALUES(65,122); +INSERT INTO product_slots VALUES(65,123); +INSERT INTO product_slots VALUES(65,124); +INSERT INTO product_slots VALUES(65,125); +INSERT INTO product_slots VALUES(65,126); +INSERT INTO product_slots VALUES(65,127); +INSERT INTO product_slots VALUES(65,128); +INSERT INTO product_slots VALUES(65,129); +INSERT INTO product_slots VALUES(65,130); +INSERT INTO product_slots VALUES(65,131); +INSERT INTO product_slots VALUES(65,132); +INSERT INTO product_slots VALUES(65,133); +INSERT INTO product_slots VALUES(65,134); +INSERT INTO product_slots VALUES(65,135); +INSERT INTO product_slots VALUES(65,136); +INSERT INTO product_slots VALUES(65,137); +INSERT INTO product_slots VALUES(65,138); +INSERT INTO product_slots VALUES(65,139); +INSERT INTO product_slots VALUES(65,140); +INSERT INTO product_slots VALUES(65,141); +INSERT INTO product_slots VALUES(65,142); +INSERT INTO product_slots VALUES(65,143); +INSERT INTO product_slots VALUES(65,144); +INSERT INTO product_slots VALUES(65,145); +INSERT INTO product_slots VALUES(65,146); +INSERT INTO product_slots VALUES(65,147); +INSERT INTO product_slots VALUES(65,148); +INSERT INTO product_slots VALUES(65,149); +INSERT INTO product_slots VALUES(65,150); +INSERT INTO product_slots VALUES(65,151); +INSERT INTO product_slots VALUES(65,152); +INSERT INTO product_slots VALUES(65,153); +INSERT INTO product_slots VALUES(65,154); +INSERT INTO product_slots VALUES(65,155); +INSERT INTO product_slots VALUES(65,156); +INSERT INTO product_slots VALUES(65,157); +INSERT INTO product_slots VALUES(65,158); +INSERT INTO product_slots VALUES(65,159); +INSERT INTO product_slots VALUES(65,160); +INSERT INTO product_slots VALUES(65,161); +INSERT INTO product_slots VALUES(65,162); +INSERT INTO product_slots VALUES(65,163); +INSERT INTO product_slots VALUES(65,164); +INSERT INTO product_slots VALUES(65,165); +INSERT INTO product_slots VALUES(65,166); +INSERT INTO product_slots VALUES(65,167); +INSERT INTO product_slots VALUES(65,168); +INSERT INTO product_slots VALUES(65,169); +INSERT INTO product_slots VALUES(65,170); +INSERT INTO product_slots VALUES(65,171); +INSERT INTO product_slots VALUES(65,172); +INSERT INTO product_slots VALUES(65,173); +INSERT INTO product_slots VALUES(65,174); +INSERT INTO product_slots VALUES(65,175); +INSERT INTO product_slots VALUES(65,176); +INSERT INTO product_slots VALUES(65,177); +INSERT INTO product_slots VALUES(65,178); +INSERT INTO product_slots VALUES(65,179); +INSERT INTO product_slots VALUES(65,180); +INSERT INTO product_slots VALUES(65,181); +INSERT INTO product_slots VALUES(65,182); +INSERT INTO product_slots VALUES(65,183); +INSERT INTO product_slots VALUES(65,184); +INSERT INTO product_slots VALUES(65,185); +INSERT INTO product_slots VALUES(65,186); +INSERT INTO product_slots VALUES(65,187); +INSERT INTO product_slots VALUES(65,188); +INSERT INTO product_slots VALUES(65,189); +INSERT INTO product_slots VALUES(65,190); +INSERT INTO product_slots VALUES(65,191); +INSERT INTO product_slots VALUES(65,192); +INSERT INTO product_slots VALUES(65,193); +INSERT INTO product_slots VALUES(65,194); +INSERT INTO product_slots VALUES(65,195); +INSERT INTO product_slots VALUES(65,196); +INSERT INTO product_slots VALUES(65,197); +INSERT INTO product_slots VALUES(65,198); +INSERT INTO product_slots VALUES(65,199); +INSERT INTO product_slots VALUES(65,200); +INSERT INTO product_slots VALUES(65,201); +INSERT INTO product_slots VALUES(65,202); +INSERT INTO product_slots VALUES(65,203); +INSERT INTO product_slots VALUES(65,204); +INSERT INTO product_slots VALUES(65,205); +INSERT INTO product_slots VALUES(65,206); +INSERT INTO product_slots VALUES(65,207); +INSERT INTO product_slots VALUES(65,208); +INSERT INTO product_slots VALUES(65,209); +INSERT INTO product_slots VALUES(65,210); +INSERT INTO product_slots VALUES(65,211); +INSERT INTO product_slots VALUES(65,212); +INSERT INTO product_slots VALUES(65,213); +INSERT INTO product_slots VALUES(65,214); +INSERT INTO product_slots VALUES(65,215); +INSERT INTO product_slots VALUES(65,216); +INSERT INTO product_slots VALUES(65,217); +INSERT INTO product_slots VALUES(65,218); +INSERT INTO product_slots VALUES(65,219); +INSERT INTO product_slots VALUES(65,220); +INSERT INTO product_slots VALUES(65,221); +INSERT INTO product_slots VALUES(65,222); +INSERT INTO product_slots VALUES(65,223); +INSERT INTO product_slots VALUES(65,224); +INSERT INTO product_slots VALUES(65,225); +INSERT INTO product_slots VALUES(65,226); +INSERT INTO product_slots VALUES(65,227); +INSERT INTO product_slots VALUES(65,228); +INSERT INTO product_slots VALUES(65,229); +INSERT INTO product_slots VALUES(65,230); +INSERT INTO product_slots VALUES(65,231); +INSERT INTO product_slots VALUES(65,232); +INSERT INTO product_slots VALUES(65,233); +INSERT INTO product_slots VALUES(65,234); +INSERT INTO product_slots VALUES(65,235); +INSERT INTO product_slots VALUES(65,236); +INSERT INTO product_slots VALUES(65,237); +INSERT INTO product_slots VALUES(65,238); +INSERT INTO product_slots VALUES(65,239); +INSERT INTO product_slots VALUES(65,240); +INSERT INTO product_slots VALUES(65,241); +INSERT INTO product_slots VALUES(65,242); +INSERT INTO product_slots VALUES(65,243); +INSERT INTO product_slots VALUES(65,244); +INSERT INTO product_slots VALUES(65,274); +INSERT INTO product_slots VALUES(65,275); +INSERT INTO product_slots VALUES(65,279); +INSERT INTO product_slots VALUES(65,280); +INSERT INTO product_slots VALUES(65,281); +INSERT INTO product_slots VALUES(65,282); +INSERT INTO product_slots VALUES(65,283); +INSERT INTO product_slots VALUES(65,284); +INSERT INTO product_slots VALUES(65,285); +INSERT INTO product_slots VALUES(65,286); +INSERT INTO product_slots VALUES(65,287); +INSERT INTO product_slots VALUES(66,39); +INSERT INTO product_slots VALUES(66,41); +INSERT INTO product_slots VALUES(66,43); +INSERT INTO product_slots VALUES(66,44); +INSERT INTO product_slots VALUES(66,45); +INSERT INTO product_slots VALUES(66,46); +INSERT INTO product_slots VALUES(66,47); +INSERT INTO product_slots VALUES(66,48); +INSERT INTO product_slots VALUES(66,49); +INSERT INTO product_slots VALUES(66,50); +INSERT INTO product_slots VALUES(66,51); +INSERT INTO product_slots VALUES(66,52); +INSERT INTO product_slots VALUES(66,53); +INSERT INTO product_slots VALUES(66,54); +INSERT INTO product_slots VALUES(66,55); +INSERT INTO product_slots VALUES(66,56); +INSERT INTO product_slots VALUES(66,57); +INSERT INTO product_slots VALUES(66,58); +INSERT INTO product_slots VALUES(66,59); +INSERT INTO product_slots VALUES(66,60); +INSERT INTO product_slots VALUES(66,61); +INSERT INTO product_slots VALUES(66,62); +INSERT INTO product_slots VALUES(66,63); +INSERT INTO product_slots VALUES(66,64); +INSERT INTO product_slots VALUES(66,65); +INSERT INTO product_slots VALUES(66,66); +INSERT INTO product_slots VALUES(66,67); +INSERT INTO product_slots VALUES(66,68); +INSERT INTO product_slots VALUES(66,69); +INSERT INTO product_slots VALUES(66,70); +INSERT INTO product_slots VALUES(66,71); +INSERT INTO product_slots VALUES(66,72); +INSERT INTO product_slots VALUES(66,73); +INSERT INTO product_slots VALUES(66,74); +INSERT INTO product_slots VALUES(66,75); +INSERT INTO product_slots VALUES(66,76); +INSERT INTO product_slots VALUES(66,77); +INSERT INTO product_slots VALUES(66,78); +INSERT INTO product_slots VALUES(66,79); +INSERT INTO product_slots VALUES(66,80); +INSERT INTO product_slots VALUES(66,81); +INSERT INTO product_slots VALUES(66,82); +INSERT INTO product_slots VALUES(66,83); +INSERT INTO product_slots VALUES(66,84); +INSERT INTO product_slots VALUES(66,85); +INSERT INTO product_slots VALUES(66,86); +INSERT INTO product_slots VALUES(66,87); +INSERT INTO product_slots VALUES(66,88); +INSERT INTO product_slots VALUES(66,89); +INSERT INTO product_slots VALUES(66,90); +INSERT INTO product_slots VALUES(66,91); +INSERT INTO product_slots VALUES(66,92); +INSERT INTO product_slots VALUES(66,93); +INSERT INTO product_slots VALUES(66,94); +INSERT INTO product_slots VALUES(66,95); +INSERT INTO product_slots VALUES(66,96); +INSERT INTO product_slots VALUES(66,97); +INSERT INTO product_slots VALUES(66,98); +INSERT INTO product_slots VALUES(66,99); +INSERT INTO product_slots VALUES(66,100); +INSERT INTO product_slots VALUES(66,101); +INSERT INTO product_slots VALUES(66,102); +INSERT INTO product_slots VALUES(66,103); +INSERT INTO product_slots VALUES(66,104); +INSERT INTO product_slots VALUES(66,105); +INSERT INTO product_slots VALUES(66,106); +INSERT INTO product_slots VALUES(66,107); +INSERT INTO product_slots VALUES(66,108); +INSERT INTO product_slots VALUES(66,109); +INSERT INTO product_slots VALUES(66,110); +INSERT INTO product_slots VALUES(66,111); +INSERT INTO product_slots VALUES(66,112); +INSERT INTO product_slots VALUES(66,113); +INSERT INTO product_slots VALUES(66,114); +INSERT INTO product_slots VALUES(66,115); +INSERT INTO product_slots VALUES(66,116); +INSERT INTO product_slots VALUES(66,117); +INSERT INTO product_slots VALUES(66,118); +INSERT INTO product_slots VALUES(66,119); +INSERT INTO product_slots VALUES(66,120); +INSERT INTO product_slots VALUES(66,121); +INSERT INTO product_slots VALUES(66,122); +INSERT INTO product_slots VALUES(66,123); +INSERT INTO product_slots VALUES(66,124); +INSERT INTO product_slots VALUES(66,125); +INSERT INTO product_slots VALUES(66,126); +INSERT INTO product_slots VALUES(66,127); +INSERT INTO product_slots VALUES(66,128); +INSERT INTO product_slots VALUES(66,129); +INSERT INTO product_slots VALUES(66,130); +INSERT INTO product_slots VALUES(66,131); +INSERT INTO product_slots VALUES(66,132); +INSERT INTO product_slots VALUES(66,133); +INSERT INTO product_slots VALUES(66,134); +INSERT INTO product_slots VALUES(66,135); +INSERT INTO product_slots VALUES(66,136); +INSERT INTO product_slots VALUES(66,137); +INSERT INTO product_slots VALUES(66,138); +INSERT INTO product_slots VALUES(66,139); +INSERT INTO product_slots VALUES(66,140); +INSERT INTO product_slots VALUES(66,141); +INSERT INTO product_slots VALUES(66,142); +INSERT INTO product_slots VALUES(66,143); +INSERT INTO product_slots VALUES(66,144); +INSERT INTO product_slots VALUES(66,145); +INSERT INTO product_slots VALUES(66,146); +INSERT INTO product_slots VALUES(66,147); +INSERT INTO product_slots VALUES(66,148); +INSERT INTO product_slots VALUES(66,149); +INSERT INTO product_slots VALUES(66,150); +INSERT INTO product_slots VALUES(66,151); +INSERT INTO product_slots VALUES(66,152); +INSERT INTO product_slots VALUES(66,153); +INSERT INTO product_slots VALUES(66,154); +INSERT INTO product_slots VALUES(66,155); +INSERT INTO product_slots VALUES(66,156); +INSERT INTO product_slots VALUES(66,157); +INSERT INTO product_slots VALUES(66,158); +INSERT INTO product_slots VALUES(66,159); +INSERT INTO product_slots VALUES(66,160); +INSERT INTO product_slots VALUES(66,161); +INSERT INTO product_slots VALUES(66,162); +INSERT INTO product_slots VALUES(66,163); +INSERT INTO product_slots VALUES(66,164); +INSERT INTO product_slots VALUES(66,165); +INSERT INTO product_slots VALUES(66,166); +INSERT INTO product_slots VALUES(66,167); +INSERT INTO product_slots VALUES(66,168); +INSERT INTO product_slots VALUES(66,169); +INSERT INTO product_slots VALUES(66,170); +INSERT INTO product_slots VALUES(66,171); +INSERT INTO product_slots VALUES(66,172); +INSERT INTO product_slots VALUES(66,173); +INSERT INTO product_slots VALUES(66,174); +INSERT INTO product_slots VALUES(66,175); +INSERT INTO product_slots VALUES(66,176); +INSERT INTO product_slots VALUES(66,177); +INSERT INTO product_slots VALUES(66,178); +INSERT INTO product_slots VALUES(66,179); +INSERT INTO product_slots VALUES(66,180); +INSERT INTO product_slots VALUES(66,181); +INSERT INTO product_slots VALUES(66,182); +INSERT INTO product_slots VALUES(66,183); +INSERT INTO product_slots VALUES(66,184); +INSERT INTO product_slots VALUES(66,185); +INSERT INTO product_slots VALUES(66,186); +INSERT INTO product_slots VALUES(66,187); +INSERT INTO product_slots VALUES(66,188); +INSERT INTO product_slots VALUES(66,189); +INSERT INTO product_slots VALUES(66,190); +INSERT INTO product_slots VALUES(66,191); +INSERT INTO product_slots VALUES(66,192); +INSERT INTO product_slots VALUES(66,193); +INSERT INTO product_slots VALUES(66,194); +INSERT INTO product_slots VALUES(66,195); +INSERT INTO product_slots VALUES(66,196); +INSERT INTO product_slots VALUES(66,197); +INSERT INTO product_slots VALUES(66,198); +INSERT INTO product_slots VALUES(66,199); +INSERT INTO product_slots VALUES(66,200); +INSERT INTO product_slots VALUES(66,201); +INSERT INTO product_slots VALUES(66,202); +INSERT INTO product_slots VALUES(66,203); +INSERT INTO product_slots VALUES(66,204); +INSERT INTO product_slots VALUES(66,205); +INSERT INTO product_slots VALUES(66,206); +INSERT INTO product_slots VALUES(66,207); +INSERT INTO product_slots VALUES(66,208); +INSERT INTO product_slots VALUES(66,209); +INSERT INTO product_slots VALUES(66,210); +INSERT INTO product_slots VALUES(66,211); +INSERT INTO product_slots VALUES(66,212); +INSERT INTO product_slots VALUES(66,213); +INSERT INTO product_slots VALUES(66,214); +INSERT INTO product_slots VALUES(66,215); +INSERT INTO product_slots VALUES(66,216); +INSERT INTO product_slots VALUES(66,217); +INSERT INTO product_slots VALUES(66,218); +INSERT INTO product_slots VALUES(66,219); +INSERT INTO product_slots VALUES(66,220); +INSERT INTO product_slots VALUES(66,221); +INSERT INTO product_slots VALUES(66,222); +INSERT INTO product_slots VALUES(66,223); +INSERT INTO product_slots VALUES(66,224); +INSERT INTO product_slots VALUES(66,225); +INSERT INTO product_slots VALUES(66,226); +INSERT INTO product_slots VALUES(66,227); +INSERT INTO product_slots VALUES(66,228); +INSERT INTO product_slots VALUES(66,229); +INSERT INTO product_slots VALUES(66,230); +INSERT INTO product_slots VALUES(66,231); +INSERT INTO product_slots VALUES(66,232); +INSERT INTO product_slots VALUES(66,233); +INSERT INTO product_slots VALUES(66,234); +INSERT INTO product_slots VALUES(66,235); +INSERT INTO product_slots VALUES(66,236); +INSERT INTO product_slots VALUES(66,237); +INSERT INTO product_slots VALUES(66,238); +INSERT INTO product_slots VALUES(66,239); +INSERT INTO product_slots VALUES(66,240); +INSERT INTO product_slots VALUES(66,241); +INSERT INTO product_slots VALUES(66,242); +INSERT INTO product_slots VALUES(66,243); +INSERT INTO product_slots VALUES(66,244); +INSERT INTO product_slots VALUES(66,274); +INSERT INTO product_slots VALUES(66,275); +INSERT INTO product_slots VALUES(66,279); +INSERT INTO product_slots VALUES(66,280); +INSERT INTO product_slots VALUES(66,281); +INSERT INTO product_slots VALUES(66,282); +INSERT INTO product_slots VALUES(66,283); +INSERT INTO product_slots VALUES(66,284); +INSERT INTO product_slots VALUES(66,285); +INSERT INTO product_slots VALUES(66,286); +INSERT INTO product_slots VALUES(66,287); +INSERT INTO product_slots VALUES(67,39); +INSERT INTO product_slots VALUES(67,41); +INSERT INTO product_slots VALUES(67,43); +INSERT INTO product_slots VALUES(67,44); +INSERT INTO product_slots VALUES(67,45); +INSERT INTO product_slots VALUES(67,46); +INSERT INTO product_slots VALUES(67,47); +INSERT INTO product_slots VALUES(67,48); +INSERT INTO product_slots VALUES(67,49); +INSERT INTO product_slots VALUES(67,50); +INSERT INTO product_slots VALUES(67,51); +INSERT INTO product_slots VALUES(67,52); +INSERT INTO product_slots VALUES(67,53); +INSERT INTO product_slots VALUES(67,54); +INSERT INTO product_slots VALUES(67,55); +INSERT INTO product_slots VALUES(67,56); +INSERT INTO product_slots VALUES(67,57); +INSERT INTO product_slots VALUES(67,58); +INSERT INTO product_slots VALUES(67,59); +INSERT INTO product_slots VALUES(67,60); +INSERT INTO product_slots VALUES(67,61); +INSERT INTO product_slots VALUES(67,62); +INSERT INTO product_slots VALUES(67,63); +INSERT INTO product_slots VALUES(67,64); +INSERT INTO product_slots VALUES(67,65); +INSERT INTO product_slots VALUES(67,66); +INSERT INTO product_slots VALUES(67,67); +INSERT INTO product_slots VALUES(67,68); +INSERT INTO product_slots VALUES(67,69); +INSERT INTO product_slots VALUES(67,70); +INSERT INTO product_slots VALUES(67,71); +INSERT INTO product_slots VALUES(67,72); +INSERT INTO product_slots VALUES(67,73); +INSERT INTO product_slots VALUES(67,74); +INSERT INTO product_slots VALUES(67,75); +INSERT INTO product_slots VALUES(67,76); +INSERT INTO product_slots VALUES(67,77); +INSERT INTO product_slots VALUES(67,78); +INSERT INTO product_slots VALUES(67,79); +INSERT INTO product_slots VALUES(67,80); +INSERT INTO product_slots VALUES(67,81); +INSERT INTO product_slots VALUES(67,82); +INSERT INTO product_slots VALUES(67,83); +INSERT INTO product_slots VALUES(67,84); +INSERT INTO product_slots VALUES(67,85); +INSERT INTO product_slots VALUES(67,86); +INSERT INTO product_slots VALUES(67,87); +INSERT INTO product_slots VALUES(67,88); +INSERT INTO product_slots VALUES(67,89); +INSERT INTO product_slots VALUES(67,90); +INSERT INTO product_slots VALUES(67,91); +INSERT INTO product_slots VALUES(67,92); +INSERT INTO product_slots VALUES(67,93); +INSERT INTO product_slots VALUES(67,94); +INSERT INTO product_slots VALUES(67,95); +INSERT INTO product_slots VALUES(67,96); +INSERT INTO product_slots VALUES(67,97); +INSERT INTO product_slots VALUES(67,98); +INSERT INTO product_slots VALUES(67,99); +INSERT INTO product_slots VALUES(67,100); +INSERT INTO product_slots VALUES(67,101); +INSERT INTO product_slots VALUES(67,102); +INSERT INTO product_slots VALUES(67,103); +INSERT INTO product_slots VALUES(67,104); +INSERT INTO product_slots VALUES(67,105); +INSERT INTO product_slots VALUES(67,106); +INSERT INTO product_slots VALUES(67,107); +INSERT INTO product_slots VALUES(67,108); +INSERT INTO product_slots VALUES(67,109); +INSERT INTO product_slots VALUES(67,110); +INSERT INTO product_slots VALUES(67,111); +INSERT INTO product_slots VALUES(67,112); +INSERT INTO product_slots VALUES(67,113); +INSERT INTO product_slots VALUES(67,114); +INSERT INTO product_slots VALUES(67,115); +INSERT INTO product_slots VALUES(67,116); +INSERT INTO product_slots VALUES(67,117); +INSERT INTO product_slots VALUES(67,118); +INSERT INTO product_slots VALUES(67,119); +INSERT INTO product_slots VALUES(67,120); +INSERT INTO product_slots VALUES(67,121); +INSERT INTO product_slots VALUES(67,122); +INSERT INTO product_slots VALUES(67,123); +INSERT INTO product_slots VALUES(67,124); +INSERT INTO product_slots VALUES(67,125); +INSERT INTO product_slots VALUES(67,126); +INSERT INTO product_slots VALUES(67,127); +INSERT INTO product_slots VALUES(67,128); +INSERT INTO product_slots VALUES(67,129); +INSERT INTO product_slots VALUES(67,130); +INSERT INTO product_slots VALUES(67,131); +INSERT INTO product_slots VALUES(67,132); +INSERT INTO product_slots VALUES(67,133); +INSERT INTO product_slots VALUES(67,134); +INSERT INTO product_slots VALUES(67,135); +INSERT INTO product_slots VALUES(67,136); +INSERT INTO product_slots VALUES(67,137); +INSERT INTO product_slots VALUES(67,138); +INSERT INTO product_slots VALUES(67,139); +INSERT INTO product_slots VALUES(67,140); +INSERT INTO product_slots VALUES(67,141); +INSERT INTO product_slots VALUES(67,142); +INSERT INTO product_slots VALUES(67,143); +INSERT INTO product_slots VALUES(67,144); +INSERT INTO product_slots VALUES(67,145); +INSERT INTO product_slots VALUES(67,146); +INSERT INTO product_slots VALUES(67,147); +INSERT INTO product_slots VALUES(67,148); +INSERT INTO product_slots VALUES(67,149); +INSERT INTO product_slots VALUES(67,150); +INSERT INTO product_slots VALUES(67,151); +INSERT INTO product_slots VALUES(67,152); +INSERT INTO product_slots VALUES(67,153); +INSERT INTO product_slots VALUES(67,154); +INSERT INTO product_slots VALUES(67,155); +INSERT INTO product_slots VALUES(67,156); +INSERT INTO product_slots VALUES(67,157); +INSERT INTO product_slots VALUES(67,158); +INSERT INTO product_slots VALUES(67,159); +INSERT INTO product_slots VALUES(67,160); +INSERT INTO product_slots VALUES(67,161); +INSERT INTO product_slots VALUES(67,162); +INSERT INTO product_slots VALUES(67,163); +INSERT INTO product_slots VALUES(67,164); +INSERT INTO product_slots VALUES(67,165); +INSERT INTO product_slots VALUES(67,166); +INSERT INTO product_slots VALUES(67,167); +INSERT INTO product_slots VALUES(67,168); +INSERT INTO product_slots VALUES(67,169); +INSERT INTO product_slots VALUES(67,170); +INSERT INTO product_slots VALUES(67,171); +INSERT INTO product_slots VALUES(67,172); +INSERT INTO product_slots VALUES(67,173); +INSERT INTO product_slots VALUES(67,174); +INSERT INTO product_slots VALUES(67,175); +INSERT INTO product_slots VALUES(67,176); +INSERT INTO product_slots VALUES(67,177); +INSERT INTO product_slots VALUES(67,178); +INSERT INTO product_slots VALUES(67,179); +INSERT INTO product_slots VALUES(67,180); +INSERT INTO product_slots VALUES(67,181); +INSERT INTO product_slots VALUES(67,182); +INSERT INTO product_slots VALUES(67,183); +INSERT INTO product_slots VALUES(67,184); +INSERT INTO product_slots VALUES(67,185); +INSERT INTO product_slots VALUES(67,186); +INSERT INTO product_slots VALUES(67,187); +INSERT INTO product_slots VALUES(67,188); +INSERT INTO product_slots VALUES(67,189); +INSERT INTO product_slots VALUES(67,190); +INSERT INTO product_slots VALUES(67,191); +INSERT INTO product_slots VALUES(67,192); +INSERT INTO product_slots VALUES(67,193); +INSERT INTO product_slots VALUES(67,194); +INSERT INTO product_slots VALUES(67,195); +INSERT INTO product_slots VALUES(67,196); +INSERT INTO product_slots VALUES(67,197); +INSERT INTO product_slots VALUES(67,198); +INSERT INTO product_slots VALUES(67,199); +INSERT INTO product_slots VALUES(67,200); +INSERT INTO product_slots VALUES(67,201); +INSERT INTO product_slots VALUES(67,202); +INSERT INTO product_slots VALUES(67,203); +INSERT INTO product_slots VALUES(67,204); +INSERT INTO product_slots VALUES(67,205); +INSERT INTO product_slots VALUES(67,206); +INSERT INTO product_slots VALUES(67,207); +INSERT INTO product_slots VALUES(67,208); +INSERT INTO product_slots VALUES(67,209); +INSERT INTO product_slots VALUES(67,210); +INSERT INTO product_slots VALUES(67,211); +INSERT INTO product_slots VALUES(67,212); +INSERT INTO product_slots VALUES(67,213); +INSERT INTO product_slots VALUES(67,214); +INSERT INTO product_slots VALUES(67,215); +INSERT INTO product_slots VALUES(67,216); +INSERT INTO product_slots VALUES(67,217); +INSERT INTO product_slots VALUES(67,218); +INSERT INTO product_slots VALUES(67,219); +INSERT INTO product_slots VALUES(67,220); +INSERT INTO product_slots VALUES(67,221); +INSERT INTO product_slots VALUES(67,222); +INSERT INTO product_slots VALUES(67,223); +INSERT INTO product_slots VALUES(67,224); +INSERT INTO product_slots VALUES(67,225); +INSERT INTO product_slots VALUES(67,226); +INSERT INTO product_slots VALUES(67,227); +INSERT INTO product_slots VALUES(67,228); +INSERT INTO product_slots VALUES(67,229); +INSERT INTO product_slots VALUES(67,230); +INSERT INTO product_slots VALUES(67,231); +INSERT INTO product_slots VALUES(67,232); +INSERT INTO product_slots VALUES(67,233); +INSERT INTO product_slots VALUES(67,234); +INSERT INTO product_slots VALUES(67,235); +INSERT INTO product_slots VALUES(67,236); +INSERT INTO product_slots VALUES(67,237); +INSERT INTO product_slots VALUES(67,238); +INSERT INTO product_slots VALUES(67,239); +INSERT INTO product_slots VALUES(67,240); +INSERT INTO product_slots VALUES(67,241); +INSERT INTO product_slots VALUES(67,242); +INSERT INTO product_slots VALUES(67,243); +INSERT INTO product_slots VALUES(67,244); +INSERT INTO product_slots VALUES(67,274); +INSERT INTO product_slots VALUES(67,275); +INSERT INTO product_slots VALUES(67,279); +INSERT INTO product_slots VALUES(67,280); +INSERT INTO product_slots VALUES(67,281); +INSERT INTO product_slots VALUES(67,282); +INSERT INTO product_slots VALUES(67,283); +INSERT INTO product_slots VALUES(67,284); +INSERT INTO product_slots VALUES(67,285); +INSERT INTO product_slots VALUES(67,286); +INSERT INTO product_slots VALUES(67,287); +INSERT INTO product_slots VALUES(68,39); +INSERT INTO product_slots VALUES(68,41); +INSERT INTO product_slots VALUES(68,43); +INSERT INTO product_slots VALUES(68,44); +INSERT INTO product_slots VALUES(68,45); +INSERT INTO product_slots VALUES(68,46); +INSERT INTO product_slots VALUES(68,47); +INSERT INTO product_slots VALUES(68,48); +INSERT INTO product_slots VALUES(68,49); +INSERT INTO product_slots VALUES(68,50); +INSERT INTO product_slots VALUES(68,51); +INSERT INTO product_slots VALUES(68,52); +INSERT INTO product_slots VALUES(68,53); +INSERT INTO product_slots VALUES(68,54); +INSERT INTO product_slots VALUES(68,55); +INSERT INTO product_slots VALUES(68,56); +INSERT INTO product_slots VALUES(68,57); +INSERT INTO product_slots VALUES(68,58); +INSERT INTO product_slots VALUES(68,59); +INSERT INTO product_slots VALUES(68,60); +INSERT INTO product_slots VALUES(68,61); +INSERT INTO product_slots VALUES(68,62); +INSERT INTO product_slots VALUES(68,63); +INSERT INTO product_slots VALUES(68,64); +INSERT INTO product_slots VALUES(68,65); +INSERT INTO product_slots VALUES(68,66); +INSERT INTO product_slots VALUES(68,67); +INSERT INTO product_slots VALUES(68,68); +INSERT INTO product_slots VALUES(68,69); +INSERT INTO product_slots VALUES(68,70); +INSERT INTO product_slots VALUES(68,71); +INSERT INTO product_slots VALUES(68,72); +INSERT INTO product_slots VALUES(68,73); +INSERT INTO product_slots VALUES(68,74); +INSERT INTO product_slots VALUES(68,75); +INSERT INTO product_slots VALUES(68,76); +INSERT INTO product_slots VALUES(68,77); +INSERT INTO product_slots VALUES(68,78); +INSERT INTO product_slots VALUES(68,79); +INSERT INTO product_slots VALUES(68,80); +INSERT INTO product_slots VALUES(68,81); +INSERT INTO product_slots VALUES(68,82); +INSERT INTO product_slots VALUES(68,83); +INSERT INTO product_slots VALUES(68,84); +INSERT INTO product_slots VALUES(68,85); +INSERT INTO product_slots VALUES(68,86); +INSERT INTO product_slots VALUES(68,87); +INSERT INTO product_slots VALUES(68,88); +INSERT INTO product_slots VALUES(68,89); +INSERT INTO product_slots VALUES(68,90); +INSERT INTO product_slots VALUES(68,91); +INSERT INTO product_slots VALUES(68,92); +INSERT INTO product_slots VALUES(68,93); +INSERT INTO product_slots VALUES(68,94); +INSERT INTO product_slots VALUES(68,95); +INSERT INTO product_slots VALUES(68,96); +INSERT INTO product_slots VALUES(68,97); +INSERT INTO product_slots VALUES(68,98); +INSERT INTO product_slots VALUES(68,99); +INSERT INTO product_slots VALUES(68,100); +INSERT INTO product_slots VALUES(68,101); +INSERT INTO product_slots VALUES(68,102); +INSERT INTO product_slots VALUES(68,103); +INSERT INTO product_slots VALUES(68,104); +INSERT INTO product_slots VALUES(68,105); +INSERT INTO product_slots VALUES(68,106); +INSERT INTO product_slots VALUES(68,107); +INSERT INTO product_slots VALUES(68,108); +INSERT INTO product_slots VALUES(68,109); +INSERT INTO product_slots VALUES(68,110); +INSERT INTO product_slots VALUES(68,111); +INSERT INTO product_slots VALUES(68,112); +INSERT INTO product_slots VALUES(68,113); +INSERT INTO product_slots VALUES(68,114); +INSERT INTO product_slots VALUES(68,115); +INSERT INTO product_slots VALUES(68,116); +INSERT INTO product_slots VALUES(68,117); +INSERT INTO product_slots VALUES(68,118); +INSERT INTO product_slots VALUES(68,119); +INSERT INTO product_slots VALUES(68,120); +INSERT INTO product_slots VALUES(68,121); +INSERT INTO product_slots VALUES(68,122); +INSERT INTO product_slots VALUES(68,123); +INSERT INTO product_slots VALUES(68,124); +INSERT INTO product_slots VALUES(68,125); +INSERT INTO product_slots VALUES(68,126); +INSERT INTO product_slots VALUES(68,127); +INSERT INTO product_slots VALUES(68,128); +INSERT INTO product_slots VALUES(68,129); +INSERT INTO product_slots VALUES(68,130); +INSERT INTO product_slots VALUES(68,131); +INSERT INTO product_slots VALUES(68,132); +INSERT INTO product_slots VALUES(68,133); +INSERT INTO product_slots VALUES(68,134); +INSERT INTO product_slots VALUES(68,135); +INSERT INTO product_slots VALUES(68,136); +INSERT INTO product_slots VALUES(68,137); +INSERT INTO product_slots VALUES(68,138); +INSERT INTO product_slots VALUES(68,139); +INSERT INTO product_slots VALUES(68,140); +INSERT INTO product_slots VALUES(68,141); +INSERT INTO product_slots VALUES(68,142); +INSERT INTO product_slots VALUES(68,143); +INSERT INTO product_slots VALUES(68,144); +INSERT INTO product_slots VALUES(68,145); +INSERT INTO product_slots VALUES(68,146); +INSERT INTO product_slots VALUES(68,147); +INSERT INTO product_slots VALUES(68,148); +INSERT INTO product_slots VALUES(68,149); +INSERT INTO product_slots VALUES(68,150); +INSERT INTO product_slots VALUES(68,151); +INSERT INTO product_slots VALUES(68,152); +INSERT INTO product_slots VALUES(68,153); +INSERT INTO product_slots VALUES(68,154); +INSERT INTO product_slots VALUES(68,155); +INSERT INTO product_slots VALUES(68,156); +INSERT INTO product_slots VALUES(68,157); +INSERT INTO product_slots VALUES(68,158); +INSERT INTO product_slots VALUES(68,159); +INSERT INTO product_slots VALUES(68,160); +INSERT INTO product_slots VALUES(68,161); +INSERT INTO product_slots VALUES(68,162); +INSERT INTO product_slots VALUES(68,163); +INSERT INTO product_slots VALUES(68,164); +INSERT INTO product_slots VALUES(68,165); +INSERT INTO product_slots VALUES(68,166); +INSERT INTO product_slots VALUES(68,167); +INSERT INTO product_slots VALUES(68,168); +INSERT INTO product_slots VALUES(68,169); +INSERT INTO product_slots VALUES(68,170); +INSERT INTO product_slots VALUES(68,171); +INSERT INTO product_slots VALUES(68,172); +INSERT INTO product_slots VALUES(68,173); +INSERT INTO product_slots VALUES(68,174); +INSERT INTO product_slots VALUES(68,175); +INSERT INTO product_slots VALUES(68,176); +INSERT INTO product_slots VALUES(68,177); +INSERT INTO product_slots VALUES(68,178); +INSERT INTO product_slots VALUES(68,179); +INSERT INTO product_slots VALUES(68,180); +INSERT INTO product_slots VALUES(68,181); +INSERT INTO product_slots VALUES(68,182); +INSERT INTO product_slots VALUES(68,183); +INSERT INTO product_slots VALUES(68,184); +INSERT INTO product_slots VALUES(68,185); +INSERT INTO product_slots VALUES(68,186); +INSERT INTO product_slots VALUES(68,187); +INSERT INTO product_slots VALUES(68,188); +INSERT INTO product_slots VALUES(68,189); +INSERT INTO product_slots VALUES(68,190); +INSERT INTO product_slots VALUES(68,191); +INSERT INTO product_slots VALUES(68,192); +INSERT INTO product_slots VALUES(68,193); +INSERT INTO product_slots VALUES(68,194); +INSERT INTO product_slots VALUES(68,195); +INSERT INTO product_slots VALUES(68,196); +INSERT INTO product_slots VALUES(68,197); +INSERT INTO product_slots VALUES(68,198); +INSERT INTO product_slots VALUES(68,199); +INSERT INTO product_slots VALUES(68,200); +INSERT INTO product_slots VALUES(68,201); +INSERT INTO product_slots VALUES(68,202); +INSERT INTO product_slots VALUES(68,203); +INSERT INTO product_slots VALUES(68,204); +INSERT INTO product_slots VALUES(68,205); +INSERT INTO product_slots VALUES(68,206); +INSERT INTO product_slots VALUES(68,207); +INSERT INTO product_slots VALUES(68,208); +INSERT INTO product_slots VALUES(68,209); +INSERT INTO product_slots VALUES(68,210); +INSERT INTO product_slots VALUES(68,211); +INSERT INTO product_slots VALUES(68,212); +INSERT INTO product_slots VALUES(68,213); +INSERT INTO product_slots VALUES(68,214); +INSERT INTO product_slots VALUES(68,215); +INSERT INTO product_slots VALUES(68,216); +INSERT INTO product_slots VALUES(68,217); +INSERT INTO product_slots VALUES(68,218); +INSERT INTO product_slots VALUES(68,219); +INSERT INTO product_slots VALUES(68,220); +INSERT INTO product_slots VALUES(68,221); +INSERT INTO product_slots VALUES(68,222); +INSERT INTO product_slots VALUES(68,223); +INSERT INTO product_slots VALUES(68,224); +INSERT INTO product_slots VALUES(68,225); +INSERT INTO product_slots VALUES(68,226); +INSERT INTO product_slots VALUES(68,227); +INSERT INTO product_slots VALUES(68,228); +INSERT INTO product_slots VALUES(68,229); +INSERT INTO product_slots VALUES(68,230); +INSERT INTO product_slots VALUES(68,231); +INSERT INTO product_slots VALUES(68,232); +INSERT INTO product_slots VALUES(68,233); +INSERT INTO product_slots VALUES(68,234); +INSERT INTO product_slots VALUES(68,235); +INSERT INTO product_slots VALUES(68,236); +INSERT INTO product_slots VALUES(68,237); +INSERT INTO product_slots VALUES(68,238); +INSERT INTO product_slots VALUES(68,239); +INSERT INTO product_slots VALUES(68,240); +INSERT INTO product_slots VALUES(68,241); +INSERT INTO product_slots VALUES(68,242); +INSERT INTO product_slots VALUES(68,243); +INSERT INTO product_slots VALUES(68,244); +INSERT INTO product_slots VALUES(68,274); +INSERT INTO product_slots VALUES(68,275); +INSERT INTO product_slots VALUES(68,279); +INSERT INTO product_slots VALUES(68,280); +INSERT INTO product_slots VALUES(68,281); +INSERT INTO product_slots VALUES(68,282); +INSERT INTO product_slots VALUES(68,283); +INSERT INTO product_slots VALUES(68,284); +INSERT INTO product_slots VALUES(68,285); +INSERT INTO product_slots VALUES(68,286); +INSERT INTO product_slots VALUES(68,287); +INSERT INTO product_slots VALUES(69,39); +INSERT INTO product_slots VALUES(69,41); +INSERT INTO product_slots VALUES(69,43); +INSERT INTO product_slots VALUES(69,44); +INSERT INTO product_slots VALUES(69,45); +INSERT INTO product_slots VALUES(69,46); +INSERT INTO product_slots VALUES(69,47); +INSERT INTO product_slots VALUES(69,48); +INSERT INTO product_slots VALUES(69,49); +INSERT INTO product_slots VALUES(69,50); +INSERT INTO product_slots VALUES(69,51); +INSERT INTO product_slots VALUES(69,52); +INSERT INTO product_slots VALUES(69,53); +INSERT INTO product_slots VALUES(69,54); +INSERT INTO product_slots VALUES(69,55); +INSERT INTO product_slots VALUES(69,56); +INSERT INTO product_slots VALUES(69,57); +INSERT INTO product_slots VALUES(69,58); +INSERT INTO product_slots VALUES(69,59); +INSERT INTO product_slots VALUES(69,60); +INSERT INTO product_slots VALUES(69,61); +INSERT INTO product_slots VALUES(69,62); +INSERT INTO product_slots VALUES(69,63); +INSERT INTO product_slots VALUES(69,64); +INSERT INTO product_slots VALUES(69,65); +INSERT INTO product_slots VALUES(69,66); +INSERT INTO product_slots VALUES(69,67); +INSERT INTO product_slots VALUES(69,68); +INSERT INTO product_slots VALUES(69,69); +INSERT INTO product_slots VALUES(69,70); +INSERT INTO product_slots VALUES(69,71); +INSERT INTO product_slots VALUES(69,72); +INSERT INTO product_slots VALUES(69,73); +INSERT INTO product_slots VALUES(69,74); +INSERT INTO product_slots VALUES(69,75); +INSERT INTO product_slots VALUES(69,76); +INSERT INTO product_slots VALUES(69,77); +INSERT INTO product_slots VALUES(69,78); +INSERT INTO product_slots VALUES(69,79); +INSERT INTO product_slots VALUES(69,80); +INSERT INTO product_slots VALUES(69,81); +INSERT INTO product_slots VALUES(69,82); +INSERT INTO product_slots VALUES(69,83); +INSERT INTO product_slots VALUES(69,84); +INSERT INTO product_slots VALUES(69,85); +INSERT INTO product_slots VALUES(69,86); +INSERT INTO product_slots VALUES(69,87); +INSERT INTO product_slots VALUES(69,88); +INSERT INTO product_slots VALUES(69,89); +INSERT INTO product_slots VALUES(69,90); +INSERT INTO product_slots VALUES(69,91); +INSERT INTO product_slots VALUES(69,92); +INSERT INTO product_slots VALUES(69,93); +INSERT INTO product_slots VALUES(69,94); +INSERT INTO product_slots VALUES(69,95); +INSERT INTO product_slots VALUES(69,96); +INSERT INTO product_slots VALUES(69,97); +INSERT INTO product_slots VALUES(69,98); +INSERT INTO product_slots VALUES(69,99); +INSERT INTO product_slots VALUES(69,100); +INSERT INTO product_slots VALUES(69,101); +INSERT INTO product_slots VALUES(69,102); +INSERT INTO product_slots VALUES(69,103); +INSERT INTO product_slots VALUES(69,104); +INSERT INTO product_slots VALUES(69,105); +INSERT INTO product_slots VALUES(69,106); +INSERT INTO product_slots VALUES(69,107); +INSERT INTO product_slots VALUES(69,108); +INSERT INTO product_slots VALUES(69,109); +INSERT INTO product_slots VALUES(69,110); +INSERT INTO product_slots VALUES(69,111); +INSERT INTO product_slots VALUES(69,112); +INSERT INTO product_slots VALUES(69,113); +INSERT INTO product_slots VALUES(69,114); +INSERT INTO product_slots VALUES(69,115); +INSERT INTO product_slots VALUES(69,116); +INSERT INTO product_slots VALUES(69,117); +INSERT INTO product_slots VALUES(69,118); +INSERT INTO product_slots VALUES(69,119); +INSERT INTO product_slots VALUES(69,120); +INSERT INTO product_slots VALUES(69,121); +INSERT INTO product_slots VALUES(69,122); +INSERT INTO product_slots VALUES(69,123); +INSERT INTO product_slots VALUES(69,124); +INSERT INTO product_slots VALUES(69,125); +INSERT INTO product_slots VALUES(69,126); +INSERT INTO product_slots VALUES(69,127); +INSERT INTO product_slots VALUES(69,128); +INSERT INTO product_slots VALUES(69,129); +INSERT INTO product_slots VALUES(69,130); +INSERT INTO product_slots VALUES(69,131); +INSERT INTO product_slots VALUES(69,132); +INSERT INTO product_slots VALUES(69,133); +INSERT INTO product_slots VALUES(69,134); +INSERT INTO product_slots VALUES(69,135); +INSERT INTO product_slots VALUES(69,136); +INSERT INTO product_slots VALUES(69,137); +INSERT INTO product_slots VALUES(69,138); +INSERT INTO product_slots VALUES(69,139); +INSERT INTO product_slots VALUES(69,140); +INSERT INTO product_slots VALUES(69,141); +INSERT INTO product_slots VALUES(69,142); +INSERT INTO product_slots VALUES(69,143); +INSERT INTO product_slots VALUES(69,144); +INSERT INTO product_slots VALUES(69,145); +INSERT INTO product_slots VALUES(69,146); +INSERT INTO product_slots VALUES(69,147); +INSERT INTO product_slots VALUES(69,148); +INSERT INTO product_slots VALUES(69,149); +INSERT INTO product_slots VALUES(69,150); +INSERT INTO product_slots VALUES(69,151); +INSERT INTO product_slots VALUES(69,152); +INSERT INTO product_slots VALUES(69,153); +INSERT INTO product_slots VALUES(69,154); +INSERT INTO product_slots VALUES(69,155); +INSERT INTO product_slots VALUES(69,156); +INSERT INTO product_slots VALUES(69,157); +INSERT INTO product_slots VALUES(69,158); +INSERT INTO product_slots VALUES(69,159); +INSERT INTO product_slots VALUES(69,160); +INSERT INTO product_slots VALUES(69,161); +INSERT INTO product_slots VALUES(69,162); +INSERT INTO product_slots VALUES(69,163); +INSERT INTO product_slots VALUES(69,164); +INSERT INTO product_slots VALUES(69,165); +INSERT INTO product_slots VALUES(69,166); +INSERT INTO product_slots VALUES(69,167); +INSERT INTO product_slots VALUES(69,168); +INSERT INTO product_slots VALUES(69,169); +INSERT INTO product_slots VALUES(69,170); +INSERT INTO product_slots VALUES(69,171); +INSERT INTO product_slots VALUES(69,172); +INSERT INTO product_slots VALUES(69,173); +INSERT INTO product_slots VALUES(69,174); +INSERT INTO product_slots VALUES(69,175); +INSERT INTO product_slots VALUES(69,176); +INSERT INTO product_slots VALUES(69,177); +INSERT INTO product_slots VALUES(69,178); +INSERT INTO product_slots VALUES(69,179); +INSERT INTO product_slots VALUES(69,180); +INSERT INTO product_slots VALUES(69,181); +INSERT INTO product_slots VALUES(69,182); +INSERT INTO product_slots VALUES(69,183); +INSERT INTO product_slots VALUES(69,184); +INSERT INTO product_slots VALUES(69,185); +INSERT INTO product_slots VALUES(69,186); +INSERT INTO product_slots VALUES(69,187); +INSERT INTO product_slots VALUES(69,188); +INSERT INTO product_slots VALUES(69,189); +INSERT INTO product_slots VALUES(69,190); +INSERT INTO product_slots VALUES(69,191); +INSERT INTO product_slots VALUES(69,192); +INSERT INTO product_slots VALUES(69,193); +INSERT INTO product_slots VALUES(69,194); +INSERT INTO product_slots VALUES(69,195); +INSERT INTO product_slots VALUES(69,196); +INSERT INTO product_slots VALUES(69,197); +INSERT INTO product_slots VALUES(69,198); +INSERT INTO product_slots VALUES(69,199); +INSERT INTO product_slots VALUES(69,200); +INSERT INTO product_slots VALUES(69,201); +INSERT INTO product_slots VALUES(69,202); +INSERT INTO product_slots VALUES(69,203); +INSERT INTO product_slots VALUES(69,204); +INSERT INTO product_slots VALUES(69,205); +INSERT INTO product_slots VALUES(69,206); +INSERT INTO product_slots VALUES(69,207); +INSERT INTO product_slots VALUES(69,208); +INSERT INTO product_slots VALUES(69,209); +INSERT INTO product_slots VALUES(69,210); +INSERT INTO product_slots VALUES(69,211); +INSERT INTO product_slots VALUES(69,212); +INSERT INTO product_slots VALUES(69,213); +INSERT INTO product_slots VALUES(69,214); +INSERT INTO product_slots VALUES(69,215); +INSERT INTO product_slots VALUES(69,216); +INSERT INTO product_slots VALUES(69,217); +INSERT INTO product_slots VALUES(69,218); +INSERT INTO product_slots VALUES(69,219); +INSERT INTO product_slots VALUES(69,220); +INSERT INTO product_slots VALUES(69,221); +INSERT INTO product_slots VALUES(69,222); +INSERT INTO product_slots VALUES(69,223); +INSERT INTO product_slots VALUES(69,224); +INSERT INTO product_slots VALUES(69,225); +INSERT INTO product_slots VALUES(69,226); +INSERT INTO product_slots VALUES(69,227); +INSERT INTO product_slots VALUES(69,228); +INSERT INTO product_slots VALUES(69,229); +INSERT INTO product_slots VALUES(69,230); +INSERT INTO product_slots VALUES(69,231); +INSERT INTO product_slots VALUES(69,232); +INSERT INTO product_slots VALUES(69,233); +INSERT INTO product_slots VALUES(69,234); +INSERT INTO product_slots VALUES(69,235); +INSERT INTO product_slots VALUES(69,236); +INSERT INTO product_slots VALUES(69,237); +INSERT INTO product_slots VALUES(69,238); +INSERT INTO product_slots VALUES(69,239); +INSERT INTO product_slots VALUES(69,240); +INSERT INTO product_slots VALUES(69,241); +INSERT INTO product_slots VALUES(69,242); +INSERT INTO product_slots VALUES(69,243); +INSERT INTO product_slots VALUES(69,244); +INSERT INTO product_slots VALUES(69,274); +INSERT INTO product_slots VALUES(69,275); +INSERT INTO product_slots VALUES(69,279); +INSERT INTO product_slots VALUES(69,280); +INSERT INTO product_slots VALUES(69,281); +INSERT INTO product_slots VALUES(69,282); +INSERT INTO product_slots VALUES(69,283); +INSERT INTO product_slots VALUES(69,284); +INSERT INTO product_slots VALUES(69,285); +INSERT INTO product_slots VALUES(69,286); +INSERT INTO product_slots VALUES(69,287); +INSERT INTO product_slots VALUES(70,39); +INSERT INTO product_slots VALUES(70,44); +INSERT INTO product_slots VALUES(70,46); +INSERT INTO product_slots VALUES(70,47); +INSERT INTO product_slots VALUES(70,48); +INSERT INTO product_slots VALUES(70,49); +INSERT INTO product_slots VALUES(70,50); +INSERT INTO product_slots VALUES(70,51); +INSERT INTO product_slots VALUES(70,52); +INSERT INTO product_slots VALUES(70,53); +INSERT INTO product_slots VALUES(70,54); +INSERT INTO product_slots VALUES(70,55); +INSERT INTO product_slots VALUES(70,56); +INSERT INTO product_slots VALUES(70,57); +INSERT INTO product_slots VALUES(70,58); +INSERT INTO product_slots VALUES(70,59); +INSERT INTO product_slots VALUES(70,60); +INSERT INTO product_slots VALUES(70,61); +INSERT INTO product_slots VALUES(70,62); +INSERT INTO product_slots VALUES(70,63); +INSERT INTO product_slots VALUES(70,64); +INSERT INTO product_slots VALUES(70,65); +INSERT INTO product_slots VALUES(70,66); +INSERT INTO product_slots VALUES(70,67); +INSERT INTO product_slots VALUES(70,68); +INSERT INTO product_slots VALUES(70,69); +INSERT INTO product_slots VALUES(70,70); +INSERT INTO product_slots VALUES(70,71); +INSERT INTO product_slots VALUES(70,72); +INSERT INTO product_slots VALUES(70,73); +INSERT INTO product_slots VALUES(70,74); +INSERT INTO product_slots VALUES(70,75); +INSERT INTO product_slots VALUES(70,76); +INSERT INTO product_slots VALUES(70,77); +INSERT INTO product_slots VALUES(70,78); +INSERT INTO product_slots VALUES(70,79); +INSERT INTO product_slots VALUES(70,80); +INSERT INTO product_slots VALUES(70,81); +INSERT INTO product_slots VALUES(70,82); +INSERT INTO product_slots VALUES(70,83); +INSERT INTO product_slots VALUES(70,84); +INSERT INTO product_slots VALUES(70,85); +INSERT INTO product_slots VALUES(70,86); +INSERT INTO product_slots VALUES(70,87); +INSERT INTO product_slots VALUES(70,88); +INSERT INTO product_slots VALUES(70,89); +INSERT INTO product_slots VALUES(70,90); +INSERT INTO product_slots VALUES(70,91); +INSERT INTO product_slots VALUES(70,92); +INSERT INTO product_slots VALUES(70,93); +INSERT INTO product_slots VALUES(70,94); +INSERT INTO product_slots VALUES(70,95); +INSERT INTO product_slots VALUES(70,96); +INSERT INTO product_slots VALUES(70,97); +INSERT INTO product_slots VALUES(70,98); +INSERT INTO product_slots VALUES(70,99); +INSERT INTO product_slots VALUES(70,100); +INSERT INTO product_slots VALUES(70,101); +INSERT INTO product_slots VALUES(70,102); +INSERT INTO product_slots VALUES(70,103); +INSERT INTO product_slots VALUES(70,104); +INSERT INTO product_slots VALUES(70,105); +INSERT INTO product_slots VALUES(70,106); +INSERT INTO product_slots VALUES(70,107); +INSERT INTO product_slots VALUES(70,108); +INSERT INTO product_slots VALUES(70,109); +INSERT INTO product_slots VALUES(70,110); +INSERT INTO product_slots VALUES(70,111); +INSERT INTO product_slots VALUES(70,112); +INSERT INTO product_slots VALUES(70,113); +INSERT INTO product_slots VALUES(70,114); +INSERT INTO product_slots VALUES(70,115); +INSERT INTO product_slots VALUES(70,116); +INSERT INTO product_slots VALUES(70,117); +INSERT INTO product_slots VALUES(70,118); +INSERT INTO product_slots VALUES(70,119); +INSERT INTO product_slots VALUES(70,120); +INSERT INTO product_slots VALUES(70,121); +INSERT INTO product_slots VALUES(70,122); +INSERT INTO product_slots VALUES(70,123); +INSERT INTO product_slots VALUES(70,124); +INSERT INTO product_slots VALUES(70,125); +INSERT INTO product_slots VALUES(70,126); +INSERT INTO product_slots VALUES(70,127); +INSERT INTO product_slots VALUES(70,128); +INSERT INTO product_slots VALUES(70,129); +INSERT INTO product_slots VALUES(70,130); +INSERT INTO product_slots VALUES(70,131); +INSERT INTO product_slots VALUES(70,132); +INSERT INTO product_slots VALUES(70,133); +INSERT INTO product_slots VALUES(70,134); +INSERT INTO product_slots VALUES(70,135); +INSERT INTO product_slots VALUES(70,136); +INSERT INTO product_slots VALUES(70,137); +INSERT INTO product_slots VALUES(70,138); +INSERT INTO product_slots VALUES(70,139); +INSERT INTO product_slots VALUES(70,140); +INSERT INTO product_slots VALUES(70,141); +INSERT INTO product_slots VALUES(70,142); +INSERT INTO product_slots VALUES(70,143); +INSERT INTO product_slots VALUES(70,144); +INSERT INTO product_slots VALUES(70,145); +INSERT INTO product_slots VALUES(70,146); +INSERT INTO product_slots VALUES(70,147); +INSERT INTO product_slots VALUES(70,148); +INSERT INTO product_slots VALUES(70,149); +INSERT INTO product_slots VALUES(70,150); +INSERT INTO product_slots VALUES(70,151); +INSERT INTO product_slots VALUES(70,152); +INSERT INTO product_slots VALUES(70,153); +INSERT INTO product_slots VALUES(70,154); +INSERT INTO product_slots VALUES(70,155); +INSERT INTO product_slots VALUES(70,156); +INSERT INTO product_slots VALUES(70,157); +INSERT INTO product_slots VALUES(70,158); +INSERT INTO product_slots VALUES(70,159); +INSERT INTO product_slots VALUES(70,160); +INSERT INTO product_slots VALUES(70,161); +INSERT INTO product_slots VALUES(70,162); +INSERT INTO product_slots VALUES(70,163); +INSERT INTO product_slots VALUES(70,164); +INSERT INTO product_slots VALUES(70,165); +INSERT INTO product_slots VALUES(70,166); +INSERT INTO product_slots VALUES(70,167); +INSERT INTO product_slots VALUES(70,168); +INSERT INTO product_slots VALUES(70,169); +INSERT INTO product_slots VALUES(70,170); +INSERT INTO product_slots VALUES(70,171); +INSERT INTO product_slots VALUES(70,172); +INSERT INTO product_slots VALUES(70,173); +INSERT INTO product_slots VALUES(70,174); +INSERT INTO product_slots VALUES(70,175); +INSERT INTO product_slots VALUES(70,176); +INSERT INTO product_slots VALUES(70,177); +INSERT INTO product_slots VALUES(70,178); +INSERT INTO product_slots VALUES(70,179); +INSERT INTO product_slots VALUES(70,180); +INSERT INTO product_slots VALUES(70,181); +INSERT INTO product_slots VALUES(70,182); +INSERT INTO product_slots VALUES(70,183); +INSERT INTO product_slots VALUES(70,184); +INSERT INTO product_slots VALUES(70,185); +INSERT INTO product_slots VALUES(70,186); +INSERT INTO product_slots VALUES(70,187); +INSERT INTO product_slots VALUES(70,188); +INSERT INTO product_slots VALUES(70,189); +INSERT INTO product_slots VALUES(70,190); +INSERT INTO product_slots VALUES(70,191); +INSERT INTO product_slots VALUES(70,192); +INSERT INTO product_slots VALUES(70,193); +INSERT INTO product_slots VALUES(70,194); +INSERT INTO product_slots VALUES(70,195); +INSERT INTO product_slots VALUES(70,196); +INSERT INTO product_slots VALUES(70,197); +INSERT INTO product_slots VALUES(70,198); +INSERT INTO product_slots VALUES(70,199); +INSERT INTO product_slots VALUES(70,200); +INSERT INTO product_slots VALUES(70,201); +INSERT INTO product_slots VALUES(70,202); +INSERT INTO product_slots VALUES(70,203); +INSERT INTO product_slots VALUES(70,204); +INSERT INTO product_slots VALUES(70,205); +INSERT INTO product_slots VALUES(70,206); +INSERT INTO product_slots VALUES(70,207); +INSERT INTO product_slots VALUES(70,208); +INSERT INTO product_slots VALUES(70,209); +INSERT INTO product_slots VALUES(70,210); +INSERT INTO product_slots VALUES(70,211); +INSERT INTO product_slots VALUES(70,212); +INSERT INTO product_slots VALUES(70,213); +INSERT INTO product_slots VALUES(70,214); +INSERT INTO product_slots VALUES(70,215); +INSERT INTO product_slots VALUES(70,216); +INSERT INTO product_slots VALUES(70,217); +INSERT INTO product_slots VALUES(70,218); +INSERT INTO product_slots VALUES(70,219); +INSERT INTO product_slots VALUES(70,220); +INSERT INTO product_slots VALUES(70,221); +INSERT INTO product_slots VALUES(70,222); +INSERT INTO product_slots VALUES(70,223); +INSERT INTO product_slots VALUES(70,224); +INSERT INTO product_slots VALUES(70,225); +INSERT INTO product_slots VALUES(70,226); +INSERT INTO product_slots VALUES(70,227); +INSERT INTO product_slots VALUES(70,228); +INSERT INTO product_slots VALUES(70,229); +INSERT INTO product_slots VALUES(70,230); +INSERT INTO product_slots VALUES(70,231); +INSERT INTO product_slots VALUES(70,232); +INSERT INTO product_slots VALUES(70,233); +INSERT INTO product_slots VALUES(70,234); +INSERT INTO product_slots VALUES(70,235); +INSERT INTO product_slots VALUES(70,236); +INSERT INTO product_slots VALUES(70,237); +INSERT INTO product_slots VALUES(70,238); +INSERT INTO product_slots VALUES(70,239); +INSERT INTO product_slots VALUES(70,240); +INSERT INTO product_slots VALUES(70,241); +INSERT INTO product_slots VALUES(70,242); +INSERT INTO product_slots VALUES(70,243); +INSERT INTO product_slots VALUES(70,244); +INSERT INTO product_slots VALUES(70,274); +INSERT INTO product_slots VALUES(70,275); +INSERT INTO product_slots VALUES(70,279); +INSERT INTO product_slots VALUES(70,280); +INSERT INTO product_slots VALUES(70,281); +INSERT INTO product_slots VALUES(70,282); +INSERT INTO product_slots VALUES(70,283); +INSERT INTO product_slots VALUES(70,284); +INSERT INTO product_slots VALUES(70,285); +INSERT INTO product_slots VALUES(70,286); +INSERT INTO product_slots VALUES(70,287); +INSERT INTO product_slots VALUES(71,39); +INSERT INTO product_slots VALUES(71,41); +INSERT INTO product_slots VALUES(71,43); +INSERT INTO product_slots VALUES(71,44); +INSERT INTO product_slots VALUES(71,45); +INSERT INTO product_slots VALUES(71,46); +INSERT INTO product_slots VALUES(71,47); +INSERT INTO product_slots VALUES(71,48); +INSERT INTO product_slots VALUES(71,49); +INSERT INTO product_slots VALUES(71,50); +INSERT INTO product_slots VALUES(71,51); +INSERT INTO product_slots VALUES(71,52); +INSERT INTO product_slots VALUES(71,53); +INSERT INTO product_slots VALUES(71,54); +INSERT INTO product_slots VALUES(71,55); +INSERT INTO product_slots VALUES(71,56); +INSERT INTO product_slots VALUES(71,57); +INSERT INTO product_slots VALUES(71,58); +INSERT INTO product_slots VALUES(71,59); +INSERT INTO product_slots VALUES(71,60); +INSERT INTO product_slots VALUES(71,61); +INSERT INTO product_slots VALUES(71,62); +INSERT INTO product_slots VALUES(71,63); +INSERT INTO product_slots VALUES(71,64); +INSERT INTO product_slots VALUES(71,65); +INSERT INTO product_slots VALUES(71,66); +INSERT INTO product_slots VALUES(71,67); +INSERT INTO product_slots VALUES(71,68); +INSERT INTO product_slots VALUES(71,69); +INSERT INTO product_slots VALUES(71,70); +INSERT INTO product_slots VALUES(71,71); +INSERT INTO product_slots VALUES(71,72); +INSERT INTO product_slots VALUES(71,73); +INSERT INTO product_slots VALUES(71,74); +INSERT INTO product_slots VALUES(71,75); +INSERT INTO product_slots VALUES(71,76); +INSERT INTO product_slots VALUES(71,77); +INSERT INTO product_slots VALUES(71,78); +INSERT INTO product_slots VALUES(71,79); +INSERT INTO product_slots VALUES(71,80); +INSERT INTO product_slots VALUES(71,81); +INSERT INTO product_slots VALUES(71,82); +INSERT INTO product_slots VALUES(71,83); +INSERT INTO product_slots VALUES(71,84); +INSERT INTO product_slots VALUES(71,85); +INSERT INTO product_slots VALUES(71,86); +INSERT INTO product_slots VALUES(71,87); +INSERT INTO product_slots VALUES(71,88); +INSERT INTO product_slots VALUES(71,89); +INSERT INTO product_slots VALUES(71,90); +INSERT INTO product_slots VALUES(71,91); +INSERT INTO product_slots VALUES(71,92); +INSERT INTO product_slots VALUES(71,93); +INSERT INTO product_slots VALUES(71,94); +INSERT INTO product_slots VALUES(71,95); +INSERT INTO product_slots VALUES(71,96); +INSERT INTO product_slots VALUES(71,97); +INSERT INTO product_slots VALUES(71,98); +INSERT INTO product_slots VALUES(71,99); +INSERT INTO product_slots VALUES(71,100); +INSERT INTO product_slots VALUES(71,101); +INSERT INTO product_slots VALUES(71,102); +INSERT INTO product_slots VALUES(71,103); +INSERT INTO product_slots VALUES(71,104); +INSERT INTO product_slots VALUES(71,105); +INSERT INTO product_slots VALUES(71,106); +INSERT INTO product_slots VALUES(71,107); +INSERT INTO product_slots VALUES(71,108); +INSERT INTO product_slots VALUES(71,109); +INSERT INTO product_slots VALUES(71,110); +INSERT INTO product_slots VALUES(71,111); +INSERT INTO product_slots VALUES(71,112); +INSERT INTO product_slots VALUES(71,113); +INSERT INTO product_slots VALUES(71,114); +INSERT INTO product_slots VALUES(71,115); +INSERT INTO product_slots VALUES(71,116); +INSERT INTO product_slots VALUES(71,117); +INSERT INTO product_slots VALUES(71,118); +INSERT INTO product_slots VALUES(71,119); +INSERT INTO product_slots VALUES(71,120); +INSERT INTO product_slots VALUES(71,121); +INSERT INTO product_slots VALUES(71,122); +INSERT INTO product_slots VALUES(71,123); +INSERT INTO product_slots VALUES(71,124); +INSERT INTO product_slots VALUES(71,125); +INSERT INTO product_slots VALUES(71,126); +INSERT INTO product_slots VALUES(71,127); +INSERT INTO product_slots VALUES(71,128); +INSERT INTO product_slots VALUES(71,129); +INSERT INTO product_slots VALUES(71,130); +INSERT INTO product_slots VALUES(71,131); +INSERT INTO product_slots VALUES(71,132); +INSERT INTO product_slots VALUES(71,133); +INSERT INTO product_slots VALUES(71,134); +INSERT INTO product_slots VALUES(71,135); +INSERT INTO product_slots VALUES(71,136); +INSERT INTO product_slots VALUES(71,137); +INSERT INTO product_slots VALUES(71,138); +INSERT INTO product_slots VALUES(71,139); +INSERT INTO product_slots VALUES(71,140); +INSERT INTO product_slots VALUES(71,141); +INSERT INTO product_slots VALUES(71,142); +INSERT INTO product_slots VALUES(71,143); +INSERT INTO product_slots VALUES(71,144); +INSERT INTO product_slots VALUES(71,145); +INSERT INTO product_slots VALUES(71,146); +INSERT INTO product_slots VALUES(71,147); +INSERT INTO product_slots VALUES(71,148); +INSERT INTO product_slots VALUES(71,149); +INSERT INTO product_slots VALUES(71,150); +INSERT INTO product_slots VALUES(71,151); +INSERT INTO product_slots VALUES(71,152); +INSERT INTO product_slots VALUES(71,153); +INSERT INTO product_slots VALUES(71,154); +INSERT INTO product_slots VALUES(71,155); +INSERT INTO product_slots VALUES(71,156); +INSERT INTO product_slots VALUES(71,157); +INSERT INTO product_slots VALUES(71,158); +INSERT INTO product_slots VALUES(71,159); +INSERT INTO product_slots VALUES(71,160); +INSERT INTO product_slots VALUES(71,161); +INSERT INTO product_slots VALUES(71,162); +INSERT INTO product_slots VALUES(71,163); +INSERT INTO product_slots VALUES(71,164); +INSERT INTO product_slots VALUES(71,165); +INSERT INTO product_slots VALUES(71,166); +INSERT INTO product_slots VALUES(71,167); +INSERT INTO product_slots VALUES(71,168); +INSERT INTO product_slots VALUES(71,169); +INSERT INTO product_slots VALUES(71,170); +INSERT INTO product_slots VALUES(71,171); +INSERT INTO product_slots VALUES(71,172); +INSERT INTO product_slots VALUES(71,173); +INSERT INTO product_slots VALUES(71,174); +INSERT INTO product_slots VALUES(71,175); +INSERT INTO product_slots VALUES(71,176); +INSERT INTO product_slots VALUES(71,177); +INSERT INTO product_slots VALUES(71,178); +INSERT INTO product_slots VALUES(71,179); +INSERT INTO product_slots VALUES(71,180); +INSERT INTO product_slots VALUES(71,181); +INSERT INTO product_slots VALUES(71,182); +INSERT INTO product_slots VALUES(71,183); +INSERT INTO product_slots VALUES(71,184); +INSERT INTO product_slots VALUES(71,185); +INSERT INTO product_slots VALUES(71,186); +INSERT INTO product_slots VALUES(71,187); +INSERT INTO product_slots VALUES(71,188); +INSERT INTO product_slots VALUES(71,189); +INSERT INTO product_slots VALUES(71,190); +INSERT INTO product_slots VALUES(71,191); +INSERT INTO product_slots VALUES(71,192); +INSERT INTO product_slots VALUES(71,193); +INSERT INTO product_slots VALUES(71,194); +INSERT INTO product_slots VALUES(71,195); +INSERT INTO product_slots VALUES(71,196); +INSERT INTO product_slots VALUES(71,197); +INSERT INTO product_slots VALUES(71,198); +INSERT INTO product_slots VALUES(71,199); +INSERT INTO product_slots VALUES(71,200); +INSERT INTO product_slots VALUES(71,201); +INSERT INTO product_slots VALUES(71,202); +INSERT INTO product_slots VALUES(71,203); +INSERT INTO product_slots VALUES(71,204); +INSERT INTO product_slots VALUES(71,205); +INSERT INTO product_slots VALUES(71,206); +INSERT INTO product_slots VALUES(71,207); +INSERT INTO product_slots VALUES(71,208); +INSERT INTO product_slots VALUES(71,209); +INSERT INTO product_slots VALUES(71,210); +INSERT INTO product_slots VALUES(71,211); +INSERT INTO product_slots VALUES(71,212); +INSERT INTO product_slots VALUES(71,213); +INSERT INTO product_slots VALUES(71,214); +INSERT INTO product_slots VALUES(71,215); +INSERT INTO product_slots VALUES(71,216); +INSERT INTO product_slots VALUES(71,217); +INSERT INTO product_slots VALUES(71,218); +INSERT INTO product_slots VALUES(71,219); +INSERT INTO product_slots VALUES(71,220); +INSERT INTO product_slots VALUES(71,221); +INSERT INTO product_slots VALUES(71,222); +INSERT INTO product_slots VALUES(71,223); +INSERT INTO product_slots VALUES(71,224); +INSERT INTO product_slots VALUES(71,225); +INSERT INTO product_slots VALUES(71,226); +INSERT INTO product_slots VALUES(71,227); +INSERT INTO product_slots VALUES(71,228); +INSERT INTO product_slots VALUES(71,229); +INSERT INTO product_slots VALUES(71,230); +INSERT INTO product_slots VALUES(71,231); +INSERT INTO product_slots VALUES(71,232); +INSERT INTO product_slots VALUES(71,233); +INSERT INTO product_slots VALUES(71,234); +INSERT INTO product_slots VALUES(71,235); +INSERT INTO product_slots VALUES(71,236); +INSERT INTO product_slots VALUES(71,237); +INSERT INTO product_slots VALUES(71,238); +INSERT INTO product_slots VALUES(71,239); +INSERT INTO product_slots VALUES(71,240); +INSERT INTO product_slots VALUES(71,241); +INSERT INTO product_slots VALUES(71,242); +INSERT INTO product_slots VALUES(71,243); +INSERT INTO product_slots VALUES(71,244); +INSERT INTO product_slots VALUES(71,274); +INSERT INTO product_slots VALUES(71,275); +INSERT INTO product_slots VALUES(71,279); +INSERT INTO product_slots VALUES(71,280); +INSERT INTO product_slots VALUES(71,281); +INSERT INTO product_slots VALUES(71,282); +INSERT INTO product_slots VALUES(71,283); +INSERT INTO product_slots VALUES(71,284); +INSERT INTO product_slots VALUES(71,285); +INSERT INTO product_slots VALUES(71,286); +INSERT INTO product_slots VALUES(71,287); +INSERT INTO product_slots VALUES(72,39); +INSERT INTO product_slots VALUES(72,41); +INSERT INTO product_slots VALUES(72,43); +INSERT INTO product_slots VALUES(72,44); +INSERT INTO product_slots VALUES(72,45); +INSERT INTO product_slots VALUES(72,46); +INSERT INTO product_slots VALUES(72,47); +INSERT INTO product_slots VALUES(72,48); +INSERT INTO product_slots VALUES(72,49); +INSERT INTO product_slots VALUES(72,50); +INSERT INTO product_slots VALUES(72,51); +INSERT INTO product_slots VALUES(72,52); +INSERT INTO product_slots VALUES(72,53); +INSERT INTO product_slots VALUES(72,54); +INSERT INTO product_slots VALUES(72,55); +INSERT INTO product_slots VALUES(72,56); +INSERT INTO product_slots VALUES(72,57); +INSERT INTO product_slots VALUES(72,58); +INSERT INTO product_slots VALUES(72,59); +INSERT INTO product_slots VALUES(72,60); +INSERT INTO product_slots VALUES(72,61); +INSERT INTO product_slots VALUES(72,62); +INSERT INTO product_slots VALUES(72,63); +INSERT INTO product_slots VALUES(72,64); +INSERT INTO product_slots VALUES(72,65); +INSERT INTO product_slots VALUES(72,66); +INSERT INTO product_slots VALUES(72,67); +INSERT INTO product_slots VALUES(72,68); +INSERT INTO product_slots VALUES(72,69); +INSERT INTO product_slots VALUES(72,70); +INSERT INTO product_slots VALUES(72,71); +INSERT INTO product_slots VALUES(72,72); +INSERT INTO product_slots VALUES(72,73); +INSERT INTO product_slots VALUES(72,74); +INSERT INTO product_slots VALUES(72,75); +INSERT INTO product_slots VALUES(72,76); +INSERT INTO product_slots VALUES(72,77); +INSERT INTO product_slots VALUES(72,78); +INSERT INTO product_slots VALUES(72,79); +INSERT INTO product_slots VALUES(72,80); +INSERT INTO product_slots VALUES(72,81); +INSERT INTO product_slots VALUES(72,82); +INSERT INTO product_slots VALUES(72,83); +INSERT INTO product_slots VALUES(72,84); +INSERT INTO product_slots VALUES(72,85); +INSERT INTO product_slots VALUES(72,86); +INSERT INTO product_slots VALUES(72,87); +INSERT INTO product_slots VALUES(72,88); +INSERT INTO product_slots VALUES(72,89); +INSERT INTO product_slots VALUES(72,90); +INSERT INTO product_slots VALUES(72,91); +INSERT INTO product_slots VALUES(72,92); +INSERT INTO product_slots VALUES(72,93); +INSERT INTO product_slots VALUES(72,94); +INSERT INTO product_slots VALUES(72,95); +INSERT INTO product_slots VALUES(72,96); +INSERT INTO product_slots VALUES(72,97); +INSERT INTO product_slots VALUES(72,98); +INSERT INTO product_slots VALUES(72,99); +INSERT INTO product_slots VALUES(72,100); +INSERT INTO product_slots VALUES(72,101); +INSERT INTO product_slots VALUES(72,102); +INSERT INTO product_slots VALUES(72,103); +INSERT INTO product_slots VALUES(72,104); +INSERT INTO product_slots VALUES(72,105); +INSERT INTO product_slots VALUES(72,106); +INSERT INTO product_slots VALUES(72,107); +INSERT INTO product_slots VALUES(72,108); +INSERT INTO product_slots VALUES(72,109); +INSERT INTO product_slots VALUES(72,110); +INSERT INTO product_slots VALUES(72,111); +INSERT INTO product_slots VALUES(72,112); +INSERT INTO product_slots VALUES(72,113); +INSERT INTO product_slots VALUES(72,114); +INSERT INTO product_slots VALUES(72,115); +INSERT INTO product_slots VALUES(72,116); +INSERT INTO product_slots VALUES(72,117); +INSERT INTO product_slots VALUES(72,118); +INSERT INTO product_slots VALUES(72,119); +INSERT INTO product_slots VALUES(72,120); +INSERT INTO product_slots VALUES(72,121); +INSERT INTO product_slots VALUES(72,122); +INSERT INTO product_slots VALUES(72,123); +INSERT INTO product_slots VALUES(72,124); +INSERT INTO product_slots VALUES(72,125); +INSERT INTO product_slots VALUES(72,126); +INSERT INTO product_slots VALUES(72,127); +INSERT INTO product_slots VALUES(72,128); +INSERT INTO product_slots VALUES(72,129); +INSERT INTO product_slots VALUES(72,130); +INSERT INTO product_slots VALUES(72,131); +INSERT INTO product_slots VALUES(72,132); +INSERT INTO product_slots VALUES(72,133); +INSERT INTO product_slots VALUES(72,134); +INSERT INTO product_slots VALUES(72,135); +INSERT INTO product_slots VALUES(72,136); +INSERT INTO product_slots VALUES(72,137); +INSERT INTO product_slots VALUES(72,138); +INSERT INTO product_slots VALUES(72,139); +INSERT INTO product_slots VALUES(72,140); +INSERT INTO product_slots VALUES(72,141); +INSERT INTO product_slots VALUES(72,142); +INSERT INTO product_slots VALUES(72,143); +INSERT INTO product_slots VALUES(72,144); +INSERT INTO product_slots VALUES(72,145); +INSERT INTO product_slots VALUES(72,146); +INSERT INTO product_slots VALUES(72,147); +INSERT INTO product_slots VALUES(72,148); +INSERT INTO product_slots VALUES(72,149); +INSERT INTO product_slots VALUES(72,150); +INSERT INTO product_slots VALUES(72,151); +INSERT INTO product_slots VALUES(72,152); +INSERT INTO product_slots VALUES(72,153); +INSERT INTO product_slots VALUES(72,154); +INSERT INTO product_slots VALUES(72,155); +INSERT INTO product_slots VALUES(72,156); +INSERT INTO product_slots VALUES(72,157); +INSERT INTO product_slots VALUES(72,158); +INSERT INTO product_slots VALUES(72,159); +INSERT INTO product_slots VALUES(72,160); +INSERT INTO product_slots VALUES(72,161); +INSERT INTO product_slots VALUES(72,162); +INSERT INTO product_slots VALUES(72,163); +INSERT INTO product_slots VALUES(72,164); +INSERT INTO product_slots VALUES(72,165); +INSERT INTO product_slots VALUES(72,166); +INSERT INTO product_slots VALUES(72,167); +INSERT INTO product_slots VALUES(72,168); +INSERT INTO product_slots VALUES(72,169); +INSERT INTO product_slots VALUES(72,170); +INSERT INTO product_slots VALUES(72,171); +INSERT INTO product_slots VALUES(72,172); +INSERT INTO product_slots VALUES(72,173); +INSERT INTO product_slots VALUES(72,174); +INSERT INTO product_slots VALUES(72,175); +INSERT INTO product_slots VALUES(72,176); +INSERT INTO product_slots VALUES(72,177); +INSERT INTO product_slots VALUES(72,178); +INSERT INTO product_slots VALUES(72,179); +INSERT INTO product_slots VALUES(72,180); +INSERT INTO product_slots VALUES(72,181); +INSERT INTO product_slots VALUES(72,182); +INSERT INTO product_slots VALUES(72,183); +INSERT INTO product_slots VALUES(72,184); +INSERT INTO product_slots VALUES(72,185); +INSERT INTO product_slots VALUES(72,186); +INSERT INTO product_slots VALUES(72,187); +INSERT INTO product_slots VALUES(72,188); +INSERT INTO product_slots VALUES(72,189); +INSERT INTO product_slots VALUES(72,190); +INSERT INTO product_slots VALUES(72,191); +INSERT INTO product_slots VALUES(72,192); +INSERT INTO product_slots VALUES(72,193); +INSERT INTO product_slots VALUES(72,194); +INSERT INTO product_slots VALUES(72,195); +INSERT INTO product_slots VALUES(72,196); +INSERT INTO product_slots VALUES(72,197); +INSERT INTO product_slots VALUES(72,198); +INSERT INTO product_slots VALUES(72,199); +INSERT INTO product_slots VALUES(72,200); +INSERT INTO product_slots VALUES(72,201); +INSERT INTO product_slots VALUES(72,202); +INSERT INTO product_slots VALUES(72,203); +INSERT INTO product_slots VALUES(72,204); +INSERT INTO product_slots VALUES(72,205); +INSERT INTO product_slots VALUES(72,206); +INSERT INTO product_slots VALUES(72,207); +INSERT INTO product_slots VALUES(72,208); +INSERT INTO product_slots VALUES(72,209); +INSERT INTO product_slots VALUES(72,210); +INSERT INTO product_slots VALUES(72,211); +INSERT INTO product_slots VALUES(72,212); +INSERT INTO product_slots VALUES(72,213); +INSERT INTO product_slots VALUES(72,214); +INSERT INTO product_slots VALUES(72,215); +INSERT INTO product_slots VALUES(72,216); +INSERT INTO product_slots VALUES(72,217); +INSERT INTO product_slots VALUES(72,218); +INSERT INTO product_slots VALUES(72,219); +INSERT INTO product_slots VALUES(72,220); +INSERT INTO product_slots VALUES(72,221); +INSERT INTO product_slots VALUES(72,222); +INSERT INTO product_slots VALUES(72,223); +INSERT INTO product_slots VALUES(72,224); +INSERT INTO product_slots VALUES(72,225); +INSERT INTO product_slots VALUES(72,226); +INSERT INTO product_slots VALUES(72,227); +INSERT INTO product_slots VALUES(72,228); +INSERT INTO product_slots VALUES(72,229); +INSERT INTO product_slots VALUES(72,230); +INSERT INTO product_slots VALUES(72,231); +INSERT INTO product_slots VALUES(72,232); +INSERT INTO product_slots VALUES(72,233); +INSERT INTO product_slots VALUES(72,234); +INSERT INTO product_slots VALUES(72,235); +INSERT INTO product_slots VALUES(72,236); +INSERT INTO product_slots VALUES(72,237); +INSERT INTO product_slots VALUES(72,238); +INSERT INTO product_slots VALUES(72,239); +INSERT INTO product_slots VALUES(72,240); +INSERT INTO product_slots VALUES(72,241); +INSERT INTO product_slots VALUES(72,242); +INSERT INTO product_slots VALUES(72,243); +INSERT INTO product_slots VALUES(72,244); +INSERT INTO product_slots VALUES(72,274); +INSERT INTO product_slots VALUES(72,275); +INSERT INTO product_slots VALUES(72,279); +INSERT INTO product_slots VALUES(72,280); +INSERT INTO product_slots VALUES(72,281); +INSERT INTO product_slots VALUES(72,282); +INSERT INTO product_slots VALUES(72,283); +INSERT INTO product_slots VALUES(72,284); +INSERT INTO product_slots VALUES(72,285); +INSERT INTO product_slots VALUES(72,286); +INSERT INTO product_slots VALUES(72,287); +INSERT INTO product_slots VALUES(73,40); +INSERT INTO product_slots VALUES(73,64); +INSERT INTO product_slots VALUES(73,65); +INSERT INTO product_slots VALUES(73,66); +INSERT INTO product_slots VALUES(73,67); +INSERT INTO product_slots VALUES(73,68); +INSERT INTO product_slots VALUES(73,69); +INSERT INTO product_slots VALUES(73,70); +INSERT INTO product_slots VALUES(73,71); +INSERT INTO product_slots VALUES(73,72); +INSERT INTO product_slots VALUES(73,73); +INSERT INTO product_slots VALUES(73,74); +INSERT INTO product_slots VALUES(73,75); +INSERT INTO product_slots VALUES(73,76); +INSERT INTO product_slots VALUES(73,77); +INSERT INTO product_slots VALUES(73,78); +INSERT INTO product_slots VALUES(73,79); +INSERT INTO product_slots VALUES(73,80); +INSERT INTO product_slots VALUES(73,81); +INSERT INTO product_slots VALUES(73,82); +INSERT INTO product_slots VALUES(73,83); +INSERT INTO product_slots VALUES(73,84); +INSERT INTO product_slots VALUES(73,85); +INSERT INTO product_slots VALUES(73,86); +INSERT INTO product_slots VALUES(73,87); +INSERT INTO product_slots VALUES(73,88); +INSERT INTO product_slots VALUES(73,89); +INSERT INTO product_slots VALUES(73,90); +INSERT INTO product_slots VALUES(73,91); +INSERT INTO product_slots VALUES(73,92); +INSERT INTO product_slots VALUES(73,93); +INSERT INTO product_slots VALUES(73,94); +INSERT INTO product_slots VALUES(73,95); +INSERT INTO product_slots VALUES(73,96); +INSERT INTO product_slots VALUES(73,97); +INSERT INTO product_slots VALUES(73,98); +INSERT INTO product_slots VALUES(73,99); +INSERT INTO product_slots VALUES(73,100); +INSERT INTO product_slots VALUES(73,102); +INSERT INTO product_slots VALUES(73,103); +INSERT INTO product_slots VALUES(73,104); +INSERT INTO product_slots VALUES(73,105); +INSERT INTO product_slots VALUES(73,106); +INSERT INTO product_slots VALUES(73,107); +INSERT INTO product_slots VALUES(73,108); +INSERT INTO product_slots VALUES(73,109); +INSERT INTO product_slots VALUES(73,110); +INSERT INTO product_slots VALUES(73,111); +INSERT INTO product_slots VALUES(73,112); +INSERT INTO product_slots VALUES(73,113); +INSERT INTO product_slots VALUES(73,114); +INSERT INTO product_slots VALUES(73,115); +INSERT INTO product_slots VALUES(73,117); +INSERT INTO product_slots VALUES(73,118); +INSERT INTO product_slots VALUES(73,119); +INSERT INTO product_slots VALUES(73,120); +INSERT INTO product_slots VALUES(73,121); +INSERT INTO product_slots VALUES(73,122); +INSERT INTO product_slots VALUES(73,123); +INSERT INTO product_slots VALUES(73,124); +INSERT INTO product_slots VALUES(73,125); +INSERT INTO product_slots VALUES(73,126); +INSERT INTO product_slots VALUES(73,127); +INSERT INTO product_slots VALUES(73,128); +INSERT INTO product_slots VALUES(73,129); +INSERT INTO product_slots VALUES(73,130); +INSERT INTO product_slots VALUES(73,131); +INSERT INTO product_slots VALUES(73,132); +INSERT INTO product_slots VALUES(73,133); +INSERT INTO product_slots VALUES(73,134); +INSERT INTO product_slots VALUES(73,135); +INSERT INTO product_slots VALUES(73,136); +INSERT INTO product_slots VALUES(73,138); +INSERT INTO product_slots VALUES(73,139); +INSERT INTO product_slots VALUES(73,140); +INSERT INTO product_slots VALUES(73,141); +INSERT INTO product_slots VALUES(73,142); +INSERT INTO product_slots VALUES(73,143); +INSERT INTO product_slots VALUES(73,145); +INSERT INTO product_slots VALUES(73,146); +INSERT INTO product_slots VALUES(73,147); +INSERT INTO product_slots VALUES(73,148); +INSERT INTO product_slots VALUES(73,149); +INSERT INTO product_slots VALUES(73,150); +INSERT INTO product_slots VALUES(73,151); +INSERT INTO product_slots VALUES(73,152); +INSERT INTO product_slots VALUES(73,153); +INSERT INTO product_slots VALUES(73,154); +INSERT INTO product_slots VALUES(73,155); +INSERT INTO product_slots VALUES(73,156); +INSERT INTO product_slots VALUES(73,157); +INSERT INTO product_slots VALUES(73,158); +INSERT INTO product_slots VALUES(73,159); +INSERT INTO product_slots VALUES(73,160); +INSERT INTO product_slots VALUES(73,161); +INSERT INTO product_slots VALUES(73,162); +INSERT INTO product_slots VALUES(73,163); +INSERT INTO product_slots VALUES(73,164); +INSERT INTO product_slots VALUES(73,165); +INSERT INTO product_slots VALUES(73,166); +INSERT INTO product_slots VALUES(73,167); +INSERT INTO product_slots VALUES(73,168); +INSERT INTO product_slots VALUES(73,169); +INSERT INTO product_slots VALUES(73,170); +INSERT INTO product_slots VALUES(73,171); +INSERT INTO product_slots VALUES(73,172); +INSERT INTO product_slots VALUES(73,173); +INSERT INTO product_slots VALUES(73,174); +INSERT INTO product_slots VALUES(73,175); +INSERT INTO product_slots VALUES(73,176); +INSERT INTO product_slots VALUES(73,177); +INSERT INTO product_slots VALUES(73,178); +INSERT INTO product_slots VALUES(73,179); +INSERT INTO product_slots VALUES(73,180); +INSERT INTO product_slots VALUES(73,181); +INSERT INTO product_slots VALUES(73,182); +INSERT INTO product_slots VALUES(73,183); +INSERT INTO product_slots VALUES(73,184); +INSERT INTO product_slots VALUES(73,185); +INSERT INTO product_slots VALUES(73,186); +INSERT INTO product_slots VALUES(73,187); +INSERT INTO product_slots VALUES(73,188); +INSERT INTO product_slots VALUES(73,189); +INSERT INTO product_slots VALUES(73,190); +INSERT INTO product_slots VALUES(73,191); +INSERT INTO product_slots VALUES(73,192); +INSERT INTO product_slots VALUES(73,193); +INSERT INTO product_slots VALUES(73,194); +INSERT INTO product_slots VALUES(73,195); +INSERT INTO product_slots VALUES(73,196); +INSERT INTO product_slots VALUES(73,197); +INSERT INTO product_slots VALUES(73,198); +INSERT INTO product_slots VALUES(73,199); +INSERT INTO product_slots VALUES(73,200); +INSERT INTO product_slots VALUES(73,201); +INSERT INTO product_slots VALUES(73,202); +INSERT INTO product_slots VALUES(73,203); +INSERT INTO product_slots VALUES(73,204); +INSERT INTO product_slots VALUES(73,205); +INSERT INTO product_slots VALUES(73,206); +INSERT INTO product_slots VALUES(73,207); +INSERT INTO product_slots VALUES(73,208); +INSERT INTO product_slots VALUES(73,209); +INSERT INTO product_slots VALUES(73,210); +INSERT INTO product_slots VALUES(73,211); +INSERT INTO product_slots VALUES(73,212); +INSERT INTO product_slots VALUES(73,213); +INSERT INTO product_slots VALUES(73,214); +INSERT INTO product_slots VALUES(73,215); +INSERT INTO product_slots VALUES(73,216); +INSERT INTO product_slots VALUES(73,217); +INSERT INTO product_slots VALUES(73,218); +INSERT INTO product_slots VALUES(73,219); +INSERT INTO product_slots VALUES(73,220); +INSERT INTO product_slots VALUES(73,221); +INSERT INTO product_slots VALUES(73,222); +INSERT INTO product_slots VALUES(73,223); +INSERT INTO product_slots VALUES(73,224); +INSERT INTO product_slots VALUES(73,225); +INSERT INTO product_slots VALUES(73,226); +INSERT INTO product_slots VALUES(73,227); +INSERT INTO product_slots VALUES(73,228); +INSERT INTO product_slots VALUES(73,229); +INSERT INTO product_slots VALUES(73,230); +INSERT INTO product_slots VALUES(73,231); +INSERT INTO product_slots VALUES(73,232); +INSERT INTO product_slots VALUES(73,233); +INSERT INTO product_slots VALUES(73,234); +INSERT INTO product_slots VALUES(73,235); +INSERT INTO product_slots VALUES(73,236); +INSERT INTO product_slots VALUES(73,237); +INSERT INTO product_slots VALUES(73,238); +INSERT INTO product_slots VALUES(73,239); +INSERT INTO product_slots VALUES(73,240); +INSERT INTO product_slots VALUES(73,241); +INSERT INTO product_slots VALUES(73,242); +INSERT INTO product_slots VALUES(73,243); +INSERT INTO product_slots VALUES(73,244); +INSERT INTO product_slots VALUES(73,274); +INSERT INTO product_slots VALUES(73,275); +INSERT INTO product_slots VALUES(73,279); +INSERT INTO product_slots VALUES(73,280); +INSERT INTO product_slots VALUES(73,281); +INSERT INTO product_slots VALUES(73,282); +INSERT INTO product_slots VALUES(73,283); +INSERT INTO product_slots VALUES(73,284); +INSERT INTO product_slots VALUES(73,285); +INSERT INTO product_slots VALUES(73,286); +INSERT INTO product_slots VALUES(73,287); +INSERT INTO product_slots VALUES(74,39); +INSERT INTO product_slots VALUES(74,44); +INSERT INTO product_slots VALUES(74,46); +INSERT INTO product_slots VALUES(74,47); +INSERT INTO product_slots VALUES(74,48); +INSERT INTO product_slots VALUES(74,49); +INSERT INTO product_slots VALUES(74,50); +INSERT INTO product_slots VALUES(74,51); +INSERT INTO product_slots VALUES(74,52); +INSERT INTO product_slots VALUES(74,53); +INSERT INTO product_slots VALUES(74,54); +INSERT INTO product_slots VALUES(74,55); +INSERT INTO product_slots VALUES(74,56); +INSERT INTO product_slots VALUES(74,57); +INSERT INTO product_slots VALUES(74,58); +INSERT INTO product_slots VALUES(74,59); +INSERT INTO product_slots VALUES(74,60); +INSERT INTO product_slots VALUES(74,61); +INSERT INTO product_slots VALUES(74,62); +INSERT INTO product_slots VALUES(74,63); +INSERT INTO product_slots VALUES(74,64); +INSERT INTO product_slots VALUES(74,65); +INSERT INTO product_slots VALUES(74,66); +INSERT INTO product_slots VALUES(74,67); +INSERT INTO product_slots VALUES(74,68); +INSERT INTO product_slots VALUES(74,69); +INSERT INTO product_slots VALUES(74,70); +INSERT INTO product_slots VALUES(74,71); +INSERT INTO product_slots VALUES(74,72); +INSERT INTO product_slots VALUES(74,73); +INSERT INTO product_slots VALUES(74,74); +INSERT INTO product_slots VALUES(74,75); +INSERT INTO product_slots VALUES(74,76); +INSERT INTO product_slots VALUES(74,77); +INSERT INTO product_slots VALUES(74,78); +INSERT INTO product_slots VALUES(74,79); +INSERT INTO product_slots VALUES(74,80); +INSERT INTO product_slots VALUES(74,81); +INSERT INTO product_slots VALUES(74,82); +INSERT INTO product_slots VALUES(74,83); +INSERT INTO product_slots VALUES(74,84); +INSERT INTO product_slots VALUES(74,85); +INSERT INTO product_slots VALUES(74,86); +INSERT INTO product_slots VALUES(74,87); +INSERT INTO product_slots VALUES(74,88); +INSERT INTO product_slots VALUES(74,89); +INSERT INTO product_slots VALUES(74,90); +INSERT INTO product_slots VALUES(74,91); +INSERT INTO product_slots VALUES(74,92); +INSERT INTO product_slots VALUES(74,93); +INSERT INTO product_slots VALUES(74,94); +INSERT INTO product_slots VALUES(74,95); +INSERT INTO product_slots VALUES(74,96); +INSERT INTO product_slots VALUES(74,97); +INSERT INTO product_slots VALUES(74,98); +INSERT INTO product_slots VALUES(74,99); +INSERT INTO product_slots VALUES(74,100); +INSERT INTO product_slots VALUES(74,101); +INSERT INTO product_slots VALUES(74,102); +INSERT INTO product_slots VALUES(74,103); +INSERT INTO product_slots VALUES(74,104); +INSERT INTO product_slots VALUES(74,105); +INSERT INTO product_slots VALUES(74,106); +INSERT INTO product_slots VALUES(74,107); +INSERT INTO product_slots VALUES(74,108); +INSERT INTO product_slots VALUES(74,109); +INSERT INTO product_slots VALUES(74,110); +INSERT INTO product_slots VALUES(74,111); +INSERT INTO product_slots VALUES(74,112); +INSERT INTO product_slots VALUES(74,113); +INSERT INTO product_slots VALUES(74,114); +INSERT INTO product_slots VALUES(74,115); +INSERT INTO product_slots VALUES(74,116); +INSERT INTO product_slots VALUES(74,117); +INSERT INTO product_slots VALUES(74,118); +INSERT INTO product_slots VALUES(74,119); +INSERT INTO product_slots VALUES(74,120); +INSERT INTO product_slots VALUES(74,121); +INSERT INTO product_slots VALUES(74,122); +INSERT INTO product_slots VALUES(74,123); +INSERT INTO product_slots VALUES(74,124); +INSERT INTO product_slots VALUES(74,125); +INSERT INTO product_slots VALUES(74,126); +INSERT INTO product_slots VALUES(74,127); +INSERT INTO product_slots VALUES(74,128); +INSERT INTO product_slots VALUES(74,129); +INSERT INTO product_slots VALUES(74,130); +INSERT INTO product_slots VALUES(74,131); +INSERT INTO product_slots VALUES(74,132); +INSERT INTO product_slots VALUES(74,133); +INSERT INTO product_slots VALUES(74,134); +INSERT INTO product_slots VALUES(74,135); +INSERT INTO product_slots VALUES(74,136); +INSERT INTO product_slots VALUES(74,137); +INSERT INTO product_slots VALUES(74,138); +INSERT INTO product_slots VALUES(74,139); +INSERT INTO product_slots VALUES(74,140); +INSERT INTO product_slots VALUES(74,141); +INSERT INTO product_slots VALUES(74,142); +INSERT INTO product_slots VALUES(74,143); +INSERT INTO product_slots VALUES(74,144); +INSERT INTO product_slots VALUES(74,145); +INSERT INTO product_slots VALUES(74,146); +INSERT INTO product_slots VALUES(74,147); +INSERT INTO product_slots VALUES(74,148); +INSERT INTO product_slots VALUES(74,149); +INSERT INTO product_slots VALUES(74,150); +INSERT INTO product_slots VALUES(74,151); +INSERT INTO product_slots VALUES(74,152); +INSERT INTO product_slots VALUES(74,153); +INSERT INTO product_slots VALUES(74,154); +INSERT INTO product_slots VALUES(74,155); +INSERT INTO product_slots VALUES(74,156); +INSERT INTO product_slots VALUES(74,157); +INSERT INTO product_slots VALUES(74,158); +INSERT INTO product_slots VALUES(74,159); +INSERT INTO product_slots VALUES(74,160); +INSERT INTO product_slots VALUES(74,161); +INSERT INTO product_slots VALUES(74,162); +INSERT INTO product_slots VALUES(74,163); +INSERT INTO product_slots VALUES(74,164); +INSERT INTO product_slots VALUES(74,165); +INSERT INTO product_slots VALUES(74,166); +INSERT INTO product_slots VALUES(74,167); +INSERT INTO product_slots VALUES(74,168); +INSERT INTO product_slots VALUES(74,169); +INSERT INTO product_slots VALUES(74,170); +INSERT INTO product_slots VALUES(74,171); +INSERT INTO product_slots VALUES(74,172); +INSERT INTO product_slots VALUES(74,173); +INSERT INTO product_slots VALUES(74,174); +INSERT INTO product_slots VALUES(74,175); +INSERT INTO product_slots VALUES(74,176); +INSERT INTO product_slots VALUES(74,177); +INSERT INTO product_slots VALUES(74,178); +INSERT INTO product_slots VALUES(74,179); +INSERT INTO product_slots VALUES(74,180); +INSERT INTO product_slots VALUES(74,181); +INSERT INTO product_slots VALUES(74,182); +INSERT INTO product_slots VALUES(74,183); +INSERT INTO product_slots VALUES(74,184); +INSERT INTO product_slots VALUES(74,185); +INSERT INTO product_slots VALUES(74,186); +INSERT INTO product_slots VALUES(74,187); +INSERT INTO product_slots VALUES(74,188); +INSERT INTO product_slots VALUES(74,189); +INSERT INTO product_slots VALUES(74,190); +INSERT INTO product_slots VALUES(74,191); +INSERT INTO product_slots VALUES(74,192); +INSERT INTO product_slots VALUES(74,193); +INSERT INTO product_slots VALUES(74,194); +INSERT INTO product_slots VALUES(74,195); +INSERT INTO product_slots VALUES(74,196); +INSERT INTO product_slots VALUES(74,197); +INSERT INTO product_slots VALUES(74,198); +INSERT INTO product_slots VALUES(74,199); +INSERT INTO product_slots VALUES(74,200); +INSERT INTO product_slots VALUES(74,201); +INSERT INTO product_slots VALUES(74,202); +INSERT INTO product_slots VALUES(74,203); +INSERT INTO product_slots VALUES(74,204); +INSERT INTO product_slots VALUES(74,205); +INSERT INTO product_slots VALUES(74,206); +INSERT INTO product_slots VALUES(74,207); +INSERT INTO product_slots VALUES(74,208); +INSERT INTO product_slots VALUES(74,209); +INSERT INTO product_slots VALUES(74,210); +INSERT INTO product_slots VALUES(74,211); +INSERT INTO product_slots VALUES(74,212); +INSERT INTO product_slots VALUES(74,213); +INSERT INTO product_slots VALUES(74,214); +INSERT INTO product_slots VALUES(74,215); +INSERT INTO product_slots VALUES(74,216); +INSERT INTO product_slots VALUES(74,217); +INSERT INTO product_slots VALUES(74,218); +INSERT INTO product_slots VALUES(74,219); +INSERT INTO product_slots VALUES(74,220); +INSERT INTO product_slots VALUES(74,221); +INSERT INTO product_slots VALUES(74,222); +INSERT INTO product_slots VALUES(74,223); +INSERT INTO product_slots VALUES(74,224); +INSERT INTO product_slots VALUES(74,225); +INSERT INTO product_slots VALUES(74,226); +INSERT INTO product_slots VALUES(74,227); +INSERT INTO product_slots VALUES(74,228); +INSERT INTO product_slots VALUES(74,229); +INSERT INTO product_slots VALUES(74,230); +INSERT INTO product_slots VALUES(74,231); +INSERT INTO product_slots VALUES(74,232); +INSERT INTO product_slots VALUES(74,233); +INSERT INTO product_slots VALUES(74,234); +INSERT INTO product_slots VALUES(74,235); +INSERT INTO product_slots VALUES(74,236); +INSERT INTO product_slots VALUES(74,237); +INSERT INTO product_slots VALUES(74,238); +INSERT INTO product_slots VALUES(74,239); +INSERT INTO product_slots VALUES(74,240); +INSERT INTO product_slots VALUES(74,241); +INSERT INTO product_slots VALUES(74,242); +INSERT INTO product_slots VALUES(74,243); +INSERT INTO product_slots VALUES(74,244); +INSERT INTO product_slots VALUES(74,274); +INSERT INTO product_slots VALUES(74,275); +INSERT INTO product_slots VALUES(74,279); +INSERT INTO product_slots VALUES(74,280); +INSERT INTO product_slots VALUES(74,281); +INSERT INTO product_slots VALUES(74,282); +INSERT INTO product_slots VALUES(74,283); +INSERT INTO product_slots VALUES(74,284); +INSERT INTO product_slots VALUES(74,285); +INSERT INTO product_slots VALUES(74,286); +INSERT INTO product_slots VALUES(74,287); +INSERT INTO product_slots VALUES(75,39); +INSERT INTO product_slots VALUES(75,43); +INSERT INTO product_slots VALUES(75,45); +INSERT INTO product_slots VALUES(75,48); +INSERT INTO product_slots VALUES(75,49); +INSERT INTO product_slots VALUES(75,51); +INSERT INTO product_slots VALUES(75,52); +INSERT INTO product_slots VALUES(75,57); +INSERT INTO product_slots VALUES(75,58); +INSERT INTO product_slots VALUES(75,59); +INSERT INTO product_slots VALUES(75,62); +INSERT INTO product_slots VALUES(75,63); +INSERT INTO product_slots VALUES(75,64); +INSERT INTO product_slots VALUES(75,65); +INSERT INTO product_slots VALUES(75,66); +INSERT INTO product_slots VALUES(75,67); +INSERT INTO product_slots VALUES(75,69); +INSERT INTO product_slots VALUES(75,70); +INSERT INTO product_slots VALUES(75,71); +INSERT INTO product_slots VALUES(75,72); +INSERT INTO product_slots VALUES(75,73); +INSERT INTO product_slots VALUES(75,75); +INSERT INTO product_slots VALUES(75,82); +INSERT INTO product_slots VALUES(75,83); +INSERT INTO product_slots VALUES(75,84); +INSERT INTO product_slots VALUES(75,90); +INSERT INTO product_slots VALUES(75,91); +INSERT INTO product_slots VALUES(75,97); +INSERT INTO product_slots VALUES(75,98); +INSERT INTO product_slots VALUES(75,102); +INSERT INTO product_slots VALUES(75,103); +INSERT INTO product_slots VALUES(75,104); +INSERT INTO product_slots VALUES(75,110); +INSERT INTO product_slots VALUES(75,111); +INSERT INTO product_slots VALUES(75,112); +INSERT INTO product_slots VALUES(75,116); +INSERT INTO product_slots VALUES(75,117); +INSERT INTO product_slots VALUES(75,118); +INSERT INTO product_slots VALUES(75,119); +INSERT INTO product_slots VALUES(75,120); +INSERT INTO product_slots VALUES(75,121); +INSERT INTO product_slots VALUES(75,122); +INSERT INTO product_slots VALUES(75,123); +INSERT INTO product_slots VALUES(75,124); +INSERT INTO product_slots VALUES(75,125); +INSERT INTO product_slots VALUES(75,126); +INSERT INTO product_slots VALUES(75,127); +INSERT INTO product_slots VALUES(75,128); +INSERT INTO product_slots VALUES(75,129); +INSERT INTO product_slots VALUES(75,130); +INSERT INTO product_slots VALUES(75,131); +INSERT INTO product_slots VALUES(75,132); +INSERT INTO product_slots VALUES(75,133); +INSERT INTO product_slots VALUES(75,134); +INSERT INTO product_slots VALUES(75,135); +INSERT INTO product_slots VALUES(75,136); +INSERT INTO product_slots VALUES(75,137); +INSERT INTO product_slots VALUES(75,138); +INSERT INTO product_slots VALUES(75,139); +INSERT INTO product_slots VALUES(75,140); +INSERT INTO product_slots VALUES(75,141); +INSERT INTO product_slots VALUES(75,142); +INSERT INTO product_slots VALUES(75,143); +INSERT INTO product_slots VALUES(75,144); +INSERT INTO product_slots VALUES(75,145); +INSERT INTO product_slots VALUES(75,146); +INSERT INTO product_slots VALUES(75,147); +INSERT INTO product_slots VALUES(75,148); +INSERT INTO product_slots VALUES(75,149); +INSERT INTO product_slots VALUES(75,150); +INSERT INTO product_slots VALUES(75,151); +INSERT INTO product_slots VALUES(75,152); +INSERT INTO product_slots VALUES(75,153); +INSERT INTO product_slots VALUES(75,154); +INSERT INTO product_slots VALUES(75,155); +INSERT INTO product_slots VALUES(75,156); +INSERT INTO product_slots VALUES(75,157); +INSERT INTO product_slots VALUES(75,158); +INSERT INTO product_slots VALUES(75,159); +INSERT INTO product_slots VALUES(75,160); +INSERT INTO product_slots VALUES(75,161); +INSERT INTO product_slots VALUES(75,162); +INSERT INTO product_slots VALUES(75,163); +INSERT INTO product_slots VALUES(75,164); +INSERT INTO product_slots VALUES(75,165); +INSERT INTO product_slots VALUES(75,166); +INSERT INTO product_slots VALUES(75,167); +INSERT INTO product_slots VALUES(75,168); +INSERT INTO product_slots VALUES(75,169); +INSERT INTO product_slots VALUES(75,170); +INSERT INTO product_slots VALUES(75,171); +INSERT INTO product_slots VALUES(75,172); +INSERT INTO product_slots VALUES(75,173); +INSERT INTO product_slots VALUES(75,174); +INSERT INTO product_slots VALUES(75,175); +INSERT INTO product_slots VALUES(75,176); +INSERT INTO product_slots VALUES(75,177); +INSERT INTO product_slots VALUES(75,178); +INSERT INTO product_slots VALUES(75,179); +INSERT INTO product_slots VALUES(75,180); +INSERT INTO product_slots VALUES(75,181); +INSERT INTO product_slots VALUES(75,182); +INSERT INTO product_slots VALUES(75,183); +INSERT INTO product_slots VALUES(75,184); +INSERT INTO product_slots VALUES(75,185); +INSERT INTO product_slots VALUES(75,186); +INSERT INTO product_slots VALUES(75,187); +INSERT INTO product_slots VALUES(75,188); +INSERT INTO product_slots VALUES(75,189); +INSERT INTO product_slots VALUES(75,190); +INSERT INTO product_slots VALUES(75,191); +INSERT INTO product_slots VALUES(75,192); +INSERT INTO product_slots VALUES(75,193); +INSERT INTO product_slots VALUES(75,194); +INSERT INTO product_slots VALUES(75,195); +INSERT INTO product_slots VALUES(75,196); +INSERT INTO product_slots VALUES(75,197); +INSERT INTO product_slots VALUES(75,198); +INSERT INTO product_slots VALUES(75,199); +INSERT INTO product_slots VALUES(75,200); +INSERT INTO product_slots VALUES(75,201); +INSERT INTO product_slots VALUES(75,202); +INSERT INTO product_slots VALUES(75,203); +INSERT INTO product_slots VALUES(75,204); +INSERT INTO product_slots VALUES(75,205); +INSERT INTO product_slots VALUES(75,206); +INSERT INTO product_slots VALUES(75,207); +INSERT INTO product_slots VALUES(75,208); +INSERT INTO product_slots VALUES(75,209); +INSERT INTO product_slots VALUES(75,210); +INSERT INTO product_slots VALUES(75,211); +INSERT INTO product_slots VALUES(75,212); +INSERT INTO product_slots VALUES(75,213); +INSERT INTO product_slots VALUES(75,214); +INSERT INTO product_slots VALUES(75,215); +INSERT INTO product_slots VALUES(75,216); +INSERT INTO product_slots VALUES(75,217); +INSERT INTO product_slots VALUES(75,218); +INSERT INTO product_slots VALUES(75,219); +INSERT INTO product_slots VALUES(75,220); +INSERT INTO product_slots VALUES(75,221); +INSERT INTO product_slots VALUES(75,222); +INSERT INTO product_slots VALUES(75,223); +INSERT INTO product_slots VALUES(75,224); +INSERT INTO product_slots VALUES(75,225); +INSERT INTO product_slots VALUES(75,226); +INSERT INTO product_slots VALUES(75,227); +INSERT INTO product_slots VALUES(75,228); +INSERT INTO product_slots VALUES(75,229); +INSERT INTO product_slots VALUES(75,230); +INSERT INTO product_slots VALUES(75,231); +INSERT INTO product_slots VALUES(75,232); +INSERT INTO product_slots VALUES(75,233); +INSERT INTO product_slots VALUES(75,234); +INSERT INTO product_slots VALUES(75,235); +INSERT INTO product_slots VALUES(75,236); +INSERT INTO product_slots VALUES(75,237); +INSERT INTO product_slots VALUES(75,238); +INSERT INTO product_slots VALUES(75,239); +INSERT INTO product_slots VALUES(75,240); +INSERT INTO product_slots VALUES(75,241); +INSERT INTO product_slots VALUES(75,242); +INSERT INTO product_slots VALUES(75,243); +INSERT INTO product_slots VALUES(75,244); +INSERT INTO product_slots VALUES(75,274); +INSERT INTO product_slots VALUES(75,275); +INSERT INTO product_slots VALUES(75,279); +INSERT INTO product_slots VALUES(75,280); +INSERT INTO product_slots VALUES(75,281); +INSERT INTO product_slots VALUES(75,282); +INSERT INTO product_slots VALUES(75,283); +INSERT INTO product_slots VALUES(75,284); +INSERT INTO product_slots VALUES(75,285); +INSERT INTO product_slots VALUES(75,286); +INSERT INTO product_slots VALUES(75,287); +INSERT INTO product_slots VALUES(76,39); +INSERT INTO product_slots VALUES(76,41); +INSERT INTO product_slots VALUES(76,43); +INSERT INTO product_slots VALUES(76,44); +INSERT INTO product_slots VALUES(76,45); +INSERT INTO product_slots VALUES(76,46); +INSERT INTO product_slots VALUES(76,47); +INSERT INTO product_slots VALUES(76,48); +INSERT INTO product_slots VALUES(76,49); +INSERT INTO product_slots VALUES(76,50); +INSERT INTO product_slots VALUES(76,51); +INSERT INTO product_slots VALUES(76,52); +INSERT INTO product_slots VALUES(76,53); +INSERT INTO product_slots VALUES(76,54); +INSERT INTO product_slots VALUES(76,55); +INSERT INTO product_slots VALUES(76,56); +INSERT INTO product_slots VALUES(76,57); +INSERT INTO product_slots VALUES(76,58); +INSERT INTO product_slots VALUES(76,59); +INSERT INTO product_slots VALUES(76,60); +INSERT INTO product_slots VALUES(76,61); +INSERT INTO product_slots VALUES(76,62); +INSERT INTO product_slots VALUES(76,63); +INSERT INTO product_slots VALUES(76,64); +INSERT INTO product_slots VALUES(76,65); +INSERT INTO product_slots VALUES(76,66); +INSERT INTO product_slots VALUES(76,67); +INSERT INTO product_slots VALUES(76,68); +INSERT INTO product_slots VALUES(76,69); +INSERT INTO product_slots VALUES(76,70); +INSERT INTO product_slots VALUES(76,71); +INSERT INTO product_slots VALUES(76,72); +INSERT INTO product_slots VALUES(76,73); +INSERT INTO product_slots VALUES(76,74); +INSERT INTO product_slots VALUES(76,75); +INSERT INTO product_slots VALUES(76,76); +INSERT INTO product_slots VALUES(76,77); +INSERT INTO product_slots VALUES(76,78); +INSERT INTO product_slots VALUES(76,79); +INSERT INTO product_slots VALUES(76,80); +INSERT INTO product_slots VALUES(76,81); +INSERT INTO product_slots VALUES(76,82); +INSERT INTO product_slots VALUES(76,83); +INSERT INTO product_slots VALUES(76,84); +INSERT INTO product_slots VALUES(76,85); +INSERT INTO product_slots VALUES(76,86); +INSERT INTO product_slots VALUES(76,87); +INSERT INTO product_slots VALUES(76,88); +INSERT INTO product_slots VALUES(76,89); +INSERT INTO product_slots VALUES(76,90); +INSERT INTO product_slots VALUES(76,91); +INSERT INTO product_slots VALUES(76,92); +INSERT INTO product_slots VALUES(76,93); +INSERT INTO product_slots VALUES(76,94); +INSERT INTO product_slots VALUES(76,95); +INSERT INTO product_slots VALUES(76,96); +INSERT INTO product_slots VALUES(76,97); +INSERT INTO product_slots VALUES(76,98); +INSERT INTO product_slots VALUES(76,99); +INSERT INTO product_slots VALUES(76,100); +INSERT INTO product_slots VALUES(76,101); +INSERT INTO product_slots VALUES(76,102); +INSERT INTO product_slots VALUES(76,103); +INSERT INTO product_slots VALUES(76,104); +INSERT INTO product_slots VALUES(76,105); +INSERT INTO product_slots VALUES(76,106); +INSERT INTO product_slots VALUES(76,107); +INSERT INTO product_slots VALUES(76,108); +INSERT INTO product_slots VALUES(76,109); +INSERT INTO product_slots VALUES(76,110); +INSERT INTO product_slots VALUES(76,111); +INSERT INTO product_slots VALUES(76,112); +INSERT INTO product_slots VALUES(76,113); +INSERT INTO product_slots VALUES(76,114); +INSERT INTO product_slots VALUES(76,115); +INSERT INTO product_slots VALUES(76,116); +INSERT INTO product_slots VALUES(76,117); +INSERT INTO product_slots VALUES(76,118); +INSERT INTO product_slots VALUES(76,119); +INSERT INTO product_slots VALUES(76,120); +INSERT INTO product_slots VALUES(76,121); +INSERT INTO product_slots VALUES(76,122); +INSERT INTO product_slots VALUES(76,123); +INSERT INTO product_slots VALUES(76,124); +INSERT INTO product_slots VALUES(76,125); +INSERT INTO product_slots VALUES(76,126); +INSERT INTO product_slots VALUES(76,127); +INSERT INTO product_slots VALUES(76,128); +INSERT INTO product_slots VALUES(76,129); +INSERT INTO product_slots VALUES(76,130); +INSERT INTO product_slots VALUES(76,131); +INSERT INTO product_slots VALUES(76,132); +INSERT INTO product_slots VALUES(76,133); +INSERT INTO product_slots VALUES(76,134); +INSERT INTO product_slots VALUES(76,135); +INSERT INTO product_slots VALUES(76,136); +INSERT INTO product_slots VALUES(76,137); +INSERT INTO product_slots VALUES(76,138); +INSERT INTO product_slots VALUES(76,139); +INSERT INTO product_slots VALUES(76,140); +INSERT INTO product_slots VALUES(76,141); +INSERT INTO product_slots VALUES(76,142); +INSERT INTO product_slots VALUES(76,143); +INSERT INTO product_slots VALUES(76,144); +INSERT INTO product_slots VALUES(76,145); +INSERT INTO product_slots VALUES(76,146); +INSERT INTO product_slots VALUES(76,147); +INSERT INTO product_slots VALUES(76,148); +INSERT INTO product_slots VALUES(76,149); +INSERT INTO product_slots VALUES(76,150); +INSERT INTO product_slots VALUES(76,151); +INSERT INTO product_slots VALUES(76,152); +INSERT INTO product_slots VALUES(76,153); +INSERT INTO product_slots VALUES(76,154); +INSERT INTO product_slots VALUES(76,155); +INSERT INTO product_slots VALUES(76,156); +INSERT INTO product_slots VALUES(76,157); +INSERT INTO product_slots VALUES(76,158); +INSERT INTO product_slots VALUES(76,159); +INSERT INTO product_slots VALUES(76,160); +INSERT INTO product_slots VALUES(76,161); +INSERT INTO product_slots VALUES(76,162); +INSERT INTO product_slots VALUES(76,163); +INSERT INTO product_slots VALUES(76,164); +INSERT INTO product_slots VALUES(76,165); +INSERT INTO product_slots VALUES(76,166); +INSERT INTO product_slots VALUES(76,167); +INSERT INTO product_slots VALUES(76,168); +INSERT INTO product_slots VALUES(76,169); +INSERT INTO product_slots VALUES(76,170); +INSERT INTO product_slots VALUES(76,171); +INSERT INTO product_slots VALUES(76,172); +INSERT INTO product_slots VALUES(76,173); +INSERT INTO product_slots VALUES(76,174); +INSERT INTO product_slots VALUES(76,175); +INSERT INTO product_slots VALUES(76,176); +INSERT INTO product_slots VALUES(76,177); +INSERT INTO product_slots VALUES(76,178); +INSERT INTO product_slots VALUES(76,179); +INSERT INTO product_slots VALUES(76,180); +INSERT INTO product_slots VALUES(76,181); +INSERT INTO product_slots VALUES(76,182); +INSERT INTO product_slots VALUES(76,183); +INSERT INTO product_slots VALUES(76,184); +INSERT INTO product_slots VALUES(76,185); +INSERT INTO product_slots VALUES(76,186); +INSERT INTO product_slots VALUES(76,187); +INSERT INTO product_slots VALUES(76,188); +INSERT INTO product_slots VALUES(76,189); +INSERT INTO product_slots VALUES(76,190); +INSERT INTO product_slots VALUES(76,191); +INSERT INTO product_slots VALUES(76,192); +INSERT INTO product_slots VALUES(76,193); +INSERT INTO product_slots VALUES(76,194); +INSERT INTO product_slots VALUES(76,195); +INSERT INTO product_slots VALUES(76,196); +INSERT INTO product_slots VALUES(76,197); +INSERT INTO product_slots VALUES(76,198); +INSERT INTO product_slots VALUES(76,199); +INSERT INTO product_slots VALUES(76,200); +INSERT INTO product_slots VALUES(76,201); +INSERT INTO product_slots VALUES(76,202); +INSERT INTO product_slots VALUES(76,203); +INSERT INTO product_slots VALUES(76,204); +INSERT INTO product_slots VALUES(76,205); +INSERT INTO product_slots VALUES(76,206); +INSERT INTO product_slots VALUES(76,207); +INSERT INTO product_slots VALUES(76,208); +INSERT INTO product_slots VALUES(76,209); +INSERT INTO product_slots VALUES(76,210); +INSERT INTO product_slots VALUES(76,211); +INSERT INTO product_slots VALUES(76,212); +INSERT INTO product_slots VALUES(76,213); +INSERT INTO product_slots VALUES(76,214); +INSERT INTO product_slots VALUES(76,215); +INSERT INTO product_slots VALUES(76,216); +INSERT INTO product_slots VALUES(76,217); +INSERT INTO product_slots VALUES(76,218); +INSERT INTO product_slots VALUES(76,219); +INSERT INTO product_slots VALUES(76,220); +INSERT INTO product_slots VALUES(76,221); +INSERT INTO product_slots VALUES(76,222); +INSERT INTO product_slots VALUES(76,223); +INSERT INTO product_slots VALUES(76,224); +INSERT INTO product_slots VALUES(76,225); +INSERT INTO product_slots VALUES(76,226); +INSERT INTO product_slots VALUES(76,227); +INSERT INTO product_slots VALUES(76,228); +INSERT INTO product_slots VALUES(76,229); +INSERT INTO product_slots VALUES(76,230); +INSERT INTO product_slots VALUES(76,231); +INSERT INTO product_slots VALUES(76,232); +INSERT INTO product_slots VALUES(76,233); +INSERT INTO product_slots VALUES(76,234); +INSERT INTO product_slots VALUES(76,235); +INSERT INTO product_slots VALUES(76,236); +INSERT INTO product_slots VALUES(76,237); +INSERT INTO product_slots VALUES(76,238); +INSERT INTO product_slots VALUES(76,239); +INSERT INTO product_slots VALUES(76,240); +INSERT INTO product_slots VALUES(76,241); +INSERT INTO product_slots VALUES(76,242); +INSERT INTO product_slots VALUES(76,243); +INSERT INTO product_slots VALUES(76,244); +INSERT INTO product_slots VALUES(76,274); +INSERT INTO product_slots VALUES(76,275); +INSERT INTO product_slots VALUES(76,279); +INSERT INTO product_slots VALUES(76,280); +INSERT INTO product_slots VALUES(76,281); +INSERT INTO product_slots VALUES(76,282); +INSERT INTO product_slots VALUES(76,283); +INSERT INTO product_slots VALUES(76,284); +INSERT INTO product_slots VALUES(76,285); +INSERT INTO product_slots VALUES(76,286); +INSERT INTO product_slots VALUES(76,287); +INSERT INTO product_slots VALUES(77,39); +INSERT INTO product_slots VALUES(77,44); +INSERT INTO product_slots VALUES(77,46); +INSERT INTO product_slots VALUES(77,47); +INSERT INTO product_slots VALUES(77,48); +INSERT INTO product_slots VALUES(77,49); +INSERT INTO product_slots VALUES(77,50); +INSERT INTO product_slots VALUES(77,51); +INSERT INTO product_slots VALUES(77,52); +INSERT INTO product_slots VALUES(77,53); +INSERT INTO product_slots VALUES(77,54); +INSERT INTO product_slots VALUES(77,55); +INSERT INTO product_slots VALUES(77,56); +INSERT INTO product_slots VALUES(77,57); +INSERT INTO product_slots VALUES(77,58); +INSERT INTO product_slots VALUES(77,59); +INSERT INTO product_slots VALUES(77,60); +INSERT INTO product_slots VALUES(77,61); +INSERT INTO product_slots VALUES(77,62); +INSERT INTO product_slots VALUES(77,63); +INSERT INTO product_slots VALUES(77,64); +INSERT INTO product_slots VALUES(77,65); +INSERT INTO product_slots VALUES(77,66); +INSERT INTO product_slots VALUES(77,67); +INSERT INTO product_slots VALUES(77,68); +INSERT INTO product_slots VALUES(77,69); +INSERT INTO product_slots VALUES(77,70); +INSERT INTO product_slots VALUES(77,71); +INSERT INTO product_slots VALUES(77,72); +INSERT INTO product_slots VALUES(77,73); +INSERT INTO product_slots VALUES(77,74); +INSERT INTO product_slots VALUES(77,75); +INSERT INTO product_slots VALUES(77,76); +INSERT INTO product_slots VALUES(77,77); +INSERT INTO product_slots VALUES(77,78); +INSERT INTO product_slots VALUES(77,79); +INSERT INTO product_slots VALUES(77,80); +INSERT INTO product_slots VALUES(77,81); +INSERT INTO product_slots VALUES(77,82); +INSERT INTO product_slots VALUES(77,83); +INSERT INTO product_slots VALUES(77,84); +INSERT INTO product_slots VALUES(77,85); +INSERT INTO product_slots VALUES(77,86); +INSERT INTO product_slots VALUES(77,87); +INSERT INTO product_slots VALUES(77,88); +INSERT INTO product_slots VALUES(77,89); +INSERT INTO product_slots VALUES(77,90); +INSERT INTO product_slots VALUES(77,91); +INSERT INTO product_slots VALUES(77,92); +INSERT INTO product_slots VALUES(77,93); +INSERT INTO product_slots VALUES(77,94); +INSERT INTO product_slots VALUES(77,95); +INSERT INTO product_slots VALUES(77,96); +INSERT INTO product_slots VALUES(77,97); +INSERT INTO product_slots VALUES(77,98); +INSERT INTO product_slots VALUES(77,99); +INSERT INTO product_slots VALUES(77,100); +INSERT INTO product_slots VALUES(77,101); +INSERT INTO product_slots VALUES(77,102); +INSERT INTO product_slots VALUES(77,103); +INSERT INTO product_slots VALUES(77,104); +INSERT INTO product_slots VALUES(77,105); +INSERT INTO product_slots VALUES(77,106); +INSERT INTO product_slots VALUES(77,107); +INSERT INTO product_slots VALUES(77,108); +INSERT INTO product_slots VALUES(77,109); +INSERT INTO product_slots VALUES(77,110); +INSERT INTO product_slots VALUES(77,111); +INSERT INTO product_slots VALUES(77,112); +INSERT INTO product_slots VALUES(77,113); +INSERT INTO product_slots VALUES(77,114); +INSERT INTO product_slots VALUES(77,115); +INSERT INTO product_slots VALUES(77,116); +INSERT INTO product_slots VALUES(77,117); +INSERT INTO product_slots VALUES(77,118); +INSERT INTO product_slots VALUES(77,119); +INSERT INTO product_slots VALUES(77,120); +INSERT INTO product_slots VALUES(77,121); +INSERT INTO product_slots VALUES(77,122); +INSERT INTO product_slots VALUES(77,123); +INSERT INTO product_slots VALUES(77,124); +INSERT INTO product_slots VALUES(77,125); +INSERT INTO product_slots VALUES(77,126); +INSERT INTO product_slots VALUES(77,127); +INSERT INTO product_slots VALUES(77,128); +INSERT INTO product_slots VALUES(77,129); +INSERT INTO product_slots VALUES(77,130); +INSERT INTO product_slots VALUES(77,131); +INSERT INTO product_slots VALUES(77,132); +INSERT INTO product_slots VALUES(77,133); +INSERT INTO product_slots VALUES(77,134); +INSERT INTO product_slots VALUES(77,135); +INSERT INTO product_slots VALUES(77,136); +INSERT INTO product_slots VALUES(77,137); +INSERT INTO product_slots VALUES(77,138); +INSERT INTO product_slots VALUES(77,139); +INSERT INTO product_slots VALUES(77,140); +INSERT INTO product_slots VALUES(77,141); +INSERT INTO product_slots VALUES(77,142); +INSERT INTO product_slots VALUES(77,143); +INSERT INTO product_slots VALUES(77,144); +INSERT INTO product_slots VALUES(77,145); +INSERT INTO product_slots VALUES(77,146); +INSERT INTO product_slots VALUES(77,147); +INSERT INTO product_slots VALUES(77,148); +INSERT INTO product_slots VALUES(77,149); +INSERT INTO product_slots VALUES(77,150); +INSERT INTO product_slots VALUES(77,151); +INSERT INTO product_slots VALUES(77,152); +INSERT INTO product_slots VALUES(77,153); +INSERT INTO product_slots VALUES(77,154); +INSERT INTO product_slots VALUES(77,155); +INSERT INTO product_slots VALUES(77,156); +INSERT INTO product_slots VALUES(77,157); +INSERT INTO product_slots VALUES(77,158); +INSERT INTO product_slots VALUES(77,159); +INSERT INTO product_slots VALUES(77,160); +INSERT INTO product_slots VALUES(77,161); +INSERT INTO product_slots VALUES(77,162); +INSERT INTO product_slots VALUES(77,163); +INSERT INTO product_slots VALUES(77,164); +INSERT INTO product_slots VALUES(77,165); +INSERT INTO product_slots VALUES(77,166); +INSERT INTO product_slots VALUES(77,167); +INSERT INTO product_slots VALUES(77,168); +INSERT INTO product_slots VALUES(77,169); +INSERT INTO product_slots VALUES(77,170); +INSERT INTO product_slots VALUES(77,171); +INSERT INTO product_slots VALUES(77,172); +INSERT INTO product_slots VALUES(77,173); +INSERT INTO product_slots VALUES(77,174); +INSERT INTO product_slots VALUES(77,175); +INSERT INTO product_slots VALUES(77,176); +INSERT INTO product_slots VALUES(77,177); +INSERT INTO product_slots VALUES(77,178); +INSERT INTO product_slots VALUES(77,179); +INSERT INTO product_slots VALUES(77,180); +INSERT INTO product_slots VALUES(77,181); +INSERT INTO product_slots VALUES(77,182); +INSERT INTO product_slots VALUES(77,183); +INSERT INTO product_slots VALUES(77,184); +INSERT INTO product_slots VALUES(77,185); +INSERT INTO product_slots VALUES(77,186); +INSERT INTO product_slots VALUES(77,187); +INSERT INTO product_slots VALUES(77,188); +INSERT INTO product_slots VALUES(77,189); +INSERT INTO product_slots VALUES(77,190); +INSERT INTO product_slots VALUES(77,191); +INSERT INTO product_slots VALUES(77,192); +INSERT INTO product_slots VALUES(77,193); +INSERT INTO product_slots VALUES(77,194); +INSERT INTO product_slots VALUES(77,195); +INSERT INTO product_slots VALUES(77,196); +INSERT INTO product_slots VALUES(77,197); +INSERT INTO product_slots VALUES(77,198); +INSERT INTO product_slots VALUES(77,199); +INSERT INTO product_slots VALUES(77,200); +INSERT INTO product_slots VALUES(77,201); +INSERT INTO product_slots VALUES(77,202); +INSERT INTO product_slots VALUES(77,203); +INSERT INTO product_slots VALUES(77,204); +INSERT INTO product_slots VALUES(77,205); +INSERT INTO product_slots VALUES(77,206); +INSERT INTO product_slots VALUES(77,207); +INSERT INTO product_slots VALUES(77,208); +INSERT INTO product_slots VALUES(77,209); +INSERT INTO product_slots VALUES(77,210); +INSERT INTO product_slots VALUES(77,211); +INSERT INTO product_slots VALUES(77,212); +INSERT INTO product_slots VALUES(77,213); +INSERT INTO product_slots VALUES(77,214); +INSERT INTO product_slots VALUES(77,215); +INSERT INTO product_slots VALUES(77,216); +INSERT INTO product_slots VALUES(77,217); +INSERT INTO product_slots VALUES(77,218); +INSERT INTO product_slots VALUES(77,219); +INSERT INTO product_slots VALUES(77,220); +INSERT INTO product_slots VALUES(77,221); +INSERT INTO product_slots VALUES(77,222); +INSERT INTO product_slots VALUES(77,223); +INSERT INTO product_slots VALUES(77,224); +INSERT INTO product_slots VALUES(77,225); +INSERT INTO product_slots VALUES(77,226); +INSERT INTO product_slots VALUES(77,227); +INSERT INTO product_slots VALUES(77,228); +INSERT INTO product_slots VALUES(77,229); +INSERT INTO product_slots VALUES(77,230); +INSERT INTO product_slots VALUES(77,231); +INSERT INTO product_slots VALUES(77,232); +INSERT INTO product_slots VALUES(77,233); +INSERT INTO product_slots VALUES(77,234); +INSERT INTO product_slots VALUES(77,235); +INSERT INTO product_slots VALUES(77,236); +INSERT INTO product_slots VALUES(77,237); +INSERT INTO product_slots VALUES(77,238); +INSERT INTO product_slots VALUES(77,239); +INSERT INTO product_slots VALUES(77,240); +INSERT INTO product_slots VALUES(77,241); +INSERT INTO product_slots VALUES(77,242); +INSERT INTO product_slots VALUES(77,243); +INSERT INTO product_slots VALUES(77,244); +INSERT INTO product_slots VALUES(77,274); +INSERT INTO product_slots VALUES(77,275); +INSERT INTO product_slots VALUES(77,279); +INSERT INTO product_slots VALUES(77,280); +INSERT INTO product_slots VALUES(77,281); +INSERT INTO product_slots VALUES(77,282); +INSERT INTO product_slots VALUES(77,283); +INSERT INTO product_slots VALUES(77,284); +INSERT INTO product_slots VALUES(77,285); +INSERT INTO product_slots VALUES(77,286); +INSERT INTO product_slots VALUES(77,287); +INSERT INTO product_slots VALUES(78,39); +INSERT INTO product_slots VALUES(78,41); +INSERT INTO product_slots VALUES(78,43); +INSERT INTO product_slots VALUES(78,44); +INSERT INTO product_slots VALUES(78,45); +INSERT INTO product_slots VALUES(78,46); +INSERT INTO product_slots VALUES(78,47); +INSERT INTO product_slots VALUES(78,48); +INSERT INTO product_slots VALUES(78,49); +INSERT INTO product_slots VALUES(78,50); +INSERT INTO product_slots VALUES(78,51); +INSERT INTO product_slots VALUES(78,52); +INSERT INTO product_slots VALUES(78,53); +INSERT INTO product_slots VALUES(78,54); +INSERT INTO product_slots VALUES(78,55); +INSERT INTO product_slots VALUES(78,56); +INSERT INTO product_slots VALUES(78,57); +INSERT INTO product_slots VALUES(78,58); +INSERT INTO product_slots VALUES(78,59); +INSERT INTO product_slots VALUES(78,60); +INSERT INTO product_slots VALUES(78,61); +INSERT INTO product_slots VALUES(78,62); +INSERT INTO product_slots VALUES(78,63); +INSERT INTO product_slots VALUES(78,64); +INSERT INTO product_slots VALUES(78,65); +INSERT INTO product_slots VALUES(78,66); +INSERT INTO product_slots VALUES(78,67); +INSERT INTO product_slots VALUES(78,68); +INSERT INTO product_slots VALUES(78,69); +INSERT INTO product_slots VALUES(78,70); +INSERT INTO product_slots VALUES(78,71); +INSERT INTO product_slots VALUES(78,72); +INSERT INTO product_slots VALUES(78,73); +INSERT INTO product_slots VALUES(78,74); +INSERT INTO product_slots VALUES(78,75); +INSERT INTO product_slots VALUES(78,76); +INSERT INTO product_slots VALUES(78,77); +INSERT INTO product_slots VALUES(78,78); +INSERT INTO product_slots VALUES(78,79); +INSERT INTO product_slots VALUES(78,80); +INSERT INTO product_slots VALUES(78,81); +INSERT INTO product_slots VALUES(78,82); +INSERT INTO product_slots VALUES(78,83); +INSERT INTO product_slots VALUES(78,84); +INSERT INTO product_slots VALUES(78,85); +INSERT INTO product_slots VALUES(78,86); +INSERT INTO product_slots VALUES(78,87); +INSERT INTO product_slots VALUES(78,88); +INSERT INTO product_slots VALUES(78,89); +INSERT INTO product_slots VALUES(78,90); +INSERT INTO product_slots VALUES(78,91); +INSERT INTO product_slots VALUES(78,92); +INSERT INTO product_slots VALUES(78,93); +INSERT INTO product_slots VALUES(78,94); +INSERT INTO product_slots VALUES(78,95); +INSERT INTO product_slots VALUES(78,96); +INSERT INTO product_slots VALUES(78,97); +INSERT INTO product_slots VALUES(78,98); +INSERT INTO product_slots VALUES(78,99); +INSERT INTO product_slots VALUES(78,100); +INSERT INTO product_slots VALUES(78,101); +INSERT INTO product_slots VALUES(78,102); +INSERT INTO product_slots VALUES(78,103); +INSERT INTO product_slots VALUES(78,104); +INSERT INTO product_slots VALUES(78,105); +INSERT INTO product_slots VALUES(78,106); +INSERT INTO product_slots VALUES(78,107); +INSERT INTO product_slots VALUES(78,108); +INSERT INTO product_slots VALUES(78,109); +INSERT INTO product_slots VALUES(78,110); +INSERT INTO product_slots VALUES(78,111); +INSERT INTO product_slots VALUES(78,112); +INSERT INTO product_slots VALUES(78,113); +INSERT INTO product_slots VALUES(78,114); +INSERT INTO product_slots VALUES(78,115); +INSERT INTO product_slots VALUES(78,116); +INSERT INTO product_slots VALUES(78,117); +INSERT INTO product_slots VALUES(78,118); +INSERT INTO product_slots VALUES(78,119); +INSERT INTO product_slots VALUES(78,120); +INSERT INTO product_slots VALUES(78,121); +INSERT INTO product_slots VALUES(78,122); +INSERT INTO product_slots VALUES(78,123); +INSERT INTO product_slots VALUES(78,124); +INSERT INTO product_slots VALUES(78,125); +INSERT INTO product_slots VALUES(78,126); +INSERT INTO product_slots VALUES(78,127); +INSERT INTO product_slots VALUES(78,128); +INSERT INTO product_slots VALUES(78,129); +INSERT INTO product_slots VALUES(78,130); +INSERT INTO product_slots VALUES(78,131); +INSERT INTO product_slots VALUES(78,132); +INSERT INTO product_slots VALUES(78,133); +INSERT INTO product_slots VALUES(78,134); +INSERT INTO product_slots VALUES(78,135); +INSERT INTO product_slots VALUES(78,136); +INSERT INTO product_slots VALUES(78,137); +INSERT INTO product_slots VALUES(78,138); +INSERT INTO product_slots VALUES(78,139); +INSERT INTO product_slots VALUES(78,140); +INSERT INTO product_slots VALUES(78,141); +INSERT INTO product_slots VALUES(78,142); +INSERT INTO product_slots VALUES(78,143); +INSERT INTO product_slots VALUES(78,144); +INSERT INTO product_slots VALUES(78,145); +INSERT INTO product_slots VALUES(78,146); +INSERT INTO product_slots VALUES(78,147); +INSERT INTO product_slots VALUES(78,148); +INSERT INTO product_slots VALUES(78,149); +INSERT INTO product_slots VALUES(78,150); +INSERT INTO product_slots VALUES(78,151); +INSERT INTO product_slots VALUES(78,152); +INSERT INTO product_slots VALUES(78,153); +INSERT INTO product_slots VALUES(78,154); +INSERT INTO product_slots VALUES(78,155); +INSERT INTO product_slots VALUES(78,156); +INSERT INTO product_slots VALUES(78,157); +INSERT INTO product_slots VALUES(78,158); +INSERT INTO product_slots VALUES(78,159); +INSERT INTO product_slots VALUES(78,160); +INSERT INTO product_slots VALUES(78,161); +INSERT INTO product_slots VALUES(78,162); +INSERT INTO product_slots VALUES(78,163); +INSERT INTO product_slots VALUES(78,164); +INSERT INTO product_slots VALUES(78,165); +INSERT INTO product_slots VALUES(78,166); +INSERT INTO product_slots VALUES(78,167); +INSERT INTO product_slots VALUES(78,168); +INSERT INTO product_slots VALUES(78,169); +INSERT INTO product_slots VALUES(78,170); +INSERT INTO product_slots VALUES(78,171); +INSERT INTO product_slots VALUES(78,172); +INSERT INTO product_slots VALUES(78,173); +INSERT INTO product_slots VALUES(78,174); +INSERT INTO product_slots VALUES(78,175); +INSERT INTO product_slots VALUES(78,176); +INSERT INTO product_slots VALUES(78,177); +INSERT INTO product_slots VALUES(78,178); +INSERT INTO product_slots VALUES(78,179); +INSERT INTO product_slots VALUES(78,180); +INSERT INTO product_slots VALUES(78,181); +INSERT INTO product_slots VALUES(78,182); +INSERT INTO product_slots VALUES(78,183); +INSERT INTO product_slots VALUES(78,184); +INSERT INTO product_slots VALUES(78,185); +INSERT INTO product_slots VALUES(78,186); +INSERT INTO product_slots VALUES(78,187); +INSERT INTO product_slots VALUES(78,188); +INSERT INTO product_slots VALUES(78,189); +INSERT INTO product_slots VALUES(78,190); +INSERT INTO product_slots VALUES(78,191); +INSERT INTO product_slots VALUES(78,192); +INSERT INTO product_slots VALUES(78,193); +INSERT INTO product_slots VALUES(78,194); +INSERT INTO product_slots VALUES(78,195); +INSERT INTO product_slots VALUES(78,196); +INSERT INTO product_slots VALUES(78,197); +INSERT INTO product_slots VALUES(78,198); +INSERT INTO product_slots VALUES(78,199); +INSERT INTO product_slots VALUES(78,200); +INSERT INTO product_slots VALUES(78,201); +INSERT INTO product_slots VALUES(78,202); +INSERT INTO product_slots VALUES(78,203); +INSERT INTO product_slots VALUES(78,204); +INSERT INTO product_slots VALUES(78,205); +INSERT INTO product_slots VALUES(78,206); +INSERT INTO product_slots VALUES(78,207); +INSERT INTO product_slots VALUES(78,208); +INSERT INTO product_slots VALUES(78,209); +INSERT INTO product_slots VALUES(78,210); +INSERT INTO product_slots VALUES(78,211); +INSERT INTO product_slots VALUES(78,212); +INSERT INTO product_slots VALUES(78,213); +INSERT INTO product_slots VALUES(78,214); +INSERT INTO product_slots VALUES(78,215); +INSERT INTO product_slots VALUES(78,216); +INSERT INTO product_slots VALUES(78,217); +INSERT INTO product_slots VALUES(78,218); +INSERT INTO product_slots VALUES(78,219); +INSERT INTO product_slots VALUES(78,220); +INSERT INTO product_slots VALUES(78,221); +INSERT INTO product_slots VALUES(78,222); +INSERT INTO product_slots VALUES(78,223); +INSERT INTO product_slots VALUES(78,224); +INSERT INTO product_slots VALUES(78,225); +INSERT INTO product_slots VALUES(78,226); +INSERT INTO product_slots VALUES(78,227); +INSERT INTO product_slots VALUES(78,228); +INSERT INTO product_slots VALUES(78,229); +INSERT INTO product_slots VALUES(78,230); +INSERT INTO product_slots VALUES(78,231); +INSERT INTO product_slots VALUES(78,232); +INSERT INTO product_slots VALUES(78,233); +INSERT INTO product_slots VALUES(78,234); +INSERT INTO product_slots VALUES(78,235); +INSERT INTO product_slots VALUES(78,236); +INSERT INTO product_slots VALUES(78,237); +INSERT INTO product_slots VALUES(78,238); +INSERT INTO product_slots VALUES(78,239); +INSERT INTO product_slots VALUES(78,240); +INSERT INTO product_slots VALUES(78,241); +INSERT INTO product_slots VALUES(78,242); +INSERT INTO product_slots VALUES(78,243); +INSERT INTO product_slots VALUES(78,244); +INSERT INTO product_slots VALUES(78,274); +INSERT INTO product_slots VALUES(78,275); +INSERT INTO product_slots VALUES(78,279); +INSERT INTO product_slots VALUES(78,280); +INSERT INTO product_slots VALUES(78,281); +INSERT INTO product_slots VALUES(78,282); +INSERT INTO product_slots VALUES(78,283); +INSERT INTO product_slots VALUES(78,284); +INSERT INTO product_slots VALUES(78,285); +INSERT INTO product_slots VALUES(78,286); +INSERT INTO product_slots VALUES(78,287); +INSERT INTO product_slots VALUES(79,39); +INSERT INTO product_slots VALUES(79,41); +INSERT INTO product_slots VALUES(79,43); +INSERT INTO product_slots VALUES(79,44); +INSERT INTO product_slots VALUES(79,45); +INSERT INTO product_slots VALUES(79,46); +INSERT INTO product_slots VALUES(79,47); +INSERT INTO product_slots VALUES(79,48); +INSERT INTO product_slots VALUES(79,49); +INSERT INTO product_slots VALUES(79,50); +INSERT INTO product_slots VALUES(79,51); +INSERT INTO product_slots VALUES(79,52); +INSERT INTO product_slots VALUES(79,53); +INSERT INTO product_slots VALUES(79,54); +INSERT INTO product_slots VALUES(79,55); +INSERT INTO product_slots VALUES(79,56); +INSERT INTO product_slots VALUES(79,57); +INSERT INTO product_slots VALUES(79,58); +INSERT INTO product_slots VALUES(79,59); +INSERT INTO product_slots VALUES(79,60); +INSERT INTO product_slots VALUES(79,61); +INSERT INTO product_slots VALUES(79,62); +INSERT INTO product_slots VALUES(79,63); +INSERT INTO product_slots VALUES(79,64); +INSERT INTO product_slots VALUES(79,65); +INSERT INTO product_slots VALUES(79,66); +INSERT INTO product_slots VALUES(79,67); +INSERT INTO product_slots VALUES(79,68); +INSERT INTO product_slots VALUES(79,69); +INSERT INTO product_slots VALUES(79,70); +INSERT INTO product_slots VALUES(79,71); +INSERT INTO product_slots VALUES(79,72); +INSERT INTO product_slots VALUES(79,73); +INSERT INTO product_slots VALUES(79,74); +INSERT INTO product_slots VALUES(79,75); +INSERT INTO product_slots VALUES(79,76); +INSERT INTO product_slots VALUES(79,77); +INSERT INTO product_slots VALUES(79,78); +INSERT INTO product_slots VALUES(79,79); +INSERT INTO product_slots VALUES(79,80); +INSERT INTO product_slots VALUES(79,81); +INSERT INTO product_slots VALUES(79,82); +INSERT INTO product_slots VALUES(79,83); +INSERT INTO product_slots VALUES(79,84); +INSERT INTO product_slots VALUES(79,85); +INSERT INTO product_slots VALUES(79,86); +INSERT INTO product_slots VALUES(79,87); +INSERT INTO product_slots VALUES(79,88); +INSERT INTO product_slots VALUES(79,89); +INSERT INTO product_slots VALUES(79,90); +INSERT INTO product_slots VALUES(79,91); +INSERT INTO product_slots VALUES(79,92); +INSERT INTO product_slots VALUES(79,93); +INSERT INTO product_slots VALUES(79,94); +INSERT INTO product_slots VALUES(79,95); +INSERT INTO product_slots VALUES(79,96); +INSERT INTO product_slots VALUES(79,97); +INSERT INTO product_slots VALUES(79,98); +INSERT INTO product_slots VALUES(79,99); +INSERT INTO product_slots VALUES(79,100); +INSERT INTO product_slots VALUES(79,101); +INSERT INTO product_slots VALUES(79,102); +INSERT INTO product_slots VALUES(79,103); +INSERT INTO product_slots VALUES(79,104); +INSERT INTO product_slots VALUES(79,105); +INSERT INTO product_slots VALUES(79,106); +INSERT INTO product_slots VALUES(79,107); +INSERT INTO product_slots VALUES(79,108); +INSERT INTO product_slots VALUES(79,109); +INSERT INTO product_slots VALUES(79,110); +INSERT INTO product_slots VALUES(79,111); +INSERT INTO product_slots VALUES(79,112); +INSERT INTO product_slots VALUES(79,113); +INSERT INTO product_slots VALUES(79,114); +INSERT INTO product_slots VALUES(79,115); +INSERT INTO product_slots VALUES(79,116); +INSERT INTO product_slots VALUES(79,117); +INSERT INTO product_slots VALUES(79,118); +INSERT INTO product_slots VALUES(79,119); +INSERT INTO product_slots VALUES(79,120); +INSERT INTO product_slots VALUES(79,121); +INSERT INTO product_slots VALUES(79,122); +INSERT INTO product_slots VALUES(79,123); +INSERT INTO product_slots VALUES(79,124); +INSERT INTO product_slots VALUES(79,125); +INSERT INTO product_slots VALUES(79,126); +INSERT INTO product_slots VALUES(79,127); +INSERT INTO product_slots VALUES(79,128); +INSERT INTO product_slots VALUES(79,129); +INSERT INTO product_slots VALUES(79,130); +INSERT INTO product_slots VALUES(79,131); +INSERT INTO product_slots VALUES(79,132); +INSERT INTO product_slots VALUES(79,133); +INSERT INTO product_slots VALUES(79,134); +INSERT INTO product_slots VALUES(79,135); +INSERT INTO product_slots VALUES(79,136); +INSERT INTO product_slots VALUES(79,137); +INSERT INTO product_slots VALUES(79,138); +INSERT INTO product_slots VALUES(79,139); +INSERT INTO product_slots VALUES(79,140); +INSERT INTO product_slots VALUES(79,141); +INSERT INTO product_slots VALUES(79,142); +INSERT INTO product_slots VALUES(79,143); +INSERT INTO product_slots VALUES(79,144); +INSERT INTO product_slots VALUES(79,145); +INSERT INTO product_slots VALUES(79,146); +INSERT INTO product_slots VALUES(79,147); +INSERT INTO product_slots VALUES(79,148); +INSERT INTO product_slots VALUES(79,149); +INSERT INTO product_slots VALUES(79,150); +INSERT INTO product_slots VALUES(79,151); +INSERT INTO product_slots VALUES(79,152); +INSERT INTO product_slots VALUES(79,153); +INSERT INTO product_slots VALUES(79,154); +INSERT INTO product_slots VALUES(79,155); +INSERT INTO product_slots VALUES(79,156); +INSERT INTO product_slots VALUES(79,157); +INSERT INTO product_slots VALUES(79,158); +INSERT INTO product_slots VALUES(79,159); +INSERT INTO product_slots VALUES(79,160); +INSERT INTO product_slots VALUES(79,161); +INSERT INTO product_slots VALUES(79,162); +INSERT INTO product_slots VALUES(79,163); +INSERT INTO product_slots VALUES(79,164); +INSERT INTO product_slots VALUES(79,165); +INSERT INTO product_slots VALUES(79,166); +INSERT INTO product_slots VALUES(79,167); +INSERT INTO product_slots VALUES(79,168); +INSERT INTO product_slots VALUES(79,169); +INSERT INTO product_slots VALUES(79,170); +INSERT INTO product_slots VALUES(79,171); +INSERT INTO product_slots VALUES(79,172); +INSERT INTO product_slots VALUES(79,173); +INSERT INTO product_slots VALUES(79,174); +INSERT INTO product_slots VALUES(79,175); +INSERT INTO product_slots VALUES(79,176); +INSERT INTO product_slots VALUES(79,177); +INSERT INTO product_slots VALUES(79,178); +INSERT INTO product_slots VALUES(79,179); +INSERT INTO product_slots VALUES(79,180); +INSERT INTO product_slots VALUES(79,181); +INSERT INTO product_slots VALUES(79,182); +INSERT INTO product_slots VALUES(79,183); +INSERT INTO product_slots VALUES(79,184); +INSERT INTO product_slots VALUES(79,185); +INSERT INTO product_slots VALUES(79,186); +INSERT INTO product_slots VALUES(79,187); +INSERT INTO product_slots VALUES(79,188); +INSERT INTO product_slots VALUES(79,189); +INSERT INTO product_slots VALUES(79,190); +INSERT INTO product_slots VALUES(79,191); +INSERT INTO product_slots VALUES(79,192); +INSERT INTO product_slots VALUES(79,193); +INSERT INTO product_slots VALUES(79,194); +INSERT INTO product_slots VALUES(79,195); +INSERT INTO product_slots VALUES(79,196); +INSERT INTO product_slots VALUES(79,197); +INSERT INTO product_slots VALUES(79,198); +INSERT INTO product_slots VALUES(79,199); +INSERT INTO product_slots VALUES(79,200); +INSERT INTO product_slots VALUES(79,201); +INSERT INTO product_slots VALUES(79,202); +INSERT INTO product_slots VALUES(79,203); +INSERT INTO product_slots VALUES(79,204); +INSERT INTO product_slots VALUES(79,205); +INSERT INTO product_slots VALUES(79,206); +INSERT INTO product_slots VALUES(79,207); +INSERT INTO product_slots VALUES(79,208); +INSERT INTO product_slots VALUES(79,209); +INSERT INTO product_slots VALUES(79,210); +INSERT INTO product_slots VALUES(79,211); +INSERT INTO product_slots VALUES(79,212); +INSERT INTO product_slots VALUES(79,213); +INSERT INTO product_slots VALUES(79,214); +INSERT INTO product_slots VALUES(79,215); +INSERT INTO product_slots VALUES(79,216); +INSERT INTO product_slots VALUES(79,217); +INSERT INTO product_slots VALUES(79,218); +INSERT INTO product_slots VALUES(79,219); +INSERT INTO product_slots VALUES(79,220); +INSERT INTO product_slots VALUES(79,221); +INSERT INTO product_slots VALUES(79,222); +INSERT INTO product_slots VALUES(79,223); +INSERT INTO product_slots VALUES(79,224); +INSERT INTO product_slots VALUES(79,225); +INSERT INTO product_slots VALUES(79,226); +INSERT INTO product_slots VALUES(79,227); +INSERT INTO product_slots VALUES(79,228); +INSERT INTO product_slots VALUES(79,229); +INSERT INTO product_slots VALUES(79,230); +INSERT INTO product_slots VALUES(79,231); +INSERT INTO product_slots VALUES(79,232); +INSERT INTO product_slots VALUES(79,233); +INSERT INTO product_slots VALUES(79,234); +INSERT INTO product_slots VALUES(79,235); +INSERT INTO product_slots VALUES(79,236); +INSERT INTO product_slots VALUES(79,237); +INSERT INTO product_slots VALUES(79,238); +INSERT INTO product_slots VALUES(79,239); +INSERT INTO product_slots VALUES(79,240); +INSERT INTO product_slots VALUES(79,241); +INSERT INTO product_slots VALUES(79,242); +INSERT INTO product_slots VALUES(79,243); +INSERT INTO product_slots VALUES(79,244); +INSERT INTO product_slots VALUES(79,274); +INSERT INTO product_slots VALUES(79,275); +INSERT INTO product_slots VALUES(79,279); +INSERT INTO product_slots VALUES(79,280); +INSERT INTO product_slots VALUES(79,281); +INSERT INTO product_slots VALUES(79,282); +INSERT INTO product_slots VALUES(79,283); +INSERT INTO product_slots VALUES(79,284); +INSERT INTO product_slots VALUES(79,285); +INSERT INTO product_slots VALUES(79,286); +INSERT INTO product_slots VALUES(79,287); +INSERT INTO product_slots VALUES(80,39); +INSERT INTO product_slots VALUES(80,41); +INSERT INTO product_slots VALUES(80,43); +INSERT INTO product_slots VALUES(80,45); +INSERT INTO product_slots VALUES(80,46); +INSERT INTO product_slots VALUES(80,47); +INSERT INTO product_slots VALUES(80,48); +INSERT INTO product_slots VALUES(80,49); +INSERT INTO product_slots VALUES(80,50); +INSERT INTO product_slots VALUES(80,51); +INSERT INTO product_slots VALUES(80,52); +INSERT INTO product_slots VALUES(80,53); +INSERT INTO product_slots VALUES(80,54); +INSERT INTO product_slots VALUES(80,55); +INSERT INTO product_slots VALUES(80,56); +INSERT INTO product_slots VALUES(80,57); +INSERT INTO product_slots VALUES(80,58); +INSERT INTO product_slots VALUES(80,59); +INSERT INTO product_slots VALUES(80,60); +INSERT INTO product_slots VALUES(80,61); +INSERT INTO product_slots VALUES(80,64); +INSERT INTO product_slots VALUES(80,65); +INSERT INTO product_slots VALUES(80,66); +INSERT INTO product_slots VALUES(80,67); +INSERT INTO product_slots VALUES(80,68); +INSERT INTO product_slots VALUES(80,69); +INSERT INTO product_slots VALUES(80,70); +INSERT INTO product_slots VALUES(80,71); +INSERT INTO product_slots VALUES(80,72); +INSERT INTO product_slots VALUES(80,73); +INSERT INTO product_slots VALUES(80,74); +INSERT INTO product_slots VALUES(80,75); +INSERT INTO product_slots VALUES(80,76); +INSERT INTO product_slots VALUES(80,77); +INSERT INTO product_slots VALUES(80,78); +INSERT INTO product_slots VALUES(80,79); +INSERT INTO product_slots VALUES(80,80); +INSERT INTO product_slots VALUES(80,81); +INSERT INTO product_slots VALUES(80,82); +INSERT INTO product_slots VALUES(80,83); +INSERT INTO product_slots VALUES(80,84); +INSERT INTO product_slots VALUES(80,85); +INSERT INTO product_slots VALUES(80,86); +INSERT INTO product_slots VALUES(80,87); +INSERT INTO product_slots VALUES(80,88); +INSERT INTO product_slots VALUES(80,89); +INSERT INTO product_slots VALUES(80,90); +INSERT INTO product_slots VALUES(80,91); +INSERT INTO product_slots VALUES(80,92); +INSERT INTO product_slots VALUES(80,93); +INSERT INTO product_slots VALUES(80,94); +INSERT INTO product_slots VALUES(80,95); +INSERT INTO product_slots VALUES(80,96); +INSERT INTO product_slots VALUES(80,97); +INSERT INTO product_slots VALUES(80,98); +INSERT INTO product_slots VALUES(80,99); +INSERT INTO product_slots VALUES(80,100); +INSERT INTO product_slots VALUES(80,101); +INSERT INTO product_slots VALUES(80,102); +INSERT INTO product_slots VALUES(80,103); +INSERT INTO product_slots VALUES(80,104); +INSERT INTO product_slots VALUES(80,105); +INSERT INTO product_slots VALUES(80,106); +INSERT INTO product_slots VALUES(80,107); +INSERT INTO product_slots VALUES(80,108); +INSERT INTO product_slots VALUES(80,109); +INSERT INTO product_slots VALUES(80,110); +INSERT INTO product_slots VALUES(80,111); +INSERT INTO product_slots VALUES(80,112); +INSERT INTO product_slots VALUES(80,113); +INSERT INTO product_slots VALUES(80,114); +INSERT INTO product_slots VALUES(80,115); +INSERT INTO product_slots VALUES(80,116); +INSERT INTO product_slots VALUES(80,117); +INSERT INTO product_slots VALUES(80,118); +INSERT INTO product_slots VALUES(80,119); +INSERT INTO product_slots VALUES(80,120); +INSERT INTO product_slots VALUES(80,121); +INSERT INTO product_slots VALUES(80,122); +INSERT INTO product_slots VALUES(80,123); +INSERT INTO product_slots VALUES(80,124); +INSERT INTO product_slots VALUES(80,125); +INSERT INTO product_slots VALUES(80,126); +INSERT INTO product_slots VALUES(80,127); +INSERT INTO product_slots VALUES(80,128); +INSERT INTO product_slots VALUES(80,129); +INSERT INTO product_slots VALUES(80,130); +INSERT INTO product_slots VALUES(80,131); +INSERT INTO product_slots VALUES(80,132); +INSERT INTO product_slots VALUES(80,133); +INSERT INTO product_slots VALUES(80,134); +INSERT INTO product_slots VALUES(80,135); +INSERT INTO product_slots VALUES(80,136); +INSERT INTO product_slots VALUES(80,137); +INSERT INTO product_slots VALUES(80,138); +INSERT INTO product_slots VALUES(80,139); +INSERT INTO product_slots VALUES(80,140); +INSERT INTO product_slots VALUES(80,141); +INSERT INTO product_slots VALUES(80,142); +INSERT INTO product_slots VALUES(80,143); +INSERT INTO product_slots VALUES(80,144); +INSERT INTO product_slots VALUES(80,145); +INSERT INTO product_slots VALUES(80,146); +INSERT INTO product_slots VALUES(80,147); +INSERT INTO product_slots VALUES(80,148); +INSERT INTO product_slots VALUES(80,149); +INSERT INTO product_slots VALUES(80,150); +INSERT INTO product_slots VALUES(80,151); +INSERT INTO product_slots VALUES(80,152); +INSERT INTO product_slots VALUES(80,153); +INSERT INTO product_slots VALUES(80,154); +INSERT INTO product_slots VALUES(80,155); +INSERT INTO product_slots VALUES(80,156); +INSERT INTO product_slots VALUES(80,157); +INSERT INTO product_slots VALUES(80,158); +INSERT INTO product_slots VALUES(80,159); +INSERT INTO product_slots VALUES(80,160); +INSERT INTO product_slots VALUES(80,161); +INSERT INTO product_slots VALUES(80,162); +INSERT INTO product_slots VALUES(80,163); +INSERT INTO product_slots VALUES(80,164); +INSERT INTO product_slots VALUES(80,165); +INSERT INTO product_slots VALUES(80,166); +INSERT INTO product_slots VALUES(80,167); +INSERT INTO product_slots VALUES(80,168); +INSERT INTO product_slots VALUES(80,169); +INSERT INTO product_slots VALUES(80,170); +INSERT INTO product_slots VALUES(80,171); +INSERT INTO product_slots VALUES(80,172); +INSERT INTO product_slots VALUES(80,173); +INSERT INTO product_slots VALUES(80,174); +INSERT INTO product_slots VALUES(80,175); +INSERT INTO product_slots VALUES(80,176); +INSERT INTO product_slots VALUES(80,177); +INSERT INTO product_slots VALUES(80,178); +INSERT INTO product_slots VALUES(80,179); +INSERT INTO product_slots VALUES(80,180); +INSERT INTO product_slots VALUES(80,181); +INSERT INTO product_slots VALUES(80,182); +INSERT INTO product_slots VALUES(80,183); +INSERT INTO product_slots VALUES(80,184); +INSERT INTO product_slots VALUES(80,185); +INSERT INTO product_slots VALUES(80,186); +INSERT INTO product_slots VALUES(80,187); +INSERT INTO product_slots VALUES(80,188); +INSERT INTO product_slots VALUES(80,189); +INSERT INTO product_slots VALUES(80,190); +INSERT INTO product_slots VALUES(80,191); +INSERT INTO product_slots VALUES(80,192); +INSERT INTO product_slots VALUES(80,193); +INSERT INTO product_slots VALUES(80,194); +INSERT INTO product_slots VALUES(80,195); +INSERT INTO product_slots VALUES(80,196); +INSERT INTO product_slots VALUES(80,197); +INSERT INTO product_slots VALUES(80,198); +INSERT INTO product_slots VALUES(80,199); +INSERT INTO product_slots VALUES(80,200); +INSERT INTO product_slots VALUES(80,201); +INSERT INTO product_slots VALUES(80,202); +INSERT INTO product_slots VALUES(80,203); +INSERT INTO product_slots VALUES(80,204); +INSERT INTO product_slots VALUES(80,205); +INSERT INTO product_slots VALUES(80,206); +INSERT INTO product_slots VALUES(80,207); +INSERT INTO product_slots VALUES(80,208); +INSERT INTO product_slots VALUES(80,209); +INSERT INTO product_slots VALUES(80,210); +INSERT INTO product_slots VALUES(80,211); +INSERT INTO product_slots VALUES(80,212); +INSERT INTO product_slots VALUES(80,213); +INSERT INTO product_slots VALUES(80,214); +INSERT INTO product_slots VALUES(80,215); +INSERT INTO product_slots VALUES(80,216); +INSERT INTO product_slots VALUES(80,217); +INSERT INTO product_slots VALUES(80,218); +INSERT INTO product_slots VALUES(80,219); +INSERT INTO product_slots VALUES(80,220); +INSERT INTO product_slots VALUES(80,221); +INSERT INTO product_slots VALUES(80,222); +INSERT INTO product_slots VALUES(80,223); +INSERT INTO product_slots VALUES(80,224); +INSERT INTO product_slots VALUES(80,225); +INSERT INTO product_slots VALUES(80,226); +INSERT INTO product_slots VALUES(80,227); +INSERT INTO product_slots VALUES(80,228); +INSERT INTO product_slots VALUES(80,229); +INSERT INTO product_slots VALUES(80,230); +INSERT INTO product_slots VALUES(80,231); +INSERT INTO product_slots VALUES(80,232); +INSERT INTO product_slots VALUES(80,233); +INSERT INTO product_slots VALUES(80,234); +INSERT INTO product_slots VALUES(80,235); +INSERT INTO product_slots VALUES(80,236); +INSERT INTO product_slots VALUES(80,237); +INSERT INTO product_slots VALUES(80,238); +INSERT INTO product_slots VALUES(80,239); +INSERT INTO product_slots VALUES(80,240); +INSERT INTO product_slots VALUES(80,241); +INSERT INTO product_slots VALUES(80,242); +INSERT INTO product_slots VALUES(80,243); +INSERT INTO product_slots VALUES(80,244); +INSERT INTO product_slots VALUES(80,274); +INSERT INTO product_slots VALUES(80,275); +INSERT INTO product_slots VALUES(80,279); +INSERT INTO product_slots VALUES(80,280); +INSERT INTO product_slots VALUES(80,281); +INSERT INTO product_slots VALUES(80,282); +INSERT INTO product_slots VALUES(81,39); +INSERT INTO product_slots VALUES(81,43); +INSERT INTO product_slots VALUES(81,45); +INSERT INTO product_slots VALUES(81,48); +INSERT INTO product_slots VALUES(81,49); +INSERT INTO product_slots VALUES(81,51); +INSERT INTO product_slots VALUES(81,52); +INSERT INTO product_slots VALUES(81,57); +INSERT INTO product_slots VALUES(81,58); +INSERT INTO product_slots VALUES(81,59); +INSERT INTO product_slots VALUES(81,62); +INSERT INTO product_slots VALUES(81,63); +INSERT INTO product_slots VALUES(81,64); +INSERT INTO product_slots VALUES(81,65); +INSERT INTO product_slots VALUES(81,66); +INSERT INTO product_slots VALUES(81,67); +INSERT INTO product_slots VALUES(81,69); +INSERT INTO product_slots VALUES(81,70); +INSERT INTO product_slots VALUES(81,71); +INSERT INTO product_slots VALUES(81,72); +INSERT INTO product_slots VALUES(81,73); +INSERT INTO product_slots VALUES(81,75); +INSERT INTO product_slots VALUES(81,82); +INSERT INTO product_slots VALUES(81,83); +INSERT INTO product_slots VALUES(81,84); +INSERT INTO product_slots VALUES(81,90); +INSERT INTO product_slots VALUES(81,91); +INSERT INTO product_slots VALUES(81,97); +INSERT INTO product_slots VALUES(81,98); +INSERT INTO product_slots VALUES(81,102); +INSERT INTO product_slots VALUES(81,103); +INSERT INTO product_slots VALUES(81,104); +INSERT INTO product_slots VALUES(81,110); +INSERT INTO product_slots VALUES(81,111); +INSERT INTO product_slots VALUES(81,112); +INSERT INTO product_slots VALUES(81,116); +INSERT INTO product_slots VALUES(81,117); +INSERT INTO product_slots VALUES(81,118); +INSERT INTO product_slots VALUES(81,119); +INSERT INTO product_slots VALUES(81,120); +INSERT INTO product_slots VALUES(81,121); +INSERT INTO product_slots VALUES(81,122); +INSERT INTO product_slots VALUES(81,123); +INSERT INTO product_slots VALUES(81,124); +INSERT INTO product_slots VALUES(81,125); +INSERT INTO product_slots VALUES(81,126); +INSERT INTO product_slots VALUES(81,127); +INSERT INTO product_slots VALUES(81,128); +INSERT INTO product_slots VALUES(81,129); +INSERT INTO product_slots VALUES(81,130); +INSERT INTO product_slots VALUES(81,131); +INSERT INTO product_slots VALUES(81,132); +INSERT INTO product_slots VALUES(81,133); +INSERT INTO product_slots VALUES(81,134); +INSERT INTO product_slots VALUES(81,135); +INSERT INTO product_slots VALUES(81,136); +INSERT INTO product_slots VALUES(81,137); +INSERT INTO product_slots VALUES(81,138); +INSERT INTO product_slots VALUES(81,139); +INSERT INTO product_slots VALUES(81,140); +INSERT INTO product_slots VALUES(81,141); +INSERT INTO product_slots VALUES(81,142); +INSERT INTO product_slots VALUES(81,143); +INSERT INTO product_slots VALUES(81,144); +INSERT INTO product_slots VALUES(81,145); +INSERT INTO product_slots VALUES(81,146); +INSERT INTO product_slots VALUES(81,147); +INSERT INTO product_slots VALUES(81,148); +INSERT INTO product_slots VALUES(81,149); +INSERT INTO product_slots VALUES(81,150); +INSERT INTO product_slots VALUES(81,151); +INSERT INTO product_slots VALUES(81,152); +INSERT INTO product_slots VALUES(81,153); +INSERT INTO product_slots VALUES(81,154); +INSERT INTO product_slots VALUES(81,155); +INSERT INTO product_slots VALUES(81,156); +INSERT INTO product_slots VALUES(81,157); +INSERT INTO product_slots VALUES(81,158); +INSERT INTO product_slots VALUES(81,159); +INSERT INTO product_slots VALUES(81,160); +INSERT INTO product_slots VALUES(81,161); +INSERT INTO product_slots VALUES(81,162); +INSERT INTO product_slots VALUES(81,163); +INSERT INTO product_slots VALUES(81,164); +INSERT INTO product_slots VALUES(81,165); +INSERT INTO product_slots VALUES(81,166); +INSERT INTO product_slots VALUES(81,167); +INSERT INTO product_slots VALUES(81,168); +INSERT INTO product_slots VALUES(81,169); +INSERT INTO product_slots VALUES(81,170); +INSERT INTO product_slots VALUES(81,171); +INSERT INTO product_slots VALUES(81,172); +INSERT INTO product_slots VALUES(81,173); +INSERT INTO product_slots VALUES(81,174); +INSERT INTO product_slots VALUES(81,175); +INSERT INTO product_slots VALUES(81,176); +INSERT INTO product_slots VALUES(81,177); +INSERT INTO product_slots VALUES(81,178); +INSERT INTO product_slots VALUES(81,179); +INSERT INTO product_slots VALUES(81,180); +INSERT INTO product_slots VALUES(81,181); +INSERT INTO product_slots VALUES(81,182); +INSERT INTO product_slots VALUES(81,183); +INSERT INTO product_slots VALUES(81,184); +INSERT INTO product_slots VALUES(81,185); +INSERT INTO product_slots VALUES(81,186); +INSERT INTO product_slots VALUES(81,187); +INSERT INTO product_slots VALUES(81,188); +INSERT INTO product_slots VALUES(81,189); +INSERT INTO product_slots VALUES(81,190); +INSERT INTO product_slots VALUES(81,191); +INSERT INTO product_slots VALUES(81,192); +INSERT INTO product_slots VALUES(81,193); +INSERT INTO product_slots VALUES(81,194); +INSERT INTO product_slots VALUES(81,195); +INSERT INTO product_slots VALUES(81,196); +INSERT INTO product_slots VALUES(81,197); +INSERT INTO product_slots VALUES(81,198); +INSERT INTO product_slots VALUES(81,199); +INSERT INTO product_slots VALUES(81,200); +INSERT INTO product_slots VALUES(81,201); +INSERT INTO product_slots VALUES(81,202); +INSERT INTO product_slots VALUES(81,203); +INSERT INTO product_slots VALUES(81,204); +INSERT INTO product_slots VALUES(81,205); +INSERT INTO product_slots VALUES(81,206); +INSERT INTO product_slots VALUES(81,207); +INSERT INTO product_slots VALUES(81,208); +INSERT INTO product_slots VALUES(81,209); +INSERT INTO product_slots VALUES(81,210); +INSERT INTO product_slots VALUES(81,211); +INSERT INTO product_slots VALUES(81,212); +INSERT INTO product_slots VALUES(81,213); +INSERT INTO product_slots VALUES(81,214); +INSERT INTO product_slots VALUES(81,215); +INSERT INTO product_slots VALUES(81,216); +INSERT INTO product_slots VALUES(81,217); +INSERT INTO product_slots VALUES(81,218); +INSERT INTO product_slots VALUES(81,219); +INSERT INTO product_slots VALUES(81,220); +INSERT INTO product_slots VALUES(81,221); +INSERT INTO product_slots VALUES(81,222); +INSERT INTO product_slots VALUES(81,223); +INSERT INTO product_slots VALUES(81,224); +INSERT INTO product_slots VALUES(81,225); +INSERT INTO product_slots VALUES(81,226); +INSERT INTO product_slots VALUES(81,227); +INSERT INTO product_slots VALUES(81,228); +INSERT INTO product_slots VALUES(81,229); +INSERT INTO product_slots VALUES(81,230); +INSERT INTO product_slots VALUES(81,231); +INSERT INTO product_slots VALUES(81,232); +INSERT INTO product_slots VALUES(81,233); +INSERT INTO product_slots VALUES(81,234); +INSERT INTO product_slots VALUES(81,235); +INSERT INTO product_slots VALUES(81,236); +INSERT INTO product_slots VALUES(81,237); +INSERT INTO product_slots VALUES(81,238); +INSERT INTO product_slots VALUES(81,239); +INSERT INTO product_slots VALUES(81,240); +INSERT INTO product_slots VALUES(81,241); +INSERT INTO product_slots VALUES(81,242); +INSERT INTO product_slots VALUES(81,243); +INSERT INTO product_slots VALUES(81,244); +INSERT INTO product_slots VALUES(81,274); +INSERT INTO product_slots VALUES(81,275); +INSERT INTO product_slots VALUES(81,279); +INSERT INTO product_slots VALUES(81,280); +INSERT INTO product_slots VALUES(81,281); +INSERT INTO product_slots VALUES(81,282); +INSERT INTO product_slots VALUES(81,283); +INSERT INTO product_slots VALUES(81,284); +INSERT INTO product_slots VALUES(81,285); +INSERT INTO product_slots VALUES(81,286); +INSERT INTO product_slots VALUES(81,287); +INSERT INTO product_slots VALUES(82,39); +INSERT INTO product_slots VALUES(82,43); +INSERT INTO product_slots VALUES(82,45); +INSERT INTO product_slots VALUES(82,48); +INSERT INTO product_slots VALUES(82,49); +INSERT INTO product_slots VALUES(82,51); +INSERT INTO product_slots VALUES(82,52); +INSERT INTO product_slots VALUES(82,57); +INSERT INTO product_slots VALUES(82,58); +INSERT INTO product_slots VALUES(82,59); +INSERT INTO product_slots VALUES(82,62); +INSERT INTO product_slots VALUES(82,63); +INSERT INTO product_slots VALUES(82,64); +INSERT INTO product_slots VALUES(82,65); +INSERT INTO product_slots VALUES(82,66); +INSERT INTO product_slots VALUES(82,67); +INSERT INTO product_slots VALUES(82,69); +INSERT INTO product_slots VALUES(82,70); +INSERT INTO product_slots VALUES(82,71); +INSERT INTO product_slots VALUES(82,72); +INSERT INTO product_slots VALUES(82,73); +INSERT INTO product_slots VALUES(82,75); +INSERT INTO product_slots VALUES(82,82); +INSERT INTO product_slots VALUES(82,83); +INSERT INTO product_slots VALUES(82,84); +INSERT INTO product_slots VALUES(82,90); +INSERT INTO product_slots VALUES(82,91); +INSERT INTO product_slots VALUES(82,92); +INSERT INTO product_slots VALUES(82,93); +INSERT INTO product_slots VALUES(82,94); +INSERT INTO product_slots VALUES(82,97); +INSERT INTO product_slots VALUES(82,98); +INSERT INTO product_slots VALUES(82,99); +INSERT INTO product_slots VALUES(82,100); +INSERT INTO product_slots VALUES(82,102); +INSERT INTO product_slots VALUES(82,103); +INSERT INTO product_slots VALUES(82,104); +INSERT INTO product_slots VALUES(82,110); +INSERT INTO product_slots VALUES(82,111); +INSERT INTO product_slots VALUES(82,112); +INSERT INTO product_slots VALUES(82,116); +INSERT INTO product_slots VALUES(82,117); +INSERT INTO product_slots VALUES(82,118); +INSERT INTO product_slots VALUES(82,119); +INSERT INTO product_slots VALUES(82,120); +INSERT INTO product_slots VALUES(82,121); +INSERT INTO product_slots VALUES(82,122); +INSERT INTO product_slots VALUES(82,123); +INSERT INTO product_slots VALUES(82,124); +INSERT INTO product_slots VALUES(82,125); +INSERT INTO product_slots VALUES(82,126); +INSERT INTO product_slots VALUES(82,127); +INSERT INTO product_slots VALUES(82,128); +INSERT INTO product_slots VALUES(82,129); +INSERT INTO product_slots VALUES(82,130); +INSERT INTO product_slots VALUES(82,131); +INSERT INTO product_slots VALUES(82,132); +INSERT INTO product_slots VALUES(82,133); +INSERT INTO product_slots VALUES(82,134); +INSERT INTO product_slots VALUES(82,135); +INSERT INTO product_slots VALUES(82,136); +INSERT INTO product_slots VALUES(82,137); +INSERT INTO product_slots VALUES(82,138); +INSERT INTO product_slots VALUES(82,139); +INSERT INTO product_slots VALUES(82,140); +INSERT INTO product_slots VALUES(82,141); +INSERT INTO product_slots VALUES(82,142); +INSERT INTO product_slots VALUES(82,143); +INSERT INTO product_slots VALUES(82,144); +INSERT INTO product_slots VALUES(82,145); +INSERT INTO product_slots VALUES(82,146); +INSERT INTO product_slots VALUES(82,147); +INSERT INTO product_slots VALUES(82,148); +INSERT INTO product_slots VALUES(82,149); +INSERT INTO product_slots VALUES(82,150); +INSERT INTO product_slots VALUES(82,151); +INSERT INTO product_slots VALUES(82,152); +INSERT INTO product_slots VALUES(82,153); +INSERT INTO product_slots VALUES(82,154); +INSERT INTO product_slots VALUES(82,155); +INSERT INTO product_slots VALUES(82,156); +INSERT INTO product_slots VALUES(82,157); +INSERT INTO product_slots VALUES(82,158); +INSERT INTO product_slots VALUES(82,159); +INSERT INTO product_slots VALUES(82,160); +INSERT INTO product_slots VALUES(82,161); +INSERT INTO product_slots VALUES(82,162); +INSERT INTO product_slots VALUES(82,163); +INSERT INTO product_slots VALUES(82,164); +INSERT INTO product_slots VALUES(82,165); +INSERT INTO product_slots VALUES(82,166); +INSERT INTO product_slots VALUES(82,167); +INSERT INTO product_slots VALUES(82,168); +INSERT INTO product_slots VALUES(82,169); +INSERT INTO product_slots VALUES(82,170); +INSERT INTO product_slots VALUES(82,171); +INSERT INTO product_slots VALUES(82,172); +INSERT INTO product_slots VALUES(82,173); +INSERT INTO product_slots VALUES(82,174); +INSERT INTO product_slots VALUES(82,175); +INSERT INTO product_slots VALUES(82,176); +INSERT INTO product_slots VALUES(82,177); +INSERT INTO product_slots VALUES(82,178); +INSERT INTO product_slots VALUES(82,179); +INSERT INTO product_slots VALUES(82,180); +INSERT INTO product_slots VALUES(82,181); +INSERT INTO product_slots VALUES(82,182); +INSERT INTO product_slots VALUES(82,183); +INSERT INTO product_slots VALUES(82,184); +INSERT INTO product_slots VALUES(82,185); +INSERT INTO product_slots VALUES(82,186); +INSERT INTO product_slots VALUES(82,187); +INSERT INTO product_slots VALUES(82,188); +INSERT INTO product_slots VALUES(82,189); +INSERT INTO product_slots VALUES(82,190); +INSERT INTO product_slots VALUES(82,191); +INSERT INTO product_slots VALUES(82,192); +INSERT INTO product_slots VALUES(82,193); +INSERT INTO product_slots VALUES(82,194); +INSERT INTO product_slots VALUES(82,195); +INSERT INTO product_slots VALUES(82,196); +INSERT INTO product_slots VALUES(82,197); +INSERT INTO product_slots VALUES(82,198); +INSERT INTO product_slots VALUES(82,199); +INSERT INTO product_slots VALUES(82,200); +INSERT INTO product_slots VALUES(82,201); +INSERT INTO product_slots VALUES(82,202); +INSERT INTO product_slots VALUES(82,203); +INSERT INTO product_slots VALUES(82,204); +INSERT INTO product_slots VALUES(82,205); +INSERT INTO product_slots VALUES(82,206); +INSERT INTO product_slots VALUES(82,207); +INSERT INTO product_slots VALUES(82,208); +INSERT INTO product_slots VALUES(82,209); +INSERT INTO product_slots VALUES(82,210); +INSERT INTO product_slots VALUES(82,211); +INSERT INTO product_slots VALUES(82,212); +INSERT INTO product_slots VALUES(82,213); +INSERT INTO product_slots VALUES(82,214); +INSERT INTO product_slots VALUES(82,215); +INSERT INTO product_slots VALUES(82,216); +INSERT INTO product_slots VALUES(82,217); +INSERT INTO product_slots VALUES(82,218); +INSERT INTO product_slots VALUES(82,219); +INSERT INTO product_slots VALUES(82,220); +INSERT INTO product_slots VALUES(82,221); +INSERT INTO product_slots VALUES(82,222); +INSERT INTO product_slots VALUES(82,223); +INSERT INTO product_slots VALUES(82,224); +INSERT INTO product_slots VALUES(82,225); +INSERT INTO product_slots VALUES(82,226); +INSERT INTO product_slots VALUES(82,227); +INSERT INTO product_slots VALUES(82,228); +INSERT INTO product_slots VALUES(82,229); +INSERT INTO product_slots VALUES(82,230); +INSERT INTO product_slots VALUES(82,231); +INSERT INTO product_slots VALUES(82,232); +INSERT INTO product_slots VALUES(82,233); +INSERT INTO product_slots VALUES(82,234); +INSERT INTO product_slots VALUES(82,235); +INSERT INTO product_slots VALUES(82,236); +INSERT INTO product_slots VALUES(82,237); +INSERT INTO product_slots VALUES(82,238); +INSERT INTO product_slots VALUES(82,239); +INSERT INTO product_slots VALUES(82,240); +INSERT INTO product_slots VALUES(82,241); +INSERT INTO product_slots VALUES(82,242); +INSERT INTO product_slots VALUES(82,243); +INSERT INTO product_slots VALUES(82,244); +INSERT INTO product_slots VALUES(82,274); +INSERT INTO product_slots VALUES(82,275); +INSERT INTO product_slots VALUES(82,279); +INSERT INTO product_slots VALUES(82,280); +INSERT INTO product_slots VALUES(82,281); +INSERT INTO product_slots VALUES(82,282); +INSERT INTO product_slots VALUES(82,283); +INSERT INTO product_slots VALUES(82,284); +INSERT INTO product_slots VALUES(82,285); +INSERT INTO product_slots VALUES(82,286); +INSERT INTO product_slots VALUES(82,287); +INSERT INTO product_slots VALUES(83,39); +INSERT INTO product_slots VALUES(83,43); +INSERT INTO product_slots VALUES(83,45); +INSERT INTO product_slots VALUES(83,48); +INSERT INTO product_slots VALUES(83,49); +INSERT INTO product_slots VALUES(83,51); +INSERT INTO product_slots VALUES(83,52); +INSERT INTO product_slots VALUES(83,57); +INSERT INTO product_slots VALUES(83,58); +INSERT INTO product_slots VALUES(83,59); +INSERT INTO product_slots VALUES(83,62); +INSERT INTO product_slots VALUES(83,63); +INSERT INTO product_slots VALUES(83,64); +INSERT INTO product_slots VALUES(83,65); +INSERT INTO product_slots VALUES(83,66); +INSERT INTO product_slots VALUES(83,67); +INSERT INTO product_slots VALUES(83,69); +INSERT INTO product_slots VALUES(83,70); +INSERT INTO product_slots VALUES(83,71); +INSERT INTO product_slots VALUES(83,72); +INSERT INTO product_slots VALUES(83,73); +INSERT INTO product_slots VALUES(83,75); +INSERT INTO product_slots VALUES(83,82); +INSERT INTO product_slots VALUES(83,83); +INSERT INTO product_slots VALUES(83,84); +INSERT INTO product_slots VALUES(83,90); +INSERT INTO product_slots VALUES(83,91); +INSERT INTO product_slots VALUES(83,97); +INSERT INTO product_slots VALUES(83,98); +INSERT INTO product_slots VALUES(83,102); +INSERT INTO product_slots VALUES(83,103); +INSERT INTO product_slots VALUES(83,104); +INSERT INTO product_slots VALUES(83,110); +INSERT INTO product_slots VALUES(83,111); +INSERT INTO product_slots VALUES(83,112); +INSERT INTO product_slots VALUES(83,116); +INSERT INTO product_slots VALUES(83,117); +INSERT INTO product_slots VALUES(83,118); +INSERT INTO product_slots VALUES(83,119); +INSERT INTO product_slots VALUES(83,120); +INSERT INTO product_slots VALUES(83,121); +INSERT INTO product_slots VALUES(83,122); +INSERT INTO product_slots VALUES(83,123); +INSERT INTO product_slots VALUES(83,124); +INSERT INTO product_slots VALUES(83,125); +INSERT INTO product_slots VALUES(83,126); +INSERT INTO product_slots VALUES(83,127); +INSERT INTO product_slots VALUES(83,128); +INSERT INTO product_slots VALUES(83,129); +INSERT INTO product_slots VALUES(83,130); +INSERT INTO product_slots VALUES(83,131); +INSERT INTO product_slots VALUES(83,132); +INSERT INTO product_slots VALUES(83,133); +INSERT INTO product_slots VALUES(83,134); +INSERT INTO product_slots VALUES(83,135); +INSERT INTO product_slots VALUES(83,136); +INSERT INTO product_slots VALUES(83,137); +INSERT INTO product_slots VALUES(83,138); +INSERT INTO product_slots VALUES(83,139); +INSERT INTO product_slots VALUES(83,140); +INSERT INTO product_slots VALUES(83,141); +INSERT INTO product_slots VALUES(83,142); +INSERT INTO product_slots VALUES(83,143); +INSERT INTO product_slots VALUES(83,144); +INSERT INTO product_slots VALUES(83,145); +INSERT INTO product_slots VALUES(83,146); +INSERT INTO product_slots VALUES(83,147); +INSERT INTO product_slots VALUES(83,148); +INSERT INTO product_slots VALUES(83,149); +INSERT INTO product_slots VALUES(83,150); +INSERT INTO product_slots VALUES(83,151); +INSERT INTO product_slots VALUES(83,152); +INSERT INTO product_slots VALUES(83,153); +INSERT INTO product_slots VALUES(83,154); +INSERT INTO product_slots VALUES(83,155); +INSERT INTO product_slots VALUES(83,156); +INSERT INTO product_slots VALUES(83,157); +INSERT INTO product_slots VALUES(83,158); +INSERT INTO product_slots VALUES(83,159); +INSERT INTO product_slots VALUES(83,160); +INSERT INTO product_slots VALUES(83,161); +INSERT INTO product_slots VALUES(83,162); +INSERT INTO product_slots VALUES(83,163); +INSERT INTO product_slots VALUES(83,164); +INSERT INTO product_slots VALUES(83,165); +INSERT INTO product_slots VALUES(83,166); +INSERT INTO product_slots VALUES(83,167); +INSERT INTO product_slots VALUES(83,168); +INSERT INTO product_slots VALUES(83,169); +INSERT INTO product_slots VALUES(83,170); +INSERT INTO product_slots VALUES(83,171); +INSERT INTO product_slots VALUES(83,172); +INSERT INTO product_slots VALUES(83,173); +INSERT INTO product_slots VALUES(83,174); +INSERT INTO product_slots VALUES(83,175); +INSERT INTO product_slots VALUES(83,176); +INSERT INTO product_slots VALUES(83,177); +INSERT INTO product_slots VALUES(83,178); +INSERT INTO product_slots VALUES(83,179); +INSERT INTO product_slots VALUES(83,180); +INSERT INTO product_slots VALUES(83,181); +INSERT INTO product_slots VALUES(83,182); +INSERT INTO product_slots VALUES(83,183); +INSERT INTO product_slots VALUES(83,184); +INSERT INTO product_slots VALUES(83,185); +INSERT INTO product_slots VALUES(83,186); +INSERT INTO product_slots VALUES(83,187); +INSERT INTO product_slots VALUES(83,188); +INSERT INTO product_slots VALUES(83,189); +INSERT INTO product_slots VALUES(83,190); +INSERT INTO product_slots VALUES(83,191); +INSERT INTO product_slots VALUES(83,192); +INSERT INTO product_slots VALUES(83,193); +INSERT INTO product_slots VALUES(83,194); +INSERT INTO product_slots VALUES(83,195); +INSERT INTO product_slots VALUES(83,196); +INSERT INTO product_slots VALUES(83,197); +INSERT INTO product_slots VALUES(83,198); +INSERT INTO product_slots VALUES(83,199); +INSERT INTO product_slots VALUES(83,200); +INSERT INTO product_slots VALUES(83,201); +INSERT INTO product_slots VALUES(83,202); +INSERT INTO product_slots VALUES(83,203); +INSERT INTO product_slots VALUES(83,204); +INSERT INTO product_slots VALUES(83,205); +INSERT INTO product_slots VALUES(83,206); +INSERT INTO product_slots VALUES(83,207); +INSERT INTO product_slots VALUES(83,208); +INSERT INTO product_slots VALUES(83,209); +INSERT INTO product_slots VALUES(83,210); +INSERT INTO product_slots VALUES(83,211); +INSERT INTO product_slots VALUES(83,212); +INSERT INTO product_slots VALUES(83,213); +INSERT INTO product_slots VALUES(83,214); +INSERT INTO product_slots VALUES(83,215); +INSERT INTO product_slots VALUES(83,216); +INSERT INTO product_slots VALUES(83,217); +INSERT INTO product_slots VALUES(83,218); +INSERT INTO product_slots VALUES(83,219); +INSERT INTO product_slots VALUES(83,220); +INSERT INTO product_slots VALUES(83,221); +INSERT INTO product_slots VALUES(83,222); +INSERT INTO product_slots VALUES(83,223); +INSERT INTO product_slots VALUES(83,224); +INSERT INTO product_slots VALUES(83,225); +INSERT INTO product_slots VALUES(83,226); +INSERT INTO product_slots VALUES(83,227); +INSERT INTO product_slots VALUES(83,228); +INSERT INTO product_slots VALUES(83,229); +INSERT INTO product_slots VALUES(83,230); +INSERT INTO product_slots VALUES(83,231); +INSERT INTO product_slots VALUES(83,232); +INSERT INTO product_slots VALUES(83,233); +INSERT INTO product_slots VALUES(83,234); +INSERT INTO product_slots VALUES(83,235); +INSERT INTO product_slots VALUES(83,236); +INSERT INTO product_slots VALUES(83,237); +INSERT INTO product_slots VALUES(83,238); +INSERT INTO product_slots VALUES(83,239); +INSERT INTO product_slots VALUES(83,240); +INSERT INTO product_slots VALUES(83,241); +INSERT INTO product_slots VALUES(83,242); +INSERT INTO product_slots VALUES(83,243); +INSERT INTO product_slots VALUES(83,244); +INSERT INTO product_slots VALUES(83,274); +INSERT INTO product_slots VALUES(83,275); +INSERT INTO product_slots VALUES(83,279); +INSERT INTO product_slots VALUES(83,280); +INSERT INTO product_slots VALUES(83,281); +INSERT INTO product_slots VALUES(83,282); +INSERT INTO product_slots VALUES(83,283); +INSERT INTO product_slots VALUES(83,284); +INSERT INTO product_slots VALUES(83,285); +INSERT INTO product_slots VALUES(83,286); +INSERT INTO product_slots VALUES(83,287); +INSERT INTO product_slots VALUES(85,81); +INSERT INTO product_slots VALUES(85,82); +INSERT INTO product_slots VALUES(85,83); +INSERT INTO product_slots VALUES(85,91); +INSERT INTO product_slots VALUES(85,92); +INSERT INTO product_slots VALUES(85,93); +INSERT INTO product_slots VALUES(85,94); +INSERT INTO product_slots VALUES(85,98); +INSERT INTO product_slots VALUES(85,99); +INSERT INTO product_slots VALUES(85,100); +INSERT INTO product_slots VALUES(85,105); +INSERT INTO product_slots VALUES(85,106); +INSERT INTO product_slots VALUES(85,107); +INSERT INTO product_slots VALUES(85,108); +INSERT INTO product_slots VALUES(85,109); +INSERT INTO product_slots VALUES(85,110); +INSERT INTO product_slots VALUES(85,111); +INSERT INTO product_slots VALUES(85,112); +INSERT INTO product_slots VALUES(85,113); +INSERT INTO product_slots VALUES(85,114); +INSERT INTO product_slots VALUES(85,115); +INSERT INTO product_slots VALUES(85,120); +INSERT INTO product_slots VALUES(85,134); +INSERT INTO product_slots VALUES(85,135); +INSERT INTO product_slots VALUES(85,136); +INSERT INTO product_slots VALUES(85,187); +INSERT INTO product_slots VALUES(86,39); +INSERT INTO product_slots VALUES(86,41); +INSERT INTO product_slots VALUES(86,43); +INSERT INTO product_slots VALUES(86,45); +INSERT INTO product_slots VALUES(86,46); +INSERT INTO product_slots VALUES(86,47); +INSERT INTO product_slots VALUES(86,48); +INSERT INTO product_slots VALUES(86,49); +INSERT INTO product_slots VALUES(86,50); +INSERT INTO product_slots VALUES(86,51); +INSERT INTO product_slots VALUES(86,52); +INSERT INTO product_slots VALUES(86,53); +INSERT INTO product_slots VALUES(86,54); +INSERT INTO product_slots VALUES(86,55); +INSERT INTO product_slots VALUES(86,56); +INSERT INTO product_slots VALUES(86,57); +INSERT INTO product_slots VALUES(86,58); +INSERT INTO product_slots VALUES(86,59); +INSERT INTO product_slots VALUES(86,60); +INSERT INTO product_slots VALUES(86,61); +INSERT INTO product_slots VALUES(86,62); +INSERT INTO product_slots VALUES(86,63); +INSERT INTO product_slots VALUES(86,64); +INSERT INTO product_slots VALUES(86,65); +INSERT INTO product_slots VALUES(86,66); +INSERT INTO product_slots VALUES(86,67); +INSERT INTO product_slots VALUES(86,68); +INSERT INTO product_slots VALUES(86,69); +INSERT INTO product_slots VALUES(86,70); +INSERT INTO product_slots VALUES(86,71); +INSERT INTO product_slots VALUES(86,74); +INSERT INTO product_slots VALUES(86,75); +INSERT INTO product_slots VALUES(86,76); +INSERT INTO product_slots VALUES(86,77); +INSERT INTO product_slots VALUES(86,78); +INSERT INTO product_slots VALUES(86,81); +INSERT INTO product_slots VALUES(86,82); +INSERT INTO product_slots VALUES(86,83); +INSERT INTO product_slots VALUES(86,84); +INSERT INTO product_slots VALUES(86,87); +INSERT INTO product_slots VALUES(86,88); +INSERT INTO product_slots VALUES(86,90); +INSERT INTO product_slots VALUES(86,91); +INSERT INTO product_slots VALUES(86,95); +INSERT INTO product_slots VALUES(86,97); +INSERT INTO product_slots VALUES(86,98); +INSERT INTO product_slots VALUES(86,101); +INSERT INTO product_slots VALUES(86,102); +INSERT INTO product_slots VALUES(86,103); +INSERT INTO product_slots VALUES(86,104); +INSERT INTO product_slots VALUES(86,109); +INSERT INTO product_slots VALUES(86,110); +INSERT INTO product_slots VALUES(86,111); +INSERT INTO product_slots VALUES(86,112); +INSERT INTO product_slots VALUES(86,116); +INSERT INTO product_slots VALUES(86,117); +INSERT INTO product_slots VALUES(86,118); +INSERT INTO product_slots VALUES(86,119); +INSERT INTO product_slots VALUES(86,120); +INSERT INTO product_slots VALUES(86,123); +INSERT INTO product_slots VALUES(86,124); +INSERT INTO product_slots VALUES(86,125); +INSERT INTO product_slots VALUES(86,126); +INSERT INTO product_slots VALUES(86,130); +INSERT INTO product_slots VALUES(86,131); +INSERT INTO product_slots VALUES(86,132); +INSERT INTO product_slots VALUES(86,133); +INSERT INTO product_slots VALUES(86,137); +INSERT INTO product_slots VALUES(86,138); +INSERT INTO product_slots VALUES(86,139); +INSERT INTO product_slots VALUES(86,140); +INSERT INTO product_slots VALUES(86,144); +INSERT INTO product_slots VALUES(86,145); +INSERT INTO product_slots VALUES(86,146); +INSERT INTO product_slots VALUES(86,147); +INSERT INTO product_slots VALUES(86,148); +INSERT INTO product_slots VALUES(86,149); +INSERT INTO product_slots VALUES(86,150); +INSERT INTO product_slots VALUES(86,151); +INSERT INTO product_slots VALUES(86,155); +INSERT INTO product_slots VALUES(86,156); +INSERT INTO product_slots VALUES(86,157); +INSERT INTO product_slots VALUES(86,158); +INSERT INTO product_slots VALUES(86,162); +INSERT INTO product_slots VALUES(86,163); +INSERT INTO product_slots VALUES(86,164); +INSERT INTO product_slots VALUES(86,165); +INSERT INTO product_slots VALUES(86,166); +INSERT INTO product_slots VALUES(86,169); +INSERT INTO product_slots VALUES(86,170); +INSERT INTO product_slots VALUES(86,171); +INSERT INTO product_slots VALUES(86,172); +INSERT INTO product_slots VALUES(86,176); +INSERT INTO product_slots VALUES(86,177); +INSERT INTO product_slots VALUES(86,178); +INSERT INTO product_slots VALUES(86,179); +INSERT INTO product_slots VALUES(86,183); +INSERT INTO product_slots VALUES(86,184); +INSERT INTO product_slots VALUES(86,185); +INSERT INTO product_slots VALUES(86,186); +INSERT INTO product_slots VALUES(86,187); +INSERT INTO product_slots VALUES(86,188); +INSERT INTO product_slots VALUES(86,189); +INSERT INTO product_slots VALUES(86,190); +INSERT INTO product_slots VALUES(86,191); +INSERT INTO product_slots VALUES(86,192); +INSERT INTO product_slots VALUES(86,193); +INSERT INTO product_slots VALUES(86,194); +INSERT INTO product_slots VALUES(86,198); +INSERT INTO product_slots VALUES(86,199); +INSERT INTO product_slots VALUES(86,200); +INSERT INTO product_slots VALUES(86,201); +INSERT INTO product_slots VALUES(86,202); +INSERT INTO product_slots VALUES(86,203); +INSERT INTO product_slots VALUES(86,205); +INSERT INTO product_slots VALUES(86,208); +INSERT INTO product_slots VALUES(86,209); +INSERT INTO product_slots VALUES(86,210); +INSERT INTO product_slots VALUES(86,211); +INSERT INTO product_slots VALUES(86,216); +INSERT INTO product_slots VALUES(86,217); +INSERT INTO product_slots VALUES(86,218); +INSERT INTO product_slots VALUES(86,219); +INSERT INTO product_slots VALUES(86,220); +INSERT INTO product_slots VALUES(86,223); +INSERT INTO product_slots VALUES(86,224); +INSERT INTO product_slots VALUES(86,225); +INSERT INTO product_slots VALUES(86,226); +INSERT INTO product_slots VALUES(86,230); +INSERT INTO product_slots VALUES(86,231); +INSERT INTO product_slots VALUES(86,232); +INSERT INTO product_slots VALUES(86,234); +INSERT INTO product_slots VALUES(86,237); +INSERT INTO product_slots VALUES(86,238); +INSERT INTO product_slots VALUES(86,239); +INSERT INTO product_slots VALUES(86,240); +INSERT INTO product_slots VALUES(86,274); +INSERT INTO product_slots VALUES(86,275); +INSERT INTO product_slots VALUES(86,277); +INSERT INTO product_slots VALUES(86,278); +INSERT INTO product_slots VALUES(86,279); +INSERT INTO product_slots VALUES(88,39); +INSERT INTO product_slots VALUES(88,44); +INSERT INTO product_slots VALUES(88,46); +INSERT INTO product_slots VALUES(88,47); +INSERT INTO product_slots VALUES(88,48); +INSERT INTO product_slots VALUES(88,49); +INSERT INTO product_slots VALUES(88,50); +INSERT INTO product_slots VALUES(88,51); +INSERT INTO product_slots VALUES(88,52); +INSERT INTO product_slots VALUES(88,53); +INSERT INTO product_slots VALUES(88,54); +INSERT INTO product_slots VALUES(88,55); +INSERT INTO product_slots VALUES(88,56); +INSERT INTO product_slots VALUES(88,57); +INSERT INTO product_slots VALUES(88,58); +INSERT INTO product_slots VALUES(88,59); +INSERT INTO product_slots VALUES(88,60); +INSERT INTO product_slots VALUES(88,61); +INSERT INTO product_slots VALUES(88,62); +INSERT INTO product_slots VALUES(88,63); +INSERT INTO product_slots VALUES(88,64); +INSERT INTO product_slots VALUES(88,65); +INSERT INTO product_slots VALUES(88,66); +INSERT INTO product_slots VALUES(88,67); +INSERT INTO product_slots VALUES(88,68); +INSERT INTO product_slots VALUES(88,69); +INSERT INTO product_slots VALUES(88,70); +INSERT INTO product_slots VALUES(88,71); +INSERT INTO product_slots VALUES(88,72); +INSERT INTO product_slots VALUES(88,73); +INSERT INTO product_slots VALUES(88,74); +INSERT INTO product_slots VALUES(88,75); +INSERT INTO product_slots VALUES(88,76); +INSERT INTO product_slots VALUES(88,77); +INSERT INTO product_slots VALUES(88,78); +INSERT INTO product_slots VALUES(88,79); +INSERT INTO product_slots VALUES(88,80); +INSERT INTO product_slots VALUES(88,87); +INSERT INTO product_slots VALUES(88,88); +INSERT INTO product_slots VALUES(88,95); +INSERT INTO product_slots VALUES(88,101); +INSERT INTO product_slots VALUES(88,102); +INSERT INTO product_slots VALUES(88,103); +INSERT INTO product_slots VALUES(88,104); +INSERT INTO product_slots VALUES(88,105); +INSERT INTO product_slots VALUES(88,106); +INSERT INTO product_slots VALUES(88,107); +INSERT INTO product_slots VALUES(88,108); +INSERT INTO product_slots VALUES(88,109); +INSERT INTO product_slots VALUES(88,110); +INSERT INTO product_slots VALUES(88,111); +INSERT INTO product_slots VALUES(88,112); +INSERT INTO product_slots VALUES(88,113); +INSERT INTO product_slots VALUES(88,114); +INSERT INTO product_slots VALUES(88,115); +INSERT INTO product_slots VALUES(88,116); +INSERT INTO product_slots VALUES(88,117); +INSERT INTO product_slots VALUES(88,118); +INSERT INTO product_slots VALUES(88,119); +INSERT INTO product_slots VALUES(88,120); +INSERT INTO product_slots VALUES(88,121); +INSERT INTO product_slots VALUES(88,122); +INSERT INTO product_slots VALUES(88,123); +INSERT INTO product_slots VALUES(88,124); +INSERT INTO product_slots VALUES(88,125); +INSERT INTO product_slots VALUES(88,126); +INSERT INTO product_slots VALUES(88,127); +INSERT INTO product_slots VALUES(88,128); +INSERT INTO product_slots VALUES(88,129); +INSERT INTO product_slots VALUES(88,130); +INSERT INTO product_slots VALUES(88,131); +INSERT INTO product_slots VALUES(88,132); +INSERT INTO product_slots VALUES(88,133); +INSERT INTO product_slots VALUES(88,137); +INSERT INTO product_slots VALUES(88,138); +INSERT INTO product_slots VALUES(88,139); +INSERT INTO product_slots VALUES(88,141); +INSERT INTO product_slots VALUES(88,144); +INSERT INTO product_slots VALUES(88,156); +INSERT INTO product_slots VALUES(88,164); +INSERT INTO product_slots VALUES(88,165); +INSERT INTO product_slots VALUES(88,166); +INSERT INTO product_slots VALUES(88,167); +INSERT INTO product_slots VALUES(88,169); +INSERT INTO product_slots VALUES(88,176); +INSERT INTO product_slots VALUES(88,187); +INSERT INTO product_slots VALUES(88,203); +INSERT INTO product_slots VALUES(88,204); +INSERT INTO product_slots VALUES(88,205); +INSERT INTO product_slots VALUES(88,206); +INSERT INTO product_slots VALUES(88,207); +INSERT INTO product_slots VALUES(88,208); +INSERT INTO product_slots VALUES(88,209); +INSERT INTO product_slots VALUES(88,210); +INSERT INTO product_slots VALUES(88,211); +INSERT INTO product_slots VALUES(88,212); +INSERT INTO product_slots VALUES(88,213); +INSERT INTO product_slots VALUES(88,214); +INSERT INTO product_slots VALUES(88,215); +INSERT INTO product_slots VALUES(88,216); +INSERT INTO product_slots VALUES(88,217); +INSERT INTO product_slots VALUES(88,218); +INSERT INTO product_slots VALUES(88,219); +INSERT INTO product_slots VALUES(88,220); +INSERT INTO product_slots VALUES(88,221); +INSERT INTO product_slots VALUES(88,222); +INSERT INTO product_slots VALUES(88,223); +INSERT INTO product_slots VALUES(88,224); +INSERT INTO product_slots VALUES(88,225); +INSERT INTO product_slots VALUES(88,226); +INSERT INTO product_slots VALUES(88,227); +INSERT INTO product_slots VALUES(88,228); +INSERT INTO product_slots VALUES(88,229); +INSERT INTO product_slots VALUES(88,230); +INSERT INTO product_slots VALUES(88,231); +INSERT INTO product_slots VALUES(88,232); +INSERT INTO product_slots VALUES(88,233); +INSERT INTO product_slots VALUES(88,234); +INSERT INTO product_slots VALUES(88,235); +INSERT INTO product_slots VALUES(88,236); +INSERT INTO product_slots VALUES(88,237); +INSERT INTO product_slots VALUES(88,238); +INSERT INTO product_slots VALUES(88,239); +INSERT INTO product_slots VALUES(88,240); +INSERT INTO product_slots VALUES(88,241); +INSERT INTO product_slots VALUES(88,242); +INSERT INTO product_slots VALUES(88,243); +INSERT INTO product_slots VALUES(88,244); +INSERT INTO product_slots VALUES(88,274); +INSERT INTO product_slots VALUES(88,275); +INSERT INTO product_slots VALUES(88,279); +INSERT INTO product_slots VALUES(88,280); +INSERT INTO product_slots VALUES(88,281); +INSERT INTO product_slots VALUES(88,282); +INSERT INTO product_slots VALUES(88,283); +INSERT INTO product_slots VALUES(88,284); +INSERT INTO product_slots VALUES(88,285); +INSERT INTO product_slots VALUES(88,286); +INSERT INTO product_slots VALUES(88,287); +INSERT INTO product_slots VALUES(89,39); +INSERT INTO product_slots VALUES(89,44); +INSERT INTO product_slots VALUES(89,46); +INSERT INTO product_slots VALUES(89,47); +INSERT INTO product_slots VALUES(89,48); +INSERT INTO product_slots VALUES(89,49); +INSERT INTO product_slots VALUES(89,50); +INSERT INTO product_slots VALUES(89,51); +INSERT INTO product_slots VALUES(89,52); +INSERT INTO product_slots VALUES(89,53); +INSERT INTO product_slots VALUES(89,54); +INSERT INTO product_slots VALUES(89,55); +INSERT INTO product_slots VALUES(89,56); +INSERT INTO product_slots VALUES(89,57); +INSERT INTO product_slots VALUES(89,58); +INSERT INTO product_slots VALUES(89,59); +INSERT INTO product_slots VALUES(89,60); +INSERT INTO product_slots VALUES(89,61); +INSERT INTO product_slots VALUES(89,62); +INSERT INTO product_slots VALUES(89,63); +INSERT INTO product_slots VALUES(89,64); +INSERT INTO product_slots VALUES(89,65); +INSERT INTO product_slots VALUES(89,66); +INSERT INTO product_slots VALUES(89,67); +INSERT INTO product_slots VALUES(89,68); +INSERT INTO product_slots VALUES(89,69); +INSERT INTO product_slots VALUES(89,70); +INSERT INTO product_slots VALUES(89,71); +INSERT INTO product_slots VALUES(89,72); +INSERT INTO product_slots VALUES(89,73); +INSERT INTO product_slots VALUES(89,74); +INSERT INTO product_slots VALUES(89,75); +INSERT INTO product_slots VALUES(89,76); +INSERT INTO product_slots VALUES(89,77); +INSERT INTO product_slots VALUES(89,78); +INSERT INTO product_slots VALUES(89,79); +INSERT INTO product_slots VALUES(89,80); +INSERT INTO product_slots VALUES(89,81); +INSERT INTO product_slots VALUES(89,82); +INSERT INTO product_slots VALUES(89,83); +INSERT INTO product_slots VALUES(89,84); +INSERT INTO product_slots VALUES(89,85); +INSERT INTO product_slots VALUES(89,86); +INSERT INTO product_slots VALUES(89,87); +INSERT INTO product_slots VALUES(89,88); +INSERT INTO product_slots VALUES(89,89); +INSERT INTO product_slots VALUES(89,90); +INSERT INTO product_slots VALUES(89,91); +INSERT INTO product_slots VALUES(89,92); +INSERT INTO product_slots VALUES(89,93); +INSERT INTO product_slots VALUES(89,94); +INSERT INTO product_slots VALUES(89,95); +INSERT INTO product_slots VALUES(89,96); +INSERT INTO product_slots VALUES(89,97); +INSERT INTO product_slots VALUES(89,98); +INSERT INTO product_slots VALUES(89,99); +INSERT INTO product_slots VALUES(89,100); +INSERT INTO product_slots VALUES(89,101); +INSERT INTO product_slots VALUES(89,102); +INSERT INTO product_slots VALUES(89,103); +INSERT INTO product_slots VALUES(89,104); +INSERT INTO product_slots VALUES(89,105); +INSERT INTO product_slots VALUES(89,106); +INSERT INTO product_slots VALUES(89,107); +INSERT INTO product_slots VALUES(89,108); +INSERT INTO product_slots VALUES(89,109); +INSERT INTO product_slots VALUES(89,110); +INSERT INTO product_slots VALUES(89,111); +INSERT INTO product_slots VALUES(89,112); +INSERT INTO product_slots VALUES(89,113); +INSERT INTO product_slots VALUES(89,114); +INSERT INTO product_slots VALUES(89,115); +INSERT INTO product_slots VALUES(89,116); +INSERT INTO product_slots VALUES(89,117); +INSERT INTO product_slots VALUES(89,118); +INSERT INTO product_slots VALUES(89,119); +INSERT INTO product_slots VALUES(89,120); +INSERT INTO product_slots VALUES(89,121); +INSERT INTO product_slots VALUES(89,122); +INSERT INTO product_slots VALUES(89,123); +INSERT INTO product_slots VALUES(89,124); +INSERT INTO product_slots VALUES(89,125); +INSERT INTO product_slots VALUES(89,126); +INSERT INTO product_slots VALUES(89,127); +INSERT INTO product_slots VALUES(89,128); +INSERT INTO product_slots VALUES(89,129); +INSERT INTO product_slots VALUES(89,130); +INSERT INTO product_slots VALUES(89,131); +INSERT INTO product_slots VALUES(89,132); +INSERT INTO product_slots VALUES(89,133); +INSERT INTO product_slots VALUES(89,134); +INSERT INTO product_slots VALUES(89,135); +INSERT INTO product_slots VALUES(89,136); +INSERT INTO product_slots VALUES(89,137); +INSERT INTO product_slots VALUES(89,138); +INSERT INTO product_slots VALUES(89,139); +INSERT INTO product_slots VALUES(89,140); +INSERT INTO product_slots VALUES(89,141); +INSERT INTO product_slots VALUES(89,142); +INSERT INTO product_slots VALUES(89,143); +INSERT INTO product_slots VALUES(89,144); +INSERT INTO product_slots VALUES(89,145); +INSERT INTO product_slots VALUES(89,146); +INSERT INTO product_slots VALUES(89,147); +INSERT INTO product_slots VALUES(89,148); +INSERT INTO product_slots VALUES(89,149); +INSERT INTO product_slots VALUES(89,150); +INSERT INTO product_slots VALUES(89,151); +INSERT INTO product_slots VALUES(89,152); +INSERT INTO product_slots VALUES(89,153); +INSERT INTO product_slots VALUES(89,154); +INSERT INTO product_slots VALUES(89,155); +INSERT INTO product_slots VALUES(89,156); +INSERT INTO product_slots VALUES(89,157); +INSERT INTO product_slots VALUES(89,158); +INSERT INTO product_slots VALUES(89,159); +INSERT INTO product_slots VALUES(89,160); +INSERT INTO product_slots VALUES(89,161); +INSERT INTO product_slots VALUES(89,162); +INSERT INTO product_slots VALUES(89,163); +INSERT INTO product_slots VALUES(89,164); +INSERT INTO product_slots VALUES(89,165); +INSERT INTO product_slots VALUES(89,166); +INSERT INTO product_slots VALUES(89,167); +INSERT INTO product_slots VALUES(89,168); +INSERT INTO product_slots VALUES(89,169); +INSERT INTO product_slots VALUES(89,170); +INSERT INTO product_slots VALUES(89,171); +INSERT INTO product_slots VALUES(89,172); +INSERT INTO product_slots VALUES(89,173); +INSERT INTO product_slots VALUES(89,174); +INSERT INTO product_slots VALUES(89,175); +INSERT INTO product_slots VALUES(89,176); +INSERT INTO product_slots VALUES(89,177); +INSERT INTO product_slots VALUES(89,178); +INSERT INTO product_slots VALUES(89,179); +INSERT INTO product_slots VALUES(89,180); +INSERT INTO product_slots VALUES(89,181); +INSERT INTO product_slots VALUES(89,182); +INSERT INTO product_slots VALUES(89,183); +INSERT INTO product_slots VALUES(89,184); +INSERT INTO product_slots VALUES(89,185); +INSERT INTO product_slots VALUES(89,186); +INSERT INTO product_slots VALUES(89,187); +INSERT INTO product_slots VALUES(89,188); +INSERT INTO product_slots VALUES(89,189); +INSERT INTO product_slots VALUES(89,190); +INSERT INTO product_slots VALUES(89,191); +INSERT INTO product_slots VALUES(89,192); +INSERT INTO product_slots VALUES(89,193); +INSERT INTO product_slots VALUES(89,194); +INSERT INTO product_slots VALUES(89,195); +INSERT INTO product_slots VALUES(89,196); +INSERT INTO product_slots VALUES(89,197); +INSERT INTO product_slots VALUES(89,198); +INSERT INTO product_slots VALUES(89,199); +INSERT INTO product_slots VALUES(89,200); +INSERT INTO product_slots VALUES(89,201); +INSERT INTO product_slots VALUES(89,202); +INSERT INTO product_slots VALUES(89,203); +INSERT INTO product_slots VALUES(89,204); +INSERT INTO product_slots VALUES(89,205); +INSERT INTO product_slots VALUES(89,206); +INSERT INTO product_slots VALUES(89,207); +INSERT INTO product_slots VALUES(89,208); +INSERT INTO product_slots VALUES(89,209); +INSERT INTO product_slots VALUES(89,210); +INSERT INTO product_slots VALUES(89,211); +INSERT INTO product_slots VALUES(89,212); +INSERT INTO product_slots VALUES(89,213); +INSERT INTO product_slots VALUES(89,214); +INSERT INTO product_slots VALUES(89,215); +INSERT INTO product_slots VALUES(89,216); +INSERT INTO product_slots VALUES(89,217); +INSERT INTO product_slots VALUES(89,218); +INSERT INTO product_slots VALUES(89,219); +INSERT INTO product_slots VALUES(89,220); +INSERT INTO product_slots VALUES(89,221); +INSERT INTO product_slots VALUES(89,222); +INSERT INTO product_slots VALUES(89,223); +INSERT INTO product_slots VALUES(89,224); +INSERT INTO product_slots VALUES(89,225); +INSERT INTO product_slots VALUES(89,226); +INSERT INTO product_slots VALUES(89,227); +INSERT INTO product_slots VALUES(89,228); +INSERT INTO product_slots VALUES(89,229); +INSERT INTO product_slots VALUES(89,230); +INSERT INTO product_slots VALUES(89,231); +INSERT INTO product_slots VALUES(89,232); +INSERT INTO product_slots VALUES(89,233); +INSERT INTO product_slots VALUES(89,234); +INSERT INTO product_slots VALUES(89,235); +INSERT INTO product_slots VALUES(89,236); +INSERT INTO product_slots VALUES(89,237); +INSERT INTO product_slots VALUES(89,238); +INSERT INTO product_slots VALUES(89,239); +INSERT INTO product_slots VALUES(89,240); +INSERT INTO product_slots VALUES(89,241); +INSERT INTO product_slots VALUES(89,242); +INSERT INTO product_slots VALUES(89,243); +INSERT INTO product_slots VALUES(89,244); +INSERT INTO product_slots VALUES(89,274); +INSERT INTO product_slots VALUES(89,275); +INSERT INTO product_slots VALUES(89,279); +INSERT INTO product_slots VALUES(89,280); +INSERT INTO product_slots VALUES(89,281); +INSERT INTO product_slots VALUES(89,282); +INSERT INTO product_slots VALUES(89,283); +INSERT INTO product_slots VALUES(89,284); +INSERT INTO product_slots VALUES(89,285); +INSERT INTO product_slots VALUES(89,286); +INSERT INTO product_slots VALUES(89,287); +INSERT INTO product_slots VALUES(90,39); +INSERT INTO product_slots VALUES(90,44); +INSERT INTO product_slots VALUES(90,46); +INSERT INTO product_slots VALUES(90,47); +INSERT INTO product_slots VALUES(90,48); +INSERT INTO product_slots VALUES(90,49); +INSERT INTO product_slots VALUES(90,50); +INSERT INTO product_slots VALUES(90,51); +INSERT INTO product_slots VALUES(90,52); +INSERT INTO product_slots VALUES(90,53); +INSERT INTO product_slots VALUES(90,54); +INSERT INTO product_slots VALUES(90,55); +INSERT INTO product_slots VALUES(90,56); +INSERT INTO product_slots VALUES(90,57); +INSERT INTO product_slots VALUES(90,58); +INSERT INTO product_slots VALUES(90,59); +INSERT INTO product_slots VALUES(90,60); +INSERT INTO product_slots VALUES(90,61); +INSERT INTO product_slots VALUES(90,62); +INSERT INTO product_slots VALUES(90,63); +INSERT INTO product_slots VALUES(90,64); +INSERT INTO product_slots VALUES(90,65); +INSERT INTO product_slots VALUES(90,66); +INSERT INTO product_slots VALUES(90,67); +INSERT INTO product_slots VALUES(90,68); +INSERT INTO product_slots VALUES(90,69); +INSERT INTO product_slots VALUES(90,70); +INSERT INTO product_slots VALUES(90,71); +INSERT INTO product_slots VALUES(90,72); +INSERT INTO product_slots VALUES(90,73); +INSERT INTO product_slots VALUES(90,74); +INSERT INTO product_slots VALUES(90,75); +INSERT INTO product_slots VALUES(90,76); +INSERT INTO product_slots VALUES(90,77); +INSERT INTO product_slots VALUES(90,78); +INSERT INTO product_slots VALUES(90,79); +INSERT INTO product_slots VALUES(90,80); +INSERT INTO product_slots VALUES(90,81); +INSERT INTO product_slots VALUES(90,82); +INSERT INTO product_slots VALUES(90,83); +INSERT INTO product_slots VALUES(90,84); +INSERT INTO product_slots VALUES(90,85); +INSERT INTO product_slots VALUES(90,86); +INSERT INTO product_slots VALUES(90,87); +INSERT INTO product_slots VALUES(90,88); +INSERT INTO product_slots VALUES(90,89); +INSERT INTO product_slots VALUES(90,90); +INSERT INTO product_slots VALUES(90,91); +INSERT INTO product_slots VALUES(90,92); +INSERT INTO product_slots VALUES(90,93); +INSERT INTO product_slots VALUES(90,94); +INSERT INTO product_slots VALUES(90,95); +INSERT INTO product_slots VALUES(90,96); +INSERT INTO product_slots VALUES(90,97); +INSERT INTO product_slots VALUES(90,98); +INSERT INTO product_slots VALUES(90,99); +INSERT INTO product_slots VALUES(90,100); +INSERT INTO product_slots VALUES(90,101); +INSERT INTO product_slots VALUES(90,102); +INSERT INTO product_slots VALUES(90,103); +INSERT INTO product_slots VALUES(90,104); +INSERT INTO product_slots VALUES(90,105); +INSERT INTO product_slots VALUES(90,106); +INSERT INTO product_slots VALUES(90,107); +INSERT INTO product_slots VALUES(90,108); +INSERT INTO product_slots VALUES(90,109); +INSERT INTO product_slots VALUES(90,110); +INSERT INTO product_slots VALUES(90,111); +INSERT INTO product_slots VALUES(90,112); +INSERT INTO product_slots VALUES(90,113); +INSERT INTO product_slots VALUES(90,114); +INSERT INTO product_slots VALUES(90,115); +INSERT INTO product_slots VALUES(90,116); +INSERT INTO product_slots VALUES(90,117); +INSERT INTO product_slots VALUES(90,118); +INSERT INTO product_slots VALUES(90,119); +INSERT INTO product_slots VALUES(90,120); +INSERT INTO product_slots VALUES(90,121); +INSERT INTO product_slots VALUES(90,122); +INSERT INTO product_slots VALUES(90,123); +INSERT INTO product_slots VALUES(90,124); +INSERT INTO product_slots VALUES(90,125); +INSERT INTO product_slots VALUES(90,126); +INSERT INTO product_slots VALUES(90,127); +INSERT INTO product_slots VALUES(90,128); +INSERT INTO product_slots VALUES(90,129); +INSERT INTO product_slots VALUES(90,130); +INSERT INTO product_slots VALUES(90,131); +INSERT INTO product_slots VALUES(90,132); +INSERT INTO product_slots VALUES(90,133); +INSERT INTO product_slots VALUES(90,134); +INSERT INTO product_slots VALUES(90,135); +INSERT INTO product_slots VALUES(90,136); +INSERT INTO product_slots VALUES(90,137); +INSERT INTO product_slots VALUES(90,138); +INSERT INTO product_slots VALUES(90,139); +INSERT INTO product_slots VALUES(90,140); +INSERT INTO product_slots VALUES(90,141); +INSERT INTO product_slots VALUES(90,142); +INSERT INTO product_slots VALUES(90,143); +INSERT INTO product_slots VALUES(90,144); +INSERT INTO product_slots VALUES(90,145); +INSERT INTO product_slots VALUES(90,146); +INSERT INTO product_slots VALUES(90,147); +INSERT INTO product_slots VALUES(90,148); +INSERT INTO product_slots VALUES(90,149); +INSERT INTO product_slots VALUES(90,150); +INSERT INTO product_slots VALUES(90,151); +INSERT INTO product_slots VALUES(90,152); +INSERT INTO product_slots VALUES(90,153); +INSERT INTO product_slots VALUES(90,154); +INSERT INTO product_slots VALUES(90,155); +INSERT INTO product_slots VALUES(90,156); +INSERT INTO product_slots VALUES(90,157); +INSERT INTO product_slots VALUES(90,158); +INSERT INTO product_slots VALUES(90,159); +INSERT INTO product_slots VALUES(90,160); +INSERT INTO product_slots VALUES(90,161); +INSERT INTO product_slots VALUES(90,162); +INSERT INTO product_slots VALUES(90,163); +INSERT INTO product_slots VALUES(90,164); +INSERT INTO product_slots VALUES(90,165); +INSERT INTO product_slots VALUES(90,166); +INSERT INTO product_slots VALUES(90,167); +INSERT INTO product_slots VALUES(90,168); +INSERT INTO product_slots VALUES(90,169); +INSERT INTO product_slots VALUES(90,170); +INSERT INTO product_slots VALUES(90,171); +INSERT INTO product_slots VALUES(90,172); +INSERT INTO product_slots VALUES(90,173); +INSERT INTO product_slots VALUES(90,174); +INSERT INTO product_slots VALUES(90,175); +INSERT INTO product_slots VALUES(90,176); +INSERT INTO product_slots VALUES(90,177); +INSERT INTO product_slots VALUES(90,178); +INSERT INTO product_slots VALUES(90,179); +INSERT INTO product_slots VALUES(90,180); +INSERT INTO product_slots VALUES(90,181); +INSERT INTO product_slots VALUES(90,182); +INSERT INTO product_slots VALUES(90,183); +INSERT INTO product_slots VALUES(90,184); +INSERT INTO product_slots VALUES(90,185); +INSERT INTO product_slots VALUES(90,186); +INSERT INTO product_slots VALUES(90,187); +INSERT INTO product_slots VALUES(90,188); +INSERT INTO product_slots VALUES(90,189); +INSERT INTO product_slots VALUES(90,190); +INSERT INTO product_slots VALUES(90,191); +INSERT INTO product_slots VALUES(90,192); +INSERT INTO product_slots VALUES(90,193); +INSERT INTO product_slots VALUES(90,194); +INSERT INTO product_slots VALUES(90,195); +INSERT INTO product_slots VALUES(90,196); +INSERT INTO product_slots VALUES(90,197); +INSERT INTO product_slots VALUES(90,198); +INSERT INTO product_slots VALUES(90,199); +INSERT INTO product_slots VALUES(90,200); +INSERT INTO product_slots VALUES(90,201); +INSERT INTO product_slots VALUES(90,202); +INSERT INTO product_slots VALUES(90,203); +INSERT INTO product_slots VALUES(90,204); +INSERT INTO product_slots VALUES(90,205); +INSERT INTO product_slots VALUES(90,206); +INSERT INTO product_slots VALUES(90,207); +INSERT INTO product_slots VALUES(90,208); +INSERT INTO product_slots VALUES(90,209); +INSERT INTO product_slots VALUES(90,210); +INSERT INTO product_slots VALUES(90,211); +INSERT INTO product_slots VALUES(90,212); +INSERT INTO product_slots VALUES(90,213); +INSERT INTO product_slots VALUES(90,214); +INSERT INTO product_slots VALUES(90,215); +INSERT INTO product_slots VALUES(90,216); +INSERT INTO product_slots VALUES(90,217); +INSERT INTO product_slots VALUES(90,218); +INSERT INTO product_slots VALUES(90,219); +INSERT INTO product_slots VALUES(90,220); +INSERT INTO product_slots VALUES(90,221); +INSERT INTO product_slots VALUES(90,222); +INSERT INTO product_slots VALUES(90,223); +INSERT INTO product_slots VALUES(90,224); +INSERT INTO product_slots VALUES(90,225); +INSERT INTO product_slots VALUES(90,226); +INSERT INTO product_slots VALUES(90,227); +INSERT INTO product_slots VALUES(90,228); +INSERT INTO product_slots VALUES(90,229); +INSERT INTO product_slots VALUES(90,230); +INSERT INTO product_slots VALUES(90,231); +INSERT INTO product_slots VALUES(90,232); +INSERT INTO product_slots VALUES(90,233); +INSERT INTO product_slots VALUES(90,234); +INSERT INTO product_slots VALUES(90,235); +INSERT INTO product_slots VALUES(90,236); +INSERT INTO product_slots VALUES(90,237); +INSERT INTO product_slots VALUES(90,238); +INSERT INTO product_slots VALUES(90,239); +INSERT INTO product_slots VALUES(90,240); +INSERT INTO product_slots VALUES(90,241); +INSERT INTO product_slots VALUES(90,242); +INSERT INTO product_slots VALUES(90,243); +INSERT INTO product_slots VALUES(90,244); +INSERT INTO product_slots VALUES(90,274); +INSERT INTO product_slots VALUES(90,275); +INSERT INTO product_slots VALUES(90,279); +INSERT INTO product_slots VALUES(90,280); +INSERT INTO product_slots VALUES(90,281); +INSERT INTO product_slots VALUES(90,282); +INSERT INTO product_slots VALUES(90,283); +INSERT INTO product_slots VALUES(90,284); +INSERT INTO product_slots VALUES(90,285); +INSERT INTO product_slots VALUES(90,286); +INSERT INTO product_slots VALUES(90,287); +INSERT INTO product_slots VALUES(91,39); +INSERT INTO product_slots VALUES(91,44); +INSERT INTO product_slots VALUES(91,46); +INSERT INTO product_slots VALUES(91,47); +INSERT INTO product_slots VALUES(91,48); +INSERT INTO product_slots VALUES(91,49); +INSERT INTO product_slots VALUES(91,50); +INSERT INTO product_slots VALUES(91,51); +INSERT INTO product_slots VALUES(91,52); +INSERT INTO product_slots VALUES(91,53); +INSERT INTO product_slots VALUES(91,54); +INSERT INTO product_slots VALUES(91,55); +INSERT INTO product_slots VALUES(91,56); +INSERT INTO product_slots VALUES(91,57); +INSERT INTO product_slots VALUES(91,58); +INSERT INTO product_slots VALUES(91,59); +INSERT INTO product_slots VALUES(91,60); +INSERT INTO product_slots VALUES(91,61); +INSERT INTO product_slots VALUES(91,62); +INSERT INTO product_slots VALUES(91,63); +INSERT INTO product_slots VALUES(91,64); +INSERT INTO product_slots VALUES(91,65); +INSERT INTO product_slots VALUES(91,66); +INSERT INTO product_slots VALUES(91,67); +INSERT INTO product_slots VALUES(91,68); +INSERT INTO product_slots VALUES(91,69); +INSERT INTO product_slots VALUES(91,70); +INSERT INTO product_slots VALUES(91,71); +INSERT INTO product_slots VALUES(91,72); +INSERT INTO product_slots VALUES(91,73); +INSERT INTO product_slots VALUES(91,74); +INSERT INTO product_slots VALUES(91,75); +INSERT INTO product_slots VALUES(91,76); +INSERT INTO product_slots VALUES(91,77); +INSERT INTO product_slots VALUES(91,78); +INSERT INTO product_slots VALUES(91,79); +INSERT INTO product_slots VALUES(91,80); +INSERT INTO product_slots VALUES(91,81); +INSERT INTO product_slots VALUES(91,82); +INSERT INTO product_slots VALUES(91,83); +INSERT INTO product_slots VALUES(91,84); +INSERT INTO product_slots VALUES(91,85); +INSERT INTO product_slots VALUES(91,86); +INSERT INTO product_slots VALUES(91,87); +INSERT INTO product_slots VALUES(91,88); +INSERT INTO product_slots VALUES(91,89); +INSERT INTO product_slots VALUES(91,90); +INSERT INTO product_slots VALUES(91,91); +INSERT INTO product_slots VALUES(91,92); +INSERT INTO product_slots VALUES(91,93); +INSERT INTO product_slots VALUES(91,94); +INSERT INTO product_slots VALUES(91,95); +INSERT INTO product_slots VALUES(91,96); +INSERT INTO product_slots VALUES(91,97); +INSERT INTO product_slots VALUES(91,98); +INSERT INTO product_slots VALUES(91,99); +INSERT INTO product_slots VALUES(91,100); +INSERT INTO product_slots VALUES(91,101); +INSERT INTO product_slots VALUES(91,102); +INSERT INTO product_slots VALUES(91,103); +INSERT INTO product_slots VALUES(91,104); +INSERT INTO product_slots VALUES(91,105); +INSERT INTO product_slots VALUES(91,106); +INSERT INTO product_slots VALUES(91,107); +INSERT INTO product_slots VALUES(91,108); +INSERT INTO product_slots VALUES(91,109); +INSERT INTO product_slots VALUES(91,110); +INSERT INTO product_slots VALUES(91,111); +INSERT INTO product_slots VALUES(91,112); +INSERT INTO product_slots VALUES(91,113); +INSERT INTO product_slots VALUES(91,114); +INSERT INTO product_slots VALUES(91,115); +INSERT INTO product_slots VALUES(91,116); +INSERT INTO product_slots VALUES(91,117); +INSERT INTO product_slots VALUES(91,118); +INSERT INTO product_slots VALUES(91,119); +INSERT INTO product_slots VALUES(91,120); +INSERT INTO product_slots VALUES(91,121); +INSERT INTO product_slots VALUES(91,122); +INSERT INTO product_slots VALUES(91,123); +INSERT INTO product_slots VALUES(91,124); +INSERT INTO product_slots VALUES(91,125); +INSERT INTO product_slots VALUES(91,126); +INSERT INTO product_slots VALUES(91,127); +INSERT INTO product_slots VALUES(91,128); +INSERT INTO product_slots VALUES(91,129); +INSERT INTO product_slots VALUES(91,130); +INSERT INTO product_slots VALUES(91,131); +INSERT INTO product_slots VALUES(91,132); +INSERT INTO product_slots VALUES(91,133); +INSERT INTO product_slots VALUES(91,134); +INSERT INTO product_slots VALUES(91,135); +INSERT INTO product_slots VALUES(91,136); +INSERT INTO product_slots VALUES(91,137); +INSERT INTO product_slots VALUES(91,138); +INSERT INTO product_slots VALUES(91,139); +INSERT INTO product_slots VALUES(91,140); +INSERT INTO product_slots VALUES(91,141); +INSERT INTO product_slots VALUES(91,142); +INSERT INTO product_slots VALUES(91,143); +INSERT INTO product_slots VALUES(91,144); +INSERT INTO product_slots VALUES(91,145); +INSERT INTO product_slots VALUES(91,146); +INSERT INTO product_slots VALUES(91,147); +INSERT INTO product_slots VALUES(91,148); +INSERT INTO product_slots VALUES(91,149); +INSERT INTO product_slots VALUES(91,150); +INSERT INTO product_slots VALUES(91,151); +INSERT INTO product_slots VALUES(91,152); +INSERT INTO product_slots VALUES(91,153); +INSERT INTO product_slots VALUES(91,154); +INSERT INTO product_slots VALUES(91,155); +INSERT INTO product_slots VALUES(91,156); +INSERT INTO product_slots VALUES(91,157); +INSERT INTO product_slots VALUES(91,158); +INSERT INTO product_slots VALUES(91,159); +INSERT INTO product_slots VALUES(91,160); +INSERT INTO product_slots VALUES(91,161); +INSERT INTO product_slots VALUES(91,162); +INSERT INTO product_slots VALUES(91,163); +INSERT INTO product_slots VALUES(91,164); +INSERT INTO product_slots VALUES(91,165); +INSERT INTO product_slots VALUES(91,166); +INSERT INTO product_slots VALUES(91,167); +INSERT INTO product_slots VALUES(91,168); +INSERT INTO product_slots VALUES(91,169); +INSERT INTO product_slots VALUES(91,170); +INSERT INTO product_slots VALUES(91,171); +INSERT INTO product_slots VALUES(91,172); +INSERT INTO product_slots VALUES(91,173); +INSERT INTO product_slots VALUES(91,174); +INSERT INTO product_slots VALUES(91,175); +INSERT INTO product_slots VALUES(91,176); +INSERT INTO product_slots VALUES(91,177); +INSERT INTO product_slots VALUES(91,178); +INSERT INTO product_slots VALUES(91,179); +INSERT INTO product_slots VALUES(91,180); +INSERT INTO product_slots VALUES(91,181); +INSERT INTO product_slots VALUES(91,182); +INSERT INTO product_slots VALUES(91,183); +INSERT INTO product_slots VALUES(91,184); +INSERT INTO product_slots VALUES(91,185); +INSERT INTO product_slots VALUES(91,186); +INSERT INTO product_slots VALUES(91,187); +INSERT INTO product_slots VALUES(91,188); +INSERT INTO product_slots VALUES(91,189); +INSERT INTO product_slots VALUES(91,190); +INSERT INTO product_slots VALUES(91,191); +INSERT INTO product_slots VALUES(91,192); +INSERT INTO product_slots VALUES(91,193); +INSERT INTO product_slots VALUES(91,194); +INSERT INTO product_slots VALUES(91,195); +INSERT INTO product_slots VALUES(91,196); +INSERT INTO product_slots VALUES(91,197); +INSERT INTO product_slots VALUES(91,198); +INSERT INTO product_slots VALUES(91,199); +INSERT INTO product_slots VALUES(91,200); +INSERT INTO product_slots VALUES(91,201); +INSERT INTO product_slots VALUES(91,202); +INSERT INTO product_slots VALUES(91,203); +INSERT INTO product_slots VALUES(91,204); +INSERT INTO product_slots VALUES(91,205); +INSERT INTO product_slots VALUES(91,206); +INSERT INTO product_slots VALUES(91,207); +INSERT INTO product_slots VALUES(91,208); +INSERT INTO product_slots VALUES(91,209); +INSERT INTO product_slots VALUES(91,210); +INSERT INTO product_slots VALUES(91,211); +INSERT INTO product_slots VALUES(91,212); +INSERT INTO product_slots VALUES(91,213); +INSERT INTO product_slots VALUES(91,214); +INSERT INTO product_slots VALUES(91,215); +INSERT INTO product_slots VALUES(91,216); +INSERT INTO product_slots VALUES(91,217); +INSERT INTO product_slots VALUES(91,218); +INSERT INTO product_slots VALUES(91,219); +INSERT INTO product_slots VALUES(91,220); +INSERT INTO product_slots VALUES(91,221); +INSERT INTO product_slots VALUES(91,222); +INSERT INTO product_slots VALUES(91,223); +INSERT INTO product_slots VALUES(91,224); +INSERT INTO product_slots VALUES(91,225); +INSERT INTO product_slots VALUES(91,226); +INSERT INTO product_slots VALUES(91,227); +INSERT INTO product_slots VALUES(91,228); +INSERT INTO product_slots VALUES(91,229); +INSERT INTO product_slots VALUES(91,230); +INSERT INTO product_slots VALUES(91,231); +INSERT INTO product_slots VALUES(91,232); +INSERT INTO product_slots VALUES(91,233); +INSERT INTO product_slots VALUES(91,234); +INSERT INTO product_slots VALUES(91,235); +INSERT INTO product_slots VALUES(91,236); +INSERT INTO product_slots VALUES(91,237); +INSERT INTO product_slots VALUES(91,238); +INSERT INTO product_slots VALUES(91,239); +INSERT INTO product_slots VALUES(91,240); +INSERT INTO product_slots VALUES(91,241); +INSERT INTO product_slots VALUES(91,242); +INSERT INTO product_slots VALUES(91,243); +INSERT INTO product_slots VALUES(91,244); +INSERT INTO product_slots VALUES(91,274); +INSERT INTO product_slots VALUES(91,275); +INSERT INTO product_slots VALUES(91,279); +INSERT INTO product_slots VALUES(91,280); +INSERT INTO product_slots VALUES(91,281); +INSERT INTO product_slots VALUES(91,282); +INSERT INTO product_slots VALUES(91,283); +INSERT INTO product_slots VALUES(91,284); +INSERT INTO product_slots VALUES(91,285); +INSERT INTO product_slots VALUES(91,286); +INSERT INTO product_slots VALUES(91,287); +INSERT INTO product_slots VALUES(92,39); +INSERT INTO product_slots VALUES(92,44); +INSERT INTO product_slots VALUES(92,46); +INSERT INTO product_slots VALUES(92,47); +INSERT INTO product_slots VALUES(92,48); +INSERT INTO product_slots VALUES(92,49); +INSERT INTO product_slots VALUES(92,50); +INSERT INTO product_slots VALUES(92,51); +INSERT INTO product_slots VALUES(92,52); +INSERT INTO product_slots VALUES(92,53); +INSERT INTO product_slots VALUES(92,54); +INSERT INTO product_slots VALUES(92,55); +INSERT INTO product_slots VALUES(92,56); +INSERT INTO product_slots VALUES(92,57); +INSERT INTO product_slots VALUES(92,58); +INSERT INTO product_slots VALUES(92,59); +INSERT INTO product_slots VALUES(92,60); +INSERT INTO product_slots VALUES(92,61); +INSERT INTO product_slots VALUES(92,62); +INSERT INTO product_slots VALUES(92,63); +INSERT INTO product_slots VALUES(92,64); +INSERT INTO product_slots VALUES(92,65); +INSERT INTO product_slots VALUES(92,66); +INSERT INTO product_slots VALUES(92,67); +INSERT INTO product_slots VALUES(92,68); +INSERT INTO product_slots VALUES(92,69); +INSERT INTO product_slots VALUES(92,70); +INSERT INTO product_slots VALUES(92,71); +INSERT INTO product_slots VALUES(92,72); +INSERT INTO product_slots VALUES(92,73); +INSERT INTO product_slots VALUES(92,74); +INSERT INTO product_slots VALUES(92,75); +INSERT INTO product_slots VALUES(92,76); +INSERT INTO product_slots VALUES(92,77); +INSERT INTO product_slots VALUES(92,78); +INSERT INTO product_slots VALUES(92,79); +INSERT INTO product_slots VALUES(92,80); +INSERT INTO product_slots VALUES(92,81); +INSERT INTO product_slots VALUES(92,82); +INSERT INTO product_slots VALUES(92,83); +INSERT INTO product_slots VALUES(92,84); +INSERT INTO product_slots VALUES(92,85); +INSERT INTO product_slots VALUES(92,86); +INSERT INTO product_slots VALUES(92,87); +INSERT INTO product_slots VALUES(92,88); +INSERT INTO product_slots VALUES(92,89); +INSERT INTO product_slots VALUES(92,90); +INSERT INTO product_slots VALUES(92,91); +INSERT INTO product_slots VALUES(92,92); +INSERT INTO product_slots VALUES(92,93); +INSERT INTO product_slots VALUES(92,94); +INSERT INTO product_slots VALUES(92,95); +INSERT INTO product_slots VALUES(92,96); +INSERT INTO product_slots VALUES(92,97); +INSERT INTO product_slots VALUES(92,98); +INSERT INTO product_slots VALUES(92,99); +INSERT INTO product_slots VALUES(92,100); +INSERT INTO product_slots VALUES(92,101); +INSERT INTO product_slots VALUES(92,102); +INSERT INTO product_slots VALUES(92,103); +INSERT INTO product_slots VALUES(92,104); +INSERT INTO product_slots VALUES(92,105); +INSERT INTO product_slots VALUES(92,106); +INSERT INTO product_slots VALUES(92,107); +INSERT INTO product_slots VALUES(92,108); +INSERT INTO product_slots VALUES(92,109); +INSERT INTO product_slots VALUES(92,110); +INSERT INTO product_slots VALUES(92,111); +INSERT INTO product_slots VALUES(92,112); +INSERT INTO product_slots VALUES(92,113); +INSERT INTO product_slots VALUES(92,114); +INSERT INTO product_slots VALUES(92,115); +INSERT INTO product_slots VALUES(92,116); +INSERT INTO product_slots VALUES(92,117); +INSERT INTO product_slots VALUES(92,118); +INSERT INTO product_slots VALUES(92,119); +INSERT INTO product_slots VALUES(92,120); +INSERT INTO product_slots VALUES(92,121); +INSERT INTO product_slots VALUES(92,122); +INSERT INTO product_slots VALUES(92,123); +INSERT INTO product_slots VALUES(92,124); +INSERT INTO product_slots VALUES(92,125); +INSERT INTO product_slots VALUES(92,126); +INSERT INTO product_slots VALUES(92,127); +INSERT INTO product_slots VALUES(92,128); +INSERT INTO product_slots VALUES(92,129); +INSERT INTO product_slots VALUES(92,130); +INSERT INTO product_slots VALUES(92,131); +INSERT INTO product_slots VALUES(92,132); +INSERT INTO product_slots VALUES(92,133); +INSERT INTO product_slots VALUES(92,134); +INSERT INTO product_slots VALUES(92,135); +INSERT INTO product_slots VALUES(92,136); +INSERT INTO product_slots VALUES(92,137); +INSERT INTO product_slots VALUES(92,138); +INSERT INTO product_slots VALUES(92,139); +INSERT INTO product_slots VALUES(92,140); +INSERT INTO product_slots VALUES(92,141); +INSERT INTO product_slots VALUES(92,142); +INSERT INTO product_slots VALUES(92,143); +INSERT INTO product_slots VALUES(92,144); +INSERT INTO product_slots VALUES(92,145); +INSERT INTO product_slots VALUES(92,146); +INSERT INTO product_slots VALUES(92,147); +INSERT INTO product_slots VALUES(92,148); +INSERT INTO product_slots VALUES(92,149); +INSERT INTO product_slots VALUES(92,150); +INSERT INTO product_slots VALUES(92,151); +INSERT INTO product_slots VALUES(92,152); +INSERT INTO product_slots VALUES(92,153); +INSERT INTO product_slots VALUES(92,154); +INSERT INTO product_slots VALUES(92,155); +INSERT INTO product_slots VALUES(92,156); +INSERT INTO product_slots VALUES(92,157); +INSERT INTO product_slots VALUES(92,158); +INSERT INTO product_slots VALUES(92,159); +INSERT INTO product_slots VALUES(92,160); +INSERT INTO product_slots VALUES(92,161); +INSERT INTO product_slots VALUES(92,162); +INSERT INTO product_slots VALUES(92,163); +INSERT INTO product_slots VALUES(92,164); +INSERT INTO product_slots VALUES(92,165); +INSERT INTO product_slots VALUES(92,166); +INSERT INTO product_slots VALUES(92,167); +INSERT INTO product_slots VALUES(92,168); +INSERT INTO product_slots VALUES(92,169); +INSERT INTO product_slots VALUES(92,170); +INSERT INTO product_slots VALUES(92,171); +INSERT INTO product_slots VALUES(92,172); +INSERT INTO product_slots VALUES(92,173); +INSERT INTO product_slots VALUES(92,174); +INSERT INTO product_slots VALUES(92,175); +INSERT INTO product_slots VALUES(92,176); +INSERT INTO product_slots VALUES(92,177); +INSERT INTO product_slots VALUES(92,178); +INSERT INTO product_slots VALUES(92,179); +INSERT INTO product_slots VALUES(92,180); +INSERT INTO product_slots VALUES(92,181); +INSERT INTO product_slots VALUES(92,182); +INSERT INTO product_slots VALUES(92,183); +INSERT INTO product_slots VALUES(92,184); +INSERT INTO product_slots VALUES(92,185); +INSERT INTO product_slots VALUES(92,186); +INSERT INTO product_slots VALUES(92,187); +INSERT INTO product_slots VALUES(92,188); +INSERT INTO product_slots VALUES(92,189); +INSERT INTO product_slots VALUES(92,190); +INSERT INTO product_slots VALUES(92,191); +INSERT INTO product_slots VALUES(92,192); +INSERT INTO product_slots VALUES(92,193); +INSERT INTO product_slots VALUES(92,194); +INSERT INTO product_slots VALUES(92,195); +INSERT INTO product_slots VALUES(92,196); +INSERT INTO product_slots VALUES(92,197); +INSERT INTO product_slots VALUES(92,198); +INSERT INTO product_slots VALUES(92,199); +INSERT INTO product_slots VALUES(92,200); +INSERT INTO product_slots VALUES(92,201); +INSERT INTO product_slots VALUES(92,202); +INSERT INTO product_slots VALUES(92,203); +INSERT INTO product_slots VALUES(92,204); +INSERT INTO product_slots VALUES(92,205); +INSERT INTO product_slots VALUES(92,206); +INSERT INTO product_slots VALUES(92,207); +INSERT INTO product_slots VALUES(92,208); +INSERT INTO product_slots VALUES(92,209); +INSERT INTO product_slots VALUES(92,210); +INSERT INTO product_slots VALUES(92,211); +INSERT INTO product_slots VALUES(92,212); +INSERT INTO product_slots VALUES(92,213); +INSERT INTO product_slots VALUES(92,214); +INSERT INTO product_slots VALUES(92,215); +INSERT INTO product_slots VALUES(92,216); +INSERT INTO product_slots VALUES(92,217); +INSERT INTO product_slots VALUES(92,218); +INSERT INTO product_slots VALUES(92,219); +INSERT INTO product_slots VALUES(92,220); +INSERT INTO product_slots VALUES(92,221); +INSERT INTO product_slots VALUES(92,222); +INSERT INTO product_slots VALUES(92,223); +INSERT INTO product_slots VALUES(92,224); +INSERT INTO product_slots VALUES(92,225); +INSERT INTO product_slots VALUES(92,226); +INSERT INTO product_slots VALUES(92,227); +INSERT INTO product_slots VALUES(92,228); +INSERT INTO product_slots VALUES(92,229); +INSERT INTO product_slots VALUES(92,230); +INSERT INTO product_slots VALUES(92,231); +INSERT INTO product_slots VALUES(92,232); +INSERT INTO product_slots VALUES(92,233); +INSERT INTO product_slots VALUES(92,234); +INSERT INTO product_slots VALUES(92,235); +INSERT INTO product_slots VALUES(92,236); +INSERT INTO product_slots VALUES(92,237); +INSERT INTO product_slots VALUES(92,238); +INSERT INTO product_slots VALUES(92,239); +INSERT INTO product_slots VALUES(92,240); +INSERT INTO product_slots VALUES(92,241); +INSERT INTO product_slots VALUES(92,242); +INSERT INTO product_slots VALUES(92,243); +INSERT INTO product_slots VALUES(92,244); +INSERT INTO product_slots VALUES(92,274); +INSERT INTO product_slots VALUES(92,275); +INSERT INTO product_slots VALUES(92,279); +INSERT INTO product_slots VALUES(92,280); +INSERT INTO product_slots VALUES(92,281); +INSERT INTO product_slots VALUES(92,282); +INSERT INTO product_slots VALUES(92,283); +INSERT INTO product_slots VALUES(92,284); +INSERT INTO product_slots VALUES(92,285); +INSERT INTO product_slots VALUES(92,286); +INSERT INTO product_slots VALUES(92,287); +INSERT INTO product_slots VALUES(93,59); +INSERT INTO product_slots VALUES(93,62); +INSERT INTO product_slots VALUES(93,63); +INSERT INTO product_slots VALUES(93,64); +INSERT INTO product_slots VALUES(93,65); +INSERT INTO product_slots VALUES(93,66); +INSERT INTO product_slots VALUES(93,67); +INSERT INTO product_slots VALUES(94,39); +INSERT INTO product_slots VALUES(94,62); +INSERT INTO product_slots VALUES(94,63); +INSERT INTO product_slots VALUES(94,64); +INSERT INTO product_slots VALUES(94,65); +INSERT INTO product_slots VALUES(94,66); +INSERT INTO product_slots VALUES(94,67); +INSERT INTO product_slots VALUES(94,68); +INSERT INTO product_slots VALUES(94,69); +INSERT INTO product_slots VALUES(94,70); +INSERT INTO product_slots VALUES(94,71); +INSERT INTO product_slots VALUES(94,72); +INSERT INTO product_slots VALUES(94,73); +INSERT INTO product_slots VALUES(94,74); +INSERT INTO product_slots VALUES(94,75); +INSERT INTO product_slots VALUES(94,76); +INSERT INTO product_slots VALUES(94,77); +INSERT INTO product_slots VALUES(94,78); +INSERT INTO product_slots VALUES(94,79); +INSERT INTO product_slots VALUES(94,80); +INSERT INTO product_slots VALUES(94,81); +INSERT INTO product_slots VALUES(94,82); +INSERT INTO product_slots VALUES(94,83); +INSERT INTO product_slots VALUES(94,84); +INSERT INTO product_slots VALUES(94,85); +INSERT INTO product_slots VALUES(94,86); +INSERT INTO product_slots VALUES(94,87); +INSERT INTO product_slots VALUES(94,88); +INSERT INTO product_slots VALUES(94,89); +INSERT INTO product_slots VALUES(94,90); +INSERT INTO product_slots VALUES(94,91); +INSERT INTO product_slots VALUES(94,92); +INSERT INTO product_slots VALUES(94,93); +INSERT INTO product_slots VALUES(94,94); +INSERT INTO product_slots VALUES(94,95); +INSERT INTO product_slots VALUES(94,96); +INSERT INTO product_slots VALUES(94,97); +INSERT INTO product_slots VALUES(94,98); +INSERT INTO product_slots VALUES(94,99); +INSERT INTO product_slots VALUES(94,100); +INSERT INTO product_slots VALUES(94,101); +INSERT INTO product_slots VALUES(94,102); +INSERT INTO product_slots VALUES(94,103); +INSERT INTO product_slots VALUES(94,104); +INSERT INTO product_slots VALUES(94,105); +INSERT INTO product_slots VALUES(94,106); +INSERT INTO product_slots VALUES(94,107); +INSERT INTO product_slots VALUES(94,108); +INSERT INTO product_slots VALUES(94,109); +INSERT INTO product_slots VALUES(94,110); +INSERT INTO product_slots VALUES(94,111); +INSERT INTO product_slots VALUES(94,112); +INSERT INTO product_slots VALUES(94,113); +INSERT INTO product_slots VALUES(94,114); +INSERT INTO product_slots VALUES(94,115); +INSERT INTO product_slots VALUES(94,116); +INSERT INTO product_slots VALUES(94,117); +INSERT INTO product_slots VALUES(94,118); +INSERT INTO product_slots VALUES(94,119); +INSERT INTO product_slots VALUES(94,120); +INSERT INTO product_slots VALUES(94,121); +INSERT INTO product_slots VALUES(94,122); +INSERT INTO product_slots VALUES(94,123); +INSERT INTO product_slots VALUES(94,124); +INSERT INTO product_slots VALUES(94,125); +INSERT INTO product_slots VALUES(94,126); +INSERT INTO product_slots VALUES(94,127); +INSERT INTO product_slots VALUES(94,128); +INSERT INTO product_slots VALUES(94,129); +INSERT INTO product_slots VALUES(94,130); +INSERT INTO product_slots VALUES(94,131); +INSERT INTO product_slots VALUES(94,132); +INSERT INTO product_slots VALUES(94,133); +INSERT INTO product_slots VALUES(94,134); +INSERT INTO product_slots VALUES(94,135); +INSERT INTO product_slots VALUES(94,136); +INSERT INTO product_slots VALUES(94,137); +INSERT INTO product_slots VALUES(94,138); +INSERT INTO product_slots VALUES(94,139); +INSERT INTO product_slots VALUES(94,140); +INSERT INTO product_slots VALUES(94,141); +INSERT INTO product_slots VALUES(94,142); +INSERT INTO product_slots VALUES(94,143); +INSERT INTO product_slots VALUES(94,144); +INSERT INTO product_slots VALUES(94,145); +INSERT INTO product_slots VALUES(94,146); +INSERT INTO product_slots VALUES(94,147); +INSERT INTO product_slots VALUES(94,148); +INSERT INTO product_slots VALUES(94,149); +INSERT INTO product_slots VALUES(94,150); +INSERT INTO product_slots VALUES(94,151); +INSERT INTO product_slots VALUES(94,152); +INSERT INTO product_slots VALUES(94,153); +INSERT INTO product_slots VALUES(94,154); +INSERT INTO product_slots VALUES(94,155); +INSERT INTO product_slots VALUES(94,156); +INSERT INTO product_slots VALUES(94,157); +INSERT INTO product_slots VALUES(94,158); +INSERT INTO product_slots VALUES(94,159); +INSERT INTO product_slots VALUES(94,160); +INSERT INTO product_slots VALUES(94,161); +INSERT INTO product_slots VALUES(94,162); +INSERT INTO product_slots VALUES(94,163); +INSERT INTO product_slots VALUES(94,164); +INSERT INTO product_slots VALUES(94,165); +INSERT INTO product_slots VALUES(94,166); +INSERT INTO product_slots VALUES(94,167); +INSERT INTO product_slots VALUES(94,168); +INSERT INTO product_slots VALUES(94,169); +INSERT INTO product_slots VALUES(94,170); +INSERT INTO product_slots VALUES(94,171); +INSERT INTO product_slots VALUES(94,172); +INSERT INTO product_slots VALUES(94,173); +INSERT INTO product_slots VALUES(94,174); +INSERT INTO product_slots VALUES(94,175); +INSERT INTO product_slots VALUES(94,176); +INSERT INTO product_slots VALUES(94,177); +INSERT INTO product_slots VALUES(94,178); +INSERT INTO product_slots VALUES(94,179); +INSERT INTO product_slots VALUES(94,180); +INSERT INTO product_slots VALUES(94,181); +INSERT INTO product_slots VALUES(94,182); +INSERT INTO product_slots VALUES(94,183); +INSERT INTO product_slots VALUES(94,184); +INSERT INTO product_slots VALUES(94,185); +INSERT INTO product_slots VALUES(94,186); +INSERT INTO product_slots VALUES(94,187); +INSERT INTO product_slots VALUES(94,188); +INSERT INTO product_slots VALUES(94,189); +INSERT INTO product_slots VALUES(94,190); +INSERT INTO product_slots VALUES(94,191); +INSERT INTO product_slots VALUES(94,192); +INSERT INTO product_slots VALUES(94,193); +INSERT INTO product_slots VALUES(94,194); +INSERT INTO product_slots VALUES(94,195); +INSERT INTO product_slots VALUES(94,196); +INSERT INTO product_slots VALUES(94,197); +INSERT INTO product_slots VALUES(94,198); +INSERT INTO product_slots VALUES(94,199); +INSERT INTO product_slots VALUES(94,200); +INSERT INTO product_slots VALUES(94,201); +INSERT INTO product_slots VALUES(94,202); +INSERT INTO product_slots VALUES(94,203); +INSERT INTO product_slots VALUES(94,204); +INSERT INTO product_slots VALUES(94,205); +INSERT INTO product_slots VALUES(94,206); +INSERT INTO product_slots VALUES(94,207); +INSERT INTO product_slots VALUES(94,208); +INSERT INTO product_slots VALUES(94,209); +INSERT INTO product_slots VALUES(94,210); +INSERT INTO product_slots VALUES(94,211); +INSERT INTO product_slots VALUES(94,212); +INSERT INTO product_slots VALUES(94,213); +INSERT INTO product_slots VALUES(94,214); +INSERT INTO product_slots VALUES(94,215); +INSERT INTO product_slots VALUES(94,216); +INSERT INTO product_slots VALUES(94,217); +INSERT INTO product_slots VALUES(94,218); +INSERT INTO product_slots VALUES(94,219); +INSERT INTO product_slots VALUES(94,220); +INSERT INTO product_slots VALUES(94,221); +INSERT INTO product_slots VALUES(94,222); +INSERT INTO product_slots VALUES(94,223); +INSERT INTO product_slots VALUES(94,224); +INSERT INTO product_slots VALUES(94,225); +INSERT INTO product_slots VALUES(94,226); +INSERT INTO product_slots VALUES(94,227); +INSERT INTO product_slots VALUES(94,228); +INSERT INTO product_slots VALUES(94,229); +INSERT INTO product_slots VALUES(94,230); +INSERT INTO product_slots VALUES(94,231); +INSERT INTO product_slots VALUES(94,232); +INSERT INTO product_slots VALUES(94,233); +INSERT INTO product_slots VALUES(94,234); +INSERT INTO product_slots VALUES(94,235); +INSERT INTO product_slots VALUES(94,236); +INSERT INTO product_slots VALUES(94,237); +INSERT INTO product_slots VALUES(94,238); +INSERT INTO product_slots VALUES(94,239); +INSERT INTO product_slots VALUES(94,240); +INSERT INTO product_slots VALUES(94,241); +INSERT INTO product_slots VALUES(94,242); +INSERT INTO product_slots VALUES(94,243); +INSERT INTO product_slots VALUES(94,244); +INSERT INTO product_slots VALUES(94,274); +INSERT INTO product_slots VALUES(94,275); +INSERT INTO product_slots VALUES(94,279); +INSERT INTO product_slots VALUES(94,280); +INSERT INTO product_slots VALUES(94,281); +INSERT INTO product_slots VALUES(94,282); +INSERT INTO product_slots VALUES(94,283); +INSERT INTO product_slots VALUES(94,284); +INSERT INTO product_slots VALUES(94,285); +INSERT INTO product_slots VALUES(94,286); +INSERT INTO product_slots VALUES(94,287); +INSERT INTO product_slots VALUES(95,39); +INSERT INTO product_slots VALUES(95,55); +INSERT INTO product_slots VALUES(95,59); +INSERT INTO product_slots VALUES(95,62); +INSERT INTO product_slots VALUES(95,63); +INSERT INTO product_slots VALUES(95,64); +INSERT INTO product_slots VALUES(95,65); +INSERT INTO product_slots VALUES(95,66); +INSERT INTO product_slots VALUES(95,67); +INSERT INTO product_slots VALUES(95,68); +INSERT INTO product_slots VALUES(95,69); +INSERT INTO product_slots VALUES(95,70); +INSERT INTO product_slots VALUES(95,71); +INSERT INTO product_slots VALUES(95,72); +INSERT INTO product_slots VALUES(95,73); +INSERT INTO product_slots VALUES(95,74); +INSERT INTO product_slots VALUES(95,75); +INSERT INTO product_slots VALUES(95,76); +INSERT INTO product_slots VALUES(95,77); +INSERT INTO product_slots VALUES(95,78); +INSERT INTO product_slots VALUES(95,79); +INSERT INTO product_slots VALUES(95,80); +INSERT INTO product_slots VALUES(95,81); +INSERT INTO product_slots VALUES(95,82); +INSERT INTO product_slots VALUES(95,83); +INSERT INTO product_slots VALUES(95,84); +INSERT INTO product_slots VALUES(95,85); +INSERT INTO product_slots VALUES(95,86); +INSERT INTO product_slots VALUES(95,87); +INSERT INTO product_slots VALUES(95,88); +INSERT INTO product_slots VALUES(95,89); +INSERT INTO product_slots VALUES(95,90); +INSERT INTO product_slots VALUES(95,91); +INSERT INTO product_slots VALUES(95,92); +INSERT INTO product_slots VALUES(95,93); +INSERT INTO product_slots VALUES(95,94); +INSERT INTO product_slots VALUES(95,95); +INSERT INTO product_slots VALUES(95,96); +INSERT INTO product_slots VALUES(95,97); +INSERT INTO product_slots VALUES(95,98); +INSERT INTO product_slots VALUES(95,99); +INSERT INTO product_slots VALUES(95,100); +INSERT INTO product_slots VALUES(95,101); +INSERT INTO product_slots VALUES(95,102); +INSERT INTO product_slots VALUES(95,103); +INSERT INTO product_slots VALUES(95,104); +INSERT INTO product_slots VALUES(95,105); +INSERT INTO product_slots VALUES(95,106); +INSERT INTO product_slots VALUES(95,107); +INSERT INTO product_slots VALUES(95,108); +INSERT INTO product_slots VALUES(95,109); +INSERT INTO product_slots VALUES(95,110); +INSERT INTO product_slots VALUES(95,111); +INSERT INTO product_slots VALUES(95,112); +INSERT INTO product_slots VALUES(95,113); +INSERT INTO product_slots VALUES(95,114); +INSERT INTO product_slots VALUES(95,115); +INSERT INTO product_slots VALUES(95,116); +INSERT INTO product_slots VALUES(95,117); +INSERT INTO product_slots VALUES(95,118); +INSERT INTO product_slots VALUES(95,119); +INSERT INTO product_slots VALUES(95,120); +INSERT INTO product_slots VALUES(95,121); +INSERT INTO product_slots VALUES(95,122); +INSERT INTO product_slots VALUES(95,123); +INSERT INTO product_slots VALUES(95,124); +INSERT INTO product_slots VALUES(95,125); +INSERT INTO product_slots VALUES(95,126); +INSERT INTO product_slots VALUES(95,127); +INSERT INTO product_slots VALUES(95,128); +INSERT INTO product_slots VALUES(95,129); +INSERT INTO product_slots VALUES(95,130); +INSERT INTO product_slots VALUES(95,131); +INSERT INTO product_slots VALUES(95,132); +INSERT INTO product_slots VALUES(95,133); +INSERT INTO product_slots VALUES(95,134); +INSERT INTO product_slots VALUES(95,135); +INSERT INTO product_slots VALUES(95,136); +INSERT INTO product_slots VALUES(95,137); +INSERT INTO product_slots VALUES(95,138); +INSERT INTO product_slots VALUES(95,139); +INSERT INTO product_slots VALUES(95,140); +INSERT INTO product_slots VALUES(95,141); +INSERT INTO product_slots VALUES(95,142); +INSERT INTO product_slots VALUES(95,143); +INSERT INTO product_slots VALUES(95,144); +INSERT INTO product_slots VALUES(95,145); +INSERT INTO product_slots VALUES(95,146); +INSERT INTO product_slots VALUES(95,147); +INSERT INTO product_slots VALUES(95,148); +INSERT INTO product_slots VALUES(95,149); +INSERT INTO product_slots VALUES(95,150); +INSERT INTO product_slots VALUES(95,151); +INSERT INTO product_slots VALUES(95,152); +INSERT INTO product_slots VALUES(95,153); +INSERT INTO product_slots VALUES(95,154); +INSERT INTO product_slots VALUES(95,155); +INSERT INTO product_slots VALUES(95,156); +INSERT INTO product_slots VALUES(95,157); +INSERT INTO product_slots VALUES(95,158); +INSERT INTO product_slots VALUES(95,159); +INSERT INTO product_slots VALUES(95,160); +INSERT INTO product_slots VALUES(95,161); +INSERT INTO product_slots VALUES(95,162); +INSERT INTO product_slots VALUES(95,163); +INSERT INTO product_slots VALUES(95,164); +INSERT INTO product_slots VALUES(95,165); +INSERT INTO product_slots VALUES(95,166); +INSERT INTO product_slots VALUES(95,167); +INSERT INTO product_slots VALUES(95,168); +INSERT INTO product_slots VALUES(95,169); +INSERT INTO product_slots VALUES(95,170); +INSERT INTO product_slots VALUES(95,171); +INSERT INTO product_slots VALUES(95,172); +INSERT INTO product_slots VALUES(95,173); +INSERT INTO product_slots VALUES(95,174); +INSERT INTO product_slots VALUES(95,175); +INSERT INTO product_slots VALUES(95,176); +INSERT INTO product_slots VALUES(95,177); +INSERT INTO product_slots VALUES(95,178); +INSERT INTO product_slots VALUES(95,179); +INSERT INTO product_slots VALUES(95,180); +INSERT INTO product_slots VALUES(95,181); +INSERT INTO product_slots VALUES(95,182); +INSERT INTO product_slots VALUES(95,183); +INSERT INTO product_slots VALUES(95,184); +INSERT INTO product_slots VALUES(95,185); +INSERT INTO product_slots VALUES(95,186); +INSERT INTO product_slots VALUES(95,187); +INSERT INTO product_slots VALUES(95,188); +INSERT INTO product_slots VALUES(95,189); +INSERT INTO product_slots VALUES(95,190); +INSERT INTO product_slots VALUES(95,191); +INSERT INTO product_slots VALUES(95,192); +INSERT INTO product_slots VALUES(95,193); +INSERT INTO product_slots VALUES(95,194); +INSERT INTO product_slots VALUES(95,195); +INSERT INTO product_slots VALUES(95,196); +INSERT INTO product_slots VALUES(95,197); +INSERT INTO product_slots VALUES(95,198); +INSERT INTO product_slots VALUES(95,199); +INSERT INTO product_slots VALUES(95,200); +INSERT INTO product_slots VALUES(95,201); +INSERT INTO product_slots VALUES(95,202); +INSERT INTO product_slots VALUES(95,203); +INSERT INTO product_slots VALUES(95,204); +INSERT INTO product_slots VALUES(95,205); +INSERT INTO product_slots VALUES(95,206); +INSERT INTO product_slots VALUES(95,207); +INSERT INTO product_slots VALUES(95,208); +INSERT INTO product_slots VALUES(95,209); +INSERT INTO product_slots VALUES(95,210); +INSERT INTO product_slots VALUES(95,211); +INSERT INTO product_slots VALUES(95,212); +INSERT INTO product_slots VALUES(95,213); +INSERT INTO product_slots VALUES(95,214); +INSERT INTO product_slots VALUES(95,215); +INSERT INTO product_slots VALUES(95,216); +INSERT INTO product_slots VALUES(95,217); +INSERT INTO product_slots VALUES(95,218); +INSERT INTO product_slots VALUES(95,219); +INSERT INTO product_slots VALUES(95,220); +INSERT INTO product_slots VALUES(95,221); +INSERT INTO product_slots VALUES(95,222); +INSERT INTO product_slots VALUES(95,223); +INSERT INTO product_slots VALUES(95,224); +INSERT INTO product_slots VALUES(95,225); +INSERT INTO product_slots VALUES(95,226); +INSERT INTO product_slots VALUES(95,227); +INSERT INTO product_slots VALUES(95,228); +INSERT INTO product_slots VALUES(95,229); +INSERT INTO product_slots VALUES(95,230); +INSERT INTO product_slots VALUES(95,231); +INSERT INTO product_slots VALUES(95,232); +INSERT INTO product_slots VALUES(95,233); +INSERT INTO product_slots VALUES(95,234); +INSERT INTO product_slots VALUES(95,235); +INSERT INTO product_slots VALUES(95,236); +INSERT INTO product_slots VALUES(95,237); +INSERT INTO product_slots VALUES(95,238); +INSERT INTO product_slots VALUES(95,239); +INSERT INTO product_slots VALUES(95,240); +INSERT INTO product_slots VALUES(95,241); +INSERT INTO product_slots VALUES(95,242); +INSERT INTO product_slots VALUES(95,243); +INSERT INTO product_slots VALUES(95,244); +INSERT INTO product_slots VALUES(95,274); +INSERT INTO product_slots VALUES(95,275); +INSERT INTO product_slots VALUES(95,279); +INSERT INTO product_slots VALUES(95,280); +INSERT INTO product_slots VALUES(95,281); +INSERT INTO product_slots VALUES(95,282); +INSERT INTO product_slots VALUES(95,283); +INSERT INTO product_slots VALUES(95,284); +INSERT INTO product_slots VALUES(95,285); +INSERT INTO product_slots VALUES(95,286); +INSERT INTO product_slots VALUES(95,287); +INSERT INTO product_slots VALUES(96,59); +INSERT INTO product_slots VALUES(96,62); +INSERT INTO product_slots VALUES(96,63); +INSERT INTO product_slots VALUES(96,64); +INSERT INTO product_slots VALUES(96,65); +INSERT INTO product_slots VALUES(96,66); +INSERT INTO product_slots VALUES(96,67); +INSERT INTO product_slots VALUES(96,68); +INSERT INTO product_slots VALUES(96,69); +INSERT INTO product_slots VALUES(96,70); +INSERT INTO product_slots VALUES(96,71); +INSERT INTO product_slots VALUES(96,72); +INSERT INTO product_slots VALUES(96,73); +INSERT INTO product_slots VALUES(96,74); +INSERT INTO product_slots VALUES(96,75); +INSERT INTO product_slots VALUES(96,76); +INSERT INTO product_slots VALUES(96,77); +INSERT INTO product_slots VALUES(96,78); +INSERT INTO product_slots VALUES(96,79); +INSERT INTO product_slots VALUES(96,80); +INSERT INTO product_slots VALUES(96,81); +INSERT INTO product_slots VALUES(96,82); +INSERT INTO product_slots VALUES(96,83); +INSERT INTO product_slots VALUES(96,84); +INSERT INTO product_slots VALUES(96,85); +INSERT INTO product_slots VALUES(96,86); +INSERT INTO product_slots VALUES(96,87); +INSERT INTO product_slots VALUES(96,88); +INSERT INTO product_slots VALUES(96,89); +INSERT INTO product_slots VALUES(96,90); +INSERT INTO product_slots VALUES(96,91); +INSERT INTO product_slots VALUES(96,92); +INSERT INTO product_slots VALUES(96,93); +INSERT INTO product_slots VALUES(96,94); +INSERT INTO product_slots VALUES(96,95); +INSERT INTO product_slots VALUES(96,96); +INSERT INTO product_slots VALUES(96,97); +INSERT INTO product_slots VALUES(96,98); +INSERT INTO product_slots VALUES(96,99); +INSERT INTO product_slots VALUES(96,100); +INSERT INTO product_slots VALUES(96,102); +INSERT INTO product_slots VALUES(96,103); +INSERT INTO product_slots VALUES(96,104); +INSERT INTO product_slots VALUES(96,105); +INSERT INTO product_slots VALUES(96,106); +INSERT INTO product_slots VALUES(96,107); +INSERT INTO product_slots VALUES(96,108); +INSERT INTO product_slots VALUES(96,109); +INSERT INTO product_slots VALUES(96,110); +INSERT INTO product_slots VALUES(96,111); +INSERT INTO product_slots VALUES(96,112); +INSERT INTO product_slots VALUES(96,113); +INSERT INTO product_slots VALUES(96,114); +INSERT INTO product_slots VALUES(96,115); +INSERT INTO product_slots VALUES(96,117); +INSERT INTO product_slots VALUES(96,118); +INSERT INTO product_slots VALUES(96,119); +INSERT INTO product_slots VALUES(96,120); +INSERT INTO product_slots VALUES(96,121); +INSERT INTO product_slots VALUES(96,122); +INSERT INTO product_slots VALUES(96,124); +INSERT INTO product_slots VALUES(96,125); +INSERT INTO product_slots VALUES(96,126); +INSERT INTO product_slots VALUES(96,127); +INSERT INTO product_slots VALUES(96,128); +INSERT INTO product_slots VALUES(96,129); +INSERT INTO product_slots VALUES(96,130); +INSERT INTO product_slots VALUES(96,131); +INSERT INTO product_slots VALUES(96,132); +INSERT INTO product_slots VALUES(96,133); +INSERT INTO product_slots VALUES(96,134); +INSERT INTO product_slots VALUES(96,135); +INSERT INTO product_slots VALUES(96,136); +INSERT INTO product_slots VALUES(96,138); +INSERT INTO product_slots VALUES(96,139); +INSERT INTO product_slots VALUES(96,140); +INSERT INTO product_slots VALUES(96,141); +INSERT INTO product_slots VALUES(96,142); +INSERT INTO product_slots VALUES(96,143); +INSERT INTO product_slots VALUES(96,145); +INSERT INTO product_slots VALUES(96,146); +INSERT INTO product_slots VALUES(96,147); +INSERT INTO product_slots VALUES(96,148); +INSERT INTO product_slots VALUES(96,149); +INSERT INTO product_slots VALUES(96,150); +INSERT INTO product_slots VALUES(96,151); +INSERT INTO product_slots VALUES(96,152); +INSERT INTO product_slots VALUES(96,153); +INSERT INTO product_slots VALUES(96,154); +INSERT INTO product_slots VALUES(96,155); +INSERT INTO product_slots VALUES(96,156); +INSERT INTO product_slots VALUES(96,157); +INSERT INTO product_slots VALUES(96,158); +INSERT INTO product_slots VALUES(96,159); +INSERT INTO product_slots VALUES(96,160); +INSERT INTO product_slots VALUES(96,161); +INSERT INTO product_slots VALUES(96,162); +INSERT INTO product_slots VALUES(96,163); +INSERT INTO product_slots VALUES(96,164); +INSERT INTO product_slots VALUES(96,165); +INSERT INTO product_slots VALUES(96,166); +INSERT INTO product_slots VALUES(96,167); +INSERT INTO product_slots VALUES(96,168); +INSERT INTO product_slots VALUES(96,169); +INSERT INTO product_slots VALUES(96,170); +INSERT INTO product_slots VALUES(96,171); +INSERT INTO product_slots VALUES(96,172); +INSERT INTO product_slots VALUES(96,173); +INSERT INTO product_slots VALUES(96,174); +INSERT INTO product_slots VALUES(96,175); +INSERT INTO product_slots VALUES(96,176); +INSERT INTO product_slots VALUES(96,177); +INSERT INTO product_slots VALUES(96,178); +INSERT INTO product_slots VALUES(96,179); +INSERT INTO product_slots VALUES(96,180); +INSERT INTO product_slots VALUES(96,181); +INSERT INTO product_slots VALUES(96,182); +INSERT INTO product_slots VALUES(96,183); +INSERT INTO product_slots VALUES(96,184); +INSERT INTO product_slots VALUES(96,185); +INSERT INTO product_slots VALUES(96,186); +INSERT INTO product_slots VALUES(96,187); +INSERT INTO product_slots VALUES(96,188); +INSERT INTO product_slots VALUES(96,189); +INSERT INTO product_slots VALUES(96,190); +INSERT INTO product_slots VALUES(96,191); +INSERT INTO product_slots VALUES(96,192); +INSERT INTO product_slots VALUES(96,193); +INSERT INTO product_slots VALUES(96,194); +INSERT INTO product_slots VALUES(96,195); +INSERT INTO product_slots VALUES(96,196); +INSERT INTO product_slots VALUES(96,197); +INSERT INTO product_slots VALUES(96,198); +INSERT INTO product_slots VALUES(96,199); +INSERT INTO product_slots VALUES(96,200); +INSERT INTO product_slots VALUES(96,201); +INSERT INTO product_slots VALUES(96,202); +INSERT INTO product_slots VALUES(96,203); +INSERT INTO product_slots VALUES(96,204); +INSERT INTO product_slots VALUES(96,205); +INSERT INTO product_slots VALUES(96,206); +INSERT INTO product_slots VALUES(96,207); +INSERT INTO product_slots VALUES(96,208); +INSERT INTO product_slots VALUES(96,209); +INSERT INTO product_slots VALUES(96,210); +INSERT INTO product_slots VALUES(96,211); +INSERT INTO product_slots VALUES(96,212); +INSERT INTO product_slots VALUES(96,213); +INSERT INTO product_slots VALUES(96,214); +INSERT INTO product_slots VALUES(96,215); +INSERT INTO product_slots VALUES(96,216); +INSERT INTO product_slots VALUES(96,217); +INSERT INTO product_slots VALUES(96,218); +INSERT INTO product_slots VALUES(96,219); +INSERT INTO product_slots VALUES(96,220); +INSERT INTO product_slots VALUES(96,221); +INSERT INTO product_slots VALUES(96,222); +INSERT INTO product_slots VALUES(96,223); +INSERT INTO product_slots VALUES(96,224); +INSERT INTO product_slots VALUES(96,225); +INSERT INTO product_slots VALUES(96,226); +INSERT INTO product_slots VALUES(96,227); +INSERT INTO product_slots VALUES(96,228); +INSERT INTO product_slots VALUES(96,229); +INSERT INTO product_slots VALUES(96,230); +INSERT INTO product_slots VALUES(96,231); +INSERT INTO product_slots VALUES(96,232); +INSERT INTO product_slots VALUES(96,233); +INSERT INTO product_slots VALUES(96,234); +INSERT INTO product_slots VALUES(96,235); +INSERT INTO product_slots VALUES(96,236); +INSERT INTO product_slots VALUES(96,237); +INSERT INTO product_slots VALUES(96,238); +INSERT INTO product_slots VALUES(96,239); +INSERT INTO product_slots VALUES(96,240); +INSERT INTO product_slots VALUES(96,241); +INSERT INTO product_slots VALUES(96,242); +INSERT INTO product_slots VALUES(96,243); +INSERT INTO product_slots VALUES(96,244); +INSERT INTO product_slots VALUES(96,274); +INSERT INTO product_slots VALUES(96,275); +INSERT INTO product_slots VALUES(96,279); +INSERT INTO product_slots VALUES(96,280); +INSERT INTO product_slots VALUES(96,281); +INSERT INTO product_slots VALUES(96,282); +INSERT INTO product_slots VALUES(96,283); +INSERT INTO product_slots VALUES(96,284); +INSERT INTO product_slots VALUES(96,285); +INSERT INTO product_slots VALUES(96,286); +INSERT INTO product_slots VALUES(96,287); +INSERT INTO product_slots VALUES(97,39); +INSERT INTO product_slots VALUES(97,55); +INSERT INTO product_slots VALUES(97,59); +INSERT INTO product_slots VALUES(97,62); +INSERT INTO product_slots VALUES(97,63); +INSERT INTO product_slots VALUES(97,64); +INSERT INTO product_slots VALUES(97,65); +INSERT INTO product_slots VALUES(97,66); +INSERT INTO product_slots VALUES(97,67); +INSERT INTO product_slots VALUES(97,68); +INSERT INTO product_slots VALUES(97,69); +INSERT INTO product_slots VALUES(97,70); +INSERT INTO product_slots VALUES(97,71); +INSERT INTO product_slots VALUES(97,72); +INSERT INTO product_slots VALUES(97,73); +INSERT INTO product_slots VALUES(97,74); +INSERT INTO product_slots VALUES(97,75); +INSERT INTO product_slots VALUES(97,76); +INSERT INTO product_slots VALUES(97,77); +INSERT INTO product_slots VALUES(97,78); +INSERT INTO product_slots VALUES(97,79); +INSERT INTO product_slots VALUES(97,80); +INSERT INTO product_slots VALUES(97,81); +INSERT INTO product_slots VALUES(97,82); +INSERT INTO product_slots VALUES(97,83); +INSERT INTO product_slots VALUES(97,84); +INSERT INTO product_slots VALUES(97,85); +INSERT INTO product_slots VALUES(97,86); +INSERT INTO product_slots VALUES(97,87); +INSERT INTO product_slots VALUES(97,88); +INSERT INTO product_slots VALUES(97,89); +INSERT INTO product_slots VALUES(97,90); +INSERT INTO product_slots VALUES(97,91); +INSERT INTO product_slots VALUES(97,92); +INSERT INTO product_slots VALUES(97,93); +INSERT INTO product_slots VALUES(97,94); +INSERT INTO product_slots VALUES(97,95); +INSERT INTO product_slots VALUES(97,96); +INSERT INTO product_slots VALUES(97,97); +INSERT INTO product_slots VALUES(97,98); +INSERT INTO product_slots VALUES(97,99); +INSERT INTO product_slots VALUES(97,100); +INSERT INTO product_slots VALUES(97,101); +INSERT INTO product_slots VALUES(97,102); +INSERT INTO product_slots VALUES(97,103); +INSERT INTO product_slots VALUES(97,104); +INSERT INTO product_slots VALUES(97,105); +INSERT INTO product_slots VALUES(97,106); +INSERT INTO product_slots VALUES(97,107); +INSERT INTO product_slots VALUES(97,108); +INSERT INTO product_slots VALUES(97,109); +INSERT INTO product_slots VALUES(97,110); +INSERT INTO product_slots VALUES(97,111); +INSERT INTO product_slots VALUES(97,112); +INSERT INTO product_slots VALUES(97,113); +INSERT INTO product_slots VALUES(97,114); +INSERT INTO product_slots VALUES(97,115); +INSERT INTO product_slots VALUES(97,116); +INSERT INTO product_slots VALUES(97,117); +INSERT INTO product_slots VALUES(97,118); +INSERT INTO product_slots VALUES(97,119); +INSERT INTO product_slots VALUES(97,120); +INSERT INTO product_slots VALUES(97,121); +INSERT INTO product_slots VALUES(97,122); +INSERT INTO product_slots VALUES(97,123); +INSERT INTO product_slots VALUES(97,124); +INSERT INTO product_slots VALUES(97,125); +INSERT INTO product_slots VALUES(97,126); +INSERT INTO product_slots VALUES(97,127); +INSERT INTO product_slots VALUES(97,128); +INSERT INTO product_slots VALUES(97,129); +INSERT INTO product_slots VALUES(97,130); +INSERT INTO product_slots VALUES(97,131); +INSERT INTO product_slots VALUES(97,132); +INSERT INTO product_slots VALUES(97,133); +INSERT INTO product_slots VALUES(97,134); +INSERT INTO product_slots VALUES(97,135); +INSERT INTO product_slots VALUES(97,136); +INSERT INTO product_slots VALUES(97,137); +INSERT INTO product_slots VALUES(97,138); +INSERT INTO product_slots VALUES(97,139); +INSERT INTO product_slots VALUES(97,140); +INSERT INTO product_slots VALUES(97,141); +INSERT INTO product_slots VALUES(97,142); +INSERT INTO product_slots VALUES(97,143); +INSERT INTO product_slots VALUES(97,144); +INSERT INTO product_slots VALUES(97,145); +INSERT INTO product_slots VALUES(97,146); +INSERT INTO product_slots VALUES(97,147); +INSERT INTO product_slots VALUES(97,148); +INSERT INTO product_slots VALUES(97,149); +INSERT INTO product_slots VALUES(97,150); +INSERT INTO product_slots VALUES(97,151); +INSERT INTO product_slots VALUES(97,152); +INSERT INTO product_slots VALUES(97,153); +INSERT INTO product_slots VALUES(97,154); +INSERT INTO product_slots VALUES(97,155); +INSERT INTO product_slots VALUES(97,156); +INSERT INTO product_slots VALUES(97,157); +INSERT INTO product_slots VALUES(97,158); +INSERT INTO product_slots VALUES(97,159); +INSERT INTO product_slots VALUES(97,160); +INSERT INTO product_slots VALUES(97,161); +INSERT INTO product_slots VALUES(97,162); +INSERT INTO product_slots VALUES(97,163); +INSERT INTO product_slots VALUES(97,164); +INSERT INTO product_slots VALUES(97,165); +INSERT INTO product_slots VALUES(97,166); +INSERT INTO product_slots VALUES(97,167); +INSERT INTO product_slots VALUES(97,168); +INSERT INTO product_slots VALUES(97,169); +INSERT INTO product_slots VALUES(97,170); +INSERT INTO product_slots VALUES(97,171); +INSERT INTO product_slots VALUES(97,172); +INSERT INTO product_slots VALUES(97,173); +INSERT INTO product_slots VALUES(97,174); +INSERT INTO product_slots VALUES(97,175); +INSERT INTO product_slots VALUES(97,176); +INSERT INTO product_slots VALUES(97,177); +INSERT INTO product_slots VALUES(97,178); +INSERT INTO product_slots VALUES(97,179); +INSERT INTO product_slots VALUES(97,180); +INSERT INTO product_slots VALUES(97,181); +INSERT INTO product_slots VALUES(97,182); +INSERT INTO product_slots VALUES(97,183); +INSERT INTO product_slots VALUES(97,184); +INSERT INTO product_slots VALUES(97,185); +INSERT INTO product_slots VALUES(97,186); +INSERT INTO product_slots VALUES(97,187); +INSERT INTO product_slots VALUES(97,188); +INSERT INTO product_slots VALUES(97,189); +INSERT INTO product_slots VALUES(97,190); +INSERT INTO product_slots VALUES(97,191); +INSERT INTO product_slots VALUES(97,192); +INSERT INTO product_slots VALUES(97,193); +INSERT INTO product_slots VALUES(97,194); +INSERT INTO product_slots VALUES(97,195); +INSERT INTO product_slots VALUES(97,196); +INSERT INTO product_slots VALUES(97,197); +INSERT INTO product_slots VALUES(97,198); +INSERT INTO product_slots VALUES(97,199); +INSERT INTO product_slots VALUES(97,200); +INSERT INTO product_slots VALUES(97,201); +INSERT INTO product_slots VALUES(97,202); +INSERT INTO product_slots VALUES(97,203); +INSERT INTO product_slots VALUES(97,204); +INSERT INTO product_slots VALUES(97,205); +INSERT INTO product_slots VALUES(97,206); +INSERT INTO product_slots VALUES(97,207); +INSERT INTO product_slots VALUES(97,208); +INSERT INTO product_slots VALUES(97,209); +INSERT INTO product_slots VALUES(97,210); +INSERT INTO product_slots VALUES(97,211); +INSERT INTO product_slots VALUES(97,212); +INSERT INTO product_slots VALUES(97,213); +INSERT INTO product_slots VALUES(97,214); +INSERT INTO product_slots VALUES(97,215); +INSERT INTO product_slots VALUES(97,216); +INSERT INTO product_slots VALUES(97,217); +INSERT INTO product_slots VALUES(97,218); +INSERT INTO product_slots VALUES(97,219); +INSERT INTO product_slots VALUES(97,220); +INSERT INTO product_slots VALUES(97,221); +INSERT INTO product_slots VALUES(97,222); +INSERT INTO product_slots VALUES(97,223); +INSERT INTO product_slots VALUES(97,224); +INSERT INTO product_slots VALUES(97,225); +INSERT INTO product_slots VALUES(97,226); +INSERT INTO product_slots VALUES(97,227); +INSERT INTO product_slots VALUES(97,228); +INSERT INTO product_slots VALUES(97,229); +INSERT INTO product_slots VALUES(97,230); +INSERT INTO product_slots VALUES(97,231); +INSERT INTO product_slots VALUES(97,232); +INSERT INTO product_slots VALUES(97,233); +INSERT INTO product_slots VALUES(97,234); +INSERT INTO product_slots VALUES(97,235); +INSERT INTO product_slots VALUES(97,236); +INSERT INTO product_slots VALUES(97,237); +INSERT INTO product_slots VALUES(97,238); +INSERT INTO product_slots VALUES(97,239); +INSERT INTO product_slots VALUES(97,240); +INSERT INTO product_slots VALUES(97,241); +INSERT INTO product_slots VALUES(97,242); +INSERT INTO product_slots VALUES(97,243); +INSERT INTO product_slots VALUES(97,244); +INSERT INTO product_slots VALUES(97,274); +INSERT INTO product_slots VALUES(97,275); +INSERT INTO product_slots VALUES(97,279); +INSERT INTO product_slots VALUES(97,280); +INSERT INTO product_slots VALUES(97,281); +INSERT INTO product_slots VALUES(97,282); +INSERT INTO product_slots VALUES(97,283); +INSERT INTO product_slots VALUES(97,284); +INSERT INTO product_slots VALUES(97,285); +INSERT INTO product_slots VALUES(97,286); +INSERT INTO product_slots VALUES(97,287); +INSERT INTO product_slots VALUES(98,81); +INSERT INTO product_slots VALUES(98,82); +INSERT INTO product_slots VALUES(98,83); +INSERT INTO product_slots VALUES(98,87); +INSERT INTO product_slots VALUES(98,89); +INSERT INTO product_slots VALUES(98,90); +INSERT INTO product_slots VALUES(98,91); +INSERT INTO product_slots VALUES(98,92); +INSERT INTO product_slots VALUES(98,93); +INSERT INTO product_slots VALUES(98,94); +INSERT INTO product_slots VALUES(98,96); +INSERT INTO product_slots VALUES(98,97); +INSERT INTO product_slots VALUES(98,98); +INSERT INTO product_slots VALUES(98,99); +INSERT INTO product_slots VALUES(98,100); +INSERT INTO product_slots VALUES(98,102); +INSERT INTO product_slots VALUES(98,103); +INSERT INTO product_slots VALUES(98,104); +INSERT INTO product_slots VALUES(98,105); +INSERT INTO product_slots VALUES(98,106); +INSERT INTO product_slots VALUES(98,107); +INSERT INTO product_slots VALUES(98,108); +INSERT INTO product_slots VALUES(98,109); +INSERT INTO product_slots VALUES(98,110); +INSERT INTO product_slots VALUES(98,111); +INSERT INTO product_slots VALUES(98,112); +INSERT INTO product_slots VALUES(98,113); +INSERT INTO product_slots VALUES(98,114); +INSERT INTO product_slots VALUES(98,115); +INSERT INTO product_slots VALUES(98,117); +INSERT INTO product_slots VALUES(98,118); +INSERT INTO product_slots VALUES(98,119); +INSERT INTO product_slots VALUES(98,120); +INSERT INTO product_slots VALUES(98,123); +INSERT INTO product_slots VALUES(98,124); +INSERT INTO product_slots VALUES(98,125); +INSERT INTO product_slots VALUES(98,126); +INSERT INTO product_slots VALUES(98,130); +INSERT INTO product_slots VALUES(98,131); +INSERT INTO product_slots VALUES(98,132); +INSERT INTO product_slots VALUES(98,133); +INSERT INTO product_slots VALUES(98,137); +INSERT INTO product_slots VALUES(98,138); +INSERT INTO product_slots VALUES(98,139); +INSERT INTO product_slots VALUES(98,140); +INSERT INTO product_slots VALUES(98,144); +INSERT INTO product_slots VALUES(98,145); +INSERT INTO product_slots VALUES(98,146); +INSERT INTO product_slots VALUES(98,147); +INSERT INTO product_slots VALUES(98,148); +INSERT INTO product_slots VALUES(98,149); +INSERT INTO product_slots VALUES(98,150); +INSERT INTO product_slots VALUES(98,151); +INSERT INTO product_slots VALUES(98,155); +INSERT INTO product_slots VALUES(98,156); +INSERT INTO product_slots VALUES(98,157); +INSERT INTO product_slots VALUES(98,158); +INSERT INTO product_slots VALUES(98,162); +INSERT INTO product_slots VALUES(98,163); +INSERT INTO product_slots VALUES(98,164); +INSERT INTO product_slots VALUES(98,165); +INSERT INTO product_slots VALUES(98,166); +INSERT INTO product_slots VALUES(98,169); +INSERT INTO product_slots VALUES(98,170); +INSERT INTO product_slots VALUES(98,171); +INSERT INTO product_slots VALUES(98,172); +INSERT INTO product_slots VALUES(98,173); +INSERT INTO product_slots VALUES(98,176); +INSERT INTO product_slots VALUES(98,177); +INSERT INTO product_slots VALUES(98,178); +INSERT INTO product_slots VALUES(98,179); +INSERT INTO product_slots VALUES(98,180); +INSERT INTO product_slots VALUES(98,181); +INSERT INTO product_slots VALUES(98,182); +INSERT INTO product_slots VALUES(98,183); +INSERT INTO product_slots VALUES(98,184); +INSERT INTO product_slots VALUES(98,185); +INSERT INTO product_slots VALUES(98,186); +INSERT INTO product_slots VALUES(98,187); +INSERT INTO product_slots VALUES(98,188); +INSERT INTO product_slots VALUES(98,189); +INSERT INTO product_slots VALUES(98,190); +INSERT INTO product_slots VALUES(98,191); +INSERT INTO product_slots VALUES(98,192); +INSERT INTO product_slots VALUES(98,193); +INSERT INTO product_slots VALUES(98,194); +INSERT INTO product_slots VALUES(98,198); +INSERT INTO product_slots VALUES(98,199); +INSERT INTO product_slots VALUES(98,200); +INSERT INTO product_slots VALUES(98,201); +INSERT INTO product_slots VALUES(98,202); +INSERT INTO product_slots VALUES(98,203); +INSERT INTO product_slots VALUES(98,205); +INSERT INTO product_slots VALUES(98,208); +INSERT INTO product_slots VALUES(98,209); +INSERT INTO product_slots VALUES(98,210); +INSERT INTO product_slots VALUES(98,211); +INSERT INTO product_slots VALUES(98,216); +INSERT INTO product_slots VALUES(98,217); +INSERT INTO product_slots VALUES(98,218); +INSERT INTO product_slots VALUES(98,219); +INSERT INTO product_slots VALUES(98,220); +INSERT INTO product_slots VALUES(98,223); +INSERT INTO product_slots VALUES(98,224); +INSERT INTO product_slots VALUES(98,225); +INSERT INTO product_slots VALUES(98,226); +INSERT INTO product_slots VALUES(98,230); +INSERT INTO product_slots VALUES(98,231); +INSERT INTO product_slots VALUES(98,232); +INSERT INTO product_slots VALUES(98,234); +INSERT INTO product_slots VALUES(98,237); +INSERT INTO product_slots VALUES(98,238); +INSERT INTO product_slots VALUES(98,239); +INSERT INTO product_slots VALUES(98,240); +INSERT INTO product_slots VALUES(98,274); +INSERT INTO product_slots VALUES(98,275); +INSERT INTO product_slots VALUES(98,277); +INSERT INTO product_slots VALUES(98,278); +INSERT INTO product_slots VALUES(98,279); +INSERT INTO product_slots VALUES(99,81); +INSERT INTO product_slots VALUES(99,82); +INSERT INTO product_slots VALUES(99,83); +INSERT INTO product_slots VALUES(99,87); +INSERT INTO product_slots VALUES(99,89); +INSERT INTO product_slots VALUES(99,90); +INSERT INTO product_slots VALUES(99,91); +INSERT INTO product_slots VALUES(99,92); +INSERT INTO product_slots VALUES(99,93); +INSERT INTO product_slots VALUES(99,94); +INSERT INTO product_slots VALUES(99,96); +INSERT INTO product_slots VALUES(99,97); +INSERT INTO product_slots VALUES(99,98); +INSERT INTO product_slots VALUES(99,99); +INSERT INTO product_slots VALUES(99,100); +INSERT INTO product_slots VALUES(99,102); +INSERT INTO product_slots VALUES(99,103); +INSERT INTO product_slots VALUES(99,104); +INSERT INTO product_slots VALUES(99,105); +INSERT INTO product_slots VALUES(99,106); +INSERT INTO product_slots VALUES(99,107); +INSERT INTO product_slots VALUES(99,108); +INSERT INTO product_slots VALUES(99,109); +INSERT INTO product_slots VALUES(99,110); +INSERT INTO product_slots VALUES(99,111); +INSERT INTO product_slots VALUES(99,112); +INSERT INTO product_slots VALUES(99,113); +INSERT INTO product_slots VALUES(99,114); +INSERT INTO product_slots VALUES(99,115); +INSERT INTO product_slots VALUES(99,118); +INSERT INTO product_slots VALUES(99,119); +INSERT INTO product_slots VALUES(99,120); +INSERT INTO product_slots VALUES(99,123); +INSERT INTO product_slots VALUES(99,124); +INSERT INTO product_slots VALUES(99,125); +INSERT INTO product_slots VALUES(99,126); +INSERT INTO product_slots VALUES(99,130); +INSERT INTO product_slots VALUES(99,131); +INSERT INTO product_slots VALUES(99,132); +INSERT INTO product_slots VALUES(99,133); +INSERT INTO product_slots VALUES(99,137); +INSERT INTO product_slots VALUES(99,138); +INSERT INTO product_slots VALUES(99,139); +INSERT INTO product_slots VALUES(99,140); +INSERT INTO product_slots VALUES(99,144); +INSERT INTO product_slots VALUES(99,145); +INSERT INTO product_slots VALUES(99,146); +INSERT INTO product_slots VALUES(99,147); +INSERT INTO product_slots VALUES(99,148); +INSERT INTO product_slots VALUES(99,149); +INSERT INTO product_slots VALUES(99,150); +INSERT INTO product_slots VALUES(99,151); +INSERT INTO product_slots VALUES(99,155); +INSERT INTO product_slots VALUES(99,156); +INSERT INTO product_slots VALUES(99,157); +INSERT INTO product_slots VALUES(99,158); +INSERT INTO product_slots VALUES(99,162); +INSERT INTO product_slots VALUES(99,163); +INSERT INTO product_slots VALUES(99,164); +INSERT INTO product_slots VALUES(99,165); +INSERT INTO product_slots VALUES(99,166); +INSERT INTO product_slots VALUES(99,169); +INSERT INTO product_slots VALUES(99,170); +INSERT INTO product_slots VALUES(99,171); +INSERT INTO product_slots VALUES(99,172); +INSERT INTO product_slots VALUES(99,173); +INSERT INTO product_slots VALUES(99,176); +INSERT INTO product_slots VALUES(99,177); +INSERT INTO product_slots VALUES(99,178); +INSERT INTO product_slots VALUES(99,179); +INSERT INTO product_slots VALUES(99,180); +INSERT INTO product_slots VALUES(99,181); +INSERT INTO product_slots VALUES(99,182); +INSERT INTO product_slots VALUES(99,183); +INSERT INTO product_slots VALUES(99,184); +INSERT INTO product_slots VALUES(99,185); +INSERT INTO product_slots VALUES(99,186); +INSERT INTO product_slots VALUES(99,187); +INSERT INTO product_slots VALUES(99,188); +INSERT INTO product_slots VALUES(99,189); +INSERT INTO product_slots VALUES(99,190); +INSERT INTO product_slots VALUES(99,191); +INSERT INTO product_slots VALUES(99,192); +INSERT INTO product_slots VALUES(99,193); +INSERT INTO product_slots VALUES(99,194); +INSERT INTO product_slots VALUES(99,198); +INSERT INTO product_slots VALUES(99,199); +INSERT INTO product_slots VALUES(99,200); +INSERT INTO product_slots VALUES(99,201); +INSERT INTO product_slots VALUES(99,202); +INSERT INTO product_slots VALUES(99,203); +INSERT INTO product_slots VALUES(99,205); +INSERT INTO product_slots VALUES(99,208); +INSERT INTO product_slots VALUES(99,209); +INSERT INTO product_slots VALUES(99,210); +INSERT INTO product_slots VALUES(99,211); +INSERT INTO product_slots VALUES(99,216); +INSERT INTO product_slots VALUES(99,217); +INSERT INTO product_slots VALUES(99,218); +INSERT INTO product_slots VALUES(99,219); +INSERT INTO product_slots VALUES(99,220); +INSERT INTO product_slots VALUES(99,223); +INSERT INTO product_slots VALUES(99,224); +INSERT INTO product_slots VALUES(99,225); +INSERT INTO product_slots VALUES(99,226); +INSERT INTO product_slots VALUES(99,230); +INSERT INTO product_slots VALUES(99,231); +INSERT INTO product_slots VALUES(99,232); +INSERT INTO product_slots VALUES(99,234); +INSERT INTO product_slots VALUES(99,237); +INSERT INTO product_slots VALUES(99,238); +INSERT INTO product_slots VALUES(99,239); +INSERT INTO product_slots VALUES(99,240); +INSERT INTO product_slots VALUES(99,274); +INSERT INTO product_slots VALUES(99,275); +INSERT INTO product_slots VALUES(99,277); +INSERT INTO product_slots VALUES(99,278); +INSERT INTO product_slots VALUES(99,279); +INSERT INTO product_slots VALUES(100,102); +INSERT INTO product_slots VALUES(100,103); +INSERT INTO product_slots VALUES(100,104); +INSERT INTO product_slots VALUES(100,105); +INSERT INTO product_slots VALUES(100,106); +INSERT INTO product_slots VALUES(100,107); +INSERT INTO product_slots VALUES(100,108); +INSERT INTO product_slots VALUES(100,109); +INSERT INTO product_slots VALUES(100,110); +INSERT INTO product_slots VALUES(100,111); +INSERT INTO product_slots VALUES(100,112); +INSERT INTO product_slots VALUES(100,113); +INSERT INTO product_slots VALUES(100,114); +INSERT INTO product_slots VALUES(100,115); +INSERT INTO product_slots VALUES(100,120); +INSERT INTO product_slots VALUES(100,121); +INSERT INTO product_slots VALUES(100,122); +INSERT INTO product_slots VALUES(100,134); +INSERT INTO product_slots VALUES(100,135); +INSERT INTO product_slots VALUES(100,136); +INSERT INTO product_slots VALUES(100,139); +INSERT INTO product_slots VALUES(100,140); +INSERT INTO product_slots VALUES(100,141); +INSERT INTO product_slots VALUES(100,142); +INSERT INTO product_slots VALUES(100,143); +INSERT INTO product_slots VALUES(100,145); +INSERT INTO product_slots VALUES(100,146); +INSERT INTO product_slots VALUES(100,147); +INSERT INTO product_slots VALUES(100,148); +INSERT INTO product_slots VALUES(100,149); +INSERT INTO product_slots VALUES(100,150); +INSERT INTO product_slots VALUES(100,151); +INSERT INTO product_slots VALUES(100,152); +INSERT INTO product_slots VALUES(100,153); +INSERT INTO product_slots VALUES(100,154); +INSERT INTO product_slots VALUES(100,155); +INSERT INTO product_slots VALUES(100,157); +INSERT INTO product_slots VALUES(100,158); +INSERT INTO product_slots VALUES(100,159); +INSERT INTO product_slots VALUES(100,160); +INSERT INTO product_slots VALUES(100,161); +INSERT INTO product_slots VALUES(100,162); +INSERT INTO product_slots VALUES(100,163); +INSERT INTO product_slots VALUES(100,168); +INSERT INTO product_slots VALUES(100,170); +INSERT INTO product_slots VALUES(100,171); +INSERT INTO product_slots VALUES(100,172); +INSERT INTO product_slots VALUES(100,173); +INSERT INTO product_slots VALUES(100,174); +INSERT INTO product_slots VALUES(100,175); +INSERT INTO product_slots VALUES(100,177); +INSERT INTO product_slots VALUES(100,178); +INSERT INTO product_slots VALUES(100,179); +INSERT INTO product_slots VALUES(100,180); +INSERT INTO product_slots VALUES(100,181); +INSERT INTO product_slots VALUES(100,182); +INSERT INTO product_slots VALUES(100,183); +INSERT INTO product_slots VALUES(100,184); +INSERT INTO product_slots VALUES(100,185); +INSERT INTO product_slots VALUES(100,186); +INSERT INTO product_slots VALUES(100,187); +INSERT INTO product_slots VALUES(100,188); +INSERT INTO product_slots VALUES(100,189); +INSERT INTO product_slots VALUES(100,190); +INSERT INTO product_slots VALUES(100,191); +INSERT INTO product_slots VALUES(100,192); +INSERT INTO product_slots VALUES(100,193); +INSERT INTO product_slots VALUES(100,194); +INSERT INTO product_slots VALUES(100,195); +INSERT INTO product_slots VALUES(100,196); +INSERT INTO product_slots VALUES(100,197); +INSERT INTO product_slots VALUES(100,198); +INSERT INTO product_slots VALUES(100,199); +INSERT INTO product_slots VALUES(100,200); +INSERT INTO product_slots VALUES(100,201); +INSERT INTO product_slots VALUES(100,202); +INSERT INTO product_slots VALUES(100,203); +INSERT INTO product_slots VALUES(100,204); +INSERT INTO product_slots VALUES(100,205); +INSERT INTO product_slots VALUES(100,206); +INSERT INTO product_slots VALUES(100,207); +INSERT INTO product_slots VALUES(100,208); +INSERT INTO product_slots VALUES(100,209); +INSERT INTO product_slots VALUES(100,210); +INSERT INTO product_slots VALUES(100,211); +INSERT INTO product_slots VALUES(100,212); +INSERT INTO product_slots VALUES(100,213); +INSERT INTO product_slots VALUES(100,214); +INSERT INTO product_slots VALUES(100,215); +INSERT INTO product_slots VALUES(100,216); +INSERT INTO product_slots VALUES(100,217); +INSERT INTO product_slots VALUES(100,218); +INSERT INTO product_slots VALUES(100,219); +INSERT INTO product_slots VALUES(100,220); +INSERT INTO product_slots VALUES(100,221); +INSERT INTO product_slots VALUES(100,222); +INSERT INTO product_slots VALUES(100,223); +INSERT INTO product_slots VALUES(100,224); +INSERT INTO product_slots VALUES(100,225); +INSERT INTO product_slots VALUES(100,226); +INSERT INTO product_slots VALUES(100,227); +INSERT INTO product_slots VALUES(100,228); +INSERT INTO product_slots VALUES(100,229); +INSERT INTO product_slots VALUES(100,230); +INSERT INTO product_slots VALUES(100,231); +INSERT INTO product_slots VALUES(100,232); +INSERT INTO product_slots VALUES(100,233); +INSERT INTO product_slots VALUES(100,234); +INSERT INTO product_slots VALUES(100,235); +INSERT INTO product_slots VALUES(100,236); +INSERT INTO product_slots VALUES(100,237); +INSERT INTO product_slots VALUES(100,238); +INSERT INTO product_slots VALUES(100,239); +INSERT INTO product_slots VALUES(100,240); +INSERT INTO product_slots VALUES(100,241); +INSERT INTO product_slots VALUES(100,242); +INSERT INTO product_slots VALUES(100,243); +INSERT INTO product_slots VALUES(100,244); +INSERT INTO product_slots VALUES(100,274); +INSERT INTO product_slots VALUES(100,275); +INSERT INTO product_slots VALUES(100,279); +INSERT INTO product_slots VALUES(100,280); +INSERT INTO product_slots VALUES(100,281); +INSERT INTO product_slots VALUES(100,282); +INSERT INTO product_slots VALUES(100,283); +INSERT INTO product_slots VALUES(100,284); +INSERT INTO product_slots VALUES(100,285); +INSERT INTO product_slots VALUES(100,286); +INSERT INTO product_slots VALUES(100,287); +INSERT INTO product_slots VALUES(101,211); +INSERT INTO product_slots VALUES(101,230); +INSERT INTO product_slots VALUES(101,231); +INSERT INTO product_slots VALUES(101,232); +INSERT INTO product_slots VALUES(101,233); +INSERT INTO product_slots VALUES(101,234); +INSERT INTO product_slots VALUES(101,235); +INSERT INTO product_slots VALUES(101,236); +INSERT INTO product_slots VALUES(101,237); +INSERT INTO product_slots VALUES(101,238); +INSERT INTO product_slots VALUES(101,239); +INSERT INTO product_slots VALUES(101,240); +INSERT INTO product_slots VALUES(101,241); +INSERT INTO product_slots VALUES(101,242); +INSERT INTO product_slots VALUES(101,243); +INSERT INTO product_slots VALUES(101,244); +INSERT INTO product_slots VALUES(101,274); +INSERT INTO product_slots VALUES(101,275); +INSERT INTO product_slots VALUES(101,279); +INSERT INTO product_slots VALUES(101,280); +INSERT INTO product_slots VALUES(101,281); +INSERT INTO product_slots VALUES(101,282); +INSERT INTO product_slots VALUES(101,283); +INSERT INTO product_slots VALUES(101,284); +INSERT INTO product_slots VALUES(101,285); +INSERT INTO product_slots VALUES(101,286); +INSERT INTO product_slots VALUES(101,287); +INSERT INTO product_slots VALUES(102,188); +INSERT INTO product_slots VALUES(102,189); +INSERT INTO product_slots VALUES(102,203); +INSERT INTO product_slots VALUES(102,204); +INSERT INTO product_slots VALUES(102,205); +INSERT INTO product_slots VALUES(102,206); +INSERT INTO product_slots VALUES(102,207); +INSERT INTO product_slots VALUES(102,208); +INSERT INTO product_slots VALUES(102,209); +INSERT INTO product_slots VALUES(102,210); +INSERT INTO product_slots VALUES(102,211); +INSERT INTO product_slots VALUES(102,212); +INSERT INTO product_slots VALUES(102,213); +INSERT INTO product_slots VALUES(102,214); +INSERT INTO product_slots VALUES(102,215); +INSERT INTO product_slots VALUES(102,216); +INSERT INTO product_slots VALUES(102,217); +INSERT INTO product_slots VALUES(102,218); +INSERT INTO product_slots VALUES(102,219); +INSERT INTO product_slots VALUES(102,220); +INSERT INTO product_slots VALUES(102,221); +INSERT INTO product_slots VALUES(102,222); +INSERT INTO product_slots VALUES(102,223); +INSERT INTO product_slots VALUES(102,224); +INSERT INTO product_slots VALUES(102,225); +INSERT INTO product_slots VALUES(102,226); +INSERT INTO product_slots VALUES(102,227); +INSERT INTO product_slots VALUES(102,228); +INSERT INTO product_slots VALUES(102,229); +INSERT INTO product_slots VALUES(102,230); +INSERT INTO product_slots VALUES(102,231); +INSERT INTO product_slots VALUES(102,232); +INSERT INTO product_slots VALUES(102,233); +INSERT INTO product_slots VALUES(102,234); +INSERT INTO product_slots VALUES(102,235); +INSERT INTO product_slots VALUES(102,236); +INSERT INTO product_slots VALUES(102,237); +INSERT INTO product_slots VALUES(102,238); +INSERT INTO product_slots VALUES(102,239); +INSERT INTO product_slots VALUES(102,240); +INSERT INTO product_slots VALUES(102,241); +INSERT INTO product_slots VALUES(102,242); +INSERT INTO product_slots VALUES(102,243); +INSERT INTO product_slots VALUES(102,244); +INSERT INTO product_slots VALUES(102,274); +INSERT INTO product_slots VALUES(102,275); +INSERT INTO product_slots VALUES(102,279); +INSERT INTO product_slots VALUES(102,280); +INSERT INTO product_slots VALUES(102,281); +INSERT INTO product_slots VALUES(102,282); +INSERT INTO product_slots VALUES(102,283); +INSERT INTO product_slots VALUES(102,284); +INSERT INTO product_slots VALUES(102,285); +INSERT INTO product_slots VALUES(102,286); +INSERT INTO product_slots VALUES(102,287); +INSERT INTO product_slots VALUES(103,210); +INSERT INTO product_slots VALUES(103,211); +INSERT INTO product_slots VALUES(103,212); +INSERT INTO product_slots VALUES(103,213); +INSERT INTO product_slots VALUES(103,214); +INSERT INTO product_slots VALUES(103,215); +INSERT INTO product_slots VALUES(103,227); +INSERT INTO product_slots VALUES(103,228); +INSERT INTO product_slots VALUES(103,229); +INSERT INTO product_slots VALUES(103,230); +INSERT INTO product_slots VALUES(103,231); +INSERT INTO product_slots VALUES(103,232); +INSERT INTO product_slots VALUES(103,233); +INSERT INTO product_slots VALUES(103,234); +INSERT INTO product_slots VALUES(103,235); +INSERT INTO product_slots VALUES(103,236); +INSERT INTO product_slots VALUES(103,237); +INSERT INTO product_slots VALUES(103,238); +INSERT INTO product_slots VALUES(103,239); +INSERT INTO product_slots VALUES(103,240); +INSERT INTO product_slots VALUES(103,241); +INSERT INTO product_slots VALUES(103,242); +INSERT INTO product_slots VALUES(103,243); +INSERT INTO product_slots VALUES(103,244); +INSERT INTO product_slots VALUES(103,274); +INSERT INTO product_slots VALUES(103,275); +INSERT INTO product_slots VALUES(103,279); +INSERT INTO product_slots VALUES(103,280); +INSERT INTO product_slots VALUES(103,281); +INSERT INTO product_slots VALUES(103,282); +INSERT INTO product_slots VALUES(103,283); +INSERT INTO product_slots VALUES(103,284); +INSERT INTO product_slots VALUES(103,285); +INSERT INTO product_slots VALUES(103,286); +INSERT INTO product_slots VALUES(103,287); +CREATE TABLE IF NOT EXISTS "product_tag_info" ("id" INTEGER NOT NULL, "tag_name" TEXT NOT NULL, "tag_description" TEXT, "image_url" TEXT, "is_dashboard_tag" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "related_stores" TEXT); +INSERT INTO product_tag_info VALUES(1,'Chicken','Chicken related items','tags/1770321659633-1763869265110-e22b6d94-dac9-499f-babb-1e944d90b01a.jpeg%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3D8fab47503efb9547b50e4fb317e35cc7%252F20260205%252Fapac%252Fs3%252Faws4_request%26X-Amz-Date%3D20260205T195535Z%26X-Amz-Expires%3D259200%26X-Amz-Signature%3D917db15bcc60cab7ac5cd5e49d85d13a960fe77b4a5e327dd449048870494cf9%26X-Amz-SignedHeaders%3Dhost%26x-amz-checksum-mode%3DENABLED%26x-id%3DGetObject',1,'2025-11-22T02:00:14.678Z','[1]'); +INSERT INTO product_tag_info VALUES(2,'Meat','Meat Products','tags/1763835253683-c9c3e293-0bef-4c58-a976-dd49c050cd36.jpeg',1,'2025-11-22T12:44:15.930Z',NULL); +INSERT INTO product_tag_info VALUES(3,'Fruits','Delicious fresh fruits','tags/1763835293899-43b3fbe1-9b5b-441c-b4d4-d1691c3f02f3.webp',1,'2025-11-22T12:44:55.491Z',NULL); +INSERT INTO product_tag_info VALUES(4,'Fish','Types ','tags/1770323410499-1763869436182-bf82f7b4-a1f3-4113-985b-96311b7a910e.jpeg%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3D8fab47503efb9547b50e4fb317e35cc7%252F20260205%252Fapac%252Fs3%252Faws4_request%26X-Amz-Date%3D20260205T202804Z%26X-Amz-Expires%3D259200%26X-Amz-Signature%3Dea436390b277935d843cae6b5cfa62aeed5799cb4a962ab31a0be4b132ca4b30%26X-Amz-SignedHeaders%3Dhost%26x-amz-checksum-mode%3DENABLED%26x-id%3DGetObject',1,'2025-11-22T22:13:03.039Z','[1]'); +INSERT INTO product_tag_info VALUES(5,'Vegetables',NULL,'tags/1768709725124-ebf421c5-ad52-49a9-b65c-1de008110b8a.png',1,'2026-01-17T22:45:25.461Z',NULL); +INSERT INTO product_tag_info VALUES(6,'Mutton','Mutton Products','tags/1770323560823-fd0ec463-bed0-474e-aa14-dc6480ce36af.jpeg',1,'2026-02-05T15:02:41.070Z','[1]'); +INSERT INTO product_tag_info VALUES(39,'DemoTag','Demo prod tag','product-images/1774116266063.jpg',0,'2026-03-21T12:20:34.282Z','[2,1]'); +CREATE TABLE IF NOT EXISTS "product_tags" ("id" INTEGER NOT NULL, "product_id" INTEGER NOT NULL, "tag_id" INTEGER NOT NULL, "assigned_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO product_tags VALUES(114,2,1,'2026-01-15T06:49:23.323Z'); +INSERT INTO product_tags VALUES(115,2,2,'2026-01-15T06:49:23.323Z'); +INSERT INTO product_tags VALUES(130,42,1,'2026-01-17T02:37:49.548Z'); +INSERT INTO product_tags VALUES(131,42,2,'2026-01-17T02:37:49.548Z'); +INSERT INTO product_tags VALUES(132,7,3,'2026-01-17T03:23:29.890Z'); +INSERT INTO product_tags VALUES(133,21,1,'2026-01-17T03:28:21.647Z'); +INSERT INTO product_tags VALUES(134,21,2,'2026-01-17T03:28:21.647Z'); +INSERT INTO product_tags VALUES(136,26,3,'2026-01-17T03:34:05.740Z'); +INSERT INTO product_tags VALUES(143,39,3,'2026-01-17T06:11:21.465Z'); +INSERT INTO product_tags VALUES(164,3,1,'2026-01-18T01:05:33.690Z'); +INSERT INTO product_tags VALUES(165,3,2,'2026-01-18T01:05:33.690Z'); +INSERT INTO product_tags VALUES(168,49,3,'2026-01-18T11:28:56.144Z'); +INSERT INTO product_tags VALUES(202,9,4,'2026-01-25T08:36:25.210Z'); +INSERT INTO product_tags VALUES(203,75,4,'2026-01-25T08:38:25.840Z'); +INSERT INTO product_tags VALUES(215,11,3,'2026-01-25T11:09:47.389Z'); +INSERT INTO product_tags VALUES(222,8,3,'2026-01-25T11:49:56.733Z'); +INSERT INTO product_tags VALUES(223,25,3,'2026-01-25T11:50:46.177Z'); +INSERT INTO product_tags VALUES(226,48,3,'2026-01-25T11:55:18.601Z'); +INSERT INTO product_tags VALUES(230,24,2,'2026-01-25T12:17:02.952Z'); +INSERT INTO product_tags VALUES(231,24,1,'2026-01-25T12:17:02.952Z'); +INSERT INTO product_tags VALUES(234,15,1,'2026-01-25T12:19:07.538Z'); +INSERT INTO product_tags VALUES(235,15,2,'2026-01-25T12:19:07.538Z'); +INSERT INTO product_tags VALUES(238,36,1,'2026-01-25T12:20:23.324Z'); +INSERT INTO product_tags VALUES(242,55,3,'2026-01-25T12:36:14.976Z'); +INSERT INTO product_tags VALUES(243,82,4,'2026-01-25T12:49:15.711Z'); +INSERT INTO product_tags VALUES(244,81,2,'2026-01-25T12:55:33.320Z'); +INSERT INTO product_tags VALUES(245,81,4,'2026-01-25T12:55:33.320Z'); +INSERT INTO product_tags VALUES(246,83,4,'2026-01-25T12:56:28.787Z'); +INSERT INTO product_tags VALUES(251,64,5,'2026-01-25T22:42:34.137Z'); +INSERT INTO product_tags VALUES(253,33,5,'2026-01-25T22:44:37.101Z'); +INSERT INTO product_tags VALUES(254,16,5,'2026-01-25T22:45:58.208Z'); +INSERT INTO product_tags VALUES(263,53,3,'2026-01-25T22:53:41.199Z'); +INSERT INTO product_tags VALUES(274,1,1,'2026-01-25T23:19:00.304Z'); +INSERT INTO product_tags VALUES(278,62,3,'2026-01-27T11:51:39.242Z'); +INSERT INTO product_tags VALUES(279,60,3,'2026-01-27T11:52:45.990Z'); +INSERT INTO product_tags VALUES(280,61,3,'2026-01-27T11:57:45.345Z'); +INSERT INTO product_tags VALUES(282,44,3,'2026-01-27T11:59:15.067Z'); +INSERT INTO product_tags VALUES(283,13,3,'2026-01-27T20:24:25.976Z'); +INSERT INTO product_tags VALUES(290,41,1,'2026-01-27T21:12:14.665Z'); +INSERT INTO product_tags VALUES(291,41,2,'2026-01-27T21:12:14.665Z'); +INSERT INTO product_tags VALUES(293,6,3,'2026-01-27T21:13:55.115Z'); +INSERT INTO product_tags VALUES(294,72,5,'2026-01-27T21:17:12.977Z'); +INSERT INTO product_tags VALUES(295,29,5,'2026-01-27T21:20:37.640Z'); +INSERT INTO product_tags VALUES(298,19,5,'2026-01-27T21:30:53.298Z'); +INSERT INTO product_tags VALUES(299,18,5,'2026-01-27T21:32:17.814Z'); +INSERT INTO product_tags VALUES(301,30,5,'2026-01-27T21:35:38.807Z'); +INSERT INTO product_tags VALUES(303,27,5,'2026-01-27T21:38:48.593Z'); +INSERT INTO product_tags VALUES(304,89,5,'2026-01-27T21:39:06.159Z'); +INSERT INTO product_tags VALUES(306,70,5,'2026-01-27T21:42:26.477Z'); +INSERT INTO product_tags VALUES(307,80,1,'2026-01-27T21:43:10.425Z'); +INSERT INTO product_tags VALUES(308,5,5,'2026-01-27T21:43:12.449Z'); +INSERT INTO product_tags VALUES(309,76,5,'2026-01-27T21:44:10.836Z'); +INSERT INTO product_tags VALUES(310,78,5,'2026-01-27T21:50:37.216Z'); +INSERT INTO product_tags VALUES(312,45,5,'2026-01-27T23:02:05.789Z'); +INSERT INTO product_tags VALUES(313,31,5,'2026-01-27T23:03:13.073Z'); +INSERT INTO product_tags VALUES(314,77,5,'2026-01-28T02:36:29.616Z'); +INSERT INTO product_tags VALUES(315,47,3,'2026-01-28T02:37:53.143Z'); +INSERT INTO product_tags VALUES(316,96,3,'2026-01-28T02:40:33.400Z'); +INSERT INTO product_tags VALUES(318,59,3,'2026-01-30T01:08:49.461Z'); +INSERT INTO product_tags VALUES(319,10,1,'2026-02-01T02:29:06.966Z'); +INSERT INTO product_tags VALUES(320,10,2,'2026-02-01T02:29:06.966Z'); +INSERT INTO product_tags VALUES(322,34,2,'2026-02-02T21:48:40.200Z'); +INSERT INTO product_tags VALUES(323,38,3,'2026-02-03T04:50:39.627Z'); +INSERT INTO product_tags VALUES(324,46,3,'2026-02-03T13:09:46.365Z'); +INSERT INTO product_tags VALUES(325,12,2,'2026-02-05T21:38:15.915Z'); +INSERT INTO product_tags VALUES(326,4,2,'2026-02-05T21:38:30.229Z'); +INSERT INTO product_tags VALUES(327,4,6,'2026-02-05T21:38:30.229Z'); +INSERT INTO product_tags VALUES(330,28,2,'2026-02-05T21:39:03.379Z'); +INSERT INTO product_tags VALUES(331,28,6,'2026-02-05T21:39:03.379Z'); +INSERT INTO product_tags VALUES(332,14,2,'2026-02-05T21:39:17.766Z'); +INSERT INTO product_tags VALUES(333,14,6,'2026-02-05T21:39:17.766Z'); +INSERT INTO product_tags VALUES(334,84,2,'2026-02-05T21:39:32.746Z'); +INSERT INTO product_tags VALUES(335,84,6,'2026-02-05T21:39:32.746Z'); +INSERT INTO product_tags VALUES(336,86,2,'2026-02-05T21:39:41.075Z'); +INSERT INTO product_tags VALUES(337,86,6,'2026-02-05T21:39:41.075Z'); +INSERT INTO product_tags VALUES(338,98,6,'2026-02-05T21:39:49.218Z'); +INSERT INTO product_tags VALUES(339,98,2,'2026-02-05T21:39:49.218Z'); +INSERT INTO product_tags VALUES(340,99,2,'2026-02-05T21:40:00.488Z'); +INSERT INTO product_tags VALUES(341,99,6,'2026-02-05T21:40:00.488Z'); +INSERT INTO product_tags VALUES(342,20,2,'2026-02-05T21:40:13.041Z'); +INSERT INTO product_tags VALUES(343,20,6,'2026-02-05T21:40:13.041Z'); +INSERT INTO product_tags VALUES(344,35,2,'2026-02-05T21:40:21.153Z'); +INSERT INTO product_tags VALUES(345,35,6,'2026-02-05T21:40:21.153Z'); +INSERT INTO product_tags VALUES(346,85,6,'2026-02-05T21:40:31.451Z'); +INSERT INTO product_tags VALUES(347,85,2,'2026-02-05T21:40:31.451Z'); +INSERT INTO product_tags VALUES(348,87,2,'2026-02-05T21:40:40.483Z'); +INSERT INTO product_tags VALUES(349,87,6,'2026-02-05T21:40:40.483Z'); +INSERT INTO product_tags VALUES(350,67,5,'2026-02-06T03:28:46.803Z'); +INSERT INTO product_tags VALUES(353,17,5,'2026-02-20T05:05:15.691Z'); +INSERT INTO product_tags VALUES(354,32,5,'2026-02-21T23:13:56.993Z'); +INSERT INTO product_tags VALUES(355,37,5,'2026-02-23T03:02:49.047Z'); +INSERT INTO product_tags VALUES(388,23,2,'2026-03-12T09:45:05.232Z'); +INSERT INTO product_tags VALUES(389,23,1,'2026-03-12T09:45:05.232Z'); +INSERT INTO product_tags VALUES(391,50,3,'2026-03-14T05:54:04.645Z'); +INSERT INTO product_tags VALUES(394,140,1,'2026-03-26T06:15:15.135Z'); +INSERT INTO product_tags VALUES(395,140,4,'2026-03-26T06:15:15.135Z'); +CREATE TABLE IF NOT EXISTS "refunds" ("id" INTEGER NOT NULL, "order_id" INTEGER NOT NULL, "refund_amount" REAL, "refund_status" TEXT DEFAULT 'none', "merchant_refund_id" TEXT, "refund_processed_at" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO refunds VALUES(1,14,73.499999999999996447,'success','rfnd_Rithb3BCPvwCVZ','2025-11-22T13:45:42.202Z','2025-11-19T12:47:41.044Z'); +INSERT INTO refunds VALUES(2,16,NULL,'none',NULL,NULL,'2025-11-23T06:11:45.422Z'); +INSERT INTO refunds VALUES(3,21,250.0,'success','rfnd_RjAobSg6UT2mvE','2025-11-23T06:29:45.582Z','2025-11-23T06:20:11.343Z'); +INSERT INTO refunds VALUES(4,17,NULL,'na',NULL,NULL,'2025-11-22T13:42:48.103Z'); +INSERT INTO refunds VALUES(5,22,NULL,'none',NULL,NULL,'2025-11-24T06:03:51.483Z'); +INSERT INTO refunds VALUES(6,23,220.0,'success','rfnd_RjZ0NnNrz80osd','2025-11-24T06:10:00.791Z','2025-11-24T06:03:20.864Z'); +INSERT INTO refunds VALUES(7,25,250.0,'success','rfnd_RjwqkDB4wfwBuY','2025-11-25T05:30:00.813Z','2025-11-25T05:25:53.609Z'); +INSERT INTO refunds VALUES(8,12,NULL,'pending',NULL,NULL,'2025-11-28T22:12:39.527Z'); +INSERT INTO refunds VALUES(9,31,NULL,'pending',NULL,NULL,'2025-11-28T22:33:24.299Z'); +INSERT INTO refunds VALUES(10,35,NULL,'pending',NULL,NULL,'2025-11-28T23:15:19.165Z'); +INSERT INTO refunds VALUES(11,50,NULL,'pending',NULL,NULL,'2025-11-29T01:16:21.186Z'); +INSERT INTO refunds VALUES(12,51,NULL,'pending',NULL,NULL,'2025-11-29T01:42:14.433Z'); +INSERT INTO refunds VALUES(13,52,NULL,'pending',NULL,NULL,'2025-11-29T01:52:21.830Z'); +INSERT INTO refunds VALUES(14,53,320.0,'success','rfnd_RlTSoRRkSliydO','2025-11-29T02:07:29.105Z','2025-11-29T01:58:56.303Z'); +INSERT INTO refunds VALUES(15,54,2850.0,'success','rfnd_RlcXX2g7K7jDCh','2025-11-29T11:00:00.772Z','2025-11-29T10:54:08.554Z'); +INSERT INTO refunds VALUES(16,64,NULL,'pending',NULL,NULL,'2025-12-19T04:15:02.346Z'); +INSERT INTO refunds VALUES(17,74,NULL,'na',NULL,NULL,'2025-12-19T11:38:55.276Z'); +INSERT INTO refunds VALUES(18,68,NULL,'na',NULL,NULL,'2025-12-19T21:20:54.339Z'); +INSERT INTO refunds VALUES(19,89,NULL,'na',NULL,NULL,'2025-12-20T15:09:31.699Z'); +INSERT INTO refunds VALUES(20,88,NULL,'na',NULL,NULL,'2025-12-20T21:37:32.151Z'); +INSERT INTO refunds VALUES(21,93,NULL,'na',NULL,NULL,'2025-12-22T08:15:45.531Z'); +INSERT INTO refunds VALUES(22,96,NULL,'na',NULL,NULL,'2025-12-22T09:07:24.665Z'); +INSERT INTO refunds VALUES(23,101,NULL,'na',NULL,NULL,'2025-12-23T11:46:55.138Z'); +INSERT INTO refunds VALUES(24,102,NULL,'na',NULL,NULL,'2025-12-27T01:40:37.790Z'); +INSERT INTO refunds VALUES(25,148,NULL,'na',NULL,NULL,'2026-01-17T23:01:50.064Z'); +INSERT INTO refunds VALUES(26,159,NULL,'na',NULL,NULL,'2026-01-18T10:06:56.160Z'); +INSERT INTO refunds VALUES(27,171,NULL,'na',NULL,NULL,'2026-01-27T22:25:10.936Z'); +INSERT INTO refunds VALUES(28,167,NULL,'na',NULL,NULL,'2026-01-27T22:26:35.510Z'); +INSERT INTO refunds VALUES(29,168,NULL,'na',NULL,NULL,'2026-01-27T22:27:15.817Z'); +INSERT INTO refunds VALUES(30,169,NULL,'na',NULL,NULL,'2026-01-27T22:27:32.421Z'); +INSERT INTO refunds VALUES(31,156,NULL,'na',NULL,NULL,'2026-01-27T22:30:19.302Z'); +INSERT INTO refunds VALUES(32,146,NULL,'na',NULL,NULL,'2026-01-28T00:39:48.320Z'); +INSERT INTO refunds VALUES(33,178,NULL,'na',NULL,NULL,'2026-01-28T10:02:31.195Z'); +INSERT INTO refunds VALUES(34,145,NULL,'na',NULL,NULL,'2026-01-28T12:53:28.911Z'); +INSERT INTO refunds VALUES(35,144,NULL,'na',NULL,NULL,'2026-01-28T13:29:22.470Z'); +INSERT INTO refunds VALUES(36,143,NULL,'na',NULL,NULL,'2026-01-28T13:30:04.792Z'); +INSERT INTO refunds VALUES(37,141,NULL,'na',NULL,NULL,'2026-01-28T13:30:36.001Z'); +INSERT INTO refunds VALUES(38,140,NULL,'na',NULL,NULL,'2026-01-28T13:31:05.250Z'); +INSERT INTO refunds VALUES(39,183,NULL,'na',NULL,NULL,'2026-01-30T02:09:22.273Z'); +INSERT INTO refunds VALUES(40,188,NULL,'na',NULL,NULL,'2026-01-31T05:26:43.840Z'); +INSERT INTO refunds VALUES(41,186,NULL,'na',NULL,NULL,'2026-01-31T07:35:41.324Z'); +INSERT INTO refunds VALUES(42,185,NULL,'na',NULL,NULL,'2026-01-31T07:36:00.966Z'); +INSERT INTO refunds VALUES(43,190,NULL,'na',NULL,NULL,'2026-01-31T22:05:43.606Z'); +INSERT INTO refunds VALUES(44,190,NULL,'na',NULL,NULL,'2026-01-31T23:03:59.073Z'); +INSERT INTO refunds VALUES(45,196,NULL,'na',NULL,NULL,'2026-02-01T04:42:48.106Z'); +INSERT INTO refunds VALUES(46,204,NULL,'na',NULL,NULL,'2026-02-02T06:48:48.035Z'); +INSERT INTO refunds VALUES(47,166,NULL,'na',NULL,NULL,'2026-02-02T10:47:37.685Z'); +INSERT INTO refunds VALUES(48,207,NULL,'na',NULL,NULL,'2026-02-02T11:22:59.955Z'); +INSERT INTO refunds VALUES(49,213,NULL,'na',NULL,NULL,'2026-02-03T07:34:17.723Z'); +INSERT INTO refunds VALUES(50,214,NULL,'na',NULL,NULL,'2026-02-03T08:41:50.996Z'); +INSERT INTO refunds VALUES(51,216,NULL,'na',NULL,NULL,'2026-02-03T23:34:45.350Z'); +INSERT INTO refunds VALUES(52,228,NULL,'na',NULL,NULL,'2026-02-06T16:17:39.262Z'); +INSERT INTO refunds VALUES(53,225,NULL,'na',NULL,NULL,'2026-02-06T23:20:32.417Z'); +INSERT INTO refunds VALUES(54,230,NULL,'na',NULL,NULL,'2026-02-06T23:34:36.400Z'); +INSERT INTO refunds VALUES(55,233,NULL,'na',NULL,NULL,'2026-02-07T07:25:04.081Z'); +INSERT INTO refunds VALUES(56,232,NULL,'na',NULL,NULL,'2026-02-07T07:26:35.768Z'); +INSERT INTO refunds VALUES(57,238,NULL,'na',NULL,NULL,'2026-02-08T00:55:38.297Z'); +INSERT INTO refunds VALUES(58,239,NULL,'na',NULL,NULL,'2026-02-08T00:59:58.539Z'); +INSERT INTO refunds VALUES(59,246,NULL,'na',NULL,NULL,'2026-02-08T23:17:27.385Z'); +INSERT INTO refunds VALUES(60,247,NULL,'na',NULL,NULL,'2026-02-09T02:04:46.141Z'); +INSERT INTO refunds VALUES(61,250,NULL,'na',NULL,NULL,'2026-02-10T22:00:06.670Z'); +INSERT INTO refunds VALUES(62,256,NULL,'na',NULL,NULL,'2026-02-16T01:22:51.309Z'); +INSERT INTO refunds VALUES(63,269,NULL,'na',NULL,NULL,'2026-02-18T04:17:30.087Z'); +INSERT INTO refunds VALUES(64,273,NULL,'na',NULL,NULL,'2026-02-18T05:16:11.655Z'); +INSERT INTO refunds VALUES(65,260,NULL,'na',NULL,NULL,'2026-02-18T06:14:42.228Z'); +INSERT INTO refunds VALUES(66,288,NULL,'na',NULL,NULL,'2026-02-19T04:37:45.086Z'); +INSERT INTO refunds VALUES(67,287,NULL,'na',NULL,NULL,'2026-02-19T04:40:17.239Z'); +INSERT INTO refunds VALUES(68,282,NULL,'na',NULL,NULL,'2026-02-19T05:33:59.169Z'); +INSERT INTO refunds VALUES(69,281,NULL,'na',NULL,NULL,'2026-02-19T05:34:11.079Z'); +INSERT INTO refunds VALUES(70,285,NULL,'na',NULL,NULL,'2026-02-19T05:37:22.327Z'); +INSERT INTO refunds VALUES(71,293,NULL,'na',NULL,NULL,'2026-02-19T07:22:21.525Z'); +INSERT INTO refunds VALUES(72,292,NULL,'na',NULL,NULL,'2026-02-19T07:22:49.181Z'); +INSERT INTO refunds VALUES(73,296,NULL,'na',NULL,NULL,'2026-02-19T12:49:30.261Z'); +INSERT INTO refunds VALUES(74,315,NULL,'na',NULL,NULL,'2026-02-21T04:45:00.816Z'); +INSERT INTO refunds VALUES(75,317,NULL,'na',NULL,NULL,'2026-02-21T06:26:57.626Z'); +INSERT INTO refunds VALUES(76,321,NULL,'na',NULL,NULL,'2026-02-21T22:47:12.386Z'); +INSERT INTO refunds VALUES(77,335,NULL,'na',NULL,NULL,'2026-02-23T04:42:18.550Z'); +INSERT INTO refunds VALUES(78,20,NULL,'na',NULL,NULL,'2026-02-25T02:13:38.575Z'); +CREATE TABLE IF NOT EXISTS "reserved_coupons" ("id" INTEGER NOT NULL, "secret_code" TEXT NOT NULL, "coupon_code" TEXT NOT NULL, "discount_percent" REAL, "flat_discount" REAL, "min_order" REAL, "product_ids" TEXT, "max_value" REAL, "valid_till" TEXT, "max_limit_for_user" INTEGER, "exclusive_apply" INTEGER NOT NULL DEFAULT false, "is_redeemed" INTEGER NOT NULL DEFAULT false, "redeemed_by" INTEGER, "redeemed_at" TEXT, "created_by" INTEGER NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO reserved_coupons VALUES(1,'RESERVE_TEST34','RESERVE_TEST34',25.0,NULL,1000.0,NULL,250.0,'2026-01-30T07:46:00.000Z',2,0,1,1,'2026-01-12T03:28:20.468Z',1,'2026-01-07T07:46:53.387Z'); +CREATE TABLE IF NOT EXISTS "special_deals" ("id" INTEGER NOT NULL, "product_id" INTEGER NOT NULL, "quantity" REAL NOT NULL, "price" REAL NOT NULL, "valid_till" TEXT NOT NULL); +INSERT INTO special_deals VALUES(12,9,2.0,500.0,'2025-12-08T18:30:00.000Z'); +CREATE TABLE IF NOT EXISTS "staff_permissions" ("id" INTEGER NOT NULL, "permission_name" TEXT NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO staff_permissions VALUES(1,'crud_product','2026-01-12T13:13:14.537Z'); +INSERT INTO staff_permissions VALUES(2,'make_coupon','2026-01-12T13:13:14.650Z'); +INSERT INTO staff_permissions VALUES(3,'crud_staff_users','2026-01-12T13:13:14.759Z'); +CREATE TABLE IF NOT EXISTS "staff_role_permissions" ("id" INTEGER NOT NULL, "staff_role_id" INTEGER NOT NULL, "staff_permission_id" INTEGER NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO staff_role_permissions VALUES(1,1,1,'2026-01-12T13:13:14.815Z'); +INSERT INTO staff_role_permissions VALUES(2,1,2,'2026-01-12T13:13:14.815Z'); +INSERT INTO staff_role_permissions VALUES(3,1,3,'2026-01-12T13:13:14.815Z'); +INSERT INTO staff_role_permissions VALUES(4,2,1,'2026-01-12T13:13:14.815Z'); +INSERT INTO staff_role_permissions VALUES(5,2,2,'2026-01-12T13:13:14.815Z'); +INSERT INTO staff_role_permissions VALUES(6,3,2,'2026-01-12T13:13:14.815Z'); +CREATE TABLE IF NOT EXISTS "staff_roles" ("id" INTEGER NOT NULL, "role_name" TEXT NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO staff_roles VALUES(1,'super_admin','2026-01-12T13:13:14.097Z'); +INSERT INTO staff_roles VALUES(2,'admin','2026-01-12T13:13:14.208Z'); +INSERT INTO staff_roles VALUES(3,'marketer','2026-01-12T13:13:14.318Z'); +INSERT INTO staff_roles VALUES(4,'delivery_staff','2026-01-12T13:13:14.427Z'); +CREATE TABLE IF NOT EXISTS "staff_users" ("id" INTEGER NOT NULL, "name" TEXT NOT NULL, "password" TEXT NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "staff_role_id" INTEGER); +INSERT INTO staff_users VALUES(1,'admin1','$2a$12$VEQHLJpr0l7Z0A.pZrQCk.Yjnf2M4k.RR82f0TlJ2zZU66pMH2Nh.','2025-11-17T03:24:02.349Z',NULL); +INSERT INTO staff_users VALUES(2,'admin2','$2a$12$VEQHLJpr0l7Z0A.pZrQCk.Yjnf2M4k.RR82f0TlJ2zZU66pMH2Nh.','2025-11-17T03:24:12.054Z',NULL); +INSERT INTO staff_users VALUES(3,'admin3','$2a$12$VEQHLJpr0l7Z0A.pZrQCk.Yjnf2M4k.RR82f0TlJ2zZU66pMH2Nh.','2025-11-17T03:24:12.054Z',NULL); +CREATE TABLE IF NOT EXISTS "store_info" ("id" INTEGER NOT NULL, "name" TEXT NOT NULL, "description" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "owner" INTEGER NOT NULL, "image_url" TEXT); +INSERT INTO store_info VALUES(1,'Fresh meat','"Fresh, high-quality meat sourced from trusted suppliers and hygienically processed. Cut fresh, packed safely, and delivered to your doorstep."','2025-11-16T21:59:24.030Z',1,'store-images/1766052073748.png'); +INSERT INTO store_info VALUES(2,'The Fruit Store','"Fresh, juicy fruits handpicked for quality and taste. Naturally ripened, carefully packed, and delivered fresh to your home."','2025-11-18T09:01:21.914Z',1,'store-images/1766053828604.png'); +INSERT INTO store_info VALUES(4,'Vegetables','Fresh, handpicked vegetables delivered straight from trusted farms to your home. Enjoy clean, high-quality sabzi every day-healthy, natural, and full of freshness.','2025-12-18T04:23:40.707Z',1,'store-images/1766051618139.png'); +INSERT INTO store_info VALUES(8,'Demo2','Demo2 ','2026-03-21T09:35:33.855Z',1,'store-images/1774105532235.jpg'); +INSERT INTO store_info VALUES(9,'Test3','Test3','2026-03-21T23:18:44.202Z',1,'store-images/1774524652442.jpg'); +CREATE TABLE IF NOT EXISTS "units" ("id" INTEGER NOT NULL, "short_notation" TEXT NOT NULL, "full_name" TEXT NOT NULL); +INSERT INTO units VALUES(1,'Kg','Kilogram'); +INSERT INTO units VALUES(2,'L','Litre'); +INSERT INTO units VALUES(3,'Dz','Dozen'); +INSERT INTO units VALUES(4,'Pc','Unit Piece'); +CREATE TABLE IF NOT EXISTS "unlogged_user_tokens" ("id" INTEGER NOT NULL, "token" TEXT NOT NULL, "added_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "last_verified" TEXT); +INSERT INTO unlogged_user_tokens VALUES(2,'ExponentPushToken[5NlYMFDaJDm9RH7N14zUrA]','2026-03-20T02:00:07.752Z','2026-03-20T02:00:07.748Z'); +INSERT INTO unlogged_user_tokens VALUES(3,'ExponentPushToken[QjoZ9xGsqPYMF2CJC_pv7e]','2026-03-20T02:11:22.747Z','2026-03-20T02:11:22.746Z'); +INSERT INTO unlogged_user_tokens VALUES(4,'ExponentPushToken[IAt9_oGP63t5X2AKTm-Z_r]','2026-03-20T03:32:58.675Z','2026-03-21T01:23:00.017Z'); +CREATE TABLE IF NOT EXISTS "upload_url_status" ("id" INTEGER NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "key" TEXT NOT NULL, "status" TEXT NOT NULL DEFAULT 'pending'); +INSERT INTO upload_url_status VALUES(35,'2025-12-07T03:28:13.136Z','review-images/1765097892914.jpg','pending'); +INSERT INTO upload_url_status VALUES(36,'2025-12-07T03:28:13.347Z','review-images/1765097893129.png','pending'); +INSERT INTO upload_url_status VALUES(37,'2025-12-07T03:33:04.090Z','review-images/1765098183876.jpg','pending'); +INSERT INTO upload_url_status VALUES(38,'2025-12-07T03:36:01.524Z','review-images/1765098361309.jpg','pending'); +INSERT INTO upload_url_status VALUES(39,'2025-12-07T03:38:00.499Z','review-images/1765098480284.jpg','pending'); +INSERT INTO upload_url_status VALUES(40,'2025-12-07T03:40:38.378Z','review-images/1765098638162.jpg','pending'); +INSERT INTO upload_url_status VALUES(41,'2025-12-07T03:44:45.828Z','review-images/1765098885608.jpg','pending'); +INSERT INTO upload_url_status VALUES(42,'2025-12-07T03:44:46.024Z','review-images/1765098885808.png','pending'); +INSERT INTO upload_url_status VALUES(43,'2025-12-07T03:45:55.598Z','review-images/1765098955365.jpg','pending'); +INSERT INTO upload_url_status VALUES(44,'2025-12-07T03:48:02.893Z','review-images/1765099082661.jpg','pending'); +INSERT INTO upload_url_status VALUES(45,'2025-12-07T03:54:36.343Z','review-images/1765099476101.jpg','pending'); +INSERT INTO upload_url_status VALUES(46,'2025-12-07T03:54:36.534Z','review-images/1765099476297.png','pending'); +INSERT INTO upload_url_status VALUES(47,'2025-12-07T04:21:35.194Z','review-images/1765101095057.jpg','pending'); +INSERT INTO upload_url_status VALUES(48,'2025-12-07T04:21:35.389Z','review-images/1765101095257.png','pending'); +INSERT INTO upload_url_status VALUES(49,'2025-12-07T04:21:43.722Z','review-images/1765101103591.jpg','pending'); +INSERT INTO upload_url_status VALUES(50,'2025-12-07T04:21:43.890Z','review-images/1765101103758.png','pending'); +INSERT INTO upload_url_status VALUES(51,'2025-12-07T04:24:01.353Z','review-images/1765101241219.jpg','pending'); +INSERT INTO upload_url_status VALUES(52,'2025-12-07T05:37:42.847Z','review-images/1765105662736.jpg','pending'); +INSERT INTO upload_url_status VALUES(53,'2025-12-07T05:40:19.798Z','review-images/1765105819687.jpg','pending'); +INSERT INTO upload_url_status VALUES(54,'2025-12-07T05:43:50.973Z','review-images/1765106030866.jpg','pending'); +INSERT INTO upload_url_status VALUES(55,'2025-12-07T05:48:27.294Z','review-images/1765106307190.jpg','pending'); +INSERT INTO upload_url_status VALUES(56,'2025-12-07T05:49:52.911Z','review-images/1765106392806.jpg','claimed'); +INSERT INTO upload_url_status VALUES(57,'2025-12-07T06:28:47.323Z','review-images/1765108727182.jpg','claimed'); +INSERT INTO upload_url_status VALUES(58,'2025-12-07T06:30:52.243Z','review-images/1765108852104.jpg','claimed'); +INSERT INTO upload_url_status VALUES(59,'2025-12-07T09:35:32.784Z','review-images/1765119932782.jpg','claimed'); +INSERT INTO upload_url_status VALUES(60,'2025-12-07T09:35:32.803Z','review-images/1765119932802.jpg','claimed'); +INSERT INTO upload_url_status VALUES(61,'2025-12-07T09:35:35.171Z','review-images/1765119935171.jpg','claimed'); +INSERT INTO upload_url_status VALUES(62,'2025-12-07T09:35:35.175Z','review-images/1765119935174.jpg','claimed'); +INSERT INTO upload_url_status VALUES(63,'2025-12-08T12:07:24.062Z','store-images/1765215443815.jpg','pending'); +INSERT INTO upload_url_status VALUES(64,'2025-12-08T12:19:22.136Z','store-images/1765216161855.jpg','pending'); +INSERT INTO upload_url_status VALUES(65,'2025-12-08T12:19:50.299Z','store-images/1765216190015.jpg','pending'); +INSERT INTO upload_url_status VALUES(66,'2025-12-08T12:22:27.708Z','store-images/1765216347423.jpg','pending'); +INSERT INTO upload_url_status VALUES(67,'2025-12-08T12:23:17.627Z','store-images/1765216397341.jpg','pending'); +INSERT INTO upload_url_status VALUES(68,'2025-12-08T12:23:50.898Z','store-images/1765216430679.jpg','pending'); +INSERT INTO upload_url_status VALUES(69,'2025-12-08T12:26:57.233Z','store-images/1765216617009.jpg','pending'); +INSERT INTO upload_url_status VALUES(70,'2025-12-08T12:35:30.092Z','store-images/1765217129859.jpg','pending'); +INSERT INTO upload_url_status VALUES(71,'2025-12-08T13:04:22.371Z','store-images/1765218862137.jpg','pending'); +INSERT INTO upload_url_status VALUES(72,'2025-12-08T13:14:47.858Z','store-images/1765219487659.jpg','pending'); +INSERT INTO upload_url_status VALUES(73,'2025-12-08T13:17:53.380Z','store-images/1765219673182.jpg','pending'); +INSERT INTO upload_url_status VALUES(74,'2025-12-08T13:18:59.825Z','store-images/1765219739627.jpg','pending'); +INSERT INTO upload_url_status VALUES(75,'2025-12-08T13:19:11.635Z','store-images/1765219751441.png','pending'); +INSERT INTO upload_url_status VALUES(76,'2025-12-08T13:26:24.852Z','store-images/1765220184655.jpg','pending'); +INSERT INTO upload_url_status VALUES(77,'2025-12-18T04:23:38.142Z','store-images/1766051618139.png','pending'); +INSERT INTO upload_url_status VALUES(78,'2025-12-18T04:29:00.775Z','store-images/1766051940774.png','pending'); +INSERT INTO upload_url_status VALUES(79,'2025-12-18T04:31:13.748Z','store-images/1766052073748.png','pending'); +INSERT INTO upload_url_status VALUES(80,'2025-12-18T05:00:28.605Z','store-images/1766053828604.png','pending'); +INSERT INTO upload_url_status VALUES(81,'2025-12-19T02:24:01.803Z','store-images/1766130841801.png','pending'); +INSERT INTO upload_url_status VALUES(82,'2025-12-19T03:21:37.362Z','store-images/1766134297361.png','pending'); +INSERT INTO upload_url_status VALUES(83,'2025-12-19T09:36:54.727Z','store-images/1766156814725.jpg','pending'); +INSERT INTO upload_url_status VALUES(84,'2025-12-19T09:37:23.364Z','store-images/1766156843363.jpg','pending'); +INSERT INTO upload_url_status VALUES(85,'2025-12-19T09:48:15.263Z','review-images/1766157495262.jpg','claimed'); +INSERT INTO upload_url_status VALUES(86,'2025-12-19T09:48:16.653Z','review-images/1766157496653.jpg','claimed'); +INSERT INTO upload_url_status VALUES(87,'2025-12-22T11:38:49.581Z','review-images/1766423329579.jpg','claimed'); +INSERT INTO upload_url_status VALUES(88,'2025-12-24T05:08:16.926Z','review-images/1766572696924.jpg','pending'); +INSERT INTO upload_url_status VALUES(89,'2025-12-24T05:08:19.865Z','review-images/1766572699864.jpg','pending'); +INSERT INTO upload_url_status VALUES(90,'2025-12-24T05:08:20.373Z','review-images/1766572700372.jpg','pending'); +INSERT INTO upload_url_status VALUES(91,'2025-12-24T05:08:20.544Z','review-images/1766572700543.jpg','claimed'); +INSERT INTO upload_url_status VALUES(92,'2025-12-24T05:08:20.718Z','review-images/1766572700718.jpg','pending'); +INSERT INTO upload_url_status VALUES(93,'2025-12-24T05:08:20.880Z','review-images/1766572700880.jpg','claimed'); +INSERT INTO upload_url_status VALUES(94,'2025-12-24T05:08:21.138Z','review-images/1766572701138.jpg','claimed'); +INSERT INTO upload_url_status VALUES(95,'2025-12-24T05:08:21.266Z','review-images/1766572701266.jpg','claimed'); +INSERT INTO upload_url_status VALUES(96,'2025-12-24T05:08:21.491Z','review-images/1766572701490.jpg','claimed'); +INSERT INTO upload_url_status VALUES(97,'2025-12-31T01:38:50.807Z','store-images/1767164930805.jpg','pending'); +INSERT INTO upload_url_status VALUES(98,'2025-12-31T01:47:30.381Z','store-images/1767165450380.jpg','pending'); +INSERT INTO upload_url_status VALUES(99,'2025-12-31T03:50:22.326Z','store-images/1767172822325.jpg','pending'); +INSERT INTO upload_url_status VALUES(100,'2025-12-31T03:51:09.711Z','store-images/1767172869656.jpg','pending'); +INSERT INTO upload_url_status VALUES(101,'2025-12-31T03:52:27.878Z','store-images/1767172947808.jpg','pending'); +INSERT INTO upload_url_status VALUES(102,'2025-12-31T03:56:02.505Z','store-images/1767173162428.jpg','pending'); +INSERT INTO upload_url_status VALUES(103,'2025-12-31T03:57:38.564Z','store-images/1767173258487.jpg','pending'); +INSERT INTO upload_url_status VALUES(104,'2025-12-31T03:58:37.526Z','store-images/1767173317447.jpg','pending'); +INSERT INTO upload_url_status VALUES(105,'2025-12-31T03:59:01.794Z','store-images/1767173341715.jpg','pending'); +INSERT INTO upload_url_status VALUES(106,'2025-12-31T04:00:21.099Z','store-images/1767173421020.jpg','pending'); +INSERT INTO upload_url_status VALUES(107,'2025-12-31T04:02:13.724Z','store-images/1767173533644.jpg','pending'); +INSERT INTO upload_url_status VALUES(108,'2025-12-31T04:22:07.810Z','store-images/1767174727704.png','pending'); +INSERT INTO upload_url_status VALUES(109,'2025-12-31T04:23:31.985Z','store-images/1767174811880.png','pending'); +INSERT INTO upload_url_status VALUES(110,'2025-12-31T06:24:23.209Z','store-images/1767182063206.jpg','pending'); +INSERT INTO upload_url_status VALUES(111,'2026-01-01T05:10:51.927Z','store-images/1767264051926.png','pending'); +INSERT INTO upload_url_status VALUES(112,'2026-01-01T05:10:53.379Z','store-images/1767264053378.png','pending'); +INSERT INTO upload_url_status VALUES(113,'2026-01-03T04:36:07.083Z','store-images/1767434767082.png','pending'); +INSERT INTO upload_url_status VALUES(114,'2026-01-18T21:44:01.277Z','review-images/1768792441275.jpg','claimed'); +INSERT INTO upload_url_status VALUES(115,'2026-01-18T21:44:01.748Z','review-images/1768792441748.jpg','claimed'); +INSERT INTO upload_url_status VALUES(116,'2026-01-24T02:31:51.676Z','store-images/1769241711675.png','pending'); +INSERT INTO upload_url_status VALUES(117,'2026-02-05T03:14:05.023Z','store-images/1770281045021.jpg','pending'); +INSERT INTO upload_url_status VALUES(118,'2026-02-05T03:14:06.298Z','store-images/1770281046297.jpg','pending'); +INSERT INTO upload_url_status VALUES(119,'2026-02-06T20:13:56.019Z','store-images/1770428636017.png','pending'); +INSERT INTO upload_url_status VALUES(120,'2026-02-06T20:29:53.456Z','store-images/1770429593455.jpg','pending'); +INSERT INTO upload_url_status VALUES(121,'2026-02-08T09:05:45.256Z','notification-images/1770561345196.jpg','pending'); +INSERT INTO upload_url_status VALUES(122,'2026-02-08T09:10:44.302Z','notification-images/1770561644251.jpg','pending'); +INSERT INTO upload_url_status VALUES(123,'2026-02-08T09:12:48.344Z','notification-images/1770561768293.jpg','pending'); +INSERT INTO upload_url_status VALUES(124,'2026-02-08T09:16:02.798Z','notification-images/1770561962747.jpg','pending'); +INSERT INTO upload_url_status VALUES(125,'2026-02-08T09:18:25.414Z','notification-images/1770562105363.jpg','pending'); +INSERT INTO upload_url_status VALUES(126,'2026-02-08T09:20:51.168Z','notification-images/1770562251117.jpg','pending'); +INSERT INTO upload_url_status VALUES(127,'2026-02-08T09:25:03.084Z','notification-images/1770562502985.jpg','pending'); +INSERT INTO upload_url_status VALUES(128,'2026-02-08T09:28:10.135Z','notification-images/1770562690047.jpg','pending'); +INSERT INTO upload_url_status VALUES(129,'2026-02-08T09:29:29.284Z','notification-images/1770562769196.jpg','pending'); +INSERT INTO upload_url_status VALUES(130,'2026-02-08T09:30:26.055Z','notification-images/1770562825967.jpg','pending'); +INSERT INTO upload_url_status VALUES(131,'2026-02-08T09:38:15.554Z','notification-images/1770563295459.jpg','pending'); +INSERT INTO upload_url_status VALUES(132,'2026-02-08T10:10:16.618Z','notification-images/1770565216512.jpg','pending'); +INSERT INTO upload_url_status VALUES(133,'2026-02-08T10:11:54.181Z','notification-images/1770565314077.jpg','pending'); +INSERT INTO upload_url_status VALUES(134,'2026-02-08T10:15:57.611Z','notification-images/1770565557504.jpg','pending'); +INSERT INTO upload_url_status VALUES(135,'2026-02-08T10:20:10.883Z','notification-images/1770565810774.jpg','pending'); +INSERT INTO upload_url_status VALUES(136,'2026-02-08T10:21:46.053Z','notification-images/1770565905943.jpg','pending'); +INSERT INTO upload_url_status VALUES(137,'2026-02-08T13:20:07.705Z','notification-images/1770576607704.jpg','pending'); +INSERT INTO upload_url_status VALUES(170,'2026-03-20T09:16:34.603Z','store-images/1774017994443.jpg','pending'); +INSERT INTO upload_url_status VALUES(171,'2026-03-20T09:17:04.596Z','store-images/1774018024432.jpg','pending'); +INSERT INTO upload_url_status VALUES(172,'2026-03-20T09:20:04.863Z','store-images/1774018204689.jpg','pending'); +INSERT INTO upload_url_status VALUES(173,'2026-03-20T09:20:57.508Z','store-images/1774018257330.jpg','pending'); +INSERT INTO upload_url_status VALUES(174,'2026-03-20T09:22:44.445Z','store-images/1774018364266.jpg','pending'); +INSERT INTO upload_url_status VALUES(175,'2026-03-21T09:24:15.290Z','store-images/1774104855151.jpg','pending'); +INSERT INTO upload_url_status VALUES(176,'2026-03-21T09:34:11.705Z','store-images/1774105451535.jpg','pending'); +INSERT INTO upload_url_status VALUES(177,'2026-03-21T09:35:32.404Z','store-images/1774105532235.jpg','pending'); +INSERT INTO upload_url_status VALUES(178,'2026-03-21T10:37:23.303Z','product-images/1774109243042.jpg','pending'); +INSERT INTO upload_url_status VALUES(179,'2026-03-21T10:37:23.532Z','product-images/1774109243274.jpg','pending'); +INSERT INTO upload_url_status VALUES(180,'2026-03-21T10:39:51.342Z','product-images/1774109391069.jpg','pending'); +INSERT INTO upload_url_status VALUES(181,'2026-03-21T10:39:51.668Z','product-images/1774109391409.jpg','pending'); +INSERT INTO upload_url_status VALUES(182,'2026-03-21T10:44:02.249Z','product-images/1774109641982.jpg','pending'); +INSERT INTO upload_url_status VALUES(183,'2026-03-21T10:44:02.477Z','product-images/1774109642211.jpg','pending'); +INSERT INTO upload_url_status VALUES(184,'2026-03-21T10:47:55.364Z','product-images/1774109875092.jpg','claimed'); +INSERT INTO upload_url_status VALUES(185,'2026-03-21T10:47:55.552Z','product-images/1774109875283.jpg','claimed'); +INSERT INTO upload_url_status VALUES(186,'2026-03-21T10:53:34.410Z','product-images/1774110214128.jpg','claimed'); +INSERT INTO upload_url_status VALUES(187,'2026-03-21T11:05:02.699Z','product-images/1774110902472.jpg','claimed'); +INSERT INTO upload_url_status VALUES(188,'2026-03-21T11:05:46.485Z','product-images/1774110946273.jpg','claimed'); +INSERT INTO upload_url_status VALUES(189,'2026-03-21T11:05:46.696Z','product-images/1774110946486.jpg','claimed'); +INSERT INTO upload_url_status VALUES(190,'2026-03-21T11:06:37.135Z','product-images/1774110996916.jpg','claimed'); +INSERT INTO upload_url_status VALUES(191,'2026-03-21T11:21:57.523Z','product-images/1774111917349.jpg','claimed'); +INSERT INTO upload_url_status VALUES(192,'2026-03-21T11:21:57.776Z','product-images/1774111917606.jpg','claimed'); +INSERT INTO upload_url_status VALUES(193,'2026-03-21T11:22:57.142Z','product-images/1774111976967.jpg','claimed'); +INSERT INTO upload_url_status VALUES(194,'2026-03-21T11:22:57.326Z','product-images/1774111977156.jpg','claimed'); +INSERT INTO upload_url_status VALUES(195,'2026-03-21T12:20:31.649Z','product-images/1774115431487.jpg','claimed'); +INSERT INTO upload_url_status VALUES(196,'2026-03-21T12:34:26.218Z','product-images/1774116266063.jpg','claimed'); +INSERT INTO upload_url_status VALUES(197,'2026-03-21T23:15:45.311Z','store-images/1774154745204.jpg','pending'); +INSERT INTO upload_url_status VALUES(198,'2026-03-21T23:18:41.659Z','store-images/1774154921529.jpg','pending'); +INSERT INTO upload_url_status VALUES(199,'2026-03-21T23:18:53.275Z','store-images/1774154933114.jpg','pending'); +INSERT INTO upload_url_status VALUES(200,'2026-03-22T00:28:59.866Z','profile-images/1774159139649.jpg','claimed'); +INSERT INTO upload_url_status VALUES(201,'2026-03-22T00:40:45.910Z','profile-images/1774159845659.jpg','claimed'); +INSERT INTO upload_url_status VALUES(202,'2026-03-22T04:45:38.531Z','complaint-images/1774174538370.jpg','claimed'); +INSERT INTO upload_url_status VALUES(203,'2026-03-22T04:57:50.211Z','complaint-images/1774175270043.jpg','claimed'); +INSERT INTO upload_url_status VALUES(204,'2026-03-22T05:06:00.920Z','complaint-images/1774175760765.jpg','claimed'); +INSERT INTO upload_url_status VALUES(205,'2026-03-22T05:08:54.126Z','complaint-images/1774175933889.jpg','claimed'); +INSERT INTO upload_url_status VALUES(206,'2026-03-22T05:10:03.192Z','complaint-images/1774176003038.jpg','claimed'); +INSERT INTO upload_url_status VALUES(207,'2026-03-22T05:10:03.381Z','complaint-images/1774176003229.jpg','claimed'); +INSERT INTO upload_url_status VALUES(208,'2026-03-22T05:10:03.567Z','complaint-images/1774176003414.jpg','claimed'); +INSERT INTO upload_url_status VALUES(209,'2026-03-24T09:49:20.825Z','store-images/1774365560714.jpg','pending'); +INSERT INTO upload_url_status VALUES(210,'2026-03-26T05:56:41.671Z','profile-images/1774524401549.jpg','pending'); +INSERT INTO upload_url_status VALUES(211,'2026-03-26T05:58:44.761Z','product-images/1774524524649.jpg','claimed'); +INSERT INTO upload_url_status VALUES(212,'2026-03-26T05:58:44.957Z','product-images/1774524524845.jpg','claimed'); +INSERT INTO upload_url_status VALUES(213,'2026-03-26T05:58:45.145Z','product-images/1774524525034.jpg','claimed'); +INSERT INTO upload_url_status VALUES(214,'2026-03-26T05:58:45.334Z','product-images/1774524525222.jpg','claimed'); +INSERT INTO upload_url_status VALUES(215,'2026-03-26T06:00:52.552Z','store-images/1774524652442.jpg','pending'); +INSERT INTO upload_url_status VALUES(216,'2026-03-26T06:15:11.287Z','product-images/1774525511146.jpg','claimed'); +CREATE TABLE IF NOT EXISTS "user_creds" ("id" INTEGER NOT NULL, "user_id" INTEGER NOT NULL, "user_password" TEXT NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO user_creds VALUES(2,1,'$2b$10$aJacFZFCniKqXOewMIlznOsEKcTJa/ji7xBU2dhHsioxTC0mR9BvK','2025-11-19T12:00:25.180Z'); +INSERT INTO user_creds VALUES(3,17,'$2b$10$mn/CpXmKq.dKgeH2gHtKk.IvlgQyahG2tCpD8k42mPOEysWoO3pti','2025-12-19T03:44:09.761Z'); +CREATE TABLE IF NOT EXISTS "user_details" ("id" INTEGER NOT NULL, "user_id" INTEGER NOT NULL, "bio" TEXT, "date_of_birth" TEXT, "gender" TEXT, "occupation" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "profile_image" TEXT, "is_suspended" INTEGER NOT NULL DEFAULT false); +INSERT INTO user_details VALUES(1,1,NULL,NULL,NULL,NULL,'2025-11-18T10:56:21.130Z','2026-03-26T05:56:44.292Z','profile-images/1774524401549.jpg',0); +INSERT INTO user_details VALUES(2,2,NULL,NULL,NULL,NULL,'2025-11-28T14:47:57.109Z','2025-11-28T14:47:57.109Z',NULL,0); +INSERT INTO user_details VALUES(6,4,NULL,NULL,NULL,NULL,'2025-12-02T09:58:27.226Z','2025-12-02T10:02:29.066Z','profile-images/1764689548097-1000159418.jpg',0); +INSERT INTO user_details VALUES(7,16,NULL,NULL,NULL,NULL,'2025-12-19T01:45:00.531Z','2025-12-19T01:45:00.530Z',NULL,0); +INSERT INTO user_details VALUES(8,17,NULL,NULL,NULL,NULL,'2025-12-19T03:43:18.108Z','2025-12-20T05:54:43.942Z','profile-images/1766229878891-1000167980.jpg',0); +INSERT INTO user_details VALUES(9,22,NULL,NULL,NULL,NULL,'2026-01-18T01:00:42.356Z','2026-01-18T01:00:42.355Z',NULL,0); +INSERT INTO user_details VALUES(10,54,NULL,NULL,NULL,NULL,'2026-01-26T06:43:25.929Z','2026-01-26T06:43:25.928Z',NULL,0); +INSERT INTO user_details VALUES(11,61,NULL,NULL,NULL,NULL,'2026-01-26T23:34:37.576Z','2026-01-26T23:34:37.575Z',NULL,0); +INSERT INTO user_details VALUES(12,62,NULL,NULL,NULL,NULL,'2026-01-27T00:04:43.010Z','2026-01-27T00:04:43.009Z',NULL,0); +INSERT INTO user_details VALUES(13,107,NULL,NULL,NULL,NULL,'2026-02-06T02:46:48.046Z','2026-02-06T02:46:48.045Z',NULL,0); +INSERT INTO user_details VALUES(14,91,NULL,NULL,NULL,NULL,'2026-02-07T04:18:52.616Z','2026-02-07T04:18:52.615Z',NULL,0); +INSERT INTO user_details VALUES(15,121,NULL,NULL,NULL,NULL,'2026-02-08T10:09:19.571Z','2026-02-08T10:09:19.571Z',NULL,1); +INSERT INTO user_details VALUES(16,12,NULL,NULL,NULL,NULL,'2026-02-08T10:09:58.357Z','2026-02-08T10:09:58.357Z',NULL,0); +INSERT INTO user_details VALUES(17,145,NULL,NULL,NULL,NULL,'2026-02-18T03:41:32.333Z','2026-02-18T03:41:32.332Z',NULL,0); +INSERT INTO user_details VALUES(18,159,NULL,NULL,NULL,NULL,'2026-02-19T04:08:47.047Z','2026-02-19T04:08:47.046Z',NULL,0); +INSERT INTO user_details VALUES(19,151,NULL,NULL,NULL,NULL,'2026-02-19T06:13:14.187Z','2026-02-19T06:13:14.186Z',NULL,0); +INSERT INTO user_details VALUES(20,140,NULL,NULL,NULL,NULL,'2026-02-20T03:30:19.023Z','2026-02-20T03:30:19.022Z',NULL,0); +INSERT INTO user_details VALUES(21,172,NULL,NULL,NULL,NULL,'2026-02-20T04:04:44.392Z','2026-02-20T04:04:44.391Z',NULL,0); +INSERT INTO user_details VALUES(22,184,NULL,NULL,NULL,NULL,'2026-02-22T00:49:25.502Z','2026-02-22T00:51:54.175Z','profile-images/1771741313402-1000001181.jpg',0); +INSERT INTO user_details VALUES(23,99,NULL,NULL,NULL,NULL,'2026-02-22T04:52:08.552Z','2026-02-22T04:52:08.551Z',NULL,0); +INSERT INTO user_details VALUES(56,265,NULL,NULL,NULL,NULL,'2026-03-22T00:29:01.903Z','2026-03-22T00:29:01.903Z','profile-images/1774159845659.jpg',0); +CREATE TABLE IF NOT EXISTS "user_incidents" ("id" INTEGER NOT NULL, "user_id" INTEGER NOT NULL, "order_id" INTEGER, "date_added" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "admin_comment" TEXT, "added_by" INTEGER, "negativity_score" INTEGER); +INSERT INTO user_incidents VALUES(1,1,384,'2026-03-04T10:40:45.532Z','Not Paying Money',1,2); +CREATE TABLE IF NOT EXISTS "user_notifications" ("id" INTEGER NOT NULL, "image_url" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "body" TEXT NOT NULL, "applicable_users" TEXT, "title" TEXT NOT NULL); +INSERT INTO user_notifications VALUES(21,NULL,'2026-02-08T23:51:32.312Z',replace(replace('Van Winkle liked hunting, too. He liked going to the mountains to shoot squirrels. \r\nHe also liked sitting in the mountains and watching the world below—the','\r',char(13)),'\n',char(10)),'[1]','Hii'); +INSERT INTO user_notifications VALUES(22,NULL,'2026-02-09T03:28:19.744Z','Test Notification','[65]','Hello'); +INSERT INTO user_notifications VALUES(23,NULL,'2026-02-09T03:29:52.024Z','Hello','[1,65]','Hello'); +INSERT INTO user_notifications VALUES(24,NULL,'2026-02-20T07:52:30.399Z','Freshyo','[2]','Qusham'); +INSERT INTO user_notifications VALUES(25,NULL,'2026-02-23T02:20:51.468Z','Buy fresh, juicy and titillating fruits. Order Now!','[2,3,6,7,4,9,12,21,24,26,1,38,39,22,50,64,65,66,74,82,98,102,107,113,115,118,91,119,120,121,122,123,124,125,127,128,129,131,132,133,134,135,136,137,138,139,141,142,143,144,145,146,147,148,149,150,152,153,154,155,156,157,158,160,159,161,162,151,163,164,166,165,167,140,169,170,172,173,174,175,176,177,178,179,180,181,182,183,185,186,188,189,191,190,194,184,221,220,219,217,216,215,214,213,212,210,99,209,208,207,206,205,204,203,202,201,200,199,198,197,196,195]','Mesmerizing Fruits'); +CREATE TABLE IF NOT EXISTS "users" ("id" INTEGER NOT NULL, "name" TEXT, "email" TEXT, "mobile" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); +INSERT INTO users VALUES(1,'Mohammed Shafiuddin','mohammedshafiuddin54@gmail.com','9676651496','2025-11-18T08:35:55.801Z'); +INSERT INTO users VALUES(2,NULL,NULL,'8688182552','2025-11-19T06:34:47.086Z'); +INSERT INTO users VALUES(3,NULL,NULL,'9000190484','2025-11-19T07:06:09.284Z'); +INSERT INTO users VALUES(4,'Saniya','saniya123@gmail.com','8688326100','2025-11-20T11:58:13.296Z'); +INSERT INTO users VALUES(5,NULL,NULL,'7093212611','2025-11-22T05:35:41.069Z'); +INSERT INTO users VALUES(6,NULL,NULL,'9346436140','2025-11-22T09:02:42.569Z'); +INSERT INTO users VALUES(7,NULL,NULL,'7386623412','2025-11-28T22:18:57.177Z'); +INSERT INTO users VALUES(8,NULL,NULL,'7675084307','2025-11-29T08:33:35.481Z'); +INSERT INTO users VALUES(9,NULL,NULL,'8985081850','2025-12-07T21:58:30.768Z'); +INSERT INTO users VALUES(10,NULL,NULL,'8121258519','2025-12-07T23:16:29.228Z'); +INSERT INTO users VALUES(11,NULL,NULL,'8639236092','2025-12-14T07:50:29.893Z'); +INSERT INTO users VALUES(12,NULL,NULL,'6302478945','2025-12-18T05:03:06.218Z'); +INSERT INTO users VALUES(13,NULL,NULL,'7095705186','2025-12-19T00:31:43.745Z'); +INSERT INTO users VALUES(14,NULL,NULL,'9390567030','2025-12-19T00:52:18.278Z'); +INSERT INTO users VALUES(15,NULL,NULL,'9866116948','2025-12-19T00:58:58.593Z'); +INSERT INTO users VALUES(16,'pradeep','pradeepdeep484@gmail.com','7799420184','2025-12-19T01:44:25.069Z'); +INSERT INTO users VALUES(17,'Bha','sbhavanikumar2016@gmail.com','7013167289','2025-12-19T03:01:17.931Z'); +INSERT INTO users VALUES(18,NULL,NULL,'9381316634','2025-12-19T04:51:00.938Z'); +INSERT INTO users VALUES(19,NULL,NULL,'9398972993','2025-12-19T08:55:04.116Z'); +INSERT INTO users VALUES(20,NULL,NULL,'9676010763','2025-12-22T09:03:04.773Z'); +INSERT INTO users VALUES(21,NULL,NULL,'9701690010','2025-12-22T12:29:08.147Z'); +INSERT INTO users VALUES(22,'Nawaz','afunawaz@gmail.com','8885456295','2025-12-23T21:05:27.523Z'); +INSERT INTO users VALUES(23,NULL,NULL,'9247242246','2025-12-25T13:27:14.313Z'); +INSERT INTO users VALUES(24,NULL,NULL,'9948350118','2025-12-27T12:57:43.504Z'); +INSERT INTO users VALUES(25,NULL,NULL,'9848296296','2025-12-31T14:49:04.015Z'); +INSERT INTO users VALUES(26,NULL,NULL,'9652180398','2026-01-03T02:42:08.528Z'); +INSERT INTO users VALUES(27,NULL,NULL,'8074020144','2026-01-05T04:44:15.312Z'); +INSERT INTO users VALUES(28,NULL,NULL,'7382343977','2026-01-05T09:08:25.774Z'); +INSERT INTO users VALUES(29,NULL,NULL,'6302300646','2026-01-06T04:28:48.967Z'); +INSERT INTO users VALUES(30,NULL,NULL,'8341217812','2026-01-06T07:44:49.015Z'); +INSERT INTO users VALUES(31,NULL,NULL,'7601003021','2026-01-12T02:18:41.456Z'); +INSERT INTO users VALUES(32,NULL,NULL,'8919304169','2026-01-12T02:56:48.668Z'); +INSERT INTO users VALUES(33,NULL,NULL,'9059529741','2026-01-13T09:20:02.174Z'); +INSERT INTO users VALUES(34,NULL,NULL,'9985254508','2026-01-13T09:25:27.981Z'); +INSERT INTO users VALUES(35,NULL,NULL,'6304804044','2026-01-13T09:29:31.683Z'); +INSERT INTO users VALUES(36,NULL,NULL,'6281222530','2026-01-13T16:42:02.068Z'); +INSERT INTO users VALUES(37,NULL,NULL,'8555038131','2026-01-14T09:28:43.382Z'); +INSERT INTO users VALUES(38,NULL,NULL,'9492230173','2026-01-15T03:25:50.547Z'); +INSERT INTO users VALUES(39,NULL,NULL,'6281768720','2026-01-16T06:33:17.501Z'); +INSERT INTO users VALUES(40,NULL,NULL,'8790196183','2026-01-18T11:31:13.136Z'); +INSERT INTO users VALUES(41,NULL,NULL,'9618451678','2026-01-20T04:07:45.096Z'); +INSERT INTO users VALUES(42,NULL,NULL,'8019548522','2026-01-21T00:01:02.852Z'); +INSERT INTO users VALUES(43,NULL,NULL,'9985751104','2026-01-22T06:40:13.655Z'); +INSERT INTO users VALUES(44,NULL,NULL,'6302138817','2026-01-22T06:55:55.593Z'); +INSERT INTO users VALUES(45,NULL,NULL,'7989242921','2026-01-22T06:57:29.593Z'); +INSERT INTO users VALUES(46,NULL,NULL,'9392266793','2026-01-22T07:00:03.023Z'); +INSERT INTO users VALUES(47,NULL,NULL,'7013843505','2026-01-22T07:16:37.997Z'); +INSERT INTO users VALUES(48,NULL,NULL,'9642200622','2026-01-23T07:57:20.233Z'); +INSERT INTO users VALUES(49,NULL,NULL,'9182043867','2026-01-23T13:48:07.569Z'); +INSERT INTO users VALUES(50,NULL,NULL,'9390338662','2026-01-23T13:57:09.989Z'); +INSERT INTO users VALUES(51,NULL,NULL,'8686465444','2026-01-23T22:48:49.770Z'); +INSERT INTO users VALUES(52,NULL,NULL,'8121807322','2026-01-26T00:53:18.325Z'); +INSERT INTO users VALUES(53,NULL,NULL,'8886868702','2026-01-26T02:32:51.301Z'); +INSERT INTO users VALUES(54,'Abdul ahad','umizazarieshzarish@gmail.com','9849759289','2026-01-26T06:39:06.569Z'); +INSERT INTO users VALUES(55,NULL,NULL,'7780659850','2026-01-26T09:29:28.984Z'); +INSERT INTO users VALUES(56,NULL,NULL,'7396924154','2026-01-26T09:46:27.950Z'); +INSERT INTO users VALUES(57,NULL,NULL,'9515837506','2026-01-26T10:09:05.694Z'); +INSERT INTO users VALUES(58,NULL,NULL,'9603333080','2026-01-26T11:52:06.161Z'); +INSERT INTO users VALUES(59,NULL,NULL,'9490585051','2026-01-26T13:07:07.742Z'); +INSERT INTO users VALUES(60,NULL,NULL,'8331989727','2026-01-26T22:19:45.345Z'); +INSERT INTO users VALUES(61,'Mohd Zubair khan','mohdzubair772@gmail.com','7729916250','2026-01-26T23:32:23.837Z'); +INSERT INTO users VALUES(62,'Aftab Ur Rahman','aftabaffu333@gmail.com','7671939155','2026-01-27T00:04:08.085Z'); +INSERT INTO users VALUES(63,NULL,NULL,'8328161112','2026-01-27T04:36:03.156Z'); +INSERT INTO users VALUES(64,NULL,NULL,'9985383270','2026-01-27T06:41:11.387Z'); +INSERT INTO users VALUES(65,NULL,NULL,'9381637374','2026-01-27T11:27:44.071Z'); +INSERT INTO users VALUES(66,NULL,NULL,'9618791714','2026-01-28T01:24:44.881Z'); +INSERT INTO users VALUES(67,NULL,NULL,'8297666911','2026-01-28T01:57:03.995Z'); +INSERT INTO users VALUES(68,NULL,NULL,'9441204280','2026-01-29T10:32:41.779Z'); +INSERT INTO users VALUES(69,NULL,NULL,'9949548015','2026-01-29T22:47:42.263Z'); +INSERT INTO users VALUES(70,NULL,NULL,'7842638264','2026-01-30T01:44:38.667Z'); +INSERT INTO users VALUES(71,NULL,NULL,'9110314975','2026-01-30T03:46:01.334Z'); +INSERT INTO users VALUES(72,NULL,NULL,'8686544418','2026-01-30T06:32:47.754Z'); +INSERT INTO users VALUES(73,NULL,NULL,'9652801308','2026-01-30T08:47:09.826Z'); +INSERT INTO users VALUES(74,NULL,NULL,'8639145664','2026-01-30T08:49:55.471Z'); +INSERT INTO users VALUES(75,NULL,NULL,'9966786521','2026-01-30T09:36:21.649Z'); +INSERT INTO users VALUES(76,NULL,NULL,'6300352629','2026-01-30T09:48:12.235Z'); +INSERT INTO users VALUES(77,NULL,NULL,'7287952112','2026-01-30T14:04:00.794Z'); +INSERT INTO users VALUES(78,NULL,NULL,'9059201201','2026-01-31T04:21:03.872Z'); +INSERT INTO users VALUES(79,NULL,NULL,'9701896405','2026-01-31T05:02:06.385Z'); +INSERT INTO users VALUES(80,NULL,NULL,'8897763408','2026-01-31T09:04:31.842Z'); +INSERT INTO users VALUES(81,NULL,NULL,'9652338446','2026-01-31T11:30:05.039Z'); +INSERT INTO users VALUES(82,NULL,NULL,'7981337554','2026-02-01T01:01:39.061Z'); +INSERT INTO users VALUES(83,NULL,NULL,'9441740551','2026-02-01T02:09:00.953Z'); +INSERT INTO users VALUES(84,NULL,NULL,'8639762655','2026-02-01T04:27:54.485Z'); +INSERT INTO users VALUES(85,NULL,NULL,'8897076204','2026-02-01T04:28:15.894Z'); +INSERT INTO users VALUES(86,NULL,NULL,'9121585783','2026-02-01T05:43:59.004Z'); +INSERT INTO users VALUES(87,NULL,NULL,'6301552539','2026-02-01T07:09:19.500Z'); +INSERT INTO users VALUES(88,NULL,NULL,'9398199100','2026-02-01T10:05:52.738Z'); +INSERT INTO users VALUES(89,NULL,NULL,'8919308867','2026-02-01T23:24:10.239Z'); +INSERT INTO users VALUES(90,NULL,NULL,'8688629245','2026-02-02T03:47:50.938Z'); +INSERT INTO users VALUES(91,'P Praveen Goud','ppraveengoud95@gmail.com','9347168525','2026-02-02T04:24:13.149Z'); +INSERT INTO users VALUES(92,NULL,NULL,'6305442889','2026-02-02T04:51:19.029Z'); +INSERT INTO users VALUES(93,NULL,NULL,'9705107988','2026-02-02T04:55:39.662Z'); +INSERT INTO users VALUES(94,NULL,NULL,'9392974026','2026-02-02T05:57:56.245Z'); +INSERT INTO users VALUES(95,NULL,NULL,'6301612623','2026-02-02T06:38:42.733Z'); +INSERT INTO users VALUES(96,NULL,NULL,'9848466280','2026-02-02T08:27:54.916Z'); +INSERT INTO users VALUES(97,NULL,NULL,'8522862163','2026-02-02T23:55:27.426Z'); +INSERT INTO users VALUES(98,NULL,NULL,'9381165946','2026-02-03T00:25:04.574Z'); +INSERT INTO users VALUES(99,'Saniya Shafeen','shafeensaniya45@gmail.com','7893499520','2026-02-03T04:39:25.892Z'); +INSERT INTO users VALUES(100,NULL,NULL,'6304650114','2026-02-03T09:18:43.200Z'); +INSERT INTO users VALUES(101,NULL,NULL,'9502114234','2026-02-04T00:14:08.656Z'); +INSERT INTO users VALUES(102,NULL,NULL,'9985202474','2026-02-04T08:47:28.278Z'); +INSERT INTO users VALUES(103,NULL,NULL,'6302119072','2026-02-05T03:14:11.453Z'); +INSERT INTO users VALUES(104,NULL,NULL,'7981006980','2026-02-05T03:16:32.728Z'); +INSERT INTO users VALUES(105,NULL,NULL,'9063857682','2026-02-05T22:57:15.947Z'); +INSERT INTO users VALUES(106,NULL,NULL,'9701261238','2026-02-06T02:43:06.599Z'); +INSERT INTO users VALUES(107,'Saad bin shafi','saadhindustanigamer@gmail.com','9573989830','2026-02-06T02:46:25.903Z'); +INSERT INTO users VALUES(108,NULL,NULL,'9949035807','2026-02-06T03:09:58.138Z'); +INSERT INTO users VALUES(109,NULL,NULL,'9063508083','2026-02-06T03:12:31.689Z'); +INSERT INTO users VALUES(110,NULL,NULL,'9985261902','2026-02-06T03:15:56.628Z'); +INSERT INTO users VALUES(111,NULL,NULL,'8106483142','2026-02-06T04:10:51.372Z'); +INSERT INTO users VALUES(112,NULL,NULL,'9542134959','2026-02-06T04:26:57.486Z'); +INSERT INTO users VALUES(113,NULL,NULL,'9052741123','2026-02-06T04:59:13.973Z'); +INSERT INTO users VALUES(114,NULL,NULL,'9052323490','2026-02-06T05:37:18.707Z'); +INSERT INTO users VALUES(115,NULL,NULL,'9949055660','2026-02-06T10:09:32.042Z'); +INSERT INTO users VALUES(116,NULL,NULL,'9885525123','2026-02-06T11:09:45.755Z'); +INSERT INTO users VALUES(117,NULL,NULL,'7013765027','2026-02-06T15:19:32.458Z'); +INSERT INTO users VALUES(118,NULL,NULL,'9966022031','2026-02-06T22:54:18.273Z'); +INSERT INTO users VALUES(119,NULL,NULL,'9059318255','2026-02-07T07:04:29.373Z'); +INSERT INTO users VALUES(120,NULL,NULL,'7013641457','2026-02-07T23:09:49.039Z'); +INSERT INTO users VALUES(121,NULL,NULL,'8639958133','2026-02-08T00:39:50.553Z'); +INSERT INTO users VALUES(122,NULL,NULL,'9642339427','2026-02-08T04:30:06.375Z'); +INSERT INTO users VALUES(123,NULL,NULL,'6305184261','2026-02-09T05:48:49.256Z'); +INSERT INTO users VALUES(124,NULL,NULL,'7993504221','2026-02-09T06:32:24.848Z'); +INSERT INTO users VALUES(125,NULL,NULL,'8341078342','2026-02-09T07:54:10.686Z'); +INSERT INTO users VALUES(126,NULL,NULL,'6305464103','2026-02-09T12:28:45.736Z'); +INSERT INTO users VALUES(127,NULL,NULL,'7989653339','2026-02-10T05:33:41.303Z'); +INSERT INTO users VALUES(128,NULL,NULL,'7032235482','2026-02-12T03:16:41.897Z'); +INSERT INTO users VALUES(129,NULL,NULL,'9581686892','2026-02-12T07:57:59.947Z'); +INSERT INTO users VALUES(130,NULL,NULL,'9912951895','2026-02-14T02:35:40.864Z'); +INSERT INTO users VALUES(131,NULL,NULL,'9966710280','2026-02-14T04:55:40.255Z'); +INSERT INTO users VALUES(132,NULL,NULL,'9110526651','2026-02-14T23:05:21.765Z'); +INSERT INTO users VALUES(133,NULL,NULL,'9398533610','2026-02-15T01:15:30.327Z'); +INSERT INTO users VALUES(134,NULL,NULL,'9133621540','2026-02-16T04:00:23.915Z'); +INSERT INTO users VALUES(135,NULL,NULL,'8660801043','2026-02-17T03:29:12.461Z'); +INSERT INTO users VALUES(136,NULL,NULL,'9390785046','2026-02-17T07:26:31.443Z'); +INSERT INTO users VALUES(137,NULL,NULL,'8555938403','2026-02-17T08:52:01.136Z'); +INSERT INTO users VALUES(138,NULL,NULL,'8328369823','2026-02-17T09:06:40.132Z'); +INSERT INTO users VALUES(139,NULL,NULL,'8143905611','2026-02-17T09:20:24.409Z'); +INSERT INTO users VALUES(140,'Sara','iiamsara554@gmail.com','9848738554','2026-02-17T13:47:07.407Z'); +INSERT INTO users VALUES(141,NULL,NULL,'8919042963','2026-02-17T19:44:41.712Z'); +INSERT INTO users VALUES(142,NULL,NULL,'9490020005','2026-02-17T22:23:19.414Z'); +INSERT INTO users VALUES(143,NULL,NULL,'7286888001','2026-02-17T22:54:09.153Z'); +INSERT INTO users VALUES(144,NULL,NULL,'7981140388','2026-02-18T03:32:55.242Z'); +INSERT INTO users VALUES(145,'Naheed','mohammednaheed007@gmail.com','8179264991','2026-02-18T03:39:58.246Z'); +INSERT INTO users VALUES(146,NULL,NULL,'9392457825','2026-02-18T04:29:38.244Z'); +INSERT INTO users VALUES(147,NULL,NULL,'9885579134','2026-02-18T05:14:12.703Z'); +INSERT INTO users VALUES(148,NULL,NULL,'9100529645','2026-02-18T07:29:50.622Z'); +INSERT INTO users VALUES(149,NULL,NULL,'8519862344','2026-02-18T09:09:16.387Z'); +INSERT INTO users VALUES(150,NULL,NULL,'9700630611','2026-02-18T09:11:40.075Z'); +INSERT INTO users VALUES(151,'Anjum','anjuman2504@gmail.com','9346508676','2026-02-18T09:21:02.267Z'); +INSERT INTO users VALUES(152,NULL,NULL,'6300961220','2026-02-18T10:43:20.416Z'); +INSERT INTO users VALUES(153,NULL,NULL,'9618363653','2026-02-18T13:29:45.209Z'); +INSERT INTO users VALUES(154,NULL,NULL,'7981078600','2026-02-18T23:28:16.145Z'); +INSERT INTO users VALUES(155,NULL,NULL,'9010023867','2026-02-18T23:41:27.596Z'); +INSERT INTO users VALUES(156,NULL,NULL,'9381371156','2026-02-18T23:57:31.708Z'); +INSERT INTO users VALUES(157,NULL,NULL,'6300072507','2026-02-19T01:25:16.627Z'); +INSERT INTO users VALUES(158,NULL,NULL,'9381289050','2026-02-19T01:44:34.090Z'); +INSERT INTO users VALUES(159,'Mohd.Mujahid','mujahidmohd953@gmail.com','9182114853','2026-02-19T03:38:52.038Z'); +INSERT INTO users VALUES(160,NULL,NULL,'9642417025','2026-02-19T03:46:24.011Z'); +INSERT INTO users VALUES(161,NULL,NULL,'8008981838','2026-02-19T04:25:22.873Z'); +INSERT INTO users VALUES(162,NULL,NULL,'6302798105','2026-02-19T05:06:14.768Z'); +INSERT INTO users VALUES(163,NULL,NULL,'7032026589','2026-02-19T06:46:48.871Z'); +INSERT INTO users VALUES(164,NULL,NULL,'7989819435','2026-02-19T07:01:00.060Z'); +INSERT INTO users VALUES(165,NULL,NULL,'6281349676','2026-02-19T10:26:45.515Z'); +INSERT INTO users VALUES(166,NULL,NULL,'7013950981','2026-02-19T12:05:05.705Z'); +INSERT INTO users VALUES(167,NULL,NULL,'9550936995','2026-02-20T03:19:18.911Z'); +INSERT INTO users VALUES(168,NULL,NULL,'8498937807','2026-02-20T03:28:19.863Z'); +INSERT INTO users VALUES(169,NULL,NULL,'7799420422','2026-02-20T03:35:55.512Z'); +INSERT INTO users VALUES(170,NULL,NULL,'9901294914','2026-02-20T03:53:54.048Z'); +INSERT INTO users VALUES(171,NULL,NULL,'6281738569','2026-02-20T03:55:41.510Z'); +INSERT INTO users VALUES(172,'Irfan','md.irfan.s@gmail.com','6300758922','2026-02-20T04:00:52.359Z'); +INSERT INTO users VALUES(173,NULL,NULL,'8978932551','2026-02-20T04:08:12.465Z'); +INSERT INTO users VALUES(174,NULL,NULL,'9642275691','2026-02-20T05:28:56.025Z'); +INSERT INTO users VALUES(175,NULL,NULL,'8179512068','2026-02-20T05:49:56.484Z'); +INSERT INTO users VALUES(176,NULL,NULL,'9885578647','2026-02-20T05:59:41.714Z'); +INSERT INTO users VALUES(177,NULL,NULL,'8519977988','2026-02-20T06:50:34.128Z'); +INSERT INTO users VALUES(178,NULL,NULL,'7799492001','2026-02-20T08:36:19.907Z'); +INSERT INTO users VALUES(179,NULL,NULL,'7995930618','2026-02-20T10:08:20.176Z'); +INSERT INTO users VALUES(180,NULL,NULL,'8328255182','2026-02-20T10:57:02.738Z'); +INSERT INTO users VALUES(181,NULL,NULL,'9885252564','2026-02-20T13:32:49.791Z'); +INSERT INTO users VALUES(182,NULL,NULL,'8790821267','2026-02-20T17:13:22.843Z'); +INSERT INTO users VALUES(183,NULL,NULL,'9885734956','2026-02-20T18:20:16.708Z'); +INSERT INTO users VALUES(184,'Muhammad Hussain','hussainmuhammad85@gmail.com','9160481161','2026-02-20T22:45:28.449Z'); +INSERT INTO users VALUES(185,NULL,NULL,'9966621818','2026-02-21T02:47:52.969Z'); +INSERT INTO users VALUES(186,NULL,NULL,'9550541366','2026-02-21T03:35:01.487Z'); +INSERT INTO users VALUES(187,NULL,NULL,'9703691566','2026-02-21T05:38:35.653Z'); +INSERT INTO users VALUES(188,NULL,NULL,'9014920842','2026-02-21T07:16:31.153Z'); +INSERT INTO users VALUES(189,NULL,NULL,'8019231723','2026-02-21T13:01:22.359Z'); +INSERT INTO users VALUES(190,NULL,NULL,'9912119864','2026-02-21T13:29:01.921Z'); +INSERT INTO users VALUES(191,NULL,NULL,'7097321320','2026-02-21T17:55:26.140Z'); +INSERT INTO users VALUES(192,NULL,NULL,'9160475130','2026-02-21T18:43:27.474Z'); +INSERT INTO users VALUES(193,NULL,NULL,'7207490881','2026-02-21T22:51:12.696Z'); +INSERT INTO users VALUES(194,NULL,NULL,'6302774527','2026-02-22T00:12:34.868Z'); +INSERT INTO users VALUES(195,NULL,NULL,'6301375032','2026-02-22T00:57:17.585Z'); +INSERT INTO users VALUES(196,NULL,NULL,'9666209134','2026-02-22T00:58:27.611Z'); +INSERT INTO users VALUES(197,NULL,NULL,'7842321671','2026-02-22T01:05:28.299Z'); +INSERT INTO users VALUES(198,NULL,NULL,'7799311559','2026-02-22T01:07:16.081Z'); +INSERT INTO users VALUES(199,NULL,NULL,'6301857893','2026-02-22T01:14:22.337Z'); +INSERT INTO users VALUES(200,NULL,NULL,'8328216403','2026-02-22T02:01:34.549Z'); +INSERT INTO users VALUES(201,NULL,NULL,'9121477995','2026-02-22T02:01:43.802Z'); +INSERT INTO users VALUES(202,NULL,NULL,'9347152305','2026-02-22T02:17:36.033Z'); +INSERT INTO users VALUES(203,NULL,NULL,'7989814618','2026-02-22T03:02:36.782Z'); +INSERT INTO users VALUES(204,NULL,NULL,'8919712147','2026-02-22T03:19:54.195Z'); +INSERT INTO users VALUES(205,NULL,NULL,'9177629869','2026-02-22T03:22:45.416Z'); +INSERT INTO users VALUES(206,NULL,NULL,'9000452637','2026-02-22T04:20:17.471Z'); +INSERT INTO users VALUES(207,NULL,NULL,'6301318598','2026-02-22T04:24:09.076Z'); +INSERT INTO users VALUES(208,NULL,NULL,'9618770682','2026-02-22T04:36:58.705Z'); +INSERT INTO users VALUES(209,NULL,NULL,'7993744243','2026-02-22T04:43:48.074Z'); +INSERT INTO users VALUES(210,NULL,NULL,'7989131798','2026-02-22T05:14:34.275Z'); +INSERT INTO users VALUES(211,NULL,NULL,'9398417118','2026-02-22T05:15:20.227Z'); +INSERT INTO users VALUES(212,NULL,NULL,'7670818331','2026-02-22T06:00:11.447Z'); +INSERT INTO users VALUES(213,NULL,NULL,'9392816978','2026-02-22T06:29:48.269Z'); +INSERT INTO users VALUES(214,NULL,NULL,'9110505256','2026-02-22T06:33:52.862Z'); +INSERT INTO users VALUES(215,NULL,NULL,'9573018203','2026-02-22T06:59:09.861Z'); +INSERT INTO users VALUES(216,NULL,NULL,'9542208012','2026-02-22T07:13:11.645Z'); +INSERT INTO users VALUES(217,NULL,NULL,'7285920951','2026-02-22T07:30:19.201Z'); +INSERT INTO users VALUES(218,NULL,NULL,'8886029909','2026-02-22T12:03:42.001Z'); +INSERT INTO users VALUES(219,NULL,NULL,'7569573638','2026-02-23T00:50:15.659Z'); +INSERT INTO users VALUES(220,NULL,NULL,'7993421951','2026-02-23T01:39:32.592Z'); +INSERT INTO users VALUES(221,NULL,NULL,'6301475500','2026-02-23T02:13:14.075Z'); +INSERT INTO users VALUES(222,NULL,NULL,'9951260514','2026-02-23T03:24:02.953Z'); +INSERT INTO users VALUES(223,NULL,NULL,'9398876512','2026-02-23T03:46:04.808Z'); +INSERT INTO users VALUES(224,NULL,NULL,'8374782337','2026-02-23T04:36:49.085Z'); +INSERT INTO users VALUES(225,NULL,NULL,'9666426396','2026-02-23T06:41:13.767Z'); +INSERT INTO users VALUES(226,NULL,NULL,'9391479179','2026-02-23T08:30:31.544Z'); +INSERT INTO users VALUES(227,NULL,NULL,'8688806599','2026-02-23T11:25:23.839Z'); +INSERT INTO users VALUES(228,NULL,NULL,'9966138248','2026-02-23T22:38:46.818Z'); +INSERT INTO users VALUES(229,NULL,NULL,'9885575791','2026-02-24T01:40:31.078Z'); +INSERT INTO users VALUES(230,NULL,NULL,'9398645142','2026-02-24T01:40:35.864Z'); +INSERT INTO users VALUES(231,NULL,NULL,'9949237303','2026-02-24T12:27:35.380Z'); +INSERT INTO users VALUES(232,NULL,NULL,'9059525115','2026-02-24T14:49:55.020Z'); +INSERT INTO users VALUES(265,'John Wick','john@email.com','9676651499','2026-03-22T00:28:18.510Z'); +CREATE TABLE IF NOT EXISTS "vendor_snippets" ("id" INTEGER NOT NULL, "snippet_code" TEXT NOT NULL, "slot_id" INTEGER, "product_ids" TEXT NOT NULL, "valid_till" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "is_permanent" INTEGER NOT NULL DEFAULT false); +INSERT INTO vendor_snippets VALUES(55,'Allvegetables1',NULL,'[88,66,70,64,91,19,71,27,79,32,5,65,45,77,74,17,16,72,33,13,89,29,78,30,69,31,76,90,18,68]','2027-01-27T12:26:00.000Z','2026-01-27T12:33:18.974Z',1); +INSERT INTO vendor_snippets VALUES(56,'AllMuttonitems',NULL,'[34,85,14,87,35,84,28,86,4,12]','2027-03-30T21:21:00.000Z','2026-01-27T21:22:14.560Z',1); +INSERT INTO vendor_snippets VALUES(57,'AllChickenitems',NULL,'[3,10,15,1,24,40,42,80,23,41,21,2,36]','2027-04-21T21:24:00.000Z','2026-01-27T21:25:03.144Z',1); +INSERT INTO vendor_snippets VALUES(58,'AllFruitsitem',NULL,'[7,47,49,56,39,62,38,59,57,53,11,48,63,6,43,13,50,54,52,46,51,26,60,55,44,73,61,25,58]','2027-04-28T21:27:00.000Z','2026-01-27T21:28:06.746Z',1); +COMMIT; diff --git a/packages/migrator/scripts/generate-drop.js b/packages/migrator/scripts/generate-drop.js new file mode 100644 index 0000000..67c1b8f --- /dev/null +++ b/packages/migrator/scripts/generate-drop.js @@ -0,0 +1,37 @@ +import fs from 'fs' +import path from 'path' + +const inputPath = process.argv[2] +const outputPath = process.argv[3] + +if (!inputPath || !outputPath) { + console.error('Usage: node generate-drop.js ') + process.exit(1) +} + +const input = fs.readFileSync(path.resolve(inputPath), 'utf8') + +const tableRegex = /CREATE TABLE IF NOT EXISTS "([^"]+)"/g +const tables = [] +let match +while ((match = tableRegex.exec(input)) !== null) { + tables.push(match[1]) +} + +const uniqueTables = Array.from(new Set(tables)) + +const drops = [ + 'PRAGMA foreign_keys=OFF;', + 'BEGIN TRANSACTION;' +] + +// Drop in reverse order of creation +for (const table of uniqueTables.reverse()) { + drops.push(`DROP TABLE IF EXISTS "${table}";`) +} + +drops.push('COMMIT;') + +fs.writeFileSync(path.resolve(outputPath), drops.join('\n') + '\n', 'utf8') + +console.log(`Wrote ${outputPath} with ${uniqueTables.length} DROP statements`) diff --git a/packages/migrator/scripts/strip-fk.js b/packages/migrator/scripts/strip-fk.js new file mode 100644 index 0000000..a056f69 --- /dev/null +++ b/packages/migrator/scripts/strip-fk.js @@ -0,0 +1,21 @@ +import fs from 'fs' +import path from 'path' + +const inputPath = process.argv[2] +const outputPath = process.argv[3] + +if (!inputPath || !outputPath) { + console.error('Usage: node strip-fk.js ') + process.exit(1) +} + +const input = fs.readFileSync(path.resolve(inputPath), 'utf8') + +// Remove FOREIGN KEY clauses from CREATE TABLE statements +const output = input + .replace(/,?\s*FOREIGN KEY\s*\([^\)]*\)\s*REFERENCES\s*[^;\n]*?/g, '') + .replace(/\n\s*FOREIGN KEY\s*\([^\)]*\)\s*REFERENCES\s*[^;\n]*\n/gi, '\n') + +fs.writeFileSync(path.resolve(outputPath), output, 'utf8') + +console.log(`Wrote ${outputPath} without foreign keys`) diff --git a/packages/migrator/src/config.ts b/packages/migrator/src/config.ts index ef854e2..96bd07d 100644 --- a/packages/migrator/src/config.ts +++ b/packages/migrator/src/config.ts @@ -7,6 +7,7 @@ export const postgresConfig = { connectionString: 'postgresql://postgres:meatfarmer_master_password@57.128.212.174:7447/meatfarmer', ssl: false as boolean | { rejectUnauthorized: boolean }, + schema: 'mf', }; // SQLite Configuration diff --git a/packages/migrator/src/postgresToSqlite/index.ts b/packages/migrator/src/postgresToSqlite/index.ts index 6f2a52a..7d95a1b 100644 --- a/packages/migrator/src/postgresToSqlite/index.ts +++ b/packages/migrator/src/postgresToSqlite/index.ts @@ -14,6 +14,7 @@ interface ColumnInfo { type: string; isNullable: boolean; defaultValue: string | null; + isPrimaryKey: boolean; } /** @@ -57,10 +58,10 @@ async function getPostgresTables(client: Client): Promise { const result = await client.query(` SELECT table_name FROM information_schema.tables - WHERE table_schema = 'public' + WHERE table_schema = $1 AND table_type = 'BASE TABLE' ORDER BY table_name - `); + `, [postgresConfig.schema]); return result.rows.map(row => row.table_name); } @@ -69,7 +70,25 @@ async function getPostgresTables(client: Client): Promise { * Gets column information for a specific table */ async function getTableColumns(client: Client, tableName: string): Promise { - const result = await client.query(` + const pkResult = await client.query( + ` + SELECT kcu.column_name + FROM information_schema.table_constraints tc + JOIN information_schema.key_column_usage kcu + ON tc.constraint_name = kcu.constraint_name + AND tc.table_schema = kcu.table_schema + WHERE tc.constraint_type = 'PRIMARY KEY' + AND tc.table_schema = $1 + AND tc.table_name = $2 + ORDER BY kcu.ordinal_position + `, + [postgresConfig.schema, tableName] + ) + + const primaryKeys = new Set(pkResult.rows.map(row => row.column_name)) + + const result = await client.query( + ` SELECT column_name, data_type, @@ -77,42 +96,69 @@ async function getTableColumns(client: Client, tableName: string): Promise ({ name: row.column_name, type: row.data_type, isNullable: row.is_nullable === 'YES', defaultValue: row.column_default, - })); + isPrimaryKey: primaryKeys.has(row.column_name), + })) } /** * Creates SQLite table based on PostgreSQL schema */ function createSqliteTable(db: Database.Database, tableName: string, columns: ColumnInfo[]): void { + const primaryKeyColumns = columns.filter(col => col.isPrimaryKey).map(col => col.name) + const columnDefs = columns.map(col => { - let def = `"${col.name}" ${mapPostgresTypeToSqlite(col.type)}`; - if (!col.isNullable) { - def += ' NOT NULL'; + const mappedType = mapPostgresTypeToSqlite(col.type) + const isSinglePk = primaryKeyColumns.length === 1 && col.isPrimaryKey + + if (isSinglePk && mappedType === 'INTEGER') { + return `"${col.name}" INTEGER PRIMARY KEY` } - if (col.defaultValue !== null) { + + let def = `"${col.name}" ${mappedType}` + if (!col.isNullable && !col.isPrimaryKey) { + def += ' NOT NULL' + } + if (col.defaultValue !== null && !col.isPrimaryKey) { // Convert PostgreSQL default values to SQLite - let defaultVal = col.defaultValue; + let defaultVal = col.defaultValue if (defaultVal.includes('nextval')) { // Skip auto-increment defaults, SQLite handles this with INTEGER PRIMARY KEY } else if (defaultVal === 'now()' || defaultVal.includes('CURRENT_TIMESTAMP')) { - def += ` DEFAULT CURRENT_TIMESTAMP`; + def += ` DEFAULT CURRENT_TIMESTAMP` } else { - def += ` DEFAULT ${defaultVal}`; + // Strip Postgres type casts (e.g. 'pending'::payment_status) + defaultVal = defaultVal.replace(/::[\w\."]+/g, '') + // Remove remaining type keywords from defaults (e.g. 'none' varying) + defaultVal = defaultVal.replace(/\s+character\s+varying\b/gi, '') + defaultVal = defaultVal.replace(/\s+varying\b/gi, '') + defaultVal = defaultVal.trim() + // Convert Postgres array literal defaults like '{}'[] to JSON array string + if (defaultVal.includes('[]') && defaultVal.includes('{')) { + defaultVal = "'[]'" + } + def += ` DEFAULT ${defaultVal}` } } - return def; - }).join(', '); + return def + }) + + if (primaryKeyColumns.length > 1) { + const pkDef = `PRIMARY KEY (${primaryKeyColumns.map(col => `"${col}"`).join(', ')})` + columnDefs.push(pkDef) + } - const createSql = `CREATE TABLE IF NOT EXISTS "${tableName}" (${columnDefs})`; + const createSql = `CREATE TABLE IF NOT EXISTS "${tableName}" (${columnDefs.join(', ')})`; if (logConfig.verbose) { console.log(`Creating table: ${tableName}`); @@ -146,7 +192,9 @@ async function migrateTableData( console.log(`Migrating table: ${tableName}`); // Get total count first - const countResult = await pgClient.query(`SELECT COUNT(*) FROM "${tableName}"`); + const countResult = await pgClient.query( + `SELECT COUNT(*) FROM "${postgresConfig.schema}"."${tableName}"` + ); const totalRows = parseInt(countResult.rows[0].count); console.log(` Total rows to migrate: ${totalRows}`); @@ -171,7 +219,7 @@ async function migrateTableData( while (offset < totalRows) { const result = await pgClient.query( - `SELECT * FROM "${tableName}" ORDER BY 1 LIMIT $1 OFFSET $2`, + `SELECT * FROM "${postgresConfig.schema}"."${tableName}" ORDER BY 1 LIMIT $1 OFFSET $2`, [migrationConfig.batchSize, offset] ); diff --git a/packages/migrator/src/sqliteToPostgres/index.ts b/packages/migrator/src/sqliteToPostgres/index.ts index 73fe860..715ff9e 100644 --- a/packages/migrator/src/sqliteToPostgres/index.ts +++ b/packages/migrator/src/sqliteToPostgres/index.ts @@ -72,16 +72,16 @@ async function createPostgresTable( const existsResult = await pgClient.query(` SELECT EXISTS ( SELECT FROM information_schema.tables - WHERE table_schema = 'public' - AND table_name = $1 + WHERE table_schema = $1 + AND table_name = $2 ) - `, [tableName]); + `, [postgresConfig.schema, tableName]); const tableExists = existsResult.rows[0].exists; if (tableExists && migrationConfig.truncateBeforeInsert) { // Drop existing table to recreate - await pgClient.query(`DROP TABLE IF EXISTS "${tableName}" CASCADE`); + await pgClient.query(`DROP TABLE IF EXISTS "${postgresConfig.schema}"."${tableName}" CASCADE`); console.log(` Dropped existing table: ${tableName}`); } else if (tableExists) { console.log(` Table already exists, will append data: ${tableName}`); @@ -102,7 +102,7 @@ async function createPostgresTable( return def; }).join(', '); - const createSql = `CREATE TABLE "${tableName}" (${columnDefs})`; + const createSql = `CREATE TABLE "${postgresConfig.schema}"."${tableName}" (${columnDefs})`; if (logConfig.verbose) { console.log(`Creating table: ${tableName}`); @@ -167,7 +167,7 @@ async function migrateTableData( // Clear existing data if configured (and table wasn't just created) if (migrationConfig.truncateBeforeInsert) { - await pgClient.query(`DELETE FROM "${tableName}"`); + await pgClient.query(`DELETE FROM "${postgresConfig.schema}"."${tableName}"`); console.log(` Cleared existing data`); } @@ -189,7 +189,7 @@ async function migrateTableData( const values = columns.map(col => parseValue(row[col.name], col.name)); await pgClient.query( - `INSERT INTO "${tableName}" (${columnNames}) VALUES (${placeholders})`, + `INSERT INTO "${postgresConfig.schema}"."${tableName}" (${columnNames}) VALUES (${placeholders})`, values ); } diff --git a/packages/ui/index.ts b/packages/ui/index.ts index 0e92038..05d1e47 100755 --- a/packages/ui/index.ts +++ b/packages/ui/index.ts @@ -64,7 +64,8 @@ const isDevMode = Constants.executionEnvironment !== "standalone"; // const BASE_API_URL = API_URL; // const BASE_API_URL = 'http://10.0.2.2:4000'; // const BASE_API_URL = 'http://192.168.100.101:4000'; -const BASE_API_URL = 'http://192.168.1.5:4000'; +// const BASE_API_URL = 'http://192.168.1.5:4000'; +const BASE_API_URL = 'http://192.168.1.5:8787'; // let BASE_API_URL = "https://mf.freshyo.in"; // let BASE_API_URL = "https://freshyo.technocracy.ovh"; // let BASE_API_URL = 'http://192.168.100.107:4000';